diff --git a/dist/README.md b/dist/README.md index 02fbaf6849f..6557383dd3a 100644 --- a/dist/README.md +++ b/dist/README.md @@ -91,7 +91,7 @@ The `basic` partial bundle contains trace modules `bar`, `pie` and `scatter`. | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 2.6 MB | 1008.4 kB | 349.2 kB | +| 2.6 MB | 1008.5 kB | 349.2 kB | #### CDN links > https://cdn.plot.ly/plotly-basic-3.0.0-rc.0.js @@ -114,7 +114,7 @@ The `cartesian` partial bundle contains trace modules `bar`, `box`, `contour`, ` | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 3.3 MB | 1.3 MB | 446.4 kB | +| 3.3 MB | 1.3 MB | 446.5 kB | #### CDN links > https://cdn.plot.ly/plotly-cartesian-3.0.0-rc.0.js @@ -160,7 +160,7 @@ The `gl3d` partial bundle contains trace modules `cone`, `isosurface`, `mesh3d`, | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 4.1 MB | 1.5 MB | 513.6 kB | +| 4.1 MB | 1.5 MB | 513.7 kB | #### CDN links > https://cdn.plot.ly/plotly-gl3d-3.0.0-rc.0.js @@ -183,7 +183,7 @@ The `gl2d` partial bundle contains trace modules `parcoords`, `scatter`, `scatte | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 3.4 MB | 1.3 MB | 468.9 kB | +| 3.4 MB | 1.3 MB | 469 kB | #### CDN links > https://cdn.plot.ly/plotly-gl2d-3.0.0-rc.0.js @@ -229,7 +229,7 @@ The `finance` partial bundle contains trace modules `bar`, `candlestick`, `funne | Raw size | Minified size | Minified + gzip size | |------|-----------------|------------------------| -| 2.8 MB | 1.1 MB | 382.8 kB | +| 2.8 MB | 1.1 MB | 382.9 kB | #### CDN links > https://cdn.plot.ly/plotly-finance-3.0.0-rc.0.js diff --git a/dist/plot-schema.json b/dist/plot-schema.json index 6aa77cf3338..4907f5568cf 100644 --- a/dist/plot-schema.json +++ b/dist/plot-schema.json @@ -11074,7 +11074,7 @@ }, "template": { "description": "Default attributes to be applied to the plot. Templates can be created from existing plots using `Plotly.makeTemplate`, or created manually. They should be objects with format: `{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}` `layoutTemplate` and `traceTemplate` are objects matching the attribute structure of `layout` and a data trace. Trace templates are applied cyclically to traces of each type. Container arrays (eg `annotations`) have special handling: An object ending in `defaults` (eg `annotationdefaults`) is applied to each array item. But if an item has a `templateitemname` key we look in the template array for an item with matching `name` and apply that instead. If no matching `name` is found we mark the item invisible. Any named template item not referenced is appended to the end of the array, so you can use this for a watermark annotation or a logo image, for example. To omit one of these items on the plot, make an item with matching `templateitemname` and `visible: false`.", - "editType": "calc", + "editType": "plot", "valType": "any" }, "ternary": { diff --git a/dist/plotly-basic.js b/dist/plotly-basic.js index 84051b7d1e3..caa1a59db1e 100644 --- a/dist/plotly-basic.js +++ b/dist/plotly-basic.js @@ -13710,7 +13710,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13734,10 +13734,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54107,8 +54107,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54121,18 +54127,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-basic.min.js b/dist/plotly-basic.min.js index 98bf40b0b7f..77bdc21cbff 100644 --- a/dist/plotly-basic.min.js +++ b/dist/plotly-basic.min.js @@ -12,13 +12,13 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var ib=Object.defineProperty;var eI=Object.getOwnPropertyDescriptor;var rI=Object.getOwnPropertyNames;var tI=Object.prototype.hasOwnProperty;var lb=(e,r)=>()=>(e&&(r=e(e=0)),r);var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var aI=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of rI(r))!tI.call(e,n)&&n!==t&&ib(e,n,{get:()=>r[n],enumerable:!(a=eI(r,n))||a.enumerable});return e};var nI=e=>aI(ib({},"__esModule",{value:!0}),e);var tv=Z(ob=>{"use strict";ob.version="3.0.0-rc.0"});var ub=Z((sb,av)=>{(function(r,t,a){t[r]=t[r]||a(),typeof av!="undefined"&&av.exports?av.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:sb,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(_,T,b,M){return Object.defineProperty(_,T,{value:b,writable:!0,configurable:M!==!1})}}catch(w){r=function(T,b,M){return T[b]=M,T}}a=function(){var _,T,b;function M(S,C){this.fn=S,this.self=C,this.next=void 0}return{add:function(C,q){b=new M(C,q),T?T.next=b:_=b,T=b,b=void 0},drain:function(){var C=_;for(_=T=t=void 0;C;)C.fn.call(C.self),C=C.next}}}();function l(w,_){a.add(w,_),t||(t=i(a.drain))}function o(w){var _,T=typeof w;return w!=null&&(T=="object"||T=="function")&&(_=w.then),typeof _=="function"?_:!1}function s(){for(var w=0;w0&&l(s,T))}catch(b){v.call(new d(T),b)}}}function v(w){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=w,_.state=2,_.chain.length>0&&l(s,_))}function h(w,_,T,b){for(var M=0;M<_.length;M++)(function(C){w.resolve(_[C]).then(function(D){T(C,D)},b)})(M)}function d(w){this.def=w,this.triggered=!1}function m(w){this.promise=w,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(w){if(typeof w!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new m(this);this.then=function(b,M){var S={success:typeof b=="function"?b:!0,failure:typeof M=="function"?M:!1};return S.promise=new this.constructor(function(q,D){if(typeof q!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=q,S.reject=D}),_.chain.push(S),_.state!==0&&l(s,_),S.promise},this.catch=function(b){return this.then(void 0,b)};try{w.call(void 0,function(b){f.call(_,b)},function(b){v.call(_,b)})}catch(T){v.call(_,T)}}var y=r({},"constructor",g,!1);return g.prototype=y,r(y,"__NPO__",0,!1),r(g,"resolve",function(_){var T=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new T(function(M,S){if(typeof M!="function"||typeof S!="function")throw TypeError("Not a function");M(_)})}),r(g,"reject",function(_){return new this(function(b,M){if(typeof b!="function"||typeof M!="function")throw TypeError("Not a function");M(_)})}),r(g,"all",function(_){var T=this;return n.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):_.length===0?T.resolve([]):new T(function(M,S){if(typeof M!="function"||typeof S!="function")throw TypeError("Not a function");var C=_.length,q=Array(C),D=0;h(T,_,function(z,F){q[z]=F,++D===C&&M(q)},S)})}),r(g,"race",function(_){var T=this;return n.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(M,S){if(typeof M!="function"||typeof S!="function")throw TypeError("Not a function");h(T,_,function(q,D){M(D)},S)})}),g})});var Ir=Z((oie,nv)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},a=self.document;function n(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var x=p.length,A=new Array(x);x--;)A[x]=p[x];return A}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var l=this.Element.prototype,o=l.setAttribute,s=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;l.setAttribute=function(p,x){o.call(this,p,x+"")},l.setAttributeNS=function(p,x,A){s.call(this,p,x,A+"")},u.setProperty=function(p,x,A){f.call(this,p,x+"",A)}}e.ascending=v;function v(c,p){return cp?1:c>=p?0:NaN}e.descending=function(c,p){return pc?1:p>=c?0:NaN},e.min=function(c,p){var x=-1,A=c.length,k,L;if(arguments.length===1){for(;++x=L){k=L;break}for(;++xL&&(k=L)}else{for(;++x=L){k=L;break}for(;++xL&&(k=L)}return k},e.max=function(c,p){var x=-1,A=c.length,k,L;if(arguments.length===1){for(;++x=L){k=L;break}for(;++xk&&(k=L)}else{for(;++x=L){k=L;break}for(;++xk&&(k=L)}return k},e.extent=function(c,p){var x=-1,A=c.length,k,L,P;if(arguments.length===1){for(;++x=L){k=P=L;break}for(;++xL&&(k=L),P=L){k=P=L;break}for(;++xL&&(k=L),P1)return P/(N-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,x,A,k){for(arguments.length<3&&(A=0),arguments.length<4&&(k=p.length);A>>1;c(p[L],x)<0?A=L+1:k=L}return A},right:function(p,x,A,k){for(arguments.length<3&&(A=0),arguments.length<4&&(k=p.length);A>>1;c(p[L],x)>0?k=L:A=L+1}return A}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,k,L;A;)L=Math.random()*A--|0,k=c[A+p],c[A+p]=c[L+p],c[L+p]=k;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,k=c[0],L=new Array(x<0?0:x);p=0;)for(P=c[p],x=P.length;--x>=0;)L[--k]=P[x];return L};var w=Math.abs;e.range=function(c,p,x){if(arguments.length<3&&(x=1,arguments.length<2&&(p=c,c=0)),(p-c)/x===1/0)throw new Error("infinite range");var A=[],k=_(w(x)),L=-1,P;if(c*=k,p*=k,x*=k,x<0)for(;(P=c+x*++L)>p;)A.push(P/k);else for(;(P=c+x*++L)=p.length)return k?k.call(c,N):A?N.sort(A):N;for(var V=-1,$=N.length,ee=p[G++],he,we,te,le=new b,ue;++V<$;)(ue=le.get(he=ee(we=N[V])))?ue.push(we):le.set(he,[we]);return E?(we=E(),te=function(xe,Te){we.set(xe,L(E,Te,G))}):(we={},te=function(xe,Te){we[xe]=L(E,Te,G)}),le.forEach(te),we}function P(E,N){if(N>=p.length)return E;var G=[],V=x[N++];return E.forEach(function($,ee){G.push({key:$,values:P(ee,N)})}),V?G.sort(function($,ee){return V($.key,ee.key)}):G}return c.map=function(E,N){return L(N,E,0)},c.entries=function(E){return P(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return A=E,c},c.rollup=function(E){return k=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,A=c.length;x=0&&(A=c.slice(x+1),c=c.slice(0,x)),c)return arguments.length<2?this[c].on(A):this[c].on(A,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(A,null);return this}};function Q(c){var p=[],x=new b;function A(){for(var k=p,L=-1,P=k.length,E;++L=0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),de.hasOwnProperty(x)?{space:de[x],local:c}:c}},Ae.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(be(p,c[p]));return this}return this.each(be(c,p))};function be(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function A(){this.removeAttributeNS(c.space,c.local)}function k(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?A:x:typeof p=="function"?c.local?E:P:c.local?L:k}function ye(c){return c.trim().replace(/\s+/g," ")}Ae.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),A=(c=Re(c)).length,k=-1;if(p=x.classList){for(;++k=0;)(L=x[A])&&(k&&k!==L.nextSibling&&k.parentNode.insertBefore(L,k),k=L);return this},Ae.sort=function(c){c=Me.apply(this,arguments);for(var p=-1,x=this.length;++p=p&&(p=k+1);!(N=P[p])&&++p0&&(c=c.slice(0,k));var P=Ye.get(c);P&&(c=P,L=Ue);function E(){var V=this[A];V&&(this.removeEventListener(c,V,V.$),delete this[A])}function N(){var V=L(p,t(arguments));E.call(this),this.addEventListener(c,this[A]=V,V.$=x),V._=p}function G(){var V=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),$;for(var ee in this)if($=ee.match(V)){var he=this[ee];this.removeEventListener($[1],he,he.$),delete this[ee]}}return k?p?N:E:p?W:G}var Ye=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ye.forEach(function(c){"on"+c in a&&Ye.remove(c)});function Ze(c,p){return function(x){var A=e.event;e.event=x,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=A}}}function Ue(c,p){var x=Ze(c,p);return function(A){var k=this,L=A.relatedTarget;(!L||L!==k&&!(L.compareDocumentPosition(k)&8))&&x.call(k,A)}}var Oe,Ke=0;function fr(c){var p=".dragsuppress-"+ ++Ke,x="click"+p,A=e.select(i(c)).on("touchmove"+p,ie).on("dragstart"+p,ie).on("selectstart"+p,ie);if(Oe==null&&(Oe="onselectstart"in c?!1:B(c.style,"userSelect")),Oe){var k=n(c).style,L=k[Oe];k[Oe]="none"}return function(P){if(A.on(p,null),Oe&&(k[Oe]=L),P){var E=function(){A.on(x,null)};A.on(x,function(){ie(),E()},!0),setTimeout(E,0)}}}e.mouse=function(c){return ze(c,me())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ze(c,p){p.changedTouches&&(p=p.changedTouches[0]);var x=c.ownerSVGElement||c;if(x.createSVGPoint){var A=x.createSVGPoint();if(lr<0){var k=i(c);if(k.scrollX||k.scrollY){x=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=x[0][0].getScreenCTM();lr=!(L.f||L.e),x.remove()}}return lr?(A.x=p.pageX,A.y=p.pageY):(A.x=p.clientX,A.y=p.clientY),A=A.matrixTransform(c.getScreenCTM().inverse()),[A.x,A.y]}var P=c.getBoundingClientRect();return[p.clientX-P.left-c.clientLeft,p.clientY-P.top-c.clientTop]}e.touch=function(c,p,x){if(arguments.length<3&&(x=p,p=me().changedTouches),p){for(var A=0,k=p.length,L;A0?1:c<0?-1:0}function Vr(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function St(c){return c>1?0:c<-1?ke:Math.acos(c)}function ea(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function ka(c){return((c=Math.exp(c))-1/c)/2}function ra(c){return((c=Math.exp(c))+1/c)/2}function pn(c){return((c=Math.exp(2*c))-1)/(c+1)}function Ia(c){return(c=Math.sin(c/2))*c}var ta=Math.SQRT2,Ha=2,yr=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],k=c[2],L=p[0],P=p[1],E=p[2],N=L-x,G=P-A,V=N*N+G*G,$,ee;if(V0&&(er=er.transition().duration(P)),er.call(Te.event)}function hr(){le&&le.domain(te.range().map(function(er){return(er-c.x)/c.k}).map(te.invert)),xe&&xe.domain(ue.range().map(function(er){return(er-c.y)/c.k}).map(ue.invert))}function dr(er){E++||er({type:"zoomstart"})}function Sr(er){hr(),er({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function pr(er){--E||(er({type:"zoomend"}),x=null)}function Tr(){var er=this,Lr=we.of(er,arguments),qr=0,Kr=e.select(i(er)).on(G,ca).on(V,La),_t=ce(e.mouse(er)),Ot=fr(er);$c.call(er),dr(Lr);function ca(){qr=1,or(e.mouse(er),_t),Sr(Lr)}function La(){Kr.on(G,null).on(V,null),Ot(qr),pr(Lr)}}function Jr(){var er=this,Lr=we.of(er,arguments),qr={},Kr=0,_t,Ot=".zoom-"+e.event.changedTouches[0].identifier,ca="touchmove"+Ot,La="touchend"+Ot,Oa=[],qa=e.select(er),Ga=fr(er);Va(),dr(Lr),qa.on(N,null).on(ee,Va);function ba(){var Yn=e.touches(er);return _t=c.k,Yn.forEach(function(va){va.identifier in qr&&(qr[va.identifier]=ce(va))}),Yn}function Va(){var Yn=e.event.target;e.select(Yn).on(ca,Jl).on(La,jF),Oa.push(Yn);for(var va=e.event.changedTouches,yn=0,vi=va.length;yn1){var Kl=gn[0],al=gn[1],rv=Kl[0]-al[0],nb=Kl[1]-al[1];Kr=rv*rv+nb*nb}}function Jl(){var Yn=e.touches(er),va,yn,vi,gn;$c.call(er);for(var ls=0,Kl=Yn.length;ls1?1:p,x=x<0?0:x>1?1:x,k=x<=.5?x*(1+p):x+p-x*p,A=2*x-k;function L(E){return E>360?E-=360:E<0&&(E+=360),E<60?A+(k-A)*E/60:E<180?k:E<240?A+(k-A)*(240-E)/60:A}function P(E){return Math.round(L(E)*255)}return new Sa(P(c+120),P(c),P(c-120))}e.hcl=aa;function aa(c,p,x){return this instanceof aa?(this.h=+c,this.c=+p,void(this.l=+x)):arguments.length<2?c instanceof aa?new aa(c.h,c.c,c.l):c instanceof Wt?Dc(c.l,c.a,c.b):Dc((c=nr((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new aa(c,p,x)}var In=aa.prototype=new Tt;In.brighter=function(c){return new aa(this.h,this.c,Math.min(100,this.l+at*(arguments.length?c:1)))},In.darker=function(c){return new aa(this.h,this.c,Math.max(0,this.l-at*(arguments.length?c:1)))},In.rgb=function(){return Hn(this.h,this.c,this.l).rgb()};function Hn(c,p,x){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new Wt(x,Math.cos(c*=Mr)*p,Math.sin(c)*p)}e.lab=Wt;function Wt(c,p,x){return this instanceof Wt?(this.l=+c,this.a=+p,void(this.b=+x)):arguments.length<2?c instanceof Wt?new Wt(c.l,c.a,c.b):c instanceof aa?Hn(c.h,c.c,c.l):nr((c=Sa(c)).r,c.g,c.b):new Wt(c,p,x)}var at=18,sa=.95047,Ul=1,Gl=1.08883,rl=Wt.prototype=new Tt;rl.brighter=function(c){return new Wt(Math.min(100,this.l+at*(arguments.length?c:1)),this.a,this.b)},rl.darker=function(c){return new Wt(Math.max(0,this.l-at*(arguments.length?c:1)),this.a,this.b)},rl.rgb=function(){return qc(this.l,this.a,this.b)};function qc(c,p,x){var A=(c+16)/116,k=A+p/500,L=A-x/200;return k=ku(k)*sa,A=ku(A)*Ul,L=ku(L)*Gl,new Sa(Su(3.2404542*k-1.5371385*A-.4985314*L),Su(-.969266*k+1.8760108*A+.041556*L),Su(.0556434*k-.2040259*A+1.0572252*L))}function Dc(c,p,x){return c>0?new aa(Math.atan2(x,p)*Ur,Math.sqrt(p*p+x*x),c):new aa(NaN,NaN,c)}function ku(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function Cu(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Su(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Sa;function Sa(c,p,x){return this instanceof Sa?(this.r=~~c,this.g=~~p,void(this.b=~~x)):arguments.length<2?c instanceof Sa?new Sa(c.r,c.g,c.b):Zr(""+c,Sa,Ca):new Sa(c,p,x)}function Ec(c){return new Sa(c>>16,c>>8&255,c&255)}function $o(c){return Ec(c)+""}var jo=Sa.prototype=new Tt;jo.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,x=this.g,A=this.b,k=30;return!p&&!x&&!A?new Sa(k,k,k):(p&&p>4,A=A>>4|A,k=N&240,k=k>>4|k,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,k=(N&65280)>>8,L=N&255)),p(A,k,L))}function jr(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),k=Math.max(c,p,x),L=k-A,P,E,N=(k+A)/2;return L?(E=N<.5?L/(k+A):L/(2-k-A),c==k?P=(p-x)/L+(p0&&N<1?0:P),new st(P,E,N)}function nr(c,p,x){c=ua(c),p=ua(p),x=ua(x);var A=Cu((.4124564*c+.3575761*p+.1804375*x)/sa),k=Cu((.2126729*c+.7151522*p+.072175*x)/Ul),L=Cu((.0193339*c+.119192*p+.9503041*x)/Gl);return Wt(116*k-16,500*(A-k),200*(k-L))}function ua(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function ut(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var fa=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});fa.forEach(function(c,p){fa.set(c,Ec(p))});function Rr(c){return typeof c=="function"?c:function(){return c}}e.functor=Rr,e.xhr=On(X);function On(c){return function(p,x,A){return arguments.length===2&&typeof x=="function"&&(A=x,x=null),Vl(p,x,c,A)}}function Vl(c,p,x,A){var k={},L=e.dispatch("beforesend","progress","load","error"),P={},E=new XMLHttpRequest,N=null;self.XDomainRequest&&!("withCredentials"in E)&&/^(http(s)?:)?\/\//.test(c)&&(E=new XDomainRequest),"onload"in E?E.onload=E.onerror=G:E.onreadystatechange=function(){E.readyState>3&&G()};function G(){var V=E.status,$;if(!V&&rN(E)||V>=200&&V<300||V===304){try{$=x.call(k,E)}catch(ee){L.error.call(k,ee);return}L.load.call(k,$)}else L.error.call(k,E)}return E.onprogress=function(V){var $=e.event;e.event=V;try{L.progress.call(k,E)}finally{e.event=$}},k.header=function(V,$){return V=(V+"").toLowerCase(),arguments.length<2?P[V]:($==null?delete P[V]:P[V]=$+"",k)},k.mimeType=function(V){return arguments.length?(p=V==null?null:V+"",k):p},k.responseType=function(V){return arguments.length?(N=V,k):N},k.response=function(V){return x=V,k},["get","post"].forEach(function(V){k[V]=function(){return k.send.apply(k,[V].concat(t(arguments)))}}),k.send=function(V,$,ee){if(arguments.length===2&&typeof $=="function"&&(ee=$,$=null),E.open(V,c,!0),p!=null&&!("accept"in P)&&(P.accept=p+",*/*"),E.setRequestHeader)for(var he in P)E.setRequestHeader(he,P[he]);return p!=null&&E.overrideMimeType&&E.overrideMimeType(p),N!=null&&(E.responseType=N),ee!=null&&k.on("error",ee).on("load",function(we){ee(null,we)}),L.beforesend.call(k,E),E.send($==null?null:$),k},k.abort=function(){return E.abort(),k},e.rebind(k,L,"on"),A==null?k:k.get(eN(A))}function eN(c){return c.length===1?function(p,x){c(p==null?x:null)}:c}function rN(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var x=new RegExp('["'+c+` -]`),A=c.charCodeAt(0);function k(G,V,$){arguments.length<3&&($=V,V=null);var ee=Vl(G,p,V==null?L:P(V),$);return ee.row=function(he){return arguments.length?ee.response((V=he)==null?L:P(he)):V},ee}function L(G){return k.parse(G.responseText)}function P(G){return function(V){return k.parse(V.responseText,G)}}k.parse=function(G,V){var $;return k.parseRows(G,function(ee,he){if($)return $(ee,he-1);var we=function(te){for(var le={},ue=ee.length,xe=0;xe=we)return ee;if(xe)return xe=!1,$;var Ge=te;if(G.charCodeAt(Ge)===34){for(var rr=Ge;rr++24?(isFinite(p)&&(clearTimeout(Nc),Nc=setTimeout(c1,p)),zc=0):(zc=1,G3(c1))}e.timer.flush=function(){V3(),W3()};function V3(){for(var c=Date.now(),p=Pc;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function W3(){for(var c,p=Pc,x=1/0;p;)p.c?(p.t=0;--E)te.push(k[G[$[E]][2]]);for(E=+he;E1&&Vr(c[x[A-2]],c[x[A-1]],c[k])<=0;)--A;x[A++]=k}return x.slice(0,A)}function tN(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return j(c,Ic),c};var Ic=e.geom.polygon.prototype=[];Ic.area=function(){for(var c=-1,p=this.length,x,A=this[p-1],k=0;++coe)E=E.L;else if(P=p-lN(E,x),P>oe){if(!E.R){A=E;break}E=E.R}else{L>-oe?(A=E.P,k=E):P>-oe?(A=E,k=E.N):A=k=E;break}var N=Q3(c);if(ts.insert(A,N),!(!A&&!k)){if(A===k){ns(A),k=Q3(A.site),ts.insert(N,k),N.edge=k.edge=Du(A.site,N.site),as(A),as(k);return}if(!k){N.edge=Du(A.site,N.site);return}ns(A),ns(k);var G=A.site,V=G.x,$=G.y,ee=c.x-V,he=c.y-$,we=k.site,te=we.x-V,le=we.y-$,ue=2*(ee*le-he*te),xe=ee*ee+he*he,Te=te*te+le*le,ce={x:(le*xe-he*Te)/ue+V,y:(ee*Te-te*xe)/ue+$};Hc(k.edge,G,we,ce),N.edge=Du(G,c,null,ce),k.edge=Du(c,we,null,ce),as(A),as(k)}}function $3(c,p){var x=c.site,A=x.x,k=x.y,L=k-p;if(!L)return A;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,N=x.y,G=N-p;if(!G)return E;var V=E-A,$=1/L-1/G,ee=V/G;return $?(-ee+Math.sqrt(ee*ee-2*$*(V*V/(-2*G)-N+G/2+k-L/2)))/$+A:(A+E)/2}function lN(c,p){var x=c.N;if(x)return $3(x,p);var A=c.site;return A.y===p?A.x:1/0}function j3(c){this.site=c,this.edges=[]}j3.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(e5),c.length};function oN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],k=c[1][1],L,P,E,N,G=Wl,V=G.length,$,ee,he,we,te,le;V--;)if($=G[V],!(!$||!$.prepare()))for(he=$.edges,we=he.length,ee=0;eeoe||w(N-P)>oe)&&(he.splice(ee,0,new Oc(vN($.site,le,w(E-p)oe?{x:p,y:w(L-p)oe?{x:w(P-k)oe?{x,y:w(L-x)oe?{x:w(P-A)=-qe)){var ee=N*N+G*G,he=V*V+le*le,we=(le*ee-G*he)/$,te=(N*he-V*ee)/$,le=te+E,ue=K3.pop()||new sN;ue.arc=c,ue.site=k,ue.x=we+P,ue.y=le+Math.sqrt(we*we+te*te),ue.cy=le,c.circle=ue;for(var xe=null,Te=qu._;Te;)if(ue.y0)){if(te/=he,he<0){if(te<$)return;te0){if(te>ee)return;te>$&&($=te)}if(te=x-E,!(!he&&te<0)){if(te/=he,he<0){if(te>ee)return;te>$&&($=te)}else if(he>0){if(te<$)return;te0)){if(te/=we,we<0){if(te<$)return;te0){if(te>ee)return;te>$&&($=te)}if(te=A-N,!(!we&&te<0)){if(te/=we,we<0){if(te>ee)return;te>$&&($=te)}else if(we>0){if(te<$)return;te0&&(k.a={x:E+$*he,y:N+$*we}),ee<1&&(k.b={x:E+ee*he,y:N+ee*we}),k}}}}}}function fN(c){for(var p=rs,x=uN(c[0][0],c[0][1],c[1][0],c[1][1]),A=p.length,k;A--;)k=p[A],(!cN(k,c)||!x(k)||w(k.a.x-k.b.x)=L)return;if(V>ee){if(!A)A={x:we,y:P};else if(A.y>=E)return;x={x:we,y:E}}else{if(!A)A={x:we,y:E};else if(A.y1)if(V>ee){if(!A)A={x:(P-ue)/le,y:P};else if(A.y>=E)return;x={x:(E-ue)/le,y:E}}else{if(!A)A={x:(E-ue)/le,y:E};else if(A.y=L)return;x={x:L,y:le*L+ue}}else{if(!A)A={x:L,y:le*L+ue};else if(A.x=V&&ue.x<=ee&&ue.y>=$&&ue.y<=he?[[V,he],[ee,he],[ee,$],[V,$]]:[];xe.point=N[te]}),G}function E(N){return N.map(function(G,V){return{x:Math.round(A(G,V)/oe)*oe,y:Math.round(k(G,V)/oe)*oe,i:V}})}return P.links=function(N){return y1(E(N)).edges.filter(function(G){return G.l&&G.r}).map(function(G){return{source:N[G.l.i],target:N[G.r.i]}})},P.triangles=function(N){var G=[];return y1(E(N)).cells.forEach(function(V,$){for(var ee=V.site,he=V.edges.sort(e5),we=-1,te=he.length,le,ue,xe=he[te-1].edge,Te=xe.l===ee?xe.r:xe.l;++weTe&&(Te=V.x),V.y>ce&&(ce=V.y),he.push(V.x),we.push(V.y);else for(te=0;teTe&&(Te=Ge),rr>ce&&(ce=rr),he.push(Ge),we.push(rr)}var or=Te-ue,ar=ce-xe;or>ar?ce=xe+or:Te=ue+ar;function hr(pr,Tr,Jr,Lt,rt,er,Lr,qr){if(!(isNaN(Jr)||isNaN(Lt)))if(pr.leaf){var Kr=pr.x,_t=pr.y;if(Kr!=null)if(w(Kr-Jr)+w(_t-Lt)<.01)dr(pr,Tr,Jr,Lt,rt,er,Lr,qr);else{var Ot=pr.point;pr.x=pr.y=pr.point=null,dr(pr,Ot,Kr,_t,rt,er,Lr,qr),dr(pr,Tr,Jr,Lt,rt,er,Lr,qr)}else pr.x=Jr,pr.y=Lt,pr.point=Tr}else dr(pr,Tr,Jr,Lt,rt,er,Lr,qr)}function dr(pr,Tr,Jr,Lt,rt,er,Lr,qr){var Kr=(rt+Lr)*.5,_t=(er+qr)*.5,Ot=Jr>=Kr,ca=Lt>=_t,La=ca<<1|Ot;pr.leaf=!1,pr=pr.nodes[La]||(pr.nodes[La]=a5()),Ot?rt=Kr:Lr=Kr,ca?er=_t:qr=_t,hr(pr,Tr,Jr,Lt,rt,er,Lr,qr)}var Sr=a5();if(Sr.add=function(pr){hr(Sr,pr,+$(pr,++te),+ee(pr,te),ue,xe,Te,ce)},Sr.visit=function(pr){Ru(pr,Sr,ue,xe,Te,ce)},Sr.find=function(pr){return yN(Sr,pr[0],pr[1],ue,xe,Te,ce)},te=-1,p==null){for(;++teL||ee>P||he=Ge,ar=x>=rr,hr=ar<<1|or,dr=hr+4;hrx&&(L=p.slice(x,L),E[P]?E[P]+=L:E[++P]=L),(A=A[0])===(k=k[0])?E[P]?E[P]+=k:E[++P]=k:(E[++P]=null,N.push({i:P,x:Ri(A,k)})),x=x1.lastIndex;return x=0&&!(A=e.interpolators[x](c,p)););return A}e.interpolators=[function(c,p){var x=typeof p;return(x==="string"?fa.has(p.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(p)?g1:i5:p instanceof Tt?g1:Array.isArray(p)?Uc:x==="object"&&isNaN(p)?n5:Ri)(c,p)}],e.interpolateArray=Uc;function Uc(c,p){var x=[],A=[],k=c.length,L=p.length,P=Math.min(c.length,p.length),E;for(E=0;E=0?c.slice(0,p):c,A=p>=0?c.slice(p+1):"in";return x=gN.get(x)||l5,A=bN.get(A)||X,xN(A(x.apply(null,r.call(arguments,1))))};function xN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function o5(c){return function(p){return 1-c(1-p)}}function s5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function _N(c){return c*c}function wN(c){return c*c*c}function TN(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,x=p*c;return 4*(c<.5?x:3*(c-p)+x-.75)}function MN(c){return function(p){return Math.pow(p,c)}}function AN(c){return 1-Math.cos(c*sr)}function kN(c){return Math.pow(2,10*(c-1))}function CN(c){return 1-Math.sqrt(1-c*c)}function SN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/ir*Math.asin(1/c):(c=1,x=p/4),function(A){return 1+c*Math.pow(2,-10*A)*Math.sin((A-x)*ir/p)}}function LN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function qN(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=DN;function DN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,A=c.c,k=c.l,L=p.h-x,P=p.c-A,E=p.l-k;return isNaN(P)&&(P=0,A=isNaN(A)?p.c:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return Hn(x+L*N,A+P*N,k+E*N)+""}}e.interpolateHsl=EN;function EN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,A=c.s,k=c.l,L=p.h-x,P=p.s-A,E=p.l-k;return isNaN(P)&&(P=0,A=isNaN(A)?p.s:A),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return Ca(x+L*N,A+P*N,k+E*N)+""}}e.interpolateLab=PN;function PN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,A=c.a,k=c.b,L=p.l-x,P=p.a-A,E=p.b-k;return function(N){return qc(x+L*N,A+P*N,k+E*N)+""}}e.interpolateRound=u5;function u5(c,p){return p-=c,function(x){return Math.round(c+p*x)}}e.transform=function(c){var p=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(x){if(x!=null){p.setAttribute("transform",x);var A=p.transform.baseVal.consolidate()}return new f5(A?A.matrix:zN)})(c)};function f5(c){var p=[c.a,c.b],x=[c.c,c.d],A=v5(p),k=c5(p,x),L=v5(RN(x,p,-k))||0;p[0]*x[1]180?p+=360:p-c>180&&(c+=360),A.push({i:x.push(is(x)+"rotate(",null,")")-2,x:Ri(c,p)})):p&&x.push(is(x)+"rotate("+p+")")}function IN(c,p,x,A){c!==p?A.push({i:x.push(is(x)+"skewX(",null,")")-2,x:Ri(c,p)}):p&&x.push(is(x)+"skewX("+p+")")}function HN(c,p,x,A){if(c[0]!==p[0]||c[1]!==p[1]){var k=x.push(is(x)+"scale(",null,",",null,")");A.push({i:k-4,x:Ri(c[0],p[0])},{i:k-2,x:Ri(c[1],p[1])})}else(p[0]!==1||p[1]!==1)&&x.push(is(x)+"scale("+p+")")}function h5(c,p){var x=[],A=[];return c=e.transform(c),p=e.transform(p),NN(c.translate,p.translate,x,A),FN(c.rotate,p.rotate,x,A),IN(c.skew,p.skew,x,A),HN(c.scale,p.scale,x,A),c=p=null,function(k){for(var L=-1,P=A.length,E;++L0?L=ce:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):ce>0&&(p.start({type:"start",alpha:L=ce}),x=Fc(c.tick)),c):L},c.start=function(){var ce,Ge=he.length,rr=we.length,or=A[0],ar=A[1],hr,dr;for(ce=0;ce=0;)L.push(V=G[N]),V.parent=E,V.depth=E.depth+1;x&&(E.value=0),E.children=G}else x&&(E.value=+x.call(A,E,E.depth)||0),delete E.children;return ci(k,function($){var ee,he;c&&(ee=$.children)&&ee.sort(c),x&&(he=$.parent)&&(he.value+=$.value)}),P}return A.sort=function(k){return arguments.length?(c=k,A):c},A.children=function(k){return arguments.length?(p=k,A):p},A.value=function(k){return arguments.length?(x=k,A):x},A.revalue=function(k){return x&&(Nu(k,function(L){L.children&&(L.value=0)}),ci(k,function(L){var P;L.children||(L.value=+x.call(A,L,L.depth)||0),(P=L.parent)&&(P.value+=L.value)})),k},A};function zu(c,p){return e.rebind(c,p,"sort","children","value"),c.nodes=c,c.links=eF,c}function Nu(c,p){for(var x=[c];(c=x.pop())!=null;)if(p(c),(k=c.children)&&(A=k.length))for(var A,k;--A>=0;)x.push(k[A])}function ci(c,p){for(var x=[c],A=[];(c=x.pop())!=null;)if(A.push(c),(P=c.children)&&(L=P.length))for(var k=-1,L,P;++kk&&(k=E),A.push(E)}for(P=0;PA&&(x=p,A=k);return x}function oF(c){return c.reduce(sF,0)}function sF(c,p){return c+p[1]}e.layout.histogram=function(){var c=!0,p=Number,x=fF,A=uF;function k(L,ee){for(var E=[],N=L.map(p,this),G=x.call(this,N,ee),V=A.call(this,G,N,ee),$,ee=-1,he=N.length,we=V.length-1,te=c?1:1/he,le;++ee0)for(ee=-1;++ee=G[0]&&le<=G[1]&&($=E[e.bisect(V,le,1,we)-1],$.y+=te,$.push(L[ee]));return E}return k.value=function(L){return arguments.length?(p=L,k):p},k.range=function(L){return arguments.length?(x=Rr(L),k):x},k.bins=function(L){return arguments.length?(A=typeof L=="number"?function(P){return y5(P,L)}:Rr(L),k):A},k.frequency=function(L){return arguments.length?(c=!!L,k):c},k};function uF(c,p){return y5(c,Math.ceil(Math.log(p.length)/Math.LN2+1))}function y5(c,p){for(var x=-1,A=+c[0],k=(c[1]-A)/p,L=[];++x<=p;)L[x]=k*x+A;return L}function fF(c){return[e.min(c),e.max(c)]}e.layout.pack=function(){var c=e.layout.hierarchy().sort(cF),p=0,x=[1,1],A;function k(L,P){var E=c.call(this,L,P),N=E[0],G=x[0],V=x[1],$=A==null?Math.sqrt:typeof A=="function"?A:function(){return A};if(N.x=N.y=0,ci(N,function(he){he.r=+$(he.value)}),ci(N,x5),p){var ee=p*(A?1:Math.max(2*N.r/G,2*N.r/V))/2;ci(N,function(he){he.r+=ee}),ci(N,x5),ci(N,function(he){he.r-=ee})}return _5(N,G/2,V/2,A?1:1/Math.max(2*N.r/G,2*N.r/V)),E}return k.size=function(L){return arguments.length?(x=L,k):x},k.radius=function(L){return arguments.length?(A=L==null||typeof L=="function"?L:+L,k):A},k.padding=function(L){return arguments.length?(p=+L,k):p},zu(k,c)};function cF(c,p){return c.value-p.value}function T1(c,p){var x=c._pack_next;c._pack_next=p,p._pack_prev=c,p._pack_next=x,x._pack_prev=p}function g5(c,p){c._pack_next=p,p._pack_prev=c}function b5(c,p){var x=p.x-c.x,A=p.y-c.y,k=c.r+p.r;return .999*k*k>x*x+A*A}function x5(c){if(!(p=c.children)||!(ee=p.length))return;var p,x=1/0,A=-1/0,k=1/0,L=-1/0,P,E,N,G,V,$,ee;function he(ce){x=Math.min(ce.x-ce.r,x),A=Math.max(ce.x+ce.r,A),k=Math.min(ce.y-ce.r,k),L=Math.max(ce.y+ce.r,L)}if(p.forEach(vF),P=p[0],P.x=-P.r,P.y=0,he(P),ee>1&&(E=p[1],E.x=E.r,E.y=0,he(E),ee>2))for(N=p[2],w5(P,E,N),he(N),T1(P,N),P._pack_prev=N,T1(N,E),E=P._pack_next,G=3;Gle.x&&(le=Ge),Ge.depth>ue.depth&&(ue=Ge)});var xe=p(te,le)/2-te.x,Te=x[0]/(le.x+p(le,te)/2+xe),ce=x[1]/(ue.depth||1);Nu(he,function(Ge){Ge.x=(Ge.x+xe)*Te,Ge.y=Ge.depth*ce})}return ee}function L(V){for(var $={A:null,children:[V]},ee=[$],he;(he=ee.pop())!=null;)for(var we=he.children,te,le=0,ue=we.length;le0&&(dF(mF(te,V,ee),V,Ge),ue+=Ge,xe+=Ge),Te+=te.m,ue+=he.m,ce+=le.m,xe+=we.m;te&&!A1(we)&&(we.t=te,we.m+=Te-xe),he&&!M1(le)&&(le.t=he,le.m+=ue-ce,ee=V)}return ee}function G(V){V.x*=x[0],V.y=V.depth*x[1]}return k.separation=function(V){return arguments.length?(p=V,k):p},k.size=function(V){return arguments.length?(A=(x=V)==null?G:null,k):A?null:x},k.nodeSize=function(V){return arguments.length?(A=(x=V)==null?null:G,k):A?x:null},zu(k,c)};function T5(c,p){return c.parent==p.parent?1:2}function M1(c){var p=c.children;return p.length?p[0]:c.t}function A1(c){var p=c.children,x;return(x=p.length)?p[x-1]:c.t}function dF(c,p,x){var A=x/(p.i-c.i);p.c-=A,p.s+=x,c.c+=A,p.z+=x,p.m+=x}function pF(c){for(var p=0,x=0,A=c.children,k=A.length,L;--k>=0;)L=A[k],L.z+=p,L.m+=p,p+=L.s+(x+=L.c)}function mF(c,p,x){return c.a.parent===p.parent?c.a:x}e.layout.cluster=function(){var c=e.layout.hierarchy().sort(null).value(null),p=T5,x=[1,1],A=!1;function k(L,P){var E=c.call(this,L,P),N=E[0],G,V=0;ci(N,function(te){var le=te.children;le&&le.length?(te.x=gF(le),te.y=yF(le)):(te.x=G?V+=p(te,G):0,te.y=0,G=te)});var $=M5(N),ee=A5(N),he=$.x-p($,ee)/2,we=ee.x+p(ee,$)/2;return ci(N,A?function(te){te.x=(te.x-N.x)*x[0],te.y=(N.y-te.y)*x[1]}:function(te){te.x=(te.x-he)/(we-he)*x[0],te.y=(1-(N.y?te.y/N.y:1))*x[1]}),E}return k.separation=function(L){return arguments.length?(p=L,k):p},k.size=function(L){return arguments.length?(A=(x=L)==null,k):A?null:x},k.nodeSize=function(L){return arguments.length?(A=(x=L)!=null,k):A?x:null},zu(k,c)};function yF(c){return 1+e.max(c,function(p){return p.y})}function gF(c){return c.reduce(function(p,x){return p+x.x},0)/c.length}function M5(c){var p=c.children;return p&&p.length?M5(p[0]):c}function A5(c){var p=c.children,x;return p&&(x=p.length)?A5(p[x-1]):c}e.layout.treemap=function(){var c=e.layout.hierarchy(),p=Math.round,x=[1,1],A=null,k=k1,L=!1,P,E="squarify",N=.5*(1+Math.sqrt(5));function G(te,le){for(var ue=-1,xe=te.length,Te,ce;++ue0;)xe.push(ce=Te[ar-1]),xe.area+=ce.area,E!=="squarify"||(rr=ee(xe,or))<=Ge?(Te.pop(),Ge=rr):(xe.area-=xe.pop().area,he(xe,or,ue,!1),or=Math.min(ue.dx,ue.dy),xe.length=xe.area=0,Ge=1/0);xe.length&&(he(xe,or,ue,!0),xe.length=xe.area=0),le.forEach(V)}}function $(te){var le=te.children;if(le&&le.length){var ue=k(te),xe=le.slice(),Te,ce=[];for(G(xe,ue.dx*ue.dy/te.value),ce.area=0;Te=xe.pop();)ce.push(Te),ce.area+=Te.area,Te.z!=null&&(he(ce,Te.z?ue.dx:ue.dy,ue,!xe.length),ce.length=ce.area=0);le.forEach($)}}function ee(te,le){for(var ue=te.area,xe,Te=0,ce=1/0,Ge=-1,rr=te.length;++GeTe&&(Te=xe));return ue*=ue,le*=le,ue?Math.max(le*Te*N/ue,ue/(le*ce*N)):1/0}function he(te,le,ue,xe){var Te=-1,ce=te.length,Ge=ue.x,rr=ue.y,or=le?p(te.area/le):0,ar;if(le==ue.dx){for((xe||or>ue.dy)&&(or=ue.dy);++Teue.dx)&&(or=ue.dx);++Te1);return c+p*A*Math.sqrt(-2*Math.log(L)/L)}},logNormal:function(){var c=e.random.normal.apply(e,arguments);return function(){return Math.exp(c())}},bates:function(c){var p=e.random.irwinHall(c);return function(){return p()/c}},irwinHall:function(c){return function(){for(var p=0,x=0;x2?_F:bF,G=A?BN:ON;return k=N(c,p,G,x),L=N(p,c,G,Zl),E}function E(N){return k(N)}return E.invert=function(N){return L(N)},E.domain=function(N){return arguments.length?(c=N.map(Number),P()):c},E.range=function(N){return arguments.length?(p=N,P()):p},E.rangeRound=function(N){return E.range(N).interpolate(u5)},E.clamp=function(N){return arguments.length?(A=N,P()):A},E.interpolate=function(N){return arguments.length?(x=N,P()):x},E.ticks=function(N){return L1(c,N)},E.tickFormat=function(N,G){return d3_scale_linearTickFormat(c,N,G)},E.nice=function(N){return q5(c,N),P()},E.copy=function(){return S5(c,p,x,A)},P()}function L5(c,p){return e.rebind(c,p,"range","rangeRound","interpolate","clamp")}function q5(c,p){return C1(c,C5(S1(c,p)[2])),C1(c,C5(S1(c,p)[2])),c}function S1(c,p){p==null&&(p=10);var x=Gc(c),A=x[1]-x[0],k=Math.pow(10,Math.floor(Math.log(A/p)/Math.LN10)),L=p/A*k;return L<=.15?k*=10:L<=.35?k*=5:L<=.75&&(k*=2),x[0]=Math.ceil(x[0]/k)*k,x[1]=Math.floor(x[1]/k)*k+k*.5,x[2]=k,x}function L1(c,p){return e.range.apply(e,S1(c,p))}var wF={s:1,g:1,p:1,r:1,e:1};function D5(c){return-Math.floor(Math.log(c)/Math.LN10+.01)}function nie(c,p){var x=D5(p[2]);return c in wF?Math.abs(x-D5(Math.max(w(p[0]),w(p[1]))))+ +(c!=="e"):x-(c==="%")*2}e.scale.log=function(){return E5(e.scale.linear().domain([0,1]),10,!0,[1,10])};function E5(c,p,x,A){function k(E){return(x?Math.log(E<0?0:E):-Math.log(E>0?0:-E))/Math.log(p)}function L(E){return x?Math.pow(p,E):-Math.pow(p,-E)}function P(E){return c(k(E))}return P.invert=function(E){return L(c.invert(E))},P.domain=function(E){return arguments.length?(x=E[0]>=0,c.domain((A=E.map(Number)).map(k)),P):A},P.base=function(E){return arguments.length?(p=+E,c.domain(A.map(k)),P):p},P.nice=function(){var E=C1(A.map(k),x?Math:TF);return c.domain(E),A=E.map(L),P},P.ticks=function(){var E=Gc(A),N=[],G=E[0],V=E[1],$=Math.floor(k(G)),ee=Math.ceil(k(V)),he=p%1?2:p;if(isFinite(ee-$)){if(x){for(;$0;we--)N.push(L($)*we);for($=0;N[$]V;ee--);N=N.slice($,ee)}return N},P.copy=function(){return E5(c.copy(),p,x,A)},L5(P,c)}var TF={floor:function(c){return-Math.ceil(-c)},ceil:function(c){return-Math.floor(-c)}};e.scale.pow=function(){return P5(e.scale.linear(),1,[0,1])};function P5(c,p,x){var A=Wc(p),k=Wc(1/p);function L(P){return c(A(P))}return L.invert=function(P){return k(c.invert(P))},L.domain=function(P){return arguments.length?(c.domain((x=P.map(Number)).map(A)),L):x},L.ticks=function(P){return L1(x,P)},L.tickFormat=function(P,E){return d3_scale_linearTickFormat(x,P,E)},L.nice=function(P){return L.domain(q5(x,P))},L.exponent=function(P){return arguments.length?(A=Wc(p=P),k=Wc(1/p),c.domain(x.map(A)),L):p},L.copy=function(){return P5(c.copy(),p,x)},L5(L,c)}function Wc(c){return function(p){return p<0?-Math.pow(-p,c):Math.pow(p,c)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return R5([],{t:"range",a:[[]]})};function R5(c,p){var x,A,k;function L(E){return A[((x.get(E)||(p.t==="range"?x.set(E,c.push(E)):NaN))-1)%A.length]}function P(E,N){return e.range(c.length).map(function(G){return E+N*G})}return L.domain=function(E){if(!arguments.length)return c;c=[],x=new b;for(var N=-1,G=E.length,V;++N0?x[L-1]:c[0],Lee?0:1;if(V=vr)return N(V,we)+(G?N(G,1-we):"")+"Z";var te,le,ue,xe,Te=0,ce=0,Ge,rr,or,ar,hr,dr,Sr,pr,Tr=[];if((xe=(+P.apply(this,arguments)||0)/2)&&(ue=A===Zc?Math.sqrt(G*G+V*V):+A.apply(this,arguments),we||(ce*=-1),V&&(ce=ea(ue/V*Math.sin(xe))),G&&(Te=ea(ue/G*Math.sin(xe)))),V){Ge=V*Math.cos($+ce),rr=V*Math.sin($+ce),or=V*Math.cos(ee-ce),ar=V*Math.sin(ee-ce);var Jr=Math.abs(ee-$-2*ce)<=ke?0:1;if(ce&&Xc(Ge,rr,or,ar)===we^Jr){var Lt=($+ee)/2;Ge=V*Math.cos(Lt),rr=V*Math.sin(Lt),or=ar=null}}else Ge=rr=0;if(G){hr=G*Math.cos(ee-Te),dr=G*Math.sin(ee-Te),Sr=G*Math.cos($+Te),pr=G*Math.sin($+Te);var rt=Math.abs($-ee+2*Te)<=ke?0:1;if(Te&&Xc(hr,dr,Sr,pr)===1-we^rt){var er=($+ee)/2;hr=G*Math.cos(er),dr=G*Math.sin(er),Sr=pr=null}}else hr=dr=0;if(he>oe&&(te=Math.min(Math.abs(V-G)/2,+x.apply(this,arguments)))>.001){le=G0?0:1}function Jc(c,p,x,A,k){var L=c[0]-p[0],P=c[1]-p[1],E=(k?A:-A)/Math.sqrt(L*L+P*P),N=E*P,G=-E*L,V=c[0]+N,$=c[1]+G,ee=p[0]+N,he=p[1]+G,we=(V+ee)/2,te=($+he)/2,le=ee-V,ue=he-$,xe=le*le+ue*ue,Te=x-A,ce=V*he-ee*$,Ge=(ue<0?-1:1)*Math.sqrt(Math.max(0,Te*Te*xe-ce*ce)),rr=(ce*ue-le*Ge)/xe,or=(-ce*le-ue*Ge)/xe,ar=(ce*ue+le*Ge)/xe,hr=(-ce*le+ue*Ge)/xe,dr=rr-we,Sr=or-te,pr=ar-we,Tr=hr-te;return dr*dr+Sr*Sr>pr*pr+Tr*Tr&&(rr=ar,or=hr),[[rr-N,or-G],[rr*x/Te,or*x/Te]]}function B5(){return!0}function Y5(c){var p=es,x=Lu,A=B5,k=Bn,L=k.key,P=.7;function E(N){var G=[],V=[],$=-1,ee=N.length,he,we=Rr(p),te=Rr(x);function le(){G.push("M",k(c(V),P))}for(;++$1?c.join("L"):c+"Z"}function U5(c){return c.join("L")+"Z"}function EF(c){for(var p=0,x=c.length,A=c[0],k=[A[0],",",A[1]];++p1&&k.push("H",A[0]),k.join("")}function D1(c){for(var p=0,x=c.length,A=c[0],k=[A[0],",",A[1]];++p1){E=p[1],L=c[N],N++,A+="C"+(k[0]+P[0])+","+(k[1]+P[1])+","+(L[0]-E[0])+","+(L[1]-E[1])+","+L[0]+","+L[1];for(var G=2;G9&&(L=x*3/Math.sqrt(L),P[E]=L*A,P[E+1]=L*k));for(E=-1;++E<=N;)L=(c[Math.min(N,E+1)][0]-c[Math.max(0,E-1)][0])/(6*(1+P[E]*P[E])),p.push([L||0,P[E]*L||0]);return p}function BF(c){return c.length<3?Bn(c):c[0]+Kc(c,OF(c))}e.svg.line.radial=function(){var c=Y5(Z5);return c.radius=c.x,delete c.x,c.angle=c.y,delete c.y,c};function Z5(c){for(var p,x=-1,A=c.length,k,L;++xke)+",1 "+$}function G(V,$,ee,he){return"Q 0,0 "+he}return L.radius=function(V){return arguments.length?(x=Rr(V),L):x},L.source=function(V){return arguments.length?(c=Rr(V),L):c},L.target=function(V){return arguments.length?(p=Rr(V),L):p},L.startAngle=function(V){return arguments.length?(A=Rr(V),L):A},L.endAngle=function(V){return arguments.length?(k=Rr(V),L):k},L};function YF(c){return c.radius}e.svg.diagonal=function(){var c=J5,p=K5,x=Q5;function A(k,L){var P=c.call(this,k,L),E=p.call(this,k,L),N=(P.y+E.y)/2,G=[P,{x:P.x,y:N},{x:E.x,y:N},E];return G=G.map(x),"M"+G[0]+"C"+G[1]+" "+G[2]+" "+G[3]}return A.source=function(k){return arguments.length?(c=Rr(k),A):c},A.target=function(k){return arguments.length?(p=Rr(k),A):p},A.projection=function(k){return arguments.length?(x=k,A):x},A};function Q5(c){return[c.x,c.y]}e.svg.diagonal.radial=function(){var c=e.svg.diagonal(),p=Q5,x=c.projection;return c.projection=function(A){return arguments.length?x(UF(p=A)):p},c};function UF(c){return function(){var p=c.apply(this,arguments),x=p[0],A=p[1]-sr;return[x*Math.cos(A),x*Math.sin(A)]}}e.svg.symbol=function(){var c=VF,p=GF;function x(A,k){return(j5.get(c.call(this,A,k))||$5)(p.call(this,A,k))}return x.type=function(A){return arguments.length?(c=Rr(A),x):c},x.size=function(A){return arguments.length?(p=Rr(A),x):p},x};function GF(){return 64}function VF(){return"circle"}function $5(c){var p=Math.sqrt(c/ke);return"M0,"+p+"A"+p+","+p+" 0 1,1 0,"+-p+"A"+p+","+p+" 0 1,1 0,"+p+"Z"}var j5=e.map({circle:$5,cross:function(c){var p=Math.sqrt(c/5)/2;return"M"+-3*p+","+-p+"H"+-p+"V"+-3*p+"H"+p+"V"+-p+"H"+3*p+"V"+p+"H"+p+"V"+3*p+"H"+-p+"V"+p+"H"+-3*p+"Z"},diamond:function(c){var p=Math.sqrt(c/(2*eb)),x=p*eb;return"M0,"+-p+"L"+x+",0 0,"+p+" "+-x+",0Z"},square:function(c){var p=Math.sqrt(c)/2;return"M"+-p+","+-p+"L"+p+","+-p+" "+p+","+p+" "+-p+","+p+"Z"},"triangle-down":function(c){var p=Math.sqrt(c/Qc),x=p*Qc/2;return"M0,"+x+"L"+p+","+-x+" "+-p+","+-x+"Z"},"triangle-up":function(c){var p=Math.sqrt(c/Qc),x=p*Qc/2;return"M0,"+-x+"L"+p+","+x+" "+-p+","+x+"Z"}});e.svg.symbolTypes=j5.keys();var Qc=Math.sqrt(3),eb=Math.tan(30*Mr);Ae.transition=function(c){for(var p=Xl||++tb,x=F1(c),A=[],k,L,P=jc||{time:Date.now(),ease:TN,delay:0,duration:250},E=-1,N=this.length;++E0;)$[--xe].call(c,ue);if(le>=1)return P.event&&P.event.end.call(c,c.__data__,p),--L.count?delete L[A]:delete c[x],1}P||(E=k.time,N=Fc(ee,0,E),P=L[A]={tween:new b,time:E,timer:N,delay:k.delay,duration:k.duration,ease:k.ease,index:p},k=null,++L.count)}e.svg.axis=function(){var c=e.scale.linear(),p=ab,x=6,A=6,k=3,L=[10],P=null,E;function N(G){G.each(function(){var V=e.select(this),$=this.__chart__||c,ee=this.__chart__=c.copy(),he=P==null?ee.ticks?ee.ticks.apply(ee,L):ee.domain():P,we=E==null?ee.tickFormat?ee.tickFormat.apply(ee,L):X:E,te=V.selectAll(".tick").data(he,ee),le=te.enter().insert("g",".domain").attr("class","tick").style("opacity",oe),ue=e.transition(te.exit()).style("opacity",oe).remove(),xe=e.transition(te.order()).style("opacity",1),Te=Math.max(x,0)+k,ce,Ge=Vc(ee),rr=V.selectAll(".domain").data([0]),or=(rr.enter().append("path").attr("class","domain"),e.transition(rr));le.append("line"),le.append("text");var ar=le.select("line"),hr=xe.select("line"),dr=te.select("text").text(we),Sr=le.select("text"),pr=xe.select("text"),Tr=p==="top"||p==="left"?-1:1,Jr,Lt,rt,er;if(p==="bottom"||p==="top"?(ce=XF,Jr="x",rt="y",Lt="x2",er="y2",dr.attr("dy",Tr<0?"0em":".71em").style("text-anchor","middle"),or.attr("d","M"+Ge[0]+","+Tr*A+"V0H"+Ge[1]+"V"+Tr*A)):(ce=JF,Jr="y",rt="x",Lt="y2",er="x2",dr.attr("dy",".32em").style("text-anchor",Tr<0?"end":"start"),or.attr("d","M"+Tr*A+","+Ge[0]+"H0V"+Ge[1]+"H"+Tr*A)),ar.attr(er,Tr*x),Sr.attr(rt,Tr*Te),hr.attr(Lt,0).attr(er,Tr*x),pr.attr(Jr,0).attr(rt,Tr*Te),ee.rangeBand){var Lr=ee,qr=Lr.rangeBand()/2;$=ee=function(Kr){return Lr(Kr)+qr}}else $.rangeBand?$=ee:ue.call(ce,ee,$);le.call(ce,$,ee),xe.call(ce,ee,ee)})}return N.scale=function(G){return arguments.length?(c=G,N):c},N.orient=function(G){return arguments.length?(p=G in ZF?G+"":ab,N):p},N.ticks=function(){return arguments.length?(L=t(arguments),N):L},N.tickValues=function(G){return arguments.length?(P=G,N):P},N.tickFormat=function(G){return arguments.length?(E=G,N):E},N.tickSize=function(G){var V=arguments.length;return V?(x=+G,A=+arguments[V-1],N):x},N.innerTickSize=function(G){return arguments.length?(x=+G,N):x},N.outerTickSize=function(G){return arguments.length?(A=+G,N):A},N.tickPadding=function(G){return arguments.length?(k=+G,N):k},N.tickSubdivide=function(){return arguments.length&&N},N};var ab="bottom",ZF={top:1,right:1,bottom:1,left:1};function XF(c,p,x){c.attr("transform",function(A){var k=p(A);return"translate("+(isFinite(k)?k:x(A))+",0)"})}function JF(c,p,x){c.attr("transform",function(A){var k=p(A);return"translate(0,"+(isFinite(k)?k:x(A))+")"})}e.svg.brush=function(){var c=pe(V,"brushstart","brush","brushend"),p=null,x=null,A=[0,0],k=[0,0],L,P,E=!0,N=!0,G=I1[0];function V(te){te.each(function(){var le=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",we).on("touchstart.brush",we),ue=le.selectAll(".background").data([0]);ue.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),le.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var xe=le.selectAll(".resize").data(G,X);xe.exit().remove(),xe.enter().append("g").attr("class",function(rr){return"resize "+rr}).style("cursor",function(rr){return KF[rr]}).append("rect").attr("x",function(rr){return/[ew]$/.test(rr)?-3:null}).attr("y",function(rr){return/^[ns]/.test(rr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),xe.style("display",V.empty()?"none":null);var Te=e.transition(le),ce=e.transition(ue),Ge;p&&(Ge=Vc(p),ce.attr("x",Ge[0]).attr("width",Ge[1]-Ge[0]),ee(Te)),x&&(Ge=Vc(x),ce.attr("y",Ge[0]).attr("height",Ge[1]-Ge[0]),he(Te)),$(Te)})}V.event=function(te){te.each(function(){var le=c.of(this,arguments),ue={x:A,y:k,i:L,j:P},xe=this.__chart__||ue;this.__chart__=ue,Xl?e.select(this).transition().each("start.brush",function(){L=xe.i,P=xe.j,A=xe.x,k=xe.y,le({type:"brushstart"})}).tween("brush:brush",function(){var Te=Uc(A,ue.x),ce=Uc(k,ue.y);return L=P=null,function(Ge){A=ue.x=Te(Ge),k=ue.y=ce(Ge),le({type:"brush",mode:"resize"})}}).each("end.brush",function(){L=ue.i,P=ue.j,le({type:"brush",mode:"resize"}),le({type:"brushend"})}):(le({type:"brushstart"}),le({type:"brush",mode:"resize"}),le({type:"brushend"}))})};function $(te){te.selectAll(".resize").attr("transform",function(le){return"translate("+A[+/e$/.test(le)]+","+k[+/^s/.test(le)]+")"})}function ee(te){te.select(".extent").attr("x",A[0]),te.selectAll(".extent,.n>rect,.s>rect").attr("width",A[1]-A[0])}function he(te){te.select(".extent").attr("y",k[0]),te.selectAll(".extent,.e>rect,.w>rect").attr("height",k[1]-k[0])}function we(){var te=this,le=e.select(e.event.target),ue=c.of(te,arguments),xe=e.select(te),Te=le.datum(),ce=!/^(n|s)$/.test(Te)&&p,Ge=!/^(e|w)$/.test(Te)&&x,rr=le.classed("extent"),or=fr(te),ar,hr=e.mouse(te),dr,Sr=e.select(i(te)).on("keydown.brush",Jr).on("keyup.brush",Lt);if(e.event.changedTouches?Sr.on("touchmove.brush",rt).on("touchend.brush",Lr):Sr.on("mousemove.brush",rt).on("mouseup.brush",Lr),xe.interrupt().selectAll("*").interrupt(),rr)hr[0]=A[0]-hr[0],hr[1]=k[0]-hr[1];else if(Te){var pr=+/w$/.test(Te),Tr=+/^n/.test(Te);dr=[A[1-pr]-hr[0],k[1-Tr]-hr[1]],hr[0]=A[pr],hr[1]=k[Tr]}else e.event.altKey&&(ar=hr.slice());xe.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",le.style("cursor")),ue({type:"brushstart"}),rt();function Jr(){e.event.keyCode==32&&(rr||(ar=null,hr[0]-=A[1],hr[1]-=k[1],rr=2),ie())}function Lt(){e.event.keyCode==32&&rr==2&&(hr[0]+=A[1],hr[1]+=k[1],rr=0,ie())}function rt(){var qr=e.mouse(te),Kr=!1;dr&&(qr[0]+=dr[0],qr[1]+=dr[1]),rr||(e.event.altKey?(ar||(ar=[(A[0]+A[1])/2,(k[0]+k[1])/2]),hr[0]=A[+(qr[0]{(function(e,r){typeof iv=="object"&&typeof fb!="undefined"?r(iv):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(iv,function(e){"use strict";var r=new Date,t=new Date;function a(ne,Me,Ce,cr){function tr(De){return ne(De=arguments.length===0?new Date:new Date(+De)),De}return tr.floor=function(De){return ne(De=new Date(+De)),De},tr.ceil=function(De){return ne(De=new Date(De-1)),Me(De,1),ne(De),De},tr.round=function(De){var Le=tr(De),Ye=tr.ceil(De);return De-Le0))return Ze;do Ze.push(Ue=new Date(+De)),Me(De,Ye),ne(De);while(Ue=Le)for(;ne(Le),!De(Le);)Le.setTime(Le-1)},function(Le,Ye){if(Le>=Le)if(Ye<0)for(;++Ye<=0;)for(;Me(Le,-1),!De(Le););else for(;--Ye>=0;)for(;Me(Le,1),!De(Le););})},Ce&&(tr.count=function(De,Le){return r.setTime(+De),t.setTime(+Le),ne(r),ne(t),Math.floor(Ce(r,t))},tr.every=function(De){return De=Math.floor(De),!isFinite(De)||!(De>0)?null:De>1?tr.filter(cr?function(Le){return cr(Le)%De===0}:function(Le){return tr.count(0,Le)%De===0}):tr}),tr}var n=a(function(){},function(ne,Me){ne.setTime(+ne+Me)},function(ne,Me){return Me-ne});n.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?a(function(Me){Me.setTime(Math.floor(Me/ne)*ne)},function(Me,Ce){Me.setTime(+Me+Ce*ne)},function(Me,Ce){return(Ce-Me)/ne}):n};var i=n.range,l=1e3,o=6e4,s=36e5,u=864e5,f=6048e5,v=a(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,Me){ne.setTime(+ne+Me*l)},function(ne,Me){return(Me-ne)/l},function(ne){return ne.getUTCSeconds()}),h=v.range,d=a(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*l)},function(ne,Me){ne.setTime(+ne+Me*o)},function(ne,Me){return(Me-ne)/o},function(ne){return ne.getMinutes()}),m=d.range,g=a(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*l-ne.getMinutes()*o)},function(ne,Me){ne.setTime(+ne+Me*s)},function(ne,Me){return(Me-ne)/s},function(ne){return ne.getHours()}),y=g.range,w=a(function(ne){ne.setHours(0,0,0,0)},function(ne,Me){ne.setDate(ne.getDate()+Me)},function(ne,Me){return(Me-ne-(Me.getTimezoneOffset()-ne.getTimezoneOffset())*o)/u},function(ne){return ne.getDate()-1}),_=w.range;function T(ne){return a(function(Me){Me.setDate(Me.getDate()-(Me.getDay()+7-ne)%7),Me.setHours(0,0,0,0)},function(Me,Ce){Me.setDate(Me.getDate()+Ce*7)},function(Me,Ce){return(Ce-Me-(Ce.getTimezoneOffset()-Me.getTimezoneOffset())*o)/f})}var b=T(0),M=T(1),S=T(2),C=T(3),q=T(4),D=T(5),R=T(6),z=b.range,F=M.range,H=S.range,O=C.range,X=q.range,J=D.range,B=R.range,I=a(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,Me){ne.setMonth(ne.getMonth()+Me)},function(ne,Me){return Me.getMonth()-ne.getMonth()+(Me.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),W=I.range,K=a(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,Me){ne.setFullYear(ne.getFullYear()+Me)},function(ne,Me){return Me.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});K.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:a(function(Me){Me.setFullYear(Math.floor(Me.getFullYear()/ne)*ne),Me.setMonth(0,1),Me.setHours(0,0,0,0)},function(Me,Ce){Me.setFullYear(Me.getFullYear()+Ce*ne)})};var Q=K.range,ie=a(function(ne){ne.setUTCSeconds(0,0)},function(ne,Me){ne.setTime(+ne+Me*o)},function(ne,Me){return(Me-ne)/o},function(ne){return ne.getUTCMinutes()}),me=ie.range,pe=a(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,Me){ne.setTime(+ne+Me*s)},function(ne,Me){return(Me-ne)/s},function(ne){return ne.getUTCHours()}),ge=pe.range,j=a(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Me){ne.setUTCDate(ne.getUTCDate()+Me)},function(ne,Me){return(Me-ne)/u},function(ne){return ne.getUTCDate()-1}),_e=j.range;function se(ne){return a(function(Me){Me.setUTCDate(Me.getUTCDate()-(Me.getUTCDay()+7-ne)%7),Me.setUTCHours(0,0,0,0)},function(Me,Ce){Me.setUTCDate(Me.getUTCDate()+Ce*7)},function(Me,Ce){return(Ce-Me)/f})}var Se=se(0),ve=se(1),Ae=se(2),Y=se(3),re=se(4),U=se(5),de=se(6),be=Se.range,ye=ve.range,Fe=Ae.range,Re=Y.range,Pe=re.range,Ie=U.range,Be=de.range,Ne=a(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,Me){ne.setUTCMonth(ne.getUTCMonth()+Me)},function(ne,Me){return Me.getUTCMonth()-ne.getUTCMonth()+(Me.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),Ee=Ne.range,Je=a(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,Me){ne.setUTCFullYear(ne.getUTCFullYear()+Me)},function(ne,Me){return Me.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});Je.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:a(function(Me){Me.setUTCFullYear(Math.floor(Me.getUTCFullYear()/ne)*ne),Me.setUTCMonth(0,1),Me.setUTCHours(0,0,0,0)},function(Me,Ce){Me.setUTCFullYear(Me.getUTCFullYear()+Ce*ne)})};var We=Je.range;e.timeDay=w,e.timeDays=_,e.timeFriday=D,e.timeFridays=J,e.timeHour=g,e.timeHours=y,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=m,e.timeMonday=M,e.timeMondays=F,e.timeMonth=I,e.timeMonths=W,e.timeSaturday=R,e.timeSaturdays=B,e.timeSecond=v,e.timeSeconds=h,e.timeSunday=b,e.timeSundays=z,e.timeThursday=q,e.timeThursdays=X,e.timeTuesday=S,e.timeTuesdays=H,e.timeWednesday=C,e.timeWednesdays=O,e.timeWeek=b,e.timeWeeks=z,e.timeYear=K,e.timeYears=Q,e.utcDay=j,e.utcDays=_e,e.utcFriday=U,e.utcFridays=Ie,e.utcHour=pe,e.utcHours=ge,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=ie,e.utcMinutes=me,e.utcMonday=ve,e.utcMondays=ye,e.utcMonth=Ne,e.utcMonths=Ee,e.utcSaturday=de,e.utcSaturdays=Be,e.utcSecond=v,e.utcSeconds=h,e.utcSunday=Se,e.utcSundays=be,e.utcThursday=re,e.utcThursdays=Pe,e.utcTuesday=Ae,e.utcTuesdays=Fe,e.utcWednesday=Y,e.utcWednesdays=Re,e.utcWeek=Se,e.utcWeeks=be,e.utcYear=Je,e.utcYears=We,Object.defineProperty(e,"__esModule",{value:!0})})});var os=Z((lv,cb)=>{(function(e,r){typeof lv=="object"&&typeof cb!="undefined"?r(lv,H1()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(lv,function(e,r){"use strict";function t(ae){if(0<=ae.y&&ae.y<100){var oe=new Date(-1,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L);return oe.setFullYear(ae.y),oe}return new Date(ae.y,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L)}function a(ae){if(0<=ae.y&&ae.y<100){var oe=new Date(Date.UTC(-1,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L));return oe.setUTCFullYear(ae.y),oe}return new Date(Date.UTC(ae.y,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L))}function n(ae,oe,qe){return{y:ae,m:oe,d:qe,H:0,M:0,S:0,L:0}}function i(ae){var oe=ae.dateTime,qe=ae.date,ke=ae.time,ir=ae.periods,vr=ae.days,sr=ae.shortDays,Mr=ae.months,Ur=ae.shortMonths,$r=h(ir),Vr=d(ir),St=h(vr),ea=d(vr),ka=h(sr),ra=d(sr),pn=h(Mr),Ia=d(Mr),ta=h(Ur),Ha=d(Ur),yr={a:Ul,A:Gl,b:rl,B:qc,c:null,d:I,e:I,f:me,H:W,I:K,j:Q,L:ie,m:pe,M:ge,p:Dc,q:ku,Q:Le,s:Ye,S:j,u:_e,U:se,V:Se,w:ve,W:Ae,x:null,X:null,y:Y,Y:re,Z:U,"%":De},ot={a:Cu,A:Su,b:Sa,B:Ec,c:null,d:de,e:de,f:Pe,H:be,I:ye,j:Fe,L:Re,m:Ie,M:Be,p:$o,q:jo,Q:Le,s:Ye,S:Ne,u:Ee,U:Je,V:We,w:ne,W:Me,x:null,X:null,y:Ce,Y:cr,Z:tr,"%":De},Wr={a:Ca,A:aa,b:In,B:Hn,c:Wt,d:q,e:q,f:O,H:R,I:R,j:D,L:H,m:C,M:z,p:yt,q:S,Q:J,s:B,S:F,u:g,U:y,V:w,w:m,W:_,x:at,X:sa,y:b,Y:T,Z:M,"%":X};yr.x=mt(qe,yr),yr.X=mt(ke,yr),yr.c=mt(oe,yr),ot.x=mt(qe,ot),ot.X=mt(ke,ot),ot.c=mt(oe,ot);function mt(mr,Zr){return function(jr){var nr=[],ua=-1,ut=0,fa=mr.length,Rr,On,Vl;for(jr instanceof Date||(jr=new Date(+jr));++ua53)return null;"w"in nr||(nr.w=1),"Z"in nr?(ut=a(n(nr.y,0,1)),fa=ut.getUTCDay(),ut=fa>4||fa===0?r.utcMonday.ceil(ut):r.utcMonday(ut),ut=r.utcDay.offset(ut,(nr.V-1)*7),nr.y=ut.getUTCFullYear(),nr.m=ut.getUTCMonth(),nr.d=ut.getUTCDate()+(nr.w+6)%7):(ut=t(n(nr.y,0,1)),fa=ut.getDay(),ut=fa>4||fa===0?r.timeMonday.ceil(ut):r.timeMonday(ut),ut=r.timeDay.offset(ut,(nr.V-1)*7),nr.y=ut.getFullYear(),nr.m=ut.getMonth(),nr.d=ut.getDate()+(nr.w+6)%7)}else("W"in nr||"U"in nr)&&("w"in nr||(nr.w="u"in nr?nr.u%7:"W"in nr?1:0),fa="Z"in nr?a(n(nr.y,0,1)).getUTCDay():t(n(nr.y,0,1)).getDay(),nr.m=0,nr.d="W"in nr?(nr.w+6)%7+nr.W*7-(fa+5)%7:nr.w+nr.U*7-(fa+6)%7);return"Z"in nr?(nr.H+=nr.Z/100|0,nr.M+=nr.Z%100,a(nr)):t(nr)}}function st(mr,Zr,jr,nr){for(var ua=0,ut=Zr.length,fa=jr.length,Rr,On;ua=fa)return-1;if(Rr=Zr.charCodeAt(ua++),Rr===37){if(Rr=Zr.charAt(ua++),On=Wr[Rr in l?Zr.charAt(ua++):Rr],!On||(nr=On(mr,jr,nr))<0)return-1}else if(Rr!=jr.charCodeAt(nr++))return-1}return nr}function yt(mr,Zr,jr){var nr=$r.exec(Zr.slice(jr));return nr?(mr.p=Vr[nr[0].toLowerCase()],jr+nr[0].length):-1}function Ca(mr,Zr,jr){var nr=ka.exec(Zr.slice(jr));return nr?(mr.w=ra[nr[0].toLowerCase()],jr+nr[0].length):-1}function aa(mr,Zr,jr){var nr=St.exec(Zr.slice(jr));return nr?(mr.w=ea[nr[0].toLowerCase()],jr+nr[0].length):-1}function In(mr,Zr,jr){var nr=ta.exec(Zr.slice(jr));return nr?(mr.m=Ha[nr[0].toLowerCase()],jr+nr[0].length):-1}function Hn(mr,Zr,jr){var nr=pn.exec(Zr.slice(jr));return nr?(mr.m=Ia[nr[0].toLowerCase()],jr+nr[0].length):-1}function Wt(mr,Zr,jr){return st(mr,oe,Zr,jr)}function at(mr,Zr,jr){return st(mr,qe,Zr,jr)}function sa(mr,Zr,jr){return st(mr,ke,Zr,jr)}function Ul(mr){return sr[mr.getDay()]}function Gl(mr){return vr[mr.getDay()]}function rl(mr){return Ur[mr.getMonth()]}function qc(mr){return Mr[mr.getMonth()]}function Dc(mr){return ir[+(mr.getHours()>=12)]}function ku(mr){return 1+~~(mr.getMonth()/3)}function Cu(mr){return sr[mr.getUTCDay()]}function Su(mr){return vr[mr.getUTCDay()]}function Sa(mr){return Ur[mr.getUTCMonth()]}function Ec(mr){return Mr[mr.getUTCMonth()]}function $o(mr){return ir[+(mr.getUTCHours()>=12)]}function jo(mr){return 1+~~(mr.getUTCMonth()/3)}return{format:function(mr){var Zr=mt(mr+="",yr);return Zr.toString=function(){return mr},Zr},parse:function(mr){var Zr=Tt(mr+="",!1);return Zr.toString=function(){return mr},Zr},utcFormat:function(mr){var Zr=mt(mr+="",ot);return Zr.toString=function(){return mr},Zr},utcParse:function(mr){var Zr=Tt(mr+="",!0);return Zr.toString=function(){return mr},Zr}}}var l={"-":"",_:" ",0:"0"},o=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(ae,oe,qe){var ke=ae<0?"-":"",ir=(ke?-ae:ae)+"",vr=ir.length;return ke+(vr68?1900:2e3),qe+ke[0].length):-1}function M(ae,oe,qe){var ke=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(oe.slice(qe,qe+6));return ke?(ae.Z=ke[1]?0:-(ke[2]+(ke[3]||"00")),qe+ke[0].length):-1}function S(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+1));return ke?(ae.q=ke[0]*3-3,qe+ke[0].length):-1}function C(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.m=ke[0]-1,qe+ke[0].length):-1}function q(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.d=+ke[0],qe+ke[0].length):-1}function D(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+3));return ke?(ae.m=0,ae.d=+ke[0],qe+ke[0].length):-1}function R(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.H=+ke[0],qe+ke[0].length):-1}function z(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.M=+ke[0],qe+ke[0].length):-1}function F(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.S=+ke[0],qe+ke[0].length):-1}function H(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+3));return ke?(ae.L=+ke[0],qe+ke[0].length):-1}function O(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+6));return ke?(ae.L=Math.floor(ke[0]/1e3),qe+ke[0].length):-1}function X(ae,oe,qe){var ke=s.exec(oe.slice(qe,qe+1));return ke?qe+ke[0].length:-1}function J(ae,oe,qe){var ke=o.exec(oe.slice(qe));return ke?(ae.Q=+ke[0],qe+ke[0].length):-1}function B(ae,oe,qe){var ke=o.exec(oe.slice(qe));return ke?(ae.s=+ke[0],qe+ke[0].length):-1}function I(ae,oe){return f(ae.getDate(),oe,2)}function W(ae,oe){return f(ae.getHours(),oe,2)}function K(ae,oe){return f(ae.getHours()%12||12,oe,2)}function Q(ae,oe){return f(1+r.timeDay.count(r.timeYear(ae),ae),oe,3)}function ie(ae,oe){return f(ae.getMilliseconds(),oe,3)}function me(ae,oe){return ie(ae,oe)+"000"}function pe(ae,oe){return f(ae.getMonth()+1,oe,2)}function ge(ae,oe){return f(ae.getMinutes(),oe,2)}function j(ae,oe){return f(ae.getSeconds(),oe,2)}function _e(ae){var oe=ae.getDay();return oe===0?7:oe}function se(ae,oe){return f(r.timeSunday.count(r.timeYear(ae)-1,ae),oe,2)}function Se(ae,oe){var qe=ae.getDay();return ae=qe>=4||qe===0?r.timeThursday(ae):r.timeThursday.ceil(ae),f(r.timeThursday.count(r.timeYear(ae),ae)+(r.timeYear(ae).getDay()===4),oe,2)}function ve(ae){return ae.getDay()}function Ae(ae,oe){return f(r.timeMonday.count(r.timeYear(ae)-1,ae),oe,2)}function Y(ae,oe){return f(ae.getFullYear()%100,oe,2)}function re(ae,oe){return f(ae.getFullYear()%1e4,oe,4)}function U(ae){var oe=ae.getTimezoneOffset();return(oe>0?"-":(oe*=-1,"+"))+f(oe/60|0,"0",2)+f(oe%60,"0",2)}function de(ae,oe){return f(ae.getUTCDate(),oe,2)}function be(ae,oe){return f(ae.getUTCHours(),oe,2)}function ye(ae,oe){return f(ae.getUTCHours()%12||12,oe,2)}function Fe(ae,oe){return f(1+r.utcDay.count(r.utcYear(ae),ae),oe,3)}function Re(ae,oe){return f(ae.getUTCMilliseconds(),oe,3)}function Pe(ae,oe){return Re(ae,oe)+"000"}function Ie(ae,oe){return f(ae.getUTCMonth()+1,oe,2)}function Be(ae,oe){return f(ae.getUTCMinutes(),oe,2)}function Ne(ae,oe){return f(ae.getUTCSeconds(),oe,2)}function Ee(ae){var oe=ae.getUTCDay();return oe===0?7:oe}function Je(ae,oe){return f(r.utcSunday.count(r.utcYear(ae)-1,ae),oe,2)}function We(ae,oe){var qe=ae.getUTCDay();return ae=qe>=4||qe===0?r.utcThursday(ae):r.utcThursday.ceil(ae),f(r.utcThursday.count(r.utcYear(ae),ae)+(r.utcYear(ae).getUTCDay()===4),oe,2)}function ne(ae){return ae.getUTCDay()}function Me(ae,oe){return f(r.utcMonday.count(r.utcYear(ae)-1,ae),oe,2)}function Ce(ae,oe){return f(ae.getUTCFullYear()%100,oe,2)}function cr(ae,oe){return f(ae.getUTCFullYear()%1e4,oe,4)}function tr(){return"+0000"}function De(){return"%"}function Le(ae){return+ae}function Ye(ae){return Math.floor(+ae/1e3)}var Ze;Ue({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 Ue(ae){return Ze=i(ae),e.timeFormat=Ze.format,e.timeParse=Ze.parse,e.utcFormat=Ze.utcFormat,e.utcParse=Ze.utcParse,Ze}var Oe="%Y-%m-%dT%H:%M:%S.%LZ";function Ke(ae){return ae.toISOString()}var fr=Date.prototype.toISOString?Ke:e.utcFormat(Oe);function lr(ae){var oe=new Date(ae);return isNaN(oe)?null:oe}var ze=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(Oe);e.isoFormat=fr,e.isoParse=ze,e.timeFormatDefaultLocale=Ue,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var O1=Z((ov,vb)=>{(function(e,r){typeof ov=="object"&&typeof vb!="undefined"?r(ov):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(ov,function(e){"use strict";function r(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function t(C,q){if((D=(C=q?C.toExponential(q-1):C.toExponential()).indexOf("e"))<0)return null;var D,R=C.slice(0,D);return[R.length>1?R[0]+R.slice(2):R,+C.slice(D+1)]}function a(C){return C=t(Math.abs(C)),C?C[1]:NaN}function n(C,q){return function(D,R){for(var z=D.length,F=[],H=0,O=C[0],X=0;z>0&&O>0&&(X+O+1>R&&(O=Math.max(1,R-X)),F.push(D.substring(z-=O,z+O)),!((X+=O+1)>R));)O=C[H=(H+1)%C.length];return F.reverse().join(q)}}function i(C){return function(q){return q.replace(/[0-9]/g,function(D){return C[+D]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(C){if(!(q=l.exec(C)))throw new Error("invalid format: "+C);var q;return new s({fill:q[1],align:q[2],sign:q[3],symbol:q[4],zero:q[5],width:q[6],comma:q[7],precision:q[8]&&q[8].slice(1),trim:q[9],type:q[10]})}o.prototype=s.prototype;function s(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+""}s.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 q=C.length,D=1,R=-1,z;D0&&(R=0);break}return R>0?C.slice(0,R)+C.slice(z+1):C}var f;function v(C,q){var D=t(C,q);if(!D)return C+"";var R=D[0],z=D[1],F=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,H=R.length;return F===H?R:F>H?R+new Array(F-H+1).join("0"):F>0?R.slice(0,F)+"."+R.slice(F):"0."+new Array(1-F).join("0")+t(C,Math.max(0,q+F-1))[0]}function h(C,q){var D=t(C,q);if(!D)return C+"";var R=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+R:R.length>z+1?R.slice(0,z+1)+"."+R.slice(z+1):R+new Array(z-R.length+2).join("0")}var d={"%":function(C,q){return(C*100).toFixed(q)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:r,e:function(C,q){return C.toExponential(q)},f:function(C,q){return C.toFixed(q)},g:function(C,q){return C.toPrecision(q)},o:function(C){return Math.round(C).toString(8)},p:function(C,q){return h(C*100,q)},r:h,s:v,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function m(C){return C}var g=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function w(C){var q=C.grouping===void 0||C.thousands===void 0?m:n(g.call(C.grouping,Number),C.thousands+""),D=C.currency===void 0?"":C.currency[0]+"",R=C.currency===void 0?"":C.currency[1]+"",z=C.decimal===void 0?".":C.decimal+"",F=C.numerals===void 0?m:i(g.call(C.numerals,String)),H=C.percent===void 0?"%":C.percent+"",O=C.minus===void 0?"-":C.minus+"",X=C.nan===void 0?"NaN":C.nan+"";function J(I){I=o(I);var W=I.fill,K=I.align,Q=I.sign,ie=I.symbol,me=I.zero,pe=I.width,ge=I.comma,j=I.precision,_e=I.trim,se=I.type;se==="n"?(ge=!0,se="g"):d[se]||(j===void 0&&(j=12),_e=!0,se="g"),(me||W==="0"&&K==="=")&&(me=!0,W="0",K="=");var Se=ie==="$"?D:ie==="#"&&/[boxX]/.test(se)?"0"+se.toLowerCase():"",ve=ie==="$"?R:/[%p]/.test(se)?H:"",Ae=d[se],Y=/[defgprs%]/.test(se);j=j===void 0?6:/[gprs]/.test(se)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function re(U){var de=Se,be=ve,ye,Fe,Re;if(se==="c")be=Ae(U)+be,U="";else{U=+U;var Pe=U<0||1/U<0;if(U=isNaN(U)?X:Ae(Math.abs(U),j),_e&&(U=u(U)),Pe&&+U==0&&Q!=="+"&&(Pe=!1),de=(Pe?Q==="("?Q:O:Q==="-"||Q==="("?"":Q)+de,be=(se==="s"?y[8+f/3]:"")+be+(Pe&&Q==="("?")":""),Y){for(ye=-1,Fe=U.length;++yeRe||Re>57){be=(Re===46?z+U.slice(ye+1):U.slice(ye))+be,U=U.slice(0,ye);break}}}ge&&!me&&(U=q(U,1/0));var Ie=de.length+U.length+be.length,Be=Ie>1)+de+U+be+Be.slice(Ie);break;default:U=Be+de+U+be;break}return F(U)}return re.toString=function(){return I+""},re}function B(I,W){var K=J((I=o(I),I.type="f",I)),Q=Math.max(-8,Math.min(8,Math.floor(a(W)/3)))*3,ie=Math.pow(10,-Q),me=y[8+Q/3];return function(pe){return K(ie*pe)+me}}return{format:J,formatPrefix:B}}var _;T({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function T(C){return _=w(C),e.format=_.format,e.formatPrefix=_.formatPrefix,_}function b(C){return Math.max(0,-a(Math.abs(C)))}function M(C,q){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(q)/3)))*3-a(Math.abs(C)))}function S(C,q){return C=Math.abs(C),q=Math.abs(q)-C,Math.max(0,a(q)-a(C))+1}e.FormatSpecifier=s,e.formatDefaultLocale=T,e.formatLocale=w,e.formatSpecifier=o,e.precisionFixed=b,e.precisionPrefix=M,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})})});var db=Z((sie,hb)=>{"use strict";hb.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var Hr=Z((uie,pb)=>{"use strict";var iI=db();pb.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&iI(t))return!1}else if(r!=="number")return!1;return e-e<1}});var Bt=Z((fie,mb)=>{"use strict";mb.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 B1=Z((sv,yb)=>{(function(e,r){typeof sv=="object"&&typeof yb!="undefined"?r(sv):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(sv,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(o[s]&3)<<4|o[s+1]>>4],f+=r[(o[s+1]&15)<<2|o[s+2]>>6],f+=r[o[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(l){var o=l.length*.75,s=l.length,u,f=0,v,h,d,m;l[l.length-1]==="="&&(o--,l[l.length-2]==="="&&o--);var g=new ArrayBuffer(o),y=new Uint8Array(g);for(u=0;u>4,y[f++]=(h&15)<<4|d>>2,y[f++]=(d&3)<<6|m&63;return g};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var nl=Z((cie,gb)=>{"use strict";gb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var nn=Z(Un=>{"use strict";var lI=B1().decode,oI=nl(),Y1=Array.isArray,sI=ArrayBuffer,uI=DataView;function bb(e){return sI.isView(e)&&!(e instanceof uI)}Un.isTypedArray=bb;function uv(e){return Y1(e)||bb(e)}Un.isArrayOrTypedArray=uv;function fI(e){return!uv(e[0])}Un.isArray1D=fI;Un.ensureArray=function(e,r){return Y1(e)||(e=[]),e.length=r,e};var na={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};na.uint8c=na.u1c;na.uint8=na.u1;na.int8=na.i1;na.uint16=na.u2;na.int16=na.i2;na.uint32=na.u4;na.int32=na.i4;na.float32=na.f4;na.float64=na.f8;function U1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=U1;Un.decodeTypedArraySpec=function(e){var r=[],t=cI(e),a=t.dtype,n=na[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;U1(l)||(l=lI(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,v=+o[0],h=i*v,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var _b=Hr(),V1=nn().isArrayOrTypedArray;Ab.exports=function(r,t){if(_b(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o{"use strict";var ss=fv(),mI=/^\w*$/,yI=0,kb=1,cv=2,Cb=3,Ql=4;Sb.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,l,o,s={};t&&t.length?(o=ss(r,t),l=o.get()):l=r,t=t||"";var u={};if(l)for(i=0;i2)return s[d]=s[d]|cv,v.set(h,null);if(f){for(i=d;i{"use strict";var gI=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,bI=/^[^\.\[\]]+$/;qb.exports=function(e,r){for(;r;){var t=e.match(gI);if(t)e=t[1];else if(e.match(bI))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var vv=Z((mie,Eb)=>{"use strict";var xI=Hr();Eb.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return xI(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var zb=Z((yie,Rb)=>{"use strict";var Pb=nn().isArrayOrTypedArray,Iu=nl();Rb.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(Pb(n)&&Pb(i)&&Iu(n[0])){if(a==="customdata"||a==="ids")continue;for(var l=Math.min(n.length,i.length),o=0;o{"use strict";function _I(e,r){var t=e%r;return t<0?t+r:t}function wI(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}Nb.exports={mod:_I,modHalf:wI}});var bn=Z((bie,hv)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,l=e.max,o=e.random;function s(Y,re){if(Y=Y||"",re=re||{},Y instanceof s)return Y;if(!(this instanceof s))return new s(Y,re);var U=u(Y);this._originalInput=Y,this._r=U.r,this._g=U.g,this._b=U.b,this._a=U.a,this._roundA=n(100*this._a)/100,this._format=re.format||U.format,this._gradientType=re.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=U.ok,this._tc_id=a++}s.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 Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),re,U,de,be,ye,Fe;return re=Y.r/255,U=Y.g/255,de=Y.b/255,re<=.03928?be=re/12.92:be=e.pow((re+.055)/1.055,2.4),U<=.03928?ye=U/12.92:ye=e.pow((U+.055)/1.055,2.4),de<=.03928?Fe=de/12.92:Fe=e.pow((de+.055)/1.055,2.4),.2126*be+.7152*ye+.0722*Fe},setAlpha:function(Y){return this._a=I(Y),this._roundA=n(100*this._a)/100,this},toHsv:function(){var Y=d(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=d(this._r,this._g,this._b),re=n(Y.h*360),U=n(Y.s*100),de=n(Y.v*100);return this._a==1?"hsv("+re+", "+U+"%, "+de+"%)":"hsva("+re+", "+U+"%, "+de+"%, "+this._roundA+")"},toHsl:function(){var Y=v(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=v(this._r,this._g,this._b),re=n(Y.h*360),U=n(Y.s*100),de=n(Y.l*100);return this._a==1?"hsl("+re+", "+U+"%, "+de+"%)":"hsla("+re+", "+U+"%, "+de+"%, "+this._roundA+")"},toHex:function(Y){return g(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return y(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(W(this._r,255)*100)+"%",g:n(W(this._g,255)*100)+"%",b:n(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(W(this._r,255)*100)+"%, "+n(W(this._g,255)*100)+"%, "+n(W(this._b,255)*100)+"%)":"rgba("+n(W(this._r,255)*100)+"%, "+n(W(this._g,255)*100)+"%, "+n(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:J[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var re="#"+w(this._r,this._g,this._b,this._a),U=re,de=this._gradientType?"GradientType = 1, ":"";if(Y){var be=s(Y);U="#"+w(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+de+"startColorstr="+re+",endColorstr="+U+")"},toString:function(Y){var re=!!Y;Y=Y||this._format;var U=!1,de=this._a<1&&this._a>=0,be=!re&&de&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return be?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(U=this.toRgbString()),Y==="prgb"&&(U=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(U=this.toHexString()),Y==="hex3"&&(U=this.toHexString(!0)),Y==="hex4"&&(U=this.toHex8String(!0)),Y==="hex8"&&(U=this.toHex8String()),Y==="name"&&(U=this.toName()),Y==="hsl"&&(U=this.toHslString()),Y==="hsv"&&(U=this.toHsvString()),U||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Y,re){var U=Y.apply(null,[this].concat([].slice.call(re)));return this._r=U._r,this._g=U._g,this._b=U._b,this.setAlpha(U._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(q,arguments)},_applyCombination:function(Y,re){return Y.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(z,arguments)}},s.fromRatio=function(Y,re){if(typeof Y=="object"){var U={};for(var de in Y)Y.hasOwnProperty(de)&&(de==="a"?U[de]=Y[de]:U[de]=ge(Y[de]));Y=U}return s(Y,re)};function u(Y){var re={r:0,g:0,b:0},U=1,de=null,be=null,ye=null,Fe=!1,Re=!1;return typeof Y=="string"&&(Y=ve(Y)),typeof Y=="object"&&(Se(Y.r)&&Se(Y.g)&&Se(Y.b)?(re=f(Y.r,Y.g,Y.b),Fe=!0,Re=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):Se(Y.h)&&Se(Y.s)&&Se(Y.v)?(de=ge(Y.s),be=ge(Y.v),re=m(Y.h,de,be),Fe=!0,Re="hsv"):Se(Y.h)&&Se(Y.s)&&Se(Y.l)&&(de=ge(Y.s),ye=ge(Y.l),re=h(Y.h,de,ye),Fe=!0,Re="hsl"),Y.hasOwnProperty("a")&&(U=Y.a)),U=I(U),{ok:Fe,format:Y.format||Re,r:i(255,l(re.r,0)),g:i(255,l(re.g,0)),b:i(255,l(re.b,0)),a:U}}function f(Y,re,U){return{r:W(Y,255)*255,g:W(re,255)*255,b:W(U,255)*255}}function v(Y,re,U){Y=W(Y,255),re=W(re,255),U=W(U,255);var de=l(Y,re,U),be=i(Y,re,U),ye,Fe,Re=(de+be)/2;if(de==be)ye=Fe=0;else{var Pe=de-be;switch(Fe=Re>.5?Pe/(2-de-be):Pe/(de+be),de){case Y:ye=(re-U)/Pe+(re1&&(Ne-=1),Ne<1/6?Ie+(Be-Ie)*6*Ne:Ne<1/2?Be:Ne<2/3?Ie+(Be-Ie)*(2/3-Ne)*6:Ie}if(re===0)de=be=ye=U;else{var Re=U<.5?U*(1+re):U+re-U*re,Pe=2*U-Re;de=Fe(Pe,Re,Y+1/3),be=Fe(Pe,Re,Y),ye=Fe(Pe,Re,Y-1/3)}return{r:de*255,g:be*255,b:ye*255}}function d(Y,re,U){Y=W(Y,255),re=W(re,255),U=W(U,255);var de=l(Y,re,U),be=i(Y,re,U),ye,Fe,Re=de,Pe=de-be;if(Fe=de===0?0:Pe/de,de==be)ye=0;else{switch(de){case Y:ye=(re-U)/Pe+(re>1)+720)%360;--re;)de.h=(de.h+be)%360,ye.push(s(de));return ye}function O(Y,re){re=re||6;for(var U=s(Y).toHsv(),de=U.h,be=U.s,ye=U.v,Fe=[],Re=1/re;re--;)Fe.push(s({h:de,s:be,v:ye})),ye=(ye+Re)%1;return Fe}s.mix=function(Y,re,U){U=U===0?0:U||50;var de=s(Y).toRgb(),be=s(re).toRgb(),ye=U/100,Fe={r:(be.r-de.r)*ye+de.r,g:(be.g-de.g)*ye+de.g,b:(be.b-de.b)*ye+de.b,a:(be.a-de.a)*ye+de.a};return s(Fe)},s.readability=function(Y,re){var U=s(Y),de=s(re);return(e.max(U.getLuminance(),de.getLuminance())+.05)/(e.min(U.getLuminance(),de.getLuminance())+.05)},s.isReadable=function(Y,re,U){var de=s.readability(Y,re),be,ye;switch(ye=!1,be=Ae(U),be.level+be.size){case"AAsmall":case"AAAlarge":ye=de>=4.5;break;case"AAlarge":ye=de>=3;break;case"AAAsmall":ye=de>=7;break}return ye},s.mostReadable=function(Y,re,U){var de=null,be=0,ye,Fe,Re,Pe;U=U||{},Fe=U.includeFallbackColors,Re=U.level,Pe=U.size;for(var Ie=0;Iebe&&(be=ye,de=s(re[Ie]));return s.isReadable(Y,de,{level:Re,size:Pe})||!Fe?de:(U.includeFallbackColors=!1,s.mostReadable(Y,["#fff","#000"],U))};var X=s.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"},J=s.hexNames=B(X);function B(Y){var re={};for(var U in Y)Y.hasOwnProperty(U)&&(re[Y[U]]=U);return re}function I(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function W(Y,re){ie(Y)&&(Y="100%");var U=me(Y);return Y=i(re,l(0,parseFloat(Y))),U&&(Y=parseInt(Y*re,10)/100),e.abs(Y-re)<1e-6?1:Y%re/parseFloat(re)}function K(Y){return i(1,l(0,Y))}function Q(Y){return parseInt(Y,16)}function ie(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function me(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function pe(Y){return Y.length==1?"0"+Y:""+Y}function ge(Y){return Y<=1&&(Y=Y*100+"%"),Y}function j(Y){return e.round(parseFloat(Y)*255).toString(16)}function _e(Y){return Q(Y)/255}var se=function(){var Y="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",U="(?:"+re+")|(?:"+Y+")",de="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",be="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?";return{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+de),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+de),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+de),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Se(Y){return!!se.CSS_UNIT.exec(Y)}function ve(Y){Y=Y.replace(r,"").replace(t,"").toLowerCase();var re=!1;if(X[Y])Y=X[Y],re=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var U;return(U=se.rgb.exec(Y))?{r:U[1],g:U[2],b:U[3]}:(U=se.rgba.exec(Y))?{r:U[1],g:U[2],b:U[3],a:U[4]}:(U=se.hsl.exec(Y))?{h:U[1],s:U[2],l:U[3]}:(U=se.hsla.exec(Y))?{h:U[1],s:U[2],l:U[3],a:U[4]}:(U=se.hsv.exec(Y))?{h:U[1],s:U[2],v:U[3]}:(U=se.hsva.exec(Y))?{h:U[1],s:U[2],v:U[3],a:U[4]}:(U=se.hex8.exec(Y))?{r:Q(U[1]),g:Q(U[2]),b:Q(U[3]),a:_e(U[4]),format:re?"name":"hex8"}:(U=se.hex6.exec(Y))?{r:Q(U[1]),g:Q(U[2]),b:Q(U[3]),format:re?"name":"hex"}:(U=se.hex4.exec(Y))?{r:Q(U[1]+""+U[1]),g:Q(U[2]+""+U[2]),b:Q(U[3]+""+U[3]),a:_e(U[4]+""+U[4]),format:re?"name":"hex8"}:(U=se.hex3.exec(Y))?{r:Q(U[1]+""+U[1]),g:Q(U[2]+""+U[2]),b:Q(U[3]+""+U[3]),format:re?"name":"hex"}:!1}function Ae(Y){var re,U;return Y=Y||{level:"AA",size:"small"},re=(Y.level||"AA").toUpperCase(),U=(Y.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),U!=="small"&&U!=="large"&&(U="small"),{level:re,size:U}}typeof hv!="undefined"&&hv.exports?hv.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var Yt=Z(Bu=>{"use strict";var Fb=nl(),Hu=Array.isArray;function TI(e,r){var t,a;for(t=0;t{"use strict";Ib.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var Yu=Z((wie,Hb)=>{"use strict";Hb.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var fs=Z((Tie,Yb)=>{"use strict";var Ob=Yu(),Bb=ha(),W1=Bb({editType:"none"});W1.family.dflt=Ob.HOVERFONT;W1.size.dflt=Ob.HOVERFONTSIZE;Yb.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:W1,grouptitlefont:Bb({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var mv=Z((Mie,Ub)=>{"use strict";var MI=ha(),dv=fs().hoverlabel,pv=Yt().extendFlat;Ub.exports={hoverlabel:{bgcolor:pv({},dv.bgcolor,{arrayOk:!0}),bordercolor:pv({},dv.bordercolor,{arrayOk:!0}),font:MI({arrayOk:!0,editType:"none"}),align:pv({},dv.align,{arrayOk:!0}),namelength:pv({},dv.namelength,{arrayOk:!0}),editType:"none"}}});var Gn=Z((Aie,Gb)=>{"use strict";var AI=ha(),kI=mv();Gb.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:AI({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:kI.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 $l=Z((kie,Zb)=>{"use strict";var CI=bn(),yv={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)"]]},Vb=yv.RdBu;function SI(e,r){if(r||(r=Vb),!e)return r;function t(){try{e=yv[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),Wb(e)?e:r}function Wb(e){var r=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 t=0;t{"use strict";jl.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];jl.defaultLine="#444";jl.lightLine="#eee";jl.background="#fff";jl.borderLine="#BEC8D9";jl.lightFraction=100*10/11});var Er=Z((Sie,Xb)=>{"use strict";var Wa=bn(),qI=Hr(),DI=nn().isTypedArray,Zt=Xb.exports={},gv=hi();Zt.defaults=gv.defaults;var EI=Zt.defaultLine=gv.defaultLine;Zt.lightLine=gv.lightLine;var X1=Zt.background=gv.background;Zt.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};Zt.rgb=function(e){return Zt.tinyRGB(Wa(e))};Zt.opacity=function(e){return e?Wa(e).getAlpha():0};Zt.addOpacity=function(e,r){var t=Wa(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};Zt.combine=function(e,r){var t=Wa(e).toRgb();if(t.a===1)return Wa(e).toRgbString();var a=Wa(r||X1).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return Wa(i).toRgbString()};Zt.interpolate=function(e,r,t){var a=Wa(e).toRgb(),n=Wa(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return Wa(i).toRgbString()};Zt.contrast=function(e,r,t){var a=Wa(e);a.getAlpha()!==1&&(a=Wa(Zt.combine(e,X1)));var n=a.isDark()?r?a.lighten(r):X1:t?a.darken(t):EI;return n.toString()};Zt.stroke=function(e,r){var t=Wa(r);e.style({stroke:Zt.tinyRGB(t),"stroke-opacity":t.getAlpha()})};Zt.fill=function(e,r){var t=Wa(r);e.style({fill:Zt.tinyRGB(t),"fill-opacity":t.getAlpha()})};Zt.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var l=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+l+", "+a[3]+")":"rgb("+l+")"}});var bv=Z((Lie,Jb)=>{"use strict";Jb.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var cs=Z(Kb=>{"use strict";Kb.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var ex=Z(Za=>{"use strict";var J1=Hr(),Qb=bn(),$b=Yt().extendFlat,PI=Gn(),RI=$l(),zI=Er(),NI=bv().DESELECTDIM,vs=fv(),jb=cs().counter,FI=us().modHalf,di=nn().isArrayOrTypedArray,il=nn().isTypedArraySpec,ll=nn().decodeTypedArraySpec;Za.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(di(e)?e:il(e)?ll(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}il(e)&&(e=ll(e)),e%1||!J1(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){il(e)&&(e=ll(e)),Qb(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return Qb(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(RI.get(e,t))}},angle:{coerceFunction:function(e,r,t){il(e)&&(e=ll(e)),e==="auto"?r.set("auto"):J1(e)?r.set(FI(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||jb(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!jb(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var rx={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/"},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:{}}},tx={};function ax(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),ax(a,r[t]))}}ax(rx,tx);nx.exports={configAttributes:rx,dfltConfig:tx}});var Q1=Z((Pie,ix)=>{"use strict";var K1=Ir(),II=Hr(),Uu=[];ix.exports=function(e,r){if(Uu.indexOf(e)!==-1)return;Uu.push(e);var t=1e3;II(r)?t=r:r==="long"&&(t=3e3);var a=K1.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(Uu);function i(l){l.duration(700).style("opacity",0).each("end",function(o){var s=Uu.indexOf(o);s!==-1&&Uu.splice(s,1),K1.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var o=K1.select(this);o.append("button").classed("notifier-close",!0).html("×").on("click",function(){o.transition().call(i)});for(var s=o.append("p"),u=l.split(//g),f=0;f{"use strict";var hs=eo().dfltConfig,$1=Q1(),j1=lx.exports={};j1.log=function(){var e;if(hs.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};j1.warn=function(){var e;if(hs.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};j1.error=function(){var e;if(hs.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var _v=Z((zie,ox)=>{"use strict";ox.exports=function(){}});var ep=Z((Nie,sx)=>{"use strict";sx.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{ux.exports=HI;function HI(){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 vx=Z((Iie,cx)=>{cx.exports=OI;function OI(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var dx=Z((Hie,hx)=>{hx.exports=BI;function BI(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var rp=Z((Oie,px)=>{px.exports=YI;function YI(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 yx=Z((Bie,mx)=>{mx.exports=UI;function UI(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],l=r[7],o=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=l,e[14]=o}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var bx=Z((Yie,gx)=>{gx.exports=GI;function GI(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],w=r[15],_=t*o-a*l,T=t*s-n*l,b=t*u-i*l,M=a*s-n*o,S=a*u-i*o,C=n*u-i*s,q=f*g-v*m,D=f*y-h*m,R=f*w-d*m,z=v*y-h*g,F=v*w-d*g,H=h*w-d*y,O=_*H-T*F+b*z+M*R-S*D+C*q;return O?(O=1/O,e[0]=(o*H-s*F+u*z)*O,e[1]=(n*F-a*H-i*z)*O,e[2]=(g*C-y*S+w*M)*O,e[3]=(h*S-v*C-d*M)*O,e[4]=(s*R-l*H-u*D)*O,e[5]=(t*H-n*R+i*D)*O,e[6]=(y*b-m*C-w*T)*O,e[7]=(f*C-h*b+d*T)*O,e[8]=(l*F-o*R+u*q)*O,e[9]=(a*R-t*F-i*q)*O,e[10]=(m*S-g*b+w*_)*O,e[11]=(v*b-f*S-d*_)*O,e[12]=(o*D-l*z-s*q)*O,e[13]=(t*z-a*D+n*q)*O,e[14]=(g*T-m*M-y*_)*O,e[15]=(f*M-v*T+h*_)*O,e):null}});var _x=Z((Uie,xx)=>{xx.exports=VI;function VI(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],w=r[15];return e[0]=o*(h*w-d*y)-v*(s*w-u*y)+g*(s*d-u*h),e[1]=-(a*(h*w-d*y)-v*(n*w-i*y)+g*(n*d-i*h)),e[2]=a*(s*w-u*y)-o*(n*w-i*y)+g*(n*u-i*s),e[3]=-(a*(s*d-u*h)-o*(n*d-i*h)+v*(n*u-i*s)),e[4]=-(l*(h*w-d*y)-f*(s*w-u*y)+m*(s*d-u*h)),e[5]=t*(h*w-d*y)-f*(n*w-i*y)+m*(n*d-i*h),e[6]=-(t*(s*w-u*y)-l*(n*w-i*y)+m*(n*u-i*s)),e[7]=t*(s*d-u*h)-l*(n*d-i*h)+f*(n*u-i*s),e[8]=l*(v*w-d*g)-f*(o*w-u*g)+m*(o*d-u*v),e[9]=-(t*(v*w-d*g)-f*(a*w-i*g)+m*(a*d-i*v)),e[10]=t*(o*w-u*g)-l*(a*w-i*g)+m*(a*u-i*o),e[11]=-(t*(o*d-u*v)-l*(a*d-i*v)+f*(a*u-i*o)),e[12]=-(l*(v*y-h*g)-f*(o*y-s*g)+m*(o*h-s*v)),e[13]=t*(v*y-h*g)-f*(a*y-n*g)+m*(a*h-n*v),e[14]=-(t*(o*y-s*g)-l*(a*y-n*g)+m*(a*s-n*o)),e[15]=t*(o*h-s*v)-l*(a*h-n*v)+f*(a*s-n*o),e}});var Tx=Z((Gie,wx)=>{wx.exports=WI;function WI(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],l=e[5],o=e[6],s=e[7],u=e[8],f=e[9],v=e[10],h=e[11],d=e[12],m=e[13],g=e[14],y=e[15],w=r*l-t*i,_=r*o-a*i,T=r*s-n*i,b=t*o-a*l,M=t*s-n*l,S=a*s-n*o,C=u*m-f*d,q=u*g-v*d,D=u*y-h*d,R=f*g-v*m,z=f*y-h*m,F=v*y-h*g;return w*F-_*z+T*R+b*D-M*q+S*C}});var Ax=Z((Vie,Mx)=>{Mx.exports=ZI;function ZI(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=r[4],s=r[5],u=r[6],f=r[7],v=r[8],h=r[9],d=r[10],m=r[11],g=r[12],y=r[13],w=r[14],_=r[15],T=t[0],b=t[1],M=t[2],S=t[3];return e[0]=T*a+b*o+M*v+S*g,e[1]=T*n+b*s+M*h+S*y,e[2]=T*i+b*u+M*d+S*w,e[3]=T*l+b*f+M*m+S*_,T=t[4],b=t[5],M=t[6],S=t[7],e[4]=T*a+b*o+M*v+S*g,e[5]=T*n+b*s+M*h+S*y,e[6]=T*i+b*u+M*d+S*w,e[7]=T*l+b*f+M*m+S*_,T=t[8],b=t[9],M=t[10],S=t[11],e[8]=T*a+b*o+M*v+S*g,e[9]=T*n+b*s+M*h+S*y,e[10]=T*i+b*u+M*d+S*w,e[11]=T*l+b*f+M*m+S*_,T=t[12],b=t[13],M=t[14],S=t[15],e[12]=T*a+b*o+M*v+S*g,e[13]=T*n+b*s+M*h+S*y,e[14]=T*i+b*u+M*d+S*w,e[15]=T*l+b*f+M*m+S*_,e}});var Cx=Z((Wie,kx)=>{kx.exports=XI;function XI(e,r,t){var a=t[0],n=t[1],i=t[2],l,o,s,u,f,v,h,d,m,g,y,w;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(l=r[0],o=r[1],s=r[2],u=r[3],f=r[4],v=r[5],h=r[6],d=r[7],m=r[8],g=r[9],y=r[10],w=r[11],e[0]=l,e[1]=o,e[2]=s,e[3]=u,e[4]=f,e[5]=v,e[6]=h,e[7]=d,e[8]=m,e[9]=g,e[10]=y,e[11]=w,e[12]=l*a+f*n+m*i+r[12],e[13]=o*a+v*n+g*i+r[13],e[14]=s*a+h*n+y*i+r[14],e[15]=u*a+d*n+w*i+r[15]),e}});var Lx=Z((Zie,Sx)=>{Sx.exports=JI;function JI(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var Dx=Z((Xie,qx)=>{qx.exports=KI;function KI(e,r,t,a){var n=a[0],i=a[1],l=a[2],o=Math.sqrt(n*n+i*i+l*l),s,u,f,v,h,d,m,g,y,w,_,T,b,M,S,C,q,D,R,z,F,H,O,X;return Math.abs(o)<1e-6?null:(o=1/o,n*=o,i*=o,l*=o,s=Math.sin(t),u=Math.cos(t),f=1-u,v=r[0],h=r[1],d=r[2],m=r[3],g=r[4],y=r[5],w=r[6],_=r[7],T=r[8],b=r[9],M=r[10],S=r[11],C=n*n*f+u,q=i*n*f+l*s,D=l*n*f-i*s,R=n*i*f-l*s,z=i*i*f+u,F=l*i*f+n*s,H=n*l*f+i*s,O=i*l*f-n*s,X=l*l*f+u,e[0]=v*C+g*q+T*D,e[1]=h*C+y*q+b*D,e[2]=d*C+w*q+M*D,e[3]=m*C+_*q+S*D,e[4]=v*R+g*z+T*F,e[5]=h*R+y*z+b*F,e[6]=d*R+w*z+M*F,e[7]=m*R+_*z+S*F,e[8]=v*H+g*O+T*X,e[9]=h*H+y*O+b*X,e[10]=d*H+w*O+M*X,e[11]=m*H+_*O+S*X,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var Px=Z((Jie,Ex)=>{Ex.exports=QI;function QI(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],l=r[5],o=r[6],s=r[7],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=l*n+f*a,e[6]=o*n+v*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=f*n-l*a,e[10]=v*n-o*a,e[11]=h*n-s*a,e}});var zx=Z((Kie,Rx)=>{Rx.exports=$I;function $I(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=l*n-f*a,e[2]=o*n-v*a,e[3]=s*n-h*a,e[8]=i*a+u*n,e[9]=l*a+f*n,e[10]=o*a+v*n,e[11]=s*a+h*n,e}});var Fx=Z((Qie,Nx)=>{Nx.exports=jI;function jI(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[4],f=r[5],v=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=l*n+f*a,e[2]=o*n+v*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=f*n-l*a,e[6]=v*n-o*a,e[7]=h*n-s*a,e}});var Hx=Z(($ie,Ix)=>{Ix.exports=eH;function eH(e,r,t){var a,n,i,l=t[0],o=t[1],s=t[2],u=Math.sqrt(l*l+o*o+s*s);return Math.abs(u)<1e-6?null:(u=1/u,l*=u,o*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=l*l*i+n,e[1]=o*l*i+s*a,e[2]=s*l*i-o*a,e[3]=0,e[4]=l*o*i-s*a,e[5]=o*o*i+n,e[6]=s*o*i+l*a,e[7]=0,e[8]=l*s*i+o*a,e[9]=o*s*i-l*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Bx=Z((jie,Ox)=>{Ox.exports=rH;function rH(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=a+a,s=n+n,u=i+i,f=a*o,v=a*s,h=a*u,d=n*s,m=n*u,g=i*u,y=l*o,w=l*s,_=l*u;return e[0]=1-(d+g),e[1]=v+_,e[2]=h-w,e[3]=0,e[4]=v-_,e[5]=1-(f+g),e[6]=m+y,e[7]=0,e[8]=h+w,e[9]=m-y,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Ux=Z((ele,Yx)=>{Yx.exports=tH;function tH(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Vx=Z((rle,Gx)=>{Gx.exports=aH;function aH(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Zx=Z((tle,Wx)=>{Wx.exports=nH;function nH(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Jx=Z((ale,Xx)=>{Xx.exports=iH;function iH(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Qx=Z((nle,Kx)=>{Kx.exports=lH;function lH(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 tp=Z((ile,$x)=>{$x.exports=oH;function oH(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=t+t,o=a+a,s=n+n,u=t*l,f=a*l,v=a*o,h=n*l,d=n*o,m=n*s,g=i*l,y=i*o,w=i*s;return e[0]=1-v-m,e[1]=f+w,e[2]=h-y,e[3]=0,e[4]=f-w,e[5]=1-u-m,e[6]=d+g,e[7]=0,e[8]=h+y,e[9]=d-g,e[10]=1-u-v,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var e_=Z((lle,jx)=>{jx.exports=sH;function sH(e,r,t,a,n,i,l){var o=1/(t-r),s=1/(n-a),u=1/(i-l);return e[0]=i*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*o,e[9]=(n+a)*s,e[10]=(l+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*i*2*u,e[15]=0,e}});var t_=Z((ole,r_)=>{r_.exports=uH;function uH(e,r,t,a,n){var i=1/Math.tan(r/2),l=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*l,e[15]=0,e}});var n_=Z((sle,a_)=>{a_.exports=fH;function fH(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),l=Math.tan(r.leftDegrees*Math.PI/180),o=Math.tan(r.rightDegrees*Math.PI/180),s=2/(l+o),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((l-o)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var l_=Z((ule,i_)=>{i_.exports=cH;function cH(e,r,t,a,n,i,l){var o=1/(r-t),s=1/(a-n),u=1/(i-l);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*s,e[14]=(l+i)*u,e[15]=1,e}});var s_=Z((fle,o_)=>{var vH=rp();o_.exports=hH;function hH(e,r,t,a){var n,i,l,o,s,u,f,v,h,d,m=r[0],g=r[1],y=r[2],w=a[0],_=a[1],T=a[2],b=t[0],M=t[1],S=t[2];return Math.abs(m-b)<1e-6&&Math.abs(g-M)<1e-6&&Math.abs(y-S)<1e-6?vH(e):(f=m-b,v=g-M,h=y-S,d=1/Math.sqrt(f*f+v*v+h*h),f*=d,v*=d,h*=d,n=_*h-T*v,i=T*f-w*h,l=w*v-_*f,d=Math.sqrt(n*n+i*i+l*l),d?(d=1/d,n*=d,i*=d,l*=d):(n=0,i=0,l=0),o=v*l-h*i,s=h*n-f*l,u=f*i-v*n,d=Math.sqrt(o*o+s*s+u*u),d?(d=1/d,o*=d,s*=d,u*=d):(o=0,s=0,u=0),e[0]=n,e[1]=o,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=v,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*m+i*g+l*y),e[13]=-(o*m+s*g+u*y),e[14]=-(f*m+v*g+h*y),e[15]=1,e)}});var f_=Z((cle,u_)=>{u_.exports=dH;function dH(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 ap=Z((vle,c_)=>{c_.exports={create:fx(),clone:vx(),copy:dx(),identity:rp(),transpose:yx(),invert:bx(),adjoint:_x(),determinant:Tx(),multiply:Ax(),translate:Cx(),scale:Lx(),rotate:Dx(),rotateX:Px(),rotateY:zx(),rotateZ:Fx(),fromRotation:Hx(),fromRotationTranslation:Bx(),fromScaling:Ux(),fromTranslation:Vx(),fromXRotation:Zx(),fromYRotation:Jx(),fromZRotation:Qx(),fromQuat:tp(),frustum:e_(),perspective:t_(),perspectiveFromFieldOfView:n_(),ortho:l_(),lookAt:s_(),str:f_()}});var wv=Z(qt=>{"use strict";var pH=ap();qt.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var mH=Ir(),v_=ro(),yH=wv(),gH=ap();function bH(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function xH(e){var r=mH.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function h_(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function _H(e,r){d_("global",e,r)}function d_(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):v_.warn("addStyleRule failed"):v_.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function wH(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&h_(t)}function TH(e,r,t,a,n){var i=a.split(":"),l=n.split(":"),o="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(o)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[l[0]]=l[1])}),s.setAttribute(o,!0))})}function MH(e){var r=m_(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=p_(a);if(n){var i=yH.convertCssMatrix(n);t=gH.multiply(t,t,i)}}),t}function p_(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function m_(e){for(var r=[];AH(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function AH(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function kH(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}y_.exports={getGraphDiv:bH,isPlotDiv:xH,removeElement:h_,addStyleRule:_H,addRelatedStyleRule:d_,deleteRelatedStyleRule:wH,setStyleOnHover:TH,getFullTransformMatrix:MH,getElementTransformMatrix:p_,getElementAndAncestors:m_,equalDomRects:kH}});var Vu=Z((ple,g_)=>{"use strict";g_.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 pi=Z((mle,A_)=>{"use strict";var x_=Yt().extendFlat,CH=nl(),__={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},w_={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},SH=__.flags.slice().concat(["fullReplot"]),LH=w_.flags.slice().concat("layoutReplot");A_.exports={traces:__,layout:w_,traceFlags:function(){return b_(SH)},layoutFlags:function(){return b_(LH)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";np.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};np.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 ip=Z((gle,k_)=>{"use strict";k_.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 zi=Z(Tv=>{"use strict";var C_=ip(),ble=C_.FORMAT_LINK,xle=C_.DATE_FORMAT_LINK;function lp(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function ol(e,r){return r?r.d2l(e):e}function S_(e,r){return r?r.l2d(e):e}function qH(e){return e.x0}function DH(e){return e.x1}function EH(e){return e.y0}function PH(e){return e.y1}function L_(e){return e.x0shift||0}function q_(e){return e.x1shift||0}function D_(e){return e.y0shift||0}function E_(e){return e.y1shift||0}function Mv(e,r){return ol(e.x1,r)+q_(e)-ol(e.x0,r)-L_(e)}function Av(e,r,t){return ol(e.y1,t)+E_(e)-ol(e.y0,t)-D_(e)}function RH(e,r){return Math.abs(Mv(e,r))}function zH(e,r,t){return Math.abs(Av(e,r,t))}function NH(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(Mv(e,r),2)+Math.pow(Av(e,r,t),2))}function FH(e,r){return S_((ol(e.x1,r)+q_(e)+ol(e.x0,r)+L_(e))/2,r)}function IH(e,r,t){return S_((ol(e.y1,t)+E_(e)+ol(e.y0,t)+D_(e))/2,t)}function HH(e,r,t){return e.type!=="line"?void 0:Av(e,r,t)/Mv(e,r)}P_.exports={x0:qH,x1:DH,y0:EH,y1:PH,slope:HH,dx:Mv,dy:Av,width:RH,height:zH,length:NH,xcenter:FH,ycenter:IH}});var N_=Z((Tle,z_)=>{"use strict";var OH=pi().overrideAll,to=Gn(),R_=ha(),BH=mi().dash,sl=Yt().extendFlat,YH=zi().shapeTexttemplateAttrs,UH=kv();z_.exports=OH({newshape:{visible:sl({},to.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:sl({},to.legend,{}),legendgroup:sl({},to.legendgroup,{}),legendgrouptitle:{text:sl({},to.legendgrouptitle.text,{}),font:R_({})},legendrank:sl({},to.legendrank,{}),legendwidth:sl({},to.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:sl({},BH,{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:sl({},to.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:YH({newshape:!0},{keys:Object.keys(UH)}),font:R_({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var I_=Z((Mle,F_)=>{"use strict";var GH=mi().dash,VH=Yt().extendFlat;F_.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:VH({},GH,{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 Cv=Z((Ale,H_)=>{"use strict";H_.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var ds=Z((kle,U_)=>{"use strict";var op=ha(),WH=Vu(),Sv=hi(),O_=N_(),B_=I_(),ZH=Cv(),Y_=Yt().extendFlat,Lv=op({editType:"calc"});Lv.family.dflt='"Open Sans", verdana, arial, sans-serif';Lv.size.dflt=12;Lv.color.dflt=Sv.defaultLine;U_.exports={font:Lv,title:{text:{valType:"string",editType:"layoutstyle"},font:op({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:op({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:Y_(ZH({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:Sv.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:Sv.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:Sv.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:O_.newshape,activeshape:O_.activeshape,newselection:B_.newselection,activeselection:B_.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Y_({},WH.transition,{editType:"none"})}});var G_=lb(()=>{});var XH={};var V_=lb(()=>{G_()});var gr=Z(zr=>{"use strict";var ps=ro(),W_=_v(),Z_=ep(),JH=nl(),KH=Gu().addStyleRule,X_=Yt(),QH=Gn(),$H=ds(),jH=X_.extendFlat,sp=X_.extendDeepAll;zr.modules={};zr.allCategories={};zr.allTypes=[];zr.subplotsRegistry={};zr.componentsRegistry={};zr.layoutArrayContainers=[];zr.layoutArrayRegexes=[];zr.traceLayoutAttributes={};zr.localeRegistry={};zr.apiMethodRegistry={};zr.collectableSubplotTypes=null;zr.register=function(r){if(zr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var iO=os().timeFormat,i4=Hr(),up=ro(),fl=us().mod,gs=Bt(),xn=gs.BADNUM,Xa=gs.ONEDAY,Wu=gs.ONEHOUR,ul=gs.ONEMIN,ys=gs.ONESEC,Zu=gs.EPOCHJD,Ni=gr(),j_=os().utcFormat,lO=/^\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,oO=/^\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,e4=new Date().getFullYear()-70;function Fi(e){return e&&Ni.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Dt.dateTick0=function(e,r){var t=sO(e,!!r);if(r<2)return t;var a=Dt.dateTime2ms(t,e);return a+=Xa*(r-1),Dt.ms2DateTime(a,0,e)};function sO(e,r){return Fi(e)?r?Ni.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Ni.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Dt.dfltRange=function(e){return Fi(e)?Ni.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Dt.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Dv,Ev;Dt.dateTime2ms=function(e,r){if(Dt.isJSDate(e)){var t=e.getTimezoneOffset()*ul,a=(e.getUTCMinutes()-e.getMinutes())*ul+(e.getUTCSeconds()-e.getSeconds())*ys+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*ul;t=t-n/2+fl(a-t+n/2,n)}return e=Number(e)-t,e>=Dv&&e<=Ev?e:xn}if(typeof e!="string"&&typeof e!="number")return xn;e=String(e);var i=Fi(r),l=e.charAt(0);i&&(l==="G"||l==="g")&&(e=e.substr(1),r="");var o=i&&r.substr(0,7)==="chinese",s=e.match(o?oO:lO);if(!s)return xn;var u=s[1],f=s[3]||"1",v=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),m=Number(s[11]||0);if(i){if(u.length===2)return xn;u=Number(u);var g;try{var y=Ni.getComponentMethod("calendars","getCal")(r);if(o){var w=f.charAt(f.length-1)==="i";f=parseInt(f,10),g=y.newDate(u,y.toMonthIndex(u,f,w),v)}else g=y.newDate(u,Number(f),v)}catch(T){return xn}return g?(g.toJD()-Zu)*Xa+h*Wu+d*ul+m*ys:xn}u.length===2?u=(Number(u)+2e3-e4)%100+e4:u=Number(u),f-=1;var _=new Date(Date.UTC(2e3,f,v,h,d));return _.setUTCFullYear(u),_.getUTCMonth()!==f||_.getUTCDate()!==v?xn:_.getTime()+m*ys};Dv=Dt.MIN_MS=Dt.dateTime2ms("-9999");Ev=Dt.MAX_MS=Dt.dateTime2ms("9999-12-31 23:59:59.9999");Dt.isDateTime=function(e,r){return Dt.dateTime2ms(e,r)!==xn};function ms(e,r){return String(e+Math.pow(10,r)).substr(1)}var qv=90*Xa,r4=3*Wu,t4=5*ul;Dt.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Dv&&e<=Ev))return xn;r||(r=0);var a=Math.floor(fl(e+.05,1)*10),n=Math.round(e-a/10),i,l,o,s,u,f;if(Fi(t)){var v=Math.floor(n/Xa)+Zu,h=Math.floor(fl(e,Xa));try{i=Ni.getComponentMethod("calendars","getCal")(t).fromJD(v).formatDate("yyyy-mm-dd")}catch(d){i=j_("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;l=r=Dv+Xa&&e<=Ev-Xa))return xn;var r=Math.floor(fl(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=iO("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),l=t.getSeconds(),o=t.getUTCMilliseconds()*10+r;return l4(a,n,i,l,o)};function l4(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+ms(r,2)+":"+ms(t,2),(a||n)&&(e+=":"+ms(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+ms(n,i)}return e}Dt.cleanDate=function(e,r,t){if(e===xn)return r;if(Dt.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Fi(t))return up.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Dt.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Dt.isDateTime(e,t))return up.error("unrecognized date",e),r;return e};var uO=/%\d?f/g,fO=/%h/g,cO={1:"1",2:"1",3:"2",4:"2"};function a4(e,r,t,a){e=e.replace(uO,function(i){var l=Math.min(+i.charAt(1)||6,6),o=(r/1e3%1+2).toFixed(l).substr(2).replace(/0+$/,"")||"0";return o});var n=new Date(Math.floor(r+.05));if(e=e.replace(fO,function(){return cO[t("%q")(n)]}),Fi(a))try{e=Ni.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var vO=[59,59.9,59.99,59.999,59.9999];function hO(e,r){var t=fl(e+.05,Xa),a=ms(Math.floor(t/Wu),2)+":"+ms(fl(Math.floor(t/ul),60),2);if(r!=="M"){i4(r)||(r=0);var n=Math.min(fl(e/ys,60),vO[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}Dt.formatDate=function(e,r,t,a,n,i){if(n=Fi(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` +"use strict";var Plotly=(()=>{var ib=Object.defineProperty;var eI=Object.getOwnPropertyDescriptor;var rI=Object.getOwnPropertyNames;var tI=Object.prototype.hasOwnProperty;var lb=(e,r)=>()=>(e&&(r=e(e=0)),r);var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var aI=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of rI(r))!tI.call(e,n)&&n!==t&&ib(e,n,{get:()=>r[n],enumerable:!(a=eI(r,n))||a.enumerable});return e};var nI=e=>aI(ib({},"__esModule",{value:!0}),e);var tv=Z(ob=>{"use strict";ob.version="3.0.0-rc.0"});var ub=Z((sb,av)=>{(function(r,t,a){t[r]=t[r]||a(),typeof av!="undefined"&&av.exports?av.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:sb,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(_,T,b,A){return Object.defineProperty(_,T,{value:b,writable:!0,configurable:A!==!1})}}catch(w){r=function(T,b,A){return T[b]=A,T}}a=function(){var _,T,b;function A(S,k){this.fn=S,this.self=k,this.next=void 0}return{add:function(k,q){b=new A(k,q),T?T.next=b:_=b,T=b,b=void 0},drain:function(){var k=_;for(_=T=t=void 0;k;)k.fn.call(k.self),k=k.next}}}();function l(w,_){a.add(w,_),t||(t=i(a.drain))}function o(w){var _,T=typeof w;return w!=null&&(T=="object"||T=="function")&&(_=w.then),typeof _=="function"?_:!1}function s(){for(var w=0;w0&&l(s,T))}catch(b){v.call(new d(T),b)}}}function v(w){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=w,_.state=2,_.chain.length>0&&l(s,_))}function h(w,_,T,b){for(var A=0;A<_.length;A++)(function(k){w.resolve(_[k]).then(function(D){T(k,D)},b)})(A)}function d(w){this.def=w,this.triggered=!1}function m(w){this.promise=w,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(w){if(typeof w!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new m(this);this.then=function(b,A){var S={success:typeof b=="function"?b:!0,failure:typeof A=="function"?A:!1};return S.promise=new this.constructor(function(q,D){if(typeof q!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=q,S.reject=D}),_.chain.push(S),_.state!==0&&l(s,_),S.promise},this.catch=function(b){return this.then(void 0,b)};try{w.call(void 0,function(b){f.call(_,b)},function(b){v.call(_,b)})}catch(T){v.call(_,T)}}var y=r({},"constructor",g,!1);return g.prototype=y,r(y,"__NPO__",0,!1),r(g,"resolve",function(_){var T=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new T(function(A,S){if(typeof A!="function"||typeof S!="function")throw TypeError("Not a function");A(_)})}),r(g,"reject",function(_){return new this(function(b,A){if(typeof b!="function"||typeof A!="function")throw TypeError("Not a function");A(_)})}),r(g,"all",function(_){var T=this;return n.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):_.length===0?T.resolve([]):new T(function(A,S){if(typeof A!="function"||typeof S!="function")throw TypeError("Not a function");var k=_.length,q=Array(k),D=0;h(T,_,function(z,N){q[z]=N,++D===k&&A(q)},S)})}),r(g,"race",function(_){var T=this;return n.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(A,S){if(typeof A!="function"||typeof S!="function")throw TypeError("Not a function");h(T,_,function(q,D){A(D)},S)})}),g})});var Ir=Z((oie,nv)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},a=self.document;function n(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var x=p.length,M=new Array(x);x--;)M[x]=p[x];return M}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var l=this.Element.prototype,o=l.setAttribute,s=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;l.setAttribute=function(p,x){o.call(this,p,x+"")},l.setAttributeNS=function(p,x,M){s.call(this,p,x,M+"")},u.setProperty=function(p,x,M){f.call(this,p,x+"",M)}}e.ascending=v;function v(c,p){return cp?1:c>=p?0:NaN}e.descending=function(c,p){return pc?1:p>=c?0:NaN},e.min=function(c,p){var x=-1,M=c.length,C,L;if(arguments.length===1){for(;++x=L){C=L;break}for(;++xL&&(C=L)}else{for(;++x=L){C=L;break}for(;++xL&&(C=L)}return C},e.max=function(c,p){var x=-1,M=c.length,C,L;if(arguments.length===1){for(;++x=L){C=L;break}for(;++xC&&(C=L)}else{for(;++x=L){C=L;break}for(;++xC&&(C=L)}return C},e.extent=function(c,p){var x=-1,M=c.length,C,L,P;if(arguments.length===1){for(;++x=L){C=P=L;break}for(;++xL&&(C=L),P=L){C=P=L;break}for(;++xL&&(C=L),P1)return P/(F-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,x,M,C){for(arguments.length<3&&(M=0),arguments.length<4&&(C=p.length);M>>1;c(p[L],x)<0?M=L+1:C=L}return M},right:function(p,x,M,C){for(arguments.length<3&&(M=0),arguments.length<4&&(C=p.length);M>>1;c(p[L],x)>0?C=L:M=L+1}return M}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(M=arguments.length)<3&&(x=c.length,M<2&&(p=0));for(var M=x-p,C,L;M;)L=Math.random()*M--|0,C=c[M+p],c[M+p]=c[L+p],c[L+p]=C;return c},e.permute=function(c,p){for(var x=p.length,M=new Array(x);x--;)M[x]=c[p[x]];return M},e.pairs=function(c){for(var p=0,x=c.length-1,M,C=c[0],L=new Array(x<0?0:x);p=0;)for(P=c[p],x=P.length;--x>=0;)L[--C]=P[x];return L};var w=Math.abs;e.range=function(c,p,x){if(arguments.length<3&&(x=1,arguments.length<2&&(p=c,c=0)),(p-c)/x===1/0)throw new Error("infinite range");var M=[],C=_(w(x)),L=-1,P;if(c*=C,p*=C,x*=C,x<0)for(;(P=c+x*++L)>p;)M.push(P/C);else for(;(P=c+x*++L)=p.length)return C?C.call(c,F):M?F.sort(M):F;for(var W=-1,$=F.length,ee=p[G++],he,we,te,le=new b,ue;++W<$;)(ue=le.get(he=ee(we=F[W])))?ue.push(we):le.set(he,[we]);return E?(we=E(),te=function(xe,Te){we.set(xe,L(E,Te,G))}):(we={},te=function(xe,Te){we[xe]=L(E,Te,G)}),le.forEach(te),we}function P(E,F){if(F>=p.length)return E;var G=[],W=x[F++];return E.forEach(function($,ee){G.push({key:$,values:P(ee,F)})}),W?G.sort(function($,ee){return W($.key,ee.key)}):G}return c.map=function(E,F){return L(F,E,0)},c.entries=function(E){return P(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return M=E,c},c.rollup=function(E){return C=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,M=c.length;x=0&&(M=c.slice(x+1),c=c.slice(0,x)),c)return arguments.length<2?this[c].on(M):this[c].on(M,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(M,null);return this}};function Q(c){var p=[],x=new b;function M(){for(var C=p,L=-1,P=C.length,E;++L=0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),de.hasOwnProperty(x)?{space:de[x],local:c}:c}},Ae.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(be(p,c[p]));return this}return this.each(be(c,p))};function be(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function M(){this.removeAttributeNS(c.space,c.local)}function C(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var F=p.apply(this,arguments);F==null?this.removeAttribute(c):this.setAttribute(c,F)}function E(){var F=p.apply(this,arguments);F==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,F)}return p==null?c.local?M:x:typeof p=="function"?c.local?E:P:c.local?L:C}function ye(c){return c.trim().replace(/\s+/g," ")}Ae.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),M=(c=Re(c)).length,C=-1;if(p=x.classList){for(;++C=0;)(L=x[M])&&(C&&C!==L.nextSibling&&C.parentNode.insertBefore(L,C),C=L);return this},Ae.sort=function(c){c=Me.apply(this,arguments);for(var p=-1,x=this.length;++p=p&&(p=C+1);!(F=P[p])&&++p0&&(c=c.slice(0,C));var P=Ye.get(c);P&&(c=P,L=Ue);function E(){var W=this[M];W&&(this.removeEventListener(c,W,W.$),delete this[M])}function F(){var W=L(p,t(arguments));E.call(this),this.addEventListener(c,this[M]=W,W.$=x),W._=p}function G(){var W=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),$;for(var ee in this)if($=ee.match(W)){var he=this[ee];this.removeEventListener($[1],he,he.$),delete this[ee]}}return C?p?F:E:p?V:G}var Ye=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ye.forEach(function(c){"on"+c in a&&Ye.remove(c)});function Ze(c,p){return function(x){var M=e.event;e.event=x,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=M}}}function Ue(c,p){var x=Ze(c,p);return function(M){var C=this,L=M.relatedTarget;(!L||L!==C&&!(L.compareDocumentPosition(C)&8))&&x.call(C,M)}}var Oe,Ke=0;function fr(c){var p=".dragsuppress-"+ ++Ke,x="click"+p,M=e.select(i(c)).on("touchmove"+p,ie).on("dragstart"+p,ie).on("selectstart"+p,ie);if(Oe==null&&(Oe="onselectstart"in c?!1:B(c.style,"userSelect")),Oe){var C=n(c).style,L=C[Oe];C[Oe]="none"}return function(P){if(M.on(p,null),Oe&&(C[Oe]=L),P){var E=function(){M.on(x,null)};M.on(x,function(){ie(),E()},!0),setTimeout(E,0)}}}e.mouse=function(c){return ze(c,me())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ze(c,p){p.changedTouches&&(p=p.changedTouches[0]);var x=c.ownerSVGElement||c;if(x.createSVGPoint){var M=x.createSVGPoint();if(lr<0){var C=i(c);if(C.scrollX||C.scrollY){x=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=x[0][0].getScreenCTM();lr=!(L.f||L.e),x.remove()}}return lr?(M.x=p.pageX,M.y=p.pageY):(M.x=p.clientX,M.y=p.clientY),M=M.matrixTransform(c.getScreenCTM().inverse()),[M.x,M.y]}var P=c.getBoundingClientRect();return[p.clientX-P.left-c.clientLeft,p.clientY-P.top-c.clientTop]}e.touch=function(c,p,x){if(arguments.length<3&&(x=p,p=me().changedTouches),p){for(var M=0,C=p.length,L;M0?1:c<0?-1:0}function Vr(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function St(c){return c>1?0:c<-1?ke:Math.acos(c)}function ea(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function ka(c){return((c=Math.exp(c))-1/c)/2}function ra(c){return((c=Math.exp(c))+1/c)/2}function pn(c){return((c=Math.exp(2*c))-1)/(c+1)}function Ia(c){return(c=Math.sin(c/2))*c}var ta=Math.SQRT2,Ha=2,yr=4;e.interpolateZoom=function(c,p){var x=c[0],M=c[1],C=c[2],L=p[0],P=p[1],E=p[2],F=L-x,G=P-M,W=F*F+G*G,$,ee;if(W0&&(er=er.transition().duration(P)),er.call(Te.event)}function hr(){le&&le.domain(te.range().map(function(er){return(er-c.x)/c.k}).map(te.invert)),xe&&xe.domain(ue.range().map(function(er){return(er-c.y)/c.k}).map(ue.invert))}function dr(er){E++||er({type:"zoomstart"})}function Sr(er){hr(),er({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function pr(er){--E||(er({type:"zoomend"}),x=null)}function Tr(){var er=this,Lr=we.of(er,arguments),qr=0,Kr=e.select(i(er)).on(G,ca).on(W,La),_t=ce(e.mouse(er)),Ot=fr(er);$c.call(er),dr(Lr);function ca(){qr=1,or(e.mouse(er),_t),Sr(Lr)}function La(){Kr.on(G,null).on(W,null),Ot(qr),pr(Lr)}}function Jr(){var er=this,Lr=we.of(er,arguments),qr={},Kr=0,_t,Ot=".zoom-"+e.event.changedTouches[0].identifier,ca="touchmove"+Ot,La="touchend"+Ot,Oa=[],qa=e.select(er),Ga=fr(er);Va(),dr(Lr),qa.on(F,null).on(ee,Va);function ba(){var Yn=e.touches(er);return _t=c.k,Yn.forEach(function(va){va.identifier in qr&&(qr[va.identifier]=ce(va))}),Yn}function Va(){var Yn=e.event.target;e.select(Yn).on(ca,Jl).on(La,jF),Oa.push(Yn);for(var va=e.event.changedTouches,yn=0,vi=va.length;yn1){var Kl=gn[0],al=gn[1],rv=Kl[0]-al[0],nb=Kl[1]-al[1];Kr=rv*rv+nb*nb}}function Jl(){var Yn=e.touches(er),va,yn,vi,gn;$c.call(er);for(var ls=0,Kl=Yn.length;ls1?1:p,x=x<0?0:x>1?1:x,C=x<=.5?x*(1+p):x+p-x*p,M=2*x-C;function L(E){return E>360?E-=360:E<0&&(E+=360),E<60?M+(C-M)*E/60:E<180?C:E<240?M+(C-M)*(240-E)/60:M}function P(E){return Math.round(L(E)*255)}return new Sa(P(c+120),P(c),P(c-120))}e.hcl=aa;function aa(c,p,x){return this instanceof aa?(this.h=+c,this.c=+p,void(this.l=+x)):arguments.length<2?c instanceof aa?new aa(c.h,c.c,c.l):c instanceof Wt?Dc(c.l,c.a,c.b):Dc((c=nr((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new aa(c,p,x)}var In=aa.prototype=new Tt;In.brighter=function(c){return new aa(this.h,this.c,Math.min(100,this.l+at*(arguments.length?c:1)))},In.darker=function(c){return new aa(this.h,this.c,Math.max(0,this.l-at*(arguments.length?c:1)))},In.rgb=function(){return Hn(this.h,this.c,this.l).rgb()};function Hn(c,p,x){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new Wt(x,Math.cos(c*=Mr)*p,Math.sin(c)*p)}e.lab=Wt;function Wt(c,p,x){return this instanceof Wt?(this.l=+c,this.a=+p,void(this.b=+x)):arguments.length<2?c instanceof Wt?new Wt(c.l,c.a,c.b):c instanceof aa?Hn(c.h,c.c,c.l):nr((c=Sa(c)).r,c.g,c.b):new Wt(c,p,x)}var at=18,sa=.95047,Ul=1,Gl=1.08883,rl=Wt.prototype=new Tt;rl.brighter=function(c){return new Wt(Math.min(100,this.l+at*(arguments.length?c:1)),this.a,this.b)},rl.darker=function(c){return new Wt(Math.max(0,this.l-at*(arguments.length?c:1)),this.a,this.b)},rl.rgb=function(){return qc(this.l,this.a,this.b)};function qc(c,p,x){var M=(c+16)/116,C=M+p/500,L=M-x/200;return C=ku(C)*sa,M=ku(M)*Ul,L=ku(L)*Gl,new Sa(Su(3.2404542*C-1.5371385*M-.4985314*L),Su(-.969266*C+1.8760108*M+.041556*L),Su(.0556434*C-.2040259*M+1.0572252*L))}function Dc(c,p,x){return c>0?new aa(Math.atan2(x,p)*Ur,Math.sqrt(p*p+x*x),c):new aa(NaN,NaN,c)}function ku(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function Cu(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Su(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Sa;function Sa(c,p,x){return this instanceof Sa?(this.r=~~c,this.g=~~p,void(this.b=~~x)):arguments.length<2?c instanceof Sa?new Sa(c.r,c.g,c.b):Zr(""+c,Sa,Ca):new Sa(c,p,x)}function Ec(c){return new Sa(c>>16,c>>8&255,c&255)}function $o(c){return Ec(c)+""}var jo=Sa.prototype=new Tt;jo.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,x=this.g,M=this.b,C=30;return!p&&!x&&!M?new Sa(C,C,C):(p&&p>4,M=M>>4|M,C=F&240,C=C>>4|C,L=F&15,L=L<<4|L):c.length===7&&(M=(F&16711680)>>16,C=(F&65280)>>8,L=F&255)),p(M,C,L))}function jr(c,p,x){var M=Math.min(c/=255,p/=255,x/=255),C=Math.max(c,p,x),L=C-M,P,E,F=(C+M)/2;return L?(E=F<.5?L/(C+M):L/(2-C-M),c==C?P=(p-x)/L+(p0&&F<1?0:P),new st(P,E,F)}function nr(c,p,x){c=ua(c),p=ua(p),x=ua(x);var M=Cu((.4124564*c+.3575761*p+.1804375*x)/sa),C=Cu((.2126729*c+.7151522*p+.072175*x)/Ul),L=Cu((.0193339*c+.119192*p+.9503041*x)/Gl);return Wt(116*C-16,500*(M-C),200*(C-L))}function ua(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function ut(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var fa=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});fa.forEach(function(c,p){fa.set(c,Ec(p))});function Rr(c){return typeof c=="function"?c:function(){return c}}e.functor=Rr,e.xhr=On(J);function On(c){return function(p,x,M){return arguments.length===2&&typeof x=="function"&&(M=x,x=null),Vl(p,x,c,M)}}function Vl(c,p,x,M){var C={},L=e.dispatch("beforesend","progress","load","error"),P={},E=new XMLHttpRequest,F=null;self.XDomainRequest&&!("withCredentials"in E)&&/^(http(s)?:)?\/\//.test(c)&&(E=new XDomainRequest),"onload"in E?E.onload=E.onerror=G:E.onreadystatechange=function(){E.readyState>3&&G()};function G(){var W=E.status,$;if(!W&&rN(E)||W>=200&&W<300||W===304){try{$=x.call(C,E)}catch(ee){L.error.call(C,ee);return}L.load.call(C,$)}else L.error.call(C,E)}return E.onprogress=function(W){var $=e.event;e.event=W;try{L.progress.call(C,E)}finally{e.event=$}},C.header=function(W,$){return W=(W+"").toLowerCase(),arguments.length<2?P[W]:($==null?delete P[W]:P[W]=$+"",C)},C.mimeType=function(W){return arguments.length?(p=W==null?null:W+"",C):p},C.responseType=function(W){return arguments.length?(F=W,C):F},C.response=function(W){return x=W,C},["get","post"].forEach(function(W){C[W]=function(){return C.send.apply(C,[W].concat(t(arguments)))}}),C.send=function(W,$,ee){if(arguments.length===2&&typeof $=="function"&&(ee=$,$=null),E.open(W,c,!0),p!=null&&!("accept"in P)&&(P.accept=p+",*/*"),E.setRequestHeader)for(var he in P)E.setRequestHeader(he,P[he]);return p!=null&&E.overrideMimeType&&E.overrideMimeType(p),F!=null&&(E.responseType=F),ee!=null&&C.on("error",ee).on("load",function(we){ee(null,we)}),L.beforesend.call(C,E),E.send($==null?null:$),C},C.abort=function(){return E.abort(),C},e.rebind(C,L,"on"),M==null?C:C.get(eN(M))}function eN(c){return c.length===1?function(p,x){c(p==null?x:null)}:c}function rN(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var x=new RegExp('["'+c+` +]`),M=c.charCodeAt(0);function C(G,W,$){arguments.length<3&&($=W,W=null);var ee=Vl(G,p,W==null?L:P(W),$);return ee.row=function(he){return arguments.length?ee.response((W=he)==null?L:P(he)):W},ee}function L(G){return C.parse(G.responseText)}function P(G){return function(W){return C.parse(W.responseText,G)}}C.parse=function(G,W){var $;return C.parseRows(G,function(ee,he){if($)return $(ee,he-1);var we=function(te){for(var le={},ue=ee.length,xe=0;xe=we)return ee;if(xe)return xe=!1,$;var Ge=te;if(G.charCodeAt(Ge)===34){for(var rr=Ge;rr++24?(isFinite(p)&&(clearTimeout(Nc),Nc=setTimeout(c1,p)),zc=0):(zc=1,G3(c1))}e.timer.flush=function(){V3(),W3()};function V3(){for(var c=Date.now(),p=Pc;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function W3(){for(var c,p=Pc,x=1/0;p;)p.c?(p.t=0;--E)te.push(C[G[$[E]][2]]);for(E=+he;E1&&Vr(c[x[M-2]],c[x[M-1]],c[C])<=0;)--M;x[M++]=C}return x.slice(0,M)}function tN(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return j(c,Ic),c};var Ic=e.geom.polygon.prototype=[];Ic.area=function(){for(var c=-1,p=this.length,x,M=this[p-1],C=0;++coe)E=E.L;else if(P=p-lN(E,x),P>oe){if(!E.R){M=E;break}E=E.R}else{L>-oe?(M=E.P,C=E):P>-oe?(M=E,C=E.N):M=C=E;break}var F=Q3(c);if(ts.insert(M,F),!(!M&&!C)){if(M===C){ns(M),C=Q3(M.site),ts.insert(F,C),F.edge=C.edge=Du(M.site,F.site),as(M),as(C);return}if(!C){F.edge=Du(M.site,F.site);return}ns(M),ns(C);var G=M.site,W=G.x,$=G.y,ee=c.x-W,he=c.y-$,we=C.site,te=we.x-W,le=we.y-$,ue=2*(ee*le-he*te),xe=ee*ee+he*he,Te=te*te+le*le,ce={x:(le*xe-he*Te)/ue+W,y:(ee*Te-te*xe)/ue+$};Hc(C.edge,G,we,ce),F.edge=Du(G,c,null,ce),C.edge=Du(c,we,null,ce),as(M),as(C)}}function $3(c,p){var x=c.site,M=x.x,C=x.y,L=C-p;if(!L)return M;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,F=x.y,G=F-p;if(!G)return E;var W=E-M,$=1/L-1/G,ee=W/G;return $?(-ee+Math.sqrt(ee*ee-2*$*(W*W/(-2*G)-F+G/2+C-L/2)))/$+M:(M+E)/2}function lN(c,p){var x=c.N;if(x)return $3(x,p);var M=c.site;return M.y===p?M.x:1/0}function j3(c){this.site=c,this.edges=[]}j3.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(e5),c.length};function oN(c){for(var p=c[0][0],x=c[1][0],M=c[0][1],C=c[1][1],L,P,E,F,G=Wl,W=G.length,$,ee,he,we,te,le;W--;)if($=G[W],!(!$||!$.prepare()))for(he=$.edges,we=he.length,ee=0;eeoe||w(F-P)>oe)&&(he.splice(ee,0,new Oc(vN($.site,le,w(E-p)oe?{x:p,y:w(L-p)oe?{x:w(P-C)oe?{x,y:w(L-x)oe?{x:w(P-M)=-qe)){var ee=F*F+G*G,he=W*W+le*le,we=(le*ee-G*he)/$,te=(F*he-W*ee)/$,le=te+E,ue=K3.pop()||new sN;ue.arc=c,ue.site=C,ue.x=we+P,ue.y=le+Math.sqrt(we*we+te*te),ue.cy=le,c.circle=ue;for(var xe=null,Te=qu._;Te;)if(ue.y0)){if(te/=he,he<0){if(te<$)return;te0){if(te>ee)return;te>$&&($=te)}if(te=x-E,!(!he&&te<0)){if(te/=he,he<0){if(te>ee)return;te>$&&($=te)}else if(he>0){if(te<$)return;te0)){if(te/=we,we<0){if(te<$)return;te0){if(te>ee)return;te>$&&($=te)}if(te=M-F,!(!we&&te<0)){if(te/=we,we<0){if(te>ee)return;te>$&&($=te)}else if(we>0){if(te<$)return;te0&&(C.a={x:E+$*he,y:F+$*we}),ee<1&&(C.b={x:E+ee*he,y:F+ee*we}),C}}}}}}function fN(c){for(var p=rs,x=uN(c[0][0],c[0][1],c[1][0],c[1][1]),M=p.length,C;M--;)C=p[M],(!cN(C,c)||!x(C)||w(C.a.x-C.b.x)=L)return;if(W>ee){if(!M)M={x:we,y:P};else if(M.y>=E)return;x={x:we,y:E}}else{if(!M)M={x:we,y:E};else if(M.y1)if(W>ee){if(!M)M={x:(P-ue)/le,y:P};else if(M.y>=E)return;x={x:(E-ue)/le,y:E}}else{if(!M)M={x:(E-ue)/le,y:E};else if(M.y=L)return;x={x:L,y:le*L+ue}}else{if(!M)M={x:L,y:le*L+ue};else if(M.x=W&&ue.x<=ee&&ue.y>=$&&ue.y<=he?[[W,he],[ee,he],[ee,$],[W,$]]:[];xe.point=F[te]}),G}function E(F){return F.map(function(G,W){return{x:Math.round(M(G,W)/oe)*oe,y:Math.round(C(G,W)/oe)*oe,i:W}})}return P.links=function(F){return y1(E(F)).edges.filter(function(G){return G.l&&G.r}).map(function(G){return{source:F[G.l.i],target:F[G.r.i]}})},P.triangles=function(F){var G=[];return y1(E(F)).cells.forEach(function(W,$){for(var ee=W.site,he=W.edges.sort(e5),we=-1,te=he.length,le,ue,xe=he[te-1].edge,Te=xe.l===ee?xe.r:xe.l;++weTe&&(Te=W.x),W.y>ce&&(ce=W.y),he.push(W.x),we.push(W.y);else for(te=0;teTe&&(Te=Ge),rr>ce&&(ce=rr),he.push(Ge),we.push(rr)}var or=Te-ue,ar=ce-xe;or>ar?ce=xe+or:Te=ue+ar;function hr(pr,Tr,Jr,Lt,rt,er,Lr,qr){if(!(isNaN(Jr)||isNaN(Lt)))if(pr.leaf){var Kr=pr.x,_t=pr.y;if(Kr!=null)if(w(Kr-Jr)+w(_t-Lt)<.01)dr(pr,Tr,Jr,Lt,rt,er,Lr,qr);else{var Ot=pr.point;pr.x=pr.y=pr.point=null,dr(pr,Ot,Kr,_t,rt,er,Lr,qr),dr(pr,Tr,Jr,Lt,rt,er,Lr,qr)}else pr.x=Jr,pr.y=Lt,pr.point=Tr}else dr(pr,Tr,Jr,Lt,rt,er,Lr,qr)}function dr(pr,Tr,Jr,Lt,rt,er,Lr,qr){var Kr=(rt+Lr)*.5,_t=(er+qr)*.5,Ot=Jr>=Kr,ca=Lt>=_t,La=ca<<1|Ot;pr.leaf=!1,pr=pr.nodes[La]||(pr.nodes[La]=a5()),Ot?rt=Kr:Lr=Kr,ca?er=_t:qr=_t,hr(pr,Tr,Jr,Lt,rt,er,Lr,qr)}var Sr=a5();if(Sr.add=function(pr){hr(Sr,pr,+$(pr,++te),+ee(pr,te),ue,xe,Te,ce)},Sr.visit=function(pr){Ru(pr,Sr,ue,xe,Te,ce)},Sr.find=function(pr){return yN(Sr,pr[0],pr[1],ue,xe,Te,ce)},te=-1,p==null){for(;++teL||ee>P||he=Ge,ar=x>=rr,hr=ar<<1|or,dr=hr+4;hrx&&(L=p.slice(x,L),E[P]?E[P]+=L:E[++P]=L),(M=M[0])===(C=C[0])?E[P]?E[P]+=C:E[++P]=C:(E[++P]=null,F.push({i:P,x:Ri(M,C)})),x=x1.lastIndex;return x=0&&!(M=e.interpolators[x](c,p)););return M}e.interpolators=[function(c,p){var x=typeof p;return(x==="string"?fa.has(p.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(p)?g1:i5:p instanceof Tt?g1:Array.isArray(p)?Uc:x==="object"&&isNaN(p)?n5:Ri)(c,p)}],e.interpolateArray=Uc;function Uc(c,p){var x=[],M=[],C=c.length,L=p.length,P=Math.min(c.length,p.length),E;for(E=0;E=0?c.slice(0,p):c,M=p>=0?c.slice(p+1):"in";return x=gN.get(x)||l5,M=bN.get(M)||J,xN(M(x.apply(null,r.call(arguments,1))))};function xN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function o5(c){return function(p){return 1-c(1-p)}}function s5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function _N(c){return c*c}function wN(c){return c*c*c}function TN(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,x=p*c;return 4*(c<.5?x:3*(c-p)+x-.75)}function MN(c){return function(p){return Math.pow(p,c)}}function AN(c){return 1-Math.cos(c*sr)}function kN(c){return Math.pow(2,10*(c-1))}function CN(c){return 1-Math.sqrt(1-c*c)}function SN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/ir*Math.asin(1/c):(c=1,x=p/4),function(M){return 1+c*Math.pow(2,-10*M)*Math.sin((M-x)*ir/p)}}function LN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function qN(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=DN;function DN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,M=c.c,C=c.l,L=p.h-x,P=p.c-M,E=p.l-C;return isNaN(P)&&(P=0,M=isNaN(M)?p.c:M),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(F){return Hn(x+L*F,M+P*F,C+E*F)+""}}e.interpolateHsl=EN;function EN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,M=c.s,C=c.l,L=p.h-x,P=p.s-M,E=p.l-C;return isNaN(P)&&(P=0,M=isNaN(M)?p.s:M),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(F){return Ca(x+L*F,M+P*F,C+E*F)+""}}e.interpolateLab=PN;function PN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,M=c.a,C=c.b,L=p.l-x,P=p.a-M,E=p.b-C;return function(F){return qc(x+L*F,M+P*F,C+E*F)+""}}e.interpolateRound=u5;function u5(c,p){return p-=c,function(x){return Math.round(c+p*x)}}e.transform=function(c){var p=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(x){if(x!=null){p.setAttribute("transform",x);var M=p.transform.baseVal.consolidate()}return new f5(M?M.matrix:zN)})(c)};function f5(c){var p=[c.a,c.b],x=[c.c,c.d],M=v5(p),C=c5(p,x),L=v5(RN(x,p,-C))||0;p[0]*x[1]180?p+=360:p-c>180&&(c+=360),M.push({i:x.push(is(x)+"rotate(",null,")")-2,x:Ri(c,p)})):p&&x.push(is(x)+"rotate("+p+")")}function IN(c,p,x,M){c!==p?M.push({i:x.push(is(x)+"skewX(",null,")")-2,x:Ri(c,p)}):p&&x.push(is(x)+"skewX("+p+")")}function HN(c,p,x,M){if(c[0]!==p[0]||c[1]!==p[1]){var C=x.push(is(x)+"scale(",null,",",null,")");M.push({i:C-4,x:Ri(c[0],p[0])},{i:C-2,x:Ri(c[1],p[1])})}else(p[0]!==1||p[1]!==1)&&x.push(is(x)+"scale("+p+")")}function h5(c,p){var x=[],M=[];return c=e.transform(c),p=e.transform(p),NN(c.translate,p.translate,x,M),FN(c.rotate,p.rotate,x,M),IN(c.skew,p.skew,x,M),HN(c.scale,p.scale,x,M),c=p=null,function(C){for(var L=-1,P=M.length,E;++L0?L=ce:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):ce>0&&(p.start({type:"start",alpha:L=ce}),x=Fc(c.tick)),c):L},c.start=function(){var ce,Ge=he.length,rr=we.length,or=M[0],ar=M[1],hr,dr;for(ce=0;ce=0;)L.push(W=G[F]),W.parent=E,W.depth=E.depth+1;x&&(E.value=0),E.children=G}else x&&(E.value=+x.call(M,E,E.depth)||0),delete E.children;return ci(C,function($){var ee,he;c&&(ee=$.children)&&ee.sort(c),x&&(he=$.parent)&&(he.value+=$.value)}),P}return M.sort=function(C){return arguments.length?(c=C,M):c},M.children=function(C){return arguments.length?(p=C,M):p},M.value=function(C){return arguments.length?(x=C,M):x},M.revalue=function(C){return x&&(Nu(C,function(L){L.children&&(L.value=0)}),ci(C,function(L){var P;L.children||(L.value=+x.call(M,L,L.depth)||0),(P=L.parent)&&(P.value+=L.value)})),C},M};function zu(c,p){return e.rebind(c,p,"sort","children","value"),c.nodes=c,c.links=eF,c}function Nu(c,p){for(var x=[c];(c=x.pop())!=null;)if(p(c),(C=c.children)&&(M=C.length))for(var M,C;--M>=0;)x.push(C[M])}function ci(c,p){for(var x=[c],M=[];(c=x.pop())!=null;)if(M.push(c),(P=c.children)&&(L=P.length))for(var C=-1,L,P;++CC&&(C=E),M.push(E)}for(P=0;PM&&(x=p,M=C);return x}function oF(c){return c.reduce(sF,0)}function sF(c,p){return c+p[1]}e.layout.histogram=function(){var c=!0,p=Number,x=fF,M=uF;function C(L,ee){for(var E=[],F=L.map(p,this),G=x.call(this,F,ee),W=M.call(this,G,F,ee),$,ee=-1,he=F.length,we=W.length-1,te=c?1:1/he,le;++ee0)for(ee=-1;++ee=G[0]&&le<=G[1]&&($=E[e.bisect(W,le,1,we)-1],$.y+=te,$.push(L[ee]));return E}return C.value=function(L){return arguments.length?(p=L,C):p},C.range=function(L){return arguments.length?(x=Rr(L),C):x},C.bins=function(L){return arguments.length?(M=typeof L=="number"?function(P){return y5(P,L)}:Rr(L),C):M},C.frequency=function(L){return arguments.length?(c=!!L,C):c},C};function uF(c,p){return y5(c,Math.ceil(Math.log(p.length)/Math.LN2+1))}function y5(c,p){for(var x=-1,M=+c[0],C=(c[1]-M)/p,L=[];++x<=p;)L[x]=C*x+M;return L}function fF(c){return[e.min(c),e.max(c)]}e.layout.pack=function(){var c=e.layout.hierarchy().sort(cF),p=0,x=[1,1],M;function C(L,P){var E=c.call(this,L,P),F=E[0],G=x[0],W=x[1],$=M==null?Math.sqrt:typeof M=="function"?M:function(){return M};if(F.x=F.y=0,ci(F,function(he){he.r=+$(he.value)}),ci(F,x5),p){var ee=p*(M?1:Math.max(2*F.r/G,2*F.r/W))/2;ci(F,function(he){he.r+=ee}),ci(F,x5),ci(F,function(he){he.r-=ee})}return _5(F,G/2,W/2,M?1:1/Math.max(2*F.r/G,2*F.r/W)),E}return C.size=function(L){return arguments.length?(x=L,C):x},C.radius=function(L){return arguments.length?(M=L==null||typeof L=="function"?L:+L,C):M},C.padding=function(L){return arguments.length?(p=+L,C):p},zu(C,c)};function cF(c,p){return c.value-p.value}function T1(c,p){var x=c._pack_next;c._pack_next=p,p._pack_prev=c,p._pack_next=x,x._pack_prev=p}function g5(c,p){c._pack_next=p,p._pack_prev=c}function b5(c,p){var x=p.x-c.x,M=p.y-c.y,C=c.r+p.r;return .999*C*C>x*x+M*M}function x5(c){if(!(p=c.children)||!(ee=p.length))return;var p,x=1/0,M=-1/0,C=1/0,L=-1/0,P,E,F,G,W,$,ee;function he(ce){x=Math.min(ce.x-ce.r,x),M=Math.max(ce.x+ce.r,M),C=Math.min(ce.y-ce.r,C),L=Math.max(ce.y+ce.r,L)}if(p.forEach(vF),P=p[0],P.x=-P.r,P.y=0,he(P),ee>1&&(E=p[1],E.x=E.r,E.y=0,he(E),ee>2))for(F=p[2],w5(P,E,F),he(F),T1(P,F),P._pack_prev=F,T1(F,E),E=P._pack_next,G=3;Gle.x&&(le=Ge),Ge.depth>ue.depth&&(ue=Ge)});var xe=p(te,le)/2-te.x,Te=x[0]/(le.x+p(le,te)/2+xe),ce=x[1]/(ue.depth||1);Nu(he,function(Ge){Ge.x=(Ge.x+xe)*Te,Ge.y=Ge.depth*ce})}return ee}function L(W){for(var $={A:null,children:[W]},ee=[$],he;(he=ee.pop())!=null;)for(var we=he.children,te,le=0,ue=we.length;le0&&(dF(mF(te,W,ee),W,Ge),ue+=Ge,xe+=Ge),Te+=te.m,ue+=he.m,ce+=le.m,xe+=we.m;te&&!A1(we)&&(we.t=te,we.m+=Te-xe),he&&!M1(le)&&(le.t=he,le.m+=ue-ce,ee=W)}return ee}function G(W){W.x*=x[0],W.y=W.depth*x[1]}return C.separation=function(W){return arguments.length?(p=W,C):p},C.size=function(W){return arguments.length?(M=(x=W)==null?G:null,C):M?null:x},C.nodeSize=function(W){return arguments.length?(M=(x=W)==null?null:G,C):M?x:null},zu(C,c)};function T5(c,p){return c.parent==p.parent?1:2}function M1(c){var p=c.children;return p.length?p[0]:c.t}function A1(c){var p=c.children,x;return(x=p.length)?p[x-1]:c.t}function dF(c,p,x){var M=x/(p.i-c.i);p.c-=M,p.s+=x,c.c+=M,p.z+=x,p.m+=x}function pF(c){for(var p=0,x=0,M=c.children,C=M.length,L;--C>=0;)L=M[C],L.z+=p,L.m+=p,p+=L.s+(x+=L.c)}function mF(c,p,x){return c.a.parent===p.parent?c.a:x}e.layout.cluster=function(){var c=e.layout.hierarchy().sort(null).value(null),p=T5,x=[1,1],M=!1;function C(L,P){var E=c.call(this,L,P),F=E[0],G,W=0;ci(F,function(te){var le=te.children;le&&le.length?(te.x=gF(le),te.y=yF(le)):(te.x=G?W+=p(te,G):0,te.y=0,G=te)});var $=M5(F),ee=A5(F),he=$.x-p($,ee)/2,we=ee.x+p(ee,$)/2;return ci(F,M?function(te){te.x=(te.x-F.x)*x[0],te.y=(F.y-te.y)*x[1]}:function(te){te.x=(te.x-he)/(we-he)*x[0],te.y=(1-(F.y?te.y/F.y:1))*x[1]}),E}return C.separation=function(L){return arguments.length?(p=L,C):p},C.size=function(L){return arguments.length?(M=(x=L)==null,C):M?null:x},C.nodeSize=function(L){return arguments.length?(M=(x=L)!=null,C):M?x:null},zu(C,c)};function yF(c){return 1+e.max(c,function(p){return p.y})}function gF(c){return c.reduce(function(p,x){return p+x.x},0)/c.length}function M5(c){var p=c.children;return p&&p.length?M5(p[0]):c}function A5(c){var p=c.children,x;return p&&(x=p.length)?A5(p[x-1]):c}e.layout.treemap=function(){var c=e.layout.hierarchy(),p=Math.round,x=[1,1],M=null,C=k1,L=!1,P,E="squarify",F=.5*(1+Math.sqrt(5));function G(te,le){for(var ue=-1,xe=te.length,Te,ce;++ue0;)xe.push(ce=Te[ar-1]),xe.area+=ce.area,E!=="squarify"||(rr=ee(xe,or))<=Ge?(Te.pop(),Ge=rr):(xe.area-=xe.pop().area,he(xe,or,ue,!1),or=Math.min(ue.dx,ue.dy),xe.length=xe.area=0,Ge=1/0);xe.length&&(he(xe,or,ue,!0),xe.length=xe.area=0),le.forEach(W)}}function $(te){var le=te.children;if(le&&le.length){var ue=C(te),xe=le.slice(),Te,ce=[];for(G(xe,ue.dx*ue.dy/te.value),ce.area=0;Te=xe.pop();)ce.push(Te),ce.area+=Te.area,Te.z!=null&&(he(ce,Te.z?ue.dx:ue.dy,ue,!xe.length),ce.length=ce.area=0);le.forEach($)}}function ee(te,le){for(var ue=te.area,xe,Te=0,ce=1/0,Ge=-1,rr=te.length;++GeTe&&(Te=xe));return ue*=ue,le*=le,ue?Math.max(le*Te*F/ue,ue/(le*ce*F)):1/0}function he(te,le,ue,xe){var Te=-1,ce=te.length,Ge=ue.x,rr=ue.y,or=le?p(te.area/le):0,ar;if(le==ue.dx){for((xe||or>ue.dy)&&(or=ue.dy);++Teue.dx)&&(or=ue.dx);++Te1);return c+p*M*Math.sqrt(-2*Math.log(L)/L)}},logNormal:function(){var c=e.random.normal.apply(e,arguments);return function(){return Math.exp(c())}},bates:function(c){var p=e.random.irwinHall(c);return function(){return p()/c}},irwinHall:function(c){return function(){for(var p=0,x=0;x2?_F:bF,G=M?BN:ON;return C=F(c,p,G,x),L=F(p,c,G,Zl),E}function E(F){return C(F)}return E.invert=function(F){return L(F)},E.domain=function(F){return arguments.length?(c=F.map(Number),P()):c},E.range=function(F){return arguments.length?(p=F,P()):p},E.rangeRound=function(F){return E.range(F).interpolate(u5)},E.clamp=function(F){return arguments.length?(M=F,P()):M},E.interpolate=function(F){return arguments.length?(x=F,P()):x},E.ticks=function(F){return L1(c,F)},E.tickFormat=function(F,G){return d3_scale_linearTickFormat(c,F,G)},E.nice=function(F){return q5(c,F),P()},E.copy=function(){return S5(c,p,x,M)},P()}function L5(c,p){return e.rebind(c,p,"range","rangeRound","interpolate","clamp")}function q5(c,p){return C1(c,C5(S1(c,p)[2])),C1(c,C5(S1(c,p)[2])),c}function S1(c,p){p==null&&(p=10);var x=Gc(c),M=x[1]-x[0],C=Math.pow(10,Math.floor(Math.log(M/p)/Math.LN10)),L=p/M*C;return L<=.15?C*=10:L<=.35?C*=5:L<=.75&&(C*=2),x[0]=Math.ceil(x[0]/C)*C,x[1]=Math.floor(x[1]/C)*C+C*.5,x[2]=C,x}function L1(c,p){return e.range.apply(e,S1(c,p))}var wF={s:1,g:1,p:1,r:1,e:1};function D5(c){return-Math.floor(Math.log(c)/Math.LN10+.01)}function nie(c,p){var x=D5(p[2]);return c in wF?Math.abs(x-D5(Math.max(w(p[0]),w(p[1]))))+ +(c!=="e"):x-(c==="%")*2}e.scale.log=function(){return E5(e.scale.linear().domain([0,1]),10,!0,[1,10])};function E5(c,p,x,M){function C(E){return(x?Math.log(E<0?0:E):-Math.log(E>0?0:-E))/Math.log(p)}function L(E){return x?Math.pow(p,E):-Math.pow(p,-E)}function P(E){return c(C(E))}return P.invert=function(E){return L(c.invert(E))},P.domain=function(E){return arguments.length?(x=E[0]>=0,c.domain((M=E.map(Number)).map(C)),P):M},P.base=function(E){return arguments.length?(p=+E,c.domain(M.map(C)),P):p},P.nice=function(){var E=C1(M.map(C),x?Math:TF);return c.domain(E),M=E.map(L),P},P.ticks=function(){var E=Gc(M),F=[],G=E[0],W=E[1],$=Math.floor(C(G)),ee=Math.ceil(C(W)),he=p%1?2:p;if(isFinite(ee-$)){if(x){for(;$0;we--)F.push(L($)*we);for($=0;F[$]W;ee--);F=F.slice($,ee)}return F},P.copy=function(){return E5(c.copy(),p,x,M)},L5(P,c)}var TF={floor:function(c){return-Math.ceil(-c)},ceil:function(c){return-Math.floor(-c)}};e.scale.pow=function(){return P5(e.scale.linear(),1,[0,1])};function P5(c,p,x){var M=Wc(p),C=Wc(1/p);function L(P){return c(M(P))}return L.invert=function(P){return C(c.invert(P))},L.domain=function(P){return arguments.length?(c.domain((x=P.map(Number)).map(M)),L):x},L.ticks=function(P){return L1(x,P)},L.tickFormat=function(P,E){return d3_scale_linearTickFormat(x,P,E)},L.nice=function(P){return L.domain(q5(x,P))},L.exponent=function(P){return arguments.length?(M=Wc(p=P),C=Wc(1/p),c.domain(x.map(M)),L):p},L.copy=function(){return P5(c.copy(),p,x)},L5(L,c)}function Wc(c){return function(p){return p<0?-Math.pow(-p,c):Math.pow(p,c)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return R5([],{t:"range",a:[[]]})};function R5(c,p){var x,M,C;function L(E){return M[((x.get(E)||(p.t==="range"?x.set(E,c.push(E)):NaN))-1)%M.length]}function P(E,F){return e.range(c.length).map(function(G){return E+F*G})}return L.domain=function(E){if(!arguments.length)return c;c=[],x=new b;for(var F=-1,G=E.length,W;++F0?x[L-1]:c[0],Lee?0:1;if(W=vr)return F(W,we)+(G?F(G,1-we):"")+"Z";var te,le,ue,xe,Te=0,ce=0,Ge,rr,or,ar,hr,dr,Sr,pr,Tr=[];if((xe=(+P.apply(this,arguments)||0)/2)&&(ue=M===Zc?Math.sqrt(G*G+W*W):+M.apply(this,arguments),we||(ce*=-1),W&&(ce=ea(ue/W*Math.sin(xe))),G&&(Te=ea(ue/G*Math.sin(xe)))),W){Ge=W*Math.cos($+ce),rr=W*Math.sin($+ce),or=W*Math.cos(ee-ce),ar=W*Math.sin(ee-ce);var Jr=Math.abs(ee-$-2*ce)<=ke?0:1;if(ce&&Xc(Ge,rr,or,ar)===we^Jr){var Lt=($+ee)/2;Ge=W*Math.cos(Lt),rr=W*Math.sin(Lt),or=ar=null}}else Ge=rr=0;if(G){hr=G*Math.cos(ee-Te),dr=G*Math.sin(ee-Te),Sr=G*Math.cos($+Te),pr=G*Math.sin($+Te);var rt=Math.abs($-ee+2*Te)<=ke?0:1;if(Te&&Xc(hr,dr,Sr,pr)===1-we^rt){var er=($+ee)/2;hr=G*Math.cos(er),dr=G*Math.sin(er),Sr=pr=null}}else hr=dr=0;if(he>oe&&(te=Math.min(Math.abs(W-G)/2,+x.apply(this,arguments)))>.001){le=G0?0:1}function Jc(c,p,x,M,C){var L=c[0]-p[0],P=c[1]-p[1],E=(C?M:-M)/Math.sqrt(L*L+P*P),F=E*P,G=-E*L,W=c[0]+F,$=c[1]+G,ee=p[0]+F,he=p[1]+G,we=(W+ee)/2,te=($+he)/2,le=ee-W,ue=he-$,xe=le*le+ue*ue,Te=x-M,ce=W*he-ee*$,Ge=(ue<0?-1:1)*Math.sqrt(Math.max(0,Te*Te*xe-ce*ce)),rr=(ce*ue-le*Ge)/xe,or=(-ce*le-ue*Ge)/xe,ar=(ce*ue+le*Ge)/xe,hr=(-ce*le+ue*Ge)/xe,dr=rr-we,Sr=or-te,pr=ar-we,Tr=hr-te;return dr*dr+Sr*Sr>pr*pr+Tr*Tr&&(rr=ar,or=hr),[[rr-F,or-G],[rr*x/Te,or*x/Te]]}function B5(){return!0}function Y5(c){var p=es,x=Lu,M=B5,C=Bn,L=C.key,P=.7;function E(F){var G=[],W=[],$=-1,ee=F.length,he,we=Rr(p),te=Rr(x);function le(){G.push("M",C(c(W),P))}for(;++$1?c.join("L"):c+"Z"}function U5(c){return c.join("L")+"Z"}function EF(c){for(var p=0,x=c.length,M=c[0],C=[M[0],",",M[1]];++p1&&C.push("H",M[0]),C.join("")}function D1(c){for(var p=0,x=c.length,M=c[0],C=[M[0],",",M[1]];++p1){E=p[1],L=c[F],F++,M+="C"+(C[0]+P[0])+","+(C[1]+P[1])+","+(L[0]-E[0])+","+(L[1]-E[1])+","+L[0]+","+L[1];for(var G=2;G9&&(L=x*3/Math.sqrt(L),P[E]=L*M,P[E+1]=L*C));for(E=-1;++E<=F;)L=(c[Math.min(F,E+1)][0]-c[Math.max(0,E-1)][0])/(6*(1+P[E]*P[E])),p.push([L||0,P[E]*L||0]);return p}function BF(c){return c.length<3?Bn(c):c[0]+Kc(c,OF(c))}e.svg.line.radial=function(){var c=Y5(Z5);return c.radius=c.x,delete c.x,c.angle=c.y,delete c.y,c};function Z5(c){for(var p,x=-1,M=c.length,C,L;++xke)+",1 "+$}function G(W,$,ee,he){return"Q 0,0 "+he}return L.radius=function(W){return arguments.length?(x=Rr(W),L):x},L.source=function(W){return arguments.length?(c=Rr(W),L):c},L.target=function(W){return arguments.length?(p=Rr(W),L):p},L.startAngle=function(W){return arguments.length?(M=Rr(W),L):M},L.endAngle=function(W){return arguments.length?(C=Rr(W),L):C},L};function YF(c){return c.radius}e.svg.diagonal=function(){var c=J5,p=K5,x=Q5;function M(C,L){var P=c.call(this,C,L),E=p.call(this,C,L),F=(P.y+E.y)/2,G=[P,{x:P.x,y:F},{x:E.x,y:F},E];return G=G.map(x),"M"+G[0]+"C"+G[1]+" "+G[2]+" "+G[3]}return M.source=function(C){return arguments.length?(c=Rr(C),M):c},M.target=function(C){return arguments.length?(p=Rr(C),M):p},M.projection=function(C){return arguments.length?(x=C,M):x},M};function Q5(c){return[c.x,c.y]}e.svg.diagonal.radial=function(){var c=e.svg.diagonal(),p=Q5,x=c.projection;return c.projection=function(M){return arguments.length?x(UF(p=M)):p},c};function UF(c){return function(){var p=c.apply(this,arguments),x=p[0],M=p[1]-sr;return[x*Math.cos(M),x*Math.sin(M)]}}e.svg.symbol=function(){var c=VF,p=GF;function x(M,C){return(j5.get(c.call(this,M,C))||$5)(p.call(this,M,C))}return x.type=function(M){return arguments.length?(c=Rr(M),x):c},x.size=function(M){return arguments.length?(p=Rr(M),x):p},x};function GF(){return 64}function VF(){return"circle"}function $5(c){var p=Math.sqrt(c/ke);return"M0,"+p+"A"+p+","+p+" 0 1,1 0,"+-p+"A"+p+","+p+" 0 1,1 0,"+p+"Z"}var j5=e.map({circle:$5,cross:function(c){var p=Math.sqrt(c/5)/2;return"M"+-3*p+","+-p+"H"+-p+"V"+-3*p+"H"+p+"V"+-p+"H"+3*p+"V"+p+"H"+p+"V"+3*p+"H"+-p+"V"+p+"H"+-3*p+"Z"},diamond:function(c){var p=Math.sqrt(c/(2*eb)),x=p*eb;return"M0,"+-p+"L"+x+",0 0,"+p+" "+-x+",0Z"},square:function(c){var p=Math.sqrt(c)/2;return"M"+-p+","+-p+"L"+p+","+-p+" "+p+","+p+" "+-p+","+p+"Z"},"triangle-down":function(c){var p=Math.sqrt(c/Qc),x=p*Qc/2;return"M0,"+x+"L"+p+","+-x+" "+-p+","+-x+"Z"},"triangle-up":function(c){var p=Math.sqrt(c/Qc),x=p*Qc/2;return"M0,"+-x+"L"+p+","+x+" "+-p+","+x+"Z"}});e.svg.symbolTypes=j5.keys();var Qc=Math.sqrt(3),eb=Math.tan(30*Mr);Ae.transition=function(c){for(var p=Xl||++tb,x=F1(c),M=[],C,L,P=jc||{time:Date.now(),ease:TN,delay:0,duration:250},E=-1,F=this.length;++E0;)$[--xe].call(c,ue);if(le>=1)return P.event&&P.event.end.call(c,c.__data__,p),--L.count?delete L[M]:delete c[x],1}P||(E=C.time,F=Fc(ee,0,E),P=L[M]={tween:new b,time:E,timer:F,delay:C.delay,duration:C.duration,ease:C.ease,index:p},C=null,++L.count)}e.svg.axis=function(){var c=e.scale.linear(),p=ab,x=6,M=6,C=3,L=[10],P=null,E;function F(G){G.each(function(){var W=e.select(this),$=this.__chart__||c,ee=this.__chart__=c.copy(),he=P==null?ee.ticks?ee.ticks.apply(ee,L):ee.domain():P,we=E==null?ee.tickFormat?ee.tickFormat.apply(ee,L):J:E,te=W.selectAll(".tick").data(he,ee),le=te.enter().insert("g",".domain").attr("class","tick").style("opacity",oe),ue=e.transition(te.exit()).style("opacity",oe).remove(),xe=e.transition(te.order()).style("opacity",1),Te=Math.max(x,0)+C,ce,Ge=Vc(ee),rr=W.selectAll(".domain").data([0]),or=(rr.enter().append("path").attr("class","domain"),e.transition(rr));le.append("line"),le.append("text");var ar=le.select("line"),hr=xe.select("line"),dr=te.select("text").text(we),Sr=le.select("text"),pr=xe.select("text"),Tr=p==="top"||p==="left"?-1:1,Jr,Lt,rt,er;if(p==="bottom"||p==="top"?(ce=XF,Jr="x",rt="y",Lt="x2",er="y2",dr.attr("dy",Tr<0?"0em":".71em").style("text-anchor","middle"),or.attr("d","M"+Ge[0]+","+Tr*M+"V0H"+Ge[1]+"V"+Tr*M)):(ce=JF,Jr="y",rt="x",Lt="y2",er="x2",dr.attr("dy",".32em").style("text-anchor",Tr<0?"end":"start"),or.attr("d","M"+Tr*M+","+Ge[0]+"H0V"+Ge[1]+"H"+Tr*M)),ar.attr(er,Tr*x),Sr.attr(rt,Tr*Te),hr.attr(Lt,0).attr(er,Tr*x),pr.attr(Jr,0).attr(rt,Tr*Te),ee.rangeBand){var Lr=ee,qr=Lr.rangeBand()/2;$=ee=function(Kr){return Lr(Kr)+qr}}else $.rangeBand?$=ee:ue.call(ce,ee,$);le.call(ce,$,ee),xe.call(ce,ee,ee)})}return F.scale=function(G){return arguments.length?(c=G,F):c},F.orient=function(G){return arguments.length?(p=G in ZF?G+"":ab,F):p},F.ticks=function(){return arguments.length?(L=t(arguments),F):L},F.tickValues=function(G){return arguments.length?(P=G,F):P},F.tickFormat=function(G){return arguments.length?(E=G,F):E},F.tickSize=function(G){var W=arguments.length;return W?(x=+G,M=+arguments[W-1],F):x},F.innerTickSize=function(G){return arguments.length?(x=+G,F):x},F.outerTickSize=function(G){return arguments.length?(M=+G,F):M},F.tickPadding=function(G){return arguments.length?(C=+G,F):C},F.tickSubdivide=function(){return arguments.length&&F},F};var ab="bottom",ZF={top:1,right:1,bottom:1,left:1};function XF(c,p,x){c.attr("transform",function(M){var C=p(M);return"translate("+(isFinite(C)?C:x(M))+",0)"})}function JF(c,p,x){c.attr("transform",function(M){var C=p(M);return"translate(0,"+(isFinite(C)?C:x(M))+")"})}e.svg.brush=function(){var c=pe(W,"brushstart","brush","brushend"),p=null,x=null,M=[0,0],C=[0,0],L,P,E=!0,F=!0,G=I1[0];function W(te){te.each(function(){var le=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",we).on("touchstart.brush",we),ue=le.selectAll(".background").data([0]);ue.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),le.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var xe=le.selectAll(".resize").data(G,J);xe.exit().remove(),xe.enter().append("g").attr("class",function(rr){return"resize "+rr}).style("cursor",function(rr){return KF[rr]}).append("rect").attr("x",function(rr){return/[ew]$/.test(rr)?-3:null}).attr("y",function(rr){return/^[ns]/.test(rr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),xe.style("display",W.empty()?"none":null);var Te=e.transition(le),ce=e.transition(ue),Ge;p&&(Ge=Vc(p),ce.attr("x",Ge[0]).attr("width",Ge[1]-Ge[0]),ee(Te)),x&&(Ge=Vc(x),ce.attr("y",Ge[0]).attr("height",Ge[1]-Ge[0]),he(Te)),$(Te)})}W.event=function(te){te.each(function(){var le=c.of(this,arguments),ue={x:M,y:C,i:L,j:P},xe=this.__chart__||ue;this.__chart__=ue,Xl?e.select(this).transition().each("start.brush",function(){L=xe.i,P=xe.j,M=xe.x,C=xe.y,le({type:"brushstart"})}).tween("brush:brush",function(){var Te=Uc(M,ue.x),ce=Uc(C,ue.y);return L=P=null,function(Ge){M=ue.x=Te(Ge),C=ue.y=ce(Ge),le({type:"brush",mode:"resize"})}}).each("end.brush",function(){L=ue.i,P=ue.j,le({type:"brush",mode:"resize"}),le({type:"brushend"})}):(le({type:"brushstart"}),le({type:"brush",mode:"resize"}),le({type:"brushend"}))})};function $(te){te.selectAll(".resize").attr("transform",function(le){return"translate("+M[+/e$/.test(le)]+","+C[+/^s/.test(le)]+")"})}function ee(te){te.select(".extent").attr("x",M[0]),te.selectAll(".extent,.n>rect,.s>rect").attr("width",M[1]-M[0])}function he(te){te.select(".extent").attr("y",C[0]),te.selectAll(".extent,.e>rect,.w>rect").attr("height",C[1]-C[0])}function we(){var te=this,le=e.select(e.event.target),ue=c.of(te,arguments),xe=e.select(te),Te=le.datum(),ce=!/^(n|s)$/.test(Te)&&p,Ge=!/^(e|w)$/.test(Te)&&x,rr=le.classed("extent"),or=fr(te),ar,hr=e.mouse(te),dr,Sr=e.select(i(te)).on("keydown.brush",Jr).on("keyup.brush",Lt);if(e.event.changedTouches?Sr.on("touchmove.brush",rt).on("touchend.brush",Lr):Sr.on("mousemove.brush",rt).on("mouseup.brush",Lr),xe.interrupt().selectAll("*").interrupt(),rr)hr[0]=M[0]-hr[0],hr[1]=C[0]-hr[1];else if(Te){var pr=+/w$/.test(Te),Tr=+/^n/.test(Te);dr=[M[1-pr]-hr[0],C[1-Tr]-hr[1]],hr[0]=M[pr],hr[1]=C[Tr]}else e.event.altKey&&(ar=hr.slice());xe.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",le.style("cursor")),ue({type:"brushstart"}),rt();function Jr(){e.event.keyCode==32&&(rr||(ar=null,hr[0]-=M[1],hr[1]-=C[1],rr=2),ie())}function Lt(){e.event.keyCode==32&&rr==2&&(hr[0]+=M[1],hr[1]+=C[1],rr=0,ie())}function rt(){var qr=e.mouse(te),Kr=!1;dr&&(qr[0]+=dr[0],qr[1]+=dr[1]),rr||(e.event.altKey?(ar||(ar=[(M[0]+M[1])/2,(C[0]+C[1])/2]),hr[0]=M[+(qr[0]{(function(e,r){typeof iv=="object"&&typeof fb!="undefined"?r(iv):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(iv,function(e){"use strict";var r=new Date,t=new Date;function a(ne,Me,Ce,cr){function tr(De){return ne(De=arguments.length===0?new Date:new Date(+De)),De}return tr.floor=function(De){return ne(De=new Date(+De)),De},tr.ceil=function(De){return ne(De=new Date(De-1)),Me(De,1),ne(De),De},tr.round=function(De){var Le=tr(De),Ye=tr.ceil(De);return De-Le0))return Ze;do Ze.push(Ue=new Date(+De)),Me(De,Ye),ne(De);while(Ue=Le)for(;ne(Le),!De(Le);)Le.setTime(Le-1)},function(Le,Ye){if(Le>=Le)if(Ye<0)for(;++Ye<=0;)for(;Me(Le,-1),!De(Le););else for(;--Ye>=0;)for(;Me(Le,1),!De(Le););})},Ce&&(tr.count=function(De,Le){return r.setTime(+De),t.setTime(+Le),ne(r),ne(t),Math.floor(Ce(r,t))},tr.every=function(De){return De=Math.floor(De),!isFinite(De)||!(De>0)?null:De>1?tr.filter(cr?function(Le){return cr(Le)%De===0}:function(Le){return tr.count(0,Le)%De===0}):tr}),tr}var n=a(function(){},function(ne,Me){ne.setTime(+ne+Me)},function(ne,Me){return Me-ne});n.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?a(function(Me){Me.setTime(Math.floor(Me/ne)*ne)},function(Me,Ce){Me.setTime(+Me+Ce*ne)},function(Me,Ce){return(Ce-Me)/ne}):n};var i=n.range,l=1e3,o=6e4,s=36e5,u=864e5,f=6048e5,v=a(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,Me){ne.setTime(+ne+Me*l)},function(ne,Me){return(Me-ne)/l},function(ne){return ne.getUTCSeconds()}),h=v.range,d=a(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*l)},function(ne,Me){ne.setTime(+ne+Me*o)},function(ne,Me){return(Me-ne)/o},function(ne){return ne.getMinutes()}),m=d.range,g=a(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*l-ne.getMinutes()*o)},function(ne,Me){ne.setTime(+ne+Me*s)},function(ne,Me){return(Me-ne)/s},function(ne){return ne.getHours()}),y=g.range,w=a(function(ne){ne.setHours(0,0,0,0)},function(ne,Me){ne.setDate(ne.getDate()+Me)},function(ne,Me){return(Me-ne-(Me.getTimezoneOffset()-ne.getTimezoneOffset())*o)/u},function(ne){return ne.getDate()-1}),_=w.range;function T(ne){return a(function(Me){Me.setDate(Me.getDate()-(Me.getDay()+7-ne)%7),Me.setHours(0,0,0,0)},function(Me,Ce){Me.setDate(Me.getDate()+Ce*7)},function(Me,Ce){return(Ce-Me-(Ce.getTimezoneOffset()-Me.getTimezoneOffset())*o)/f})}var b=T(0),A=T(1),S=T(2),k=T(3),q=T(4),D=T(5),R=T(6),z=b.range,N=A.range,H=S.range,O=k.range,J=q.range,X=D.range,B=R.range,I=a(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,Me){ne.setMonth(ne.getMonth()+Me)},function(ne,Me){return Me.getMonth()-ne.getMonth()+(Me.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),V=I.range,K=a(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,Me){ne.setFullYear(ne.getFullYear()+Me)},function(ne,Me){return Me.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});K.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:a(function(Me){Me.setFullYear(Math.floor(Me.getFullYear()/ne)*ne),Me.setMonth(0,1),Me.setHours(0,0,0,0)},function(Me,Ce){Me.setFullYear(Me.getFullYear()+Ce*ne)})};var Q=K.range,ie=a(function(ne){ne.setUTCSeconds(0,0)},function(ne,Me){ne.setTime(+ne+Me*o)},function(ne,Me){return(Me-ne)/o},function(ne){return ne.getUTCMinutes()}),me=ie.range,pe=a(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,Me){ne.setTime(+ne+Me*s)},function(ne,Me){return(Me-ne)/s},function(ne){return ne.getUTCHours()}),ge=pe.range,j=a(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,Me){ne.setUTCDate(ne.getUTCDate()+Me)},function(ne,Me){return(Me-ne)/u},function(ne){return ne.getUTCDate()-1}),_e=j.range;function se(ne){return a(function(Me){Me.setUTCDate(Me.getUTCDate()-(Me.getUTCDay()+7-ne)%7),Me.setUTCHours(0,0,0,0)},function(Me,Ce){Me.setUTCDate(Me.getUTCDate()+Ce*7)},function(Me,Ce){return(Ce-Me)/f})}var Se=se(0),ve=se(1),Ae=se(2),Y=se(3),re=se(4),U=se(5),de=se(6),be=Se.range,ye=ve.range,Fe=Ae.range,Re=Y.range,Pe=re.range,Ie=U.range,Be=de.range,Ne=a(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,Me){ne.setUTCMonth(ne.getUTCMonth()+Me)},function(ne,Me){return Me.getUTCMonth()-ne.getUTCMonth()+(Me.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),Ee=Ne.range,Je=a(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,Me){ne.setUTCFullYear(ne.getUTCFullYear()+Me)},function(ne,Me){return Me.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});Je.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:a(function(Me){Me.setUTCFullYear(Math.floor(Me.getUTCFullYear()/ne)*ne),Me.setUTCMonth(0,1),Me.setUTCHours(0,0,0,0)},function(Me,Ce){Me.setUTCFullYear(Me.getUTCFullYear()+Ce*ne)})};var We=Je.range;e.timeDay=w,e.timeDays=_,e.timeFriday=D,e.timeFridays=X,e.timeHour=g,e.timeHours=y,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=m,e.timeMonday=A,e.timeMondays=N,e.timeMonth=I,e.timeMonths=V,e.timeSaturday=R,e.timeSaturdays=B,e.timeSecond=v,e.timeSeconds=h,e.timeSunday=b,e.timeSundays=z,e.timeThursday=q,e.timeThursdays=J,e.timeTuesday=S,e.timeTuesdays=H,e.timeWednesday=k,e.timeWednesdays=O,e.timeWeek=b,e.timeWeeks=z,e.timeYear=K,e.timeYears=Q,e.utcDay=j,e.utcDays=_e,e.utcFriday=U,e.utcFridays=Ie,e.utcHour=pe,e.utcHours=ge,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=ie,e.utcMinutes=me,e.utcMonday=ve,e.utcMondays=ye,e.utcMonth=Ne,e.utcMonths=Ee,e.utcSaturday=de,e.utcSaturdays=Be,e.utcSecond=v,e.utcSeconds=h,e.utcSunday=Se,e.utcSundays=be,e.utcThursday=re,e.utcThursdays=Pe,e.utcTuesday=Ae,e.utcTuesdays=Fe,e.utcWednesday=Y,e.utcWednesdays=Re,e.utcWeek=Se,e.utcWeeks=be,e.utcYear=Je,e.utcYears=We,Object.defineProperty(e,"__esModule",{value:!0})})});var os=Z((lv,cb)=>{(function(e,r){typeof lv=="object"&&typeof cb!="undefined"?r(lv,H1()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(lv,function(e,r){"use strict";function t(ae){if(0<=ae.y&&ae.y<100){var oe=new Date(-1,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L);return oe.setFullYear(ae.y),oe}return new Date(ae.y,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L)}function a(ae){if(0<=ae.y&&ae.y<100){var oe=new Date(Date.UTC(-1,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L));return oe.setUTCFullYear(ae.y),oe}return new Date(Date.UTC(ae.y,ae.m,ae.d,ae.H,ae.M,ae.S,ae.L))}function n(ae,oe,qe){return{y:ae,m:oe,d:qe,H:0,M:0,S:0,L:0}}function i(ae){var oe=ae.dateTime,qe=ae.date,ke=ae.time,ir=ae.periods,vr=ae.days,sr=ae.shortDays,Mr=ae.months,Ur=ae.shortMonths,$r=h(ir),Vr=d(ir),St=h(vr),ea=d(vr),ka=h(sr),ra=d(sr),pn=h(Mr),Ia=d(Mr),ta=h(Ur),Ha=d(Ur),yr={a:Ul,A:Gl,b:rl,B:qc,c:null,d:I,e:I,f:me,H:V,I:K,j:Q,L:ie,m:pe,M:ge,p:Dc,q:ku,Q:Le,s:Ye,S:j,u:_e,U:se,V:Se,w:ve,W:Ae,x:null,X:null,y:Y,Y:re,Z:U,"%":De},ot={a:Cu,A:Su,b:Sa,B:Ec,c:null,d:de,e:de,f:Pe,H:be,I:ye,j:Fe,L:Re,m:Ie,M:Be,p:$o,q:jo,Q:Le,s:Ye,S:Ne,u:Ee,U:Je,V:We,w:ne,W:Me,x:null,X:null,y:Ce,Y:cr,Z:tr,"%":De},Wr={a:Ca,A:aa,b:In,B:Hn,c:Wt,d:q,e:q,f:O,H:R,I:R,j:D,L:H,m:k,M:z,p:yt,q:S,Q:X,s:B,S:N,u:g,U:y,V:w,w:m,W:_,x:at,X:sa,y:b,Y:T,Z:A,"%":J};yr.x=mt(qe,yr),yr.X=mt(ke,yr),yr.c=mt(oe,yr),ot.x=mt(qe,ot),ot.X=mt(ke,ot),ot.c=mt(oe,ot);function mt(mr,Zr){return function(jr){var nr=[],ua=-1,ut=0,fa=mr.length,Rr,On,Vl;for(jr instanceof Date||(jr=new Date(+jr));++ua53)return null;"w"in nr||(nr.w=1),"Z"in nr?(ut=a(n(nr.y,0,1)),fa=ut.getUTCDay(),ut=fa>4||fa===0?r.utcMonday.ceil(ut):r.utcMonday(ut),ut=r.utcDay.offset(ut,(nr.V-1)*7),nr.y=ut.getUTCFullYear(),nr.m=ut.getUTCMonth(),nr.d=ut.getUTCDate()+(nr.w+6)%7):(ut=t(n(nr.y,0,1)),fa=ut.getDay(),ut=fa>4||fa===0?r.timeMonday.ceil(ut):r.timeMonday(ut),ut=r.timeDay.offset(ut,(nr.V-1)*7),nr.y=ut.getFullYear(),nr.m=ut.getMonth(),nr.d=ut.getDate()+(nr.w+6)%7)}else("W"in nr||"U"in nr)&&("w"in nr||(nr.w="u"in nr?nr.u%7:"W"in nr?1:0),fa="Z"in nr?a(n(nr.y,0,1)).getUTCDay():t(n(nr.y,0,1)).getDay(),nr.m=0,nr.d="W"in nr?(nr.w+6)%7+nr.W*7-(fa+5)%7:nr.w+nr.U*7-(fa+6)%7);return"Z"in nr?(nr.H+=nr.Z/100|0,nr.M+=nr.Z%100,a(nr)):t(nr)}}function st(mr,Zr,jr,nr){for(var ua=0,ut=Zr.length,fa=jr.length,Rr,On;ua=fa)return-1;if(Rr=Zr.charCodeAt(ua++),Rr===37){if(Rr=Zr.charAt(ua++),On=Wr[Rr in l?Zr.charAt(ua++):Rr],!On||(nr=On(mr,jr,nr))<0)return-1}else if(Rr!=jr.charCodeAt(nr++))return-1}return nr}function yt(mr,Zr,jr){var nr=$r.exec(Zr.slice(jr));return nr?(mr.p=Vr[nr[0].toLowerCase()],jr+nr[0].length):-1}function Ca(mr,Zr,jr){var nr=ka.exec(Zr.slice(jr));return nr?(mr.w=ra[nr[0].toLowerCase()],jr+nr[0].length):-1}function aa(mr,Zr,jr){var nr=St.exec(Zr.slice(jr));return nr?(mr.w=ea[nr[0].toLowerCase()],jr+nr[0].length):-1}function In(mr,Zr,jr){var nr=ta.exec(Zr.slice(jr));return nr?(mr.m=Ha[nr[0].toLowerCase()],jr+nr[0].length):-1}function Hn(mr,Zr,jr){var nr=pn.exec(Zr.slice(jr));return nr?(mr.m=Ia[nr[0].toLowerCase()],jr+nr[0].length):-1}function Wt(mr,Zr,jr){return st(mr,oe,Zr,jr)}function at(mr,Zr,jr){return st(mr,qe,Zr,jr)}function sa(mr,Zr,jr){return st(mr,ke,Zr,jr)}function Ul(mr){return sr[mr.getDay()]}function Gl(mr){return vr[mr.getDay()]}function rl(mr){return Ur[mr.getMonth()]}function qc(mr){return Mr[mr.getMonth()]}function Dc(mr){return ir[+(mr.getHours()>=12)]}function ku(mr){return 1+~~(mr.getMonth()/3)}function Cu(mr){return sr[mr.getUTCDay()]}function Su(mr){return vr[mr.getUTCDay()]}function Sa(mr){return Ur[mr.getUTCMonth()]}function Ec(mr){return Mr[mr.getUTCMonth()]}function $o(mr){return ir[+(mr.getUTCHours()>=12)]}function jo(mr){return 1+~~(mr.getUTCMonth()/3)}return{format:function(mr){var Zr=mt(mr+="",yr);return Zr.toString=function(){return mr},Zr},parse:function(mr){var Zr=Tt(mr+="",!1);return Zr.toString=function(){return mr},Zr},utcFormat:function(mr){var Zr=mt(mr+="",ot);return Zr.toString=function(){return mr},Zr},utcParse:function(mr){var Zr=Tt(mr+="",!0);return Zr.toString=function(){return mr},Zr}}}var l={"-":"",_:" ",0:"0"},o=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(ae,oe,qe){var ke=ae<0?"-":"",ir=(ke?-ae:ae)+"",vr=ir.length;return ke+(vr68?1900:2e3),qe+ke[0].length):-1}function A(ae,oe,qe){var ke=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(oe.slice(qe,qe+6));return ke?(ae.Z=ke[1]?0:-(ke[2]+(ke[3]||"00")),qe+ke[0].length):-1}function S(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+1));return ke?(ae.q=ke[0]*3-3,qe+ke[0].length):-1}function k(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.m=ke[0]-1,qe+ke[0].length):-1}function q(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.d=+ke[0],qe+ke[0].length):-1}function D(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+3));return ke?(ae.m=0,ae.d=+ke[0],qe+ke[0].length):-1}function R(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.H=+ke[0],qe+ke[0].length):-1}function z(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.M=+ke[0],qe+ke[0].length):-1}function N(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+2));return ke?(ae.S=+ke[0],qe+ke[0].length):-1}function H(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+3));return ke?(ae.L=+ke[0],qe+ke[0].length):-1}function O(ae,oe,qe){var ke=o.exec(oe.slice(qe,qe+6));return ke?(ae.L=Math.floor(ke[0]/1e3),qe+ke[0].length):-1}function J(ae,oe,qe){var ke=s.exec(oe.slice(qe,qe+1));return ke?qe+ke[0].length:-1}function X(ae,oe,qe){var ke=o.exec(oe.slice(qe));return ke?(ae.Q=+ke[0],qe+ke[0].length):-1}function B(ae,oe,qe){var ke=o.exec(oe.slice(qe));return ke?(ae.s=+ke[0],qe+ke[0].length):-1}function I(ae,oe){return f(ae.getDate(),oe,2)}function V(ae,oe){return f(ae.getHours(),oe,2)}function K(ae,oe){return f(ae.getHours()%12||12,oe,2)}function Q(ae,oe){return f(1+r.timeDay.count(r.timeYear(ae),ae),oe,3)}function ie(ae,oe){return f(ae.getMilliseconds(),oe,3)}function me(ae,oe){return ie(ae,oe)+"000"}function pe(ae,oe){return f(ae.getMonth()+1,oe,2)}function ge(ae,oe){return f(ae.getMinutes(),oe,2)}function j(ae,oe){return f(ae.getSeconds(),oe,2)}function _e(ae){var oe=ae.getDay();return oe===0?7:oe}function se(ae,oe){return f(r.timeSunday.count(r.timeYear(ae)-1,ae),oe,2)}function Se(ae,oe){var qe=ae.getDay();return ae=qe>=4||qe===0?r.timeThursday(ae):r.timeThursday.ceil(ae),f(r.timeThursday.count(r.timeYear(ae),ae)+(r.timeYear(ae).getDay()===4),oe,2)}function ve(ae){return ae.getDay()}function Ae(ae,oe){return f(r.timeMonday.count(r.timeYear(ae)-1,ae),oe,2)}function Y(ae,oe){return f(ae.getFullYear()%100,oe,2)}function re(ae,oe){return f(ae.getFullYear()%1e4,oe,4)}function U(ae){var oe=ae.getTimezoneOffset();return(oe>0?"-":(oe*=-1,"+"))+f(oe/60|0,"0",2)+f(oe%60,"0",2)}function de(ae,oe){return f(ae.getUTCDate(),oe,2)}function be(ae,oe){return f(ae.getUTCHours(),oe,2)}function ye(ae,oe){return f(ae.getUTCHours()%12||12,oe,2)}function Fe(ae,oe){return f(1+r.utcDay.count(r.utcYear(ae),ae),oe,3)}function Re(ae,oe){return f(ae.getUTCMilliseconds(),oe,3)}function Pe(ae,oe){return Re(ae,oe)+"000"}function Ie(ae,oe){return f(ae.getUTCMonth()+1,oe,2)}function Be(ae,oe){return f(ae.getUTCMinutes(),oe,2)}function Ne(ae,oe){return f(ae.getUTCSeconds(),oe,2)}function Ee(ae){var oe=ae.getUTCDay();return oe===0?7:oe}function Je(ae,oe){return f(r.utcSunday.count(r.utcYear(ae)-1,ae),oe,2)}function We(ae,oe){var qe=ae.getUTCDay();return ae=qe>=4||qe===0?r.utcThursday(ae):r.utcThursday.ceil(ae),f(r.utcThursday.count(r.utcYear(ae),ae)+(r.utcYear(ae).getUTCDay()===4),oe,2)}function ne(ae){return ae.getUTCDay()}function Me(ae,oe){return f(r.utcMonday.count(r.utcYear(ae)-1,ae),oe,2)}function Ce(ae,oe){return f(ae.getUTCFullYear()%100,oe,2)}function cr(ae,oe){return f(ae.getUTCFullYear()%1e4,oe,4)}function tr(){return"+0000"}function De(){return"%"}function Le(ae){return+ae}function Ye(ae){return Math.floor(+ae/1e3)}var Ze;Ue({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 Ue(ae){return Ze=i(ae),e.timeFormat=Ze.format,e.timeParse=Ze.parse,e.utcFormat=Ze.utcFormat,e.utcParse=Ze.utcParse,Ze}var Oe="%Y-%m-%dT%H:%M:%S.%LZ";function Ke(ae){return ae.toISOString()}var fr=Date.prototype.toISOString?Ke:e.utcFormat(Oe);function lr(ae){var oe=new Date(ae);return isNaN(oe)?null:oe}var ze=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(Oe);e.isoFormat=fr,e.isoParse=ze,e.timeFormatDefaultLocale=Ue,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var O1=Z((ov,vb)=>{(function(e,r){typeof ov=="object"&&typeof vb!="undefined"?r(ov):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(ov,function(e){"use strict";function r(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString("en").replace(/,/g,""):k.toString(10)}function t(k,q){if((D=(k=q?k.toExponential(q-1):k.toExponential()).indexOf("e"))<0)return null;var D,R=k.slice(0,D);return[R.length>1?R[0]+R.slice(2):R,+k.slice(D+1)]}function a(k){return k=t(Math.abs(k)),k?k[1]:NaN}function n(k,q){return function(D,R){for(var z=D.length,N=[],H=0,O=k[0],J=0;z>0&&O>0&&(J+O+1>R&&(O=Math.max(1,R-J)),N.push(D.substring(z-=O,z+O)),!((J+=O+1)>R));)O=k[H=(H+1)%k.length];return N.reverse().join(q)}}function i(k){return function(q){return q.replace(/[0-9]/g,function(D){return k[+D]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(k){if(!(q=l.exec(k)))throw new Error("invalid format: "+k);var q;return new s({fill:q[1],align:q[2],sign:q[3],symbol:q[4],zero:q[5],width:q[6],comma:q[7],precision:q[8]&&q[8].slice(1),trim:q[9],type:q[10]})}o.prototype=s.prototype;function s(k){this.fill=k.fill===void 0?" ":k.fill+"",this.align=k.align===void 0?">":k.align+"",this.sign=k.sign===void 0?"-":k.sign+"",this.symbol=k.symbol===void 0?"":k.symbol+"",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?"":k.type+""}s.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(k){e:for(var q=k.length,D=1,R=-1,z;D0&&(R=0);break}return R>0?k.slice(0,R)+k.slice(z+1):k}var f;function v(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1],N=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,H=R.length;return N===H?R:N>H?R+new Array(N-H+1).join("0"):N>0?R.slice(0,N)+"."+R.slice(N):"0."+new Array(1-N).join("0")+t(k,Math.max(0,q+N-1))[0]}function h(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+R:R.length>z+1?R.slice(0,z+1)+"."+R.slice(z+1):R+new Array(z-R.length+2).join("0")}var d={"%":function(k,q){return(k*100).toFixed(q)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,q){return k.toExponential(q)},f:function(k,q){return k.toFixed(q)},g:function(k,q){return k.toPrecision(q)},o:function(k){return Math.round(k).toString(8)},p:function(k,q){return h(k*100,q)},r:h,s:v,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var g=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function w(k){var q=k.grouping===void 0||k.thousands===void 0?m:n(g.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",R=k.currency===void 0?"":k.currency[1]+"",z=k.decimal===void 0?".":k.decimal+"",N=k.numerals===void 0?m:i(g.call(k.numerals,String)),H=k.percent===void 0?"%":k.percent+"",O=k.minus===void 0?"-":k.minus+"",J=k.nan===void 0?"NaN":k.nan+"";function X(I){I=o(I);var V=I.fill,K=I.align,Q=I.sign,ie=I.symbol,me=I.zero,pe=I.width,ge=I.comma,j=I.precision,_e=I.trim,se=I.type;se==="n"?(ge=!0,se="g"):d[se]||(j===void 0&&(j=12),_e=!0,se="g"),(me||V==="0"&&K==="=")&&(me=!0,V="0",K="=");var Se=ie==="$"?D:ie==="#"&&/[boxX]/.test(se)?"0"+se.toLowerCase():"",ve=ie==="$"?R:/[%p]/.test(se)?H:"",Ae=d[se],Y=/[defgprs%]/.test(se);j=j===void 0?6:/[gprs]/.test(se)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function re(U){var de=Se,be=ve,ye,Fe,Re;if(se==="c")be=Ae(U)+be,U="";else{U=+U;var Pe=U<0||1/U<0;if(U=isNaN(U)?J:Ae(Math.abs(U),j),_e&&(U=u(U)),Pe&&+U==0&&Q!=="+"&&(Pe=!1),de=(Pe?Q==="("?Q:O:Q==="-"||Q==="("?"":Q)+de,be=(se==="s"?y[8+f/3]:"")+be+(Pe&&Q==="("?")":""),Y){for(ye=-1,Fe=U.length;++yeRe||Re>57){be=(Re===46?z+U.slice(ye+1):U.slice(ye))+be,U=U.slice(0,ye);break}}}ge&&!me&&(U=q(U,1/0));var Ie=de.length+U.length+be.length,Be=Ie>1)+de+U+be+Be.slice(Ie);break;default:U=Be+de+U+be;break}return N(U)}return re.toString=function(){return I+""},re}function B(I,V){var K=X((I=o(I),I.type="f",I)),Q=Math.max(-8,Math.min(8,Math.floor(a(V)/3)))*3,ie=Math.pow(10,-Q),me=y[8+Q/3];return function(pe){return K(ie*pe)+me}}return{format:X,formatPrefix:B}}var _;T({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function T(k){return _=w(k),e.format=_.format,e.formatPrefix=_.formatPrefix,_}function b(k){return Math.max(0,-a(Math.abs(k)))}function A(k,q){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(q)/3)))*3-a(Math.abs(k)))}function S(k,q){return k=Math.abs(k),q=Math.abs(q)-k,Math.max(0,a(q)-a(k))+1}e.FormatSpecifier=s,e.formatDefaultLocale=T,e.formatLocale=w,e.formatSpecifier=o,e.precisionFixed=b,e.precisionPrefix=A,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})})});var db=Z((sie,hb)=>{"use strict";hb.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var Hr=Z((uie,pb)=>{"use strict";var iI=db();pb.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&iI(t))return!1}else if(r!=="number")return!1;return e-e<1}});var Bt=Z((fie,mb)=>{"use strict";mb.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 B1=Z((sv,yb)=>{(function(e,r){typeof sv=="object"&&typeof yb!="undefined"?r(sv):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(sv,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(o[s]&3)<<4|o[s+1]>>4],f+=r[(o[s+1]&15)<<2|o[s+2]>>6],f+=r[o[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(l){var o=l.length*.75,s=l.length,u,f=0,v,h,d,m;l[l.length-1]==="="&&(o--,l[l.length-2]==="="&&o--);var g=new ArrayBuffer(o),y=new Uint8Array(g);for(u=0;u>4,y[f++]=(h&15)<<4|d>>2,y[f++]=(d&3)<<6|m&63;return g};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var nl=Z((cie,gb)=>{"use strict";gb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var nn=Z(Un=>{"use strict";var lI=B1().decode,oI=nl(),Y1=Array.isArray,sI=ArrayBuffer,uI=DataView;function bb(e){return sI.isView(e)&&!(e instanceof uI)}Un.isTypedArray=bb;function uv(e){return Y1(e)||bb(e)}Un.isArrayOrTypedArray=uv;function fI(e){return!uv(e[0])}Un.isArray1D=fI;Un.ensureArray=function(e,r){return Y1(e)||(e=[]),e.length=r,e};var na={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};na.uint8c=na.u1c;na.uint8=na.u1;na.int8=na.i1;na.uint16=na.u2;na.int16=na.i2;na.uint32=na.u4;na.int32=na.i4;na.float32=na.f4;na.float64=na.f8;function U1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=U1;Un.decodeTypedArraySpec=function(e){var r=[],t=cI(e),a=t.dtype,n=na[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;U1(l)||(l=lI(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,v=+o[0],h=i*v,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var _b=Hr(),V1=nn().isArrayOrTypedArray;Ab.exports=function(r,t){if(_b(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o{"use strict";var ss=fv(),mI=/^\w*$/,yI=0,kb=1,cv=2,Cb=3,Ql=4;Sb.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,l,o,s={};t&&t.length?(o=ss(r,t),l=o.get()):l=r,t=t||"";var u={};if(l)for(i=0;i2)return s[d]=s[d]|cv,v.set(h,null);if(f){for(i=d;i{"use strict";var gI=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,bI=/^[^\.\[\]]+$/;qb.exports=function(e,r){for(;r;){var t=e.match(gI);if(t)e=t[1];else if(e.match(bI))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var vv=Z((mie,Eb)=>{"use strict";var xI=Hr();Eb.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return xI(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var zb=Z((yie,Rb)=>{"use strict";var Pb=nn().isArrayOrTypedArray,Iu=nl();Rb.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(Pb(n)&&Pb(i)&&Iu(n[0])){if(a==="customdata"||a==="ids")continue;for(var l=Math.min(n.length,i.length),o=0;o{"use strict";function _I(e,r){var t=e%r;return t<0?t+r:t}function wI(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}Nb.exports={mod:_I,modHalf:wI}});var bn=Z((bie,hv)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,l=e.max,o=e.random;function s(Y,re){if(Y=Y||"",re=re||{},Y instanceof s)return Y;if(!(this instanceof s))return new s(Y,re);var U=u(Y);this._originalInput=Y,this._r=U.r,this._g=U.g,this._b=U.b,this._a=U.a,this._roundA=n(100*this._a)/100,this._format=re.format||U.format,this._gradientType=re.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=U.ok,this._tc_id=a++}s.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 Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),re,U,de,be,ye,Fe;return re=Y.r/255,U=Y.g/255,de=Y.b/255,re<=.03928?be=re/12.92:be=e.pow((re+.055)/1.055,2.4),U<=.03928?ye=U/12.92:ye=e.pow((U+.055)/1.055,2.4),de<=.03928?Fe=de/12.92:Fe=e.pow((de+.055)/1.055,2.4),.2126*be+.7152*ye+.0722*Fe},setAlpha:function(Y){return this._a=I(Y),this._roundA=n(100*this._a)/100,this},toHsv:function(){var Y=d(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=d(this._r,this._g,this._b),re=n(Y.h*360),U=n(Y.s*100),de=n(Y.v*100);return this._a==1?"hsv("+re+", "+U+"%, "+de+"%)":"hsva("+re+", "+U+"%, "+de+"%, "+this._roundA+")"},toHsl:function(){var Y=v(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=v(this._r,this._g,this._b),re=n(Y.h*360),U=n(Y.s*100),de=n(Y.l*100);return this._a==1?"hsl("+re+", "+U+"%, "+de+"%)":"hsla("+re+", "+U+"%, "+de+"%, "+this._roundA+")"},toHex:function(Y){return g(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return y(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(V(this._r,255)*100)+"%",g:n(V(this._g,255)*100)+"%",b:n(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%)":"rgba("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:X[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var re="#"+w(this._r,this._g,this._b,this._a),U=re,de=this._gradientType?"GradientType = 1, ":"";if(Y){var be=s(Y);U="#"+w(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+de+"startColorstr="+re+",endColorstr="+U+")"},toString:function(Y){var re=!!Y;Y=Y||this._format;var U=!1,de=this._a<1&&this._a>=0,be=!re&&de&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return be?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(U=this.toRgbString()),Y==="prgb"&&(U=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(U=this.toHexString()),Y==="hex3"&&(U=this.toHexString(!0)),Y==="hex4"&&(U=this.toHex8String(!0)),Y==="hex8"&&(U=this.toHex8String()),Y==="name"&&(U=this.toName()),Y==="hsl"&&(U=this.toHslString()),Y==="hsv"&&(U=this.toHsvString()),U||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Y,re){var U=Y.apply(null,[this].concat([].slice.call(re)));return this._r=U._r,this._g=U._g,this._b=U._b,this.setAlpha(U._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(q,arguments)},_applyCombination:function(Y,re){return Y.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(R,arguments)},tetrad:function(){return this._applyCombination(z,arguments)}},s.fromRatio=function(Y,re){if(typeof Y=="object"){var U={};for(var de in Y)Y.hasOwnProperty(de)&&(de==="a"?U[de]=Y[de]:U[de]=ge(Y[de]));Y=U}return s(Y,re)};function u(Y){var re={r:0,g:0,b:0},U=1,de=null,be=null,ye=null,Fe=!1,Re=!1;return typeof Y=="string"&&(Y=ve(Y)),typeof Y=="object"&&(Se(Y.r)&&Se(Y.g)&&Se(Y.b)?(re=f(Y.r,Y.g,Y.b),Fe=!0,Re=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):Se(Y.h)&&Se(Y.s)&&Se(Y.v)?(de=ge(Y.s),be=ge(Y.v),re=m(Y.h,de,be),Fe=!0,Re="hsv"):Se(Y.h)&&Se(Y.s)&&Se(Y.l)&&(de=ge(Y.s),ye=ge(Y.l),re=h(Y.h,de,ye),Fe=!0,Re="hsl"),Y.hasOwnProperty("a")&&(U=Y.a)),U=I(U),{ok:Fe,format:Y.format||Re,r:i(255,l(re.r,0)),g:i(255,l(re.g,0)),b:i(255,l(re.b,0)),a:U}}function f(Y,re,U){return{r:V(Y,255)*255,g:V(re,255)*255,b:V(U,255)*255}}function v(Y,re,U){Y=V(Y,255),re=V(re,255),U=V(U,255);var de=l(Y,re,U),be=i(Y,re,U),ye,Fe,Re=(de+be)/2;if(de==be)ye=Fe=0;else{var Pe=de-be;switch(Fe=Re>.5?Pe/(2-de-be):Pe/(de+be),de){case Y:ye=(re-U)/Pe+(re1&&(Ne-=1),Ne<1/6?Ie+(Be-Ie)*6*Ne:Ne<1/2?Be:Ne<2/3?Ie+(Be-Ie)*(2/3-Ne)*6:Ie}if(re===0)de=be=ye=U;else{var Re=U<.5?U*(1+re):U+re-U*re,Pe=2*U-Re;de=Fe(Pe,Re,Y+1/3),be=Fe(Pe,Re,Y),ye=Fe(Pe,Re,Y-1/3)}return{r:de*255,g:be*255,b:ye*255}}function d(Y,re,U){Y=V(Y,255),re=V(re,255),U=V(U,255);var de=l(Y,re,U),be=i(Y,re,U),ye,Fe,Re=de,Pe=de-be;if(Fe=de===0?0:Pe/de,de==be)ye=0;else{switch(de){case Y:ye=(re-U)/Pe+(re>1)+720)%360;--re;)de.h=(de.h+be)%360,ye.push(s(de));return ye}function O(Y,re){re=re||6;for(var U=s(Y).toHsv(),de=U.h,be=U.s,ye=U.v,Fe=[],Re=1/re;re--;)Fe.push(s({h:de,s:be,v:ye})),ye=(ye+Re)%1;return Fe}s.mix=function(Y,re,U){U=U===0?0:U||50;var de=s(Y).toRgb(),be=s(re).toRgb(),ye=U/100,Fe={r:(be.r-de.r)*ye+de.r,g:(be.g-de.g)*ye+de.g,b:(be.b-de.b)*ye+de.b,a:(be.a-de.a)*ye+de.a};return s(Fe)},s.readability=function(Y,re){var U=s(Y),de=s(re);return(e.max(U.getLuminance(),de.getLuminance())+.05)/(e.min(U.getLuminance(),de.getLuminance())+.05)},s.isReadable=function(Y,re,U){var de=s.readability(Y,re),be,ye;switch(ye=!1,be=Ae(U),be.level+be.size){case"AAsmall":case"AAAlarge":ye=de>=4.5;break;case"AAlarge":ye=de>=3;break;case"AAAsmall":ye=de>=7;break}return ye},s.mostReadable=function(Y,re,U){var de=null,be=0,ye,Fe,Re,Pe;U=U||{},Fe=U.includeFallbackColors,Re=U.level,Pe=U.size;for(var Ie=0;Iebe&&(be=ye,de=s(re[Ie]));return s.isReadable(Y,de,{level:Re,size:Pe})||!Fe?de:(U.includeFallbackColors=!1,s.mostReadable(Y,["#fff","#000"],U))};var J=s.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"},X=s.hexNames=B(J);function B(Y){var re={};for(var U in Y)Y.hasOwnProperty(U)&&(re[Y[U]]=U);return re}function I(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function V(Y,re){ie(Y)&&(Y="100%");var U=me(Y);return Y=i(re,l(0,parseFloat(Y))),U&&(Y=parseInt(Y*re,10)/100),e.abs(Y-re)<1e-6?1:Y%re/parseFloat(re)}function K(Y){return i(1,l(0,Y))}function Q(Y){return parseInt(Y,16)}function ie(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function me(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function pe(Y){return Y.length==1?"0"+Y:""+Y}function ge(Y){return Y<=1&&(Y=Y*100+"%"),Y}function j(Y){return e.round(parseFloat(Y)*255).toString(16)}function _e(Y){return Q(Y)/255}var se=function(){var Y="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",U="(?:"+re+")|(?:"+Y+")",de="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",be="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?";return{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+de),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+de),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+de),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Se(Y){return!!se.CSS_UNIT.exec(Y)}function ve(Y){Y=Y.replace(r,"").replace(t,"").toLowerCase();var re=!1;if(J[Y])Y=J[Y],re=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var U;return(U=se.rgb.exec(Y))?{r:U[1],g:U[2],b:U[3]}:(U=se.rgba.exec(Y))?{r:U[1],g:U[2],b:U[3],a:U[4]}:(U=se.hsl.exec(Y))?{h:U[1],s:U[2],l:U[3]}:(U=se.hsla.exec(Y))?{h:U[1],s:U[2],l:U[3],a:U[4]}:(U=se.hsv.exec(Y))?{h:U[1],s:U[2],v:U[3]}:(U=se.hsva.exec(Y))?{h:U[1],s:U[2],v:U[3],a:U[4]}:(U=se.hex8.exec(Y))?{r:Q(U[1]),g:Q(U[2]),b:Q(U[3]),a:_e(U[4]),format:re?"name":"hex8"}:(U=se.hex6.exec(Y))?{r:Q(U[1]),g:Q(U[2]),b:Q(U[3]),format:re?"name":"hex"}:(U=se.hex4.exec(Y))?{r:Q(U[1]+""+U[1]),g:Q(U[2]+""+U[2]),b:Q(U[3]+""+U[3]),a:_e(U[4]+""+U[4]),format:re?"name":"hex8"}:(U=se.hex3.exec(Y))?{r:Q(U[1]+""+U[1]),g:Q(U[2]+""+U[2]),b:Q(U[3]+""+U[3]),format:re?"name":"hex"}:!1}function Ae(Y){var re,U;return Y=Y||{level:"AA",size:"small"},re=(Y.level||"AA").toUpperCase(),U=(Y.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),U!=="small"&&U!=="large"&&(U="small"),{level:re,size:U}}typeof hv!="undefined"&&hv.exports?hv.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var Yt=Z(Bu=>{"use strict";var Fb=nl(),Hu=Array.isArray;function TI(e,r){var t,a;for(t=0;t{"use strict";Ib.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var Yu=Z((wie,Hb)=>{"use strict";Hb.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var fs=Z((Tie,Yb)=>{"use strict";var Ob=Yu(),Bb=ha(),W1=Bb({editType:"none"});W1.family.dflt=Ob.HOVERFONT;W1.size.dflt=Ob.HOVERFONTSIZE;Yb.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:W1,grouptitlefont:Bb({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var mv=Z((Mie,Ub)=>{"use strict";var MI=ha(),dv=fs().hoverlabel,pv=Yt().extendFlat;Ub.exports={hoverlabel:{bgcolor:pv({},dv.bgcolor,{arrayOk:!0}),bordercolor:pv({},dv.bordercolor,{arrayOk:!0}),font:MI({arrayOk:!0,editType:"none"}),align:pv({},dv.align,{arrayOk:!0}),namelength:pv({},dv.namelength,{arrayOk:!0}),editType:"none"}}});var Gn=Z((Aie,Gb)=>{"use strict";var AI=ha(),kI=mv();Gb.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:AI({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:kI.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 $l=Z((kie,Zb)=>{"use strict";var CI=bn(),yv={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)"]]},Vb=yv.RdBu;function SI(e,r){if(r||(r=Vb),!e)return r;function t(){try{e=yv[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),Wb(e)?e:r}function Wb(e){var r=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 t=0;t{"use strict";jl.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];jl.defaultLine="#444";jl.lightLine="#eee";jl.background="#fff";jl.borderLine="#BEC8D9";jl.lightFraction=100*10/11});var Er=Z((Sie,Xb)=>{"use strict";var Wa=bn(),qI=Hr(),DI=nn().isTypedArray,Zt=Xb.exports={},gv=hi();Zt.defaults=gv.defaults;var EI=Zt.defaultLine=gv.defaultLine;Zt.lightLine=gv.lightLine;var X1=Zt.background=gv.background;Zt.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};Zt.rgb=function(e){return Zt.tinyRGB(Wa(e))};Zt.opacity=function(e){return e?Wa(e).getAlpha():0};Zt.addOpacity=function(e,r){var t=Wa(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};Zt.combine=function(e,r){var t=Wa(e).toRgb();if(t.a===1)return Wa(e).toRgbString();var a=Wa(r||X1).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return Wa(i).toRgbString()};Zt.interpolate=function(e,r,t){var a=Wa(e).toRgb(),n=Wa(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return Wa(i).toRgbString()};Zt.contrast=function(e,r,t){var a=Wa(e);a.getAlpha()!==1&&(a=Wa(Zt.combine(e,X1)));var n=a.isDark()?r?a.lighten(r):X1:t?a.darken(t):EI;return n.toString()};Zt.stroke=function(e,r){var t=Wa(r);e.style({stroke:Zt.tinyRGB(t),"stroke-opacity":t.getAlpha()})};Zt.fill=function(e,r){var t=Wa(r);e.style({fill:Zt.tinyRGB(t),"fill-opacity":t.getAlpha()})};Zt.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var l=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+l+", "+a[3]+")":"rgb("+l+")"}});var bv=Z((Lie,Jb)=>{"use strict";Jb.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var cs=Z(Kb=>{"use strict";Kb.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var ex=Z(Za=>{"use strict";var J1=Hr(),Qb=bn(),$b=Yt().extendFlat,PI=Gn(),RI=$l(),zI=Er(),NI=bv().DESELECTDIM,vs=fv(),jb=cs().counter,FI=us().modHalf,di=nn().isArrayOrTypedArray,il=nn().isTypedArraySpec,ll=nn().decodeTypedArraySpec;Za.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(di(e)?e:il(e)?ll(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}il(e)&&(e=ll(e)),e%1||!J1(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){il(e)&&(e=ll(e)),Qb(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return Qb(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(RI.get(e,t))}},angle:{coerceFunction:function(e,r,t){il(e)&&(e=ll(e)),e==="auto"?r.set("auto"):J1(e)?r.set(FI(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||jb(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!jb(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var rx={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/"},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:{}}},tx={};function ax(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),ax(a,r[t]))}}ax(rx,tx);nx.exports={configAttributes:rx,dfltConfig:tx}});var Q1=Z((Pie,ix)=>{"use strict";var K1=Ir(),II=Hr(),Uu=[];ix.exports=function(e,r){if(Uu.indexOf(e)!==-1)return;Uu.push(e);var t=1e3;II(r)?t=r:r==="long"&&(t=3e3);var a=K1.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(Uu);function i(l){l.duration(700).style("opacity",0).each("end",function(o){var s=Uu.indexOf(o);s!==-1&&Uu.splice(s,1),K1.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var o=K1.select(this);o.append("button").classed("notifier-close",!0).html("×").on("click",function(){o.transition().call(i)});for(var s=o.append("p"),u=l.split(//g),f=0;f{"use strict";var hs=eo().dfltConfig,$1=Q1(),j1=lx.exports={};j1.log=function(){var e;if(hs.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};j1.warn=function(){var e;if(hs.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};j1.error=function(){var e;if(hs.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var _v=Z((zie,ox)=>{"use strict";ox.exports=function(){}});var ep=Z((Nie,sx)=>{"use strict";sx.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{ux.exports=HI;function HI(){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 vx=Z((Iie,cx)=>{cx.exports=OI;function OI(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var dx=Z((Hie,hx)=>{hx.exports=BI;function BI(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var rp=Z((Oie,px)=>{px.exports=YI;function YI(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 yx=Z((Bie,mx)=>{mx.exports=UI;function UI(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],l=r[7],o=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=l,e[14]=o}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var bx=Z((Yie,gx)=>{gx.exports=GI;function GI(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],w=r[15],_=t*o-a*l,T=t*s-n*l,b=t*u-i*l,A=a*s-n*o,S=a*u-i*o,k=n*u-i*s,q=f*g-v*m,D=f*y-h*m,R=f*w-d*m,z=v*y-h*g,N=v*w-d*g,H=h*w-d*y,O=_*H-T*N+b*z+A*R-S*D+k*q;return O?(O=1/O,e[0]=(o*H-s*N+u*z)*O,e[1]=(n*N-a*H-i*z)*O,e[2]=(g*k-y*S+w*A)*O,e[3]=(h*S-v*k-d*A)*O,e[4]=(s*R-l*H-u*D)*O,e[5]=(t*H-n*R+i*D)*O,e[6]=(y*b-m*k-w*T)*O,e[7]=(f*k-h*b+d*T)*O,e[8]=(l*N-o*R+u*q)*O,e[9]=(a*R-t*N-i*q)*O,e[10]=(m*S-g*b+w*_)*O,e[11]=(v*b-f*S-d*_)*O,e[12]=(o*D-l*z-s*q)*O,e[13]=(t*z-a*D+n*q)*O,e[14]=(g*T-m*A-y*_)*O,e[15]=(f*A-v*T+h*_)*O,e):null}});var _x=Z((Uie,xx)=>{xx.exports=VI;function VI(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],w=r[15];return e[0]=o*(h*w-d*y)-v*(s*w-u*y)+g*(s*d-u*h),e[1]=-(a*(h*w-d*y)-v*(n*w-i*y)+g*(n*d-i*h)),e[2]=a*(s*w-u*y)-o*(n*w-i*y)+g*(n*u-i*s),e[3]=-(a*(s*d-u*h)-o*(n*d-i*h)+v*(n*u-i*s)),e[4]=-(l*(h*w-d*y)-f*(s*w-u*y)+m*(s*d-u*h)),e[5]=t*(h*w-d*y)-f*(n*w-i*y)+m*(n*d-i*h),e[6]=-(t*(s*w-u*y)-l*(n*w-i*y)+m*(n*u-i*s)),e[7]=t*(s*d-u*h)-l*(n*d-i*h)+f*(n*u-i*s),e[8]=l*(v*w-d*g)-f*(o*w-u*g)+m*(o*d-u*v),e[9]=-(t*(v*w-d*g)-f*(a*w-i*g)+m*(a*d-i*v)),e[10]=t*(o*w-u*g)-l*(a*w-i*g)+m*(a*u-i*o),e[11]=-(t*(o*d-u*v)-l*(a*d-i*v)+f*(a*u-i*o)),e[12]=-(l*(v*y-h*g)-f*(o*y-s*g)+m*(o*h-s*v)),e[13]=t*(v*y-h*g)-f*(a*y-n*g)+m*(a*h-n*v),e[14]=-(t*(o*y-s*g)-l*(a*y-n*g)+m*(a*s-n*o)),e[15]=t*(o*h-s*v)-l*(a*h-n*v)+f*(a*s-n*o),e}});var Tx=Z((Gie,wx)=>{wx.exports=WI;function WI(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],l=e[5],o=e[6],s=e[7],u=e[8],f=e[9],v=e[10],h=e[11],d=e[12],m=e[13],g=e[14],y=e[15],w=r*l-t*i,_=r*o-a*i,T=r*s-n*i,b=t*o-a*l,A=t*s-n*l,S=a*s-n*o,k=u*m-f*d,q=u*g-v*d,D=u*y-h*d,R=f*g-v*m,z=f*y-h*m,N=v*y-h*g;return w*N-_*z+T*R+b*D-A*q+S*k}});var Ax=Z((Vie,Mx)=>{Mx.exports=ZI;function ZI(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=r[4],s=r[5],u=r[6],f=r[7],v=r[8],h=r[9],d=r[10],m=r[11],g=r[12],y=r[13],w=r[14],_=r[15],T=t[0],b=t[1],A=t[2],S=t[3];return e[0]=T*a+b*o+A*v+S*g,e[1]=T*n+b*s+A*h+S*y,e[2]=T*i+b*u+A*d+S*w,e[3]=T*l+b*f+A*m+S*_,T=t[4],b=t[5],A=t[6],S=t[7],e[4]=T*a+b*o+A*v+S*g,e[5]=T*n+b*s+A*h+S*y,e[6]=T*i+b*u+A*d+S*w,e[7]=T*l+b*f+A*m+S*_,T=t[8],b=t[9],A=t[10],S=t[11],e[8]=T*a+b*o+A*v+S*g,e[9]=T*n+b*s+A*h+S*y,e[10]=T*i+b*u+A*d+S*w,e[11]=T*l+b*f+A*m+S*_,T=t[12],b=t[13],A=t[14],S=t[15],e[12]=T*a+b*o+A*v+S*g,e[13]=T*n+b*s+A*h+S*y,e[14]=T*i+b*u+A*d+S*w,e[15]=T*l+b*f+A*m+S*_,e}});var Cx=Z((Wie,kx)=>{kx.exports=XI;function XI(e,r,t){var a=t[0],n=t[1],i=t[2],l,o,s,u,f,v,h,d,m,g,y,w;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(l=r[0],o=r[1],s=r[2],u=r[3],f=r[4],v=r[5],h=r[6],d=r[7],m=r[8],g=r[9],y=r[10],w=r[11],e[0]=l,e[1]=o,e[2]=s,e[3]=u,e[4]=f,e[5]=v,e[6]=h,e[7]=d,e[8]=m,e[9]=g,e[10]=y,e[11]=w,e[12]=l*a+f*n+m*i+r[12],e[13]=o*a+v*n+g*i+r[13],e[14]=s*a+h*n+y*i+r[14],e[15]=u*a+d*n+w*i+r[15]),e}});var Lx=Z((Zie,Sx)=>{Sx.exports=JI;function JI(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var Dx=Z((Xie,qx)=>{qx.exports=KI;function KI(e,r,t,a){var n=a[0],i=a[1],l=a[2],o=Math.sqrt(n*n+i*i+l*l),s,u,f,v,h,d,m,g,y,w,_,T,b,A,S,k,q,D,R,z,N,H,O,J;return Math.abs(o)<1e-6?null:(o=1/o,n*=o,i*=o,l*=o,s=Math.sin(t),u=Math.cos(t),f=1-u,v=r[0],h=r[1],d=r[2],m=r[3],g=r[4],y=r[5],w=r[6],_=r[7],T=r[8],b=r[9],A=r[10],S=r[11],k=n*n*f+u,q=i*n*f+l*s,D=l*n*f-i*s,R=n*i*f-l*s,z=i*i*f+u,N=l*i*f+n*s,H=n*l*f+i*s,O=i*l*f-n*s,J=l*l*f+u,e[0]=v*k+g*q+T*D,e[1]=h*k+y*q+b*D,e[2]=d*k+w*q+A*D,e[3]=m*k+_*q+S*D,e[4]=v*R+g*z+T*N,e[5]=h*R+y*z+b*N,e[6]=d*R+w*z+A*N,e[7]=m*R+_*z+S*N,e[8]=v*H+g*O+T*J,e[9]=h*H+y*O+b*J,e[10]=d*H+w*O+A*J,e[11]=m*H+_*O+S*J,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var Px=Z((Jie,Ex)=>{Ex.exports=QI;function QI(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],l=r[5],o=r[6],s=r[7],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=l*n+f*a,e[6]=o*n+v*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=f*n-l*a,e[10]=v*n-o*a,e[11]=h*n-s*a,e}});var zx=Z((Kie,Rx)=>{Rx.exports=$I;function $I(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=l*n-f*a,e[2]=o*n-v*a,e[3]=s*n-h*a,e[8]=i*a+u*n,e[9]=l*a+f*n,e[10]=o*a+v*n,e[11]=s*a+h*n,e}});var Fx=Z((Qie,Nx)=>{Nx.exports=jI;function jI(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[4],f=r[5],v=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=l*n+f*a,e[2]=o*n+v*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=f*n-l*a,e[6]=v*n-o*a,e[7]=h*n-s*a,e}});var Hx=Z(($ie,Ix)=>{Ix.exports=eH;function eH(e,r,t){var a,n,i,l=t[0],o=t[1],s=t[2],u=Math.sqrt(l*l+o*o+s*s);return Math.abs(u)<1e-6?null:(u=1/u,l*=u,o*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=l*l*i+n,e[1]=o*l*i+s*a,e[2]=s*l*i-o*a,e[3]=0,e[4]=l*o*i-s*a,e[5]=o*o*i+n,e[6]=s*o*i+l*a,e[7]=0,e[8]=l*s*i+o*a,e[9]=o*s*i-l*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Bx=Z((jie,Ox)=>{Ox.exports=rH;function rH(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=a+a,s=n+n,u=i+i,f=a*o,v=a*s,h=a*u,d=n*s,m=n*u,g=i*u,y=l*o,w=l*s,_=l*u;return e[0]=1-(d+g),e[1]=v+_,e[2]=h-w,e[3]=0,e[4]=v-_,e[5]=1-(f+g),e[6]=m+y,e[7]=0,e[8]=h+w,e[9]=m-y,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Ux=Z((ele,Yx)=>{Yx.exports=tH;function tH(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Vx=Z((rle,Gx)=>{Gx.exports=aH;function aH(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Zx=Z((tle,Wx)=>{Wx.exports=nH;function nH(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Jx=Z((ale,Xx)=>{Xx.exports=iH;function iH(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Qx=Z((nle,Kx)=>{Kx.exports=lH;function lH(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 tp=Z((ile,$x)=>{$x.exports=oH;function oH(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=t+t,o=a+a,s=n+n,u=t*l,f=a*l,v=a*o,h=n*l,d=n*o,m=n*s,g=i*l,y=i*o,w=i*s;return e[0]=1-v-m,e[1]=f+w,e[2]=h-y,e[3]=0,e[4]=f-w,e[5]=1-u-m,e[6]=d+g,e[7]=0,e[8]=h+y,e[9]=d-g,e[10]=1-u-v,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var e_=Z((lle,jx)=>{jx.exports=sH;function sH(e,r,t,a,n,i,l){var o=1/(t-r),s=1/(n-a),u=1/(i-l);return e[0]=i*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*o,e[9]=(n+a)*s,e[10]=(l+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*i*2*u,e[15]=0,e}});var t_=Z((ole,r_)=>{r_.exports=uH;function uH(e,r,t,a,n){var i=1/Math.tan(r/2),l=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*l,e[15]=0,e}});var n_=Z((sle,a_)=>{a_.exports=fH;function fH(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),l=Math.tan(r.leftDegrees*Math.PI/180),o=Math.tan(r.rightDegrees*Math.PI/180),s=2/(l+o),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((l-o)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var l_=Z((ule,i_)=>{i_.exports=cH;function cH(e,r,t,a,n,i,l){var o=1/(r-t),s=1/(a-n),u=1/(i-l);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*s,e[14]=(l+i)*u,e[15]=1,e}});var s_=Z((fle,o_)=>{var vH=rp();o_.exports=hH;function hH(e,r,t,a){var n,i,l,o,s,u,f,v,h,d,m=r[0],g=r[1],y=r[2],w=a[0],_=a[1],T=a[2],b=t[0],A=t[1],S=t[2];return Math.abs(m-b)<1e-6&&Math.abs(g-A)<1e-6&&Math.abs(y-S)<1e-6?vH(e):(f=m-b,v=g-A,h=y-S,d=1/Math.sqrt(f*f+v*v+h*h),f*=d,v*=d,h*=d,n=_*h-T*v,i=T*f-w*h,l=w*v-_*f,d=Math.sqrt(n*n+i*i+l*l),d?(d=1/d,n*=d,i*=d,l*=d):(n=0,i=0,l=0),o=v*l-h*i,s=h*n-f*l,u=f*i-v*n,d=Math.sqrt(o*o+s*s+u*u),d?(d=1/d,o*=d,s*=d,u*=d):(o=0,s=0,u=0),e[0]=n,e[1]=o,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=v,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*m+i*g+l*y),e[13]=-(o*m+s*g+u*y),e[14]=-(f*m+v*g+h*y),e[15]=1,e)}});var f_=Z((cle,u_)=>{u_.exports=dH;function dH(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 ap=Z((vle,c_)=>{c_.exports={create:fx(),clone:vx(),copy:dx(),identity:rp(),transpose:yx(),invert:bx(),adjoint:_x(),determinant:Tx(),multiply:Ax(),translate:Cx(),scale:Lx(),rotate:Dx(),rotateX:Px(),rotateY:zx(),rotateZ:Fx(),fromRotation:Hx(),fromRotationTranslation:Bx(),fromScaling:Ux(),fromTranslation:Vx(),fromXRotation:Zx(),fromYRotation:Jx(),fromZRotation:Qx(),fromQuat:tp(),frustum:e_(),perspective:t_(),perspectiveFromFieldOfView:n_(),ortho:l_(),lookAt:s_(),str:f_()}});var wv=Z(qt=>{"use strict";var pH=ap();qt.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var mH=Ir(),v_=ro(),yH=wv(),gH=ap();function bH(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function xH(e){var r=mH.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function h_(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function _H(e,r){d_("global",e,r)}function d_(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):v_.warn("addStyleRule failed"):v_.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function wH(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&h_(t)}function TH(e,r,t,a,n){var i=a.split(":"),l=n.split(":"),o="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(o)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[l[0]]=l[1])}),s.setAttribute(o,!0))})}function MH(e){var r=m_(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=p_(a);if(n){var i=yH.convertCssMatrix(n);t=gH.multiply(t,t,i)}}),t}function p_(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function m_(e){for(var r=[];AH(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function AH(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function kH(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}y_.exports={getGraphDiv:bH,isPlotDiv:xH,removeElement:h_,addStyleRule:_H,addRelatedStyleRule:d_,deleteRelatedStyleRule:wH,setStyleOnHover:TH,getFullTransformMatrix:MH,getElementTransformMatrix:p_,getElementAndAncestors:m_,equalDomRects:kH}});var Vu=Z((ple,g_)=>{"use strict";g_.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 pi=Z((mle,A_)=>{"use strict";var x_=Yt().extendFlat,CH=nl(),__={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},w_={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},SH=__.flags.slice().concat(["fullReplot"]),LH=w_.flags.slice().concat("layoutReplot");A_.exports={traces:__,layout:w_,traceFlags:function(){return b_(SH)},layoutFlags:function(){return b_(LH)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";np.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};np.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 ip=Z((gle,k_)=>{"use strict";k_.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 zi=Z(Tv=>{"use strict";var C_=ip(),ble=C_.FORMAT_LINK,xle=C_.DATE_FORMAT_LINK;function lp(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function ol(e,r){return r?r.d2l(e):e}function S_(e,r){return r?r.l2d(e):e}function qH(e){return e.x0}function DH(e){return e.x1}function EH(e){return e.y0}function PH(e){return e.y1}function L_(e){return e.x0shift||0}function q_(e){return e.x1shift||0}function D_(e){return e.y0shift||0}function E_(e){return e.y1shift||0}function Mv(e,r){return ol(e.x1,r)+q_(e)-ol(e.x0,r)-L_(e)}function Av(e,r,t){return ol(e.y1,t)+E_(e)-ol(e.y0,t)-D_(e)}function RH(e,r){return Math.abs(Mv(e,r))}function zH(e,r,t){return Math.abs(Av(e,r,t))}function NH(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(Mv(e,r),2)+Math.pow(Av(e,r,t),2))}function FH(e,r){return S_((ol(e.x1,r)+q_(e)+ol(e.x0,r)+L_(e))/2,r)}function IH(e,r,t){return S_((ol(e.y1,t)+E_(e)+ol(e.y0,t)+D_(e))/2,t)}function HH(e,r,t){return e.type!=="line"?void 0:Av(e,r,t)/Mv(e,r)}P_.exports={x0:qH,x1:DH,y0:EH,y1:PH,slope:HH,dx:Mv,dy:Av,width:RH,height:zH,length:NH,xcenter:FH,ycenter:IH}});var N_=Z((Tle,z_)=>{"use strict";var OH=pi().overrideAll,to=Gn(),R_=ha(),BH=mi().dash,sl=Yt().extendFlat,YH=zi().shapeTexttemplateAttrs,UH=kv();z_.exports=OH({newshape:{visible:sl({},to.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:sl({},to.legend,{}),legendgroup:sl({},to.legendgroup,{}),legendgrouptitle:{text:sl({},to.legendgrouptitle.text,{}),font:R_({})},legendrank:sl({},to.legendrank,{}),legendwidth:sl({},to.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:sl({},BH,{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:sl({},to.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:YH({newshape:!0},{keys:Object.keys(UH)}),font:R_({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var I_=Z((Mle,F_)=>{"use strict";var GH=mi().dash,VH=Yt().extendFlat;F_.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:VH({},GH,{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 Cv=Z((Ale,H_)=>{"use strict";H_.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var ds=Z((kle,U_)=>{"use strict";var op=ha(),WH=Vu(),Sv=hi(),O_=N_(),B_=I_(),ZH=Cv(),Y_=Yt().extendFlat,Lv=op({editType:"calc"});Lv.family.dflt='"Open Sans", verdana, arial, sans-serif';Lv.size.dflt=12;Lv.color.dflt=Sv.defaultLine;U_.exports={font:Lv,title:{text:{valType:"string",editType:"layoutstyle"},font:op({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:op({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:Y_(ZH({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:Sv.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:Sv.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:Sv.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:"plot"},newshape:O_.newshape,activeshape:O_.activeshape,newselection:B_.newselection,activeselection:B_.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Y_({},WH.transition,{editType:"none"})}});var G_=lb(()=>{});var XH={};var V_=lb(()=>{G_()});var gr=Z(zr=>{"use strict";var ps=ro(),W_=_v(),Z_=ep(),JH=nl(),KH=Gu().addStyleRule,X_=Yt(),QH=Gn(),$H=ds(),jH=X_.extendFlat,sp=X_.extendDeepAll;zr.modules={};zr.allCategories={};zr.allTypes=[];zr.subplotsRegistry={};zr.componentsRegistry={};zr.layoutArrayContainers=[];zr.layoutArrayRegexes=[];zr.traceLayoutAttributes={};zr.localeRegistry={};zr.apiMethodRegistry={};zr.collectableSubplotTypes=null;zr.register=function(r){if(zr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var iO=os().timeFormat,i4=Hr(),up=ro(),fl=us().mod,gs=Bt(),xn=gs.BADNUM,Xa=gs.ONEDAY,Wu=gs.ONEHOUR,ul=gs.ONEMIN,ys=gs.ONESEC,Zu=gs.EPOCHJD,Ni=gr(),j_=os().utcFormat,lO=/^\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,oO=/^\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,e4=new Date().getFullYear()-70;function Fi(e){return e&&Ni.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Dt.dateTick0=function(e,r){var t=sO(e,!!r);if(r<2)return t;var a=Dt.dateTime2ms(t,e);return a+=Xa*(r-1),Dt.ms2DateTime(a,0,e)};function sO(e,r){return Fi(e)?r?Ni.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Ni.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Dt.dfltRange=function(e){return Fi(e)?Ni.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Dt.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Dv,Ev;Dt.dateTime2ms=function(e,r){if(Dt.isJSDate(e)){var t=e.getTimezoneOffset()*ul,a=(e.getUTCMinutes()-e.getMinutes())*ul+(e.getUTCSeconds()-e.getSeconds())*ys+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*ul;t=t-n/2+fl(a-t+n/2,n)}return e=Number(e)-t,e>=Dv&&e<=Ev?e:xn}if(typeof e!="string"&&typeof e!="number")return xn;e=String(e);var i=Fi(r),l=e.charAt(0);i&&(l==="G"||l==="g")&&(e=e.substr(1),r="");var o=i&&r.substr(0,7)==="chinese",s=e.match(o?oO:lO);if(!s)return xn;var u=s[1],f=s[3]||"1",v=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),m=Number(s[11]||0);if(i){if(u.length===2)return xn;u=Number(u);var g;try{var y=Ni.getComponentMethod("calendars","getCal")(r);if(o){var w=f.charAt(f.length-1)==="i";f=parseInt(f,10),g=y.newDate(u,y.toMonthIndex(u,f,w),v)}else g=y.newDate(u,Number(f),v)}catch(T){return xn}return g?(g.toJD()-Zu)*Xa+h*Wu+d*ul+m*ys:xn}u.length===2?u=(Number(u)+2e3-e4)%100+e4:u=Number(u),f-=1;var _=new Date(Date.UTC(2e3,f,v,h,d));return _.setUTCFullYear(u),_.getUTCMonth()!==f||_.getUTCDate()!==v?xn:_.getTime()+m*ys};Dv=Dt.MIN_MS=Dt.dateTime2ms("-9999");Ev=Dt.MAX_MS=Dt.dateTime2ms("9999-12-31 23:59:59.9999");Dt.isDateTime=function(e,r){return Dt.dateTime2ms(e,r)!==xn};function ms(e,r){return String(e+Math.pow(10,r)).substr(1)}var qv=90*Xa,r4=3*Wu,t4=5*ul;Dt.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Dv&&e<=Ev))return xn;r||(r=0);var a=Math.floor(fl(e+.05,1)*10),n=Math.round(e-a/10),i,l,o,s,u,f;if(Fi(t)){var v=Math.floor(n/Xa)+Zu,h=Math.floor(fl(e,Xa));try{i=Ni.getComponentMethod("calendars","getCal")(t).fromJD(v).formatDate("yyyy-mm-dd")}catch(d){i=j_("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;l=r=Dv+Xa&&e<=Ev-Xa))return xn;var r=Math.floor(fl(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=iO("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),l=t.getSeconds(),o=t.getUTCMilliseconds()*10+r;return l4(a,n,i,l,o)};function l4(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+ms(r,2)+":"+ms(t,2),(a||n)&&(e+=":"+ms(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+ms(n,i)}return e}Dt.cleanDate=function(e,r,t){if(e===xn)return r;if(Dt.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Fi(t))return up.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Dt.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Dt.isDateTime(e,t))return up.error("unrecognized date",e),r;return e};var uO=/%\d?f/g,fO=/%h/g,cO={1:"1",2:"1",3:"2",4:"2"};function a4(e,r,t,a){e=e.replace(uO,function(i){var l=Math.min(+i.charAt(1)||6,6),o=(r/1e3%1+2).toFixed(l).substr(2).replace(/0+$/,"")||"0";return o});var n=new Date(Math.floor(r+.05));if(e=e.replace(fO,function(){return cO[t("%q")(n)]}),Fi(a))try{e=Ni.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var vO=[59,59.9,59.99,59.999,59.9999];function hO(e,r){var t=fl(e+.05,Xa),a=ms(Math.floor(t/Wu),2)+":"+ms(fl(Math.floor(t/ul),60),2);if(r!=="M"){i4(r)||(r=0);var n=Math.min(fl(e/ys,60),vO[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}Dt.formatDate=function(e,r,t,a,n,i){if(n=Fi(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` `+i.year;else return hO(e,t)+` -`+a4(i.dayMonthYear,e,a,n);return a4(r,e,a,n)};var n4=3*Xa;Dt.incrementMonth=function(e,r,t){t=Fi(t)&&t;var a=fl(e,Xa);if(e=Math.round(e-a),t)try{var n=Math.round(e/Xa)+Zu,i=Ni.getComponentMethod("calendars","getCal")(t),l=i.fromJD(n);return r%12?i.add(l,r,"m"):i.add(l,r/12,"y"),(l.toJD()-Zu)*Xa+a}catch(s){up.error("invalid ms "+e+" in calendar "+t)}var o=new Date(e+n4);return o.setUTCMonth(o.getUTCMonth()+r)+a-n4};Dt.findExactDates=function(e,r){for(var t=0,a=0,n=0,i=0,l,o,s=Fi(r)&&Ni.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";s4.exports=function(r){return r}});var vp=Z(Ii=>{"use strict";var dO=Hr(),pO=ro(),mO=fp(),yO=Bt().BADNUM,cp=1e-9;Ii.findBin=function(e,r,t){if(dO(r.start))return t?Math.ceil((e-r.start)/r.size-cp)-1:Math.floor((e-r.start)/r.size+cp);var a=0,n=r.length,i=0,l=n>1?(r[n-1]-r[0])/(n-1):1,o,s;for(l>=0?s=t?gO:bO:s=t?_O:xO,e+=l*cp*(t?-1:1)*(l>=0?1:-1);a90&&pO.log("Long binary search..."),a-1};function gO(e,r){return er}function _O(e,r){return e>=r}Ii.sorterAsc=function(e,r){return e-r};Ii.sorterDes=function(e,r){return r-e};Ii.distinctVals=function(e){var r=e.slice();r.sort(Ii.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===yO;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],l,o=0;o<=t;o++){var s=r[o],u=s-l;l===void 0?(i.push(s),l=s):u>n&&(a=Math.min(a,u),i.push(s),l=s)}return{vals:i,minDiff:a}};Ii.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,l=0,o=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};Ii.findIndexOfMin=function(e,r){r=r||mO;for(var t=1/0,a,n=0;n{"use strict";u4.exports=function(r){return Object.keys(r).sort()}});var f4=Z(Et=>{"use strict";var Xu=Hr(),wO=nn().isArrayOrTypedArray;Et.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),Xu(r)||(r=!1),wO(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var p4=Z((Nle,d4)=>{"use strict";var c4=us(),dp=c4.mod,TO=c4.modHalf,Ju=Math.PI,cl=2*Ju;function MO(e){return e/180*Ju}function AO(e){return e/Ju*180}function pp(e){return Math.abs(e[1]-e[0])>cl-1e-14}function v4(e,r){return TO(r-e,cl)}function kO(e,r){return Math.abs(v4(e,r))}function h4(e,r){if(pp(r))return!0;var t,a;r[0]a&&(a+=cl);var n=dp(e,cl),i=n+cl;return n>=t&&n<=a||i>=t&&i<=a}function CO(e,r,t,a){if(!h4(r,a))return!1;var n,i;return t[0]=n&&e<=i}function mp(e,r,t,a,n,i,l){n=n||0,i=i||0;var o=pp([t,a]),s,u,f,v,h;o?(s=0,u=Ju,f=cl):t{"use strict";ao.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};ao.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};ao.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};ao.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};ao.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};ao.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var b4=Z(no=>{"use strict";var yp=us().mod;no.segmentsIntersect=g4;function g4(e,r,t,a,n,i,l,o){var s=t-e,u=n-e,f=l-n,v=a-r,h=i-r,d=o-i,m=s*d-f*v;if(m===0)return null;var g=(u*d-f*h)/m,y=(u*v-s*h)/m;return y<0||y>1||g<0||g>1?null:{x:e+s*g,y:r+v*g}}no.segmentDistance=function(r,t,a,n,i,l,o,s){if(g4(r,t,a,n,i,l,o,s))return 0;var u=a-r,f=n-t,v=o-i,h=s-l,d=u*u+f*f,m=v*v+h*h,g=Math.min(Pv(u,f,d,i-r,l-t),Pv(u,f,d,o-r,s-t),Pv(v,h,m,r-i,t-l),Pv(v,h,m,a-i,n-l));return Math.sqrt(g)};function Pv(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var l=a-e,o=n-r;return l*l+o*o}else{var s=a*r-n*e;return s*s/t}}var Rv,gp,y4;no.getTextLocation=function(r,t,a,n){if((r!==gp||n!==y4)&&(Rv={},gp=r,y4=n),Rv[a])return Rv[a];var i=r.getPointAtLength(yp(a-n/2,t)),l=r.getPointAtLength(yp(a+n/2,t)),o=Math.atan((l.y-i.y)/(l.x-i.x)),s=r.getPointAtLength(yp(a,t)),u=(s.x*4+i.x+l.x)/6,f=(s.y*4+i.y+l.y)/6,v={x:u,y:f,theta:o};return Rv[a]=v,v};no.clearLocationCache=function(){gp=null};no.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,l=t.top,o=t.bottom,s=0,u=r.getTotalLength(),f=u,v,h;function d(g){var y=r.getPointAtLength(g);g===0?v=y:g===u&&(h=y);var w=y.xi?y.x-i:0,_=y.yo?y.y-o:0;return Math.sqrt(w*w+_*_)}for(var m=d(s);m;){if(s+=m+a,s>f)return;m=d(s)}for(m=d(f);m;){if(f-=m+a,s>f)return;m=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(v.x-h.x)<.1&&Math.abs(v.y-h.y)<.1}};no.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),l=n.tolerance||.001,o=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,v=i,h,d,m;u0?v=h:f=h,u++}return d}});var zv=Z(Ku=>{"use strict";var Hi={};Ku.throttle=function(r,t,a){var n=Hi[r],i=Date.now();if(!n){for(var l in Hi)Hi[l].tsn.ts+t){o();return}n.timer=setTimeout(function(){o(),n.timer=null},t)};Ku.done=function(e){var r=Hi[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};Ku.clear=function(e){if(e)x4(Hi[e]),delete Hi[e];else for(var r in Hi)Ku.clear(r)};function x4(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var w4=Z((Ole,_4)=>{"use strict";_4.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var T4=Z((Ble,Nv)=>{"use strict";Nv.exports=bp;Nv.exports.isMobile=bp;Nv.exports.default=bp;var DO=/(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,EO=/CrOS/,PO=/android|ipad|playbook|silk/i;function bp(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=DO.test(r)&&!EO.test(r)||!!e.tablet&&PO.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var A4=Z((Yle,M4)=>{"use strict";var RO=Hr(),zO=T4();M4.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=NO(),typeof t!="string")return!0;var a=zO({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;o--){var s=n[o];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(RO(u)&&(u=+u),u>=13)return!0}}}return a};function NO(){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 C4=Z((Ule,k4)=>{"use strict";var FO=Ir();k4.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(l){return l[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(l){l[0][i]=FO.select(this)}),n}});var L4=Z((Gle,S4)=>{"use strict";var IO=gr();S4.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,l=0;l<2;l++){var o=(i[a]||{}).dictionary;if(o){var s=o[t];if(s)return s}i=IO.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var D4=Z((Vle,q4)=>{"use strict";q4.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";E4.exports=function(r){for(var t=BO(r)?OO:HO,a=[],n=0;n{"use strict";R4.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var l=String(t).length,o=String(r).length;if(i>=o+l){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var F4=Z((Xle,N4)=>{"use strict";var YO=Hr(),UO=Bt().BADNUM,GO=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;N4.exports=function(r){return typeof r=="string"&&(r=r.replace(GO,"")),YO(r)?Number(r):UO}});var He=Z((Jle,K4)=>{"use strict";var Qu=Ir(),VO=os().utcFormat,WO=O1().format,U4=Hr(),G4=Bt(),V4=G4.FP_SAFE,ZO=-V4,I4=G4.BADNUM,fe=K4.exports={};fe.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var H4={};fe.warnBadFormat=function(e){var r=String(e);H4[r]||(H4[r]=1,fe.warn('encountered bad format: "'+r+'"'))};fe.noFormat=function(e){return String(e)};fe.numberFormat=function(e){var r;try{r=WO(fe.adjustFormat(e))}catch(t){return fe.warnBadFormat(e),fe.noFormat}return r};fe.nestedProperty=fv();fe.keyedContainer=Lb();fe.relativeAttr=Db();fe.isPlainObject=nl();fe.toLogRange=vv();fe.relinkPrivateKeys=zb();var vl=nn();fe.isArrayBuffer=vl.isArrayBuffer;fe.isTypedArray=vl.isTypedArray;fe.isArrayOrTypedArray=vl.isArrayOrTypedArray;fe.isArray1D=vl.isArray1D;fe.ensureArray=vl.ensureArray;fe.concat=vl.concat;fe.maxRowLength=vl.maxRowLength;fe.minRowLength=vl.minRowLength;var W4=us();fe.mod=W4.mod;fe.modHalf=W4.modHalf;var hl=ex();fe.valObjectMeta=hl.valObjectMeta;fe.coerce=hl.coerce;fe.coerce2=hl.coerce2;fe.coerceFont=hl.coerceFont;fe.coercePattern=hl.coercePattern;fe.coerceHoverinfo=hl.coerceHoverinfo;fe.coerceSelectionMarkerOpacity=hl.coerceSelectionMarkerOpacity;fe.validate=hl.validate;var ln=o4();fe.dateTime2ms=ln.dateTime2ms;fe.isDateTime=ln.isDateTime;fe.ms2DateTime=ln.ms2DateTime;fe.ms2DateTimeLocal=ln.ms2DateTimeLocal;fe.cleanDate=ln.cleanDate;fe.isJSDate=ln.isJSDate;fe.formatDate=ln.formatDate;fe.incrementMonth=ln.incrementMonth;fe.dateTick0=ln.dateTick0;fe.dfltRange=ln.dfltRange;fe.findExactDates=ln.findExactDates;fe.MIN_MS=ln.MIN_MS;fe.MAX_MS=ln.MAX_MS;var io=vp();fe.findBin=io.findBin;fe.sorterAsc=io.sorterAsc;fe.sorterDes=io.sorterDes;fe.distinctVals=io.distinctVals;fe.roundUp=io.roundUp;fe.sort=io.sort;fe.findIndexOfMin=io.findIndexOfMin;fe.sortObjectKeys=hp();var Oi=f4();fe.aggNums=Oi.aggNums;fe.len=Oi.len;fe.mean=Oi.mean;fe.geometricMean=Oi.geometricMean;fe.median=Oi.median;fe.midRange=Oi.midRange;fe.variance=Oi.variance;fe.stdev=Oi.stdev;fe.interp=Oi.interp;var Vn=wv();fe.init2dArray=Vn.init2dArray;fe.transposeRagged=Vn.transposeRagged;fe.dot=Vn.dot;fe.translationMatrix=Vn.translationMatrix;fe.rotationMatrix=Vn.rotationMatrix;fe.rotationXYMatrix=Vn.rotationXYMatrix;fe.apply3DTransform=Vn.apply3DTransform;fe.apply2DTransform=Vn.apply2DTransform;fe.apply2DTransform2=Vn.apply2DTransform2;fe.convertCssMatrix=Vn.convertCssMatrix;fe.inverseTransformMatrix=Vn.inverseTransformMatrix;var yi=p4();fe.deg2rad=yi.deg2rad;fe.rad2deg=yi.rad2deg;fe.angleDelta=yi.angleDelta;fe.angleDist=yi.angleDist;fe.isFullCircle=yi.isFullCircle;fe.isAngleInsideSector=yi.isAngleInsideSector;fe.isPtInsideSector=yi.isPtInsideSector;fe.pathArc=yi.pathArc;fe.pathSector=yi.pathSector;fe.pathAnnulus=yi.pathAnnulus;var xs=m4();fe.isLeftAnchor=xs.isLeftAnchor;fe.isCenterAnchor=xs.isCenterAnchor;fe.isRightAnchor=xs.isRightAnchor;fe.isTopAnchor=xs.isTopAnchor;fe.isMiddleAnchor=xs.isMiddleAnchor;fe.isBottomAnchor=xs.isBottomAnchor;var _s=b4();fe.segmentsIntersect=_s.segmentsIntersect;fe.segmentDistance=_s.segmentDistance;fe.getTextLocation=_s.getTextLocation;fe.clearLocationCache=_s.clearLocationCache;fe.getVisibleSegment=_s.getVisibleSegment;fe.findPointOnPath=_s.findPointOnPath;var Hv=Yt();fe.extendFlat=Hv.extendFlat;fe.extendDeep=Hv.extendDeep;fe.extendDeepAll=Hv.extendDeepAll;fe.extendDeepNoArrays=Hv.extendDeepNoArrays;var xp=ro();fe.log=xp.log;fe.warn=xp.warn;fe.error=xp.error;var XO=cs();fe.counterRegex=XO.counter;var _p=zv();fe.throttle=_p.throttle;fe.throttleDone=_p.done;fe.clearThrottle=_p.clear;var Wn=Gu();fe.getGraphDiv=Wn.getGraphDiv;fe.isPlotDiv=Wn.isPlotDiv;fe.removeElement=Wn.removeElement;fe.addStyleRule=Wn.addStyleRule;fe.addRelatedStyleRule=Wn.addRelatedStyleRule;fe.deleteRelatedStyleRule=Wn.deleteRelatedStyleRule;fe.setStyleOnHover=Wn.setStyleOnHover;fe.getFullTransformMatrix=Wn.getFullTransformMatrix;fe.getElementTransformMatrix=Wn.getElementTransformMatrix;fe.getElementAndAncestors=Wn.getElementAndAncestors;fe.equalDomRects=Wn.equalDomRects;fe.clearResponsive=w4();fe.preserveDrawingBuffer=A4();fe.makeTraceGroups=C4();fe._=L4();fe.notifier=Q1();fe.filterUnique=D4();fe.filterVisible=P4();fe.pushUnique=ep();fe.increment=z4();fe.cleanNumber=F4();fe.ensureNumber=function(r){return U4(r)?(r=Number(r),r>V4||r=r?!1:U4(e)&&e>=0&&e%1===0};fe.noop=_v();fe.identity=fp();fe.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};fe.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};fe.simpleMap=function(e,r,t,a,n){for(var i=e.length,l=new Array(i),o=0;o=Math.pow(2,t)?n>10?(fe.warn("randstr failed uniqueness"),l):e(r,t,a,(n||0)+1):l};fe.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};fe.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),l=new Array(t),o,s,u,f;for(o=0;o=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];l[o]=f}return l};fe.syncOrAsync=function(e,r,t){var a,n;function i(){return fe.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};fe.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};fe.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,l;for(i=0;i0?n:0})};fe.fillArray=function(e,r,t,a){if(a=a||fe.identity,fe.isArrayOrTypedArray(e))for(var n=0;n1?n+l[1]:"";if(i&&(l.length>1||o.length>4||t))for(;a.test(o);)o=o.replace(a,"$1"+i+"$2");return o+s};fe.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var J4=/^\w*$/;fe.templateString=function(e,r){var t={};return e.replace(fe.TEMPLATE_STRING_REGEX,function(a,n){var i;return J4.test(n)?i=r[n]:(t[n]=t[n]||fe.nestedProperty(r,n).get,i=t[n]()),fe.isValidTextValue(i)?i:""})};var eB={max:10,count:0,name:"hovertemplate"};fe.hovertemplateString=function(){return wp.apply(eB,arguments)};var rB={max:10,count:0,name:"texttemplate"};fe.texttemplateString=function(){return wp.apply(rB,arguments)};var tB=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function aB(e){var r=e.match(tB);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var nB={max:10,count:0,name:"texttemplate",parseMultDiv:!0};fe.texttemplateStringForShapes=function(){return wp.apply(nB,arguments)};var O4=/^[:|\|]/;function wp(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(fe.TEMPLATE_STRING_REGEX,function(l,o,s){var u=o==="xother"||o==="yother",f=o==="_xother"||o==="_yother",v=o==="_xother_"||o==="_yother_",h=o==="xother_"||o==="yother_",d=u||f||h||v,m=o;(f||v)&&(m=m.substring(1)),(h||v)&&(m=m.substring(0,m.length-1));var g=null,y=null;if(a.parseMultDiv){var w=aB(m);m=w.key,g=w.op,y=w.number}var _;if(d){if(_=r[m],_===void 0)return""}else{var T,b;for(b=3;b=Iv&&l<=B4,u=o>=Iv&&o<=B4;if(s&&(a=10*a+l-Iv),u&&(n=10*n+o-Iv),!s||!u){if(a!==n)return a-n;if(l!==o)return l-o}}return n-a};var bs=2e9;fe.seedPseudoRandom=function(){bs=2e9};fe.pseudoRandom=function(){var e=bs;return bs=(69069*bs+1)%4294967296,Math.abs(bs-e)<429496729?fe.pseudoRandom():bs/4294967296};fe.fillText=function(e,r,t){var a=Array.isArray(t)?function(l){t.push(l)}:function(l){t.text=l},n=fe.extractOption(e,r,"htx","hovertext");if(fe.isValidTextValue(n))return a(n);var i=fe.extractOption(e,r,"tx","text");if(fe.isValidTextValue(i))return a(i)};fe.isValidTextValue=function(e){return e||e===0};fe.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,fe.strTranslate(n-u*(t+l),i-u*(a+o))+fe.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};fe.setTransormAndDisplay=function(e,r){e.attr("transform",fe.getTextTransform(r)),e.style("display",r.scale?null:"none")};fe.ensureUniformFontSize=function(e,r){var t=fe.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};fe.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};fe.bigFont=function(e){return Math.round(1.2*e)};var Y4=fe.getFirefoxVersion(),iB=Y4!==null&&Y4<86;fe.getPositionFromD3Event=function(){return iB?[Qu.event.layerX,Qu.event.layerY]:[Qu.event.offsetX,Qu.event.offsetY]}});var j4=Z(()=>{"use strict";var lB=He(),Q4={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Tp in Q4)$4=Tp.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),lB.addStyleRule($4,Q4[Tp]);var $4,Tp});var Mp=Z(($le,e6)=>{e6.exports=!0});var kp=Z((jle,r6)=>{"use strict";var oB=Mp(),Ap;typeof window.matchMedia=="function"?Ap=!window.matchMedia("(hover: none)").matches:Ap=oB;r6.exports=Ap});var Yv=Z((eoe,Cp)=>{"use strict";var ws=typeof Reflect=="object"?Reflect:null,t6=ws&&typeof ws.apply=="function"?ws.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},Ov;ws&&typeof ws.ownKeys=="function"?Ov=ws.ownKeys:Object.getOwnPropertySymbols?Ov=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Ov=function(r){return Object.getOwnPropertyNames(r)};function sB(e){console&&console.warn&&console.warn(e)}var n6=Number.isNaN||function(r){return r!==r};function vt(){vt.init.call(this)}Cp.exports=vt;Cp.exports.once=vB;vt.EventEmitter=vt;vt.prototype._events=void 0;vt.prototype._eventsCount=0;vt.prototype._maxListeners=void 0;var a6=10;function Bv(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(vt,"defaultMaxListeners",{enumerable:!0,get:function(){return a6},set:function(e){if(typeof e!="number"||e<0||n6(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a6=e}});vt.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};vt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||n6(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function i6(e){return e._maxListeners===void 0?vt.defaultMaxListeners:e._maxListeners}vt.prototype.getMaxListeners=function(){return i6(this)};vt.prototype.emit=function(r){for(var t=[],a=1;a0&&(l=t[0]),l instanceof Error)throw l;var o=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw o.context=l,o}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")t6(s,this,t);else for(var u=s.length,f=f6(s,u),a=0;a0&&l.length>n&&!l.warned){l.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=r,o.count=l.length,sB(o)}return e}vt.prototype.addListener=function(r,t){return l6(this,r,t,!1)};vt.prototype.on=vt.prototype.addListener;vt.prototype.prependListener=function(r,t){return l6(this,r,t,!0)};function uB(){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 o6(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=uB.bind(a);return n.listener=t,a.wrapFn=n,n}vt.prototype.once=function(r,t){return Bv(t),this.on(r,o6(this,r,t)),this};vt.prototype.prependOnceListener=function(r,t){return Bv(t),this.prependListener(r,o6(this,r,t)),this};vt.prototype.removeListener=function(r,t){var a,n,i,l,o;if(Bv(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,l=a.length-1;l>=0;l--)if(a[l]===t||a[l].listener===t){o=a[l].listener,i=l;break}if(i<0)return this;i===0?a.shift():fB(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,o||t)}return this};vt.prototype.off=vt.prototype.removeListener;vt.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),l;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function s6(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?cB(n):f6(n,n.length)}vt.prototype.listeners=function(r){return s6(this,r,!0)};vt.prototype.rawListeners=function(r){return s6(this,r,!1)};vt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):u6.call(e,r)};vt.prototype.listenerCount=u6;function u6(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}vt.prototype.eventNames=function(){return this._eventsCount>0?Ov(this._events):[]};function f6(e,r){for(var t=new Array(r),a=0;a{"use strict";var Sp=Yv().EventEmitter,dB={init:function(e){if(e._ev instanceof Sp)return e;var r=new Sp,t=new Sp;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function l(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var o;for(o=0;o{"use strict";var h6=He(),pB=eo().dfltConfig;function mB(e,r){for(var t=[],a,n=0;npB.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Bi.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Bi.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Bi.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";m6.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var As=Z(Ut=>{"use strict";var _n=gr(),ju=He(),Gv=Gn(),qp=ds(),yB=Lp(),gB=Vu(),bB=eo().configAttributes,y6=pi(),Zn=ju.extendDeepAll,Ts=ju.isPlainObject,xB=ju.isArrayOrTypedArray,Vv=ju.nestedProperty,_B=ju.valObjectMeta,Dp="_isSubplotObj",Wv="_isLinkedToArray",wB="_arrayAttrRegexps",b6="_deprecated",Ep=[Dp,Wv,wB,b6];Ut.IS_SUBPLOT_OBJ=Dp;Ut.IS_LINKED_TO_ARRAY=Wv;Ut.DEPRECATED=b6;Ut.UNDERSCORE_ATTRS=Ep;Ut.get=function(){var e={};return _n.allTypes.forEach(function(r){e[r]=MB(r)}),{defs:{valObjects:_B,metaKeys:Ep.concat(["description","role","editType","impliedEdits"]),editType:{traces:y6.traces,layout:y6.layout},impliedEdits:{}},traces:e,layout:AB(),frames:kB(),animation:Ms(gB),config:Ms(bB)}};Ut.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var l=e[i];if(Ep.indexOf(i)===-1){var o=(a?a+".":"")+i;r(l,i,e,n,o),!Ut.isValObject(l)&&Ts(l)&&i!=="impliedEdits"&&Ut.crawl(l,r,n+1,o)}})};Ut.isValObject=function(e){return e&&e.valType!==void 0};Ut.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function l(s,u,f,v){t=t.slice(0,v).concat([u]),a=a.slice(0,v).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[v-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&o(n,0,"")}function o(s,u,f){var v=s[t[u]],h=f+t[u];if(u===t.length-1)xB(v)&&r.push(i+h);else if(a[u]){if(Array.isArray(v))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var l=r[t];if(!Uv(l))return!1;e=i[n][l]}else e=i[n]}else e=i}}return e}function Uv(e){return e===Math.round(e)&&e>=0}function MB(e){var r,t;r=_n.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=Zn({},Gv),i=Zn({},r.attributes);Ut.crawl(i,function(s,u,f,v,h){Vv(n,h).set(void 0),s===void 0&&Vv(i,h).set(void 0)}),Zn(a,n),_n.traceIs(e,"noOpacity")&&delete a.opacity,_n.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),_n.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,Zn(a,i),t.attributes&&Zn(a,t.attributes),a.type=e;var l={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:Ms(a)};if(r.layoutAttributes){var o={};Zn(o,r.layoutAttributes),l.layoutAttributes=Ms(o)}return r.animatable||Ut.crawl(l,function(s){Ut.isValObject(s)&&"anim"in s&&delete s.anim}),l}function AB(){var e={},r,t;Zn(e,qp);for(r in _n.subplotsRegistry)if(t=_n.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var ks=He(),DB=Gn(),dl="templateitemname",Pp={name:{valType:"string",editType:"none"}};Pp[dl]={valType:"string",editType:"calc"};lo.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=Pp.name,r[dl]=Pp[dl],r};lo.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=ks.coerce(i,{},DB,"type");var l={type:t,_template:null};if(t in r){a=e[t];var o=r[t]%a.length;r[t]++,l._template=a[o]}return l}return{newTrace:n}};lo.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);ks.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};lo.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[w6(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function o(u){var f={name:u.name,_input:u},v=f[dl]=u[dl];if(!_6(v))return f._template=n,f;for(var h=0;h=a&&(t._input||{})._templateitemname;i&&(n=a);var l=r+"["+n+"]",o;function s(){o={},i&&(o[l]={},o[l][dl]=i)}s();function u(d,m){o[d]=m}function f(d,m){i?ks.nestedProperty(o[l],d).set(m):o[l+"."+d]=m}function v(){var d=o;return s(),d}function h(d,m){d&&f(d,m);var g=v();for(var y in g)ks.nestedProperty(e,y).set(g[y])}return{modifyBase:u,modifyItem:f,getUpdateObj:v,applyUpdate:h}}});var da=Z((loe,T6)=>{"use strict";var ef=cs().counter;T6.exports={idRegex:{x:ef("x","( domain)?"),y:ef("y","( domain)?")},attrRegex:ef("[xy]axis"),xAxisMatch:ef("xaxis"),yAxisMatch:ef("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 Xt=Z(Ja=>{"use strict";var EB=gr(),Rp=da();Ja.id2name=function(r){if(!(typeof r!="string"||!r.match(Rp.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};Ja.name2id=function(r){if(r.match(Rp.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};Ja.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(Rp.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};Ja.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=Ja.listIds(e,r),i=new Array(n.length),l;for(l=0;la?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};Ja.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function M6(e,r){if(r&&r.length){for(var t=0;t{"use strict";function PB(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function RB(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}A6.exports={clearOutlineControllers:PB,clearOutline:RB}});var Zv=Z((uoe,k6)=>{"use strict";k6.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var zp=Z(Jv=>{"use strict";var Xv=gr(),foe=da().SUBPLOT_PATTERN;Jv.getSubplotCalcData=function(e,r,t){var a=Xv.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],l=0;l{"use strict";var zB=gr(),Cs=He();oo.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var l=oo.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(l)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(l){C6(e,l,n.cache),n.check=function(){if(i){var f=C6(e,l,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:l.type,prop:l.prop,traces:l.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var o=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;Cs.isPlainObject(i)?Np(i,r,l,a+1):r(l,n,i)}})}});var Pt=Z((hoe,G6)=>{"use strict";var F6=Ir(),FB=os().timeFormatLocale,IB=O1().formatLocale,rf=Hr(),HB=B1(),Xr=gr(),I6=As(),OB=ct(),ur=He(),H6=Er(),D6=Bt().BADNUM,Ka=Xt(),BB=pl().clearOutline,YB=Zv(),Fp=Vu(),UB=Lp(),GB=zp().getModuleCalcData,E6=ur.relinkPrivateKeys,so=ur._,je=G6.exports={};ur.extendFlat(je,Xr);je.attributes=Gn();je.attributes.type.values=je.allTypes;je.fontAttrs=ha();je.layoutAttributes=ds();var Qv=q6();je.executeAPICommand=Qv.executeAPICommand;je.computeAPICommandBindings=Qv.computeAPICommandBindings;je.manageCommandObserver=Qv.manageCommandObserver;je.hasSimpleAPICommandBindings=Qv.hasSimpleAPICommandBindings;je.redrawText=function(e){return e=ur.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Xr.getComponentMethod("annotations","draw")(e),Xr.getComponentMethod("legend","draw")(e),Xr.getComponentMethod("colorbar","draw")(e),r(je.previousPromises(e)))},300)})};je.resize=function(e){e=ur.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||ur.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||ur.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Xr.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};je.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};je.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=ur.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:H6.defaultLine,"pointer-events":"all"}).each(function(){var u=F6.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),l=t.select(".js-link-spacer"),o=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&VB(e,i),l.text(i.text()&&o.text()?" - ":"")}};function VB(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){je.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}je.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=F6.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=je.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var WB=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],ZB=["year","month","dayMonth","dayMonthYear"];je.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},l=e._fullData||[],o=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},v;e._transitionData||je.createTransitionData(e),n._dfltTitle={plot:so(e,"Click to enter Plot title"),subtitle:so(e,"Click to enter Plot subtitle"),x:so(e,"Click to enter X axis title"),y:so(e,"Click to enter Y axis title"),colorbar:so(e,"Click to enter Colorscale title"),annotation:so(e,"new text")},n._traceWord=so(e,"trace");var h=P6(e,WB);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,m=a.height;je.supplyLayoutGlobalDefaults(i,n,h),i.width||(n.width=d),i.height||(n.height=m),je.sanitizeMargins(n)}else{je.supplyLayoutGlobalDefaults(i,n,h);var g=!i.width||!i.height,y=n.autosize,w=f.autosizable,_=g&&(y||w);_?je.plotAutoSize(e,i,n):g&&je.sanitizeMargins(n),!y&&g&&(i.width=n.width,i.height=n.height)}n._d3locale=KB(h,n.separators),n._extraFormat=P6(e,ZB),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var T=n._subplots=JB(),b=n._splomAxes={x:{},y:{}},M=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=XB(l,s),je.supplyDataDefaults(s,o,i,n);var S=Object.keys(b.x),C=Object.keys(b.y);if(S.length>1&&C.length>1){for(Xr.getComponentMethod("grid","sizeDefaults")(i,n),v=0;v15&&C.length>15&&n.shapes.length===0&&n.images.length===0,je.linkSubplots(o,n,l,a),je.cleanPlot(o,n,l,a);var F=!!(a._has&&a._has("cartesian")),H=!!(n._has&&n._has("cartesian")),O=F,X=H;O&&!X?a._bgLayer.remove():X&&!O&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&BB({_fullLayout:a}),QB(o,n),E6(n,a),Xr.getComponentMethod("colorscale","crossTraceDefaults")(o,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var J=n._tracePreGUI,B={},I;for(I in J)B[I]="old";for(v=0;v0){var f=1-2*i;l=Math.round(f*l),o=Math.round(f*o)}}var v=je.layoutAttributes.width.min,h=je.layoutAttributes.height.min;l1,m=!t.height&&Math.abs(a.height-o)>1;(m||d)&&(d&&(a.width=l),m&&(a.height=o)),r._initialAutoSize||(r._initialAutoSize={width:l,height:o}),je.sanitizeMargins(a)};je.supplyLayoutModuleDefaults=function(e,r,t,a){var n=Xr.componentsRegistry,i=r._basePlotModules,l,o,s,u=Xr.subplotsRegistry.cartesian;for(l in n)s=n[l],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Xr.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(ur.subplotSort);for(o=0;o1&&(t.l/=y,t.r/=y)}if(h){var w=(t.t+t.b)/h;w>1&&(t.t/=w,t.b/=w)}var _=t.xl!==void 0?t.xl:t.x,T=t.xr!==void 0?t.xr:t.x,b=t.yt!==void 0?t.yt:t.y,M=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:_,size:t.l+g},r:{val:T,size:t.r+g},b:{val:M,size:t.b+g},t:{val:b,size:t.t+g}},m[r]=1}if(!a._replotting)return je.doAutoMargin(e)}};function jB(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=Ka.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}je.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),O6(r);var n=r._size,i=r.margin,l={t:0,b:0,l:0,r:0},o=ur.extendFlat({},n),s=i.l,u=i.r,f=i.t,v=i.b,h=r._pushmargin,d=r._pushmarginIds,m=r.minreducedwidth,g=r.minreducedheight;if(i.autoexpand!==!1){for(var y in h)d[y]||delete h[y];var w=e._fullLayout._reservedMargin;for(var _ in w)for(var T in w[_]){var b=w[_][T];l[T]=Math.max(l[T],b)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:v}};for(var M in l){var S=0;for(var C in h)C!=="base"&&rf(h[C][M].size)&&(S=h[C][M].size>S?h[C][M].size:S);var q=Math.max(0,i[M]-S);l[M]=Math.max(0,l[M]-q)}for(var D in h){var R=h[D].l||{},z=h[D].b||{},F=R.val,H=R.size,O=z.val,X=z.size,J=t-l.r-l.l,B=a-l.t-l.b;for(var I in h){if(rf(H)&&h[I].r){var W=h[I].r.val,K=h[I].r.size;if(W>F){var Q=(H*W+(K-J)*F)/(W-F),ie=(K*(1-F)+(H-J)*(1-W))/(W-F);Q+ie>s+u&&(s=Q,u=ie)}}if(rf(X)&&h[I].t){var me=h[I].t.val,pe=h[I].t.size;if(me>O){var ge=(X*me+(pe-B)*O)/(me-O),j=(pe*(1-O)+(X-B)*(1-me))/(me-O);ge+j>v+f&&(v=ge,f=j)}}}}}var _e=ur.constrain(t-i.l-i.r,B6,m),se=ur.constrain(a-i.t-i.b,Y6,g),Se=Math.max(0,t-_e),ve=Math.max(0,a-se);if(Se){var Ae=(s+u)/Se;Ae>1&&(s/=Ae,u/=Ae)}if(ve){var Y=(v+f)/ve;Y>1&&(v/=Y,f/=Y)}if(n.l=Math.round(s)+l.l,n.r=Math.round(u)+l.r,n.t=Math.round(f)+l.t,n.b=Math.round(v)+l.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(je.didMarginChange(o,n)||jB(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var re=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};je.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&je.supplyDefaults(e);var l=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(ur.isPlainObject(h)){var m={},g;return Object.keys(h).sort().forEach(function(T){if(["_","["].indexOf(T.charAt(0))===-1){if(typeof h[T]=="function"){d&&(m[T]="_function");return}if(t==="keepdata"){if(T.substr(T.length-3)==="src")return}else if(t==="keepstream"){if(g=h[T+"src"],typeof g=="string"&&g.indexOf(":")>0&&!ur.isPlainObject(h.stream))return}else if(t!=="keepall"&&(g=h[T+"src"],typeof g=="string"&&g.indexOf(":")>0))return;m[T]=u(h[T],d)}}),m}var y=Array.isArray(h),w=ur.isTypedArray(h);if((y||w)&&h.dtype&&h.shape){var _=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:ur.isArrayBuffer(_)?HB.encode(_):_},d)}return y?h.map(function(T){return u(T,d)}):w?ur.simpleMap(h,ur.identity):ur.isJSDate(h)?ur.ms2DateTimeLocal(+h):h}var f={data:(l||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(o),n)){var v=o._size;f.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};je.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,l=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xr.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function m(){return h++,function(){d++,!a&&d===h&&o(v)}}t.runFn(m),setTimeout(m())})}function o(v){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Xr.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(v)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[je.previousPromises,s,t.prepareFn,je.rehover,je.reselect,l],f=ur.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}je.doCalcdata=function(e,r){var t=Ka.list(e),a=e._fullData,n=e._fullLayout,i,l,o,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},o=0;o=0;s--)if(M[s].enabled){i._indexToPoints=M[s]._indexToPoints;break}l&&l.calc&&(b=l.calc(e,i))}(!Array.isArray(b)||!b[0])&&(b=[{x:D6,y:D6}]),b[0].t||(b[0].t={}),b[0].trace=i,u[_]=b}}for(z6(t,a,n),o=0;o{"use strict";uo.xmlns="http://www.w3.org/2000/xmlns/";uo.svg="http://www.w3.org/2000/svg";uo.xlink="http://www.w3.org/1999/xlink";uo.svgAttrs={xmlns:uo.svg,"xmlns:xlink":uo.xlink}});var Da=Z((poe,V6)=>{"use strict";V6.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 xa=Z(wn=>{"use strict";var Rt=Ir(),Yi=He(),aY=Yi.strTranslate,Ip=fo(),nY=Da().LINE_SPACING,iY=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;wn.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(iY),i=Rt.select(e.node().parentNode);if(i.empty())return;var l=e.attr("class")?e.attr("class").split(" ")[0]:"text";l+="-math",i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function o(){i.empty()||(l=e.attr("class")+"-math",i.select("svg."+l).remove()),e.text("").style("white-space","pre");var s=gY(e.node(),a);s&&e.style("pointer-events","all"),wn.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};uY(n[2],f,function(v,h,d){i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove();var m=v&&v.select("svg");if(!m||!m.node()){o(),s();return}var g=i.append("g").classed(l+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});g.node().appendChild(m.node()),h&&h.node()&&m.node().insertBefore(h.node().cloneNode(!0),m.node().firstChild);var y=d.width,w=d.height;m.attr({class:l,height:w,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _=e.node().style.fill||"black",T=m.select("g");T.attr({fill:_,stroke:_});var b=T.node().getBoundingClientRect(),M=b.width,S=b.height;(M>y||S>w)&&(m.style("overflow","hidden"),b=m.node().getBoundingClientRect(),M=b.width,S=b.height);var C=+e.attr("x"),q=+e.attr("y"),D=u||e.node().getBoundingClientRect().height,R=-D/4;if(l[0]==="y")g.attr({transform:"rotate("+[-90,C,q]+")"+aY(-M/2,R-S/2)});else if(l[0]==="l")q=R-S/2;else if(l[0]==="a"&&l.indexOf("atitle")!==0)C=0,q=R;else{var z=e.attr("text-anchor");C=C-M*(z==="middle"?.5:z==="end"?1:0),q=q+R-S/2}m.attr({x:C,y:q}),t&&t.call(e,g),s(g)})})):o(),e};var lY=/(<|<|<)/g,oY=/(>|>|>)/g;function sY(e){return e.replace(lY,"\\lt ").replace(oY,"\\gt ")}var W6=[["$","$"],["\\(","\\)"]];function uY(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){Yi.warn("No MathJax version:",MathJax.version);return}var n,i,l,o,s=function(){return i=Yi.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:W6},displayAlign:"left"})},u=function(){i=Yi.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=W6},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},v=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var _="math-output-"+Yi.randstr({},64);o=Rt.select("body").append("div").attr({id:_}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(sY(e));var T=o.node();return a===2?MathJax.Hub.Typeset(T):MathJax.typeset([T])},d=function(){var _=o.select(a===2?".MathJax_SVG":".MathJax"),T=!_.empty()&&o.select("svg").node();if(!T)Yi.log("There was an error in the tex syntax.",e),t();else{var b=T.getBoundingClientRect(),M;a===2?M=Rt.select("body").select("#MathJax_SVG_glyphs"):M=_.select("defs"),t(_,M,b)}o.remove()},m=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},g=function(){n!=="svg"&&(MathJax.config.startup.output=n)},y=function(){return l!==void 0&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(i)},w=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,h,d,m,y):a===3&&(u(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),g(),w()}))}var K6={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"},fY={sub:"0.3em",sup:"-0.6em"},cY={sub:"-0.21em",sup:"0.42em"},Z6="\u200B",X6=["http:","https:","mailto:","",void 0,":"],Q6=wn.NEWLINES=/(\r\n?|\n)/g,Op=/(<[^<>]*>)/,Bp=/<(\/?)([^ >]*)(\s+(.*))?>/i,vY=//i;wn.BR_TAG_ALL=//gi;var $6=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,j6=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,e7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,hY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function co(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&$v(a)}var dY=/(^|;)\s*color:/;wn.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,l=e.split(Op),o=[],s="",u=0,f=0;fi?o.push(v.substr(0,g-i)+n):o.push(v.substr(0,g));break}s=""}}return o.join("")};var pY={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},mY=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function $v(e){return e.replace(mY,function(r,t){var a;return t.charAt(0)==="#"?a=yY(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=pY[t],a||r})}wn.convertEntities=$v;function yY(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function gY(e,r){r=r.replace(Q6," ");var t=!1,a=[],n,i=-1;function l(){i++;var S=document.createElementNS(Ip.svg,"tspan");Rt.select(S).attr({class:"line",dy:i*nY+"em"}),e.appendChild(S),n=S;var C=a;if(a=[{node:S}],C.length>1)for(var q=1;q.",r);return}var C=a.pop();S!==C.type&&Yi.log("Start tag <"+C.type+"> doesnt match end tag <"+S+">. Pretending it did match.",r),n=a[a.length-1].node}var f=vY.test(r);f?l():(n=e,a=[{node:e}]);for(var v=r.split(Op),h=0;h{"use strict";var bY=Ir(),e0=bn(),af=Hr(),jv=He(),t7=Er(),xY=$l().isValid;function _Y(e,r,t){var a=r?jv.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if(jv.isArrayOrTypedArray(n)){for(var l=0;l=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function s7(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),l=0;l{"use strict";var f7=ip(),TY=f7.FORMAT_LINK,MY=f7.DATE_FORMAT_LINK;function AY(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?Yp:c7)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function Yp(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+TY+"."].join(" ")}function c7(e,r){return Yp(e,r)+[" And for dates see: "+MY+".","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(" ")}v7.exports={axisHoverFormat:AY,descriptionOnlyNumbers:Yp,descriptionWithDates:c7}});var Xn=Z((boe,L7)=>{"use strict";var h7=ha(),Ss=hi(),S7=mi().dash,Gp=Yt().extendFlat,d7=ct().templatedArray,p7=r0().descriptionWithDates,kY=Bt().ONEDAY,gi=da(),CY=gi.HOUR_PATTERN,SY=gi.WEEKDAY_PATTERN,Up={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},LY=Gp({},Up,{values:Up.values.slice().concat(["sync"])});function m7(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var y7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},b7={valType:"data_array",editType:"ticks"},x7={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function _7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function w7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var T7={valType:"color",dflt:Ss.defaultLine,editType:"ticks"},M7={valType:"color",dflt:Ss.lightLine,editType:"ticks"};function A7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var k7=Gp({},S7,{editType:"ticks"}),C7={valType:"boolean",editType:"ticks"};L7.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Ss.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:h7({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[gi.idRegex.x.toString(),gi.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:[gi.idRegex.x.toString(),gi.idRegex.y.toString()],editType:"calc"},rangebreaks:d7("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:[SY,CY,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:kY},editType:"calc"}),tickmode:LY,nticks:m7(),tick0:y7,dtick:g7,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:b7,ticktext:{valType:"data_array",editType:"ticks"},ticks:x7,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:_7(),tickwidth:w7(),tickcolor:T7,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:Gp({},S7,{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:h7({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:p7("tick label")},tickformatstops:d7("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:p7("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Ss.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:C7,gridcolor:M7,gridwidth:A7(),griddash:k7,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Ss.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Ss.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",gi.idRegex.x.toString(),gi.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",gi.idRegex.x.toString(),gi.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Up,nticks:m7("minor"),tick0:y7,dtick:g7,tickvals:b7,ticks:x7,ticklen:_7("minor"),tickwidth:w7("minor"),tickcolor:T7,gridcolor:M7,gridwidth:A7("minor"),griddash:k7,showgrid:C7,editType:"ticks"},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 t0=Z((xoe,E7)=>{"use strict";var ht=Xn(),q7=ha(),D7=Yt().extendFlat,qY=pi().overrideAll;E7.exports=qY({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:ht.linecolor,outlinewidth:ht.linewidth,bordercolor:ht.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:ht.minor.tickmode,nticks:ht.nticks,tick0:ht.tick0,dtick:ht.dtick,tickvals:ht.tickvals,ticktext:ht.ticktext,ticks:D7({},ht.ticks,{dflt:""}),ticklabeloverflow:D7({},ht.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:ht.ticklen,tickwidth:ht.tickwidth,tickcolor:ht.tickcolor,ticklabelstep:ht.ticklabelstep,showticklabels:ht.showticklabels,labelalias:ht.labelalias,tickfont:q7({}),tickangle:ht.tickangle,tickformat:ht.tickformat,tickformatstops:ht.tickformatstops,tickprefix:ht.tickprefix,showtickprefix:ht.showtickprefix,ticksuffix:ht.ticksuffix,showticksuffix:ht.showticksuffix,separatethousands:ht.separatethousands,exponentformat:ht.exponentformat,minexponent:ht.minexponent,showexponent:ht.showexponent,title:{text:{valType:"string"},font:q7({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var nf=Z((woe,R7)=>{"use strict";var DY=t0(),EY=cs().counter,PY=hp(),P7=$l().scales,_oe=PY(P7);function a0(e){return"`"+e+"`"}R7.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",l="showScaleDflt"in t?t.showScaleDflt:a==="z",o=typeof t.colorscaleDflt=="string"?P7[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,v;"colorAttr"in t?(f=t.colorAttr,v=t.colorAttr):(f={z:"z",c:"color"}[a],v="in "+a0(u+f));var h=n?" Has an effect only if "+v+" is set to a numerical array.":"",d=a+"auto",m=a+"min",g=a+"max",y=a+"mid",w=a0(u+d),_=a0(u+m),T=a0(u+g),b=_+" and "+T,M={};M[m]=M[g]=void 0;var S={};S[d]=!1;var C={};return f==="color"&&(C.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M},C[m]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},C[g]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},C[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:M},C.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(C.showscale={valType:"boolean",dflt:l,editType:"calc"},C.colorbar=DY),t.noColorAxis||(C.coloraxis={valType:"subplotid",regex:EY("coloraxis"),dflt:null,editType:"calc"}),C}});var Wp=Z((Toe,z7)=>{"use strict";var RY=Yt().extendFlat,zY=nf(),Vp=$l().scales;z7.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Vp.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Vp.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Vp.RdBu,editType:"calc"}},coloraxis:RY({_isSubplotObj:!0,editType:"calc"},zY("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Zp=Z((Moe,N7)=>{"use strict";var NY=He();N7.exports=function(r){return NY.isPlainObject(r.colorbar)}});var Kp=Z(Jp=>{"use strict";var Xp=Hr(),F7=He(),I7=Bt(),FY=I7.ONEDAY,IY=I7.ONEWEEK;Jp.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?FY:1;if(!e)return i;if(Xp(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var l=e.charAt(0),o=e.substr(1);return o=Xp(o)?Number(o):0,o<=0||!(a&&l==="M"&&o===Math.round(o)||t&&l==="L"||t&&l==="D"&&(o===1||o===2))?i:e};Jp.tick0=function(e,r,t,a){if(r==="date")return F7.cleanDate(e,F7.dateTick0(t,a%IY===0?1:0));if(!(a==="D1"||a==="D2"))return Xp(e)?Number(e):0}});var Qp=Z((koe,O7)=>{"use strict";var H7=Kp(),HY=He().isArrayOrTypedArray,OY=nn().isTypedArraySpec,BY=nn().decodeTypedArraySpec;O7.exports=function(r,t,a,n,i){i||(i={});var l=i.isMinor,o=l?r.minor||{}:r,s=l?t.minor:t,u=l?"minor.":"";function f(_){var T=o[_];return OY(T)&&(T=BY(T)),T!==void 0?T:(s._template||{})[_]}var v=f("tick0"),h=f("dtick"),d=f("tickvals"),m=HY(d)?"array":h?"linear":"auto",g=a(u+"tickmode",m);if(g==="auto"||g==="sync")a(u+"nticks");else if(g==="linear"){var y=s.dtick=H7.dtick(h,n);s.tick0=H7.tick0(v,n,t.calendar,y)}else if(n!=="multicategory"){var w=a(u+"tickvals");w===void 0?s.tickmode="auto":l||a("ticktext")}}});var jp=Z((Coe,Y7)=>{"use strict";var $p=He(),B7=Xn();Y7.exports=function(r,t,a,n){var i=n.isMinor,l=i?r.minor||{}:r,o=i?t.minor:t,s=i?B7.minor:B7,u=i?"minor.":"",f=$p.coerce2(l,o,s,"ticklen",i?(t.ticklen||5)*.6:void 0),v=$p.coerce2(l,o,s,"tickwidth",i?t.tickwidth||1:void 0),h=$p.coerce2(l,o,s,"tickcolor",(i?t.tickcolor:void 0)||o.color),d=a(u+"ticks",!i&&n.outerTicks||f||v||h?"outside":"");d||(delete o.ticklen,delete o.tickwidth,delete o.tickcolor)}});var em=Z((Soe,U7)=>{"use strict";U7.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var Jn=Z((Loe,G7)=>{"use strict";var n0=He(),YY=ct();G7.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",l=t[n],o=n0.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=YY.arrayTemplater(t,n,i),f,v;for(f=0;f{"use strict";var rm=He(),UY=Er().contrast,V7=Xn(),GY=em(),VY=Jn();W7.exports=function(r,t,a,n,i){i||(i={});var l=a("labelalias");rm.isPlainObject(l)||delete t.labelalias;var o=GY(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,v=t.ticklabelposition||"",h=v.indexOf("inside")!==-1?UY(i.bgColor):f&&f!==V7.color.dflt?f:u.color;if(rm.coerceFont(a,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var m=a("tickformat");VY(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:WY}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!m&&n!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function WY(e,r){function t(n,i){return rm.coerce(e,r,V7.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var am=Z((Doe,Z7)=>{"use strict";var ZY=em();Z7.exports=function(r,t,a,n,i){i||(i={});var l=i.tickSuffixDflt,o=ZY(r),s=a("tickprefix");s&&a("showtickprefix",o);var u=a("ticksuffix",l);u&&a("showticksuffix",o)}});var nm=Z((Eoe,X7)=>{"use strict";var ml=He(),XY=ct(),JY=Qp(),KY=jp(),QY=tm(),$Y=am(),jY=t0();X7.exports=function(r,t,a){var n=XY.newContainer(t,"colorbar"),i=r.colorbar||{};function l(z,F){return ml.coerce(i,n,jY,z,F)}var o=a.margin||{t:0,b:0,l:0,r:0},s=a.width-o.l-o.r,u=a.height-o.t-o.b,f=l("orientation"),v=f==="v",h=l("thicknessmode");l("thickness",h==="fraction"?30/(v?s:u):30);var d=l("lenmode");l("len",d==="fraction"?1:v?u:s);var m=l("yref"),g=l("xref"),y=m==="paper",w=g==="paper",_,T,b,M="left";v?(b="middle",M=w?"left":"right",_=w?1.02:1,T=.5):(b=y?"bottom":"top",M="center",_=.5,T=y?1.02:1),ml.coerce(i,n,{x:{valType:"number",min:w?-2:0,max:w?3:1,dflt:_}},"x"),ml.coerce(i,n,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:T}},"y"),l("xanchor",M),l("xpad"),l("yanchor",b),l("ypad"),ml.noneOrAll(i,n,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var S=ml.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",S.indexOf("inside")!==-1?"hide past domain":"hide past div"),JY(i,n,l,"linear");var C=a.font,q={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};S.indexOf("inside")!==-1&&(q.bgColor="black"),$Y(i,n,l,"linear",q),QY(i,n,l,"linear",q),KY(i,n,l,"linear",q),l("title.text",a._dfltTitle.colorbar);var D=n.showticklabels?n.tickfont:C,R=ml.extendFlat({},C,{family:D.family,size:ml.bigFont(D.size)});ml.coerceFont(l,"title.font",R),l("title.side",v?"top":"right")}});var Ls=Z((Poe,Q7)=>{"use strict";var J7=Hr(),lm=He(),eU=Zp(),rU=nm(),K7=$l().isValid,tU=gr().traceIs;function im(e,r){var t=r.slice(0,r.length-1);return r?lm.nestedProperty(e,t).get()||{}:e}Q7.exports=function e(r,t,a,n,i){var l=i.prefix,o=i.cLetter,s="_module"in t,u=im(r,l),f=im(t,l),v=im(t._template||{},l)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},m=n(l+"coloraxis");if(m){var g=tU(t,"contour")&&lm.nestedProperty(t,"contours.coloring").get()||"heatmap",y=d[m];y?(y[2].push(h),y[0]!==g&&(y[0]=!1,lm.warn(["Ignoring coloraxis:",m,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[m]=[g,t,[h]];return}}var w=u[o+"min"],_=u[o+"max"],T=J7(w)&&J7(_)&&w<_,b=n(l+o+"auto",!T);b?n(l+o+"mid"):(n(l+o+"min"),n(l+o+"max"));var M=u.colorscale,S=v.colorscale,C;if(M!==void 0&&(C=!K7(M)),S!==void 0&&(C=!K7(S)),n(l+"autocolorscale",C),n(l+"colorscale"),n(l+"reversescale"),l!=="marker.line."){var q;l&&s&&(q=eU(u));var D=n(l+"showscale",q);D&&(l&&v&&(f._template=v),rU(u,f,a))}}});var r9=Z((Roe,e9)=>{"use strict";var $7=He(),aU=ct(),j7=Wp(),nU=Ls();e9.exports=function(r,t){function a(v,h){return $7.coerce(r,t,j7,v,h)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,l;function o(v,h){return $7.coerce(i,l,j7.coloraxis,v,h)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},l=aU.newContainer(t,s,"coloraxis"),l._name=s,nU(i,l,t,o,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var iU=He(),lU=Tn().hasColorscale,oU=Tn().extractOpts;t9.exports=function(r,t){function a(f,v){var h=f["_"+v];h!==void 0&&(f[v]=h)}function n(f,v){var h=v.container?iU.nestedProperty(f,v.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=oU(h),m=d.auto;(m||d.min===void 0)&&a(h,v.min),(m||d.max===void 0)&&a(h,v.max),d.autocolorscale&&a(h,"colorscale")}}for(var i=0;i{"use strict";var n9=Hr(),om=He(),sU=Tn().extractOpts;i9.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,l=a.containerStr,o=l?om.nestedProperty(t,l).get():t,s=sU(o),u=s.auto!==!1,f=s.min,v=s.max,h=s.mid,d=function(){return om.aggNums(Math.min,null,i)},m=function(){return om.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(o._colorAx&&n9(f)?f=Math.min(f,d()):f=d()),v===void 0?v=m():u&&(o._colorAx&&n9(v)?v=Math.max(v,m()):v=m()),u&&h!==void 0&&(v-h>h-f?f=h-(v-h):v-h=0?g=n.colorscale.sequential:g=n.colorscale.sequentialminus,s._sync("colorscale",g)}}});var sm=Z((Foe,l9)=>{"use strict";var l0=$l(),qs=Tn();l9.exports={moduleType:"component",name:"colorscale",attributes:nf(),layoutAttributes:Wp(),supplyLayoutDefaults:r9(),handleDefaults:Ls(),crossTraceDefaults:a9(),calc:i0(),scales:l0.scales,defaultScale:l0.defaultScale,getScale:l0.get,isValidScale:l0.isValid,hasColorscale:qs.hasColorscale,extractOpts:qs.extractOpts,extractScale:qs.extractScale,flipScale:qs.flipScale,makeColorScaleFunc:qs.makeColorScaleFunc,makeColorScaleFuncFromTrace:qs.makeColorScaleFuncFromTrace}});var on=Z((Ioe,s9)=>{"use strict";var o9=He(),uU=nn().isTypedArraySpec;s9.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 r=e.marker;return o9.isPlainObject(r)&&(o9.isArrayOrTypedArray(r.size)||uU(r.size))}}});var f9=Z((Hoe,u9)=>{"use strict";var fU=Hr();u9.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,l=a.sizemode==="area"?function(o){return Math.sqrt(o/n)}:function(o){return o/n};return function(o){var s=l(o/t);return fU(s)&&s>0?Math.max(s,i):0}}});var bi=Z(_a=>{"use strict";var c9=He();_a.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};_a.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{d9.exports=pU;var um={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},dU=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function pU(e){var r=[];return e.replace(dU,function(t,a,n){var i=a.toLowerCase();for(n=yU(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==um[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var gU=fm(),Xe=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},Ar="M0,0Z",p9=Math.sqrt(2),yl=Math.sqrt(3),cm=Math.PI,vm=Math.cos,hm=Math.sin;x9.exports={circle:{n:0,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Cr(r,t,n):n}},square:{n:1,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.4,2),n=Xe(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.8/p9,2),n="l"+a+","+a,i="l"+a+",-"+a,l="l-"+a+",-"+a,o="l-"+a+","+a;return Cr(r,t,"M0,"+a+n+i+l+i+l+o+l+o+n+o+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.951,2),n=Xe(e*.588,2),i=Xe(-e,2),l=Xe(e*-.309,2),o=Xe(e*.809,2);return Cr(r,t,"M"+a+","+l+"L"+n+","+o+"H-"+n+"L-"+a+","+l+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e/2,2),i=Xe(e*yl/2,2);return Cr(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e/2,2),i=Xe(e*yl/2,2);return Cr(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.924,2),n=Xe(e*.383,2);return Cr(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(kr(r))return Ar;var a=e*1.4,n=Xe(a*.225,2),i=Xe(a*.951,2),l=Xe(a*.363,2),o=Xe(a*.588,2),s=Xe(-a,2),u=Xe(a*-.309,2),f=Xe(a*.118,2),v=Xe(a*.809,2),h=Xe(a*.382,2);return Cr(r,t,"M"+n+","+u+"H"+i+"L"+l+","+f+"L"+o+","+v+"L0,"+h+"L-"+o+","+v+"L-"+l+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.66,2),n=Xe(e*.38,2),i=Xe(e*.76,2);return Cr(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*yl*.8,2),n=Xe(e*.8,2),i=Xe(e*1.6,2),l=Xe(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Cr(r,t,"M-"+a+","+n+o+a+","+n+o+"0,-"+i+o+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*yl*.8,2),n=Xe(e*.8,2),i=Xe(e*1.6,2),l=Xe(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Cr(r,t,"M"+a+",-"+n+o+"-"+a+",-"+n+o+"0,"+i+o+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.1,2),n=Xe(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2),n=Xe(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.7,2),n=Xe(e*1.4,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2),n=Xe(e*.7,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e/p9,2);return Cr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.3,2),n=Xe(e*.65,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*.85,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e/2,2),n=Xe(e,2);return Cr(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2);return Cr(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(kr(r))return Ar;var a=cm/2.5,n=2*e*vm(a),i=2*e*hm(a);return Cr(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(kr(r))return Ar;var a=cm/4,n=2*e*vm(a),i=2*e*hm(a);return Cr(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function kr(e){return e===null}var m9,y9,g9,b9;function Cr(e,r,t){if((!e||e%360===0)&&!r)return t;if(g9===e&&b9===r&&m9===t)return y9;g9=e,b9=r,m9=t;function a(y,w){var _=vm(y),T=hm(y),b=w[0],M=w[1]+(r||0);return[b*_-M*T,b*T+M*_]}for(var n=e/180*cm,i=0,l=0,o=gU(t),s="",u=0;u{"use strict";var Jt=Ir(),nt=He(),bU=nt.numberFormat,mo=Hr(),bm=bn(),s0=gr(),pa=Er(),xU=sm(),of=nt.strTranslate,u0=xa(),_U=fo(),wU=Da(),TU=wU.LINE_SPACING,D9=bv().DESELECTDIM,MU=on(),AU=f9(),kU=bi().appendArrayPointValue,Qe=B9.exports={};Qe.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,l=r.size,o=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;o&&e.style("font-family",o),l+1&&e.style("font-size",l+"px"),i&&e.call(pa.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",dm(SU(f))),s&&e.style("text-shadow",s==="auto"?u0.makeTextShadow(pa.contrast(i)):dm(s)),u&&e.style("text-decoration-line",dm(LU(u)))};function dm(e){return e==="none"?void 0:e}var CU={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function SU(e){return CU[e]}function LU(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Qe.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Qe.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Qe.setRect=function(e,r,t,a,n){e.call(Qe.setPosition,r,t).call(Qe.setSize,a,n)};Qe.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(mo(n)&&mo(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",of(n,i));else return!1;return!0};Qe.translatePoints=function(e,r,t){e.each(function(a){var n=Jt.select(this);Qe.translatePoint(a,n,r,t)})};Qe.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Qe.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,l=i.xcalendar,o=i.ycalendar,s=s0.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Qe.hideOutsideRangePoint(u,Jt.select(this),t,a,l,o)})})}};Qe.crispRound=function(e,r,t){return!r||!mo(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Qe.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},l=t||i.width||0,o=n||i.dash||"";pa.stroke(r,a||i.color),Qe.dashLine(r,o,l)};Qe.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},l=r||i.width||0,o=a||i.dash||"";Jt.select(this).call(pa.stroke,t||i.color).call(Qe.dashLine,o,l)})};Qe.dashLine=function(e,r,t){t=+t||0,r=Qe.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Qe.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function E9(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,l=n&&Qe.getPatternAttr(n.shape,0,"");if(l){var o=Qe.getPatternAttr(n.bgcolor,0,null),s=Qe.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Qe.getPatternAttr(n.size,0,8),v=Qe.getPatternAttr(n.solidity,0,.3),h=r.uid;Qe.pattern(e,"point",t,h,l,f,v,void 0,n.fillmode,o,s,u)}else if(i&&i.type!=="none"){var d=i.type,m="scatterfill-"+r.uid;if(a&&(m="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var g,y;d==="horizontal"?(g={x:i.start,y:0},y={x:i.stop,y:0}):d==="vertical"&&(g={x:0,y:i.start},y={x:0,y:i.stop}),g.x=r._xA.c2p(g.x===void 0?r._extremes.x.min[0].val:g.x,!0),g.y=r._yA.c2p(g.y===void 0?r._extremes.y.min[0].val:g.y,!0),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.max[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.max[0].val:y.y,!0),e.call(z9,t,m,"linear",i.colorscale,"fill",g,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Qe.gradient,t,m,d,i.colorscale,"fill")}else r.fillcolor&&e.call(pa.fill,r.fillcolor)}Qe.singleFillStyle=function(e,r){var t=Jt.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};E9(e,n,r,!1)};Qe.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=Jt.select(this);a[0].trace&&E9(n,a[0].trace,r,t)})};var w9=_9();Qe.symbolNames=[];Qe.symbolFuncs=[];Qe.symbolBackOffs=[];Qe.symbolNeedLines={};Qe.symbolNoDot={};Qe.symbolNoFill={};Qe.symbolList=[];Object.keys(w9).forEach(function(e){var r=w9[e],t=r.n;Qe.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Qe.symbolNames[t]=e,Qe.symbolFuncs[t]=r.f,Qe.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Qe.symbolNeedLines[t]=!0),r.noDot?Qe.symbolNoDot[t]=!0:Qe.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Qe.symbolNoFill[t]=!0)});var qU=Qe.symbolNames.length,DU="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Qe.symbolNumber=function(e){if(mo(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Qe.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=qU||e>=400?0:Math.floor(Math.max(e,0))};function P9(e,r,t,a){var n=e%100;return Qe.symbolFuncs[n](r,t,a)+(e>=200?DU:"")}var T9=bU("~f"),R9={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}};Qe.gradient=function(e,r,t,a,n,i){var l=R9[a];return z9(e,r,t,l.type,n,i,l.start,l.stop,!1,l.reversed)};function z9(e,r,t,a,n,i,l,o,s,u){var f=n.length,v;a==="linear"?v={node:"linearGradient",attrs:{x1:l.x,y1:l.y,x2:o.x,y2:o.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(v={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?l.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||l.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Qe.symbolNumber(e.mx||l.symbol)||0;e.om=u%200>=100;var f=wm(e,t),v=_m(e,t);r.attr("d",P9(u,s,f,v))}var h=!1,d,m,g;if(e.so)g=o.outlierwidth,m=o.outliercolor,d=l.outliercolor;else{var y=(o||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?m=e.mlcc=a.lineScale(e.mlc):nt.isArrayOrTypedArray(o.color)?m=pa.defaultLine:m=o.color,nt.isArrayOrTypedArray(l.color)&&(d=pa.defaultLine,h=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=l.color||l.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(pa.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:g)+"px");var w=l.gradient,_=e.mgt;_?h=!0:_=w&&w.type,nt.isArrayOrTypedArray(_)&&(_=_[0],R9[_]||(_=0));var T=l.pattern,b=T&&Qe.getPatternAttr(T.shape,e.i,"");if(_&&_!=="none"){var M=e.mgc;M?h=!0:M=w.color;var S=t.uid;h&&(S+="-"+e.i),Qe.gradient(r,n,S,_,[[0,M],[1,d]],"fill")}else if(b){var C=!1,q=T.fgcolor;!q&&i&&i.color&&(q=i.color,C=!0);var D=Qe.getPatternAttr(q,e.i,i&&i.color||null),R=Qe.getPatternAttr(T.bgcolor,e.i,null),z=T.fgopacity,F=Qe.getPatternAttr(T.size,e.i,8),H=Qe.getPatternAttr(T.solidity,e.i,.3);C=C||e.mcc||nt.isArrayOrTypedArray(T.shape)||nt.isArrayOrTypedArray(T.bgcolor)||nt.isArrayOrTypedArray(T.fgcolor)||nt.isArrayOrTypedArray(T.size)||nt.isArrayOrTypedArray(T.solidity);var O=t.uid;C&&(O+="-"+e.i),Qe.pattern(r,"point",n,O,b,F,H,e.mcc,T.fillmode,R,D,z)}else nt.isArrayOrTypedArray(d)?pa.fill(r,d[e.i]):pa.fill(r,d);g&&pa.stroke(r,m)}};Qe.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Qe.tryColorscale(t,""),r.lineScale=Qe.tryColorscale(t,"line"),s0.traceIs(e,"symbols")&&(r.ms2mrc=MU.isBubble(e)?AU(e):function(){return(t.size||6)/2}),e.selectedpoints&&nt.extendFlat(r,Qe.makeSelectedPointStyleFns(e)),r};Qe.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},l=a.marker||{},o=n.opacity,s=i.opacity,u=l.opacity,f=s!==void 0,v=u!==void 0;(nt.isArrayOrTypedArray(o)||f||v)&&(r.selectedOpacityFn=function(b){var M=b.mo===void 0?n.opacity:b.mo;return b.selected?f?s:M:v?u:D9*M});var h=n.color,d=i.color,m=l.color;(d||m)&&(r.selectedColorFn=function(b){var M=b.mcc||h;return b.selected?d||M:m||M});var g=n.size,y=i.size,w=l.size,_=y!==void 0,T=w!==void 0;return s0.traceIs(e,"symbols")&&(_||T)&&(r.selectedSizeFn=function(b){var M=b.mrc||g/2;return b.selected?_?y/2:M:T?w/2:M}),r};Qe.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},l=a.textfont||{},o=n.color,s=i.color,u=l.color;return r.selectedTextColorFn=function(f){var v=f.tc||o;return f.selected?s||v:u||(s?v:pa.addOpacity(v,D9))},r};Qe.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Qe.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,l){i.style("opacity",t.selectedOpacityFn(l))}),t.selectedColorFn&&n.push(function(i,l){pa.fill(i,t.selectedColorFn(l))}),t.selectedSizeFn&&n.push(function(i,l){var o=l.mx||a.symbol||0,s=t.selectedSizeFn(l);i.attr("d",P9(Qe.symbolNumber(o),s,wm(l,r),_m(l,r))),l.mrc2=s}),n.length&&e.each(function(i){for(var l=Jt.select(this),o=0;o0?t:0}Qe.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Qe.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,l=t._fullLayout;e.each(function(o){var s=Jt.select(this),u=i?nt.extractOption(o,r,"txt","texttemplate"):nt.extractOption(o,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,v=f?f(o,r,l):{},h={};kU(h,r,o.i);var d=r._meta||{};u=nt.texttemplateString(u,v,l._d3locale,h,o,d)}var m=o.tp||r.textposition,g=F9(o,r),y=a?a(o):o.tc||r.textfont.color;s.call(Qe.font,{family:o.tf||r.textfont.family,weight:o.tw||r.textfont.weight,style:o.ty||r.textfont.style,variant:o.tv||r.textfont.variant,textcase:o.tC||r.textfont.textcase,lineposition:o.tE||r.textfont.lineposition,shadow:o.tS||r.textfont.shadow,size:g,color:y}).text(u).call(u0.convertToTspans,t).call(N9,m,g,o.mrc)})}};Qe.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Qe.makeSelectedTextStyleFns(r);e.each(function(a){var n=Jt.select(this),i=t.selectedTextColorFn(a),l=a.tp||r.textposition,o=F9(a,r);pa.fill(n,i);var s=s0.traceIs(r,"bar-like");N9(n,l,o,a.mrc2||a.mrc,s)})}};var M9=.5;Qe.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||b>=f&&b<=s)&&(M<=v&&M>=u||M>=v&&M<=u)&&(e=[b,M])}return e}Qe.applyBackoff=O9;Qe.makeTester=function(){var e=nt.ensureSingleById(Jt.select("body"),"svg","js-plotly-tester",function(t){t.attr(_U.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=nt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Qe.tester=e,Qe.testref=r};Qe.savedBBoxes={};var mm=0,RU=1e4;Qe.bBox=function(e,r,t){t||(t=A9(e));var a;if(t){if(a=Qe.savedBBoxes[t],a)return nt.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=A9(n),t){var i=+n.getAttribute("x")||0,l=+n.getAttribute("y")||0,o=n.getAttribute("transform");if(!o){var s=Qe.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),l&&(s.top+=l,s.bottom+=l),s}if(t+="~"+i+"~"+l+"~"+o,a=Qe.savedBBoxes[t],a)return nt.extendFlat({},a)}}var u,f;r?u=e:(f=Qe.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),Jt.select(u).attr("transform",null).call(u0.positionText,0,0);var v=u.getBoundingClientRect(),h=Qe.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:v.height,width:v.width,left:v.left-h.left,top:v.top-h.top,right:v.right-h.left,bottom:v.bottom-h.top};return mm>=RU&&(Qe.savedBBoxes={},mm=0),t&&(Qe.savedBBoxes[t]=d),mm++,nt.extendFlat({},d)};function A9(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Qe.setClipUrl=function(e,r,t){e.attr("clip-path",xm(r,t))};function xm(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Qe.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Qe.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||0,t=t||0,l=l.replace(a,"").trim(),l+=of(r,t),l=l.trim(),e[i]("transform",l),l};Qe.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Qe.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||1,t=t||1,l=l.replace(a,"").trim(),l+="scale("+r+","+t+")",l=l.trim(),e[i]("transform",l),l};var zU=/\s*sc.*/;Qe.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(zU,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var NU=/translate\([^)]*\)\s*$/;Qe.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=Jt.select(this),i=n.select("text");if(i.node()){var l=parseFloat(i.attr("x")||0),o=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(NU);r===1&&t===1?a=[]:a=[of(l,o),"scale("+r+","+t+")",of(-l,-o)],s&&a.push(s),n.attr("transform",a.join(""))}})};function _m(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Qe.getMarkerStandoff=_m;var lf=Math.atan2,vo=Math.cos,Es=Math.sin;function k9(e,r){var t=r[0],a=r[1];return[t*vo(e)-a*Es(e),t*Es(e)+a*vo(e)]}var C9,S9,L9,q9,ym,gm;function wm(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||nt.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var l=r._geo.project(e.lonlat);a=l[0],n=l[1]}else{var o=r._xA,s=r._yA;if(o&&s)a=o.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],v=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=lf(h[1]-n,h[0]-a),m=lf(v[1]-n,v[0]-a),g;if(i==="north")g=t/180*Math.PI;else if(i==="previous"){var y=u/180*Math.PI,w=f/180*Math.PI,_=C9/180*Math.PI,T=S9/180*Math.PI,b=_-y,M=vo(T)*Es(b),S=Es(T)*vo(w)-vo(T)*Es(w)*vo(b);g=-lf(M,S)-Math.PI,C9=u,S9=f}var C=k9(d,[vo(g),0]),q=k9(m,[Es(g),0]);t=lf(C[1]+q[1],C[0]+q[0])/Math.PI*180,i==="previous"&&!(gm===r.uid&&e.i===ym+1)&&(t=null)}if(i==="previous"&&!r._geo)if(gm===r.uid&&e.i===ym+1&&mo(a)&&mo(n)){var D=a-L9,R=n-q9,z=r.line&&r.line.shape||"",F=z.slice(z.length-1);F==="h"&&(R=0),F==="v"&&(D=0),t+=lf(R,D)/Math.PI*180+90}else t=null}return L9=a,q9=n,ym=e.i,gm=r.uid,t}Qe.getMarkerAngle=wm});var sf=Z((Goe,V9)=>{"use strict";var Ps=Ir(),FU=Hr(),IU=Pt(),Tm=gr(),yo=He(),Y9=yo.strTranslate,f0=tt(),c0=Er(),Rs=xa(),U9=bv(),HU=Da().OPPOSITE_SIDE,G9=/ [XY][0-9]* /,Mm=1.6,Am=1.6;function OU(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,l=t.placeholder,o=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,v=t.containerGroup,h=1,d=n.title,m=(d&&d.text?d.text:"").trim(),g=!1,y=d&&d.font?d.font:{},w=y.family,_=y.size,T=y.color,b=y.weight,M=y.style,S=y.variant,C=y.textcase,q=y.lineposition,D=y.shadow,R=t.subtitlePropName,z=!!R,F=t.subtitlePlaceholder,H=(n.title||{}).subtitle||{text:"",font:{}},O=H.text.trim(),X=!1,J=1,B=H.font,I=B.family,W=B.size,K=B.color,Q=B.weight,ie=B.style,me=B.variant,pe=B.textcase,ge=B.lineposition,j=B.shadow,_e;i==="title.text"?_e="titleText":i.indexOf("axis")!==-1?_e="axisTitleText":i.indexOf("colorbar"!==-1)&&(_e="colorbarTitleText");var se=e._context.edits[_e];function Se(Be,Ne){return Be===void 0||Ne===void 0?!1:Be.replace(G9," % ")===Ne.replace(G9," % ")}m===""?h=0:Se(m,l)&&(se||(m=""),h=.2,g=!0),z&&(O===""?J=0:Se(O,F)&&(se||(O=""),J=.2,X=!0)),t._meta?m=yo.templateString(m,t._meta):a._meta&&(m=yo.templateString(m,a._meta));var ve=m||O||se,Ae;v||(v=yo.ensureSingle(a._infolayer,"g","g-"+r),Ae=a._hColorbarMoveTitle);var Y=v.selectAll("text."+r).data(ve?[0]:[]);Y.enter().append("text"),Y.text(m).attr("class",r),Y.exit().remove();var re=null,U=r+"-subtitle",de=O||se;if(z&&de&&(re=v.selectAll("text."+U).data(de?[0]:[]),re.enter().append("text"),re.text(O).attr("class",U),re.exit().remove()),!ve)return v;function be(Be,Ne){yo.syncOrAsync([ye,Fe],{title:Be,subtitle:Ne})}function ye(Be){var Ne=Be.title,Ee=Be.subtitle,Je;!f&&Ae&&(f={}),f?(Je="",f.rotate&&(Je+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||Ae)&&(Je+=Y9(0,(f.offset||0)-(Ae||0)))):Je=null,Ne.attr("transform",Je);function We(De){if(De){var Le=Ps.select(De.node().parentNode).select("."+U);if(!Le.empty()){var Ye=De.node().getBBox();if(Ye.height){var Ze=Ye.y+Ye.height+Mm*W;Le.attr("y",Ze)}}}}if(Ne.style("opacity",h*c0.opacity(T)).call(f0.font,{color:c0.rgb(T),size:Ps.round(_,2),family:w,weight:b,style:M,variant:S,textcase:C,shadow:D,lineposition:q}).attr(u).call(Rs.convertToTspans,e,We),Ee){var ne=v.select("."+r+"-math-group"),Me=Ne.node().getBBox(),Ce=ne.node()?ne.node().getBBox():void 0,cr=Ce?Ce.y+Ce.height+Mm*W:Me.y+Me.height+Am*W,tr=yo.extendFlat({},u,{y:cr});Ee.attr("transform",Je),Ee.style("opacity",J*c0.opacity(K)).call(f0.font,{color:c0.rgb(K),size:Ps.round(W,2),family:I,weight:Q,style:ie,variant:me,textcase:pe,shadow:j,lineposition:ge}).attr(tr).call(Rs.convertToTspans,e)}return IU.previousPromises(e)}function Fe(Be){var Ne=Be.title,Ee=Ps.select(Ne.node().parentNode);if(s&&s.selection&&s.side&&m){Ee.attr("transform",null);var Je=HU[s.side],We=s.side==="left"||s.side==="top"?-1:1,ne=FU(s.pad)?s.pad:2,Me=f0.bBox(Ee.node()),Ce={t:0,b:0,l:0,r:0},cr=e._fullLayout._reservedMargin;for(var tr in cr)for(var De in cr[tr]){var Le=cr[tr][De];Ce[De]=Math.max(Ce[De],Le)}var Ye={left:Ce.l,top:Ce.t,right:a.width-Ce.r,bottom:a.height-Ce.b},Ze=s.maxShift||We*(Ye[s.side]-Me[s.side]),Ue=0;if(Ze<0)Ue=Ze;else{var Oe=s.offsetLeft||0,Ke=s.offsetTop||0;Me.left-=Oe,Me.right-=Oe,Me.top-=Ke,Me.bottom-=Ke,s.selection.each(function(){var lr=f0.bBox(this);yo.bBoxIntersect(Me,lr,ne)&&(Ue=Math.max(Ue,We*(lr[s.side]-Me[Je])+ne))}),Ue=Math.min(Ze,Ue),n._titleScoot=Math.abs(Ue)}if(Ue>0||Ze<0){var fr={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[s.side];Ee.attr("transform",Y9(fr[0],fr[1]))}}}Y.call(be,re);function Re(Be,Ne){Be.text(Ne).on("mouseover.opacity",function(){Ps.select(this).transition().duration(U9.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Ps.select(this).transition().duration(U9.HIDE_PLACEHOLDER).style("opacity",0)})}if(se&&(m?Y.on(".opacity",null):(Re(Y,l),g=!0),Y.call(Rs.makeEditable,{gd:e}).on("edit",function(Be){o!==void 0?Tm.call("_guiRestyle",e,i,Be,o):Tm.call("_guiRelayout",e,i,Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(be)}).on("input",function(Be){this.text(Be||" ").call(Rs.positionText,u.x,u.y)}),z)){if(z&&!m){var Pe=Y.node().getBBox(),Ie=Pe.y+Pe.height+Am*W;re.attr("y",Ie)}O?re.on(".opacity",null):(Re(re,F),X=!0),re.call(Rs.makeEditable,{gd:e}).on("edit",function(Be){Tm.call("_guiRelayout",e,"title.subtitle.text",Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(be)}).on("input",function(Be){this.text(Be||" ").call(Rs.positionText,re.attr("x"),re.attr("y"))})}return Y.classed("js-placeholder",g),re&&re.classed("js-placeholder",X),v}V9.exports={draw:OU,SUBTITLE_PADDING_EM:Am,SUBTITLE_PADDING_MATHJAX_EM:Mm}});var b0=Z((Voe,K9)=>{"use strict";var BU=Ir(),YU=os().utcFormat,it=He(),UU=it.numberFormat,xi=Hr(),gl=it.cleanNumber,GU=it.ms2DateTime,W9=it.dateTime2ms,_i=it.ensureNumber,Z9=it.isArrayOrTypedArray,bl=Bt(),v0=bl.FP_SAFE,Kn=bl.BADNUM,VU=bl.LOG_CLIP,WU=bl.ONEWEEK,h0=bl.ONEDAY,d0=bl.ONEHOUR,X9=bl.ONEMIN,J9=bl.ONESEC,p0=Xt(),g0=da(),m0=g0.HOUR_PATTERN,y0=g0.WEEKDAY_PATTERN;function uf(e){return Math.pow(10,e)}function km(e){return e!=null}K9.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(b,M){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&M&&r.range&&r.range.length===2){var S=r.range[0],C=r.range[1];return .5*(S+C-2*VU*Math.abs(S-C))}else return Kn}function l(b,M,S,C){if((C||{}).msUTC&&xi(b))return+b;var q=W9(b,S||r.calendar);if(q===Kn)if(xi(b)){b=+b;var D=Math.floor(it.mod(b+.05,1)*10),R=Math.round(b-D/10);q=W9(new Date(R))+D/10}else return Kn;return q}function o(b,M,S){return GU(b,M,S||r.calendar)}function s(b){return r._categories[Math.round(b)]}function u(b){if(km(b)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[b]!==void 0)return r._categoriesMap[b];r._categories.push(typeof b=="number"?String(b):b);var M=r._categories.length-1;return r._categoriesMap[b]=M,M}return Kn}function f(b,M){for(var S=new Array(M),C=0;Cr.range[1]&&(S=!S);for(var C=S?-1:1,q=C*b,D=0,R=0;RF)D=R+1;else{D=q<(z+F)/2?R:R+1;break}}var H=r._B[D]||0;return isFinite(H)?m(b,r._m2,H):0},w=function(b){var M=r._rangebreaks.length;if(!M)return g(b,r._m,r._b);for(var S=0,C=0;Cr._rangebreaks[C].pmax&&(S=C+1);return g(b,r._m2,r._B[S])}}r.c2l=r.type==="log"?i:_i,r.l2c=r.type==="log"?uf:_i,r.l2p=y,r.p2l=w,r.c2p=r.type==="log"?function(b,M){return y(i(b,M))}:y,r.p2c=r.type==="log"?function(b){return uf(w(b))}:w,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=gl,r.c2d=r.c2r=r.l2d=r.l2r=_i,r.d2p=r.r2p=function(b){return r.l2p(gl(b))},r.p2d=r.p2r=w,r.cleanPos=_i):r.type==="log"?(r.d2r=r.d2l=function(b,M){return i(gl(b),M)},r.r2d=r.r2c=function(b){return uf(gl(b))},r.d2c=r.r2l=gl,r.c2d=r.l2r=_i,r.c2r=i,r.l2d=uf,r.d2p=function(b,M){return r.l2p(r.d2r(b,M))},r.p2d=function(b){return uf(w(b))},r.r2p=function(b){return r.l2p(gl(b))},r.p2r=w,r.cleanPos=_i):r.type==="date"?(r.d2r=r.r2d=it.identity,r.d2c=r.r2c=r.d2l=r.r2l=l,r.c2d=r.c2r=r.l2d=r.l2r=o,r.d2p=r.r2p=function(b,M,S){return r.l2p(l(b,0,S))},r.p2d=r.p2r=function(b,M,S){return o(w(b),M,S)},r.cleanPos=function(b){return it.cleanDate(b,Kn,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var M=d(b);return M!==void 0?M:r.fraction2r(.5)},r.l2r=r.c2r=_i,r.r2l=d,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(w(b))},r.r2p=r.d2p,r.p2r=w,r.cleanPos=function(b){return typeof b=="string"&&b!==""?b:_i(b)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var M=h(b);return M!==void 0?M:r.fraction2r(.5)},r.r2c_just_indices=v,r.l2r=r.c2r=_i,r.r2l=h,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(w(b))},r.r2p=r.d2p,r.p2r=w,r.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:_i(b)},r.setupMultiCategory=function(b){var M=r._traceIndices,S,C,q=r._matchGroup;if(q&&r._categories.length===0){for(var D in q)if(D!==a){var R=t[p0.id2name(D)];M=M.concat(R._traceIndices)}}var z=[[0,{}],[0,{}]],F=[];for(S=0;SR[1]&&(C[D?0:1]=S),C[0]===C[1]){var z=r.l2r(M),F=r.l2r(S);if(M!==void 0){var H=z+1;S!==void 0&&(H=Math.min(H,F)),C[D?1:0]=H}if(S!==void 0){var O=F+1;M!==void 0&&(O=Math.max(O,z)),C[D?0:1]=O}}}},r.cleanRange=function(b,M){r._cleanRange(b,M),r.limitRange(b)},r._cleanRange=function(b,M){M||(M={}),b||(b="range");var S=it.nestedProperty(r,b).get(),C,q;if(r.type==="date"?q=it.dfltRange(r.calendar):n==="y"?q=g0.DFLTRANGEY:r._name==="realaxis"?q=[0,1]:q=M.dfltRange||g0.DFLTRANGEX,q=q.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(q[0]=0),!S||S.length!==2){it.nestedProperty(r,b).set(q);return}var D=S[0]===null,R=S[1]===null;for(r.type==="date"&&!r.autorange&&(S[0]=it.cleanDate(S[0],Kn,r.calendar),S[1]=it.cleanDate(S[1],Kn,r.calendar)),C=0;C<2;C++)if(r.type==="date"){if(!it.isDateTime(S[C],r.calendar)){r[b]=q;break}if(r.r2l(S[0])===r.r2l(S[1])){var z=it.constrain(r.r2l(S[0]),it.MIN_MS+1e3,it.MAX_MS-1e3);S[0]=r.l2r(z-1e3),S[1]=r.l2r(z+1e3);break}}else{if(!xi(S[C]))if(!(D||R)&&xi(S[1-C]))S[C]=S[1-C]*(C?10:.1);else{r[b]=q;break}if(S[C]<-v0?S[C]=-v0:S[C]>v0&&(S[C]=v0),S[0]===S[1]){var F=Math.max(1,Math.abs(S[0]*1e-6));S[0]-=F,S[1]+=F}}},r.setScale=function(b){var M=t._size;if(r.overlaying){var S=p0.getFromId({_fullLayout:t},r.overlaying);r.domain=S.domain}var C=b&&r._r?"_r":"range",q=r.calendar;r.cleanRange(C);var D=r.r2l(r[C][0],q),R=r.r2l(r[C][1],q),z=n==="y";if(z?(r._offset=M.t+(1-r.domain[1])*M.h,r._length=M.h*(r.domain[1]-r.domain[0]),r._m=r._length/(D-R),r._b=-r._m*R):(r._offset=M.l+r.domain[0]*M.w,r._length=M.w*(r.domain[1]-r.domain[0]),r._m=r._length/(R-D),r._b=-r._m*D),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var F,H;if(r._rangebreaks=r.locateBreaks(Math.min(D,R),Math.max(D,R)),r._rangebreaks.length){for(F=0;FR&&(O=!O),O&&r._rangebreaks.reverse();var X=O?-1:1;for(r._m2=X*r._length/(Math.abs(R-D)-r._lBreaks),r._B.push(-r._m2*(z?R:D)),F=0;Fq&&(q+=7,Dq&&(q+=24,D=C&&D=C&&b=j.min&&(iej.max&&(j.max=me),pe=!1)}pe&&R.push({min:ie,max:me})}};for(S=0;S{"use strict";var Q9=Hr(),Cm=He(),ZU=Bt().BADNUM,x0=Cm.isArrayOrTypedArray,XU=Cm.isDateTime,JU=Cm.cleanNumber,$9=Math.round;e8.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if(x0(n)&&!n.length)return"-";if(!i&&eG(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var l=[],o=0;oi*2}function j9(e){return Math.max(1,(e-1)/1e3)}function jU(e,r){for(var t=e.length,a=j9(t),n=0,i=0,l={},o=0;on*2}function eG(e){return x0(e[0])&&x0(e[1])}});var ff=Z((Zoe,s8)=>{"use strict";var rG=Ir(),n8=Hr(),xl=He(),_0=Bt().FP_SAFE,tG=gr(),aG=tt(),i8=Xt(),nG=i8.getFromId,iG=i8.isLinked;s8.exports={applyAutorangeOptions:o8,getAutoRange:Lm,makePadFn:qm,doAutoRange:oG,findExtremes:sG,concatExtremes:Pm};function Lm(e,r){var t,a,n=[],i=e._fullLayout,l=qm(i,r,0),o=qm(i,r,1),s=Pm(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return xl.simpleMap(r.range,r.r2l);var v=u[0].val,h=f[0].val;for(t=1;t0&&(R=T-l(S)-o(C),R>b?z/R>M&&(q=S,D=C,M=z/R):z/T>M&&(q={val:S.val,nopad:1},D={val:C.val,nopad:1},M=z/T));function F(B,I){return Math.max(B,o(I))}if(v===h){var H=v-1,O=v+1;if(w)if(v===0)n=[0,1];else{var X=(v>0?f:u).reduce(F,0),J=v/(1-Math.min(.5,X/T));n=v>0?[0,J]:[J,0]}else _?n=[Math.max(0,H),Math.max(1,O)]:n=[H,O]}else w?(q.val>=0&&(q={val:0,nopad:1}),D.val<=0&&(D={val:0,nopad:1})):_&&(q.val-M*l(q)<0&&(q={val:0,nopad:1}),D.val<=0&&(D={val:1,nopad:1})),M=(D.val-q.val-r8(r,S.val,C.val))/(T-l(q)-o(D)),n=[q.val-M*l(q),D.val+M*o(D)];return n=o8(n,r),r.limitRange&&r.limitRange(),m&&n.reverse(),xl.simpleMap(n,r.l2r||Number)}function r8(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),S=b((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),C=b(t.vpadplus||t.vpad),q=b(t.vpadminus||t.vpad);if(!u){if(_=1/0,T=-1/0,s)for(v=0;v0&&(_=h),h>T&&h<_0&&(T=h);else for(v=0;v-_0&&(_=h),h>T&&h<_0&&(T=h);r=[_,T],i=2}var D={tozero:o,extrapad:l};function R(F){d=r[F],n8(d)&&(y=M(F),w=S(F),f?(m=e.c2l(d)-q(F),g=e.c2l(d)+C(F)):(_=d-q(F),T=d+C(F),s&&_=z;v--)R(v);return{min:a,max:n,opts:t}}function Dm(e,r,t,a){l8(e,r,t,a,uG)}function Em(e,r,t,a){l8(e,r,t,a,fG)}function l8(e,r,t,a,n){for(var i=a.tozero,l=a.extrapad,o=!0,s=0;s=t&&(u.extrapad||!l)){o=!1;break}else n(r,u.val)&&u.pad<=t&&(l||!u.extrapad)&&(e.splice(s,1),s--)}if(o){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:l})}}function a8(e){return n8(e)&&Math.abs(e)<_0}function uG(e,r){return e<=r}function fG(e,r){return e>=r}function cG(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&w0(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&w0(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function vG(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&w0(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&w0(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function w0(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),l<=s&&(l=s,a=s)}}return t=cG(t,r),a=vG(a,r),[t,a]}});var dt=Z((Xoe,q8)=>{"use strict";var Mn=Ir(),zt=Hr(),zs=Pt(),vf=gr(),br=He(),Ns=br.strTranslate,go=xa(),hG=sf(),hf=Er(),sn=tt(),dG=Xn(),u8=Kp(),ma=Bt(),pG=ma.ONEMAXYEAR,A0=ma.ONEAVGYEAR,k0=ma.ONEMINYEAR,mG=ma.ONEMAXQUARTER,Fm=ma.ONEAVGQUARTER,C0=ma.ONEMINQUARTER,yG=ma.ONEMAXMONTH,Fs=ma.ONEAVGMONTH,S0=ma.ONEMINMONTH,un=ma.ONEWEEK,Ea=ma.ONEDAY,_l=Ea/2,Ti=ma.ONEHOUR,df=ma.ONEMIN,L0=ma.ONESEC,gG=ma.ONEMILLI,bG=ma.ONEMICROSEC,bo=ma.MINUS_SIGN,E0=ma.BADNUM,Im={K:"zeroline"},Hm={K:"gridline",L:"path"},Om={K:"minor-gridline",L:"path"},x8={K:"tick",L:"path"},f8={K:"tick",L:"text"},c8={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},P0=Da(),cf=P0.MID_SHIFT,xo=P0.CAP_SHIFT,pf=P0.LINE_SPACING,xG=P0.OPPOSITE_SIDE,q0=3,Ve=q8.exports={};Ve.setConvert=b0();var _G=Sm(),Ui=Xt(),wG=Ui.idSort,TG=Ui.isLinked;Ve.id2name=Ui.id2name;Ve.name2id=Ui.name2id;Ve.cleanId=Ui.cleanId;Ve.list=Ui.list;Ve.listIds=Ui.listIds;Ve.getFromId=Ui.getFromId;Ve.getFromTrace=Ui.getFromTrace;var _8=ff();Ve.getAutoRange=_8.getAutoRange;Ve.findExtremes=_8.findExtremes;var MG=1e-4;function Gm(e){var r=(e[1]-e[0])*MG;return[e[0]-r,e[1]+r]}Ve.coerceRef=function(e,r,t,a,n,i){var l=a.charAt(a.length-1),o=t._fullLayout._subplots[l+"axis"],s=a+"ref",u={};return n||(n=o[0]||(typeof i=="string"?i:i[0])),i||(i=n),o=o.concat(o.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:o.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},br.coerce(e,r,u,s)};Ve.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Ve.coercePosition=function(e,r,t,a,n,i){var l,o,s=Ve.getRefType(a);if(s!=="range")l=br.ensureNumber,o=t(n,i);else{var u=Ve.getFromId(r,a);i=u.fraction2r(i),o=t(n,i),l=u.cleanPos}e[n]=l(o)};Ve.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?br.ensureNumber:Ve.getFromId(r,t).cleanPos;return a(e)};Ve.redrawComponents=function(e,r){r=r||Ve.listIds(e);var t=e._fullLayout;function a(n,i,l,o){for(var s=vf.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Ve.saveRangeInitial=function(e,r){for(var t=Ve.list(e,"",!0),a=!1,n=0;nv*.3||u(a)||u(n))){var h=t.dtick/2;e+=e+hl){var o=Number(t.substr(1));i.exactYears>l&&o%12===0?e=Ve.tickIncrement(e,"M6","reverse")+Ea*1.5:i.exactMonths>l?e=Ve.tickIncrement(e,"M1","reverse")+Ea*15.5:e-=_l;var s=Ve.tickIncrement(e,t);if(s<=a)return s}return e}Ve.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&zt(r._tmin),n;if(a){var i=Ve.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var l=br.simpleMap(r.range,r.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=br.simpleMap(n,r.l2r),e._isMinor=!0,Ve.prepTicks(e,t),a){var o=zt(r.dtick),s=zt(e.dtick),u=o?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);o&&s?Rm(u,f)?u===2*un&&f===2*Ea&&(e.dtick=un):u===2*un&&f===3*Ea?e.dtick=un:u===un&&!(r._input.minor||{}).nticks?e.dtick=Ea:d8(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":Rm(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?Rm(u,f)||(e.dtick=d8(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function Rm(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function d8(e,r){return Math.abs(e/r-1)<.001}Ve.prepTicks=function(e,r){var t=br.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?br.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=br.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,Ve.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,l=a):(i=a,l=a);var o=e[i].value,s=e[l].value,u=Math.abs(s-o),f=t||u,v=0;f>=k0?u>=k0&&u<=pG?v=u:v=A0:t===Fm&&f>=C0?u>=C0&&u<=mG?v=u:v=Fm:f>=S0?u>=S0&&u<=yG?v=u:v=Fs:t===un&&f>=un?v=un:f>=Ea?v=Ea:t===_l&&f>=_l?v=_l:t===Ti&&f>=Ti&&(v=Ti);var h;v>=u&&(v=u,h=!0);var d=n+v;if(r.rangebreaks&&v>0){for(var m=84,g=0,y=0;yun&&(v=u)}(v>0||a===0)&&(e[a].periodX=n+v/2)}}Ve.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,l=r.ticklabelmode==="period",o=r.range[0]>r.range[1],s=!r.ticklabelindex||br.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=br.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(T?0:1);b--){var M=!b;b?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var S=b?r:br.extendFlat({},r,r.minor);if(M?Ve.prepMinorTicks(S,r,t):Ve.prepTicks(S,t),S.tickmode==="array"){b?(y=[],m=p8(r,!M)):(w=[],g=p8(r,!M));continue}if(S.tickmode==="sync"){y=[],m=qG(r);continue}var C=Gm(u),q=C[0],D=C[1],R=zt(S.dtick),z=a==="log"&&!(R||S.dtick.charAt(0)==="L"),F=Ve.tickFirst(S,t);if(b){if(r._tmin=F,F=D:O<=D;O=Ve.tickIncrement(O,B,f,n)){if(b&&X++,S.rangebreaks&&!f){if(O=h)break}if(y.length>d||O===H)break;H=O;var I={value:O};b?(z&&O!==(O|0)&&(I.simpleLabel=!0),i>1&&X%i&&(I.skipLabel=!0),y.push(I)):(I.minor=!0,w.push(I))}}if(!w||w.length<2)s=!1;else{var W=(w[1].value-w[0].value)*(o?-1:1);eV(W,r.tickformat)||(s=!1)}if(!s)_=y;else{var K=y.concat(w);l&&y.length&&(K=K.slice(1)),K=K.sort(function(Ie,Be){return Ie.value-Be.value}).filter(function(Ie,Be,Ne){return Be===0||Ie.value!==Ne[Be-1].value});var Q=K.map(function(Ie,Be){return Ie.minor===void 0&&!Ie.skipLabel?Be:null}).filter(function(Ie){return Ie!==null});Q.forEach(function(Ie){s.map(function(Be){var Ne=Ie+Be;Ne>=0&&Ne-1;ve--){if(y[ve].drop){y.splice(ve,1);continue}y[ve].value=Nm(y[ve].value,r);var U=r.c2p(y[ve].value);(Ae?re>U-Y:reh||Eeh&&(Ne.periodX=h),Een&&hA0)r/=A0,a=n(10),e.dtick="M"+12*wi(r,a,T0);else if(i>Fs)r/=Fs,e.dtick="M"+wi(r,1,m8);else if(i>Ea){if(e.dtick=wi(r,Ea,e._hasDayOfWeekBreaks?[1,2,7,14]:DG),!t){var l=Ve.getTickFormat(e),o=e.ticklabelmode==="period";o&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=br.dateTick0(e.calendar,2):e.tick0=br.dateTick0(e.calendar,1),o&&(e._dowTick0=e.tick0)}}else i>Ti?e.dtick=wi(r,Ti,m8):i>df?e.dtick=wi(r,df,y8):i>L0?e.dtick=wi(r,L0,y8):(a=n(10),e.dtick=wi(r,a,T0))}else if(e.type==="log"){e.tick0=0;var s=br.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+wi(r,a,T0)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):Zm(e)?(e.tick0=0,a=1,e.dtick=wi(r,a,EG)):(e.tick0=0,a=n(10),e.dtick=wi(r,a,T0));if(e.dtick===0&&(e.dtick=1),!zt(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function A8(e){var r=e.dtick;if(e._tickexponent=0,!zt(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=Ea&&n<=10||r>=Ea*15)e._tickround="d";else if(r>=df&&n<=16||r>=Ti)e._tickround="M";else if(r>=L0&&n<=19||r>=df)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(zt(r)||r.charAt(0)==="L"){var l=e.range.map(e.r2d||Number);zt(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var o=Math.max(Math.abs(l[0]),Math.abs(l[1])),s=Math.floor(Math.log(o)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(D0(e.exponentformat)&&!Vm(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}Ve.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(zt(r))return br.increment(e,n*r);var i=r.charAt(0),l=n*Number(r.substr(1));if(i==="M")return br.incrementMonth(e,l,a);if(i==="L")return Math.log(Math.pow(10,e)+l)/Math.LN10;if(i==="D"){var o=r==="D2"?M8:T8,s=e+n*.01,u=br.roundUp(br.mod(s,1),o,t);return Math.floor(s)+Math.log(Mn.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};Ve.tickFirst=function(e,r){var t=e.r2l||Number,a=br.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&w<=e._length?y:null};if(i&&br.isArrayOrTypedArray(e.ticktext)){var v=br.simpleMap(e.range,e.r2l),h=(Math.abs(v[1]-v[0])-(e._lBreaks||0))/1e4;for(u=0;u"+o;else{var u=yf(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(l+="
")}r.text=l}function RG(e,r,t,a,n){var i=e.dtick,l=r.x,o=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),o||s==="L")r.text=mf(Math.pow(10,l),e,n,a);else if(zt(i)||s==="D"&&br.mod(l+.01,1)<.1){var u=Math.round(l),f=Math.abs(u),v=e.exponentformat;v==="power"||D0(v)&&Vm(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":bo)+f+"",r.fontSize*=1.25):(v==="e"||v==="E")&&f>2?r.text="1"+v+(u>0?"+":bo)+f:(r.text=mf(Math.pow(10,l),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,br.mod(l,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(l<0?.5:.25)))}}function zG(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function NG(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),l=n[0]===void 0?"":String(n[0]);t?r.text=l+" - "+i:(r.text=i,r.text2=l)}function FG(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=mf(r.x,e,n,a)}function IG(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=HG(i);if(l[1]>=100)r.text=mf(br.deg2rad(r.x),e,n,a);else{var o=r.x<0;l[1]===1?l[0]===1?r.text="\u03C0":r.text=l[0]+"\u03C0":r.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),o&&(r.text=bo+r.text)}}}else r.text=mf(r.x,e,n,a)}function HG(e){function r(o,s){return Math.abs(o-s)<=1e-6}function t(o,s){return r(s,0)?o:t(s,o%s)}function a(o){for(var s=1;!r(Math.round(o*s)/s,o);)s*=10;return s}var n=a(e),i=e*n,l=Math.abs(t(i,n));return[Math.round(i/l),Math.round(n/l)]}var OG=["f","p","n","\u03BC","m","","k","M","G","T"];function D0(e){return e==="SI"||e==="B"}function Vm(e){return e>14||e<-15}function mf(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Ve.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:l,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:zt(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};A8(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,bo);var v=Math.pow(10,-i)/2;if(l==="none"&&(o=0),e=Math.abs(e),e"+m+"":l==="B"&&o===9?e+="B":D0(l)&&(e+=OG[o/3+5])}return n?bo+e:e}Ve.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*Fs}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var v=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return v===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):v-h}else return typeof s=="number"?1:-1}function n(s,u,f){var v=f||function(m){return m},h=u[0],d=u[1];return(!h&&typeof h!="number"||v(h)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function i(s,u){var f=u[0]===null,v=u[1]===null,h=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||h)&&(v||d)}var l,o;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var o={false:{left:0,right:0}};return br.syncOrAsync(n.map(function(s){return function(){if(s){var u=Ve.getFromId(e,s);t||(t={}),t.axShifts=o,t.overlayingShiftedAx=l;var f=Ve.drawOne(e,u,t);return u._shiftPusher&&Um(u,u._fullDepth||0,o,!0),u._r=u.range.slice(),u._rl=br.simpleMap(u._r,u.r2l),f}}}))};Ve.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,l,o;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),v=Ve.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),Um(r,d,a,!0),Um(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=jG(r,a));var m=h[f+"axislayer"],g=r._mainLinePosition,y=g+=r._shift,w=r._mainMirrorPosition,_=r._vals=Ve.calcTicks(r),T=[r.mirror,y,w].join("_");for(i=0;i<_.length;i++)_[i].axInfo=T;r._selections={},r._tickAngles&&(r._prevTickAngles=r._tickAngles),r._tickAngles={},r._depth=null;var b={};function M(Re){var Pe=u+(Re||"tick");return b[Pe]||(b[Pe]=GG(r,Pe,y)),b[Pe]}if(r.visible){var S=Ve.makeTransTickFn(r),C=Ve.makeTransTickLabelFn(r),q,D,R=r.ticks==="inside",z=r.ticks==="outside";if(r.tickson==="boundaries"){var F=BG(r,_);D=Ve.clipEnds(r,F),q=R?D:F}else D=Ve.clipEnds(r,_),q=R&&r.ticklabelmode!=="period"?D:_;var H=r._gridVals=D,O=UG(r,_);if(!s._hasOnlyLargeSploms){var X=r._subplotsWith,J={};for(i=0;i0?Ne.bottom-Ie:0,Be))));var ne=0,Me=0;if(r._shiftPusher&&(ne=Math.max(Be,Ne.height>0?Re==="l"?Ie-Ne.left:Ne.right-Ie:0),r.title.text!==s._dfltTitle[f]&&(Me=(r._titleStandoff||0)+(r._titleScoot||0),Re==="l"&&(Me+=b8(r))),r._fullDepth=Math.max(ne,Me)),r.automargin){Ee={x:0,y:0,r:0,l:0,t:0,b:0};var Ce=[0,1],cr=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Re==="b"?Ee[Re]=r._depth:(Ee[Re]=r._depth=Math.max(Ne.width>0?Ie-Ne.top:0,Be),Ce.reverse()),Ne.width>0){var tr=Ne.right-(r._offset+r._length);tr>0&&(Ee.xr=1,Ee.r=tr);var De=r._offset-Ne.left;De>0&&(Ee.xl=0,Ee.l=De)}}else if(Re==="l"?(r._depth=Math.max(Ne.height>0?Ie-Ne.left:0,Be),Ee[Re]=r._depth-cr):(r._depth=Math.max(Ne.height>0?Ne.right-Ie:0,Be),Ee[Re]=r._depth+cr,Ce.reverse()),Ne.height>0){var Le=Ne.bottom-(r._offset+r._length);Le>0&&(Ee.yb=0,Ee.b=Le);var Ye=r._offset-Ne.top;Ye>0&&(Ee.yt=1,Ee.t=Ye)}Ee[v]=r.anchor==="free"?r.position:r._anchorAxis.domain[Ce[0]],r.title.text!==s._dfltTitle[f]&&(Ee[Re]+=b8(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Je={x:0,y:0,r:0,l:0,t:0,b:0},Je[Pe]=r.linewidth,r.mirror&&r.mirror!==!0&&(Je[Pe]+=Be),r.mirror===!0||r.mirror==="ticks"?Je[v]=r._anchorAxis.domain[Ce[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Je[v]=[r._counterDomainMin,r._counterDomainMax][Ce[1]]))}Fe&&(We=vf.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(g8(Ee,r.automargin),g8(Je,r.automargin)),zs.autoMargin(e,Wm(r),Ee),zs.autoMargin(e,S8(r),Je),zs.autoMargin(e,L8(r),We)}),br.syncOrAsync(be)}};function g8(e,r){if(e){var t=Object.keys(c8).reduce(function(a,n){return r.indexOf(n)!==-1&&c8[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function BG(e,r){var t=[],a,n=function(i,l){var o=i.xbnd[l];o!==null&&t.push(br.extendFlat({},i,{x:o}))};if(r.length){for(a=0;ae.range[1],o=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!o;if(t){var u=l?-1:1;t=t*u}if(a){var f=e.side,v=o&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*v}return e._id.charAt(0)==="x"?function(h){return Ns(n+e._offset+e.l2p(Bm(h))+t,i+a)}:function(h){return Ns(i+a,n+e._offset+e.l2p(Bm(h))+t)}};function Bm(e){return e.periodX!==void 0?e.periodX:e.x}function VG(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),l=t("bottom"),o=t("inside"),s=l||n||a||i;if(!s&&!o)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,v=q0,h=e.tickfont?e.tickfont.size:12;return(l||a)&&(f+=h*xo,v+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,v+=q0),o&&u==="top"&&(v-=h*(1-xo)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(v=-v),[s?f:0,o?v:0]}Ve.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,l=e._id.charAt(0),o=(e.linewidth||1)/2;return l==="x"?"M0,"+(r+o*t)+"v"+i*t:"M"+(r+o*t)+",0h"+i*t};Ve.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(F){return a.indexOf(F)!==-1},i=n("top"),l=n("left"),o=n("right"),s=n("bottom"),u=s||l||i||o,f=n("inside"),v=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,m=v?e.ticklen:0;if(f?m*=-1:u&&(m=0),v&&(h+=m,t)){var g=br.deg2rad(t);h=m*Math.cos(g)+1,d=m*Math.sin(g)}e.showticklabels&&(v||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:h,labelShift:d},w,_,T,b,M=0,S=e.side,C=e._id.charAt(0),q=e.tickangle,D;if(C==="x")D=!f&&S==="bottom"||f&&S==="top",b=D?1:-1,f&&(b*=-1),w=d*b,_=r+h*b,T=D?1:-.2,Math.abs(q)===90&&(f?T+=cf:q===-90&&S==="bottom"?T=xo:q===90&&S==="top"?T=cf:T=.5,M=cf/2*(q/90)),y.xFn=function(F){return F.dx+w+M*F.fontSize},y.yFn=function(F){return F.dy+_+F.fontSize*T},y.anchorFn=function(F,H){if(u){if(l)return"end";if(o)return"start"}return!zt(H)||H===0||H===180?"middle":H*b<0!==f?"end":"start"},y.heightFn=function(F,H,O){return H<-60||H>60?-.5*O:e.side==="top"!==f?-O:0};else if(C==="y"){if(D=!f&&S==="left"||f&&S==="right",b=D?1:-1,f&&(b*=-1),w=h,_=d*b,T=0,!f&&Math.abs(q)===90&&(q===-90&&S==="left"||q===90&&S==="right"?T=xo:T=.5),f){var R=zt(q)?+q:0;if(R!==0){var z=br.deg2rad(R);M=Math.abs(Math.sin(z))*xo*b,T=0}}y.xFn=function(F){return F.dx+r-(w+F.fontSize*T)*b+M*F.fontSize},y.yFn=function(F){return F.dy+_+F.fontSize*cf},y.anchorFn=function(F,H){return zt(H)&&Math.abs(H)===90?"middle":D?"end":"start"},y.heightFn=function(F,H,O){return e.side==="right"&&(H*=-1),H<-30?-O:H<30?-.5*O:0}}return y};function R0(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Ve.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(l){return l.minor&&!l.noTick}):[]).concat(r.ticks?t.vals.filter(function(l){return!l.minor&&!l.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,R0);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(l){return hf.stroke(Mn.select(this),l.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(l){return sn.crispRound(e,l.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),z0(r,[x8]),i.attr("transform",t.transFn)};Ve.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(w){return w.minor}):[],l=r.showgrid?t.vals.filter(function(w){return!w.minor}):[],o=t.counterAxis;if(o&&Ve.shouldShowZeroLine(e,r,o))for(var s=r.tickmode==="array",u=0;u=0;m--){var g=m?h:d;if(g){var y=g.selectAll("path."+a).data(m?l:i,R0);y.exit().remove(),y.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),y.attr("transform",t.transFn).attr("d",t.path).each(function(w){return hf.stroke(Mn.select(this),w.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(w){return sn.dashStyle(w.minor?r.minor.griddash:r.griddash,w.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(w){return(w.minor?v:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&y.attr("d",t.path)}}z0(r,[Hm,Om])}};Ve.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=Ve.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(l,o){return wG(l.id,o.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(hf.stroke,r.zerolinecolor||hf.defaultLine).style("stroke-width",sn.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),z0(r,[Im])};Ve.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",l=t.vals.filter(function(I){return I.text}),o=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?l:[],R0),v=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(I){var W=Mn.select(this),K=e._promises.length;W.call(go.positionText,o.xFn(I),o.yFn(I)).call(sn.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(go.convertToTspans,e),e._promises[K]?v.push(e._promises.pop().then(function(){h(W,s)})):h(W,s)}),z0(r,[f8]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(I){Mn.select(this).select("text").call(go.positionText,o.xFn(I),o.yFn(I))});function h(I,W){I.each(function(K){var Q=Mn.select(this),ie=Q.select(".text-math-group"),me=o.anchorFn(K,W),pe=t.transFn.call(Q.node(),K)+(zt(W)&&+W!=0?" rotate("+W+","+o.xFn(K)+","+(o.yFn(K)-K.fontSize/2)+")":""),ge=go.lineCount(Q),j=pf*K.fontSize,_e=o.heightFn(K,zt(W)?+W:0,(ge-1)*j);if(_e&&(pe+=Ns(0,_e)),ie.empty()){var se=Q.select("text");se.attr({transform:pe,"text-anchor":me}),se.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var Se=sn.bBox(ie.node()).width,ve=Se*{end:-.5,start:.5}[me];ie.attr("transform",pe+Ns(ve,0))}})}r._adjustTickLabelsOverflow=function(){var I=r.ticklabeloverflow;if(!(!I||I==="allow")){var W=I.indexOf("hide")!==-1,K=r._id.charAt(0)==="x",Q=0,ie=K?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var me=br.simpleMap(r.range,r.r2l);Q=r.l2p(me[0])+r._offset,ie=r.l2p(me[1])+r._offset}var pe=Math.min(Q,ie),ge=Math.max(Q,ie),j=r.side,_e=1/0,se=-1/0;f.each(function(Y){var re=Mn.select(this),U=re.select(".text-math-group");if(U.empty()){var de=sn.bBox(re.node()),be=0;K?(de.right>ge||de.leftge||de.top+(r.tickangle?0:Y.fontSize/4)r["_visibleLabelMin_"+me._id]?Y.style("display","none"):ge.K==="tick"&&!pe&&Y.style("display",null)})})})})},h(f,u+1?u:s);function d(){return v.length&&Promise.all(v)}var m=null;function g(){if(h(f,s),l.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){m=r.autotickangles[0];var I=0,W=[],K,Q=1;f.each(function(Ne){I=Math.max(I,Ne.fontSize);var Ee=r.l2p(Ne.x),Je=Ym(this),We=sn.bBox(Je.node());Q=Math.max(Q,go.lineCount(Je)),W.push({top:0,bottom:10,height:10,left:Ee-We.width/2,right:Ee+We.width/2+2,width:We.width+2})});var ie=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,me=l.length,pe=Math.abs((l[me-1].x-l[0].x)*r._m)/(me-1),ge=ie?pe/2:pe,j=ie?r.ticklen:I*1.25*Q,_e=Math.sqrt(Math.pow(ge,2)+Math.pow(j,2)),se=ge/_e,Se=r.autotickangles.map(function(Ne){return Ne*Math.PI/180}),ve=Se.find(function(Ne){return Math.abs(Math.cos(Ne))<=se});ve===void 0&&(ve=Se.reduce(function(Ne,Ee){return Math.abs(Math.cos(Ne))X*O&&(z=O,q[C]=D[C]=F[C])}var J=Math.abs(z-R);J-b>0?(J-=b,b*=1+b/J):b=0,r._id.charAt(0)!=="y"&&(b=-b),q[S]=_.p2r(_.r2p(D[S])+M*b),_.autorange==="min"||_.autorange==="max reversed"?(q[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(q[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[_._name+".range"]=q}var B=br.syncOrAsync(y);return B&&B.then&&e._promises.push(B),B};function WG(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,R0);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(hf.stroke,r.dividercolor).style("stroke-width",sn.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}Ve.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function b8(e){var r=e.title.font.size,t=(e.title.text.match(go.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(xo+t*pf):t?r*(t+1)*pf:r}function ZG(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,l,o=(r.title.text.match(go.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?l=r._depth+r.title.standoff+i*xo:(r.side==="top"||r.side==="left")&&(l=r._depth+r.title.standoff+i*(cf+o*pf));else{var s=yf(r);if(r.type==="multicategory")l=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),l=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?l+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):l+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=Ve.getPxPosition(e,r),v,h,d;n==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-l:f+l):(d=r._offset+r._length/2,h=r.side==="right"?f+l:f-l,v={rotate:"-90",offset:0});var m;if(r.type!=="multicategory"){var g=r._selections[r._id+"tick"];if(m={selection:g,side:r.side},g&&g.node()&&g.node().parentNode){var y=sn.getTranslate(g.node().parentNode);m.offsetLeft=y.x,m.offsetTop=y.y}r.title.hasOwnProperty("standoff")&&(m.pad=0)}return r._titleStandoff=l,hG.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:m,transform:v,attributes:{x:h,y:d,"text-anchor":"middle"}})}Ve.shouldShowZeroLine=function(e,r,t){var a=br.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===E0)&&(C8(r,0)||!XG(e,r,t,a)||JG(e,r))};Ve.clipEnds=function(e,r){return r.filter(function(t){return C8(e,t.x)})};function C8(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=bG:/%L/.test(r)?e>=gG:/%[SX]/.test(r)?e>=L0:/%M/.test(r)?e>=df:/%[HI]/.test(r)?e>=Ti:/%p/.test(r)?e>=_l:/%[Aadejuwx]/.test(r)?e>=Ea:/%[UVW]/.test(r)?e>=un:/%[Bbm]/.test(r)?e>=S0:/%[q]/.test(r)?e>=C0:/%[Yy]/.test(r)?e>=k0:!0}});var E8=Z((Joe,D8)=>{"use strict";D8.exports=function(r,t,a){var n,i;if(a){var l=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[l?1:0],i=a[l?0:1]}var o=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);o===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var Xm=Z((Koe,P8)=>{"use strict";var rV=E8();P8.exports=function(r,t,a,n){var i=t._template||{},l=t.type||i.type||"-";a("minallowed"),a("maxallowed");var o=a("range");if(!o){var s;!n.noInsiderange&&l!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(o=a("range",s)))}var u=t.getAutorangeDflt(o,n),f=a("autorange",u),v;o&&(o[0]===null&&o[1]===null||(o[0]===null||o[1]===null)&&(f==="reversed"||f===!0)||o[0]!==null&&(f==="min"||f==="max reversed")||o[1]!==null&&(f==="max"||f==="min reversed"))&&(o=void 0,delete t.range,t.autorange=!0,v=!0),v||(u=t.getAutorangeDflt(o,n),f=a("autorange",u)),f&&(rV(a,f,o),(l==="linear"||l==="-")&&a("rangemode")),t.cleanRange()}});var z8=Z((Qoe,R8)=>{var tV={left:0,top:0};R8.exports=aV;function aV(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=nV(r);return t[0]=a-i.left,t[1]=n-i.top,t}function nV(e){return e===window||e===document||e===document.body?tV:e.getBoundingClientRect()}});var Jm=Z(($oe,N8)=>{"use strict";var iV=Mp();function lV(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}N8.exports=iV&&lV()});var I8=Z((joe,F8)=>{"use strict";F8.exports=function(r,t,a,n,i){var l=(r-a)/(n-a),o=l+t/(n-a),s=(l+o)/2;return i==="left"||i==="bottom"?l:i==="center"||i==="middle"?s:i==="right"||i==="top"?o:l<2/3-s?l:o>4/3-s?o:s}});var B8=Z((ese,O8)=>{"use strict";var H8=He(),oV=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];O8.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=H8.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=H8.constrain(Math.floor(t*3),0,2),oV[t][r]}});var U8=Z((rse,Y8)=>{"use strict";var sV=$u(),uV=zv(),fV=Gu().getGraphDiv,cV=Yu(),Km=Y8.exports={};Km.wrapped=function(e,r,t){e=fV(e),e._fullLayout&&uV.clear(e._fullLayout._uid+cV.HOVERID),Km.raw(e,r,t)};Km.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&sV.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var Qn=Z((tse,W8)=>{"use strict";var vV=z8(),Qm=kp(),hV=Jm(),dV=He().removeElement,pV=da(),_o=W8.exports={};_o.align=I8();_o.getCursor=B8();var G8=U8();_o.unhover=G8.wrapped;_o.unhoverRaw=G8.raw;_o.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,l,o,s,u,f,v,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=y,hV?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=y,i.addEventListener("touchstart",y,{passive:!1})):i.ontouchstart=y;function m(T,b,M){return Math.abs(T)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,v),!d){var b;try{b=new MouseEvent("click",T)}catch(S){var M=$m(T);b=document.createEvent("MouseEvents"),b.initMouseEvent("click",T.bubbles,T.cancelable,T.view,T.detail,T.screenX,T.screenY,M[0],M[1],T.ctrlKey,T.altKey,T.shiftKey,T.metaKey,T.button,T.relatedTarget)}h.dispatchEvent(b)}t._dragging=!1,t._dragged=!1}};function V8(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}_o.coverSlip=V8;function $m(e){return vV(e.changedTouches?e.changedTouches[0]:e,document.body)}});var wl=Z((ase,Z8)=>{"use strict";Z8.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var K8=Z((nse,J8)=>{"use strict";var jm=wl(),gf="data-savedcursor",X8="!!";J8.exports=function(r,t){var a=r.attr(gf);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var ey=ha(),mV=hi();Q8.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:mV.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:ey({editType:"legend"}),grouptitlefont:ey({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:ey({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var F0=Z(N0=>{"use strict";N0.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};N0.isVertical=function(r){return r.orientation!=="h"};N0.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var ny=Z((ose,$8)=>{"use strict";var ty=gr(),fn=He(),yV=ct(),gV=Gn(),bV=ry(),xV=ds(),ay=F0();function _V(e,r,t,a){var n=r[e]||{},i=yV.newContainer(t,e);function l(B,I){return fn.coerce(n,i,bV,B,I)}var o=fn.coerceFont(l,"font",t.font);l("bgcolor",t.paper_bgcolor),l("bordercolor");var s=l("visible");if(s){for(var u,f=function(B,I){var W=u._input,K=u;return fn.coerce(W,K,gV,B,I)},v=t.font||{},h=fn.coerceFont(l,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),d=0,m=!1,g="normal",y=(t.shapes||[]).filter(function(B){return B.showlegend}),w=a.concat(y).filter(function(B){return e===(B.legend||"legend")}),_=0;_(e==="legend"?1:0));if(b===!1&&(t[e]=void 0),!(b===!1&&!n.uirevision)&&(l("uirevision",t.uirevision),b!==!1)){l("borderwidth");var M=l("orientation"),S=l("yref"),C=l("xref"),q=M==="h",D=S==="paper",R=C==="paper",z,F,H,O="left";q?(z=0,ty.getComponentMethod("rangeslider","isVisible")(r.xaxis)?D?(F=1.1,H="bottom"):(F=1,H="top"):D?(F=-.1,H="top"):(F=0,H="bottom")):(F=1,H="auto",R?z=1.02:(z=1,O="right")),fn.coerce(n,i,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:z}},"x"),fn.coerce(n,i,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:F}},"y"),l("traceorder",g),ay.isGrouped(t[e])&&l("tracegroupgap"),l("entrywidth"),l("entrywidthmode"),l("indentation"),l("itemsizing"),l("itemwidth"),l("itemclick"),l("itemdoubleclick"),l("groupclick"),l("xanchor",O),l("yanchor",H),l("valign"),fn.noneOrAll(n,i,["x","y"]);var X=l("title.text");if(X){l("title.side",q?"left":"top");var J=fn.extendFlat({},o,{size:fn.bigFont(o.size)});fn.coerceFont(l,"title.font",J)}}}}$8.exports=function(r,t,a){var n,i=a.slice(),l=t.shapes;if(l)for(n=0;n{"use strict";var Is=gr(),ly=He(),wV=ly.pushUnique,iy=!0;j8.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,l=n.legend.itemdoubleclick,o=n.legend.groupclick;a===1&&i==="toggle"&&l==="toggleothers"&&iy&&t.data&&t._context.showTips&&ly.notifier(ly._(t,"Double-click on legend to isolate one trace"),"long"),iy=!1;var s;if(a===1?s=i:a===2&&(s=l),!s)return;var u=o==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],v=r.data()[0][0];if(v.groupTitle&&v.noClick)return;var h=t._fullData,d=(n.shapes||[]).filter(function(Ie){return Ie.showlegend}),m=h.concat(d),g=v.trace;g._isShape&&(g=g._fullInput);var y=g.legendgroup,w,_,T,b,M,S,C={},q=[],D=[],R=[];function z(Ie,Be){var Ne=q.indexOf(Ie),Ee=C.visible;return Ee||(Ee=C.visible=[]),q.indexOf(Ie)===-1&&(q.push(Ie),Ne=q.length-1),Ee[Ne]=Be,Ne}var F=(n.shapes||[]).map(function(Ie){return Ie._input}),H=!1;function O(Ie,Be){F[Ie].visible=Be,H=!0}function X(Ie,Be){if(!(v.groupTitle&&!u)){var Ne=Ie._fullInput||Ie,Ee=Ne._isShape,Je=Ne.index;Je===void 0&&(Je=Ne._index);var We=Ne.visible===!1?!1:Be;Ee?O(Je,We):z(Je,We)}}var J=g.legend,B=g._fullInput,I=B&&B._isShape;if(!I&&Is.traceIs(g,"pie-like")){var W=v.label,K=f.indexOf(W);if(s==="toggle")K===-1?f.push(W):f.splice(K,1);else if(s==="toggleothers"){var Q=K!==-1,ie=[];for(w=0;w{"use strict";rw.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var nw=Z((fse,aw)=>{"use strict";var tw=gr(),sy=F0();aw.exports=function(r,t,a){var n=t._inHover,i=sy.isGrouped(t),l=sy.isReversed(t),o={},s=[],u=!1,f={},v=0,h=0,d,m;function g(B,I,W){if(t.visible!==!1&&!(a&&B!==t._id))if(I===""||!sy.isGrouped(t)){var K="~~i"+v;s.push(K),o[K]=[W],v++}else s.indexOf(I)===-1?(s.push(I),u=!0,o[I]=[W]):o[I].push(W)}for(d=0;dR&&(D=R)}C[d][0]._groupMinRank=D,C[d][0]._preGroupSort=d}var z=function(B,I){return B[0]._groupMinRank-I[0]._groupMinRank||B[0]._preGroupSort-I[0]._preGroupSort},F=function(B,I){return B.trace.legendrank-I.trace.legendrank||B._preSort-I._preSort};for(C.forEach(function(B,I){B[0]._preGroupSort=I}),C.sort(z),d=0;d{"use strict";var I0=He();function iw(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}wo.formatPiePercent=function(r,t){var a=iw((r*100).toPrecision(3));return I0.numSeparate(a,t)+"%"};wo.formatPieValue=function(r,t){var a=iw(r.toPrecision(10));return I0.numSeparate(a,t)};wo.getFirstFilled=function(r,t){if(I0.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var TV=tt(),MV=Er();lw.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?TV.pointStyle(r,a,n,t):MV.fill(r,t.color)}});var O0=Z((hse,fw)=>{"use strict";var sw=Er(),uw=H0().castOption,AV=ow();fw.exports=function(r,t,a,n){var i=a.marker.line,l=uw(i.color,t.pts)||sw.defaultLine,o=uw(i.width,t.pts)||0;r.call(AV,t,a,n).style("stroke-width",o).call(sw.stroke,l)}});var vy=Z((dse,mw)=>{"use strict";var Pa=Ir(),uy=gr(),wa=He(),cw=wa.strTranslate,Ba=tt(),An=Er(),fy=Tn().extractOpts,B0=on(),kV=O0(),CV=H0().castOption,SV=oy(),vw=12,hw=5,To=2,LV=10,Hs=5;mw.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",l=a.itemwidth,o=(l+SV.itemGap*2)/2,s=cw(o,0),u=function(C,q,D,R){var z;if(C+1)z=C;else if(q&&q.width>0)z=q.width;else return 0;return i?R:Math.min(z,D)};r.each(function(C){var q=Pa.select(this),D=wa.ensureSingle(q,"g","layers");D.style("opacity",C[0].trace.opacity);var R=a.indentation,z=a.valign,F=C[0].lineHeight,H=C[0].height;if(z==="middle"&&R===0||!F||!H)D.attr("transform",null);else{var O={top:1,bottom:-1}[z],X=O*(.5*(F-H+3))||0,J=a.indentation;D.attr("transform",cw(J,X))}var B=D.selectAll("g.legendfill").data([C]);B.enter().append("g").classed("legendfill",!0);var I=D.selectAll("g.legendlines").data([C]);I.enter().append("g").classed("legendlines",!0);var W=D.selectAll("g.legendsymbols").data([C]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(S).each(h).each(m).each(d).each(y).each(b).each(T).each(f).each(v).each(w).each(_);function f(C){var q=dw(C),D=q.showFill,R=q.showLine,z=q.showGradientLine,F=q.showGradientFill,H=q.anyFill,O=q.anyLine,X=C[0],J=X.trace,B,I,W=fy(J),K=W.colorscale,Q=W.reversescale,ie=function(Se){if(Se.size())if(D)Ba.fillGroupStyle(Se,t,!0);else{var ve="legendfill-"+J.uid;Ba.gradient(Se,t,ve,cy(Q),K,"fill")}},me=function(Se){if(Se.size()){var ve="legendline-"+J.uid;Ba.lineGroupStyle(Se),Ba.gradient(Se,t,ve,cy(Q),K,"stroke")}},pe=B0.hasMarkers(J)||!H?"M5,0":O?"M5,-2":"M5,-3",ge=Pa.select(this),j=ge.select(".legendfill").selectAll("path").data(D||F?[C]:[]);if(j.enter().append("path").classed("js-fill",!0),j.exit().remove(),j.attr("d",pe+"h"+l+"v6h-"+l+"z").call(ie),R||z){var _e=u(void 0,J.line,LV,hw);I=wa.minExtend(J,{line:{width:_e}}),B=[wa.minExtend(X,{trace:I})]}var se=ge.select(".legendlines").selectAll("path").data(R||z?[B]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",pe+(z?"l"+l+",0.0001":"h"+l)).call(R?Ba.lineGroupStyle:me)}function v(C){var q=dw(C),D=q.anyFill,R=q.anyLine,z=q.showLine,F=q.showMarker,H=C[0],O=H.trace,X=!F&&!R&&!D&&B0.hasText(O),J,B;function I(j,_e,se,Se){var ve=wa.nestedProperty(O,j).get(),Ae=wa.isArrayOrTypedArray(ve)&&_e?_e(ve):ve;if(i&&Ae&&Se!==void 0&&(Ae=Se),se){if(Aese[1])return se[1]}return Ae}function W(j){return H._distinct&&H.index&&j[H.index]?j[H.index]:j[0]}if(F||X||z){var K={},Q={};if(F){K.mc=I("marker.color",W),K.mx=I("marker.symbol",W),K.mo=I("marker.opacity",wa.mean,[.2,1]),K.mlc=I("marker.line.color",W),K.mlw=I("marker.line.width",wa.mean,[0,5],To),Q.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ie=I("marker.size",wa.mean,[2,16],vw);K.ms=ie,Q.marker.size=ie}z&&(Q.line={width:I("line.width",W,[0,10],hw)}),X&&(K.tx="Aa",K.tp=I("textposition",W),K.ts=10,K.tc=I("textfont.color",W),K.tf=I("textfont.family",W),K.tw=I("textfont.weight",W),K.ty=I("textfont.style",W),K.tv=I("textfont.variant",W),K.tC=I("textfont.textcase",W),K.tE=I("textfont.lineposition",W),K.tS=I("textfont.shadow",W)),J=[wa.minExtend(H,K)],B=wa.minExtend(O,Q),B.selectedpoints=null,B.texttemplate=null}var me=Pa.select(this).select("g.legendpoints"),pe=me.selectAll("path.scatterpts").data(F?J:[]);pe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),pe.exit().remove(),pe.call(Ba.pointStyle,B,t),F&&(J[0].mrc=3);var ge=me.selectAll("g.pointtext").data(X?J:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),ge.exit().remove(),ge.selectAll("text").call(Ba.textPointStyle,B,t)}function h(C){var q=C[0].trace,D=q.type==="waterfall";if(C[0]._distinct&&D){var R=C[0].trace[C[0].dir].marker;return C[0].mc=R.color,C[0].mlw=R.line.width,C[0].mlc=R.line.color,g(C,this,"waterfall")}var z=[];q.visible&&D&&(z=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 F=Pa.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(z);F.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),F.exit().remove(),F.each(function(H){var O=Pa.select(this),X=q[H[0]].marker,J=u(void 0,X.line,Hs,To);O.attr("d",H[1]).style("stroke-width",J+"px").call(An.fill,X.color),J&&O.call(An.stroke,X.line.color)})}function d(C){g(C,this)}function m(C){g(C,this,"funnel")}function g(C,q,D){var R=C[0].trace,z=R.marker||{},F=z.line||{},H=z.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",O=D?R.visible&&R.type===D:uy.traceIs(R,"bar"),X=Pa.select(q).select("g.legendpoints").selectAll("path.legend"+D).data(O?[C]:[]);X.enter().append("path").classed("legend"+D,!0).attr("d",H).attr("transform",s),X.exit().remove(),X.each(function(J){var B=Pa.select(this),I=J[0],W=u(I.mlw,z.line,Hs,To);B.style("stroke-width",W+"px");var K=I.mcc;if(!a._inHover&&"mc"in I){var Q=fy(z),ie=Q.mid;ie===void 0&&(ie=(Q.max+Q.min)/2),K=Ba.tryColorscale(z,"")(ie)}var me=K||I.mc||z.color,pe=z.pattern,ge=pe&&Ba.getPatternAttr(pe.shape,0,"");if(ge){var j=Ba.getPatternAttr(pe.bgcolor,0,null),_e=Ba.getPatternAttr(pe.fgcolor,0,null),se=pe.fgopacity,Se=pw(pe.size,8,10),ve=pw(pe.solidity,.5,1),Ae="legend-"+R.uid;B.call(Ba.pattern,"legend",t,Ae,ge,Se,ve,K,pe.fillmode,j,_e,se)}else B.call(An.fill,me);W&&An.stroke(B,I.mlc||F.color)})}function y(C){var q=C[0].trace,D=Pa.select(this).select("g.legendpoints").selectAll("path.legendbox").data(q.visible&&uy.traceIs(q,"box-violin")?[C]:[]);D.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.each(function(){var R=Pa.select(this);if((q.boxpoints==="all"||q.points==="all")&&An.opacity(q.fillcolor)===0&&An.opacity((q.line||{}).color)===0){var z=wa.minExtend(q,{marker:{size:i?vw:wa.constrain(q.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});D.call(Ba.pointStyle,z,t)}else{var F=u(void 0,q.line,Hs,To);R.style("stroke-width",F+"px").call(An.fill,q.fillcolor),F&&An.stroke(R,q.line.color)}})}function w(C){var q=C[0].trace,D=Pa.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(q.visible&&q.type==="candlestick"?[C,C]:[]);D.enter().append("path").classed("legendcandle",!0).attr("d",function(R,z){return z?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(R,z){var F=Pa.select(this),H=q[z?"increasing":"decreasing"],O=u(void 0,H.line,Hs,To);F.style("stroke-width",O+"px").call(An.fill,H.fillcolor),O&&An.stroke(F,H.line.color)})}function _(C){var q=C[0].trace,D=Pa.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(q.visible&&q.type==="ohlc"?[C,C]:[]);D.enter().append("path").classed("legendohlc",!0).attr("d",function(R,z){return z?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(R,z){var F=Pa.select(this),H=q[z?"increasing":"decreasing"],O=u(void 0,H.line,Hs,To);F.style("fill","none").call(Ba.dashLine,H.line.dash,O),O&&An.stroke(F,H.line.color)})}function T(C){M(C,this,"pie")}function b(C){M(C,this,"funnelarea")}function M(C,q,D){var R=C[0],z=R.trace,F=D?z.visible&&z.type===D:uy.traceIs(z,D),H=Pa.select(q).select("g.legendpoints").selectAll("path.legend"+D).data(F?[C]:[]);if(H.enter().append("path").classed("legend"+D,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),H.exit().remove(),H.size()){var O=z.marker||{},X=u(CV(O.line.width,R.pts),O.line,Hs,To),J="pieLike",B=wa.minExtend(z,{marker:{line:{width:X}}},J),I=wa.minExtend(R,{trace:B},J);kV(H,I,B,t)}}function S(C){var q=C[0].trace,D,R=[];if(q.visible)switch(q.type){case"histogram2d":case"heatmap":R=[["M-15,-2V4H15V-2Z"]],D=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":R=[["M-6,-6V6H6V-6Z"]],D=!0;break;case"densitymapbox":case"densitymap":R=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],D="radial";break;case"cone":R=[["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"]],D=!1;break;case"streamtube":R=[["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"]],D=!1;break;case"surface":R=[["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"]],D=!0;break;case"mesh3d":R=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!1;break;case"volume":R=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!0;break;case"isosurface":R=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],D=!1;break}var z=Pa.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(R);z.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(F,H){var O=Pa.select(this),X=fy(q),J=X.colorscale,B=X.reversescale,I=function(ie){if(ie.size()){var me="legendfill-"+q.uid;Ba.gradient(ie,t,me,cy(B,D==="radial"),J,"fill")}},W;if(J){if(!D){var Q=J.length;W=H===0?J[B?Q-1:0][1]:H===1?J[B?0:Q-1][1]:J[Math.floor((Q-1)/2)][1]}}else{var K=q.vertexcolor||q.facecolor||q.color;W=wa.isArrayOrTypedArray(K)?K[H]||K[0]:K}O.attr("d",F[0]),W?O.call(An.fill,W):O.call(I)})}};function cy(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function dw(e){var r=e[0].trace,t=r.contours,a=B0.hasLines(r),n=B0.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",l=!1,o=!1;if(t){var s=t.coloring;s==="lines"?l=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(o=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:l,showGradientFill:o,anyLine:a||l,anyFill:i||o}}function pw(e,r,t){return e&&wa.isArrayOrTypedArray(e)?r:e>t?t:e}});var my=Z((pse,kw)=>{"use strict";var Qa=Ir(),Nt=He(),dy=Pt(),Ys=gr(),yw=$u(),hy=Qn(),Ft=tt(),U0=Er(),Mo=xa(),gw=ew(),Gt=oy(),py=Da(),Mw=py.LINE_SPACING,Bs=py.FROM_TL,bw=py.FROM_BR,xw=nw(),qV=vy(),_w=F0(),Os=1,DV=/^legend[0-9]*$/;kw.exports=function(r,t){if(t)ww(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Qa.select(this),f=u.attr("class"),v=f.split(" ")[0];v.match(DV)&&n.indexOf(v)===-1&&u.remove()});for(var l=0;l1)}var m=a.hiddenlabels||[];if(!o&&(!a.showlegend||!s.length))return l.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),dy.autoMargin(e,n);var g=Nt.ensureSingle(l,"g",n,function(q){o||q.attr("pointer-events","all")}),y=Nt.ensureSingleById(a._topdefs,"clipPath",i,function(q){q.append("rect")}),w=Nt.ensureSingle(g,"rect","bg",function(q){q.attr("shape-rendering","crispEdges")});w.call(U0.stroke,t.bordercolor).call(U0.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var _=Nt.ensureSingle(g,"g","scrollbox"),T=t.title;t._titleWidth=0,t._titleHeight=0;var b;T.text?(b=Nt.ensureSingle(_,"text",n+"titletext"),b.attr("text-anchor","start").call(Ft.font,T.font).text(T.text),G0(b,_,e,t,Os)):_.selectAll("."+n+"titletext").remove();var M=Nt.ensureSingle(g,"rect","scrollbar",function(q){q.attr(Gt.scrollBarEnterAttrs).call(U0.fill,Gt.scrollBarColor)}),S=_.selectAll("g.groups").data(s);S.enter().append("g").attr("class","groups"),S.exit().remove();var C=S.selectAll("g.traces").data(Nt.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(q){var D=q[0].trace;return Ys.traceIs(D,"pie-like")?m.indexOf(q[0].label)!==-1?.5:1:D.visible==="legendonly"?.5:1}).each(function(){Qa.select(this).call(PV,e,t)}).call(qV,e,t).each(function(){o||Qa.select(this).call(RV,e,n)}),Nt.syncOrAsync([dy.previousPromises,function(){return FV(e,S,C,t)},function(){var q=a._size,D=t.borderwidth,R=t.xref==="paper",z=t.yref==="paper";if(T.text&&EV(b,t,D),!o){var F,H;R?F=q.l+q.w*t.x-Bs[V0(t)]*t._width:F=a.width*t.x-Bs[V0(t)]*t._width,z?H=q.t+q.h*(1-t.y)-Bs[W0(t)]*t._effHeight:H=a.height*(1-t.y)-Bs[W0(t)]*t._effHeight;var O=IV(e,n,F,H);if(O)return;if(a.margin.autoexpand){var X=F,J=H;F=R?Nt.constrain(F,0,a.width-t._width):X,H=z?Nt.constrain(H,0,a.height-t._effHeight):J,F!==X&&Nt.log("Constrain "+n+".x to make legend fit inside graph"),H!==J&&Nt.log("Constrain "+n+".y to make legend fit inside graph")}Ft.setTranslate(g,F,H)}if(M.on(".drag",null),g.on("wheel",null),o||t._height<=t._maxHeight||e._context.staticPlot){var B=t._effHeight;o&&(B=t._height),w.attr({width:t._width-D,height:B-D,x:D/2,y:D/2}),Ft.setTranslate(_,0,0),y.select("rect").attr({width:t._width-2*D,height:B-2*D,x:D,y:D}),Ft.setClipUrl(_,i,e),Ft.setRect(M,0,0,0,0),delete t._scrollY}else{var I=Math.max(Gt.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),W=t._effHeight-I-2*Gt.scrollBarMargin,K=t._height-t._effHeight,Q=W/K,ie=Math.min(t._scrollY||0,K);w.attr({width:t._width-2*D+Gt.scrollBarWidth+Gt.scrollBarMargin,height:t._effHeight-D,x:D/2,y:D/2}),y.select("rect").attr({width:t._width-2*D+Gt.scrollBarWidth+Gt.scrollBarMargin,height:t._effHeight-2*D,x:D,y:D+ie}),Ft.setClipUrl(_,i,e),ve(ie,I,Q),g.on("wheel",function(){ie=Nt.constrain(t._scrollY+Qa.event.deltaY/W*K,0,K),ve(ie,I,Q),ie!==0&&ie!==K&&Qa.event.preventDefault()});var me,pe,ge,j=function(de,be,ye){var Fe=(ye-be)/Q+de;return Nt.constrain(Fe,0,K)},_e=function(de,be,ye){var Fe=(be-ye)/Q+de;return Nt.constrain(Fe,0,K)},se=Qa.behavior.drag().on("dragstart",function(){var de=Qa.event.sourceEvent;de.type==="touchstart"?me=de.changedTouches[0].clientY:me=de.clientY,ge=ie}).on("drag",function(){var de=Qa.event.sourceEvent;de.buttons===2||de.ctrlKey||(de.type==="touchmove"?pe=de.changedTouches[0].clientY:pe=de.clientY,ie=j(ge,me,pe),ve(ie,I,Q))});M.call(se);var Se=Qa.behavior.drag().on("dragstart",function(){var de=Qa.event.sourceEvent;de.type==="touchstart"&&(me=de.changedTouches[0].clientY,ge=ie)}).on("drag",function(){var de=Qa.event.sourceEvent;de.type==="touchmove"&&(pe=de.changedTouches[0].clientY,ie=_e(ge,me,pe),ve(ie,I,Q))});_.call(Se)}function ve(de,be,ye){t._scrollY=e._fullLayout[n]._scrollY=de,Ft.setTranslate(_,0,-de),Ft.setRect(M,t._width,Gt.scrollBarMargin+de*ye,Gt.scrollBarWidth,be),y.select("rect").attr("y",D+de)}if(e._context.edits.legendPosition){var Ae,Y,re,U;g.classed("cursor-move",!0),hy.init({element:g.node(),gd:e,prepFn:function(de){if(de.target!==M.node()){var be=Ft.getTranslate(g);re=be.x,U=be.y}},moveFn:function(de,be){if(re!==void 0&&U!==void 0){var ye=re+de,Fe=U+be;Ft.setTranslate(g,ye,Fe),Ae=hy.align(ye,t._width,q.l,q.l+q.w,t.xanchor),Y=hy.align(Fe+t._height,-t._height,q.t+q.h,q.t,t.yanchor)}},doneFn:function(){if(Ae!==void 0&&Y!==void 0){var de={};de[n+".x"]=Ae,de[n+".y"]=Y,Ys.call("_guiRelayout",e,de)}},clickFn:function(de,be){var ye=l.selectAll("g.traces").filter(function(){var Fe=this.getBoundingClientRect();return be.clientX>=Fe.left&&be.clientX<=Fe.right&&be.clientY>=Fe.top&&be.clientY<=Fe.bottom});ye.size()>0&&Aw(e,g,ye,de,be)}})}}],e)}}function Y0(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,l=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*l:t+(l||n)}function Aw(e,r,t,a,n){var i=t.data()[0][0].trace,l={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(l.group=i._group),Ys.traceIs(i,"pie-like")&&(l.label=t.datum()[0].label);var o=yw.triggerHandler(e,"plotly_legendclick",l);if(a===1){if(o===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&gw(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=yw.triggerHandler(e,"plotly_legenddoubleclick",l);s!==!1&&o!==!1&&gw(t,e,a)}}function PV(e,r,t){var a=Z0(t),n=e.data()[0][0],i=n.trace,l=Ys.traceIs(i,"pie-like"),o=!t._inHover&&r._context.edits.legendText&&!l,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=l?n.label:i.name,i._meta&&(u=Nt.templateString(u,i._meta))));var v=Nt.ensureSingle(e,"text",a+"text");v.attr("text-anchor","start").call(Ft.font,f).text(o?Tw(u,s):u);var h=t.indentation+t.itemwidth+Gt.itemGap*2;Mo.positionText(v,h,0),o?v.call(Mo.makeEditable,{gd:r,text:u}).call(G0,e,r,t).on("edit",function(d){this.text(Tw(d,s)).call(G0,e,r,t);var m=n.trace._fullInput||{},g={};return g.name=d,m._isShape?Ys.call("_guiRelayout",r,"shapes["+i.index+"].name",g.name):Ys.call("_guiRestyle",r,g,i.index)}):G0(v,e,r,t)}function Tw(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function RV(e,r,t){var a=r._context.doubleClickDelay,n,i=1,l=Nt.ensureSingle(e,"rect",t+"toggle",function(o){r._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(U0.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(l.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),Aw(r,o,e,i,Qa.event)}}))}function G0(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),Mo.convertToTspans(e,t,function(){zV(r,t,a,n)})}function zV(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),l=i.node(),o=Z0(t);t||(t=r._fullLayout[o]);var s=t.borderwidth,u;a===Os?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*Mw,v,h;if(l){var d=Ft.bBox(l);v=d.height,h=d.width,a===Os?Ft.setTranslate(i,s,s+v*.75):Ft.setTranslate(i,0,v*.25)}else{var m="."+o+(a===Os?"title":"")+"text",g=e.select(m),y=Mo.lineCount(g),w=g.node();if(v=f*y,h=w?Ft.bBox(w).width:0,a===Os)t.title.side==="left"&&(h+=Gt.itemGap*2),Mo.positionText(g,s+Gt.titlePad,s+f);else{var _=Gt.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(_=Gt.itemGap,h-=t.indentation+t.itemwidth),Mo.positionText(g,_,-f*((y-1)/2-.3))}}a===Os?(t._titleWidth=h,t._titleHeight=v):(n.lineHeight=f,n.height=Math.max(v,16)+3,n.width=h)}function NV(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function FV(e,r,t,a){var n=e._fullLayout,i=Z0(a);a||(a=n[i]);var l=n._size,o=_w.isVertical(a),s=_w.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,v=2*f,h=Gt.itemGap,d=a.indentation+a.itemwidth+h*2,m=2*(f+h),g=W0(a),y=a.y<0||a.y===0&&g==="top",w=a.y>1||a.y===1&&g==="bottom",_=a.tracegroupgap,T={};a._maxHeight=Math.max(y||w?n.height/2:l.h,30);var b=0;a._width=0,a._height=0;var M=NV(a);if(o)t.each(function(ge){var j=ge[0].height;Ft.setTranslate(this,f+M[0],f+M[1]+a._height+j/2+h),a._height+=j,a._width=Math.max(a._width,ge[0].width)}),b=d+a._width,a._width+=h+d+v,a._height+=m,s&&(r.each(function(ge,j){Ft.setTranslate(this,0,j*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var S=V0(a),C=a.x<0||a.x===0&&S==="right",q=a.x>1||a.x===1&&S==="left",D=w||y,R=n.width/2;a._maxWidth=Math.max(C?D&&S==="left"?l.l+l.w:R:q?D&&S==="right"?l.r+l.w:R:l.w,2*d);var z=0,F=0;t.each(function(ge){var j=Y0(ge,a,d);z=Math.max(z,j),F+=j}),b=null;var H=0;if(s){var O=0,X=0,J=0;r.each(function(){var ge=0,j=0;Qa.select(this).selectAll("g.traces").each(function(se){var Se=Y0(se,a,d),ve=se[0].height;Ft.setTranslate(this,M[0],M[1]+f+h+ve/2+j),j+=ve,ge=Math.max(ge,Se),T[se[0].trace.legendgroup]=ge});var _e=ge+h;X>0&&_e+f+X>a._maxWidth?(H=Math.max(H,X),X=0,J+=O+_,O=j):O=Math.max(O,j),Ft.setTranslate(this,X,J),X+=_e}),a._width=Math.max(H,X)+f,a._height=J+O+m}else{var B=t.size(),I=F+v+(B-1)*h=a._maxWidth&&(H=Math.max(H,ie),K=0,Q+=W,a._height+=W,W=0),Ft.setTranslate(this,M[0]+f+K,M[1]+f+Q+j/2+h),ie=K+_e+h,K+=se,W=Math.max(W,j)}),I?(a._width=K+v,a._height=W+m):(a._width=Math.max(H,ie)+v,a._height+=W+m)}}a._width=Math.ceil(Math.max(a._width+M[0],a._titleWidth+2*(f+Gt.titlePad))),a._height=Math.ceil(Math.max(a._height+M[1],a._titleHeight+2*(f+Gt.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var me=e._context.edits,pe=me.legendText||me.legendPosition;t.each(function(ge){var j=Qa.select(this).select("."+i+"toggle"),_e=ge[0].height,se=ge[0].trace.legendgroup,Se=Y0(ge,a,d);s&&se!==""&&(Se=T[se]);var ve=pe?d:b||Se;!o&&!u&&(ve+=h/2),Ft.setRect(j,0,-_e/2,ve,_e)})}function IV(e,r,t,a){var n=e._fullLayout,i=n[r],l=V0(i),o=W0(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",v=i.x<.5?"l":"r",h={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return dy.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*Bs[l],r:i._width*bw[l],b:i._effHeight*bw[o],t:i._effHeight*Bs[o]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][v]=h[v]:e._fullLayout._reservedMargin[r][f]=h[f]}function V0(e){return Nt.isRightAnchor(e)?"right":Nt.isCenterAnchor(e)?"center":"left"}function W0(e){return Nt.isBottomAnchor(e)?"bottom":Nt.isMiddleAnchor(e)?"middle":"top"}function Z0(e){return e._id||"legend"}});var xy=Z(by=>{"use strict";var Ao=Ir(),Gi=Hr(),Cw=bn(),Mt=He(),HV=Mt.pushUnique,yy=Mt.strTranslate,OV=Mt.strRotate,BV=$u(),kn=xa(),YV=K8(),Mi=tt(),Kt=Er(),X0=Qn(),Ai=dt(),UV=da().zindexSeparator,Gs=gr(),$n=bi(),ko=Yu(),GV=ny(),VV=my(),zw=ko.YANGLE,gy=Math.PI*zw/180,WV=1/Math.sin(gy),ZV=Math.cos(gy),XV=Math.sin(gy),gt=ko.HOVERARROWSIZE,Or=ko.HOVERTEXTPAD,Sw={box:!0,ohlc:!0,violin:!0,candlestick:!0},JV={scatter:!0,scattergl:!0,splom:!0};function Lw(e,r){return e.distance-r.distance}by.hover=function(r,t,a,n){r=Mt.getGraphDiv(r);var i=t.target;Mt.throttle(r._fullLayout._uid+ko.HOVERID,ko.HOVERMINTIME,function(){KV(r,t,a,n,i)})};by.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=Ow(n),l=Bw(n),o=r.map(function(y){var w=y._x0||y.x0||y.x||0,_=y._x1||y.x1||y.x||0,T=y._y0||y.y0||y.y||0,b=y._y1||y.y1||y.y||0,M=y.eventData;if(M){var S=Math.min(w,_),C=Math.max(w,_),q=Math.min(T,b),D=Math.max(T,b),R=y.trace;if(Gs.traceIs(R,"gl3d")){var z=n._fullLayout[R.scene]._scene.container,F=z.offsetLeft,H=z.offsetTop;S+=F,C+=F,q+=H,D+=H}M.bbox={x0:S+l,x1:C+l,y0:q+i,y1:D+i},t.inOut_bbox&&t.inOut_bbox.push(M.bbox)}else M=!1;return{color:y.color||Kt.defaultLine,x0:y.x0||y.x||0,x1:y.x1||y.x||0,y0:y.y0||y.y||0,y1:y.y1||y.y||0,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:y.text,name:y.name,idealAlign:y.idealAlign,borderColor:y.borderColor,fontFamily:y.fontFamily,fontSize:y.fontSize,fontColor:y.fontColor,fontWeight:y.fontWeight,fontStyle:y.fontStyle,fontVariant:y.fontVariant,nameLength:y.nameLength,textAlign:y.textAlign,trace:y.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:y.hovertemplate||!1,hovertemplateLabels:y.hovertemplateLabels||!1,eventData:M}}),s=!1,u=Fw(o,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||Kt.background,container:Ao.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,v=5,h=0,d=0;f.sort(function(y,w){return y.y0-w.y0}).each(function(y,w){var _=y.y0-y.by/2;_-vC[0]._length||U<0||U>q[0]._length)return X0.unhoverRaw(e,r)}if(r.pointerX=re+C[0]._offset,r.pointerY=U+q[0]._offset,"xval"in r?J=$n.flat(i,r.xval):J=$n.p2c(C,re),"yval"in r?B=$n.flat(i,r.yval):B=$n.p2c(q,U),!Gi(J[0])||!Gi(B[0]))return Mt.warn("Fx.hover failed",r,e),X0.unhoverRaw(e,r)}var ye=1/0;function Fe(yr,ot){for(W=0;Wse&&(O.splice(0,se),ye=O[0].distance),v&&H!==0&&O.length===0){_e.distance=H,_e.index=!1;var yt=Q._module.hoverPoints(_e,ge,j,"closest",{hoverLayer:o._hoverlayer});if(yt&&(yt=yt.filter(function(at){return at.spikeDistance<=H})),yt&&yt.length){var Ca,aa=yt.filter(function(at){return at.xa.showspikes&&at.xa.spikesnap!=="hovered data"});if(aa.length){var In=aa[0];Gi(In.x0)&&Gi(In.y0)&&(Ca=Pe(In),(!Se.vLinePoint||Se.vLinePoint.spikeDistance>Ca.spikeDistance)&&(Se.vLinePoint=Ca))}var Hn=yt.filter(function(at){return at.ya.showspikes&&at.ya.spikesnap!=="hovered data"});if(Hn.length){var Wt=Hn[0];Gi(Wt.x0)&&Gi(Wt.y0)&&(Ca=Pe(Wt),(!Se.hLinePoint||Se.hLinePoint.spikeDistance>Ca.spikeDistance)&&(Se.hLinePoint=Ca))}}}}}Fe();function Re(yr,ot,Wr){for(var mt=null,Tt=1/0,st,yt=0;yt0&&Math.abs(yr.distance)Le-1;lr--)fr(O[lr]);O=Ue,Ee()}var ze=e._hoverdata,ae=[],oe=Ow(e),qe=Bw(e);for(I=0;I1||O.length>1)||h==="closest"&&ve&&O.length>1,pn=Kt.combine(o.plot_bgcolor||Kt.background,o.paper_bgcolor),Ia=Fw(O,{gd:e,hovermode:h,rotateLabels:ra,bgColor:pn,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),ta=Ia.hoverLabels;if($n.isUnifiedHover(h)||($V(ta,ra,o,Ia.commonLabelBoundingBox),Hw(ta,ra,o._invScaleX,o._invScaleY)),n&&n.tagName){var Ha=Gs.getComponentMethod("annotations","hasClickToShow")(e,ae);YV(Ao.select(n),Ha?"pointer":"")}!n||a||!rW(e,r,ze)||(ze&&e.emit("plotly_unhover",{event:r,points:ze}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:C,yaxes:q,xvals:J,yvals:B}))}function Nw(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 QV=/([\s\S]*)<\/extra>/;function Fw(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,l=r.bgColor,o=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||ko.HOVERFONT,v=r.fontSize||ko.HOVERFONTSIZE,h=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,m=r.fontVariant||a.font.variant,g=r.fontTextcase||a.font.textcase,y=r.fontLineposition||a.font.lineposition,w=r.fontShadow||a.font.shadow,_=e[0],T=_.xa,b=_.ya,M=n.charAt(0),S=M+"Label",C=_[S];if(C===void 0&&T.type==="multicategory")for(var q=0;qa.width-ze&&(ae=a.width-ze),cr.attr("d","M"+(Ke-ae)+",0L"+(Ke-ae+gt)+","+lr+gt+"H"+ze+"v"+lr+(Or*2+Oe.height)+"H"+-ze+"V"+lr+gt+"H"+(Ke-ae-gt)+"Z"),Ke=ae,W.minX=Ke-ze,W.maxX=Ke+ze,T.side==="top"?(W.minY=fr-(Or*2+Oe.height),W.maxY=fr-Or):(W.minY=fr+Or,W.maxY=fr+(Or*2+Oe.height))}else{var oe,qe,ke;b.side==="right"?(oe="start",qe=1,ke="",Ke=T._offset+T._length):(oe="end",qe=-1,ke="-",Ke=T._offset),fr=b._offset+(_.y0+_.y1)/2,tr.attr("text-anchor",oe),cr.attr("d","M0,0L"+ke+gt+","+gt+"V"+(Or+Oe.height/2)+"h"+ke+(Or*2+Oe.width)+"V-"+(Or+Oe.height/2)+"H"+ke+gt+"V-"+gt+"Z"),W.minY=fr-(Or+Oe.height/2),W.maxY=fr+(Or+Oe.height/2),b.side==="right"?(W.minX=Ke+gt,W.maxX=Ke+gt+(Or*2+Oe.width)):(W.minX=Ke-gt-(Or*2+Oe.width),W.maxX=Ke-gt);var ir=Oe.height/2,vr=R-Oe.top-ir,sr="clip"+a._uid+"commonlabel"+b._id,Mr;if(Ke=0?We=Be:Ne+U=0?We=Ne:Ee+U=0?ne=Pe:Ie+de=0?ne=Ie:Je+de=0,(Ce.idealAlign==="top"||!Vr)&&St?(ke-=vr/2,Ce.anchor="end"):Vr?(ke+=vr/2,Ce.anchor="start"):Ce.anchor="middle",Ce.crossPos=ke;else{if(Ce.pos=ke,Vr=qe+ir/2+$r<=z,St=qe-ir/2-$r>=0,(Ce.idealAlign==="left"||!Vr)&&St)qe-=ir/2,Ce.anchor="end";else if(Vr)qe+=ir/2,Ce.anchor="start";else{Ce.anchor="middle";var ea=$r/2,ka=qe+ea-z,ra=qe-ea;ka>0&&(qe-=ka),ra<0&&(qe+=-ra)}Ce.crossPos=qe}fr.attr("text-anchor",Ce.anchor),ze&&lr.attr("text-anchor",Ce.anchor),cr.attr("transform",yy(qe,ke)+(i?OV(zw):""))}),{hoverLabels:Me,commonLabelBoundingBox:W}}function qw(e,r,t,a,n,i){var l="",o="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Mt.templateString(e.name,e.trace._meta)),l=Pw(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(o+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(o+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(o+=(o?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?o=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(o=e.yLabel):e.yLabel===void 0?o=e.xLabel:o="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(o+=(o?"
":"")+e.text),e.extraText!==void 0&&(o+=(o?"
":"")+e.extraText),i&&o===""&&!e.hovertemplate&&(l===""&&i.remove(),o=l);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),o=Mt.hovertemplateString(f,v,a._d3locale,e.eventData[0]||{},e.trace._meta),o=o.replace(QV,function(h,d){return l=Pw(d,e.nameLength),""})}return[o,l]}function $V(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",l=0,o=1,s=e.size(),u=new Array(s),f=0,v=a.minX,h=a.maxX,d=a.minY,m=a.maxY,g=function(J){return J*t._invScaleX},y=function(J){return J*t._invScaleY};e.each(function(J){var B=J[n],I=J[i],W=B._id.charAt(0)==="x",K=B.range;f===0&&K&&K[0]>K[1]!==W&&(o=-1);var Q=0,ie=W?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var me=Iw(J,r),pe=J.anchor,ge=pe==="end"?-1:1,j,_e;if(pe==="middle")j=J.crossPos+(W?y(me.y-J.by/2):g(J.bx/2+J.tx2width/2)),_e=j+(W?y(J.by):g(J.bx));else if(W)j=J.crossPos+y(gt+me.y)-y(J.by/2-gt),_e=j+y(J.by);else{var se=g(ge*gt+me.x),Se=se+g(ge*J.bx);j=J.crossPos+Math.min(se,Se),_e=J.crossPos+Math.max(se,Se)}W?d!==void 0&&m!==void 0&&Math.min(_e,m)-Math.max(j,d)>1&&(I.side==="left"?(Q=I._mainLinePosition,ie=t.width):ie=I._mainLinePosition):v!==void 0&&h!==void 0&&Math.min(_e,h)-Math.max(j,v)>1&&(I.side==="top"?(Q=I._mainLinePosition,ie=t.height):ie=I._mainLinePosition)}u[f++]=[{datum:J,traceIndex:J.trace.index,dp:0,pos:J.pos,posref:J.posref,size:J.by*(W?WV:1)/2,pmin:Q,pmax:ie}]}),u.sort(function(J,B){return J[0].posref-B[0].posref||o*(B[0].traceIndex-J[0].traceIndex)});var w,_,T,b,M,S,C;function q(J){var B=J[0],I=J[J.length-1];if(_=B.pmin-B.pos-B.dp+B.size,T=I.pos+I.dp+I.size-B.pmax,_>.01){for(M=J.length-1;M>=0;M--)J[M].dp+=_;w=!1}if(!(T<.01)){if(_<-.01){for(M=J.length-1;M>=0;M--)J[M].dp-=T;w=!1}if(w){var W=0;for(b=0;bB.pmax&&W++;for(b=J.length-1;b>=0&&!(W<=0);b--)S=J[b],S.pos>B.pmax-1&&(S.del=!0,W--);for(b=0;b=0;M--)J[M].dp-=T;for(b=J.length-1;b>=0&&!(W<=0);b--)S=J[b],S.pos+S.dp+S.size>B.pmax&&(S.del=!0,W--)}}}for(;!w&&l<=s;){for(l++,w=!0,b=0;b.01){for(M=R.length-1;M>=0;M--)R[M].dp+=_;for(D.push.apply(D,R),u.splice(b+1,1),C=0,M=D.length-1;M>=0;M--)C+=D[M].dp;for(T=C/D.length,M=D.length-1;M>=0;M--)D[M].dp-=T;w=!1}else b++}u.forEach(q)}for(b=u.length-1;b>=0;b--){var H=u[b];for(M=H.length-1;M>=0;M--){var O=H[M],X=O.datum;X.offset=O.dp,X.del=O.del}}}function Iw(e,r){var t=0,a=e.offset;return r&&(a*=-XV,t=e.offset*ZV),{x:t,y:a}}function jV(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(gt+Or),a=t+r*(e.txwidth+Or),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Or),{alignShift:r,textShiftX:t,text2ShiftX:a}}function Hw(e,r,t,a){var n=function(l){return l*t},i=function(l){return l*a};e.each(function(l){var o=Ao.select(this);if(l.del)return o.remove();var s=o.select("text.nums"),u=l.anchor,f=u==="end"?-1:1,v=jV(l),h=Iw(l,r),d=h.x,m=h.y,g=u==="middle";o.select("path").attr("d",g?"M-"+n(l.bx/2+l.tx2width/2)+","+i(m-l.by/2)+"h"+n(l.bx)+"v"+i(l.by)+"h-"+n(l.bx)+"Z":"M0,0L"+n(f*gt+d)+","+i(gt+m)+"v"+i(l.by/2-gt)+"h"+n(f*l.bx)+"v-"+i(l.by)+"H"+n(f*gt+d)+"V"+i(m-gt)+"Z");var y=d+v.textShiftX,w=m+l.ty0-l.by/2+Or,_=l.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(s.attr("text-anchor","start"),y=g?-l.bx/2-l.tx2width/2+Or:-l.bx-Or):_==="right"&&u!=="end"&&(s.attr("text-anchor","end"),y=g?l.bx/2-l.tx2width/2-Or:l.bx+Or)),s.call(kn.positionText,n(y),i(w)),l.tx2width&&(o.select("text.name").call(kn.positionText,n(v.text2ShiftX+v.alignShift*Or+d),i(m+l.ty0-l.by/2+Or)),o.select("rect").call(Mi.setRect,n(v.text2ShiftX+(v.alignShift-1)*l.tx2width/2+d),i(m-l.by/2-1),n(l.tx2width),i(l.by+2)))})}function eW(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function l(h){return h||Gi(h)&&h===0}var o=Array.isArray(t)?function(h,d){var m=Mt.castOption(n,t,h);return l(m)?m:Mt.extractOption({},a,"",d)}:function(h,d){return Mt.extractOption(i,a,h,d)};function s(h,d,m){var g=o(d,m);l(g)&&(e[h]=g)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Mt.constrain(e.x0,0,e.xa._length),e.x1=Mt.constrain(e.x1,0,e.xa._length),e.y0=Mt.constrain(e.y0,0,e.ya._length),e.y1=Mt.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Ai.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Ai.hoverLabelText(e.ya,e.yLabelVal,a.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=Ai.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Ai.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Ai.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Ai.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var v=e.hoverinfo||e.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(e.xLabel=void 0),v.indexOf("y")===-1&&(e.yLabel=void 0),v.indexOf("z")===-1&&(e.zLabel=void 0),v.indexOf("text")===-1&&(e.text=void 0),v.indexOf("name")===-1&&(e.name=void 0)),e}function Dw(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,l=t.event,o=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||o)){var v=Kt.combine(n.plot_bgcolor,n.paper_bgcolor);if(o){var h=r.hLinePoint,d,m;u=h&&h.xa,f=h&&h.ya;var g=f.spikesnap;g==="cursor"?(d=l.pointerX,m=l.pointerY):(d=u._offset+h.x,m=f._offset+h.y);var y=Cw.readability(h.color,v)<1.5?Kt.contrast(v):h.color,w=f.spikemode,_=f.spikethickness,T=f.spikecolor||y,b=Ai.getPxPosition(e,f),M,S;if(w.indexOf("toaxis")!==-1||w.indexOf("across")!==-1){if(w.indexOf("toaxis")!==-1&&(M=b,S=d),w.indexOf("across")!==-1){var C=f._counterDomainMin,q=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),q=Math.max(q,f.position)),M=i.l+C*i.w,S=i.l+q*i.w}a.insert("line",":first-child").attr({x1:M,x2:S,y1:m,y2:m,"stroke-width":_,stroke:T,"stroke-dasharray":Mi.dashStyle(f.spikedash,_)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:M,x2:S,y1:m,y2:m,"stroke-width":_+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}w.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:b+(f.side!=="right"?_:-_),cy:m,r:_,fill:T}).classed("spikeline",!0)}if(s){var D=r.vLinePoint,R,z;u=D&&D.xa,f=D&&D.ya;var F=u.spikesnap;F==="cursor"?(R=l.pointerX,z=l.pointerY):(R=u._offset+D.x,z=f._offset+D.y);var H=Cw.readability(D.color,v)<1.5?Kt.contrast(v):D.color,O=u.spikemode,X=u.spikethickness,J=u.spikecolor||H,B=Ai.getPxPosition(e,u),I,W;if(O.indexOf("toaxis")!==-1||O.indexOf("across")!==-1){if(O.indexOf("toaxis")!==-1&&(I=B,W=z),O.indexOf("across")!==-1){var K=u._counterDomainMin,Q=u._counterDomainMax;u.anchor==="free"&&(K=Math.min(K,u.position),Q=Math.max(Q,u.position)),I=i.t+(1-Q)*i.h,W=i.t+(1-K)*i.h}a.insert("line",":first-child").attr({x1:R,x2:R,y1:I,y2:W,"stroke-width":X,stroke:J,"stroke-dasharray":Mi.dashStyle(u.spikedash,X)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:R,x2:R,y1:I,y2:W,"stroke-width":X+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}O.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:R,cy:B-(u.side!=="top"?X:-X),r:X,fill:J}).classed("spikeline",!0)}}}function rW(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function Ew(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function Pw(e,r){return kn.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function tW(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],l=0;l{"use strict";var aW=He(),nW=Er(),iW=bi().isUnifiedHover;Yw.exports=function(r,t,a,n){n=n||{};var i=t.legend;function l(o){n.font[o]||(n.font[o]=i?t.legend.font[o]:t.font[o])}t&&iW(t.hovermode)&&(n.font||(n.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),i?(n.bgcolor||(n.bgcolor=nW.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),aW.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var Gw=Z((gse,Uw)=>{"use strict";var lW=He(),oW=J0(),sW=fs();Uw.exports=function(r,t){function a(n,i){return lW.coerce(r,t,sW,n,i)}oW(r,t,a)}});var Zw=Z((bse,Ww)=>{"use strict";var Vw=He(),uW=mv(),fW=J0();Ww.exports=function(r,t,a,n){function i(o,s){return Vw.coerce(r,t,uW,o,s)}var l=Vw.extendFlat({},n.hoverlabel);t.hovertemplate&&(l.namelength=-1),fW(r,t,i,l)}});var _y=Z((xse,Xw)=>{"use strict";var cW=He(),vW=fs();Xw.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:cW.coerce(r,t,vW,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var Qw=Z((_se,Kw)=>{"use strict";var Jw=He(),hW=fs(),dW=_y(),pW=J0();Kw.exports=function(r,t){function a(f,v){return Jw.coerce(r,t,hW,f,v)}var n=dW(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var l=t._has("mapbox"),o=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((l||o||s)&&u===1||(l||o)&&s&&u===2)&&(t.dragmode="pan"),pW(r,t,a),Jw.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var eT=Z((wse,jw)=>{"use strict";var wy=He(),$w=gr();jw.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return wy.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var yW=gr(),gW=xy().hover;rT.exports=function(r,t,a){var n=yW.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&gW(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var ki=Z((Mse,iT)=>{"use strict";var bW=Ir(),K0=He(),xW=Qn(),bf=bi(),aT=fs(),nT=xy();iT.exports={moduleType:"component",name:"fx",constants:Yu(),schema:{layout:aT},attributes:mv(),layoutAttributes:aT,supplyLayoutGlobalDefaults:Gw(),supplyDefaults:Zw(),supplyLayoutDefaults:Qw(),calc:eT(),getDistanceFunction:bf.getDistanceFunction,getClosest:bf.getClosest,inbox:bf.inbox,quadrature:bf.quadrature,appendArrayPointValue:bf.appendArrayPointValue,castHoverOption:wW,castHoverinfo:TW,hover:nT.hover,unhover:xW.unhover,loneHover:nT.loneHover,loneUnhover:_W,click:tT()};function _W(e){var r=K0.isD3Selection(e)?e:bW.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function wW(e,r,t){return K0.castOption(e,r,"hoverlabel."+t)}function TW(e,r,t){function a(n){return K0.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return K0.castOption(e,t,"hoverinfo",a)}});var Vs=Z(Vi=>{"use strict";Vi.selectMode=function(e){return e==="lasso"||e==="select"};Vi.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Vi.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Vi.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Vi.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Vi.selectingOrDrawing=function(e){return Vi.freeMode(e)||Vi.rectMode(e)}});var Q0=Z((kse,lT)=>{"use strict";lT.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var $0=Z((Cse,oT)=>{"use strict";oT.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 eh=Z((Sse,sT)=>{"use strict";var j0=32;sT.exports={CIRCLE_SIDES:j0,i000:0,i090:j0/4,i180:j0/2,i270:j0/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var rh=Z((Lse,fT)=>{"use strict";var MW=He().strTranslate;function uT(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function AW(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function kW(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return uT(e,t[r])}}function CW(e){return MW(e.xaxis._offset,e.yaxis._offset)}fT.exports={p2r:uT,r2p:AW,axValue:kW,getTransform:CW}});var Tl=Z(Wi=>{"use strict";var SW=fm(),hT=eh(),Ws=hT.CIRCLE_SIDES,Ty=hT.SQRT2,dT=rh(),cT=dT.p2r,vT=dT.r2p,LW=[0,3,4,5,6,1,2],qW=[0,3,4,1,2];Wi.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var bT=Vs(),DW=bT.drawMode,EW=bT.openMode,Zs=eh(),pT=Zs.i000,mT=Zs.i090,yT=Zs.i180,gT=Zs.i270,PW=Zs.cos45,RW=Zs.sin45,xT=rh(),ah=xT.p2r,Ml=xT.r2p,zW=pl(),NW=zW.clearOutline,nh=Tl(),FW=nh.readPaths,IW=nh.writePaths,HW=nh.ellipseOver,OW=nh.fixDatesForPaths;function BW(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,l=(a.layout||{}).shapes||[];if(!DW(i)&&n!==void 0){var o=a._fullLayout._activeShapeIndex;if(o{"use strict";var YW=Vs(),UW=YW.selectMode,GW=pl(),VW=GW.clearOutline,My=Tl(),WW=My.readPaths,ZW=My.writePaths,XW=My.fixDatesForPaths;TT.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,l=i._fullLayout.newselection,o=t.plotinfo,s=o.xaxis,u=o.yaxis,f=t.isActiveSelection,v=t.dragmode,h=(i.layout||{}).selections||[];if(!UW(v)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";MT.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 Al=Z(ia=>{"use strict";var Co=_f(),AT=He(),lh=dt();ia.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ia.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ia.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ia.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ia.extractPathCoords=function(e,r,t){var a=[],n=e.match(Co.segmentRE);return n.forEach(function(i){var l=r[i.charAt(0)].drawn;if(l!==void 0){var o=i.substr(1).match(Co.paramRE);if(!(!o||o.lengthd&&(g="X"),g});return u>d&&(m=m.replace(/[\s,]*X.*/,""),AT.log("Ignoring extra params in segment "+s)),f+m})}function wf(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var Cy=Z((zse,LT)=>{"use strict";var KW=He(),Xs=dt(),kT=xa(),CT=tt(),QW=Tl().readPaths,ky=Al(),$W=ky.getPathString,ST=kv(),jW=Da().FROM_TL;LT.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var l={};if(a.type!=="path"){var o=Xs.getFromId(r,a.xref),s=Xs.getFromId(r,a.yref);for(var u in ST){var f=ST[u](a,o,s);f!==void 0&&(l[u]=f)}}i=KW.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,l)}else i=a.label.text;var v={"data-index":t},h=a.label.font,d={"data-notex":1},m=n.append("g").attr(v).classed("shape-label",!0),g=m.append("text").attr(d).classed("shape-label-text",!0).text(i),y,w,_,T;if(a.path){var b=$W(r,a),M=QW(b,r);y=1/0,_=1/0,w=-1/0,T=-1/0;for(var S=0;S=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function rZ(e,r,t,a,n,i,l){var o=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,v=Math.PI/180*i,h=Math.sin(v),d=Math.cos(v),m=n.label.xanchor,g=n.label.yanchor,y,w,_,T;if(f==="line"){o==="start"?(y=e,w=r):o==="end"?(y=t,w=a):(y=(e+t)/2,w=(r+a)/2),m==="auto"&&(o==="start"?s==="auto"?t>e?m="left":te?m="right":te?m="right":te?m="left":t{"use strict";var tZ=He(),aZ=tZ.strTranslate,qT=Qn(),PT=Vs(),nZ=PT.drawMode,RT=PT.selectMode,zT=gr(),DT=Er(),sh=eh(),iZ=sh.i000,lZ=sh.i090,oZ=sh.i180,sZ=sh.i270,uZ=pl(),NT=uZ.clearOutlineControllers,Ly=Tl(),oh=Ly.pointsOnRectangle,Sy=Ly.pointsOnEllipse,fZ=Ly.writePaths,cZ=ih().newShapes,vZ=ih().createShapeObj,hZ=Ay(),dZ=Cy();FT.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function l(){e(r,t,a,n++),(Sy(r[0])||a.hasText)&&o({redrawing:!0})}function o(B){var I={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,I=cZ(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,I=hZ(t,a),i._fullLayout._reselect=!0),Object.keys(I).length&&zT.call((B||{}).redrawing?"relayout":"_guiRelayout",i,I)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,v=nZ(f),h=RT(f);(v||h)&&(i._fullLayout._outlining=!0),NT(i),t.attr("d",fZ(r));var d,m,g,y,w;if(!n&&(a.isActiveShape||a.isActiveSelection)){w=pZ([],r);var _=u.append("g").attr("class","outline-controllers");R(_),J()}if(v&&a.hasText){var T=u.select(".label-temp"),b=vZ(t,a,a.dragmode);dZ(i,"label-temp",b,T)}function M(B){g=+B.srcElement.getAttribute("data-i"),y=+B.srcElement.getAttribute("data-j"),d[g][y].moveFn=S}function S(B,I){if(r.length){var W=w[g][y][1],K=w[g][y][2],Q=r[g],ie=Q.length;if(oh(Q)){var me=B,pe=I;if(a.isActiveSelection){var ge=ET(Q,y);ge[1]===Q[y][1]?pe=0:me=0}for(var j=0;j1&&!(B.length===2&&B[1][0]==="Z")&&(y===0&&(B[0][0]="M"),r[g]=B,l(),o())}}function D(B,I){if(B===2){g=+I.srcElement.getAttribute("data-i"),y=+I.srcElement.getAttribute("data-j");var W=r[g];!oh(W)&&!Sy(W)&&q()}}function R(B){d=[];for(var I=0;I{"use strict";var yZ=Ir(),UT=gr(),IT=He(),Js=dt(),gZ=Tl().readPaths,bZ=uh(),ch=Cy(),GT=pl().clearOutlineControllers,qy=Er(),Ey=tt(),xZ=ct().arrayEditor,HT=Qn(),OT=wl(),So=_f(),$a=Al(),Dy=$a.getPathString;ZT.exports={draw:Py,drawOne:VT,eraseActiveShape:TZ,drawLabel:ch};function Py(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;nl&&Be>o&&!Re.shiftKey?HT.getCursor(Ne/Ie,1-Ee/Be):"move";OT(r,Je),_e=Je.split("-")[0]}}function Ae(Re){fh(e)||(s&&(w=Q(t.xanchor)),u&&(_=ie(t.yanchor)),t.type==="path"?z=t.path:(d=s?t.x0:Q(t.x0),m=u?t.y0:ie(t.y0),g=s?t.x1:Q(t.x1),y=u?t.y1:ie(t.y1)),dy?(T=m,C="y0",b=y,q="y1"):(T=y,C="y1",b=m,q="y0"),ve(Re),be(n,t),Fe(r,t,e),j.moveFn=_e==="move"?U:de,j.altKey=Re.altKey)}function Y(){fh(e)||(OT(r),ye(n),WT(r,e,t),UT.call("_guiRelayout",e,i.getUpdateObj()))}function re(){fh(e)||ye(n)}function U(Re,Pe){if(t.type==="path"){var Ie=function(Ee){return Ee},Be=Ie,Ne=Ie;s?h("xanchor",t.xanchor=me(w+Re)):(Be=function(Je){return me(Q(Je)+Re)},H&&H.type==="date"&&(Be=$a.encodeDate(Be))),u?h("yanchor",t.yanchor=pe(_+Pe)):(Ne=function(Je){return pe(ie(Je)+Pe)},X&&X.type==="date"&&(Ne=$a.encodeDate(Ne))),h("path",t.path=BT(z,Be,Ne))}else s?h("xanchor",t.xanchor=me(w+Re)):(h("x0",t.x0=me(d+Re)),h("x1",t.x1=me(g+Re))),u?h("yanchor",t.yanchor=pe(_+Pe)):(h("y0",t.y0=pe(m+Pe)),h("y1",t.y1=pe(y+Pe)));r.attr("d",Dy(e,t)),be(n,t),ch(e,a,t,F)}function de(Re,Pe){if(v){var Ie=function(Oe){return Oe},Be=Ie,Ne=Ie;s?h("xanchor",t.xanchor=me(w+Re)):(Be=function(Ke){return me(Q(Ke)+Re)},H&&H.type==="date"&&(Be=$a.encodeDate(Be))),u?h("yanchor",t.yanchor=pe(_+Pe)):(Ne=function(Ke){return pe(ie(Ke)+Pe)},X&&X.type==="date"&&(Ne=$a.encodeDate(Ne))),h("path",t.path=BT(z,Be,Ne))}else if(f){if(_e==="resize-over-start-point"){var Ee=d+Re,Je=u?m-Pe:m+Pe;h("x0",t.x0=s?Ee:me(Ee)),h("y0",t.y0=u?Je:pe(Je))}else if(_e==="resize-over-end-point"){var We=g+Re,ne=u?y-Pe:y+Pe;h("x1",t.x1=s?We:me(We)),h("y1",t.y1=u?ne:pe(ne))}}else{var Me=function(Oe){return _e.indexOf(Oe)!==-1},Ce=Me("n"),cr=Me("s"),tr=Me("w"),De=Me("e"),Le=Ce?T+Pe:T,Ye=cr?b+Pe:b,Ze=tr?M+Re:M,Ue=De?S+Re:S;u&&(Ce&&(Le=T-Pe),cr&&(Ye=b-Pe)),(!u&&Ye-Le>o||u&&Le-Ye>o)&&(h(C,t[C]=u?Le:pe(Le)),h(q,t[q]=u?Ye:pe(Ye))),Ue-Ze>l&&(h(D,t[D]=s?Ze:me(Ze)),h(R,t[R]=s?Ue:me(Ue)))}r.attr("d",Dy(e,t)),be(n,t),ch(e,a,t,F)}function be(Re,Pe){(s||u)&&Ie();function Ie(){var Be=Pe.type!=="path",Ne=Re.selectAll(".visual-cue").data([0]),Ee=1;Ne.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ee}).classed("visual-cue",!0);var Je=Q(s?Pe.xanchor:IT.midRange(Be?[Pe.x0,Pe.x1]:$a.extractPathCoords(Pe.path,So.paramIsX))),We=ie(u?Pe.yanchor:IT.midRange(Be?[Pe.y0,Pe.y1]:$a.extractPathCoords(Pe.path,So.paramIsY)));if(Je=$a.roundPositionForSharpStrokeRendering(Je,Ee),We=$a.roundPositionForSharpStrokeRendering(We,Ee),s&&u){var ne="M"+(Je-1-Ee)+","+(We-1-Ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ne.attr("d",ne)}else if(s){var Me="M"+(Je-1-Ee)+","+(We-9-Ee)+"v18 h2 v-18 Z";Ne.attr("d",Me)}else{var Ce="M"+(Je-9-Ee)+","+(We-1-Ee)+"h18 v2 h-18 Z";Ne.attr("d",Ce)}}}function ye(Re){Re.selectAll(".visual-cue").remove()}function Fe(Re,Pe,Ie){var Be=Pe.xref,Ne=Pe.yref,Ee=Js.getFromId(Ie,Be),Je=Js.getFromId(Ie,Ne),We="";Be!=="paper"&&!Ee.autorange&&(We+=Be),Ne!=="paper"&&!Je.autorange&&(We+=Ne),Ey.setClipUrl(Re,We?"clip"+Ie._fullLayout._uid+We:null,Ie)}}function BT(e,r,t){return e.replace(So.segmentRE,function(a){var n=0,i=a.charAt(0),l=So.paramIsX[i],o=So.paramIsY[i],s=So.numParams[i],u=a.substr(1).replace(So.paramRE,function(f){return n>=s||(l[n]?f=r(f):o[n]&&(f=t(f)),n++),f});return i+u})}function wZ(e,r){if(vh(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){YT(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=YT,Py(e)}}}function YT(e){if(vh(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(GT(e),delete e._fullLayout._activeShapeIndex,Py(e))}}function TZ(e){if(vh(e)){GT(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Cn=gr(),XT=Pt(),JT=Xt(),Br=$0(),MZ=hh().eraseActiveShape,dh=He(),Nr=dh._,Yr=tM.exports={};Yr.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Nr(e,"Download plot as a png"):Nr(e,"Download plot")},icon:Br.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};dh.notifier(Nr(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),Cn.call("downloadImage",e,t).then(function(a){dh.notifier(Nr(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){dh.notifier(Nr(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Yr.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Nr(e,"Edit in Chart Studio")},icon:Br.disk,click:function(e){XT.sendDataToCloud(e)}};Yr.editInChartStudio={name:"editInChartStudio",title:function(e){return Nr(e,"Edit in Chart Studio")},icon:Br.pencil,click:function(e){XT.sendDataToCloud(e)}};Yr.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Nr(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Br.zoombox,click:Ra};Yr.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Nr(e,"Pan")},attr:"dragmode",val:"pan",icon:Br.pan,click:Ra};Yr.select2d={name:"select2d",_cat:"select",title:function(e){return Nr(e,"Box Select")},attr:"dragmode",val:"select",icon:Br.selectbox,click:Ra};Yr.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Nr(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Br.lasso,click:Ra};Yr.drawclosedpath={name:"drawclosedpath",title:function(e){return Nr(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Br.drawclosedpath,click:Ra};Yr.drawopenpath={name:"drawopenpath",title:function(e){return Nr(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Br.drawopenpath,click:Ra};Yr.drawline={name:"drawline",title:function(e){return Nr(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Br.drawline,click:Ra};Yr.drawrect={name:"drawrect",title:function(e){return Nr(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Br.drawrect,click:Ra};Yr.drawcircle={name:"drawcircle",title:function(e){return Nr(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Br.drawcircle,click:Ra};Yr.eraseshape={name:"eraseshape",title:function(e){return Nr(e,"Erase active shape")},icon:Br.eraseshape,click:MZ};Yr.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Nr(e,"Zoom in")},attr:"zoom",val:"in",icon:Br.zoom_plus,click:Ra};Yr.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Nr(e,"Zoom out")},attr:"zoom",val:"out",icon:Br.zoom_minus,click:Ra};Yr.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Nr(e,"Autoscale")},attr:"zoom",val:"auto",icon:Br.autoscale,click:Ra};Yr.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Nr(e,"Reset axes")},attr:"zoom",val:"reset",icon:Br.home,click:Ra};Yr.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Nr(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Br.tooltip_basic,gravity:"ne",click:Ra};Yr.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Nr(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Br.tooltip_compare,gravity:"ne",click:Ra};function Ra(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,l={},o=JT.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var v=n==="in"?.5:2,h=(1+v)/2,d=(1-v)/2,m;for(f=0;f{"use strict";var aM=Ny(),CZ=Object.keys(aM),nM=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],iM=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(nM),Qs=[],SZ=function(e){if(iM.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();Qs.indexOf(r)===-1&&Qs.push(r),Qs.indexOf(t)===-1&&Qs.push(t)}};CZ.forEach(function(e){SZ(aM[e])});Qs.sort();lM.exports={DRAW_MODES:nM,backButtons:iM,foreButtons:Qs}});var Iy=Z((Bse,oM)=>{"use strict";var Ose=Fy();oM.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 uM=Z((Yse,sM)=>{"use strict";var LZ=He(),Tf=Er(),qZ=ct(),DZ=Iy();sM.exports=function(r,t){var a=r.modebar||{},n=qZ.newContainer(t,"modebar");function i(o,s){return LZ.coerce(a,n,DZ,o,s)}i("orientation"),i("bgcolor",Tf.addOpacity(t.paper_bgcolor,.5));var l=Tf.contrast(Tf.rgb(t.modebar.bgcolor));i("color",Tf.addOpacity(l,.3)),i("activecolor",Tf.addOpacity(l,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var hM=Z((Use,vM)=>{"use strict";var Hy=Ir(),EZ=Hr(),mh=He(),fM=$0(),PZ=tv().version,RZ=new DOMParser;function cM(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Ci=cM.prototype;Ci.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,l="#"+n+" .modebar-group";document.querySelectorAll(l).forEach(function(v){v.style.backgroundColor=i.bgcolor}),mh.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var o=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(o||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Ci.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var l=r.createButton(n);r.buttonElements.push(l),a.appendChild(l)}),r.element.appendChild(a)})};Ci.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};Ci.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(o){e.click(r.graphInfo,o),r.updateActiveButton(o.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&Hy.select(t).classed("active",!0);var l=e.icon;return typeof l=="function"?t.appendChild(l()):t.appendChild(this.createIcon(l||fM.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};Ci.createIcon=function(e){var r=EZ(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=RZ.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Ci.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),l=a.getAttribute("data-toggle")==="true",o=Hy.select(a),s=function(v,h){var d=r.modebar,m=v.querySelector(".icon path");m&&(h||v.matches(":hover")?m.style.fill=d.activecolor:m.style.fill=d.color)};if(l){if(i===t){var u=!o.classed("active");o.classed("active",u),s(a,u)}}else{var f=i===null?i:mh.nestedProperty(r,i).get();o.classed("active",f===n),s(a,f===n)}})};Ci.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var FZ=Xt(),dM=on(),Oy=gr(),IZ=bi().isUnifiedHover,HZ=hM(),yh=Ny(),OZ=Fy().DRAW_MODES,BZ=He().extendDeep;pM.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,l;Array.isArray(i)&&i.length?l=ZZ(i):!a.displayModeBar&&a.watermark?l=[]:l=YZ(r),n?n.update(r,l):t._modeBar=HZ(r,l)};function YZ(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(I,W){if(typeof W=="string"){if(W.toLowerCase()===I.toLowerCase())return!0}else{var K=W.name,Q=W._cat||W.name;if(K===I||Q===I.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var l=r.modebar.remove;typeof l=="string"&&(l=[l]);var o=a.modeBarButtonsToAdd.concat(i.filter(function(I){for(var W=0;W1?(R=["toggleHover"],z=["resetViews"]):v?(D=["zoomInGeo","zoomOutGeo"],R=["hoverClosestGeo"],z=["resetGeo"]):f?(R=["hoverClosest3d"],z=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(D=["zoomInMapbox","zoomOutMapbox"],R=["toggleHover"],z=["resetViewMapbox"]):y?(D=["zoomInMap","zoomOutMap"],R=["toggleHover"],z=["resetViewMap"]):h?R=["hoverClosestPie"]:T?(R=["hoverClosestCartesian","hoverCompareCartesian"],z=["resetViewSankey"]):R=["toggleHover"],u&&R.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(VZ(t)||M)&&(R=[]),u&&!b&&(D=["zoomIn2d","zoomOut2d","autoScale2d"],z[0]!=="resetViews"&&(z=["resetScale2d"])),f?F=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||m?F=["zoom2d","pan2d"]:g||y||v?F=["pan2d"]:w&&(F=["zoom2d"]),GZ(t)&&F.push("select2d","lasso2d");var H=[],O=function(I){H.indexOf(I)===-1&&R.indexOf(I)!==-1&&H.push(I)};if(Array.isArray(o)){for(var X=[],J=0;J{"use strict";yM.exports={moduleType:"component",name:"modebar",layoutAttributes:Iy(),supplyLayoutDefaults:uM(),manage:mM()}});var Yy=Z((Wse,gM)=>{"use strict";var XZ=Da().FROM_BL;gM.exports=function(r,t,a){a===void 0&&(a=XZ[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var Af=Z(Mf=>{"use strict";var Lo=He(),Uy=ff(),jn=Xt().id2name,JZ=Xn(),bM=Yy(),KZ=b0(),QZ=Bt().ALMOST_EQUAL,$Z=Da().FROM_BL;Mf.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],l=r._axisMatchGroups=[],o,s,u,f,v,h,d,m;for(o=0;oi?t.substr(i):a.substr(n))+l}function eX(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),l=0;lQZ*m&&!_)){for(i=0;iF&&KR&&(R=K);var ie=(R-D)/(2*z);v/=ie,D=s.l2r(D),R=s.l2r(R),s.range=s._input.range=S{"use strict";var bh=Ir(),za=gr(),cn=Pt(),Sn=He(),Wy=xa(),Zy=Q0(),kf=Er(),$s=tt(),TM=sf(),SM=By(),Cf=dt(),Zi=Da(),LM=Af(),rX=LM.enforce,tX=LM.clean,MM=ff().doAutoRange,qM="start",aX="middle",DM="end",nX=da().zindexSeparator;Qt.layoutStyles=function(e){return Sn.syncOrAsync([cn.doAutoMargin,lX],e)};function iX(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function lX(e){var r=e._fullLayout,t=r._size,a=t.p,n=Cf.list(e,"",!0),i,l,o,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call($s.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),Qt.drawMainTitle(e),SM.manage(e),!r._has("cartesian"))return cn.previousPromises(e);function v(Ae,Y,re){var U=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Y){if(re==="top")return Y._offset-a-U}else return t.t+t.h*(1-(Ae.position||0))+U%1;return Y._offset+Y._length+a+U}if(Y){if(re==="right")return Y._offset+Y._length+a+U}else return t.l+t.w*(Ae.position||0)+U%1;return Y._offset-a-U}for(i=0;i0){fX(e,i,u,s),o.attr({x:l,y:i,"text-anchor":a,dy:CM(r.yanchor)}).call(Wy.positionText,l,i);var f=(r.text.match(Wy.BR_TAG_ALL)||[]).length;if(f){var v=Zi.LINE_SPACING*f+Zi.MID_SHIFT;r.y===0&&(v=-v),o.selectAll(".line").each(function(){var y=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",y)})}var h=bh.selectAll(".gtitle-subtitle");if(h.node()){var d=o.node().getBBox(),m=d.y+d.height,g=m+TM.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:l,y:g,"text-anchor":a,dy:CM(r.yanchor)}).call(Wy.positionText,l,g)}}}};function oX(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,l=Sn.isTopAnchor(r)?a:a-n,o=t==="b"?i-l:l;return Sn.isTopAnchor(r)&&t==="t"||Sn.isBottomAnchor(r)&&t==="b"?!1:o.5?"t":"b",l=e._fullLayout.margin[i],o=0;return r.yref==="paper"?o=t+r.pad.t+r.pad.b:r.yref==="container"&&(o=sX(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),o>l?o:0}function fX(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,l=i.y>.5?"t":"b",o={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&oX(e,i,l,r,a)?o[l]=t:i.yref==="container"&&(s[l]=t,e._fullLayout._reservedMargin[n]=s),cn.allowAutoMargin(e,n),cn.autoMargin(e,n,o)}function cX(e,r){var t=e.title,a=e._size,n=0;switch(r===qM?n=t.pad.l:r===DM&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function vX(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===Zi.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function CM(e){return e==="top"?Zi.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Zi.MID_SHIFT+"em"}function hX(e){var r=e.title,t=aX;return Sn.isRightAnchor(r)?t=DM:Sn.isLeftAnchor(r)&&(t=qM),t}function dX(e){var r=e.title,t="0em";return Sn.isTopAnchor(r)?t=Zi.CAP_SHIFT+"em":Sn.isMiddleAnchor(r)&&(t=Zi.MID_SHIFT+"em"),t}Qt.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var pX=Tl().readPaths,mX=uh(),EM=pl().clearOutlineControllers,Xy=Er(),PM=tt(),yX=ct().arrayEditor,RM=Al(),gX=RM.getPathString;NM.exports={draw:_h,drawOne:zM,activateLastSelection:_X};function _h(e){var r=e._fullLayout;EM(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;y--){var w=l.append("path").attr(s).style("opacity",y?.1:u).call(Xy.stroke,v).call(Xy.fill,f).call(PM.dashLine,y?"solid":d,y?4+h:h);if(bX(w,e,a),m){var _=yX(e.layout,"selections",a);w.style({cursor:"move"});var T={element:w.node(),plotinfo:n,gd:e,editHelpers:_,isActiveSelection:!0},b=pX(o,e);mX(b,w,T)}else w.style("pointer-events",y?"all":"none");g[y]=w}var M=g[0],S=g[1];S.node().addEventListener("click",function(){return xX(e,M)})}}function bX(e,r,t){var a=t.xref+t.yref;PM.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function xX(e,r){if(wh(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){Jy(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=Jy,_h(e)}}}function _X(e){if(wh(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=Jy,_h(e)}}function Jy(e){if(wh(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(EM(e),delete e._fullLayout._activeSelectionIndex,_h(e))}}});var IM=Z((Kse,FM)=>{function wX(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,l){return a("temp_status",{seg:n,above:i,below:l})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,l){return a("status",{seg:n,above:i,below:l})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}FM.exports=wX});var OM=Z((Qse,HM)=>{function TX(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],l=a[1],o=n[0],s=n[1],u=t[0],f=t[1];return(o-i)*(f-l)-(s-l)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],l=n[0]-a[0],o=t[0]-a[0],s=n[1]-a[1],u=o*l+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=o-i>e&&(l-f)*(i-v)/(o-v)+f-n>e&&(s=!s),l=f,o=v}return s}};return r}HM.exports=TX});var YM=Z(($se,BM)=>{var MX={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};BM.exports=MX});var GM=Z((jse,UM)=>{var Sf=YM();function AX(e,r,t){function a(m,g){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:null,below:null},otherFill:null}}function n(m,g,y){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:y.myFill.above,below:y.myFill.below},otherFill:null}}var i=Sf.create();function l(m,g,y,w,_,T){var b=r.pointsCompare(g,_);return b!==0?b:r.pointsSame(y,T)?0:m!==w?m?1:-1:r.pointAboveOrOnLine(y,w?_:T,w?T:_)?1:-1}function o(m,g){i.insertBefore(m,function(y){var w=l(m.isStart,m.pt,g,y.isStart,y.pt,y.other.pt);return w<0})}function s(m,g){var y=Sf.node({isStart:!0,pt:m.start,seg:m,primary:g,other:null,status:null});return o(y,m.end),y}function u(m,g,y){var w=Sf.node({isStart:!1,pt:g.end,seg:g,primary:y,other:m,status:null});m.other=w,o(w,m.pt)}function f(m,g){var y=s(m,g);return u(y,m,g),y}function v(m,g){t&&t.segmentChop(m.seg,g),m.other.remove(),m.seg.end=g,m.other.pt=g,o(m.other,m.pt)}function h(m,g){var y=n(g,m.seg.end,m.seg);return v(m,g),f(y,m.primary)}function d(m,g){var y=Sf.create();function w(X,J){var B=X.seg.start,I=X.seg.end,W=J.seg.start,K=J.seg.end;return r.pointsCollinear(B,W,K)?r.pointsCollinear(I,W,K)||r.pointAboveOrOnLine(I,W,K)?1:-1:r.pointAboveOrOnLine(B,W,K)?1:-1}function _(X){return y.findTransition(function(J){var B=w(X,J.ev);return B>0})}function T(X,J){var B=X.seg,I=J.seg,W=B.start,K=B.end,Q=I.start,ie=I.end;t&&t.checkIntersection(B,I);var me=r.linesIntersect(W,K,Q,ie);if(me===!1){if(!r.pointsCollinear(W,K,Q)||r.pointsSame(W,ie)||r.pointsSame(K,Q))return!1;var pe=r.pointsSame(W,Q),ge=r.pointsSame(K,ie);if(pe&&ge)return J;var j=!pe&&r.pointBetween(W,Q,ie),_e=!ge&&r.pointBetween(K,Q,ie);if(pe)return _e?h(J,K):h(X,ie),J;j&&(ge||(_e?h(J,K):h(X,ie)),h(J,W))}else me.alongA===0&&(me.alongB===-1?h(X,Q):me.alongB===0?h(X,me.pt):me.alongB===1&&h(X,ie)),me.alongB===0&&(me.alongA===-1?h(J,W):me.alongA===0?h(J,me.pt):me.alongA===1&&h(J,K));return!1}for(var b=[];!i.isEmpty();){var M=i.getHead();if(t&&t.vert(M.pt[0]),M.isStart){let X=function(){if(C){var J=T(M,C);if(J)return J}return q?T(M,q):!1};var O=X;t&&t.segmentNew(M.seg,M.primary);var S=_(M),C=S.before?S.before.ev:null,q=S.after?S.after.ev:null;t&&t.tempStatus(M.seg,C?C.seg:!1,q?q.seg:!1);var D=X();if(D){if(e){var R;M.seg.myFill.below===null?R=!0:R=M.seg.myFill.above!==M.seg.myFill.below,R&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=M.seg.myFill;t&&t.segmentUpdate(D.seg),M.other.remove(),M.remove()}if(i.getHead()!==M){t&&t.rewind(M.seg);continue}if(e){var R;M.seg.myFill.below===null?R=!0:R=M.seg.myFill.above!==M.seg.myFill.below,q?M.seg.myFill.below=q.seg.myFill.above:M.seg.myFill.below=m,R?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var z;q?M.primary===q.primary?z=q.seg.otherFill.above:z=q.seg.myFill.above:z=M.primary?g:m,M.seg.otherFill={above:z,below:z}}t&&t.status(M.seg,C?C.seg:!1,q?q.seg:!1),M.other.status=S.insert(Sf.node({ev:M}))}else{var F=M.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(y.exists(F.prev)&&y.exists(F.next)&&T(F.prev.ev,F.next.ev),t&&t.statusRemove(F.ev.seg),F.remove(),!M.primary){var H=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=H}b.push(M.seg)}i.getHead().remove()}return t&&t.done(),b}return e?{addRegion:function(m){for(var g,y=m[m.length-1],w=0;w{function kX(e,r,t){var a=[],n=[];return e.forEach(function(i){var l=i.start,o=i.end;if(r.pointsSame(l,o)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function v(O,X,J){return f.index=O,f.matches_head=X,f.matches_pt1=J,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function Lf(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var CX={union:function(e,r){return Lf(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return Lf(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return Lf(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return Lf(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return Lf(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};ZM.exports=CX});var KM=Z((tue,JM)=>{var SX={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function l(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var o=l(i[0]),s=1;s{var LX=IM(),qX=OM(),QM=GM(),DX=WM(),qf=XM(),$M=KM(),Ln=!1,Df=qX(),ja;ja={buildLog:function(e){return e===!0?Ln=LX():e===!1&&(Ln=!1),Ln===!1?!1:Ln.list},epsilon:function(e){return Df.epsilon(e)},segments:function(e){var r=QM(!0,Df,Ln);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=QM(!1,Df,Ln);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:qf.union(e.combined,Ln),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:qf.intersect(e.combined,Ln),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:qf.difference(e.combined,Ln),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:qf.differenceRev(e.combined,Ln),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:qf.xor(e.combined,Ln),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:DX(e.segments,Df,Ln),inverted:e.inverted}},polygonFromGeoJSON:function(e){return $M.toPolygon(ja,e)},polygonToGeoJSON:function(e){return $M.fromPolygon(ja,Df,e)},union:function(e,r){return Ef(e,r,ja.selectUnion)},intersect:function(e,r){return Ef(e,r,ja.selectIntersect)},difference:function(e,r){return Ef(e,r,ja.selectDifference)},differenceRev:function(e,r){return Ef(e,r,ja.selectDifferenceRev)},xor:function(e,r){return Ef(e,r,ja.selectXor)}};function Ef(e,r,t){var a=ja.segments(e),n=ja.segments(r),i=ja.combine(a,n),l=t(i);return ja.polygon(l)}typeof window=="object"&&(window.PolyBool=ja);jM.exports=ja});var tA=Z((nue,rA)=>{rA.exports=function(r,t,a,n){var i=r[0],l=r[1],o=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;ul!=m>l&&i<(d-v)*(l-h)/(m-h)+v;g&&(o=!o)}return o}});var $y=Z((iue,aA)=>{"use strict";var Qy=wv().dot,Th=Bt().BADNUM,Mh=aA.exports={};Mh.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],l=i,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;on||w===Th||wl||g&&u(m))}function v(m,g){var y=m[0],w=m[1];if(y===Th||yn||w===Th||wl)return!1;var _=t.length,T=t[0][0],b=t[0][1],M=0,S,C,q,D,R;for(S=1;S<_;S++)if(C=T,q=b,T=t[S][0],b=t[S][1],D=Math.min(C,T),!(yMath.max(C,T)||w>Math.max(q,b)))if(wo||Math.abs(Qy(v,u))>n)return!0;return!1};Mh.filter=function(r,t){var a=[r[0]],n=0,i=0;function l(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var v=f+1;v1){var o=r.pop();l(o)}return{addPt:l,raw:r,filtered:a}}});var iA=Z((lue,nA)=>{"use strict";nA.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var CA=Z((oue,kA)=>{"use strict";var lA=eA(),EX=tA(),zf=gr(),PX=tt().dashStyle,Pf=Er(),RX=ki(),zX=bi().makeEventData,Of=Vs(),NX=Of.freeMode,FX=Of.rectMode,Nf=Of.drawMode,tg=Of.openMode,ag=Of.selectMode,oA=Al(),sA=_f(),hA=uh(),dA=pl().clearOutline,pA=Tl(),jy=pA.handleEllipse,IX=pA.readPaths,HX=ih().newShapes,OX=Ay(),BX=Ky().activateLastSelection,kh=He(),YX=kh.sorterAsc,mA=$y(),Rf=zv(),qn=Xt().getFromId,UX=Q0(),GX=xh().redrawReglTraces,Ch=iA(),Si=Ch.MINSELECT,VX=mA.filter,ng=mA.tester,ig=rh(),uA=ig.p2r,WX=ig.axValue,ZX=ig.getTransform;function lg(e){return e.subplot!==void 0}function XX(e,r,t,a,n){var i=!lg(a),l=NX(n),o=FX(n),s=tg(n),u=Nf(n),f=ag(n),v=n==="drawline",h=n==="drawcircle",d=v||h,m=a.gd,g=m._fullLayout,y=f&&g.newselection.mode==="immediate"&&i,w=g._zoomlayer,_=a.element.getBoundingClientRect(),T=a.plotinfo,b=ZX(T),M=r-_.left,S=t-_.top;g._calcInverseTransform(m);var C=kh.apply3DTransform(g._invTransform)(M,S);M=C[0],S=C[1];var q=g._invScaleX,D=g._invScaleY,R=M,z=S,F="M"+M+","+S,H=a.xaxes[0],O=a.yaxes[0],X=H._length,J=O._length,B=e.altKey&&!(Nf(n)&&s),I,W,K,Q,ie,me,pe;gA(e,m,a),l&&(I=VX([[M,S]],Ch.BENDPX));var ge=w.selectAll("path.select-outline-"+T.id).data([1]),j=u?g.newshape:g.newselection;u&&(a.hasText=j.label.text||j.label.texttemplate);var _e=u&&!s?j.fillcolor:"rgba(0,0,0,0)",se=j.line.color||(i?Pf.contrast(m._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+T.id).style({opacity:u?j.opacity/2:1,"stroke-dasharray":PX(j.line.dash,j.line.width),"stroke-width":j.line.width+"px","shape-rendering":"crispEdges"}).call(Pf.stroke,se).call(Pf.fill,_e).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",b).attr("d",F+"Z");var Se=w.append("path").attr("class","zoombox-corners").style({fill:Pf.background,stroke:Pf.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(u&&a.hasText){var ve=w.select(".label-temp");ve.empty()&&(ve=w.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ae=g._uid+Ch.SELECTID,Y=[],re=Sh(m,a.xaxes,a.yaxes,a.subplot);y&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var de=H._id,be=O._id;TA(m,de,be,re);for(var ye=(m.layout||{}).selections||[],Fe=[],Re=!1,Pe=0;Pe=0){m._fullLayout._deactivateShape(m);return}if(!u){var ye=g.clickmode;Rf.done(Ae).then(function(){if(Rf.clear(Ae),de===2){for(ge.remove(),ie=0;ie-1&&yA(be,m,a.xaxes,a.yaxes,a.subplot,a,ge),ye==="event"&&Hf(m,void 0);RX.click(m,be,T.id)}).catch(kh.error)}},a.doneFn=function(){Se.remove(),Rf.done(Ae).then(function(){Rf.clear(Ae),!y&&Q&&a.selectionDefs&&(Q.subtract=B,a.selectionDefs.push(Q),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,K)),(y||u)&&Ff(a,y),a.doneFnCompleted&&a.doneFnCompleted(Y),f&&Hf(m,pe)}).catch(kh.error)}}function yA(e,r,t,a,n,i,l){var o=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,v=[],h,d,m,g,y,w,_,T,b,M;if(jX(o)){gA(e,r,i),h=Sh(r,t,a,n);var S=eJ(o,h),C=S.pointNumbers.length>0;if(C?rJ(h,S):tJ(h)&&(_=cA(S))){for(l&&l.remove(),M=0;M=0}function $X(e){return e._fullLayout._activeSelectionIndex>=0}function Ff(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;QX(n)&&n._fullLayout._deactivateShape(n),$X(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,l=i._zoomlayer,o=Nf(t),s=ag(t);if(o||s){var u=l.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;o&&(f=HX(u,e)),f&&zf.call("_guiRelayout",n,{shapes:f});var v;s&&!lg(e)&&(v=OX(u,e)),v&&(n._fullLayout._noEmitSelectedAtStart=!0,zf.call("_guiRelayout",n,{selections:v}).then(function(){r&&BX(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function fA(e){return e._id}function Sh(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(fA),l=t.map(fA),o,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function rJ(e,r){var t=[],a,n,i,l;for(l=0;l0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(l=0;l1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function If(e,r,t){var a;for(a=0;a-1&&r;if(!l&&r){var de=vA(e,!0);if(de.length){var be=de[0].xref,ye=de[0].yref;if(be&&ye){var Fe=MA(de),Re=AA([qn(e,be,"x"),qn(e,ye,"y")]);Re(Y,Fe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:U&&Hf(e,Y),h._reselect=!1}if(!l&&h._deselect){var Pe=h._deselect;o=Pe.xref,s=Pe.yref,iJ(o,s,f)||TA(e,o,s,a),U&&(Y.points.length?Hf(e,Y):ug(e)),h._deselect=!1}return{eventData:Y,selectionTesters:t}}function nJ(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";SA.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 Bf=Z((uue,LA)=>{"use strict";LA.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var js=Z((cue,EA)=>{"use strict";var qA=fg(),DA=ha(),Lh=da(),fJ=ct().templatedArray,fue=Bf();EA.exports=fJ("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:DA({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:qA.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:qA.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",Lh.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Lh.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Lh.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",Lh.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:DA({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var qh=Z((vue,PA)=>{"use strict";PA.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var zA=Z((hue,RA)=>{"use strict";RA.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var qo=Z((due,BA)=>{"use strict";var NA=r0().axisHoverFormat,cJ=zi().texttemplateAttrs,vJ=zi().hovertemplateAttrs,FA=nf(),hJ=ha(),dJ=mi().dash,pJ=mi().pattern,mJ=tt(),yJ=qh(),Dh=Yt().extendFlat,gJ=zA();function IA(e){return{valType:"any",dflt:0,editType:"calc"}}function HA(e){return{valType:"any",editType:"calc"}}function OA(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}BA.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:IA("x"),yperiod:IA("y"),xperiod0:HA("x0"),yperiod0:HA("y0"),xperiodalignment:OA("x"),yperiodalignment:OA("y"),xhoverformat:NA("x"),yhoverformat:NA("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:cJ({},{}),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:vJ({},{keys:yJ.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Dh({},dJ,{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:gJ(!0),fillgradient:Dh({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:pJ,marker:Dh({symbol:{valType:"enumerated",values:mJ.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:Dh({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},FA("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"},FA("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:hJ({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var cg=Z((mue,GA)=>{"use strict";var YA=js(),UA=qo().line,bJ=mi().dash,Eh=Yt().extendFlat,xJ=pi().overrideAll,_J=ct().templatedArray,pue=Bf();GA.exports=xJ(_J("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:Eh({},YA.xref,{}),yref:Eh({},YA.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:UA.color,width:Eh({},UA.width,{min:1,dflt:1}),dash:Eh({},bJ,{dflt:"dot"})}}),"arraydraw","from-root")});var XA=Z((yue,ZA)=>{"use strict";var VA=He(),Ph=dt(),wJ=Jn(),TJ=cg(),WA=Al();ZA.exports=function(r,t){wJ(r,t,{name:"selections",handleItemDefaults:MJ});for(var a=t.selections,n=0;n{"use strict";JA.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var Yf=Z((bue,jA)=>{"use strict";var AJ=gr(),QA=He(),$A=Xt();jA.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var l=AJ.subplotsRegistry.cartesian,o=l.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,v=s.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var ek=Ky(),Uf=CA();rk.exports={moduleType:"component",name:"selections",layoutAttributes:cg(),supplyLayoutDefaults:XA(),supplyDrawNewSelectionDefaults:KA(),includeBasePlot:Yf()("selections"),draw:ek.draw,drawOne:ek.drawOne,reselect:Uf.reselect,prepSelect:Uf.prepSelect,clearOutline:Uf.clearOutline,clearSelectionsCache:Uf.clearSelectionsCache,selectOnClick:Uf.selectOnClick}});var wk=Z((_ue,_k)=>{"use strict";var mg=Ir(),Dn=He(),tk=Dn.numberFormat,kJ=bn(),CJ=Jm(),Rh=gr(),ck=Dn.strTranslate,SJ=xa(),ak=Er(),Cl=tt(),LJ=ki(),nk=dt(),qJ=wl(),DJ=Qn(),vk=Vs(),zh=vk.selectingOrDrawing,EJ=vk.freeMode,PJ=Da().FROM_TL,RJ=Q0(),zJ=xh().redrawReglTraces,NJ=Pt(),hg=Xt().getFromId,FJ=eu().prepSelect,IJ=eu().clearOutline,HJ=eu().selectOnClick,vg=Yy(),yg=da(),ik=yg.MINDRAG,Ya=yg.MINZOOM,lk=!0;function OJ(e,r,t,a,n,i,l,o){var s=e._fullLayout._zoomlayer,u=l+o==="nsew",f=(l+o).length===1,v,h,d,m,g,y,w,_,T,b,M,S,C,q,D,R,z,F,H,O,X,J,B;t+=r.yaxis._shift;function I(){if(v=r.xaxis,h=r.yaxis,T=v._length,b=h._length,w=v._offset,_=h._offset,d={},d[v._id]=v,m={},m[h._id]=h,l&&o)for(var De=r.overlays,Le=0;Le=0){Ye._fullLayout._deactivateShape(Ye);return}var Ze=Ye._fullLayout.clickmode;if(pg(Ye),De===2&&!f&&We(),u)Ze.indexOf("select")>-1&&HJ(Le,Ye,g,y,r.id,Q),Ze.indexOf("event")>-1&&LJ.click(Ye,Le,r.id);else if(De===1&&f){var Ue=l?h:v,Oe=l==="s"||o==="w"?0:1,Ke=Ue._name+".range["+Oe+"]",fr=BJ(Ue,Oe),lr="left",ze="middle";if(Ue.fixedrange)return;l?(ze=l==="n"?"top":"bottom",Ue.side==="right"&&(lr="right")):o==="e"&&(lr="right"),Ye._context.showAxisRangeEntryBoxes&&mg.select(K).call(SJ.makeEditable,{gd:Ye,immediate:!0,background:Ye._fullLayout.paper_bgcolor,text:String(fr),fill:Ue.tickfont?Ue.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:ze}).on("edit",function(ae){var oe=Ue.d2r(ae);oe!==void 0&&Rh.call("_guiRelayout",Ye,Ke,oe)})}}DJ.init(Q);var pe,ge,j,_e,se,Se,ve,Ae,Y,re;function U(De,Le,Ye){var Ze=K.getBoundingClientRect();pe=Le-Ze.left,ge=Ye-Ze.top,e._fullLayout._calcInverseTransform(e);var Ue=Dn.apply3DTransform(e._fullLayout._invTransform)(pe,ge);pe=Ue[0],ge=Ue[1],j={l:pe,r:pe,w:0,t:ge,b:ge,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:kJ(e._fullLayout.plot_bgcolor).getLuminance(),se="M0,0H"+T+"V"+b+"H0V0",Se=!1,ve="xy",re=!1,Ae=pk(s,_e,w,_,se),Y=mk(s,w,_)}function de(De,Le){if(e._transitioningWithDuration)return!1;var Ye=Math.max(0,Math.min(T,J*De+pe)),Ze=Math.max(0,Math.min(b,B*Le+ge)),Ue=Math.abs(Ye-pe),Oe=Math.abs(Ze-ge);j.l=Math.min(pe,Ye),j.r=Math.max(pe,Ye),j.t=Math.min(ge,Ze),j.b=Math.max(ge,Ze);function Ke(){ve="",j.r=j.l,j.t=j.b,Y.attr("d","M0,0Z")}if(M.isSubplotConstrained)Ue>Ya||Oe>Ya?(ve="xy",Ue/T>Oe/b?(Oe=Ue*b/T,ge>Ze?j.t=ge-Oe:j.b=ge+Oe):(Ue=Oe*T/b,pe>Ye?j.l=pe-Ue:j.r=pe+Ue),Y.attr("d",Nh(j))):Ke();else if(S.isSubplotConstrained)if(Ue>Ya||Oe>Ya){ve="xy";var fr=Math.min(j.l/T,(b-j.b)/b),lr=Math.max(j.r/T,(b-j.t)/b);j.l=fr*T,j.r=lr*T,j.b=(1-fr)*b,j.t=(1-lr)*b,Y.attr("d",Nh(j))}else Ke();else!q||Oe0){var ae;if(S.isSubplotConstrained||!C&&q.length===1){for(ae=0;ae1&&(Ke.maxallowed!==void 0&&R===(Ke.range[0]1&&(fr.maxallowed!==void 0&&z===(fr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function UJ(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function pk(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",ck(t,a)).attr("d",n+"Z")}function mk(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:ak.background,stroke:ak.defaultLine,"stroke-width":1,opacity:0}).attr("transform",ck(r,t)).attr("d","M0,0Z")}function yk(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),gk(e,r,n,i)}function gk(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function pg(e){mg.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function bk(e){lk&&e.data&&e._context.showTips&&(Dn.notifier(Dn._(e,"Double-click to zoom back out"),"long"),lk=!1)}function GJ(e,r){return"M"+(e.l-.5)+","+(r-Ya-.5)+"h-3v"+(2*Ya+1)+"h3ZM"+(e.r+.5)+","+(r-Ya-.5)+"h3v"+(2*Ya+1)+"h-3Z"}function VJ(e,r){return"M"+(r-Ya-.5)+","+(e.t-.5)+"v-3h"+(2*Ya+1)+"v3ZM"+(r-Ya-.5)+","+(e.b+.5)+"v3h"+(2*Ya+1)+"v-3Z"}function Nh(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Ya)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function uk(e,r,t,a,n){for(var i=!1,l={},o={},s,u,f,v,h=(n||{}).xaHash,d=(n||{}).yaHash,m=0;m{"use strict";var WJ=Ir(),Fh=ki(),ZJ=Qn(),XJ=wl(),ei=wk().makeDragBox,$t=da().DRAGGERSIZE;Ih.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){WJ.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,l){if((t._plots[i].mainplot&&!0)===(t._plots[l].mainplot&&!0)){var o=i.split("y"),s=l.split("y");return o[0]===s[0]?Number(o[1]||1)-Number(s[1]||1):Number(o[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var l=t._plots[i],o=l.xaxis,s=l.yaxis;if(!l.mainplot){var u=ei(r,l,o._offset,s._offset,o._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&Fh.hover(r,h,i)},Fh.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,ZJ.unhover(r,h))},r._context.showAxisDragHandles&&(ei(r,l,o._offset-$t,s._offset-$t,$t,$t,"n","w"),ei(r,l,o._offset+o._length,s._offset-$t,$t,$t,"n","e"),ei(r,l,o._offset-$t,s._offset+s._length,$t,$t,"s","w"),ei(r,l,o._offset+o._length,s._offset+s._length,$t,$t,"s","e"))}if(r._context.showAxisDragHandles){if(i===o._mainSubplot){var f=o._mainLinePosition;o.side==="top"&&(f-=$t),ei(r,l,o._offset+o._length*.1,f,o._length*.8,$t,"","ew"),ei(r,l,o._offset,f,o._length*.1,$t,"","w"),ei(r,l,o._offset+o._length*.9,f,o._length*.1,$t,"","e")}if(i===s._mainSubplot){var v=s._mainLinePosition;s.side!=="right"&&(v-=$t),ei(r,l,v,s._offset+s._length*.1,$t,s._length*.8,"ns",""),ei(r,l,v,s._offset+s._length*.9,$t,s._length*.1,"s",""),ei(r,l,v,s._offset,$t,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,Fh.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,Fh.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Ih.updateFx(r)}};Ih.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";XJ(r._draggers,t)}});var Ak=Z((Tue,Mk)=>{"use strict";var Tk=gr();Mk.exports=function(r){for(var t=Tk.layoutArrayContainers,a=Tk.layoutArrayRegexes,n=r.split("[")[0],i,l,o=0;o{"use strict";var JJ=nl(),bg=_v(),Gf=ro(),KJ=vp().sorterAsc,xg=gr();Vf.containerArrayMatch=Ak();var QJ=Vf.isAddVal=function(r){return r==="add"||JJ(r)},kk=Vf.isRemoveVal=function(r){return r===null||r==="remove"};Vf.applyContainerArrayChanges=function(r,t,a,n,i){var l=t.astr,o=xg.getComponentMethod(l,"supplyLayoutDefaults"),s=xg.getComponentMethod(l,"draw"),u=xg.getComponentMethod(l,"drawOne"),f=n.replot||n.recalc||o===bg||s===bg,v=r.layout,h=r._fullLayout;if(a[""]){Object.keys(a).length>1&&Gf.warn("Full array edits are incompatible with other edits",l);var d=a[""][""];if(kk(d))t.set(null);else if(Array.isArray(d))t.set(d);else return Gf.warn("Unrecognized full array edit value",l,d),!0;return f?!1:(o(v,h),s(r),!0)}var m=Object.keys(a).map(Number).sort(KJ),g=t.get(),y=g||[],w=i(h,l).get(),_=[],T=-1,b=y.length,M,S,C,q,D,R,z,F;for(M=0;My.length-(z?0:1)){Gf.warn("index out of range",l,C);continue}if(R!==void 0)D.length>1&&Gf.warn("Insertion & removal are incompatible with edits to the same index.",l,C),kk(R)?_.push(C):z?(R==="add"&&(R={}),y.splice(C,0,R),w&&w.splice(C,0,{})):Gf.warn("Unrecognized full object edit value",l,C,R),T===-1&&(T=C);else for(S=0;S=0;M--)y.splice(_[M],1),w&&w.splice(_[M],1);if(y.length?g||t.set(y):t.set(null),f)return!1;if(o(v,h),u!==bg){var H;if(T===-1)H=m;else{for(b=Math.max(y.length,b),H=[],M=0;M=T));M++)H.push(C);for(M=T;M{"use strict";var Dk=Hr(),Aue=tp(),Ek=gr(),en=He(),Wf=Pt(),Pk=Xt(),Rk=Er(),Zf=Pk.cleanId,$J=Pk.getFromTrace,_g=Ek.traceIs;ri.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&en.log("Clearing previous rejected promises from queue."),e._promises=[]};ri.cleanLayout=function(e){var r,t;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 a=(Wf.subplotsRegistry.cartesian||{}).attrRegex,n=(Wf.subplotsRegistry.polar||{}).attrRegex,i=(Wf.subplotsRegistry.ternary||{}).attrRegex,l=(Wf.subplotsRegistry.gl3d||{}).attrRegex,o=Object.keys(e);for(r=0;r3?(y.x=1.02,y.xanchor="left"):y.x<-2&&(y.x=-.02,y.xanchor="right"),y.y>3?(y.y=1.02,y.yanchor="bottom"):y.y<-2&&(y.y=-.02,y.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),Rk.clean(e),e.template&&e.template.layout&&ri.cleanLayout(e.template.layout),e};function ru(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=Zf(t,a,!0))}ri.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}ri.hasParent=function(e,r){for(var t=qk(r);t;){if(t in e)return!0;t=qk(t)}return!1};var rK=["x","y","z"];ri.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var Yh=Ir(),tK=Hr(),aK=kp(),$e=He(),lt=$e.nestedProperty,Mg=$u(),Ua=p6(),En=gr(),Jh=As(),xr=Pt(),Na=dt(),nK=Xm(),iK=Xn(),wg=tt(),lK=Er(),oK=gg().initInteractions,sK=fo(),uK=eu().clearOutline,Ok=eo().dfltConfig,Oh=Ck(),It=zk(),et=xh(),Sl=pi(),fK=da().AX_NAME_PATTERN,Tg=0,Nk=5;function cK(e,r,t,a){var n;if(e=$e.getGraphDiv(e),Mg.init(e),$e.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var l=Mg.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(l===!1)return Promise.reject();!r&&!t&&!$e.isPlotDiv(e)&&$e.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function o(){if(n)return Gr.addFrames(e,n)}Yk(e,a),t||(t={}),Yh.select(e).classed("js-plotly-plot",!0),wg.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(It.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=It.cleanLayout(t)),xr.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(PK(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),wg.initGradients(e),wg.initPatterns(e),s&&Na.saveShowSpikeInitial(e);var v=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;v&&xr.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function Uk(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),Gh(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&Gh(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function mK(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof q.parts[z]!="string";)z--;var F=q.parts[z],H=q.parts[z-1]+"."+F,O=q.parts.slice(0,z).join("."),X=lt(e.layout,O).get(),J=lt(a,O).get(),B=q.get();if(D!==void 0){w[C]=D,_[C]=F==="reverse"?D:Xi(B);var I=Jh.getLayoutValObject(a,q.parts);if(I&&I.impliedEdits&&D!==null)for(var W in I.impliedEdits)T($e.relativeAttr(C,W),I.impliedEdits[W]);if(["width","height"].indexOf(C)!==-1)if(D){T("autosize",null);var K=C==="height"?"width":"height";T(K,a[K])}else a[C]=e._initialAutoSize[C];else if(C==="autosize")T("width",D?null:a.width),T("height",D?null:a.height);else if(H.match($k))S(H),lt(a,O+"._inputRange").set(null);else if(H.match(jk)){S(H),lt(a,O+"._inputRange").set(null);var Q=lt(a,O).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else H.match(eC)&<(a,O+"._inputDomain").set(null);if(F==="type"){M=X;var ie=J.type==="linear"&&D==="log",me=J.type==="log"&&D==="linear";if(ie||me){if(!M||!M.range)T(O+".autorange",!0);else if(J.autorange)ie&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var pe=M.range[0],ge=M.range[1];ie?(pe<=0&&ge<=0&&T(O+".autorange",!0),pe<=0?pe=ge/1e6:ge<=0&&(ge=pe/1e6),T(O+".range[0]",Math.log(pe)/Math.LN10),T(O+".range[1]",Math.log(ge)/Math.LN10)):(T(O+".range[0]",Math.pow(10,pe)),T(O+".range[1]",Math.pow(10,ge)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[q.parts[0]]&&q.parts[1]==="radialaxis"&&delete a[q.parts[0]]._subplot.viewInitial["radialaxis.range"],En.getComponentMethod("annotations","convertCoords")(e,J,D,T),En.getComponentMethod("images","convertCoords")(e,J,D,T)}else T(O+".autorange",!0),T(O+".range",null);lt(a,O+"._inputRange").set(null)}else if(F.match(fK)){var j=lt(a,C).get(),_e=(D||{}).type;(!_e||_e==="-")&&(_e="linear"),En.getComponentMethod("annotations","convertCoords")(e,j,_e,T),En.getComponentMethod("images","convertCoords")(e,j,_e,T)}var se=Oh.containerArrayMatch(C);if(se){f=se.array,v=se.index;var Se=se.property,ve=I||{editType:"calc"};v!==""&&Se===""&&(Oh.isAddVal(D)?_[C]=null:Oh.isRemoveVal(D)?_[C]=(lt(t,f).get()||[])[v]:$e.warn("unrecognized full object value",r)),Sl.update(y,ve),u[f]||(u[f]={});var Ae=u[f][v];Ae||(Ae=u[f][v]={}),Ae[Se]=D,delete r[C]}else F==="reverse"?(X.range?X.range.reverse():(T(O+".autorange",!0),X.range=[1,0]),J.autorange?y.calc=!0:y.plot=!0):(C==="dragmode"&&(D===!1&&B!==!1||D!==!1&&B===!1)||a._has("scatter-like")&&a._has("regl")&&C==="dragmode"&&(D==="lasso"||D==="select")&&!(B==="lasso"||B==="select")?y.plot=!0:I?Sl.update(y,I):y.calc=!0,q.set(D))}}for(f in u){var Y=Oh.applyContainerArrayChanges(e,i(t,f),u[f],y,i);Y||(y.plot=!0)}for(var re in b){M=Na.getFromId(e,re);var U=M&&M._constraintGroup;if(U){y.calc=!0;for(var de in U)b[de]||(Na.getFromId(e,de)._constraintShrinkable=!0)}}(tC(e)||r.height||r.width)&&(y.plot=!0);var be=a.shapes;for(v=0;v1;)if(a.pop(),t=lt(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function wK(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var v=0;return function(){if(u&&++v===f)return u()}}return new Promise(function(u,f){function v(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var F=a._frameQueue.pop();F.onInterrupt&&F.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(F){if(F.length!==0){for(var H=0;Ha._timeToNext&&m()};F()}var y=0;function w(F){return Array.isArray(n)?y>=n.length?F.transitionOpts=n[y]:F.transitionOpts=n[0]:F.transitionOpts=n,y++,F}var _,T,b=[],M=r==null,S=Array.isArray(r),C=!M&&!S&&$e.isPlainObject(r);if(C)b.push({type:"object",data:w($e.extendFlat({},r))});else if(M||["string","number"].indexOf(typeof r)!==-1)for(_=0;_0&&RR)&&z.push(T);b=z}}b.length>0?h(b):(e.emit("plotly_animated"),u())})}function LK(e,r,t){if(e=$e.getGraphDiv(e),r==null)return Promise.resolve();if(!$e.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 a,n,i,l,o=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=o.length+r.length*2,f=[],v={};for(a=r.length-1;a>=0;a--)if($e.isPlainObject(r[a])){var h=r[a].name,d=(s[h]||v[h]||{}).name,m=r[a].name,g=s[d]||v[d];d&&m&&typeof m=="number"&&g&&Tgq.index?-1:C.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&$e.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),l.unshift({type:"insert",index:a,value:n[a]});var o=xr.modifyFrames,s=xr.modifyFrames,u=[e,l],f=[e,i];return Ua&&Ua.add(e,o,u,s,f),xr.modifyFrames(e,i)}function DK(e){e=$e.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return xr.cleanPlot([],{},t,r),xr.purge(e),Mg.purge(e),r._container&&r._container.remove(),delete e._context,e}function EK(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!$e.equalDomRects(t,r._lastBBox)){var a=r._invTransform=$e.inverseTransformMatrix($e.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function PK(e){var r=Yh.select(e),t=e._fullLayout;if(t._calcInverseTransform=EK,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};Yh.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=$e.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(sK.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Gr.animate=SK;Gr.addFrames=LK;Gr.deleteFrames=qK;Gr.addTraces=Xk;Gr.deleteTraces=Jk;Gr.extendTraces=Wk;Gr.moveTraces=Ag;Gr.prependTraces=Zk;Gr.newPlot=pK;Gr._doPlot=cK;Gr.purge=DK;Gr.react=AK;Gr.redraw=dK;Gr.relayout=Xf;Gr.restyle=Vh;Gr.setPlotConfig=vK;Gr.update=Zh;Gr._guiRelayout=Cg(Xf);Gr._guiRestyle=Cg(Vh);Gr._guiUpdate=Cg(Zh);Gr._storeDirectGUIEdit=bK});var Do=Z(Li=>{"use strict";var RK=gr();Li.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Li.getRedrawFunc=function(e){return function(){RK.getComponentMethod("colorbar","draw")(e)}};Li.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Li.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var aC=window.URL||window.webkitURL;Li.createObjectURL=function(e){return aC.createObjectURL(e)};Li.revokeObjectURL=function(e){return aC.revokeObjectURL(e)};Li.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=zK(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Li.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function zK(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var qg=Ir(),Lue=He(),NK=tt(),FK=Er(),que=fo(),Lg=/"/g,Kf="TOBESTRIPPED",IK=new RegExp('("'+Kf+")|("+Kf+'")',"g");function HK(e){var r=qg.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function OK(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}nC.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,l=n._toppaper,o=n.width,s=n.height,u;i.insert("rect",":first-child").call(NK.setRect,0,0,o,s).call(FK.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var BK=He(),YK=Yv().EventEmitter,Qf=Do();function UK(e){var r=e.emitter||new YK,t=new Promise(function(a,n){var i=window.Image,l=e.svg,o=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,v=e.height||150,h=u*f,d=u*v,m=s.getContext("2d",{willReadFrequently:!0}),g=new i,y,w;o==="svg"||BK.isSafari()?w=Qf.encodeSVG(l):(y=Qf.createBlob(l,"svg"),w=Qf.createObjectURL(y)),s.width=h,s.height=d,g.onload=function(){var _;switch(y=null,Qf.revokeObjectURL(w),o!=="svg"&&m.drawImage(g,0,0,h,d),o){case"jpeg":_=s.toDataURL("image/jpeg");break;case"png":_=s.toDataURL("image/png");break;case"webp":_=s.toDataURL("image/webp");break;case"svg":_=w;break;default:var T="Image format is not jpeg, png, svg or webp.";if(n(new Error(T)),!e.promise)return r.emit("error",T)}a(_),e.promise||r.emit("success",_)},g.onerror=function(_){if(y=null,Qf.revokeObjectURL(w),n(_),!e.promise)return r.emit("error",_)},g.src=w});return e.promise?t:r}iC.exports=UK});var Eg=Z((Pue,sC)=>{"use strict";var lC=Hr(),oC=Sg(),GK=Pt(),qi=He(),$f=Do(),VK=Qh(),WK=$h(),ZK=tv().version,Dg={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 XK(e,r){r=r||{};var t,a,n,i;qi.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=qi.getGraphDiv(e),t=qi.extendDeep([],e.data),a=qi.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function l(S){return!(S in r)||qi.validate(r[S],Dg[S])}if(!l("width")&&r.width!==null||!l("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!l("format"))throw new Error("Export format is not "+qi.join2(Dg.format.values,", "," or ")+".");var o={};function s(S,C){return qi.coerce(r,o,Dg,S,C)}var u=s("format"),f=s("width"),v=s("height"),h=s("scale"),d=s("setBackground"),m=s("imageDataOnly"),g=document.createElement("div");g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);var y=qi.extendFlat({},a);f?y.width=f:r.width===null&&lC(i.width)&&(y.width=i.width),v?y.height=v:r.height===null&&lC(i.height)&&(y.height=i.height);var w=qi.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),_=$f.getRedrawFunc(g);function T(){return new Promise(function(S){setTimeout(S,$f.getDelay(g._fullLayout))})}function b(){return new Promise(function(S,C){var q=VK(g,u,h),D=g._fullLayout.width,R=g._fullLayout.height;function z(){oC.purge(g),document.body.removeChild(g)}if(u==="full-json"){var F=GK.graphJson(g,!1,"keepdata","object",!0,!0);return F.version=ZK,F=JSON.stringify(F),z(),S(m?F:$f.encodeJSON(F))}if(z(),u==="svg")return S(m?q:$f.encodeSVG(q));var H=document.createElement("canvas");H.id=qi.randstr(),WK({format:u,width:D,height:R,scale:h,canvas:H,svg:q,promise:!0}).then(S).catch(C)})}function M(S){return m?S.replace($f.IMAGE_URL_PREFIX,""):S}return new Promise(function(S,C){oC.newPlot(g,t,y,w).then(_).then(T).then(b).then(function(q){S(M(q))}).catch(function(q){C(q)})})}sC.exports=XK});var vC=Z((Rue,cC)=>{"use strict";var Pn=He(),JK=Pt(),KK=As(),QK=eo().dfltConfig,ti=Pn.isPlainObject,Po=Array.isArray,uC=Pn.isArrayOrTypedArray;cC.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=KK.get(),n=[],i={_context:Pn.extendFlat({},QK)},l,o;Po(r)?(i.data=Pn.extendDeep([],r),l=r):(i.data=[],l=[],n.push(jt("array","data"))),ti(t)?(i.layout=Pn.extendDeep({},t),o=t):(i.layout={},o={},arguments.length>1&&n.push(jt("object","layout"))),JK.supplyDefaults(i);for(var s=i._fullData,u=l.length,f=0;fv.length&&a.push(jt("unused",n,u.concat(v.length)));var w=v.length,_=Array.isArray(y);_&&(w=Math.min(w,y.length));var T,b,M,S,C;if(h.dimensions===2)for(b=0;bv[b].length&&a.push(jt("unused",n,u.concat(b,v[b].length)));var q=v[b].length;for(T=0;T<(_?Math.min(q,y[b].length):q);T++)M=_?y[b][T]:y,S=f[b][T],C=v[b][T],Pn.validate(S,M)?C!==S&&C!==+S&&a.push(jt("dynamic",n,u.concat(b,T),S,C)):a.push(jt("value",n,u.concat(b,T),S))}else a.push(jt("array",n,u.concat(b),f[b]));else for(b=0;b{"use strict";var nQ=He(),ed=Do();function iQ(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(l,o){var s,u;if(n)return s=ed.createBlob(e,t),u=ed.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),ed.revokeObjectURL(u),s=null,l(r);if(nQ.isSafari()){var f=t==="svg"?",":";base64,";return ed.octetStream(f+encodeURIComponent(e)),l(r)}o(new Error("download error"))});return i}hC.exports=iQ});var Pg=Z((Fue,mC)=>{"use strict";var pC=He(),lQ=Eg(),oQ=dC(),Nue=Do();function sQ(e,r){var t;return pC.isPlainObject(e)||(t=pC.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=lQ(e,r),l=r.filename||e.fn||"newplot";l+="."+r.format.replace("-","."),i.then(function(o){return t&&(t._snapshotInProgress=!1),oQ(o,l,r.format)}).then(function(o){a(o)}).catch(function(o){t&&(t._snapshotInProgress=!1),n(o)})})}mC.exports=sQ});var _C=Z(Rg=>{"use strict";var rn=He(),tn=rn.isPlainObject,yC=As(),gC=Pt(),uQ=Gn(),bC=ct(),xC=eo().dfltConfig;Rg.makeTemplate=function(e){e=rn.isPlainObject(e)?e:rn.getGraphDiv(e),e=rn.extendDeep({_context:xC},{data:e.data,layout:e.layout}),gC.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var m={};jf(d,m,cQ.bind(null,d));var g=rn.coerce(d,{},uQ,"type"),y=a.data[g];y||(y=a.data[g]=[]),y.push(m)}),jf(t,a.layout,fQ.bind(null,t)),delete a.layout.template;var n=t.template;if(tn(n)){var i=n.layout,l,o,s,u,f,v;tn(i)&&rd(i,a.layout);var h=n.data;if(tn(h)){for(o in a.data)if(s=h[o],Array.isArray(s)){for(f=a.data[o],v=f.length,u=s.length,l=0;lw?l.push({code:"unused",traceType:d,templateCount:y,dataCount:w}):w>y&&l.push({code:"reused",traceType:d,templateCount:y,dataCount:w})}}function _(T,b){for(var M in T)if(M.charAt(0)!=="_"){var S=T[M],C=Rn(T,M,b);tn(S)?(Array.isArray(T)&&S._template===!1&&S.templateitemname&&l.push({code:"missing",path:C,templateitemname:S.templateitemname}),_(S,C)):Array.isArray(S)&&vQ(S)&&_(S,C)}}if(_({data:s,layout:o},""),l.length)return l.map(hQ)};function vQ(e){for(var r=0;r{"use strict";var Vt=Sg();pt._doPlot=Vt._doPlot;pt.newPlot=Vt.newPlot;pt.restyle=Vt.restyle;pt.relayout=Vt.relayout;pt.redraw=Vt.redraw;pt.update=Vt.update;pt._guiRestyle=Vt._guiRestyle;pt._guiRelayout=Vt._guiRelayout;pt._guiUpdate=Vt._guiUpdate;pt._storeDirectGUIEdit=Vt._storeDirectGUIEdit;pt.react=Vt.react;pt.extendTraces=Vt.extendTraces;pt.prependTraces=Vt.prependTraces;pt.addTraces=Vt.addTraces;pt.deleteTraces=Vt.deleteTraces;pt.moveTraces=Vt.moveTraces;pt.purge=Vt.purge;pt.addFrames=Vt.addFrames;pt.deleteFrames=Vt.deleteFrames;pt.animate=Vt.animate;pt.setPlotConfig=Vt.setPlotConfig;var dQ=Gu().getGraphDiv,pQ=hh().eraseActiveShape;pt.deleteActiveShape=function(e){return pQ(dQ(e))};pt.toImage=Eg();pt.validate=vC();pt.downloadImage=Pg();var wC=_C();pt.makeTemplate=wC.makeTemplate;pt.validateTemplate=wC.validateTemplate});var Ng=Z((Oue,MC)=>{"use strict";var zg=He(),mQ=gr();MC.exports=function(r,t,a,n){var i=n("x"),l=n("y"),o,s=mQ.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=zg.minRowLength(i);l?o=Math.min(u,zg.minRowLength(l)):(o=u,n("y0"),n("dy"))}else{if(!l)return 0;o=zg.minRowLength(l),n("x0"),n("dx")}return t._length=o,o}});var Fg=Z((Bue,CC)=>{"use strict";var AC=He().dateTick0,yQ=Bt(),gQ=yQ.ONEWEEK;function kC(e,r){return e%gQ===0?AC(r,1):AC(r,0)}CC.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var l=n("xperiod");l&&(n("xperiod0",kC(l,t.xcalendar)),n("xperiodalignment"))}if(i.y){var o=n("yperiod");o&&(n("yperiod0",kC(o,t.ycalendar)),n("yperiodalignment"))}}});var qC=Z((Yue,LC)=>{"use strict";var SC=["orientation","groupnorm","stackgaps"];LC.exports=function(r,t,a,n){var i=a._scatterStackOpts,l=n("stackgroup");if(l){var o=t.xaxis+t.yaxis,s=i[o];s||(s=i[o]={});var u=s[l],f=!1;u?u.traces.push(t):(u=s[l]={traceIndices:[],traces:[t]},f=!0);for(var v={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var DC=Er(),EC=Tn().hasColorscale,PC=Ls(),bQ=on();RC.exports=function(r,t,a,n,i,l){var o=bQ.isBubble(r),s=(r.line||{}).color,u;if(l=l||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",o?.7:1),i("marker.size"),l.noAngle||(i("marker.angle"),l.noAngleRef||i("marker.angleref"),l.noStandOff||i("marker.standoff")),i("marker.color",a),EC(r,"marker")&&PC(r,t,n,i,{prefix:"marker.",cLetter:"c"}),l.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),l.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:o?u=DC.background:u=DC.defaultLine,i("marker.line.color",u),EC(r,"marker.line")&&PC(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",o?1:0)),o&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),l.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var FC=Z((Gue,NC)=>{"use strict";var xQ=He().isArrayOrTypedArray,_Q=Tn().hasColorscale,wQ=Ls();NC.exports=function(r,t,a,n,i,l){l||(l={});var o=(r.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),i("line.color",a),_Q(r,"line"))wQ(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(xQ(o)?!1:o)||a;i("line.color",s)}i("line.width"),l.noDash||i("line.dash"),l.backoff&&i("line.backoff")}});var HC=Z((Vue,IC)=>{"use strict";IC.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var BC=Z((Wue,OC)=>{"use strict";var TQ=He();OC.exports=function(e,r,t,a,n){n=n||{},a("textposition"),TQ.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var GC=Z((Zue,UC)=>{"use strict";var ad=Er(),YC=He().isArrayOrTypedArray;function MQ(e){for(var r=ad.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var VC=He(),AQ=gr(),kQ=qo(),CQ=qh(),tu=on(),SQ=Ng(),LQ=Fg(),qQ=qC(),DQ=zC(),EQ=FC(),WC=HC(),PQ=BC(),RQ=GC(),zQ=He().coercePattern;ZC.exports=function(r,t,a,n){function i(d,m){return VC.coerce(r,t,kQ,d,m)}var l=SQ(r,t,n,i);if(l||(t.visible=!1),!!t.visible){LQ(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var o=qQ(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!o&&l{"use strict";var NQ=Af().getAxisGroup;JC.exports=function(r,t,a,n,i){var l=t.orientation,o=t[{v:"x",h:"y"}[l]+"axis"],s=NQ(a,o)+l,u=a._alignmentOpts||{},f=n("alignmentgroup"),v=u[s];v||(v=u[s]={});var h=v[f];h?h.traces.push(t):h=v[f]={traces:[t],alignmentIndex:Object.keys(v).length,offsetGroups:{}};var d=n("offsetgroup")||"",m=h.offsetGroups,g=m[d];t._offsetIndex=0,(i!=="group"||d)&&(g||(g=m[d]={offsetIndex:Object.keys(m).length}),t._offsetIndex=g.offsetIndex)}});var QC=Z((Kue,KC)=>{"use strict";var FQ=He(),IQ=Ig(),HQ=qo();KC.exports=function(r,t){var a,n,i,l=t.scattermode;function o(h){return FQ.coerce(n._input,n,HQ,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var v=r[f];if(v.type==="scatter"&&v.xaxis===s.xaxis&&v.yaxis===s.yaxis){v.opacity=void 0;break}}}}}});var jC=Z((Que,$C)=>{"use strict";var OQ=He(),BQ=Zv();$C.exports=function(e,r){function t(n,i){return OQ.coerce(e,r,BQ,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var Hg=Z(($ue,rS)=>{"use strict";var YQ=Hr(),eS=He(),UQ=eS.dateTime2ms,nd=eS.incrementMonth,GQ=Bt(),VQ=GQ.ONEAVGMONTH;rS.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var l=r[a+"period"],o;if(YQ(l)){if(l=+l,l<=0)return{vals:n}}else if(typeof l=="string"&&l.charAt(0)==="M"){var s=+l.substring(1);if(s>0&&Math.round(s)===s)o=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",v=i==="end",h=r[a+"period0"],d=UQ(h,u)||0,m=[],g=[],y=[],w=n.length,_=0;_T;)S=nd(S,-o,u);for(;S<=T;)S=nd(S,o,u);M=nd(S,-o,u)}else{for(b=Math.round((T-d)/l),S=d+b*l;S>T;)S-=l;for(;S<=T;)S+=l;M=S-l}m[_]=f?M:v?S:(M+S)/2,g[_]=M,y[_]=S}return{vals:m,starts:g,ends:y}}});var nS=Z((jue,aS)=>{"use strict";var Og=Tn().hasColorscale,Bg=i0(),tS=on();aS.exports=function(r,t){tS.hasLines(t)&&Og(t,"line")&&Bg(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),tS.hasMarkers(t)&&(Og(t,"marker")&&Bg(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Og(t,"marker.line")&&Bg(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Yg=Z((efe,iS)=>{"use strict";var At=He();iS.exports=function(r,t){for(var a=0;a{"use strict";var lS=He();oS.exports=function(r,t){lS.isArrayOrTypedArray(t.selectedpoints)&&lS.tagSelected(r,t)}});var Xg=Z((tfe,dS)=>{"use strict";var sS=Hr(),Vg=He(),ec=dt(),uS=Hg(),Gg=Bt().BADNUM,Wg=on(),WQ=nS(),ZQ=Yg(),XQ=Ug();function JQ(e,r){var t=e._fullLayout,a=r._xA=ec.getFromId(e,r.xaxis||"x","x"),n=r._yA=ec.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),l=n.makeCalcdata(r,"y"),o=uS(r,a,"x",i),s=uS(r,n,"y",l),u=o.vals,f=s.vals,v=r._length,h=new Array(v),d=r.ids,m=Zg(r,t,a,n),g=!1,y,w,_,T,b,M;vS(t,r);var S="x",C="y",q;if(m)Vg.pushUnique(m.traceIndices,r.index),y=m.orientation==="v",y?(C="s",q="x"):(S="s",q="y"),b=m.stackgaps==="interpolate";else{var D=cS(r,v);fS(e,r,a,n,u,f,D)}var R=!!r.xperiodalignment,z=!!r.yperiodalignment;for(w=0;ww&&h[T].gap;)T--;for(M=h[T].s,_=h.length-1;_>T;_--)h[_].s=M;for(;w{"use strict";pS.exports=id;var KQ=He().distinctVals;function id(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var zn=Hr(),Ll=He().isArrayOrTypedArray,au=Bt().BADNUM,QQ=gr(),rc=dt(),$Q=Af().getAxisGroup,ld=mS();function jQ(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;us+l||!zn(o))}for(var f=0;f{"use strict";var _S=Xg(),wS=jg().setGroupPositions;function c$(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;uD[f]&&f{"use strict";var h$=tt(),SS=Bt(),tc=SS.BADNUM,LS=SS.LOG_CLIP,AS=LS+.5,kS=LS-.5,od=He(),d$=od.segmentsIntersect,CS=od.constrain,r2=qh();qS.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,l=n.type==="log",o=i.type==="log",s=n._length,u=i._length,f=t.backoff,v=a.marker,h=t.connectGaps,d=t.baseTolerance,m=t.shape,g=m==="linear",y=a.fill&&a.fill!=="none",w=[],_=r2.minTolerance,T=r.length,b=new Array(T),M=0,S,C,q,D,R,z,F,H,O,X,J,B,I,W,K,Q;function ie(ze){var ae=r[ze];if(!ae)return!1;var oe=t.linearized?n.l2p(ae.x):n.c2p(ae.x),qe=t.linearized?i.l2p(ae.y):i.c2p(ae.y);if(oe===tc){if(l&&(oe=n.c2p(ae.x,!0)),oe===tc)return!1;o&&qe===tc&&(oe*=Math.abs(n._m*u*(n._m>0?AS:kS)/(i._m*s*(i._m>0?AS:kS)))),oe*=1e3}if(qe===tc){if(o&&(qe=i.c2p(ae.y,!0)),qe===tc)return!1;qe*=1e3}return[oe,qe]}function me(ze,ae,oe,qe){var ke=oe-ze,ir=qe-ae,vr=.5-ze,sr=.5-ae,Mr=ke*ke+ir*ir,Ur=ke*vr+ir*sr;if(Ur>0&&Ur1||Math.abs(vr.y-oe[0][1])>1)&&(vr=[vr.x,vr.y],qe&&_e(vr,ze)<_e(oe[0],ze)?oe.unshift(vr):oe.push(vr),qe++)}return oe}function Ie(ze){if(ze[0]ve||ze[1]Y)return[CS(ze[0],Se,ve),CS(ze[1],Ae,Y)]}function Be(ze,ae){if(ze[0]===ae[0]&&(ze[0]===Se||ze[0]===ve)||ze[1]===ae[1]&&(ze[1]===Ae||ze[1]===Y))return!0}function Ne(ze,ae){var oe=[],qe=Ie(ze),ke=Ie(ae);return qe&&ke&&Be(qe,ke)||(qe&&oe.push(qe),ke&&oe.push(ke)),oe}function Ee(ze,ae,oe){return function(qe,ke){var ir=Ie(qe),vr=Ie(ke),sr=[];if(ir&&vr&&Be(ir,vr))return sr;ir&&sr.push(ir),vr&&sr.push(vr);var Mr=2*od.constrain((qe[ze]+ke[ze])/2,ae,oe)-((ir||qe)[ze]+(vr||ke)[ze]);if(Mr){var Ur;ir&&vr?Ur=Mr>0==ir[ze]>vr[ze]?ir:vr:Ur=ir||vr,Ur[ze]+=Mr}return sr}}var Je;m==="linear"||m==="spline"?Je=Pe:m==="hv"||m==="vh"?Je=Ne:m==="hvh"?Je=Ee(0,Se,ve):m==="vhv"&&(Je=Ee(1,Ae,Y));function We(ze,ae){var oe=ae[0]-ze[0],qe=(ae[1]-ze[1])/oe,ke=(ze[1]*ae[0]-ae[1]*ze[0])/oe;return ke>0?[qe>0?Se:ve,Y]:[qe>0?ve:Se,Ae]}function ne(ze){var ae=ze[0],oe=ze[1],qe=ae===b[M-1][0],ke=oe===b[M-1][1];if(!(qe&&ke))if(M>1){var ir=ae===b[M-2][0],vr=oe===b[M-2][1];qe&&(ae===Se||ae===ve)&&ir?vr?M--:b[M-1]=ze:ke&&(oe===Ae||oe===Y)&&vr?ir?M--:b[M-1]=ze:b[M++]=ze}else b[M++]=ze}function Me(ze){b[M-1][0]!==ze[0]&&b[M-1][1]!==ze[1]&&ne([be,ye]),ne(ze),Fe=null,be=ye=0}var Ce=od.isArrayOrTypedArray(v);function cr(ze){if(ze&&f&&(ze.i=S,ze.d=r,ze.trace=a,ze.marker=Ce?v[ze.i]:v,ze.backoff=f),pe=ze[0]/s,ge=ze[1]/u,U=ze[0]ve?ve:0,de=ze[1]Y?Y:0,U||de){if(!M)b[M++]=[U||ze[0],de||ze[1]];else if(Fe){var ae=Je(Fe,ze);ae.length>1&&(Me(ae[0]),b[M++]=ae[1])}else Re=Je(b[M-1],ze)[0],b[M++]=Re;var oe=b[M-1];U&&de&&(oe[0]!==U||oe[1]!==de)?(Fe&&(be!==U&&ye!==de?ne(be&&ye?We(Fe,ze):[be||U,ye||de]):be&&ye&&ne([be,ye])),ne([U,de])):be-U&&ye-de&&ne([U||be,de||ye]),Fe=ze,be=U,ye=de}else Fe&&Me(Je(Fe,ze)[0]),b[M++]=ze}for(S=0;Sj(z,tr))break;q=z,I=O[0]*H[0]+O[1]*H[1],I>J?(J=I,D=z,F=!1):I=r.length||!z)break;cr(z),C=z}}Fe&&ne([be||Fe[0],ye||Fe[1]]),w.push(b.slice(0,M))}var De=m.slice(m.length-1);if(f&&De!=="h"&&De!=="v"){for(var Le=!1,Ye=-1,Ze=[],Ue=0;Ue{"use strict";var ES={tonextx:1,tonexty:1,tonext:1};PS.exports=function(r,t,a){var n,i,l,o,s,u={},f=!1,v=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var ai=Ir(),p$=gr(),ac=He(),iu=ac.ensureSingle,NS=ac.identity,kt=tt(),lu=on(),m$=DS(),y$=RS(),sd=$y().tester;FS.exports=function(r,t,a,n,i,l){var o,s,u=!i,f=!!i&&i.duration>0,v=y$(r,t,a);if(o=n.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),o.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),o.order(),g$(r,o,t),f){l&&(s=l());var h=ai.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){n.selectAll("g.trace").each(function(d,m){zS(r,m,t,d,v,this,i)})})}else o.each(function(d,m){zS(r,m,t,d,v,this,i)});u&&o.exit().remove(),n.selectAll("path:not([d])").remove()};function g$(e,r,t){r.each(function(a){var n=iu(ai.select(this),"g","fills");kt.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,l=[];i._ownfill&&l.push("_ownFill"),i._nexttrace&&l.push("_nextFill");var o=n.selectAll("g").data(l,NS);o.enter().append("g"),o.exit().each(function(s){i[s]=null}).remove(),o.order().each(function(s){i[s]=iu(ai.select(this),"path","js-fill")})})}function zS(e,r,t,a,n,i,l){var o=e._context.staticPlot,s;b$(e,r,t,a,n);var u=!!l&&l.duration>0;function f(Ee){return u?Ee.transition():Ee}var v=t.xaxis,h=t.yaxis,d=a[0].trace,m=d.line,g=ai.select(i),y=iu(g,"g","errorbars"),w=iu(g,"g","lines"),_=iu(g,"g","points"),T=iu(g,"g","text");if(p$.getComponentMethod("errorbars","plot")(e,y,t,l),d.visible!==!0)return;f(g).style("opacity",d.opacity);var b,M,S=d.fill.charAt(d.fill.length-1);S!=="x"&&S!=="y"&&(S="");var C,q;S==="y"?(C=1,q=h.c2p(0,!0)):S==="x"&&(C=0,q=v.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=g;var D="",R=[],z=d._prevtrace,F=null,H=null;z&&(D=z._prevRevpath||"",M=z._nextFill,R=z._ownPolygons,F=z._fillsegments,H=z._fillElement);var O,X,J="",B="",I,W,K,Q,ie,me,pe=[];d._polygons=[];var ge=[],j=[],_e=ac.noop;if(b=d._ownFill,lu.hasLines(d)||d.fill!=="none"){M&&M.datum(a),["hv","vh","hvh","vhv"].indexOf(m.shape)!==-1?(I=kt.steps(m.shape),W=kt.steps(m.shape.split("").reverse().join(""))):m.shape==="spline"?I=W=function(Ee){var Je=Ee[Ee.length-1];return Ee.length>1&&Ee[0][0]===Je[0]&&Ee[0][1]===Je[1]?kt.smoothclosed(Ee.slice(1),m.smoothing):kt.smoothopen(Ee,m.smoothing)}:I=W=function(Ee){return"M"+Ee.join("L")},K=function(Ee){return W(Ee.reverse())},j=m$(a,{xaxis:v,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(m.width||1,3)/4,shape:m.shape,backoff:m.backoff,simplify:m.simplify,fill:d.fill}),ge=new Array(j.length);var se=0;for(s=0;s=o[0]&&g.x<=o[1]&&g.y>=s[0]&&g.y<=s[1]}),h=Math.ceil(v.length/f),d=0;n.forEach(function(g,y){var w=g[0].trace;lu.hasMarkers(w)&&w.marker.maxdisplayed>0&&y{"use strict";HS.exports={container:"marker",min:"cmin",max:"cmax"}});var BS=Z((ffe,OS)=>{"use strict";var ud=dt();OS.exports=function(r,t,a){var n={},i={_fullLayout:a},l=ud.getFromTrace(i,t,"x"),o=ud.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=ud.tickText(l,l.c2l(s),!0).text,n.yLabel=ud.tickText(o,o.c2l(u),!0).text,n}});var l2=Z((cfe,YS)=>{"use strict";var a2=Ir(),ou=tt(),x$=gr();function _$(e){var r=a2.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=a2.select(this),n=t.trace||t[0].trace;n2(a,n,e)}),r.selectAll("g.text").each(function(t){var a=a2.select(this),n=t.trace||t[0].trace;i2(a,n,e)}),r.selectAll("g.trace path.js-line").call(ou.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(ou.fillGroupStyle,e,!1),x$.getComponentMethod("errorbars","style")(r)}function n2(e,r,t){ou.pointStyle(e.selectAll("path.point"),r,t)}function i2(e,r,t){ou.textPointStyle(e.selectAll("text"),r,t)}function w$(e,r,t){var a=r[0].trace;a.selectedpoints?(ou.selectedPointStyle(t.selectAll("path.point"),a),ou.selectedTextStyle(t.selectAll("text"),a)):(n2(t,a,e),i2(t,a,e))}YS.exports={style:_$,stylePoints:n2,styleText:i2,styleOnSelect:w$}});var GS=Z((vfe,US)=>{"use strict";var su=Er(),T$=on();US.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&su.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,l=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&su.opacity(i)?i:l&&su.opacity(l)&&(t.mlw||((r.marker||{}).line||{}).width)?l:"",n?su.opacity(n)<.3?su.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&su.opacity(a)&&T$.hasLines(r)&&r.line.width?a:r.fillcolor)}});var ZS=Z((hfe,WS)=>{"use strict";var fd=He(),VS=ki(),M$=gr(),A$=GS(),o2=Er(),k$=fd.fillText;WS.exports=function(r,t,a,n){var i=r.cd,l=i[0].trace,o=r.xa,s=r.ya,u=o.c2p(t),f=s.c2p(a),v=[u,f],h=l.hoveron||"",d=l.mode.indexOf("markers")!==-1?3:.5,m=!!l.xperiodalignment,g=!!l.yperiodalignment;if(h.indexOf("points")!==-1){var y=function(B){if(m){var I=o.c2p(B.xStart),W=o.c2p(B.xEnd);return u>=Math.min(I,W)&&u<=Math.max(I,W)?0:1/0}var K=Math.max(3,B.mrc||0),Q=1-1/K,ie=Math.abs(o.c2p(B.x)-u);return ie=Math.min(I,W)&&f<=Math.max(I,W)?0:1/0}var K=Math.max(3,B.mrc||0),Q=1-1/K,ie=Math.abs(s.c2p(B.y)-f);return iepe!=Y>=pe&&(Se=_e[j-1][0],ve=_e[j][0],Y-Ae&&(se=Se+(ve-Se)*(pe-Ae)/(Y-Ae),K=Math.min(K,se),Q=Math.max(Q,se)));return K=Math.max(K,0),Q=Math.min(Q,o._length),{x0:K,x1:Q,y0:pe,y1:pe}}if(h.indexOf("fills")!==-1&&l._fillElement){var O=F(l._fillElement)&&!F(l._fillExclusionElement);if(O){var X=H(l._polygons);X===null&&(X={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var J=o2.defaultLine;return o2.opacity(l.fillcolor)?J=l.fillcolor:o2.opacity((l.line||{}).color)&&(J=l.line.color),fd.extendFlat(r,{distance:r.maxHoverDistance,x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1,color:J,hovertemplate:!1}),delete r.index,l.text&&!fd.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}});var KS=Z((dfe,JS)=>{"use strict";var XS=on();JS.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=[],o=a[0].trace,s,u,f,v,h=!XS.hasMarkers(o)&&!XS.hasText(o);if(h)return[];if(t===!1)for(s=0;s{"use strict";QS.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var tL=Z((mfe,rL)=>{"use strict";var nc=gr().traceIs,s2=Sm();rL.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(C$(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function C$(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=S$(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var l=a+"calendar",o=i[l],s={noMultiCategory:!nc(i,"cartesian")||nc(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,eL(i,a)){var u=jS(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(eL(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function jS(e){return{v:"x",h:"y"}[e.orientation||"v"]}function eL(e,r){var t=jS(e),a=nc(e,"box-violin"),n=nc(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var nL=Z((yfe,aL)=>{"use strict";var L$=nn().isTypedArraySpec;function q$(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,l;if(r.axData)n=r.axData;else for(n=[],i=0;i0||L$(i),o;l&&(o="array");var s=a("categoryorder",o),u;s==="array"&&(u=a("categoryarray")),!l&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=q$(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var oL=Z((gfe,lL)=>{"use strict";var iL=bn().mix,D$=hi(),E$=He();lL.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function l(C,q){return E$.coerce2(r,t,n.attributes,C,q)}var o=l("linecolor",i),s=l("linewidth"),u=a("showline",n.showLine||!!o||!!s);u||(delete t.linecolor,delete t.linewidth);var f=iL(i,n.bgColor,n.blend||D$.lightFraction).toRgbString(),v=l("gridcolor",f),h=l("gridwidth"),d=l("griddash"),m=a("showgrid",n.showGrid||!!v||!!h||!!d);if(m||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var g=iL(t.gridcolor,n.bgColor,67).toRgbString(),y=l("minor.gridcolor",g),w=l("minor.gridwidth",t.gridwidth||1),_=l("minor.griddash",t.griddash||"solid"),T=a("minor.showgrid",!!y||!!w||!!_);T||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var b=l("zerolinecolor",i),M=l("zerolinewidth"),S=a("zeroline",n.showGrid||!!b||!!M);S||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var f2=Z((bfe,hL)=>{"use strict";var sL=Hr(),P$=gr(),ic=He(),R$=ct(),z$=Jn(),u2=Xn(),uL=Qp(),fL=jp(),N$=tm(),F$=am(),I$=nL(),H$=oL(),O$=Xm(),cL=b0(),cd=da().WEEKDAY_PATTERN,B$=da().HOUR_PATTERN;hL.exports=function(r,t,a,n,i){var l=n.letter,o=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},v=t.type||f.type||"-",h;if(v==="date"){var d=P$.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(h=a("ticklabelmode"))}!n.noTicklabelindex&&(v==="date"||v==="linear")&&a("ticklabelindex");var m="";(!n.noTicklabelposition||v==="multicategory")&&(m=ic.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:l==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",m.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),cL(t,i),O$(r,t,a,n),I$(r,t,a,n),v!=="category"&&!n.noHover&&a("hoverformat");var g=a("color"),y=g!==u2.color.dflt?g:o.color,w=s.label||i._dfltTitle[l];if(F$(r,t,a,v,n),!u)return t;a("title.text",w),ic.coerceFont(a,"title.font",o,{overrideDflt:{size:ic.bigFont(o.size),color:y}}),uL(r,t,a,v);var _=n.hasMinor;if(_&&(R$.newContainer(t,"minor"),uL(r,t,a,v,{isMinor:!0})),N$(r,t,a,v,n),fL(r,t,a,n),_){var T=n.isMinor;n.isMinor=!0,fL(r,t,a,n),n.isMinor=T}H$(r,t,a,{dfltColor:g,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:_,attributes:u2}),_&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var b=v==="multicategory";if(!n.noTickson&&(v==="category"||b)&&(t.ticks||t.showgrid)){var M;b&&(M="boundaries");var S=a("tickson",M);S==="boundaries"&&delete t.ticklabelposition}if(b){var C=a("showdividers");C&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(z$(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Y$}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var q=0;q=2){var l="",o,s;if(i.length===2){for(o=0;o<2;o++)if(s=vL(i[o]),s){l=cd;break}}var u=a("pattern",l);if(u===cd)for(o=0;o<2;o++)s=vL(i[o]),s&&(r.bounds[o]=i[o]=s-1);if(u)for(o=0;o<2;o++)switch(s=i[o],u){case cd:if(!sL(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[o]=i[o]=s;break;case B$:if(!sL(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[o]=i[o]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var G$=Hr(),vd=He();dL.exports=function(r,t,a,n){var i=n.counterAxes||[],l=n.overlayableAxes||[],o=n.letter,s=n.grid,u=n.overlayingDomain,f,v,h,d,m,g;s&&(v=s._domains[o][s._axisMap[t._id]],f=s._anchors[t._id],v&&(h=s[o+"side"].split(" ")[0],d=s.domain[o][h==="right"||h==="top"?1:0])),v=v||[0,1],f=f||(G$(r.position)?"free":i[0]||"free"),h=h||(o==="x"?"bottom":"left"),d=d||0,m=0,g=!1;var y=vd.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),w=vd.coerce(r,t,{side:{valType:"enumerated",values:o==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(y==="free"){if(o==="y"){var _=a("autoshift");_&&(d=w==="left"?u[0]:u[1],g=t.automargin?t.automargin:!0,m=w==="left"?-3:3),a("shift",m)}a("position",d)}a("automargin",g);var T=!1;if(l.length&&(T=vd.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(l),dflt:!1}},"overlaying")),!T){var b=a("domain",v);b[0]>b[1]-1/4096&&(t.domain=v),vd.noneOrAll(r.domain,t.domain,v),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var TL=Z((_fe,wL)=>{"use strict";var Ro=He(),pL=Er(),V$=bi().isUnifiedHover,W$=_y(),mL=ct(),Z$=ds(),yL=Xn(),X$=tL(),gL=f2(),J$=Af(),bL=c2(),h2=Xt(),Di=h2.id2name,xL=h2.name2id,K$=da().AX_ID_PATTERN,_L=gr(),hd=_L.traceIs,v2=_L.getComponentMethod;function dd(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}wL.exports=function(r,t,a){var n=t.autotypenumbers,i={},l={},o={},s={},u={},f={},v={},h={},d={},m={},g,y;for(g=0;g{"use strict";var Q$=Ir(),ML=gr(),pd=He(),vn=tt(),md=dt();AL.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){md.redrawComponents(r);return}function l(y){var w=y.xaxis,_=y.yaxis;i._defs.select("#"+y.clipId+"> rect").call(vn.setTranslate,0,0).call(vn.setScale,1,1),y.plot.call(vn.setTranslate,w._offset,_._offset).call(vn.setScale,1,1);var T=y.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(vn.setPointGroupScale,1,1),T.selectAll(".textpoint").call(vn.setTextPointsScale,1,1),T.call(vn.hideOutsideRangePoints,y)}function o(y,w){var _=y.plotinfo,T=_.xaxis,b=_.yaxis,M=T._length,S=b._length,C=!!y.xr1,q=!!y.yr1,D=[];if(C){var R=pd.simpleMap(y.xr0,T.r2l),z=pd.simpleMap(y.xr1,T.r2l),F=R[1]-R[0],H=z[1]-z[0];D[0]=(R[0]*(1-w)+w*z[0]-R[0])/(R[1]-R[0])*M,D[2]=M*(1-w+w*H/F),T.range[0]=T.l2r(R[0]*(1-w)+w*z[0]),T.range[1]=T.l2r(R[1]*(1-w)+w*z[1])}else D[0]=0,D[2]=M;if(q){var O=pd.simpleMap(y.yr0,b.r2l),X=pd.simpleMap(y.yr1,b.r2l),J=O[1]-O[0],B=X[1]-X[0];D[1]=(O[1]*(1-w)+w*X[1]-O[1])/(O[0]-O[1])*S,D[3]=S*(1-w+w*B/J),b.range[0]=T.l2r(O[0]*(1-w)+w*X[0]),b.range[1]=b.l2r(O[1]*(1-w)+w*X[1])}else D[1]=0,D[3]=S;md.drawOne(r,T,{skipTitle:!0}),md.drawOne(r,b,{skipTitle:!0}),md.redrawComponents(r,[T._id,b._id]);var I=C?M/D[2]:1,W=q?S/D[3]:1,K=C?D[0]:0,Q=q?D[1]:0,ie=C?D[0]/D[2]*M:0,me=q?D[1]/D[3]*S:0,pe=T._offset-ie,ge=b._offset-me;_.clipRect.call(vn.setTranslate,K,Q).call(vn.setScale,1/I,1/W),_.plot.call(vn.setTranslate,pe,ge).call(vn.setScale,I,W),vn.setPointGroupScale(_.zoomScalePts,1/I,1/W),vn.setTextPointsScale(_.zoomScaleTxt,1/I,1/W)}var s;n&&(s=n());function u(){for(var y={},w=0;wa.duration?(u(),d=window.cancelAnimationFrame(g)):d=window.requestAnimationFrame(g)}return v=Date.now(),d=window.requestAnimationFrame(g),Promise.resolve()}});var bd=Z(Ta=>{"use strict";var gd=Ir(),CL=gr(),zo=He(),$$=Pt(),j$=tt(),SL=zp().getModuleCalcData,ql=Xt(),ni=da(),ej=fo(),Qr=zo.ensureSingle;function yd(e,r,t){return zo.ensureSingle(e,r,t,function(a){a.datum(t)})}var No=ni.zindexSeparator;Ta.name="cartesian";Ta.attr=["xaxis","yaxis"];Ta.idRoot=["x","y"];Ta.idRegex=ni.idRegex;Ta.attrRegex=ni.attrRegex;Ta.attributes=$S();Ta.layoutAttributes=Xn();Ta.supplyLayoutDefaults=TL();Ta.transitionAxes=kL();Ta.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,l=i,o={},s={},u,f,v;for(u=0;u0){var d=h.id;if(d.indexOf(No)!==-1)continue;d+=No+(u+1),h=zo.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var m=[],g,y=0;y1&&(M+=No+b),T.push(o+M),l=0;l1,v=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=Qr(a,"path","xlines-above"),r.ylines=Qr(a,"path","ylines-above"),r.xaxislayer=Qr(a,"g","xaxislayer-above"),r.yaxislayer=Qr(a,"g","yaxislayer-above");else{if(!l){var h=Qr(a,"g","layer-subplot");r.shapelayer=Qr(h,"g","shapelayer"),r.imagelayer=Qr(h,"g","imagelayer"),v&&f?(r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer):(r.minorGridlayer=Qr(a,"g","minor-gridlayer"),r.gridlayer=Qr(a,"g","gridlayer"),r.zerolinelayer=Qr(a,"g","zerolinelayer"));var d=Qr(a,"g","layer-between");r.shapelayerBetween=Qr(d,"g","shapelayer"),r.imagelayerBetween=Qr(d,"g","imagelayer"),Qr(a,"path","xlines-below"),Qr(a,"path","ylines-below"),r.overlinesBelow=Qr(a,"g","overlines-below"),Qr(a,"g","xaxislayer-below"),Qr(a,"g","yaxislayer-below"),r.overaxesBelow=Qr(a,"g","overaxes-below")}r.overplot=Qr(a,"g","overplot"),r.plot=Qr(r.overplot,"g",n),l||(r.xlines=Qr(a,"path","xlines-above"),r.ylines=Qr(a,"path","ylines-above"),r.overlinesAbove=Qr(a,"g","overlines-above"),Qr(a,"g","xaxislayer-above"),Qr(a,"g","yaxislayer-above"),r.overaxesAbove=Qr(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+o),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+o),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var m=v.plotgroup,g=n+"-x",y=n+"-y";r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer,Qr(v.overlinesBelow,"path",g),Qr(v.overlinesBelow,"path",y),Qr(v.overaxesBelow,"g",g),Qr(v.overaxesBelow,"g",y),r.plot=Qr(v.overplot,"g",n),Qr(v.overlinesAbove,"path",g),Qr(v.overlinesAbove,"path",y),Qr(v.overaxesAbove,"g",g),Qr(v.overaxesAbove,"g",y),r.xlines=m.select(".overlines-"+o).select("."+g),r.ylines=m.select(".overlines-"+s).select("."+y),r.xaxislayer=m.select(".overaxes-"+o).select("."+g),r.yaxislayer=m.select(".overaxes-"+s).select("."+y)}l||(u||(yd(r.minorGridlayer,"g",r.xaxis._id),yd(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(w){return w[0]}).sort(ql.idSort),yd(r.gridlayer,"g",r.xaxis._id),yd(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(w){return w[0]}).sort(ql.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function DL(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=gd.select(this);f.remove(),EL(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],l=0;l{"use strict";var xd=on();PL.exports={hasLines:xd.hasLines,hasMarkers:xd.hasMarkers,hasText:xd.hasText,isBubble:xd.isBubble,attributes:qo(),layoutAttributes:Zv(),supplyDefaults:XC(),crossTraceDefaults:QC(),supplyLayoutDefaults:jC(),calc:Xg().calc,crossTraceCalc:MS(),arraysToCalcdata:Yg(),plot:IS(),colorbar:t2(),formatLabels:BS(),style:l2().style,styleOnSelect:l2().styleOnSelect,hoverPoints:ZS(),selectPoints:KS(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:bd(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var FL=Z((Afe,NL)=>{"use strict";var tj=Ir(),aj=Er(),zL=fg(),d2=He(),nj=d2.strScale,ij=d2.strRotate,lj=d2.strTranslate;NL.exports=function(r,t,a){var n=r.node(),i=zL[a.arrowhead||0],l=zL[a.startarrowhead||0],o=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,v=i.backoff*o+a.standoff,h=l.backoff*s+a.startstandoff,d,m,g,y;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},m={x:+r.attr("x2"),y:+r.attr("y2")};var w=d.x-m.x,_=d.y-m.y;if(g=Math.atan2(_,w),y=g+Math.PI,v&&h&&v+h>Math.sqrt(w*w+_*_)){O();return}if(v){if(v*v>w*w+_*_){O();return}var T=v*Math.cos(g),b=v*Math.sin(g);m.x+=T,m.y+=b,r.attr({x2:m.x,y2:m.y})}if(h){if(h*h>w*w+_*_){O();return}var M=h*Math.cos(g),S=h*Math.sin(g);d.x-=M,d.y-=S,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var C=n.getTotalLength(),q="";if(C{"use strict";var IL=Ir(),p2=gr(),oj=Pt(),El=He(),m2=El.strTranslate,oc=dt(),Fo=Er(),Ji=tt(),HL=ki(),y2=xa(),g2=wl(),lc=Qn(),sj=ct().arrayEditor,uj=FL();YL.exports={draw:fj,drawOne:OL,drawRaw:BL};function fj(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?ke="right":ke="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ke]}for(var Ae=!1,Y=["x","y"],re=0;re1)&&(be===de?(tr=ye.r2fraction(r["a"+U]),(tr<0||tr>1)&&(Ae=!0)):Ae=!0),Je=ye._offset+ye.r2p(r[U]),Me=.5}else{var De=cr==="domain";U==="x"?(ne=r[U],Je=De?ye._offset+ye._length*ne:Je=o.l+o.w*ne):(ne=1-r[U],Je=De?ye._offset+ye._length*ne:Je=o.t+o.h*ne),Me=r.showarrow?.5:ne}if(r.showarrow){Ee.head=Je;var Le=r["a"+U];if(Ce=Re*ve(.5,r.xanchor)-Pe*ve(.5,r.yanchor),be===de){var Ye=oc.getRefType(be);Ye==="domain"?(U==="y"&&(Le=1-Le),Ee.tail=ye._offset+ye._length*Le):Ye==="paper"?U==="y"?(Le=1-Le,Ee.tail=o.t+o.h*Le):Ee.tail=o.l+o.w*Le:Ee.tail=ye._offset+ye.r2p(Le),We=Ce}else Ee.tail=Je+Le,We=Ce+Le;Ee.text=Ee.tail+Ce;var Ze=l[U==="x"?"width":"height"];if(de==="paper"&&(Ee.head=El.constrain(Ee.head,1,Ze-1)),be==="pixel"){var Ue=-Math.max(Ee.tail-3,Ee.text),Oe=Math.min(Ee.tail+3,Ee.text)-Ze;Ue>0?(Ee.tail+=Ue,Ee.text+=Ue):Oe>0&&(Ee.tail-=Oe,Ee.text-=Oe)}Ee.tail+=Ne,Ee.head+=Ne}else Ce=Ie*ve(Me,Be),We=Ce,Ee.text=Je+Ce;Ee.text+=Ne,Ce+=Ne,We+=Ne,r["_"+U+"padplus"]=Ie/2+We,r["_"+U+"padminus"]=Ie/2-We,r["_"+U+"size"]=Ie,r["_"+U+"shift"]=Ce}if(Ae){C.remove();return}var Ke=0,fr=0;if(r.align!=="left"&&(Ke=(j-pe)*(r.align==="center"?.5:1)),r.valign!=="top"&&(fr=(_e-ge)*(r.valign==="middle"?.5:1)),ie)Q.select("svg").attr({x:R+Ke-1,y:R+fr}).call(Ji.setClipUrl,F?g:null,e);else{var lr=R+fr-me.top,ze=R+Ke-me.left;J.call(y2.positionText,ze,lr).call(Ji.setClipUrl,F?g:null,e)}H.select("rect").call(Ji.setRect,R,R,j,_e),z.call(Ji.setRect,q/2,q/2,se-q,Se-q),C.call(Ji.setTranslate,Math.round(y.x.text-se/2),Math.round(y.y.text-Se/2)),T.attr({transform:"rotate("+w+","+y.x.text+","+y.y.text+")"});var ae=function(qe,ke){_.selectAll(".annotation-arrow-g").remove();var ir=y.x.head,vr=y.y.head,sr=y.x.tail+qe,Mr=y.y.tail+ke,Ur=y.x.text+qe,$r=y.y.text+ke,Vr=El.rotationXYMatrix(w,Ur,$r),St=El.apply2DTransform(Vr),ea=El.apply2DTransform2(Vr),ka=+z.attr("width"),ra=+z.attr("height"),pn=Ur-.5*ka,Ia=pn+ka,ta=$r-.5*ra,Ha=ta+ra,yr=[[pn,ta,pn,Ha],[pn,Ha,Ia,Ha],[Ia,Ha,Ia,ta],[Ia,ta,pn,ta]].map(ea);if(!yr.reduce(function(at,sa){return at^!!El.segmentsIntersect(ir,vr,ir+1e6,vr+1e6,sa[0],sa[1],sa[2],sa[3])},!1)){yr.forEach(function(at){var sa=El.segmentsIntersect(sr,Mr,ir,vr,at[0],at[1],at[2],at[3]);sa&&(sr=sa.x,Mr=sa.y)});var ot=r.arrowwidth,Wr=r.arrowcolor,mt=r.arrowside,Tt=_.append("g").style({opacity:Fo.opacity(Wr)}).classed("annotation-arrow-g",!0),st=Tt.append("path").attr("d","M"+sr+","+Mr+"L"+ir+","+vr).style("stroke-width",ot+"px").call(Fo.stroke,Fo.rgb(Wr));if(uj(st,mt,r),s.annotationPosition&&st.node().parentNode&&!a){var yt=ir,Ca=vr;if(r.standoff){var aa=Math.sqrt(Math.pow(ir-sr,2)+Math.pow(vr-Mr,2));yt+=r.standoff*(sr-ir)/aa,Ca+=r.standoff*(Mr-vr)/aa}var In=Tt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(sr-yt)+","+(Mr-Ca),transform:m2(yt,Ca)}).style("stroke-width",ot+6+"px").call(Fo.stroke,"rgba(0,0,0,0)").call(Fo.fill,"rgba(0,0,0,0)"),Hn,Wt;lc.init({element:In.node(),gd:e,prepFn:function(){var at=Ji.getTranslate(C);Hn=at.x,Wt=at.y,n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(at,sa){var Ul=St(Hn,Wt),Gl=Ul[0]+at,rl=Ul[1]+sa;C.call(Ji.setTranslate,Gl,rl),d("x",Dl(n,at,"x",o,r)),d("y",Dl(i,sa,"y",o,r)),r.axref===r.xref&&d("ax",Dl(n,at,"ax",o,r)),r.ayref===r.yref&&d("ay",Dl(i,sa,"ay",o,r)),Tt.attr("transform",m2(at,sa)),T.attr({transform:"rotate("+w+","+Gl+","+rl+")"})},doneFn:function(){p2.call("_guiRelayout",e,m());var at=document.querySelector(".js-notes-box-panel");at&&at.redraw(at.selectedObj)}})}}};if(r.showarrow&&ae(0,0),b){var oe;lc.init({element:C.node(),gd:e,prepFn:function(){oe=T.attr("transform")},moveFn:function(qe,ke){var ir="pointer";if(r.showarrow)r.axref===r.xref?d("ax",Dl(n,qe,"ax",o,r)):d("ax",r.ax+qe),r.ayref===r.yref?d("ay",Dl(i,ke,"ay",o.w,r)):d("ay",r.ay+ke),ae(qe,ke);else{if(a)return;var vr,sr;if(n)vr=Dl(n,qe,"x",o,r);else{var Mr=r._xsize/o.w,Ur=r.x+(r._xshift-r.xshift)/o.w-Mr/2;vr=lc.align(Ur+qe/o.w,Mr,0,1,r.xanchor)}if(i)sr=Dl(i,ke,"y",o,r);else{var $r=r._ysize/o.h,Vr=r.y-(r._yshift+r.yshift)/o.h-$r/2;sr=lc.align(Vr-ke/o.h,$r,0,1,r.yanchor)}d("x",vr),d("y",sr),(!n||!i)&&(ir=lc.getCursor(n?.5:vr,i?.5:sr,r.xanchor,r.yanchor))}T.attr({transform:m2(qe,ke)+oe}),g2(C,ir)},clickFn:function(qe,ke){r.captureevents&&e.emit("plotly_clickannotation",S(ke))},doneFn:function(){g2(C),p2.call("_guiRelayout",e,m());var qe=document.querySelector(".js-notes-box-panel");qe&&qe.redraw(qe.selectedObj)}})}}s.annotationText?J.call(y2.makeEditable,{delegate:C,gd:e}).call(B).on("edit",function(W){r.text=W,this.call(B),d("text",W),n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),p2.call("_guiRelayout",e,m())}):J.call(B)}});var XL=Z((Cfe,ZL)=>{"use strict";var UL=He(),cj=gr(),GL=ct().arrayEditor;ZL.exports={hasClickToShow:vj,onClick:hj};function vj(e,r){var t=WL(e,r);return t.on.length>0||t.explicitOff.length>0}function hj(e,r){var t=WL(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},l=e._fullLayout.annotations,o,s;if(a.length||n.length){for(o=0;o{"use strict";var b2=He(),uu=Er();JL.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),l=n("bordercolor"),o=uu.opacity(l);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),b2.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var v=n("arrowside"),h,d;v.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),v.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",o?t.bordercolor:uu.defaultLine),n("arrowwidth",(o&&s||1)*2),n("standoff"),n("startstandoff")}var m=n("hovertext"),g=a.hoverlabel||{};if(m){var y=n("hoverlabel.bgcolor",g.bgcolor||(uu.opacity(i)?uu.rgb(i):uu.defaultLine)),w=n("hoverlabel.bordercolor",g.bordercolor||uu.contrast(y)),_=b2.extendFlat({},g.font);_.color||(_.color=w),b2.coerceFont(n,"hoverlabel.font",_)}n("captureevents",!!m)}});var QL=Z((Lfe,KL)=>{"use strict";var _2=He(),Io=dt(),dj=Jn(),pj=x2(),mj=js();KL.exports=function(r,t){dj(r,t,{name:"annotations",handleItemDefaults:yj})};function yj(e,r,t){function a(T,b){return _2.coerce(e,r,mj,T,b)}var n=a("visible"),i=a("clicktoshow");if(n||i){pj(e,r,t,a);for(var l=r.showarrow,o=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var v=o[f],h=Io.coerceRef(e,r,u,v,"","paper");if(h!=="paper"){var d=Io.getFromId(u,h);d._annIndices.push(r._index)}if(Io.coercePosition(r,u,a,h,v,.5),l){var m="a"+v,g=Io.coerceRef(e,r,u,m,"pixel",["pixel","paper"]);g!=="pixel"&&g!==h&&(g=r[m]="pixel");var y=g==="pixel"?s[f]:.4;Io.coercePosition(r,u,a,g,m,y)}a(v+"anchor"),a(v+"shift")}if(_2.noneOrAll(e,r,["x","y"]),l&&_2.noneOrAll(e,r,["ax","ay"]),i){var w=a("xclick"),_=a("yclick");r._xclick=w===void 0?r.x:Io.cleanPosition(w,u,r.xref),r._yclick=_===void 0?r.y:Io.cleanPosition(_,u,r.yref)}}}});var eq=Z((qfe,jL)=>{"use strict";var w2=He(),Ho=dt(),gj=_d().draw;jL.exports=function(r){var t=r._fullLayout,a=w2.filterVisible(t.annotations);if(a.length&&r._fullData.length)return w2.syncOrAsync([gj,bj],r)};function bj(e){var r=e._fullLayout;w2.filterVisible(r.annotations).forEach(function(t){var a=Ho.getFromId(e,t.xref),n=Ho.getFromId(e,t.yref),i=Ho.getRefType(t.xref),l=Ho.getRefType(t.yref);t._extremes={},i==="range"&&$L(t,a),l==="range"&&$L(t,n)})}function $L(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],l=e[a+"ref"],o=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],v=3*e.arrowsize*e.arrowwidth||0,h=v+f,d=v-f,m=3*e.startarrowsize*e.arrowwidth||0,g=m+f,y=m-f,w;if(o===l){var _=Ho.findExtremes(r,[r.r2c(n)],{ppadplus:h,ppadminus:d}),T=Ho.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,g),ppadminus:Math.max(u,y)});w={min:[_.min[0],T.min[0]],max:[_.max[0],T.max[0]]}}else g=i?g+i:g,y=i?y-i:y,w=Ho.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,h,g),ppadminus:Math.max(u,d,y)});e._extremes[t]=w}});var tq=Z((Dfe,rq)=>{"use strict";var xj=Hr(),_j=vv();rq.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(!(i||l))return;var o=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function v(d){var m=u[d],g=null;i?g=_j(m,t.range):g=Math.pow(10,m),xj(g)||(g=null),n(f+d,g)}for(var h=0;h{"use strict";var T2=_d(),aq=XL();nq.exports={moduleType:"component",name:"annotations",layoutAttributes:js(),supplyLayoutDefaults:QL(),includeBasePlot:Yf()("annotations"),calcAutorange:eq(),draw:T2.draw,drawOne:T2.drawOne,drawRaw:T2.drawRaw,hasClickToShow:aq.hasClickToShow,onClick:aq.onClick,convertCoords:tq()}});var wd=Z((Pfe,lq)=>{"use strict";var ft=js(),wj=pi().overrideAll,Tj=ct().templatedArray;lq.exports=wj(Tj("annotation",{visible:ft.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:ft.xanchor,xshift:ft.xshift,yanchor:ft.yanchor,yshift:ft.yshift,text:ft.text,textangle:ft.textangle,font:ft.font,width:ft.width,height:ft.height,opacity:ft.opacity,align:ft.align,valign:ft.valign,bgcolor:ft.bgcolor,bordercolor:ft.bordercolor,borderpad:ft.borderpad,borderwidth:ft.borderwidth,showarrow:ft.showarrow,arrowcolor:ft.arrowcolor,arrowhead:ft.arrowhead,startarrowhead:ft.startarrowhead,arrowside:ft.arrowside,arrowsize:ft.arrowsize,startarrowsize:ft.startarrowsize,arrowwidth:ft.arrowwidth,standoff:ft.standoff,startstandoff:ft.startstandoff,hovertext:ft.hovertext,hoverlabel:ft.hoverlabel,captureevents:ft.captureevents}),"calc","from-root")});var sq=Z((Rfe,oq)=>{"use strict";var M2=He(),Mj=dt(),Aj=Jn(),kj=x2(),Cj=wd();oq.exports=function(r,t,a){Aj(r,t,{name:"annotations",handleItemDefaults:Sj,fullLayout:a.fullLayout})};function Sj(e,r,t,a){function n(o,s){return M2.coerce(e,r,Cj,o,s)}function i(o){var s=o+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],Mj.coercePosition(r,u,n,o,o,.5)}var l=n("visible");l&&(kj(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),M2.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),M2.noneOrAll(e,r,["ax","ay"])))}});var vq=Z((zfe,cq)=>{"use strict";var uq=He(),fq=dt();cq.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function A2(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function qj(e,r){var t=A2(e.projection,A2(e.view,A2(e.model,[r[0],r[1],r[2],1])));return t}hq.exports=qj});var mq=Z((Ffe,pq)=>{"use strict";var Dj=_d().drawRaw,Ej=dq(),Pj=["x","y","z"];pq.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){o=!0;break}}o?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(l._pdata=Ej(r.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),Dj(r.graphDiv,l,i,r.id,l._xa,l._ya))}}});var bq=Z((Ife,gq)=>{"use strict";var Rj=gr(),yq=He();gq.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:wd()}}},layoutAttributes:wd(),handleDefaults:sq(),includeBasePlot:zj,convert:vq(),draw:mq()};function zj(e,r){var t=Rj.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var xq=js(),_q=ha(),wq=qo().line,Nj=mi().dash,ii=Yt().extendFlat,Fj=ct().templatedArray,Hfe=Bf(),fu=Gn(),Ij=zi().shapeTexttemplateAttrs,Hj=kv();Tq.exports=Fj("shape",{visible:ii({},fu.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:ii({},fu.legend,{editType:"calc+arraydraw"}),legendgroup:ii({},fu.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:ii({},fu.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:_q({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:ii({},fu.legendrank,{editType:"calc+arraydraw"}),legendwidth:ii({},fu.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:ii({},xq.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:ii({},xq.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:ii({},wq.color,{editType:"arraydraw"}),width:ii({},wq.width,{editType:"calc+arraydraw"}),dash:ii({},Nj,{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:Ij({},{keys:Object.keys(Hj)}),font:_q({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 kq=Z((Bfe,Aq)=>{"use strict";var sc=He(),cu=dt(),Oj=Jn(),Bj=k2(),Mq=Al();Aq.exports=function(r,t){Oj(r,t,{name:"shapes",handleItemDefaults:Uj})};function Yj(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Uj(e,r,t){function a(W,K){return sc.coerce(e,r,Bj,W,K)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),sc.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),o=l?"path":"rect",s=a("type",o),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var v=a("xsizemode"),h=a("ysizemode"),d=["x","y"],m=0;m<2;m++){var g=d[m],y=g+"anchor",w=g==="x"?v:h,_={_fullLayout:t},T,b,M,S=cu.coerceRef(e,r,_,g,void 0,"paper"),C=cu.getRefType(S);if(C==="range"?(T=cu.getFromId(_,S),T._shapeIndices.push(r._index),M=Mq.rangeToShapePosition(T),b=Mq.shapePositionToRange(T),(T.type==="category"||T.type==="multicategory")&&(a(g+"0shift"),a(g+"1shift"))):b=M=sc.identity,u){var q=.25,D=.75,R=g+"0",z=g+"1",F=e[R],H=e[z];e[R]=b(e[R],!0),e[z]=b(e[z],!0),w==="pixel"?(a(R,0),a(z,10)):(cu.coercePosition(r,_,a,S,R,q),cu.coercePosition(r,_,a,S,z,D)),r[R]=M(r[R]),r[z]=M(r[z]),e[R]=F,e[z]=H}if(w==="pixel"){var O=e[y];e[y]=b(e[y],!0),cu.coercePosition(r,_,a,S,y,.25),r[y]=M(r[y]),e[y]=O}}u&&sc.noneOrAll(e,r,["x0","x1","y0","y1"]);var X=s==="line",J,B;if(u&&(J=a("label.texttemplate")),J||(B=a("label.text")),B||J){a("label.textangle");var I=a("label.textposition",X?"middle":"middle center");a("label.xanchor"),a("label.yanchor",Yj(X,I)),a("label.padding"),sc.coerceFont(a,"label.font",t.font)}}}});var Lq=Z((Yfe,Sq)=>{"use strict";var Gj=Er(),Cq=He();function Vj(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}Sq.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),Cq.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Gj.contrast(i)),a("newshape.line.dash")}var l=r.dragmode==="drawline",o=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(o||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",l?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Vj(l,u)),a("newshape.label.padding"),Cq.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var Rq=Z((Ufe,Pq)=>{"use strict";var C2=He(),vu=dt(),hu=_f(),Dq=Al();Pq.exports=function(r){var t=r._fullLayout,a=C2.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+l:l;return{ppad:l,ppadplus:o?v:h,ppadminus:o?h:v}}else return{ppad:l}}function qq(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,l,o=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],l=r[a+"1"],n&&(o=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],l=r[a+"anchor"]),i!==void 0)return[u(i)+o,u(l)+s];if(r.path){var v=1/0,h=-1/0,d=r.path.match(hu.segmentRE),m,g,y,w,_;for(e.type==="date"&&(u=Dq.decodeDate(u)),m=0;mh&&(h=_)));if(h>=v)return[v,h]}}});var Fq=Z((Gfe,Nq)=>{"use strict";var zq=hh();Nq.exports={moduleType:"component",name:"shapes",layoutAttributes:k2(),supplyLayoutDefaults:kq(),supplyDrawNewShapeDefaults:Lq(),includeBasePlot:Yf()("shapes"),calcAutorange:Rq(),draw:zq.draw,drawOne:zq.drawOne}});var S2=Z((Wfe,Hq)=>{"use strict";var Iq=da(),Xj=ct().templatedArray,Vfe=Bf();Hq.exports=Xj("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",Iq.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",Iq.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Bq=Z((Zfe,Oq)=>{"use strict";var Jj=He(),L2=dt(),Kj=Jn(),Qj=S2(),$j="images";Oq.exports=function(r,t){var a={name:$j,handleItemDefaults:jj};Kj(r,t,a)};function jj(e,r,t){function a(h,d){return Jj.coerce(e,r,Qj,h,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:t},o=["x","y"],s=0;s<2;s++){var u=o[s],f=L2.coerceRef(e,r,l,u,"paper",void 0);if(f!=="paper"){var v=L2.getFromId(l,f);v._imgIndices.push(r._index)}L2.coercePosition(r,l,a,f,u,0)}return r}});var Vq=Z((Xfe,Gq)=>{"use strict";var Yq=Ir(),eee=tt(),du=dt(),Uq=Xt(),ree=fo();Gq.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],l,o;for(o=0;o{"use strict";var Wq=Hr(),tee=vv();Zq.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(i||l){for(var o=r._fullLayout.images,s=t._id.charAt(0),u,f,v=0;v{"use strict";Jq.exports={moduleType:"component",name:"images",layoutAttributes:S2(),supplyLayoutDefaults:Bq(),includeBasePlot:Yf()("images"),draw:Vq(),convertCoords:Xq()}});var Td=Z((Qfe,Qq)=>{"use strict";Qq.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 q2=Z(($fe,jq)=>{"use strict";var aee=ha(),nee=hi(),iee=Yt().extendFlat,lee=pi().overrideAll,oee=Cv(),$q=ct().templatedArray,see=$q("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}});jq.exports=lee($q("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:see,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:iee(oee({editType:"arraydraw"}),{}),font:aee({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:nee.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var aD=Z((jfe,tD)=>{"use strict";var Md=He(),eD=Jn(),rD=q2(),uee=Td(),fee=uee.name,cee=rD.buttons;tD.exports=function(r,t){var a={name:fee,handleItemDefaults:vee};eD(r,t,a)};function vee(e,r,t){function a(l,o){return Md.coerce(e,r,rD,l,o)}var n=eD(e,r,{name:"buttons",handleItemDefaults:hee}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Md.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Md.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function hee(e,r){function t(n,i){return Md.coerce(e,r,cee,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var lD=Z((ece,iD)=>{"use strict";iD.exports=xt;var li=Ir(),nD=Er(),pu=tt(),Ad=He();function xt(e,r,t){this.gd=e,this.container=r,this.id=t,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})}xt.barWidth=2;xt.barLength=20;xt.barRadius=2;xt.barPad=1;xt.barColor="#808BA4";xt.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,l=n.height;this.position=r;var o=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,v=this.position.direction,h=v==="down",d=v==="left",m=v==="right",g=v==="up",y=s,w=f,_,T,b,M;!h&&!d&&!m&&!g&&(this.position.direction="down",h=!0);var S=h||g;S?(_=o,T=_+y,h?(b=u,M=Math.min(b+w,l),w=M-b):(M=u+w,b=Math.max(M-w,0),w=M-b)):(b=u,M=b+w,d?(T=o+y,_=Math.max(T-y,0),y=T-_):(_=o,T=Math.min(_+y,i),y=T-_)),this._box={l:_,t:b,w:y,h:w};var C=s>y,q=xt.barLength+2*xt.barPad,D=xt.barWidth+2*xt.barPad,R=o,z=u+f;z+D>l&&(z=l-D);var F=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(nD.fill,xt.barColor),C?(this.hbar=F.attr({rx:xt.barRadius,ry:xt.barRadius,x:R,y:z,width:q,height:D}),this._hbarXMin=R+q/2,this._hbarTranslateMax=y-q):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var H=f>w,O=xt.barWidth+2*xt.barPad,X=xt.barLength+2*xt.barPad,J=o+s,B=u;J+O>i&&(J=i-O);var I=this.container.selectAll("rect.scrollbar-vertical").data(H?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(nD.fill,xt.barColor),H?(this.vbar=I.attr({rx:xt.barRadius,ry:xt.barRadius,x:J,y:B,width:O,height:X}),this._vbarYMin=B+X/2,this._vbarTranslateMax=w-X):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,K=_-.5,Q=H?T+O+.5:T+.5,ie=b-.5,me=C?M+D+.5:M+.5,pe=n._topdefs.selectAll("#"+W).data(C||H?[0]:[]);if(pe.exit().remove(),pe.enter().append("clipPath").attr("id",W).append("rect"),C||H?(this._clipRect=pe.select("rect").attr({x:Math.floor(K),y:Math.floor(ie),width:Math.ceil(Q)-Math.floor(K),height:Math.ceil(me)-Math.floor(ie)}),this.container.call(pu.setClipUrl,W,this.gd),this.bg.attr({x:o,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(pu.setClipUrl,null),delete this._clipRect),C||H){var ge=li.behavior.drag().on("dragstart",function(){li.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ge);var j=li.behavior.drag().on("dragstart",function(){li.event.sourceEvent.preventDefault(),li.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(j),H&&this.vbar.on(".drag",null).call(j)}this.setTranslate(t,a)};xt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(pu.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)};xt.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=li.event.dx),this.vbar&&(t-=li.event.dy),this.setTranslate(r,t)};xt.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=li.event.deltaY),this.vbar&&(t+=li.event.deltaY),this.setTranslate(r,t)};xt.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=Ad.constrain(li.event.x,a,n),l=(i-a)/(n-a),o=this.position.w-this._box.w;r=l*o}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=Ad.constrain(li.event.y,s,u),v=(f-s)/(u-s),h=this.position.h-this._box.h;t=v*h}this.setTranslate(r,t)};xt.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=Ad.constrain(r||0,0,a),t=Ad.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(pu.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(pu.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(pu.setTranslate,r,t+l*this._vbarTranslateMax)}}});var mD=Z((rce,pD)=>{"use strict";var mu=Ir(),uc=Pt(),fc=Er(),yu=tt(),hn=He(),kd=xa(),dee=ct().arrayEditor,sD=Da().LINE_SPACING,_r=Td(),pee=lD();pD.exports=function(r){var t=r._fullLayout,a=hn.filterVisible(t[_r.name]);function n(h){uc.autoMargin(r,hD(h))}var i=t._menulayer.selectAll("g."+_r.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(_r.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){mu.select(this).selectAll("g."+_r.headerGroupClassName).each(n)}).remove(),a.length!==0){var l=i.selectAll("g."+_r.headerGroupClassName).data(a,mee);l.enter().append("g").classed(_r.headerGroupClassName,!0);for(var o=hn.ensureSingle(i,"g",_r.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var Tee=Td();yD.exports={moduleType:"component",name:Tee.name,layoutAttributes:q2(),supplyLayoutDefaults:aD(),draw:mD()}});var vc=Z((ace,bD)=>{"use strict";bD.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 R2=Z((nce,wD)=>{"use strict";var xD=ha(),Mee=Cv(),Aee=Yt().extendDeepAll,kee=pi().overrideAll,Cee=Vu(),_D=ct().templatedArray,Oo=vc(),See=_D("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}});wD.exports=kee(_D("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:See,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:Aee(Mee({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:Cee.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:xD({})},font:xD({}),activebgcolor:{valType:"color",dflt:Oo.gripBgActiveColor},bgcolor:{valType:"color",dflt:Oo.railBgColor},bordercolor:{valType:"color",dflt:Oo.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Oo.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Oo.tickLength},tickcolor:{valType:"color",dflt:Oo.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Oo.minorTickLength}}),"arraydraw","from-root")});var kD=Z((ice,AD)=>{"use strict";var gu=He(),TD=Jn(),MD=R2(),Lee=vc(),qee=Lee.name,Dee=MD.steps;AD.exports=function(r,t){TD(r,t,{name:qee,handleItemDefaults:Eee})};function Eee(e,r,t){function a(v,h){return gu.coerce(e,r,MD,v,h)}for(var n=TD(e,r,{name:"steps",handleItemDefaults:Pee}),i=0,l=0;l{"use strict";var oi=Ir(),Cd=Pt(),Pl=Er(),si=tt(),dn=He(),Ree=dn.strTranslate,hc=xa(),zee=ct().arrayEditor,Dr=vc(),F2=Da(),LD=F2.LINE_SPACING,z2=F2.FROM_TL,N2=F2.FROM_BR;zD.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=Nee(a,r),i=a._infolayer.selectAll("g."+Dr.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Dr.containerClassName,!0).style("cursor",t?null:"ew-resize");function l(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Cd.autoMargin(r,qD(f))}if(i.exit().each(function(){oi.select(this).selectAll("g."+Dr.groupClassName).each(l)}).remove(),n.length!==0){var o=i.selectAll("g."+Dr.groupClassName).data(n,Fee);o.enter().append("g").classed(Dr.groupClassName,!0),o.exit().each(l).remove();for(var s=0;s0&&(o=o.transition().duration(r.transition.duration).ease(r.transition.easing)),o.attr("transform",Ree(l-Dr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function I2(e,r){var t=e._dims;return t.inputAreaStart+Dr.stepInset+(t.inputAreaLength-2*Dr.stepInset)*Math.min(1,Math.max(0,r))}function SD(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Dr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Dr.stepInset-2*t.inputAreaStart)))}function Gee(e,r,t){var a=t._dims,n=dn.ensureSingle(e,"rect",Dr.railTouchRectClass,function(i){i.call(PD,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Dr.tickOffset+t.ticklen+a.labelHeight)}).call(Pl.fill,t.bgcolor).attr("opacity",0),si.setTranslate(n,0,a.currentValueTotalHeight)}function Vee(e,r){var t=r._dims,a=t.inputAreaLength-Dr.railInset*2,n=dn.ensureSingle(e,"rect",Dr.railRectClass);n.attr({width:a,height:Dr.railWidth,rx:Dr.railRadius,ry:Dr.railRadius,"shape-rendering":"crispEdges"}).call(Pl.stroke,r.bordercolor).call(Pl.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),si.setTranslate(n,Dr.railInset,(t.inputAreaWidth-Dr.railWidth)*.5+t.currentValueTotalHeight)}});var ID=Z((oce,FD)=>{"use strict";var Wee=vc();FD.exports={moduleType:"component",name:Wee.name,layoutAttributes:R2(),supplyLayoutDefaults:kD(),draw:ND()}});var Ld=Z((sce,OD)=>{"use strict";var HD=hi();OD.exports={bgcolor:{valType:"color",dflt:HD.background,editType:"plot"},bordercolor:{valType:"color",dflt:HD.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 H2=Z((uce,BD)=>{"use strict";BD.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 qd=Z((fce,YD)=>{"use strict";YD.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 VD=Z(Ed=>{"use strict";var Zee=Xt(),Xee=xa(),UD=qd(),Jee=Da().LINE_SPACING,Dd=UD.name;function GD(e){var r=e&&e[Dd];return r&&r.visible}Ed.isVisible=GD;Ed.makeData=function(e){for(var r=Zee.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var Pd=He(),WD=ct(),ZD=Xt(),Kee=Ld(),Qee=H2();XD.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;Pd.isPlainObject(n.rangeslider)||(n.rangeslider={});var l=n.rangeslider,o=WD.newContainer(i,"rangeslider");function s(M,S){return Pd.coerce(l,o,Kee,M,S)}var u,f;function v(M,S){return Pd.coerce(u,f,Qee,M,S)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(l.range)),s("range");var d=t._subplots;if(d)for(var m=d.cartesian.filter(function(M){return M.substr(0,M.indexOf("y"))===ZD.name2id(a)}).map(function(M){return M.substr(M.indexOf("y"),M.length)}),g=Pd.simpleMap(m,ZD.id2name),y=0;y{"use strict";var $ee=Xt().list,jee=ff().getAutoRange,ere=qd();KD.exports=function(r){for(var t=$ee(r,"x",!0),a=0;a{"use strict";var Rd=Ir(),rre=gr(),tre=Pt(),Ct=He(),zd=Ct.strTranslate,jD=tt(),Rl=Er(),are=sf(),nre=bd(),O2=Xt(),ire=Qn(),lre=wl(),Fr=qd();eE.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=I.max)J=z[B+1];else if(X=I.pmax)J=z[B+1];else if(X0?e.touches[0].clientX:0}function ore(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Fr.slideBoxClassName).node(),i=e.select("rect."+Fr.grabAreaMinClassName).node(),l=e.select("rect."+Fr.grabAreaMaxClassName).node();function o(){var s=Rd.event,u=s.target,f=$D(s),v=f-e.node().getBoundingClientRect().left,h=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),m=ire.coverSlip();this.addEventListener("touchmove",g),this.addEventListener("touchend",y),m.addEventListener("mousemove",g),m.addEventListener("mouseup",y);function g(w){var _=$D(w),T=+_-f,b,M,S;switch(u){case n:if(S="ew-resize",h+T>t._length||d+T<0)return;b=h+T,M=d+T;break;case i:if(S="col-resize",h+T>t._length)return;b=h+T,M=d;break;case l:if(S="col-resize",d+T<0)return;b=h,M=d+T;break;default:S="ew-resize",b=v,M=v+T;break}if(M{"use strict";var yre=He(),gre=Ld(),bre=H2(),B2=VD();tE.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:yre.extendFlat({},gre,{yaxis:bre})}}},layoutAttributes:Ld(),handleDefaults:JD(),calcAutorange:QD(),draw:rE(),isVisible:B2.isVisible,makeData:B2.makeData,autoMarginOpts:B2.autoMarginOpts}});var Nd=Z((mce,iE)=>{"use strict";var xre=ha(),nE=hi(),_re=ct().templatedArray,wre=_re("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"});iE.exports={visible:{valType:"boolean",editType:"plot"},buttons:wre,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:xre({editType:"plot"}),bgcolor:{valType:"color",dflt:nE.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:nE.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var Y2=Z((yce,lE)=>{"use strict";lE.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var uE=Z((gce,sE)=>{"use strict";var Fd=He(),Tre=Er(),Mre=ct(),Are=Jn(),oE=Nd(),U2=Y2();sE.exports=function(r,t,a,n,i){var l=r.rangeselector||{},o=Mre.newContainer(t,"rangeselector");function s(d,m){return Fd.coerce(l,o,oE,d,m)}var u=Are(l,o,{name:"buttons",handleItemDefaults:kre,calendar:i}),f=s("visible",u.length>0);if(f){var v=Cre(t,a,n);s("x",v[0]),s("y",v[1]),Fd.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Fd.coerceFont(s,"font",a.font);var h=s("bgcolor");s("activecolor",Tre.contrast(h,U2.lightAmount,U2.darkAmount)),s("bordercolor"),s("borderwidth")}};function kre(e,r,t,a){var n=a.calendar;function i(s,u){return Fd.coerce(e,r,oE.buttons,s,u)}var l=i("visible");if(l){var o=i("step");o!=="all"&&(n&&n!=="gregorian"&&(o==="month"||o==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function Cre(e,r,t){for(var a=t.filter(function(o){return r[o].anchor===e._id}),n=0,i=0;i{"use strict";var Sre=H1(),Lre=He().titleCase;fE.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=qre(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function qre(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=Sre["utc"+Lre(n)],l=r.count,o;switch(r.stepmode){case"backward":o=e.l2r(+i.offset(a,-l));break;case"todate":var s=i.offset(a,-l);o=e.l2r(+i.ceil(s));break}var u=t[1];return[o,u]}});var bE=Z((xce,gE)=>{"use strict";var Hd=Ir(),Dre=gr(),Ere=Pt(),vE=Er(),yE=tt(),Ki=He(),hE=Ki.strTranslate,Id=xa(),Pre=Xt(),W2=Da(),dE=W2.LINE_SPACING,pE=W2.FROM_TL,mE=W2.FROM_BR,V2=Y2(),Rre=cE();gE.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(zre(r),Nre);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=Hd.select(this),l=n,o=l.rangeselector,s=i.selectAll("g.button").data(Ki.filterVisible(o.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Hd.select(this),v=Rre(l,u);u._isActive=Fre(l,u,v),f.call(G2,o,u),f.call(Hre,o,u,r),f.on("click",function(){r._dragged||Dre.call("_guiRelayout",r,v)}),f.on("mouseover",function(){u._isHovered=!0,f.call(G2,o,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(G2,o,u)})}),Bre(r,s,o,l._name,i)})};function zre(e){for(var r=Pre.list(e,"x",!0),t=[],a=0;a{"use strict";xE.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Nd()}}},layoutAttributes:Nd(),handleDefaults:uE(),draw:bE()}});var Od=Z(Z2=>{"use strict";var wE=Yt().extendFlat;Z2.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",l={x:wE({},t,{}),y:wE({},t,{}),editType:e.editType};return e.noGridCell||(l.row={valType:"integer",min:0,dflt:0,editType:e.editType},l.column={valType:"integer",min:0,dflt:0,editType:e.editType}),l};Z2.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],l=r.grid;if(l){var o=t("domain.column");o!==void 0&&(o{"use strict";var Yre=He(),Ure=cs().counter,Gre=Od().attributes,TE=da().idRegex,Vre=ct(),X2={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:[Ure("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[TE.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[TE.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:Gre({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 Bd(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function Wre(e,r){var t=e.grid||{},a=Bd(r,t,"x"),n=Bd(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),l=Array.isArray(a),o=Array.isArray(n),s=l&&a!==t.xaxes&&o&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(o&&(u=n.length),l&&(f=a.length));var v=Vre.newContainer(r,"grid");function h(S,C){return Yre.coerce(t,v,X2,S,C)}var d=h("rows",u),m=h("columns",f);if(!(d*m>1)){delete r.grid;return}if(!i&&!l&&!o){var g=h("pattern")==="independent";g&&(i=!0)}v._hasSubplotGrid=i;var y=h("roworder"),w=y==="top to bottom",_=i?.2:.1,T=i?.3:.1,b,M;s&&r._splomGridDflt&&(b=r._splomGridDflt.xside,M=r._splomGridDflt.yside),v._domains={x:ME("x",h,_,b,m),y:ME("y",h,T,M,d,w)}}function ME(e,r,t,a,n,i){var l=r(e+"gap",t),o=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=o[0],f=(o[1]-u)/(n-l),v=f*(1-l),h=0;h{"use strict";SE.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 DE=Z((Ace,qE)=>{"use strict";var LE=Hr(),Xre=gr(),Jre=He(),Kre=ct(),Qre=J2();qE.exports=function(e,r,t,a){var n="error_"+a.axis,i=Kre.newContainer(r,n),l=e[n]||{};function o(m,g){return Jre.coerce(l,i,Qre,m,g)}var s=l.array!==void 0||l.value!==void 0||l.type==="sqrt",u=o("visible",s);if(u!==!1){var f=o("type","array"in l?"data":"percent"),v=!0;f!=="sqrt"&&(v=o("symmetric",!((f==="data"?"arrayminus":"valueminus")in l))),f==="data"?(o("array"),o("traceref"),v||(o("arrayminus"),o("tracerefminus"))):(f==="percent"||f==="constant")&&(o("value"),v||o("valueminus"));var h="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&o(h,!(l.color||LE(l.thickness)||LE(l.width)))}(!a.inherit||!i[h])&&(o("color",t),o("thickness"),o("width",Xre.traceIs(r,"gl3d")?0:4))}}});var K2=Z((kce,PE)=>{"use strict";PE.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var v=+n[f];return[v,v]};var i=r.arrayminus||[];return function(u,f){var v=+n[f],h=+i[f];return!isNaN(v)||!isNaN(h)?[h||0,v||0]:[NaN,NaN]}}else{var l=EE(t,r.value),o=EE(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=l(u);return[f,f]}:function(u){return[o(u),l(u)]}}};function EE(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var NE=Z((Cce,zE)=>{"use strict";var Q2=Hr(),$re=gr(),$2=dt(),jre=He(),ete=K2();zE.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var FE=Ir(),zl=Hr(),rte=tt(),tte=on();IE.exports=function(r,t,a,n){var i,l=a.xaxis,o=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var v=f[0].trace,h=v.error_x||{},d=v.error_y||{},m;v.ids&&(m=function(_){return _.id});var g=tte.hasMarkers(v)&&v.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var y=FE.select(this).selectAll("g.errorbar").data(f,m);if(y.exit().remove(),!!f.length){h.visible||y.selectAll("path.xerror").remove(),d.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var w=y.enter().append("g").classed("errorbar",!0);s&&w.style("opacity",0).transition().duration(n.duration).style("opacity",1),rte.setClipUrl(y,a.layerClipId,r),y.each(function(_){var T=FE.select(this),b=ate(_,l,o);if(!(g&&!_.vis)){var M,S=T.select("path.yerror");if(d.visible&&zl(b.x)&&zl(b.yh)&&zl(b.ys)){var C=d.width;M="M"+(b.x-C)+","+b.yh+"h"+2*C+"m-"+C+",0V"+b.ys,b.noYS||(M+="m-"+C+",0h"+2*C),i=!S.size(),i?S=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(S=S.transition().duration(n.duration).ease(n.easing)),S.attr("d",M)}else S.remove();var q=T.select("path.xerror");if(h.visible&&zl(b.y)&&zl(b.xh)&&zl(b.xs)){var D=(h.copy_ystyle?d:h).width;M="M"+b.xh+","+(b.y-D)+"v"+2*D+"m0,-"+D+"H"+b.xs,b.noXS||(M+="m0,-"+D+"v"+2*D),i=!q.size(),i?q=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(q=q.transition().duration(n.duration).ease(n.easing)),q.attr("d",M)}else q.remove()}})}})};function ate(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),zl(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),zl(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var YE=Z((Lce,BE)=>{"use strict";var nte=Ir(),OE=Er();BE.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},l=nte.select(this);l.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(OE.stroke,n.color),i.copy_ystyle&&(i=n),l.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(OE.stroke,i.color)})}});var VE=Z((qce,GE)=>{"use strict";var dc=He(),UE=pi().overrideAll,pc=J2(),Bo={error_x:dc.extendFlat({},pc),error_y:dc.extendFlat({},pc)};delete Bo.error_x.copy_zstyle;delete Bo.error_y.copy_zstyle;delete Bo.error_y.copy_ystyle;var mc={error_x:dc.extendFlat({},pc),error_y:dc.extendFlat({},pc),error_z:dc.extendFlat({},pc)};delete mc.error_x.copy_ystyle;delete mc.error_y.copy_ystyle;delete mc.error_z.copy_ystyle;delete mc.error_z.copy_zstyle;GE.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Bo,bar:Bo,histogram:Bo,scatter3d:UE(mc,"calc","nested"),scattergl:UE(Bo,"calc","nested")}},supplyDefaults:DE(),calc:NE(),makeComputeError:K2(),plot:HE(),style:YE(),hoverInfo:ite};function ite(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var ZE=Z((Dce,WE)=>{"use strict";WE.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 eP=Z((Ece,jE)=>{"use strict";var Nl=Ir(),j2=bn(),Ud=Pt(),XE=gr(),Qi=dt(),Yd=Qn(),Nn=He(),fi=Nn.strTranslate,$E=Yt().extendFlat,e3=wl(),ui=tt(),r3=Er(),lte=sf(),ote=xa(),ste=Tn().flipScale,ute=f2(),fte=c2(),cte=Xn(),t3=Da(),JE=t3.LINE_SPACING,KE=t3.FROM_TL,QE=t3.FROM_BR,bt=ZE().cn;function vte(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+bt.colorbar).data(hte(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(bt.colorbar,!0),t.each(function(a){var n=Nl.select(this);Nn.ensureSingle(n,"rect",bt.cbbg),Nn.ensureSingle(n,"g",bt.cbfills),Nn.ensureSingle(n,"g",bt.cblines),Nn.ensureSingle(n,"g",bt.cbaxis,function(l){l.classed(bt.crisp,!0)}),Nn.ensureSingle(n,"g",bt.cbtitleunshift,function(l){l.append("g").classed(bt.cbtitle,!0)}),Nn.ensureSingle(n,"rect",bt.cboutline);var i=dte(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&pte(n,a,e)}),t.exit().each(function(a){Ud.autoMargin(e,a._id)}).remove(),t.order()}function hte(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,l,o;function s(T){return $E(T,{_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 o.calc=="function"?o.calc(e,l,n):(n._fillgradient=i.reversescale?ste(i.colorscale):i.colorscale,n._zrange=[i[o.min],i[o.max]])}for(var f=0;f1){var re=Math.pow(10,Math.floor(Math.log(Y)/Math.LN10));ve*=re*Nn.roundUp(Y/re,[2,5,10]),(Math.abs(F.start)/F.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ve}se.domain=a?[j+m/b.h,j+W-m/b.h]:[j+d/b.w,j+W-d/b.w],se.setScale(),e.attr("transform",fi(Math.round(b.l),Math.round(b.t)));var U=e.select("."+bt.cbtitleunshift).attr("transform",fi(-Math.round(b.l),-Math.round(b.t))),de=se.ticklabelposition,be=se.title.font.size,ye=e.select("."+bt.cbaxis),Fe,Re=0,Pe=0;function Ie(We,ne){var Me={propContainer:se,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:T._dfltTitle.colorbar,containerGroup:e.select("."+bt.cbtitle)},Ce=We.charAt(0)==="h"?We.substr(1):"h"+We;e.selectAll("."+Ce+",."+Ce+"-math-group").remove(),lte.draw(t,We,$E(Me,ne||{}))}function Be(){if(a&&Se||!a&&!Se){var We,ne;q==="top"&&(We=d+b.l+K*g,ne=m+b.t+Q*(1-j-W)+3+be*.75),q==="bottom"&&(We=d+b.l+K*g,ne=m+b.t+Q*(1-j)-3-be*.25),q==="right"&&(ne=m+b.t+Q*y+3+be*.75,We=d+b.l+K*j),Ie(se._id+"title",{attributes:{x:We,y:ne,"text-anchor":a?"start":"middle"}})}}function Ne(){if(a&&!Se||!a&&Se){var We=se.position||0,ne=se._offset+se._length/2,Me,Ce;if(q==="right")Ce=ne,Me=b.l+K*We+10+be*(se.showticklabels?1:.5);else if(Me=ne,q==="bottom"&&(Ce=b.t+Q*We+10+(de.indexOf("inside")===-1?se.tickfont.size:0)+(se.ticks!=="intside"&&r.ticklen||0)),q==="top"){var cr=C.text.split("
").length;Ce=b.t+Q*We+10-J-JE*be*cr}Ie((a?"h":"v")+se._id+"title",{avoid:{selection:Nl.select(t).selectAll("g."+se._id+"tick"),side:q,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?T.width:T.height},attributes:{x:Me,y:Ce,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Ee(){if(!a&&!Se||a&&Se){var We=e.select("."+bt.cbtitle),ne=We.select("text"),Me=[-s/2,s/2],Ce=We.select(".h"+se._id+"title-math-group").node(),cr=15.6;ne.node()&&(cr=parseInt(ne.node().style.fontSize,10)*JE);var tr;if(Ce?(tr=ui.bBox(Ce),Pe=tr.width,Re=tr.height,Re>cr&&(Me[1]-=(Re-cr)/2)):ne.node()&&!ne.classed(bt.jsPlaceholder)&&(tr=ui.bBox(ne.node()),Pe=tr.width,Re=tr.height),a){if(Re){if(Re+=5,q==="top")se.domain[1]-=Re/b.h,Me[1]*=-1;else{se.domain[0]+=Re/b.h;var De=ote.lineCount(ne);Me[1]+=(1-De)*cr}We.attr("transform",fi(Me[0],Me[1])),se.setScale()}}else Pe&&(q==="right"&&(se.domain[0]+=(Pe+be/2)/b.w),We.attr("transform",fi(Me[0],Me[1])),se.setScale())}e.selectAll("."+bt.cbfills+",."+bt.cblines).attr("transform",a?fi(0,Math.round(b.h*(1-se.domain[1]))):fi(Math.round(b.w*se.domain[0]),0)),ye.attr("transform",a?fi(0,Math.round(-b.t)):fi(Math.round(-b.l),0));var Le=e.select("."+bt.cbfills).selectAll("rect."+bt.cbfill).attr("style","").data(O);Le.enter().append("rect").classed(bt.cbfill,!0).attr("style",""),Le.exit().remove();var Ye=D.map(se.c2p).map(Math.round).sort(function(fr,lr){return fr-lr});Le.each(function(fr,lr){var ze=[lr===0?D[0]:(O[lr]+O[lr-1])/2,lr===O.length-1?D[1]:(O[lr]+O[lr+1])/2].map(se.c2p).map(Math.round);a&&(ze[1]=Nn.constrain(ze[1]+(ze[1]>ze[0])?1:-1,Ye[0],Ye[1]));var ae=Nl.select(this).attr(a?"x":"y",ie).attr(a?"y":"x",Nl.min(ze)).attr(a?"width":"height",Math.max(J,2)).attr(a?"height":"width",Math.max(Nl.max(ze)-Nl.min(ze),2));if(r._fillgradient)ui.gradient(ae,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var oe=z(fr).replace("e-","");ae.attr("fill",j2(oe).toHexString())}});var Ze=e.select("."+bt.cblines).selectAll("path."+bt.cbline).data(S.color&&S.width?X:[]);Ze.enter().append("path").classed(bt.cbline,!0),Ze.exit().remove(),Ze.each(function(fr){var lr=ie,ze=Math.round(se.c2p(fr))+S.width/2%1;Nl.select(this).attr("d","M"+(a?lr+","+ze:ze+","+lr)+(a?"h":"v")+J).call(ui.lineGroupStyle,S.width,R(fr),S.dash)}),ye.selectAll("g."+se._id+"tick,path").remove();var Ue=ie+J+(s||0)/2-(r.ticks==="outside"?1:0),Oe=Qi.calcTicks(se),Ke=Qi.getTickSigns(se)[2];return Qi.drawTicks(t,se,{vals:se.ticks==="inside"?Qi.clipEnds(se,Oe):Oe,layer:ye,path:Qi.makeTickPath(se,Ue,Ke),transFn:Qi.makeTransTickFn(se)}),Qi.drawLabels(t,se,{vals:Oe,layer:ye,transFn:Qi.makeTransTickLabelFn(se),labelFns:Qi.makeLabelFns(se,Ue)})}function Je(){var We,ne=J+s/2;de.indexOf("inside")===-1&&(We=ui.bBox(ye.node()),ne+=a?We.width:We.height),Fe=U.select("text");var Me=0,Ce=a&&q==="top",cr=!a&&q==="right",tr=0;if(Fe.node()&&!Fe.classed(bt.jsPlaceholder)){var De,Le=U.select(".h"+se._id+"title-math-group").node();Le&&(a&&Se||!a&&!Se)?(We=ui.bBox(Le),Me=We.width,De=We.height):(We=ui.bBox(U.node()),Me=We.right-b.l-(a?ie:_e),De=We.bottom-b.t-(a?_e:ie),!a&&q==="top"&&(ne+=We.height,tr=We.height)),cr&&(Fe.attr("transform",fi(Me/2+be/2,0)),Me*=2),ne=Math.max(ne,a?Me:De)}var Ye=(a?d:m)*2+ne+u+s/2,Ze=0;!a&&C.text&&h==="bottom"&&y<=0&&(Ze=Ye/2,Ye+=Ze,tr+=Ze),T._hColorbarMoveTitle=Ze,T._hColorbarMoveCBTitle=tr;var Ue=u+s,Oe=(a?ie:_e)-Ue/2-(a?d:0),Ke=(a?_e:ie)-(a?I:m+tr-Ze);e.select("."+bt.cbbg).attr("x",Oe).attr("y",Ke).attr(a?"width":"height",Math.max(Ye-Ze,2)).attr(a?"height":"width",Math.max(I+Ue,2)).call(r3.fill,f).call(r3.stroke,r.bordercolor).style("stroke-width",u);var fr=cr?Math.max(Me-10,0):0;e.selectAll("."+bt.cboutline).attr("x",(a?ie:_e+d)+fr).attr("y",(a?_e+m-I:ie)+(Ce?Re:0)).attr(a?"width":"height",Math.max(J,2)).attr(a?"height":"width",Math.max(I-(a?2*m+Re:2*d+fr),2)).call(r3.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var lr=a?me*Ye:0,ze=a?0:(1-pe)*Ye-tr;if(lr=_?b.l-lr:-lr,ze=w?b.t-ze:-ze,e.attr("transform",fi(lr,ze)),!a&&(u||j2(f).getAlpha()&&!j2.equals(T.paper_bgcolor,f))){var ae=ye.selectAll("text"),oe=ae[0].length,qe=e.select("."+bt.cbbg).node(),ke=ui.bBox(qe),ir=ui.getTranslate(e),vr=2;ae.each(function(pn,Ia){var ta=0,Ha=oe-1;if(Ia===ta||Ia===Ha){var yr=ui.bBox(this),ot=ui.getTranslate(this),Wr;if(Ia===Ha){var mt=yr.right+ot.x,Tt=ke.right+ir.x+_e-u-vr+g;Wr=Tt-mt,Wr>0&&(Wr=0)}else if(Ia===ta){var st=yr.left+ot.x,yt=ke.left+ir.x+_e+u+vr;Wr=yt-st,Wr<0&&(Wr=0)}Wr&&(oe<3?this.setAttribute("transform","translate("+Wr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var sr={},Mr=KE[v],Ur=QE[v],$r=KE[h],Vr=QE[h],St=Ye-J;a?(i==="pixels"?(sr.y=y,sr.t=I*$r,sr.b=I*Vr):(sr.t=sr.b=0,sr.yt=y+n*$r,sr.yb=y-n*Vr),o==="pixels"?(sr.x=g,sr.l=Ye*Mr,sr.r=Ye*Ur):(sr.l=St*Mr,sr.r=St*Ur,sr.xl=g-l*Mr,sr.xr=g+l*Ur)):(i==="pixels"?(sr.x=g,sr.l=I*Mr,sr.r=I*Ur):(sr.l=sr.r=0,sr.xl=g+n*Mr,sr.xr=g-n*Ur),o==="pixels"?(sr.y=1-y,sr.t=Ye*$r,sr.b=Ye*Vr):(sr.t=St*$r,sr.b=St*Vr,sr.yt=y-l*$r,sr.yb=y+l*Vr));var ea=r.y<.5?"b":"t",ka=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var ra={r:T.width-Oe-lr,l:Oe+sr.r,b:T.height-Ke-ze,t:Ke+sr.b};_&&w?Ud.autoMargin(t,r._id,sr):_?t._fullLayout._reservedMargin[r._id][ea]=ra[ea]:w||a?t._fullLayout._reservedMargin[r._id][ka]=ra[ka]:t._fullLayout._reservedMargin[r._id][ea]=ra[ea]}return Nn.syncOrAsync([Ud.previousPromises,Be,Ee,Ne,Ud.previousPromises,Je],t)}function pte(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,l,o,s;Yd.init({element:e.node(),gd:t,prepFn:function(){l=e.attr("transform"),e3(e)},moveFn:function(u,f){e.attr("transform",l+fi(u,f)),o=Yd.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Yd.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var v=Yd.getCursor(o,s,r.xanchor,r.yanchor);e3(e,v)},doneFn:function(){if(e3(e),o!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=o,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?XE.call("_guiRestyle",t,u,r._traceIndex):XE.call("_guiRelayout",t,u)}}})}function mte(e,r,t){var a=r._levels,n=[],i=[],l,o,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],v=1.001*t[1]-.001*t[0];for(o=0;o<1e5&&(l=a.start+o*u,!(u>0?l>=s:l<=s));o++)l>f&&l0?l>=s:l<=s));o++)l>t[0]&&l{"use strict";rP.exports={moduleType:"component",name:"colorbar",attributes:t0(),supplyDefaults:nm(),draw:eP().draw,hasColorbar:Zp()}});var nP=Z((Rce,aP)=>{"use strict";aP.exports={moduleType:"component",name:"legend",layoutAttributes:ry(),supplyLayoutDefaults:ny(),draw:my(),style:vy()}});var lP=Z((zce,iP)=>{"use strict";iP.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 sP=Z((Nce,oP)=>{"use strict";oP.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var n3=Z((Fce,vP)=>{"use strict";var gte=gr(),cP=He(),a3=cP.extendFlat,uP=cP.extendDeep;function fP(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function bte(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}vP.exports=function(r,t){var a,n=r.data,i=r.layout,l=uP([],n),o=uP({},i,fP(t.tileClass)),s=r._context||{};if(t.width&&(o.width=t.width),t.height&&(o.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){o.annotations=[];var u=Object.keys(o);for(a=0;a{"use strict";var xte=Yv().EventEmitter,_te=gr(),wte=He(),hP=Do(),Tte=n3(),Mte=Qh(),Ate=$h();function kte(e,r){var t=new xte,a=Tte(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var o=hP.getDelay(n._fullLayout);setTimeout(function(){var s=Mte(n),u=document.createElement("canvas");u.id=wte.randstr(),t=Ate({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},o)}var l=hP.getRedrawFunc(n);return _te.call("_doPlot",n,a.data,a.layout,a.config).then(l).then(i).catch(function(o){t.emit("error",o)}),t}dP.exports=kte});var gP=Z((Hce,yP)=>{"use strict";var mP=Do(),Cte={getDelay:mP.getDelay,getRedrawFunc:mP.getRedrawFunc,clone:n3(),toSVG:Qh(),svgToImg:$h(),toImage:pP(),downloadImage:Pg()};yP.exports=Cte});var xP=Z($i=>{"use strict";$i.version=tv().version;ub();j4();var Ste=gr(),yc=$i.register=Ste.register,l3=TC(),bP=Object.keys(l3);for(Gd=0;Gd{"use strict";_P.exports=xP()});var Wd=Z((Yce,TP)=>{"use strict";TP.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var gc=Z((Uce,CP)=>{"use strict";var wt=qo(),MP=r0().axisHoverFormat,Lte=zi().hovertemplateAttrs,qte=zi().texttemplateAttrs,kP=nf(),Dte=ha(),AP=Wd(),Ete=mi().pattern,Yo=Yt().extendFlat,o3=Dte({editType:"calc",arrayOk:!0,colorEditType:"style"}),Pte=wt.marker,Rte=Pte.line,zte=Yo({},Rte.width,{dflt:0}),Nte=Yo({width:zte,editType:"calc"},kP("marker.line")),Fte=Yo({line:Nte,editType:"calc"},kP("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Ete,cornerradius:{valType:"any",editType:"calc"}});CP.exports={x:wt.x,x0:wt.x0,dx:wt.dx,y:wt.y,y0:wt.y0,dy:wt.dy,xperiod:wt.xperiod,yperiod:wt.yperiod,xperiod0:wt.xperiod0,yperiod0:wt.yperiod0,xperiodalignment:wt.xperiodalignment,yperiodalignment:wt.yperiodalignment,xhoverformat:MP("x"),yhoverformat:MP("y"),text:wt.text,texttemplate:qte({editType:"plot"},{keys:AP.eventDataKeys}),hovertext:wt.hovertext,hovertemplate:Lte({},{keys:AP.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Yo({},o3,{}),insidetextfont:Yo({},o3,{}),outsidetextfont:Yo({},o3,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Yo({},wt.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:Fte,offsetgroup:wt.offsetgroup,alignmentgroup:wt.alignmentgroup,selected:{marker:{opacity:wt.selected.marker.opacity,color:wt.selected.marker.color,editType:"style"},textfont:wt.selected.textfont,editType:"style"},unselected:{marker:{opacity:wt.unselected.marker.opacity,color:wt.unselected.marker.color,editType:"style"},textfont:wt.unselected.textfont,editType:"style"},zorder:wt.zorder}});var s3=Z((Gce,SP)=>{"use strict";SP.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 EP=Z((Vce,DP)=>{"use strict";var Ite=Er(),LP=Tn().hasColorscale,qP=Ls(),Hte=He().coercePattern;DP.exports=function(r,t,a,n,i){var l=a("marker.color",n),o=LP(r,"marker");o&&qP(r,t,i,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Ite.defaultLine),LP(r,"marker.line")&&qP(r,t,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),Hte(a,"marker.pattern",l,o),a("selected.marker.color"),a("unselected.marker.color")}});var bc=Z((Wce,IP)=>{"use strict";var PP=Hr(),xu=He(),RP=Er(),Ote=gr(),Bte=Ng(),Yte=Fg(),Ute=EP(),Gte=Ig(),zP=gc(),Zd=xu.coerceFont;function Vte(e,r,t,a){function n(u,f){return xu.coerce(e,r,zP,u,f)}var i=Bte(e,r,a,n);if(!i){r.visible=!1;return}Yte(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var l=n("textposition");FP(e,r,a,n,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Ute(e,r,n,t,a);var o=(r.marker.line||{}).color,s=Ote.getComponentMethod("errorbars","supplyDefaults");s(e,r,o||RP.defaultLine,{axis:"y"}),s(e,r,o||RP.defaultLine,{axis:"x",inherit:"y"}),xu.coerceSelectionMarkerOpacity(r,n)}function Wte(e,r){var t,a;function n(o,s){return xu.coerce(a._input,a,zP,o,s)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&PP(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function FP(e,r,t,a,n,i){i=i||{};var l=i.moduleHasSelected!==!1,o=i.moduleHasUnselected!==!1,s=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,f=i.moduleHasTextangle!==!1,v=i.moduleHasInsideanchor!==!1,h=!!i.hasPathbar,d=Array.isArray(n)||n==="auto",m=d||n==="inside",g=d||n==="outside";if(m||g){var y=Zd(a,"textfont",t.font),w=xu.extendFlat({},y),_=e.textfont&&e.textfont.color,T=!_;if(T&&delete w.color,Zd(a,"insidetextfont",w),h){var b=xu.extendFlat({},y);T&&delete b.color,Zd(a,"pathbar.textfont",b)}g&&Zd(a,"outsidetextfont",y),l&&a("selected.textfont.color"),o&&a("unselected.textfont.color"),s&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}m&&v&&a("insidetextanchor")}IP.exports={supplyDefaults:Vte,crossTraceDefaults:Wte,handleText:FP,validateCornerradius:NP}});var OP=Z((Zce,HP)=>{"use strict";var Zte=gr(),Xte=dt(),Jte=He(),Kte=s3(),Qte=bc().validateCornerradius;HP.exports=function(e,r,t){function a(g,y){return Jte.coerce(e,r,Kte,g,y)}for(var n=!1,i=!1,l=!1,o={},s=a("barmode"),u=s==="group",f=0;f0&&!o[h]&&(l=!0),o[h]=!0),v.visible&&v.type==="histogram"){var d=Xte.getFromId({_fullLayout:r},v[v.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",i&&!l?0:.2),a("bargroupgap");var m=a("barcornerradius");r.barcornerradius=Qte(m)}});var u3=Z((Xce,BP)=>{"use strict";var _u=He();BP.exports=function(r,t){for(var a=0;a{"use strict";var YP=dt(),UP=Hg(),GP=Tn().hasColorscale,VP=i0(),$te=u3(),jte=Ug();WP.exports=function(r,t){var a=YP.getFromId(r,t.xaxis||"x"),n=YP.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f,v={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(i=a.makeCalcdata(t,"x",v),o=n.makeCalcdata(t,"y"),s=UP(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y",v),o=a.makeCalcdata(t,"x"),s=UP(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;for(var h=Math.min(l.length,i.length),d=new Array(h),m=0;m{"use strict";var eae=Ir(),rae=He();function tae(e,r,t){var a=e._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var i=a.uniformtext.mode==="hide",l;switch(t){case"funnelarea":case"pie":case"sunburst":l="g.slice";break;case"treemap":case"icicle":l="g.slice, g.pathbar";break;default:l="g.points > g.point"}r.selectAll(l).each(function(o){var s=o.transform;if(s){s.scale=i&&s.hide?0:n/s.fontSize;var u=eae.select(this).select("text");rae.setTransormAndDisplay(u,s)}})}}function aae(e,r,t){if(t.uniformtext.mode){var a=XP(e),n=t.uniformtext.minsize,i=r.scale*r.fontSize;r.hide=i{"use strict";var iae=Hr(),lae=bn(),KP=He().isArrayOrTypedArray;Uo.coerceString=function(e,r,t){if(typeof r=="string"){if(r||!e.noBlank)return r}else if((typeof r=="number"||r===!0)&&!e.strict)return String(r);return t!==void 0?t:e.dflt};Uo.coerceNumber=function(e,r,t){if(iae(r)){r=+r;var a=e.min,n=e.max,i=a!==void 0&&rn;if(!i)return r}return t!==void 0?t:e.dflt};Uo.coerceColor=function(e,r,t){return lae(r).isValid()?r:t!==void 0?t:e.dflt};Uo.coerceEnumerated=function(e,r,t){return e.coerceNumber&&(r=+r),e.values.indexOf(r)!==-1?r:t!==void 0?t:e.dflt};Uo.getValue=function(e,r){var t;return KP(e)?r{"use strict";var _c=Ir(),oae=Er(),wc=tt(),QP=He(),$P=gr(),jP=xc().resizeText,f3=gc(),sae=f3.textfont,uae=f3.insidetextfont,fae=f3.outsidetextfont,ya=Xd();function cae(e){var r=_c.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");jP(e,r,"bar");var t=r.size(),a=e._fullLayout;r.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(a.barmode==="stack"&&t>1||a.bargap===0&&a.bargroupgap===0&&!n[0].trace.marker.line.width)&&_c.select(this).attr("shape-rendering","crispEdges")}),r.selectAll("g.points").each(function(n){var i=_c.select(this),l=n[0].trace;eR(i,l,e)}),$P.getComponentMethod("errorbars","style")(r)}function eR(e,r,t){wc.pointStyle(e.selectAll("path"),r,t),rR(e,r,t)}function rR(e,r,t){e.selectAll("text").each(function(a){var n=_c.select(this),i=QP.ensureUniformFontSize(t,tR(n,a,r,t));wc.font(n,i)})}function vae(e,r,t){var a=r[0].trace;a.selectedpoints?hae(t,a,e):(eR(t,a,e),$P.getComponentMethod("errorbars","style")(t))}function hae(e,r,t){wc.selectedPointStyle(e.selectAll("path"),r),dae(e.selectAll("text"),r,t)}function dae(e,r,t){e.each(function(a){var n=_c.select(this),i;if(a.selected){i=QP.ensureUniformFontSize(t,tR(n,a,r,t));var l=r.selected.textfont&&r.selected.textfont.color;l&&(i.color=l),wc.font(n,i)}else wc.selectedTextStyle(n,r)})}function tR(e,r,t,a){var n=a._fullLayout.font,i=t.textfont;if(e.classed("bartext-inside")){var l=lR(r,t);i=nR(t,r.i,n,l)}else e.classed("bartext-outside")&&(i=iR(t,r.i,n));return i}function aR(e,r,t){return c3(sae,e.textfont,r,t)}function nR(e,r,t,a){var n=aR(e,r,t),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[r]===void 0;return i&&(n={color:oae.contrast(a),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),c3(uae,e.insidetextfont,r,n)}function iR(e,r,t){var a=aR(e,r,t);return c3(fae,e.outsidetextfont,r,a)}function c3(e,r,t,a){r=r||{};var n=ya.getValue(r.family,t),i=ya.getValue(r.size,t),l=ya.getValue(r.color,t),o=ya.getValue(r.weight,t),s=ya.getValue(r.style,t),u=ya.getValue(r.variant,t),f=ya.getValue(r.textcase,t),v=ya.getValue(r.lineposition,t),h=ya.getValue(r.shadow,t);return{family:ya.coerceString(e.family,n,a.family),size:ya.coerceNumber(e.size,i,a.size),color:ya.coerceColor(e.color,l,a.color),weight:ya.coerceString(e.weight,o,a.weight),style:ya.coerceString(e.style,s,a.style),variant:ya.coerceString(e.variant,u,a.variant),textcase:ya.coerceString(e.variant,f,a.textcase),lineposition:ya.coerceString(e.variant,v,a.lineposition),shadow:ya.coerceString(e.variant,h,a.shadow)}}function lR(e,r){return r.type==="waterfall"?r[e.dir].marker.color:e.mcc||e.mc||r.marker.color}oR.exports={style:cae,styleTextPoints:rR,styleOnSelect:vae,getInsideTextFont:nR,getOutsideTextFont:iR,getBarColor:lR,resizeText:jP}});var mR=Z((jce,pR)=>{"use strict";var Kd=Ir(),Qd=Hr(),la=He(),pae=xa(),mae=Er(),Fl=tt(),yae=gr(),$d=dt().tickText,sR=xc(),gae=sR.recordMinTextSize,bae=sR.clearMinTextSize,v3=Jd(),wu=Xd(),xae=Wd(),uR=gc(),_ae=uR.text,wae=uR.textposition,Tae=bi().appendArrayPointValue,Fa=xae.TEXTPAD;function Mae(e){return e.id}function Aae(e){if(e.ids)return Mae}function h3(e){return(e>0)-(e<0)}function Ei(e,r){return e0}function Cae(e,r,t,a,n,i){var l=r.xaxis,o=r.yaxis,s=e._fullLayout,u=e._context.staticPlot;n||(n={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},bae("bar",s));var f=la.makeTraceGroups(a,t,"trace bars").each(function(v){var h=Kd.select(this),d=v[0].trace,m=v[0].t,g=d.type==="waterfall",y=d.type==="funnel",w=d.type==="histogram",_=d.type==="bar",T=_||y,b=0;g&&d.connector.visible&&d.connector.mode==="between"&&(b=d.connector.line.width/2);var M=d.orientation==="h",S=cR(n),C=la.ensureSingle(h,"g","points"),q=Aae(d),D=C.selectAll("g.point").data(la.identity,q);D.enter().append("g").classed("point",!0),D.exit().remove(),D.each(function(z,F){var H=Kd.select(this),O=kae(z,l,o,M),X=O[0][0],J=O[0][1],B=O[1][0],I=O[1][1],W=(M?J-X:I-B)===0;W&&T&&wu.getLineWidth(d,z)&&(W=!1),W||(W=!Qd(X)||!Qd(J)||!Qd(B)||!Qd(I)),z.isBlank=W,W&&(M?J=X:I=B),b&&!W&&(M?(X-=Ei(X,J)*b,J+=Ei(X,J)*b):(B-=Ei(B,I)*b,I+=Ei(B,I)*b));var K,Q;if(d.type==="waterfall"){if(!W){var ie=d[z.dir].marker;K=ie.line.width,Q=ie.color}}else K=wu.getLineWidth(d,z),Q=z.mc||d.marker.color;function me(ne){var Me=Kd.round(K/2%1,2);return n.gap===0&&n.groupgap===0?Kd.round(Math.round(ne)-Me,2):ne}function pe(ne,Me,Ce){return Ce&&ne===Me?ne:Math.abs(ne-Me)>=2?me(ne):ne>Me?Math.ceil(ne):Math.floor(ne)}var ge=mae.opacity(Q),j=ge<1||K>.01?me:pe;e._context.staticPlot||(X=j(X,J,M),J=j(J,X,M),B=j(B,I,!M),I=j(I,B,!M));var _e=M?l.c2p:o.c2p,se;z.s0>0?se=z._sMax:z.s0<0?se=z._sMin:se=z.s1>0?z._sMax:z._sMin;function Se(ne,Me){if(!ne)return 0;var Ce=Math.abs(M?I-B:J-X),cr=Math.abs(M?J-X:I-B),tr=j(Math.abs(_e(se,!0)-_e(0,!0))),De=z.hasB?Math.min(Ce/2,cr/2):Math.min(Ce/2,tr),Le;if(Me==="%"){var Ye=Math.min(50,ne);Le=Ce*(Ye/100)}else Le=ne;return j(Math.max(Math.min(Le,De),0))}var ve=_||w?Se(m.cornerradiusvalue,m.cornerradiusform):0,Ae,Y,re="M"+X+","+B+"V"+I+"H"+J+"V"+B+"Z",U=0;if(ve&&z.s){var de=h3(z.s0)===0||h3(z.s)===h3(z.s0)?z.s1:z.s0;if(U=j(z.hasB?0:Math.abs(_e(se,!0)-_e(de,!0))),U0?Math.sqrt(U*(2*ve-U)):0,Ie=be>0?Math.max:Math.min;Ae="M"+X+","+B+"V"+(I-Re*ye)+"H"+Ie(J-(ve-U)*be,X)+"A "+ve+","+ve+" 0 0 "+Fe+" "+J+","+(I-ve*ye-Pe)+"V"+(B+ve*ye+Pe)+"A "+ve+","+ve+" 0 0 "+Fe+" "+Ie(J-(ve-U)*be,X)+","+(B+Re*ye)+"Z"}else if(z.hasB)Ae="M"+(X+ve*be)+","+B+"A "+ve+","+ve+" 0 0 "+Fe+" "+X+","+(B+ve*ye)+"V"+(I-ve*ye)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(X+ve*be)+","+I+"H"+(J-ve*be)+"A "+ve+","+ve+" 0 0 "+Fe+" "+J+","+(I-ve*ye)+"V"+(B+ve*ye)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(J-ve*be)+","+B+"Z";else{Y=Math.abs(I-B)+U;var Be=Y0?Math.sqrt(U*(2*ve-U)):0,Ee=ye>0?Math.max:Math.min;Ae="M"+(X+Be*be)+","+B+"V"+Ee(I-(ve-U)*ye,B)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(X+ve*be-Ne)+","+I+"H"+(J-ve*be+Ne)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(J-Be*be)+","+Ee(I-(ve-U)*ye,B)+"V"+B+"Z"}}else Ae=re}else Ae=re;var Je=fR(la.ensureSingle(H,"path"),s,n,i);if(Je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((J-X)*(I-B))||W&&e._context.staticPlot?"M0,0Z":Ae).call(Fl.setClipUrl,r.layerClipId,e),!s.uniformtext.mode&&S){var We=Fl.makePointStyleFns(d);Fl.singlePointStyle(z,Je,d,We,e)}Sae(e,r,H,v,F,X,J,B,I,ve,U,n,i),r.layerClipId&&Fl.hideOutsideRangePoint(z,H.select("text"),l,o,d.xcalendar,d.ycalendar)});var R=d.cliponaxis===!1;Fl.setClipUrl(h,R?null:r.layerClipId,e)});yae.getComponentMethod("errorbars","plot")(e,f,r,n)}function Sae(e,r,t,a,n,i,l,o,s,u,f,v,h){var d=r.xaxis,m=r.yaxis,g=e._fullLayout,y;function w(Y,re,U){var de=la.ensureSingle(Y,"text").text(re).attr({class:"bartext bartext-"+y,"text-anchor":"middle","data-notex":1}).call(Fl.font,U).call(pae.convertToTspans,e);return de}var _=a[0].trace,T=_.orientation==="h",b=Dae(g,a,n,d,m);y=Eae(_,n);var M=v.mode==="stack"||v.mode==="relative",S=a[n],C=!M||S._outmost,q=S.hasB,D=u&&u-f>Fa;if(!b||y==="none"||(S.isBlank||i===l||o===s)&&(y==="auto"||y==="inside")){t.select("text").remove();return}var R=g.font,z=v3.getBarColor(a[n],_),F=v3.getInsideTextFont(_,n,R,z),H=v3.getOutsideTextFont(_,n,R),O=_.insidetextanchor||"end",X=t.datum();T?d.type==="log"&&X.s0<=0&&(d.range[0]0&&me>0,j;D?q?j=Go(I-2*u,W,ie,me,T)||Go(I,W-2*u,ie,me,T):T?j=Go(I-(u-f),W,ie,me,T)||Go(I,W-2*(u-f),ie,me,T):j=Go(I,W-(u-f),ie,me,T)||Go(I-2*(u-f),W,ie,me,T):j=Go(I,W,ie,me,T),ge&&j?y="inside":(y="outside",K.remove(),K=null)}else y="inside";if(!K){pe=la.ensureUniformFontSize(e,y==="outside"?H:F),K=w(t,b,pe);var _e=K.attr("transform");if(K.attr("transform",""),Q=Fl.bBox(K.node()),ie=Q.width,me=Q.height,K.attr("transform",_e),ie<=0||me<=0){K.remove();return}}var se=_.textangle,Se,ve;y==="outside"?(ve=_.constraintext==="both"||_.constraintext==="outside",Se=qae(i,l,o,s,Q,{isHorizontal:T,constrained:ve,angle:se})):(ve=_.constraintext==="both"||_.constraintext==="inside",Se=dR(i,l,o,s,Q,{isHorizontal:T,constrained:ve,angle:se,anchor:O,hasB:q,r:u,overhead:f})),Se.fontSize=pe.size,gae(_.type==="histogram"?"bar":_.type,Se,g),S.transform=Se;var Ae=fR(K,g,v,h);la.setTransormAndDisplay(Ae,Se)}function Go(e,r,t,a,n){if(e<0||r<0)return!1;var i=t<=e&&a<=r,l=t<=r&&a<=e,o=n?e>=t*(r/a):r>=a*(e/t);return i||l||o}function vR(e){return e==="auto"?0:e}function hR(e,r){var t=Math.PI/180*r,a=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t));return{x:e.width*n+e.height*a,y:e.width*a+e.height*n}}function dR(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=i.anchor,f=u==="end",v=u==="start",h=i.leftToRight||0,d=(h+1)/2,m=1-d,g=i.hasB,y=i.r,w=i.overhead,_=n.width,T=n.height,b=Math.abs(r-e),M=Math.abs(a-t),S=b>2*Fa&&M>2*Fa?Fa:0;b-=2*S,M-=2*S;var C=vR(s);s==="auto"&&!(_<=b&&T<=M)&&(_>b||T>M)&&(!(_>M||T>b)||_Fa){var z=Lae(e,r,t,a,q,y,w,l,g);D=z.scale,R=z.pad}else D=1,o&&(D=Math.min(1,b/q.x,M/q.y)),R=0;var F=n.left*m+n.right*d,H=(n.top+n.bottom)/2,O=(e+Fa)*m+(r-Fa)*d,X=(t+a)/2,J=0,B=0;if(v||f){var I=(l?q.x:q.y)/2;y&&(f||g)&&(S+=R);var W=l?Ei(e,r):Ei(t,a);l?v?(O=e+W*S,J=-W*I):(O=r-W*S,J=W*I):v?(X=t+W*S,B=-W*I):(X=a-W*S,B=W*I)}return{textX:F,textY:H,targetX:O,targetY:X,anchorX:J,anchorY:B,scale:D,rotate:C}}function Lae(e,r,t,a,n,i,l,o,s){var u=Math.max(0,Math.abs(r-e)-2*Fa),f=Math.max(0,Math.abs(a-t)-2*Fa),v=i-Fa,h=l?v-Math.sqrt(v*v-(v-l)*(v-l)):v,d=s?v*2:o?v-l:2*h,m=s?v*2:o?2*h:v-l,g,y,w,_,T;return n.y/n.x>=f/(u-d)?_=f/n.y:n.y/n.x<=(f-m)/u?_=u/n.x:!s&&o?(g=n.x*n.x+n.y*n.y/4,y=-2*n.x*(u-v)-n.y*(f/2-v),w=(u-v)*(u-v)+(f/2-v)*(f/2-v)-v*v,_=(-y+Math.sqrt(y*y-4*g*w))/(2*g)):s?(g=(n.x*n.x+n.y*n.y)/4,y=-n.x*(u/2-v)-n.y*(f/2-v),w=(u/2-v)*(u/2-v)+(f/2-v)*(f/2-v)-v*v,_=(-y+Math.sqrt(y*y-4*g*w))/(2*g)):(g=n.x*n.x/4+n.y*n.y,y=-n.x*(u/2-v)-2*n.y*(f-v),w=(u/2-v)*(u/2-v)+(f-v)*(f-v)-v*v,_=(-y+Math.sqrt(y*y-4*g*w))/(2*g)),_=Math.min(1,_),o?T=Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(f-n.y*_)/2)*(v-(f-n.y*_)/2)))-l):T=Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(u-n.x*_)/2)*(v-(u-n.x*_)/2)))-l),{scale:_,pad:T}}function qae(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=n.width,f=n.height,v=Math.abs(r-e),h=Math.abs(a-t),d;l?d=h>2*Fa?Fa:0:d=v>2*Fa?Fa:0;var m=1;o&&(m=l?Math.min(1,h/f):Math.min(1,v/u));var g=vR(s),y=hR(n,g),w=(l?y.x:y.y)/2,_=(n.left+n.right)/2,T=(n.top+n.bottom)/2,b=(e+r)/2,M=(t+a)/2,S=0,C=0,q=l?Ei(r,e):Ei(t,a);return l?(b=r-q*d,S=q*w):(M=a+q*d,C=-q*w),{textX:_,textY:T,targetX:b,targetY:M,anchorX:S,anchorY:C,scale:m,rotate:g}}function Dae(e,r,t,a,n){var i=r[0].trace,l=i.texttemplate,o;return l?o=Pae(e,r,t,a,n):i.textinfo?o=Rae(r,t,a,n):o=wu.getValue(i.text,t),wu.coerceString(_ae,o)}function Eae(e,r){var t=wu.getValue(e.textposition,r);return wu.coerceEnumerated(wae,t)}function Pae(e,r,t,a,n){var i=r[0].trace,l=la.castOption(i,t,"texttemplate");if(!l)return"";var o=i.type==="histogram",s=i.type==="waterfall",u=i.type==="funnel",f=i.orientation==="h",v,h,d,m;f?(v="y",h=n,d="x",m=a):(v="x",h=a,d="y",m=n);function g(S){return $d(h,h.c2l(S),!0).text}function y(S){return $d(m,m.c2l(S),!0).text}var w=r[t],_={};_.label=w.p,_.labelLabel=_[v+"Label"]=g(w.p);var T=la.castOption(i,w.i,"text");(T===0||T)&&(_.text=T),_.value=w.s,_.valueLabel=_[d+"Label"]=y(w.s);var b={};Tae(b,i,w.i),(o||b.x===void 0)&&(b.x=f?_.value:_.label),(o||b.y===void 0)&&(b.y=f?_.label:_.value),(o||b.xLabel===void 0)&&(b.xLabel=f?_.valueLabel:_.labelLabel),(o||b.yLabel===void 0)&&(b.yLabel=f?_.labelLabel:_.valueLabel),s&&(_.delta=+w.rawS||w.s,_.deltaLabel=y(_.delta),_.final=w.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),u&&(_.value=w.s,_.valueLabel=y(_.value),_.percentInitial=w.begR,_.percentInitialLabel=la.formatPercent(w.begR),_.percentPrevious=w.difR,_.percentPreviousLabel=la.formatPercent(w.difR),_.percentTotal=w.sumR,_.percenTotalLabel=la.formatPercent(w.sumR));var M=la.castOption(i,w.i,"customdata");return M&&(_.customdata=M),la.texttemplateString(l,_,e._d3locale,b,_,i._meta||{})}function Rae(e,r,t,a){var n=e[0].trace,i=n.orientation==="h",l=n.type==="waterfall",o=n.type==="funnel";function s(M){var S=i?a:t;return $d(S,M,!0).text}function u(M){var S=i?t:a;return $d(S,+M,!0).text}var f=n.textinfo,v=e[r],h=f.split("+"),d=[],m,g=function(M){return h.indexOf(M)!==-1};if(g("label")&&d.push(s(e[r].p)),g("text")&&(m=la.castOption(n,v.i,"text"),(m===0||m)&&d.push(m)),l){var y=+v.rawS||v.s,w=v.v,_=w-y;g("initial")&&d.push(u(_)),g("delta")&&d.push(u(y)),g("final")&&d.push(u(w))}if(o){g("value")&&d.push(u(v.s));var T=0;g("percent initial")&&T++,g("percent previous")&&T++,g("percent total")&&T++;var b=T>1;g("percent initial")&&(m=la.formatPercent(v.begR),b&&(m+=" of initial"),d.push(m)),g("percent previous")&&(m=la.formatPercent(v.difR),b&&(m+=" of previous"),d.push(m)),g("percent total")&&(m=la.formatPercent(v.sumR),b&&(m+=" of total"),d.push(m))}return d.join("
")}pR.exports={plot:Cae,toMoveInsideBar:dR}});var _R=Z((eve,xR)=>{"use strict";var Tc=ki(),zae=gr(),yR=Er(),Nae=He().fillText,Fae=Xd().getLineWidth,d3=dt().hoverLabelText,Iae=Bt().BADNUM;function Hae(e,r,t,a,n){var i=gR(e,r,t,a,n);if(i){var l=i.cd,o=l[0].trace,s=l[i.index];return i.color=bR(o,s),zae.getComponentMethod("errorbars","hoverInfo")(s,o,i),[i]}}function gR(e,r,t,a,n){var i=e.cd,l=i[0].trace,o=i[0].t,s=a==="closest",u=l.type==="waterfall",f=e.maxHoverDistance,v=e.maxSpikeDistance,h,d,m,g,y,w,_;l.orientation==="h"?(h=t,d=r,m="y",g="x",y=X,w=F):(h=r,d=t,m="x",g="y",w=X,y=F);var T=l[m+"period"],b=s||T;function M(j){return C(j,-1)}function S(j){return C(j,1)}function C(j,_e){var se=j.w;return j[m]+_e*se/2}function q(j){return j[m+"End"]-j[m+"Start"]}var D=s?M:T?function(j){return j.p-q(j)/2}:function(j){return Math.min(M(j),j.p-o.bardelta/2)},R=s?S:T?function(j){return j.p+q(j)/2}:function(j){return Math.max(S(j),j.p+o.bardelta/2)};function z(j,_e,se){return n.finiteRange&&(se=0),Tc.inbox(j-h,_e-h,se+Math.min(1,Math.abs(_e-j)/_)-1)}function F(j){return z(D(j),R(j),f)}function H(j){return z(M(j),S(j),v)}function O(j){var _e=j[g];if(u){var se=Math.abs(j.rawS)||0;d>0?_e+=se:d<0&&(_e-=se)}return _e}function X(j){var _e=d,se=j.b,Se=O(j);return Tc.inbox(se-_e,Se-_e,f+(Se-_e)/(Se-se)-1)}function J(j){var _e=d,se=j.b,Se=O(j);return Tc.inbox(se-_e,Se-_e,v+(Se-_e)/(Se-se)-1)}var B=e[m+"a"],I=e[g+"a"];_=Math.abs(B.r2c(B.range[1])-B.r2c(B.range[0]));function W(j){return(y(j)+w(j))/2}var K=Tc.getDistanceFunction(a,y,w,W);if(Tc.getClosest(i,K,e),e.index!==!1&&i[e.index].p!==Iae){b||(D=function(j){return Math.min(M(j),j.p-o.bargroupwidth/2)},R=function(j){return Math.max(S(j),j.p+o.bargroupwidth/2)});var Q=e.index,ie=i[Q],me=l.base?ie.b+ie.s:ie.s;e[g+"0"]=e[g+"1"]=I.c2p(ie[g],!0),e[g+"LabelVal"]=me;var pe=o.extents[o.extents.round(ie.p)];e[m+"0"]=B.c2p(s?D(ie):pe[0],!0),e[m+"1"]=B.c2p(s?R(ie):pe[1],!0);var ge=ie.orig_p!==void 0;return e[m+"LabelVal"]=ge?ie.orig_p:ie.p,e.labelLabel=d3(B,e[m+"LabelVal"],l[m+"hoverformat"]),e.valueLabel=d3(I,e[g+"LabelVal"],l[g+"hoverformat"]),e.baseLabel=d3(I,ie.b,l[g+"hoverformat"]),e.spikeDistance=(J(ie)+H(ie))/2,e[m+"Spike"]=B.c2p(ie.p,!0),Nae(ie,l,e),e.hovertemplate=l.hovertemplate,e}}function bR(e,r){var t=r.mcc||e.marker.color,a=r.mlcc||e.marker.line.color,n=Fae(e,r);if(yR.opacity(t))return t;if(yR.opacity(a)&&n)return a}xR.exports={hoverPoints:Hae,hoverOnBars:gR,getTraceColor:bR}});var TR=Z((rve,wR)=>{"use strict";wR.exports=function(r,t,a){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),a.orientation==="h"?(r.label=r.y,r.value=r.x):(r.label=r.x,r.value=r.y),r}});var AR=Z((tve,MR)=>{"use strict";MR.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=a[0].trace,o=l.type==="funnel",s=l.orientation==="h",u=[],f;if(t===!1)for(f=0;f{"use strict";kR.exports={attributes:gc(),layoutAttributes:s3(),supplyDefaults:bc().supplyDefaults,crossTraceDefaults:bc().crossTraceDefaults,supplyLayoutDefaults:OP(),calc:ZP(),crossTraceCalc:jg().crossTraceCalc,colorbar:t2(),arraysToCalcdata:u3(),plot:mR().plot,style:Jd().style,styleOnSelect:Jd().styleOnSelect,hoverPoints:_R().hoverPoints,eventData:TR(),selectPoints:AR(),moduleType:"trace",name:"bar",basePlotModule:bd(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var LR=Z((nve,SR)=>{"use strict";SR.exports=CR()});var p3=Z((ive,qR)=>{"use strict";var Bae=Gn(),Yae=Od().attributes,Uae=ha(),Gae=hi(),Vae=zi().hovertemplateAttrs,Wae=zi().texttemplateAttrs,Mc=Yt().extendFlat,Zae=mi().pattern,jd=Uae({editType:"plot",arrayOk:!0,colorEditType:"plot"});qR.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:Gae.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:Zae,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:Mc({},Bae.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:Vae({},{keys:["label","color","value","percent","text"]}),texttemplate:Wae({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:Mc({},jd,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:Mc({},jd,{}),outsidetextfont:Mc({},jd,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:Mc({},jd,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:Yae({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 RR=Z((lve,PR)=>{"use strict";var Xae=Hr(),Ac=He(),Jae=p3(),Kae=Od().defaults,Qae=bc().handleText,$ae=He().coercePattern;function DR(e,r){var t=Ac.isArrayOrTypedArray(e),a=Ac.isArrayOrTypedArray(r),n=Math.min(t?e.length:1/0,a?r.length:1/0);if(isFinite(n)||(n=0),n&&a){for(var i,l=0;l0){i=!0;break}}i||(n=0)}return{hasLabels:t,hasValues:a,len:n}}function ER(e,r,t,a,n){var i=a("marker.line.width");i&&a("marker.line.color",n?void 0:t.paper_bgcolor);var l=a("marker.colors");$ae(a,"marker.pattern",l),e.marker&&!r.marker.pattern.fgcolor&&(r.marker.pattern.fgcolor=e.marker.colors),r.marker.pattern.bgcolor||(r.marker.pattern.bgcolor=t.paper_bgcolor)}function jae(e,r,t,a){function n(_,T){return Ac.coerce(e,r,Jae,_,T)}var i=n("labels"),l=n("values"),o=DR(i,l),s=o.len;if(r._hasLabels=o.hasLabels,r._hasValues=o.hasValues,!r._hasLabels&&r._hasValues&&(n("label0"),n("dlabel")),!s){r.visible=!1;return}r._length=s,ER(e,r,a,n,!0),n("scalegroup");var u=n("text"),f=n("texttemplate"),v;if(f||(v=n("textinfo",Ac.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||v&&v!=="none"){var h=n("textposition");Qae(e,r,a,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",m=d||h==="outside";m&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else v==="none"&&n("textposition","none");Kae(r,a,n);var g=n("hole"),y=n("title.text");if(y){var w=n("title.position",g?"middle center":"top center");!g&&w==="middle center"&&(r.title.position="top center"),Ac.coerceFont(n,"title.font",a.font)}n("sort"),n("direction"),n("rotation"),n("pull")}PR.exports={handleLabelsAndValues:DR,handleMarkerDefaults:ER,supplyDefaults:jae}});var m3=Z((ove,zR)=>{"use strict";zR.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var FR=Z((sve,NR)=>{"use strict";var ene=He(),rne=m3();NR.exports=function(r,t){function a(n,i){return ene.coerce(r,t,rne,n,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}});var g3=Z((uve,OR)=>{"use strict";var tne=Hr(),y3=bn(),ane=Er(),nne={};function ine(e,r){var t=[],a=e._fullLayout,n=a.hiddenlabels||[],i=r.labels,l=r.marker.colors||[],o=r.values,s=r._length,u=r._hasValues&&s,f,v;if(r.dlabel)for(i=new Array(s),f=0;f=0});var b=r.type==="funnelarea"?g:r.sort;return b&&t.sort(function(M,S){return S.v-M.v}),t[0]&&(t[0].vTotal=m),t}function IR(e){return function(t,a){return!t||(t=y3(t),!t.isValid())?!1:(t=ane.addOpacity(t,t.getAlpha()),e[a]||(e[a]=t),t)}}function lne(e,r){var t=(r||{}).type;t||(t="pie");var a=e._fullLayout,n=e.calcdata,i=a[t+"colorway"],l=a["_"+t+"colormap"];a["extend"+t+"colors"]&&(i=HR(i,nne));for(var o=0,s=0;s{"use strict";var one=bi().appendArrayMultiPointValues;BR.exports=function(r,t){var a={curveNumber:t.index,pointNumbers:r.pts,data:t._input,fullData:t,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return r.pts.length===1&&(a.pointNumber=a.i=r.pts[0]),one(a,t,r.pts),t.type==="funnelarea"&&(delete a.v,delete a.i),a}});var fz=Z((cve,uz)=>{"use strict";var an=Ir(),sne=Pt(),e1=ki(),XR=Er(),ji=tt(),ga=He(),une=ga.strScale,UR=ga.strTranslate,b3=xa(),JR=xc(),fne=JR.recordMinTextSize,cne=JR.clearMinTextSize,KR=Wd().TEXTPAD,wr=H0(),r1=YR(),GR=He().isValidTextValue;function vne(e,r){var t=e._context.staticPlot,a=e._fullLayout,n=a._size;cne("pie",a),jR(r,e),lz(r,n);var i=ga.makeTraceGroups(a._pielayer,r,"trace").each(function(l){var o=an.select(this),s=l[0],u=s.trace;_ne(l),o.attr("stroke-linejoin","round"),o.each(function(){var f=an.select(this).selectAll("g.slice").data(l);f.enter().append("g").classed("slice",!0),f.exit().remove();var v=[[[],[]],[[],[]]],h=!1;f.each(function(b,M){if(b.hidden){an.select(this).selectAll("path,g").remove();return}b.pointNumber=b.i,b.curveNumber=u.index,v[b.pxmid[1]<0?0:1][b.pxmid[0]<0?0:1].push(b);var S=s.cx,C=s.cy,q=an.select(this),D=q.selectAll("path.surface").data([b]);if(D.enter().append("path").classed("surface",!0).style({"pointer-events":t?"none":"all"}),q.call(QR,e,l),u.pull){var R=+wr.castOption(u.pull,b.pts)||0;R>0&&(S+=R*b.pxmid[0],C+=R*b.pxmid[1])}b.cxFinal=S,b.cyFinal=C;function z(I,W,K,Q){var ie=Q*(W[0]-I[0]),me=Q*(W[1]-I[1]);return"a"+Q*s.r+","+Q*s.r+" 0 "+b.largeArc+(K?" 1 ":" 0 ")+ie+","+me}var F=u.hole;if(b.v===s.vTotal){var H="M"+(S+b.px0[0])+","+(C+b.px0[1])+z(b.px0,b.pxmid,!0,1)+z(b.pxmid,b.px0,!0,1)+"Z";F?D.attr("d","M"+(S+F*b.px0[0])+","+(C+F*b.px0[1])+z(b.px0,b.pxmid,!1,F)+z(b.pxmid,b.px0,!1,F)+"Z"+H):D.attr("d",H)}else{var O=z(b.px0,b.px1,!0,1);if(F){var X=1-F;D.attr("d","M"+(S+F*b.px1[0])+","+(C+F*b.px1[1])+z(b.px1,b.px0,!1,F)+"l"+X*b.px0[0]+","+X*b.px0[1]+O+"Z")}else D.attr("d","M"+S+","+C+"l"+b.px0[0]+","+b.px0[1]+O+"Z")}oz(e,b,s);var J=wr.castOption(u.textposition,b.pts),B=q.selectAll("g.slicetext").data(b.text&&J!=="none"?[0]:[]);B.enter().append("g").classed("slicetext",!0),B.exit().remove(),B.each(function(){var I=ga.ensureSingle(an.select(this),"text","",function(j){j.attr("data-notex",1)}),W=ga.ensureUniformFontSize(e,J==="outside"?dne(u,b,a.font):$R(u,b,a.font));I.text(b.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(ji.font,W).call(b3.convertToTspans,e);var K=ji.bBox(I.node()),Q;if(J==="outside")Q=ZR(K,b);else if(Q=ez(K,b,s),J==="auto"&&Q.scale<1){var ie=ga.ensureUniformFontSize(e,u.outsidetextfont);I.call(ji.font,ie),K=ji.bBox(I.node()),Q=ZR(K,b)}var me=Q.textPosAngle,pe=me===void 0?b.pxmid:t1(s.r,me);if(Q.targetX=S+pe[0]*Q.rCenter+(Q.x||0),Q.targetY=C+pe[1]*Q.rCenter+(Q.y||0),sz(Q,K),Q.outside){var ge=Q.targetY;b.yLabelMin=ge-K.height/2,b.yLabelMid=ge,b.yLabelMax=ge+K.height/2,b.labelExtraX=0,b.labelExtraY=0,h=!0}Q.fontSize=W.size,fne(u.type,Q,a),l[M].transform=Q,ga.setTransormAndDisplay(I,Q)})});var d=an.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 b=ga.ensureSingle(an.select(this),"text","",function(C){C.attr("data-notex",1)}),M=u.title.text;u._meta&&(M=ga.templateString(M,u._meta)),b.text(M).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(ji.font,u.title.font).call(b3.convertToTspans,e);var S;u.title.position==="middle center"?S=yne(s):S=nz(s,n),b.attr("transform",UR(S.x,S.y)+une(Math.min(1,S.scale))+UR(S.tx,S.ty))}),h&&bne(v,u),hne(f,u),h&&u.automargin){var m=ji.bBox(o.node()),g=u.domain,y=n.w*(g.x[1]-g.x[0]),w=n.h*(g.y[1]-g.y[0]),_=(.5*y-s.r)/n.w,T=(.5*w-s.r)/n.h;sne.autoMargin(e,"pie."+u.uid+".automargin",{xl:g.x[0]-_,xr:g.x[1]+_,yb:g.y[0]-T,yt:g.y[1]+T,l:Math.max(s.cx-s.r-m.left,0),r:Math.max(m.right-(s.cx+s.r),0),b:Math.max(m.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-m.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var l=an.select(this);l.attr("dy")&&l.attr("dy",l.attr("dy"))})},0)}function hne(e,r){e.each(function(t){var a=an.select(this);if(!t.labelExtraX&&!t.labelExtraY){a.select("path.textline").remove();return}var n=a.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,ga.setTransormAndDisplay(n,t.transform);var i=t.cxFinal+t.pxmid[0],l=t.cyFinal+t.pxmid[1],o="M"+i+","+l,s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var u=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(u)>Math.abs(f)?o+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+s):o+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+s}else o+="V"+(t.yLabelMid+t.labelExtraY)+"h"+s;ga.ensureSingle(a,"path","textline").call(XR.stroke,r.outsidetextfont.color).attr({"stroke-width":Math.min(2,r.outsidetextfont.size/8),d:o,fill:"none"})})}function QR(e,r,t){var a=t[0],n=a.cx,i=a.cy,l=a.trace,o=l.type==="funnelarea";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1),e.on("mouseover",function(s){var u=r._fullLayout,f=r._fullData[l.index];if(!(r._dragging||u.hovermode===!1)){var v=f.hoverinfo;if(Array.isArray(v)&&(v=e1.castHoverinfo({hoverinfo:[wr.castOption(v,s.pts)],_module:l._module},u,0)),v==="all"&&(v="label+text+value+percent+name"),f.hovertemplate||v!=="none"&&v!=="skip"&&v){var h=s.rInscribed||0,d=n+s.pxmid[0]*(1-h),m=i+s.pxmid[1]*(1-h),g=u.separators,y=[];if(v&&v.indexOf("label")!==-1&&y.push(s.label),s.text=wr.castOption(f.hovertext||f.text,s.pts),v&&v.indexOf("text")!==-1){var w=s.text;ga.isValidTextValue(w)&&y.push(w)}s.value=s.v,s.valueLabel=wr.formatPieValue(s.v,g),v&&v.indexOf("value")!==-1&&y.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=wr.formatPiePercent(s.percent,g),v&&v.indexOf("percent")!==-1&&y.push(s.percentLabel);var _=f.hoverlabel,T=_.font,b=[];e1.loneHover({trace:l,x0:d-h*a.r,x1:d+h*a.r,y:m,_x0:o?n+s.TL[0]:d-h*a.r,_x1:o?n+s.TR[0]:d+h*a.r,_y0:o?i+s.TL[1]:m-h*a.r,_y1:o?i+s.BL[1]:m+h*a.r,text:y.join("
"),name:f.hovertemplate||v.indexOf("name")!==-1?f.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:wr.castOption(_.bgcolor,s.pts)||s.color,borderColor:wr.castOption(_.bordercolor,s.pts),fontFamily:wr.castOption(T.family,s.pts),fontSize:wr.castOption(T.size,s.pts),fontColor:wr.castOption(T.color,s.pts),nameLength:wr.castOption(_.namelength,s.pts),textAlign:wr.castOption(_.align,s.pts),hovertemplate:wr.castOption(f.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[r1(s,f)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:r,inOut_bbox:b}),s.bbox=b[0],l._hasHoverLabel=!0}l._hasHoverEvent=!0,r.emit("plotly_hover",{points:[r1(s,f)],event:an.event})}}),e.on("mouseout",function(s){var u=r._fullLayout,f=r._fullData[l.index],v=an.select(this).datum();l._hasHoverEvent&&(s.originalEvent=an.event,r.emit("plotly_unhover",{points:[r1(v,f)],event:an.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(e1.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1)}),e.on("click",function(s){var u=r._fullLayout,f=r._fullData[l.index];r._dragging||u.hovermode===!1||(r._hoverdata=[r1(s,f)],e1.click(r,an.event))})}function dne(e,r,t){var a=wr.castOption(e.outsidetextfont.color,r.pts)||wr.castOption(e.textfont.color,r.pts)||t.color,n=wr.castOption(e.outsidetextfont.family,r.pts)||wr.castOption(e.textfont.family,r.pts)||t.family,i=wr.castOption(e.outsidetextfont.size,r.pts)||wr.castOption(e.textfont.size,r.pts)||t.size,l=wr.castOption(e.outsidetextfont.weight,r.pts)||wr.castOption(e.textfont.weight,r.pts)||t.weight,o=wr.castOption(e.outsidetextfont.style,r.pts)||wr.castOption(e.textfont.style,r.pts)||t.style,s=wr.castOption(e.outsidetextfont.variant,r.pts)||wr.castOption(e.textfont.variant,r.pts)||t.variant,u=wr.castOption(e.outsidetextfont.textcase,r.pts)||wr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=wr.castOption(e.outsidetextfont.lineposition,r.pts)||wr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,v=wr.castOption(e.outsidetextfont.shadow,r.pts)||wr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a,family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:v}}function $R(e,r,t){var a=wr.castOption(e.insidetextfont.color,r.pts);!a&&e._input.textfont&&(a=wr.castOption(e._input.textfont.color,r.pts));var n=wr.castOption(e.insidetextfont.family,r.pts)||wr.castOption(e.textfont.family,r.pts)||t.family,i=wr.castOption(e.insidetextfont.size,r.pts)||wr.castOption(e.textfont.size,r.pts)||t.size,l=wr.castOption(e.insidetextfont.weight,r.pts)||wr.castOption(e.textfont.weight,r.pts)||t.weight,o=wr.castOption(e.insidetextfont.style,r.pts)||wr.castOption(e.textfont.style,r.pts)||t.style,s=wr.castOption(e.insidetextfont.variant,r.pts)||wr.castOption(e.textfont.variant,r.pts)||t.variant,u=wr.castOption(e.insidetextfont.textcase,r.pts)||wr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=wr.castOption(e.insidetextfont.lineposition,r.pts)||wr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,v=wr.castOption(e.insidetextfont.shadow,r.pts)||wr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a||XR.contrast(r.color),family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:v}}function jR(e,r){for(var t,a,n=0;n=-4;_-=2)w(Math.PI*_,"tan");for(_=4;_>=-4;_-=2)w(Math.PI*(_+1),"tan")}if(v||d){for(_=4;_>=-4;_-=2)w(Math.PI*(_+1.5),"rad");for(_=4;_>=-4;_-=2)w(Math.PI*(_+.5),"rad")}}if(o||m||v){var T=Math.sqrt(e.width*e.width+e.height*e.height);if(y={scale:n*a*2/T,rCenter:1-n,rotate:0},y.textPosAngle=(r.startangle+r.stopangle)/2,y.scale>=1)return y;g.push(y)}(m||d)&&(y=VR(e,a,l,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,g.push(y)),(m||h)&&(y=WR(e,a,l,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,g.push(y));for(var b=0,M=0,S=0;S=1)break}return g[b]}function pne(e,r){var t=e.startangle,a=e.stopangle;return t>r&&r>a||t0?1:-1)/2,y:i/(1+t*t/(a*a)),outside:!0}}function yne(e){var r=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/r,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function nz(e,r){var t=1,a=1,n,i=e.trace,l={x:e.cx,y:e.cy},o={tx:0,ty:0};o.ty+=i.title.font.size,n=iz(i),i.title.position.indexOf("top")!==-1?(l.y-=(1+n)*e.r,o.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(l.y+=(1+n)*e.r);var s=gne(e.r,e.trace.aspectratio),u=r.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+s,l.x-=(1+n)*s,o.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+s,l.x+=(1+n)*s,o.tx-=e.titleBox.width/2),t=u/e.titleBox.width,a=x3(e,r)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(t,a),tx:o.tx,ty:o.ty}}function gne(e,r){return e/(r===void 0?1:r)}function x3(e,r){var t=e.trace,a=r.h*(t.domain.y[1]-t.domain.y[0]);return Math.min(e.titleBox.height,a/2)}function iz(e){var r=e.pull;if(!r)return 0;var t;if(ga.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function bne(e,r){var t,a,n,i,l,o,s,u,f,v,h,d,m;function g(T,b){return T.pxmid[1]-b.pxmid[1]}function y(T,b){return b.pxmid[1]-T.pxmid[1]}function w(T,b){b||(b={});var M=b.labelExtraY+(a?b.yLabelMax:b.yLabelMin),S=a?T.yLabelMin:T.yLabelMax,C=a?T.yLabelMax:T.yLabelMin,q=T.cyFinal+l(T.px0[1],T.px1[1]),D=M-S,R,z,F,H,O,X;if(D*s>0&&(T.labelExtraY=D),!!ga.isArrayOrTypedArray(r.pull))for(z=0;z=(wr.castOption(r.pull,F.pts)||0))&&((T.pxmid[1]-F.pxmid[1])*s>0?(H=F.cyFinal+l(F.px0[1],F.px1[1]),D=H-S-T.labelExtraY,D*s>0&&(T.labelExtraY+=D)):(C+T.labelExtraY-q)*s>0&&(R=3*o*Math.abs(z-v.indexOf(T)),O=F.cxFinal+i(F.px0[0],F.px1[0]),X=O+R-(T.cxFinal+T.pxmid[0])-T.labelExtraX,X*o>0&&(T.labelExtraX+=X)))}for(a=0;a<2;a++)for(n=a?g:y,l=a?Math.max:Math.min,s=a?1:-1,t=0;t<2;t++){for(i=t?Math.max:Math.min,o=t?1:-1,u=e[a][t],u.sort(n),f=e[1-a][t],v=f.concat(u),d=[],h=0;h1?(u=t.r,f=u/n.aspectratio):(f=t.r,u=f*n.aspectratio),u*=(1+n.baseratio)/2,s=u*f}l=Math.min(l,s/t.vTotal)}for(a=0;ar.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/r.vTotal,.5),u.ring=1-a.hole,u.rInscribed=mne(u,r))}function t1(e,r){return[e*Math.sin(r),-e*Math.cos(r)]}function oz(e,r,t){var a=e._fullLayout,n=t.trace,i=n.texttemplate,l=n.textinfo;if(!i&&l&&l!=="none"){var o=l.split("+"),s=function(b){return o.indexOf(b)!==-1},u=s("label"),f=s("text"),v=s("value"),h=s("percent"),d=a.separators,m;if(m=u?[r.label]:[],f){var g=wr.getFirstFilled(n.text,r.pts);GR(g)&&m.push(g)}v&&m.push(wr.formatPieValue(r.v,d)),h&&m.push(wr.formatPiePercent(r.v/t.vTotal,d)),r.text=m.join("
")}function y(b){return{label:b.label,value:b.v,valueLabel:wr.formatPieValue(b.v,a.separators),percent:b.v/t.vTotal,percentLabel:wr.formatPiePercent(b.v/t.vTotal,a.separators),color:b.color,text:b.text,customdata:ga.castOption(n,b.i,"customdata")}}if(i){var w=ga.castOption(n,r.i,"texttemplate");if(!w)r.text="";else{var _=y(r),T=wr.getFirstFilled(n.text,r.pts);(GR(T)||T==="")&&(_.text=T),r.text=ga.texttemplateString(w,_,e._fullLayout._d3locale,_,n._meta||{})}}}function sz(e,r){var t=e.rotate*Math.PI/180,a=Math.cos(t),n=Math.sin(t),i=(r.left+r.right)/2,l=(r.top+r.bottom)/2;e.textX=i*a-l*n,e.textY=i*n+l*a,e.noCenter=!0}uz.exports={plot:vne,formatSliceLabel:oz,transformInsideText:ez,determineInsideTextFont:$R,positionTitleOutside:nz,prerenderTitles:jR,layoutAreas:lz,attachFxHandlers:QR,computeTransform:sz}});var hz=Z((vve,vz)=>{"use strict";var cz=Ir(),wne=O0(),Tne=xc().resizeText;vz.exports=function(r){var t=r._fullLayout._pielayer.selectAll(".trace");Tne(r,t,"pie"),t.each(function(a){var n=a[0],i=n.trace,l=cz.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(o){cz.select(this).call(wne,o,i,r)})})}});var pz=Z(Tu=>{"use strict";var dz=Pt();Tu.name="pie";Tu.plot=function(e,r,t,a){dz.plotBasePlot(Tu.name,e,r,t,a)};Tu.clean=function(e,r,t,a){dz.cleanBasePlot(Tu.name,e,r,t,a)}});var yz=Z((dve,mz)=>{"use strict";mz.exports={attributes:p3(),supplyDefaults:RR().supplyDefaults,supplyLayoutDefaults:FR(),layoutAttributes:m3(),calc:g3().calc,crossTraceCalc:g3().crossTraceCalc,plot:fz().plot,style:hz(),styleOne:O0(),moduleType:"trace",name:"pie",basePlotModule:pz(),categories:["pie-like","pie","showLegend"],meta:{}}});var bz=Z((pve,gz)=>{"use strict";gz.exports=yz()});var Ma=Z((mve,_z)=>{"use strict";var xz=Object.getOwnPropertySymbols,Mne=Object.prototype.hasOwnProperty,Ane=Object.prototype.propertyIsEnumerable;function kne(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Cne(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}_z.exports=Cne()?Object.assign:function(e,r){for(var t,a=kne(e),n,i=1;i{var n1=Ma();function wz(){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={}}n1(wz.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function _3(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a1(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}n1(_3.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Pr.local.differentCalendars||Pr.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+a1(Math.abs(this.year()),4)+"-"+a1(this.month(),2)+"-"+a1(this.day(),2)}});function w3(){this.shortYearCutoff="+10"}n1(w3.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new _3(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+a1(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Pr.local.invalidMonth||Pr.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Pr.local.invalidMonth||Pr.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),l=e.monthOfYear()+(t==="m"?r:0),n=e.day(),o=function(f){for(;lv-1+f.minMonth;)i++,l-=v,v=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,l)&&(l=this.newDate(i,e.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l)))):t==="m"&&(o(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l))));var s=[i,this.fromMonthOfYear(i,l),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,o)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Pr=Tz.exports=new wz;Pr.cdate=_3;Pr.baseCalendar=w3;Pr.calendars.gregorian=T3});var Mz=Z(()=>{var M3=Ma(),oa=Aa();M3(oa.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"});oa.local=oa.regionalOptions[""];M3(oa.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});M3(oa.baseCalendar.prototype,{UNIX_EPOCH:oa.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:oa.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw oa.local.invalidFormat||oa.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,l=t.monthNamesShort||this.local.monthNamesShort,o=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(b,M){for(var S=1;T+S1},f=function(b,M,S,C){var q=""+M;if(u(b,C))for(;q.length1},_=function(F,H){var O=w(F,H),X=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],J=new RegExp("^-?\\d{1,"+X+"}"),B=r.substring(q).match(J);if(!B)throw(oa.local.missingNumberAt||oa.regionalOptions[""].missingNumberAt).replace(/\{0\}/,q);return q+=B[0].length,parseInt(B[0],10)},T=this,b=function(){if(typeof o=="function"){w("m");var F=o.call(T,r.substring(q));return q+=F.length,F}return _("m")},M=function(F,H,O,X){for(var J=w(F,X)?O:H,B=0;B-1){h=1,d=m;for(var z=this.daysInMonth(v,h);d>z;z=this.daysInMonth(v,h))h++,d-=z}return f>-1?this.fromJD(f):this.newDate(v,h,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,l=function(o){try{return i.parseDate(a,o,n)}catch(v){}o=o.toLowerCase();for(var s=(o.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(o);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(o);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?l(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var Az=Z(()=>{var Il=Aa(),Sne=Ma(),A3=Il.instance();function i1(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i1.prototype=new Il.baseCalendar;Sne(i1.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(qne);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(Dne);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(Ene);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw Il.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw Il.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,Il.local.invalidyear),n=Ol[a-Ol[0]],i=n>>9&4095,l=n>>5&15,o=n&31,s;s=A3.newDate(i,l,o),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=Hl[e-Hl[0]],a=t>>13,n=a?12:11;if(r>n)throw Il.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,Il.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),l=Rne(e,i,t,n);return A3.toJD(l.year,l.month,l.day)},fromJD:function(e){var r=A3.fromJD(e),t=Pne(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match(Lne),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),l=+r[4];return this.newDate(t,i,l)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),l=this.toChineseMonth(a,n),o=Object.getPrototypeOf(i1.prototype).add.call(this,e,r,t);if(t==="y"){var s=o.year(),u=o.month(),f=this.isIntercalaryMonth(s,l),v=i&&f?this.toMonthIndex(s,l,!0):this.toMonthIndex(s,l,!1);v!==u&&o.month(v)}return o}});var Lne=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,qne=/^\d?\d[iI]?/m,Dne=/^闰?十?[一二三四五六七八九]?月/m,Ene=/^闰?十?[一二三四五六七八九]?/m;Il.calendars.chinese=i1;var Hl=[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],Ol=[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 Pne(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var o=typeof r=="number"&&r>=1&&r<=12;if(!o)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=Ol[n.year-Ol[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=Ol[i.year-Ol[0]];var v=u>>9&4095,h=u>>5&15,d=u&31,m,g=new Date(v,h-1,d),y=new Date(n.year,n.month-1,n.day);m=Math.round((y-g)/(24*3600*1e3));var w=Hl[i.year-Hl[0]],_;for(_=0;_<13;_++){var T=w&1<<12-_?30:29;if(m>13;return!b||_=1888&&e<=2111;if(!o)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),l={year:e,month:r,day:t,isIntercalary:f}}var v;v=l.day-1;var h=Hl[l.year-Hl[0]],d=h>>13,m;d&&(l.month>d||l.isIntercalary)?m=l.month:m=l.month-1;for(var g=0;g>9&4095,T=w>>5&15,b=w&31,M=new Date(_,T-1,b+v);return i.year=M.getFullYear(),i.month=1+M.getMonth(),i.day=M.getDate(),i}});var kz=Z(()=>{var Vo=Aa(),zne=Ma();function k3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}k3.prototype=new Vo.baseCalendar;zne(k3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Vo.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Vo.local.invalidYear||Vo.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Vo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Vo.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});Vo.calendars.coptic=k3});var Cz=Z(()=>{var el=Aa(),Nne=Ma();function C3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}C3.prototype=new el.baseCalendar;Nne(C3.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,el.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,el.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,el.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,el.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,el.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,el.local.invalidDate);return{century:Fne[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,el.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var Fne={20:"Fruitbat",21:"Anchovy"};el.calendars.discworld=C3});var Sz=Z(()=>{var Wo=Aa(),Ine=Ma();function S3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}S3.prototype=new Wo.baseCalendar;Ine(S3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Wo.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Wo.local.invalidYear||Wo.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Wo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Wo.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});Wo.calendars.ethiopian=S3});var Lz=Z(()=>{var Bl=Aa(),Hne=Ma();function L3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}L3.prototype=new Bl.baseCalendar;Hne(L3.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 r=this._validate(e,this.minMonth,this.minDay,Bl.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,l1(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Bl.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Bl.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Bl.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&l1(this.daysInYear(e),10)===5?30:r===9&&l1(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Bl.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Bl.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var l=7;l<=this.monthsInYear(e);l++)i+=this.daysInMonth(e,l);for(var l=1;l=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function l1(e,r){return e-r*Math.floor(e/r)}Bl.calendars.hebrew=L3});var qz=Z(()=>{var kc=Aa(),One=Ma();function q3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}q3.prototype=new kc.baseCalendar;One(q3.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 r=this._validate(e,this.minMonth,this.minDay,kc.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,kc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,kc.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});kc.calendars.islamic=q3});var Dz=Z(()=>{var Cc=Aa(),Bne=Ma();function D3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D3.prototype=new Cc.baseCalendar;Bne(D3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Cc.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Cc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Cc.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),l=i-Math.floor(i<14?1:13),o=a-Math.floor(l>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,l,s)}});Cc.calendars.julian=D3});var Pz=Z(()=>{var Fn=Aa(),Yne=Ma();function P3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P3.prototype=new Fn.baseCalendar;Yne(P3.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,Fn.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Fn.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fn.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Fn.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fn.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Fn.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Fn.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Fn.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Fn.local.invalidDate),n=a.toJD(),i=this._toHaab(n),l=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=E3(e+8+17*20,365);return[Math.floor(r/20)+1,E3(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[Ez(e+20,20),Ez(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,Fn.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function E3(e,r){return e-r*Math.floor(e/r)}function Ez(e,r){return E3(e-1,r)+1}Fn.calendars.mayan=P3});var zz=Z(()=>{var Zo=Aa(),Une=Ma();function R3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}R3.prototype=new Zo.baseCalendar;var Rz=Zo.instance("gregorian");Une(R3.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 r=this._validate(e,this.minMonth,this.minDay,Zo.local.invalidYear||Zo.regionalOptions[""].invalidYear);return Rz.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Zo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Zo.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),l=1;l=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});Zo.calendars.nanakshahi=R3});var Nz=Z(()=>{var Xo=Aa(),Gne=Ma();function z3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z3.prototype=new Xo.baseCalendar;Gne(z3.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Xo.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Xo.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,Xo.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=Xo.instance(),i=0,l=r,o=e;this._createMissingCalendarData(e);var s=e-(l>9||l===9&&t>=this.NEPALI_CALENDAR_DATA[o][0]?56:57);for(r!==9&&(i=t,l--);l!==9;)l<=0&&(l=12,o--),i+=this.NEPALI_CALENDAR_DATA[o][l],l--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[o][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[o][9]-this.NEPALI_CALENDAR_DATA[o][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=Xo.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var l=9,o=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][l]-o+1;n>s;)l++,l>12&&(l=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][l];var u=this.NEPALI_CALENDAR_DATA[i][l]-(s-n);return this.newDate(i,l,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var Mu=Aa(),Vne=Ma();function o1(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o1.prototype=new Mu.baseCalendar;Vne(o1.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,Mu.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Mu.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Mu.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+N3(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=N3(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),l=N3(a,366);n=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var o=n+2820*t+474;o=o<=0?o-1:o;var s=e-this.toJD(o,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(o,u,1)+1;return this.newDate(o,u,f)}});function N3(e,r){return e-r*Math.floor(e/r)}Mu.calendars.persian=o1;Mu.calendars.jalali=o1});var Iz=Z(()=>{var Jo=Aa(),Wne=Ma(),s1=Jo.instance();function F3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F3.prototype=new Jo.baseCalendar;Wne(F3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Jo.local.invalidYear),t=this._t2gYear(r.year());return s1.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,Jo.local.invalidYear),n=this._t2gYear(a.year());return s1.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Jo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Jo.local.invalidDate),n=this._t2gYear(a.year());return s1.toJD(n,a.month(),a.day())},fromJD:function(e){var r=s1.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Jo.calendars.taiwan=F3});var Hz=Z(()=>{var Ko=Aa(),Zne=Ma(),u1=Ko.instance();function I3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}I3.prototype=new Ko.baseCalendar;Zne(I3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Ko.local.invalidYear),t=this._t2gYear(r.year());return u1.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,Ko.local.invalidYear),n=this._t2gYear(a.year());return u1.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Ko.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Ko.local.invalidDate),n=this._t2gYear(a.year());return u1.toJD(n,a.month(),a.day())},fromJD:function(e){var r=u1.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Ko.calendars.thai=I3});var Oz=Z(()=>{var Qo=Aa(),Xne=Ma();function H3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}H3.prototype=new Qo.baseCalendar;Xne(H3.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 r=this._validate(e,this.minMonth,this.minDay,Qo.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,Qo.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return Yl[n]-Yl[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Qo.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+Yl[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),l=i+1,o=n-12*i,s=r-Yl[t-1]+1;return this.newDate(l,o,s)},isValid:function(e,r,t){var a=Qo.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=Qo.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});Qo.calendars.ummalqura=H3;var Yl=[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 Yz=Z((Xve,Bz)=>{"use strict";Bz.exports=Aa();Mz();Az();kz();Cz();Sz();Lz();qz();Dz();Pz();zz();Nz();Fz();Iz();Hz();Oz()});var Jz=Z((Jve,Xz)=>{"use strict";var Gz=Yz(),Sc=He(),Vz=Bt(),Jne=Vz.EPOCHJD,Kne=Vz.ONEDAY,Y3={valType:"enumerated",values:Sc.sortObjectKeys(Gz.calendars),editType:"calc",dflt:"gregorian"},Wz=function(e,r,t,a){var n={};return n[t]=Y3,Sc.coerce(e,r,n,t,a)},Qne=function(e,r,t,a){for(var n=0;n{"use strict";Kz.exports=Jz()});var aie=Z((Qve,jz)=>{var $z=wP();$z.register([LR(),bz(),Qz()]);jz.exports=$z});return aie();})(); +`+a4(i.dayMonthYear,e,a,n);return a4(r,e,a,n)};var n4=3*Xa;Dt.incrementMonth=function(e,r,t){t=Fi(t)&&t;var a=fl(e,Xa);if(e=Math.round(e-a),t)try{var n=Math.round(e/Xa)+Zu,i=Ni.getComponentMethod("calendars","getCal")(t),l=i.fromJD(n);return r%12?i.add(l,r,"m"):i.add(l,r/12,"y"),(l.toJD()-Zu)*Xa+a}catch(s){up.error("invalid ms "+e+" in calendar "+t)}var o=new Date(e+n4);return o.setUTCMonth(o.getUTCMonth()+r)+a-n4};Dt.findExactDates=function(e,r){for(var t=0,a=0,n=0,i=0,l,o,s=Fi(r)&&Ni.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";s4.exports=function(r){return r}});var vp=Z(Ii=>{"use strict";var dO=Hr(),pO=ro(),mO=fp(),yO=Bt().BADNUM,cp=1e-9;Ii.findBin=function(e,r,t){if(dO(r.start))return t?Math.ceil((e-r.start)/r.size-cp)-1:Math.floor((e-r.start)/r.size+cp);var a=0,n=r.length,i=0,l=n>1?(r[n-1]-r[0])/(n-1):1,o,s;for(l>=0?s=t?gO:bO:s=t?_O:xO,e+=l*cp*(t?-1:1)*(l>=0?1:-1);a90&&pO.log("Long binary search..."),a-1};function gO(e,r){return er}function _O(e,r){return e>=r}Ii.sorterAsc=function(e,r){return e-r};Ii.sorterDes=function(e,r){return r-e};Ii.distinctVals=function(e){var r=e.slice();r.sort(Ii.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===yO;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],l,o=0;o<=t;o++){var s=r[o],u=s-l;l===void 0?(i.push(s),l=s):u>n&&(a=Math.min(a,u),i.push(s),l=s)}return{vals:i,minDiff:a}};Ii.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,l=0,o=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};Ii.findIndexOfMin=function(e,r){r=r||mO;for(var t=1/0,a,n=0;n{"use strict";u4.exports=function(r){return Object.keys(r).sort()}});var f4=Z(Et=>{"use strict";var Xu=Hr(),wO=nn().isArrayOrTypedArray;Et.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),Xu(r)||(r=!1),wO(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var p4=Z((Nle,d4)=>{"use strict";var c4=us(),dp=c4.mod,TO=c4.modHalf,Ju=Math.PI,cl=2*Ju;function MO(e){return e/180*Ju}function AO(e){return e/Ju*180}function pp(e){return Math.abs(e[1]-e[0])>cl-1e-14}function v4(e,r){return TO(r-e,cl)}function kO(e,r){return Math.abs(v4(e,r))}function h4(e,r){if(pp(r))return!0;var t,a;r[0]a&&(a+=cl);var n=dp(e,cl),i=n+cl;return n>=t&&n<=a||i>=t&&i<=a}function CO(e,r,t,a){if(!h4(r,a))return!1;var n,i;return t[0]=n&&e<=i}function mp(e,r,t,a,n,i,l){n=n||0,i=i||0;var o=pp([t,a]),s,u,f,v,h;o?(s=0,u=Ju,f=cl):t{"use strict";ao.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};ao.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};ao.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};ao.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};ao.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};ao.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var b4=Z(no=>{"use strict";var yp=us().mod;no.segmentsIntersect=g4;function g4(e,r,t,a,n,i,l,o){var s=t-e,u=n-e,f=l-n,v=a-r,h=i-r,d=o-i,m=s*d-f*v;if(m===0)return null;var g=(u*d-f*h)/m,y=(u*v-s*h)/m;return y<0||y>1||g<0||g>1?null:{x:e+s*g,y:r+v*g}}no.segmentDistance=function(r,t,a,n,i,l,o,s){if(g4(r,t,a,n,i,l,o,s))return 0;var u=a-r,f=n-t,v=o-i,h=s-l,d=u*u+f*f,m=v*v+h*h,g=Math.min(Pv(u,f,d,i-r,l-t),Pv(u,f,d,o-r,s-t),Pv(v,h,m,r-i,t-l),Pv(v,h,m,a-i,n-l));return Math.sqrt(g)};function Pv(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var l=a-e,o=n-r;return l*l+o*o}else{var s=a*r-n*e;return s*s/t}}var Rv,gp,y4;no.getTextLocation=function(r,t,a,n){if((r!==gp||n!==y4)&&(Rv={},gp=r,y4=n),Rv[a])return Rv[a];var i=r.getPointAtLength(yp(a-n/2,t)),l=r.getPointAtLength(yp(a+n/2,t)),o=Math.atan((l.y-i.y)/(l.x-i.x)),s=r.getPointAtLength(yp(a,t)),u=(s.x*4+i.x+l.x)/6,f=(s.y*4+i.y+l.y)/6,v={x:u,y:f,theta:o};return Rv[a]=v,v};no.clearLocationCache=function(){gp=null};no.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,l=t.top,o=t.bottom,s=0,u=r.getTotalLength(),f=u,v,h;function d(g){var y=r.getPointAtLength(g);g===0?v=y:g===u&&(h=y);var w=y.xi?y.x-i:0,_=y.yo?y.y-o:0;return Math.sqrt(w*w+_*_)}for(var m=d(s);m;){if(s+=m+a,s>f)return;m=d(s)}for(m=d(f);m;){if(f-=m+a,s>f)return;m=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(v.x-h.x)<.1&&Math.abs(v.y-h.y)<.1}};no.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),l=n.tolerance||.001,o=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,v=i,h,d,m;u0?v=h:f=h,u++}return d}});var zv=Z(Ku=>{"use strict";var Hi={};Ku.throttle=function(r,t,a){var n=Hi[r],i=Date.now();if(!n){for(var l in Hi)Hi[l].tsn.ts+t){o();return}n.timer=setTimeout(function(){o(),n.timer=null},t)};Ku.done=function(e){var r=Hi[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};Ku.clear=function(e){if(e)x4(Hi[e]),delete Hi[e];else for(var r in Hi)Ku.clear(r)};function x4(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var w4=Z((Ole,_4)=>{"use strict";_4.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var T4=Z((Ble,Nv)=>{"use strict";Nv.exports=bp;Nv.exports.isMobile=bp;Nv.exports.default=bp;var DO=/(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,EO=/CrOS/,PO=/android|ipad|playbook|silk/i;function bp(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=DO.test(r)&&!EO.test(r)||!!e.tablet&&PO.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var A4=Z((Yle,M4)=>{"use strict";var RO=Hr(),zO=T4();M4.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=NO(),typeof t!="string")return!0;var a=zO({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;o--){var s=n[o];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(RO(u)&&(u=+u),u>=13)return!0}}}return a};function NO(){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 C4=Z((Ule,k4)=>{"use strict";var FO=Ir();k4.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(l){return l[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(l){l[0][i]=FO.select(this)}),n}});var L4=Z((Gle,S4)=>{"use strict";var IO=gr();S4.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,l=0;l<2;l++){var o=(i[a]||{}).dictionary;if(o){var s=o[t];if(s)return s}i=IO.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var D4=Z((Vle,q4)=>{"use strict";q4.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";E4.exports=function(r){for(var t=BO(r)?OO:HO,a=[],n=0;n{"use strict";R4.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var l=String(t).length,o=String(r).length;if(i>=o+l){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var F4=Z((Xle,N4)=>{"use strict";var YO=Hr(),UO=Bt().BADNUM,GO=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;N4.exports=function(r){return typeof r=="string"&&(r=r.replace(GO,"")),YO(r)?Number(r):UO}});var He=Z((Jle,K4)=>{"use strict";var Qu=Ir(),VO=os().utcFormat,WO=O1().format,U4=Hr(),G4=Bt(),V4=G4.FP_SAFE,ZO=-V4,I4=G4.BADNUM,fe=K4.exports={};fe.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var H4={};fe.warnBadFormat=function(e){var r=String(e);H4[r]||(H4[r]=1,fe.warn('encountered bad format: "'+r+'"'))};fe.noFormat=function(e){return String(e)};fe.numberFormat=function(e){var r;try{r=WO(fe.adjustFormat(e))}catch(t){return fe.warnBadFormat(e),fe.noFormat}return r};fe.nestedProperty=fv();fe.keyedContainer=Lb();fe.relativeAttr=Db();fe.isPlainObject=nl();fe.toLogRange=vv();fe.relinkPrivateKeys=zb();var vl=nn();fe.isArrayBuffer=vl.isArrayBuffer;fe.isTypedArray=vl.isTypedArray;fe.isArrayOrTypedArray=vl.isArrayOrTypedArray;fe.isArray1D=vl.isArray1D;fe.ensureArray=vl.ensureArray;fe.concat=vl.concat;fe.maxRowLength=vl.maxRowLength;fe.minRowLength=vl.minRowLength;var W4=us();fe.mod=W4.mod;fe.modHalf=W4.modHalf;var hl=ex();fe.valObjectMeta=hl.valObjectMeta;fe.coerce=hl.coerce;fe.coerce2=hl.coerce2;fe.coerceFont=hl.coerceFont;fe.coercePattern=hl.coercePattern;fe.coerceHoverinfo=hl.coerceHoverinfo;fe.coerceSelectionMarkerOpacity=hl.coerceSelectionMarkerOpacity;fe.validate=hl.validate;var ln=o4();fe.dateTime2ms=ln.dateTime2ms;fe.isDateTime=ln.isDateTime;fe.ms2DateTime=ln.ms2DateTime;fe.ms2DateTimeLocal=ln.ms2DateTimeLocal;fe.cleanDate=ln.cleanDate;fe.isJSDate=ln.isJSDate;fe.formatDate=ln.formatDate;fe.incrementMonth=ln.incrementMonth;fe.dateTick0=ln.dateTick0;fe.dfltRange=ln.dfltRange;fe.findExactDates=ln.findExactDates;fe.MIN_MS=ln.MIN_MS;fe.MAX_MS=ln.MAX_MS;var io=vp();fe.findBin=io.findBin;fe.sorterAsc=io.sorterAsc;fe.sorterDes=io.sorterDes;fe.distinctVals=io.distinctVals;fe.roundUp=io.roundUp;fe.sort=io.sort;fe.findIndexOfMin=io.findIndexOfMin;fe.sortObjectKeys=hp();var Oi=f4();fe.aggNums=Oi.aggNums;fe.len=Oi.len;fe.mean=Oi.mean;fe.geometricMean=Oi.geometricMean;fe.median=Oi.median;fe.midRange=Oi.midRange;fe.variance=Oi.variance;fe.stdev=Oi.stdev;fe.interp=Oi.interp;var Vn=wv();fe.init2dArray=Vn.init2dArray;fe.transposeRagged=Vn.transposeRagged;fe.dot=Vn.dot;fe.translationMatrix=Vn.translationMatrix;fe.rotationMatrix=Vn.rotationMatrix;fe.rotationXYMatrix=Vn.rotationXYMatrix;fe.apply3DTransform=Vn.apply3DTransform;fe.apply2DTransform=Vn.apply2DTransform;fe.apply2DTransform2=Vn.apply2DTransform2;fe.convertCssMatrix=Vn.convertCssMatrix;fe.inverseTransformMatrix=Vn.inverseTransformMatrix;var yi=p4();fe.deg2rad=yi.deg2rad;fe.rad2deg=yi.rad2deg;fe.angleDelta=yi.angleDelta;fe.angleDist=yi.angleDist;fe.isFullCircle=yi.isFullCircle;fe.isAngleInsideSector=yi.isAngleInsideSector;fe.isPtInsideSector=yi.isPtInsideSector;fe.pathArc=yi.pathArc;fe.pathSector=yi.pathSector;fe.pathAnnulus=yi.pathAnnulus;var xs=m4();fe.isLeftAnchor=xs.isLeftAnchor;fe.isCenterAnchor=xs.isCenterAnchor;fe.isRightAnchor=xs.isRightAnchor;fe.isTopAnchor=xs.isTopAnchor;fe.isMiddleAnchor=xs.isMiddleAnchor;fe.isBottomAnchor=xs.isBottomAnchor;var _s=b4();fe.segmentsIntersect=_s.segmentsIntersect;fe.segmentDistance=_s.segmentDistance;fe.getTextLocation=_s.getTextLocation;fe.clearLocationCache=_s.clearLocationCache;fe.getVisibleSegment=_s.getVisibleSegment;fe.findPointOnPath=_s.findPointOnPath;var Hv=Yt();fe.extendFlat=Hv.extendFlat;fe.extendDeep=Hv.extendDeep;fe.extendDeepAll=Hv.extendDeepAll;fe.extendDeepNoArrays=Hv.extendDeepNoArrays;var xp=ro();fe.log=xp.log;fe.warn=xp.warn;fe.error=xp.error;var XO=cs();fe.counterRegex=XO.counter;var _p=zv();fe.throttle=_p.throttle;fe.throttleDone=_p.done;fe.clearThrottle=_p.clear;var Wn=Gu();fe.getGraphDiv=Wn.getGraphDiv;fe.isPlotDiv=Wn.isPlotDiv;fe.removeElement=Wn.removeElement;fe.addStyleRule=Wn.addStyleRule;fe.addRelatedStyleRule=Wn.addRelatedStyleRule;fe.deleteRelatedStyleRule=Wn.deleteRelatedStyleRule;fe.setStyleOnHover=Wn.setStyleOnHover;fe.getFullTransformMatrix=Wn.getFullTransformMatrix;fe.getElementTransformMatrix=Wn.getElementTransformMatrix;fe.getElementAndAncestors=Wn.getElementAndAncestors;fe.equalDomRects=Wn.equalDomRects;fe.clearResponsive=w4();fe.preserveDrawingBuffer=A4();fe.makeTraceGroups=C4();fe._=L4();fe.notifier=Q1();fe.filterUnique=D4();fe.filterVisible=P4();fe.pushUnique=ep();fe.increment=z4();fe.cleanNumber=F4();fe.ensureNumber=function(r){return U4(r)?(r=Number(r),r>V4||r=r?!1:U4(e)&&e>=0&&e%1===0};fe.noop=_v();fe.identity=fp();fe.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};fe.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};fe.simpleMap=function(e,r,t,a,n){for(var i=e.length,l=new Array(i),o=0;o=Math.pow(2,t)?n>10?(fe.warn("randstr failed uniqueness"),l):e(r,t,a,(n||0)+1):l};fe.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};fe.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),l=new Array(t),o,s,u,f;for(o=0;o=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];l[o]=f}return l};fe.syncOrAsync=function(e,r,t){var a,n;function i(){return fe.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};fe.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};fe.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,l;for(i=0;i0?n:0})};fe.fillArray=function(e,r,t,a){if(a=a||fe.identity,fe.isArrayOrTypedArray(e))for(var n=0;n1?n+l[1]:"";if(i&&(l.length>1||o.length>4||t))for(;a.test(o);)o=o.replace(a,"$1"+i+"$2");return o+s};fe.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var J4=/^\w*$/;fe.templateString=function(e,r){var t={};return e.replace(fe.TEMPLATE_STRING_REGEX,function(a,n){var i;return J4.test(n)?i=r[n]:(t[n]=t[n]||fe.nestedProperty(r,n).get,i=t[n]()),fe.isValidTextValue(i)?i:""})};var eB={max:10,count:0,name:"hovertemplate"};fe.hovertemplateString=function(){return wp.apply(eB,arguments)};var rB={max:10,count:0,name:"texttemplate"};fe.texttemplateString=function(){return wp.apply(rB,arguments)};var tB=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function aB(e){var r=e.match(tB);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var nB={max:10,count:0,name:"texttemplate",parseMultDiv:!0};fe.texttemplateStringForShapes=function(){return wp.apply(nB,arguments)};var O4=/^[:|\|]/;function wp(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(fe.TEMPLATE_STRING_REGEX,function(l,o,s){var u=o==="xother"||o==="yother",f=o==="_xother"||o==="_yother",v=o==="_xother_"||o==="_yother_",h=o==="xother_"||o==="yother_",d=u||f||h||v,m=o;(f||v)&&(m=m.substring(1)),(h||v)&&(m=m.substring(0,m.length-1));var g=null,y=null;if(a.parseMultDiv){var w=aB(m);m=w.key,g=w.op,y=w.number}var _;if(d){if(_=r[m],_===void 0)return""}else{var T,b;for(b=3;b=Iv&&l<=B4,u=o>=Iv&&o<=B4;if(s&&(a=10*a+l-Iv),u&&(n=10*n+o-Iv),!s||!u){if(a!==n)return a-n;if(l!==o)return l-o}}return n-a};var bs=2e9;fe.seedPseudoRandom=function(){bs=2e9};fe.pseudoRandom=function(){var e=bs;return bs=(69069*bs+1)%4294967296,Math.abs(bs-e)<429496729?fe.pseudoRandom():bs/4294967296};fe.fillText=function(e,r,t){var a=Array.isArray(t)?function(l){t.push(l)}:function(l){t.text=l},n=fe.extractOption(e,r,"htx","hovertext");if(fe.isValidTextValue(n))return a(n);var i=fe.extractOption(e,r,"tx","text");if(fe.isValidTextValue(i))return a(i)};fe.isValidTextValue=function(e){return e||e===0};fe.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,fe.strTranslate(n-u*(t+l),i-u*(a+o))+fe.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};fe.setTransormAndDisplay=function(e,r){e.attr("transform",fe.getTextTransform(r)),e.style("display",r.scale?null:"none")};fe.ensureUniformFontSize=function(e,r){var t=fe.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};fe.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};fe.bigFont=function(e){return Math.round(1.2*e)};var Y4=fe.getFirefoxVersion(),iB=Y4!==null&&Y4<86;fe.getPositionFromD3Event=function(){return iB?[Qu.event.layerX,Qu.event.layerY]:[Qu.event.offsetX,Qu.event.offsetY]}});var j4=Z(()=>{"use strict";var lB=He(),Q4={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Tp in Q4)$4=Tp.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),lB.addStyleRule($4,Q4[Tp]);var $4,Tp});var Mp=Z(($le,e6)=>{e6.exports=!0});var kp=Z((jle,r6)=>{"use strict";var oB=Mp(),Ap;typeof window.matchMedia=="function"?Ap=!window.matchMedia("(hover: none)").matches:Ap=oB;r6.exports=Ap});var Yv=Z((eoe,Cp)=>{"use strict";var ws=typeof Reflect=="object"?Reflect:null,t6=ws&&typeof ws.apply=="function"?ws.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},Ov;ws&&typeof ws.ownKeys=="function"?Ov=ws.ownKeys:Object.getOwnPropertySymbols?Ov=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Ov=function(r){return Object.getOwnPropertyNames(r)};function sB(e){console&&console.warn&&console.warn(e)}var n6=Number.isNaN||function(r){return r!==r};function vt(){vt.init.call(this)}Cp.exports=vt;Cp.exports.once=vB;vt.EventEmitter=vt;vt.prototype._events=void 0;vt.prototype._eventsCount=0;vt.prototype._maxListeners=void 0;var a6=10;function Bv(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(vt,"defaultMaxListeners",{enumerable:!0,get:function(){return a6},set:function(e){if(typeof e!="number"||e<0||n6(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a6=e}});vt.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};vt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||n6(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function i6(e){return e._maxListeners===void 0?vt.defaultMaxListeners:e._maxListeners}vt.prototype.getMaxListeners=function(){return i6(this)};vt.prototype.emit=function(r){for(var t=[],a=1;a0&&(l=t[0]),l instanceof Error)throw l;var o=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw o.context=l,o}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")t6(s,this,t);else for(var u=s.length,f=f6(s,u),a=0;a0&&l.length>n&&!l.warned){l.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=r,o.count=l.length,sB(o)}return e}vt.prototype.addListener=function(r,t){return l6(this,r,t,!1)};vt.prototype.on=vt.prototype.addListener;vt.prototype.prependListener=function(r,t){return l6(this,r,t,!0)};function uB(){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 o6(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=uB.bind(a);return n.listener=t,a.wrapFn=n,n}vt.prototype.once=function(r,t){return Bv(t),this.on(r,o6(this,r,t)),this};vt.prototype.prependOnceListener=function(r,t){return Bv(t),this.prependListener(r,o6(this,r,t)),this};vt.prototype.removeListener=function(r,t){var a,n,i,l,o;if(Bv(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,l=a.length-1;l>=0;l--)if(a[l]===t||a[l].listener===t){o=a[l].listener,i=l;break}if(i<0)return this;i===0?a.shift():fB(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,o||t)}return this};vt.prototype.off=vt.prototype.removeListener;vt.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),l;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function s6(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?cB(n):f6(n,n.length)}vt.prototype.listeners=function(r){return s6(this,r,!0)};vt.prototype.rawListeners=function(r){return s6(this,r,!1)};vt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):u6.call(e,r)};vt.prototype.listenerCount=u6;function u6(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}vt.prototype.eventNames=function(){return this._eventsCount>0?Ov(this._events):[]};function f6(e,r){for(var t=new Array(r),a=0;a{"use strict";var Sp=Yv().EventEmitter,dB={init:function(e){if(e._ev instanceof Sp)return e;var r=new Sp,t=new Sp;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function l(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var o;for(o=0;o{"use strict";var h6=He(),pB=eo().dfltConfig;function mB(e,r){for(var t=[],a,n=0;npB.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Bi.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Bi.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Bi.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";m6.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var As=Z(Ut=>{"use strict";var _n=gr(),ju=He(),Gv=Gn(),qp=ds(),yB=Lp(),gB=Vu(),bB=eo().configAttributes,y6=pi(),Zn=ju.extendDeepAll,Ts=ju.isPlainObject,xB=ju.isArrayOrTypedArray,Vv=ju.nestedProperty,_B=ju.valObjectMeta,Dp="_isSubplotObj",Wv="_isLinkedToArray",wB="_arrayAttrRegexps",b6="_deprecated",Ep=[Dp,Wv,wB,b6];Ut.IS_SUBPLOT_OBJ=Dp;Ut.IS_LINKED_TO_ARRAY=Wv;Ut.DEPRECATED=b6;Ut.UNDERSCORE_ATTRS=Ep;Ut.get=function(){var e={};return _n.allTypes.forEach(function(r){e[r]=MB(r)}),{defs:{valObjects:_B,metaKeys:Ep.concat(["description","role","editType","impliedEdits"]),editType:{traces:y6.traces,layout:y6.layout},impliedEdits:{}},traces:e,layout:AB(),frames:kB(),animation:Ms(gB),config:Ms(bB)}};Ut.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var l=e[i];if(Ep.indexOf(i)===-1){var o=(a?a+".":"")+i;r(l,i,e,n,o),!Ut.isValObject(l)&&Ts(l)&&i!=="impliedEdits"&&Ut.crawl(l,r,n+1,o)}})};Ut.isValObject=function(e){return e&&e.valType!==void 0};Ut.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function l(s,u,f,v){t=t.slice(0,v).concat([u]),a=a.slice(0,v).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[v-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&o(n,0,"")}function o(s,u,f){var v=s[t[u]],h=f+t[u];if(u===t.length-1)xB(v)&&r.push(i+h);else if(a[u]){if(Array.isArray(v))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var l=r[t];if(!Uv(l))return!1;e=i[n][l]}else e=i[n]}else e=i}}return e}function Uv(e){return e===Math.round(e)&&e>=0}function MB(e){var r,t;r=_n.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=Zn({},Gv),i=Zn({},r.attributes);Ut.crawl(i,function(s,u,f,v,h){Vv(n,h).set(void 0),s===void 0&&Vv(i,h).set(void 0)}),Zn(a,n),_n.traceIs(e,"noOpacity")&&delete a.opacity,_n.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),_n.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,Zn(a,i),t.attributes&&Zn(a,t.attributes),a.type=e;var l={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:Ms(a)};if(r.layoutAttributes){var o={};Zn(o,r.layoutAttributes),l.layoutAttributes=Ms(o)}return r.animatable||Ut.crawl(l,function(s){Ut.isValObject(s)&&"anim"in s&&delete s.anim}),l}function AB(){var e={},r,t;Zn(e,qp);for(r in _n.subplotsRegistry)if(t=_n.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var ks=He(),DB=Gn(),dl="templateitemname",Pp={name:{valType:"string",editType:"none"}};Pp[dl]={valType:"string",editType:"calc"};lo.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=Pp.name,r[dl]=Pp[dl],r};lo.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=ks.coerce(i,{},DB,"type");var l={type:t,_template:null};if(t in r){a=e[t];var o=r[t]%a.length;r[t]++,l._template=a[o]}return l}return{newTrace:n}};lo.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);ks.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};lo.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[w6(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function o(u){var f={name:u.name,_input:u},v=f[dl]=u[dl];if(!_6(v))return f._template=n,f;for(var h=0;h=a&&(t._input||{})._templateitemname;i&&(n=a);var l=r+"["+n+"]",o;function s(){o={},i&&(o[l]={},o[l][dl]=i)}s();function u(d,m){o[d]=m}function f(d,m){i?ks.nestedProperty(o[l],d).set(m):o[l+"."+d]=m}function v(){var d=o;return s(),d}function h(d,m){d&&f(d,m);var g=v();for(var y in g)ks.nestedProperty(e,y).set(g[y])}return{modifyBase:u,modifyItem:f,getUpdateObj:v,applyUpdate:h}}});var da=Z((loe,T6)=>{"use strict";var ef=cs().counter;T6.exports={idRegex:{x:ef("x","( domain)?"),y:ef("y","( domain)?")},attrRegex:ef("[xy]axis"),xAxisMatch:ef("xaxis"),yAxisMatch:ef("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 Xt=Z(Ja=>{"use strict";var EB=gr(),Rp=da();Ja.id2name=function(r){if(!(typeof r!="string"||!r.match(Rp.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};Ja.name2id=function(r){if(r.match(Rp.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};Ja.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(Rp.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};Ja.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=Ja.listIds(e,r),i=new Array(n.length),l;for(l=0;la?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};Ja.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function M6(e,r){if(r&&r.length){for(var t=0;t{"use strict";function PB(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function RB(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}A6.exports={clearOutlineControllers:PB,clearOutline:RB}});var Zv=Z((uoe,k6)=>{"use strict";k6.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var zp=Z(Jv=>{"use strict";var Xv=gr(),foe=da().SUBPLOT_PATTERN;Jv.getSubplotCalcData=function(e,r,t){var a=Xv.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],l=0;l{"use strict";var zB=gr(),Cs=He();oo.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var l=oo.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(l)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(l){C6(e,l,n.cache),n.check=function(){if(i){var f=C6(e,l,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:l.type,prop:l.prop,traces:l.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var o=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;Cs.isPlainObject(i)?Np(i,r,l,a+1):r(l,n,i)}})}});var Pt=Z((hoe,G6)=>{"use strict";var F6=Ir(),FB=os().timeFormatLocale,IB=O1().formatLocale,rf=Hr(),HB=B1(),Xr=gr(),I6=As(),OB=ct(),ur=He(),H6=Er(),D6=Bt().BADNUM,Ka=Xt(),BB=pl().clearOutline,YB=Zv(),Fp=Vu(),UB=Lp(),GB=zp().getModuleCalcData,E6=ur.relinkPrivateKeys,so=ur._,je=G6.exports={};ur.extendFlat(je,Xr);je.attributes=Gn();je.attributes.type.values=je.allTypes;je.fontAttrs=ha();je.layoutAttributes=ds();var Qv=q6();je.executeAPICommand=Qv.executeAPICommand;je.computeAPICommandBindings=Qv.computeAPICommandBindings;je.manageCommandObserver=Qv.manageCommandObserver;je.hasSimpleAPICommandBindings=Qv.hasSimpleAPICommandBindings;je.redrawText=function(e){return e=ur.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Xr.getComponentMethod("annotations","draw")(e),Xr.getComponentMethod("legend","draw")(e),Xr.getComponentMethod("colorbar","draw")(e),r(je.previousPromises(e)))},300)})};je.resize=function(e){e=ur.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||ur.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||ur.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Xr.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};je.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};je.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=ur.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:H6.defaultLine,"pointer-events":"all"}).each(function(){var u=F6.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),l=t.select(".js-link-spacer"),o=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&VB(e,i),l.text(i.text()&&o.text()?" - ":"")}};function VB(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){je.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}je.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=F6.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=je.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var WB=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],ZB=["year","month","dayMonth","dayMonthYear"];je.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},l=e._fullData||[],o=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},v;e._transitionData||je.createTransitionData(e),n._dfltTitle={plot:so(e,"Click to enter Plot title"),subtitle:so(e,"Click to enter Plot subtitle"),x:so(e,"Click to enter X axis title"),y:so(e,"Click to enter Y axis title"),colorbar:so(e,"Click to enter Colorscale title"),annotation:so(e,"new text")},n._traceWord=so(e,"trace");var h=P6(e,WB);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,m=a.height;je.supplyLayoutGlobalDefaults(i,n,h),i.width||(n.width=d),i.height||(n.height=m),je.sanitizeMargins(n)}else{je.supplyLayoutGlobalDefaults(i,n,h);var g=!i.width||!i.height,y=n.autosize,w=f.autosizable,_=g&&(y||w);_?je.plotAutoSize(e,i,n):g&&je.sanitizeMargins(n),!y&&g&&(i.width=n.width,i.height=n.height)}n._d3locale=KB(h,n.separators),n._extraFormat=P6(e,ZB),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var T=n._subplots=JB(),b=n._splomAxes={x:{},y:{}},A=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=XB(l,s),je.supplyDataDefaults(s,o,i,n);var S=Object.keys(b.x),k=Object.keys(b.y);if(S.length>1&&k.length>1){for(Xr.getComponentMethod("grid","sizeDefaults")(i,n),v=0;v15&&k.length>15&&n.shapes.length===0&&n.images.length===0,je.linkSubplots(o,n,l,a),je.cleanPlot(o,n,l,a);var N=!!(a._has&&a._has("cartesian")),H=!!(n._has&&n._has("cartesian")),O=N,J=H;O&&!J?a._bgLayer.remove():J&&!O&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&BB({_fullLayout:a}),QB(o,n),E6(n,a),Xr.getComponentMethod("colorscale","crossTraceDefaults")(o,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var X=n._tracePreGUI,B={},I;for(I in X)B[I]="old";for(v=0;v0){var f=1-2*i;l=Math.round(f*l),o=Math.round(f*o)}}var v=je.layoutAttributes.width.min,h=je.layoutAttributes.height.min;l1,m=!t.height&&Math.abs(a.height-o)>1;(m||d)&&(d&&(a.width=l),m&&(a.height=o)),r._initialAutoSize||(r._initialAutoSize={width:l,height:o}),je.sanitizeMargins(a)};je.supplyLayoutModuleDefaults=function(e,r,t,a){var n=Xr.componentsRegistry,i=r._basePlotModules,l,o,s,u=Xr.subplotsRegistry.cartesian;for(l in n)s=n[l],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Xr.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(ur.subplotSort);for(o=0;o1&&(t.l/=y,t.r/=y)}if(h){var w=(t.t+t.b)/h;w>1&&(t.t/=w,t.b/=w)}var _=t.xl!==void 0?t.xl:t.x,T=t.xr!==void 0?t.xr:t.x,b=t.yt!==void 0?t.yt:t.y,A=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:_,size:t.l+g},r:{val:T,size:t.r+g},b:{val:A,size:t.b+g},t:{val:b,size:t.t+g}},m[r]=1}if(!a._replotting)return je.doAutoMargin(e)}};function jB(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=Ka.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}je.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),O6(r);var n=r._size,i=r.margin,l={t:0,b:0,l:0,r:0},o=ur.extendFlat({},n),s=i.l,u=i.r,f=i.t,v=i.b,h=r._pushmargin,d=r._pushmarginIds,m=r.minreducedwidth,g=r.minreducedheight;if(i.autoexpand!==!1){for(var y in h)d[y]||delete h[y];var w=e._fullLayout._reservedMargin;for(var _ in w)for(var T in w[_]){var b=w[_][T];l[T]=Math.max(l[T],b)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:v}};for(var A in l){var S=0;for(var k in h)k!=="base"&&rf(h[k][A].size)&&(S=h[k][A].size>S?h[k][A].size:S);var q=Math.max(0,i[A]-S);l[A]=Math.max(0,l[A]-q)}for(var D in h){var R=h[D].l||{},z=h[D].b||{},N=R.val,H=R.size,O=z.val,J=z.size,X=t-l.r-l.l,B=a-l.t-l.b;for(var I in h){if(rf(H)&&h[I].r){var V=h[I].r.val,K=h[I].r.size;if(V>N){var Q=(H*V+(K-X)*N)/(V-N),ie=(K*(1-N)+(H-X)*(1-V))/(V-N);Q+ie>s+u&&(s=Q,u=ie)}}if(rf(J)&&h[I].t){var me=h[I].t.val,pe=h[I].t.size;if(me>O){var ge=(J*me+(pe-B)*O)/(me-O),j=(pe*(1-O)+(J-B)*(1-me))/(me-O);ge+j>v+f&&(v=ge,f=j)}}}}}var _e=ur.constrain(t-i.l-i.r,B6,m),se=ur.constrain(a-i.t-i.b,Y6,g),Se=Math.max(0,t-_e),ve=Math.max(0,a-se);if(Se){var Ae=(s+u)/Se;Ae>1&&(s/=Ae,u/=Ae)}if(ve){var Y=(v+f)/ve;Y>1&&(v/=Y,f/=Y)}if(n.l=Math.round(s)+l.l,n.r=Math.round(u)+l.r,n.t=Math.round(f)+l.t,n.b=Math.round(v)+l.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(je.didMarginChange(o,n)||jB(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var re=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};je.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&je.supplyDefaults(e);var l=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(ur.isPlainObject(h)){var m={},g;return Object.keys(h).sort().forEach(function(T){if(["_","["].indexOf(T.charAt(0))===-1){if(typeof h[T]=="function"){d&&(m[T]="_function");return}if(t==="keepdata"){if(T.substr(T.length-3)==="src")return}else if(t==="keepstream"){if(g=h[T+"src"],typeof g=="string"&&g.indexOf(":")>0&&!ur.isPlainObject(h.stream))return}else if(t!=="keepall"&&(g=h[T+"src"],typeof g=="string"&&g.indexOf(":")>0))return;m[T]=u(h[T],d)}}),m}var y=Array.isArray(h),w=ur.isTypedArray(h);if((y||w)&&h.dtype&&h.shape){var _=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:ur.isArrayBuffer(_)?HB.encode(_):_},d)}return y?h.map(function(T){return u(T,d)}):w?ur.simpleMap(h,ur.identity):ur.isJSDate(h)?ur.ms2DateTimeLocal(+h):h}var f={data:(l||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(o),n)){var v=o._size;f.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};je.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,l=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xr.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function m(){return h++,function(){d++,!a&&d===h&&o(v)}}t.runFn(m),setTimeout(m())})}function o(v){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Xr.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(v)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[je.previousPromises,s,t.prepareFn,je.rehover,je.reselect,l],f=ur.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}je.doCalcdata=function(e,r){var t=Ka.list(e),a=e._fullData,n=e._fullLayout,i,l,o,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},o=0;o=0;s--)if(A[s].enabled){i._indexToPoints=A[s]._indexToPoints;break}l&&l.calc&&(b=l.calc(e,i))}(!Array.isArray(b)||!b[0])&&(b=[{x:D6,y:D6}]),b[0].t||(b[0].t={}),b[0].trace=i,u[_]=b}}for(z6(t,a,n),o=0;o{"use strict";uo.xmlns="http://www.w3.org/2000/xmlns/";uo.svg="http://www.w3.org/2000/svg";uo.xlink="http://www.w3.org/1999/xlink";uo.svgAttrs={xmlns:uo.svg,"xmlns:xlink":uo.xlink}});var Da=Z((poe,V6)=>{"use strict";V6.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 xa=Z(wn=>{"use strict";var Rt=Ir(),Yi=He(),aY=Yi.strTranslate,Ip=fo(),nY=Da().LINE_SPACING,iY=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;wn.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(iY),i=Rt.select(e.node().parentNode);if(i.empty())return;var l=e.attr("class")?e.attr("class").split(" ")[0]:"text";l+="-math",i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function o(){i.empty()||(l=e.attr("class")+"-math",i.select("svg."+l).remove()),e.text("").style("white-space","pre");var s=gY(e.node(),a);s&&e.style("pointer-events","all"),wn.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};uY(n[2],f,function(v,h,d){i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove();var m=v&&v.select("svg");if(!m||!m.node()){o(),s();return}var g=i.append("g").classed(l+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});g.node().appendChild(m.node()),h&&h.node()&&m.node().insertBefore(h.node().cloneNode(!0),m.node().firstChild);var y=d.width,w=d.height;m.attr({class:l,height:w,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _=e.node().style.fill||"black",T=m.select("g");T.attr({fill:_,stroke:_});var b=T.node().getBoundingClientRect(),A=b.width,S=b.height;(A>y||S>w)&&(m.style("overflow","hidden"),b=m.node().getBoundingClientRect(),A=b.width,S=b.height);var k=+e.attr("x"),q=+e.attr("y"),D=u||e.node().getBoundingClientRect().height,R=-D/4;if(l[0]==="y")g.attr({transform:"rotate("+[-90,k,q]+")"+aY(-A/2,R-S/2)});else if(l[0]==="l")q=R-S/2;else if(l[0]==="a"&&l.indexOf("atitle")!==0)k=0,q=R;else{var z=e.attr("text-anchor");k=k-A*(z==="middle"?.5:z==="end"?1:0),q=q+R-S/2}m.attr({x:k,y:q}),t&&t.call(e,g),s(g)})})):o(),e};var lY=/(<|<|<)/g,oY=/(>|>|>)/g;function sY(e){return e.replace(lY,"\\lt ").replace(oY,"\\gt ")}var W6=[["$","$"],["\\(","\\)"]];function uY(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){Yi.warn("No MathJax version:",MathJax.version);return}var n,i,l,o,s=function(){return i=Yi.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:W6},displayAlign:"left"})},u=function(){i=Yi.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=W6},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},v=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var _="math-output-"+Yi.randstr({},64);o=Rt.select("body").append("div").attr({id:_}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(sY(e));var T=o.node();return a===2?MathJax.Hub.Typeset(T):MathJax.typeset([T])},d=function(){var _=o.select(a===2?".MathJax_SVG":".MathJax"),T=!_.empty()&&o.select("svg").node();if(!T)Yi.log("There was an error in the tex syntax.",e),t();else{var b=T.getBoundingClientRect(),A;a===2?A=Rt.select("body").select("#MathJax_SVG_glyphs"):A=_.select("defs"),t(_,A,b)}o.remove()},m=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},g=function(){n!=="svg"&&(MathJax.config.startup.output=n)},y=function(){return l!==void 0&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(i)},w=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,h,d,m,y):a===3&&(u(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),g(),w()}))}var K6={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"},fY={sub:"0.3em",sup:"-0.6em"},cY={sub:"-0.21em",sup:"0.42em"},Z6="\u200B",X6=["http:","https:","mailto:","",void 0,":"],Q6=wn.NEWLINES=/(\r\n?|\n)/g,Op=/(<[^<>]*>)/,Bp=/<(\/?)([^ >]*)(\s+(.*))?>/i,vY=//i;wn.BR_TAG_ALL=//gi;var $6=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,j6=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,e7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,hY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function co(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&$v(a)}var dY=/(^|;)\s*color:/;wn.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,l=e.split(Op),o=[],s="",u=0,f=0;fi?o.push(v.substr(0,g-i)+n):o.push(v.substr(0,g));break}s=""}}return o.join("")};var pY={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},mY=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function $v(e){return e.replace(mY,function(r,t){var a;return t.charAt(0)==="#"?a=yY(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=pY[t],a||r})}wn.convertEntities=$v;function yY(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function gY(e,r){r=r.replace(Q6," ");var t=!1,a=[],n,i=-1;function l(){i++;var S=document.createElementNS(Ip.svg,"tspan");Rt.select(S).attr({class:"line",dy:i*nY+"em"}),e.appendChild(S),n=S;var k=a;if(a=[{node:S}],k.length>1)for(var q=1;q.",r);return}var k=a.pop();S!==k.type&&Yi.log("Start tag <"+k.type+"> doesnt match end tag <"+S+">. Pretending it did match.",r),n=a[a.length-1].node}var f=vY.test(r);f?l():(n=e,a=[{node:e}]);for(var v=r.split(Op),h=0;h{"use strict";var bY=Ir(),e0=bn(),af=Hr(),jv=He(),t7=Er(),xY=$l().isValid;function _Y(e,r,t){var a=r?jv.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if(jv.isArrayOrTypedArray(n)){for(var l=0;l=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function s7(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),l=0;l{"use strict";var f7=ip(),TY=f7.FORMAT_LINK,MY=f7.DATE_FORMAT_LINK;function AY(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?Yp:c7)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function Yp(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+TY+"."].join(" ")}function c7(e,r){return Yp(e,r)+[" And for dates see: "+MY+".","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(" ")}v7.exports={axisHoverFormat:AY,descriptionOnlyNumbers:Yp,descriptionWithDates:c7}});var Xn=Z((boe,L7)=>{"use strict";var h7=ha(),Ss=hi(),S7=mi().dash,Gp=Yt().extendFlat,d7=ct().templatedArray,p7=r0().descriptionWithDates,kY=Bt().ONEDAY,gi=da(),CY=gi.HOUR_PATTERN,SY=gi.WEEKDAY_PATTERN,Up={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},LY=Gp({},Up,{values:Up.values.slice().concat(["sync"])});function m7(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var y7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},b7={valType:"data_array",editType:"ticks"},x7={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function _7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function w7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var T7={valType:"color",dflt:Ss.defaultLine,editType:"ticks"},M7={valType:"color",dflt:Ss.lightLine,editType:"ticks"};function A7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var k7=Gp({},S7,{editType:"ticks"}),C7={valType:"boolean",editType:"ticks"};L7.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Ss.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:h7({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[gi.idRegex.x.toString(),gi.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:[gi.idRegex.x.toString(),gi.idRegex.y.toString()],editType:"calc"},rangebreaks:d7("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:[SY,CY,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:kY},editType:"calc"}),tickmode:LY,nticks:m7(),tick0:y7,dtick:g7,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:b7,ticktext:{valType:"data_array",editType:"ticks"},ticks:x7,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:_7(),tickwidth:w7(),tickcolor:T7,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:Gp({},S7,{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:h7({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:p7("tick label")},tickformatstops:d7("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:p7("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Ss.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:C7,gridcolor:M7,gridwidth:A7(),griddash:k7,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Ss.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Ss.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",gi.idRegex.x.toString(),gi.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",gi.idRegex.x.toString(),gi.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Up,nticks:m7("minor"),tick0:y7,dtick:g7,tickvals:b7,ticks:x7,ticklen:_7("minor"),tickwidth:w7("minor"),tickcolor:T7,gridcolor:M7,gridwidth:A7("minor"),griddash:k7,showgrid:C7,editType:"ticks"},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 t0=Z((xoe,E7)=>{"use strict";var ht=Xn(),q7=ha(),D7=Yt().extendFlat,qY=pi().overrideAll;E7.exports=qY({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:ht.linecolor,outlinewidth:ht.linewidth,bordercolor:ht.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:ht.minor.tickmode,nticks:ht.nticks,tick0:ht.tick0,dtick:ht.dtick,tickvals:ht.tickvals,ticktext:ht.ticktext,ticks:D7({},ht.ticks,{dflt:""}),ticklabeloverflow:D7({},ht.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:ht.ticklen,tickwidth:ht.tickwidth,tickcolor:ht.tickcolor,ticklabelstep:ht.ticklabelstep,showticklabels:ht.showticklabels,labelalias:ht.labelalias,tickfont:q7({}),tickangle:ht.tickangle,tickformat:ht.tickformat,tickformatstops:ht.tickformatstops,tickprefix:ht.tickprefix,showtickprefix:ht.showtickprefix,ticksuffix:ht.ticksuffix,showticksuffix:ht.showticksuffix,separatethousands:ht.separatethousands,exponentformat:ht.exponentformat,minexponent:ht.minexponent,showexponent:ht.showexponent,title:{text:{valType:"string"},font:q7({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var nf=Z((woe,R7)=>{"use strict";var DY=t0(),EY=cs().counter,PY=hp(),P7=$l().scales,_oe=PY(P7);function a0(e){return"`"+e+"`"}R7.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",l="showScaleDflt"in t?t.showScaleDflt:a==="z",o=typeof t.colorscaleDflt=="string"?P7[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,v;"colorAttr"in t?(f=t.colorAttr,v=t.colorAttr):(f={z:"z",c:"color"}[a],v="in "+a0(u+f));var h=n?" Has an effect only if "+v+" is set to a numerical array.":"",d=a+"auto",m=a+"min",g=a+"max",y=a+"mid",w=a0(u+d),_=a0(u+m),T=a0(u+g),b=_+" and "+T,A={};A[m]=A[g]=void 0;var S={};S[d]=!1;var k={};return f==="color"&&(k.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(k.color.anim=!0)),k[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:A},k[m]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},k[g]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},k[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:A},k.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},k.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},k.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(k.showscale={valType:"boolean",dflt:l,editType:"calc"},k.colorbar=DY),t.noColorAxis||(k.coloraxis={valType:"subplotid",regex:EY("coloraxis"),dflt:null,editType:"calc"}),k}});var Wp=Z((Toe,z7)=>{"use strict";var RY=Yt().extendFlat,zY=nf(),Vp=$l().scales;z7.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Vp.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Vp.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Vp.RdBu,editType:"calc"}},coloraxis:RY({_isSubplotObj:!0,editType:"calc"},zY("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Zp=Z((Moe,N7)=>{"use strict";var NY=He();N7.exports=function(r){return NY.isPlainObject(r.colorbar)}});var Kp=Z(Jp=>{"use strict";var Xp=Hr(),F7=He(),I7=Bt(),FY=I7.ONEDAY,IY=I7.ONEWEEK;Jp.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?FY:1;if(!e)return i;if(Xp(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var l=e.charAt(0),o=e.substr(1);return o=Xp(o)?Number(o):0,o<=0||!(a&&l==="M"&&o===Math.round(o)||t&&l==="L"||t&&l==="D"&&(o===1||o===2))?i:e};Jp.tick0=function(e,r,t,a){if(r==="date")return F7.cleanDate(e,F7.dateTick0(t,a%IY===0?1:0));if(!(a==="D1"||a==="D2"))return Xp(e)?Number(e):0}});var Qp=Z((koe,O7)=>{"use strict";var H7=Kp(),HY=He().isArrayOrTypedArray,OY=nn().isTypedArraySpec,BY=nn().decodeTypedArraySpec;O7.exports=function(r,t,a,n,i){i||(i={});var l=i.isMinor,o=l?r.minor||{}:r,s=l?t.minor:t,u=l?"minor.":"";function f(_){var T=o[_];return OY(T)&&(T=BY(T)),T!==void 0?T:(s._template||{})[_]}var v=f("tick0"),h=f("dtick"),d=f("tickvals"),m=HY(d)?"array":h?"linear":"auto",g=a(u+"tickmode",m);if(g==="auto"||g==="sync")a(u+"nticks");else if(g==="linear"){var y=s.dtick=H7.dtick(h,n);s.tick0=H7.tick0(v,n,t.calendar,y)}else if(n!=="multicategory"){var w=a(u+"tickvals");w===void 0?s.tickmode="auto":l||a("ticktext")}}});var jp=Z((Coe,Y7)=>{"use strict";var $p=He(),B7=Xn();Y7.exports=function(r,t,a,n){var i=n.isMinor,l=i?r.minor||{}:r,o=i?t.minor:t,s=i?B7.minor:B7,u=i?"minor.":"",f=$p.coerce2(l,o,s,"ticklen",i?(t.ticklen||5)*.6:void 0),v=$p.coerce2(l,o,s,"tickwidth",i?t.tickwidth||1:void 0),h=$p.coerce2(l,o,s,"tickcolor",(i?t.tickcolor:void 0)||o.color),d=a(u+"ticks",!i&&n.outerTicks||f||v||h?"outside":"");d||(delete o.ticklen,delete o.tickwidth,delete o.tickcolor)}});var em=Z((Soe,U7)=>{"use strict";U7.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var Jn=Z((Loe,G7)=>{"use strict";var n0=He(),YY=ct();G7.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",l=t[n],o=n0.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=YY.arrayTemplater(t,n,i),f,v;for(f=0;f{"use strict";var rm=He(),UY=Er().contrast,V7=Xn(),GY=em(),VY=Jn();W7.exports=function(r,t,a,n,i){i||(i={});var l=a("labelalias");rm.isPlainObject(l)||delete t.labelalias;var o=GY(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,v=t.ticklabelposition||"",h=v.indexOf("inside")!==-1?UY(i.bgColor):f&&f!==V7.color.dflt?f:u.color;if(rm.coerceFont(a,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var m=a("tickformat");VY(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:WY}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!m&&n!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function WY(e,r){function t(n,i){return rm.coerce(e,r,V7.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var am=Z((Doe,Z7)=>{"use strict";var ZY=em();Z7.exports=function(r,t,a,n,i){i||(i={});var l=i.tickSuffixDflt,o=ZY(r),s=a("tickprefix");s&&a("showtickprefix",o);var u=a("ticksuffix",l);u&&a("showticksuffix",o)}});var nm=Z((Eoe,X7)=>{"use strict";var ml=He(),XY=ct(),JY=Qp(),KY=jp(),QY=tm(),$Y=am(),jY=t0();X7.exports=function(r,t,a){var n=XY.newContainer(t,"colorbar"),i=r.colorbar||{};function l(z,N){return ml.coerce(i,n,jY,z,N)}var o=a.margin||{t:0,b:0,l:0,r:0},s=a.width-o.l-o.r,u=a.height-o.t-o.b,f=l("orientation"),v=f==="v",h=l("thicknessmode");l("thickness",h==="fraction"?30/(v?s:u):30);var d=l("lenmode");l("len",d==="fraction"?1:v?u:s);var m=l("yref"),g=l("xref"),y=m==="paper",w=g==="paper",_,T,b,A="left";v?(b="middle",A=w?"left":"right",_=w?1.02:1,T=.5):(b=y?"bottom":"top",A="center",_=.5,T=y?1.02:1),ml.coerce(i,n,{x:{valType:"number",min:w?-2:0,max:w?3:1,dflt:_}},"x"),ml.coerce(i,n,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:T}},"y"),l("xanchor",A),l("xpad"),l("yanchor",b),l("ypad"),ml.noneOrAll(i,n,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var S=ml.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",S.indexOf("inside")!==-1?"hide past domain":"hide past div"),JY(i,n,l,"linear");var k=a.font,q={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:k};S.indexOf("inside")!==-1&&(q.bgColor="black"),$Y(i,n,l,"linear",q),QY(i,n,l,"linear",q),KY(i,n,l,"linear",q),l("title.text",a._dfltTitle.colorbar);var D=n.showticklabels?n.tickfont:k,R=ml.extendFlat({},k,{family:D.family,size:ml.bigFont(D.size)});ml.coerceFont(l,"title.font",R),l("title.side",v?"top":"right")}});var Ls=Z((Poe,Q7)=>{"use strict";var J7=Hr(),lm=He(),eU=Zp(),rU=nm(),K7=$l().isValid,tU=gr().traceIs;function im(e,r){var t=r.slice(0,r.length-1);return r?lm.nestedProperty(e,t).get()||{}:e}Q7.exports=function e(r,t,a,n,i){var l=i.prefix,o=i.cLetter,s="_module"in t,u=im(r,l),f=im(t,l),v=im(t._template||{},l)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},m=n(l+"coloraxis");if(m){var g=tU(t,"contour")&&lm.nestedProperty(t,"contours.coloring").get()||"heatmap",y=d[m];y?(y[2].push(h),y[0]!==g&&(y[0]=!1,lm.warn(["Ignoring coloraxis:",m,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[m]=[g,t,[h]];return}}var w=u[o+"min"],_=u[o+"max"],T=J7(w)&&J7(_)&&w<_,b=n(l+o+"auto",!T);b?n(l+o+"mid"):(n(l+o+"min"),n(l+o+"max"));var A=u.colorscale,S=v.colorscale,k;if(A!==void 0&&(k=!K7(A)),S!==void 0&&(k=!K7(S)),n(l+"autocolorscale",k),n(l+"colorscale"),n(l+"reversescale"),l!=="marker.line."){var q;l&&s&&(q=eU(u));var D=n(l+"showscale",q);D&&(l&&v&&(f._template=v),rU(u,f,a))}}});var r9=Z((Roe,e9)=>{"use strict";var $7=He(),aU=ct(),j7=Wp(),nU=Ls();e9.exports=function(r,t){function a(v,h){return $7.coerce(r,t,j7,v,h)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,l;function o(v,h){return $7.coerce(i,l,j7.coloraxis,v,h)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},l=aU.newContainer(t,s,"coloraxis"),l._name=s,nU(i,l,t,o,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var iU=He(),lU=Tn().hasColorscale,oU=Tn().extractOpts;t9.exports=function(r,t){function a(f,v){var h=f["_"+v];h!==void 0&&(f[v]=h)}function n(f,v){var h=v.container?iU.nestedProperty(f,v.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=oU(h),m=d.auto;(m||d.min===void 0)&&a(h,v.min),(m||d.max===void 0)&&a(h,v.max),d.autocolorscale&&a(h,"colorscale")}}for(var i=0;i{"use strict";var n9=Hr(),om=He(),sU=Tn().extractOpts;i9.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,l=a.containerStr,o=l?om.nestedProperty(t,l).get():t,s=sU(o),u=s.auto!==!1,f=s.min,v=s.max,h=s.mid,d=function(){return om.aggNums(Math.min,null,i)},m=function(){return om.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(o._colorAx&&n9(f)?f=Math.min(f,d()):f=d()),v===void 0?v=m():u&&(o._colorAx&&n9(v)?v=Math.max(v,m()):v=m()),u&&h!==void 0&&(v-h>h-f?f=h-(v-h):v-h=0?g=n.colorscale.sequential:g=n.colorscale.sequentialminus,s._sync("colorscale",g)}}});var sm=Z((Foe,l9)=>{"use strict";var l0=$l(),qs=Tn();l9.exports={moduleType:"component",name:"colorscale",attributes:nf(),layoutAttributes:Wp(),supplyLayoutDefaults:r9(),handleDefaults:Ls(),crossTraceDefaults:a9(),calc:i0(),scales:l0.scales,defaultScale:l0.defaultScale,getScale:l0.get,isValidScale:l0.isValid,hasColorscale:qs.hasColorscale,extractOpts:qs.extractOpts,extractScale:qs.extractScale,flipScale:qs.flipScale,makeColorScaleFunc:qs.makeColorScaleFunc,makeColorScaleFuncFromTrace:qs.makeColorScaleFuncFromTrace}});var on=Z((Ioe,s9)=>{"use strict";var o9=He(),uU=nn().isTypedArraySpec;s9.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 r=e.marker;return o9.isPlainObject(r)&&(o9.isArrayOrTypedArray(r.size)||uU(r.size))}}});var f9=Z((Hoe,u9)=>{"use strict";var fU=Hr();u9.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,l=a.sizemode==="area"?function(o){return Math.sqrt(o/n)}:function(o){return o/n};return function(o){var s=l(o/t);return fU(s)&&s>0?Math.max(s,i):0}}});var bi=Z(_a=>{"use strict";var c9=He();_a.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};_a.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{d9.exports=pU;var um={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},dU=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function pU(e){var r=[];return e.replace(dU,function(t,a,n){var i=a.toLowerCase();for(n=yU(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==um[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var gU=fm(),Xe=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},Ar="M0,0Z",p9=Math.sqrt(2),yl=Math.sqrt(3),cm=Math.PI,vm=Math.cos,hm=Math.sin;x9.exports={circle:{n:0,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Cr(r,t,n):n}},square:{n:1,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.4,2),n=Xe(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.8/p9,2),n="l"+a+","+a,i="l"+a+",-"+a,l="l-"+a+",-"+a,o="l-"+a+","+a;return Cr(r,t,"M0,"+a+n+i+l+i+l+o+l+o+n+o+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2/yl,2),n=Xe(e/2,2),i=Xe(e,2);return Cr(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.6,2),n=Xe(e*1.2,2);return Cr(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.951,2),n=Xe(e*.588,2),i=Xe(-e,2),l=Xe(e*-.309,2),o=Xe(e*.809,2);return Cr(r,t,"M"+a+","+l+"L"+n+","+o+"H-"+n+"L-"+a+","+l+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e/2,2),i=Xe(e*yl/2,2);return Cr(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e/2,2),i=Xe(e*yl/2,2);return Cr(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.924,2),n=Xe(e*.383,2);return Cr(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(kr(r))return Ar;var a=e*1.4,n=Xe(a*.225,2),i=Xe(a*.951,2),l=Xe(a*.363,2),o=Xe(a*.588,2),s=Xe(-a,2),u=Xe(a*-.309,2),f=Xe(a*.118,2),v=Xe(a*.809,2),h=Xe(a*.382,2);return Cr(r,t,"M"+n+","+u+"H"+i+"L"+l+","+f+"L"+o+","+v+"L0,"+h+"L-"+o+","+v+"L-"+l+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.66,2),n=Xe(e*.38,2),i=Xe(e*.76,2);return Cr(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*yl*.8,2),n=Xe(e*.8,2),i=Xe(e*1.6,2),l=Xe(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Cr(r,t,"M-"+a+","+n+o+a+","+n+o+"0,-"+i+o+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*yl*.8,2),n=Xe(e*.8,2),i=Xe(e*1.6,2),l=Xe(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Cr(r,t,"M"+a+",-"+n+o+"-"+a+",-"+n+o+"0,"+i+o+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.1,2),n=Xe(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2),n=Xe(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*.7,2),n=Xe(e*1.4,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2),n=Xe(e*.7,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e/p9,2);return Cr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.3,2),n=Xe(e*.65,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*.85,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e/2,2),n=Xe(e,2);return Cr(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.2,2),n=Xe(e*1.6,2),i=Xe(e*.8,2);return Cr(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2);return Cr(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e,2),n=Xe(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(kr(r))return Ar;var a=Xe(e*2,2),n=Xe(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(kr(r))return Ar;var a=cm/2.5,n=2*e*vm(a),i=2*e*hm(a);return Cr(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(kr(r))return Ar;var a=cm/4,n=2*e*vm(a),i=2*e*hm(a);return Cr(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function kr(e){return e===null}var m9,y9,g9,b9;function Cr(e,r,t){if((!e||e%360===0)&&!r)return t;if(g9===e&&b9===r&&m9===t)return y9;g9=e,b9=r,m9=t;function a(y,w){var _=vm(y),T=hm(y),b=w[0],A=w[1]+(r||0);return[b*_-A*T,b*T+A*_]}for(var n=e/180*cm,i=0,l=0,o=gU(t),s="",u=0;u{"use strict";var Jt=Ir(),nt=He(),bU=nt.numberFormat,mo=Hr(),bm=bn(),s0=gr(),pa=Er(),xU=sm(),of=nt.strTranslate,u0=xa(),_U=fo(),wU=Da(),TU=wU.LINE_SPACING,D9=bv().DESELECTDIM,MU=on(),AU=f9(),kU=bi().appendArrayPointValue,Qe=B9.exports={};Qe.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,l=r.size,o=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;o&&e.style("font-family",o),l+1&&e.style("font-size",l+"px"),i&&e.call(pa.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",dm(SU(f))),s&&e.style("text-shadow",s==="auto"?u0.makeTextShadow(pa.contrast(i)):dm(s)),u&&e.style("text-decoration-line",dm(LU(u)))};function dm(e){return e==="none"?void 0:e}var CU={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function SU(e){return CU[e]}function LU(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Qe.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Qe.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Qe.setRect=function(e,r,t,a,n){e.call(Qe.setPosition,r,t).call(Qe.setSize,a,n)};Qe.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(mo(n)&&mo(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",of(n,i));else return!1;return!0};Qe.translatePoints=function(e,r,t){e.each(function(a){var n=Jt.select(this);Qe.translatePoint(a,n,r,t)})};Qe.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Qe.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,l=i.xcalendar,o=i.ycalendar,s=s0.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Qe.hideOutsideRangePoint(u,Jt.select(this),t,a,l,o)})})}};Qe.crispRound=function(e,r,t){return!r||!mo(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Qe.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},l=t||i.width||0,o=n||i.dash||"";pa.stroke(r,a||i.color),Qe.dashLine(r,o,l)};Qe.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},l=r||i.width||0,o=a||i.dash||"";Jt.select(this).call(pa.stroke,t||i.color).call(Qe.dashLine,o,l)})};Qe.dashLine=function(e,r,t){t=+t||0,r=Qe.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Qe.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function E9(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,l=n&&Qe.getPatternAttr(n.shape,0,"");if(l){var o=Qe.getPatternAttr(n.bgcolor,0,null),s=Qe.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Qe.getPatternAttr(n.size,0,8),v=Qe.getPatternAttr(n.solidity,0,.3),h=r.uid;Qe.pattern(e,"point",t,h,l,f,v,void 0,n.fillmode,o,s,u)}else if(i&&i.type!=="none"){var d=i.type,m="scatterfill-"+r.uid;if(a&&(m="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var g,y;d==="horizontal"?(g={x:i.start,y:0},y={x:i.stop,y:0}):d==="vertical"&&(g={x:0,y:i.start},y={x:0,y:i.stop}),g.x=r._xA.c2p(g.x===void 0?r._extremes.x.min[0].val:g.x,!0),g.y=r._yA.c2p(g.y===void 0?r._extremes.y.min[0].val:g.y,!0),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.max[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.max[0].val:y.y,!0),e.call(z9,t,m,"linear",i.colorscale,"fill",g,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Qe.gradient,t,m,d,i.colorscale,"fill")}else r.fillcolor&&e.call(pa.fill,r.fillcolor)}Qe.singleFillStyle=function(e,r){var t=Jt.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};E9(e,n,r,!1)};Qe.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=Jt.select(this);a[0].trace&&E9(n,a[0].trace,r,t)})};var w9=_9();Qe.symbolNames=[];Qe.symbolFuncs=[];Qe.symbolBackOffs=[];Qe.symbolNeedLines={};Qe.symbolNoDot={};Qe.symbolNoFill={};Qe.symbolList=[];Object.keys(w9).forEach(function(e){var r=w9[e],t=r.n;Qe.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Qe.symbolNames[t]=e,Qe.symbolFuncs[t]=r.f,Qe.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Qe.symbolNeedLines[t]=!0),r.noDot?Qe.symbolNoDot[t]=!0:Qe.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Qe.symbolNoFill[t]=!0)});var qU=Qe.symbolNames.length,DU="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Qe.symbolNumber=function(e){if(mo(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Qe.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=qU||e>=400?0:Math.floor(Math.max(e,0))};function P9(e,r,t,a){var n=e%100;return Qe.symbolFuncs[n](r,t,a)+(e>=200?DU:"")}var T9=bU("~f"),R9={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}};Qe.gradient=function(e,r,t,a,n,i){var l=R9[a];return z9(e,r,t,l.type,n,i,l.start,l.stop,!1,l.reversed)};function z9(e,r,t,a,n,i,l,o,s,u){var f=n.length,v;a==="linear"?v={node:"linearGradient",attrs:{x1:l.x,y1:l.y,x2:o.x,y2:o.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(v={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?l.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||l.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Qe.symbolNumber(e.mx||l.symbol)||0;e.om=u%200>=100;var f=wm(e,t),v=_m(e,t);r.attr("d",P9(u,s,f,v))}var h=!1,d,m,g;if(e.so)g=o.outlierwidth,m=o.outliercolor,d=l.outliercolor;else{var y=(o||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?m=e.mlcc=a.lineScale(e.mlc):nt.isArrayOrTypedArray(o.color)?m=pa.defaultLine:m=o.color,nt.isArrayOrTypedArray(l.color)&&(d=pa.defaultLine,h=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=l.color||l.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(pa.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:g)+"px");var w=l.gradient,_=e.mgt;_?h=!0:_=w&&w.type,nt.isArrayOrTypedArray(_)&&(_=_[0],R9[_]||(_=0));var T=l.pattern,b=T&&Qe.getPatternAttr(T.shape,e.i,"");if(_&&_!=="none"){var A=e.mgc;A?h=!0:A=w.color;var S=t.uid;h&&(S+="-"+e.i),Qe.gradient(r,n,S,_,[[0,A],[1,d]],"fill")}else if(b){var k=!1,q=T.fgcolor;!q&&i&&i.color&&(q=i.color,k=!0);var D=Qe.getPatternAttr(q,e.i,i&&i.color||null),R=Qe.getPatternAttr(T.bgcolor,e.i,null),z=T.fgopacity,N=Qe.getPatternAttr(T.size,e.i,8),H=Qe.getPatternAttr(T.solidity,e.i,.3);k=k||e.mcc||nt.isArrayOrTypedArray(T.shape)||nt.isArrayOrTypedArray(T.bgcolor)||nt.isArrayOrTypedArray(T.fgcolor)||nt.isArrayOrTypedArray(T.size)||nt.isArrayOrTypedArray(T.solidity);var O=t.uid;k&&(O+="-"+e.i),Qe.pattern(r,"point",n,O,b,N,H,e.mcc,T.fillmode,R,D,z)}else nt.isArrayOrTypedArray(d)?pa.fill(r,d[e.i]):pa.fill(r,d);g&&pa.stroke(r,m)}};Qe.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Qe.tryColorscale(t,""),r.lineScale=Qe.tryColorscale(t,"line"),s0.traceIs(e,"symbols")&&(r.ms2mrc=MU.isBubble(e)?AU(e):function(){return(t.size||6)/2}),e.selectedpoints&&nt.extendFlat(r,Qe.makeSelectedPointStyleFns(e)),r};Qe.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},l=a.marker||{},o=n.opacity,s=i.opacity,u=l.opacity,f=s!==void 0,v=u!==void 0;(nt.isArrayOrTypedArray(o)||f||v)&&(r.selectedOpacityFn=function(b){var A=b.mo===void 0?n.opacity:b.mo;return b.selected?f?s:A:v?u:D9*A});var h=n.color,d=i.color,m=l.color;(d||m)&&(r.selectedColorFn=function(b){var A=b.mcc||h;return b.selected?d||A:m||A});var g=n.size,y=i.size,w=l.size,_=y!==void 0,T=w!==void 0;return s0.traceIs(e,"symbols")&&(_||T)&&(r.selectedSizeFn=function(b){var A=b.mrc||g/2;return b.selected?_?y/2:A:T?w/2:A}),r};Qe.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},l=a.textfont||{},o=n.color,s=i.color,u=l.color;return r.selectedTextColorFn=function(f){var v=f.tc||o;return f.selected?s||v:u||(s?v:pa.addOpacity(v,D9))},r};Qe.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Qe.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,l){i.style("opacity",t.selectedOpacityFn(l))}),t.selectedColorFn&&n.push(function(i,l){pa.fill(i,t.selectedColorFn(l))}),t.selectedSizeFn&&n.push(function(i,l){var o=l.mx||a.symbol||0,s=t.selectedSizeFn(l);i.attr("d",P9(Qe.symbolNumber(o),s,wm(l,r),_m(l,r))),l.mrc2=s}),n.length&&e.each(function(i){for(var l=Jt.select(this),o=0;o0?t:0}Qe.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Qe.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,l=t._fullLayout;e.each(function(o){var s=Jt.select(this),u=i?nt.extractOption(o,r,"txt","texttemplate"):nt.extractOption(o,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,v=f?f(o,r,l):{},h={};kU(h,r,o.i);var d=r._meta||{};u=nt.texttemplateString(u,v,l._d3locale,h,o,d)}var m=o.tp||r.textposition,g=F9(o,r),y=a?a(o):o.tc||r.textfont.color;s.call(Qe.font,{family:o.tf||r.textfont.family,weight:o.tw||r.textfont.weight,style:o.ty||r.textfont.style,variant:o.tv||r.textfont.variant,textcase:o.tC||r.textfont.textcase,lineposition:o.tE||r.textfont.lineposition,shadow:o.tS||r.textfont.shadow,size:g,color:y}).text(u).call(u0.convertToTspans,t).call(N9,m,g,o.mrc)})}};Qe.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Qe.makeSelectedTextStyleFns(r);e.each(function(a){var n=Jt.select(this),i=t.selectedTextColorFn(a),l=a.tp||r.textposition,o=F9(a,r);pa.fill(n,i);var s=s0.traceIs(r,"bar-like");N9(n,l,o,a.mrc2||a.mrc,s)})}};var M9=.5;Qe.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||b>=f&&b<=s)&&(A<=v&&A>=u||A>=v&&A<=u)&&(e=[b,A])}return e}Qe.applyBackoff=O9;Qe.makeTester=function(){var e=nt.ensureSingleById(Jt.select("body"),"svg","js-plotly-tester",function(t){t.attr(_U.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=nt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Qe.tester=e,Qe.testref=r};Qe.savedBBoxes={};var mm=0,RU=1e4;Qe.bBox=function(e,r,t){t||(t=A9(e));var a;if(t){if(a=Qe.savedBBoxes[t],a)return nt.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=A9(n),t){var i=+n.getAttribute("x")||0,l=+n.getAttribute("y")||0,o=n.getAttribute("transform");if(!o){var s=Qe.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),l&&(s.top+=l,s.bottom+=l),s}if(t+="~"+i+"~"+l+"~"+o,a=Qe.savedBBoxes[t],a)return nt.extendFlat({},a)}}var u,f;r?u=e:(f=Qe.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),Jt.select(u).attr("transform",null).call(u0.positionText,0,0);var v=u.getBoundingClientRect(),h=Qe.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:v.height,width:v.width,left:v.left-h.left,top:v.top-h.top,right:v.right-h.left,bottom:v.bottom-h.top};return mm>=RU&&(Qe.savedBBoxes={},mm=0),t&&(Qe.savedBBoxes[t]=d),mm++,nt.extendFlat({},d)};function A9(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Qe.setClipUrl=function(e,r,t){e.attr("clip-path",xm(r,t))};function xm(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Qe.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Qe.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||0,t=t||0,l=l.replace(a,"").trim(),l+=of(r,t),l=l.trim(),e[i]("transform",l),l};Qe.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Qe.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||1,t=t||1,l=l.replace(a,"").trim(),l+="scale("+r+","+t+")",l=l.trim(),e[i]("transform",l),l};var zU=/\s*sc.*/;Qe.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(zU,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var NU=/translate\([^)]*\)\s*$/;Qe.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=Jt.select(this),i=n.select("text");if(i.node()){var l=parseFloat(i.attr("x")||0),o=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(NU);r===1&&t===1?a=[]:a=[of(l,o),"scale("+r+","+t+")",of(-l,-o)],s&&a.push(s),n.attr("transform",a.join(""))}})};function _m(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Qe.getMarkerStandoff=_m;var lf=Math.atan2,vo=Math.cos,Es=Math.sin;function k9(e,r){var t=r[0],a=r[1];return[t*vo(e)-a*Es(e),t*Es(e)+a*vo(e)]}var C9,S9,L9,q9,ym,gm;function wm(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||nt.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var l=r._geo.project(e.lonlat);a=l[0],n=l[1]}else{var o=r._xA,s=r._yA;if(o&&s)a=o.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],v=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=lf(h[1]-n,h[0]-a),m=lf(v[1]-n,v[0]-a),g;if(i==="north")g=t/180*Math.PI;else if(i==="previous"){var y=u/180*Math.PI,w=f/180*Math.PI,_=C9/180*Math.PI,T=S9/180*Math.PI,b=_-y,A=vo(T)*Es(b),S=Es(T)*vo(w)-vo(T)*Es(w)*vo(b);g=-lf(A,S)-Math.PI,C9=u,S9=f}var k=k9(d,[vo(g),0]),q=k9(m,[Es(g),0]);t=lf(k[1]+q[1],k[0]+q[0])/Math.PI*180,i==="previous"&&!(gm===r.uid&&e.i===ym+1)&&(t=null)}if(i==="previous"&&!r._geo)if(gm===r.uid&&e.i===ym+1&&mo(a)&&mo(n)){var D=a-L9,R=n-q9,z=r.line&&r.line.shape||"",N=z.slice(z.length-1);N==="h"&&(R=0),N==="v"&&(D=0),t+=lf(R,D)/Math.PI*180+90}else t=null}return L9=a,q9=n,ym=e.i,gm=r.uid,t}Qe.getMarkerAngle=wm});var sf=Z((Goe,V9)=>{"use strict";var Ps=Ir(),FU=Hr(),IU=Pt(),Tm=gr(),yo=He(),Y9=yo.strTranslate,f0=tt(),c0=Er(),Rs=xa(),U9=bv(),HU=Da().OPPOSITE_SIDE,G9=/ [XY][0-9]* /,Mm=1.6,Am=1.6;function OU(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,l=t.placeholder,o=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,v=t.containerGroup,h=1,d=n.title,m=(d&&d.text?d.text:"").trim(),g=!1,y=d&&d.font?d.font:{},w=y.family,_=y.size,T=y.color,b=y.weight,A=y.style,S=y.variant,k=y.textcase,q=y.lineposition,D=y.shadow,R=t.subtitlePropName,z=!!R,N=t.subtitlePlaceholder,H=(n.title||{}).subtitle||{text:"",font:{}},O=H.text.trim(),J=!1,X=1,B=H.font,I=B.family,V=B.size,K=B.color,Q=B.weight,ie=B.style,me=B.variant,pe=B.textcase,ge=B.lineposition,j=B.shadow,_e;i==="title.text"?_e="titleText":i.indexOf("axis")!==-1?_e="axisTitleText":i.indexOf("colorbar"!==-1)&&(_e="colorbarTitleText");var se=e._context.edits[_e];function Se(Be,Ne){return Be===void 0||Ne===void 0?!1:Be.replace(G9," % ")===Ne.replace(G9," % ")}m===""?h=0:Se(m,l)&&(se||(m=""),h=.2,g=!0),z&&(O===""?X=0:Se(O,N)&&(se||(O=""),X=.2,J=!0)),t._meta?m=yo.templateString(m,t._meta):a._meta&&(m=yo.templateString(m,a._meta));var ve=m||O||se,Ae;v||(v=yo.ensureSingle(a._infolayer,"g","g-"+r),Ae=a._hColorbarMoveTitle);var Y=v.selectAll("text."+r).data(ve?[0]:[]);Y.enter().append("text"),Y.text(m).attr("class",r),Y.exit().remove();var re=null,U=r+"-subtitle",de=O||se;if(z&&de&&(re=v.selectAll("text."+U).data(de?[0]:[]),re.enter().append("text"),re.text(O).attr("class",U),re.exit().remove()),!ve)return v;function be(Be,Ne){yo.syncOrAsync([ye,Fe],{title:Be,subtitle:Ne})}function ye(Be){var Ne=Be.title,Ee=Be.subtitle,Je;!f&&Ae&&(f={}),f?(Je="",f.rotate&&(Je+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||Ae)&&(Je+=Y9(0,(f.offset||0)-(Ae||0)))):Je=null,Ne.attr("transform",Je);function We(De){if(De){var Le=Ps.select(De.node().parentNode).select("."+U);if(!Le.empty()){var Ye=De.node().getBBox();if(Ye.height){var Ze=Ye.y+Ye.height+Mm*V;Le.attr("y",Ze)}}}}if(Ne.style("opacity",h*c0.opacity(T)).call(f0.font,{color:c0.rgb(T),size:Ps.round(_,2),family:w,weight:b,style:A,variant:S,textcase:k,shadow:D,lineposition:q}).attr(u).call(Rs.convertToTspans,e,We),Ee){var ne=v.select("."+r+"-math-group"),Me=Ne.node().getBBox(),Ce=ne.node()?ne.node().getBBox():void 0,cr=Ce?Ce.y+Ce.height+Mm*V:Me.y+Me.height+Am*V,tr=yo.extendFlat({},u,{y:cr});Ee.attr("transform",Je),Ee.style("opacity",X*c0.opacity(K)).call(f0.font,{color:c0.rgb(K),size:Ps.round(V,2),family:I,weight:Q,style:ie,variant:me,textcase:pe,shadow:j,lineposition:ge}).attr(tr).call(Rs.convertToTspans,e)}return IU.previousPromises(e)}function Fe(Be){var Ne=Be.title,Ee=Ps.select(Ne.node().parentNode);if(s&&s.selection&&s.side&&m){Ee.attr("transform",null);var Je=HU[s.side],We=s.side==="left"||s.side==="top"?-1:1,ne=FU(s.pad)?s.pad:2,Me=f0.bBox(Ee.node()),Ce={t:0,b:0,l:0,r:0},cr=e._fullLayout._reservedMargin;for(var tr in cr)for(var De in cr[tr]){var Le=cr[tr][De];Ce[De]=Math.max(Ce[De],Le)}var Ye={left:Ce.l,top:Ce.t,right:a.width-Ce.r,bottom:a.height-Ce.b},Ze=s.maxShift||We*(Ye[s.side]-Me[s.side]),Ue=0;if(Ze<0)Ue=Ze;else{var Oe=s.offsetLeft||0,Ke=s.offsetTop||0;Me.left-=Oe,Me.right-=Oe,Me.top-=Ke,Me.bottom-=Ke,s.selection.each(function(){var lr=f0.bBox(this);yo.bBoxIntersect(Me,lr,ne)&&(Ue=Math.max(Ue,We*(lr[s.side]-Me[Je])+ne))}),Ue=Math.min(Ze,Ue),n._titleScoot=Math.abs(Ue)}if(Ue>0||Ze<0){var fr={left:[-Ue,0],right:[Ue,0],top:[0,-Ue],bottom:[0,Ue]}[s.side];Ee.attr("transform",Y9(fr[0],fr[1]))}}}Y.call(be,re);function Re(Be,Ne){Be.text(Ne).on("mouseover.opacity",function(){Ps.select(this).transition().duration(U9.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Ps.select(this).transition().duration(U9.HIDE_PLACEHOLDER).style("opacity",0)})}if(se&&(m?Y.on(".opacity",null):(Re(Y,l),g=!0),Y.call(Rs.makeEditable,{gd:e}).on("edit",function(Be){o!==void 0?Tm.call("_guiRestyle",e,i,Be,o):Tm.call("_guiRelayout",e,i,Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(be)}).on("input",function(Be){this.text(Be||" ").call(Rs.positionText,u.x,u.y)}),z)){if(z&&!m){var Pe=Y.node().getBBox(),Ie=Pe.y+Pe.height+Am*V;re.attr("y",Ie)}O?re.on(".opacity",null):(Re(re,N),J=!0),re.call(Rs.makeEditable,{gd:e}).on("edit",function(Be){Tm.call("_guiRelayout",e,"title.subtitle.text",Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(be)}).on("input",function(Be){this.text(Be||" ").call(Rs.positionText,re.attr("x"),re.attr("y"))})}return Y.classed("js-placeholder",g),re&&re.classed("js-placeholder",J),v}V9.exports={draw:OU,SUBTITLE_PADDING_EM:Am,SUBTITLE_PADDING_MATHJAX_EM:Mm}});var b0=Z((Voe,K9)=>{"use strict";var BU=Ir(),YU=os().utcFormat,it=He(),UU=it.numberFormat,xi=Hr(),gl=it.cleanNumber,GU=it.ms2DateTime,W9=it.dateTime2ms,_i=it.ensureNumber,Z9=it.isArrayOrTypedArray,bl=Bt(),v0=bl.FP_SAFE,Kn=bl.BADNUM,VU=bl.LOG_CLIP,WU=bl.ONEWEEK,h0=bl.ONEDAY,d0=bl.ONEHOUR,X9=bl.ONEMIN,J9=bl.ONESEC,p0=Xt(),g0=da(),m0=g0.HOUR_PATTERN,y0=g0.WEEKDAY_PATTERN;function uf(e){return Math.pow(10,e)}function km(e){return e!=null}K9.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(b,A){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&A&&r.range&&r.range.length===2){var S=r.range[0],k=r.range[1];return .5*(S+k-2*VU*Math.abs(S-k))}else return Kn}function l(b,A,S,k){if((k||{}).msUTC&&xi(b))return+b;var q=W9(b,S||r.calendar);if(q===Kn)if(xi(b)){b=+b;var D=Math.floor(it.mod(b+.05,1)*10),R=Math.round(b-D/10);q=W9(new Date(R))+D/10}else return Kn;return q}function o(b,A,S){return GU(b,A,S||r.calendar)}function s(b){return r._categories[Math.round(b)]}function u(b){if(km(b)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[b]!==void 0)return r._categoriesMap[b];r._categories.push(typeof b=="number"?String(b):b);var A=r._categories.length-1;return r._categoriesMap[b]=A,A}return Kn}function f(b,A){for(var S=new Array(A),k=0;kr.range[1]&&(S=!S);for(var k=S?-1:1,q=k*b,D=0,R=0;RN)D=R+1;else{D=q<(z+N)/2?R:R+1;break}}var H=r._B[D]||0;return isFinite(H)?m(b,r._m2,H):0},w=function(b){var A=r._rangebreaks.length;if(!A)return g(b,r._m,r._b);for(var S=0,k=0;kr._rangebreaks[k].pmax&&(S=k+1);return g(b,r._m2,r._B[S])}}r.c2l=r.type==="log"?i:_i,r.l2c=r.type==="log"?uf:_i,r.l2p=y,r.p2l=w,r.c2p=r.type==="log"?function(b,A){return y(i(b,A))}:y,r.p2c=r.type==="log"?function(b){return uf(w(b))}:w,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=gl,r.c2d=r.c2r=r.l2d=r.l2r=_i,r.d2p=r.r2p=function(b){return r.l2p(gl(b))},r.p2d=r.p2r=w,r.cleanPos=_i):r.type==="log"?(r.d2r=r.d2l=function(b,A){return i(gl(b),A)},r.r2d=r.r2c=function(b){return uf(gl(b))},r.d2c=r.r2l=gl,r.c2d=r.l2r=_i,r.c2r=i,r.l2d=uf,r.d2p=function(b,A){return r.l2p(r.d2r(b,A))},r.p2d=function(b){return uf(w(b))},r.r2p=function(b){return r.l2p(gl(b))},r.p2r=w,r.cleanPos=_i):r.type==="date"?(r.d2r=r.r2d=it.identity,r.d2c=r.r2c=r.d2l=r.r2l=l,r.c2d=r.c2r=r.l2d=r.l2r=o,r.d2p=r.r2p=function(b,A,S){return r.l2p(l(b,0,S))},r.p2d=r.p2r=function(b,A,S){return o(w(b),A,S)},r.cleanPos=function(b){return it.cleanDate(b,Kn,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var A=d(b);return A!==void 0?A:r.fraction2r(.5)},r.l2r=r.c2r=_i,r.r2l=d,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(w(b))},r.r2p=r.d2p,r.p2r=w,r.cleanPos=function(b){return typeof b=="string"&&b!==""?b:_i(b)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var A=h(b);return A!==void 0?A:r.fraction2r(.5)},r.r2c_just_indices=v,r.l2r=r.c2r=_i,r.r2l=h,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(w(b))},r.r2p=r.d2p,r.p2r=w,r.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:_i(b)},r.setupMultiCategory=function(b){var A=r._traceIndices,S,k,q=r._matchGroup;if(q&&r._categories.length===0){for(var D in q)if(D!==a){var R=t[p0.id2name(D)];A=A.concat(R._traceIndices)}}var z=[[0,{}],[0,{}]],N=[];for(S=0;SR[1]&&(k[D?0:1]=S),k[0]===k[1]){var z=r.l2r(A),N=r.l2r(S);if(A!==void 0){var H=z+1;S!==void 0&&(H=Math.min(H,N)),k[D?1:0]=H}if(S!==void 0){var O=N+1;A!==void 0&&(O=Math.max(O,z)),k[D?0:1]=O}}}},r.cleanRange=function(b,A){r._cleanRange(b,A),r.limitRange(b)},r._cleanRange=function(b,A){A||(A={}),b||(b="range");var S=it.nestedProperty(r,b).get(),k,q;if(r.type==="date"?q=it.dfltRange(r.calendar):n==="y"?q=g0.DFLTRANGEY:r._name==="realaxis"?q=[0,1]:q=A.dfltRange||g0.DFLTRANGEX,q=q.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(q[0]=0),!S||S.length!==2){it.nestedProperty(r,b).set(q);return}var D=S[0]===null,R=S[1]===null;for(r.type==="date"&&!r.autorange&&(S[0]=it.cleanDate(S[0],Kn,r.calendar),S[1]=it.cleanDate(S[1],Kn,r.calendar)),k=0;k<2;k++)if(r.type==="date"){if(!it.isDateTime(S[k],r.calendar)){r[b]=q;break}if(r.r2l(S[0])===r.r2l(S[1])){var z=it.constrain(r.r2l(S[0]),it.MIN_MS+1e3,it.MAX_MS-1e3);S[0]=r.l2r(z-1e3),S[1]=r.l2r(z+1e3);break}}else{if(!xi(S[k]))if(!(D||R)&&xi(S[1-k]))S[k]=S[1-k]*(k?10:.1);else{r[b]=q;break}if(S[k]<-v0?S[k]=-v0:S[k]>v0&&(S[k]=v0),S[0]===S[1]){var N=Math.max(1,Math.abs(S[0]*1e-6));S[0]-=N,S[1]+=N}}},r.setScale=function(b){var A=t._size;if(r.overlaying){var S=p0.getFromId({_fullLayout:t},r.overlaying);r.domain=S.domain}var k=b&&r._r?"_r":"range",q=r.calendar;r.cleanRange(k);var D=r.r2l(r[k][0],q),R=r.r2l(r[k][1],q),z=n==="y";if(z?(r._offset=A.t+(1-r.domain[1])*A.h,r._length=A.h*(r.domain[1]-r.domain[0]),r._m=r._length/(D-R),r._b=-r._m*R):(r._offset=A.l+r.domain[0]*A.w,r._length=A.w*(r.domain[1]-r.domain[0]),r._m=r._length/(R-D),r._b=-r._m*D),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var N,H;if(r._rangebreaks=r.locateBreaks(Math.min(D,R),Math.max(D,R)),r._rangebreaks.length){for(N=0;NR&&(O=!O),O&&r._rangebreaks.reverse();var J=O?-1:1;for(r._m2=J*r._length/(Math.abs(R-D)-r._lBreaks),r._B.push(-r._m2*(z?R:D)),N=0;Nq&&(q+=7,Dq&&(q+=24,D=k&&D=k&&b=j.min&&(iej.max&&(j.max=me),pe=!1)}pe&&R.push({min:ie,max:me})}};for(S=0;S{"use strict";var Q9=Hr(),Cm=He(),ZU=Bt().BADNUM,x0=Cm.isArrayOrTypedArray,XU=Cm.isDateTime,JU=Cm.cleanNumber,$9=Math.round;e8.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if(x0(n)&&!n.length)return"-";if(!i&&eG(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var l=[],o=0;oi*2}function j9(e){return Math.max(1,(e-1)/1e3)}function jU(e,r){for(var t=e.length,a=j9(t),n=0,i=0,l={},o=0;on*2}function eG(e){return x0(e[0])&&x0(e[1])}});var ff=Z((Zoe,s8)=>{"use strict";var rG=Ir(),n8=Hr(),xl=He(),_0=Bt().FP_SAFE,tG=gr(),aG=tt(),i8=Xt(),nG=i8.getFromId,iG=i8.isLinked;s8.exports={applyAutorangeOptions:o8,getAutoRange:Lm,makePadFn:qm,doAutoRange:oG,findExtremes:sG,concatExtremes:Pm};function Lm(e,r){var t,a,n=[],i=e._fullLayout,l=qm(i,r,0),o=qm(i,r,1),s=Pm(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return xl.simpleMap(r.range,r.r2l);var v=u[0].val,h=f[0].val;for(t=1;t0&&(R=T-l(S)-o(k),R>b?z/R>A&&(q=S,D=k,A=z/R):z/T>A&&(q={val:S.val,nopad:1},D={val:k.val,nopad:1},A=z/T));function N(B,I){return Math.max(B,o(I))}if(v===h){var H=v-1,O=v+1;if(w)if(v===0)n=[0,1];else{var J=(v>0?f:u).reduce(N,0),X=v/(1-Math.min(.5,J/T));n=v>0?[0,X]:[X,0]}else _?n=[Math.max(0,H),Math.max(1,O)]:n=[H,O]}else w?(q.val>=0&&(q={val:0,nopad:1}),D.val<=0&&(D={val:0,nopad:1})):_&&(q.val-A*l(q)<0&&(q={val:0,nopad:1}),D.val<=0&&(D={val:1,nopad:1})),A=(D.val-q.val-r8(r,S.val,k.val))/(T-l(q)-o(D)),n=[q.val-A*l(q),D.val+A*o(D)];return n=o8(n,r),r.limitRange&&r.limitRange(),m&&n.reverse(),xl.simpleMap(n,r.l2r||Number)}function r8(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),S=b((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),k=b(t.vpadplus||t.vpad),q=b(t.vpadminus||t.vpad);if(!u){if(_=1/0,T=-1/0,s)for(v=0;v0&&(_=h),h>T&&h<_0&&(T=h);else for(v=0;v-_0&&(_=h),h>T&&h<_0&&(T=h);r=[_,T],i=2}var D={tozero:o,extrapad:l};function R(N){d=r[N],n8(d)&&(y=A(N),w=S(N),f?(m=e.c2l(d)-q(N),g=e.c2l(d)+k(N)):(_=d-q(N),T=d+k(N),s&&_=z;v--)R(v);return{min:a,max:n,opts:t}}function Dm(e,r,t,a){l8(e,r,t,a,uG)}function Em(e,r,t,a){l8(e,r,t,a,fG)}function l8(e,r,t,a,n){for(var i=a.tozero,l=a.extrapad,o=!0,s=0;s=t&&(u.extrapad||!l)){o=!1;break}else n(r,u.val)&&u.pad<=t&&(l||!u.extrapad)&&(e.splice(s,1),s--)}if(o){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:l})}}function a8(e){return n8(e)&&Math.abs(e)<_0}function uG(e,r){return e<=r}function fG(e,r){return e>=r}function cG(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&w0(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&w0(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function vG(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&w0(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&w0(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function w0(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),l<=s&&(l=s,a=s)}}return t=cG(t,r),a=vG(a,r),[t,a]}});var dt=Z((Xoe,q8)=>{"use strict";var Mn=Ir(),zt=Hr(),zs=Pt(),vf=gr(),br=He(),Ns=br.strTranslate,go=xa(),hG=sf(),hf=Er(),sn=tt(),dG=Xn(),u8=Kp(),ma=Bt(),pG=ma.ONEMAXYEAR,A0=ma.ONEAVGYEAR,k0=ma.ONEMINYEAR,mG=ma.ONEMAXQUARTER,Fm=ma.ONEAVGQUARTER,C0=ma.ONEMINQUARTER,yG=ma.ONEMAXMONTH,Fs=ma.ONEAVGMONTH,S0=ma.ONEMINMONTH,un=ma.ONEWEEK,Ea=ma.ONEDAY,_l=Ea/2,Ti=ma.ONEHOUR,df=ma.ONEMIN,L0=ma.ONESEC,gG=ma.ONEMILLI,bG=ma.ONEMICROSEC,bo=ma.MINUS_SIGN,E0=ma.BADNUM,Im={K:"zeroline"},Hm={K:"gridline",L:"path"},Om={K:"minor-gridline",L:"path"},x8={K:"tick",L:"path"},f8={K:"tick",L:"text"},c8={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},P0=Da(),cf=P0.MID_SHIFT,xo=P0.CAP_SHIFT,pf=P0.LINE_SPACING,xG=P0.OPPOSITE_SIDE,q0=3,Ve=q8.exports={};Ve.setConvert=b0();var _G=Sm(),Ui=Xt(),wG=Ui.idSort,TG=Ui.isLinked;Ve.id2name=Ui.id2name;Ve.name2id=Ui.name2id;Ve.cleanId=Ui.cleanId;Ve.list=Ui.list;Ve.listIds=Ui.listIds;Ve.getFromId=Ui.getFromId;Ve.getFromTrace=Ui.getFromTrace;var _8=ff();Ve.getAutoRange=_8.getAutoRange;Ve.findExtremes=_8.findExtremes;var MG=1e-4;function Gm(e){var r=(e[1]-e[0])*MG;return[e[0]-r,e[1]+r]}Ve.coerceRef=function(e,r,t,a,n,i){var l=a.charAt(a.length-1),o=t._fullLayout._subplots[l+"axis"],s=a+"ref",u={};return n||(n=o[0]||(typeof i=="string"?i:i[0])),i||(i=n),o=o.concat(o.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:o.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},br.coerce(e,r,u,s)};Ve.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Ve.coercePosition=function(e,r,t,a,n,i){var l,o,s=Ve.getRefType(a);if(s!=="range")l=br.ensureNumber,o=t(n,i);else{var u=Ve.getFromId(r,a);i=u.fraction2r(i),o=t(n,i),l=u.cleanPos}e[n]=l(o)};Ve.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?br.ensureNumber:Ve.getFromId(r,t).cleanPos;return a(e)};Ve.redrawComponents=function(e,r){r=r||Ve.listIds(e);var t=e._fullLayout;function a(n,i,l,o){for(var s=vf.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Ve.saveRangeInitial=function(e,r){for(var t=Ve.list(e,"",!0),a=!1,n=0;nv*.3||u(a)||u(n))){var h=t.dtick/2;e+=e+hl){var o=Number(t.substr(1));i.exactYears>l&&o%12===0?e=Ve.tickIncrement(e,"M6","reverse")+Ea*1.5:i.exactMonths>l?e=Ve.tickIncrement(e,"M1","reverse")+Ea*15.5:e-=_l;var s=Ve.tickIncrement(e,t);if(s<=a)return s}return e}Ve.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&zt(r._tmin),n;if(a){var i=Ve.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var l=br.simpleMap(r.range,r.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=br.simpleMap(n,r.l2r),e._isMinor=!0,Ve.prepTicks(e,t),a){var o=zt(r.dtick),s=zt(e.dtick),u=o?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);o&&s?Rm(u,f)?u===2*un&&f===2*Ea&&(e.dtick=un):u===2*un&&f===3*Ea?e.dtick=un:u===un&&!(r._input.minor||{}).nticks?e.dtick=Ea:d8(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":Rm(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?Rm(u,f)||(e.dtick=d8(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function Rm(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function d8(e,r){return Math.abs(e/r-1)<.001}Ve.prepTicks=function(e,r){var t=br.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?br.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=br.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,Ve.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,l=a):(i=a,l=a);var o=e[i].value,s=e[l].value,u=Math.abs(s-o),f=t||u,v=0;f>=k0?u>=k0&&u<=pG?v=u:v=A0:t===Fm&&f>=C0?u>=C0&&u<=mG?v=u:v=Fm:f>=S0?u>=S0&&u<=yG?v=u:v=Fs:t===un&&f>=un?v=un:f>=Ea?v=Ea:t===_l&&f>=_l?v=_l:t===Ti&&f>=Ti&&(v=Ti);var h;v>=u&&(v=u,h=!0);var d=n+v;if(r.rangebreaks&&v>0){for(var m=84,g=0,y=0;yun&&(v=u)}(v>0||a===0)&&(e[a].periodX=n+v/2)}}Ve.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,l=r.ticklabelmode==="period",o=r.range[0]>r.range[1],s=!r.ticklabelindex||br.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=br.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(T?0:1);b--){var A=!b;b?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var S=b?r:br.extendFlat({},r,r.minor);if(A?Ve.prepMinorTicks(S,r,t):Ve.prepTicks(S,t),S.tickmode==="array"){b?(y=[],m=p8(r,!A)):(w=[],g=p8(r,!A));continue}if(S.tickmode==="sync"){y=[],m=qG(r);continue}var k=Gm(u),q=k[0],D=k[1],R=zt(S.dtick),z=a==="log"&&!(R||S.dtick.charAt(0)==="L"),N=Ve.tickFirst(S,t);if(b){if(r._tmin=N,N=D:O<=D;O=Ve.tickIncrement(O,B,f,n)){if(b&&J++,S.rangebreaks&&!f){if(O=h)break}if(y.length>d||O===H)break;H=O;var I={value:O};b?(z&&O!==(O|0)&&(I.simpleLabel=!0),i>1&&J%i&&(I.skipLabel=!0),y.push(I)):(I.minor=!0,w.push(I))}}if(!w||w.length<2)s=!1;else{var V=(w[1].value-w[0].value)*(o?-1:1);eV(V,r.tickformat)||(s=!1)}if(!s)_=y;else{var K=y.concat(w);l&&y.length&&(K=K.slice(1)),K=K.sort(function(Ie,Be){return Ie.value-Be.value}).filter(function(Ie,Be,Ne){return Be===0||Ie.value!==Ne[Be-1].value});var Q=K.map(function(Ie,Be){return Ie.minor===void 0&&!Ie.skipLabel?Be:null}).filter(function(Ie){return Ie!==null});Q.forEach(function(Ie){s.map(function(Be){var Ne=Ie+Be;Ne>=0&&Ne-1;ve--){if(y[ve].drop){y.splice(ve,1);continue}y[ve].value=Nm(y[ve].value,r);var U=r.c2p(y[ve].value);(Ae?re>U-Y:reh||Eeh&&(Ne.periodX=h),Een&&hA0)r/=A0,a=n(10),e.dtick="M"+12*wi(r,a,T0);else if(i>Fs)r/=Fs,e.dtick="M"+wi(r,1,m8);else if(i>Ea){if(e.dtick=wi(r,Ea,e._hasDayOfWeekBreaks?[1,2,7,14]:DG),!t){var l=Ve.getTickFormat(e),o=e.ticklabelmode==="period";o&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=br.dateTick0(e.calendar,2):e.tick0=br.dateTick0(e.calendar,1),o&&(e._dowTick0=e.tick0)}}else i>Ti?e.dtick=wi(r,Ti,m8):i>df?e.dtick=wi(r,df,y8):i>L0?e.dtick=wi(r,L0,y8):(a=n(10),e.dtick=wi(r,a,T0))}else if(e.type==="log"){e.tick0=0;var s=br.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+wi(r,a,T0)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):Zm(e)?(e.tick0=0,a=1,e.dtick=wi(r,a,EG)):(e.tick0=0,a=n(10),e.dtick=wi(r,a,T0));if(e.dtick===0&&(e.dtick=1),!zt(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function A8(e){var r=e.dtick;if(e._tickexponent=0,!zt(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=Ea&&n<=10||r>=Ea*15)e._tickround="d";else if(r>=df&&n<=16||r>=Ti)e._tickround="M";else if(r>=L0&&n<=19||r>=df)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(zt(r)||r.charAt(0)==="L"){var l=e.range.map(e.r2d||Number);zt(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var o=Math.max(Math.abs(l[0]),Math.abs(l[1])),s=Math.floor(Math.log(o)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(D0(e.exponentformat)&&!Vm(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}Ve.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(zt(r))return br.increment(e,n*r);var i=r.charAt(0),l=n*Number(r.substr(1));if(i==="M")return br.incrementMonth(e,l,a);if(i==="L")return Math.log(Math.pow(10,e)+l)/Math.LN10;if(i==="D"){var o=r==="D2"?M8:T8,s=e+n*.01,u=br.roundUp(br.mod(s,1),o,t);return Math.floor(s)+Math.log(Mn.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};Ve.tickFirst=function(e,r){var t=e.r2l||Number,a=br.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&w<=e._length?y:null};if(i&&br.isArrayOrTypedArray(e.ticktext)){var v=br.simpleMap(e.range,e.r2l),h=(Math.abs(v[1]-v[0])-(e._lBreaks||0))/1e4;for(u=0;u"+o;else{var u=yf(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(l+="
")}r.text=l}function RG(e,r,t,a,n){var i=e.dtick,l=r.x,o=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),o||s==="L")r.text=mf(Math.pow(10,l),e,n,a);else if(zt(i)||s==="D"&&br.mod(l+.01,1)<.1){var u=Math.round(l),f=Math.abs(u),v=e.exponentformat;v==="power"||D0(v)&&Vm(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":bo)+f+"",r.fontSize*=1.25):(v==="e"||v==="E")&&f>2?r.text="1"+v+(u>0?"+":bo)+f:(r.text=mf(Math.pow(10,l),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,br.mod(l,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(l<0?.5:.25)))}}function zG(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function NG(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),l=n[0]===void 0?"":String(n[0]);t?r.text=l+" - "+i:(r.text=i,r.text2=l)}function FG(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=mf(r.x,e,n,a)}function IG(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=HG(i);if(l[1]>=100)r.text=mf(br.deg2rad(r.x),e,n,a);else{var o=r.x<0;l[1]===1?l[0]===1?r.text="\u03C0":r.text=l[0]+"\u03C0":r.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),o&&(r.text=bo+r.text)}}}else r.text=mf(r.x,e,n,a)}function HG(e){function r(o,s){return Math.abs(o-s)<=1e-6}function t(o,s){return r(s,0)?o:t(s,o%s)}function a(o){for(var s=1;!r(Math.round(o*s)/s,o);)s*=10;return s}var n=a(e),i=e*n,l=Math.abs(t(i,n));return[Math.round(i/l),Math.round(n/l)]}var OG=["f","p","n","\u03BC","m","","k","M","G","T"];function D0(e){return e==="SI"||e==="B"}function Vm(e){return e>14||e<-15}function mf(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Ve.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:l,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:zt(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};A8(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,bo);var v=Math.pow(10,-i)/2;if(l==="none"&&(o=0),e=Math.abs(e),e"+m+"":l==="B"&&o===9?e+="B":D0(l)&&(e+=OG[o/3+5])}return n?bo+e:e}Ve.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*Fs}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var v=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return v===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):v-h}else return typeof s=="number"?1:-1}function n(s,u,f){var v=f||function(m){return m},h=u[0],d=u[1];return(!h&&typeof h!="number"||v(h)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function i(s,u){var f=u[0]===null,v=u[1]===null,h=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||h)&&(v||d)}var l,o;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var o={false:{left:0,right:0}};return br.syncOrAsync(n.map(function(s){return function(){if(s){var u=Ve.getFromId(e,s);t||(t={}),t.axShifts=o,t.overlayingShiftedAx=l;var f=Ve.drawOne(e,u,t);return u._shiftPusher&&Um(u,u._fullDepth||0,o,!0),u._r=u.range.slice(),u._rl=br.simpleMap(u._r,u.r2l),f}}}))};Ve.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,l,o;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),v=Ve.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),Um(r,d,a,!0),Um(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=jG(r,a));var m=h[f+"axislayer"],g=r._mainLinePosition,y=g+=r._shift,w=r._mainMirrorPosition,_=r._vals=Ve.calcTicks(r),T=[r.mirror,y,w].join("_");for(i=0;i<_.length;i++)_[i].axInfo=T;r._selections={},r._tickAngles&&(r._prevTickAngles=r._tickAngles),r._tickAngles={},r._depth=null;var b={};function A(Re){var Pe=u+(Re||"tick");return b[Pe]||(b[Pe]=GG(r,Pe,y)),b[Pe]}if(r.visible){var S=Ve.makeTransTickFn(r),k=Ve.makeTransTickLabelFn(r),q,D,R=r.ticks==="inside",z=r.ticks==="outside";if(r.tickson==="boundaries"){var N=BG(r,_);D=Ve.clipEnds(r,N),q=R?D:N}else D=Ve.clipEnds(r,_),q=R&&r.ticklabelmode!=="period"?D:_;var H=r._gridVals=D,O=UG(r,_);if(!s._hasOnlyLargeSploms){var J=r._subplotsWith,X={};for(i=0;i0?Ne.bottom-Ie:0,Be))));var ne=0,Me=0;if(r._shiftPusher&&(ne=Math.max(Be,Ne.height>0?Re==="l"?Ie-Ne.left:Ne.right-Ie:0),r.title.text!==s._dfltTitle[f]&&(Me=(r._titleStandoff||0)+(r._titleScoot||0),Re==="l"&&(Me+=b8(r))),r._fullDepth=Math.max(ne,Me)),r.automargin){Ee={x:0,y:0,r:0,l:0,t:0,b:0};var Ce=[0,1],cr=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Re==="b"?Ee[Re]=r._depth:(Ee[Re]=r._depth=Math.max(Ne.width>0?Ie-Ne.top:0,Be),Ce.reverse()),Ne.width>0){var tr=Ne.right-(r._offset+r._length);tr>0&&(Ee.xr=1,Ee.r=tr);var De=r._offset-Ne.left;De>0&&(Ee.xl=0,Ee.l=De)}}else if(Re==="l"?(r._depth=Math.max(Ne.height>0?Ie-Ne.left:0,Be),Ee[Re]=r._depth-cr):(r._depth=Math.max(Ne.height>0?Ne.right-Ie:0,Be),Ee[Re]=r._depth+cr,Ce.reverse()),Ne.height>0){var Le=Ne.bottom-(r._offset+r._length);Le>0&&(Ee.yb=0,Ee.b=Le);var Ye=r._offset-Ne.top;Ye>0&&(Ee.yt=1,Ee.t=Ye)}Ee[v]=r.anchor==="free"?r.position:r._anchorAxis.domain[Ce[0]],r.title.text!==s._dfltTitle[f]&&(Ee[Re]+=b8(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Je={x:0,y:0,r:0,l:0,t:0,b:0},Je[Pe]=r.linewidth,r.mirror&&r.mirror!==!0&&(Je[Pe]+=Be),r.mirror===!0||r.mirror==="ticks"?Je[v]=r._anchorAxis.domain[Ce[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Je[v]=[r._counterDomainMin,r._counterDomainMax][Ce[1]]))}Fe&&(We=vf.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(g8(Ee,r.automargin),g8(Je,r.automargin)),zs.autoMargin(e,Wm(r),Ee),zs.autoMargin(e,S8(r),Je),zs.autoMargin(e,L8(r),We)}),br.syncOrAsync(be)}};function g8(e,r){if(e){var t=Object.keys(c8).reduce(function(a,n){return r.indexOf(n)!==-1&&c8[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function BG(e,r){var t=[],a,n=function(i,l){var o=i.xbnd[l];o!==null&&t.push(br.extendFlat({},i,{x:o}))};if(r.length){for(a=0;ae.range[1],o=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!o;if(t){var u=l?-1:1;t=t*u}if(a){var f=e.side,v=o&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*v}return e._id.charAt(0)==="x"?function(h){return Ns(n+e._offset+e.l2p(Bm(h))+t,i+a)}:function(h){return Ns(i+a,n+e._offset+e.l2p(Bm(h))+t)}};function Bm(e){return e.periodX!==void 0?e.periodX:e.x}function VG(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),l=t("bottom"),o=t("inside"),s=l||n||a||i;if(!s&&!o)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,v=q0,h=e.tickfont?e.tickfont.size:12;return(l||a)&&(f+=h*xo,v+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,v+=q0),o&&u==="top"&&(v-=h*(1-xo)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(v=-v),[s?f:0,o?v:0]}Ve.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,l=e._id.charAt(0),o=(e.linewidth||1)/2;return l==="x"?"M0,"+(r+o*t)+"v"+i*t:"M"+(r+o*t)+",0h"+i*t};Ve.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(N){return a.indexOf(N)!==-1},i=n("top"),l=n("left"),o=n("right"),s=n("bottom"),u=s||l||i||o,f=n("inside"),v=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,m=v?e.ticklen:0;if(f?m*=-1:u&&(m=0),v&&(h+=m,t)){var g=br.deg2rad(t);h=m*Math.cos(g)+1,d=m*Math.sin(g)}e.showticklabels&&(v||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:h,labelShift:d},w,_,T,b,A=0,S=e.side,k=e._id.charAt(0),q=e.tickangle,D;if(k==="x")D=!f&&S==="bottom"||f&&S==="top",b=D?1:-1,f&&(b*=-1),w=d*b,_=r+h*b,T=D?1:-.2,Math.abs(q)===90&&(f?T+=cf:q===-90&&S==="bottom"?T=xo:q===90&&S==="top"?T=cf:T=.5,A=cf/2*(q/90)),y.xFn=function(N){return N.dx+w+A*N.fontSize},y.yFn=function(N){return N.dy+_+N.fontSize*T},y.anchorFn=function(N,H){if(u){if(l)return"end";if(o)return"start"}return!zt(H)||H===0||H===180?"middle":H*b<0!==f?"end":"start"},y.heightFn=function(N,H,O){return H<-60||H>60?-.5*O:e.side==="top"!==f?-O:0};else if(k==="y"){if(D=!f&&S==="left"||f&&S==="right",b=D?1:-1,f&&(b*=-1),w=h,_=d*b,T=0,!f&&Math.abs(q)===90&&(q===-90&&S==="left"||q===90&&S==="right"?T=xo:T=.5),f){var R=zt(q)?+q:0;if(R!==0){var z=br.deg2rad(R);A=Math.abs(Math.sin(z))*xo*b,T=0}}y.xFn=function(N){return N.dx+r-(w+N.fontSize*T)*b+A*N.fontSize},y.yFn=function(N){return N.dy+_+N.fontSize*cf},y.anchorFn=function(N,H){return zt(H)&&Math.abs(H)===90?"middle":D?"end":"start"},y.heightFn=function(N,H,O){return e.side==="right"&&(H*=-1),H<-30?-O:H<30?-.5*O:0}}return y};function R0(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Ve.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(l){return l.minor&&!l.noTick}):[]).concat(r.ticks?t.vals.filter(function(l){return!l.minor&&!l.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,R0);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(l){return hf.stroke(Mn.select(this),l.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(l){return sn.crispRound(e,l.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),z0(r,[x8]),i.attr("transform",t.transFn)};Ve.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(w){return w.minor}):[],l=r.showgrid?t.vals.filter(function(w){return!w.minor}):[],o=t.counterAxis;if(o&&Ve.shouldShowZeroLine(e,r,o))for(var s=r.tickmode==="array",u=0;u=0;m--){var g=m?h:d;if(g){var y=g.selectAll("path."+a).data(m?l:i,R0);y.exit().remove(),y.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),y.attr("transform",t.transFn).attr("d",t.path).each(function(w){return hf.stroke(Mn.select(this),w.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(w){return sn.dashStyle(w.minor?r.minor.griddash:r.griddash,w.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(w){return(w.minor?v:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&y.attr("d",t.path)}}z0(r,[Hm,Om])}};Ve.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=Ve.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(l,o){return wG(l.id,o.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(hf.stroke,r.zerolinecolor||hf.defaultLine).style("stroke-width",sn.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),z0(r,[Im])};Ve.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",l=t.vals.filter(function(I){return I.text}),o=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?l:[],R0),v=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(I){var V=Mn.select(this),K=e._promises.length;V.call(go.positionText,o.xFn(I),o.yFn(I)).call(sn.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(go.convertToTspans,e),e._promises[K]?v.push(e._promises.pop().then(function(){h(V,s)})):h(V,s)}),z0(r,[f8]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(I){Mn.select(this).select("text").call(go.positionText,o.xFn(I),o.yFn(I))});function h(I,V){I.each(function(K){var Q=Mn.select(this),ie=Q.select(".text-math-group"),me=o.anchorFn(K,V),pe=t.transFn.call(Q.node(),K)+(zt(V)&&+V!=0?" rotate("+V+","+o.xFn(K)+","+(o.yFn(K)-K.fontSize/2)+")":""),ge=go.lineCount(Q),j=pf*K.fontSize,_e=o.heightFn(K,zt(V)?+V:0,(ge-1)*j);if(_e&&(pe+=Ns(0,_e)),ie.empty()){var se=Q.select("text");se.attr({transform:pe,"text-anchor":me}),se.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var Se=sn.bBox(ie.node()).width,ve=Se*{end:-.5,start:.5}[me];ie.attr("transform",pe+Ns(ve,0))}})}r._adjustTickLabelsOverflow=function(){var I=r.ticklabeloverflow;if(!(!I||I==="allow")){var V=I.indexOf("hide")!==-1,K=r._id.charAt(0)==="x",Q=0,ie=K?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var me=br.simpleMap(r.range,r.r2l);Q=r.l2p(me[0])+r._offset,ie=r.l2p(me[1])+r._offset}var pe=Math.min(Q,ie),ge=Math.max(Q,ie),j=r.side,_e=1/0,se=-1/0;f.each(function(Y){var re=Mn.select(this),U=re.select(".text-math-group");if(U.empty()){var de=sn.bBox(re.node()),be=0;K?(de.right>ge||de.leftge||de.top+(r.tickangle?0:Y.fontSize/4)r["_visibleLabelMin_"+me._id]?Y.style("display","none"):ge.K==="tick"&&!pe&&Y.style("display",null)})})})})},h(f,u+1?u:s);function d(){return v.length&&Promise.all(v)}var m=null;function g(){if(h(f,s),l.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){m=r.autotickangles[0];var I=0,V=[],K,Q=1;f.each(function(Ne){I=Math.max(I,Ne.fontSize);var Ee=r.l2p(Ne.x),Je=Ym(this),We=sn.bBox(Je.node());Q=Math.max(Q,go.lineCount(Je)),V.push({top:0,bottom:10,height:10,left:Ee-We.width/2,right:Ee+We.width/2+2,width:We.width+2})});var ie=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,me=l.length,pe=Math.abs((l[me-1].x-l[0].x)*r._m)/(me-1),ge=ie?pe/2:pe,j=ie?r.ticklen:I*1.25*Q,_e=Math.sqrt(Math.pow(ge,2)+Math.pow(j,2)),se=ge/_e,Se=r.autotickangles.map(function(Ne){return Ne*Math.PI/180}),ve=Se.find(function(Ne){return Math.abs(Math.cos(Ne))<=se});ve===void 0&&(ve=Se.reduce(function(Ne,Ee){return Math.abs(Math.cos(Ne))J*O&&(z=O,q[k]=D[k]=N[k])}var X=Math.abs(z-R);X-b>0?(X-=b,b*=1+b/X):b=0,r._id.charAt(0)!=="y"&&(b=-b),q[S]=_.p2r(_.r2p(D[S])+A*b),_.autorange==="min"||_.autorange==="max reversed"?(q[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(q[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[_._name+".range"]=q}var B=br.syncOrAsync(y);return B&&B.then&&e._promises.push(B),B};function WG(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,R0);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(hf.stroke,r.dividercolor).style("stroke-width",sn.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}Ve.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function b8(e){var r=e.title.font.size,t=(e.title.text.match(go.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(xo+t*pf):t?r*(t+1)*pf:r}function ZG(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,l,o=(r.title.text.match(go.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?l=r._depth+r.title.standoff+i*xo:(r.side==="top"||r.side==="left")&&(l=r._depth+r.title.standoff+i*(cf+o*pf));else{var s=yf(r);if(r.type==="multicategory")l=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),l=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?l+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):l+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=Ve.getPxPosition(e,r),v,h,d;n==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-l:f+l):(d=r._offset+r._length/2,h=r.side==="right"?f+l:f-l,v={rotate:"-90",offset:0});var m;if(r.type!=="multicategory"){var g=r._selections[r._id+"tick"];if(m={selection:g,side:r.side},g&&g.node()&&g.node().parentNode){var y=sn.getTranslate(g.node().parentNode);m.offsetLeft=y.x,m.offsetTop=y.y}r.title.hasOwnProperty("standoff")&&(m.pad=0)}return r._titleStandoff=l,hG.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:m,transform:v,attributes:{x:h,y:d,"text-anchor":"middle"}})}Ve.shouldShowZeroLine=function(e,r,t){var a=br.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===E0)&&(C8(r,0)||!XG(e,r,t,a)||JG(e,r))};Ve.clipEnds=function(e,r){return r.filter(function(t){return C8(e,t.x)})};function C8(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=bG:/%L/.test(r)?e>=gG:/%[SX]/.test(r)?e>=L0:/%M/.test(r)?e>=df:/%[HI]/.test(r)?e>=Ti:/%p/.test(r)?e>=_l:/%[Aadejuwx]/.test(r)?e>=Ea:/%[UVW]/.test(r)?e>=un:/%[Bbm]/.test(r)?e>=S0:/%[q]/.test(r)?e>=C0:/%[Yy]/.test(r)?e>=k0:!0}});var E8=Z((Joe,D8)=>{"use strict";D8.exports=function(r,t,a){var n,i;if(a){var l=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[l?1:0],i=a[l?0:1]}var o=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);o===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var Xm=Z((Koe,P8)=>{"use strict";var rV=E8();P8.exports=function(r,t,a,n){var i=t._template||{},l=t.type||i.type||"-";a("minallowed"),a("maxallowed");var o=a("range");if(!o){var s;!n.noInsiderange&&l!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(o=a("range",s)))}var u=t.getAutorangeDflt(o,n),f=a("autorange",u),v;o&&(o[0]===null&&o[1]===null||(o[0]===null||o[1]===null)&&(f==="reversed"||f===!0)||o[0]!==null&&(f==="min"||f==="max reversed")||o[1]!==null&&(f==="max"||f==="min reversed"))&&(o=void 0,delete t.range,t.autorange=!0,v=!0),v||(u=t.getAutorangeDflt(o,n),f=a("autorange",u)),f&&(rV(a,f,o),(l==="linear"||l==="-")&&a("rangemode")),t.cleanRange()}});var z8=Z((Qoe,R8)=>{var tV={left:0,top:0};R8.exports=aV;function aV(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=nV(r);return t[0]=a-i.left,t[1]=n-i.top,t}function nV(e){return e===window||e===document||e===document.body?tV:e.getBoundingClientRect()}});var Jm=Z(($oe,N8)=>{"use strict";var iV=Mp();function lV(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}N8.exports=iV&&lV()});var I8=Z((joe,F8)=>{"use strict";F8.exports=function(r,t,a,n,i){var l=(r-a)/(n-a),o=l+t/(n-a),s=(l+o)/2;return i==="left"||i==="bottom"?l:i==="center"||i==="middle"?s:i==="right"||i==="top"?o:l<2/3-s?l:o>4/3-s?o:s}});var B8=Z((ese,O8)=>{"use strict";var H8=He(),oV=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];O8.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=H8.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=H8.constrain(Math.floor(t*3),0,2),oV[t][r]}});var U8=Z((rse,Y8)=>{"use strict";var sV=$u(),uV=zv(),fV=Gu().getGraphDiv,cV=Yu(),Km=Y8.exports={};Km.wrapped=function(e,r,t){e=fV(e),e._fullLayout&&uV.clear(e._fullLayout._uid+cV.HOVERID),Km.raw(e,r,t)};Km.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&sV.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var Qn=Z((tse,W8)=>{"use strict";var vV=z8(),Qm=kp(),hV=Jm(),dV=He().removeElement,pV=da(),_o=W8.exports={};_o.align=I8();_o.getCursor=B8();var G8=U8();_o.unhover=G8.wrapped;_o.unhoverRaw=G8.raw;_o.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,l,o,s,u,f,v,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=y,hV?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=y,i.addEventListener("touchstart",y,{passive:!1})):i.ontouchstart=y;function m(T,b,A){return Math.abs(T)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,v),!d){var b;try{b=new MouseEvent("click",T)}catch(S){var A=$m(T);b=document.createEvent("MouseEvents"),b.initMouseEvent("click",T.bubbles,T.cancelable,T.view,T.detail,T.screenX,T.screenY,A[0],A[1],T.ctrlKey,T.altKey,T.shiftKey,T.metaKey,T.button,T.relatedTarget)}h.dispatchEvent(b)}t._dragging=!1,t._dragged=!1}};function V8(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}_o.coverSlip=V8;function $m(e){return vV(e.changedTouches?e.changedTouches[0]:e,document.body)}});var wl=Z((ase,Z8)=>{"use strict";Z8.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var K8=Z((nse,J8)=>{"use strict";var jm=wl(),gf="data-savedcursor",X8="!!";J8.exports=function(r,t){var a=r.attr(gf);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var ey=ha(),mV=hi();Q8.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:mV.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:ey({editType:"legend"}),grouptitlefont:ey({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:ey({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var F0=Z(N0=>{"use strict";N0.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};N0.isVertical=function(r){return r.orientation!=="h"};N0.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var ny=Z((ose,$8)=>{"use strict";var ty=gr(),fn=He(),yV=ct(),gV=Gn(),bV=ry(),xV=ds(),ay=F0();function _V(e,r,t,a){var n=r[e]||{},i=yV.newContainer(t,e);function l(B,I){return fn.coerce(n,i,bV,B,I)}var o=fn.coerceFont(l,"font",t.font);l("bgcolor",t.paper_bgcolor),l("bordercolor");var s=l("visible");if(s){for(var u,f=function(B,I){var V=u._input,K=u;return fn.coerce(V,K,gV,B,I)},v=t.font||{},h=fn.coerceFont(l,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),d=0,m=!1,g="normal",y=(t.shapes||[]).filter(function(B){return B.showlegend}),w=a.concat(y).filter(function(B){return e===(B.legend||"legend")}),_=0;_(e==="legend"?1:0));if(b===!1&&(t[e]=void 0),!(b===!1&&!n.uirevision)&&(l("uirevision",t.uirevision),b!==!1)){l("borderwidth");var A=l("orientation"),S=l("yref"),k=l("xref"),q=A==="h",D=S==="paper",R=k==="paper",z,N,H,O="left";q?(z=0,ty.getComponentMethod("rangeslider","isVisible")(r.xaxis)?D?(N=1.1,H="bottom"):(N=1,H="top"):D?(N=-.1,H="top"):(N=0,H="bottom")):(N=1,H="auto",R?z=1.02:(z=1,O="right")),fn.coerce(n,i,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:z}},"x"),fn.coerce(n,i,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:N}},"y"),l("traceorder",g),ay.isGrouped(t[e])&&l("tracegroupgap"),l("entrywidth"),l("entrywidthmode"),l("indentation"),l("itemsizing"),l("itemwidth"),l("itemclick"),l("itemdoubleclick"),l("groupclick"),l("xanchor",O),l("yanchor",H),l("valign"),fn.noneOrAll(n,i,["x","y"]);var J=l("title.text");if(J){l("title.side",q?"left":"top");var X=fn.extendFlat({},o,{size:fn.bigFont(o.size)});fn.coerceFont(l,"title.font",X)}}}}$8.exports=function(r,t,a){var n,i=a.slice(),l=t.shapes;if(l)for(n=0;n{"use strict";var Is=gr(),ly=He(),wV=ly.pushUnique,iy=!0;j8.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,l=n.legend.itemdoubleclick,o=n.legend.groupclick;a===1&&i==="toggle"&&l==="toggleothers"&&iy&&t.data&&t._context.showTips&&ly.notifier(ly._(t,"Double-click on legend to isolate one trace"),"long"),iy=!1;var s;if(a===1?s=i:a===2&&(s=l),!s)return;var u=o==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],v=r.data()[0][0];if(v.groupTitle&&v.noClick)return;var h=t._fullData,d=(n.shapes||[]).filter(function(Ie){return Ie.showlegend}),m=h.concat(d),g=v.trace;g._isShape&&(g=g._fullInput);var y=g.legendgroup,w,_,T,b,A,S,k={},q=[],D=[],R=[];function z(Ie,Be){var Ne=q.indexOf(Ie),Ee=k.visible;return Ee||(Ee=k.visible=[]),q.indexOf(Ie)===-1&&(q.push(Ie),Ne=q.length-1),Ee[Ne]=Be,Ne}var N=(n.shapes||[]).map(function(Ie){return Ie._input}),H=!1;function O(Ie,Be){N[Ie].visible=Be,H=!0}function J(Ie,Be){if(!(v.groupTitle&&!u)){var Ne=Ie._fullInput||Ie,Ee=Ne._isShape,Je=Ne.index;Je===void 0&&(Je=Ne._index);var We=Ne.visible===!1?!1:Be;Ee?O(Je,We):z(Je,We)}}var X=g.legend,B=g._fullInput,I=B&&B._isShape;if(!I&&Is.traceIs(g,"pie-like")){var V=v.label,K=f.indexOf(V);if(s==="toggle")K===-1?f.push(V):f.splice(K,1);else if(s==="toggleothers"){var Q=K!==-1,ie=[];for(w=0;w{"use strict";rw.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var nw=Z((fse,aw)=>{"use strict";var tw=gr(),sy=F0();aw.exports=function(r,t,a){var n=t._inHover,i=sy.isGrouped(t),l=sy.isReversed(t),o={},s=[],u=!1,f={},v=0,h=0,d,m;function g(B,I,V){if(t.visible!==!1&&!(a&&B!==t._id))if(I===""||!sy.isGrouped(t)){var K="~~i"+v;s.push(K),o[K]=[V],v++}else s.indexOf(I)===-1?(s.push(I),u=!0,o[I]=[V]):o[I].push(V)}for(d=0;dR&&(D=R)}k[d][0]._groupMinRank=D,k[d][0]._preGroupSort=d}var z=function(B,I){return B[0]._groupMinRank-I[0]._groupMinRank||B[0]._preGroupSort-I[0]._preGroupSort},N=function(B,I){return B.trace.legendrank-I.trace.legendrank||B._preSort-I._preSort};for(k.forEach(function(B,I){B[0]._preGroupSort=I}),k.sort(z),d=0;d{"use strict";var I0=He();function iw(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}wo.formatPiePercent=function(r,t){var a=iw((r*100).toPrecision(3));return I0.numSeparate(a,t)+"%"};wo.formatPieValue=function(r,t){var a=iw(r.toPrecision(10));return I0.numSeparate(a,t)};wo.getFirstFilled=function(r,t){if(I0.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var TV=tt(),MV=Er();lw.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?TV.pointStyle(r,a,n,t):MV.fill(r,t.color)}});var O0=Z((hse,fw)=>{"use strict";var sw=Er(),uw=H0().castOption,AV=ow();fw.exports=function(r,t,a,n){var i=a.marker.line,l=uw(i.color,t.pts)||sw.defaultLine,o=uw(i.width,t.pts)||0;r.call(AV,t,a,n).style("stroke-width",o).call(sw.stroke,l)}});var vy=Z((dse,mw)=>{"use strict";var Pa=Ir(),uy=gr(),wa=He(),cw=wa.strTranslate,Ba=tt(),An=Er(),fy=Tn().extractOpts,B0=on(),kV=O0(),CV=H0().castOption,SV=oy(),vw=12,hw=5,To=2,LV=10,Hs=5;mw.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",l=a.itemwidth,o=(l+SV.itemGap*2)/2,s=cw(o,0),u=function(k,q,D,R){var z;if(k+1)z=k;else if(q&&q.width>0)z=q.width;else return 0;return i?R:Math.min(z,D)};r.each(function(k){var q=Pa.select(this),D=wa.ensureSingle(q,"g","layers");D.style("opacity",k[0].trace.opacity);var R=a.indentation,z=a.valign,N=k[0].lineHeight,H=k[0].height;if(z==="middle"&&R===0||!N||!H)D.attr("transform",null);else{var O={top:1,bottom:-1}[z],J=O*(.5*(N-H+3))||0,X=a.indentation;D.attr("transform",cw(X,J))}var B=D.selectAll("g.legendfill").data([k]);B.enter().append("g").classed("legendfill",!0);var I=D.selectAll("g.legendlines").data([k]);I.enter().append("g").classed("legendlines",!0);var V=D.selectAll("g.legendsymbols").data([k]);V.enter().append("g").classed("legendsymbols",!0),V.selectAll("g.legendpoints").data([k]).enter().append("g").classed("legendpoints",!0)}).each(S).each(h).each(m).each(d).each(y).each(b).each(T).each(f).each(v).each(w).each(_);function f(k){var q=dw(k),D=q.showFill,R=q.showLine,z=q.showGradientLine,N=q.showGradientFill,H=q.anyFill,O=q.anyLine,J=k[0],X=J.trace,B,I,V=fy(X),K=V.colorscale,Q=V.reversescale,ie=function(Se){if(Se.size())if(D)Ba.fillGroupStyle(Se,t,!0);else{var ve="legendfill-"+X.uid;Ba.gradient(Se,t,ve,cy(Q),K,"fill")}},me=function(Se){if(Se.size()){var ve="legendline-"+X.uid;Ba.lineGroupStyle(Se),Ba.gradient(Se,t,ve,cy(Q),K,"stroke")}},pe=B0.hasMarkers(X)||!H?"M5,0":O?"M5,-2":"M5,-3",ge=Pa.select(this),j=ge.select(".legendfill").selectAll("path").data(D||N?[k]:[]);if(j.enter().append("path").classed("js-fill",!0),j.exit().remove(),j.attr("d",pe+"h"+l+"v6h-"+l+"z").call(ie),R||z){var _e=u(void 0,X.line,LV,hw);I=wa.minExtend(X,{line:{width:_e}}),B=[wa.minExtend(J,{trace:I})]}var se=ge.select(".legendlines").selectAll("path").data(R||z?[B]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",pe+(z?"l"+l+",0.0001":"h"+l)).call(R?Ba.lineGroupStyle:me)}function v(k){var q=dw(k),D=q.anyFill,R=q.anyLine,z=q.showLine,N=q.showMarker,H=k[0],O=H.trace,J=!N&&!R&&!D&&B0.hasText(O),X,B;function I(j,_e,se,Se){var ve=wa.nestedProperty(O,j).get(),Ae=wa.isArrayOrTypedArray(ve)&&_e?_e(ve):ve;if(i&&Ae&&Se!==void 0&&(Ae=Se),se){if(Aese[1])return se[1]}return Ae}function V(j){return H._distinct&&H.index&&j[H.index]?j[H.index]:j[0]}if(N||J||z){var K={},Q={};if(N){K.mc=I("marker.color",V),K.mx=I("marker.symbol",V),K.mo=I("marker.opacity",wa.mean,[.2,1]),K.mlc=I("marker.line.color",V),K.mlw=I("marker.line.width",wa.mean,[0,5],To),Q.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ie=I("marker.size",wa.mean,[2,16],vw);K.ms=ie,Q.marker.size=ie}z&&(Q.line={width:I("line.width",V,[0,10],hw)}),J&&(K.tx="Aa",K.tp=I("textposition",V),K.ts=10,K.tc=I("textfont.color",V),K.tf=I("textfont.family",V),K.tw=I("textfont.weight",V),K.ty=I("textfont.style",V),K.tv=I("textfont.variant",V),K.tC=I("textfont.textcase",V),K.tE=I("textfont.lineposition",V),K.tS=I("textfont.shadow",V)),X=[wa.minExtend(H,K)],B=wa.minExtend(O,Q),B.selectedpoints=null,B.texttemplate=null}var me=Pa.select(this).select("g.legendpoints"),pe=me.selectAll("path.scatterpts").data(N?X:[]);pe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),pe.exit().remove(),pe.call(Ba.pointStyle,B,t),N&&(X[0].mrc=3);var ge=me.selectAll("g.pointtext").data(J?X:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),ge.exit().remove(),ge.selectAll("text").call(Ba.textPointStyle,B,t)}function h(k){var q=k[0].trace,D=q.type==="waterfall";if(k[0]._distinct&&D){var R=k[0].trace[k[0].dir].marker;return k[0].mc=R.color,k[0].mlw=R.line.width,k[0].mlc=R.line.color,g(k,this,"waterfall")}var z=[];q.visible&&D&&(z=k[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 N=Pa.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(z);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(H){var O=Pa.select(this),J=q[H[0]].marker,X=u(void 0,J.line,Hs,To);O.attr("d",H[1]).style("stroke-width",X+"px").call(An.fill,J.color),X&&O.call(An.stroke,J.line.color)})}function d(k){g(k,this)}function m(k){g(k,this,"funnel")}function g(k,q,D){var R=k[0].trace,z=R.marker||{},N=z.line||{},H=z.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",O=D?R.visible&&R.type===D:uy.traceIs(R,"bar"),J=Pa.select(q).select("g.legendpoints").selectAll("path.legend"+D).data(O?[k]:[]);J.enter().append("path").classed("legend"+D,!0).attr("d",H).attr("transform",s),J.exit().remove(),J.each(function(X){var B=Pa.select(this),I=X[0],V=u(I.mlw,z.line,Hs,To);B.style("stroke-width",V+"px");var K=I.mcc;if(!a._inHover&&"mc"in I){var Q=fy(z),ie=Q.mid;ie===void 0&&(ie=(Q.max+Q.min)/2),K=Ba.tryColorscale(z,"")(ie)}var me=K||I.mc||z.color,pe=z.pattern,ge=pe&&Ba.getPatternAttr(pe.shape,0,"");if(ge){var j=Ba.getPatternAttr(pe.bgcolor,0,null),_e=Ba.getPatternAttr(pe.fgcolor,0,null),se=pe.fgopacity,Se=pw(pe.size,8,10),ve=pw(pe.solidity,.5,1),Ae="legend-"+R.uid;B.call(Ba.pattern,"legend",t,Ae,ge,Se,ve,K,pe.fillmode,j,_e,se)}else B.call(An.fill,me);V&&An.stroke(B,I.mlc||N.color)})}function y(k){var q=k[0].trace,D=Pa.select(this).select("g.legendpoints").selectAll("path.legendbox").data(q.visible&&uy.traceIs(q,"box-violin")?[k]:[]);D.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.each(function(){var R=Pa.select(this);if((q.boxpoints==="all"||q.points==="all")&&An.opacity(q.fillcolor)===0&&An.opacity((q.line||{}).color)===0){var z=wa.minExtend(q,{marker:{size:i?vw:wa.constrain(q.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});D.call(Ba.pointStyle,z,t)}else{var N=u(void 0,q.line,Hs,To);R.style("stroke-width",N+"px").call(An.fill,q.fillcolor),N&&An.stroke(R,q.line.color)}})}function w(k){var q=k[0].trace,D=Pa.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(q.visible&&q.type==="candlestick"?[k,k]:[]);D.enter().append("path").classed("legendcandle",!0).attr("d",function(R,z){return z?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(R,z){var N=Pa.select(this),H=q[z?"increasing":"decreasing"],O=u(void 0,H.line,Hs,To);N.style("stroke-width",O+"px").call(An.fill,H.fillcolor),O&&An.stroke(N,H.line.color)})}function _(k){var q=k[0].trace,D=Pa.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(q.visible&&q.type==="ohlc"?[k,k]:[]);D.enter().append("path").classed("legendohlc",!0).attr("d",function(R,z){return z?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(R,z){var N=Pa.select(this),H=q[z?"increasing":"decreasing"],O=u(void 0,H.line,Hs,To);N.style("fill","none").call(Ba.dashLine,H.line.dash,O),O&&An.stroke(N,H.line.color)})}function T(k){A(k,this,"pie")}function b(k){A(k,this,"funnelarea")}function A(k,q,D){var R=k[0],z=R.trace,N=D?z.visible&&z.type===D:uy.traceIs(z,D),H=Pa.select(q).select("g.legendpoints").selectAll("path.legend"+D).data(N?[k]:[]);if(H.enter().append("path").classed("legend"+D,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),H.exit().remove(),H.size()){var O=z.marker||{},J=u(CV(O.line.width,R.pts),O.line,Hs,To),X="pieLike",B=wa.minExtend(z,{marker:{line:{width:J}}},X),I=wa.minExtend(R,{trace:B},X);kV(H,I,B,t)}}function S(k){var q=k[0].trace,D,R=[];if(q.visible)switch(q.type){case"histogram2d":case"heatmap":R=[["M-15,-2V4H15V-2Z"]],D=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":R=[["M-6,-6V6H6V-6Z"]],D=!0;break;case"densitymapbox":case"densitymap":R=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],D="radial";break;case"cone":R=[["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"]],D=!1;break;case"streamtube":R=[["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"]],D=!1;break;case"surface":R=[["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"]],D=!0;break;case"mesh3d":R=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!1;break;case"volume":R=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!0;break;case"isosurface":R=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],D=!1;break}var z=Pa.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(R);z.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(N,H){var O=Pa.select(this),J=fy(q),X=J.colorscale,B=J.reversescale,I=function(ie){if(ie.size()){var me="legendfill-"+q.uid;Ba.gradient(ie,t,me,cy(B,D==="radial"),X,"fill")}},V;if(X){if(!D){var Q=X.length;V=H===0?X[B?Q-1:0][1]:H===1?X[B?0:Q-1][1]:X[Math.floor((Q-1)/2)][1]}}else{var K=q.vertexcolor||q.facecolor||q.color;V=wa.isArrayOrTypedArray(K)?K[H]||K[0]:K}O.attr("d",N[0]),V?O.call(An.fill,V):O.call(I)})}};function cy(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function dw(e){var r=e[0].trace,t=r.contours,a=B0.hasLines(r),n=B0.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",l=!1,o=!1;if(t){var s=t.coloring;s==="lines"?l=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(o=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:l,showGradientFill:o,anyLine:a||l,anyFill:i||o}}function pw(e,r,t){return e&&wa.isArrayOrTypedArray(e)?r:e>t?t:e}});var my=Z((pse,kw)=>{"use strict";var Qa=Ir(),Nt=He(),dy=Pt(),Ys=gr(),yw=$u(),hy=Qn(),Ft=tt(),U0=Er(),Mo=xa(),gw=ew(),Gt=oy(),py=Da(),Mw=py.LINE_SPACING,Bs=py.FROM_TL,bw=py.FROM_BR,xw=nw(),qV=vy(),_w=F0(),Os=1,DV=/^legend[0-9]*$/;kw.exports=function(r,t){if(t)ww(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Qa.select(this),f=u.attr("class"),v=f.split(" ")[0];v.match(DV)&&n.indexOf(v)===-1&&u.remove()});for(var l=0;l1)}var m=a.hiddenlabels||[];if(!o&&(!a.showlegend||!s.length))return l.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),dy.autoMargin(e,n);var g=Nt.ensureSingle(l,"g",n,function(q){o||q.attr("pointer-events","all")}),y=Nt.ensureSingleById(a._topdefs,"clipPath",i,function(q){q.append("rect")}),w=Nt.ensureSingle(g,"rect","bg",function(q){q.attr("shape-rendering","crispEdges")});w.call(U0.stroke,t.bordercolor).call(U0.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var _=Nt.ensureSingle(g,"g","scrollbox"),T=t.title;t._titleWidth=0,t._titleHeight=0;var b;T.text?(b=Nt.ensureSingle(_,"text",n+"titletext"),b.attr("text-anchor","start").call(Ft.font,T.font).text(T.text),G0(b,_,e,t,Os)):_.selectAll("."+n+"titletext").remove();var A=Nt.ensureSingle(g,"rect","scrollbar",function(q){q.attr(Gt.scrollBarEnterAttrs).call(U0.fill,Gt.scrollBarColor)}),S=_.selectAll("g.groups").data(s);S.enter().append("g").attr("class","groups"),S.exit().remove();var k=S.selectAll("g.traces").data(Nt.identity);k.enter().append("g").attr("class","traces"),k.exit().remove(),k.style("opacity",function(q){var D=q[0].trace;return Ys.traceIs(D,"pie-like")?m.indexOf(q[0].label)!==-1?.5:1:D.visible==="legendonly"?.5:1}).each(function(){Qa.select(this).call(PV,e,t)}).call(qV,e,t).each(function(){o||Qa.select(this).call(RV,e,n)}),Nt.syncOrAsync([dy.previousPromises,function(){return FV(e,S,k,t)},function(){var q=a._size,D=t.borderwidth,R=t.xref==="paper",z=t.yref==="paper";if(T.text&&EV(b,t,D),!o){var N,H;R?N=q.l+q.w*t.x-Bs[V0(t)]*t._width:N=a.width*t.x-Bs[V0(t)]*t._width,z?H=q.t+q.h*(1-t.y)-Bs[W0(t)]*t._effHeight:H=a.height*(1-t.y)-Bs[W0(t)]*t._effHeight;var O=IV(e,n,N,H);if(O)return;if(a.margin.autoexpand){var J=N,X=H;N=R?Nt.constrain(N,0,a.width-t._width):J,H=z?Nt.constrain(H,0,a.height-t._effHeight):X,N!==J&&Nt.log("Constrain "+n+".x to make legend fit inside graph"),H!==X&&Nt.log("Constrain "+n+".y to make legend fit inside graph")}Ft.setTranslate(g,N,H)}if(A.on(".drag",null),g.on("wheel",null),o||t._height<=t._maxHeight||e._context.staticPlot){var B=t._effHeight;o&&(B=t._height),w.attr({width:t._width-D,height:B-D,x:D/2,y:D/2}),Ft.setTranslate(_,0,0),y.select("rect").attr({width:t._width-2*D,height:B-2*D,x:D,y:D}),Ft.setClipUrl(_,i,e),Ft.setRect(A,0,0,0,0),delete t._scrollY}else{var I=Math.max(Gt.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),V=t._effHeight-I-2*Gt.scrollBarMargin,K=t._height-t._effHeight,Q=V/K,ie=Math.min(t._scrollY||0,K);w.attr({width:t._width-2*D+Gt.scrollBarWidth+Gt.scrollBarMargin,height:t._effHeight-D,x:D/2,y:D/2}),y.select("rect").attr({width:t._width-2*D+Gt.scrollBarWidth+Gt.scrollBarMargin,height:t._effHeight-2*D,x:D,y:D+ie}),Ft.setClipUrl(_,i,e),ve(ie,I,Q),g.on("wheel",function(){ie=Nt.constrain(t._scrollY+Qa.event.deltaY/V*K,0,K),ve(ie,I,Q),ie!==0&&ie!==K&&Qa.event.preventDefault()});var me,pe,ge,j=function(de,be,ye){var Fe=(ye-be)/Q+de;return Nt.constrain(Fe,0,K)},_e=function(de,be,ye){var Fe=(be-ye)/Q+de;return Nt.constrain(Fe,0,K)},se=Qa.behavior.drag().on("dragstart",function(){var de=Qa.event.sourceEvent;de.type==="touchstart"?me=de.changedTouches[0].clientY:me=de.clientY,ge=ie}).on("drag",function(){var de=Qa.event.sourceEvent;de.buttons===2||de.ctrlKey||(de.type==="touchmove"?pe=de.changedTouches[0].clientY:pe=de.clientY,ie=j(ge,me,pe),ve(ie,I,Q))});A.call(se);var Se=Qa.behavior.drag().on("dragstart",function(){var de=Qa.event.sourceEvent;de.type==="touchstart"&&(me=de.changedTouches[0].clientY,ge=ie)}).on("drag",function(){var de=Qa.event.sourceEvent;de.type==="touchmove"&&(pe=de.changedTouches[0].clientY,ie=_e(ge,me,pe),ve(ie,I,Q))});_.call(Se)}function ve(de,be,ye){t._scrollY=e._fullLayout[n]._scrollY=de,Ft.setTranslate(_,0,-de),Ft.setRect(A,t._width,Gt.scrollBarMargin+de*ye,Gt.scrollBarWidth,be),y.select("rect").attr("y",D+de)}if(e._context.edits.legendPosition){var Ae,Y,re,U;g.classed("cursor-move",!0),hy.init({element:g.node(),gd:e,prepFn:function(de){if(de.target!==A.node()){var be=Ft.getTranslate(g);re=be.x,U=be.y}},moveFn:function(de,be){if(re!==void 0&&U!==void 0){var ye=re+de,Fe=U+be;Ft.setTranslate(g,ye,Fe),Ae=hy.align(ye,t._width,q.l,q.l+q.w,t.xanchor),Y=hy.align(Fe+t._height,-t._height,q.t+q.h,q.t,t.yanchor)}},doneFn:function(){if(Ae!==void 0&&Y!==void 0){var de={};de[n+".x"]=Ae,de[n+".y"]=Y,Ys.call("_guiRelayout",e,de)}},clickFn:function(de,be){var ye=l.selectAll("g.traces").filter(function(){var Fe=this.getBoundingClientRect();return be.clientX>=Fe.left&&be.clientX<=Fe.right&&be.clientY>=Fe.top&&be.clientY<=Fe.bottom});ye.size()>0&&Aw(e,g,ye,de,be)}})}}],e)}}function Y0(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,l=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*l:t+(l||n)}function Aw(e,r,t,a,n){var i=t.data()[0][0].trace,l={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(l.group=i._group),Ys.traceIs(i,"pie-like")&&(l.label=t.datum()[0].label);var o=yw.triggerHandler(e,"plotly_legendclick",l);if(a===1){if(o===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&gw(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=yw.triggerHandler(e,"plotly_legenddoubleclick",l);s!==!1&&o!==!1&&gw(t,e,a)}}function PV(e,r,t){var a=Z0(t),n=e.data()[0][0],i=n.trace,l=Ys.traceIs(i,"pie-like"),o=!t._inHover&&r._context.edits.legendText&&!l,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=l?n.label:i.name,i._meta&&(u=Nt.templateString(u,i._meta))));var v=Nt.ensureSingle(e,"text",a+"text");v.attr("text-anchor","start").call(Ft.font,f).text(o?Tw(u,s):u);var h=t.indentation+t.itemwidth+Gt.itemGap*2;Mo.positionText(v,h,0),o?v.call(Mo.makeEditable,{gd:r,text:u}).call(G0,e,r,t).on("edit",function(d){this.text(Tw(d,s)).call(G0,e,r,t);var m=n.trace._fullInput||{},g={};return g.name=d,m._isShape?Ys.call("_guiRelayout",r,"shapes["+i.index+"].name",g.name):Ys.call("_guiRestyle",r,g,i.index)}):G0(v,e,r,t)}function Tw(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function RV(e,r,t){var a=r._context.doubleClickDelay,n,i=1,l=Nt.ensureSingle(e,"rect",t+"toggle",function(o){r._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(U0.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(l.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),Aw(r,o,e,i,Qa.event)}}))}function G0(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),Mo.convertToTspans(e,t,function(){zV(r,t,a,n)})}function zV(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),l=i.node(),o=Z0(t);t||(t=r._fullLayout[o]);var s=t.borderwidth,u;a===Os?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*Mw,v,h;if(l){var d=Ft.bBox(l);v=d.height,h=d.width,a===Os?Ft.setTranslate(i,s,s+v*.75):Ft.setTranslate(i,0,v*.25)}else{var m="."+o+(a===Os?"title":"")+"text",g=e.select(m),y=Mo.lineCount(g),w=g.node();if(v=f*y,h=w?Ft.bBox(w).width:0,a===Os)t.title.side==="left"&&(h+=Gt.itemGap*2),Mo.positionText(g,s+Gt.titlePad,s+f);else{var _=Gt.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(_=Gt.itemGap,h-=t.indentation+t.itemwidth),Mo.positionText(g,_,-f*((y-1)/2-.3))}}a===Os?(t._titleWidth=h,t._titleHeight=v):(n.lineHeight=f,n.height=Math.max(v,16)+3,n.width=h)}function NV(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function FV(e,r,t,a){var n=e._fullLayout,i=Z0(a);a||(a=n[i]);var l=n._size,o=_w.isVertical(a),s=_w.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,v=2*f,h=Gt.itemGap,d=a.indentation+a.itemwidth+h*2,m=2*(f+h),g=W0(a),y=a.y<0||a.y===0&&g==="top",w=a.y>1||a.y===1&&g==="bottom",_=a.tracegroupgap,T={};a._maxHeight=Math.max(y||w?n.height/2:l.h,30);var b=0;a._width=0,a._height=0;var A=NV(a);if(o)t.each(function(ge){var j=ge[0].height;Ft.setTranslate(this,f+A[0],f+A[1]+a._height+j/2+h),a._height+=j,a._width=Math.max(a._width,ge[0].width)}),b=d+a._width,a._width+=h+d+v,a._height+=m,s&&(r.each(function(ge,j){Ft.setTranslate(this,0,j*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var S=V0(a),k=a.x<0||a.x===0&&S==="right",q=a.x>1||a.x===1&&S==="left",D=w||y,R=n.width/2;a._maxWidth=Math.max(k?D&&S==="left"?l.l+l.w:R:q?D&&S==="right"?l.r+l.w:R:l.w,2*d);var z=0,N=0;t.each(function(ge){var j=Y0(ge,a,d);z=Math.max(z,j),N+=j}),b=null;var H=0;if(s){var O=0,J=0,X=0;r.each(function(){var ge=0,j=0;Qa.select(this).selectAll("g.traces").each(function(se){var Se=Y0(se,a,d),ve=se[0].height;Ft.setTranslate(this,A[0],A[1]+f+h+ve/2+j),j+=ve,ge=Math.max(ge,Se),T[se[0].trace.legendgroup]=ge});var _e=ge+h;J>0&&_e+f+J>a._maxWidth?(H=Math.max(H,J),J=0,X+=O+_,O=j):O=Math.max(O,j),Ft.setTranslate(this,J,X),J+=_e}),a._width=Math.max(H,J)+f,a._height=X+O+m}else{var B=t.size(),I=N+v+(B-1)*h=a._maxWidth&&(H=Math.max(H,ie),K=0,Q+=V,a._height+=V,V=0),Ft.setTranslate(this,A[0]+f+K,A[1]+f+Q+j/2+h),ie=K+_e+h,K+=se,V=Math.max(V,j)}),I?(a._width=K+v,a._height=V+m):(a._width=Math.max(H,ie)+v,a._height+=V+m)}}a._width=Math.ceil(Math.max(a._width+A[0],a._titleWidth+2*(f+Gt.titlePad))),a._height=Math.ceil(Math.max(a._height+A[1],a._titleHeight+2*(f+Gt.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var me=e._context.edits,pe=me.legendText||me.legendPosition;t.each(function(ge){var j=Qa.select(this).select("."+i+"toggle"),_e=ge[0].height,se=ge[0].trace.legendgroup,Se=Y0(ge,a,d);s&&se!==""&&(Se=T[se]);var ve=pe?d:b||Se;!o&&!u&&(ve+=h/2),Ft.setRect(j,0,-_e/2,ve,_e)})}function IV(e,r,t,a){var n=e._fullLayout,i=n[r],l=V0(i),o=W0(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",v=i.x<.5?"l":"r",h={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return dy.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*Bs[l],r:i._width*bw[l],b:i._effHeight*bw[o],t:i._effHeight*Bs[o]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][v]=h[v]:e._fullLayout._reservedMargin[r][f]=h[f]}function V0(e){return Nt.isRightAnchor(e)?"right":Nt.isCenterAnchor(e)?"center":"left"}function W0(e){return Nt.isBottomAnchor(e)?"bottom":Nt.isMiddleAnchor(e)?"middle":"top"}function Z0(e){return e._id||"legend"}});var xy=Z(by=>{"use strict";var Ao=Ir(),Gi=Hr(),Cw=bn(),Mt=He(),HV=Mt.pushUnique,yy=Mt.strTranslate,OV=Mt.strRotate,BV=$u(),kn=xa(),YV=K8(),Mi=tt(),Kt=Er(),X0=Qn(),Ai=dt(),UV=da().zindexSeparator,Gs=gr(),$n=bi(),ko=Yu(),GV=ny(),VV=my(),zw=ko.YANGLE,gy=Math.PI*zw/180,WV=1/Math.sin(gy),ZV=Math.cos(gy),XV=Math.sin(gy),gt=ko.HOVERARROWSIZE,Or=ko.HOVERTEXTPAD,Sw={box:!0,ohlc:!0,violin:!0,candlestick:!0},JV={scatter:!0,scattergl:!0,splom:!0};function Lw(e,r){return e.distance-r.distance}by.hover=function(r,t,a,n){r=Mt.getGraphDiv(r);var i=t.target;Mt.throttle(r._fullLayout._uid+ko.HOVERID,ko.HOVERMINTIME,function(){KV(r,t,a,n,i)})};by.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=Ow(n),l=Bw(n),o=r.map(function(y){var w=y._x0||y.x0||y.x||0,_=y._x1||y.x1||y.x||0,T=y._y0||y.y0||y.y||0,b=y._y1||y.y1||y.y||0,A=y.eventData;if(A){var S=Math.min(w,_),k=Math.max(w,_),q=Math.min(T,b),D=Math.max(T,b),R=y.trace;if(Gs.traceIs(R,"gl3d")){var z=n._fullLayout[R.scene]._scene.container,N=z.offsetLeft,H=z.offsetTop;S+=N,k+=N,q+=H,D+=H}A.bbox={x0:S+l,x1:k+l,y0:q+i,y1:D+i},t.inOut_bbox&&t.inOut_bbox.push(A.bbox)}else A=!1;return{color:y.color||Kt.defaultLine,x0:y.x0||y.x||0,x1:y.x1||y.x||0,y0:y.y0||y.y||0,y1:y.y1||y.y||0,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:y.text,name:y.name,idealAlign:y.idealAlign,borderColor:y.borderColor,fontFamily:y.fontFamily,fontSize:y.fontSize,fontColor:y.fontColor,fontWeight:y.fontWeight,fontStyle:y.fontStyle,fontVariant:y.fontVariant,nameLength:y.nameLength,textAlign:y.textAlign,trace:y.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:y.hovertemplate||!1,hovertemplateLabels:y.hovertemplateLabels||!1,eventData:A}}),s=!1,u=Fw(o,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||Kt.background,container:Ao.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,v=5,h=0,d=0;f.sort(function(y,w){return y.y0-w.y0}).each(function(y,w){var _=y.y0-y.by/2;_-vk[0]._length||U<0||U>q[0]._length)return X0.unhoverRaw(e,r)}if(r.pointerX=re+k[0]._offset,r.pointerY=U+q[0]._offset,"xval"in r?X=$n.flat(i,r.xval):X=$n.p2c(k,re),"yval"in r?B=$n.flat(i,r.yval):B=$n.p2c(q,U),!Gi(X[0])||!Gi(B[0]))return Mt.warn("Fx.hover failed",r,e),X0.unhoverRaw(e,r)}var ye=1/0;function Fe(yr,ot){for(V=0;Vse&&(O.splice(0,se),ye=O[0].distance),v&&H!==0&&O.length===0){_e.distance=H,_e.index=!1;var yt=Q._module.hoverPoints(_e,ge,j,"closest",{hoverLayer:o._hoverlayer});if(yt&&(yt=yt.filter(function(at){return at.spikeDistance<=H})),yt&&yt.length){var Ca,aa=yt.filter(function(at){return at.xa.showspikes&&at.xa.spikesnap!=="hovered data"});if(aa.length){var In=aa[0];Gi(In.x0)&&Gi(In.y0)&&(Ca=Pe(In),(!Se.vLinePoint||Se.vLinePoint.spikeDistance>Ca.spikeDistance)&&(Se.vLinePoint=Ca))}var Hn=yt.filter(function(at){return at.ya.showspikes&&at.ya.spikesnap!=="hovered data"});if(Hn.length){var Wt=Hn[0];Gi(Wt.x0)&&Gi(Wt.y0)&&(Ca=Pe(Wt),(!Se.hLinePoint||Se.hLinePoint.spikeDistance>Ca.spikeDistance)&&(Se.hLinePoint=Ca))}}}}}Fe();function Re(yr,ot,Wr){for(var mt=null,Tt=1/0,st,yt=0;yt0&&Math.abs(yr.distance)Le-1;lr--)fr(O[lr]);O=Ue,Ee()}var ze=e._hoverdata,ae=[],oe=Ow(e),qe=Bw(e);for(I=0;I1||O.length>1)||h==="closest"&&ve&&O.length>1,pn=Kt.combine(o.plot_bgcolor||Kt.background,o.paper_bgcolor),Ia=Fw(O,{gd:e,hovermode:h,rotateLabels:ra,bgColor:pn,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),ta=Ia.hoverLabels;if($n.isUnifiedHover(h)||($V(ta,ra,o,Ia.commonLabelBoundingBox),Hw(ta,ra,o._invScaleX,o._invScaleY)),n&&n.tagName){var Ha=Gs.getComponentMethod("annotations","hasClickToShow")(e,ae);YV(Ao.select(n),Ha?"pointer":"")}!n||a||!rW(e,r,ze)||(ze&&e.emit("plotly_unhover",{event:r,points:ze}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:k,yaxes:q,xvals:X,yvals:B}))}function Nw(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 QV=/([\s\S]*)<\/extra>/;function Fw(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,l=r.bgColor,o=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||ko.HOVERFONT,v=r.fontSize||ko.HOVERFONTSIZE,h=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,m=r.fontVariant||a.font.variant,g=r.fontTextcase||a.font.textcase,y=r.fontLineposition||a.font.lineposition,w=r.fontShadow||a.font.shadow,_=e[0],T=_.xa,b=_.ya,A=n.charAt(0),S=A+"Label",k=_[S];if(k===void 0&&T.type==="multicategory")for(var q=0;qa.width-ze&&(ae=a.width-ze),cr.attr("d","M"+(Ke-ae)+",0L"+(Ke-ae+gt)+","+lr+gt+"H"+ze+"v"+lr+(Or*2+Oe.height)+"H"+-ze+"V"+lr+gt+"H"+(Ke-ae-gt)+"Z"),Ke=ae,V.minX=Ke-ze,V.maxX=Ke+ze,T.side==="top"?(V.minY=fr-(Or*2+Oe.height),V.maxY=fr-Or):(V.minY=fr+Or,V.maxY=fr+(Or*2+Oe.height))}else{var oe,qe,ke;b.side==="right"?(oe="start",qe=1,ke="",Ke=T._offset+T._length):(oe="end",qe=-1,ke="-",Ke=T._offset),fr=b._offset+(_.y0+_.y1)/2,tr.attr("text-anchor",oe),cr.attr("d","M0,0L"+ke+gt+","+gt+"V"+(Or+Oe.height/2)+"h"+ke+(Or*2+Oe.width)+"V-"+(Or+Oe.height/2)+"H"+ke+gt+"V-"+gt+"Z"),V.minY=fr-(Or+Oe.height/2),V.maxY=fr+(Or+Oe.height/2),b.side==="right"?(V.minX=Ke+gt,V.maxX=Ke+gt+(Or*2+Oe.width)):(V.minX=Ke-gt-(Or*2+Oe.width),V.maxX=Ke-gt);var ir=Oe.height/2,vr=R-Oe.top-ir,sr="clip"+a._uid+"commonlabel"+b._id,Mr;if(Ke=0?We=Be:Ne+U=0?We=Ne:Ee+U=0?ne=Pe:Ie+de=0?ne=Ie:Je+de=0,(Ce.idealAlign==="top"||!Vr)&&St?(ke-=vr/2,Ce.anchor="end"):Vr?(ke+=vr/2,Ce.anchor="start"):Ce.anchor="middle",Ce.crossPos=ke;else{if(Ce.pos=ke,Vr=qe+ir/2+$r<=z,St=qe-ir/2-$r>=0,(Ce.idealAlign==="left"||!Vr)&&St)qe-=ir/2,Ce.anchor="end";else if(Vr)qe+=ir/2,Ce.anchor="start";else{Ce.anchor="middle";var ea=$r/2,ka=qe+ea-z,ra=qe-ea;ka>0&&(qe-=ka),ra<0&&(qe+=-ra)}Ce.crossPos=qe}fr.attr("text-anchor",Ce.anchor),ze&&lr.attr("text-anchor",Ce.anchor),cr.attr("transform",yy(qe,ke)+(i?OV(zw):""))}),{hoverLabels:Me,commonLabelBoundingBox:V}}function qw(e,r,t,a,n,i){var l="",o="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Mt.templateString(e.name,e.trace._meta)),l=Pw(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(o+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(o+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(o+=(o?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?o=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(o=e.yLabel):e.yLabel===void 0?o=e.xLabel:o="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(o+=(o?"
":"")+e.text),e.extraText!==void 0&&(o+=(o?"
":"")+e.extraText),i&&o===""&&!e.hovertemplate&&(l===""&&i.remove(),o=l);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),o=Mt.hovertemplateString(f,v,a._d3locale,e.eventData[0]||{},e.trace._meta),o=o.replace(QV,function(h,d){return l=Pw(d,e.nameLength),""})}return[o,l]}function $V(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",l=0,o=1,s=e.size(),u=new Array(s),f=0,v=a.minX,h=a.maxX,d=a.minY,m=a.maxY,g=function(X){return X*t._invScaleX},y=function(X){return X*t._invScaleY};e.each(function(X){var B=X[n],I=X[i],V=B._id.charAt(0)==="x",K=B.range;f===0&&K&&K[0]>K[1]!==V&&(o=-1);var Q=0,ie=V?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var me=Iw(X,r),pe=X.anchor,ge=pe==="end"?-1:1,j,_e;if(pe==="middle")j=X.crossPos+(V?y(me.y-X.by/2):g(X.bx/2+X.tx2width/2)),_e=j+(V?y(X.by):g(X.bx));else if(V)j=X.crossPos+y(gt+me.y)-y(X.by/2-gt),_e=j+y(X.by);else{var se=g(ge*gt+me.x),Se=se+g(ge*X.bx);j=X.crossPos+Math.min(se,Se),_e=X.crossPos+Math.max(se,Se)}V?d!==void 0&&m!==void 0&&Math.min(_e,m)-Math.max(j,d)>1&&(I.side==="left"?(Q=I._mainLinePosition,ie=t.width):ie=I._mainLinePosition):v!==void 0&&h!==void 0&&Math.min(_e,h)-Math.max(j,v)>1&&(I.side==="top"?(Q=I._mainLinePosition,ie=t.height):ie=I._mainLinePosition)}u[f++]=[{datum:X,traceIndex:X.trace.index,dp:0,pos:X.pos,posref:X.posref,size:X.by*(V?WV:1)/2,pmin:Q,pmax:ie}]}),u.sort(function(X,B){return X[0].posref-B[0].posref||o*(B[0].traceIndex-X[0].traceIndex)});var w,_,T,b,A,S,k;function q(X){var B=X[0],I=X[X.length-1];if(_=B.pmin-B.pos-B.dp+B.size,T=I.pos+I.dp+I.size-B.pmax,_>.01){for(A=X.length-1;A>=0;A--)X[A].dp+=_;w=!1}if(!(T<.01)){if(_<-.01){for(A=X.length-1;A>=0;A--)X[A].dp-=T;w=!1}if(w){var V=0;for(b=0;bB.pmax&&V++;for(b=X.length-1;b>=0&&!(V<=0);b--)S=X[b],S.pos>B.pmax-1&&(S.del=!0,V--);for(b=0;b=0;A--)X[A].dp-=T;for(b=X.length-1;b>=0&&!(V<=0);b--)S=X[b],S.pos+S.dp+S.size>B.pmax&&(S.del=!0,V--)}}}for(;!w&&l<=s;){for(l++,w=!0,b=0;b.01){for(A=R.length-1;A>=0;A--)R[A].dp+=_;for(D.push.apply(D,R),u.splice(b+1,1),k=0,A=D.length-1;A>=0;A--)k+=D[A].dp;for(T=k/D.length,A=D.length-1;A>=0;A--)D[A].dp-=T;w=!1}else b++}u.forEach(q)}for(b=u.length-1;b>=0;b--){var H=u[b];for(A=H.length-1;A>=0;A--){var O=H[A],J=O.datum;J.offset=O.dp,J.del=O.del}}}function Iw(e,r){var t=0,a=e.offset;return r&&(a*=-XV,t=e.offset*ZV),{x:t,y:a}}function jV(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(gt+Or),a=t+r*(e.txwidth+Or),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Or),{alignShift:r,textShiftX:t,text2ShiftX:a}}function Hw(e,r,t,a){var n=function(l){return l*t},i=function(l){return l*a};e.each(function(l){var o=Ao.select(this);if(l.del)return o.remove();var s=o.select("text.nums"),u=l.anchor,f=u==="end"?-1:1,v=jV(l),h=Iw(l,r),d=h.x,m=h.y,g=u==="middle";o.select("path").attr("d",g?"M-"+n(l.bx/2+l.tx2width/2)+","+i(m-l.by/2)+"h"+n(l.bx)+"v"+i(l.by)+"h-"+n(l.bx)+"Z":"M0,0L"+n(f*gt+d)+","+i(gt+m)+"v"+i(l.by/2-gt)+"h"+n(f*l.bx)+"v-"+i(l.by)+"H"+n(f*gt+d)+"V"+i(m-gt)+"Z");var y=d+v.textShiftX,w=m+l.ty0-l.by/2+Or,_=l.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(s.attr("text-anchor","start"),y=g?-l.bx/2-l.tx2width/2+Or:-l.bx-Or):_==="right"&&u!=="end"&&(s.attr("text-anchor","end"),y=g?l.bx/2-l.tx2width/2-Or:l.bx+Or)),s.call(kn.positionText,n(y),i(w)),l.tx2width&&(o.select("text.name").call(kn.positionText,n(v.text2ShiftX+v.alignShift*Or+d),i(m+l.ty0-l.by/2+Or)),o.select("rect").call(Mi.setRect,n(v.text2ShiftX+(v.alignShift-1)*l.tx2width/2+d),i(m-l.by/2-1),n(l.tx2width),i(l.by+2)))})}function eW(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function l(h){return h||Gi(h)&&h===0}var o=Array.isArray(t)?function(h,d){var m=Mt.castOption(n,t,h);return l(m)?m:Mt.extractOption({},a,"",d)}:function(h,d){return Mt.extractOption(i,a,h,d)};function s(h,d,m){var g=o(d,m);l(g)&&(e[h]=g)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Mt.constrain(e.x0,0,e.xa._length),e.x1=Mt.constrain(e.x1,0,e.xa._length),e.y0=Mt.constrain(e.y0,0,e.ya._length),e.y1=Mt.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Ai.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Ai.hoverLabelText(e.ya,e.yLabelVal,a.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=Ai.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Ai.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Ai.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Ai.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var v=e.hoverinfo||e.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(e.xLabel=void 0),v.indexOf("y")===-1&&(e.yLabel=void 0),v.indexOf("z")===-1&&(e.zLabel=void 0),v.indexOf("text")===-1&&(e.text=void 0),v.indexOf("name")===-1&&(e.name=void 0)),e}function Dw(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,l=t.event,o=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||o)){var v=Kt.combine(n.plot_bgcolor,n.paper_bgcolor);if(o){var h=r.hLinePoint,d,m;u=h&&h.xa,f=h&&h.ya;var g=f.spikesnap;g==="cursor"?(d=l.pointerX,m=l.pointerY):(d=u._offset+h.x,m=f._offset+h.y);var y=Cw.readability(h.color,v)<1.5?Kt.contrast(v):h.color,w=f.spikemode,_=f.spikethickness,T=f.spikecolor||y,b=Ai.getPxPosition(e,f),A,S;if(w.indexOf("toaxis")!==-1||w.indexOf("across")!==-1){if(w.indexOf("toaxis")!==-1&&(A=b,S=d),w.indexOf("across")!==-1){var k=f._counterDomainMin,q=f._counterDomainMax;f.anchor==="free"&&(k=Math.min(k,f.position),q=Math.max(q,f.position)),A=i.l+k*i.w,S=i.l+q*i.w}a.insert("line",":first-child").attr({x1:A,x2:S,y1:m,y2:m,"stroke-width":_,stroke:T,"stroke-dasharray":Mi.dashStyle(f.spikedash,_)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:S,y1:m,y2:m,"stroke-width":_+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}w.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:b+(f.side!=="right"?_:-_),cy:m,r:_,fill:T}).classed("spikeline",!0)}if(s){var D=r.vLinePoint,R,z;u=D&&D.xa,f=D&&D.ya;var N=u.spikesnap;N==="cursor"?(R=l.pointerX,z=l.pointerY):(R=u._offset+D.x,z=f._offset+D.y);var H=Cw.readability(D.color,v)<1.5?Kt.contrast(v):D.color,O=u.spikemode,J=u.spikethickness,X=u.spikecolor||H,B=Ai.getPxPosition(e,u),I,V;if(O.indexOf("toaxis")!==-1||O.indexOf("across")!==-1){if(O.indexOf("toaxis")!==-1&&(I=B,V=z),O.indexOf("across")!==-1){var K=u._counterDomainMin,Q=u._counterDomainMax;u.anchor==="free"&&(K=Math.min(K,u.position),Q=Math.max(Q,u.position)),I=i.t+(1-Q)*i.h,V=i.t+(1-K)*i.h}a.insert("line",":first-child").attr({x1:R,x2:R,y1:I,y2:V,"stroke-width":J,stroke:X,"stroke-dasharray":Mi.dashStyle(u.spikedash,J)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:R,x2:R,y1:I,y2:V,"stroke-width":J+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}O.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:R,cy:B-(u.side!=="top"?J:-J),r:J,fill:X}).classed("spikeline",!0)}}}function rW(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function Ew(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function Pw(e,r){return kn.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function tW(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],l=0;l{"use strict";var aW=He(),nW=Er(),iW=bi().isUnifiedHover;Yw.exports=function(r,t,a,n){n=n||{};var i=t.legend;function l(o){n.font[o]||(n.font[o]=i?t.legend.font[o]:t.font[o])}t&&iW(t.hovermode)&&(n.font||(n.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),i?(n.bgcolor||(n.bgcolor=nW.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),aW.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var Gw=Z((gse,Uw)=>{"use strict";var lW=He(),oW=J0(),sW=fs();Uw.exports=function(r,t){function a(n,i){return lW.coerce(r,t,sW,n,i)}oW(r,t,a)}});var Zw=Z((bse,Ww)=>{"use strict";var Vw=He(),uW=mv(),fW=J0();Ww.exports=function(r,t,a,n){function i(o,s){return Vw.coerce(r,t,uW,o,s)}var l=Vw.extendFlat({},n.hoverlabel);t.hovertemplate&&(l.namelength=-1),fW(r,t,i,l)}});var _y=Z((xse,Xw)=>{"use strict";var cW=He(),vW=fs();Xw.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:cW.coerce(r,t,vW,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var Qw=Z((_se,Kw)=>{"use strict";var Jw=He(),hW=fs(),dW=_y(),pW=J0();Kw.exports=function(r,t){function a(f,v){return Jw.coerce(r,t,hW,f,v)}var n=dW(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var l=t._has("mapbox"),o=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((l||o||s)&&u===1||(l||o)&&s&&u===2)&&(t.dragmode="pan"),pW(r,t,a),Jw.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var eT=Z((wse,jw)=>{"use strict";var wy=He(),$w=gr();jw.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return wy.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var yW=gr(),gW=xy().hover;rT.exports=function(r,t,a){var n=yW.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&gW(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var ki=Z((Mse,iT)=>{"use strict";var bW=Ir(),K0=He(),xW=Qn(),bf=bi(),aT=fs(),nT=xy();iT.exports={moduleType:"component",name:"fx",constants:Yu(),schema:{layout:aT},attributes:mv(),layoutAttributes:aT,supplyLayoutGlobalDefaults:Gw(),supplyDefaults:Zw(),supplyLayoutDefaults:Qw(),calc:eT(),getDistanceFunction:bf.getDistanceFunction,getClosest:bf.getClosest,inbox:bf.inbox,quadrature:bf.quadrature,appendArrayPointValue:bf.appendArrayPointValue,castHoverOption:wW,castHoverinfo:TW,hover:nT.hover,unhover:xW.unhover,loneHover:nT.loneHover,loneUnhover:_W,click:tT()};function _W(e){var r=K0.isD3Selection(e)?e:bW.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function wW(e,r,t){return K0.castOption(e,r,"hoverlabel."+t)}function TW(e,r,t){function a(n){return K0.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return K0.castOption(e,t,"hoverinfo",a)}});var Vs=Z(Vi=>{"use strict";Vi.selectMode=function(e){return e==="lasso"||e==="select"};Vi.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Vi.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Vi.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Vi.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Vi.selectingOrDrawing=function(e){return Vi.freeMode(e)||Vi.rectMode(e)}});var Q0=Z((kse,lT)=>{"use strict";lT.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var $0=Z((Cse,oT)=>{"use strict";oT.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 eh=Z((Sse,sT)=>{"use strict";var j0=32;sT.exports={CIRCLE_SIDES:j0,i000:0,i090:j0/4,i180:j0/2,i270:j0/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var rh=Z((Lse,fT)=>{"use strict";var MW=He().strTranslate;function uT(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function AW(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function kW(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return uT(e,t[r])}}function CW(e){return MW(e.xaxis._offset,e.yaxis._offset)}fT.exports={p2r:uT,r2p:AW,axValue:kW,getTransform:CW}});var Tl=Z(Wi=>{"use strict";var SW=fm(),hT=eh(),Ws=hT.CIRCLE_SIDES,Ty=hT.SQRT2,dT=rh(),cT=dT.p2r,vT=dT.r2p,LW=[0,3,4,5,6,1,2],qW=[0,3,4,1,2];Wi.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var bT=Vs(),DW=bT.drawMode,EW=bT.openMode,Zs=eh(),pT=Zs.i000,mT=Zs.i090,yT=Zs.i180,gT=Zs.i270,PW=Zs.cos45,RW=Zs.sin45,xT=rh(),ah=xT.p2r,Ml=xT.r2p,zW=pl(),NW=zW.clearOutline,nh=Tl(),FW=nh.readPaths,IW=nh.writePaths,HW=nh.ellipseOver,OW=nh.fixDatesForPaths;function BW(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,l=(a.layout||{}).shapes||[];if(!DW(i)&&n!==void 0){var o=a._fullLayout._activeShapeIndex;if(o{"use strict";var YW=Vs(),UW=YW.selectMode,GW=pl(),VW=GW.clearOutline,My=Tl(),WW=My.readPaths,ZW=My.writePaths,XW=My.fixDatesForPaths;TT.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,l=i._fullLayout.newselection,o=t.plotinfo,s=o.xaxis,u=o.yaxis,f=t.isActiveSelection,v=t.dragmode,h=(i.layout||{}).selections||[];if(!UW(v)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";MT.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 Al=Z(ia=>{"use strict";var Co=_f(),AT=He(),lh=dt();ia.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ia.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ia.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ia.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ia.extractPathCoords=function(e,r,t){var a=[],n=e.match(Co.segmentRE);return n.forEach(function(i){var l=r[i.charAt(0)].drawn;if(l!==void 0){var o=i.substr(1).match(Co.paramRE);if(!(!o||o.lengthd&&(g="X"),g});return u>d&&(m=m.replace(/[\s,]*X.*/,""),AT.log("Ignoring extra params in segment "+s)),f+m})}function wf(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var Cy=Z((zse,LT)=>{"use strict";var KW=He(),Xs=dt(),kT=xa(),CT=tt(),QW=Tl().readPaths,ky=Al(),$W=ky.getPathString,ST=kv(),jW=Da().FROM_TL;LT.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var l={};if(a.type!=="path"){var o=Xs.getFromId(r,a.xref),s=Xs.getFromId(r,a.yref);for(var u in ST){var f=ST[u](a,o,s);f!==void 0&&(l[u]=f)}}i=KW.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,l)}else i=a.label.text;var v={"data-index":t},h=a.label.font,d={"data-notex":1},m=n.append("g").attr(v).classed("shape-label",!0),g=m.append("text").attr(d).classed("shape-label-text",!0).text(i),y,w,_,T;if(a.path){var b=$W(r,a),A=QW(b,r);y=1/0,_=1/0,w=-1/0,T=-1/0;for(var S=0;S=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function rZ(e,r,t,a,n,i,l){var o=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,v=Math.PI/180*i,h=Math.sin(v),d=Math.cos(v),m=n.label.xanchor,g=n.label.yanchor,y,w,_,T;if(f==="line"){o==="start"?(y=e,w=r):o==="end"?(y=t,w=a):(y=(e+t)/2,w=(r+a)/2),m==="auto"&&(o==="start"?s==="auto"?t>e?m="left":te?m="right":te?m="right":te?m="left":t{"use strict";var tZ=He(),aZ=tZ.strTranslate,qT=Qn(),PT=Vs(),nZ=PT.drawMode,RT=PT.selectMode,zT=gr(),DT=Er(),sh=eh(),iZ=sh.i000,lZ=sh.i090,oZ=sh.i180,sZ=sh.i270,uZ=pl(),NT=uZ.clearOutlineControllers,Ly=Tl(),oh=Ly.pointsOnRectangle,Sy=Ly.pointsOnEllipse,fZ=Ly.writePaths,cZ=ih().newShapes,vZ=ih().createShapeObj,hZ=Ay(),dZ=Cy();FT.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function l(){e(r,t,a,n++),(Sy(r[0])||a.hasText)&&o({redrawing:!0})}function o(B){var I={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,I=cZ(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,I=hZ(t,a),i._fullLayout._reselect=!0),Object.keys(I).length&&zT.call((B||{}).redrawing?"relayout":"_guiRelayout",i,I)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,v=nZ(f),h=RT(f);(v||h)&&(i._fullLayout._outlining=!0),NT(i),t.attr("d",fZ(r));var d,m,g,y,w;if(!n&&(a.isActiveShape||a.isActiveSelection)){w=pZ([],r);var _=u.append("g").attr("class","outline-controllers");R(_),X()}if(v&&a.hasText){var T=u.select(".label-temp"),b=vZ(t,a,a.dragmode);dZ(i,"label-temp",b,T)}function A(B){g=+B.srcElement.getAttribute("data-i"),y=+B.srcElement.getAttribute("data-j"),d[g][y].moveFn=S}function S(B,I){if(r.length){var V=w[g][y][1],K=w[g][y][2],Q=r[g],ie=Q.length;if(oh(Q)){var me=B,pe=I;if(a.isActiveSelection){var ge=ET(Q,y);ge[1]===Q[y][1]?pe=0:me=0}for(var j=0;j1&&!(B.length===2&&B[1][0]==="Z")&&(y===0&&(B[0][0]="M"),r[g]=B,l(),o())}}function D(B,I){if(B===2){g=+I.srcElement.getAttribute("data-i"),y=+I.srcElement.getAttribute("data-j");var V=r[g];!oh(V)&&!Sy(V)&&q()}}function R(B){d=[];for(var I=0;I{"use strict";var yZ=Ir(),UT=gr(),IT=He(),Js=dt(),gZ=Tl().readPaths,bZ=uh(),ch=Cy(),GT=pl().clearOutlineControllers,qy=Er(),Ey=tt(),xZ=ct().arrayEditor,HT=Qn(),OT=wl(),So=_f(),$a=Al(),Dy=$a.getPathString;ZT.exports={draw:Py,drawOne:VT,eraseActiveShape:TZ,drawLabel:ch};function Py(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;nl&&Be>o&&!Re.shiftKey?HT.getCursor(Ne/Ie,1-Ee/Be):"move";OT(r,Je),_e=Je.split("-")[0]}}function Ae(Re){fh(e)||(s&&(w=Q(t.xanchor)),u&&(_=ie(t.yanchor)),t.type==="path"?z=t.path:(d=s?t.x0:Q(t.x0),m=u?t.y0:ie(t.y0),g=s?t.x1:Q(t.x1),y=u?t.y1:ie(t.y1)),dy?(T=m,k="y0",b=y,q="y1"):(T=y,k="y1",b=m,q="y0"),ve(Re),be(n,t),Fe(r,t,e),j.moveFn=_e==="move"?U:de,j.altKey=Re.altKey)}function Y(){fh(e)||(OT(r),ye(n),WT(r,e,t),UT.call("_guiRelayout",e,i.getUpdateObj()))}function re(){fh(e)||ye(n)}function U(Re,Pe){if(t.type==="path"){var Ie=function(Ee){return Ee},Be=Ie,Ne=Ie;s?h("xanchor",t.xanchor=me(w+Re)):(Be=function(Je){return me(Q(Je)+Re)},H&&H.type==="date"&&(Be=$a.encodeDate(Be))),u?h("yanchor",t.yanchor=pe(_+Pe)):(Ne=function(Je){return pe(ie(Je)+Pe)},J&&J.type==="date"&&(Ne=$a.encodeDate(Ne))),h("path",t.path=BT(z,Be,Ne))}else s?h("xanchor",t.xanchor=me(w+Re)):(h("x0",t.x0=me(d+Re)),h("x1",t.x1=me(g+Re))),u?h("yanchor",t.yanchor=pe(_+Pe)):(h("y0",t.y0=pe(m+Pe)),h("y1",t.y1=pe(y+Pe)));r.attr("d",Dy(e,t)),be(n,t),ch(e,a,t,N)}function de(Re,Pe){if(v){var Ie=function(Oe){return Oe},Be=Ie,Ne=Ie;s?h("xanchor",t.xanchor=me(w+Re)):(Be=function(Ke){return me(Q(Ke)+Re)},H&&H.type==="date"&&(Be=$a.encodeDate(Be))),u?h("yanchor",t.yanchor=pe(_+Pe)):(Ne=function(Ke){return pe(ie(Ke)+Pe)},J&&J.type==="date"&&(Ne=$a.encodeDate(Ne))),h("path",t.path=BT(z,Be,Ne))}else if(f){if(_e==="resize-over-start-point"){var Ee=d+Re,Je=u?m-Pe:m+Pe;h("x0",t.x0=s?Ee:me(Ee)),h("y0",t.y0=u?Je:pe(Je))}else if(_e==="resize-over-end-point"){var We=g+Re,ne=u?y-Pe:y+Pe;h("x1",t.x1=s?We:me(We)),h("y1",t.y1=u?ne:pe(ne))}}else{var Me=function(Oe){return _e.indexOf(Oe)!==-1},Ce=Me("n"),cr=Me("s"),tr=Me("w"),De=Me("e"),Le=Ce?T+Pe:T,Ye=cr?b+Pe:b,Ze=tr?A+Re:A,Ue=De?S+Re:S;u&&(Ce&&(Le=T-Pe),cr&&(Ye=b-Pe)),(!u&&Ye-Le>o||u&&Le-Ye>o)&&(h(k,t[k]=u?Le:pe(Le)),h(q,t[q]=u?Ye:pe(Ye))),Ue-Ze>l&&(h(D,t[D]=s?Ze:me(Ze)),h(R,t[R]=s?Ue:me(Ue)))}r.attr("d",Dy(e,t)),be(n,t),ch(e,a,t,N)}function be(Re,Pe){(s||u)&&Ie();function Ie(){var Be=Pe.type!=="path",Ne=Re.selectAll(".visual-cue").data([0]),Ee=1;Ne.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ee}).classed("visual-cue",!0);var Je=Q(s?Pe.xanchor:IT.midRange(Be?[Pe.x0,Pe.x1]:$a.extractPathCoords(Pe.path,So.paramIsX))),We=ie(u?Pe.yanchor:IT.midRange(Be?[Pe.y0,Pe.y1]:$a.extractPathCoords(Pe.path,So.paramIsY)));if(Je=$a.roundPositionForSharpStrokeRendering(Je,Ee),We=$a.roundPositionForSharpStrokeRendering(We,Ee),s&&u){var ne="M"+(Je-1-Ee)+","+(We-1-Ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ne.attr("d",ne)}else if(s){var Me="M"+(Je-1-Ee)+","+(We-9-Ee)+"v18 h2 v-18 Z";Ne.attr("d",Me)}else{var Ce="M"+(Je-9-Ee)+","+(We-1-Ee)+"h18 v2 h-18 Z";Ne.attr("d",Ce)}}}function ye(Re){Re.selectAll(".visual-cue").remove()}function Fe(Re,Pe,Ie){var Be=Pe.xref,Ne=Pe.yref,Ee=Js.getFromId(Ie,Be),Je=Js.getFromId(Ie,Ne),We="";Be!=="paper"&&!Ee.autorange&&(We+=Be),Ne!=="paper"&&!Je.autorange&&(We+=Ne),Ey.setClipUrl(Re,We?"clip"+Ie._fullLayout._uid+We:null,Ie)}}function BT(e,r,t){return e.replace(So.segmentRE,function(a){var n=0,i=a.charAt(0),l=So.paramIsX[i],o=So.paramIsY[i],s=So.numParams[i],u=a.substr(1).replace(So.paramRE,function(f){return n>=s||(l[n]?f=r(f):o[n]&&(f=t(f)),n++),f});return i+u})}function wZ(e,r){if(vh(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){YT(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=YT,Py(e)}}}function YT(e){if(vh(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(GT(e),delete e._fullLayout._activeShapeIndex,Py(e))}}function TZ(e){if(vh(e)){GT(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Cn=gr(),XT=Pt(),JT=Xt(),Br=$0(),MZ=hh().eraseActiveShape,dh=He(),Nr=dh._,Yr=tM.exports={};Yr.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Nr(e,"Download plot as a png"):Nr(e,"Download plot")},icon:Br.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};dh.notifier(Nr(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),Cn.call("downloadImage",e,t).then(function(a){dh.notifier(Nr(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){dh.notifier(Nr(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Yr.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Nr(e,"Edit in Chart Studio")},icon:Br.disk,click:function(e){XT.sendDataToCloud(e)}};Yr.editInChartStudio={name:"editInChartStudio",title:function(e){return Nr(e,"Edit in Chart Studio")},icon:Br.pencil,click:function(e){XT.sendDataToCloud(e)}};Yr.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Nr(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Br.zoombox,click:Ra};Yr.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Nr(e,"Pan")},attr:"dragmode",val:"pan",icon:Br.pan,click:Ra};Yr.select2d={name:"select2d",_cat:"select",title:function(e){return Nr(e,"Box Select")},attr:"dragmode",val:"select",icon:Br.selectbox,click:Ra};Yr.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Nr(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Br.lasso,click:Ra};Yr.drawclosedpath={name:"drawclosedpath",title:function(e){return Nr(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Br.drawclosedpath,click:Ra};Yr.drawopenpath={name:"drawopenpath",title:function(e){return Nr(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Br.drawopenpath,click:Ra};Yr.drawline={name:"drawline",title:function(e){return Nr(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Br.drawline,click:Ra};Yr.drawrect={name:"drawrect",title:function(e){return Nr(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Br.drawrect,click:Ra};Yr.drawcircle={name:"drawcircle",title:function(e){return Nr(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Br.drawcircle,click:Ra};Yr.eraseshape={name:"eraseshape",title:function(e){return Nr(e,"Erase active shape")},icon:Br.eraseshape,click:MZ};Yr.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Nr(e,"Zoom in")},attr:"zoom",val:"in",icon:Br.zoom_plus,click:Ra};Yr.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Nr(e,"Zoom out")},attr:"zoom",val:"out",icon:Br.zoom_minus,click:Ra};Yr.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Nr(e,"Autoscale")},attr:"zoom",val:"auto",icon:Br.autoscale,click:Ra};Yr.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Nr(e,"Reset axes")},attr:"zoom",val:"reset",icon:Br.home,click:Ra};Yr.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Nr(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Br.tooltip_basic,gravity:"ne",click:Ra};Yr.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Nr(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Br.tooltip_compare,gravity:"ne",click:Ra};function Ra(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,l={},o=JT.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var v=n==="in"?.5:2,h=(1+v)/2,d=(1-v)/2,m;for(f=0;f{"use strict";var aM=Ny(),CZ=Object.keys(aM),nM=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],iM=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(nM),Qs=[],SZ=function(e){if(iM.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();Qs.indexOf(r)===-1&&Qs.push(r),Qs.indexOf(t)===-1&&Qs.push(t)}};CZ.forEach(function(e){SZ(aM[e])});Qs.sort();lM.exports={DRAW_MODES:nM,backButtons:iM,foreButtons:Qs}});var Iy=Z((Bse,oM)=>{"use strict";var Ose=Fy();oM.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 uM=Z((Yse,sM)=>{"use strict";var LZ=He(),Tf=Er(),qZ=ct(),DZ=Iy();sM.exports=function(r,t){var a=r.modebar||{},n=qZ.newContainer(t,"modebar");function i(o,s){return LZ.coerce(a,n,DZ,o,s)}i("orientation"),i("bgcolor",Tf.addOpacity(t.paper_bgcolor,.5));var l=Tf.contrast(Tf.rgb(t.modebar.bgcolor));i("color",Tf.addOpacity(l,.3)),i("activecolor",Tf.addOpacity(l,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var hM=Z((Use,vM)=>{"use strict";var Hy=Ir(),EZ=Hr(),mh=He(),fM=$0(),PZ=tv().version,RZ=new DOMParser;function cM(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Ci=cM.prototype;Ci.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,l="#"+n+" .modebar-group";document.querySelectorAll(l).forEach(function(v){v.style.backgroundColor=i.bgcolor}),mh.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var o=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(o||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Ci.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var l=r.createButton(n);r.buttonElements.push(l),a.appendChild(l)}),r.element.appendChild(a)})};Ci.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};Ci.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(o){e.click(r.graphInfo,o),r.updateActiveButton(o.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&Hy.select(t).classed("active",!0);var l=e.icon;return typeof l=="function"?t.appendChild(l()):t.appendChild(this.createIcon(l||fM.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};Ci.createIcon=function(e){var r=EZ(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=RZ.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Ci.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),l=a.getAttribute("data-toggle")==="true",o=Hy.select(a),s=function(v,h){var d=r.modebar,m=v.querySelector(".icon path");m&&(h||v.matches(":hover")?m.style.fill=d.activecolor:m.style.fill=d.color)};if(l){if(i===t){var u=!o.classed("active");o.classed("active",u),s(a,u)}}else{var f=i===null?i:mh.nestedProperty(r,i).get();o.classed("active",f===n),s(a,f===n)}})};Ci.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var FZ=Xt(),dM=on(),Oy=gr(),IZ=bi().isUnifiedHover,HZ=hM(),yh=Ny(),OZ=Fy().DRAW_MODES,BZ=He().extendDeep;pM.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,l;Array.isArray(i)&&i.length?l=ZZ(i):!a.displayModeBar&&a.watermark?l=[]:l=YZ(r),n?n.update(r,l):t._modeBar=HZ(r,l)};function YZ(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(I,V){if(typeof V=="string"){if(V.toLowerCase()===I.toLowerCase())return!0}else{var K=V.name,Q=V._cat||V.name;if(K===I||Q===I.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var l=r.modebar.remove;typeof l=="string"&&(l=[l]);var o=a.modeBarButtonsToAdd.concat(i.filter(function(I){for(var V=0;V1?(R=["toggleHover"],z=["resetViews"]):v?(D=["zoomInGeo","zoomOutGeo"],R=["hoverClosestGeo"],z=["resetGeo"]):f?(R=["hoverClosest3d"],z=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(D=["zoomInMapbox","zoomOutMapbox"],R=["toggleHover"],z=["resetViewMapbox"]):y?(D=["zoomInMap","zoomOutMap"],R=["toggleHover"],z=["resetViewMap"]):h?R=["hoverClosestPie"]:T?(R=["hoverClosestCartesian","hoverCompareCartesian"],z=["resetViewSankey"]):R=["toggleHover"],u&&R.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(VZ(t)||A)&&(R=[]),u&&!b&&(D=["zoomIn2d","zoomOut2d","autoScale2d"],z[0]!=="resetViews"&&(z=["resetScale2d"])),f?N=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||m?N=["zoom2d","pan2d"]:g||y||v?N=["pan2d"]:w&&(N=["zoom2d"]),GZ(t)&&N.push("select2d","lasso2d");var H=[],O=function(I){H.indexOf(I)===-1&&R.indexOf(I)!==-1&&H.push(I)};if(Array.isArray(o)){for(var J=[],X=0;X{"use strict";yM.exports={moduleType:"component",name:"modebar",layoutAttributes:Iy(),supplyLayoutDefaults:uM(),manage:mM()}});var Yy=Z((Wse,gM)=>{"use strict";var XZ=Da().FROM_BL;gM.exports=function(r,t,a){a===void 0&&(a=XZ[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var Af=Z(Mf=>{"use strict";var Lo=He(),Uy=ff(),jn=Xt().id2name,JZ=Xn(),bM=Yy(),KZ=b0(),QZ=Bt().ALMOST_EQUAL,$Z=Da().FROM_BL;Mf.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],l=r._axisMatchGroups=[],o,s,u,f,v,h,d,m;for(o=0;oi?t.substr(i):a.substr(n))+l}function eX(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),l=0;lQZ*m&&!_)){for(i=0;iN&&KR&&(R=K);var ie=(R-D)/(2*z);v/=ie,D=s.l2r(D),R=s.l2r(R),s.range=s._input.range=S{"use strict";var bh=Ir(),za=gr(),cn=Pt(),Sn=He(),Wy=xa(),Zy=Q0(),kf=Er(),$s=tt(),TM=sf(),SM=By(),Cf=dt(),Zi=Da(),LM=Af(),rX=LM.enforce,tX=LM.clean,MM=ff().doAutoRange,qM="start",aX="middle",DM="end",nX=da().zindexSeparator;Qt.layoutStyles=function(e){return Sn.syncOrAsync([cn.doAutoMargin,lX],e)};function iX(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function lX(e){var r=e._fullLayout,t=r._size,a=t.p,n=Cf.list(e,"",!0),i,l,o,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call($s.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),Qt.drawMainTitle(e),SM.manage(e),!r._has("cartesian"))return cn.previousPromises(e);function v(Ae,Y,re){var U=Ae._lw/2;if(Ae._id.charAt(0)==="x"){if(Y){if(re==="top")return Y._offset-a-U}else return t.t+t.h*(1-(Ae.position||0))+U%1;return Y._offset+Y._length+a+U}if(Y){if(re==="right")return Y._offset+Y._length+a+U}else return t.l+t.w*(Ae.position||0)+U%1;return Y._offset-a-U}for(i=0;i0){fX(e,i,u,s),o.attr({x:l,y:i,"text-anchor":a,dy:CM(r.yanchor)}).call(Wy.positionText,l,i);var f=(r.text.match(Wy.BR_TAG_ALL)||[]).length;if(f){var v=Zi.LINE_SPACING*f+Zi.MID_SHIFT;r.y===0&&(v=-v),o.selectAll(".line").each(function(){var y=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",y)})}var h=bh.selectAll(".gtitle-subtitle");if(h.node()){var d=o.node().getBBox(),m=d.y+d.height,g=m+TM.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:l,y:g,"text-anchor":a,dy:CM(r.yanchor)}).call(Wy.positionText,l,g)}}}};function oX(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,l=Sn.isTopAnchor(r)?a:a-n,o=t==="b"?i-l:l;return Sn.isTopAnchor(r)&&t==="t"||Sn.isBottomAnchor(r)&&t==="b"?!1:o.5?"t":"b",l=e._fullLayout.margin[i],o=0;return r.yref==="paper"?o=t+r.pad.t+r.pad.b:r.yref==="container"&&(o=sX(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),o>l?o:0}function fX(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,l=i.y>.5?"t":"b",o={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&oX(e,i,l,r,a)?o[l]=t:i.yref==="container"&&(s[l]=t,e._fullLayout._reservedMargin[n]=s),cn.allowAutoMargin(e,n),cn.autoMargin(e,n,o)}function cX(e,r){var t=e.title,a=e._size,n=0;switch(r===qM?n=t.pad.l:r===DM&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function vX(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===Zi.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function CM(e){return e==="top"?Zi.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Zi.MID_SHIFT+"em"}function hX(e){var r=e.title,t=aX;return Sn.isRightAnchor(r)?t=DM:Sn.isLeftAnchor(r)&&(t=qM),t}function dX(e){var r=e.title,t="0em";return Sn.isTopAnchor(r)?t=Zi.CAP_SHIFT+"em":Sn.isMiddleAnchor(r)&&(t=Zi.MID_SHIFT+"em"),t}Qt.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var pX=Tl().readPaths,mX=uh(),EM=pl().clearOutlineControllers,Xy=Er(),PM=tt(),yX=ct().arrayEditor,RM=Al(),gX=RM.getPathString;NM.exports={draw:_h,drawOne:zM,activateLastSelection:_X};function _h(e){var r=e._fullLayout;EM(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;y--){var w=l.append("path").attr(s).style("opacity",y?.1:u).call(Xy.stroke,v).call(Xy.fill,f).call(PM.dashLine,y?"solid":d,y?4+h:h);if(bX(w,e,a),m){var _=yX(e.layout,"selections",a);w.style({cursor:"move"});var T={element:w.node(),plotinfo:n,gd:e,editHelpers:_,isActiveSelection:!0},b=pX(o,e);mX(b,w,T)}else w.style("pointer-events",y?"all":"none");g[y]=w}var A=g[0],S=g[1];S.node().addEventListener("click",function(){return xX(e,A)})}}function bX(e,r,t){var a=t.xref+t.yref;PM.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function xX(e,r){if(wh(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){Jy(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=Jy,_h(e)}}}function _X(e){if(wh(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=Jy,_h(e)}}function Jy(e){if(wh(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(EM(e),delete e._fullLayout._activeSelectionIndex,_h(e))}}});var IM=Z((Kse,FM)=>{function wX(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,l){return a("temp_status",{seg:n,above:i,below:l})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,l){return a("status",{seg:n,above:i,below:l})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}FM.exports=wX});var OM=Z((Qse,HM)=>{function TX(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],l=a[1],o=n[0],s=n[1],u=t[0],f=t[1];return(o-i)*(f-l)-(s-l)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],l=n[0]-a[0],o=t[0]-a[0],s=n[1]-a[1],u=o*l+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=o-i>e&&(l-f)*(i-v)/(o-v)+f-n>e&&(s=!s),l=f,o=v}return s}};return r}HM.exports=TX});var YM=Z(($se,BM)=>{var MX={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};BM.exports=MX});var GM=Z((jse,UM)=>{var Sf=YM();function AX(e,r,t){function a(m,g){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:null,below:null},otherFill:null}}function n(m,g,y){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:y.myFill.above,below:y.myFill.below},otherFill:null}}var i=Sf.create();function l(m,g,y,w,_,T){var b=r.pointsCompare(g,_);return b!==0?b:r.pointsSame(y,T)?0:m!==w?m?1:-1:r.pointAboveOrOnLine(y,w?_:T,w?T:_)?1:-1}function o(m,g){i.insertBefore(m,function(y){var w=l(m.isStart,m.pt,g,y.isStart,y.pt,y.other.pt);return w<0})}function s(m,g){var y=Sf.node({isStart:!0,pt:m.start,seg:m,primary:g,other:null,status:null});return o(y,m.end),y}function u(m,g,y){var w=Sf.node({isStart:!1,pt:g.end,seg:g,primary:y,other:m,status:null});m.other=w,o(w,m.pt)}function f(m,g){var y=s(m,g);return u(y,m,g),y}function v(m,g){t&&t.segmentChop(m.seg,g),m.other.remove(),m.seg.end=g,m.other.pt=g,o(m.other,m.pt)}function h(m,g){var y=n(g,m.seg.end,m.seg);return v(m,g),f(y,m.primary)}function d(m,g){var y=Sf.create();function w(J,X){var B=J.seg.start,I=J.seg.end,V=X.seg.start,K=X.seg.end;return r.pointsCollinear(B,V,K)?r.pointsCollinear(I,V,K)||r.pointAboveOrOnLine(I,V,K)?1:-1:r.pointAboveOrOnLine(B,V,K)?1:-1}function _(J){return y.findTransition(function(X){var B=w(J,X.ev);return B>0})}function T(J,X){var B=J.seg,I=X.seg,V=B.start,K=B.end,Q=I.start,ie=I.end;t&&t.checkIntersection(B,I);var me=r.linesIntersect(V,K,Q,ie);if(me===!1){if(!r.pointsCollinear(V,K,Q)||r.pointsSame(V,ie)||r.pointsSame(K,Q))return!1;var pe=r.pointsSame(V,Q),ge=r.pointsSame(K,ie);if(pe&&ge)return X;var j=!pe&&r.pointBetween(V,Q,ie),_e=!ge&&r.pointBetween(K,Q,ie);if(pe)return _e?h(X,K):h(J,ie),X;j&&(ge||(_e?h(X,K):h(J,ie)),h(X,V))}else me.alongA===0&&(me.alongB===-1?h(J,Q):me.alongB===0?h(J,me.pt):me.alongB===1&&h(J,ie)),me.alongB===0&&(me.alongA===-1?h(X,V):me.alongA===0?h(X,me.pt):me.alongA===1&&h(X,K));return!1}for(var b=[];!i.isEmpty();){var A=i.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let J=function(){if(k){var X=T(A,k);if(X)return X}return q?T(A,q):!1};var O=J;t&&t.segmentNew(A.seg,A.primary);var S=_(A),k=S.before?S.before.ev:null,q=S.after?S.after.ev:null;t&&t.tempStatus(A.seg,k?k.seg:!1,q?q.seg:!1);var D=J();if(D){if(e){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,R&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(D.seg),A.other.remove(),A.remove()}if(i.getHead()!==A){t&&t.rewind(A.seg);continue}if(e){var R;A.seg.myFill.below===null?R=!0:R=A.seg.myFill.above!==A.seg.myFill.below,q?A.seg.myFill.below=q.seg.myFill.above:A.seg.myFill.below=m,R?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var z;q?A.primary===q.primary?z=q.seg.otherFill.above:z=q.seg.myFill.above:z=A.primary?g:m,A.seg.otherFill={above:z,below:z}}t&&t.status(A.seg,k?k.seg:!1,q?q.seg:!1),A.other.status=S.insert(Sf.node({ev:A}))}else{var N=A.status;if(N===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(y.exists(N.prev)&&y.exists(N.next)&&T(N.prev.ev,N.next.ev),t&&t.statusRemove(N.ev.seg),N.remove(),!A.primary){var H=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=H}b.push(A.seg)}i.getHead().remove()}return t&&t.done(),b}return e?{addRegion:function(m){for(var g,y=m[m.length-1],w=0;w{function kX(e,r,t){var a=[],n=[];return e.forEach(function(i){var l=i.start,o=i.end;if(r.pointsSame(l,o)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function v(O,J,X){return f.index=O,f.matches_head=J,f.matches_pt1=X,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function Lf(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var CX={union:function(e,r){return Lf(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return Lf(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return Lf(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return Lf(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return Lf(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};ZM.exports=CX});var KM=Z((tue,JM)=>{var SX={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function l(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var o=l(i[0]),s=1;s{var LX=IM(),qX=OM(),QM=GM(),DX=WM(),qf=XM(),$M=KM(),Ln=!1,Df=qX(),ja;ja={buildLog:function(e){return e===!0?Ln=LX():e===!1&&(Ln=!1),Ln===!1?!1:Ln.list},epsilon:function(e){return Df.epsilon(e)},segments:function(e){var r=QM(!0,Df,Ln);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=QM(!1,Df,Ln);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:qf.union(e.combined,Ln),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:qf.intersect(e.combined,Ln),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:qf.difference(e.combined,Ln),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:qf.differenceRev(e.combined,Ln),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:qf.xor(e.combined,Ln),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:DX(e.segments,Df,Ln),inverted:e.inverted}},polygonFromGeoJSON:function(e){return $M.toPolygon(ja,e)},polygonToGeoJSON:function(e){return $M.fromPolygon(ja,Df,e)},union:function(e,r){return Ef(e,r,ja.selectUnion)},intersect:function(e,r){return Ef(e,r,ja.selectIntersect)},difference:function(e,r){return Ef(e,r,ja.selectDifference)},differenceRev:function(e,r){return Ef(e,r,ja.selectDifferenceRev)},xor:function(e,r){return Ef(e,r,ja.selectXor)}};function Ef(e,r,t){var a=ja.segments(e),n=ja.segments(r),i=ja.combine(a,n),l=t(i);return ja.polygon(l)}typeof window=="object"&&(window.PolyBool=ja);jM.exports=ja});var tA=Z((nue,rA)=>{rA.exports=function(r,t,a,n){var i=r[0],l=r[1],o=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;ul!=m>l&&i<(d-v)*(l-h)/(m-h)+v;g&&(o=!o)}return o}});var $y=Z((iue,aA)=>{"use strict";var Qy=wv().dot,Th=Bt().BADNUM,Mh=aA.exports={};Mh.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],l=i,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;on||w===Th||wl||g&&u(m))}function v(m,g){var y=m[0],w=m[1];if(y===Th||yn||w===Th||wl)return!1;var _=t.length,T=t[0][0],b=t[0][1],A=0,S,k,q,D,R;for(S=1;S<_;S++)if(k=T,q=b,T=t[S][0],b=t[S][1],D=Math.min(k,T),!(yMath.max(k,T)||w>Math.max(q,b)))if(wo||Math.abs(Qy(v,u))>n)return!0;return!1};Mh.filter=function(r,t){var a=[r[0]],n=0,i=0;function l(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var v=f+1;v1){var o=r.pop();l(o)}return{addPt:l,raw:r,filtered:a}}});var iA=Z((lue,nA)=>{"use strict";nA.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var CA=Z((oue,kA)=>{"use strict";var lA=eA(),EX=tA(),zf=gr(),PX=tt().dashStyle,Pf=Er(),RX=ki(),zX=bi().makeEventData,Of=Vs(),NX=Of.freeMode,FX=Of.rectMode,Nf=Of.drawMode,tg=Of.openMode,ag=Of.selectMode,oA=Al(),sA=_f(),hA=uh(),dA=pl().clearOutline,pA=Tl(),jy=pA.handleEllipse,IX=pA.readPaths,HX=ih().newShapes,OX=Ay(),BX=Ky().activateLastSelection,kh=He(),YX=kh.sorterAsc,mA=$y(),Rf=zv(),qn=Xt().getFromId,UX=Q0(),GX=xh().redrawReglTraces,Ch=iA(),Si=Ch.MINSELECT,VX=mA.filter,ng=mA.tester,ig=rh(),uA=ig.p2r,WX=ig.axValue,ZX=ig.getTransform;function lg(e){return e.subplot!==void 0}function XX(e,r,t,a,n){var i=!lg(a),l=NX(n),o=FX(n),s=tg(n),u=Nf(n),f=ag(n),v=n==="drawline",h=n==="drawcircle",d=v||h,m=a.gd,g=m._fullLayout,y=f&&g.newselection.mode==="immediate"&&i,w=g._zoomlayer,_=a.element.getBoundingClientRect(),T=a.plotinfo,b=ZX(T),A=r-_.left,S=t-_.top;g._calcInverseTransform(m);var k=kh.apply3DTransform(g._invTransform)(A,S);A=k[0],S=k[1];var q=g._invScaleX,D=g._invScaleY,R=A,z=S,N="M"+A+","+S,H=a.xaxes[0],O=a.yaxes[0],J=H._length,X=O._length,B=e.altKey&&!(Nf(n)&&s),I,V,K,Q,ie,me,pe;gA(e,m,a),l&&(I=VX([[A,S]],Ch.BENDPX));var ge=w.selectAll("path.select-outline-"+T.id).data([1]),j=u?g.newshape:g.newselection;u&&(a.hasText=j.label.text||j.label.texttemplate);var _e=u&&!s?j.fillcolor:"rgba(0,0,0,0)",se=j.line.color||(i?Pf.contrast(m._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+T.id).style({opacity:u?j.opacity/2:1,"stroke-dasharray":PX(j.line.dash,j.line.width),"stroke-width":j.line.width+"px","shape-rendering":"crispEdges"}).call(Pf.stroke,se).call(Pf.fill,_e).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",b).attr("d",N+"Z");var Se=w.append("path").attr("class","zoombox-corners").style({fill:Pf.background,stroke:Pf.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(u&&a.hasText){var ve=w.select(".label-temp");ve.empty()&&(ve=w.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ae=g._uid+Ch.SELECTID,Y=[],re=Sh(m,a.xaxes,a.yaxes,a.subplot);y&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var de=H._id,be=O._id;TA(m,de,be,re);for(var ye=(m.layout||{}).selections||[],Fe=[],Re=!1,Pe=0;Pe=0){m._fullLayout._deactivateShape(m);return}if(!u){var ye=g.clickmode;Rf.done(Ae).then(function(){if(Rf.clear(Ae),de===2){for(ge.remove(),ie=0;ie-1&&yA(be,m,a.xaxes,a.yaxes,a.subplot,a,ge),ye==="event"&&Hf(m,void 0);RX.click(m,be,T.id)}).catch(kh.error)}},a.doneFn=function(){Se.remove(),Rf.done(Ae).then(function(){Rf.clear(Ae),!y&&Q&&a.selectionDefs&&(Q.subtract=B,a.selectionDefs.push(Q),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,K)),(y||u)&&Ff(a,y),a.doneFnCompleted&&a.doneFnCompleted(Y),f&&Hf(m,pe)}).catch(kh.error)}}function yA(e,r,t,a,n,i,l){var o=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,v=[],h,d,m,g,y,w,_,T,b,A;if(jX(o)){gA(e,r,i),h=Sh(r,t,a,n);var S=eJ(o,h),k=S.pointNumbers.length>0;if(k?rJ(h,S):tJ(h)&&(_=cA(S))){for(l&&l.remove(),A=0;A=0}function $X(e){return e._fullLayout._activeSelectionIndex>=0}function Ff(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;QX(n)&&n._fullLayout._deactivateShape(n),$X(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,l=i._zoomlayer,o=Nf(t),s=ag(t);if(o||s){var u=l.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;o&&(f=HX(u,e)),f&&zf.call("_guiRelayout",n,{shapes:f});var v;s&&!lg(e)&&(v=OX(u,e)),v&&(n._fullLayout._noEmitSelectedAtStart=!0,zf.call("_guiRelayout",n,{selections:v}).then(function(){r&&BX(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function fA(e){return e._id}function Sh(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(fA),l=t.map(fA),o,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function rJ(e,r){var t=[],a,n,i,l;for(l=0;l0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(l=0;l1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function If(e,r,t){var a;for(a=0;a-1&&r;if(!l&&r){var de=vA(e,!0);if(de.length){var be=de[0].xref,ye=de[0].yref;if(be&&ye){var Fe=MA(de),Re=AA([qn(e,be,"x"),qn(e,ye,"y")]);Re(Y,Fe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:U&&Hf(e,Y),h._reselect=!1}if(!l&&h._deselect){var Pe=h._deselect;o=Pe.xref,s=Pe.yref,iJ(o,s,f)||TA(e,o,s,a),U&&(Y.points.length?Hf(e,Y):ug(e)),h._deselect=!1}return{eventData:Y,selectionTesters:t}}function nJ(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";SA.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 Bf=Z((uue,LA)=>{"use strict";LA.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var js=Z((cue,EA)=>{"use strict";var qA=fg(),DA=ha(),Lh=da(),fJ=ct().templatedArray,fue=Bf();EA.exports=fJ("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:DA({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:qA.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:qA.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",Lh.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Lh.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Lh.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",Lh.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:DA({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var qh=Z((vue,PA)=>{"use strict";PA.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var zA=Z((hue,RA)=>{"use strict";RA.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var qo=Z((due,BA)=>{"use strict";var NA=r0().axisHoverFormat,cJ=zi().texttemplateAttrs,vJ=zi().hovertemplateAttrs,FA=nf(),hJ=ha(),dJ=mi().dash,pJ=mi().pattern,mJ=tt(),yJ=qh(),Dh=Yt().extendFlat,gJ=zA();function IA(e){return{valType:"any",dflt:0,editType:"calc"}}function HA(e){return{valType:"any",editType:"calc"}}function OA(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}BA.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:IA("x"),yperiod:IA("y"),xperiod0:HA("x0"),yperiod0:HA("y0"),xperiodalignment:OA("x"),yperiodalignment:OA("y"),xhoverformat:NA("x"),yhoverformat:NA("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:cJ({},{}),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:vJ({},{keys:yJ.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Dh({},dJ,{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:gJ(!0),fillgradient:Dh({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:pJ,marker:Dh({symbol:{valType:"enumerated",values:mJ.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:Dh({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},FA("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"},FA("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:hJ({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var cg=Z((mue,GA)=>{"use strict";var YA=js(),UA=qo().line,bJ=mi().dash,Eh=Yt().extendFlat,xJ=pi().overrideAll,_J=ct().templatedArray,pue=Bf();GA.exports=xJ(_J("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:Eh({},YA.xref,{}),yref:Eh({},YA.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:UA.color,width:Eh({},UA.width,{min:1,dflt:1}),dash:Eh({},bJ,{dflt:"dot"})}}),"arraydraw","from-root")});var XA=Z((yue,ZA)=>{"use strict";var VA=He(),Ph=dt(),wJ=Jn(),TJ=cg(),WA=Al();ZA.exports=function(r,t){wJ(r,t,{name:"selections",handleItemDefaults:MJ});for(var a=t.selections,n=0;n{"use strict";JA.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var Yf=Z((bue,jA)=>{"use strict";var AJ=gr(),QA=He(),$A=Xt();jA.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var l=AJ.subplotsRegistry.cartesian,o=l.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,v=s.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var ek=Ky(),Uf=CA();rk.exports={moduleType:"component",name:"selections",layoutAttributes:cg(),supplyLayoutDefaults:XA(),supplyDrawNewSelectionDefaults:KA(),includeBasePlot:Yf()("selections"),draw:ek.draw,drawOne:ek.drawOne,reselect:Uf.reselect,prepSelect:Uf.prepSelect,clearOutline:Uf.clearOutline,clearSelectionsCache:Uf.clearSelectionsCache,selectOnClick:Uf.selectOnClick}});var wk=Z((_ue,_k)=>{"use strict";var mg=Ir(),Dn=He(),tk=Dn.numberFormat,kJ=bn(),CJ=Jm(),Rh=gr(),ck=Dn.strTranslate,SJ=xa(),ak=Er(),Cl=tt(),LJ=ki(),nk=dt(),qJ=wl(),DJ=Qn(),vk=Vs(),zh=vk.selectingOrDrawing,EJ=vk.freeMode,PJ=Da().FROM_TL,RJ=Q0(),zJ=xh().redrawReglTraces,NJ=Pt(),hg=Xt().getFromId,FJ=eu().prepSelect,IJ=eu().clearOutline,HJ=eu().selectOnClick,vg=Yy(),yg=da(),ik=yg.MINDRAG,Ya=yg.MINZOOM,lk=!0;function OJ(e,r,t,a,n,i,l,o){var s=e._fullLayout._zoomlayer,u=l+o==="nsew",f=(l+o).length===1,v,h,d,m,g,y,w,_,T,b,A,S,k,q,D,R,z,N,H,O,J,X,B;t+=r.yaxis._shift;function I(){if(v=r.xaxis,h=r.yaxis,T=v._length,b=h._length,w=v._offset,_=h._offset,d={},d[v._id]=v,m={},m[h._id]=h,l&&o)for(var De=r.overlays,Le=0;Le=0){Ye._fullLayout._deactivateShape(Ye);return}var Ze=Ye._fullLayout.clickmode;if(pg(Ye),De===2&&!f&&We(),u)Ze.indexOf("select")>-1&&HJ(Le,Ye,g,y,r.id,Q),Ze.indexOf("event")>-1&&LJ.click(Ye,Le,r.id);else if(De===1&&f){var Ue=l?h:v,Oe=l==="s"||o==="w"?0:1,Ke=Ue._name+".range["+Oe+"]",fr=BJ(Ue,Oe),lr="left",ze="middle";if(Ue.fixedrange)return;l?(ze=l==="n"?"top":"bottom",Ue.side==="right"&&(lr="right")):o==="e"&&(lr="right"),Ye._context.showAxisRangeEntryBoxes&&mg.select(K).call(SJ.makeEditable,{gd:Ye,immediate:!0,background:Ye._fullLayout.paper_bgcolor,text:String(fr),fill:Ue.tickfont?Ue.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:ze}).on("edit",function(ae){var oe=Ue.d2r(ae);oe!==void 0&&Rh.call("_guiRelayout",Ye,Ke,oe)})}}DJ.init(Q);var pe,ge,j,_e,se,Se,ve,Ae,Y,re;function U(De,Le,Ye){var Ze=K.getBoundingClientRect();pe=Le-Ze.left,ge=Ye-Ze.top,e._fullLayout._calcInverseTransform(e);var Ue=Dn.apply3DTransform(e._fullLayout._invTransform)(pe,ge);pe=Ue[0],ge=Ue[1],j={l:pe,r:pe,w:0,t:ge,b:ge,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:kJ(e._fullLayout.plot_bgcolor).getLuminance(),se="M0,0H"+T+"V"+b+"H0V0",Se=!1,ve="xy",re=!1,Ae=pk(s,_e,w,_,se),Y=mk(s,w,_)}function de(De,Le){if(e._transitioningWithDuration)return!1;var Ye=Math.max(0,Math.min(T,X*De+pe)),Ze=Math.max(0,Math.min(b,B*Le+ge)),Ue=Math.abs(Ye-pe),Oe=Math.abs(Ze-ge);j.l=Math.min(pe,Ye),j.r=Math.max(pe,Ye),j.t=Math.min(ge,Ze),j.b=Math.max(ge,Ze);function Ke(){ve="",j.r=j.l,j.t=j.b,Y.attr("d","M0,0Z")}if(A.isSubplotConstrained)Ue>Ya||Oe>Ya?(ve="xy",Ue/T>Oe/b?(Oe=Ue*b/T,ge>Ze?j.t=ge-Oe:j.b=ge+Oe):(Ue=Oe*T/b,pe>Ye?j.l=pe-Ue:j.r=pe+Ue),Y.attr("d",Nh(j))):Ke();else if(S.isSubplotConstrained)if(Ue>Ya||Oe>Ya){ve="xy";var fr=Math.min(j.l/T,(b-j.b)/b),lr=Math.max(j.r/T,(b-j.t)/b);j.l=fr*T,j.r=lr*T,j.b=(1-fr)*b,j.t=(1-lr)*b,Y.attr("d",Nh(j))}else Ke();else!q||Oe0){var ae;if(S.isSubplotConstrained||!k&&q.length===1){for(ae=0;ae1&&(Ke.maxallowed!==void 0&&R===(Ke.range[0]1&&(fr.maxallowed!==void 0&&z===(fr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function UJ(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function pk(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",ck(t,a)).attr("d",n+"Z")}function mk(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:ak.background,stroke:ak.defaultLine,"stroke-width":1,opacity:0}).attr("transform",ck(r,t)).attr("d","M0,0Z")}function yk(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),gk(e,r,n,i)}function gk(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function pg(e){mg.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function bk(e){lk&&e.data&&e._context.showTips&&(Dn.notifier(Dn._(e,"Double-click to zoom back out"),"long"),lk=!1)}function GJ(e,r){return"M"+(e.l-.5)+","+(r-Ya-.5)+"h-3v"+(2*Ya+1)+"h3ZM"+(e.r+.5)+","+(r-Ya-.5)+"h3v"+(2*Ya+1)+"h-3Z"}function VJ(e,r){return"M"+(r-Ya-.5)+","+(e.t-.5)+"v-3h"+(2*Ya+1)+"v3ZM"+(r-Ya-.5)+","+(e.b+.5)+"v3h"+(2*Ya+1)+"v-3Z"}function Nh(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Ya)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function uk(e,r,t,a,n){for(var i=!1,l={},o={},s,u,f,v,h=(n||{}).xaHash,d=(n||{}).yaHash,m=0;m{"use strict";var WJ=Ir(),Fh=ki(),ZJ=Qn(),XJ=wl(),ei=wk().makeDragBox,$t=da().DRAGGERSIZE;Ih.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){WJ.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,l){if((t._plots[i].mainplot&&!0)===(t._plots[l].mainplot&&!0)){var o=i.split("y"),s=l.split("y");return o[0]===s[0]?Number(o[1]||1)-Number(s[1]||1):Number(o[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var l=t._plots[i],o=l.xaxis,s=l.yaxis;if(!l.mainplot){var u=ei(r,l,o._offset,s._offset,o._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&Fh.hover(r,h,i)},Fh.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,ZJ.unhover(r,h))},r._context.showAxisDragHandles&&(ei(r,l,o._offset-$t,s._offset-$t,$t,$t,"n","w"),ei(r,l,o._offset+o._length,s._offset-$t,$t,$t,"n","e"),ei(r,l,o._offset-$t,s._offset+s._length,$t,$t,"s","w"),ei(r,l,o._offset+o._length,s._offset+s._length,$t,$t,"s","e"))}if(r._context.showAxisDragHandles){if(i===o._mainSubplot){var f=o._mainLinePosition;o.side==="top"&&(f-=$t),ei(r,l,o._offset+o._length*.1,f,o._length*.8,$t,"","ew"),ei(r,l,o._offset,f,o._length*.1,$t,"","w"),ei(r,l,o._offset+o._length*.9,f,o._length*.1,$t,"","e")}if(i===s._mainSubplot){var v=s._mainLinePosition;s.side!=="right"&&(v-=$t),ei(r,l,v,s._offset+s._length*.1,$t,s._length*.8,"ns",""),ei(r,l,v,s._offset+s._length*.9,$t,s._length*.1,"s",""),ei(r,l,v,s._offset,$t,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,Fh.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,Fh.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Ih.updateFx(r)}};Ih.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";XJ(r._draggers,t)}});var Ak=Z((Tue,Mk)=>{"use strict";var Tk=gr();Mk.exports=function(r){for(var t=Tk.layoutArrayContainers,a=Tk.layoutArrayRegexes,n=r.split("[")[0],i,l,o=0;o{"use strict";var JJ=nl(),bg=_v(),Gf=ro(),KJ=vp().sorterAsc,xg=gr();Vf.containerArrayMatch=Ak();var QJ=Vf.isAddVal=function(r){return r==="add"||JJ(r)},kk=Vf.isRemoveVal=function(r){return r===null||r==="remove"};Vf.applyContainerArrayChanges=function(r,t,a,n,i){var l=t.astr,o=xg.getComponentMethod(l,"supplyLayoutDefaults"),s=xg.getComponentMethod(l,"draw"),u=xg.getComponentMethod(l,"drawOne"),f=n.replot||n.recalc||o===bg||s===bg,v=r.layout,h=r._fullLayout;if(a[""]){Object.keys(a).length>1&&Gf.warn("Full array edits are incompatible with other edits",l);var d=a[""][""];if(kk(d))t.set(null);else if(Array.isArray(d))t.set(d);else return Gf.warn("Unrecognized full array edit value",l,d),!0;return f?!1:(o(v,h),s(r),!0)}var m=Object.keys(a).map(Number).sort(KJ),g=t.get(),y=g||[],w=i(h,l).get(),_=[],T=-1,b=y.length,A,S,k,q,D,R,z,N;for(A=0;Ay.length-(z?0:1)){Gf.warn("index out of range",l,k);continue}if(R!==void 0)D.length>1&&Gf.warn("Insertion & removal are incompatible with edits to the same index.",l,k),kk(R)?_.push(k):z?(R==="add"&&(R={}),y.splice(k,0,R),w&&w.splice(k,0,{})):Gf.warn("Unrecognized full object edit value",l,k,R),T===-1&&(T=k);else for(S=0;S=0;A--)y.splice(_[A],1),w&&w.splice(_[A],1);if(y.length?g||t.set(y):t.set(null),f)return!1;if(o(v,h),u!==bg){var H;if(T===-1)H=m;else{for(b=Math.max(y.length,b),H=[],A=0;A=T));A++)H.push(k);for(A=T;A{"use strict";var Dk=Hr(),Aue=tp(),Ek=gr(),en=He(),Wf=Pt(),Pk=Xt(),Rk=Er(),Zf=Pk.cleanId,$J=Pk.getFromTrace,_g=Ek.traceIs;ri.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&en.log("Clearing previous rejected promises from queue."),e._promises=[]};ri.cleanLayout=function(e){var r,t;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 a=(Wf.subplotsRegistry.cartesian||{}).attrRegex,n=(Wf.subplotsRegistry.polar||{}).attrRegex,i=(Wf.subplotsRegistry.ternary||{}).attrRegex,l=(Wf.subplotsRegistry.gl3d||{}).attrRegex,o=Object.keys(e);for(r=0;r3?(y.x=1.02,y.xanchor="left"):y.x<-2&&(y.x=-.02,y.xanchor="right"),y.y>3?(y.y=1.02,y.yanchor="bottom"):y.y<-2&&(y.y=-.02,y.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),Rk.clean(e),e.template&&e.template.layout&&ri.cleanLayout(e.template.layout),e};function ru(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=Zf(t,a,!0))}ri.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}ri.hasParent=function(e,r){for(var t=qk(r);t;){if(t in e)return!0;t=qk(t)}return!1};var rK=["x","y","z"];ri.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var Yh=Ir(),tK=Hr(),aK=kp(),$e=He(),lt=$e.nestedProperty,Mg=$u(),Ua=p6(),En=gr(),Jh=As(),xr=Pt(),Na=dt(),nK=Xm(),iK=Xn(),wg=tt(),lK=Er(),oK=gg().initInteractions,sK=fo(),uK=eu().clearOutline,Ok=eo().dfltConfig,Oh=Ck(),It=zk(),et=xh(),Sl=pi(),fK=da().AX_NAME_PATTERN,Tg=0,Nk=5;function cK(e,r,t,a){var n;if(e=$e.getGraphDiv(e),Mg.init(e),$e.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var l=Mg.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(l===!1)return Promise.reject();!r&&!t&&!$e.isPlotDiv(e)&&$e.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function o(){if(n)return Gr.addFrames(e,n)}Yk(e,a),t||(t={}),Yh.select(e).classed("js-plotly-plot",!0),wg.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(It.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=It.cleanLayout(t)),xr.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(PK(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),wg.initGradients(e),wg.initPatterns(e),s&&Na.saveShowSpikeInitial(e);var v=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;v&&xr.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function Uk(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),Gh(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&Gh(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function mK(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof q.parts[z]!="string";)z--;var N=q.parts[z],H=q.parts[z-1]+"."+N,O=q.parts.slice(0,z).join("."),J=lt(e.layout,O).get(),X=lt(a,O).get(),B=q.get();if(D!==void 0){w[k]=D,_[k]=N==="reverse"?D:Xi(B);var I=Jh.getLayoutValObject(a,q.parts);if(I&&I.impliedEdits&&D!==null)for(var V in I.impliedEdits)T($e.relativeAttr(k,V),I.impliedEdits[V]);if(["width","height"].indexOf(k)!==-1)if(D){T("autosize",null);var K=k==="height"?"width":"height";T(K,a[K])}else a[k]=e._initialAutoSize[k];else if(k==="autosize")T("width",D?null:a.width),T("height",D?null:a.height);else if(H.match($k))S(H),lt(a,O+"._inputRange").set(null);else if(H.match(jk)){S(H),lt(a,O+"._inputRange").set(null);var Q=lt(a,O).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else H.match(eC)&<(a,O+"._inputDomain").set(null);if(N==="type"){A=J;var ie=X.type==="linear"&&D==="log",me=X.type==="log"&&D==="linear";if(ie||me){if(!A||!A.range)T(O+".autorange",!0);else if(X.autorange)ie&&(A.range=A.range[1]>A.range[0]?[1,2]:[2,1]);else{var pe=A.range[0],ge=A.range[1];ie?(pe<=0&&ge<=0&&T(O+".autorange",!0),pe<=0?pe=ge/1e6:ge<=0&&(ge=pe/1e6),T(O+".range[0]",Math.log(pe)/Math.LN10),T(O+".range[1]",Math.log(ge)/Math.LN10)):(T(O+".range[0]",Math.pow(10,pe)),T(O+".range[1]",Math.pow(10,ge)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[q.parts[0]]&&q.parts[1]==="radialaxis"&&delete a[q.parts[0]]._subplot.viewInitial["radialaxis.range"],En.getComponentMethod("annotations","convertCoords")(e,X,D,T),En.getComponentMethod("images","convertCoords")(e,X,D,T)}else T(O+".autorange",!0),T(O+".range",null);lt(a,O+"._inputRange").set(null)}else if(N.match(fK)){var j=lt(a,k).get(),_e=(D||{}).type;(!_e||_e==="-")&&(_e="linear"),En.getComponentMethod("annotations","convertCoords")(e,j,_e,T),En.getComponentMethod("images","convertCoords")(e,j,_e,T)}var se=Oh.containerArrayMatch(k);if(se){f=se.array,v=se.index;var Se=se.property,ve=I||{editType:"calc"};v!==""&&Se===""&&(Oh.isAddVal(D)?_[k]=null:Oh.isRemoveVal(D)?_[k]=(lt(t,f).get()||[])[v]:$e.warn("unrecognized full object value",r)),Sl.update(y,ve),u[f]||(u[f]={});var Ae=u[f][v];Ae||(Ae=u[f][v]={}),Ae[Se]=D,delete r[k]}else N==="reverse"?(J.range?J.range.reverse():(T(O+".autorange",!0),J.range=[1,0]),X.autorange?y.calc=!0:y.plot=!0):(k==="dragmode"&&(D===!1&&B!==!1||D!==!1&&B===!1)||a._has("scatter-like")&&a._has("regl")&&k==="dragmode"&&(D==="lasso"||D==="select")&&!(B==="lasso"||B==="select")?y.plot=!0:I?Sl.update(y,I):y.calc=!0,q.set(D))}}for(f in u){var Y=Oh.applyContainerArrayChanges(e,i(t,f),u[f],y,i);Y||(y.plot=!0)}for(var re in b){A=Na.getFromId(e,re);var U=A&&A._constraintGroup;if(U){y.calc=!0;for(var de in U)b[de]||(Na.getFromId(e,de)._constraintShrinkable=!0)}}(tC(e)||r.height||r.width)&&(y.plot=!0);var be=a.shapes;for(v=0;v1;)if(a.pop(),t=lt(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function wK(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var v=0;return function(){if(u&&++v===f)return u()}}return new Promise(function(u,f){function v(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var N=a._frameQueue.pop();N.onInterrupt&&N.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(N){if(N.length!==0){for(var H=0;Ha._timeToNext&&m()};N()}var y=0;function w(N){return Array.isArray(n)?y>=n.length?N.transitionOpts=n[y]:N.transitionOpts=n[0]:N.transitionOpts=n,y++,N}var _,T,b=[],A=r==null,S=Array.isArray(r),k=!A&&!S&&$e.isPlainObject(r);if(k)b.push({type:"object",data:w($e.extendFlat({},r))});else if(A||["string","number"].indexOf(typeof r)!==-1)for(_=0;_0&&RR)&&z.push(T);b=z}}b.length>0?h(b):(e.emit("plotly_animated"),u())})}function LK(e,r,t){if(e=$e.getGraphDiv(e),r==null)return Promise.resolve();if(!$e.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 a,n,i,l,o=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=o.length+r.length*2,f=[],v={};for(a=r.length-1;a>=0;a--)if($e.isPlainObject(r[a])){var h=r[a].name,d=(s[h]||v[h]||{}).name,m=r[a].name,g=s[d]||v[d];d&&m&&typeof m=="number"&&g&&Tgq.index?-1:k.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&$e.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),l.unshift({type:"insert",index:a,value:n[a]});var o=xr.modifyFrames,s=xr.modifyFrames,u=[e,l],f=[e,i];return Ua&&Ua.add(e,o,u,s,f),xr.modifyFrames(e,i)}function DK(e){e=$e.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return xr.cleanPlot([],{},t,r),xr.purge(e),Mg.purge(e),r._container&&r._container.remove(),delete e._context,e}function EK(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!$e.equalDomRects(t,r._lastBBox)){var a=r._invTransform=$e.inverseTransformMatrix($e.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function PK(e){var r=Yh.select(e),t=e._fullLayout;if(t._calcInverseTransform=EK,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};Yh.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=$e.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(sK.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Gr.animate=SK;Gr.addFrames=LK;Gr.deleteFrames=qK;Gr.addTraces=Xk;Gr.deleteTraces=Jk;Gr.extendTraces=Wk;Gr.moveTraces=Ag;Gr.prependTraces=Zk;Gr.newPlot=pK;Gr._doPlot=cK;Gr.purge=DK;Gr.react=AK;Gr.redraw=dK;Gr.relayout=Xf;Gr.restyle=Vh;Gr.setPlotConfig=vK;Gr.update=Zh;Gr._guiRelayout=Cg(Xf);Gr._guiRestyle=Cg(Vh);Gr._guiUpdate=Cg(Zh);Gr._storeDirectGUIEdit=bK});var Do=Z(Li=>{"use strict";var RK=gr();Li.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Li.getRedrawFunc=function(e){return function(){RK.getComponentMethod("colorbar","draw")(e)}};Li.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Li.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var aC=window.URL||window.webkitURL;Li.createObjectURL=function(e){return aC.createObjectURL(e)};Li.revokeObjectURL=function(e){return aC.revokeObjectURL(e)};Li.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=zK(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Li.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function zK(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var qg=Ir(),Lue=He(),NK=tt(),FK=Er(),que=fo(),Lg=/"/g,Kf="TOBESTRIPPED",IK=new RegExp('("'+Kf+")|("+Kf+'")',"g");function HK(e){var r=qg.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function OK(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}nC.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,l=n._toppaper,o=n.width,s=n.height,u;i.insert("rect",":first-child").call(NK.setRect,0,0,o,s).call(FK.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var BK=He(),YK=Yv().EventEmitter,Qf=Do();function UK(e){var r=e.emitter||new YK,t=new Promise(function(a,n){var i=window.Image,l=e.svg,o=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,v=e.height||150,h=u*f,d=u*v,m=s.getContext("2d",{willReadFrequently:!0}),g=new i,y,w;o==="svg"||BK.isSafari()?w=Qf.encodeSVG(l):(y=Qf.createBlob(l,"svg"),w=Qf.createObjectURL(y)),s.width=h,s.height=d,g.onload=function(){var _;switch(y=null,Qf.revokeObjectURL(w),o!=="svg"&&m.drawImage(g,0,0,h,d),o){case"jpeg":_=s.toDataURL("image/jpeg");break;case"png":_=s.toDataURL("image/png");break;case"webp":_=s.toDataURL("image/webp");break;case"svg":_=w;break;default:var T="Image format is not jpeg, png, svg or webp.";if(n(new Error(T)),!e.promise)return r.emit("error",T)}a(_),e.promise||r.emit("success",_)},g.onerror=function(_){if(y=null,Qf.revokeObjectURL(w),n(_),!e.promise)return r.emit("error",_)},g.src=w});return e.promise?t:r}iC.exports=UK});var Eg=Z((Pue,sC)=>{"use strict";var lC=Hr(),oC=Sg(),GK=Pt(),qi=He(),$f=Do(),VK=Qh(),WK=$h(),ZK=tv().version,Dg={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 XK(e,r){r=r||{};var t,a,n,i;qi.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=qi.getGraphDiv(e),t=qi.extendDeep([],e.data),a=qi.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function l(S){return!(S in r)||qi.validate(r[S],Dg[S])}if(!l("width")&&r.width!==null||!l("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!l("format"))throw new Error("Export format is not "+qi.join2(Dg.format.values,", "," or ")+".");var o={};function s(S,k){return qi.coerce(r,o,Dg,S,k)}var u=s("format"),f=s("width"),v=s("height"),h=s("scale"),d=s("setBackground"),m=s("imageDataOnly"),g=document.createElement("div");g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);var y=qi.extendFlat({},a);f?y.width=f:r.width===null&&lC(i.width)&&(y.width=i.width),v?y.height=v:r.height===null&&lC(i.height)&&(y.height=i.height);var w=qi.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),_=$f.getRedrawFunc(g);function T(){return new Promise(function(S){setTimeout(S,$f.getDelay(g._fullLayout))})}function b(){return new Promise(function(S,k){var q=VK(g,u,h),D=g._fullLayout.width,R=g._fullLayout.height;function z(){oC.purge(g),document.body.removeChild(g)}if(u==="full-json"){var N=GK.graphJson(g,!1,"keepdata","object",!0,!0);return N.version=ZK,N=JSON.stringify(N),z(),S(m?N:$f.encodeJSON(N))}if(z(),u==="svg")return S(m?q:$f.encodeSVG(q));var H=document.createElement("canvas");H.id=qi.randstr(),WK({format:u,width:D,height:R,scale:h,canvas:H,svg:q,promise:!0}).then(S).catch(k)})}function A(S){return m?S.replace($f.IMAGE_URL_PREFIX,""):S}return new Promise(function(S,k){oC.newPlot(g,t,y,w).then(_).then(T).then(b).then(function(q){S(A(q))}).catch(function(q){k(q)})})}sC.exports=XK});var vC=Z((Rue,cC)=>{"use strict";var Pn=He(),JK=Pt(),KK=As(),QK=eo().dfltConfig,ti=Pn.isPlainObject,Po=Array.isArray,uC=Pn.isArrayOrTypedArray;cC.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=KK.get(),n=[],i={_context:Pn.extendFlat({},QK)},l,o;Po(r)?(i.data=Pn.extendDeep([],r),l=r):(i.data=[],l=[],n.push(jt("array","data"))),ti(t)?(i.layout=Pn.extendDeep({},t),o=t):(i.layout={},o={},arguments.length>1&&n.push(jt("object","layout"))),JK.supplyDefaults(i);for(var s=i._fullData,u=l.length,f=0;fv.length&&a.push(jt("unused",n,u.concat(v.length)));var w=v.length,_=Array.isArray(y);_&&(w=Math.min(w,y.length));var T,b,A,S,k;if(h.dimensions===2)for(b=0;bv[b].length&&a.push(jt("unused",n,u.concat(b,v[b].length)));var q=v[b].length;for(T=0;T<(_?Math.min(q,y[b].length):q);T++)A=_?y[b][T]:y,S=f[b][T],k=v[b][T],Pn.validate(S,A)?k!==S&&k!==+S&&a.push(jt("dynamic",n,u.concat(b,T),S,k)):a.push(jt("value",n,u.concat(b,T),S))}else a.push(jt("array",n,u.concat(b),f[b]));else for(b=0;b{"use strict";var nQ=He(),ed=Do();function iQ(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(l,o){var s,u;if(n)return s=ed.createBlob(e,t),u=ed.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),ed.revokeObjectURL(u),s=null,l(r);if(nQ.isSafari()){var f=t==="svg"?",":";base64,";return ed.octetStream(f+encodeURIComponent(e)),l(r)}o(new Error("download error"))});return i}hC.exports=iQ});var Pg=Z((Fue,mC)=>{"use strict";var pC=He(),lQ=Eg(),oQ=dC(),Nue=Do();function sQ(e,r){var t;return pC.isPlainObject(e)||(t=pC.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=lQ(e,r),l=r.filename||e.fn||"newplot";l+="."+r.format.replace("-","."),i.then(function(o){return t&&(t._snapshotInProgress=!1),oQ(o,l,r.format)}).then(function(o){a(o)}).catch(function(o){t&&(t._snapshotInProgress=!1),n(o)})})}mC.exports=sQ});var _C=Z(Rg=>{"use strict";var rn=He(),tn=rn.isPlainObject,yC=As(),gC=Pt(),uQ=Gn(),bC=ct(),xC=eo().dfltConfig;Rg.makeTemplate=function(e){e=rn.isPlainObject(e)?e:rn.getGraphDiv(e),e=rn.extendDeep({_context:xC},{data:e.data,layout:e.layout}),gC.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var m={};jf(d,m,cQ.bind(null,d));var g=rn.coerce(d,{},uQ,"type"),y=a.data[g];y||(y=a.data[g]=[]),y.push(m)}),jf(t,a.layout,fQ.bind(null,t)),delete a.layout.template;var n=t.template;if(tn(n)){var i=n.layout,l,o,s,u,f,v;tn(i)&&rd(i,a.layout);var h=n.data;if(tn(h)){for(o in a.data)if(s=h[o],Array.isArray(s)){for(f=a.data[o],v=f.length,u=s.length,l=0;lw?l.push({code:"unused",traceType:d,templateCount:y,dataCount:w}):w>y&&l.push({code:"reused",traceType:d,templateCount:y,dataCount:w})}}function _(T,b){for(var A in T)if(A.charAt(0)!=="_"){var S=T[A],k=Rn(T,A,b);tn(S)?(Array.isArray(T)&&S._template===!1&&S.templateitemname&&l.push({code:"missing",path:k,templateitemname:S.templateitemname}),_(S,k)):Array.isArray(S)&&vQ(S)&&_(S,k)}}if(_({data:s,layout:o},""),l.length)return l.map(hQ)};function vQ(e){for(var r=0;r{"use strict";var Vt=Sg();pt._doPlot=Vt._doPlot;pt.newPlot=Vt.newPlot;pt.restyle=Vt.restyle;pt.relayout=Vt.relayout;pt.redraw=Vt.redraw;pt.update=Vt.update;pt._guiRestyle=Vt._guiRestyle;pt._guiRelayout=Vt._guiRelayout;pt._guiUpdate=Vt._guiUpdate;pt._storeDirectGUIEdit=Vt._storeDirectGUIEdit;pt.react=Vt.react;pt.extendTraces=Vt.extendTraces;pt.prependTraces=Vt.prependTraces;pt.addTraces=Vt.addTraces;pt.deleteTraces=Vt.deleteTraces;pt.moveTraces=Vt.moveTraces;pt.purge=Vt.purge;pt.addFrames=Vt.addFrames;pt.deleteFrames=Vt.deleteFrames;pt.animate=Vt.animate;pt.setPlotConfig=Vt.setPlotConfig;var dQ=Gu().getGraphDiv,pQ=hh().eraseActiveShape;pt.deleteActiveShape=function(e){return pQ(dQ(e))};pt.toImage=Eg();pt.validate=vC();pt.downloadImage=Pg();var wC=_C();pt.makeTemplate=wC.makeTemplate;pt.validateTemplate=wC.validateTemplate});var Ng=Z((Oue,MC)=>{"use strict";var zg=He(),mQ=gr();MC.exports=function(r,t,a,n){var i=n("x"),l=n("y"),o,s=mQ.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=zg.minRowLength(i);l?o=Math.min(u,zg.minRowLength(l)):(o=u,n("y0"),n("dy"))}else{if(!l)return 0;o=zg.minRowLength(l),n("x0"),n("dx")}return t._length=o,o}});var Fg=Z((Bue,CC)=>{"use strict";var AC=He().dateTick0,yQ=Bt(),gQ=yQ.ONEWEEK;function kC(e,r){return e%gQ===0?AC(r,1):AC(r,0)}CC.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var l=n("xperiod");l&&(n("xperiod0",kC(l,t.xcalendar)),n("xperiodalignment"))}if(i.y){var o=n("yperiod");o&&(n("yperiod0",kC(o,t.ycalendar)),n("yperiodalignment"))}}});var qC=Z((Yue,LC)=>{"use strict";var SC=["orientation","groupnorm","stackgaps"];LC.exports=function(r,t,a,n){var i=a._scatterStackOpts,l=n("stackgroup");if(l){var o=t.xaxis+t.yaxis,s=i[o];s||(s=i[o]={});var u=s[l],f=!1;u?u.traces.push(t):(u=s[l]={traceIndices:[],traces:[t]},f=!0);for(var v={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var DC=Er(),EC=Tn().hasColorscale,PC=Ls(),bQ=on();RC.exports=function(r,t,a,n,i,l){var o=bQ.isBubble(r),s=(r.line||{}).color,u;if(l=l||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",o?.7:1),i("marker.size"),l.noAngle||(i("marker.angle"),l.noAngleRef||i("marker.angleref"),l.noStandOff||i("marker.standoff")),i("marker.color",a),EC(r,"marker")&&PC(r,t,n,i,{prefix:"marker.",cLetter:"c"}),l.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),l.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:o?u=DC.background:u=DC.defaultLine,i("marker.line.color",u),EC(r,"marker.line")&&PC(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",o?1:0)),o&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),l.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var FC=Z((Gue,NC)=>{"use strict";var xQ=He().isArrayOrTypedArray,_Q=Tn().hasColorscale,wQ=Ls();NC.exports=function(r,t,a,n,i,l){l||(l={});var o=(r.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),i("line.color",a),_Q(r,"line"))wQ(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(xQ(o)?!1:o)||a;i("line.color",s)}i("line.width"),l.noDash||i("line.dash"),l.backoff&&i("line.backoff")}});var HC=Z((Vue,IC)=>{"use strict";IC.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var BC=Z((Wue,OC)=>{"use strict";var TQ=He();OC.exports=function(e,r,t,a,n){n=n||{},a("textposition"),TQ.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var GC=Z((Zue,UC)=>{"use strict";var ad=Er(),YC=He().isArrayOrTypedArray;function MQ(e){for(var r=ad.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var VC=He(),AQ=gr(),kQ=qo(),CQ=qh(),tu=on(),SQ=Ng(),LQ=Fg(),qQ=qC(),DQ=zC(),EQ=FC(),WC=HC(),PQ=BC(),RQ=GC(),zQ=He().coercePattern;ZC.exports=function(r,t,a,n){function i(d,m){return VC.coerce(r,t,kQ,d,m)}var l=SQ(r,t,n,i);if(l||(t.visible=!1),!!t.visible){LQ(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var o=qQ(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!o&&l{"use strict";var NQ=Af().getAxisGroup;JC.exports=function(r,t,a,n,i){var l=t.orientation,o=t[{v:"x",h:"y"}[l]+"axis"],s=NQ(a,o)+l,u=a._alignmentOpts||{},f=n("alignmentgroup"),v=u[s];v||(v=u[s]={});var h=v[f];h?h.traces.push(t):h=v[f]={traces:[t],alignmentIndex:Object.keys(v).length,offsetGroups:{}};var d=n("offsetgroup")||"",m=h.offsetGroups,g=m[d];t._offsetIndex=0,(i!=="group"||d)&&(g||(g=m[d]={offsetIndex:Object.keys(m).length}),t._offsetIndex=g.offsetIndex)}});var QC=Z((Kue,KC)=>{"use strict";var FQ=He(),IQ=Ig(),HQ=qo();KC.exports=function(r,t){var a,n,i,l=t.scattermode;function o(h){return FQ.coerce(n._input,n,HQ,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var v=r[f];if(v.type==="scatter"&&v.xaxis===s.xaxis&&v.yaxis===s.yaxis){v.opacity=void 0;break}}}}}});var jC=Z((Que,$C)=>{"use strict";var OQ=He(),BQ=Zv();$C.exports=function(e,r){function t(n,i){return OQ.coerce(e,r,BQ,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var Hg=Z(($ue,rS)=>{"use strict";var YQ=Hr(),eS=He(),UQ=eS.dateTime2ms,nd=eS.incrementMonth,GQ=Bt(),VQ=GQ.ONEAVGMONTH;rS.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var l=r[a+"period"],o;if(YQ(l)){if(l=+l,l<=0)return{vals:n}}else if(typeof l=="string"&&l.charAt(0)==="M"){var s=+l.substring(1);if(s>0&&Math.round(s)===s)o=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",v=i==="end",h=r[a+"period0"],d=UQ(h,u)||0,m=[],g=[],y=[],w=n.length,_=0;_T;)S=nd(S,-o,u);for(;S<=T;)S=nd(S,o,u);A=nd(S,-o,u)}else{for(b=Math.round((T-d)/l),S=d+b*l;S>T;)S-=l;for(;S<=T;)S+=l;A=S-l}m[_]=f?A:v?S:(A+S)/2,g[_]=A,y[_]=S}return{vals:m,starts:g,ends:y}}});var nS=Z((jue,aS)=>{"use strict";var Og=Tn().hasColorscale,Bg=i0(),tS=on();aS.exports=function(r,t){tS.hasLines(t)&&Og(t,"line")&&Bg(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),tS.hasMarkers(t)&&(Og(t,"marker")&&Bg(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Og(t,"marker.line")&&Bg(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Yg=Z((efe,iS)=>{"use strict";var At=He();iS.exports=function(r,t){for(var a=0;a{"use strict";var lS=He();oS.exports=function(r,t){lS.isArrayOrTypedArray(t.selectedpoints)&&lS.tagSelected(r,t)}});var Xg=Z((tfe,dS)=>{"use strict";var sS=Hr(),Vg=He(),ec=dt(),uS=Hg(),Gg=Bt().BADNUM,Wg=on(),WQ=nS(),ZQ=Yg(),XQ=Ug();function JQ(e,r){var t=e._fullLayout,a=r._xA=ec.getFromId(e,r.xaxis||"x","x"),n=r._yA=ec.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),l=n.makeCalcdata(r,"y"),o=uS(r,a,"x",i),s=uS(r,n,"y",l),u=o.vals,f=s.vals,v=r._length,h=new Array(v),d=r.ids,m=Zg(r,t,a,n),g=!1,y,w,_,T,b,A;vS(t,r);var S="x",k="y",q;if(m)Vg.pushUnique(m.traceIndices,r.index),y=m.orientation==="v",y?(k="s",q="x"):(S="s",q="y"),b=m.stackgaps==="interpolate";else{var D=cS(r,v);fS(e,r,a,n,u,f,D)}var R=!!r.xperiodalignment,z=!!r.yperiodalignment;for(w=0;ww&&h[T].gap;)T--;for(A=h[T].s,_=h.length-1;_>T;_--)h[_].s=A;for(;w{"use strict";pS.exports=id;var KQ=He().distinctVals;function id(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var zn=Hr(),Ll=He().isArrayOrTypedArray,au=Bt().BADNUM,QQ=gr(),rc=dt(),$Q=Af().getAxisGroup,ld=mS();function jQ(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;us+l||!zn(o))}for(var f=0;f{"use strict";var _S=Xg(),wS=jg().setGroupPositions;function c$(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;uD[f]&&f{"use strict";var h$=tt(),SS=Bt(),tc=SS.BADNUM,LS=SS.LOG_CLIP,AS=LS+.5,kS=LS-.5,od=He(),d$=od.segmentsIntersect,CS=od.constrain,r2=qh();qS.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,l=n.type==="log",o=i.type==="log",s=n._length,u=i._length,f=t.backoff,v=a.marker,h=t.connectGaps,d=t.baseTolerance,m=t.shape,g=m==="linear",y=a.fill&&a.fill!=="none",w=[],_=r2.minTolerance,T=r.length,b=new Array(T),A=0,S,k,q,D,R,z,N,H,O,J,X,B,I,V,K,Q;function ie(ze){var ae=r[ze];if(!ae)return!1;var oe=t.linearized?n.l2p(ae.x):n.c2p(ae.x),qe=t.linearized?i.l2p(ae.y):i.c2p(ae.y);if(oe===tc){if(l&&(oe=n.c2p(ae.x,!0)),oe===tc)return!1;o&&qe===tc&&(oe*=Math.abs(n._m*u*(n._m>0?AS:kS)/(i._m*s*(i._m>0?AS:kS)))),oe*=1e3}if(qe===tc){if(o&&(qe=i.c2p(ae.y,!0)),qe===tc)return!1;qe*=1e3}return[oe,qe]}function me(ze,ae,oe,qe){var ke=oe-ze,ir=qe-ae,vr=.5-ze,sr=.5-ae,Mr=ke*ke+ir*ir,Ur=ke*vr+ir*sr;if(Ur>0&&Ur1||Math.abs(vr.y-oe[0][1])>1)&&(vr=[vr.x,vr.y],qe&&_e(vr,ze)<_e(oe[0],ze)?oe.unshift(vr):oe.push(vr),qe++)}return oe}function Ie(ze){if(ze[0]ve||ze[1]Y)return[CS(ze[0],Se,ve),CS(ze[1],Ae,Y)]}function Be(ze,ae){if(ze[0]===ae[0]&&(ze[0]===Se||ze[0]===ve)||ze[1]===ae[1]&&(ze[1]===Ae||ze[1]===Y))return!0}function Ne(ze,ae){var oe=[],qe=Ie(ze),ke=Ie(ae);return qe&&ke&&Be(qe,ke)||(qe&&oe.push(qe),ke&&oe.push(ke)),oe}function Ee(ze,ae,oe){return function(qe,ke){var ir=Ie(qe),vr=Ie(ke),sr=[];if(ir&&vr&&Be(ir,vr))return sr;ir&&sr.push(ir),vr&&sr.push(vr);var Mr=2*od.constrain((qe[ze]+ke[ze])/2,ae,oe)-((ir||qe)[ze]+(vr||ke)[ze]);if(Mr){var Ur;ir&&vr?Ur=Mr>0==ir[ze]>vr[ze]?ir:vr:Ur=ir||vr,Ur[ze]+=Mr}return sr}}var Je;m==="linear"||m==="spline"?Je=Pe:m==="hv"||m==="vh"?Je=Ne:m==="hvh"?Je=Ee(0,Se,ve):m==="vhv"&&(Je=Ee(1,Ae,Y));function We(ze,ae){var oe=ae[0]-ze[0],qe=(ae[1]-ze[1])/oe,ke=(ze[1]*ae[0]-ae[1]*ze[0])/oe;return ke>0?[qe>0?Se:ve,Y]:[qe>0?ve:Se,Ae]}function ne(ze){var ae=ze[0],oe=ze[1],qe=ae===b[A-1][0],ke=oe===b[A-1][1];if(!(qe&&ke))if(A>1){var ir=ae===b[A-2][0],vr=oe===b[A-2][1];qe&&(ae===Se||ae===ve)&&ir?vr?A--:b[A-1]=ze:ke&&(oe===Ae||oe===Y)&&vr?ir?A--:b[A-1]=ze:b[A++]=ze}else b[A++]=ze}function Me(ze){b[A-1][0]!==ze[0]&&b[A-1][1]!==ze[1]&&ne([be,ye]),ne(ze),Fe=null,be=ye=0}var Ce=od.isArrayOrTypedArray(v);function cr(ze){if(ze&&f&&(ze.i=S,ze.d=r,ze.trace=a,ze.marker=Ce?v[ze.i]:v,ze.backoff=f),pe=ze[0]/s,ge=ze[1]/u,U=ze[0]ve?ve:0,de=ze[1]Y?Y:0,U||de){if(!A)b[A++]=[U||ze[0],de||ze[1]];else if(Fe){var ae=Je(Fe,ze);ae.length>1&&(Me(ae[0]),b[A++]=ae[1])}else Re=Je(b[A-1],ze)[0],b[A++]=Re;var oe=b[A-1];U&&de&&(oe[0]!==U||oe[1]!==de)?(Fe&&(be!==U&&ye!==de?ne(be&&ye?We(Fe,ze):[be||U,ye||de]):be&&ye&&ne([be,ye])),ne([U,de])):be-U&&ye-de&&ne([U||be,de||ye]),Fe=ze,be=U,ye=de}else Fe&&Me(Je(Fe,ze)[0]),b[A++]=ze}for(S=0;Sj(z,tr))break;q=z,I=O[0]*H[0]+O[1]*H[1],I>X?(X=I,D=z,N=!1):I=r.length||!z)break;cr(z),k=z}}Fe&&ne([be||Fe[0],ye||Fe[1]]),w.push(b.slice(0,A))}var De=m.slice(m.length-1);if(f&&De!=="h"&&De!=="v"){for(var Le=!1,Ye=-1,Ze=[],Ue=0;Ue{"use strict";var ES={tonextx:1,tonexty:1,tonext:1};PS.exports=function(r,t,a){var n,i,l,o,s,u={},f=!1,v=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var ai=Ir(),p$=gr(),ac=He(),iu=ac.ensureSingle,NS=ac.identity,kt=tt(),lu=on(),m$=DS(),y$=RS(),sd=$y().tester;FS.exports=function(r,t,a,n,i,l){var o,s,u=!i,f=!!i&&i.duration>0,v=y$(r,t,a);if(o=n.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),o.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),o.order(),g$(r,o,t),f){l&&(s=l());var h=ai.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){n.selectAll("g.trace").each(function(d,m){zS(r,m,t,d,v,this,i)})})}else o.each(function(d,m){zS(r,m,t,d,v,this,i)});u&&o.exit().remove(),n.selectAll("path:not([d])").remove()};function g$(e,r,t){r.each(function(a){var n=iu(ai.select(this),"g","fills");kt.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,l=[];i._ownfill&&l.push("_ownFill"),i._nexttrace&&l.push("_nextFill");var o=n.selectAll("g").data(l,NS);o.enter().append("g"),o.exit().each(function(s){i[s]=null}).remove(),o.order().each(function(s){i[s]=iu(ai.select(this),"path","js-fill")})})}function zS(e,r,t,a,n,i,l){var o=e._context.staticPlot,s;b$(e,r,t,a,n);var u=!!l&&l.duration>0;function f(Ee){return u?Ee.transition():Ee}var v=t.xaxis,h=t.yaxis,d=a[0].trace,m=d.line,g=ai.select(i),y=iu(g,"g","errorbars"),w=iu(g,"g","lines"),_=iu(g,"g","points"),T=iu(g,"g","text");if(p$.getComponentMethod("errorbars","plot")(e,y,t,l),d.visible!==!0)return;f(g).style("opacity",d.opacity);var b,A,S=d.fill.charAt(d.fill.length-1);S!=="x"&&S!=="y"&&(S="");var k,q;S==="y"?(k=1,q=h.c2p(0,!0)):S==="x"&&(k=0,q=v.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=g;var D="",R=[],z=d._prevtrace,N=null,H=null;z&&(D=z._prevRevpath||"",A=z._nextFill,R=z._ownPolygons,N=z._fillsegments,H=z._fillElement);var O,J,X="",B="",I,V,K,Q,ie,me,pe=[];d._polygons=[];var ge=[],j=[],_e=ac.noop;if(b=d._ownFill,lu.hasLines(d)||d.fill!=="none"){A&&A.datum(a),["hv","vh","hvh","vhv"].indexOf(m.shape)!==-1?(I=kt.steps(m.shape),V=kt.steps(m.shape.split("").reverse().join(""))):m.shape==="spline"?I=V=function(Ee){var Je=Ee[Ee.length-1];return Ee.length>1&&Ee[0][0]===Je[0]&&Ee[0][1]===Je[1]?kt.smoothclosed(Ee.slice(1),m.smoothing):kt.smoothopen(Ee,m.smoothing)}:I=V=function(Ee){return"M"+Ee.join("L")},K=function(Ee){return V(Ee.reverse())},j=m$(a,{xaxis:v,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(m.width||1,3)/4,shape:m.shape,backoff:m.backoff,simplify:m.simplify,fill:d.fill}),ge=new Array(j.length);var se=0;for(s=0;s=o[0]&&g.x<=o[1]&&g.y>=s[0]&&g.y<=s[1]}),h=Math.ceil(v.length/f),d=0;n.forEach(function(g,y){var w=g[0].trace;lu.hasMarkers(w)&&w.marker.maxdisplayed>0&&y{"use strict";HS.exports={container:"marker",min:"cmin",max:"cmax"}});var BS=Z((ffe,OS)=>{"use strict";var ud=dt();OS.exports=function(r,t,a){var n={},i={_fullLayout:a},l=ud.getFromTrace(i,t,"x"),o=ud.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=ud.tickText(l,l.c2l(s),!0).text,n.yLabel=ud.tickText(o,o.c2l(u),!0).text,n}});var l2=Z((cfe,YS)=>{"use strict";var a2=Ir(),ou=tt(),x$=gr();function _$(e){var r=a2.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=a2.select(this),n=t.trace||t[0].trace;n2(a,n,e)}),r.selectAll("g.text").each(function(t){var a=a2.select(this),n=t.trace||t[0].trace;i2(a,n,e)}),r.selectAll("g.trace path.js-line").call(ou.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(ou.fillGroupStyle,e,!1),x$.getComponentMethod("errorbars","style")(r)}function n2(e,r,t){ou.pointStyle(e.selectAll("path.point"),r,t)}function i2(e,r,t){ou.textPointStyle(e.selectAll("text"),r,t)}function w$(e,r,t){var a=r[0].trace;a.selectedpoints?(ou.selectedPointStyle(t.selectAll("path.point"),a),ou.selectedTextStyle(t.selectAll("text"),a)):(n2(t,a,e),i2(t,a,e))}YS.exports={style:_$,stylePoints:n2,styleText:i2,styleOnSelect:w$}});var GS=Z((vfe,US)=>{"use strict";var su=Er(),T$=on();US.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&su.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,l=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&su.opacity(i)?i:l&&su.opacity(l)&&(t.mlw||((r.marker||{}).line||{}).width)?l:"",n?su.opacity(n)<.3?su.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&su.opacity(a)&&T$.hasLines(r)&&r.line.width?a:r.fillcolor)}});var ZS=Z((hfe,WS)=>{"use strict";var fd=He(),VS=ki(),M$=gr(),A$=GS(),o2=Er(),k$=fd.fillText;WS.exports=function(r,t,a,n){var i=r.cd,l=i[0].trace,o=r.xa,s=r.ya,u=o.c2p(t),f=s.c2p(a),v=[u,f],h=l.hoveron||"",d=l.mode.indexOf("markers")!==-1?3:.5,m=!!l.xperiodalignment,g=!!l.yperiodalignment;if(h.indexOf("points")!==-1){var y=function(B){if(m){var I=o.c2p(B.xStart),V=o.c2p(B.xEnd);return u>=Math.min(I,V)&&u<=Math.max(I,V)?0:1/0}var K=Math.max(3,B.mrc||0),Q=1-1/K,ie=Math.abs(o.c2p(B.x)-u);return ie=Math.min(I,V)&&f<=Math.max(I,V)?0:1/0}var K=Math.max(3,B.mrc||0),Q=1-1/K,ie=Math.abs(s.c2p(B.y)-f);return iepe!=Y>=pe&&(Se=_e[j-1][0],ve=_e[j][0],Y-Ae&&(se=Se+(ve-Se)*(pe-Ae)/(Y-Ae),K=Math.min(K,se),Q=Math.max(Q,se)));return K=Math.max(K,0),Q=Math.min(Q,o._length),{x0:K,x1:Q,y0:pe,y1:pe}}if(h.indexOf("fills")!==-1&&l._fillElement){var O=N(l._fillElement)&&!N(l._fillExclusionElement);if(O){var J=H(l._polygons);J===null&&(J={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var X=o2.defaultLine;return o2.opacity(l.fillcolor)?X=l.fillcolor:o2.opacity((l.line||{}).color)&&(X=l.line.color),fd.extendFlat(r,{distance:r.maxHoverDistance,x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1,color:X,hovertemplate:!1}),delete r.index,l.text&&!fd.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}});var KS=Z((dfe,JS)=>{"use strict";var XS=on();JS.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=[],o=a[0].trace,s,u,f,v,h=!XS.hasMarkers(o)&&!XS.hasText(o);if(h)return[];if(t===!1)for(s=0;s{"use strict";QS.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var tL=Z((mfe,rL)=>{"use strict";var nc=gr().traceIs,s2=Sm();rL.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(C$(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function C$(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=S$(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var l=a+"calendar",o=i[l],s={noMultiCategory:!nc(i,"cartesian")||nc(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,eL(i,a)){var u=jS(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(eL(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function jS(e){return{v:"x",h:"y"}[e.orientation||"v"]}function eL(e,r){var t=jS(e),a=nc(e,"box-violin"),n=nc(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var nL=Z((yfe,aL)=>{"use strict";var L$=nn().isTypedArraySpec;function q$(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,l;if(r.axData)n=r.axData;else for(n=[],i=0;i0||L$(i),o;l&&(o="array");var s=a("categoryorder",o),u;s==="array"&&(u=a("categoryarray")),!l&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=q$(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var oL=Z((gfe,lL)=>{"use strict";var iL=bn().mix,D$=hi(),E$=He();lL.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function l(k,q){return E$.coerce2(r,t,n.attributes,k,q)}var o=l("linecolor",i),s=l("linewidth"),u=a("showline",n.showLine||!!o||!!s);u||(delete t.linecolor,delete t.linewidth);var f=iL(i,n.bgColor,n.blend||D$.lightFraction).toRgbString(),v=l("gridcolor",f),h=l("gridwidth"),d=l("griddash"),m=a("showgrid",n.showGrid||!!v||!!h||!!d);if(m||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var g=iL(t.gridcolor,n.bgColor,67).toRgbString(),y=l("minor.gridcolor",g),w=l("minor.gridwidth",t.gridwidth||1),_=l("minor.griddash",t.griddash||"solid"),T=a("minor.showgrid",!!y||!!w||!!_);T||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var b=l("zerolinecolor",i),A=l("zerolinewidth"),S=a("zeroline",n.showGrid||!!b||!!A);S||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var f2=Z((bfe,hL)=>{"use strict";var sL=Hr(),P$=gr(),ic=He(),R$=ct(),z$=Jn(),u2=Xn(),uL=Qp(),fL=jp(),N$=tm(),F$=am(),I$=nL(),H$=oL(),O$=Xm(),cL=b0(),cd=da().WEEKDAY_PATTERN,B$=da().HOUR_PATTERN;hL.exports=function(r,t,a,n,i){var l=n.letter,o=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},v=t.type||f.type||"-",h;if(v==="date"){var d=P$.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(h=a("ticklabelmode"))}!n.noTicklabelindex&&(v==="date"||v==="linear")&&a("ticklabelindex");var m="";(!n.noTicklabelposition||v==="multicategory")&&(m=ic.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:l==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",m.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),cL(t,i),O$(r,t,a,n),I$(r,t,a,n),v!=="category"&&!n.noHover&&a("hoverformat");var g=a("color"),y=g!==u2.color.dflt?g:o.color,w=s.label||i._dfltTitle[l];if(F$(r,t,a,v,n),!u)return t;a("title.text",w),ic.coerceFont(a,"title.font",o,{overrideDflt:{size:ic.bigFont(o.size),color:y}}),uL(r,t,a,v);var _=n.hasMinor;if(_&&(R$.newContainer(t,"minor"),uL(r,t,a,v,{isMinor:!0})),N$(r,t,a,v,n),fL(r,t,a,n),_){var T=n.isMinor;n.isMinor=!0,fL(r,t,a,n),n.isMinor=T}H$(r,t,a,{dfltColor:g,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:_,attributes:u2}),_&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var b=v==="multicategory";if(!n.noTickson&&(v==="category"||b)&&(t.ticks||t.showgrid)){var A;b&&(A="boundaries");var S=a("tickson",A);S==="boundaries"&&delete t.ticklabelposition}if(b){var k=a("showdividers");k&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(z$(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Y$}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var q=0;q=2){var l="",o,s;if(i.length===2){for(o=0;o<2;o++)if(s=vL(i[o]),s){l=cd;break}}var u=a("pattern",l);if(u===cd)for(o=0;o<2;o++)s=vL(i[o]),s&&(r.bounds[o]=i[o]=s-1);if(u)for(o=0;o<2;o++)switch(s=i[o],u){case cd:if(!sL(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[o]=i[o]=s;break;case B$:if(!sL(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[o]=i[o]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var G$=Hr(),vd=He();dL.exports=function(r,t,a,n){var i=n.counterAxes||[],l=n.overlayableAxes||[],o=n.letter,s=n.grid,u=n.overlayingDomain,f,v,h,d,m,g;s&&(v=s._domains[o][s._axisMap[t._id]],f=s._anchors[t._id],v&&(h=s[o+"side"].split(" ")[0],d=s.domain[o][h==="right"||h==="top"?1:0])),v=v||[0,1],f=f||(G$(r.position)?"free":i[0]||"free"),h=h||(o==="x"?"bottom":"left"),d=d||0,m=0,g=!1;var y=vd.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),w=vd.coerce(r,t,{side:{valType:"enumerated",values:o==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(y==="free"){if(o==="y"){var _=a("autoshift");_&&(d=w==="left"?u[0]:u[1],g=t.automargin?t.automargin:!0,m=w==="left"?-3:3),a("shift",m)}a("position",d)}a("automargin",g);var T=!1;if(l.length&&(T=vd.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(l),dflt:!1}},"overlaying")),!T){var b=a("domain",v);b[0]>b[1]-1/4096&&(t.domain=v),vd.noneOrAll(r.domain,t.domain,v),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var TL=Z((_fe,wL)=>{"use strict";var Ro=He(),pL=Er(),V$=bi().isUnifiedHover,W$=_y(),mL=ct(),Z$=ds(),yL=Xn(),X$=tL(),gL=f2(),J$=Af(),bL=c2(),h2=Xt(),Di=h2.id2name,xL=h2.name2id,K$=da().AX_ID_PATTERN,_L=gr(),hd=_L.traceIs,v2=_L.getComponentMethod;function dd(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}wL.exports=function(r,t,a){var n=t.autotypenumbers,i={},l={},o={},s={},u={},f={},v={},h={},d={},m={},g,y;for(g=0;g{"use strict";var Q$=Ir(),ML=gr(),pd=He(),vn=tt(),md=dt();AL.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){md.redrawComponents(r);return}function l(y){var w=y.xaxis,_=y.yaxis;i._defs.select("#"+y.clipId+"> rect").call(vn.setTranslate,0,0).call(vn.setScale,1,1),y.plot.call(vn.setTranslate,w._offset,_._offset).call(vn.setScale,1,1);var T=y.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(vn.setPointGroupScale,1,1),T.selectAll(".textpoint").call(vn.setTextPointsScale,1,1),T.call(vn.hideOutsideRangePoints,y)}function o(y,w){var _=y.plotinfo,T=_.xaxis,b=_.yaxis,A=T._length,S=b._length,k=!!y.xr1,q=!!y.yr1,D=[];if(k){var R=pd.simpleMap(y.xr0,T.r2l),z=pd.simpleMap(y.xr1,T.r2l),N=R[1]-R[0],H=z[1]-z[0];D[0]=(R[0]*(1-w)+w*z[0]-R[0])/(R[1]-R[0])*A,D[2]=A*(1-w+w*H/N),T.range[0]=T.l2r(R[0]*(1-w)+w*z[0]),T.range[1]=T.l2r(R[1]*(1-w)+w*z[1])}else D[0]=0,D[2]=A;if(q){var O=pd.simpleMap(y.yr0,b.r2l),J=pd.simpleMap(y.yr1,b.r2l),X=O[1]-O[0],B=J[1]-J[0];D[1]=(O[1]*(1-w)+w*J[1]-O[1])/(O[0]-O[1])*S,D[3]=S*(1-w+w*B/X),b.range[0]=T.l2r(O[0]*(1-w)+w*J[0]),b.range[1]=b.l2r(O[1]*(1-w)+w*J[1])}else D[1]=0,D[3]=S;md.drawOne(r,T,{skipTitle:!0}),md.drawOne(r,b,{skipTitle:!0}),md.redrawComponents(r,[T._id,b._id]);var I=k?A/D[2]:1,V=q?S/D[3]:1,K=k?D[0]:0,Q=q?D[1]:0,ie=k?D[0]/D[2]*A:0,me=q?D[1]/D[3]*S:0,pe=T._offset-ie,ge=b._offset-me;_.clipRect.call(vn.setTranslate,K,Q).call(vn.setScale,1/I,1/V),_.plot.call(vn.setTranslate,pe,ge).call(vn.setScale,I,V),vn.setPointGroupScale(_.zoomScalePts,1/I,1/V),vn.setTextPointsScale(_.zoomScaleTxt,1/I,1/V)}var s;n&&(s=n());function u(){for(var y={},w=0;wa.duration?(u(),d=window.cancelAnimationFrame(g)):d=window.requestAnimationFrame(g)}return v=Date.now(),d=window.requestAnimationFrame(g),Promise.resolve()}});var bd=Z(Ta=>{"use strict";var gd=Ir(),CL=gr(),zo=He(),$$=Pt(),j$=tt(),SL=zp().getModuleCalcData,ql=Xt(),ni=da(),ej=fo(),Qr=zo.ensureSingle;function yd(e,r,t){return zo.ensureSingle(e,r,t,function(a){a.datum(t)})}var No=ni.zindexSeparator;Ta.name="cartesian";Ta.attr=["xaxis","yaxis"];Ta.idRoot=["x","y"];Ta.idRegex=ni.idRegex;Ta.attrRegex=ni.attrRegex;Ta.attributes=$S();Ta.layoutAttributes=Xn();Ta.supplyLayoutDefaults=TL();Ta.transitionAxes=kL();Ta.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,l=i,o={},s={},u,f,v;for(u=0;u0){var d=h.id;if(d.indexOf(No)!==-1)continue;d+=No+(u+1),h=zo.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var m=[],g,y=0;y1&&(A+=No+b),T.push(o+A),l=0;l1,v=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=Qr(a,"path","xlines-above"),r.ylines=Qr(a,"path","ylines-above"),r.xaxislayer=Qr(a,"g","xaxislayer-above"),r.yaxislayer=Qr(a,"g","yaxislayer-above");else{if(!l){var h=Qr(a,"g","layer-subplot");r.shapelayer=Qr(h,"g","shapelayer"),r.imagelayer=Qr(h,"g","imagelayer"),v&&f?(r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer):(r.minorGridlayer=Qr(a,"g","minor-gridlayer"),r.gridlayer=Qr(a,"g","gridlayer"),r.zerolinelayer=Qr(a,"g","zerolinelayer"));var d=Qr(a,"g","layer-between");r.shapelayerBetween=Qr(d,"g","shapelayer"),r.imagelayerBetween=Qr(d,"g","imagelayer"),Qr(a,"path","xlines-below"),Qr(a,"path","ylines-below"),r.overlinesBelow=Qr(a,"g","overlines-below"),Qr(a,"g","xaxislayer-below"),Qr(a,"g","yaxislayer-below"),r.overaxesBelow=Qr(a,"g","overaxes-below")}r.overplot=Qr(a,"g","overplot"),r.plot=Qr(r.overplot,"g",n),l||(r.xlines=Qr(a,"path","xlines-above"),r.ylines=Qr(a,"path","ylines-above"),r.overlinesAbove=Qr(a,"g","overlines-above"),Qr(a,"g","xaxislayer-above"),Qr(a,"g","yaxislayer-above"),r.overaxesAbove=Qr(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+o),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+o),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var m=v.plotgroup,g=n+"-x",y=n+"-y";r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer,Qr(v.overlinesBelow,"path",g),Qr(v.overlinesBelow,"path",y),Qr(v.overaxesBelow,"g",g),Qr(v.overaxesBelow,"g",y),r.plot=Qr(v.overplot,"g",n),Qr(v.overlinesAbove,"path",g),Qr(v.overlinesAbove,"path",y),Qr(v.overaxesAbove,"g",g),Qr(v.overaxesAbove,"g",y),r.xlines=m.select(".overlines-"+o).select("."+g),r.ylines=m.select(".overlines-"+s).select("."+y),r.xaxislayer=m.select(".overaxes-"+o).select("."+g),r.yaxislayer=m.select(".overaxes-"+s).select("."+y)}l||(u||(yd(r.minorGridlayer,"g",r.xaxis._id),yd(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(w){return w[0]}).sort(ql.idSort),yd(r.gridlayer,"g",r.xaxis._id),yd(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(w){return w[0]}).sort(ql.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function DL(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=gd.select(this);f.remove(),EL(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],l=0;l{"use strict";var xd=on();PL.exports={hasLines:xd.hasLines,hasMarkers:xd.hasMarkers,hasText:xd.hasText,isBubble:xd.isBubble,attributes:qo(),layoutAttributes:Zv(),supplyDefaults:XC(),crossTraceDefaults:QC(),supplyLayoutDefaults:jC(),calc:Xg().calc,crossTraceCalc:MS(),arraysToCalcdata:Yg(),plot:IS(),colorbar:t2(),formatLabels:BS(),style:l2().style,styleOnSelect:l2().styleOnSelect,hoverPoints:ZS(),selectPoints:KS(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:bd(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var FL=Z((Afe,NL)=>{"use strict";var tj=Ir(),aj=Er(),zL=fg(),d2=He(),nj=d2.strScale,ij=d2.strRotate,lj=d2.strTranslate;NL.exports=function(r,t,a){var n=r.node(),i=zL[a.arrowhead||0],l=zL[a.startarrowhead||0],o=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,v=i.backoff*o+a.standoff,h=l.backoff*s+a.startstandoff,d,m,g,y;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},m={x:+r.attr("x2"),y:+r.attr("y2")};var w=d.x-m.x,_=d.y-m.y;if(g=Math.atan2(_,w),y=g+Math.PI,v&&h&&v+h>Math.sqrt(w*w+_*_)){O();return}if(v){if(v*v>w*w+_*_){O();return}var T=v*Math.cos(g),b=v*Math.sin(g);m.x+=T,m.y+=b,r.attr({x2:m.x,y2:m.y})}if(h){if(h*h>w*w+_*_){O();return}var A=h*Math.cos(g),S=h*Math.sin(g);d.x-=A,d.y-=S,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var k=n.getTotalLength(),q="";if(k{"use strict";var IL=Ir(),p2=gr(),oj=Pt(),El=He(),m2=El.strTranslate,oc=dt(),Fo=Er(),Ji=tt(),HL=ki(),y2=xa(),g2=wl(),lc=Qn(),sj=ct().arrayEditor,uj=FL();YL.exports={draw:fj,drawOne:OL,drawRaw:BL};function fj(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?ke="right":ke="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ke]}for(var Ae=!1,Y=["x","y"],re=0;re1)&&(be===de?(tr=ye.r2fraction(r["a"+U]),(tr<0||tr>1)&&(Ae=!0)):Ae=!0),Je=ye._offset+ye.r2p(r[U]),Me=.5}else{var De=cr==="domain";U==="x"?(ne=r[U],Je=De?ye._offset+ye._length*ne:Je=o.l+o.w*ne):(ne=1-r[U],Je=De?ye._offset+ye._length*ne:Je=o.t+o.h*ne),Me=r.showarrow?.5:ne}if(r.showarrow){Ee.head=Je;var Le=r["a"+U];if(Ce=Re*ve(.5,r.xanchor)-Pe*ve(.5,r.yanchor),be===de){var Ye=oc.getRefType(be);Ye==="domain"?(U==="y"&&(Le=1-Le),Ee.tail=ye._offset+ye._length*Le):Ye==="paper"?U==="y"?(Le=1-Le,Ee.tail=o.t+o.h*Le):Ee.tail=o.l+o.w*Le:Ee.tail=ye._offset+ye.r2p(Le),We=Ce}else Ee.tail=Je+Le,We=Ce+Le;Ee.text=Ee.tail+Ce;var Ze=l[U==="x"?"width":"height"];if(de==="paper"&&(Ee.head=El.constrain(Ee.head,1,Ze-1)),be==="pixel"){var Ue=-Math.max(Ee.tail-3,Ee.text),Oe=Math.min(Ee.tail+3,Ee.text)-Ze;Ue>0?(Ee.tail+=Ue,Ee.text+=Ue):Oe>0&&(Ee.tail-=Oe,Ee.text-=Oe)}Ee.tail+=Ne,Ee.head+=Ne}else Ce=Ie*ve(Me,Be),We=Ce,Ee.text=Je+Ce;Ee.text+=Ne,Ce+=Ne,We+=Ne,r["_"+U+"padplus"]=Ie/2+We,r["_"+U+"padminus"]=Ie/2-We,r["_"+U+"size"]=Ie,r["_"+U+"shift"]=Ce}if(Ae){k.remove();return}var Ke=0,fr=0;if(r.align!=="left"&&(Ke=(j-pe)*(r.align==="center"?.5:1)),r.valign!=="top"&&(fr=(_e-ge)*(r.valign==="middle"?.5:1)),ie)Q.select("svg").attr({x:R+Ke-1,y:R+fr}).call(Ji.setClipUrl,N?g:null,e);else{var lr=R+fr-me.top,ze=R+Ke-me.left;X.call(y2.positionText,ze,lr).call(Ji.setClipUrl,N?g:null,e)}H.select("rect").call(Ji.setRect,R,R,j,_e),z.call(Ji.setRect,q/2,q/2,se-q,Se-q),k.call(Ji.setTranslate,Math.round(y.x.text-se/2),Math.round(y.y.text-Se/2)),T.attr({transform:"rotate("+w+","+y.x.text+","+y.y.text+")"});var ae=function(qe,ke){_.selectAll(".annotation-arrow-g").remove();var ir=y.x.head,vr=y.y.head,sr=y.x.tail+qe,Mr=y.y.tail+ke,Ur=y.x.text+qe,$r=y.y.text+ke,Vr=El.rotationXYMatrix(w,Ur,$r),St=El.apply2DTransform(Vr),ea=El.apply2DTransform2(Vr),ka=+z.attr("width"),ra=+z.attr("height"),pn=Ur-.5*ka,Ia=pn+ka,ta=$r-.5*ra,Ha=ta+ra,yr=[[pn,ta,pn,Ha],[pn,Ha,Ia,Ha],[Ia,Ha,Ia,ta],[Ia,ta,pn,ta]].map(ea);if(!yr.reduce(function(at,sa){return at^!!El.segmentsIntersect(ir,vr,ir+1e6,vr+1e6,sa[0],sa[1],sa[2],sa[3])},!1)){yr.forEach(function(at){var sa=El.segmentsIntersect(sr,Mr,ir,vr,at[0],at[1],at[2],at[3]);sa&&(sr=sa.x,Mr=sa.y)});var ot=r.arrowwidth,Wr=r.arrowcolor,mt=r.arrowside,Tt=_.append("g").style({opacity:Fo.opacity(Wr)}).classed("annotation-arrow-g",!0),st=Tt.append("path").attr("d","M"+sr+","+Mr+"L"+ir+","+vr).style("stroke-width",ot+"px").call(Fo.stroke,Fo.rgb(Wr));if(uj(st,mt,r),s.annotationPosition&&st.node().parentNode&&!a){var yt=ir,Ca=vr;if(r.standoff){var aa=Math.sqrt(Math.pow(ir-sr,2)+Math.pow(vr-Mr,2));yt+=r.standoff*(sr-ir)/aa,Ca+=r.standoff*(Mr-vr)/aa}var In=Tt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(sr-yt)+","+(Mr-Ca),transform:m2(yt,Ca)}).style("stroke-width",ot+6+"px").call(Fo.stroke,"rgba(0,0,0,0)").call(Fo.fill,"rgba(0,0,0,0)"),Hn,Wt;lc.init({element:In.node(),gd:e,prepFn:function(){var at=Ji.getTranslate(k);Hn=at.x,Wt=at.y,n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(at,sa){var Ul=St(Hn,Wt),Gl=Ul[0]+at,rl=Ul[1]+sa;k.call(Ji.setTranslate,Gl,rl),d("x",Dl(n,at,"x",o,r)),d("y",Dl(i,sa,"y",o,r)),r.axref===r.xref&&d("ax",Dl(n,at,"ax",o,r)),r.ayref===r.yref&&d("ay",Dl(i,sa,"ay",o,r)),Tt.attr("transform",m2(at,sa)),T.attr({transform:"rotate("+w+","+Gl+","+rl+")"})},doneFn:function(){p2.call("_guiRelayout",e,m());var at=document.querySelector(".js-notes-box-panel");at&&at.redraw(at.selectedObj)}})}}};if(r.showarrow&&ae(0,0),b){var oe;lc.init({element:k.node(),gd:e,prepFn:function(){oe=T.attr("transform")},moveFn:function(qe,ke){var ir="pointer";if(r.showarrow)r.axref===r.xref?d("ax",Dl(n,qe,"ax",o,r)):d("ax",r.ax+qe),r.ayref===r.yref?d("ay",Dl(i,ke,"ay",o.w,r)):d("ay",r.ay+ke),ae(qe,ke);else{if(a)return;var vr,sr;if(n)vr=Dl(n,qe,"x",o,r);else{var Mr=r._xsize/o.w,Ur=r.x+(r._xshift-r.xshift)/o.w-Mr/2;vr=lc.align(Ur+qe/o.w,Mr,0,1,r.xanchor)}if(i)sr=Dl(i,ke,"y",o,r);else{var $r=r._ysize/o.h,Vr=r.y-(r._yshift+r.yshift)/o.h-$r/2;sr=lc.align(Vr-ke/o.h,$r,0,1,r.yanchor)}d("x",vr),d("y",sr),(!n||!i)&&(ir=lc.getCursor(n?.5:vr,i?.5:sr,r.xanchor,r.yanchor))}T.attr({transform:m2(qe,ke)+oe}),g2(k,ir)},clickFn:function(qe,ke){r.captureevents&&e.emit("plotly_clickannotation",S(ke))},doneFn:function(){g2(k),p2.call("_guiRelayout",e,m());var qe=document.querySelector(".js-notes-box-panel");qe&&qe.redraw(qe.selectedObj)}})}}s.annotationText?X.call(y2.makeEditable,{delegate:k,gd:e}).call(B).on("edit",function(V){r.text=V,this.call(B),d("text",V),n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),p2.call("_guiRelayout",e,m())}):X.call(B)}});var XL=Z((Cfe,ZL)=>{"use strict";var UL=He(),cj=gr(),GL=ct().arrayEditor;ZL.exports={hasClickToShow:vj,onClick:hj};function vj(e,r){var t=WL(e,r);return t.on.length>0||t.explicitOff.length>0}function hj(e,r){var t=WL(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},l=e._fullLayout.annotations,o,s;if(a.length||n.length){for(o=0;o{"use strict";var b2=He(),uu=Er();JL.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),l=n("bordercolor"),o=uu.opacity(l);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),b2.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var v=n("arrowside"),h,d;v.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),v.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",o?t.bordercolor:uu.defaultLine),n("arrowwidth",(o&&s||1)*2),n("standoff"),n("startstandoff")}var m=n("hovertext"),g=a.hoverlabel||{};if(m){var y=n("hoverlabel.bgcolor",g.bgcolor||(uu.opacity(i)?uu.rgb(i):uu.defaultLine)),w=n("hoverlabel.bordercolor",g.bordercolor||uu.contrast(y)),_=b2.extendFlat({},g.font);_.color||(_.color=w),b2.coerceFont(n,"hoverlabel.font",_)}n("captureevents",!!m)}});var QL=Z((Lfe,KL)=>{"use strict";var _2=He(),Io=dt(),dj=Jn(),pj=x2(),mj=js();KL.exports=function(r,t){dj(r,t,{name:"annotations",handleItemDefaults:yj})};function yj(e,r,t){function a(T,b){return _2.coerce(e,r,mj,T,b)}var n=a("visible"),i=a("clicktoshow");if(n||i){pj(e,r,t,a);for(var l=r.showarrow,o=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var v=o[f],h=Io.coerceRef(e,r,u,v,"","paper");if(h!=="paper"){var d=Io.getFromId(u,h);d._annIndices.push(r._index)}if(Io.coercePosition(r,u,a,h,v,.5),l){var m="a"+v,g=Io.coerceRef(e,r,u,m,"pixel",["pixel","paper"]);g!=="pixel"&&g!==h&&(g=r[m]="pixel");var y=g==="pixel"?s[f]:.4;Io.coercePosition(r,u,a,g,m,y)}a(v+"anchor"),a(v+"shift")}if(_2.noneOrAll(e,r,["x","y"]),l&&_2.noneOrAll(e,r,["ax","ay"]),i){var w=a("xclick"),_=a("yclick");r._xclick=w===void 0?r.x:Io.cleanPosition(w,u,r.xref),r._yclick=_===void 0?r.y:Io.cleanPosition(_,u,r.yref)}}}});var eq=Z((qfe,jL)=>{"use strict";var w2=He(),Ho=dt(),gj=_d().draw;jL.exports=function(r){var t=r._fullLayout,a=w2.filterVisible(t.annotations);if(a.length&&r._fullData.length)return w2.syncOrAsync([gj,bj],r)};function bj(e){var r=e._fullLayout;w2.filterVisible(r.annotations).forEach(function(t){var a=Ho.getFromId(e,t.xref),n=Ho.getFromId(e,t.yref),i=Ho.getRefType(t.xref),l=Ho.getRefType(t.yref);t._extremes={},i==="range"&&$L(t,a),l==="range"&&$L(t,n)})}function $L(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],l=e[a+"ref"],o=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],v=3*e.arrowsize*e.arrowwidth||0,h=v+f,d=v-f,m=3*e.startarrowsize*e.arrowwidth||0,g=m+f,y=m-f,w;if(o===l){var _=Ho.findExtremes(r,[r.r2c(n)],{ppadplus:h,ppadminus:d}),T=Ho.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,g),ppadminus:Math.max(u,y)});w={min:[_.min[0],T.min[0]],max:[_.max[0],T.max[0]]}}else g=i?g+i:g,y=i?y-i:y,w=Ho.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,h,g),ppadminus:Math.max(u,d,y)});e._extremes[t]=w}});var tq=Z((Dfe,rq)=>{"use strict";var xj=Hr(),_j=vv();rq.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(!(i||l))return;var o=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function v(d){var m=u[d],g=null;i?g=_j(m,t.range):g=Math.pow(10,m),xj(g)||(g=null),n(f+d,g)}for(var h=0;h{"use strict";var T2=_d(),aq=XL();nq.exports={moduleType:"component",name:"annotations",layoutAttributes:js(),supplyLayoutDefaults:QL(),includeBasePlot:Yf()("annotations"),calcAutorange:eq(),draw:T2.draw,drawOne:T2.drawOne,drawRaw:T2.drawRaw,hasClickToShow:aq.hasClickToShow,onClick:aq.onClick,convertCoords:tq()}});var wd=Z((Pfe,lq)=>{"use strict";var ft=js(),wj=pi().overrideAll,Tj=ct().templatedArray;lq.exports=wj(Tj("annotation",{visible:ft.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:ft.xanchor,xshift:ft.xshift,yanchor:ft.yanchor,yshift:ft.yshift,text:ft.text,textangle:ft.textangle,font:ft.font,width:ft.width,height:ft.height,opacity:ft.opacity,align:ft.align,valign:ft.valign,bgcolor:ft.bgcolor,bordercolor:ft.bordercolor,borderpad:ft.borderpad,borderwidth:ft.borderwidth,showarrow:ft.showarrow,arrowcolor:ft.arrowcolor,arrowhead:ft.arrowhead,startarrowhead:ft.startarrowhead,arrowside:ft.arrowside,arrowsize:ft.arrowsize,startarrowsize:ft.startarrowsize,arrowwidth:ft.arrowwidth,standoff:ft.standoff,startstandoff:ft.startstandoff,hovertext:ft.hovertext,hoverlabel:ft.hoverlabel,captureevents:ft.captureevents}),"calc","from-root")});var sq=Z((Rfe,oq)=>{"use strict";var M2=He(),Mj=dt(),Aj=Jn(),kj=x2(),Cj=wd();oq.exports=function(r,t,a){Aj(r,t,{name:"annotations",handleItemDefaults:Sj,fullLayout:a.fullLayout})};function Sj(e,r,t,a){function n(o,s){return M2.coerce(e,r,Cj,o,s)}function i(o){var s=o+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],Mj.coercePosition(r,u,n,o,o,.5)}var l=n("visible");l&&(kj(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),M2.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),M2.noneOrAll(e,r,["ax","ay"])))}});var vq=Z((zfe,cq)=>{"use strict";var uq=He(),fq=dt();cq.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function A2(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function qj(e,r){var t=A2(e.projection,A2(e.view,A2(e.model,[r[0],r[1],r[2],1])));return t}hq.exports=qj});var mq=Z((Ffe,pq)=>{"use strict";var Dj=_d().drawRaw,Ej=dq(),Pj=["x","y","z"];pq.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){o=!0;break}}o?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(l._pdata=Ej(r.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),Dj(r.graphDiv,l,i,r.id,l._xa,l._ya))}}});var bq=Z((Ife,gq)=>{"use strict";var Rj=gr(),yq=He();gq.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:wd()}}},layoutAttributes:wd(),handleDefaults:sq(),includeBasePlot:zj,convert:vq(),draw:mq()};function zj(e,r){var t=Rj.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var xq=js(),_q=ha(),wq=qo().line,Nj=mi().dash,ii=Yt().extendFlat,Fj=ct().templatedArray,Hfe=Bf(),fu=Gn(),Ij=zi().shapeTexttemplateAttrs,Hj=kv();Tq.exports=Fj("shape",{visible:ii({},fu.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:ii({},fu.legend,{editType:"calc+arraydraw"}),legendgroup:ii({},fu.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:ii({},fu.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:_q({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:ii({},fu.legendrank,{editType:"calc+arraydraw"}),legendwidth:ii({},fu.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:ii({},xq.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:ii({},xq.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:ii({},wq.color,{editType:"arraydraw"}),width:ii({},wq.width,{editType:"calc+arraydraw"}),dash:ii({},Nj,{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:Ij({},{keys:Object.keys(Hj)}),font:_q({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 kq=Z((Bfe,Aq)=>{"use strict";var sc=He(),cu=dt(),Oj=Jn(),Bj=k2(),Mq=Al();Aq.exports=function(r,t){Oj(r,t,{name:"shapes",handleItemDefaults:Uj})};function Yj(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Uj(e,r,t){function a(V,K){return sc.coerce(e,r,Bj,V,K)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),sc.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),o=l?"path":"rect",s=a("type",o),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var v=a("xsizemode"),h=a("ysizemode"),d=["x","y"],m=0;m<2;m++){var g=d[m],y=g+"anchor",w=g==="x"?v:h,_={_fullLayout:t},T,b,A,S=cu.coerceRef(e,r,_,g,void 0,"paper"),k=cu.getRefType(S);if(k==="range"?(T=cu.getFromId(_,S),T._shapeIndices.push(r._index),A=Mq.rangeToShapePosition(T),b=Mq.shapePositionToRange(T),(T.type==="category"||T.type==="multicategory")&&(a(g+"0shift"),a(g+"1shift"))):b=A=sc.identity,u){var q=.25,D=.75,R=g+"0",z=g+"1",N=e[R],H=e[z];e[R]=b(e[R],!0),e[z]=b(e[z],!0),w==="pixel"?(a(R,0),a(z,10)):(cu.coercePosition(r,_,a,S,R,q),cu.coercePosition(r,_,a,S,z,D)),r[R]=A(r[R]),r[z]=A(r[z]),e[R]=N,e[z]=H}if(w==="pixel"){var O=e[y];e[y]=b(e[y],!0),cu.coercePosition(r,_,a,S,y,.25),r[y]=A(r[y]),e[y]=O}}u&&sc.noneOrAll(e,r,["x0","x1","y0","y1"]);var J=s==="line",X,B;if(u&&(X=a("label.texttemplate")),X||(B=a("label.text")),B||X){a("label.textangle");var I=a("label.textposition",J?"middle":"middle center");a("label.xanchor"),a("label.yanchor",Yj(J,I)),a("label.padding"),sc.coerceFont(a,"label.font",t.font)}}}});var Lq=Z((Yfe,Sq)=>{"use strict";var Gj=Er(),Cq=He();function Vj(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}Sq.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),Cq.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Gj.contrast(i)),a("newshape.line.dash")}var l=r.dragmode==="drawline",o=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(o||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",l?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Vj(l,u)),a("newshape.label.padding"),Cq.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var Rq=Z((Ufe,Pq)=>{"use strict";var C2=He(),vu=dt(),hu=_f(),Dq=Al();Pq.exports=function(r){var t=r._fullLayout,a=C2.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+l:l;return{ppad:l,ppadplus:o?v:h,ppadminus:o?h:v}}else return{ppad:l}}function qq(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,l,o=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],l=r[a+"1"],n&&(o=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],l=r[a+"anchor"]),i!==void 0)return[u(i)+o,u(l)+s];if(r.path){var v=1/0,h=-1/0,d=r.path.match(hu.segmentRE),m,g,y,w,_;for(e.type==="date"&&(u=Dq.decodeDate(u)),m=0;mh&&(h=_)));if(h>=v)return[v,h]}}});var Fq=Z((Gfe,Nq)=>{"use strict";var zq=hh();Nq.exports={moduleType:"component",name:"shapes",layoutAttributes:k2(),supplyLayoutDefaults:kq(),supplyDrawNewShapeDefaults:Lq(),includeBasePlot:Yf()("shapes"),calcAutorange:Rq(),draw:zq.draw,drawOne:zq.drawOne}});var S2=Z((Wfe,Hq)=>{"use strict";var Iq=da(),Xj=ct().templatedArray,Vfe=Bf();Hq.exports=Xj("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",Iq.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",Iq.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Bq=Z((Zfe,Oq)=>{"use strict";var Jj=He(),L2=dt(),Kj=Jn(),Qj=S2(),$j="images";Oq.exports=function(r,t){var a={name:$j,handleItemDefaults:jj};Kj(r,t,a)};function jj(e,r,t){function a(h,d){return Jj.coerce(e,r,Qj,h,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:t},o=["x","y"],s=0;s<2;s++){var u=o[s],f=L2.coerceRef(e,r,l,u,"paper",void 0);if(f!=="paper"){var v=L2.getFromId(l,f);v._imgIndices.push(r._index)}L2.coercePosition(r,l,a,f,u,0)}return r}});var Vq=Z((Xfe,Gq)=>{"use strict";var Yq=Ir(),eee=tt(),du=dt(),Uq=Xt(),ree=fo();Gq.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],l,o;for(o=0;o{"use strict";var Wq=Hr(),tee=vv();Zq.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(i||l){for(var o=r._fullLayout.images,s=t._id.charAt(0),u,f,v=0;v{"use strict";Jq.exports={moduleType:"component",name:"images",layoutAttributes:S2(),supplyLayoutDefaults:Bq(),includeBasePlot:Yf()("images"),draw:Vq(),convertCoords:Xq()}});var Td=Z((Qfe,Qq)=>{"use strict";Qq.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 q2=Z(($fe,jq)=>{"use strict";var aee=ha(),nee=hi(),iee=Yt().extendFlat,lee=pi().overrideAll,oee=Cv(),$q=ct().templatedArray,see=$q("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}});jq.exports=lee($q("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:see,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:iee(oee({editType:"arraydraw"}),{}),font:aee({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:nee.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var aD=Z((jfe,tD)=>{"use strict";var Md=He(),eD=Jn(),rD=q2(),uee=Td(),fee=uee.name,cee=rD.buttons;tD.exports=function(r,t){var a={name:fee,handleItemDefaults:vee};eD(r,t,a)};function vee(e,r,t){function a(l,o){return Md.coerce(e,r,rD,l,o)}var n=eD(e,r,{name:"buttons",handleItemDefaults:hee}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Md.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Md.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function hee(e,r){function t(n,i){return Md.coerce(e,r,cee,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var lD=Z((ece,iD)=>{"use strict";iD.exports=xt;var li=Ir(),nD=Er(),pu=tt(),Ad=He();function xt(e,r,t){this.gd=e,this.container=r,this.id=t,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})}xt.barWidth=2;xt.barLength=20;xt.barRadius=2;xt.barPad=1;xt.barColor="#808BA4";xt.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,l=n.height;this.position=r;var o=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,v=this.position.direction,h=v==="down",d=v==="left",m=v==="right",g=v==="up",y=s,w=f,_,T,b,A;!h&&!d&&!m&&!g&&(this.position.direction="down",h=!0);var S=h||g;S?(_=o,T=_+y,h?(b=u,A=Math.min(b+w,l),w=A-b):(A=u+w,b=Math.max(A-w,0),w=A-b)):(b=u,A=b+w,d?(T=o+y,_=Math.max(T-y,0),y=T-_):(_=o,T=Math.min(_+y,i),y=T-_)),this._box={l:_,t:b,w:y,h:w};var k=s>y,q=xt.barLength+2*xt.barPad,D=xt.barWidth+2*xt.barPad,R=o,z=u+f;z+D>l&&(z=l-D);var N=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(nD.fill,xt.barColor),k?(this.hbar=N.attr({rx:xt.barRadius,ry:xt.barRadius,x:R,y:z,width:q,height:D}),this._hbarXMin=R+q/2,this._hbarTranslateMax=y-q):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var H=f>w,O=xt.barWidth+2*xt.barPad,J=xt.barLength+2*xt.barPad,X=o+s,B=u;X+O>i&&(X=i-O);var I=this.container.selectAll("rect.scrollbar-vertical").data(H?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(nD.fill,xt.barColor),H?(this.vbar=I.attr({rx:xt.barRadius,ry:xt.barRadius,x:X,y:B,width:O,height:J}),this._vbarYMin=B+J/2,this._vbarTranslateMax=w-J):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,K=_-.5,Q=H?T+O+.5:T+.5,ie=b-.5,me=k?A+D+.5:A+.5,pe=n._topdefs.selectAll("#"+V).data(k||H?[0]:[]);if(pe.exit().remove(),pe.enter().append("clipPath").attr("id",V).append("rect"),k||H?(this._clipRect=pe.select("rect").attr({x:Math.floor(K),y:Math.floor(ie),width:Math.ceil(Q)-Math.floor(K),height:Math.ceil(me)-Math.floor(ie)}),this.container.call(pu.setClipUrl,V,this.gd),this.bg.attr({x:o,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(pu.setClipUrl,null),delete this._clipRect),k||H){var ge=li.behavior.drag().on("dragstart",function(){li.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ge);var j=li.behavior.drag().on("dragstart",function(){li.event.sourceEvent.preventDefault(),li.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(j),H&&this.vbar.on(".drag",null).call(j)}this.setTranslate(t,a)};xt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(pu.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)};xt.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=li.event.dx),this.vbar&&(t-=li.event.dy),this.setTranslate(r,t)};xt.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=li.event.deltaY),this.vbar&&(t+=li.event.deltaY),this.setTranslate(r,t)};xt.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=Ad.constrain(li.event.x,a,n),l=(i-a)/(n-a),o=this.position.w-this._box.w;r=l*o}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=Ad.constrain(li.event.y,s,u),v=(f-s)/(u-s),h=this.position.h-this._box.h;t=v*h}this.setTranslate(r,t)};xt.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=Ad.constrain(r||0,0,a),t=Ad.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(pu.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(pu.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(pu.setTranslate,r,t+l*this._vbarTranslateMax)}}});var mD=Z((rce,pD)=>{"use strict";var mu=Ir(),uc=Pt(),fc=Er(),yu=tt(),hn=He(),kd=xa(),dee=ct().arrayEditor,sD=Da().LINE_SPACING,_r=Td(),pee=lD();pD.exports=function(r){var t=r._fullLayout,a=hn.filterVisible(t[_r.name]);function n(h){uc.autoMargin(r,hD(h))}var i=t._menulayer.selectAll("g."+_r.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(_r.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){mu.select(this).selectAll("g."+_r.headerGroupClassName).each(n)}).remove(),a.length!==0){var l=i.selectAll("g."+_r.headerGroupClassName).data(a,mee);l.enter().append("g").classed(_r.headerGroupClassName,!0);for(var o=hn.ensureSingle(i,"g",_r.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var Tee=Td();yD.exports={moduleType:"component",name:Tee.name,layoutAttributes:q2(),supplyLayoutDefaults:aD(),draw:mD()}});var vc=Z((ace,bD)=>{"use strict";bD.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 R2=Z((nce,wD)=>{"use strict";var xD=ha(),Mee=Cv(),Aee=Yt().extendDeepAll,kee=pi().overrideAll,Cee=Vu(),_D=ct().templatedArray,Oo=vc(),See=_D("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}});wD.exports=kee(_D("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:See,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:Aee(Mee({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:Cee.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:xD({})},font:xD({}),activebgcolor:{valType:"color",dflt:Oo.gripBgActiveColor},bgcolor:{valType:"color",dflt:Oo.railBgColor},bordercolor:{valType:"color",dflt:Oo.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Oo.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Oo.tickLength},tickcolor:{valType:"color",dflt:Oo.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Oo.minorTickLength}}),"arraydraw","from-root")});var kD=Z((ice,AD)=>{"use strict";var gu=He(),TD=Jn(),MD=R2(),Lee=vc(),qee=Lee.name,Dee=MD.steps;AD.exports=function(r,t){TD(r,t,{name:qee,handleItemDefaults:Eee})};function Eee(e,r,t){function a(v,h){return gu.coerce(e,r,MD,v,h)}for(var n=TD(e,r,{name:"steps",handleItemDefaults:Pee}),i=0,l=0;l{"use strict";var oi=Ir(),Cd=Pt(),Pl=Er(),si=tt(),dn=He(),Ree=dn.strTranslate,hc=xa(),zee=ct().arrayEditor,Dr=vc(),F2=Da(),LD=F2.LINE_SPACING,z2=F2.FROM_TL,N2=F2.FROM_BR;zD.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=Nee(a,r),i=a._infolayer.selectAll("g."+Dr.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Dr.containerClassName,!0).style("cursor",t?null:"ew-resize");function l(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Cd.autoMargin(r,qD(f))}if(i.exit().each(function(){oi.select(this).selectAll("g."+Dr.groupClassName).each(l)}).remove(),n.length!==0){var o=i.selectAll("g."+Dr.groupClassName).data(n,Fee);o.enter().append("g").classed(Dr.groupClassName,!0),o.exit().each(l).remove();for(var s=0;s0&&(o=o.transition().duration(r.transition.duration).ease(r.transition.easing)),o.attr("transform",Ree(l-Dr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function I2(e,r){var t=e._dims;return t.inputAreaStart+Dr.stepInset+(t.inputAreaLength-2*Dr.stepInset)*Math.min(1,Math.max(0,r))}function SD(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Dr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Dr.stepInset-2*t.inputAreaStart)))}function Gee(e,r,t){var a=t._dims,n=dn.ensureSingle(e,"rect",Dr.railTouchRectClass,function(i){i.call(PD,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Dr.tickOffset+t.ticklen+a.labelHeight)}).call(Pl.fill,t.bgcolor).attr("opacity",0),si.setTranslate(n,0,a.currentValueTotalHeight)}function Vee(e,r){var t=r._dims,a=t.inputAreaLength-Dr.railInset*2,n=dn.ensureSingle(e,"rect",Dr.railRectClass);n.attr({width:a,height:Dr.railWidth,rx:Dr.railRadius,ry:Dr.railRadius,"shape-rendering":"crispEdges"}).call(Pl.stroke,r.bordercolor).call(Pl.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),si.setTranslate(n,Dr.railInset,(t.inputAreaWidth-Dr.railWidth)*.5+t.currentValueTotalHeight)}});var ID=Z((oce,FD)=>{"use strict";var Wee=vc();FD.exports={moduleType:"component",name:Wee.name,layoutAttributes:R2(),supplyLayoutDefaults:kD(),draw:ND()}});var Ld=Z((sce,OD)=>{"use strict";var HD=hi();OD.exports={bgcolor:{valType:"color",dflt:HD.background,editType:"plot"},bordercolor:{valType:"color",dflt:HD.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 H2=Z((uce,BD)=>{"use strict";BD.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 qd=Z((fce,YD)=>{"use strict";YD.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 VD=Z(Ed=>{"use strict";var Zee=Xt(),Xee=xa(),UD=qd(),Jee=Da().LINE_SPACING,Dd=UD.name;function GD(e){var r=e&&e[Dd];return r&&r.visible}Ed.isVisible=GD;Ed.makeData=function(e){for(var r=Zee.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var Pd=He(),WD=ct(),ZD=Xt(),Kee=Ld(),Qee=H2();XD.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;Pd.isPlainObject(n.rangeslider)||(n.rangeslider={});var l=n.rangeslider,o=WD.newContainer(i,"rangeslider");function s(A,S){return Pd.coerce(l,o,Kee,A,S)}var u,f;function v(A,S){return Pd.coerce(u,f,Qee,A,S)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(l.range)),s("range");var d=t._subplots;if(d)for(var m=d.cartesian.filter(function(A){return A.substr(0,A.indexOf("y"))===ZD.name2id(a)}).map(function(A){return A.substr(A.indexOf("y"),A.length)}),g=Pd.simpleMap(m,ZD.id2name),y=0;y{"use strict";var $ee=Xt().list,jee=ff().getAutoRange,ere=qd();KD.exports=function(r){for(var t=$ee(r,"x",!0),a=0;a{"use strict";var Rd=Ir(),rre=gr(),tre=Pt(),Ct=He(),zd=Ct.strTranslate,jD=tt(),Rl=Er(),are=sf(),nre=bd(),O2=Xt(),ire=Qn(),lre=wl(),Fr=qd();eE.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=I.max)X=z[B+1];else if(J=I.pmax)X=z[B+1];else if(J0?e.touches[0].clientX:0}function ore(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Fr.slideBoxClassName).node(),i=e.select("rect."+Fr.grabAreaMinClassName).node(),l=e.select("rect."+Fr.grabAreaMaxClassName).node();function o(){var s=Rd.event,u=s.target,f=$D(s),v=f-e.node().getBoundingClientRect().left,h=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),m=ire.coverSlip();this.addEventListener("touchmove",g),this.addEventListener("touchend",y),m.addEventListener("mousemove",g),m.addEventListener("mouseup",y);function g(w){var _=$D(w),T=+_-f,b,A,S;switch(u){case n:if(S="ew-resize",h+T>t._length||d+T<0)return;b=h+T,A=d+T;break;case i:if(S="col-resize",h+T>t._length)return;b=h+T,A=d;break;case l:if(S="col-resize",d+T<0)return;b=h,A=d+T;break;default:S="ew-resize",b=v,A=v+T;break}if(A{"use strict";var yre=He(),gre=Ld(),bre=H2(),B2=VD();tE.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:yre.extendFlat({},gre,{yaxis:bre})}}},layoutAttributes:Ld(),handleDefaults:JD(),calcAutorange:QD(),draw:rE(),isVisible:B2.isVisible,makeData:B2.makeData,autoMarginOpts:B2.autoMarginOpts}});var Nd=Z((mce,iE)=>{"use strict";var xre=ha(),nE=hi(),_re=ct().templatedArray,wre=_re("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"});iE.exports={visible:{valType:"boolean",editType:"plot"},buttons:wre,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:xre({editType:"plot"}),bgcolor:{valType:"color",dflt:nE.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:nE.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var Y2=Z((yce,lE)=>{"use strict";lE.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var uE=Z((gce,sE)=>{"use strict";var Fd=He(),Tre=Er(),Mre=ct(),Are=Jn(),oE=Nd(),U2=Y2();sE.exports=function(r,t,a,n,i){var l=r.rangeselector||{},o=Mre.newContainer(t,"rangeselector");function s(d,m){return Fd.coerce(l,o,oE,d,m)}var u=Are(l,o,{name:"buttons",handleItemDefaults:kre,calendar:i}),f=s("visible",u.length>0);if(f){var v=Cre(t,a,n);s("x",v[0]),s("y",v[1]),Fd.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Fd.coerceFont(s,"font",a.font);var h=s("bgcolor");s("activecolor",Tre.contrast(h,U2.lightAmount,U2.darkAmount)),s("bordercolor"),s("borderwidth")}};function kre(e,r,t,a){var n=a.calendar;function i(s,u){return Fd.coerce(e,r,oE.buttons,s,u)}var l=i("visible");if(l){var o=i("step");o!=="all"&&(n&&n!=="gregorian"&&(o==="month"||o==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function Cre(e,r,t){for(var a=t.filter(function(o){return r[o].anchor===e._id}),n=0,i=0;i{"use strict";var Sre=H1(),Lre=He().titleCase;fE.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=qre(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function qre(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=Sre["utc"+Lre(n)],l=r.count,o;switch(r.stepmode){case"backward":o=e.l2r(+i.offset(a,-l));break;case"todate":var s=i.offset(a,-l);o=e.l2r(+i.ceil(s));break}var u=t[1];return[o,u]}});var bE=Z((xce,gE)=>{"use strict";var Hd=Ir(),Dre=gr(),Ere=Pt(),vE=Er(),yE=tt(),Ki=He(),hE=Ki.strTranslate,Id=xa(),Pre=Xt(),W2=Da(),dE=W2.LINE_SPACING,pE=W2.FROM_TL,mE=W2.FROM_BR,V2=Y2(),Rre=cE();gE.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(zre(r),Nre);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=Hd.select(this),l=n,o=l.rangeselector,s=i.selectAll("g.button").data(Ki.filterVisible(o.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Hd.select(this),v=Rre(l,u);u._isActive=Fre(l,u,v),f.call(G2,o,u),f.call(Hre,o,u,r),f.on("click",function(){r._dragged||Dre.call("_guiRelayout",r,v)}),f.on("mouseover",function(){u._isHovered=!0,f.call(G2,o,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(G2,o,u)})}),Bre(r,s,o,l._name,i)})};function zre(e){for(var r=Pre.list(e,"x",!0),t=[],a=0;a{"use strict";xE.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Nd()}}},layoutAttributes:Nd(),handleDefaults:uE(),draw:bE()}});var Od=Z(Z2=>{"use strict";var wE=Yt().extendFlat;Z2.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",l={x:wE({},t,{}),y:wE({},t,{}),editType:e.editType};return e.noGridCell||(l.row={valType:"integer",min:0,dflt:0,editType:e.editType},l.column={valType:"integer",min:0,dflt:0,editType:e.editType}),l};Z2.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],l=r.grid;if(l){var o=t("domain.column");o!==void 0&&(o{"use strict";var Yre=He(),Ure=cs().counter,Gre=Od().attributes,TE=da().idRegex,Vre=ct(),X2={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:[Ure("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[TE.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[TE.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:Gre({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 Bd(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function Wre(e,r){var t=e.grid||{},a=Bd(r,t,"x"),n=Bd(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),l=Array.isArray(a),o=Array.isArray(n),s=l&&a!==t.xaxes&&o&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(o&&(u=n.length),l&&(f=a.length));var v=Vre.newContainer(r,"grid");function h(S,k){return Yre.coerce(t,v,X2,S,k)}var d=h("rows",u),m=h("columns",f);if(!(d*m>1)){delete r.grid;return}if(!i&&!l&&!o){var g=h("pattern")==="independent";g&&(i=!0)}v._hasSubplotGrid=i;var y=h("roworder"),w=y==="top to bottom",_=i?.2:.1,T=i?.3:.1,b,A;s&&r._splomGridDflt&&(b=r._splomGridDflt.xside,A=r._splomGridDflt.yside),v._domains={x:ME("x",h,_,b,m),y:ME("y",h,T,A,d,w)}}function ME(e,r,t,a,n,i){var l=r(e+"gap",t),o=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=o[0],f=(o[1]-u)/(n-l),v=f*(1-l),h=0;h{"use strict";SE.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 DE=Z((Ace,qE)=>{"use strict";var LE=Hr(),Xre=gr(),Jre=He(),Kre=ct(),Qre=J2();qE.exports=function(e,r,t,a){var n="error_"+a.axis,i=Kre.newContainer(r,n),l=e[n]||{};function o(m,g){return Jre.coerce(l,i,Qre,m,g)}var s=l.array!==void 0||l.value!==void 0||l.type==="sqrt",u=o("visible",s);if(u!==!1){var f=o("type","array"in l?"data":"percent"),v=!0;f!=="sqrt"&&(v=o("symmetric",!((f==="data"?"arrayminus":"valueminus")in l))),f==="data"?(o("array"),o("traceref"),v||(o("arrayminus"),o("tracerefminus"))):(f==="percent"||f==="constant")&&(o("value"),v||o("valueminus"));var h="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&o(h,!(l.color||LE(l.thickness)||LE(l.width)))}(!a.inherit||!i[h])&&(o("color",t),o("thickness"),o("width",Xre.traceIs(r,"gl3d")?0:4))}}});var K2=Z((kce,PE)=>{"use strict";PE.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var v=+n[f];return[v,v]};var i=r.arrayminus||[];return function(u,f){var v=+n[f],h=+i[f];return!isNaN(v)||!isNaN(h)?[h||0,v||0]:[NaN,NaN]}}else{var l=EE(t,r.value),o=EE(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=l(u);return[f,f]}:function(u){return[o(u),l(u)]}}};function EE(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var NE=Z((Cce,zE)=>{"use strict";var Q2=Hr(),$re=gr(),$2=dt(),jre=He(),ete=K2();zE.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var FE=Ir(),zl=Hr(),rte=tt(),tte=on();IE.exports=function(r,t,a,n){var i,l=a.xaxis,o=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var v=f[0].trace,h=v.error_x||{},d=v.error_y||{},m;v.ids&&(m=function(_){return _.id});var g=tte.hasMarkers(v)&&v.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var y=FE.select(this).selectAll("g.errorbar").data(f,m);if(y.exit().remove(),!!f.length){h.visible||y.selectAll("path.xerror").remove(),d.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var w=y.enter().append("g").classed("errorbar",!0);s&&w.style("opacity",0).transition().duration(n.duration).style("opacity",1),rte.setClipUrl(y,a.layerClipId,r),y.each(function(_){var T=FE.select(this),b=ate(_,l,o);if(!(g&&!_.vis)){var A,S=T.select("path.yerror");if(d.visible&&zl(b.x)&&zl(b.yh)&&zl(b.ys)){var k=d.width;A="M"+(b.x-k)+","+b.yh+"h"+2*k+"m-"+k+",0V"+b.ys,b.noYS||(A+="m-"+k+",0h"+2*k),i=!S.size(),i?S=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(S=S.transition().duration(n.duration).ease(n.easing)),S.attr("d",A)}else S.remove();var q=T.select("path.xerror");if(h.visible&&zl(b.y)&&zl(b.xh)&&zl(b.xs)){var D=(h.copy_ystyle?d:h).width;A="M"+b.xh+","+(b.y-D)+"v"+2*D+"m0,-"+D+"H"+b.xs,b.noXS||(A+="m0,-"+D+"v"+2*D),i=!q.size(),i?q=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(q=q.transition().duration(n.duration).ease(n.easing)),q.attr("d",A)}else q.remove()}})}})};function ate(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),zl(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),zl(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var YE=Z((Lce,BE)=>{"use strict";var nte=Ir(),OE=Er();BE.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},l=nte.select(this);l.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(OE.stroke,n.color),i.copy_ystyle&&(i=n),l.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(OE.stroke,i.color)})}});var VE=Z((qce,GE)=>{"use strict";var dc=He(),UE=pi().overrideAll,pc=J2(),Bo={error_x:dc.extendFlat({},pc),error_y:dc.extendFlat({},pc)};delete Bo.error_x.copy_zstyle;delete Bo.error_y.copy_zstyle;delete Bo.error_y.copy_ystyle;var mc={error_x:dc.extendFlat({},pc),error_y:dc.extendFlat({},pc),error_z:dc.extendFlat({},pc)};delete mc.error_x.copy_ystyle;delete mc.error_y.copy_ystyle;delete mc.error_z.copy_ystyle;delete mc.error_z.copy_zstyle;GE.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Bo,bar:Bo,histogram:Bo,scatter3d:UE(mc,"calc","nested"),scattergl:UE(Bo,"calc","nested")}},supplyDefaults:DE(),calc:NE(),makeComputeError:K2(),plot:HE(),style:YE(),hoverInfo:ite};function ite(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var ZE=Z((Dce,WE)=>{"use strict";WE.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 eP=Z((Ece,jE)=>{"use strict";var Nl=Ir(),j2=bn(),Ud=Pt(),XE=gr(),Qi=dt(),Yd=Qn(),Nn=He(),fi=Nn.strTranslate,$E=Yt().extendFlat,e3=wl(),ui=tt(),r3=Er(),lte=sf(),ote=xa(),ste=Tn().flipScale,ute=f2(),fte=c2(),cte=Xn(),t3=Da(),JE=t3.LINE_SPACING,KE=t3.FROM_TL,QE=t3.FROM_BR,bt=ZE().cn;function vte(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+bt.colorbar).data(hte(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(bt.colorbar,!0),t.each(function(a){var n=Nl.select(this);Nn.ensureSingle(n,"rect",bt.cbbg),Nn.ensureSingle(n,"g",bt.cbfills),Nn.ensureSingle(n,"g",bt.cblines),Nn.ensureSingle(n,"g",bt.cbaxis,function(l){l.classed(bt.crisp,!0)}),Nn.ensureSingle(n,"g",bt.cbtitleunshift,function(l){l.append("g").classed(bt.cbtitle,!0)}),Nn.ensureSingle(n,"rect",bt.cboutline);var i=dte(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&pte(n,a,e)}),t.exit().each(function(a){Ud.autoMargin(e,a._id)}).remove(),t.order()}function hte(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,l,o;function s(T){return $E(T,{_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 o.calc=="function"?o.calc(e,l,n):(n._fillgradient=i.reversescale?ste(i.colorscale):i.colorscale,n._zrange=[i[o.min],i[o.max]])}for(var f=0;f1){var re=Math.pow(10,Math.floor(Math.log(Y)/Math.LN10));ve*=re*Nn.roundUp(Y/re,[2,5,10]),(Math.abs(N.start)/N.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ve}se.domain=a?[j+m/b.h,j+V-m/b.h]:[j+d/b.w,j+V-d/b.w],se.setScale(),e.attr("transform",fi(Math.round(b.l),Math.round(b.t)));var U=e.select("."+bt.cbtitleunshift).attr("transform",fi(-Math.round(b.l),-Math.round(b.t))),de=se.ticklabelposition,be=se.title.font.size,ye=e.select("."+bt.cbaxis),Fe,Re=0,Pe=0;function Ie(We,ne){var Me={propContainer:se,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:T._dfltTitle.colorbar,containerGroup:e.select("."+bt.cbtitle)},Ce=We.charAt(0)==="h"?We.substr(1):"h"+We;e.selectAll("."+Ce+",."+Ce+"-math-group").remove(),lte.draw(t,We,$E(Me,ne||{}))}function Be(){if(a&&Se||!a&&!Se){var We,ne;q==="top"&&(We=d+b.l+K*g,ne=m+b.t+Q*(1-j-V)+3+be*.75),q==="bottom"&&(We=d+b.l+K*g,ne=m+b.t+Q*(1-j)-3-be*.25),q==="right"&&(ne=m+b.t+Q*y+3+be*.75,We=d+b.l+K*j),Ie(se._id+"title",{attributes:{x:We,y:ne,"text-anchor":a?"start":"middle"}})}}function Ne(){if(a&&!Se||!a&&Se){var We=se.position||0,ne=se._offset+se._length/2,Me,Ce;if(q==="right")Ce=ne,Me=b.l+K*We+10+be*(se.showticklabels?1:.5);else if(Me=ne,q==="bottom"&&(Ce=b.t+Q*We+10+(de.indexOf("inside")===-1?se.tickfont.size:0)+(se.ticks!=="intside"&&r.ticklen||0)),q==="top"){var cr=k.text.split("
").length;Ce=b.t+Q*We+10-X-JE*be*cr}Ie((a?"h":"v")+se._id+"title",{avoid:{selection:Nl.select(t).selectAll("g."+se._id+"tick"),side:q,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?T.width:T.height},attributes:{x:Me,y:Ce,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Ee(){if(!a&&!Se||a&&Se){var We=e.select("."+bt.cbtitle),ne=We.select("text"),Me=[-s/2,s/2],Ce=We.select(".h"+se._id+"title-math-group").node(),cr=15.6;ne.node()&&(cr=parseInt(ne.node().style.fontSize,10)*JE);var tr;if(Ce?(tr=ui.bBox(Ce),Pe=tr.width,Re=tr.height,Re>cr&&(Me[1]-=(Re-cr)/2)):ne.node()&&!ne.classed(bt.jsPlaceholder)&&(tr=ui.bBox(ne.node()),Pe=tr.width,Re=tr.height),a){if(Re){if(Re+=5,q==="top")se.domain[1]-=Re/b.h,Me[1]*=-1;else{se.domain[0]+=Re/b.h;var De=ote.lineCount(ne);Me[1]+=(1-De)*cr}We.attr("transform",fi(Me[0],Me[1])),se.setScale()}}else Pe&&(q==="right"&&(se.domain[0]+=(Pe+be/2)/b.w),We.attr("transform",fi(Me[0],Me[1])),se.setScale())}e.selectAll("."+bt.cbfills+",."+bt.cblines).attr("transform",a?fi(0,Math.round(b.h*(1-se.domain[1]))):fi(Math.round(b.w*se.domain[0]),0)),ye.attr("transform",a?fi(0,Math.round(-b.t)):fi(Math.round(-b.l),0));var Le=e.select("."+bt.cbfills).selectAll("rect."+bt.cbfill).attr("style","").data(O);Le.enter().append("rect").classed(bt.cbfill,!0).attr("style",""),Le.exit().remove();var Ye=D.map(se.c2p).map(Math.round).sort(function(fr,lr){return fr-lr});Le.each(function(fr,lr){var ze=[lr===0?D[0]:(O[lr]+O[lr-1])/2,lr===O.length-1?D[1]:(O[lr]+O[lr+1])/2].map(se.c2p).map(Math.round);a&&(ze[1]=Nn.constrain(ze[1]+(ze[1]>ze[0])?1:-1,Ye[0],Ye[1]));var ae=Nl.select(this).attr(a?"x":"y",ie).attr(a?"y":"x",Nl.min(ze)).attr(a?"width":"height",Math.max(X,2)).attr(a?"height":"width",Math.max(Nl.max(ze)-Nl.min(ze),2));if(r._fillgradient)ui.gradient(ae,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var oe=z(fr).replace("e-","");ae.attr("fill",j2(oe).toHexString())}});var Ze=e.select("."+bt.cblines).selectAll("path."+bt.cbline).data(S.color&&S.width?J:[]);Ze.enter().append("path").classed(bt.cbline,!0),Ze.exit().remove(),Ze.each(function(fr){var lr=ie,ze=Math.round(se.c2p(fr))+S.width/2%1;Nl.select(this).attr("d","M"+(a?lr+","+ze:ze+","+lr)+(a?"h":"v")+X).call(ui.lineGroupStyle,S.width,R(fr),S.dash)}),ye.selectAll("g."+se._id+"tick,path").remove();var Ue=ie+X+(s||0)/2-(r.ticks==="outside"?1:0),Oe=Qi.calcTicks(se),Ke=Qi.getTickSigns(se)[2];return Qi.drawTicks(t,se,{vals:se.ticks==="inside"?Qi.clipEnds(se,Oe):Oe,layer:ye,path:Qi.makeTickPath(se,Ue,Ke),transFn:Qi.makeTransTickFn(se)}),Qi.drawLabels(t,se,{vals:Oe,layer:ye,transFn:Qi.makeTransTickLabelFn(se),labelFns:Qi.makeLabelFns(se,Ue)})}function Je(){var We,ne=X+s/2;de.indexOf("inside")===-1&&(We=ui.bBox(ye.node()),ne+=a?We.width:We.height),Fe=U.select("text");var Me=0,Ce=a&&q==="top",cr=!a&&q==="right",tr=0;if(Fe.node()&&!Fe.classed(bt.jsPlaceholder)){var De,Le=U.select(".h"+se._id+"title-math-group").node();Le&&(a&&Se||!a&&!Se)?(We=ui.bBox(Le),Me=We.width,De=We.height):(We=ui.bBox(U.node()),Me=We.right-b.l-(a?ie:_e),De=We.bottom-b.t-(a?_e:ie),!a&&q==="top"&&(ne+=We.height,tr=We.height)),cr&&(Fe.attr("transform",fi(Me/2+be/2,0)),Me*=2),ne=Math.max(ne,a?Me:De)}var Ye=(a?d:m)*2+ne+u+s/2,Ze=0;!a&&k.text&&h==="bottom"&&y<=0&&(Ze=Ye/2,Ye+=Ze,tr+=Ze),T._hColorbarMoveTitle=Ze,T._hColorbarMoveCBTitle=tr;var Ue=u+s,Oe=(a?ie:_e)-Ue/2-(a?d:0),Ke=(a?_e:ie)-(a?I:m+tr-Ze);e.select("."+bt.cbbg).attr("x",Oe).attr("y",Ke).attr(a?"width":"height",Math.max(Ye-Ze,2)).attr(a?"height":"width",Math.max(I+Ue,2)).call(r3.fill,f).call(r3.stroke,r.bordercolor).style("stroke-width",u);var fr=cr?Math.max(Me-10,0):0;e.selectAll("."+bt.cboutline).attr("x",(a?ie:_e+d)+fr).attr("y",(a?_e+m-I:ie)+(Ce?Re:0)).attr(a?"width":"height",Math.max(X,2)).attr(a?"height":"width",Math.max(I-(a?2*m+Re:2*d+fr),2)).call(r3.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var lr=a?me*Ye:0,ze=a?0:(1-pe)*Ye-tr;if(lr=_?b.l-lr:-lr,ze=w?b.t-ze:-ze,e.attr("transform",fi(lr,ze)),!a&&(u||j2(f).getAlpha()&&!j2.equals(T.paper_bgcolor,f))){var ae=ye.selectAll("text"),oe=ae[0].length,qe=e.select("."+bt.cbbg).node(),ke=ui.bBox(qe),ir=ui.getTranslate(e),vr=2;ae.each(function(pn,Ia){var ta=0,Ha=oe-1;if(Ia===ta||Ia===Ha){var yr=ui.bBox(this),ot=ui.getTranslate(this),Wr;if(Ia===Ha){var mt=yr.right+ot.x,Tt=ke.right+ir.x+_e-u-vr+g;Wr=Tt-mt,Wr>0&&(Wr=0)}else if(Ia===ta){var st=yr.left+ot.x,yt=ke.left+ir.x+_e+u+vr;Wr=yt-st,Wr<0&&(Wr=0)}Wr&&(oe<3?this.setAttribute("transform","translate("+Wr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var sr={},Mr=KE[v],Ur=QE[v],$r=KE[h],Vr=QE[h],St=Ye-X;a?(i==="pixels"?(sr.y=y,sr.t=I*$r,sr.b=I*Vr):(sr.t=sr.b=0,sr.yt=y+n*$r,sr.yb=y-n*Vr),o==="pixels"?(sr.x=g,sr.l=Ye*Mr,sr.r=Ye*Ur):(sr.l=St*Mr,sr.r=St*Ur,sr.xl=g-l*Mr,sr.xr=g+l*Ur)):(i==="pixels"?(sr.x=g,sr.l=I*Mr,sr.r=I*Ur):(sr.l=sr.r=0,sr.xl=g+n*Mr,sr.xr=g-n*Ur),o==="pixels"?(sr.y=1-y,sr.t=Ye*$r,sr.b=Ye*Vr):(sr.t=St*$r,sr.b=St*Vr,sr.yt=y-l*$r,sr.yb=y+l*Vr));var ea=r.y<.5?"b":"t",ka=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var ra={r:T.width-Oe-lr,l:Oe+sr.r,b:T.height-Ke-ze,t:Ke+sr.b};_&&w?Ud.autoMargin(t,r._id,sr):_?t._fullLayout._reservedMargin[r._id][ea]=ra[ea]:w||a?t._fullLayout._reservedMargin[r._id][ka]=ra[ka]:t._fullLayout._reservedMargin[r._id][ea]=ra[ea]}return Nn.syncOrAsync([Ud.previousPromises,Be,Ee,Ne,Ud.previousPromises,Je],t)}function pte(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,l,o,s;Yd.init({element:e.node(),gd:t,prepFn:function(){l=e.attr("transform"),e3(e)},moveFn:function(u,f){e.attr("transform",l+fi(u,f)),o=Yd.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Yd.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var v=Yd.getCursor(o,s,r.xanchor,r.yanchor);e3(e,v)},doneFn:function(){if(e3(e),o!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=o,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?XE.call("_guiRestyle",t,u,r._traceIndex):XE.call("_guiRelayout",t,u)}}})}function mte(e,r,t){var a=r._levels,n=[],i=[],l,o,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],v=1.001*t[1]-.001*t[0];for(o=0;o<1e5&&(l=a.start+o*u,!(u>0?l>=s:l<=s));o++)l>f&&l0?l>=s:l<=s));o++)l>t[0]&&l{"use strict";rP.exports={moduleType:"component",name:"colorbar",attributes:t0(),supplyDefaults:nm(),draw:eP().draw,hasColorbar:Zp()}});var nP=Z((Rce,aP)=>{"use strict";aP.exports={moduleType:"component",name:"legend",layoutAttributes:ry(),supplyLayoutDefaults:ny(),draw:my(),style:vy()}});var lP=Z((zce,iP)=>{"use strict";iP.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 sP=Z((Nce,oP)=>{"use strict";oP.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var n3=Z((Fce,vP)=>{"use strict";var gte=gr(),cP=He(),a3=cP.extendFlat,uP=cP.extendDeep;function fP(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function bte(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}vP.exports=function(r,t){var a,n=r.data,i=r.layout,l=uP([],n),o=uP({},i,fP(t.tileClass)),s=r._context||{};if(t.width&&(o.width=t.width),t.height&&(o.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){o.annotations=[];var u=Object.keys(o);for(a=0;a{"use strict";var xte=Yv().EventEmitter,_te=gr(),wte=He(),hP=Do(),Tte=n3(),Mte=Qh(),Ate=$h();function kte(e,r){var t=new xte,a=Tte(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var o=hP.getDelay(n._fullLayout);setTimeout(function(){var s=Mte(n),u=document.createElement("canvas");u.id=wte.randstr(),t=Ate({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},o)}var l=hP.getRedrawFunc(n);return _te.call("_doPlot",n,a.data,a.layout,a.config).then(l).then(i).catch(function(o){t.emit("error",o)}),t}dP.exports=kte});var gP=Z((Hce,yP)=>{"use strict";var mP=Do(),Cte={getDelay:mP.getDelay,getRedrawFunc:mP.getRedrawFunc,clone:n3(),toSVG:Qh(),svgToImg:$h(),toImage:pP(),downloadImage:Pg()};yP.exports=Cte});var xP=Z($i=>{"use strict";$i.version=tv().version;ub();j4();var Ste=gr(),yc=$i.register=Ste.register,l3=TC(),bP=Object.keys(l3);for(Gd=0;Gd{"use strict";_P.exports=xP()});var Wd=Z((Yce,TP)=>{"use strict";TP.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var gc=Z((Uce,CP)=>{"use strict";var wt=qo(),MP=r0().axisHoverFormat,Lte=zi().hovertemplateAttrs,qte=zi().texttemplateAttrs,kP=nf(),Dte=ha(),AP=Wd(),Ete=mi().pattern,Yo=Yt().extendFlat,o3=Dte({editType:"calc",arrayOk:!0,colorEditType:"style"}),Pte=wt.marker,Rte=Pte.line,zte=Yo({},Rte.width,{dflt:0}),Nte=Yo({width:zte,editType:"calc"},kP("marker.line")),Fte=Yo({line:Nte,editType:"calc"},kP("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Ete,cornerradius:{valType:"any",editType:"calc"}});CP.exports={x:wt.x,x0:wt.x0,dx:wt.dx,y:wt.y,y0:wt.y0,dy:wt.dy,xperiod:wt.xperiod,yperiod:wt.yperiod,xperiod0:wt.xperiod0,yperiod0:wt.yperiod0,xperiodalignment:wt.xperiodalignment,yperiodalignment:wt.yperiodalignment,xhoverformat:MP("x"),yhoverformat:MP("y"),text:wt.text,texttemplate:qte({editType:"plot"},{keys:AP.eventDataKeys}),hovertext:wt.hovertext,hovertemplate:Lte({},{keys:AP.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Yo({},o3,{}),insidetextfont:Yo({},o3,{}),outsidetextfont:Yo({},o3,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Yo({},wt.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:Fte,offsetgroup:wt.offsetgroup,alignmentgroup:wt.alignmentgroup,selected:{marker:{opacity:wt.selected.marker.opacity,color:wt.selected.marker.color,editType:"style"},textfont:wt.selected.textfont,editType:"style"},unselected:{marker:{opacity:wt.unselected.marker.opacity,color:wt.unselected.marker.color,editType:"style"},textfont:wt.unselected.textfont,editType:"style"},zorder:wt.zorder}});var s3=Z((Gce,SP)=>{"use strict";SP.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 EP=Z((Vce,DP)=>{"use strict";var Ite=Er(),LP=Tn().hasColorscale,qP=Ls(),Hte=He().coercePattern;DP.exports=function(r,t,a,n,i){var l=a("marker.color",n),o=LP(r,"marker");o&&qP(r,t,i,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Ite.defaultLine),LP(r,"marker.line")&&qP(r,t,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),Hte(a,"marker.pattern",l,o),a("selected.marker.color"),a("unselected.marker.color")}});var bc=Z((Wce,IP)=>{"use strict";var PP=Hr(),xu=He(),RP=Er(),Ote=gr(),Bte=Ng(),Yte=Fg(),Ute=EP(),Gte=Ig(),zP=gc(),Zd=xu.coerceFont;function Vte(e,r,t,a){function n(u,f){return xu.coerce(e,r,zP,u,f)}var i=Bte(e,r,a,n);if(!i){r.visible=!1;return}Yte(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var l=n("textposition");FP(e,r,a,n,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Ute(e,r,n,t,a);var o=(r.marker.line||{}).color,s=Ote.getComponentMethod("errorbars","supplyDefaults");s(e,r,o||RP.defaultLine,{axis:"y"}),s(e,r,o||RP.defaultLine,{axis:"x",inherit:"y"}),xu.coerceSelectionMarkerOpacity(r,n)}function Wte(e,r){var t,a;function n(o,s){return xu.coerce(a._input,a,zP,o,s)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&PP(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function FP(e,r,t,a,n,i){i=i||{};var l=i.moduleHasSelected!==!1,o=i.moduleHasUnselected!==!1,s=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,f=i.moduleHasTextangle!==!1,v=i.moduleHasInsideanchor!==!1,h=!!i.hasPathbar,d=Array.isArray(n)||n==="auto",m=d||n==="inside",g=d||n==="outside";if(m||g){var y=Zd(a,"textfont",t.font),w=xu.extendFlat({},y),_=e.textfont&&e.textfont.color,T=!_;if(T&&delete w.color,Zd(a,"insidetextfont",w),h){var b=xu.extendFlat({},y);T&&delete b.color,Zd(a,"pathbar.textfont",b)}g&&Zd(a,"outsidetextfont",y),l&&a("selected.textfont.color"),o&&a("unselected.textfont.color"),s&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}m&&v&&a("insidetextanchor")}IP.exports={supplyDefaults:Vte,crossTraceDefaults:Wte,handleText:FP,validateCornerradius:NP}});var OP=Z((Zce,HP)=>{"use strict";var Zte=gr(),Xte=dt(),Jte=He(),Kte=s3(),Qte=bc().validateCornerradius;HP.exports=function(e,r,t){function a(g,y){return Jte.coerce(e,r,Kte,g,y)}for(var n=!1,i=!1,l=!1,o={},s=a("barmode"),u=s==="group",f=0;f0&&!o[h]&&(l=!0),o[h]=!0),v.visible&&v.type==="histogram"){var d=Xte.getFromId({_fullLayout:r},v[v.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",i&&!l?0:.2),a("bargroupgap");var m=a("barcornerradius");r.barcornerradius=Qte(m)}});var u3=Z((Xce,BP)=>{"use strict";var _u=He();BP.exports=function(r,t){for(var a=0;a{"use strict";var YP=dt(),UP=Hg(),GP=Tn().hasColorscale,VP=i0(),$te=u3(),jte=Ug();WP.exports=function(r,t){var a=YP.getFromId(r,t.xaxis||"x"),n=YP.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f,v={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(i=a.makeCalcdata(t,"x",v),o=n.makeCalcdata(t,"y"),s=UP(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y",v),o=a.makeCalcdata(t,"x"),s=UP(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;for(var h=Math.min(l.length,i.length),d=new Array(h),m=0;m{"use strict";var eae=Ir(),rae=He();function tae(e,r,t){var a=e._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var i=a.uniformtext.mode==="hide",l;switch(t){case"funnelarea":case"pie":case"sunburst":l="g.slice";break;case"treemap":case"icicle":l="g.slice, g.pathbar";break;default:l="g.points > g.point"}r.selectAll(l).each(function(o){var s=o.transform;if(s){s.scale=i&&s.hide?0:n/s.fontSize;var u=eae.select(this).select("text");rae.setTransormAndDisplay(u,s)}})}}function aae(e,r,t){if(t.uniformtext.mode){var a=XP(e),n=t.uniformtext.minsize,i=r.scale*r.fontSize;r.hide=i{"use strict";var iae=Hr(),lae=bn(),KP=He().isArrayOrTypedArray;Uo.coerceString=function(e,r,t){if(typeof r=="string"){if(r||!e.noBlank)return r}else if((typeof r=="number"||r===!0)&&!e.strict)return String(r);return t!==void 0?t:e.dflt};Uo.coerceNumber=function(e,r,t){if(iae(r)){r=+r;var a=e.min,n=e.max,i=a!==void 0&&rn;if(!i)return r}return t!==void 0?t:e.dflt};Uo.coerceColor=function(e,r,t){return lae(r).isValid()?r:t!==void 0?t:e.dflt};Uo.coerceEnumerated=function(e,r,t){return e.coerceNumber&&(r=+r),e.values.indexOf(r)!==-1?r:t!==void 0?t:e.dflt};Uo.getValue=function(e,r){var t;return KP(e)?r{"use strict";var _c=Ir(),oae=Er(),wc=tt(),QP=He(),$P=gr(),jP=xc().resizeText,f3=gc(),sae=f3.textfont,uae=f3.insidetextfont,fae=f3.outsidetextfont,ya=Xd();function cae(e){var r=_c.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");jP(e,r,"bar");var t=r.size(),a=e._fullLayout;r.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(a.barmode==="stack"&&t>1||a.bargap===0&&a.bargroupgap===0&&!n[0].trace.marker.line.width)&&_c.select(this).attr("shape-rendering","crispEdges")}),r.selectAll("g.points").each(function(n){var i=_c.select(this),l=n[0].trace;eR(i,l,e)}),$P.getComponentMethod("errorbars","style")(r)}function eR(e,r,t){wc.pointStyle(e.selectAll("path"),r,t),rR(e,r,t)}function rR(e,r,t){e.selectAll("text").each(function(a){var n=_c.select(this),i=QP.ensureUniformFontSize(t,tR(n,a,r,t));wc.font(n,i)})}function vae(e,r,t){var a=r[0].trace;a.selectedpoints?hae(t,a,e):(eR(t,a,e),$P.getComponentMethod("errorbars","style")(t))}function hae(e,r,t){wc.selectedPointStyle(e.selectAll("path"),r),dae(e.selectAll("text"),r,t)}function dae(e,r,t){e.each(function(a){var n=_c.select(this),i;if(a.selected){i=QP.ensureUniformFontSize(t,tR(n,a,r,t));var l=r.selected.textfont&&r.selected.textfont.color;l&&(i.color=l),wc.font(n,i)}else wc.selectedTextStyle(n,r)})}function tR(e,r,t,a){var n=a._fullLayout.font,i=t.textfont;if(e.classed("bartext-inside")){var l=lR(r,t);i=nR(t,r.i,n,l)}else e.classed("bartext-outside")&&(i=iR(t,r.i,n));return i}function aR(e,r,t){return c3(sae,e.textfont,r,t)}function nR(e,r,t,a){var n=aR(e,r,t),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[r]===void 0;return i&&(n={color:oae.contrast(a),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),c3(uae,e.insidetextfont,r,n)}function iR(e,r,t){var a=aR(e,r,t);return c3(fae,e.outsidetextfont,r,a)}function c3(e,r,t,a){r=r||{};var n=ya.getValue(r.family,t),i=ya.getValue(r.size,t),l=ya.getValue(r.color,t),o=ya.getValue(r.weight,t),s=ya.getValue(r.style,t),u=ya.getValue(r.variant,t),f=ya.getValue(r.textcase,t),v=ya.getValue(r.lineposition,t),h=ya.getValue(r.shadow,t);return{family:ya.coerceString(e.family,n,a.family),size:ya.coerceNumber(e.size,i,a.size),color:ya.coerceColor(e.color,l,a.color),weight:ya.coerceString(e.weight,o,a.weight),style:ya.coerceString(e.style,s,a.style),variant:ya.coerceString(e.variant,u,a.variant),textcase:ya.coerceString(e.variant,f,a.textcase),lineposition:ya.coerceString(e.variant,v,a.lineposition),shadow:ya.coerceString(e.variant,h,a.shadow)}}function lR(e,r){return r.type==="waterfall"?r[e.dir].marker.color:e.mcc||e.mc||r.marker.color}oR.exports={style:cae,styleTextPoints:rR,styleOnSelect:vae,getInsideTextFont:nR,getOutsideTextFont:iR,getBarColor:lR,resizeText:jP}});var mR=Z((jce,pR)=>{"use strict";var Kd=Ir(),Qd=Hr(),la=He(),pae=xa(),mae=Er(),Fl=tt(),yae=gr(),$d=dt().tickText,sR=xc(),gae=sR.recordMinTextSize,bae=sR.clearMinTextSize,v3=Jd(),wu=Xd(),xae=Wd(),uR=gc(),_ae=uR.text,wae=uR.textposition,Tae=bi().appendArrayPointValue,Fa=xae.TEXTPAD;function Mae(e){return e.id}function Aae(e){if(e.ids)return Mae}function h3(e){return(e>0)-(e<0)}function Ei(e,r){return e0}function Cae(e,r,t,a,n,i){var l=r.xaxis,o=r.yaxis,s=e._fullLayout,u=e._context.staticPlot;n||(n={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},bae("bar",s));var f=la.makeTraceGroups(a,t,"trace bars").each(function(v){var h=Kd.select(this),d=v[0].trace,m=v[0].t,g=d.type==="waterfall",y=d.type==="funnel",w=d.type==="histogram",_=d.type==="bar",T=_||y,b=0;g&&d.connector.visible&&d.connector.mode==="between"&&(b=d.connector.line.width/2);var A=d.orientation==="h",S=cR(n),k=la.ensureSingle(h,"g","points"),q=Aae(d),D=k.selectAll("g.point").data(la.identity,q);D.enter().append("g").classed("point",!0),D.exit().remove(),D.each(function(z,N){var H=Kd.select(this),O=kae(z,l,o,A),J=O[0][0],X=O[0][1],B=O[1][0],I=O[1][1],V=(A?X-J:I-B)===0;V&&T&&wu.getLineWidth(d,z)&&(V=!1),V||(V=!Qd(J)||!Qd(X)||!Qd(B)||!Qd(I)),z.isBlank=V,V&&(A?X=J:I=B),b&&!V&&(A?(J-=Ei(J,X)*b,X+=Ei(J,X)*b):(B-=Ei(B,I)*b,I+=Ei(B,I)*b));var K,Q;if(d.type==="waterfall"){if(!V){var ie=d[z.dir].marker;K=ie.line.width,Q=ie.color}}else K=wu.getLineWidth(d,z),Q=z.mc||d.marker.color;function me(ne){var Me=Kd.round(K/2%1,2);return n.gap===0&&n.groupgap===0?Kd.round(Math.round(ne)-Me,2):ne}function pe(ne,Me,Ce){return Ce&&ne===Me?ne:Math.abs(ne-Me)>=2?me(ne):ne>Me?Math.ceil(ne):Math.floor(ne)}var ge=mae.opacity(Q),j=ge<1||K>.01?me:pe;e._context.staticPlot||(J=j(J,X,A),X=j(X,J,A),B=j(B,I,!A),I=j(I,B,!A));var _e=A?l.c2p:o.c2p,se;z.s0>0?se=z._sMax:z.s0<0?se=z._sMin:se=z.s1>0?z._sMax:z._sMin;function Se(ne,Me){if(!ne)return 0;var Ce=Math.abs(A?I-B:X-J),cr=Math.abs(A?X-J:I-B),tr=j(Math.abs(_e(se,!0)-_e(0,!0))),De=z.hasB?Math.min(Ce/2,cr/2):Math.min(Ce/2,tr),Le;if(Me==="%"){var Ye=Math.min(50,ne);Le=Ce*(Ye/100)}else Le=ne;return j(Math.max(Math.min(Le,De),0))}var ve=_||w?Se(m.cornerradiusvalue,m.cornerradiusform):0,Ae,Y,re="M"+J+","+B+"V"+I+"H"+X+"V"+B+"Z",U=0;if(ve&&z.s){var de=h3(z.s0)===0||h3(z.s)===h3(z.s0)?z.s1:z.s0;if(U=j(z.hasB?0:Math.abs(_e(se,!0)-_e(de,!0))),U0?Math.sqrt(U*(2*ve-U)):0,Ie=be>0?Math.max:Math.min;Ae="M"+J+","+B+"V"+(I-Re*ye)+"H"+Ie(X-(ve-U)*be,J)+"A "+ve+","+ve+" 0 0 "+Fe+" "+X+","+(I-ve*ye-Pe)+"V"+(B+ve*ye+Pe)+"A "+ve+","+ve+" 0 0 "+Fe+" "+Ie(X-(ve-U)*be,J)+","+(B+Re*ye)+"Z"}else if(z.hasB)Ae="M"+(J+ve*be)+","+B+"A "+ve+","+ve+" 0 0 "+Fe+" "+J+","+(B+ve*ye)+"V"+(I-ve*ye)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(J+ve*be)+","+I+"H"+(X-ve*be)+"A "+ve+","+ve+" 0 0 "+Fe+" "+X+","+(I-ve*ye)+"V"+(B+ve*ye)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(X-ve*be)+","+B+"Z";else{Y=Math.abs(I-B)+U;var Be=Y0?Math.sqrt(U*(2*ve-U)):0,Ee=ye>0?Math.max:Math.min;Ae="M"+(J+Be*be)+","+B+"V"+Ee(I-(ve-U)*ye,B)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(J+ve*be-Ne)+","+I+"H"+(X-ve*be+Ne)+"A "+ve+","+ve+" 0 0 "+Fe+" "+(X-Be*be)+","+Ee(I-(ve-U)*ye,B)+"V"+B+"Z"}}else Ae=re}else Ae=re;var Je=fR(la.ensureSingle(H,"path"),s,n,i);if(Je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((X-J)*(I-B))||V&&e._context.staticPlot?"M0,0Z":Ae).call(Fl.setClipUrl,r.layerClipId,e),!s.uniformtext.mode&&S){var We=Fl.makePointStyleFns(d);Fl.singlePointStyle(z,Je,d,We,e)}Sae(e,r,H,v,N,J,X,B,I,ve,U,n,i),r.layerClipId&&Fl.hideOutsideRangePoint(z,H.select("text"),l,o,d.xcalendar,d.ycalendar)});var R=d.cliponaxis===!1;Fl.setClipUrl(h,R?null:r.layerClipId,e)});yae.getComponentMethod("errorbars","plot")(e,f,r,n)}function Sae(e,r,t,a,n,i,l,o,s,u,f,v,h){var d=r.xaxis,m=r.yaxis,g=e._fullLayout,y;function w(Y,re,U){var de=la.ensureSingle(Y,"text").text(re).attr({class:"bartext bartext-"+y,"text-anchor":"middle","data-notex":1}).call(Fl.font,U).call(pae.convertToTspans,e);return de}var _=a[0].trace,T=_.orientation==="h",b=Dae(g,a,n,d,m);y=Eae(_,n);var A=v.mode==="stack"||v.mode==="relative",S=a[n],k=!A||S._outmost,q=S.hasB,D=u&&u-f>Fa;if(!b||y==="none"||(S.isBlank||i===l||o===s)&&(y==="auto"||y==="inside")){t.select("text").remove();return}var R=g.font,z=v3.getBarColor(a[n],_),N=v3.getInsideTextFont(_,n,R,z),H=v3.getOutsideTextFont(_,n,R),O=_.insidetextanchor||"end",J=t.datum();T?d.type==="log"&&J.s0<=0&&(d.range[0]0&&me>0,j;D?q?j=Go(I-2*u,V,ie,me,T)||Go(I,V-2*u,ie,me,T):T?j=Go(I-(u-f),V,ie,me,T)||Go(I,V-2*(u-f),ie,me,T):j=Go(I,V-(u-f),ie,me,T)||Go(I-2*(u-f),V,ie,me,T):j=Go(I,V,ie,me,T),ge&&j?y="inside":(y="outside",K.remove(),K=null)}else y="inside";if(!K){pe=la.ensureUniformFontSize(e,y==="outside"?H:N),K=w(t,b,pe);var _e=K.attr("transform");if(K.attr("transform",""),Q=Fl.bBox(K.node()),ie=Q.width,me=Q.height,K.attr("transform",_e),ie<=0||me<=0){K.remove();return}}var se=_.textangle,Se,ve;y==="outside"?(ve=_.constraintext==="both"||_.constraintext==="outside",Se=qae(i,l,o,s,Q,{isHorizontal:T,constrained:ve,angle:se})):(ve=_.constraintext==="both"||_.constraintext==="inside",Se=dR(i,l,o,s,Q,{isHorizontal:T,constrained:ve,angle:se,anchor:O,hasB:q,r:u,overhead:f})),Se.fontSize=pe.size,gae(_.type==="histogram"?"bar":_.type,Se,g),S.transform=Se;var Ae=fR(K,g,v,h);la.setTransormAndDisplay(Ae,Se)}function Go(e,r,t,a,n){if(e<0||r<0)return!1;var i=t<=e&&a<=r,l=t<=r&&a<=e,o=n?e>=t*(r/a):r>=a*(e/t);return i||l||o}function vR(e){return e==="auto"?0:e}function hR(e,r){var t=Math.PI/180*r,a=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t));return{x:e.width*n+e.height*a,y:e.width*a+e.height*n}}function dR(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=i.anchor,f=u==="end",v=u==="start",h=i.leftToRight||0,d=(h+1)/2,m=1-d,g=i.hasB,y=i.r,w=i.overhead,_=n.width,T=n.height,b=Math.abs(r-e),A=Math.abs(a-t),S=b>2*Fa&&A>2*Fa?Fa:0;b-=2*S,A-=2*S;var k=vR(s);s==="auto"&&!(_<=b&&T<=A)&&(_>b||T>A)&&(!(_>A||T>b)||_Fa){var z=Lae(e,r,t,a,q,y,w,l,g);D=z.scale,R=z.pad}else D=1,o&&(D=Math.min(1,b/q.x,A/q.y)),R=0;var N=n.left*m+n.right*d,H=(n.top+n.bottom)/2,O=(e+Fa)*m+(r-Fa)*d,J=(t+a)/2,X=0,B=0;if(v||f){var I=(l?q.x:q.y)/2;y&&(f||g)&&(S+=R);var V=l?Ei(e,r):Ei(t,a);l?v?(O=e+V*S,X=-V*I):(O=r-V*S,X=V*I):v?(J=t+V*S,B=-V*I):(J=a-V*S,B=V*I)}return{textX:N,textY:H,targetX:O,targetY:J,anchorX:X,anchorY:B,scale:D,rotate:k}}function Lae(e,r,t,a,n,i,l,o,s){var u=Math.max(0,Math.abs(r-e)-2*Fa),f=Math.max(0,Math.abs(a-t)-2*Fa),v=i-Fa,h=l?v-Math.sqrt(v*v-(v-l)*(v-l)):v,d=s?v*2:o?v-l:2*h,m=s?v*2:o?2*h:v-l,g,y,w,_,T;return n.y/n.x>=f/(u-d)?_=f/n.y:n.y/n.x<=(f-m)/u?_=u/n.x:!s&&o?(g=n.x*n.x+n.y*n.y/4,y=-2*n.x*(u-v)-n.y*(f/2-v),w=(u-v)*(u-v)+(f/2-v)*(f/2-v)-v*v,_=(-y+Math.sqrt(y*y-4*g*w))/(2*g)):s?(g=(n.x*n.x+n.y*n.y)/4,y=-n.x*(u/2-v)-n.y*(f/2-v),w=(u/2-v)*(u/2-v)+(f/2-v)*(f/2-v)-v*v,_=(-y+Math.sqrt(y*y-4*g*w))/(2*g)):(g=n.x*n.x/4+n.y*n.y,y=-n.x*(u/2-v)-2*n.y*(f-v),w=(u/2-v)*(u/2-v)+(f-v)*(f-v)-v*v,_=(-y+Math.sqrt(y*y-4*g*w))/(2*g)),_=Math.min(1,_),o?T=Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(f-n.y*_)/2)*(v-(f-n.y*_)/2)))-l):T=Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(u-n.x*_)/2)*(v-(u-n.x*_)/2)))-l),{scale:_,pad:T}}function qae(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=n.width,f=n.height,v=Math.abs(r-e),h=Math.abs(a-t),d;l?d=h>2*Fa?Fa:0:d=v>2*Fa?Fa:0;var m=1;o&&(m=l?Math.min(1,h/f):Math.min(1,v/u));var g=vR(s),y=hR(n,g),w=(l?y.x:y.y)/2,_=(n.left+n.right)/2,T=(n.top+n.bottom)/2,b=(e+r)/2,A=(t+a)/2,S=0,k=0,q=l?Ei(r,e):Ei(t,a);return l?(b=r-q*d,S=q*w):(A=a+q*d,k=-q*w),{textX:_,textY:T,targetX:b,targetY:A,anchorX:S,anchorY:k,scale:m,rotate:g}}function Dae(e,r,t,a,n){var i=r[0].trace,l=i.texttemplate,o;return l?o=Pae(e,r,t,a,n):i.textinfo?o=Rae(r,t,a,n):o=wu.getValue(i.text,t),wu.coerceString(_ae,o)}function Eae(e,r){var t=wu.getValue(e.textposition,r);return wu.coerceEnumerated(wae,t)}function Pae(e,r,t,a,n){var i=r[0].trace,l=la.castOption(i,t,"texttemplate");if(!l)return"";var o=i.type==="histogram",s=i.type==="waterfall",u=i.type==="funnel",f=i.orientation==="h",v,h,d,m;f?(v="y",h=n,d="x",m=a):(v="x",h=a,d="y",m=n);function g(S){return $d(h,h.c2l(S),!0).text}function y(S){return $d(m,m.c2l(S),!0).text}var w=r[t],_={};_.label=w.p,_.labelLabel=_[v+"Label"]=g(w.p);var T=la.castOption(i,w.i,"text");(T===0||T)&&(_.text=T),_.value=w.s,_.valueLabel=_[d+"Label"]=y(w.s);var b={};Tae(b,i,w.i),(o||b.x===void 0)&&(b.x=f?_.value:_.label),(o||b.y===void 0)&&(b.y=f?_.label:_.value),(o||b.xLabel===void 0)&&(b.xLabel=f?_.valueLabel:_.labelLabel),(o||b.yLabel===void 0)&&(b.yLabel=f?_.labelLabel:_.valueLabel),s&&(_.delta=+w.rawS||w.s,_.deltaLabel=y(_.delta),_.final=w.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),u&&(_.value=w.s,_.valueLabel=y(_.value),_.percentInitial=w.begR,_.percentInitialLabel=la.formatPercent(w.begR),_.percentPrevious=w.difR,_.percentPreviousLabel=la.formatPercent(w.difR),_.percentTotal=w.sumR,_.percenTotalLabel=la.formatPercent(w.sumR));var A=la.castOption(i,w.i,"customdata");return A&&(_.customdata=A),la.texttemplateString(l,_,e._d3locale,b,_,i._meta||{})}function Rae(e,r,t,a){var n=e[0].trace,i=n.orientation==="h",l=n.type==="waterfall",o=n.type==="funnel";function s(A){var S=i?a:t;return $d(S,A,!0).text}function u(A){var S=i?t:a;return $d(S,+A,!0).text}var f=n.textinfo,v=e[r],h=f.split("+"),d=[],m,g=function(A){return h.indexOf(A)!==-1};if(g("label")&&d.push(s(e[r].p)),g("text")&&(m=la.castOption(n,v.i,"text"),(m===0||m)&&d.push(m)),l){var y=+v.rawS||v.s,w=v.v,_=w-y;g("initial")&&d.push(u(_)),g("delta")&&d.push(u(y)),g("final")&&d.push(u(w))}if(o){g("value")&&d.push(u(v.s));var T=0;g("percent initial")&&T++,g("percent previous")&&T++,g("percent total")&&T++;var b=T>1;g("percent initial")&&(m=la.formatPercent(v.begR),b&&(m+=" of initial"),d.push(m)),g("percent previous")&&(m=la.formatPercent(v.difR),b&&(m+=" of previous"),d.push(m)),g("percent total")&&(m=la.formatPercent(v.sumR),b&&(m+=" of total"),d.push(m))}return d.join("
")}pR.exports={plot:Cae,toMoveInsideBar:dR}});var _R=Z((eve,xR)=>{"use strict";var Tc=ki(),zae=gr(),yR=Er(),Nae=He().fillText,Fae=Xd().getLineWidth,d3=dt().hoverLabelText,Iae=Bt().BADNUM;function Hae(e,r,t,a,n){var i=gR(e,r,t,a,n);if(i){var l=i.cd,o=l[0].trace,s=l[i.index];return i.color=bR(o,s),zae.getComponentMethod("errorbars","hoverInfo")(s,o,i),[i]}}function gR(e,r,t,a,n){var i=e.cd,l=i[0].trace,o=i[0].t,s=a==="closest",u=l.type==="waterfall",f=e.maxHoverDistance,v=e.maxSpikeDistance,h,d,m,g,y,w,_;l.orientation==="h"?(h=t,d=r,m="y",g="x",y=J,w=N):(h=r,d=t,m="x",g="y",w=J,y=N);var T=l[m+"period"],b=s||T;function A(j){return k(j,-1)}function S(j){return k(j,1)}function k(j,_e){var se=j.w;return j[m]+_e*se/2}function q(j){return j[m+"End"]-j[m+"Start"]}var D=s?A:T?function(j){return j.p-q(j)/2}:function(j){return Math.min(A(j),j.p-o.bardelta/2)},R=s?S:T?function(j){return j.p+q(j)/2}:function(j){return Math.max(S(j),j.p+o.bardelta/2)};function z(j,_e,se){return n.finiteRange&&(se=0),Tc.inbox(j-h,_e-h,se+Math.min(1,Math.abs(_e-j)/_)-1)}function N(j){return z(D(j),R(j),f)}function H(j){return z(A(j),S(j),v)}function O(j){var _e=j[g];if(u){var se=Math.abs(j.rawS)||0;d>0?_e+=se:d<0&&(_e-=se)}return _e}function J(j){var _e=d,se=j.b,Se=O(j);return Tc.inbox(se-_e,Se-_e,f+(Se-_e)/(Se-se)-1)}function X(j){var _e=d,se=j.b,Se=O(j);return Tc.inbox(se-_e,Se-_e,v+(Se-_e)/(Se-se)-1)}var B=e[m+"a"],I=e[g+"a"];_=Math.abs(B.r2c(B.range[1])-B.r2c(B.range[0]));function V(j){return(y(j)+w(j))/2}var K=Tc.getDistanceFunction(a,y,w,V);if(Tc.getClosest(i,K,e),e.index!==!1&&i[e.index].p!==Iae){b||(D=function(j){return Math.min(A(j),j.p-o.bargroupwidth/2)},R=function(j){return Math.max(S(j),j.p+o.bargroupwidth/2)});var Q=e.index,ie=i[Q],me=l.base?ie.b+ie.s:ie.s;e[g+"0"]=e[g+"1"]=I.c2p(ie[g],!0),e[g+"LabelVal"]=me;var pe=o.extents[o.extents.round(ie.p)];e[m+"0"]=B.c2p(s?D(ie):pe[0],!0),e[m+"1"]=B.c2p(s?R(ie):pe[1],!0);var ge=ie.orig_p!==void 0;return e[m+"LabelVal"]=ge?ie.orig_p:ie.p,e.labelLabel=d3(B,e[m+"LabelVal"],l[m+"hoverformat"]),e.valueLabel=d3(I,e[g+"LabelVal"],l[g+"hoverformat"]),e.baseLabel=d3(I,ie.b,l[g+"hoverformat"]),e.spikeDistance=(X(ie)+H(ie))/2,e[m+"Spike"]=B.c2p(ie.p,!0),Nae(ie,l,e),e.hovertemplate=l.hovertemplate,e}}function bR(e,r){var t=r.mcc||e.marker.color,a=r.mlcc||e.marker.line.color,n=Fae(e,r);if(yR.opacity(t))return t;if(yR.opacity(a)&&n)return a}xR.exports={hoverPoints:Hae,hoverOnBars:gR,getTraceColor:bR}});var TR=Z((rve,wR)=>{"use strict";wR.exports=function(r,t,a){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),a.orientation==="h"?(r.label=r.y,r.value=r.x):(r.label=r.x,r.value=r.y),r}});var AR=Z((tve,MR)=>{"use strict";MR.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=a[0].trace,o=l.type==="funnel",s=l.orientation==="h",u=[],f;if(t===!1)for(f=0;f{"use strict";kR.exports={attributes:gc(),layoutAttributes:s3(),supplyDefaults:bc().supplyDefaults,crossTraceDefaults:bc().crossTraceDefaults,supplyLayoutDefaults:OP(),calc:ZP(),crossTraceCalc:jg().crossTraceCalc,colorbar:t2(),arraysToCalcdata:u3(),plot:mR().plot,style:Jd().style,styleOnSelect:Jd().styleOnSelect,hoverPoints:_R().hoverPoints,eventData:TR(),selectPoints:AR(),moduleType:"trace",name:"bar",basePlotModule:bd(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var LR=Z((nve,SR)=>{"use strict";SR.exports=CR()});var p3=Z((ive,qR)=>{"use strict";var Bae=Gn(),Yae=Od().attributes,Uae=ha(),Gae=hi(),Vae=zi().hovertemplateAttrs,Wae=zi().texttemplateAttrs,Mc=Yt().extendFlat,Zae=mi().pattern,jd=Uae({editType:"plot",arrayOk:!0,colorEditType:"plot"});qR.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:Gae.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:Zae,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:Mc({},Bae.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:Vae({},{keys:["label","color","value","percent","text"]}),texttemplate:Wae({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:Mc({},jd,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:Mc({},jd,{}),outsidetextfont:Mc({},jd,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:Mc({},jd,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:Yae({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 RR=Z((lve,PR)=>{"use strict";var Xae=Hr(),Ac=He(),Jae=p3(),Kae=Od().defaults,Qae=bc().handleText,$ae=He().coercePattern;function DR(e,r){var t=Ac.isArrayOrTypedArray(e),a=Ac.isArrayOrTypedArray(r),n=Math.min(t?e.length:1/0,a?r.length:1/0);if(isFinite(n)||(n=0),n&&a){for(var i,l=0;l0){i=!0;break}}i||(n=0)}return{hasLabels:t,hasValues:a,len:n}}function ER(e,r,t,a,n){var i=a("marker.line.width");i&&a("marker.line.color",n?void 0:t.paper_bgcolor);var l=a("marker.colors");$ae(a,"marker.pattern",l),e.marker&&!r.marker.pattern.fgcolor&&(r.marker.pattern.fgcolor=e.marker.colors),r.marker.pattern.bgcolor||(r.marker.pattern.bgcolor=t.paper_bgcolor)}function jae(e,r,t,a){function n(_,T){return Ac.coerce(e,r,Jae,_,T)}var i=n("labels"),l=n("values"),o=DR(i,l),s=o.len;if(r._hasLabels=o.hasLabels,r._hasValues=o.hasValues,!r._hasLabels&&r._hasValues&&(n("label0"),n("dlabel")),!s){r.visible=!1;return}r._length=s,ER(e,r,a,n,!0),n("scalegroup");var u=n("text"),f=n("texttemplate"),v;if(f||(v=n("textinfo",Ac.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||v&&v!=="none"){var h=n("textposition");Qae(e,r,a,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",m=d||h==="outside";m&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else v==="none"&&n("textposition","none");Kae(r,a,n);var g=n("hole"),y=n("title.text");if(y){var w=n("title.position",g?"middle center":"top center");!g&&w==="middle center"&&(r.title.position="top center"),Ac.coerceFont(n,"title.font",a.font)}n("sort"),n("direction"),n("rotation"),n("pull")}PR.exports={handleLabelsAndValues:DR,handleMarkerDefaults:ER,supplyDefaults:jae}});var m3=Z((ove,zR)=>{"use strict";zR.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var FR=Z((sve,NR)=>{"use strict";var ene=He(),rne=m3();NR.exports=function(r,t){function a(n,i){return ene.coerce(r,t,rne,n,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}});var g3=Z((uve,OR)=>{"use strict";var tne=Hr(),y3=bn(),ane=Er(),nne={};function ine(e,r){var t=[],a=e._fullLayout,n=a.hiddenlabels||[],i=r.labels,l=r.marker.colors||[],o=r.values,s=r._length,u=r._hasValues&&s,f,v;if(r.dlabel)for(i=new Array(s),f=0;f=0});var b=r.type==="funnelarea"?g:r.sort;return b&&t.sort(function(A,S){return S.v-A.v}),t[0]&&(t[0].vTotal=m),t}function IR(e){return function(t,a){return!t||(t=y3(t),!t.isValid())?!1:(t=ane.addOpacity(t,t.getAlpha()),e[a]||(e[a]=t),t)}}function lne(e,r){var t=(r||{}).type;t||(t="pie");var a=e._fullLayout,n=e.calcdata,i=a[t+"colorway"],l=a["_"+t+"colormap"];a["extend"+t+"colors"]&&(i=HR(i,nne));for(var o=0,s=0;s{"use strict";var one=bi().appendArrayMultiPointValues;BR.exports=function(r,t){var a={curveNumber:t.index,pointNumbers:r.pts,data:t._input,fullData:t,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return r.pts.length===1&&(a.pointNumber=a.i=r.pts[0]),one(a,t,r.pts),t.type==="funnelarea"&&(delete a.v,delete a.i),a}});var fz=Z((cve,uz)=>{"use strict";var an=Ir(),sne=Pt(),e1=ki(),XR=Er(),ji=tt(),ga=He(),une=ga.strScale,UR=ga.strTranslate,b3=xa(),JR=xc(),fne=JR.recordMinTextSize,cne=JR.clearMinTextSize,KR=Wd().TEXTPAD,wr=H0(),r1=YR(),GR=He().isValidTextValue;function vne(e,r){var t=e._context.staticPlot,a=e._fullLayout,n=a._size;cne("pie",a),jR(r,e),lz(r,n);var i=ga.makeTraceGroups(a._pielayer,r,"trace").each(function(l){var o=an.select(this),s=l[0],u=s.trace;_ne(l),o.attr("stroke-linejoin","round"),o.each(function(){var f=an.select(this).selectAll("g.slice").data(l);f.enter().append("g").classed("slice",!0),f.exit().remove();var v=[[[],[]],[[],[]]],h=!1;f.each(function(b,A){if(b.hidden){an.select(this).selectAll("path,g").remove();return}b.pointNumber=b.i,b.curveNumber=u.index,v[b.pxmid[1]<0?0:1][b.pxmid[0]<0?0:1].push(b);var S=s.cx,k=s.cy,q=an.select(this),D=q.selectAll("path.surface").data([b]);if(D.enter().append("path").classed("surface",!0).style({"pointer-events":t?"none":"all"}),q.call(QR,e,l),u.pull){var R=+wr.castOption(u.pull,b.pts)||0;R>0&&(S+=R*b.pxmid[0],k+=R*b.pxmid[1])}b.cxFinal=S,b.cyFinal=k;function z(I,V,K,Q){var ie=Q*(V[0]-I[0]),me=Q*(V[1]-I[1]);return"a"+Q*s.r+","+Q*s.r+" 0 "+b.largeArc+(K?" 1 ":" 0 ")+ie+","+me}var N=u.hole;if(b.v===s.vTotal){var H="M"+(S+b.px0[0])+","+(k+b.px0[1])+z(b.px0,b.pxmid,!0,1)+z(b.pxmid,b.px0,!0,1)+"Z";N?D.attr("d","M"+(S+N*b.px0[0])+","+(k+N*b.px0[1])+z(b.px0,b.pxmid,!1,N)+z(b.pxmid,b.px0,!1,N)+"Z"+H):D.attr("d",H)}else{var O=z(b.px0,b.px1,!0,1);if(N){var J=1-N;D.attr("d","M"+(S+N*b.px1[0])+","+(k+N*b.px1[1])+z(b.px1,b.px0,!1,N)+"l"+J*b.px0[0]+","+J*b.px0[1]+O+"Z")}else D.attr("d","M"+S+","+k+"l"+b.px0[0]+","+b.px0[1]+O+"Z")}oz(e,b,s);var X=wr.castOption(u.textposition,b.pts),B=q.selectAll("g.slicetext").data(b.text&&X!=="none"?[0]:[]);B.enter().append("g").classed("slicetext",!0),B.exit().remove(),B.each(function(){var I=ga.ensureSingle(an.select(this),"text","",function(j){j.attr("data-notex",1)}),V=ga.ensureUniformFontSize(e,X==="outside"?dne(u,b,a.font):$R(u,b,a.font));I.text(b.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(ji.font,V).call(b3.convertToTspans,e);var K=ji.bBox(I.node()),Q;if(X==="outside")Q=ZR(K,b);else if(Q=ez(K,b,s),X==="auto"&&Q.scale<1){var ie=ga.ensureUniformFontSize(e,u.outsidetextfont);I.call(ji.font,ie),K=ji.bBox(I.node()),Q=ZR(K,b)}var me=Q.textPosAngle,pe=me===void 0?b.pxmid:t1(s.r,me);if(Q.targetX=S+pe[0]*Q.rCenter+(Q.x||0),Q.targetY=k+pe[1]*Q.rCenter+(Q.y||0),sz(Q,K),Q.outside){var ge=Q.targetY;b.yLabelMin=ge-K.height/2,b.yLabelMid=ge,b.yLabelMax=ge+K.height/2,b.labelExtraX=0,b.labelExtraY=0,h=!0}Q.fontSize=V.size,fne(u.type,Q,a),l[A].transform=Q,ga.setTransormAndDisplay(I,Q)})});var d=an.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 b=ga.ensureSingle(an.select(this),"text","",function(k){k.attr("data-notex",1)}),A=u.title.text;u._meta&&(A=ga.templateString(A,u._meta)),b.text(A).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(ji.font,u.title.font).call(b3.convertToTspans,e);var S;u.title.position==="middle center"?S=yne(s):S=nz(s,n),b.attr("transform",UR(S.x,S.y)+une(Math.min(1,S.scale))+UR(S.tx,S.ty))}),h&&bne(v,u),hne(f,u),h&&u.automargin){var m=ji.bBox(o.node()),g=u.domain,y=n.w*(g.x[1]-g.x[0]),w=n.h*(g.y[1]-g.y[0]),_=(.5*y-s.r)/n.w,T=(.5*w-s.r)/n.h;sne.autoMargin(e,"pie."+u.uid+".automargin",{xl:g.x[0]-_,xr:g.x[1]+_,yb:g.y[0]-T,yt:g.y[1]+T,l:Math.max(s.cx-s.r-m.left,0),r:Math.max(m.right-(s.cx+s.r),0),b:Math.max(m.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-m.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var l=an.select(this);l.attr("dy")&&l.attr("dy",l.attr("dy"))})},0)}function hne(e,r){e.each(function(t){var a=an.select(this);if(!t.labelExtraX&&!t.labelExtraY){a.select("path.textline").remove();return}var n=a.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,ga.setTransormAndDisplay(n,t.transform);var i=t.cxFinal+t.pxmid[0],l=t.cyFinal+t.pxmid[1],o="M"+i+","+l,s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var u=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(u)>Math.abs(f)?o+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+s):o+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+s}else o+="V"+(t.yLabelMid+t.labelExtraY)+"h"+s;ga.ensureSingle(a,"path","textline").call(XR.stroke,r.outsidetextfont.color).attr({"stroke-width":Math.min(2,r.outsidetextfont.size/8),d:o,fill:"none"})})}function QR(e,r,t){var a=t[0],n=a.cx,i=a.cy,l=a.trace,o=l.type==="funnelarea";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1),e.on("mouseover",function(s){var u=r._fullLayout,f=r._fullData[l.index];if(!(r._dragging||u.hovermode===!1)){var v=f.hoverinfo;if(Array.isArray(v)&&(v=e1.castHoverinfo({hoverinfo:[wr.castOption(v,s.pts)],_module:l._module},u,0)),v==="all"&&(v="label+text+value+percent+name"),f.hovertemplate||v!=="none"&&v!=="skip"&&v){var h=s.rInscribed||0,d=n+s.pxmid[0]*(1-h),m=i+s.pxmid[1]*(1-h),g=u.separators,y=[];if(v&&v.indexOf("label")!==-1&&y.push(s.label),s.text=wr.castOption(f.hovertext||f.text,s.pts),v&&v.indexOf("text")!==-1){var w=s.text;ga.isValidTextValue(w)&&y.push(w)}s.value=s.v,s.valueLabel=wr.formatPieValue(s.v,g),v&&v.indexOf("value")!==-1&&y.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=wr.formatPiePercent(s.percent,g),v&&v.indexOf("percent")!==-1&&y.push(s.percentLabel);var _=f.hoverlabel,T=_.font,b=[];e1.loneHover({trace:l,x0:d-h*a.r,x1:d+h*a.r,y:m,_x0:o?n+s.TL[0]:d-h*a.r,_x1:o?n+s.TR[0]:d+h*a.r,_y0:o?i+s.TL[1]:m-h*a.r,_y1:o?i+s.BL[1]:m+h*a.r,text:y.join("
"),name:f.hovertemplate||v.indexOf("name")!==-1?f.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:wr.castOption(_.bgcolor,s.pts)||s.color,borderColor:wr.castOption(_.bordercolor,s.pts),fontFamily:wr.castOption(T.family,s.pts),fontSize:wr.castOption(T.size,s.pts),fontColor:wr.castOption(T.color,s.pts),nameLength:wr.castOption(_.namelength,s.pts),textAlign:wr.castOption(_.align,s.pts),hovertemplate:wr.castOption(f.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[r1(s,f)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:r,inOut_bbox:b}),s.bbox=b[0],l._hasHoverLabel=!0}l._hasHoverEvent=!0,r.emit("plotly_hover",{points:[r1(s,f)],event:an.event})}}),e.on("mouseout",function(s){var u=r._fullLayout,f=r._fullData[l.index],v=an.select(this).datum();l._hasHoverEvent&&(s.originalEvent=an.event,r.emit("plotly_unhover",{points:[r1(v,f)],event:an.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(e1.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1)}),e.on("click",function(s){var u=r._fullLayout,f=r._fullData[l.index];r._dragging||u.hovermode===!1||(r._hoverdata=[r1(s,f)],e1.click(r,an.event))})}function dne(e,r,t){var a=wr.castOption(e.outsidetextfont.color,r.pts)||wr.castOption(e.textfont.color,r.pts)||t.color,n=wr.castOption(e.outsidetextfont.family,r.pts)||wr.castOption(e.textfont.family,r.pts)||t.family,i=wr.castOption(e.outsidetextfont.size,r.pts)||wr.castOption(e.textfont.size,r.pts)||t.size,l=wr.castOption(e.outsidetextfont.weight,r.pts)||wr.castOption(e.textfont.weight,r.pts)||t.weight,o=wr.castOption(e.outsidetextfont.style,r.pts)||wr.castOption(e.textfont.style,r.pts)||t.style,s=wr.castOption(e.outsidetextfont.variant,r.pts)||wr.castOption(e.textfont.variant,r.pts)||t.variant,u=wr.castOption(e.outsidetextfont.textcase,r.pts)||wr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=wr.castOption(e.outsidetextfont.lineposition,r.pts)||wr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,v=wr.castOption(e.outsidetextfont.shadow,r.pts)||wr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a,family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:v}}function $R(e,r,t){var a=wr.castOption(e.insidetextfont.color,r.pts);!a&&e._input.textfont&&(a=wr.castOption(e._input.textfont.color,r.pts));var n=wr.castOption(e.insidetextfont.family,r.pts)||wr.castOption(e.textfont.family,r.pts)||t.family,i=wr.castOption(e.insidetextfont.size,r.pts)||wr.castOption(e.textfont.size,r.pts)||t.size,l=wr.castOption(e.insidetextfont.weight,r.pts)||wr.castOption(e.textfont.weight,r.pts)||t.weight,o=wr.castOption(e.insidetextfont.style,r.pts)||wr.castOption(e.textfont.style,r.pts)||t.style,s=wr.castOption(e.insidetextfont.variant,r.pts)||wr.castOption(e.textfont.variant,r.pts)||t.variant,u=wr.castOption(e.insidetextfont.textcase,r.pts)||wr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=wr.castOption(e.insidetextfont.lineposition,r.pts)||wr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,v=wr.castOption(e.insidetextfont.shadow,r.pts)||wr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a||XR.contrast(r.color),family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:v}}function jR(e,r){for(var t,a,n=0;n=-4;_-=2)w(Math.PI*_,"tan");for(_=4;_>=-4;_-=2)w(Math.PI*(_+1),"tan")}if(v||d){for(_=4;_>=-4;_-=2)w(Math.PI*(_+1.5),"rad");for(_=4;_>=-4;_-=2)w(Math.PI*(_+.5),"rad")}}if(o||m||v){var T=Math.sqrt(e.width*e.width+e.height*e.height);if(y={scale:n*a*2/T,rCenter:1-n,rotate:0},y.textPosAngle=(r.startangle+r.stopangle)/2,y.scale>=1)return y;g.push(y)}(m||d)&&(y=VR(e,a,l,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,g.push(y)),(m||h)&&(y=WR(e,a,l,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,g.push(y));for(var b=0,A=0,S=0;S=1)break}return g[b]}function pne(e,r){var t=e.startangle,a=e.stopangle;return t>r&&r>a||t0?1:-1)/2,y:i/(1+t*t/(a*a)),outside:!0}}function yne(e){var r=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/r,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function nz(e,r){var t=1,a=1,n,i=e.trace,l={x:e.cx,y:e.cy},o={tx:0,ty:0};o.ty+=i.title.font.size,n=iz(i),i.title.position.indexOf("top")!==-1?(l.y-=(1+n)*e.r,o.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(l.y+=(1+n)*e.r);var s=gne(e.r,e.trace.aspectratio),u=r.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+s,l.x-=(1+n)*s,o.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+s,l.x+=(1+n)*s,o.tx-=e.titleBox.width/2),t=u/e.titleBox.width,a=x3(e,r)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(t,a),tx:o.tx,ty:o.ty}}function gne(e,r){return e/(r===void 0?1:r)}function x3(e,r){var t=e.trace,a=r.h*(t.domain.y[1]-t.domain.y[0]);return Math.min(e.titleBox.height,a/2)}function iz(e){var r=e.pull;if(!r)return 0;var t;if(ga.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function bne(e,r){var t,a,n,i,l,o,s,u,f,v,h,d,m;function g(T,b){return T.pxmid[1]-b.pxmid[1]}function y(T,b){return b.pxmid[1]-T.pxmid[1]}function w(T,b){b||(b={});var A=b.labelExtraY+(a?b.yLabelMax:b.yLabelMin),S=a?T.yLabelMin:T.yLabelMax,k=a?T.yLabelMax:T.yLabelMin,q=T.cyFinal+l(T.px0[1],T.px1[1]),D=A-S,R,z,N,H,O,J;if(D*s>0&&(T.labelExtraY=D),!!ga.isArrayOrTypedArray(r.pull))for(z=0;z=(wr.castOption(r.pull,N.pts)||0))&&((T.pxmid[1]-N.pxmid[1])*s>0?(H=N.cyFinal+l(N.px0[1],N.px1[1]),D=H-S-T.labelExtraY,D*s>0&&(T.labelExtraY+=D)):(k+T.labelExtraY-q)*s>0&&(R=3*o*Math.abs(z-v.indexOf(T)),O=N.cxFinal+i(N.px0[0],N.px1[0]),J=O+R-(T.cxFinal+T.pxmid[0])-T.labelExtraX,J*o>0&&(T.labelExtraX+=J)))}for(a=0;a<2;a++)for(n=a?g:y,l=a?Math.max:Math.min,s=a?1:-1,t=0;t<2;t++){for(i=t?Math.max:Math.min,o=t?1:-1,u=e[a][t],u.sort(n),f=e[1-a][t],v=f.concat(u),d=[],h=0;h1?(u=t.r,f=u/n.aspectratio):(f=t.r,u=f*n.aspectratio),u*=(1+n.baseratio)/2,s=u*f}l=Math.min(l,s/t.vTotal)}for(a=0;ar.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/r.vTotal,.5),u.ring=1-a.hole,u.rInscribed=mne(u,r))}function t1(e,r){return[e*Math.sin(r),-e*Math.cos(r)]}function oz(e,r,t){var a=e._fullLayout,n=t.trace,i=n.texttemplate,l=n.textinfo;if(!i&&l&&l!=="none"){var o=l.split("+"),s=function(b){return o.indexOf(b)!==-1},u=s("label"),f=s("text"),v=s("value"),h=s("percent"),d=a.separators,m;if(m=u?[r.label]:[],f){var g=wr.getFirstFilled(n.text,r.pts);GR(g)&&m.push(g)}v&&m.push(wr.formatPieValue(r.v,d)),h&&m.push(wr.formatPiePercent(r.v/t.vTotal,d)),r.text=m.join("
")}function y(b){return{label:b.label,value:b.v,valueLabel:wr.formatPieValue(b.v,a.separators),percent:b.v/t.vTotal,percentLabel:wr.formatPiePercent(b.v/t.vTotal,a.separators),color:b.color,text:b.text,customdata:ga.castOption(n,b.i,"customdata")}}if(i){var w=ga.castOption(n,r.i,"texttemplate");if(!w)r.text="";else{var _=y(r),T=wr.getFirstFilled(n.text,r.pts);(GR(T)||T==="")&&(_.text=T),r.text=ga.texttemplateString(w,_,e._fullLayout._d3locale,_,n._meta||{})}}}function sz(e,r){var t=e.rotate*Math.PI/180,a=Math.cos(t),n=Math.sin(t),i=(r.left+r.right)/2,l=(r.top+r.bottom)/2;e.textX=i*a-l*n,e.textY=i*n+l*a,e.noCenter=!0}uz.exports={plot:vne,formatSliceLabel:oz,transformInsideText:ez,determineInsideTextFont:$R,positionTitleOutside:nz,prerenderTitles:jR,layoutAreas:lz,attachFxHandlers:QR,computeTransform:sz}});var hz=Z((vve,vz)=>{"use strict";var cz=Ir(),wne=O0(),Tne=xc().resizeText;vz.exports=function(r){var t=r._fullLayout._pielayer.selectAll(".trace");Tne(r,t,"pie"),t.each(function(a){var n=a[0],i=n.trace,l=cz.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(o){cz.select(this).call(wne,o,i,r)})})}});var pz=Z(Tu=>{"use strict";var dz=Pt();Tu.name="pie";Tu.plot=function(e,r,t,a){dz.plotBasePlot(Tu.name,e,r,t,a)};Tu.clean=function(e,r,t,a){dz.cleanBasePlot(Tu.name,e,r,t,a)}});var yz=Z((dve,mz)=>{"use strict";mz.exports={attributes:p3(),supplyDefaults:RR().supplyDefaults,supplyLayoutDefaults:FR(),layoutAttributes:m3(),calc:g3().calc,crossTraceCalc:g3().crossTraceCalc,plot:fz().plot,style:hz(),styleOne:O0(),moduleType:"trace",name:"pie",basePlotModule:pz(),categories:["pie-like","pie","showLegend"],meta:{}}});var bz=Z((pve,gz)=>{"use strict";gz.exports=yz()});var Ma=Z((mve,_z)=>{"use strict";var xz=Object.getOwnPropertySymbols,Mne=Object.prototype.hasOwnProperty,Ane=Object.prototype.propertyIsEnumerable;function kne(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Cne(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}_z.exports=Cne()?Object.assign:function(e,r){for(var t,a=kne(e),n,i=1;i{var n1=Ma();function wz(){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={}}n1(wz.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function _3(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a1(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}n1(_3.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Pr.local.differentCalendars||Pr.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+a1(Math.abs(this.year()),4)+"-"+a1(this.month(),2)+"-"+a1(this.day(),2)}});function w3(){this.shortYearCutoff="+10"}n1(w3.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new _3(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+a1(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Pr.local.invalidMonth||Pr.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Pr.local.invalidMonth||Pr.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Pr.local.invalidYear||Pr.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),l=e.monthOfYear()+(t==="m"?r:0),n=e.day(),o=function(f){for(;lv-1+f.minMonth;)i++,l-=v,v=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,l)&&(l=this.newDate(i,e.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l)))):t==="m"&&(o(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l))));var s=[i,this.fromMonthOfYear(i,l),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,o)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Pr.local.invalidDate||Pr.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Pr=Tz.exports=new wz;Pr.cdate=_3;Pr.baseCalendar=w3;Pr.calendars.gregorian=T3});var Mz=Z(()=>{var M3=Ma(),oa=Aa();M3(oa.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"});oa.local=oa.regionalOptions[""];M3(oa.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});M3(oa.baseCalendar.prototype,{UNIX_EPOCH:oa.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:oa.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw oa.local.invalidFormat||oa.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,l=t.monthNamesShort||this.local.monthNamesShort,o=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(b,A){for(var S=1;T+S1},f=function(b,A,S,k){var q=""+A;if(u(b,k))for(;q.length1},_=function(N,H){var O=w(N,H),J=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(N)+1],X=new RegExp("^-?\\d{1,"+J+"}"),B=r.substring(q).match(X);if(!B)throw(oa.local.missingNumberAt||oa.regionalOptions[""].missingNumberAt).replace(/\{0\}/,q);return q+=B[0].length,parseInt(B[0],10)},T=this,b=function(){if(typeof o=="function"){w("m");var N=o.call(T,r.substring(q));return q+=N.length,N}return _("m")},A=function(N,H,O,J){for(var X=w(N,J)?O:H,B=0;B-1){h=1,d=m;for(var z=this.daysInMonth(v,h);d>z;z=this.daysInMonth(v,h))h++,d-=z}return f>-1?this.fromJD(f):this.newDate(v,h,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,l=function(o){try{return i.parseDate(a,o,n)}catch(v){}o=o.toLowerCase();for(var s=(o.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(o);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(o);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?l(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var Az=Z(()=>{var Il=Aa(),Sne=Ma(),A3=Il.instance();function i1(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i1.prototype=new Il.baseCalendar;Sne(i1.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(qne);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(Dne);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(Ene);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw Il.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw Il.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,Il.local.invalidyear),n=Ol[a-Ol[0]],i=n>>9&4095,l=n>>5&15,o=n&31,s;s=A3.newDate(i,l,o),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=Hl[e-Hl[0]],a=t>>13,n=a?12:11;if(r>n)throw Il.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,Il.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),l=Rne(e,i,t,n);return A3.toJD(l.year,l.month,l.day)},fromJD:function(e){var r=A3.fromJD(e),t=Pne(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match(Lne),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),l=+r[4];return this.newDate(t,i,l)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),l=this.toChineseMonth(a,n),o=Object.getPrototypeOf(i1.prototype).add.call(this,e,r,t);if(t==="y"){var s=o.year(),u=o.month(),f=this.isIntercalaryMonth(s,l),v=i&&f?this.toMonthIndex(s,l,!0):this.toMonthIndex(s,l,!1);v!==u&&o.month(v)}return o}});var Lne=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,qne=/^\d?\d[iI]?/m,Dne=/^闰?十?[一二三四五六七八九]?月/m,Ene=/^闰?十?[一二三四五六七八九]?/m;Il.calendars.chinese=i1;var Hl=[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],Ol=[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 Pne(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var o=typeof r=="number"&&r>=1&&r<=12;if(!o)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=Ol[n.year-Ol[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=Ol[i.year-Ol[0]];var v=u>>9&4095,h=u>>5&15,d=u&31,m,g=new Date(v,h-1,d),y=new Date(n.year,n.month-1,n.day);m=Math.round((y-g)/(24*3600*1e3));var w=Hl[i.year-Hl[0]],_;for(_=0;_<13;_++){var T=w&1<<12-_?30:29;if(m>13;return!b||_=1888&&e<=2111;if(!o)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),l={year:e,month:r,day:t,isIntercalary:f}}var v;v=l.day-1;var h=Hl[l.year-Hl[0]],d=h>>13,m;d&&(l.month>d||l.isIntercalary)?m=l.month:m=l.month-1;for(var g=0;g>9&4095,T=w>>5&15,b=w&31,A=new Date(_,T-1,b+v);return i.year=A.getFullYear(),i.month=1+A.getMonth(),i.day=A.getDate(),i}});var kz=Z(()=>{var Vo=Aa(),zne=Ma();function k3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}k3.prototype=new Vo.baseCalendar;zne(k3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Vo.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Vo.local.invalidYear||Vo.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Vo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Vo.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});Vo.calendars.coptic=k3});var Cz=Z(()=>{var el=Aa(),Nne=Ma();function C3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}C3.prototype=new el.baseCalendar;Nne(C3.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,el.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,el.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,el.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,el.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,el.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,el.local.invalidDate);return{century:Fne[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,el.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var Fne={20:"Fruitbat",21:"Anchovy"};el.calendars.discworld=C3});var Sz=Z(()=>{var Wo=Aa(),Ine=Ma();function S3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}S3.prototype=new Wo.baseCalendar;Ine(S3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Wo.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Wo.local.invalidYear||Wo.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Wo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Wo.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});Wo.calendars.ethiopian=S3});var Lz=Z(()=>{var Bl=Aa(),Hne=Ma();function L3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}L3.prototype=new Bl.baseCalendar;Hne(L3.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 r=this._validate(e,this.minMonth,this.minDay,Bl.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,l1(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Bl.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Bl.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Bl.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&l1(this.daysInYear(e),10)===5?30:r===9&&l1(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Bl.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Bl.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var l=7;l<=this.monthsInYear(e);l++)i+=this.daysInMonth(e,l);for(var l=1;l=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function l1(e,r){return e-r*Math.floor(e/r)}Bl.calendars.hebrew=L3});var qz=Z(()=>{var kc=Aa(),One=Ma();function q3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}q3.prototype=new kc.baseCalendar;One(q3.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 r=this._validate(e,this.minMonth,this.minDay,kc.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,kc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,kc.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});kc.calendars.islamic=q3});var Dz=Z(()=>{var Cc=Aa(),Bne=Ma();function D3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D3.prototype=new Cc.baseCalendar;Bne(D3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Cc.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Cc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Cc.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),l=i-Math.floor(i<14?1:13),o=a-Math.floor(l>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,l,s)}});Cc.calendars.julian=D3});var Pz=Z(()=>{var Fn=Aa(),Yne=Ma();function P3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P3.prototype=new Fn.baseCalendar;Yne(P3.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,Fn.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Fn.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fn.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Fn.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fn.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Fn.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Fn.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Fn.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Fn.local.invalidDate),n=a.toJD(),i=this._toHaab(n),l=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=E3(e+8+17*20,365);return[Math.floor(r/20)+1,E3(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[Ez(e+20,20),Ez(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,Fn.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function E3(e,r){return e-r*Math.floor(e/r)}function Ez(e,r){return E3(e-1,r)+1}Fn.calendars.mayan=P3});var zz=Z(()=>{var Zo=Aa(),Une=Ma();function R3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}R3.prototype=new Zo.baseCalendar;var Rz=Zo.instance("gregorian");Une(R3.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 r=this._validate(e,this.minMonth,this.minDay,Zo.local.invalidYear||Zo.regionalOptions[""].invalidYear);return Rz.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Zo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Zo.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),l=1;l=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});Zo.calendars.nanakshahi=R3});var Nz=Z(()=>{var Xo=Aa(),Gne=Ma();function z3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z3.prototype=new Xo.baseCalendar;Gne(z3.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Xo.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Xo.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,Xo.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=Xo.instance(),i=0,l=r,o=e;this._createMissingCalendarData(e);var s=e-(l>9||l===9&&t>=this.NEPALI_CALENDAR_DATA[o][0]?56:57);for(r!==9&&(i=t,l--);l!==9;)l<=0&&(l=12,o--),i+=this.NEPALI_CALENDAR_DATA[o][l],l--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[o][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[o][9]-this.NEPALI_CALENDAR_DATA[o][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=Xo.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var l=9,o=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][l]-o+1;n>s;)l++,l>12&&(l=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][l];var u=this.NEPALI_CALENDAR_DATA[i][l]-(s-n);return this.newDate(i,l,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var Mu=Aa(),Vne=Ma();function o1(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o1.prototype=new Mu.baseCalendar;Vne(o1.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,Mu.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Mu.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Mu.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+N3(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=N3(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),l=N3(a,366);n=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var o=n+2820*t+474;o=o<=0?o-1:o;var s=e-this.toJD(o,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(o,u,1)+1;return this.newDate(o,u,f)}});function N3(e,r){return e-r*Math.floor(e/r)}Mu.calendars.persian=o1;Mu.calendars.jalali=o1});var Iz=Z(()=>{var Jo=Aa(),Wne=Ma(),s1=Jo.instance();function F3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F3.prototype=new Jo.baseCalendar;Wne(F3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Jo.local.invalidYear),t=this._t2gYear(r.year());return s1.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,Jo.local.invalidYear),n=this._t2gYear(a.year());return s1.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Jo.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Jo.local.invalidDate),n=this._t2gYear(a.year());return s1.toJD(n,a.month(),a.day())},fromJD:function(e){var r=s1.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Jo.calendars.taiwan=F3});var Hz=Z(()=>{var Ko=Aa(),Zne=Ma(),u1=Ko.instance();function I3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}I3.prototype=new Ko.baseCalendar;Zne(I3.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(t){var r=this._validate(t,this.minMonth,this.minDay,Ko.local.invalidYear),t=this._t2gYear(r.year());return u1.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,Ko.local.invalidYear),n=this._t2gYear(a.year());return u1.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Ko.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Ko.local.invalidDate),n=this._t2gYear(a.year());return u1.toJD(n,a.month(),a.day())},fromJD:function(e){var r=u1.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Ko.calendars.thai=I3});var Oz=Z(()=>{var Qo=Aa(),Xne=Ma();function H3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}H3.prototype=new Qo.baseCalendar;Xne(H3.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 r=this._validate(e,this.minMonth,this.minDay,Qo.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,Qo.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return Yl[n]-Yl[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Qo.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+Yl[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),l=i+1,o=n-12*i,s=r-Yl[t-1]+1;return this.newDate(l,o,s)},isValid:function(e,r,t){var a=Qo.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=Qo.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});Qo.calendars.ummalqura=H3;var Yl=[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 Yz=Z((Xve,Bz)=>{"use strict";Bz.exports=Aa();Mz();Az();kz();Cz();Sz();Lz();qz();Dz();Pz();zz();Nz();Fz();Iz();Hz();Oz()});var Jz=Z((Jve,Xz)=>{"use strict";var Gz=Yz(),Sc=He(),Vz=Bt(),Jne=Vz.EPOCHJD,Kne=Vz.ONEDAY,Y3={valType:"enumerated",values:Sc.sortObjectKeys(Gz.calendars),editType:"calc",dflt:"gregorian"},Wz=function(e,r,t,a){var n={};return n[t]=Y3,Sc.coerce(e,r,n,t,a)},Qne=function(e,r,t,a){for(var n=0;n{"use strict";Kz.exports=Jz()});var aie=Z((Qve,jz)=>{var $z=wP();$z.register([LR(),bz(),Qz()]);jz.exports=$z});return aie();})(); /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/dist/plotly-cartesian.js b/dist/plotly-cartesian.js index 3ec43c2d20e..c410ab1e2a2 100644 --- a/dist/plotly-cartesian.js +++ b/dist/plotly-cartesian.js @@ -13710,7 +13710,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13734,10 +13734,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54107,8 +54107,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54121,18 +54127,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-cartesian.min.js b/dist/plotly-cartesian.min.js index f5dd34d01f0..6c60a815b54 100644 --- a/dist/plotly-cartesian.min.js +++ b/dist/plotly-cartesian.min.js @@ -12,14 +12,14 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var DA=Object.defineProperty;var Kne=Object.getOwnPropertyDescriptor;var Qne=Object.getOwnPropertyNames;var eie=Object.prototype.hasOwnProperty;var PA=(e,r)=>()=>(e&&(r=e(e=0)),r);var N=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var rie=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Qne(r))!eie.call(e,n)&&n!==t&&DA(e,n,{get:()=>r[n],enumerable:!(a=Kne(r,n))||a.enumerable});return e};var tie=e=>rie(DA({},"__esModule",{value:!0}),e);var ep=N(RA=>{"use strict";RA.version="3.0.0-rc.0"});var NA=N((FA,rp)=>{(function(r,t,a){t[r]=t[r]||a(),typeof rp!="undefined"&&rp.exports?rp.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:FA,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(b){return setImmediate(b)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(b,w,x,T){return Object.defineProperty(b,w,{value:x,writable:!0,configurable:T!==!1})}}catch(_){r=function(w,x,T){return w[x]=T,w}}a=function(){var b,w,x;function T(k,M){this.fn=k,this.self=M,this.next=void 0}return{add:function(M,S){x=new T(M,S),w?w.next=x:b=x,w=x,x=void 0},drain:function(){var M=b;for(b=w=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(_,b){a.add(_,b),t||(t=i(a.drain))}function l(_){var b,w=typeof _;return _!=null&&(w=="object"||w=="function")&&(b=_.then),typeof b=="function"?b:!1}function s(){for(var _=0;_0&&o(s,w))}catch(x){c.call(new d(w),x)}}}function c(_){var b=this;b.triggered||(b.triggered=!0,b.def&&(b=b.def),b.msg=_,b.state=2,b.chain.length>0&&o(s,b))}function v(_,b,w,x){for(var T=0;T{(function(){var e={version:"3.8.2"},r=[].slice,t=function(h){return r.call(h)},a=self.document;function n(h){return h&&(h.ownerDocument||h.document||h).documentElement}function i(h){return h&&(h.ownerDocument&&h.ownerDocument.defaultView||h.document&&h||h.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(h){t=function(g){for(var A=g.length,q=new Array(A);A--;)q[A]=g[A];return q}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(h){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(g,A){l.call(this,g,A+"")},o.setAttributeNS=function(g,A,q){s.call(this,g,A,q+"")},u.setProperty=function(g,A,q){f.call(this,g,A+"",q)}}e.ascending=c;function c(h,g){return hg?1:h>=g?0:NaN}e.descending=function(h,g){return gh?1:g>=h?0:NaN},e.min=function(h,g){var A=-1,q=h.length,L,C;if(arguments.length===1){for(;++A=C){L=C;break}for(;++AC&&(L=C)}else{for(;++A=C){L=C;break}for(;++AC&&(L=C)}return L},e.max=function(h,g){var A=-1,q=h.length,L,C;if(arguments.length===1){for(;++A=C){L=C;break}for(;++AL&&(L=C)}else{for(;++A=C){L=C;break}for(;++AL&&(L=C)}return L},e.extent=function(h,g){var A=-1,q=h.length,L,C,I;if(arguments.length===1){for(;++A=C){L=I=C;break}for(;++AC&&(L=C),I=C){L=I=C;break}for(;++AC&&(L=C),I1)return I/(U-1)},e.deviation=function(){var h=e.variance.apply(this,arguments);return h&&Math.sqrt(h)};function p(h){return{left:function(g,A,q,L){for(arguments.length<3&&(q=0),arguments.length<4&&(L=g.length);q>>1;h(g[C],A)<0?q=C+1:L=C}return q},right:function(g,A,q,L){for(arguments.length<3&&(q=0),arguments.length<4&&(L=g.length);q>>1;h(g[C],A)>0?L=C:q=C+1}return q}}}var m=p(c);e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(h){return p(h.length===1?function(g,A){return c(h(g),A)}:h)},e.shuffle=function(h,g,A){(q=arguments.length)<3&&(A=h.length,q<2&&(g=0));for(var q=A-g,L,C;q;)C=Math.random()*q--|0,L=h[q+g],h[q+g]=h[C+g],h[C+g]=L;return h},e.permute=function(h,g){for(var A=g.length,q=new Array(A);A--;)q[A]=h[g[A]];return q},e.pairs=function(h){for(var g=0,A=h.length-1,q,L=h[0],C=new Array(A<0?0:A);g=0;)for(I=h[g],A=I.length;--A>=0;)C[--L]=I[A];return C};var _=Math.abs;e.range=function(h,g,A){if(arguments.length<3&&(A=1,arguments.length<2&&(g=h,h=0)),(g-h)/A===1/0)throw new Error("infinite range");var q=[],L=b(_(A)),C=-1,I;if(h*=L,g*=L,A*=L,A<0)for(;(I=h+A*++C)>g;)q.push(I/L);else for(;(I=h+A*++C)=g.length)return L?L.call(h,U):q?U.sort(q):U;for(var $=-1,ee=U.length,re=g[J++],_e,Me,ae,ce=new x,ge;++$=g.length)return F;var J=[],$=A[U++];return F.forEach(function(ee,re){J.push({key:ee,values:I(re,U)})}),$?J.sort(function(ee,re){return $(ee.key,re.key)}):J}return h.map=function(F,U){return C(U,F,0)},h.entries=function(F){return I(C(e.map,F,0),0)},h.key=function(F){return g.push(F),h},h.sortKeys=function(F){return A[g.length-1]=F,h},h.sortValues=function(F){return q=F,h},h.rollup=function(F){return L=F,h},h},e.set=function(h){var g=new O;if(h)for(var A=0,q=h.length;A=0&&(q=h.slice(A+1),h=h.slice(0,A)),h)return arguments.length<2?this[h].on(q):this[h].on(q,g);if(arguments.length===2){if(g==null)for(h in this)this.hasOwnProperty(h)&&this[h].on(q,null);return this}};function Z(h){var g=[],A=new x;function q(){for(var L=g,C=-1,I=L.length,F;++C=0&&(A=h.slice(0,g))!=="xmlns"&&(h=h.slice(g+1)),pe.hasOwnProperty(A)?{space:pe[A],local:h}:h}},de.attr=function(h,g){if(arguments.length<2){if(typeof h=="string"){var A=this.node();return h=e.ns.qualify(h),h.local?A.getAttributeNS(h.space,h.local):A.getAttribute(h)}for(g in h)this.each(me(g,h[g]));return this}return this.each(me(h,g))};function me(h,g){h=e.ns.qualify(h);function A(){this.removeAttribute(h)}function q(){this.removeAttributeNS(h.space,h.local)}function L(){this.setAttribute(h,g)}function C(){this.setAttributeNS(h.space,h.local,g)}function I(){var U=g.apply(this,arguments);U==null?this.removeAttribute(h):this.setAttribute(h,U)}function F(){var U=g.apply(this,arguments);U==null?this.removeAttributeNS(h.space,h.local):this.setAttributeNS(h.space,h.local,U)}return g==null?h.local?q:A:typeof g=="function"?h.local?F:I:h.local?C:L}function we(h){return h.trim().replace(/\s+/g," ")}de.classed=function(h,g){if(arguments.length<2){if(typeof h=="string"){var A=this.node(),q=(h=Fe(h)).length,L=-1;if(g=A.classList){for(;++L=0;)(C=A[q])&&(L&&L!==C.nextSibling&&L.parentNode.insertBefore(C,L),L=C);return this},de.sort=function(h){h=Te.apply(this,arguments);for(var g=-1,A=this.length;++g=g&&(g=L+1);!(U=I[g])&&++g0&&(h=h.slice(0,L));var I=Ge.get(h);I&&(h=I,C=Ye);function F(){var $=this[q];$&&(this.removeEventListener(h,$,$.$),delete this[q])}function U(){var $=C(g,t(arguments));F.call(this),this.addEventListener(h,this[q]=$,$.$=A),$._=g}function J(){var $=new RegExp("^__on([^.]+)"+e.requote(h)+"$"),ee;for(var re in this)if(ee=re.match($)){var _e=this[re];this.removeEventListener(ee[1],_e,_e.$),delete this[re]}}return L?g?U:F:g?Y:J}var Ge=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ge.forEach(function(h){"on"+h in a&&Ge.remove(h)});function Ze(h,g){return function(A){var q=e.event;e.event=A,g[0]=this.__data__;try{h.apply(this,g)}finally{e.event=q}}}function Ye(h,g){var A=Ze(h,g);return function(q){var L=this,C=q.relatedTarget;(!C||C!==L&&!(C.compareDocumentPosition(L)&8))&&A.call(L,q)}}var He,$e=0;function cr(h){var g=".dragsuppress-"+ ++$e,A="click"+g,q=e.select(i(h)).on("touchmove"+g,te).on("dragstart"+g,te).on("selectstart"+g,te);if(He==null&&(He="onselectstart"in h?!1:G(h.style,"userSelect")),He){var L=n(h).style,C=L[He];L[He]="none"}return function(I){if(q.on(g,null),He&&(L[He]=C),I){var F=function(){q.on(A,null)};q.on(A,function(){te(),F()},!0),setTimeout(F,0)}}}e.mouse=function(h){return Oe(h,fe())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Oe(h,g){g.changedTouches&&(g=g.changedTouches[0]);var A=h.ownerSVGElement||h;if(A.createSVGPoint){var q=A.createSVGPoint();if(lr<0){var L=i(h);if(L.scrollX||L.scrollY){A=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var C=A[0][0].getScreenCTM();lr=!(C.f||C.e),A.remove()}}return lr?(q.x=g.pageX,q.y=g.pageY):(q.x=g.clientX,q.y=g.clientY),q=q.matrixTransform(h.getScreenCTM().inverse()),[q.x,q.y]}var I=h.getBoundingClientRect();return[g.clientX-I.left-h.clientLeft,g.clientY-I.top-h.clientTop]}e.touch=function(h,g,A){if(arguments.length<3&&(A=g,g=fe().changedTouches),g){for(var q=0,L=g.length,C;q0?1:h<0?-1:0}function zr(h,g,A){return(g[0]-h[0])*(A[1]-h[1])-(g[1]-h[1])*(A[0]-h[0])}function Et(h){return h>1?0:h<-1?qe:Math.acos(h)}function Dt(h){return h>1?ur:h<-1?-ur:Math.asin(h)}function ma(h){return((h=Math.exp(h))-1/h)/2}function St(h){return((h=Math.exp(h))+1/h)/2}function ja(h){return((h=Math.exp(2*h))-1)/(h+1)}function ga(h){return(h=Math.sin(h/2))*h}var jt=Math.SQRT2,Na=2,br=4;e.interpolateZoom=function(h,g){var A=h[0],q=h[1],L=h[2],C=g[0],I=g[1],F=g[2],U=C-A,J=I-q,$=U*U+J*J,ee,re;if($0&&(tr=tr.transition().duration(I)),tr.call(ke.event)}function dr(){ce&&ce.domain(ae.range().map(function(tr){return(tr-h.x)/h.k}).map(ae.invert)),Ae&&Ae.domain(ge.range().map(function(tr){return(tr-h.y)/h.k}).map(ge.invert))}function pr(tr){F++||tr({type:"zoomstart"})}function Er(tr){dr(),tr({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function mr(tr){--F||(tr({type:"zoomend"}),A=null)}function kr(){var tr=this,Dr=Me.of(tr,arguments),Rr=0,tt=e.select(i(tr)).on(J,Oa).on($,an),Bt=xe(e.mouse(tr)),ua=cr(tr);Jd.call(tr),pr(Dr);function Oa(){Rr=1,fr(e.mouse(tr),Bt),Er(Dr)}function an(){tt.on(J,null).on($,null),ua(Rr),mr(Dr)}}function rt(){var tr=this,Dr=Me.of(tr,arguments),Rr={},tt=0,Bt,ua=".zoom-"+e.event.changedTouches[0].identifier,Oa="touchmove"+ua,an="touchend"+ua,yn=[],nn=e.select(tr),Mn=cr(tr);kn(),pr(Dr),nn.on(U,null).on(re,kn);function Za(){var ji=e.touches(tr);return Bt=h.k,ji.forEach(function(Ba){Ba.identifier in Rr&&(Rr[Ba.identifier]=xe(Ba))}),ji}function kn(){var ji=e.event.target;e.select(ji).on(Oa,Us).on(an,$ne),yn.push(ji);for(var Ba=e.event.changedTouches,ii=0,wo=Ba.length;ii1){var Gs=oi[0],Nl=oi[1],Qd=Gs[0]-Nl[0],EA=Gs[1]-Nl[1];tt=Qd*Qd+EA*EA}}function Us(){var ji=e.touches(tr),Ba,ii,wo,oi;Jd.call(tr);for(var bf=0,Gs=ji.length;bf1?1:g,A=A<0?0:A>1?1:A,L=A<=.5?A*(1+g):A+g-A*g,q=2*A-L;function C(F){return F>360?F-=360:F<0&&(F+=360),F<60?q+(L-q)*F/60:F<180?L:F<240?q+(L-q)*(240-F)/60:q}function I(F){return Math.round(C(F)*255)}return new Ut(I(h+120),I(h),I(h-120))}e.hcl=Zt;function Zt(h,g,A){return this instanceof Zt?(this.h=+h,this.c=+g,void(this.l=+A)):arguments.length<2?h instanceof Zt?new Zt(h.h,h.c,h.l):h instanceof Xt?Rt(h.l,h.a,h.b):Rt((h=sr((h=e.rgb(h)).r,h.g,h.b)).l,h.a,h.b):new Zt(h,g,A)}var tn=Zt.prototype=new Pt;tn.brighter=function(h){return new Zt(this.h,this.c,Math.min(100,this.l+ut*(arguments.length?h:1)))},tn.darker=function(h){return new Zt(this.h,this.c,Math.max(0,this.l-ut*(arguments.length?h:1)))},tn.rgb=function(){return Tn(this.h,this.c,this.l).rgb()};function Tn(h,g,A){return isNaN(h)&&(h=0),isNaN(g)&&(g=0),new Xt(A,Math.cos(h*=Ar)*g,Math.sin(h)*g)}e.lab=Xt;function Xt(h,g,A){return this instanceof Xt?(this.l=+h,this.a=+g,void(this.b=+A)):arguments.length<2?h instanceof Xt?new Xt(h.l,h.a,h.b):h instanceof Zt?Tn(h.h,h.c,h.l):sr((h=Ut(h)).r,h.g,h.b):new Xt(h,g,A)}var ut=18,xa=.95047,Ko=1,Qo=1.08883,vt=Xt.prototype=new Pt;vt.brighter=function(h){return new Xt(Math.min(100,this.l+ut*(arguments.length?h:1)),this.a,this.b)},vt.darker=function(h){return new Xt(Math.max(0,this.l-ut*(arguments.length?h:1)),this.a,this.b)},vt.rgb=function(){return An(this.l,this.a,this.b)};function An(h,g,A){var q=(h+16)/116,L=q+g/500,C=q-A/200;return L=zs(L)*xa,q=zs(q)*Ko,C=zs(C)*Qo,new Ut(Gi(3.2404542*L-1.5371385*q-.4985314*C),Gi(-.969266*L+1.8760108*q+.041556*C),Gi(.0556434*L-.2040259*q+1.0572252*C))}function Rt(h,g,A){return h>0?new Zt(Math.atan2(A,g)*Wr,Math.sqrt(g*g+A*A),h):new Zt(NaN,NaN,h)}function zs(h){return h>.206893034?h*h*h:(h-4/29)/7.787037}function pn(h){return h>.008856?Math.pow(h,1/3):7.787037*h+4/29}function Gi(h){return Math.round(255*(h<=.00304?12.92*h:1.055*Math.pow(h,1/2.4)-.055))}e.rgb=Ut;function Ut(h,g,A){return this instanceof Ut?(this.r=~~h,this.g=~~g,void(this.b=~~A)):arguments.length<2?h instanceof Ut?new Ut(h.r,h.g,h.b):$r(""+h,Ut,ba):new Ut(h,g,A)}function Yi(h){return new Ut(h>>16,h>>8&255,h&255)}function Pl(h){return Yi(h)+""}var Rl=Ut.prototype=new Pt;Rl.brighter=function(h){h=Math.pow(.7,arguments.length?h:1);var g=this.r,A=this.g,q=this.b,L=30;return!g&&!A&&!q?new Ut(L,L,L):(g&&g>4,q=q>>4|q,L=U&240,L=L>>4|L,C=U&15,C=C<<4|C):h.length===7&&(q=(U&16711680)>>16,L=(U&65280)>>8,C=U&255)),g(q,L,C))}function ht(h,g,A){var q=Math.min(h/=255,g/=255,A/=255),L=Math.max(h,g,A),C=L-q,I,F,U=(L+q)/2;return C?(F=U<.5?C/(L+q):C/(2-L-q),h==L?I=(g-A)/C+(g0&&U<1?0:I),new Qr(I,F,U)}function sr(h,g,A){h=za(h),g=za(g),A=za(A);var q=pn((.4124564*h+.3575761*g+.1804375*A)/xa),L=pn((.2126729*h+.7151522*g+.072175*A)/Ko),C=pn((.0193339*h+.119192*g+.9503041*A)/Qo);return Xt(116*L-16,500*(q-L),200*(L-C))}function za(h){return(h/=255)<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}function At(h){var g=parseFloat(h);return h.charAt(h.length-1)==="%"?Math.round(g*2.55):g}var Ia=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});Ia.forEach(function(h,g){Ia.set(h,Yi(g))});function Br(h){return typeof h=="function"?h:function(){return h}}e.functor=Br,e.xhr=Vi(H);function Vi(h){return function(g,A,q){return arguments.length===2&&typeof A=="function"&&(q=A,A=null),Is(g,A,h,q)}}function Is(h,g,A,q){var L={},C=e.dispatch("beforesend","progress","load","error"),I={},F=new XMLHttpRequest,U=null;self.XDomainRequest&&!("withCredentials"in F)&&/^(http(s)?:)?\/\//.test(h)&&(F=new XDomainRequest),"onload"in F?F.onload=F.onerror=J:F.onreadystatechange=function(){F.readyState>3&&J()};function J(){var $=F.status,ee;if(!$&&Qte(F)||$>=200&&$<300||$===304){try{ee=A.call(L,F)}catch(re){C.error.call(L,re);return}C.load.call(L,ee)}else C.error.call(L,F)}return F.onprogress=function($){var ee=e.event;e.event=$;try{C.progress.call(L,F)}finally{e.event=ee}},L.header=function($,ee){return $=($+"").toLowerCase(),arguments.length<2?I[$]:(ee==null?delete I[$]:I[$]=ee+"",L)},L.mimeType=function($){return arguments.length?(g=$==null?null:$+"",L):g},L.responseType=function($){return arguments.length?(U=$,L):U},L.response=function($){return A=$,L},["get","post"].forEach(function($){L[$]=function(){return L.send.apply(L,[$].concat(t(arguments)))}}),L.send=function($,ee,re){if(arguments.length===2&&typeof ee=="function"&&(re=ee,ee=null),F.open($,h,!0),g!=null&&!("accept"in I)&&(I.accept=g+",*/*"),F.setRequestHeader)for(var _e in I)F.setRequestHeader(_e,I[_e]);return g!=null&&F.overrideMimeType&&F.overrideMimeType(g),U!=null&&(F.responseType=U),re!=null&&L.on("error",re).on("load",function(Me){re(null,Me)}),C.beforesend.call(L,F),F.send(ee==null?null:ee),L},L.abort=function(){return F.abort(),L},e.rebind(L,C,"on"),q==null?L:L.get(Kte(q))}function Kte(h){return h.length===1?function(g,A){h(g==null?A:null)}:h}function Qte(h){var g=h.responseType;return g&&g!=="text"?h.response:h.responseText}e.dsv=function(h,g){var A=new RegExp('["'+h+` +"use strict";var Plotly=(()=>{var DA=Object.defineProperty;var Kne=Object.getOwnPropertyDescriptor;var Qne=Object.getOwnPropertyNames;var eie=Object.prototype.hasOwnProperty;var PA=(e,r)=>()=>(e&&(r=e(e=0)),r);var N=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var rie=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Qne(r))!eie.call(e,n)&&n!==t&&DA(e,n,{get:()=>r[n],enumerable:!(a=Kne(r,n))||a.enumerable});return e};var tie=e=>rie(DA({},"__esModule",{value:!0}),e);var ep=N(RA=>{"use strict";RA.version="3.0.0-rc.0"});var NA=N((FA,rp)=>{(function(r,t,a){t[r]=t[r]||a(),typeof rp!="undefined"&&rp.exports?rp.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:FA,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(_,w,b,T){return Object.defineProperty(_,w,{value:b,writable:!0,configurable:T!==!1})}}catch(x){r=function(w,b,T){return w[b]=T,w}}a=function(){var _,w,b;function T(k,M){this.fn=k,this.self=M,this.next=void 0}return{add:function(M,S){b=new T(M,S),w?w.next=b:_=b,w=b,b=void 0},drain:function(){var M=_;for(_=w=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(x,_){a.add(x,_),t||(t=i(a.drain))}function l(x){var _,w=typeof x;return x!=null&&(w=="object"||w=="function")&&(_=x.then),typeof _=="function"?_:!1}function s(){for(var x=0;x0&&o(s,w))}catch(b){c.call(new d(w),b)}}}function c(x){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=x,_.state=2,_.chain.length>0&&o(s,_))}function v(x,_,w,b){for(var T=0;T<_.length;T++)(function(M){x.resolve(_[M]).then(function(E){w(M,E)},b)})(T)}function d(x){this.def=x,this.triggered=!1}function p(x){this.promise=x,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(x){if(typeof x!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new p(this);this.then=function(b,T){var k={success:typeof b=="function"?b:!0,failure:typeof T=="function"?T:!1};return k.promise=new this.constructor(function(S,E){if(typeof S!="function"||typeof E!="function")throw TypeError("Not a function");k.resolve=S,k.reject=E}),_.chain.push(k),_.state!==0&&o(s,_),k.promise},this.catch=function(b){return this.then(void 0,b)};try{x.call(void 0,function(b){f.call(_,b)},function(b){c.call(_,b)})}catch(w){c.call(_,w)}}var y=r({},"constructor",m,!1);return m.prototype=y,r(y,"__NPO__",0,!1),r(m,"resolve",function(_){var w=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new w(function(T,k){if(typeof T!="function"||typeof k!="function")throw TypeError("Not a function");T(_)})}),r(m,"reject",function(_){return new this(function(b,T){if(typeof b!="function"||typeof T!="function")throw TypeError("Not a function");T(_)})}),r(m,"all",function(_){var w=this;return n.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):_.length===0?w.resolve([]):new w(function(T,k){if(typeof T!="function"||typeof k!="function")throw TypeError("Not a function");var M=_.length,S=Array(M),E=0;v(w,_,function(R,D){S[R]=D,++E===M&&T(S)},k)})}),r(m,"race",function(_){var w=this;return n.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):new w(function(T,k){if(typeof T!="function"||typeof k!="function")throw TypeError("Not a function");v(w,_,function(S,E){T(E)},k)})}),m})});var Sr=N((Vqe,tp)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(h){return r.call(h)},a=self.document;function n(h){return h&&(h.ownerDocument||h.document||h).documentElement}function i(h){return h&&(h.ownerDocument&&h.ownerDocument.defaultView||h.document&&h||h.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(h){t=function(g){for(var A=g.length,q=new Array(A);A--;)q[A]=g[A];return q}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(h){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(g,A){l.call(this,g,A+"")},o.setAttributeNS=function(g,A,q){s.call(this,g,A,q+"")},u.setProperty=function(g,A,q){f.call(this,g,A+"",q)}}e.ascending=c;function c(h,g){return hg?1:h>=g?0:NaN}e.descending=function(h,g){return gh?1:g>=h?0:NaN},e.min=function(h,g){var A=-1,q=h.length,L,C;if(arguments.length===1){for(;++A=C){L=C;break}for(;++AC&&(L=C)}else{for(;++A=C){L=C;break}for(;++AC&&(L=C)}return L},e.max=function(h,g){var A=-1,q=h.length,L,C;if(arguments.length===1){for(;++A=C){L=C;break}for(;++AL&&(L=C)}else{for(;++A=C){L=C;break}for(;++AL&&(L=C)}return L},e.extent=function(h,g){var A=-1,q=h.length,L,C,I;if(arguments.length===1){for(;++A=C){L=I=C;break}for(;++AC&&(L=C),I=C){L=I=C;break}for(;++AC&&(L=C),I1)return I/(U-1)},e.deviation=function(){var h=e.variance.apply(this,arguments);return h&&Math.sqrt(h)};function p(h){return{left:function(g,A,q,L){for(arguments.length<3&&(q=0),arguments.length<4&&(L=g.length);q>>1;h(g[C],A)<0?q=C+1:L=C}return q},right:function(g,A,q,L){for(arguments.length<3&&(q=0),arguments.length<4&&(L=g.length);q>>1;h(g[C],A)>0?L=C:q=C+1}return q}}}var m=p(c);e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(h){return p(h.length===1?function(g,A){return c(h(g),A)}:h)},e.shuffle=function(h,g,A){(q=arguments.length)<3&&(A=h.length,q<2&&(g=0));for(var q=A-g,L,C;q;)C=Math.random()*q--|0,L=h[q+g],h[q+g]=h[C+g],h[C+g]=L;return h},e.permute=function(h,g){for(var A=g.length,q=new Array(A);A--;)q[A]=h[g[A]];return q},e.pairs=function(h){for(var g=0,A=h.length-1,q,L=h[0],C=new Array(A<0?0:A);g=0;)for(I=h[g],A=I.length;--A>=0;)C[--L]=I[A];return C};var x=Math.abs;e.range=function(h,g,A){if(arguments.length<3&&(A=1,arguments.length<2&&(g=h,h=0)),(g-h)/A===1/0)throw new Error("infinite range");var q=[],L=_(x(A)),C=-1,I;if(h*=L,g*=L,A*=L,A<0)for(;(I=h+A*++C)>g;)q.push(I/L);else for(;(I=h+A*++C)=g.length)return L?L.call(h,U):q?U.sort(q):U;for(var $=-1,ee=U.length,re=g[J++],_e,Me,ae,ce=new b,ge;++$=g.length)return F;var J=[],$=A[U++];return F.forEach(function(ee,re){J.push({key:ee,values:I(re,U)})}),$?J.sort(function(ee,re){return $(ee.key,re.key)}):J}return h.map=function(F,U){return C(U,F,0)},h.entries=function(F){return I(C(e.map,F,0),0)},h.key=function(F){return g.push(F),h},h.sortKeys=function(F){return A[g.length-1]=F,h},h.sortValues=function(F){return q=F,h},h.rollup=function(F){return L=F,h},h},e.set=function(h){var g=new O;if(h)for(var A=0,q=h.length;A=0&&(q=h.slice(A+1),h=h.slice(0,A)),h)return arguments.length<2?this[h].on(q):this[h].on(q,g);if(arguments.length===2){if(g==null)for(h in this)this.hasOwnProperty(h)&&this[h].on(q,null);return this}};function Z(h){var g=[],A=new b;function q(){for(var L=g,C=-1,I=L.length,F;++C=0&&(A=h.slice(0,g))!=="xmlns"&&(h=h.slice(g+1)),pe.hasOwnProperty(A)?{space:pe[A],local:h}:h}},de.attr=function(h,g){if(arguments.length<2){if(typeof h=="string"){var A=this.node();return h=e.ns.qualify(h),h.local?A.getAttributeNS(h.space,h.local):A.getAttribute(h)}for(g in h)this.each(me(g,h[g]));return this}return this.each(me(h,g))};function me(h,g){h=e.ns.qualify(h);function A(){this.removeAttribute(h)}function q(){this.removeAttributeNS(h.space,h.local)}function L(){this.setAttribute(h,g)}function C(){this.setAttributeNS(h.space,h.local,g)}function I(){var U=g.apply(this,arguments);U==null?this.removeAttribute(h):this.setAttribute(h,U)}function F(){var U=g.apply(this,arguments);U==null?this.removeAttributeNS(h.space,h.local):this.setAttributeNS(h.space,h.local,U)}return g==null?h.local?q:A:typeof g=="function"?h.local?F:I:h.local?C:L}function we(h){return h.trim().replace(/\s+/g," ")}de.classed=function(h,g){if(arguments.length<2){if(typeof h=="string"){var A=this.node(),q=(h=Fe(h)).length,L=-1;if(g=A.classList){for(;++L=0;)(C=A[q])&&(L&&L!==C.nextSibling&&L.parentNode.insertBefore(C,L),L=C);return this},de.sort=function(h){h=Te.apply(this,arguments);for(var g=-1,A=this.length;++g=g&&(g=L+1);!(U=I[g])&&++g0&&(h=h.slice(0,L));var I=Ge.get(h);I&&(h=I,C=Ye);function F(){var $=this[q];$&&(this.removeEventListener(h,$,$.$),delete this[q])}function U(){var $=C(g,t(arguments));F.call(this),this.addEventListener(h,this[q]=$,$.$=A),$._=g}function J(){var $=new RegExp("^__on([^.]+)"+e.requote(h)+"$"),ee;for(var re in this)if(ee=re.match($)){var _e=this[re];this.removeEventListener(ee[1],_e,_e.$),delete this[re]}}return L?g?U:F:g?V:J}var Ge=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ge.forEach(function(h){"on"+h in a&&Ge.remove(h)});function Ze(h,g){return function(A){var q=e.event;e.event=A,g[0]=this.__data__;try{h.apply(this,g)}finally{e.event=q}}}function Ye(h,g){var A=Ze(h,g);return function(q){var L=this,C=q.relatedTarget;(!C||C!==L&&!(C.compareDocumentPosition(L)&8))&&A.call(L,q)}}var He,$e=0;function cr(h){var g=".dragsuppress-"+ ++$e,A="click"+g,q=e.select(i(h)).on("touchmove"+g,te).on("dragstart"+g,te).on("selectstart"+g,te);if(He==null&&(He="onselectstart"in h?!1:G(h.style,"userSelect")),He){var L=n(h).style,C=L[He];L[He]="none"}return function(I){if(q.on(g,null),He&&(L[He]=C),I){var F=function(){q.on(A,null)};q.on(A,function(){te(),F()},!0),setTimeout(F,0)}}}e.mouse=function(h){return Oe(h,fe())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Oe(h,g){g.changedTouches&&(g=g.changedTouches[0]);var A=h.ownerSVGElement||h;if(A.createSVGPoint){var q=A.createSVGPoint();if(lr<0){var L=i(h);if(L.scrollX||L.scrollY){A=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var C=A[0][0].getScreenCTM();lr=!(C.f||C.e),A.remove()}}return lr?(q.x=g.pageX,q.y=g.pageY):(q.x=g.clientX,q.y=g.clientY),q=q.matrixTransform(h.getScreenCTM().inverse()),[q.x,q.y]}var I=h.getBoundingClientRect();return[g.clientX-I.left-h.clientLeft,g.clientY-I.top-h.clientTop]}e.touch=function(h,g,A){if(arguments.length<3&&(A=g,g=fe().changedTouches),g){for(var q=0,L=g.length,C;q0?1:h<0?-1:0}function zr(h,g,A){return(g[0]-h[0])*(A[1]-h[1])-(g[1]-h[1])*(A[0]-h[0])}function Et(h){return h>1?0:h<-1?qe:Math.acos(h)}function Dt(h){return h>1?ur:h<-1?-ur:Math.asin(h)}function ma(h){return((h=Math.exp(h))-1/h)/2}function St(h){return((h=Math.exp(h))+1/h)/2}function ja(h){return((h=Math.exp(2*h))-1)/(h+1)}function ga(h){return(h=Math.sin(h/2))*h}var jt=Math.SQRT2,Na=2,br=4;e.interpolateZoom=function(h,g){var A=h[0],q=h[1],L=h[2],C=g[0],I=g[1],F=g[2],U=C-A,J=I-q,$=U*U+J*J,ee,re;if($0&&(tr=tr.transition().duration(I)),tr.call(ke.event)}function dr(){ce&&ce.domain(ae.range().map(function(tr){return(tr-h.x)/h.k}).map(ae.invert)),Ae&&Ae.domain(ge.range().map(function(tr){return(tr-h.y)/h.k}).map(ge.invert))}function pr(tr){F++||tr({type:"zoomstart"})}function Er(tr){dr(),tr({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function mr(tr){--F||(tr({type:"zoomend"}),A=null)}function kr(){var tr=this,Dr=Me.of(tr,arguments),Rr=0,tt=e.select(i(tr)).on(J,Oa).on($,an),Bt=xe(e.mouse(tr)),ua=cr(tr);Jd.call(tr),pr(Dr);function Oa(){Rr=1,fr(e.mouse(tr),Bt),Er(Dr)}function an(){tt.on(J,null).on($,null),ua(Rr),mr(Dr)}}function rt(){var tr=this,Dr=Me.of(tr,arguments),Rr={},tt=0,Bt,ua=".zoom-"+e.event.changedTouches[0].identifier,Oa="touchmove"+ua,an="touchend"+ua,yn=[],nn=e.select(tr),Mn=cr(tr);kn(),pr(Dr),nn.on(U,null).on(re,kn);function Za(){var ji=e.touches(tr);return Bt=h.k,ji.forEach(function(Ba){Ba.identifier in Rr&&(Rr[Ba.identifier]=xe(Ba))}),ji}function kn(){var ji=e.event.target;e.select(ji).on(Oa,Us).on(an,$ne),yn.push(ji);for(var Ba=e.event.changedTouches,ii=0,wo=Ba.length;ii1){var Gs=oi[0],Nl=oi[1],Qd=Gs[0]-Nl[0],EA=Gs[1]-Nl[1];tt=Qd*Qd+EA*EA}}function Us(){var ji=e.touches(tr),Ba,ii,wo,oi;Jd.call(tr);for(var bf=0,Gs=ji.length;bf1?1:g,A=A<0?0:A>1?1:A,L=A<=.5?A*(1+g):A+g-A*g,q=2*A-L;function C(F){return F>360?F-=360:F<0&&(F+=360),F<60?q+(L-q)*F/60:F<180?L:F<240?q+(L-q)*(240-F)/60:q}function I(F){return Math.round(C(F)*255)}return new Ut(I(h+120),I(h),I(h-120))}e.hcl=Zt;function Zt(h,g,A){return this instanceof Zt?(this.h=+h,this.c=+g,void(this.l=+A)):arguments.length<2?h instanceof Zt?new Zt(h.h,h.c,h.l):h instanceof Xt?Rt(h.l,h.a,h.b):Rt((h=sr((h=e.rgb(h)).r,h.g,h.b)).l,h.a,h.b):new Zt(h,g,A)}var tn=Zt.prototype=new Pt;tn.brighter=function(h){return new Zt(this.h,this.c,Math.min(100,this.l+ut*(arguments.length?h:1)))},tn.darker=function(h){return new Zt(this.h,this.c,Math.max(0,this.l-ut*(arguments.length?h:1)))},tn.rgb=function(){return Tn(this.h,this.c,this.l).rgb()};function Tn(h,g,A){return isNaN(h)&&(h=0),isNaN(g)&&(g=0),new Xt(A,Math.cos(h*=Ar)*g,Math.sin(h)*g)}e.lab=Xt;function Xt(h,g,A){return this instanceof Xt?(this.l=+h,this.a=+g,void(this.b=+A)):arguments.length<2?h instanceof Xt?new Xt(h.l,h.a,h.b):h instanceof Zt?Tn(h.h,h.c,h.l):sr((h=Ut(h)).r,h.g,h.b):new Xt(h,g,A)}var ut=18,xa=.95047,Ko=1,Qo=1.08883,vt=Xt.prototype=new Pt;vt.brighter=function(h){return new Xt(Math.min(100,this.l+ut*(arguments.length?h:1)),this.a,this.b)},vt.darker=function(h){return new Xt(Math.max(0,this.l-ut*(arguments.length?h:1)),this.a,this.b)},vt.rgb=function(){return An(this.l,this.a,this.b)};function An(h,g,A){var q=(h+16)/116,L=q+g/500,C=q-A/200;return L=zs(L)*xa,q=zs(q)*Ko,C=zs(C)*Qo,new Ut(Gi(3.2404542*L-1.5371385*q-.4985314*C),Gi(-.969266*L+1.8760108*q+.041556*C),Gi(.0556434*L-.2040259*q+1.0572252*C))}function Rt(h,g,A){return h>0?new Zt(Math.atan2(A,g)*Wr,Math.sqrt(g*g+A*A),h):new Zt(NaN,NaN,h)}function zs(h){return h>.206893034?h*h*h:(h-4/29)/7.787037}function pn(h){return h>.008856?Math.pow(h,1/3):7.787037*h+4/29}function Gi(h){return Math.round(255*(h<=.00304?12.92*h:1.055*Math.pow(h,1/2.4)-.055))}e.rgb=Ut;function Ut(h,g,A){return this instanceof Ut?(this.r=~~h,this.g=~~g,void(this.b=~~A)):arguments.length<2?h instanceof Ut?new Ut(h.r,h.g,h.b):$r(""+h,Ut,ba):new Ut(h,g,A)}function Yi(h){return new Ut(h>>16,h>>8&255,h&255)}function Pl(h){return Yi(h)+""}var Rl=Ut.prototype=new Pt;Rl.brighter=function(h){h=Math.pow(.7,arguments.length?h:1);var g=this.r,A=this.g,q=this.b,L=30;return!g&&!A&&!q?new Ut(L,L,L):(g&&g>4,q=q>>4|q,L=U&240,L=L>>4|L,C=U&15,C=C<<4|C):h.length===7&&(q=(U&16711680)>>16,L=(U&65280)>>8,C=U&255)),g(q,L,C))}function ht(h,g,A){var q=Math.min(h/=255,g/=255,A/=255),L=Math.max(h,g,A),C=L-q,I,F,U=(L+q)/2;return C?(F=U<.5?C/(L+q):C/(2-L-q),h==L?I=(g-A)/C+(g0&&U<1?0:I),new Qr(I,F,U)}function sr(h,g,A){h=za(h),g=za(g),A=za(A);var q=pn((.4124564*h+.3575761*g+.1804375*A)/xa),L=pn((.2126729*h+.7151522*g+.072175*A)/Ko),C=pn((.0193339*h+.119192*g+.9503041*A)/Qo);return Xt(116*L-16,500*(q-L),200*(L-C))}function za(h){return(h/=255)<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}function At(h){var g=parseFloat(h);return h.charAt(h.length-1)==="%"?Math.round(g*2.55):g}var Ia=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});Ia.forEach(function(h,g){Ia.set(h,Yi(g))});function Br(h){return typeof h=="function"?h:function(){return h}}e.functor=Br,e.xhr=Vi(H);function Vi(h){return function(g,A,q){return arguments.length===2&&typeof A=="function"&&(q=A,A=null),Is(g,A,h,q)}}function Is(h,g,A,q){var L={},C=e.dispatch("beforesend","progress","load","error"),I={},F=new XMLHttpRequest,U=null;self.XDomainRequest&&!("withCredentials"in F)&&/^(http(s)?:)?\/\//.test(h)&&(F=new XDomainRequest),"onload"in F?F.onload=F.onerror=J:F.onreadystatechange=function(){F.readyState>3&&J()};function J(){var $=F.status,ee;if(!$&&Qte(F)||$>=200&&$<300||$===304){try{ee=A.call(L,F)}catch(re){C.error.call(L,re);return}C.load.call(L,ee)}else C.error.call(L,F)}return F.onprogress=function($){var ee=e.event;e.event=$;try{C.progress.call(L,F)}finally{e.event=ee}},L.header=function($,ee){return $=($+"").toLowerCase(),arguments.length<2?I[$]:(ee==null?delete I[$]:I[$]=ee+"",L)},L.mimeType=function($){return arguments.length?(g=$==null?null:$+"",L):g},L.responseType=function($){return arguments.length?(U=$,L):U},L.response=function($){return A=$,L},["get","post"].forEach(function($){L[$]=function(){return L.send.apply(L,[$].concat(t(arguments)))}}),L.send=function($,ee,re){if(arguments.length===2&&typeof ee=="function"&&(re=ee,ee=null),F.open($,h,!0),g!=null&&!("accept"in I)&&(I.accept=g+",*/*"),F.setRequestHeader)for(var _e in I)F.setRequestHeader(_e,I[_e]);return g!=null&&F.overrideMimeType&&F.overrideMimeType(g),U!=null&&(F.responseType=U),re!=null&&L.on("error",re).on("load",function(Me){re(null,Me)}),C.beforesend.call(L,F),F.send(ee==null?null:ee),L},L.abort=function(){return F.abort(),L},e.rebind(L,C,"on"),q==null?L:L.get(Kte(q))}function Kte(h){return h.length===1?function(g,A){h(g==null?A:null)}:h}function Qte(h){var g=h.responseType;return g&&g!=="text"?h.response:h.responseText}e.dsv=function(h,g){var A=new RegExp('["'+h+` ]`),q=h.charCodeAt(0);function L(J,$,ee){arguments.length<3&&(ee=$,$=null);var re=Is(J,g,$==null?C:I($),ee);return re.row=function(_e){return arguments.length?re.response(($=_e)==null?C:I(_e)):$},re}function C(J){return L.parse(J.responseText)}function I(J){return function($){return L.parse($.responseText,J)}}L.parse=function(J,$){var ee;return L.parseRows(J,function(re,_e){if(ee)return ee(re,_e-1);var Me=function(ae){for(var ce={},ge=re.length,Ae=0;Ae=Me)return re;if(Ae)return Ae=!1,ee;var Ve=ae;if(J.charCodeAt(Ve)===34){for(var nr=Ve;nr++24?(isFinite(g)&&(clearTimeout(Rd),Rd=setTimeout(_3,g)),Pd=0):(Pd=1,m8(_3))}e.timer.flush=function(){g8(),b8()};function g8(){for(var h=Date.now(),g=Ed;g;)h>=g.t&&g.c(h-g.t)&&(g.c=null),g=g.n;return h}function b8(){for(var h,g=Ed,A=1/0;g;)g.c?(g.t=0;--F)ae.push(L[J[ee[F]][2]]);for(F=+_e;F1&&zr(h[A[q-2]],h[A[q-1]],h[L])<=0;)--q;A[q++]=L}return A.slice(0,q)}function eae(h,g){return h[0]-g[0]||h[1]-g[1]}e.geom.polygon=function(h){return K(h,Nd),h};var Nd=e.geom.polygon.prototype=[];Nd.area=function(){for(var h=-1,g=this.length,A,q=this[g-1],L=0;++hve)F=F.L;else if(I=g-nae(F,A),I>ve){if(!F.R){q=F;break}F=F.R}else{C>-ve?(q=F.P,L=F):I>-ve?(q=F,L=F.N):q=L=F;break}var U=A8(h);if(pf.insert(q,U),!(!q&&!L)){if(q===L){mf(q),L=A8(q.site),pf.insert(U,L),U.edge=L.edge=Pv(q.site,U.site),yf(q),yf(L);return}if(!L){U.edge=Pv(q.site,U.site);return}mf(q),mf(L);var J=q.site,$=J.x,ee=J.y,re=h.x-$,_e=h.y-ee,Me=L.site,ae=Me.x-$,ce=Me.y-ee,ge=2*(re*ce-_e*ae),Ae=re*re+_e*_e,ke=ae*ae+ce*ce,xe={x:(ce*Ae-_e*ke)/ge+$,y:(re*ke-ae*Ae)/ge+ee};zd(L.edge,J,Me,xe),U.edge=Pv(J,h,null,xe),L.edge=Pv(h,Me,null,xe),yf(q),yf(L)}}function M8(h,g){var A=h.site,q=A.x,L=A.y,C=L-g;if(!C)return q;var I=h.P;if(!I)return-1/0;A=I.site;var F=A.x,U=A.y,J=U-g;if(!J)return F;var $=F-q,ee=1/C-1/J,re=$/J;return ee?(-re+Math.sqrt(re*re-2*ee*($*$/(-2*J)-U+J/2+L-C/2)))/ee+q:(q+F)/2}function nae(h,g){var A=h.N;if(A)return M8(A,g);var q=h.site;return q.y===g?q.x:1/0}function k8(h){this.site=h,this.edges=[]}k8.prototype.prepare=function(){for(var h=this.edges,g=h.length,A;g--;)A=h[g].edge,(!A.b||!A.a)&&h.splice(g,1);return h.sort(S8),h.length};function iae(h){for(var g=h[0][0],A=h[1][0],q=h[0][1],L=h[1][1],C,I,F,U,J=Os,$=J.length,ee,re,_e,Me,ae,ce;$--;)if(ee=J[$],!(!ee||!ee.prepare()))for(_e=ee.edges,Me=_e.length,re=0;reve||_(U-I)>ve)&&(_e.splice(re,0,new Id(fae(ee.site,ce,_(F-g)ve?{x:g,y:_(C-g)ve?{x:_(I-L)ve?{x:A,y:_(C-A)ve?{x:_(I-q)=-De)){var re=U*U+J*J,_e=$*$+ce*ce,Me=(ce*re-J*_e)/ee,ae=(U*_e-$*re)/ee,ce=ae+F,ge=T8.pop()||new oae;ge.arc=h,ge.site=L,ge.x=Me+I,ge.y=ce+Math.sqrt(Me*Me+ae*ae),ge.cy=ce,h.circle=ge;for(var Ae=null,ke=Dv._;ke;)if(ge.y0)){if(ae/=_e,_e<0){if(ae0){if(ae>re)return;ae>ee&&(ee=ae)}if(ae=A-F,!(!_e&&ae<0)){if(ae/=_e,_e<0){if(ae>re)return;ae>ee&&(ee=ae)}else if(_e>0){if(ae0)){if(ae/=Me,Me<0){if(ae0){if(ae>re)return;ae>ee&&(ee=ae)}if(ae=q-U,!(!Me&&ae<0)){if(ae/=Me,Me<0){if(ae>re)return;ae>ee&&(ee=ae)}else if(Me>0){if(ae0&&(L.a={x:F+ee*_e,y:U+ee*Me}),re<1&&(L.b={x:F+re*_e,y:U+re*Me}),L}}}}}}function sae(h){for(var g=df,A=lae(h[0][0],h[0][1],h[1][0],h[1][1]),q=g.length,L;q--;)L=g[q],(!uae(L,h)||!A(L)||_(L.a.x-L.b.x)=C)return;if($>re){if(!q)q={x:Me,y:I};else if(q.y>=F)return;A={x:Me,y:F}}else{if(!q)q={x:Me,y:F};else if(q.y1)if($>re){if(!q)q={x:(I-ge)/ce,y:I};else if(q.y>=F)return;A={x:(F-ge)/ce,y:F}}else{if(!q)q={x:(F-ge)/ce,y:F};else if(q.y=C)return;A={x:C,y:ce*C+ge}}else{if(!q)q={x:C,y:ce*C+ge};else if(q.x=$&&ge.x<=re&&ge.y>=ee&&ge.y<=_e?[[$,_e],[re,_e],[re,ee],[$,ee]]:[];Ae.point=U[ae]}),J}function F(U){return U.map(function(J,$){return{x:Math.round(q(J,$)/ve)*ve,y:Math.round(L(J,$)/ve)*ve,i:$}})}return I.links=function(U){return S3(F(U)).edges.filter(function(J){return J.l&&J.r}).map(function(J){return{source:U[J.l.i],target:U[J.r.i]}})},I.triangles=function(U){var J=[];return S3(F(U)).cells.forEach(function($,ee){for(var re=$.site,_e=$.edges.sort(S8),Me=-1,ae=_e.length,ce,ge,Ae=_e[ae-1].edge,ke=Ae.l===re?Ae.r:Ae.l;++Meke&&(ke=$.x),$.y>xe&&(xe=$.y),_e.push($.x),Me.push($.y);else for(ae=0;aeke&&(ke=Ve),nr>xe&&(xe=nr),_e.push(Ve),Me.push(nr)}var fr=ke-ge,or=xe-Ae;fr>or?xe=Ae+fr:ke=ge+or;function dr(mr,kr,rt,Jt,yt,tr,Dr,Rr){if(!(isNaN(rt)||isNaN(Jt)))if(mr.leaf){var tt=mr.x,Bt=mr.y;if(tt!=null)if(_(tt-rt)+_(Bt-Jt)<.01)pr(mr,kr,rt,Jt,yt,tr,Dr,Rr);else{var ua=mr.point;mr.x=mr.y=mr.point=null,pr(mr,ua,tt,Bt,yt,tr,Dr,Rr),pr(mr,kr,rt,Jt,yt,tr,Dr,Rr)}else mr.x=rt,mr.y=Jt,mr.point=kr}else pr(mr,kr,rt,Jt,yt,tr,Dr,Rr)}function pr(mr,kr,rt,Jt,yt,tr,Dr,Rr){var tt=(yt+Dr)*.5,Bt=(tr+Rr)*.5,ua=rt>=tt,Oa=Jt>=Bt,an=Oa<<1|ua;mr.leaf=!1,mr=mr.nodes[an]||(mr.nodes[an]=C8()),ua?yt=tt:Dr=tt,Oa?tr=Bt:Rr=Bt,dr(mr,kr,rt,Jt,yt,tr,Dr,Rr)}var Er=C8();if(Er.add=function(mr){dr(Er,mr,+ee(mr,++ae),+re(mr,ae),ge,Ae,ke,xe)},Er.visit=function(mr){Nv(mr,Er,ge,Ae,ke,xe)},Er.find=function(mr){return pae(Er,mr[0],mr[1],ge,Ae,ke,xe)},ae=-1,g==null){for(;++aeC||re>I||_e=Ve,or=A>=nr,dr=or<<1|fr,pr=dr+4;drA&&(C=g.slice(A,C),F[I]?F[I]+=C:F[++I]=C),(q=q[0])===(L=L[0])?F[I]?F[I]+=L:F[++I]=L:(F[++I]=null,U.push({i:I,x:el(q,L)})),A=C3.lastIndex;return A=0&&!(q=e.interpolators[A](h,g)););return q}e.interpolators=[function(h,g){var A=typeof g;return(A==="string"?Ia.has(g.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(g)?q3:D8:g instanceof Pt?q3:Array.isArray(g)?Hd:A==="object"&&isNaN(g)?E8:el)(h,g)}],e.interpolateArray=Hd;function Hd(h,g){var A=[],q=[],L=h.length,C=g.length,I=Math.min(h.length,g.length),F;for(F=0;F=0?h.slice(0,g):h,q=g>=0?h.slice(g+1):"in";return A=yae.get(A)||P8,q=mae.get(q)||H,gae(q(A.apply(null,r.call(arguments,1))))};function gae(h){return function(g){return g<=0?0:g>=1?1:h(g)}}function R8(h){return function(g){return 1-h(1-g)}}function F8(h){return function(g){return .5*(g<.5?h(2*g):2-h(2-2*g))}}function bae(h){return h*h}function xae(h){return h*h*h}function _ae(h){if(h<=0)return 0;if(h>=1)return 1;var g=h*h,A=g*h;return 4*(h<.5?A:3*(h-g)+A-.75)}function wae(h){return function(g){return Math.pow(g,h)}}function Tae(h){return 1-Math.cos(h*ur)}function Aae(h){return Math.pow(2,10*(h-1))}function Mae(h){return 1-Math.sqrt(1-h*h)}function kae(h,g){var A;return arguments.length<2&&(g=.45),arguments.length?A=g/ar*Math.asin(1/h):(h=1,A=g/4),function(q){return 1+h*Math.pow(2,-10*q)*Math.sin((q-A)*ar/g)}}function Sae(h){return h||(h=1.70158),function(g){return g*g*((h+1)*g-h)}}function qae(h){return h<1/2.75?7.5625*h*h:h<2/2.75?7.5625*(h-=1.5/2.75)*h+.75:h<2.5/2.75?7.5625*(h-=2.25/2.75)*h+.9375:7.5625*(h-=2.625/2.75)*h+.984375}e.interpolateHcl=Lae;function Lae(h,g){h=e.hcl(h),g=e.hcl(g);var A=h.h,q=h.c,L=h.l,C=g.h-A,I=g.c-q,F=g.l-L;return isNaN(I)&&(I=0,q=isNaN(q)?g.c:q),isNaN(C)?(C=0,A=isNaN(A)?g.h:A):C>180?C-=360:C<-180&&(C+=360),function(U){return Tn(A+C*U,q+I*U,L+F*U)+""}}e.interpolateHsl=Cae;function Cae(h,g){h=e.hsl(h),g=e.hsl(g);var A=h.h,q=h.s,L=h.l,C=g.h-A,I=g.s-q,F=g.l-L;return isNaN(I)&&(I=0,q=isNaN(q)?g.s:q),isNaN(C)?(C=0,A=isNaN(A)?g.h:A):C>180?C-=360:C<-180&&(C+=360),function(U){return ba(A+C*U,q+I*U,L+F*U)+""}}e.interpolateLab=Eae;function Eae(h,g){h=e.lab(h),g=e.lab(g);var A=h.l,q=h.a,L=h.b,C=g.l-A,I=g.a-q,F=g.b-L;return function(U){return An(A+C*U,q+I*U,L+F*U)+""}}e.interpolateRound=N8;function N8(h,g){return g-=h,function(A){return Math.round(h+g*A)}}e.transform=function(h){var g=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(A){if(A!=null){g.setAttribute("transform",A);var q=g.transform.baseVal.consolidate()}return new z8(q?q.matrix:Pae)})(h)};function z8(h){var g=[h.a,h.b],A=[h.c,h.d],q=O8(g),L=I8(g,A),C=O8(Dae(A,g,-L))||0;g[0]*A[1]180?g+=360:g-h>180&&(h+=360),q.push({i:A.push(gf(A)+"rotate(",null,")")-2,x:el(h,g)})):g&&A.push(gf(A)+"rotate("+g+")")}function Nae(h,g,A,q){h!==g?q.push({i:A.push(gf(A)+"skewX(",null,")")-2,x:el(h,g)}):g&&A.push(gf(A)+"skewX("+g+")")}function zae(h,g,A,q){if(h[0]!==g[0]||h[1]!==g[1]){var L=A.push(gf(A)+"scale(",null,",",null,")");q.push({i:L-4,x:el(h[0],g[0])},{i:L-2,x:el(h[1],g[1])})}else(g[0]!==1||g[1]!==1)&&A.push(gf(A)+"scale("+g+")")}function B8(h,g){var A=[],q=[];return h=e.transform(h),g=e.transform(g),Rae(h.translate,g.translate,A,q),Fae(h.rotate,g.rotate,A,q),Nae(h.skew,g.skew,A,q),zae(h.scale,g.scale,A,q),h=g=null,function(L){for(var C=-1,I=q.length,F;++C0?C=xe:(A.c=null,A.t=NaN,A=null,g.end({type:"end",alpha:C=0})):xe>0&&(g.start({type:"start",alpha:C=xe}),A=Fd(h.tick)),h):C},h.start=function(){var xe,Ve=_e.length,nr=Me.length,fr=q[0],or=q[1],dr,pr;for(xe=0;xe=0;)C.push($=J[U]),$.parent=F,$.depth=F.depth+1;A&&(F.value=0),F.children=J}else A&&(F.value=+A.call(q,F,F.depth)||0),delete F.children;return _o(L,function(ee){var re,_e;h&&(re=ee.children)&&re.sort(h),A&&(_e=ee.parent)&&(_e.value+=ee.value)}),I}return q.sort=function(L){return arguments.length?(h=L,q):h},q.children=function(L){return arguments.length?(g=L,q):g},q.value=function(L){return arguments.length?(A=L,q):A},q.revalue=function(L){return A&&(Iv(L,function(C){C.children&&(C.value=0)}),_o(L,function(C){var I;C.children||(C.value=+A.call(q,C,C.depth)||0),(I=C.parent)&&(I.value+=C.value)})),L},q};function zv(h,g){return e.rebind(h,g,"sort","children","value"),h.nodes=h,h.links=Kae,h}function Iv(h,g){for(var A=[h];(h=A.pop())!=null;)if(g(h),(L=h.children)&&(q=L.length))for(var q,L;--q>=0;)A.push(L[q])}function _o(h,g){for(var A=[h],q=[];(h=A.pop())!=null;)if(q.push(h),(I=h.children)&&(C=I.length))for(var L=-1,C,I;++LL&&(L=F),q.push(F)}for(I=0;Iq&&(A=g,q=L);return A}function ine(h){return h.reduce(one,0)}function one(h,g){return h+g[1]}e.layout.histogram=function(){var h=!0,g=Number,A=sne,q=lne;function L(C,re){for(var F=[],U=C.map(g,this),J=A.call(this,U,re),$=q.call(this,J,U,re),ee,re=-1,_e=U.length,Me=$.length-1,ae=h?1:1/_e,ce;++re0)for(re=-1;++re<_e;)ce=U[re],ce>=J[0]&&ce<=J[1]&&(ee=F[e.bisect($,ce,1,Me)-1],ee.y+=ae,ee.push(C[re]));return F}return L.value=function(C){return arguments.length?(g=C,L):g},L.range=function(C){return arguments.length?(A=Br(C),L):A},L.bins=function(C){return arguments.length?(q=typeof C=="number"?function(I){return Y8(I,C)}:Br(C),L):q},L.frequency=function(C){return arguments.length?(h=!!C,L):h},L};function lne(h,g){return Y8(h,Math.ceil(Math.log(g.length)/Math.LN2+1))}function Y8(h,g){for(var A=-1,q=+h[0],L=(h[1]-q)/g,C=[];++A<=g;)C[A]=L*A+q;return C}function sne(h){return[e.min(h),e.max(h)]}e.layout.pack=function(){var h=e.layout.hierarchy().sort(une),g=0,A=[1,1],q;function L(C,I){var F=h.call(this,C,I),U=F[0],J=A[0],$=A[1],ee=q==null?Math.sqrt:typeof q=="function"?q:function(){return q};if(U.x=U.y=0,_o(U,function(_e){_e.r=+ee(_e.value)}),_o(U,j8),g){var re=g*(q?1:Math.max(2*U.r/J,2*U.r/$))/2;_o(U,function(_e){_e.r+=re}),_o(U,j8),_o(U,function(_e){_e.r-=re})}return Z8(U,J/2,$/2,q?1:1/Math.max(2*U.r/J,2*U.r/$)),F}return L.size=function(C){return arguments.length?(A=C,L):A},L.radius=function(C){return arguments.length?(q=C==null||typeof C=="function"?C:+C,L):q},L.padding=function(C){return arguments.length?(g=+C,L):g},zv(L,h)};function une(h,g){return h.value-g.value}function P3(h,g){var A=h._pack_next;h._pack_next=g,g._pack_prev=h,g._pack_next=A,A._pack_prev=g}function V8(h,g){h._pack_next=g,g._pack_prev=h}function W8(h,g){var A=g.x-h.x,q=g.y-h.y,L=h.r+g.r;return .999*L*L>A*A+q*q}function j8(h){if(!(g=h.children)||!(re=g.length))return;var g,A=1/0,q=-1/0,L=1/0,C=-1/0,I,F,U,J,$,ee,re;function _e(xe){A=Math.min(xe.x-xe.r,A),q=Math.max(xe.x+xe.r,q),L=Math.min(xe.y-xe.r,L),C=Math.max(xe.y+xe.r,C)}if(g.forEach(fne),I=g[0],I.x=-I.r,I.y=0,_e(I),re>1&&(F=g[1],F.x=F.r,F.y=0,_e(F),re>2))for(U=g[2],X8(I,F,U),_e(U),P3(I,U),I._pack_prev=U,P3(U,F),F=I._pack_next,J=3;Jce.x&&(ce=Ve),Ve.depth>ge.depth&&(ge=Ve)});var Ae=g(ae,ce)/2-ae.x,ke=A[0]/(ce.x+g(ce,ae)/2+Ae),xe=A[1]/(ge.depth||1);Iv(_e,function(Ve){Ve.x=(Ve.x+Ae)*ke,Ve.y=Ve.depth*xe})}return re}function C($){for(var ee={A:null,children:[$]},re=[ee],_e;(_e=re.pop())!=null;)for(var Me=_e.children,ae,ce=0,ge=Me.length;ce0&&(vne(dne(ae,$,re),$,Ve),ge+=Ve,Ae+=Ve),ke+=ae.m,ge+=_e.m,xe+=ce.m,Ae+=Me.m;ae&&!F3(Me)&&(Me.t=ae,Me.m+=ke-Ae),_e&&!R3(ce)&&(ce.t=_e,ce.m+=ge-xe,re=$)}return re}function J($){$.x*=A[0],$.y=$.depth*A[1]}return L.separation=function($){return arguments.length?(g=$,L):g},L.size=function($){return arguments.length?(q=(A=$)==null?J:null,L):q?null:A},L.nodeSize=function($){return arguments.length?(q=(A=$)==null?null:J,L):q?A:null},zv(L,h)};function J8(h,g){return h.parent==g.parent?1:2}function R3(h){var g=h.children;return g.length?g[0]:h.t}function F3(h){var g=h.children,A;return(A=g.length)?g[A-1]:h.t}function vne(h,g,A){var q=A/(g.i-h.i);g.c-=q,g.s+=A,h.c+=q,g.z+=A,g.m+=A}function hne(h){for(var g=0,A=0,q=h.children,L=q.length,C;--L>=0;)C=q[L],C.z+=g,C.m+=g,g+=C.s+(A+=C.c)}function dne(h,g,A){return h.a.parent===g.parent?h.a:A}e.layout.cluster=function(){var h=e.layout.hierarchy().sort(null).value(null),g=J8,A=[1,1],q=!1;function L(C,I){var F=h.call(this,C,I),U=F[0],J,$=0;_o(U,function(ae){var ce=ae.children;ce&&ce.length?(ae.x=yne(ce),ae.y=pne(ce)):(ae.x=J?$+=g(ae,J):0,ae.y=0,J=ae)});var ee=$8(U),re=K8(U),_e=ee.x-g(ee,re)/2,Me=re.x+g(re,ee)/2;return _o(U,q?function(ae){ae.x=(ae.x-U.x)*A[0],ae.y=(U.y-ae.y)*A[1]}:function(ae){ae.x=(ae.x-_e)/(Me-_e)*A[0],ae.y=(1-(U.y?ae.y/U.y:1))*A[1]}),F}return L.separation=function(C){return arguments.length?(g=C,L):g},L.size=function(C){return arguments.length?(q=(A=C)==null,L):q?null:A},L.nodeSize=function(C){return arguments.length?(q=(A=C)!=null,L):q?A:null},zv(L,h)};function pne(h){return 1+e.max(h,function(g){return g.y})}function yne(h){return h.reduce(function(g,A){return g+A.x},0)/h.length}function $8(h){var g=h.children;return g&&g.length?$8(g[0]):h}function K8(h){var g=h.children,A;return g&&(A=g.length)?K8(g[A-1]):h}e.layout.treemap=function(){var h=e.layout.hierarchy(),g=Math.round,A=[1,1],q=null,L=N3,C=!1,I,F="squarify",U=.5*(1+Math.sqrt(5));function J(ae,ce){for(var ge=-1,Ae=ae.length,ke,xe;++ge0;)Ae.push(xe=ke[or-1]),Ae.area+=xe.area,F!=="squarify"||(nr=re(Ae,fr))<=Ve?(ke.pop(),Ve=nr):(Ae.area-=Ae.pop().area,_e(Ae,fr,ge,!1),fr=Math.min(ge.dx,ge.dy),Ae.length=Ae.area=0,Ve=1/0);Ae.length&&(_e(Ae,fr,ge,!0),Ae.length=Ae.area=0),ce.forEach($)}}function ee(ae){var ce=ae.children;if(ce&&ce.length){var ge=L(ae),Ae=ce.slice(),ke,xe=[];for(J(Ae,ge.dx*ge.dy/ae.value),xe.area=0;ke=Ae.pop();)xe.push(ke),xe.area+=ke.area,ke.z!=null&&(_e(xe,ke.z?ge.dx:ge.dy,ge,!Ae.length),xe.length=xe.area=0);ce.forEach(ee)}}function re(ae,ce){for(var ge=ae.area,Ae,ke=0,xe=1/0,Ve=-1,nr=ae.length;++Veke&&(ke=Ae));return ge*=ge,ce*=ce,ge?Math.max(ce*ke*U/ge,ge/(ce*xe*U)):1/0}function _e(ae,ce,ge,Ae){var ke=-1,xe=ae.length,Ve=ge.x,nr=ge.y,fr=ce?g(ae.area/ce):0,or;if(ce==ge.dx){for((Ae||fr>ge.dy)&&(fr=ge.dy);++kege.dx)&&(fr=ge.dx);++ke1);return h+g*q*Math.sqrt(-2*Math.log(C)/C)}},logNormal:function(){var h=e.random.normal.apply(e,arguments);return function(){return Math.exp(h())}},bates:function(h){var g=e.random.irwinHall(h);return function(){return g()/h}},irwinHall:function(h){return function(){for(var g=0,A=0;A2?bne:mne,J=q?Oae:Iae;return L=U(h,g,J,A),C=U(g,h,J,Bs),F}function F(U){return L(U)}return F.invert=function(U){return C(U)},F.domain=function(U){return arguments.length?(h=U.map(Number),I()):h},F.range=function(U){return arguments.length?(g=U,I()):g},F.rangeRound=function(U){return F.range(U).interpolate(N8)},F.clamp=function(U){return arguments.length?(q=U,I()):q},F.interpolate=function(U){return arguments.length?(A=U,I()):A},F.ticks=function(U){return O3(h,U)},F.tickFormat=function(U,J){return d3_scale_linearTickFormat(h,U,J)},F.nice=function(U){return aA(h,U),I()},F.copy=function(){return rA(h,g,A,q)},I()}function tA(h,g){return e.rebind(h,g,"range","rangeRound","interpolate","clamp")}function aA(h,g){return z3(h,eA(I3(h,g)[2])),z3(h,eA(I3(h,g)[2])),h}function I3(h,g){g==null&&(g=10);var A=Ud(h),q=A[1]-A[0],L=Math.pow(10,Math.floor(Math.log(q/g)/Math.LN10)),C=g/q*L;return C<=.15?L*=10:C<=.35?L*=5:C<=.75&&(L*=2),A[0]=Math.ceil(A[0]/L)*L,A[1]=Math.floor(A[1]/L)*L+L*.5,A[2]=L,A}function O3(h,g){return e.range.apply(e,I3(h,g))}var xne={s:1,g:1,p:1,r:1,e:1};function nA(h){return-Math.floor(Math.log(h)/Math.LN10+.01)}function Uqe(h,g){var A=nA(g[2]);return h in xne?Math.abs(A-nA(Math.max(_(g[0]),_(g[1]))))+ +(h!=="e"):A-(h==="%")*2}e.scale.log=function(){return iA(e.scale.linear().domain([0,1]),10,!0,[1,10])};function iA(h,g,A,q){function L(F){return(A?Math.log(F<0?0:F):-Math.log(F>0?0:-F))/Math.log(g)}function C(F){return A?Math.pow(g,F):-Math.pow(g,-F)}function I(F){return h(L(F))}return I.invert=function(F){return C(h.invert(F))},I.domain=function(F){return arguments.length?(A=F[0]>=0,h.domain((q=F.map(Number)).map(L)),I):q},I.base=function(F){return arguments.length?(g=+F,h.domain(q.map(L)),I):g},I.nice=function(){var F=z3(q.map(L),A?Math:_ne);return h.domain(F),q=F.map(C),I},I.ticks=function(){var F=Ud(q),U=[],J=F[0],$=F[1],ee=Math.floor(L(J)),re=Math.ceil(L($)),_e=g%1?2:g;if(isFinite(re-ee)){if(A){for(;ee0;Me--)U.push(C(ee)*Me);for(ee=0;U[ee]$;re--);U=U.slice(ee,re)}return U},I.copy=function(){return iA(h.copy(),g,A,q)},tA(I,h)}var _ne={floor:function(h){return-Math.ceil(-h)},ceil:function(h){return-Math.floor(-h)}};e.scale.pow=function(){return oA(e.scale.linear(),1,[0,1])};function oA(h,g,A){var q=Yd(g),L=Yd(1/g);function C(I){return h(q(I))}return C.invert=function(I){return L(h.invert(I))},C.domain=function(I){return arguments.length?(h.domain((A=I.map(Number)).map(q)),C):A},C.ticks=function(I){return O3(A,I)},C.tickFormat=function(I,F){return d3_scale_linearTickFormat(A,I,F)},C.nice=function(I){return C.domain(aA(A,I))},C.exponent=function(I){return arguments.length?(q=Yd(g=I),L=Yd(1/g),h.domain(A.map(q)),C):g},C.copy=function(){return oA(h.copy(),g,A)},tA(C,h)}function Yd(h){return function(g){return g<0?-Math.pow(-g,h):Math.pow(g,h)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return lA([],{t:"range",a:[[]]})};function lA(h,g){var A,q,L;function C(F){return q[((A.get(F)||(g.t==="range"?A.set(F,h.push(F)):NaN))-1)%q.length]}function I(F,U){return e.range(h.length).map(function(J){return F+U*J})}return C.domain=function(F){if(!arguments.length)return h;h=[],A=new x;for(var U=-1,J=F.length,$;++U0?A[C-1]:h[0],Cre?0:1;if($=hr)return U($,Me)+(J?U(J,1-Me):"")+"Z";var ae,ce,ge,Ae,ke=0,xe=0,Ve,nr,fr,or,dr,pr,Er,mr,kr=[];if((Ae=(+I.apply(this,arguments)||0)/2)&&(ge=q===Vd?Math.sqrt(J*J+$*$):+q.apply(this,arguments),Me||(xe*=-1),$&&(xe=Dt(ge/$*Math.sin(Ae))),J&&(ke=Dt(ge/J*Math.sin(Ae)))),$){Ve=$*Math.cos(ee+xe),nr=$*Math.sin(ee+xe),fr=$*Math.cos(re-xe),or=$*Math.sin(re-xe);var rt=Math.abs(re-ee-2*xe)<=qe?0:1;if(xe&&Wd(Ve,nr,fr,or)===Me^rt){var Jt=(ee+re)/2;Ve=$*Math.cos(Jt),nr=$*Math.sin(Jt),fr=or=null}}else Ve=nr=0;if(J){dr=J*Math.cos(re-ke),pr=J*Math.sin(re-ke),Er=J*Math.cos(ee+ke),mr=J*Math.sin(ee+ke);var yt=Math.abs(ee-re+2*ke)<=qe?0:1;if(ke&&Wd(dr,pr,Er,mr)===1-Me^yt){var tr=(ee+re)/2;dr=J*Math.cos(tr),pr=J*Math.sin(tr),Er=mr=null}}else dr=pr=0;if(_e>ve&&(ae=Math.min(Math.abs($-J)/2,+A.apply(this,arguments)))>.001){ce=J<$^Me?0:1;var Dr=ae,Rr=ae;if(_e0?0:1}function jd(h,g,A,q,L){var C=h[0]-g[0],I=h[1]-g[1],F=(L?q:-q)/Math.sqrt(C*C+I*I),U=F*I,J=-F*C,$=h[0]+U,ee=h[1]+J,re=g[0]+U,_e=g[1]+J,Me=($+re)/2,ae=(ee+_e)/2,ce=re-$,ge=_e-ee,Ae=ce*ce+ge*ge,ke=A-q,xe=$*_e-re*ee,Ve=(ge<0?-1:1)*Math.sqrt(Math.max(0,ke*ke*Ae-xe*xe)),nr=(xe*ge-ce*Ve)/Ae,fr=(-xe*ce-ge*Ve)/Ae,or=(xe*ge+ce*Ve)/Ae,dr=(-xe*ce+ge*Ve)/Ae,pr=nr-Me,Er=fr-ae,mr=or-Me,kr=dr-ae;return pr*pr+Er*Er>mr*mr+kr*kr&&(nr=or,fr=dr),[[nr-U,fr-J],[nr*A/ke,fr*A/ke]]}function dA(){return!0}function pA(h){var g=hf,A=Ev,q=dA,L=Wi,C=L.key,I=.7;function F(U){var J=[],$=[],ee=-1,re=U.length,_e,Me=Br(g),ae=Br(A);function ce(){J.push("M",L(h($),I))}for(;++ee1?h.join("L"):h+"Z"}function yA(h){return h.join("L")+"Z"}function Cne(h){for(var g=0,A=h.length,q=h[0],L=[q[0],",",q[1]];++g1&&L.push("H",q[0]),L.join("")}function H3(h){for(var g=0,A=h.length,q=h[0],L=[q[0],",",q[1]];++g1){F=g[1],C=h[U],U++,q+="C"+(L[0]+I[0])+","+(L[1]+I[1])+","+(C[0]-F[0])+","+(C[1]-F[1])+","+C[0]+","+C[1];for(var J=2;J9&&(C=A*3/Math.sqrt(C),I[F]=C*q,I[F+1]=C*L));for(F=-1;++F<=U;)C=(h[Math.min(U,F+1)][0]-h[Math.max(0,F-1)][0])/(6*(1+I[F]*I[F])),g.push([C||0,I[F]*C||0]);return g}function One(h){return h.length<3?Wi(h):h[0]+Zd(h,Ine(h))}e.svg.line.radial=function(){var h=pA(xA);return h.radius=h.x,delete h.x,h.angle=h.y,delete h.y,h};function xA(h){for(var g,A=-1,q=h.length,L,C;++Aqe)+",1 "+ee}function J($,ee,re,_e){return"Q 0,0 "+_e}return C.radius=function($){return arguments.length?(A=Br($),C):A},C.source=function($){return arguments.length?(h=Br($),C):h},C.target=function($){return arguments.length?(g=Br($),C):g},C.startAngle=function($){return arguments.length?(q=Br($),C):q},C.endAngle=function($){return arguments.length?(L=Br($),C):L},C};function Bne(h){return h.radius}e.svg.diagonal=function(){var h=wA,g=TA,A=AA;function q(L,C){var I=h.call(this,L,C),F=g.call(this,L,C),U=(I.y+F.y)/2,J=[I,{x:I.x,y:U},{x:F.x,y:U},F];return J=J.map(A),"M"+J[0]+"C"+J[1]+" "+J[2]+" "+J[3]}return q.source=function(L){return arguments.length?(h=Br(L),q):h},q.target=function(L){return arguments.length?(g=Br(L),q):g},q.projection=function(L){return arguments.length?(A=L,q):A},q};function AA(h){return[h.x,h.y]}e.svg.diagonal.radial=function(){var h=e.svg.diagonal(),g=AA,A=h.projection;return h.projection=function(q){return arguments.length?A(Hne(g=q)):g},h};function Hne(h){return function(){var g=h.apply(this,arguments),A=g[0],q=g[1]-ur;return[A*Math.cos(q),A*Math.sin(q)]}}e.svg.symbol=function(){var h=Gne,g=Une;function A(q,L){return(kA.get(h.call(this,q,L))||MA)(g.call(this,q,L))}return A.type=function(q){return arguments.length?(h=Br(q),A):h},A.size=function(q){return arguments.length?(g=Br(q),A):g},A};function Une(){return 64}function Gne(){return"circle"}function MA(h){var g=Math.sqrt(h/qe);return"M0,"+g+"A"+g+","+g+" 0 1,1 0,"+-g+"A"+g+","+g+" 0 1,1 0,"+g+"Z"}var kA=e.map({circle:MA,cross:function(h){var g=Math.sqrt(h/5)/2;return"M"+-3*g+","+-g+"H"+-g+"V"+-3*g+"H"+g+"V"+-g+"H"+3*g+"V"+g+"H"+g+"V"+3*g+"H"+-g+"V"+g+"H"+-3*g+"Z"},diamond:function(h){var g=Math.sqrt(h/(2*SA)),A=g*SA;return"M0,"+-g+"L"+A+",0 0,"+g+" "+-A+",0Z"},square:function(h){var g=Math.sqrt(h)/2;return"M"+-g+","+-g+"L"+g+","+-g+" "+g+","+g+" "+-g+","+g+"Z"},"triangle-down":function(h){var g=Math.sqrt(h/Xd),A=g*Xd/2;return"M0,"+A+"L"+g+","+-A+" "+-g+","+-A+"Z"},"triangle-up":function(h){var g=Math.sqrt(h/Xd),A=g*Xd/2;return"M0,"+-A+"L"+g+","+A+" "+-g+","+A+"Z"}});e.svg.symbolTypes=kA.keys();var Xd=Math.sqrt(3),SA=Math.tan(30*Ar);de.transition=function(h){for(var g=Hs||++LA,A=j3(h),q=[],L,C,I=$d||{time:Date.now(),ease:_ae,delay:0,duration:250},F=-1,U=this.length;++F0;)ee[--Ae].call(h,ge);if(ce>=1)return I.event&&I.event.end.call(h,h.__data__,g),--C.count?delete C[q]:delete h[A],1}I||(F=L.time,U=Fd(re,0,F),I=C[q]={tween:new x,time:F,timer:U,delay:L.delay,duration:L.duration,ease:L.ease,index:g},L=null,++C.count)}e.svg.axis=function(){var h=e.scale.linear(),g=CA,A=6,q=6,L=3,C=[10],I=null,F;function U(J){J.each(function(){var $=e.select(this),ee=this.__chart__||h,re=this.__chart__=h.copy(),_e=I==null?re.ticks?re.ticks.apply(re,C):re.domain():I,Me=F==null?re.tickFormat?re.tickFormat.apply(re,C):H:F,ae=$.selectAll(".tick").data(_e,re),ce=ae.enter().insert("g",".domain").attr("class","tick").style("opacity",ve),ge=e.transition(ae.exit()).style("opacity",ve).remove(),Ae=e.transition(ae.order()).style("opacity",1),ke=Math.max(A,0)+L,xe,Ve=Gd(re),nr=$.selectAll(".domain").data([0]),fr=(nr.enter().append("path").attr("class","domain"),e.transition(nr));ce.append("line"),ce.append("text");var or=ce.select("line"),dr=Ae.select("line"),pr=ae.select("text").text(Me),Er=ce.select("text"),mr=Ae.select("text"),kr=g==="top"||g==="left"?-1:1,rt,Jt,yt,tr;if(g==="bottom"||g==="top"?(xe=Wne,rt="x",yt="y",Jt="x2",tr="y2",pr.attr("dy",kr<0?"0em":".71em").style("text-anchor","middle"),fr.attr("d","M"+Ve[0]+","+kr*q+"V0H"+Ve[1]+"V"+kr*q)):(xe=jne,rt="y",yt="x",Jt="y2",tr="x2",pr.attr("dy",".32em").style("text-anchor",kr<0?"end":"start"),fr.attr("d","M"+kr*q+","+Ve[0]+"H0V"+Ve[1]+"H"+kr*q)),or.attr(tr,kr*A),Er.attr(yt,kr*ke),dr.attr(Jt,0).attr(tr,kr*A),mr.attr(rt,0).attr(yt,kr*ke),re.rangeBand){var Dr=re,Rr=Dr.rangeBand()/2;ee=re=function(tt){return Dr(tt)+Rr}}else ee.rangeBand?ee=re:ge.call(xe,re,ee);ce.call(xe,ee,re),Ae.call(xe,re,re)})}return U.scale=function(J){return arguments.length?(h=J,U):h},U.orient=function(J){return arguments.length?(g=J in Vne?J+"":CA,U):g},U.ticks=function(){return arguments.length?(C=t(arguments),U):C},U.tickValues=function(J){return arguments.length?(I=J,U):I},U.tickFormat=function(J){return arguments.length?(F=J,U):F},U.tickSize=function(J){var $=arguments.length;return $?(A=+J,q=+arguments[$-1],U):A},U.innerTickSize=function(J){return arguments.length?(A=+J,U):A},U.outerTickSize=function(J){return arguments.length?(q=+J,U):q},U.tickPadding=function(J){return arguments.length?(L=+J,U):L},U.tickSubdivide=function(){return arguments.length&&U},U};var CA="bottom",Vne={top:1,right:1,bottom:1,left:1};function Wne(h,g,A){h.attr("transform",function(q){var L=g(q);return"translate("+(isFinite(L)?L:A(q))+",0)"})}function jne(h,g,A){h.attr("transform",function(q){var L=g(q);return"translate(0,"+(isFinite(L)?L:A(q))+")"})}e.svg.brush=function(){var h=le($,"brushstart","brush","brushend"),g=null,A=null,q=[0,0],L=[0,0],C,I,F=!0,U=!0,J=Z3[0];function $(ae){ae.each(function(){var ce=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Me).on("touchstart.brush",Me),ge=ce.selectAll(".background").data([0]);ge.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ce.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ae=ce.selectAll(".resize").data(J,H);Ae.exit().remove(),Ae.enter().append("g").attr("class",function(nr){return"resize "+nr}).style("cursor",function(nr){return Zne[nr]}).append("rect").attr("x",function(nr){return/[ew]$/.test(nr)?-3:null}).attr("y",function(nr){return/^[ns]/.test(nr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ae.style("display",$.empty()?"none":null);var ke=e.transition(ce),xe=e.transition(ge),Ve;g&&(Ve=Gd(g),xe.attr("x",Ve[0]).attr("width",Ve[1]-Ve[0]),re(ke)),A&&(Ve=Gd(A),xe.attr("y",Ve[0]).attr("height",Ve[1]-Ve[0]),_e(ke)),ee(ke)})}$.event=function(ae){ae.each(function(){var ce=h.of(this,arguments),ge={x:q,y:L,i:C,j:I},Ae=this.__chart__||ge;this.__chart__=ge,Hs?e.select(this).transition().each("start.brush",function(){C=Ae.i,I=Ae.j,q=Ae.x,L=Ae.y,ce({type:"brushstart"})}).tween("brush:brush",function(){var ke=Hd(q,ge.x),xe=Hd(L,ge.y);return C=I=null,function(Ve){q=ge.x=ke(Ve),L=ge.y=xe(Ve),ce({type:"brush",mode:"resize"})}}).each("end.brush",function(){C=ge.i,I=ge.j,ce({type:"brush",mode:"resize"}),ce({type:"brushend"})}):(ce({type:"brushstart"}),ce({type:"brush",mode:"resize"}),ce({type:"brushend"}))})};function ee(ae){ae.selectAll(".resize").attr("transform",function(ce){return"translate("+q[+/e$/.test(ce)]+","+L[+/^s/.test(ce)]+")"})}function re(ae){ae.select(".extent").attr("x",q[0]),ae.selectAll(".extent,.n>rect,.s>rect").attr("width",q[1]-q[0])}function _e(ae){ae.select(".extent").attr("y",L[0]),ae.selectAll(".extent,.e>rect,.w>rect").attr("height",L[1]-L[0])}function Me(){var ae=this,ce=e.select(e.event.target),ge=h.of(ae,arguments),Ae=e.select(ae),ke=ce.datum(),xe=!/^(n|s)$/.test(ke)&&g,Ve=!/^(e|w)$/.test(ke)&&A,nr=ce.classed("extent"),fr=cr(ae),or,dr=e.mouse(ae),pr,Er=e.select(i(ae)).on("keydown.brush",rt).on("keyup.brush",Jt);if(e.event.changedTouches?Er.on("touchmove.brush",yt).on("touchend.brush",Dr):Er.on("mousemove.brush",yt).on("mouseup.brush",Dr),Ae.interrupt().selectAll("*").interrupt(),nr)dr[0]=q[0]-dr[0],dr[1]=L[0]-dr[1];else if(ke){var mr=+/w$/.test(ke),kr=+/^n/.test(ke);pr=[q[1-mr]-dr[0],L[1-kr]-dr[1]],dr[0]=q[mr],dr[1]=L[kr]}else e.event.altKey&&(or=dr.slice());Ae.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ce.style("cursor")),ge({type:"brushstart"}),yt();function rt(){e.event.keyCode==32&&(nr||(or=null,dr[0]-=q[1],dr[1]-=L[1],nr=2),te())}function Jt(){e.event.keyCode==32&&nr==2&&(dr[0]+=q[1],dr[1]+=L[1],nr=0,te())}function yt(){var Rr=e.mouse(ae),tt=!1;pr&&(Rr[0]+=pr[0],Rr[1]+=pr[1]),nr||(e.event.altKey?(or||(or=[(q[0]+q[1])/2,(L[0]+L[1])/2]),dr[0]=q[+(Rr[0]{(function(e,r){typeof ap=="object"&&typeof zA!="undefined"?r(ap):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(ap,function(e){"use strict";var r=new Date,t=new Date;function a(se,Te,Se,ir){function Qe(Le){return se(Le=arguments.length===0?new Date:new Date(+Le)),Le}return Qe.floor=function(Le){return se(Le=new Date(+Le)),Le},Qe.ceil=function(Le){return se(Le=new Date(Le-1)),Te(Le,1),se(Le),Le},Qe.round=function(Le){var Ce=Qe(Le),Ge=Qe.ceil(Le);return Le-Ce0))return Ze;do Ze.push(Ye=new Date(+Le)),Te(Le,Ge),se(Le);while(Ye=Ce)for(;se(Ce),!Le(Ce);)Ce.setTime(Ce-1)},function(Ce,Ge){if(Ce>=Ce)if(Ge<0)for(;++Ge<=0;)for(;Te(Ce,-1),!Le(Ce););else for(;--Ge>=0;)for(;Te(Ce,1),!Le(Ce););})},Se&&(Qe.count=function(Le,Ce){return r.setTime(+Le),t.setTime(+Ce),se(r),se(t),Math.floor(Se(r,t))},Qe.every=function(Le){return Le=Math.floor(Le),!isFinite(Le)||!(Le>0)?null:Le>1?Qe.filter(ir?function(Ce){return ir(Ce)%Le===0}:function(Ce){return Qe.count(0,Ce)%Le===0}):Qe}),Qe}var n=a(function(){},function(se,Te){se.setTime(+se+Te)},function(se,Te){return Te-se});n.every=function(se){return se=Math.floor(se),!isFinite(se)||!(se>0)?null:se>1?a(function(Te){Te.setTime(Math.floor(Te/se)*se)},function(Te,Se){Te.setTime(+Te+Se*se)},function(Te,Se){return(Se-Te)/se}):n};var i=n.range,o=1e3,l=6e4,s=36e5,u=864e5,f=6048e5,c=a(function(se){se.setTime(se-se.getMilliseconds())},function(se,Te){se.setTime(+se+Te*o)},function(se,Te){return(Te-se)/o},function(se){return se.getUTCSeconds()}),v=c.range,d=a(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*o)},function(se,Te){se.setTime(+se+Te*l)},function(se,Te){return(Te-se)/l},function(se){return se.getMinutes()}),p=d.range,m=a(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*o-se.getMinutes()*l)},function(se,Te){se.setTime(+se+Te*s)},function(se,Te){return(Te-se)/s},function(se){return se.getHours()}),y=m.range,_=a(function(se){se.setHours(0,0,0,0)},function(se,Te){se.setDate(se.getDate()+Te)},function(se,Te){return(Te-se-(Te.getTimezoneOffset()-se.getTimezoneOffset())*l)/u},function(se){return se.getDate()-1}),b=_.range;function w(se){return a(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-se)%7),Te.setHours(0,0,0,0)},function(Te,Se){Te.setDate(Te.getDate()+Se*7)},function(Te,Se){return(Se-Te-(Se.getTimezoneOffset()-Te.getTimezoneOffset())*l)/f})}var x=w(0),T=w(1),k=w(2),M=w(3),S=w(4),E=w(5),P=w(6),R=x.range,D=T.range,z=k.range,O=M.range,H=S.range,V=E.range,G=P.range,B=a(function(se){se.setDate(1),se.setHours(0,0,0,0)},function(se,Te){se.setMonth(se.getMonth()+Te)},function(se,Te){return Te.getMonth()-se.getMonth()+(Te.getFullYear()-se.getFullYear())*12},function(se){return se.getMonth()}),Y=B.range,X=a(function(se){se.setMonth(0,1),se.setHours(0,0,0,0)},function(se,Te){se.setFullYear(se.getFullYear()+Te)},function(se,Te){return Te.getFullYear()-se.getFullYear()},function(se){return se.getFullYear()});X.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:a(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/se)*se),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Se){Te.setFullYear(Te.getFullYear()+Se*se)})};var Z=X.range,te=a(function(se){se.setUTCSeconds(0,0)},function(se,Te){se.setTime(+se+Te*l)},function(se,Te){return(Te-se)/l},function(se){return se.getUTCMinutes()}),fe=te.range,le=a(function(se){se.setUTCMinutes(0,0,0)},function(se,Te){se.setTime(+se+Te*s)},function(se,Te){return(Te-se)/s},function(se){return se.getUTCHours()}),ie=le.range,K=a(function(se){se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCDate(se.getUTCDate()+Te)},function(se,Te){return(Te-se)/u},function(se){return se.getUTCDate()-1}),he=K.range;function oe(se){return a(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-se)%7),Te.setUTCHours(0,0,0,0)},function(Te,Se){Te.setUTCDate(Te.getUTCDate()+Se*7)},function(Te,Se){return(Se-Te)/f})}var ye=oe(0),ue=oe(1),de=oe(2),W=oe(3),Q=oe(4),j=oe(5),pe=oe(6),me=ye.range,we=ue.range,Ne=de.range,Fe=W.range,Re=Q.range,Ie=j.range,Be=pe.range,ze=a(function(se){se.setUTCDate(1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCMonth(se.getUTCMonth()+Te)},function(se,Te){return Te.getUTCMonth()-se.getUTCMonth()+(Te.getUTCFullYear()-se.getUTCFullYear())*12},function(se){return se.getUTCMonth()}),Pe=ze.range,Xe=a(function(se){se.setUTCMonth(0,1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCFullYear(se.getUTCFullYear()+Te)},function(se,Te){return Te.getUTCFullYear()-se.getUTCFullYear()},function(se){return se.getUTCFullYear()});Xe.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:a(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/se)*se),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Se){Te.setUTCFullYear(Te.getUTCFullYear()+Se*se)})};var Ue=Xe.range;e.timeDay=_,e.timeDays=b,e.timeFriday=E,e.timeFridays=V,e.timeHour=m,e.timeHours=y,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=T,e.timeMondays=D,e.timeMonth=B,e.timeMonths=Y,e.timeSaturday=P,e.timeSaturdays=G,e.timeSecond=c,e.timeSeconds=v,e.timeSunday=x,e.timeSundays=R,e.timeThursday=S,e.timeThursdays=H,e.timeTuesday=k,e.timeTuesdays=z,e.timeWednesday=M,e.timeWednesdays=O,e.timeWeek=x,e.timeWeeks=R,e.timeYear=X,e.timeYears=Z,e.utcDay=K,e.utcDays=he,e.utcFriday=j,e.utcFridays=Ie,e.utcHour=le,e.utcHours=ie,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=te,e.utcMinutes=fe,e.utcMonday=ue,e.utcMondays=we,e.utcMonth=ze,e.utcMonths=Pe,e.utcSaturday=pe,e.utcSaturdays=Be,e.utcSecond=c,e.utcSeconds=v,e.utcSunday=ye,e.utcSundays=me,e.utcThursday=Q,e.utcThursdays=Re,e.utcTuesday=de,e.utcTuesdays=Ne,e.utcWednesday=W,e.utcWednesdays=Fe,e.utcWeek=ye,e.utcWeeks=me,e.utcYear=Xe,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var xf=N((np,IA)=>{(function(e,r){typeof np=="object"&&typeof IA!="undefined"?r(np,X3()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(np,function(e,r){"use strict";function t(ne){if(0<=ne.y&&ne.y<100){var ve=new Date(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L);return ve.setFullYear(ne.y),ve}return new Date(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L)}function a(ne){if(0<=ne.y&&ne.y<100){var ve=new Date(Date.UTC(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L));return ve.setUTCFullYear(ne.y),ve}return new Date(Date.UTC(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L))}function n(ne,ve,De){return{y:ne,m:ve,d:De,H:0,M:0,S:0,L:0}}function i(ne){var ve=ne.dateTime,De=ne.date,qe=ne.time,ar=ne.periods,hr=ne.days,ur=ne.shortDays,Ar=ne.months,Wr=ne.shortMonths,Vr=v(ar),zr=d(ar),Et=v(hr),Dt=d(hr),ma=v(ur),St=d(ur),ja=v(Ar),ga=d(Ar),jt=v(Wr),Na=d(Wr),br={a:Ko,A:Qo,b:vt,B:An,c:null,d:B,e:B,f:fe,H:Y,I:X,j:Z,L:te,m:le,M:ie,p:Rt,q:zs,Q:Ce,s:Ge,S:K,u:he,U:oe,V:ye,w:ue,W:de,x:null,X:null,y:W,Y:Q,Z:j,"%":Le},pt={a:pn,A:Gi,b:Ut,B:Yi,c:null,d:pe,e:pe,f:Re,H:me,I:we,j:Ne,L:Fe,m:Ie,M:Be,p:Pl,q:Rl,Q:Ce,s:Ge,S:ze,u:Pe,U:Xe,V:Ue,w:se,W:Te,x:null,X:null,y:Se,Y:ir,Z:Qe,"%":Le},Nr={a:ba,A:Zt,b:tn,B:Tn,c:Xt,d:S,e:S,f:O,H:P,I:P,j:E,L:z,m:M,M:R,p:ct,q:k,Q:V,s:G,S:D,u:m,U:y,V:_,w:p,W:b,x:ut,X:xa,y:x,Y:w,Z:T,"%":H};br.x=st(De,br),br.X=st(qe,br),br.c=st(ve,br),pt.x=st(De,pt),pt.X=st(qe,pt),pt.c=st(ve,pt);function st(yr,$r){return function(ht){var sr=[],za=-1,At=0,Ia=yr.length,Br,Vi,Is;for(ht instanceof Date||(ht=new Date(+ht));++za53)return null;"w"in sr||(sr.w=1),"Z"in sr?(At=a(n(sr.y,0,1)),Ia=At.getUTCDay(),At=Ia>4||Ia===0?r.utcMonday.ceil(At):r.utcMonday(At),At=r.utcDay.offset(At,(sr.V-1)*7),sr.y=At.getUTCFullYear(),sr.m=At.getUTCMonth(),sr.d=At.getUTCDate()+(sr.w+6)%7):(At=t(n(sr.y,0,1)),Ia=At.getDay(),At=Ia>4||Ia===0?r.timeMonday.ceil(At):r.timeMonday(At),At=r.timeDay.offset(At,(sr.V-1)*7),sr.y=At.getFullYear(),sr.m=At.getMonth(),sr.d=At.getDate()+(sr.w+6)%7)}else("W"in sr||"U"in sr)&&("w"in sr||(sr.w="u"in sr?sr.u%7:"W"in sr?1:0),Ia="Z"in sr?a(n(sr.y,0,1)).getUTCDay():t(n(sr.y,0,1)).getDay(),sr.m=0,sr.d="W"in sr?(sr.w+6)%7+sr.W*7-(Ia+5)%7:sr.w+sr.U*7-(Ia+6)%7);return"Z"in sr?(sr.H+=sr.Z/100|0,sr.M+=sr.Z%100,a(sr)):t(sr)}}function Qr(yr,$r,ht,sr){for(var za=0,At=$r.length,Ia=ht.length,Br,Vi;za=Ia)return-1;if(Br=$r.charCodeAt(za++),Br===37){if(Br=$r.charAt(za++),Vi=Nr[Br in o?$r.charAt(za++):Br],!Vi||(sr=Vi(yr,ht,sr))<0)return-1}else if(Br!=ht.charCodeAt(sr++))return-1}return sr}function ct(yr,$r,ht){var sr=Vr.exec($r.slice(ht));return sr?(yr.p=zr[sr[0].toLowerCase()],ht+sr[0].length):-1}function ba(yr,$r,ht){var sr=ma.exec($r.slice(ht));return sr?(yr.w=St[sr[0].toLowerCase()],ht+sr[0].length):-1}function Zt(yr,$r,ht){var sr=Et.exec($r.slice(ht));return sr?(yr.w=Dt[sr[0].toLowerCase()],ht+sr[0].length):-1}function tn(yr,$r,ht){var sr=jt.exec($r.slice(ht));return sr?(yr.m=Na[sr[0].toLowerCase()],ht+sr[0].length):-1}function Tn(yr,$r,ht){var sr=ja.exec($r.slice(ht));return sr?(yr.m=ga[sr[0].toLowerCase()],ht+sr[0].length):-1}function Xt(yr,$r,ht){return Qr(yr,ve,$r,ht)}function ut(yr,$r,ht){return Qr(yr,De,$r,ht)}function xa(yr,$r,ht){return Qr(yr,qe,$r,ht)}function Ko(yr){return ur[yr.getDay()]}function Qo(yr){return hr[yr.getDay()]}function vt(yr){return Wr[yr.getMonth()]}function An(yr){return Ar[yr.getMonth()]}function Rt(yr){return ar[+(yr.getHours()>=12)]}function zs(yr){return 1+~~(yr.getMonth()/3)}function pn(yr){return ur[yr.getUTCDay()]}function Gi(yr){return hr[yr.getUTCDay()]}function Ut(yr){return Wr[yr.getUTCMonth()]}function Yi(yr){return Ar[yr.getUTCMonth()]}function Pl(yr){return ar[+(yr.getUTCHours()>=12)]}function Rl(yr){return 1+~~(yr.getUTCMonth()/3)}return{format:function(yr){var $r=st(yr+="",br);return $r.toString=function(){return yr},$r},parse:function(yr){var $r=Pt(yr+="",!1);return $r.toString=function(){return yr},$r},utcFormat:function(yr){var $r=st(yr+="",pt);return $r.toString=function(){return yr},$r},utcParse:function(yr){var $r=Pt(yr+="",!0);return $r.toString=function(){return yr},$r}}}var o={"-":"",_:" ",0:"0"},l=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(ne,ve,De){var qe=ne<0?"-":"",ar=(qe?-ne:ne)+"",hr=ar.length;return qe+(hr68?1900:2e3),De+qe[0].length):-1}function T(ne,ve,De){var qe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ve.slice(De,De+6));return qe?(ne.Z=qe[1]?0:-(qe[2]+(qe[3]||"00")),De+qe[0].length):-1}function k(ne,ve,De){var qe=l.exec(ve.slice(De,De+1));return qe?(ne.q=qe[0]*3-3,De+qe[0].length):-1}function M(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.m=qe[0]-1,De+qe[0].length):-1}function S(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.d=+qe[0],De+qe[0].length):-1}function E(ne,ve,De){var qe=l.exec(ve.slice(De,De+3));return qe?(ne.m=0,ne.d=+qe[0],De+qe[0].length):-1}function P(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.H=+qe[0],De+qe[0].length):-1}function R(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.M=+qe[0],De+qe[0].length):-1}function D(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.S=+qe[0],De+qe[0].length):-1}function z(ne,ve,De){var qe=l.exec(ve.slice(De,De+3));return qe?(ne.L=+qe[0],De+qe[0].length):-1}function O(ne,ve,De){var qe=l.exec(ve.slice(De,De+6));return qe?(ne.L=Math.floor(qe[0]/1e3),De+qe[0].length):-1}function H(ne,ve,De){var qe=s.exec(ve.slice(De,De+1));return qe?De+qe[0].length:-1}function V(ne,ve,De){var qe=l.exec(ve.slice(De));return qe?(ne.Q=+qe[0],De+qe[0].length):-1}function G(ne,ve,De){var qe=l.exec(ve.slice(De));return qe?(ne.s=+qe[0],De+qe[0].length):-1}function B(ne,ve){return f(ne.getDate(),ve,2)}function Y(ne,ve){return f(ne.getHours(),ve,2)}function X(ne,ve){return f(ne.getHours()%12||12,ve,2)}function Z(ne,ve){return f(1+r.timeDay.count(r.timeYear(ne),ne),ve,3)}function te(ne,ve){return f(ne.getMilliseconds(),ve,3)}function fe(ne,ve){return te(ne,ve)+"000"}function le(ne,ve){return f(ne.getMonth()+1,ve,2)}function ie(ne,ve){return f(ne.getMinutes(),ve,2)}function K(ne,ve){return f(ne.getSeconds(),ve,2)}function he(ne){var ve=ne.getDay();return ve===0?7:ve}function oe(ne,ve){return f(r.timeSunday.count(r.timeYear(ne)-1,ne),ve,2)}function ye(ne,ve){var De=ne.getDay();return ne=De>=4||De===0?r.timeThursday(ne):r.timeThursday.ceil(ne),f(r.timeThursday.count(r.timeYear(ne),ne)+(r.timeYear(ne).getDay()===4),ve,2)}function ue(ne){return ne.getDay()}function de(ne,ve){return f(r.timeMonday.count(r.timeYear(ne)-1,ne),ve,2)}function W(ne,ve){return f(ne.getFullYear()%100,ve,2)}function Q(ne,ve){return f(ne.getFullYear()%1e4,ve,4)}function j(ne){var ve=ne.getTimezoneOffset();return(ve>0?"-":(ve*=-1,"+"))+f(ve/60|0,"0",2)+f(ve%60,"0",2)}function pe(ne,ve){return f(ne.getUTCDate(),ve,2)}function me(ne,ve){return f(ne.getUTCHours(),ve,2)}function we(ne,ve){return f(ne.getUTCHours()%12||12,ve,2)}function Ne(ne,ve){return f(1+r.utcDay.count(r.utcYear(ne),ne),ve,3)}function Fe(ne,ve){return f(ne.getUTCMilliseconds(),ve,3)}function Re(ne,ve){return Fe(ne,ve)+"000"}function Ie(ne,ve){return f(ne.getUTCMonth()+1,ve,2)}function Be(ne,ve){return f(ne.getUTCMinutes(),ve,2)}function ze(ne,ve){return f(ne.getUTCSeconds(),ve,2)}function Pe(ne){var ve=ne.getUTCDay();return ve===0?7:ve}function Xe(ne,ve){return f(r.utcSunday.count(r.utcYear(ne)-1,ne),ve,2)}function Ue(ne,ve){var De=ne.getUTCDay();return ne=De>=4||De===0?r.utcThursday(ne):r.utcThursday.ceil(ne),f(r.utcThursday.count(r.utcYear(ne),ne)+(r.utcYear(ne).getUTCDay()===4),ve,2)}function se(ne){return ne.getUTCDay()}function Te(ne,ve){return f(r.utcMonday.count(r.utcYear(ne)-1,ne),ve,2)}function Se(ne,ve){return f(ne.getUTCFullYear()%100,ve,2)}function ir(ne,ve){return f(ne.getUTCFullYear()%1e4,ve,4)}function Qe(){return"+0000"}function Le(){return"%"}function Ce(ne){return+ne}function Ge(ne){return Math.floor(+ne/1e3)}var Ze;Ye({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 Ye(ne){return Ze=i(ne),e.timeFormat=Ze.format,e.timeParse=Ze.parse,e.utcFormat=Ze.utcFormat,e.utcParse=Ze.utcParse,Ze}var He="%Y-%m-%dT%H:%M:%S.%LZ";function $e(ne){return ne.toISOString()}var cr=Date.prototype.toISOString?$e:e.utcFormat(He);function lr(ne){var ve=new Date(ne);return isNaN(ve)?null:ve}var Oe=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(He);e.isoFormat=cr,e.isoParse=Oe,e.timeFormatDefaultLocale=Ye,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var J3=N((ip,OA)=>{(function(e,r){typeof ip=="object"&&typeof OA!="undefined"?r(ip):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(ip,function(e){"use strict";function r(M){return Math.abs(M=Math.round(M))>=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function t(M,S){if((E=(M=S?M.toExponential(S-1):M.toExponential()).indexOf("e"))<0)return null;var E,P=M.slice(0,E);return[P.length>1?P[0]+P.slice(2):P,+M.slice(E+1)]}function a(M){return M=t(Math.abs(M)),M?M[1]:NaN}function n(M,S){return function(E,P){for(var R=E.length,D=[],z=0,O=M[0],H=0;R>0&&O>0&&(H+O+1>P&&(O=Math.max(1,P-H)),D.push(E.substring(R-=O,R+O)),!((H+=O+1)>P));)O=M[z=(z+1)%M.length];return D.reverse().join(S)}}function i(M){return function(S){return S.replace(/[0-9]/g,function(E){return M[+E]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(M){if(!(S=o.exec(M)))throw new Error("invalid format: "+M);var S;return new s({fill:S[1],align:S[2],sign:S[3],symbol:S[4],zero:S[5],width:S[6],comma:S[7],precision:S[8]&&S[8].slice(1),trim:S[9],type:S[10]})}l.prototype=s.prototype;function s(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}s.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(M){e:for(var S=M.length,E=1,P=-1,R;E0&&(P=0);break}return P>0?M.slice(0,P)+M.slice(R+1):M}var f;function c(M,S){var E=t(M,S);if(!E)return M+"";var P=E[0],R=E[1],D=R-(f=Math.max(-8,Math.min(8,Math.floor(R/3)))*3)+1,z=P.length;return D===z?P:D>z?P+new Array(D-z+1).join("0"):D>0?P.slice(0,D)+"."+P.slice(D):"0."+new Array(1-D).join("0")+t(M,Math.max(0,S+D-1))[0]}function v(M,S){var E=t(M,S);if(!E)return M+"";var P=E[0],R=E[1];return R<0?"0."+new Array(-R).join("0")+P:P.length>R+1?P.slice(0,R+1)+"."+P.slice(R+1):P+new Array(R-P.length+2).join("0")}var d={"%":function(M,S){return(M*100).toFixed(S)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d:r,e:function(M,S){return M.toExponential(S)},f:function(M,S){return M.toFixed(S)},g:function(M,S){return M.toPrecision(S)},o:function(M){return Math.round(M).toString(8)},p:function(M,S){return v(M*100,S)},r:v,s:c,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function p(M){return M}var m=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(M){var S=M.grouping===void 0||M.thousands===void 0?p:n(m.call(M.grouping,Number),M.thousands+""),E=M.currency===void 0?"":M.currency[0]+"",P=M.currency===void 0?"":M.currency[1]+"",R=M.decimal===void 0?".":M.decimal+"",D=M.numerals===void 0?p:i(m.call(M.numerals,String)),z=M.percent===void 0?"%":M.percent+"",O=M.minus===void 0?"-":M.minus+"",H=M.nan===void 0?"NaN":M.nan+"";function V(B){B=l(B);var Y=B.fill,X=B.align,Z=B.sign,te=B.symbol,fe=B.zero,le=B.width,ie=B.comma,K=B.precision,he=B.trim,oe=B.type;oe==="n"?(ie=!0,oe="g"):d[oe]||(K===void 0&&(K=12),he=!0,oe="g"),(fe||Y==="0"&&X==="=")&&(fe=!0,Y="0",X="=");var ye=te==="$"?E:te==="#"&&/[boxX]/.test(oe)?"0"+oe.toLowerCase():"",ue=te==="$"?P:/[%p]/.test(oe)?z:"",de=d[oe],W=/[defgprs%]/.test(oe);K=K===void 0?6:/[gprs]/.test(oe)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K));function Q(j){var pe=ye,me=ue,we,Ne,Fe;if(oe==="c")me=de(j)+me,j="";else{j=+j;var Re=j<0||1/j<0;if(j=isNaN(j)?H:de(Math.abs(j),K),he&&(j=u(j)),Re&&+j==0&&Z!=="+"&&(Re=!1),pe=(Re?Z==="("?Z:O:Z==="-"||Z==="("?"":Z)+pe,me=(oe==="s"?y[8+f/3]:"")+me+(Re&&Z==="("?")":""),W){for(we=-1,Ne=j.length;++weFe||Fe>57){me=(Fe===46?R+j.slice(we+1):j.slice(we))+me,j=j.slice(0,we);break}}}ie&&!fe&&(j=S(j,1/0));var Ie=pe.length+j.length+me.length,Be=Ie>1)+pe+j+me+Be.slice(Ie);break;default:j=Be+pe+j+me;break}return D(j)}return Q.toString=function(){return B+""},Q}function G(B,Y){var X=V((B=l(B),B.type="f",B)),Z=Math.max(-8,Math.min(8,Math.floor(a(Y)/3)))*3,te=Math.pow(10,-Z),fe=y[8+Z/3];return function(le){return X(te*le)+fe}}return{format:V,formatPrefix:G}}var b;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(M){return b=_(M),e.format=b.format,e.formatPrefix=b.formatPrefix,b}function x(M){return Math.max(0,-a(Math.abs(M)))}function T(M,S){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(S)/3)))*3-a(Math.abs(M)))}function k(M,S){return M=Math.abs(M),S=Math.abs(S)-M,Math.max(0,a(S)-a(M))+1}e.FormatSpecifier=s,e.formatDefaultLocale=w,e.formatLocale=_,e.formatSpecifier=l,e.precisionFixed=x,e.precisionPrefix=T,e.precisionRound=k,Object.defineProperty(e,"__esModule",{value:!0})})});var HA=N((Wqe,BA)=>{"use strict";BA.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var Pr=N((jqe,UA)=>{"use strict";var aie=HA();UA.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&aie(t))return!1}else if(r!=="number")return!1;return e-e<1}});var Ft=N((Zqe,GA)=>{"use strict";GA.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 $3=N((op,YA)=>{(function(e,r){typeof op=="object"&&typeof YA!="undefined"?r(op):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(op,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(l[s]&3)<<4|l[s+1]>>4],f+=r[(l[s+1]&15)<<2|l[s+2]>>6],f+=r[l[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(o){var l=o.length*.75,s=o.length,u,f=0,c,v,d,p;o[o.length-1]==="="&&(l--,o[o.length-2]==="="&&l--);var m=new ArrayBuffer(l),y=new Uint8Array(m);for(u=0;u>4,y[f++]=(v&15)<<4|d>>2,y[f++]=(d&3)<<6|p&63;return m};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var zl=N((Xqe,VA)=>{"use strict";VA.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var Wn=N(Zi=>{"use strict";var nie=$3().decode,iie=zl(),K3=Array.isArray,oie=ArrayBuffer,lie=DataView;function WA(e){return oie.isView(e)&&!(e instanceof lie)}Zi.isTypedArray=WA;function lp(e){return K3(e)||WA(e)}Zi.isArrayOrTypedArray=lp;function sie(e){return!lp(e[0])}Zi.isArray1D=sie;Zi.ensureArray=function(e,r){return K3(e)||(e=[]),e.length=r,e};var qa={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};qa.uint8c=qa.u1c;qa.uint8=qa.u1;qa.int8=qa.i1;qa.uint16=qa.u2;qa.int16=qa.i2;qa.uint32=qa.u4;qa.int32=qa.i4;qa.float32=qa.f4;qa.float64=qa.f8;function Q3(e){return e.constructor===ArrayBuffer}Zi.isArrayBuffer=Q3;Zi.decodeTypedArraySpec=function(e){var r=[],t=uie(e),a=t.dtype,n=qa[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,o=t.bdata;Q3(o)||(o=nie(o));var l=t.shape===void 0?[o.byteLength/i]:(""+t.shape).split(",");l.reverse();var s=l.length,u,f,c=+l[0],v=i*c,d=0;if(s===1)r=new n(o);else if(s===2)for(u=+l[1],f=0;f{"use strict";var ZA=Pr(),rb=Wn().isArrayOrTypedArray;KA.exports=function(r,t){if(ZA(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,o,l;for(l=0;l{"use strict";var _f=sp(),die=/^\w*$/,pie=0,QA=1,up=2,e9=3,Ys=4;r9.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,o,l,s={};t&&t.length?(l=_f(r,t),o=l.get()):o=r,t=t||"";var u={};if(o)for(i=0;i2)return s[d]=s[d]|up,c.set(v,null);if(f){for(i=d;i{"use strict";var yie=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,mie=/^[^\.\[\]]+$/;a9.exports=function(e,r){for(;r;){var t=e.match(yie);if(t)e=t[1];else if(e.match(mie))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var fp=N((eLe,i9)=>{"use strict";var gie=Pr();i9.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return gie(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var s9=N((rLe,l9)=>{"use strict";var o9=Wn().isArrayOrTypedArray,Bv=zl();l9.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(o9(n)&&o9(i)&&Bv(n[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(n.length,i.length),l=0;l{"use strict";function bie(e,r){var t=e%r;return t<0?t+r:t}function xie(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}u9.exports={mod:bie,modHalf:xie}});var Sn=N((aLe,cp)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,o=e.max,l=e.random;function s(W,Q){if(W=W||"",Q=Q||{},W instanceof s)return W;if(!(this instanceof s))return new s(W,Q);var j=u(W);this._originalInput=W,this._r=j.r,this._g=j.g,this._b=j.b,this._a=j.a,this._roundA=n(100*this._a)/100,this._format=Q.format||j.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=j.ok,this._tc_id=a++}s.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),Q,j,pe,me,we,Ne;return Q=W.r/255,j=W.g/255,pe=W.b/255,Q<=.03928?me=Q/12.92:me=e.pow((Q+.055)/1.055,2.4),j<=.03928?we=j/12.92:we=e.pow((j+.055)/1.055,2.4),pe<=.03928?Ne=pe/12.92:Ne=e.pow((pe+.055)/1.055,2.4),.2126*me+.7152*we+.0722*Ne},setAlpha:function(W){return this._a=B(W),this._roundA=n(100*this._a)/100,this},toHsv:function(){var W=d(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=d(this._r,this._g,this._b),Q=n(W.h*360),j=n(W.s*100),pe=n(W.v*100);return this._a==1?"hsv("+Q+", "+j+"%, "+pe+"%)":"hsva("+Q+", "+j+"%, "+pe+"%, "+this._roundA+")"},toHsl:function(){var W=c(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=c(this._r,this._g,this._b),Q=n(W.h*360),j=n(W.s*100),pe=n(W.l*100);return this._a==1?"hsl("+Q+", "+j+"%, "+pe+"%)":"hsla("+Q+", "+j+"%, "+pe+"%, "+this._roundA+")"},toHex:function(W){return m(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return y(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(Y(this._r,255)*100)+"%",g:n(Y(this._g,255)*100)+"%",b:n(Y(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(Y(this._r,255)*100)+"%, "+n(Y(this._g,255)*100)+"%, "+n(Y(this._b,255)*100)+"%)":"rgba("+n(Y(this._r,255)*100)+"%, "+n(Y(this._g,255)*100)+"%, "+n(Y(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:V[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var Q="#"+_(this._r,this._g,this._b,this._a),j=Q,pe=this._gradientType?"GradientType = 1, ":"";if(W){var me=s(W);j="#"+_(me._r,me._g,me._b,me._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+Q+",endColorstr="+j+")"},toString:function(W){var Q=!!W;W=W||this._format;var j=!1,pe=this._a<1&&this._a>=0,me=!Q&&pe&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return me?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(j=this.toRgbString()),W==="prgb"&&(j=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(j=this.toHexString()),W==="hex3"&&(j=this.toHexString(!0)),W==="hex4"&&(j=this.toHex8String(!0)),W==="hex8"&&(j=this.toHex8String()),W==="name"&&(j=this.toName()),W==="hsl"&&(j=this.toHslString()),W==="hsv"&&(j=this.toHsvString()),j||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(W,Q){var j=W.apply(null,[this].concat([].slice.call(Q)));return this._r=j._r,this._g=j._g,this._b=j._b,this.setAlpha(j._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(W,Q){return W.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},s.fromRatio=function(W,Q){if(typeof W=="object"){var j={};for(var pe in W)W.hasOwnProperty(pe)&&(pe==="a"?j[pe]=W[pe]:j[pe]=ie(W[pe]));W=j}return s(W,Q)};function u(W){var Q={r:0,g:0,b:0},j=1,pe=null,me=null,we=null,Ne=!1,Fe=!1;return typeof W=="string"&&(W=ue(W)),typeof W=="object"&&(ye(W.r)&&ye(W.g)&&ye(W.b)?(Q=f(W.r,W.g,W.b),Ne=!0,Fe=String(W.r).substr(-1)==="%"?"prgb":"rgb"):ye(W.h)&&ye(W.s)&&ye(W.v)?(pe=ie(W.s),me=ie(W.v),Q=p(W.h,pe,me),Ne=!0,Fe="hsv"):ye(W.h)&&ye(W.s)&&ye(W.l)&&(pe=ie(W.s),we=ie(W.l),Q=v(W.h,pe,we),Ne=!0,Fe="hsl"),W.hasOwnProperty("a")&&(j=W.a)),j=B(j),{ok:Ne,format:W.format||Fe,r:i(255,o(Q.r,0)),g:i(255,o(Q.g,0)),b:i(255,o(Q.b,0)),a:j}}function f(W,Q,j){return{r:Y(W,255)*255,g:Y(Q,255)*255,b:Y(j,255)*255}}function c(W,Q,j){W=Y(W,255),Q=Y(Q,255),j=Y(j,255);var pe=o(W,Q,j),me=i(W,Q,j),we,Ne,Fe=(pe+me)/2;if(pe==me)we=Ne=0;else{var Re=pe-me;switch(Ne=Fe>.5?Re/(2-pe-me):Re/(pe+me),pe){case W:we=(Q-j)/Re+(Q1&&(ze-=1),ze<1/6?Ie+(Be-Ie)*6*ze:ze<1/2?Be:ze<2/3?Ie+(Be-Ie)*(2/3-ze)*6:Ie}if(Q===0)pe=me=we=j;else{var Fe=j<.5?j*(1+Q):j+Q-j*Q,Re=2*j-Fe;pe=Ne(Re,Fe,W+1/3),me=Ne(Re,Fe,W),we=Ne(Re,Fe,W-1/3)}return{r:pe*255,g:me*255,b:we*255}}function d(W,Q,j){W=Y(W,255),Q=Y(Q,255),j=Y(j,255);var pe=o(W,Q,j),me=i(W,Q,j),we,Ne,Fe=pe,Re=pe-me;if(Ne=pe===0?0:Re/pe,pe==me)we=0;else{switch(pe){case W:we=(Q-j)/Re+(Q>1)+720)%360;--Q;)pe.h=(pe.h+me)%360,we.push(s(pe));return we}function O(W,Q){Q=Q||6;for(var j=s(W).toHsv(),pe=j.h,me=j.s,we=j.v,Ne=[],Fe=1/Q;Q--;)Ne.push(s({h:pe,s:me,v:we})),we=(we+Fe)%1;return Ne}s.mix=function(W,Q,j){j=j===0?0:j||50;var pe=s(W).toRgb(),me=s(Q).toRgb(),we=j/100,Ne={r:(me.r-pe.r)*we+pe.r,g:(me.g-pe.g)*we+pe.g,b:(me.b-pe.b)*we+pe.b,a:(me.a-pe.a)*we+pe.a};return s(Ne)},s.readability=function(W,Q){var j=s(W),pe=s(Q);return(e.max(j.getLuminance(),pe.getLuminance())+.05)/(e.min(j.getLuminance(),pe.getLuminance())+.05)},s.isReadable=function(W,Q,j){var pe=s.readability(W,Q),me,we;switch(we=!1,me=de(j),me.level+me.size){case"AAsmall":case"AAAlarge":we=pe>=4.5;break;case"AAlarge":we=pe>=3;break;case"AAAsmall":we=pe>=7;break}return we},s.mostReadable=function(W,Q,j){var pe=null,me=0,we,Ne,Fe,Re;j=j||{},Ne=j.includeFallbackColors,Fe=j.level,Re=j.size;for(var Ie=0;Ieme&&(me=we,pe=s(Q[Ie]));return s.isReadable(W,pe,{level:Fe,size:Re})||!Ne?pe:(j.includeFallbackColors=!1,s.mostReadable(W,["#fff","#000"],j))};var H=s.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"},V=s.hexNames=G(H);function G(W){var Q={};for(var j in W)W.hasOwnProperty(j)&&(Q[W[j]]=j);return Q}function B(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function Y(W,Q){te(W)&&(W="100%");var j=fe(W);return W=i(Q,o(0,parseFloat(W))),j&&(W=parseInt(W*Q,10)/100),e.abs(W-Q)<1e-6?1:W%Q/parseFloat(Q)}function X(W){return i(1,o(0,W))}function Z(W){return parseInt(W,16)}function te(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function fe(W){return typeof W=="string"&&W.indexOf("%")!=-1}function le(W){return W.length==1?"0"+W:""+W}function ie(W){return W<=1&&(W=W*100+"%"),W}function K(W){return e.round(parseFloat(W)*255).toString(16)}function he(W){return Z(W)/255}var oe=function(){var W="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",j="(?:"+Q+")|(?:"+W+")",pe="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",me="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?";return{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+me),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+me),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+me),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 ye(W){return!!oe.CSS_UNIT.exec(W)}function ue(W){W=W.replace(r,"").replace(t,"").toLowerCase();var Q=!1;if(H[W])W=H[W],Q=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var j;return(j=oe.rgb.exec(W))?{r:j[1],g:j[2],b:j[3]}:(j=oe.rgba.exec(W))?{r:j[1],g:j[2],b:j[3],a:j[4]}:(j=oe.hsl.exec(W))?{h:j[1],s:j[2],l:j[3]}:(j=oe.hsla.exec(W))?{h:j[1],s:j[2],l:j[3],a:j[4]}:(j=oe.hsv.exec(W))?{h:j[1],s:j[2],v:j[3]}:(j=oe.hsva.exec(W))?{h:j[1],s:j[2],v:j[3],a:j[4]}:(j=oe.hex8.exec(W))?{r:Z(j[1]),g:Z(j[2]),b:Z(j[3]),a:he(j[4]),format:Q?"name":"hex8"}:(j=oe.hex6.exec(W))?{r:Z(j[1]),g:Z(j[2]),b:Z(j[3]),format:Q?"name":"hex"}:(j=oe.hex4.exec(W))?{r:Z(j[1]+""+j[1]),g:Z(j[2]+""+j[2]),b:Z(j[3]+""+j[3]),a:he(j[4]+""+j[4]),format:Q?"name":"hex8"}:(j=oe.hex3.exec(W))?{r:Z(j[1]+""+j[1]),g:Z(j[2]+""+j[2]),b:Z(j[3]+""+j[3]),format:Q?"name":"hex"}:!1}function de(W){var Q,j;return W=W||{level:"AA",size:"small"},Q=(W.level||"AA").toUpperCase(),j=(W.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),j!=="small"&&j!=="large"&&(j="small"),{level:Q,size:j}}typeof cp!="undefined"&&cp.exports?cp.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var bt=N(Gv=>{"use strict";var f9=zl(),Hv=Array.isArray;function _ie(e,r){var t,a;for(t=0;t{"use strict";c9.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var Yv=N((oLe,v9)=>{"use strict";v9.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var Tf=N((lLe,p9)=>{"use strict";var h9=Yv(),d9=fa(),tb=d9({editType:"none"});tb.family.dflt=h9.HOVERFONT;tb.size.dflt=h9.HOVERFONTSIZE;p9.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:tb,grouptitlefont:d9({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var dp=N((sLe,y9)=>{"use strict";var wie=fa(),vp=Tf().hoverlabel,hp=bt().extendFlat;y9.exports={hoverlabel:{bgcolor:hp({},vp.bgcolor,{arrayOk:!0}),bordercolor:hp({},vp.bordercolor,{arrayOk:!0}),font:wie({arrayOk:!0,editType:"none"}),align:hp({},vp.align,{arrayOk:!0}),namelength:hp({},vp.namelength,{arrayOk:!0}),editType:"none"}}});var mn=N((uLe,m9)=>{"use strict";var Tie=fa(),Aie=dp();m9.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:Tie({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:Aie.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 Vs=N((fLe,x9)=>{"use strict";var Mie=Sn(),pp={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)"]]},g9=pp.RdBu;function kie(e,r){if(r||(r=g9),!e)return r;function t(){try{e=pp[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),b9(e)?e:r}function b9(e){var r=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 t=0;t{"use strict";Ws.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ws.defaultLine="#444";Ws.lightLine="#eee";Ws.background="#fff";Ws.borderLine="#BEC8D9";Ws.lightFraction=100*10/11});var Tr=N((vLe,_9)=>{"use strict";var qn=Sn(),qie=Pr(),Lie=Wn().isTypedArray,_a=_9.exports={},yp=li();_a.defaults=yp.defaults;var Cie=_a.defaultLine=yp.defaultLine;_a.lightLine=yp.lightLine;var nb=_a.background=yp.background;_a.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};_a.rgb=function(e){return _a.tinyRGB(qn(e))};_a.opacity=function(e){return e?qn(e).getAlpha():0};_a.addOpacity=function(e,r){var t=qn(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};_a.combine=function(e,r){var t=qn(e).toRgb();if(t.a===1)return qn(e).toRgbString();var a=qn(r||nb).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return qn(i).toRgbString()};_a.interpolate=function(e,r,t){var a=qn(e).toRgb(),n=qn(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return qn(i).toRgbString()};_a.contrast=function(e,r,t){var a=qn(e);a.getAlpha()!==1&&(a=qn(_a.combine(e,nb)));var n=a.isDark()?r?a.lighten(r):nb:t?a.darken(t):Cie;return n.toString()};_a.stroke=function(e,r){var t=qn(r);e.style({stroke:_a.tinyRGB(t),"stroke-opacity":t.getAlpha()})};_a.fill=function(e,r){var t=qn(r);e.style({fill:_a.tinyRGB(t),"fill-opacity":t.getAlpha()})};_a.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}});var mp=N((hLe,w9)=>{"use strict";w9.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var Af=N(T9=>{"use strict";T9.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var S9=N(Ln=>{"use strict";var ib=Pr(),A9=Sn(),M9=bt().extendFlat,Eie=mn(),Die=Vs(),Pie=Tr(),Rie=mp().DESELECTDIM,Mf=sp(),k9=Af().counter,Fie=wf().modHalf,To=Wn().isArrayOrTypedArray,Il=Wn().isTypedArraySpec,Ol=Wn().decodeTypedArraySpec;Ln.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(To(e)?e:Il(e)?Ol(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}Il(e)&&(e=Ol(e)),e%1||!ib(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Il(e)&&(e=Ol(e)),A9(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return A9(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(Die.get(e,t))}},angle:{coerceFunction:function(e,r,t){Il(e)&&(e=Ol(e)),e==="auto"?r.set("auto"):ib(e)?r.set(Fie(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||k9(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!k9(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var q9={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/"},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:{}}},L9={};function C9(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),C9(a,r[t]))}}C9(q9,L9);E9.exports={configAttributes:q9,dfltConfig:L9}});var lb=N((mLe,D9)=>{"use strict";var ob=Sr(),Nie=Pr(),Vv=[];D9.exports=function(e,r){if(Vv.indexOf(e)!==-1)return;Vv.push(e);var t=1e3;Nie(r)?t=r:r==="long"&&(t=3e3);var a=ob.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(Vv);function i(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Vv.indexOf(l);s!==-1&&Vv.splice(s,1),ob.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=ob.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(i)});for(var s=l.append("p"),u=o.split(//g),f=0;f{"use strict";var kf=js().dfltConfig,sb=lb(),ub=P9.exports={};ub.log=function(){var e;if(kf.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};ub.warn=function(){var e;if(kf.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};ub.error=function(){var e;if(kf.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var bp=N((bLe,R9)=>{"use strict";R9.exports=function(){}});var fb=N((xLe,F9)=>{"use strict";F9.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{N9.exports=zie;function zie(){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 O9=N((wLe,I9)=>{I9.exports=Iie;function Iie(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var H9=N((TLe,B9)=>{B9.exports=Oie;function Oie(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var cb=N((ALe,U9)=>{U9.exports=Bie;function Bie(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 Y9=N((MLe,G9)=>{G9.exports=Hie;function Hie(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],o=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=o,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var W9=N((kLe,V9)=>{V9.exports=Uie;function Uie(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],v=r[10],d=r[11],p=r[12],m=r[13],y=r[14],_=r[15],b=t*l-a*o,w=t*s-n*o,x=t*u-i*o,T=a*s-n*l,k=a*u-i*l,M=n*u-i*s,S=f*m-c*p,E=f*y-v*p,P=f*_-d*p,R=c*y-v*m,D=c*_-d*m,z=v*_-d*y,O=b*z-w*D+x*R+T*P-k*E+M*S;return O?(O=1/O,e[0]=(l*z-s*D+u*R)*O,e[1]=(n*D-a*z-i*R)*O,e[2]=(m*M-y*k+_*T)*O,e[3]=(v*k-c*M-d*T)*O,e[4]=(s*P-o*z-u*E)*O,e[5]=(t*z-n*P+i*E)*O,e[6]=(y*x-p*M-_*w)*O,e[7]=(f*M-v*x+d*w)*O,e[8]=(o*D-l*P+u*S)*O,e[9]=(a*P-t*D-i*S)*O,e[10]=(p*k-m*x+_*b)*O,e[11]=(c*x-f*k-d*b)*O,e[12]=(l*E-o*R-s*S)*O,e[13]=(t*R-a*E+n*S)*O,e[14]=(m*w-p*T-y*b)*O,e[15]=(f*T-c*w+v*b)*O,e):null}});var Z9=N((SLe,j9)=>{j9.exports=Gie;function Gie(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],v=r[10],d=r[11],p=r[12],m=r[13],y=r[14],_=r[15];return e[0]=l*(v*_-d*y)-c*(s*_-u*y)+m*(s*d-u*v),e[1]=-(a*(v*_-d*y)-c*(n*_-i*y)+m*(n*d-i*v)),e[2]=a*(s*_-u*y)-l*(n*_-i*y)+m*(n*u-i*s),e[3]=-(a*(s*d-u*v)-l*(n*d-i*v)+c*(n*u-i*s)),e[4]=-(o*(v*_-d*y)-f*(s*_-u*y)+p*(s*d-u*v)),e[5]=t*(v*_-d*y)-f*(n*_-i*y)+p*(n*d-i*v),e[6]=-(t*(s*_-u*y)-o*(n*_-i*y)+p*(n*u-i*s)),e[7]=t*(s*d-u*v)-o*(n*d-i*v)+f*(n*u-i*s),e[8]=o*(c*_-d*m)-f*(l*_-u*m)+p*(l*d-u*c),e[9]=-(t*(c*_-d*m)-f*(a*_-i*m)+p*(a*d-i*c)),e[10]=t*(l*_-u*m)-o*(a*_-i*m)+p*(a*u-i*l),e[11]=-(t*(l*d-u*c)-o*(a*d-i*c)+f*(a*u-i*l)),e[12]=-(o*(c*y-v*m)-f*(l*y-s*m)+p*(l*v-s*c)),e[13]=t*(c*y-v*m)-f*(a*y-n*m)+p*(a*v-n*c),e[14]=-(t*(l*y-s*m)-o*(a*y-n*m)+p*(a*s-n*l)),e[15]=t*(l*v-s*c)-o*(a*v-n*c)+f*(a*s-n*l),e}});var J9=N((qLe,X9)=>{X9.exports=Yie;function Yie(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],f=e[9],c=e[10],v=e[11],d=e[12],p=e[13],m=e[14],y=e[15],_=r*o-t*i,b=r*l-a*i,w=r*s-n*i,x=t*l-a*o,T=t*s-n*o,k=a*s-n*l,M=u*p-f*d,S=u*m-c*d,E=u*y-v*d,P=f*m-c*p,R=f*y-v*p,D=c*y-v*m;return _*D-b*R+w*P+x*E-T*S+k*M}});var K9=N((LLe,$9)=>{$9.exports=Vie;function Vie(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=r[4],s=r[5],u=r[6],f=r[7],c=r[8],v=r[9],d=r[10],p=r[11],m=r[12],y=r[13],_=r[14],b=r[15],w=t[0],x=t[1],T=t[2],k=t[3];return e[0]=w*a+x*l+T*c+k*m,e[1]=w*n+x*s+T*v+k*y,e[2]=w*i+x*u+T*d+k*_,e[3]=w*o+x*f+T*p+k*b,w=t[4],x=t[5],T=t[6],k=t[7],e[4]=w*a+x*l+T*c+k*m,e[5]=w*n+x*s+T*v+k*y,e[6]=w*i+x*u+T*d+k*_,e[7]=w*o+x*f+T*p+k*b,w=t[8],x=t[9],T=t[10],k=t[11],e[8]=w*a+x*l+T*c+k*m,e[9]=w*n+x*s+T*v+k*y,e[10]=w*i+x*u+T*d+k*_,e[11]=w*o+x*f+T*p+k*b,w=t[12],x=t[13],T=t[14],k=t[15],e[12]=w*a+x*l+T*c+k*m,e[13]=w*n+x*s+T*v+k*y,e[14]=w*i+x*u+T*d+k*_,e[15]=w*o+x*f+T*p+k*b,e}});var eM=N((CLe,Q9)=>{Q9.exports=Wie;function Wie(e,r,t){var a=t[0],n=t[1],i=t[2],o,l,s,u,f,c,v,d,p,m,y,_;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(o=r[0],l=r[1],s=r[2],u=r[3],f=r[4],c=r[5],v=r[6],d=r[7],p=r[8],m=r[9],y=r[10],_=r[11],e[0]=o,e[1]=l,e[2]=s,e[3]=u,e[4]=f,e[5]=c,e[6]=v,e[7]=d,e[8]=p,e[9]=m,e[10]=y,e[11]=_,e[12]=o*a+f*n+p*i+r[12],e[13]=l*a+c*n+m*i+r[13],e[14]=s*a+v*n+y*i+r[14],e[15]=u*a+d*n+_*i+r[15]),e}});var tM=N((ELe,rM)=>{rM.exports=jie;function jie(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var nM=N((DLe,aM)=>{aM.exports=Zie;function Zie(e,r,t,a){var n=a[0],i=a[1],o=a[2],l=Math.sqrt(n*n+i*i+o*o),s,u,f,c,v,d,p,m,y,_,b,w,x,T,k,M,S,E,P,R,D,z,O,H;return Math.abs(l)<1e-6?null:(l=1/l,n*=l,i*=l,o*=l,s=Math.sin(t),u=Math.cos(t),f=1-u,c=r[0],v=r[1],d=r[2],p=r[3],m=r[4],y=r[5],_=r[6],b=r[7],w=r[8],x=r[9],T=r[10],k=r[11],M=n*n*f+u,S=i*n*f+o*s,E=o*n*f-i*s,P=n*i*f-o*s,R=i*i*f+u,D=o*i*f+n*s,z=n*o*f+i*s,O=i*o*f-n*s,H=o*o*f+u,e[0]=c*M+m*S+w*E,e[1]=v*M+y*S+x*E,e[2]=d*M+_*S+T*E,e[3]=p*M+b*S+k*E,e[4]=c*P+m*R+w*D,e[5]=v*P+y*R+x*D,e[6]=d*P+_*R+T*D,e[7]=p*P+b*R+k*D,e[8]=c*z+m*O+w*H,e[9]=v*z+y*O+x*H,e[10]=d*z+_*O+T*H,e[11]=p*z+b*O+k*H,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var oM=N((PLe,iM)=>{iM.exports=Xie;function Xie(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],o=r[5],l=r[6],s=r[7],u=r[8],f=r[9],c=r[10],v=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=o*n+f*a,e[6]=l*n+c*a,e[7]=s*n+v*a,e[8]=u*n-i*a,e[9]=f*n-o*a,e[10]=c*n-l*a,e[11]=v*n-s*a,e}});var sM=N((RLe,lM)=>{lM.exports=Jie;function Jie(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[8],f=r[9],c=r[10],v=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=o*n-f*a,e[2]=l*n-c*a,e[3]=s*n-v*a,e[8]=i*a+u*n,e[9]=o*a+f*n,e[10]=l*a+c*n,e[11]=s*a+v*n,e}});var fM=N((FLe,uM)=>{uM.exports=$ie;function $ie(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[4],f=r[5],c=r[6],v=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=o*n+f*a,e[2]=l*n+c*a,e[3]=s*n+v*a,e[4]=u*n-i*a,e[5]=f*n-o*a,e[6]=c*n-l*a,e[7]=v*n-s*a,e}});var vM=N((NLe,cM)=>{cM.exports=Kie;function Kie(e,r,t){var a,n,i,o=t[0],l=t[1],s=t[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,l*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=o*o*i+n,e[1]=l*o*i+s*a,e[2]=s*o*i-l*a,e[3]=0,e[4]=o*l*i-s*a,e[5]=l*l*i+n,e[6]=s*l*i+o*a,e[7]=0,e[8]=o*s*i+l*a,e[9]=l*s*i-o*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var dM=N((zLe,hM)=>{hM.exports=Qie;function Qie(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=a+a,s=n+n,u=i+i,f=a*l,c=a*s,v=a*u,d=n*s,p=n*u,m=i*u,y=o*l,_=o*s,b=o*u;return e[0]=1-(d+m),e[1]=c+b,e[2]=v-_,e[3]=0,e[4]=c-b,e[5]=1-(f+m),e[6]=p+y,e[7]=0,e[8]=v+_,e[9]=p-y,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var yM=N((ILe,pM)=>{pM.exports=eoe;function eoe(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var gM=N((OLe,mM)=>{mM.exports=roe;function roe(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var xM=N((BLe,bM)=>{bM.exports=toe;function toe(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var wM=N((HLe,_M)=>{_M.exports=aoe;function aoe(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var AM=N((ULe,TM)=>{TM.exports=noe;function noe(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 vb=N((GLe,MM)=>{MM.exports=ioe;function ioe(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=t+t,l=a+a,s=n+n,u=t*o,f=a*o,c=a*l,v=n*o,d=n*l,p=n*s,m=i*o,y=i*l,_=i*s;return e[0]=1-c-p,e[1]=f+_,e[2]=v-y,e[3]=0,e[4]=f-_,e[5]=1-u-p,e[6]=d+m,e[7]=0,e[8]=v+y,e[9]=d-m,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var SM=N((YLe,kM)=>{kM.exports=ooe;function ooe(e,r,t,a,n,i,o){var l=1/(t-r),s=1/(n-a),u=1/(i-o);return e[0]=i*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(n+a)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var LM=N((VLe,qM)=>{qM.exports=loe;function loe(e,r,t,a,n){var i=1/Math.tan(r/2),o=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*o,e[15]=0,e}});var EM=N((WLe,CM)=>{CM.exports=soe;function soe(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),o=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-l)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var PM=N((jLe,DM)=>{DM.exports=uoe;function uoe(e,r,t,a,n,i,o){var l=1/(r-t),s=1/(a-n),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(n+a)*s,e[14]=(o+i)*u,e[15]=1,e}});var FM=N((ZLe,RM)=>{var foe=cb();RM.exports=coe;function coe(e,r,t,a){var n,i,o,l,s,u,f,c,v,d,p=r[0],m=r[1],y=r[2],_=a[0],b=a[1],w=a[2],x=t[0],T=t[1],k=t[2];return Math.abs(p-x)<1e-6&&Math.abs(m-T)<1e-6&&Math.abs(y-k)<1e-6?foe(e):(f=p-x,c=m-T,v=y-k,d=1/Math.sqrt(f*f+c*c+v*v),f*=d,c*=d,v*=d,n=b*v-w*c,i=w*f-_*v,o=_*c-b*f,d=Math.sqrt(n*n+i*i+o*o),d?(d=1/d,n*=d,i*=d,o*=d):(n=0,i=0,o=0),l=c*o-v*i,s=v*n-f*o,u=f*i-c*n,d=Math.sqrt(l*l+s*s+u*u),d?(d=1/d,l*=d,s*=d,u*=d):(l=0,s=0,u=0),e[0]=n,e[1]=l,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=o,e[9]=u,e[10]=v,e[11]=0,e[12]=-(n*p+i*m+o*y),e[13]=-(l*p+s*m+u*y),e[14]=-(f*p+c*m+v*y),e[15]=1,e)}});var zM=N((XLe,NM)=>{NM.exports=voe;function voe(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 hb=N((JLe,IM)=>{IM.exports={create:z9(),clone:O9(),copy:H9(),identity:cb(),transpose:Y9(),invert:W9(),adjoint:Z9(),determinant:J9(),multiply:K9(),translate:eM(),scale:tM(),rotate:nM(),rotateX:oM(),rotateY:sM(),rotateZ:fM(),fromRotation:vM(),fromRotationTranslation:dM(),fromScaling:yM(),fromTranslation:gM(),fromXRotation:xM(),fromYRotation:wM(),fromZRotation:AM(),fromQuat:vb(),frustum:SM(),perspective:LM(),perspectiveFromFieldOfView:EM(),ortho:PM(),lookAt:FM(),str:zM()}});var xp=N($t=>{"use strict";var hoe=hb();$t.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var doe=Sr(),OM=Zs(),poe=xp(),yoe=hb();function moe(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function goe(e){var r=doe.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function BM(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function boe(e,r){HM("global",e,r)}function HM(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):OM.warn("addStyleRule failed"):OM.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function xoe(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&BM(t)}function _oe(e,r,t,a,n){var i=a.split(":"),o=n.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(l)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[o[0]]=o[1])}),s.setAttribute(l,!0))})}function woe(e){var r=GM(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=UM(a);if(n){var i=poe.convertCssMatrix(n);t=yoe.multiply(t,t,i)}}),t}function UM(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function GM(e){for(var r=[];Toe(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function Toe(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Aoe(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}YM.exports={getGraphDiv:moe,isPlotDiv:goe,removeElement:BM,addStyleRule:boe,addRelatedStyleRule:HM,deleteRelatedStyleRule:xoe,setStyleOnHover:_oe,getFullTransformMatrix:woe,getElementTransformMatrix:UM,getElementAndAncestors:GM,equalDomRects:Aoe}});var jv=N((QLe,VM)=>{"use strict";VM.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 Xi=N((eCe,KM)=>{"use strict";var jM=bt().extendFlat,Moe=zl(),ZM={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},XM={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},koe=ZM.flags.slice().concat(["fullReplot"]),Soe=XM.flags.slice().concat("layoutReplot");KM.exports={traces:ZM,layout:XM,traceFlags:function(){return WM(koe)},layoutFlags:function(){return WM(Soe)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";db.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};db.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 pb=N((tCe,QM)=>{"use strict";QM.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 La=N(_p=>{"use strict";var ek=pb(),aCe=ek.FORMAT_LINK,nCe=ek.DATE_FORMAT_LINK;function yb(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function Bl(e,r){return r?r.d2l(e):e}function rk(e,r){return r?r.l2d(e):e}function qoe(e){return e.x0}function Loe(e){return e.x1}function Coe(e){return e.y0}function Eoe(e){return e.y1}function tk(e){return e.x0shift||0}function ak(e){return e.x1shift||0}function nk(e){return e.y0shift||0}function ik(e){return e.y1shift||0}function wp(e,r){return Bl(e.x1,r)+ak(e)-Bl(e.x0,r)-tk(e)}function Tp(e,r,t){return Bl(e.y1,t)+ik(e)-Bl(e.y0,t)-nk(e)}function Doe(e,r){return Math.abs(wp(e,r))}function Poe(e,r,t){return Math.abs(Tp(e,r,t))}function Roe(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(wp(e,r),2)+Math.pow(Tp(e,r,t),2))}function Foe(e,r){return rk((Bl(e.x1,r)+ak(e)+Bl(e.x0,r)+tk(e))/2,r)}function Noe(e,r,t){return rk((Bl(e.y1,t)+ik(e)+Bl(e.y0,t)+nk(e))/2,t)}function zoe(e,r,t){return e.type!=="line"?void 0:Tp(e,r,t)/wp(e,r)}ok.exports={x0:qoe,x1:Loe,y0:Coe,y1:Eoe,slope:zoe,dx:wp,dy:Tp,width:Doe,height:Poe,length:Roe,xcenter:Foe,ycenter:Noe}});var uk=N((lCe,sk)=>{"use strict";var Ioe=Xi().overrideAll,Xs=mn(),lk=fa(),Ooe=si().dash,Hl=bt().extendFlat,Boe=La().shapeTexttemplateAttrs,Hoe=Ap();sk.exports=Ioe({newshape:{visible:Hl({},Xs.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Hl({},Xs.legend,{}),legendgroup:Hl({},Xs.legendgroup,{}),legendgrouptitle:{text:Hl({},Xs.legendgrouptitle.text,{}),font:lk({})},legendrank:Hl({},Xs.legendrank,{}),legendwidth:Hl({},Xs.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Hl({},Ooe,{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:Hl({},Xs.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:Boe({newshape:!0},{keys:Object.keys(Hoe)}),font:lk({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var ck=N((sCe,fk)=>{"use strict";var Uoe=si().dash,Goe=bt().extendFlat;fk.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:Goe({},Uoe,{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 Mp=N((uCe,vk)=>{"use strict";vk.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var Sf=N((fCe,yk)=>{"use strict";var mb=fa(),Yoe=jv(),kp=li(),hk=uk(),dk=ck(),Voe=Mp(),pk=bt().extendFlat,Sp=mb({editType:"calc"});Sp.family.dflt='"Open Sans", verdana, arial, sans-serif';Sp.size.dflt=12;Sp.color.dflt=kp.defaultLine;yk.exports={font:Sp,title:{text:{valType:"string",editType:"layoutstyle"},font:mb({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:mb({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:pk(Voe({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:kp.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:kp.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:kp.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:hk.newshape,activeshape:hk.activeshape,newselection:dk.newselection,activeselection:dk.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:pk({},Yoe.transition,{editType:"none"})}});var mk=PA(()=>{});var Woe={};var gk=PA(()=>{mk()});var gr=N(Hr=>{"use strict";var qf=Zs(),bk=bp(),xk=fb(),joe=zl(),Zoe=Wv().addStyleRule,_k=bt(),Xoe=mn(),Joe=Sf(),$oe=_k.extendFlat,gb=_k.extendDeepAll;Hr.modules={};Hr.allCategories={};Hr.allTypes=[];Hr.subplotsRegistry={};Hr.componentsRegistry={};Hr.layoutArrayContainers=[];Hr.layoutArrayRegexes=[];Hr.traceLayoutAttributes={};Hr.localeRegistry={};Hr.apiMethodRegistry={};Hr.collectableSubplotTypes=null;Hr.register=function(r){if(Hr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var ale=xf().timeFormat,Dk=Pr(),bb=Zs(),Gl=wf().mod,Ef=Ft(),ui=Ef.BADNUM,Cn=Ef.ONEDAY,Zv=Ef.ONEHOUR,Ul=Ef.ONEMIN,Cf=Ef.ONESEC,Xv=Ef.EPOCHJD,rl=gr(),kk=xf().utcFormat,nle=/^\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,ile=/^\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,Sk=new Date().getFullYear()-70;function tl(e){return e&&rl.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Kt.dateTick0=function(e,r){var t=ole(e,!!r);if(r<2)return t;var a=Kt.dateTime2ms(t,e);return a+=Cn*(r-1),Kt.ms2DateTime(a,0,e)};function ole(e,r){return tl(e)?r?rl.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:rl.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Kt.dfltRange=function(e){return tl(e)?rl.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Kt.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Lp,Cp;Kt.dateTime2ms=function(e,r){if(Kt.isJSDate(e)){var t=e.getTimezoneOffset()*Ul,a=(e.getUTCMinutes()-e.getMinutes())*Ul+(e.getUTCSeconds()-e.getSeconds())*Cf+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*Ul;t=t-n/2+Gl(a-t+n/2,n)}return e=Number(e)-t,e>=Lp&&e<=Cp?e:ui}if(typeof e!="string"&&typeof e!="number")return ui;e=String(e);var i=tl(r),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.substr(1),r="");var l=i&&r.substr(0,7)==="chinese",s=e.match(l?ile:nle);if(!s)return ui;var u=s[1],f=s[3]||"1",c=Number(s[5]||1),v=Number(s[7]||0),d=Number(s[9]||0),p=Number(s[11]||0);if(i){if(u.length===2)return ui;u=Number(u);var m;try{var y=rl.getComponentMethod("calendars","getCal")(r);if(l){var _=f.charAt(f.length-1)==="i";f=parseInt(f,10),m=y.newDate(u,y.toMonthIndex(u,f,_),c)}else m=y.newDate(u,Number(f),c)}catch(w){return ui}return m?(m.toJD()-Xv)*Cn+v*Zv+d*Ul+p*Cf:ui}u.length===2?u=(Number(u)+2e3-Sk)%100+Sk:u=Number(u),f-=1;var b=new Date(Date.UTC(2e3,f,c,v,d));return b.setUTCFullYear(u),b.getUTCMonth()!==f||b.getUTCDate()!==c?ui:b.getTime()+p*Cf};Lp=Kt.MIN_MS=Kt.dateTime2ms("-9999");Cp=Kt.MAX_MS=Kt.dateTime2ms("9999-12-31 23:59:59.9999");Kt.isDateTime=function(e,r){return Kt.dateTime2ms(e,r)!==ui};function Lf(e,r){return String(e+Math.pow(10,r)).substr(1)}var qp=90*Cn,qk=3*Zv,Lk=5*Ul;Kt.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Lp&&e<=Cp))return ui;r||(r=0);var a=Math.floor(Gl(e+.05,1)*10),n=Math.round(e-a/10),i,o,l,s,u,f;if(tl(t)){var c=Math.floor(n/Cn)+Xv,v=Math.floor(Gl(e,Cn));try{i=rl.getComponentMethod("calendars","getCal")(t).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){i=kk("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=r=Lp+Cn&&e<=Cp-Cn))return ui;var r=Math.floor(Gl(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=ale("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return Pk(a,n,i,o,l)};function Pk(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+Lf(r,2)+":"+Lf(t,2),(a||n)&&(e+=":"+Lf(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+Lf(n,i)}return e}Kt.cleanDate=function(e,r,t){if(e===ui)return r;if(Kt.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(tl(t))return bb.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Kt.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Kt.isDateTime(e,t))return bb.error("unrecognized date",e),r;return e};var lle=/%\d?f/g,sle=/%h/g,ule={1:"1",2:"1",3:"2",4:"2"};function Ck(e,r,t,a){e=e.replace(lle,function(i){var o=Math.min(+i.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return l});var n=new Date(Math.floor(r+.05));if(e=e.replace(sle,function(){return ule[t("%q")(n)]}),tl(a))try{e=rl.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var fle=[59,59.9,59.99,59.999,59.9999];function cle(e,r){var t=Gl(e+.05,Cn),a=Lf(Math.floor(t/Zv),2)+":"+Lf(Gl(Math.floor(t/Ul),60),2);if(r!=="M"){Dk(r)||(r=0);var n=Math.min(Gl(e/Cf,60),fle[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}Kt.formatDate=function(e,r,t,a,n,i){if(n=tl(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` +`)};function F(J){return J.map(U).join(h)}function U(J){return A.test(J)?'"'+J.replace(/\"/g,'""')+'"':J}return L},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Ed,Dd,Pd,Rd,m8=this[G(this,"requestAnimationFrame")]||function(h){setTimeout(h,17)};e.timer=function(){Fd.apply(this,arguments)};function Fd(h,g,A){var q=arguments.length;q<2&&(g=0),q<3&&(A=Date.now());var L=A+g,C={c:h,t:L,n:null};return Dd?Dd.n=C:Ed=C,Dd=C,Pd||(Rd=clearTimeout(Rd),Pd=1,m8(_3)),C}function _3(){var h=g8(),g=b8()-h;g>24?(isFinite(g)&&(clearTimeout(Rd),Rd=setTimeout(_3,g)),Pd=0):(Pd=1,m8(_3))}e.timer.flush=function(){g8(),b8()};function g8(){for(var h=Date.now(),g=Ed;g;)h>=g.t&&g.c(h-g.t)&&(g.c=null),g=g.n;return h}function b8(){for(var h,g=Ed,A=1/0;g;)g.c?(g.t=0;--F)ae.push(L[J[ee[F]][2]]);for(F=+_e;F1&&zr(h[A[q-2]],h[A[q-1]],h[L])<=0;)--q;A[q++]=L}return A.slice(0,q)}function eae(h,g){return h[0]-g[0]||h[1]-g[1]}e.geom.polygon=function(h){return K(h,Nd),h};var Nd=e.geom.polygon.prototype=[];Nd.area=function(){for(var h=-1,g=this.length,A,q=this[g-1],L=0;++hve)F=F.L;else if(I=g-nae(F,A),I>ve){if(!F.R){q=F;break}F=F.R}else{C>-ve?(q=F.P,L=F):I>-ve?(q=F,L=F.N):q=L=F;break}var U=A8(h);if(pf.insert(q,U),!(!q&&!L)){if(q===L){mf(q),L=A8(q.site),pf.insert(U,L),U.edge=L.edge=Pv(q.site,U.site),yf(q),yf(L);return}if(!L){U.edge=Pv(q.site,U.site);return}mf(q),mf(L);var J=q.site,$=J.x,ee=J.y,re=h.x-$,_e=h.y-ee,Me=L.site,ae=Me.x-$,ce=Me.y-ee,ge=2*(re*ce-_e*ae),Ae=re*re+_e*_e,ke=ae*ae+ce*ce,xe={x:(ce*Ae-_e*ke)/ge+$,y:(re*ke-ae*Ae)/ge+ee};zd(L.edge,J,Me,xe),U.edge=Pv(J,h,null,xe),L.edge=Pv(h,Me,null,xe),yf(q),yf(L)}}function M8(h,g){var A=h.site,q=A.x,L=A.y,C=L-g;if(!C)return q;var I=h.P;if(!I)return-1/0;A=I.site;var F=A.x,U=A.y,J=U-g;if(!J)return F;var $=F-q,ee=1/C-1/J,re=$/J;return ee?(-re+Math.sqrt(re*re-2*ee*($*$/(-2*J)-U+J/2+L-C/2)))/ee+q:(q+F)/2}function nae(h,g){var A=h.N;if(A)return M8(A,g);var q=h.site;return q.y===g?q.x:1/0}function k8(h){this.site=h,this.edges=[]}k8.prototype.prepare=function(){for(var h=this.edges,g=h.length,A;g--;)A=h[g].edge,(!A.b||!A.a)&&h.splice(g,1);return h.sort(S8),h.length};function iae(h){for(var g=h[0][0],A=h[1][0],q=h[0][1],L=h[1][1],C,I,F,U,J=Os,$=J.length,ee,re,_e,Me,ae,ce;$--;)if(ee=J[$],!(!ee||!ee.prepare()))for(_e=ee.edges,Me=_e.length,re=0;reve||x(U-I)>ve)&&(_e.splice(re,0,new Id(fae(ee.site,ce,x(F-g)ve?{x:g,y:x(C-g)ve?{x:x(I-L)ve?{x:A,y:x(C-A)ve?{x:x(I-q)=-De)){var re=U*U+J*J,_e=$*$+ce*ce,Me=(ce*re-J*_e)/ee,ae=(U*_e-$*re)/ee,ce=ae+F,ge=T8.pop()||new oae;ge.arc=h,ge.site=L,ge.x=Me+I,ge.y=ce+Math.sqrt(Me*Me+ae*ae),ge.cy=ce,h.circle=ge;for(var Ae=null,ke=Dv._;ke;)if(ge.y0)){if(ae/=_e,_e<0){if(ae0){if(ae>re)return;ae>ee&&(ee=ae)}if(ae=A-F,!(!_e&&ae<0)){if(ae/=_e,_e<0){if(ae>re)return;ae>ee&&(ee=ae)}else if(_e>0){if(ae0)){if(ae/=Me,Me<0){if(ae0){if(ae>re)return;ae>ee&&(ee=ae)}if(ae=q-U,!(!Me&&ae<0)){if(ae/=Me,Me<0){if(ae>re)return;ae>ee&&(ee=ae)}else if(Me>0){if(ae0&&(L.a={x:F+ee*_e,y:U+ee*Me}),re<1&&(L.b={x:F+re*_e,y:U+re*Me}),L}}}}}}function sae(h){for(var g=df,A=lae(h[0][0],h[0][1],h[1][0],h[1][1]),q=g.length,L;q--;)L=g[q],(!uae(L,h)||!A(L)||x(L.a.x-L.b.x)=C)return;if($>re){if(!q)q={x:Me,y:I};else if(q.y>=F)return;A={x:Me,y:F}}else{if(!q)q={x:Me,y:F};else if(q.y1)if($>re){if(!q)q={x:(I-ge)/ce,y:I};else if(q.y>=F)return;A={x:(F-ge)/ce,y:F}}else{if(!q)q={x:(F-ge)/ce,y:F};else if(q.y=C)return;A={x:C,y:ce*C+ge}}else{if(!q)q={x:C,y:ce*C+ge};else if(q.x=$&&ge.x<=re&&ge.y>=ee&&ge.y<=_e?[[$,_e],[re,_e],[re,ee],[$,ee]]:[];Ae.point=U[ae]}),J}function F(U){return U.map(function(J,$){return{x:Math.round(q(J,$)/ve)*ve,y:Math.round(L(J,$)/ve)*ve,i:$}})}return I.links=function(U){return S3(F(U)).edges.filter(function(J){return J.l&&J.r}).map(function(J){return{source:U[J.l.i],target:U[J.r.i]}})},I.triangles=function(U){var J=[];return S3(F(U)).cells.forEach(function($,ee){for(var re=$.site,_e=$.edges.sort(S8),Me=-1,ae=_e.length,ce,ge,Ae=_e[ae-1].edge,ke=Ae.l===re?Ae.r:Ae.l;++Meke&&(ke=$.x),$.y>xe&&(xe=$.y),_e.push($.x),Me.push($.y);else for(ae=0;aeke&&(ke=Ve),nr>xe&&(xe=nr),_e.push(Ve),Me.push(nr)}var fr=ke-ge,or=xe-Ae;fr>or?xe=Ae+fr:ke=ge+or;function dr(mr,kr,rt,Jt,yt,tr,Dr,Rr){if(!(isNaN(rt)||isNaN(Jt)))if(mr.leaf){var tt=mr.x,Bt=mr.y;if(tt!=null)if(x(tt-rt)+x(Bt-Jt)<.01)pr(mr,kr,rt,Jt,yt,tr,Dr,Rr);else{var ua=mr.point;mr.x=mr.y=mr.point=null,pr(mr,ua,tt,Bt,yt,tr,Dr,Rr),pr(mr,kr,rt,Jt,yt,tr,Dr,Rr)}else mr.x=rt,mr.y=Jt,mr.point=kr}else pr(mr,kr,rt,Jt,yt,tr,Dr,Rr)}function pr(mr,kr,rt,Jt,yt,tr,Dr,Rr){var tt=(yt+Dr)*.5,Bt=(tr+Rr)*.5,ua=rt>=tt,Oa=Jt>=Bt,an=Oa<<1|ua;mr.leaf=!1,mr=mr.nodes[an]||(mr.nodes[an]=C8()),ua?yt=tt:Dr=tt,Oa?tr=Bt:Rr=Bt,dr(mr,kr,rt,Jt,yt,tr,Dr,Rr)}var Er=C8();if(Er.add=function(mr){dr(Er,mr,+ee(mr,++ae),+re(mr,ae),ge,Ae,ke,xe)},Er.visit=function(mr){Nv(mr,Er,ge,Ae,ke,xe)},Er.find=function(mr){return pae(Er,mr[0],mr[1],ge,Ae,ke,xe)},ae=-1,g==null){for(;++aeC||re>I||_e=Ve,or=A>=nr,dr=or<<1|fr,pr=dr+4;drA&&(C=g.slice(A,C),F[I]?F[I]+=C:F[++I]=C),(q=q[0])===(L=L[0])?F[I]?F[I]+=L:F[++I]=L:(F[++I]=null,U.push({i:I,x:el(q,L)})),A=C3.lastIndex;return A=0&&!(q=e.interpolators[A](h,g)););return q}e.interpolators=[function(h,g){var A=typeof g;return(A==="string"?Ia.has(g.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(g)?q3:D8:g instanceof Pt?q3:Array.isArray(g)?Hd:A==="object"&&isNaN(g)?E8:el)(h,g)}],e.interpolateArray=Hd;function Hd(h,g){var A=[],q=[],L=h.length,C=g.length,I=Math.min(h.length,g.length),F;for(F=0;F=0?h.slice(0,g):h,q=g>=0?h.slice(g+1):"in";return A=yae.get(A)||P8,q=mae.get(q)||H,gae(q(A.apply(null,r.call(arguments,1))))};function gae(h){return function(g){return g<=0?0:g>=1?1:h(g)}}function R8(h){return function(g){return 1-h(1-g)}}function F8(h){return function(g){return .5*(g<.5?h(2*g):2-h(2-2*g))}}function bae(h){return h*h}function xae(h){return h*h*h}function _ae(h){if(h<=0)return 0;if(h>=1)return 1;var g=h*h,A=g*h;return 4*(h<.5?A:3*(h-g)+A-.75)}function wae(h){return function(g){return Math.pow(g,h)}}function Tae(h){return 1-Math.cos(h*ur)}function Aae(h){return Math.pow(2,10*(h-1))}function Mae(h){return 1-Math.sqrt(1-h*h)}function kae(h,g){var A;return arguments.length<2&&(g=.45),arguments.length?A=g/ar*Math.asin(1/h):(h=1,A=g/4),function(q){return 1+h*Math.pow(2,-10*q)*Math.sin((q-A)*ar/g)}}function Sae(h){return h||(h=1.70158),function(g){return g*g*((h+1)*g-h)}}function qae(h){return h<1/2.75?7.5625*h*h:h<2/2.75?7.5625*(h-=1.5/2.75)*h+.75:h<2.5/2.75?7.5625*(h-=2.25/2.75)*h+.9375:7.5625*(h-=2.625/2.75)*h+.984375}e.interpolateHcl=Lae;function Lae(h,g){h=e.hcl(h),g=e.hcl(g);var A=h.h,q=h.c,L=h.l,C=g.h-A,I=g.c-q,F=g.l-L;return isNaN(I)&&(I=0,q=isNaN(q)?g.c:q),isNaN(C)?(C=0,A=isNaN(A)?g.h:A):C>180?C-=360:C<-180&&(C+=360),function(U){return Tn(A+C*U,q+I*U,L+F*U)+""}}e.interpolateHsl=Cae;function Cae(h,g){h=e.hsl(h),g=e.hsl(g);var A=h.h,q=h.s,L=h.l,C=g.h-A,I=g.s-q,F=g.l-L;return isNaN(I)&&(I=0,q=isNaN(q)?g.s:q),isNaN(C)?(C=0,A=isNaN(A)?g.h:A):C>180?C-=360:C<-180&&(C+=360),function(U){return ba(A+C*U,q+I*U,L+F*U)+""}}e.interpolateLab=Eae;function Eae(h,g){h=e.lab(h),g=e.lab(g);var A=h.l,q=h.a,L=h.b,C=g.l-A,I=g.a-q,F=g.b-L;return function(U){return An(A+C*U,q+I*U,L+F*U)+""}}e.interpolateRound=N8;function N8(h,g){return g-=h,function(A){return Math.round(h+g*A)}}e.transform=function(h){var g=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(A){if(A!=null){g.setAttribute("transform",A);var q=g.transform.baseVal.consolidate()}return new z8(q?q.matrix:Pae)})(h)};function z8(h){var g=[h.a,h.b],A=[h.c,h.d],q=O8(g),L=I8(g,A),C=O8(Dae(A,g,-L))||0;g[0]*A[1]180?g+=360:g-h>180&&(h+=360),q.push({i:A.push(gf(A)+"rotate(",null,")")-2,x:el(h,g)})):g&&A.push(gf(A)+"rotate("+g+")")}function Nae(h,g,A,q){h!==g?q.push({i:A.push(gf(A)+"skewX(",null,")")-2,x:el(h,g)}):g&&A.push(gf(A)+"skewX("+g+")")}function zae(h,g,A,q){if(h[0]!==g[0]||h[1]!==g[1]){var L=A.push(gf(A)+"scale(",null,",",null,")");q.push({i:L-4,x:el(h[0],g[0])},{i:L-2,x:el(h[1],g[1])})}else(g[0]!==1||g[1]!==1)&&A.push(gf(A)+"scale("+g+")")}function B8(h,g){var A=[],q=[];return h=e.transform(h),g=e.transform(g),Rae(h.translate,g.translate,A,q),Fae(h.rotate,g.rotate,A,q),Nae(h.skew,g.skew,A,q),zae(h.scale,g.scale,A,q),h=g=null,function(L){for(var C=-1,I=q.length,F;++C0?C=xe:(A.c=null,A.t=NaN,A=null,g.end({type:"end",alpha:C=0})):xe>0&&(g.start({type:"start",alpha:C=xe}),A=Fd(h.tick)),h):C},h.start=function(){var xe,Ve=_e.length,nr=Me.length,fr=q[0],or=q[1],dr,pr;for(xe=0;xe=0;)C.push($=J[U]),$.parent=F,$.depth=F.depth+1;A&&(F.value=0),F.children=J}else A&&(F.value=+A.call(q,F,F.depth)||0),delete F.children;return _o(L,function(ee){var re,_e;h&&(re=ee.children)&&re.sort(h),A&&(_e=ee.parent)&&(_e.value+=ee.value)}),I}return q.sort=function(L){return arguments.length?(h=L,q):h},q.children=function(L){return arguments.length?(g=L,q):g},q.value=function(L){return arguments.length?(A=L,q):A},q.revalue=function(L){return A&&(Iv(L,function(C){C.children&&(C.value=0)}),_o(L,function(C){var I;C.children||(C.value=+A.call(q,C,C.depth)||0),(I=C.parent)&&(I.value+=C.value)})),L},q};function zv(h,g){return e.rebind(h,g,"sort","children","value"),h.nodes=h,h.links=Kae,h}function Iv(h,g){for(var A=[h];(h=A.pop())!=null;)if(g(h),(L=h.children)&&(q=L.length))for(var q,L;--q>=0;)A.push(L[q])}function _o(h,g){for(var A=[h],q=[];(h=A.pop())!=null;)if(q.push(h),(I=h.children)&&(C=I.length))for(var L=-1,C,I;++LL&&(L=F),q.push(F)}for(I=0;Iq&&(A=g,q=L);return A}function ine(h){return h.reduce(one,0)}function one(h,g){return h+g[1]}e.layout.histogram=function(){var h=!0,g=Number,A=sne,q=lne;function L(C,re){for(var F=[],U=C.map(g,this),J=A.call(this,U,re),$=q.call(this,J,U,re),ee,re=-1,_e=U.length,Me=$.length-1,ae=h?1:1/_e,ce;++re0)for(re=-1;++re<_e;)ce=U[re],ce>=J[0]&&ce<=J[1]&&(ee=F[e.bisect($,ce,1,Me)-1],ee.y+=ae,ee.push(C[re]));return F}return L.value=function(C){return arguments.length?(g=C,L):g},L.range=function(C){return arguments.length?(A=Br(C),L):A},L.bins=function(C){return arguments.length?(q=typeof C=="number"?function(I){return Y8(I,C)}:Br(C),L):q},L.frequency=function(C){return arguments.length?(h=!!C,L):h},L};function lne(h,g){return Y8(h,Math.ceil(Math.log(g.length)/Math.LN2+1))}function Y8(h,g){for(var A=-1,q=+h[0],L=(h[1]-q)/g,C=[];++A<=g;)C[A]=L*A+q;return C}function sne(h){return[e.min(h),e.max(h)]}e.layout.pack=function(){var h=e.layout.hierarchy().sort(une),g=0,A=[1,1],q;function L(C,I){var F=h.call(this,C,I),U=F[0],J=A[0],$=A[1],ee=q==null?Math.sqrt:typeof q=="function"?q:function(){return q};if(U.x=U.y=0,_o(U,function(_e){_e.r=+ee(_e.value)}),_o(U,j8),g){var re=g*(q?1:Math.max(2*U.r/J,2*U.r/$))/2;_o(U,function(_e){_e.r+=re}),_o(U,j8),_o(U,function(_e){_e.r-=re})}return Z8(U,J/2,$/2,q?1:1/Math.max(2*U.r/J,2*U.r/$)),F}return L.size=function(C){return arguments.length?(A=C,L):A},L.radius=function(C){return arguments.length?(q=C==null||typeof C=="function"?C:+C,L):q},L.padding=function(C){return arguments.length?(g=+C,L):g},zv(L,h)};function une(h,g){return h.value-g.value}function P3(h,g){var A=h._pack_next;h._pack_next=g,g._pack_prev=h,g._pack_next=A,A._pack_prev=g}function V8(h,g){h._pack_next=g,g._pack_prev=h}function W8(h,g){var A=g.x-h.x,q=g.y-h.y,L=h.r+g.r;return .999*L*L>A*A+q*q}function j8(h){if(!(g=h.children)||!(re=g.length))return;var g,A=1/0,q=-1/0,L=1/0,C=-1/0,I,F,U,J,$,ee,re;function _e(xe){A=Math.min(xe.x-xe.r,A),q=Math.max(xe.x+xe.r,q),L=Math.min(xe.y-xe.r,L),C=Math.max(xe.y+xe.r,C)}if(g.forEach(fne),I=g[0],I.x=-I.r,I.y=0,_e(I),re>1&&(F=g[1],F.x=F.r,F.y=0,_e(F),re>2))for(U=g[2],X8(I,F,U),_e(U),P3(I,U),I._pack_prev=U,P3(U,F),F=I._pack_next,J=3;Jce.x&&(ce=Ve),Ve.depth>ge.depth&&(ge=Ve)});var Ae=g(ae,ce)/2-ae.x,ke=A[0]/(ce.x+g(ce,ae)/2+Ae),xe=A[1]/(ge.depth||1);Iv(_e,function(Ve){Ve.x=(Ve.x+Ae)*ke,Ve.y=Ve.depth*xe})}return re}function C($){for(var ee={A:null,children:[$]},re=[ee],_e;(_e=re.pop())!=null;)for(var Me=_e.children,ae,ce=0,ge=Me.length;ce0&&(vne(dne(ae,$,re),$,Ve),ge+=Ve,Ae+=Ve),ke+=ae.m,ge+=_e.m,xe+=ce.m,Ae+=Me.m;ae&&!F3(Me)&&(Me.t=ae,Me.m+=ke-Ae),_e&&!R3(ce)&&(ce.t=_e,ce.m+=ge-xe,re=$)}return re}function J($){$.x*=A[0],$.y=$.depth*A[1]}return L.separation=function($){return arguments.length?(g=$,L):g},L.size=function($){return arguments.length?(q=(A=$)==null?J:null,L):q?null:A},L.nodeSize=function($){return arguments.length?(q=(A=$)==null?null:J,L):q?A:null},zv(L,h)};function J8(h,g){return h.parent==g.parent?1:2}function R3(h){var g=h.children;return g.length?g[0]:h.t}function F3(h){var g=h.children,A;return(A=g.length)?g[A-1]:h.t}function vne(h,g,A){var q=A/(g.i-h.i);g.c-=q,g.s+=A,h.c+=q,g.z+=A,g.m+=A}function hne(h){for(var g=0,A=0,q=h.children,L=q.length,C;--L>=0;)C=q[L],C.z+=g,C.m+=g,g+=C.s+(A+=C.c)}function dne(h,g,A){return h.a.parent===g.parent?h.a:A}e.layout.cluster=function(){var h=e.layout.hierarchy().sort(null).value(null),g=J8,A=[1,1],q=!1;function L(C,I){var F=h.call(this,C,I),U=F[0],J,$=0;_o(U,function(ae){var ce=ae.children;ce&&ce.length?(ae.x=yne(ce),ae.y=pne(ce)):(ae.x=J?$+=g(ae,J):0,ae.y=0,J=ae)});var ee=$8(U),re=K8(U),_e=ee.x-g(ee,re)/2,Me=re.x+g(re,ee)/2;return _o(U,q?function(ae){ae.x=(ae.x-U.x)*A[0],ae.y=(U.y-ae.y)*A[1]}:function(ae){ae.x=(ae.x-_e)/(Me-_e)*A[0],ae.y=(1-(U.y?ae.y/U.y:1))*A[1]}),F}return L.separation=function(C){return arguments.length?(g=C,L):g},L.size=function(C){return arguments.length?(q=(A=C)==null,L):q?null:A},L.nodeSize=function(C){return arguments.length?(q=(A=C)!=null,L):q?A:null},zv(L,h)};function pne(h){return 1+e.max(h,function(g){return g.y})}function yne(h){return h.reduce(function(g,A){return g+A.x},0)/h.length}function $8(h){var g=h.children;return g&&g.length?$8(g[0]):h}function K8(h){var g=h.children,A;return g&&(A=g.length)?K8(g[A-1]):h}e.layout.treemap=function(){var h=e.layout.hierarchy(),g=Math.round,A=[1,1],q=null,L=N3,C=!1,I,F="squarify",U=.5*(1+Math.sqrt(5));function J(ae,ce){for(var ge=-1,Ae=ae.length,ke,xe;++ge0;)Ae.push(xe=ke[or-1]),Ae.area+=xe.area,F!=="squarify"||(nr=re(Ae,fr))<=Ve?(ke.pop(),Ve=nr):(Ae.area-=Ae.pop().area,_e(Ae,fr,ge,!1),fr=Math.min(ge.dx,ge.dy),Ae.length=Ae.area=0,Ve=1/0);Ae.length&&(_e(Ae,fr,ge,!0),Ae.length=Ae.area=0),ce.forEach($)}}function ee(ae){var ce=ae.children;if(ce&&ce.length){var ge=L(ae),Ae=ce.slice(),ke,xe=[];for(J(Ae,ge.dx*ge.dy/ae.value),xe.area=0;ke=Ae.pop();)xe.push(ke),xe.area+=ke.area,ke.z!=null&&(_e(xe,ke.z?ge.dx:ge.dy,ge,!Ae.length),xe.length=xe.area=0);ce.forEach(ee)}}function re(ae,ce){for(var ge=ae.area,Ae,ke=0,xe=1/0,Ve=-1,nr=ae.length;++Veke&&(ke=Ae));return ge*=ge,ce*=ce,ge?Math.max(ce*ke*U/ge,ge/(ce*xe*U)):1/0}function _e(ae,ce,ge,Ae){var ke=-1,xe=ae.length,Ve=ge.x,nr=ge.y,fr=ce?g(ae.area/ce):0,or;if(ce==ge.dx){for((Ae||fr>ge.dy)&&(fr=ge.dy);++kege.dx)&&(fr=ge.dx);++ke1);return h+g*q*Math.sqrt(-2*Math.log(C)/C)}},logNormal:function(){var h=e.random.normal.apply(e,arguments);return function(){return Math.exp(h())}},bates:function(h){var g=e.random.irwinHall(h);return function(){return g()/h}},irwinHall:function(h){return function(){for(var g=0,A=0;A2?bne:mne,J=q?Oae:Iae;return L=U(h,g,J,A),C=U(g,h,J,Bs),F}function F(U){return L(U)}return F.invert=function(U){return C(U)},F.domain=function(U){return arguments.length?(h=U.map(Number),I()):h},F.range=function(U){return arguments.length?(g=U,I()):g},F.rangeRound=function(U){return F.range(U).interpolate(N8)},F.clamp=function(U){return arguments.length?(q=U,I()):q},F.interpolate=function(U){return arguments.length?(A=U,I()):A},F.ticks=function(U){return O3(h,U)},F.tickFormat=function(U,J){return d3_scale_linearTickFormat(h,U,J)},F.nice=function(U){return aA(h,U),I()},F.copy=function(){return rA(h,g,A,q)},I()}function tA(h,g){return e.rebind(h,g,"range","rangeRound","interpolate","clamp")}function aA(h,g){return z3(h,eA(I3(h,g)[2])),z3(h,eA(I3(h,g)[2])),h}function I3(h,g){g==null&&(g=10);var A=Ud(h),q=A[1]-A[0],L=Math.pow(10,Math.floor(Math.log(q/g)/Math.LN10)),C=g/q*L;return C<=.15?L*=10:C<=.35?L*=5:C<=.75&&(L*=2),A[0]=Math.ceil(A[0]/L)*L,A[1]=Math.floor(A[1]/L)*L+L*.5,A[2]=L,A}function O3(h,g){return e.range.apply(e,I3(h,g))}var xne={s:1,g:1,p:1,r:1,e:1};function nA(h){return-Math.floor(Math.log(h)/Math.LN10+.01)}function Uqe(h,g){var A=nA(g[2]);return h in xne?Math.abs(A-nA(Math.max(x(g[0]),x(g[1]))))+ +(h!=="e"):A-(h==="%")*2}e.scale.log=function(){return iA(e.scale.linear().domain([0,1]),10,!0,[1,10])};function iA(h,g,A,q){function L(F){return(A?Math.log(F<0?0:F):-Math.log(F>0?0:-F))/Math.log(g)}function C(F){return A?Math.pow(g,F):-Math.pow(g,-F)}function I(F){return h(L(F))}return I.invert=function(F){return C(h.invert(F))},I.domain=function(F){return arguments.length?(A=F[0]>=0,h.domain((q=F.map(Number)).map(L)),I):q},I.base=function(F){return arguments.length?(g=+F,h.domain(q.map(L)),I):g},I.nice=function(){var F=z3(q.map(L),A?Math:_ne);return h.domain(F),q=F.map(C),I},I.ticks=function(){var F=Ud(q),U=[],J=F[0],$=F[1],ee=Math.floor(L(J)),re=Math.ceil(L($)),_e=g%1?2:g;if(isFinite(re-ee)){if(A){for(;ee0;Me--)U.push(C(ee)*Me);for(ee=0;U[ee]$;re--);U=U.slice(ee,re)}return U},I.copy=function(){return iA(h.copy(),g,A,q)},tA(I,h)}var _ne={floor:function(h){return-Math.ceil(-h)},ceil:function(h){return-Math.floor(-h)}};e.scale.pow=function(){return oA(e.scale.linear(),1,[0,1])};function oA(h,g,A){var q=Yd(g),L=Yd(1/g);function C(I){return h(q(I))}return C.invert=function(I){return L(h.invert(I))},C.domain=function(I){return arguments.length?(h.domain((A=I.map(Number)).map(q)),C):A},C.ticks=function(I){return O3(A,I)},C.tickFormat=function(I,F){return d3_scale_linearTickFormat(A,I,F)},C.nice=function(I){return C.domain(aA(A,I))},C.exponent=function(I){return arguments.length?(q=Yd(g=I),L=Yd(1/g),h.domain(A.map(q)),C):g},C.copy=function(){return oA(h.copy(),g,A)},tA(C,h)}function Yd(h){return function(g){return g<0?-Math.pow(-g,h):Math.pow(g,h)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return lA([],{t:"range",a:[[]]})};function lA(h,g){var A,q,L;function C(F){return q[((A.get(F)||(g.t==="range"?A.set(F,h.push(F)):NaN))-1)%q.length]}function I(F,U){return e.range(h.length).map(function(J){return F+U*J})}return C.domain=function(F){if(!arguments.length)return h;h=[],A=new b;for(var U=-1,J=F.length,$;++U0?A[C-1]:h[0],Cre?0:1;if($=hr)return U($,Me)+(J?U(J,1-Me):"")+"Z";var ae,ce,ge,Ae,ke=0,xe=0,Ve,nr,fr,or,dr,pr,Er,mr,kr=[];if((Ae=(+I.apply(this,arguments)||0)/2)&&(ge=q===Vd?Math.sqrt(J*J+$*$):+q.apply(this,arguments),Me||(xe*=-1),$&&(xe=Dt(ge/$*Math.sin(Ae))),J&&(ke=Dt(ge/J*Math.sin(Ae)))),$){Ve=$*Math.cos(ee+xe),nr=$*Math.sin(ee+xe),fr=$*Math.cos(re-xe),or=$*Math.sin(re-xe);var rt=Math.abs(re-ee-2*xe)<=qe?0:1;if(xe&&Wd(Ve,nr,fr,or)===Me^rt){var Jt=(ee+re)/2;Ve=$*Math.cos(Jt),nr=$*Math.sin(Jt),fr=or=null}}else Ve=nr=0;if(J){dr=J*Math.cos(re-ke),pr=J*Math.sin(re-ke),Er=J*Math.cos(ee+ke),mr=J*Math.sin(ee+ke);var yt=Math.abs(ee-re+2*ke)<=qe?0:1;if(ke&&Wd(dr,pr,Er,mr)===1-Me^yt){var tr=(ee+re)/2;dr=J*Math.cos(tr),pr=J*Math.sin(tr),Er=mr=null}}else dr=pr=0;if(_e>ve&&(ae=Math.min(Math.abs($-J)/2,+A.apply(this,arguments)))>.001){ce=J<$^Me?0:1;var Dr=ae,Rr=ae;if(_e0?0:1}function jd(h,g,A,q,L){var C=h[0]-g[0],I=h[1]-g[1],F=(L?q:-q)/Math.sqrt(C*C+I*I),U=F*I,J=-F*C,$=h[0]+U,ee=h[1]+J,re=g[0]+U,_e=g[1]+J,Me=($+re)/2,ae=(ee+_e)/2,ce=re-$,ge=_e-ee,Ae=ce*ce+ge*ge,ke=A-q,xe=$*_e-re*ee,Ve=(ge<0?-1:1)*Math.sqrt(Math.max(0,ke*ke*Ae-xe*xe)),nr=(xe*ge-ce*Ve)/Ae,fr=(-xe*ce-ge*Ve)/Ae,or=(xe*ge+ce*Ve)/Ae,dr=(-xe*ce+ge*Ve)/Ae,pr=nr-Me,Er=fr-ae,mr=or-Me,kr=dr-ae;return pr*pr+Er*Er>mr*mr+kr*kr&&(nr=or,fr=dr),[[nr-U,fr-J],[nr*A/ke,fr*A/ke]]}function dA(){return!0}function pA(h){var g=hf,A=Ev,q=dA,L=Wi,C=L.key,I=.7;function F(U){var J=[],$=[],ee=-1,re=U.length,_e,Me=Br(g),ae=Br(A);function ce(){J.push("M",L(h($),I))}for(;++ee1?h.join("L"):h+"Z"}function yA(h){return h.join("L")+"Z"}function Cne(h){for(var g=0,A=h.length,q=h[0],L=[q[0],",",q[1]];++g1&&L.push("H",q[0]),L.join("")}function H3(h){for(var g=0,A=h.length,q=h[0],L=[q[0],",",q[1]];++g1){F=g[1],C=h[U],U++,q+="C"+(L[0]+I[0])+","+(L[1]+I[1])+","+(C[0]-F[0])+","+(C[1]-F[1])+","+C[0]+","+C[1];for(var J=2;J9&&(C=A*3/Math.sqrt(C),I[F]=C*q,I[F+1]=C*L));for(F=-1;++F<=U;)C=(h[Math.min(U,F+1)][0]-h[Math.max(0,F-1)][0])/(6*(1+I[F]*I[F])),g.push([C||0,I[F]*C||0]);return g}function One(h){return h.length<3?Wi(h):h[0]+Zd(h,Ine(h))}e.svg.line.radial=function(){var h=pA(xA);return h.radius=h.x,delete h.x,h.angle=h.y,delete h.y,h};function xA(h){for(var g,A=-1,q=h.length,L,C;++Aqe)+",1 "+ee}function J($,ee,re,_e){return"Q 0,0 "+_e}return C.radius=function($){return arguments.length?(A=Br($),C):A},C.source=function($){return arguments.length?(h=Br($),C):h},C.target=function($){return arguments.length?(g=Br($),C):g},C.startAngle=function($){return arguments.length?(q=Br($),C):q},C.endAngle=function($){return arguments.length?(L=Br($),C):L},C};function Bne(h){return h.radius}e.svg.diagonal=function(){var h=wA,g=TA,A=AA;function q(L,C){var I=h.call(this,L,C),F=g.call(this,L,C),U=(I.y+F.y)/2,J=[I,{x:I.x,y:U},{x:F.x,y:U},F];return J=J.map(A),"M"+J[0]+"C"+J[1]+" "+J[2]+" "+J[3]}return q.source=function(L){return arguments.length?(h=Br(L),q):h},q.target=function(L){return arguments.length?(g=Br(L),q):g},q.projection=function(L){return arguments.length?(A=L,q):A},q};function AA(h){return[h.x,h.y]}e.svg.diagonal.radial=function(){var h=e.svg.diagonal(),g=AA,A=h.projection;return h.projection=function(q){return arguments.length?A(Hne(g=q)):g},h};function Hne(h){return function(){var g=h.apply(this,arguments),A=g[0],q=g[1]-ur;return[A*Math.cos(q),A*Math.sin(q)]}}e.svg.symbol=function(){var h=Gne,g=Une;function A(q,L){return(kA.get(h.call(this,q,L))||MA)(g.call(this,q,L))}return A.type=function(q){return arguments.length?(h=Br(q),A):h},A.size=function(q){return arguments.length?(g=Br(q),A):g},A};function Une(){return 64}function Gne(){return"circle"}function MA(h){var g=Math.sqrt(h/qe);return"M0,"+g+"A"+g+","+g+" 0 1,1 0,"+-g+"A"+g+","+g+" 0 1,1 0,"+g+"Z"}var kA=e.map({circle:MA,cross:function(h){var g=Math.sqrt(h/5)/2;return"M"+-3*g+","+-g+"H"+-g+"V"+-3*g+"H"+g+"V"+-g+"H"+3*g+"V"+g+"H"+g+"V"+3*g+"H"+-g+"V"+g+"H"+-3*g+"Z"},diamond:function(h){var g=Math.sqrt(h/(2*SA)),A=g*SA;return"M0,"+-g+"L"+A+",0 0,"+g+" "+-A+",0Z"},square:function(h){var g=Math.sqrt(h)/2;return"M"+-g+","+-g+"L"+g+","+-g+" "+g+","+g+" "+-g+","+g+"Z"},"triangle-down":function(h){var g=Math.sqrt(h/Xd),A=g*Xd/2;return"M0,"+A+"L"+g+","+-A+" "+-g+","+-A+"Z"},"triangle-up":function(h){var g=Math.sqrt(h/Xd),A=g*Xd/2;return"M0,"+-A+"L"+g+","+A+" "+-g+","+A+"Z"}});e.svg.symbolTypes=kA.keys();var Xd=Math.sqrt(3),SA=Math.tan(30*Ar);de.transition=function(h){for(var g=Hs||++LA,A=j3(h),q=[],L,C,I=$d||{time:Date.now(),ease:_ae,delay:0,duration:250},F=-1,U=this.length;++F0;)ee[--Ae].call(h,ge);if(ce>=1)return I.event&&I.event.end.call(h,h.__data__,g),--C.count?delete C[q]:delete h[A],1}I||(F=L.time,U=Fd(re,0,F),I=C[q]={tween:new b,time:F,timer:U,delay:L.delay,duration:L.duration,ease:L.ease,index:g},L=null,++C.count)}e.svg.axis=function(){var h=e.scale.linear(),g=CA,A=6,q=6,L=3,C=[10],I=null,F;function U(J){J.each(function(){var $=e.select(this),ee=this.__chart__||h,re=this.__chart__=h.copy(),_e=I==null?re.ticks?re.ticks.apply(re,C):re.domain():I,Me=F==null?re.tickFormat?re.tickFormat.apply(re,C):H:F,ae=$.selectAll(".tick").data(_e,re),ce=ae.enter().insert("g",".domain").attr("class","tick").style("opacity",ve),ge=e.transition(ae.exit()).style("opacity",ve).remove(),Ae=e.transition(ae.order()).style("opacity",1),ke=Math.max(A,0)+L,xe,Ve=Gd(re),nr=$.selectAll(".domain").data([0]),fr=(nr.enter().append("path").attr("class","domain"),e.transition(nr));ce.append("line"),ce.append("text");var or=ce.select("line"),dr=Ae.select("line"),pr=ae.select("text").text(Me),Er=ce.select("text"),mr=Ae.select("text"),kr=g==="top"||g==="left"?-1:1,rt,Jt,yt,tr;if(g==="bottom"||g==="top"?(xe=Wne,rt="x",yt="y",Jt="x2",tr="y2",pr.attr("dy",kr<0?"0em":".71em").style("text-anchor","middle"),fr.attr("d","M"+Ve[0]+","+kr*q+"V0H"+Ve[1]+"V"+kr*q)):(xe=jne,rt="y",yt="x",Jt="y2",tr="x2",pr.attr("dy",".32em").style("text-anchor",kr<0?"end":"start"),fr.attr("d","M"+kr*q+","+Ve[0]+"H0V"+Ve[1]+"H"+kr*q)),or.attr(tr,kr*A),Er.attr(yt,kr*ke),dr.attr(Jt,0).attr(tr,kr*A),mr.attr(rt,0).attr(yt,kr*ke),re.rangeBand){var Dr=re,Rr=Dr.rangeBand()/2;ee=re=function(tt){return Dr(tt)+Rr}}else ee.rangeBand?ee=re:ge.call(xe,re,ee);ce.call(xe,ee,re),Ae.call(xe,re,re)})}return U.scale=function(J){return arguments.length?(h=J,U):h},U.orient=function(J){return arguments.length?(g=J in Vne?J+"":CA,U):g},U.ticks=function(){return arguments.length?(C=t(arguments),U):C},U.tickValues=function(J){return arguments.length?(I=J,U):I},U.tickFormat=function(J){return arguments.length?(F=J,U):F},U.tickSize=function(J){var $=arguments.length;return $?(A=+J,q=+arguments[$-1],U):A},U.innerTickSize=function(J){return arguments.length?(A=+J,U):A},U.outerTickSize=function(J){return arguments.length?(q=+J,U):q},U.tickPadding=function(J){return arguments.length?(L=+J,U):L},U.tickSubdivide=function(){return arguments.length&&U},U};var CA="bottom",Vne={top:1,right:1,bottom:1,left:1};function Wne(h,g,A){h.attr("transform",function(q){var L=g(q);return"translate("+(isFinite(L)?L:A(q))+",0)"})}function jne(h,g,A){h.attr("transform",function(q){var L=g(q);return"translate(0,"+(isFinite(L)?L:A(q))+")"})}e.svg.brush=function(){var h=le($,"brushstart","brush","brushend"),g=null,A=null,q=[0,0],L=[0,0],C,I,F=!0,U=!0,J=Z3[0];function $(ae){ae.each(function(){var ce=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Me).on("touchstart.brush",Me),ge=ce.selectAll(".background").data([0]);ge.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ce.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ae=ce.selectAll(".resize").data(J,H);Ae.exit().remove(),Ae.enter().append("g").attr("class",function(nr){return"resize "+nr}).style("cursor",function(nr){return Zne[nr]}).append("rect").attr("x",function(nr){return/[ew]$/.test(nr)?-3:null}).attr("y",function(nr){return/^[ns]/.test(nr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ae.style("display",$.empty()?"none":null);var ke=e.transition(ce),xe=e.transition(ge),Ve;g&&(Ve=Gd(g),xe.attr("x",Ve[0]).attr("width",Ve[1]-Ve[0]),re(ke)),A&&(Ve=Gd(A),xe.attr("y",Ve[0]).attr("height",Ve[1]-Ve[0]),_e(ke)),ee(ke)})}$.event=function(ae){ae.each(function(){var ce=h.of(this,arguments),ge={x:q,y:L,i:C,j:I},Ae=this.__chart__||ge;this.__chart__=ge,Hs?e.select(this).transition().each("start.brush",function(){C=Ae.i,I=Ae.j,q=Ae.x,L=Ae.y,ce({type:"brushstart"})}).tween("brush:brush",function(){var ke=Hd(q,ge.x),xe=Hd(L,ge.y);return C=I=null,function(Ve){q=ge.x=ke(Ve),L=ge.y=xe(Ve),ce({type:"brush",mode:"resize"})}}).each("end.brush",function(){C=ge.i,I=ge.j,ce({type:"brush",mode:"resize"}),ce({type:"brushend"})}):(ce({type:"brushstart"}),ce({type:"brush",mode:"resize"}),ce({type:"brushend"}))})};function ee(ae){ae.selectAll(".resize").attr("transform",function(ce){return"translate("+q[+/e$/.test(ce)]+","+L[+/^s/.test(ce)]+")"})}function re(ae){ae.select(".extent").attr("x",q[0]),ae.selectAll(".extent,.n>rect,.s>rect").attr("width",q[1]-q[0])}function _e(ae){ae.select(".extent").attr("y",L[0]),ae.selectAll(".extent,.e>rect,.w>rect").attr("height",L[1]-L[0])}function Me(){var ae=this,ce=e.select(e.event.target),ge=h.of(ae,arguments),Ae=e.select(ae),ke=ce.datum(),xe=!/^(n|s)$/.test(ke)&&g,Ve=!/^(e|w)$/.test(ke)&&A,nr=ce.classed("extent"),fr=cr(ae),or,dr=e.mouse(ae),pr,Er=e.select(i(ae)).on("keydown.brush",rt).on("keyup.brush",Jt);if(e.event.changedTouches?Er.on("touchmove.brush",yt).on("touchend.brush",Dr):Er.on("mousemove.brush",yt).on("mouseup.brush",Dr),Ae.interrupt().selectAll("*").interrupt(),nr)dr[0]=q[0]-dr[0],dr[1]=L[0]-dr[1];else if(ke){var mr=+/w$/.test(ke),kr=+/^n/.test(ke);pr=[q[1-mr]-dr[0],L[1-kr]-dr[1]],dr[0]=q[mr],dr[1]=L[kr]}else e.event.altKey&&(or=dr.slice());Ae.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ce.style("cursor")),ge({type:"brushstart"}),yt();function rt(){e.event.keyCode==32&&(nr||(or=null,dr[0]-=q[1],dr[1]-=L[1],nr=2),te())}function Jt(){e.event.keyCode==32&&nr==2&&(dr[0]+=q[1],dr[1]+=L[1],nr=0,te())}function yt(){var Rr=e.mouse(ae),tt=!1;pr&&(Rr[0]+=pr[0],Rr[1]+=pr[1]),nr||(e.event.altKey?(or||(or=[(q[0]+q[1])/2,(L[0]+L[1])/2]),dr[0]=q[+(Rr[0]{(function(e,r){typeof ap=="object"&&typeof zA!="undefined"?r(ap):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(ap,function(e){"use strict";var r=new Date,t=new Date;function a(se,Te,Se,ir){function Qe(Le){return se(Le=arguments.length===0?new Date:new Date(+Le)),Le}return Qe.floor=function(Le){return se(Le=new Date(+Le)),Le},Qe.ceil=function(Le){return se(Le=new Date(Le-1)),Te(Le,1),se(Le),Le},Qe.round=function(Le){var Ce=Qe(Le),Ge=Qe.ceil(Le);return Le-Ce0))return Ze;do Ze.push(Ye=new Date(+Le)),Te(Le,Ge),se(Le);while(Ye=Ce)for(;se(Ce),!Le(Ce);)Ce.setTime(Ce-1)},function(Ce,Ge){if(Ce>=Ce)if(Ge<0)for(;++Ge<=0;)for(;Te(Ce,-1),!Le(Ce););else for(;--Ge>=0;)for(;Te(Ce,1),!Le(Ce););})},Se&&(Qe.count=function(Le,Ce){return r.setTime(+Le),t.setTime(+Ce),se(r),se(t),Math.floor(Se(r,t))},Qe.every=function(Le){return Le=Math.floor(Le),!isFinite(Le)||!(Le>0)?null:Le>1?Qe.filter(ir?function(Ce){return ir(Ce)%Le===0}:function(Ce){return Qe.count(0,Ce)%Le===0}):Qe}),Qe}var n=a(function(){},function(se,Te){se.setTime(+se+Te)},function(se,Te){return Te-se});n.every=function(se){return se=Math.floor(se),!isFinite(se)||!(se>0)?null:se>1?a(function(Te){Te.setTime(Math.floor(Te/se)*se)},function(Te,Se){Te.setTime(+Te+Se*se)},function(Te,Se){return(Se-Te)/se}):n};var i=n.range,o=1e3,l=6e4,s=36e5,u=864e5,f=6048e5,c=a(function(se){se.setTime(se-se.getMilliseconds())},function(se,Te){se.setTime(+se+Te*o)},function(se,Te){return(Te-se)/o},function(se){return se.getUTCSeconds()}),v=c.range,d=a(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*o)},function(se,Te){se.setTime(+se+Te*l)},function(se,Te){return(Te-se)/l},function(se){return se.getMinutes()}),p=d.range,m=a(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*o-se.getMinutes()*l)},function(se,Te){se.setTime(+se+Te*s)},function(se,Te){return(Te-se)/s},function(se){return se.getHours()}),y=m.range,x=a(function(se){se.setHours(0,0,0,0)},function(se,Te){se.setDate(se.getDate()+Te)},function(se,Te){return(Te-se-(Te.getTimezoneOffset()-se.getTimezoneOffset())*l)/u},function(se){return se.getDate()-1}),_=x.range;function w(se){return a(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-se)%7),Te.setHours(0,0,0,0)},function(Te,Se){Te.setDate(Te.getDate()+Se*7)},function(Te,Se){return(Se-Te-(Se.getTimezoneOffset()-Te.getTimezoneOffset())*l)/f})}var b=w(0),T=w(1),k=w(2),M=w(3),S=w(4),E=w(5),P=w(6),R=b.range,D=T.range,z=k.range,O=M.range,H=S.range,Y=E.range,G=P.range,B=a(function(se){se.setDate(1),se.setHours(0,0,0,0)},function(se,Te){se.setMonth(se.getMonth()+Te)},function(se,Te){return Te.getMonth()-se.getMonth()+(Te.getFullYear()-se.getFullYear())*12},function(se){return se.getMonth()}),V=B.range,X=a(function(se){se.setMonth(0,1),se.setHours(0,0,0,0)},function(se,Te){se.setFullYear(se.getFullYear()+Te)},function(se,Te){return Te.getFullYear()-se.getFullYear()},function(se){return se.getFullYear()});X.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:a(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/se)*se),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Se){Te.setFullYear(Te.getFullYear()+Se*se)})};var Z=X.range,te=a(function(se){se.setUTCSeconds(0,0)},function(se,Te){se.setTime(+se+Te*l)},function(se,Te){return(Te-se)/l},function(se){return se.getUTCMinutes()}),fe=te.range,le=a(function(se){se.setUTCMinutes(0,0,0)},function(se,Te){se.setTime(+se+Te*s)},function(se,Te){return(Te-se)/s},function(se){return se.getUTCHours()}),ie=le.range,K=a(function(se){se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCDate(se.getUTCDate()+Te)},function(se,Te){return(Te-se)/u},function(se){return se.getUTCDate()-1}),he=K.range;function oe(se){return a(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-se)%7),Te.setUTCHours(0,0,0,0)},function(Te,Se){Te.setUTCDate(Te.getUTCDate()+Se*7)},function(Te,Se){return(Se-Te)/f})}var ye=oe(0),ue=oe(1),de=oe(2),W=oe(3),Q=oe(4),j=oe(5),pe=oe(6),me=ye.range,we=ue.range,Ne=de.range,Fe=W.range,Re=Q.range,Ie=j.range,Be=pe.range,ze=a(function(se){se.setUTCDate(1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCMonth(se.getUTCMonth()+Te)},function(se,Te){return Te.getUTCMonth()-se.getUTCMonth()+(Te.getUTCFullYear()-se.getUTCFullYear())*12},function(se){return se.getUTCMonth()}),Pe=ze.range,Xe=a(function(se){se.setUTCMonth(0,1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCFullYear(se.getUTCFullYear()+Te)},function(se,Te){return Te.getUTCFullYear()-se.getUTCFullYear()},function(se){return se.getUTCFullYear()});Xe.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:a(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/se)*se),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Se){Te.setUTCFullYear(Te.getUTCFullYear()+Se*se)})};var Ue=Xe.range;e.timeDay=x,e.timeDays=_,e.timeFriday=E,e.timeFridays=Y,e.timeHour=m,e.timeHours=y,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=T,e.timeMondays=D,e.timeMonth=B,e.timeMonths=V,e.timeSaturday=P,e.timeSaturdays=G,e.timeSecond=c,e.timeSeconds=v,e.timeSunday=b,e.timeSundays=R,e.timeThursday=S,e.timeThursdays=H,e.timeTuesday=k,e.timeTuesdays=z,e.timeWednesday=M,e.timeWednesdays=O,e.timeWeek=b,e.timeWeeks=R,e.timeYear=X,e.timeYears=Z,e.utcDay=K,e.utcDays=he,e.utcFriday=j,e.utcFridays=Ie,e.utcHour=le,e.utcHours=ie,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=te,e.utcMinutes=fe,e.utcMonday=ue,e.utcMondays=we,e.utcMonth=ze,e.utcMonths=Pe,e.utcSaturday=pe,e.utcSaturdays=Be,e.utcSecond=c,e.utcSeconds=v,e.utcSunday=ye,e.utcSundays=me,e.utcThursday=Q,e.utcThursdays=Re,e.utcTuesday=de,e.utcTuesdays=Ne,e.utcWednesday=W,e.utcWednesdays=Fe,e.utcWeek=ye,e.utcWeeks=me,e.utcYear=Xe,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var xf=N((np,IA)=>{(function(e,r){typeof np=="object"&&typeof IA!="undefined"?r(np,X3()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(np,function(e,r){"use strict";function t(ne){if(0<=ne.y&&ne.y<100){var ve=new Date(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L);return ve.setFullYear(ne.y),ve}return new Date(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L)}function a(ne){if(0<=ne.y&&ne.y<100){var ve=new Date(Date.UTC(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L));return ve.setUTCFullYear(ne.y),ve}return new Date(Date.UTC(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L))}function n(ne,ve,De){return{y:ne,m:ve,d:De,H:0,M:0,S:0,L:0}}function i(ne){var ve=ne.dateTime,De=ne.date,qe=ne.time,ar=ne.periods,hr=ne.days,ur=ne.shortDays,Ar=ne.months,Wr=ne.shortMonths,Vr=v(ar),zr=d(ar),Et=v(hr),Dt=d(hr),ma=v(ur),St=d(ur),ja=v(Ar),ga=d(Ar),jt=v(Wr),Na=d(Wr),br={a:Ko,A:Qo,b:vt,B:An,c:null,d:B,e:B,f:fe,H:V,I:X,j:Z,L:te,m:le,M:ie,p:Rt,q:zs,Q:Ce,s:Ge,S:K,u:he,U:oe,V:ye,w:ue,W:de,x:null,X:null,y:W,Y:Q,Z:j,"%":Le},pt={a:pn,A:Gi,b:Ut,B:Yi,c:null,d:pe,e:pe,f:Re,H:me,I:we,j:Ne,L:Fe,m:Ie,M:Be,p:Pl,q:Rl,Q:Ce,s:Ge,S:ze,u:Pe,U:Xe,V:Ue,w:se,W:Te,x:null,X:null,y:Se,Y:ir,Z:Qe,"%":Le},Nr={a:ba,A:Zt,b:tn,B:Tn,c:Xt,d:S,e:S,f:O,H:P,I:P,j:E,L:z,m:M,M:R,p:ct,q:k,Q:Y,s:G,S:D,u:m,U:y,V:x,w:p,W:_,x:ut,X:xa,y:b,Y:w,Z:T,"%":H};br.x=st(De,br),br.X=st(qe,br),br.c=st(ve,br),pt.x=st(De,pt),pt.X=st(qe,pt),pt.c=st(ve,pt);function st(yr,$r){return function(ht){var sr=[],za=-1,At=0,Ia=yr.length,Br,Vi,Is;for(ht instanceof Date||(ht=new Date(+ht));++za53)return null;"w"in sr||(sr.w=1),"Z"in sr?(At=a(n(sr.y,0,1)),Ia=At.getUTCDay(),At=Ia>4||Ia===0?r.utcMonday.ceil(At):r.utcMonday(At),At=r.utcDay.offset(At,(sr.V-1)*7),sr.y=At.getUTCFullYear(),sr.m=At.getUTCMonth(),sr.d=At.getUTCDate()+(sr.w+6)%7):(At=t(n(sr.y,0,1)),Ia=At.getDay(),At=Ia>4||Ia===0?r.timeMonday.ceil(At):r.timeMonday(At),At=r.timeDay.offset(At,(sr.V-1)*7),sr.y=At.getFullYear(),sr.m=At.getMonth(),sr.d=At.getDate()+(sr.w+6)%7)}else("W"in sr||"U"in sr)&&("w"in sr||(sr.w="u"in sr?sr.u%7:"W"in sr?1:0),Ia="Z"in sr?a(n(sr.y,0,1)).getUTCDay():t(n(sr.y,0,1)).getDay(),sr.m=0,sr.d="W"in sr?(sr.w+6)%7+sr.W*7-(Ia+5)%7:sr.w+sr.U*7-(Ia+6)%7);return"Z"in sr?(sr.H+=sr.Z/100|0,sr.M+=sr.Z%100,a(sr)):t(sr)}}function Qr(yr,$r,ht,sr){for(var za=0,At=$r.length,Ia=ht.length,Br,Vi;za=Ia)return-1;if(Br=$r.charCodeAt(za++),Br===37){if(Br=$r.charAt(za++),Vi=Nr[Br in o?$r.charAt(za++):Br],!Vi||(sr=Vi(yr,ht,sr))<0)return-1}else if(Br!=ht.charCodeAt(sr++))return-1}return sr}function ct(yr,$r,ht){var sr=Vr.exec($r.slice(ht));return sr?(yr.p=zr[sr[0].toLowerCase()],ht+sr[0].length):-1}function ba(yr,$r,ht){var sr=ma.exec($r.slice(ht));return sr?(yr.w=St[sr[0].toLowerCase()],ht+sr[0].length):-1}function Zt(yr,$r,ht){var sr=Et.exec($r.slice(ht));return sr?(yr.w=Dt[sr[0].toLowerCase()],ht+sr[0].length):-1}function tn(yr,$r,ht){var sr=jt.exec($r.slice(ht));return sr?(yr.m=Na[sr[0].toLowerCase()],ht+sr[0].length):-1}function Tn(yr,$r,ht){var sr=ja.exec($r.slice(ht));return sr?(yr.m=ga[sr[0].toLowerCase()],ht+sr[0].length):-1}function Xt(yr,$r,ht){return Qr(yr,ve,$r,ht)}function ut(yr,$r,ht){return Qr(yr,De,$r,ht)}function xa(yr,$r,ht){return Qr(yr,qe,$r,ht)}function Ko(yr){return ur[yr.getDay()]}function Qo(yr){return hr[yr.getDay()]}function vt(yr){return Wr[yr.getMonth()]}function An(yr){return Ar[yr.getMonth()]}function Rt(yr){return ar[+(yr.getHours()>=12)]}function zs(yr){return 1+~~(yr.getMonth()/3)}function pn(yr){return ur[yr.getUTCDay()]}function Gi(yr){return hr[yr.getUTCDay()]}function Ut(yr){return Wr[yr.getUTCMonth()]}function Yi(yr){return Ar[yr.getUTCMonth()]}function Pl(yr){return ar[+(yr.getUTCHours()>=12)]}function Rl(yr){return 1+~~(yr.getUTCMonth()/3)}return{format:function(yr){var $r=st(yr+="",br);return $r.toString=function(){return yr},$r},parse:function(yr){var $r=Pt(yr+="",!1);return $r.toString=function(){return yr},$r},utcFormat:function(yr){var $r=st(yr+="",pt);return $r.toString=function(){return yr},$r},utcParse:function(yr){var $r=Pt(yr+="",!0);return $r.toString=function(){return yr},$r}}}var o={"-":"",_:" ",0:"0"},l=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(ne,ve,De){var qe=ne<0?"-":"",ar=(qe?-ne:ne)+"",hr=ar.length;return qe+(hr68?1900:2e3),De+qe[0].length):-1}function T(ne,ve,De){var qe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ve.slice(De,De+6));return qe?(ne.Z=qe[1]?0:-(qe[2]+(qe[3]||"00")),De+qe[0].length):-1}function k(ne,ve,De){var qe=l.exec(ve.slice(De,De+1));return qe?(ne.q=qe[0]*3-3,De+qe[0].length):-1}function M(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.m=qe[0]-1,De+qe[0].length):-1}function S(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.d=+qe[0],De+qe[0].length):-1}function E(ne,ve,De){var qe=l.exec(ve.slice(De,De+3));return qe?(ne.m=0,ne.d=+qe[0],De+qe[0].length):-1}function P(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.H=+qe[0],De+qe[0].length):-1}function R(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.M=+qe[0],De+qe[0].length):-1}function D(ne,ve,De){var qe=l.exec(ve.slice(De,De+2));return qe?(ne.S=+qe[0],De+qe[0].length):-1}function z(ne,ve,De){var qe=l.exec(ve.slice(De,De+3));return qe?(ne.L=+qe[0],De+qe[0].length):-1}function O(ne,ve,De){var qe=l.exec(ve.slice(De,De+6));return qe?(ne.L=Math.floor(qe[0]/1e3),De+qe[0].length):-1}function H(ne,ve,De){var qe=s.exec(ve.slice(De,De+1));return qe?De+qe[0].length:-1}function Y(ne,ve,De){var qe=l.exec(ve.slice(De));return qe?(ne.Q=+qe[0],De+qe[0].length):-1}function G(ne,ve,De){var qe=l.exec(ve.slice(De));return qe?(ne.s=+qe[0],De+qe[0].length):-1}function B(ne,ve){return f(ne.getDate(),ve,2)}function V(ne,ve){return f(ne.getHours(),ve,2)}function X(ne,ve){return f(ne.getHours()%12||12,ve,2)}function Z(ne,ve){return f(1+r.timeDay.count(r.timeYear(ne),ne),ve,3)}function te(ne,ve){return f(ne.getMilliseconds(),ve,3)}function fe(ne,ve){return te(ne,ve)+"000"}function le(ne,ve){return f(ne.getMonth()+1,ve,2)}function ie(ne,ve){return f(ne.getMinutes(),ve,2)}function K(ne,ve){return f(ne.getSeconds(),ve,2)}function he(ne){var ve=ne.getDay();return ve===0?7:ve}function oe(ne,ve){return f(r.timeSunday.count(r.timeYear(ne)-1,ne),ve,2)}function ye(ne,ve){var De=ne.getDay();return ne=De>=4||De===0?r.timeThursday(ne):r.timeThursday.ceil(ne),f(r.timeThursday.count(r.timeYear(ne),ne)+(r.timeYear(ne).getDay()===4),ve,2)}function ue(ne){return ne.getDay()}function de(ne,ve){return f(r.timeMonday.count(r.timeYear(ne)-1,ne),ve,2)}function W(ne,ve){return f(ne.getFullYear()%100,ve,2)}function Q(ne,ve){return f(ne.getFullYear()%1e4,ve,4)}function j(ne){var ve=ne.getTimezoneOffset();return(ve>0?"-":(ve*=-1,"+"))+f(ve/60|0,"0",2)+f(ve%60,"0",2)}function pe(ne,ve){return f(ne.getUTCDate(),ve,2)}function me(ne,ve){return f(ne.getUTCHours(),ve,2)}function we(ne,ve){return f(ne.getUTCHours()%12||12,ve,2)}function Ne(ne,ve){return f(1+r.utcDay.count(r.utcYear(ne),ne),ve,3)}function Fe(ne,ve){return f(ne.getUTCMilliseconds(),ve,3)}function Re(ne,ve){return Fe(ne,ve)+"000"}function Ie(ne,ve){return f(ne.getUTCMonth()+1,ve,2)}function Be(ne,ve){return f(ne.getUTCMinutes(),ve,2)}function ze(ne,ve){return f(ne.getUTCSeconds(),ve,2)}function Pe(ne){var ve=ne.getUTCDay();return ve===0?7:ve}function Xe(ne,ve){return f(r.utcSunday.count(r.utcYear(ne)-1,ne),ve,2)}function Ue(ne,ve){var De=ne.getUTCDay();return ne=De>=4||De===0?r.utcThursday(ne):r.utcThursday.ceil(ne),f(r.utcThursday.count(r.utcYear(ne),ne)+(r.utcYear(ne).getUTCDay()===4),ve,2)}function se(ne){return ne.getUTCDay()}function Te(ne,ve){return f(r.utcMonday.count(r.utcYear(ne)-1,ne),ve,2)}function Se(ne,ve){return f(ne.getUTCFullYear()%100,ve,2)}function ir(ne,ve){return f(ne.getUTCFullYear()%1e4,ve,4)}function Qe(){return"+0000"}function Le(){return"%"}function Ce(ne){return+ne}function Ge(ne){return Math.floor(+ne/1e3)}var Ze;Ye({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 Ye(ne){return Ze=i(ne),e.timeFormat=Ze.format,e.timeParse=Ze.parse,e.utcFormat=Ze.utcFormat,e.utcParse=Ze.utcParse,Ze}var He="%Y-%m-%dT%H:%M:%S.%LZ";function $e(ne){return ne.toISOString()}var cr=Date.prototype.toISOString?$e:e.utcFormat(He);function lr(ne){var ve=new Date(ne);return isNaN(ve)?null:ve}var Oe=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(He);e.isoFormat=cr,e.isoParse=Oe,e.timeFormatDefaultLocale=Ye,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var J3=N((ip,OA)=>{(function(e,r){typeof ip=="object"&&typeof OA!="undefined"?r(ip):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(ip,function(e){"use strict";function r(M){return Math.abs(M=Math.round(M))>=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function t(M,S){if((E=(M=S?M.toExponential(S-1):M.toExponential()).indexOf("e"))<0)return null;var E,P=M.slice(0,E);return[P.length>1?P[0]+P.slice(2):P,+M.slice(E+1)]}function a(M){return M=t(Math.abs(M)),M?M[1]:NaN}function n(M,S){return function(E,P){for(var R=E.length,D=[],z=0,O=M[0],H=0;R>0&&O>0&&(H+O+1>P&&(O=Math.max(1,P-H)),D.push(E.substring(R-=O,R+O)),!((H+=O+1)>P));)O=M[z=(z+1)%M.length];return D.reverse().join(S)}}function i(M){return function(S){return S.replace(/[0-9]/g,function(E){return M[+E]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(M){if(!(S=o.exec(M)))throw new Error("invalid format: "+M);var S;return new s({fill:S[1],align:S[2],sign:S[3],symbol:S[4],zero:S[5],width:S[6],comma:S[7],precision:S[8]&&S[8].slice(1),trim:S[9],type:S[10]})}l.prototype=s.prototype;function s(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}s.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(M){e:for(var S=M.length,E=1,P=-1,R;E0&&(P=0);break}return P>0?M.slice(0,P)+M.slice(R+1):M}var f;function c(M,S){var E=t(M,S);if(!E)return M+"";var P=E[0],R=E[1],D=R-(f=Math.max(-8,Math.min(8,Math.floor(R/3)))*3)+1,z=P.length;return D===z?P:D>z?P+new Array(D-z+1).join("0"):D>0?P.slice(0,D)+"."+P.slice(D):"0."+new Array(1-D).join("0")+t(M,Math.max(0,S+D-1))[0]}function v(M,S){var E=t(M,S);if(!E)return M+"";var P=E[0],R=E[1];return R<0?"0."+new Array(-R).join("0")+P:P.length>R+1?P.slice(0,R+1)+"."+P.slice(R+1):P+new Array(R-P.length+2).join("0")}var d={"%":function(M,S){return(M*100).toFixed(S)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d:r,e:function(M,S){return M.toExponential(S)},f:function(M,S){return M.toFixed(S)},g:function(M,S){return M.toPrecision(S)},o:function(M){return Math.round(M).toString(8)},p:function(M,S){return v(M*100,S)},r:v,s:c,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function p(M){return M}var m=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function x(M){var S=M.grouping===void 0||M.thousands===void 0?p:n(m.call(M.grouping,Number),M.thousands+""),E=M.currency===void 0?"":M.currency[0]+"",P=M.currency===void 0?"":M.currency[1]+"",R=M.decimal===void 0?".":M.decimal+"",D=M.numerals===void 0?p:i(m.call(M.numerals,String)),z=M.percent===void 0?"%":M.percent+"",O=M.minus===void 0?"-":M.minus+"",H=M.nan===void 0?"NaN":M.nan+"";function Y(B){B=l(B);var V=B.fill,X=B.align,Z=B.sign,te=B.symbol,fe=B.zero,le=B.width,ie=B.comma,K=B.precision,he=B.trim,oe=B.type;oe==="n"?(ie=!0,oe="g"):d[oe]||(K===void 0&&(K=12),he=!0,oe="g"),(fe||V==="0"&&X==="=")&&(fe=!0,V="0",X="=");var ye=te==="$"?E:te==="#"&&/[boxX]/.test(oe)?"0"+oe.toLowerCase():"",ue=te==="$"?P:/[%p]/.test(oe)?z:"",de=d[oe],W=/[defgprs%]/.test(oe);K=K===void 0?6:/[gprs]/.test(oe)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K));function Q(j){var pe=ye,me=ue,we,Ne,Fe;if(oe==="c")me=de(j)+me,j="";else{j=+j;var Re=j<0||1/j<0;if(j=isNaN(j)?H:de(Math.abs(j),K),he&&(j=u(j)),Re&&+j==0&&Z!=="+"&&(Re=!1),pe=(Re?Z==="("?Z:O:Z==="-"||Z==="("?"":Z)+pe,me=(oe==="s"?y[8+f/3]:"")+me+(Re&&Z==="("?")":""),W){for(we=-1,Ne=j.length;++weFe||Fe>57){me=(Fe===46?R+j.slice(we+1):j.slice(we))+me,j=j.slice(0,we);break}}}ie&&!fe&&(j=S(j,1/0));var Ie=pe.length+j.length+me.length,Be=Ie>1)+pe+j+me+Be.slice(Ie);break;default:j=Be+pe+j+me;break}return D(j)}return Q.toString=function(){return B+""},Q}function G(B,V){var X=Y((B=l(B),B.type="f",B)),Z=Math.max(-8,Math.min(8,Math.floor(a(V)/3)))*3,te=Math.pow(10,-Z),fe=y[8+Z/3];return function(le){return X(te*le)+fe}}return{format:Y,formatPrefix:G}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(M){return _=x(M),e.format=_.format,e.formatPrefix=_.formatPrefix,_}function b(M){return Math.max(0,-a(Math.abs(M)))}function T(M,S){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(S)/3)))*3-a(Math.abs(M)))}function k(M,S){return M=Math.abs(M),S=Math.abs(S)-M,Math.max(0,a(S)-a(M))+1}e.FormatSpecifier=s,e.formatDefaultLocale=w,e.formatLocale=x,e.formatSpecifier=l,e.precisionFixed=b,e.precisionPrefix=T,e.precisionRound=k,Object.defineProperty(e,"__esModule",{value:!0})})});var HA=N((Wqe,BA)=>{"use strict";BA.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var Pr=N((jqe,UA)=>{"use strict";var aie=HA();UA.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&aie(t))return!1}else if(r!=="number")return!1;return e-e<1}});var Ft=N((Zqe,GA)=>{"use strict";GA.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 $3=N((op,YA)=>{(function(e,r){typeof op=="object"&&typeof YA!="undefined"?r(op):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(op,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(l[s]&3)<<4|l[s+1]>>4],f+=r[(l[s+1]&15)<<2|l[s+2]>>6],f+=r[l[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(o){var l=o.length*.75,s=o.length,u,f=0,c,v,d,p;o[o.length-1]==="="&&(l--,o[o.length-2]==="="&&l--);var m=new ArrayBuffer(l),y=new Uint8Array(m);for(u=0;u>4,y[f++]=(v&15)<<4|d>>2,y[f++]=(d&3)<<6|p&63;return m};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var zl=N((Xqe,VA)=>{"use strict";VA.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var Wn=N(Zi=>{"use strict";var nie=$3().decode,iie=zl(),K3=Array.isArray,oie=ArrayBuffer,lie=DataView;function WA(e){return oie.isView(e)&&!(e instanceof lie)}Zi.isTypedArray=WA;function lp(e){return K3(e)||WA(e)}Zi.isArrayOrTypedArray=lp;function sie(e){return!lp(e[0])}Zi.isArray1D=sie;Zi.ensureArray=function(e,r){return K3(e)||(e=[]),e.length=r,e};var qa={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};qa.uint8c=qa.u1c;qa.uint8=qa.u1;qa.int8=qa.i1;qa.uint16=qa.u2;qa.int16=qa.i2;qa.uint32=qa.u4;qa.int32=qa.i4;qa.float32=qa.f4;qa.float64=qa.f8;function Q3(e){return e.constructor===ArrayBuffer}Zi.isArrayBuffer=Q3;Zi.decodeTypedArraySpec=function(e){var r=[],t=uie(e),a=t.dtype,n=qa[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,o=t.bdata;Q3(o)||(o=nie(o));var l=t.shape===void 0?[o.byteLength/i]:(""+t.shape).split(",");l.reverse();var s=l.length,u,f,c=+l[0],v=i*c,d=0;if(s===1)r=new n(o);else if(s===2)for(u=+l[1],f=0;f{"use strict";var ZA=Pr(),rb=Wn().isArrayOrTypedArray;KA.exports=function(r,t){if(ZA(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,o,l;for(l=0;l{"use strict";var _f=sp(),die=/^\w*$/,pie=0,QA=1,up=2,e9=3,Ys=4;r9.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,o,l,s={};t&&t.length?(l=_f(r,t),o=l.get()):o=r,t=t||"";var u={};if(o)for(i=0;i2)return s[d]=s[d]|up,c.set(v,null);if(f){for(i=d;i{"use strict";var yie=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,mie=/^[^\.\[\]]+$/;a9.exports=function(e,r){for(;r;){var t=e.match(yie);if(t)e=t[1];else if(e.match(mie))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var fp=N((eLe,i9)=>{"use strict";var gie=Pr();i9.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return gie(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var s9=N((rLe,l9)=>{"use strict";var o9=Wn().isArrayOrTypedArray,Bv=zl();l9.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(o9(n)&&o9(i)&&Bv(n[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(n.length,i.length),l=0;l{"use strict";function bie(e,r){var t=e%r;return t<0?t+r:t}function xie(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}u9.exports={mod:bie,modHalf:xie}});var Sn=N((aLe,cp)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,o=e.max,l=e.random;function s(W,Q){if(W=W||"",Q=Q||{},W instanceof s)return W;if(!(this instanceof s))return new s(W,Q);var j=u(W);this._originalInput=W,this._r=j.r,this._g=j.g,this._b=j.b,this._a=j.a,this._roundA=n(100*this._a)/100,this._format=Q.format||j.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=j.ok,this._tc_id=a++}s.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),Q,j,pe,me,we,Ne;return Q=W.r/255,j=W.g/255,pe=W.b/255,Q<=.03928?me=Q/12.92:me=e.pow((Q+.055)/1.055,2.4),j<=.03928?we=j/12.92:we=e.pow((j+.055)/1.055,2.4),pe<=.03928?Ne=pe/12.92:Ne=e.pow((pe+.055)/1.055,2.4),.2126*me+.7152*we+.0722*Ne},setAlpha:function(W){return this._a=B(W),this._roundA=n(100*this._a)/100,this},toHsv:function(){var W=d(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=d(this._r,this._g,this._b),Q=n(W.h*360),j=n(W.s*100),pe=n(W.v*100);return this._a==1?"hsv("+Q+", "+j+"%, "+pe+"%)":"hsva("+Q+", "+j+"%, "+pe+"%, "+this._roundA+")"},toHsl:function(){var W=c(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=c(this._r,this._g,this._b),Q=n(W.h*360),j=n(W.s*100),pe=n(W.l*100);return this._a==1?"hsl("+Q+", "+j+"%, "+pe+"%)":"hsla("+Q+", "+j+"%, "+pe+"%, "+this._roundA+")"},toHex:function(W){return m(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return y(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(V(this._r,255)*100)+"%",g:n(V(this._g,255)*100)+"%",b:n(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%)":"rgba("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Y[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var Q="#"+x(this._r,this._g,this._b,this._a),j=Q,pe=this._gradientType?"GradientType = 1, ":"";if(W){var me=s(W);j="#"+x(me._r,me._g,me._b,me._a)}return"progid:DXImageTransform.Microsoft.gradient("+pe+"startColorstr="+Q+",endColorstr="+j+")"},toString:function(W){var Q=!!W;W=W||this._format;var j=!1,pe=this._a<1&&this._a>=0,me=!Q&&pe&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return me?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(j=this.toRgbString()),W==="prgb"&&(j=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(j=this.toHexString()),W==="hex3"&&(j=this.toHexString(!0)),W==="hex4"&&(j=this.toHex8String(!0)),W==="hex8"&&(j=this.toHex8String()),W==="name"&&(j=this.toName()),W==="hsl"&&(j=this.toHslString()),W==="hsv"&&(j=this.toHsvString()),j||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(W,Q){var j=W.apply(null,[this].concat([].slice.call(Q)));return this._r=j._r,this._g=j._g,this._b=j._b,this.setAlpha(j._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(W,Q){return W.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(z,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},s.fromRatio=function(W,Q){if(typeof W=="object"){var j={};for(var pe in W)W.hasOwnProperty(pe)&&(pe==="a"?j[pe]=W[pe]:j[pe]=ie(W[pe]));W=j}return s(W,Q)};function u(W){var Q={r:0,g:0,b:0},j=1,pe=null,me=null,we=null,Ne=!1,Fe=!1;return typeof W=="string"&&(W=ue(W)),typeof W=="object"&&(ye(W.r)&&ye(W.g)&&ye(W.b)?(Q=f(W.r,W.g,W.b),Ne=!0,Fe=String(W.r).substr(-1)==="%"?"prgb":"rgb"):ye(W.h)&&ye(W.s)&&ye(W.v)?(pe=ie(W.s),me=ie(W.v),Q=p(W.h,pe,me),Ne=!0,Fe="hsv"):ye(W.h)&&ye(W.s)&&ye(W.l)&&(pe=ie(W.s),we=ie(W.l),Q=v(W.h,pe,we),Ne=!0,Fe="hsl"),W.hasOwnProperty("a")&&(j=W.a)),j=B(j),{ok:Ne,format:W.format||Fe,r:i(255,o(Q.r,0)),g:i(255,o(Q.g,0)),b:i(255,o(Q.b,0)),a:j}}function f(W,Q,j){return{r:V(W,255)*255,g:V(Q,255)*255,b:V(j,255)*255}}function c(W,Q,j){W=V(W,255),Q=V(Q,255),j=V(j,255);var pe=o(W,Q,j),me=i(W,Q,j),we,Ne,Fe=(pe+me)/2;if(pe==me)we=Ne=0;else{var Re=pe-me;switch(Ne=Fe>.5?Re/(2-pe-me):Re/(pe+me),pe){case W:we=(Q-j)/Re+(Q1&&(ze-=1),ze<1/6?Ie+(Be-Ie)*6*ze:ze<1/2?Be:ze<2/3?Ie+(Be-Ie)*(2/3-ze)*6:Ie}if(Q===0)pe=me=we=j;else{var Fe=j<.5?j*(1+Q):j+Q-j*Q,Re=2*j-Fe;pe=Ne(Re,Fe,W+1/3),me=Ne(Re,Fe,W),we=Ne(Re,Fe,W-1/3)}return{r:pe*255,g:me*255,b:we*255}}function d(W,Q,j){W=V(W,255),Q=V(Q,255),j=V(j,255);var pe=o(W,Q,j),me=i(W,Q,j),we,Ne,Fe=pe,Re=pe-me;if(Ne=pe===0?0:Re/pe,pe==me)we=0;else{switch(pe){case W:we=(Q-j)/Re+(Q>1)+720)%360;--Q;)pe.h=(pe.h+me)%360,we.push(s(pe));return we}function O(W,Q){Q=Q||6;for(var j=s(W).toHsv(),pe=j.h,me=j.s,we=j.v,Ne=[],Fe=1/Q;Q--;)Ne.push(s({h:pe,s:me,v:we})),we=(we+Fe)%1;return Ne}s.mix=function(W,Q,j){j=j===0?0:j||50;var pe=s(W).toRgb(),me=s(Q).toRgb(),we=j/100,Ne={r:(me.r-pe.r)*we+pe.r,g:(me.g-pe.g)*we+pe.g,b:(me.b-pe.b)*we+pe.b,a:(me.a-pe.a)*we+pe.a};return s(Ne)},s.readability=function(W,Q){var j=s(W),pe=s(Q);return(e.max(j.getLuminance(),pe.getLuminance())+.05)/(e.min(j.getLuminance(),pe.getLuminance())+.05)},s.isReadable=function(W,Q,j){var pe=s.readability(W,Q),me,we;switch(we=!1,me=de(j),me.level+me.size){case"AAsmall":case"AAAlarge":we=pe>=4.5;break;case"AAlarge":we=pe>=3;break;case"AAAsmall":we=pe>=7;break}return we},s.mostReadable=function(W,Q,j){var pe=null,me=0,we,Ne,Fe,Re;j=j||{},Ne=j.includeFallbackColors,Fe=j.level,Re=j.size;for(var Ie=0;Ieme&&(me=we,pe=s(Q[Ie]));return s.isReadable(W,pe,{level:Fe,size:Re})||!Ne?pe:(j.includeFallbackColors=!1,s.mostReadable(W,["#fff","#000"],j))};var H=s.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"},Y=s.hexNames=G(H);function G(W){var Q={};for(var j in W)W.hasOwnProperty(j)&&(Q[W[j]]=j);return Q}function B(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function V(W,Q){te(W)&&(W="100%");var j=fe(W);return W=i(Q,o(0,parseFloat(W))),j&&(W=parseInt(W*Q,10)/100),e.abs(W-Q)<1e-6?1:W%Q/parseFloat(Q)}function X(W){return i(1,o(0,W))}function Z(W){return parseInt(W,16)}function te(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function fe(W){return typeof W=="string"&&W.indexOf("%")!=-1}function le(W){return W.length==1?"0"+W:""+W}function ie(W){return W<=1&&(W=W*100+"%"),W}function K(W){return e.round(parseFloat(W)*255).toString(16)}function he(W){return Z(W)/255}var oe=function(){var W="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",j="(?:"+Q+")|(?:"+W+")",pe="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",me="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?";return{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+pe),rgba:new RegExp("rgba"+me),hsl:new RegExp("hsl"+pe),hsla:new RegExp("hsla"+me),hsv:new RegExp("hsv"+pe),hsva:new RegExp("hsva"+me),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 ye(W){return!!oe.CSS_UNIT.exec(W)}function ue(W){W=W.replace(r,"").replace(t,"").toLowerCase();var Q=!1;if(H[W])W=H[W],Q=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var j;return(j=oe.rgb.exec(W))?{r:j[1],g:j[2],b:j[3]}:(j=oe.rgba.exec(W))?{r:j[1],g:j[2],b:j[3],a:j[4]}:(j=oe.hsl.exec(W))?{h:j[1],s:j[2],l:j[3]}:(j=oe.hsla.exec(W))?{h:j[1],s:j[2],l:j[3],a:j[4]}:(j=oe.hsv.exec(W))?{h:j[1],s:j[2],v:j[3]}:(j=oe.hsva.exec(W))?{h:j[1],s:j[2],v:j[3],a:j[4]}:(j=oe.hex8.exec(W))?{r:Z(j[1]),g:Z(j[2]),b:Z(j[3]),a:he(j[4]),format:Q?"name":"hex8"}:(j=oe.hex6.exec(W))?{r:Z(j[1]),g:Z(j[2]),b:Z(j[3]),format:Q?"name":"hex"}:(j=oe.hex4.exec(W))?{r:Z(j[1]+""+j[1]),g:Z(j[2]+""+j[2]),b:Z(j[3]+""+j[3]),a:he(j[4]+""+j[4]),format:Q?"name":"hex8"}:(j=oe.hex3.exec(W))?{r:Z(j[1]+""+j[1]),g:Z(j[2]+""+j[2]),b:Z(j[3]+""+j[3]),format:Q?"name":"hex"}:!1}function de(W){var Q,j;return W=W||{level:"AA",size:"small"},Q=(W.level||"AA").toUpperCase(),j=(W.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),j!=="small"&&j!=="large"&&(j="small"),{level:Q,size:j}}typeof cp!="undefined"&&cp.exports?cp.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var bt=N(Gv=>{"use strict";var f9=zl(),Hv=Array.isArray;function _ie(e,r){var t,a;for(t=0;t{"use strict";c9.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var Yv=N((oLe,v9)=>{"use strict";v9.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var Tf=N((lLe,p9)=>{"use strict";var h9=Yv(),d9=fa(),tb=d9({editType:"none"});tb.family.dflt=h9.HOVERFONT;tb.size.dflt=h9.HOVERFONTSIZE;p9.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:tb,grouptitlefont:d9({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var dp=N((sLe,y9)=>{"use strict";var wie=fa(),vp=Tf().hoverlabel,hp=bt().extendFlat;y9.exports={hoverlabel:{bgcolor:hp({},vp.bgcolor,{arrayOk:!0}),bordercolor:hp({},vp.bordercolor,{arrayOk:!0}),font:wie({arrayOk:!0,editType:"none"}),align:hp({},vp.align,{arrayOk:!0}),namelength:hp({},vp.namelength,{arrayOk:!0}),editType:"none"}}});var mn=N((uLe,m9)=>{"use strict";var Tie=fa(),Aie=dp();m9.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:Tie({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:Aie.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 Vs=N((fLe,x9)=>{"use strict";var Mie=Sn(),pp={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)"]]},g9=pp.RdBu;function kie(e,r){if(r||(r=g9),!e)return r;function t(){try{e=pp[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),b9(e)?e:r}function b9(e){var r=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 t=0;t{"use strict";Ws.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ws.defaultLine="#444";Ws.lightLine="#eee";Ws.background="#fff";Ws.borderLine="#BEC8D9";Ws.lightFraction=100*10/11});var Tr=N((vLe,_9)=>{"use strict";var qn=Sn(),qie=Pr(),Lie=Wn().isTypedArray,_a=_9.exports={},yp=li();_a.defaults=yp.defaults;var Cie=_a.defaultLine=yp.defaultLine;_a.lightLine=yp.lightLine;var nb=_a.background=yp.background;_a.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};_a.rgb=function(e){return _a.tinyRGB(qn(e))};_a.opacity=function(e){return e?qn(e).getAlpha():0};_a.addOpacity=function(e,r){var t=qn(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};_a.combine=function(e,r){var t=qn(e).toRgb();if(t.a===1)return qn(e).toRgbString();var a=qn(r||nb).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return qn(i).toRgbString()};_a.interpolate=function(e,r,t){var a=qn(e).toRgb(),n=qn(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return qn(i).toRgbString()};_a.contrast=function(e,r,t){var a=qn(e);a.getAlpha()!==1&&(a=qn(_a.combine(e,nb)));var n=a.isDark()?r?a.lighten(r):nb:t?a.darken(t):Cie;return n.toString()};_a.stroke=function(e,r){var t=qn(r);e.style({stroke:_a.tinyRGB(t),"stroke-opacity":t.getAlpha()})};_a.fill=function(e,r){var t=qn(r);e.style({fill:_a.tinyRGB(t),"fill-opacity":t.getAlpha()})};_a.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}});var mp=N((hLe,w9)=>{"use strict";w9.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var Af=N(T9=>{"use strict";T9.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var S9=N(Ln=>{"use strict";var ib=Pr(),A9=Sn(),M9=bt().extendFlat,Eie=mn(),Die=Vs(),Pie=Tr(),Rie=mp().DESELECTDIM,Mf=sp(),k9=Af().counter,Fie=wf().modHalf,To=Wn().isArrayOrTypedArray,Il=Wn().isTypedArraySpec,Ol=Wn().decodeTypedArraySpec;Ln.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(To(e)?e:Il(e)?Ol(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}Il(e)&&(e=Ol(e)),e%1||!ib(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Il(e)&&(e=Ol(e)),A9(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return A9(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(Die.get(e,t))}},angle:{coerceFunction:function(e,r,t){Il(e)&&(e=Ol(e)),e==="auto"?r.set("auto"):ib(e)?r.set(Fie(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||k9(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!k9(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var q9={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/"},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:{}}},L9={};function C9(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),C9(a,r[t]))}}C9(q9,L9);E9.exports={configAttributes:q9,dfltConfig:L9}});var lb=N((mLe,D9)=>{"use strict";var ob=Sr(),Nie=Pr(),Vv=[];D9.exports=function(e,r){if(Vv.indexOf(e)!==-1)return;Vv.push(e);var t=1e3;Nie(r)?t=r:r==="long"&&(t=3e3);var a=ob.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(Vv);function i(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Vv.indexOf(l);s!==-1&&Vv.splice(s,1),ob.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=ob.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(i)});for(var s=l.append("p"),u=o.split(//g),f=0;f{"use strict";var kf=js().dfltConfig,sb=lb(),ub=P9.exports={};ub.log=function(){var e;if(kf.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};ub.warn=function(){var e;if(kf.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};ub.error=function(){var e;if(kf.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var bp=N((bLe,R9)=>{"use strict";R9.exports=function(){}});var fb=N((xLe,F9)=>{"use strict";F9.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{N9.exports=zie;function zie(){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 O9=N((wLe,I9)=>{I9.exports=Iie;function Iie(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var H9=N((TLe,B9)=>{B9.exports=Oie;function Oie(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var cb=N((ALe,U9)=>{U9.exports=Bie;function Bie(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 Y9=N((MLe,G9)=>{G9.exports=Hie;function Hie(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],o=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=o,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var W9=N((kLe,V9)=>{V9.exports=Uie;function Uie(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],v=r[10],d=r[11],p=r[12],m=r[13],y=r[14],x=r[15],_=t*l-a*o,w=t*s-n*o,b=t*u-i*o,T=a*s-n*l,k=a*u-i*l,M=n*u-i*s,S=f*m-c*p,E=f*y-v*p,P=f*x-d*p,R=c*y-v*m,D=c*x-d*m,z=v*x-d*y,O=_*z-w*D+b*R+T*P-k*E+M*S;return O?(O=1/O,e[0]=(l*z-s*D+u*R)*O,e[1]=(n*D-a*z-i*R)*O,e[2]=(m*M-y*k+x*T)*O,e[3]=(v*k-c*M-d*T)*O,e[4]=(s*P-o*z-u*E)*O,e[5]=(t*z-n*P+i*E)*O,e[6]=(y*b-p*M-x*w)*O,e[7]=(f*M-v*b+d*w)*O,e[8]=(o*D-l*P+u*S)*O,e[9]=(a*P-t*D-i*S)*O,e[10]=(p*k-m*b+x*_)*O,e[11]=(c*b-f*k-d*_)*O,e[12]=(l*E-o*R-s*S)*O,e[13]=(t*R-a*E+n*S)*O,e[14]=(m*w-p*T-y*_)*O,e[15]=(f*T-c*w+v*_)*O,e):null}});var Z9=N((SLe,j9)=>{j9.exports=Gie;function Gie(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],v=r[10],d=r[11],p=r[12],m=r[13],y=r[14],x=r[15];return e[0]=l*(v*x-d*y)-c*(s*x-u*y)+m*(s*d-u*v),e[1]=-(a*(v*x-d*y)-c*(n*x-i*y)+m*(n*d-i*v)),e[2]=a*(s*x-u*y)-l*(n*x-i*y)+m*(n*u-i*s),e[3]=-(a*(s*d-u*v)-l*(n*d-i*v)+c*(n*u-i*s)),e[4]=-(o*(v*x-d*y)-f*(s*x-u*y)+p*(s*d-u*v)),e[5]=t*(v*x-d*y)-f*(n*x-i*y)+p*(n*d-i*v),e[6]=-(t*(s*x-u*y)-o*(n*x-i*y)+p*(n*u-i*s)),e[7]=t*(s*d-u*v)-o*(n*d-i*v)+f*(n*u-i*s),e[8]=o*(c*x-d*m)-f*(l*x-u*m)+p*(l*d-u*c),e[9]=-(t*(c*x-d*m)-f*(a*x-i*m)+p*(a*d-i*c)),e[10]=t*(l*x-u*m)-o*(a*x-i*m)+p*(a*u-i*l),e[11]=-(t*(l*d-u*c)-o*(a*d-i*c)+f*(a*u-i*l)),e[12]=-(o*(c*y-v*m)-f*(l*y-s*m)+p*(l*v-s*c)),e[13]=t*(c*y-v*m)-f*(a*y-n*m)+p*(a*v-n*c),e[14]=-(t*(l*y-s*m)-o*(a*y-n*m)+p*(a*s-n*l)),e[15]=t*(l*v-s*c)-o*(a*v-n*c)+f*(a*s-n*l),e}});var J9=N((qLe,X9)=>{X9.exports=Yie;function Yie(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],f=e[9],c=e[10],v=e[11],d=e[12],p=e[13],m=e[14],y=e[15],x=r*o-t*i,_=r*l-a*i,w=r*s-n*i,b=t*l-a*o,T=t*s-n*o,k=a*s-n*l,M=u*p-f*d,S=u*m-c*d,E=u*y-v*d,P=f*m-c*p,R=f*y-v*p,D=c*y-v*m;return x*D-_*R+w*P+b*E-T*S+k*M}});var K9=N((LLe,$9)=>{$9.exports=Vie;function Vie(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=r[4],s=r[5],u=r[6],f=r[7],c=r[8],v=r[9],d=r[10],p=r[11],m=r[12],y=r[13],x=r[14],_=r[15],w=t[0],b=t[1],T=t[2],k=t[3];return e[0]=w*a+b*l+T*c+k*m,e[1]=w*n+b*s+T*v+k*y,e[2]=w*i+b*u+T*d+k*x,e[3]=w*o+b*f+T*p+k*_,w=t[4],b=t[5],T=t[6],k=t[7],e[4]=w*a+b*l+T*c+k*m,e[5]=w*n+b*s+T*v+k*y,e[6]=w*i+b*u+T*d+k*x,e[7]=w*o+b*f+T*p+k*_,w=t[8],b=t[9],T=t[10],k=t[11],e[8]=w*a+b*l+T*c+k*m,e[9]=w*n+b*s+T*v+k*y,e[10]=w*i+b*u+T*d+k*x,e[11]=w*o+b*f+T*p+k*_,w=t[12],b=t[13],T=t[14],k=t[15],e[12]=w*a+b*l+T*c+k*m,e[13]=w*n+b*s+T*v+k*y,e[14]=w*i+b*u+T*d+k*x,e[15]=w*o+b*f+T*p+k*_,e}});var eM=N((CLe,Q9)=>{Q9.exports=Wie;function Wie(e,r,t){var a=t[0],n=t[1],i=t[2],o,l,s,u,f,c,v,d,p,m,y,x;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(o=r[0],l=r[1],s=r[2],u=r[3],f=r[4],c=r[5],v=r[6],d=r[7],p=r[8],m=r[9],y=r[10],x=r[11],e[0]=o,e[1]=l,e[2]=s,e[3]=u,e[4]=f,e[5]=c,e[6]=v,e[7]=d,e[8]=p,e[9]=m,e[10]=y,e[11]=x,e[12]=o*a+f*n+p*i+r[12],e[13]=l*a+c*n+m*i+r[13],e[14]=s*a+v*n+y*i+r[14],e[15]=u*a+d*n+x*i+r[15]),e}});var tM=N((ELe,rM)=>{rM.exports=jie;function jie(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var nM=N((DLe,aM)=>{aM.exports=Zie;function Zie(e,r,t,a){var n=a[0],i=a[1],o=a[2],l=Math.sqrt(n*n+i*i+o*o),s,u,f,c,v,d,p,m,y,x,_,w,b,T,k,M,S,E,P,R,D,z,O,H;return Math.abs(l)<1e-6?null:(l=1/l,n*=l,i*=l,o*=l,s=Math.sin(t),u=Math.cos(t),f=1-u,c=r[0],v=r[1],d=r[2],p=r[3],m=r[4],y=r[5],x=r[6],_=r[7],w=r[8],b=r[9],T=r[10],k=r[11],M=n*n*f+u,S=i*n*f+o*s,E=o*n*f-i*s,P=n*i*f-o*s,R=i*i*f+u,D=o*i*f+n*s,z=n*o*f+i*s,O=i*o*f-n*s,H=o*o*f+u,e[0]=c*M+m*S+w*E,e[1]=v*M+y*S+b*E,e[2]=d*M+x*S+T*E,e[3]=p*M+_*S+k*E,e[4]=c*P+m*R+w*D,e[5]=v*P+y*R+b*D,e[6]=d*P+x*R+T*D,e[7]=p*P+_*R+k*D,e[8]=c*z+m*O+w*H,e[9]=v*z+y*O+b*H,e[10]=d*z+x*O+T*H,e[11]=p*z+_*O+k*H,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var oM=N((PLe,iM)=>{iM.exports=Xie;function Xie(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],o=r[5],l=r[6],s=r[7],u=r[8],f=r[9],c=r[10],v=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=o*n+f*a,e[6]=l*n+c*a,e[7]=s*n+v*a,e[8]=u*n-i*a,e[9]=f*n-o*a,e[10]=c*n-l*a,e[11]=v*n-s*a,e}});var sM=N((RLe,lM)=>{lM.exports=Jie;function Jie(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[8],f=r[9],c=r[10],v=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=o*n-f*a,e[2]=l*n-c*a,e[3]=s*n-v*a,e[8]=i*a+u*n,e[9]=o*a+f*n,e[10]=l*a+c*n,e[11]=s*a+v*n,e}});var fM=N((FLe,uM)=>{uM.exports=$ie;function $ie(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[4],f=r[5],c=r[6],v=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=o*n+f*a,e[2]=l*n+c*a,e[3]=s*n+v*a,e[4]=u*n-i*a,e[5]=f*n-o*a,e[6]=c*n-l*a,e[7]=v*n-s*a,e}});var vM=N((NLe,cM)=>{cM.exports=Kie;function Kie(e,r,t){var a,n,i,o=t[0],l=t[1],s=t[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,l*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=o*o*i+n,e[1]=l*o*i+s*a,e[2]=s*o*i-l*a,e[3]=0,e[4]=o*l*i-s*a,e[5]=l*l*i+n,e[6]=s*l*i+o*a,e[7]=0,e[8]=o*s*i+l*a,e[9]=l*s*i-o*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var dM=N((zLe,hM)=>{hM.exports=Qie;function Qie(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=a+a,s=n+n,u=i+i,f=a*l,c=a*s,v=a*u,d=n*s,p=n*u,m=i*u,y=o*l,x=o*s,_=o*u;return e[0]=1-(d+m),e[1]=c+_,e[2]=v-x,e[3]=0,e[4]=c-_,e[5]=1-(f+m),e[6]=p+y,e[7]=0,e[8]=v+x,e[9]=p-y,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var yM=N((ILe,pM)=>{pM.exports=eoe;function eoe(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var gM=N((OLe,mM)=>{mM.exports=roe;function roe(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var xM=N((BLe,bM)=>{bM.exports=toe;function toe(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var wM=N((HLe,_M)=>{_M.exports=aoe;function aoe(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var AM=N((ULe,TM)=>{TM.exports=noe;function noe(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 vb=N((GLe,MM)=>{MM.exports=ioe;function ioe(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=t+t,l=a+a,s=n+n,u=t*o,f=a*o,c=a*l,v=n*o,d=n*l,p=n*s,m=i*o,y=i*l,x=i*s;return e[0]=1-c-p,e[1]=f+x,e[2]=v-y,e[3]=0,e[4]=f-x,e[5]=1-u-p,e[6]=d+m,e[7]=0,e[8]=v+y,e[9]=d-m,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var SM=N((YLe,kM)=>{kM.exports=ooe;function ooe(e,r,t,a,n,i,o){var l=1/(t-r),s=1/(n-a),u=1/(i-o);return e[0]=i*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(n+a)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var LM=N((VLe,qM)=>{qM.exports=loe;function loe(e,r,t,a,n){var i=1/Math.tan(r/2),o=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*o,e[15]=0,e}});var EM=N((WLe,CM)=>{CM.exports=soe;function soe(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),o=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-l)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var PM=N((jLe,DM)=>{DM.exports=uoe;function uoe(e,r,t,a,n,i,o){var l=1/(r-t),s=1/(a-n),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(n+a)*s,e[14]=(o+i)*u,e[15]=1,e}});var FM=N((ZLe,RM)=>{var foe=cb();RM.exports=coe;function coe(e,r,t,a){var n,i,o,l,s,u,f,c,v,d,p=r[0],m=r[1],y=r[2],x=a[0],_=a[1],w=a[2],b=t[0],T=t[1],k=t[2];return Math.abs(p-b)<1e-6&&Math.abs(m-T)<1e-6&&Math.abs(y-k)<1e-6?foe(e):(f=p-b,c=m-T,v=y-k,d=1/Math.sqrt(f*f+c*c+v*v),f*=d,c*=d,v*=d,n=_*v-w*c,i=w*f-x*v,o=x*c-_*f,d=Math.sqrt(n*n+i*i+o*o),d?(d=1/d,n*=d,i*=d,o*=d):(n=0,i=0,o=0),l=c*o-v*i,s=v*n-f*o,u=f*i-c*n,d=Math.sqrt(l*l+s*s+u*u),d?(d=1/d,l*=d,s*=d,u*=d):(l=0,s=0,u=0),e[0]=n,e[1]=l,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=o,e[9]=u,e[10]=v,e[11]=0,e[12]=-(n*p+i*m+o*y),e[13]=-(l*p+s*m+u*y),e[14]=-(f*p+c*m+v*y),e[15]=1,e)}});var zM=N((XLe,NM)=>{NM.exports=voe;function voe(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 hb=N((JLe,IM)=>{IM.exports={create:z9(),clone:O9(),copy:H9(),identity:cb(),transpose:Y9(),invert:W9(),adjoint:Z9(),determinant:J9(),multiply:K9(),translate:eM(),scale:tM(),rotate:nM(),rotateX:oM(),rotateY:sM(),rotateZ:fM(),fromRotation:vM(),fromRotationTranslation:dM(),fromScaling:yM(),fromTranslation:gM(),fromXRotation:xM(),fromYRotation:wM(),fromZRotation:AM(),fromQuat:vb(),frustum:SM(),perspective:LM(),perspectiveFromFieldOfView:EM(),ortho:PM(),lookAt:FM(),str:zM()}});var xp=N($t=>{"use strict";var hoe=hb();$t.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var doe=Sr(),OM=Zs(),poe=xp(),yoe=hb();function moe(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function goe(e){var r=doe.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function BM(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function boe(e,r){HM("global",e,r)}function HM(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):OM.warn("addStyleRule failed"):OM.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function xoe(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&BM(t)}function _oe(e,r,t,a,n){var i=a.split(":"),o=n.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(l)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[o[0]]=o[1])}),s.setAttribute(l,!0))})}function woe(e){var r=GM(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=UM(a);if(n){var i=poe.convertCssMatrix(n);t=yoe.multiply(t,t,i)}}),t}function UM(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function GM(e){for(var r=[];Toe(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function Toe(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Aoe(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}YM.exports={getGraphDiv:moe,isPlotDiv:goe,removeElement:BM,addStyleRule:boe,addRelatedStyleRule:HM,deleteRelatedStyleRule:xoe,setStyleOnHover:_oe,getFullTransformMatrix:woe,getElementTransformMatrix:UM,getElementAndAncestors:GM,equalDomRects:Aoe}});var jv=N((QLe,VM)=>{"use strict";VM.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 Xi=N((eCe,KM)=>{"use strict";var jM=bt().extendFlat,Moe=zl(),ZM={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},XM={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},koe=ZM.flags.slice().concat(["fullReplot"]),Soe=XM.flags.slice().concat("layoutReplot");KM.exports={traces:ZM,layout:XM,traceFlags:function(){return WM(koe)},layoutFlags:function(){return WM(Soe)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";db.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};db.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 pb=N((tCe,QM)=>{"use strict";QM.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 La=N(_p=>{"use strict";var ek=pb(),aCe=ek.FORMAT_LINK,nCe=ek.DATE_FORMAT_LINK;function yb(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function Bl(e,r){return r?r.d2l(e):e}function rk(e,r){return r?r.l2d(e):e}function qoe(e){return e.x0}function Loe(e){return e.x1}function Coe(e){return e.y0}function Eoe(e){return e.y1}function tk(e){return e.x0shift||0}function ak(e){return e.x1shift||0}function nk(e){return e.y0shift||0}function ik(e){return e.y1shift||0}function wp(e,r){return Bl(e.x1,r)+ak(e)-Bl(e.x0,r)-tk(e)}function Tp(e,r,t){return Bl(e.y1,t)+ik(e)-Bl(e.y0,t)-nk(e)}function Doe(e,r){return Math.abs(wp(e,r))}function Poe(e,r,t){return Math.abs(Tp(e,r,t))}function Roe(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(wp(e,r),2)+Math.pow(Tp(e,r,t),2))}function Foe(e,r){return rk((Bl(e.x1,r)+ak(e)+Bl(e.x0,r)+tk(e))/2,r)}function Noe(e,r,t){return rk((Bl(e.y1,t)+ik(e)+Bl(e.y0,t)+nk(e))/2,t)}function zoe(e,r,t){return e.type!=="line"?void 0:Tp(e,r,t)/wp(e,r)}ok.exports={x0:qoe,x1:Loe,y0:Coe,y1:Eoe,slope:zoe,dx:wp,dy:Tp,width:Doe,height:Poe,length:Roe,xcenter:Foe,ycenter:Noe}});var uk=N((lCe,sk)=>{"use strict";var Ioe=Xi().overrideAll,Xs=mn(),lk=fa(),Ooe=si().dash,Hl=bt().extendFlat,Boe=La().shapeTexttemplateAttrs,Hoe=Ap();sk.exports=Ioe({newshape:{visible:Hl({},Xs.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Hl({},Xs.legend,{}),legendgroup:Hl({},Xs.legendgroup,{}),legendgrouptitle:{text:Hl({},Xs.legendgrouptitle.text,{}),font:lk({})},legendrank:Hl({},Xs.legendrank,{}),legendwidth:Hl({},Xs.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Hl({},Ooe,{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:Hl({},Xs.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:Boe({newshape:!0},{keys:Object.keys(Hoe)}),font:lk({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var ck=N((sCe,fk)=>{"use strict";var Uoe=si().dash,Goe=bt().extendFlat;fk.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:Goe({},Uoe,{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 Mp=N((uCe,vk)=>{"use strict";vk.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var Sf=N((fCe,yk)=>{"use strict";var mb=fa(),Yoe=jv(),kp=li(),hk=uk(),dk=ck(),Voe=Mp(),pk=bt().extendFlat,Sp=mb({editType:"calc"});Sp.family.dflt='"Open Sans", verdana, arial, sans-serif';Sp.size.dflt=12;Sp.color.dflt=kp.defaultLine;yk.exports={font:Sp,title:{text:{valType:"string",editType:"layoutstyle"},font:mb({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:mb({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:pk(Voe({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:kp.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:kp.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:kp.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:"plot"},newshape:hk.newshape,activeshape:hk.activeshape,newselection:dk.newselection,activeselection:dk.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:pk({},Yoe.transition,{editType:"none"})}});var mk=PA(()=>{});var Woe={};var gk=PA(()=>{mk()});var gr=N(Hr=>{"use strict";var qf=Zs(),bk=bp(),xk=fb(),joe=zl(),Zoe=Wv().addStyleRule,_k=bt(),Xoe=mn(),Joe=Sf(),$oe=_k.extendFlat,gb=_k.extendDeepAll;Hr.modules={};Hr.allCategories={};Hr.allTypes=[];Hr.subplotsRegistry={};Hr.componentsRegistry={};Hr.layoutArrayContainers=[];Hr.layoutArrayRegexes=[];Hr.traceLayoutAttributes={};Hr.localeRegistry={};Hr.apiMethodRegistry={};Hr.collectableSubplotTypes=null;Hr.register=function(r){if(Hr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var ale=xf().timeFormat,Dk=Pr(),bb=Zs(),Gl=wf().mod,Ef=Ft(),ui=Ef.BADNUM,Cn=Ef.ONEDAY,Zv=Ef.ONEHOUR,Ul=Ef.ONEMIN,Cf=Ef.ONESEC,Xv=Ef.EPOCHJD,rl=gr(),kk=xf().utcFormat,nle=/^\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,ile=/^\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,Sk=new Date().getFullYear()-70;function tl(e){return e&&rl.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Kt.dateTick0=function(e,r){var t=ole(e,!!r);if(r<2)return t;var a=Kt.dateTime2ms(t,e);return a+=Cn*(r-1),Kt.ms2DateTime(a,0,e)};function ole(e,r){return tl(e)?r?rl.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:rl.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Kt.dfltRange=function(e){return tl(e)?rl.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Kt.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Lp,Cp;Kt.dateTime2ms=function(e,r){if(Kt.isJSDate(e)){var t=e.getTimezoneOffset()*Ul,a=(e.getUTCMinutes()-e.getMinutes())*Ul+(e.getUTCSeconds()-e.getSeconds())*Cf+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*Ul;t=t-n/2+Gl(a-t+n/2,n)}return e=Number(e)-t,e>=Lp&&e<=Cp?e:ui}if(typeof e!="string"&&typeof e!="number")return ui;e=String(e);var i=tl(r),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.substr(1),r="");var l=i&&r.substr(0,7)==="chinese",s=e.match(l?ile:nle);if(!s)return ui;var u=s[1],f=s[3]||"1",c=Number(s[5]||1),v=Number(s[7]||0),d=Number(s[9]||0),p=Number(s[11]||0);if(i){if(u.length===2)return ui;u=Number(u);var m;try{var y=rl.getComponentMethod("calendars","getCal")(r);if(l){var x=f.charAt(f.length-1)==="i";f=parseInt(f,10),m=y.newDate(u,y.toMonthIndex(u,f,x),c)}else m=y.newDate(u,Number(f),c)}catch(w){return ui}return m?(m.toJD()-Xv)*Cn+v*Zv+d*Ul+p*Cf:ui}u.length===2?u=(Number(u)+2e3-Sk)%100+Sk:u=Number(u),f-=1;var _=new Date(Date.UTC(2e3,f,c,v,d));return _.setUTCFullYear(u),_.getUTCMonth()!==f||_.getUTCDate()!==c?ui:_.getTime()+p*Cf};Lp=Kt.MIN_MS=Kt.dateTime2ms("-9999");Cp=Kt.MAX_MS=Kt.dateTime2ms("9999-12-31 23:59:59.9999");Kt.isDateTime=function(e,r){return Kt.dateTime2ms(e,r)!==ui};function Lf(e,r){return String(e+Math.pow(10,r)).substr(1)}var qp=90*Cn,qk=3*Zv,Lk=5*Ul;Kt.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Lp&&e<=Cp))return ui;r||(r=0);var a=Math.floor(Gl(e+.05,1)*10),n=Math.round(e-a/10),i,o,l,s,u,f;if(tl(t)){var c=Math.floor(n/Cn)+Xv,v=Math.floor(Gl(e,Cn));try{i=rl.getComponentMethod("calendars","getCal")(t).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){i=kk("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=r=Lp+Cn&&e<=Cp-Cn))return ui;var r=Math.floor(Gl(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=ale("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return Pk(a,n,i,o,l)};function Pk(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+Lf(r,2)+":"+Lf(t,2),(a||n)&&(e+=":"+Lf(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+Lf(n,i)}return e}Kt.cleanDate=function(e,r,t){if(e===ui)return r;if(Kt.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(tl(t))return bb.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Kt.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Kt.isDateTime(e,t))return bb.error("unrecognized date",e),r;return e};var lle=/%\d?f/g,sle=/%h/g,ule={1:"1",2:"1",3:"2",4:"2"};function Ck(e,r,t,a){e=e.replace(lle,function(i){var o=Math.min(+i.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return l});var n=new Date(Math.floor(r+.05));if(e=e.replace(sle,function(){return ule[t("%q")(n)]}),tl(a))try{e=rl.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var fle=[59,59.9,59.99,59.999,59.9999];function cle(e,r){var t=Gl(e+.05,Cn),a=Lf(Math.floor(t/Zv),2)+":"+Lf(Gl(Math.floor(t/Ul),60),2);if(r!=="M"){Dk(r)||(r=0);var n=Math.min(Gl(e/Cf,60),fle[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}Kt.formatDate=function(e,r,t,a,n,i){if(n=tl(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` `+i.year;else return cle(e,t)+` -`+Ck(i.dayMonthYear,e,a,n);return Ck(r,e,a,n)};var Ek=3*Cn;Kt.incrementMonth=function(e,r,t){t=tl(t)&&t;var a=Gl(e,Cn);if(e=Math.round(e-a),t)try{var n=Math.round(e/Cn)+Xv,i=rl.getComponentMethod("calendars","getCal")(t),o=i.fromJD(n);return r%12?i.add(o,r,"m"):i.add(o,r/12,"y"),(o.toJD()-Xv)*Cn+a}catch(s){bb.error("invalid ms "+e+" in calendar "+t)}var l=new Date(e+Ek);return l.setUTCMonth(l.getUTCMonth()+r)+a-Ek};Kt.findExactDates=function(e,r){for(var t=0,a=0,n=0,i=0,o,l,s=tl(r)&&rl.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";Fk.exports=function(r){return r}});var wb=N(al=>{"use strict";var vle=Pr(),hle=Zs(),dle=xb(),ple=Ft().BADNUM,_b=1e-9;al.findBin=function(e,r,t){if(vle(r.start))return t?Math.ceil((e-r.start)/r.size-_b)-1:Math.floor((e-r.start)/r.size+_b);var a=0,n=r.length,i=0,o=n>1?(r[n-1]-r[0])/(n-1):1,l,s;for(o>=0?s=t?yle:mle:s=t?ble:gle,e+=o*_b*(t?-1:1)*(o>=0?1:-1);a90&&hle.log("Long binary search..."),a-1};function yle(e,r){return er}function ble(e,r){return e>=r}al.sorterAsc=function(e,r){return e-r};al.sorterDes=function(e,r){return r-e};al.distinctVals=function(e){var r=e.slice();r.sort(al.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===ple;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],o,l=0;l<=t;l++){var s=r[l],u=s-o;o===void 0?(i.push(s),o=s):u>n&&(a=Math.min(a,u),i.push(s),o=s)}return{vals:i,minDiff:a}};al.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,o=0,l=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};al.findIndexOfMin=function(e,r){r=r||dle;for(var t=1/0,a,n=0;n{"use strict";Nk.exports=function(r){return Object.keys(r).sort()}});var zk=N(Qt=>{"use strict";var Jv=Pr(),xle=Wn().isArrayOrTypedArray;Qt.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),Jv(r)||(r=!1),xle(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var Uk=N((xCe,Hk)=>{"use strict";var Ik=wf(),Ab=Ik.mod,_le=Ik.modHalf,$v=Math.PI,Yl=2*$v;function wle(e){return e/180*$v}function Tle(e){return e/$v*180}function Mb(e){return Math.abs(e[1]-e[0])>Yl-1e-14}function Ok(e,r){return _le(r-e,Yl)}function Ale(e,r){return Math.abs(Ok(e,r))}function Bk(e,r){if(Mb(r))return!0;var t,a;r[0]a&&(a+=Yl);var n=Ab(e,Yl),i=n+Yl;return n>=t&&n<=a||i>=t&&i<=a}function Mle(e,r,t,a){if(!Bk(r,a))return!1;var n,i;return t[0]=n&&e<=i}function kb(e,r,t,a,n,i,o){n=n||0,i=i||0;var l=Mb([t,a]),s,u,f,c,v;l?(s=0,u=$v,f=Yl):t{"use strict";Js.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};Js.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};Js.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};Js.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};Js.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};Js.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var Wk=N($s=>{"use strict";var Sb=wf().mod;$s.segmentsIntersect=Vk;function Vk(e,r,t,a,n,i,o,l){var s=t-e,u=n-e,f=o-n,c=a-r,v=i-r,d=l-i,p=s*d-f*c;if(p===0)return null;var m=(u*d-f*v)/p,y=(u*c-s*v)/p;return y<0||y>1||m<0||m>1?null:{x:e+s*m,y:r+c*m}}$s.segmentDistance=function(r,t,a,n,i,o,l,s){if(Vk(r,t,a,n,i,o,l,s))return 0;var u=a-r,f=n-t,c=l-i,v=s-o,d=u*u+f*f,p=c*c+v*v,m=Math.min(Ep(u,f,d,i-r,o-t),Ep(u,f,d,l-r,s-t),Ep(c,v,p,r-i,t-o),Ep(c,v,p,a-i,n-o));return Math.sqrt(m)};function Ep(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var o=a-e,l=n-r;return o*o+l*l}else{var s=a*r-n*e;return s*s/t}}var Dp,qb,Yk;$s.getTextLocation=function(r,t,a,n){if((r!==qb||n!==Yk)&&(Dp={},qb=r,Yk=n),Dp[a])return Dp[a];var i=r.getPointAtLength(Sb(a-n/2,t)),o=r.getPointAtLength(Sb(a+n/2,t)),l=Math.atan((o.y-i.y)/(o.x-i.x)),s=r.getPointAtLength(Sb(a,t)),u=(s.x*4+i.x+o.x)/6,f=(s.y*4+i.y+o.y)/6,c={x:u,y:f,theta:l};return Dp[a]=c,c};$s.clearLocationCache=function(){qb=null};$s.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,o=t.top,l=t.bottom,s=0,u=r.getTotalLength(),f=u,c,v;function d(m){var y=r.getPointAtLength(m);m===0?c=y:m===u&&(v=y);var _=y.xi?y.x-i:0,b=y.yl?y.y-l:0;return Math.sqrt(_*_+b*b)}for(var p=d(s);p;){if(s+=p+a,s>f)return;p=d(s)}for(p=d(f);p;){if(f-=p+a,s>f)return;p=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(c.x-v.x)<.1&&Math.abs(c.y-v.y)<.1}};$s.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),o=n.tolerance||.001,l=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,c=i,v,d,p;u0?c=v:f=v,u++}return d}});var Pp=N(Kv=>{"use strict";var nl={};Kv.throttle=function(r,t,a){var n=nl[r],i=Date.now();if(!n){for(var o in nl)nl[o].tsn.ts+t){l();return}n.timer=setTimeout(function(){l(),n.timer=null},t)};Kv.done=function(e){var r=nl[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};Kv.clear=function(e){if(e)jk(nl[e]),delete nl[e];else for(var r in nl)Kv.clear(r)};function jk(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Xk=N((ACe,Zk)=>{"use strict";Zk.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var Jk=N((MCe,Rp)=>{"use strict";Rp.exports=Lb;Rp.exports.isMobile=Lb;Rp.exports.default=Lb;var Lle=/(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,Cle=/CrOS/,Ele=/android|ipad|playbook|silk/i;function Lb(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=Lle.test(r)&&!Cle.test(r)||!!e.tablet&&Ele.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var Kk=N((kCe,$k)=>{"use strict";var Dle=Pr(),Ple=Jk();$k.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=Rle(),typeof t!="string")return!0;var a=Ple({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;l--){var s=n[l];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(Dle(u)&&(u=+u),u>=13)return!0}}}return a};function Rle(){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 eS=N((SCe,Qk)=>{"use strict";var Fle=Sr();Qk.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][i]=Fle.select(this)}),n}});var tS=N((qCe,rS)=>{"use strict";var Nle=gr();rS.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,o=0;o<2;o++){var l=(i[a]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=Nle.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var nS=N((LCe,aS)=>{"use strict";aS.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";iS.exports=function(r){for(var t=Ole(r)?Ile:zle,a=[],n=0;n{"use strict";lS.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var o=String(t).length,l=String(r).length;if(i>=l+o){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var fS=N((DCe,uS)=>{"use strict";var Ble=Pr(),Hle=Ft().BADNUM,Ule=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;uS.exports=function(r){return typeof r=="string"&&(r=r.replace(Ule,"")),Ble(r)?Number(r):Hle}});var Ee=N((PCe,TS)=>{"use strict";var Qv=Sr(),Gle=xf().utcFormat,Yle=J3().format,yS=Pr(),mS=Ft(),gS=mS.FP_SAFE,Vle=-gS,cS=mS.BADNUM,be=TS.exports={};be.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var vS={};be.warnBadFormat=function(e){var r=String(e);vS[r]||(vS[r]=1,be.warn('encountered bad format: "'+r+'"'))};be.noFormat=function(e){return String(e)};be.numberFormat=function(e){var r;try{r=Yle(be.adjustFormat(e))}catch(t){return be.warnBadFormat(e),be.noFormat}return r};be.nestedProperty=sp();be.keyedContainer=t9();be.relativeAttr=n9();be.isPlainObject=zl();be.toLogRange=fp();be.relinkPrivateKeys=s9();var Vl=Wn();be.isArrayBuffer=Vl.isArrayBuffer;be.isTypedArray=Vl.isTypedArray;be.isArrayOrTypedArray=Vl.isArrayOrTypedArray;be.isArray1D=Vl.isArray1D;be.ensureArray=Vl.ensureArray;be.concat=Vl.concat;be.maxRowLength=Vl.maxRowLength;be.minRowLength=Vl.minRowLength;var bS=wf();be.mod=bS.mod;be.modHalf=bS.modHalf;var Wl=S9();be.valObjectMeta=Wl.valObjectMeta;be.coerce=Wl.coerce;be.coerce2=Wl.coerce2;be.coerceFont=Wl.coerceFont;be.coercePattern=Wl.coercePattern;be.coerceHoverinfo=Wl.coerceHoverinfo;be.coerceSelectionMarkerOpacity=Wl.coerceSelectionMarkerOpacity;be.validate=Wl.validate;var jn=Rk();be.dateTime2ms=jn.dateTime2ms;be.isDateTime=jn.isDateTime;be.ms2DateTime=jn.ms2DateTime;be.ms2DateTimeLocal=jn.ms2DateTimeLocal;be.cleanDate=jn.cleanDate;be.isJSDate=jn.isJSDate;be.formatDate=jn.formatDate;be.incrementMonth=jn.incrementMonth;be.dateTick0=jn.dateTick0;be.dfltRange=jn.dfltRange;be.findExactDates=jn.findExactDates;be.MIN_MS=jn.MIN_MS;be.MAX_MS=jn.MAX_MS;var Ks=wb();be.findBin=Ks.findBin;be.sorterAsc=Ks.sorterAsc;be.sorterDes=Ks.sorterDes;be.distinctVals=Ks.distinctVals;be.roundUp=Ks.roundUp;be.sort=Ks.sort;be.findIndexOfMin=Ks.findIndexOfMin;be.sortObjectKeys=Tb();var il=zk();be.aggNums=il.aggNums;be.len=il.len;be.mean=il.mean;be.geometricMean=il.geometricMean;be.median=il.median;be.midRange=il.midRange;be.variance=il.variance;be.stdev=il.stdev;be.interp=il.interp;var Ji=xp();be.init2dArray=Ji.init2dArray;be.transposeRagged=Ji.transposeRagged;be.dot=Ji.dot;be.translationMatrix=Ji.translationMatrix;be.rotationMatrix=Ji.rotationMatrix;be.rotationXYMatrix=Ji.rotationXYMatrix;be.apply3DTransform=Ji.apply3DTransform;be.apply2DTransform=Ji.apply2DTransform;be.apply2DTransform2=Ji.apply2DTransform2;be.convertCssMatrix=Ji.convertCssMatrix;be.inverseTransformMatrix=Ji.inverseTransformMatrix;var Ao=Uk();be.deg2rad=Ao.deg2rad;be.rad2deg=Ao.rad2deg;be.angleDelta=Ao.angleDelta;be.angleDist=Ao.angleDist;be.isFullCircle=Ao.isFullCircle;be.isAngleInsideSector=Ao.isAngleInsideSector;be.isPtInsideSector=Ao.isPtInsideSector;be.pathArc=Ao.pathArc;be.pathSector=Ao.pathSector;be.pathAnnulus=Ao.pathAnnulus;var Pf=Gk();be.isLeftAnchor=Pf.isLeftAnchor;be.isCenterAnchor=Pf.isCenterAnchor;be.isRightAnchor=Pf.isRightAnchor;be.isTopAnchor=Pf.isTopAnchor;be.isMiddleAnchor=Pf.isMiddleAnchor;be.isBottomAnchor=Pf.isBottomAnchor;var Rf=Wk();be.segmentsIntersect=Rf.segmentsIntersect;be.segmentDistance=Rf.segmentDistance;be.getTextLocation=Rf.getTextLocation;be.clearLocationCache=Rf.clearLocationCache;be.getVisibleSegment=Rf.getVisibleSegment;be.findPointOnPath=Rf.findPointOnPath;var zp=bt();be.extendFlat=zp.extendFlat;be.extendDeep=zp.extendDeep;be.extendDeepAll=zp.extendDeepAll;be.extendDeepNoArrays=zp.extendDeepNoArrays;var Cb=Zs();be.log=Cb.log;be.warn=Cb.warn;be.error=Cb.error;var Wle=Af();be.counterRegex=Wle.counter;var Eb=Pp();be.throttle=Eb.throttle;be.throttleDone=Eb.done;be.clearThrottle=Eb.clear;var $i=Wv();be.getGraphDiv=$i.getGraphDiv;be.isPlotDiv=$i.isPlotDiv;be.removeElement=$i.removeElement;be.addStyleRule=$i.addStyleRule;be.addRelatedStyleRule=$i.addRelatedStyleRule;be.deleteRelatedStyleRule=$i.deleteRelatedStyleRule;be.setStyleOnHover=$i.setStyleOnHover;be.getFullTransformMatrix=$i.getFullTransformMatrix;be.getElementTransformMatrix=$i.getElementTransformMatrix;be.getElementAndAncestors=$i.getElementAndAncestors;be.equalDomRects=$i.equalDomRects;be.clearResponsive=Xk();be.preserveDrawingBuffer=Kk();be.makeTraceGroups=eS();be._=tS();be.notifier=lb();be.filterUnique=nS();be.filterVisible=oS();be.pushUnique=fb();be.increment=sS();be.cleanNumber=fS();be.ensureNumber=function(r){return yS(r)?(r=Number(r),r>gS||r=r?!1:yS(e)&&e>=0&&e%1===0};be.noop=bp();be.identity=xb();be.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};be.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};be.simpleMap=function(e,r,t,a,n){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,t)?n>10?(be.warn("randstr failed uniqueness"),o):e(r,t,a,(n||0)+1):o};be.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};be.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),o=new Array(t),l,s,u,f;for(l=0;l=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];o[l]=f}return o};be.syncOrAsync=function(e,r,t){var a,n;function i(){return be.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};be.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};be.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,o;for(i=0;i0?n:0})};be.fillArray=function(e,r,t,a){if(a=a||be.identity,be.isArrayOrTypedArray(e))for(var n=0;n1?n+o[1]:"";if(i&&(o.length>1||l.length>4||t))for(;a.test(l);)l=l.replace(a,"$1"+i+"$2");return l+s};be.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var wS=/^\w*$/;be.templateString=function(e,r){var t={};return e.replace(be.TEMPLATE_STRING_REGEX,function(a,n){var i;return wS.test(n)?i=r[n]:(t[n]=t[n]||be.nestedProperty(r,n).get,i=t[n]()),be.isValidTextValue(i)?i:""})};var Kle={max:10,count:0,name:"hovertemplate"};be.hovertemplateString=function(){return Db.apply(Kle,arguments)};var Qle={max:10,count:0,name:"texttemplate"};be.texttemplateString=function(){return Db.apply(Qle,arguments)};var ese=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function rse(e){var r=e.match(ese);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var tse={max:10,count:0,name:"texttemplate",parseMultDiv:!0};be.texttemplateStringForShapes=function(){return Db.apply(tse,arguments)};var hS=/^[:|\|]/;function Db(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(be.TEMPLATE_STRING_REGEX,function(o,l,s){var u=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",c=l==="_xother_"||l==="_yother_",v=l==="xother_"||l==="yother_",d=u||f||v||c,p=l;(f||c)&&(p=p.substring(1)),(v||c)&&(p=p.substring(0,p.length-1));var m=null,y=null;if(a.parseMultDiv){var _=rse(p);p=_.key,m=_.op,y=_.number}var b;if(d){if(b=r[p],b===void 0)return""}else{var w,x;for(x=3;x=Np&&o<=dS,u=l>=Np&&l<=dS;if(s&&(a=10*a+o-Np),u&&(n=10*n+l-Np),!s||!u){if(a!==n)return a-n;if(o!==l)return o-l}}return n-a};var Df=2e9;be.seedPseudoRandom=function(){Df=2e9};be.pseudoRandom=function(){var e=Df;return Df=(69069*Df+1)%4294967296,Math.abs(Df-e)<429496729?be.pseudoRandom():Df/4294967296};be.fillText=function(e,r,t){var a=Array.isArray(t)?function(o){t.push(o)}:function(o){t.text=o},n=be.extractOption(e,r,"htx","hovertext");if(be.isValidTextValue(n))return a(n);var i=be.extractOption(e,r,"tx","text");if(be.isValidTextValue(i))return a(i)};be.isValidTextValue=function(e){return e||e===0};be.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,be.strTranslate(n-u*(t+o),i-u*(a+l))+be.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};be.setTransormAndDisplay=function(e,r){e.attr("transform",be.getTextTransform(r)),e.style("display",r.scale?null:"none")};be.ensureUniformFontSize=function(e,r){var t=be.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};be.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};be.bigFont=function(e){return Math.round(1.2*e)};var pS=be.getFirefoxVersion(),ase=pS!==null&&pS<86;be.getPositionFromD3Event=function(){return ase?[Qv.event.layerX,Qv.event.layerY]:[Qv.event.offsetX,Qv.event.offsetY]}});var kS=N(()=>{"use strict";var nse=Ee(),AS={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Pb in AS)MS=Pb.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),nse.addStyleRule(MS,AS[Pb]);var MS,Pb});var Rb=N((NCe,SS)=>{SS.exports=!0});var Nb=N((zCe,qS)=>{"use strict";var ise=Rb(),Fb;typeof window.matchMedia=="function"?Fb=!window.matchMedia("(hover: none)").matches:Fb=ise;qS.exports=Fb});var Qs=N((ICe,zb)=>{"use strict";var Ff=typeof Reflect=="object"?Reflect:null,LS=Ff&&typeof Ff.apply=="function"?Ff.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},Ip;Ff&&typeof Ff.ownKeys=="function"?Ip=Ff.ownKeys:Object.getOwnPropertySymbols?Ip=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Ip=function(r){return Object.getOwnPropertyNames(r)};function ose(e){console&&console.warn&&console.warn(e)}var ES=Number.isNaN||function(r){return r!==r};function qt(){qt.init.call(this)}zb.exports=qt;zb.exports.once=fse;qt.EventEmitter=qt;qt.prototype._events=void 0;qt.prototype._eventsCount=0;qt.prototype._maxListeners=void 0;var CS=10;function Op(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(qt,"defaultMaxListeners",{enumerable:!0,get:function(){return CS},set:function(e){if(typeof e!="number"||e<0||ES(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");CS=e}});qt.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};qt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||ES(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function DS(e){return e._maxListeners===void 0?qt.defaultMaxListeners:e._maxListeners}qt.prototype.getMaxListeners=function(){return DS(this)};qt.prototype.emit=function(r){for(var t=[],a=1;a0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")LS(s,this,t);else for(var u=s.length,f=zS(s,u),a=0;a0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=o.length,ose(l)}return e}qt.prototype.addListener=function(r,t){return PS(this,r,t,!1)};qt.prototype.on=qt.prototype.addListener;qt.prototype.prependListener=function(r,t){return PS(this,r,t,!0)};function lse(){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 RS(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=lse.bind(a);return n.listener=t,a.wrapFn=n,n}qt.prototype.once=function(r,t){return Op(t),this.on(r,RS(this,r,t)),this};qt.prototype.prependOnceListener=function(r,t){return Op(t),this.prependListener(r,RS(this,r,t)),this};qt.prototype.removeListener=function(r,t){var a,n,i,o,l;if(Op(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,o=a.length-1;o>=0;o--)if(a[o]===t||a[o].listener===t){l=a[o].listener,i=o;break}if(i<0)return this;i===0?a.shift():sse(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};qt.prototype.off=qt.prototype.removeListener;qt.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),o;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function FS(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?use(n):zS(n,n.length)}qt.prototype.listeners=function(r){return FS(this,r,!0)};qt.prototype.rawListeners=function(r){return FS(this,r,!1)};qt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):NS.call(e,r)};qt.prototype.listenerCount=NS;function NS(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}qt.prototype.eventNames=function(){return this._eventsCount>0?Ip(this._events):[]};function zS(e,r){for(var t=new Array(r),a=0;a{"use strict";var Ib=Qs().EventEmitter,vse={init:function(e){if(e._ev instanceof Ib)return e;var r=new Ib,t=new Ib;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function o(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var l;for(l=0;l{"use strict";var BS=Ee(),hse=js().dfltConfig;function dse(e,r){for(var t=[],a,n=0;nhse.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};ol.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};ol.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};ol.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";GS.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var If=N(ca=>{"use strict";var fi=gr(),rh=Ee(),Hp=mn(),Bb=Sf(),pse=Ob(),yse=jv(),mse=js().configAttributes,YS=Xi(),Ki=rh.extendDeepAll,Nf=rh.isPlainObject,gse=rh.isArrayOrTypedArray,Up=rh.nestedProperty,bse=rh.valObjectMeta,Hb="_isSubplotObj",Gp="_isLinkedToArray",xse="_arrayAttrRegexps",WS="_deprecated",Ub=[Hb,Gp,xse,WS];ca.IS_SUBPLOT_OBJ=Hb;ca.IS_LINKED_TO_ARRAY=Gp;ca.DEPRECATED=WS;ca.UNDERSCORE_ATTRS=Ub;ca.get=function(){var e={};return fi.allTypes.forEach(function(r){e[r]=wse(r)}),{defs:{valObjects:bse,metaKeys:Ub.concat(["description","role","editType","impliedEdits"]),editType:{traces:YS.traces,layout:YS.layout},impliedEdits:{}},traces:e,layout:Tse(),frames:Ase(),animation:zf(yse),config:zf(mse)}};ca.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var o=e[i];if(Ub.indexOf(i)===-1){var l=(a?a+".":"")+i;r(o,i,e,n,l),!ca.isValObject(o)&&Nf(o)&&i!=="impliedEdits"&&ca.crawl(o,r,n+1,l)}})};ca.isValObject=function(e){return e&&e.valType!==void 0};ca.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function o(s,u,f,c){t=t.slice(0,c).concat([u]),a=a.slice(0,c).concat([s&&s._isLinkedToArray]);var v=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[c-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));v&&l(n,0,"")}function l(s,u,f){var c=s[t[u]],v=f+t[u];if(u===t.length-1)gse(c)&&r.push(i+v);else if(a[u]){if(Array.isArray(c))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var o=r[t];if(!Bp(o))return!1;e=i[n][o]}else e=i[n]}else e=i}}return e}function Bp(e){return e===Math.round(e)&&e>=0}function wse(e){var r,t;r=fi.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=Ki({},Hp),i=Ki({},r.attributes);ca.crawl(i,function(s,u,f,c,v){Up(n,v).set(void 0),s===void 0&&Up(i,v).set(void 0)}),Ki(a,n),fi.traceIs(e,"noOpacity")&&delete a.opacity,fi.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),fi.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,Ki(a,i),t.attributes&&Ki(a,t.attributes),a.type=e;var o={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:zf(a)};if(r.layoutAttributes){var l={};Ki(l,r.layoutAttributes),o.layoutAttributes=zf(l)}return r.animatable||ca.crawl(o,function(s){ca.isValObject(s)&&"anim"in s&&delete s.anim}),o}function Tse(){var e={},r,t;Ki(e,Bb);for(r in fi.subplotsRegistry)if(t=fi.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var Of=Ee(),Lse=mn(),jl="templateitemname",Gb={name:{valType:"string",editType:"none"}};Gb[jl]={valType:"string",editType:"calc"};eu.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=Gb.name,r[jl]=Gb[jl],r};eu.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=Of.coerce(i,{},Lse,"type");var o={type:t,_template:null};if(t in r){a=e[t];var l=r[t]%a.length;r[t]++,o._template=a[l]}return o}return{newTrace:n}};eu.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);Of.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};eu.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[XS(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function l(u){var f={name:u.name,_input:u},c=f[jl]=u[jl];if(!ZS(c))return f._template=n,f;for(var v=0;v=a&&(t._input||{})._templateitemname;i&&(n=a);var o=r+"["+n+"]",l;function s(){l={},i&&(l[o]={},l[o][jl]=i)}s();function u(d,p){l[d]=p}function f(d,p){i?Of.nestedProperty(l[o],d).set(p):l[o+"."+d]=p}function c(){var d=l;return s(),d}function v(d,p){d&&f(d,p);var m=c();for(var y in m)Of.nestedProperty(e,y).set(m[y])}return{modifyBase:u,modifyItem:f,getUpdateObj:c,applyUpdate:v}}});var Ca=N((YCe,JS)=>{"use strict";var th=Af().counter;JS.exports={idRegex:{x:th("x","( domain)?"),y:th("y","( domain)?")},attrRegex:th("[xy]axis"),xAxisMatch:th("xaxis"),yAxisMatch:th("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 va=N(En=>{"use strict";var Cse=gr(),Yb=Ca();En.id2name=function(r){if(!(typeof r!="string"||!r.match(Yb.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};En.name2id=function(r){if(r.match(Yb.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};En.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(Yb.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};En.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=En.listIds(e,r),i=new Array(n.length),o;for(o=0;oa?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};En.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function $S(e,r){if(r&&r.length){for(var t=0;t{"use strict";function Ese(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function Dse(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}KS.exports={clearOutlineControllers:Ese,clearOutline:Dse}});var Yp=N((jCe,QS)=>{"use strict";QS.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var jp=N(Wp=>{"use strict";var Vp=gr(),ZCe=Ca().SUBPLOT_PATTERN;Wp.getSubplotCalcData=function(e,r,t){var a=Vp.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],o=0;o{"use strict";var Pse=gr(),Bf=Ee();ru.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=ru.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(o)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(o){eq(e,o,n.cache),n.check=function(){if(i){var f=eq(e,o,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;Bf.isPlainObject(i)?Vb(i,r,o,a+1):r(o,n,i)}})}});var ea=N(($Ce,mq)=>{"use strict";var fq=Sr(),Fse=xf().timeFormatLocale,Nse=J3().formatLocale,ah=Pr(),zse=$3(),Kr=gr(),cq=If(),Ise=_t(),vr=Ee(),vq=Tr(),nq=Ft().BADNUM,Dn=va(),Ose=Zl().clearOutline,Bse=Yp(),Wb=jv(),Hse=Ob(),Use=jp().getModuleCalcData,iq=vr.relinkPrivateKeys,tu=vr._,rr=mq.exports={};vr.extendFlat(rr,Kr);rr.attributes=mn();rr.attributes.type.values=rr.allTypes;rr.fontAttrs=fa();rr.layoutAttributes=Sf();var Xp=aq();rr.executeAPICommand=Xp.executeAPICommand;rr.computeAPICommandBindings=Xp.computeAPICommandBindings;rr.manageCommandObserver=Xp.manageCommandObserver;rr.hasSimpleAPICommandBindings=Xp.hasSimpleAPICommandBindings;rr.redrawText=function(e){return e=vr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Kr.getComponentMethod("annotations","draw")(e),Kr.getComponentMethod("legend","draw")(e),Kr.getComponentMethod("colorbar","draw")(e),r(rr.previousPromises(e)))},300)})};rr.resize=function(e){e=vr.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||vr.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||vr.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Kr.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};rr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};rr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=vr.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:vq.defaultLine,"pointer-events":"all"}).each(function(){var u=fq.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),o=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&Gse(e,i),o.text(i.text()&&l.text()?" - ":"")}};function Gse(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){rr.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}rr.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=fq.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=rr.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var Yse=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Vse=["year","month","dayMonth","dayMonthYear"];rr.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},o=e._fullData||[],l=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},c;e._transitionData||rr.createTransitionData(e),n._dfltTitle={plot:tu(e,"Click to enter Plot title"),subtitle:tu(e,"Click to enter Plot subtitle"),x:tu(e,"Click to enter X axis title"),y:tu(e,"Click to enter Y axis title"),colorbar:tu(e,"Click to enter Colorscale title"),annotation:tu(e,"new text")},n._traceWord=tu(e,"trace");var v=oq(e,Yse);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,p=a.height;rr.supplyLayoutGlobalDefaults(i,n,v),i.width||(n.width=d),i.height||(n.height=p),rr.sanitizeMargins(n)}else{rr.supplyLayoutGlobalDefaults(i,n,v);var m=!i.width||!i.height,y=n.autosize,_=f.autosizable,b=m&&(y||_);b?rr.plotAutoSize(e,i,n):m&&rr.sanitizeMargins(n),!y&&m&&(i.width=n.width,i.height=n.height)}n._d3locale=Zse(v,n.separators),n._extraFormat=oq(e,Vse),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var w=n._subplots=jse(),x=n._splomAxes={x:{},y:{}},T=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=Wse(o,s),rr.supplyDataDefaults(s,l,i,n);var k=Object.keys(x.x),M=Object.keys(x.y);if(k.length>1&&M.length>1){for(Kr.getComponentMethod("grid","sizeDefaults")(i,n),c=0;c15&&M.length>15&&n.shapes.length===0&&n.images.length===0,rr.linkSubplots(l,n,o,a),rr.cleanPlot(l,n,o,a);var D=!!(a._has&&a._has("cartesian")),z=!!(n._has&&n._has("cartesian")),O=D,H=z;O&&!H?a._bgLayer.remove():H&&!O&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&Ose({_fullLayout:a}),Xse(l,n),iq(n,a),Kr.getComponentMethod("colorscale","crossTraceDefaults")(l,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var V=n._tracePreGUI,G={},B;for(B in V)G[B]="old";for(c=0;c0){var f=1-2*i;o=Math.round(f*o),l=Math.round(f*l)}}var c=rr.layoutAttributes.width.min,v=rr.layoutAttributes.height.min;o1,p=!t.height&&Math.abs(a.height-l)>1;(p||d)&&(d&&(a.width=o),p&&(a.height=l)),r._initialAutoSize||(r._initialAutoSize={width:o,height:l}),rr.sanitizeMargins(a)};rr.supplyLayoutModuleDefaults=function(e,r,t,a){var n=Kr.componentsRegistry,i=r._basePlotModules,o,l,s,u=Kr.subplotsRegistry.cartesian;for(o in n)s=n[o],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Kr.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(vr.subplotSort);for(l=0;l1&&(t.l/=y,t.r/=y)}if(v){var _=(t.t+t.b)/v;_>1&&(t.t/=_,t.b/=_)}var b=t.xl!==void 0?t.xl:t.x,w=t.xr!==void 0?t.xr:t.x,x=t.yt!==void 0?t.yt:t.y,T=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:b,size:t.l+m},r:{val:w,size:t.r+m},b:{val:T,size:t.b+m},t:{val:x,size:t.t+m}},p[r]=1}if(!a._replotting)return rr.doAutoMargin(e)}};function $se(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=Dn.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}rr.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),hq(r);var n=r._size,i=r.margin,o={t:0,b:0,l:0,r:0},l=vr.extendFlat({},n),s=i.l,u=i.r,f=i.t,c=i.b,v=r._pushmargin,d=r._pushmarginIds,p=r.minreducedwidth,m=r.minreducedheight;if(i.autoexpand!==!1){for(var y in v)d[y]||delete v[y];var _=e._fullLayout._reservedMargin;for(var b in _)for(var w in _[b]){var x=_[b][w];o[w]=Math.max(o[w],x)}v.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:c}};for(var T in o){var k=0;for(var M in v)M!=="base"&&ah(v[M][T].size)&&(k=v[M][T].size>k?v[M][T].size:k);var S=Math.max(0,i[T]-k);o[T]=Math.max(0,o[T]-S)}for(var E in v){var P=v[E].l||{},R=v[E].b||{},D=P.val,z=P.size,O=R.val,H=R.size,V=t-o.r-o.l,G=a-o.t-o.b;for(var B in v){if(ah(z)&&v[B].r){var Y=v[B].r.val,X=v[B].r.size;if(Y>D){var Z=(z*Y+(X-V)*D)/(Y-D),te=(X*(1-D)+(z-V)*(1-Y))/(Y-D);Z+te>s+u&&(s=Z,u=te)}}if(ah(H)&&v[B].t){var fe=v[B].t.val,le=v[B].t.size;if(fe>O){var ie=(H*fe+(le-G)*O)/(fe-O),K=(le*(1-O)+(H-G)*(1-fe))/(fe-O);ie+K>c+f&&(c=ie,f=K)}}}}}var he=vr.constrain(t-i.l-i.r,dq,p),oe=vr.constrain(a-i.t-i.b,pq,m),ye=Math.max(0,t-he),ue=Math.max(0,a-oe);if(ye){var de=(s+u)/ye;de>1&&(s/=de,u/=de)}if(ue){var W=(c+f)/ue;W>1&&(c/=W,f/=W)}if(n.l=Math.round(s)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(f)+o.t,n.b=Math.round(c)+o.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(rr.didMarginChange(l,n)||$se(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};rr.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&rr.supplyDefaults(e);var o=n?e._fullData:e.data,l=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(v,d){if(typeof v=="function")return d?"_function_":null;if(vr.isPlainObject(v)){var p={},m;return Object.keys(v).sort().forEach(function(w){if(["_","["].indexOf(w.charAt(0))===-1){if(typeof v[w]=="function"){d&&(p[w]="_function");return}if(t==="keepdata"){if(w.substr(w.length-3)==="src")return}else if(t==="keepstream"){if(m=v[w+"src"],typeof m=="string"&&m.indexOf(":")>0&&!vr.isPlainObject(v.stream))return}else if(t!=="keepall"&&(m=v[w+"src"],typeof m=="string"&&m.indexOf(":")>0))return;p[w]=u(v[w],d)}}),p}var y=Array.isArray(v),_=vr.isTypedArray(v);if((y||_)&&v.dtype&&v.shape){var b=v.bdata;return u({dtype:v.dtype,shape:v.shape,bdata:vr.isArrayBuffer(b)?zse.encode(b):b},d)}return y?v.map(function(w){return u(w,d)}):_?vr.simpleMap(v,vr.identity):vr.isJSDate(v)?vr.ms2DateTimeLocal(+v):v}var f={data:(o||[]).map(function(v){var d=u(v);return r&&delete d.fit,d})};if(!r&&(f.layout=u(l),n)){var c=l._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};rr.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,o=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Kr.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var v=0,d=0;function p(){return v++,function(){d++,!a&&d===v&&l(c)}}t.runFn(p),setTimeout(p())})}function l(c){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Kr.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[rr.previousPromises,s,t.prepareFn,rr.rehover,rr.reselect,o],f=vr.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}rr.doCalcdata=function(e,r){var t=Dn.list(e),a=e._fullData,n=e._fullLayout,i,o,l,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},l=0;l=0;s--)if(T[s].enabled){i._indexToPoints=T[s]._indexToPoints;break}o&&o.calc&&(x=o.calc(e,i))}(!Array.isArray(x)||!x[0])&&(x=[{x:nq,y:nq}]),x[0].t||(x[0].t={}),x[0].trace=i,u[b]=x}}for(sq(t,a,n),l=0;l{"use strict";au.xmlns="http://www.w3.org/2000/xmlns/";au.svg="http://www.w3.org/2000/svg";au.xlink="http://www.w3.org/1999/xlink";au.svgAttrs={xmlns:au.svg,"xmlns:xlink":au.xlink}});var Xa=N((QCe,gq)=>{"use strict";gq.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 Ea=N(ci=>{"use strict";var ta=Sr(),sl=Ee(),rue=sl.strTranslate,jb=ll(),tue=Xa().LINE_SPACING,aue=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;ci.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(aue),i=ta.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function l(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var s=yue(e.node(),a);s&&e.style("pointer-events","all"),ci.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};lue(n[2],f,function(c,v,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){l(),s();return}var m=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});m.node().appendChild(p.node()),v&&v.node()&&p.node().insertBefore(v.node().cloneNode(!0),p.node().firstChild);var y=d.width,_=d.height;p.attr({class:o,height:_,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var b=e.node().style.fill||"black",w=p.select("g");w.attr({fill:b,stroke:b});var x=w.node().getBoundingClientRect(),T=x.width,k=x.height;(T>y||k>_)&&(p.style("overflow","hidden"),x=p.node().getBoundingClientRect(),T=x.width,k=x.height);var M=+e.attr("x"),S=+e.attr("y"),E=u||e.node().getBoundingClientRect().height,P=-E/4;if(o[0]==="y")m.attr({transform:"rotate("+[-90,M,S]+")"+rue(-T/2,P-k/2)});else if(o[0]==="l")S=P-k/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)M=0,S=P;else{var R=e.attr("text-anchor");M=M-T*(R==="middle"?.5:R==="end"?1:0),S=S+P-k/2}p.attr({x:M,y:S}),t&&t.call(e,m),s(m)})})):l(),e};var nue=/(<|<|<)/g,iue=/(>|>|>)/g;function oue(e){return e.replace(nue,"\\lt ").replace(iue,"\\gt ")}var bq=[["$","$"],["\\(","\\)"]];function lue(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){sl.warn("No MathJax version:",MathJax.version);return}var n,i,o,l,s=function(){return i=sl.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:bq},displayAlign:"left"})},u=function(){i=sl.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=bq},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},v=function(){var b="math-output-"+sl.randstr({},64);l=ta.select("body").append("div").attr({id:b}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(oue(e));var w=l.node();return a===2?MathJax.Hub.Typeset(w):MathJax.typeset([w])},d=function(){var b=l.select(a===2?".MathJax_SVG":".MathJax"),w=!b.empty()&&l.select("svg").node();if(!w)sl.log("There was an error in the tex syntax.",e),t();else{var x=w.getBoundingClientRect(),T;a===2?T=ta.select("body").select("#MathJax_SVG_glyphs"):T=b.select("defs"),t(b,T,x)}l.remove()},p=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},m=function(){n!=="svg"&&(MathJax.config.startup.output=n)},y=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(i)},_=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,v,d,p,y):a===3&&(u(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){v(),d(),m(),_()}))}var Tq={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"},sue={sub:"0.3em",sup:"-0.6em"},uue={sub:"-0.21em",sup:"0.42em"},xq="\u200B",_q=["http:","https:","mailto:","",void 0,":"],Aq=ci.NEWLINES=/(\r\n?|\n)/g,Xb=/(<[^<>]*>)/,Jb=/<(\/?)([^ >]*)(\s+(.*))?>/i,fue=//i;ci.BR_TAG_ALL=//gi;var Mq=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,kq=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,Sq=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,cue=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function nu(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&Jp(a)}var vue=/(^|;)\s*color:/;ci.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,o=e.split(Xb),l=[],s="",u=0,f=0;fi?l.push(c.substr(0,m-i)+n):l.push(c.substr(0,m));break}s=""}}return l.join("")};var hue={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},due=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Jp(e){return e.replace(due,function(r,t){var a;return t.charAt(0)==="#"?a=pue(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=hue[t],a||r})}ci.convertEntities=Jp;function pue(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function yue(e,r){r=r.replace(Aq," ");var t=!1,a=[],n,i=-1;function o(){i++;var k=document.createElementNS(jb.svg,"tspan");ta.select(k).attr({class:"line",dy:i*tue+"em"}),e.appendChild(k),n=k;var M=a;if(a=[{node:k}],M.length>1)for(var S=1;S.",r);return}var M=a.pop();k!==M.type&&sl.log("Start tag <"+M.type+"> doesnt match end tag <"+k+">. Pretending it did match.",r),n=a[a.length-1].node}var f=fue.test(r);f?o():(n=e,a=[{node:e}]);for(var c=r.split(Xb),v=0;v{"use strict";var mue=Sr(),Kp=Sn(),ih=Pr(),$p=Ee(),Lq=Tr(),gue=Vs().isValid;function bue(e,r,t){var a=r?$p.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if($p.isArrayOrTypedArray(n)){for(var o=0;o=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function Fq(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),o=0;o{"use strict";var zq=pb(),_ue=zq.FORMAT_LINK,wue=zq.DATE_FORMAT_LINK;function Tue(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?$b:Iq)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function $b(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+_ue+"."].join(" ")}function Iq(e,r){return $b(e,r)+[" And for dates see: "+wue+".","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(" ")}Oq.exports={axisHoverFormat:Tue,descriptionOnlyNumbers:$b,descriptionWithDates:Iq}});var hi=N((aEe,tL)=>{"use strict";var Bq=fa(),Hf=li(),rL=si().dash,Qb=bt().extendFlat,Hq=_t().templatedArray,Uq=Qi().descriptionWithDates,Aue=Ft().ONEDAY,Mo=Ca(),Mue=Mo.HOUR_PATTERN,kue=Mo.WEEKDAY_PATTERN,Kb={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},Sue=Qb({},Kb,{values:Kb.values.slice().concat(["sync"])});function Gq(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Yq={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Vq={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Wq={valType:"data_array",editType:"ticks"},jq={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Zq(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function Xq(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var Jq={valType:"color",dflt:Hf.defaultLine,editType:"ticks"},$q={valType:"color",dflt:Hf.lightLine,editType:"ticks"};function Kq(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var Qq=Qb({},rL,{editType:"ticks"}),eL={valType:"boolean",editType:"ticks"};tL.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Hf.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Bq({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Mo.idRegex.x.toString(),Mo.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:[Mo.idRegex.x.toString(),Mo.idRegex.y.toString()],editType:"calc"},rangebreaks:Hq("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:[kue,Mue,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Aue},editType:"calc"}),tickmode:Sue,nticks:Gq(),tick0:Yq,dtick:Vq,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Wq,ticktext:{valType:"data_array",editType:"ticks"},ticks:jq,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:Zq(),tickwidth:Xq(),tickcolor:Jq,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:Qb({},rL,{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:Bq({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Uq("tick label")},tickformatstops:Hq("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:Uq("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Hf.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:eL,gridcolor:$q,gridwidth:Kq(),griddash:Qq,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Hf.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Hf.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Mo.idRegex.x.toString(),Mo.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Mo.idRegex.x.toString(),Mo.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Kb,nticks:Gq("minor"),tick0:Yq,dtick:Vq,tickvals:Wq,ticks:jq,ticklen:Zq("minor"),tickwidth:Xq("minor"),tickcolor:Jq,gridcolor:$q,gridwidth:Kq("minor"),griddash:Qq,showgrid:eL,editType:"ticks"},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 Qp=N((nEe,iL)=>{"use strict";var Lt=hi(),aL=fa(),nL=bt().extendFlat,que=Xi().overrideAll;iL.exports=que({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:Lt.linecolor,outlinewidth:Lt.linewidth,bordercolor:Lt.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Lt.minor.tickmode,nticks:Lt.nticks,tick0:Lt.tick0,dtick:Lt.dtick,tickvals:Lt.tickvals,ticktext:Lt.ticktext,ticks:nL({},Lt.ticks,{dflt:""}),ticklabeloverflow:nL({},Lt.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:Lt.ticklen,tickwidth:Lt.tickwidth,tickcolor:Lt.tickcolor,ticklabelstep:Lt.ticklabelstep,showticklabels:Lt.showticklabels,labelalias:Lt.labelalias,tickfont:aL({}),tickangle:Lt.tickangle,tickformat:Lt.tickformat,tickformatstops:Lt.tickformatstops,tickprefix:Lt.tickprefix,showtickprefix:Lt.showtickprefix,ticksuffix:Lt.ticksuffix,showticksuffix:Lt.showticksuffix,separatethousands:Lt.separatethousands,exponentformat:Lt.exponentformat,minexponent:Lt.minexponent,showexponent:Lt.showexponent,title:{text:{valType:"string"},font:aL({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var ko=N((oEe,lL)=>{"use strict";var Lue=Qp(),Cue=Af().counter,Eue=Tb(),oL=Vs().scales,iEe=Eue(oL);function e1(e){return"`"+e+"`"}lL.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",o="showScaleDflt"in t?t.showScaleDflt:a==="z",l=typeof t.colorscaleDflt=="string"?oL[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,c;"colorAttr"in t?(f=t.colorAttr,c=t.colorAttr):(f={z:"z",c:"color"}[a],c="in "+e1(u+f));var v=n?" Has an effect only if "+c+" is set to a numerical array.":"",d=a+"auto",p=a+"min",m=a+"max",y=a+"mid",_=e1(u+d),b=e1(u+p),w=e1(u+m),x=b+" and "+w,T={};T[p]=T[m]=void 0;var k={};k[d]=!1;var M={};return f==="color"&&(M.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(M.color.anim=!0)),M[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},M[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:k},M[m]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:k},M[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},M.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},M.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},M.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(M.showscale={valType:"boolean",dflt:o,editType:"calc"},M.colorbar=Lue),t.noColorAxis||(M.coloraxis={valType:"subplotid",regex:Cue("coloraxis"),dflt:null,editType:"calc"}),M}});var rx=N((lEe,sL)=>{"use strict";var Due=bt().extendFlat,Pue=ko(),ex=Vs().scales;sL.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:ex.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:ex.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:ex.RdBu,editType:"calc"}},coloraxis:Due({_isSubplotObj:!0,editType:"calc"},Pue("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var tx=N((sEe,uL)=>{"use strict";var Rue=Ee();uL.exports=function(r){return Rue.isPlainObject(r.colorbar)}});var ix=N(nx=>{"use strict";var ax=Pr(),fL=Ee(),cL=Ft(),Fue=cL.ONEDAY,Nue=cL.ONEWEEK;nx.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?Fue:1;if(!e)return i;if(ax(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var o=e.charAt(0),l=e.substr(1);return l=ax(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||t&&o==="L"||t&&o==="D"&&(l===1||l===2))?i:e};nx.tick0=function(e,r,t,a){if(r==="date")return fL.cleanDate(e,fL.dateTick0(t,a%Nue===0?1:0));if(!(a==="D1"||a==="D2"))return ax(e)?Number(e):0}});var r1=N((fEe,hL)=>{"use strict";var vL=ix(),zue=Ee().isArrayOrTypedArray,Iue=Wn().isTypedArraySpec,Oue=Wn().decodeTypedArraySpec;hL.exports=function(r,t,a,n,i){i||(i={});var o=i.isMinor,l=o?r.minor||{}:r,s=o?t.minor:t,u=o?"minor.":"";function f(b){var w=l[b];return Iue(w)&&(w=Oue(w)),w!==void 0?w:(s._template||{})[b]}var c=f("tick0"),v=f("dtick"),d=f("tickvals"),p=zue(d)?"array":v?"linear":"auto",m=a(u+"tickmode",p);if(m==="auto"||m==="sync")a(u+"nticks");else if(m==="linear"){var y=s.dtick=vL.dtick(v,n);s.tick0=vL.tick0(c,n,t.calendar,y)}else if(n!=="multicategory"){var _=a(u+"tickvals");_===void 0?s.tickmode="auto":o||a("ticktext")}}});var t1=N((cEe,pL)=>{"use strict";var ox=Ee(),dL=hi();pL.exports=function(r,t,a,n){var i=n.isMinor,o=i?r.minor||{}:r,l=i?t.minor:t,s=i?dL.minor:dL,u=i?"minor.":"",f=ox.coerce2(o,l,s,"ticklen",i?(t.ticklen||5)*.6:void 0),c=ox.coerce2(o,l,s,"tickwidth",i?t.tickwidth||1:void 0),v=ox.coerce2(o,l,s,"tickcolor",(i?t.tickcolor:void 0)||l.color),d=a(u+"ticks",!i&&n.outerTicks||f||c||v?"outside":"");d||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var lx=N((vEe,yL)=>{"use strict";yL.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var eo=N((hEe,mL)=>{"use strict";var a1=Ee(),Bue=_t();mL.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",o=t[n],l=a1.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=Bue.arrayTemplater(t,n,i),f,c;for(f=0;f{"use strict";var sx=Ee(),Hue=Tr().contrast,gL=hi(),Uue=lx(),Gue=eo();bL.exports=function(r,t,a,n,i){i||(i={});var o=a("labelalias");sx.isPlainObject(o)||delete t.labelalias;var l=Uue(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,c=t.ticklabelposition||"",v=c.indexOf("inside")!==-1?Hue(i.bgColor):f&&f!==gL.color.dflt?f:u.color;if(sx.coerceFont(a,"tickfont",u,{overrideDflt:{color:v}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var p=a("tickformat");Gue(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Yue}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!p&&n!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function Yue(e,r){function t(n,i){return sx.coerce(e,r,gL.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var i1=N((pEe,xL)=>{"use strict";var Vue=lx();xL.exports=function(r,t,a,n,i){i||(i={});var o=i.tickSuffixDflt,l=Vue(r),s=a("tickprefix");s&&a("showtickprefix",l);var u=a("ticksuffix",o);u&&a("showticksuffix",l)}});var ux=N((yEe,_L)=>{"use strict";var Xl=Ee(),Wue=_t(),jue=r1(),Zue=t1(),Xue=n1(),Jue=i1(),$ue=Qp();_L.exports=function(r,t,a){var n=Wue.newContainer(t,"colorbar"),i=r.colorbar||{};function o(R,D){return Xl.coerce(i,n,$ue,R,D)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,u=a.height-l.t-l.b,f=o("orientation"),c=f==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(c?s:u):30);var d=o("lenmode");o("len",d==="fraction"?1:c?u:s);var p=o("yref"),m=o("xref"),y=p==="paper",_=m==="paper",b,w,x,T="left";c?(x="middle",T=_?"left":"right",b=_?1.02:1,w=.5):(x=y?"bottom":"top",T="center",b=.5,w=y?1.02:1),Xl.coerce(i,n,{x:{valType:"number",min:_?-2:0,max:_?3:1,dflt:b}},"x"),Xl.coerce(i,n,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:w}},"y"),o("xanchor",T),o("xpad"),o("yanchor",x),o("ypad"),Xl.noneOrAll(i,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var k=Xl.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":"hide past div"),jue(i,n,o,"linear");var M=a.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};k.indexOf("inside")!==-1&&(S.bgColor="black"),Jue(i,n,o,"linear",S),Xue(i,n,o,"linear",S),Zue(i,n,o,"linear",S),o("title.text",a._dfltTitle.colorbar);var E=n.showticklabels?n.tickfont:M,P=Xl.extendFlat({},M,{family:E.family,size:Xl.bigFont(E.size)});Xl.coerceFont(o,"title.font",P),o("title.side",c?"top":"right")}});var ul=N((mEe,AL)=>{"use strict";var wL=Pr(),cx=Ee(),Kue=tx(),Que=ux(),TL=Vs().isValid,efe=gr().traceIs;function fx(e,r){var t=r.slice(0,r.length-1);return r?cx.nestedProperty(e,t).get()||{}:e}AL.exports=function e(r,t,a,n,i){var o=i.prefix,l=i.cLetter,s="_module"in t,u=fx(r,o),f=fx(t,o),c=fx(t._template||{},o)||{},v=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},p=n(o+"coloraxis");if(p){var m=efe(t,"contour")&&cx.nestedProperty(t,"contours.coloring").get()||"heatmap",y=d[p];y?(y[2].push(v),y[0]!==m&&(y[0]=!1,cx.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[m,t,[v]];return}}var _=u[l+"min"],b=u[l+"max"],w=wL(_)&&wL(b)&&_{"use strict";var ML=Ee(),rfe=_t(),kL=rx(),tfe=ul();SL.exports=function(r,t){function a(c,v){return ML.coerce(r,t,kL,c,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,o;function l(c,v){return ML.coerce(i,o,kL.coloraxis,c,v)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},o=rfe.newContainer(t,s,"coloraxis"),o._name=s,tfe(i,o,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var afe=Ee(),nfe=vi().hasColorscale,ife=vi().extractOpts;LL.exports=function(r,t){function a(f,c){var v=f["_"+c];v!==void 0&&(f[c]=v)}function n(f,c){var v=c.container?afe.nestedProperty(f,c.container).get():f;if(v)if(v.coloraxis)v._colorAx=t[v.coloraxis];else{var d=ife(v),p=d.auto;(p||d.min===void 0)&&a(v,c.min),(p||d.max===void 0)&&a(v,c.max),d.autocolorscale&&a(v,"colorscale")}}for(var i=0;i{"use strict";var EL=Pr(),vx=Ee(),ofe=vi().extractOpts;DL.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,o=a.containerStr,l=o?vx.nestedProperty(t,o).get():t,s=ofe(l),u=s.auto!==!1,f=s.min,c=s.max,v=s.mid,d=function(){return vx.aggNums(Math.min,null,i)},p=function(){return vx.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(l._colorAx&&EL(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():u&&(l._colorAx&&EL(c)?c=Math.max(c,p()):c=p()),u&&v!==void 0&&(c-v>v-f?f=v-(c-v):c-v=0?m=n.colorscale.sequential:m=n.colorscale.sequentialminus,s._sync("colorscale",m)}}});var So=N((_Ee,PL)=>{"use strict";var o1=Vs(),Uf=vi();PL.exports={moduleType:"component",name:"colorscale",attributes:ko(),layoutAttributes:rx(),supplyLayoutDefaults:qL(),handleDefaults:ul(),crossTraceDefaults:CL(),calc:oh(),scales:o1.scales,defaultScale:o1.defaultScale,getScale:o1.get,isValidScale:o1.isValid,hasColorscale:Uf.hasColorscale,extractOpts:Uf.extractOpts,extractScale:Uf.extractScale,flipScale:Uf.flipScale,makeColorScaleFunc:Uf.makeColorScaleFunc,makeColorScaleFuncFromTrace:Uf.makeColorScaleFuncFromTrace}});var Pn=N((wEe,FL)=>{"use strict";var RL=Ee(),lfe=Wn().isTypedArraySpec;FL.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 r=e.marker;return RL.isPlainObject(r)&&(RL.isArrayOrTypedArray(r.size)||lfe(r.size))}}});var zL=N((TEe,NL)=>{"use strict";var sfe=Pr();NL.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/n)}:function(l){return l/n};return function(l){var s=o(l/t);return sfe(s)&&s>0?Math.max(s,i):0}}});var qo=N(Ja=>{"use strict";var IL=Ee();Ja.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Ja.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{HL.exports=hfe;var hx={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},vfe=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function hfe(e){var r=[];return e.replace(vfe,function(t,a,n){var i=a.toLowerCase();for(n=pfe(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==hx[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var yfe=dx(),Je=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},qr="M0,0Z",UL=Math.sqrt(2),Jl=Math.sqrt(3),px=Math.PI,yx=Math.cos,mx=Math.sin;jL.exports={circle:{n:0,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Cr(r,t,n):n}},square:{n:1,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.4,2),n=Je(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.8/UL,2),n="l"+a+","+a,i="l"+a+",-"+a,o="l-"+a+",-"+a,l="l-"+a+","+a;return Cr(r,t,"M0,"+a+n+i+o+i+o+l+o+l+n+l+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.951,2),n=Je(e*.588,2),i=Je(-e,2),o=Je(e*-.309,2),l=Je(e*.809,2);return Cr(r,t,"M"+a+","+o+"L"+n+","+l+"H-"+n+"L-"+a+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e/2,2),i=Je(e*Jl/2,2);return Cr(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e/2,2),i=Je(e*Jl/2,2);return Cr(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.924,2),n=Je(e*.383,2);return Cr(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(Lr(r))return qr;var a=e*1.4,n=Je(a*.225,2),i=Je(a*.951,2),o=Je(a*.363,2),l=Je(a*.588,2),s=Je(-a,2),u=Je(a*-.309,2),f=Je(a*.118,2),c=Je(a*.809,2),v=Je(a*.382,2);return Cr(r,t,"M"+n+","+u+"H"+i+"L"+o+","+f+"L"+l+","+c+"L0,"+v+"L-"+l+","+c+"L-"+o+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.66,2),n=Je(e*.38,2),i=Je(e*.76,2);return Cr(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*Jl*.8,2),n=Je(e*.8,2),i=Je(e*1.6,2),o=Je(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Cr(r,t,"M-"+a+","+n+l+a+","+n+l+"0,-"+i+l+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*Jl*.8,2),n=Je(e*.8,2),i=Je(e*1.6,2),o=Je(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Cr(r,t,"M"+a+",-"+n+l+"-"+a+",-"+n+l+"0,"+i+l+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.1,2),n=Je(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2),n=Je(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.7,2),n=Je(e*1.4,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2),n=Je(e*.7,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e/UL,2);return Cr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.3,2),n=Je(e*.65,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*.85,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e/2,2),n=Je(e,2);return Cr(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2);return Cr(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(Lr(r))return qr;var a=px/2.5,n=2*e*yx(a),i=2*e*mx(a);return Cr(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(Lr(r))return qr;var a=px/4,n=2*e*yx(a),i=2*e*mx(a);return Cr(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function Lr(e){return e===null}var GL,YL,VL,WL;function Cr(e,r,t){if((!e||e%360===0)&&!r)return t;if(VL===e&&WL===r&&GL===t)return YL;VL=e,WL=r,GL=t;function a(y,_){var b=yx(y),w=mx(y),x=_[0],T=_[1]+(r||0);return[x*b-T*w,x*w+T*b]}for(var n=e/180*px,i=0,o=0,l=yfe(t),s="",u=0;u{"use strict";var wa=Sr(),mt=Ee(),mfe=mt.numberFormat,su=Pr(),Tx=Sn(),s1=gr(),Ha=Tr(),gfe=So(),sh=mt.strTranslate,u1=Ea(),bfe=ll(),xfe=Xa(),_fe=xfe.LINE_SPACING,nC=mp().DESELECTDIM,wfe=Pn(),Tfe=zL(),Afe=qo().appendArrayPointValue,Ke=dC.exports={};Ke.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,o=r.size,l=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(Ha.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",gx(kfe(f))),s&&e.style("text-shadow",s==="auto"?u1.makeTextShadow(Ha.contrast(i)):gx(s)),u&&e.style("text-decoration-line",gx(Sfe(u)))};function gx(e){return e==="none"?void 0:e}var Mfe={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function kfe(e){return Mfe[e]}function Sfe(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ke.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Ke.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Ke.setRect=function(e,r,t,a,n){e.call(Ke.setPosition,r,t).call(Ke.setSize,a,n)};Ke.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(su(n)&&su(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",sh(n,i));else return!1;return!0};Ke.translatePoints=function(e,r,t){e.each(function(a){var n=wa.select(this);Ke.translatePoint(a,n,r,t)})};Ke.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Ke.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,o=i.xcalendar,l=i.ycalendar,s=s1.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Ke.hideOutsideRangePoint(u,wa.select(this),t,a,o,l)})})}};Ke.crispRound=function(e,r,t){return!r||!su(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Ke.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=n||i.dash||"";Ha.stroke(r,a||i.color),Ke.dashLine(r,l,o)};Ke.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";wa.select(this).call(Ha.stroke,t||i.color).call(Ke.dashLine,l,o)})};Ke.dashLine=function(e,r,t){t=+t||0,r=Ke.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Ke.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function iC(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,o=n&&Ke.getPatternAttr(n.shape,0,"");if(o){var l=Ke.getPatternAttr(n.bgcolor,0,null),s=Ke.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Ke.getPatternAttr(n.size,0,8),c=Ke.getPatternAttr(n.solidity,0,.3),v=r.uid;Ke.pattern(e,"point",t,v,o,f,c,void 0,n.fillmode,l,s,u)}else if(i&&i.type!=="none"){var d=i.type,p="scatterfill-"+r.uid;if(a&&(p="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var m,y;d==="horizontal"?(m={x:i.start,y:0},y={x:i.stop,y:0}):d==="vertical"&&(m={x:0,y:i.start},y={x:0,y:i.stop}),m.x=r._xA.c2p(m.x===void 0?r._extremes.x.min[0].val:m.x,!0),m.y=r._yA.c2p(m.y===void 0?r._extremes.y.min[0].val:m.y,!0),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.max[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.max[0].val:y.y,!0),e.call(sC,t,p,"linear",i.colorscale,"fill",m,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Ke.gradient,t,p,d,i.colorscale,"fill")}else r.fillcolor&&e.call(Ha.fill,r.fillcolor)}Ke.singleFillStyle=function(e,r){var t=wa.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};iC(e,n,r,!1)};Ke.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=wa.select(this);a[0].trace&&iC(n,a[0].trace,r,t)})};var XL=ZL();Ke.symbolNames=[];Ke.symbolFuncs=[];Ke.symbolBackOffs=[];Ke.symbolNeedLines={};Ke.symbolNoDot={};Ke.symbolNoFill={};Ke.symbolList=[];Object.keys(XL).forEach(function(e){var r=XL[e],t=r.n;Ke.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Ke.symbolNames[t]=e,Ke.symbolFuncs[t]=r.f,Ke.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Ke.symbolNeedLines[t]=!0),r.noDot?Ke.symbolNoDot[t]=!0:Ke.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Ke.symbolNoFill[t]=!0)});var qfe=Ke.symbolNames.length,Lfe="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ke.symbolNumber=function(e){if(su(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Ke.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=qfe||e>=400?0:Math.floor(Math.max(e,0))};function oC(e,r,t,a){var n=e%100;return Ke.symbolFuncs[n](r,t,a)+(e>=200?Lfe:"")}var JL=mfe("~f"),lC={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}};Ke.gradient=function(e,r,t,a,n,i){var o=lC[a];return sC(e,r,t,o.type,n,i,o.start,o.stop,!1,o.reversed)};function sC(e,r,t,a,n,i,o,l,s,u){var f=n.length,c;a==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(c={node:"radialGradient",reversed:u});for(var v=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||o.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Ke.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var f=kx(e,t),c=Mx(e,t);r.attr("d",oC(u,s,f,c))}var v=!1,d,p,m;if(e.so)m=l.outlierwidth,p=l.outliercolor,d=o.outliercolor;else{var y=(l||{}).width;m=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=a.lineScale(e.mlc):mt.isArrayOrTypedArray(l.color)?p=Ha.defaultLine:p=l.color,mt.isArrayOrTypedArray(o.color)&&(d=Ha.defaultLine,v=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(Ha.stroke,d).style({"stroke-width":(m||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:m)+"px");var _=o.gradient,b=e.mgt;b?v=!0:b=_&&_.type,mt.isArrayOrTypedArray(b)&&(b=b[0],lC[b]||(b=0));var w=o.pattern,x=w&&Ke.getPatternAttr(w.shape,e.i,"");if(b&&b!=="none"){var T=e.mgc;T?v=!0:T=_.color;var k=t.uid;v&&(k+="-"+e.i),Ke.gradient(r,n,k,b,[[0,T],[1,d]],"fill")}else if(x){var M=!1,S=w.fgcolor;!S&&i&&i.color&&(S=i.color,M=!0);var E=Ke.getPatternAttr(S,e.i,i&&i.color||null),P=Ke.getPatternAttr(w.bgcolor,e.i,null),R=w.fgopacity,D=Ke.getPatternAttr(w.size,e.i,8),z=Ke.getPatternAttr(w.solidity,e.i,.3);M=M||e.mcc||mt.isArrayOrTypedArray(w.shape)||mt.isArrayOrTypedArray(w.bgcolor)||mt.isArrayOrTypedArray(w.fgcolor)||mt.isArrayOrTypedArray(w.size)||mt.isArrayOrTypedArray(w.solidity);var O=t.uid;M&&(O+="-"+e.i),Ke.pattern(r,"point",n,O,x,D,z,e.mcc,w.fillmode,P,E,R)}else mt.isArrayOrTypedArray(d)?Ha.fill(r,d[e.i]):Ha.fill(r,d);m&&Ha.stroke(r,p)}};Ke.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Ke.tryColorscale(t,""),r.lineScale=Ke.tryColorscale(t,"line"),s1.traceIs(e,"symbols")&&(r.ms2mrc=wfe.isBubble(e)?Tfe(e):function(){return(t.size||6)/2}),e.selectedpoints&&mt.extendFlat(r,Ke.makeSelectedPointStyleFns(e)),r};Ke.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},o=a.marker||{},l=n.opacity,s=i.opacity,u=o.opacity,f=s!==void 0,c=u!==void 0;(mt.isArrayOrTypedArray(l)||f||c)&&(r.selectedOpacityFn=function(x){var T=x.mo===void 0?n.opacity:x.mo;return x.selected?f?s:T:c?u:nC*T});var v=n.color,d=i.color,p=o.color;(d||p)&&(r.selectedColorFn=function(x){var T=x.mcc||v;return x.selected?d||T:p||T});var m=n.size,y=i.size,_=o.size,b=y!==void 0,w=_!==void 0;return s1.traceIs(e,"symbols")&&(b||w)&&(r.selectedSizeFn=function(x){var T=x.mrc||m/2;return x.selected?b?y/2:T:w?_/2:T}),r};Ke.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},o=a.textfont||{},l=n.color,s=i.color,u=o.color;return r.selectedTextColorFn=function(f){var c=f.tc||l;return f.selected?s||c:u||(s?c:Ha.addOpacity(c,nC))},r};Ke.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,o){i.style("opacity",t.selectedOpacityFn(o))}),t.selectedColorFn&&n.push(function(i,o){Ha.fill(i,t.selectedColorFn(o))}),t.selectedSizeFn&&n.push(function(i,o){var l=o.mx||a.symbol||0,s=t.selectedSizeFn(o);i.attr("d",oC(Ke.symbolNumber(l),s,kx(o,r),Mx(o,r))),o.mrc2=s}),n.length&&e.each(function(i){for(var o=wa.select(this),l=0;l0?t:0}Ke.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Ke.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,o=t._fullLayout;e.each(function(l){var s=wa.select(this),u=i?mt.extractOption(l,r,"txt","texttemplate"):mt.extractOption(l,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,c=f?f(l,r,o):{},v={};Afe(v,r,l.i);var d=r._meta||{};u=mt.texttemplateString(u,c,o._d3locale,v,l,d)}var p=l.tp||r.textposition,m=fC(l,r),y=a?a(l):l.tc||r.textfont.color;s.call(Ke.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:m,color:y}).text(u).call(u1.convertToTspans,t).call(uC,p,m,l.mrc)})}};Ke.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedTextStyleFns(r);e.each(function(a){var n=wa.select(this),i=t.selectedTextColorFn(a),o=a.tp||r.textposition,l=fC(a,r);Ha.fill(n,i);var s=s1.traceIs(r,"bar-like");uC(n,o,l,a.mrc2||a.mrc,s)})}};var $L=.5;Ke.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||x>=f&&x<=s)&&(T<=c&&T>=u||T>=c&&T<=u)&&(e=[x,T])}return e}Ke.applyBackoff=hC;Ke.makeTester=function(){var e=mt.ensureSingleById(wa.select("body"),"svg","js-plotly-tester",function(t){t.attr(bfe.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=mt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ke.tester=e,Ke.testref=r};Ke.savedBBoxes={};var xx=0,Dfe=1e4;Ke.bBox=function(e,r,t){t||(t=KL(e));var a;if(t){if(a=Ke.savedBBoxes[t],a)return mt.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=KL(n),t){var i=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,l=n.getAttribute("transform");if(!l){var s=Ke.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),o&&(s.top+=o,s.bottom+=o),s}if(t+="~"+i+"~"+o+"~"+l,a=Ke.savedBBoxes[t],a)return mt.extendFlat({},a)}}var u,f;r?u=e:(f=Ke.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),wa.select(u).attr("transform",null).call(u1.positionText,0,0);var c=u.getBoundingClientRect(),v=Ke.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:c.height,width:c.width,left:c.left-v.left,top:c.top-v.top,right:c.right-v.left,bottom:c.bottom-v.top};return xx>=Dfe&&(Ke.savedBBoxes={},xx=0),t&&(Ke.savedBBoxes[t]=d),xx++,mt.extendFlat({},d)};function KL(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ke.setClipUrl=function(e,r,t){e.attr("clip-path",Ax(r,t))};function Ax(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Ke.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Ke.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||0,t=t||0,o=o.replace(a,"").trim(),o+=sh(r,t),o=o.trim(),e[i]("transform",o),o};Ke.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Ke.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||1,t=t||1,o=o.replace(a,"").trim(),o+="scale("+r+","+t+")",o=o.trim(),e[i]("transform",o),o};var Pfe=/\s*sc.*/;Ke.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(Pfe,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var Rfe=/translate\([^)]*\)\s*$/;Ke.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=wa.select(this),i=n.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(Rfe);r===1&&t===1?a=[]:a=[sh(o,l),"scale("+r+","+t+")",sh(-o,-l)],s&&a.push(s),n.attr("transform",a.join(""))}})};function Mx(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Ke.getMarkerStandoff=Mx;var lh=Math.atan2,iu=Math.cos,Yf=Math.sin;function QL(e,r){var t=r[0],a=r[1];return[t*iu(e)-a*Yf(e),t*Yf(e)+a*iu(e)]}var eC,rC,tC,aC,_x,wx;function kx(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||mt.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var o=r._geo.project(e.lonlat);a=o[0],n=o[1]}else{var l=r._xA,s=r._yA;if(l&&s)a=l.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],c=r._geo.project([u,f+1e-5]),v=r._geo.project([u+1e-5,f]),d=lh(v[1]-n,v[0]-a),p=lh(c[1]-n,c[0]-a),m;if(i==="north")m=t/180*Math.PI;else if(i==="previous"){var y=u/180*Math.PI,_=f/180*Math.PI,b=eC/180*Math.PI,w=rC/180*Math.PI,x=b-y,T=iu(w)*Yf(x),k=Yf(w)*iu(_)-iu(w)*Yf(_)*iu(x);m=-lh(T,k)-Math.PI,eC=u,rC=f}var M=QL(d,[iu(m),0]),S=QL(p,[Yf(m),0]);t=lh(M[1]+S[1],M[0]+S[0])/Math.PI*180,i==="previous"&&!(wx===r.uid&&e.i===_x+1)&&(t=null)}if(i==="previous"&&!r._geo)if(wx===r.uid&&e.i===_x+1&&su(a)&&su(n)){var E=a-tC,P=n-aC,R=r.line&&r.line.shape||"",D=R.slice(R.length-1);D==="h"&&(P=0),D==="v"&&(E=0),t+=lh(P,E)/Math.PI*180+90}else t=null}return tC=a,aC=n,_x=e.i,wx=r.uid,t}Ke.getMarkerAngle=kx});var jf=N((qEe,gC)=>{"use strict";var Vf=Sr(),Ffe=Pr(),Nfe=ea(),Sx=gr(),uu=Ee(),pC=uu.strTranslate,f1=jr(),c1=Tr(),Wf=Ea(),yC=mp(),zfe=Xa().OPPOSITE_SIDE,mC=/ [XY][0-9]* /,qx=1.6,Lx=1.6;function Ife(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,o=t.placeholder,l=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,c=t.containerGroup,v=1,d=n.title,p=(d&&d.text?d.text:"").trim(),m=!1,y=d&&d.font?d.font:{},_=y.family,b=y.size,w=y.color,x=y.weight,T=y.style,k=y.variant,M=y.textcase,S=y.lineposition,E=y.shadow,P=t.subtitlePropName,R=!!P,D=t.subtitlePlaceholder,z=(n.title||{}).subtitle||{text:"",font:{}},O=z.text.trim(),H=!1,V=1,G=z.font,B=G.family,Y=G.size,X=G.color,Z=G.weight,te=G.style,fe=G.variant,le=G.textcase,ie=G.lineposition,K=G.shadow,he;i==="title.text"?he="titleText":i.indexOf("axis")!==-1?he="axisTitleText":i.indexOf("colorbar"!==-1)&&(he="colorbarTitleText");var oe=e._context.edits[he];function ye(Be,ze){return Be===void 0||ze===void 0?!1:Be.replace(mC," % ")===ze.replace(mC," % ")}p===""?v=0:ye(p,o)&&(oe||(p=""),v=.2,m=!0),R&&(O===""?V=0:ye(O,D)&&(oe||(O=""),V=.2,H=!0)),t._meta?p=uu.templateString(p,t._meta):a._meta&&(p=uu.templateString(p,a._meta));var ue=p||O||oe,de;c||(c=uu.ensureSingle(a._infolayer,"g","g-"+r),de=a._hColorbarMoveTitle);var W=c.selectAll("text."+r).data(ue?[0]:[]);W.enter().append("text"),W.text(p).attr("class",r),W.exit().remove();var Q=null,j=r+"-subtitle",pe=O||oe;if(R&&pe&&(Q=c.selectAll("text."+j).data(pe?[0]:[]),Q.enter().append("text"),Q.text(O).attr("class",j),Q.exit().remove()),!ue)return c;function me(Be,ze){uu.syncOrAsync([we,Ne],{title:Be,subtitle:ze})}function we(Be){var ze=Be.title,Pe=Be.subtitle,Xe;!f&&de&&(f={}),f?(Xe="",f.rotate&&(Xe+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||de)&&(Xe+=pC(0,(f.offset||0)-(de||0)))):Xe=null,ze.attr("transform",Xe);function Ue(Le){if(Le){var Ce=Vf.select(Le.node().parentNode).select("."+j);if(!Ce.empty()){var Ge=Le.node().getBBox();if(Ge.height){var Ze=Ge.y+Ge.height+qx*Y;Ce.attr("y",Ze)}}}}if(ze.style("opacity",v*c1.opacity(w)).call(f1.font,{color:c1.rgb(w),size:Vf.round(b,2),family:_,weight:x,style:T,variant:k,textcase:M,shadow:E,lineposition:S}).attr(u).call(Wf.convertToTspans,e,Ue),Pe){var se=c.select("."+r+"-math-group"),Te=ze.node().getBBox(),Se=se.node()?se.node().getBBox():void 0,ir=Se?Se.y+Se.height+qx*Y:Te.y+Te.height+Lx*Y,Qe=uu.extendFlat({},u,{y:ir});Pe.attr("transform",Xe),Pe.style("opacity",V*c1.opacity(X)).call(f1.font,{color:c1.rgb(X),size:Vf.round(Y,2),family:B,weight:Z,style:te,variant:fe,textcase:le,shadow:K,lineposition:ie}).attr(Qe).call(Wf.convertToTspans,e)}return Nfe.previousPromises(e)}function Ne(Be){var ze=Be.title,Pe=Vf.select(ze.node().parentNode);if(s&&s.selection&&s.side&&p){Pe.attr("transform",null);var Xe=zfe[s.side],Ue=s.side==="left"||s.side==="top"?-1:1,se=Ffe(s.pad)?s.pad:2,Te=f1.bBox(Pe.node()),Se={t:0,b:0,l:0,r:0},ir=e._fullLayout._reservedMargin;for(var Qe in ir)for(var Le in ir[Qe]){var Ce=ir[Qe][Le];Se[Le]=Math.max(Se[Le],Ce)}var Ge={left:Se.l,top:Se.t,right:a.width-Se.r,bottom:a.height-Se.b},Ze=s.maxShift||Ue*(Ge[s.side]-Te[s.side]),Ye=0;if(Ze<0)Ye=Ze;else{var He=s.offsetLeft||0,$e=s.offsetTop||0;Te.left-=He,Te.right-=He,Te.top-=$e,Te.bottom-=$e,s.selection.each(function(){var lr=f1.bBox(this);uu.bBoxIntersect(Te,lr,se)&&(Ye=Math.max(Ye,Ue*(lr[s.side]-Te[Xe])+se))}),Ye=Math.min(Ze,Ye),n._titleScoot=Math.abs(Ye)}if(Ye>0||Ze<0){var cr={left:[-Ye,0],right:[Ye,0],top:[0,-Ye],bottom:[0,Ye]}[s.side];Pe.attr("transform",pC(cr[0],cr[1]))}}}W.call(me,Q);function Fe(Be,ze){Be.text(ze).on("mouseover.opacity",function(){Vf.select(this).transition().duration(yC.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Vf.select(this).transition().duration(yC.HIDE_PLACEHOLDER).style("opacity",0)})}if(oe&&(p?W.on(".opacity",null):(Fe(W,o),m=!0),W.call(Wf.makeEditable,{gd:e}).on("edit",function(Be){l!==void 0?Sx.call("_guiRestyle",e,i,Be,l):Sx.call("_guiRelayout",e,i,Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(me)}).on("input",function(Be){this.text(Be||" ").call(Wf.positionText,u.x,u.y)}),R)){if(R&&!p){var Re=W.node().getBBox(),Ie=Re.y+Re.height+Lx*Y;Q.attr("y",Ie)}O?Q.on(".opacity",null):(Fe(Q,D),H=!0),Q.call(Wf.makeEditable,{gd:e}).on("edit",function(Be){Sx.call("_guiRelayout",e,"title.subtitle.text",Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(me)}).on("input",function(Be){this.text(Be||" ").call(Wf.positionText,Q.attr("x"),Q.attr("y"))})}return W.classed("js-placeholder",m),Q&&Q.classed("js-placeholder",H),c}gC.exports={draw:Ife,SUBTITLE_PADDING_EM:Lx,SUBTITLE_PADDING_MATHJAX_EM:qx}});var Zf=N((LEe,TC)=>{"use strict";var Ofe=Sr(),Bfe=xf().utcFormat,wt=Ee(),Hfe=wt.numberFormat,Lo=Pr(),$l=wt.cleanNumber,Ufe=wt.ms2DateTime,bC=wt.dateTime2ms,Co=wt.ensureNumber,xC=wt.isArrayOrTypedArray,Kl=Ft(),v1=Kl.FP_SAFE,ro=Kl.BADNUM,Gfe=Kl.LOG_CLIP,Yfe=Kl.ONEWEEK,h1=Kl.ONEDAY,d1=Kl.ONEHOUR,_C=Kl.ONEMIN,wC=Kl.ONESEC,p1=va(),g1=Ca(),y1=g1.HOUR_PATTERN,m1=g1.WEEKDAY_PATTERN;function uh(e){return Math.pow(10,e)}function Cx(e){return e!=null}TC.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(x,T){if(x>0)return Math.log(x)/Math.LN10;if(x<=0&&T&&r.range&&r.range.length===2){var k=r.range[0],M=r.range[1];return .5*(k+M-2*Gfe*Math.abs(k-M))}else return ro}function o(x,T,k,M){if((M||{}).msUTC&&Lo(x))return+x;var S=bC(x,k||r.calendar);if(S===ro)if(Lo(x)){x=+x;var E=Math.floor(wt.mod(x+.05,1)*10),P=Math.round(x-E/10);S=bC(new Date(P))+E/10}else return ro;return S}function l(x,T,k){return Ufe(x,T,k||r.calendar)}function s(x){return r._categories[Math.round(x)]}function u(x){if(Cx(x)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[x]!==void 0)return r._categoriesMap[x];r._categories.push(typeof x=="number"?String(x):x);var T=r._categories.length-1;return r._categoriesMap[x]=T,T}return ro}function f(x,T){for(var k=new Array(T),M=0;Mr.range[1]&&(k=!k);for(var M=k?-1:1,S=M*x,E=0,P=0;PD)E=P+1;else{E=S<(R+D)/2?P:P+1;break}}var z=r._B[E]||0;return isFinite(z)?p(x,r._m2,z):0},_=function(x){var T=r._rangebreaks.length;if(!T)return m(x,r._m,r._b);for(var k=0,M=0;Mr._rangebreaks[M].pmax&&(k=M+1);return m(x,r._m2,r._B[k])}}r.c2l=r.type==="log"?i:Co,r.l2c=r.type==="log"?uh:Co,r.l2p=y,r.p2l=_,r.c2p=r.type==="log"?function(x,T){return y(i(x,T))}:y,r.p2c=r.type==="log"?function(x){return uh(_(x))}:_,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=$l,r.c2d=r.c2r=r.l2d=r.l2r=Co,r.d2p=r.r2p=function(x){return r.l2p($l(x))},r.p2d=r.p2r=_,r.cleanPos=Co):r.type==="log"?(r.d2r=r.d2l=function(x,T){return i($l(x),T)},r.r2d=r.r2c=function(x){return uh($l(x))},r.d2c=r.r2l=$l,r.c2d=r.l2r=Co,r.c2r=i,r.l2d=uh,r.d2p=function(x,T){return r.l2p(r.d2r(x,T))},r.p2d=function(x){return uh(_(x))},r.r2p=function(x){return r.l2p($l(x))},r.p2r=_,r.cleanPos=Co):r.type==="date"?(r.d2r=r.r2d=wt.identity,r.d2c=r.r2c=r.d2l=r.r2l=o,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(x,T,k){return r.l2p(o(x,0,k))},r.p2d=r.p2r=function(x,T,k){return l(_(x),T,k)},r.cleanPos=function(x){return wt.cleanDate(x,ro,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=v,r.r2c=function(x){var T=d(x);return T!==void 0?T:r.fraction2r(.5)},r.l2r=r.c2r=Co,r.r2l=d,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(_(x))},r.r2p=r.d2p,r.p2r=_,r.cleanPos=function(x){return typeof x=="string"&&x!==""?x:Co(x)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=v,r.r2c=function(x){var T=v(x);return T!==void 0?T:r.fraction2r(.5)},r.r2c_just_indices=c,r.l2r=r.c2r=Co,r.r2l=v,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(_(x))},r.r2p=r.d2p,r.p2r=_,r.cleanPos=function(x){return Array.isArray(x)||typeof x=="string"&&x!==""?x:Co(x)},r.setupMultiCategory=function(x){var T=r._traceIndices,k,M,S=r._matchGroup;if(S&&r._categories.length===0){for(var E in S)if(E!==a){var P=t[p1.id2name(E)];T=T.concat(P._traceIndices)}}var R=[[0,{}],[0,{}]],D=[];for(k=0;kP[1]&&(M[E?0:1]=k),M[0]===M[1]){var R=r.l2r(T),D=r.l2r(k);if(T!==void 0){var z=R+1;k!==void 0&&(z=Math.min(z,D)),M[E?1:0]=z}if(k!==void 0){var O=D+1;T!==void 0&&(O=Math.max(O,R)),M[E?0:1]=O}}}},r.cleanRange=function(x,T){r._cleanRange(x,T),r.limitRange(x)},r._cleanRange=function(x,T){T||(T={}),x||(x="range");var k=wt.nestedProperty(r,x).get(),M,S;if(r.type==="date"?S=wt.dfltRange(r.calendar):n==="y"?S=g1.DFLTRANGEY:r._name==="realaxis"?S=[0,1]:S=T.dfltRange||g1.DFLTRANGEX,S=S.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(S[0]=0),!k||k.length!==2){wt.nestedProperty(r,x).set(S);return}var E=k[0]===null,P=k[1]===null;for(r.type==="date"&&!r.autorange&&(k[0]=wt.cleanDate(k[0],ro,r.calendar),k[1]=wt.cleanDate(k[1],ro,r.calendar)),M=0;M<2;M++)if(r.type==="date"){if(!wt.isDateTime(k[M],r.calendar)){r[x]=S;break}if(r.r2l(k[0])===r.r2l(k[1])){var R=wt.constrain(r.r2l(k[0]),wt.MIN_MS+1e3,wt.MAX_MS-1e3);k[0]=r.l2r(R-1e3),k[1]=r.l2r(R+1e3);break}}else{if(!Lo(k[M]))if(!(E||P)&&Lo(k[1-M]))k[M]=k[1-M]*(M?10:.1);else{r[x]=S;break}if(k[M]<-v1?k[M]=-v1:k[M]>v1&&(k[M]=v1),k[0]===k[1]){var D=Math.max(1,Math.abs(k[0]*1e-6));k[0]-=D,k[1]+=D}}},r.setScale=function(x){var T=t._size;if(r.overlaying){var k=p1.getFromId({_fullLayout:t},r.overlaying);r.domain=k.domain}var M=x&&r._r?"_r":"range",S=r.calendar;r.cleanRange(M);var E=r.r2l(r[M][0],S),P=r.r2l(r[M][1],S),R=n==="y";if(R?(r._offset=T.t+(1-r.domain[1])*T.h,r._length=T.h*(r.domain[1]-r.domain[0]),r._m=r._length/(E-P),r._b=-r._m*P):(r._offset=T.l+r.domain[0]*T.w,r._length=T.w*(r.domain[1]-r.domain[0]),r._m=r._length/(P-E),r._b=-r._m*E),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var D,z;if(r._rangebreaks=r.locateBreaks(Math.min(E,P),Math.max(E,P)),r._rangebreaks.length){for(D=0;DP&&(O=!O),O&&r._rangebreaks.reverse();var H=O?-1:1;for(r._m2=H*r._length/(Math.abs(P-E)-r._lBreaks),r._B.push(-r._m2*(R?P:E)),D=0;DS&&(S+=7,ES&&(S+=24,E=M&&E=M&&x=K.min&&(teK.max&&(K.max=fe),le=!1)}le&&P.push({min:te,max:fe})}};for(k=0;k{"use strict";var AC=Pr(),Ex=Ee(),Vfe=Ft().BADNUM,b1=Ex.isArrayOrTypedArray,Wfe=Ex.isDateTime,jfe=Ex.cleanNumber,MC=Math.round;SC.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if(b1(n)&&!n.length)return"-";if(!i&&Kfe(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var o=[],l=0;li*2}function kC(e){return Math.max(1,(e-1)/1e3)}function $fe(e,r){for(var t=e.length,a=kC(t),n=0,i=0,o={},l=0;ln*2}function Kfe(e){return b1(e[0])&&b1(e[1])}});var fh=N((EEe,FC)=>{"use strict";var Qfe=Sr(),EC=Pr(),Ql=Ee(),_1=Ft().FP_SAFE,ece=gr(),rce=jr(),DC=va(),tce=DC.getFromId,ace=DC.isLinked;FC.exports={applyAutorangeOptions:RC,getAutoRange:Dx,makePadFn:Px,doAutoRange:ice,findExtremes:oce,concatExtremes:Nx};function Dx(e,r){var t,a,n=[],i=e._fullLayout,o=Px(i,r,0),l=Px(i,r,1),s=Nx(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return Ql.simpleMap(r.range,r.r2l);var c=u[0].val,v=f[0].val;for(t=1;t0&&(P=w-o(k)-l(M),P>x?R/P>T&&(S=k,E=M,T=R/P):R/w>T&&(S={val:k.val,nopad:1},E={val:M.val,nopad:1},T=R/w));function D(G,B){return Math.max(G,l(B))}if(c===v){var z=c-1,O=c+1;if(_)if(c===0)n=[0,1];else{var H=(c>0?f:u).reduce(D,0),V=c/(1-Math.min(.5,H/w));n=c>0?[0,V]:[V,0]}else b?n=[Math.max(0,z),Math.max(1,O)]:n=[z,O]}else _?(S.val>=0&&(S={val:0,nopad:1}),E.val<=0&&(E={val:0,nopad:1})):b&&(S.val-T*o(S)<0&&(S={val:0,nopad:1}),E.val<=0&&(E={val:1,nopad:1})),T=(E.val-S.val-qC(r,k.val,M.val))/(w-o(S)-l(E)),n=[S.val-T*o(S),E.val+T*l(E)];return n=RC(n,r),r.limitRange&&r.limitRange(),p&&n.reverse(),Ql.simpleMap(n,r.l2r||Number)}function qC(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),k=x((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),M=x(t.vpadplus||t.vpad),S=x(t.vpadminus||t.vpad);if(!u){if(b=1/0,w=-1/0,s)for(c=0;c0&&(b=v),v>w&&v<_1&&(w=v);else for(c=0;c-_1&&(b=v),v>w&&v<_1&&(w=v);r=[b,w],i=2}var E={tozero:l,extrapad:o};function P(D){d=r[D],EC(d)&&(y=T(D),_=k(D),f?(p=e.c2l(d)-S(D),m=e.c2l(d)+M(D)):(b=d-S(D),w=d+M(D),s&&b=R;c--)P(c);return{min:a,max:n,opts:t}}function Rx(e,r,t,a){PC(e,r,t,a,lce)}function Fx(e,r,t,a){PC(e,r,t,a,sce)}function PC(e,r,t,a,n){for(var i=a.tozero,o=a.extrapad,l=!0,s=0;s=t&&(u.extrapad||!o)){l=!1;break}else n(r,u.val)&&u.pad<=t&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:o})}}function CC(e){return EC(e)&&Math.abs(e)<_1}function lce(e,r){return e<=r}function sce(e,r){return e>=r}function uce(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&w1(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&w1(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function fce(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&w1(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&w1(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function w1(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),o<=s&&(o=s,a=s)}}return t=uce(t,r),a=fce(a,r),[t,a]}});var Or=N((DEe,aE)=>{"use strict";var di=Sr(),aa=Pr(),Xf=ea(),vh=gr(),xr=Ee(),Jf=xr.strTranslate,fu=Ea(),cce=jf(),hh=Tr(),Zn=jr(),vce=hi(),NC=ix(),Ua=Ft(),hce=Ua.ONEMAXYEAR,M1=Ua.ONEAVGYEAR,k1=Ua.ONEMINYEAR,dce=Ua.ONEMAXQUARTER,Bx=Ua.ONEAVGQUARTER,S1=Ua.ONEMINQUARTER,pce=Ua.ONEMAXMONTH,$f=Ua.ONEAVGMONTH,q1=Ua.ONEMINMONTH,Xn=Ua.ONEWEEK,on=Ua.ONEDAY,es=on/2,Do=Ua.ONEHOUR,dh=Ua.ONEMIN,L1=Ua.ONESEC,yce=Ua.ONEMILLI,mce=Ua.ONEMICROSEC,cu=Ua.MINUS_SIGN,D1=Ua.BADNUM,Hx={K:"zeroline"},Ux={K:"gridline",L:"path"},Gx={K:"minor-gridline",L:"path"},jC={K:"tick",L:"path"},zC={K:"tick",L:"text"},IC={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},P1=Xa(),ch=P1.MID_SHIFT,vu=P1.CAP_SHIFT,ph=P1.LINE_SPACING,gce=P1.OPPOSITE_SIDE,C1=3,We=aE.exports={};We.setConvert=Zf();var bce=x1(),fl=va(),xce=fl.idSort,_ce=fl.isLinked;We.id2name=fl.id2name;We.name2id=fl.name2id;We.cleanId=fl.cleanId;We.list=fl.list;We.listIds=fl.listIds;We.getFromId=fl.getFromId;We.getFromTrace=fl.getFromTrace;var ZC=fh();We.getAutoRange=ZC.getAutoRange;We.findExtremes=ZC.findExtremes;var wce=1e-4;function jx(e){var r=(e[1]-e[0])*wce;return[e[0]-r,e[1]+r]}We.coerceRef=function(e,r,t,a,n,i){var o=a.charAt(a.length-1),l=t._fullLayout._subplots[o+"axis"],s=a+"ref",u={};return n||(n=l[0]||(typeof i=="string"?i:i[0])),i||(i=n),l=l.concat(l.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:l.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},xr.coerce(e,r,u,s)};We.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};We.coercePosition=function(e,r,t,a,n,i){var o,l,s=We.getRefType(a);if(s!=="range")o=xr.ensureNumber,l=t(n,i);else{var u=We.getFromId(r,a);i=u.fraction2r(i),l=t(n,i),o=u.cleanPos}e[n]=o(l)};We.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?xr.ensureNumber:We.getFromId(r,t).cleanPos;return a(e)};We.redrawComponents=function(e,r){r=r||We.listIds(e);var t=e._fullLayout;function a(n,i,o,l){for(var s=vh.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};We.saveRangeInitial=function(e,r){for(var t=We.list(e,"",!0),a=!1,n=0;nc*.3||u(a)||u(n))){var v=t.dtick/2;e+=e+vo){var l=Number(t.substr(1));i.exactYears>o&&l%12===0?e=We.tickIncrement(e,"M6","reverse")+on*1.5:i.exactMonths>o?e=We.tickIncrement(e,"M1","reverse")+on*15.5:e-=es;var s=We.tickIncrement(e,t);if(s<=a)return s}return e}We.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&aa(r._tmin),n;if(a){var i=We.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var o=xr.simpleMap(r.range,r.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=xr.simpleMap(n,r.l2r),e._isMinor=!0,We.prepTicks(e,t),a){var l=aa(r.dtick),s=aa(e.dtick),u=l?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);l&&s?zx(u,f)?u===2*Xn&&f===2*on&&(e.dtick=Xn):u===2*Xn&&f===3*on?e.dtick=Xn:u===Xn&&!(r._input.minor||{}).nticks?e.dtick=on:HC(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":zx(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?zx(u,f)||(e.dtick=HC(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function zx(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function HC(e,r){return Math.abs(e/r-1)<.001}We.prepTicks=function(e,r){var t=xr.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?xr.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=xr.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,We.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,o=a):(i=a,o=a);var l=e[i].value,s=e[o].value,u=Math.abs(s-l),f=t||u,c=0;f>=k1?u>=k1&&u<=hce?c=u:c=M1:t===Bx&&f>=S1?u>=S1&&u<=dce?c=u:c=Bx:f>=q1?u>=q1&&u<=pce?c=u:c=$f:t===Xn&&f>=Xn?c=Xn:f>=on?c=on:t===es&&f>=es?c=es:t===Do&&f>=Do&&(c=Do);var v;c>=u&&(c=u,v=!0);var d=n+c;if(r.rangebreaks&&c>0){for(var p=84,m=0,y=0;yXn&&(c=u)}(c>0||a===0)&&(e[a].periodX=n+c/2)}}We.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,o=r.ticklabelmode==="period",l=r.range[0]>r.range[1],s=!r.ticklabelindex||xr.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=xr.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(w?0:1);x--){var T=!x;x?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var k=x?r:xr.extendFlat({},r,r.minor);if(T?We.prepMinorTicks(k,r,t):We.prepTicks(k,t),k.tickmode==="array"){x?(y=[],p=UC(r,!T)):(_=[],m=UC(r,!T));continue}if(k.tickmode==="sync"){y=[],p=qce(r);continue}var M=jx(u),S=M[0],E=M[1],P=aa(k.dtick),R=a==="log"&&!(P||k.dtick.charAt(0)==="L"),D=We.tickFirst(k,t);if(x){if(r._tmin=D,D=E:O<=E;O=We.tickIncrement(O,G,f,n)){if(x&&H++,k.rangebreaks&&!f){if(O=v)break}if(y.length>d||O===z)break;z=O;var B={value:O};x?(R&&O!==(O|0)&&(B.simpleLabel=!0),i>1&&H%i&&(B.skipLabel=!0),y.push(B)):(B.minor=!0,_.push(B))}}if(!_||_.length<2)s=!1;else{var Y=(_[1].value-_[0].value)*(l?-1:1);Kce(Y,r.tickformat)||(s=!1)}if(!s)b=y;else{var X=y.concat(_);o&&y.length&&(X=X.slice(1)),X=X.sort(function(Ie,Be){return Ie.value-Be.value}).filter(function(Ie,Be,ze){return Be===0||Ie.value!==ze[Be-1].value});var Z=X.map(function(Ie,Be){return Ie.minor===void 0&&!Ie.skipLabel?Be:null}).filter(function(Ie){return Ie!==null});Z.forEach(function(Ie){s.map(function(Be){var ze=Ie+Be;ze>=0&&ze-1;ue--){if(y[ue].drop){y.splice(ue,1);continue}y[ue].value=Ox(y[ue].value,r);var j=r.c2p(y[ue].value);(de?Q>j-W:Qv||Pev&&(ze.periodX=v),Pen&&vM1)r/=M1,a=n(10),e.dtick="M"+12*Eo(r,a,T1);else if(i>$f)r/=$f,e.dtick="M"+Eo(r,1,GC);else if(i>on){if(e.dtick=Eo(r,on,e._hasDayOfWeekBreaks?[1,2,7,14]:Lce),!t){var o=We.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=xr.dateTick0(e.calendar,2):e.tick0=xr.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else i>Do?e.dtick=Eo(r,Do,GC):i>dh?e.dtick=Eo(r,dh,YC):i>L1?e.dtick=Eo(r,L1,YC):(a=n(10),e.dtick=Eo(r,a,T1))}else if(e.type==="log"){e.tick0=0;var s=xr.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+Eo(r,a,T1)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):Jx(e)?(e.tick0=0,a=1,e.dtick=Eo(r,a,Cce)):(e.tick0=0,a=n(10),e.dtick=Eo(r,a,T1));if(e.dtick===0&&(e.dtick=1),!aa(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function KC(e){var r=e.dtick;if(e._tickexponent=0,!aa(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=on&&n<=10||r>=on*15)e._tickround="d";else if(r>=dh&&n<=16||r>=Do)e._tickround="M";else if(r>=L1&&n<=19||r>=dh)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(aa(r)||r.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);aa(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(E1(e.exponentformat)&&!Zx(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}We.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(aa(r))return xr.increment(e,n*r);var i=r.charAt(0),o=n*Number(r.substr(1));if(i==="M")return xr.incrementMonth(e,o,a);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var l=r==="D2"?$C:JC,s=e+n*.01,u=xr.roundUp(xr.mod(s,1),l,t);return Math.floor(s)+Math.log(di.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};We.tickFirst=function(e,r){var t=e.r2l||Number,a=xr.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&_<=e._length?y:null};if(i&&xr.isArrayOrTypedArray(e.ticktext)){var c=xr.simpleMap(e.range,e.r2l),v=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(u=0;u"+l;else{var u=mh(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(o+="
")}r.text=o}function Dce(e,r,t,a,n){var i=e.dtick,o=r.x,l=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),l||s==="L")r.text=yh(Math.pow(10,o),e,n,a);else if(aa(i)||s==="D"&&xr.mod(o+.01,1)<.1){var u=Math.round(o),f=Math.abs(u),c=e.exponentformat;c==="power"||E1(c)&&Zx(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":cu)+f+"",r.fontSize*=1.25):(c==="e"||c==="E")&&f>2?r.text="1"+c+(u>0?"+":cu)+f:(r.text=yh(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,xr.mod(o,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var v=String(r.text).charAt(0);(v==="0"||v==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(o<0?.5:.25)))}}function Pce(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function Rce(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);t?r.text=o+" - "+i:(r.text=i,r.text2=o)}function Fce(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=yh(r.x,e,n,a)}function Nce(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var o=zce(i);if(o[1]>=100)r.text=yh(xr.deg2rad(r.x),e,n,a);else{var l=r.x<0;o[1]===1?o[0]===1?r.text="\u03C0":r.text=o[0]+"\u03C0":r.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),l&&(r.text=cu+r.text)}}}else r.text=yh(r.x,e,n,a)}function zce(e){function r(l,s){return Math.abs(l-s)<=1e-6}function t(l,s){return r(s,0)?l:t(s,l%s)}function a(l){for(var s=1;!r(Math.round(l*s)/s,l);)s*=10;return s}var n=a(e),i=e*n,o=Math.abs(t(i,n));return[Math.round(i/o),Math.round(n/o)]}var Ice=["f","p","n","\u03BC","m","","k","M","G","T"];function E1(e){return e==="SI"||e==="B"}function Zx(e){return e>14||e<-15}function yh(e,r,t,a){var n=e<0,i=r._tickround,o=t||r.exponentformat||"B",l=r._tickexponent,s=We.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:o,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:aa(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};KC(f),i=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,cu);var c=Math.pow(10,-i)/2;if(o==="none"&&(l=0),e=Math.abs(e),e"+p+"":o==="B"&&l===9?e+="B":E1(o)&&(e+=Ice[l/3+5])}return n?cu+e:e}We.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*$f}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var c=f.indexOf(s.charAt(0)),v=f.indexOf(u.charAt(0));return c===v?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):c-v}else return typeof s=="number"?1:-1}function n(s,u,f){var c=f||function(p){return p},v=u[0],d=u[1];return(!v&&typeof v!="number"||c(v)<=c(s))&&(!d&&typeof d!="number"||c(d)>=c(s))}function i(s,u){var f=u[0]===null,c=u[1]===null,v=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||v)&&(c||d)}var o,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var l={false:{left:0,right:0}};return xr.syncOrAsync(n.map(function(s){return function(){if(s){var u=We.getFromId(e,s);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=o;var f=We.drawOne(e,u,t);return u._shiftPusher&&Wx(u,u._fullDepth||0,l,!0),u._r=u.range.slice(),u._rl=xr.simpleMap(u._r,u.r2l),f}}}))};We.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,o,l;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),c=We.counterLetter(u),v=s._plots[r._mainSubplot];if(!v)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),Wx(r,d,a,!0),Wx(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=$ce(r,a));var p=v[f+"axislayer"],m=r._mainLinePosition,y=m+=r._shift,_=r._mainMirrorPosition,b=r._vals=We.calcTicks(r),w=[r.mirror,y,_].join("_");for(i=0;i0?ze.bottom-Ie:0,Be))));var se=0,Te=0;if(r._shiftPusher&&(se=Math.max(Be,ze.height>0?Fe==="l"?Ie-ze.left:ze.right-Ie:0),r.title.text!==s._dfltTitle[f]&&(Te=(r._titleStandoff||0)+(r._titleScoot||0),Fe==="l"&&(Te+=WC(r))),r._fullDepth=Math.max(se,Te)),r.automargin){Pe={x:0,y:0,r:0,l:0,t:0,b:0};var Se=[0,1],ir=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Fe==="b"?Pe[Fe]=r._depth:(Pe[Fe]=r._depth=Math.max(ze.width>0?Ie-ze.top:0,Be),Se.reverse()),ze.width>0){var Qe=ze.right-(r._offset+r._length);Qe>0&&(Pe.xr=1,Pe.r=Qe);var Le=r._offset-ze.left;Le>0&&(Pe.xl=0,Pe.l=Le)}}else if(Fe==="l"?(r._depth=Math.max(ze.height>0?Ie-ze.left:0,Be),Pe[Fe]=r._depth-ir):(r._depth=Math.max(ze.height>0?ze.right-Ie:0,Be),Pe[Fe]=r._depth+ir,Se.reverse()),ze.height>0){var Ce=ze.bottom-(r._offset+r._length);Ce>0&&(Pe.yb=0,Pe.b=Ce);var Ge=r._offset-ze.top;Ge>0&&(Pe.yt=1,Pe.t=Ge)}Pe[c]=r.anchor==="free"?r.position:r._anchorAxis.domain[Se[0]],r.title.text!==s._dfltTitle[f]&&(Pe[Fe]+=WC(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Xe={x:0,y:0,r:0,l:0,t:0,b:0},Xe[Re]=r.linewidth,r.mirror&&r.mirror!==!0&&(Xe[Re]+=Be),r.mirror===!0||r.mirror==="ticks"?Xe[c]=r._anchorAxis.domain[Se[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Xe[c]=[r._counterDomainMin,r._counterDomainMax][Se[1]]))}Ne&&(Ue=vh.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(VC(Pe,r.automargin),VC(Xe,r.automargin)),Xf.autoMargin(e,Xx(r),Pe),Xf.autoMargin(e,rE(r),Xe),Xf.autoMargin(e,tE(r),Ue)}),xr.syncOrAsync(me)}};function VC(e,r){if(e){var t=Object.keys(IC).reduce(function(a,n){return r.indexOf(n)!==-1&&IC[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function Oce(e,r){var t=[],a,n=function(i,o){var l=i.xbnd[o];l!==null&&t.push(xr.extendFlat({},i,{x:l}))};if(r.length){for(a=0;ae.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!l;if(t){var u=o?-1:1;t=t*u}if(a){var f=e.side,c=l&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*c}return e._id.charAt(0)==="x"?function(v){return Jf(n+e._offset+e.l2p(Yx(v))+t,i+a)}:function(v){return Jf(i+a,n+e._offset+e.l2p(Yx(v))+t)}};function Yx(e){return e.periodX!==void 0?e.periodX:e.x}function Gce(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),o=t("bottom"),l=t("inside"),s=o||n||a||i;if(!s&&!l)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,c=C1,v=e.tickfont?e.tickfont.size:12;return(o||a)&&(f+=v*vu,c+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,c+=C1),l&&u==="top"&&(c-=v*(1-vu)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(c=-c),[s?f:0,l?c:0]}We.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return o==="x"?"M0,"+(r+l*t)+"v"+i*t:"M"+(r+l*t)+",0h"+i*t};We.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(D){return a.indexOf(D)!==-1},i=n("top"),o=n("left"),l=n("right"),s=n("bottom"),u=s||o||i||l,f=n("inside"),c=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",v=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:u&&(p=0),c&&(v+=p,t)){var m=xr.deg2rad(t);v=p*Math.cos(m)+1,d=p*Math.sin(m)}e.showticklabels&&(c||e.showline)&&(v+=.2*e.tickfont.size),v+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:v,labelShift:d},_,b,w,x,T=0,k=e.side,M=e._id.charAt(0),S=e.tickangle,E;if(M==="x")E=!f&&k==="bottom"||f&&k==="top",x=E?1:-1,f&&(x*=-1),_=d*x,b=r+v*x,w=E?1:-.2,Math.abs(S)===90&&(f?w+=ch:S===-90&&k==="bottom"?w=vu:S===90&&k==="top"?w=ch:w=.5,T=ch/2*(S/90)),y.xFn=function(D){return D.dx+_+T*D.fontSize},y.yFn=function(D){return D.dy+b+D.fontSize*w},y.anchorFn=function(D,z){if(u){if(o)return"end";if(l)return"start"}return!aa(z)||z===0||z===180?"middle":z*x<0!==f?"end":"start"},y.heightFn=function(D,z,O){return z<-60||z>60?-.5*O:e.side==="top"!==f?-O:0};else if(M==="y"){if(E=!f&&k==="left"||f&&k==="right",x=E?1:-1,f&&(x*=-1),_=v,b=d*x,w=0,!f&&Math.abs(S)===90&&(S===-90&&k==="left"||S===90&&k==="right"?w=vu:w=.5),f){var P=aa(S)?+S:0;if(P!==0){var R=xr.deg2rad(P);T=Math.abs(Math.sin(R))*vu*x,w=0}}y.xFn=function(D){return D.dx+r-(_+D.fontSize*w)*x+T*D.fontSize},y.yFn=function(D){return D.dy+b+D.fontSize*ch},y.anchorFn=function(D,z){return aa(z)&&Math.abs(z)===90?"middle":E?"end":"start"},y.heightFn=function(D,z,O){return e.side==="right"&&(z*=-1),z<-30?-O:z<30?-.5*O:0}}return y};function R1(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}We.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(r.ticks?t.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,R1);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(o){return hh.stroke(di.select(this),o.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(o){return Zn.crispRound(e,o.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),F1(r,[jC]),i.attr("transform",t.transFn)};We.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(_){return _.minor}):[],o=r.showgrid?t.vals.filter(function(_){return!_.minor}):[],l=t.counterAxis;if(l&&We.shouldShowZeroLine(e,r,l))for(var s=r.tickmode==="array",u=0;u=0;p--){var m=p?v:d;if(m){var y=m.selectAll("path."+a).data(p?o:i,R1);y.exit().remove(),y.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),y.attr("transform",t.transFn).attr("d",t.path).each(function(_){return hh.stroke(di.select(this),_.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(_){return Zn.dashStyle(_.minor?r.minor.griddash:r.griddash,_.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(_){return(_.minor?c:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&y.attr("d",t.path)}}F1(r,[Ux,Gx])}};We.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=We.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(o,l){return xce(o.id,l.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(hh.stroke,r.zerolinecolor||hh.defaultLine).style("stroke-width",Zn.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),F1(r,[Hx])};We.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",o=t.vals.filter(function(B){return B.text}),l=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?o:[],R1),c=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(B){var Y=di.select(this),X=e._promises.length;Y.call(fu.positionText,l.xFn(B),l.yFn(B)).call(Zn.font,{family:B.font,size:B.fontSize,color:B.fontColor,weight:B.fontWeight,style:B.fontStyle,variant:B.fontVariant,textcase:B.fontTextcase,lineposition:B.fontLineposition,shadow:B.fontShadow}).text(B.text).call(fu.convertToTspans,e),e._promises[X]?c.push(e._promises.pop().then(function(){v(Y,s)})):v(Y,s)}),F1(r,[zC]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(B){di.select(this).select("text").call(fu.positionText,l.xFn(B),l.yFn(B))});function v(B,Y){B.each(function(X){var Z=di.select(this),te=Z.select(".text-math-group"),fe=l.anchorFn(X,Y),le=t.transFn.call(Z.node(),X)+(aa(Y)&&+Y!=0?" rotate("+Y+","+l.xFn(X)+","+(l.yFn(X)-X.fontSize/2)+")":""),ie=fu.lineCount(Z),K=ph*X.fontSize,he=l.heightFn(X,aa(Y)?+Y:0,(ie-1)*K);if(he&&(le+=Jf(0,he)),te.empty()){var oe=Z.select("text");oe.attr({transform:le,"text-anchor":fe}),oe.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var ye=Zn.bBox(te.node()).width,ue=ye*{end:-.5,start:.5}[fe];te.attr("transform",le+Jf(ue,0))}})}r._adjustTickLabelsOverflow=function(){var B=r.ticklabeloverflow;if(!(!B||B==="allow")){var Y=B.indexOf("hide")!==-1,X=r._id.charAt(0)==="x",Z=0,te=X?e._fullLayout.width:e._fullLayout.height;if(B.indexOf("domain")!==-1){var fe=xr.simpleMap(r.range,r.r2l);Z=r.l2p(fe[0])+r._offset,te=r.l2p(fe[1])+r._offset}var le=Math.min(Z,te),ie=Math.max(Z,te),K=r.side,he=1/0,oe=-1/0;f.each(function(W){var Q=di.select(this),j=Q.select(".text-math-group");if(j.empty()){var pe=Zn.bBox(Q.node()),me=0;X?(pe.right>ie||pe.leftie||pe.top+(r.tickangle?0:W.fontSize/4)r["_visibleLabelMin_"+fe._id]?W.style("display","none"):ie.K==="tick"&&!le&&W.style("display",null)})})})})},v(f,u+1?u:s);function d(){return c.length&&Promise.all(c)}var p=null;function m(){if(v(f,s),o.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){p=r.autotickangles[0];var B=0,Y=[],X,Z=1;f.each(function(ze){B=Math.max(B,ze.fontSize);var Pe=r.l2p(ze.x),Xe=Vx(this),Ue=Zn.bBox(Xe.node());Z=Math.max(Z,fu.lineCount(Xe)),Y.push({top:0,bottom:10,height:10,left:Pe-Ue.width/2,right:Pe+Ue.width/2+2,width:Ue.width+2})});var te=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,fe=o.length,le=Math.abs((o[fe-1].x-o[0].x)*r._m)/(fe-1),ie=te?le/2:le,K=te?r.ticklen:B*1.25*Z,he=Math.sqrt(Math.pow(ie,2)+Math.pow(K,2)),oe=ie/he,ye=r.autotickangles.map(function(ze){return ze*Math.PI/180}),ue=ye.find(function(ze){return Math.abs(Math.cos(ze))<=oe});ue===void 0&&(ue=ye.reduce(function(ze,Pe){return Math.abs(Math.cos(ze))H*O&&(R=O,S[M]=E[M]=D[M])}var V=Math.abs(R-P);V-x>0?(V-=x,x*=1+x/V):x=0,r._id.charAt(0)!=="y"&&(x=-x),S[k]=b.p2r(b.r2p(E[k])+T*x),b.autorange==="min"||b.autorange==="max reversed"?(S[0]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0):(b.autorange==="max"||b.autorange==="min reversed")&&(S[1]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[b._name+".range"]=S}var G=xr.syncOrAsync(y);return G&&G.then&&e._promises.push(G),G};function Yce(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,R1);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(hh.stroke,r.dividercolor).style("stroke-width",Zn.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}We.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function WC(e){var r=e.title.font.size,t=(e.title.text.match(fu.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(vu+t*ph):t?r*(t+1)*ph:r}function Vce(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,o,l=(r.title.text.match(fu.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?o=r._depth+r.title.standoff+i*vu:(r.side==="top"||r.side==="left")&&(o=r._depth+r.title.standoff+i*(ch+l*ph));else{var s=mh(r);if(r.type==="multicategory")o=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),o=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?o+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):o+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=We.getPxPosition(e,r),c,v,d;n==="x"?(v=r._offset+r._length/2,d=r.side==="top"?f-o:f+o):(d=r._offset+r._length/2,v=r.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(r.type!=="multicategory"){var m=r._selections[r._id+"tick"];if(p={selection:m,side:r.side},m&&m.node()&&m.node().parentNode){var y=Zn.getTranslate(m.node().parentNode);p.offsetLeft=y.x,p.offsetTop=y.y}r.title.hasOwnProperty("standoff")&&(p.pad=0)}return r._titleStandoff=o,cce.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:p,transform:c,attributes:{x:v,y:d,"text-anchor":"middle"}})}We.shouldShowZeroLine=function(e,r,t){var a=xr.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===D1)&&(eE(r,0)||!Wce(e,r,t,a)||jce(e,r))};We.clipEnds=function(e,r){return r.filter(function(t){return eE(e,t.x)})};function eE(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=mce:/%L/.test(r)?e>=yce:/%[SX]/.test(r)?e>=L1:/%M/.test(r)?e>=dh:/%[HI]/.test(r)?e>=Do:/%p/.test(r)?e>=es:/%[Aadejuwx]/.test(r)?e>=on:/%[UVW]/.test(r)?e>=Xn:/%[Bbm]/.test(r)?e>=q1:/%[q]/.test(r)?e>=S1:/%[Yy]/.test(r)?e>=k1:!0}});var iE=N((PEe,nE)=>{"use strict";nE.exports=function(r,t,a){var n,i;if(a){var o=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[o?1:0],i=a[o?0:1]}var l=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);l===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var $x=N((REe,oE)=>{"use strict";var Qce=iE();oE.exports=function(r,t,a,n){var i=t._template||{},o=t.type||i.type||"-";a("minallowed"),a("maxallowed");var l=a("range");if(!l){var s;!n.noInsiderange&&o!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(l=a("range",s)))}var u=t.getAutorangeDflt(l,n),f=a("autorange",u),c;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,c=!0),c||(u=t.getAutorangeDflt(l,n),f=a("autorange",u)),f&&(Qce(a,f,l),(o==="linear"||o==="-")&&a("rangemode")),t.cleanRange()}});var sE=N((FEe,lE)=>{var eve={left:0,top:0};lE.exports=rve;function rve(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=tve(r);return t[0]=a-i.left,t[1]=n-i.top,t}function tve(e){return e===window||e===document||e===document.body?eve:e.getBoundingClientRect()}});var Kx=N((NEe,uE)=>{"use strict";var ave=Rb();function nve(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}uE.exports=ave&&nve()});var cE=N((zEe,fE)=>{"use strict";fE.exports=function(r,t,a,n,i){var o=(r-a)/(n-a),l=o+t/(n-a),s=(o+l)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?s:i==="right"||i==="top"?l:o<2/3-s?o:l>4/3-s?l:s}});var dE=N((IEe,hE)=>{"use strict";var vE=Ee(),ive=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];hE.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=vE.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=vE.constrain(Math.floor(t*3),0,2),ive[t][r]}});var yE=N((OEe,pE)=>{"use strict";var ove=eh(),lve=Pp(),sve=Wv().getGraphDiv,uve=Yv(),Qx=pE.exports={};Qx.wrapped=function(e,r,t){e=sve(e),e._fullLayout&&lve.clear(e._fullLayout._uid+uve.HOVERID),Qx.raw(e,r,t)};Qx.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&ove.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var pi=N((BEe,bE)=>{"use strict";var fve=sE(),e5=Nb(),cve=Kx(),vve=Ee().removeElement,hve=Ca(),hu=bE.exports={};hu.align=cE();hu.getCursor=dE();var mE=yE();hu.unhover=mE.wrapped;hu.unhoverRaw=mE.raw;hu.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,o,l,s,u,f,c,v,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=y,cve?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=y,i.addEventListener("touchstart",y,{passive:!1})):i.ontouchstart=y;function p(w,x,T){return Math.abs(w)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,c),!d){var x;try{x=new MouseEvent("click",w)}catch(k){var T=r5(w);x=document.createEvent("MouseEvents"),x.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,T[0],T[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}v.dispatchEvent(x)}t._dragging=!1,t._dragged=!1}};function gE(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}hu.coverSlip=gE;function r5(e){return fve(e.changedTouches?e.changedTouches[0]:e,document.body)}});var rs=N((HEe,xE)=>{"use strict";xE.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var TE=N((UEe,wE)=>{"use strict";var t5=rs(),gh="data-savedcursor",_E="!!";wE.exports=function(r,t){var a=r.attr(gh);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var a5=fa(),dve=li();AE.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:dve.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:a5({editType:"legend"}),grouptitlefont:a5({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:a5({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var z1=N(N1=>{"use strict";N1.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};N1.isVertical=function(r){return r.orientation!=="h"};N1.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var l5=N((VEe,ME)=>{"use strict";var i5=gr(),Jn=Ee(),pve=_t(),yve=mn(),mve=n5(),gve=Sf(),o5=z1();function bve(e,r,t,a){var n=r[e]||{},i=pve.newContainer(t,e);function o(G,B){return Jn.coerce(n,i,mve,G,B)}var l=Jn.coerceFont(o,"font",t.font);o("bgcolor",t.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var u,f=function(G,B){var Y=u._input,X=u;return Jn.coerce(Y,X,yve,G,B)},c=t.font||{},v=Jn.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,m="normal",y=(t.shapes||[]).filter(function(G){return G.showlegend}),_=a.concat(y).filter(function(G){return e===(G.legend||"legend")}),b=0;b<_.length;b++)if(u=_[b],!!u.visible){var w=u._isShape;(u.showlegend||u._dfltShowLegend&&!(u._module&&u._module.attributes&&u._module.attributes.showlegend&&u._module.attributes.showlegend.dflt===!1))&&(d++,u.showlegend&&(p=!0,(!w&&i5.traceIs(u,"pie-like")||u._input.showlegend===!0)&&d++),Jn.coerceFont(f,"legendgrouptitle.font",v)),(!w&&i5.traceIs(u,"bar")&&t.barmode==="stack"||["tonextx","tonexty"].indexOf(u.fill)!==-1)&&(m=o5.isGrouped({traceorder:m})?"grouped+reversed":"reversed"),u.legendgroup!==void 0&&u.legendgroup!==""&&(m=o5.isReversed({traceorder:m})?"reversed+grouped":"grouped")}var x=Jn.coerce(r,t,gve,"showlegend",p&&d>(e==="legend"?1:0));if(x===!1&&(t[e]=void 0),!(x===!1&&!n.uirevision)&&(o("uirevision",t.uirevision),x!==!1)){o("borderwidth");var T=o("orientation"),k=o("yref"),M=o("xref"),S=T==="h",E=k==="paper",P=M==="paper",R,D,z,O="left";S?(R=0,i5.getComponentMethod("rangeslider","isVisible")(r.xaxis)?E?(D=1.1,z="bottom"):(D=1,z="top"):E?(D=-.1,z="top"):(D=0,z="bottom")):(D=1,z="auto",P?R=1.02:(R=1,O="right")),Jn.coerce(n,i,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:R}},"x"),Jn.coerce(n,i,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:D}},"y"),o("traceorder",m),o5.isGrouped(t[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",O),o("yanchor",z),o("valign"),Jn.noneOrAll(n,i,["x","y"]);var H=o("title.text");if(H){o("title.side",S?"left":"top");var V=Jn.extendFlat({},l,{size:Jn.bigFont(l.size)});Jn.coerceFont(o,"title.font",V)}}}}ME.exports=function(r,t,a){var n,i=a.slice(),o=t.shapes;if(o)for(n=0;n{"use strict";var Kf=gr(),u5=Ee(),xve=u5.pushUnique,s5=!0;kE.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,o=n.legend.itemdoubleclick,l=n.legend.groupclick;a===1&&i==="toggle"&&o==="toggleothers"&&s5&&t.data&&t._context.showTips&&u5.notifier(u5._(t,"Double-click on legend to isolate one trace"),"long"),s5=!1;var s;if(a===1?s=i:a===2&&(s=o),!s)return;var u=l==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],c=r.data()[0][0];if(c.groupTitle&&c.noClick)return;var v=t._fullData,d=(n.shapes||[]).filter(function(Ie){return Ie.showlegend}),p=v.concat(d),m=c.trace;m._isShape&&(m=m._fullInput);var y=m.legendgroup,_,b,w,x,T,k,M={},S=[],E=[],P=[];function R(Ie,Be){var ze=S.indexOf(Ie),Pe=M.visible;return Pe||(Pe=M.visible=[]),S.indexOf(Ie)===-1&&(S.push(Ie),ze=S.length-1),Pe[ze]=Be,ze}var D=(n.shapes||[]).map(function(Ie){return Ie._input}),z=!1;function O(Ie,Be){D[Ie].visible=Be,z=!0}function H(Ie,Be){if(!(c.groupTitle&&!u)){var ze=Ie._fullInput||Ie,Pe=ze._isShape,Xe=ze.index;Xe===void 0&&(Xe=ze._index);var Ue=ze.visible===!1?!1:Be;Pe?O(Xe,Ue):R(Xe,Ue)}}var V=m.legend,G=m._fullInput,B=G&&G._isShape;if(!B&&Kf.traceIs(m,"pie-like")){var Y=c.label,X=f.indexOf(Y);if(s==="toggle")X===-1?f.push(Y):f.splice(X,1);else if(s==="toggleothers"){var Z=X!==-1,te=[];for(_=0;_{"use strict";qE.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var EE=N((ZEe,CE)=>{"use strict";var LE=gr(),c5=z1();CE.exports=function(r,t,a){var n=t._inHover,i=c5.isGrouped(t),o=c5.isReversed(t),l={},s=[],u=!1,f={},c=0,v=0,d,p;function m(G,B,Y){if(t.visible!==!1&&!(a&&G!==t._id))if(B===""||!c5.isGrouped(t)){var X="~~i"+c;s.push(X),l[X]=[Y],c++}else s.indexOf(B)===-1?(s.push(B),u=!0,l[B]=[Y]):l[B].push(Y)}for(d=0;dP&&(E=P)}M[d][0]._groupMinRank=E,M[d][0]._preGroupSort=d}var R=function(G,B){return G[0]._groupMinRank-B[0]._groupMinRank||G[0]._preGroupSort-B[0]._preGroupSort},D=function(G,B){return G.trace.legendrank-B.trace.legendrank||G._preSort-B._preSort};for(M.forEach(function(G,B){G[0]._preGroupSort=B}),M.sort(R),d=0;d{"use strict";var I1=Ee();function DE(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}du.formatPiePercent=function(r,t){var a=DE((r*100).toPrecision(3));return I1.numSeparate(a,t)+"%"};du.formatPieValue=function(r,t){var a=DE(r.toPrecision(10));return I1.numSeparate(a,t)};du.getFirstFilled=function(r,t){if(I1.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var _ve=jr(),wve=Tr();PE.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?_ve.pointStyle(r,a,n,t):wve.fill(r,t.color)}});var B1=N(($Ee,zE)=>{"use strict";var FE=Tr(),NE=O1().castOption,Tve=RE();zE.exports=function(r,t,a,n){var i=a.marker.line,o=NE(i.color,t.pts)||FE.defaultLine,l=NE(i.width,t.pts)||0;r.call(Tve,t,a,n).style("stroke-width",l).call(FE.stroke,o)}});var p5=N((KEe,GE)=>{"use strict";var ln=Sr(),v5=gr(),$a=Ee(),IE=$a.strTranslate,gn=jr(),yi=Tr(),h5=vi().extractOpts,H1=Pn(),Ave=B1(),Mve=O1().castOption,kve=f5(),OE=12,BE=5,pu=2,Sve=10,Qf=5;GE.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",o=a.itemwidth,l=(o+kve.itemGap*2)/2,s=IE(l,0),u=function(M,S,E,P){var R;if(M+1)R=M;else if(S&&S.width>0)R=S.width;else return 0;return i?P:Math.min(R,E)};r.each(function(M){var S=ln.select(this),E=$a.ensureSingle(S,"g","layers");E.style("opacity",M[0].trace.opacity);var P=a.indentation,R=a.valign,D=M[0].lineHeight,z=M[0].height;if(R==="middle"&&P===0||!D||!z)E.attr("transform",null);else{var O={top:1,bottom:-1}[R],H=O*(.5*(D-z+3))||0,V=a.indentation;E.attr("transform",IE(V,H))}var G=E.selectAll("g.legendfill").data([M]);G.enter().append("g").classed("legendfill",!0);var B=E.selectAll("g.legendlines").data([M]);B.enter().append("g").classed("legendlines",!0);var Y=E.selectAll("g.legendsymbols").data([M]);Y.enter().append("g").classed("legendsymbols",!0),Y.selectAll("g.legendpoints").data([M]).enter().append("g").classed("legendpoints",!0)}).each(k).each(v).each(p).each(d).each(y).each(x).each(w).each(f).each(c).each(_).each(b);function f(M){var S=HE(M),E=S.showFill,P=S.showLine,R=S.showGradientLine,D=S.showGradientFill,z=S.anyFill,O=S.anyLine,H=M[0],V=H.trace,G,B,Y=h5(V),X=Y.colorscale,Z=Y.reversescale,te=function(ye){if(ye.size())if(E)gn.fillGroupStyle(ye,t,!0);else{var ue="legendfill-"+V.uid;gn.gradient(ye,t,ue,d5(Z),X,"fill")}},fe=function(ye){if(ye.size()){var ue="legendline-"+V.uid;gn.lineGroupStyle(ye),gn.gradient(ye,t,ue,d5(Z),X,"stroke")}},le=H1.hasMarkers(V)||!z?"M5,0":O?"M5,-2":"M5,-3",ie=ln.select(this),K=ie.select(".legendfill").selectAll("path").data(E||D?[M]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",le+"h"+o+"v6h-"+o+"z").call(te),P||R){var he=u(void 0,V.line,Sve,BE);B=$a.minExtend(V,{line:{width:he}}),G=[$a.minExtend(H,{trace:B})]}var oe=ie.select(".legendlines").selectAll("path").data(P||R?[G]:[]);oe.enter().append("path").classed("js-line",!0),oe.exit().remove(),oe.attr("d",le+(R?"l"+o+",0.0001":"h"+o)).call(P?gn.lineGroupStyle:fe)}function c(M){var S=HE(M),E=S.anyFill,P=S.anyLine,R=S.showLine,D=S.showMarker,z=M[0],O=z.trace,H=!D&&!P&&!E&&H1.hasText(O),V,G;function B(K,he,oe,ye){var ue=$a.nestedProperty(O,K).get(),de=$a.isArrayOrTypedArray(ue)&&he?he(ue):ue;if(i&&de&&ye!==void 0&&(de=ye),oe){if(deoe[1])return oe[1]}return de}function Y(K){return z._distinct&&z.index&&K[z.index]?K[z.index]:K[0]}if(D||H||R){var X={},Z={};if(D){X.mc=B("marker.color",Y),X.mx=B("marker.symbol",Y),X.mo=B("marker.opacity",$a.mean,[.2,1]),X.mlc=B("marker.line.color",Y),X.mlw=B("marker.line.width",$a.mean,[0,5],pu),Z.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var te=B("marker.size",$a.mean,[2,16],OE);X.ms=te,Z.marker.size=te}R&&(Z.line={width:B("line.width",Y,[0,10],BE)}),H&&(X.tx="Aa",X.tp=B("textposition",Y),X.ts=10,X.tc=B("textfont.color",Y),X.tf=B("textfont.family",Y),X.tw=B("textfont.weight",Y),X.ty=B("textfont.style",Y),X.tv=B("textfont.variant",Y),X.tC=B("textfont.textcase",Y),X.tE=B("textfont.lineposition",Y),X.tS=B("textfont.shadow",Y)),V=[$a.minExtend(z,X)],G=$a.minExtend(O,Z),G.selectedpoints=null,G.texttemplate=null}var fe=ln.select(this).select("g.legendpoints"),le=fe.selectAll("path.scatterpts").data(D?V:[]);le.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),le.exit().remove(),le.call(gn.pointStyle,G,t),D&&(V[0].mrc=3);var ie=fe.selectAll("g.pointtext").data(H?V:[]);ie.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),ie.exit().remove(),ie.selectAll("text").call(gn.textPointStyle,G,t)}function v(M){var S=M[0].trace,E=S.type==="waterfall";if(M[0]._distinct&&E){var P=M[0].trace[M[0].dir].marker;return M[0].mc=P.color,M[0].mlw=P.line.width,M[0].mlc=P.line.color,m(M,this,"waterfall")}var R=[];S.visible&&E&&(R=M[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 D=ln.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(R);D.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(z){var O=ln.select(this),H=S[z[0]].marker,V=u(void 0,H.line,Qf,pu);O.attr("d",z[1]).style("stroke-width",V+"px").call(yi.fill,H.color),V&&O.call(yi.stroke,H.line.color)})}function d(M){m(M,this)}function p(M){m(M,this,"funnel")}function m(M,S,E){var P=M[0].trace,R=P.marker||{},D=R.line||{},z=R.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",O=E?P.visible&&P.type===E:v5.traceIs(P,"bar"),H=ln.select(S).select("g.legendpoints").selectAll("path.legend"+E).data(O?[M]:[]);H.enter().append("path").classed("legend"+E,!0).attr("d",z).attr("transform",s),H.exit().remove(),H.each(function(V){var G=ln.select(this),B=V[0],Y=u(B.mlw,R.line,Qf,pu);G.style("stroke-width",Y+"px");var X=B.mcc;if(!a._inHover&&"mc"in B){var Z=h5(R),te=Z.mid;te===void 0&&(te=(Z.max+Z.min)/2),X=gn.tryColorscale(R,"")(te)}var fe=X||B.mc||R.color,le=R.pattern,ie=le&&gn.getPatternAttr(le.shape,0,"");if(ie){var K=gn.getPatternAttr(le.bgcolor,0,null),he=gn.getPatternAttr(le.fgcolor,0,null),oe=le.fgopacity,ye=UE(le.size,8,10),ue=UE(le.solidity,.5,1),de="legend-"+P.uid;G.call(gn.pattern,"legend",t,de,ie,ye,ue,X,le.fillmode,K,he,oe)}else G.call(yi.fill,fe);Y&&yi.stroke(G,B.mlc||D.color)})}function y(M){var S=M[0].trace,E=ln.select(this).select("g.legendpoints").selectAll("path.legendbox").data(S.visible&&v5.traceIs(S,"box-violin")?[M]:[]);E.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),E.exit().remove(),E.each(function(){var P=ln.select(this);if((S.boxpoints==="all"||S.points==="all")&&yi.opacity(S.fillcolor)===0&&yi.opacity((S.line||{}).color)===0){var R=$a.minExtend(S,{marker:{size:i?OE:$a.constrain(S.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});E.call(gn.pointStyle,R,t)}else{var D=u(void 0,S.line,Qf,pu);P.style("stroke-width",D+"px").call(yi.fill,S.fillcolor),D&&yi.stroke(P,S.line.color)}})}function _(M){var S=M[0].trace,E=ln.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(S.visible&&S.type==="candlestick"?[M,M]:[]);E.enter().append("path").classed("legendcandle",!0).attr("d",function(P,R){return R?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(P,R){var D=ln.select(this),z=S[R?"increasing":"decreasing"],O=u(void 0,z.line,Qf,pu);D.style("stroke-width",O+"px").call(yi.fill,z.fillcolor),O&&yi.stroke(D,z.line.color)})}function b(M){var S=M[0].trace,E=ln.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(S.visible&&S.type==="ohlc"?[M,M]:[]);E.enter().append("path").classed("legendohlc",!0).attr("d",function(P,R){return R?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(P,R){var D=ln.select(this),z=S[R?"increasing":"decreasing"],O=u(void 0,z.line,Qf,pu);D.style("fill","none").call(gn.dashLine,z.line.dash,O),O&&yi.stroke(D,z.line.color)})}function w(M){T(M,this,"pie")}function x(M){T(M,this,"funnelarea")}function T(M,S,E){var P=M[0],R=P.trace,D=E?R.visible&&R.type===E:v5.traceIs(R,E),z=ln.select(S).select("g.legendpoints").selectAll("path.legend"+E).data(D?[M]:[]);if(z.enter().append("path").classed("legend"+E,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),z.exit().remove(),z.size()){var O=R.marker||{},H=u(Mve(O.line.width,P.pts),O.line,Qf,pu),V="pieLike",G=$a.minExtend(R,{marker:{line:{width:H}}},V),B=$a.minExtend(P,{trace:G},V);Ave(z,B,G,t)}}function k(M){var S=M[0].trace,E,P=[];if(S.visible)switch(S.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],E=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],E=!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"]],E="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"]],E=!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"]],E=!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"]],E=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!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"]],E=!1;break}var R=ln.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);R.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(D,z){var O=ln.select(this),H=h5(S),V=H.colorscale,G=H.reversescale,B=function(te){if(te.size()){var fe="legendfill-"+S.uid;gn.gradient(te,t,fe,d5(G,E==="radial"),V,"fill")}},Y;if(V){if(!E){var Z=V.length;Y=z===0?V[G?Z-1:0][1]:z===1?V[G?0:Z-1][1]:V[Math.floor((Z-1)/2)][1]}}else{var X=S.vertexcolor||S.facecolor||S.color;Y=$a.isArrayOrTypedArray(X)?X[z]||X[0]:X}O.attr("d",D[0]),Y?O.call(yi.fill,Y):O.call(B)})}};function d5(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function HE(e){var r=e[0].trace,t=r.contours,a=H1.hasLines(r),n=H1.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",o=!1,l=!1;if(t){var s=t.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:i||l}}function UE(e,r,t){return e&&$a.isArrayOrTypedArray(e)?r:e>t?t:e}});var b5=N((QEe,QE)=>{"use strict";var Rn=Sr(),na=Ee(),m5=ea(),tc=gr(),YE=eh(),y5=pi(),ia=jr(),G1=Tr(),yu=Ea(),VE=SE(),ha=f5(),g5=Xa(),$E=g5.LINE_SPACING,rc=g5.FROM_TL,WE=g5.FROM_BR,jE=EE(),qve=p5(),ZE=z1(),ec=1,Lve=/^legend[0-9]*$/;QE.exports=function(r,t){if(t)XE(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Rn.select(this),f=u.attr("class"),c=f.split(" ")[0];c.match(Lve)&&n.indexOf(c)===-1&&u.remove()});for(var o=0;o1)}var p=a.hiddenlabels||[];if(!l&&(!a.showlegend||!s.length))return o.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),m5.autoMargin(e,n);var m=na.ensureSingle(o,"g",n,function(S){l||S.attr("pointer-events","all")}),y=na.ensureSingleById(a._topdefs,"clipPath",i,function(S){S.append("rect")}),_=na.ensureSingle(m,"rect","bg",function(S){S.attr("shape-rendering","crispEdges")});_.call(G1.stroke,t.bordercolor).call(G1.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var b=na.ensureSingle(m,"g","scrollbox"),w=t.title;t._titleWidth=0,t._titleHeight=0;var x;w.text?(x=na.ensureSingle(b,"text",n+"titletext"),x.attr("text-anchor","start").call(ia.font,w.font).text(w.text),Y1(x,b,e,t,ec)):b.selectAll("."+n+"titletext").remove();var T=na.ensureSingle(m,"rect","scrollbar",function(S){S.attr(ha.scrollBarEnterAttrs).call(G1.fill,ha.scrollBarColor)}),k=b.selectAll("g.groups").data(s);k.enter().append("g").attr("class","groups"),k.exit().remove();var M=k.selectAll("g.traces").data(na.identity);M.enter().append("g").attr("class","traces"),M.exit().remove(),M.style("opacity",function(S){var E=S[0].trace;return tc.traceIs(E,"pie-like")?p.indexOf(S[0].label)!==-1?.5:1:E.visible==="legendonly"?.5:1}).each(function(){Rn.select(this).call(Eve,e,t)}).call(qve,e,t).each(function(){l||Rn.select(this).call(Dve,e,n)}),na.syncOrAsync([m5.previousPromises,function(){return Fve(e,k,M,t)},function(){var S=a._size,E=t.borderwidth,P=t.xref==="paper",R=t.yref==="paper";if(w.text&&Cve(x,t,E),!l){var D,z;P?D=S.l+S.w*t.x-rc[V1(t)]*t._width:D=a.width*t.x-rc[V1(t)]*t._width,R?z=S.t+S.h*(1-t.y)-rc[W1(t)]*t._effHeight:z=a.height*(1-t.y)-rc[W1(t)]*t._effHeight;var O=Nve(e,n,D,z);if(O)return;if(a.margin.autoexpand){var H=D,V=z;D=P?na.constrain(D,0,a.width-t._width):H,z=R?na.constrain(z,0,a.height-t._effHeight):V,D!==H&&na.log("Constrain "+n+".x to make legend fit inside graph"),z!==V&&na.log("Constrain "+n+".y to make legend fit inside graph")}ia.setTranslate(m,D,z)}if(T.on(".drag",null),m.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var G=t._effHeight;l&&(G=t._height),_.attr({width:t._width-E,height:G-E,x:E/2,y:E/2}),ia.setTranslate(b,0,0),y.select("rect").attr({width:t._width-2*E,height:G-2*E,x:E,y:E}),ia.setClipUrl(b,i,e),ia.setRect(T,0,0,0,0),delete t._scrollY}else{var B=Math.max(ha.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),Y=t._effHeight-B-2*ha.scrollBarMargin,X=t._height-t._effHeight,Z=Y/X,te=Math.min(t._scrollY||0,X);_.attr({width:t._width-2*E+ha.scrollBarWidth+ha.scrollBarMargin,height:t._effHeight-E,x:E/2,y:E/2}),y.select("rect").attr({width:t._width-2*E+ha.scrollBarWidth+ha.scrollBarMargin,height:t._effHeight-2*E,x:E,y:E+te}),ia.setClipUrl(b,i,e),ue(te,B,Z),m.on("wheel",function(){te=na.constrain(t._scrollY+Rn.event.deltaY/Y*X,0,X),ue(te,B,Z),te!==0&&te!==X&&Rn.event.preventDefault()});var fe,le,ie,K=function(pe,me,we){var Ne=(we-me)/Z+pe;return na.constrain(Ne,0,X)},he=function(pe,me,we){var Ne=(me-we)/Z+pe;return na.constrain(Ne,0,X)},oe=Rn.behavior.drag().on("dragstart",function(){var pe=Rn.event.sourceEvent;pe.type==="touchstart"?fe=pe.changedTouches[0].clientY:fe=pe.clientY,ie=te}).on("drag",function(){var pe=Rn.event.sourceEvent;pe.buttons===2||pe.ctrlKey||(pe.type==="touchmove"?le=pe.changedTouches[0].clientY:le=pe.clientY,te=K(ie,fe,le),ue(te,B,Z))});T.call(oe);var ye=Rn.behavior.drag().on("dragstart",function(){var pe=Rn.event.sourceEvent;pe.type==="touchstart"&&(fe=pe.changedTouches[0].clientY,ie=te)}).on("drag",function(){var pe=Rn.event.sourceEvent;pe.type==="touchmove"&&(le=pe.changedTouches[0].clientY,te=he(ie,fe,le),ue(te,B,Z))});b.call(ye)}function ue(pe,me,we){t._scrollY=e._fullLayout[n]._scrollY=pe,ia.setTranslate(b,0,-pe),ia.setRect(T,t._width,ha.scrollBarMargin+pe*we,ha.scrollBarWidth,me),y.select("rect").attr("y",E+pe)}if(e._context.edits.legendPosition){var de,W,Q,j;m.classed("cursor-move",!0),y5.init({element:m.node(),gd:e,prepFn:function(pe){if(pe.target!==T.node()){var me=ia.getTranslate(m);Q=me.x,j=me.y}},moveFn:function(pe,me){if(Q!==void 0&&j!==void 0){var we=Q+pe,Ne=j+me;ia.setTranslate(m,we,Ne),de=y5.align(we,t._width,S.l,S.l+S.w,t.xanchor),W=y5.align(Ne+t._height,-t._height,S.t+S.h,S.t,t.yanchor)}},doneFn:function(){if(de!==void 0&&W!==void 0){var pe={};pe[n+".x"]=de,pe[n+".y"]=W,tc.call("_guiRelayout",e,pe)}},clickFn:function(pe,me){var we=o.selectAll("g.traces").filter(function(){var Ne=this.getBoundingClientRect();return me.clientX>=Ne.left&&me.clientX<=Ne.right&&me.clientY>=Ne.top&&me.clientY<=Ne.bottom});we.size()>0&&KE(e,m,we,pe,me)}})}}],e)}}function U1(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,o=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*o:t+(o||n)}function KE(e,r,t,a,n){var i=t.data()[0][0].trace,o={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(o.group=i._group),tc.traceIs(i,"pie-like")&&(o.label=t.datum()[0].label);var l=YE.triggerHandler(e,"plotly_legendclick",o);if(a===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&VE(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=YE.triggerHandler(e,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&VE(t,e,a)}}function Eve(e,r,t){var a=j1(t),n=e.data()[0][0],i=n.trace,o=tc.traceIs(i,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!o,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=o?n.label:i.name,i._meta&&(u=na.templateString(u,i._meta))));var c=na.ensureSingle(e,"text",a+"text");c.attr("text-anchor","start").call(ia.font,f).text(l?JE(u,s):u);var v=t.indentation+t.itemwidth+ha.itemGap*2;yu.positionText(c,v,0),l?c.call(yu.makeEditable,{gd:r,text:u}).call(Y1,e,r,t).on("edit",function(d){this.text(JE(d,s)).call(Y1,e,r,t);var p=n.trace._fullInput||{},m={};return m.name=d,p._isShape?tc.call("_guiRelayout",r,"shapes["+i.index+"].name",m.name):tc.call("_guiRestyle",r,m,i.index)}):Y1(c,e,r,t)}function JE(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function Dve(e,r,t){var a=r._context.doubleClickDelay,n,i=1,o=na.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(G1.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),KE(r,l,e,i,Rn.event)}}))}function Y1(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),yu.convertToTspans(e,t,function(){Pve(r,t,a,n)})}function Pve(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),o=i.node(),l=j1(t);t||(t=r._fullLayout[l]);var s=t.borderwidth,u;a===ec?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*$E,c,v;if(o){var d=ia.bBox(o);c=d.height,v=d.width,a===ec?ia.setTranslate(i,s,s+c*.75):ia.setTranslate(i,0,c*.25)}else{var p="."+l+(a===ec?"title":"")+"text",m=e.select(p),y=yu.lineCount(m),_=m.node();if(c=f*y,v=_?ia.bBox(_).width:0,a===ec)t.title.side==="left"&&(v+=ha.itemGap*2),yu.positionText(m,s+ha.titlePad,s+f);else{var b=ha.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(b=ha.itemGap,v-=t.indentation+t.itemwidth),yu.positionText(m,b,-f*((y-1)/2-.3))}}a===ec?(t._titleWidth=v,t._titleHeight=c):(n.lineHeight=f,n.height=Math.max(c,16)+3,n.width=v)}function Rve(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function Fve(e,r,t,a){var n=e._fullLayout,i=j1(a);a||(a=n[i]);var o=n._size,l=ZE.isVertical(a),s=ZE.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,v=ha.itemGap,d=a.indentation+a.itemwidth+v*2,p=2*(f+v),m=W1(a),y=a.y<0||a.y===0&&m==="top",_=a.y>1||a.y===1&&m==="bottom",b=a.tracegroupgap,w={};a._maxHeight=Math.max(y||_?n.height/2:o.h,30);var x=0;a._width=0,a._height=0;var T=Rve(a);if(l)t.each(function(ie){var K=ie[0].height;ia.setTranslate(this,f+T[0],f+T[1]+a._height+K/2+v),a._height+=K,a._width=Math.max(a._width,ie[0].width)}),x=d+a._width,a._width+=v+d+c,a._height+=p,s&&(r.each(function(ie,K){ia.setTranslate(this,0,K*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var k=V1(a),M=a.x<0||a.x===0&&k==="right",S=a.x>1||a.x===1&&k==="left",E=_||y,P=n.width/2;a._maxWidth=Math.max(M?E&&k==="left"?o.l+o.w:P:S?E&&k==="right"?o.r+o.w:P:o.w,2*d);var R=0,D=0;t.each(function(ie){var K=U1(ie,a,d);R=Math.max(R,K),D+=K}),x=null;var z=0;if(s){var O=0,H=0,V=0;r.each(function(){var ie=0,K=0;Rn.select(this).selectAll("g.traces").each(function(oe){var ye=U1(oe,a,d),ue=oe[0].height;ia.setTranslate(this,T[0],T[1]+f+v+ue/2+K),K+=ue,ie=Math.max(ie,ye),w[oe[0].trace.legendgroup]=ie});var he=ie+v;H>0&&he+f+H>a._maxWidth?(z=Math.max(z,H),H=0,V+=O+b,O=K):O=Math.max(O,K),ia.setTranslate(this,H,V),H+=he}),a._width=Math.max(z,H)+f,a._height=V+O+p}else{var G=t.size(),B=D+c+(G-1)*v=a._maxWidth&&(z=Math.max(z,te),X=0,Z+=Y,a._height+=Y,Y=0),ia.setTranslate(this,T[0]+f+X,T[1]+f+Z+K/2+v),te=X+he+v,X+=oe,Y=Math.max(Y,K)}),B?(a._width=X+c,a._height=Y+p):(a._width=Math.max(z,te)+c,a._height+=Y+p)}}a._width=Math.ceil(Math.max(a._width+T[0],a._titleWidth+2*(f+ha.titlePad))),a._height=Math.ceil(Math.max(a._height+T[1],a._titleHeight+2*(f+ha.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var fe=e._context.edits,le=fe.legendText||fe.legendPosition;t.each(function(ie){var K=Rn.select(this).select("."+i+"toggle"),he=ie[0].height,oe=ie[0].trace.legendgroup,ye=U1(ie,a,d);s&&oe!==""&&(ye=w[oe]);var ue=le?d:x||ye;!l&&!u&&(ue+=v/2),ia.setRect(K,0,-he/2,ue,he)})}function Nve(e,r,t,a){var n=e._fullLayout,i=n[r],o=V1(i),l=W1(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",c=i.x<.5?"l":"r",v={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return m5.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*rc[o],r:i._width*WE[o],b:i._effHeight*WE[l],t:i._effHeight*rc[l]});s?e._fullLayout._reservedMargin[r][f]=v[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][c]=v[c]:e._fullLayout._reservedMargin[r][f]=v[f]}function V1(e){return na.isRightAnchor(e)?"right":na.isCenterAnchor(e)?"center":"left"}function W1(e){return na.isBottomAnchor(e)?"bottom":na.isMiddleAnchor(e)?"middle":"top"}function j1(e){return e._id||"legend"}});var T5=N(w5=>{"use strict";var mu=Sr(),cl=Pr(),eD=Sn(),Gt=Ee(),zve=Gt.pushUnique,x5=Gt.strTranslate,Ive=Gt.strRotate,Ove=eh(),mi=Ea(),Bve=TE(),Po=jr(),Ta=Tr(),Z1=pi(),Ro=Or(),Hve=Ca().zindexSeparator,nc=gr(),to=qo(),gu=Yv(),Uve=l5(),Gve=b5(),sD=gu.YANGLE,_5=Math.PI*sD/180,Yve=1/Math.sin(_5),Vve=Math.cos(_5),Wve=Math.sin(_5),Nt=gu.HOVERARROWSIZE,Yr=gu.HOVERTEXTPAD,rD={box:!0,ohlc:!0,violin:!0,candlestick:!0},jve={scatter:!0,scattergl:!0,splom:!0};function tD(e,r){return e.distance-r.distance}w5.hover=function(r,t,a,n){r=Gt.getGraphDiv(r);var i=t.target;Gt.throttle(r._fullLayout._uid+gu.HOVERID,gu.HOVERMINTIME,function(){Zve(r,t,a,n,i)})};w5.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=hD(n),o=dD(n),l=r.map(function(y){var _=y._x0||y.x0||y.x||0,b=y._x1||y.x1||y.x||0,w=y._y0||y.y0||y.y||0,x=y._y1||y.y1||y.y||0,T=y.eventData;if(T){var k=Math.min(_,b),M=Math.max(_,b),S=Math.min(w,x),E=Math.max(w,x),P=y.trace;if(nc.traceIs(P,"gl3d")){var R=n._fullLayout[P.scene]._scene.container,D=R.offsetLeft,z=R.offsetTop;k+=D,M+=D,S+=z,E+=z}T.bbox={x0:k+o,x1:M+o,y0:S+i,y1:E+i},t.inOut_bbox&&t.inOut_bbox.push(T.bbox)}else T=!1;return{color:y.color||Ta.defaultLine,x0:y.x0||y.x||0,x1:y.x1||y.x||0,y0:y.y0||y.y||0,y1:y.y1||y.y||0,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:y.text,name:y.name,idealAlign:y.idealAlign,borderColor:y.borderColor,fontFamily:y.fontFamily,fontSize:y.fontSize,fontColor:y.fontColor,fontWeight:y.fontWeight,fontStyle:y.fontStyle,fontVariant:y.fontVariant,nameLength:y.nameLength,textAlign:y.textAlign,trace:y.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:y.hovertemplate||!1,hovertemplateLabels:y.hovertemplateLabels||!1,eventData:T}}),s=!1,u=fD(l,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||Ta.background,container:mu.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,c=5,v=0,d=0;f.sort(function(y,_){return y.y0-_.y0}).each(function(y,_){var b=y.y0-y.by/2;b-cM[0]._length||j<0||j>S[0]._length)return Z1.unhoverRaw(e,r)}if(r.pointerX=Q+M[0]._offset,r.pointerY=j+S[0]._offset,"xval"in r?V=to.flat(i,r.xval):V=to.p2c(M,Q),"yval"in r?G=to.flat(i,r.yval):G=to.p2c(S,j),!cl(V[0])||!cl(G[0]))return Gt.warn("Fx.hover failed",r,e),Z1.unhoverRaw(e,r)}var we=1/0;function Ne(br,pt){for(Y=0;Yoe&&(O.splice(0,oe),we=O[0].distance),c&&z!==0&&O.length===0){he.distance=z,he.index=!1;var ct=Z._module.hoverPoints(he,ie,K,"closest",{hoverLayer:l._hoverlayer});if(ct&&(ct=ct.filter(function(ut){return ut.spikeDistance<=z})),ct&&ct.length){var ba,Zt=ct.filter(function(ut){return ut.xa.showspikes&&ut.xa.spikesnap!=="hovered data"});if(Zt.length){var tn=Zt[0];cl(tn.x0)&&cl(tn.y0)&&(ba=Re(tn),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>ba.spikeDistance)&&(ye.vLinePoint=ba))}var Tn=ct.filter(function(ut){return ut.ya.showspikes&&ut.ya.spikesnap!=="hovered data"});if(Tn.length){var Xt=Tn[0];cl(Xt.x0)&&cl(Xt.y0)&&(ba=Re(Xt),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>ba.spikeDistance)&&(ye.hLinePoint=ba))}}}}}Ne();function Fe(br,pt,Nr){for(var st=null,Pt=1/0,Qr,ct=0;ct0&&Math.abs(br.distance)Ce-1;lr--)cr(O[lr]);O=Ye,Pe()}var Oe=e._hoverdata,ne=[],ve=hD(e),De=dD(e);for(B=0;B1||O.length>1)||v==="closest"&&ue&&O.length>1,ja=Ta.combine(l.plot_bgcolor||Ta.background,l.paper_bgcolor),ga=fD(O,{gd:e,hovermode:v,rotateLabels:St,bgColor:ja,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),jt=ga.hoverLabels;if(to.isUnifiedHover(v)||(Jve(jt,St,l,ga.commonLabelBoundingBox),vD(jt,St,l._invScaleX,l._invScaleY)),n&&n.tagName){var Na=nc.getComponentMethod("annotations","hasClickToShow")(e,ne);Bve(mu.select(n),Na?"pointer":"")}!n||a||!Qve(e,r,Oe)||(Oe&&e.emit("plotly_unhover",{event:r,points:Oe}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:M,yaxes:S,xvals:V,yvals:G}))}function uD(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 Xve=/([\s\S]*)<\/extra>/;function fD(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,o=r.bgColor,l=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||gu.HOVERFONT,c=r.fontSize||gu.HOVERFONTSIZE,v=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,p=r.fontVariant||a.font.variant,m=r.fontTextcase||a.font.textcase,y=r.fontLineposition||a.font.lineposition,_=r.fontShadow||a.font.shadow,b=e[0],w=b.xa,x=b.ya,T=n.charAt(0),k=T+"Label",M=b[k];if(M===void 0&&w.type==="multicategory")for(var S=0;Sa.width-Oe&&(ne=a.width-Oe),ir.attr("d","M"+($e-ne)+",0L"+($e-ne+Nt)+","+lr+Nt+"H"+Oe+"v"+lr+(Yr*2+He.height)+"H"+-Oe+"V"+lr+Nt+"H"+($e-ne-Nt)+"Z"),$e=ne,Y.minX=$e-Oe,Y.maxX=$e+Oe,w.side==="top"?(Y.minY=cr-(Yr*2+He.height),Y.maxY=cr-Yr):(Y.minY=cr+Yr,Y.maxY=cr+(Yr*2+He.height))}else{var ve,De,qe;x.side==="right"?(ve="start",De=1,qe="",$e=w._offset+w._length):(ve="end",De=-1,qe="-",$e=w._offset),cr=x._offset+(b.y0+b.y1)/2,Qe.attr("text-anchor",ve),ir.attr("d","M0,0L"+qe+Nt+","+Nt+"V"+(Yr+He.height/2)+"h"+qe+(Yr*2+He.width)+"V-"+(Yr+He.height/2)+"H"+qe+Nt+"V-"+Nt+"Z"),Y.minY=cr-(Yr+He.height/2),Y.maxY=cr+(Yr+He.height/2),x.side==="right"?(Y.minX=$e+Nt,Y.maxX=$e+Nt+(Yr*2+He.width)):(Y.minX=$e-Nt-(Yr*2+He.width),Y.maxX=$e-Nt);var ar=He.height/2,hr=P-He.top-ar,ur="clip"+a._uid+"commonlabel"+x._id,Ar;if($e=0?Ue=Be:ze+j=0?Ue=ze:Pe+j=0?se=Re:Ie+pe=0?se=Ie:Xe+pe=0,(Se.idealAlign==="top"||!zr)&&Et?(qe-=hr/2,Se.anchor="end"):zr?(qe+=hr/2,Se.anchor="start"):Se.anchor="middle",Se.crossPos=qe;else{if(Se.pos=qe,zr=De+ar/2+Vr<=R,Et=De-ar/2-Vr>=0,(Se.idealAlign==="left"||!zr)&&Et)De-=ar/2,Se.anchor="end";else if(zr)De+=ar/2,Se.anchor="start";else{Se.anchor="middle";var Dt=Vr/2,ma=De+Dt-R,St=De-Dt;ma>0&&(De-=ma),St<0&&(De+=-St)}Se.crossPos=De}cr.attr("text-anchor",Se.anchor),Oe&&lr.attr("text-anchor",Se.anchor),ir.attr("transform",x5(De,qe)+(i?Ive(sD):""))}),{hoverLabels:Te,commonLabelBoundingBox:Y}}function aD(e,r,t,a,n,i){var o="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Gt.templateString(e.name,e.trace._meta)),o=oD(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?l=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),i&&l===""&&!e.hovertemplate&&(o===""&&i.remove(),l=o);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(c[s+"other"]=c[s+"Val"],c[s+"otherLabel"]=c[s+"Label"]),l=Gt.hovertemplateString(f,c,a._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(Xve,function(v,d){return o=oD(d,e.nameLength),""})}return[l,o]}function Jve(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",o=0,l=1,s=e.size(),u=new Array(s),f=0,c=a.minX,v=a.maxX,d=a.minY,p=a.maxY,m=function(V){return V*t._invScaleX},y=function(V){return V*t._invScaleY};e.each(function(V){var G=V[n],B=V[i],Y=G._id.charAt(0)==="x",X=G.range;f===0&&X&&X[0]>X[1]!==Y&&(l=-1);var Z=0,te=Y?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var fe=cD(V,r),le=V.anchor,ie=le==="end"?-1:1,K,he;if(le==="middle")K=V.crossPos+(Y?y(fe.y-V.by/2):m(V.bx/2+V.tx2width/2)),he=K+(Y?y(V.by):m(V.bx));else if(Y)K=V.crossPos+y(Nt+fe.y)-y(V.by/2-Nt),he=K+y(V.by);else{var oe=m(ie*Nt+fe.x),ye=oe+m(ie*V.bx);K=V.crossPos+Math.min(oe,ye),he=V.crossPos+Math.max(oe,ye)}Y?d!==void 0&&p!==void 0&&Math.min(he,p)-Math.max(K,d)>1&&(B.side==="left"?(Z=B._mainLinePosition,te=t.width):te=B._mainLinePosition):c!==void 0&&v!==void 0&&Math.min(he,v)-Math.max(K,c)>1&&(B.side==="top"?(Z=B._mainLinePosition,te=t.height):te=B._mainLinePosition)}u[f++]=[{datum:V,traceIndex:V.trace.index,dp:0,pos:V.pos,posref:V.posref,size:V.by*(Y?Yve:1)/2,pmin:Z,pmax:te}]}),u.sort(function(V,G){return V[0].posref-G[0].posref||l*(G[0].traceIndex-V[0].traceIndex)});var _,b,w,x,T,k,M;function S(V){var G=V[0],B=V[V.length-1];if(b=G.pmin-G.pos-G.dp+G.size,w=B.pos+B.dp+B.size-G.pmax,b>.01){for(T=V.length-1;T>=0;T--)V[T].dp+=b;_=!1}if(!(w<.01)){if(b<-.01){for(T=V.length-1;T>=0;T--)V[T].dp-=w;_=!1}if(_){var Y=0;for(x=0;xG.pmax&&Y++;for(x=V.length-1;x>=0&&!(Y<=0);x--)k=V[x],k.pos>G.pmax-1&&(k.del=!0,Y--);for(x=0;x=0;T--)V[T].dp-=w;for(x=V.length-1;x>=0&&!(Y<=0);x--)k=V[x],k.pos+k.dp+k.size>G.pmax&&(k.del=!0,Y--)}}}for(;!_&&o<=s;){for(o++,_=!0,x=0;x.01){for(T=P.length-1;T>=0;T--)P[T].dp+=b;for(E.push.apply(E,P),u.splice(x+1,1),M=0,T=E.length-1;T>=0;T--)M+=E[T].dp;for(w=M/E.length,T=E.length-1;T>=0;T--)E[T].dp-=w;_=!1}else x++}u.forEach(S)}for(x=u.length-1;x>=0;x--){var z=u[x];for(T=z.length-1;T>=0;T--){var O=z[T],H=O.datum;H.offset=O.dp,H.del=O.del}}}function cD(e,r){var t=0,a=e.offset;return r&&(a*=-Wve,t=e.offset*Vve),{x:t,y:a}}function $ve(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Nt+Yr),a=t+r*(e.txwidth+Yr),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Yr),{alignShift:r,textShiftX:t,text2ShiftX:a}}function vD(e,r,t,a){var n=function(o){return o*t},i=function(o){return o*a};e.each(function(o){var l=mu.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),u=o.anchor,f=u==="end"?-1:1,c=$ve(o),v=cD(o,r),d=v.x,p=v.y,m=u==="middle";l.select("path").attr("d",m?"M-"+n(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+n(o.bx)+"v"+i(o.by)+"h-"+n(o.bx)+"Z":"M0,0L"+n(f*Nt+d)+","+i(Nt+p)+"v"+i(o.by/2-Nt)+"h"+n(f*o.bx)+"v-"+i(o.by)+"H"+n(f*Nt+d)+"V"+i(p-Nt)+"Z");var y=d+c.textShiftX,_=p+o.ty0-o.by/2+Yr,b=o.textAlign||"auto";b!=="auto"&&(b==="left"&&u!=="start"?(s.attr("text-anchor","start"),y=m?-o.bx/2-o.tx2width/2+Yr:-o.bx-Yr):b==="right"&&u!=="end"&&(s.attr("text-anchor","end"),y=m?o.bx/2-o.tx2width/2-Yr:o.bx+Yr)),s.call(mi.positionText,n(y),i(_)),o.tx2width&&(l.select("text.name").call(mi.positionText,n(c.text2ShiftX+c.alignShift*Yr+d),i(p+o.ty0-o.by/2+Yr)),l.select("rect").call(Po.setRect,n(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),i(p-o.by/2-1),n(o.tx2width),i(o.by+2)))})}function Kve(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function o(v){return v||cl(v)&&v===0}var l=Array.isArray(t)?function(v,d){var p=Gt.castOption(n,t,v);return o(p)?p:Gt.extractOption({},a,"",d)}:function(v,d){return Gt.extractOption(i,a,v,d)};function s(v,d,p){var m=l(d,p);o(m)&&(e[v]=m)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Gt.constrain(e.x0,0,e.xa._length),e.x1=Gt.constrain(e.x1,0,e.xa._length),e.y0=Gt.constrain(e.y0,0,e.ya._length),e.y1=Gt.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Ro.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Ro.hoverLabelText(e.ya,e.yLabelVal,a.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=Ro.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Ro.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Ro.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Ro.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function nD(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,o=t.event,l=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||l)){var c=Ta.combine(n.plot_bgcolor,n.paper_bgcolor);if(l){var v=r.hLinePoint,d,p;u=v&&v.xa,f=v&&v.ya;var m=f.spikesnap;m==="cursor"?(d=o.pointerX,p=o.pointerY):(d=u._offset+v.x,p=f._offset+v.y);var y=eD.readability(v.color,c)<1.5?Ta.contrast(c):v.color,_=f.spikemode,b=f.spikethickness,w=f.spikecolor||y,x=Ro.getPxPosition(e,f),T,k;if(_.indexOf("toaxis")!==-1||_.indexOf("across")!==-1){if(_.indexOf("toaxis")!==-1&&(T=x,k=d),_.indexOf("across")!==-1){var M=f._counterDomainMin,S=f._counterDomainMax;f.anchor==="free"&&(M=Math.min(M,f.position),S=Math.max(S,f.position)),T=i.l+M*i.w,k=i.l+S*i.w}a.insert("line",":first-child").attr({x1:T,x2:k,y1:p,y2:p,"stroke-width":b,stroke:w,"stroke-dasharray":Po.dashStyle(f.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:T,x2:k,y1:p,y2:p,"stroke-width":b+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}_.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:x+(f.side!=="right"?b:-b),cy:p,r:b,fill:w}).classed("spikeline",!0)}if(s){var E=r.vLinePoint,P,R;u=E&&E.xa,f=E&&E.ya;var D=u.spikesnap;D==="cursor"?(P=o.pointerX,R=o.pointerY):(P=u._offset+E.x,R=f._offset+E.y);var z=eD.readability(E.color,c)<1.5?Ta.contrast(c):E.color,O=u.spikemode,H=u.spikethickness,V=u.spikecolor||z,G=Ro.getPxPosition(e,u),B,Y;if(O.indexOf("toaxis")!==-1||O.indexOf("across")!==-1){if(O.indexOf("toaxis")!==-1&&(B=G,Y=R),O.indexOf("across")!==-1){var X=u._counterDomainMin,Z=u._counterDomainMax;u.anchor==="free"&&(X=Math.min(X,u.position),Z=Math.max(Z,u.position)),B=i.t+(1-Z)*i.h,Y=i.t+(1-X)*i.h}a.insert("line",":first-child").attr({x1:P,x2:P,y1:B,y2:Y,"stroke-width":H,stroke:V,"stroke-dasharray":Po.dashStyle(u.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:P,x2:P,y1:B,y2:Y,"stroke-width":H+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}O.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:P,cy:G-(u.side!=="top"?H:-H),r:H,fill:V}).classed("spikeline",!0)}}}function Qve(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function iD(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function oD(e,r){return mi.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function ehe(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],o=0;o{"use strict";var rhe=Ee(),the=Tr(),ahe=qo().isUnifiedHover;pD.exports=function(r,t,a,n){n=n||{};var i=t.legend;function o(l){n.font[l]||(n.font[l]=i?t.legend.font[l]:t.font[l])}t&&ahe(t.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(n.bgcolor||(n.bgcolor=the.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),rhe.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var mD=N((tDe,yD)=>{"use strict";var nhe=Ee(),ihe=X1(),ohe=Tf();yD.exports=function(r,t){function a(n,i){return nhe.coerce(r,t,ohe,n,i)}ihe(r,t,a)}});var xD=N((aDe,bD)=>{"use strict";var gD=Ee(),lhe=dp(),she=X1();bD.exports=function(r,t,a,n){function i(l,s){return gD.coerce(r,t,lhe,l,s)}var o=gD.extendFlat({},n.hoverlabel);t.hovertemplate&&(o.namelength=-1),she(r,t,i,o)}});var A5=N((nDe,_D)=>{"use strict";var uhe=Ee(),fhe=Tf();_D.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:uhe.coerce(r,t,fhe,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var AD=N((iDe,TD)=>{"use strict";var wD=Ee(),che=Tf(),vhe=A5(),hhe=X1();TD.exports=function(r,t){function a(f,c){return wD.coerce(r,t,che,f,c)}var n=vhe(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var o=t._has("mapbox"),l=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((o||l||s)&&u===1||(o||l)&&s&&u===2)&&(t.dragmode="pan"),hhe(r,t,a),wD.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var SD=N((oDe,kD)=>{"use strict";var M5=Ee(),MD=gr();kD.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return M5.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var phe=gr(),yhe=T5().hover;qD.exports=function(r,t,a){var n=phe.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&yhe(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var Fn=N((sDe,DD)=>{"use strict";var mhe=Sr(),J1=Ee(),ghe=pi(),bh=qo(),CD=Tf(),ED=T5();DD.exports={moduleType:"component",name:"fx",constants:Yv(),schema:{layout:CD},attributes:dp(),layoutAttributes:CD,supplyLayoutGlobalDefaults:mD(),supplyDefaults:xD(),supplyLayoutDefaults:AD(),calc:SD(),getDistanceFunction:bh.getDistanceFunction,getClosest:bh.getClosest,inbox:bh.inbox,quadrature:bh.quadrature,appendArrayPointValue:bh.appendArrayPointValue,castHoverOption:xhe,castHoverinfo:_he,hover:ED.hover,unhover:ghe.unhover,loneHover:ED.loneHover,loneUnhover:bhe,click:LD()};function bhe(e){var r=J1.isD3Selection(e)?e:mhe.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function xhe(e,r,t){return J1.castOption(e,r,"hoverlabel."+t)}function _he(e,r,t){function a(n){return J1.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return J1.castOption(e,t,"hoverinfo",a)}});var bu=N(vl=>{"use strict";vl.selectMode=function(e){return e==="lasso"||e==="select"};vl.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};vl.openMode=function(e){return e==="drawline"||e==="drawopenpath"};vl.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};vl.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};vl.selectingOrDrawing=function(e){return vl.freeMode(e)||vl.rectMode(e)}});var $1=N((fDe,PD)=>{"use strict";PD.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var K1=N((cDe,RD)=>{"use strict";RD.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 ey=N((vDe,FD)=>{"use strict";var Q1=32;FD.exports={CIRCLE_SIDES:Q1,i000:0,i090:Q1/4,i180:Q1/2,i270:Q1/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var ry=N((hDe,zD)=>{"use strict";var whe=Ee().strTranslate;function ND(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function The(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function Ahe(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return ND(e,t[r])}}function Mhe(e){return whe(e.xaxis._offset,e.yaxis._offset)}zD.exports={p2r:ND,r2p:The,axValue:Ahe,getTransform:Mhe}});var ts=N(hl=>{"use strict";var khe=dx(),BD=ey(),ic=BD.CIRCLE_SIDES,k5=BD.SQRT2,HD=ry(),ID=HD.p2r,OD=HD.r2p,She=[0,3,4,5,6,1,2],qhe=[0,3,4,1,2];hl.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var WD=bu(),Lhe=WD.drawMode,Che=WD.openMode,oc=ey(),UD=oc.i000,GD=oc.i090,YD=oc.i180,VD=oc.i270,Ehe=oc.cos45,Dhe=oc.sin45,jD=ry(),ay=jD.p2r,as=jD.r2p,Phe=Zl(),Rhe=Phe.clearOutline,ny=ts(),Fhe=ny.readPaths,Nhe=ny.writePaths,zhe=ny.ellipseOver,Ihe=ny.fixDatesForPaths;function Ohe(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,o=(a.layout||{}).shapes||[];if(!Lhe(i)&&n!==void 0){var l=a._fullLayout._activeShapeIndex;if(l{"use strict";var Bhe=bu(),Hhe=Bhe.selectMode,Uhe=Zl(),Ghe=Uhe.clearOutline,S5=ts(),Yhe=S5.readPaths,Vhe=S5.writePaths,Whe=S5.fixDatesForPaths;JD.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,o=i._fullLayout.newselection,l=t.plotinfo,s=l.xaxis,u=l.yaxis,f=t.isActiveSelection,c=t.dragmode,v=(i.layout||{}).selections||[];if(!Hhe(c)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";$D.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 ns=N(Da=>{"use strict";var xu=_h(),KD=Ee(),oy=Or();Da.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};Da.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};Da.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};Da.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};Da.extractPathCoords=function(e,r,t){var a=[],n=e.match(xu.segmentRE);return n.forEach(function(i){var o=r[i.charAt(0)].drawn;if(o!==void 0){var l=i.substr(1).match(xu.paramRE);if(!(!l||l.lengthd&&(m="X"),m});return u>d&&(p=p.replace(/[\s,]*X.*/,""),KD.log("Ignoring extra params in segment "+s)),f+p})}function wh(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var C5=N((bDe,tP)=>{"use strict";var Zhe=Ee(),lc=Or(),QD=Ea(),eP=jr(),Xhe=ts().readPaths,L5=ns(),Jhe=L5.getPathString,rP=Ap(),$he=Xa().FROM_TL;tP.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var o={};if(a.type!=="path"){var l=lc.getFromId(r,a.xref),s=lc.getFromId(r,a.yref);for(var u in rP){var f=rP[u](a,l,s);f!==void 0&&(o[u]=f)}}i=Zhe.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,o)}else i=a.label.text;var c={"data-index":t},v=a.label.font,d={"data-notex":1},p=n.append("g").attr(c).classed("shape-label",!0),m=p.append("text").attr(d).classed("shape-label-text",!0).text(i),y,_,b,w;if(a.path){var x=Jhe(r,a),T=Xhe(x,r);y=1/0,b=1/0,_=-1/0,w=-1/0;for(var k=0;k=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function Qhe(e,r,t,a,n,i,o){var l=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,c=Math.PI/180*i,v=Math.sin(c),d=Math.cos(c),p=n.label.xanchor,m=n.label.yanchor,y,_,b,w;if(f==="line"){l==="start"?(y=e,_=r):l==="end"?(y=t,_=a):(y=(e+t)/2,_=(r+a)/2),p==="auto"&&(l==="start"?s==="auto"?t>e?p="left":te?p="right":te?p="right":te?p="left":t{"use strict";var e0e=Ee(),r0e=e0e.strTranslate,aP=pi(),oP=bu(),t0e=oP.drawMode,lP=oP.selectMode,sP=gr(),nP=Tr(),sy=ey(),a0e=sy.i000,n0e=sy.i090,i0e=sy.i180,o0e=sy.i270,l0e=Zl(),uP=l0e.clearOutlineControllers,D5=ts(),ly=D5.pointsOnRectangle,E5=D5.pointsOnEllipse,s0e=D5.writePaths,u0e=iy().newShapes,f0e=iy().createShapeObj,c0e=q5(),v0e=C5();fP.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function o(){e(r,t,a,n++),(E5(r[0])||a.hasText)&&l({redrawing:!0})}function l(G){var B={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,B=u0e(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,B=c0e(t,a),i._fullLayout._reselect=!0),Object.keys(B).length&&sP.call((G||{}).redrawing?"relayout":"_guiRelayout",i,B)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,c=t0e(f),v=lP(f);(c||v)&&(i._fullLayout._outlining=!0),uP(i),t.attr("d",s0e(r));var d,p,m,y,_;if(!n&&(a.isActiveShape||a.isActiveSelection)){_=h0e([],r);var b=u.append("g").attr("class","outline-controllers");P(b),V()}if(c&&a.hasText){var w=u.select(".label-temp"),x=f0e(t,a,a.dragmode);v0e(i,"label-temp",x,w)}function T(G){m=+G.srcElement.getAttribute("data-i"),y=+G.srcElement.getAttribute("data-j"),d[m][y].moveFn=k}function k(G,B){if(r.length){var Y=_[m][y][1],X=_[m][y][2],Z=r[m],te=Z.length;if(ly(Z)){var fe=G,le=B;if(a.isActiveSelection){var ie=iP(Z,y);ie[1]===Z[y][1]?le=0:fe=0}for(var K=0;K1&&!(G.length===2&&G[1][0]==="Z")&&(y===0&&(G[0][0]="M"),r[m]=G,o(),l())}}function E(G,B){if(G===2){m=+B.srcElement.getAttribute("data-i"),y=+B.srcElement.getAttribute("data-j");var Y=r[m];!ly(Y)&&!E5(Y)&&S()}}function P(G){d=[];for(var B=0;B{"use strict";var p0e=Sr(),yP=gr(),cP=Ee(),sc=Or(),y0e=ts().readPaths,m0e=uy(),cy=C5(),mP=Zl().clearOutlineControllers,P5=Tr(),F5=jr(),g0e=_t().arrayEditor,vP=pi(),hP=rs(),_u=_h(),Nn=ns(),R5=Nn.getPathString;xP.exports={draw:N5,drawOne:gP,eraseActiveShape:_0e,drawLabel:cy};function N5(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;no&&Be>l&&!Fe.shiftKey?vP.getCursor(ze/Ie,1-Pe/Be):"move";hP(r,Xe),he=Xe.split("-")[0]}}function de(Fe){fy(e)||(s&&(_=Z(t.xanchor)),u&&(b=te(t.yanchor)),t.type==="path"?R=t.path:(d=s?t.x0:Z(t.x0),p=u?t.y0:te(t.y0),m=s?t.x1:Z(t.x1),y=u?t.y1:te(t.y1)),dy?(w=p,M="y0",x=y,S="y1"):(w=y,M="y1",x=p,S="y0"),ue(Fe),me(n,t),Ne(r,t,e),K.moveFn=he==="move"?j:pe,K.altKey=Fe.altKey)}function W(){fy(e)||(hP(r),we(n),bP(r,e,t),yP.call("_guiRelayout",e,i.getUpdateObj()))}function Q(){fy(e)||we(n)}function j(Fe,Re){if(t.type==="path"){var Ie=function(Pe){return Pe},Be=Ie,ze=Ie;s?v("xanchor",t.xanchor=fe(_+Fe)):(Be=function(Xe){return fe(Z(Xe)+Fe)},z&&z.type==="date"&&(Be=Nn.encodeDate(Be))),u?v("yanchor",t.yanchor=le(b+Re)):(ze=function(Xe){return le(te(Xe)+Re)},H&&H.type==="date"&&(ze=Nn.encodeDate(ze))),v("path",t.path=dP(R,Be,ze))}else s?v("xanchor",t.xanchor=fe(_+Fe)):(v("x0",t.x0=fe(d+Fe)),v("x1",t.x1=fe(m+Fe))),u?v("yanchor",t.yanchor=le(b+Re)):(v("y0",t.y0=le(p+Re)),v("y1",t.y1=le(y+Re)));r.attr("d",R5(e,t)),me(n,t),cy(e,a,t,D)}function pe(Fe,Re){if(c){var Ie=function(He){return He},Be=Ie,ze=Ie;s?v("xanchor",t.xanchor=fe(_+Fe)):(Be=function($e){return fe(Z($e)+Fe)},z&&z.type==="date"&&(Be=Nn.encodeDate(Be))),u?v("yanchor",t.yanchor=le(b+Re)):(ze=function($e){return le(te($e)+Re)},H&&H.type==="date"&&(ze=Nn.encodeDate(ze))),v("path",t.path=dP(R,Be,ze))}else if(f){if(he==="resize-over-start-point"){var Pe=d+Fe,Xe=u?p-Re:p+Re;v("x0",t.x0=s?Pe:fe(Pe)),v("y0",t.y0=u?Xe:le(Xe))}else if(he==="resize-over-end-point"){var Ue=m+Fe,se=u?y-Re:y+Re;v("x1",t.x1=s?Ue:fe(Ue)),v("y1",t.y1=u?se:le(se))}}else{var Te=function(He){return he.indexOf(He)!==-1},Se=Te("n"),ir=Te("s"),Qe=Te("w"),Le=Te("e"),Ce=Se?w+Re:w,Ge=ir?x+Re:x,Ze=Qe?T+Fe:T,Ye=Le?k+Fe:k;u&&(Se&&(Ce=w-Re),ir&&(Ge=x-Re)),(!u&&Ge-Ce>l||u&&Ce-Ge>l)&&(v(M,t[M]=u?Ce:le(Ce)),v(S,t[S]=u?Ge:le(Ge))),Ye-Ze>o&&(v(E,t[E]=s?Ze:fe(Ze)),v(P,t[P]=s?Ye:fe(Ye)))}r.attr("d",R5(e,t)),me(n,t),cy(e,a,t,D)}function me(Fe,Re){(s||u)&&Ie();function Ie(){var Be=Re.type!=="path",ze=Fe.selectAll(".visual-cue").data([0]),Pe=1;ze.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Pe}).classed("visual-cue",!0);var Xe=Z(s?Re.xanchor:cP.midRange(Be?[Re.x0,Re.x1]:Nn.extractPathCoords(Re.path,_u.paramIsX))),Ue=te(u?Re.yanchor:cP.midRange(Be?[Re.y0,Re.y1]:Nn.extractPathCoords(Re.path,_u.paramIsY)));if(Xe=Nn.roundPositionForSharpStrokeRendering(Xe,Pe),Ue=Nn.roundPositionForSharpStrokeRendering(Ue,Pe),s&&u){var se="M"+(Xe-1-Pe)+","+(Ue-1-Pe)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ze.attr("d",se)}else if(s){var Te="M"+(Xe-1-Pe)+","+(Ue-9-Pe)+"v18 h2 v-18 Z";ze.attr("d",Te)}else{var Se="M"+(Xe-9-Pe)+","+(Ue-1-Pe)+"h18 v2 h-18 Z";ze.attr("d",Se)}}}function we(Fe){Fe.selectAll(".visual-cue").remove()}function Ne(Fe,Re,Ie){var Be=Re.xref,ze=Re.yref,Pe=sc.getFromId(Ie,Be),Xe=sc.getFromId(Ie,ze),Ue="";Be!=="paper"&&!Pe.autorange&&(Ue+=Be),ze!=="paper"&&!Xe.autorange&&(Ue+=ze),F5.setClipUrl(Fe,Ue?"clip"+Ie._fullLayout._uid+Ue:null,Ie)}}function dP(e,r,t){return e.replace(_u.segmentRE,function(a){var n=0,i=a.charAt(0),o=_u.paramIsX[i],l=_u.paramIsY[i],s=_u.numParams[i],u=a.substr(1).replace(_u.paramRE,function(f){return n>=s||(o[n]?f=r(f):l[n]&&(f=t(f)),n++),f});return i+u})}function x0e(e,r){if(vy(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){pP(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=pP,N5(e)}}}function pP(e){if(vy(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(mP(e),delete e._fullLayout._activeShapeIndex,N5(e))}}function _0e(e){if(vy(e)){mP(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var gi=gr(),_P=ea(),wP=va(),Zr=K1(),w0e=hy().eraseActiveShape,dy=Ee(),Ur=dy._,Xr=LP.exports={};Xr.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Ur(e,"Download plot as a png"):Ur(e,"Download plot")},icon:Zr.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};dy.notifier(Ur(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),gi.call("downloadImage",e,t).then(function(a){dy.notifier(Ur(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){dy.notifier(Ur(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Xr.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Ur(e,"Edit in Chart Studio")},icon:Zr.disk,click:function(e){_P.sendDataToCloud(e)}};Xr.editInChartStudio={name:"editInChartStudio",title:function(e){return Ur(e,"Edit in Chart Studio")},icon:Zr.pencil,click:function(e){_P.sendDataToCloud(e)}};Xr.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ur(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Zr.zoombox,click:sn};Xr.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ur(e,"Pan")},attr:"dragmode",val:"pan",icon:Zr.pan,click:sn};Xr.select2d={name:"select2d",_cat:"select",title:function(e){return Ur(e,"Box Select")},attr:"dragmode",val:"select",icon:Zr.selectbox,click:sn};Xr.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ur(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Zr.lasso,click:sn};Xr.drawclosedpath={name:"drawclosedpath",title:function(e){return Ur(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Zr.drawclosedpath,click:sn};Xr.drawopenpath={name:"drawopenpath",title:function(e){return Ur(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Zr.drawopenpath,click:sn};Xr.drawline={name:"drawline",title:function(e){return Ur(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Zr.drawline,click:sn};Xr.drawrect={name:"drawrect",title:function(e){return Ur(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Zr.drawrect,click:sn};Xr.drawcircle={name:"drawcircle",title:function(e){return Ur(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Zr.drawcircle,click:sn};Xr.eraseshape={name:"eraseshape",title:function(e){return Ur(e,"Erase active shape")},icon:Zr.eraseshape,click:w0e};Xr.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ur(e,"Zoom in")},attr:"zoom",val:"in",icon:Zr.zoom_plus,click:sn};Xr.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ur(e,"Zoom out")},attr:"zoom",val:"out",icon:Zr.zoom_minus,click:sn};Xr.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ur(e,"Autoscale")},attr:"zoom",val:"auto",icon:Zr.autoscale,click:sn};Xr.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ur(e,"Reset axes")},attr:"zoom",val:"reset",icon:Zr.home,click:sn};Xr.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ur(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Zr.tooltip_basic,gravity:"ne",click:sn};Xr.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ur(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Zr.tooltip_compare,gravity:"ne",click:sn};function sn(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,o={},l=wP.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var c=n==="in"?.5:2,v=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var CP=O5(),M0e=Object.keys(CP),EP=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],DP=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(EP),fc=[],k0e=function(e){if(DP.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();fc.indexOf(r)===-1&&fc.push(r),fc.indexOf(t)===-1&&fc.push(t)}};M0e.forEach(function(e){k0e(CP[e])});fc.sort();PP.exports={DRAW_MODES:EP,backButtons:DP,foreButtons:fc}});var H5=N((MDe,RP)=>{"use strict";var ADe=B5();RP.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 NP=N((kDe,FP)=>{"use strict";var S0e=Ee(),Th=Tr(),q0e=_t(),L0e=H5();FP.exports=function(r,t){var a=r.modebar||{},n=q0e.newContainer(t,"modebar");function i(l,s){return S0e.coerce(a,n,L0e,l,s)}i("orientation"),i("bgcolor",Th.addOpacity(t.paper_bgcolor,.5));var o=Th.contrast(Th.rgb(t.modebar.bgcolor));i("color",Th.addOpacity(o,.3)),i("activecolor",Th.addOpacity(o,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var BP=N((SDe,OP)=>{"use strict";var U5=Sr(),C0e=Pr(),yy=Ee(),zP=K1(),E0e=ep().version,D0e=new DOMParser;function IP(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Fo=IP.prototype;Fo.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(c){c.style.backgroundColor=i.bgcolor}),yy.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var l=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(l||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Fo.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var o=r.createButton(n);r.buttonElements.push(o),a.appendChild(o)}),r.element.appendChild(a)})};Fo.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};Fo.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&U5.select(t).classed("active",!0);var o=e.icon;return typeof o=="function"?t.appendChild(o()):t.appendChild(this.createIcon(o||zP.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};Fo.createIcon=function(e){var r=C0e(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=D0e.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Fo.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=U5.select(a),s=function(c,v){var d=r.modebar,p=c.querySelector(".icon path");p&&(v||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(i===t){var u=!l.classed("active");l.classed("active",u),s(a,u)}}else{var f=i===null?i:yy.nestedProperty(r,i).get();l.classed("active",f===n),s(a,f===n)}})};Fo.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var F0e=va(),HP=Pn(),G5=gr(),N0e=qo().isUnifiedHover,z0e=BP(),my=O5(),I0e=B5().DRAW_MODES,O0e=Ee().extendDeep;UP.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,o;Array.isArray(i)&&i.length?o=V0e(i):!a.displayModeBar&&a.watermark?o=[]:o=B0e(r),n?n.update(r,o):t._modeBar=z0e(r,o)};function B0e(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(B,Y){if(typeof Y=="string"){if(Y.toLowerCase()===B.toLowerCase())return!0}else{var X=Y.name,Z=Y._cat||Y.name;if(X===B||Z===B.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var o=r.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(i.filter(function(B){for(var Y=0;Y1?(P=["toggleHover"],R=["resetViews"]):c?(E=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],R=["resetGeo"]):f?(P=["hoverClosest3d"],R=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(E=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],R=["resetViewMapbox"]):y?(E=["zoomInMap","zoomOutMap"],P=["toggleHover"],R=["resetViewMap"]):v?P=["hoverClosestPie"]:w?(P=["hoverClosestCartesian","hoverCompareCartesian"],R=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(G0e(t)||T)&&(P=[]),u&&!x&&(E=["zoomIn2d","zoomOut2d","autoScale2d"],R[0]!=="resetViews"&&(R=["resetScale2d"])),f?D=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!x||p?D=["zoom2d","pan2d"]:m||y||c?D=["pan2d"]:_&&(D=["zoom2d"]),U0e(t)&&D.push("select2d","lasso2d");var z=[],O=function(B){z.indexOf(B)===-1&&P.indexOf(B)!==-1&&z.push(B)};if(Array.isArray(l)){for(var H=[],V=0;V{"use strict";YP.exports={moduleType:"component",name:"modebar",layoutAttributes:H5(),supplyLayoutDefaults:NP(),manage:GP()}});var V5=N((CDe,VP)=>{"use strict";var W0e=Xa().FROM_BL;VP.exports=function(r,t,a){a===void 0&&(a=W0e[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var Tu=N(Ah=>{"use strict";var wu=Ee(),W5=fh(),ao=va().id2name,j0e=hi(),WP=V5(),Z0e=Zf(),X0e=Ft().ALMOST_EQUAL,J0e=Xa().FROM_BL;Ah.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],o=r._axisMatchGroups=[],l,s,u,f,c,v,d,p;for(l=0;li?t.substr(i):a.substr(n))+o}function K0e(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),o=0;oX0e*p&&!b)){for(i=0;iD&&XP&&(P=X);var te=(P-E)/(2*R);c/=te,E=s.l2r(E),P=s.l2r(P),s.range=s._input.range=k{"use strict";var by=Sr(),un=gr(),$n=ea(),bi=Ee(),X5=Ea(),J5=$1(),Mh=Tr(),cc=jr(),JP=jf(),rR=Y5(),kh=Or(),dl=Xa(),tR=Tu(),Q0e=tR.enforce,ede=tR.clean,$P=fh().doAutoRange,aR="start",rde="middle",nR="end",tde=Ca().zindexSeparator;Aa.layoutStyles=function(e){return bi.syncOrAsync([$n.doAutoMargin,nde],e)};function ade(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function nde(e){var r=e._fullLayout,t=r._size,a=t.p,n=kh.list(e,"",!0),i,o,l,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(cc.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),Aa.drawMainTitle(e),rR.manage(e),!r._has("cartesian"))return $n.previousPromises(e);function c(de,W,Q){var j=de._lw/2;if(de._id.charAt(0)==="x"){if(W){if(Q==="top")return W._offset-a-j}else return t.t+t.h*(1-(de.position||0))+j%1;return W._offset+W._length+a+j}if(W){if(Q==="right")return W._offset+W._length+a+j}else return t.l+t.w*(de.position||0)+j%1;return W._offset-a-j}for(i=0;i0){sde(e,i,u,s),l.attr({x:o,y:i,"text-anchor":a,dy:eR(r.yanchor)}).call(X5.positionText,o,i);var f=(r.text.match(X5.BR_TAG_ALL)||[]).length;if(f){var c=dl.LINE_SPACING*f+dl.MID_SHIFT;r.y===0&&(c=-c),l.selectAll(".line").each(function(){var y=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",y)})}var v=by.selectAll(".gtitle-subtitle");if(v.node()){var d=l.node().getBBox(),p=d.y+d.height,m=p+JP.SUBTITLE_PADDING_EM*r.subtitle.font.size;v.attr({x:o,y:m,"text-anchor":a,dy:eR(r.yanchor)}).call(X5.positionText,o,m)}}}};function ide(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=bi.isTopAnchor(r)?a:a-n,l=t==="b"?i-o:o;return bi.isTopAnchor(r)&&t==="t"||bi.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",o=e._fullLayout.margin[i],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=ode(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>o?l:0}function sde(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",l={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&ide(e,i,o,r,a)?l[o]=t:i.yref==="container"&&(s[o]=t,e._fullLayout._reservedMargin[n]=s),$n.allowAutoMargin(e,n),$n.autoMargin(e,n,l)}function ude(e,r){var t=e.title,a=e._size,n=0;switch(r===aR?n=t.pad.l:r===nR&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function fde(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===dl.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function eR(e){return e==="top"?dl.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":dl.MID_SHIFT+"em"}function cde(e){var r=e.title,t=rde;return bi.isRightAnchor(r)?t=nR:bi.isLeftAnchor(r)&&(t=aR),t}function vde(e){var r=e.title,t="0em";return bi.isTopAnchor(r)?t=dl.CAP_SHIFT+"em":bi.isMiddleAnchor(r)&&(t=dl.MID_SHIFT+"em"),t}Aa.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var hde=ts().readPaths,dde=uy(),iR=Zl().clearOutlineControllers,$5=Tr(),oR=jr(),pde=_t().arrayEditor,lR=ns(),yde=lR.getPathString;uR.exports={draw:_y,drawOne:sR,activateLastSelection:bde};function _y(e){var r=e._fullLayout;iR(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;y--){var _=o.append("path").attr(s).style("opacity",y?.1:u).call($5.stroke,c).call($5.fill,f).call(oR.dashLine,y?"solid":d,y?4+v:v);if(mde(_,e,a),p){var b=pde(e.layout,"selections",a);_.style({cursor:"move"});var w={element:_.node(),plotinfo:n,gd:e,editHelpers:b,isActiveSelection:!0},x=hde(l,e);dde(x,_,w)}else _.style("pointer-events",y?"all":"none");m[y]=_}var T=m[0],k=m[1];k.node().addEventListener("click",function(){return gde(e,T)})}}function mde(e,r,t){var a=t.xref+t.yref;oR.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function gde(e,r){if(wy(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){K5(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=K5,_y(e)}}}function bde(e){if(wy(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=K5,_y(e)}}function K5(e){if(wy(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(iR(e),delete e._fullLayout._activeSelectionIndex,_y(e))}}});var cR=N((RDe,fR)=>{function xde(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,o){return a("temp_status",{seg:n,above:i,below:o})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,o){return a("status",{seg:n,above:i,below:o})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}fR.exports=xde});var hR=N((FDe,vR)=>{function _de(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],o=a[1],l=n[0],s=n[1],u=t[0],f=t[1];return(l-i)*(f-o)-(s-o)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],o=n[0]-a[0],l=t[0]-a[0],s=n[1]-a[1],u=l*o+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=l-i>e&&(o-f)*(i-c)/(l-c)+f-n>e&&(s=!s),o=f,l=c}return s}};return r}vR.exports=_de});var pR=N((NDe,dR)=>{var wde={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};dR.exports=wde});var mR=N((zDe,yR)=>{var Sh=pR();function Tde(e,r,t){function a(p,m){return{id:t?t.segmentId():-1,start:p,end:m,myFill:{above:null,below:null},otherFill:null}}function n(p,m,y){return{id:t?t.segmentId():-1,start:p,end:m,myFill:{above:y.myFill.above,below:y.myFill.below},otherFill:null}}var i=Sh.create();function o(p,m,y,_,b,w){var x=r.pointsCompare(m,b);return x!==0?x:r.pointsSame(y,w)?0:p!==_?p?1:-1:r.pointAboveOrOnLine(y,_?b:w,_?w:b)?1:-1}function l(p,m){i.insertBefore(p,function(y){var _=o(p.isStart,p.pt,m,y.isStart,y.pt,y.other.pt);return _<0})}function s(p,m){var y=Sh.node({isStart:!0,pt:p.start,seg:p,primary:m,other:null,status:null});return l(y,p.end),y}function u(p,m,y){var _=Sh.node({isStart:!1,pt:m.end,seg:m,primary:y,other:p,status:null});p.other=_,l(_,p.pt)}function f(p,m){var y=s(p,m);return u(y,p,m),y}function c(p,m){t&&t.segmentChop(p.seg,m),p.other.remove(),p.seg.end=m,p.other.pt=m,l(p.other,p.pt)}function v(p,m){var y=n(m,p.seg.end,p.seg);return c(p,m),f(y,p.primary)}function d(p,m){var y=Sh.create();function _(H,V){var G=H.seg.start,B=H.seg.end,Y=V.seg.start,X=V.seg.end;return r.pointsCollinear(G,Y,X)?r.pointsCollinear(B,Y,X)||r.pointAboveOrOnLine(B,Y,X)?1:-1:r.pointAboveOrOnLine(G,Y,X)?1:-1}function b(H){return y.findTransition(function(V){var G=_(H,V.ev);return G>0})}function w(H,V){var G=H.seg,B=V.seg,Y=G.start,X=G.end,Z=B.start,te=B.end;t&&t.checkIntersection(G,B);var fe=r.linesIntersect(Y,X,Z,te);if(fe===!1){if(!r.pointsCollinear(Y,X,Z)||r.pointsSame(Y,te)||r.pointsSame(X,Z))return!1;var le=r.pointsSame(Y,Z),ie=r.pointsSame(X,te);if(le&&ie)return V;var K=!le&&r.pointBetween(Y,Z,te),he=!ie&&r.pointBetween(X,Z,te);if(le)return he?v(V,X):v(H,te),V;K&&(ie||(he?v(V,X):v(H,te)),v(V,Y))}else fe.alongA===0&&(fe.alongB===-1?v(H,Z):fe.alongB===0?v(H,fe.pt):fe.alongB===1&&v(H,te)),fe.alongB===0&&(fe.alongA===-1?v(V,Y):fe.alongA===0?v(V,fe.pt):fe.alongA===1&&v(V,X));return!1}for(var x=[];!i.isEmpty();){var T=i.getHead();if(t&&t.vert(T.pt[0]),T.isStart){let H=function(){if(M){var V=w(T,M);if(V)return V}return S?w(T,S):!1};var O=H;t&&t.segmentNew(T.seg,T.primary);var k=b(T),M=k.before?k.before.ev:null,S=k.after?k.after.ev:null;t&&t.tempStatus(T.seg,M?M.seg:!1,S?S.seg:!1);var E=H();if(E){if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,P&&(E.seg.myFill.above=!E.seg.myFill.above)}else E.seg.otherFill=T.seg.myFill;t&&t.segmentUpdate(E.seg),T.other.remove(),T.remove()}if(i.getHead()!==T){t&&t.rewind(T.seg);continue}if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,S?T.seg.myFill.below=S.seg.myFill.above:T.seg.myFill.below=p,P?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var R;S?T.primary===S.primary?R=S.seg.otherFill.above:R=S.seg.myFill.above:R=T.primary?m:p,T.seg.otherFill={above:R,below:R}}t&&t.status(T.seg,M?M.seg:!1,S?S.seg:!1),T.other.status=k.insert(Sh.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(y.exists(D.prev)&&y.exists(D.next)&&w(D.prev.ev,D.next.ev),t&&t.statusRemove(D.ev.seg),D.remove(),!T.primary){var z=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=z}x.push(T.seg)}i.getHead().remove()}return t&&t.done(),x}return e?{addRegion:function(p){for(var m,y=p[p.length-1],_=0;_{function Ade(e,r,t){var a=[],n=[];return e.forEach(function(i){var o=i.start,l=i.end;if(r.pointsSame(o,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function c(O,H,V){return f.index=O,f.matches_head=H,f.matches_pt1=V,f===s?(f=u,!1):(f=null,!0)}for(var v=0;v{function qh(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var Mde={union:function(e,r){return qh(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return qh(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return qh(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return qh(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return qh(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};xR.exports=Mde});var TR=N((BDe,wR)=>{var kde={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=o(i[0]),s=1;s{var Sde=cR(),qde=hR(),AR=mR(),Lde=bR(),Lh=_R(),MR=TR(),xi=!1,Ch=qde(),zn;zn={buildLog:function(e){return e===!0?xi=Sde():e===!1&&(xi=!1),xi===!1?!1:xi.list},epsilon:function(e){return Ch.epsilon(e)},segments:function(e){var r=AR(!0,Ch,xi);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=AR(!1,Ch,xi);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:Lh.union(e.combined,xi),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:Lh.intersect(e.combined,xi),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:Lh.difference(e.combined,xi),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:Lh.differenceRev(e.combined,xi),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:Lh.xor(e.combined,xi),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Lde(e.segments,Ch,xi),inverted:e.inverted}},polygonFromGeoJSON:function(e){return MR.toPolygon(zn,e)},polygonToGeoJSON:function(e){return MR.fromPolygon(zn,Ch,e)},union:function(e,r){return Eh(e,r,zn.selectUnion)},intersect:function(e,r){return Eh(e,r,zn.selectIntersect)},difference:function(e,r){return Eh(e,r,zn.selectDifference)},differenceRev:function(e,r){return Eh(e,r,zn.selectDifferenceRev)},xor:function(e,r){return Eh(e,r,zn.selectXor)}};function Eh(e,r,t){var a=zn.segments(e),n=zn.segments(r),i=zn.combine(a,n),o=t(i);return zn.polygon(o)}typeof window=="object"&&(window.PolyBool=zn);kR.exports=zn});var LR=N((UDe,qR)=>{qR.exports=function(r,t,a,n){var i=r[0],o=r[1],l=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;uo!=p>o&&i<(d-c)*(o-v)/(p-v)+c;m&&(l=!l)}return l}});var r_=N((GDe,CR)=>{"use strict";var e_=xp().dot,Ty=Ft().BADNUM,Ay=CR.exports={};Ay.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],o=i,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;ln||_===Ty||_o||m&&u(p))}function c(p,m){var y=p[0],_=p[1];if(y===Ty||yn||_===Ty||_o)return!1;var b=t.length,w=t[0][0],x=t[0][1],T=0,k,M,S,E,P;for(k=1;kMath.max(M,w)||_>Math.max(S,x)))if(_l||Math.abs(e_(c,u))>n)return!0;return!1};Ay.filter=function(r,t){var a=[r[0]],n=0,i=0;function o(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var c=f+1;c1){var l=r.pop();o(l)}return{addPt:o,raw:r,filtered:a}}});var DR=N((YDe,ER)=>{"use strict";ER.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var eF=N((VDe,QR)=>{"use strict";var PR=SR(),Cde=LR(),Rh=gr(),Ede=jr().dashStyle,Dh=Tr(),Dde=Fn(),Pde=qo().makeEventData,Oh=bu(),Rde=Oh.freeMode,Fde=Oh.rectMode,Fh=Oh.drawMode,i_=Oh.openMode,o_=Oh.selectMode,RR=ns(),FR=_h(),BR=uy(),HR=Zl().clearOutline,UR=ts(),t_=UR.handleEllipse,Nde=UR.readPaths,zde=iy().newShapes,Ide=q5(),Ode=Q5().activateLastSelection,ky=Ee(),Bde=ky.sorterAsc,GR=r_(),Ph=Pp(),_i=va().getFromId,Hde=$1(),Ude=xy().redrawReglTraces,Sy=DR(),No=Sy.MINSELECT,Gde=GR.filter,l_=GR.tester,s_=ry(),NR=s_.p2r,Yde=s_.axValue,Vde=s_.getTransform;function u_(e){return e.subplot!==void 0}function Wde(e,r,t,a,n){var i=!u_(a),o=Rde(n),l=Fde(n),s=i_(n),u=Fh(n),f=o_(n),c=n==="drawline",v=n==="drawcircle",d=c||v,p=a.gd,m=p._fullLayout,y=f&&m.newselection.mode==="immediate"&&i,_=m._zoomlayer,b=a.element.getBoundingClientRect(),w=a.plotinfo,x=Vde(w),T=r-b.left,k=t-b.top;m._calcInverseTransform(p);var M=ky.apply3DTransform(m._invTransform)(T,k);T=M[0],k=M[1];var S=m._invScaleX,E=m._invScaleY,P=T,R=k,D="M"+T+","+k,z=a.xaxes[0],O=a.yaxes[0],H=z._length,V=O._length,G=e.altKey&&!(Fh(n)&&s),B,Y,X,Z,te,fe,le;VR(e,p,a),o&&(B=Gde([[T,k]],Sy.BENDPX));var ie=_.selectAll("path.select-outline-"+w.id).data([1]),K=u?m.newshape:m.newselection;u&&(a.hasText=K.label.text||K.label.texttemplate);var he=u&&!s?K.fillcolor:"rgba(0,0,0,0)",oe=K.line.color||(i?Dh.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");ie.enter().append("path").attr("class","select-outline select-outline-"+w.id).style({opacity:u?K.opacity/2:1,"stroke-dasharray":Ede(K.line.dash,K.line.width),"stroke-width":K.line.width+"px","shape-rendering":"crispEdges"}).call(Dh.stroke,oe).call(Dh.fill,he).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",x).attr("d",D+"Z");var ye=_.append("path").attr("class","zoombox-corners").style({fill:Dh.background,stroke:Dh.defaultLine,"stroke-width":1}).attr("transform",x).attr("d","M0,0Z");if(u&&a.hasText){var ue=_.select(".label-temp");ue.empty()&&(ue=_.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var de=m._uid+Sy.SELECTID,W=[],Q=qy(p,a.xaxes,a.yaxes,a.subplot);y&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var pe=z._id,me=O._id;JR(p,pe,me,Q);for(var we=(p.layout||{}).selections||[],Ne=[],Fe=!1,Re=0;Re=0){p._fullLayout._deactivateShape(p);return}if(!u){var we=m.clickmode;Ph.done(de).then(function(){if(Ph.clear(de),pe===2){for(ie.remove(),te=0;te-1&&YR(me,p,a.xaxes,a.yaxes,a.subplot,a,ie),we==="event"&&Ih(p,void 0);Dde.click(p,me,w.id)}).catch(ky.error)}},a.doneFn=function(){ye.remove(),Ph.done(de).then(function(){Ph.clear(de),!y&&Z&&a.selectionDefs&&(Z.subtract=G,a.selectionDefs.push(Z),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,X)),(y||u)&&Nh(a,y),a.doneFnCompleted&&a.doneFnCompleted(W),f&&Ih(p,le)}).catch(ky.error)}}function YR(e,r,t,a,n,i,o){var l=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,c=[],v,d,p,m,y,_,b,w,x,T;if($de(l)){VR(e,r,i),v=qy(r,t,a,n);var k=Kde(l,v),M=k.pointNumbers.length>0;if(M?Qde(v,k):epe(v)&&(b=IR(k))){for(o&&o.remove(),T=0;T=0}function Jde(e){return e._fullLayout._activeSelectionIndex>=0}function Nh(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;Xde(n)&&n._fullLayout._deactivateShape(n),Jde(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,o=i._zoomlayer,l=Fh(t),s=o_(t);if(l||s){var u=o.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;l&&(f=zde(u,e)),f&&Rh.call("_guiRelayout",n,{shapes:f});var c;s&&!u_(e)&&(c=Ide(u,e)),c&&(n._fullLayout._noEmitSelectedAtStart=!0,Rh.call("_guiRelayout",n,{selections:c}).then(function(){r&&Ode(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function zR(e){return e._id}function qy(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(zR),o=t.map(zR),l,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Qde(e,r){var t=[],a,n,i,o;for(o=0;o0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(o=0;o1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function zh(e,r,t){var a;for(a=0;a-1&&r;if(!o&&r){var pe=OR(e,!0);if(pe.length){var me=pe[0].xref,we=pe[0].yref;if(me&&we){var Ne=$R(pe),Fe=KR([_i(e,me,"x"),_i(e,we,"y")]);Fe(W,Ne)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:j&&Ih(e,W),v._reselect=!1}if(!o&&v._deselect){var Re=v._deselect;l=Re.xref,s=Re.yref,ape(l,s,f)||JR(e,l,s,a),j&&(W.points.length?Ih(e,W):v_(e)),v._deselect=!1}return{eventData:W,selectionTesters:t}}function tpe(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";rF.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 Bh=N((jDe,tF)=>{"use strict";tF.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var vc=N((XDe,iF)=>{"use strict";var aF=h_(),nF=fa(),Ly=Ca(),spe=_t().templatedArray,ZDe=Bh();iF.exports=spe("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:nF({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:aF.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:aF.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",Ly.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Ly.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Ly.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",Ly.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:nF({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Hh=N((JDe,oF)=>{"use strict";oF.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Cy=N(($De,lF)=>{"use strict";lF.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var wi=N((KDe,hF)=>{"use strict";var sF=Qi().axisHoverFormat,upe=La().texttemplateAttrs,fpe=La().hovertemplateAttrs,uF=ko(),cpe=fa(),vpe=si().dash,hpe=si().pattern,dpe=jr(),ppe=Hh(),Ey=bt().extendFlat,ype=Cy();function fF(e){return{valType:"any",dflt:0,editType:"calc"}}function cF(e){return{valType:"any",editType:"calc"}}function vF(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}hF.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:fF("x"),yperiod:fF("y"),xperiod0:cF("x0"),yperiod0:cF("y0"),xperiodalignment:vF("x"),yperiodalignment:vF("y"),xhoverformat:sF("x"),yhoverformat:sF("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:upe({},{}),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:fpe({},{keys:ppe.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Ey({},vpe,{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:ype(!0),fillgradient:Ey({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:hpe,marker:Ey({symbol:{valType:"enumerated",values:dpe.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:Ey({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},uF("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"},uF("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:cpe({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var d_=N((ePe,yF)=>{"use strict";var dF=vc(),pF=wi().line,mpe=si().dash,Dy=bt().extendFlat,gpe=Xi().overrideAll,bpe=_t().templatedArray,QDe=Bh();yF.exports=gpe(bpe("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:Dy({},dF.xref,{}),yref:Dy({},dF.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:pF.color,width:Dy({},pF.width,{min:1,dflt:1}),dash:Dy({},mpe,{dflt:"dot"})}}),"arraydraw","from-root")});var xF=N((rPe,bF)=>{"use strict";var mF=Ee(),Py=Or(),xpe=eo(),_pe=d_(),gF=ns();bF.exports=function(r,t){xpe(r,t,{name:"selections",handleItemDefaults:wpe});for(var a=t.selections,n=0;n{"use strict";_F.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var Uh=N((aPe,MF)=>{"use strict";var Tpe=gr(),TF=Ee(),AF=va();MF.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var o=Tpe.subplotsRegistry.cartesian,l=o.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,c=s.cartesian,v=n._has("cartesian"),d=0;d{"use strict";var kF=Q5(),Gh=eF();SF.exports={moduleType:"component",name:"selections",layoutAttributes:d_(),supplyLayoutDefaults:xF(),supplyDrawNewSelectionDefaults:wF(),includeBasePlot:Uh()("selections"),draw:kF.draw,drawOne:kF.drawOne,reselect:Gh.reselect,prepSelect:Gh.prepSelect,clearOutline:Gh.clearOutline,clearSelectionsCache:Gh.clearSelectionsCache,selectOnClick:Gh.selectOnClick}});var ZF=N((iPe,jF)=>{"use strict";var b_=Sr(),Ti=Ee(),qF=Ti.numberFormat,Ape=Sn(),Mpe=Kx(),Ry=gr(),zF=Ti.strTranslate,kpe=Ea(),LF=Tr(),os=jr(),Spe=Fn(),CF=Or(),qpe=rs(),Lpe=pi(),IF=bu(),Fy=IF.selectingOrDrawing,Cpe=IF.freeMode,Epe=Xa().FROM_TL,Dpe=$1(),Ppe=xy().redrawReglTraces,Rpe=ea(),y_=va().getFromId,Fpe=zo().prepSelect,Npe=zo().clearOutline,zpe=zo().selectOnClick,p_=V5(),x_=Ca(),EF=x_.MINDRAG,bn=x_.MINZOOM,DF=!0;function Ipe(e,r,t,a,n,i,o,l){var s=e._fullLayout._zoomlayer,u=o+l==="nsew",f=(o+l).length===1,c,v,d,p,m,y,_,b,w,x,T,k,M,S,E,P,R,D,z,O,H,V,G;t+=r.yaxis._shift;function B(){if(c=r.xaxis,v=r.yaxis,w=c._length,x=v._length,_=c._offset,b=v._offset,d={},d[c._id]=c,p={},p[v._id]=v,o&&l)for(var Le=r.overlays,Ce=0;Ce=0){Ge._fullLayout._deactivateShape(Ge);return}var Ze=Ge._fullLayout.clickmode;if(g_(Ge),Le===2&&!f&&Ue(),u)Ze.indexOf("select")>-1&&zpe(Ce,Ge,m,y,r.id,Z),Ze.indexOf("event")>-1&&Spe.click(Ge,Ce,r.id);else if(Le===1&&f){var Ye=o?v:c,He=o==="s"||l==="w"?0:1,$e=Ye._name+".range["+He+"]",cr=Ope(Ye,He),lr="left",Oe="middle";if(Ye.fixedrange)return;o?(Oe=o==="n"?"top":"bottom",Ye.side==="right"&&(lr="right")):l==="e"&&(lr="right"),Ge._context.showAxisRangeEntryBoxes&&b_.select(X).call(kpe.makeEditable,{gd:Ge,immediate:!0,background:Ge._fullLayout.paper_bgcolor,text:String(cr),fill:Ye.tickfont?Ye.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:Oe}).on("edit",function(ne){var ve=Ye.d2r(ne);ve!==void 0&&Ry.call("_guiRelayout",Ge,$e,ve)})}}Lpe.init(Z);var le,ie,K,he,oe,ye,ue,de,W,Q;function j(Le,Ce,Ge){var Ze=X.getBoundingClientRect();le=Ce-Ze.left,ie=Ge-Ze.top,e._fullLayout._calcInverseTransform(e);var Ye=Ti.apply3DTransform(e._fullLayout._invTransform)(le,ie);le=Ye[0],ie=Ye[1],K={l:le,r:le,w:0,t:ie,b:ie,h:0},he=e._hmpixcount?e._hmlumcount/e._hmpixcount:Ape(e._fullLayout.plot_bgcolor).getLuminance(),oe="M0,0H"+w+"V"+x+"H0V0",ye=!1,ue="xy",Q=!1,de=HF(s,he,_,b,oe),W=UF(s,_,b)}function pe(Le,Ce){if(e._transitioningWithDuration)return!1;var Ge=Math.max(0,Math.min(w,V*Le+le)),Ze=Math.max(0,Math.min(x,G*Ce+ie)),Ye=Math.abs(Ge-le),He=Math.abs(Ze-ie);K.l=Math.min(le,Ge),K.r=Math.max(le,Ge),K.t=Math.min(ie,Ze),K.b=Math.max(ie,Ze);function $e(){ue="",K.r=K.l,K.t=K.b,W.attr("d","M0,0Z")}if(T.isSubplotConstrained)Ye>bn||He>bn?(ue="xy",Ye/w>He/x?(He=Ye*x/w,ie>Ze?K.t=ie-He:K.b=ie+He):(Ye=He*w/x,le>Ge?K.l=le-Ye:K.r=le+Ye),W.attr("d",Ny(K))):$e();else if(k.isSubplotConstrained)if(Ye>bn||He>bn){ue="xy";var cr=Math.min(K.l/w,(x-K.b)/x),lr=Math.max(K.r/w,(x-K.t)/x);K.l=cr*w,K.r=lr*w,K.b=(1-cr)*x,K.t=(1-lr)*x,W.attr("d",Ny(K))}else $e();else!S||He0){var ne;if(k.isSubplotConstrained||!M&&S.length===1){for(ne=0;ne1&&($e.maxallowed!==void 0&&P===($e.range[0]<$e.range[1]?"e":"w")||$e.minallowed!==void 0&&P===($e.range[0]<$e.range[1]?"w":"e"))&&(ar=1,ur=0),qe?(hr=ve,Ar=o||k.isSubplotConstrained?Le[1]:Qe(cr,hr)):k.yaHash[cr._id]?(hr=ve,Ar=Le[1]*cr._length/v._length):k.xaHash[cr._id]?(hr=ne,Ar=M==="ew"?-Le[0]*cr._length/c._length:Qe(cr,hr,{e:"right",w:"left"}[M])):(hr=Se(cr,ne,ve),Ar=ir(cr,hr)),hr>1&&(cr.maxallowed!==void 0&&R===(cr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Hpe(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function HF(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",zF(t,a)).attr("d",n+"Z")}function UF(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:LF.background,stroke:LF.defaultLine,"stroke-width":1,opacity:0}).attr("transform",zF(r,t)).attr("d","M0,0Z")}function GF(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),YF(e,r,n,i)}function YF(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function g_(e){b_.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function VF(e){DF&&e.data&&e._context.showTips&&(Ti.notifier(Ti._(e,"Double-click to zoom back out"),"long"),DF=!1)}function Upe(e,r){return"M"+(e.l-.5)+","+(r-bn-.5)+"h-3v"+(2*bn+1)+"h3ZM"+(e.r+.5)+","+(r-bn-.5)+"h3v"+(2*bn+1)+"h-3Z"}function Gpe(e,r){return"M"+(r-bn-.5)+","+(e.t-.5)+"v-3h"+(2*bn+1)+"v3ZM"+(r-bn-.5)+","+(e.b+.5)+"v3h"+(2*bn+1)+"v-3Z"}function Ny(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,bn)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function FF(e,r,t,a,n){for(var i=!1,o={},l={},s,u,f,c,v=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var Ype=Sr(),zy=Fn(),Vpe=pi(),Wpe=rs(),no=ZF().makeDragBox,Ma=Ca().DRAGGERSIZE;Iy.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){Ype.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,o){if((t._plots[i].mainplot&&!0)===(t._plots[o].mainplot&&!0)){var l=i.split("y"),s=o.split("y");return l[0]===s[0]?Number(l[1]||1)-Number(s[1]||1):Number(l[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var o=t._plots[i],l=o.xaxis,s=o.yaxis;if(!o.mainplot){var u=no(r,o,l._offset,s._offset,l._length,s._length,"ns","ew");u.onmousemove=function(v){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&zy.hover(r,v,i)},zy.hover(r,v,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(v){r._dragging||(r._fullLayout._hoversubplot=null,Vpe.unhover(r,v))},r._context.showAxisDragHandles&&(no(r,o,l._offset-Ma,s._offset-Ma,Ma,Ma,"n","w"),no(r,o,l._offset+l._length,s._offset-Ma,Ma,Ma,"n","e"),no(r,o,l._offset-Ma,s._offset+s._length,Ma,Ma,"s","w"),no(r,o,l._offset+l._length,s._offset+s._length,Ma,Ma,"s","e"))}if(r._context.showAxisDragHandles){if(i===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=Ma),no(r,o,l._offset+l._length*.1,f,l._length*.8,Ma,"","ew"),no(r,o,l._offset,f,l._length*.1,Ma,"","w"),no(r,o,l._offset+l._length*.9,f,l._length*.1,Ma,"","e")}if(i===s._mainSubplot){var c=s._mainLinePosition;s.side!=="right"&&(c-=Ma),no(r,o,c,s._offset+s._length*.1,Ma,s._length*.8,"ns",""),no(r,o,c,s._offset+s._length*.9,Ma,s._length*.1,"s",""),no(r,o,c,s._offset,Ma,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,zy.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,zy.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Iy.updateFx(r)}};Iy.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";Wpe(r._draggers,t)}});var $F=N((lPe,JF)=>{"use strict";var XF=gr();JF.exports=function(r){for(var t=XF.layoutArrayContainers,a=XF.layoutArrayRegexes,n=r.split("[")[0],i,o,l=0;l{"use strict";var jpe=zl(),w_=bp(),Yh=Zs(),Zpe=wb().sorterAsc,T_=gr();Vh.containerArrayMatch=$F();var Xpe=Vh.isAddVal=function(r){return r==="add"||jpe(r)},KF=Vh.isRemoveVal=function(r){return r===null||r==="remove"};Vh.applyContainerArrayChanges=function(r,t,a,n,i){var o=t.astr,l=T_.getComponentMethod(o,"supplyLayoutDefaults"),s=T_.getComponentMethod(o,"draw"),u=T_.getComponentMethod(o,"drawOne"),f=n.replot||n.recalc||l===w_||s===w_,c=r.layout,v=r._fullLayout;if(a[""]){Object.keys(a).length>1&&Yh.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(KF(d))t.set(null);else if(Array.isArray(d))t.set(d);else return Yh.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(l(c,v),s(r),!0)}var p=Object.keys(a).map(Number).sort(Zpe),m=t.get(),y=m||[],_=i(v,o).get(),b=[],w=-1,x=y.length,T,k,M,S,E,P,R,D;for(T=0;Ty.length-(R?0:1)){Yh.warn("index out of range",o,M);continue}if(P!==void 0)E.length>1&&Yh.warn("Insertion & removal are incompatible with edits to the same index.",o,M),KF(P)?b.push(M):R?(P==="add"&&(P={}),y.splice(M,0,P),_&&_.splice(M,0,{})):Yh.warn("Unrecognized full object edit value",o,M,P),w===-1&&(w=M);else for(k=0;k=0;T--)y.splice(b[T],1),_&&_.splice(b[T],1);if(y.length?m||t.set(y):t.set(null),f)return!1;if(l(c,v),u!==w_){var z;if(w===-1)z=p;else{for(x=Math.max(y.length,x),z=[],T=0;T=w));T++)z.push(M);for(T=w;T{"use strict";var aN=Pr(),uPe=vb(),nN=gr(),In=Ee(),Wh=ea(),iN=va(),oN=Tr(),jh=iN.cleanId,Jpe=iN.getFromTrace,A_=nN.traceIs;io.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&In.log("Clearing previous rejected promises from queue."),e._promises=[]};io.cleanLayout=function(e){var r,t;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 a=(Wh.subplotsRegistry.cartesian||{}).attrRegex,n=(Wh.subplotsRegistry.polar||{}).attrRegex,i=(Wh.subplotsRegistry.ternary||{}).attrRegex,o=(Wh.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(y.x=1.02,y.xanchor="left"):y.x<-2&&(y.x=-.02,y.xanchor="right"),y.y>3?(y.y=1.02,y.yanchor="bottom"):y.y<-2&&(y.y=-.02,y.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),oN.clean(e),e.template&&e.template.layout&&io.cleanLayout(e.template.layout),e};function hc(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=jh(t,a,!0))}io.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}io.hasParent=function(e,r){for(var t=tN(r);t;){if(t in e)return!0;t=tN(t)}return!1};var Qpe=["x","y","z"];io.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var Uy=Sr(),e1e=Pr(),r1e=Nb(),er=Ee(),Tt=er.nestedProperty,S_=eh(),xn=US(),Ai=gr(),Xy=If(),_r=ea(),fn=Or(),t1e=$x(),a1e=hi(),M_=jr(),n1e=Tr(),i1e=__().initInteractions,o1e=ll(),l1e=zo().clearOutline,vN=js().dfltConfig,By=QF(),oa=lN(),dt=xy(),ls=Xi(),s1e=Ca().AX_NAME_PATTERN,k_=0,sN=5;function u1e(e,r,t,a){var n;if(e=er.getGraphDiv(e),S_.init(e),er.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var o=S_.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(o===!1)return Promise.reject();!r&&!t&&!er.isPlotDiv(e)&&er.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(n)return Jr.addFrames(e,n)}dN(e,a),t||(t={}),Uy.select(e).classed("js-plotly-plot",!0),M_.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(oa.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=oa.cleanLayout(t)),_r.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(E1e(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),M_.initGradients(e),M_.initPatterns(e),s&&fn.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&_r.doCalcdata(e);for(var v=0;v=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function pN(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),Yy(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&Yy(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function d1e(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof S.parts[R]!="string";)R--;var D=S.parts[R],z=S.parts[R-1]+"."+D,O=S.parts.slice(0,R).join("."),H=Tt(e.layout,O).get(),V=Tt(a,O).get(),G=S.get();if(E!==void 0){_[M]=E,b[M]=D==="reverse"?E:pl(G);var B=Xy.getLayoutValObject(a,S.parts);if(B&&B.impliedEdits&&E!==null)for(var Y in B.impliedEdits)w(er.relativeAttr(M,Y),B.impliedEdits[Y]);if(["width","height"].indexOf(M)!==-1)if(E){w("autosize",null);var X=M==="height"?"width":"height";w(X,a[X])}else a[M]=e._initialAutoSize[M];else if(M==="autosize")w("width",E?null:a.width),w("height",E?null:a.height);else if(z.match(AN))k(z),Tt(a,O+"._inputRange").set(null);else if(z.match(MN)){k(z),Tt(a,O+"._inputRange").set(null);var Z=Tt(a,O).get();Z._inputDomain&&(Z._input.domain=Z._inputDomain.slice())}else z.match(kN)&&Tt(a,O+"._inputDomain").set(null);if(D==="type"){T=H;var te=V.type==="linear"&&E==="log",fe=V.type==="log"&&E==="linear";if(te||fe){if(!T||!T.range)w(O+".autorange",!0);else if(V.autorange)te&&(T.range=T.range[1]>T.range[0]?[1,2]:[2,1]);else{var le=T.range[0],ie=T.range[1];te?(le<=0&&ie<=0&&w(O+".autorange",!0),le<=0?le=ie/1e6:ie<=0&&(ie=le/1e6),w(O+".range[0]",Math.log(le)/Math.LN10),w(O+".range[1]",Math.log(ie)/Math.LN10)):(w(O+".range[0]",Math.pow(10,le)),w(O+".range[1]",Math.pow(10,ie)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[S.parts[0]]&&S.parts[1]==="radialaxis"&&delete a[S.parts[0]]._subplot.viewInitial["radialaxis.range"],Ai.getComponentMethod("annotations","convertCoords")(e,V,E,w),Ai.getComponentMethod("images","convertCoords")(e,V,E,w)}else w(O+".autorange",!0),w(O+".range",null);Tt(a,O+"._inputRange").set(null)}else if(D.match(s1e)){var K=Tt(a,M).get(),he=(E||{}).type;(!he||he==="-")&&(he="linear"),Ai.getComponentMethod("annotations","convertCoords")(e,K,he,w),Ai.getComponentMethod("images","convertCoords")(e,K,he,w)}var oe=By.containerArrayMatch(M);if(oe){f=oe.array,c=oe.index;var ye=oe.property,ue=B||{editType:"calc"};c!==""&&ye===""&&(By.isAddVal(E)?b[M]=null:By.isRemoveVal(E)?b[M]=(Tt(t,f).get()||[])[c]:er.warn("unrecognized full object value",r)),ls.update(y,ue),u[f]||(u[f]={});var de=u[f][c];de||(de=u[f][c]={}),de[ye]=E,delete r[M]}else D==="reverse"?(H.range?H.range.reverse():(w(O+".autorange",!0),H.range=[1,0]),V.autorange?y.calc=!0:y.plot=!0):(M==="dragmode"&&(E===!1&&G!==!1||E!==!1&&G===!1)||a._has("scatter-like")&&a._has("regl")&&M==="dragmode"&&(E==="lasso"||E==="select")&&!(G==="lasso"||G==="select")?y.plot=!0:B?ls.update(y,B):y.calc=!0,S.set(E))}}for(f in u){var W=By.applyContainerArrayChanges(e,i(t,f),u[f],y,i);W||(y.plot=!0)}for(var Q in x){T=fn.getFromId(e,Q);var j=T&&T._constraintGroup;if(j){y.calc=!0;for(var pe in j)x[pe]||(fn.getFromId(e,pe)._constraintShrinkable=!0)}}(qN(e)||r.height||r.width)&&(y.plot=!0);var me=a.shapes;for(c=0;c1;)if(a.pop(),t=Tt(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function x1e(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function l(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var c=0;return function(){if(u&&++c===f)return u()}}return new Promise(function(u,f){function c(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var D=a._frameQueue.pop();D.onInterrupt&&D.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function v(D){if(D.length!==0){for(var z=0;za._timeToNext&&p()};D()}var y=0;function _(D){return Array.isArray(n)?y>=n.length?D.transitionOpts=n[y]:D.transitionOpts=n[0]:D.transitionOpts=n,y++,D}var b,w,x=[],T=r==null,k=Array.isArray(r),M=!T&&!k&&er.isPlainObject(r);if(M)x.push({type:"object",data:_(er.extendFlat({},r))});else if(T||["string","number"].indexOf(typeof r)!==-1)for(b=0;b0&&PP)&&R.push(w);x=R}}x.length>0?v(x):(e.emit("plotly_animated"),u())})}function S1e(e,r,t){if(e=er.getGraphDiv(e),r==null)return Promise.resolve();if(!er.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 a,n,i,o,l=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=l.length+r.length*2,f=[],c={};for(a=r.length-1;a>=0;a--)if(er.isPlainObject(r[a])){var v=r[a].name,d=(s[v]||c[v]||{}).name,p=r[a].name,m=s[d]||c[d];d&&p&&typeof p=="number"&&m&&k_S.index?-1:M.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&er.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),o.unshift({type:"insert",index:a,value:n[a]});var l=_r.modifyFrames,s=_r.modifyFrames,u=[e,o],f=[e,i];return xn&&xn.add(e,l,u,s,f),_r.modifyFrames(e,i)}function L1e(e){e=er.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return _r.cleanPlot([],{},t,r),_r.purge(e),S_.purge(e),r._container&&r._container.remove(),delete e._context,e}function C1e(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!er.equalDomRects(t,r._lastBBox)){var a=r._invTransform=er.inverseTransformMatrix(er.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function E1e(e){var r=Uy.select(e),t=e._fullLayout;if(t._calcInverseTransform=C1e,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};Uy.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=er.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(o1e.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Jr.animate=k1e;Jr.addFrames=S1e;Jr.deleteFrames=q1e;Jr.addTraces=xN;Jr.deleteTraces=_N;Jr.extendTraces=gN;Jr.moveTraces=q_;Jr.prependTraces=bN;Jr.newPlot=h1e;Jr._doPlot=u1e;Jr.purge=L1e;Jr.react=T1e;Jr.redraw=v1e;Jr.relayout=Zh;Jr.restyle=Vy;Jr.setPlotConfig=f1e;Jr.update=jy;Jr._guiRelayout=C_(Zh);Jr._guiRestyle=C_(Vy);Jr._guiUpdate=C_(jy);Jr._storeDirectGUIEdit=m1e});var yl=N(Io=>{"use strict";var D1e=gr();Io.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Io.getRedrawFunc=function(e){return function(){D1e.getComponentMethod("colorbar","draw")(e)}};Io.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Io.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var LN=window.URL||window.webkitURL;Io.createObjectURL=function(e){return LN.createObjectURL(e)};Io.revokeObjectURL=function(e){return LN.revokeObjectURL(e)};Io.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=P1e(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Io.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function P1e(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var P_=Sr(),hPe=Ee(),R1e=jr(),F1e=Tr(),dPe=ll(),D_=/"/g,Jh="TOBESTRIPPED",N1e=new RegExp('("'+Jh+")|("+Jh+'")',"g");function z1e(e){var r=P_.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function I1e(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}CN.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,o=n._toppaper,l=n.width,s=n.height,u;i.insert("rect",":first-child").call(R1e.setRect,0,0,l,s).call(F1e.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var O1e=Ee(),B1e=Qs().EventEmitter,$h=yl();function H1e(e){var r=e.emitter||new B1e,t=new Promise(function(a,n){var i=window.Image,o=e.svg,l=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,c=e.height||150,v=u*f,d=u*c,p=s.getContext("2d",{willReadFrequently:!0}),m=new i,y,_;l==="svg"||O1e.isSafari()?_=$h.encodeSVG(o):(y=$h.createBlob(o,"svg"),_=$h.createObjectURL(y)),s.width=v,s.height=d,m.onload=function(){var b;switch(y=null,$h.revokeObjectURL(_),l!=="svg"&&p.drawImage(m,0,0,v,d),l){case"jpeg":b=s.toDataURL("image/jpeg");break;case"png":b=s.toDataURL("image/png");break;case"webp":b=s.toDataURL("image/webp");break;case"svg":b=_;break;default:var w="Image format is not jpeg, png, svg or webp.";if(n(new Error(w)),!e.promise)return r.emit("error",w)}a(b),e.promise||r.emit("success",b)},m.onerror=function(b){if(y=null,$h.revokeObjectURL(_),n(b),!e.promise)return r.emit("error",b)},m.src=_});return e.promise?t:r}EN.exports=H1e});var F_=N((mPe,RN)=>{"use strict";var DN=Pr(),PN=E_(),U1e=ea(),Oo=Ee(),Kh=yl(),G1e=$y(),Y1e=Ky(),V1e=ep().version,R_={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 W1e(e,r){r=r||{};var t,a,n,i;Oo.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=Oo.getGraphDiv(e),t=Oo.extendDeep([],e.data),a=Oo.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function o(k){return!(k in r)||Oo.validate(r[k],R_[k])}if(!o("width")&&r.width!==null||!o("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Oo.join2(R_.format.values,", "," or ")+".");var l={};function s(k,M){return Oo.coerce(r,l,R_,k,M)}var u=s("format"),f=s("width"),c=s("height"),v=s("scale"),d=s("setBackground"),p=s("imageDataOnly"),m=document.createElement("div");m.style.position="absolute",m.style.left="-5000px",document.body.appendChild(m);var y=Oo.extendFlat({},a);f?y.width=f:r.width===null&&DN(i.width)&&(y.width=i.width),c?y.height=c:r.height===null&&DN(i.height)&&(y.height=i.height);var _=Oo.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),b=Kh.getRedrawFunc(m);function w(){return new Promise(function(k){setTimeout(k,Kh.getDelay(m._fullLayout))})}function x(){return new Promise(function(k,M){var S=G1e(m,u,v),E=m._fullLayout.width,P=m._fullLayout.height;function R(){PN.purge(m),document.body.removeChild(m)}if(u==="full-json"){var D=U1e.graphJson(m,!1,"keepdata","object",!0,!0);return D.version=V1e,D=JSON.stringify(D),R(),k(p?D:Kh.encodeJSON(D))}if(R(),u==="svg")return k(p?S:Kh.encodeSVG(S));var z=document.createElement("canvas");z.id=Oo.randstr(),Y1e({format:u,width:E,height:P,scale:v,canvas:z,svg:S,promise:!0}).then(k).catch(M)})}function T(k){return p?k.replace(Kh.IMAGE_URL_PREFIX,""):k}return new Promise(function(k,M){PN.newPlot(m,t,y,_).then(b).then(w).then(x).then(function(S){k(T(S))}).catch(function(S){M(S)})})}RN.exports=W1e});var IN=N((gPe,zN)=>{"use strict";var Mi=Ee(),j1e=ea(),Z1e=If(),X1e=js().dfltConfig,oo=Mi.isPlainObject,Mu=Array.isArray,FN=Mi.isArrayOrTypedArray;zN.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=Z1e.get(),n=[],i={_context:Mi.extendFlat({},X1e)},o,l;Mu(r)?(i.data=Mi.extendDeep([],r),o=r):(i.data=[],o=[],n.push(ka("array","data"))),oo(t)?(i.layout=Mi.extendDeep({},t),l=t):(i.layout={},l={},arguments.length>1&&n.push(ka("object","layout"))),j1e.supplyDefaults(i);for(var s=i._fullData,u=o.length,f=0;fc.length&&a.push(ka("unused",n,u.concat(c.length)));var _=c.length,b=Array.isArray(y);b&&(_=Math.min(_,y.length));var w,x,T,k,M;if(v.dimensions===2)for(x=0;x<_;x++)if(Mu(f[x])){f[x].length>c[x].length&&a.push(ka("unused",n,u.concat(x,c[x].length)));var S=c[x].length;for(w=0;w<(b?Math.min(S,y[x].length):S);w++)T=b?y[x][w]:y,k=f[x][w],M=c[x][w],Mi.validate(k,T)?M!==k&&M!==+k&&a.push(ka("dynamic",n,u.concat(x,w),k,M)):a.push(ka("value",n,u.concat(x,w),k))}else a.push(ka("array",n,u.concat(x),f[x]));else for(x=0;x<_;x++)T=b?y[x]:y,k=f[x],M=c[x],Mi.validate(k,T)?M!==k&&M!==+k&&a.push(ka("dynamic",n,u.concat(x),k,M)):a.push(ka("value",n,u.concat(x),k))}else if(v.items&&!p&&Mu(f)){var E=y[Object.keys(y)[0]],P=[],R,D;for(R=0;R{"use strict";var tye=Ee(),em=yl();function aye(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(o,l){var s,u;if(n)return s=em.createBlob(e,t),u=em.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),em.revokeObjectURL(u),s=null,o(r);if(tye.isSafari()){var f=t==="svg"?",":";base64,";return em.octetStream(f+encodeURIComponent(e)),o(r)}l(new Error("download error"))});return i}ON.exports=aye});var N_=N((_Pe,UN)=>{"use strict";var HN=Ee(),nye=F_(),iye=BN(),xPe=yl();function oye(e,r){var t;return HN.isPlainObject(e)||(t=HN.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=nye(e,r),o=r.filename||e.fn||"newplot";o+="."+r.format.replace("-","."),i.then(function(l){return t&&(t._snapshotInProgress=!1),iye(l,o,r.format)}).then(function(l){a(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),n(l)})})}UN.exports=oye});var jN=N(z_=>{"use strict";var On=Ee(),Bn=On.isPlainObject,GN=If(),YN=ea(),lye=mn(),VN=_t(),WN=js().dfltConfig;z_.makeTemplate=function(e){e=On.isPlainObject(e)?e:On.getGraphDiv(e),e=On.extendDeep({_context:WN},{data:e.data,layout:e.layout}),YN.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var p={};Qh(d,p,uye.bind(null,d));var m=On.coerce(d,{},lye,"type"),y=a.data[m];y||(y=a.data[m]=[]),y.push(p)}),Qh(t,a.layout,sye.bind(null,t)),delete a.layout.template;var n=t.template;if(Bn(n)){var i=n.layout,o,l,s,u,f,c;Bn(i)&&rm(i,a.layout);var v=n.data;if(Bn(v)){for(l in a.data)if(s=v[l],Array.isArray(s)){for(f=a.data[l],c=f.length,u=s.length,o=0;o_?o.push({code:"unused",traceType:d,templateCount:y,dataCount:_}):_>y&&o.push({code:"reused",traceType:d,templateCount:y,dataCount:_})}}function b(w,x){for(var T in w)if(T.charAt(0)!=="_"){var k=w[T],M=ki(w,T,x);Bn(k)?(Array.isArray(w)&&k._template===!1&&k.templateitemname&&o.push({code:"missing",path:M,templateitemname:k.templateitemname}),b(k,M)):Array.isArray(k)&&fye(k)&&b(k,M)}}if(b({data:s,layout:l},""),o.length)return o.map(cye)};function fye(e){for(var r=0;r{"use strict";var da=E_();Ct._doPlot=da._doPlot;Ct.newPlot=da.newPlot;Ct.restyle=da.restyle;Ct.relayout=da.relayout;Ct.redraw=da.redraw;Ct.update=da.update;Ct._guiRestyle=da._guiRestyle;Ct._guiRelayout=da._guiRelayout;Ct._guiUpdate=da._guiUpdate;Ct._storeDirectGUIEdit=da._storeDirectGUIEdit;Ct.react=da.react;Ct.extendTraces=da.extendTraces;Ct.prependTraces=da.prependTraces;Ct.addTraces=da.addTraces;Ct.deleteTraces=da.deleteTraces;Ct.moveTraces=da.moveTraces;Ct.purge=da.purge;Ct.addFrames=da.addFrames;Ct.deleteFrames=da.deleteFrames;Ct.animate=da.animate;Ct.setPlotConfig=da.setPlotConfig;var vye=Wv().getGraphDiv,hye=hy().eraseActiveShape;Ct.deleteActiveShape=function(e){return hye(vye(e))};Ct.toImage=F_();Ct.validate=IN();Ct.downloadImage=N_();var ZN=jN();Ct.makeTemplate=ZN.makeTemplate;Ct.validateTemplate=ZN.validateTemplate});var O_=N((APe,JN)=>{"use strict";var I_=Ee(),dye=gr();JN.exports=function(r,t,a,n){var i=n("x"),o=n("y"),l,s=dye.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=I_.minRowLength(i);o?l=Math.min(u,I_.minRowLength(o)):(l=u,n("y0"),n("dy"))}else{if(!o)return 0;l=I_.minRowLength(o),n("x0"),n("dx")}return t._length=l,l}});var dc=N((MPe,QN)=>{"use strict";var $N=Ee().dateTick0,pye=Ft(),yye=pye.ONEWEEK;function KN(e,r){return e%yye===0?$N(r,1):$N(r,0)}QN.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",KN(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var l=n("yperiod");l&&(n("yperiod0",KN(l,t.ycalendar)),n("yperiodalignment"))}}});var tz=N((kPe,rz)=>{"use strict";var ez=["orientation","groupnorm","stackgaps"];rz.exports=function(r,t,a,n){var i=a._scatterStackOpts,o=n("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var u=s[o],f=!1;u?u.traces.push(t):(u=s[o]={traceIndices:[],traces:[t]},f=!0);for(var c={orientation:t.x&&!t.y?"h":"v"},v=0;v{"use strict";var az=Tr(),nz=vi().hasColorscale,iz=ul(),mye=Pn();oz.exports=function(r,t,a,n,i,o){var l=mye.isBubble(r),s=(r.line||{}).color,u;if(o=o||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",l?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",a),nz(r,"marker")&&iz(r,t,n,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:l?u=az.background:u=az.defaultLine,i("marker.line.color",u),nz(r,"marker.line")&&iz(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",l?1:0)),l&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var H_=N((qPe,lz)=>{"use strict";var gye=Ee().isArrayOrTypedArray,bye=vi().hasColorscale,xye=ul();lz.exports=function(r,t,a,n,i,o){o||(o={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),i("line.color",a),bye(r,"line"))xye(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(gye(l)?!1:l)||a;i("line.color",s)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var U_=N((LPe,sz)=>{"use strict";sz.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var G_=N((CPe,uz)=>{"use strict";var _ye=Ee();uz.exports=function(e,r,t,a,n){n=n||{},a("textposition"),_ye.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var Y_=N((EPe,cz)=>{"use strict";var am=Tr(),fz=Ee().isArrayOrTypedArray;function wye(e){for(var r=am.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var vz=Ee(),Tye=gr(),Aye=wi(),Mye=Hh(),pc=Pn(),kye=O_(),Sye=dc(),qye=tz(),Lye=B_(),Cye=H_(),hz=U_(),Eye=G_(),Dye=Y_(),Pye=Ee().coercePattern;dz.exports=function(r,t,a,n){function i(d,p){return vz.coerce(r,t,Aye,d,p)}var o=kye(r,t,n,i);if(o||(t.visible=!1),!!t.visible){Sye(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var l=qye(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!l&&o{"use strict";var Rye=Tu().getAxisGroup;yz.exports=function(r,t,a,n,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=Rye(a,l)+o,u=a._alignmentOpts||{},f=n("alignmentgroup"),c=u[s];c||(c=u[s]={});var v=c[f];v?v.traces.push(t):v=c[f]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=v.offsetGroups,m=p[d];t._offsetIndex=0,(i!=="group"||d)&&(m||(m=p[d]={offsetIndex:Object.keys(p).length}),t._offsetIndex=m.offsetIndex)}});var gz=N((RPe,mz)=>{"use strict";var Fye=Ee(),Nye=e0(),zye=wi();mz.exports=function(r,t){var a,n,i,o=t.scattermode;function l(v){return Fye.coerce(n._input,n,zye,v)}if(t.scattermode==="group")for(i=0;i=0;f--){var c=r[f];if(c.type==="scatter"&&c.xaxis===s.xaxis&&c.yaxis===s.yaxis){c.opacity=void 0;break}}}}}});var xz=N((FPe,bz)=>{"use strict";var Iye=Ee(),Oye=Yp();bz.exports=function(e,r){function t(n,i){return Iye.coerce(e,r,Oye,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var yc=N((NPe,wz)=>{"use strict";var Bye=Pr(),_z=Ee(),Hye=_z.dateTime2ms,nm=_z.incrementMonth,Uye=Ft(),Gye=Uye.ONEAVGMONTH;wz.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var o=r[a+"period"],l;if(Bye(o)){if(o=+o,o<=0)return{vals:n}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",c=i==="end",v=r[a+"period0"],d=Hye(v,u)||0,p=[],m=[],y=[],_=n.length,b=0;b<_;b++){var w=n[b],x,T,k;if(l){for(x=Math.round((w-d)/(l*Gye)),k=nm(d,l*x,u);k>w;)k=nm(k,-l,u);for(;k<=w;)k=nm(k,l,u);T=nm(k,-l,u)}else{for(x=Math.round((w-d)/o),k=d+x*o;k>w;)k-=o;for(;k<=w;)k+=o;T=k-o}p[b]=f?T:c?k:(T+k)/2,m[b]=T,y[b]=k}return{vals:p,starts:m,ends:y}}});var j_=N((zPe,Az)=>{"use strict";var V_=vi().hasColorscale,W_=oh(),Tz=Pn();Az.exports=function(r,t){Tz.hasLines(t)&&V_(t,"line")&&W_(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),Tz.hasMarkers(t)&&(V_(t,"marker")&&W_(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),V_(t,"marker.line")&&W_(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var im=N((IPe,Mz)=>{"use strict";var Yt=Ee();Mz.exports=function(r,t){for(var a=0;a{"use strict";var kz=Ee();Sz.exports=function(r,t){kz.isArrayOrTypedArray(t.selectedpoints)&&kz.tagSelected(r,t)}});var lm=N((BPe,Rz)=>{"use strict";var qz=Pr(),X_=Ee(),r0=Or(),Lz=yc(),Z_=Ft().BADNUM,J_=Pn(),Yye=j_(),Vye=im(),Wye=om();function jye(e,r){var t=e._fullLayout,a=r._xA=r0.getFromId(e,r.xaxis||"x","x"),n=r._yA=r0.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),l=Lz(r,a,"x",i),s=Lz(r,n,"y",o),u=l.vals,f=s.vals,c=r._length,v=new Array(c),d=r.ids,p=$_(r,t,a,n),m=!1,y,_,b,w,x,T;Dz(t,r);var k="x",M="y",S;if(p)X_.pushUnique(p.traceIndices,r.index),y=p.orientation==="v",y?(M="s",S="x"):(k="s",S="y"),x=p.stackgaps==="interpolate";else{var E=Ez(r,c);Cz(e,r,a,n,u,f,E)}var P=!!r.xperiodalignment,R=!!r.yperiodalignment;for(_=0;__&&v[w].gap;)w--;for(T=v[w].s,b=v.length-1;b>w;b--)v[b].s=T;for(;_{"use strict";Fz.exports=sm;var Zye=Ee().distinctVals;function sm(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var Si=Pr(),ss=Ee().isArrayOrTypedArray,mc=Ft().BADNUM,Xye=gr(),t0=Or(),Jye=Tu().getAxisGroup,um=Nz();function $ye(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;us+o||!Si(l))}for(var f=0;f{"use strict";var Hz=lm(),Uz=fm().setGroupPositions;function ume(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;uE[f]&&f{"use strict";var cme=jr(),Zz=Ft(),a0=Zz.BADNUM,Xz=Zz.LOG_CLIP,Vz=Xz+.5,Wz=Xz-.5,cm=Ee(),vme=cm.segmentsIntersect,jz=cm.constrain,a4=Hh();Jz.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,o=n.type==="log",l=i.type==="log",s=n._length,u=i._length,f=t.backoff,c=a.marker,v=t.connectGaps,d=t.baseTolerance,p=t.shape,m=p==="linear",y=a.fill&&a.fill!=="none",_=[],b=a4.minTolerance,w=r.length,x=new Array(w),T=0,k,M,S,E,P,R,D,z,O,H,V,G,B,Y,X,Z;function te(Oe){var ne=r[Oe];if(!ne)return!1;var ve=t.linearized?n.l2p(ne.x):n.c2p(ne.x),De=t.linearized?i.l2p(ne.y):i.c2p(ne.y);if(ve===a0){if(o&&(ve=n.c2p(ne.x,!0)),ve===a0)return!1;l&&De===a0&&(ve*=Math.abs(n._m*u*(n._m>0?Vz:Wz)/(i._m*s*(i._m>0?Vz:Wz)))),ve*=1e3}if(De===a0){if(l&&(De=i.c2p(ne.y,!0)),De===a0)return!1;De*=1e3}return[ve,De]}function fe(Oe,ne,ve,De){var qe=ve-Oe,ar=De-ne,hr=.5-Oe,ur=.5-ne,Ar=qe*qe+ar*ar,Wr=qe*hr+ar*ur;if(Wr>0&&Wr1||Math.abs(hr.y-ve[0][1])>1)&&(hr=[hr.x,hr.y],De&&he(hr,Oe)ue||Oe[1]W)return[jz(Oe[0],ye,ue),jz(Oe[1],de,W)]}function Be(Oe,ne){if(Oe[0]===ne[0]&&(Oe[0]===ye||Oe[0]===ue)||Oe[1]===ne[1]&&(Oe[1]===de||Oe[1]===W))return!0}function ze(Oe,ne){var ve=[],De=Ie(Oe),qe=Ie(ne);return De&&qe&&Be(De,qe)||(De&&ve.push(De),qe&&ve.push(qe)),ve}function Pe(Oe,ne,ve){return function(De,qe){var ar=Ie(De),hr=Ie(qe),ur=[];if(ar&&hr&&Be(ar,hr))return ur;ar&&ur.push(ar),hr&&ur.push(hr);var Ar=2*cm.constrain((De[Oe]+qe[Oe])/2,ne,ve)-((ar||De)[Oe]+(hr||qe)[Oe]);if(Ar){var Wr;ar&&hr?Wr=Ar>0==ar[Oe]>hr[Oe]?ar:hr:Wr=ar||hr,Wr[Oe]+=Ar}return ur}}var Xe;p==="linear"||p==="spline"?Xe=Re:p==="hv"||p==="vh"?Xe=ze:p==="hvh"?Xe=Pe(0,ye,ue):p==="vhv"&&(Xe=Pe(1,de,W));function Ue(Oe,ne){var ve=ne[0]-Oe[0],De=(ne[1]-Oe[1])/ve,qe=(Oe[1]*ne[0]-ne[1]*Oe[0])/ve;return qe>0?[De>0?ye:ue,W]:[De>0?ue:ye,de]}function se(Oe){var ne=Oe[0],ve=Oe[1],De=ne===x[T-1][0],qe=ve===x[T-1][1];if(!(De&&qe))if(T>1){var ar=ne===x[T-2][0],hr=ve===x[T-2][1];De&&(ne===ye||ne===ue)&&ar?hr?T--:x[T-1]=Oe:qe&&(ve===de||ve===W)&&hr?ar?T--:x[T-1]=Oe:x[T++]=Oe}else x[T++]=Oe}function Te(Oe){x[T-1][0]!==Oe[0]&&x[T-1][1]!==Oe[1]&&se([me,we]),se(Oe),Ne=null,me=we=0}var Se=cm.isArrayOrTypedArray(c);function ir(Oe){if(Oe&&f&&(Oe.i=k,Oe.d=r,Oe.trace=a,Oe.marker=Se?c[Oe.i]:c,Oe.backoff=f),le=Oe[0]/s,ie=Oe[1]/u,j=Oe[0]ue?ue:0,pe=Oe[1]W?W:0,j||pe){if(!T)x[T++]=[j||Oe[0],pe||Oe[1]];else if(Ne){var ne=Xe(Ne,Oe);ne.length>1&&(Te(ne[0]),x[T++]=ne[1])}else Fe=Xe(x[T-1],Oe)[0],x[T++]=Fe;var ve=x[T-1];j&&pe&&(ve[0]!==j||ve[1]!==pe)?(Ne&&(me!==j&&we!==pe?se(me&&we?Ue(Ne,Oe):[me||j,we||pe]):me&&we&&se([me,we])),se([j,pe])):me-j&&we-pe&&se([j||me,pe||we]),Ne=Oe,me=j,we=pe}else Ne&&Te(Xe(Ne,Oe)[0]),x[T++]=Oe}for(k=0;kK(R,Qe))break;S=R,B=O[0]*z[0]+O[1]*z[1],B>V?(V=B,E=R,D=!1):B=r.length||!R)break;ir(R),M=R}}Ne&&se([me||Ne[0],we||Ne[1]]),_.push(x.slice(0,T))}var Le=p.slice(p.length-1);if(f&&Le!=="h"&&Le!=="v"){for(var Ce=!1,Ge=-1,Ze=[],Ye=0;Ye<_.length;Ye++)for(var He=0;He<_[Ye].length-1;He++){var $e=_[Ye][He],cr=_[Ye][He+1],lr=cme.applyBackoff(cr,$e);(lr[0]!==cr[0]||lr[1]!==cr[1])&&(Ce=!0),Ze[Ge+1]||(Ge++,Ze[Ge]=[$e,[lr[0],lr[1]]])}return Ce?Ze:_}return _}});var Qz=N((VPe,Kz)=>{"use strict";var $z={tonextx:1,tonexty:1,tonext:1};Kz.exports=function(r,t,a){var n,i,o,l,s,u={},f=!1,c=-1,v=0,d=-1;for(i=0;i=0?s=d:(s=d=v,v++),s{"use strict";var lo=Sr(),hme=gr(),n0=Ee(),bc=n0.ensureSingle,rI=n0.identity,Vt=jr(),xc=Pn(),dme=n4(),pme=Qz(),vm=r_().tester;tI.exports=function(r,t,a,n,i,o){var l,s,u=!i,f=!!i&&i.duration>0,c=pme(r,t,a);if(l=n.selectAll("g.trace").data(c,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),yme(r,l,t),f){o&&(s=o());var v=lo.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});v.each(function(){n.selectAll("g.trace").each(function(d,p){eI(r,p,t,d,c,this,i)})})}else l.each(function(d,p){eI(r,p,t,d,c,this,i)});u&&l.exit().remove(),n.selectAll("path:not([d])").remove()};function yme(e,r,t){r.each(function(a){var n=bc(lo.select(this),"g","fills");Vt.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var l=n.selectAll("g").data(o,rI);l.enter().append("g"),l.exit().each(function(s){i[s]=null}).remove(),l.order().each(function(s){i[s]=bc(lo.select(this),"path","js-fill")})})}function eI(e,r,t,a,n,i,o){var l=e._context.staticPlot,s;mme(e,r,t,a,n);var u=!!o&&o.duration>0;function f(Pe){return u?Pe.transition():Pe}var c=t.xaxis,v=t.yaxis,d=a[0].trace,p=d.line,m=lo.select(i),y=bc(m,"g","errorbars"),_=bc(m,"g","lines"),b=bc(m,"g","points"),w=bc(m,"g","text");if(hme.getComponentMethod("errorbars","plot")(e,y,t,o),d.visible!==!0)return;f(m).style("opacity",d.opacity);var x,T,k=d.fill.charAt(d.fill.length-1);k!=="x"&&k!=="y"&&(k="");var M,S;k==="y"?(M=1,S=v.c2p(0,!0)):k==="x"&&(M=0,S=c.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=m;var E="",P=[],R=d._prevtrace,D=null,z=null;R&&(E=R._prevRevpath||"",T=R._nextFill,P=R._ownPolygons,D=R._fillsegments,z=R._fillElement);var O,H,V="",G="",B,Y,X,Z,te,fe,le=[];d._polygons=[];var ie=[],K=[],he=n0.noop;if(x=d._ownFill,xc.hasLines(d)||d.fill!=="none"){T&&T.datum(a),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(B=Vt.steps(p.shape),Y=Vt.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?B=Y=function(Pe){var Xe=Pe[Pe.length-1];return Pe.length>1&&Pe[0][0]===Xe[0]&&Pe[0][1]===Xe[1]?Vt.smoothclosed(Pe.slice(1),p.smoothing):Vt.smoothopen(Pe,p.smoothing)}:B=Y=function(Pe){return"M"+Pe.join("L")},X=function(Pe){return Y(Pe.reverse())},K=dme(a,{xaxis:c,yaxis:v,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),ie=new Array(K.length);var oe=0;for(s=0;s=l[0]&&m.x<=l[1]&&m.y>=s[0]&&m.y<=s[1]}),v=Math.ceil(c.length/f),d=0;n.forEach(function(m,y){var _=m[0].trace;xc.hasMarkers(_)&&_.marker.maxdisplayed>0&&y{"use strict";aI.exports={container:"marker",min:"cmin",max:"cmax"}});var o4=N((ZPe,nI)=>{"use strict";var hm=Or();nI.exports=function(r,t,a){var n={},i={_fullLayout:a},o=hm.getFromTrace(i,t,"x"),l=hm.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=hm.tickText(o,o.c2l(s),!0).text,n.yLabel=hm.tickText(l,l.c2l(u),!0).text,n}});var ku=N((XPe,iI)=>{"use strict";var l4=Sr(),_c=jr(),gme=gr();function bme(e){var r=l4.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=l4.select(this),n=t.trace||t[0].trace;s4(a,n,e)}),r.selectAll("g.text").each(function(t){var a=l4.select(this),n=t.trace||t[0].trace;u4(a,n,e)}),r.selectAll("g.trace path.js-line").call(_c.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(_c.fillGroupStyle,e,!1),gme.getComponentMethod("errorbars","style")(r)}function s4(e,r,t){_c.pointStyle(e.selectAll("path.point"),r,t)}function u4(e,r,t){_c.textPointStyle(e.selectAll("text"),r,t)}function xme(e,r,t){var a=r[0].trace;a.selectedpoints?(_c.selectedPointStyle(t.selectAll("path.point"),a),_c.selectedTextStyle(t.selectAll("text"),a)):(s4(t,a,e),u4(t,a,e))}iI.exports={style:bme,stylePoints:s4,styleText:u4,styleOnSelect:xme}});var lI=N((JPe,oI)=>{"use strict";var wc=Tr(),_me=Pn();oI.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&wc.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,o=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&wc.opacity(i)?i:o&&wc.opacity(o)&&(t.mlw||((r.marker||{}).line||{}).width)?o:"",n?wc.opacity(n)<.3?wc.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&wc.opacity(a)&&_me.hasLines(r)&&r.line.width?a:r.fillcolor)}});var c4=N(($Pe,uI)=>{"use strict";var dm=Ee(),sI=Fn(),wme=gr(),Tme=lI(),f4=Tr(),Ame=dm.fillText;uI.exports=function(r,t,a,n){var i=r.cd,o=i[0].trace,l=r.xa,s=r.ya,u=l.c2p(t),f=s.c2p(a),c=[u,f],v=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,m=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var y=function(G){if(p){var B=l.c2p(G.xStart),Y=l.c2p(G.xEnd);return u>=Math.min(B,Y)&&u<=Math.max(B,Y)?0:1/0}var X=Math.max(3,G.mrc||0),Z=1-1/X,te=Math.abs(l.c2p(G.x)-u);return te=Math.min(B,Y)&&f<=Math.max(B,Y)?0:1/0}var X=Math.max(3,G.mrc||0),Z=1-1/X,te=Math.abs(s.c2p(G.y)-f);return tele!=W>=le&&(ye=he[K-1][0],ue=he[K][0],W-de&&(oe=ye+(ue-ye)*(le-de)/(W-de),X=Math.min(X,oe),Z=Math.max(Z,oe)));return X=Math.max(X,0),Z=Math.min(Z,l._length),{x0:X,x1:Z,y0:le,y1:le}}if(v.indexOf("fills")!==-1&&o._fillElement){var O=D(o._fillElement)&&!D(o._fillExclusionElement);if(O){var H=z(o._polygons);H===null&&(H={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var V=f4.defaultLine;return f4.opacity(o.fillcolor)?V=o.fillcolor:f4.opacity((o.line||{}).color)&&(V=o.line.color),dm.extendFlat(r,{distance:r.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:V,hovertemplate:!1}),delete r.index,o.text&&!dm.isArrayOrTypedArray(o.text)?r.text=String(o.text):r.text=o.name,[r]}}}});var v4=N((KPe,cI)=>{"use strict";var fI=Pn();cI.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l=a[0].trace,s,u,f,c,v=!fI.hasMarkers(l)&&!fI.hasText(l);if(v)return[];if(t===!1)for(s=0;s{"use strict";vI.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var mI=N((eRe,yI)=>{"use strict";var o0=gr().traceIs,h4=x1();yI.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(Mme(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function Mme(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=kme(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=a+"calendar",l=i[o],s={noMultiCategory:!o0(i,"cartesian")||o0(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,pI(i,a)){var u=dI(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(pI(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function dI(e){return{v:"x",h:"y"}[e.orientation||"v"]}function pI(e,r){var t=dI(e),a=o0(e,"box-violin"),n=o0(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var bI=N((rRe,gI)=>{"use strict";var Sme=Wn().isTypedArraySpec;function qme(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,o;if(r.axData)n=r.axData;else for(n=[],i=0;i0||Sme(i),l;o&&(l="array");var s=a("categoryorder",l),u;s==="array"&&(u=a("categoryarray")),!o&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=qme(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var d4=N((tRe,_I)=>{"use strict";var xI=Sn().mix,Lme=li(),Cme=Ee();_I.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function o(M,S){return Cme.coerce2(r,t,n.attributes,M,S)}var l=o("linecolor",i),s=o("linewidth"),u=a("showline",n.showLine||!!l||!!s);u||(delete t.linecolor,delete t.linewidth);var f=xI(i,n.bgColor,n.blend||Lme.lightFraction).toRgbString(),c=o("gridcolor",f),v=o("gridwidth"),d=o("griddash"),p=a("showgrid",n.showGrid||!!c||!!v||!!d);if(p||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var m=xI(t.gridcolor,n.bgColor,67).toRgbString(),y=o("minor.gridcolor",m),_=o("minor.gridwidth",t.gridwidth||1),b=o("minor.griddash",t.griddash||"solid"),w=a("minor.showgrid",!!y||!!_||!!b);w||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var x=o("zerolinecolor",i),T=o("zerolinewidth"),k=a("zeroline",n.showGrid||!!x||!!T);k||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var y4=N((aRe,SI)=>{"use strict";var wI=Pr(),Eme=gr(),l0=Ee(),Dme=_t(),Pme=eo(),p4=hi(),TI=r1(),AI=t1(),Rme=n1(),Fme=i1(),Nme=bI(),zme=d4(),Ime=$x(),MI=Zf(),pm=Ca().WEEKDAY_PATTERN,Ome=Ca().HOUR_PATTERN;SI.exports=function(r,t,a,n,i){var o=n.letter,l=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},c=t.type||f.type||"-",v;if(c==="date"){var d=Eme.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(v=a("ticklabelmode"))}!n.noTicklabelindex&&(c==="date"||c==="linear")&&a("ticklabelindex");var p="";(!n.noTicklabelposition||c==="multicategory")&&(p=l0.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),MI(t,i),Ime(r,t,a,n),Nme(r,t,a,n),c!=="category"&&!n.noHover&&a("hoverformat");var m=a("color"),y=m!==p4.color.dflt?m:l.color,_=s.label||i._dfltTitle[o];if(Fme(r,t,a,c,n),!u)return t;a("title.text",_),l0.coerceFont(a,"title.font",l,{overrideDflt:{size:l0.bigFont(l.size),color:y}}),TI(r,t,a,c);var b=n.hasMinor;if(b&&(Dme.newContainer(t,"minor"),TI(r,t,a,c,{isMinor:!0})),Rme(r,t,a,c,n),AI(r,t,a,n),b){var w=n.isMinor;n.isMinor=!0,AI(r,t,a,n),n.isMinor=w}zme(r,t,a,{dfltColor:m,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:b,attributes:p4}),b&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var x=c==="multicategory";if(!n.noTickson&&(c==="category"||x)&&(t.ticks||t.showgrid)){var T;x&&(T="boundaries");var k=a("tickson",T);k==="boundaries"&&delete t.ticklabelposition}if(x){var M=a("showdividers");M&&(a("dividercolor"),a("dividerwidth"))}if(c==="date")if(Pme(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Bme}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var S=0;S=2){var o="",l,s;if(i.length===2){for(l=0;l<2;l++)if(s=kI(i[l]),s){o=pm;break}}var u=a("pattern",o);if(u===pm)for(l=0;l<2;l++)s=kI(i[l]),s&&(r.bounds[l]=i[l]=s-1);if(u)for(l=0;l<2;l++)switch(s=i[l],u){case pm:if(!wI(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[l]=i[l]=s;break;case Ome:if(!wI(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[l]=i[l]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var Ume=Pr(),ym=Ee();qI.exports=function(r,t,a,n){var i=n.counterAxes||[],o=n.overlayableAxes||[],l=n.letter,s=n.grid,u=n.overlayingDomain,f,c,v,d,p,m;s&&(c=s._domains[l][s._axisMap[t._id]],f=s._anchors[t._id],c&&(v=s[l+"side"].split(" ")[0],d=s.domain[l][v==="right"||v==="top"?1:0])),c=c||[0,1],f=f||(Ume(r.position)?"free":i[0]||"free"),v=v||(l==="x"?"bottom":"left"),d=d||0,p=0,m=!1;var y=ym.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),_=ym.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(y==="free"){if(l==="y"){var b=a("autoshift");b&&(d=_==="left"?u[0]:u[1],m=t.automargin?t.automargin:!0,p=_==="left"?-3:3),a("shift",p)}a("position",d)}a("automargin",m);var w=!1;if(o.length&&(w=ym.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!w){var x=a("domain",c);x[0]>x[1]-1/4096&&(t.domain=c),ym.noneOrAll(r.domain,t.domain,c),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var zI=N((iRe,NI)=>{"use strict";var Su=Ee(),LI=Tr(),Gme=qo().isUnifiedHover,Yme=A5(),CI=_t(),Vme=Sf(),EI=hi(),Wme=mI(),DI=y4(),jme=Tu(),PI=m4(),b4=va(),Bo=b4.id2name,RI=b4.name2id,Zme=Ca().AX_ID_PATTERN,FI=gr(),mm=FI.traceIs,g4=FI.getComponentMethod;function gm(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}NI.exports=function(r,t,a){var n=t.autotypenumbers,i={},o={},l={},s={},u={},f={},c={},v={},d={},p={},m,y;for(m=0;m{"use strict";var Xme=Sr(),II=gr(),bm=Ee(),Kn=jr(),xm=Or();OI.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){xm.redrawComponents(r);return}function o(y){var _=y.xaxis,b=y.yaxis;i._defs.select("#"+y.clipId+"> rect").call(Kn.setTranslate,0,0).call(Kn.setScale,1,1),y.plot.call(Kn.setTranslate,_._offset,b._offset).call(Kn.setScale,1,1);var w=y.plot.selectAll(".scatterlayer .trace");w.selectAll(".point").call(Kn.setPointGroupScale,1,1),w.selectAll(".textpoint").call(Kn.setTextPointsScale,1,1),w.call(Kn.hideOutsideRangePoints,y)}function l(y,_){var b=y.plotinfo,w=b.xaxis,x=b.yaxis,T=w._length,k=x._length,M=!!y.xr1,S=!!y.yr1,E=[];if(M){var P=bm.simpleMap(y.xr0,w.r2l),R=bm.simpleMap(y.xr1,w.r2l),D=P[1]-P[0],z=R[1]-R[0];E[0]=(P[0]*(1-_)+_*R[0]-P[0])/(P[1]-P[0])*T,E[2]=T*(1-_+_*z/D),w.range[0]=w.l2r(P[0]*(1-_)+_*R[0]),w.range[1]=w.l2r(P[1]*(1-_)+_*R[1])}else E[0]=0,E[2]=T;if(S){var O=bm.simpleMap(y.yr0,x.r2l),H=bm.simpleMap(y.yr1,x.r2l),V=O[1]-O[0],G=H[1]-H[0];E[1]=(O[1]*(1-_)+_*H[1]-O[1])/(O[0]-O[1])*k,E[3]=k*(1-_+_*G/V),x.range[0]=w.l2r(O[0]*(1-_)+_*H[0]),x.range[1]=x.l2r(O[1]*(1-_)+_*H[1])}else E[1]=0,E[3]=k;xm.drawOne(r,w,{skipTitle:!0}),xm.drawOne(r,x,{skipTitle:!0}),xm.redrawComponents(r,[w._id,x._id]);var B=M?T/E[2]:1,Y=S?k/E[3]:1,X=M?E[0]:0,Z=S?E[1]:0,te=M?E[0]/E[2]*T:0,fe=S?E[1]/E[3]*k:0,le=w._offset-te,ie=x._offset-fe;b.clipRect.call(Kn.setTranslate,X,Z).call(Kn.setScale,1/B,1/Y),b.plot.call(Kn.setTranslate,le,ie).call(Kn.setScale,B,Y),Kn.setPointGroupScale(b.zoomScalePts,1/B,1/Y),Kn.setTextPointsScale(b.zoomScaleTxt,1/B,1/Y)}var s;n&&(s=n());function u(){for(var y={},_=0;_a.duration?(u(),d=window.cancelAnimationFrame(m)):d=window.requestAnimationFrame(m)}return c=Date.now(),d=window.requestAnimationFrame(m),Promise.resolve()}});var qi=N(Ka=>{"use strict";var wm=Sr(),HI=gr(),qu=Ee(),Jme=ea(),$me=jr(),UI=jp().getModuleCalcData,us=va(),so=Ca(),Kme=ll(),at=qu.ensureSingle;function _m(e,r,t){return qu.ensureSingle(e,r,t,function(a){a.datum(t)})}var Lu=so.zindexSeparator;Ka.name="cartesian";Ka.attr=["xaxis","yaxis"];Ka.idRoot=["x","y"];Ka.idRegex=so.idRegex;Ka.attrRegex=so.attrRegex;Ka.attributes=hI();Ka.layoutAttributes=hi();Ka.supplyLayoutDefaults=zI();Ka.transitionAxes=BI();Ka.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,o=i,l={},s={},u,f,c;for(u=0;u0){var d=v.id;if(d.indexOf(Lu)!==-1)continue;d+=Lu+(u+1),v=qu.extendFlat({},v,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],m,y=0;y1&&(T+=Lu+x),w.push(l+T),o=0;o1,c=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=at(a,"path","xlines-above"),r.ylines=at(a,"path","ylines-above"),r.xaxislayer=at(a,"g","xaxislayer-above"),r.yaxislayer=at(a,"g","yaxislayer-above");else{if(!o){var v=at(a,"g","layer-subplot");r.shapelayer=at(v,"g","shapelayer"),r.imagelayer=at(v,"g","imagelayer"),c&&f?(r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer):(r.minorGridlayer=at(a,"g","minor-gridlayer"),r.gridlayer=at(a,"g","gridlayer"),r.zerolinelayer=at(a,"g","zerolinelayer"));var d=at(a,"g","layer-between");r.shapelayerBetween=at(d,"g","shapelayer"),r.imagelayerBetween=at(d,"g","imagelayer"),at(a,"path","xlines-below"),at(a,"path","ylines-below"),r.overlinesBelow=at(a,"g","overlines-below"),at(a,"g","xaxislayer-below"),at(a,"g","yaxislayer-below"),r.overaxesBelow=at(a,"g","overaxes-below")}r.overplot=at(a,"g","overplot"),r.plot=at(r.overplot,"g",n),o||(r.xlines=at(a,"path","xlines-above"),r.ylines=at(a,"path","ylines-above"),r.overlinesAbove=at(a,"g","overlines-above"),at(a,"g","xaxislayer-above"),at(a,"g","yaxislayer-above"),r.overaxesAbove=at(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+l),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+l),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var p=c.plotgroup,m=n+"-x",y=n+"-y";r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer,at(c.overlinesBelow,"path",m),at(c.overlinesBelow,"path",y),at(c.overaxesBelow,"g",m),at(c.overaxesBelow,"g",y),r.plot=at(c.overplot,"g",n),at(c.overlinesAbove,"path",m),at(c.overlinesAbove,"path",y),at(c.overaxesAbove,"g",m),at(c.overaxesAbove,"g",y),r.xlines=p.select(".overlines-"+l).select("."+m),r.ylines=p.select(".overlines-"+s).select("."+y),r.xaxislayer=p.select(".overaxes-"+l).select("."+m),r.yaxislayer=p.select(".overaxes-"+s).select("."+y)}o||(u||(_m(r.minorGridlayer,"g",r.xaxis._id),_m(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(_){return _[0]}).sort(us.idSort),_m(r.gridlayer,"g",r.xaxis._id),_m(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(_){return _[0]}).sort(us.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function VI(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=wm.select(this);f.remove(),WI(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],o=0;o{"use strict";var Tm=Pn();jI.exports={hasLines:Tm.hasLines,hasMarkers:Tm.hasMarkers,hasText:Tm.hasText,isBubble:Tm.isBubble,attributes:wi(),layoutAttributes:Yp(),supplyDefaults:pz(),crossTraceDefaults:gz(),supplyLayoutDefaults:xz(),calc:lm().calc,crossTraceCalc:Yz(),arraysToCalcdata:im(),plot:i4(),colorbar:i0(),formatLabels:o4(),style:ku().style,styleOnSelect:ku().styleOnSelect,hoverPoints:c4(),selectPoints:v4(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:qi(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var $I=N((uRe,JI)=>{"use strict";var ege=Sr(),rge=Tr(),XI=h_(),x4=Ee(),tge=x4.strScale,age=x4.strRotate,nge=x4.strTranslate;JI.exports=function(r,t,a){var n=r.node(),i=XI[a.arrowhead||0],o=XI[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,c=i.backoff*l+a.standoff,v=o.backoff*s+a.startstandoff,d,p,m,y;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},p={x:+r.attr("x2"),y:+r.attr("y2")};var _=d.x-p.x,b=d.y-p.y;if(m=Math.atan2(b,_),y=m+Math.PI,c&&v&&c+v>Math.sqrt(_*_+b*b)){O();return}if(c){if(c*c>_*_+b*b){O();return}var w=c*Math.cos(m),x=c*Math.sin(m);p.x+=w,p.y+=x,r.attr({x2:p.x,y2:p.y})}if(v){if(v*v>_*_+b*b){O();return}var T=v*Math.cos(m),k=v*Math.sin(m);d.x-=T,d.y-=k,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var M=n.getTotalLength(),S="";if(M{"use strict";var KI=Sr(),_4=gr(),ige=ea(),cs=Ee(),w4=cs.strTranslate,u0=Or(),Cu=Tr(),ml=jr(),QI=Fn(),T4=Ea(),A4=rs(),s0=pi(),oge=_t().arrayEditor,lge=$I();tO.exports={draw:sge,drawOne:eO,drawRaw:rO};function sge(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?qe="right":qe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[qe]}for(var de=!1,W=["x","y"],Q=0;Q1)&&(me===pe?(Qe=we.r2fraction(r["a"+j]),(Qe<0||Qe>1)&&(de=!0)):de=!0),Xe=we._offset+we.r2p(r[j]),Te=.5}else{var Le=ir==="domain";j==="x"?(se=r[j],Xe=Le?we._offset+we._length*se:Xe=l.l+l.w*se):(se=1-r[j],Xe=Le?we._offset+we._length*se:Xe=l.t+l.h*se),Te=r.showarrow?.5:se}if(r.showarrow){Pe.head=Xe;var Ce=r["a"+j];if(Se=Fe*ue(.5,r.xanchor)-Re*ue(.5,r.yanchor),me===pe){var Ge=u0.getRefType(me);Ge==="domain"?(j==="y"&&(Ce=1-Ce),Pe.tail=we._offset+we._length*Ce):Ge==="paper"?j==="y"?(Ce=1-Ce,Pe.tail=l.t+l.h*Ce):Pe.tail=l.l+l.w*Ce:Pe.tail=we._offset+we.r2p(Ce),Ue=Se}else Pe.tail=Xe+Ce,Ue=Se+Ce;Pe.text=Pe.tail+Se;var Ze=o[j==="x"?"width":"height"];if(pe==="paper"&&(Pe.head=cs.constrain(Pe.head,1,Ze-1)),me==="pixel"){var Ye=-Math.max(Pe.tail-3,Pe.text),He=Math.min(Pe.tail+3,Pe.text)-Ze;Ye>0?(Pe.tail+=Ye,Pe.text+=Ye):He>0&&(Pe.tail-=He,Pe.text-=He)}Pe.tail+=ze,Pe.head+=ze}else Se=Ie*ue(Te,Be),Ue=Se,Pe.text=Xe+Se;Pe.text+=ze,Se+=ze,Ue+=ze,r["_"+j+"padplus"]=Ie/2+Ue,r["_"+j+"padminus"]=Ie/2-Ue,r["_"+j+"size"]=Ie,r["_"+j+"shift"]=Se}if(de){M.remove();return}var $e=0,cr=0;if(r.align!=="left"&&($e=(K-le)*(r.align==="center"?.5:1)),r.valign!=="top"&&(cr=(he-ie)*(r.valign==="middle"?.5:1)),te)Z.select("svg").attr({x:P+$e-1,y:P+cr}).call(ml.setClipUrl,D?m:null,e);else{var lr=P+cr-fe.top,Oe=P+$e-fe.left;V.call(T4.positionText,Oe,lr).call(ml.setClipUrl,D?m:null,e)}z.select("rect").call(ml.setRect,P,P,K,he),R.call(ml.setRect,S/2,S/2,oe-S,ye-S),M.call(ml.setTranslate,Math.round(y.x.text-oe/2),Math.round(y.y.text-ye/2)),w.attr({transform:"rotate("+_+","+y.x.text+","+y.y.text+")"});var ne=function(De,qe){b.selectAll(".annotation-arrow-g").remove();var ar=y.x.head,hr=y.y.head,ur=y.x.tail+De,Ar=y.y.tail+qe,Wr=y.x.text+De,Vr=y.y.text+qe,zr=cs.rotationXYMatrix(_,Wr,Vr),Et=cs.apply2DTransform(zr),Dt=cs.apply2DTransform2(zr),ma=+R.attr("width"),St=+R.attr("height"),ja=Wr-.5*ma,ga=ja+ma,jt=Vr-.5*St,Na=jt+St,br=[[ja,jt,ja,Na],[ja,Na,ga,Na],[ga,Na,ga,jt],[ga,jt,ja,jt]].map(Dt);if(!br.reduce(function(ut,xa){return ut^!!cs.segmentsIntersect(ar,hr,ar+1e6,hr+1e6,xa[0],xa[1],xa[2],xa[3])},!1)){br.forEach(function(ut){var xa=cs.segmentsIntersect(ur,Ar,ar,hr,ut[0],ut[1],ut[2],ut[3]);xa&&(ur=xa.x,Ar=xa.y)});var pt=r.arrowwidth,Nr=r.arrowcolor,st=r.arrowside,Pt=b.append("g").style({opacity:Cu.opacity(Nr)}).classed("annotation-arrow-g",!0),Qr=Pt.append("path").attr("d","M"+ur+","+Ar+"L"+ar+","+hr).style("stroke-width",pt+"px").call(Cu.stroke,Cu.rgb(Nr));if(lge(Qr,st,r),s.annotationPosition&&Qr.node().parentNode&&!a){var ct=ar,ba=hr;if(r.standoff){var Zt=Math.sqrt(Math.pow(ar-ur,2)+Math.pow(hr-Ar,2));ct+=r.standoff*(ur-ar)/Zt,ba+=r.standoff*(Ar-hr)/Zt}var tn=Pt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ur-ct)+","+(Ar-ba),transform:w4(ct,ba)}).style("stroke-width",pt+6+"px").call(Cu.stroke,"rgba(0,0,0,0)").call(Cu.fill,"rgba(0,0,0,0)"),Tn,Xt;s0.init({element:tn.node(),gd:e,prepFn:function(){var ut=ml.getTranslate(M);Tn=ut.x,Xt=ut.y,n&&n.autorange&&v(n._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0)},moveFn:function(ut,xa){var Ko=Et(Tn,Xt),Qo=Ko[0]+ut,vt=Ko[1]+xa;M.call(ml.setTranslate,Qo,vt),d("x",fs(n,ut,"x",l,r)),d("y",fs(i,xa,"y",l,r)),r.axref===r.xref&&d("ax",fs(n,ut,"ax",l,r)),r.ayref===r.yref&&d("ay",fs(i,xa,"ay",l,r)),Pt.attr("transform",w4(ut,xa)),w.attr({transform:"rotate("+_+","+Qo+","+vt+")"})},doneFn:function(){_4.call("_guiRelayout",e,p());var ut=document.querySelector(".js-notes-box-panel");ut&&ut.redraw(ut.selectedObj)}})}}};if(r.showarrow&&ne(0,0),x){var ve;s0.init({element:M.node(),gd:e,prepFn:function(){ve=w.attr("transform")},moveFn:function(De,qe){var ar="pointer";if(r.showarrow)r.axref===r.xref?d("ax",fs(n,De,"ax",l,r)):d("ax",r.ax+De),r.ayref===r.yref?d("ay",fs(i,qe,"ay",l.w,r)):d("ay",r.ay+qe),ne(De,qe);else{if(a)return;var hr,ur;if(n)hr=fs(n,De,"x",l,r);else{var Ar=r._xsize/l.w,Wr=r.x+(r._xshift-r.xshift)/l.w-Ar/2;hr=s0.align(Wr+De/l.w,Ar,0,1,r.xanchor)}if(i)ur=fs(i,qe,"y",l,r);else{var Vr=r._ysize/l.h,zr=r.y-(r._yshift+r.yshift)/l.h-Vr/2;ur=s0.align(zr-qe/l.h,Vr,0,1,r.yanchor)}d("x",hr),d("y",ur),(!n||!i)&&(ar=s0.getCursor(n?.5:hr,i?.5:ur,r.xanchor,r.yanchor))}w.attr({transform:w4(De,qe)+ve}),A4(M,ar)},clickFn:function(De,qe){r.captureevents&&e.emit("plotly_clickannotation",k(qe))},doneFn:function(){A4(M),_4.call("_guiRelayout",e,p());var De=document.querySelector(".js-notes-box-panel");De&&De.redraw(De.selectedObj)}})}}s.annotationText?V.call(T4.makeEditable,{delegate:M,gd:e}).call(G).on("edit",function(Y){r.text=Y,this.call(G),d("text",Y),n&&n.autorange&&v(n._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0),_4.call("_guiRelayout",e,p())}):V.call(G)}});var sO=N((cRe,lO)=>{"use strict";var aO=Ee(),uge=gr(),nO=_t().arrayEditor;lO.exports={hasClickToShow:fge,onClick:cge};function fge(e,r){var t=oO(e,r);return t.on.length>0||t.explicitOff.length>0}function cge(e,r){var t=oO(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},o=e._fullLayout.annotations,l,s;if(a.length||n.length){for(l=0;l{"use strict";var M4=Ee(),Tc=Tr();uO.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),o=n("bordercolor"),l=Tc.opacity(o);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),M4.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var c=n("arrowside"),v,d;c.indexOf("end")!==-1&&(v=n("arrowhead"),d=n("arrowsize")),c.indexOf("start")!==-1&&(n("startarrowhead",v),n("startarrowsize",d)),n("arrowcolor",l?t.bordercolor:Tc.defaultLine),n("arrowwidth",(l&&s||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),m=a.hoverlabel||{};if(p){var y=n("hoverlabel.bgcolor",m.bgcolor||(Tc.opacity(i)?Tc.rgb(i):Tc.defaultLine)),_=n("hoverlabel.bordercolor",m.bordercolor||Tc.contrast(y)),b=M4.extendFlat({},m.font);b.color||(b.color=_),M4.coerceFont(n,"hoverlabel.font",b)}n("captureevents",!!p)}});var cO=N((hRe,fO)=>{"use strict";var S4=Ee(),Eu=Or(),vge=eo(),hge=k4(),dge=vc();fO.exports=function(r,t){vge(r,t,{name:"annotations",handleItemDefaults:pge})};function pge(e,r,t){function a(w,x){return S4.coerce(e,r,dge,w,x)}var n=a("visible"),i=a("clicktoshow");if(n||i){hge(e,r,t,a);for(var o=r.showarrow,l=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var c=l[f],v=Eu.coerceRef(e,r,u,c,"","paper");if(v!=="paper"){var d=Eu.getFromId(u,v);d._annIndices.push(r._index)}if(Eu.coercePosition(r,u,a,v,c,.5),o){var p="a"+c,m=Eu.coerceRef(e,r,u,p,"pixel",["pixel","paper"]);m!=="pixel"&&m!==v&&(m=r[p]="pixel");var y=m==="pixel"?s[f]:.4;Eu.coercePosition(r,u,a,m,p,y)}a(c+"anchor"),a(c+"shift")}if(S4.noneOrAll(e,r,["x","y"]),o&&S4.noneOrAll(e,r,["ax","ay"]),i){var _=a("xclick"),b=a("yclick");r._xclick=_===void 0?r.x:Eu.cleanPosition(_,u,r.xref),r._yclick=b===void 0?r.y:Eu.cleanPosition(b,u,r.yref)}}}});var dO=N((dRe,hO)=>{"use strict";var q4=Ee(),Du=Or(),yge=Am().draw;hO.exports=function(r){var t=r._fullLayout,a=q4.filterVisible(t.annotations);if(a.length&&r._fullData.length)return q4.syncOrAsync([yge,mge],r)};function mge(e){var r=e._fullLayout;q4.filterVisible(r.annotations).forEach(function(t){var a=Du.getFromId(e,t.xref),n=Du.getFromId(e,t.yref),i=Du.getRefType(t.xref),o=Du.getRefType(t.yref);t._extremes={},i==="range"&&vO(t,a),o==="range"&&vO(t,n)})}function vO(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],o=e[a+"ref"],l=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],c=3*e.arrowsize*e.arrowwidth||0,v=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,m=p+f,y=p-f,_;if(l===o){var b=Du.findExtremes(r,[r.r2c(n)],{ppadplus:v,ppadminus:d}),w=Du.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,m),ppadminus:Math.max(u,y)});_={min:[b.min[0],w.min[0]],max:[b.max[0],w.max[0]]}}else m=i?m+i:m,y=i?y-i:y,_=Du.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,v,m),ppadminus:Math.max(u,d,y)});e._extremes[t]=_}});var yO=N((pRe,pO)=>{"use strict";var gge=Pr(),bge=fp();pO.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(!(i||o))return;var l=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function c(d){var p=u[d],m=null;i?m=bge(p,t.range):m=Math.pow(10,p),gge(m)||(m=null),n(f+d,m)}for(var v=0;v{"use strict";var L4=Am(),mO=sO();gO.exports={moduleType:"component",name:"annotations",layoutAttributes:vc(),supplyLayoutDefaults:cO(),includeBasePlot:Uh()("annotations"),calcAutorange:dO(),draw:L4.draw,drawOne:L4.drawOne,drawRaw:L4.drawRaw,hasClickToShow:mO.hasClickToShow,onClick:mO.onClick,convertCoords:yO()}});var Mm=N((mRe,xO)=>{"use strict";var Mt=vc(),xge=Xi().overrideAll,_ge=_t().templatedArray;xO.exports=xge(_ge("annotation",{visible:Mt.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Mt.xanchor,xshift:Mt.xshift,yanchor:Mt.yanchor,yshift:Mt.yshift,text:Mt.text,textangle:Mt.textangle,font:Mt.font,width:Mt.width,height:Mt.height,opacity:Mt.opacity,align:Mt.align,valign:Mt.valign,bgcolor:Mt.bgcolor,bordercolor:Mt.bordercolor,borderpad:Mt.borderpad,borderwidth:Mt.borderwidth,showarrow:Mt.showarrow,arrowcolor:Mt.arrowcolor,arrowhead:Mt.arrowhead,startarrowhead:Mt.startarrowhead,arrowside:Mt.arrowside,arrowsize:Mt.arrowsize,startarrowsize:Mt.startarrowsize,arrowwidth:Mt.arrowwidth,standoff:Mt.standoff,startstandoff:Mt.startstandoff,hovertext:Mt.hovertext,hoverlabel:Mt.hoverlabel,captureevents:Mt.captureevents}),"calc","from-root")});var wO=N((gRe,_O)=>{"use strict";var C4=Ee(),wge=Or(),Tge=eo(),Age=k4(),Mge=Mm();_O.exports=function(r,t,a){Tge(r,t,{name:"annotations",handleItemDefaults:kge,fullLayout:a.fullLayout})};function kge(e,r,t,a){function n(l,s){return C4.coerce(e,r,Mge,l,s)}function i(l){var s=l+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],wge.coercePosition(r,u,n,l,l,.5)}var o=n("visible");o&&(Age(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),C4.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),C4.noneOrAll(e,r,["ax","ay"])))}});var kO=N((bRe,MO)=>{"use strict";var TO=Ee(),AO=Or();MO.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function E4(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function qge(e,r){var t=E4(e.projection,E4(e.view,E4(e.model,[r[0],r[1],r[2],1])));return t}SO.exports=qge});var CO=N((_Re,LO)=>{"use strict";var Lge=Am().drawRaw,Cge=qO(),Ege=["x","y","z"];LO.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(o._pdata=Cge(r.glplot.cameraParams,[t.xaxis.r2l(o.x)*a[0],t.yaxis.r2l(o.y)*a[1],t.zaxis.r2l(o.z)*a[2]]),Lge(r.graphDiv,o,i,r.id,o._xa,o._ya))}}});var PO=N((wRe,DO)=>{"use strict";var Dge=gr(),EO=Ee();DO.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Mm()}}},layoutAttributes:Mm(),handleDefaults:wO(),includeBasePlot:Pge,convert:kO(),draw:CO()};function Pge(e,r){var t=Dge.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var RO=vc(),FO=fa(),NO=wi().line,Rge=si().dash,uo=bt().extendFlat,Fge=_t().templatedArray,TRe=Bh(),Ac=mn(),Nge=La().shapeTexttemplateAttrs,zge=Ap();zO.exports=Fge("shape",{visible:uo({},Ac.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:uo({},Ac.legend,{editType:"calc+arraydraw"}),legendgroup:uo({},Ac.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:uo({},Ac.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:FO({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:uo({},Ac.legendrank,{editType:"calc+arraydraw"}),legendwidth:uo({},Ac.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:uo({},RO.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:uo({},RO.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:uo({},NO.color,{editType:"arraydraw"}),width:uo({},NO.width,{editType:"calc+arraydraw"}),dash:uo({},Rge,{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:Nge({},{keys:Object.keys(zge)}),font:FO({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 BO=N((MRe,OO)=>{"use strict";var f0=Ee(),Mc=Or(),Ige=eo(),Oge=D4(),IO=ns();OO.exports=function(r,t){Ige(r,t,{name:"shapes",handleItemDefaults:Hge})};function Bge(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Hge(e,r,t){function a(Y,X){return f0.coerce(e,r,Oge,Y,X)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),f0.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var o=a("path"),l=o?"path":"rect",s=a("type",l),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),v=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var m=d[p],y=m+"anchor",_=m==="x"?c:v,b={_fullLayout:t},w,x,T,k=Mc.coerceRef(e,r,b,m,void 0,"paper"),M=Mc.getRefType(k);if(M==="range"?(w=Mc.getFromId(b,k),w._shapeIndices.push(r._index),T=IO.rangeToShapePosition(w),x=IO.shapePositionToRange(w),(w.type==="category"||w.type==="multicategory")&&(a(m+"0shift"),a(m+"1shift"))):x=T=f0.identity,u){var S=.25,E=.75,P=m+"0",R=m+"1",D=e[P],z=e[R];e[P]=x(e[P],!0),e[R]=x(e[R],!0),_==="pixel"?(a(P,0),a(R,10)):(Mc.coercePosition(r,b,a,k,P,S),Mc.coercePosition(r,b,a,k,R,E)),r[P]=T(r[P]),r[R]=T(r[R]),e[P]=D,e[R]=z}if(_==="pixel"){var O=e[y];e[y]=x(e[y],!0),Mc.coercePosition(r,b,a,k,y,.25),r[y]=T(r[y]),e[y]=O}}u&&f0.noneOrAll(e,r,["x0","x1","y0","y1"]);var H=s==="line",V,G;if(u&&(V=a("label.texttemplate")),V||(G=a("label.text")),G||V){a("label.textangle");var B=a("label.textposition",H?"middle":"middle center");a("label.xanchor"),a("label.yanchor",Bge(H,B)),a("label.padding"),f0.coerceFont(a,"label.font",t.font)}}}});var GO=N((kRe,UO)=>{"use strict";var Uge=Tr(),HO=Ee();function Gge(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}UO.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),HO.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Uge.contrast(i)),a("newshape.line.dash")}var o=r.dragmode==="drawline",l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(l||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Gge(o,u)),a("newshape.label.padding"),HO.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var ZO=N((SRe,jO)=>{"use strict";var P4=Ee(),kc=Or(),Sc=_h(),VO=ns();jO.exports=function(r){var t=r._fullLayout,a=P4.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+o:o;return{ppad:o,ppadplus:l?c:v,ppadminus:l?v:c}}else return{ppad:o}}function YO(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,o,l=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],o=r[a+"1"],n&&(l=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],o=r[a+"anchor"]),i!==void 0)return[u(i)+l,u(o)+s];if(r.path){var c=1/0,v=-1/0,d=r.path.match(Sc.segmentRE),p,m,y,_,b;for(e.type==="date"&&(u=VO.decodeDate(u)),p=0;pv&&(v=b)));if(v>=c)return[c,v]}}});var $O=N((qRe,JO)=>{"use strict";var XO=hy();JO.exports={moduleType:"component",name:"shapes",layoutAttributes:D4(),supplyLayoutDefaults:BO(),supplyDrawNewShapeDefaults:GO(),includeBasePlot:Uh()("shapes"),calcAutorange:ZO(),draw:XO.draw,drawOne:XO.drawOne}});var R4=N((CRe,QO)=>{"use strict";var KO=Ca(),Wge=_t().templatedArray,LRe=Bh();QO.exports=Wge("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",KO.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",KO.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var rB=N((ERe,eB)=>{"use strict";var jge=Ee(),F4=Or(),Zge=eo(),Xge=R4(),Jge="images";eB.exports=function(r,t){var a={name:Jge,handleItemDefaults:$ge};Zge(r,t,a)};function $ge(e,r,t){function a(v,d){return jge.coerce(e,r,Xge,v,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:t},l=["x","y"],s=0;s<2;s++){var u=l[s],f=F4.coerceRef(e,r,o,u,"paper",void 0);if(f!=="paper"){var c=F4.getFromId(o,f);c._imgIndices.push(r._index)}F4.coercePosition(r,o,a,f,u,0)}return r}});var iB=N((DRe,nB)=>{"use strict";var tB=Sr(),Kge=jr(),qc=Or(),aB=va(),Qge=ll();nB.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],o,l;for(l=0;l{"use strict";var oB=Pr(),e2e=fp();lB.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(i||o){for(var l=r._fullLayout.images,s=t._id.charAt(0),u,f,c=0;c{"use strict";uB.exports={moduleType:"component",name:"images",layoutAttributes:R4(),supplyLayoutDefaults:rB(),includeBasePlot:Uh()("images"),draw:iB(),convertCoords:sB()}});var km=N((FRe,cB)=>{"use strict";cB.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 N4=N((NRe,hB)=>{"use strict";var r2e=fa(),t2e=li(),a2e=bt().extendFlat,n2e=Xi().overrideAll,i2e=Mp(),vB=_t().templatedArray,o2e=vB("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}});hB.exports=n2e(vB("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:o2e,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:a2e(i2e({editType:"arraydraw"}),{}),font:r2e({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:t2e.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var mB=N((zRe,yB)=>{"use strict";var Sm=Ee(),dB=eo(),pB=N4(),l2e=km(),s2e=l2e.name,u2e=pB.buttons;yB.exports=function(r,t){var a={name:s2e,handleItemDefaults:f2e};dB(r,t,a)};function f2e(e,r,t){function a(o,l){return Sm.coerce(e,r,pB,o,l)}var n=dB(e,r,{name:"buttons",handleItemDefaults:c2e}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Sm.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Sm.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c2e(e,r){function t(n,i){return Sm.coerce(e,r,u2e,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var xB=N((IRe,bB)=>{"use strict";bB.exports=It;var fo=Sr(),gB=Tr(),Lc=jr(),qm=Ee();function It(e,r,t){this.gd=e,this.container=r,this.id=t,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})}It.barWidth=2;It.barLength=20;It.barRadius=2;It.barPad=1;It.barColor="#808BA4";It.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,o=n.height;this.position=r;var l=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,c=this.position.direction,v=c==="down",d=c==="left",p=c==="right",m=c==="up",y=s,_=f,b,w,x,T;!v&&!d&&!p&&!m&&(this.position.direction="down",v=!0);var k=v||m;k?(b=l,w=b+y,v?(x=u,T=Math.min(x+_,o),_=T-x):(T=u+_,x=Math.max(T-_,0),_=T-x)):(x=u,T=x+_,d?(w=l+y,b=Math.max(w-y,0),y=w-b):(b=l,w=Math.min(b+y,i),y=w-b)),this._box={l:b,t:x,w:y,h:_};var M=s>y,S=It.barLength+2*It.barPad,E=It.barWidth+2*It.barPad,P=l,R=u+f;R+E>o&&(R=o-E);var D=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(gB.fill,It.barColor),M?(this.hbar=D.attr({rx:It.barRadius,ry:It.barRadius,x:P,y:R,width:S,height:E}),this._hbarXMin=P+S/2,this._hbarTranslateMax=y-S):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=f>_,O=It.barWidth+2*It.barPad,H=It.barLength+2*It.barPad,V=l+s,G=u;V+O>i&&(V=i-O);var B=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-vertical",!0).call(gB.fill,It.barColor),z?(this.vbar=B.attr({rx:It.barRadius,ry:It.barRadius,x:V,y:G,width:O,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=_-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Y=this.id,X=b-.5,Z=z?w+O+.5:w+.5,te=x-.5,fe=M?T+E+.5:T+.5,le=n._topdefs.selectAll("#"+Y).data(M||z?[0]:[]);if(le.exit().remove(),le.enter().append("clipPath").attr("id",Y).append("rect"),M||z?(this._clipRect=le.select("rect").attr({x:Math.floor(X),y:Math.floor(te),width:Math.ceil(Z)-Math.floor(X),height:Math.ceil(fe)-Math.floor(te)}),this.container.call(Lc.setClipUrl,Y,this.gd),this.bg.attr({x:l,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Lc.setClipUrl,null),delete this._clipRect),M||z){var ie=fo.behavior.drag().on("dragstart",function(){fo.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ie);var K=fo.behavior.drag().on("dragstart",function(){fo.event.sourceEvent.preventDefault(),fo.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(K),z&&this.vbar.on(".drag",null).call(K)}this.setTranslate(t,a)};It.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Lc.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)};It.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=fo.event.dx),this.vbar&&(t-=fo.event.dy),this.setTranslate(r,t)};It.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=fo.event.deltaY),this.vbar&&(t+=fo.event.deltaY),this.setTranslate(r,t)};It.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=qm.constrain(fo.event.x,a,n),o=(i-a)/(n-a),l=this.position.w-this._box.w;r=o*l}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=qm.constrain(fo.event.y,s,u),c=(f-s)/(u-s),v=this.position.h-this._box.h;t=c*v}this.setTranslate(r,t)};It.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=qm.constrain(r||0,0,a),t=qm.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(Lc.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(Lc.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var o=t/n;this.vbar.call(Lc.setTranslate,r,t+o*this._vbarTranslateMax)}}});var CB=N((ORe,LB)=>{"use strict";var Cc=Sr(),c0=ea(),v0=Tr(),Ec=jr(),Qn=Ee(),Lm=Ea(),v2e=_t().arrayEditor,wB=Xa().LINE_SPACING,wr=km(),h2e=xB();LB.exports=function(r){var t=r._fullLayout,a=Qn.filterVisible(t[wr.name]);function n(v){c0.autoMargin(r,SB(v))}var i=t._menulayer.selectAll("g."+wr.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(wr.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){Cc.select(this).selectAll("g."+wr.headerGroupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+wr.headerGroupClassName).data(a,d2e);o.enter().append("g").classed(wr.headerGroupClassName,!0);for(var l=Qn.ensureSingle(i,"g",wr.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),s=0;s{"use strict";var _2e=km();EB.exports={moduleType:"component",name:_2e.name,layoutAttributes:N4(),supplyLayoutDefaults:mB(),draw:CB()}});var d0=N((HRe,PB)=>{"use strict";PB.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 B4=N((URe,NB)=>{"use strict";var RB=fa(),w2e=Mp(),T2e=bt().extendDeepAll,A2e=Xi().overrideAll,M2e=jv(),FB=_t().templatedArray,Pu=d0(),k2e=FB("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}});NB.exports=A2e(FB("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:k2e,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:T2e(w2e({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:M2e.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:RB({})},font:RB({}),activebgcolor:{valType:"color",dflt:Pu.gripBgActiveColor},bgcolor:{valType:"color",dflt:Pu.railBgColor},bordercolor:{valType:"color",dflt:Pu.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Pu.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Pu.tickLength},tickcolor:{valType:"color",dflt:Pu.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Pu.minorTickLength}}),"arraydraw","from-root")});var BB=N((GRe,OB)=>{"use strict";var Dc=Ee(),zB=eo(),IB=B4(),S2e=d0(),q2e=S2e.name,L2e=IB.steps;OB.exports=function(r,t){zB(r,t,{name:q2e,handleItemDefaults:C2e})};function C2e(e,r,t){function a(c,v){return Dc.coerce(e,r,IB,c,v)}for(var n=zB(e,r,{name:"steps",handleItemDefaults:E2e}),i=0,o=0;o{"use strict";var co=Sr(),Cm=ea(),vs=Tr(),vo=jr(),ei=Ee(),D2e=ei.strTranslate,p0=Ea(),P2e=_t().arrayEditor,Fr=d0(),G4=Xa(),GB=G4.LINE_SPACING,H4=G4.FROM_TL,U4=G4.FROM_BR;XB.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=R2e(a,r),i=a._infolayer.selectAll("g."+Fr.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Fr.containerClassName,!0).style("cursor",t?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Cm.autoMargin(r,YB(f))}if(i.exit().each(function(){co.select(this).selectAll("g."+Fr.groupClassName).each(o)}).remove(),n.length!==0){var l=i.selectAll("g."+Fr.groupClassName).data(n,F2e);l.enter().append("g").classed(Fr.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",D2e(o-Fr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function Y4(e,r){var t=e._dims;return t.inputAreaStart+Fr.stepInset+(t.inputAreaLength-2*Fr.stepInset)*Math.min(1,Math.max(0,r))}function UB(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Fr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Fr.stepInset-2*t.inputAreaStart)))}function U2e(e,r,t){var a=t._dims,n=ei.ensureSingle(e,"rect",Fr.railTouchRectClass,function(i){i.call(jB,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Fr.tickOffset+t.ticklen+a.labelHeight)}).call(vs.fill,t.bgcolor).attr("opacity",0),vo.setTranslate(n,0,a.currentValueTotalHeight)}function G2e(e,r){var t=r._dims,a=t.inputAreaLength-Fr.railInset*2,n=ei.ensureSingle(e,"rect",Fr.railRectClass);n.attr({width:a,height:Fr.railWidth,rx:Fr.railRadius,ry:Fr.railRadius,"shape-rendering":"crispEdges"}).call(vs.stroke,r.bordercolor).call(vs.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),vo.setTranslate(n,Fr.railInset,(t.inputAreaWidth-Fr.railWidth)*.5+t.currentValueTotalHeight)}});var KB=N((VRe,$B)=>{"use strict";var Y2e=d0();$B.exports={moduleType:"component",name:Y2e.name,layoutAttributes:B4(),supplyLayoutDefaults:BB(),draw:JB()}});var Dm=N((WRe,eH)=>{"use strict";var QB=li();eH.exports={bgcolor:{valType:"color",dflt:QB.background,editType:"plot"},bordercolor:{valType:"color",dflt:QB.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 V4=N((jRe,rH)=>{"use strict";rH.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 Pm=N((ZRe,tH)=>{"use strict";tH.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 iH=N(Fm=>{"use strict";var V2e=va(),W2e=Ea(),aH=Pm(),j2e=Xa().LINE_SPACING,Rm=aH.name;function nH(e){var r=e&&e[Rm];return r&&r.visible}Fm.isVisible=nH;Fm.makeData=function(e){for(var r=V2e.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var Nm=Ee(),oH=_t(),lH=va(),Z2e=Dm(),X2e=V4();sH.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;Nm.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,l=oH.newContainer(i,"rangeslider");function s(T,k){return Nm.coerce(o,l,Z2e,T,k)}var u,f;function c(T,k){return Nm.coerce(u,f,X2e,T,k)}var v=s("visible");if(v){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(o.range)),s("range");var d=t._subplots;if(d)for(var p=d.cartesian.filter(function(T){return T.substr(0,T.indexOf("y"))===lH.name2id(a)}).map(function(T){return T.substr(T.indexOf("y"),T.length)}),m=Nm.simpleMap(p,lH.id2name),y=0;y{"use strict";var J2e=va().list,$2e=fh().getAutoRange,K2e=Pm();fH.exports=function(r){for(var t=J2e(r,"x",!0),a=0;a{"use strict";var zm=Sr(),Q2e=gr(),e3e=ea(),Wt=Ee(),Im=Wt.strTranslate,hH=jr(),hs=Tr(),r3e=jf(),t3e=qi(),W4=va(),a3e=pi(),n3e=rs(),Gr=Pm();dH.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=B.max)V=R[G+1];else if(H=B.pmax)V=R[G+1];else if(H0?e.touches[0].clientX:0}function i3e(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Gr.slideBoxClassName).node(),i=e.select("rect."+Gr.grabAreaMinClassName).node(),o=e.select("rect."+Gr.grabAreaMaxClassName).node();function l(){var s=zm.event,u=s.target,f=vH(s),c=f-e.node().getBoundingClientRect().left,v=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),p=a3e.coverSlip();this.addEventListener("touchmove",m),this.addEventListener("touchend",y),p.addEventListener("mousemove",m),p.addEventListener("mouseup",y);function m(_){var b=vH(_),w=+b-f,x,T,k;switch(u){case n:if(k="ew-resize",v+w>t._length||d+w<0)return;x=v+w,T=d+w;break;case i:if(k="col-resize",v+w>t._length)return;x=v+w,T=d;break;case o:if(k="col-resize",d+w<0)return;x=v,T=d+w;break;default:k="ew-resize",x=c,T=c+w;break}if(T{"use strict";var p3e=Ee(),y3e=Dm(),m3e=V4(),j4=iH();yH.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:p3e.extendFlat({},y3e,{yaxis:m3e})}}},layoutAttributes:Dm(),handleDefaults:uH(),calcAutorange:cH(),draw:pH(),isVisible:j4.isVisible,makeData:j4.makeData,autoMarginOpts:j4.autoMarginOpts}});var Om=N((eFe,bH)=>{"use strict";var g3e=fa(),gH=li(),b3e=_t().templatedArray,x3e=b3e("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"});bH.exports={visible:{valType:"boolean",editType:"plot"},buttons:x3e,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:g3e({editType:"plot"}),bgcolor:{valType:"color",dflt:gH.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:gH.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var Z4=N((rFe,xH)=>{"use strict";xH.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var TH=N((tFe,wH)=>{"use strict";var Bm=Ee(),_3e=Tr(),w3e=_t(),T3e=eo(),_H=Om(),X4=Z4();wH.exports=function(r,t,a,n,i){var o=r.rangeselector||{},l=w3e.newContainer(t,"rangeselector");function s(d,p){return Bm.coerce(o,l,_H,d,p)}var u=T3e(o,l,{name:"buttons",handleItemDefaults:A3e,calendar:i}),f=s("visible",u.length>0);if(f){var c=M3e(t,a,n);s("x",c[0]),s("y",c[1]),Bm.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Bm.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",_3e.contrast(v,X4.lightAmount,X4.darkAmount)),s("bordercolor"),s("borderwidth")}};function A3e(e,r,t,a){var n=a.calendar;function i(s,u){return Bm.coerce(e,r,_H.buttons,s,u)}var o=i("visible");if(o){var l=i("step");l!=="all"&&(n&&n!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function M3e(e,r,t){for(var a=t.filter(function(l){return r[l].anchor===e._id}),n=0,i=0;i{"use strict";var k3e=X3(),S3e=Ee().titleCase;AH.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=q3e(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function q3e(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=k3e["utc"+S3e(n)],o=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+i.offset(a,-o));break;case"todate":var s=i.offset(a,-o);l=e.l2r(+i.ceil(s));break}var u=t[1];return[l,u]}});var PH=N((nFe,DH)=>{"use strict";var Um=Sr(),L3e=gr(),C3e=ea(),kH=Tr(),EH=jr(),gl=Ee(),SH=gl.strTranslate,Hm=Ea(),E3e=va(),K4=Xa(),qH=K4.LINE_SPACING,LH=K4.FROM_TL,CH=K4.FROM_BR,$4=Z4(),D3e=MH();DH.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(P3e(r),R3e);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=Um.select(this),o=n,l=o.rangeselector,s=i.selectAll("g.button").data(gl.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Um.select(this),c=D3e(o,u);u._isActive=F3e(o,u,c),f.call(J4,l,u),f.call(z3e,l,u,r),f.on("click",function(){r._dragged||L3e.call("_guiRelayout",r,c)}),f.on("mouseover",function(){u._isHovered=!0,f.call(J4,l,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(J4,l,u)})}),O3e(r,s,l,o._name,i)})};function P3e(e){for(var r=E3e.list(e,"x",!0),t=[],a=0;a{"use strict";RH.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Om()}}},layoutAttributes:Om(),handleDefaults:TH(),draw:PH()}});var Pc=N(Q4=>{"use strict";var NH=bt().extendFlat;Q4.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",o={x:NH({},t,{}),y:NH({},t,{}),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};Q4.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],o=r.grid;if(o){var l=t("domain.column");l!==void 0&&(l{"use strict";var B3e=Ee(),H3e=Af().counter,U3e=Pc().attributes,zH=Ca().idRegex,G3e=_t(),ew={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:[H3e("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[zH.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[zH.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:U3e({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 Gm(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function Y3e(e,r){var t=e.grid||{},a=Gm(r,t,"x"),n=Gm(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),o=Array.isArray(a),l=Array.isArray(n),s=o&&a!==t.xaxes&&l&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(l&&(u=n.length),o&&(f=a.length));var c=G3e.newContainer(r,"grid");function v(k,M){return B3e.coerce(t,c,ew,k,M)}var d=v("rows",u),p=v("columns",f);if(!(d*p>1)){delete r.grid;return}if(!i&&!o&&!l){var m=v("pattern")==="independent";m&&(i=!0)}c._hasSubplotGrid=i;var y=v("roworder"),_=y==="top to bottom",b=i?.2:.1,w=i?.3:.1,x,T;s&&r._splomGridDflt&&(x=r._splomGridDflt.xside,T=r._splomGridDflt.yside),c._domains={x:IH("x",v,b,x,p),y:IH("y",v,w,T,d,_)}}function IH(e,r,t,a,n,i){var o=r(e+"gap",t),l=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=l[0],f=(l[1]-u)/(n-o),c=f*(1-o),v=0;v{"use strict";UH.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 VH=N((uFe,YH)=>{"use strict";var GH=Pr(),W3e=gr(),j3e=Ee(),Z3e=_t(),X3e=rw();YH.exports=function(e,r,t,a){var n="error_"+a.axis,i=Z3e.newContainer(r,n),o=e[n]||{};function l(p,m){return j3e.coerce(o,i,X3e,p,m)}var s=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=l("visible",s);if(u!==!1){var f=l("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(l("array"),l("traceref"),c||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),c||l("valueminus"));var v="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&l(v,!(o.color||GH(o.thickness)||GH(o.width)))}(!a.inherit||!i[v])&&(l("color",t),l("thickness"),l("width",W3e.traceIs(r,"gl3d")?0:4))}}});var tw=N((fFe,jH)=>{"use strict";jH.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var c=+n[f];return[c,c]};var i=r.arrayminus||[];return function(u,f){var c=+n[f],v=+i[f];return!isNaN(c)||!isNaN(v)?[v||0,c||0]:[NaN,NaN]}}else{var o=WH(t,r.value),l=WH(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=o(u);return[f,f]}:function(u){return[l(u),o(u)]}}};function WH(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var JH=N((cFe,XH)=>{"use strict";var aw=Pr(),J3e=gr(),nw=Or(),$3e=Ee(),K3e=tw();XH.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var $H=Sr(),ds=Pr(),Q3e=jr(),ebe=Pn();KH.exports=function(r,t,a,n){var i,o=a.xaxis,l=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var c=f[0].trace,v=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(b){return b.id});var m=ebe.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!v.visible&&(f=[]);var y=$H.select(this).selectAll("g.errorbar").data(f,p);if(y.exit().remove(),!!f.length){v.visible||y.selectAll("path.xerror").remove(),d.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var _=y.enter().append("g").classed("errorbar",!0);s&&_.style("opacity",0).transition().duration(n.duration).style("opacity",1),Q3e.setClipUrl(y,a.layerClipId,r),y.each(function(b){var w=$H.select(this),x=rbe(b,o,l);if(!(m&&!b.vis)){var T,k=w.select("path.yerror");if(d.visible&&ds(x.x)&&ds(x.yh)&&ds(x.ys)){var M=d.width;T="M"+(x.x-M)+","+x.yh+"h"+2*M+"m-"+M+",0V"+x.ys,x.noYS||(T+="m-"+M+",0h"+2*M),i=!k.size(),i?k=w.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",T)}else k.remove();var S=w.select("path.xerror");if(v.visible&&ds(x.y)&&ds(x.xh)&&ds(x.xs)){var E=(v.copy_ystyle?d:v).width;T="M"+x.xh+","+(x.y-E)+"v"+2*E+"m0,-"+E+"H"+x.xs,x.noXS||(T+="m0,-"+E+"v"+2*E),i=!S.size(),i?S=w.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(S=S.transition().duration(n.duration).ease(n.easing)),S.attr("d",T)}else S.remove()}})}})};function rbe(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),ds(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),ds(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var tU=N((hFe,rU)=>{"use strict";var tbe=Sr(),eU=Tr();rU.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},o=tbe.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(eU.stroke,n.color),i.copy_ystyle&&(i=n),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(eU.stroke,i.color)})}});var iU=N((dFe,nU)=>{"use strict";var y0=Ee(),aU=Xi().overrideAll,m0=rw(),Ru={error_x:y0.extendFlat({},m0),error_y:y0.extendFlat({},m0)};delete Ru.error_x.copy_zstyle;delete Ru.error_y.copy_zstyle;delete Ru.error_y.copy_ystyle;var g0={error_x:y0.extendFlat({},m0),error_y:y0.extendFlat({},m0),error_z:y0.extendFlat({},m0)};delete g0.error_x.copy_ystyle;delete g0.error_y.copy_ystyle;delete g0.error_z.copy_ystyle;delete g0.error_z.copy_zstyle;nU.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ru,bar:Ru,histogram:Ru,scatter3d:aU(g0,"calc","nested"),scattergl:aU(Ru,"calc","nested")}},supplyDefaults:VH(),calc:JH(),makeComputeError:tw(),plot:QH(),style:tU(),hoverInfo:abe};function abe(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var lU=N((pFe,oU)=>{"use strict";oU.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 dU=N((yFe,hU)=>{"use strict";var ps=Sr(),iw=Sn(),Vm=ea(),sU=gr(),bl=Or(),Ym=pi(),Li=Ee(),po=Li.strTranslate,vU=bt().extendFlat,ow=rs(),ho=jr(),lw=Tr(),nbe=jf(),ibe=Ea(),obe=vi().flipScale,lbe=y4(),sbe=m4(),ube=hi(),sw=Xa(),uU=sw.LINE_SPACING,fU=sw.FROM_TL,cU=sw.FROM_BR,zt=lU().cn;function fbe(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+zt.colorbar).data(cbe(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(zt.colorbar,!0),t.each(function(a){var n=ps.select(this);Li.ensureSingle(n,"rect",zt.cbbg),Li.ensureSingle(n,"g",zt.cbfills),Li.ensureSingle(n,"g",zt.cblines),Li.ensureSingle(n,"g",zt.cbaxis,function(o){o.classed(zt.crisp,!0)}),Li.ensureSingle(n,"g",zt.cbtitleunshift,function(o){o.append("g").classed(zt.cbtitle,!0)}),Li.ensureSingle(n,"rect",zt.cboutline);var i=vbe(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&hbe(n,a,e)}),t.exit().each(function(a){Vm.autoMargin(e,a._id)}).remove(),t.order()}function cbe(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,o,l;function s(w){return vU(w,{_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 l.calc=="function"?l.calc(e,o,n):(n._fillgradient=i.reversescale?obe(i.colorscale):i.colorscale,n._zrange=[i[l.min],i[l.max]])}for(var f=0;f1){var Q=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));ue*=Q*Li.roundUp(W/Q,[2,5,10]),(Math.abs(D.start)/D.size+1e-6)%1<2e-6&&(oe.tick0=0)}oe.dtick=ue}oe.domain=a?[K+p/x.h,K+Y-p/x.h]:[K+d/x.w,K+Y-d/x.w],oe.setScale(),e.attr("transform",po(Math.round(x.l),Math.round(x.t)));var j=e.select("."+zt.cbtitleunshift).attr("transform",po(-Math.round(x.l),-Math.round(x.t))),pe=oe.ticklabelposition,me=oe.title.font.size,we=e.select("."+zt.cbaxis),Ne,Fe=0,Re=0;function Ie(Ue,se){var Te={propContainer:oe,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:w._dfltTitle.colorbar,containerGroup:e.select("."+zt.cbtitle)},Se=Ue.charAt(0)==="h"?Ue.substr(1):"h"+Ue;e.selectAll("."+Se+",."+Se+"-math-group").remove(),nbe.draw(t,Ue,vU(Te,se||{}))}function Be(){if(a&&ye||!a&&!ye){var Ue,se;S==="top"&&(Ue=d+x.l+X*m,se=p+x.t+Z*(1-K-Y)+3+me*.75),S==="bottom"&&(Ue=d+x.l+X*m,se=p+x.t+Z*(1-K)-3-me*.25),S==="right"&&(se=p+x.t+Z*y+3+me*.75,Ue=d+x.l+X*K),Ie(oe._id+"title",{attributes:{x:Ue,y:se,"text-anchor":a?"start":"middle"}})}}function ze(){if(a&&!ye||!a&&ye){var Ue=oe.position||0,se=oe._offset+oe._length/2,Te,Se;if(S==="right")Se=se,Te=x.l+X*Ue+10+me*(oe.showticklabels?1:.5);else if(Te=se,S==="bottom"&&(Se=x.t+Z*Ue+10+(pe.indexOf("inside")===-1?oe.tickfont.size:0)+(oe.ticks!=="intside"&&r.ticklen||0)),S==="top"){var ir=M.text.split("
").length;Se=x.t+Z*Ue+10-V-uU*me*ir}Ie((a?"h":"v")+oe._id+"title",{avoid:{selection:ps.select(t).selectAll("g."+oe._id+"tick"),side:S,offsetTop:a?0:x.t,offsetLeft:a?x.l:0,maxShift:a?w.width:w.height},attributes:{x:Te,y:Se,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Pe(){if(!a&&!ye||a&&ye){var Ue=e.select("."+zt.cbtitle),se=Ue.select("text"),Te=[-s/2,s/2],Se=Ue.select(".h"+oe._id+"title-math-group").node(),ir=15.6;se.node()&&(ir=parseInt(se.node().style.fontSize,10)*uU);var Qe;if(Se?(Qe=ho.bBox(Se),Re=Qe.width,Fe=Qe.height,Fe>ir&&(Te[1]-=(Fe-ir)/2)):se.node()&&!se.classed(zt.jsPlaceholder)&&(Qe=ho.bBox(se.node()),Re=Qe.width,Fe=Qe.height),a){if(Fe){if(Fe+=5,S==="top")oe.domain[1]-=Fe/x.h,Te[1]*=-1;else{oe.domain[0]+=Fe/x.h;var Le=ibe.lineCount(se);Te[1]+=(1-Le)*ir}Ue.attr("transform",po(Te[0],Te[1])),oe.setScale()}}else Re&&(S==="right"&&(oe.domain[0]+=(Re+me/2)/x.w),Ue.attr("transform",po(Te[0],Te[1])),oe.setScale())}e.selectAll("."+zt.cbfills+",."+zt.cblines).attr("transform",a?po(0,Math.round(x.h*(1-oe.domain[1]))):po(Math.round(x.w*oe.domain[0]),0)),we.attr("transform",a?po(0,Math.round(-x.t)):po(Math.round(-x.l),0));var Ce=e.select("."+zt.cbfills).selectAll("rect."+zt.cbfill).attr("style","").data(O);Ce.enter().append("rect").classed(zt.cbfill,!0).attr("style",""),Ce.exit().remove();var Ge=E.map(oe.c2p).map(Math.round).sort(function(cr,lr){return cr-lr});Ce.each(function(cr,lr){var Oe=[lr===0?E[0]:(O[lr]+O[lr-1])/2,lr===O.length-1?E[1]:(O[lr]+O[lr+1])/2].map(oe.c2p).map(Math.round);a&&(Oe[1]=Li.constrain(Oe[1]+(Oe[1]>Oe[0])?1:-1,Ge[0],Ge[1]));var ne=ps.select(this).attr(a?"x":"y",te).attr(a?"y":"x",ps.min(Oe)).attr(a?"width":"height",Math.max(V,2)).attr(a?"height":"width",Math.max(ps.max(Oe)-ps.min(Oe),2));if(r._fillgradient)ho.gradient(ne,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var ve=R(cr).replace("e-","");ne.attr("fill",iw(ve).toHexString())}});var Ze=e.select("."+zt.cblines).selectAll("path."+zt.cbline).data(k.color&&k.width?H:[]);Ze.enter().append("path").classed(zt.cbline,!0),Ze.exit().remove(),Ze.each(function(cr){var lr=te,Oe=Math.round(oe.c2p(cr))+k.width/2%1;ps.select(this).attr("d","M"+(a?lr+","+Oe:Oe+","+lr)+(a?"h":"v")+V).call(ho.lineGroupStyle,k.width,P(cr),k.dash)}),we.selectAll("g."+oe._id+"tick,path").remove();var Ye=te+V+(s||0)/2-(r.ticks==="outside"?1:0),He=bl.calcTicks(oe),$e=bl.getTickSigns(oe)[2];return bl.drawTicks(t,oe,{vals:oe.ticks==="inside"?bl.clipEnds(oe,He):He,layer:we,path:bl.makeTickPath(oe,Ye,$e),transFn:bl.makeTransTickFn(oe)}),bl.drawLabels(t,oe,{vals:He,layer:we,transFn:bl.makeTransTickLabelFn(oe),labelFns:bl.makeLabelFns(oe,Ye)})}function Xe(){var Ue,se=V+s/2;pe.indexOf("inside")===-1&&(Ue=ho.bBox(we.node()),se+=a?Ue.width:Ue.height),Ne=j.select("text");var Te=0,Se=a&&S==="top",ir=!a&&S==="right",Qe=0;if(Ne.node()&&!Ne.classed(zt.jsPlaceholder)){var Le,Ce=j.select(".h"+oe._id+"title-math-group").node();Ce&&(a&&ye||!a&&!ye)?(Ue=ho.bBox(Ce),Te=Ue.width,Le=Ue.height):(Ue=ho.bBox(j.node()),Te=Ue.right-x.l-(a?te:he),Le=Ue.bottom-x.t-(a?he:te),!a&&S==="top"&&(se+=Ue.height,Qe=Ue.height)),ir&&(Ne.attr("transform",po(Te/2+me/2,0)),Te*=2),se=Math.max(se,a?Te:Le)}var Ge=(a?d:p)*2+se+u+s/2,Ze=0;!a&&M.text&&v==="bottom"&&y<=0&&(Ze=Ge/2,Ge+=Ze,Qe+=Ze),w._hColorbarMoveTitle=Ze,w._hColorbarMoveCBTitle=Qe;var Ye=u+s,He=(a?te:he)-Ye/2-(a?d:0),$e=(a?he:te)-(a?B:p+Qe-Ze);e.select("."+zt.cbbg).attr("x",He).attr("y",$e).attr(a?"width":"height",Math.max(Ge-Ze,2)).attr(a?"height":"width",Math.max(B+Ye,2)).call(lw.fill,f).call(lw.stroke,r.bordercolor).style("stroke-width",u);var cr=ir?Math.max(Te-10,0):0;e.selectAll("."+zt.cboutline).attr("x",(a?te:he+d)+cr).attr("y",(a?he+p-B:te)+(Se?Fe:0)).attr(a?"width":"height",Math.max(V,2)).attr(a?"height":"width",Math.max(B-(a?2*p+Fe:2*d+cr),2)).call(lw.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var lr=a?fe*Ge:0,Oe=a?0:(1-le)*Ge-Qe;if(lr=b?x.l-lr:-lr,Oe=_?x.t-Oe:-Oe,e.attr("transform",po(lr,Oe)),!a&&(u||iw(f).getAlpha()&&!iw.equals(w.paper_bgcolor,f))){var ne=we.selectAll("text"),ve=ne[0].length,De=e.select("."+zt.cbbg).node(),qe=ho.bBox(De),ar=ho.getTranslate(e),hr=2;ne.each(function(ja,ga){var jt=0,Na=ve-1;if(ga===jt||ga===Na){var br=ho.bBox(this),pt=ho.getTranslate(this),Nr;if(ga===Na){var st=br.right+pt.x,Pt=qe.right+ar.x+he-u-hr+m;Nr=Pt-st,Nr>0&&(Nr=0)}else if(ga===jt){var Qr=br.left+pt.x,ct=qe.left+ar.x+he+u+hr;Nr=ct-Qr,Nr<0&&(Nr=0)}Nr&&(ve<3?this.setAttribute("transform","translate("+Nr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ur={},Ar=fU[c],Wr=cU[c],Vr=fU[v],zr=cU[v],Et=Ge-V;a?(i==="pixels"?(ur.y=y,ur.t=B*Vr,ur.b=B*zr):(ur.t=ur.b=0,ur.yt=y+n*Vr,ur.yb=y-n*zr),l==="pixels"?(ur.x=m,ur.l=Ge*Ar,ur.r=Ge*Wr):(ur.l=Et*Ar,ur.r=Et*Wr,ur.xl=m-o*Ar,ur.xr=m+o*Wr)):(i==="pixels"?(ur.x=m,ur.l=B*Ar,ur.r=B*Wr):(ur.l=ur.r=0,ur.xl=m+n*Ar,ur.xr=m-n*Wr),l==="pixels"?(ur.y=1-y,ur.t=Ge*Vr,ur.b=Ge*zr):(ur.t=Et*Vr,ur.b=Et*zr,ur.yt=y-o*Vr,ur.yb=y+o*zr));var Dt=r.y<.5?"b":"t",ma=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var St={r:w.width-He-lr,l:He+ur.r,b:w.height-$e-Oe,t:$e+ur.b};b&&_?Vm.autoMargin(t,r._id,ur):b?t._fullLayout._reservedMargin[r._id][Dt]=St[Dt]:_||a?t._fullLayout._reservedMargin[r._id][ma]=St[ma]:t._fullLayout._reservedMargin[r._id][Dt]=St[Dt]}return Li.syncOrAsync([Vm.previousPromises,Be,Pe,ze,Vm.previousPromises,Xe],t)}function hbe(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,o,l,s;Ym.init({element:e.node(),gd:t,prepFn:function(){o=e.attr("transform"),ow(e)},moveFn:function(u,f){e.attr("transform",o+po(u,f)),l=Ym.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Ym.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var c=Ym.getCursor(l,s,r.xanchor,r.yanchor);ow(e,c)},doneFn:function(){if(ow(e),l!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=l,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?sU.call("_guiRestyle",t,u,r._traceIndex):sU.call("_guiRelayout",t,u)}}})}function dbe(e,r,t){var a=r._levels,n=[],i=[],o,l,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],c=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(o=a.start+l*u,!(u>0?o>=s:o<=s));l++)o>f&&o0?o>=s:o<=s));l++)o>t[0]&&o{"use strict";pU.exports={moduleType:"component",name:"colorbar",attributes:Qp(),supplyDefaults:ux(),draw:dU().draw,hasColorbar:tx()}});var gU=N((gFe,mU)=>{"use strict";mU.exports={moduleType:"component",name:"legend",layoutAttributes:n5(),supplyLayoutDefaults:l5(),draw:b5(),style:p5()}});var xU=N((bFe,bU)=>{"use strict";bU.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 wU=N((xFe,_U)=>{"use strict";_U.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var fw=N((_Fe,kU)=>{"use strict";var ybe=gr(),MU=Ee(),uw=MU.extendFlat,TU=MU.extendDeep;function AU(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function mbe(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}kU.exports=function(r,t){var a,n=r.data,i=r.layout,o=TU([],n),l=TU({},i,AU(t.tileClass)),s=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var u=Object.keys(l);for(a=0;a{"use strict";var gbe=Qs().EventEmitter,bbe=gr(),xbe=Ee(),SU=yl(),_be=fw(),wbe=$y(),Tbe=Ky();function Abe(e,r){var t=new gbe,a=_be(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var l=SU.getDelay(n._fullLayout);setTimeout(function(){var s=wbe(n),u=document.createElement("canvas");u.id=xbe.randstr(),t=Tbe({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},l)}var o=SU.getRedrawFunc(n);return bbe.call("_doPlot",n,a.data,a.layout,a.config).then(o).then(i).catch(function(l){t.emit("error",l)}),t}qU.exports=Abe});var DU=N((TFe,EU)=>{"use strict";var CU=yl(),Mbe={getDelay:CU.getDelay,getRedrawFunc:CU.getRedrawFunc,clone:fw(),toSVG:$y(),svgToImg:Ky(),toImage:LU(),downloadImage:N_()};EU.exports=Mbe});var RU=N(xl=>{"use strict";xl.version=ep().version;NA();kS();var kbe=gr(),b0=xl.register=kbe.register,vw=XN(),PU=Object.keys(vw);for(Wm=0;Wm{"use strict";FU.exports=RU()});var Zm=N((kFe,zU)=>{"use strict";zU.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Nu=N((SFe,HU)=>{"use strict";var Ht=wi(),IU=Qi().axisHoverFormat,Sbe=La().hovertemplateAttrs,qbe=La().texttemplateAttrs,BU=ko(),Lbe=fa(),OU=Zm(),Cbe=si().pattern,Fu=bt().extendFlat,hw=Lbe({editType:"calc",arrayOk:!0,colorEditType:"style"}),Ebe=Ht.marker,Dbe=Ebe.line,Pbe=Fu({},Dbe.width,{dflt:0}),Rbe=Fu({width:Pbe,editType:"calc"},BU("marker.line")),Fbe=Fu({line:Rbe,editType:"calc"},BU("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Cbe,cornerradius:{valType:"any",editType:"calc"}});HU.exports={x:Ht.x,x0:Ht.x0,dx:Ht.dx,y:Ht.y,y0:Ht.y0,dy:Ht.dy,xperiod:Ht.xperiod,yperiod:Ht.yperiod,xperiod0:Ht.xperiod0,yperiod0:Ht.yperiod0,xperiodalignment:Ht.xperiodalignment,yperiodalignment:Ht.yperiodalignment,xhoverformat:IU("x"),yhoverformat:IU("y"),text:Ht.text,texttemplate:qbe({editType:"plot"},{keys:OU.eventDataKeys}),hovertext:Ht.hovertext,hovertemplate:Sbe({},{keys:OU.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Fu({},hw,{}),insidetextfont:Fu({},hw,{}),outsidetextfont:Fu({},hw,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Fu({},Ht.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:Fbe,offsetgroup:Ht.offsetgroup,alignmentgroup:Ht.alignmentgroup,selected:{marker:{opacity:Ht.selected.marker.opacity,color:Ht.selected.marker.color,editType:"style"},textfont:Ht.selected.textfont,editType:"style"},unselected:{marker:{opacity:Ht.unselected.marker.opacity,color:Ht.unselected.marker.color,editType:"style"},textfont:Ht.unselected.textfont,editType:"style"},zorder:Ht.zorder}});var Xm=N((qFe,UU)=>{"use strict";UU.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 dw=N((LFe,VU)=>{"use strict";var Nbe=Tr(),GU=vi().hasColorscale,YU=ul(),zbe=Ee().coercePattern;VU.exports=function(r,t,a,n,i){var o=a("marker.color",n),l=GU(r,"marker");l&&YU(r,t,i,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Nbe.defaultLine),GU(r,"marker.line")&&YU(r,t,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),zbe(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")}});var zu=N((CFe,$U)=>{"use strict";var WU=Pr(),Fc=Ee(),jU=Tr(),Ibe=gr(),Obe=O_(),Bbe=dc(),Hbe=dw(),Ube=e0(),ZU=Nu(),Jm=Fc.coerceFont;function Gbe(e,r,t,a){function n(u,f){return Fc.coerce(e,r,ZU,u,f)}var i=Obe(e,r,a,n);if(!i){r.visible=!1;return}Bbe(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var o=n("textposition");JU(e,r,a,n,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Hbe(e,r,n,t,a);var l=(r.marker.line||{}).color,s=Ibe.getComponentMethod("errorbars","supplyDefaults");s(e,r,l||jU.defaultLine,{axis:"y"}),s(e,r,l||jU.defaultLine,{axis:"x",inherit:"y"}),Fc.coerceSelectionMarkerOpacity(r,n)}function Ybe(e,r){var t,a;function n(l,s){return Fc.coerce(a._input,a,ZU,l,s)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&WU(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function JU(e,r,t,a,n,i){i=i||{};var o=i.moduleHasSelected!==!1,l=i.moduleHasUnselected!==!1,s=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,f=i.moduleHasTextangle!==!1,c=i.moduleHasInsideanchor!==!1,v=!!i.hasPathbar,d=Array.isArray(n)||n==="auto",p=d||n==="inside",m=d||n==="outside";if(p||m){var y=Jm(a,"textfont",t.font),_=Fc.extendFlat({},y),b=e.textfont&&e.textfont.color,w=!b;if(w&&delete _.color,Jm(a,"insidetextfont",_),v){var x=Fc.extendFlat({},y);w&&delete x.color,Jm(a,"pathbar.textfont",x)}m&&Jm(a,"outsidetextfont",y),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}p&&c&&a("insidetextanchor")}$U.exports={supplyDefaults:Gbe,crossTraceDefaults:Ybe,handleText:JU,validateCornerradius:XU}});var pw=N((EFe,KU)=>{"use strict";var Vbe=gr(),Wbe=Or(),jbe=Ee(),Zbe=Xm(),Xbe=zu().validateCornerradius;KU.exports=function(e,r,t){function a(m,y){return jbe.coerce(e,r,Zbe,m,y)}for(var n=!1,i=!1,o=!1,l={},s=a("barmode"),u=s==="group",f=0;f0&&!l[v]&&(o=!0),l[v]=!0),c.visible&&c.type==="histogram"){var d=Wbe.getFromId({_fullLayout:r},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",i&&!o?0:.2),a("bargroupgap");var p=a("barcornerradius");r.barcornerradius=Xbe(p)}});var $m=N((DFe,QU)=>{"use strict";var Nc=Ee();QU.exports=function(r,t){for(var a=0;a{"use strict";var eG=Or(),rG=yc(),tG=vi().hasColorscale,aG=oh(),Jbe=$m(),$be=om();nG.exports=function(r,t){var a=eG.getFromId(r,t.xaxis||"x"),n=eG.getFromId(r,t.yaxis||"y"),i,o,l,s,u,f,c={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(i=a.makeCalcdata(t,"x",c),l=n.makeCalcdata(t,"y"),s=rG(t,n,"y",l),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y",c),l=a.makeCalcdata(t,"x"),s=rG(t,a,"x",l),u=!!t.xperiodalignment,f="x"),o=s.vals;for(var v=Math.min(o.length,i.length),d=new Array(v),p=0;p{"use strict";var Kbe=Sr(),Qbe=Ee();function exe(e,r,t){var a=e._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var i=a.uniformtext.mode==="hide",o;switch(t){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"}r.selectAll(o).each(function(l){var s=l.transform;if(s){s.scale=i&&s.hide?0:n/s.fontSize;var u=Kbe.select(this).select("text");Qbe.setTransormAndDisplay(u,s)}})}}function rxe(e,r,t){if(t.uniformtext.mode){var a=oG(e),n=t.uniformtext.minsize,i=r.scale*r.fontSize;r.hide=i{"use strict";var axe=Pr(),nxe=Sn(),sG=Ee().isArrayOrTypedArray;Iu.coerceString=function(e,r,t){if(typeof r=="string"){if(r||!e.noBlank)return r}else if((typeof r=="number"||r===!0)&&!e.strict)return String(r);return t!==void 0?t:e.dflt};Iu.coerceNumber=function(e,r,t){if(axe(r)){r=+r;var a=e.min,n=e.max,i=a!==void 0&&rn;if(!i)return r}return t!==void 0?t:e.dflt};Iu.coerceColor=function(e,r,t){return nxe(r).isValid()?r:t!==void 0?t:e.dflt};Iu.coerceEnumerated=function(e,r,t){return e.coerceNumber&&(r=+r),e.values.indexOf(r)!==-1?r:t!==void 0?t:e.dflt};Iu.getValue=function(e,r){var t;return sG(e)?r{"use strict";var _0=Sr(),ixe=Tr(),w0=jr(),uG=Ee(),fG=gr(),cG=x0().resizeText,yw=Nu(),oxe=yw.textfont,lxe=yw.insidetextfont,sxe=yw.outsidetextfont,Ga=Km();function uxe(e){var r=_0.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");cG(e,r,"bar");var t=r.size(),a=e._fullLayout;r.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(a.barmode==="stack"&&t>1||a.bargap===0&&a.bargroupgap===0&&!n[0].trace.marker.line.width)&&_0.select(this).attr("shape-rendering","crispEdges")}),r.selectAll("g.points").each(function(n){var i=_0.select(this),o=n[0].trace;vG(i,o,e)}),fG.getComponentMethod("errorbars","style")(r)}function vG(e,r,t){w0.pointStyle(e.selectAll("path"),r,t),hG(e,r,t)}function hG(e,r,t){e.selectAll("text").each(function(a){var n=_0.select(this),i=uG.ensureUniformFontSize(t,dG(n,a,r,t));w0.font(n,i)})}function fxe(e,r,t){var a=r[0].trace;a.selectedpoints?cxe(t,a,e):(vG(t,a,e),fG.getComponentMethod("errorbars","style")(t))}function cxe(e,r,t){w0.selectedPointStyle(e.selectAll("path"),r),vxe(e.selectAll("text"),r,t)}function vxe(e,r,t){e.each(function(a){var n=_0.select(this),i;if(a.selected){i=uG.ensureUniformFontSize(t,dG(n,a,r,t));var o=r.selected.textfont&&r.selected.textfont.color;o&&(i.color=o),w0.font(n,i)}else w0.selectedTextStyle(n,r)})}function dG(e,r,t,a){var n=a._fullLayout.font,i=t.textfont;if(e.classed("bartext-inside")){var o=gG(r,t);i=yG(t,r.i,n,o)}else e.classed("bartext-outside")&&(i=mG(t,r.i,n));return i}function pG(e,r,t){return mw(oxe,e.textfont,r,t)}function yG(e,r,t,a){var n=pG(e,r,t),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[r]===void 0;return i&&(n={color:ixe.contrast(a),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),mw(lxe,e.insidetextfont,r,n)}function mG(e,r,t){var a=pG(e,r,t);return mw(sxe,e.outsidetextfont,r,a)}function mw(e,r,t,a){r=r||{};var n=Ga.getValue(r.family,t),i=Ga.getValue(r.size,t),o=Ga.getValue(r.color,t),l=Ga.getValue(r.weight,t),s=Ga.getValue(r.style,t),u=Ga.getValue(r.variant,t),f=Ga.getValue(r.textcase,t),c=Ga.getValue(r.lineposition,t),v=Ga.getValue(r.shadow,t);return{family:Ga.coerceString(e.family,n,a.family),size:Ga.coerceNumber(e.size,i,a.size),color:Ga.coerceColor(e.color,o,a.color),weight:Ga.coerceString(e.weight,l,a.weight),style:Ga.coerceString(e.style,s,a.style),variant:Ga.coerceString(e.variant,u,a.variant),textcase:Ga.coerceString(e.variant,f,a.textcase),lineposition:Ga.coerceString(e.variant,c,a.lineposition),shadow:Ga.coerceString(e.variant,v,a.shadow)}}function gG(e,r){return r.type==="waterfall"?r[e.dir].marker.color:e.mcc||e.mc||r.marker.color}bG.exports={style:uxe,styleTextPoints:hG,styleOnSelect:fxe,getInsideTextFont:yG,getOutsideTextFont:mG,getBarColor:gG,resizeText:cG}});var xw=N((zFe,SG)=>{"use strict";var Qm=Sr(),eg=Pr(),Pa=Ee(),hxe=Ea(),dxe=Tr(),ys=jr(),pxe=gr(),rg=Or().tickText,xG=x0(),yxe=xG.recordMinTextSize,mxe=xG.clearMinTextSize,gw=zc(),Ic=Km(),gxe=Zm(),_G=Nu(),bxe=_G.text,xxe=_G.textposition,_xe=qo().appendArrayPointValue,cn=gxe.TEXTPAD;function wxe(e){return e.id}function Txe(e){if(e.ids)return wxe}function bw(e){return(e>0)-(e<0)}function Ho(e,r){return e0}function Mxe(e,r,t,a,n,i){var o=r.xaxis,l=r.yaxis,s=e._fullLayout,u=e._context.staticPlot;n||(n={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},mxe("bar",s));var f=Pa.makeTraceGroups(a,t,"trace bars").each(function(c){var v=Qm.select(this),d=c[0].trace,p=c[0].t,m=d.type==="waterfall",y=d.type==="funnel",_=d.type==="histogram",b=d.type==="bar",w=b||y,x=0;m&&d.connector.visible&&d.connector.mode==="between"&&(x=d.connector.line.width/2);var T=d.orientation==="h",k=TG(n),M=Pa.ensureSingle(v,"g","points"),S=Txe(d),E=M.selectAll("g.point").data(Pa.identity,S);E.enter().append("g").classed("point",!0),E.exit().remove(),E.each(function(R,D){var z=Qm.select(this),O=Axe(R,o,l,T),H=O[0][0],V=O[0][1],G=O[1][0],B=O[1][1],Y=(T?V-H:B-G)===0;Y&&w&&Ic.getLineWidth(d,R)&&(Y=!1),Y||(Y=!eg(H)||!eg(V)||!eg(G)||!eg(B)),R.isBlank=Y,Y&&(T?V=H:B=G),x&&!Y&&(T?(H-=Ho(H,V)*x,V+=Ho(H,V)*x):(G-=Ho(G,B)*x,B+=Ho(G,B)*x));var X,Z;if(d.type==="waterfall"){if(!Y){var te=d[R.dir].marker;X=te.line.width,Z=te.color}}else X=Ic.getLineWidth(d,R),Z=R.mc||d.marker.color;function fe(se){var Te=Qm.round(X/2%1,2);return n.gap===0&&n.groupgap===0?Qm.round(Math.round(se)-Te,2):se}function le(se,Te,Se){return Se&&se===Te?se:Math.abs(se-Te)>=2?fe(se):se>Te?Math.ceil(se):Math.floor(se)}var ie=dxe.opacity(Z),K=ie<1||X>.01?fe:le;e._context.staticPlot||(H=K(H,V,T),V=K(V,H,T),G=K(G,B,!T),B=K(B,G,!T));var he=T?o.c2p:l.c2p,oe;R.s0>0?oe=R._sMax:R.s0<0?oe=R._sMin:oe=R.s1>0?R._sMax:R._sMin;function ye(se,Te){if(!se)return 0;var Se=Math.abs(T?B-G:V-H),ir=Math.abs(T?V-H:B-G),Qe=K(Math.abs(he(oe,!0)-he(0,!0))),Le=R.hasB?Math.min(Se/2,ir/2):Math.min(Se/2,Qe),Ce;if(Te==="%"){var Ge=Math.min(50,se);Ce=Se*(Ge/100)}else Ce=se;return K(Math.max(Math.min(Ce,Le),0))}var ue=b||_?ye(p.cornerradiusvalue,p.cornerradiusform):0,de,W,Q="M"+H+","+G+"V"+B+"H"+V+"V"+G+"Z",j=0;if(ue&&R.s){var pe=bw(R.s0)===0||bw(R.s)===bw(R.s0)?R.s1:R.s0;if(j=K(R.hasB?0:Math.abs(he(oe,!0)-he(pe,!0))),j0?Math.sqrt(j*(2*ue-j)):0,Ie=me>0?Math.max:Math.min;de="M"+H+","+G+"V"+(B-Fe*we)+"H"+Ie(V-(ue-j)*me,H)+"A "+ue+","+ue+" 0 0 "+Ne+" "+V+","+(B-ue*we-Re)+"V"+(G+ue*we+Re)+"A "+ue+","+ue+" 0 0 "+Ne+" "+Ie(V-(ue-j)*me,H)+","+(G+Fe*we)+"Z"}else if(R.hasB)de="M"+(H+ue*me)+","+G+"A "+ue+","+ue+" 0 0 "+Ne+" "+H+","+(G+ue*we)+"V"+(B-ue*we)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(H+ue*me)+","+B+"H"+(V-ue*me)+"A "+ue+","+ue+" 0 0 "+Ne+" "+V+","+(B-ue*we)+"V"+(G+ue*we)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(V-ue*me)+","+G+"Z";else{W=Math.abs(B-G)+j;var Be=W0?Math.sqrt(j*(2*ue-j)):0,Pe=we>0?Math.max:Math.min;de="M"+(H+Be*me)+","+G+"V"+Pe(B-(ue-j)*we,G)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(H+ue*me-ze)+","+B+"H"+(V-ue*me+ze)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(V-Be*me)+","+Pe(B-(ue-j)*we,G)+"V"+G+"Z"}}else de=Q}else de=Q;var Xe=wG(Pa.ensureSingle(z,"path"),s,n,i);if(Xe.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((V-H)*(B-G))||Y&&e._context.staticPlot?"M0,0Z":de).call(ys.setClipUrl,r.layerClipId,e),!s.uniformtext.mode&&k){var Ue=ys.makePointStyleFns(d);ys.singlePointStyle(R,Xe,d,Ue,e)}kxe(e,r,z,c,D,H,V,G,B,ue,j,n,i),r.layerClipId&&ys.hideOutsideRangePoint(R,z.select("text"),o,l,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;ys.setClipUrl(v,P?null:r.layerClipId,e)});pxe.getComponentMethod("errorbars","plot")(e,f,r,n)}function kxe(e,r,t,a,n,i,o,l,s,u,f,c,v){var d=r.xaxis,p=r.yaxis,m=e._fullLayout,y;function _(W,Q,j){var pe=Pa.ensureSingle(W,"text").text(Q).attr({class:"bartext bartext-"+y,"text-anchor":"middle","data-notex":1}).call(ys.font,j).call(hxe.convertToTspans,e);return pe}var b=a[0].trace,w=b.orientation==="h",x=Lxe(m,a,n,d,p);y=Cxe(b,n);var T=c.mode==="stack"||c.mode==="relative",k=a[n],M=!T||k._outmost,S=k.hasB,E=u&&u-f>cn;if(!x||y==="none"||(k.isBlank||i===o||l===s)&&(y==="auto"||y==="inside")){t.select("text").remove();return}var P=m.font,R=gw.getBarColor(a[n],b),D=gw.getInsideTextFont(b,n,P,R),z=gw.getOutsideTextFont(b,n,P),O=b.insidetextanchor||"end",H=t.datum();w?d.type==="log"&&H.s0<=0&&(d.range[0]0&&fe>0,K;E?S?K=Ou(B-2*u,Y,te,fe,w)||Ou(B,Y-2*u,te,fe,w):w?K=Ou(B-(u-f),Y,te,fe,w)||Ou(B,Y-2*(u-f),te,fe,w):K=Ou(B,Y-(u-f),te,fe,w)||Ou(B-2*(u-f),Y,te,fe,w):K=Ou(B,Y,te,fe,w),ie&&K?y="inside":(y="outside",X.remove(),X=null)}else y="inside";if(!X){le=Pa.ensureUniformFontSize(e,y==="outside"?z:D),X=_(t,x,le);var he=X.attr("transform");if(X.attr("transform",""),Z=ys.bBox(X.node()),te=Z.width,fe=Z.height,X.attr("transform",he),te<=0||fe<=0){X.remove();return}}var oe=b.textangle,ye,ue;y==="outside"?(ue=b.constraintext==="both"||b.constraintext==="outside",ye=qxe(i,o,l,s,Z,{isHorizontal:w,constrained:ue,angle:oe})):(ue=b.constraintext==="both"||b.constraintext==="inside",ye=kG(i,o,l,s,Z,{isHorizontal:w,constrained:ue,angle:oe,anchor:O,hasB:S,r:u,overhead:f})),ye.fontSize=le.size,yxe(b.type==="histogram"?"bar":b.type,ye,m),k.transform=ye;var de=wG(X,m,c,v);Pa.setTransormAndDisplay(de,ye)}function Ou(e,r,t,a,n){if(e<0||r<0)return!1;var i=t<=e&&a<=r,o=t<=r&&a<=e,l=n?e>=t*(r/a):r>=a*(e/t);return i||o||l}function AG(e){return e==="auto"?0:e}function MG(e,r){var t=Math.PI/180*r,a=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t));return{x:e.width*n+e.height*a,y:e.width*a+e.height*n}}function kG(e,r,t,a,n,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,u=i.anchor,f=u==="end",c=u==="start",v=i.leftToRight||0,d=(v+1)/2,p=1-d,m=i.hasB,y=i.r,_=i.overhead,b=n.width,w=n.height,x=Math.abs(r-e),T=Math.abs(a-t),k=x>2*cn&&T>2*cn?cn:0;x-=2*k,T-=2*k;var M=AG(s);s==="auto"&&!(b<=x&&w<=T)&&(b>x||w>T)&&(!(b>T||w>x)||bcn){var R=Sxe(e,r,t,a,S,y,_,o,m);E=R.scale,P=R.pad}else E=1,l&&(E=Math.min(1,x/S.x,T/S.y)),P=0;var D=n.left*p+n.right*d,z=(n.top+n.bottom)/2,O=(e+cn)*p+(r-cn)*d,H=(t+a)/2,V=0,G=0;if(c||f){var B=(o?S.x:S.y)/2;y&&(f||m)&&(k+=P);var Y=o?Ho(e,r):Ho(t,a);o?c?(O=e+Y*k,V=-Y*B):(O=r-Y*k,V=Y*B):c?(H=t+Y*k,G=-Y*B):(H=a-Y*k,G=Y*B)}return{textX:D,textY:z,targetX:O,targetY:H,anchorX:V,anchorY:G,scale:E,rotate:M}}function Sxe(e,r,t,a,n,i,o,l,s){var u=Math.max(0,Math.abs(r-e)-2*cn),f=Math.max(0,Math.abs(a-t)-2*cn),c=i-cn,v=o?c-Math.sqrt(c*c-(c-o)*(c-o)):c,d=s?c*2:l?c-o:2*v,p=s?c*2:l?2*v:c-o,m,y,_,b,w;return n.y/n.x>=f/(u-d)?b=f/n.y:n.y/n.x<=(f-p)/u?b=u/n.x:!s&&l?(m=n.x*n.x+n.y*n.y/4,y=-2*n.x*(u-c)-n.y*(f/2-c),_=(u-c)*(u-c)+(f/2-c)*(f/2-c)-c*c,b=(-y+Math.sqrt(y*y-4*m*_))/(2*m)):s?(m=(n.x*n.x+n.y*n.y)/4,y=-n.x*(u/2-c)-n.y*(f/2-c),_=(u/2-c)*(u/2-c)+(f/2-c)*(f/2-c)-c*c,b=(-y+Math.sqrt(y*y-4*m*_))/(2*m)):(m=n.x*n.x/4+n.y*n.y,y=-n.x*(u/2-c)-2*n.y*(f-c),_=(u/2-c)*(u/2-c)+(f-c)*(f-c)-c*c,b=(-y+Math.sqrt(y*y-4*m*_))/(2*m)),b=Math.min(1,b),l?w=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-n.y*b)/2)*(c-(f-n.y*b)/2)))-o):w=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(u-n.x*b)/2)*(c-(u-n.x*b)/2)))-o),{scale:b,pad:w}}function qxe(e,r,t,a,n,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,u=n.width,f=n.height,c=Math.abs(r-e),v=Math.abs(a-t),d;o?d=v>2*cn?cn:0:d=c>2*cn?cn:0;var p=1;l&&(p=o?Math.min(1,v/f):Math.min(1,c/u));var m=AG(s),y=MG(n,m),_=(o?y.x:y.y)/2,b=(n.left+n.right)/2,w=(n.top+n.bottom)/2,x=(e+r)/2,T=(t+a)/2,k=0,M=0,S=o?Ho(r,e):Ho(t,a);return o?(x=r-S*d,k=S*_):(T=a+S*d,M=-S*_),{textX:b,textY:w,targetX:x,targetY:T,anchorX:k,anchorY:M,scale:p,rotate:m}}function Lxe(e,r,t,a,n){var i=r[0].trace,o=i.texttemplate,l;return o?l=Exe(e,r,t,a,n):i.textinfo?l=Dxe(r,t,a,n):l=Ic.getValue(i.text,t),Ic.coerceString(bxe,l)}function Cxe(e,r){var t=Ic.getValue(e.textposition,r);return Ic.coerceEnumerated(xxe,t)}function Exe(e,r,t,a,n){var i=r[0].trace,o=Pa.castOption(i,t,"texttemplate");if(!o)return"";var l=i.type==="histogram",s=i.type==="waterfall",u=i.type==="funnel",f=i.orientation==="h",c,v,d,p;f?(c="y",v=n,d="x",p=a):(c="x",v=a,d="y",p=n);function m(k){return rg(v,v.c2l(k),!0).text}function y(k){return rg(p,p.c2l(k),!0).text}var _=r[t],b={};b.label=_.p,b.labelLabel=b[c+"Label"]=m(_.p);var w=Pa.castOption(i,_.i,"text");(w===0||w)&&(b.text=w),b.value=_.s,b.valueLabel=b[d+"Label"]=y(_.s);var x={};_xe(x,i,_.i),(l||x.x===void 0)&&(x.x=f?b.value:b.label),(l||x.y===void 0)&&(x.y=f?b.label:b.value),(l||x.xLabel===void 0)&&(x.xLabel=f?b.valueLabel:b.labelLabel),(l||x.yLabel===void 0)&&(x.yLabel=f?b.labelLabel:b.valueLabel),s&&(b.delta=+_.rawS||_.s,b.deltaLabel=y(b.delta),b.final=_.v,b.finalLabel=y(b.final),b.initial=b.final-b.delta,b.initialLabel=y(b.initial)),u&&(b.value=_.s,b.valueLabel=y(b.value),b.percentInitial=_.begR,b.percentInitialLabel=Pa.formatPercent(_.begR),b.percentPrevious=_.difR,b.percentPreviousLabel=Pa.formatPercent(_.difR),b.percentTotal=_.sumR,b.percenTotalLabel=Pa.formatPercent(_.sumR));var T=Pa.castOption(i,_.i,"customdata");return T&&(b.customdata=T),Pa.texttemplateString(o,b,e._d3locale,x,b,i._meta||{})}function Dxe(e,r,t,a){var n=e[0].trace,i=n.orientation==="h",o=n.type==="waterfall",l=n.type==="funnel";function s(T){var k=i?a:t;return rg(k,T,!0).text}function u(T){var k=i?t:a;return rg(k,+T,!0).text}var f=n.textinfo,c=e[r],v=f.split("+"),d=[],p,m=function(T){return v.indexOf(T)!==-1};if(m("label")&&d.push(s(e[r].p)),m("text")&&(p=Pa.castOption(n,c.i,"text"),(p===0||p)&&d.push(p)),o){var y=+c.rawS||c.s,_=c.v,b=_-y;m("initial")&&d.push(u(b)),m("delta")&&d.push(u(y)),m("final")&&d.push(u(_))}if(l){m("value")&&d.push(u(c.s));var w=0;m("percent initial")&&w++,m("percent previous")&&w++,m("percent total")&&w++;var x=w>1;m("percent initial")&&(p=Pa.formatPercent(c.begR),x&&(p+=" of initial"),d.push(p)),m("percent previous")&&(p=Pa.formatPercent(c.difR),x&&(p+=" of previous"),d.push(p)),m("percent total")&&(p=Pa.formatPercent(c.sumR),x&&(p+=" of total"),d.push(p))}return d.join("
")}SG.exports={plot:Mxe,toMoveInsideBar:kG}});var ww=N((IFe,EG)=>{"use strict";var T0=Fn(),Pxe=gr(),qG=Tr(),Rxe=Ee().fillText,Fxe=Km().getLineWidth,_w=Or().hoverLabelText,Nxe=Ft().BADNUM;function zxe(e,r,t,a,n){var i=LG(e,r,t,a,n);if(i){var o=i.cd,l=o[0].trace,s=o[i.index];return i.color=CG(l,s),Pxe.getComponentMethod("errorbars","hoverInfo")(s,l,i),[i]}}function LG(e,r,t,a,n){var i=e.cd,o=i[0].trace,l=i[0].t,s=a==="closest",u=o.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,v,d,p,m,y,_,b;o.orientation==="h"?(v=t,d=r,p="y",m="x",y=H,_=D):(v=r,d=t,p="x",m="y",_=H,y=D);var w=o[p+"period"],x=s||w;function T(K){return M(K,-1)}function k(K){return M(K,1)}function M(K,he){var oe=K.w;return K[p]+he*oe/2}function S(K){return K[p+"End"]-K[p+"Start"]}var E=s?T:w?function(K){return K.p-S(K)/2}:function(K){return Math.min(T(K),K.p-l.bardelta/2)},P=s?k:w?function(K){return K.p+S(K)/2}:function(K){return Math.max(k(K),K.p+l.bardelta/2)};function R(K,he,oe){return n.finiteRange&&(oe=0),T0.inbox(K-v,he-v,oe+Math.min(1,Math.abs(he-K)/b)-1)}function D(K){return R(E(K),P(K),f)}function z(K){return R(T(K),k(K),c)}function O(K){var he=K[m];if(u){var oe=Math.abs(K.rawS)||0;d>0?he+=oe:d<0&&(he-=oe)}return he}function H(K){var he=d,oe=K.b,ye=O(K);return T0.inbox(oe-he,ye-he,f+(ye-he)/(ye-oe)-1)}function V(K){var he=d,oe=K.b,ye=O(K);return T0.inbox(oe-he,ye-he,c+(ye-he)/(ye-oe)-1)}var G=e[p+"a"],B=e[m+"a"];b=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function Y(K){return(y(K)+_(K))/2}var X=T0.getDistanceFunction(a,y,_,Y);if(T0.getClosest(i,X,e),e.index!==!1&&i[e.index].p!==Nxe){x||(E=function(K){return Math.min(T(K),K.p-l.bargroupwidth/2)},P=function(K){return Math.max(k(K),K.p+l.bargroupwidth/2)});var Z=e.index,te=i[Z],fe=o.base?te.b+te.s:te.s;e[m+"0"]=e[m+"1"]=B.c2p(te[m],!0),e[m+"LabelVal"]=fe;var le=l.extents[l.extents.round(te.p)];e[p+"0"]=G.c2p(s?E(te):le[0],!0),e[p+"1"]=G.c2p(s?P(te):le[1],!0);var ie=te.orig_p!==void 0;return e[p+"LabelVal"]=ie?te.orig_p:te.p,e.labelLabel=_w(G,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=_w(B,e[m+"LabelVal"],o[m+"hoverformat"]),e.baseLabel=_w(B,te.b,o[m+"hoverformat"]),e.spikeDistance=(V(te)+z(te))/2,e[p+"Spike"]=G.c2p(te.p,!0),Rxe(te,o,e),e.hovertemplate=o.hovertemplate,e}}function CG(e,r){var t=r.mcc||e.marker.color,a=r.mlcc||e.marker.line.color,n=Fxe(e,r);if(qG.opacity(t))return t;if(qG.opacity(a)&&n)return a}EG.exports={hoverPoints:zxe,hoverOnBars:LG,getTraceColor:CG}});var PG=N((OFe,DG)=>{"use strict";DG.exports=function(r,t,a){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),a.orientation==="h"?(r.label=r.y,r.value=r.x):(r.label=r.x,r.value=r.y),r}});var Tw=N((BFe,RG)=>{"use strict";RG.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",u=[],f;if(t===!1)for(f=0;f{"use strict";FG.exports={attributes:Nu(),layoutAttributes:Xm(),supplyDefaults:zu().supplyDefaults,crossTraceDefaults:zu().crossTraceDefaults,supplyLayoutDefaults:pw(),calc:iG(),crossTraceCalc:fm().crossTraceCalc,colorbar:i0(),arraysToCalcdata:$m(),plot:xw().plot,style:zc().style,styleOnSelect:zc().styleOnSelect,hoverPoints:ww().hoverPoints,eventData:PG(),selectPoints:Tw(),moduleType:"trace",name:"bar",basePlotModule:qi(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var IG=N((UFe,zG)=>{"use strict";zG.exports=NG()});var tg=N((GFe,UG)=>{"use strict";var Oxe=Cy(),Ci=wi(),OG=Nu(),Bxe=li(),BG=Qi().axisHoverFormat,Hxe=La().hovertemplateAttrs,_l=bt().extendFlat,Oc=Ci.marker,HG=Oc.line;UG.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:Ci.xperiod,yperiod:Ci.yperiod,xperiod0:Ci.xperiod0,yperiod0:Ci.yperiod0,xperiodalignment:Ci.xperiodalignment,yperiodalignment:Ci.yperiodalignment,xhoverformat:BG("x"),yhoverformat:BG("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:_l({},Oc.symbol,{arrayOk:!1,editType:"plot"}),opacity:_l({},Oc.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:_l({},Oc.angle,{arrayOk:!1,editType:"calc"}),size:_l({},Oc.size,{arrayOk:!1,editType:"calc"}),color:_l({},Oc.color,{arrayOk:!1,editType:"style"}),line:{color:_l({},HG.color,{arrayOk:!1,dflt:Bxe.defaultLine,editType:"style"}),width:_l({},HG.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:Oxe(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:OG.offsetgroup,alignmentgroup:OG.alignmentgroup,selected:{marker:Ci.selected.marker,editType:"style"},unselected:{marker:Ci.unselected.marker,editType:"style"},text:_l({},Ci.text,{}),hovertext:_l({},Ci.hovertext,{}),hovertemplate:Hxe({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:Ci.zorder}});var ag=N((YFe,GG)=>{"use strict";GG.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 M0=N((VFe,jG)=>{"use strict";var Ei=Ee(),Uxe=gr(),Gxe=Tr(),Yxe=dc(),Vxe=e0(),YG=x1(),A0=tg();function Wxe(e,r,t,a){function n(p,m){return Ei.coerce(e,r,A0,p,m)}if(VG(e,r,n,a),r.visible!==!1){Yxe(e,r,a,n),n("xhoverformat"),n("yhoverformat");var i=r._hasPreCompStats;i&&(n("lowerfence"),n("upperfence")),n("line.color",(e.marker||{}).color||t),n("line.width"),n("fillcolor",Gxe.addOpacity(r.line.color,.5));var o=!1;if(i){var l=n("mean"),s=n("sd");l&&l.length&&(o=!0,s&&s.length&&(o="sd"))}n("whiskerwidth");var u=n("sizemode"),f;u==="quartiles"&&(f=n("boxmean",o)),n("showwhiskers",u==="quartiles"),(u==="sd"||f==="sd")&&n("sdmultiple"),n("width"),n("quartilemethod");var c=!1;if(i){var v=n("notchspan");v&&v.length&&(c=!0)}else Ei.validate(e.notchwidth,A0.notchwidth)&&(c=!0);var d=n("notched",c);d&&n("notchwidth"),WG(e,r,n,{prefix:"box"}),n("zorder")}}function VG(e,r,t,a){function n(P){var R=0;return P&&P.length&&(R+=1,Ei.isArrayOrTypedArray(P[0])&&P[0].length&&(R+=1)),R}function i(P){return Ei.validate(e[P],A0[P])}var o=t("y"),l=t("x"),s;if(r.type==="box"){var u=t("q1"),f=t("median"),c=t("q3");r._hasPreCompStats=u&&u.length&&f&&f.length&&c&&c.length,s=Math.min(Ei.minRowLength(u),Ei.minRowLength(f),Ei.minRowLength(c))}var v=n(o),d=n(l),p=v&&Ei.minRowLength(o),m=d&&Ei.minRowLength(l),y=a.calendar,_={autotypenumbers:a.autotypenumbers},b,w;if(r._hasPreCompStats)switch(String(d)+String(v)){case"00":var x=i("x0")||i("dx"),T=i("y0")||i("dy");T&&!x?b="h":b="v",w=s;break;case"10":b="v",w=Math.min(s,m);break;case"20":b="h",w=Math.min(s,l.length);break;case"01":b="h",w=Math.min(s,p);break;case"02":b="v",w=Math.min(s,o.length);break;case"12":b="v",w=Math.min(s,m,o.length);break;case"21":b="h",w=Math.min(s,l.length,p);break;case"11":w=0;break;case"22":var k=!1,M;for(M=0;M0?(b="v",d>0?w=Math.min(m,p):w=Math.min(p)):d>0?(b="h",w=Math.min(m)):w=0;if(!w){r.visible=!1;return}r._length=w;var S=t("orientation",b);r._hasPreCompStats?S==="v"&&d===0?(t("x0",0),t("dx",1)):S==="h"&&v===0&&(t("y0",0),t("dy",1)):S==="v"&&d===0?t("x0"):S==="h"&&v===0&&t("y0");var E=Uxe.getComponentMethod("calendars","handleTraceDefaults");E(e,r,["x","y"],a)}function WG(e,r,t,a){var n=a.prefix,i=Ei.coerce2(e,r,A0,"marker.outliercolor"),o=t("marker.line.outliercolor"),l="outliers";r._hasPreCompStats?l="all":(i||o)&&(l="suspectedoutliers");var s=t(n+"points",l);s?(t("jitter",s==="all"?.3:0),t("pointpos",s==="all"?-1.5:0),t("marker.symbol"),t("marker.opacity"),t("marker.size"),t("marker.angle"),t("marker.color",r.line.color),t("marker.line.color"),t("marker.line.width"),s==="suspectedoutliers"&&(t("marker.line.outliercolor",r.marker.color),t("marker.line.outlierwidth")),t("selected.marker.color"),t("unselected.marker.color"),t("selected.marker.size"),t("unselected.marker.size"),t("text"),t("hovertext")):delete r.marker;var u=t("hoveron");(u==="all"||u.indexOf("points")!==-1)&&t("hovertemplate"),Ei.coerceSelectionMarkerOpacity(r,t)}function jxe(e,r){var t,a;function n(s){return Ei.coerce(a._input,a,A0,s)}for(var i=0;i{"use strict";var Zxe=gr(),Xxe=Ee(),Jxe=ag();function ZG(e,r,t,a,n){for(var i=n+"Layout",o=!1,l=0;l{"use strict";var kw=Pr(),ng=Or(),Kxe=yc(),ra=Ee(),ri=Ft().BADNUM,wl=ra._;nY.exports=function(r,t){var a=r._fullLayout,n=ng.getFromId(r,t.xaxis||"x"),i=ng.getFromId(r,t.yaxis||"y"),o=[],l=t.type==="violin"?"_numViolins":"_numBoxes",s,u,f,c,v,d,p;t.orientation==="h"?(f=n,c="x",v=i,d="y",p=!!t.yperiodalignment):(f=i,c="y",v=n,d="x",p=!!t.xperiodalignment);var m=Qxe(t,d,v,a[l]),y=m[0],_=m[1],b=ra.distinctVals(y,v),w=b.vals,x=b.minDiff/2,T,k,M,S,E,P,R=(t.boxpoints||t.points)==="all"?ra.identity:function(Ne){return Ne.vT.uf};if(t._hasPreCompStats){var D=t[c],z=function(Ne){return f.d2c((t[Ne]||[])[s])},O=1/0,H=-1/0;for(s=0;s=T.q1&&T.q3>=T.med){var G=z("lowerfence");T.lf=G!==ri&&G<=T.q1?G:QG(T,M,S);var B=z("upperfence");T.uf=B!==ri&&B>=T.q3?B:eY(T,M,S);var Y=z("mean");T.mean=Y!==ri?Y:S?ra.mean(M,S):(T.q1+T.q3)/2;var X=z("sd");T.sd=Y!==ri&&X>=0?X:S?ra.stdev(M,S,T.mean):T.q3-T.q1,T.lo=rY(T),T.uo=tY(T);var Z=z("notchspan");Z=Z!==ri&&Z>0?Z:aY(T,S),T.ln=T.med-Z,T.un=T.med+Z;var te=T.lf,fe=T.uf;t.boxpoints&&M.length&&(te=Math.min(te,M[0]),fe=Math.max(fe,M[S-1])),t.notched&&(te=Math.min(te,T.ln),fe=Math.max(fe,T.un)),T.min=te,T.max=fe}else{ra.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+T.q1,"median = "+T.med,"q3 = "+T.q3].join(` -`));var le;T.med!==ri?le=T.med:T.q1!==ri?T.q3!==ri?le=(T.q1+T.q3)/2:le=T.q1:T.q3!==ri?le=T.q3:le=0,T.med=le,T.q1=T.q3=le,T.lf=T.uf=le,T.mean=T.sd=le,T.ln=T.un=le,T.min=T.max=le}O=Math.min(O,T.min),H=Math.max(H,T.max),T.pts2=k.filter(R),o.push(T)}}t._extremes[f._id]=ng.findExtremes(f,[O,H],{padded:!0})}else{var ie=f.makeCalcdata(t,c),K=e5e(w,x),he=w.length,oe=r5e(he);for(s=0;s=0&&ye0){if(T={},T.pos=T[d]=w[s],k=T.pts=oe[s].sort($G),M=T[c]=k.map(KG),S=M.length,T.min=M[0],T.max=M[S-1],T.mean=ra.mean(M,S),T.sd=ra.stdev(M,S,T.mean)*t.sdmultiple,T.med=ra.interp(M,.5),S%2&&(Q||j)){var pe,me;Q?(pe=M.slice(0,S/2),me=M.slice(S/2+1)):j&&(pe=M.slice(0,S/2+1),me=M.slice(S/2)),T.q1=ra.interp(pe,.5),T.q3=ra.interp(me,.5)}else T.q1=ra.interp(M,.25),T.q3=ra.interp(M,.75);T.lf=QG(T,M,S),T.uf=eY(T,M,S),T.lo=rY(T),T.uo=tY(T);var we=aY(T,S);T.ln=T.med-we,T.un=T.med+we,ue=Math.min(ue,T.ln),de=Math.max(de,T.un),T.pts2=k.filter(R),o.push(T)}t.notched&&ra.isTypedArray(ie)&&(ie=Array.from(ie)),t._extremes[f._id]=ng.findExtremes(f,t.notched?ie.concat([ue,de]):ie,{padded:!0})}return t5e(o,t),o.length>0?(o[0].t={num:a[l],dPos:x,posLetter:d,valLetter:c,labels:{med:wl(r,"median:"),min:wl(r,"min:"),q1:wl(r,"q1:"),q3:wl(r,"q3:"),max:wl(r,"max:"),mean:t.boxmean==="sd"||t.sizemode==="sd"?wl(r,"mean \xB1 \u03C3:").replace("\u03C3",t.sdmultiple===1?"\u03C3":t.sdmultiple+"\u03C3"):wl(r,"mean:"),lf:wl(r,"lower fence:"),uf:wl(r,"upper fence:")}},a[l]++,o):[{t:{empty:!0}}]};function Qxe(e,r,t,a){var n=r in e,i=r+"0"in e,o="d"+r in e;if(n||i&&o){var l=t.makeCalcdata(e,r),s=Kxe(e,t,r,l).vals;return[s,l]}var u;i?u=e[r+"0"]:"name"in e&&(t.type==="category"||kw(e.name)&&["linear","log"].indexOf(t.type)!==-1||ra.isDateTime(e.name)&&t.type==="date")?u=e.name:u=a;for(var f=t.type==="multicategory"?t.r2c_just_indices(u):t.d2c(u,0,e[r+"calendar"]),c=e._length,v=new Array(c),d=0;d{"use strict";var iY=Or(),a5e=Ee(),n5e=Tu().getAxisGroup,oY=["v","h"];function i5e(e,r){for(var t=e.calcdata,a=r.xaxis,n=r.yaxis,i=0;i1,b=1-i[e+"gap"],w=1-i[e+"groupgap"];for(s=0;s0;if(M==="positive"?(B=S*(k?1:.5),Z=X,Y=Z=P):M==="negative"?(B=Z=P,Y=S*(k?1:.5),te=X):(B=Y=S,Z=te=X),oe){var ye=x.pointpos,ue=x.jitter,de=x.marker.size/2,W=0;ye+ue>=0&&(W=X*(ye+ue),W>B?(he=!0,ie=de,fe=W):W>Z&&(ie=de,fe=B)),W<=B&&(fe=B);var Q=0;ye-ue<=0&&(Q=-X*(ye-ue),Q>Y?(he=!0,K=de,le=Q):Q>te&&(K=de,le=Y)),Q<=Y&&(le=Y)}else fe=B,le=Y;var j=new Array(f.length);for(u=0;u{"use strict";var Bc=Sr(),Bu=Ee(),o5e=jr(),uY=5,l5e=.01;function s5e(e,r,t,a){var n=e._context.staticPlot,i=r.xaxis,o=r.yaxis;Bu.makeTraceGroups(a,t,"trace boxes").each(function(l){var s=Bc.select(this),u=l[0],f=u.t,c=u.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){s.remove();return}var v,d;c.orientation==="h"?(v=o,d=i):(v=i,d=o),fY(s,{pos:v,val:d},c,f,n),cY(s,{x:i,y:o},c,f),vY(s,{pos:v,val:d},c,f)})}function fY(e,r,t,a,n){var i=t.orientation==="h",o=r.val,l=r.pos,s=!!l.rangebreaks,u=a.bPos,f=a.wdPos||0,c=a.bPosPxOffset||0,v=t.whiskerwidth||0,d=t.showwhiskers!==!1,p=t.notched||!1,m=p?1-2*t.notchwidth:1,y,_;Array.isArray(a.bdPos)?(y=a.bdPos[0],_=a.bdPos[1]):(y=a.bdPos,_=a.bdPos);var b=e.selectAll("path.box").data(t.type!=="violin"||t.box.visible?Bu.identity:[]);b.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),b.exit().remove(),b.each(function(w){if(w.empty)return Bc.select(this).attr("d","M0,0Z");var x=l.c2l(w.pos+u,!0),T=l.l2p(x-y)+c,k=l.l2p(x+_)+c,M=s?(T+k)/2:l.l2p(x)+c,S=t.whiskerwidth,E=s?T*S+(1-S)*M:l.l2p(x-f)+c,P=s?k*S+(1-S)*M:l.l2p(x+f)+c,R=l.l2p(x-y*m)+c,D=l.l2p(x+_*m)+c,z=t.sizemode==="sd",O=o.c2p(z?w.mean-w.sd:w.q1,!0),H=z?o.c2p(w.mean+w.sd,!0):o.c2p(w.q3,!0),V=Bu.constrain(z?o.c2p(w.mean,!0):o.c2p(w.med,!0),Math.min(O,H)+1,Math.max(O,H)-1),G=w.lf===void 0||t.boxpoints===!1||z,B=o.c2p(G?w.min:w.lf,!0),Y=o.c2p(G?w.max:w.uf,!0),X=o.c2p(w.ln,!0),Z=o.c2p(w.un,!0);i?Bc.select(this).attr("d","M"+V+","+R+"V"+D+"M"+O+","+T+"V"+k+(p?"H"+X+"L"+V+","+D+"L"+Z+","+k:"")+"H"+H+"V"+T+(p?"H"+Z+"L"+V+","+R+"L"+X+","+T:"")+"Z"+(d?"M"+O+","+M+"H"+B+"M"+H+","+M+"H"+Y+(v===0?"":"M"+B+","+E+"V"+P+"M"+Y+","+E+"V"+P):"")):Bc.select(this).attr("d","M"+R+","+V+"H"+D+"M"+T+","+O+"H"+k+(p?"V"+X+"L"+D+","+V+"L"+k+","+Z:"")+"V"+H+"H"+T+(p?"V"+Z+"L"+R+","+V+"L"+T+","+X:"")+"Z"+(d?"M"+M+","+O+"V"+B+"M"+M+","+H+"V"+Y+(v===0?"":"M"+E+","+B+"H"+P+"M"+E+","+Y+"H"+P):""))})}function cY(e,r,t,a){var n=r.x,i=r.y,o=a.bdPos,l=a.bPos,s=t.boxpoints||t.points;Bu.seedPseudoRandom();var u=function(v){return v.forEach(function(d){d.t=a,d.trace=t}),v},f=e.selectAll("g.points").data(s?u:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(v){var d,p=v.pts2,m=Math.max((v.max-v.min)/10,v.q3-v.q1),y=m*1e-9,_=m*l5e,b=[],w=0,x;if(t.jitter){if(m===0)for(w=1,b=new Array(p.length),d=0;dv.lo&&(P.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(o5e.translatePoints,n,i)}function vY(e,r,t,a){var n=r.val,i=r.pos,o=!!i.rangebreaks,l=a.bPos,s=a.bPosPxOffset||0,u=t.boxmean||(t.meanline||{}).visible,f,c;Array.isArray(a.bdPos)?(f=a.bdPos[0],c=a.bdPos[1]):(f=a.bdPos,c=a.bdPos);var v=e.selectAll("path.mean").data(t.type==="box"&&t.boxmean||t.type==="violin"&&t.box.visible&&t.meanline.visible?Bu.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(d){var p=i.c2l(d.pos+l,!0),m=i.l2p(p-f)+s,y=i.l2p(p+c)+s,_=o?(m+y)/2:i.l2p(p)+s,b=n.c2p(d.mean,!0),w=n.c2p(d.mean-d.sd,!0),x=n.c2p(d.mean+d.sd,!0);t.orientation==="h"?Bc.select(this).attr("d","M"+b+","+m+"V"+y+(u==="sd"?"m0,0L"+w+","+_+"L"+b+","+m+"L"+x+","+_+"Z":"")):Bc.select(this).attr("d","M"+m+","+b+"H"+y+(u==="sd"?"m0,0L"+_+","+w+"L"+m+","+b+"L"+_+","+x+"Z":""))})}hY.exports={plot:s5e,plotBoxAndWhiskers:fY,plotPoints:cY,plotBoxMean:vY}});var Pw=N((JFe,dY)=>{"use strict";var Cw=Sr(),Ew=Tr(),Dw=jr();function u5e(e,r,t){var a=t||Cw.select(e).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=Cw.select(this),o=n[0].trace,l=o.line.width;function s(c,v,d,p){c.style("stroke-width",v+"px").call(Ew.stroke,d).call(Ew.fill,p)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(c){if(!c.empty){var v=Cw.select(this),d=o[c.dir];s(v,d.line.width,d.line.color,d.fillcolor),v.style("opacity",o.selectedpoints&&!c.selected?.3:1)}});else{s(u,l,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":l,"stroke-dasharray":2*l+"px,"+l+"px"}).call(Ew.stroke,o.line.color);var f=i.selectAll("path.point");Dw.pointStyle(f,o,e)}})}function f5e(e,r,t){var a=r[0].trace,n=t.selectAll("path.point");a.selectedpoints?Dw.selectedPointStyle(n,a):Dw.pointStyle(n,a,e)}dY.exports={style:u5e,styleOnSelect:f5e}});var Fw=N(($Fe,gY)=>{"use strict";var c5e=Or(),Rw=Ee(),ms=Fn(),pY=Tr(),v5e=Rw.fillText;function h5e(e,r,t,a){var n=e.cd,i=n[0].trace,o=i.hoveron,l=[],s;return o.indexOf("boxes")!==-1&&(l=l.concat(yY(e,r,t,a))),o.indexOf("points")!==-1&&(s=mY(e,r,t)),a==="closest"?s?[s]:l:(s&&l.push(s),l)}function yY(e,r,t,a){var n=e.cd,i=e.xa,o=e.ya,l=n[0].trace,s=n[0].t,u=l.type==="violin",f,c,v,d,p,m,y,_,b,w,x,T=s.bdPos,k,M,S=s.wHover,E=function(de){return v.c2l(de.pos)+s.bPos-v.c2l(m)};u&&l.side!=="both"?(l.side==="positive"&&(b=function(de){var W=E(de);return ms.inbox(W,W+S,w)},k=T,M=0),l.side==="negative"&&(b=function(de){var W=E(de);return ms.inbox(W-S,W,w)},k=0,M=T)):(b=function(de){var W=E(de);return ms.inbox(W-S,W+S,w)},k=M=T);var P;u?P=function(de){return ms.inbox(de.span[0]-p,de.span[1]-p,w)}:P=function(de){return ms.inbox(de.min-p,de.max-p,w)},l.orientation==="h"?(p=r,m=t,y=P,_=b,f="y",v=o,c="x",d=i):(p=t,m=r,y=b,_=P,f="x",v=i,c="y",d=o);var R=Math.min(1,T/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));w=e.maxHoverDistance-R,x=e.maxSpikeDistance-R;function D(de){return(y(de)+_(de))/2}var z=ms.getDistanceFunction(a,y,_,D);if(ms.getClosest(n,z,e),e.index===!1)return[];var O=n[e.index],H=l.line.color,V=(l.marker||{}).color;pY.opacity(H)&&l.line.width?e.color=H:pY.opacity(V)&&l.boxpoints?e.color=V:e.color=l.fillcolor,e[f+"0"]=v.c2p(O.pos+s.bPos-M,!0),e[f+"1"]=v.c2p(O.pos+s.bPos+k,!0),e[f+"LabelVal"]=O.orig_p!==void 0?O.orig_p:O.pos;var G=f+"Spike";e.spikeDistance=D(O)*x/w,e[G]=v.c2p(O.pos,!0);var B=l.boxmean||l.sizemode==="sd"||(l.meanline||{}).visible,Y=l.boxpoints||l.points,X=Y&&B?["max","uf","q3","med","mean","q1","lf","min"]:Y&&!B?["max","uf","q3","med","q1","lf","min"]:!Y&&B?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],Z=d.range[1]{"use strict";bY.exports=function(r,t){return t.hoverOnBox&&(r.hoverOnBox=t.hoverOnBox),"xVal"in t&&(r.x=t.xVal),"yVal"in t&&(r.y=t.yVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r}});var Nw=N((QFe,_Y)=>{"use strict";_Y.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l,s;if(t===!1)for(l=0;l{"use strict";wY.exports={attributes:tg(),layoutAttributes:ag(),supplyDefaults:M0().supplyDefaults,crossTraceDefaults:M0().crossTraceDefaults,supplyLayoutDefaults:Aw().supplyLayoutDefaults,calc:Sw(),crossTraceCalc:qw().crossTraceCalc,plot:Lw().plot,style:Pw().style,styleOnSelect:Pw().styleOnSelect,hoverPoints:Fw().hoverPoints,eventData:xY(),selectPoints:Nw(),moduleType:"trace",name:"box",basePlotModule:qi(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var MY=N((rNe,AY)=>{"use strict";AY.exports=TY()});var k0=N((tNe,kY)=>{"use strict";var ti=wi(),d5e=mn(),p5e=fa(),zw=Qi().axisHoverFormat,y5e=La().hovertemplateAttrs,m5e=La().texttemplateAttrs,g5e=ko(),Hn=bt().extendFlat;kY.exports=Hn({z:{valType:"data_array",editType:"calc"},x:Hn({},ti.x,{impliedEdits:{xtype:"array"}}),x0:Hn({},ti.x0,{impliedEdits:{xtype:"scaled"}}),dx:Hn({},ti.dx,{impliedEdits:{xtype:"scaled"}}),y:Hn({},ti.y,{impliedEdits:{ytype:"array"}}),y0:Hn({},ti.y0,{impliedEdits:{ytype:"scaled"}}),dy:Hn({},ti.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Hn({},ti.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Hn({},ti.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Hn({},ti.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Hn({},ti.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Hn({},ti.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Hn({},ti.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:zw("x"),yhoverformat:zw("y"),zhoverformat:zw("z",1),hovertemplate:y5e(),texttemplate:m5e({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:p5e({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Hn({},d5e.showlegend,{dflt:!1}),zorder:ti.zorder},g5e("",{cLetter:"z",autoColorDflt:!1}))});var Iw=N((aNe,qY)=>{"use strict";var b5e=Pr(),ig=Ee(),x5e=gr();qY.exports=function(r,t,a,n,i,o){var l=a("z");i=i||"x",o=o||"y";var s,u;if(l===void 0||!l.length)return 0;if(ig.isArray1D(l)){s=a(i),u=a(o);var f=ig.minRowLength(s),c=ig.minRowLength(u);if(f===0||c===0)return 0;t._length=Math.min(f,c,l.length)}else{if(s=SY(i,a),u=SY(o,a),!_5e(l))return 0;a("transpose"),t._length=null}var v=x5e.getComponentMethod("calendars","handleTraceDefaults");return v(r,t,[i,o],n),!0};function SY(e,r){var t=r(e),a=t?r(e+"type","array"):"scaled";return a==="scaled"&&(r(e+"0"),r("d"+e)),t}function _5e(e){for(var r=!0,t=!1,a=!1,n,i=0;i0&&(t=!0);for(var o=0;o{"use strict";var LY=Ee();CY.exports=function(r,t){r("texttemplate");var a=LY.extendFlat({},t.font,{color:"auto",size:"auto"});LY.coerceFont(r,"textfont",a)}});var Ow=N((iNe,EY)=>{"use strict";EY.exports=function(r,t,a){var n=a("zsmooth");n===!1&&(a("xgap"),a("ygap")),a("zhoverformat")}});var RY=N((oNe,PY)=>{"use strict";var DY=Ee(),w5e=Iw(),T5e=S0(),A5e=dc(),M5e=Ow(),k5e=ul(),S5e=k0();PY.exports=function(r,t,a,n){function i(l,s){return DY.coerce(r,t,S5e,l,s)}var o=w5e(r,t,i,n);if(!o){t.visible=!1;return}A5e(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),T5e(i,n),M5e(r,t,i,n),i("hoverongaps"),i("connectgaps",DY.isArray1D(t.z)&&t.zsmooth!==!1),k5e(r,t,n,i,{prefix:"",cLetter:"z"}),i("zorder")}});var Bw=N((lNe,FY)=>{"use strict";var Hc=Pr();FY.exports={count:function(e,r,t){return t[e]++,1},sum:function(e,r,t,a){var n=a[r];return Hc(n)?(n=Number(n),t[e]+=n,n):0},avg:function(e,r,t,a,n){var i=a[r];return Hc(i)&&(i=Number(i),t[e]+=i,n[e]++),0},min:function(e,r,t,a){var n=a[r];if(Hc(n))if(n=Number(n),Hc(t[e])){if(t[e]>n){var i=n-t[e];return t[e]=n,i}}else return t[e]=n,n;return 0},max:function(e,r,t,a){var n=a[r];if(Hc(n))if(n=Number(n),Hc(t[e])){if(t[e]{"use strict";NY.exports={percent:function(e,r){for(var t=e.length,a=100/r,n=0;n{"use strict";zY.exports=function(r,t){for(var a=r.length,n=0,i=0;i{"use strict";var Uc=Ft(),Hu=Uc.ONEAVGYEAR,IY=Uc.ONEAVGMONTH,lg=Uc.ONEDAY,OY=Uc.ONEHOUR,BY=Uc.ONEMIN,HY=Uc.ONESEC,UY=Or().tickIncrement;VY.exports=function(r,t,a,n,i){var o=-1.1*t,l=-.1*t,s=r-l,u=a[0],f=a[1],c=Math.min(og(u+l,u+s,n,i),og(f+l,f+s,n,i)),v=Math.min(og(u+o,u+l,n,i),og(f+o,f+l,n,i)),d,p;if(c>v&&vlg){var m=d===Hu?1:6,y=d===Hu?"M12":"M1";return function(_,b){var w=n.c2d(_,Hu,i),x=w.indexOf("-",m);x>0&&(w=w.substr(0,x));var T=n.d2c(w,0,i);if(T<_){var k=UY(T,y,!1,i);(T+k)/2<_+r&&(T=k)}return b&&p?UY(T,y,!0,i):T}}return function(_,b){var w=d*Math.round(_/d);return w+d/10<_&&w+d*.9<_+r&&(w+=d),b&&p&&(w-=d),w}};function og(e,r,t,a){if(e*r<=0)return 1/0;for(var n=Math.abs(r-e),i=t.type==="date",o=GY(n,i),l=0;l<10;l++){var s=GY(o*80,i);if(o===s)break;if(q5e(s,e,r,i,t,a))o=s;else break}return o}function GY(e,r){return r&&e>HY?e>lg?e>Hu*1.1?Hu:e>IY*1.1?IY:lg:e>OY?OY:e>BY?BY:HY:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function q5e(e,r,t,a,n,i){if(a&&e>lg){var o=YY(r,n,i),l=YY(t,n,i),s=e===Hu?0:1;return o[s]!==l[s]}return Math.floor(t/e)-Math.floor(r/e)>.1}function YY(e,r,t){var a=r.c2d(e,Hu,t).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}});var Ww=N((cNe,ZY)=>{"use strict";var Yw=Pr(),vn=Ee(),WY=gr(),Di=Or(),L5e=$m(),jY=Bw(),C5e=Hw(),E5e=Uw(),D5e=Gw();function P5e(e,r){var t=[],a=[],n=r.orientation==="h",i=Di.getFromId(e,n?r.yaxis:r.xaxis),o=n?"y":"x",l={x:"y",y:"x"}[o],s=r[o+"calendar"],u=r.cumulative,f,c=Vw(e,r,i,o),v=c[0],d=c[1],p=typeof v.size=="string",m=[],y=p?m:v,_=[],b=[],w=[],x=0,T=r.histnorm,k=r.histfunc,M=T.indexOf("density")!==-1,S,E,P;u.enabled&&M&&(T=T.replace(/ ?density$/,""),M=!1);var R=k==="max"||k==="min",D=R?null:0,z=jY.count,O=C5e[T],H=!1,V=function(W){return i.r2c(W,0,s)},G;for(vn.isArrayOrTypedArray(r[l])&&k!=="count"&&(G=r[l],H=k==="avg",z=jY[k]),f=V(v.start),E=V(v.end)+(f-Di.tickIncrement(f,v.size,!1,s))/1e6;f=0&&P=ye;f--)if(a[f]){ue=f;break}for(f=ye;f<=ue;f++)if(Yw(t[f])&&Yw(a[f])){var de={p:t[f],s:a[f],b:0};u.enabled||(de.pts=w[f],Z?de.ph0=de.ph1=w[f].length?d[w[f][0]]:t[f]:(r._computePh=!0,de.ph0=K(m[f]),de.ph1=K(m[f+1],!0))),oe.push(de)}return oe.length===1&&(oe[0].width1=Di.tickIncrement(oe[0].p,v.size,!1,s)-oe[0].p),L5e(oe,r),vn.isArrayOrTypedArray(r.selectedpoints)&&vn.tagSelected(oe,r,le),oe}function Vw(e,r,t,a,n){var i=a+"bins",o=e._fullLayout,l=r["_"+a+"bingroup"],s=o._histogramBinOpts[l],u=o.barmode==="overlay",f,c,v,d,p,m,y,_=function(ie){return t.r2c(ie,0,d)},b=function(ie){return t.c2r(ie,0,d)},w=t.type==="date"?function(ie){return ie||ie===0?vn.cleanDate(ie,null,d):null}:function(ie){return Yw(ie)?Number(ie):null};function x(ie,K,he){K[ie+"Found"]?(K[ie]=w(K[ie]),K[ie]===null&&(K[ie]=he[ie])):(m[ie]=K[ie]=he[ie],vn.nestedProperty(c[0],i+"."+ie).set(he[ie]))}if(r["_"+a+"autoBinFinished"])delete r["_"+a+"autoBinFinished"];else{c=s.traces;var T=[],k=!0,M=!1,S=!1;for(f=0;ft.r2l(G)&&(Y=Di.tickIncrement(Y,s.size,!0,d)),z.start=t.l2r(Y),V||vn.nestedProperty(r,i+".start").set(z.start)}var X=s.end,Z=t.r2l(D.end),te=Z!==void 0;if((s.endFound||te)&&Z!==t.r2l(X)){var fe=te?Z:vn.aggNums(Math.max,null,p);z.end=t.l2r(fe),te||vn.nestedProperty(r,i+".start").set(z.end)}var le="autobin"+a;return r._input[le]===!1&&(r._input[i]=vn.extendFlat({},r[i]||{}),delete r._input[le],delete r[le]),[z,p]}function R5e(e,r,t,a,n){var i=e._fullLayout,o=F5e(e,r),l=!1,s=1/0,u=[r],f,c,v;for(f=0;f=0;a--)l(a);else if(r==="increasing"){for(a=1;a=0;a--)e[a]+=e[a+1];t==="exclude"&&(e.push(0),e.shift())}}ZY.exports={calc:P5e,calcAllAutoBins:Vw}});var tV=N((vNe,rV)=>{"use strict";var XY=Ee(),Gc=Or(),JY=Bw(),z5e=Hw(),I5e=Uw(),O5e=Gw(),$Y=Ww().calcAllAutoBins;rV.exports=function(r,t){var a=Gc.getFromId(r,t.xaxis),n=Gc.getFromId(r,t.yaxis),i=t.xcalendar,o=t.ycalendar,l=function(Le){return a.r2c(Le,0,i)},s=function(Le){return n.r2c(Le,0,o)},u=function(Le){return a.c2r(Le,0,i)},f=function(Le){return n.c2r(Le,0,o)},c,v,d,p,m=$Y(r,t,a,"x"),y=m[0],_=m[1],b=$Y(r,t,n,"y"),w=b[0],x=b[1],T=t._length;_.length>T&&_.splice(T,_.length-T),x.length>T&&x.splice(T,x.length-T);var k=[],M=[],S=[],E=typeof y.size=="string",P=typeof w.size=="string",R=[],D=[],z=E?R:y,O=P?D:w,H=0,V=[],G=[],B=t.histnorm,Y=t.histfunc,X=B.indexOf("density")!==-1,Z=Y==="max"||Y==="min",te=Z?null:0,fe=JY.count,le=z5e[B],ie=!1,K=[],he=[],oe="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";oe&&Y!=="count"&&(ie=Y==="avg",fe=JY[Y]);var ye=y.size,ue=l(y.start),de=l(y.end)+(ue-Gc.tickIncrement(ue,ye,!1,i))/1e6;for(c=ue;c=0&&d=0&&p{"use strict";var Uo=Ee(),aV=Ft().BADNUM,nV=yc();iV.exports=function(r,t,a,n,i,o){var l=r._length,s=t.makeCalcdata(r,n),u=a.makeCalcdata(r,i);s=nV(r,t,n,s).vals,u=nV(r,a,i,u).vals;var f=r.text,c=f!==void 0&&Uo.isArray1D(f),v=r.hovertext,d=v!==void 0&&Uo.isArray1D(v),p,m,y=Uo.distinctVals(s),_=y.vals,b=Uo.distinctVals(u),w=b.vals,x=[],T,k,M=w.length,S=_.length;for(p=0;p{"use strict";var B5e=Pr(),H5e=Ee(),sg=Ft().BADNUM;lV.exports=function(r,t,a,n){var i,o,l,s,u,f;function c(_){if(B5e(_))return+_}if(t&&t.transpose){for(i=0,u=0;u{"use strict";var U5e=Ee(),uV=.01,G5e=[[-1,0],[1,0],[0,-1],[0,1]];function Y5e(e){return .5-.25*Math.min(1,e*.5)}cV.exports=function(r,t){var a=1,n;for(fV(r,t),n=0;nuV;n++)a=fV(r,t,Y5e(a));return a>uV&&U5e.log("interp2d didn't converge quickly",a),r};function fV(e,r,t){var a=0,n,i,o,l,s,u,f,c,v,d,p,m,y;for(l=0;lm&&(a=Math.max(a,Math.abs(e[i][o]-p)/(y-m))))}return a}});var dV=N((yNe,hV)=>{"use strict";var V5e=Ee().maxRowLength;hV.exports=function(r){var t=[],a={},n=[],i=r[0],o=[],l=[0,0,0],s=V5e(r),u,f,c,v,d,p,m,y;for(f=0;f=0;d--)v=n[d],f=v[0],c=v[1],p=((a[[f-1,c]]||l)[2]+(a[[f+1,c]]||l)[2]+(a[[f,c-1]]||l)[2]+(a[[f,c+1]]||l)[2])/20,p&&(m[v]=[f,c,p],n.splice(d,1),y=!0);if(!y)throw"findEmpties iterated with no new neighbors";for(v in m)a[v]=m[v],t.push(m[v])}return t.sort(function(_,b){return b[2]-_[2]})}});var gV=N((mNe,mV)=>{"use strict";var pV=gr(),yV=Ee().isArrayOrTypedArray;mV.exports=function(r,t,a,n,i,o){var l=[],s=pV.traceIs(r,"contour"),u=pV.traceIs(r,"histogram"),f,c,v,d=yV(t)&&t.length>1;if(d&&!u&&o.type!=="category"){var p=t.length;if(p<=i){if(s)l=Array.from(t).slice(0,i);else if(i===1)o.type==="log"?l=[.5*t[0],2*t[0]]:l=[t[0]-.5,t[0]+.5];else if(o.type==="log"){for(l=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],v=1;v{"use strict";var bV=gr(),jw=Ee(),ug=Or(),xV=yc(),W5e=tV(),j5e=oh(),Z5e=oV(),X5e=sV(),J5e=vV(),$5e=dV(),fg=gV(),Zw=Ft().BADNUM;wV.exports=function(r,t){var a=ug.getFromId(r,t.xaxis||"x"),n=ug.getFromId(r,t.yaxis||"y"),i=bV.traceIs(t,"contour"),o=bV.traceIs(t,"histogram"),l=i?"best":t.zsmooth,s,u,f,c,v,d,p,m,y,_,b;if(a._minDtick=0,n._minDtick=0,o)b=W5e(r,t),c=b.orig_x,s=b.x,u=b.x0,f=b.dx,m=b.orig_y,v=b.y,d=b.y0,p=b.dy,y=b.z;else{var w=t.z;jw.isArray1D(w)?(Z5e(t,a,n,"x","y",["z"]),s=t._x,v=t._y,w=t._z):(c=t.x?a.makeCalcdata(t,"x"):[],m=t.y?n.makeCalcdata(t,"y"):[],s=xV(t,a,"x",c).vals,v=xV(t,n,"y",m).vals,t._x=s,t._y=v),u=t.x0,f=t.dx,d=t.y0,p=t.dy,y=X5e(w,t,a,n)}(a.rangebreaks||n.rangebreaks)&&(y=K5e(s,v,y),o||(s=_V(s),v=_V(v),t._x=s,t._y=v)),!o&&(i||t.connectgaps)&&(t._emptypoints=$5e(y),J5e(y,t._emptypoints));function x(z){l=t._input.zsmooth=t.zsmooth=!1,jw.warn('cannot use zsmooth: "fast": '+z)}function T(z){if(z.length>1){var O=(z[z.length-1]-z[0])/(z.length-1),H=Math.abs(O/100);for(_=0;_H)return!1}return!0}t._islinear=!1,a.type==="log"||n.type==="log"?l==="fast"&&x("log axis found"):T(s)?T(v)?t._islinear=!0:l==="fast"&&x("y scale is not linear"):l==="fast"&&x("x scale is not linear");var k=jw.maxRowLength(y),M=t.xtype==="scaled"?"":s,S=fg(t,M,u,f,k,a),E=t.ytype==="scaled"?"":v,P=fg(t,E,d,p,y.length,n);t._extremes[a._id]=ug.findExtremes(a,S),t._extremes[n._id]=ug.findExtremes(n,P);var R={x:S,y:P,z:y,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(t.xperiodalignment&&c&&(R.orig_x=c),t.yperiodalignment&&m&&(R.orig_y=m),M&&M.length===S.length-1&&(R.xCenter=M),E&&E.length===P.length-1&&(R.yCenter=E),o&&(R.xRanges=b.xRanges,R.yRanges=b.yRanges,R.pts=b.pts),i||j5e(r,t,{vals:y,cLetter:"z"}),i&&t.contours&&t.contours.coloring==="heatmap"){var D={type:t.type==="contour"?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};R.xfill=fg(D,M,u,f,k,a),R.yfill=fg(D,E,d,p,y.length,n)}return[R]};function _V(e){for(var r=[],t=e.length,a=0;a{"use strict";vg.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"]];vg.STYLE=vg.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var Xw=N((xNe,MV)=>{"use strict";var TV=hg(),Q5e=jr(),AV=Ee(),Yc=null;function e_e(){if(Yc!==null)return Yc;Yc=!1;var e=AV.isSafari()||AV.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(TV.CSS_DECLARATIONS).reverse(),t=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof t=="function")Yc=r.some(function(o){return t.apply(null,o)});else{var a=Q5e.tester.append("image").attr("style",TV.STYLE),n=window.getComputedStyle(a.node()),i=n.imageRendering;Yc=r.some(function(o){var l=o[1];return i===l||i===l.toLowerCase()}),a.remove()}}return Yc}MV.exports=e_e});var dg=N((_Ne,RV)=>{"use strict";var kV=Sr(),r_e=Sn(),t_e=gr(),a_e=jr(),n_e=Or(),Pi=Ee(),SV=Ea(),i_e=o4(),o_e=Tr(),l_e=So().extractOpts,s_e=So().makeColorScaleFuncFromTrace,u_e=ll(),f_e=Xa(),Jw=f_e.LINE_SPACING,c_e=Xw(),v_e=hg().STYLE,DV="heatmap-label";function PV(e){return e.selectAll("g."+DV)}function qV(e){PV(e).remove()}RV.exports=function(e,r,t,a){var n=r.xaxis,i=r.yaxis;Pi.makeTraceGroups(a,t,"hm").each(function(o){var l=kV.select(this),s=o[0],u=s.trace,f=u.xgap||0,c=u.ygap||0,v=s.z,d=s.x,p=s.y,m=s.xCenter,y=s.yCenter,_=t_e.traceIs(u,"contour"),b=_?"best":u.zsmooth,w=v.length,x=Pi.maxRowLength(v),T=!1,k=!1,M,S,E,P,R,D,z,O;for(D=0;M===void 0&&D0;)S=n.c2p(d[D]),D--;for(S0;)R=i.c2p(p[D]),D--;R=n._length||S<=0||P>=i._length||R<=0;if(Y){var X=l.selectAll("image").data([]);X.exit().remove(),qV(l);return}var Z,te;H==="fast"?(Z=x,te=w):(Z=G,te=B);var fe=document.createElement("canvas");fe.width=Z,fe.height=te;var le=fe.getContext("2d",{willReadFrequently:!0}),ie=s_e(u,{noNumericCheck:!0,returnArray:!0}),K,he;H==="fast"?(K=T?function(vt){return x-1-vt}:Pi.identity,he=k?function(vt){return w-1-vt}:Pi.identity):(K=function(vt){return Pi.constrain(Math.round(n.c2p(d[vt])-M),0,G)},he=function(vt){return Pi.constrain(Math.round(i.c2p(p[vt])-P),0,B)});var oe=he(0),ye=[oe,oe],ue=T?0:1,de=k?0:1,W=0,Q=0,j=0,pe=0,me,we,Ne,Fe,Re;function Ie(vt,An){if(vt!==void 0){var Rt=ie(vt);return Rt[0]=Math.round(Rt[0]),Rt[1]=Math.round(Rt[1]),Rt[2]=Math.round(Rt[2]),W+=An,Q+=Rt[0]*An,j+=Rt[1]*An,pe+=Rt[2]*An,Rt}return[0,0,0,0]}function Be(vt,An,Rt,zs){var pn=vt[Rt.bin0];if(pn===void 0)return Ie(void 0,1);var Gi=vt[Rt.bin1],Ut=An[Rt.bin0],Yi=An[Rt.bin1],Pl=Gi-pn||0,Rl=Ut-pn||0,yr;return Gi===void 0?Yi===void 0?yr=0:Ut===void 0?yr=2*(Yi-pn):yr=(2*Yi-Ut-pn)*2/3:Yi===void 0?Ut===void 0?yr=0:yr=(2*pn-Gi-Ut)*2/3:Ut===void 0?yr=(2*Yi-Gi-pn)*2/3:yr=Yi+pn-Gi-Ut,Ie(pn+Rt.frac*Pl+zs.frac*(Rl+Rt.frac*yr))}if(H!=="default"){var ze=0,Pe;try{Pe=new Uint8Array(Z*te*4)}catch(vt){Pe=new Array(Z*te*4)}if(H==="smooth"){var Xe=m||d,Ue=y||p,se=new Array(Xe.length),Te=new Array(Ue.length),Se=new Array(G),ir=m?CV:LV,Qe=y?CV:LV,Le,Ce,Ge;for(D=0;DEt||Et>i._length))for(z=Ar;zma||ma>n._length)){var St=i_e({x:Dt,y:zr},u,e._fullLayout);St.x=Dt,St.y=zr;var ja=s.z[D][z];ja===void 0?(St.z="",St.zLabel=""):(St.z=ja,St.zLabel=n_e.tickText(De,ja,"hover").text);var ga=s.text&&s.text[D]&&s.text[D][z];(ga===void 0||ga===!1)&&(ga=""),St.text=ga;var jt=Pi.texttemplateString(ne,St,e._fullLayout._d3locale,St,u._meta||{});if(jt){var Na=jt.split("
"),br=Na.length,pt=0;for(O=0;O{"use strict";FV.exports={min:"zmin",max:"zmax"}});var pg=N((TNe,NV)=>{"use strict";var h_e=Sr();NV.exports=function(r){h_e.select(r).selectAll(".hm image").style("opacity",function(t){return t.trace.opacity})}});var mg=N((ANe,IV)=>{"use strict";var zV=Fn(),q0=Ee(),yg=q0.isArrayOrTypedArray,d_e=Or(),p_e=So().extractOpts;IV.exports=function(r,t,a,n,i){i||(i={});var o=i.isContour,l=r.cd[0],s=l.trace,u=r.xa,f=r.ya,c=l.x,v=l.y,d=l.z,p=l.xCenter,m=l.yCenter,y=l.zmask,_=s.zhoverformat,b=c,w=v,x,T,k,M;if(r.index!==!1){try{k=Math.round(r.index[1]),M=Math.round(r.index[0])}catch(X){q0.error("Error hovering on heatmap, pointNumber must be [row,col], found:",r.index);return}if(k<0||k>=d[0].length||M<0||M>d.length)return}else{if(zV.inbox(t-c[0],t-c[c.length-1],0)>0||zV.inbox(a-v[0],a-v[v.length-1],0)>0)return;if(o){var S;for(b=[2*c[0]-c[1]],S=1;S{"use strict";OV.exports={attributes:k0(),supplyDefaults:RY(),calc:cg(),plot:dg(),colorbar:$w(),style:pg(),hoverPoints:mg(),moduleType:"trace",name:"heatmap",basePlotModule:qi(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var UV=N((kNe,HV)=>{"use strict";HV.exports=BV()});var Kw=N((SNe,GV)=>{"use strict";GV.exports=function(r,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var VV=N((qNe,YV)=>{"use strict";YV.exports={eventDataKeys:["binNumber"]}});var gg=N((LNe,ZV)=>{"use strict";var Un=Nu(),WV=Qi().axisHoverFormat,y_e=La().hovertemplateAttrs,m_e=La().texttemplateAttrs,Qw=fa(),jV=Kw(),g_e=VV(),e6=bt().extendFlat;ZV.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:WV("x"),yhoverformat:WV("y"),text:e6({},Un.text,{}),hovertext:e6({},Un.hovertext,{}),orientation:Un.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:jV("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:jV("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:y_e({},{keys:g_e.eventDataKeys}),texttemplate:m_e({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:e6({},Un.textposition,{arrayOk:!1}),textfont:Qw({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:Qw({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:Qw({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Un.insidetextanchor,textangle:Un.textangle,cliponaxis:Un.cliponaxis,constraintext:Un.constraintext,marker:Un.marker,offsetgroup:Un.offsetgroup,alignmentgroup:Un.alignmentgroup,selected:Un.selected,unselected:Un.unselected,zorder:Un.zorder}});var KV=N((CNe,$V)=>{"use strict";var XV=gr(),L0=Ee(),JV=Tr(),b_e=zu().handleText,x_e=dw(),__e=gg();$V.exports=function(r,t,a,n){function i(b,w){return L0.coerce(r,t,__e,b,w)}var o=i("x"),l=i("y"),s=i("cumulative.enabled");s&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");b_e(r,t,n,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat");var f=i("orientation",l&&!o?"h":"v"),c=f==="v"?"x":"y",v=f==="v"?"y":"x",d=o&&l?Math.min(L0.minRowLength(o)&&L0.minRowLength(l)):L0.minRowLength(t[c]||[]);if(!d){t.visible=!1;return}t._length=d;var p=XV.getComponentMethod("calendars","handleTraceDefaults");p(r,t,["x","y"],n);var m=t[v];m&&i("histfunc"),i("histnorm"),i("autobin"+c),x_e(r,t,i,a,n),L0.coerceSelectionMarkerOpacity(t,i);var y=(t.marker.line||{}).color,_=XV.getComponentMethod("errorbars","supplyDefaults");_(r,t,y||JV.defaultLine,{axis:"y"}),_(r,t,y||JV.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var xg=N((ENe,rW)=>{"use strict";var C0=Ee(),w_e=va(),bg=gr().traceIs,T_e=e0(),A_e=zu().validateCornerradius,QV=C0.nestedProperty,r6=Tu().getAxisGroup,eW=[{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"}],M_e=["x","y"];rW.exports=function(r,t){var a=t._histogramBinOpts={},n=[],i={},o=[],l,s,u,f,c,v,d;function p(H,V){return C0.coerce(l._input,l,l._module.attributes,H,V)}function m(H){return H.orientation==="v"?"x":"y"}function y(H,V){var G=w_e.getFromTrace({_fullLayout:t},H,V);return G.type}function _(H,V,G){var B=H.uid+"__"+G;V||(V=B);var Y=y(H,G),X=H[G+"calendar"]||"",Z=a[V],te=!0;Z&&(Y===Z.axType&&X===Z.calendar?(te=!1,Z.traces.push(H),Z.dirs.push(G)):(V=B,Y!==Z.axType&&C0.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+Y,"axis","with bins on","type:"+Z.axType,"axis."].join(" ")),X!==Z.calendar&&C0.warn(["Attempted to group the bins of trace",H.index,"set with a",X,"calendar","with bins",Z.calendar?"on a "+Z.calendar+" calendar":"w/o a set calendar"].join(" ")))),te&&(a[V]={traces:[H],dirs:[G],axType:Y,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=V}for(c=0;c{"use strict";var k_e=ww().hoverPoints,S_e=Or().hoverLabelText;tW.exports=function(r,t,a,n,i){var o=k_e(r,t,a,n,i);if(o){r=o[0];var l=r.cd[r.index],s=r.cd[0].trace;if(!s.cumulative.enabled){var u=s.orientation==="h"?"y":"x";r[u+"Label"]=S_e(r[u+"a"],[l.ph0,l.ph1],s[u+"hoverformat"])}return o}}});var t6=N((PNe,nW)=>{"use strict";nW.exports=function(r,t,a,n,i){if(r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(r.z=t.zLabelVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;r.pointNumbers=o,r.binNumber=r.pointNumber,delete r.pointNumber,delete r.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s{"use strict";iW.exports={attributes:gg(),layoutAttributes:Xm(),supplyDefaults:KV(),crossTraceDefaults:xg(),supplyLayoutDefaults:pw(),calc:Ww().calc,crossTraceCalc:fm().crossTraceCalc,plot:xw().plot,layerName:"barlayer",style:zc().style,styleOnSelect:zc().styleOnSelect,colorbar:i0(),hoverPoints:aW(),selectPoints:Tw(),eventData:t6(),moduleType:"trace",name:"histogram",basePlotModule:qi(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var sW=N((FNe,lW)=>{"use strict";lW.exports=oW()});var wg=N((NNe,fW)=>{"use strict";var yo=gg(),uW=Kw(),_g=k0(),q_e=mn(),a6=Qi().axisHoverFormat,L_e=La().hovertemplateAttrs,C_e=La().texttemplateAttrs,E_e=ko(),E0=bt().extendFlat;fW.exports=E0({x:yo.x,y:yo.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:yo.histnorm,histfunc:yo.histfunc,nbinsx:yo.nbinsx,xbins:uW("x"),nbinsy:yo.nbinsy,ybins:uW("y"),autobinx:yo.autobinx,autobiny:yo.autobiny,bingroup:E0({},yo.bingroup,{}),xbingroup:E0({},yo.bingroup,{}),ybingroup:E0({},yo.bingroup,{}),xgap:_g.xgap,ygap:_g.ygap,zsmooth:_g.zsmooth,xhoverformat:a6("x"),yhoverformat:a6("y"),zhoverformat:a6("z",1),hovertemplate:L_e({},{keys:"z"}),texttemplate:C_e({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:_g.textfont,showlegend:E0({},q_e.showlegend,{dflt:!1})},E_e("",{cLetter:"z",autoColorDflt:!1}))});var n6=N((zNe,vW)=>{"use strict";var D_e=gr(),cW=Ee();vW.exports=function(r,t,a,n){var i=a("x"),o=a("y"),l=cW.minRowLength(i),s=cW.minRowLength(o);if(!l||!s){t.visible=!1;return}t._length=Math.min(l,s);var u=D_e.getComponentMethod("calendars","handleTraceDefaults");u(r,t,["x","y"],n);var f=a("z")||a("marker.color");f&&a("histfunc"),a("histnorm"),a("autobinx"),a("autobiny")}});var dW=N((INe,hW)=>{"use strict";var P_e=Ee(),R_e=n6(),F_e=Ow(),N_e=ul(),z_e=S0(),I_e=wg();hW.exports=function(r,t,a,n){function i(o,l){return P_e.coerce(r,t,I_e,o,l)}R_e(r,t,i,n),t.visible!==!1&&(F_e(r,t,i,n),N_e(r,t,n,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),z_e(i,n),i("xhoverformat"),i("yhoverformat"))}});var mW=N((ONe,yW)=>{"use strict";var O_e=mg(),pW=Or().hoverLabelText;yW.exports=function(r,t,a,n,i){var o=O_e(r,t,a,n,i);if(o){r=o[0];var l=r.index,s=l[0],u=l[1],f=r.cd[0],c=f.trace,v=f.xRanges[u],d=f.yRanges[s];return r.xLabel=pW(r.xa,[v[0],v[1]],c.xhoverformat),r.yLabel=pW(r.ya,[d[0],d[1]],c.yhoverformat),o}}});var bW=N((BNe,gW)=>{"use strict";gW.exports={attributes:wg(),supplyDefaults:dW(),crossTraceDefaults:xg(),calc:cg(),plot:dg(),layerName:"heatmaplayer",colorbar:$w(),style:pg(),hoverPoints:mW(),eventData:t6(),moduleType:"trace",name:"histogram2d",basePlotModule:qi(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var _W=N((HNe,xW)=>{"use strict";xW.exports=bW()});var Tg=N((UNe,wW)=>{"use strict";wW.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var Mg=N((GNe,kW)=>{"use strict";var pa=k0(),Ag=wi(),AW=Qi(),i6=AW.axisHoverFormat,B_e=AW.descriptionOnlyNumbers,H_e=ko(),U_e=si().dash,G_e=fa(),Vc=bt().extendFlat,MW=Tg(),Y_e=MW.COMPARISON_OPS2,V_e=MW.INTERVAL_OPS,TW=Ag.line;kW.exports=Vc({z:pa.z,x:pa.x,x0:pa.x0,dx:pa.dx,y:pa.y,y0:pa.y0,dy:pa.dy,xperiod:pa.xperiod,yperiod:pa.yperiod,xperiod0:Ag.xperiod0,yperiod0:Ag.yperiod0,xperiodalignment:pa.xperiodalignment,yperiodalignment:pa.yperiodalignment,text:pa.text,hovertext:pa.hovertext,transpose:pa.transpose,xtype:pa.xtype,ytype:pa.ytype,xhoverformat:i6("x"),yhoverformat:i6("y"),zhoverformat:i6("z",1),hovertemplate:pa.hovertemplate,texttemplate:Vc({},pa.texttemplate,{}),textfont:Vc({},pa.textfont,{}),hoverongaps:pa.hoverongaps,connectgaps:Vc({},pa.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:G_e({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:B_e("contour label")},operation:{valType:"enumerated",values:[].concat(Y_e).concat(V_e),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Vc({},TW.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:U_e,smoothing:Vc({},TW.smoothing,{}),editType:"plot"},zorder:Ag.zorder},H_e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var l6=N((YNe,qW)=>{"use strict";var hn=wg(),Tl=Mg(),W_e=ko(),o6=Qi().axisHoverFormat,SW=bt().extendFlat;qW.exports=SW({x:hn.x,y:hn.y,z:hn.z,marker:hn.marker,histnorm:hn.histnorm,histfunc:hn.histfunc,nbinsx:hn.nbinsx,xbins:hn.xbins,nbinsy:hn.nbinsy,ybins:hn.ybins,autobinx:hn.autobinx,autobiny:hn.autobiny,bingroup:hn.bingroup,xbingroup:hn.xbingroup,ybingroup:hn.ybingroup,autocontour:Tl.autocontour,ncontours:Tl.ncontours,contours:Tl.contours,line:{color:Tl.line.color,width:SW({},Tl.line.width,{dflt:.5}),dash:Tl.line.dash,smoothing:Tl.line.smoothing,editType:"plot"},xhoverformat:o6("x"),yhoverformat:o6("y"),zhoverformat:o6("z",1),hovertemplate:hn.hovertemplate,texttemplate:Tl.texttemplate,textfont:Tl.textfont},W_e("",{cLetter:"z",editTypeOverride:"calc"}))});var s6=N((VNe,LW)=>{"use strict";LW.exports=function(r,t,a,n){var i=n("contours.start"),o=n("contours.end"),l=i===!1||o===!1,s=a("contours.size"),u;l?u=t.autocontour=!0:u=a("autocontour",!1),(u||!s)&&a("ncontours")}});var u6=N((WNe,CW)=>{"use strict";var j_e=Ee();CW.exports=function(r,t,a,n){n||(n={});var i=r("contours.showlabels");if(i){var o=t.font;j_e.coerceFont(r,"contours.labelfont",o,{overrideDflt:{color:a}}),r("contours.labelformat")}n.hasHover!==!1&&r("zhoverformat")}});var f6=N((jNe,EW)=>{"use strict";var Z_e=ul(),X_e=u6();EW.exports=function(r,t,a,n,i){var o=a("contours.coloring"),l,s="";o==="fill"&&(l=a("contours.showlines")),l!==!1&&(o!=="lines"&&(s=a("line.color","#000")),a("line.width",.5),a("line.dash")),o!=="none"&&(r.showlegend!==!0&&(t.showlegend=!1),t._dfltShowLegend=!1,Z_e(r,t,n,a,{prefix:"",cLetter:"z"})),a("line.smoothing"),X_e(a,n,s,i)}});var FW=N((ZNe,RW)=>{"use strict";var DW=Ee(),J_e=n6(),$_e=s6(),K_e=f6(),Q_e=S0(),PW=l6();RW.exports=function(r,t,a,n){function i(l,s){return DW.coerce(r,t,PW,l,s)}function o(l){return DW.coerce2(r,t,PW,l)}J_e(r,t,i,n),t.visible!==!1&&($_e(r,t,i,o),K_e(r,t,i,n),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),t.contours&&t.contours.coloring==="heatmap"&&Q_e(i,n))}});var IW=N((XNe,zW)=>{"use strict";var v6=Or(),c6=Ee();zW.exports=function(r,t){var a=r.contours;if(r.autocontour){var n=r.zmin,i=r.zmax;(r.zauto||n===void 0)&&(n=c6.aggNums(Math.min,null,t)),(r.zauto||i===void 0)&&(i=c6.aggNums(Math.max,null,t));var o=NW(n,i,r.ncontours);a.size=o.dtick,a.start=v6.tickFirst(o),o.range.reverse(),a.end=v6.tickFirst(o),a.start===n&&(a.start+=a.size),a.end===i&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),r._input.contours||(r._input.contours={}),c6.extendFlat(r._input.contours,{start:a.start,end:a.end,size:a.size}),r._input.autocontour=!0}else if(a.type!=="constraint"){var l=a.start,s=a.end,u=r._input.contours;if(l>s&&(a.start=u.start=s,s=a.end=u.end=l,l=a.start),!(a.size>0)){var f;l===s?f=1:f=NW(l,s,r.ncontours).dtick,u.size=a.size=f}}};function NW(e,r,t){var a={type:"linear",range:[e,r]};return v6.autoTicks(a,(r-e)/(t||15)),a}});var D0=N((JNe,OW)=>{"use strict";OW.exports=function(r){return r.end+r.size/1e6}});var h6=N(($Ne,HW)=>{"use strict";var BW=So(),e4e=cg(),r4e=IW(),t4e=D0();HW.exports=function(r,t){var a=e4e(r,t),n=a[0].z;r4e(t,n);var i=t.contours,o=BW.extractOpts(t),l;if(i.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var s=i.start,u=t4e(i),f=i.size||1,c=Math.floor((u-s)/f)+1;isFinite(f)||(f=1,c=1);var v=s-f/2,d=v+c*f;l=[v,d]}else l=n;return BW.calc(r,t,{vals:l,cLetter:"z"}),a}});var kg=N((KNe,UW)=>{"use strict";UW.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 YW=N((QNe,GW)=>{"use strict";var Sg=kg();GW.exports=function(r){var t=r[0].z,a=t.length,n=t[0].length,i=a===2||n===2,o,l,s,u,f,c,v,d,p;for(l=0;le?0:1)+(r[0][1]>e?0:2)+(r[1][1]>e?0:4)+(r[1][0]>e?0:8);if(t===5||t===10){var a=(r[0][0]+r[0][1]+r[1][0]+r[1][1])/4;return e>a?t===5?713:1114:t===5?104:208}return t===15?0:t}});var ZW=N((eze,jW)=>{"use strict";var qg=Ee(),Wc=kg();jW.exports=function(r,t,a){var n,i,o,l,s;for(t=t||.01,a=a||.01,o=0;o20?(o=Wc.CHOOSESADDLE[o][(l[0]||l[1])<0?0:1],e.crossings[i]=Wc.SADDLEREMAINDER[o]):delete e.crossings[i],l=Wc.NEWDELTA[o],!l){qg.log("Found bad marching index:",o,r,e.level);break}s.push(WW(e,r,l)),r[0]+=l[0],r[1]+=l[1],i=r.join(","),P0(s[s.length-1],s[s.length-2],a,n)&&s.pop();var p=l[0]&&(r[0]<0||r[0]>f-2)||l[1]&&(r[1]<0||r[1]>u-2),m=r[0]===c[0]&&r[1]===c[1]&&l[0]===v[0]&&l[1]===v[1];if(m||t&&p)break;o=e.crossings[i]}d===1e4&&qg.log("Infinite loop in contour?");var y=P0(s[0],s[s.length-1],a,n),_=0,b=.2*e.smoothing,w=[],x=0,T,k,M,S,E,P,R,D,z,O,H;for(d=1;d=x;d--)if(T=w[d],T=x&&T+w[k]D&&z--,e.edgepaths[z]=H.concat(s,O));break}Y||(e.edgepaths[D]=s.concat(O))}for(D=0;D20&&r?e===208||e===1114?a=t[0]===0?1:-1:n=t[1]===0?1:-1:Wc.BOTTOMSTART.indexOf(e)!==-1?n=1:Wc.LEFTSTART.indexOf(e)!==-1?a=1:Wc.TOPSTART.indexOf(e)!==-1?n=-1:a=-1,[a,n]}function WW(e,r,t){var a=r[0]+Math.max(t[0],0),n=r[1]+Math.max(t[1],0),i=e.z[n][a],o=e.xaxis,l=e.yaxis;if(t[1]){var s=(e.level-i)/(e.z[n][a+1]-i),u=(s!==1?(1-s)*o.c2l(e.x[a]):0)+(s!==0?s*o.c2l(e.x[a+1]):0);return[o.c2p(o.l2c(u),!0),l.c2p(e.y[n],!0),a+s,n]}else{var f=(e.level-i)/(e.z[n+1][a]-i),c=(f!==1?(1-f)*l.c2l(e.y[n]):0)+(f!==0?f*l.c2l(e.y[n+1]):0);return[o.c2p(e.x[a],!0),l.c2p(l.l2c(c),!0),a,n+f]}}});var KW=N((rze,$W)=>{"use strict";var d6=Tg(),o4e=Pr();$W.exports={"[]":XW("[]"),"][":XW("]["),">":p6(">"),"<":p6("<"),"=":p6("=")};function JW(e,r){var t=Array.isArray(r),a;function n(i){return o4e(i)?+i:null}return d6.COMPARISON_OPS2.indexOf(e)!==-1?a=n(t?r[0]:r):d6.INTERVAL_OPS.indexOf(e)!==-1?a=t?[n(r[0]),n(r[1])]:[n(r),n(r)]:d6.SET_OPS.indexOf(e)!==-1&&(a=t?r.map(n):[n(r)]),a}function XW(e){return function(r){r=JW(e,r);var t=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return{start:t,end:a,size:a-t}}}function p6(e){return function(r){return r=JW(e,r),{start:r,end:1/0,size:1/0}}}});var rj=N((tze,ej)=>{"use strict";var QW=Ee(),l4e=KW(),s4e=D0();ej.exports=function(r,t,a){for(var n=r.type==="constraint"?l4e[r._operation](r.value):r,i=n.size,o=[],l=s4e(n),s=a.trace._carpetTrace,u=s?{xaxis:s.aaxis,yaxis:s.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},f=n.start;f1e3){QW.warn("Too many contours, clipping at 1000",r);break}return o}});var nj=N((aze,aj)=>{"use strict";var jc=Ee();aj.exports=function(e,r){var t,a,n,i=function(s){return s.reverse()},o=function(s){return s};switch(r){case"=":case"<":return e;case">":for(e.length!==1&&jc.warn("Contour data invalid for the specified inequality operation."),a=e[0],t=0;t{"use strict";ij.exports=function(e,r){var t=e[0],a=t.z,n;switch(r.type){case"levels":var i=Math.min(a[0][0],a[0][1]);for(n=0;no.level||o.starts.length&&i===o.level)}break;case"constraint":if(t.prefixBoundary=!1,t.edgepaths.length)return;var l=t.x.length,s=t.y.length,u=-1/0,f=1/0;for(n=0;n":c>u&&(t.prefixBoundary=!0);break;case"<":(cu||t.starts.length&&d===f)&&(t.prefixBoundary=!0);break;case"][":v=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),vu&&(t.prefixBoundary=!0);break}break}}});var y6=N(dn=>{"use strict";var F0=Sr(),Ra=Ee(),Al=jr(),u4e=So(),uj=Ea(),lj=Or(),sj=Zf(),f4e=dg(),fj=YW(),cj=ZW(),c4e=rj(),v4e=nj(),vj=oj(),R0=kg(),Go=R0.LABELOPTIMIZER;dn.plot=function(r,t,a,n){var i=t.xaxis,o=t.yaxis;Ra.makeTraceGroups(n,a,"contour").each(function(l){var s=F0.select(this),u=l[0],f=u.trace,c=u.x,v=u.y,d=f.contours,p=c4e(d,t,u),m=Ra.ensureSingle(s,"g","heatmapcoloring"),y=[];d.coloring==="heatmap"&&(y=[l]),f4e(r,t,y,m),fj(p),cj(p);var _=i.c2p(c[0],!0),b=i.c2p(c[c.length-1],!0),w=o.c2p(v[0],!0),x=o.c2p(v[v.length-1],!0),T=[[_,x],[b,x],[b,w],[_,w]],k=p;d.type==="constraint"&&(k=v4e(p,d._operation)),h4e(s,T,d),d4e(s,k,T,d),p4e(s,p,r,u,d),m4e(s,t,r,u,T)})};function h4e(e,r,t){var a=Ra.ensureSingle(e,"g","contourbg"),n=a.selectAll("path").data(t.coloring==="fill"?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+r.join("L")+"Z").style("stroke","none")}function d4e(e,r,t,a){var n=a.coloring==="fill"||a.type==="constraint"&&a._operation!=="=",i="M"+t.join("L")+"Z";n&&vj(r,a);var o=Ra.ensureSingle(e,"g","contourfill"),l=o.selectAll("path").data(n?r:[]);l.enter().append("path"),l.exit().remove(),l.each(function(s){var u=(s.prefixBoundary?i:"")+hj(s,t);u?F0.select(this).attr("d",u).style("stroke","none"):F0.select(this).remove()})}function hj(e,r){var t="",a=0,n=e.edgepaths.map(function(_,b){return b}),i=!0,o,l,s,u,f,c;function v(_){return Math.abs(_[1]-r[0][1])<.01}function d(_){return Math.abs(_[1]-r[2][1])<.01}function p(_){return Math.abs(_[0]-r[0][0])<.01}function m(_){return Math.abs(_[0]-r[2][0])<.01}for(;n.length;){for(c=Al.smoothopen(e.edgepaths[a],e.smoothing),t+=i?c:c.replace(/^M/,"L"),n.splice(n.indexOf(a),1),o=e.edgepaths[a][e.edgepaths[a].length-1],u=-1,s=0;s<4;s++){if(!o){Ra.log("Missing end?",a,e);break}for(v(o)&&!m(o)?l=r[1]:p(o)?l=r[0]:d(o)?l=r[3]:m(o)&&(l=r[2]),f=0;f=0&&(l=y,u=f):Math.abs(o[1]-l[1])<.01?Math.abs(o[1]-y[1])<.01&&(y[0]-o[0])*(l[0]-y[0])>=0&&(l=y,u=f):Ra.log("endpt to newendpt is not vert. or horz.",o,l,y)}if(o=l,u>=0)break;t+="L"+l}if(u===e.edgepaths.length){Ra.log("unclosed perimeter path");break}a=u,i=n.indexOf(a)===-1,i&&(a=n[0],t+="Z")}for(a=0;aGo.MAXCOST*2)break;v&&(l/=2),o=u-l/2,s=o+l*1.5}if(c<=Go.MAXCOST)return f};function y4e(e,r,t,a){var n=r.width/2,i=r.height/2,o=e.x,l=e.y,s=e.theta,u=Math.cos(s)*n,f=Math.sin(s)*n,c=(o>a.center?a.right-o:o-a.left)/(u+Math.abs(Math.sin(s)*i)),v=(l>a.middle?a.bottom-l:l-a.top)/(Math.abs(f)+Math.cos(s)*i);if(c<1||v<1)return 1/0;var d=Go.EDGECOST*(1/(c-1)+1/(v-1));d+=Go.ANGLECOST*s*s;for(var p=o-u,m=l-f,y=o+u,_=l+f,b=0;b{"use strict";var b4e=Sr(),m6=So(),x4e=D0();dj.exports=function(r){var t=r.contours,a=t.start,n=x4e(t),i=t.size||1,o=Math.floor((n-a)/i)+1,l=t.coloring==="lines"?0:1,s=m6.extractOpts(r);isFinite(i)||(i=1,o=1);var u=s.reversescale?m6.flipScale(s.colorscale):s.colorscale,f=u.length,c=new Array(f),v=new Array(f),d,p,m=s.min,y=s.max;if(t.coloring==="heatmap"){for(p=0;p=y)&&(a<=m&&(a=m),n>=y&&(n=y),o=Math.floor((n-a)/i)+1,l=0),p=0;pm&&(c.unshift(m),v.unshift(v[0])),c[c.length-1]{"use strict";var Lg=Sr(),pj=jr(),_4e=pg(),w4e=g6();yj.exports=function(r){var t=Lg.select(r).selectAll("g.contour");t.style("opacity",function(a){return a[0].trace.opacity}),t.each(function(a){var n=Lg.select(this),i=a[0].trace,o=i.contours,l=i.line,s=o.size||1,u=o.start,f=o.type==="constraint",c=!f&&o.coloring==="lines",v=!f&&o.coloring==="fill",d=c||v?w4e(i):null;n.selectAll("g.contourlevel").each(function(y){Lg.select(this).selectAll("path").call(pj.lineGroupStyle,l.width,c?d(y.level):l.color,l.dash)});var p=o.labelfont;if(n.selectAll("g.contourlabels text").each(function(y){pj.font(Lg.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(c?d(y.level):l.color)})}),f)n.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(v){var m;n.selectAll("g.contourfill path").style("fill",function(y){return m===void 0&&(m=y.level),d(y.level+.5*s)}),m===void 0&&(m=u),n.selectAll("g.contourbg path").style("fill",d(m-.5*s))}}),_4e(r)}});var x6=N((sze,gj)=>{"use strict";var mj=So(),T4e=g6(),A4e=D0();function M4e(e,r,t){var a=r.contours,n=r.line,i=a.size||1,o=a.coloring,l=T4e(r,{isColorbar:!0});if(o==="heatmap"){var s=mj.extractOpts(r);t._fillgradient=s.reversescale?mj.flipScale(s.colorscale):s.colorscale,t._zrange=[s.min,s.max]}else o==="fill"&&(t._fillcolor=l);t._line={color:o==="lines"?l:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},t._levels={start:a.start,end:A4e(a),size:i}}gj.exports={min:"zmin",max:"zmax",calc:M4e}});var _6=N((uze,bj)=>{"use strict";var Cg=Tr(),k4e=mg();bj.exports=function(r,t,a,n,i){i||(i={}),i.isContour=!0;var o=k4e(r,t,a,n,i);return o&&o.forEach(function(l){var s=l.trace;s.contours.type==="constraint"&&(s.fillcolor&&Cg.opacity(s.fillcolor)?l.color=Cg.addOpacity(s.fillcolor,1):s.contours.showlines&&Cg.opacity(s.line.color)&&(l.color=Cg.addOpacity(s.line.color,1)))}),o}});var _j=N((fze,xj)=>{"use strict";xj.exports={attributes:l6(),supplyDefaults:FW(),crossTraceDefaults:xg(),calc:h6(),plot:y6().plot,layerName:"contourlayer",style:b6(),colorbar:x6(),hoverPoints:_6(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:qi(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Tj=N((cze,wj)=>{"use strict";wj.exports=_j()});var Cj=N((vze,Lj)=>{"use strict";var Aj=Pr(),S4e=u6(),Sj=Tr(),Mj=Sj.addOpacity,q4e=Sj.opacity,qj=Tg(),kj=Ee().isArrayOrTypedArray,L4e=qj.CONSTRAINT_REDUCTION,C4e=qj.COMPARISON_OPS2;Lj.exports=function(r,t,a,n,i,o){var l=t.contours,s,u,f,c=a("contours.operation");if(l._operation=L4e[c],E4e(a,l),c==="="?s=l.showlines=!0:(s=a("contours.showlines"),f=a("fillcolor",Mj((r.line||{}).color||i,.5))),s){var v=f&&q4e(f)?Mj(t.fillcolor,1):i;u=a("line.color",v),a("line.width",2),a("line.dash")}a("line.smoothing"),S4e(a,n,u,o)};function E4e(e,r){var t;C4e.indexOf(r.operation)===-1?(e("contours.value",[0,1]),kj(r.value)?r.value.length>2?r.value=r.value.slice(2):r.length===0?r.value=[0,1]:r.length<2?(t=parseFloat(r.value[0]),r.value=[t,t+1]):r.value=[parseFloat(r.value[0]),parseFloat(r.value[1])]:Aj(r.value)&&(t=parseFloat(r.value),r.value=[t,t+1])):(e("contours.value",0),Aj(r.value)||(kj(r.value)?r.value=parseFloat(r.value[0]):r.value=0))}});var Pj=N((hze,Dj)=>{"use strict";var w6=Ee(),D4e=Iw(),P4e=dc(),R4e=Cj(),F4e=s6(),N4e=f6(),z4e=S0(),Ej=Mg();Dj.exports=function(r,t,a,n){function i(u,f){return w6.coerce(r,t,Ej,u,f)}function o(u){return w6.coerce2(r,t,Ej,u)}var l=D4e(r,t,i,n);if(!l){t.visible=!1;return}P4e(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate");var s=i("contours.type")==="constraint";i("connectgaps",w6.isArray1D(t.z)),s?R4e(r,t,i,n,a):(F4e(r,t,i,o),N4e(r,t,i,n)),t.contours&&t.contours.coloring==="heatmap"&&z4e(i,n),i("zorder")}});var Fj=N((dze,Rj)=>{"use strict";Rj.exports={attributes:Mg(),supplyDefaults:Pj(),calc:h6(),plot:y6().plot,style:b6(),colorbar:x6(),hoverPoints:_6(),moduleType:"trace",name:"contour",basePlotModule:qi(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var zj=N((pze,Nj)=>{"use strict";Nj.exports=Fj()});var T6=N((yze,Oj)=>{"use strict";var I4e=La().hovertemplateAttrs,O4e=La().texttemplateAttrs,B4e=Cy(),ai=wi(),H4e=mn(),Ij=ko(),U4e=si().dash,gs=bt().extendFlat,Ri=ai.marker,N0=ai.line,G4e=Ri.line;Oj.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:gs({},ai.mode,{dflt:"markers"}),text:gs({},ai.text,{}),texttemplate:O4e({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:gs({},ai.hovertext,{}),line:{color:N0.color,width:N0.width,dash:U4e,backoff:N0.backoff,shape:gs({},N0.shape,{values:["linear","spline"]}),smoothing:N0.smoothing,editType:"calc"},connectgaps:ai.connectgaps,cliponaxis:ai.cliponaxis,fill:gs({},ai.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:B4e(),marker:gs({symbol:Ri.symbol,opacity:Ri.opacity,angle:Ri.angle,angleref:Ri.angleref,standoff:Ri.standoff,maxdisplayed:Ri.maxdisplayed,size:Ri.size,sizeref:Ri.sizeref,sizemin:Ri.sizemin,sizemode:Ri.sizemode,line:gs({width:G4e.width,editType:"calc"},Ij("marker.line")),gradient:Ri.gradient,editType:"calc"},Ij("marker")),textfont:ai.textfont,textposition:ai.textposition,selected:ai.selected,unselected:ai.unselected,hoverinfo:gs({},H4e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:ai.hoveron,hovertemplate:I4e()}});var Gj=N((mze,Uj)=>{"use strict";var Bj=Ee(),Y4e=Hh(),Zc=Pn(),V4e=B_(),W4e=H_(),Hj=U_(),j4e=G_(),Z4e=Y_(),X4e=T6();Uj.exports=function(r,t,a,n){function i(v,d){return Bj.coerce(r,t,X4e,v,d)}var o=i("a"),l=i("b"),s=i("c"),u;if(o?(u=o.length,l?(u=Math.min(u,l.length),s&&(u=Math.min(u,s.length))):s?u=Math.min(u,s.length):u=0):l&&s&&(u=Math.min(l.length,s.length)),!u){t.visible=!1;return}t._length=u,i("sum"),i("text"),i("hovertext"),t.hoveron!=="fills"&&i("hovertemplate");var f=u{"use strict";var A6=Or();Yj.exports=function(r,t,a){var n={},i=a[t.subplot]._subplot;return n.aLabel=A6.tickText(i.aaxis,r.a,!0).text,n.bLabel=A6.tickText(i.baxis,r.b,!0).text,n.cLabel=A6.tickText(i.caxis,r.c,!0).text,n}});var Xj=N((bze,Zj)=>{"use strict";var M6=Pr(),J4e=j_(),$4e=im(),K4e=om(),Q4e=lm().calcMarkerSize,Wj=["a","b","c"],jj={a:["b","c"],b:["a","c"],c:["a","b"]};Zj.exports=function(r,t){var a=r._fullLayout[t.subplot],n=a.sum,i=t.sum||n,o={a:t.a,b:t.b,c:t.c},l=t.ids,s,u,f,c,v,d;for(s=0;s{"use strict";var ewe=i4();Jj.exports=function(r,t,a){var n=t.plotContainer;n.select(".scatterlayer").selectAll("*").remove();for(var i=t.xaxis,o=t.yaxis,l={xaxis:i,yaxis:o,plot:n,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},s=t.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var rwe=c4();Kj.exports=function(r,t,a,n){var i=rwe(r,t,a,n);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var l=1-o.y0/r.ya._length,s=r.xa._length,u=s*l/2,f=s-u;return o.x0=Math.max(Math.min(o.x0,f),u),o.x1=Math.max(Math.min(o.x1,f),u),i}var c=o.cd[o.index],v=o.trace,d=o.subplot;o.a=c.a,o.b=c.b,o.c=c.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[v.subplot]={_subplot:d};var m=v._module.formatLabels(c,v,p);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var y=c.hi||v.hoverinfo,_=[];function b(x,T){_.push(x._hovertitle+": "+T)}if(!v.hovertemplate){var w=y.split("+");w.indexOf("all")!==-1&&(w=["a","b","c"]),w.indexOf("a")!==-1&&b(d.aaxis,o.aLabel),w.indexOf("b")!==-1&&b(d.baxis,o.bLabel),w.indexOf("c")!==-1&&b(d.caxis,o.cLabel)}return o.extraText=_.join("
"),o.hovertemplate=v.hovertemplate,i}});var rZ=N((wze,eZ)=>{"use strict";eZ.exports=function(r,t,a,n,i){if(t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),n[i]){var o=n[i];r.a=o.a,r.b=o.b,r.c=o.c}else r.a=t.a,r.b=t.b,r.c=t.c;return r}});var vZ=N((Tze,cZ)=>{"use strict";var lZ=Sr(),twe=Sn(),k6=gr(),Ml=Ee(),Yo=Ml.strTranslate,Eg=Ml._,Jc=Tr(),Dg=jr(),z0=Zf(),S6=bt().extendFlat,awe=ea(),bs=Or(),tZ=pi(),aZ=Fn(),sZ=bu(),nZ=sZ.freeMode,nwe=sZ.rectMode,q6=jf(),iwe=zo().prepSelect,owe=zo().selectOnClick,lwe=zo().clearOutline,swe=zo().clearSelectionsCache,uZ=Ca();function fZ(e,r){this.id=e.id,this.graphDiv=e.graphDiv,this.init(r),this.makeFramework(r),this.updateFx(r),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}cZ.exports=fZ;var Vo=fZ.prototype;Vo.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Vo.plot=function(e,r){var t=this,a=r[t.id],n=r._size;t._hasClipOnAxisFalse=!1;for(var i=0;iXc*u?(_=u,y=_*Xc):(y=s,_=y/Xc),b=o*y/s,w=l*_/u,p=r.l+r.w*n-y/2,m=r.t+r.h*(1-i)-_/2,t.x0=p,t.y0=m,t.w=y,t.h=_,t.sum=f,t.xaxis={type:"linear",range:[c+2*d-f,f-c-2*v],domain:[n-b/2,n+b/2],_id:"x"},z0(t.xaxis,t.graphDiv._fullLayout),t.xaxis.setScale(),t.xaxis.isPtWithinRange=function(O){return O.a>=t.aaxis.range[0]&&O.a<=t.aaxis.range[1]&&O.b>=t.baxis.range[1]&&O.b<=t.baxis.range[0]&&O.c>=t.caxis.range[1]&&O.c<=t.caxis.range[0]},t.yaxis={type:"linear",range:[c,f-v-d],domain:[i-w/2,i+w/2],_id:"y"},z0(t.yaxis,t.graphDiv._fullLayout),t.yaxis.setScale(),t.yaxis.isPtWithinRange=function(){return!0};var x=t.yaxis.domain[0],T=t.aaxis=S6({},e.aaxis,{range:[c,f-v-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[x,x+w*Xc],anchor:"free",position:0,_id:"y",_length:y});z0(T,t.graphDiv._fullLayout),T.setScale();var k=t.baxis=S6({},e.baxis,{range:[f-c-d,v],side:"bottom",domain:t.xaxis.domain,anchor:"free",position:0,_id:"x",_length:y});z0(k,t.graphDiv._fullLayout),k.setScale();var M=t.caxis=S6({},e.caxis,{range:[f-c-v,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[x,x+w*Xc],anchor:"free",position:0,_id:"y",_length:y});z0(M,t.graphDiv._fullLayout),M.setScale();var S="M"+p+","+(m+_)+"h"+y+"l-"+y/2+",-"+_+"Z";t.clipDef.select("path").attr("d",S),t.layers.plotbg.select("path").attr("d",S);var E="M0,"+_+"h"+y+"l-"+y/2+",-"+_+"Z";t.clipDefRelative.select("path").attr("d",E);var P=Yo(p,m);t.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),t.clipDefRelative.select("path").attr("transform",null);var R=Yo(p-k._offset,m+_);t.layers.baxis.attr("transform",R),t.layers.bgrid.attr("transform",R);var D=Yo(p+y/2,m)+"rotate(30)"+Yo(0,-T._offset);t.layers.aaxis.attr("transform",D),t.layers.agrid.attr("transform",D);var z=Yo(p+y/2,m)+"rotate(-30)"+Yo(0,-M._offset);t.layers.caxis.attr("transform",z),t.layers.cgrid.attr("transform",z),t.drawAxes(!0),t.layers.aline.select("path").attr("d",T.showline?"M"+p+","+(m+_)+"l"+y/2+",-"+_:"M0,0").call(Jc.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),t.layers.bline.select("path").attr("d",k.showline?"M"+p+","+(m+_)+"h"+y:"M0,0").call(Jc.stroke,k.linecolor||"#000").style("stroke-width",(k.linewidth||0)+"px"),t.layers.cline.select("path").attr("d",M.showline?"M"+(p+y/2)+","+m+"l"+y/2+","+_:"M0,0").call(Jc.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),t.graphDiv._context.staticPlot||t.initInteractions(),Dg.setClipUrl(t.layers.frontplot,t._hasClipOnAxisFalse?null:t.clipId,t.graphDiv)};Vo.drawAxes=function(e){var r=this,t=r.graphDiv,a=r.id.substr(7)+"title",n=r.layers,i=r.aaxis,o=r.baxis,l=r.caxis;if(r.drawAx(i),r.drawAx(o),r.drawAx(l),e){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(l.showticklabels?l.tickfont.size*.75:0)+(l.ticks==="outside"?l.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;n["a-title"]=q6.draw(t,"a"+a,{propContainer:i,propName:r.id+".aaxis.title",placeholder:Eg(t,"Click to enter Component A title"),attributes:{x:r.x0+r.w/2,y:r.y0-i.title.font.size/3-s,"text-anchor":"middle"}}),n["b-title"]=q6.draw(t,"b"+a,{propContainer:o,propName:r.id+".baxis.title",placeholder:Eg(t,"Click to enter Component B title"),attributes:{x:r.x0-u,y:r.y0+r.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),n["c-title"]=q6.draw(t,"c"+a,{propContainer:l,propName:r.id+".caxis.title",placeholder:Eg(t,"Click to enter Component C title"),attributes:{x:r.x0+r.w+u,y:r.y0+r.h+l.title.font.size*.83+u,"text-anchor":"middle"}})}};Vo.drawAx=function(e){var r=this,t=r.graphDiv,a=e._name,n=a.charAt(0),i=e._id,o=r.layers[a],l=30,s=n+"tickLayout",u=uwe(e);r[s]!==u&&(o.selectAll("."+i+"tick").remove(),r[s]=u),e.setScale();var f=bs.calcTicks(e),c=bs.clipEnds(e,f),v=bs.makeTransTickFn(e),d=bs.getTickSigns(e)[2],p=Ml.deg2rad(l),m=d*(e.linewidth||1)/2,y=d*e.ticklen,_=r.w,b=r.h,w=n==="b"?"M0,"+m+"l"+Math.sin(p)*y+","+Math.cos(p)*y:"M"+m+",0l"+Math.cos(p)*y+","+-Math.sin(p)*y,x={a:"M0,0l"+b+",-"+_/2,b:"M0,0l-"+_/2+",-"+b,c:"M0,0l-"+b+","+_/2}[n];bs.drawTicks(t,e,{vals:e.ticks==="inside"?c:f,layer:o,path:w,transFn:v,crisp:!1}),bs.drawGrid(t,e,{vals:c,layer:r.layers[n+"grid"],path:x,transFn:v,crisp:!1}),bs.drawLabels(t,e,{vals:f,layer:o,transFn:v,labelFns:bs.makeLabelFns(e,0,l)})};function uwe(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Sa=uZ.MINZOOM/2+.87,fwe="m-0.87,.5h"+Sa+"v3h-"+(Sa+5.2)+"l"+(Sa/2+2.6)+",-"+(Sa*.87+4.5)+"l2.6,1.5l-"+Sa/2+","+Sa*.87+"Z",cwe="m0.87,.5h-"+Sa+"v3h"+(Sa+5.2)+"l-"+(Sa/2+2.6)+",-"+(Sa*.87+4.5)+"l-2.6,1.5l"+Sa/2+","+Sa*.87+"Z",vwe="m0,1l"+Sa/2+","+Sa*.87+"l2.6,-1.5l-"+(Sa/2+2.6)+",-"+(Sa*.87+4.5)+"l-"+(Sa/2+2.6)+","+(Sa*.87+4.5)+"l2.6,1.5l"+Sa/2+",-"+Sa*.87+"Z",hwe="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",iZ=!0;Vo.clearOutline=function(){swe(this.dragOptions),lwe(this.dragOptions.gd)};Vo.initInteractions=function(){var e=this,r=e.layers.plotbg.select("path").node(),t=e.graphDiv,a=t._fullLayout._zoomlayer,n,i;this.dragOptions={element:r,gd:t,plotinfo:{id:e.id,domain:t._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(R,D,z){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],n=t._fullLayout._invScaleX,i=t._fullLayout._invScaleY;var O=e.dragOptions.dragmode=t._fullLayout.dragmode;nZ(O)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,O==="zoom"?(e.dragOptions.moveFn=k,e.dragOptions.clickFn=_,e.dragOptions.doneFn=M,b(R,D,z)):O==="pan"?(e.dragOptions.moveFn=E,e.dragOptions.clickFn=_,e.dragOptions.doneFn=P,S(),e.clearOutline(t)):(nwe(O)||nZ(O))&&iwe(R,D,z,e.dragOptions,O)}};var o,l,s,u,f,c,v,d,p,m;function y(R){var D={};return D[e.id+".aaxis.min"]=R.a,D[e.id+".baxis.min"]=R.b,D[e.id+".caxis.min"]=R.c,D}function _(R,D){var z=t._fullLayout.clickmode;oZ(t),R===2&&(t.emit("plotly_doubleclick",null),k6.call("_guiRelayout",t,y({a:0,b:0,c:0}))),z.indexOf("select")>-1&&R===1&&owe(D,t,[e.xaxis],[e.yaxis],e.id,e.dragOptions),z.indexOf("event")>-1&&aZ.click(t,D,e.id)}function b(R,D,z){var O=r.getBoundingClientRect();o=D-O.left,l=z-O.top,t._fullLayout._calcInverseTransform(t);var H=t._fullLayout._invTransform,V=Ml.apply3DTransform(H)(o,l);o=V[0],l=V[1],s={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=s,u=e.aaxis.range[1]-s.a,c=twe(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),v="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=a.append("path").attr("class","zoombox").attr("transform",Yo(e.x0,e.y0)).style({fill:c>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),m=a.append("path").attr("class","zoombox-corners").attr("transform",Yo(e.x0,e.y0)).style({fill:Jc.background,stroke:Jc.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(t)}function w(R,D){return 1-D/e.h}function x(R,D){return 1-(R+(e.h-D)/Math.sqrt(3))/e.w}function T(R,D){return(R-(e.h-D)/Math.sqrt(3))/e.w}function k(R,D){var z=o+R*n,O=l+D*i,H=Math.max(0,Math.min(1,w(o,l),w(z,O))),V=Math.max(0,Math.min(1,x(o,l),x(z,O))),G=Math.max(0,Math.min(1,T(o,l),T(z,O))),B=(H/2+G)*e.w,Y=(1-H/2-V)*e.w,X=(B+Y)/2,Z=Y-B,te=(1-H)*e.h,fe=te-Z/Xc;Z.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),m.transition().style("opacity",1).duration(200),d=!0),t.emit("plotly_relayouting",y(f))}function M(){oZ(t),f!==s&&(k6.call("_guiRelayout",t,y(f)),iZ&&t.data&&t._context.showTips&&(Ml.notifier(Eg(t,"Double-click to zoom back out"),"long"),iZ=!1))}function S(){s={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=s}function E(R,D){var z=R/e.xaxis._m,O=D/e.yaxis._m;f={a:s.a-O,b:s.b+(z+O)/2,c:s.c-(z-O)/2};var H=[f.a,f.b,f.c].sort(Ml.sorterAsc),V={a:H.indexOf(f.a),b:H.indexOf(f.b),c:H.indexOf(f.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),f={a:H[V.a],b:H[V.b],c:H[V.c]},D=(s.a-f.a)*e.yaxis._m,R=(s.c-f.c-s.b+f.b)*e.xaxis._m);var G=Yo(e.x0+R,e.y0+D);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var B=Yo(-R,-D);e.clipDefRelative.select("path").attr("transform",B),e.aaxis.range=[f.a,e.sum-f.b-f.c],e.baxis.range=[e.sum-f.a-f.c,f.b],e.caxis.range=[e.sum-f.a-f.b,f.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(Dg.hideOutsideRangePoints,e),t.emit("plotly_relayouting",y(f))}function P(){k6.call("_guiRelayout",t,y(f))}r.onmousemove=function(R){aZ.hover(t,R,e.id),t._fullLayout._lasthover=r,t._fullLayout._hoversubplot=e.id},r.onmouseout=function(R){t._dragging||tZ.unhover(t,R)},tZ.init(this.dragOptions)};function oZ(e){lZ.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var E6=N((Aze,hZ)=>{"use strict";var dwe=li(),pwe=Pc().attributes,nt=hi(),ywe=Xi().overrideAll,L6=bt().extendFlat,C6={title:{text:nt.title.text,font:nt.title.font},color:nt.color,tickmode:nt.minor.tickmode,nticks:L6({},nt.nticks,{dflt:6,min:1}),tick0:nt.tick0,dtick:nt.dtick,tickvals:nt.tickvals,ticktext:nt.ticktext,ticks:nt.ticks,ticklen:nt.ticklen,tickwidth:nt.tickwidth,tickcolor:nt.tickcolor,ticklabelstep:nt.ticklabelstep,showticklabels:nt.showticklabels,labelalias:nt.labelalias,showtickprefix:nt.showtickprefix,tickprefix:nt.tickprefix,showticksuffix:nt.showticksuffix,ticksuffix:nt.ticksuffix,showexponent:nt.showexponent,exponentformat:nt.exponentformat,minexponent:nt.minexponent,separatethousands:nt.separatethousands,tickfont:nt.tickfont,tickangle:nt.tickangle,tickformat:nt.tickformat,tickformatstops:nt.tickformatstops,hoverformat:nt.hoverformat,showline:L6({},nt.showline,{dflt:!0}),linecolor:nt.linecolor,linewidth:nt.linewidth,showgrid:L6({},nt.showgrid,{dflt:!0}),gridcolor:nt.gridcolor,gridwidth:nt.gridwidth,griddash:nt.griddash,layer:nt.layer,min:{valType:"number",dflt:0,min:0}},Pg=hZ.exports=ywe({domain:pwe({name:"ternary"}),bgcolor:{valType:"color",dflt:dwe.background},sum:{valType:"number",dflt:1,min:0},aaxis:C6,baxis:C6,caxis:C6},"plot","from-root");Pg.uirevision={valType:"any",editType:"none"};Pg.aaxis.uirevision=Pg.baxis.uirevision=Pg.caxis.uirevision={valType:"any",editType:"none"}});var pZ=N((Mze,dZ)=>{"use strict";var mwe=Ee(),gwe=_t(),bwe=Pc().defaults;dZ.exports=function(r,t,a,n){var i=n.type,o=n.attributes,l=n.handleDefaults,s=n.partition||"x",u=t._subplots[i],f=u.length,c=f&&u[0].replace(/\d+$/,""),v,d;function p(b,w){return mwe.coerce(v,d,o,b,w)}for(var m=0;m{"use strict";var xwe=Tr(),_we=_t(),Rg=Ee(),wwe=pZ(),Twe=n1(),Awe=i1(),Mwe=t1(),kwe=r1(),Swe=d4(),mZ=E6(),yZ=["aaxis","baxis","caxis"];gZ.exports=function(r,t,a){wwe(r,t,a,{type:"ternary",attributes:mZ,handleDefaults:qwe,font:t.font,paper_bgcolor:t.paper_bgcolor})};function qwe(e,r,t,a){var n=t("bgcolor"),i=t("sum");a.bgColor=xwe.combine(n,a.paper_bgcolor);for(var o,l,s,u=0;u=i&&(f.min=0,c.min=0,v.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function Lwe(e,r,t,a){var n=mZ[r._name];function i(d,p){return Rg.coerce(e,r,n,d,p)}i("uirevision",a.uirevision),r.type="linear";var o=i("color"),l=o!==n.color.dflt?o:t.font.color,s=r._name,u=s.charAt(0).toUpperCase(),f="Component "+u,c=i("title.text",f);r._hovertitle=c===f?c:u,Rg.coerceFont(i,"title.font",t.font,{overrideDflt:{size:Rg.bigFont(t.font.size),color:l}}),i("min"),kwe(e,r,i,"linear"),Awe(e,r,i,"linear"),Twe(e,r,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),Mwe(e,r,i,{outerTicks:!0});var v=i("showticklabels");v&&(Rg.coerceFont(i,"tickfont",t.font,{overrideDflt:{color:l}}),i("tickangle"),i("tickformat")),Swe(e,r,i,{dfltColor:o,bgColor:t.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),i("hoverformat"),i("layer")}});var xZ=N(Fi=>{"use strict";var Cwe=vZ(),Ewe=jp().getSubplotCalcData,Dwe=Ee().counterRegex,$c="ternary";Fi.name=$c;var Pwe=Fi.attr="subplot";Fi.idRoot=$c;Fi.idRegex=Fi.attrRegex=Dwe($c);var Rwe=Fi.attributes={};Rwe[Pwe]={valType:"subplotid",dflt:"ternary",editType:"calc"};Fi.layoutAttributes=E6();Fi.supplyLayoutDefaults=bZ();Fi.plot=function(r){for(var t=r._fullLayout,a=r.calcdata,n=t._subplots[$c],i=0;i{"use strict";_Z.exports={attributes:T6(),supplyDefaults:Gj(),colorbar:i0(),formatLabels:Vj(),calc:Xj(),plot:$j(),style:ku().style,styleOnSelect:ku().styleOnSelect,hoverPoints:Qj(),selectPoints:v4(),eventData:rZ(),moduleType:"trace",name:"scatterternary",basePlotModule:xZ(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var AZ=N((Lze,TZ)=>{"use strict";TZ.exports=wZ()});var D6=N((Cze,kZ)=>{"use strict";var ya=tg(),Kc=bt().extendFlat,MZ=Qi().axisHoverFormat;kZ.exports={y:ya.y,x:ya.x,x0:ya.x0,y0:ya.y0,xhoverformat:MZ("x"),yhoverformat:MZ("y"),name:Kc({},ya.name,{}),orientation:Kc({},ya.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:ya.fillcolor,points:Kc({},ya.boxpoints,{}),jitter:Kc({},ya.jitter,{}),pointpos:Kc({},ya.pointpos,{}),width:Kc({},ya.width,{}),marker:ya.marker,text:ya.text,hovertext:ya.hovertext,hovertemplate:ya.hovertemplate,quartilemethod:ya.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:ya.offsetgroup,alignmentgroup:ya.alignmentgroup,selected:ya.selected,unselected:ya.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:ya.zorder}});var F6=N((Eze,SZ)=>{"use strict";var P6=ag(),R6=Ee().extendFlat;SZ.exports={violinmode:R6({},P6.boxmode,{}),violingap:R6({},P6.boxgap,{}),violingroupgap:R6({},P6.boxgroupgap,{})}});var DZ=N((Dze,EZ)=>{"use strict";var qZ=Ee(),Fwe=Tr(),LZ=M0(),CZ=D6();EZ.exports=function(r,t,a,n){function i(T,k){return qZ.coerce(r,t,CZ,T,k)}function o(T,k){return qZ.coerce2(r,t,CZ,T,k)}if(LZ.handleSampleDefaults(r,t,i,n),t.visible!==!1){i("bandwidth"),i("side");var l=i("width");l||(i("scalegroup",t.name),i("scalemode"));var s=i("span"),u;Array.isArray(s)&&(u="manual"),i("spanmode",u);var f=i("line.color",(r.marker||{}).color||a),c=i("line.width"),v=i("fillcolor",Fwe.addOpacity(t.line.color,.5));LZ.handlePointsDefaults(r,t,i,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",v),m=o("box.line.color",f),y=o("box.line.width",c),_=i("box.visible",!!(d||p||m||y));_||(t.box={visible:!1});var b=o("meanline.color",f),w=o("meanline.width",c),x=i("meanline.visible",!!(b||w));x||(t.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var RZ=N((Pze,PZ)=>{"use strict";var Nwe=Ee(),zwe=F6(),Iwe=Aw();PZ.exports=function(r,t,a){function n(i,o){return Nwe.coerce(r,t,zwe,i,o)}Iwe._supply(r,t,a,n,"violin")}});var Fg=N(Uu=>{"use strict";var Owe=Ee(),Bwe={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};Uu.makeKDE=function(e,r,t){var a=t.length,n=Bwe.gaussian,i=e.bandwidth,o=1/(a*i);return function(l){for(var s=0,u=0;u{"use strict";var N6=Ee(),z6=Or(),Hwe=Sw(),FZ=Fg(),Uwe=Ft().BADNUM;NZ.exports=function(r,t){var a=Hwe(r,t);if(a[0].t.empty)return a;for(var n=r._fullLayout,i=z6.getFromId(r,t[t.orientation==="h"?"xaxis":"yaxis"]),o=1/0,l=-1/0,s=0,u=0,f=0;f{"use strict";var Wwe=qw().setPositionOffset,IZ=["v","h"];OZ.exports=function(r,t){for(var a=r.calcdata,n=t.xaxis,i=t.yaxis,o=0;o{"use strict";var I6=Sr(),O6=Ee(),jwe=jr(),B6=Lw(),Zwe=n4(),Xwe=Fg();HZ.exports=function(r,t,a,n){var i=r._context.staticPlot,o=r._fullLayout,l=t.xaxis,s=t.yaxis;function u(f,c){var v=Zwe(f,{xaxis:l,yaxis:s,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return jwe.smoothopen(v[0],1)}O6.makeTraceGroups(n,a,"trace violins").each(function(f){var c=I6.select(this),v=f[0],d=v.t,p=v.trace;if(p.visible!==!0||d.empty){c.remove();return}var m=d.bPos,y=d.bdPos,_=t[d.valLetter+"axis"],b=t[d.posLetter+"axis"],w=p.side==="both",x=w||p.side==="positive",T=w||p.side==="negative",k=c.selectAll("path.violin").data(O6.identity);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),k.exit().remove(),k.each(function(O){var H=I6.select(this),V=O.density,G=V.length,B=b.c2l(O.pos+m,!0),Y=b.l2p(B),X;if(p.width)X=d.maxKDE/y;else{var Z=o._violinScaleGroupStats[p.scalegroup];X=p.scalemode==="count"?Z.maxKDE/y*(Z.maxCount/O.pts.length):Z.maxKDE/y}var te,fe,le,ie,K,he,oe;if(x){for(he=new Array(G),ie=0;ie{"use strict";var GZ=Sr(),Qc=Tr(),Jwe=ku().stylePoints;YZ.exports=function(r){var t=GZ.select(r).selectAll("g.trace.violins");t.style("opacity",function(a){return a[0].trace.opacity}),t.each(function(a){var n=a[0].trace,i=GZ.select(this),o=n.box||{},l=o.line||{},s=n.meanline||{},u=s.width;i.selectAll("path.violin").style("stroke-width",n.line.width+"px").call(Qc.stroke,n.line.color).call(Qc.fill,n.fillcolor),i.selectAll("path.box").style("stroke-width",l.width+"px").call(Qc.stroke,l.color).call(Qc.fill,o.fillcolor);var f={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(f).call(Qc.stroke,s.color),i.selectAll("path.meanline").style(f).call(Qc.stroke,s.color),Jwe(i,n,r)})}});var XZ=N((Oze,ZZ)=>{"use strict";var $we=Tr(),H6=Ee(),Kwe=Or(),WZ=Fw(),jZ=Fg();ZZ.exports=function(r,t,a,n,i){i||(i={});var o=i.hoverLayer,l=r.cd,s=l[0].trace,u=s.hoveron,f=u.indexOf("violins")!==-1,c=u.indexOf("kde")!==-1,v=[],d,p;if(f||c){var m=WZ.hoverOnBoxes(r,t,a,n);if(c&&m.length>0){var y=r.xa,_=r.ya,b,w,x,T,k;s.orientation==="h"?(k=t,b="y",x=_,w="x",T=y):(k=a,b="x",x=y,w="y",T=_);var M=l[r.index];if(k>=M.span[0]&&k<=M.span[1]){var S=H6.extendFlat({},r),E=T.c2p(k,!0),P=jZ.getKdeValue(M,s,k),R=jZ.getPositionOnKdePath(M,s,E),D=x._offset,z=x._length;S[b+"0"]=R[0],S[b+"1"]=R[1],S[w+"0"]=S[w+"1"]=E,S[w+"Label"]=w+": "+Kwe.hoverLabelText(T,k,s[w+"hoverformat"])+", "+l[0].t.labels.kde+" "+P.toFixed(3);for(var O=0,H=0;H{"use strict";JZ.exports={attributes:D6(),layoutAttributes:F6(),supplyDefaults:DZ(),crossTraceDefaults:M0().crossTraceDefaults,supplyLayoutDefaults:RZ(),calc:zZ(),crossTraceCalc:BZ(),plot:UZ(),style:VZ(),styleOnSelect:ku().styleOnSelect,hoverPoints:XZ(),selectPoints:Nw(),moduleType:"trace",name:"violin",basePlotModule:qi(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var QZ=N((Hze,KZ)=>{"use strict";KZ.exports=$Z()});var ev=N((Uze,eX)=>{"use strict";eX.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 r=e.slice(0,3);return r[1]=r[1]+"%",r[2]=r[2]+"%",r},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var r=e.slice(0,4);return r[1]=r[1]+"%",r[2]=r[2]+"%",r},suffix:["\xB0","%","%",""]}}}});var U6=N((Gze,tX)=>{"use strict";var Qwe=mn(),e6e=wi().zorder,r6e=La().hovertemplateAttrs,rX=bt().extendFlat,t6e=ev().colormodel,O0=["rgb","rgba","rgba256","hsl","hsla"],a6e=[],n6e=[];for(rv=0;rv{"use strict";var i6e=Ee(),o6e=U6(),aX=ev(),l6e=yl().IMAGE_URL_PREFIX;nX.exports=function(r,t){function a(o,l){return i6e.coerce(r,t,o6e,o,l)}a("source"),t.source&&!t.source.match(l6e)&&delete t.source,t._hasSource=!!t.source;var n=a("z");if(t._hasZ=!(n===void 0||!n.length||!n[0]||!n[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}a("x0"),a("y0"),a("dx"),a("dy");var i;t._hasZ?(a("colormodel","rgb"),i=aX.colormodel[t.colormodel],a("zmin",i.zminDflt||i.min),a("zmax",i.zmaxDflt||i.max)):t._hasSource&&(t.colormodel="rgba256",i=aX.colormodel[t.colormodel],t.zmin=i.zminDflt,t.zmax=i.zmaxDflt),a("zsmooth"),a("text"),a("hovertext"),a("hovertemplate"),t._length=null,a("zorder")}});var kl=N((Vze,G6)=>{typeof Object.create=="function"?G6.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:G6.exports=function(r,t){if(t){r.super_=t;var a=function(){};a.prototype=t.prototype,r.prototype=new a,r.prototype.constructor=r}}});var Y6=N((Wze,oX)=>{oX.exports=Qs().EventEmitter});var uX=N(Ng=>{"use strict";Ng.byteLength=u6e;Ng.toByteArray=c6e;Ng.fromByteArray=d6e;var Wo=[],Ni=[],s6e=typeof Uint8Array!="undefined"?Uint8Array:Array,V6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Gu=0,lX=V6.length;Gu0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var a=t===r?0:4-t%4;return[t,a]}function u6e(e){var r=sX(e),t=r[0],a=r[1];return(t+a)*3/4-a}function f6e(e,r,t){return(r+t)*3/4-t}function c6e(e){var r,t=sX(e),a=t[0],n=t[1],i=new s6e(f6e(e,a,n)),o=0,l=n>0?a-4:a,s;for(s=0;s>16&255,i[o++]=r>>8&255,i[o++]=r&255;return n===2&&(r=Ni[e.charCodeAt(s)]<<2|Ni[e.charCodeAt(s+1)]>>4,i[o++]=r&255),n===1&&(r=Ni[e.charCodeAt(s)]<<10|Ni[e.charCodeAt(s+1)]<<4|Ni[e.charCodeAt(s+2)]>>2,i[o++]=r>>8&255,i[o++]=r&255),i}function v6e(e){return Wo[e>>18&63]+Wo[e>>12&63]+Wo[e>>6&63]+Wo[e&63]}function h6e(e,r,t){for(var a,n=[],i=r;il?l:o+i));return a===1?(r=e[t-1],n.push(Wo[r>>2]+Wo[r<<4&63]+"==")):a===2&&(r=(e[t-2]<<8)+e[t-1],n.push(Wo[r>>10]+Wo[r>>4&63]+Wo[r<<2&63]+"=")),n.join("")}});var fX=N(W6=>{W6.read=function(e,r,t,a,n){var i,o,l=n*8-a-1,s=(1<>1,f=-7,c=t?n-1:0,v=t?-1:1,d=e[r+c];for(c+=v,i=d&(1<<-f)-1,d>>=-f,f+=l;f>0;i=i*256+e[r+c],c+=v,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=a;f>0;o=o*256+e[r+c],c+=v,f-=8);if(i===0)i=1-u;else{if(i===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,a),i=i-u}return(d?-1:1)*o*Math.pow(2,i-a)};W6.write=function(e,r,t,a,n,i){var o,l,s,u=i*8-n-1,f=(1<>1,v=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=a?0:i-1,p=a?1:-1,m=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,o=f):(o=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+c>=1?r+=v/s:r+=v*Math.pow(2,1-c),r*s>=2&&(o++,s/=2),o+c>=f?(l=0,o=f):o+c>=1?(l=(r*s-1)*Math.pow(2,n),o=o+c):(l=r*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[t+d]=l&255,d+=p,l/=256,n-=8);for(o=o<0;e[t+d]=o&255,d+=p,o/=256,u-=8);e[t+d-p]|=m*128}});var ov=N(iv=>{"use strict";var j6=uX(),av=fX(),cX=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;iv.Buffer=je;iv.SlowBuffer=x6e;iv.INSPECT_MAX_BYTES=50;var zg=2147483647;iv.kMaxLength=zg;je.TYPED_ARRAY_SUPPORT=p6e();!je.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 p6e(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(e){return!1}}Object.defineProperty(je.prototype,"parent",{enumerable:!0,get:function(){if(je.isBuffer(this))return this.buffer}});Object.defineProperty(je.prototype,"offset",{enumerable:!0,get:function(){if(je.isBuffer(this))return this.byteOffset}});function Sl(e){if(e>zg)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,je.prototype),r}function je(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return $6(e)}return pX(e,r,t)}je.poolSize=8192;function pX(e,r,t){if(typeof e=="string")return m6e(e,r);if(ArrayBuffer.isView(e))return g6e(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(jo(e,ArrayBuffer)||e&&jo(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(jo(e,SharedArrayBuffer)||e&&jo(e.buffer,SharedArrayBuffer)))return X6(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return je.from(a,r,t);let n=b6e(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return je.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}je.from=function(e,r,t){return pX(e,r,t)};Object.setPrototypeOf(je.prototype,Uint8Array.prototype);Object.setPrototypeOf(je,Uint8Array);function yX(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 y6e(e,r,t){return yX(e),e<=0?Sl(e):r!==void 0?typeof t=="string"?Sl(e).fill(r,t):Sl(e).fill(r):Sl(e)}je.alloc=function(e,r,t){return y6e(e,r,t)};function $6(e){return yX(e),Sl(e<0?0:K6(e)|0)}je.allocUnsafe=function(e){return $6(e)};je.allocUnsafeSlow=function(e){return $6(e)};function m6e(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!je.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=mX(e,r)|0,a=Sl(t),n=a.write(e,r);return n!==t&&(a=a.slice(0,n)),a}function Z6(e){let r=e.length<0?0:K6(e.length)|0,t=Sl(r);for(let a=0;a=zg)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zg.toString(16)+" bytes");return e|0}function x6e(e){return+e!=e&&(e=0),je.alloc(+e)}je.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==je.prototype};je.compare=function(r,t){if(jo(r,Uint8Array)&&(r=je.from(r,r.offset,r.byteLength)),jo(t,Uint8Array)&&(t=je.from(t,t.offset,t.byteLength)),!je.isBuffer(r)||!je.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let a=r.length,n=t.length;for(let i=0,o=Math.min(a,n);in.length?(je.isBuffer(o)||(o=je.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(je.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function mX(e,r){if(je.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||jo(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 t=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return J6(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return kX(e).length;default:if(n)return a?-1:J6(e).length;r=(""+r).toLowerCase(),n=!0}}je.byteLength=mX;function _6e(e,r,t){let a=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return E6e(this,r,t);case"utf8":case"utf-8":return bX(this,r,t);case"ascii":return L6e(this,r,t);case"latin1":case"binary":return C6e(this,r,t);case"base64":return S6e(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D6e(this,r,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}je.prototype._isBuffer=!0;function Yu(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}je.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(r+=" ... "),""};cX&&(je.prototype[cX]=je.prototype.inspect);je.prototype.compare=function(r,t,a,n,i){if(jo(r,Uint8Array)&&(r=je.from(r,r.offset,r.byteLength)),!je.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),a===void 0&&(a=r?r.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||a>r.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=a)return 0;if(n>=i)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,n>>>=0,i>>>=0,this===r)return 0;let o=i-n,l=a-t,s=Math.min(o,l),u=this.slice(n,i),f=r.slice(t,a);for(let c=0;c2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,e7(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=je.from(r,a)),je.isBuffer(r))return r.length===0?-1:vX(e,r,t,a,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):vX(e,[r],t,a,n);throw new TypeError("val must be string, number or Buffer")}function vX(e,r,t,a,n){let i=1,o=e.length,l=r.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||r.length<2)return-1;i=2,o/=2,l/=2,t/=2}function s(f,c){return i===1?f[c]:f.readUInt16BE(c*i)}let u;if(n){let f=-1;for(u=t;uo&&(t=o-l),u=t;u>=0;u--){let f=!0;for(let c=0;cn&&(a=n)):a=n;let i=r.length;a>i/2&&(a=i/2);let o;for(o=0;o>>0,isFinite(a)?(a=a>>>0,n===void 0&&(n="utf8")):(n=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((a===void 0||a>i)&&(a=i),r.length>0&&(a<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w6e(this,r,t,a);case"utf8":case"utf-8":return T6e(this,r,t,a);case"ascii":case"latin1":case"binary":return A6e(this,r,t,a);case"base64":return M6e(this,r,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k6e(this,r,t,a);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};je.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S6e(e,r,t){return r===0&&t===e.length?j6.fromByteArray(e):j6.fromByteArray(e.slice(r,t))}function bX(e,r,t){t=Math.min(e.length,t);let a=[],n=r;for(;n239?4:i>223?3:i>191?2:1;if(n+l<=t){let s,u,f,c;switch(l){case 1:i<128&&(o=i);break;case 2:s=e[n+1],(s&192)===128&&(c=(i&31)<<6|s&63,c>127&&(o=c));break;case 3:s=e[n+1],u=e[n+2],(s&192)===128&&(u&192)===128&&(c=(i&15)<<12|(s&63)<<6|u&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:s=e[n+1],u=e[n+2],f=e[n+3],(s&192)===128&&(u&192)===128&&(f&192)===128&&(c=(i&15)<<18|(s&63)<<12|(u&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,a.push(o>>>10&1023|55296),o=56320|o&1023),a.push(o),n+=l}return q6e(a)}var hX=4096;function q6e(e){let r=e.length;if(r<=hX)return String.fromCharCode.apply(String,e);let t="",a=0;for(;aa)&&(t=a);let n="";for(let i=r;ia&&(r=a),t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),tt)throw new RangeError("Trying to access beyond buffer length")}je.prototype.readUintLE=je.prototype.readUIntLE=function(r,t,a){r=r>>>0,t=t>>>0,a||Ya(r,t,this.length);let n=this[r],i=1,o=0;for(;++o>>0,t=t>>>0,a||Ya(r,t,this.length);let n=this[r+--t],i=1;for(;t>0&&(i*=256);)n+=this[r+--t]*i;return n};je.prototype.readUint8=je.prototype.readUInt8=function(r,t){return r=r>>>0,t||Ya(r,1,this.length),this[r]};je.prototype.readUint16LE=je.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||Ya(r,2,this.length),this[r]|this[r+1]<<8};je.prototype.readUint16BE=je.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||Ya(r,2,this.length),this[r]<<8|this[r+1]};je.prototype.readUint32LE=je.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};je.prototype.readUint32BE=je.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};je.prototype.readBigUInt64LE=xs(function(r){r=r>>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,i=this[++r]+this[++r]*2**8+this[++r]*2**16+a*2**24;return BigInt(n)+(BigInt(i)<>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],i=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+a;return(BigInt(n)<>>0,t=t>>>0,a||Ya(r,t,this.length);let n=this[r],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};je.prototype.readIntBE=function(r,t,a){r=r>>>0,t=t>>>0,a||Ya(r,t,this.length);let n=t,i=1,o=this[r+--n];for(;n>0&&(i*=256);)o+=this[r+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};je.prototype.readInt8=function(r,t){return r=r>>>0,t||Ya(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};je.prototype.readInt16LE=function(r,t){r=r>>>0,t||Ya(r,2,this.length);let a=this[r]|this[r+1]<<8;return a&32768?a|4294901760:a};je.prototype.readInt16BE=function(r,t){r=r>>>0,t||Ya(r,2,this.length);let a=this[r+1]|this[r]<<8;return a&32768?a|4294901760:a};je.prototype.readInt32LE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};je.prototype.readInt32BE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};je.prototype.readBigInt64LE=xs(function(r){r=r>>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(a<<24);return(BigInt(n)<>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<>>0,t||Ya(r,4,this.length),av.read(this,r,!0,23,4)};je.prototype.readFloatBE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),av.read(this,r,!1,23,4)};je.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||Ya(r,8,this.length),av.read(this,r,!0,52,8)};je.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||Ya(r,8,this.length),av.read(this,r,!1,52,8)};function Gn(e,r,t,a,n,i){if(!je.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||re.length)throw new RangeError("Index out of range")}je.prototype.writeUintLE=je.prototype.writeUIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;Gn(this,r,t,a,l,0)}let i=1,o=0;for(this[t]=r&255;++o>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;Gn(this,r,t,a,l,0)}let i=a-1,o=1;for(this[t+i]=r&255;--i>=0&&(o*=256);)this[t+i]=r/o&255;return t+a};je.prototype.writeUint8=je.prototype.writeUInt8=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,1,255,0),this[t]=r&255,t+1};je.prototype.writeUint16LE=je.prototype.writeUInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};je.prototype.writeUint16BE=je.prototype.writeUInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};je.prototype.writeUint32LE=je.prototype.writeUInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};je.prototype.writeUint32BE=je.prototype.writeUInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function xX(e,r,t,a,n){MX(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,t}function _X(e,r,t,a,n){MX(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t+7]=i,i=i>>8,e[t+6]=i,i=i>>8,e[t+5]=i,i=i>>8,e[t+4]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=o,o=o>>8,e[t+2]=o,o=o>>8,e[t+1]=o,o=o>>8,e[t]=o,t+8}je.prototype.writeBigUInt64LE=xs(function(r,t=0){return xX(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});je.prototype.writeBigUInt64BE=xs(function(r,t=0){return _X(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});je.prototype.writeIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);Gn(this,r,t,a,s-1,-s)}let i=0,o=1,l=0;for(this[t]=r&255;++i>0)-l&255;return t+a};je.prototype.writeIntBE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);Gn(this,r,t,a,s-1,-s)}let i=a-1,o=1,l=0;for(this[t+i]=r&255;--i>=0&&(o*=256);)r<0&&l===0&&this[t+i+1]!==0&&(l=1),this[t+i]=(r/o>>0)-l&255;return t+a};je.prototype.writeInt8=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};je.prototype.writeInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};je.prototype.writeInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};je.prototype.writeInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};je.prototype.writeInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};je.prototype.writeBigInt64LE=xs(function(r,t=0){return xX(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});je.prototype.writeBigInt64BE=xs(function(r,t=0){return _X(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wX(e,r,t,a,n,i){if(t+a>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function TX(e,r,t,a,n){return r=+r,t=t>>>0,n||wX(e,r,t,4,34028234663852886e22,-34028234663852886e22),av.write(e,r,t,a,23,4),t+4}je.prototype.writeFloatLE=function(r,t,a){return TX(this,r,t,!0,a)};je.prototype.writeFloatBE=function(r,t,a){return TX(this,r,t,!1,a)};function AX(e,r,t,a,n){return r=+r,t=t>>>0,n||wX(e,r,t,8,17976931348623157e292,-17976931348623157e292),av.write(e,r,t,a,52,8),t+8}je.prototype.writeDoubleLE=function(r,t,a){return AX(this,r,t,!0,a)};je.prototype.writeDoubleBE=function(r,t,a){return AX(this,r,t,!1,a)};je.prototype.copy=function(r,t,a,n){if(!je.isBuffer(r))throw new TypeError("argument should be a Buffer");if(a||(a=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t>>0,a=a===void 0?this.length:a>>>0,r||(r=0);let i;if(typeof r=="number")for(i=t;i2**32?n=dX(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=dX(n)),n+="n"),a+=` It must be ${r}. Received ${n}`,a},RangeError);function dX(e){let r="",t=e.length,a=e[0]==="-"?1:0;for(;t>=a+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function P6e(e,r,t){nv(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&B0(r,e.length-(t+1))}function MX(e,r,t,a,n,i){if(e>t||e3?r===0||r===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:l=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:l=`>= ${r}${o} and <= ${t}${o}`,new tv.ERR_OUT_OF_RANGE("value",l,e)}P6e(a,n,i)}function nv(e,r){if(typeof e!="number")throw new tv.ERR_INVALID_ARG_TYPE(r,"number",e)}function B0(e,r,t){throw Math.floor(e)!==e?(nv(e,t),new tv.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new tv.ERR_BUFFER_OUT_OF_BOUNDS:new tv.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var R6e=/[^+/0-9A-Za-z-_]/g;function F6e(e){if(e=e.split("=")[0],e=e.trim().replace(R6e,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function J6(e,r){r=r||1/0;let t,a=e.length,n=null,i=[];for(let o=0;o55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(o+1===a){(r-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&i.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function N6e(e){let r=[];for(let t=0;t>8,n=t%256,i.push(n),i.push(a);return i}function kX(e){return j6.toByteArray(F6e(e))}function Ig(e,r,t,a){let n;for(n=0;n=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function jo(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function e7(e){return e!==e}var I6e=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let a=t*16;for(let n=0;n<16;++n)r[a+n]=e[t]+e[n]}return r}();function xs(e){return typeof BigInt=="undefined"?O6e:e}function O6e(){throw new Error("BigInt not supported")}});var Og=N(($ze,SX)=>{"use strict";SX.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),a=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var n=42;r[t]=n;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(r,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0}});var H0=N((Kze,qX)=>{"use strict";var B6e=Og();qX.exports=function(){return B6e()&&!!Symbol.toStringTag}});var CX=N((Qze,LX)=>{"use strict";LX.exports=Error});var DX=N((eIe,EX)=>{"use strict";EX.exports=EvalError});var RX=N((rIe,PX)=>{"use strict";PX.exports=RangeError});var NX=N((tIe,FX)=>{"use strict";FX.exports=ReferenceError});var r7=N((aIe,zX)=>{"use strict";zX.exports=SyntaxError});var U0=N((nIe,IX)=>{"use strict";IX.exports=TypeError});var BX=N((iIe,OX)=>{"use strict";OX.exports=URIError});var GX=N((oIe,UX)=>{"use strict";var HX=typeof Symbol!="undefined"&&Symbol,H6e=Og();UX.exports=function(){return typeof HX!="function"||typeof Symbol!="function"||typeof HX("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:H6e()}});var WX=N((lIe,VX)=>{"use strict";var YX={foo:{}},U6e=Object;VX.exports=function(){return{__proto__:YX}.foo===YX.foo&&!({__proto__:null}instanceof U6e)}});var XX=N((sIe,ZX)=>{"use strict";var G6e="Function.prototype.bind called on incompatible ",Y6e=Object.prototype.toString,V6e=Math.max,W6e="[object Function]",jX=function(r,t){for(var a=[],n=0;n{"use strict";var X6e=XX();JX.exports=Function.prototype.bind||X6e});var KX=N((fIe,$X)=>{"use strict";var J6e=Function.prototype.call,$6e=Object.prototype.hasOwnProperty,K6e=Bg();$X.exports=K6e.call(J6e,$6e)});var cv=N((cIe,aJ)=>{"use strict";var ft,Q6e=CX(),e7e=DX(),r7e=RX(),t7e=NX(),fv=r7(),uv=U0(),a7e=BX(),tJ=Function,t7=function(e){try{return tJ('"use strict"; return ('+e+").constructor;")()}catch(r){}},Vu=Object.getOwnPropertyDescriptor;if(Vu)try{Vu({},"")}catch(e){Vu=null}var a7=function(){throw new uv},n7e=Vu?function(){try{return arguments.callee,a7}catch(e){try{return Vu(arguments,"callee").get}catch(r){return a7}}}():a7,lv=GX()(),i7e=WX()(),Va=Object.getPrototypeOf||(i7e?function(e){return e.__proto__}:null),sv={},o7e=typeof Uint8Array=="undefined"||!Va?ft:Va(Uint8Array),Wu={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?ft:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?ft:ArrayBuffer,"%ArrayIteratorPrototype%":lv&&Va?Va([][Symbol.iterator]()):ft,"%AsyncFromSyncIteratorPrototype%":ft,"%AsyncFunction%":sv,"%AsyncGenerator%":sv,"%AsyncGeneratorFunction%":sv,"%AsyncIteratorPrototype%":sv,"%Atomics%":typeof Atomics=="undefined"?ft:Atomics,"%BigInt%":typeof BigInt=="undefined"?ft:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?ft:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?ft:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?ft:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Q6e,"%eval%":eval,"%EvalError%":e7e,"%Float32Array%":typeof Float32Array=="undefined"?ft:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?ft:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?ft:FinalizationRegistry,"%Function%":tJ,"%GeneratorFunction%":sv,"%Int8Array%":typeof Int8Array=="undefined"?ft:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?ft:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?ft:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lv&&Va?Va(Va([][Symbol.iterator]())):ft,"%JSON%":typeof JSON=="object"?JSON:ft,"%Map%":typeof Map=="undefined"?ft:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!lv||!Va?ft:Va(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?ft:Promise,"%Proxy%":typeof Proxy=="undefined"?ft:Proxy,"%RangeError%":r7e,"%ReferenceError%":t7e,"%Reflect%":typeof Reflect=="undefined"?ft:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?ft:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!lv||!Va?ft:Va(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?ft:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lv&&Va?Va(""[Symbol.iterator]()):ft,"%Symbol%":lv?Symbol:ft,"%SyntaxError%":fv,"%ThrowTypeError%":n7e,"%TypedArray%":o7e,"%TypeError%":uv,"%Uint8Array%":typeof Uint8Array=="undefined"?ft:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?ft:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?ft:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?ft:Uint32Array,"%URIError%":a7e,"%WeakMap%":typeof WeakMap=="undefined"?ft:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?ft:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?ft:WeakSet};if(Va)try{null.error}catch(e){QX=Va(Va(e)),Wu["%Error.prototype%"]=QX}var QX,l7e=function e(r){var t;if(r==="%AsyncFunction%")t=t7("async function () {}");else if(r==="%GeneratorFunction%")t=t7("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=t7("async function* () {}");else if(r==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Va&&(t=Va(n.prototype))}return Wu[r]=t,t},eJ={__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"]},G0=Bg(),Hg=KX(),s7e=G0.call(Function.call,Array.prototype.concat),u7e=G0.call(Function.apply,Array.prototype.splice),rJ=G0.call(Function.call,String.prototype.replace),Ug=G0.call(Function.call,String.prototype.slice),f7e=G0.call(Function.call,RegExp.prototype.exec),c7e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,v7e=/\\(\\)?/g,h7e=function(r){var t=Ug(r,0,1),a=Ug(r,-1);if(t==="%"&&a!=="%")throw new fv("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new fv("invalid intrinsic syntax, expected opening `%`");var n=[];return rJ(r,c7e,function(i,o,l,s){n[n.length]=l?rJ(s,v7e,"$1"):o||i}),n},d7e=function(r,t){var a=r,n;if(Hg(eJ,a)&&(n=eJ[a],a="%"+n[0]+"%"),Hg(Wu,a)){var i=Wu[a];if(i===sv&&(i=l7e(a)),typeof i=="undefined"&&!t)throw new uv("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:i}}throw new fv("intrinsic "+r+" does not exist!")};aJ.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new uv("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new uv('"allowMissing" argument must be a boolean');if(f7e(/^%?[^%]*%?$/,r)===null)throw new fv("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=h7e(r),n=a.length>0?a[0]:"",i=d7e("%"+n+"%",t),o=i.name,l=i.value,s=!1,u=i.alias;u&&(n=u[0],u7e(a,s7e([0,1],u)));for(var f=1,c=!0;f=a.length){var m=Vu(l,v);c=!!m,c&&"get"in m&&!("originalValue"in m.get)?l=m.get:l=l[v]}else c=Hg(l,v),l=l[v];c&&!s&&(Wu[o]=l)}}return l}});var Yg=N((vIe,nJ)=>{"use strict";var p7e=cv(),Gg=p7e("%Object.defineProperty%",!0)||!1;if(Gg)try{Gg({},"a",{value:1})}catch(e){Gg=!1}nJ.exports=Gg});var Y0=N((hIe,iJ)=>{"use strict";var y7e=cv(),Vg=y7e("%Object.getOwnPropertyDescriptor%",!0);if(Vg)try{Vg([],"length")}catch(e){Vg=null}iJ.exports=Vg});var uJ=N((dIe,sJ)=>{"use strict";var oJ=Yg(),m7e=r7(),vv=U0(),lJ=Y0();sJ.exports=function(r,t,a){if(!r||typeof r!="object"&&typeof r!="function")throw new vv("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new vv("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new vv("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new vv("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new vv("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new vv("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,s=!!lJ&&lJ(r,t);if(oJ)oJ(r,t,{configurable:o===null&&s?s.configurable:!o,enumerable:n===null&&s?s.enumerable:!n,value:a,writable:i===null&&s?s.writable:!i});else if(l||!n&&!i&&!o)r[t]=a;else throw new m7e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var i7=N((pIe,cJ)=>{"use strict";var n7=Yg(),fJ=function(){return!!n7};fJ.hasArrayLengthDefineBug=function(){if(!n7)return null;try{return n7([],"length",{value:1}).length!==1}catch(r){return!0}};cJ.exports=fJ});var yJ=N((yIe,pJ)=>{"use strict";var g7e=cv(),vJ=uJ(),b7e=i7()(),hJ=Y0(),dJ=U0(),x7e=g7e("%Math.floor%");pJ.exports=function(r,t){if(typeof r!="function")throw new dJ("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||x7e(t)!==t)throw new dJ("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,i=!0;if("length"in r&&hJ){var o=hJ(r,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(i=!1)}return(n||i||!a)&&(b7e?vJ(r,"length",t,!0,!0):vJ(r,"length",t)),r}});var V0=N((mIe,Wg)=>{"use strict";var o7=Bg(),jg=cv(),_7e=yJ(),w7e=U0(),bJ=jg("%Function.prototype.apply%"),xJ=jg("%Function.prototype.call%"),_J=jg("%Reflect.apply%",!0)||o7.call(xJ,bJ),mJ=Yg(),T7e=jg("%Math.max%");Wg.exports=function(r){if(typeof r!="function")throw new w7e("a function is required");var t=_J(o7,xJ,arguments);return _7e(t,1+T7e(0,r.length-(arguments.length-1)),!0)};var gJ=function(){return _J(o7,bJ,arguments)};mJ?mJ(Wg.exports,"apply",{value:gJ}):Wg.exports.apply=gJ});var hv=N((gIe,AJ)=>{"use strict";var wJ=cv(),TJ=V0(),A7e=TJ(wJ("String.prototype.indexOf"));AJ.exports=function(r,t){var a=wJ(r,!!t);return typeof a=="function"&&A7e(r,".prototype.")>-1?TJ(a):a}});var SJ=N((bIe,kJ)=>{"use strict";var M7e=H0()(),k7e=hv(),l7=k7e("Object.prototype.toString"),Zg=function(r){return M7e&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:l7(r)==="[object Arguments]"},MJ=function(r){return Zg(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&l7(r)!=="[object Array]"&&l7(r.callee)==="[object Function]"},S7e=function(){return Zg(arguments)}();Zg.isLegacyArguments=MJ;kJ.exports=S7e?Zg:MJ});var CJ=N((xIe,LJ)=>{"use strict";var q7e=Object.prototype.toString,L7e=Function.prototype.toString,C7e=/^\s*(?:function)?\*/,qJ=H0()(),s7=Object.getPrototypeOf,E7e=function(){if(!qJ)return!1;try{return Function("return function*() {}")()}catch(e){}},u7;LJ.exports=function(r){if(typeof r!="function")return!1;if(C7e.test(L7e.call(r)))return!0;if(!qJ){var t=q7e.call(r);return t==="[object GeneratorFunction]"}if(!s7)return!1;if(typeof u7=="undefined"){var a=E7e();u7=a?s7(a):!1}return s7(r)===u7}});var RJ=N((_Ie,PJ)=>{"use strict";var DJ=Function.prototype.toString,dv=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,c7,Xg;if(typeof dv=="function"&&typeof Object.defineProperty=="function")try{c7=Object.defineProperty({},"length",{get:function(){throw Xg}}),Xg={},dv(function(){throw 42},null,c7)}catch(e){e!==Xg&&(dv=null)}else dv=null;var D7e=/^\s*class\b/,v7=function(r){try{var t=DJ.call(r);return D7e.test(t)}catch(a){return!1}},f7=function(r){try{return v7(r)?!1:(DJ.call(r),!0)}catch(t){return!1}},Jg=Object.prototype.toString,P7e="[object Object]",R7e="[object Function]",F7e="[object GeneratorFunction]",N7e="[object HTMLAllCollection]",z7e="[object HTML document.all class]",I7e="[object HTMLCollection]",O7e=typeof Symbol=="function"&&!!Symbol.toStringTag,B7e=!(0 in[,]),h7=function(){return!1};typeof document=="object"&&(EJ=document.all,Jg.call(EJ)===Jg.call(document.all)&&(h7=function(r){if((B7e||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=Jg.call(r);return(t===N7e||t===z7e||t===I7e||t===P7e)&&r("")==null}catch(a){}return!1}));var EJ;PJ.exports=dv?function(r){if(h7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{dv(r,null,c7)}catch(t){if(t!==Xg)return!1}return!v7(r)&&f7(r)}:function(r){if(h7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(O7e)return f7(r);if(v7(r))return!1;var t=Jg.call(r);return t!==R7e&&t!==F7e&&!/^\[object HTML/.test(t)?!1:f7(r)}});var d7=N((wIe,NJ)=>{"use strict";var H7e=RJ(),U7e=Object.prototype.toString,FJ=Object.prototype.hasOwnProperty,G7e=function(r,t,a){for(var n=0,i=r.length;n=3&&(n=a),U7e.call(r)==="[object Array]"?G7e(r,t,n):typeof r=="string"?Y7e(r,t,n):V7e(r,t,n)};NJ.exports=W7e});var y7=N((TIe,zJ)=>{"use strict";var p7=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],j7e=typeof globalThis=="undefined"?window:globalThis;zJ.exports=function(){for(var r=[],t=0;t{"use strict";var Kg=d7(),Z7e=y7(),IJ=V0(),b7=hv(),$g=Y0(),X7e=b7("Object.prototype.toString"),BJ=H0()(),OJ=typeof globalThis=="undefined"?window:globalThis,g7=Z7e(),x7=b7("String.prototype.slice"),m7=Object.getPrototypeOf,J7e=b7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1?t:t!=="Object"?!1:K7e(r)}return $g?$7e(r):null}});var ZJ=N((MIe,jJ)=>{"use strict";var GJ=d7(),Q7e=y7(),w7=hv(),eTe=w7("Object.prototype.toString"),YJ=H0()(),e2=Y0(),rTe=typeof globalThis=="undefined"?window:globalThis,VJ=Q7e(),tTe=w7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1}return e2?nTe(r):!1}});var M7=N(it=>{"use strict";var iTe=SJ(),oTe=CJ(),mo=UJ(),XJ=ZJ();function pv(e){return e.call.bind(e)}var JJ=typeof BigInt!="undefined",$J=typeof Symbol!="undefined",zi=pv(Object.prototype.toString),lTe=pv(Number.prototype.valueOf),sTe=pv(String.prototype.valueOf),uTe=pv(Boolean.prototype.valueOf);JJ&&(KJ=pv(BigInt.prototype.valueOf));var KJ;$J&&(QJ=pv(Symbol.prototype.valueOf));var QJ;function j0(e,r){if(typeof e!="object")return!1;try{return r(e),!0}catch(t){return!1}}it.isArgumentsObject=iTe;it.isGeneratorFunction=oTe;it.isTypedArray=XJ;function fTe(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}it.isPromise=fTe;function cTe(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):XJ(e)||r$(e)}it.isArrayBufferView=cTe;function vTe(e){return mo(e)==="Uint8Array"}it.isUint8Array=vTe;function hTe(e){return mo(e)==="Uint8ClampedArray"}it.isUint8ClampedArray=hTe;function dTe(e){return mo(e)==="Uint16Array"}it.isUint16Array=dTe;function pTe(e){return mo(e)==="Uint32Array"}it.isUint32Array=pTe;function yTe(e){return mo(e)==="Int8Array"}it.isInt8Array=yTe;function mTe(e){return mo(e)==="Int16Array"}it.isInt16Array=mTe;function gTe(e){return mo(e)==="Int32Array"}it.isInt32Array=gTe;function bTe(e){return mo(e)==="Float32Array"}it.isFloat32Array=bTe;function xTe(e){return mo(e)==="Float64Array"}it.isFloat64Array=xTe;function _Te(e){return mo(e)==="BigInt64Array"}it.isBigInt64Array=_Te;function wTe(e){return mo(e)==="BigUint64Array"}it.isBigUint64Array=wTe;function r2(e){return zi(e)==="[object Map]"}r2.working=typeof Map!="undefined"&&r2(new Map);function TTe(e){return typeof Map=="undefined"?!1:r2.working?r2(e):e instanceof Map}it.isMap=TTe;function t2(e){return zi(e)==="[object Set]"}t2.working=typeof Set!="undefined"&&t2(new Set);function ATe(e){return typeof Set=="undefined"?!1:t2.working?t2(e):e instanceof Set}it.isSet=ATe;function a2(e){return zi(e)==="[object WeakMap]"}a2.working=typeof WeakMap!="undefined"&&a2(new WeakMap);function MTe(e){return typeof WeakMap=="undefined"?!1:a2.working?a2(e):e instanceof WeakMap}it.isWeakMap=MTe;function A7(e){return zi(e)==="[object WeakSet]"}A7.working=typeof WeakSet!="undefined"&&A7(new WeakSet);function kTe(e){return A7(e)}it.isWeakSet=kTe;function n2(e){return zi(e)==="[object ArrayBuffer]"}n2.working=typeof ArrayBuffer!="undefined"&&n2(new ArrayBuffer);function e$(e){return typeof ArrayBuffer=="undefined"?!1:n2.working?n2(e):e instanceof ArrayBuffer}it.isArrayBuffer=e$;function i2(e){return zi(e)==="[object DataView]"}i2.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&i2(new DataView(new ArrayBuffer(1),0,1));function r$(e){return typeof DataView=="undefined"?!1:i2.working?i2(e):e instanceof DataView}it.isDataView=r$;var T7=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function W0(e){return zi(e)==="[object SharedArrayBuffer]"}function t$(e){return typeof T7=="undefined"?!1:(typeof W0.working=="undefined"&&(W0.working=W0(new T7)),W0.working?W0(e):e instanceof T7)}it.isSharedArrayBuffer=t$;function STe(e){return zi(e)==="[object AsyncFunction]"}it.isAsyncFunction=STe;function qTe(e){return zi(e)==="[object Map Iterator]"}it.isMapIterator=qTe;function LTe(e){return zi(e)==="[object Set Iterator]"}it.isSetIterator=LTe;function CTe(e){return zi(e)==="[object Generator]"}it.isGeneratorObject=CTe;function ETe(e){return zi(e)==="[object WebAssembly.Module]"}it.isWebAssemblyCompiledModule=ETe;function a$(e){return j0(e,lTe)}it.isNumberObject=a$;function n$(e){return j0(e,sTe)}it.isStringObject=n$;function i$(e){return j0(e,uTe)}it.isBooleanObject=i$;function o$(e){return JJ&&j0(e,KJ)}it.isBigIntObject=o$;function l$(e){return $J&&j0(e,QJ)}it.isSymbolObject=l$;function DTe(e){return a$(e)||n$(e)||i$(e)||o$(e)||l$(e)}it.isBoxedPrimitive=DTe;function PTe(e){return typeof Uint8Array!="undefined"&&(e$(e)||t$(e))}it.isAnyArrayBuffer=PTe;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(it,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var k7=N((SIe,s$)=>{s$.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}});var D7=N(ot=>{var u$=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),a={},n=0;n=n)return l;switch(l){case"%s":return String(a[t++]);case"%d":return Number(a[t++]);case"%j":try{return JSON.stringify(a[t++])}catch(s){return"[Circular]"}default:return l}}),o=a[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),C7(r)?t.showHidden=r:r&&ot._extend(t,r),Zu(t.showHidden)&&(t.showHidden=!1),Zu(t.depth)&&(t.depth=2),Zu(t.colors)&&(t.colors=!1),Zu(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=FTe),u2(t,e,t.depth)}ot.inspect=_s;_s.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]};_s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function FTe(e,r){var t=_s.styles[r];return t?"\x1B["+_s.colors[t][0]+"m"+e+"\x1B["+_s.colors[t][1]+"m":e}function NTe(e,r){return e}function zTe(e){var r={};return e.forEach(function(t,a){r[t]=!0}),r}function u2(e,r,t){if(e.customInspect&&r&&s2(r.inspect)&&r.inspect!==ot.inspect&&!(r.constructor&&r.constructor.prototype===r)){var a=r.inspect(t,e);return v2(a)||(a=u2(e,a,t)),a}var n=ITe(e,r);if(n)return n;var i=Object.keys(r),o=zTe(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),X0(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return S7(r);if(i.length===0){if(s2(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(Z0(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(f2(r))return e.stylize(Date.prototype.toString.call(r),"date");if(X0(r))return S7(r)}var s="",u=!1,f=["{","}"];if(c$(r)&&(u=!0,f=["[","]"]),s2(r)){var c=r.name?": "+r.name:"";s=" [Function"+c+"]"}if(Z0(r)&&(s=" "+RegExp.prototype.toString.call(r)),f2(r)&&(s=" "+Date.prototype.toUTCString.call(r)),X0(r)&&(s=" "+S7(r)),i.length===0&&(!u||r.length==0))return f[0]+s+f[1];if(t<0)return Z0(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return u?v=OTe(e,r,t,o,i):v=i.map(function(d){return L7(e,r,t,o,d,u)}),e.seen.pop(),BTe(v,s,f)}function ITe(e,r){if(Zu(r))return e.stylize("undefined","undefined");if(v2(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(v$(r))return e.stylize(""+r,"number");if(C7(r))return e.stylize(""+r,"boolean");if(c2(r))return e.stylize("null","null")}function S7(e){return"["+Error.prototype.toString.call(e)+"]"}function OTe(e,r,t,a,n){for(var i=[],o=0,l=r.length;o{"use strict";Fk.exports=function(r){return r}});var wb=N(al=>{"use strict";var vle=Pr(),hle=Zs(),dle=xb(),ple=Ft().BADNUM,_b=1e-9;al.findBin=function(e,r,t){if(vle(r.start))return t?Math.ceil((e-r.start)/r.size-_b)-1:Math.floor((e-r.start)/r.size+_b);var a=0,n=r.length,i=0,o=n>1?(r[n-1]-r[0])/(n-1):1,l,s;for(o>=0?s=t?yle:mle:s=t?ble:gle,e+=o*_b*(t?-1:1)*(o>=0?1:-1);a90&&hle.log("Long binary search..."),a-1};function yle(e,r){return er}function ble(e,r){return e>=r}al.sorterAsc=function(e,r){return e-r};al.sorterDes=function(e,r){return r-e};al.distinctVals=function(e){var r=e.slice();r.sort(al.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===ple;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],o,l=0;l<=t;l++){var s=r[l],u=s-o;o===void 0?(i.push(s),o=s):u>n&&(a=Math.min(a,u),i.push(s),o=s)}return{vals:i,minDiff:a}};al.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,o=0,l=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};al.findIndexOfMin=function(e,r){r=r||dle;for(var t=1/0,a,n=0;n{"use strict";Nk.exports=function(r){return Object.keys(r).sort()}});var zk=N(Qt=>{"use strict";var Jv=Pr(),xle=Wn().isArrayOrTypedArray;Qt.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),Jv(r)||(r=!1),xle(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var Uk=N((xCe,Hk)=>{"use strict";var Ik=wf(),Ab=Ik.mod,_le=Ik.modHalf,$v=Math.PI,Yl=2*$v;function wle(e){return e/180*$v}function Tle(e){return e/$v*180}function Mb(e){return Math.abs(e[1]-e[0])>Yl-1e-14}function Ok(e,r){return _le(r-e,Yl)}function Ale(e,r){return Math.abs(Ok(e,r))}function Bk(e,r){if(Mb(r))return!0;var t,a;r[0]a&&(a+=Yl);var n=Ab(e,Yl),i=n+Yl;return n>=t&&n<=a||i>=t&&i<=a}function Mle(e,r,t,a){if(!Bk(r,a))return!1;var n,i;return t[0]=n&&e<=i}function kb(e,r,t,a,n,i,o){n=n||0,i=i||0;var l=Mb([t,a]),s,u,f,c,v;l?(s=0,u=$v,f=Yl):t{"use strict";Js.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};Js.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};Js.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};Js.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};Js.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};Js.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var Wk=N($s=>{"use strict";var Sb=wf().mod;$s.segmentsIntersect=Vk;function Vk(e,r,t,a,n,i,o,l){var s=t-e,u=n-e,f=o-n,c=a-r,v=i-r,d=l-i,p=s*d-f*c;if(p===0)return null;var m=(u*d-f*v)/p,y=(u*c-s*v)/p;return y<0||y>1||m<0||m>1?null:{x:e+s*m,y:r+c*m}}$s.segmentDistance=function(r,t,a,n,i,o,l,s){if(Vk(r,t,a,n,i,o,l,s))return 0;var u=a-r,f=n-t,c=l-i,v=s-o,d=u*u+f*f,p=c*c+v*v,m=Math.min(Ep(u,f,d,i-r,o-t),Ep(u,f,d,l-r,s-t),Ep(c,v,p,r-i,t-o),Ep(c,v,p,a-i,n-o));return Math.sqrt(m)};function Ep(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var o=a-e,l=n-r;return o*o+l*l}else{var s=a*r-n*e;return s*s/t}}var Dp,qb,Yk;$s.getTextLocation=function(r,t,a,n){if((r!==qb||n!==Yk)&&(Dp={},qb=r,Yk=n),Dp[a])return Dp[a];var i=r.getPointAtLength(Sb(a-n/2,t)),o=r.getPointAtLength(Sb(a+n/2,t)),l=Math.atan((o.y-i.y)/(o.x-i.x)),s=r.getPointAtLength(Sb(a,t)),u=(s.x*4+i.x+o.x)/6,f=(s.y*4+i.y+o.y)/6,c={x:u,y:f,theta:l};return Dp[a]=c,c};$s.clearLocationCache=function(){qb=null};$s.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,o=t.top,l=t.bottom,s=0,u=r.getTotalLength(),f=u,c,v;function d(m){var y=r.getPointAtLength(m);m===0?c=y:m===u&&(v=y);var x=y.xi?y.x-i:0,_=y.yl?y.y-l:0;return Math.sqrt(x*x+_*_)}for(var p=d(s);p;){if(s+=p+a,s>f)return;p=d(s)}for(p=d(f);p;){if(f-=p+a,s>f)return;p=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(c.x-v.x)<.1&&Math.abs(c.y-v.y)<.1}};$s.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),o=n.tolerance||.001,l=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,c=i,v,d,p;u0?c=v:f=v,u++}return d}});var Pp=N(Kv=>{"use strict";var nl={};Kv.throttle=function(r,t,a){var n=nl[r],i=Date.now();if(!n){for(var o in nl)nl[o].tsn.ts+t){l();return}n.timer=setTimeout(function(){l(),n.timer=null},t)};Kv.done=function(e){var r=nl[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};Kv.clear=function(e){if(e)jk(nl[e]),delete nl[e];else for(var r in nl)Kv.clear(r)};function jk(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Xk=N((ACe,Zk)=>{"use strict";Zk.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var Jk=N((MCe,Rp)=>{"use strict";Rp.exports=Lb;Rp.exports.isMobile=Lb;Rp.exports.default=Lb;var Lle=/(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,Cle=/CrOS/,Ele=/android|ipad|playbook|silk/i;function Lb(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=Lle.test(r)&&!Cle.test(r)||!!e.tablet&&Ele.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var Kk=N((kCe,$k)=>{"use strict";var Dle=Pr(),Ple=Jk();$k.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=Rle(),typeof t!="string")return!0;var a=Ple({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;l--){var s=n[l];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(Dle(u)&&(u=+u),u>=13)return!0}}}return a};function Rle(){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 eS=N((SCe,Qk)=>{"use strict";var Fle=Sr();Qk.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][i]=Fle.select(this)}),n}});var tS=N((qCe,rS)=>{"use strict";var Nle=gr();rS.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,o=0;o<2;o++){var l=(i[a]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=Nle.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var nS=N((LCe,aS)=>{"use strict";aS.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";iS.exports=function(r){for(var t=Ole(r)?Ile:zle,a=[],n=0;n{"use strict";lS.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var o=String(t).length,l=String(r).length;if(i>=l+o){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var fS=N((DCe,uS)=>{"use strict";var Ble=Pr(),Hle=Ft().BADNUM,Ule=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;uS.exports=function(r){return typeof r=="string"&&(r=r.replace(Ule,"")),Ble(r)?Number(r):Hle}});var Ee=N((PCe,TS)=>{"use strict";var Qv=Sr(),Gle=xf().utcFormat,Yle=J3().format,yS=Pr(),mS=Ft(),gS=mS.FP_SAFE,Vle=-gS,cS=mS.BADNUM,be=TS.exports={};be.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var vS={};be.warnBadFormat=function(e){var r=String(e);vS[r]||(vS[r]=1,be.warn('encountered bad format: "'+r+'"'))};be.noFormat=function(e){return String(e)};be.numberFormat=function(e){var r;try{r=Yle(be.adjustFormat(e))}catch(t){return be.warnBadFormat(e),be.noFormat}return r};be.nestedProperty=sp();be.keyedContainer=t9();be.relativeAttr=n9();be.isPlainObject=zl();be.toLogRange=fp();be.relinkPrivateKeys=s9();var Vl=Wn();be.isArrayBuffer=Vl.isArrayBuffer;be.isTypedArray=Vl.isTypedArray;be.isArrayOrTypedArray=Vl.isArrayOrTypedArray;be.isArray1D=Vl.isArray1D;be.ensureArray=Vl.ensureArray;be.concat=Vl.concat;be.maxRowLength=Vl.maxRowLength;be.minRowLength=Vl.minRowLength;var bS=wf();be.mod=bS.mod;be.modHalf=bS.modHalf;var Wl=S9();be.valObjectMeta=Wl.valObjectMeta;be.coerce=Wl.coerce;be.coerce2=Wl.coerce2;be.coerceFont=Wl.coerceFont;be.coercePattern=Wl.coercePattern;be.coerceHoverinfo=Wl.coerceHoverinfo;be.coerceSelectionMarkerOpacity=Wl.coerceSelectionMarkerOpacity;be.validate=Wl.validate;var jn=Rk();be.dateTime2ms=jn.dateTime2ms;be.isDateTime=jn.isDateTime;be.ms2DateTime=jn.ms2DateTime;be.ms2DateTimeLocal=jn.ms2DateTimeLocal;be.cleanDate=jn.cleanDate;be.isJSDate=jn.isJSDate;be.formatDate=jn.formatDate;be.incrementMonth=jn.incrementMonth;be.dateTick0=jn.dateTick0;be.dfltRange=jn.dfltRange;be.findExactDates=jn.findExactDates;be.MIN_MS=jn.MIN_MS;be.MAX_MS=jn.MAX_MS;var Ks=wb();be.findBin=Ks.findBin;be.sorterAsc=Ks.sorterAsc;be.sorterDes=Ks.sorterDes;be.distinctVals=Ks.distinctVals;be.roundUp=Ks.roundUp;be.sort=Ks.sort;be.findIndexOfMin=Ks.findIndexOfMin;be.sortObjectKeys=Tb();var il=zk();be.aggNums=il.aggNums;be.len=il.len;be.mean=il.mean;be.geometricMean=il.geometricMean;be.median=il.median;be.midRange=il.midRange;be.variance=il.variance;be.stdev=il.stdev;be.interp=il.interp;var Ji=xp();be.init2dArray=Ji.init2dArray;be.transposeRagged=Ji.transposeRagged;be.dot=Ji.dot;be.translationMatrix=Ji.translationMatrix;be.rotationMatrix=Ji.rotationMatrix;be.rotationXYMatrix=Ji.rotationXYMatrix;be.apply3DTransform=Ji.apply3DTransform;be.apply2DTransform=Ji.apply2DTransform;be.apply2DTransform2=Ji.apply2DTransform2;be.convertCssMatrix=Ji.convertCssMatrix;be.inverseTransformMatrix=Ji.inverseTransformMatrix;var Ao=Uk();be.deg2rad=Ao.deg2rad;be.rad2deg=Ao.rad2deg;be.angleDelta=Ao.angleDelta;be.angleDist=Ao.angleDist;be.isFullCircle=Ao.isFullCircle;be.isAngleInsideSector=Ao.isAngleInsideSector;be.isPtInsideSector=Ao.isPtInsideSector;be.pathArc=Ao.pathArc;be.pathSector=Ao.pathSector;be.pathAnnulus=Ao.pathAnnulus;var Pf=Gk();be.isLeftAnchor=Pf.isLeftAnchor;be.isCenterAnchor=Pf.isCenterAnchor;be.isRightAnchor=Pf.isRightAnchor;be.isTopAnchor=Pf.isTopAnchor;be.isMiddleAnchor=Pf.isMiddleAnchor;be.isBottomAnchor=Pf.isBottomAnchor;var Rf=Wk();be.segmentsIntersect=Rf.segmentsIntersect;be.segmentDistance=Rf.segmentDistance;be.getTextLocation=Rf.getTextLocation;be.clearLocationCache=Rf.clearLocationCache;be.getVisibleSegment=Rf.getVisibleSegment;be.findPointOnPath=Rf.findPointOnPath;var zp=bt();be.extendFlat=zp.extendFlat;be.extendDeep=zp.extendDeep;be.extendDeepAll=zp.extendDeepAll;be.extendDeepNoArrays=zp.extendDeepNoArrays;var Cb=Zs();be.log=Cb.log;be.warn=Cb.warn;be.error=Cb.error;var Wle=Af();be.counterRegex=Wle.counter;var Eb=Pp();be.throttle=Eb.throttle;be.throttleDone=Eb.done;be.clearThrottle=Eb.clear;var $i=Wv();be.getGraphDiv=$i.getGraphDiv;be.isPlotDiv=$i.isPlotDiv;be.removeElement=$i.removeElement;be.addStyleRule=$i.addStyleRule;be.addRelatedStyleRule=$i.addRelatedStyleRule;be.deleteRelatedStyleRule=$i.deleteRelatedStyleRule;be.setStyleOnHover=$i.setStyleOnHover;be.getFullTransformMatrix=$i.getFullTransformMatrix;be.getElementTransformMatrix=$i.getElementTransformMatrix;be.getElementAndAncestors=$i.getElementAndAncestors;be.equalDomRects=$i.equalDomRects;be.clearResponsive=Xk();be.preserveDrawingBuffer=Kk();be.makeTraceGroups=eS();be._=tS();be.notifier=lb();be.filterUnique=nS();be.filterVisible=oS();be.pushUnique=fb();be.increment=sS();be.cleanNumber=fS();be.ensureNumber=function(r){return yS(r)?(r=Number(r),r>gS||r=r?!1:yS(e)&&e>=0&&e%1===0};be.noop=bp();be.identity=xb();be.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};be.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};be.simpleMap=function(e,r,t,a,n){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,t)?n>10?(be.warn("randstr failed uniqueness"),o):e(r,t,a,(n||0)+1):o};be.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};be.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),o=new Array(t),l,s,u,f;for(l=0;l=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];o[l]=f}return o};be.syncOrAsync=function(e,r,t){var a,n;function i(){return be.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};be.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};be.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,o;for(i=0;i0?n:0})};be.fillArray=function(e,r,t,a){if(a=a||be.identity,be.isArrayOrTypedArray(e))for(var n=0;n1?n+o[1]:"";if(i&&(o.length>1||l.length>4||t))for(;a.test(l);)l=l.replace(a,"$1"+i+"$2");return l+s};be.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var wS=/^\w*$/;be.templateString=function(e,r){var t={};return e.replace(be.TEMPLATE_STRING_REGEX,function(a,n){var i;return wS.test(n)?i=r[n]:(t[n]=t[n]||be.nestedProperty(r,n).get,i=t[n]()),be.isValidTextValue(i)?i:""})};var Kle={max:10,count:0,name:"hovertemplate"};be.hovertemplateString=function(){return Db.apply(Kle,arguments)};var Qle={max:10,count:0,name:"texttemplate"};be.texttemplateString=function(){return Db.apply(Qle,arguments)};var ese=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function rse(e){var r=e.match(ese);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var tse={max:10,count:0,name:"texttemplate",parseMultDiv:!0};be.texttemplateStringForShapes=function(){return Db.apply(tse,arguments)};var hS=/^[:|\|]/;function Db(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(be.TEMPLATE_STRING_REGEX,function(o,l,s){var u=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",c=l==="_xother_"||l==="_yother_",v=l==="xother_"||l==="yother_",d=u||f||v||c,p=l;(f||c)&&(p=p.substring(1)),(v||c)&&(p=p.substring(0,p.length-1));var m=null,y=null;if(a.parseMultDiv){var x=rse(p);p=x.key,m=x.op,y=x.number}var _;if(d){if(_=r[p],_===void 0)return""}else{var w,b;for(b=3;b=Np&&o<=dS,u=l>=Np&&l<=dS;if(s&&(a=10*a+o-Np),u&&(n=10*n+l-Np),!s||!u){if(a!==n)return a-n;if(o!==l)return o-l}}return n-a};var Df=2e9;be.seedPseudoRandom=function(){Df=2e9};be.pseudoRandom=function(){var e=Df;return Df=(69069*Df+1)%4294967296,Math.abs(Df-e)<429496729?be.pseudoRandom():Df/4294967296};be.fillText=function(e,r,t){var a=Array.isArray(t)?function(o){t.push(o)}:function(o){t.text=o},n=be.extractOption(e,r,"htx","hovertext");if(be.isValidTextValue(n))return a(n);var i=be.extractOption(e,r,"tx","text");if(be.isValidTextValue(i))return a(i)};be.isValidTextValue=function(e){return e||e===0};be.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,be.strTranslate(n-u*(t+o),i-u*(a+l))+be.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};be.setTransormAndDisplay=function(e,r){e.attr("transform",be.getTextTransform(r)),e.style("display",r.scale?null:"none")};be.ensureUniformFontSize=function(e,r){var t=be.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};be.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};be.bigFont=function(e){return Math.round(1.2*e)};var pS=be.getFirefoxVersion(),ase=pS!==null&&pS<86;be.getPositionFromD3Event=function(){return ase?[Qv.event.layerX,Qv.event.layerY]:[Qv.event.offsetX,Qv.event.offsetY]}});var kS=N(()=>{"use strict";var nse=Ee(),AS={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Pb in AS)MS=Pb.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),nse.addStyleRule(MS,AS[Pb]);var MS,Pb});var Rb=N((NCe,SS)=>{SS.exports=!0});var Nb=N((zCe,qS)=>{"use strict";var ise=Rb(),Fb;typeof window.matchMedia=="function"?Fb=!window.matchMedia("(hover: none)").matches:Fb=ise;qS.exports=Fb});var Qs=N((ICe,zb)=>{"use strict";var Ff=typeof Reflect=="object"?Reflect:null,LS=Ff&&typeof Ff.apply=="function"?Ff.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},Ip;Ff&&typeof Ff.ownKeys=="function"?Ip=Ff.ownKeys:Object.getOwnPropertySymbols?Ip=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Ip=function(r){return Object.getOwnPropertyNames(r)};function ose(e){console&&console.warn&&console.warn(e)}var ES=Number.isNaN||function(r){return r!==r};function qt(){qt.init.call(this)}zb.exports=qt;zb.exports.once=fse;qt.EventEmitter=qt;qt.prototype._events=void 0;qt.prototype._eventsCount=0;qt.prototype._maxListeners=void 0;var CS=10;function Op(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(qt,"defaultMaxListeners",{enumerable:!0,get:function(){return CS},set:function(e){if(typeof e!="number"||e<0||ES(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");CS=e}});qt.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};qt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||ES(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function DS(e){return e._maxListeners===void 0?qt.defaultMaxListeners:e._maxListeners}qt.prototype.getMaxListeners=function(){return DS(this)};qt.prototype.emit=function(r){for(var t=[],a=1;a0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")LS(s,this,t);else for(var u=s.length,f=zS(s,u),a=0;a0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=o.length,ose(l)}return e}qt.prototype.addListener=function(r,t){return PS(this,r,t,!1)};qt.prototype.on=qt.prototype.addListener;qt.prototype.prependListener=function(r,t){return PS(this,r,t,!0)};function lse(){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 RS(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=lse.bind(a);return n.listener=t,a.wrapFn=n,n}qt.prototype.once=function(r,t){return Op(t),this.on(r,RS(this,r,t)),this};qt.prototype.prependOnceListener=function(r,t){return Op(t),this.prependListener(r,RS(this,r,t)),this};qt.prototype.removeListener=function(r,t){var a,n,i,o,l;if(Op(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,o=a.length-1;o>=0;o--)if(a[o]===t||a[o].listener===t){l=a[o].listener,i=o;break}if(i<0)return this;i===0?a.shift():sse(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};qt.prototype.off=qt.prototype.removeListener;qt.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),o;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function FS(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?use(n):zS(n,n.length)}qt.prototype.listeners=function(r){return FS(this,r,!0)};qt.prototype.rawListeners=function(r){return FS(this,r,!1)};qt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):NS.call(e,r)};qt.prototype.listenerCount=NS;function NS(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}qt.prototype.eventNames=function(){return this._eventsCount>0?Ip(this._events):[]};function zS(e,r){for(var t=new Array(r),a=0;a{"use strict";var Ib=Qs().EventEmitter,vse={init:function(e){if(e._ev instanceof Ib)return e;var r=new Ib,t=new Ib;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function o(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var l;for(l=0;l{"use strict";var BS=Ee(),hse=js().dfltConfig;function dse(e,r){for(var t=[],a,n=0;nhse.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};ol.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};ol.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};ol.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";GS.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var If=N(ca=>{"use strict";var fi=gr(),rh=Ee(),Hp=mn(),Bb=Sf(),pse=Ob(),yse=jv(),mse=js().configAttributes,YS=Xi(),Ki=rh.extendDeepAll,Nf=rh.isPlainObject,gse=rh.isArrayOrTypedArray,Up=rh.nestedProperty,bse=rh.valObjectMeta,Hb="_isSubplotObj",Gp="_isLinkedToArray",xse="_arrayAttrRegexps",WS="_deprecated",Ub=[Hb,Gp,xse,WS];ca.IS_SUBPLOT_OBJ=Hb;ca.IS_LINKED_TO_ARRAY=Gp;ca.DEPRECATED=WS;ca.UNDERSCORE_ATTRS=Ub;ca.get=function(){var e={};return fi.allTypes.forEach(function(r){e[r]=wse(r)}),{defs:{valObjects:bse,metaKeys:Ub.concat(["description","role","editType","impliedEdits"]),editType:{traces:YS.traces,layout:YS.layout},impliedEdits:{}},traces:e,layout:Tse(),frames:Ase(),animation:zf(yse),config:zf(mse)}};ca.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var o=e[i];if(Ub.indexOf(i)===-1){var l=(a?a+".":"")+i;r(o,i,e,n,l),!ca.isValObject(o)&&Nf(o)&&i!=="impliedEdits"&&ca.crawl(o,r,n+1,l)}})};ca.isValObject=function(e){return e&&e.valType!==void 0};ca.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function o(s,u,f,c){t=t.slice(0,c).concat([u]),a=a.slice(0,c).concat([s&&s._isLinkedToArray]);var v=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[c-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));v&&l(n,0,"")}function l(s,u,f){var c=s[t[u]],v=f+t[u];if(u===t.length-1)gse(c)&&r.push(i+v);else if(a[u]){if(Array.isArray(c))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var o=r[t];if(!Bp(o))return!1;e=i[n][o]}else e=i[n]}else e=i}}return e}function Bp(e){return e===Math.round(e)&&e>=0}function wse(e){var r,t;r=fi.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=Ki({},Hp),i=Ki({},r.attributes);ca.crawl(i,function(s,u,f,c,v){Up(n,v).set(void 0),s===void 0&&Up(i,v).set(void 0)}),Ki(a,n),fi.traceIs(e,"noOpacity")&&delete a.opacity,fi.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),fi.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,Ki(a,i),t.attributes&&Ki(a,t.attributes),a.type=e;var o={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:zf(a)};if(r.layoutAttributes){var l={};Ki(l,r.layoutAttributes),o.layoutAttributes=zf(l)}return r.animatable||ca.crawl(o,function(s){ca.isValObject(s)&&"anim"in s&&delete s.anim}),o}function Tse(){var e={},r,t;Ki(e,Bb);for(r in fi.subplotsRegistry)if(t=fi.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var Of=Ee(),Lse=mn(),jl="templateitemname",Gb={name:{valType:"string",editType:"none"}};Gb[jl]={valType:"string",editType:"calc"};eu.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=Gb.name,r[jl]=Gb[jl],r};eu.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=Of.coerce(i,{},Lse,"type");var o={type:t,_template:null};if(t in r){a=e[t];var l=r[t]%a.length;r[t]++,o._template=a[l]}return o}return{newTrace:n}};eu.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);Of.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};eu.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[XS(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function l(u){var f={name:u.name,_input:u},c=f[jl]=u[jl];if(!ZS(c))return f._template=n,f;for(var v=0;v=a&&(t._input||{})._templateitemname;i&&(n=a);var o=r+"["+n+"]",l;function s(){l={},i&&(l[o]={},l[o][jl]=i)}s();function u(d,p){l[d]=p}function f(d,p){i?Of.nestedProperty(l[o],d).set(p):l[o+"."+d]=p}function c(){var d=l;return s(),d}function v(d,p){d&&f(d,p);var m=c();for(var y in m)Of.nestedProperty(e,y).set(m[y])}return{modifyBase:u,modifyItem:f,getUpdateObj:c,applyUpdate:v}}});var Ca=N((YCe,JS)=>{"use strict";var th=Af().counter;JS.exports={idRegex:{x:th("x","( domain)?"),y:th("y","( domain)?")},attrRegex:th("[xy]axis"),xAxisMatch:th("xaxis"),yAxisMatch:th("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 va=N(En=>{"use strict";var Cse=gr(),Yb=Ca();En.id2name=function(r){if(!(typeof r!="string"||!r.match(Yb.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};En.name2id=function(r){if(r.match(Yb.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};En.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(Yb.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};En.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=En.listIds(e,r),i=new Array(n.length),o;for(o=0;oa?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};En.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function $S(e,r){if(r&&r.length){for(var t=0;t{"use strict";function Ese(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function Dse(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}KS.exports={clearOutlineControllers:Ese,clearOutline:Dse}});var Yp=N((jCe,QS)=>{"use strict";QS.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var jp=N(Wp=>{"use strict";var Vp=gr(),ZCe=Ca().SUBPLOT_PATTERN;Wp.getSubplotCalcData=function(e,r,t){var a=Vp.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],o=0;o{"use strict";var Pse=gr(),Bf=Ee();ru.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=ru.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(o)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(o){eq(e,o,n.cache),n.check=function(){if(i){var f=eq(e,o,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;Bf.isPlainObject(i)?Vb(i,r,o,a+1):r(o,n,i)}})}});var ea=N(($Ce,mq)=>{"use strict";var fq=Sr(),Fse=xf().timeFormatLocale,Nse=J3().formatLocale,ah=Pr(),zse=$3(),Kr=gr(),cq=If(),Ise=_t(),vr=Ee(),vq=Tr(),nq=Ft().BADNUM,Dn=va(),Ose=Zl().clearOutline,Bse=Yp(),Wb=jv(),Hse=Ob(),Use=jp().getModuleCalcData,iq=vr.relinkPrivateKeys,tu=vr._,rr=mq.exports={};vr.extendFlat(rr,Kr);rr.attributes=mn();rr.attributes.type.values=rr.allTypes;rr.fontAttrs=fa();rr.layoutAttributes=Sf();var Xp=aq();rr.executeAPICommand=Xp.executeAPICommand;rr.computeAPICommandBindings=Xp.computeAPICommandBindings;rr.manageCommandObserver=Xp.manageCommandObserver;rr.hasSimpleAPICommandBindings=Xp.hasSimpleAPICommandBindings;rr.redrawText=function(e){return e=vr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Kr.getComponentMethod("annotations","draw")(e),Kr.getComponentMethod("legend","draw")(e),Kr.getComponentMethod("colorbar","draw")(e),r(rr.previousPromises(e)))},300)})};rr.resize=function(e){e=vr.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||vr.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||vr.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Kr.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};rr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};rr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=vr.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:vq.defaultLine,"pointer-events":"all"}).each(function(){var u=fq.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),o=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&Gse(e,i),o.text(i.text()&&l.text()?" - ":"")}};function Gse(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){rr.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}rr.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=fq.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=rr.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var Yse=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Vse=["year","month","dayMonth","dayMonthYear"];rr.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},o=e._fullData||[],l=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},c;e._transitionData||rr.createTransitionData(e),n._dfltTitle={plot:tu(e,"Click to enter Plot title"),subtitle:tu(e,"Click to enter Plot subtitle"),x:tu(e,"Click to enter X axis title"),y:tu(e,"Click to enter Y axis title"),colorbar:tu(e,"Click to enter Colorscale title"),annotation:tu(e,"new text")},n._traceWord=tu(e,"trace");var v=oq(e,Yse);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,p=a.height;rr.supplyLayoutGlobalDefaults(i,n,v),i.width||(n.width=d),i.height||(n.height=p),rr.sanitizeMargins(n)}else{rr.supplyLayoutGlobalDefaults(i,n,v);var m=!i.width||!i.height,y=n.autosize,x=f.autosizable,_=m&&(y||x);_?rr.plotAutoSize(e,i,n):m&&rr.sanitizeMargins(n),!y&&m&&(i.width=n.width,i.height=n.height)}n._d3locale=Zse(v,n.separators),n._extraFormat=oq(e,Vse),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var w=n._subplots=jse(),b=n._splomAxes={x:{},y:{}},T=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=Wse(o,s),rr.supplyDataDefaults(s,l,i,n);var k=Object.keys(b.x),M=Object.keys(b.y);if(k.length>1&&M.length>1){for(Kr.getComponentMethod("grid","sizeDefaults")(i,n),c=0;c15&&M.length>15&&n.shapes.length===0&&n.images.length===0,rr.linkSubplots(l,n,o,a),rr.cleanPlot(l,n,o,a);var D=!!(a._has&&a._has("cartesian")),z=!!(n._has&&n._has("cartesian")),O=D,H=z;O&&!H?a._bgLayer.remove():H&&!O&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&Ose({_fullLayout:a}),Xse(l,n),iq(n,a),Kr.getComponentMethod("colorscale","crossTraceDefaults")(l,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var Y=n._tracePreGUI,G={},B;for(B in Y)G[B]="old";for(c=0;c0){var f=1-2*i;o=Math.round(f*o),l=Math.round(f*l)}}var c=rr.layoutAttributes.width.min,v=rr.layoutAttributes.height.min;o1,p=!t.height&&Math.abs(a.height-l)>1;(p||d)&&(d&&(a.width=o),p&&(a.height=l)),r._initialAutoSize||(r._initialAutoSize={width:o,height:l}),rr.sanitizeMargins(a)};rr.supplyLayoutModuleDefaults=function(e,r,t,a){var n=Kr.componentsRegistry,i=r._basePlotModules,o,l,s,u=Kr.subplotsRegistry.cartesian;for(o in n)s=n[o],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Kr.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(vr.subplotSort);for(l=0;l1&&(t.l/=y,t.r/=y)}if(v){var x=(t.t+t.b)/v;x>1&&(t.t/=x,t.b/=x)}var _=t.xl!==void 0?t.xl:t.x,w=t.xr!==void 0?t.xr:t.x,b=t.yt!==void 0?t.yt:t.y,T=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:_,size:t.l+m},r:{val:w,size:t.r+m},b:{val:T,size:t.b+m},t:{val:b,size:t.t+m}},p[r]=1}if(!a._replotting)return rr.doAutoMargin(e)}};function $se(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=Dn.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}rr.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),hq(r);var n=r._size,i=r.margin,o={t:0,b:0,l:0,r:0},l=vr.extendFlat({},n),s=i.l,u=i.r,f=i.t,c=i.b,v=r._pushmargin,d=r._pushmarginIds,p=r.minreducedwidth,m=r.minreducedheight;if(i.autoexpand!==!1){for(var y in v)d[y]||delete v[y];var x=e._fullLayout._reservedMargin;for(var _ in x)for(var w in x[_]){var b=x[_][w];o[w]=Math.max(o[w],b)}v.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:c}};for(var T in o){var k=0;for(var M in v)M!=="base"&&ah(v[M][T].size)&&(k=v[M][T].size>k?v[M][T].size:k);var S=Math.max(0,i[T]-k);o[T]=Math.max(0,o[T]-S)}for(var E in v){var P=v[E].l||{},R=v[E].b||{},D=P.val,z=P.size,O=R.val,H=R.size,Y=t-o.r-o.l,G=a-o.t-o.b;for(var B in v){if(ah(z)&&v[B].r){var V=v[B].r.val,X=v[B].r.size;if(V>D){var Z=(z*V+(X-Y)*D)/(V-D),te=(X*(1-D)+(z-Y)*(1-V))/(V-D);Z+te>s+u&&(s=Z,u=te)}}if(ah(H)&&v[B].t){var fe=v[B].t.val,le=v[B].t.size;if(fe>O){var ie=(H*fe+(le-G)*O)/(fe-O),K=(le*(1-O)+(H-G)*(1-fe))/(fe-O);ie+K>c+f&&(c=ie,f=K)}}}}}var he=vr.constrain(t-i.l-i.r,dq,p),oe=vr.constrain(a-i.t-i.b,pq,m),ye=Math.max(0,t-he),ue=Math.max(0,a-oe);if(ye){var de=(s+u)/ye;de>1&&(s/=de,u/=de)}if(ue){var W=(c+f)/ue;W>1&&(c/=W,f/=W)}if(n.l=Math.round(s)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(f)+o.t,n.b=Math.round(c)+o.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(rr.didMarginChange(l,n)||$se(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};rr.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&rr.supplyDefaults(e);var o=n?e._fullData:e.data,l=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(v,d){if(typeof v=="function")return d?"_function_":null;if(vr.isPlainObject(v)){var p={},m;return Object.keys(v).sort().forEach(function(w){if(["_","["].indexOf(w.charAt(0))===-1){if(typeof v[w]=="function"){d&&(p[w]="_function");return}if(t==="keepdata"){if(w.substr(w.length-3)==="src")return}else if(t==="keepstream"){if(m=v[w+"src"],typeof m=="string"&&m.indexOf(":")>0&&!vr.isPlainObject(v.stream))return}else if(t!=="keepall"&&(m=v[w+"src"],typeof m=="string"&&m.indexOf(":")>0))return;p[w]=u(v[w],d)}}),p}var y=Array.isArray(v),x=vr.isTypedArray(v);if((y||x)&&v.dtype&&v.shape){var _=v.bdata;return u({dtype:v.dtype,shape:v.shape,bdata:vr.isArrayBuffer(_)?zse.encode(_):_},d)}return y?v.map(function(w){return u(w,d)}):x?vr.simpleMap(v,vr.identity):vr.isJSDate(v)?vr.ms2DateTimeLocal(+v):v}var f={data:(o||[]).map(function(v){var d=u(v);return r&&delete d.fit,d})};if(!r&&(f.layout=u(l),n)){var c=l._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};rr.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,o=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Kr.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var v=0,d=0;function p(){return v++,function(){d++,!a&&d===v&&l(c)}}t.runFn(p),setTimeout(p())})}function l(c){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Kr.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[rr.previousPromises,s,t.prepareFn,rr.rehover,rr.reselect,o],f=vr.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}rr.doCalcdata=function(e,r){var t=Dn.list(e),a=e._fullData,n=e._fullLayout,i,o,l,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},l=0;l=0;s--)if(T[s].enabled){i._indexToPoints=T[s]._indexToPoints;break}o&&o.calc&&(b=o.calc(e,i))}(!Array.isArray(b)||!b[0])&&(b=[{x:nq,y:nq}]),b[0].t||(b[0].t={}),b[0].trace=i,u[_]=b}}for(sq(t,a,n),l=0;l{"use strict";au.xmlns="http://www.w3.org/2000/xmlns/";au.svg="http://www.w3.org/2000/svg";au.xlink="http://www.w3.org/1999/xlink";au.svgAttrs={xmlns:au.svg,"xmlns:xlink":au.xlink}});var Xa=N((QCe,gq)=>{"use strict";gq.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 Ea=N(ci=>{"use strict";var ta=Sr(),sl=Ee(),rue=sl.strTranslate,jb=ll(),tue=Xa().LINE_SPACING,aue=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;ci.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(aue),i=ta.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function l(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var s=yue(e.node(),a);s&&e.style("pointer-events","all"),ci.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};lue(n[2],f,function(c,v,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){l(),s();return}var m=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});m.node().appendChild(p.node()),v&&v.node()&&p.node().insertBefore(v.node().cloneNode(!0),p.node().firstChild);var y=d.width,x=d.height;p.attr({class:o,height:x,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _=e.node().style.fill||"black",w=p.select("g");w.attr({fill:_,stroke:_});var b=w.node().getBoundingClientRect(),T=b.width,k=b.height;(T>y||k>x)&&(p.style("overflow","hidden"),b=p.node().getBoundingClientRect(),T=b.width,k=b.height);var M=+e.attr("x"),S=+e.attr("y"),E=u||e.node().getBoundingClientRect().height,P=-E/4;if(o[0]==="y")m.attr({transform:"rotate("+[-90,M,S]+")"+rue(-T/2,P-k/2)});else if(o[0]==="l")S=P-k/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)M=0,S=P;else{var R=e.attr("text-anchor");M=M-T*(R==="middle"?.5:R==="end"?1:0),S=S+P-k/2}p.attr({x:M,y:S}),t&&t.call(e,m),s(m)})})):l(),e};var nue=/(<|<|<)/g,iue=/(>|>|>)/g;function oue(e){return e.replace(nue,"\\lt ").replace(iue,"\\gt ")}var bq=[["$","$"],["\\(","\\)"]];function lue(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){sl.warn("No MathJax version:",MathJax.version);return}var n,i,o,l,s=function(){return i=sl.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:bq},displayAlign:"left"})},u=function(){i=sl.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=bq},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},v=function(){var _="math-output-"+sl.randstr({},64);l=ta.select("body").append("div").attr({id:_}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(oue(e));var w=l.node();return a===2?MathJax.Hub.Typeset(w):MathJax.typeset([w])},d=function(){var _=l.select(a===2?".MathJax_SVG":".MathJax"),w=!_.empty()&&l.select("svg").node();if(!w)sl.log("There was an error in the tex syntax.",e),t();else{var b=w.getBoundingClientRect(),T;a===2?T=ta.select("body").select("#MathJax_SVG_glyphs"):T=_.select("defs"),t(_,T,b)}l.remove()},p=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},m=function(){n!=="svg"&&(MathJax.config.startup.output=n)},y=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(i)},x=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,v,d,p,y):a===3&&(u(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){v(),d(),m(),x()}))}var Tq={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"},sue={sub:"0.3em",sup:"-0.6em"},uue={sub:"-0.21em",sup:"0.42em"},xq="\u200B",_q=["http:","https:","mailto:","",void 0,":"],Aq=ci.NEWLINES=/(\r\n?|\n)/g,Xb=/(<[^<>]*>)/,Jb=/<(\/?)([^ >]*)(\s+(.*))?>/i,fue=//i;ci.BR_TAG_ALL=//gi;var Mq=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,kq=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,Sq=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,cue=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function nu(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&Jp(a)}var vue=/(^|;)\s*color:/;ci.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,o=e.split(Xb),l=[],s="",u=0,f=0;fi?l.push(c.substr(0,m-i)+n):l.push(c.substr(0,m));break}s=""}}return l.join("")};var hue={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},due=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Jp(e){return e.replace(due,function(r,t){var a;return t.charAt(0)==="#"?a=pue(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=hue[t],a||r})}ci.convertEntities=Jp;function pue(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function yue(e,r){r=r.replace(Aq," ");var t=!1,a=[],n,i=-1;function o(){i++;var k=document.createElementNS(jb.svg,"tspan");ta.select(k).attr({class:"line",dy:i*tue+"em"}),e.appendChild(k),n=k;var M=a;if(a=[{node:k}],M.length>1)for(var S=1;S.",r);return}var M=a.pop();k!==M.type&&sl.log("Start tag <"+M.type+"> doesnt match end tag <"+k+">. Pretending it did match.",r),n=a[a.length-1].node}var f=fue.test(r);f?o():(n=e,a=[{node:e}]);for(var c=r.split(Xb),v=0;v{"use strict";var mue=Sr(),Kp=Sn(),ih=Pr(),$p=Ee(),Lq=Tr(),gue=Vs().isValid;function bue(e,r,t){var a=r?$p.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if($p.isArrayOrTypedArray(n)){for(var o=0;o=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function Fq(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),o=0;o{"use strict";var zq=pb(),_ue=zq.FORMAT_LINK,wue=zq.DATE_FORMAT_LINK;function Tue(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?$b:Iq)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function $b(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+_ue+"."].join(" ")}function Iq(e,r){return $b(e,r)+[" And for dates see: "+wue+".","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(" ")}Oq.exports={axisHoverFormat:Tue,descriptionOnlyNumbers:$b,descriptionWithDates:Iq}});var hi=N((aEe,tL)=>{"use strict";var Bq=fa(),Hf=li(),rL=si().dash,Qb=bt().extendFlat,Hq=_t().templatedArray,Uq=Qi().descriptionWithDates,Aue=Ft().ONEDAY,Mo=Ca(),Mue=Mo.HOUR_PATTERN,kue=Mo.WEEKDAY_PATTERN,Kb={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},Sue=Qb({},Kb,{values:Kb.values.slice().concat(["sync"])});function Gq(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Yq={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Vq={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Wq={valType:"data_array",editType:"ticks"},jq={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Zq(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function Xq(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var Jq={valType:"color",dflt:Hf.defaultLine,editType:"ticks"},$q={valType:"color",dflt:Hf.lightLine,editType:"ticks"};function Kq(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var Qq=Qb({},rL,{editType:"ticks"}),eL={valType:"boolean",editType:"ticks"};tL.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Hf.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Bq({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Mo.idRegex.x.toString(),Mo.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:[Mo.idRegex.x.toString(),Mo.idRegex.y.toString()],editType:"calc"},rangebreaks:Hq("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:[kue,Mue,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Aue},editType:"calc"}),tickmode:Sue,nticks:Gq(),tick0:Yq,dtick:Vq,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Wq,ticktext:{valType:"data_array",editType:"ticks"},ticks:jq,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:Zq(),tickwidth:Xq(),tickcolor:Jq,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:Qb({},rL,{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:Bq({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Uq("tick label")},tickformatstops:Hq("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:Uq("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Hf.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:eL,gridcolor:$q,gridwidth:Kq(),griddash:Qq,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Hf.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Hf.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Mo.idRegex.x.toString(),Mo.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Mo.idRegex.x.toString(),Mo.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Kb,nticks:Gq("minor"),tick0:Yq,dtick:Vq,tickvals:Wq,ticks:jq,ticklen:Zq("minor"),tickwidth:Xq("minor"),tickcolor:Jq,gridcolor:$q,gridwidth:Kq("minor"),griddash:Qq,showgrid:eL,editType:"ticks"},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 Qp=N((nEe,iL)=>{"use strict";var Lt=hi(),aL=fa(),nL=bt().extendFlat,que=Xi().overrideAll;iL.exports=que({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:Lt.linecolor,outlinewidth:Lt.linewidth,bordercolor:Lt.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Lt.minor.tickmode,nticks:Lt.nticks,tick0:Lt.tick0,dtick:Lt.dtick,tickvals:Lt.tickvals,ticktext:Lt.ticktext,ticks:nL({},Lt.ticks,{dflt:""}),ticklabeloverflow:nL({},Lt.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:Lt.ticklen,tickwidth:Lt.tickwidth,tickcolor:Lt.tickcolor,ticklabelstep:Lt.ticklabelstep,showticklabels:Lt.showticklabels,labelalias:Lt.labelalias,tickfont:aL({}),tickangle:Lt.tickangle,tickformat:Lt.tickformat,tickformatstops:Lt.tickformatstops,tickprefix:Lt.tickprefix,showtickprefix:Lt.showtickprefix,ticksuffix:Lt.ticksuffix,showticksuffix:Lt.showticksuffix,separatethousands:Lt.separatethousands,exponentformat:Lt.exponentformat,minexponent:Lt.minexponent,showexponent:Lt.showexponent,title:{text:{valType:"string"},font:aL({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var ko=N((oEe,lL)=>{"use strict";var Lue=Qp(),Cue=Af().counter,Eue=Tb(),oL=Vs().scales,iEe=Eue(oL);function e1(e){return"`"+e+"`"}lL.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",o="showScaleDflt"in t?t.showScaleDflt:a==="z",l=typeof t.colorscaleDflt=="string"?oL[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,c;"colorAttr"in t?(f=t.colorAttr,c=t.colorAttr):(f={z:"z",c:"color"}[a],c="in "+e1(u+f));var v=n?" Has an effect only if "+c+" is set to a numerical array.":"",d=a+"auto",p=a+"min",m=a+"max",y=a+"mid",x=e1(u+d),_=e1(u+p),w=e1(u+m),b=_+" and "+w,T={};T[p]=T[m]=void 0;var k={};k[d]=!1;var M={};return f==="color"&&(M.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(M.color.anim=!0)),M[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},M[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:k},M[m]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:k},M[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},M.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},M.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},M.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(M.showscale={valType:"boolean",dflt:o,editType:"calc"},M.colorbar=Lue),t.noColorAxis||(M.coloraxis={valType:"subplotid",regex:Cue("coloraxis"),dflt:null,editType:"calc"}),M}});var rx=N((lEe,sL)=>{"use strict";var Due=bt().extendFlat,Pue=ko(),ex=Vs().scales;sL.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:ex.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:ex.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:ex.RdBu,editType:"calc"}},coloraxis:Due({_isSubplotObj:!0,editType:"calc"},Pue("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var tx=N((sEe,uL)=>{"use strict";var Rue=Ee();uL.exports=function(r){return Rue.isPlainObject(r.colorbar)}});var ix=N(nx=>{"use strict";var ax=Pr(),fL=Ee(),cL=Ft(),Fue=cL.ONEDAY,Nue=cL.ONEWEEK;nx.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?Fue:1;if(!e)return i;if(ax(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var o=e.charAt(0),l=e.substr(1);return l=ax(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||t&&o==="L"||t&&o==="D"&&(l===1||l===2))?i:e};nx.tick0=function(e,r,t,a){if(r==="date")return fL.cleanDate(e,fL.dateTick0(t,a%Nue===0?1:0));if(!(a==="D1"||a==="D2"))return ax(e)?Number(e):0}});var r1=N((fEe,hL)=>{"use strict";var vL=ix(),zue=Ee().isArrayOrTypedArray,Iue=Wn().isTypedArraySpec,Oue=Wn().decodeTypedArraySpec;hL.exports=function(r,t,a,n,i){i||(i={});var o=i.isMinor,l=o?r.minor||{}:r,s=o?t.minor:t,u=o?"minor.":"";function f(_){var w=l[_];return Iue(w)&&(w=Oue(w)),w!==void 0?w:(s._template||{})[_]}var c=f("tick0"),v=f("dtick"),d=f("tickvals"),p=zue(d)?"array":v?"linear":"auto",m=a(u+"tickmode",p);if(m==="auto"||m==="sync")a(u+"nticks");else if(m==="linear"){var y=s.dtick=vL.dtick(v,n);s.tick0=vL.tick0(c,n,t.calendar,y)}else if(n!=="multicategory"){var x=a(u+"tickvals");x===void 0?s.tickmode="auto":o||a("ticktext")}}});var t1=N((cEe,pL)=>{"use strict";var ox=Ee(),dL=hi();pL.exports=function(r,t,a,n){var i=n.isMinor,o=i?r.minor||{}:r,l=i?t.minor:t,s=i?dL.minor:dL,u=i?"minor.":"",f=ox.coerce2(o,l,s,"ticklen",i?(t.ticklen||5)*.6:void 0),c=ox.coerce2(o,l,s,"tickwidth",i?t.tickwidth||1:void 0),v=ox.coerce2(o,l,s,"tickcolor",(i?t.tickcolor:void 0)||l.color),d=a(u+"ticks",!i&&n.outerTicks||f||c||v?"outside":"");d||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var lx=N((vEe,yL)=>{"use strict";yL.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var eo=N((hEe,mL)=>{"use strict";var a1=Ee(),Bue=_t();mL.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",o=t[n],l=a1.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=Bue.arrayTemplater(t,n,i),f,c;for(f=0;f{"use strict";var sx=Ee(),Hue=Tr().contrast,gL=hi(),Uue=lx(),Gue=eo();bL.exports=function(r,t,a,n,i){i||(i={});var o=a("labelalias");sx.isPlainObject(o)||delete t.labelalias;var l=Uue(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,c=t.ticklabelposition||"",v=c.indexOf("inside")!==-1?Hue(i.bgColor):f&&f!==gL.color.dflt?f:u.color;if(sx.coerceFont(a,"tickfont",u,{overrideDflt:{color:v}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var p=a("tickformat");Gue(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Yue}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!p&&n!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function Yue(e,r){function t(n,i){return sx.coerce(e,r,gL.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var i1=N((pEe,xL)=>{"use strict";var Vue=lx();xL.exports=function(r,t,a,n,i){i||(i={});var o=i.tickSuffixDflt,l=Vue(r),s=a("tickprefix");s&&a("showtickprefix",l);var u=a("ticksuffix",o);u&&a("showticksuffix",l)}});var ux=N((yEe,_L)=>{"use strict";var Xl=Ee(),Wue=_t(),jue=r1(),Zue=t1(),Xue=n1(),Jue=i1(),$ue=Qp();_L.exports=function(r,t,a){var n=Wue.newContainer(t,"colorbar"),i=r.colorbar||{};function o(R,D){return Xl.coerce(i,n,$ue,R,D)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,u=a.height-l.t-l.b,f=o("orientation"),c=f==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(c?s:u):30);var d=o("lenmode");o("len",d==="fraction"?1:c?u:s);var p=o("yref"),m=o("xref"),y=p==="paper",x=m==="paper",_,w,b,T="left";c?(b="middle",T=x?"left":"right",_=x?1.02:1,w=.5):(b=y?"bottom":"top",T="center",_=.5,w=y?1.02:1),Xl.coerce(i,n,{x:{valType:"number",min:x?-2:0,max:x?3:1,dflt:_}},"x"),Xl.coerce(i,n,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:w}},"y"),o("xanchor",T),o("xpad"),o("yanchor",b),o("ypad"),Xl.noneOrAll(i,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var k=Xl.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":"hide past div"),jue(i,n,o,"linear");var M=a.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};k.indexOf("inside")!==-1&&(S.bgColor="black"),Jue(i,n,o,"linear",S),Xue(i,n,o,"linear",S),Zue(i,n,o,"linear",S),o("title.text",a._dfltTitle.colorbar);var E=n.showticklabels?n.tickfont:M,P=Xl.extendFlat({},M,{family:E.family,size:Xl.bigFont(E.size)});Xl.coerceFont(o,"title.font",P),o("title.side",c?"top":"right")}});var ul=N((mEe,AL)=>{"use strict";var wL=Pr(),cx=Ee(),Kue=tx(),Que=ux(),TL=Vs().isValid,efe=gr().traceIs;function fx(e,r){var t=r.slice(0,r.length-1);return r?cx.nestedProperty(e,t).get()||{}:e}AL.exports=function e(r,t,a,n,i){var o=i.prefix,l=i.cLetter,s="_module"in t,u=fx(r,o),f=fx(t,o),c=fx(t._template||{},o)||{},v=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},p=n(o+"coloraxis");if(p){var m=efe(t,"contour")&&cx.nestedProperty(t,"contours.coloring").get()||"heatmap",y=d[p];y?(y[2].push(v),y[0]!==m&&(y[0]=!1,cx.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[m,t,[v]];return}}var x=u[l+"min"],_=u[l+"max"],w=wL(x)&&wL(_)&&x<_,b=n(o+l+"auto",!w);b?n(o+l+"mid"):(n(o+l+"min"),n(o+l+"max"));var T=u.colorscale,k=c.colorscale,M;if(T!==void 0&&(M=!TL(T)),k!==void 0&&(M=!TL(k)),n(o+"autocolorscale",M),n(o+"colorscale"),n(o+"reversescale"),o!=="marker.line."){var S;o&&s&&(S=Kue(u));var E=n(o+"showscale",S);E&&(o&&c&&(f._template=c),Que(u,f,a))}}});var qL=N((gEe,SL)=>{"use strict";var ML=Ee(),rfe=_t(),kL=rx(),tfe=ul();SL.exports=function(r,t){function a(c,v){return ML.coerce(r,t,kL,c,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,o;function l(c,v){return ML.coerce(i,o,kL.coloraxis,c,v)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},o=rfe.newContainer(t,s,"coloraxis"),o._name=s,tfe(i,o,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var afe=Ee(),nfe=vi().hasColorscale,ife=vi().extractOpts;LL.exports=function(r,t){function a(f,c){var v=f["_"+c];v!==void 0&&(f[c]=v)}function n(f,c){var v=c.container?afe.nestedProperty(f,c.container).get():f;if(v)if(v.coloraxis)v._colorAx=t[v.coloraxis];else{var d=ife(v),p=d.auto;(p||d.min===void 0)&&a(v,c.min),(p||d.max===void 0)&&a(v,c.max),d.autocolorscale&&a(v,"colorscale")}}for(var i=0;i{"use strict";var EL=Pr(),vx=Ee(),ofe=vi().extractOpts;DL.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,o=a.containerStr,l=o?vx.nestedProperty(t,o).get():t,s=ofe(l),u=s.auto!==!1,f=s.min,c=s.max,v=s.mid,d=function(){return vx.aggNums(Math.min,null,i)},p=function(){return vx.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(l._colorAx&&EL(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():u&&(l._colorAx&&EL(c)?c=Math.max(c,p()):c=p()),u&&v!==void 0&&(c-v>v-f?f=v-(c-v):c-v=0?m=n.colorscale.sequential:m=n.colorscale.sequentialminus,s._sync("colorscale",m)}}});var So=N((_Ee,PL)=>{"use strict";var o1=Vs(),Uf=vi();PL.exports={moduleType:"component",name:"colorscale",attributes:ko(),layoutAttributes:rx(),supplyLayoutDefaults:qL(),handleDefaults:ul(),crossTraceDefaults:CL(),calc:oh(),scales:o1.scales,defaultScale:o1.defaultScale,getScale:o1.get,isValidScale:o1.isValid,hasColorscale:Uf.hasColorscale,extractOpts:Uf.extractOpts,extractScale:Uf.extractScale,flipScale:Uf.flipScale,makeColorScaleFunc:Uf.makeColorScaleFunc,makeColorScaleFuncFromTrace:Uf.makeColorScaleFuncFromTrace}});var Pn=N((wEe,FL)=>{"use strict";var RL=Ee(),lfe=Wn().isTypedArraySpec;FL.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 r=e.marker;return RL.isPlainObject(r)&&(RL.isArrayOrTypedArray(r.size)||lfe(r.size))}}});var zL=N((TEe,NL)=>{"use strict";var sfe=Pr();NL.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/n)}:function(l){return l/n};return function(l){var s=o(l/t);return sfe(s)&&s>0?Math.max(s,i):0}}});var qo=N(Ja=>{"use strict";var IL=Ee();Ja.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Ja.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{HL.exports=hfe;var hx={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},vfe=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function hfe(e){var r=[];return e.replace(vfe,function(t,a,n){var i=a.toLowerCase();for(n=pfe(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==hx[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var yfe=dx(),Je=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},qr="M0,0Z",UL=Math.sqrt(2),Jl=Math.sqrt(3),px=Math.PI,yx=Math.cos,mx=Math.sin;jL.exports={circle:{n:0,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Cr(r,t,n):n}},square:{n:1,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.4,2),n=Je(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.8/UL,2),n="l"+a+","+a,i="l"+a+",-"+a,o="l-"+a+",-"+a,l="l-"+a+","+a;return Cr(r,t,"M0,"+a+n+i+o+i+o+l+o+l+n+l+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2/Jl,2),n=Je(e/2,2),i=Je(e,2);return Cr(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.6,2),n=Je(e*1.2,2);return Cr(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.951,2),n=Je(e*.588,2),i=Je(-e,2),o=Je(e*-.309,2),l=Je(e*.809,2);return Cr(r,t,"M"+a+","+o+"L"+n+","+l+"H-"+n+"L-"+a+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e/2,2),i=Je(e*Jl/2,2);return Cr(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e/2,2),i=Je(e*Jl/2,2);return Cr(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.924,2),n=Je(e*.383,2);return Cr(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(Lr(r))return qr;var a=e*1.4,n=Je(a*.225,2),i=Je(a*.951,2),o=Je(a*.363,2),l=Je(a*.588,2),s=Je(-a,2),u=Je(a*-.309,2),f=Je(a*.118,2),c=Je(a*.809,2),v=Je(a*.382,2);return Cr(r,t,"M"+n+","+u+"H"+i+"L"+o+","+f+"L"+l+","+c+"L0,"+v+"L-"+l+","+c+"L-"+o+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.66,2),n=Je(e*.38,2),i=Je(e*.76,2);return Cr(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*Jl*.8,2),n=Je(e*.8,2),i=Je(e*1.6,2),o=Je(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Cr(r,t,"M-"+a+","+n+l+a+","+n+l+"0,-"+i+l+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*Jl*.8,2),n=Je(e*.8,2),i=Je(e*1.6,2),o=Je(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Cr(r,t,"M"+a+",-"+n+l+"-"+a+",-"+n+l+"0,"+i+l+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.1,2),n=Je(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2),n=Je(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Cr(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*.7,2),n=Je(e*1.4,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2),n=Je(e*.7,2);return Cr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e/UL,2);return Cr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.3,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.3,2),n=Je(e*.65,2);return Cr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*.85,2);return Cr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e/2,2),n=Je(e,2);return Cr(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.2,2),n=Je(e*1.6,2),i=Je(e*.8,2);return Cr(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2);return Cr(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*1.4,2);return Cr(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2);return Cr(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e,2),n=Je(e*2,2);return Cr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(Lr(r))return qr;var a=Je(e*2,2),n=Je(e,2);return Cr(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(Lr(r))return qr;var a=px/2.5,n=2*e*yx(a),i=2*e*mx(a);return Cr(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(Lr(r))return qr;var a=px/4,n=2*e*yx(a),i=2*e*mx(a);return Cr(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function Lr(e){return e===null}var GL,YL,VL,WL;function Cr(e,r,t){if((!e||e%360===0)&&!r)return t;if(VL===e&&WL===r&&GL===t)return YL;VL=e,WL=r,GL=t;function a(y,x){var _=yx(y),w=mx(y),b=x[0],T=x[1]+(r||0);return[b*_-T*w,b*w+T*_]}for(var n=e/180*px,i=0,o=0,l=yfe(t),s="",u=0;u{"use strict";var wa=Sr(),mt=Ee(),mfe=mt.numberFormat,su=Pr(),Tx=Sn(),s1=gr(),Ha=Tr(),gfe=So(),sh=mt.strTranslate,u1=Ea(),bfe=ll(),xfe=Xa(),_fe=xfe.LINE_SPACING,nC=mp().DESELECTDIM,wfe=Pn(),Tfe=zL(),Afe=qo().appendArrayPointValue,Ke=dC.exports={};Ke.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,o=r.size,l=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(Ha.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",gx(kfe(f))),s&&e.style("text-shadow",s==="auto"?u1.makeTextShadow(Ha.contrast(i)):gx(s)),u&&e.style("text-decoration-line",gx(Sfe(u)))};function gx(e){return e==="none"?void 0:e}var Mfe={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function kfe(e){return Mfe[e]}function Sfe(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ke.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Ke.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Ke.setRect=function(e,r,t,a,n){e.call(Ke.setPosition,r,t).call(Ke.setSize,a,n)};Ke.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(su(n)&&su(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",sh(n,i));else return!1;return!0};Ke.translatePoints=function(e,r,t){e.each(function(a){var n=wa.select(this);Ke.translatePoint(a,n,r,t)})};Ke.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Ke.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,o=i.xcalendar,l=i.ycalendar,s=s1.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Ke.hideOutsideRangePoint(u,wa.select(this),t,a,o,l)})})}};Ke.crispRound=function(e,r,t){return!r||!su(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Ke.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=n||i.dash||"";Ha.stroke(r,a||i.color),Ke.dashLine(r,l,o)};Ke.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";wa.select(this).call(Ha.stroke,t||i.color).call(Ke.dashLine,l,o)})};Ke.dashLine=function(e,r,t){t=+t||0,r=Ke.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Ke.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function iC(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,o=n&&Ke.getPatternAttr(n.shape,0,"");if(o){var l=Ke.getPatternAttr(n.bgcolor,0,null),s=Ke.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Ke.getPatternAttr(n.size,0,8),c=Ke.getPatternAttr(n.solidity,0,.3),v=r.uid;Ke.pattern(e,"point",t,v,o,f,c,void 0,n.fillmode,l,s,u)}else if(i&&i.type!=="none"){var d=i.type,p="scatterfill-"+r.uid;if(a&&(p="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var m,y;d==="horizontal"?(m={x:i.start,y:0},y={x:i.stop,y:0}):d==="vertical"&&(m={x:0,y:i.start},y={x:0,y:i.stop}),m.x=r._xA.c2p(m.x===void 0?r._extremes.x.min[0].val:m.x,!0),m.y=r._yA.c2p(m.y===void 0?r._extremes.y.min[0].val:m.y,!0),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.max[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.max[0].val:y.y,!0),e.call(sC,t,p,"linear",i.colorscale,"fill",m,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Ke.gradient,t,p,d,i.colorscale,"fill")}else r.fillcolor&&e.call(Ha.fill,r.fillcolor)}Ke.singleFillStyle=function(e,r){var t=wa.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};iC(e,n,r,!1)};Ke.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=wa.select(this);a[0].trace&&iC(n,a[0].trace,r,t)})};var XL=ZL();Ke.symbolNames=[];Ke.symbolFuncs=[];Ke.symbolBackOffs=[];Ke.symbolNeedLines={};Ke.symbolNoDot={};Ke.symbolNoFill={};Ke.symbolList=[];Object.keys(XL).forEach(function(e){var r=XL[e],t=r.n;Ke.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Ke.symbolNames[t]=e,Ke.symbolFuncs[t]=r.f,Ke.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Ke.symbolNeedLines[t]=!0),r.noDot?Ke.symbolNoDot[t]=!0:Ke.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Ke.symbolNoFill[t]=!0)});var qfe=Ke.symbolNames.length,Lfe="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ke.symbolNumber=function(e){if(su(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Ke.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=qfe||e>=400?0:Math.floor(Math.max(e,0))};function oC(e,r,t,a){var n=e%100;return Ke.symbolFuncs[n](r,t,a)+(e>=200?Lfe:"")}var JL=mfe("~f"),lC={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}};Ke.gradient=function(e,r,t,a,n,i){var o=lC[a];return sC(e,r,t,o.type,n,i,o.start,o.stop,!1,o.reversed)};function sC(e,r,t,a,n,i,o,l,s,u){var f=n.length,c;a==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(c={node:"radialGradient",reversed:u});for(var v=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||o.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Ke.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var f=kx(e,t),c=Mx(e,t);r.attr("d",oC(u,s,f,c))}var v=!1,d,p,m;if(e.so)m=l.outlierwidth,p=l.outliercolor,d=o.outliercolor;else{var y=(l||{}).width;m=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=a.lineScale(e.mlc):mt.isArrayOrTypedArray(l.color)?p=Ha.defaultLine:p=l.color,mt.isArrayOrTypedArray(o.color)&&(d=Ha.defaultLine,v=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(Ha.stroke,d).style({"stroke-width":(m||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:m)+"px");var x=o.gradient,_=e.mgt;_?v=!0:_=x&&x.type,mt.isArrayOrTypedArray(_)&&(_=_[0],lC[_]||(_=0));var w=o.pattern,b=w&&Ke.getPatternAttr(w.shape,e.i,"");if(_&&_!=="none"){var T=e.mgc;T?v=!0:T=x.color;var k=t.uid;v&&(k+="-"+e.i),Ke.gradient(r,n,k,_,[[0,T],[1,d]],"fill")}else if(b){var M=!1,S=w.fgcolor;!S&&i&&i.color&&(S=i.color,M=!0);var E=Ke.getPatternAttr(S,e.i,i&&i.color||null),P=Ke.getPatternAttr(w.bgcolor,e.i,null),R=w.fgopacity,D=Ke.getPatternAttr(w.size,e.i,8),z=Ke.getPatternAttr(w.solidity,e.i,.3);M=M||e.mcc||mt.isArrayOrTypedArray(w.shape)||mt.isArrayOrTypedArray(w.bgcolor)||mt.isArrayOrTypedArray(w.fgcolor)||mt.isArrayOrTypedArray(w.size)||mt.isArrayOrTypedArray(w.solidity);var O=t.uid;M&&(O+="-"+e.i),Ke.pattern(r,"point",n,O,b,D,z,e.mcc,w.fillmode,P,E,R)}else mt.isArrayOrTypedArray(d)?Ha.fill(r,d[e.i]):Ha.fill(r,d);m&&Ha.stroke(r,p)}};Ke.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Ke.tryColorscale(t,""),r.lineScale=Ke.tryColorscale(t,"line"),s1.traceIs(e,"symbols")&&(r.ms2mrc=wfe.isBubble(e)?Tfe(e):function(){return(t.size||6)/2}),e.selectedpoints&&mt.extendFlat(r,Ke.makeSelectedPointStyleFns(e)),r};Ke.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},o=a.marker||{},l=n.opacity,s=i.opacity,u=o.opacity,f=s!==void 0,c=u!==void 0;(mt.isArrayOrTypedArray(l)||f||c)&&(r.selectedOpacityFn=function(b){var T=b.mo===void 0?n.opacity:b.mo;return b.selected?f?s:T:c?u:nC*T});var v=n.color,d=i.color,p=o.color;(d||p)&&(r.selectedColorFn=function(b){var T=b.mcc||v;return b.selected?d||T:p||T});var m=n.size,y=i.size,x=o.size,_=y!==void 0,w=x!==void 0;return s1.traceIs(e,"symbols")&&(_||w)&&(r.selectedSizeFn=function(b){var T=b.mrc||m/2;return b.selected?_?y/2:T:w?x/2:T}),r};Ke.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},o=a.textfont||{},l=n.color,s=i.color,u=o.color;return r.selectedTextColorFn=function(f){var c=f.tc||l;return f.selected?s||c:u||(s?c:Ha.addOpacity(c,nC))},r};Ke.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,o){i.style("opacity",t.selectedOpacityFn(o))}),t.selectedColorFn&&n.push(function(i,o){Ha.fill(i,t.selectedColorFn(o))}),t.selectedSizeFn&&n.push(function(i,o){var l=o.mx||a.symbol||0,s=t.selectedSizeFn(o);i.attr("d",oC(Ke.symbolNumber(l),s,kx(o,r),Mx(o,r))),o.mrc2=s}),n.length&&e.each(function(i){for(var o=wa.select(this),l=0;l0?t:0}Ke.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Ke.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,o=t._fullLayout;e.each(function(l){var s=wa.select(this),u=i?mt.extractOption(l,r,"txt","texttemplate"):mt.extractOption(l,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,c=f?f(l,r,o):{},v={};Afe(v,r,l.i);var d=r._meta||{};u=mt.texttemplateString(u,c,o._d3locale,v,l,d)}var p=l.tp||r.textposition,m=fC(l,r),y=a?a(l):l.tc||r.textfont.color;s.call(Ke.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:m,color:y}).text(u).call(u1.convertToTspans,t).call(uC,p,m,l.mrc)})}};Ke.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedTextStyleFns(r);e.each(function(a){var n=wa.select(this),i=t.selectedTextColorFn(a),o=a.tp||r.textposition,l=fC(a,r);Ha.fill(n,i);var s=s1.traceIs(r,"bar-like");uC(n,o,l,a.mrc2||a.mrc,s)})}};var $L=.5;Ke.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||b>=f&&b<=s)&&(T<=c&&T>=u||T>=c&&T<=u)&&(e=[b,T])}return e}Ke.applyBackoff=hC;Ke.makeTester=function(){var e=mt.ensureSingleById(wa.select("body"),"svg","js-plotly-tester",function(t){t.attr(bfe.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=mt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ke.tester=e,Ke.testref=r};Ke.savedBBoxes={};var xx=0,Dfe=1e4;Ke.bBox=function(e,r,t){t||(t=KL(e));var a;if(t){if(a=Ke.savedBBoxes[t],a)return mt.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=KL(n),t){var i=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,l=n.getAttribute("transform");if(!l){var s=Ke.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),o&&(s.top+=o,s.bottom+=o),s}if(t+="~"+i+"~"+o+"~"+l,a=Ke.savedBBoxes[t],a)return mt.extendFlat({},a)}}var u,f;r?u=e:(f=Ke.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),wa.select(u).attr("transform",null).call(u1.positionText,0,0);var c=u.getBoundingClientRect(),v=Ke.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:c.height,width:c.width,left:c.left-v.left,top:c.top-v.top,right:c.right-v.left,bottom:c.bottom-v.top};return xx>=Dfe&&(Ke.savedBBoxes={},xx=0),t&&(Ke.savedBBoxes[t]=d),xx++,mt.extendFlat({},d)};function KL(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ke.setClipUrl=function(e,r,t){e.attr("clip-path",Ax(r,t))};function Ax(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Ke.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Ke.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||0,t=t||0,o=o.replace(a,"").trim(),o+=sh(r,t),o=o.trim(),e[i]("transform",o),o};Ke.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Ke.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||1,t=t||1,o=o.replace(a,"").trim(),o+="scale("+r+","+t+")",o=o.trim(),e[i]("transform",o),o};var Pfe=/\s*sc.*/;Ke.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(Pfe,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var Rfe=/translate\([^)]*\)\s*$/;Ke.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=wa.select(this),i=n.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(Rfe);r===1&&t===1?a=[]:a=[sh(o,l),"scale("+r+","+t+")",sh(-o,-l)],s&&a.push(s),n.attr("transform",a.join(""))}})};function Mx(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Ke.getMarkerStandoff=Mx;var lh=Math.atan2,iu=Math.cos,Yf=Math.sin;function QL(e,r){var t=r[0],a=r[1];return[t*iu(e)-a*Yf(e),t*Yf(e)+a*iu(e)]}var eC,rC,tC,aC,_x,wx;function kx(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||mt.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var o=r._geo.project(e.lonlat);a=o[0],n=o[1]}else{var l=r._xA,s=r._yA;if(l&&s)a=l.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],c=r._geo.project([u,f+1e-5]),v=r._geo.project([u+1e-5,f]),d=lh(v[1]-n,v[0]-a),p=lh(c[1]-n,c[0]-a),m;if(i==="north")m=t/180*Math.PI;else if(i==="previous"){var y=u/180*Math.PI,x=f/180*Math.PI,_=eC/180*Math.PI,w=rC/180*Math.PI,b=_-y,T=iu(w)*Yf(b),k=Yf(w)*iu(x)-iu(w)*Yf(x)*iu(b);m=-lh(T,k)-Math.PI,eC=u,rC=f}var M=QL(d,[iu(m),0]),S=QL(p,[Yf(m),0]);t=lh(M[1]+S[1],M[0]+S[0])/Math.PI*180,i==="previous"&&!(wx===r.uid&&e.i===_x+1)&&(t=null)}if(i==="previous"&&!r._geo)if(wx===r.uid&&e.i===_x+1&&su(a)&&su(n)){var E=a-tC,P=n-aC,R=r.line&&r.line.shape||"",D=R.slice(R.length-1);D==="h"&&(P=0),D==="v"&&(E=0),t+=lh(P,E)/Math.PI*180+90}else t=null}return tC=a,aC=n,_x=e.i,wx=r.uid,t}Ke.getMarkerAngle=kx});var jf=N((qEe,gC)=>{"use strict";var Vf=Sr(),Ffe=Pr(),Nfe=ea(),Sx=gr(),uu=Ee(),pC=uu.strTranslate,f1=jr(),c1=Tr(),Wf=Ea(),yC=mp(),zfe=Xa().OPPOSITE_SIDE,mC=/ [XY][0-9]* /,qx=1.6,Lx=1.6;function Ife(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,o=t.placeholder,l=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,c=t.containerGroup,v=1,d=n.title,p=(d&&d.text?d.text:"").trim(),m=!1,y=d&&d.font?d.font:{},x=y.family,_=y.size,w=y.color,b=y.weight,T=y.style,k=y.variant,M=y.textcase,S=y.lineposition,E=y.shadow,P=t.subtitlePropName,R=!!P,D=t.subtitlePlaceholder,z=(n.title||{}).subtitle||{text:"",font:{}},O=z.text.trim(),H=!1,Y=1,G=z.font,B=G.family,V=G.size,X=G.color,Z=G.weight,te=G.style,fe=G.variant,le=G.textcase,ie=G.lineposition,K=G.shadow,he;i==="title.text"?he="titleText":i.indexOf("axis")!==-1?he="axisTitleText":i.indexOf("colorbar"!==-1)&&(he="colorbarTitleText");var oe=e._context.edits[he];function ye(Be,ze){return Be===void 0||ze===void 0?!1:Be.replace(mC," % ")===ze.replace(mC," % ")}p===""?v=0:ye(p,o)&&(oe||(p=""),v=.2,m=!0),R&&(O===""?Y=0:ye(O,D)&&(oe||(O=""),Y=.2,H=!0)),t._meta?p=uu.templateString(p,t._meta):a._meta&&(p=uu.templateString(p,a._meta));var ue=p||O||oe,de;c||(c=uu.ensureSingle(a._infolayer,"g","g-"+r),de=a._hColorbarMoveTitle);var W=c.selectAll("text."+r).data(ue?[0]:[]);W.enter().append("text"),W.text(p).attr("class",r),W.exit().remove();var Q=null,j=r+"-subtitle",pe=O||oe;if(R&&pe&&(Q=c.selectAll("text."+j).data(pe?[0]:[]),Q.enter().append("text"),Q.text(O).attr("class",j),Q.exit().remove()),!ue)return c;function me(Be,ze){uu.syncOrAsync([we,Ne],{title:Be,subtitle:ze})}function we(Be){var ze=Be.title,Pe=Be.subtitle,Xe;!f&&de&&(f={}),f?(Xe="",f.rotate&&(Xe+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||de)&&(Xe+=pC(0,(f.offset||0)-(de||0)))):Xe=null,ze.attr("transform",Xe);function Ue(Le){if(Le){var Ce=Vf.select(Le.node().parentNode).select("."+j);if(!Ce.empty()){var Ge=Le.node().getBBox();if(Ge.height){var Ze=Ge.y+Ge.height+qx*V;Ce.attr("y",Ze)}}}}if(ze.style("opacity",v*c1.opacity(w)).call(f1.font,{color:c1.rgb(w),size:Vf.round(_,2),family:x,weight:b,style:T,variant:k,textcase:M,shadow:E,lineposition:S}).attr(u).call(Wf.convertToTspans,e,Ue),Pe){var se=c.select("."+r+"-math-group"),Te=ze.node().getBBox(),Se=se.node()?se.node().getBBox():void 0,ir=Se?Se.y+Se.height+qx*V:Te.y+Te.height+Lx*V,Qe=uu.extendFlat({},u,{y:ir});Pe.attr("transform",Xe),Pe.style("opacity",Y*c1.opacity(X)).call(f1.font,{color:c1.rgb(X),size:Vf.round(V,2),family:B,weight:Z,style:te,variant:fe,textcase:le,shadow:K,lineposition:ie}).attr(Qe).call(Wf.convertToTspans,e)}return Nfe.previousPromises(e)}function Ne(Be){var ze=Be.title,Pe=Vf.select(ze.node().parentNode);if(s&&s.selection&&s.side&&p){Pe.attr("transform",null);var Xe=zfe[s.side],Ue=s.side==="left"||s.side==="top"?-1:1,se=Ffe(s.pad)?s.pad:2,Te=f1.bBox(Pe.node()),Se={t:0,b:0,l:0,r:0},ir=e._fullLayout._reservedMargin;for(var Qe in ir)for(var Le in ir[Qe]){var Ce=ir[Qe][Le];Se[Le]=Math.max(Se[Le],Ce)}var Ge={left:Se.l,top:Se.t,right:a.width-Se.r,bottom:a.height-Se.b},Ze=s.maxShift||Ue*(Ge[s.side]-Te[s.side]),Ye=0;if(Ze<0)Ye=Ze;else{var He=s.offsetLeft||0,$e=s.offsetTop||0;Te.left-=He,Te.right-=He,Te.top-=$e,Te.bottom-=$e,s.selection.each(function(){var lr=f1.bBox(this);uu.bBoxIntersect(Te,lr,se)&&(Ye=Math.max(Ye,Ue*(lr[s.side]-Te[Xe])+se))}),Ye=Math.min(Ze,Ye),n._titleScoot=Math.abs(Ye)}if(Ye>0||Ze<0){var cr={left:[-Ye,0],right:[Ye,0],top:[0,-Ye],bottom:[0,Ye]}[s.side];Pe.attr("transform",pC(cr[0],cr[1]))}}}W.call(me,Q);function Fe(Be,ze){Be.text(ze).on("mouseover.opacity",function(){Vf.select(this).transition().duration(yC.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Vf.select(this).transition().duration(yC.HIDE_PLACEHOLDER).style("opacity",0)})}if(oe&&(p?W.on(".opacity",null):(Fe(W,o),m=!0),W.call(Wf.makeEditable,{gd:e}).on("edit",function(Be){l!==void 0?Sx.call("_guiRestyle",e,i,Be,l):Sx.call("_guiRelayout",e,i,Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(me)}).on("input",function(Be){this.text(Be||" ").call(Wf.positionText,u.x,u.y)}),R)){if(R&&!p){var Re=W.node().getBBox(),Ie=Re.y+Re.height+Lx*V;Q.attr("y",Ie)}O?Q.on(".opacity",null):(Fe(Q,D),H=!0),Q.call(Wf.makeEditable,{gd:e}).on("edit",function(Be){Sx.call("_guiRelayout",e,"title.subtitle.text",Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(me)}).on("input",function(Be){this.text(Be||" ").call(Wf.positionText,Q.attr("x"),Q.attr("y"))})}return W.classed("js-placeholder",m),Q&&Q.classed("js-placeholder",H),c}gC.exports={draw:Ife,SUBTITLE_PADDING_EM:Lx,SUBTITLE_PADDING_MATHJAX_EM:qx}});var Zf=N((LEe,TC)=>{"use strict";var Ofe=Sr(),Bfe=xf().utcFormat,wt=Ee(),Hfe=wt.numberFormat,Lo=Pr(),$l=wt.cleanNumber,Ufe=wt.ms2DateTime,bC=wt.dateTime2ms,Co=wt.ensureNumber,xC=wt.isArrayOrTypedArray,Kl=Ft(),v1=Kl.FP_SAFE,ro=Kl.BADNUM,Gfe=Kl.LOG_CLIP,Yfe=Kl.ONEWEEK,h1=Kl.ONEDAY,d1=Kl.ONEHOUR,_C=Kl.ONEMIN,wC=Kl.ONESEC,p1=va(),g1=Ca(),y1=g1.HOUR_PATTERN,m1=g1.WEEKDAY_PATTERN;function uh(e){return Math.pow(10,e)}function Cx(e){return e!=null}TC.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(b,T){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&T&&r.range&&r.range.length===2){var k=r.range[0],M=r.range[1];return .5*(k+M-2*Gfe*Math.abs(k-M))}else return ro}function o(b,T,k,M){if((M||{}).msUTC&&Lo(b))return+b;var S=bC(b,k||r.calendar);if(S===ro)if(Lo(b)){b=+b;var E=Math.floor(wt.mod(b+.05,1)*10),P=Math.round(b-E/10);S=bC(new Date(P))+E/10}else return ro;return S}function l(b,T,k){return Ufe(b,T,k||r.calendar)}function s(b){return r._categories[Math.round(b)]}function u(b){if(Cx(b)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[b]!==void 0)return r._categoriesMap[b];r._categories.push(typeof b=="number"?String(b):b);var T=r._categories.length-1;return r._categoriesMap[b]=T,T}return ro}function f(b,T){for(var k=new Array(T),M=0;Mr.range[1]&&(k=!k);for(var M=k?-1:1,S=M*b,E=0,P=0;PD)E=P+1;else{E=S<(R+D)/2?P:P+1;break}}var z=r._B[E]||0;return isFinite(z)?p(b,r._m2,z):0},x=function(b){var T=r._rangebreaks.length;if(!T)return m(b,r._m,r._b);for(var k=0,M=0;Mr._rangebreaks[M].pmax&&(k=M+1);return m(b,r._m2,r._B[k])}}r.c2l=r.type==="log"?i:Co,r.l2c=r.type==="log"?uh:Co,r.l2p=y,r.p2l=x,r.c2p=r.type==="log"?function(b,T){return y(i(b,T))}:y,r.p2c=r.type==="log"?function(b){return uh(x(b))}:x,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=$l,r.c2d=r.c2r=r.l2d=r.l2r=Co,r.d2p=r.r2p=function(b){return r.l2p($l(b))},r.p2d=r.p2r=x,r.cleanPos=Co):r.type==="log"?(r.d2r=r.d2l=function(b,T){return i($l(b),T)},r.r2d=r.r2c=function(b){return uh($l(b))},r.d2c=r.r2l=$l,r.c2d=r.l2r=Co,r.c2r=i,r.l2d=uh,r.d2p=function(b,T){return r.l2p(r.d2r(b,T))},r.p2d=function(b){return uh(x(b))},r.r2p=function(b){return r.l2p($l(b))},r.p2r=x,r.cleanPos=Co):r.type==="date"?(r.d2r=r.r2d=wt.identity,r.d2c=r.r2c=r.d2l=r.r2l=o,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(b,T,k){return r.l2p(o(b,0,k))},r.p2d=r.p2r=function(b,T,k){return l(x(b),T,k)},r.cleanPos=function(b){return wt.cleanDate(b,ro,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=v,r.r2c=function(b){var T=d(b);return T!==void 0?T:r.fraction2r(.5)},r.l2r=r.c2r=Co,r.r2l=d,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(x(b))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(b){return typeof b=="string"&&b!==""?b:Co(b)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=v,r.r2c=function(b){var T=v(b);return T!==void 0?T:r.fraction2r(.5)},r.r2c_just_indices=c,r.l2r=r.c2r=Co,r.r2l=v,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(x(b))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:Co(b)},r.setupMultiCategory=function(b){var T=r._traceIndices,k,M,S=r._matchGroup;if(S&&r._categories.length===0){for(var E in S)if(E!==a){var P=t[p1.id2name(E)];T=T.concat(P._traceIndices)}}var R=[[0,{}],[0,{}]],D=[];for(k=0;kP[1]&&(M[E?0:1]=k),M[0]===M[1]){var R=r.l2r(T),D=r.l2r(k);if(T!==void 0){var z=R+1;k!==void 0&&(z=Math.min(z,D)),M[E?1:0]=z}if(k!==void 0){var O=D+1;T!==void 0&&(O=Math.max(O,R)),M[E?0:1]=O}}}},r.cleanRange=function(b,T){r._cleanRange(b,T),r.limitRange(b)},r._cleanRange=function(b,T){T||(T={}),b||(b="range");var k=wt.nestedProperty(r,b).get(),M,S;if(r.type==="date"?S=wt.dfltRange(r.calendar):n==="y"?S=g1.DFLTRANGEY:r._name==="realaxis"?S=[0,1]:S=T.dfltRange||g1.DFLTRANGEX,S=S.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(S[0]=0),!k||k.length!==2){wt.nestedProperty(r,b).set(S);return}var E=k[0]===null,P=k[1]===null;for(r.type==="date"&&!r.autorange&&(k[0]=wt.cleanDate(k[0],ro,r.calendar),k[1]=wt.cleanDate(k[1],ro,r.calendar)),M=0;M<2;M++)if(r.type==="date"){if(!wt.isDateTime(k[M],r.calendar)){r[b]=S;break}if(r.r2l(k[0])===r.r2l(k[1])){var R=wt.constrain(r.r2l(k[0]),wt.MIN_MS+1e3,wt.MAX_MS-1e3);k[0]=r.l2r(R-1e3),k[1]=r.l2r(R+1e3);break}}else{if(!Lo(k[M]))if(!(E||P)&&Lo(k[1-M]))k[M]=k[1-M]*(M?10:.1);else{r[b]=S;break}if(k[M]<-v1?k[M]=-v1:k[M]>v1&&(k[M]=v1),k[0]===k[1]){var D=Math.max(1,Math.abs(k[0]*1e-6));k[0]-=D,k[1]+=D}}},r.setScale=function(b){var T=t._size;if(r.overlaying){var k=p1.getFromId({_fullLayout:t},r.overlaying);r.domain=k.domain}var M=b&&r._r?"_r":"range",S=r.calendar;r.cleanRange(M);var E=r.r2l(r[M][0],S),P=r.r2l(r[M][1],S),R=n==="y";if(R?(r._offset=T.t+(1-r.domain[1])*T.h,r._length=T.h*(r.domain[1]-r.domain[0]),r._m=r._length/(E-P),r._b=-r._m*P):(r._offset=T.l+r.domain[0]*T.w,r._length=T.w*(r.domain[1]-r.domain[0]),r._m=r._length/(P-E),r._b=-r._m*E),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var D,z;if(r._rangebreaks=r.locateBreaks(Math.min(E,P),Math.max(E,P)),r._rangebreaks.length){for(D=0;DP&&(O=!O),O&&r._rangebreaks.reverse();var H=O?-1:1;for(r._m2=H*r._length/(Math.abs(P-E)-r._lBreaks),r._B.push(-r._m2*(R?P:E)),D=0;DS&&(S+=7,ES&&(S+=24,E=M&&E=M&&b=K.min&&(teK.max&&(K.max=fe),le=!1)}le&&P.push({min:te,max:fe})}};for(k=0;k{"use strict";var AC=Pr(),Ex=Ee(),Vfe=Ft().BADNUM,b1=Ex.isArrayOrTypedArray,Wfe=Ex.isDateTime,jfe=Ex.cleanNumber,MC=Math.round;SC.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if(b1(n)&&!n.length)return"-";if(!i&&Kfe(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var o=[],l=0;li*2}function kC(e){return Math.max(1,(e-1)/1e3)}function $fe(e,r){for(var t=e.length,a=kC(t),n=0,i=0,o={},l=0;ln*2}function Kfe(e){return b1(e[0])&&b1(e[1])}});var fh=N((EEe,FC)=>{"use strict";var Qfe=Sr(),EC=Pr(),Ql=Ee(),_1=Ft().FP_SAFE,ece=gr(),rce=jr(),DC=va(),tce=DC.getFromId,ace=DC.isLinked;FC.exports={applyAutorangeOptions:RC,getAutoRange:Dx,makePadFn:Px,doAutoRange:ice,findExtremes:oce,concatExtremes:Nx};function Dx(e,r){var t,a,n=[],i=e._fullLayout,o=Px(i,r,0),l=Px(i,r,1),s=Nx(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return Ql.simpleMap(r.range,r.r2l);var c=u[0].val,v=f[0].val;for(t=1;t0&&(P=w-o(k)-l(M),P>b?R/P>T&&(S=k,E=M,T=R/P):R/w>T&&(S={val:k.val,nopad:1},E={val:M.val,nopad:1},T=R/w));function D(G,B){return Math.max(G,l(B))}if(c===v){var z=c-1,O=c+1;if(x)if(c===0)n=[0,1];else{var H=(c>0?f:u).reduce(D,0),Y=c/(1-Math.min(.5,H/w));n=c>0?[0,Y]:[Y,0]}else _?n=[Math.max(0,z),Math.max(1,O)]:n=[z,O]}else x?(S.val>=0&&(S={val:0,nopad:1}),E.val<=0&&(E={val:0,nopad:1})):_&&(S.val-T*o(S)<0&&(S={val:0,nopad:1}),E.val<=0&&(E={val:1,nopad:1})),T=(E.val-S.val-qC(r,k.val,M.val))/(w-o(S)-l(E)),n=[S.val-T*o(S),E.val+T*l(E)];return n=RC(n,r),r.limitRange&&r.limitRange(),p&&n.reverse(),Ql.simpleMap(n,r.l2r||Number)}function qC(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),k=b((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),M=b(t.vpadplus||t.vpad),S=b(t.vpadminus||t.vpad);if(!u){if(_=1/0,w=-1/0,s)for(c=0;c0&&(_=v),v>w&&v<_1&&(w=v);else for(c=0;c-_1&&(_=v),v>w&&v<_1&&(w=v);r=[_,w],i=2}var E={tozero:l,extrapad:o};function P(D){d=r[D],EC(d)&&(y=T(D),x=k(D),f?(p=e.c2l(d)-S(D),m=e.c2l(d)+M(D)):(_=d-S(D),w=d+M(D),s&&_=R;c--)P(c);return{min:a,max:n,opts:t}}function Rx(e,r,t,a){PC(e,r,t,a,lce)}function Fx(e,r,t,a){PC(e,r,t,a,sce)}function PC(e,r,t,a,n){for(var i=a.tozero,o=a.extrapad,l=!0,s=0;s=t&&(u.extrapad||!o)){l=!1;break}else n(r,u.val)&&u.pad<=t&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:o})}}function CC(e){return EC(e)&&Math.abs(e)<_1}function lce(e,r){return e<=r}function sce(e,r){return e>=r}function uce(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&w1(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&w1(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function fce(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&w1(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&w1(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function w1(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),o<=s&&(o=s,a=s)}}return t=uce(t,r),a=fce(a,r),[t,a]}});var Or=N((DEe,aE)=>{"use strict";var di=Sr(),aa=Pr(),Xf=ea(),vh=gr(),xr=Ee(),Jf=xr.strTranslate,fu=Ea(),cce=jf(),hh=Tr(),Zn=jr(),vce=hi(),NC=ix(),Ua=Ft(),hce=Ua.ONEMAXYEAR,M1=Ua.ONEAVGYEAR,k1=Ua.ONEMINYEAR,dce=Ua.ONEMAXQUARTER,Bx=Ua.ONEAVGQUARTER,S1=Ua.ONEMINQUARTER,pce=Ua.ONEMAXMONTH,$f=Ua.ONEAVGMONTH,q1=Ua.ONEMINMONTH,Xn=Ua.ONEWEEK,on=Ua.ONEDAY,es=on/2,Do=Ua.ONEHOUR,dh=Ua.ONEMIN,L1=Ua.ONESEC,yce=Ua.ONEMILLI,mce=Ua.ONEMICROSEC,cu=Ua.MINUS_SIGN,D1=Ua.BADNUM,Hx={K:"zeroline"},Ux={K:"gridline",L:"path"},Gx={K:"minor-gridline",L:"path"},jC={K:"tick",L:"path"},zC={K:"tick",L:"text"},IC={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},P1=Xa(),ch=P1.MID_SHIFT,vu=P1.CAP_SHIFT,ph=P1.LINE_SPACING,gce=P1.OPPOSITE_SIDE,C1=3,We=aE.exports={};We.setConvert=Zf();var bce=x1(),fl=va(),xce=fl.idSort,_ce=fl.isLinked;We.id2name=fl.id2name;We.name2id=fl.name2id;We.cleanId=fl.cleanId;We.list=fl.list;We.listIds=fl.listIds;We.getFromId=fl.getFromId;We.getFromTrace=fl.getFromTrace;var ZC=fh();We.getAutoRange=ZC.getAutoRange;We.findExtremes=ZC.findExtremes;var wce=1e-4;function jx(e){var r=(e[1]-e[0])*wce;return[e[0]-r,e[1]+r]}We.coerceRef=function(e,r,t,a,n,i){var o=a.charAt(a.length-1),l=t._fullLayout._subplots[o+"axis"],s=a+"ref",u={};return n||(n=l[0]||(typeof i=="string"?i:i[0])),i||(i=n),l=l.concat(l.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:l.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},xr.coerce(e,r,u,s)};We.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};We.coercePosition=function(e,r,t,a,n,i){var o,l,s=We.getRefType(a);if(s!=="range")o=xr.ensureNumber,l=t(n,i);else{var u=We.getFromId(r,a);i=u.fraction2r(i),l=t(n,i),o=u.cleanPos}e[n]=o(l)};We.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?xr.ensureNumber:We.getFromId(r,t).cleanPos;return a(e)};We.redrawComponents=function(e,r){r=r||We.listIds(e);var t=e._fullLayout;function a(n,i,o,l){for(var s=vh.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};We.saveRangeInitial=function(e,r){for(var t=We.list(e,"",!0),a=!1,n=0;nc*.3||u(a)||u(n))){var v=t.dtick/2;e+=e+vo){var l=Number(t.substr(1));i.exactYears>o&&l%12===0?e=We.tickIncrement(e,"M6","reverse")+on*1.5:i.exactMonths>o?e=We.tickIncrement(e,"M1","reverse")+on*15.5:e-=es;var s=We.tickIncrement(e,t);if(s<=a)return s}return e}We.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&aa(r._tmin),n;if(a){var i=We.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var o=xr.simpleMap(r.range,r.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=xr.simpleMap(n,r.l2r),e._isMinor=!0,We.prepTicks(e,t),a){var l=aa(r.dtick),s=aa(e.dtick),u=l?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);l&&s?zx(u,f)?u===2*Xn&&f===2*on&&(e.dtick=Xn):u===2*Xn&&f===3*on?e.dtick=Xn:u===Xn&&!(r._input.minor||{}).nticks?e.dtick=on:HC(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":zx(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?zx(u,f)||(e.dtick=HC(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function zx(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function HC(e,r){return Math.abs(e/r-1)<.001}We.prepTicks=function(e,r){var t=xr.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?xr.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=xr.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,We.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,o=a):(i=a,o=a);var l=e[i].value,s=e[o].value,u=Math.abs(s-l),f=t||u,c=0;f>=k1?u>=k1&&u<=hce?c=u:c=M1:t===Bx&&f>=S1?u>=S1&&u<=dce?c=u:c=Bx:f>=q1?u>=q1&&u<=pce?c=u:c=$f:t===Xn&&f>=Xn?c=Xn:f>=on?c=on:t===es&&f>=es?c=es:t===Do&&f>=Do&&(c=Do);var v;c>=u&&(c=u,v=!0);var d=n+c;if(r.rangebreaks&&c>0){for(var p=84,m=0,y=0;yXn&&(c=u)}(c>0||a===0)&&(e[a].periodX=n+c/2)}}We.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,o=r.ticklabelmode==="period",l=r.range[0]>r.range[1],s=!r.ticklabelindex||xr.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=xr.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(w?0:1);b--){var T=!b;b?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var k=b?r:xr.extendFlat({},r,r.minor);if(T?We.prepMinorTicks(k,r,t):We.prepTicks(k,t),k.tickmode==="array"){b?(y=[],p=UC(r,!T)):(x=[],m=UC(r,!T));continue}if(k.tickmode==="sync"){y=[],p=qce(r);continue}var M=jx(u),S=M[0],E=M[1],P=aa(k.dtick),R=a==="log"&&!(P||k.dtick.charAt(0)==="L"),D=We.tickFirst(k,t);if(b){if(r._tmin=D,D=E:O<=E;O=We.tickIncrement(O,G,f,n)){if(b&&H++,k.rangebreaks&&!f){if(O=v)break}if(y.length>d||O===z)break;z=O;var B={value:O};b?(R&&O!==(O|0)&&(B.simpleLabel=!0),i>1&&H%i&&(B.skipLabel=!0),y.push(B)):(B.minor=!0,x.push(B))}}if(!x||x.length<2)s=!1;else{var V=(x[1].value-x[0].value)*(l?-1:1);Kce(V,r.tickformat)||(s=!1)}if(!s)_=y;else{var X=y.concat(x);o&&y.length&&(X=X.slice(1)),X=X.sort(function(Ie,Be){return Ie.value-Be.value}).filter(function(Ie,Be,ze){return Be===0||Ie.value!==ze[Be-1].value});var Z=X.map(function(Ie,Be){return Ie.minor===void 0&&!Ie.skipLabel?Be:null}).filter(function(Ie){return Ie!==null});Z.forEach(function(Ie){s.map(function(Be){var ze=Ie+Be;ze>=0&&ze-1;ue--){if(y[ue].drop){y.splice(ue,1);continue}y[ue].value=Ox(y[ue].value,r);var j=r.c2p(y[ue].value);(de?Q>j-W:Qv||Pev&&(ze.periodX=v),Pen&&vM1)r/=M1,a=n(10),e.dtick="M"+12*Eo(r,a,T1);else if(i>$f)r/=$f,e.dtick="M"+Eo(r,1,GC);else if(i>on){if(e.dtick=Eo(r,on,e._hasDayOfWeekBreaks?[1,2,7,14]:Lce),!t){var o=We.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=xr.dateTick0(e.calendar,2):e.tick0=xr.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else i>Do?e.dtick=Eo(r,Do,GC):i>dh?e.dtick=Eo(r,dh,YC):i>L1?e.dtick=Eo(r,L1,YC):(a=n(10),e.dtick=Eo(r,a,T1))}else if(e.type==="log"){e.tick0=0;var s=xr.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+Eo(r,a,T1)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):Jx(e)?(e.tick0=0,a=1,e.dtick=Eo(r,a,Cce)):(e.tick0=0,a=n(10),e.dtick=Eo(r,a,T1));if(e.dtick===0&&(e.dtick=1),!aa(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function KC(e){var r=e.dtick;if(e._tickexponent=0,!aa(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=on&&n<=10||r>=on*15)e._tickround="d";else if(r>=dh&&n<=16||r>=Do)e._tickround="M";else if(r>=L1&&n<=19||r>=dh)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(aa(r)||r.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);aa(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(E1(e.exponentformat)&&!Zx(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}We.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(aa(r))return xr.increment(e,n*r);var i=r.charAt(0),o=n*Number(r.substr(1));if(i==="M")return xr.incrementMonth(e,o,a);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var l=r==="D2"?$C:JC,s=e+n*.01,u=xr.roundUp(xr.mod(s,1),l,t);return Math.floor(s)+Math.log(di.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};We.tickFirst=function(e,r){var t=e.r2l||Number,a=xr.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&x<=e._length?y:null};if(i&&xr.isArrayOrTypedArray(e.ticktext)){var c=xr.simpleMap(e.range,e.r2l),v=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(u=0;u"+l;else{var u=mh(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(o+="
")}r.text=o}function Dce(e,r,t,a,n){var i=e.dtick,o=r.x,l=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),l||s==="L")r.text=yh(Math.pow(10,o),e,n,a);else if(aa(i)||s==="D"&&xr.mod(o+.01,1)<.1){var u=Math.round(o),f=Math.abs(u),c=e.exponentformat;c==="power"||E1(c)&&Zx(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":cu)+f+"",r.fontSize*=1.25):(c==="e"||c==="E")&&f>2?r.text="1"+c+(u>0?"+":cu)+f:(r.text=yh(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,xr.mod(o,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var v=String(r.text).charAt(0);(v==="0"||v==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(o<0?.5:.25)))}}function Pce(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function Rce(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);t?r.text=o+" - "+i:(r.text=i,r.text2=o)}function Fce(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=yh(r.x,e,n,a)}function Nce(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var o=zce(i);if(o[1]>=100)r.text=yh(xr.deg2rad(r.x),e,n,a);else{var l=r.x<0;o[1]===1?o[0]===1?r.text="\u03C0":r.text=o[0]+"\u03C0":r.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),l&&(r.text=cu+r.text)}}}else r.text=yh(r.x,e,n,a)}function zce(e){function r(l,s){return Math.abs(l-s)<=1e-6}function t(l,s){return r(s,0)?l:t(s,l%s)}function a(l){for(var s=1;!r(Math.round(l*s)/s,l);)s*=10;return s}var n=a(e),i=e*n,o=Math.abs(t(i,n));return[Math.round(i/o),Math.round(n/o)]}var Ice=["f","p","n","\u03BC","m","","k","M","G","T"];function E1(e){return e==="SI"||e==="B"}function Zx(e){return e>14||e<-15}function yh(e,r,t,a){var n=e<0,i=r._tickround,o=t||r.exponentformat||"B",l=r._tickexponent,s=We.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:o,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:aa(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};KC(f),i=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,cu);var c=Math.pow(10,-i)/2;if(o==="none"&&(l=0),e=Math.abs(e),e"+p+"":o==="B"&&l===9?e+="B":E1(o)&&(e+=Ice[l/3+5])}return n?cu+e:e}We.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*$f}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var c=f.indexOf(s.charAt(0)),v=f.indexOf(u.charAt(0));return c===v?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):c-v}else return typeof s=="number"?1:-1}function n(s,u,f){var c=f||function(p){return p},v=u[0],d=u[1];return(!v&&typeof v!="number"||c(v)<=c(s))&&(!d&&typeof d!="number"||c(d)>=c(s))}function i(s,u){var f=u[0]===null,c=u[1]===null,v=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||v)&&(c||d)}var o,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var l={false:{left:0,right:0}};return xr.syncOrAsync(n.map(function(s){return function(){if(s){var u=We.getFromId(e,s);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=o;var f=We.drawOne(e,u,t);return u._shiftPusher&&Wx(u,u._fullDepth||0,l,!0),u._r=u.range.slice(),u._rl=xr.simpleMap(u._r,u.r2l),f}}}))};We.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,o,l;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),c=We.counterLetter(u),v=s._plots[r._mainSubplot];if(!v)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),Wx(r,d,a,!0),Wx(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=$ce(r,a));var p=v[f+"axislayer"],m=r._mainLinePosition,y=m+=r._shift,x=r._mainMirrorPosition,_=r._vals=We.calcTicks(r),w=[r.mirror,y,x].join("_");for(i=0;i<_.length;i++)_[i].axInfo=w;r._selections={},r._tickAngles&&(r._prevTickAngles=r._tickAngles),r._tickAngles={},r._depth=null;var b={};function T(Fe){var Re=u+(Fe||"tick");return b[Re]||(b[Re]=Uce(r,Re,y)),b[Re]}if(r.visible){var k=We.makeTransTickFn(r),M=We.makeTransTickLabelFn(r),S,E,P=r.ticks==="inside",R=r.ticks==="outside";if(r.tickson==="boundaries"){var D=Oce(r,_);E=We.clipEnds(r,D),S=P?E:D}else E=We.clipEnds(r,_),S=P&&r.ticklabelmode!=="period"?E:_;var z=r._gridVals=E,O=Hce(r,_);if(!s._hasOnlyLargeSploms){var H=r._subplotsWith,Y={};for(i=0;i0?ze.bottom-Ie:0,Be))));var se=0,Te=0;if(r._shiftPusher&&(se=Math.max(Be,ze.height>0?Fe==="l"?Ie-ze.left:ze.right-Ie:0),r.title.text!==s._dfltTitle[f]&&(Te=(r._titleStandoff||0)+(r._titleScoot||0),Fe==="l"&&(Te+=WC(r))),r._fullDepth=Math.max(se,Te)),r.automargin){Pe={x:0,y:0,r:0,l:0,t:0,b:0};var Se=[0,1],ir=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Fe==="b"?Pe[Fe]=r._depth:(Pe[Fe]=r._depth=Math.max(ze.width>0?Ie-ze.top:0,Be),Se.reverse()),ze.width>0){var Qe=ze.right-(r._offset+r._length);Qe>0&&(Pe.xr=1,Pe.r=Qe);var Le=r._offset-ze.left;Le>0&&(Pe.xl=0,Pe.l=Le)}}else if(Fe==="l"?(r._depth=Math.max(ze.height>0?Ie-ze.left:0,Be),Pe[Fe]=r._depth-ir):(r._depth=Math.max(ze.height>0?ze.right-Ie:0,Be),Pe[Fe]=r._depth+ir,Se.reverse()),ze.height>0){var Ce=ze.bottom-(r._offset+r._length);Ce>0&&(Pe.yb=0,Pe.b=Ce);var Ge=r._offset-ze.top;Ge>0&&(Pe.yt=1,Pe.t=Ge)}Pe[c]=r.anchor==="free"?r.position:r._anchorAxis.domain[Se[0]],r.title.text!==s._dfltTitle[f]&&(Pe[Fe]+=WC(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Xe={x:0,y:0,r:0,l:0,t:0,b:0},Xe[Re]=r.linewidth,r.mirror&&r.mirror!==!0&&(Xe[Re]+=Be),r.mirror===!0||r.mirror==="ticks"?Xe[c]=r._anchorAxis.domain[Se[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Xe[c]=[r._counterDomainMin,r._counterDomainMax][Se[1]]))}Ne&&(Ue=vh.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(VC(Pe,r.automargin),VC(Xe,r.automargin)),Xf.autoMargin(e,Xx(r),Pe),Xf.autoMargin(e,rE(r),Xe),Xf.autoMargin(e,tE(r),Ue)}),xr.syncOrAsync(me)}};function VC(e,r){if(e){var t=Object.keys(IC).reduce(function(a,n){return r.indexOf(n)!==-1&&IC[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function Oce(e,r){var t=[],a,n=function(i,o){var l=i.xbnd[o];l!==null&&t.push(xr.extendFlat({},i,{x:l}))};if(r.length){for(a=0;ae.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!l;if(t){var u=o?-1:1;t=t*u}if(a){var f=e.side,c=l&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*c}return e._id.charAt(0)==="x"?function(v){return Jf(n+e._offset+e.l2p(Yx(v))+t,i+a)}:function(v){return Jf(i+a,n+e._offset+e.l2p(Yx(v))+t)}};function Yx(e){return e.periodX!==void 0?e.periodX:e.x}function Gce(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),o=t("bottom"),l=t("inside"),s=o||n||a||i;if(!s&&!l)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,c=C1,v=e.tickfont?e.tickfont.size:12;return(o||a)&&(f+=v*vu,c+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,c+=C1),l&&u==="top"&&(c-=v*(1-vu)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(c=-c),[s?f:0,l?c:0]}We.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return o==="x"?"M0,"+(r+l*t)+"v"+i*t:"M"+(r+l*t)+",0h"+i*t};We.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(D){return a.indexOf(D)!==-1},i=n("top"),o=n("left"),l=n("right"),s=n("bottom"),u=s||o||i||l,f=n("inside"),c=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",v=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:u&&(p=0),c&&(v+=p,t)){var m=xr.deg2rad(t);v=p*Math.cos(m)+1,d=p*Math.sin(m)}e.showticklabels&&(c||e.showline)&&(v+=.2*e.tickfont.size),v+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:v,labelShift:d},x,_,w,b,T=0,k=e.side,M=e._id.charAt(0),S=e.tickangle,E;if(M==="x")E=!f&&k==="bottom"||f&&k==="top",b=E?1:-1,f&&(b*=-1),x=d*b,_=r+v*b,w=E?1:-.2,Math.abs(S)===90&&(f?w+=ch:S===-90&&k==="bottom"?w=vu:S===90&&k==="top"?w=ch:w=.5,T=ch/2*(S/90)),y.xFn=function(D){return D.dx+x+T*D.fontSize},y.yFn=function(D){return D.dy+_+D.fontSize*w},y.anchorFn=function(D,z){if(u){if(o)return"end";if(l)return"start"}return!aa(z)||z===0||z===180?"middle":z*b<0!==f?"end":"start"},y.heightFn=function(D,z,O){return z<-60||z>60?-.5*O:e.side==="top"!==f?-O:0};else if(M==="y"){if(E=!f&&k==="left"||f&&k==="right",b=E?1:-1,f&&(b*=-1),x=v,_=d*b,w=0,!f&&Math.abs(S)===90&&(S===-90&&k==="left"||S===90&&k==="right"?w=vu:w=.5),f){var P=aa(S)?+S:0;if(P!==0){var R=xr.deg2rad(P);T=Math.abs(Math.sin(R))*vu*b,w=0}}y.xFn=function(D){return D.dx+r-(x+D.fontSize*w)*b+T*D.fontSize},y.yFn=function(D){return D.dy+_+D.fontSize*ch},y.anchorFn=function(D,z){return aa(z)&&Math.abs(z)===90?"middle":E?"end":"start"},y.heightFn=function(D,z,O){return e.side==="right"&&(z*=-1),z<-30?-O:z<30?-.5*O:0}}return y};function R1(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}We.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(r.ticks?t.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,R1);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(o){return hh.stroke(di.select(this),o.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(o){return Zn.crispRound(e,o.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),F1(r,[jC]),i.attr("transform",t.transFn)};We.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(x){return x.minor}):[],o=r.showgrid?t.vals.filter(function(x){return!x.minor}):[],l=t.counterAxis;if(l&&We.shouldShowZeroLine(e,r,l))for(var s=r.tickmode==="array",u=0;u=0;p--){var m=p?v:d;if(m){var y=m.selectAll("path."+a).data(p?o:i,R1);y.exit().remove(),y.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),y.attr("transform",t.transFn).attr("d",t.path).each(function(x){return hh.stroke(di.select(this),x.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(x){return Zn.dashStyle(x.minor?r.minor.griddash:r.griddash,x.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(x){return(x.minor?c:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&y.attr("d",t.path)}}F1(r,[Ux,Gx])}};We.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=We.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(o,l){return xce(o.id,l.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(hh.stroke,r.zerolinecolor||hh.defaultLine).style("stroke-width",Zn.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),F1(r,[Hx])};We.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",o=t.vals.filter(function(B){return B.text}),l=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?o:[],R1),c=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(B){var V=di.select(this),X=e._promises.length;V.call(fu.positionText,l.xFn(B),l.yFn(B)).call(Zn.font,{family:B.font,size:B.fontSize,color:B.fontColor,weight:B.fontWeight,style:B.fontStyle,variant:B.fontVariant,textcase:B.fontTextcase,lineposition:B.fontLineposition,shadow:B.fontShadow}).text(B.text).call(fu.convertToTspans,e),e._promises[X]?c.push(e._promises.pop().then(function(){v(V,s)})):v(V,s)}),F1(r,[zC]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(B){di.select(this).select("text").call(fu.positionText,l.xFn(B),l.yFn(B))});function v(B,V){B.each(function(X){var Z=di.select(this),te=Z.select(".text-math-group"),fe=l.anchorFn(X,V),le=t.transFn.call(Z.node(),X)+(aa(V)&&+V!=0?" rotate("+V+","+l.xFn(X)+","+(l.yFn(X)-X.fontSize/2)+")":""),ie=fu.lineCount(Z),K=ph*X.fontSize,he=l.heightFn(X,aa(V)?+V:0,(ie-1)*K);if(he&&(le+=Jf(0,he)),te.empty()){var oe=Z.select("text");oe.attr({transform:le,"text-anchor":fe}),oe.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var ye=Zn.bBox(te.node()).width,ue=ye*{end:-.5,start:.5}[fe];te.attr("transform",le+Jf(ue,0))}})}r._adjustTickLabelsOverflow=function(){var B=r.ticklabeloverflow;if(!(!B||B==="allow")){var V=B.indexOf("hide")!==-1,X=r._id.charAt(0)==="x",Z=0,te=X?e._fullLayout.width:e._fullLayout.height;if(B.indexOf("domain")!==-1){var fe=xr.simpleMap(r.range,r.r2l);Z=r.l2p(fe[0])+r._offset,te=r.l2p(fe[1])+r._offset}var le=Math.min(Z,te),ie=Math.max(Z,te),K=r.side,he=1/0,oe=-1/0;f.each(function(W){var Q=di.select(this),j=Q.select(".text-math-group");if(j.empty()){var pe=Zn.bBox(Q.node()),me=0;X?(pe.right>ie||pe.leftie||pe.top+(r.tickangle?0:W.fontSize/4)r["_visibleLabelMin_"+fe._id]?W.style("display","none"):ie.K==="tick"&&!le&&W.style("display",null)})})})})},v(f,u+1?u:s);function d(){return c.length&&Promise.all(c)}var p=null;function m(){if(v(f,s),o.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){p=r.autotickangles[0];var B=0,V=[],X,Z=1;f.each(function(ze){B=Math.max(B,ze.fontSize);var Pe=r.l2p(ze.x),Xe=Vx(this),Ue=Zn.bBox(Xe.node());Z=Math.max(Z,fu.lineCount(Xe)),V.push({top:0,bottom:10,height:10,left:Pe-Ue.width/2,right:Pe+Ue.width/2+2,width:Ue.width+2})});var te=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,fe=o.length,le=Math.abs((o[fe-1].x-o[0].x)*r._m)/(fe-1),ie=te?le/2:le,K=te?r.ticklen:B*1.25*Z,he=Math.sqrt(Math.pow(ie,2)+Math.pow(K,2)),oe=ie/he,ye=r.autotickangles.map(function(ze){return ze*Math.PI/180}),ue=ye.find(function(ze){return Math.abs(Math.cos(ze))<=oe});ue===void 0&&(ue=ye.reduce(function(ze,Pe){return Math.abs(Math.cos(ze))H*O&&(R=O,S[M]=E[M]=D[M])}var Y=Math.abs(R-P);Y-b>0?(Y-=b,b*=1+b/Y):b=0,r._id.charAt(0)!=="y"&&(b=-b),S[k]=_.p2r(_.r2p(E[k])+T*b),_.autorange==="min"||_.autorange==="max reversed"?(S[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(S[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[_._name+".range"]=S}var G=xr.syncOrAsync(y);return G&&G.then&&e._promises.push(G),G};function Yce(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,R1);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(hh.stroke,r.dividercolor).style("stroke-width",Zn.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}We.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function WC(e){var r=e.title.font.size,t=(e.title.text.match(fu.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(vu+t*ph):t?r*(t+1)*ph:r}function Vce(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,o,l=(r.title.text.match(fu.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?o=r._depth+r.title.standoff+i*vu:(r.side==="top"||r.side==="left")&&(o=r._depth+r.title.standoff+i*(ch+l*ph));else{var s=mh(r);if(r.type==="multicategory")o=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),o=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?o+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):o+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=We.getPxPosition(e,r),c,v,d;n==="x"?(v=r._offset+r._length/2,d=r.side==="top"?f-o:f+o):(d=r._offset+r._length/2,v=r.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(r.type!=="multicategory"){var m=r._selections[r._id+"tick"];if(p={selection:m,side:r.side},m&&m.node()&&m.node().parentNode){var y=Zn.getTranslate(m.node().parentNode);p.offsetLeft=y.x,p.offsetTop=y.y}r.title.hasOwnProperty("standoff")&&(p.pad=0)}return r._titleStandoff=o,cce.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:p,transform:c,attributes:{x:v,y:d,"text-anchor":"middle"}})}We.shouldShowZeroLine=function(e,r,t){var a=xr.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===D1)&&(eE(r,0)||!Wce(e,r,t,a)||jce(e,r))};We.clipEnds=function(e,r){return r.filter(function(t){return eE(e,t.x)})};function eE(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=mce:/%L/.test(r)?e>=yce:/%[SX]/.test(r)?e>=L1:/%M/.test(r)?e>=dh:/%[HI]/.test(r)?e>=Do:/%p/.test(r)?e>=es:/%[Aadejuwx]/.test(r)?e>=on:/%[UVW]/.test(r)?e>=Xn:/%[Bbm]/.test(r)?e>=q1:/%[q]/.test(r)?e>=S1:/%[Yy]/.test(r)?e>=k1:!0}});var iE=N((PEe,nE)=>{"use strict";nE.exports=function(r,t,a){var n,i;if(a){var o=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[o?1:0],i=a[o?0:1]}var l=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);l===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var $x=N((REe,oE)=>{"use strict";var Qce=iE();oE.exports=function(r,t,a,n){var i=t._template||{},o=t.type||i.type||"-";a("minallowed"),a("maxallowed");var l=a("range");if(!l){var s;!n.noInsiderange&&o!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(l=a("range",s)))}var u=t.getAutorangeDflt(l,n),f=a("autorange",u),c;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,c=!0),c||(u=t.getAutorangeDflt(l,n),f=a("autorange",u)),f&&(Qce(a,f,l),(o==="linear"||o==="-")&&a("rangemode")),t.cleanRange()}});var sE=N((FEe,lE)=>{var eve={left:0,top:0};lE.exports=rve;function rve(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=tve(r);return t[0]=a-i.left,t[1]=n-i.top,t}function tve(e){return e===window||e===document||e===document.body?eve:e.getBoundingClientRect()}});var Kx=N((NEe,uE)=>{"use strict";var ave=Rb();function nve(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}uE.exports=ave&&nve()});var cE=N((zEe,fE)=>{"use strict";fE.exports=function(r,t,a,n,i){var o=(r-a)/(n-a),l=o+t/(n-a),s=(o+l)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?s:i==="right"||i==="top"?l:o<2/3-s?o:l>4/3-s?l:s}});var dE=N((IEe,hE)=>{"use strict";var vE=Ee(),ive=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];hE.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=vE.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=vE.constrain(Math.floor(t*3),0,2),ive[t][r]}});var yE=N((OEe,pE)=>{"use strict";var ove=eh(),lve=Pp(),sve=Wv().getGraphDiv,uve=Yv(),Qx=pE.exports={};Qx.wrapped=function(e,r,t){e=sve(e),e._fullLayout&&lve.clear(e._fullLayout._uid+uve.HOVERID),Qx.raw(e,r,t)};Qx.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&ove.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var pi=N((BEe,bE)=>{"use strict";var fve=sE(),e5=Nb(),cve=Kx(),vve=Ee().removeElement,hve=Ca(),hu=bE.exports={};hu.align=cE();hu.getCursor=dE();var mE=yE();hu.unhover=mE.wrapped;hu.unhoverRaw=mE.raw;hu.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,o,l,s,u,f,c,v,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=y,cve?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=y,i.addEventListener("touchstart",y,{passive:!1})):i.ontouchstart=y;function p(w,b,T){return Math.abs(w)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,c),!d){var b;try{b=new MouseEvent("click",w)}catch(k){var T=r5(w);b=document.createEvent("MouseEvents"),b.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,T[0],T[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}v.dispatchEvent(b)}t._dragging=!1,t._dragged=!1}};function gE(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}hu.coverSlip=gE;function r5(e){return fve(e.changedTouches?e.changedTouches[0]:e,document.body)}});var rs=N((HEe,xE)=>{"use strict";xE.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var TE=N((UEe,wE)=>{"use strict";var t5=rs(),gh="data-savedcursor",_E="!!";wE.exports=function(r,t){var a=r.attr(gh);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var a5=fa(),dve=li();AE.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:dve.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:a5({editType:"legend"}),grouptitlefont:a5({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:a5({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var z1=N(N1=>{"use strict";N1.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};N1.isVertical=function(r){return r.orientation!=="h"};N1.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var l5=N((VEe,ME)=>{"use strict";var i5=gr(),Jn=Ee(),pve=_t(),yve=mn(),mve=n5(),gve=Sf(),o5=z1();function bve(e,r,t,a){var n=r[e]||{},i=pve.newContainer(t,e);function o(G,B){return Jn.coerce(n,i,mve,G,B)}var l=Jn.coerceFont(o,"font",t.font);o("bgcolor",t.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var u,f=function(G,B){var V=u._input,X=u;return Jn.coerce(V,X,yve,G,B)},c=t.font||{},v=Jn.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,m="normal",y=(t.shapes||[]).filter(function(G){return G.showlegend}),x=a.concat(y).filter(function(G){return e===(G.legend||"legend")}),_=0;_(e==="legend"?1:0));if(b===!1&&(t[e]=void 0),!(b===!1&&!n.uirevision)&&(o("uirevision",t.uirevision),b!==!1)){o("borderwidth");var T=o("orientation"),k=o("yref"),M=o("xref"),S=T==="h",E=k==="paper",P=M==="paper",R,D,z,O="left";S?(R=0,i5.getComponentMethod("rangeslider","isVisible")(r.xaxis)?E?(D=1.1,z="bottom"):(D=1,z="top"):E?(D=-.1,z="top"):(D=0,z="bottom")):(D=1,z="auto",P?R=1.02:(R=1,O="right")),Jn.coerce(n,i,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:R}},"x"),Jn.coerce(n,i,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:D}},"y"),o("traceorder",m),o5.isGrouped(t[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",O),o("yanchor",z),o("valign"),Jn.noneOrAll(n,i,["x","y"]);var H=o("title.text");if(H){o("title.side",S?"left":"top");var Y=Jn.extendFlat({},l,{size:Jn.bigFont(l.size)});Jn.coerceFont(o,"title.font",Y)}}}}ME.exports=function(r,t,a){var n,i=a.slice(),o=t.shapes;if(o)for(n=0;n{"use strict";var Kf=gr(),u5=Ee(),xve=u5.pushUnique,s5=!0;kE.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,o=n.legend.itemdoubleclick,l=n.legend.groupclick;a===1&&i==="toggle"&&o==="toggleothers"&&s5&&t.data&&t._context.showTips&&u5.notifier(u5._(t,"Double-click on legend to isolate one trace"),"long"),s5=!1;var s;if(a===1?s=i:a===2&&(s=o),!s)return;var u=l==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],c=r.data()[0][0];if(c.groupTitle&&c.noClick)return;var v=t._fullData,d=(n.shapes||[]).filter(function(Ie){return Ie.showlegend}),p=v.concat(d),m=c.trace;m._isShape&&(m=m._fullInput);var y=m.legendgroup,x,_,w,b,T,k,M={},S=[],E=[],P=[];function R(Ie,Be){var ze=S.indexOf(Ie),Pe=M.visible;return Pe||(Pe=M.visible=[]),S.indexOf(Ie)===-1&&(S.push(Ie),ze=S.length-1),Pe[ze]=Be,ze}var D=(n.shapes||[]).map(function(Ie){return Ie._input}),z=!1;function O(Ie,Be){D[Ie].visible=Be,z=!0}function H(Ie,Be){if(!(c.groupTitle&&!u)){var ze=Ie._fullInput||Ie,Pe=ze._isShape,Xe=ze.index;Xe===void 0&&(Xe=ze._index);var Ue=ze.visible===!1?!1:Be;Pe?O(Xe,Ue):R(Xe,Ue)}}var Y=m.legend,G=m._fullInput,B=G&&G._isShape;if(!B&&Kf.traceIs(m,"pie-like")){var V=c.label,X=f.indexOf(V);if(s==="toggle")X===-1?f.push(V):f.splice(X,1);else if(s==="toggleothers"){var Z=X!==-1,te=[];for(x=0;x{"use strict";qE.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var EE=N((ZEe,CE)=>{"use strict";var LE=gr(),c5=z1();CE.exports=function(r,t,a){var n=t._inHover,i=c5.isGrouped(t),o=c5.isReversed(t),l={},s=[],u=!1,f={},c=0,v=0,d,p;function m(G,B,V){if(t.visible!==!1&&!(a&&G!==t._id))if(B===""||!c5.isGrouped(t)){var X="~~i"+c;s.push(X),l[X]=[V],c++}else s.indexOf(B)===-1?(s.push(B),u=!0,l[B]=[V]):l[B].push(V)}for(d=0;dP&&(E=P)}M[d][0]._groupMinRank=E,M[d][0]._preGroupSort=d}var R=function(G,B){return G[0]._groupMinRank-B[0]._groupMinRank||G[0]._preGroupSort-B[0]._preGroupSort},D=function(G,B){return G.trace.legendrank-B.trace.legendrank||G._preSort-B._preSort};for(M.forEach(function(G,B){G[0]._preGroupSort=B}),M.sort(R),d=0;d{"use strict";var I1=Ee();function DE(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}du.formatPiePercent=function(r,t){var a=DE((r*100).toPrecision(3));return I1.numSeparate(a,t)+"%"};du.formatPieValue=function(r,t){var a=DE(r.toPrecision(10));return I1.numSeparate(a,t)};du.getFirstFilled=function(r,t){if(I1.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var _ve=jr(),wve=Tr();PE.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?_ve.pointStyle(r,a,n,t):wve.fill(r,t.color)}});var B1=N(($Ee,zE)=>{"use strict";var FE=Tr(),NE=O1().castOption,Tve=RE();zE.exports=function(r,t,a,n){var i=a.marker.line,o=NE(i.color,t.pts)||FE.defaultLine,l=NE(i.width,t.pts)||0;r.call(Tve,t,a,n).style("stroke-width",l).call(FE.stroke,o)}});var p5=N((KEe,GE)=>{"use strict";var ln=Sr(),v5=gr(),$a=Ee(),IE=$a.strTranslate,gn=jr(),yi=Tr(),h5=vi().extractOpts,H1=Pn(),Ave=B1(),Mve=O1().castOption,kve=f5(),OE=12,BE=5,pu=2,Sve=10,Qf=5;GE.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",o=a.itemwidth,l=(o+kve.itemGap*2)/2,s=IE(l,0),u=function(M,S,E,P){var R;if(M+1)R=M;else if(S&&S.width>0)R=S.width;else return 0;return i?P:Math.min(R,E)};r.each(function(M){var S=ln.select(this),E=$a.ensureSingle(S,"g","layers");E.style("opacity",M[0].trace.opacity);var P=a.indentation,R=a.valign,D=M[0].lineHeight,z=M[0].height;if(R==="middle"&&P===0||!D||!z)E.attr("transform",null);else{var O={top:1,bottom:-1}[R],H=O*(.5*(D-z+3))||0,Y=a.indentation;E.attr("transform",IE(Y,H))}var G=E.selectAll("g.legendfill").data([M]);G.enter().append("g").classed("legendfill",!0);var B=E.selectAll("g.legendlines").data([M]);B.enter().append("g").classed("legendlines",!0);var V=E.selectAll("g.legendsymbols").data([M]);V.enter().append("g").classed("legendsymbols",!0),V.selectAll("g.legendpoints").data([M]).enter().append("g").classed("legendpoints",!0)}).each(k).each(v).each(p).each(d).each(y).each(b).each(w).each(f).each(c).each(x).each(_);function f(M){var S=HE(M),E=S.showFill,P=S.showLine,R=S.showGradientLine,D=S.showGradientFill,z=S.anyFill,O=S.anyLine,H=M[0],Y=H.trace,G,B,V=h5(Y),X=V.colorscale,Z=V.reversescale,te=function(ye){if(ye.size())if(E)gn.fillGroupStyle(ye,t,!0);else{var ue="legendfill-"+Y.uid;gn.gradient(ye,t,ue,d5(Z),X,"fill")}},fe=function(ye){if(ye.size()){var ue="legendline-"+Y.uid;gn.lineGroupStyle(ye),gn.gradient(ye,t,ue,d5(Z),X,"stroke")}},le=H1.hasMarkers(Y)||!z?"M5,0":O?"M5,-2":"M5,-3",ie=ln.select(this),K=ie.select(".legendfill").selectAll("path").data(E||D?[M]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",le+"h"+o+"v6h-"+o+"z").call(te),P||R){var he=u(void 0,Y.line,Sve,BE);B=$a.minExtend(Y,{line:{width:he}}),G=[$a.minExtend(H,{trace:B})]}var oe=ie.select(".legendlines").selectAll("path").data(P||R?[G]:[]);oe.enter().append("path").classed("js-line",!0),oe.exit().remove(),oe.attr("d",le+(R?"l"+o+",0.0001":"h"+o)).call(P?gn.lineGroupStyle:fe)}function c(M){var S=HE(M),E=S.anyFill,P=S.anyLine,R=S.showLine,D=S.showMarker,z=M[0],O=z.trace,H=!D&&!P&&!E&&H1.hasText(O),Y,G;function B(K,he,oe,ye){var ue=$a.nestedProperty(O,K).get(),de=$a.isArrayOrTypedArray(ue)&&he?he(ue):ue;if(i&&de&&ye!==void 0&&(de=ye),oe){if(deoe[1])return oe[1]}return de}function V(K){return z._distinct&&z.index&&K[z.index]?K[z.index]:K[0]}if(D||H||R){var X={},Z={};if(D){X.mc=B("marker.color",V),X.mx=B("marker.symbol",V),X.mo=B("marker.opacity",$a.mean,[.2,1]),X.mlc=B("marker.line.color",V),X.mlw=B("marker.line.width",$a.mean,[0,5],pu),Z.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var te=B("marker.size",$a.mean,[2,16],OE);X.ms=te,Z.marker.size=te}R&&(Z.line={width:B("line.width",V,[0,10],BE)}),H&&(X.tx="Aa",X.tp=B("textposition",V),X.ts=10,X.tc=B("textfont.color",V),X.tf=B("textfont.family",V),X.tw=B("textfont.weight",V),X.ty=B("textfont.style",V),X.tv=B("textfont.variant",V),X.tC=B("textfont.textcase",V),X.tE=B("textfont.lineposition",V),X.tS=B("textfont.shadow",V)),Y=[$a.minExtend(z,X)],G=$a.minExtend(O,Z),G.selectedpoints=null,G.texttemplate=null}var fe=ln.select(this).select("g.legendpoints"),le=fe.selectAll("path.scatterpts").data(D?Y:[]);le.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),le.exit().remove(),le.call(gn.pointStyle,G,t),D&&(Y[0].mrc=3);var ie=fe.selectAll("g.pointtext").data(H?Y:[]);ie.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),ie.exit().remove(),ie.selectAll("text").call(gn.textPointStyle,G,t)}function v(M){var S=M[0].trace,E=S.type==="waterfall";if(M[0]._distinct&&E){var P=M[0].trace[M[0].dir].marker;return M[0].mc=P.color,M[0].mlw=P.line.width,M[0].mlc=P.line.color,m(M,this,"waterfall")}var R=[];S.visible&&E&&(R=M[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 D=ln.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(R);D.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(z){var O=ln.select(this),H=S[z[0]].marker,Y=u(void 0,H.line,Qf,pu);O.attr("d",z[1]).style("stroke-width",Y+"px").call(yi.fill,H.color),Y&&O.call(yi.stroke,H.line.color)})}function d(M){m(M,this)}function p(M){m(M,this,"funnel")}function m(M,S,E){var P=M[0].trace,R=P.marker||{},D=R.line||{},z=R.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",O=E?P.visible&&P.type===E:v5.traceIs(P,"bar"),H=ln.select(S).select("g.legendpoints").selectAll("path.legend"+E).data(O?[M]:[]);H.enter().append("path").classed("legend"+E,!0).attr("d",z).attr("transform",s),H.exit().remove(),H.each(function(Y){var G=ln.select(this),B=Y[0],V=u(B.mlw,R.line,Qf,pu);G.style("stroke-width",V+"px");var X=B.mcc;if(!a._inHover&&"mc"in B){var Z=h5(R),te=Z.mid;te===void 0&&(te=(Z.max+Z.min)/2),X=gn.tryColorscale(R,"")(te)}var fe=X||B.mc||R.color,le=R.pattern,ie=le&&gn.getPatternAttr(le.shape,0,"");if(ie){var K=gn.getPatternAttr(le.bgcolor,0,null),he=gn.getPatternAttr(le.fgcolor,0,null),oe=le.fgopacity,ye=UE(le.size,8,10),ue=UE(le.solidity,.5,1),de="legend-"+P.uid;G.call(gn.pattern,"legend",t,de,ie,ye,ue,X,le.fillmode,K,he,oe)}else G.call(yi.fill,fe);V&&yi.stroke(G,B.mlc||D.color)})}function y(M){var S=M[0].trace,E=ln.select(this).select("g.legendpoints").selectAll("path.legendbox").data(S.visible&&v5.traceIs(S,"box-violin")?[M]:[]);E.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),E.exit().remove(),E.each(function(){var P=ln.select(this);if((S.boxpoints==="all"||S.points==="all")&&yi.opacity(S.fillcolor)===0&&yi.opacity((S.line||{}).color)===0){var R=$a.minExtend(S,{marker:{size:i?OE:$a.constrain(S.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});E.call(gn.pointStyle,R,t)}else{var D=u(void 0,S.line,Qf,pu);P.style("stroke-width",D+"px").call(yi.fill,S.fillcolor),D&&yi.stroke(P,S.line.color)}})}function x(M){var S=M[0].trace,E=ln.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(S.visible&&S.type==="candlestick"?[M,M]:[]);E.enter().append("path").classed("legendcandle",!0).attr("d",function(P,R){return R?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(P,R){var D=ln.select(this),z=S[R?"increasing":"decreasing"],O=u(void 0,z.line,Qf,pu);D.style("stroke-width",O+"px").call(yi.fill,z.fillcolor),O&&yi.stroke(D,z.line.color)})}function _(M){var S=M[0].trace,E=ln.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(S.visible&&S.type==="ohlc"?[M,M]:[]);E.enter().append("path").classed("legendohlc",!0).attr("d",function(P,R){return R?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(P,R){var D=ln.select(this),z=S[R?"increasing":"decreasing"],O=u(void 0,z.line,Qf,pu);D.style("fill","none").call(gn.dashLine,z.line.dash,O),O&&yi.stroke(D,z.line.color)})}function w(M){T(M,this,"pie")}function b(M){T(M,this,"funnelarea")}function T(M,S,E){var P=M[0],R=P.trace,D=E?R.visible&&R.type===E:v5.traceIs(R,E),z=ln.select(S).select("g.legendpoints").selectAll("path.legend"+E).data(D?[M]:[]);if(z.enter().append("path").classed("legend"+E,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),z.exit().remove(),z.size()){var O=R.marker||{},H=u(Mve(O.line.width,P.pts),O.line,Qf,pu),Y="pieLike",G=$a.minExtend(R,{marker:{line:{width:H}}},Y),B=$a.minExtend(P,{trace:G},Y);Ave(z,B,G,t)}}function k(M){var S=M[0].trace,E,P=[];if(S.visible)switch(S.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],E=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],E=!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"]],E="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"]],E=!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"]],E=!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"]],E=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!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"]],E=!1;break}var R=ln.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);R.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(D,z){var O=ln.select(this),H=h5(S),Y=H.colorscale,G=H.reversescale,B=function(te){if(te.size()){var fe="legendfill-"+S.uid;gn.gradient(te,t,fe,d5(G,E==="radial"),Y,"fill")}},V;if(Y){if(!E){var Z=Y.length;V=z===0?Y[G?Z-1:0][1]:z===1?Y[G?0:Z-1][1]:Y[Math.floor((Z-1)/2)][1]}}else{var X=S.vertexcolor||S.facecolor||S.color;V=$a.isArrayOrTypedArray(X)?X[z]||X[0]:X}O.attr("d",D[0]),V?O.call(yi.fill,V):O.call(B)})}};function d5(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function HE(e){var r=e[0].trace,t=r.contours,a=H1.hasLines(r),n=H1.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",o=!1,l=!1;if(t){var s=t.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:i||l}}function UE(e,r,t){return e&&$a.isArrayOrTypedArray(e)?r:e>t?t:e}});var b5=N((QEe,QE)=>{"use strict";var Rn=Sr(),na=Ee(),m5=ea(),tc=gr(),YE=eh(),y5=pi(),ia=jr(),G1=Tr(),yu=Ea(),VE=SE(),ha=f5(),g5=Xa(),$E=g5.LINE_SPACING,rc=g5.FROM_TL,WE=g5.FROM_BR,jE=EE(),qve=p5(),ZE=z1(),ec=1,Lve=/^legend[0-9]*$/;QE.exports=function(r,t){if(t)XE(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Rn.select(this),f=u.attr("class"),c=f.split(" ")[0];c.match(Lve)&&n.indexOf(c)===-1&&u.remove()});for(var o=0;o1)}var p=a.hiddenlabels||[];if(!l&&(!a.showlegend||!s.length))return o.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),m5.autoMargin(e,n);var m=na.ensureSingle(o,"g",n,function(S){l||S.attr("pointer-events","all")}),y=na.ensureSingleById(a._topdefs,"clipPath",i,function(S){S.append("rect")}),x=na.ensureSingle(m,"rect","bg",function(S){S.attr("shape-rendering","crispEdges")});x.call(G1.stroke,t.bordercolor).call(G1.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var _=na.ensureSingle(m,"g","scrollbox"),w=t.title;t._titleWidth=0,t._titleHeight=0;var b;w.text?(b=na.ensureSingle(_,"text",n+"titletext"),b.attr("text-anchor","start").call(ia.font,w.font).text(w.text),Y1(b,_,e,t,ec)):_.selectAll("."+n+"titletext").remove();var T=na.ensureSingle(m,"rect","scrollbar",function(S){S.attr(ha.scrollBarEnterAttrs).call(G1.fill,ha.scrollBarColor)}),k=_.selectAll("g.groups").data(s);k.enter().append("g").attr("class","groups"),k.exit().remove();var M=k.selectAll("g.traces").data(na.identity);M.enter().append("g").attr("class","traces"),M.exit().remove(),M.style("opacity",function(S){var E=S[0].trace;return tc.traceIs(E,"pie-like")?p.indexOf(S[0].label)!==-1?.5:1:E.visible==="legendonly"?.5:1}).each(function(){Rn.select(this).call(Eve,e,t)}).call(qve,e,t).each(function(){l||Rn.select(this).call(Dve,e,n)}),na.syncOrAsync([m5.previousPromises,function(){return Fve(e,k,M,t)},function(){var S=a._size,E=t.borderwidth,P=t.xref==="paper",R=t.yref==="paper";if(w.text&&Cve(b,t,E),!l){var D,z;P?D=S.l+S.w*t.x-rc[V1(t)]*t._width:D=a.width*t.x-rc[V1(t)]*t._width,R?z=S.t+S.h*(1-t.y)-rc[W1(t)]*t._effHeight:z=a.height*(1-t.y)-rc[W1(t)]*t._effHeight;var O=Nve(e,n,D,z);if(O)return;if(a.margin.autoexpand){var H=D,Y=z;D=P?na.constrain(D,0,a.width-t._width):H,z=R?na.constrain(z,0,a.height-t._effHeight):Y,D!==H&&na.log("Constrain "+n+".x to make legend fit inside graph"),z!==Y&&na.log("Constrain "+n+".y to make legend fit inside graph")}ia.setTranslate(m,D,z)}if(T.on(".drag",null),m.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var G=t._effHeight;l&&(G=t._height),x.attr({width:t._width-E,height:G-E,x:E/2,y:E/2}),ia.setTranslate(_,0,0),y.select("rect").attr({width:t._width-2*E,height:G-2*E,x:E,y:E}),ia.setClipUrl(_,i,e),ia.setRect(T,0,0,0,0),delete t._scrollY}else{var B=Math.max(ha.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),V=t._effHeight-B-2*ha.scrollBarMargin,X=t._height-t._effHeight,Z=V/X,te=Math.min(t._scrollY||0,X);x.attr({width:t._width-2*E+ha.scrollBarWidth+ha.scrollBarMargin,height:t._effHeight-E,x:E/2,y:E/2}),y.select("rect").attr({width:t._width-2*E+ha.scrollBarWidth+ha.scrollBarMargin,height:t._effHeight-2*E,x:E,y:E+te}),ia.setClipUrl(_,i,e),ue(te,B,Z),m.on("wheel",function(){te=na.constrain(t._scrollY+Rn.event.deltaY/V*X,0,X),ue(te,B,Z),te!==0&&te!==X&&Rn.event.preventDefault()});var fe,le,ie,K=function(pe,me,we){var Ne=(we-me)/Z+pe;return na.constrain(Ne,0,X)},he=function(pe,me,we){var Ne=(me-we)/Z+pe;return na.constrain(Ne,0,X)},oe=Rn.behavior.drag().on("dragstart",function(){var pe=Rn.event.sourceEvent;pe.type==="touchstart"?fe=pe.changedTouches[0].clientY:fe=pe.clientY,ie=te}).on("drag",function(){var pe=Rn.event.sourceEvent;pe.buttons===2||pe.ctrlKey||(pe.type==="touchmove"?le=pe.changedTouches[0].clientY:le=pe.clientY,te=K(ie,fe,le),ue(te,B,Z))});T.call(oe);var ye=Rn.behavior.drag().on("dragstart",function(){var pe=Rn.event.sourceEvent;pe.type==="touchstart"&&(fe=pe.changedTouches[0].clientY,ie=te)}).on("drag",function(){var pe=Rn.event.sourceEvent;pe.type==="touchmove"&&(le=pe.changedTouches[0].clientY,te=he(ie,fe,le),ue(te,B,Z))});_.call(ye)}function ue(pe,me,we){t._scrollY=e._fullLayout[n]._scrollY=pe,ia.setTranslate(_,0,-pe),ia.setRect(T,t._width,ha.scrollBarMargin+pe*we,ha.scrollBarWidth,me),y.select("rect").attr("y",E+pe)}if(e._context.edits.legendPosition){var de,W,Q,j;m.classed("cursor-move",!0),y5.init({element:m.node(),gd:e,prepFn:function(pe){if(pe.target!==T.node()){var me=ia.getTranslate(m);Q=me.x,j=me.y}},moveFn:function(pe,me){if(Q!==void 0&&j!==void 0){var we=Q+pe,Ne=j+me;ia.setTranslate(m,we,Ne),de=y5.align(we,t._width,S.l,S.l+S.w,t.xanchor),W=y5.align(Ne+t._height,-t._height,S.t+S.h,S.t,t.yanchor)}},doneFn:function(){if(de!==void 0&&W!==void 0){var pe={};pe[n+".x"]=de,pe[n+".y"]=W,tc.call("_guiRelayout",e,pe)}},clickFn:function(pe,me){var we=o.selectAll("g.traces").filter(function(){var Ne=this.getBoundingClientRect();return me.clientX>=Ne.left&&me.clientX<=Ne.right&&me.clientY>=Ne.top&&me.clientY<=Ne.bottom});we.size()>0&&KE(e,m,we,pe,me)}})}}],e)}}function U1(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,o=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*o:t+(o||n)}function KE(e,r,t,a,n){var i=t.data()[0][0].trace,o={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(o.group=i._group),tc.traceIs(i,"pie-like")&&(o.label=t.datum()[0].label);var l=YE.triggerHandler(e,"plotly_legendclick",o);if(a===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&VE(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=YE.triggerHandler(e,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&VE(t,e,a)}}function Eve(e,r,t){var a=j1(t),n=e.data()[0][0],i=n.trace,o=tc.traceIs(i,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!o,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=o?n.label:i.name,i._meta&&(u=na.templateString(u,i._meta))));var c=na.ensureSingle(e,"text",a+"text");c.attr("text-anchor","start").call(ia.font,f).text(l?JE(u,s):u);var v=t.indentation+t.itemwidth+ha.itemGap*2;yu.positionText(c,v,0),l?c.call(yu.makeEditable,{gd:r,text:u}).call(Y1,e,r,t).on("edit",function(d){this.text(JE(d,s)).call(Y1,e,r,t);var p=n.trace._fullInput||{},m={};return m.name=d,p._isShape?tc.call("_guiRelayout",r,"shapes["+i.index+"].name",m.name):tc.call("_guiRestyle",r,m,i.index)}):Y1(c,e,r,t)}function JE(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function Dve(e,r,t){var a=r._context.doubleClickDelay,n,i=1,o=na.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(G1.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),KE(r,l,e,i,Rn.event)}}))}function Y1(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),yu.convertToTspans(e,t,function(){Pve(r,t,a,n)})}function Pve(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),o=i.node(),l=j1(t);t||(t=r._fullLayout[l]);var s=t.borderwidth,u;a===ec?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*$E,c,v;if(o){var d=ia.bBox(o);c=d.height,v=d.width,a===ec?ia.setTranslate(i,s,s+c*.75):ia.setTranslate(i,0,c*.25)}else{var p="."+l+(a===ec?"title":"")+"text",m=e.select(p),y=yu.lineCount(m),x=m.node();if(c=f*y,v=x?ia.bBox(x).width:0,a===ec)t.title.side==="left"&&(v+=ha.itemGap*2),yu.positionText(m,s+ha.titlePad,s+f);else{var _=ha.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(_=ha.itemGap,v-=t.indentation+t.itemwidth),yu.positionText(m,_,-f*((y-1)/2-.3))}}a===ec?(t._titleWidth=v,t._titleHeight=c):(n.lineHeight=f,n.height=Math.max(c,16)+3,n.width=v)}function Rve(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function Fve(e,r,t,a){var n=e._fullLayout,i=j1(a);a||(a=n[i]);var o=n._size,l=ZE.isVertical(a),s=ZE.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,v=ha.itemGap,d=a.indentation+a.itemwidth+v*2,p=2*(f+v),m=W1(a),y=a.y<0||a.y===0&&m==="top",x=a.y>1||a.y===1&&m==="bottom",_=a.tracegroupgap,w={};a._maxHeight=Math.max(y||x?n.height/2:o.h,30);var b=0;a._width=0,a._height=0;var T=Rve(a);if(l)t.each(function(ie){var K=ie[0].height;ia.setTranslate(this,f+T[0],f+T[1]+a._height+K/2+v),a._height+=K,a._width=Math.max(a._width,ie[0].width)}),b=d+a._width,a._width+=v+d+c,a._height+=p,s&&(r.each(function(ie,K){ia.setTranslate(this,0,K*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var k=V1(a),M=a.x<0||a.x===0&&k==="right",S=a.x>1||a.x===1&&k==="left",E=x||y,P=n.width/2;a._maxWidth=Math.max(M?E&&k==="left"?o.l+o.w:P:S?E&&k==="right"?o.r+o.w:P:o.w,2*d);var R=0,D=0;t.each(function(ie){var K=U1(ie,a,d);R=Math.max(R,K),D+=K}),b=null;var z=0;if(s){var O=0,H=0,Y=0;r.each(function(){var ie=0,K=0;Rn.select(this).selectAll("g.traces").each(function(oe){var ye=U1(oe,a,d),ue=oe[0].height;ia.setTranslate(this,T[0],T[1]+f+v+ue/2+K),K+=ue,ie=Math.max(ie,ye),w[oe[0].trace.legendgroup]=ie});var he=ie+v;H>0&&he+f+H>a._maxWidth?(z=Math.max(z,H),H=0,Y+=O+_,O=K):O=Math.max(O,K),ia.setTranslate(this,H,Y),H+=he}),a._width=Math.max(z,H)+f,a._height=Y+O+p}else{var G=t.size(),B=D+c+(G-1)*v=a._maxWidth&&(z=Math.max(z,te),X=0,Z+=V,a._height+=V,V=0),ia.setTranslate(this,T[0]+f+X,T[1]+f+Z+K/2+v),te=X+he+v,X+=oe,V=Math.max(V,K)}),B?(a._width=X+c,a._height=V+p):(a._width=Math.max(z,te)+c,a._height+=V+p)}}a._width=Math.ceil(Math.max(a._width+T[0],a._titleWidth+2*(f+ha.titlePad))),a._height=Math.ceil(Math.max(a._height+T[1],a._titleHeight+2*(f+ha.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var fe=e._context.edits,le=fe.legendText||fe.legendPosition;t.each(function(ie){var K=Rn.select(this).select("."+i+"toggle"),he=ie[0].height,oe=ie[0].trace.legendgroup,ye=U1(ie,a,d);s&&oe!==""&&(ye=w[oe]);var ue=le?d:b||ye;!l&&!u&&(ue+=v/2),ia.setRect(K,0,-he/2,ue,he)})}function Nve(e,r,t,a){var n=e._fullLayout,i=n[r],o=V1(i),l=W1(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",c=i.x<.5?"l":"r",v={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return m5.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*rc[o],r:i._width*WE[o],b:i._effHeight*WE[l],t:i._effHeight*rc[l]});s?e._fullLayout._reservedMargin[r][f]=v[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][c]=v[c]:e._fullLayout._reservedMargin[r][f]=v[f]}function V1(e){return na.isRightAnchor(e)?"right":na.isCenterAnchor(e)?"center":"left"}function W1(e){return na.isBottomAnchor(e)?"bottom":na.isMiddleAnchor(e)?"middle":"top"}function j1(e){return e._id||"legend"}});var T5=N(w5=>{"use strict";var mu=Sr(),cl=Pr(),eD=Sn(),Gt=Ee(),zve=Gt.pushUnique,x5=Gt.strTranslate,Ive=Gt.strRotate,Ove=eh(),mi=Ea(),Bve=TE(),Po=jr(),Ta=Tr(),Z1=pi(),Ro=Or(),Hve=Ca().zindexSeparator,nc=gr(),to=qo(),gu=Yv(),Uve=l5(),Gve=b5(),sD=gu.YANGLE,_5=Math.PI*sD/180,Yve=1/Math.sin(_5),Vve=Math.cos(_5),Wve=Math.sin(_5),Nt=gu.HOVERARROWSIZE,Yr=gu.HOVERTEXTPAD,rD={box:!0,ohlc:!0,violin:!0,candlestick:!0},jve={scatter:!0,scattergl:!0,splom:!0};function tD(e,r){return e.distance-r.distance}w5.hover=function(r,t,a,n){r=Gt.getGraphDiv(r);var i=t.target;Gt.throttle(r._fullLayout._uid+gu.HOVERID,gu.HOVERMINTIME,function(){Zve(r,t,a,n,i)})};w5.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=hD(n),o=dD(n),l=r.map(function(y){var x=y._x0||y.x0||y.x||0,_=y._x1||y.x1||y.x||0,w=y._y0||y.y0||y.y||0,b=y._y1||y.y1||y.y||0,T=y.eventData;if(T){var k=Math.min(x,_),M=Math.max(x,_),S=Math.min(w,b),E=Math.max(w,b),P=y.trace;if(nc.traceIs(P,"gl3d")){var R=n._fullLayout[P.scene]._scene.container,D=R.offsetLeft,z=R.offsetTop;k+=D,M+=D,S+=z,E+=z}T.bbox={x0:k+o,x1:M+o,y0:S+i,y1:E+i},t.inOut_bbox&&t.inOut_bbox.push(T.bbox)}else T=!1;return{color:y.color||Ta.defaultLine,x0:y.x0||y.x||0,x1:y.x1||y.x||0,y0:y.y0||y.y||0,y1:y.y1||y.y||0,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:y.text,name:y.name,idealAlign:y.idealAlign,borderColor:y.borderColor,fontFamily:y.fontFamily,fontSize:y.fontSize,fontColor:y.fontColor,fontWeight:y.fontWeight,fontStyle:y.fontStyle,fontVariant:y.fontVariant,nameLength:y.nameLength,textAlign:y.textAlign,trace:y.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:y.hovertemplate||!1,hovertemplateLabels:y.hovertemplateLabels||!1,eventData:T}}),s=!1,u=fD(l,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||Ta.background,container:mu.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,c=5,v=0,d=0;f.sort(function(y,x){return y.y0-x.y0}).each(function(y,x){var _=y.y0-y.by/2;_-cM[0]._length||j<0||j>S[0]._length)return Z1.unhoverRaw(e,r)}if(r.pointerX=Q+M[0]._offset,r.pointerY=j+S[0]._offset,"xval"in r?Y=to.flat(i,r.xval):Y=to.p2c(M,Q),"yval"in r?G=to.flat(i,r.yval):G=to.p2c(S,j),!cl(Y[0])||!cl(G[0]))return Gt.warn("Fx.hover failed",r,e),Z1.unhoverRaw(e,r)}var we=1/0;function Ne(br,pt){for(V=0;Voe&&(O.splice(0,oe),we=O[0].distance),c&&z!==0&&O.length===0){he.distance=z,he.index=!1;var ct=Z._module.hoverPoints(he,ie,K,"closest",{hoverLayer:l._hoverlayer});if(ct&&(ct=ct.filter(function(ut){return ut.spikeDistance<=z})),ct&&ct.length){var ba,Zt=ct.filter(function(ut){return ut.xa.showspikes&&ut.xa.spikesnap!=="hovered data"});if(Zt.length){var tn=Zt[0];cl(tn.x0)&&cl(tn.y0)&&(ba=Re(tn),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>ba.spikeDistance)&&(ye.vLinePoint=ba))}var Tn=ct.filter(function(ut){return ut.ya.showspikes&&ut.ya.spikesnap!=="hovered data"});if(Tn.length){var Xt=Tn[0];cl(Xt.x0)&&cl(Xt.y0)&&(ba=Re(Xt),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>ba.spikeDistance)&&(ye.hLinePoint=ba))}}}}}Ne();function Fe(br,pt,Nr){for(var st=null,Pt=1/0,Qr,ct=0;ct0&&Math.abs(br.distance)Ce-1;lr--)cr(O[lr]);O=Ye,Pe()}var Oe=e._hoverdata,ne=[],ve=hD(e),De=dD(e);for(B=0;B1||O.length>1)||v==="closest"&&ue&&O.length>1,ja=Ta.combine(l.plot_bgcolor||Ta.background,l.paper_bgcolor),ga=fD(O,{gd:e,hovermode:v,rotateLabels:St,bgColor:ja,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),jt=ga.hoverLabels;if(to.isUnifiedHover(v)||(Jve(jt,St,l,ga.commonLabelBoundingBox),vD(jt,St,l._invScaleX,l._invScaleY)),n&&n.tagName){var Na=nc.getComponentMethod("annotations","hasClickToShow")(e,ne);Bve(mu.select(n),Na?"pointer":"")}!n||a||!Qve(e,r,Oe)||(Oe&&e.emit("plotly_unhover",{event:r,points:Oe}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:M,yaxes:S,xvals:Y,yvals:G}))}function uD(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 Xve=/([\s\S]*)<\/extra>/;function fD(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,o=r.bgColor,l=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||gu.HOVERFONT,c=r.fontSize||gu.HOVERFONTSIZE,v=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,p=r.fontVariant||a.font.variant,m=r.fontTextcase||a.font.textcase,y=r.fontLineposition||a.font.lineposition,x=r.fontShadow||a.font.shadow,_=e[0],w=_.xa,b=_.ya,T=n.charAt(0),k=T+"Label",M=_[k];if(M===void 0&&w.type==="multicategory")for(var S=0;Sa.width-Oe&&(ne=a.width-Oe),ir.attr("d","M"+($e-ne)+",0L"+($e-ne+Nt)+","+lr+Nt+"H"+Oe+"v"+lr+(Yr*2+He.height)+"H"+-Oe+"V"+lr+Nt+"H"+($e-ne-Nt)+"Z"),$e=ne,V.minX=$e-Oe,V.maxX=$e+Oe,w.side==="top"?(V.minY=cr-(Yr*2+He.height),V.maxY=cr-Yr):(V.minY=cr+Yr,V.maxY=cr+(Yr*2+He.height))}else{var ve,De,qe;b.side==="right"?(ve="start",De=1,qe="",$e=w._offset+w._length):(ve="end",De=-1,qe="-",$e=w._offset),cr=b._offset+(_.y0+_.y1)/2,Qe.attr("text-anchor",ve),ir.attr("d","M0,0L"+qe+Nt+","+Nt+"V"+(Yr+He.height/2)+"h"+qe+(Yr*2+He.width)+"V-"+(Yr+He.height/2)+"H"+qe+Nt+"V-"+Nt+"Z"),V.minY=cr-(Yr+He.height/2),V.maxY=cr+(Yr+He.height/2),b.side==="right"?(V.minX=$e+Nt,V.maxX=$e+Nt+(Yr*2+He.width)):(V.minX=$e-Nt-(Yr*2+He.width),V.maxX=$e-Nt);var ar=He.height/2,hr=P-He.top-ar,ur="clip"+a._uid+"commonlabel"+b._id,Ar;if($e=0?Ue=Be:ze+j=0?Ue=ze:Pe+j=0?se=Re:Ie+pe=0?se=Ie:Xe+pe=0,(Se.idealAlign==="top"||!zr)&&Et?(qe-=hr/2,Se.anchor="end"):zr?(qe+=hr/2,Se.anchor="start"):Se.anchor="middle",Se.crossPos=qe;else{if(Se.pos=qe,zr=De+ar/2+Vr<=R,Et=De-ar/2-Vr>=0,(Se.idealAlign==="left"||!zr)&&Et)De-=ar/2,Se.anchor="end";else if(zr)De+=ar/2,Se.anchor="start";else{Se.anchor="middle";var Dt=Vr/2,ma=De+Dt-R,St=De-Dt;ma>0&&(De-=ma),St<0&&(De+=-St)}Se.crossPos=De}cr.attr("text-anchor",Se.anchor),Oe&&lr.attr("text-anchor",Se.anchor),ir.attr("transform",x5(De,qe)+(i?Ive(sD):""))}),{hoverLabels:Te,commonLabelBoundingBox:V}}function aD(e,r,t,a,n,i){var o="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Gt.templateString(e.name,e.trace._meta)),o=oD(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?l=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),i&&l===""&&!e.hovertemplate&&(o===""&&i.remove(),l=o);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(c[s+"other"]=c[s+"Val"],c[s+"otherLabel"]=c[s+"Label"]),l=Gt.hovertemplateString(f,c,a._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(Xve,function(v,d){return o=oD(d,e.nameLength),""})}return[l,o]}function Jve(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",o=0,l=1,s=e.size(),u=new Array(s),f=0,c=a.minX,v=a.maxX,d=a.minY,p=a.maxY,m=function(Y){return Y*t._invScaleX},y=function(Y){return Y*t._invScaleY};e.each(function(Y){var G=Y[n],B=Y[i],V=G._id.charAt(0)==="x",X=G.range;f===0&&X&&X[0]>X[1]!==V&&(l=-1);var Z=0,te=V?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var fe=cD(Y,r),le=Y.anchor,ie=le==="end"?-1:1,K,he;if(le==="middle")K=Y.crossPos+(V?y(fe.y-Y.by/2):m(Y.bx/2+Y.tx2width/2)),he=K+(V?y(Y.by):m(Y.bx));else if(V)K=Y.crossPos+y(Nt+fe.y)-y(Y.by/2-Nt),he=K+y(Y.by);else{var oe=m(ie*Nt+fe.x),ye=oe+m(ie*Y.bx);K=Y.crossPos+Math.min(oe,ye),he=Y.crossPos+Math.max(oe,ye)}V?d!==void 0&&p!==void 0&&Math.min(he,p)-Math.max(K,d)>1&&(B.side==="left"?(Z=B._mainLinePosition,te=t.width):te=B._mainLinePosition):c!==void 0&&v!==void 0&&Math.min(he,v)-Math.max(K,c)>1&&(B.side==="top"?(Z=B._mainLinePosition,te=t.height):te=B._mainLinePosition)}u[f++]=[{datum:Y,traceIndex:Y.trace.index,dp:0,pos:Y.pos,posref:Y.posref,size:Y.by*(V?Yve:1)/2,pmin:Z,pmax:te}]}),u.sort(function(Y,G){return Y[0].posref-G[0].posref||l*(G[0].traceIndex-Y[0].traceIndex)});var x,_,w,b,T,k,M;function S(Y){var G=Y[0],B=Y[Y.length-1];if(_=G.pmin-G.pos-G.dp+G.size,w=B.pos+B.dp+B.size-G.pmax,_>.01){for(T=Y.length-1;T>=0;T--)Y[T].dp+=_;x=!1}if(!(w<.01)){if(_<-.01){for(T=Y.length-1;T>=0;T--)Y[T].dp-=w;x=!1}if(x){var V=0;for(b=0;bG.pmax&&V++;for(b=Y.length-1;b>=0&&!(V<=0);b--)k=Y[b],k.pos>G.pmax-1&&(k.del=!0,V--);for(b=0;b=0;T--)Y[T].dp-=w;for(b=Y.length-1;b>=0&&!(V<=0);b--)k=Y[b],k.pos+k.dp+k.size>G.pmax&&(k.del=!0,V--)}}}for(;!x&&o<=s;){for(o++,x=!0,b=0;b.01){for(T=P.length-1;T>=0;T--)P[T].dp+=_;for(E.push.apply(E,P),u.splice(b+1,1),M=0,T=E.length-1;T>=0;T--)M+=E[T].dp;for(w=M/E.length,T=E.length-1;T>=0;T--)E[T].dp-=w;x=!1}else b++}u.forEach(S)}for(b=u.length-1;b>=0;b--){var z=u[b];for(T=z.length-1;T>=0;T--){var O=z[T],H=O.datum;H.offset=O.dp,H.del=O.del}}}function cD(e,r){var t=0,a=e.offset;return r&&(a*=-Wve,t=e.offset*Vve),{x:t,y:a}}function $ve(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Nt+Yr),a=t+r*(e.txwidth+Yr),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Yr),{alignShift:r,textShiftX:t,text2ShiftX:a}}function vD(e,r,t,a){var n=function(o){return o*t},i=function(o){return o*a};e.each(function(o){var l=mu.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),u=o.anchor,f=u==="end"?-1:1,c=$ve(o),v=cD(o,r),d=v.x,p=v.y,m=u==="middle";l.select("path").attr("d",m?"M-"+n(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+n(o.bx)+"v"+i(o.by)+"h-"+n(o.bx)+"Z":"M0,0L"+n(f*Nt+d)+","+i(Nt+p)+"v"+i(o.by/2-Nt)+"h"+n(f*o.bx)+"v-"+i(o.by)+"H"+n(f*Nt+d)+"V"+i(p-Nt)+"Z");var y=d+c.textShiftX,x=p+o.ty0-o.by/2+Yr,_=o.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(s.attr("text-anchor","start"),y=m?-o.bx/2-o.tx2width/2+Yr:-o.bx-Yr):_==="right"&&u!=="end"&&(s.attr("text-anchor","end"),y=m?o.bx/2-o.tx2width/2-Yr:o.bx+Yr)),s.call(mi.positionText,n(y),i(x)),o.tx2width&&(l.select("text.name").call(mi.positionText,n(c.text2ShiftX+c.alignShift*Yr+d),i(p+o.ty0-o.by/2+Yr)),l.select("rect").call(Po.setRect,n(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),i(p-o.by/2-1),n(o.tx2width),i(o.by+2)))})}function Kve(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function o(v){return v||cl(v)&&v===0}var l=Array.isArray(t)?function(v,d){var p=Gt.castOption(n,t,v);return o(p)?p:Gt.extractOption({},a,"",d)}:function(v,d){return Gt.extractOption(i,a,v,d)};function s(v,d,p){var m=l(d,p);o(m)&&(e[v]=m)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Gt.constrain(e.x0,0,e.xa._length),e.x1=Gt.constrain(e.x1,0,e.xa._length),e.y0=Gt.constrain(e.y0,0,e.ya._length),e.y1=Gt.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Ro.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Ro.hoverLabelText(e.ya,e.yLabelVal,a.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=Ro.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Ro.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Ro.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Ro.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function nD(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,o=t.event,l=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||l)){var c=Ta.combine(n.plot_bgcolor,n.paper_bgcolor);if(l){var v=r.hLinePoint,d,p;u=v&&v.xa,f=v&&v.ya;var m=f.spikesnap;m==="cursor"?(d=o.pointerX,p=o.pointerY):(d=u._offset+v.x,p=f._offset+v.y);var y=eD.readability(v.color,c)<1.5?Ta.contrast(c):v.color,x=f.spikemode,_=f.spikethickness,w=f.spikecolor||y,b=Ro.getPxPosition(e,f),T,k;if(x.indexOf("toaxis")!==-1||x.indexOf("across")!==-1){if(x.indexOf("toaxis")!==-1&&(T=b,k=d),x.indexOf("across")!==-1){var M=f._counterDomainMin,S=f._counterDomainMax;f.anchor==="free"&&(M=Math.min(M,f.position),S=Math.max(S,f.position)),T=i.l+M*i.w,k=i.l+S*i.w}a.insert("line",":first-child").attr({x1:T,x2:k,y1:p,y2:p,"stroke-width":_,stroke:w,"stroke-dasharray":Po.dashStyle(f.spikedash,_)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:T,x2:k,y1:p,y2:p,"stroke-width":_+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}x.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:b+(f.side!=="right"?_:-_),cy:p,r:_,fill:w}).classed("spikeline",!0)}if(s){var E=r.vLinePoint,P,R;u=E&&E.xa,f=E&&E.ya;var D=u.spikesnap;D==="cursor"?(P=o.pointerX,R=o.pointerY):(P=u._offset+E.x,R=f._offset+E.y);var z=eD.readability(E.color,c)<1.5?Ta.contrast(c):E.color,O=u.spikemode,H=u.spikethickness,Y=u.spikecolor||z,G=Ro.getPxPosition(e,u),B,V;if(O.indexOf("toaxis")!==-1||O.indexOf("across")!==-1){if(O.indexOf("toaxis")!==-1&&(B=G,V=R),O.indexOf("across")!==-1){var X=u._counterDomainMin,Z=u._counterDomainMax;u.anchor==="free"&&(X=Math.min(X,u.position),Z=Math.max(Z,u.position)),B=i.t+(1-Z)*i.h,V=i.t+(1-X)*i.h}a.insert("line",":first-child").attr({x1:P,x2:P,y1:B,y2:V,"stroke-width":H,stroke:Y,"stroke-dasharray":Po.dashStyle(u.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:P,x2:P,y1:B,y2:V,"stroke-width":H+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}O.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:P,cy:G-(u.side!=="top"?H:-H),r:H,fill:Y}).classed("spikeline",!0)}}}function Qve(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function iD(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function oD(e,r){return mi.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function ehe(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],o=0;o{"use strict";var rhe=Ee(),the=Tr(),ahe=qo().isUnifiedHover;pD.exports=function(r,t,a,n){n=n||{};var i=t.legend;function o(l){n.font[l]||(n.font[l]=i?t.legend.font[l]:t.font[l])}t&&ahe(t.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(n.bgcolor||(n.bgcolor=the.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),rhe.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var mD=N((tDe,yD)=>{"use strict";var nhe=Ee(),ihe=X1(),ohe=Tf();yD.exports=function(r,t){function a(n,i){return nhe.coerce(r,t,ohe,n,i)}ihe(r,t,a)}});var xD=N((aDe,bD)=>{"use strict";var gD=Ee(),lhe=dp(),she=X1();bD.exports=function(r,t,a,n){function i(l,s){return gD.coerce(r,t,lhe,l,s)}var o=gD.extendFlat({},n.hoverlabel);t.hovertemplate&&(o.namelength=-1),she(r,t,i,o)}});var A5=N((nDe,_D)=>{"use strict";var uhe=Ee(),fhe=Tf();_D.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:uhe.coerce(r,t,fhe,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var AD=N((iDe,TD)=>{"use strict";var wD=Ee(),che=Tf(),vhe=A5(),hhe=X1();TD.exports=function(r,t){function a(f,c){return wD.coerce(r,t,che,f,c)}var n=vhe(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var o=t._has("mapbox"),l=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((o||l||s)&&u===1||(o||l)&&s&&u===2)&&(t.dragmode="pan"),hhe(r,t,a),wD.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var SD=N((oDe,kD)=>{"use strict";var M5=Ee(),MD=gr();kD.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return M5.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var phe=gr(),yhe=T5().hover;qD.exports=function(r,t,a){var n=phe.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&yhe(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var Fn=N((sDe,DD)=>{"use strict";var mhe=Sr(),J1=Ee(),ghe=pi(),bh=qo(),CD=Tf(),ED=T5();DD.exports={moduleType:"component",name:"fx",constants:Yv(),schema:{layout:CD},attributes:dp(),layoutAttributes:CD,supplyLayoutGlobalDefaults:mD(),supplyDefaults:xD(),supplyLayoutDefaults:AD(),calc:SD(),getDistanceFunction:bh.getDistanceFunction,getClosest:bh.getClosest,inbox:bh.inbox,quadrature:bh.quadrature,appendArrayPointValue:bh.appendArrayPointValue,castHoverOption:xhe,castHoverinfo:_he,hover:ED.hover,unhover:ghe.unhover,loneHover:ED.loneHover,loneUnhover:bhe,click:LD()};function bhe(e){var r=J1.isD3Selection(e)?e:mhe.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function xhe(e,r,t){return J1.castOption(e,r,"hoverlabel."+t)}function _he(e,r,t){function a(n){return J1.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return J1.castOption(e,t,"hoverinfo",a)}});var bu=N(vl=>{"use strict";vl.selectMode=function(e){return e==="lasso"||e==="select"};vl.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};vl.openMode=function(e){return e==="drawline"||e==="drawopenpath"};vl.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};vl.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};vl.selectingOrDrawing=function(e){return vl.freeMode(e)||vl.rectMode(e)}});var $1=N((fDe,PD)=>{"use strict";PD.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var K1=N((cDe,RD)=>{"use strict";RD.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 ey=N((vDe,FD)=>{"use strict";var Q1=32;FD.exports={CIRCLE_SIDES:Q1,i000:0,i090:Q1/4,i180:Q1/2,i270:Q1/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var ry=N((hDe,zD)=>{"use strict";var whe=Ee().strTranslate;function ND(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function The(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function Ahe(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return ND(e,t[r])}}function Mhe(e){return whe(e.xaxis._offset,e.yaxis._offset)}zD.exports={p2r:ND,r2p:The,axValue:Ahe,getTransform:Mhe}});var ts=N(hl=>{"use strict";var khe=dx(),BD=ey(),ic=BD.CIRCLE_SIDES,k5=BD.SQRT2,HD=ry(),ID=HD.p2r,OD=HD.r2p,She=[0,3,4,5,6,1,2],qhe=[0,3,4,1,2];hl.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var WD=bu(),Lhe=WD.drawMode,Che=WD.openMode,oc=ey(),UD=oc.i000,GD=oc.i090,YD=oc.i180,VD=oc.i270,Ehe=oc.cos45,Dhe=oc.sin45,jD=ry(),ay=jD.p2r,as=jD.r2p,Phe=Zl(),Rhe=Phe.clearOutline,ny=ts(),Fhe=ny.readPaths,Nhe=ny.writePaths,zhe=ny.ellipseOver,Ihe=ny.fixDatesForPaths;function Ohe(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,o=(a.layout||{}).shapes||[];if(!Lhe(i)&&n!==void 0){var l=a._fullLayout._activeShapeIndex;if(l{"use strict";var Bhe=bu(),Hhe=Bhe.selectMode,Uhe=Zl(),Ghe=Uhe.clearOutline,S5=ts(),Yhe=S5.readPaths,Vhe=S5.writePaths,Whe=S5.fixDatesForPaths;JD.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,o=i._fullLayout.newselection,l=t.plotinfo,s=l.xaxis,u=l.yaxis,f=t.isActiveSelection,c=t.dragmode,v=(i.layout||{}).selections||[];if(!Hhe(c)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";$D.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 ns=N(Da=>{"use strict";var xu=_h(),KD=Ee(),oy=Or();Da.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};Da.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};Da.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};Da.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};Da.extractPathCoords=function(e,r,t){var a=[],n=e.match(xu.segmentRE);return n.forEach(function(i){var o=r[i.charAt(0)].drawn;if(o!==void 0){var l=i.substr(1).match(xu.paramRE);if(!(!l||l.lengthd&&(m="X"),m});return u>d&&(p=p.replace(/[\s,]*X.*/,""),KD.log("Ignoring extra params in segment "+s)),f+p})}function wh(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var C5=N((bDe,tP)=>{"use strict";var Zhe=Ee(),lc=Or(),QD=Ea(),eP=jr(),Xhe=ts().readPaths,L5=ns(),Jhe=L5.getPathString,rP=Ap(),$he=Xa().FROM_TL;tP.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var o={};if(a.type!=="path"){var l=lc.getFromId(r,a.xref),s=lc.getFromId(r,a.yref);for(var u in rP){var f=rP[u](a,l,s);f!==void 0&&(o[u]=f)}}i=Zhe.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,o)}else i=a.label.text;var c={"data-index":t},v=a.label.font,d={"data-notex":1},p=n.append("g").attr(c).classed("shape-label",!0),m=p.append("text").attr(d).classed("shape-label-text",!0).text(i),y,x,_,w;if(a.path){var b=Jhe(r,a),T=Xhe(b,r);y=1/0,_=1/0,x=-1/0,w=-1/0;for(var k=0;k=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function Qhe(e,r,t,a,n,i,o){var l=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,c=Math.PI/180*i,v=Math.sin(c),d=Math.cos(c),p=n.label.xanchor,m=n.label.yanchor,y,x,_,w;if(f==="line"){l==="start"?(y=e,x=r):l==="end"?(y=t,x=a):(y=(e+t)/2,x=(r+a)/2),p==="auto"&&(l==="start"?s==="auto"?t>e?p="left":te?p="right":te?p="right":te?p="left":t{"use strict";var e0e=Ee(),r0e=e0e.strTranslate,aP=pi(),oP=bu(),t0e=oP.drawMode,lP=oP.selectMode,sP=gr(),nP=Tr(),sy=ey(),a0e=sy.i000,n0e=sy.i090,i0e=sy.i180,o0e=sy.i270,l0e=Zl(),uP=l0e.clearOutlineControllers,D5=ts(),ly=D5.pointsOnRectangle,E5=D5.pointsOnEllipse,s0e=D5.writePaths,u0e=iy().newShapes,f0e=iy().createShapeObj,c0e=q5(),v0e=C5();fP.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function o(){e(r,t,a,n++),(E5(r[0])||a.hasText)&&l({redrawing:!0})}function l(G){var B={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,B=u0e(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,B=c0e(t,a),i._fullLayout._reselect=!0),Object.keys(B).length&&sP.call((G||{}).redrawing?"relayout":"_guiRelayout",i,B)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,c=t0e(f),v=lP(f);(c||v)&&(i._fullLayout._outlining=!0),uP(i),t.attr("d",s0e(r));var d,p,m,y,x;if(!n&&(a.isActiveShape||a.isActiveSelection)){x=h0e([],r);var _=u.append("g").attr("class","outline-controllers");P(_),Y()}if(c&&a.hasText){var w=u.select(".label-temp"),b=f0e(t,a,a.dragmode);v0e(i,"label-temp",b,w)}function T(G){m=+G.srcElement.getAttribute("data-i"),y=+G.srcElement.getAttribute("data-j"),d[m][y].moveFn=k}function k(G,B){if(r.length){var V=x[m][y][1],X=x[m][y][2],Z=r[m],te=Z.length;if(ly(Z)){var fe=G,le=B;if(a.isActiveSelection){var ie=iP(Z,y);ie[1]===Z[y][1]?le=0:fe=0}for(var K=0;K1&&!(G.length===2&&G[1][0]==="Z")&&(y===0&&(G[0][0]="M"),r[m]=G,o(),l())}}function E(G,B){if(G===2){m=+B.srcElement.getAttribute("data-i"),y=+B.srcElement.getAttribute("data-j");var V=r[m];!ly(V)&&!E5(V)&&S()}}function P(G){d=[];for(var B=0;B{"use strict";var p0e=Sr(),yP=gr(),cP=Ee(),sc=Or(),y0e=ts().readPaths,m0e=uy(),cy=C5(),mP=Zl().clearOutlineControllers,P5=Tr(),F5=jr(),g0e=_t().arrayEditor,vP=pi(),hP=rs(),_u=_h(),Nn=ns(),R5=Nn.getPathString;xP.exports={draw:N5,drawOne:gP,eraseActiveShape:_0e,drawLabel:cy};function N5(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;no&&Be>l&&!Fe.shiftKey?vP.getCursor(ze/Ie,1-Pe/Be):"move";hP(r,Xe),he=Xe.split("-")[0]}}function de(Fe){fy(e)||(s&&(x=Z(t.xanchor)),u&&(_=te(t.yanchor)),t.type==="path"?R=t.path:(d=s?t.x0:Z(t.x0),p=u?t.y0:te(t.y0),m=s?t.x1:Z(t.x1),y=u?t.y1:te(t.y1)),dy?(w=p,M="y0",b=y,S="y1"):(w=y,M="y1",b=p,S="y0"),ue(Fe),me(n,t),Ne(r,t,e),K.moveFn=he==="move"?j:pe,K.altKey=Fe.altKey)}function W(){fy(e)||(hP(r),we(n),bP(r,e,t),yP.call("_guiRelayout",e,i.getUpdateObj()))}function Q(){fy(e)||we(n)}function j(Fe,Re){if(t.type==="path"){var Ie=function(Pe){return Pe},Be=Ie,ze=Ie;s?v("xanchor",t.xanchor=fe(x+Fe)):(Be=function(Xe){return fe(Z(Xe)+Fe)},z&&z.type==="date"&&(Be=Nn.encodeDate(Be))),u?v("yanchor",t.yanchor=le(_+Re)):(ze=function(Xe){return le(te(Xe)+Re)},H&&H.type==="date"&&(ze=Nn.encodeDate(ze))),v("path",t.path=dP(R,Be,ze))}else s?v("xanchor",t.xanchor=fe(x+Fe)):(v("x0",t.x0=fe(d+Fe)),v("x1",t.x1=fe(m+Fe))),u?v("yanchor",t.yanchor=le(_+Re)):(v("y0",t.y0=le(p+Re)),v("y1",t.y1=le(y+Re)));r.attr("d",R5(e,t)),me(n,t),cy(e,a,t,D)}function pe(Fe,Re){if(c){var Ie=function(He){return He},Be=Ie,ze=Ie;s?v("xanchor",t.xanchor=fe(x+Fe)):(Be=function($e){return fe(Z($e)+Fe)},z&&z.type==="date"&&(Be=Nn.encodeDate(Be))),u?v("yanchor",t.yanchor=le(_+Re)):(ze=function($e){return le(te($e)+Re)},H&&H.type==="date"&&(ze=Nn.encodeDate(ze))),v("path",t.path=dP(R,Be,ze))}else if(f){if(he==="resize-over-start-point"){var Pe=d+Fe,Xe=u?p-Re:p+Re;v("x0",t.x0=s?Pe:fe(Pe)),v("y0",t.y0=u?Xe:le(Xe))}else if(he==="resize-over-end-point"){var Ue=m+Fe,se=u?y-Re:y+Re;v("x1",t.x1=s?Ue:fe(Ue)),v("y1",t.y1=u?se:le(se))}}else{var Te=function(He){return he.indexOf(He)!==-1},Se=Te("n"),ir=Te("s"),Qe=Te("w"),Le=Te("e"),Ce=Se?w+Re:w,Ge=ir?b+Re:b,Ze=Qe?T+Fe:T,Ye=Le?k+Fe:k;u&&(Se&&(Ce=w-Re),ir&&(Ge=b-Re)),(!u&&Ge-Ce>l||u&&Ce-Ge>l)&&(v(M,t[M]=u?Ce:le(Ce)),v(S,t[S]=u?Ge:le(Ge))),Ye-Ze>o&&(v(E,t[E]=s?Ze:fe(Ze)),v(P,t[P]=s?Ye:fe(Ye)))}r.attr("d",R5(e,t)),me(n,t),cy(e,a,t,D)}function me(Fe,Re){(s||u)&&Ie();function Ie(){var Be=Re.type!=="path",ze=Fe.selectAll(".visual-cue").data([0]),Pe=1;ze.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Pe}).classed("visual-cue",!0);var Xe=Z(s?Re.xanchor:cP.midRange(Be?[Re.x0,Re.x1]:Nn.extractPathCoords(Re.path,_u.paramIsX))),Ue=te(u?Re.yanchor:cP.midRange(Be?[Re.y0,Re.y1]:Nn.extractPathCoords(Re.path,_u.paramIsY)));if(Xe=Nn.roundPositionForSharpStrokeRendering(Xe,Pe),Ue=Nn.roundPositionForSharpStrokeRendering(Ue,Pe),s&&u){var se="M"+(Xe-1-Pe)+","+(Ue-1-Pe)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ze.attr("d",se)}else if(s){var Te="M"+(Xe-1-Pe)+","+(Ue-9-Pe)+"v18 h2 v-18 Z";ze.attr("d",Te)}else{var Se="M"+(Xe-9-Pe)+","+(Ue-1-Pe)+"h18 v2 h-18 Z";ze.attr("d",Se)}}}function we(Fe){Fe.selectAll(".visual-cue").remove()}function Ne(Fe,Re,Ie){var Be=Re.xref,ze=Re.yref,Pe=sc.getFromId(Ie,Be),Xe=sc.getFromId(Ie,ze),Ue="";Be!=="paper"&&!Pe.autorange&&(Ue+=Be),ze!=="paper"&&!Xe.autorange&&(Ue+=ze),F5.setClipUrl(Fe,Ue?"clip"+Ie._fullLayout._uid+Ue:null,Ie)}}function dP(e,r,t){return e.replace(_u.segmentRE,function(a){var n=0,i=a.charAt(0),o=_u.paramIsX[i],l=_u.paramIsY[i],s=_u.numParams[i],u=a.substr(1).replace(_u.paramRE,function(f){return n>=s||(o[n]?f=r(f):l[n]&&(f=t(f)),n++),f});return i+u})}function x0e(e,r){if(vy(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){pP(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=pP,N5(e)}}}function pP(e){if(vy(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(mP(e),delete e._fullLayout._activeShapeIndex,N5(e))}}function _0e(e){if(vy(e)){mP(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var gi=gr(),_P=ea(),wP=va(),Zr=K1(),w0e=hy().eraseActiveShape,dy=Ee(),Ur=dy._,Xr=LP.exports={};Xr.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Ur(e,"Download plot as a png"):Ur(e,"Download plot")},icon:Zr.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};dy.notifier(Ur(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),gi.call("downloadImage",e,t).then(function(a){dy.notifier(Ur(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){dy.notifier(Ur(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Xr.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Ur(e,"Edit in Chart Studio")},icon:Zr.disk,click:function(e){_P.sendDataToCloud(e)}};Xr.editInChartStudio={name:"editInChartStudio",title:function(e){return Ur(e,"Edit in Chart Studio")},icon:Zr.pencil,click:function(e){_P.sendDataToCloud(e)}};Xr.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ur(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Zr.zoombox,click:sn};Xr.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ur(e,"Pan")},attr:"dragmode",val:"pan",icon:Zr.pan,click:sn};Xr.select2d={name:"select2d",_cat:"select",title:function(e){return Ur(e,"Box Select")},attr:"dragmode",val:"select",icon:Zr.selectbox,click:sn};Xr.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ur(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Zr.lasso,click:sn};Xr.drawclosedpath={name:"drawclosedpath",title:function(e){return Ur(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Zr.drawclosedpath,click:sn};Xr.drawopenpath={name:"drawopenpath",title:function(e){return Ur(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Zr.drawopenpath,click:sn};Xr.drawline={name:"drawline",title:function(e){return Ur(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Zr.drawline,click:sn};Xr.drawrect={name:"drawrect",title:function(e){return Ur(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Zr.drawrect,click:sn};Xr.drawcircle={name:"drawcircle",title:function(e){return Ur(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Zr.drawcircle,click:sn};Xr.eraseshape={name:"eraseshape",title:function(e){return Ur(e,"Erase active shape")},icon:Zr.eraseshape,click:w0e};Xr.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ur(e,"Zoom in")},attr:"zoom",val:"in",icon:Zr.zoom_plus,click:sn};Xr.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ur(e,"Zoom out")},attr:"zoom",val:"out",icon:Zr.zoom_minus,click:sn};Xr.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ur(e,"Autoscale")},attr:"zoom",val:"auto",icon:Zr.autoscale,click:sn};Xr.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ur(e,"Reset axes")},attr:"zoom",val:"reset",icon:Zr.home,click:sn};Xr.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ur(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Zr.tooltip_basic,gravity:"ne",click:sn};Xr.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ur(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Zr.tooltip_compare,gravity:"ne",click:sn};function sn(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,o={},l=wP.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var c=n==="in"?.5:2,v=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var CP=O5(),M0e=Object.keys(CP),EP=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],DP=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(EP),fc=[],k0e=function(e){if(DP.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();fc.indexOf(r)===-1&&fc.push(r),fc.indexOf(t)===-1&&fc.push(t)}};M0e.forEach(function(e){k0e(CP[e])});fc.sort();PP.exports={DRAW_MODES:EP,backButtons:DP,foreButtons:fc}});var H5=N((MDe,RP)=>{"use strict";var ADe=B5();RP.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 NP=N((kDe,FP)=>{"use strict";var S0e=Ee(),Th=Tr(),q0e=_t(),L0e=H5();FP.exports=function(r,t){var a=r.modebar||{},n=q0e.newContainer(t,"modebar");function i(l,s){return S0e.coerce(a,n,L0e,l,s)}i("orientation"),i("bgcolor",Th.addOpacity(t.paper_bgcolor,.5));var o=Th.contrast(Th.rgb(t.modebar.bgcolor));i("color",Th.addOpacity(o,.3)),i("activecolor",Th.addOpacity(o,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var BP=N((SDe,OP)=>{"use strict";var U5=Sr(),C0e=Pr(),yy=Ee(),zP=K1(),E0e=ep().version,D0e=new DOMParser;function IP(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Fo=IP.prototype;Fo.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(c){c.style.backgroundColor=i.bgcolor}),yy.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var l=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(l||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Fo.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var o=r.createButton(n);r.buttonElements.push(o),a.appendChild(o)}),r.element.appendChild(a)})};Fo.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};Fo.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&U5.select(t).classed("active",!0);var o=e.icon;return typeof o=="function"?t.appendChild(o()):t.appendChild(this.createIcon(o||zP.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};Fo.createIcon=function(e){var r=C0e(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=D0e.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Fo.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=U5.select(a),s=function(c,v){var d=r.modebar,p=c.querySelector(".icon path");p&&(v||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(i===t){var u=!l.classed("active");l.classed("active",u),s(a,u)}}else{var f=i===null?i:yy.nestedProperty(r,i).get();l.classed("active",f===n),s(a,f===n)}})};Fo.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var F0e=va(),HP=Pn(),G5=gr(),N0e=qo().isUnifiedHover,z0e=BP(),my=O5(),I0e=B5().DRAW_MODES,O0e=Ee().extendDeep;UP.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,o;Array.isArray(i)&&i.length?o=V0e(i):!a.displayModeBar&&a.watermark?o=[]:o=B0e(r),n?n.update(r,o):t._modeBar=z0e(r,o)};function B0e(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(B,V){if(typeof V=="string"){if(V.toLowerCase()===B.toLowerCase())return!0}else{var X=V.name,Z=V._cat||V.name;if(X===B||Z===B.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var o=r.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(i.filter(function(B){for(var V=0;V1?(P=["toggleHover"],R=["resetViews"]):c?(E=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],R=["resetGeo"]):f?(P=["hoverClosest3d"],R=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(E=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],R=["resetViewMapbox"]):y?(E=["zoomInMap","zoomOutMap"],P=["toggleHover"],R=["resetViewMap"]):v?P=["hoverClosestPie"]:w?(P=["hoverClosestCartesian","hoverCompareCartesian"],R=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(G0e(t)||T)&&(P=[]),u&&!b&&(E=["zoomIn2d","zoomOut2d","autoScale2d"],R[0]!=="resetViews"&&(R=["resetScale2d"])),f?D=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||p?D=["zoom2d","pan2d"]:m||y||c?D=["pan2d"]:x&&(D=["zoom2d"]),U0e(t)&&D.push("select2d","lasso2d");var z=[],O=function(B){z.indexOf(B)===-1&&P.indexOf(B)!==-1&&z.push(B)};if(Array.isArray(l)){for(var H=[],Y=0;Y{"use strict";YP.exports={moduleType:"component",name:"modebar",layoutAttributes:H5(),supplyLayoutDefaults:NP(),manage:GP()}});var V5=N((CDe,VP)=>{"use strict";var W0e=Xa().FROM_BL;VP.exports=function(r,t,a){a===void 0&&(a=W0e[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var Tu=N(Ah=>{"use strict";var wu=Ee(),W5=fh(),ao=va().id2name,j0e=hi(),WP=V5(),Z0e=Zf(),X0e=Ft().ALMOST_EQUAL,J0e=Xa().FROM_BL;Ah.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],o=r._axisMatchGroups=[],l,s,u,f,c,v,d,p;for(l=0;li?t.substr(i):a.substr(n))+o}function K0e(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),o=0;oX0e*p&&!_)){for(i=0;iD&&XP&&(P=X);var te=(P-E)/(2*R);c/=te,E=s.l2r(E),P=s.l2r(P),s.range=s._input.range=k{"use strict";var by=Sr(),un=gr(),$n=ea(),bi=Ee(),X5=Ea(),J5=$1(),Mh=Tr(),cc=jr(),JP=jf(),rR=Y5(),kh=Or(),dl=Xa(),tR=Tu(),Q0e=tR.enforce,ede=tR.clean,$P=fh().doAutoRange,aR="start",rde="middle",nR="end",tde=Ca().zindexSeparator;Aa.layoutStyles=function(e){return bi.syncOrAsync([$n.doAutoMargin,nde],e)};function ade(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function nde(e){var r=e._fullLayout,t=r._size,a=t.p,n=kh.list(e,"",!0),i,o,l,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(cc.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),Aa.drawMainTitle(e),rR.manage(e),!r._has("cartesian"))return $n.previousPromises(e);function c(de,W,Q){var j=de._lw/2;if(de._id.charAt(0)==="x"){if(W){if(Q==="top")return W._offset-a-j}else return t.t+t.h*(1-(de.position||0))+j%1;return W._offset+W._length+a+j}if(W){if(Q==="right")return W._offset+W._length+a+j}else return t.l+t.w*(de.position||0)+j%1;return W._offset-a-j}for(i=0;i0){sde(e,i,u,s),l.attr({x:o,y:i,"text-anchor":a,dy:eR(r.yanchor)}).call(X5.positionText,o,i);var f=(r.text.match(X5.BR_TAG_ALL)||[]).length;if(f){var c=dl.LINE_SPACING*f+dl.MID_SHIFT;r.y===0&&(c=-c),l.selectAll(".line").each(function(){var y=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",y)})}var v=by.selectAll(".gtitle-subtitle");if(v.node()){var d=l.node().getBBox(),p=d.y+d.height,m=p+JP.SUBTITLE_PADDING_EM*r.subtitle.font.size;v.attr({x:o,y:m,"text-anchor":a,dy:eR(r.yanchor)}).call(X5.positionText,o,m)}}}};function ide(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=bi.isTopAnchor(r)?a:a-n,l=t==="b"?i-o:o;return bi.isTopAnchor(r)&&t==="t"||bi.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",o=e._fullLayout.margin[i],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=ode(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>o?l:0}function sde(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",l={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&ide(e,i,o,r,a)?l[o]=t:i.yref==="container"&&(s[o]=t,e._fullLayout._reservedMargin[n]=s),$n.allowAutoMargin(e,n),$n.autoMargin(e,n,l)}function ude(e,r){var t=e.title,a=e._size,n=0;switch(r===aR?n=t.pad.l:r===nR&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function fde(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===dl.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function eR(e){return e==="top"?dl.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":dl.MID_SHIFT+"em"}function cde(e){var r=e.title,t=rde;return bi.isRightAnchor(r)?t=nR:bi.isLeftAnchor(r)&&(t=aR),t}function vde(e){var r=e.title,t="0em";return bi.isTopAnchor(r)?t=dl.CAP_SHIFT+"em":bi.isMiddleAnchor(r)&&(t=dl.MID_SHIFT+"em"),t}Aa.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var hde=ts().readPaths,dde=uy(),iR=Zl().clearOutlineControllers,$5=Tr(),oR=jr(),pde=_t().arrayEditor,lR=ns(),yde=lR.getPathString;uR.exports={draw:_y,drawOne:sR,activateLastSelection:bde};function _y(e){var r=e._fullLayout;iR(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;y--){var x=o.append("path").attr(s).style("opacity",y?.1:u).call($5.stroke,c).call($5.fill,f).call(oR.dashLine,y?"solid":d,y?4+v:v);if(mde(x,e,a),p){var _=pde(e.layout,"selections",a);x.style({cursor:"move"});var w={element:x.node(),plotinfo:n,gd:e,editHelpers:_,isActiveSelection:!0},b=hde(l,e);dde(b,x,w)}else x.style("pointer-events",y?"all":"none");m[y]=x}var T=m[0],k=m[1];k.node().addEventListener("click",function(){return gde(e,T)})}}function mde(e,r,t){var a=t.xref+t.yref;oR.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function gde(e,r){if(wy(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){K5(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=K5,_y(e)}}}function bde(e){if(wy(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=K5,_y(e)}}function K5(e){if(wy(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(iR(e),delete e._fullLayout._activeSelectionIndex,_y(e))}}});var cR=N((RDe,fR)=>{function xde(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,o){return a("temp_status",{seg:n,above:i,below:o})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,o){return a("status",{seg:n,above:i,below:o})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}fR.exports=xde});var hR=N((FDe,vR)=>{function _de(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],o=a[1],l=n[0],s=n[1],u=t[0],f=t[1];return(l-i)*(f-o)-(s-o)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],o=n[0]-a[0],l=t[0]-a[0],s=n[1]-a[1],u=l*o+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=l-i>e&&(o-f)*(i-c)/(l-c)+f-n>e&&(s=!s),o=f,l=c}return s}};return r}vR.exports=_de});var pR=N((NDe,dR)=>{var wde={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};dR.exports=wde});var mR=N((zDe,yR)=>{var Sh=pR();function Tde(e,r,t){function a(p,m){return{id:t?t.segmentId():-1,start:p,end:m,myFill:{above:null,below:null},otherFill:null}}function n(p,m,y){return{id:t?t.segmentId():-1,start:p,end:m,myFill:{above:y.myFill.above,below:y.myFill.below},otherFill:null}}var i=Sh.create();function o(p,m,y,x,_,w){var b=r.pointsCompare(m,_);return b!==0?b:r.pointsSame(y,w)?0:p!==x?p?1:-1:r.pointAboveOrOnLine(y,x?_:w,x?w:_)?1:-1}function l(p,m){i.insertBefore(p,function(y){var x=o(p.isStart,p.pt,m,y.isStart,y.pt,y.other.pt);return x<0})}function s(p,m){var y=Sh.node({isStart:!0,pt:p.start,seg:p,primary:m,other:null,status:null});return l(y,p.end),y}function u(p,m,y){var x=Sh.node({isStart:!1,pt:m.end,seg:m,primary:y,other:p,status:null});p.other=x,l(x,p.pt)}function f(p,m){var y=s(p,m);return u(y,p,m),y}function c(p,m){t&&t.segmentChop(p.seg,m),p.other.remove(),p.seg.end=m,p.other.pt=m,l(p.other,p.pt)}function v(p,m){var y=n(m,p.seg.end,p.seg);return c(p,m),f(y,p.primary)}function d(p,m){var y=Sh.create();function x(H,Y){var G=H.seg.start,B=H.seg.end,V=Y.seg.start,X=Y.seg.end;return r.pointsCollinear(G,V,X)?r.pointsCollinear(B,V,X)||r.pointAboveOrOnLine(B,V,X)?1:-1:r.pointAboveOrOnLine(G,V,X)?1:-1}function _(H){return y.findTransition(function(Y){var G=x(H,Y.ev);return G>0})}function w(H,Y){var G=H.seg,B=Y.seg,V=G.start,X=G.end,Z=B.start,te=B.end;t&&t.checkIntersection(G,B);var fe=r.linesIntersect(V,X,Z,te);if(fe===!1){if(!r.pointsCollinear(V,X,Z)||r.pointsSame(V,te)||r.pointsSame(X,Z))return!1;var le=r.pointsSame(V,Z),ie=r.pointsSame(X,te);if(le&&ie)return Y;var K=!le&&r.pointBetween(V,Z,te),he=!ie&&r.pointBetween(X,Z,te);if(le)return he?v(Y,X):v(H,te),Y;K&&(ie||(he?v(Y,X):v(H,te)),v(Y,V))}else fe.alongA===0&&(fe.alongB===-1?v(H,Z):fe.alongB===0?v(H,fe.pt):fe.alongB===1&&v(H,te)),fe.alongB===0&&(fe.alongA===-1?v(Y,V):fe.alongA===0?v(Y,fe.pt):fe.alongA===1&&v(Y,X));return!1}for(var b=[];!i.isEmpty();){var T=i.getHead();if(t&&t.vert(T.pt[0]),T.isStart){let H=function(){if(M){var Y=w(T,M);if(Y)return Y}return S?w(T,S):!1};var O=H;t&&t.segmentNew(T.seg,T.primary);var k=_(T),M=k.before?k.before.ev:null,S=k.after?k.after.ev:null;t&&t.tempStatus(T.seg,M?M.seg:!1,S?S.seg:!1);var E=H();if(E){if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,P&&(E.seg.myFill.above=!E.seg.myFill.above)}else E.seg.otherFill=T.seg.myFill;t&&t.segmentUpdate(E.seg),T.other.remove(),T.remove()}if(i.getHead()!==T){t&&t.rewind(T.seg);continue}if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,S?T.seg.myFill.below=S.seg.myFill.above:T.seg.myFill.below=p,P?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var R;S?T.primary===S.primary?R=S.seg.otherFill.above:R=S.seg.myFill.above:R=T.primary?m:p,T.seg.otherFill={above:R,below:R}}t&&t.status(T.seg,M?M.seg:!1,S?S.seg:!1),T.other.status=k.insert(Sh.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(y.exists(D.prev)&&y.exists(D.next)&&w(D.prev.ev,D.next.ev),t&&t.statusRemove(D.ev.seg),D.remove(),!T.primary){var z=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=z}b.push(T.seg)}i.getHead().remove()}return t&&t.done(),b}return e?{addRegion:function(p){for(var m,y=p[p.length-1],x=0;x{function Ade(e,r,t){var a=[],n=[];return e.forEach(function(i){var o=i.start,l=i.end;if(r.pointsSame(o,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function c(O,H,Y){return f.index=O,f.matches_head=H,f.matches_pt1=Y,f===s?(f=u,!1):(f=null,!0)}for(var v=0;v{function qh(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var Mde={union:function(e,r){return qh(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return qh(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return qh(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return qh(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return qh(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};xR.exports=Mde});var TR=N((BDe,wR)=>{var kde={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=o(i[0]),s=1;s{var Sde=cR(),qde=hR(),AR=mR(),Lde=bR(),Lh=_R(),MR=TR(),xi=!1,Ch=qde(),zn;zn={buildLog:function(e){return e===!0?xi=Sde():e===!1&&(xi=!1),xi===!1?!1:xi.list},epsilon:function(e){return Ch.epsilon(e)},segments:function(e){var r=AR(!0,Ch,xi);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=AR(!1,Ch,xi);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:Lh.union(e.combined,xi),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:Lh.intersect(e.combined,xi),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:Lh.difference(e.combined,xi),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:Lh.differenceRev(e.combined,xi),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:Lh.xor(e.combined,xi),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Lde(e.segments,Ch,xi),inverted:e.inverted}},polygonFromGeoJSON:function(e){return MR.toPolygon(zn,e)},polygonToGeoJSON:function(e){return MR.fromPolygon(zn,Ch,e)},union:function(e,r){return Eh(e,r,zn.selectUnion)},intersect:function(e,r){return Eh(e,r,zn.selectIntersect)},difference:function(e,r){return Eh(e,r,zn.selectDifference)},differenceRev:function(e,r){return Eh(e,r,zn.selectDifferenceRev)},xor:function(e,r){return Eh(e,r,zn.selectXor)}};function Eh(e,r,t){var a=zn.segments(e),n=zn.segments(r),i=zn.combine(a,n),o=t(i);return zn.polygon(o)}typeof window=="object"&&(window.PolyBool=zn);kR.exports=zn});var LR=N((UDe,qR)=>{qR.exports=function(r,t,a,n){var i=r[0],o=r[1],l=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;uo!=p>o&&i<(d-c)*(o-v)/(p-v)+c;m&&(l=!l)}return l}});var r_=N((GDe,CR)=>{"use strict";var e_=xp().dot,Ty=Ft().BADNUM,Ay=CR.exports={};Ay.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],o=i,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;ln||x===Ty||xo||m&&u(p))}function c(p,m){var y=p[0],x=p[1];if(y===Ty||yn||x===Ty||xo)return!1;var _=t.length,w=t[0][0],b=t[0][1],T=0,k,M,S,E,P;for(k=1;k<_;k++)if(M=w,S=b,w=t[k][0],b=t[k][1],E=Math.min(M,w),!(yMath.max(M,w)||x>Math.max(S,b)))if(xl||Math.abs(e_(c,u))>n)return!0;return!1};Ay.filter=function(r,t){var a=[r[0]],n=0,i=0;function o(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var c=f+1;c1){var l=r.pop();o(l)}return{addPt:o,raw:r,filtered:a}}});var DR=N((YDe,ER)=>{"use strict";ER.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var eF=N((VDe,QR)=>{"use strict";var PR=SR(),Cde=LR(),Rh=gr(),Ede=jr().dashStyle,Dh=Tr(),Dde=Fn(),Pde=qo().makeEventData,Oh=bu(),Rde=Oh.freeMode,Fde=Oh.rectMode,Fh=Oh.drawMode,i_=Oh.openMode,o_=Oh.selectMode,RR=ns(),FR=_h(),BR=uy(),HR=Zl().clearOutline,UR=ts(),t_=UR.handleEllipse,Nde=UR.readPaths,zde=iy().newShapes,Ide=q5(),Ode=Q5().activateLastSelection,ky=Ee(),Bde=ky.sorterAsc,GR=r_(),Ph=Pp(),_i=va().getFromId,Hde=$1(),Ude=xy().redrawReglTraces,Sy=DR(),No=Sy.MINSELECT,Gde=GR.filter,l_=GR.tester,s_=ry(),NR=s_.p2r,Yde=s_.axValue,Vde=s_.getTransform;function u_(e){return e.subplot!==void 0}function Wde(e,r,t,a,n){var i=!u_(a),o=Rde(n),l=Fde(n),s=i_(n),u=Fh(n),f=o_(n),c=n==="drawline",v=n==="drawcircle",d=c||v,p=a.gd,m=p._fullLayout,y=f&&m.newselection.mode==="immediate"&&i,x=m._zoomlayer,_=a.element.getBoundingClientRect(),w=a.plotinfo,b=Vde(w),T=r-_.left,k=t-_.top;m._calcInverseTransform(p);var M=ky.apply3DTransform(m._invTransform)(T,k);T=M[0],k=M[1];var S=m._invScaleX,E=m._invScaleY,P=T,R=k,D="M"+T+","+k,z=a.xaxes[0],O=a.yaxes[0],H=z._length,Y=O._length,G=e.altKey&&!(Fh(n)&&s),B,V,X,Z,te,fe,le;VR(e,p,a),o&&(B=Gde([[T,k]],Sy.BENDPX));var ie=x.selectAll("path.select-outline-"+w.id).data([1]),K=u?m.newshape:m.newselection;u&&(a.hasText=K.label.text||K.label.texttemplate);var he=u&&!s?K.fillcolor:"rgba(0,0,0,0)",oe=K.line.color||(i?Dh.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");ie.enter().append("path").attr("class","select-outline select-outline-"+w.id).style({opacity:u?K.opacity/2:1,"stroke-dasharray":Ede(K.line.dash,K.line.width),"stroke-width":K.line.width+"px","shape-rendering":"crispEdges"}).call(Dh.stroke,oe).call(Dh.fill,he).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",b).attr("d",D+"Z");var ye=x.append("path").attr("class","zoombox-corners").style({fill:Dh.background,stroke:Dh.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(u&&a.hasText){var ue=x.select(".label-temp");ue.empty()&&(ue=x.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var de=m._uid+Sy.SELECTID,W=[],Q=qy(p,a.xaxes,a.yaxes,a.subplot);y&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var pe=z._id,me=O._id;JR(p,pe,me,Q);for(var we=(p.layout||{}).selections||[],Ne=[],Fe=!1,Re=0;Re=0){p._fullLayout._deactivateShape(p);return}if(!u){var we=m.clickmode;Ph.done(de).then(function(){if(Ph.clear(de),pe===2){for(ie.remove(),te=0;te-1&&YR(me,p,a.xaxes,a.yaxes,a.subplot,a,ie),we==="event"&&Ih(p,void 0);Dde.click(p,me,w.id)}).catch(ky.error)}},a.doneFn=function(){ye.remove(),Ph.done(de).then(function(){Ph.clear(de),!y&&Z&&a.selectionDefs&&(Z.subtract=G,a.selectionDefs.push(Z),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,X)),(y||u)&&Nh(a,y),a.doneFnCompleted&&a.doneFnCompleted(W),f&&Ih(p,le)}).catch(ky.error)}}function YR(e,r,t,a,n,i,o){var l=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,c=[],v,d,p,m,y,x,_,w,b,T;if($de(l)){VR(e,r,i),v=qy(r,t,a,n);var k=Kde(l,v),M=k.pointNumbers.length>0;if(M?Qde(v,k):epe(v)&&(_=IR(k))){for(o&&o.remove(),T=0;T=0}function Jde(e){return e._fullLayout._activeSelectionIndex>=0}function Nh(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;Xde(n)&&n._fullLayout._deactivateShape(n),Jde(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,o=i._zoomlayer,l=Fh(t),s=o_(t);if(l||s){var u=o.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;l&&(f=zde(u,e)),f&&Rh.call("_guiRelayout",n,{shapes:f});var c;s&&!u_(e)&&(c=Ide(u,e)),c&&(n._fullLayout._noEmitSelectedAtStart=!0,Rh.call("_guiRelayout",n,{selections:c}).then(function(){r&&Ode(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function zR(e){return e._id}function qy(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(zR),o=t.map(zR),l,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Qde(e,r){var t=[],a,n,i,o;for(o=0;o0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(o=0;o1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function zh(e,r,t){var a;for(a=0;a-1&&r;if(!o&&r){var pe=OR(e,!0);if(pe.length){var me=pe[0].xref,we=pe[0].yref;if(me&&we){var Ne=$R(pe),Fe=KR([_i(e,me,"x"),_i(e,we,"y")]);Fe(W,Ne)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:j&&Ih(e,W),v._reselect=!1}if(!o&&v._deselect){var Re=v._deselect;l=Re.xref,s=Re.yref,ape(l,s,f)||JR(e,l,s,a),j&&(W.points.length?Ih(e,W):v_(e)),v._deselect=!1}return{eventData:W,selectionTesters:t}}function tpe(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";rF.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 Bh=N((jDe,tF)=>{"use strict";tF.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var vc=N((XDe,iF)=>{"use strict";var aF=h_(),nF=fa(),Ly=Ca(),spe=_t().templatedArray,ZDe=Bh();iF.exports=spe("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:nF({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:aF.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:aF.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",Ly.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Ly.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Ly.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",Ly.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:nF({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Hh=N((JDe,oF)=>{"use strict";oF.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Cy=N(($De,lF)=>{"use strict";lF.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var wi=N((KDe,hF)=>{"use strict";var sF=Qi().axisHoverFormat,upe=La().texttemplateAttrs,fpe=La().hovertemplateAttrs,uF=ko(),cpe=fa(),vpe=si().dash,hpe=si().pattern,dpe=jr(),ppe=Hh(),Ey=bt().extendFlat,ype=Cy();function fF(e){return{valType:"any",dflt:0,editType:"calc"}}function cF(e){return{valType:"any",editType:"calc"}}function vF(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}hF.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:fF("x"),yperiod:fF("y"),xperiod0:cF("x0"),yperiod0:cF("y0"),xperiodalignment:vF("x"),yperiodalignment:vF("y"),xhoverformat:sF("x"),yhoverformat:sF("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:upe({},{}),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:fpe({},{keys:ppe.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Ey({},vpe,{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:ype(!0),fillgradient:Ey({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:hpe,marker:Ey({symbol:{valType:"enumerated",values:dpe.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:Ey({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},uF("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"},uF("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:cpe({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var d_=N((ePe,yF)=>{"use strict";var dF=vc(),pF=wi().line,mpe=si().dash,Dy=bt().extendFlat,gpe=Xi().overrideAll,bpe=_t().templatedArray,QDe=Bh();yF.exports=gpe(bpe("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:Dy({},dF.xref,{}),yref:Dy({},dF.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:pF.color,width:Dy({},pF.width,{min:1,dflt:1}),dash:Dy({},mpe,{dflt:"dot"})}}),"arraydraw","from-root")});var xF=N((rPe,bF)=>{"use strict";var mF=Ee(),Py=Or(),xpe=eo(),_pe=d_(),gF=ns();bF.exports=function(r,t){xpe(r,t,{name:"selections",handleItemDefaults:wpe});for(var a=t.selections,n=0;n{"use strict";_F.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var Uh=N((aPe,MF)=>{"use strict";var Tpe=gr(),TF=Ee(),AF=va();MF.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var o=Tpe.subplotsRegistry.cartesian,l=o.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,c=s.cartesian,v=n._has("cartesian"),d=0;d{"use strict";var kF=Q5(),Gh=eF();SF.exports={moduleType:"component",name:"selections",layoutAttributes:d_(),supplyLayoutDefaults:xF(),supplyDrawNewSelectionDefaults:wF(),includeBasePlot:Uh()("selections"),draw:kF.draw,drawOne:kF.drawOne,reselect:Gh.reselect,prepSelect:Gh.prepSelect,clearOutline:Gh.clearOutline,clearSelectionsCache:Gh.clearSelectionsCache,selectOnClick:Gh.selectOnClick}});var ZF=N((iPe,jF)=>{"use strict";var b_=Sr(),Ti=Ee(),qF=Ti.numberFormat,Ape=Sn(),Mpe=Kx(),Ry=gr(),zF=Ti.strTranslate,kpe=Ea(),LF=Tr(),os=jr(),Spe=Fn(),CF=Or(),qpe=rs(),Lpe=pi(),IF=bu(),Fy=IF.selectingOrDrawing,Cpe=IF.freeMode,Epe=Xa().FROM_TL,Dpe=$1(),Ppe=xy().redrawReglTraces,Rpe=ea(),y_=va().getFromId,Fpe=zo().prepSelect,Npe=zo().clearOutline,zpe=zo().selectOnClick,p_=V5(),x_=Ca(),EF=x_.MINDRAG,bn=x_.MINZOOM,DF=!0;function Ipe(e,r,t,a,n,i,o,l){var s=e._fullLayout._zoomlayer,u=o+l==="nsew",f=(o+l).length===1,c,v,d,p,m,y,x,_,w,b,T,k,M,S,E,P,R,D,z,O,H,Y,G;t+=r.yaxis._shift;function B(){if(c=r.xaxis,v=r.yaxis,w=c._length,b=v._length,x=c._offset,_=v._offset,d={},d[c._id]=c,p={},p[v._id]=v,o&&l)for(var Le=r.overlays,Ce=0;Ce=0){Ge._fullLayout._deactivateShape(Ge);return}var Ze=Ge._fullLayout.clickmode;if(g_(Ge),Le===2&&!f&&Ue(),u)Ze.indexOf("select")>-1&&zpe(Ce,Ge,m,y,r.id,Z),Ze.indexOf("event")>-1&&Spe.click(Ge,Ce,r.id);else if(Le===1&&f){var Ye=o?v:c,He=o==="s"||l==="w"?0:1,$e=Ye._name+".range["+He+"]",cr=Ope(Ye,He),lr="left",Oe="middle";if(Ye.fixedrange)return;o?(Oe=o==="n"?"top":"bottom",Ye.side==="right"&&(lr="right")):l==="e"&&(lr="right"),Ge._context.showAxisRangeEntryBoxes&&b_.select(X).call(kpe.makeEditable,{gd:Ge,immediate:!0,background:Ge._fullLayout.paper_bgcolor,text:String(cr),fill:Ye.tickfont?Ye.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:Oe}).on("edit",function(ne){var ve=Ye.d2r(ne);ve!==void 0&&Ry.call("_guiRelayout",Ge,$e,ve)})}}Lpe.init(Z);var le,ie,K,he,oe,ye,ue,de,W,Q;function j(Le,Ce,Ge){var Ze=X.getBoundingClientRect();le=Ce-Ze.left,ie=Ge-Ze.top,e._fullLayout._calcInverseTransform(e);var Ye=Ti.apply3DTransform(e._fullLayout._invTransform)(le,ie);le=Ye[0],ie=Ye[1],K={l:le,r:le,w:0,t:ie,b:ie,h:0},he=e._hmpixcount?e._hmlumcount/e._hmpixcount:Ape(e._fullLayout.plot_bgcolor).getLuminance(),oe="M0,0H"+w+"V"+b+"H0V0",ye=!1,ue="xy",Q=!1,de=HF(s,he,x,_,oe),W=UF(s,x,_)}function pe(Le,Ce){if(e._transitioningWithDuration)return!1;var Ge=Math.max(0,Math.min(w,Y*Le+le)),Ze=Math.max(0,Math.min(b,G*Ce+ie)),Ye=Math.abs(Ge-le),He=Math.abs(Ze-ie);K.l=Math.min(le,Ge),K.r=Math.max(le,Ge),K.t=Math.min(ie,Ze),K.b=Math.max(ie,Ze);function $e(){ue="",K.r=K.l,K.t=K.b,W.attr("d","M0,0Z")}if(T.isSubplotConstrained)Ye>bn||He>bn?(ue="xy",Ye/w>He/b?(He=Ye*b/w,ie>Ze?K.t=ie-He:K.b=ie+He):(Ye=He*w/b,le>Ge?K.l=le-Ye:K.r=le+Ye),W.attr("d",Ny(K))):$e();else if(k.isSubplotConstrained)if(Ye>bn||He>bn){ue="xy";var cr=Math.min(K.l/w,(b-K.b)/b),lr=Math.max(K.r/w,(b-K.t)/b);K.l=cr*w,K.r=lr*w,K.b=(1-cr)*b,K.t=(1-lr)*b,W.attr("d",Ny(K))}else $e();else!S||He0){var ne;if(k.isSubplotConstrained||!M&&S.length===1){for(ne=0;ne1&&($e.maxallowed!==void 0&&P===($e.range[0]<$e.range[1]?"e":"w")||$e.minallowed!==void 0&&P===($e.range[0]<$e.range[1]?"w":"e"))&&(ar=1,ur=0),qe?(hr=ve,Ar=o||k.isSubplotConstrained?Le[1]:Qe(cr,hr)):k.yaHash[cr._id]?(hr=ve,Ar=Le[1]*cr._length/v._length):k.xaHash[cr._id]?(hr=ne,Ar=M==="ew"?-Le[0]*cr._length/c._length:Qe(cr,hr,{e:"right",w:"left"}[M])):(hr=Se(cr,ne,ve),Ar=ir(cr,hr)),hr>1&&(cr.maxallowed!==void 0&&R===(cr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Hpe(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function HF(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",zF(t,a)).attr("d",n+"Z")}function UF(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:LF.background,stroke:LF.defaultLine,"stroke-width":1,opacity:0}).attr("transform",zF(r,t)).attr("d","M0,0Z")}function GF(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),YF(e,r,n,i)}function YF(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function g_(e){b_.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function VF(e){DF&&e.data&&e._context.showTips&&(Ti.notifier(Ti._(e,"Double-click to zoom back out"),"long"),DF=!1)}function Upe(e,r){return"M"+(e.l-.5)+","+(r-bn-.5)+"h-3v"+(2*bn+1)+"h3ZM"+(e.r+.5)+","+(r-bn-.5)+"h3v"+(2*bn+1)+"h-3Z"}function Gpe(e,r){return"M"+(r-bn-.5)+","+(e.t-.5)+"v-3h"+(2*bn+1)+"v3ZM"+(r-bn-.5)+","+(e.b+.5)+"v3h"+(2*bn+1)+"v-3Z"}function Ny(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,bn)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function FF(e,r,t,a,n){for(var i=!1,o={},l={},s,u,f,c,v=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var Ype=Sr(),zy=Fn(),Vpe=pi(),Wpe=rs(),no=ZF().makeDragBox,Ma=Ca().DRAGGERSIZE;Iy.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){Ype.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,o){if((t._plots[i].mainplot&&!0)===(t._plots[o].mainplot&&!0)){var l=i.split("y"),s=o.split("y");return l[0]===s[0]?Number(l[1]||1)-Number(s[1]||1):Number(l[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var o=t._plots[i],l=o.xaxis,s=o.yaxis;if(!o.mainplot){var u=no(r,o,l._offset,s._offset,l._length,s._length,"ns","ew");u.onmousemove=function(v){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&zy.hover(r,v,i)},zy.hover(r,v,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(v){r._dragging||(r._fullLayout._hoversubplot=null,Vpe.unhover(r,v))},r._context.showAxisDragHandles&&(no(r,o,l._offset-Ma,s._offset-Ma,Ma,Ma,"n","w"),no(r,o,l._offset+l._length,s._offset-Ma,Ma,Ma,"n","e"),no(r,o,l._offset-Ma,s._offset+s._length,Ma,Ma,"s","w"),no(r,o,l._offset+l._length,s._offset+s._length,Ma,Ma,"s","e"))}if(r._context.showAxisDragHandles){if(i===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=Ma),no(r,o,l._offset+l._length*.1,f,l._length*.8,Ma,"","ew"),no(r,o,l._offset,f,l._length*.1,Ma,"","w"),no(r,o,l._offset+l._length*.9,f,l._length*.1,Ma,"","e")}if(i===s._mainSubplot){var c=s._mainLinePosition;s.side!=="right"&&(c-=Ma),no(r,o,c,s._offset+s._length*.1,Ma,s._length*.8,"ns",""),no(r,o,c,s._offset+s._length*.9,Ma,s._length*.1,"s",""),no(r,o,c,s._offset,Ma,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,zy.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,zy.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Iy.updateFx(r)}};Iy.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";Wpe(r._draggers,t)}});var $F=N((lPe,JF)=>{"use strict";var XF=gr();JF.exports=function(r){for(var t=XF.layoutArrayContainers,a=XF.layoutArrayRegexes,n=r.split("[")[0],i,o,l=0;l{"use strict";var jpe=zl(),w_=bp(),Yh=Zs(),Zpe=wb().sorterAsc,T_=gr();Vh.containerArrayMatch=$F();var Xpe=Vh.isAddVal=function(r){return r==="add"||jpe(r)},KF=Vh.isRemoveVal=function(r){return r===null||r==="remove"};Vh.applyContainerArrayChanges=function(r,t,a,n,i){var o=t.astr,l=T_.getComponentMethod(o,"supplyLayoutDefaults"),s=T_.getComponentMethod(o,"draw"),u=T_.getComponentMethod(o,"drawOne"),f=n.replot||n.recalc||l===w_||s===w_,c=r.layout,v=r._fullLayout;if(a[""]){Object.keys(a).length>1&&Yh.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(KF(d))t.set(null);else if(Array.isArray(d))t.set(d);else return Yh.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(l(c,v),s(r),!0)}var p=Object.keys(a).map(Number).sort(Zpe),m=t.get(),y=m||[],x=i(v,o).get(),_=[],w=-1,b=y.length,T,k,M,S,E,P,R,D;for(T=0;Ty.length-(R?0:1)){Yh.warn("index out of range",o,M);continue}if(P!==void 0)E.length>1&&Yh.warn("Insertion & removal are incompatible with edits to the same index.",o,M),KF(P)?_.push(M):R?(P==="add"&&(P={}),y.splice(M,0,P),x&&x.splice(M,0,{})):Yh.warn("Unrecognized full object edit value",o,M,P),w===-1&&(w=M);else for(k=0;k=0;T--)y.splice(_[T],1),x&&x.splice(_[T],1);if(y.length?m||t.set(y):t.set(null),f)return!1;if(l(c,v),u!==w_){var z;if(w===-1)z=p;else{for(b=Math.max(y.length,b),z=[],T=0;T=w));T++)z.push(M);for(T=w;T{"use strict";var aN=Pr(),uPe=vb(),nN=gr(),In=Ee(),Wh=ea(),iN=va(),oN=Tr(),jh=iN.cleanId,Jpe=iN.getFromTrace,A_=nN.traceIs;io.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&In.log("Clearing previous rejected promises from queue."),e._promises=[]};io.cleanLayout=function(e){var r,t;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 a=(Wh.subplotsRegistry.cartesian||{}).attrRegex,n=(Wh.subplotsRegistry.polar||{}).attrRegex,i=(Wh.subplotsRegistry.ternary||{}).attrRegex,o=(Wh.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(y.x=1.02,y.xanchor="left"):y.x<-2&&(y.x=-.02,y.xanchor="right"),y.y>3?(y.y=1.02,y.yanchor="bottom"):y.y<-2&&(y.y=-.02,y.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),oN.clean(e),e.template&&e.template.layout&&io.cleanLayout(e.template.layout),e};function hc(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=jh(t,a,!0))}io.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}io.hasParent=function(e,r){for(var t=tN(r);t;){if(t in e)return!0;t=tN(t)}return!1};var Qpe=["x","y","z"];io.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var Uy=Sr(),e1e=Pr(),r1e=Nb(),er=Ee(),Tt=er.nestedProperty,S_=eh(),xn=US(),Ai=gr(),Xy=If(),_r=ea(),fn=Or(),t1e=$x(),a1e=hi(),M_=jr(),n1e=Tr(),i1e=__().initInteractions,o1e=ll(),l1e=zo().clearOutline,vN=js().dfltConfig,By=QF(),oa=lN(),dt=xy(),ls=Xi(),s1e=Ca().AX_NAME_PATTERN,k_=0,sN=5;function u1e(e,r,t,a){var n;if(e=er.getGraphDiv(e),S_.init(e),er.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var o=S_.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(o===!1)return Promise.reject();!r&&!t&&!er.isPlotDiv(e)&&er.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(n)return Jr.addFrames(e,n)}dN(e,a),t||(t={}),Uy.select(e).classed("js-plotly-plot",!0),M_.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(oa.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=oa.cleanLayout(t)),_r.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(E1e(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),M_.initGradients(e),M_.initPatterns(e),s&&fn.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&_r.doCalcdata(e);for(var v=0;v=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function pN(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),Yy(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&Yy(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function d1e(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof S.parts[R]!="string";)R--;var D=S.parts[R],z=S.parts[R-1]+"."+D,O=S.parts.slice(0,R).join("."),H=Tt(e.layout,O).get(),Y=Tt(a,O).get(),G=S.get();if(E!==void 0){x[M]=E,_[M]=D==="reverse"?E:pl(G);var B=Xy.getLayoutValObject(a,S.parts);if(B&&B.impliedEdits&&E!==null)for(var V in B.impliedEdits)w(er.relativeAttr(M,V),B.impliedEdits[V]);if(["width","height"].indexOf(M)!==-1)if(E){w("autosize",null);var X=M==="height"?"width":"height";w(X,a[X])}else a[M]=e._initialAutoSize[M];else if(M==="autosize")w("width",E?null:a.width),w("height",E?null:a.height);else if(z.match(AN))k(z),Tt(a,O+"._inputRange").set(null);else if(z.match(MN)){k(z),Tt(a,O+"._inputRange").set(null);var Z=Tt(a,O).get();Z._inputDomain&&(Z._input.domain=Z._inputDomain.slice())}else z.match(kN)&&Tt(a,O+"._inputDomain").set(null);if(D==="type"){T=H;var te=Y.type==="linear"&&E==="log",fe=Y.type==="log"&&E==="linear";if(te||fe){if(!T||!T.range)w(O+".autorange",!0);else if(Y.autorange)te&&(T.range=T.range[1]>T.range[0]?[1,2]:[2,1]);else{var le=T.range[0],ie=T.range[1];te?(le<=0&&ie<=0&&w(O+".autorange",!0),le<=0?le=ie/1e6:ie<=0&&(ie=le/1e6),w(O+".range[0]",Math.log(le)/Math.LN10),w(O+".range[1]",Math.log(ie)/Math.LN10)):(w(O+".range[0]",Math.pow(10,le)),w(O+".range[1]",Math.pow(10,ie)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[S.parts[0]]&&S.parts[1]==="radialaxis"&&delete a[S.parts[0]]._subplot.viewInitial["radialaxis.range"],Ai.getComponentMethod("annotations","convertCoords")(e,Y,E,w),Ai.getComponentMethod("images","convertCoords")(e,Y,E,w)}else w(O+".autorange",!0),w(O+".range",null);Tt(a,O+"._inputRange").set(null)}else if(D.match(s1e)){var K=Tt(a,M).get(),he=(E||{}).type;(!he||he==="-")&&(he="linear"),Ai.getComponentMethod("annotations","convertCoords")(e,K,he,w),Ai.getComponentMethod("images","convertCoords")(e,K,he,w)}var oe=By.containerArrayMatch(M);if(oe){f=oe.array,c=oe.index;var ye=oe.property,ue=B||{editType:"calc"};c!==""&&ye===""&&(By.isAddVal(E)?_[M]=null:By.isRemoveVal(E)?_[M]=(Tt(t,f).get()||[])[c]:er.warn("unrecognized full object value",r)),ls.update(y,ue),u[f]||(u[f]={});var de=u[f][c];de||(de=u[f][c]={}),de[ye]=E,delete r[M]}else D==="reverse"?(H.range?H.range.reverse():(w(O+".autorange",!0),H.range=[1,0]),Y.autorange?y.calc=!0:y.plot=!0):(M==="dragmode"&&(E===!1&&G!==!1||E!==!1&&G===!1)||a._has("scatter-like")&&a._has("regl")&&M==="dragmode"&&(E==="lasso"||E==="select")&&!(G==="lasso"||G==="select")?y.plot=!0:B?ls.update(y,B):y.calc=!0,S.set(E))}}for(f in u){var W=By.applyContainerArrayChanges(e,i(t,f),u[f],y,i);W||(y.plot=!0)}for(var Q in b){T=fn.getFromId(e,Q);var j=T&&T._constraintGroup;if(j){y.calc=!0;for(var pe in j)b[pe]||(fn.getFromId(e,pe)._constraintShrinkable=!0)}}(qN(e)||r.height||r.width)&&(y.plot=!0);var me=a.shapes;for(c=0;c1;)if(a.pop(),t=Tt(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function x1e(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function l(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var c=0;return function(){if(u&&++c===f)return u()}}return new Promise(function(u,f){function c(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var D=a._frameQueue.pop();D.onInterrupt&&D.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function v(D){if(D.length!==0){for(var z=0;za._timeToNext&&p()};D()}var y=0;function x(D){return Array.isArray(n)?y>=n.length?D.transitionOpts=n[y]:D.transitionOpts=n[0]:D.transitionOpts=n,y++,D}var _,w,b=[],T=r==null,k=Array.isArray(r),M=!T&&!k&&er.isPlainObject(r);if(M)b.push({type:"object",data:x(er.extendFlat({},r))});else if(T||["string","number"].indexOf(typeof r)!==-1)for(_=0;_0&&PP)&&R.push(w);b=R}}b.length>0?v(b):(e.emit("plotly_animated"),u())})}function S1e(e,r,t){if(e=er.getGraphDiv(e),r==null)return Promise.resolve();if(!er.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 a,n,i,o,l=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=l.length+r.length*2,f=[],c={};for(a=r.length-1;a>=0;a--)if(er.isPlainObject(r[a])){var v=r[a].name,d=(s[v]||c[v]||{}).name,p=r[a].name,m=s[d]||c[d];d&&p&&typeof p=="number"&&m&&k_S.index?-1:M.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&er.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),o.unshift({type:"insert",index:a,value:n[a]});var l=_r.modifyFrames,s=_r.modifyFrames,u=[e,o],f=[e,i];return xn&&xn.add(e,l,u,s,f),_r.modifyFrames(e,i)}function L1e(e){e=er.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return _r.cleanPlot([],{},t,r),_r.purge(e),S_.purge(e),r._container&&r._container.remove(),delete e._context,e}function C1e(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!er.equalDomRects(t,r._lastBBox)){var a=r._invTransform=er.inverseTransformMatrix(er.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function E1e(e){var r=Uy.select(e),t=e._fullLayout;if(t._calcInverseTransform=C1e,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};Uy.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=er.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(o1e.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Jr.animate=k1e;Jr.addFrames=S1e;Jr.deleteFrames=q1e;Jr.addTraces=xN;Jr.deleteTraces=_N;Jr.extendTraces=gN;Jr.moveTraces=q_;Jr.prependTraces=bN;Jr.newPlot=h1e;Jr._doPlot=u1e;Jr.purge=L1e;Jr.react=T1e;Jr.redraw=v1e;Jr.relayout=Zh;Jr.restyle=Vy;Jr.setPlotConfig=f1e;Jr.update=jy;Jr._guiRelayout=C_(Zh);Jr._guiRestyle=C_(Vy);Jr._guiUpdate=C_(jy);Jr._storeDirectGUIEdit=m1e});var yl=N(Io=>{"use strict";var D1e=gr();Io.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Io.getRedrawFunc=function(e){return function(){D1e.getComponentMethod("colorbar","draw")(e)}};Io.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Io.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var LN=window.URL||window.webkitURL;Io.createObjectURL=function(e){return LN.createObjectURL(e)};Io.revokeObjectURL=function(e){return LN.revokeObjectURL(e)};Io.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=P1e(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Io.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function P1e(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var P_=Sr(),hPe=Ee(),R1e=jr(),F1e=Tr(),dPe=ll(),D_=/"/g,Jh="TOBESTRIPPED",N1e=new RegExp('("'+Jh+")|("+Jh+'")',"g");function z1e(e){var r=P_.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function I1e(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}CN.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,o=n._toppaper,l=n.width,s=n.height,u;i.insert("rect",":first-child").call(R1e.setRect,0,0,l,s).call(F1e.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var O1e=Ee(),B1e=Qs().EventEmitter,$h=yl();function H1e(e){var r=e.emitter||new B1e,t=new Promise(function(a,n){var i=window.Image,o=e.svg,l=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,c=e.height||150,v=u*f,d=u*c,p=s.getContext("2d",{willReadFrequently:!0}),m=new i,y,x;l==="svg"||O1e.isSafari()?x=$h.encodeSVG(o):(y=$h.createBlob(o,"svg"),x=$h.createObjectURL(y)),s.width=v,s.height=d,m.onload=function(){var _;switch(y=null,$h.revokeObjectURL(x),l!=="svg"&&p.drawImage(m,0,0,v,d),l){case"jpeg":_=s.toDataURL("image/jpeg");break;case"png":_=s.toDataURL("image/png");break;case"webp":_=s.toDataURL("image/webp");break;case"svg":_=x;break;default:var w="Image format is not jpeg, png, svg or webp.";if(n(new Error(w)),!e.promise)return r.emit("error",w)}a(_),e.promise||r.emit("success",_)},m.onerror=function(_){if(y=null,$h.revokeObjectURL(x),n(_),!e.promise)return r.emit("error",_)},m.src=x});return e.promise?t:r}EN.exports=H1e});var F_=N((mPe,RN)=>{"use strict";var DN=Pr(),PN=E_(),U1e=ea(),Oo=Ee(),Kh=yl(),G1e=$y(),Y1e=Ky(),V1e=ep().version,R_={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 W1e(e,r){r=r||{};var t,a,n,i;Oo.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=Oo.getGraphDiv(e),t=Oo.extendDeep([],e.data),a=Oo.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function o(k){return!(k in r)||Oo.validate(r[k],R_[k])}if(!o("width")&&r.width!==null||!o("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Oo.join2(R_.format.values,", "," or ")+".");var l={};function s(k,M){return Oo.coerce(r,l,R_,k,M)}var u=s("format"),f=s("width"),c=s("height"),v=s("scale"),d=s("setBackground"),p=s("imageDataOnly"),m=document.createElement("div");m.style.position="absolute",m.style.left="-5000px",document.body.appendChild(m);var y=Oo.extendFlat({},a);f?y.width=f:r.width===null&&DN(i.width)&&(y.width=i.width),c?y.height=c:r.height===null&&DN(i.height)&&(y.height=i.height);var x=Oo.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),_=Kh.getRedrawFunc(m);function w(){return new Promise(function(k){setTimeout(k,Kh.getDelay(m._fullLayout))})}function b(){return new Promise(function(k,M){var S=G1e(m,u,v),E=m._fullLayout.width,P=m._fullLayout.height;function R(){PN.purge(m),document.body.removeChild(m)}if(u==="full-json"){var D=U1e.graphJson(m,!1,"keepdata","object",!0,!0);return D.version=V1e,D=JSON.stringify(D),R(),k(p?D:Kh.encodeJSON(D))}if(R(),u==="svg")return k(p?S:Kh.encodeSVG(S));var z=document.createElement("canvas");z.id=Oo.randstr(),Y1e({format:u,width:E,height:P,scale:v,canvas:z,svg:S,promise:!0}).then(k).catch(M)})}function T(k){return p?k.replace(Kh.IMAGE_URL_PREFIX,""):k}return new Promise(function(k,M){PN.newPlot(m,t,y,x).then(_).then(w).then(b).then(function(S){k(T(S))}).catch(function(S){M(S)})})}RN.exports=W1e});var IN=N((gPe,zN)=>{"use strict";var Mi=Ee(),j1e=ea(),Z1e=If(),X1e=js().dfltConfig,oo=Mi.isPlainObject,Mu=Array.isArray,FN=Mi.isArrayOrTypedArray;zN.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=Z1e.get(),n=[],i={_context:Mi.extendFlat({},X1e)},o,l;Mu(r)?(i.data=Mi.extendDeep([],r),o=r):(i.data=[],o=[],n.push(ka("array","data"))),oo(t)?(i.layout=Mi.extendDeep({},t),l=t):(i.layout={},l={},arguments.length>1&&n.push(ka("object","layout"))),j1e.supplyDefaults(i);for(var s=i._fullData,u=o.length,f=0;fc.length&&a.push(ka("unused",n,u.concat(c.length)));var x=c.length,_=Array.isArray(y);_&&(x=Math.min(x,y.length));var w,b,T,k,M;if(v.dimensions===2)for(b=0;bc[b].length&&a.push(ka("unused",n,u.concat(b,c[b].length)));var S=c[b].length;for(w=0;w<(_?Math.min(S,y[b].length):S);w++)T=_?y[b][w]:y,k=f[b][w],M=c[b][w],Mi.validate(k,T)?M!==k&&M!==+k&&a.push(ka("dynamic",n,u.concat(b,w),k,M)):a.push(ka("value",n,u.concat(b,w),k))}else a.push(ka("array",n,u.concat(b),f[b]));else for(b=0;b{"use strict";var tye=Ee(),em=yl();function aye(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(o,l){var s,u;if(n)return s=em.createBlob(e,t),u=em.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),em.revokeObjectURL(u),s=null,o(r);if(tye.isSafari()){var f=t==="svg"?",":";base64,";return em.octetStream(f+encodeURIComponent(e)),o(r)}l(new Error("download error"))});return i}ON.exports=aye});var N_=N((_Pe,UN)=>{"use strict";var HN=Ee(),nye=F_(),iye=BN(),xPe=yl();function oye(e,r){var t;return HN.isPlainObject(e)||(t=HN.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=nye(e,r),o=r.filename||e.fn||"newplot";o+="."+r.format.replace("-","."),i.then(function(l){return t&&(t._snapshotInProgress=!1),iye(l,o,r.format)}).then(function(l){a(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),n(l)})})}UN.exports=oye});var jN=N(z_=>{"use strict";var On=Ee(),Bn=On.isPlainObject,GN=If(),YN=ea(),lye=mn(),VN=_t(),WN=js().dfltConfig;z_.makeTemplate=function(e){e=On.isPlainObject(e)?e:On.getGraphDiv(e),e=On.extendDeep({_context:WN},{data:e.data,layout:e.layout}),YN.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var p={};Qh(d,p,uye.bind(null,d));var m=On.coerce(d,{},lye,"type"),y=a.data[m];y||(y=a.data[m]=[]),y.push(p)}),Qh(t,a.layout,sye.bind(null,t)),delete a.layout.template;var n=t.template;if(Bn(n)){var i=n.layout,o,l,s,u,f,c;Bn(i)&&rm(i,a.layout);var v=n.data;if(Bn(v)){for(l in a.data)if(s=v[l],Array.isArray(s)){for(f=a.data[l],c=f.length,u=s.length,o=0;ox?o.push({code:"unused",traceType:d,templateCount:y,dataCount:x}):x>y&&o.push({code:"reused",traceType:d,templateCount:y,dataCount:x})}}function _(w,b){for(var T in w)if(T.charAt(0)!=="_"){var k=w[T],M=ki(w,T,b);Bn(k)?(Array.isArray(w)&&k._template===!1&&k.templateitemname&&o.push({code:"missing",path:M,templateitemname:k.templateitemname}),_(k,M)):Array.isArray(k)&&fye(k)&&_(k,M)}}if(_({data:s,layout:l},""),o.length)return o.map(cye)};function fye(e){for(var r=0;r{"use strict";var da=E_();Ct._doPlot=da._doPlot;Ct.newPlot=da.newPlot;Ct.restyle=da.restyle;Ct.relayout=da.relayout;Ct.redraw=da.redraw;Ct.update=da.update;Ct._guiRestyle=da._guiRestyle;Ct._guiRelayout=da._guiRelayout;Ct._guiUpdate=da._guiUpdate;Ct._storeDirectGUIEdit=da._storeDirectGUIEdit;Ct.react=da.react;Ct.extendTraces=da.extendTraces;Ct.prependTraces=da.prependTraces;Ct.addTraces=da.addTraces;Ct.deleteTraces=da.deleteTraces;Ct.moveTraces=da.moveTraces;Ct.purge=da.purge;Ct.addFrames=da.addFrames;Ct.deleteFrames=da.deleteFrames;Ct.animate=da.animate;Ct.setPlotConfig=da.setPlotConfig;var vye=Wv().getGraphDiv,hye=hy().eraseActiveShape;Ct.deleteActiveShape=function(e){return hye(vye(e))};Ct.toImage=F_();Ct.validate=IN();Ct.downloadImage=N_();var ZN=jN();Ct.makeTemplate=ZN.makeTemplate;Ct.validateTemplate=ZN.validateTemplate});var O_=N((APe,JN)=>{"use strict";var I_=Ee(),dye=gr();JN.exports=function(r,t,a,n){var i=n("x"),o=n("y"),l,s=dye.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=I_.minRowLength(i);o?l=Math.min(u,I_.minRowLength(o)):(l=u,n("y0"),n("dy"))}else{if(!o)return 0;l=I_.minRowLength(o),n("x0"),n("dx")}return t._length=l,l}});var dc=N((MPe,QN)=>{"use strict";var $N=Ee().dateTick0,pye=Ft(),yye=pye.ONEWEEK;function KN(e,r){return e%yye===0?$N(r,1):$N(r,0)}QN.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",KN(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var l=n("yperiod");l&&(n("yperiod0",KN(l,t.ycalendar)),n("yperiodalignment"))}}});var tz=N((kPe,rz)=>{"use strict";var ez=["orientation","groupnorm","stackgaps"];rz.exports=function(r,t,a,n){var i=a._scatterStackOpts,o=n("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var u=s[o],f=!1;u?u.traces.push(t):(u=s[o]={traceIndices:[],traces:[t]},f=!0);for(var c={orientation:t.x&&!t.y?"h":"v"},v=0;v{"use strict";var az=Tr(),nz=vi().hasColorscale,iz=ul(),mye=Pn();oz.exports=function(r,t,a,n,i,o){var l=mye.isBubble(r),s=(r.line||{}).color,u;if(o=o||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",l?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",a),nz(r,"marker")&&iz(r,t,n,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:l?u=az.background:u=az.defaultLine,i("marker.line.color",u),nz(r,"marker.line")&&iz(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",l?1:0)),l&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var H_=N((qPe,lz)=>{"use strict";var gye=Ee().isArrayOrTypedArray,bye=vi().hasColorscale,xye=ul();lz.exports=function(r,t,a,n,i,o){o||(o={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),i("line.color",a),bye(r,"line"))xye(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(gye(l)?!1:l)||a;i("line.color",s)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var U_=N((LPe,sz)=>{"use strict";sz.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var G_=N((CPe,uz)=>{"use strict";var _ye=Ee();uz.exports=function(e,r,t,a,n){n=n||{},a("textposition"),_ye.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var Y_=N((EPe,cz)=>{"use strict";var am=Tr(),fz=Ee().isArrayOrTypedArray;function wye(e){for(var r=am.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var vz=Ee(),Tye=gr(),Aye=wi(),Mye=Hh(),pc=Pn(),kye=O_(),Sye=dc(),qye=tz(),Lye=B_(),Cye=H_(),hz=U_(),Eye=G_(),Dye=Y_(),Pye=Ee().coercePattern;dz.exports=function(r,t,a,n){function i(d,p){return vz.coerce(r,t,Aye,d,p)}var o=kye(r,t,n,i);if(o||(t.visible=!1),!!t.visible){Sye(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var l=qye(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!l&&o{"use strict";var Rye=Tu().getAxisGroup;yz.exports=function(r,t,a,n,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=Rye(a,l)+o,u=a._alignmentOpts||{},f=n("alignmentgroup"),c=u[s];c||(c=u[s]={});var v=c[f];v?v.traces.push(t):v=c[f]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=v.offsetGroups,m=p[d];t._offsetIndex=0,(i!=="group"||d)&&(m||(m=p[d]={offsetIndex:Object.keys(p).length}),t._offsetIndex=m.offsetIndex)}});var gz=N((RPe,mz)=>{"use strict";var Fye=Ee(),Nye=e0(),zye=wi();mz.exports=function(r,t){var a,n,i,o=t.scattermode;function l(v){return Fye.coerce(n._input,n,zye,v)}if(t.scattermode==="group")for(i=0;i=0;f--){var c=r[f];if(c.type==="scatter"&&c.xaxis===s.xaxis&&c.yaxis===s.yaxis){c.opacity=void 0;break}}}}}});var xz=N((FPe,bz)=>{"use strict";var Iye=Ee(),Oye=Yp();bz.exports=function(e,r){function t(n,i){return Iye.coerce(e,r,Oye,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var yc=N((NPe,wz)=>{"use strict";var Bye=Pr(),_z=Ee(),Hye=_z.dateTime2ms,nm=_z.incrementMonth,Uye=Ft(),Gye=Uye.ONEAVGMONTH;wz.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var o=r[a+"period"],l;if(Bye(o)){if(o=+o,o<=0)return{vals:n}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",c=i==="end",v=r[a+"period0"],d=Hye(v,u)||0,p=[],m=[],y=[],x=n.length,_=0;_w;)k=nm(k,-l,u);for(;k<=w;)k=nm(k,l,u);T=nm(k,-l,u)}else{for(b=Math.round((w-d)/o),k=d+b*o;k>w;)k-=o;for(;k<=w;)k+=o;T=k-o}p[_]=f?T:c?k:(T+k)/2,m[_]=T,y[_]=k}return{vals:p,starts:m,ends:y}}});var j_=N((zPe,Az)=>{"use strict";var V_=vi().hasColorscale,W_=oh(),Tz=Pn();Az.exports=function(r,t){Tz.hasLines(t)&&V_(t,"line")&&W_(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),Tz.hasMarkers(t)&&(V_(t,"marker")&&W_(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),V_(t,"marker.line")&&W_(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var im=N((IPe,Mz)=>{"use strict";var Yt=Ee();Mz.exports=function(r,t){for(var a=0;a{"use strict";var kz=Ee();Sz.exports=function(r,t){kz.isArrayOrTypedArray(t.selectedpoints)&&kz.tagSelected(r,t)}});var lm=N((BPe,Rz)=>{"use strict";var qz=Pr(),X_=Ee(),r0=Or(),Lz=yc(),Z_=Ft().BADNUM,J_=Pn(),Yye=j_(),Vye=im(),Wye=om();function jye(e,r){var t=e._fullLayout,a=r._xA=r0.getFromId(e,r.xaxis||"x","x"),n=r._yA=r0.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),l=Lz(r,a,"x",i),s=Lz(r,n,"y",o),u=l.vals,f=s.vals,c=r._length,v=new Array(c),d=r.ids,p=$_(r,t,a,n),m=!1,y,x,_,w,b,T;Dz(t,r);var k="x",M="y",S;if(p)X_.pushUnique(p.traceIndices,r.index),y=p.orientation==="v",y?(M="s",S="x"):(k="s",S="y"),b=p.stackgaps==="interpolate";else{var E=Ez(r,c);Cz(e,r,a,n,u,f,E)}var P=!!r.xperiodalignment,R=!!r.yperiodalignment;for(x=0;xx&&v[w].gap;)w--;for(T=v[w].s,_=v.length-1;_>w;_--)v[_].s=T;for(;x{"use strict";Fz.exports=sm;var Zye=Ee().distinctVals;function sm(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var Si=Pr(),ss=Ee().isArrayOrTypedArray,mc=Ft().BADNUM,Xye=gr(),t0=Or(),Jye=Tu().getAxisGroup,um=Nz();function $ye(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;us+o||!Si(l))}for(var f=0;f{"use strict";var Hz=lm(),Uz=fm().setGroupPositions;function ume(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;uE[f]&&f{"use strict";var cme=jr(),Zz=Ft(),a0=Zz.BADNUM,Xz=Zz.LOG_CLIP,Vz=Xz+.5,Wz=Xz-.5,cm=Ee(),vme=cm.segmentsIntersect,jz=cm.constrain,a4=Hh();Jz.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,o=n.type==="log",l=i.type==="log",s=n._length,u=i._length,f=t.backoff,c=a.marker,v=t.connectGaps,d=t.baseTolerance,p=t.shape,m=p==="linear",y=a.fill&&a.fill!=="none",x=[],_=a4.minTolerance,w=r.length,b=new Array(w),T=0,k,M,S,E,P,R,D,z,O,H,Y,G,B,V,X,Z;function te(Oe){var ne=r[Oe];if(!ne)return!1;var ve=t.linearized?n.l2p(ne.x):n.c2p(ne.x),De=t.linearized?i.l2p(ne.y):i.c2p(ne.y);if(ve===a0){if(o&&(ve=n.c2p(ne.x,!0)),ve===a0)return!1;l&&De===a0&&(ve*=Math.abs(n._m*u*(n._m>0?Vz:Wz)/(i._m*s*(i._m>0?Vz:Wz)))),ve*=1e3}if(De===a0){if(l&&(De=i.c2p(ne.y,!0)),De===a0)return!1;De*=1e3}return[ve,De]}function fe(Oe,ne,ve,De){var qe=ve-Oe,ar=De-ne,hr=.5-Oe,ur=.5-ne,Ar=qe*qe+ar*ar,Wr=qe*hr+ar*ur;if(Wr>0&&Wr1||Math.abs(hr.y-ve[0][1])>1)&&(hr=[hr.x,hr.y],De&&he(hr,Oe)ue||Oe[1]W)return[jz(Oe[0],ye,ue),jz(Oe[1],de,W)]}function Be(Oe,ne){if(Oe[0]===ne[0]&&(Oe[0]===ye||Oe[0]===ue)||Oe[1]===ne[1]&&(Oe[1]===de||Oe[1]===W))return!0}function ze(Oe,ne){var ve=[],De=Ie(Oe),qe=Ie(ne);return De&&qe&&Be(De,qe)||(De&&ve.push(De),qe&&ve.push(qe)),ve}function Pe(Oe,ne,ve){return function(De,qe){var ar=Ie(De),hr=Ie(qe),ur=[];if(ar&&hr&&Be(ar,hr))return ur;ar&&ur.push(ar),hr&&ur.push(hr);var Ar=2*cm.constrain((De[Oe]+qe[Oe])/2,ne,ve)-((ar||De)[Oe]+(hr||qe)[Oe]);if(Ar){var Wr;ar&&hr?Wr=Ar>0==ar[Oe]>hr[Oe]?ar:hr:Wr=ar||hr,Wr[Oe]+=Ar}return ur}}var Xe;p==="linear"||p==="spline"?Xe=Re:p==="hv"||p==="vh"?Xe=ze:p==="hvh"?Xe=Pe(0,ye,ue):p==="vhv"&&(Xe=Pe(1,de,W));function Ue(Oe,ne){var ve=ne[0]-Oe[0],De=(ne[1]-Oe[1])/ve,qe=(Oe[1]*ne[0]-ne[1]*Oe[0])/ve;return qe>0?[De>0?ye:ue,W]:[De>0?ue:ye,de]}function se(Oe){var ne=Oe[0],ve=Oe[1],De=ne===b[T-1][0],qe=ve===b[T-1][1];if(!(De&&qe))if(T>1){var ar=ne===b[T-2][0],hr=ve===b[T-2][1];De&&(ne===ye||ne===ue)&&ar?hr?T--:b[T-1]=Oe:qe&&(ve===de||ve===W)&&hr?ar?T--:b[T-1]=Oe:b[T++]=Oe}else b[T++]=Oe}function Te(Oe){b[T-1][0]!==Oe[0]&&b[T-1][1]!==Oe[1]&&se([me,we]),se(Oe),Ne=null,me=we=0}var Se=cm.isArrayOrTypedArray(c);function ir(Oe){if(Oe&&f&&(Oe.i=k,Oe.d=r,Oe.trace=a,Oe.marker=Se?c[Oe.i]:c,Oe.backoff=f),le=Oe[0]/s,ie=Oe[1]/u,j=Oe[0]ue?ue:0,pe=Oe[1]W?W:0,j||pe){if(!T)b[T++]=[j||Oe[0],pe||Oe[1]];else if(Ne){var ne=Xe(Ne,Oe);ne.length>1&&(Te(ne[0]),b[T++]=ne[1])}else Fe=Xe(b[T-1],Oe)[0],b[T++]=Fe;var ve=b[T-1];j&&pe&&(ve[0]!==j||ve[1]!==pe)?(Ne&&(me!==j&&we!==pe?se(me&&we?Ue(Ne,Oe):[me||j,we||pe]):me&&we&&se([me,we])),se([j,pe])):me-j&&we-pe&&se([j||me,pe||we]),Ne=Oe,me=j,we=pe}else Ne&&Te(Xe(Ne,Oe)[0]),b[T++]=Oe}for(k=0;kK(R,Qe))break;S=R,B=O[0]*z[0]+O[1]*z[1],B>Y?(Y=B,E=R,D=!1):B=r.length||!R)break;ir(R),M=R}}Ne&&se([me||Ne[0],we||Ne[1]]),x.push(b.slice(0,T))}var Le=p.slice(p.length-1);if(f&&Le!=="h"&&Le!=="v"){for(var Ce=!1,Ge=-1,Ze=[],Ye=0;Ye{"use strict";var $z={tonextx:1,tonexty:1,tonext:1};Kz.exports=function(r,t,a){var n,i,o,l,s,u={},f=!1,c=-1,v=0,d=-1;for(i=0;i=0?s=d:(s=d=v,v++),s{"use strict";var lo=Sr(),hme=gr(),n0=Ee(),bc=n0.ensureSingle,rI=n0.identity,Vt=jr(),xc=Pn(),dme=n4(),pme=Qz(),vm=r_().tester;tI.exports=function(r,t,a,n,i,o){var l,s,u=!i,f=!!i&&i.duration>0,c=pme(r,t,a);if(l=n.selectAll("g.trace").data(c,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),yme(r,l,t),f){o&&(s=o());var v=lo.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});v.each(function(){n.selectAll("g.trace").each(function(d,p){eI(r,p,t,d,c,this,i)})})}else l.each(function(d,p){eI(r,p,t,d,c,this,i)});u&&l.exit().remove(),n.selectAll("path:not([d])").remove()};function yme(e,r,t){r.each(function(a){var n=bc(lo.select(this),"g","fills");Vt.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var l=n.selectAll("g").data(o,rI);l.enter().append("g"),l.exit().each(function(s){i[s]=null}).remove(),l.order().each(function(s){i[s]=bc(lo.select(this),"path","js-fill")})})}function eI(e,r,t,a,n,i,o){var l=e._context.staticPlot,s;mme(e,r,t,a,n);var u=!!o&&o.duration>0;function f(Pe){return u?Pe.transition():Pe}var c=t.xaxis,v=t.yaxis,d=a[0].trace,p=d.line,m=lo.select(i),y=bc(m,"g","errorbars"),x=bc(m,"g","lines"),_=bc(m,"g","points"),w=bc(m,"g","text");if(hme.getComponentMethod("errorbars","plot")(e,y,t,o),d.visible!==!0)return;f(m).style("opacity",d.opacity);var b,T,k=d.fill.charAt(d.fill.length-1);k!=="x"&&k!=="y"&&(k="");var M,S;k==="y"?(M=1,S=v.c2p(0,!0)):k==="x"&&(M=0,S=c.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=m;var E="",P=[],R=d._prevtrace,D=null,z=null;R&&(E=R._prevRevpath||"",T=R._nextFill,P=R._ownPolygons,D=R._fillsegments,z=R._fillElement);var O,H,Y="",G="",B,V,X,Z,te,fe,le=[];d._polygons=[];var ie=[],K=[],he=n0.noop;if(b=d._ownFill,xc.hasLines(d)||d.fill!=="none"){T&&T.datum(a),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(B=Vt.steps(p.shape),V=Vt.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?B=V=function(Pe){var Xe=Pe[Pe.length-1];return Pe.length>1&&Pe[0][0]===Xe[0]&&Pe[0][1]===Xe[1]?Vt.smoothclosed(Pe.slice(1),p.smoothing):Vt.smoothopen(Pe,p.smoothing)}:B=V=function(Pe){return"M"+Pe.join("L")},X=function(Pe){return V(Pe.reverse())},K=dme(a,{xaxis:c,yaxis:v,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),ie=new Array(K.length);var oe=0;for(s=0;s=l[0]&&m.x<=l[1]&&m.y>=s[0]&&m.y<=s[1]}),v=Math.ceil(c.length/f),d=0;n.forEach(function(m,y){var x=m[0].trace;xc.hasMarkers(x)&&x.marker.maxdisplayed>0&&y{"use strict";aI.exports={container:"marker",min:"cmin",max:"cmax"}});var o4=N((ZPe,nI)=>{"use strict";var hm=Or();nI.exports=function(r,t,a){var n={},i={_fullLayout:a},o=hm.getFromTrace(i,t,"x"),l=hm.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=hm.tickText(o,o.c2l(s),!0).text,n.yLabel=hm.tickText(l,l.c2l(u),!0).text,n}});var ku=N((XPe,iI)=>{"use strict";var l4=Sr(),_c=jr(),gme=gr();function bme(e){var r=l4.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=l4.select(this),n=t.trace||t[0].trace;s4(a,n,e)}),r.selectAll("g.text").each(function(t){var a=l4.select(this),n=t.trace||t[0].trace;u4(a,n,e)}),r.selectAll("g.trace path.js-line").call(_c.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(_c.fillGroupStyle,e,!1),gme.getComponentMethod("errorbars","style")(r)}function s4(e,r,t){_c.pointStyle(e.selectAll("path.point"),r,t)}function u4(e,r,t){_c.textPointStyle(e.selectAll("text"),r,t)}function xme(e,r,t){var a=r[0].trace;a.selectedpoints?(_c.selectedPointStyle(t.selectAll("path.point"),a),_c.selectedTextStyle(t.selectAll("text"),a)):(s4(t,a,e),u4(t,a,e))}iI.exports={style:bme,stylePoints:s4,styleText:u4,styleOnSelect:xme}});var lI=N((JPe,oI)=>{"use strict";var wc=Tr(),_me=Pn();oI.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&wc.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,o=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&wc.opacity(i)?i:o&&wc.opacity(o)&&(t.mlw||((r.marker||{}).line||{}).width)?o:"",n?wc.opacity(n)<.3?wc.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&wc.opacity(a)&&_me.hasLines(r)&&r.line.width?a:r.fillcolor)}});var c4=N(($Pe,uI)=>{"use strict";var dm=Ee(),sI=Fn(),wme=gr(),Tme=lI(),f4=Tr(),Ame=dm.fillText;uI.exports=function(r,t,a,n){var i=r.cd,o=i[0].trace,l=r.xa,s=r.ya,u=l.c2p(t),f=s.c2p(a),c=[u,f],v=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,m=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var y=function(G){if(p){var B=l.c2p(G.xStart),V=l.c2p(G.xEnd);return u>=Math.min(B,V)&&u<=Math.max(B,V)?0:1/0}var X=Math.max(3,G.mrc||0),Z=1-1/X,te=Math.abs(l.c2p(G.x)-u);return te=Math.min(B,V)&&f<=Math.max(B,V)?0:1/0}var X=Math.max(3,G.mrc||0),Z=1-1/X,te=Math.abs(s.c2p(G.y)-f);return tele!=W>=le&&(ye=he[K-1][0],ue=he[K][0],W-de&&(oe=ye+(ue-ye)*(le-de)/(W-de),X=Math.min(X,oe),Z=Math.max(Z,oe)));return X=Math.max(X,0),Z=Math.min(Z,l._length),{x0:X,x1:Z,y0:le,y1:le}}if(v.indexOf("fills")!==-1&&o._fillElement){var O=D(o._fillElement)&&!D(o._fillExclusionElement);if(O){var H=z(o._polygons);H===null&&(H={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var Y=f4.defaultLine;return f4.opacity(o.fillcolor)?Y=o.fillcolor:f4.opacity((o.line||{}).color)&&(Y=o.line.color),dm.extendFlat(r,{distance:r.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:Y,hovertemplate:!1}),delete r.index,o.text&&!dm.isArrayOrTypedArray(o.text)?r.text=String(o.text):r.text=o.name,[r]}}}});var v4=N((KPe,cI)=>{"use strict";var fI=Pn();cI.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l=a[0].trace,s,u,f,c,v=!fI.hasMarkers(l)&&!fI.hasText(l);if(v)return[];if(t===!1)for(s=0;s{"use strict";vI.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var mI=N((eRe,yI)=>{"use strict";var o0=gr().traceIs,h4=x1();yI.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(Mme(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function Mme(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=kme(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=a+"calendar",l=i[o],s={noMultiCategory:!o0(i,"cartesian")||o0(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,pI(i,a)){var u=dI(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(pI(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function dI(e){return{v:"x",h:"y"}[e.orientation||"v"]}function pI(e,r){var t=dI(e),a=o0(e,"box-violin"),n=o0(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var bI=N((rRe,gI)=>{"use strict";var Sme=Wn().isTypedArraySpec;function qme(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,o;if(r.axData)n=r.axData;else for(n=[],i=0;i0||Sme(i),l;o&&(l="array");var s=a("categoryorder",l),u;s==="array"&&(u=a("categoryarray")),!o&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=qme(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var d4=N((tRe,_I)=>{"use strict";var xI=Sn().mix,Lme=li(),Cme=Ee();_I.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function o(M,S){return Cme.coerce2(r,t,n.attributes,M,S)}var l=o("linecolor",i),s=o("linewidth"),u=a("showline",n.showLine||!!l||!!s);u||(delete t.linecolor,delete t.linewidth);var f=xI(i,n.bgColor,n.blend||Lme.lightFraction).toRgbString(),c=o("gridcolor",f),v=o("gridwidth"),d=o("griddash"),p=a("showgrid",n.showGrid||!!c||!!v||!!d);if(p||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var m=xI(t.gridcolor,n.bgColor,67).toRgbString(),y=o("minor.gridcolor",m),x=o("minor.gridwidth",t.gridwidth||1),_=o("minor.griddash",t.griddash||"solid"),w=a("minor.showgrid",!!y||!!x||!!_);w||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var b=o("zerolinecolor",i),T=o("zerolinewidth"),k=a("zeroline",n.showGrid||!!b||!!T);k||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var y4=N((aRe,SI)=>{"use strict";var wI=Pr(),Eme=gr(),l0=Ee(),Dme=_t(),Pme=eo(),p4=hi(),TI=r1(),AI=t1(),Rme=n1(),Fme=i1(),Nme=bI(),zme=d4(),Ime=$x(),MI=Zf(),pm=Ca().WEEKDAY_PATTERN,Ome=Ca().HOUR_PATTERN;SI.exports=function(r,t,a,n,i){var o=n.letter,l=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},c=t.type||f.type||"-",v;if(c==="date"){var d=Eme.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(v=a("ticklabelmode"))}!n.noTicklabelindex&&(c==="date"||c==="linear")&&a("ticklabelindex");var p="";(!n.noTicklabelposition||c==="multicategory")&&(p=l0.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),MI(t,i),Ime(r,t,a,n),Nme(r,t,a,n),c!=="category"&&!n.noHover&&a("hoverformat");var m=a("color"),y=m!==p4.color.dflt?m:l.color,x=s.label||i._dfltTitle[o];if(Fme(r,t,a,c,n),!u)return t;a("title.text",x),l0.coerceFont(a,"title.font",l,{overrideDflt:{size:l0.bigFont(l.size),color:y}}),TI(r,t,a,c);var _=n.hasMinor;if(_&&(Dme.newContainer(t,"minor"),TI(r,t,a,c,{isMinor:!0})),Rme(r,t,a,c,n),AI(r,t,a,n),_){var w=n.isMinor;n.isMinor=!0,AI(r,t,a,n),n.isMinor=w}zme(r,t,a,{dfltColor:m,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:_,attributes:p4}),_&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var b=c==="multicategory";if(!n.noTickson&&(c==="category"||b)&&(t.ticks||t.showgrid)){var T;b&&(T="boundaries");var k=a("tickson",T);k==="boundaries"&&delete t.ticklabelposition}if(b){var M=a("showdividers");M&&(a("dividercolor"),a("dividerwidth"))}if(c==="date")if(Pme(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Bme}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var S=0;S=2){var o="",l,s;if(i.length===2){for(l=0;l<2;l++)if(s=kI(i[l]),s){o=pm;break}}var u=a("pattern",o);if(u===pm)for(l=0;l<2;l++)s=kI(i[l]),s&&(r.bounds[l]=i[l]=s-1);if(u)for(l=0;l<2;l++)switch(s=i[l],u){case pm:if(!wI(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[l]=i[l]=s;break;case Ome:if(!wI(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[l]=i[l]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var Ume=Pr(),ym=Ee();qI.exports=function(r,t,a,n){var i=n.counterAxes||[],o=n.overlayableAxes||[],l=n.letter,s=n.grid,u=n.overlayingDomain,f,c,v,d,p,m;s&&(c=s._domains[l][s._axisMap[t._id]],f=s._anchors[t._id],c&&(v=s[l+"side"].split(" ")[0],d=s.domain[l][v==="right"||v==="top"?1:0])),c=c||[0,1],f=f||(Ume(r.position)?"free":i[0]||"free"),v=v||(l==="x"?"bottom":"left"),d=d||0,p=0,m=!1;var y=ym.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),x=ym.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(y==="free"){if(l==="y"){var _=a("autoshift");_&&(d=x==="left"?u[0]:u[1],m=t.automargin?t.automargin:!0,p=x==="left"?-3:3),a("shift",p)}a("position",d)}a("automargin",m);var w=!1;if(o.length&&(w=ym.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!w){var b=a("domain",c);b[0]>b[1]-1/4096&&(t.domain=c),ym.noneOrAll(r.domain,t.domain,c),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var zI=N((iRe,NI)=>{"use strict";var Su=Ee(),LI=Tr(),Gme=qo().isUnifiedHover,Yme=A5(),CI=_t(),Vme=Sf(),EI=hi(),Wme=mI(),DI=y4(),jme=Tu(),PI=m4(),b4=va(),Bo=b4.id2name,RI=b4.name2id,Zme=Ca().AX_ID_PATTERN,FI=gr(),mm=FI.traceIs,g4=FI.getComponentMethod;function gm(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}NI.exports=function(r,t,a){var n=t.autotypenumbers,i={},o={},l={},s={},u={},f={},c={},v={},d={},p={},m,y;for(m=0;m{"use strict";var Xme=Sr(),II=gr(),bm=Ee(),Kn=jr(),xm=Or();OI.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){xm.redrawComponents(r);return}function o(y){var x=y.xaxis,_=y.yaxis;i._defs.select("#"+y.clipId+"> rect").call(Kn.setTranslate,0,0).call(Kn.setScale,1,1),y.plot.call(Kn.setTranslate,x._offset,_._offset).call(Kn.setScale,1,1);var w=y.plot.selectAll(".scatterlayer .trace");w.selectAll(".point").call(Kn.setPointGroupScale,1,1),w.selectAll(".textpoint").call(Kn.setTextPointsScale,1,1),w.call(Kn.hideOutsideRangePoints,y)}function l(y,x){var _=y.plotinfo,w=_.xaxis,b=_.yaxis,T=w._length,k=b._length,M=!!y.xr1,S=!!y.yr1,E=[];if(M){var P=bm.simpleMap(y.xr0,w.r2l),R=bm.simpleMap(y.xr1,w.r2l),D=P[1]-P[0],z=R[1]-R[0];E[0]=(P[0]*(1-x)+x*R[0]-P[0])/(P[1]-P[0])*T,E[2]=T*(1-x+x*z/D),w.range[0]=w.l2r(P[0]*(1-x)+x*R[0]),w.range[1]=w.l2r(P[1]*(1-x)+x*R[1])}else E[0]=0,E[2]=T;if(S){var O=bm.simpleMap(y.yr0,b.r2l),H=bm.simpleMap(y.yr1,b.r2l),Y=O[1]-O[0],G=H[1]-H[0];E[1]=(O[1]*(1-x)+x*H[1]-O[1])/(O[0]-O[1])*k,E[3]=k*(1-x+x*G/Y),b.range[0]=w.l2r(O[0]*(1-x)+x*H[0]),b.range[1]=b.l2r(O[1]*(1-x)+x*H[1])}else E[1]=0,E[3]=k;xm.drawOne(r,w,{skipTitle:!0}),xm.drawOne(r,b,{skipTitle:!0}),xm.redrawComponents(r,[w._id,b._id]);var B=M?T/E[2]:1,V=S?k/E[3]:1,X=M?E[0]:0,Z=S?E[1]:0,te=M?E[0]/E[2]*T:0,fe=S?E[1]/E[3]*k:0,le=w._offset-te,ie=b._offset-fe;_.clipRect.call(Kn.setTranslate,X,Z).call(Kn.setScale,1/B,1/V),_.plot.call(Kn.setTranslate,le,ie).call(Kn.setScale,B,V),Kn.setPointGroupScale(_.zoomScalePts,1/B,1/V),Kn.setTextPointsScale(_.zoomScaleTxt,1/B,1/V)}var s;n&&(s=n());function u(){for(var y={},x=0;xa.duration?(u(),d=window.cancelAnimationFrame(m)):d=window.requestAnimationFrame(m)}return c=Date.now(),d=window.requestAnimationFrame(m),Promise.resolve()}});var qi=N(Ka=>{"use strict";var wm=Sr(),HI=gr(),qu=Ee(),Jme=ea(),$me=jr(),UI=jp().getModuleCalcData,us=va(),so=Ca(),Kme=ll(),at=qu.ensureSingle;function _m(e,r,t){return qu.ensureSingle(e,r,t,function(a){a.datum(t)})}var Lu=so.zindexSeparator;Ka.name="cartesian";Ka.attr=["xaxis","yaxis"];Ka.idRoot=["x","y"];Ka.idRegex=so.idRegex;Ka.attrRegex=so.attrRegex;Ka.attributes=hI();Ka.layoutAttributes=hi();Ka.supplyLayoutDefaults=zI();Ka.transitionAxes=BI();Ka.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,o=i,l={},s={},u,f,c;for(u=0;u0){var d=v.id;if(d.indexOf(Lu)!==-1)continue;d+=Lu+(u+1),v=qu.extendFlat({},v,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],m,y=0;y1&&(T+=Lu+b),w.push(l+T),o=0;o1,c=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=at(a,"path","xlines-above"),r.ylines=at(a,"path","ylines-above"),r.xaxislayer=at(a,"g","xaxislayer-above"),r.yaxislayer=at(a,"g","yaxislayer-above");else{if(!o){var v=at(a,"g","layer-subplot");r.shapelayer=at(v,"g","shapelayer"),r.imagelayer=at(v,"g","imagelayer"),c&&f?(r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer):(r.minorGridlayer=at(a,"g","minor-gridlayer"),r.gridlayer=at(a,"g","gridlayer"),r.zerolinelayer=at(a,"g","zerolinelayer"));var d=at(a,"g","layer-between");r.shapelayerBetween=at(d,"g","shapelayer"),r.imagelayerBetween=at(d,"g","imagelayer"),at(a,"path","xlines-below"),at(a,"path","ylines-below"),r.overlinesBelow=at(a,"g","overlines-below"),at(a,"g","xaxislayer-below"),at(a,"g","yaxislayer-below"),r.overaxesBelow=at(a,"g","overaxes-below")}r.overplot=at(a,"g","overplot"),r.plot=at(r.overplot,"g",n),o||(r.xlines=at(a,"path","xlines-above"),r.ylines=at(a,"path","ylines-above"),r.overlinesAbove=at(a,"g","overlines-above"),at(a,"g","xaxislayer-above"),at(a,"g","yaxislayer-above"),r.overaxesAbove=at(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+l),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+l),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var p=c.plotgroup,m=n+"-x",y=n+"-y";r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer,at(c.overlinesBelow,"path",m),at(c.overlinesBelow,"path",y),at(c.overaxesBelow,"g",m),at(c.overaxesBelow,"g",y),r.plot=at(c.overplot,"g",n),at(c.overlinesAbove,"path",m),at(c.overlinesAbove,"path",y),at(c.overaxesAbove,"g",m),at(c.overaxesAbove,"g",y),r.xlines=p.select(".overlines-"+l).select("."+m),r.ylines=p.select(".overlines-"+s).select("."+y),r.xaxislayer=p.select(".overaxes-"+l).select("."+m),r.yaxislayer=p.select(".overaxes-"+s).select("."+y)}o||(u||(_m(r.minorGridlayer,"g",r.xaxis._id),_m(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(x){return x[0]}).sort(us.idSort),_m(r.gridlayer,"g",r.xaxis._id),_m(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(x){return x[0]}).sort(us.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function VI(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=wm.select(this);f.remove(),WI(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],o=0;o{"use strict";var Tm=Pn();jI.exports={hasLines:Tm.hasLines,hasMarkers:Tm.hasMarkers,hasText:Tm.hasText,isBubble:Tm.isBubble,attributes:wi(),layoutAttributes:Yp(),supplyDefaults:pz(),crossTraceDefaults:gz(),supplyLayoutDefaults:xz(),calc:lm().calc,crossTraceCalc:Yz(),arraysToCalcdata:im(),plot:i4(),colorbar:i0(),formatLabels:o4(),style:ku().style,styleOnSelect:ku().styleOnSelect,hoverPoints:c4(),selectPoints:v4(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:qi(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var $I=N((uRe,JI)=>{"use strict";var ege=Sr(),rge=Tr(),XI=h_(),x4=Ee(),tge=x4.strScale,age=x4.strRotate,nge=x4.strTranslate;JI.exports=function(r,t,a){var n=r.node(),i=XI[a.arrowhead||0],o=XI[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,c=i.backoff*l+a.standoff,v=o.backoff*s+a.startstandoff,d,p,m,y;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},p={x:+r.attr("x2"),y:+r.attr("y2")};var x=d.x-p.x,_=d.y-p.y;if(m=Math.atan2(_,x),y=m+Math.PI,c&&v&&c+v>Math.sqrt(x*x+_*_)){O();return}if(c){if(c*c>x*x+_*_){O();return}var w=c*Math.cos(m),b=c*Math.sin(m);p.x+=w,p.y+=b,r.attr({x2:p.x,y2:p.y})}if(v){if(v*v>x*x+_*_){O();return}var T=v*Math.cos(m),k=v*Math.sin(m);d.x-=T,d.y-=k,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var M=n.getTotalLength(),S="";if(M{"use strict";var KI=Sr(),_4=gr(),ige=ea(),cs=Ee(),w4=cs.strTranslate,u0=Or(),Cu=Tr(),ml=jr(),QI=Fn(),T4=Ea(),A4=rs(),s0=pi(),oge=_t().arrayEditor,lge=$I();tO.exports={draw:sge,drawOne:eO,drawRaw:rO};function sge(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?qe="right":qe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[qe]}for(var de=!1,W=["x","y"],Q=0;Q1)&&(me===pe?(Qe=we.r2fraction(r["a"+j]),(Qe<0||Qe>1)&&(de=!0)):de=!0),Xe=we._offset+we.r2p(r[j]),Te=.5}else{var Le=ir==="domain";j==="x"?(se=r[j],Xe=Le?we._offset+we._length*se:Xe=l.l+l.w*se):(se=1-r[j],Xe=Le?we._offset+we._length*se:Xe=l.t+l.h*se),Te=r.showarrow?.5:se}if(r.showarrow){Pe.head=Xe;var Ce=r["a"+j];if(Se=Fe*ue(.5,r.xanchor)-Re*ue(.5,r.yanchor),me===pe){var Ge=u0.getRefType(me);Ge==="domain"?(j==="y"&&(Ce=1-Ce),Pe.tail=we._offset+we._length*Ce):Ge==="paper"?j==="y"?(Ce=1-Ce,Pe.tail=l.t+l.h*Ce):Pe.tail=l.l+l.w*Ce:Pe.tail=we._offset+we.r2p(Ce),Ue=Se}else Pe.tail=Xe+Ce,Ue=Se+Ce;Pe.text=Pe.tail+Se;var Ze=o[j==="x"?"width":"height"];if(pe==="paper"&&(Pe.head=cs.constrain(Pe.head,1,Ze-1)),me==="pixel"){var Ye=-Math.max(Pe.tail-3,Pe.text),He=Math.min(Pe.tail+3,Pe.text)-Ze;Ye>0?(Pe.tail+=Ye,Pe.text+=Ye):He>0&&(Pe.tail-=He,Pe.text-=He)}Pe.tail+=ze,Pe.head+=ze}else Se=Ie*ue(Te,Be),Ue=Se,Pe.text=Xe+Se;Pe.text+=ze,Se+=ze,Ue+=ze,r["_"+j+"padplus"]=Ie/2+Ue,r["_"+j+"padminus"]=Ie/2-Ue,r["_"+j+"size"]=Ie,r["_"+j+"shift"]=Se}if(de){M.remove();return}var $e=0,cr=0;if(r.align!=="left"&&($e=(K-le)*(r.align==="center"?.5:1)),r.valign!=="top"&&(cr=(he-ie)*(r.valign==="middle"?.5:1)),te)Z.select("svg").attr({x:P+$e-1,y:P+cr}).call(ml.setClipUrl,D?m:null,e);else{var lr=P+cr-fe.top,Oe=P+$e-fe.left;Y.call(T4.positionText,Oe,lr).call(ml.setClipUrl,D?m:null,e)}z.select("rect").call(ml.setRect,P,P,K,he),R.call(ml.setRect,S/2,S/2,oe-S,ye-S),M.call(ml.setTranslate,Math.round(y.x.text-oe/2),Math.round(y.y.text-ye/2)),w.attr({transform:"rotate("+x+","+y.x.text+","+y.y.text+")"});var ne=function(De,qe){_.selectAll(".annotation-arrow-g").remove();var ar=y.x.head,hr=y.y.head,ur=y.x.tail+De,Ar=y.y.tail+qe,Wr=y.x.text+De,Vr=y.y.text+qe,zr=cs.rotationXYMatrix(x,Wr,Vr),Et=cs.apply2DTransform(zr),Dt=cs.apply2DTransform2(zr),ma=+R.attr("width"),St=+R.attr("height"),ja=Wr-.5*ma,ga=ja+ma,jt=Vr-.5*St,Na=jt+St,br=[[ja,jt,ja,Na],[ja,Na,ga,Na],[ga,Na,ga,jt],[ga,jt,ja,jt]].map(Dt);if(!br.reduce(function(ut,xa){return ut^!!cs.segmentsIntersect(ar,hr,ar+1e6,hr+1e6,xa[0],xa[1],xa[2],xa[3])},!1)){br.forEach(function(ut){var xa=cs.segmentsIntersect(ur,Ar,ar,hr,ut[0],ut[1],ut[2],ut[3]);xa&&(ur=xa.x,Ar=xa.y)});var pt=r.arrowwidth,Nr=r.arrowcolor,st=r.arrowside,Pt=_.append("g").style({opacity:Cu.opacity(Nr)}).classed("annotation-arrow-g",!0),Qr=Pt.append("path").attr("d","M"+ur+","+Ar+"L"+ar+","+hr).style("stroke-width",pt+"px").call(Cu.stroke,Cu.rgb(Nr));if(lge(Qr,st,r),s.annotationPosition&&Qr.node().parentNode&&!a){var ct=ar,ba=hr;if(r.standoff){var Zt=Math.sqrt(Math.pow(ar-ur,2)+Math.pow(hr-Ar,2));ct+=r.standoff*(ur-ar)/Zt,ba+=r.standoff*(Ar-hr)/Zt}var tn=Pt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ur-ct)+","+(Ar-ba),transform:w4(ct,ba)}).style("stroke-width",pt+6+"px").call(Cu.stroke,"rgba(0,0,0,0)").call(Cu.fill,"rgba(0,0,0,0)"),Tn,Xt;s0.init({element:tn.node(),gd:e,prepFn:function(){var ut=ml.getTranslate(M);Tn=ut.x,Xt=ut.y,n&&n.autorange&&v(n._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0)},moveFn:function(ut,xa){var Ko=Et(Tn,Xt),Qo=Ko[0]+ut,vt=Ko[1]+xa;M.call(ml.setTranslate,Qo,vt),d("x",fs(n,ut,"x",l,r)),d("y",fs(i,xa,"y",l,r)),r.axref===r.xref&&d("ax",fs(n,ut,"ax",l,r)),r.ayref===r.yref&&d("ay",fs(i,xa,"ay",l,r)),Pt.attr("transform",w4(ut,xa)),w.attr({transform:"rotate("+x+","+Qo+","+vt+")"})},doneFn:function(){_4.call("_guiRelayout",e,p());var ut=document.querySelector(".js-notes-box-panel");ut&&ut.redraw(ut.selectedObj)}})}}};if(r.showarrow&&ne(0,0),b){var ve;s0.init({element:M.node(),gd:e,prepFn:function(){ve=w.attr("transform")},moveFn:function(De,qe){var ar="pointer";if(r.showarrow)r.axref===r.xref?d("ax",fs(n,De,"ax",l,r)):d("ax",r.ax+De),r.ayref===r.yref?d("ay",fs(i,qe,"ay",l.w,r)):d("ay",r.ay+qe),ne(De,qe);else{if(a)return;var hr,ur;if(n)hr=fs(n,De,"x",l,r);else{var Ar=r._xsize/l.w,Wr=r.x+(r._xshift-r.xshift)/l.w-Ar/2;hr=s0.align(Wr+De/l.w,Ar,0,1,r.xanchor)}if(i)ur=fs(i,qe,"y",l,r);else{var Vr=r._ysize/l.h,zr=r.y-(r._yshift+r.yshift)/l.h-Vr/2;ur=s0.align(zr-qe/l.h,Vr,0,1,r.yanchor)}d("x",hr),d("y",ur),(!n||!i)&&(ar=s0.getCursor(n?.5:hr,i?.5:ur,r.xanchor,r.yanchor))}w.attr({transform:w4(De,qe)+ve}),A4(M,ar)},clickFn:function(De,qe){r.captureevents&&e.emit("plotly_clickannotation",k(qe))},doneFn:function(){A4(M),_4.call("_guiRelayout",e,p());var De=document.querySelector(".js-notes-box-panel");De&&De.redraw(De.selectedObj)}})}}s.annotationText?Y.call(T4.makeEditable,{delegate:M,gd:e}).call(G).on("edit",function(V){r.text=V,this.call(G),d("text",V),n&&n.autorange&&v(n._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0),_4.call("_guiRelayout",e,p())}):Y.call(G)}});var sO=N((cRe,lO)=>{"use strict";var aO=Ee(),uge=gr(),nO=_t().arrayEditor;lO.exports={hasClickToShow:fge,onClick:cge};function fge(e,r){var t=oO(e,r);return t.on.length>0||t.explicitOff.length>0}function cge(e,r){var t=oO(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},o=e._fullLayout.annotations,l,s;if(a.length||n.length){for(l=0;l{"use strict";var M4=Ee(),Tc=Tr();uO.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),o=n("bordercolor"),l=Tc.opacity(o);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),M4.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var c=n("arrowside"),v,d;c.indexOf("end")!==-1&&(v=n("arrowhead"),d=n("arrowsize")),c.indexOf("start")!==-1&&(n("startarrowhead",v),n("startarrowsize",d)),n("arrowcolor",l?t.bordercolor:Tc.defaultLine),n("arrowwidth",(l&&s||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),m=a.hoverlabel||{};if(p){var y=n("hoverlabel.bgcolor",m.bgcolor||(Tc.opacity(i)?Tc.rgb(i):Tc.defaultLine)),x=n("hoverlabel.bordercolor",m.bordercolor||Tc.contrast(y)),_=M4.extendFlat({},m.font);_.color||(_.color=x),M4.coerceFont(n,"hoverlabel.font",_)}n("captureevents",!!p)}});var cO=N((hRe,fO)=>{"use strict";var S4=Ee(),Eu=Or(),vge=eo(),hge=k4(),dge=vc();fO.exports=function(r,t){vge(r,t,{name:"annotations",handleItemDefaults:pge})};function pge(e,r,t){function a(w,b){return S4.coerce(e,r,dge,w,b)}var n=a("visible"),i=a("clicktoshow");if(n||i){hge(e,r,t,a);for(var o=r.showarrow,l=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var c=l[f],v=Eu.coerceRef(e,r,u,c,"","paper");if(v!=="paper"){var d=Eu.getFromId(u,v);d._annIndices.push(r._index)}if(Eu.coercePosition(r,u,a,v,c,.5),o){var p="a"+c,m=Eu.coerceRef(e,r,u,p,"pixel",["pixel","paper"]);m!=="pixel"&&m!==v&&(m=r[p]="pixel");var y=m==="pixel"?s[f]:.4;Eu.coercePosition(r,u,a,m,p,y)}a(c+"anchor"),a(c+"shift")}if(S4.noneOrAll(e,r,["x","y"]),o&&S4.noneOrAll(e,r,["ax","ay"]),i){var x=a("xclick"),_=a("yclick");r._xclick=x===void 0?r.x:Eu.cleanPosition(x,u,r.xref),r._yclick=_===void 0?r.y:Eu.cleanPosition(_,u,r.yref)}}}});var dO=N((dRe,hO)=>{"use strict";var q4=Ee(),Du=Or(),yge=Am().draw;hO.exports=function(r){var t=r._fullLayout,a=q4.filterVisible(t.annotations);if(a.length&&r._fullData.length)return q4.syncOrAsync([yge,mge],r)};function mge(e){var r=e._fullLayout;q4.filterVisible(r.annotations).forEach(function(t){var a=Du.getFromId(e,t.xref),n=Du.getFromId(e,t.yref),i=Du.getRefType(t.xref),o=Du.getRefType(t.yref);t._extremes={},i==="range"&&vO(t,a),o==="range"&&vO(t,n)})}function vO(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],o=e[a+"ref"],l=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],c=3*e.arrowsize*e.arrowwidth||0,v=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,m=p+f,y=p-f,x;if(l===o){var _=Du.findExtremes(r,[r.r2c(n)],{ppadplus:v,ppadminus:d}),w=Du.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,m),ppadminus:Math.max(u,y)});x={min:[_.min[0],w.min[0]],max:[_.max[0],w.max[0]]}}else m=i?m+i:m,y=i?y-i:y,x=Du.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,v,m),ppadminus:Math.max(u,d,y)});e._extremes[t]=x}});var yO=N((pRe,pO)=>{"use strict";var gge=Pr(),bge=fp();pO.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(!(i||o))return;var l=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function c(d){var p=u[d],m=null;i?m=bge(p,t.range):m=Math.pow(10,p),gge(m)||(m=null),n(f+d,m)}for(var v=0;v{"use strict";var L4=Am(),mO=sO();gO.exports={moduleType:"component",name:"annotations",layoutAttributes:vc(),supplyLayoutDefaults:cO(),includeBasePlot:Uh()("annotations"),calcAutorange:dO(),draw:L4.draw,drawOne:L4.drawOne,drawRaw:L4.drawRaw,hasClickToShow:mO.hasClickToShow,onClick:mO.onClick,convertCoords:yO()}});var Mm=N((mRe,xO)=>{"use strict";var Mt=vc(),xge=Xi().overrideAll,_ge=_t().templatedArray;xO.exports=xge(_ge("annotation",{visible:Mt.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Mt.xanchor,xshift:Mt.xshift,yanchor:Mt.yanchor,yshift:Mt.yshift,text:Mt.text,textangle:Mt.textangle,font:Mt.font,width:Mt.width,height:Mt.height,opacity:Mt.opacity,align:Mt.align,valign:Mt.valign,bgcolor:Mt.bgcolor,bordercolor:Mt.bordercolor,borderpad:Mt.borderpad,borderwidth:Mt.borderwidth,showarrow:Mt.showarrow,arrowcolor:Mt.arrowcolor,arrowhead:Mt.arrowhead,startarrowhead:Mt.startarrowhead,arrowside:Mt.arrowside,arrowsize:Mt.arrowsize,startarrowsize:Mt.startarrowsize,arrowwidth:Mt.arrowwidth,standoff:Mt.standoff,startstandoff:Mt.startstandoff,hovertext:Mt.hovertext,hoverlabel:Mt.hoverlabel,captureevents:Mt.captureevents}),"calc","from-root")});var wO=N((gRe,_O)=>{"use strict";var C4=Ee(),wge=Or(),Tge=eo(),Age=k4(),Mge=Mm();_O.exports=function(r,t,a){Tge(r,t,{name:"annotations",handleItemDefaults:kge,fullLayout:a.fullLayout})};function kge(e,r,t,a){function n(l,s){return C4.coerce(e,r,Mge,l,s)}function i(l){var s=l+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],wge.coercePosition(r,u,n,l,l,.5)}var o=n("visible");o&&(Age(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),C4.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),C4.noneOrAll(e,r,["ax","ay"])))}});var kO=N((bRe,MO)=>{"use strict";var TO=Ee(),AO=Or();MO.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function E4(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function qge(e,r){var t=E4(e.projection,E4(e.view,E4(e.model,[r[0],r[1],r[2],1])));return t}SO.exports=qge});var CO=N((_Re,LO)=>{"use strict";var Lge=Am().drawRaw,Cge=qO(),Ege=["x","y","z"];LO.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(o._pdata=Cge(r.glplot.cameraParams,[t.xaxis.r2l(o.x)*a[0],t.yaxis.r2l(o.y)*a[1],t.zaxis.r2l(o.z)*a[2]]),Lge(r.graphDiv,o,i,r.id,o._xa,o._ya))}}});var PO=N((wRe,DO)=>{"use strict";var Dge=gr(),EO=Ee();DO.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Mm()}}},layoutAttributes:Mm(),handleDefaults:wO(),includeBasePlot:Pge,convert:kO(),draw:CO()};function Pge(e,r){var t=Dge.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var RO=vc(),FO=fa(),NO=wi().line,Rge=si().dash,uo=bt().extendFlat,Fge=_t().templatedArray,TRe=Bh(),Ac=mn(),Nge=La().shapeTexttemplateAttrs,zge=Ap();zO.exports=Fge("shape",{visible:uo({},Ac.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:uo({},Ac.legend,{editType:"calc+arraydraw"}),legendgroup:uo({},Ac.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:uo({},Ac.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:FO({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:uo({},Ac.legendrank,{editType:"calc+arraydraw"}),legendwidth:uo({},Ac.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:uo({},RO.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:uo({},RO.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:uo({},NO.color,{editType:"arraydraw"}),width:uo({},NO.width,{editType:"calc+arraydraw"}),dash:uo({},Rge,{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:Nge({},{keys:Object.keys(zge)}),font:FO({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 BO=N((MRe,OO)=>{"use strict";var f0=Ee(),Mc=Or(),Ige=eo(),Oge=D4(),IO=ns();OO.exports=function(r,t){Ige(r,t,{name:"shapes",handleItemDefaults:Hge})};function Bge(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Hge(e,r,t){function a(V,X){return f0.coerce(e,r,Oge,V,X)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),f0.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var o=a("path"),l=o?"path":"rect",s=a("type",l),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),v=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var m=d[p],y=m+"anchor",x=m==="x"?c:v,_={_fullLayout:t},w,b,T,k=Mc.coerceRef(e,r,_,m,void 0,"paper"),M=Mc.getRefType(k);if(M==="range"?(w=Mc.getFromId(_,k),w._shapeIndices.push(r._index),T=IO.rangeToShapePosition(w),b=IO.shapePositionToRange(w),(w.type==="category"||w.type==="multicategory")&&(a(m+"0shift"),a(m+"1shift"))):b=T=f0.identity,u){var S=.25,E=.75,P=m+"0",R=m+"1",D=e[P],z=e[R];e[P]=b(e[P],!0),e[R]=b(e[R],!0),x==="pixel"?(a(P,0),a(R,10)):(Mc.coercePosition(r,_,a,k,P,S),Mc.coercePosition(r,_,a,k,R,E)),r[P]=T(r[P]),r[R]=T(r[R]),e[P]=D,e[R]=z}if(x==="pixel"){var O=e[y];e[y]=b(e[y],!0),Mc.coercePosition(r,_,a,k,y,.25),r[y]=T(r[y]),e[y]=O}}u&&f0.noneOrAll(e,r,["x0","x1","y0","y1"]);var H=s==="line",Y,G;if(u&&(Y=a("label.texttemplate")),Y||(G=a("label.text")),G||Y){a("label.textangle");var B=a("label.textposition",H?"middle":"middle center");a("label.xanchor"),a("label.yanchor",Bge(H,B)),a("label.padding"),f0.coerceFont(a,"label.font",t.font)}}}});var GO=N((kRe,UO)=>{"use strict";var Uge=Tr(),HO=Ee();function Gge(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}UO.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),HO.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Uge.contrast(i)),a("newshape.line.dash")}var o=r.dragmode==="drawline",l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(l||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Gge(o,u)),a("newshape.label.padding"),HO.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var ZO=N((SRe,jO)=>{"use strict";var P4=Ee(),kc=Or(),Sc=_h(),VO=ns();jO.exports=function(r){var t=r._fullLayout,a=P4.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+o:o;return{ppad:o,ppadplus:l?c:v,ppadminus:l?v:c}}else return{ppad:o}}function YO(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,o,l=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],o=r[a+"1"],n&&(l=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],o=r[a+"anchor"]),i!==void 0)return[u(i)+l,u(o)+s];if(r.path){var c=1/0,v=-1/0,d=r.path.match(Sc.segmentRE),p,m,y,x,_;for(e.type==="date"&&(u=VO.decodeDate(u)),p=0;pv&&(v=_)));if(v>=c)return[c,v]}}});var $O=N((qRe,JO)=>{"use strict";var XO=hy();JO.exports={moduleType:"component",name:"shapes",layoutAttributes:D4(),supplyLayoutDefaults:BO(),supplyDrawNewShapeDefaults:GO(),includeBasePlot:Uh()("shapes"),calcAutorange:ZO(),draw:XO.draw,drawOne:XO.drawOne}});var R4=N((CRe,QO)=>{"use strict";var KO=Ca(),Wge=_t().templatedArray,LRe=Bh();QO.exports=Wge("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",KO.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",KO.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var rB=N((ERe,eB)=>{"use strict";var jge=Ee(),F4=Or(),Zge=eo(),Xge=R4(),Jge="images";eB.exports=function(r,t){var a={name:Jge,handleItemDefaults:$ge};Zge(r,t,a)};function $ge(e,r,t){function a(v,d){return jge.coerce(e,r,Xge,v,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:t},l=["x","y"],s=0;s<2;s++){var u=l[s],f=F4.coerceRef(e,r,o,u,"paper",void 0);if(f!=="paper"){var c=F4.getFromId(o,f);c._imgIndices.push(r._index)}F4.coercePosition(r,o,a,f,u,0)}return r}});var iB=N((DRe,nB)=>{"use strict";var tB=Sr(),Kge=jr(),qc=Or(),aB=va(),Qge=ll();nB.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],o,l;for(l=0;l{"use strict";var oB=Pr(),e2e=fp();lB.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(i||o){for(var l=r._fullLayout.images,s=t._id.charAt(0),u,f,c=0;c{"use strict";uB.exports={moduleType:"component",name:"images",layoutAttributes:R4(),supplyLayoutDefaults:rB(),includeBasePlot:Uh()("images"),draw:iB(),convertCoords:sB()}});var km=N((FRe,cB)=>{"use strict";cB.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 N4=N((NRe,hB)=>{"use strict";var r2e=fa(),t2e=li(),a2e=bt().extendFlat,n2e=Xi().overrideAll,i2e=Mp(),vB=_t().templatedArray,o2e=vB("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}});hB.exports=n2e(vB("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:o2e,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:a2e(i2e({editType:"arraydraw"}),{}),font:r2e({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:t2e.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var mB=N((zRe,yB)=>{"use strict";var Sm=Ee(),dB=eo(),pB=N4(),l2e=km(),s2e=l2e.name,u2e=pB.buttons;yB.exports=function(r,t){var a={name:s2e,handleItemDefaults:f2e};dB(r,t,a)};function f2e(e,r,t){function a(o,l){return Sm.coerce(e,r,pB,o,l)}var n=dB(e,r,{name:"buttons",handleItemDefaults:c2e}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Sm.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Sm.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c2e(e,r){function t(n,i){return Sm.coerce(e,r,u2e,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var xB=N((IRe,bB)=>{"use strict";bB.exports=It;var fo=Sr(),gB=Tr(),Lc=jr(),qm=Ee();function It(e,r,t){this.gd=e,this.container=r,this.id=t,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})}It.barWidth=2;It.barLength=20;It.barRadius=2;It.barPad=1;It.barColor="#808BA4";It.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,o=n.height;this.position=r;var l=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,c=this.position.direction,v=c==="down",d=c==="left",p=c==="right",m=c==="up",y=s,x=f,_,w,b,T;!v&&!d&&!p&&!m&&(this.position.direction="down",v=!0);var k=v||m;k?(_=l,w=_+y,v?(b=u,T=Math.min(b+x,o),x=T-b):(T=u+x,b=Math.max(T-x,0),x=T-b)):(b=u,T=b+x,d?(w=l+y,_=Math.max(w-y,0),y=w-_):(_=l,w=Math.min(_+y,i),y=w-_)),this._box={l:_,t:b,w:y,h:x};var M=s>y,S=It.barLength+2*It.barPad,E=It.barWidth+2*It.barPad,P=l,R=u+f;R+E>o&&(R=o-E);var D=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(gB.fill,It.barColor),M?(this.hbar=D.attr({rx:It.barRadius,ry:It.barRadius,x:P,y:R,width:S,height:E}),this._hbarXMin=P+S/2,this._hbarTranslateMax=y-S):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=f>x,O=It.barWidth+2*It.barPad,H=It.barLength+2*It.barPad,Y=l+s,G=u;Y+O>i&&(Y=i-O);var B=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-vertical",!0).call(gB.fill,It.barColor),z?(this.vbar=B.attr({rx:It.barRadius,ry:It.barRadius,x:Y,y:G,width:O,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=x-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,X=_-.5,Z=z?w+O+.5:w+.5,te=b-.5,fe=M?T+E+.5:T+.5,le=n._topdefs.selectAll("#"+V).data(M||z?[0]:[]);if(le.exit().remove(),le.enter().append("clipPath").attr("id",V).append("rect"),M||z?(this._clipRect=le.select("rect").attr({x:Math.floor(X),y:Math.floor(te),width:Math.ceil(Z)-Math.floor(X),height:Math.ceil(fe)-Math.floor(te)}),this.container.call(Lc.setClipUrl,V,this.gd),this.bg.attr({x:l,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Lc.setClipUrl,null),delete this._clipRect),M||z){var ie=fo.behavior.drag().on("dragstart",function(){fo.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ie);var K=fo.behavior.drag().on("dragstart",function(){fo.event.sourceEvent.preventDefault(),fo.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(K),z&&this.vbar.on(".drag",null).call(K)}this.setTranslate(t,a)};It.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Lc.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)};It.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=fo.event.dx),this.vbar&&(t-=fo.event.dy),this.setTranslate(r,t)};It.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=fo.event.deltaY),this.vbar&&(t+=fo.event.deltaY),this.setTranslate(r,t)};It.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=qm.constrain(fo.event.x,a,n),o=(i-a)/(n-a),l=this.position.w-this._box.w;r=o*l}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=qm.constrain(fo.event.y,s,u),c=(f-s)/(u-s),v=this.position.h-this._box.h;t=c*v}this.setTranslate(r,t)};It.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=qm.constrain(r||0,0,a),t=qm.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(Lc.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(Lc.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var o=t/n;this.vbar.call(Lc.setTranslate,r,t+o*this._vbarTranslateMax)}}});var CB=N((ORe,LB)=>{"use strict";var Cc=Sr(),c0=ea(),v0=Tr(),Ec=jr(),Qn=Ee(),Lm=Ea(),v2e=_t().arrayEditor,wB=Xa().LINE_SPACING,wr=km(),h2e=xB();LB.exports=function(r){var t=r._fullLayout,a=Qn.filterVisible(t[wr.name]);function n(v){c0.autoMargin(r,SB(v))}var i=t._menulayer.selectAll("g."+wr.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(wr.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){Cc.select(this).selectAll("g."+wr.headerGroupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+wr.headerGroupClassName).data(a,d2e);o.enter().append("g").classed(wr.headerGroupClassName,!0);for(var l=Qn.ensureSingle(i,"g",wr.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),s=0;s{"use strict";var _2e=km();EB.exports={moduleType:"component",name:_2e.name,layoutAttributes:N4(),supplyLayoutDefaults:mB(),draw:CB()}});var d0=N((HRe,PB)=>{"use strict";PB.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 B4=N((URe,NB)=>{"use strict";var RB=fa(),w2e=Mp(),T2e=bt().extendDeepAll,A2e=Xi().overrideAll,M2e=jv(),FB=_t().templatedArray,Pu=d0(),k2e=FB("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}});NB.exports=A2e(FB("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:k2e,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:T2e(w2e({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:M2e.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:RB({})},font:RB({}),activebgcolor:{valType:"color",dflt:Pu.gripBgActiveColor},bgcolor:{valType:"color",dflt:Pu.railBgColor},bordercolor:{valType:"color",dflt:Pu.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Pu.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Pu.tickLength},tickcolor:{valType:"color",dflt:Pu.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Pu.minorTickLength}}),"arraydraw","from-root")});var BB=N((GRe,OB)=>{"use strict";var Dc=Ee(),zB=eo(),IB=B4(),S2e=d0(),q2e=S2e.name,L2e=IB.steps;OB.exports=function(r,t){zB(r,t,{name:q2e,handleItemDefaults:C2e})};function C2e(e,r,t){function a(c,v){return Dc.coerce(e,r,IB,c,v)}for(var n=zB(e,r,{name:"steps",handleItemDefaults:E2e}),i=0,o=0;o{"use strict";var co=Sr(),Cm=ea(),vs=Tr(),vo=jr(),ei=Ee(),D2e=ei.strTranslate,p0=Ea(),P2e=_t().arrayEditor,Fr=d0(),G4=Xa(),GB=G4.LINE_SPACING,H4=G4.FROM_TL,U4=G4.FROM_BR;XB.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=R2e(a,r),i=a._infolayer.selectAll("g."+Fr.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Fr.containerClassName,!0).style("cursor",t?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Cm.autoMargin(r,YB(f))}if(i.exit().each(function(){co.select(this).selectAll("g."+Fr.groupClassName).each(o)}).remove(),n.length!==0){var l=i.selectAll("g."+Fr.groupClassName).data(n,F2e);l.enter().append("g").classed(Fr.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",D2e(o-Fr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function Y4(e,r){var t=e._dims;return t.inputAreaStart+Fr.stepInset+(t.inputAreaLength-2*Fr.stepInset)*Math.min(1,Math.max(0,r))}function UB(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Fr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Fr.stepInset-2*t.inputAreaStart)))}function U2e(e,r,t){var a=t._dims,n=ei.ensureSingle(e,"rect",Fr.railTouchRectClass,function(i){i.call(jB,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Fr.tickOffset+t.ticklen+a.labelHeight)}).call(vs.fill,t.bgcolor).attr("opacity",0),vo.setTranslate(n,0,a.currentValueTotalHeight)}function G2e(e,r){var t=r._dims,a=t.inputAreaLength-Fr.railInset*2,n=ei.ensureSingle(e,"rect",Fr.railRectClass);n.attr({width:a,height:Fr.railWidth,rx:Fr.railRadius,ry:Fr.railRadius,"shape-rendering":"crispEdges"}).call(vs.stroke,r.bordercolor).call(vs.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),vo.setTranslate(n,Fr.railInset,(t.inputAreaWidth-Fr.railWidth)*.5+t.currentValueTotalHeight)}});var KB=N((VRe,$B)=>{"use strict";var Y2e=d0();$B.exports={moduleType:"component",name:Y2e.name,layoutAttributes:B4(),supplyLayoutDefaults:BB(),draw:JB()}});var Dm=N((WRe,eH)=>{"use strict";var QB=li();eH.exports={bgcolor:{valType:"color",dflt:QB.background,editType:"plot"},bordercolor:{valType:"color",dflt:QB.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 V4=N((jRe,rH)=>{"use strict";rH.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 Pm=N((ZRe,tH)=>{"use strict";tH.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 iH=N(Fm=>{"use strict";var V2e=va(),W2e=Ea(),aH=Pm(),j2e=Xa().LINE_SPACING,Rm=aH.name;function nH(e){var r=e&&e[Rm];return r&&r.visible}Fm.isVisible=nH;Fm.makeData=function(e){for(var r=V2e.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var Nm=Ee(),oH=_t(),lH=va(),Z2e=Dm(),X2e=V4();sH.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;Nm.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,l=oH.newContainer(i,"rangeslider");function s(T,k){return Nm.coerce(o,l,Z2e,T,k)}var u,f;function c(T,k){return Nm.coerce(u,f,X2e,T,k)}var v=s("visible");if(v){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(o.range)),s("range");var d=t._subplots;if(d)for(var p=d.cartesian.filter(function(T){return T.substr(0,T.indexOf("y"))===lH.name2id(a)}).map(function(T){return T.substr(T.indexOf("y"),T.length)}),m=Nm.simpleMap(p,lH.id2name),y=0;y{"use strict";var J2e=va().list,$2e=fh().getAutoRange,K2e=Pm();fH.exports=function(r){for(var t=J2e(r,"x",!0),a=0;a{"use strict";var zm=Sr(),Q2e=gr(),e3e=ea(),Wt=Ee(),Im=Wt.strTranslate,hH=jr(),hs=Tr(),r3e=jf(),t3e=qi(),W4=va(),a3e=pi(),n3e=rs(),Gr=Pm();dH.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=B.max)Y=R[G+1];else if(H=B.pmax)Y=R[G+1];else if(H0?e.touches[0].clientX:0}function i3e(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Gr.slideBoxClassName).node(),i=e.select("rect."+Gr.grabAreaMinClassName).node(),o=e.select("rect."+Gr.grabAreaMaxClassName).node();function l(){var s=zm.event,u=s.target,f=vH(s),c=f-e.node().getBoundingClientRect().left,v=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),p=a3e.coverSlip();this.addEventListener("touchmove",m),this.addEventListener("touchend",y),p.addEventListener("mousemove",m),p.addEventListener("mouseup",y);function m(x){var _=vH(x),w=+_-f,b,T,k;switch(u){case n:if(k="ew-resize",v+w>t._length||d+w<0)return;b=v+w,T=d+w;break;case i:if(k="col-resize",v+w>t._length)return;b=v+w,T=d;break;case o:if(k="col-resize",d+w<0)return;b=v,T=d+w;break;default:k="ew-resize",b=c,T=c+w;break}if(T{"use strict";var p3e=Ee(),y3e=Dm(),m3e=V4(),j4=iH();yH.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:p3e.extendFlat({},y3e,{yaxis:m3e})}}},layoutAttributes:Dm(),handleDefaults:uH(),calcAutorange:cH(),draw:pH(),isVisible:j4.isVisible,makeData:j4.makeData,autoMarginOpts:j4.autoMarginOpts}});var Om=N((eFe,bH)=>{"use strict";var g3e=fa(),gH=li(),b3e=_t().templatedArray,x3e=b3e("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"});bH.exports={visible:{valType:"boolean",editType:"plot"},buttons:x3e,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:g3e({editType:"plot"}),bgcolor:{valType:"color",dflt:gH.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:gH.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var Z4=N((rFe,xH)=>{"use strict";xH.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var TH=N((tFe,wH)=>{"use strict";var Bm=Ee(),_3e=Tr(),w3e=_t(),T3e=eo(),_H=Om(),X4=Z4();wH.exports=function(r,t,a,n,i){var o=r.rangeselector||{},l=w3e.newContainer(t,"rangeselector");function s(d,p){return Bm.coerce(o,l,_H,d,p)}var u=T3e(o,l,{name:"buttons",handleItemDefaults:A3e,calendar:i}),f=s("visible",u.length>0);if(f){var c=M3e(t,a,n);s("x",c[0]),s("y",c[1]),Bm.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Bm.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",_3e.contrast(v,X4.lightAmount,X4.darkAmount)),s("bordercolor"),s("borderwidth")}};function A3e(e,r,t,a){var n=a.calendar;function i(s,u){return Bm.coerce(e,r,_H.buttons,s,u)}var o=i("visible");if(o){var l=i("step");l!=="all"&&(n&&n!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function M3e(e,r,t){for(var a=t.filter(function(l){return r[l].anchor===e._id}),n=0,i=0;i{"use strict";var k3e=X3(),S3e=Ee().titleCase;AH.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=q3e(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function q3e(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=k3e["utc"+S3e(n)],o=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+i.offset(a,-o));break;case"todate":var s=i.offset(a,-o);l=e.l2r(+i.ceil(s));break}var u=t[1];return[l,u]}});var PH=N((nFe,DH)=>{"use strict";var Um=Sr(),L3e=gr(),C3e=ea(),kH=Tr(),EH=jr(),gl=Ee(),SH=gl.strTranslate,Hm=Ea(),E3e=va(),K4=Xa(),qH=K4.LINE_SPACING,LH=K4.FROM_TL,CH=K4.FROM_BR,$4=Z4(),D3e=MH();DH.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(P3e(r),R3e);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=Um.select(this),o=n,l=o.rangeselector,s=i.selectAll("g.button").data(gl.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Um.select(this),c=D3e(o,u);u._isActive=F3e(o,u,c),f.call(J4,l,u),f.call(z3e,l,u,r),f.on("click",function(){r._dragged||L3e.call("_guiRelayout",r,c)}),f.on("mouseover",function(){u._isHovered=!0,f.call(J4,l,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(J4,l,u)})}),O3e(r,s,l,o._name,i)})};function P3e(e){for(var r=E3e.list(e,"x",!0),t=[],a=0;a{"use strict";RH.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Om()}}},layoutAttributes:Om(),handleDefaults:TH(),draw:PH()}});var Pc=N(Q4=>{"use strict";var NH=bt().extendFlat;Q4.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",o={x:NH({},t,{}),y:NH({},t,{}),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};Q4.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],o=r.grid;if(o){var l=t("domain.column");l!==void 0&&(l{"use strict";var B3e=Ee(),H3e=Af().counter,U3e=Pc().attributes,zH=Ca().idRegex,G3e=_t(),ew={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:[H3e("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[zH.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[zH.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:U3e({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 Gm(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function Y3e(e,r){var t=e.grid||{},a=Gm(r,t,"x"),n=Gm(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),o=Array.isArray(a),l=Array.isArray(n),s=o&&a!==t.xaxes&&l&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(l&&(u=n.length),o&&(f=a.length));var c=G3e.newContainer(r,"grid");function v(k,M){return B3e.coerce(t,c,ew,k,M)}var d=v("rows",u),p=v("columns",f);if(!(d*p>1)){delete r.grid;return}if(!i&&!o&&!l){var m=v("pattern")==="independent";m&&(i=!0)}c._hasSubplotGrid=i;var y=v("roworder"),x=y==="top to bottom",_=i?.2:.1,w=i?.3:.1,b,T;s&&r._splomGridDflt&&(b=r._splomGridDflt.xside,T=r._splomGridDflt.yside),c._domains={x:IH("x",v,_,b,p),y:IH("y",v,w,T,d,x)}}function IH(e,r,t,a,n,i){var o=r(e+"gap",t),l=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=l[0],f=(l[1]-u)/(n-o),c=f*(1-o),v=0;v{"use strict";UH.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 VH=N((uFe,YH)=>{"use strict";var GH=Pr(),W3e=gr(),j3e=Ee(),Z3e=_t(),X3e=rw();YH.exports=function(e,r,t,a){var n="error_"+a.axis,i=Z3e.newContainer(r,n),o=e[n]||{};function l(p,m){return j3e.coerce(o,i,X3e,p,m)}var s=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=l("visible",s);if(u!==!1){var f=l("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(l("array"),l("traceref"),c||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),c||l("valueminus"));var v="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&l(v,!(o.color||GH(o.thickness)||GH(o.width)))}(!a.inherit||!i[v])&&(l("color",t),l("thickness"),l("width",W3e.traceIs(r,"gl3d")?0:4))}}});var tw=N((fFe,jH)=>{"use strict";jH.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var c=+n[f];return[c,c]};var i=r.arrayminus||[];return function(u,f){var c=+n[f],v=+i[f];return!isNaN(c)||!isNaN(v)?[v||0,c||0]:[NaN,NaN]}}else{var o=WH(t,r.value),l=WH(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=o(u);return[f,f]}:function(u){return[l(u),o(u)]}}};function WH(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var JH=N((cFe,XH)=>{"use strict";var aw=Pr(),J3e=gr(),nw=Or(),$3e=Ee(),K3e=tw();XH.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var $H=Sr(),ds=Pr(),Q3e=jr(),ebe=Pn();KH.exports=function(r,t,a,n){var i,o=a.xaxis,l=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var c=f[0].trace,v=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(_){return _.id});var m=ebe.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!v.visible&&(f=[]);var y=$H.select(this).selectAll("g.errorbar").data(f,p);if(y.exit().remove(),!!f.length){v.visible||y.selectAll("path.xerror").remove(),d.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var x=y.enter().append("g").classed("errorbar",!0);s&&x.style("opacity",0).transition().duration(n.duration).style("opacity",1),Q3e.setClipUrl(y,a.layerClipId,r),y.each(function(_){var w=$H.select(this),b=rbe(_,o,l);if(!(m&&!_.vis)){var T,k=w.select("path.yerror");if(d.visible&&ds(b.x)&&ds(b.yh)&&ds(b.ys)){var M=d.width;T="M"+(b.x-M)+","+b.yh+"h"+2*M+"m-"+M+",0V"+b.ys,b.noYS||(T+="m-"+M+",0h"+2*M),i=!k.size(),i?k=w.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",T)}else k.remove();var S=w.select("path.xerror");if(v.visible&&ds(b.y)&&ds(b.xh)&&ds(b.xs)){var E=(v.copy_ystyle?d:v).width;T="M"+b.xh+","+(b.y-E)+"v"+2*E+"m0,-"+E+"H"+b.xs,b.noXS||(T+="m0,-"+E+"v"+2*E),i=!S.size(),i?S=w.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(S=S.transition().duration(n.duration).ease(n.easing)),S.attr("d",T)}else S.remove()}})}})};function rbe(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),ds(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),ds(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var tU=N((hFe,rU)=>{"use strict";var tbe=Sr(),eU=Tr();rU.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},o=tbe.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(eU.stroke,n.color),i.copy_ystyle&&(i=n),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(eU.stroke,i.color)})}});var iU=N((dFe,nU)=>{"use strict";var y0=Ee(),aU=Xi().overrideAll,m0=rw(),Ru={error_x:y0.extendFlat({},m0),error_y:y0.extendFlat({},m0)};delete Ru.error_x.copy_zstyle;delete Ru.error_y.copy_zstyle;delete Ru.error_y.copy_ystyle;var g0={error_x:y0.extendFlat({},m0),error_y:y0.extendFlat({},m0),error_z:y0.extendFlat({},m0)};delete g0.error_x.copy_ystyle;delete g0.error_y.copy_ystyle;delete g0.error_z.copy_ystyle;delete g0.error_z.copy_zstyle;nU.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ru,bar:Ru,histogram:Ru,scatter3d:aU(g0,"calc","nested"),scattergl:aU(Ru,"calc","nested")}},supplyDefaults:VH(),calc:JH(),makeComputeError:tw(),plot:QH(),style:tU(),hoverInfo:abe};function abe(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var lU=N((pFe,oU)=>{"use strict";oU.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 dU=N((yFe,hU)=>{"use strict";var ps=Sr(),iw=Sn(),Vm=ea(),sU=gr(),bl=Or(),Ym=pi(),Li=Ee(),po=Li.strTranslate,vU=bt().extendFlat,ow=rs(),ho=jr(),lw=Tr(),nbe=jf(),ibe=Ea(),obe=vi().flipScale,lbe=y4(),sbe=m4(),ube=hi(),sw=Xa(),uU=sw.LINE_SPACING,fU=sw.FROM_TL,cU=sw.FROM_BR,zt=lU().cn;function fbe(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+zt.colorbar).data(cbe(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(zt.colorbar,!0),t.each(function(a){var n=ps.select(this);Li.ensureSingle(n,"rect",zt.cbbg),Li.ensureSingle(n,"g",zt.cbfills),Li.ensureSingle(n,"g",zt.cblines),Li.ensureSingle(n,"g",zt.cbaxis,function(o){o.classed(zt.crisp,!0)}),Li.ensureSingle(n,"g",zt.cbtitleunshift,function(o){o.append("g").classed(zt.cbtitle,!0)}),Li.ensureSingle(n,"rect",zt.cboutline);var i=vbe(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&hbe(n,a,e)}),t.exit().each(function(a){Vm.autoMargin(e,a._id)}).remove(),t.order()}function cbe(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,o,l;function s(w){return vU(w,{_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 l.calc=="function"?l.calc(e,o,n):(n._fillgradient=i.reversescale?obe(i.colorscale):i.colorscale,n._zrange=[i[l.min],i[l.max]])}for(var f=0;f1){var Q=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));ue*=Q*Li.roundUp(W/Q,[2,5,10]),(Math.abs(D.start)/D.size+1e-6)%1<2e-6&&(oe.tick0=0)}oe.dtick=ue}oe.domain=a?[K+p/b.h,K+V-p/b.h]:[K+d/b.w,K+V-d/b.w],oe.setScale(),e.attr("transform",po(Math.round(b.l),Math.round(b.t)));var j=e.select("."+zt.cbtitleunshift).attr("transform",po(-Math.round(b.l),-Math.round(b.t))),pe=oe.ticklabelposition,me=oe.title.font.size,we=e.select("."+zt.cbaxis),Ne,Fe=0,Re=0;function Ie(Ue,se){var Te={propContainer:oe,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:w._dfltTitle.colorbar,containerGroup:e.select("."+zt.cbtitle)},Se=Ue.charAt(0)==="h"?Ue.substr(1):"h"+Ue;e.selectAll("."+Se+",."+Se+"-math-group").remove(),nbe.draw(t,Ue,vU(Te,se||{}))}function Be(){if(a&&ye||!a&&!ye){var Ue,se;S==="top"&&(Ue=d+b.l+X*m,se=p+b.t+Z*(1-K-V)+3+me*.75),S==="bottom"&&(Ue=d+b.l+X*m,se=p+b.t+Z*(1-K)-3-me*.25),S==="right"&&(se=p+b.t+Z*y+3+me*.75,Ue=d+b.l+X*K),Ie(oe._id+"title",{attributes:{x:Ue,y:se,"text-anchor":a?"start":"middle"}})}}function ze(){if(a&&!ye||!a&&ye){var Ue=oe.position||0,se=oe._offset+oe._length/2,Te,Se;if(S==="right")Se=se,Te=b.l+X*Ue+10+me*(oe.showticklabels?1:.5);else if(Te=se,S==="bottom"&&(Se=b.t+Z*Ue+10+(pe.indexOf("inside")===-1?oe.tickfont.size:0)+(oe.ticks!=="intside"&&r.ticklen||0)),S==="top"){var ir=M.text.split("
").length;Se=b.t+Z*Ue+10-Y-uU*me*ir}Ie((a?"h":"v")+oe._id+"title",{avoid:{selection:ps.select(t).selectAll("g."+oe._id+"tick"),side:S,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?w.width:w.height},attributes:{x:Te,y:Se,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Pe(){if(!a&&!ye||a&&ye){var Ue=e.select("."+zt.cbtitle),se=Ue.select("text"),Te=[-s/2,s/2],Se=Ue.select(".h"+oe._id+"title-math-group").node(),ir=15.6;se.node()&&(ir=parseInt(se.node().style.fontSize,10)*uU);var Qe;if(Se?(Qe=ho.bBox(Se),Re=Qe.width,Fe=Qe.height,Fe>ir&&(Te[1]-=(Fe-ir)/2)):se.node()&&!se.classed(zt.jsPlaceholder)&&(Qe=ho.bBox(se.node()),Re=Qe.width,Fe=Qe.height),a){if(Fe){if(Fe+=5,S==="top")oe.domain[1]-=Fe/b.h,Te[1]*=-1;else{oe.domain[0]+=Fe/b.h;var Le=ibe.lineCount(se);Te[1]+=(1-Le)*ir}Ue.attr("transform",po(Te[0],Te[1])),oe.setScale()}}else Re&&(S==="right"&&(oe.domain[0]+=(Re+me/2)/b.w),Ue.attr("transform",po(Te[0],Te[1])),oe.setScale())}e.selectAll("."+zt.cbfills+",."+zt.cblines).attr("transform",a?po(0,Math.round(b.h*(1-oe.domain[1]))):po(Math.round(b.w*oe.domain[0]),0)),we.attr("transform",a?po(0,Math.round(-b.t)):po(Math.round(-b.l),0));var Ce=e.select("."+zt.cbfills).selectAll("rect."+zt.cbfill).attr("style","").data(O);Ce.enter().append("rect").classed(zt.cbfill,!0).attr("style",""),Ce.exit().remove();var Ge=E.map(oe.c2p).map(Math.round).sort(function(cr,lr){return cr-lr});Ce.each(function(cr,lr){var Oe=[lr===0?E[0]:(O[lr]+O[lr-1])/2,lr===O.length-1?E[1]:(O[lr]+O[lr+1])/2].map(oe.c2p).map(Math.round);a&&(Oe[1]=Li.constrain(Oe[1]+(Oe[1]>Oe[0])?1:-1,Ge[0],Ge[1]));var ne=ps.select(this).attr(a?"x":"y",te).attr(a?"y":"x",ps.min(Oe)).attr(a?"width":"height",Math.max(Y,2)).attr(a?"height":"width",Math.max(ps.max(Oe)-ps.min(Oe),2));if(r._fillgradient)ho.gradient(ne,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var ve=R(cr).replace("e-","");ne.attr("fill",iw(ve).toHexString())}});var Ze=e.select("."+zt.cblines).selectAll("path."+zt.cbline).data(k.color&&k.width?H:[]);Ze.enter().append("path").classed(zt.cbline,!0),Ze.exit().remove(),Ze.each(function(cr){var lr=te,Oe=Math.round(oe.c2p(cr))+k.width/2%1;ps.select(this).attr("d","M"+(a?lr+","+Oe:Oe+","+lr)+(a?"h":"v")+Y).call(ho.lineGroupStyle,k.width,P(cr),k.dash)}),we.selectAll("g."+oe._id+"tick,path").remove();var Ye=te+Y+(s||0)/2-(r.ticks==="outside"?1:0),He=bl.calcTicks(oe),$e=bl.getTickSigns(oe)[2];return bl.drawTicks(t,oe,{vals:oe.ticks==="inside"?bl.clipEnds(oe,He):He,layer:we,path:bl.makeTickPath(oe,Ye,$e),transFn:bl.makeTransTickFn(oe)}),bl.drawLabels(t,oe,{vals:He,layer:we,transFn:bl.makeTransTickLabelFn(oe),labelFns:bl.makeLabelFns(oe,Ye)})}function Xe(){var Ue,se=Y+s/2;pe.indexOf("inside")===-1&&(Ue=ho.bBox(we.node()),se+=a?Ue.width:Ue.height),Ne=j.select("text");var Te=0,Se=a&&S==="top",ir=!a&&S==="right",Qe=0;if(Ne.node()&&!Ne.classed(zt.jsPlaceholder)){var Le,Ce=j.select(".h"+oe._id+"title-math-group").node();Ce&&(a&&ye||!a&&!ye)?(Ue=ho.bBox(Ce),Te=Ue.width,Le=Ue.height):(Ue=ho.bBox(j.node()),Te=Ue.right-b.l-(a?te:he),Le=Ue.bottom-b.t-(a?he:te),!a&&S==="top"&&(se+=Ue.height,Qe=Ue.height)),ir&&(Ne.attr("transform",po(Te/2+me/2,0)),Te*=2),se=Math.max(se,a?Te:Le)}var Ge=(a?d:p)*2+se+u+s/2,Ze=0;!a&&M.text&&v==="bottom"&&y<=0&&(Ze=Ge/2,Ge+=Ze,Qe+=Ze),w._hColorbarMoveTitle=Ze,w._hColorbarMoveCBTitle=Qe;var Ye=u+s,He=(a?te:he)-Ye/2-(a?d:0),$e=(a?he:te)-(a?B:p+Qe-Ze);e.select("."+zt.cbbg).attr("x",He).attr("y",$e).attr(a?"width":"height",Math.max(Ge-Ze,2)).attr(a?"height":"width",Math.max(B+Ye,2)).call(lw.fill,f).call(lw.stroke,r.bordercolor).style("stroke-width",u);var cr=ir?Math.max(Te-10,0):0;e.selectAll("."+zt.cboutline).attr("x",(a?te:he+d)+cr).attr("y",(a?he+p-B:te)+(Se?Fe:0)).attr(a?"width":"height",Math.max(Y,2)).attr(a?"height":"width",Math.max(B-(a?2*p+Fe:2*d+cr),2)).call(lw.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var lr=a?fe*Ge:0,Oe=a?0:(1-le)*Ge-Qe;if(lr=_?b.l-lr:-lr,Oe=x?b.t-Oe:-Oe,e.attr("transform",po(lr,Oe)),!a&&(u||iw(f).getAlpha()&&!iw.equals(w.paper_bgcolor,f))){var ne=we.selectAll("text"),ve=ne[0].length,De=e.select("."+zt.cbbg).node(),qe=ho.bBox(De),ar=ho.getTranslate(e),hr=2;ne.each(function(ja,ga){var jt=0,Na=ve-1;if(ga===jt||ga===Na){var br=ho.bBox(this),pt=ho.getTranslate(this),Nr;if(ga===Na){var st=br.right+pt.x,Pt=qe.right+ar.x+he-u-hr+m;Nr=Pt-st,Nr>0&&(Nr=0)}else if(ga===jt){var Qr=br.left+pt.x,ct=qe.left+ar.x+he+u+hr;Nr=ct-Qr,Nr<0&&(Nr=0)}Nr&&(ve<3?this.setAttribute("transform","translate("+Nr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ur={},Ar=fU[c],Wr=cU[c],Vr=fU[v],zr=cU[v],Et=Ge-Y;a?(i==="pixels"?(ur.y=y,ur.t=B*Vr,ur.b=B*zr):(ur.t=ur.b=0,ur.yt=y+n*Vr,ur.yb=y-n*zr),l==="pixels"?(ur.x=m,ur.l=Ge*Ar,ur.r=Ge*Wr):(ur.l=Et*Ar,ur.r=Et*Wr,ur.xl=m-o*Ar,ur.xr=m+o*Wr)):(i==="pixels"?(ur.x=m,ur.l=B*Ar,ur.r=B*Wr):(ur.l=ur.r=0,ur.xl=m+n*Ar,ur.xr=m-n*Wr),l==="pixels"?(ur.y=1-y,ur.t=Ge*Vr,ur.b=Ge*zr):(ur.t=Et*Vr,ur.b=Et*zr,ur.yt=y-o*Vr,ur.yb=y+o*zr));var Dt=r.y<.5?"b":"t",ma=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var St={r:w.width-He-lr,l:He+ur.r,b:w.height-$e-Oe,t:$e+ur.b};_&&x?Vm.autoMargin(t,r._id,ur):_?t._fullLayout._reservedMargin[r._id][Dt]=St[Dt]:x||a?t._fullLayout._reservedMargin[r._id][ma]=St[ma]:t._fullLayout._reservedMargin[r._id][Dt]=St[Dt]}return Li.syncOrAsync([Vm.previousPromises,Be,Pe,ze,Vm.previousPromises,Xe],t)}function hbe(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,o,l,s;Ym.init({element:e.node(),gd:t,prepFn:function(){o=e.attr("transform"),ow(e)},moveFn:function(u,f){e.attr("transform",o+po(u,f)),l=Ym.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Ym.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var c=Ym.getCursor(l,s,r.xanchor,r.yanchor);ow(e,c)},doneFn:function(){if(ow(e),l!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=l,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?sU.call("_guiRestyle",t,u,r._traceIndex):sU.call("_guiRelayout",t,u)}}})}function dbe(e,r,t){var a=r._levels,n=[],i=[],o,l,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],c=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(o=a.start+l*u,!(u>0?o>=s:o<=s));l++)o>f&&o0?o>=s:o<=s));l++)o>t[0]&&o{"use strict";pU.exports={moduleType:"component",name:"colorbar",attributes:Qp(),supplyDefaults:ux(),draw:dU().draw,hasColorbar:tx()}});var gU=N((gFe,mU)=>{"use strict";mU.exports={moduleType:"component",name:"legend",layoutAttributes:n5(),supplyLayoutDefaults:l5(),draw:b5(),style:p5()}});var xU=N((bFe,bU)=>{"use strict";bU.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 wU=N((xFe,_U)=>{"use strict";_U.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var fw=N((_Fe,kU)=>{"use strict";var ybe=gr(),MU=Ee(),uw=MU.extendFlat,TU=MU.extendDeep;function AU(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function mbe(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}kU.exports=function(r,t){var a,n=r.data,i=r.layout,o=TU([],n),l=TU({},i,AU(t.tileClass)),s=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var u=Object.keys(l);for(a=0;a{"use strict";var gbe=Qs().EventEmitter,bbe=gr(),xbe=Ee(),SU=yl(),_be=fw(),wbe=$y(),Tbe=Ky();function Abe(e,r){var t=new gbe,a=_be(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var l=SU.getDelay(n._fullLayout);setTimeout(function(){var s=wbe(n),u=document.createElement("canvas");u.id=xbe.randstr(),t=Tbe({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},l)}var o=SU.getRedrawFunc(n);return bbe.call("_doPlot",n,a.data,a.layout,a.config).then(o).then(i).catch(function(l){t.emit("error",l)}),t}qU.exports=Abe});var DU=N((TFe,EU)=>{"use strict";var CU=yl(),Mbe={getDelay:CU.getDelay,getRedrawFunc:CU.getRedrawFunc,clone:fw(),toSVG:$y(),svgToImg:Ky(),toImage:LU(),downloadImage:N_()};EU.exports=Mbe});var RU=N(xl=>{"use strict";xl.version=ep().version;NA();kS();var kbe=gr(),b0=xl.register=kbe.register,vw=XN(),PU=Object.keys(vw);for(Wm=0;Wm{"use strict";FU.exports=RU()});var Zm=N((kFe,zU)=>{"use strict";zU.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Nu=N((SFe,HU)=>{"use strict";var Ht=wi(),IU=Qi().axisHoverFormat,Sbe=La().hovertemplateAttrs,qbe=La().texttemplateAttrs,BU=ko(),Lbe=fa(),OU=Zm(),Cbe=si().pattern,Fu=bt().extendFlat,hw=Lbe({editType:"calc",arrayOk:!0,colorEditType:"style"}),Ebe=Ht.marker,Dbe=Ebe.line,Pbe=Fu({},Dbe.width,{dflt:0}),Rbe=Fu({width:Pbe,editType:"calc"},BU("marker.line")),Fbe=Fu({line:Rbe,editType:"calc"},BU("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Cbe,cornerradius:{valType:"any",editType:"calc"}});HU.exports={x:Ht.x,x0:Ht.x0,dx:Ht.dx,y:Ht.y,y0:Ht.y0,dy:Ht.dy,xperiod:Ht.xperiod,yperiod:Ht.yperiod,xperiod0:Ht.xperiod0,yperiod0:Ht.yperiod0,xperiodalignment:Ht.xperiodalignment,yperiodalignment:Ht.yperiodalignment,xhoverformat:IU("x"),yhoverformat:IU("y"),text:Ht.text,texttemplate:qbe({editType:"plot"},{keys:OU.eventDataKeys}),hovertext:Ht.hovertext,hovertemplate:Sbe({},{keys:OU.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Fu({},hw,{}),insidetextfont:Fu({},hw,{}),outsidetextfont:Fu({},hw,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Fu({},Ht.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:Fbe,offsetgroup:Ht.offsetgroup,alignmentgroup:Ht.alignmentgroup,selected:{marker:{opacity:Ht.selected.marker.opacity,color:Ht.selected.marker.color,editType:"style"},textfont:Ht.selected.textfont,editType:"style"},unselected:{marker:{opacity:Ht.unselected.marker.opacity,color:Ht.unselected.marker.color,editType:"style"},textfont:Ht.unselected.textfont,editType:"style"},zorder:Ht.zorder}});var Xm=N((qFe,UU)=>{"use strict";UU.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 dw=N((LFe,VU)=>{"use strict";var Nbe=Tr(),GU=vi().hasColorscale,YU=ul(),zbe=Ee().coercePattern;VU.exports=function(r,t,a,n,i){var o=a("marker.color",n),l=GU(r,"marker");l&&YU(r,t,i,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Nbe.defaultLine),GU(r,"marker.line")&&YU(r,t,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),zbe(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")}});var zu=N((CFe,$U)=>{"use strict";var WU=Pr(),Fc=Ee(),jU=Tr(),Ibe=gr(),Obe=O_(),Bbe=dc(),Hbe=dw(),Ube=e0(),ZU=Nu(),Jm=Fc.coerceFont;function Gbe(e,r,t,a){function n(u,f){return Fc.coerce(e,r,ZU,u,f)}var i=Obe(e,r,a,n);if(!i){r.visible=!1;return}Bbe(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var o=n("textposition");JU(e,r,a,n,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Hbe(e,r,n,t,a);var l=(r.marker.line||{}).color,s=Ibe.getComponentMethod("errorbars","supplyDefaults");s(e,r,l||jU.defaultLine,{axis:"y"}),s(e,r,l||jU.defaultLine,{axis:"x",inherit:"y"}),Fc.coerceSelectionMarkerOpacity(r,n)}function Ybe(e,r){var t,a;function n(l,s){return Fc.coerce(a._input,a,ZU,l,s)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&WU(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function JU(e,r,t,a,n,i){i=i||{};var o=i.moduleHasSelected!==!1,l=i.moduleHasUnselected!==!1,s=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,f=i.moduleHasTextangle!==!1,c=i.moduleHasInsideanchor!==!1,v=!!i.hasPathbar,d=Array.isArray(n)||n==="auto",p=d||n==="inside",m=d||n==="outside";if(p||m){var y=Jm(a,"textfont",t.font),x=Fc.extendFlat({},y),_=e.textfont&&e.textfont.color,w=!_;if(w&&delete x.color,Jm(a,"insidetextfont",x),v){var b=Fc.extendFlat({},y);w&&delete b.color,Jm(a,"pathbar.textfont",b)}m&&Jm(a,"outsidetextfont",y),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}p&&c&&a("insidetextanchor")}$U.exports={supplyDefaults:Gbe,crossTraceDefaults:Ybe,handleText:JU,validateCornerradius:XU}});var pw=N((EFe,KU)=>{"use strict";var Vbe=gr(),Wbe=Or(),jbe=Ee(),Zbe=Xm(),Xbe=zu().validateCornerradius;KU.exports=function(e,r,t){function a(m,y){return jbe.coerce(e,r,Zbe,m,y)}for(var n=!1,i=!1,o=!1,l={},s=a("barmode"),u=s==="group",f=0;f0&&!l[v]&&(o=!0),l[v]=!0),c.visible&&c.type==="histogram"){var d=Wbe.getFromId({_fullLayout:r},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",i&&!o?0:.2),a("bargroupgap");var p=a("barcornerradius");r.barcornerradius=Xbe(p)}});var $m=N((DFe,QU)=>{"use strict";var Nc=Ee();QU.exports=function(r,t){for(var a=0;a{"use strict";var eG=Or(),rG=yc(),tG=vi().hasColorscale,aG=oh(),Jbe=$m(),$be=om();nG.exports=function(r,t){var a=eG.getFromId(r,t.xaxis||"x"),n=eG.getFromId(r,t.yaxis||"y"),i,o,l,s,u,f,c={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(i=a.makeCalcdata(t,"x",c),l=n.makeCalcdata(t,"y"),s=rG(t,n,"y",l),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y",c),l=a.makeCalcdata(t,"x"),s=rG(t,a,"x",l),u=!!t.xperiodalignment,f="x"),o=s.vals;for(var v=Math.min(o.length,i.length),d=new Array(v),p=0;p{"use strict";var Kbe=Sr(),Qbe=Ee();function exe(e,r,t){var a=e._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var i=a.uniformtext.mode==="hide",o;switch(t){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"}r.selectAll(o).each(function(l){var s=l.transform;if(s){s.scale=i&&s.hide?0:n/s.fontSize;var u=Kbe.select(this).select("text");Qbe.setTransormAndDisplay(u,s)}})}}function rxe(e,r,t){if(t.uniformtext.mode){var a=oG(e),n=t.uniformtext.minsize,i=r.scale*r.fontSize;r.hide=i{"use strict";var axe=Pr(),nxe=Sn(),sG=Ee().isArrayOrTypedArray;Iu.coerceString=function(e,r,t){if(typeof r=="string"){if(r||!e.noBlank)return r}else if((typeof r=="number"||r===!0)&&!e.strict)return String(r);return t!==void 0?t:e.dflt};Iu.coerceNumber=function(e,r,t){if(axe(r)){r=+r;var a=e.min,n=e.max,i=a!==void 0&&rn;if(!i)return r}return t!==void 0?t:e.dflt};Iu.coerceColor=function(e,r,t){return nxe(r).isValid()?r:t!==void 0?t:e.dflt};Iu.coerceEnumerated=function(e,r,t){return e.coerceNumber&&(r=+r),e.values.indexOf(r)!==-1?r:t!==void 0?t:e.dflt};Iu.getValue=function(e,r){var t;return sG(e)?r{"use strict";var _0=Sr(),ixe=Tr(),w0=jr(),uG=Ee(),fG=gr(),cG=x0().resizeText,yw=Nu(),oxe=yw.textfont,lxe=yw.insidetextfont,sxe=yw.outsidetextfont,Ga=Km();function uxe(e){var r=_0.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");cG(e,r,"bar");var t=r.size(),a=e._fullLayout;r.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(a.barmode==="stack"&&t>1||a.bargap===0&&a.bargroupgap===0&&!n[0].trace.marker.line.width)&&_0.select(this).attr("shape-rendering","crispEdges")}),r.selectAll("g.points").each(function(n){var i=_0.select(this),o=n[0].trace;vG(i,o,e)}),fG.getComponentMethod("errorbars","style")(r)}function vG(e,r,t){w0.pointStyle(e.selectAll("path"),r,t),hG(e,r,t)}function hG(e,r,t){e.selectAll("text").each(function(a){var n=_0.select(this),i=uG.ensureUniformFontSize(t,dG(n,a,r,t));w0.font(n,i)})}function fxe(e,r,t){var a=r[0].trace;a.selectedpoints?cxe(t,a,e):(vG(t,a,e),fG.getComponentMethod("errorbars","style")(t))}function cxe(e,r,t){w0.selectedPointStyle(e.selectAll("path"),r),vxe(e.selectAll("text"),r,t)}function vxe(e,r,t){e.each(function(a){var n=_0.select(this),i;if(a.selected){i=uG.ensureUniformFontSize(t,dG(n,a,r,t));var o=r.selected.textfont&&r.selected.textfont.color;o&&(i.color=o),w0.font(n,i)}else w0.selectedTextStyle(n,r)})}function dG(e,r,t,a){var n=a._fullLayout.font,i=t.textfont;if(e.classed("bartext-inside")){var o=gG(r,t);i=yG(t,r.i,n,o)}else e.classed("bartext-outside")&&(i=mG(t,r.i,n));return i}function pG(e,r,t){return mw(oxe,e.textfont,r,t)}function yG(e,r,t,a){var n=pG(e,r,t),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[r]===void 0;return i&&(n={color:ixe.contrast(a),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),mw(lxe,e.insidetextfont,r,n)}function mG(e,r,t){var a=pG(e,r,t);return mw(sxe,e.outsidetextfont,r,a)}function mw(e,r,t,a){r=r||{};var n=Ga.getValue(r.family,t),i=Ga.getValue(r.size,t),o=Ga.getValue(r.color,t),l=Ga.getValue(r.weight,t),s=Ga.getValue(r.style,t),u=Ga.getValue(r.variant,t),f=Ga.getValue(r.textcase,t),c=Ga.getValue(r.lineposition,t),v=Ga.getValue(r.shadow,t);return{family:Ga.coerceString(e.family,n,a.family),size:Ga.coerceNumber(e.size,i,a.size),color:Ga.coerceColor(e.color,o,a.color),weight:Ga.coerceString(e.weight,l,a.weight),style:Ga.coerceString(e.style,s,a.style),variant:Ga.coerceString(e.variant,u,a.variant),textcase:Ga.coerceString(e.variant,f,a.textcase),lineposition:Ga.coerceString(e.variant,c,a.lineposition),shadow:Ga.coerceString(e.variant,v,a.shadow)}}function gG(e,r){return r.type==="waterfall"?r[e.dir].marker.color:e.mcc||e.mc||r.marker.color}bG.exports={style:uxe,styleTextPoints:hG,styleOnSelect:fxe,getInsideTextFont:yG,getOutsideTextFont:mG,getBarColor:gG,resizeText:cG}});var xw=N((zFe,SG)=>{"use strict";var Qm=Sr(),eg=Pr(),Pa=Ee(),hxe=Ea(),dxe=Tr(),ys=jr(),pxe=gr(),rg=Or().tickText,xG=x0(),yxe=xG.recordMinTextSize,mxe=xG.clearMinTextSize,gw=zc(),Ic=Km(),gxe=Zm(),_G=Nu(),bxe=_G.text,xxe=_G.textposition,_xe=qo().appendArrayPointValue,cn=gxe.TEXTPAD;function wxe(e){return e.id}function Txe(e){if(e.ids)return wxe}function bw(e){return(e>0)-(e<0)}function Ho(e,r){return e0}function Mxe(e,r,t,a,n,i){var o=r.xaxis,l=r.yaxis,s=e._fullLayout,u=e._context.staticPlot;n||(n={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},mxe("bar",s));var f=Pa.makeTraceGroups(a,t,"trace bars").each(function(c){var v=Qm.select(this),d=c[0].trace,p=c[0].t,m=d.type==="waterfall",y=d.type==="funnel",x=d.type==="histogram",_=d.type==="bar",w=_||y,b=0;m&&d.connector.visible&&d.connector.mode==="between"&&(b=d.connector.line.width/2);var T=d.orientation==="h",k=TG(n),M=Pa.ensureSingle(v,"g","points"),S=Txe(d),E=M.selectAll("g.point").data(Pa.identity,S);E.enter().append("g").classed("point",!0),E.exit().remove(),E.each(function(R,D){var z=Qm.select(this),O=Axe(R,o,l,T),H=O[0][0],Y=O[0][1],G=O[1][0],B=O[1][1],V=(T?Y-H:B-G)===0;V&&w&&Ic.getLineWidth(d,R)&&(V=!1),V||(V=!eg(H)||!eg(Y)||!eg(G)||!eg(B)),R.isBlank=V,V&&(T?Y=H:B=G),b&&!V&&(T?(H-=Ho(H,Y)*b,Y+=Ho(H,Y)*b):(G-=Ho(G,B)*b,B+=Ho(G,B)*b));var X,Z;if(d.type==="waterfall"){if(!V){var te=d[R.dir].marker;X=te.line.width,Z=te.color}}else X=Ic.getLineWidth(d,R),Z=R.mc||d.marker.color;function fe(se){var Te=Qm.round(X/2%1,2);return n.gap===0&&n.groupgap===0?Qm.round(Math.round(se)-Te,2):se}function le(se,Te,Se){return Se&&se===Te?se:Math.abs(se-Te)>=2?fe(se):se>Te?Math.ceil(se):Math.floor(se)}var ie=dxe.opacity(Z),K=ie<1||X>.01?fe:le;e._context.staticPlot||(H=K(H,Y,T),Y=K(Y,H,T),G=K(G,B,!T),B=K(B,G,!T));var he=T?o.c2p:l.c2p,oe;R.s0>0?oe=R._sMax:R.s0<0?oe=R._sMin:oe=R.s1>0?R._sMax:R._sMin;function ye(se,Te){if(!se)return 0;var Se=Math.abs(T?B-G:Y-H),ir=Math.abs(T?Y-H:B-G),Qe=K(Math.abs(he(oe,!0)-he(0,!0))),Le=R.hasB?Math.min(Se/2,ir/2):Math.min(Se/2,Qe),Ce;if(Te==="%"){var Ge=Math.min(50,se);Ce=Se*(Ge/100)}else Ce=se;return K(Math.max(Math.min(Ce,Le),0))}var ue=_||x?ye(p.cornerradiusvalue,p.cornerradiusform):0,de,W,Q="M"+H+","+G+"V"+B+"H"+Y+"V"+G+"Z",j=0;if(ue&&R.s){var pe=bw(R.s0)===0||bw(R.s)===bw(R.s0)?R.s1:R.s0;if(j=K(R.hasB?0:Math.abs(he(oe,!0)-he(pe,!0))),j0?Math.sqrt(j*(2*ue-j)):0,Ie=me>0?Math.max:Math.min;de="M"+H+","+G+"V"+(B-Fe*we)+"H"+Ie(Y-(ue-j)*me,H)+"A "+ue+","+ue+" 0 0 "+Ne+" "+Y+","+(B-ue*we-Re)+"V"+(G+ue*we+Re)+"A "+ue+","+ue+" 0 0 "+Ne+" "+Ie(Y-(ue-j)*me,H)+","+(G+Fe*we)+"Z"}else if(R.hasB)de="M"+(H+ue*me)+","+G+"A "+ue+","+ue+" 0 0 "+Ne+" "+H+","+(G+ue*we)+"V"+(B-ue*we)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(H+ue*me)+","+B+"H"+(Y-ue*me)+"A "+ue+","+ue+" 0 0 "+Ne+" "+Y+","+(B-ue*we)+"V"+(G+ue*we)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(Y-ue*me)+","+G+"Z";else{W=Math.abs(B-G)+j;var Be=W0?Math.sqrt(j*(2*ue-j)):0,Pe=we>0?Math.max:Math.min;de="M"+(H+Be*me)+","+G+"V"+Pe(B-(ue-j)*we,G)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(H+ue*me-ze)+","+B+"H"+(Y-ue*me+ze)+"A "+ue+","+ue+" 0 0 "+Ne+" "+(Y-Be*me)+","+Pe(B-(ue-j)*we,G)+"V"+G+"Z"}}else de=Q}else de=Q;var Xe=wG(Pa.ensureSingle(z,"path"),s,n,i);if(Xe.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((Y-H)*(B-G))||V&&e._context.staticPlot?"M0,0Z":de).call(ys.setClipUrl,r.layerClipId,e),!s.uniformtext.mode&&k){var Ue=ys.makePointStyleFns(d);ys.singlePointStyle(R,Xe,d,Ue,e)}kxe(e,r,z,c,D,H,Y,G,B,ue,j,n,i),r.layerClipId&&ys.hideOutsideRangePoint(R,z.select("text"),o,l,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;ys.setClipUrl(v,P?null:r.layerClipId,e)});pxe.getComponentMethod("errorbars","plot")(e,f,r,n)}function kxe(e,r,t,a,n,i,o,l,s,u,f,c,v){var d=r.xaxis,p=r.yaxis,m=e._fullLayout,y;function x(W,Q,j){var pe=Pa.ensureSingle(W,"text").text(Q).attr({class:"bartext bartext-"+y,"text-anchor":"middle","data-notex":1}).call(ys.font,j).call(hxe.convertToTspans,e);return pe}var _=a[0].trace,w=_.orientation==="h",b=Lxe(m,a,n,d,p);y=Cxe(_,n);var T=c.mode==="stack"||c.mode==="relative",k=a[n],M=!T||k._outmost,S=k.hasB,E=u&&u-f>cn;if(!b||y==="none"||(k.isBlank||i===o||l===s)&&(y==="auto"||y==="inside")){t.select("text").remove();return}var P=m.font,R=gw.getBarColor(a[n],_),D=gw.getInsideTextFont(_,n,P,R),z=gw.getOutsideTextFont(_,n,P),O=_.insidetextanchor||"end",H=t.datum();w?d.type==="log"&&H.s0<=0&&(d.range[0]0&&fe>0,K;E?S?K=Ou(B-2*u,V,te,fe,w)||Ou(B,V-2*u,te,fe,w):w?K=Ou(B-(u-f),V,te,fe,w)||Ou(B,V-2*(u-f),te,fe,w):K=Ou(B,V-(u-f),te,fe,w)||Ou(B-2*(u-f),V,te,fe,w):K=Ou(B,V,te,fe,w),ie&&K?y="inside":(y="outside",X.remove(),X=null)}else y="inside";if(!X){le=Pa.ensureUniformFontSize(e,y==="outside"?z:D),X=x(t,b,le);var he=X.attr("transform");if(X.attr("transform",""),Z=ys.bBox(X.node()),te=Z.width,fe=Z.height,X.attr("transform",he),te<=0||fe<=0){X.remove();return}}var oe=_.textangle,ye,ue;y==="outside"?(ue=_.constraintext==="both"||_.constraintext==="outside",ye=qxe(i,o,l,s,Z,{isHorizontal:w,constrained:ue,angle:oe})):(ue=_.constraintext==="both"||_.constraintext==="inside",ye=kG(i,o,l,s,Z,{isHorizontal:w,constrained:ue,angle:oe,anchor:O,hasB:S,r:u,overhead:f})),ye.fontSize=le.size,yxe(_.type==="histogram"?"bar":_.type,ye,m),k.transform=ye;var de=wG(X,m,c,v);Pa.setTransormAndDisplay(de,ye)}function Ou(e,r,t,a,n){if(e<0||r<0)return!1;var i=t<=e&&a<=r,o=t<=r&&a<=e,l=n?e>=t*(r/a):r>=a*(e/t);return i||o||l}function AG(e){return e==="auto"?0:e}function MG(e,r){var t=Math.PI/180*r,a=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t));return{x:e.width*n+e.height*a,y:e.width*a+e.height*n}}function kG(e,r,t,a,n,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,u=i.anchor,f=u==="end",c=u==="start",v=i.leftToRight||0,d=(v+1)/2,p=1-d,m=i.hasB,y=i.r,x=i.overhead,_=n.width,w=n.height,b=Math.abs(r-e),T=Math.abs(a-t),k=b>2*cn&&T>2*cn?cn:0;b-=2*k,T-=2*k;var M=AG(s);s==="auto"&&!(_<=b&&w<=T)&&(_>b||w>T)&&(!(_>T||w>b)||_cn){var R=Sxe(e,r,t,a,S,y,x,o,m);E=R.scale,P=R.pad}else E=1,l&&(E=Math.min(1,b/S.x,T/S.y)),P=0;var D=n.left*p+n.right*d,z=(n.top+n.bottom)/2,O=(e+cn)*p+(r-cn)*d,H=(t+a)/2,Y=0,G=0;if(c||f){var B=(o?S.x:S.y)/2;y&&(f||m)&&(k+=P);var V=o?Ho(e,r):Ho(t,a);o?c?(O=e+V*k,Y=-V*B):(O=r-V*k,Y=V*B):c?(H=t+V*k,G=-V*B):(H=a-V*k,G=V*B)}return{textX:D,textY:z,targetX:O,targetY:H,anchorX:Y,anchorY:G,scale:E,rotate:M}}function Sxe(e,r,t,a,n,i,o,l,s){var u=Math.max(0,Math.abs(r-e)-2*cn),f=Math.max(0,Math.abs(a-t)-2*cn),c=i-cn,v=o?c-Math.sqrt(c*c-(c-o)*(c-o)):c,d=s?c*2:l?c-o:2*v,p=s?c*2:l?2*v:c-o,m,y,x,_,w;return n.y/n.x>=f/(u-d)?_=f/n.y:n.y/n.x<=(f-p)/u?_=u/n.x:!s&&l?(m=n.x*n.x+n.y*n.y/4,y=-2*n.x*(u-c)-n.y*(f/2-c),x=(u-c)*(u-c)+(f/2-c)*(f/2-c)-c*c,_=(-y+Math.sqrt(y*y-4*m*x))/(2*m)):s?(m=(n.x*n.x+n.y*n.y)/4,y=-n.x*(u/2-c)-n.y*(f/2-c),x=(u/2-c)*(u/2-c)+(f/2-c)*(f/2-c)-c*c,_=(-y+Math.sqrt(y*y-4*m*x))/(2*m)):(m=n.x*n.x/4+n.y*n.y,y=-n.x*(u/2-c)-2*n.y*(f-c),x=(u/2-c)*(u/2-c)+(f-c)*(f-c)-c*c,_=(-y+Math.sqrt(y*y-4*m*x))/(2*m)),_=Math.min(1,_),l?w=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-n.y*_)/2)*(c-(f-n.y*_)/2)))-o):w=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(u-n.x*_)/2)*(c-(u-n.x*_)/2)))-o),{scale:_,pad:w}}function qxe(e,r,t,a,n,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,u=n.width,f=n.height,c=Math.abs(r-e),v=Math.abs(a-t),d;o?d=v>2*cn?cn:0:d=c>2*cn?cn:0;var p=1;l&&(p=o?Math.min(1,v/f):Math.min(1,c/u));var m=AG(s),y=MG(n,m),x=(o?y.x:y.y)/2,_=(n.left+n.right)/2,w=(n.top+n.bottom)/2,b=(e+r)/2,T=(t+a)/2,k=0,M=0,S=o?Ho(r,e):Ho(t,a);return o?(b=r-S*d,k=S*x):(T=a+S*d,M=-S*x),{textX:_,textY:w,targetX:b,targetY:T,anchorX:k,anchorY:M,scale:p,rotate:m}}function Lxe(e,r,t,a,n){var i=r[0].trace,o=i.texttemplate,l;return o?l=Exe(e,r,t,a,n):i.textinfo?l=Dxe(r,t,a,n):l=Ic.getValue(i.text,t),Ic.coerceString(bxe,l)}function Cxe(e,r){var t=Ic.getValue(e.textposition,r);return Ic.coerceEnumerated(xxe,t)}function Exe(e,r,t,a,n){var i=r[0].trace,o=Pa.castOption(i,t,"texttemplate");if(!o)return"";var l=i.type==="histogram",s=i.type==="waterfall",u=i.type==="funnel",f=i.orientation==="h",c,v,d,p;f?(c="y",v=n,d="x",p=a):(c="x",v=a,d="y",p=n);function m(k){return rg(v,v.c2l(k),!0).text}function y(k){return rg(p,p.c2l(k),!0).text}var x=r[t],_={};_.label=x.p,_.labelLabel=_[c+"Label"]=m(x.p);var w=Pa.castOption(i,x.i,"text");(w===0||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[d+"Label"]=y(x.s);var b={};_xe(b,i,x.i),(l||b.x===void 0)&&(b.x=f?_.value:_.label),(l||b.y===void 0)&&(b.y=f?_.label:_.value),(l||b.xLabel===void 0)&&(b.xLabel=f?_.valueLabel:_.labelLabel),(l||b.yLabel===void 0)&&(b.yLabel=f?_.labelLabel:_.valueLabel),s&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),u&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=Pa.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=Pa.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=Pa.formatPercent(x.sumR));var T=Pa.castOption(i,x.i,"customdata");return T&&(_.customdata=T),Pa.texttemplateString(o,_,e._d3locale,b,_,i._meta||{})}function Dxe(e,r,t,a){var n=e[0].trace,i=n.orientation==="h",o=n.type==="waterfall",l=n.type==="funnel";function s(T){var k=i?a:t;return rg(k,T,!0).text}function u(T){var k=i?t:a;return rg(k,+T,!0).text}var f=n.textinfo,c=e[r],v=f.split("+"),d=[],p,m=function(T){return v.indexOf(T)!==-1};if(m("label")&&d.push(s(e[r].p)),m("text")&&(p=Pa.castOption(n,c.i,"text"),(p===0||p)&&d.push(p)),o){var y=+c.rawS||c.s,x=c.v,_=x-y;m("initial")&&d.push(u(_)),m("delta")&&d.push(u(y)),m("final")&&d.push(u(x))}if(l){m("value")&&d.push(u(c.s));var w=0;m("percent initial")&&w++,m("percent previous")&&w++,m("percent total")&&w++;var b=w>1;m("percent initial")&&(p=Pa.formatPercent(c.begR),b&&(p+=" of initial"),d.push(p)),m("percent previous")&&(p=Pa.formatPercent(c.difR),b&&(p+=" of previous"),d.push(p)),m("percent total")&&(p=Pa.formatPercent(c.sumR),b&&(p+=" of total"),d.push(p))}return d.join("
")}SG.exports={plot:Mxe,toMoveInsideBar:kG}});var ww=N((IFe,EG)=>{"use strict";var T0=Fn(),Pxe=gr(),qG=Tr(),Rxe=Ee().fillText,Fxe=Km().getLineWidth,_w=Or().hoverLabelText,Nxe=Ft().BADNUM;function zxe(e,r,t,a,n){var i=LG(e,r,t,a,n);if(i){var o=i.cd,l=o[0].trace,s=o[i.index];return i.color=CG(l,s),Pxe.getComponentMethod("errorbars","hoverInfo")(s,l,i),[i]}}function LG(e,r,t,a,n){var i=e.cd,o=i[0].trace,l=i[0].t,s=a==="closest",u=o.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,v,d,p,m,y,x,_;o.orientation==="h"?(v=t,d=r,p="y",m="x",y=H,x=D):(v=r,d=t,p="x",m="y",x=H,y=D);var w=o[p+"period"],b=s||w;function T(K){return M(K,-1)}function k(K){return M(K,1)}function M(K,he){var oe=K.w;return K[p]+he*oe/2}function S(K){return K[p+"End"]-K[p+"Start"]}var E=s?T:w?function(K){return K.p-S(K)/2}:function(K){return Math.min(T(K),K.p-l.bardelta/2)},P=s?k:w?function(K){return K.p+S(K)/2}:function(K){return Math.max(k(K),K.p+l.bardelta/2)};function R(K,he,oe){return n.finiteRange&&(oe=0),T0.inbox(K-v,he-v,oe+Math.min(1,Math.abs(he-K)/_)-1)}function D(K){return R(E(K),P(K),f)}function z(K){return R(T(K),k(K),c)}function O(K){var he=K[m];if(u){var oe=Math.abs(K.rawS)||0;d>0?he+=oe:d<0&&(he-=oe)}return he}function H(K){var he=d,oe=K.b,ye=O(K);return T0.inbox(oe-he,ye-he,f+(ye-he)/(ye-oe)-1)}function Y(K){var he=d,oe=K.b,ye=O(K);return T0.inbox(oe-he,ye-he,c+(ye-he)/(ye-oe)-1)}var G=e[p+"a"],B=e[m+"a"];_=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function V(K){return(y(K)+x(K))/2}var X=T0.getDistanceFunction(a,y,x,V);if(T0.getClosest(i,X,e),e.index!==!1&&i[e.index].p!==Nxe){b||(E=function(K){return Math.min(T(K),K.p-l.bargroupwidth/2)},P=function(K){return Math.max(k(K),K.p+l.bargroupwidth/2)});var Z=e.index,te=i[Z],fe=o.base?te.b+te.s:te.s;e[m+"0"]=e[m+"1"]=B.c2p(te[m],!0),e[m+"LabelVal"]=fe;var le=l.extents[l.extents.round(te.p)];e[p+"0"]=G.c2p(s?E(te):le[0],!0),e[p+"1"]=G.c2p(s?P(te):le[1],!0);var ie=te.orig_p!==void 0;return e[p+"LabelVal"]=ie?te.orig_p:te.p,e.labelLabel=_w(G,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=_w(B,e[m+"LabelVal"],o[m+"hoverformat"]),e.baseLabel=_w(B,te.b,o[m+"hoverformat"]),e.spikeDistance=(Y(te)+z(te))/2,e[p+"Spike"]=G.c2p(te.p,!0),Rxe(te,o,e),e.hovertemplate=o.hovertemplate,e}}function CG(e,r){var t=r.mcc||e.marker.color,a=r.mlcc||e.marker.line.color,n=Fxe(e,r);if(qG.opacity(t))return t;if(qG.opacity(a)&&n)return a}EG.exports={hoverPoints:zxe,hoverOnBars:LG,getTraceColor:CG}});var PG=N((OFe,DG)=>{"use strict";DG.exports=function(r,t,a){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),a.orientation==="h"?(r.label=r.y,r.value=r.x):(r.label=r.x,r.value=r.y),r}});var Tw=N((BFe,RG)=>{"use strict";RG.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",u=[],f;if(t===!1)for(f=0;f{"use strict";FG.exports={attributes:Nu(),layoutAttributes:Xm(),supplyDefaults:zu().supplyDefaults,crossTraceDefaults:zu().crossTraceDefaults,supplyLayoutDefaults:pw(),calc:iG(),crossTraceCalc:fm().crossTraceCalc,colorbar:i0(),arraysToCalcdata:$m(),plot:xw().plot,style:zc().style,styleOnSelect:zc().styleOnSelect,hoverPoints:ww().hoverPoints,eventData:PG(),selectPoints:Tw(),moduleType:"trace",name:"bar",basePlotModule:qi(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var IG=N((UFe,zG)=>{"use strict";zG.exports=NG()});var tg=N((GFe,UG)=>{"use strict";var Oxe=Cy(),Ci=wi(),OG=Nu(),Bxe=li(),BG=Qi().axisHoverFormat,Hxe=La().hovertemplateAttrs,_l=bt().extendFlat,Oc=Ci.marker,HG=Oc.line;UG.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:Ci.xperiod,yperiod:Ci.yperiod,xperiod0:Ci.xperiod0,yperiod0:Ci.yperiod0,xperiodalignment:Ci.xperiodalignment,yperiodalignment:Ci.yperiodalignment,xhoverformat:BG("x"),yhoverformat:BG("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:_l({},Oc.symbol,{arrayOk:!1,editType:"plot"}),opacity:_l({},Oc.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:_l({},Oc.angle,{arrayOk:!1,editType:"calc"}),size:_l({},Oc.size,{arrayOk:!1,editType:"calc"}),color:_l({},Oc.color,{arrayOk:!1,editType:"style"}),line:{color:_l({},HG.color,{arrayOk:!1,dflt:Bxe.defaultLine,editType:"style"}),width:_l({},HG.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:Oxe(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:OG.offsetgroup,alignmentgroup:OG.alignmentgroup,selected:{marker:Ci.selected.marker,editType:"style"},unselected:{marker:Ci.unselected.marker,editType:"style"},text:_l({},Ci.text,{}),hovertext:_l({},Ci.hovertext,{}),hovertemplate:Hxe({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:Ci.zorder}});var ag=N((YFe,GG)=>{"use strict";GG.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 M0=N((VFe,jG)=>{"use strict";var Ei=Ee(),Uxe=gr(),Gxe=Tr(),Yxe=dc(),Vxe=e0(),YG=x1(),A0=tg();function Wxe(e,r,t,a){function n(p,m){return Ei.coerce(e,r,A0,p,m)}if(VG(e,r,n,a),r.visible!==!1){Yxe(e,r,a,n),n("xhoverformat"),n("yhoverformat");var i=r._hasPreCompStats;i&&(n("lowerfence"),n("upperfence")),n("line.color",(e.marker||{}).color||t),n("line.width"),n("fillcolor",Gxe.addOpacity(r.line.color,.5));var o=!1;if(i){var l=n("mean"),s=n("sd");l&&l.length&&(o=!0,s&&s.length&&(o="sd"))}n("whiskerwidth");var u=n("sizemode"),f;u==="quartiles"&&(f=n("boxmean",o)),n("showwhiskers",u==="quartiles"),(u==="sd"||f==="sd")&&n("sdmultiple"),n("width"),n("quartilemethod");var c=!1;if(i){var v=n("notchspan");v&&v.length&&(c=!0)}else Ei.validate(e.notchwidth,A0.notchwidth)&&(c=!0);var d=n("notched",c);d&&n("notchwidth"),WG(e,r,n,{prefix:"box"}),n("zorder")}}function VG(e,r,t,a){function n(P){var R=0;return P&&P.length&&(R+=1,Ei.isArrayOrTypedArray(P[0])&&P[0].length&&(R+=1)),R}function i(P){return Ei.validate(e[P],A0[P])}var o=t("y"),l=t("x"),s;if(r.type==="box"){var u=t("q1"),f=t("median"),c=t("q3");r._hasPreCompStats=u&&u.length&&f&&f.length&&c&&c.length,s=Math.min(Ei.minRowLength(u),Ei.minRowLength(f),Ei.minRowLength(c))}var v=n(o),d=n(l),p=v&&Ei.minRowLength(o),m=d&&Ei.minRowLength(l),y=a.calendar,x={autotypenumbers:a.autotypenumbers},_,w;if(r._hasPreCompStats)switch(String(d)+String(v)){case"00":var b=i("x0")||i("dx"),T=i("y0")||i("dy");T&&!b?_="h":_="v",w=s;break;case"10":_="v",w=Math.min(s,m);break;case"20":_="h",w=Math.min(s,l.length);break;case"01":_="h",w=Math.min(s,p);break;case"02":_="v",w=Math.min(s,o.length);break;case"12":_="v",w=Math.min(s,m,o.length);break;case"21":_="h",w=Math.min(s,l.length,p);break;case"11":w=0;break;case"22":var k=!1,M;for(M=0;M0?(_="v",d>0?w=Math.min(m,p):w=Math.min(p)):d>0?(_="h",w=Math.min(m)):w=0;if(!w){r.visible=!1;return}r._length=w;var S=t("orientation",_);r._hasPreCompStats?S==="v"&&d===0?(t("x0",0),t("dx",1)):S==="h"&&v===0&&(t("y0",0),t("dy",1)):S==="v"&&d===0?t("x0"):S==="h"&&v===0&&t("y0");var E=Uxe.getComponentMethod("calendars","handleTraceDefaults");E(e,r,["x","y"],a)}function WG(e,r,t,a){var n=a.prefix,i=Ei.coerce2(e,r,A0,"marker.outliercolor"),o=t("marker.line.outliercolor"),l="outliers";r._hasPreCompStats?l="all":(i||o)&&(l="suspectedoutliers");var s=t(n+"points",l);s?(t("jitter",s==="all"?.3:0),t("pointpos",s==="all"?-1.5:0),t("marker.symbol"),t("marker.opacity"),t("marker.size"),t("marker.angle"),t("marker.color",r.line.color),t("marker.line.color"),t("marker.line.width"),s==="suspectedoutliers"&&(t("marker.line.outliercolor",r.marker.color),t("marker.line.outlierwidth")),t("selected.marker.color"),t("unselected.marker.color"),t("selected.marker.size"),t("unselected.marker.size"),t("text"),t("hovertext")):delete r.marker;var u=t("hoveron");(u==="all"||u.indexOf("points")!==-1)&&t("hovertemplate"),Ei.coerceSelectionMarkerOpacity(r,t)}function jxe(e,r){var t,a;function n(s){return Ei.coerce(a._input,a,A0,s)}for(var i=0;i{"use strict";var Zxe=gr(),Xxe=Ee(),Jxe=ag();function ZG(e,r,t,a,n){for(var i=n+"Layout",o=!1,l=0;l{"use strict";var kw=Pr(),ng=Or(),Kxe=yc(),ra=Ee(),ri=Ft().BADNUM,wl=ra._;nY.exports=function(r,t){var a=r._fullLayout,n=ng.getFromId(r,t.xaxis||"x"),i=ng.getFromId(r,t.yaxis||"y"),o=[],l=t.type==="violin"?"_numViolins":"_numBoxes",s,u,f,c,v,d,p;t.orientation==="h"?(f=n,c="x",v=i,d="y",p=!!t.yperiodalignment):(f=i,c="y",v=n,d="x",p=!!t.xperiodalignment);var m=Qxe(t,d,v,a[l]),y=m[0],x=m[1],_=ra.distinctVals(y,v),w=_.vals,b=_.minDiff/2,T,k,M,S,E,P,R=(t.boxpoints||t.points)==="all"?ra.identity:function(Ne){return Ne.vT.uf};if(t._hasPreCompStats){var D=t[c],z=function(Ne){return f.d2c((t[Ne]||[])[s])},O=1/0,H=-1/0;for(s=0;s=T.q1&&T.q3>=T.med){var G=z("lowerfence");T.lf=G!==ri&&G<=T.q1?G:QG(T,M,S);var B=z("upperfence");T.uf=B!==ri&&B>=T.q3?B:eY(T,M,S);var V=z("mean");T.mean=V!==ri?V:S?ra.mean(M,S):(T.q1+T.q3)/2;var X=z("sd");T.sd=V!==ri&&X>=0?X:S?ra.stdev(M,S,T.mean):T.q3-T.q1,T.lo=rY(T),T.uo=tY(T);var Z=z("notchspan");Z=Z!==ri&&Z>0?Z:aY(T,S),T.ln=T.med-Z,T.un=T.med+Z;var te=T.lf,fe=T.uf;t.boxpoints&&M.length&&(te=Math.min(te,M[0]),fe=Math.max(fe,M[S-1])),t.notched&&(te=Math.min(te,T.ln),fe=Math.max(fe,T.un)),T.min=te,T.max=fe}else{ra.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+T.q1,"median = "+T.med,"q3 = "+T.q3].join(` +`));var le;T.med!==ri?le=T.med:T.q1!==ri?T.q3!==ri?le=(T.q1+T.q3)/2:le=T.q1:T.q3!==ri?le=T.q3:le=0,T.med=le,T.q1=T.q3=le,T.lf=T.uf=le,T.mean=T.sd=le,T.ln=T.un=le,T.min=T.max=le}O=Math.min(O,T.min),H=Math.max(H,T.max),T.pts2=k.filter(R),o.push(T)}}t._extremes[f._id]=ng.findExtremes(f,[O,H],{padded:!0})}else{var ie=f.makeCalcdata(t,c),K=e5e(w,b),he=w.length,oe=r5e(he);for(s=0;s=0&&ye0){if(T={},T.pos=T[d]=w[s],k=T.pts=oe[s].sort($G),M=T[c]=k.map(KG),S=M.length,T.min=M[0],T.max=M[S-1],T.mean=ra.mean(M,S),T.sd=ra.stdev(M,S,T.mean)*t.sdmultiple,T.med=ra.interp(M,.5),S%2&&(Q||j)){var pe,me;Q?(pe=M.slice(0,S/2),me=M.slice(S/2+1)):j&&(pe=M.slice(0,S/2+1),me=M.slice(S/2)),T.q1=ra.interp(pe,.5),T.q3=ra.interp(me,.5)}else T.q1=ra.interp(M,.25),T.q3=ra.interp(M,.75);T.lf=QG(T,M,S),T.uf=eY(T,M,S),T.lo=rY(T),T.uo=tY(T);var we=aY(T,S);T.ln=T.med-we,T.un=T.med+we,ue=Math.min(ue,T.ln),de=Math.max(de,T.un),T.pts2=k.filter(R),o.push(T)}t.notched&&ra.isTypedArray(ie)&&(ie=Array.from(ie)),t._extremes[f._id]=ng.findExtremes(f,t.notched?ie.concat([ue,de]):ie,{padded:!0})}return t5e(o,t),o.length>0?(o[0].t={num:a[l],dPos:b,posLetter:d,valLetter:c,labels:{med:wl(r,"median:"),min:wl(r,"min:"),q1:wl(r,"q1:"),q3:wl(r,"q3:"),max:wl(r,"max:"),mean:t.boxmean==="sd"||t.sizemode==="sd"?wl(r,"mean \xB1 \u03C3:").replace("\u03C3",t.sdmultiple===1?"\u03C3":t.sdmultiple+"\u03C3"):wl(r,"mean:"),lf:wl(r,"lower fence:"),uf:wl(r,"upper fence:")}},a[l]++,o):[{t:{empty:!0}}]};function Qxe(e,r,t,a){var n=r in e,i=r+"0"in e,o="d"+r in e;if(n||i&&o){var l=t.makeCalcdata(e,r),s=Kxe(e,t,r,l).vals;return[s,l]}var u;i?u=e[r+"0"]:"name"in e&&(t.type==="category"||kw(e.name)&&["linear","log"].indexOf(t.type)!==-1||ra.isDateTime(e.name)&&t.type==="date")?u=e.name:u=a;for(var f=t.type==="multicategory"?t.r2c_just_indices(u):t.d2c(u,0,e[r+"calendar"]),c=e._length,v=new Array(c),d=0;d{"use strict";var iY=Or(),a5e=Ee(),n5e=Tu().getAxisGroup,oY=["v","h"];function i5e(e,r){for(var t=e.calcdata,a=r.xaxis,n=r.yaxis,i=0;i1,_=1-i[e+"gap"],w=1-i[e+"groupgap"];for(s=0;s0;if(M==="positive"?(B=S*(k?1:.5),Z=X,V=Z=P):M==="negative"?(B=Z=P,V=S*(k?1:.5),te=X):(B=V=S,Z=te=X),oe){var ye=b.pointpos,ue=b.jitter,de=b.marker.size/2,W=0;ye+ue>=0&&(W=X*(ye+ue),W>B?(he=!0,ie=de,fe=W):W>Z&&(ie=de,fe=B)),W<=B&&(fe=B);var Q=0;ye-ue<=0&&(Q=-X*(ye-ue),Q>V?(he=!0,K=de,le=Q):Q>te&&(K=de,le=V)),Q<=V&&(le=V)}else fe=B,le=V;var j=new Array(f.length);for(u=0;u{"use strict";var Bc=Sr(),Bu=Ee(),o5e=jr(),uY=5,l5e=.01;function s5e(e,r,t,a){var n=e._context.staticPlot,i=r.xaxis,o=r.yaxis;Bu.makeTraceGroups(a,t,"trace boxes").each(function(l){var s=Bc.select(this),u=l[0],f=u.t,c=u.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){s.remove();return}var v,d;c.orientation==="h"?(v=o,d=i):(v=i,d=o),fY(s,{pos:v,val:d},c,f,n),cY(s,{x:i,y:o},c,f),vY(s,{pos:v,val:d},c,f)})}function fY(e,r,t,a,n){var i=t.orientation==="h",o=r.val,l=r.pos,s=!!l.rangebreaks,u=a.bPos,f=a.wdPos||0,c=a.bPosPxOffset||0,v=t.whiskerwidth||0,d=t.showwhiskers!==!1,p=t.notched||!1,m=p?1-2*t.notchwidth:1,y,x;Array.isArray(a.bdPos)?(y=a.bdPos[0],x=a.bdPos[1]):(y=a.bdPos,x=a.bdPos);var _=e.selectAll("path.box").data(t.type!=="violin"||t.box.visible?Bu.identity:[]);_.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),_.exit().remove(),_.each(function(w){if(w.empty)return Bc.select(this).attr("d","M0,0Z");var b=l.c2l(w.pos+u,!0),T=l.l2p(b-y)+c,k=l.l2p(b+x)+c,M=s?(T+k)/2:l.l2p(b)+c,S=t.whiskerwidth,E=s?T*S+(1-S)*M:l.l2p(b-f)+c,P=s?k*S+(1-S)*M:l.l2p(b+f)+c,R=l.l2p(b-y*m)+c,D=l.l2p(b+x*m)+c,z=t.sizemode==="sd",O=o.c2p(z?w.mean-w.sd:w.q1,!0),H=z?o.c2p(w.mean+w.sd,!0):o.c2p(w.q3,!0),Y=Bu.constrain(z?o.c2p(w.mean,!0):o.c2p(w.med,!0),Math.min(O,H)+1,Math.max(O,H)-1),G=w.lf===void 0||t.boxpoints===!1||z,B=o.c2p(G?w.min:w.lf,!0),V=o.c2p(G?w.max:w.uf,!0),X=o.c2p(w.ln,!0),Z=o.c2p(w.un,!0);i?Bc.select(this).attr("d","M"+Y+","+R+"V"+D+"M"+O+","+T+"V"+k+(p?"H"+X+"L"+Y+","+D+"L"+Z+","+k:"")+"H"+H+"V"+T+(p?"H"+Z+"L"+Y+","+R+"L"+X+","+T:"")+"Z"+(d?"M"+O+","+M+"H"+B+"M"+H+","+M+"H"+V+(v===0?"":"M"+B+","+E+"V"+P+"M"+V+","+E+"V"+P):"")):Bc.select(this).attr("d","M"+R+","+Y+"H"+D+"M"+T+","+O+"H"+k+(p?"V"+X+"L"+D+","+Y+"L"+k+","+Z:"")+"V"+H+"H"+T+(p?"V"+Z+"L"+R+","+Y+"L"+T+","+X:"")+"Z"+(d?"M"+M+","+O+"V"+B+"M"+M+","+H+"V"+V+(v===0?"":"M"+E+","+B+"H"+P+"M"+E+","+V+"H"+P):""))})}function cY(e,r,t,a){var n=r.x,i=r.y,o=a.bdPos,l=a.bPos,s=t.boxpoints||t.points;Bu.seedPseudoRandom();var u=function(v){return v.forEach(function(d){d.t=a,d.trace=t}),v},f=e.selectAll("g.points").data(s?u:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(v){var d,p=v.pts2,m=Math.max((v.max-v.min)/10,v.q3-v.q1),y=m*1e-9,x=m*l5e,_=[],w=0,b;if(t.jitter){if(m===0)for(w=1,_=new Array(p.length),d=0;dv.lo&&(P.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(o5e.translatePoints,n,i)}function vY(e,r,t,a){var n=r.val,i=r.pos,o=!!i.rangebreaks,l=a.bPos,s=a.bPosPxOffset||0,u=t.boxmean||(t.meanline||{}).visible,f,c;Array.isArray(a.bdPos)?(f=a.bdPos[0],c=a.bdPos[1]):(f=a.bdPos,c=a.bdPos);var v=e.selectAll("path.mean").data(t.type==="box"&&t.boxmean||t.type==="violin"&&t.box.visible&&t.meanline.visible?Bu.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(d){var p=i.c2l(d.pos+l,!0),m=i.l2p(p-f)+s,y=i.l2p(p+c)+s,x=o?(m+y)/2:i.l2p(p)+s,_=n.c2p(d.mean,!0),w=n.c2p(d.mean-d.sd,!0),b=n.c2p(d.mean+d.sd,!0);t.orientation==="h"?Bc.select(this).attr("d","M"+_+","+m+"V"+y+(u==="sd"?"m0,0L"+w+","+x+"L"+_+","+m+"L"+b+","+x+"Z":"")):Bc.select(this).attr("d","M"+m+","+_+"H"+y+(u==="sd"?"m0,0L"+x+","+w+"L"+m+","+_+"L"+x+","+b+"Z":""))})}hY.exports={plot:s5e,plotBoxAndWhiskers:fY,plotPoints:cY,plotBoxMean:vY}});var Pw=N((JFe,dY)=>{"use strict";var Cw=Sr(),Ew=Tr(),Dw=jr();function u5e(e,r,t){var a=t||Cw.select(e).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=Cw.select(this),o=n[0].trace,l=o.line.width;function s(c,v,d,p){c.style("stroke-width",v+"px").call(Ew.stroke,d).call(Ew.fill,p)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(c){if(!c.empty){var v=Cw.select(this),d=o[c.dir];s(v,d.line.width,d.line.color,d.fillcolor),v.style("opacity",o.selectedpoints&&!c.selected?.3:1)}});else{s(u,l,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":l,"stroke-dasharray":2*l+"px,"+l+"px"}).call(Ew.stroke,o.line.color);var f=i.selectAll("path.point");Dw.pointStyle(f,o,e)}})}function f5e(e,r,t){var a=r[0].trace,n=t.selectAll("path.point");a.selectedpoints?Dw.selectedPointStyle(n,a):Dw.pointStyle(n,a,e)}dY.exports={style:u5e,styleOnSelect:f5e}});var Fw=N(($Fe,gY)=>{"use strict";var c5e=Or(),Rw=Ee(),ms=Fn(),pY=Tr(),v5e=Rw.fillText;function h5e(e,r,t,a){var n=e.cd,i=n[0].trace,o=i.hoveron,l=[],s;return o.indexOf("boxes")!==-1&&(l=l.concat(yY(e,r,t,a))),o.indexOf("points")!==-1&&(s=mY(e,r,t)),a==="closest"?s?[s]:l:(s&&l.push(s),l)}function yY(e,r,t,a){var n=e.cd,i=e.xa,o=e.ya,l=n[0].trace,s=n[0].t,u=l.type==="violin",f,c,v,d,p,m,y,x,_,w,b,T=s.bdPos,k,M,S=s.wHover,E=function(de){return v.c2l(de.pos)+s.bPos-v.c2l(m)};u&&l.side!=="both"?(l.side==="positive"&&(_=function(de){var W=E(de);return ms.inbox(W,W+S,w)},k=T,M=0),l.side==="negative"&&(_=function(de){var W=E(de);return ms.inbox(W-S,W,w)},k=0,M=T)):(_=function(de){var W=E(de);return ms.inbox(W-S,W+S,w)},k=M=T);var P;u?P=function(de){return ms.inbox(de.span[0]-p,de.span[1]-p,w)}:P=function(de){return ms.inbox(de.min-p,de.max-p,w)},l.orientation==="h"?(p=r,m=t,y=P,x=_,f="y",v=o,c="x",d=i):(p=t,m=r,y=_,x=P,f="x",v=i,c="y",d=o);var R=Math.min(1,T/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));w=e.maxHoverDistance-R,b=e.maxSpikeDistance-R;function D(de){return(y(de)+x(de))/2}var z=ms.getDistanceFunction(a,y,x,D);if(ms.getClosest(n,z,e),e.index===!1)return[];var O=n[e.index],H=l.line.color,Y=(l.marker||{}).color;pY.opacity(H)&&l.line.width?e.color=H:pY.opacity(Y)&&l.boxpoints?e.color=Y:e.color=l.fillcolor,e[f+"0"]=v.c2p(O.pos+s.bPos-M,!0),e[f+"1"]=v.c2p(O.pos+s.bPos+k,!0),e[f+"LabelVal"]=O.orig_p!==void 0?O.orig_p:O.pos;var G=f+"Spike";e.spikeDistance=D(O)*b/w,e[G]=v.c2p(O.pos,!0);var B=l.boxmean||l.sizemode==="sd"||(l.meanline||{}).visible,V=l.boxpoints||l.points,X=V&&B?["max","uf","q3","med","mean","q1","lf","min"]:V&&!B?["max","uf","q3","med","q1","lf","min"]:!V&&B?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],Z=d.range[1]{"use strict";bY.exports=function(r,t){return t.hoverOnBox&&(r.hoverOnBox=t.hoverOnBox),"xVal"in t&&(r.x=t.xVal),"yVal"in t&&(r.y=t.yVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r}});var Nw=N((QFe,_Y)=>{"use strict";_Y.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l,s;if(t===!1)for(l=0;l{"use strict";wY.exports={attributes:tg(),layoutAttributes:ag(),supplyDefaults:M0().supplyDefaults,crossTraceDefaults:M0().crossTraceDefaults,supplyLayoutDefaults:Aw().supplyLayoutDefaults,calc:Sw(),crossTraceCalc:qw().crossTraceCalc,plot:Lw().plot,style:Pw().style,styleOnSelect:Pw().styleOnSelect,hoverPoints:Fw().hoverPoints,eventData:xY(),selectPoints:Nw(),moduleType:"trace",name:"box",basePlotModule:qi(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var MY=N((rNe,AY)=>{"use strict";AY.exports=TY()});var k0=N((tNe,kY)=>{"use strict";var ti=wi(),d5e=mn(),p5e=fa(),zw=Qi().axisHoverFormat,y5e=La().hovertemplateAttrs,m5e=La().texttemplateAttrs,g5e=ko(),Hn=bt().extendFlat;kY.exports=Hn({z:{valType:"data_array",editType:"calc"},x:Hn({},ti.x,{impliedEdits:{xtype:"array"}}),x0:Hn({},ti.x0,{impliedEdits:{xtype:"scaled"}}),dx:Hn({},ti.dx,{impliedEdits:{xtype:"scaled"}}),y:Hn({},ti.y,{impliedEdits:{ytype:"array"}}),y0:Hn({},ti.y0,{impliedEdits:{ytype:"scaled"}}),dy:Hn({},ti.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Hn({},ti.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Hn({},ti.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Hn({},ti.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Hn({},ti.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Hn({},ti.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Hn({},ti.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:zw("x"),yhoverformat:zw("y"),zhoverformat:zw("z",1),hovertemplate:y5e(),texttemplate:m5e({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:p5e({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Hn({},d5e.showlegend,{dflt:!1}),zorder:ti.zorder},g5e("",{cLetter:"z",autoColorDflt:!1}))});var Iw=N((aNe,qY)=>{"use strict";var b5e=Pr(),ig=Ee(),x5e=gr();qY.exports=function(r,t,a,n,i,o){var l=a("z");i=i||"x",o=o||"y";var s,u;if(l===void 0||!l.length)return 0;if(ig.isArray1D(l)){s=a(i),u=a(o);var f=ig.minRowLength(s),c=ig.minRowLength(u);if(f===0||c===0)return 0;t._length=Math.min(f,c,l.length)}else{if(s=SY(i,a),u=SY(o,a),!_5e(l))return 0;a("transpose"),t._length=null}var v=x5e.getComponentMethod("calendars","handleTraceDefaults");return v(r,t,[i,o],n),!0};function SY(e,r){var t=r(e),a=t?r(e+"type","array"):"scaled";return a==="scaled"&&(r(e+"0"),r("d"+e)),t}function _5e(e){for(var r=!0,t=!1,a=!1,n,i=0;i0&&(t=!0);for(var o=0;o{"use strict";var LY=Ee();CY.exports=function(r,t){r("texttemplate");var a=LY.extendFlat({},t.font,{color:"auto",size:"auto"});LY.coerceFont(r,"textfont",a)}});var Ow=N((iNe,EY)=>{"use strict";EY.exports=function(r,t,a){var n=a("zsmooth");n===!1&&(a("xgap"),a("ygap")),a("zhoverformat")}});var RY=N((oNe,PY)=>{"use strict";var DY=Ee(),w5e=Iw(),T5e=S0(),A5e=dc(),M5e=Ow(),k5e=ul(),S5e=k0();PY.exports=function(r,t,a,n){function i(l,s){return DY.coerce(r,t,S5e,l,s)}var o=w5e(r,t,i,n);if(!o){t.visible=!1;return}A5e(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),T5e(i,n),M5e(r,t,i,n),i("hoverongaps"),i("connectgaps",DY.isArray1D(t.z)&&t.zsmooth!==!1),k5e(r,t,n,i,{prefix:"",cLetter:"z"}),i("zorder")}});var Bw=N((lNe,FY)=>{"use strict";var Hc=Pr();FY.exports={count:function(e,r,t){return t[e]++,1},sum:function(e,r,t,a){var n=a[r];return Hc(n)?(n=Number(n),t[e]+=n,n):0},avg:function(e,r,t,a,n){var i=a[r];return Hc(i)&&(i=Number(i),t[e]+=i,n[e]++),0},min:function(e,r,t,a){var n=a[r];if(Hc(n))if(n=Number(n),Hc(t[e])){if(t[e]>n){var i=n-t[e];return t[e]=n,i}}else return t[e]=n,n;return 0},max:function(e,r,t,a){var n=a[r];if(Hc(n))if(n=Number(n),Hc(t[e])){if(t[e]{"use strict";NY.exports={percent:function(e,r){for(var t=e.length,a=100/r,n=0;n{"use strict";zY.exports=function(r,t){for(var a=r.length,n=0,i=0;i{"use strict";var Uc=Ft(),Hu=Uc.ONEAVGYEAR,IY=Uc.ONEAVGMONTH,lg=Uc.ONEDAY,OY=Uc.ONEHOUR,BY=Uc.ONEMIN,HY=Uc.ONESEC,UY=Or().tickIncrement;VY.exports=function(r,t,a,n,i){var o=-1.1*t,l=-.1*t,s=r-l,u=a[0],f=a[1],c=Math.min(og(u+l,u+s,n,i),og(f+l,f+s,n,i)),v=Math.min(og(u+o,u+l,n,i),og(f+o,f+l,n,i)),d,p;if(c>v&&vlg){var m=d===Hu?1:6,y=d===Hu?"M12":"M1";return function(x,_){var w=n.c2d(x,Hu,i),b=w.indexOf("-",m);b>0&&(w=w.substr(0,b));var T=n.d2c(w,0,i);if(THY?e>lg?e>Hu*1.1?Hu:e>IY*1.1?IY:lg:e>OY?OY:e>BY?BY:HY:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function q5e(e,r,t,a,n,i){if(a&&e>lg){var o=YY(r,n,i),l=YY(t,n,i),s=e===Hu?0:1;return o[s]!==l[s]}return Math.floor(t/e)-Math.floor(r/e)>.1}function YY(e,r,t){var a=r.c2d(e,Hu,t).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}});var Ww=N((cNe,ZY)=>{"use strict";var Yw=Pr(),vn=Ee(),WY=gr(),Di=Or(),L5e=$m(),jY=Bw(),C5e=Hw(),E5e=Uw(),D5e=Gw();function P5e(e,r){var t=[],a=[],n=r.orientation==="h",i=Di.getFromId(e,n?r.yaxis:r.xaxis),o=n?"y":"x",l={x:"y",y:"x"}[o],s=r[o+"calendar"],u=r.cumulative,f,c=Vw(e,r,i,o),v=c[0],d=c[1],p=typeof v.size=="string",m=[],y=p?m:v,x=[],_=[],w=[],b=0,T=r.histnorm,k=r.histfunc,M=T.indexOf("density")!==-1,S,E,P;u.enabled&&M&&(T=T.replace(/ ?density$/,""),M=!1);var R=k==="max"||k==="min",D=R?null:0,z=jY.count,O=C5e[T],H=!1,Y=function(W){return i.r2c(W,0,s)},G;for(vn.isArrayOrTypedArray(r[l])&&k!=="count"&&(G=r[l],H=k==="avg",z=jY[k]),f=Y(v.start),E=Y(v.end)+(f-Di.tickIncrement(f,v.size,!1,s))/1e6;f=0&&P=ye;f--)if(a[f]){ue=f;break}for(f=ye;f<=ue;f++)if(Yw(t[f])&&Yw(a[f])){var de={p:t[f],s:a[f],b:0};u.enabled||(de.pts=w[f],Z?de.ph0=de.ph1=w[f].length?d[w[f][0]]:t[f]:(r._computePh=!0,de.ph0=K(m[f]),de.ph1=K(m[f+1],!0))),oe.push(de)}return oe.length===1&&(oe[0].width1=Di.tickIncrement(oe[0].p,v.size,!1,s)-oe[0].p),L5e(oe,r),vn.isArrayOrTypedArray(r.selectedpoints)&&vn.tagSelected(oe,r,le),oe}function Vw(e,r,t,a,n){var i=a+"bins",o=e._fullLayout,l=r["_"+a+"bingroup"],s=o._histogramBinOpts[l],u=o.barmode==="overlay",f,c,v,d,p,m,y,x=function(ie){return t.r2c(ie,0,d)},_=function(ie){return t.c2r(ie,0,d)},w=t.type==="date"?function(ie){return ie||ie===0?vn.cleanDate(ie,null,d):null}:function(ie){return Yw(ie)?Number(ie):null};function b(ie,K,he){K[ie+"Found"]?(K[ie]=w(K[ie]),K[ie]===null&&(K[ie]=he[ie])):(m[ie]=K[ie]=he[ie],vn.nestedProperty(c[0],i+"."+ie).set(he[ie]))}if(r["_"+a+"autoBinFinished"])delete r["_"+a+"autoBinFinished"];else{c=s.traces;var T=[],k=!0,M=!1,S=!1;for(f=0;ft.r2l(G)&&(V=Di.tickIncrement(V,s.size,!0,d)),z.start=t.l2r(V),Y||vn.nestedProperty(r,i+".start").set(z.start)}var X=s.end,Z=t.r2l(D.end),te=Z!==void 0;if((s.endFound||te)&&Z!==t.r2l(X)){var fe=te?Z:vn.aggNums(Math.max,null,p);z.end=t.l2r(fe),te||vn.nestedProperty(r,i+".start").set(z.end)}var le="autobin"+a;return r._input[le]===!1&&(r._input[i]=vn.extendFlat({},r[i]||{}),delete r._input[le],delete r[le]),[z,p]}function R5e(e,r,t,a,n){var i=e._fullLayout,o=F5e(e,r),l=!1,s=1/0,u=[r],f,c,v;for(f=0;f=0;a--)l(a);else if(r==="increasing"){for(a=1;a=0;a--)e[a]+=e[a+1];t==="exclude"&&(e.push(0),e.shift())}}ZY.exports={calc:P5e,calcAllAutoBins:Vw}});var tV=N((vNe,rV)=>{"use strict";var XY=Ee(),Gc=Or(),JY=Bw(),z5e=Hw(),I5e=Uw(),O5e=Gw(),$Y=Ww().calcAllAutoBins;rV.exports=function(r,t){var a=Gc.getFromId(r,t.xaxis),n=Gc.getFromId(r,t.yaxis),i=t.xcalendar,o=t.ycalendar,l=function(Le){return a.r2c(Le,0,i)},s=function(Le){return n.r2c(Le,0,o)},u=function(Le){return a.c2r(Le,0,i)},f=function(Le){return n.c2r(Le,0,o)},c,v,d,p,m=$Y(r,t,a,"x"),y=m[0],x=m[1],_=$Y(r,t,n,"y"),w=_[0],b=_[1],T=t._length;x.length>T&&x.splice(T,x.length-T),b.length>T&&b.splice(T,b.length-T);var k=[],M=[],S=[],E=typeof y.size=="string",P=typeof w.size=="string",R=[],D=[],z=E?R:y,O=P?D:w,H=0,Y=[],G=[],B=t.histnorm,V=t.histfunc,X=B.indexOf("density")!==-1,Z=V==="max"||V==="min",te=Z?null:0,fe=JY.count,le=z5e[B],ie=!1,K=[],he=[],oe="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";oe&&V!=="count"&&(ie=V==="avg",fe=JY[V]);var ye=y.size,ue=l(y.start),de=l(y.end)+(ue-Gc.tickIncrement(ue,ye,!1,i))/1e6;for(c=ue;c=0&&d=0&&p{"use strict";var Uo=Ee(),aV=Ft().BADNUM,nV=yc();iV.exports=function(r,t,a,n,i,o){var l=r._length,s=t.makeCalcdata(r,n),u=a.makeCalcdata(r,i);s=nV(r,t,n,s).vals,u=nV(r,a,i,u).vals;var f=r.text,c=f!==void 0&&Uo.isArray1D(f),v=r.hovertext,d=v!==void 0&&Uo.isArray1D(v),p,m,y=Uo.distinctVals(s),x=y.vals,_=Uo.distinctVals(u),w=_.vals,b=[],T,k,M=w.length,S=x.length;for(p=0;p{"use strict";var B5e=Pr(),H5e=Ee(),sg=Ft().BADNUM;lV.exports=function(r,t,a,n){var i,o,l,s,u,f;function c(x){if(B5e(x))return+x}if(t&&t.transpose){for(i=0,u=0;u{"use strict";var U5e=Ee(),uV=.01,G5e=[[-1,0],[1,0],[0,-1],[0,1]];function Y5e(e){return .5-.25*Math.min(1,e*.5)}cV.exports=function(r,t){var a=1,n;for(fV(r,t),n=0;nuV;n++)a=fV(r,t,Y5e(a));return a>uV&&U5e.log("interp2d didn't converge quickly",a),r};function fV(e,r,t){var a=0,n,i,o,l,s,u,f,c,v,d,p,m,y;for(l=0;lm&&(a=Math.max(a,Math.abs(e[i][o]-p)/(y-m))))}return a}});var dV=N((yNe,hV)=>{"use strict";var V5e=Ee().maxRowLength;hV.exports=function(r){var t=[],a={},n=[],i=r[0],o=[],l=[0,0,0],s=V5e(r),u,f,c,v,d,p,m,y;for(f=0;f=0;d--)v=n[d],f=v[0],c=v[1],p=((a[[f-1,c]]||l)[2]+(a[[f+1,c]]||l)[2]+(a[[f,c-1]]||l)[2]+(a[[f,c+1]]||l)[2])/20,p&&(m[v]=[f,c,p],n.splice(d,1),y=!0);if(!y)throw"findEmpties iterated with no new neighbors";for(v in m)a[v]=m[v],t.push(m[v])}return t.sort(function(x,_){return _[2]-x[2]})}});var gV=N((mNe,mV)=>{"use strict";var pV=gr(),yV=Ee().isArrayOrTypedArray;mV.exports=function(r,t,a,n,i,o){var l=[],s=pV.traceIs(r,"contour"),u=pV.traceIs(r,"histogram"),f,c,v,d=yV(t)&&t.length>1;if(d&&!u&&o.type!=="category"){var p=t.length;if(p<=i){if(s)l=Array.from(t).slice(0,i);else if(i===1)o.type==="log"?l=[.5*t[0],2*t[0]]:l=[t[0]-.5,t[0]+.5];else if(o.type==="log"){for(l=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],v=1;v{"use strict";var bV=gr(),jw=Ee(),ug=Or(),xV=yc(),W5e=tV(),j5e=oh(),Z5e=oV(),X5e=sV(),J5e=vV(),$5e=dV(),fg=gV(),Zw=Ft().BADNUM;wV.exports=function(r,t){var a=ug.getFromId(r,t.xaxis||"x"),n=ug.getFromId(r,t.yaxis||"y"),i=bV.traceIs(t,"contour"),o=bV.traceIs(t,"histogram"),l=i?"best":t.zsmooth,s,u,f,c,v,d,p,m,y,x,_;if(a._minDtick=0,n._minDtick=0,o)_=W5e(r,t),c=_.orig_x,s=_.x,u=_.x0,f=_.dx,m=_.orig_y,v=_.y,d=_.y0,p=_.dy,y=_.z;else{var w=t.z;jw.isArray1D(w)?(Z5e(t,a,n,"x","y",["z"]),s=t._x,v=t._y,w=t._z):(c=t.x?a.makeCalcdata(t,"x"):[],m=t.y?n.makeCalcdata(t,"y"):[],s=xV(t,a,"x",c).vals,v=xV(t,n,"y",m).vals,t._x=s,t._y=v),u=t.x0,f=t.dx,d=t.y0,p=t.dy,y=X5e(w,t,a,n)}(a.rangebreaks||n.rangebreaks)&&(y=K5e(s,v,y),o||(s=_V(s),v=_V(v),t._x=s,t._y=v)),!o&&(i||t.connectgaps)&&(t._emptypoints=$5e(y),J5e(y,t._emptypoints));function b(z){l=t._input.zsmooth=t.zsmooth=!1,jw.warn('cannot use zsmooth: "fast": '+z)}function T(z){if(z.length>1){var O=(z[z.length-1]-z[0])/(z.length-1),H=Math.abs(O/100);for(x=0;xH)return!1}return!0}t._islinear=!1,a.type==="log"||n.type==="log"?l==="fast"&&b("log axis found"):T(s)?T(v)?t._islinear=!0:l==="fast"&&b("y scale is not linear"):l==="fast"&&b("x scale is not linear");var k=jw.maxRowLength(y),M=t.xtype==="scaled"?"":s,S=fg(t,M,u,f,k,a),E=t.ytype==="scaled"?"":v,P=fg(t,E,d,p,y.length,n);t._extremes[a._id]=ug.findExtremes(a,S),t._extremes[n._id]=ug.findExtremes(n,P);var R={x:S,y:P,z:y,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(t.xperiodalignment&&c&&(R.orig_x=c),t.yperiodalignment&&m&&(R.orig_y=m),M&&M.length===S.length-1&&(R.xCenter=M),E&&E.length===P.length-1&&(R.yCenter=E),o&&(R.xRanges=_.xRanges,R.yRanges=_.yRanges,R.pts=_.pts),i||j5e(r,t,{vals:y,cLetter:"z"}),i&&t.contours&&t.contours.coloring==="heatmap"){var D={type:t.type==="contour"?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};R.xfill=fg(D,M,u,f,k,a),R.yfill=fg(D,E,d,p,y.length,n)}return[R]};function _V(e){for(var r=[],t=e.length,a=0;a{"use strict";vg.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"]];vg.STYLE=vg.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var Xw=N((xNe,MV)=>{"use strict";var TV=hg(),Q5e=jr(),AV=Ee(),Yc=null;function e_e(){if(Yc!==null)return Yc;Yc=!1;var e=AV.isSafari()||AV.isIOS();if(window.navigator.userAgent&&!e){var r=Array.from(TV.CSS_DECLARATIONS).reverse(),t=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof t=="function")Yc=r.some(function(o){return t.apply(null,o)});else{var a=Q5e.tester.append("image").attr("style",TV.STYLE),n=window.getComputedStyle(a.node()),i=n.imageRendering;Yc=r.some(function(o){var l=o[1];return i===l||i===l.toLowerCase()}),a.remove()}}return Yc}MV.exports=e_e});var dg=N((_Ne,RV)=>{"use strict";var kV=Sr(),r_e=Sn(),t_e=gr(),a_e=jr(),n_e=Or(),Pi=Ee(),SV=Ea(),i_e=o4(),o_e=Tr(),l_e=So().extractOpts,s_e=So().makeColorScaleFuncFromTrace,u_e=ll(),f_e=Xa(),Jw=f_e.LINE_SPACING,c_e=Xw(),v_e=hg().STYLE,DV="heatmap-label";function PV(e){return e.selectAll("g."+DV)}function qV(e){PV(e).remove()}RV.exports=function(e,r,t,a){var n=r.xaxis,i=r.yaxis;Pi.makeTraceGroups(a,t,"hm").each(function(o){var l=kV.select(this),s=o[0],u=s.trace,f=u.xgap||0,c=u.ygap||0,v=s.z,d=s.x,p=s.y,m=s.xCenter,y=s.yCenter,x=t_e.traceIs(u,"contour"),_=x?"best":u.zsmooth,w=v.length,b=Pi.maxRowLength(v),T=!1,k=!1,M,S,E,P,R,D,z,O;for(D=0;M===void 0&&D0;)S=n.c2p(d[D]),D--;for(S0;)R=i.c2p(p[D]),D--;R=n._length||S<=0||P>=i._length||R<=0;if(V){var X=l.selectAll("image").data([]);X.exit().remove(),qV(l);return}var Z,te;H==="fast"?(Z=b,te=w):(Z=G,te=B);var fe=document.createElement("canvas");fe.width=Z,fe.height=te;var le=fe.getContext("2d",{willReadFrequently:!0}),ie=s_e(u,{noNumericCheck:!0,returnArray:!0}),K,he;H==="fast"?(K=T?function(vt){return b-1-vt}:Pi.identity,he=k?function(vt){return w-1-vt}:Pi.identity):(K=function(vt){return Pi.constrain(Math.round(n.c2p(d[vt])-M),0,G)},he=function(vt){return Pi.constrain(Math.round(i.c2p(p[vt])-P),0,B)});var oe=he(0),ye=[oe,oe],ue=T?0:1,de=k?0:1,W=0,Q=0,j=0,pe=0,me,we,Ne,Fe,Re;function Ie(vt,An){if(vt!==void 0){var Rt=ie(vt);return Rt[0]=Math.round(Rt[0]),Rt[1]=Math.round(Rt[1]),Rt[2]=Math.round(Rt[2]),W+=An,Q+=Rt[0]*An,j+=Rt[1]*An,pe+=Rt[2]*An,Rt}return[0,0,0,0]}function Be(vt,An,Rt,zs){var pn=vt[Rt.bin0];if(pn===void 0)return Ie(void 0,1);var Gi=vt[Rt.bin1],Ut=An[Rt.bin0],Yi=An[Rt.bin1],Pl=Gi-pn||0,Rl=Ut-pn||0,yr;return Gi===void 0?Yi===void 0?yr=0:Ut===void 0?yr=2*(Yi-pn):yr=(2*Yi-Ut-pn)*2/3:Yi===void 0?Ut===void 0?yr=0:yr=(2*pn-Gi-Ut)*2/3:Ut===void 0?yr=(2*Yi-Gi-pn)*2/3:yr=Yi+pn-Gi-Ut,Ie(pn+Rt.frac*Pl+zs.frac*(Rl+Rt.frac*yr))}if(H!=="default"){var ze=0,Pe;try{Pe=new Uint8Array(Z*te*4)}catch(vt){Pe=new Array(Z*te*4)}if(H==="smooth"){var Xe=m||d,Ue=y||p,se=new Array(Xe.length),Te=new Array(Ue.length),Se=new Array(G),ir=m?CV:LV,Qe=y?CV:LV,Le,Ce,Ge;for(D=0;DEt||Et>i._length))for(z=Ar;zma||ma>n._length)){var St=i_e({x:Dt,y:zr},u,e._fullLayout);St.x=Dt,St.y=zr;var ja=s.z[D][z];ja===void 0?(St.z="",St.zLabel=""):(St.z=ja,St.zLabel=n_e.tickText(De,ja,"hover").text);var ga=s.text&&s.text[D]&&s.text[D][z];(ga===void 0||ga===!1)&&(ga=""),St.text=ga;var jt=Pi.texttemplateString(ne,St,e._fullLayout._d3locale,St,u._meta||{});if(jt){var Na=jt.split("
"),br=Na.length,pt=0;for(O=0;O{"use strict";FV.exports={min:"zmin",max:"zmax"}});var pg=N((TNe,NV)=>{"use strict";var h_e=Sr();NV.exports=function(r){h_e.select(r).selectAll(".hm image").style("opacity",function(t){return t.trace.opacity})}});var mg=N((ANe,IV)=>{"use strict";var zV=Fn(),q0=Ee(),yg=q0.isArrayOrTypedArray,d_e=Or(),p_e=So().extractOpts;IV.exports=function(r,t,a,n,i){i||(i={});var o=i.isContour,l=r.cd[0],s=l.trace,u=r.xa,f=r.ya,c=l.x,v=l.y,d=l.z,p=l.xCenter,m=l.yCenter,y=l.zmask,x=s.zhoverformat,_=c,w=v,b,T,k,M;if(r.index!==!1){try{k=Math.round(r.index[1]),M=Math.round(r.index[0])}catch(X){q0.error("Error hovering on heatmap, pointNumber must be [row,col], found:",r.index);return}if(k<0||k>=d[0].length||M<0||M>d.length)return}else{if(zV.inbox(t-c[0],t-c[c.length-1],0)>0||zV.inbox(a-v[0],a-v[v.length-1],0)>0)return;if(o){var S;for(_=[2*c[0]-c[1]],S=1;S{"use strict";OV.exports={attributes:k0(),supplyDefaults:RY(),calc:cg(),plot:dg(),colorbar:$w(),style:pg(),hoverPoints:mg(),moduleType:"trace",name:"heatmap",basePlotModule:qi(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var UV=N((kNe,HV)=>{"use strict";HV.exports=BV()});var Kw=N((SNe,GV)=>{"use strict";GV.exports=function(r,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var VV=N((qNe,YV)=>{"use strict";YV.exports={eventDataKeys:["binNumber"]}});var gg=N((LNe,ZV)=>{"use strict";var Un=Nu(),WV=Qi().axisHoverFormat,y_e=La().hovertemplateAttrs,m_e=La().texttemplateAttrs,Qw=fa(),jV=Kw(),g_e=VV(),e6=bt().extendFlat;ZV.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:WV("x"),yhoverformat:WV("y"),text:e6({},Un.text,{}),hovertext:e6({},Un.hovertext,{}),orientation:Un.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:jV("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:jV("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:y_e({},{keys:g_e.eventDataKeys}),texttemplate:m_e({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:e6({},Un.textposition,{arrayOk:!1}),textfont:Qw({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:Qw({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:Qw({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Un.insidetextanchor,textangle:Un.textangle,cliponaxis:Un.cliponaxis,constraintext:Un.constraintext,marker:Un.marker,offsetgroup:Un.offsetgroup,alignmentgroup:Un.alignmentgroup,selected:Un.selected,unselected:Un.unselected,zorder:Un.zorder}});var KV=N((CNe,$V)=>{"use strict";var XV=gr(),L0=Ee(),JV=Tr(),b_e=zu().handleText,x_e=dw(),__e=gg();$V.exports=function(r,t,a,n){function i(_,w){return L0.coerce(r,t,__e,_,w)}var o=i("x"),l=i("y"),s=i("cumulative.enabled");s&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");b_e(r,t,n,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat");var f=i("orientation",l&&!o?"h":"v"),c=f==="v"?"x":"y",v=f==="v"?"y":"x",d=o&&l?Math.min(L0.minRowLength(o)&&L0.minRowLength(l)):L0.minRowLength(t[c]||[]);if(!d){t.visible=!1;return}t._length=d;var p=XV.getComponentMethod("calendars","handleTraceDefaults");p(r,t,["x","y"],n);var m=t[v];m&&i("histfunc"),i("histnorm"),i("autobin"+c),x_e(r,t,i,a,n),L0.coerceSelectionMarkerOpacity(t,i);var y=(t.marker.line||{}).color,x=XV.getComponentMethod("errorbars","supplyDefaults");x(r,t,y||JV.defaultLine,{axis:"y"}),x(r,t,y||JV.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var xg=N((ENe,rW)=>{"use strict";var C0=Ee(),w_e=va(),bg=gr().traceIs,T_e=e0(),A_e=zu().validateCornerradius,QV=C0.nestedProperty,r6=Tu().getAxisGroup,eW=[{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"}],M_e=["x","y"];rW.exports=function(r,t){var a=t._histogramBinOpts={},n=[],i={},o=[],l,s,u,f,c,v,d;function p(H,Y){return C0.coerce(l._input,l,l._module.attributes,H,Y)}function m(H){return H.orientation==="v"?"x":"y"}function y(H,Y){var G=w_e.getFromTrace({_fullLayout:t},H,Y);return G.type}function x(H,Y,G){var B=H.uid+"__"+G;Y||(Y=B);var V=y(H,G),X=H[G+"calendar"]||"",Z=a[Y],te=!0;Z&&(V===Z.axType&&X===Z.calendar?(te=!1,Z.traces.push(H),Z.dirs.push(G)):(Y=B,V!==Z.axType&&C0.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+V,"axis","with bins on","type:"+Z.axType,"axis."].join(" ")),X!==Z.calendar&&C0.warn(["Attempted to group the bins of trace",H.index,"set with a",X,"calendar","with bins",Z.calendar?"on a "+Z.calendar+" calendar":"w/o a set calendar"].join(" ")))),te&&(a[Y]={traces:[H],dirs:[G],axType:V,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=Y}for(c=0;c{"use strict";var k_e=ww().hoverPoints,S_e=Or().hoverLabelText;tW.exports=function(r,t,a,n,i){var o=k_e(r,t,a,n,i);if(o){r=o[0];var l=r.cd[r.index],s=r.cd[0].trace;if(!s.cumulative.enabled){var u=s.orientation==="h"?"y":"x";r[u+"Label"]=S_e(r[u+"a"],[l.ph0,l.ph1],s[u+"hoverformat"])}return o}}});var t6=N((PNe,nW)=>{"use strict";nW.exports=function(r,t,a,n,i){if(r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(r.z=t.zLabelVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;r.pointNumbers=o,r.binNumber=r.pointNumber,delete r.pointNumber,delete r.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s{"use strict";iW.exports={attributes:gg(),layoutAttributes:Xm(),supplyDefaults:KV(),crossTraceDefaults:xg(),supplyLayoutDefaults:pw(),calc:Ww().calc,crossTraceCalc:fm().crossTraceCalc,plot:xw().plot,layerName:"barlayer",style:zc().style,styleOnSelect:zc().styleOnSelect,colorbar:i0(),hoverPoints:aW(),selectPoints:Tw(),eventData:t6(),moduleType:"trace",name:"histogram",basePlotModule:qi(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var sW=N((FNe,lW)=>{"use strict";lW.exports=oW()});var wg=N((NNe,fW)=>{"use strict";var yo=gg(),uW=Kw(),_g=k0(),q_e=mn(),a6=Qi().axisHoverFormat,L_e=La().hovertemplateAttrs,C_e=La().texttemplateAttrs,E_e=ko(),E0=bt().extendFlat;fW.exports=E0({x:yo.x,y:yo.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:yo.histnorm,histfunc:yo.histfunc,nbinsx:yo.nbinsx,xbins:uW("x"),nbinsy:yo.nbinsy,ybins:uW("y"),autobinx:yo.autobinx,autobiny:yo.autobiny,bingroup:E0({},yo.bingroup,{}),xbingroup:E0({},yo.bingroup,{}),ybingroup:E0({},yo.bingroup,{}),xgap:_g.xgap,ygap:_g.ygap,zsmooth:_g.zsmooth,xhoverformat:a6("x"),yhoverformat:a6("y"),zhoverformat:a6("z",1),hovertemplate:L_e({},{keys:"z"}),texttemplate:C_e({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:_g.textfont,showlegend:E0({},q_e.showlegend,{dflt:!1})},E_e("",{cLetter:"z",autoColorDflt:!1}))});var n6=N((zNe,vW)=>{"use strict";var D_e=gr(),cW=Ee();vW.exports=function(r,t,a,n){var i=a("x"),o=a("y"),l=cW.minRowLength(i),s=cW.minRowLength(o);if(!l||!s){t.visible=!1;return}t._length=Math.min(l,s);var u=D_e.getComponentMethod("calendars","handleTraceDefaults");u(r,t,["x","y"],n);var f=a("z")||a("marker.color");f&&a("histfunc"),a("histnorm"),a("autobinx"),a("autobiny")}});var dW=N((INe,hW)=>{"use strict";var P_e=Ee(),R_e=n6(),F_e=Ow(),N_e=ul(),z_e=S0(),I_e=wg();hW.exports=function(r,t,a,n){function i(o,l){return P_e.coerce(r,t,I_e,o,l)}R_e(r,t,i,n),t.visible!==!1&&(F_e(r,t,i,n),N_e(r,t,n,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),z_e(i,n),i("xhoverformat"),i("yhoverformat"))}});var mW=N((ONe,yW)=>{"use strict";var O_e=mg(),pW=Or().hoverLabelText;yW.exports=function(r,t,a,n,i){var o=O_e(r,t,a,n,i);if(o){r=o[0];var l=r.index,s=l[0],u=l[1],f=r.cd[0],c=f.trace,v=f.xRanges[u],d=f.yRanges[s];return r.xLabel=pW(r.xa,[v[0],v[1]],c.xhoverformat),r.yLabel=pW(r.ya,[d[0],d[1]],c.yhoverformat),o}}});var bW=N((BNe,gW)=>{"use strict";gW.exports={attributes:wg(),supplyDefaults:dW(),crossTraceDefaults:xg(),calc:cg(),plot:dg(),layerName:"heatmaplayer",colorbar:$w(),style:pg(),hoverPoints:mW(),eventData:t6(),moduleType:"trace",name:"histogram2d",basePlotModule:qi(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var _W=N((HNe,xW)=>{"use strict";xW.exports=bW()});var Tg=N((UNe,wW)=>{"use strict";wW.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var Mg=N((GNe,kW)=>{"use strict";var pa=k0(),Ag=wi(),AW=Qi(),i6=AW.axisHoverFormat,B_e=AW.descriptionOnlyNumbers,H_e=ko(),U_e=si().dash,G_e=fa(),Vc=bt().extendFlat,MW=Tg(),Y_e=MW.COMPARISON_OPS2,V_e=MW.INTERVAL_OPS,TW=Ag.line;kW.exports=Vc({z:pa.z,x:pa.x,x0:pa.x0,dx:pa.dx,y:pa.y,y0:pa.y0,dy:pa.dy,xperiod:pa.xperiod,yperiod:pa.yperiod,xperiod0:Ag.xperiod0,yperiod0:Ag.yperiod0,xperiodalignment:pa.xperiodalignment,yperiodalignment:pa.yperiodalignment,text:pa.text,hovertext:pa.hovertext,transpose:pa.transpose,xtype:pa.xtype,ytype:pa.ytype,xhoverformat:i6("x"),yhoverformat:i6("y"),zhoverformat:i6("z",1),hovertemplate:pa.hovertemplate,texttemplate:Vc({},pa.texttemplate,{}),textfont:Vc({},pa.textfont,{}),hoverongaps:pa.hoverongaps,connectgaps:Vc({},pa.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:G_e({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:B_e("contour label")},operation:{valType:"enumerated",values:[].concat(Y_e).concat(V_e),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Vc({},TW.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:U_e,smoothing:Vc({},TW.smoothing,{}),editType:"plot"},zorder:Ag.zorder},H_e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var l6=N((YNe,qW)=>{"use strict";var hn=wg(),Tl=Mg(),W_e=ko(),o6=Qi().axisHoverFormat,SW=bt().extendFlat;qW.exports=SW({x:hn.x,y:hn.y,z:hn.z,marker:hn.marker,histnorm:hn.histnorm,histfunc:hn.histfunc,nbinsx:hn.nbinsx,xbins:hn.xbins,nbinsy:hn.nbinsy,ybins:hn.ybins,autobinx:hn.autobinx,autobiny:hn.autobiny,bingroup:hn.bingroup,xbingroup:hn.xbingroup,ybingroup:hn.ybingroup,autocontour:Tl.autocontour,ncontours:Tl.ncontours,contours:Tl.contours,line:{color:Tl.line.color,width:SW({},Tl.line.width,{dflt:.5}),dash:Tl.line.dash,smoothing:Tl.line.smoothing,editType:"plot"},xhoverformat:o6("x"),yhoverformat:o6("y"),zhoverformat:o6("z",1),hovertemplate:hn.hovertemplate,texttemplate:Tl.texttemplate,textfont:Tl.textfont},W_e("",{cLetter:"z",editTypeOverride:"calc"}))});var s6=N((VNe,LW)=>{"use strict";LW.exports=function(r,t,a,n){var i=n("contours.start"),o=n("contours.end"),l=i===!1||o===!1,s=a("contours.size"),u;l?u=t.autocontour=!0:u=a("autocontour",!1),(u||!s)&&a("ncontours")}});var u6=N((WNe,CW)=>{"use strict";var j_e=Ee();CW.exports=function(r,t,a,n){n||(n={});var i=r("contours.showlabels");if(i){var o=t.font;j_e.coerceFont(r,"contours.labelfont",o,{overrideDflt:{color:a}}),r("contours.labelformat")}n.hasHover!==!1&&r("zhoverformat")}});var f6=N((jNe,EW)=>{"use strict";var Z_e=ul(),X_e=u6();EW.exports=function(r,t,a,n,i){var o=a("contours.coloring"),l,s="";o==="fill"&&(l=a("contours.showlines")),l!==!1&&(o!=="lines"&&(s=a("line.color","#000")),a("line.width",.5),a("line.dash")),o!=="none"&&(r.showlegend!==!0&&(t.showlegend=!1),t._dfltShowLegend=!1,Z_e(r,t,n,a,{prefix:"",cLetter:"z"})),a("line.smoothing"),X_e(a,n,s,i)}});var FW=N((ZNe,RW)=>{"use strict";var DW=Ee(),J_e=n6(),$_e=s6(),K_e=f6(),Q_e=S0(),PW=l6();RW.exports=function(r,t,a,n){function i(l,s){return DW.coerce(r,t,PW,l,s)}function o(l){return DW.coerce2(r,t,PW,l)}J_e(r,t,i,n),t.visible!==!1&&($_e(r,t,i,o),K_e(r,t,i,n),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),t.contours&&t.contours.coloring==="heatmap"&&Q_e(i,n))}});var IW=N((XNe,zW)=>{"use strict";var v6=Or(),c6=Ee();zW.exports=function(r,t){var a=r.contours;if(r.autocontour){var n=r.zmin,i=r.zmax;(r.zauto||n===void 0)&&(n=c6.aggNums(Math.min,null,t)),(r.zauto||i===void 0)&&(i=c6.aggNums(Math.max,null,t));var o=NW(n,i,r.ncontours);a.size=o.dtick,a.start=v6.tickFirst(o),o.range.reverse(),a.end=v6.tickFirst(o),a.start===n&&(a.start+=a.size),a.end===i&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),r._input.contours||(r._input.contours={}),c6.extendFlat(r._input.contours,{start:a.start,end:a.end,size:a.size}),r._input.autocontour=!0}else if(a.type!=="constraint"){var l=a.start,s=a.end,u=r._input.contours;if(l>s&&(a.start=u.start=s,s=a.end=u.end=l,l=a.start),!(a.size>0)){var f;l===s?f=1:f=NW(l,s,r.ncontours).dtick,u.size=a.size=f}}};function NW(e,r,t){var a={type:"linear",range:[e,r]};return v6.autoTicks(a,(r-e)/(t||15)),a}});var D0=N((JNe,OW)=>{"use strict";OW.exports=function(r){return r.end+r.size/1e6}});var h6=N(($Ne,HW)=>{"use strict";var BW=So(),e4e=cg(),r4e=IW(),t4e=D0();HW.exports=function(r,t){var a=e4e(r,t),n=a[0].z;r4e(t,n);var i=t.contours,o=BW.extractOpts(t),l;if(i.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var s=i.start,u=t4e(i),f=i.size||1,c=Math.floor((u-s)/f)+1;isFinite(f)||(f=1,c=1);var v=s-f/2,d=v+c*f;l=[v,d]}else l=n;return BW.calc(r,t,{vals:l,cLetter:"z"}),a}});var kg=N((KNe,UW)=>{"use strict";UW.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 YW=N((QNe,GW)=>{"use strict";var Sg=kg();GW.exports=function(r){var t=r[0].z,a=t.length,n=t[0].length,i=a===2||n===2,o,l,s,u,f,c,v,d,p;for(l=0;le?0:1)+(r[0][1]>e?0:2)+(r[1][1]>e?0:4)+(r[1][0]>e?0:8);if(t===5||t===10){var a=(r[0][0]+r[0][1]+r[1][0]+r[1][1])/4;return e>a?t===5?713:1114:t===5?104:208}return t===15?0:t}});var ZW=N((eze,jW)=>{"use strict";var qg=Ee(),Wc=kg();jW.exports=function(r,t,a){var n,i,o,l,s;for(t=t||.01,a=a||.01,o=0;o20?(o=Wc.CHOOSESADDLE[o][(l[0]||l[1])<0?0:1],e.crossings[i]=Wc.SADDLEREMAINDER[o]):delete e.crossings[i],l=Wc.NEWDELTA[o],!l){qg.log("Found bad marching index:",o,r,e.level);break}s.push(WW(e,r,l)),r[0]+=l[0],r[1]+=l[1],i=r.join(","),P0(s[s.length-1],s[s.length-2],a,n)&&s.pop();var p=l[0]&&(r[0]<0||r[0]>f-2)||l[1]&&(r[1]<0||r[1]>u-2),m=r[0]===c[0]&&r[1]===c[1]&&l[0]===v[0]&&l[1]===v[1];if(m||t&&p)break;o=e.crossings[i]}d===1e4&&qg.log("Infinite loop in contour?");var y=P0(s[0],s[s.length-1],a,n),x=0,_=.2*e.smoothing,w=[],b=0,T,k,M,S,E,P,R,D,z,O,H;for(d=1;d=b;d--)if(T=w[d],T=b&&T+w[k]D&&z--,e.edgepaths[z]=H.concat(s,O));break}V||(e.edgepaths[D]=s.concat(O))}for(D=0;D20&&r?e===208||e===1114?a=t[0]===0?1:-1:n=t[1]===0?1:-1:Wc.BOTTOMSTART.indexOf(e)!==-1?n=1:Wc.LEFTSTART.indexOf(e)!==-1?a=1:Wc.TOPSTART.indexOf(e)!==-1?n=-1:a=-1,[a,n]}function WW(e,r,t){var a=r[0]+Math.max(t[0],0),n=r[1]+Math.max(t[1],0),i=e.z[n][a],o=e.xaxis,l=e.yaxis;if(t[1]){var s=(e.level-i)/(e.z[n][a+1]-i),u=(s!==1?(1-s)*o.c2l(e.x[a]):0)+(s!==0?s*o.c2l(e.x[a+1]):0);return[o.c2p(o.l2c(u),!0),l.c2p(e.y[n],!0),a+s,n]}else{var f=(e.level-i)/(e.z[n+1][a]-i),c=(f!==1?(1-f)*l.c2l(e.y[n]):0)+(f!==0?f*l.c2l(e.y[n+1]):0);return[o.c2p(e.x[a],!0),l.c2p(l.l2c(c),!0),a,n+f]}}});var KW=N((rze,$W)=>{"use strict";var d6=Tg(),o4e=Pr();$W.exports={"[]":XW("[]"),"][":XW("]["),">":p6(">"),"<":p6("<"),"=":p6("=")};function JW(e,r){var t=Array.isArray(r),a;function n(i){return o4e(i)?+i:null}return d6.COMPARISON_OPS2.indexOf(e)!==-1?a=n(t?r[0]:r):d6.INTERVAL_OPS.indexOf(e)!==-1?a=t?[n(r[0]),n(r[1])]:[n(r),n(r)]:d6.SET_OPS.indexOf(e)!==-1&&(a=t?r.map(n):[n(r)]),a}function XW(e){return function(r){r=JW(e,r);var t=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return{start:t,end:a,size:a-t}}}function p6(e){return function(r){return r=JW(e,r),{start:r,end:1/0,size:1/0}}}});var rj=N((tze,ej)=>{"use strict";var QW=Ee(),l4e=KW(),s4e=D0();ej.exports=function(r,t,a){for(var n=r.type==="constraint"?l4e[r._operation](r.value):r,i=n.size,o=[],l=s4e(n),s=a.trace._carpetTrace,u=s?{xaxis:s.aaxis,yaxis:s.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},f=n.start;f1e3){QW.warn("Too many contours, clipping at 1000",r);break}return o}});var nj=N((aze,aj)=>{"use strict";var jc=Ee();aj.exports=function(e,r){var t,a,n,i=function(s){return s.reverse()},o=function(s){return s};switch(r){case"=":case"<":return e;case">":for(e.length!==1&&jc.warn("Contour data invalid for the specified inequality operation."),a=e[0],t=0;t{"use strict";ij.exports=function(e,r){var t=e[0],a=t.z,n;switch(r.type){case"levels":var i=Math.min(a[0][0],a[0][1]);for(n=0;no.level||o.starts.length&&i===o.level)}break;case"constraint":if(t.prefixBoundary=!1,t.edgepaths.length)return;var l=t.x.length,s=t.y.length,u=-1/0,f=1/0;for(n=0;n":c>u&&(t.prefixBoundary=!0);break;case"<":(cu||t.starts.length&&d===f)&&(t.prefixBoundary=!0);break;case"][":v=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),vu&&(t.prefixBoundary=!0);break}break}}});var y6=N(dn=>{"use strict";var F0=Sr(),Ra=Ee(),Al=jr(),u4e=So(),uj=Ea(),lj=Or(),sj=Zf(),f4e=dg(),fj=YW(),cj=ZW(),c4e=rj(),v4e=nj(),vj=oj(),R0=kg(),Go=R0.LABELOPTIMIZER;dn.plot=function(r,t,a,n){var i=t.xaxis,o=t.yaxis;Ra.makeTraceGroups(n,a,"contour").each(function(l){var s=F0.select(this),u=l[0],f=u.trace,c=u.x,v=u.y,d=f.contours,p=c4e(d,t,u),m=Ra.ensureSingle(s,"g","heatmapcoloring"),y=[];d.coloring==="heatmap"&&(y=[l]),f4e(r,t,y,m),fj(p),cj(p);var x=i.c2p(c[0],!0),_=i.c2p(c[c.length-1],!0),w=o.c2p(v[0],!0),b=o.c2p(v[v.length-1],!0),T=[[x,b],[_,b],[_,w],[x,w]],k=p;d.type==="constraint"&&(k=v4e(p,d._operation)),h4e(s,T,d),d4e(s,k,T,d),p4e(s,p,r,u,d),m4e(s,t,r,u,T)})};function h4e(e,r,t){var a=Ra.ensureSingle(e,"g","contourbg"),n=a.selectAll("path").data(t.coloring==="fill"?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+r.join("L")+"Z").style("stroke","none")}function d4e(e,r,t,a){var n=a.coloring==="fill"||a.type==="constraint"&&a._operation!=="=",i="M"+t.join("L")+"Z";n&&vj(r,a);var o=Ra.ensureSingle(e,"g","contourfill"),l=o.selectAll("path").data(n?r:[]);l.enter().append("path"),l.exit().remove(),l.each(function(s){var u=(s.prefixBoundary?i:"")+hj(s,t);u?F0.select(this).attr("d",u).style("stroke","none"):F0.select(this).remove()})}function hj(e,r){var t="",a=0,n=e.edgepaths.map(function(x,_){return _}),i=!0,o,l,s,u,f,c;function v(x){return Math.abs(x[1]-r[0][1])<.01}function d(x){return Math.abs(x[1]-r[2][1])<.01}function p(x){return Math.abs(x[0]-r[0][0])<.01}function m(x){return Math.abs(x[0]-r[2][0])<.01}for(;n.length;){for(c=Al.smoothopen(e.edgepaths[a],e.smoothing),t+=i?c:c.replace(/^M/,"L"),n.splice(n.indexOf(a),1),o=e.edgepaths[a][e.edgepaths[a].length-1],u=-1,s=0;s<4;s++){if(!o){Ra.log("Missing end?",a,e);break}for(v(o)&&!m(o)?l=r[1]:p(o)?l=r[0]:d(o)?l=r[3]:m(o)&&(l=r[2]),f=0;f=0&&(l=y,u=f):Math.abs(o[1]-l[1])<.01?Math.abs(o[1]-y[1])<.01&&(y[0]-o[0])*(l[0]-y[0])>=0&&(l=y,u=f):Ra.log("endpt to newendpt is not vert. or horz.",o,l,y)}if(o=l,u>=0)break;t+="L"+l}if(u===e.edgepaths.length){Ra.log("unclosed perimeter path");break}a=u,i=n.indexOf(a)===-1,i&&(a=n[0],t+="Z")}for(a=0;aGo.MAXCOST*2)break;v&&(l/=2),o=u-l/2,s=o+l*1.5}if(c<=Go.MAXCOST)return f};function y4e(e,r,t,a){var n=r.width/2,i=r.height/2,o=e.x,l=e.y,s=e.theta,u=Math.cos(s)*n,f=Math.sin(s)*n,c=(o>a.center?a.right-o:o-a.left)/(u+Math.abs(Math.sin(s)*i)),v=(l>a.middle?a.bottom-l:l-a.top)/(Math.abs(f)+Math.cos(s)*i);if(c<1||v<1)return 1/0;var d=Go.EDGECOST*(1/(c-1)+1/(v-1));d+=Go.ANGLECOST*s*s;for(var p=o-u,m=l-f,y=o+u,x=l+f,_=0;_{"use strict";var b4e=Sr(),m6=So(),x4e=D0();dj.exports=function(r){var t=r.contours,a=t.start,n=x4e(t),i=t.size||1,o=Math.floor((n-a)/i)+1,l=t.coloring==="lines"?0:1,s=m6.extractOpts(r);isFinite(i)||(i=1,o=1);var u=s.reversescale?m6.flipScale(s.colorscale):s.colorscale,f=u.length,c=new Array(f),v=new Array(f),d,p,m=s.min,y=s.max;if(t.coloring==="heatmap"){for(p=0;p=y)&&(a<=m&&(a=m),n>=y&&(n=y),o=Math.floor((n-a)/i)+1,l=0),p=0;pm&&(c.unshift(m),v.unshift(v[0])),c[c.length-1]{"use strict";var Lg=Sr(),pj=jr(),_4e=pg(),w4e=g6();yj.exports=function(r){var t=Lg.select(r).selectAll("g.contour");t.style("opacity",function(a){return a[0].trace.opacity}),t.each(function(a){var n=Lg.select(this),i=a[0].trace,o=i.contours,l=i.line,s=o.size||1,u=o.start,f=o.type==="constraint",c=!f&&o.coloring==="lines",v=!f&&o.coloring==="fill",d=c||v?w4e(i):null;n.selectAll("g.contourlevel").each(function(y){Lg.select(this).selectAll("path").call(pj.lineGroupStyle,l.width,c?d(y.level):l.color,l.dash)});var p=o.labelfont;if(n.selectAll("g.contourlabels text").each(function(y){pj.font(Lg.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(c?d(y.level):l.color)})}),f)n.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(v){var m;n.selectAll("g.contourfill path").style("fill",function(y){return m===void 0&&(m=y.level),d(y.level+.5*s)}),m===void 0&&(m=u),n.selectAll("g.contourbg path").style("fill",d(m-.5*s))}}),_4e(r)}});var x6=N((sze,gj)=>{"use strict";var mj=So(),T4e=g6(),A4e=D0();function M4e(e,r,t){var a=r.contours,n=r.line,i=a.size||1,o=a.coloring,l=T4e(r,{isColorbar:!0});if(o==="heatmap"){var s=mj.extractOpts(r);t._fillgradient=s.reversescale?mj.flipScale(s.colorscale):s.colorscale,t._zrange=[s.min,s.max]}else o==="fill"&&(t._fillcolor=l);t._line={color:o==="lines"?l:n.color,width:a.showlines!==!1?n.width:0,dash:n.dash},t._levels={start:a.start,end:A4e(a),size:i}}gj.exports={min:"zmin",max:"zmax",calc:M4e}});var _6=N((uze,bj)=>{"use strict";var Cg=Tr(),k4e=mg();bj.exports=function(r,t,a,n,i){i||(i={}),i.isContour=!0;var o=k4e(r,t,a,n,i);return o&&o.forEach(function(l){var s=l.trace;s.contours.type==="constraint"&&(s.fillcolor&&Cg.opacity(s.fillcolor)?l.color=Cg.addOpacity(s.fillcolor,1):s.contours.showlines&&Cg.opacity(s.line.color)&&(l.color=Cg.addOpacity(s.line.color,1)))}),o}});var _j=N((fze,xj)=>{"use strict";xj.exports={attributes:l6(),supplyDefaults:FW(),crossTraceDefaults:xg(),calc:h6(),plot:y6().plot,layerName:"contourlayer",style:b6(),colorbar:x6(),hoverPoints:_6(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:qi(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Tj=N((cze,wj)=>{"use strict";wj.exports=_j()});var Cj=N((vze,Lj)=>{"use strict";var Aj=Pr(),S4e=u6(),Sj=Tr(),Mj=Sj.addOpacity,q4e=Sj.opacity,qj=Tg(),kj=Ee().isArrayOrTypedArray,L4e=qj.CONSTRAINT_REDUCTION,C4e=qj.COMPARISON_OPS2;Lj.exports=function(r,t,a,n,i,o){var l=t.contours,s,u,f,c=a("contours.operation");if(l._operation=L4e[c],E4e(a,l),c==="="?s=l.showlines=!0:(s=a("contours.showlines"),f=a("fillcolor",Mj((r.line||{}).color||i,.5))),s){var v=f&&q4e(f)?Mj(t.fillcolor,1):i;u=a("line.color",v),a("line.width",2),a("line.dash")}a("line.smoothing"),S4e(a,n,u,o)};function E4e(e,r){var t;C4e.indexOf(r.operation)===-1?(e("contours.value",[0,1]),kj(r.value)?r.value.length>2?r.value=r.value.slice(2):r.length===0?r.value=[0,1]:r.length<2?(t=parseFloat(r.value[0]),r.value=[t,t+1]):r.value=[parseFloat(r.value[0]),parseFloat(r.value[1])]:Aj(r.value)&&(t=parseFloat(r.value),r.value=[t,t+1])):(e("contours.value",0),Aj(r.value)||(kj(r.value)?r.value=parseFloat(r.value[0]):r.value=0))}});var Pj=N((hze,Dj)=>{"use strict";var w6=Ee(),D4e=Iw(),P4e=dc(),R4e=Cj(),F4e=s6(),N4e=f6(),z4e=S0(),Ej=Mg();Dj.exports=function(r,t,a,n){function i(u,f){return w6.coerce(r,t,Ej,u,f)}function o(u){return w6.coerce2(r,t,Ej,u)}var l=D4e(r,t,i,n);if(!l){t.visible=!1;return}P4e(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate");var s=i("contours.type")==="constraint";i("connectgaps",w6.isArray1D(t.z)),s?R4e(r,t,i,n,a):(F4e(r,t,i,o),N4e(r,t,i,n)),t.contours&&t.contours.coloring==="heatmap"&&z4e(i,n),i("zorder")}});var Fj=N((dze,Rj)=>{"use strict";Rj.exports={attributes:Mg(),supplyDefaults:Pj(),calc:h6(),plot:y6().plot,style:b6(),colorbar:x6(),hoverPoints:_6(),moduleType:"trace",name:"contour",basePlotModule:qi(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var zj=N((pze,Nj)=>{"use strict";Nj.exports=Fj()});var T6=N((yze,Oj)=>{"use strict";var I4e=La().hovertemplateAttrs,O4e=La().texttemplateAttrs,B4e=Cy(),ai=wi(),H4e=mn(),Ij=ko(),U4e=si().dash,gs=bt().extendFlat,Ri=ai.marker,N0=ai.line,G4e=Ri.line;Oj.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:gs({},ai.mode,{dflt:"markers"}),text:gs({},ai.text,{}),texttemplate:O4e({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:gs({},ai.hovertext,{}),line:{color:N0.color,width:N0.width,dash:U4e,backoff:N0.backoff,shape:gs({},N0.shape,{values:["linear","spline"]}),smoothing:N0.smoothing,editType:"calc"},connectgaps:ai.connectgaps,cliponaxis:ai.cliponaxis,fill:gs({},ai.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:B4e(),marker:gs({symbol:Ri.symbol,opacity:Ri.opacity,angle:Ri.angle,angleref:Ri.angleref,standoff:Ri.standoff,maxdisplayed:Ri.maxdisplayed,size:Ri.size,sizeref:Ri.sizeref,sizemin:Ri.sizemin,sizemode:Ri.sizemode,line:gs({width:G4e.width,editType:"calc"},Ij("marker.line")),gradient:Ri.gradient,editType:"calc"},Ij("marker")),textfont:ai.textfont,textposition:ai.textposition,selected:ai.selected,unselected:ai.unselected,hoverinfo:gs({},H4e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:ai.hoveron,hovertemplate:I4e()}});var Gj=N((mze,Uj)=>{"use strict";var Bj=Ee(),Y4e=Hh(),Zc=Pn(),V4e=B_(),W4e=H_(),Hj=U_(),j4e=G_(),Z4e=Y_(),X4e=T6();Uj.exports=function(r,t,a,n){function i(v,d){return Bj.coerce(r,t,X4e,v,d)}var o=i("a"),l=i("b"),s=i("c"),u;if(o?(u=o.length,l?(u=Math.min(u,l.length),s&&(u=Math.min(u,s.length))):s?u=Math.min(u,s.length):u=0):l&&s&&(u=Math.min(l.length,s.length)),!u){t.visible=!1;return}t._length=u,i("sum"),i("text"),i("hovertext"),t.hoveron!=="fills"&&i("hovertemplate");var f=u{"use strict";var A6=Or();Yj.exports=function(r,t,a){var n={},i=a[t.subplot]._subplot;return n.aLabel=A6.tickText(i.aaxis,r.a,!0).text,n.bLabel=A6.tickText(i.baxis,r.b,!0).text,n.cLabel=A6.tickText(i.caxis,r.c,!0).text,n}});var Xj=N((bze,Zj)=>{"use strict";var M6=Pr(),J4e=j_(),$4e=im(),K4e=om(),Q4e=lm().calcMarkerSize,Wj=["a","b","c"],jj={a:["b","c"],b:["a","c"],c:["a","b"]};Zj.exports=function(r,t){var a=r._fullLayout[t.subplot],n=a.sum,i=t.sum||n,o={a:t.a,b:t.b,c:t.c},l=t.ids,s,u,f,c,v,d;for(s=0;s{"use strict";var ewe=i4();Jj.exports=function(r,t,a){var n=t.plotContainer;n.select(".scatterlayer").selectAll("*").remove();for(var i=t.xaxis,o=t.yaxis,l={xaxis:i,yaxis:o,plot:n,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},s=t.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var rwe=c4();Kj.exports=function(r,t,a,n){var i=rwe(r,t,a,n);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var l=1-o.y0/r.ya._length,s=r.xa._length,u=s*l/2,f=s-u;return o.x0=Math.max(Math.min(o.x0,f),u),o.x1=Math.max(Math.min(o.x1,f),u),i}var c=o.cd[o.index],v=o.trace,d=o.subplot;o.a=c.a,o.b=c.b,o.c=c.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[v.subplot]={_subplot:d};var m=v._module.formatLabels(c,v,p);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var y=c.hi||v.hoverinfo,x=[];function _(b,T){x.push(b._hovertitle+": "+T)}if(!v.hovertemplate){var w=y.split("+");w.indexOf("all")!==-1&&(w=["a","b","c"]),w.indexOf("a")!==-1&&_(d.aaxis,o.aLabel),w.indexOf("b")!==-1&&_(d.baxis,o.bLabel),w.indexOf("c")!==-1&&_(d.caxis,o.cLabel)}return o.extraText=x.join("
"),o.hovertemplate=v.hovertemplate,i}});var rZ=N((wze,eZ)=>{"use strict";eZ.exports=function(r,t,a,n,i){if(t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),n[i]){var o=n[i];r.a=o.a,r.b=o.b,r.c=o.c}else r.a=t.a,r.b=t.b,r.c=t.c;return r}});var vZ=N((Tze,cZ)=>{"use strict";var lZ=Sr(),twe=Sn(),k6=gr(),Ml=Ee(),Yo=Ml.strTranslate,Eg=Ml._,Jc=Tr(),Dg=jr(),z0=Zf(),S6=bt().extendFlat,awe=ea(),bs=Or(),tZ=pi(),aZ=Fn(),sZ=bu(),nZ=sZ.freeMode,nwe=sZ.rectMode,q6=jf(),iwe=zo().prepSelect,owe=zo().selectOnClick,lwe=zo().clearOutline,swe=zo().clearSelectionsCache,uZ=Ca();function fZ(e,r){this.id=e.id,this.graphDiv=e.graphDiv,this.init(r),this.makeFramework(r),this.updateFx(r),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}cZ.exports=fZ;var Vo=fZ.prototype;Vo.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Vo.plot=function(e,r){var t=this,a=r[t.id],n=r._size;t._hasClipOnAxisFalse=!1;for(var i=0;iXc*u?(x=u,y=x*Xc):(y=s,x=y/Xc),_=o*y/s,w=l*x/u,p=r.l+r.w*n-y/2,m=r.t+r.h*(1-i)-x/2,t.x0=p,t.y0=m,t.w=y,t.h=x,t.sum=f,t.xaxis={type:"linear",range:[c+2*d-f,f-c-2*v],domain:[n-_/2,n+_/2],_id:"x"},z0(t.xaxis,t.graphDiv._fullLayout),t.xaxis.setScale(),t.xaxis.isPtWithinRange=function(O){return O.a>=t.aaxis.range[0]&&O.a<=t.aaxis.range[1]&&O.b>=t.baxis.range[1]&&O.b<=t.baxis.range[0]&&O.c>=t.caxis.range[1]&&O.c<=t.caxis.range[0]},t.yaxis={type:"linear",range:[c,f-v-d],domain:[i-w/2,i+w/2],_id:"y"},z0(t.yaxis,t.graphDiv._fullLayout),t.yaxis.setScale(),t.yaxis.isPtWithinRange=function(){return!0};var b=t.yaxis.domain[0],T=t.aaxis=S6({},e.aaxis,{range:[c,f-v-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[b,b+w*Xc],anchor:"free",position:0,_id:"y",_length:y});z0(T,t.graphDiv._fullLayout),T.setScale();var k=t.baxis=S6({},e.baxis,{range:[f-c-d,v],side:"bottom",domain:t.xaxis.domain,anchor:"free",position:0,_id:"x",_length:y});z0(k,t.graphDiv._fullLayout),k.setScale();var M=t.caxis=S6({},e.caxis,{range:[f-c-v,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[b,b+w*Xc],anchor:"free",position:0,_id:"y",_length:y});z0(M,t.graphDiv._fullLayout),M.setScale();var S="M"+p+","+(m+x)+"h"+y+"l-"+y/2+",-"+x+"Z";t.clipDef.select("path").attr("d",S),t.layers.plotbg.select("path").attr("d",S);var E="M0,"+x+"h"+y+"l-"+y/2+",-"+x+"Z";t.clipDefRelative.select("path").attr("d",E);var P=Yo(p,m);t.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),t.clipDefRelative.select("path").attr("transform",null);var R=Yo(p-k._offset,m+x);t.layers.baxis.attr("transform",R),t.layers.bgrid.attr("transform",R);var D=Yo(p+y/2,m)+"rotate(30)"+Yo(0,-T._offset);t.layers.aaxis.attr("transform",D),t.layers.agrid.attr("transform",D);var z=Yo(p+y/2,m)+"rotate(-30)"+Yo(0,-M._offset);t.layers.caxis.attr("transform",z),t.layers.cgrid.attr("transform",z),t.drawAxes(!0),t.layers.aline.select("path").attr("d",T.showline?"M"+p+","+(m+x)+"l"+y/2+",-"+x:"M0,0").call(Jc.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),t.layers.bline.select("path").attr("d",k.showline?"M"+p+","+(m+x)+"h"+y:"M0,0").call(Jc.stroke,k.linecolor||"#000").style("stroke-width",(k.linewidth||0)+"px"),t.layers.cline.select("path").attr("d",M.showline?"M"+(p+y/2)+","+m+"l"+y/2+","+x:"M0,0").call(Jc.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),t.graphDiv._context.staticPlot||t.initInteractions(),Dg.setClipUrl(t.layers.frontplot,t._hasClipOnAxisFalse?null:t.clipId,t.graphDiv)};Vo.drawAxes=function(e){var r=this,t=r.graphDiv,a=r.id.substr(7)+"title",n=r.layers,i=r.aaxis,o=r.baxis,l=r.caxis;if(r.drawAx(i),r.drawAx(o),r.drawAx(l),e){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(l.showticklabels?l.tickfont.size*.75:0)+(l.ticks==="outside"?l.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;n["a-title"]=q6.draw(t,"a"+a,{propContainer:i,propName:r.id+".aaxis.title",placeholder:Eg(t,"Click to enter Component A title"),attributes:{x:r.x0+r.w/2,y:r.y0-i.title.font.size/3-s,"text-anchor":"middle"}}),n["b-title"]=q6.draw(t,"b"+a,{propContainer:o,propName:r.id+".baxis.title",placeholder:Eg(t,"Click to enter Component B title"),attributes:{x:r.x0-u,y:r.y0+r.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),n["c-title"]=q6.draw(t,"c"+a,{propContainer:l,propName:r.id+".caxis.title",placeholder:Eg(t,"Click to enter Component C title"),attributes:{x:r.x0+r.w+u,y:r.y0+r.h+l.title.font.size*.83+u,"text-anchor":"middle"}})}};Vo.drawAx=function(e){var r=this,t=r.graphDiv,a=e._name,n=a.charAt(0),i=e._id,o=r.layers[a],l=30,s=n+"tickLayout",u=uwe(e);r[s]!==u&&(o.selectAll("."+i+"tick").remove(),r[s]=u),e.setScale();var f=bs.calcTicks(e),c=bs.clipEnds(e,f),v=bs.makeTransTickFn(e),d=bs.getTickSigns(e)[2],p=Ml.deg2rad(l),m=d*(e.linewidth||1)/2,y=d*e.ticklen,x=r.w,_=r.h,w=n==="b"?"M0,"+m+"l"+Math.sin(p)*y+","+Math.cos(p)*y:"M"+m+",0l"+Math.cos(p)*y+","+-Math.sin(p)*y,b={a:"M0,0l"+_+",-"+x/2,b:"M0,0l-"+x/2+",-"+_,c:"M0,0l-"+_+","+x/2}[n];bs.drawTicks(t,e,{vals:e.ticks==="inside"?c:f,layer:o,path:w,transFn:v,crisp:!1}),bs.drawGrid(t,e,{vals:c,layer:r.layers[n+"grid"],path:b,transFn:v,crisp:!1}),bs.drawLabels(t,e,{vals:f,layer:o,transFn:v,labelFns:bs.makeLabelFns(e,0,l)})};function uwe(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Sa=uZ.MINZOOM/2+.87,fwe="m-0.87,.5h"+Sa+"v3h-"+(Sa+5.2)+"l"+(Sa/2+2.6)+",-"+(Sa*.87+4.5)+"l2.6,1.5l-"+Sa/2+","+Sa*.87+"Z",cwe="m0.87,.5h-"+Sa+"v3h"+(Sa+5.2)+"l-"+(Sa/2+2.6)+",-"+(Sa*.87+4.5)+"l-2.6,1.5l"+Sa/2+","+Sa*.87+"Z",vwe="m0,1l"+Sa/2+","+Sa*.87+"l2.6,-1.5l-"+(Sa/2+2.6)+",-"+(Sa*.87+4.5)+"l-"+(Sa/2+2.6)+","+(Sa*.87+4.5)+"l2.6,1.5l"+Sa/2+",-"+Sa*.87+"Z",hwe="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",iZ=!0;Vo.clearOutline=function(){swe(this.dragOptions),lwe(this.dragOptions.gd)};Vo.initInteractions=function(){var e=this,r=e.layers.plotbg.select("path").node(),t=e.graphDiv,a=t._fullLayout._zoomlayer,n,i;this.dragOptions={element:r,gd:t,plotinfo:{id:e.id,domain:t._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(R,D,z){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],n=t._fullLayout._invScaleX,i=t._fullLayout._invScaleY;var O=e.dragOptions.dragmode=t._fullLayout.dragmode;nZ(O)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,O==="zoom"?(e.dragOptions.moveFn=k,e.dragOptions.clickFn=x,e.dragOptions.doneFn=M,_(R,D,z)):O==="pan"?(e.dragOptions.moveFn=E,e.dragOptions.clickFn=x,e.dragOptions.doneFn=P,S(),e.clearOutline(t)):(nwe(O)||nZ(O))&&iwe(R,D,z,e.dragOptions,O)}};var o,l,s,u,f,c,v,d,p,m;function y(R){var D={};return D[e.id+".aaxis.min"]=R.a,D[e.id+".baxis.min"]=R.b,D[e.id+".caxis.min"]=R.c,D}function x(R,D){var z=t._fullLayout.clickmode;oZ(t),R===2&&(t.emit("plotly_doubleclick",null),k6.call("_guiRelayout",t,y({a:0,b:0,c:0}))),z.indexOf("select")>-1&&R===1&&owe(D,t,[e.xaxis],[e.yaxis],e.id,e.dragOptions),z.indexOf("event")>-1&&aZ.click(t,D,e.id)}function _(R,D,z){var O=r.getBoundingClientRect();o=D-O.left,l=z-O.top,t._fullLayout._calcInverseTransform(t);var H=t._fullLayout._invTransform,Y=Ml.apply3DTransform(H)(o,l);o=Y[0],l=Y[1],s={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=s,u=e.aaxis.range[1]-s.a,c=twe(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),v="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=a.append("path").attr("class","zoombox").attr("transform",Yo(e.x0,e.y0)).style({fill:c>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),m=a.append("path").attr("class","zoombox-corners").attr("transform",Yo(e.x0,e.y0)).style({fill:Jc.background,stroke:Jc.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(t)}function w(R,D){return 1-D/e.h}function b(R,D){return 1-(R+(e.h-D)/Math.sqrt(3))/e.w}function T(R,D){return(R-(e.h-D)/Math.sqrt(3))/e.w}function k(R,D){var z=o+R*n,O=l+D*i,H=Math.max(0,Math.min(1,w(o,l),w(z,O))),Y=Math.max(0,Math.min(1,b(o,l),b(z,O))),G=Math.max(0,Math.min(1,T(o,l),T(z,O))),B=(H/2+G)*e.w,V=(1-H/2-Y)*e.w,X=(B+V)/2,Z=V-B,te=(1-H)*e.h,fe=te-Z/Xc;Z.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),m.transition().style("opacity",1).duration(200),d=!0),t.emit("plotly_relayouting",y(f))}function M(){oZ(t),f!==s&&(k6.call("_guiRelayout",t,y(f)),iZ&&t.data&&t._context.showTips&&(Ml.notifier(Eg(t,"Double-click to zoom back out"),"long"),iZ=!1))}function S(){s={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=s}function E(R,D){var z=R/e.xaxis._m,O=D/e.yaxis._m;f={a:s.a-O,b:s.b+(z+O)/2,c:s.c-(z-O)/2};var H=[f.a,f.b,f.c].sort(Ml.sorterAsc),Y={a:H.indexOf(f.a),b:H.indexOf(f.b),c:H.indexOf(f.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),f={a:H[Y.a],b:H[Y.b],c:H[Y.c]},D=(s.a-f.a)*e.yaxis._m,R=(s.c-f.c-s.b+f.b)*e.xaxis._m);var G=Yo(e.x0+R,e.y0+D);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var B=Yo(-R,-D);e.clipDefRelative.select("path").attr("transform",B),e.aaxis.range=[f.a,e.sum-f.b-f.c],e.baxis.range=[e.sum-f.a-f.c,f.b],e.caxis.range=[e.sum-f.a-f.b,f.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(Dg.hideOutsideRangePoints,e),t.emit("plotly_relayouting",y(f))}function P(){k6.call("_guiRelayout",t,y(f))}r.onmousemove=function(R){aZ.hover(t,R,e.id),t._fullLayout._lasthover=r,t._fullLayout._hoversubplot=e.id},r.onmouseout=function(R){t._dragging||tZ.unhover(t,R)},tZ.init(this.dragOptions)};function oZ(e){lZ.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var E6=N((Aze,hZ)=>{"use strict";var dwe=li(),pwe=Pc().attributes,nt=hi(),ywe=Xi().overrideAll,L6=bt().extendFlat,C6={title:{text:nt.title.text,font:nt.title.font},color:nt.color,tickmode:nt.minor.tickmode,nticks:L6({},nt.nticks,{dflt:6,min:1}),tick0:nt.tick0,dtick:nt.dtick,tickvals:nt.tickvals,ticktext:nt.ticktext,ticks:nt.ticks,ticklen:nt.ticklen,tickwidth:nt.tickwidth,tickcolor:nt.tickcolor,ticklabelstep:nt.ticklabelstep,showticklabels:nt.showticklabels,labelalias:nt.labelalias,showtickprefix:nt.showtickprefix,tickprefix:nt.tickprefix,showticksuffix:nt.showticksuffix,ticksuffix:nt.ticksuffix,showexponent:nt.showexponent,exponentformat:nt.exponentformat,minexponent:nt.minexponent,separatethousands:nt.separatethousands,tickfont:nt.tickfont,tickangle:nt.tickangle,tickformat:nt.tickformat,tickformatstops:nt.tickformatstops,hoverformat:nt.hoverformat,showline:L6({},nt.showline,{dflt:!0}),linecolor:nt.linecolor,linewidth:nt.linewidth,showgrid:L6({},nt.showgrid,{dflt:!0}),gridcolor:nt.gridcolor,gridwidth:nt.gridwidth,griddash:nt.griddash,layer:nt.layer,min:{valType:"number",dflt:0,min:0}},Pg=hZ.exports=ywe({domain:pwe({name:"ternary"}),bgcolor:{valType:"color",dflt:dwe.background},sum:{valType:"number",dflt:1,min:0},aaxis:C6,baxis:C6,caxis:C6},"plot","from-root");Pg.uirevision={valType:"any",editType:"none"};Pg.aaxis.uirevision=Pg.baxis.uirevision=Pg.caxis.uirevision={valType:"any",editType:"none"}});var pZ=N((Mze,dZ)=>{"use strict";var mwe=Ee(),gwe=_t(),bwe=Pc().defaults;dZ.exports=function(r,t,a,n){var i=n.type,o=n.attributes,l=n.handleDefaults,s=n.partition||"x",u=t._subplots[i],f=u.length,c=f&&u[0].replace(/\d+$/,""),v,d;function p(_,w){return mwe.coerce(v,d,o,_,w)}for(var m=0;m{"use strict";var xwe=Tr(),_we=_t(),Rg=Ee(),wwe=pZ(),Twe=n1(),Awe=i1(),Mwe=t1(),kwe=r1(),Swe=d4(),mZ=E6(),yZ=["aaxis","baxis","caxis"];gZ.exports=function(r,t,a){wwe(r,t,a,{type:"ternary",attributes:mZ,handleDefaults:qwe,font:t.font,paper_bgcolor:t.paper_bgcolor})};function qwe(e,r,t,a){var n=t("bgcolor"),i=t("sum");a.bgColor=xwe.combine(n,a.paper_bgcolor);for(var o,l,s,u=0;u=i&&(f.min=0,c.min=0,v.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function Lwe(e,r,t,a){var n=mZ[r._name];function i(d,p){return Rg.coerce(e,r,n,d,p)}i("uirevision",a.uirevision),r.type="linear";var o=i("color"),l=o!==n.color.dflt?o:t.font.color,s=r._name,u=s.charAt(0).toUpperCase(),f="Component "+u,c=i("title.text",f);r._hovertitle=c===f?c:u,Rg.coerceFont(i,"title.font",t.font,{overrideDflt:{size:Rg.bigFont(t.font.size),color:l}}),i("min"),kwe(e,r,i,"linear"),Awe(e,r,i,"linear"),Twe(e,r,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),Mwe(e,r,i,{outerTicks:!0});var v=i("showticklabels");v&&(Rg.coerceFont(i,"tickfont",t.font,{overrideDflt:{color:l}}),i("tickangle"),i("tickformat")),Swe(e,r,i,{dfltColor:o,bgColor:t.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),i("hoverformat"),i("layer")}});var xZ=N(Fi=>{"use strict";var Cwe=vZ(),Ewe=jp().getSubplotCalcData,Dwe=Ee().counterRegex,$c="ternary";Fi.name=$c;var Pwe=Fi.attr="subplot";Fi.idRoot=$c;Fi.idRegex=Fi.attrRegex=Dwe($c);var Rwe=Fi.attributes={};Rwe[Pwe]={valType:"subplotid",dflt:"ternary",editType:"calc"};Fi.layoutAttributes=E6();Fi.supplyLayoutDefaults=bZ();Fi.plot=function(r){for(var t=r._fullLayout,a=r.calcdata,n=t._subplots[$c],i=0;i{"use strict";_Z.exports={attributes:T6(),supplyDefaults:Gj(),colorbar:i0(),formatLabels:Vj(),calc:Xj(),plot:$j(),style:ku().style,styleOnSelect:ku().styleOnSelect,hoverPoints:Qj(),selectPoints:v4(),eventData:rZ(),moduleType:"trace",name:"scatterternary",basePlotModule:xZ(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var AZ=N((Lze,TZ)=>{"use strict";TZ.exports=wZ()});var D6=N((Cze,kZ)=>{"use strict";var ya=tg(),Kc=bt().extendFlat,MZ=Qi().axisHoverFormat;kZ.exports={y:ya.y,x:ya.x,x0:ya.x0,y0:ya.y0,xhoverformat:MZ("x"),yhoverformat:MZ("y"),name:Kc({},ya.name,{}),orientation:Kc({},ya.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:ya.fillcolor,points:Kc({},ya.boxpoints,{}),jitter:Kc({},ya.jitter,{}),pointpos:Kc({},ya.pointpos,{}),width:Kc({},ya.width,{}),marker:ya.marker,text:ya.text,hovertext:ya.hovertext,hovertemplate:ya.hovertemplate,quartilemethod:ya.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:ya.offsetgroup,alignmentgroup:ya.alignmentgroup,selected:ya.selected,unselected:ya.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:ya.zorder}});var F6=N((Eze,SZ)=>{"use strict";var P6=ag(),R6=Ee().extendFlat;SZ.exports={violinmode:R6({},P6.boxmode,{}),violingap:R6({},P6.boxgap,{}),violingroupgap:R6({},P6.boxgroupgap,{})}});var DZ=N((Dze,EZ)=>{"use strict";var qZ=Ee(),Fwe=Tr(),LZ=M0(),CZ=D6();EZ.exports=function(r,t,a,n){function i(T,k){return qZ.coerce(r,t,CZ,T,k)}function o(T,k){return qZ.coerce2(r,t,CZ,T,k)}if(LZ.handleSampleDefaults(r,t,i,n),t.visible!==!1){i("bandwidth"),i("side");var l=i("width");l||(i("scalegroup",t.name),i("scalemode"));var s=i("span"),u;Array.isArray(s)&&(u="manual"),i("spanmode",u);var f=i("line.color",(r.marker||{}).color||a),c=i("line.width"),v=i("fillcolor",Fwe.addOpacity(t.line.color,.5));LZ.handlePointsDefaults(r,t,i,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",v),m=o("box.line.color",f),y=o("box.line.width",c),x=i("box.visible",!!(d||p||m||y));x||(t.box={visible:!1});var _=o("meanline.color",f),w=o("meanline.width",c),b=i("meanline.visible",!!(_||w));b||(t.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var RZ=N((Pze,PZ)=>{"use strict";var Nwe=Ee(),zwe=F6(),Iwe=Aw();PZ.exports=function(r,t,a){function n(i,o){return Nwe.coerce(r,t,zwe,i,o)}Iwe._supply(r,t,a,n,"violin")}});var Fg=N(Uu=>{"use strict";var Owe=Ee(),Bwe={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};Uu.makeKDE=function(e,r,t){var a=t.length,n=Bwe.gaussian,i=e.bandwidth,o=1/(a*i);return function(l){for(var s=0,u=0;u{"use strict";var N6=Ee(),z6=Or(),Hwe=Sw(),FZ=Fg(),Uwe=Ft().BADNUM;NZ.exports=function(r,t){var a=Hwe(r,t);if(a[0].t.empty)return a;for(var n=r._fullLayout,i=z6.getFromId(r,t[t.orientation==="h"?"xaxis":"yaxis"]),o=1/0,l=-1/0,s=0,u=0,f=0;f{"use strict";var Wwe=qw().setPositionOffset,IZ=["v","h"];OZ.exports=function(r,t){for(var a=r.calcdata,n=t.xaxis,i=t.yaxis,o=0;o{"use strict";var I6=Sr(),O6=Ee(),jwe=jr(),B6=Lw(),Zwe=n4(),Xwe=Fg();HZ.exports=function(r,t,a,n){var i=r._context.staticPlot,o=r._fullLayout,l=t.xaxis,s=t.yaxis;function u(f,c){var v=Zwe(f,{xaxis:l,yaxis:s,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return jwe.smoothopen(v[0],1)}O6.makeTraceGroups(n,a,"trace violins").each(function(f){var c=I6.select(this),v=f[0],d=v.t,p=v.trace;if(p.visible!==!0||d.empty){c.remove();return}var m=d.bPos,y=d.bdPos,x=t[d.valLetter+"axis"],_=t[d.posLetter+"axis"],w=p.side==="both",b=w||p.side==="positive",T=w||p.side==="negative",k=c.selectAll("path.violin").data(O6.identity);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),k.exit().remove(),k.each(function(O){var H=I6.select(this),Y=O.density,G=Y.length,B=_.c2l(O.pos+m,!0),V=_.l2p(B),X;if(p.width)X=d.maxKDE/y;else{var Z=o._violinScaleGroupStats[p.scalegroup];X=p.scalemode==="count"?Z.maxKDE/y*(Z.maxCount/O.pts.length):Z.maxKDE/y}var te,fe,le,ie,K,he,oe;if(b){for(he=new Array(G),ie=0;ie{"use strict";var GZ=Sr(),Qc=Tr(),Jwe=ku().stylePoints;YZ.exports=function(r){var t=GZ.select(r).selectAll("g.trace.violins");t.style("opacity",function(a){return a[0].trace.opacity}),t.each(function(a){var n=a[0].trace,i=GZ.select(this),o=n.box||{},l=o.line||{},s=n.meanline||{},u=s.width;i.selectAll("path.violin").style("stroke-width",n.line.width+"px").call(Qc.stroke,n.line.color).call(Qc.fill,n.fillcolor),i.selectAll("path.box").style("stroke-width",l.width+"px").call(Qc.stroke,l.color).call(Qc.fill,o.fillcolor);var f={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(f).call(Qc.stroke,s.color),i.selectAll("path.meanline").style(f).call(Qc.stroke,s.color),Jwe(i,n,r)})}});var XZ=N((Oze,ZZ)=>{"use strict";var $we=Tr(),H6=Ee(),Kwe=Or(),WZ=Fw(),jZ=Fg();ZZ.exports=function(r,t,a,n,i){i||(i={});var o=i.hoverLayer,l=r.cd,s=l[0].trace,u=s.hoveron,f=u.indexOf("violins")!==-1,c=u.indexOf("kde")!==-1,v=[],d,p;if(f||c){var m=WZ.hoverOnBoxes(r,t,a,n);if(c&&m.length>0){var y=r.xa,x=r.ya,_,w,b,T,k;s.orientation==="h"?(k=t,_="y",b=x,w="x",T=y):(k=a,_="x",b=y,w="y",T=x);var M=l[r.index];if(k>=M.span[0]&&k<=M.span[1]){var S=H6.extendFlat({},r),E=T.c2p(k,!0),P=jZ.getKdeValue(M,s,k),R=jZ.getPositionOnKdePath(M,s,E),D=b._offset,z=b._length;S[_+"0"]=R[0],S[_+"1"]=R[1],S[w+"0"]=S[w+"1"]=E,S[w+"Label"]=w+": "+Kwe.hoverLabelText(T,k,s[w+"hoverformat"])+", "+l[0].t.labels.kde+" "+P.toFixed(3);for(var O=0,H=0;H{"use strict";JZ.exports={attributes:D6(),layoutAttributes:F6(),supplyDefaults:DZ(),crossTraceDefaults:M0().crossTraceDefaults,supplyLayoutDefaults:RZ(),calc:zZ(),crossTraceCalc:BZ(),plot:UZ(),style:VZ(),styleOnSelect:ku().styleOnSelect,hoverPoints:XZ(),selectPoints:Nw(),moduleType:"trace",name:"violin",basePlotModule:qi(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var QZ=N((Hze,KZ)=>{"use strict";KZ.exports=$Z()});var ev=N((Uze,eX)=>{"use strict";eX.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 r=e.slice(0,3);return r[1]=r[1]+"%",r[2]=r[2]+"%",r},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var r=e.slice(0,4);return r[1]=r[1]+"%",r[2]=r[2]+"%",r},suffix:["\xB0","%","%",""]}}}});var U6=N((Gze,tX)=>{"use strict";var Qwe=mn(),e6e=wi().zorder,r6e=La().hovertemplateAttrs,rX=bt().extendFlat,t6e=ev().colormodel,O0=["rgb","rgba","rgba256","hsl","hsla"],a6e=[],n6e=[];for(rv=0;rv{"use strict";var i6e=Ee(),o6e=U6(),aX=ev(),l6e=yl().IMAGE_URL_PREFIX;nX.exports=function(r,t){function a(o,l){return i6e.coerce(r,t,o6e,o,l)}a("source"),t.source&&!t.source.match(l6e)&&delete t.source,t._hasSource=!!t.source;var n=a("z");if(t._hasZ=!(n===void 0||!n.length||!n[0]||!n[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}a("x0"),a("y0"),a("dx"),a("dy");var i;t._hasZ?(a("colormodel","rgb"),i=aX.colormodel[t.colormodel],a("zmin",i.zminDflt||i.min),a("zmax",i.zmaxDflt||i.max)):t._hasSource&&(t.colormodel="rgba256",i=aX.colormodel[t.colormodel],t.zmin=i.zminDflt,t.zmax=i.zmaxDflt),a("zsmooth"),a("text"),a("hovertext"),a("hovertemplate"),t._length=null,a("zorder")}});var kl=N((Vze,G6)=>{typeof Object.create=="function"?G6.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:G6.exports=function(r,t){if(t){r.super_=t;var a=function(){};a.prototype=t.prototype,r.prototype=new a,r.prototype.constructor=r}}});var Y6=N((Wze,oX)=>{oX.exports=Qs().EventEmitter});var uX=N(Ng=>{"use strict";Ng.byteLength=u6e;Ng.toByteArray=c6e;Ng.fromByteArray=d6e;var Wo=[],Ni=[],s6e=typeof Uint8Array!="undefined"?Uint8Array:Array,V6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Gu=0,lX=V6.length;Gu0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var a=t===r?0:4-t%4;return[t,a]}function u6e(e){var r=sX(e),t=r[0],a=r[1];return(t+a)*3/4-a}function f6e(e,r,t){return(r+t)*3/4-t}function c6e(e){var r,t=sX(e),a=t[0],n=t[1],i=new s6e(f6e(e,a,n)),o=0,l=n>0?a-4:a,s;for(s=0;s>16&255,i[o++]=r>>8&255,i[o++]=r&255;return n===2&&(r=Ni[e.charCodeAt(s)]<<2|Ni[e.charCodeAt(s+1)]>>4,i[o++]=r&255),n===1&&(r=Ni[e.charCodeAt(s)]<<10|Ni[e.charCodeAt(s+1)]<<4|Ni[e.charCodeAt(s+2)]>>2,i[o++]=r>>8&255,i[o++]=r&255),i}function v6e(e){return Wo[e>>18&63]+Wo[e>>12&63]+Wo[e>>6&63]+Wo[e&63]}function h6e(e,r,t){for(var a,n=[],i=r;il?l:o+i));return a===1?(r=e[t-1],n.push(Wo[r>>2]+Wo[r<<4&63]+"==")):a===2&&(r=(e[t-2]<<8)+e[t-1],n.push(Wo[r>>10]+Wo[r>>4&63]+Wo[r<<2&63]+"=")),n.join("")}});var fX=N(W6=>{W6.read=function(e,r,t,a,n){var i,o,l=n*8-a-1,s=(1<>1,f=-7,c=t?n-1:0,v=t?-1:1,d=e[r+c];for(c+=v,i=d&(1<<-f)-1,d>>=-f,f+=l;f>0;i=i*256+e[r+c],c+=v,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=a;f>0;o=o*256+e[r+c],c+=v,f-=8);if(i===0)i=1-u;else{if(i===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,a),i=i-u}return(d?-1:1)*o*Math.pow(2,i-a)};W6.write=function(e,r,t,a,n,i){var o,l,s,u=i*8-n-1,f=(1<>1,v=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=a?0:i-1,p=a?1:-1,m=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,o=f):(o=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+c>=1?r+=v/s:r+=v*Math.pow(2,1-c),r*s>=2&&(o++,s/=2),o+c>=f?(l=0,o=f):o+c>=1?(l=(r*s-1)*Math.pow(2,n),o=o+c):(l=r*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[t+d]=l&255,d+=p,l/=256,n-=8);for(o=o<0;e[t+d]=o&255,d+=p,o/=256,u-=8);e[t+d-p]|=m*128}});var ov=N(iv=>{"use strict";var j6=uX(),av=fX(),cX=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;iv.Buffer=je;iv.SlowBuffer=x6e;iv.INSPECT_MAX_BYTES=50;var zg=2147483647;iv.kMaxLength=zg;je.TYPED_ARRAY_SUPPORT=p6e();!je.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 p6e(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(e){return!1}}Object.defineProperty(je.prototype,"parent",{enumerable:!0,get:function(){if(je.isBuffer(this))return this.buffer}});Object.defineProperty(je.prototype,"offset",{enumerable:!0,get:function(){if(je.isBuffer(this))return this.byteOffset}});function Sl(e){if(e>zg)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,je.prototype),r}function je(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return $6(e)}return pX(e,r,t)}je.poolSize=8192;function pX(e,r,t){if(typeof e=="string")return m6e(e,r);if(ArrayBuffer.isView(e))return g6e(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(jo(e,ArrayBuffer)||e&&jo(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(jo(e,SharedArrayBuffer)||e&&jo(e.buffer,SharedArrayBuffer)))return X6(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return je.from(a,r,t);let n=b6e(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return je.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}je.from=function(e,r,t){return pX(e,r,t)};Object.setPrototypeOf(je.prototype,Uint8Array.prototype);Object.setPrototypeOf(je,Uint8Array);function yX(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 y6e(e,r,t){return yX(e),e<=0?Sl(e):r!==void 0?typeof t=="string"?Sl(e).fill(r,t):Sl(e).fill(r):Sl(e)}je.alloc=function(e,r,t){return y6e(e,r,t)};function $6(e){return yX(e),Sl(e<0?0:K6(e)|0)}je.allocUnsafe=function(e){return $6(e)};je.allocUnsafeSlow=function(e){return $6(e)};function m6e(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!je.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=mX(e,r)|0,a=Sl(t),n=a.write(e,r);return n!==t&&(a=a.slice(0,n)),a}function Z6(e){let r=e.length<0?0:K6(e.length)|0,t=Sl(r);for(let a=0;a=zg)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+zg.toString(16)+" bytes");return e|0}function x6e(e){return+e!=e&&(e=0),je.alloc(+e)}je.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==je.prototype};je.compare=function(r,t){if(jo(r,Uint8Array)&&(r=je.from(r,r.offset,r.byteLength)),jo(t,Uint8Array)&&(t=je.from(t,t.offset,t.byteLength)),!je.isBuffer(r)||!je.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let a=r.length,n=t.length;for(let i=0,o=Math.min(a,n);in.length?(je.isBuffer(o)||(o=je.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(je.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function mX(e,r){if(je.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||jo(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 t=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return J6(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return kX(e).length;default:if(n)return a?-1:J6(e).length;r=(""+r).toLowerCase(),n=!0}}je.byteLength=mX;function _6e(e,r,t){let a=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return E6e(this,r,t);case"utf8":case"utf-8":return bX(this,r,t);case"ascii":return L6e(this,r,t);case"latin1":case"binary":return C6e(this,r,t);case"base64":return S6e(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D6e(this,r,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}je.prototype._isBuffer=!0;function Yu(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}je.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(r+=" ... "),""};cX&&(je.prototype[cX]=je.prototype.inspect);je.prototype.compare=function(r,t,a,n,i){if(jo(r,Uint8Array)&&(r=je.from(r,r.offset,r.byteLength)),!je.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),a===void 0&&(a=r?r.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||a>r.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=a)return 0;if(n>=i)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,n>>>=0,i>>>=0,this===r)return 0;let o=i-n,l=a-t,s=Math.min(o,l),u=this.slice(n,i),f=r.slice(t,a);for(let c=0;c2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,e7(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=je.from(r,a)),je.isBuffer(r))return r.length===0?-1:vX(e,r,t,a,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):vX(e,[r],t,a,n);throw new TypeError("val must be string, number or Buffer")}function vX(e,r,t,a,n){let i=1,o=e.length,l=r.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||r.length<2)return-1;i=2,o/=2,l/=2,t/=2}function s(f,c){return i===1?f[c]:f.readUInt16BE(c*i)}let u;if(n){let f=-1;for(u=t;uo&&(t=o-l),u=t;u>=0;u--){let f=!0;for(let c=0;cn&&(a=n)):a=n;let i=r.length;a>i/2&&(a=i/2);let o;for(o=0;o>>0,isFinite(a)?(a=a>>>0,n===void 0&&(n="utf8")):(n=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((a===void 0||a>i)&&(a=i),r.length>0&&(a<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w6e(this,r,t,a);case"utf8":case"utf-8":return T6e(this,r,t,a);case"ascii":case"latin1":case"binary":return A6e(this,r,t,a);case"base64":return M6e(this,r,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k6e(this,r,t,a);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};je.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S6e(e,r,t){return r===0&&t===e.length?j6.fromByteArray(e):j6.fromByteArray(e.slice(r,t))}function bX(e,r,t){t=Math.min(e.length,t);let a=[],n=r;for(;n239?4:i>223?3:i>191?2:1;if(n+l<=t){let s,u,f,c;switch(l){case 1:i<128&&(o=i);break;case 2:s=e[n+1],(s&192)===128&&(c=(i&31)<<6|s&63,c>127&&(o=c));break;case 3:s=e[n+1],u=e[n+2],(s&192)===128&&(u&192)===128&&(c=(i&15)<<12|(s&63)<<6|u&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:s=e[n+1],u=e[n+2],f=e[n+3],(s&192)===128&&(u&192)===128&&(f&192)===128&&(c=(i&15)<<18|(s&63)<<12|(u&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,a.push(o>>>10&1023|55296),o=56320|o&1023),a.push(o),n+=l}return q6e(a)}var hX=4096;function q6e(e){let r=e.length;if(r<=hX)return String.fromCharCode.apply(String,e);let t="",a=0;for(;aa)&&(t=a);let n="";for(let i=r;ia&&(r=a),t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),tt)throw new RangeError("Trying to access beyond buffer length")}je.prototype.readUintLE=je.prototype.readUIntLE=function(r,t,a){r=r>>>0,t=t>>>0,a||Ya(r,t,this.length);let n=this[r],i=1,o=0;for(;++o>>0,t=t>>>0,a||Ya(r,t,this.length);let n=this[r+--t],i=1;for(;t>0&&(i*=256);)n+=this[r+--t]*i;return n};je.prototype.readUint8=je.prototype.readUInt8=function(r,t){return r=r>>>0,t||Ya(r,1,this.length),this[r]};je.prototype.readUint16LE=je.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||Ya(r,2,this.length),this[r]|this[r+1]<<8};je.prototype.readUint16BE=je.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||Ya(r,2,this.length),this[r]<<8|this[r+1]};je.prototype.readUint32LE=je.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};je.prototype.readUint32BE=je.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};je.prototype.readBigUInt64LE=xs(function(r){r=r>>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,i=this[++r]+this[++r]*2**8+this[++r]*2**16+a*2**24;return BigInt(n)+(BigInt(i)<>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],i=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+a;return(BigInt(n)<>>0,t=t>>>0,a||Ya(r,t,this.length);let n=this[r],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};je.prototype.readIntBE=function(r,t,a){r=r>>>0,t=t>>>0,a||Ya(r,t,this.length);let n=t,i=1,o=this[r+--n];for(;n>0&&(i*=256);)o+=this[r+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};je.prototype.readInt8=function(r,t){return r=r>>>0,t||Ya(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};je.prototype.readInt16LE=function(r,t){r=r>>>0,t||Ya(r,2,this.length);let a=this[r]|this[r+1]<<8;return a&32768?a|4294901760:a};je.prototype.readInt16BE=function(r,t){r=r>>>0,t||Ya(r,2,this.length);let a=this[r+1]|this[r]<<8;return a&32768?a|4294901760:a};je.prototype.readInt32LE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};je.prototype.readInt32BE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};je.prototype.readBigInt64LE=xs(function(r){r=r>>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(a<<24);return(BigInt(n)<>>0,nv(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&B0(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<>>0,t||Ya(r,4,this.length),av.read(this,r,!0,23,4)};je.prototype.readFloatBE=function(r,t){return r=r>>>0,t||Ya(r,4,this.length),av.read(this,r,!1,23,4)};je.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||Ya(r,8,this.length),av.read(this,r,!0,52,8)};je.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||Ya(r,8,this.length),av.read(this,r,!1,52,8)};function Gn(e,r,t,a,n,i){if(!je.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||re.length)throw new RangeError("Index out of range")}je.prototype.writeUintLE=je.prototype.writeUIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;Gn(this,r,t,a,l,0)}let i=1,o=0;for(this[t]=r&255;++o>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;Gn(this,r,t,a,l,0)}let i=a-1,o=1;for(this[t+i]=r&255;--i>=0&&(o*=256);)this[t+i]=r/o&255;return t+a};je.prototype.writeUint8=je.prototype.writeUInt8=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,1,255,0),this[t]=r&255,t+1};je.prototype.writeUint16LE=je.prototype.writeUInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};je.prototype.writeUint16BE=je.prototype.writeUInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};je.prototype.writeUint32LE=je.prototype.writeUInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};je.prototype.writeUint32BE=je.prototype.writeUInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function xX(e,r,t,a,n){MX(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,t}function _X(e,r,t,a,n){MX(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t+7]=i,i=i>>8,e[t+6]=i,i=i>>8,e[t+5]=i,i=i>>8,e[t+4]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=o,o=o>>8,e[t+2]=o,o=o>>8,e[t+1]=o,o=o>>8,e[t]=o,t+8}je.prototype.writeBigUInt64LE=xs(function(r,t=0){return xX(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});je.prototype.writeBigUInt64BE=xs(function(r,t=0){return _X(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});je.prototype.writeIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);Gn(this,r,t,a,s-1,-s)}let i=0,o=1,l=0;for(this[t]=r&255;++i>0)-l&255;return t+a};je.prototype.writeIntBE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);Gn(this,r,t,a,s-1,-s)}let i=a-1,o=1,l=0;for(this[t+i]=r&255;--i>=0&&(o*=256);)r<0&&l===0&&this[t+i+1]!==0&&(l=1),this[t+i]=(r/o>>0)-l&255;return t+a};je.prototype.writeInt8=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};je.prototype.writeInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};je.prototype.writeInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};je.prototype.writeInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};je.prototype.writeInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||Gn(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};je.prototype.writeBigInt64LE=xs(function(r,t=0){return xX(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});je.prototype.writeBigInt64BE=xs(function(r,t=0){return _X(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wX(e,r,t,a,n,i){if(t+a>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function TX(e,r,t,a,n){return r=+r,t=t>>>0,n||wX(e,r,t,4,34028234663852886e22,-34028234663852886e22),av.write(e,r,t,a,23,4),t+4}je.prototype.writeFloatLE=function(r,t,a){return TX(this,r,t,!0,a)};je.prototype.writeFloatBE=function(r,t,a){return TX(this,r,t,!1,a)};function AX(e,r,t,a,n){return r=+r,t=t>>>0,n||wX(e,r,t,8,17976931348623157e292,-17976931348623157e292),av.write(e,r,t,a,52,8),t+8}je.prototype.writeDoubleLE=function(r,t,a){return AX(this,r,t,!0,a)};je.prototype.writeDoubleBE=function(r,t,a){return AX(this,r,t,!1,a)};je.prototype.copy=function(r,t,a,n){if(!je.isBuffer(r))throw new TypeError("argument should be a Buffer");if(a||(a=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t>>0,a=a===void 0?this.length:a>>>0,r||(r=0);let i;if(typeof r=="number")for(i=t;i2**32?n=dX(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=dX(n)),n+="n"),a+=` It must be ${r}. Received ${n}`,a},RangeError);function dX(e){let r="",t=e.length,a=e[0]==="-"?1:0;for(;t>=a+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function P6e(e,r,t){nv(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&B0(r,e.length-(t+1))}function MX(e,r,t,a,n,i){if(e>t||e3?r===0||r===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:l=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:l=`>= ${r}${o} and <= ${t}${o}`,new tv.ERR_OUT_OF_RANGE("value",l,e)}P6e(a,n,i)}function nv(e,r){if(typeof e!="number")throw new tv.ERR_INVALID_ARG_TYPE(r,"number",e)}function B0(e,r,t){throw Math.floor(e)!==e?(nv(e,t),new tv.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new tv.ERR_BUFFER_OUT_OF_BOUNDS:new tv.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var R6e=/[^+/0-9A-Za-z-_]/g;function F6e(e){if(e=e.split("=")[0],e=e.trim().replace(R6e,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function J6(e,r){r=r||1/0;let t,a=e.length,n=null,i=[];for(let o=0;o55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(o+1===a){(r-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&i.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function N6e(e){let r=[];for(let t=0;t>8,n=t%256,i.push(n),i.push(a);return i}function kX(e){return j6.toByteArray(F6e(e))}function Ig(e,r,t,a){let n;for(n=0;n=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function jo(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function e7(e){return e!==e}var I6e=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let a=t*16;for(let n=0;n<16;++n)r[a+n]=e[t]+e[n]}return r}();function xs(e){return typeof BigInt=="undefined"?O6e:e}function O6e(){throw new Error("BigInt not supported")}});var Og=N(($ze,SX)=>{"use strict";SX.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),a=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var n=42;r[t]=n;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(r,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0}});var H0=N((Kze,qX)=>{"use strict";var B6e=Og();qX.exports=function(){return B6e()&&!!Symbol.toStringTag}});var CX=N((Qze,LX)=>{"use strict";LX.exports=Error});var DX=N((eIe,EX)=>{"use strict";EX.exports=EvalError});var RX=N((rIe,PX)=>{"use strict";PX.exports=RangeError});var NX=N((tIe,FX)=>{"use strict";FX.exports=ReferenceError});var r7=N((aIe,zX)=>{"use strict";zX.exports=SyntaxError});var U0=N((nIe,IX)=>{"use strict";IX.exports=TypeError});var BX=N((iIe,OX)=>{"use strict";OX.exports=URIError});var GX=N((oIe,UX)=>{"use strict";var HX=typeof Symbol!="undefined"&&Symbol,H6e=Og();UX.exports=function(){return typeof HX!="function"||typeof Symbol!="function"||typeof HX("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:H6e()}});var WX=N((lIe,VX)=>{"use strict";var YX={foo:{}},U6e=Object;VX.exports=function(){return{__proto__:YX}.foo===YX.foo&&!({__proto__:null}instanceof U6e)}});var XX=N((sIe,ZX)=>{"use strict";var G6e="Function.prototype.bind called on incompatible ",Y6e=Object.prototype.toString,V6e=Math.max,W6e="[object Function]",jX=function(r,t){for(var a=[],n=0;n{"use strict";var X6e=XX();JX.exports=Function.prototype.bind||X6e});var KX=N((fIe,$X)=>{"use strict";var J6e=Function.prototype.call,$6e=Object.prototype.hasOwnProperty,K6e=Bg();$X.exports=K6e.call(J6e,$6e)});var cv=N((cIe,aJ)=>{"use strict";var ft,Q6e=CX(),e7e=DX(),r7e=RX(),t7e=NX(),fv=r7(),uv=U0(),a7e=BX(),tJ=Function,t7=function(e){try{return tJ('"use strict"; return ('+e+").constructor;")()}catch(r){}},Vu=Object.getOwnPropertyDescriptor;if(Vu)try{Vu({},"")}catch(e){Vu=null}var a7=function(){throw new uv},n7e=Vu?function(){try{return arguments.callee,a7}catch(e){try{return Vu(arguments,"callee").get}catch(r){return a7}}}():a7,lv=GX()(),i7e=WX()(),Va=Object.getPrototypeOf||(i7e?function(e){return e.__proto__}:null),sv={},o7e=typeof Uint8Array=="undefined"||!Va?ft:Va(Uint8Array),Wu={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?ft:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?ft:ArrayBuffer,"%ArrayIteratorPrototype%":lv&&Va?Va([][Symbol.iterator]()):ft,"%AsyncFromSyncIteratorPrototype%":ft,"%AsyncFunction%":sv,"%AsyncGenerator%":sv,"%AsyncGeneratorFunction%":sv,"%AsyncIteratorPrototype%":sv,"%Atomics%":typeof Atomics=="undefined"?ft:Atomics,"%BigInt%":typeof BigInt=="undefined"?ft:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?ft:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?ft:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?ft:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Q6e,"%eval%":eval,"%EvalError%":e7e,"%Float32Array%":typeof Float32Array=="undefined"?ft:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?ft:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?ft:FinalizationRegistry,"%Function%":tJ,"%GeneratorFunction%":sv,"%Int8Array%":typeof Int8Array=="undefined"?ft:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?ft:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?ft:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lv&&Va?Va(Va([][Symbol.iterator]())):ft,"%JSON%":typeof JSON=="object"?JSON:ft,"%Map%":typeof Map=="undefined"?ft:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!lv||!Va?ft:Va(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?ft:Promise,"%Proxy%":typeof Proxy=="undefined"?ft:Proxy,"%RangeError%":r7e,"%ReferenceError%":t7e,"%Reflect%":typeof Reflect=="undefined"?ft:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?ft:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!lv||!Va?ft:Va(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?ft:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lv&&Va?Va(""[Symbol.iterator]()):ft,"%Symbol%":lv?Symbol:ft,"%SyntaxError%":fv,"%ThrowTypeError%":n7e,"%TypedArray%":o7e,"%TypeError%":uv,"%Uint8Array%":typeof Uint8Array=="undefined"?ft:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?ft:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?ft:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?ft:Uint32Array,"%URIError%":a7e,"%WeakMap%":typeof WeakMap=="undefined"?ft:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?ft:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?ft:WeakSet};if(Va)try{null.error}catch(e){QX=Va(Va(e)),Wu["%Error.prototype%"]=QX}var QX,l7e=function e(r){var t;if(r==="%AsyncFunction%")t=t7("async function () {}");else if(r==="%GeneratorFunction%")t=t7("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=t7("async function* () {}");else if(r==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Va&&(t=Va(n.prototype))}return Wu[r]=t,t},eJ={__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"]},G0=Bg(),Hg=KX(),s7e=G0.call(Function.call,Array.prototype.concat),u7e=G0.call(Function.apply,Array.prototype.splice),rJ=G0.call(Function.call,String.prototype.replace),Ug=G0.call(Function.call,String.prototype.slice),f7e=G0.call(Function.call,RegExp.prototype.exec),c7e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,v7e=/\\(\\)?/g,h7e=function(r){var t=Ug(r,0,1),a=Ug(r,-1);if(t==="%"&&a!=="%")throw new fv("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new fv("invalid intrinsic syntax, expected opening `%`");var n=[];return rJ(r,c7e,function(i,o,l,s){n[n.length]=l?rJ(s,v7e,"$1"):o||i}),n},d7e=function(r,t){var a=r,n;if(Hg(eJ,a)&&(n=eJ[a],a="%"+n[0]+"%"),Hg(Wu,a)){var i=Wu[a];if(i===sv&&(i=l7e(a)),typeof i=="undefined"&&!t)throw new uv("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:i}}throw new fv("intrinsic "+r+" does not exist!")};aJ.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new uv("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new uv('"allowMissing" argument must be a boolean');if(f7e(/^%?[^%]*%?$/,r)===null)throw new fv("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=h7e(r),n=a.length>0?a[0]:"",i=d7e("%"+n+"%",t),o=i.name,l=i.value,s=!1,u=i.alias;u&&(n=u[0],u7e(a,s7e([0,1],u)));for(var f=1,c=!0;f=a.length){var m=Vu(l,v);c=!!m,c&&"get"in m&&!("originalValue"in m.get)?l=m.get:l=l[v]}else c=Hg(l,v),l=l[v];c&&!s&&(Wu[o]=l)}}return l}});var Yg=N((vIe,nJ)=>{"use strict";var p7e=cv(),Gg=p7e("%Object.defineProperty%",!0)||!1;if(Gg)try{Gg({},"a",{value:1})}catch(e){Gg=!1}nJ.exports=Gg});var Y0=N((hIe,iJ)=>{"use strict";var y7e=cv(),Vg=y7e("%Object.getOwnPropertyDescriptor%",!0);if(Vg)try{Vg([],"length")}catch(e){Vg=null}iJ.exports=Vg});var uJ=N((dIe,sJ)=>{"use strict";var oJ=Yg(),m7e=r7(),vv=U0(),lJ=Y0();sJ.exports=function(r,t,a){if(!r||typeof r!="object"&&typeof r!="function")throw new vv("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new vv("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new vv("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new vv("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new vv("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new vv("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,s=!!lJ&&lJ(r,t);if(oJ)oJ(r,t,{configurable:o===null&&s?s.configurable:!o,enumerable:n===null&&s?s.enumerable:!n,value:a,writable:i===null&&s?s.writable:!i});else if(l||!n&&!i&&!o)r[t]=a;else throw new m7e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var i7=N((pIe,cJ)=>{"use strict";var n7=Yg(),fJ=function(){return!!n7};fJ.hasArrayLengthDefineBug=function(){if(!n7)return null;try{return n7([],"length",{value:1}).length!==1}catch(r){return!0}};cJ.exports=fJ});var yJ=N((yIe,pJ)=>{"use strict";var g7e=cv(),vJ=uJ(),b7e=i7()(),hJ=Y0(),dJ=U0(),x7e=g7e("%Math.floor%");pJ.exports=function(r,t){if(typeof r!="function")throw new dJ("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||x7e(t)!==t)throw new dJ("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,i=!0;if("length"in r&&hJ){var o=hJ(r,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(i=!1)}return(n||i||!a)&&(b7e?vJ(r,"length",t,!0,!0):vJ(r,"length",t)),r}});var V0=N((mIe,Wg)=>{"use strict";var o7=Bg(),jg=cv(),_7e=yJ(),w7e=U0(),bJ=jg("%Function.prototype.apply%"),xJ=jg("%Function.prototype.call%"),_J=jg("%Reflect.apply%",!0)||o7.call(xJ,bJ),mJ=Yg(),T7e=jg("%Math.max%");Wg.exports=function(r){if(typeof r!="function")throw new w7e("a function is required");var t=_J(o7,xJ,arguments);return _7e(t,1+T7e(0,r.length-(arguments.length-1)),!0)};var gJ=function(){return _J(o7,bJ,arguments)};mJ?mJ(Wg.exports,"apply",{value:gJ}):Wg.exports.apply=gJ});var hv=N((gIe,AJ)=>{"use strict";var wJ=cv(),TJ=V0(),A7e=TJ(wJ("String.prototype.indexOf"));AJ.exports=function(r,t){var a=wJ(r,!!t);return typeof a=="function"&&A7e(r,".prototype.")>-1?TJ(a):a}});var SJ=N((bIe,kJ)=>{"use strict";var M7e=H0()(),k7e=hv(),l7=k7e("Object.prototype.toString"),Zg=function(r){return M7e&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:l7(r)==="[object Arguments]"},MJ=function(r){return Zg(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&l7(r)!=="[object Array]"&&l7(r.callee)==="[object Function]"},S7e=function(){return Zg(arguments)}();Zg.isLegacyArguments=MJ;kJ.exports=S7e?Zg:MJ});var CJ=N((xIe,LJ)=>{"use strict";var q7e=Object.prototype.toString,L7e=Function.prototype.toString,C7e=/^\s*(?:function)?\*/,qJ=H0()(),s7=Object.getPrototypeOf,E7e=function(){if(!qJ)return!1;try{return Function("return function*() {}")()}catch(e){}},u7;LJ.exports=function(r){if(typeof r!="function")return!1;if(C7e.test(L7e.call(r)))return!0;if(!qJ){var t=q7e.call(r);return t==="[object GeneratorFunction]"}if(!s7)return!1;if(typeof u7=="undefined"){var a=E7e();u7=a?s7(a):!1}return s7(r)===u7}});var RJ=N((_Ie,PJ)=>{"use strict";var DJ=Function.prototype.toString,dv=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,c7,Xg;if(typeof dv=="function"&&typeof Object.defineProperty=="function")try{c7=Object.defineProperty({},"length",{get:function(){throw Xg}}),Xg={},dv(function(){throw 42},null,c7)}catch(e){e!==Xg&&(dv=null)}else dv=null;var D7e=/^\s*class\b/,v7=function(r){try{var t=DJ.call(r);return D7e.test(t)}catch(a){return!1}},f7=function(r){try{return v7(r)?!1:(DJ.call(r),!0)}catch(t){return!1}},Jg=Object.prototype.toString,P7e="[object Object]",R7e="[object Function]",F7e="[object GeneratorFunction]",N7e="[object HTMLAllCollection]",z7e="[object HTML document.all class]",I7e="[object HTMLCollection]",O7e=typeof Symbol=="function"&&!!Symbol.toStringTag,B7e=!(0 in[,]),h7=function(){return!1};typeof document=="object"&&(EJ=document.all,Jg.call(EJ)===Jg.call(document.all)&&(h7=function(r){if((B7e||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=Jg.call(r);return(t===N7e||t===z7e||t===I7e||t===P7e)&&r("")==null}catch(a){}return!1}));var EJ;PJ.exports=dv?function(r){if(h7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{dv(r,null,c7)}catch(t){if(t!==Xg)return!1}return!v7(r)&&f7(r)}:function(r){if(h7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(O7e)return f7(r);if(v7(r))return!1;var t=Jg.call(r);return t!==R7e&&t!==F7e&&!/^\[object HTML/.test(t)?!1:f7(r)}});var d7=N((wIe,NJ)=>{"use strict";var H7e=RJ(),U7e=Object.prototype.toString,FJ=Object.prototype.hasOwnProperty,G7e=function(r,t,a){for(var n=0,i=r.length;n=3&&(n=a),U7e.call(r)==="[object Array]"?G7e(r,t,n):typeof r=="string"?Y7e(r,t,n):V7e(r,t,n)};NJ.exports=W7e});var y7=N((TIe,zJ)=>{"use strict";var p7=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],j7e=typeof globalThis=="undefined"?window:globalThis;zJ.exports=function(){for(var r=[],t=0;t{"use strict";var Kg=d7(),Z7e=y7(),IJ=V0(),b7=hv(),$g=Y0(),X7e=b7("Object.prototype.toString"),BJ=H0()(),OJ=typeof globalThis=="undefined"?window:globalThis,g7=Z7e(),x7=b7("String.prototype.slice"),m7=Object.getPrototypeOf,J7e=b7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1?t:t!=="Object"?!1:K7e(r)}return $g?$7e(r):null}});var ZJ=N((MIe,jJ)=>{"use strict";var GJ=d7(),Q7e=y7(),w7=hv(),eTe=w7("Object.prototype.toString"),YJ=H0()(),e2=Y0(),rTe=typeof globalThis=="undefined"?window:globalThis,VJ=Q7e(),tTe=w7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1}return e2?nTe(r):!1}});var M7=N(it=>{"use strict";var iTe=SJ(),oTe=CJ(),mo=UJ(),XJ=ZJ();function pv(e){return e.call.bind(e)}var JJ=typeof BigInt!="undefined",$J=typeof Symbol!="undefined",zi=pv(Object.prototype.toString),lTe=pv(Number.prototype.valueOf),sTe=pv(String.prototype.valueOf),uTe=pv(Boolean.prototype.valueOf);JJ&&(KJ=pv(BigInt.prototype.valueOf));var KJ;$J&&(QJ=pv(Symbol.prototype.valueOf));var QJ;function j0(e,r){if(typeof e!="object")return!1;try{return r(e),!0}catch(t){return!1}}it.isArgumentsObject=iTe;it.isGeneratorFunction=oTe;it.isTypedArray=XJ;function fTe(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}it.isPromise=fTe;function cTe(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):XJ(e)||r$(e)}it.isArrayBufferView=cTe;function vTe(e){return mo(e)==="Uint8Array"}it.isUint8Array=vTe;function hTe(e){return mo(e)==="Uint8ClampedArray"}it.isUint8ClampedArray=hTe;function dTe(e){return mo(e)==="Uint16Array"}it.isUint16Array=dTe;function pTe(e){return mo(e)==="Uint32Array"}it.isUint32Array=pTe;function yTe(e){return mo(e)==="Int8Array"}it.isInt8Array=yTe;function mTe(e){return mo(e)==="Int16Array"}it.isInt16Array=mTe;function gTe(e){return mo(e)==="Int32Array"}it.isInt32Array=gTe;function bTe(e){return mo(e)==="Float32Array"}it.isFloat32Array=bTe;function xTe(e){return mo(e)==="Float64Array"}it.isFloat64Array=xTe;function _Te(e){return mo(e)==="BigInt64Array"}it.isBigInt64Array=_Te;function wTe(e){return mo(e)==="BigUint64Array"}it.isBigUint64Array=wTe;function r2(e){return zi(e)==="[object Map]"}r2.working=typeof Map!="undefined"&&r2(new Map);function TTe(e){return typeof Map=="undefined"?!1:r2.working?r2(e):e instanceof Map}it.isMap=TTe;function t2(e){return zi(e)==="[object Set]"}t2.working=typeof Set!="undefined"&&t2(new Set);function ATe(e){return typeof Set=="undefined"?!1:t2.working?t2(e):e instanceof Set}it.isSet=ATe;function a2(e){return zi(e)==="[object WeakMap]"}a2.working=typeof WeakMap!="undefined"&&a2(new WeakMap);function MTe(e){return typeof WeakMap=="undefined"?!1:a2.working?a2(e):e instanceof WeakMap}it.isWeakMap=MTe;function A7(e){return zi(e)==="[object WeakSet]"}A7.working=typeof WeakSet!="undefined"&&A7(new WeakSet);function kTe(e){return A7(e)}it.isWeakSet=kTe;function n2(e){return zi(e)==="[object ArrayBuffer]"}n2.working=typeof ArrayBuffer!="undefined"&&n2(new ArrayBuffer);function e$(e){return typeof ArrayBuffer=="undefined"?!1:n2.working?n2(e):e instanceof ArrayBuffer}it.isArrayBuffer=e$;function i2(e){return zi(e)==="[object DataView]"}i2.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&i2(new DataView(new ArrayBuffer(1),0,1));function r$(e){return typeof DataView=="undefined"?!1:i2.working?i2(e):e instanceof DataView}it.isDataView=r$;var T7=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function W0(e){return zi(e)==="[object SharedArrayBuffer]"}function t$(e){return typeof T7=="undefined"?!1:(typeof W0.working=="undefined"&&(W0.working=W0(new T7)),W0.working?W0(e):e instanceof T7)}it.isSharedArrayBuffer=t$;function STe(e){return zi(e)==="[object AsyncFunction]"}it.isAsyncFunction=STe;function qTe(e){return zi(e)==="[object Map Iterator]"}it.isMapIterator=qTe;function LTe(e){return zi(e)==="[object Set Iterator]"}it.isSetIterator=LTe;function CTe(e){return zi(e)==="[object Generator]"}it.isGeneratorObject=CTe;function ETe(e){return zi(e)==="[object WebAssembly.Module]"}it.isWebAssemblyCompiledModule=ETe;function a$(e){return j0(e,lTe)}it.isNumberObject=a$;function n$(e){return j0(e,sTe)}it.isStringObject=n$;function i$(e){return j0(e,uTe)}it.isBooleanObject=i$;function o$(e){return JJ&&j0(e,KJ)}it.isBigIntObject=o$;function l$(e){return $J&&j0(e,QJ)}it.isSymbolObject=l$;function DTe(e){return a$(e)||n$(e)||i$(e)||o$(e)||l$(e)}it.isBoxedPrimitive=DTe;function PTe(e){return typeof Uint8Array!="undefined"&&(e$(e)||t$(e))}it.isAnyArrayBuffer=PTe;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(it,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var k7=N((SIe,s$)=>{s$.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}});var D7=N(ot=>{var u$=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),a={},n=0;n=n)return l;switch(l){case"%s":return String(a[t++]);case"%d":return Number(a[t++]);case"%j":try{return JSON.stringify(a[t++])}catch(s){return"[Circular]"}default:return l}}),o=a[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),C7(r)?t.showHidden=r:r&&ot._extend(t,r),Zu(t.showHidden)&&(t.showHidden=!1),Zu(t.depth)&&(t.depth=2),Zu(t.colors)&&(t.colors=!1),Zu(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=FTe),u2(t,e,t.depth)}ot.inspect=_s;_s.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]};_s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function FTe(e,r){var t=_s.styles[r];return t?"\x1B["+_s.colors[t][0]+"m"+e+"\x1B["+_s.colors[t][1]+"m":e}function NTe(e,r){return e}function zTe(e){var r={};return e.forEach(function(t,a){r[t]=!0}),r}function u2(e,r,t){if(e.customInspect&&r&&s2(r.inspect)&&r.inspect!==ot.inspect&&!(r.constructor&&r.constructor.prototype===r)){var a=r.inspect(t,e);return v2(a)||(a=u2(e,a,t)),a}var n=ITe(e,r);if(n)return n;var i=Object.keys(r),o=zTe(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),X0(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return S7(r);if(i.length===0){if(s2(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(Z0(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(f2(r))return e.stylize(Date.prototype.toString.call(r),"date");if(X0(r))return S7(r)}var s="",u=!1,f=["{","}"];if(c$(r)&&(u=!0,f=["[","]"]),s2(r)){var c=r.name?": "+r.name:"";s=" [Function"+c+"]"}if(Z0(r)&&(s=" "+RegExp.prototype.toString.call(r)),f2(r)&&(s=" "+Date.prototype.toUTCString.call(r)),X0(r)&&(s=" "+S7(r)),i.length===0&&(!u||r.length==0))return f[0]+s+f[1];if(t<0)return Z0(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return u?v=OTe(e,r,t,o,i):v=i.map(function(d){return L7(e,r,t,o,d,u)}),e.seen.pop(),BTe(v,s,f)}function ITe(e,r){if(Zu(r))return e.stylize("undefined","undefined");if(v2(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(v$(r))return e.stylize(""+r,"number");if(C7(r))return e.stylize(""+r,"boolean");if(c2(r))return e.stylize("null","null")}function S7(e){return"["+Error.prototype.toString.call(e)+"]"}function OTe(e,r,t,a,n){for(var i=[],o=0,l=r.length;o-1&&(i?l=l.split(` `).map(function(u){return" "+u}).join(` `).slice(2):l=` @@ -28,7 +28,7 @@ `))):l=e.stylize("[Circular]","special")),Zu(o)){if(i&&n.match(/^\d+$/))return l;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+l}function BTe(e,r,t){var a=0,n=e.reduce(function(i,o){return a++,o.indexOf(` `)>=0&&a++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?t[0]+(r===""?"":r+` `)+" "+e.join(`, - `)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}ot.types=M7();function c$(e){return Array.isArray(e)}ot.isArray=c$;function C7(e){return typeof e=="boolean"}ot.isBoolean=C7;function c2(e){return e===null}ot.isNull=c2;function HTe(e){return e==null}ot.isNullOrUndefined=HTe;function v$(e){return typeof e=="number"}ot.isNumber=v$;function v2(e){return typeof e=="string"}ot.isString=v2;function UTe(e){return typeof e=="symbol"}ot.isSymbol=UTe;function Zu(e){return e===void 0}ot.isUndefined=Zu;function Z0(e){return yv(e)&&E7(e)==="[object RegExp]"}ot.isRegExp=Z0;ot.types.isRegExp=Z0;function yv(e){return typeof e=="object"&&e!==null}ot.isObject=yv;function f2(e){return yv(e)&&E7(e)==="[object Date]"}ot.isDate=f2;ot.types.isDate=f2;function X0(e){return yv(e)&&(E7(e)==="[object Error]"||e instanceof Error)}ot.isError=X0;ot.types.isNativeError=X0;function s2(e){return typeof e=="function"}ot.isFunction=s2;function GTe(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ot.isPrimitive=GTe;ot.isBuffer=k7();function E7(e){return Object.prototype.toString.call(e)}function q7(e){return e<10?"0"+e.toString(10):e.toString(10)}var YTe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function VTe(){var e=new Date,r=[q7(e.getHours()),q7(e.getMinutes()),q7(e.getSeconds())].join(":");return[e.getDate(),YTe[e.getMonth()],r].join(" ")}ot.log=function(){console.log("%s - %s",VTe(),ot.format.apply(ot,arguments))};ot.inherits=kl();ot._extend=function(e,r){if(!r||!yv(r))return e;for(var t=Object.keys(r),a=t.length;a--;)e[t[a]]=r[t[a]];return e};function h$(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var ju=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ot.promisify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');if(ju&&r[ju]){var t=r[ju];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,ju,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var a,n,i=new Promise(function(s,u){a=s,n=u}),o=[],l=0;l{"use strict";function d$(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZTe(e){for(var r=1;r0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(t){var a={data:t,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var a=this.head,n=""+a.data;a=a.next;)n+=t+a.data;return n}},{key:"concat",value:function(t){if(this.length===0)return h2.alloc(0);for(var a=h2.allocUnsafe(t>>>0),n=this.head,i=0;n;)r8e(n.data,a,i),i+=n.data.length,n=n.next;return a}},{key:"consume",value:function(t,a){var n;return to.length?o.length:t;if(l===o.length?i+=o:i+=o.slice(0,t),t-=l,t===0){l===o.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(l));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(t){var a=h2.allocUnsafe(t),n=this.head,i=1;for(n.data.copy(a),t-=n.data.length;n=n.next;){var o=n.data,l=t>o.length?o.length:t;if(o.copy(a,a.length-t,0,l),t-=l,t===0){l===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(l));break}++i}return this.length-=i,a}},{key:e8e,value:function(t,a){return P7(this,ZTe({},a,{depth:0,customInspect:!1}))}}]),e}()});var F7=N((CIe,b$)=>{"use strict";function t8e(e,r){var t=this,a=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return a||n?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(R7,this,e)):process.nextTick(R7,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!r&&i?t._writableState?t._writableState.errorEmitted?process.nextTick(d2,t):(t._writableState.errorEmitted=!0,process.nextTick(g$,t,i)):process.nextTick(g$,t,i):r?(process.nextTick(d2,t),r(i)):process.nextTick(d2,t)}),this)}function g$(e,r){R7(e,r),d2(e)}function d2(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a8e(){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 R7(e,r){e.emit("error",r)}function n8e(e,r){var t=e._readableState,a=e._writableState;t&&t.autoDestroy||a&&a.autoDestroy?e.destroy(r):e.emit("error",r)}b$.exports={destroy:t8e,undestroy:a8e,errorOrDestroy:n8e}});var Xu=N((EIe,w$)=>{"use strict";function i8e(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}var _$={};function Ii(e,r,t){t||(t=Error);function a(i,o,l){return typeof r=="string"?r:r(i,o,l)}var n=function(i){i8e(o,i);function o(l,s,u){return i.call(this,a(l,s,u))||this}return o}(t);n.prototype.name=t.name,n.prototype.code=e,_$[e]=n}function x$(e,r){if(Array.isArray(e)){var t=e.length;return e=e.map(function(a){return String(a)}),t>2?"one of ".concat(r," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:t===2?"one of ".concat(r," ").concat(e[0]," or ").concat(e[1]):"of ".concat(r," ").concat(e[0])}else return"of ".concat(r," ").concat(String(e))}function o8e(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function l8e(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function s8e(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}Ii("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);Ii("ERR_INVALID_ARG_TYPE",function(e,r,t){var a;typeof r=="string"&&o8e(r,"not ")?(a="must not be",r=r.replace(/^not /,"")):a="must be";var n;if(l8e(e," argument"))n="The ".concat(e," ").concat(a," ").concat(x$(r,"type"));else{var i=s8e(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(i," ").concat(a," ").concat(x$(r,"type"))}return n+=". Received type ".concat(typeof t),n},TypeError);Ii("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ii("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ii("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ii("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ii("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ii("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ii("ERR_STREAM_WRITE_AFTER_END","write after end");Ii("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ii("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ii("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");w$.exports.codes=_$});var N7=N((DIe,T$)=>{"use strict";var u8e=Xu().codes.ERR_INVALID_OPT_VALUE;function f8e(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function c8e(e,r,t,a){var n=f8e(r,a,t);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var i=a?t:"highWaterMark";throw new u8e(i,n)}return Math.floor(n)}return e.objectMode?16:16*1024}T$.exports={getHighWaterMark:c8e}});var M$=N((PIe,A$)=>{A$.exports=v8e;function v8e(e,r){if(z7("noDeprecation"))return e;var t=!1;function a(){if(!t){if(z7("throwDeprecation"))throw new Error(r);z7("traceDeprecation")?console.trace(r):console.warn(r),t=!0}return e.apply(this,arguments)}return a}function z7(e){try{if(!window.localStorage)return!1}catch(t){return!1}var r=window.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}});var B7=N((RIe,E$)=>{"use strict";E$.exports=la;function S$(e){var r=this;this.next=null,this.entry=null,this.finish=function(){O8e(r,e)}}var mv;la.WritableState=$0;var h8e={deprecate:M$()},q$=Y6(),y2=ov().Buffer,d8e=window.Uint8Array||function(){};function p8e(e){return y2.from(e)}function y8e(e){return y2.isBuffer(e)||e instanceof d8e}var O7=F7(),m8e=N7(),g8e=m8e.getHighWaterMark,ws=Xu().codes,b8e=ws.ERR_INVALID_ARG_TYPE,x8e=ws.ERR_METHOD_NOT_IMPLEMENTED,_8e=ws.ERR_MULTIPLE_CALLBACK,w8e=ws.ERR_STREAM_CANNOT_PIPE,T8e=ws.ERR_STREAM_DESTROYED,A8e=ws.ERR_STREAM_NULL_VALUES,M8e=ws.ERR_STREAM_WRITE_AFTER_END,k8e=ws.ERR_UNKNOWN_ENCODING,gv=O7.errorOrDestroy;kl()(la,q$);function S8e(){}function $0(e,r,t){mv=mv||Ju(),e=e||{},typeof t!="boolean"&&(t=r instanceof mv),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=g8e(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){R8e(r,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new S$(this)}$0.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty($0.prototype,"buffer",{get:h8e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var p2;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(p2=Function.prototype[Symbol.hasInstance],Object.defineProperty(la,Symbol.hasInstance,{value:function(r){return p2.call(this,r)?!0:this!==la?!1:r&&r._writableState instanceof $0}})):p2=function(r){return r instanceof this};function la(e){mv=mv||Ju();var r=this instanceof mv;if(!r&&!p2.call(la,this))return new la(e);this._writableState=new $0(e,this,r),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)),q$.call(this)}la.prototype.pipe=function(){gv(this,new w8e)};function q8e(e,r){var t=new M8e;gv(e,t),process.nextTick(r,t)}function L8e(e,r,t,a){var n;return t===null?n=new A8e:typeof t!="string"&&!r.objectMode&&(n=new b8e("chunk",["string","Buffer"],t)),n?(gv(e,n),process.nextTick(a,n),!1):!0}la.prototype.write=function(e,r,t){var a=this._writableState,n=!1,i=!a.objectMode&&y8e(e);return i&&!y2.isBuffer(e)&&(e=p8e(e)),typeof r=="function"&&(t=r,r=null),i?r="buffer":r||(r=a.defaultEncoding),typeof t!="function"&&(t=S8e),a.ending?q8e(this,t):(i||L8e(this,a,e,t))&&(a.pendingcb++,n=E8e(this,a,i,e,r,t)),n};la.prototype.cork=function(){this._writableState.corked++};la.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&L$(this,e))};la.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new k8e(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(la.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function C8e(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=y2.from(r,t)),r}Object.defineProperty(la.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function E8e(e,r,t,a,n,i){if(!t){var o=C8e(r,a,n);a!==o&&(t=!0,n="buffer",a=o)}var l=r.objectMode?1:a.length;r.length+=l;var s=r.length{"use strict";var B8e=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};P$.exports=Zo;var D$=G7(),U7=B7();kl()(Zo,D$);for(H7=B8e(U7.prototype),m2=0;m2{var b2=ov(),Xo=b2.Buffer;function R$(e,r){for(var t in e)r[t]=e[t]}Xo.from&&Xo.alloc&&Xo.allocUnsafe&&Xo.allocUnsafeSlow?F$.exports=b2:(R$(b2,Y7),Y7.Buffer=$u);function $u(e,r,t){return Xo(e,r,t)}$u.prototype=Object.create(Xo.prototype);R$(Xo,$u);$u.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Xo(e,r,t)};$u.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=Xo(e);return r!==void 0?typeof t=="string"?a.fill(r,t):a.fill(r):a.fill(0),a};$u.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Xo(e)};$u.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return b2.SlowBuffer(e)}});var j7=N(I$=>{"use strict";var W7=N$().Buffer,z$=W7.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 G8e(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function Y8e(e){var r=G8e(e);if(typeof r!="string"&&(W7.isEncoding===z$||!z$(e)))throw new Error("Unknown encoding: "+e);return r||e}I$.StringDecoder=K0;function K0(e){this.encoding=Y8e(e);var r;switch(this.encoding){case"utf16le":this.text=J8e,this.end=$8e,r=4;break;case"utf8":this.fillLast=j8e,r=4;break;case"base64":this.text=K8e,this.end=Q8e,r=3;break;default:this.write=eAe,this.end=rAe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=W7.allocUnsafe(r)}K0.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function V8e(e,r,t){var a=r.length-1;if(a=0?(n>0&&(e.lastNeed=n-1),n):--a=0?(n>0&&(e.lastNeed=n-2),n):--a=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function W8e(e,r,t){if((r[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function j8e(e){var r=this.lastTotal-this.lastNeed,t=W8e(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function Z8e(e,r){var t=V8e(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var a=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",r,a)}function X8e(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function J8e(e,r){if((e.length-r)%2===0){var t=e.toString("utf16le",r);if(t){var a=t.charCodeAt(t.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function $8e(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function K8e(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===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",r,e.length-t))}function Q8e(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function eAe(e){return e.toString(this.encoding)}function rAe(e){return e&&e.length?this.write(e):""}});var x2=N((zIe,H$)=>{"use strict";var O$=Xu().codes.ERR_STREAM_PREMATURE_CLOSE;function tAe(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,a=new Array(t),n=0;n{"use strict";var _2;function Ts(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var iAe=x2(),As=Symbol("lastResolve"),Ku=Symbol("lastReject"),Q0=Symbol("error"),w2=Symbol("ended"),Qu=Symbol("lastPromise"),Z7=Symbol("handlePromise"),ef=Symbol("stream");function Ms(e,r){return{value:e,done:r}}function oAe(e){var r=e[As];if(r!==null){var t=e[ef].read();t!==null&&(e[Qu]=null,e[As]=null,e[Ku]=null,r(Ms(t,!1)))}}function lAe(e){process.nextTick(oAe,e)}function sAe(e,r){return function(t,a){e.then(function(){if(r[w2]){t(Ms(void 0,!0));return}r[Z7](t,a)},a)}}var uAe=Object.getPrototypeOf(function(){}),fAe=Object.setPrototypeOf((_2={get stream(){return this[ef]},next:function(){var r=this,t=this[Q0];if(t!==null)return Promise.reject(t);if(this[w2])return Promise.resolve(Ms(void 0,!0));if(this[ef].destroyed)return new Promise(function(o,l){process.nextTick(function(){r[Q0]?l(r[Q0]):o(Ms(void 0,!0))})});var a=this[Qu],n;if(a)n=new Promise(sAe(a,this));else{var i=this[ef].read();if(i!==null)return Promise.resolve(Ms(i,!1));n=new Promise(this[Z7])}return this[Qu]=n,n}},Ts(_2,Symbol.asyncIterator,function(){return this}),Ts(_2,"return",function(){var r=this;return new Promise(function(t,a){r[ef].destroy(null,function(n){if(n){a(n);return}t(Ms(void 0,!0))})})}),_2),uAe),cAe=function(r){var t,a=Object.create(fAe,(t={},Ts(t,ef,{value:r,writable:!0}),Ts(t,As,{value:null,writable:!0}),Ts(t,Ku,{value:null,writable:!0}),Ts(t,Q0,{value:null,writable:!0}),Ts(t,w2,{value:r._readableState.endEmitted,writable:!0}),Ts(t,Z7,{value:function(i,o){var l=a[ef].read();l?(a[Qu]=null,a[As]=null,a[Ku]=null,i(Ms(l,!1))):(a[As]=i,a[Ku]=o)},writable:!0}),t));return a[Qu]=null,iAe(r,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=a[Ku];i!==null&&(a[Qu]=null,a[As]=null,a[Ku]=null,i(n)),a[Q0]=n;return}var o=a[As];o!==null&&(a[Qu]=null,a[As]=null,a[Ku]=null,o(Ms(void 0,!0))),a[w2]=!0}),r.on("readable",lAe.bind(null,a)),a};U$.exports=cAe});var V$=N((OIe,Y$)=>{Y$.exports=function(){throw new Error("Readable.from is not available in the browser")}});var G7=N((HIe,rK)=>{"use strict";rK.exports=gt;var bv;gt.ReadableState=X$;var BIe=Qs().EventEmitter,Z$=function(r,t){return r.listeners(t).length},rd=Y6(),T2=ov().Buffer,vAe=window.Uint8Array||function(){};function hAe(e){return T2.from(e)}function dAe(e){return T2.isBuffer(e)||e instanceof vAe}var X7=D7(),et;X7&&X7.debuglog?et=X7.debuglog("stream"):et=function(){};var pAe=m$(),tT=F7(),yAe=N7(),mAe=yAe.getHighWaterMark,A2=Xu().codes,gAe=A2.ERR_INVALID_ARG_TYPE,bAe=A2.ERR_STREAM_PUSH_AFTER_EOF,xAe=A2.ERR_METHOD_NOT_IMPLEMENTED,_Ae=A2.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,xv,J7,$7;kl()(gt,rd);var ed=tT.errorOrDestroy,K7=["error","close","destroy","pause","resume"];function wAe(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function X$(e,r,t){bv=bv||Ju(),e=e||{},typeof t!="boolean"&&(t=r instanceof bv),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=mAe(this,e,"readableHighWaterMark",t),this.buffer=new pAe,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&&(xv||(xv=j7().StringDecoder),this.decoder=new xv(e.encoding),this.encoding=e.encoding)}function gt(e){if(bv=bv||Ju(),!(this instanceof gt))return new gt(e);var r=this instanceof bv;this._readableState=new X$(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),rd.call(this)}Object.defineProperty(gt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){this._readableState&&(this._readableState.destroyed=r)}});gt.prototype.destroy=tT.destroy;gt.prototype._undestroy=tT.undestroy;gt.prototype._destroy=function(e,r){r(e)};gt.prototype.push=function(e,r){var t=this._readableState,a;return t.objectMode?a=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=T2.from(e,r),r=""),a=!0),J$(this,e,r,!1,a)};gt.prototype.unshift=function(e){return J$(this,e,null,!0,!1)};function J$(e,r,t,a,n){et("readableAddChunk",r);var i=e._readableState;if(r===null)i.reading=!1,MAe(e,i);else{var o;if(n||(o=TAe(i,r)),o)ed(e,o);else if(i.objectMode||r&&r.length>0)if(typeof r!="string"&&!i.objectMode&&Object.getPrototypeOf(r)!==T2.prototype&&(r=hAe(r)),a)i.endEmitted?ed(e,new _Ae):Q7(e,i,r,!0);else if(i.ended)ed(e,new bAe);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!t?(r=i.decoder.write(r),i.objectMode||r.length!==0?Q7(e,i,r,!1):rT(e,i)):Q7(e,i,r,!1)}else a||(i.reading=!1,rT(e,i))}return!i.ended&&(i.length=W$?e=W$:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j$(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=AAe(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}gt.prototype.read=function(e){et("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return et("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?eT(this):M2(this),null;if(e=j$(e,r),e===0&&r.ended)return r.length===0&&eT(this),null;var a=r.needReadable;et("need readable",a),(r.length===0||r.length-e0?n=Q$(e,r):n=null,n===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&eT(this)),n!==null&&this.emit("data",n),n};function MAe(e,r){if(et("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?M2(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,$$(e)))}}function M2(e){var r=e._readableState;et("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(et("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick($$,e))}function $$(e){var r=e._readableState;et("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,aT(e)}function rT(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(kAe,e,r))}function kAe(e,r){for(;!r.reading&&!r.ended&&(r.length1&&eK(a.pipes,e)!==-1)&&!u&&(et("false write response, pause",a.awaitDrain),a.awaitDrain++),t.pause())}function v(y){et("onerror",y),m(),e.removeListener("error",v),Z$(e,"error")===0&&ed(e,y)}wAe(e,"error",v);function d(){e.removeListener("finish",p),m()}e.once("close",d);function p(){et("onfinish"),e.removeListener("close",d),m()}e.once("finish",p);function m(){et("unpipe"),t.unpipe(e)}return e.emit("pipe",t),a.flowing||(et("pipe resume"),t.resume()),e};function SAe(e){return function(){var t=e._readableState;et("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Z$(e,"data")&&(t.flowing=!0,aT(e))}}gt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var a=r.pipes,n=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var i=0;i0,a.flowing!==!1&&this.resume()):e==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,et("on readable",a.length,a.reading),a.length?M2(this):a.reading||process.nextTick(qAe,this)),t};gt.prototype.addListener=gt.prototype.on;gt.prototype.removeListener=function(e,r){var t=rd.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(K$,this),t};gt.prototype.removeAllListeners=function(e){var r=rd.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(K$,this),r};function K$(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function qAe(e){et("readable nexttick read 0"),e.read(0)}gt.prototype.resume=function(){var e=this._readableState;return e.flowing||(et("resume"),e.flowing=!e.readableListening,LAe(this,e)),e.paused=!1,this};function LAe(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(CAe,e,r))}function CAe(e,r){et("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),aT(e),r.flowing&&!r.reading&&e.read(0)}gt.prototype.pause=function(){return et("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(et("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function aT(e){var r=e._readableState;for(et("flow",r.flowing);r.flowing&&e.read()!==null;);}gt.prototype.wrap=function(e){var r=this,t=this._readableState,a=!1;e.on("end",function(){if(et("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(et("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var l=r.push(o);l||(a=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(l){return function(){return e[l].apply(e,arguments)}}(n));for(var i=0;i=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function eT(e){var r=e._readableState;et("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(EAe,r,e))}function EAe(e,r){if(et("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(gt.from=function(e,r){return $7===void 0&&($7=V$()),$7(gt,e,r)});function eK(e,r){for(var t=0,a=e.length;t{"use strict";aK.exports=ql;var k2=Xu().codes,DAe=k2.ERR_METHOD_NOT_IMPLEMENTED,PAe=k2.ERR_MULTIPLE_CALLBACK,RAe=k2.ERR_TRANSFORM_ALREADY_TRANSFORMING,FAe=k2.ERR_TRANSFORM_WITH_LENGTH_0,S2=Ju();kl()(ql,S2);function NAe(e,r){var t=this._transformState;t.transforming=!1;var a=t.writecb;if(a===null)return this.emit("error",new PAe);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),a(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";iK.exports=td;var nK=nT();kl()(td,nK);function td(e){if(!(this instanceof td))return new td(e);nK.call(this,e)}td.prototype._transform=function(e,r,t){t(null,e)}});var cK=N((YIe,fK)=>{"use strict";var iT;function IAe(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var uK=Xu().codes,OAe=uK.ERR_MISSING_ARGS,BAe=uK.ERR_STREAM_DESTROYED;function lK(e){if(e)throw e}function HAe(e){return e.setHeader&&typeof e.abort=="function"}function UAe(e,r,t,a){a=IAe(a);var n=!1;e.on("close",function(){n=!0}),iT===void 0&&(iT=x2()),iT(e,{readable:r,writable:t},function(o){if(o)return a(o);n=!0,a()});var i=!1;return function(o){if(!n&&!i){if(i=!0,HAe(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();a(o||new BAe("pipe"))}}}function sK(e){e()}function GAe(e,r){return e.pipe(r)}function YAe(e){return!e.length||typeof e[e.length-1]!="function"?lK:e.pop()}function VAe(){for(var e=arguments.length,r=new Array(e),t=0;t0;return UAe(o,s,u,function(f){n||(n=f),f&&i.forEach(sK),!s&&(i.forEach(sK),a(n))})});return r.reduce(GAe)}fK.exports=VAe});var hK=N((VIe,vK)=>{vK.exports=Oi;var oT=Qs().EventEmitter,WAe=kl();WAe(Oi,oT);Oi.Readable=G7();Oi.Writable=B7();Oi.Duplex=Ju();Oi.Transform=nT();Oi.PassThrough=oK();Oi.finished=x2();Oi.pipeline=cK();Oi.Stream=Oi;function Oi(){oT.call(this)}Oi.prototype.pipe=function(e,r){var t=this;function a(f){e.writable&&e.write(f)===!1&&t.pause&&t.pause()}t.on("data",a);function n(){t.readable&&t.resume&&t.resume()}e.on("drain",n),!e._isStdio&&(!r||r.end!==!1)&&(t.on("end",o),t.on("close",l));var i=!1;function o(){i||(i=!0,e.end())}function l(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function s(f){if(u(),oT.listenerCount(this,"error")===0)throw f}t.on("error",s),e.on("error",s);function u(){t.removeListener("data",a),e.removeListener("drain",n),t.removeListener("end",o),t.removeListener("close",l),t.removeListener("error",s),e.removeListener("error",s),t.removeListener("end",u),t.removeListener("close",u),e.removeListener("close",u)}return t.on("end",u),t.on("close",u),e.on("close",u),e.emit("pipe",t),e}});var wv=N(lt=>{var dK=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),a={},n=0;n=n)return l;switch(l){case"%s":return String(a[t++]);case"%d":return Number(a[t++]);case"%j":try{return JSON.stringify(a[t++])}catch(s){return"[Circular]"}default:return l}}),o=a[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),fT(r)?t.showHidden=r:r&<._extend(t,r),tf(t.showHidden)&&(t.showHidden=!1),tf(t.depth)&&(t.depth=2),tf(t.colors)&&(t.colors=!1),tf(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=ZAe),E2(t,e,t.depth)}lt.inspect=ks;ks.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]};ks.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ZAe(e,r){var t=ks.styles[r];return t?"\x1B["+ks.colors[t][0]+"m"+e+"\x1B["+ks.colors[t][1]+"m":e}function XAe(e,r){return e}function JAe(e){var r={};return e.forEach(function(t,a){r[t]=!0}),r}function E2(e,r,t){if(e.customInspect&&r&&C2(r.inspect)&&r.inspect!==lt.inspect&&!(r.constructor&&r.constructor.prototype===r)){var a=r.inspect(t,e);return R2(a)||(a=E2(e,a,t)),a}var n=$Ae(e,r);if(n)return n;var i=Object.keys(r),o=JAe(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),nd(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return lT(r);if(i.length===0){if(C2(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(ad(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(D2(r))return e.stylize(Date.prototype.toString.call(r),"date");if(nd(r))return lT(r)}var s="",u=!1,f=["{","}"];if(yK(r)&&(u=!0,f=["[","]"]),C2(r)){var c=r.name?": "+r.name:"";s=" [Function"+c+"]"}if(ad(r)&&(s=" "+RegExp.prototype.toString.call(r)),D2(r)&&(s=" "+Date.prototype.toUTCString.call(r)),nd(r)&&(s=" "+lT(r)),i.length===0&&(!u||r.length==0))return f[0]+s+f[1];if(t<0)return ad(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return u?v=KAe(e,r,t,o,i):v=i.map(function(d){return uT(e,r,t,o,d,u)}),e.seen.pop(),QAe(v,s,f)}function $Ae(e,r){if(tf(r))return e.stylize("undefined","undefined");if(R2(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(mK(r))return e.stylize(""+r,"number");if(fT(r))return e.stylize(""+r,"boolean");if(P2(r))return e.stylize("null","null")}function lT(e){return"["+Error.prototype.toString.call(e)+"]"}function KAe(e,r,t,a,n){for(var i=[],o=0,l=r.length;o{"use strict";function d$(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function ZTe(e){for(var r=1;r0?this.tail.next=a:this.head=a,this.tail=a,++this.length}},{key:"unshift",value:function(t){var a={data:t,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length}},{key:"shift",value:function(){if(this.length!==0){var t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(this.length===0)return"";for(var a=this.head,n=""+a.data;a=a.next;)n+=t+a.data;return n}},{key:"concat",value:function(t){if(this.length===0)return h2.alloc(0);for(var a=h2.allocUnsafe(t>>>0),n=this.head,i=0;n;)r8e(n.data,a,i),i+=n.data.length,n=n.next;return a}},{key:"consume",value:function(t,a){var n;return to.length?o.length:t;if(l===o.length?i+=o:i+=o.slice(0,t),t-=l,t===0){l===o.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(l));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(t){var a=h2.allocUnsafe(t),n=this.head,i=1;for(n.data.copy(a),t-=n.data.length;n=n.next;){var o=n.data,l=t>o.length?o.length:t;if(o.copy(a,a.length-t,0,l),t-=l,t===0){l===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(l));break}++i}return this.length-=i,a}},{key:e8e,value:function(t,a){return P7(this,ZTe({},a,{depth:0,customInspect:!1}))}}]),e}()});var F7=N((CIe,b$)=>{"use strict";function t8e(e,r){var t=this,a=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return a||n?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(R7,this,e)):process.nextTick(R7,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!r&&i?t._writableState?t._writableState.errorEmitted?process.nextTick(d2,t):(t._writableState.errorEmitted=!0,process.nextTick(g$,t,i)):process.nextTick(g$,t,i):r?(process.nextTick(d2,t),r(i)):process.nextTick(d2,t)}),this)}function g$(e,r){R7(e,r),d2(e)}function d2(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a8e(){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 R7(e,r){e.emit("error",r)}function n8e(e,r){var t=e._readableState,a=e._writableState;t&&t.autoDestroy||a&&a.autoDestroy?e.destroy(r):e.emit("error",r)}b$.exports={destroy:t8e,undestroy:a8e,errorOrDestroy:n8e}});var Xu=N((EIe,w$)=>{"use strict";function i8e(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}var _$={};function Ii(e,r,t){t||(t=Error);function a(i,o,l){return typeof r=="string"?r:r(i,o,l)}var n=function(i){i8e(o,i);function o(l,s,u){return i.call(this,a(l,s,u))||this}return o}(t);n.prototype.name=t.name,n.prototype.code=e,_$[e]=n}function x$(e,r){if(Array.isArray(e)){var t=e.length;return e=e.map(function(a){return String(a)}),t>2?"one of ".concat(r," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:t===2?"one of ".concat(r," ").concat(e[0]," or ").concat(e[1]):"of ".concat(r," ").concat(e[0])}else return"of ".concat(r," ").concat(String(e))}function o8e(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function l8e(e,r,t){return(t===void 0||t>e.length)&&(t=e.length),e.substring(t-r.length,t)===r}function s8e(e,r,t){return typeof t!="number"&&(t=0),t+r.length>e.length?!1:e.indexOf(r,t)!==-1}Ii("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);Ii("ERR_INVALID_ARG_TYPE",function(e,r,t){var a;typeof r=="string"&&o8e(r,"not ")?(a="must not be",r=r.replace(/^not /,"")):a="must be";var n;if(l8e(e," argument"))n="The ".concat(e," ").concat(a," ").concat(x$(r,"type"));else{var i=s8e(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(i," ").concat(a," ").concat(x$(r,"type"))}return n+=". Received type ".concat(typeof t),n},TypeError);Ii("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ii("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ii("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ii("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ii("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ii("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ii("ERR_STREAM_WRITE_AFTER_END","write after end");Ii("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ii("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ii("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");w$.exports.codes=_$});var N7=N((DIe,T$)=>{"use strict";var u8e=Xu().codes.ERR_INVALID_OPT_VALUE;function f8e(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function c8e(e,r,t,a){var n=f8e(r,a,t);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var i=a?t:"highWaterMark";throw new u8e(i,n)}return Math.floor(n)}return e.objectMode?16:16*1024}T$.exports={getHighWaterMark:c8e}});var M$=N((PIe,A$)=>{A$.exports=v8e;function v8e(e,r){if(z7("noDeprecation"))return e;var t=!1;function a(){if(!t){if(z7("throwDeprecation"))throw new Error(r);z7("traceDeprecation")?console.trace(r):console.warn(r),t=!0}return e.apply(this,arguments)}return a}function z7(e){try{if(!window.localStorage)return!1}catch(t){return!1}var r=window.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}});var B7=N((RIe,E$)=>{"use strict";E$.exports=la;function S$(e){var r=this;this.next=null,this.entry=null,this.finish=function(){O8e(r,e)}}var mv;la.WritableState=$0;var h8e={deprecate:M$()},q$=Y6(),y2=ov().Buffer,d8e=window.Uint8Array||function(){};function p8e(e){return y2.from(e)}function y8e(e){return y2.isBuffer(e)||e instanceof d8e}var O7=F7(),m8e=N7(),g8e=m8e.getHighWaterMark,ws=Xu().codes,b8e=ws.ERR_INVALID_ARG_TYPE,x8e=ws.ERR_METHOD_NOT_IMPLEMENTED,_8e=ws.ERR_MULTIPLE_CALLBACK,w8e=ws.ERR_STREAM_CANNOT_PIPE,T8e=ws.ERR_STREAM_DESTROYED,A8e=ws.ERR_STREAM_NULL_VALUES,M8e=ws.ERR_STREAM_WRITE_AFTER_END,k8e=ws.ERR_UNKNOWN_ENCODING,gv=O7.errorOrDestroy;kl()(la,q$);function S8e(){}function $0(e,r,t){mv=mv||Ju(),e=e||{},typeof t!="boolean"&&(t=r instanceof mv),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=g8e(this,e,"writableHighWaterMark",t),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){R8e(r,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new S$(this)}$0.prototype.getBuffer=function(){for(var r=this.bufferedRequest,t=[];r;)t.push(r),r=r.next;return t};(function(){try{Object.defineProperty($0.prototype,"buffer",{get:h8e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var p2;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(p2=Function.prototype[Symbol.hasInstance],Object.defineProperty(la,Symbol.hasInstance,{value:function(r){return p2.call(this,r)?!0:this!==la?!1:r&&r._writableState instanceof $0}})):p2=function(r){return r instanceof this};function la(e){mv=mv||Ju();var r=this instanceof mv;if(!r&&!p2.call(la,this))return new la(e);this._writableState=new $0(e,this,r),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)),q$.call(this)}la.prototype.pipe=function(){gv(this,new w8e)};function q8e(e,r){var t=new M8e;gv(e,t),process.nextTick(r,t)}function L8e(e,r,t,a){var n;return t===null?n=new A8e:typeof t!="string"&&!r.objectMode&&(n=new b8e("chunk",["string","Buffer"],t)),n?(gv(e,n),process.nextTick(a,n),!1):!0}la.prototype.write=function(e,r,t){var a=this._writableState,n=!1,i=!a.objectMode&&y8e(e);return i&&!y2.isBuffer(e)&&(e=p8e(e)),typeof r=="function"&&(t=r,r=null),i?r="buffer":r||(r=a.defaultEncoding),typeof t!="function"&&(t=S8e),a.ending?q8e(this,t):(i||L8e(this,a,e,t))&&(a.pendingcb++,n=E8e(this,a,i,e,r,t)),n};la.prototype.cork=function(){this._writableState.corked++};la.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&L$(this,e))};la.prototype.setDefaultEncoding=function(r){if(typeof r=="string"&&(r=r.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((r+"").toLowerCase())>-1))throw new k8e(r);return this._writableState.defaultEncoding=r,this};Object.defineProperty(la.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function C8e(e,r,t){return!e.objectMode&&e.decodeStrings!==!1&&typeof r=="string"&&(r=y2.from(r,t)),r}Object.defineProperty(la.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function E8e(e,r,t,a,n,i){if(!t){var o=C8e(r,a,n);a!==o&&(t=!0,n="buffer",a=o)}var l=r.objectMode?1:a.length;r.length+=l;var s=r.length{"use strict";var B8e=Object.keys||function(e){var r=[];for(var t in e)r.push(t);return r};P$.exports=Zo;var D$=G7(),U7=B7();kl()(Zo,D$);for(H7=B8e(U7.prototype),m2=0;m2{var b2=ov(),Xo=b2.Buffer;function R$(e,r){for(var t in e)r[t]=e[t]}Xo.from&&Xo.alloc&&Xo.allocUnsafe&&Xo.allocUnsafeSlow?F$.exports=b2:(R$(b2,Y7),Y7.Buffer=$u);function $u(e,r,t){return Xo(e,r,t)}$u.prototype=Object.create(Xo.prototype);R$(Xo,$u);$u.from=function(e,r,t){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Xo(e,r,t)};$u.alloc=function(e,r,t){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=Xo(e);return r!==void 0?typeof t=="string"?a.fill(r,t):a.fill(r):a.fill(0),a};$u.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Xo(e)};$u.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return b2.SlowBuffer(e)}});var j7=N(I$=>{"use strict";var W7=N$().Buffer,z$=W7.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 G8e(e){if(!e)return"utf8";for(var r;;)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(r)return;e=(""+e).toLowerCase(),r=!0}}function Y8e(e){var r=G8e(e);if(typeof r!="string"&&(W7.isEncoding===z$||!z$(e)))throw new Error("Unknown encoding: "+e);return r||e}I$.StringDecoder=K0;function K0(e){this.encoding=Y8e(e);var r;switch(this.encoding){case"utf16le":this.text=J8e,this.end=$8e,r=4;break;case"utf8":this.fillLast=j8e,r=4;break;case"base64":this.text=K8e,this.end=Q8e,r=3;break;default:this.write=eAe,this.end=rAe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=W7.allocUnsafe(r)}K0.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function V8e(e,r,t){var a=r.length-1;if(a=0?(n>0&&(e.lastNeed=n-1),n):--a=0?(n>0&&(e.lastNeed=n-2),n):--a=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function W8e(e,r,t){if((r[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function j8e(e){var r=this.lastTotal-this.lastNeed,t=W8e(this,e,r);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function Z8e(e,r){var t=V8e(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var a=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",r,a)}function X8e(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function J8e(e,r){if((e.length-r)%2===0){var t=e.toString("utf16le",r);if(t){var a=t.charCodeAt(t.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function $8e(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function K8e(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===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",r,e.length-t))}function Q8e(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function eAe(e){return e.toString(this.encoding)}function rAe(e){return e&&e.length?this.write(e):""}});var x2=N((zIe,H$)=>{"use strict";var O$=Xu().codes.ERR_STREAM_PREMATURE_CLOSE;function tAe(e){var r=!1;return function(){if(!r){r=!0;for(var t=arguments.length,a=new Array(t),n=0;n{"use strict";var _2;function Ts(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var iAe=x2(),As=Symbol("lastResolve"),Ku=Symbol("lastReject"),Q0=Symbol("error"),w2=Symbol("ended"),Qu=Symbol("lastPromise"),Z7=Symbol("handlePromise"),ef=Symbol("stream");function Ms(e,r){return{value:e,done:r}}function oAe(e){var r=e[As];if(r!==null){var t=e[ef].read();t!==null&&(e[Qu]=null,e[As]=null,e[Ku]=null,r(Ms(t,!1)))}}function lAe(e){process.nextTick(oAe,e)}function sAe(e,r){return function(t,a){e.then(function(){if(r[w2]){t(Ms(void 0,!0));return}r[Z7](t,a)},a)}}var uAe=Object.getPrototypeOf(function(){}),fAe=Object.setPrototypeOf((_2={get stream(){return this[ef]},next:function(){var r=this,t=this[Q0];if(t!==null)return Promise.reject(t);if(this[w2])return Promise.resolve(Ms(void 0,!0));if(this[ef].destroyed)return new Promise(function(o,l){process.nextTick(function(){r[Q0]?l(r[Q0]):o(Ms(void 0,!0))})});var a=this[Qu],n;if(a)n=new Promise(sAe(a,this));else{var i=this[ef].read();if(i!==null)return Promise.resolve(Ms(i,!1));n=new Promise(this[Z7])}return this[Qu]=n,n}},Ts(_2,Symbol.asyncIterator,function(){return this}),Ts(_2,"return",function(){var r=this;return new Promise(function(t,a){r[ef].destroy(null,function(n){if(n){a(n);return}t(Ms(void 0,!0))})})}),_2),uAe),cAe=function(r){var t,a=Object.create(fAe,(t={},Ts(t,ef,{value:r,writable:!0}),Ts(t,As,{value:null,writable:!0}),Ts(t,Ku,{value:null,writable:!0}),Ts(t,Q0,{value:null,writable:!0}),Ts(t,w2,{value:r._readableState.endEmitted,writable:!0}),Ts(t,Z7,{value:function(i,o){var l=a[ef].read();l?(a[Qu]=null,a[As]=null,a[Ku]=null,i(Ms(l,!1))):(a[As]=i,a[Ku]=o)},writable:!0}),t));return a[Qu]=null,iAe(r,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=a[Ku];i!==null&&(a[Qu]=null,a[As]=null,a[Ku]=null,i(n)),a[Q0]=n;return}var o=a[As];o!==null&&(a[Qu]=null,a[As]=null,a[Ku]=null,o(Ms(void 0,!0))),a[w2]=!0}),r.on("readable",lAe.bind(null,a)),a};U$.exports=cAe});var V$=N((OIe,Y$)=>{Y$.exports=function(){throw new Error("Readable.from is not available in the browser")}});var G7=N((HIe,rK)=>{"use strict";rK.exports=gt;var bv;gt.ReadableState=X$;var BIe=Qs().EventEmitter,Z$=function(r,t){return r.listeners(t).length},rd=Y6(),T2=ov().Buffer,vAe=window.Uint8Array||function(){};function hAe(e){return T2.from(e)}function dAe(e){return T2.isBuffer(e)||e instanceof vAe}var X7=D7(),et;X7&&X7.debuglog?et=X7.debuglog("stream"):et=function(){};var pAe=m$(),tT=F7(),yAe=N7(),mAe=yAe.getHighWaterMark,A2=Xu().codes,gAe=A2.ERR_INVALID_ARG_TYPE,bAe=A2.ERR_STREAM_PUSH_AFTER_EOF,xAe=A2.ERR_METHOD_NOT_IMPLEMENTED,_Ae=A2.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,xv,J7,$7;kl()(gt,rd);var ed=tT.errorOrDestroy,K7=["error","close","destroy","pause","resume"];function wAe(e,r,t){if(typeof e.prependListener=="function")return e.prependListener(r,t);!e._events||!e._events[r]?e.on(r,t):Array.isArray(e._events[r])?e._events[r].unshift(t):e._events[r]=[t,e._events[r]]}function X$(e,r,t){bv=bv||Ju(),e=e||{},typeof t!="boolean"&&(t=r instanceof bv),this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=mAe(this,e,"readableHighWaterMark",t),this.buffer=new pAe,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&&(xv||(xv=j7().StringDecoder),this.decoder=new xv(e.encoding),this.encoding=e.encoding)}function gt(e){if(bv=bv||Ju(),!(this instanceof gt))return new gt(e);var r=this instanceof bv;this._readableState=new X$(e,this,r),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),rd.call(this)}Object.defineProperty(gt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(r){this._readableState&&(this._readableState.destroyed=r)}});gt.prototype.destroy=tT.destroy;gt.prototype._undestroy=tT.undestroy;gt.prototype._destroy=function(e,r){r(e)};gt.prototype.push=function(e,r){var t=this._readableState,a;return t.objectMode?a=!0:typeof e=="string"&&(r=r||t.defaultEncoding,r!==t.encoding&&(e=T2.from(e,r),r=""),a=!0),J$(this,e,r,!1,a)};gt.prototype.unshift=function(e){return J$(this,e,null,!0,!1)};function J$(e,r,t,a,n){et("readableAddChunk",r);var i=e._readableState;if(r===null)i.reading=!1,MAe(e,i);else{var o;if(n||(o=TAe(i,r)),o)ed(e,o);else if(i.objectMode||r&&r.length>0)if(typeof r!="string"&&!i.objectMode&&Object.getPrototypeOf(r)!==T2.prototype&&(r=hAe(r)),a)i.endEmitted?ed(e,new _Ae):Q7(e,i,r,!0);else if(i.ended)ed(e,new bAe);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!t?(r=i.decoder.write(r),i.objectMode||r.length!==0?Q7(e,i,r,!1):rT(e,i)):Q7(e,i,r,!1)}else a||(i.reading=!1,rT(e,i))}return!i.ended&&(i.length=W$?e=W$:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function j$(e,r){return e<=0||r.length===0&&r.ended?0:r.objectMode?1:e!==e?r.flowing&&r.length?r.buffer.head.data.length:r.length:(e>r.highWaterMark&&(r.highWaterMark=AAe(e)),e<=r.length?e:r.ended?r.length:(r.needReadable=!0,0))}gt.prototype.read=function(e){et("read",e),e=parseInt(e,10);var r=this._readableState,t=e;if(e!==0&&(r.emittedReadable=!1),e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended))return et("read: emitReadable",r.length,r.ended),r.length===0&&r.ended?eT(this):M2(this),null;if(e=j$(e,r),e===0&&r.ended)return r.length===0&&eT(this),null;var a=r.needReadable;et("need readable",a),(r.length===0||r.length-e0?n=Q$(e,r):n=null,n===null?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),r.length===0&&(r.ended||(r.needReadable=!0),t!==e&&r.ended&&eT(this)),n!==null&&this.emit("data",n),n};function MAe(e,r){if(et("onEofChunk"),!r.ended){if(r.decoder){var t=r.decoder.end();t&&t.length&&(r.buffer.push(t),r.length+=r.objectMode?1:t.length)}r.ended=!0,r.sync?M2(e):(r.needReadable=!1,r.emittedReadable||(r.emittedReadable=!0,$$(e)))}}function M2(e){var r=e._readableState;et("emitReadable",r.needReadable,r.emittedReadable),r.needReadable=!1,r.emittedReadable||(et("emitReadable",r.flowing),r.emittedReadable=!0,process.nextTick($$,e))}function $$(e){var r=e._readableState;et("emitReadable_",r.destroyed,r.length,r.ended),!r.destroyed&&(r.length||r.ended)&&(e.emit("readable"),r.emittedReadable=!1),r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark,aT(e)}function rT(e,r){r.readingMore||(r.readingMore=!0,process.nextTick(kAe,e,r))}function kAe(e,r){for(;!r.reading&&!r.ended&&(r.length1&&eK(a.pipes,e)!==-1)&&!u&&(et("false write response, pause",a.awaitDrain),a.awaitDrain++),t.pause())}function v(y){et("onerror",y),m(),e.removeListener("error",v),Z$(e,"error")===0&&ed(e,y)}wAe(e,"error",v);function d(){e.removeListener("finish",p),m()}e.once("close",d);function p(){et("onfinish"),e.removeListener("close",d),m()}e.once("finish",p);function m(){et("unpipe"),t.unpipe(e)}return e.emit("pipe",t),a.flowing||(et("pipe resume"),t.resume()),e};function SAe(e){return function(){var t=e._readableState;et("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Z$(e,"data")&&(t.flowing=!0,aT(e))}}gt.prototype.unpipe=function(e){var r=this._readableState,t={hasUnpiped:!1};if(r.pipesCount===0)return this;if(r.pipesCount===1)return e&&e!==r.pipes?this:(e||(e=r.pipes),r.pipes=null,r.pipesCount=0,r.flowing=!1,e&&e.emit("unpipe",this,t),this);if(!e){var a=r.pipes,n=r.pipesCount;r.pipes=null,r.pipesCount=0,r.flowing=!1;for(var i=0;i0,a.flowing!==!1&&this.resume()):e==="readable"&&!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,et("on readable",a.length,a.reading),a.length?M2(this):a.reading||process.nextTick(qAe,this)),t};gt.prototype.addListener=gt.prototype.on;gt.prototype.removeListener=function(e,r){var t=rd.prototype.removeListener.call(this,e,r);return e==="readable"&&process.nextTick(K$,this),t};gt.prototype.removeAllListeners=function(e){var r=rd.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(K$,this),r};function K$(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0,r.resumeScheduled&&!r.paused?r.flowing=!0:e.listenerCount("data")>0&&e.resume()}function qAe(e){et("readable nexttick read 0"),e.read(0)}gt.prototype.resume=function(){var e=this._readableState;return e.flowing||(et("resume"),e.flowing=!e.readableListening,LAe(this,e)),e.paused=!1,this};function LAe(e,r){r.resumeScheduled||(r.resumeScheduled=!0,process.nextTick(CAe,e,r))}function CAe(e,r){et("resume",r.reading),r.reading||e.read(0),r.resumeScheduled=!1,e.emit("resume"),aT(e),r.flowing&&!r.reading&&e.read(0)}gt.prototype.pause=function(){return et("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(et("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function aT(e){var r=e._readableState;for(et("flow",r.flowing);r.flowing&&e.read()!==null;);}gt.prototype.wrap=function(e){var r=this,t=this._readableState,a=!1;e.on("end",function(){if(et("wrapped end"),t.decoder&&!t.ended){var o=t.decoder.end();o&&o.length&&r.push(o)}r.push(null)}),e.on("data",function(o){if(et("wrapped data"),t.decoder&&(o=t.decoder.write(o)),!(t.objectMode&&o==null)&&!(!t.objectMode&&(!o||!o.length))){var l=r.push(o);l||(a=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(l){return function(){return e[l].apply(e,arguments)}}(n));for(var i=0;i=r.length?(r.decoder?t=r.buffer.join(""):r.buffer.length===1?t=r.buffer.first():t=r.buffer.concat(r.length),r.buffer.clear()):t=r.buffer.consume(e,r.decoder),t}function eT(e){var r=e._readableState;et("endReadable",r.endEmitted),r.endEmitted||(r.ended=!0,process.nextTick(EAe,r,e))}function EAe(e,r){if(et("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,r.readable=!1,r.emit("end"),e.autoDestroy)){var t=r._writableState;(!t||t.autoDestroy&&t.finished)&&r.destroy()}}typeof Symbol=="function"&&(gt.from=function(e,r){return $7===void 0&&($7=V$()),$7(gt,e,r)});function eK(e,r){for(var t=0,a=e.length;t{"use strict";aK.exports=ql;var k2=Xu().codes,DAe=k2.ERR_METHOD_NOT_IMPLEMENTED,PAe=k2.ERR_MULTIPLE_CALLBACK,RAe=k2.ERR_TRANSFORM_ALREADY_TRANSFORMING,FAe=k2.ERR_TRANSFORM_WITH_LENGTH_0,S2=Ju();kl()(ql,S2);function NAe(e,r){var t=this._transformState;t.transforming=!1;var a=t.writecb;if(a===null)return this.emit("error",new PAe);t.writechunk=null,t.writecb=null,r!=null&&this.push(r),a(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";iK.exports=td;var nK=nT();kl()(td,nK);function td(e){if(!(this instanceof td))return new td(e);nK.call(this,e)}td.prototype._transform=function(e,r,t){t(null,e)}});var cK=N((YIe,fK)=>{"use strict";var iT;function IAe(e){var r=!1;return function(){r||(r=!0,e.apply(void 0,arguments))}}var uK=Xu().codes,OAe=uK.ERR_MISSING_ARGS,BAe=uK.ERR_STREAM_DESTROYED;function lK(e){if(e)throw e}function HAe(e){return e.setHeader&&typeof e.abort=="function"}function UAe(e,r,t,a){a=IAe(a);var n=!1;e.on("close",function(){n=!0}),iT===void 0&&(iT=x2()),iT(e,{readable:r,writable:t},function(o){if(o)return a(o);n=!0,a()});var i=!1;return function(o){if(!n&&!i){if(i=!0,HAe(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();a(o||new BAe("pipe"))}}}function sK(e){e()}function GAe(e,r){return e.pipe(r)}function YAe(e){return!e.length||typeof e[e.length-1]!="function"?lK:e.pop()}function VAe(){for(var e=arguments.length,r=new Array(e),t=0;t0;return UAe(o,s,u,function(f){n||(n=f),f&&i.forEach(sK),!s&&(i.forEach(sK),a(n))})});return r.reduce(GAe)}fK.exports=VAe});var hK=N((VIe,vK)=>{vK.exports=Oi;var oT=Qs().EventEmitter,WAe=kl();WAe(Oi,oT);Oi.Readable=G7();Oi.Writable=B7();Oi.Duplex=Ju();Oi.Transform=nT();Oi.PassThrough=oK();Oi.finished=x2();Oi.pipeline=cK();Oi.Stream=Oi;function Oi(){oT.call(this)}Oi.prototype.pipe=function(e,r){var t=this;function a(f){e.writable&&e.write(f)===!1&&t.pause&&t.pause()}t.on("data",a);function n(){t.readable&&t.resume&&t.resume()}e.on("drain",n),!e._isStdio&&(!r||r.end!==!1)&&(t.on("end",o),t.on("close",l));var i=!1;function o(){i||(i=!0,e.end())}function l(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function s(f){if(u(),oT.listenerCount(this,"error")===0)throw f}t.on("error",s),e.on("error",s);function u(){t.removeListener("data",a),e.removeListener("drain",n),t.removeListener("end",o),t.removeListener("close",l),t.removeListener("error",s),e.removeListener("error",s),t.removeListener("end",u),t.removeListener("close",u),e.removeListener("close",u)}return t.on("end",u),t.on("close",u),e.on("close",u),e.emit("pipe",t),e}});var wv=N(lt=>{var dK=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),a={},n=0;n=n)return l;switch(l){case"%s":return String(a[t++]);case"%d":return Number(a[t++]);case"%j":try{return JSON.stringify(a[t++])}catch(s){return"[Circular]"}default:return l}}),o=a[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),fT(r)?t.showHidden=r:r&<._extend(t,r),tf(t.showHidden)&&(t.showHidden=!1),tf(t.depth)&&(t.depth=2),tf(t.colors)&&(t.colors=!1),tf(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=ZAe),E2(t,e,t.depth)}lt.inspect=ks;ks.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]};ks.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ZAe(e,r){var t=ks.styles[r];return t?"\x1B["+ks.colors[t][0]+"m"+e+"\x1B["+ks.colors[t][1]+"m":e}function XAe(e,r){return e}function JAe(e){var r={};return e.forEach(function(t,a){r[t]=!0}),r}function E2(e,r,t){if(e.customInspect&&r&&C2(r.inspect)&&r.inspect!==lt.inspect&&!(r.constructor&&r.constructor.prototype===r)){var a=r.inspect(t,e);return R2(a)||(a=E2(e,a,t)),a}var n=$Ae(e,r);if(n)return n;var i=Object.keys(r),o=JAe(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),nd(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return lT(r);if(i.length===0){if(C2(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(ad(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(D2(r))return e.stylize(Date.prototype.toString.call(r),"date");if(nd(r))return lT(r)}var s="",u=!1,f=["{","}"];if(yK(r)&&(u=!0,f=["[","]"]),C2(r)){var c=r.name?": "+r.name:"";s=" [Function"+c+"]"}if(ad(r)&&(s=" "+RegExp.prototype.toString.call(r)),D2(r)&&(s=" "+Date.prototype.toUTCString.call(r)),nd(r)&&(s=" "+lT(r)),i.length===0&&(!u||r.length==0))return f[0]+s+f[1];if(t<0)return ad(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return u?v=KAe(e,r,t,o,i):v=i.map(function(d){return uT(e,r,t,o,d,u)}),e.seen.pop(),QAe(v,s,f)}function $Ae(e,r){if(tf(r))return e.stylize("undefined","undefined");if(R2(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(mK(r))return e.stylize(""+r,"number");if(fT(r))return e.stylize(""+r,"boolean");if(P2(r))return e.stylize("null","null")}function lT(e){return"["+Error.prototype.toString.call(e)+"]"}function KAe(e,r,t,a,n){for(var i=[],o=0,l=r.length;o-1&&(i?l=l.split(` `).map(function(u){return" "+u}).join(` `).slice(2):l=` @@ -44,15 +44,15 @@ `)+"".concat(u[0]," !== ").concat(f[0],` `)}else if(t!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(v=` `.concat(L9e(" ",c),"^"),c=0)}}}for(var m=u[u.length-1],y=f[f.length-1];m===y&&(c++<2?o=` - `.concat(m).concat(o):a=m,u.pop(),f.pop(),!(u.length===0||f.length===0));)m=u[u.length-1],y=f[f.length-1];var _=Math.max(u.length,f.length);if(_===0){var b=s.split(` -`);if(b.length>30)for(b[26]="".concat(go,"...").concat(Qa);b.length>27;)b.pop();return"".concat(af.notIdentical,` + `.concat(m).concat(o):a=m,u.pop(),f.pop(),!(u.length===0||f.length===0));)m=u[u.length-1],y=f[f.length-1];var x=Math.max(u.length,f.length);if(x===0){var _=s.split(` +`);if(_.length>30)for(_[26]="".concat(go,"...").concat(Qa);_.length>27;)_.pop();return"".concat(af.notIdentical,` -`).concat(b.join(` +`).concat(_.join(` `),` `)}c>3&&(o=` `.concat(go,"...").concat(Qa).concat(o),l=!0),a!==""&&(o=` - `.concat(a).concat(o),a="");var w=0,x=af[t]+` -`.concat(od,"+ actual").concat(Qa," ").concat(ld,"- expected").concat(Qa),T=" ".concat(go,"...").concat(Qa," Lines skipped");for(c=0;c<_;c++){var k=c-i;if(u.length1&&c>2&&(k>4?(n+=` + `.concat(a).concat(o),a="");var w=0,b=af[t]+` +`.concat(od,"+ actual").concat(Qa," ").concat(ld,"- expected").concat(Qa),T=" ".concat(go,"...").concat(Qa," Lines skipped");for(c=0;c1&&c>2&&(k>4?(n+=` `.concat(go,"...").concat(Qa),l=!0):k>3&&(n+=` `.concat(f[c-2]),w++),n+=` `.concat(f[c-1]),w++),i=c,a+=` @@ -66,10 +66,10 @@ `.concat(u[c-1]),w++),i=c,n+=` `.concat(od,"+").concat(Qa," ").concat(S),a+=` `.concat(ld,"-").concat(Qa," ").concat(M),w+=2):(n+=a,a="",(k===1||c===0)&&(n+=` - `.concat(S),w++))}if(w>20&&c<_-2)return"".concat(x).concat(T,` + `.concat(S),w++))}if(w>20&&c30)for(d[26]="".concat(go,"...").concat(Qa);d.length>27;)d.pop();d.length===1?i=t.call(this,"".concat(v," ").concat(d[0])):i=t.call(this,"".concat(v,` @@ -95,7 +95,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `).concat(Z2(e),` `));var l=new Cs({actual:e,expected:r,message:t,operator:n,stackStartFn:a});throw l.generatedMessage=o,l}}Ot.match=function e(r,t,a){aee(r,t,a,e,"match")};Ot.doesNotMatch=function e(r,t,a){aee(r,t,a,e,"doesNotMatch")};function nee(){for(var e=arguments.length,r=new Array(e),t=0;t{var gd=1e3,bd=gd*60,xd=bd*60,_d=xd*24,VMe=_d*365.25;oee.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return WMe(e);if(t==="number"&&isNaN(e)===!1)return r.long?ZMe(e):jMe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function WMe(e){if(e=String(e),!(e.length>100)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(r){var t=parseFloat(r[1]),a=(r[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return t*VMe;case"days":case"day":case"d":return t*_d;case"hours":case"hour":case"hrs":case"hr":case"h":return t*xd;case"minutes":case"minute":case"mins":case"min":case"m":return t*bd;case"seconds":case"second":case"secs":case"sec":case"s":return t*gd;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function jMe(e){return e>=_d?Math.round(e/_d)+"d":e>=xd?Math.round(e/xd)+"h":e>=bd?Math.round(e/bd)+"m":e>=gd?Math.round(e/gd)+"s":e+"ms"}function ZMe(e){return Q2(e,_d,"day")||Q2(e,xd,"hour")||Q2(e,bd,"minute")||Q2(e,gd,"second")||e+" ms"}function Q2(e,r,t){if(!(e{kt=see.exports=DT.debug=DT.default=DT;kt.coerce=QMe;kt.disable=$Me;kt.enable=JMe;kt.enabled=KMe;kt.humanize=lee();kt.names=[];kt.skips=[];kt.formatters={};var ET;function XMe(e){var r=0,t;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return kt.colors[Math.abs(r)%kt.colors.length]}function DT(e){function r(){if(r.enabled){var t=r,a=+new Date,n=a-(ET||a);t.diff=n,t.prev=ET,t.curr=a,ET=a;for(var i=new Array(arguments.length),o=0;o{wn=cee.exports=uee();wn.log=tke;wn.formatArgs=rke;wn.save=ake;wn.load=fee;wn.useColors=eke;wn.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:nke();wn.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function eke(){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+)/)}wn.formatters.j=function(e){try{return JSON.stringify(e)}catch(r){return"[UnexpectedJSONParseError]: "+r.message}};function rke(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+wn.humanize(this.diff),!!r){var t="color: "+this.color;e.splice(1,0,t,"color: inherit");var a=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(a++,i==="%c"&&(n=a))}),e.splice(n,0,t)}}function tke(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ake(e){try{e==null?wn.storage.removeItem("debug"):wn.storage.debug=e}catch(r){}}function fee(){var e;try{e=wn.storage.debug}catch(r){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}wn.enable(fee());function nke(){try{return window.localStorage}catch(e){}}});var xee=N((vOe,bee)=>{var Mv=N2(),Es=vee()("stream-parser");bee.exports=oke;var dee=-1,e3=0,ike=1,pee=2;function oke(e){var r=e&&typeof e._transform=="function",t=e&&typeof e._write=="function";if(!r&&!t)throw new Error("must pass a Writable or Transform stream in");Es("extending Parser into stream"),e._bytes=lke,e._skipBytes=ske,r&&(e._passthrough=uke),r?e._transform=cke:e._write=fke}function wd(e){Es("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=dee,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function lke(e,r){Mv(!this._parserCallback,'there is already a "callback" set!'),Mv(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||wd(this),Es("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=r,this._parserState=e3}function ske(e,r){Mv(!this._parserCallback,'there is already a "callback" set!'),Mv(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||wd(this),Es("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=r,this._parserState=ike}function uke(e,r){Mv(!this._parserCallback,'There is already a "callback" set!'),Mv(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||wd(this),Es("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=r,this._parserState=pee}function fke(e,r,t){this._parserInit||wd(this),Es("write(%o bytes)",e.length),typeof r=="function"&&(t=r),mee(this,e,null,t)}function cke(e,r,t){this._parserInit||wd(this),Es("transform(%o bytes)",e.length),typeof r!="function"&&(r=this._parserOutput),mee(this,e,r,t)}function yee(e,r,t,a){return e._parserBytesLeft<=0?a(new Error("got data but not currently parsing anything")):r.length<=e._parserBytesLeft?function(){return hee(e,r,t,a)}:function(){var n=r.slice(0,e._parserBytesLeft);return hee(e,n,t,function(i){if(i)return a(i);if(r.length>n.length)return function(){return yee(e,r.slice(n.length),t,a)}})}}function hee(e,r,t,a){if(e._parserBytesLeft-=r.length,Es("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===e3?(e._parserBuffers.push(r),e._parserBuffered+=r.length):e._parserState===pee&&t(r),e._parserBytesLeft===0){var n=e._parserCallback;if(n&&e._parserState===e3&&e._parserBuffers.length>1&&(r=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==e3&&(r=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=dee,e._parserBuffers.splice(0),n){var i=[];r&&i.push(r),t&&i.push(t);var o=n.length>i.length;o&&i.push(gee(a));var l=n.apply(e,i);if(!o||a===l)return a}}else return a}var mee=gee(yee);function gee(e){return function(){for(var r=e.apply(this,arguments);typeof r=="function";)r=r();return r}}});var xt=N(Ll=>{"use strict";var _ee=hK().Transform,vke=xee();function Td(){_ee.call(this,{readableObjectMode:!0})}Td.prototype=Object.create(_ee.prototype);Td.prototype.constructor=Td;vke(Td.prototype);Ll.ParserStream=Td;Ll.sliceEq=function(e,r,t){for(var a=r,n=0;n{"use strict";var kv=xt().readUInt16BE,RT=xt().readUInt32BE;function Ad(e,r){if(e.length<4+r)return null;var t=RT(e,r);return e.length>4&15,a=e[4]&15,n=e[5]>>4&15,i=kv(e,6),o=8,l=0;li.width||n.width===i.width&&n.height>i.height?n:i}),t=e.reduce(function(n,i){return n.height>i.height||n.height===i.height&&n.width>i.width?n:i}),a;return r.width>t.height||r.width===t.height&&r.height>t.width?a=r:a=t,a}t3.exports.readSizeFromMeta=function(e){var r={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(mke(e,r),!!r.sizes.length){var t=gke(r.sizes),a=1;r.transforms.forEach(function(i){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},l={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(i.type==="imir"&&(i.value===0?a=l[a]:(a=l[a],a=o[a],a=o[a])),i.type==="irot")for(var s=0;s{"use strict";function a3(e,r){var t=new Error(e);return t.code=r,t}function bke(e){try{return decodeURIComponent(escape(e))}catch(r){return e}}function Cl(e,r,t){this.input=e.subarray(r,t),this.start=r;var a=String.fromCharCode.apply(null,this.input.subarray(0,4));if(a!=="II*\0"&&a!=="MM\0*")throw a3("invalid TIFF signature","EBADDATA");this.big_endian=a[0]==="M"}Cl.prototype.each=function(e){this.aborted=!1;var r=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:r}];this.ifds_to_read.length>0&&!this.aborted;){var t=this.ifds_to_read.shift();t.offset&&this.scan_ifd(t.id,t.offset,e)}};Cl.prototype.read_uint16=function(e){var r=this.input;if(e+2>r.length)throw a3("unexpected EOF","EBADDATA");return this.big_endian?r[e]*256+r[e+1]:r[e]+r[e+1]*256};Cl.prototype.read_uint32=function(e){var r=this.input;if(e+4>r.length)throw a3("unexpected EOF","EBADDATA");return this.big_endian?r[e]*16777216+r[e+1]*65536+r[e+2]*256+r[e+3]:r[e]+r[e+1]*256+r[e+2]*65536+r[e+3]*16777216};Cl.prototype.is_subifd_link=function(e,r){return e===0&&r===34665||e===0&&r===34853||e===34665&&r===40965};Cl.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}};Cl.prototype.exif_format_read=function(e,r){var t;switch(e){case 1:case 2:return t=this.input[r],t;case 6:return t=this.input[r],t|(t&128)*33554430;case 3:return t=this.read_uint16(r),t;case 8:return t=this.read_uint16(r),t|(t&32768)*131070;case 4:return t=this.read_uint32(r),t;case 9:return t=this.read_uint32(r),t|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};Cl.prototype.scan_ifd=function(e,r,t){var a=this.read_uint16(r);r+=2;for(var n=0;nthis.input.length)throw a3("unexpected EOF","EBADDATA");for(var v=[],d=f,p=0;p0&&(this.ifds_to_read.push({id:i,offset:v[0]}),c=!0);var y={is_big_endian:this.big_endian,ifd:e,tag:i,format:o,count:l,entry_offset:r+this.start,data_length:u,data_offset:f+this.start,value:v,is_subifd_link:c};if(t(y)===!1){this.aborted=!0;return}r+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(r)})};FT.exports.ExifParser=Cl;FT.exports.get_orientation=function(e){var r=0;try{return new Cl(e,0,e.length).each(function(t){if(t.ifd===0&&t.tag===274&&Array.isArray(t.value))return r=t.value[0],!1}),r}catch(t){return-1}}});var Aee=N((yOe,Tee)=>{"use strict";var xke=xt().str2arr,_ke=xt().sliceEq,wke=xt().readUInt32BE,i3=wee(),Tke=n3(),Ake=xke("ftyp");Tee.exports=function(e){if(_ke(e,4,Ake)){var r=i3.unbox(e,0);if(r){var t=i3.getMimeType(r.data);if(t){for(var a,n=r.end;;){var i=i3.unbox(e,n);if(!i)break;if(n=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){a=i.data;break}}if(a){var o=i3.readSizeFromMeta(a);if(o){var l={width:o.width,height:o.height,type:t.type,mime:t.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(l.variants=o.variants),o.orientation&&(l.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var s=wke(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+s+4,o.exif_location.offset+o.exif_location.length),f=Tke.get_orientation(u);f>0&&(l.orientation=f)}return l}}}}}}});var See=N((mOe,kee)=>{"use strict";var Mke=xt().str2arr,kke=xt().sliceEq,Mee=xt().readUInt16LE,Ske=Mke("BM");kee.exports=function(e){if(!(e.length<26)&&kke(e,0,Ske))return{width:Mee(e,18),height:Mee(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var Dee=N((gOe,Eee)=>{"use strict";var Cee=xt().str2arr,qee=xt().sliceEq,Lee=xt().readUInt16LE,qke=Cee("GIF87a"),Lke=Cee("GIF89a");Eee.exports=function(e){if(!(e.length<10)&&!(!qee(e,0,qke)&&!qee(e,0,Lke)))return{width:Lee(e,6),height:Lee(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var Fee=N((bOe,Ree)=>{"use strict";var NT=xt().readUInt16LE,Cke=0,Eke=1,Pee=16;Ree.exports=function(e){var r=NT(e,0),t=NT(e,2),a=NT(e,4);if(!(r!==Cke||t!==Eke||!a)){for(var n=[],i={width:0,height:0},o=0;oi.width||s>i.height)&&(i=u)}return{width:i.width,height:i.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var zee=N((xOe,Nee)=>{"use strict";var zT=xt().readUInt16BE,Dke=xt().str2arr,Pke=xt().sliceEq,Rke=n3(),Fke=Dke("Exif\0\0");Nee.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var r=2;;){for(;;){if(e.length-r<2)return;if(e[r++]===255)break}for(var t=e[r++],a;t===255;)t=e[r++];if(208<=t&&t<=217||t===1)a=0;else if(192<=t&&t<=254){if(e.length-r<2)return;a=zT(e,r)-2,r+=2}else return;if(t===217||t===218)return;var n;if(t===225&&a>=10&&Pke(e,r,Fke)&&(n=Rke.get_orientation(e.slice(r+6,r+a))),a>=5&&192<=t&&t<=207&&t!==196&&t!==200&&t!==204){if(e.length-r0&&(i.orientation=n),i}r+=a}}});var Uee=N((_Oe,Hee)=>{"use strict";var Bee=xt().str2arr,Iee=xt().sliceEq,Oee=xt().readUInt32BE,Nke=Bee(`\x89PNG\r  -`),zke=Bee("IHDR");Hee.exports=function(e){if(!(e.length<24)&&Iee(e,0,Nke)&&Iee(e,12,zke))return{width:Oee(e,16),height:Oee(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var Vee=N((wOe,Yee)=>{"use strict";var Ike=xt().str2arr,Oke=xt().sliceEq,Gee=xt().readUInt32BE,Bke=Ike("8BPS\0");Yee.exports=function(e){if(!(e.length<22)&&Oke(e,0,Bke))return{width:Gee(e,18),height:Gee(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var Zee=N((TOe,jee)=>{"use strict";function Hke(e){return e===32||e===9||e===13||e===10}function Sv(e){return typeof e=="number"&&isFinite(e)&&e>0}function Uke(e){var r=0,t=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(r=3);r]*>/,Yke=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,Vke=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,Wke=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,jke=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,Wee=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Zke(e){var r=e.match(Vke),t=e.match(Wke),a=e.match(jke);return{width:r&&(r[1]||r[2]),height:t&&(t[1]||t[2]),viewbox:a&&(a[1]||a[2])}}function Jo(e){return Wee.test(e)?e.match(Wee)[0]:"px"}jee.exports=function(e){if(Uke(e)){for(var r="",t=0;t{"use strict";var $ee=xt().str2arr,Xee=xt().sliceEq,Xke=xt().readUInt16LE,Jke=xt().readUInt16BE,$ke=xt().readUInt32LE,Kke=xt().readUInt32BE,Qke=$ee("II*\0"),eSe=$ee("MM\0*");function o3(e,r,t){return t?Jke(e,r):Xke(e,r)}function IT(e,r,t){return t?Kke(e,r):$ke(e,r)}function Jee(e,r,t){var a=o3(e,r+2,t),n=IT(e,r+4,t);return n!==1||a!==3&&a!==4?null:a===3?o3(e,r+8,t):IT(e,r+8,t)}Kee.exports=function(e){if(!(e.length<8)&&!(!Xee(e,0,Qke)&&!Xee(e,0,eSe))){var r=e[0]===77,t=IT(e,4,r)-8;if(!(t<0)){var a=t+8;if(!(e.length-a<2)){var n=o3(e,a+0,r)*12;if(!(n<=0)&&(a+=2,!(e.length-a{"use strict";var tre=xt().str2arr,ere=xt().sliceEq,rre=xt().readUInt16LE,OT=xt().readUInt32LE,rSe=n3(),tSe=tre("RIFF"),aSe=tre("WEBP");function nSe(e,r){if(!(e[r+3]!==157||e[r+4]!==1||e[r+5]!==42))return{width:rre(e,r+6)&16383,height:rre(e,r+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function iSe(e,r){if(e[r]===47){var t=OT(e,r+1);return{width:(t&16383)+1,height:(t>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function oSe(e,r){return{width:(e[r+6]<<16|e[r+5]<<8|e[r+4])+1,height:(e[r+9]<e.length)){for(;r+8=10?t=t||nSe(e,r+8):i==="VP8L"&&o>=9?t=t||iSe(e,r+8):i==="VP8X"&&o>=10?t=t||oSe(e,r+8):i==="EXIF"&&(a=rSe.get_orientation(e.slice(r+8,r+8+o)),r=1/0),r+=8+o}if(t)return a>0&&(t.orientation=a),t}}}});var ore=N((kOe,ire)=>{"use strict";ire.exports={avif:Aee(),bmp:See(),gif:Dee(),ico:Fee(),jpeg:zee(),png:Uee(),psd:Vee(),svg:Zee(),tiff:Qee(),webp:nre()}});var lre=N((SOe,HT)=>{"use strict";var BT=ore();function lSe(e){for(var r=Object.keys(BT),t=0;t{"use strict";var sSe=lre(),uSe=yl().IMAGE_URL_PREFIX,fSe=ov().Buffer;sre.getImageSize=function(e){var r=e.replace(uSe,""),t=new fSe(r,"base64");return sSe(t)}});var vre=N((LOe,cre)=>{"use strict";var fre=Ee(),cSe=ev(),vSe=Pr(),l3=Or(),hSe=Ee().maxRowLength,dSe=ure().getImageSize;cre.exports=function(r,t){var a,n;if(t._hasZ)a=t.z.length,n=hSe(t.z);else if(t._hasSource){var i=dSe(t.source);a=i.height,n=i.width}var o=l3.getFromId(r,t.xaxis||"x"),l=l3.getFromId(r,t.yaxis||"y"),s=o.d2c(t.x0)-t.dx/2,u=l.d2c(t.y0)-t.dy/2,f,c=[s,s+n*t.dx],v=[u,u+a*t.dy];if(o&&o.type==="log")for(f=0;f{"use strict";var gSe=Sr(),nf=Ee(),hre=nf.strTranslate,bSe=ll(),xSe=ev(),_Se=Xw(),wSe=hg().STYLE;dre.exports=function(r,t,a,n){var i=t.xaxis,o=t.yaxis,l=!r._context._exportedPlot&&_Se();nf.makeTraceGroups(n,a,"im").each(function(s){var u=gSe.select(this),f=s[0],c=f.trace,v=(c.zsmooth==="fast"||c.zsmooth===!1&&l)&&!c._hasZ&&c._hasSource&&i.type==="linear"&&o.type==="linear";c._realImage=v;var d=f.z,p=f.x0,m=f.y0,y=f.w,_=f.h,b=c.dx,w=c.dy,x,T,k,M,S,E;for(E=0;x===void 0&&E0;)T=i.c2p(p+E*b),E--;for(E=0;M===void 0&&E<_;)M=o.c2p(m+E*w),E++;for(E=_;S===void 0&&E>0;)S=o.c2p(m+E*w),E--;if(TY[0];if(X||Z){var te=x+R/2,fe=M+D/2;G+="transform:"+hre(te+"px",fe+"px")+"scale("+(X?-1:1)+","+(Z?-1:1)+")"+hre(-te+"px",-fe+"px")+";"}}V.attr("style",G);var le=new Promise(function(ie){if(c._hasZ)ie();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===y&&c._canvas.el.height===_&&c._canvas.source===c.source)ie();else{var K=document.createElement("canvas");K.width=y,K.height=_;var he=K.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var oe=c._image;oe.onload=function(){he.drawImage(oe,0,0),c._canvas={el:K,source:c.source},ie()},oe.setAttribute("src",c.source)}}).then(function(){var ie,K;if(c._hasZ)K=H(function(ye,ue){var de=d[ue][ye];return nf.isTypedArray(de)&&(de=Array.from(de)),de}),ie=K.toDataURL("image/png");else if(c._hasSource)if(v)ie=c.source;else{var he=c._canvas.el.getContext("2d",{willReadFrequently:!0}),oe=he.getImageData(0,0,y,_).data;K=H(function(ye,ue){var de=4*(ue*y+ye);return[oe[de],oe[de+1],oe[de+2],oe[de+3]]}),ie=K.toDataURL("image/png")}V.attr({"xlink:href":ie,height:D,width:R,x,y:M})});r._promises.push(le)})}});var mre=N((EOe,yre)=>{"use strict";var TSe=Sr();yre.exports=function(r){TSe.select(r).selectAll(".im image").style("opacity",function(t){return t[0].trace.opacity})}});var _re=N((DOe,xre)=>{"use strict";var gre=Fn(),bre=Ee(),s3=bre.isArrayOrTypedArray,ASe=ev();xre.exports=function(r,t,a){var n=r.cd[0],i=n.trace,o=r.xa,l=r.ya;if(!(gre.inbox(t-n.x0,t-(n.x0+n.w*i.dx),0)>0||gre.inbox(a-n.y0,a-(n.y0+n.h*i.dy),0)>0)){var s=Math.floor((t-n.x0)/i.dx),u=Math.floor(Math.abs(a-n.y0)/i.dy),f;if(i._hasZ?f=n.z[u][s]:i._hasSource&&(f=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(s,u,1,1).data),!!f){var c=n.hi||i.hoverinfo,v;if(c){var d=c.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(v=!0)}var p=ASe.colormodel[i.colormodel],m=p.colormodel||i.colormodel,y=m.length,_=i._scaler(f),b=p.suffix,w=[];(i.hovertemplate||v)&&(w.push("["+[_[0]+b[0],_[1]+b[1],_[2]+b[2]].join(", ")),y===4&&w.push(", "+_[3]+b[3]),w.push("]"),w=w.join(""),r.extraText=m.toUpperCase()+": "+w);var x;s3(i.hovertext)&&s3(i.hovertext[u])?x=i.hovertext[u][s]:s3(i.text)&&s3(i.text[u])&&(x=i.text[u][s]);var T=l.c2p(n.y0+(u+.5)*i.dy),k=n.x0+(s+.5)*i.dx,M=n.y0+(u+.5)*i.dy,S="["+f.slice(0,i.colormodel.length).join(", ")+"]";return[bre.extendFlat(r,{index:[u,s],x0:o.c2p(n.x0+s*i.dx),x1:o.c2p(n.x0+(s+1)*i.dx),y0:T,y1:T,color:_,xVal:k,xLabelVal:k,yVal:M,yLabelVal:M,zLabelVal:S,text:x,hovertemplateLabels:{zLabel:S,colorLabel:w,"color[0]Label":_[0]+b[0],"color[1]Label":_[1]+b[1],"color[2]Label":_[2]+b[2],"color[3]Label":_[3]+b[3]}})]}}}});var Tre=N((POe,wre)=>{"use strict";wre.exports=function(r,t){return"xVal"in t&&(r.x=t.xVal),"yVal"in t&&(r.y=t.yVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r.color=t.color,r.colormodel=t.trace.colormodel,r.z||(r.z=t.color),r}});var Mre=N((ROe,Are)=>{"use strict";Are.exports={attributes:U6(),supplyDefaults:iX(),calc:vre(),plot:pre(),style:mre(),hoverPoints:_re(),eventData:Tre(),moduleType:"trace",name:"image",basePlotModule:qi(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var Sre=N((FOe,kre)=>{"use strict";kre.exports=Mre()});var UT=N((NOe,qre)=>{"use strict";var MSe=mn(),kSe=Pc().attributes,SSe=fa(),qSe=li(),LSe=La().hovertemplateAttrs,CSe=La().texttemplateAttrs,Md=bt().extendFlat,ESe=si().pattern,u3=SSe({editType:"plot",arrayOk:!0,colorEditType:"plot"});qre.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:qSe.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:ESe,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:Md({},MSe.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:LSe({},{keys:["label","color","value","percent","text"]}),texttemplate:CSe({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:Md({},u3,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:Md({},u3,{}),outsidetextfont:Md({},u3,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:Md({},u3,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:kSe({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 Dre=N((zOe,Ere)=>{"use strict";var DSe=Pr(),kd=Ee(),PSe=UT(),RSe=Pc().defaults,FSe=zu().handleText,NSe=Ee().coercePattern;function Lre(e,r){var t=kd.isArrayOrTypedArray(e),a=kd.isArrayOrTypedArray(r),n=Math.min(t?e.length:1/0,a?r.length:1/0);if(isFinite(n)||(n=0),n&&a){for(var i,o=0;o0){i=!0;break}}i||(n=0)}return{hasLabels:t,hasValues:a,len:n}}function Cre(e,r,t,a,n){var i=a("marker.line.width");i&&a("marker.line.color",n?void 0:t.paper_bgcolor);var o=a("marker.colors");NSe(a,"marker.pattern",o),e.marker&&!r.marker.pattern.fgcolor&&(r.marker.pattern.fgcolor=e.marker.colors),r.marker.pattern.bgcolor||(r.marker.pattern.bgcolor=t.paper_bgcolor)}function zSe(e,r,t,a){function n(b,w){return kd.coerce(e,r,PSe,b,w)}var i=n("labels"),o=n("values"),l=Lre(i,o),s=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(n("label0"),n("dlabel")),!s){r.visible=!1;return}r._length=s,Cre(e,r,a,n,!0),n("scalegroup");var u=n("text"),f=n("texttemplate"),c;if(f||(c=n("textinfo",kd.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||c&&c!=="none"){var v=n("textposition");FSe(e,r,a,n,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(v)||v==="auto",p=d||v==="outside";p&&n("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&n("insidetextorientation")}else c==="none"&&n("textposition","none");RSe(r,a,n);var m=n("hole"),y=n("title.text");if(y){var _=n("title.position",m?"middle center":"top center");!m&&_==="middle center"&&(r.title.position="top center"),kd.coerceFont(n,"title.font",a.font)}n("sort"),n("direction"),n("rotation"),n("pull")}Ere.exports={handleLabelsAndValues:Lre,handleMarkerDefaults:Cre,supplyDefaults:zSe}});var GT=N((IOe,Pre)=>{"use strict";Pre.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var Fre=N((OOe,Rre)=>{"use strict";var ISe=Ee(),OSe=GT();Rre.exports=function(r,t){function a(n,i){return ISe.coerce(r,t,OSe,n,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}});var VT=N((BOe,Ire)=>{"use strict";var BSe=Pr(),YT=Sn(),HSe=Tr(),USe={};function GSe(e,r){var t=[],a=e._fullLayout,n=a.hiddenlabels||[],i=r.labels,o=r.marker.colors||[],l=r.values,s=r._length,u=r._hasValues&&s,f,c;if(r.dlabel)for(i=new Array(s),f=0;f=0});var x=r.type==="funnelarea"?m:r.sort;return x&&t.sort(function(T,k){return k.v-T.v}),t[0]&&(t[0].vTotal=p),t}function Nre(e){return function(t,a){return!t||(t=YT(t),!t.isValid())?!1:(t=HSe.addOpacity(t,t.getAlpha()),e[a]||(e[a]=t),t)}}function YSe(e,r){var t=(r||{}).type;t||(t="pie");var a=e._fullLayout,n=e.calcdata,i=a[t+"colorway"],o=a["_"+t+"colormap"];a["extend"+t+"colors"]&&(i=zre(i,USe));for(var l=0,s=0;s{"use strict";var VSe=qo().appendArrayMultiPointValues;Ore.exports=function(r,t){var a={curveNumber:t.index,pointNumbers:r.pts,data:t._input,fullData:t,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return r.pts.length===1&&(a.pointNumber=a.i=r.pts[0]),VSe(a,t,r.pts),t.type==="funnelarea"&&(delete a.v,delete a.i),a}});var ste=N((UOe,lte)=>{"use strict";var Vn=Sr(),WSe=ea(),f3=Fn(),Wre=Tr(),El=jr(),Wa=Ee(),jSe=Wa.strScale,Hre=Wa.strTranslate,WT=Ea(),jre=x0(),ZSe=jre.recordMinTextSize,XSe=jre.clearMinTextSize,Zre=Zm().TEXTPAD,Mr=O1(),c3=Bre(),Ure=Ee().isValidTextValue;function JSe(e,r){var t=e._context.staticPlot,a=e._fullLayout,n=a._size;XSe("pie",a),$re(r,e),nte(r,n);var i=Wa.makeTraceGroups(a._pielayer,r,"trace").each(function(o){var l=Vn.select(this),s=o[0],u=s.trace;iqe(o),l.attr("stroke-linejoin","round"),l.each(function(){var f=Vn.select(this).selectAll("g.slice").data(o);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],v=!1;f.each(function(x,T){if(x.hidden){Vn.select(this).selectAll("path,g").remove();return}x.pointNumber=x.i,x.curveNumber=u.index,c[x.pxmid[1]<0?0:1][x.pxmid[0]<0?0:1].push(x);var k=s.cx,M=s.cy,S=Vn.select(this),E=S.selectAll("path.surface").data([x]);if(E.enter().append("path").classed("surface",!0).style({"pointer-events":t?"none":"all"}),S.call(Xre,e,o),u.pull){var P=+Mr.castOption(u.pull,x.pts)||0;P>0&&(k+=P*x.pxmid[0],M+=P*x.pxmid[1])}x.cxFinal=k,x.cyFinal=M;function R(B,Y,X,Z){var te=Z*(Y[0]-B[0]),fe=Z*(Y[1]-B[1]);return"a"+Z*s.r+","+Z*s.r+" 0 "+x.largeArc+(X?" 1 ":" 0 ")+te+","+fe}var D=u.hole;if(x.v===s.vTotal){var z="M"+(k+x.px0[0])+","+(M+x.px0[1])+R(x.px0,x.pxmid,!0,1)+R(x.pxmid,x.px0,!0,1)+"Z";D?E.attr("d","M"+(k+D*x.px0[0])+","+(M+D*x.px0[1])+R(x.px0,x.pxmid,!1,D)+R(x.pxmid,x.px0,!1,D)+"Z"+z):E.attr("d",z)}else{var O=R(x.px0,x.px1,!0,1);if(D){var H=1-D;E.attr("d","M"+(k+D*x.px1[0])+","+(M+D*x.px1[1])+R(x.px1,x.px0,!1,D)+"l"+H*x.px0[0]+","+H*x.px0[1]+O+"Z")}else E.attr("d","M"+k+","+M+"l"+x.px0[0]+","+x.px0[1]+O+"Z")}ite(e,x,s);var V=Mr.castOption(u.textposition,x.pts),G=S.selectAll("g.slicetext").data(x.text&&V!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var B=Wa.ensureSingle(Vn.select(this),"text","",function(K){K.attr("data-notex",1)}),Y=Wa.ensureUniformFontSize(e,V==="outside"?KSe(u,x,a.font):Jre(u,x,a.font));B.text(x.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(El.font,Y).call(WT.convertToTspans,e);var X=El.bBox(B.node()),Z;if(V==="outside")Z=Vre(X,x);else if(Z=Kre(X,x,s),V==="auto"&&Z.scale<1){var te=Wa.ensureUniformFontSize(e,u.outsidetextfont);B.call(El.font,te),X=El.bBox(B.node()),Z=Vre(X,x)}var fe=Z.textPosAngle,le=fe===void 0?x.pxmid:v3(s.r,fe);if(Z.targetX=k+le[0]*Z.rCenter+(Z.x||0),Z.targetY=M+le[1]*Z.rCenter+(Z.y||0),ote(Z,X),Z.outside){var ie=Z.targetY;x.yLabelMin=ie-X.height/2,x.yLabelMid=ie,x.yLabelMax=ie+X.height/2,x.labelExtraX=0,x.labelExtraY=0,v=!0}Z.fontSize=Y.size,ZSe(u.type,Z,a),o[T].transform=Z,Wa.setTransormAndDisplay(B,Z)})});var d=Vn.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 x=Wa.ensureSingle(Vn.select(this),"text","",function(M){M.attr("data-notex",1)}),T=u.title.text;u._meta&&(T=Wa.templateString(T,u._meta)),x.text(T).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(El.font,u.title.font).call(WT.convertToTspans,e);var k;u.title.position==="middle center"?k=rqe(s):k=tte(s,n),x.attr("transform",Hre(k.x,k.y)+jSe(Math.min(1,k.scale))+Hre(k.tx,k.ty))}),v&&aqe(c,u),$Se(f,u),v&&u.automargin){var p=El.bBox(l.node()),m=u.domain,y=n.w*(m.x[1]-m.x[0]),_=n.h*(m.y[1]-m.y[0]),b=(.5*y-s.r)/n.w,w=(.5*_-s.r)/n.h;WSe.autoMargin(e,"pie."+u.uid+".automargin",{xl:m.x[0]-b,xr:m.x[1]+b,yb:m.y[0]-w,yt:m.y[1]+w,l:Math.max(s.cx-s.r-p.left,0),r:Math.max(p.right-(s.cx+s.r),0),b:Math.max(p.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=Vn.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function $Se(e,r){e.each(function(t){var a=Vn.select(this);if(!t.labelExtraX&&!t.labelExtraY){a.select("path.textline").remove();return}var n=a.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,Wa.setTransormAndDisplay(n,t.transform);var i=t.cxFinal+t.pxmid[0],o=t.cyFinal+t.pxmid[1],l="M"+i+","+o,s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var u=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(u)>Math.abs(f)?l+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+s):l+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+s}else l+="V"+(t.yLabelMid+t.labelExtraY)+"h"+s;Wa.ensureSingle(a,"path","textline").call(Wre.stroke,r.outsidetextfont.color).attr({"stroke-width":Math.min(2,r.outsidetextfont.size/8),d:l,fill:"none"})})}function Xre(e,r,t){var a=t[0],n=a.cx,i=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(s){var u=r._fullLayout,f=r._fullData[o.index];if(!(r._dragging||u.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=f3.castHoverinfo({hoverinfo:[Mr.castOption(c,s.pts)],_module:o._module},u,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var v=s.rInscribed||0,d=n+s.pxmid[0]*(1-v),p=i+s.pxmid[1]*(1-v),m=u.separators,y=[];if(c&&c.indexOf("label")!==-1&&y.push(s.label),s.text=Mr.castOption(f.hovertext||f.text,s.pts),c&&c.indexOf("text")!==-1){var _=s.text;Wa.isValidTextValue(_)&&y.push(_)}s.value=s.v,s.valueLabel=Mr.formatPieValue(s.v,m),c&&c.indexOf("value")!==-1&&y.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Mr.formatPiePercent(s.percent,m),c&&c.indexOf("percent")!==-1&&y.push(s.percentLabel);var b=f.hoverlabel,w=b.font,x=[];f3.loneHover({trace:o,x0:d-v*a.r,x1:d+v*a.r,y:p,_x0:l?n+s.TL[0]:d-v*a.r,_x1:l?n+s.TR[0]:d+v*a.r,_y0:l?i+s.TL[1]:p-v*a.r,_y1:l?i+s.BL[1]:p+v*a.r,text:y.join("
"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:Mr.castOption(b.bgcolor,s.pts)||s.color,borderColor:Mr.castOption(b.bordercolor,s.pts),fontFamily:Mr.castOption(w.family,s.pts),fontSize:Mr.castOption(w.size,s.pts),fontColor:Mr.castOption(w.color,s.pts),nameLength:Mr.castOption(b.namelength,s.pts),textAlign:Mr.castOption(b.align,s.pts),hovertemplate:Mr.castOption(f.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[c3(s,f)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:r,inOut_bbox:x}),s.bbox=x[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,r.emit("plotly_hover",{points:[c3(s,f)],event:Vn.event})}}),e.on("mouseout",function(s){var u=r._fullLayout,f=r._fullData[o.index],c=Vn.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Vn.event,r.emit("plotly_unhover",{points:[c3(c,f)],event:Vn.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(f3.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(s){var u=r._fullLayout,f=r._fullData[o.index];r._dragging||u.hovermode===!1||(r._hoverdata=[c3(s,f)],f3.click(r,Vn.event))})}function KSe(e,r,t){var a=Mr.castOption(e.outsidetextfont.color,r.pts)||Mr.castOption(e.textfont.color,r.pts)||t.color,n=Mr.castOption(e.outsidetextfont.family,r.pts)||Mr.castOption(e.textfont.family,r.pts)||t.family,i=Mr.castOption(e.outsidetextfont.size,r.pts)||Mr.castOption(e.textfont.size,r.pts)||t.size,o=Mr.castOption(e.outsidetextfont.weight,r.pts)||Mr.castOption(e.textfont.weight,r.pts)||t.weight,l=Mr.castOption(e.outsidetextfont.style,r.pts)||Mr.castOption(e.textfont.style,r.pts)||t.style,s=Mr.castOption(e.outsidetextfont.variant,r.pts)||Mr.castOption(e.textfont.variant,r.pts)||t.variant,u=Mr.castOption(e.outsidetextfont.textcase,r.pts)||Mr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Mr.castOption(e.outsidetextfont.lineposition,r.pts)||Mr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Mr.castOption(e.outsidetextfont.shadow,r.pts)||Mr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a,family:n,size:i,weight:o,style:l,variant:s,textcase:u,lineposition:f,shadow:c}}function Jre(e,r,t){var a=Mr.castOption(e.insidetextfont.color,r.pts);!a&&e._input.textfont&&(a=Mr.castOption(e._input.textfont.color,r.pts));var n=Mr.castOption(e.insidetextfont.family,r.pts)||Mr.castOption(e.textfont.family,r.pts)||t.family,i=Mr.castOption(e.insidetextfont.size,r.pts)||Mr.castOption(e.textfont.size,r.pts)||t.size,o=Mr.castOption(e.insidetextfont.weight,r.pts)||Mr.castOption(e.textfont.weight,r.pts)||t.weight,l=Mr.castOption(e.insidetextfont.style,r.pts)||Mr.castOption(e.textfont.style,r.pts)||t.style,s=Mr.castOption(e.insidetextfont.variant,r.pts)||Mr.castOption(e.textfont.variant,r.pts)||t.variant,u=Mr.castOption(e.insidetextfont.textcase,r.pts)||Mr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Mr.castOption(e.insidetextfont.lineposition,r.pts)||Mr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Mr.castOption(e.insidetextfont.shadow,r.pts)||Mr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a||Wre.contrast(r.color),family:n,size:i,weight:o,style:l,variant:s,textcase:u,lineposition:f,shadow:c}}function $re(e,r){for(var t,a,n=0;n=-4;b-=2)_(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)_(Math.PI*(b+1),"tan")}if(c||d){for(b=4;b>=-4;b-=2)_(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)_(Math.PI*(b+.5),"rad")}}if(l||p||c){var w=Math.sqrt(e.width*e.width+e.height*e.height);if(y={scale:n*a*2/w,rCenter:1-n,rotate:0},y.textPosAngle=(r.startangle+r.stopangle)/2,y.scale>=1)return y;m.push(y)}(p||d)&&(y=Gre(e,a,o,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,m.push(y)),(p||v)&&(y=Yre(e,a,o,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,m.push(y));for(var x=0,T=0,k=0;k=1)break}return m[x]}function QSe(e,r){var t=e.startangle,a=e.stopangle;return t>r&&r>a||t0?1:-1)/2,y:i/(1+t*t/(a*a)),outside:!0}}function rqe(e){var r=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/r,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function tte(e,r){var t=1,a=1,n,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,n=ate(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+n)*e.r,l.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+n)*e.r);var s=tqe(e.r,e.trace.aspectratio),u=r.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+s,o.x-=(1+n)*s,l.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+s,o.x+=(1+n)*s,l.tx-=e.titleBox.width/2),t=u/e.titleBox.width,a=jT(e,r)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(t,a),tx:l.tx,ty:l.ty}}function tqe(e,r){return e/(r===void 0?1:r)}function jT(e,r){var t=e.trace,a=r.h*(t.domain.y[1]-t.domain.y[0]);return Math.min(e.titleBox.height,a/2)}function ate(e){var r=e.pull;if(!r)return 0;var t;if(Wa.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function aqe(e,r){var t,a,n,i,o,l,s,u,f,c,v,d,p;function m(w,x){return w.pxmid[1]-x.pxmid[1]}function y(w,x){return x.pxmid[1]-w.pxmid[1]}function _(w,x){x||(x={});var T=x.labelExtraY+(a?x.yLabelMax:x.yLabelMin),k=a?w.yLabelMin:w.yLabelMax,M=a?w.yLabelMax:w.yLabelMin,S=w.cyFinal+o(w.px0[1],w.px1[1]),E=T-k,P,R,D,z,O,H;if(E*s>0&&(w.labelExtraY=E),!!Wa.isArrayOrTypedArray(r.pull))for(R=0;R=(Mr.castOption(r.pull,D.pts)||0))&&((w.pxmid[1]-D.pxmid[1])*s>0?(z=D.cyFinal+o(D.px0[1],D.px1[1]),E=z-k-w.labelExtraY,E*s>0&&(w.labelExtraY+=E)):(M+w.labelExtraY-S)*s>0&&(P=3*l*Math.abs(R-c.indexOf(w)),O=D.cxFinal+i(D.px0[0],D.px1[0]),H=O+P-(w.cxFinal+w.pxmid[0])-w.labelExtraX,H*l>0&&(w.labelExtraX+=H)))}for(a=0;a<2;a++)for(n=a?m:y,o=a?Math.max:Math.min,s=a?1:-1,t=0;t<2;t++){for(i=t?Math.max:Math.min,l=t?1:-1,u=e[a][t],u.sort(n),f=e[1-a][t],c=f.concat(u),d=[],v=0;v1?(u=t.r,f=u/n.aspectratio):(f=t.r,u=f*n.aspectratio),u*=(1+n.baseratio)/2,s=u*f}o=Math.min(o,s/t.vTotal)}for(a=0;ar.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/r.vTotal,.5),u.ring=1-a.hole,u.rInscribed=eqe(u,r))}function v3(e,r){return[e*Math.sin(r),-e*Math.cos(r)]}function ite(e,r,t){var a=e._fullLayout,n=t.trace,i=n.texttemplate,o=n.textinfo;if(!i&&o&&o!=="none"){var l=o.split("+"),s=function(x){return l.indexOf(x)!==-1},u=s("label"),f=s("text"),c=s("value"),v=s("percent"),d=a.separators,p;if(p=u?[r.label]:[],f){var m=Mr.getFirstFilled(n.text,r.pts);Ure(m)&&p.push(m)}c&&p.push(Mr.formatPieValue(r.v,d)),v&&p.push(Mr.formatPiePercent(r.v/t.vTotal,d)),r.text=p.join("
")}function y(x){return{label:x.label,value:x.v,valueLabel:Mr.formatPieValue(x.v,a.separators),percent:x.v/t.vTotal,percentLabel:Mr.formatPiePercent(x.v/t.vTotal,a.separators),color:x.color,text:x.text,customdata:Wa.castOption(n,x.i,"customdata")}}if(i){var _=Wa.castOption(n,r.i,"texttemplate");if(!_)r.text="";else{var b=y(r),w=Mr.getFirstFilled(n.text,r.pts);(Ure(w)||w==="")&&(b.text=w),r.text=Wa.texttemplateString(_,b,e._fullLayout._d3locale,b,n._meta||{})}}}function ote(e,r){var t=e.rotate*Math.PI/180,a=Math.cos(t),n=Math.sin(t),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2;e.textX=i*a-o*n,e.textY=i*n+o*a,e.noCenter=!0}lte.exports={plot:JSe,formatSliceLabel:ite,transformInsideText:Kre,determineInsideTextFont:Jre,positionTitleOutside:tte,prerenderTitles:$re,layoutAreas:nte,attachFxHandlers:Xre,computeTransform:ote}});var cte=N((GOe,fte)=>{"use strict";var ute=Sr(),oqe=B1(),lqe=x0().resizeText;fte.exports=function(r){var t=r._fullLayout._pielayer.selectAll(".trace");lqe(r,t,"pie"),t.each(function(a){var n=a[0],i=n.trace,o=ute.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(l){ute.select(this).call(oqe,l,i,r)})})}});var hte=N(qv=>{"use strict";var vte=ea();qv.name="pie";qv.plot=function(e,r,t,a){vte.plotBasePlot(qv.name,e,r,t,a)};qv.clean=function(e,r,t,a){vte.cleanBasePlot(qv.name,e,r,t,a)}});var pte=N((VOe,dte)=>{"use strict";dte.exports={attributes:UT(),supplyDefaults:Dre().supplyDefaults,supplyLayoutDefaults:Fre(),layoutAttributes:GT(),calc:VT().calc,crossTraceCalc:VT().crossTraceCalc,plot:ste().plot,style:cte(),styleOne:B1(),moduleType:"trace",name:"pie",basePlotModule:hte(),categories:["pie-like","pie","showLegend"],meta:{}}});var mte=N((WOe,yte)=>{"use strict";yte.exports=pte()});var en=N((jOe,bte)=>{"use strict";var gte=Object.getOwnPropertySymbols,sqe=Object.prototype.hasOwnProperty,uqe=Object.prototype.propertyIsEnumerable;function fqe(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function cqe(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}bte.exports=cqe()?Object.assign:function(e,r){for(var t,a=fqe(e),n,i=1;i{var d3=en();function xte(){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={}}d3(xte.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function ZT(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function h3(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}d3(ZT.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Ir.local.differentCalendars||Ir.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+h3(Math.abs(this.year()),4)+"-"+h3(this.month(),2)+"-"+h3(this.day(),2)}});function XT(){this.shortYearCutoff="+10"}d3(XT.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new ZT(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+h3(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Ir.local.invalidMonth||Ir.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Ir.local.invalidMonth||Ir.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),o=e.monthOfYear()+(t==="m"?r:0),n=e.day(),l=function(f){for(;oc-1+f.minMonth;)i++,o-=c,c=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):t==="m"&&(l(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Ir=_te.exports=new xte;Ir.cdate=ZT;Ir.baseCalendar=XT;Ir.calendars.gregorian=JT});var wte=N(()=>{var $T=en(),Fa=rn();$T(Fa.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"});Fa.local=Fa.regionalOptions[""];$T(Fa.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});$T(Fa.baseCalendar.prototype,{UNIX_EPOCH:Fa.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Fa.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw Fa.local.invalidFormat||Fa.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,o=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(x,T){for(var k=1;w+k1},f=function(x,T,k,M){var S=""+T;if(u(x,M))for(;S.length1},b=function(D,z){var O=_(D,z),H=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],V=new RegExp("^-?\\d{1,"+H+"}"),G=r.substring(S).match(V);if(!G)throw(Fa.local.missingNumberAt||Fa.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=G[0].length,parseInt(G[0],10)},w=this,x=function(){if(typeof l=="function"){_("m");var D=l.call(w,r.substring(S));return S+=D.length,D}return b("m")},T=function(D,z,O,H){for(var V=_(D,H)?O:z,G=0;G-1){v=1,d=p;for(var R=this.daysInMonth(c,v);d>R;R=this.daysInMonth(c,v))v++,d-=R}return f>-1?this.fromJD(f):this.newDate(c,v,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,o=function(l){try{return i.parseDate(a,l,n)}catch(c){}l=l.toLowerCase();for(var s=(l.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(l);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(l);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var Tte=N(()=>{var Ds=rn(),vqe=en(),KT=Ds.instance();function p3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}p3.prototype=new Ds.baseCalendar;vqe(p3.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(dqe);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(pqe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(yqe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw Ds.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw Ds.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,Ds.local.invalidyear),n=Rs[a-Rs[0]],i=n>>9&4095,o=n>>5&15,l=n&31,s;s=KT.newDate(i,o,l),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=Ps[e-Ps[0]],a=t>>13,n=a?12:11;if(r>n)throw Ds.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,Ds.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),o=gqe(e,i,t,n);return KT.toJD(o.year,o.month,o.day)},fromJD:function(e){var r=KT.fromJD(e),t=mqe(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match(hqe),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),o=+r[4];return this.newDate(t,i,o)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),o=this.toChineseMonth(a,n),l=Object.getPrototypeOf(p3.prototype).add.call(this,e,r,t);if(t==="y"){var s=l.year(),u=l.month(),f=this.isIntercalaryMonth(s,o),c=i&&f?this.toMonthIndex(s,o,!0):this.toMonthIndex(s,o,!1);c!==u&&l.month(c)}return l}});var hqe=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,dqe=/^\d?\d[iI]?/m,pqe=/^闰?十?[一二三四五六七八九]?月/m,yqe=/^闰?十?[一二三四五六七八九]?/m;Ds.calendars.chinese=p3;var Ps=[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],Rs=[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 mqe(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=Rs[n.year-Rs[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=Rs[i.year-Rs[0]];var c=u>>9&4095,v=u>>5&15,d=u&31,p,m=new Date(c,v-1,d),y=new Date(n.year,n.month-1,n.day);p=Math.round((y-m)/(24*3600*1e3));var _=Ps[i.year-Ps[0]],b;for(b=0;b<13;b++){var w=_&1<<12-b?30:29;if(p>13;return!x||b=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),o={year:e,month:r,day:t,isIntercalary:f}}var c;c=o.day-1;var v=Ps[o.year-Ps[0]],d=v>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var m=0;m>9&4095,w=_>>5&15,x=_&31,T=new Date(b,w-1,x+c);return i.year=T.getFullYear(),i.month=1+T.getMonth(),i.day=T.getDate(),i}});var Ate=N(()=>{var of=rn(),bqe=en();function QT(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QT.prototype=new of.baseCalendar;bqe(QT.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(t){var r=this._validate(t,this.minMonth,this.minDay,of.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,of.local.invalidYear||of.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,of.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,of.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});of.calendars.coptic=QT});var Mte=N(()=>{var Dl=rn(),xqe=en();function e8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}e8.prototype=new Dl.baseCalendar;xqe(e8.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,Dl.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Dl.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Dl.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Dl.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Dl.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Dl.local.invalidDate);return{century:_qe[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,Dl.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var _qe={20:"Fruitbat",21:"Anchovy"};Dl.calendars.discworld=e8});var kte=N(()=>{var lf=rn(),wqe=en();function r8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r8.prototype=new lf.baseCalendar;wqe(r8.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(t){var r=this._validate(t,this.minMonth,this.minDay,lf.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,lf.local.invalidYear||lf.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,lf.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,lf.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});lf.calendars.ethiopian=r8});var Ste=N(()=>{var Fs=rn(),Tqe=en();function t8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}t8.prototype=new Fs.baseCalendar;Tqe(t8.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 r=this._validate(e,this.minMonth,this.minDay,Fs.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,y3(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fs.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Fs.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Fs.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&y3(this.daysInYear(e),10)===5?30:r===9&&y3(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Fs.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Fs.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function y3(e,r){return e-r*Math.floor(e/r)}Fs.calendars.hebrew=t8});var qte=N(()=>{var Sd=rn(),Aqe=en();function a8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a8.prototype=new Sd.baseCalendar;Aqe(a8.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 r=this._validate(e,this.minMonth,this.minDay,Sd.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Sd.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Sd.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});Sd.calendars.islamic=a8});var Lte=N(()=>{var qd=rn(),Mqe=en();function n8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n8.prototype=new qd.baseCalendar;Mqe(n8.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(t){var r=this._validate(t,this.minMonth,this.minDay,qd.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,qd.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,qd.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),o=i-Math.floor(i<14?1:13),l=a-Math.floor(o>2?4716:4715),s=t-n-Math.floor(30.6001*i);return l<=0&&l--,this.newDate(l,o,s)}});qd.calendars.julian=n8});var Ete=N(()=>{var Ui=rn(),kqe=en();function o8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o8.prototype=new Ui.baseCalendar;kqe(o8.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,Ui.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ui.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ui.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Ui.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ui.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Ui.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Ui.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Ui.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Ui.local.invalidDate),n=a.toJD(),i=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=i8(e+8+17*20,365);return[Math.floor(r/20)+1,i8(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[Cte(e+20,20),Cte(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,Ui.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function i8(e,r){return e-r*Math.floor(e/r)}function Cte(e,r){return i8(e-1,r)+1}Ui.calendars.mayan=o8});var Pte=N(()=>{var sf=rn(),Sqe=en();function l8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}l8.prototype=new sf.baseCalendar;var Dte=sf.instance("gregorian");Sqe(l8.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 r=this._validate(e,this.minMonth,this.minDay,sf.local.invalidYear||sf.regionalOptions[""].invalidYear);return Dte.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,sf.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,sf.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),o=1;o=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});sf.calendars.nanakshahi=l8});var Rte=N(()=>{var uf=rn(),qqe=en();function s8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}s8.prototype=new uf.baseCalendar;qqe(s8.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,uf.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,uf.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,uf.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=uf.instance(),i=0,o=r,l=e;this._createMissingCalendarData(e);var s=e-(o>9||o===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(i=t,o--);o!==9;)o<=0&&(o=12,l--),i+=this.NEPALI_CALENDAR_DATA[l][o],o--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[l][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=uf.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;n>s;)o++,o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-n);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var Lv=rn(),Lqe=en();function m3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}m3.prototype=new Lv.baseCalendar;Lqe(m3.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,Lv.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Lv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Lv.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+u8(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=u8(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),o=u8(a,366);n=Math.floor((2134*i+2816*o+2815)/1028522)+i+1}var l=n+2820*t+474;l=l<=0?l-1:l;var s=e-this.toJD(l,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}});function u8(e,r){return e-r*Math.floor(e/r)}Lv.calendars.persian=m3;Lv.calendars.jalali=m3});var Nte=N(()=>{var ff=rn(),Cqe=en(),g3=ff.instance();function f8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}f8.prototype=new ff.baseCalendar;Cqe(f8.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(t){var r=this._validate(t,this.minMonth,this.minDay,ff.local.invalidYear),t=this._t2gYear(r.year());return g3.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,ff.local.invalidYear),n=this._t2gYear(a.year());return g3.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ff.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,ff.local.invalidDate),n=this._t2gYear(a.year());return g3.toJD(n,a.month(),a.day())},fromJD:function(e){var r=g3.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});ff.calendars.taiwan=f8});var zte=N(()=>{var cf=rn(),Eqe=en(),b3=cf.instance();function c8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}c8.prototype=new cf.baseCalendar;Eqe(c8.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(t){var r=this._validate(t,this.minMonth,this.minDay,cf.local.invalidYear),t=this._t2gYear(r.year());return b3.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,cf.local.invalidYear),n=this._t2gYear(a.year());return b3.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,cf.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,cf.local.invalidDate),n=this._t2gYear(a.year());return b3.toJD(n,a.month(),a.day())},fromJD:function(e){var r=b3.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});cf.calendars.thai=c8});var Ite=N(()=>{var vf=rn(),Dqe=en();function v8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}v8.prototype=new vf.baseCalendar;Dqe(v8.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 r=this._validate(e,this.minMonth,this.minDay,vf.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,vf.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return Ns[n]-Ns[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,vf.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+Ns[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),o=i+1,l=n-12*i,s=r-Ns[t-1]+1;return this.newDate(o,l,s)},isValid:function(e,r,t){var a=vf.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=vf.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});vf.calendars.ummalqura=v8;var Ns=[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 Bte=N((MBe,Ote)=>{"use strict";Ote.exports=rn();wte();Tte();Ate();Mte();kte();Ste();qte();Lte();Ete();Pte();Rte();Fte();Nte();zte();Ite()});var jte=N((kBe,Wte)=>{"use strict";var Ute=Bte(),Ld=Ee(),Gte=Ft(),Pqe=Gte.EPOCHJD,Rqe=Gte.ONEDAY,p8={valType:"enumerated",values:Ld.sortObjectKeys(Ute.calendars),editType:"calc",dflt:"gregorian"},Yte=function(e,r,t,a){var n={};return n[t]=p8,Ld.coerce(e,r,n,t,a)},Fqe=function(e,r,t,a){for(var n=0;n{"use strict";Zte.exports=jte()});var Hqe=N((qBe,$te)=>{var Jte=NU();Jte.register([IG(),MY(),UV(),sW(),_W(),Tj(),zj(),AZ(),QZ(),Sre(),mte(),Xte()]);$te.exports=Jte});return Hqe();})(); +`),zke=Bee("IHDR");Hee.exports=function(e){if(!(e.length<24)&&Iee(e,0,Nke)&&Iee(e,12,zke))return{width:Oee(e,16),height:Oee(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var Vee=N((wOe,Yee)=>{"use strict";var Ike=xt().str2arr,Oke=xt().sliceEq,Gee=xt().readUInt32BE,Bke=Ike("8BPS\0");Yee.exports=function(e){if(!(e.length<22)&&Oke(e,0,Bke))return{width:Gee(e,18),height:Gee(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var Zee=N((TOe,jee)=>{"use strict";function Hke(e){return e===32||e===9||e===13||e===10}function Sv(e){return typeof e=="number"&&isFinite(e)&&e>0}function Uke(e){var r=0,t=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(r=3);r]*>/,Yke=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,Vke=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,Wke=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,jke=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,Wee=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Zke(e){var r=e.match(Vke),t=e.match(Wke),a=e.match(jke);return{width:r&&(r[1]||r[2]),height:t&&(t[1]||t[2]),viewbox:a&&(a[1]||a[2])}}function Jo(e){return Wee.test(e)?e.match(Wee)[0]:"px"}jee.exports=function(e){if(Uke(e)){for(var r="",t=0;t{"use strict";var $ee=xt().str2arr,Xee=xt().sliceEq,Xke=xt().readUInt16LE,Jke=xt().readUInt16BE,$ke=xt().readUInt32LE,Kke=xt().readUInt32BE,Qke=$ee("II*\0"),eSe=$ee("MM\0*");function o3(e,r,t){return t?Jke(e,r):Xke(e,r)}function IT(e,r,t){return t?Kke(e,r):$ke(e,r)}function Jee(e,r,t){var a=o3(e,r+2,t),n=IT(e,r+4,t);return n!==1||a!==3&&a!==4?null:a===3?o3(e,r+8,t):IT(e,r+8,t)}Kee.exports=function(e){if(!(e.length<8)&&!(!Xee(e,0,Qke)&&!Xee(e,0,eSe))){var r=e[0]===77,t=IT(e,4,r)-8;if(!(t<0)){var a=t+8;if(!(e.length-a<2)){var n=o3(e,a+0,r)*12;if(!(n<=0)&&(a+=2,!(e.length-a{"use strict";var tre=xt().str2arr,ere=xt().sliceEq,rre=xt().readUInt16LE,OT=xt().readUInt32LE,rSe=n3(),tSe=tre("RIFF"),aSe=tre("WEBP");function nSe(e,r){if(!(e[r+3]!==157||e[r+4]!==1||e[r+5]!==42))return{width:rre(e,r+6)&16383,height:rre(e,r+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function iSe(e,r){if(e[r]===47){var t=OT(e,r+1);return{width:(t&16383)+1,height:(t>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function oSe(e,r){return{width:(e[r+6]<<16|e[r+5]<<8|e[r+4])+1,height:(e[r+9]<e.length)){for(;r+8=10?t=t||nSe(e,r+8):i==="VP8L"&&o>=9?t=t||iSe(e,r+8):i==="VP8X"&&o>=10?t=t||oSe(e,r+8):i==="EXIF"&&(a=rSe.get_orientation(e.slice(r+8,r+8+o)),r=1/0),r+=8+o}if(t)return a>0&&(t.orientation=a),t}}}});var ore=N((kOe,ire)=>{"use strict";ire.exports={avif:Aee(),bmp:See(),gif:Dee(),ico:Fee(),jpeg:zee(),png:Uee(),psd:Vee(),svg:Zee(),tiff:Qee(),webp:nre()}});var lre=N((SOe,HT)=>{"use strict";var BT=ore();function lSe(e){for(var r=Object.keys(BT),t=0;t{"use strict";var sSe=lre(),uSe=yl().IMAGE_URL_PREFIX,fSe=ov().Buffer;sre.getImageSize=function(e){var r=e.replace(uSe,""),t=new fSe(r,"base64");return sSe(t)}});var vre=N((LOe,cre)=>{"use strict";var fre=Ee(),cSe=ev(),vSe=Pr(),l3=Or(),hSe=Ee().maxRowLength,dSe=ure().getImageSize;cre.exports=function(r,t){var a,n;if(t._hasZ)a=t.z.length,n=hSe(t.z);else if(t._hasSource){var i=dSe(t.source);a=i.height,n=i.width}var o=l3.getFromId(r,t.xaxis||"x"),l=l3.getFromId(r,t.yaxis||"y"),s=o.d2c(t.x0)-t.dx/2,u=l.d2c(t.y0)-t.dy/2,f,c=[s,s+n*t.dx],v=[u,u+a*t.dy];if(o&&o.type==="log")for(f=0;f{"use strict";var gSe=Sr(),nf=Ee(),hre=nf.strTranslate,bSe=ll(),xSe=ev(),_Se=Xw(),wSe=hg().STYLE;dre.exports=function(r,t,a,n){var i=t.xaxis,o=t.yaxis,l=!r._context._exportedPlot&&_Se();nf.makeTraceGroups(n,a,"im").each(function(s){var u=gSe.select(this),f=s[0],c=f.trace,v=(c.zsmooth==="fast"||c.zsmooth===!1&&l)&&!c._hasZ&&c._hasSource&&i.type==="linear"&&o.type==="linear";c._realImage=v;var d=f.z,p=f.x0,m=f.y0,y=f.w,x=f.h,_=c.dx,w=c.dy,b,T,k,M,S,E;for(E=0;b===void 0&&E0;)T=i.c2p(p+E*_),E--;for(E=0;M===void 0&&E0;)S=o.c2p(m+E*w),E--;if(TV[0];if(X||Z){var te=b+R/2,fe=M+D/2;G+="transform:"+hre(te+"px",fe+"px")+"scale("+(X?-1:1)+","+(Z?-1:1)+")"+hre(-te+"px",-fe+"px")+";"}}Y.attr("style",G);var le=new Promise(function(ie){if(c._hasZ)ie();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===y&&c._canvas.el.height===x&&c._canvas.source===c.source)ie();else{var K=document.createElement("canvas");K.width=y,K.height=x;var he=K.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var oe=c._image;oe.onload=function(){he.drawImage(oe,0,0),c._canvas={el:K,source:c.source},ie()},oe.setAttribute("src",c.source)}}).then(function(){var ie,K;if(c._hasZ)K=H(function(ye,ue){var de=d[ue][ye];return nf.isTypedArray(de)&&(de=Array.from(de)),de}),ie=K.toDataURL("image/png");else if(c._hasSource)if(v)ie=c.source;else{var he=c._canvas.el.getContext("2d",{willReadFrequently:!0}),oe=he.getImageData(0,0,y,x).data;K=H(function(ye,ue){var de=4*(ue*y+ye);return[oe[de],oe[de+1],oe[de+2],oe[de+3]]}),ie=K.toDataURL("image/png")}Y.attr({"xlink:href":ie,height:D,width:R,x:b,y:M})});r._promises.push(le)})}});var mre=N((EOe,yre)=>{"use strict";var TSe=Sr();yre.exports=function(r){TSe.select(r).selectAll(".im image").style("opacity",function(t){return t[0].trace.opacity})}});var _re=N((DOe,xre)=>{"use strict";var gre=Fn(),bre=Ee(),s3=bre.isArrayOrTypedArray,ASe=ev();xre.exports=function(r,t,a){var n=r.cd[0],i=n.trace,o=r.xa,l=r.ya;if(!(gre.inbox(t-n.x0,t-(n.x0+n.w*i.dx),0)>0||gre.inbox(a-n.y0,a-(n.y0+n.h*i.dy),0)>0)){var s=Math.floor((t-n.x0)/i.dx),u=Math.floor(Math.abs(a-n.y0)/i.dy),f;if(i._hasZ?f=n.z[u][s]:i._hasSource&&(f=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(s,u,1,1).data),!!f){var c=n.hi||i.hoverinfo,v;if(c){var d=c.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(v=!0)}var p=ASe.colormodel[i.colormodel],m=p.colormodel||i.colormodel,y=m.length,x=i._scaler(f),_=p.suffix,w=[];(i.hovertemplate||v)&&(w.push("["+[x[0]+_[0],x[1]+_[1],x[2]+_[2]].join(", ")),y===4&&w.push(", "+x[3]+_[3]),w.push("]"),w=w.join(""),r.extraText=m.toUpperCase()+": "+w);var b;s3(i.hovertext)&&s3(i.hovertext[u])?b=i.hovertext[u][s]:s3(i.text)&&s3(i.text[u])&&(b=i.text[u][s]);var T=l.c2p(n.y0+(u+.5)*i.dy),k=n.x0+(s+.5)*i.dx,M=n.y0+(u+.5)*i.dy,S="["+f.slice(0,i.colormodel.length).join(", ")+"]";return[bre.extendFlat(r,{index:[u,s],x0:o.c2p(n.x0+s*i.dx),x1:o.c2p(n.x0+(s+1)*i.dx),y0:T,y1:T,color:x,xVal:k,xLabelVal:k,yVal:M,yLabelVal:M,zLabelVal:S,text:b,hovertemplateLabels:{zLabel:S,colorLabel:w,"color[0]Label":x[0]+_[0],"color[1]Label":x[1]+_[1],"color[2]Label":x[2]+_[2],"color[3]Label":x[3]+_[3]}})]}}}});var Tre=N((POe,wre)=>{"use strict";wre.exports=function(r,t){return"xVal"in t&&(r.x=t.xVal),"yVal"in t&&(r.y=t.yVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r.color=t.color,r.colormodel=t.trace.colormodel,r.z||(r.z=t.color),r}});var Mre=N((ROe,Are)=>{"use strict";Are.exports={attributes:U6(),supplyDefaults:iX(),calc:vre(),plot:pre(),style:mre(),hoverPoints:_re(),eventData:Tre(),moduleType:"trace",name:"image",basePlotModule:qi(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var Sre=N((FOe,kre)=>{"use strict";kre.exports=Mre()});var UT=N((NOe,qre)=>{"use strict";var MSe=mn(),kSe=Pc().attributes,SSe=fa(),qSe=li(),LSe=La().hovertemplateAttrs,CSe=La().texttemplateAttrs,Md=bt().extendFlat,ESe=si().pattern,u3=SSe({editType:"plot",arrayOk:!0,colorEditType:"plot"});qre.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:qSe.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:ESe,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:Md({},MSe.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:LSe({},{keys:["label","color","value","percent","text"]}),texttemplate:CSe({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:Md({},u3,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:Md({},u3,{}),outsidetextfont:Md({},u3,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:Md({},u3,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:kSe({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 Dre=N((zOe,Ere)=>{"use strict";var DSe=Pr(),kd=Ee(),PSe=UT(),RSe=Pc().defaults,FSe=zu().handleText,NSe=Ee().coercePattern;function Lre(e,r){var t=kd.isArrayOrTypedArray(e),a=kd.isArrayOrTypedArray(r),n=Math.min(t?e.length:1/0,a?r.length:1/0);if(isFinite(n)||(n=0),n&&a){for(var i,o=0;o0){i=!0;break}}i||(n=0)}return{hasLabels:t,hasValues:a,len:n}}function Cre(e,r,t,a,n){var i=a("marker.line.width");i&&a("marker.line.color",n?void 0:t.paper_bgcolor);var o=a("marker.colors");NSe(a,"marker.pattern",o),e.marker&&!r.marker.pattern.fgcolor&&(r.marker.pattern.fgcolor=e.marker.colors),r.marker.pattern.bgcolor||(r.marker.pattern.bgcolor=t.paper_bgcolor)}function zSe(e,r,t,a){function n(_,w){return kd.coerce(e,r,PSe,_,w)}var i=n("labels"),o=n("values"),l=Lre(i,o),s=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(n("label0"),n("dlabel")),!s){r.visible=!1;return}r._length=s,Cre(e,r,a,n,!0),n("scalegroup");var u=n("text"),f=n("texttemplate"),c;if(f||(c=n("textinfo",kd.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||c&&c!=="none"){var v=n("textposition");FSe(e,r,a,n,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(v)||v==="auto",p=d||v==="outside";p&&n("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&n("insidetextorientation")}else c==="none"&&n("textposition","none");RSe(r,a,n);var m=n("hole"),y=n("title.text");if(y){var x=n("title.position",m?"middle center":"top center");!m&&x==="middle center"&&(r.title.position="top center"),kd.coerceFont(n,"title.font",a.font)}n("sort"),n("direction"),n("rotation"),n("pull")}Ere.exports={handleLabelsAndValues:Lre,handleMarkerDefaults:Cre,supplyDefaults:zSe}});var GT=N((IOe,Pre)=>{"use strict";Pre.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var Fre=N((OOe,Rre)=>{"use strict";var ISe=Ee(),OSe=GT();Rre.exports=function(r,t){function a(n,i){return ISe.coerce(r,t,OSe,n,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}});var VT=N((BOe,Ire)=>{"use strict";var BSe=Pr(),YT=Sn(),HSe=Tr(),USe={};function GSe(e,r){var t=[],a=e._fullLayout,n=a.hiddenlabels||[],i=r.labels,o=r.marker.colors||[],l=r.values,s=r._length,u=r._hasValues&&s,f,c;if(r.dlabel)for(i=new Array(s),f=0;f=0});var b=r.type==="funnelarea"?m:r.sort;return b&&t.sort(function(T,k){return k.v-T.v}),t[0]&&(t[0].vTotal=p),t}function Nre(e){return function(t,a){return!t||(t=YT(t),!t.isValid())?!1:(t=HSe.addOpacity(t,t.getAlpha()),e[a]||(e[a]=t),t)}}function YSe(e,r){var t=(r||{}).type;t||(t="pie");var a=e._fullLayout,n=e.calcdata,i=a[t+"colorway"],o=a["_"+t+"colormap"];a["extend"+t+"colors"]&&(i=zre(i,USe));for(var l=0,s=0;s{"use strict";var VSe=qo().appendArrayMultiPointValues;Ore.exports=function(r,t){var a={curveNumber:t.index,pointNumbers:r.pts,data:t._input,fullData:t,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return r.pts.length===1&&(a.pointNumber=a.i=r.pts[0]),VSe(a,t,r.pts),t.type==="funnelarea"&&(delete a.v,delete a.i),a}});var ste=N((UOe,lte)=>{"use strict";var Vn=Sr(),WSe=ea(),f3=Fn(),Wre=Tr(),El=jr(),Wa=Ee(),jSe=Wa.strScale,Hre=Wa.strTranslate,WT=Ea(),jre=x0(),ZSe=jre.recordMinTextSize,XSe=jre.clearMinTextSize,Zre=Zm().TEXTPAD,Mr=O1(),c3=Bre(),Ure=Ee().isValidTextValue;function JSe(e,r){var t=e._context.staticPlot,a=e._fullLayout,n=a._size;XSe("pie",a),$re(r,e),nte(r,n);var i=Wa.makeTraceGroups(a._pielayer,r,"trace").each(function(o){var l=Vn.select(this),s=o[0],u=s.trace;iqe(o),l.attr("stroke-linejoin","round"),l.each(function(){var f=Vn.select(this).selectAll("g.slice").data(o);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],v=!1;f.each(function(b,T){if(b.hidden){Vn.select(this).selectAll("path,g").remove();return}b.pointNumber=b.i,b.curveNumber=u.index,c[b.pxmid[1]<0?0:1][b.pxmid[0]<0?0:1].push(b);var k=s.cx,M=s.cy,S=Vn.select(this),E=S.selectAll("path.surface").data([b]);if(E.enter().append("path").classed("surface",!0).style({"pointer-events":t?"none":"all"}),S.call(Xre,e,o),u.pull){var P=+Mr.castOption(u.pull,b.pts)||0;P>0&&(k+=P*b.pxmid[0],M+=P*b.pxmid[1])}b.cxFinal=k,b.cyFinal=M;function R(B,V,X,Z){var te=Z*(V[0]-B[0]),fe=Z*(V[1]-B[1]);return"a"+Z*s.r+","+Z*s.r+" 0 "+b.largeArc+(X?" 1 ":" 0 ")+te+","+fe}var D=u.hole;if(b.v===s.vTotal){var z="M"+(k+b.px0[0])+","+(M+b.px0[1])+R(b.px0,b.pxmid,!0,1)+R(b.pxmid,b.px0,!0,1)+"Z";D?E.attr("d","M"+(k+D*b.px0[0])+","+(M+D*b.px0[1])+R(b.px0,b.pxmid,!1,D)+R(b.pxmid,b.px0,!1,D)+"Z"+z):E.attr("d",z)}else{var O=R(b.px0,b.px1,!0,1);if(D){var H=1-D;E.attr("d","M"+(k+D*b.px1[0])+","+(M+D*b.px1[1])+R(b.px1,b.px0,!1,D)+"l"+H*b.px0[0]+","+H*b.px0[1]+O+"Z")}else E.attr("d","M"+k+","+M+"l"+b.px0[0]+","+b.px0[1]+O+"Z")}ite(e,b,s);var Y=Mr.castOption(u.textposition,b.pts),G=S.selectAll("g.slicetext").data(b.text&&Y!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var B=Wa.ensureSingle(Vn.select(this),"text","",function(K){K.attr("data-notex",1)}),V=Wa.ensureUniformFontSize(e,Y==="outside"?KSe(u,b,a.font):Jre(u,b,a.font));B.text(b.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(El.font,V).call(WT.convertToTspans,e);var X=El.bBox(B.node()),Z;if(Y==="outside")Z=Vre(X,b);else if(Z=Kre(X,b,s),Y==="auto"&&Z.scale<1){var te=Wa.ensureUniformFontSize(e,u.outsidetextfont);B.call(El.font,te),X=El.bBox(B.node()),Z=Vre(X,b)}var fe=Z.textPosAngle,le=fe===void 0?b.pxmid:v3(s.r,fe);if(Z.targetX=k+le[0]*Z.rCenter+(Z.x||0),Z.targetY=M+le[1]*Z.rCenter+(Z.y||0),ote(Z,X),Z.outside){var ie=Z.targetY;b.yLabelMin=ie-X.height/2,b.yLabelMid=ie,b.yLabelMax=ie+X.height/2,b.labelExtraX=0,b.labelExtraY=0,v=!0}Z.fontSize=V.size,ZSe(u.type,Z,a),o[T].transform=Z,Wa.setTransormAndDisplay(B,Z)})});var d=Vn.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 b=Wa.ensureSingle(Vn.select(this),"text","",function(M){M.attr("data-notex",1)}),T=u.title.text;u._meta&&(T=Wa.templateString(T,u._meta)),b.text(T).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(El.font,u.title.font).call(WT.convertToTspans,e);var k;u.title.position==="middle center"?k=rqe(s):k=tte(s,n),b.attr("transform",Hre(k.x,k.y)+jSe(Math.min(1,k.scale))+Hre(k.tx,k.ty))}),v&&aqe(c,u),$Se(f,u),v&&u.automargin){var p=El.bBox(l.node()),m=u.domain,y=n.w*(m.x[1]-m.x[0]),x=n.h*(m.y[1]-m.y[0]),_=(.5*y-s.r)/n.w,w=(.5*x-s.r)/n.h;WSe.autoMargin(e,"pie."+u.uid+".automargin",{xl:m.x[0]-_,xr:m.x[1]+_,yb:m.y[0]-w,yt:m.y[1]+w,l:Math.max(s.cx-s.r-p.left,0),r:Math.max(p.right-(s.cx+s.r),0),b:Math.max(p.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=Vn.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function $Se(e,r){e.each(function(t){var a=Vn.select(this);if(!t.labelExtraX&&!t.labelExtraY){a.select("path.textline").remove();return}var n=a.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,Wa.setTransormAndDisplay(n,t.transform);var i=t.cxFinal+t.pxmid[0],o=t.cyFinal+t.pxmid[1],l="M"+i+","+o,s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var u=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(u)>Math.abs(f)?l+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+s):l+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+s}else l+="V"+(t.yLabelMid+t.labelExtraY)+"h"+s;Wa.ensureSingle(a,"path","textline").call(Wre.stroke,r.outsidetextfont.color).attr({"stroke-width":Math.min(2,r.outsidetextfont.size/8),d:l,fill:"none"})})}function Xre(e,r,t){var a=t[0],n=a.cx,i=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(s){var u=r._fullLayout,f=r._fullData[o.index];if(!(r._dragging||u.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=f3.castHoverinfo({hoverinfo:[Mr.castOption(c,s.pts)],_module:o._module},u,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var v=s.rInscribed||0,d=n+s.pxmid[0]*(1-v),p=i+s.pxmid[1]*(1-v),m=u.separators,y=[];if(c&&c.indexOf("label")!==-1&&y.push(s.label),s.text=Mr.castOption(f.hovertext||f.text,s.pts),c&&c.indexOf("text")!==-1){var x=s.text;Wa.isValidTextValue(x)&&y.push(x)}s.value=s.v,s.valueLabel=Mr.formatPieValue(s.v,m),c&&c.indexOf("value")!==-1&&y.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Mr.formatPiePercent(s.percent,m),c&&c.indexOf("percent")!==-1&&y.push(s.percentLabel);var _=f.hoverlabel,w=_.font,b=[];f3.loneHover({trace:o,x0:d-v*a.r,x1:d+v*a.r,y:p,_x0:l?n+s.TL[0]:d-v*a.r,_x1:l?n+s.TR[0]:d+v*a.r,_y0:l?i+s.TL[1]:p-v*a.r,_y1:l?i+s.BL[1]:p+v*a.r,text:y.join("
"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:Mr.castOption(_.bgcolor,s.pts)||s.color,borderColor:Mr.castOption(_.bordercolor,s.pts),fontFamily:Mr.castOption(w.family,s.pts),fontSize:Mr.castOption(w.size,s.pts),fontColor:Mr.castOption(w.color,s.pts),nameLength:Mr.castOption(_.namelength,s.pts),textAlign:Mr.castOption(_.align,s.pts),hovertemplate:Mr.castOption(f.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[c3(s,f)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:r,inOut_bbox:b}),s.bbox=b[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,r.emit("plotly_hover",{points:[c3(s,f)],event:Vn.event})}}),e.on("mouseout",function(s){var u=r._fullLayout,f=r._fullData[o.index],c=Vn.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Vn.event,r.emit("plotly_unhover",{points:[c3(c,f)],event:Vn.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(f3.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(s){var u=r._fullLayout,f=r._fullData[o.index];r._dragging||u.hovermode===!1||(r._hoverdata=[c3(s,f)],f3.click(r,Vn.event))})}function KSe(e,r,t){var a=Mr.castOption(e.outsidetextfont.color,r.pts)||Mr.castOption(e.textfont.color,r.pts)||t.color,n=Mr.castOption(e.outsidetextfont.family,r.pts)||Mr.castOption(e.textfont.family,r.pts)||t.family,i=Mr.castOption(e.outsidetextfont.size,r.pts)||Mr.castOption(e.textfont.size,r.pts)||t.size,o=Mr.castOption(e.outsidetextfont.weight,r.pts)||Mr.castOption(e.textfont.weight,r.pts)||t.weight,l=Mr.castOption(e.outsidetextfont.style,r.pts)||Mr.castOption(e.textfont.style,r.pts)||t.style,s=Mr.castOption(e.outsidetextfont.variant,r.pts)||Mr.castOption(e.textfont.variant,r.pts)||t.variant,u=Mr.castOption(e.outsidetextfont.textcase,r.pts)||Mr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Mr.castOption(e.outsidetextfont.lineposition,r.pts)||Mr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Mr.castOption(e.outsidetextfont.shadow,r.pts)||Mr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a,family:n,size:i,weight:o,style:l,variant:s,textcase:u,lineposition:f,shadow:c}}function Jre(e,r,t){var a=Mr.castOption(e.insidetextfont.color,r.pts);!a&&e._input.textfont&&(a=Mr.castOption(e._input.textfont.color,r.pts));var n=Mr.castOption(e.insidetextfont.family,r.pts)||Mr.castOption(e.textfont.family,r.pts)||t.family,i=Mr.castOption(e.insidetextfont.size,r.pts)||Mr.castOption(e.textfont.size,r.pts)||t.size,o=Mr.castOption(e.insidetextfont.weight,r.pts)||Mr.castOption(e.textfont.weight,r.pts)||t.weight,l=Mr.castOption(e.insidetextfont.style,r.pts)||Mr.castOption(e.textfont.style,r.pts)||t.style,s=Mr.castOption(e.insidetextfont.variant,r.pts)||Mr.castOption(e.textfont.variant,r.pts)||t.variant,u=Mr.castOption(e.insidetextfont.textcase,r.pts)||Mr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Mr.castOption(e.insidetextfont.lineposition,r.pts)||Mr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Mr.castOption(e.insidetextfont.shadow,r.pts)||Mr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a||Wre.contrast(r.color),family:n,size:i,weight:o,style:l,variant:s,textcase:u,lineposition:f,shadow:c}}function $re(e,r){for(var t,a,n=0;n=-4;_-=2)x(Math.PI*_,"tan");for(_=4;_>=-4;_-=2)x(Math.PI*(_+1),"tan")}if(c||d){for(_=4;_>=-4;_-=2)x(Math.PI*(_+1.5),"rad");for(_=4;_>=-4;_-=2)x(Math.PI*(_+.5),"rad")}}if(l||p||c){var w=Math.sqrt(e.width*e.width+e.height*e.height);if(y={scale:n*a*2/w,rCenter:1-n,rotate:0},y.textPosAngle=(r.startangle+r.stopangle)/2,y.scale>=1)return y;m.push(y)}(p||d)&&(y=Gre(e,a,o,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,m.push(y)),(p||v)&&(y=Yre(e,a,o,s,u),y.textPosAngle=(r.startangle+r.stopangle)/2,m.push(y));for(var b=0,T=0,k=0;k=1)break}return m[b]}function QSe(e,r){var t=e.startangle,a=e.stopangle;return t>r&&r>a||t0?1:-1)/2,y:i/(1+t*t/(a*a)),outside:!0}}function rqe(e){var r=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/r,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function tte(e,r){var t=1,a=1,n,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,n=ate(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+n)*e.r,l.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+n)*e.r);var s=tqe(e.r,e.trace.aspectratio),u=r.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+s,o.x-=(1+n)*s,l.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+s,o.x+=(1+n)*s,l.tx-=e.titleBox.width/2),t=u/e.titleBox.width,a=jT(e,r)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(t,a),tx:l.tx,ty:l.ty}}function tqe(e,r){return e/(r===void 0?1:r)}function jT(e,r){var t=e.trace,a=r.h*(t.domain.y[1]-t.domain.y[0]);return Math.min(e.titleBox.height,a/2)}function ate(e){var r=e.pull;if(!r)return 0;var t;if(Wa.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function aqe(e,r){var t,a,n,i,o,l,s,u,f,c,v,d,p;function m(w,b){return w.pxmid[1]-b.pxmid[1]}function y(w,b){return b.pxmid[1]-w.pxmid[1]}function x(w,b){b||(b={});var T=b.labelExtraY+(a?b.yLabelMax:b.yLabelMin),k=a?w.yLabelMin:w.yLabelMax,M=a?w.yLabelMax:w.yLabelMin,S=w.cyFinal+o(w.px0[1],w.px1[1]),E=T-k,P,R,D,z,O,H;if(E*s>0&&(w.labelExtraY=E),!!Wa.isArrayOrTypedArray(r.pull))for(R=0;R=(Mr.castOption(r.pull,D.pts)||0))&&((w.pxmid[1]-D.pxmid[1])*s>0?(z=D.cyFinal+o(D.px0[1],D.px1[1]),E=z-k-w.labelExtraY,E*s>0&&(w.labelExtraY+=E)):(M+w.labelExtraY-S)*s>0&&(P=3*l*Math.abs(R-c.indexOf(w)),O=D.cxFinal+i(D.px0[0],D.px1[0]),H=O+P-(w.cxFinal+w.pxmid[0])-w.labelExtraX,H*l>0&&(w.labelExtraX+=H)))}for(a=0;a<2;a++)for(n=a?m:y,o=a?Math.max:Math.min,s=a?1:-1,t=0;t<2;t++){for(i=t?Math.max:Math.min,l=t?1:-1,u=e[a][t],u.sort(n),f=e[1-a][t],c=f.concat(u),d=[],v=0;v1?(u=t.r,f=u/n.aspectratio):(f=t.r,u=f*n.aspectratio),u*=(1+n.baseratio)/2,s=u*f}o=Math.min(o,s/t.vTotal)}for(a=0;ar.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/r.vTotal,.5),u.ring=1-a.hole,u.rInscribed=eqe(u,r))}function v3(e,r){return[e*Math.sin(r),-e*Math.cos(r)]}function ite(e,r,t){var a=e._fullLayout,n=t.trace,i=n.texttemplate,o=n.textinfo;if(!i&&o&&o!=="none"){var l=o.split("+"),s=function(b){return l.indexOf(b)!==-1},u=s("label"),f=s("text"),c=s("value"),v=s("percent"),d=a.separators,p;if(p=u?[r.label]:[],f){var m=Mr.getFirstFilled(n.text,r.pts);Ure(m)&&p.push(m)}c&&p.push(Mr.formatPieValue(r.v,d)),v&&p.push(Mr.formatPiePercent(r.v/t.vTotal,d)),r.text=p.join("
")}function y(b){return{label:b.label,value:b.v,valueLabel:Mr.formatPieValue(b.v,a.separators),percent:b.v/t.vTotal,percentLabel:Mr.formatPiePercent(b.v/t.vTotal,a.separators),color:b.color,text:b.text,customdata:Wa.castOption(n,b.i,"customdata")}}if(i){var x=Wa.castOption(n,r.i,"texttemplate");if(!x)r.text="";else{var _=y(r),w=Mr.getFirstFilled(n.text,r.pts);(Ure(w)||w==="")&&(_.text=w),r.text=Wa.texttemplateString(x,_,e._fullLayout._d3locale,_,n._meta||{})}}}function ote(e,r){var t=e.rotate*Math.PI/180,a=Math.cos(t),n=Math.sin(t),i=(r.left+r.right)/2,o=(r.top+r.bottom)/2;e.textX=i*a-o*n,e.textY=i*n+o*a,e.noCenter=!0}lte.exports={plot:JSe,formatSliceLabel:ite,transformInsideText:Kre,determineInsideTextFont:Jre,positionTitleOutside:tte,prerenderTitles:$re,layoutAreas:nte,attachFxHandlers:Xre,computeTransform:ote}});var cte=N((GOe,fte)=>{"use strict";var ute=Sr(),oqe=B1(),lqe=x0().resizeText;fte.exports=function(r){var t=r._fullLayout._pielayer.selectAll(".trace");lqe(r,t,"pie"),t.each(function(a){var n=a[0],i=n.trace,o=ute.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(l){ute.select(this).call(oqe,l,i,r)})})}});var hte=N(qv=>{"use strict";var vte=ea();qv.name="pie";qv.plot=function(e,r,t,a){vte.plotBasePlot(qv.name,e,r,t,a)};qv.clean=function(e,r,t,a){vte.cleanBasePlot(qv.name,e,r,t,a)}});var pte=N((VOe,dte)=>{"use strict";dte.exports={attributes:UT(),supplyDefaults:Dre().supplyDefaults,supplyLayoutDefaults:Fre(),layoutAttributes:GT(),calc:VT().calc,crossTraceCalc:VT().crossTraceCalc,plot:ste().plot,style:cte(),styleOne:B1(),moduleType:"trace",name:"pie",basePlotModule:hte(),categories:["pie-like","pie","showLegend"],meta:{}}});var mte=N((WOe,yte)=>{"use strict";yte.exports=pte()});var en=N((jOe,bte)=>{"use strict";var gte=Object.getOwnPropertySymbols,sqe=Object.prototype.hasOwnProperty,uqe=Object.prototype.propertyIsEnumerable;function fqe(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function cqe(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}bte.exports=cqe()?Object.assign:function(e,r){for(var t,a=fqe(e),n,i=1;i{var d3=en();function xte(){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={}}d3(xte.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function ZT(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function h3(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}d3(ZT.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Ir.local.differentCalendars||Ir.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+h3(Math.abs(this.year()),4)+"-"+h3(this.month(),2)+"-"+h3(this.day(),2)}});function XT(){this.shortYearCutoff="+10"}d3(XT.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new ZT(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+h3(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Ir.local.invalidMonth||Ir.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Ir.local.invalidMonth||Ir.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ir.local.invalidYear||Ir.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),o=e.monthOfYear()+(t==="m"?r:0),n=e.day(),l=function(f){for(;oc-1+f.minMonth;)i++,o-=c,c=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):t==="m"&&(l(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Ir.local.invalidDate||Ir.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Ir=_te.exports=new xte;Ir.cdate=ZT;Ir.baseCalendar=XT;Ir.calendars.gregorian=JT});var wte=N(()=>{var $T=en(),Fa=rn();$T(Fa.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"});Fa.local=Fa.regionalOptions[""];$T(Fa.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});$T(Fa.baseCalendar.prototype,{UNIX_EPOCH:Fa.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Fa.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw Fa.local.invalidFormat||Fa.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,o=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(b,T){for(var k=1;w+k1},f=function(b,T,k,M){var S=""+T;if(u(b,M))for(;S.length1},_=function(D,z){var O=x(D,z),H=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],Y=new RegExp("^-?\\d{1,"+H+"}"),G=r.substring(S).match(Y);if(!G)throw(Fa.local.missingNumberAt||Fa.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=G[0].length,parseInt(G[0],10)},w=this,b=function(){if(typeof l=="function"){x("m");var D=l.call(w,r.substring(S));return S+=D.length,D}return _("m")},T=function(D,z,O,H){for(var Y=x(D,H)?O:z,G=0;G-1){v=1,d=p;for(var R=this.daysInMonth(c,v);d>R;R=this.daysInMonth(c,v))v++,d-=R}return f>-1?this.fromJD(f):this.newDate(c,v,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,o=function(l){try{return i.parseDate(a,l,n)}catch(c){}l=l.toLowerCase();for(var s=(l.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(l);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(l);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var Tte=N(()=>{var Ds=rn(),vqe=en(),KT=Ds.instance();function p3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}p3.prototype=new Ds.baseCalendar;vqe(p3.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(dqe);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(pqe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(yqe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw Ds.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw Ds.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,Ds.local.invalidyear),n=Rs[a-Rs[0]],i=n>>9&4095,o=n>>5&15,l=n&31,s;s=KT.newDate(i,o,l),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=Ps[e-Ps[0]],a=t>>13,n=a?12:11;if(r>n)throw Ds.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,Ds.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),o=gqe(e,i,t,n);return KT.toJD(o.year,o.month,o.day)},fromJD:function(e){var r=KT.fromJD(e),t=mqe(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match(hqe),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),o=+r[4];return this.newDate(t,i,o)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),o=this.toChineseMonth(a,n),l=Object.getPrototypeOf(p3.prototype).add.call(this,e,r,t);if(t==="y"){var s=l.year(),u=l.month(),f=this.isIntercalaryMonth(s,o),c=i&&f?this.toMonthIndex(s,o,!0):this.toMonthIndex(s,o,!1);c!==u&&l.month(c)}return l}});var hqe=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,dqe=/^\d?\d[iI]?/m,pqe=/^闰?十?[一二三四五六七八九]?月/m,yqe=/^闰?十?[一二三四五六七八九]?/m;Ds.calendars.chinese=p3;var Ps=[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],Rs=[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 mqe(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=Rs[n.year-Rs[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=Rs[i.year-Rs[0]];var c=u>>9&4095,v=u>>5&15,d=u&31,p,m=new Date(c,v-1,d),y=new Date(n.year,n.month-1,n.day);p=Math.round((y-m)/(24*3600*1e3));var x=Ps[i.year-Ps[0]],_;for(_=0;_<13;_++){var w=x&1<<12-_?30:29;if(p>13;return!b||_=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),o={year:e,month:r,day:t,isIntercalary:f}}var c;c=o.day-1;var v=Ps[o.year-Ps[0]],d=v>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var m=0;m>9&4095,w=x>>5&15,b=x&31,T=new Date(_,w-1,b+c);return i.year=T.getFullYear(),i.month=1+T.getMonth(),i.day=T.getDate(),i}});var Ate=N(()=>{var of=rn(),bqe=en();function QT(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QT.prototype=new of.baseCalendar;bqe(QT.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(t){var r=this._validate(t,this.minMonth,this.minDay,of.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,of.local.invalidYear||of.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,of.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,of.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});of.calendars.coptic=QT});var Mte=N(()=>{var Dl=rn(),xqe=en();function e8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}e8.prototype=new Dl.baseCalendar;xqe(e8.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,Dl.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Dl.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Dl.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Dl.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Dl.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Dl.local.invalidDate);return{century:_qe[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,Dl.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var _qe={20:"Fruitbat",21:"Anchovy"};Dl.calendars.discworld=e8});var kte=N(()=>{var lf=rn(),wqe=en();function r8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r8.prototype=new lf.baseCalendar;wqe(r8.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(t){var r=this._validate(t,this.minMonth,this.minDay,lf.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,lf.local.invalidYear||lf.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,lf.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,lf.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});lf.calendars.ethiopian=r8});var Ste=N(()=>{var Fs=rn(),Tqe=en();function t8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}t8.prototype=new Fs.baseCalendar;Tqe(t8.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 r=this._validate(e,this.minMonth,this.minDay,Fs.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,y3(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fs.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Fs.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Fs.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&y3(this.daysInYear(e),10)===5?30:r===9&&y3(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Fs.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Fs.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function y3(e,r){return e-r*Math.floor(e/r)}Fs.calendars.hebrew=t8});var qte=N(()=>{var Sd=rn(),Aqe=en();function a8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}a8.prototype=new Sd.baseCalendar;Aqe(a8.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 r=this._validate(e,this.minMonth,this.minDay,Sd.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Sd.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Sd.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});Sd.calendars.islamic=a8});var Lte=N(()=>{var qd=rn(),Mqe=en();function n8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n8.prototype=new qd.baseCalendar;Mqe(n8.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(t){var r=this._validate(t,this.minMonth,this.minDay,qd.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,qd.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,qd.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),o=i-Math.floor(i<14?1:13),l=a-Math.floor(o>2?4716:4715),s=t-n-Math.floor(30.6001*i);return l<=0&&l--,this.newDate(l,o,s)}});qd.calendars.julian=n8});var Ete=N(()=>{var Ui=rn(),kqe=en();function o8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o8.prototype=new Ui.baseCalendar;kqe(o8.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,Ui.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ui.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ui.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Ui.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ui.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Ui.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Ui.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Ui.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Ui.local.invalidDate),n=a.toJD(),i=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=i8(e+8+17*20,365);return[Math.floor(r/20)+1,i8(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[Cte(e+20,20),Cte(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,Ui.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function i8(e,r){return e-r*Math.floor(e/r)}function Cte(e,r){return i8(e-1,r)+1}Ui.calendars.mayan=o8});var Pte=N(()=>{var sf=rn(),Sqe=en();function l8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}l8.prototype=new sf.baseCalendar;var Dte=sf.instance("gregorian");Sqe(l8.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 r=this._validate(e,this.minMonth,this.minDay,sf.local.invalidYear||sf.regionalOptions[""].invalidYear);return Dte.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,sf.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,sf.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),o=1;o=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});sf.calendars.nanakshahi=l8});var Rte=N(()=>{var uf=rn(),qqe=en();function s8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}s8.prototype=new uf.baseCalendar;qqe(s8.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,uf.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,uf.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,uf.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=uf.instance(),i=0,o=r,l=e;this._createMissingCalendarData(e);var s=e-(o>9||o===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(i=t,o--);o!==9;)o<=0&&(o=12,l--),i+=this.NEPALI_CALENDAR_DATA[l][o],o--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[l][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=uf.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;n>s;)o++,o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-n);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var Lv=rn(),Lqe=en();function m3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}m3.prototype=new Lv.baseCalendar;Lqe(m3.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,Lv.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Lv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Lv.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+u8(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=u8(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),o=u8(a,366);n=Math.floor((2134*i+2816*o+2815)/1028522)+i+1}var l=n+2820*t+474;l=l<=0?l-1:l;var s=e-this.toJD(l,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}});function u8(e,r){return e-r*Math.floor(e/r)}Lv.calendars.persian=m3;Lv.calendars.jalali=m3});var Nte=N(()=>{var ff=rn(),Cqe=en(),g3=ff.instance();function f8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}f8.prototype=new ff.baseCalendar;Cqe(f8.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(t){var r=this._validate(t,this.minMonth,this.minDay,ff.local.invalidYear),t=this._t2gYear(r.year());return g3.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,ff.local.invalidYear),n=this._t2gYear(a.year());return g3.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ff.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,ff.local.invalidDate),n=this._t2gYear(a.year());return g3.toJD(n,a.month(),a.day())},fromJD:function(e){var r=g3.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});ff.calendars.taiwan=f8});var zte=N(()=>{var cf=rn(),Eqe=en(),b3=cf.instance();function c8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}c8.prototype=new cf.baseCalendar;Eqe(c8.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(t){var r=this._validate(t,this.minMonth,this.minDay,cf.local.invalidYear),t=this._t2gYear(r.year());return b3.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,cf.local.invalidYear),n=this._t2gYear(a.year());return b3.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,cf.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,cf.local.invalidDate),n=this._t2gYear(a.year());return b3.toJD(n,a.month(),a.day())},fromJD:function(e){var r=b3.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});cf.calendars.thai=c8});var Ite=N(()=>{var vf=rn(),Dqe=en();function v8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}v8.prototype=new vf.baseCalendar;Dqe(v8.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 r=this._validate(e,this.minMonth,this.minDay,vf.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,vf.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return Ns[n]-Ns[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,vf.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+Ns[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),o=i+1,l=n-12*i,s=r-Ns[t-1]+1;return this.newDate(o,l,s)},isValid:function(e,r,t){var a=vf.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=vf.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});vf.calendars.ummalqura=v8;var Ns=[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 Bte=N((MBe,Ote)=>{"use strict";Ote.exports=rn();wte();Tte();Ate();Mte();kte();Ste();qte();Lte();Ete();Pte();Rte();Fte();Nte();zte();Ite()});var jte=N((kBe,Wte)=>{"use strict";var Ute=Bte(),Ld=Ee(),Gte=Ft(),Pqe=Gte.EPOCHJD,Rqe=Gte.ONEDAY,p8={valType:"enumerated",values:Ld.sortObjectKeys(Ute.calendars),editType:"calc",dflt:"gregorian"},Yte=function(e,r,t,a){var n={};return n[t]=p8,Ld.coerce(e,r,n,t,a)},Fqe=function(e,r,t,a){for(var n=0;n{"use strict";Zte.exports=jte()});var Hqe=N((qBe,$te)=>{var Jte=NU();Jte.register([IG(),MY(),UV(),sW(),_W(),Tj(),zj(),AZ(),QZ(),Sre(),mte(),Xte()]);$te.exports=Jte});return Hqe();})(); /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/dist/plotly-finance.js b/dist/plotly-finance.js index c01239ebc56..3ebc0c32b01 100644 --- a/dist/plotly-finance.js +++ b/dist/plotly-finance.js @@ -13714,7 +13714,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13738,10 +13738,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54111,8 +54111,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54125,18 +54131,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-finance.min.js b/dist/plotly-finance.min.js index 1b6f3a9281e..7a9ab13e082 100644 --- a/dist/plotly-finance.min.js +++ b/dist/plotly-finance.min.js @@ -12,13 +12,13 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var wy=Object.defineProperty;var XW=Object.getOwnPropertyDescriptor;var ZW=Object.getOwnPropertyNames;var JW=Object.prototype.hasOwnProperty;var nt=(e,r)=>()=>(e&&(r=e(e=0)),r);var B=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),$W=(e,r)=>{for(var t in r)wy(e,t,{get:r[t],enumerable:!0})},KW=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ZW(r))!JW.call(e,n)&&n!==t&&wy(e,n,{get:()=>r[n],enumerable:!(a=XW(r,n))||a.enumerable});return e};var Ty=e=>KW(wy({},"__esModule",{value:!0}),e);var Q0=B(U4=>{"use strict";U4.version="3.0.0-rc.0"});var W4=B((V4,j0)=>{(function(r,t,a){t[r]=t[r]||a(),typeof j0!="undefined"&&j0.exports?j0.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:V4,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(b){return setImmediate(b)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(b,T,x,M){return Object.defineProperty(b,T,{value:x,writable:!0,configurable:M!==!1})}}catch(_){r=function(T,x,M){return T[x]=M,T}}a=function(){var b,T,x;function M(A,k){this.fn=A,this.self=k,this.next=void 0}return{add:function(k,L){x=new M(k,L),T?T.next=x:b=x,T=x,x=void 0},drain:function(){var k=b;for(b=T=t=void 0;k;)k.fn.call(k.self),k=k.next}}}();function l(_,b){a.add(_,b),t||(t=i(a.drain))}function o(_){var b,T=typeof _;return _!=null&&(T=="object"||T=="function")&&(b=_.then),typeof b=="function"?b:!1}function s(){for(var _=0;_0&&l(s,T))}catch(x){c.call(new d(T),x)}}}function c(_){var b=this;b.triggered||(b.triggered=!0,b.def&&(b=b.def),b.msg=_,b.state=2,b.chain.length>0&&l(s,b))}function h(_,b,T,x){for(var M=0;M{(function(){var e={version:"3.8.2"},r=[].slice,t=function(v){return r.call(v)},a=self.document;function n(v){return v&&(v.ownerDocument||v.document||v).documentElement}function i(v){return v&&(v.ownerDocument&&v.ownerDocument.defaultView||v.document&&v||v.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(v){t=function(g){for(var w=g.length,q=new Array(w);w--;)q[w]=g[w];return q}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(v){var l=this.Element.prototype,o=l.setAttribute,s=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;l.setAttribute=function(g,w){o.call(this,g,w+"")},l.setAttributeNS=function(g,w,q){s.call(this,g,w,q+"")},u.setProperty=function(g,w,q){f.call(this,g,w+"",q)}}e.ascending=c;function c(v,g){return vg?1:v>=g?0:NaN}e.descending=function(v,g){return gv?1:g>=v?0:NaN},e.min=function(v,g){var w=-1,q=v.length,C,S;if(arguments.length===1){for(;++w=S){C=S;break}for(;++wS&&(C=S)}else{for(;++w=S){C=S;break}for(;++wS&&(C=S)}return C},e.max=function(v,g){var w=-1,q=v.length,C,S;if(arguments.length===1){for(;++w=S){C=S;break}for(;++wC&&(C=S)}else{for(;++w=S){C=S;break}for(;++wC&&(C=S)}return C},e.extent=function(v,g){var w=-1,q=v.length,C,S,N;if(arguments.length===1){for(;++w=S){C=N=S;break}for(;++wS&&(C=S),N=S){C=N=S;break}for(;++wS&&(C=S),N1)return N/(F-1)},e.deviation=function(){var v=e.variance.apply(this,arguments);return v&&Math.sqrt(v)};function p(v){return{left:function(g,w,q,C){for(arguments.length<3&&(q=0),arguments.length<4&&(C=g.length);q>>1;v(g[S],w)<0?q=S+1:C=S}return q},right:function(g,w,q,C){for(arguments.length<3&&(q=0),arguments.length<4&&(C=g.length);q>>1;v(g[S],w)>0?C=S:q=S+1}return q}}}var y=p(c);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(v){return p(v.length===1?function(g,w){return c(v(g),w)}:v)},e.shuffle=function(v,g,w){(q=arguments.length)<3&&(w=v.length,q<2&&(g=0));for(var q=w-g,C,S;q;)S=Math.random()*q--|0,C=v[q+g],v[q+g]=v[S+g],v[S+g]=C;return v},e.permute=function(v,g){for(var w=g.length,q=new Array(w);w--;)q[w]=v[g[w]];return q},e.pairs=function(v){for(var g=0,w=v.length-1,q,C=v[0],S=new Array(w<0?0:w);g=0;)for(N=v[g],w=N.length;--w>=0;)S[--C]=N[w];return S};var _=Math.abs;e.range=function(v,g,w){if(arguments.length<3&&(w=1,arguments.length<2&&(g=v,v=0)),(g-v)/w===1/0)throw new Error("infinite range");var q=[],C=b(_(w)),S=-1,N;if(v*=C,g*=C,w*=C,w<0)for(;(N=v+w*++S)>g;)q.push(N/C);else for(;(N=v+w*++S)=g.length)return C?C.call(v,F):q?F.sort(q):F;for(var $=-1,j=F.length,ee=g[J++],me,Te,ae,oe=new x,he;++$=g.length)return E;var J=[],$=w[F++];return E.forEach(function(j,ee){J.push({key:j,values:N(ee,F)})}),$?J.sort(function(j,ee){return $(j.key,ee.key)}):J}return v.map=function(E,F){return S(F,E,0)},v.entries=function(E){return N(S(e.map,E,0),0)},v.key=function(E){return g.push(E),v},v.sortKeys=function(E){return w[g.length-1]=E,v},v.sortValues=function(E){return q=E,v},v.rollup=function(E){return C=E,v},v},e.set=function(v){var g=new O;if(v)for(var w=0,q=v.length;w=0&&(q=v.slice(w+1),v=v.slice(0,w)),v)return arguments.length<2?this[v].on(q):this[v].on(q,g);if(arguments.length===2){if(g==null)for(v in this)this.hasOwnProperty(v)&&this[v].on(q,null);return this}};function K(v){var g=[],w=new x;function q(){for(var C=g,S=-1,N=C.length,E;++S=0&&(w=v.slice(0,g))!=="xmlns"&&(v=v.slice(g+1)),ye.hasOwnProperty(w)?{space:ye[w],local:v}:v}},be.attr=function(v,g){if(arguments.length<2){if(typeof v=="string"){var w=this.node();return v=e.ns.qualify(v),v.local?w.getAttributeNS(v.space,v.local):w.getAttribute(v)}for(g in v)this.each(_e(g,v[g]));return this}return this.each(_e(v,g))};function _e(v,g){v=e.ns.qualify(v);function w(){this.removeAttribute(v)}function q(){this.removeAttributeNS(v.space,v.local)}function C(){this.setAttribute(v,g)}function S(){this.setAttributeNS(v.space,v.local,g)}function N(){var F=g.apply(this,arguments);F==null?this.removeAttribute(v):this.setAttribute(v,F)}function E(){var F=g.apply(this,arguments);F==null?this.removeAttributeNS(v.space,v.local):this.setAttributeNS(v.space,v.local,F)}return g==null?v.local?q:w:typeof g=="function"?v.local?E:N:v.local?S:C}function xe(v){return v.trim().replace(/\s+/g," ")}be.classed=function(v,g){if(arguments.length<2){if(typeof v=="string"){var w=this.node(),q=(v=ze(v)).length,C=-1;if(g=w.classList){for(;++C=0;)(S=w[q])&&(C&&C!==S.nextSibling&&C.parentNode.insertBefore(S,C),C=S);return this},be.sort=function(v){v=Ae.apply(this,arguments);for(var g=-1,w=this.length;++g=g&&(g=C+1);!(F=N[g])&&++g0&&(v=v.slice(0,C));var N=Ye.get(v);N&&(v=N,S=Ge);function E(){var $=this[q];$&&(this.removeEventListener(v,$,$.$),delete this[q])}function F(){var $=S(g,t(arguments));E.call(this),this.addEventListener(v,this[q]=$,$.$=w),$._=g}function J(){var $=new RegExp("^__on([^.]+)"+e.requote(v)+"$"),j;for(var ee in this)if(j=ee.match($)){var me=this[ee];this.removeEventListener(j[1],me,me.$),delete this[ee]}}return C?g?F:E:g?G:J}var Ye=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ye.forEach(function(v){"on"+v in a&&Ye.remove(v)});function Xe(v,g){return function(w){var q=e.event;e.event=w,g[0]=this.__data__;try{v.apply(this,g)}finally{e.event=q}}}function Ge(v,g){var w=Xe(v,g);return function(q){var C=this,S=q.relatedTarget;(!S||S!==C&&!(S.compareDocumentPosition(C)&8))&&w.call(C,q)}}var Oe,$e=0;function fr(v){var g=".dragsuppress-"+ ++$e,w="click"+g,q=e.select(i(v)).on("touchmove"+g,re).on("dragstart"+g,re).on("selectstart"+g,re);if(Oe==null&&(Oe="onselectstart"in v?!1:Y(v.style,"userSelect")),Oe){var C=n(v).style,S=C[Oe];C[Oe]="none"}return function(N){if(q.on(g,null),Oe&&(C[Oe]=S),N){var E=function(){q.on(w,null)};q.on(w,function(){re(),E()},!0),setTimeout(E,0)}}}e.mouse=function(v){return Ne(v,se())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ne(v,g){g.changedTouches&&(g=g.changedTouches[0]);var w=v.ownerSVGElement||v;if(w.createSVGPoint){var q=w.createSVGPoint();if(lr<0){var C=i(v);if(C.scrollX||C.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var S=w[0][0].getScreenCTM();lr=!(S.f||S.e),w.remove()}}return lr?(q.x=g.pageX,q.y=g.pageY):(q.x=g.clientX,q.y=g.clientY),q=q.matrixTransform(v.getScreenCTM().inverse()),[q.x,q.y]}var N=v.getBoundingClientRect();return[g.clientX-N.left-v.clientLeft,g.clientY-N.top-v.clientTop]}e.touch=function(v,g,w){if(arguments.length<3&&(w=g,g=se().changedTouches),g){for(var q=0,C=g.length,S;q0?1:v<0?-1:0}function Wr(v,g,w){return(g[0]-v[0])*(w[1]-v[1])-(g[1]-v[1])*(w[0]-v[0])}function Nt(v){return v>1?0:v<-1?qe:Math.acos(v)}function oa(v){return v>1?sr:v<-1?-sr:Math.asin(v)}function Na(v){return((v=Math.exp(v))-1/v)/2}function sa(v){return((v=Math.exp(v))+1/v)/2}function Sn(v){return((v=Math.exp(2*v))-1)/(v+1)}function Za(v){return(v=Math.sin(v/2))*v}var ua=Math.SQRT2,Ja=2,gr=4;e.interpolateZoom=function(v,g){var w=v[0],q=v[1],C=v[2],S=g[0],N=g[1],E=g[2],F=S-w,J=N-q,$=F*F+J*J,j,ee;if($0&&(er=er.transition().duration(N)),er.call(Me.event)}function hr(){oe&&oe.domain(ae.range().map(function(er){return(er-v.x)/v.k}).map(ae.invert)),we&&we.domain(he.range().map(function(er){return(er-v.y)/v.k}).map(he.invert))}function dr(er){E++||er({type:"zoomstart"})}function Sr(er){hr(),er({type:"zoom",scale:v.k,translate:[v.x,v.y]})}function pr(er){--E||(er({type:"zoomend"}),w=null)}function Mr(){var er=this,Dr=Te.of(er,arguments),Er=0,Qr=e.select(i(er)).on(J,xa).on($,Ha),kt=pe(e.mouse(er)),Xt=fr(er);Z0.call(er),dr(Dr);function xa(){Er=1,or(e.mouse(er),kt),Sr(Dr)}function Ha(){Qr.on(J,null).on($,null),Xt(Er),pr(Dr)}}function Kr(){var er=this,Dr=Te.of(er,arguments),Er={},Qr=0,kt,Xt=".zoom-"+e.event.changedTouches[0].identifier,xa="touchmove"+Xt,Ha="touchend"+Xt,$a=[],Oa=e.select(er),en=fr(er);rn(),dr(Dr),Oa.on(F,null).on(ee,rn);function La(){var oi=e.touches(er);return kt=v.k,oi.forEach(function(ba){ba.identifier in Er&&(Er[ba.identifier]=pe(ba))}),oi}function rn(){var oi=e.event.target;e.select(oi).on(xa,Fo).on(Ha,WW),$a.push(oi);for(var ba=e.event.changedTouches,En=0,zi=ba.length;En1){var Io=Pn[0],El=Pn[1],K0=Io[0]-El[0],G4=Io[1]-El[1];Qr=K0*K0+G4*G4}}function Fo(){var oi=e.touches(er),ba,En,zi,Pn;Z0.call(er);for(var fu=0,Io=oi.length;fu1?1:g,w=w<0?0:w>1?1:w,C=w<=.5?w*(1+g):w+g-w*g,q=2*w-C;function S(E){return E>360?E-=360:E<0&&(E+=360),E<60?q+(C-q)*E/60:E<180?C:E<240?q+(C-q)*(240-E)/60:q}function N(E){return Math.round(S(E)*255)}return new Ia(N(v+120),N(v),N(v-120))}e.hcl=fa;function fa(v,g,w){return this instanceof fa?(this.h=+v,this.c=+g,void(this.l=+w)):arguments.length<2?v instanceof fa?new fa(v.h,v.c,v.l):v instanceof Qt?q0(v.l,v.a,v.b):q0((v=nr((v=e.rgb(v)).r,v.g,v.b)).l,v.a,v.b):new fa(v,g,w)}var ai=fa.prototype=new Lt;ai.brighter=function(v){return new fa(this.h,this.c,Math.min(100,this.l+it*(arguments.length?v:1)))},ai.darker=function(v){return new fa(this.h,this.c,Math.max(0,this.l-it*(arguments.length?v:1)))},ai.rgb=function(){return ni(this.h,this.c,this.l).rgb()};function ni(v,g,w){return isNaN(v)&&(v=0),isNaN(g)&&(g=0),new Qt(w,Math.cos(v*=Ar)*g,Math.sin(v)*g)}e.lab=Qt;function Qt(v,g,w){return this instanceof Qt?(this.l=+v,this.a=+g,void(this.b=+w)):arguments.length<2?v instanceof Qt?new Qt(v.l,v.a,v.b):v instanceof fa?ni(v.h,v.c,v.l):nr((v=Ia(v)).r,v.g,v.b):new Qt(v,g,w)}var it=18,ma=.95047,Do=1,Eo=1.08883,Sl=Qt.prototype=new Lt;Sl.brighter=function(v){return new Qt(Math.min(100,this.l+it*(arguments.length?v:1)),this.a,this.b)},Sl.darker=function(v){return new Qt(Math.max(0,this.l-it*(arguments.length?v:1)),this.a,this.b)},Sl.rgb=function(){return k0(this.l,this.a,this.b)};function k0(v,g,w){var q=(v+16)/116,C=q+g/500,S=q-w/200;return C=ac(C)*ma,q=ac(q)*Do,S=ac(S)*Eo,new Ia(ic(3.2404542*C-1.5371385*q-.4985314*S),ic(-.969266*C+1.8760108*q+.041556*S),ic(.0556434*C-.2040259*q+1.0572252*S))}function q0(v,g,w){return v>0?new fa(Math.atan2(w,g)*Ur,Math.sqrt(g*g+w*w),v):new fa(NaN,NaN,v)}function ac(v){return v>.206893034?v*v*v:(v-4/29)/7.787037}function nc(v){return v>.008856?Math.pow(v,1/3):7.787037*v+4/29}function ic(v){return Math.round(255*(v<=.00304?12.92*v:1.055*Math.pow(v,1/2.4)-.055))}e.rgb=Ia;function Ia(v,g,w){return this instanceof Ia?(this.r=~~v,this.g=~~g,void(this.b=~~w)):arguments.length<2?v instanceof Ia?new Ia(v.r,v.g,v.b):Zr(""+v,Ia,Fa):new Ia(v,g,w)}function C0(v){return new Ia(v>>16,v>>8&255,v&255)}function tu(v){return C0(v)+""}var au=Ia.prototype=new Lt;au.brighter=function(v){v=Math.pow(.7,arguments.length?v:1);var g=this.r,w=this.g,q=this.b,C=30;return!g&&!w&&!q?new Ia(C,C,C):(g&&g>4,q=q>>4|q,C=F&240,C=C>>4|C,S=F&15,S=S<<4|S):v.length===7&&(q=(F&16711680)>>16,C=(F&65280)>>8,S=F&255)),g(q,C,S))}function rt(v,g,w){var q=Math.min(v/=255,g/=255,w/=255),C=Math.max(v,g,w),S=C-q,N,E,F=(C+q)/2;return S?(E=F<.5?S/(C+q):S/(2-C-q),v==C?N=(g-w)/S+(g0&&F<1?0:N),new vt(N,E,F)}function nr(v,g,w){v=ya(v),g=ya(g),w=ya(w);var q=nc((.4124564*v+.3575761*g+.1804375*w)/ma),C=nc((.2126729*v+.7151522*g+.072175*w)/Do),S=nc((.0193339*v+.119192*g+.9503041*w)/Eo);return Qt(116*C-16,500*(q-C),200*(C-S))}function ya(v){return(v/=255)<=.04045?v/12.92:Math.pow((v+.055)/1.055,2.4)}function ht(v){var g=parseFloat(v);return v.charAt(v.length-1)==="%"?Math.round(g*2.55):g}var ga=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});ga.forEach(function(v,g){ga.set(v,C0(g))});function Nr(v){return typeof v=="function"?v:function(){return v}}e.functor=Nr,e.xhr=ii(U);function ii(v){return function(g,w,q){return arguments.length===2&&typeof w=="function"&&(q=w,w=null),Po(g,w,v,q)}}function Po(v,g,w,q){var C={},S=e.dispatch("beforesend","progress","load","error"),N={},E=new XMLHttpRequest,F=null;self.XDomainRequest&&!("withCredentials"in E)&&/^(http(s)?:)?\/\//.test(v)&&(E=new XDomainRequest),"onload"in E?E.onload=E.onerror=J:E.onreadystatechange=function(){E.readyState>3&&J()};function J(){var $=E.status,j;if(!$&&ZU(E)||$>=200&&$<300||$===304){try{j=w.call(C,E)}catch(ee){S.error.call(C,ee);return}S.load.call(C,j)}else S.error.call(C,E)}return E.onprogress=function($){var j=e.event;e.event=$;try{S.progress.call(C,E)}finally{e.event=j}},C.header=function($,j){return $=($+"").toLowerCase(),arguments.length<2?N[$]:(j==null?delete N[$]:N[$]=j+"",C)},C.mimeType=function($){return arguments.length?(g=$==null?null:$+"",C):g},C.responseType=function($){return arguments.length?(F=$,C):F},C.response=function($){return w=$,C},["get","post"].forEach(function($){C[$]=function(){return C.send.apply(C,[$].concat(t(arguments)))}}),C.send=function($,j,ee){if(arguments.length===2&&typeof j=="function"&&(ee=j,j=null),E.open($,v,!0),g!=null&&!("accept"in N)&&(N.accept=g+",*/*"),E.setRequestHeader)for(var me in N)E.setRequestHeader(me,N[me]);return g!=null&&E.overrideMimeType&&E.overrideMimeType(g),F!=null&&(E.responseType=F),ee!=null&&C.on("error",ee).on("load",function(Te){ee(null,Te)}),S.beforesend.call(C,E),E.send(j==null?null:j),C},C.abort=function(){return E.abort(),C},e.rebind(C,S,"on"),q==null?C:C.get(XU(q))}function XU(v){return v.length===1?function(g,w){v(g==null?w:null)}:v}function ZU(v){var g=v.responseType;return g&&g!=="text"?v.response:v.responseText}e.dsv=function(v,g){var w=new RegExp('["'+v+` +"use strict";var Plotly=(()=>{var wy=Object.defineProperty;var XW=Object.getOwnPropertyDescriptor;var ZW=Object.getOwnPropertyNames;var JW=Object.prototype.hasOwnProperty;var nt=(e,r)=>()=>(e&&(r=e(e=0)),r);var B=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),$W=(e,r)=>{for(var t in r)wy(e,t,{get:r[t],enumerable:!0})},KW=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ZW(r))!JW.call(e,n)&&n!==t&&wy(e,n,{get:()=>r[n],enumerable:!(a=XW(r,n))||a.enumerable});return e};var Ty=e=>KW(wy({},"__esModule",{value:!0}),e);var Q0=B(U4=>{"use strict";U4.version="3.0.0-rc.0"});var W4=B((V4,j0)=>{(function(r,t,a){t[r]=t[r]||a(),typeof j0!="undefined"&&j0.exports?j0.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:V4,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(b){return setImmediate(b)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(b,T,x,M){return Object.defineProperty(b,T,{value:x,writable:!0,configurable:M!==!1})}}catch(_){r=function(T,x,M){return T[x]=M,T}}a=function(){var b,T,x;function M(A,k){this.fn=A,this.self=k,this.next=void 0}return{add:function(k,L){x=new M(k,L),T?T.next=x:b=x,T=x,x=void 0},drain:function(){var k=b;for(b=T=t=void 0;k;)k.fn.call(k.self),k=k.next}}}();function l(_,b){a.add(_,b),t||(t=i(a.drain))}function o(_){var b,T=typeof _;return _!=null&&(T=="object"||T=="function")&&(b=_.then),typeof b=="function"?b:!1}function s(){for(var _=0;_0&&l(s,T))}catch(x){c.call(new d(T),x)}}}function c(_){var b=this;b.triggered||(b.triggered=!0,b.def&&(b=b.def),b.msg=_,b.state=2,b.chain.length>0&&l(s,b))}function h(_,b,T,x){for(var M=0;M{(function(){var e={version:"3.8.2"},r=[].slice,t=function(v){return r.call(v)},a=self.document;function n(v){return v&&(v.ownerDocument||v.document||v).documentElement}function i(v){return v&&(v.ownerDocument&&v.ownerDocument.defaultView||v.document&&v||v.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(v){t=function(g){for(var w=g.length,q=new Array(w);w--;)q[w]=g[w];return q}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(v){var l=this.Element.prototype,o=l.setAttribute,s=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;l.setAttribute=function(g,w){o.call(this,g,w+"")},l.setAttributeNS=function(g,w,q){s.call(this,g,w,q+"")},u.setProperty=function(g,w,q){f.call(this,g,w+"",q)}}e.ascending=c;function c(v,g){return vg?1:v>=g?0:NaN}e.descending=function(v,g){return gv?1:g>=v?0:NaN},e.min=function(v,g){var w=-1,q=v.length,C,S;if(arguments.length===1){for(;++w=S){C=S;break}for(;++wS&&(C=S)}else{for(;++w=S){C=S;break}for(;++wS&&(C=S)}return C},e.max=function(v,g){var w=-1,q=v.length,C,S;if(arguments.length===1){for(;++w=S){C=S;break}for(;++wC&&(C=S)}else{for(;++w=S){C=S;break}for(;++wC&&(C=S)}return C},e.extent=function(v,g){var w=-1,q=v.length,C,S,N;if(arguments.length===1){for(;++w=S){C=N=S;break}for(;++wS&&(C=S),N=S){C=N=S;break}for(;++wS&&(C=S),N1)return N/(F-1)},e.deviation=function(){var v=e.variance.apply(this,arguments);return v&&Math.sqrt(v)};function p(v){return{left:function(g,w,q,C){for(arguments.length<3&&(q=0),arguments.length<4&&(C=g.length);q>>1;v(g[S],w)<0?q=S+1:C=S}return q},right:function(g,w,q,C){for(arguments.length<3&&(q=0),arguments.length<4&&(C=g.length);q>>1;v(g[S],w)>0?C=S:q=S+1}return q}}}var y=p(c);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(v){return p(v.length===1?function(g,w){return c(v(g),w)}:v)},e.shuffle=function(v,g,w){(q=arguments.length)<3&&(w=v.length,q<2&&(g=0));for(var q=w-g,C,S;q;)S=Math.random()*q--|0,C=v[q+g],v[q+g]=v[S+g],v[S+g]=C;return v},e.permute=function(v,g){for(var w=g.length,q=new Array(w);w--;)q[w]=v[g[w]];return q},e.pairs=function(v){for(var g=0,w=v.length-1,q,C=v[0],S=new Array(w<0?0:w);g=0;)for(N=v[g],w=N.length;--w>=0;)S[--C]=N[w];return S};var _=Math.abs;e.range=function(v,g,w){if(arguments.length<3&&(w=1,arguments.length<2&&(g=v,v=0)),(g-v)/w===1/0)throw new Error("infinite range");var q=[],C=b(_(w)),S=-1,N;if(v*=C,g*=C,w*=C,w<0)for(;(N=v+w*++S)>g;)q.push(N/C);else for(;(N=v+w*++S)=g.length)return C?C.call(v,F):q?F.sort(q):F;for(var $=-1,j=F.length,ee=g[J++],me,Te,ae,oe=new x,he;++$=g.length)return P;var J=[],$=w[F++];return P.forEach(function(j,ee){J.push({key:j,values:N(ee,F)})}),$?J.sort(function(j,ee){return $(j.key,ee.key)}):J}return v.map=function(P,F){return S(F,P,0)},v.entries=function(P){return N(S(e.map,P,0),0)},v.key=function(P){return g.push(P),v},v.sortKeys=function(P){return w[g.length-1]=P,v},v.sortValues=function(P){return q=P,v},v.rollup=function(P){return C=P,v},v},e.set=function(v){var g=new O;if(v)for(var w=0,q=v.length;w=0&&(q=v.slice(w+1),v=v.slice(0,w)),v)return arguments.length<2?this[v].on(q):this[v].on(q,g);if(arguments.length===2){if(g==null)for(v in this)this.hasOwnProperty(v)&&this[v].on(q,null);return this}};function K(v){var g=[],w=new x;function q(){for(var C=g,S=-1,N=C.length,P;++S=0&&(w=v.slice(0,g))!=="xmlns"&&(v=v.slice(g+1)),ye.hasOwnProperty(w)?{space:ye[w],local:v}:v}},be.attr=function(v,g){if(arguments.length<2){if(typeof v=="string"){var w=this.node();return v=e.ns.qualify(v),v.local?w.getAttributeNS(v.space,v.local):w.getAttribute(v)}for(g in v)this.each(_e(g,v[g]));return this}return this.each(_e(v,g))};function _e(v,g){v=e.ns.qualify(v);function w(){this.removeAttribute(v)}function q(){this.removeAttributeNS(v.space,v.local)}function C(){this.setAttribute(v,g)}function S(){this.setAttributeNS(v.space,v.local,g)}function N(){var F=g.apply(this,arguments);F==null?this.removeAttribute(v):this.setAttribute(v,F)}function P(){var F=g.apply(this,arguments);F==null?this.removeAttributeNS(v.space,v.local):this.setAttributeNS(v.space,v.local,F)}return g==null?v.local?q:w:typeof g=="function"?v.local?P:N:v.local?S:C}function xe(v){return v.trim().replace(/\s+/g," ")}be.classed=function(v,g){if(arguments.length<2){if(typeof v=="string"){var w=this.node(),q=(v=ze(v)).length,C=-1;if(g=w.classList){for(;++C=0;)(S=w[q])&&(C&&C!==S.nextSibling&&C.parentNode.insertBefore(S,C),C=S);return this},be.sort=function(v){v=Ae.apply(this,arguments);for(var g=-1,w=this.length;++g=g&&(g=C+1);!(F=N[g])&&++g0&&(v=v.slice(0,C));var N=Ye.get(v);N&&(v=N,S=Ge);function P(){var $=this[q];$&&(this.removeEventListener(v,$,$.$),delete this[q])}function F(){var $=S(g,t(arguments));P.call(this),this.addEventListener(v,this[q]=$,$.$=w),$._=g}function J(){var $=new RegExp("^__on([^.]+)"+e.requote(v)+"$"),j;for(var ee in this)if(j=ee.match($)){var me=this[ee];this.removeEventListener(j[1],me,me.$),delete this[ee]}}return C?g?F:P:g?G:J}var Ye=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ye.forEach(function(v){"on"+v in a&&Ye.remove(v)});function Xe(v,g){return function(w){var q=e.event;e.event=w,g[0]=this.__data__;try{v.apply(this,g)}finally{e.event=q}}}function Ge(v,g){var w=Xe(v,g);return function(q){var C=this,S=q.relatedTarget;(!S||S!==C&&!(S.compareDocumentPosition(C)&8))&&w.call(C,q)}}var Oe,$e=0;function fr(v){var g=".dragsuppress-"+ ++$e,w="click"+g,q=e.select(i(v)).on("touchmove"+g,re).on("dragstart"+g,re).on("selectstart"+g,re);if(Oe==null&&(Oe="onselectstart"in v?!1:Y(v.style,"userSelect")),Oe){var C=n(v).style,S=C[Oe];C[Oe]="none"}return function(N){if(q.on(g,null),Oe&&(C[Oe]=S),N){var P=function(){q.on(w,null)};q.on(w,function(){re(),P()},!0),setTimeout(P,0)}}}e.mouse=function(v){return Ne(v,se())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ne(v,g){g.changedTouches&&(g=g.changedTouches[0]);var w=v.ownerSVGElement||v;if(w.createSVGPoint){var q=w.createSVGPoint();if(lr<0){var C=i(v);if(C.scrollX||C.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var S=w[0][0].getScreenCTM();lr=!(S.f||S.e),w.remove()}}return lr?(q.x=g.pageX,q.y=g.pageY):(q.x=g.clientX,q.y=g.clientY),q=q.matrixTransform(v.getScreenCTM().inverse()),[q.x,q.y]}var N=v.getBoundingClientRect();return[g.clientX-N.left-v.clientLeft,g.clientY-N.top-v.clientTop]}e.touch=function(v,g,w){if(arguments.length<3&&(w=g,g=se().changedTouches),g){for(var q=0,C=g.length,S;q0?1:v<0?-1:0}function Wr(v,g,w){return(g[0]-v[0])*(w[1]-v[1])-(g[1]-v[1])*(w[0]-v[0])}function Nt(v){return v>1?0:v<-1?qe:Math.acos(v)}function oa(v){return v>1?sr:v<-1?-sr:Math.asin(v)}function Na(v){return((v=Math.exp(v))-1/v)/2}function sa(v){return((v=Math.exp(v))+1/v)/2}function Sn(v){return((v=Math.exp(2*v))-1)/(v+1)}function Za(v){return(v=Math.sin(v/2))*v}var ua=Math.SQRT2,Ja=2,gr=4;e.interpolateZoom=function(v,g){var w=v[0],q=v[1],C=v[2],S=g[0],N=g[1],P=g[2],F=S-w,J=N-q,$=F*F+J*J,j,ee;if($0&&(er=er.transition().duration(N)),er.call(Me.event)}function hr(){oe&&oe.domain(ae.range().map(function(er){return(er-v.x)/v.k}).map(ae.invert)),we&&we.domain(he.range().map(function(er){return(er-v.y)/v.k}).map(he.invert))}function dr(er){P++||er({type:"zoomstart"})}function Sr(er){hr(),er({type:"zoom",scale:v.k,translate:[v.x,v.y]})}function pr(er){--P||(er({type:"zoomend"}),w=null)}function Mr(){var er=this,Dr=Te.of(er,arguments),Er=0,Qr=e.select(i(er)).on(J,xa).on($,Ha),kt=pe(e.mouse(er)),Xt=fr(er);Z0.call(er),dr(Dr);function xa(){Er=1,or(e.mouse(er),kt),Sr(Dr)}function Ha(){Qr.on(J,null).on($,null),Xt(Er),pr(Dr)}}function Kr(){var er=this,Dr=Te.of(er,arguments),Er={},Qr=0,kt,Xt=".zoom-"+e.event.changedTouches[0].identifier,xa="touchmove"+Xt,Ha="touchend"+Xt,$a=[],Oa=e.select(er),en=fr(er);rn(),dr(Dr),Oa.on(F,null).on(ee,rn);function La(){var oi=e.touches(er);return kt=v.k,oi.forEach(function(ba){ba.identifier in Er&&(Er[ba.identifier]=pe(ba))}),oi}function rn(){var oi=e.event.target;e.select(oi).on(xa,Fo).on(Ha,WW),$a.push(oi);for(var ba=e.event.changedTouches,En=0,zi=ba.length;En1){var Io=Pn[0],El=Pn[1],K0=Io[0]-El[0],G4=Io[1]-El[1];Qr=K0*K0+G4*G4}}function Fo(){var oi=e.touches(er),ba,En,zi,Pn;Z0.call(er);for(var fu=0,Io=oi.length;fu1?1:g,w=w<0?0:w>1?1:w,C=w<=.5?w*(1+g):w+g-w*g,q=2*w-C;function S(P){return P>360?P-=360:P<0&&(P+=360),P<60?q+(C-q)*P/60:P<180?C:P<240?q+(C-q)*(240-P)/60:q}function N(P){return Math.round(S(P)*255)}return new Ia(N(v+120),N(v),N(v-120))}e.hcl=fa;function fa(v,g,w){return this instanceof fa?(this.h=+v,this.c=+g,void(this.l=+w)):arguments.length<2?v instanceof fa?new fa(v.h,v.c,v.l):v instanceof Qt?q0(v.l,v.a,v.b):q0((v=nr((v=e.rgb(v)).r,v.g,v.b)).l,v.a,v.b):new fa(v,g,w)}var ai=fa.prototype=new Lt;ai.brighter=function(v){return new fa(this.h,this.c,Math.min(100,this.l+it*(arguments.length?v:1)))},ai.darker=function(v){return new fa(this.h,this.c,Math.max(0,this.l-it*(arguments.length?v:1)))},ai.rgb=function(){return ni(this.h,this.c,this.l).rgb()};function ni(v,g,w){return isNaN(v)&&(v=0),isNaN(g)&&(g=0),new Qt(w,Math.cos(v*=Ar)*g,Math.sin(v)*g)}e.lab=Qt;function Qt(v,g,w){return this instanceof Qt?(this.l=+v,this.a=+g,void(this.b=+w)):arguments.length<2?v instanceof Qt?new Qt(v.l,v.a,v.b):v instanceof fa?ni(v.h,v.c,v.l):nr((v=Ia(v)).r,v.g,v.b):new Qt(v,g,w)}var it=18,ma=.95047,Do=1,Eo=1.08883,Sl=Qt.prototype=new Lt;Sl.brighter=function(v){return new Qt(Math.min(100,this.l+it*(arguments.length?v:1)),this.a,this.b)},Sl.darker=function(v){return new Qt(Math.max(0,this.l-it*(arguments.length?v:1)),this.a,this.b)},Sl.rgb=function(){return k0(this.l,this.a,this.b)};function k0(v,g,w){var q=(v+16)/116,C=q+g/500,S=q-w/200;return C=ac(C)*ma,q=ac(q)*Do,S=ac(S)*Eo,new Ia(ic(3.2404542*C-1.5371385*q-.4985314*S),ic(-.969266*C+1.8760108*q+.041556*S),ic(.0556434*C-.2040259*q+1.0572252*S))}function q0(v,g,w){return v>0?new fa(Math.atan2(w,g)*Ur,Math.sqrt(g*g+w*w),v):new fa(NaN,NaN,v)}function ac(v){return v>.206893034?v*v*v:(v-4/29)/7.787037}function nc(v){return v>.008856?Math.pow(v,1/3):7.787037*v+4/29}function ic(v){return Math.round(255*(v<=.00304?12.92*v:1.055*Math.pow(v,1/2.4)-.055))}e.rgb=Ia;function Ia(v,g,w){return this instanceof Ia?(this.r=~~v,this.g=~~g,void(this.b=~~w)):arguments.length<2?v instanceof Ia?new Ia(v.r,v.g,v.b):Zr(""+v,Ia,Fa):new Ia(v,g,w)}function C0(v){return new Ia(v>>16,v>>8&255,v&255)}function tu(v){return C0(v)+""}var au=Ia.prototype=new Lt;au.brighter=function(v){v=Math.pow(.7,arguments.length?v:1);var g=this.r,w=this.g,q=this.b,C=30;return!g&&!w&&!q?new Ia(C,C,C):(g&&g>4,q=q>>4|q,C=F&240,C=C>>4|C,S=F&15,S=S<<4|S):v.length===7&&(q=(F&16711680)>>16,C=(F&65280)>>8,S=F&255)),g(q,C,S))}function rt(v,g,w){var q=Math.min(v/=255,g/=255,w/=255),C=Math.max(v,g,w),S=C-q,N,P,F=(C+q)/2;return S?(P=F<.5?S/(C+q):S/(2-C-q),v==C?N=(g-w)/S+(g0&&F<1?0:N),new vt(N,P,F)}function nr(v,g,w){v=ya(v),g=ya(g),w=ya(w);var q=nc((.4124564*v+.3575761*g+.1804375*w)/ma),C=nc((.2126729*v+.7151522*g+.072175*w)/Do),S=nc((.0193339*v+.119192*g+.9503041*w)/Eo);return Qt(116*C-16,500*(q-C),200*(C-S))}function ya(v){return(v/=255)<=.04045?v/12.92:Math.pow((v+.055)/1.055,2.4)}function ht(v){var g=parseFloat(v);return v.charAt(v.length-1)==="%"?Math.round(g*2.55):g}var ga=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});ga.forEach(function(v,g){ga.set(v,C0(g))});function Nr(v){return typeof v=="function"?v:function(){return v}}e.functor=Nr,e.xhr=ii(U);function ii(v){return function(g,w,q){return arguments.length===2&&typeof w=="function"&&(q=w,w=null),Po(g,w,v,q)}}function Po(v,g,w,q){var C={},S=e.dispatch("beforesend","progress","load","error"),N={},P=new XMLHttpRequest,F=null;self.XDomainRequest&&!("withCredentials"in P)&&/^(http(s)?:)?\/\//.test(v)&&(P=new XDomainRequest),"onload"in P?P.onload=P.onerror=J:P.onreadystatechange=function(){P.readyState>3&&J()};function J(){var $=P.status,j;if(!$&&ZU(P)||$>=200&&$<300||$===304){try{j=w.call(C,P)}catch(ee){S.error.call(C,ee);return}S.load.call(C,j)}else S.error.call(C,P)}return P.onprogress=function($){var j=e.event;e.event=$;try{S.progress.call(C,P)}finally{e.event=j}},C.header=function($,j){return $=($+"").toLowerCase(),arguments.length<2?N[$]:(j==null?delete N[$]:N[$]=j+"",C)},C.mimeType=function($){return arguments.length?(g=$==null?null:$+"",C):g},C.responseType=function($){return arguments.length?(F=$,C):F},C.response=function($){return w=$,C},["get","post"].forEach(function($){C[$]=function(){return C.send.apply(C,[$].concat(t(arguments)))}}),C.send=function($,j,ee){if(arguments.length===2&&typeof j=="function"&&(ee=j,j=null),P.open($,v,!0),g!=null&&!("accept"in N)&&(N.accept=g+",*/*"),P.setRequestHeader)for(var me in N)P.setRequestHeader(me,N[me]);return g!=null&&P.overrideMimeType&&P.overrideMimeType(g),F!=null&&(P.responseType=F),ee!=null&&C.on("error",ee).on("load",function(Te){ee(null,Te)}),S.beforesend.call(C,P),P.send(j==null?null:j),C},C.abort=function(){return P.abort(),C},e.rebind(C,S,"on"),q==null?C:C.get(XU(q))}function XU(v){return v.length===1?function(g,w){v(g==null?w:null)}:v}function ZU(v){var g=v.responseType;return g&&g!=="text"?v.response:v.responseText}e.dsv=function(v,g){var w=new RegExp('["'+v+` ]`),q=v.charCodeAt(0);function C(J,$,j){arguments.length<3&&(j=$,$=null);var ee=Po(J,g,$==null?S:N($),j);return ee.row=function(me){return arguments.length?ee.response(($=me)==null?S:N(me)):$},ee}function S(J){return C.parse(J.responseText)}function N(J){return function($){return C.parse($.responseText,J)}}C.parse=function(J,$){var j;return C.parseRows(J,function(ee,me){if(j)return j(ee,me-1);var Te=function(ae){for(var oe={},he=ee.length,we=0;we=Te)return ee;if(we)return we=!1,j;var Ue=ae;if(J.charCodeAt(Ue)===34){for(var rr=Ue;rr++24?(isFinite(g)&&(clearTimeout(E0),E0=setTimeout(Zm,g)),D0=0):(D0=1,L_(Zm))}e.timer.flush=function(){S_(),D_()};function S_(){for(var v=Date.now(),g=L0;g;)v>=g.t&&g.c(v-g.t)&&(g.c=null),g=g.n;return v}function D_(){for(var v,g=L0,w=1/0;g;)g.c?(g.t=0;--E)ae.push(C[J[j[E]][2]]);for(E=+me;E1&&Wr(v[w[q-2]],v[w[q-1]],v[C])<=0;)--q;w[q++]=C}return w.slice(0,q)}function JU(v,g){return v[0]-g[0]||v[1]-g[1]}e.geom.polygon=function(v){return Q(v,R0),v};var R0=e.geom.polygon.prototype=[];R0.area=function(){for(var v=-1,g=this.length,w,q=this[g-1],C=0;++vfe)E=E.L;else if(N=g-jU(E,w),N>fe){if(!E.R){q=E;break}E=E.R}else{S>-fe?(q=E.P,C=E):N>-fe?(q=E,C=E.N):q=C=E;break}var F=N_(v);if(lu.insert(q,F),!(!q&&!C)){if(q===C){su(q),C=N_(q.site),lu.insert(F,C),F.edge=C.edge=sc(q.site,F.site),ou(q),ou(C);return}if(!C){F.edge=sc(q.site,F.site);return}su(q),su(C);var J=q.site,$=J.x,j=J.y,ee=v.x-$,me=v.y-j,Te=C.site,ae=Te.x-$,oe=Te.y-j,he=2*(ee*oe-me*ae),we=ee*ee+me*me,Me=ae*ae+oe*oe,pe={x:(oe*we-me*Me)/he+$,y:(ee*Me-ae*we)/he+j};z0(C.edge,J,Te,pe),F.edge=sc(J,v,null,pe),C.edge=sc(v,Te,null,pe),ou(q),ou(C)}}function F_(v,g){var w=v.site,q=w.x,C=w.y,S=C-g;if(!S)return q;var N=v.P;if(!N)return-1/0;w=N.site;var E=w.x,F=w.y,J=F-g;if(!J)return E;var $=E-q,j=1/S-1/J,ee=$/J;return j?(-ee+Math.sqrt(ee*ee-2*j*($*$/(-2*J)-F+J/2+C-S/2)))/j+q:(q+E)/2}function jU(v,g){var w=v.N;if(w)return F_(w,g);var q=v.site;return q.y===g?q.x:1/0}function I_(v){this.site=v,this.edges=[]}I_.prototype.prepare=function(){for(var v=this.edges,g=v.length,w;g--;)w=v[g].edge,(!w.b||!w.a)&&v.splice(g,1);return v.sort(H_),v.length};function eV(v){for(var g=v[0][0],w=v[1][0],q=v[0][1],C=v[1][1],S,N,E,F,J=Ro,$=J.length,j,ee,me,Te,ae,oe;$--;)if(j=J[$],!(!j||!j.prepare()))for(me=j.edges,Te=me.length,ee=0;eefe||_(F-N)>fe)&&(me.splice(ee,0,new N0(iV(j.site,oe,_(E-g)fe?{x:g,y:_(S-g)fe?{x:_(N-C)fe?{x:w,y:_(S-w)fe?{x:_(N-q)=-Se)){var ee=F*F+J*J,me=$*$+oe*oe,Te=(oe*ee-J*me)/j,ae=(F*me-$*ee)/j,oe=ae+E,he=z_.pop()||new rV;he.arc=v,he.site=C,he.x=Te+N,he.y=oe+Math.sqrt(Te*Te+ae*ae),he.cy=oe,v.circle=he;for(var we=null,Me=oc._;Me;)if(he.y0)){if(ae/=me,me<0){if(ae0){if(ae>ee)return;ae>j&&(j=ae)}if(ae=w-E,!(!me&&ae<0)){if(ae/=me,me<0){if(ae>ee)return;ae>j&&(j=ae)}else if(me>0){if(ae0)){if(ae/=Te,Te<0){if(ae0){if(ae>ee)return;ae>j&&(j=ae)}if(ae=q-F,!(!Te&&ae<0)){if(ae/=Te,Te<0){if(ae>ee)return;ae>j&&(j=ae)}else if(Te>0){if(ae0&&(C.a={x:E+j*me,y:F+j*Te}),ee<1&&(C.b={x:E+ee*me,y:F+ee*Te}),C}}}}}}function aV(v){for(var g=iu,w=tV(v[0][0],v[0][1],v[1][0],v[1][1]),q=g.length,C;q--;)C=g[q],(!nV(C,v)||!w(C)||_(C.a.x-C.b.x)=S)return;if($>ee){if(!q)q={x:Te,y:N};else if(q.y>=E)return;w={x:Te,y:E}}else{if(!q)q={x:Te,y:E};else if(q.y1)if($>ee){if(!q)q={x:(N-he)/oe,y:N};else if(q.y>=E)return;w={x:(E-he)/oe,y:E}}else{if(!q)q={x:(E-he)/oe,y:E};else if(q.y=S)return;w={x:S,y:oe*S+he}}else{if(!q)q={x:S,y:oe*S+he};else if(q.x=$&&he.x<=ee&&he.y>=j&&he.y<=me?[[$,me],[ee,me],[ee,j],[$,j]]:[];we.point=F[ae]}),J}function E(F){return F.map(function(J,$){return{x:Math.round(q(J,$)/fe)*fe,y:Math.round(C(J,$)/fe)*fe,i:$}})}return N.links=function(F){return ey(E(F)).edges.filter(function(J){return J.l&&J.r}).map(function(J){return{source:F[J.l.i],target:F[J.r.i]}})},N.triangles=function(F){var J=[];return ey(E(F)).cells.forEach(function($,j){for(var ee=$.site,me=$.edges.sort(H_),Te=-1,ae=me.length,oe,he,we=me[ae-1].edge,Me=we.l===ee?we.r:we.l;++TeMe&&(Me=$.x),$.y>pe&&(pe=$.y),me.push($.x),Te.push($.y);else for(ae=0;aeMe&&(Me=Ue),rr>pe&&(pe=rr),me.push(Ue),Te.push(rr)}var or=Me-he,ar=pe-we;or>ar?pe=we+or:Me=he+ar;function hr(pr,Mr,Kr,Ft,at,er,Dr,Er){if(!(isNaN(Kr)||isNaN(Ft)))if(pr.leaf){var Qr=pr.x,kt=pr.y;if(Qr!=null)if(_(Qr-Kr)+_(kt-Ft)<.01)dr(pr,Mr,Kr,Ft,at,er,Dr,Er);else{var Xt=pr.point;pr.x=pr.y=pr.point=null,dr(pr,Xt,Qr,kt,at,er,Dr,Er),dr(pr,Mr,Kr,Ft,at,er,Dr,Er)}else pr.x=Kr,pr.y=Ft,pr.point=Mr}else dr(pr,Mr,Kr,Ft,at,er,Dr,Er)}function dr(pr,Mr,Kr,Ft,at,er,Dr,Er){var Qr=(at+Dr)*.5,kt=(er+Er)*.5,Xt=Kr>=Qr,xa=Ft>=kt,Ha=xa<<1|Xt;pr.leaf=!1,pr=pr.nodes[Ha]||(pr.nodes[Ha]=Y_()),Xt?at=Qr:Dr=Qr,xa?er=kt:Er=kt,hr(pr,Mr,Kr,Ft,at,er,Dr,Er)}var Sr=Y_();if(Sr.add=function(pr){hr(Sr,pr,+j(pr,++ae),+ee(pr,ae),he,we,Me,pe)},Sr.visit=function(pr){cc(pr,Sr,he,we,Me,pe)},Sr.find=function(pr){return fV(Sr,pr[0],pr[1],he,we,Me,pe)},ae=-1,g==null){for(;++aeS||ee>N||me=Ue,ar=w>=rr,hr=ar<<1|or,dr=hr+4;hrw&&(S=g.slice(w,S),E[N]?E[N]+=S:E[++N]=S),(q=q[0])===(C=C[0])?E[N]?E[N]+=C:E[++N]=C:(E[++N]=null,F.push({i:N,x:nl(q,C)})),w=ay.lastIndex;return w=0&&!(q=e.interpolators[w](v,g)););return q}e.interpolators=[function(v,g){var w=typeof g;return(w==="string"?ga.has(g.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(g)?ry:U_:g instanceof Lt?ry:Array.isArray(g)?H0:w==="object"&&isNaN(g)?G_:nl)(v,g)}],e.interpolateArray=H0;function H0(v,g){var w=[],q=[],C=v.length,S=g.length,N=Math.min(v.length,g.length),E;for(E=0;E=0?v.slice(0,g):v,q=g>=0?v.slice(g+1):"in";return w=cV.get(w)||V_,q=vV.get(q)||U,hV(q(w.apply(null,r.call(arguments,1))))};function hV(v){return function(g){return g<=0?0:g>=1?1:v(g)}}function W_(v){return function(g){return 1-v(1-g)}}function X_(v){return function(g){return .5*(g<.5?v(2*g):2-v(2-2*g))}}function dV(v){return v*v}function pV(v){return v*v*v}function mV(v){if(v<=0)return 0;if(v>=1)return 1;var g=v*v,w=g*v;return 4*(v<.5?w:3*(v-g)+w-.75)}function yV(v){return function(g){return Math.pow(g,v)}}function gV(v){return 1-Math.cos(v*sr)}function xV(v){return Math.pow(2,10*(v-1))}function bV(v){return 1-Math.sqrt(1-v*v)}function _V(v,g){var w;return arguments.length<2&&(g=.45),arguments.length?w=g/ir*Math.asin(1/v):(v=1,w=g/4),function(q){return 1+v*Math.pow(2,-10*q)*Math.sin((q-w)*ir/g)}}function wV(v){return v||(v=1.70158),function(g){return g*g*((v+1)*g-v)}}function TV(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375}e.interpolateHcl=MV;function MV(v,g){v=e.hcl(v),g=e.hcl(g);var w=v.h,q=v.c,C=v.l,S=g.h-w,N=g.c-q,E=g.l-C;return isNaN(N)&&(N=0,q=isNaN(q)?g.c:q),isNaN(S)?(S=0,w=isNaN(w)?g.h:w):S>180?S-=360:S<-180&&(S+=360),function(F){return ni(w+S*F,q+N*F,C+E*F)+""}}e.interpolateHsl=AV;function AV(v,g){v=e.hsl(v),g=e.hsl(g);var w=v.h,q=v.s,C=v.l,S=g.h-w,N=g.s-q,E=g.l-C;return isNaN(N)&&(N=0,q=isNaN(q)?g.s:q),isNaN(S)?(S=0,w=isNaN(w)?g.h:w):S>180?S-=360:S<-180&&(S+=360),function(F){return Fa(w+S*F,q+N*F,C+E*F)+""}}e.interpolateLab=kV;function kV(v,g){v=e.lab(v),g=e.lab(g);var w=v.l,q=v.a,C=v.b,S=g.l-w,N=g.a-q,E=g.b-C;return function(F){return k0(w+S*F,q+N*F,C+E*F)+""}}e.interpolateRound=Z_;function Z_(v,g){return g-=v,function(w){return Math.round(v+g*w)}}e.transform=function(v){var g=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(w){if(w!=null){g.setAttribute("transform",w);var q=g.transform.baseVal.consolidate()}return new J_(q?q.matrix:CV)})(v)};function J_(v){var g=[v.a,v.b],w=[v.c,v.d],q=K_(g),C=$_(g,w),S=K_(qV(w,g,-C))||0;g[0]*w[1]180?g+=360:g-v>180&&(v+=360),q.push({i:w.push(uu(w)+"rotate(",null,")")-2,x:nl(v,g)})):g&&w.push(uu(w)+"rotate("+g+")")}function DV(v,g,w,q){v!==g?q.push({i:w.push(uu(w)+"skewX(",null,")")-2,x:nl(v,g)}):g&&w.push(uu(w)+"skewX("+g+")")}function EV(v,g,w,q){if(v[0]!==g[0]||v[1]!==g[1]){var C=w.push(uu(w)+"scale(",null,",",null,")");q.push({i:C-4,x:nl(v[0],g[0])},{i:C-2,x:nl(v[1],g[1])})}else(g[0]!==1||g[1]!==1)&&w.push(uu(w)+"scale("+g+")")}function Q_(v,g){var w=[],q=[];return v=e.transform(v),g=e.transform(g),LV(v.translate,g.translate,w,q),SV(v.rotate,g.rotate,w,q),DV(v.skew,g.skew,w,q),EV(v.scale,g.scale,w,q),v=g=null,function(C){for(var S=-1,N=q.length,E;++S0?S=pe:(w.c=null,w.t=NaN,w=null,g.end({type:"end",alpha:S=0})):pe>0&&(g.start({type:"start",alpha:S=pe}),w=P0(v.tick)),v):S},v.start=function(){var pe,Ue=me.length,rr=Te.length,or=q[0],ar=q[1],hr,dr;for(pe=0;pe=0;)S.push($=J[F]),$.parent=E,$.depth=E.depth+1;w&&(E.value=0),E.children=J}else w&&(E.value=+w.call(q,E,E.depth)||0),delete E.children;return Ri(C,function(j){var ee,me;v&&(ee=j.children)&&ee.sort(v),w&&(me=j.parent)&&(me.value+=j.value)}),N}return q.sort=function(C){return arguments.length?(v=C,q):v},q.children=function(C){return arguments.length?(g=C,q):g},q.value=function(C){return arguments.length?(w=C,q):w},q.revalue=function(C){return w&&(hc(C,function(S){S.children&&(S.value=0)}),Ri(C,function(S){var N;S.children||(S.value=+w.call(q,S,S.depth)||0),(N=S.parent)&&(N.value+=S.value)})),C},q};function vc(v,g){return e.rebind(v,g,"sort","children","value"),v.nodes=v,v.links=XV,v}function hc(v,g){for(var w=[v];(v=w.pop())!=null;)if(g(v),(C=v.children)&&(q=C.length))for(var q,C;--q>=0;)w.push(C[q])}function Ri(v,g){for(var w=[v],q=[];(v=w.pop())!=null;)if(q.push(v),(N=v.children)&&(S=N.length))for(var C=-1,S,N;++CC&&(C=E),q.push(E)}for(N=0;Nq&&(w=g,q=C);return w}function eW(v){return v.reduce(rW,0)}function rW(v,g){return v+g[1]}e.layout.histogram=function(){var v=!0,g=Number,w=aW,q=tW;function C(S,ee){for(var E=[],F=S.map(g,this),J=w.call(this,F,ee),$=q.call(this,J,F,ee),j,ee=-1,me=F.length,Te=$.length-1,ae=v?1:1/me,oe;++ee0)for(ee=-1;++ee=J[0]&&oe<=J[1]&&(j=E[e.bisect($,oe,1,Te)-1],j.y+=ae,j.push(S[ee]));return E}return C.value=function(S){return arguments.length?(g=S,C):g},C.range=function(S){return arguments.length?(w=Nr(S),C):w},C.bins=function(S){return arguments.length?(q=typeof S=="number"?function(N){return t4(N,S)}:Nr(S),C):q},C.frequency=function(S){return arguments.length?(v=!!S,C):v},C};function tW(v,g){return t4(v,Math.ceil(Math.log(g.length)/Math.LN2+1))}function t4(v,g){for(var w=-1,q=+v[0],C=(v[1]-q)/g,S=[];++w<=g;)S[w]=C*w+q;return S}function aW(v){return[e.min(v),e.max(v)]}e.layout.pack=function(){var v=e.layout.hierarchy().sort(nW),g=0,w=[1,1],q;function C(S,N){var E=v.call(this,S,N),F=E[0],J=w[0],$=w[1],j=q==null?Math.sqrt:typeof q=="function"?q:function(){return q};if(F.x=F.y=0,Ri(F,function(me){me.r=+j(me.value)}),Ri(F,i4),g){var ee=g*(q?1:Math.max(2*F.r/J,2*F.r/$))/2;Ri(F,function(me){me.r+=ee}),Ri(F,i4),Ri(F,function(me){me.r-=ee})}return l4(F,J/2,$/2,q?1:1/Math.max(2*F.r/J,2*F.r/$)),E}return C.size=function(S){return arguments.length?(w=S,C):w},C.radius=function(S){return arguments.length?(q=S==null||typeof S=="function"?S:+S,C):q},C.padding=function(S){return arguments.length?(g=+S,C):g},vc(C,v)};function nW(v,g){return v.value-g.value}function ly(v,g){var w=v._pack_next;v._pack_next=g,g._pack_prev=v,g._pack_next=w,w._pack_prev=g}function a4(v,g){v._pack_next=g,g._pack_prev=v}function n4(v,g){var w=g.x-v.x,q=g.y-v.y,C=v.r+g.r;return .999*C*C>w*w+q*q}function i4(v){if(!(g=v.children)||!(ee=g.length))return;var g,w=1/0,q=-1/0,C=1/0,S=-1/0,N,E,F,J,$,j,ee;function me(pe){w=Math.min(pe.x-pe.r,w),q=Math.max(pe.x+pe.r,q),C=Math.min(pe.y-pe.r,C),S=Math.max(pe.y+pe.r,S)}if(g.forEach(iW),N=g[0],N.x=-N.r,N.y=0,me(N),ee>1&&(E=g[1],E.x=E.r,E.y=0,me(E),ee>2))for(F=g[2],o4(N,E,F),me(F),ly(N,F),N._pack_prev=F,ly(F,E),E=N._pack_next,J=3;Joe.x&&(oe=Ue),Ue.depth>he.depth&&(he=Ue)});var we=g(ae,oe)/2-ae.x,Me=w[0]/(oe.x+g(oe,ae)/2+we),pe=w[1]/(he.depth||1);hc(me,function(Ue){Ue.x=(Ue.x+we)*Me,Ue.y=Ue.depth*pe})}return ee}function S($){for(var j={A:null,children:[$]},ee=[j],me;(me=ee.pop())!=null;)for(var Te=me.children,ae,oe=0,he=Te.length;oe0&&(oW(uW(ae,$,ee),$,Ue),he+=Ue,we+=Ue),Me+=ae.m,he+=me.m,pe+=oe.m,we+=Te.m;ae&&!sy(Te)&&(Te.t=ae,Te.m+=Me-we),me&&!oy(oe)&&(oe.t=me,oe.m+=he-pe,ee=$)}return ee}function J($){$.x*=w[0],$.y=$.depth*w[1]}return C.separation=function($){return arguments.length?(g=$,C):g},C.size=function($){return arguments.length?(q=(w=$)==null?J:null,C):q?null:w},C.nodeSize=function($){return arguments.length?(q=(w=$)==null?null:J,C):q?w:null},vc(C,v)};function s4(v,g){return v.parent==g.parent?1:2}function oy(v){var g=v.children;return g.length?g[0]:v.t}function sy(v){var g=v.children,w;return(w=g.length)?g[w-1]:v.t}function oW(v,g,w){var q=w/(g.i-v.i);g.c-=q,g.s+=w,v.c+=q,g.z+=w,g.m+=w}function sW(v){for(var g=0,w=0,q=v.children,C=q.length,S;--C>=0;)S=q[C],S.z+=g,S.m+=g,g+=S.s+(w+=S.c)}function uW(v,g,w){return v.a.parent===g.parent?v.a:w}e.layout.cluster=function(){var v=e.layout.hierarchy().sort(null).value(null),g=s4,w=[1,1],q=!1;function C(S,N){var E=v.call(this,S,N),F=E[0],J,$=0;Ri(F,function(ae){var oe=ae.children;oe&&oe.length?(ae.x=cW(oe),ae.y=fW(oe)):(ae.x=J?$+=g(ae,J):0,ae.y=0,J=ae)});var j=u4(F),ee=f4(F),me=j.x-g(j,ee)/2,Te=ee.x+g(ee,j)/2;return Ri(F,q?function(ae){ae.x=(ae.x-F.x)*w[0],ae.y=(F.y-ae.y)*w[1]}:function(ae){ae.x=(ae.x-me)/(Te-me)*w[0],ae.y=(1-(F.y?ae.y/F.y:1))*w[1]}),E}return C.separation=function(S){return arguments.length?(g=S,C):g},C.size=function(S){return arguments.length?(q=(w=S)==null,C):q?null:w},C.nodeSize=function(S){return arguments.length?(q=(w=S)!=null,C):q?w:null},vc(C,v)};function fW(v){return 1+e.max(v,function(g){return g.y})}function cW(v){return v.reduce(function(g,w){return g+w.x},0)/v.length}function u4(v){var g=v.children;return g&&g.length?u4(g[0]):v}function f4(v){var g=v.children,w;return g&&(w=g.length)?f4(g[w-1]):v}e.layout.treemap=function(){var v=e.layout.hierarchy(),g=Math.round,w=[1,1],q=null,C=uy,S=!1,N,E="squarify",F=.5*(1+Math.sqrt(5));function J(ae,oe){for(var he=-1,we=ae.length,Me,pe;++he0;)we.push(pe=Me[ar-1]),we.area+=pe.area,E!=="squarify"||(rr=ee(we,or))<=Ue?(Me.pop(),Ue=rr):(we.area-=we.pop().area,me(we,or,he,!1),or=Math.min(he.dx,he.dy),we.length=we.area=0,Ue=1/0);we.length&&(me(we,or,he,!0),we.length=we.area=0),oe.forEach($)}}function j(ae){var oe=ae.children;if(oe&&oe.length){var he=C(ae),we=oe.slice(),Me,pe=[];for(J(we,he.dx*he.dy/ae.value),pe.area=0;Me=we.pop();)pe.push(Me),pe.area+=Me.area,Me.z!=null&&(me(pe,Me.z?he.dx:he.dy,he,!we.length),pe.length=pe.area=0);oe.forEach(j)}}function ee(ae,oe){for(var he=ae.area,we,Me=0,pe=1/0,Ue=-1,rr=ae.length;++UeMe&&(Me=we));return he*=he,oe*=oe,he?Math.max(oe*Me*F/he,he/(oe*pe*F)):1/0}function me(ae,oe,he,we){var Me=-1,pe=ae.length,Ue=he.x,rr=he.y,or=oe?g(ae.area/oe):0,ar;if(oe==he.dx){for((we||or>he.dy)&&(or=he.dy);++Mehe.dx)&&(or=he.dx);++Me1);return v+g*q*Math.sqrt(-2*Math.log(S)/S)}},logNormal:function(){var v=e.random.normal.apply(e,arguments);return function(){return Math.exp(v())}},bates:function(v){var g=e.random.irwinHall(v);return function(){return g()/v}},irwinHall:function(v){return function(){for(var g=0,w=0;w2?dW:vW,J=q?RV:PV;return C=F(v,g,J,w),S=F(g,v,J,zo),E}function E(F){return C(F)}return E.invert=function(F){return S(F)},E.domain=function(F){return arguments.length?(v=F.map(Number),N()):v},E.range=function(F){return arguments.length?(g=F,N()):g},E.rangeRound=function(F){return E.range(F).interpolate(Z_)},E.clamp=function(F){return arguments.length?(q=F,N()):q},E.interpolate=function(F){return arguments.length?(w=F,N()):w},E.ticks=function(F){return vy(v,F)},E.tickFormat=function(F,J){return d3_scale_linearTickFormat(v,F,J)},E.nice=function(F){return p4(v,F),N()},E.copy=function(){return h4(v,g,w,q)},N()}function d4(v,g){return e.rebind(v,g,"range","rangeRound","interpolate","clamp")}function p4(v,g){return fy(v,v4(cy(v,g)[2])),fy(v,v4(cy(v,g)[2])),v}function cy(v,g){g==null&&(g=10);var w=O0(v),q=w[1]-w[0],C=Math.pow(10,Math.floor(Math.log(q/g)/Math.LN10)),S=g/q*C;return S<=.15?C*=10:S<=.35?C*=5:S<=.75&&(C*=2),w[0]=Math.ceil(w[0]/C)*C,w[1]=Math.floor(w[1]/C)*C+C*.5,w[2]=C,w}function vy(v,g){return e.range.apply(e,cy(v,g))}var pW={s:1,g:1,p:1,r:1,e:1};function m4(v){return-Math.floor(Math.log(v)/Math.LN10+.01)}function Dpe(v,g){var w=m4(g[2]);return v in pW?Math.abs(w-m4(Math.max(_(g[0]),_(g[1]))))+ +(v!=="e"):w-(v==="%")*2}e.scale.log=function(){return y4(e.scale.linear().domain([0,1]),10,!0,[1,10])};function y4(v,g,w,q){function C(E){return(w?Math.log(E<0?0:E):-Math.log(E>0?0:-E))/Math.log(g)}function S(E){return w?Math.pow(g,E):-Math.pow(g,-E)}function N(E){return v(C(E))}return N.invert=function(E){return S(v.invert(E))},N.domain=function(E){return arguments.length?(w=E[0]>=0,v.domain((q=E.map(Number)).map(C)),N):q},N.base=function(E){return arguments.length?(g=+E,v.domain(q.map(C)),N):g},N.nice=function(){var E=fy(q.map(C),w?Math:mW);return v.domain(E),q=E.map(S),N},N.ticks=function(){var E=O0(q),F=[],J=E[0],$=E[1],j=Math.floor(C(J)),ee=Math.ceil(C($)),me=g%1?2:g;if(isFinite(ee-j)){if(w){for(;j0;Te--)F.push(S(j)*Te);for(j=0;F[j]$;ee--);F=F.slice(j,ee)}return F},N.copy=function(){return y4(v.copy(),g,w,q)},d4(N,v)}var mW={floor:function(v){return-Math.ceil(-v)},ceil:function(v){return-Math.floor(-v)}};e.scale.pow=function(){return g4(e.scale.linear(),1,[0,1])};function g4(v,g,w){var q=Y0(g),C=Y0(1/g);function S(N){return v(q(N))}return S.invert=function(N){return C(v.invert(N))},S.domain=function(N){return arguments.length?(v.domain((w=N.map(Number)).map(q)),S):w},S.ticks=function(N){return vy(w,N)},S.tickFormat=function(N,E){return d3_scale_linearTickFormat(w,N,E)},S.nice=function(N){return S.domain(p4(w,N))},S.exponent=function(N){return arguments.length?(q=Y0(g=N),C=Y0(1/g),v.domain(w.map(q)),S):g},S.copy=function(){return g4(v.copy(),g,w)},d4(S,v)}function Y0(v){return function(g){return g<0?-Math.pow(-g,v):Math.pow(g,v)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return x4([],{t:"range",a:[[]]})};function x4(v,g){var w,q,C;function S(E){return q[((w.get(E)||(g.t==="range"?w.set(E,v.push(E)):NaN))-1)%q.length]}function N(E,F){return e.range(v.length).map(function(J){return E+F*J})}return S.domain=function(E){if(!arguments.length)return v;v=[],w=new x;for(var F=-1,J=E.length,$;++F0?w[S-1]:v[0],See?0:1;if($=vr)return F($,Te)+(J?F(J,1-Te):"")+"Z";var ae,oe,he,we,Me=0,pe=0,Ue,rr,or,ar,hr,dr,Sr,pr,Mr=[];if((we=(+N.apply(this,arguments)||0)/2)&&(he=q===G0?Math.sqrt(J*J+$*$):+q.apply(this,arguments),Te||(pe*=-1),$&&(pe=oa(he/$*Math.sin(we))),J&&(Me=oa(he/J*Math.sin(we)))),$){Ue=$*Math.cos(j+pe),rr=$*Math.sin(j+pe),or=$*Math.cos(ee-pe),ar=$*Math.sin(ee-pe);var Kr=Math.abs(ee-j-2*pe)<=qe?0:1;if(pe&&U0(Ue,rr,or,ar)===Te^Kr){var Ft=(j+ee)/2;Ue=$*Math.cos(Ft),rr=$*Math.sin(Ft),or=ar=null}}else Ue=rr=0;if(J){hr=J*Math.cos(ee-Me),dr=J*Math.sin(ee-Me),Sr=J*Math.cos(j+Me),pr=J*Math.sin(j+Me);var at=Math.abs(j-ee+2*Me)<=qe?0:1;if(Me&&U0(hr,dr,Sr,pr)===1-Te^at){var er=(j+ee)/2;hr=J*Math.cos(er),dr=J*Math.sin(er),Sr=pr=null}}else hr=dr=0;if(me>fe&&(ae=Math.min(Math.abs($-J)/2,+w.apply(this,arguments)))>.001){oe=J<$^Te?0:1;var Dr=ae,Er=ae;if(me0?0:1}function V0(v,g,w,q,C){var S=v[0]-g[0],N=v[1]-g[1],E=(C?q:-q)/Math.sqrt(S*S+N*N),F=E*N,J=-E*S,$=v[0]+F,j=v[1]+J,ee=g[0]+F,me=g[1]+J,Te=($+ee)/2,ae=(j+me)/2,oe=ee-$,he=me-j,we=oe*oe+he*he,Me=w-q,pe=$*me-ee*j,Ue=(he<0?-1:1)*Math.sqrt(Math.max(0,Me*Me*we-pe*pe)),rr=(pe*he-oe*Ue)/we,or=(-pe*oe-he*Ue)/we,ar=(pe*he+oe*Ue)/we,hr=(-pe*oe+he*Ue)/we,dr=rr-Te,Sr=or-ae,pr=ar-Te,Mr=hr-ae;return dr*dr+Sr*Sr>pr*pr+Mr*Mr&&(rr=ar,or=hr),[[rr-F,or-J],[rr*w/Me,or*w/Me]]}function k4(){return!0}function q4(v){var g=nu,w=lc,q=k4,C=li,S=C.key,N=.7;function E(F){var J=[],$=[],j=-1,ee=F.length,me,Te=Nr(g),ae=Nr(w);function oe(){J.push("M",C(v($),N))}for(;++j1?v.join("L"):v+"Z"}function C4(v){return v.join("L")+"Z"}function AW(v){for(var g=0,w=v.length,q=v[0],C=[q[0],",",q[1]];++g1&&C.push("H",q[0]),C.join("")}function dy(v){for(var g=0,w=v.length,q=v[0],C=[q[0],",",q[1]];++g1){E=g[1],S=v[F],F++,q+="C"+(C[0]+N[0])+","+(C[1]+N[1])+","+(S[0]-E[0])+","+(S[1]-E[1])+","+S[0]+","+S[1];for(var J=2;J9&&(S=w*3/Math.sqrt(S),N[E]=S*q,N[E+1]=S*C));for(E=-1;++E<=F;)S=(v[Math.min(F,E+1)][0]-v[Math.max(0,E-1)][0])/(6*(1+N[E]*N[E])),g.push([S||0,N[E]*S||0]);return g}function RW(v){return v.length<3?li(v):v[0]+W0(v,PW(v))}e.svg.line.radial=function(){var v=q4(E4);return v.radius=v.x,delete v.x,v.angle=v.y,delete v.y,v};function E4(v){for(var g,w=-1,q=v.length,C,S;++wqe)+",1 "+j}function J($,j,ee,me){return"Q 0,0 "+me}return S.radius=function($){return arguments.length?(w=Nr($),S):w},S.source=function($){return arguments.length?(v=Nr($),S):v},S.target=function($){return arguments.length?(g=Nr($),S):g},S.startAngle=function($){return arguments.length?(q=Nr($),S):q},S.endAngle=function($){return arguments.length?(C=Nr($),S):C},S};function zW(v){return v.radius}e.svg.diagonal=function(){var v=R4,g=z4,w=N4;function q(C,S){var N=v.call(this,C,S),E=g.call(this,C,S),F=(N.y+E.y)/2,J=[N,{x:N.x,y:F},{x:E.x,y:F},E];return J=J.map(w),"M"+J[0]+"C"+J[1]+" "+J[2]+" "+J[3]}return q.source=function(C){return arguments.length?(v=Nr(C),q):v},q.target=function(C){return arguments.length?(g=Nr(C),q):g},q.projection=function(C){return arguments.length?(w=C,q):w},q};function N4(v){return[v.x,v.y]}e.svg.diagonal.radial=function(){var v=e.svg.diagonal(),g=N4,w=v.projection;return v.projection=function(q){return arguments.length?w(NW(g=q)):g},v};function NW(v){return function(){var g=v.apply(this,arguments),w=g[0],q=g[1]-sr;return[w*Math.cos(q),w*Math.sin(q)]}}e.svg.symbol=function(){var v=IW,g=FW;function w(q,C){return(I4.get(v.call(this,q,C))||F4)(g.call(this,q,C))}return w.type=function(q){return arguments.length?(v=Nr(q),w):v},w.size=function(q){return arguments.length?(g=Nr(q),w):g},w};function FW(){return 64}function IW(){return"circle"}function F4(v){var g=Math.sqrt(v/qe);return"M0,"+g+"A"+g+","+g+" 0 1,1 0,"+-g+"A"+g+","+g+" 0 1,1 0,"+g+"Z"}var I4=e.map({circle:F4,cross:function(v){var g=Math.sqrt(v/5)/2;return"M"+-3*g+","+-g+"H"+-g+"V"+-3*g+"H"+g+"V"+-g+"H"+3*g+"V"+g+"H"+g+"V"+3*g+"H"+-g+"V"+g+"H"+-3*g+"Z"},diamond:function(v){var g=Math.sqrt(v/(2*H4)),w=g*H4;return"M0,"+-g+"L"+w+",0 0,"+g+" "+-w+",0Z"},square:function(v){var g=Math.sqrt(v)/2;return"M"+-g+","+-g+"L"+g+","+-g+" "+g+","+g+" "+-g+","+g+"Z"},"triangle-down":function(v){var g=Math.sqrt(v/X0),w=g*X0/2;return"M0,"+w+"L"+g+","+-w+" "+-g+","+-w+"Z"},"triangle-up":function(v){var g=Math.sqrt(v/X0),w=g*X0/2;return"M0,"+-w+"L"+g+","+w+" "+-g+","+w+"Z"}});e.svg.symbolTypes=I4.keys();var X0=Math.sqrt(3),H4=Math.tan(30*Ar);be.transition=function(v){for(var g=No||++B4,w=by(v),q=[],C,S,N=J0||{time:Date.now(),ease:mV,delay:0,duration:250},E=-1,F=this.length;++E0;)j[--we].call(v,he);if(oe>=1)return N.event&&N.event.end.call(v,v.__data__,g),--S.count?delete S[q]:delete v[w],1}N||(E=C.time,F=P0(ee,0,E),N=S[q]={tween:new x,time:E,timer:F,delay:C.delay,duration:C.duration,ease:C.ease,index:g},C=null,++S.count)}e.svg.axis=function(){var v=e.scale.linear(),g=Y4,w=6,q=6,C=3,S=[10],N=null,E;function F(J){J.each(function(){var $=e.select(this),j=this.__chart__||v,ee=this.__chart__=v.copy(),me=N==null?ee.ticks?ee.ticks.apply(ee,S):ee.domain():N,Te=E==null?ee.tickFormat?ee.tickFormat.apply(ee,S):U:E,ae=$.selectAll(".tick").data(me,ee),oe=ae.enter().insert("g",".domain").attr("class","tick").style("opacity",fe),he=e.transition(ae.exit()).style("opacity",fe).remove(),we=e.transition(ae.order()).style("opacity",1),Me=Math.max(w,0)+C,pe,Ue=B0(ee),rr=$.selectAll(".domain").data([0]),or=(rr.enter().append("path").attr("class","domain"),e.transition(rr));oe.append("line"),oe.append("text");var ar=oe.select("line"),hr=we.select("line"),dr=ae.select("text").text(Te),Sr=oe.select("text"),pr=we.select("text"),Mr=g==="top"||g==="left"?-1:1,Kr,Ft,at,er;if(g==="bottom"||g==="top"?(pe=BW,Kr="x",at="y",Ft="x2",er="y2",dr.attr("dy",Mr<0?"0em":".71em").style("text-anchor","middle"),or.attr("d","M"+Ue[0]+","+Mr*q+"V0H"+Ue[1]+"V"+Mr*q)):(pe=YW,Kr="y",at="x",Ft="y2",er="x2",dr.attr("dy",".32em").style("text-anchor",Mr<0?"end":"start"),or.attr("d","M"+Mr*q+","+Ue[0]+"H0V"+Ue[1]+"H"+Mr*q)),ar.attr(er,Mr*w),Sr.attr(at,Mr*Me),hr.attr(Ft,0).attr(er,Mr*w),pr.attr(Kr,0).attr(at,Mr*Me),ee.rangeBand){var Dr=ee,Er=Dr.rangeBand()/2;j=ee=function(Qr){return Dr(Qr)+Er}}else j.rangeBand?j=ee:he.call(pe,ee,j);oe.call(pe,j,ee),we.call(pe,ee,ee)})}return F.scale=function(J){return arguments.length?(v=J,F):v},F.orient=function(J){return arguments.length?(g=J in OW?J+"":Y4,F):g},F.ticks=function(){return arguments.length?(S=t(arguments),F):S},F.tickValues=function(J){return arguments.length?(N=J,F):N},F.tickFormat=function(J){return arguments.length?(E=J,F):E},F.tickSize=function(J){var $=arguments.length;return $?(w=+J,q=+arguments[$-1],F):w},F.innerTickSize=function(J){return arguments.length?(w=+J,F):w},F.outerTickSize=function(J){return arguments.length?(q=+J,F):q},F.tickPadding=function(J){return arguments.length?(C=+J,F):C},F.tickSubdivide=function(){return arguments.length&&F},F};var Y4="bottom",OW={top:1,right:1,bottom:1,left:1};function BW(v,g,w){v.attr("transform",function(q){var C=g(q);return"translate("+(isFinite(C)?C:w(q))+",0)"})}function YW(v,g,w){v.attr("transform",function(q){var C=g(q);return"translate(0,"+(isFinite(C)?C:w(q))+")"})}e.svg.brush=function(){var v=ce($,"brushstart","brush","brushend"),g=null,w=null,q=[0,0],C=[0,0],S,N,E=!0,F=!0,J=_y[0];function $(ae){ae.each(function(){var oe=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Te).on("touchstart.brush",Te),he=oe.selectAll(".background").data([0]);he.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oe.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var we=oe.selectAll(".resize").data(J,U);we.exit().remove(),we.enter().append("g").attr("class",function(rr){return"resize "+rr}).style("cursor",function(rr){return GW[rr]}).append("rect").attr("x",function(rr){return/[ew]$/.test(rr)?-3:null}).attr("y",function(rr){return/^[ns]/.test(rr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),we.style("display",$.empty()?"none":null);var Me=e.transition(oe),pe=e.transition(he),Ue;g&&(Ue=B0(g),pe.attr("x",Ue[0]).attr("width",Ue[1]-Ue[0]),ee(Me)),w&&(Ue=B0(w),pe.attr("y",Ue[0]).attr("height",Ue[1]-Ue[0]),me(Me)),j(Me)})}$.event=function(ae){ae.each(function(){var oe=v.of(this,arguments),he={x:q,y:C,i:S,j:N},we=this.__chart__||he;this.__chart__=he,No?e.select(this).transition().each("start.brush",function(){S=we.i,N=we.j,q=we.x,C=we.y,oe({type:"brushstart"})}).tween("brush:brush",function(){var Me=H0(q,he.x),pe=H0(C,he.y);return S=N=null,function(Ue){q=he.x=Me(Ue),C=he.y=pe(Ue),oe({type:"brush",mode:"resize"})}}).each("end.brush",function(){S=he.i,N=he.j,oe({type:"brush",mode:"resize"}),oe({type:"brushend"})}):(oe({type:"brushstart"}),oe({type:"brush",mode:"resize"}),oe({type:"brushend"}))})};function j(ae){ae.selectAll(".resize").attr("transform",function(oe){return"translate("+q[+/e$/.test(oe)]+","+C[+/^s/.test(oe)]+")"})}function ee(ae){ae.select(".extent").attr("x",q[0]),ae.selectAll(".extent,.n>rect,.s>rect").attr("width",q[1]-q[0])}function me(ae){ae.select(".extent").attr("y",C[0]),ae.selectAll(".extent,.e>rect,.w>rect").attr("height",C[1]-C[0])}function Te(){var ae=this,oe=e.select(e.event.target),he=v.of(ae,arguments),we=e.select(ae),Me=oe.datum(),pe=!/^(n|s)$/.test(Me)&&g,Ue=!/^(e|w)$/.test(Me)&&w,rr=oe.classed("extent"),or=fr(ae),ar,hr=e.mouse(ae),dr,Sr=e.select(i(ae)).on("keydown.brush",Kr).on("keyup.brush",Ft);if(e.event.changedTouches?Sr.on("touchmove.brush",at).on("touchend.brush",Dr):Sr.on("mousemove.brush",at).on("mouseup.brush",Dr),we.interrupt().selectAll("*").interrupt(),rr)hr[0]=q[0]-hr[0],hr[1]=C[0]-hr[1];else if(Me){var pr=+/w$/.test(Me),Mr=+/^n/.test(Me);dr=[q[1-pr]-hr[0],C[1-Mr]-hr[1]],hr[0]=q[pr],hr[1]=C[Mr]}else e.event.altKey&&(ar=hr.slice());we.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",oe.style("cursor")),he({type:"brushstart"}),at();function Kr(){e.event.keyCode==32&&(rr||(ar=null,hr[0]-=q[1],hr[1]-=C[1],rr=2),re())}function Ft(){e.event.keyCode==32&&rr==2&&(hr[0]+=q[1],hr[1]+=C[1],rr=0,re())}function at(){var Er=e.mouse(ae),Qr=!1;dr&&(Er[0]+=dr[0],Er[1]+=dr[1]),rr||(e.event.altKey?(ar||(ar=[(q[0]+q[1])/2,(C[0]+C[1])/2]),hr[0]=q[+(Er[0]{(function(e,r){typeof rh=="object"&&typeof X4!="undefined"?r(rh):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(rh,function(e){"use strict";var r=new Date,t=new Date;function a(ie,Ae,Ce,cr){function tr(De){return ie(De=arguments.length===0?new Date:new Date(+De)),De}return tr.floor=function(De){return ie(De=new Date(+De)),De},tr.ceil=function(De){return ie(De=new Date(De-1)),Ae(De,1),ie(De),De},tr.round=function(De){var Le=tr(De),Ye=tr.ceil(De);return De-Le0))return Xe;do Xe.push(Ge=new Date(+De)),Ae(De,Ye),ie(De);while(Ge=Le)for(;ie(Le),!De(Le);)Le.setTime(Le-1)},function(Le,Ye){if(Le>=Le)if(Ye<0)for(;++Ye<=0;)for(;Ae(Le,-1),!De(Le););else for(;--Ye>=0;)for(;Ae(Le,1),!De(Le););})},Ce&&(tr.count=function(De,Le){return r.setTime(+De),t.setTime(+Le),ie(r),ie(t),Math.floor(Ce(r,t))},tr.every=function(De){return De=Math.floor(De),!isFinite(De)||!(De>0)?null:De>1?tr.filter(cr?function(Le){return cr(Le)%De===0}:function(Le){return tr.count(0,Le)%De===0}):tr}),tr}var n=a(function(){},function(ie,Ae){ie.setTime(+ie+Ae)},function(ie,Ae){return Ae-ie});n.every=function(ie){return ie=Math.floor(ie),!isFinite(ie)||!(ie>0)?null:ie>1?a(function(Ae){Ae.setTime(Math.floor(Ae/ie)*ie)},function(Ae,Ce){Ae.setTime(+Ae+Ce*ie)},function(Ae,Ce){return(Ce-Ae)/ie}):n};var i=n.range,l=1e3,o=6e4,s=36e5,u=864e5,f=6048e5,c=a(function(ie){ie.setTime(ie-ie.getMilliseconds())},function(ie,Ae){ie.setTime(+ie+Ae*l)},function(ie,Ae){return(Ae-ie)/l},function(ie){return ie.getUTCSeconds()}),h=c.range,d=a(function(ie){ie.setTime(ie-ie.getMilliseconds()-ie.getSeconds()*l)},function(ie,Ae){ie.setTime(+ie+Ae*o)},function(ie,Ae){return(Ae-ie)/o},function(ie){return ie.getMinutes()}),p=d.range,y=a(function(ie){ie.setTime(ie-ie.getMilliseconds()-ie.getSeconds()*l-ie.getMinutes()*o)},function(ie,Ae){ie.setTime(+ie+Ae*s)},function(ie,Ae){return(Ae-ie)/s},function(ie){return ie.getHours()}),m=y.range,_=a(function(ie){ie.setHours(0,0,0,0)},function(ie,Ae){ie.setDate(ie.getDate()+Ae)},function(ie,Ae){return(Ae-ie-(Ae.getTimezoneOffset()-ie.getTimezoneOffset())*o)/u},function(ie){return ie.getDate()-1}),b=_.range;function T(ie){return a(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-ie)%7),Ae.setHours(0,0,0,0)},function(Ae,Ce){Ae.setDate(Ae.getDate()+Ce*7)},function(Ae,Ce){return(Ce-Ae-(Ce.getTimezoneOffset()-Ae.getTimezoneOffset())*o)/f})}var x=T(0),M=T(1),A=T(2),k=T(3),L=T(4),D=T(5),P=T(6),R=x.range,z=M.range,H=A.range,O=k.range,U=L.range,V=D.range,Y=P.range,I=a(function(ie){ie.setDate(1),ie.setHours(0,0,0,0)},function(ie,Ae){ie.setMonth(ie.getMonth()+Ae)},function(ie,Ae){return Ae.getMonth()-ie.getMonth()+(Ae.getFullYear()-ie.getFullYear())*12},function(ie){return ie.getMonth()}),G=I.range,Z=a(function(ie){ie.setMonth(0,1),ie.setHours(0,0,0,0)},function(ie,Ae){ie.setFullYear(ie.getFullYear()+Ae)},function(ie,Ae){return Ae.getFullYear()-ie.getFullYear()},function(ie){return ie.getFullYear()});Z.every=function(ie){return!isFinite(ie=Math.floor(ie))||!(ie>0)?null:a(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/ie)*ie),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Ce){Ae.setFullYear(Ae.getFullYear()+Ce*ie)})};var K=Z.range,re=a(function(ie){ie.setUTCSeconds(0,0)},function(ie,Ae){ie.setTime(+ie+Ae*o)},function(ie,Ae){return(Ae-ie)/o},function(ie){return ie.getUTCMinutes()}),se=re.range,ce=a(function(ie){ie.setUTCMinutes(0,0,0)},function(ie,Ae){ie.setTime(+ie+Ae*s)},function(ie,Ae){return(Ae-ie)/s},function(ie){return ie.getUTCHours()}),le=ce.range,Q=a(function(ie){ie.setUTCHours(0,0,0,0)},function(ie,Ae){ie.setUTCDate(ie.getUTCDate()+Ae)},function(ie,Ae){return(Ae-ie)/u},function(ie){return ie.getUTCDate()-1}),ge=Q.range;function ue(ie){return a(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-ie)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Ce){Ae.setUTCDate(Ae.getUTCDate()+Ce*7)},function(Ae,Ce){return(Ce-Ae)/f})}var ke=ue(0),ve=ue(1),be=ue(2),W=ue(3),te=ue(4),X=ue(5),ye=ue(6),_e=ke.range,xe=ve.range,Ie=be.range,ze=W.range,Re=te.range,He=X.range,Be=ye.range,Fe=a(function(ie){ie.setUTCDate(1),ie.setUTCHours(0,0,0,0)},function(ie,Ae){ie.setUTCMonth(ie.getUTCMonth()+Ae)},function(ie,Ae){return Ae.getUTCMonth()-ie.getUTCMonth()+(Ae.getUTCFullYear()-ie.getUTCFullYear())*12},function(ie){return ie.getUTCMonth()}),Ee=Fe.range,Je=a(function(ie){ie.setUTCMonth(0,1),ie.setUTCHours(0,0,0,0)},function(ie,Ae){ie.setUTCFullYear(ie.getUTCFullYear()+Ae)},function(ie,Ae){return Ae.getUTCFullYear()-ie.getUTCFullYear()},function(ie){return ie.getUTCFullYear()});Je.every=function(ie){return!isFinite(ie=Math.floor(ie))||!(ie>0)?null:a(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/ie)*ie),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Ce){Ae.setUTCFullYear(Ae.getUTCFullYear()+Ce*ie)})};var We=Je.range;e.timeDay=_,e.timeDays=b,e.timeFriday=D,e.timeFridays=V,e.timeHour=y,e.timeHours=m,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=M,e.timeMondays=z,e.timeMonth=I,e.timeMonths=G,e.timeSaturday=P,e.timeSaturdays=Y,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=x,e.timeSundays=R,e.timeThursday=L,e.timeThursdays=U,e.timeTuesday=A,e.timeTuesdays=H,e.timeWednesday=k,e.timeWednesdays=O,e.timeWeek=x,e.timeWeeks=R,e.timeYear=Z,e.timeYears=K,e.utcDay=Q,e.utcDays=ge,e.utcFriday=X,e.utcFridays=He,e.utcHour=ce,e.utcHours=le,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=re,e.utcMinutes=se,e.utcMonday=ve,e.utcMondays=xe,e.utcMonth=Fe,e.utcMonths=Ee,e.utcSaturday=ye,e.utcSaturdays=Be,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=ke,e.utcSundays=_e,e.utcThursday=te,e.utcThursdays=Re,e.utcTuesday=be,e.utcTuesdays=Ie,e.utcWednesday=W,e.utcWednesdays=ze,e.utcWeek=ke,e.utcWeeks=_e,e.utcYear=Je,e.utcYears=We,Object.defineProperty(e,"__esModule",{value:!0})})});var cu=B((th,Z4)=>{(function(e,r){typeof th=="object"&&typeof Z4!="undefined"?r(th,My()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(th,function(e,r){"use strict";function t(ne){if(0<=ne.y&&ne.y<100){var fe=new Date(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L);return fe.setFullYear(ne.y),fe}return new Date(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L)}function a(ne){if(0<=ne.y&&ne.y<100){var fe=new Date(Date.UTC(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L));return fe.setUTCFullYear(ne.y),fe}return new Date(Date.UTC(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L))}function n(ne,fe,Se){return{y:ne,m:fe,d:Se,H:0,M:0,S:0,L:0}}function i(ne){var fe=ne.dateTime,Se=ne.date,qe=ne.time,ir=ne.periods,vr=ne.days,sr=ne.shortDays,Ar=ne.months,Ur=ne.shortMonths,et=h(ir),Wr=d(ir),Nt=h(vr),oa=d(vr),Na=h(sr),sa=d(sr),Sn=h(Ar),Za=d(Ar),ua=h(Ur),Ja=d(Ur),gr={a:Do,A:Eo,b:Sl,B:k0,c:null,d:I,e:I,f:se,H:G,I:Z,j:K,L:re,m:ce,M:le,p:q0,q:ac,Q:Le,s:Ye,S:Q,u:ge,U:ue,V:ke,w:ve,W:be,x:null,X:null,y:W,Y:te,Z:X,"%":De},ct={a:nc,A:ic,b:Ia,B:C0,c:null,d:ye,e:ye,f:Re,H:_e,I:xe,j:Ie,L:ze,m:He,M:Be,p:tu,q:au,Q:Le,s:Ye,S:Fe,u:Ee,U:Je,V:We,w:ie,W:Ae,x:null,X:null,y:Ce,Y:cr,Z:tr,"%":De},Xr={a:Fa,A:fa,b:ai,B:ni,c:Qt,d:L,e:L,f:O,H:P,I:P,j:D,L:H,m:k,M:R,p:_t,q:A,Q:V,s:Y,S:z,u:y,U:m,V:_,w:p,W:b,x:it,X:ma,y:x,Y:T,Z:M,"%":U};gr.x=bt(Se,gr),gr.X=bt(qe,gr),gr.c=bt(fe,gr),ct.x=bt(Se,ct),ct.X=bt(qe,ct),ct.c=bt(fe,ct);function bt(mr,Zr){return function(rt){var nr=[],ya=-1,ht=0,ga=mr.length,Nr,ii,Po;for(rt instanceof Date||(rt=new Date(+rt));++ya53)return null;"w"in nr||(nr.w=1),"Z"in nr?(ht=a(n(nr.y,0,1)),ga=ht.getUTCDay(),ht=ga>4||ga===0?r.utcMonday.ceil(ht):r.utcMonday(ht),ht=r.utcDay.offset(ht,(nr.V-1)*7),nr.y=ht.getUTCFullYear(),nr.m=ht.getUTCMonth(),nr.d=ht.getUTCDate()+(nr.w+6)%7):(ht=t(n(nr.y,0,1)),ga=ht.getDay(),ht=ga>4||ga===0?r.timeMonday.ceil(ht):r.timeMonday(ht),ht=r.timeDay.offset(ht,(nr.V-1)*7),nr.y=ht.getFullYear(),nr.m=ht.getMonth(),nr.d=ht.getDate()+(nr.w+6)%7)}else("W"in nr||"U"in nr)&&("w"in nr||(nr.w="u"in nr?nr.u%7:"W"in nr?1:0),ga="Z"in nr?a(n(nr.y,0,1)).getUTCDay():t(n(nr.y,0,1)).getDay(),nr.m=0,nr.d="W"in nr?(nr.w+6)%7+nr.W*7-(ga+5)%7:nr.w+nr.U*7-(ga+6)%7);return"Z"in nr?(nr.H+=nr.Z/100|0,nr.M+=nr.Z%100,a(nr)):t(nr)}}function vt(mr,Zr,rt,nr){for(var ya=0,ht=Zr.length,ga=rt.length,Nr,ii;ya=ga)return-1;if(Nr=Zr.charCodeAt(ya++),Nr===37){if(Nr=Zr.charAt(ya++),ii=Xr[Nr in l?Zr.charAt(ya++):Nr],!ii||(nr=ii(mr,rt,nr))<0)return-1}else if(Nr!=rt.charCodeAt(nr++))return-1}return nr}function _t(mr,Zr,rt){var nr=et.exec(Zr.slice(rt));return nr?(mr.p=Wr[nr[0].toLowerCase()],rt+nr[0].length):-1}function Fa(mr,Zr,rt){var nr=Na.exec(Zr.slice(rt));return nr?(mr.w=sa[nr[0].toLowerCase()],rt+nr[0].length):-1}function fa(mr,Zr,rt){var nr=Nt.exec(Zr.slice(rt));return nr?(mr.w=oa[nr[0].toLowerCase()],rt+nr[0].length):-1}function ai(mr,Zr,rt){var nr=ua.exec(Zr.slice(rt));return nr?(mr.m=Ja[nr[0].toLowerCase()],rt+nr[0].length):-1}function ni(mr,Zr,rt){var nr=Sn.exec(Zr.slice(rt));return nr?(mr.m=Za[nr[0].toLowerCase()],rt+nr[0].length):-1}function Qt(mr,Zr,rt){return vt(mr,fe,Zr,rt)}function it(mr,Zr,rt){return vt(mr,Se,Zr,rt)}function ma(mr,Zr,rt){return vt(mr,qe,Zr,rt)}function Do(mr){return sr[mr.getDay()]}function Eo(mr){return vr[mr.getDay()]}function Sl(mr){return Ur[mr.getMonth()]}function k0(mr){return Ar[mr.getMonth()]}function q0(mr){return ir[+(mr.getHours()>=12)]}function ac(mr){return 1+~~(mr.getMonth()/3)}function nc(mr){return sr[mr.getUTCDay()]}function ic(mr){return vr[mr.getUTCDay()]}function Ia(mr){return Ur[mr.getUTCMonth()]}function C0(mr){return Ar[mr.getUTCMonth()]}function tu(mr){return ir[+(mr.getUTCHours()>=12)]}function au(mr){return 1+~~(mr.getUTCMonth()/3)}return{format:function(mr){var Zr=bt(mr+="",gr);return Zr.toString=function(){return mr},Zr},parse:function(mr){var Zr=Lt(mr+="",!1);return Zr.toString=function(){return mr},Zr},utcFormat:function(mr){var Zr=bt(mr+="",ct);return Zr.toString=function(){return mr},Zr},utcParse:function(mr){var Zr=Lt(mr+="",!0);return Zr.toString=function(){return mr},Zr}}}var l={"-":"",_:" ",0:"0"},o=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(ne,fe,Se){var qe=ne<0?"-":"",ir=(qe?-ne:ne)+"",vr=ir.length;return qe+(vr68?1900:2e3),Se+qe[0].length):-1}function M(ne,fe,Se){var qe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(fe.slice(Se,Se+6));return qe?(ne.Z=qe[1]?0:-(qe[2]+(qe[3]||"00")),Se+qe[0].length):-1}function A(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+1));return qe?(ne.q=qe[0]*3-3,Se+qe[0].length):-1}function k(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.m=qe[0]-1,Se+qe[0].length):-1}function L(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.d=+qe[0],Se+qe[0].length):-1}function D(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+3));return qe?(ne.m=0,ne.d=+qe[0],Se+qe[0].length):-1}function P(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.H=+qe[0],Se+qe[0].length):-1}function R(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.M=+qe[0],Se+qe[0].length):-1}function z(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.S=+qe[0],Se+qe[0].length):-1}function H(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+3));return qe?(ne.L=+qe[0],Se+qe[0].length):-1}function O(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+6));return qe?(ne.L=Math.floor(qe[0]/1e3),Se+qe[0].length):-1}function U(ne,fe,Se){var qe=s.exec(fe.slice(Se,Se+1));return qe?Se+qe[0].length:-1}function V(ne,fe,Se){var qe=o.exec(fe.slice(Se));return qe?(ne.Q=+qe[0],Se+qe[0].length):-1}function Y(ne,fe,Se){var qe=o.exec(fe.slice(Se));return qe?(ne.s=+qe[0],Se+qe[0].length):-1}function I(ne,fe){return f(ne.getDate(),fe,2)}function G(ne,fe){return f(ne.getHours(),fe,2)}function Z(ne,fe){return f(ne.getHours()%12||12,fe,2)}function K(ne,fe){return f(1+r.timeDay.count(r.timeYear(ne),ne),fe,3)}function re(ne,fe){return f(ne.getMilliseconds(),fe,3)}function se(ne,fe){return re(ne,fe)+"000"}function ce(ne,fe){return f(ne.getMonth()+1,fe,2)}function le(ne,fe){return f(ne.getMinutes(),fe,2)}function Q(ne,fe){return f(ne.getSeconds(),fe,2)}function ge(ne){var fe=ne.getDay();return fe===0?7:fe}function ue(ne,fe){return f(r.timeSunday.count(r.timeYear(ne)-1,ne),fe,2)}function ke(ne,fe){var Se=ne.getDay();return ne=Se>=4||Se===0?r.timeThursday(ne):r.timeThursday.ceil(ne),f(r.timeThursday.count(r.timeYear(ne),ne)+(r.timeYear(ne).getDay()===4),fe,2)}function ve(ne){return ne.getDay()}function be(ne,fe){return f(r.timeMonday.count(r.timeYear(ne)-1,ne),fe,2)}function W(ne,fe){return f(ne.getFullYear()%100,fe,2)}function te(ne,fe){return f(ne.getFullYear()%1e4,fe,4)}function X(ne){var fe=ne.getTimezoneOffset();return(fe>0?"-":(fe*=-1,"+"))+f(fe/60|0,"0",2)+f(fe%60,"0",2)}function ye(ne,fe){return f(ne.getUTCDate(),fe,2)}function _e(ne,fe){return f(ne.getUTCHours(),fe,2)}function xe(ne,fe){return f(ne.getUTCHours()%12||12,fe,2)}function Ie(ne,fe){return f(1+r.utcDay.count(r.utcYear(ne),ne),fe,3)}function ze(ne,fe){return f(ne.getUTCMilliseconds(),fe,3)}function Re(ne,fe){return ze(ne,fe)+"000"}function He(ne,fe){return f(ne.getUTCMonth()+1,fe,2)}function Be(ne,fe){return f(ne.getUTCMinutes(),fe,2)}function Fe(ne,fe){return f(ne.getUTCSeconds(),fe,2)}function Ee(ne){var fe=ne.getUTCDay();return fe===0?7:fe}function Je(ne,fe){return f(r.utcSunday.count(r.utcYear(ne)-1,ne),fe,2)}function We(ne,fe){var Se=ne.getUTCDay();return ne=Se>=4||Se===0?r.utcThursday(ne):r.utcThursday.ceil(ne),f(r.utcThursday.count(r.utcYear(ne),ne)+(r.utcYear(ne).getUTCDay()===4),fe,2)}function ie(ne){return ne.getUTCDay()}function Ae(ne,fe){return f(r.utcMonday.count(r.utcYear(ne)-1,ne),fe,2)}function Ce(ne,fe){return f(ne.getUTCFullYear()%100,fe,2)}function cr(ne,fe){return f(ne.getUTCFullYear()%1e4,fe,4)}function tr(){return"+0000"}function De(){return"%"}function Le(ne){return+ne}function Ye(ne){return Math.floor(+ne/1e3)}var Xe;Ge({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 Ge(ne){return Xe=i(ne),e.timeFormat=Xe.format,e.timeParse=Xe.parse,e.utcFormat=Xe.utcFormat,e.utcParse=Xe.utcParse,Xe}var Oe="%Y-%m-%dT%H:%M:%S.%LZ";function $e(ne){return ne.toISOString()}var fr=Date.prototype.toISOString?$e:e.utcFormat(Oe);function lr(ne){var fe=new Date(ne);return isNaN(fe)?null:fe}var Ne=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(Oe);e.isoFormat=fr,e.isoParse=Ne,e.timeFormatDefaultLocale=Ge,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var Ay=B((ah,J4)=>{(function(e,r){typeof ah=="object"&&typeof J4!="undefined"?r(ah):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(ah,function(e){"use strict";function r(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString("en").replace(/,/g,""):k.toString(10)}function t(k,L){if((D=(k=L?k.toExponential(L-1):k.toExponential()).indexOf("e"))<0)return null;var D,P=k.slice(0,D);return[P.length>1?P[0]+P.slice(2):P,+k.slice(D+1)]}function a(k){return k=t(Math.abs(k)),k?k[1]:NaN}function n(k,L){return function(D,P){for(var R=D.length,z=[],H=0,O=k[0],U=0;R>0&&O>0&&(U+O+1>P&&(O=Math.max(1,P-U)),z.push(D.substring(R-=O,R+O)),!((U+=O+1)>P));)O=k[H=(H+1)%k.length];return z.reverse().join(L)}}function i(k){return function(L){return L.replace(/[0-9]/g,function(D){return k[+D]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(k){if(!(L=l.exec(k)))throw new Error("invalid format: "+k);var L;return new s({fill:L[1],align:L[2],sign:L[3],symbol:L[4],zero:L[5],width:L[6],comma:L[7],precision:L[8]&&L[8].slice(1),trim:L[9],type:L[10]})}o.prototype=s.prototype;function s(k){this.fill=k.fill===void 0?" ":k.fill+"",this.align=k.align===void 0?">":k.align+"",this.sign=k.sign===void 0?"-":k.sign+"",this.symbol=k.symbol===void 0?"":k.symbol+"",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?"":k.type+""}s.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(k){e:for(var L=k.length,D=1,P=-1,R;D0&&(P=0);break}return P>0?k.slice(0,P)+k.slice(R+1):k}var f;function c(k,L){var D=t(k,L);if(!D)return k+"";var P=D[0],R=D[1],z=R-(f=Math.max(-8,Math.min(8,Math.floor(R/3)))*3)+1,H=P.length;return z===H?P:z>H?P+new Array(z-H+1).join("0"):z>0?P.slice(0,z)+"."+P.slice(z):"0."+new Array(1-z).join("0")+t(k,Math.max(0,L+z-1))[0]}function h(k,L){var D=t(k,L);if(!D)return k+"";var P=D[0],R=D[1];return R<0?"0."+new Array(-R).join("0")+P:P.length>R+1?P.slice(0,R+1)+"."+P.slice(R+1):P+new Array(R-P.length+2).join("0")}var d={"%":function(k,L){return(k*100).toFixed(L)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,L){return k.toExponential(L)},f:function(k,L){return k.toFixed(L)},g:function(k,L){return k.toPrecision(L)},o:function(k){return Math.round(k).toString(8)},p:function(k,L){return h(k*100,L)},r:h,s:c,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function p(k){return k}var y=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(k){var L=k.grouping===void 0||k.thousands===void 0?p:n(y.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",P=k.currency===void 0?"":k.currency[1]+"",R=k.decimal===void 0?".":k.decimal+"",z=k.numerals===void 0?p:i(y.call(k.numerals,String)),H=k.percent===void 0?"%":k.percent+"",O=k.minus===void 0?"-":k.minus+"",U=k.nan===void 0?"NaN":k.nan+"";function V(I){I=o(I);var G=I.fill,Z=I.align,K=I.sign,re=I.symbol,se=I.zero,ce=I.width,le=I.comma,Q=I.precision,ge=I.trim,ue=I.type;ue==="n"?(le=!0,ue="g"):d[ue]||(Q===void 0&&(Q=12),ge=!0,ue="g"),(se||G==="0"&&Z==="=")&&(se=!0,G="0",Z="=");var ke=re==="$"?D:re==="#"&&/[boxX]/.test(ue)?"0"+ue.toLowerCase():"",ve=re==="$"?P:/[%p]/.test(ue)?H:"",be=d[ue],W=/[defgprs%]/.test(ue);Q=Q===void 0?6:/[gprs]/.test(ue)?Math.max(1,Math.min(21,Q)):Math.max(0,Math.min(20,Q));function te(X){var ye=ke,_e=ve,xe,Ie,ze;if(ue==="c")_e=be(X)+_e,X="";else{X=+X;var Re=X<0||1/X<0;if(X=isNaN(X)?U:be(Math.abs(X),Q),ge&&(X=u(X)),Re&&+X==0&&K!=="+"&&(Re=!1),ye=(Re?K==="("?K:O:K==="-"||K==="("?"":K)+ye,_e=(ue==="s"?m[8+f/3]:"")+_e+(Re&&K==="("?")":""),W){for(xe=-1,Ie=X.length;++xeze||ze>57){_e=(ze===46?R+X.slice(xe+1):X.slice(xe))+_e,X=X.slice(0,xe);break}}}le&&!se&&(X=L(X,1/0));var He=ye.length+X.length+_e.length,Be=He>1)+ye+X+_e+Be.slice(He);break;default:X=Be+ye+X+_e;break}return z(X)}return te.toString=function(){return I+""},te}function Y(I,G){var Z=V((I=o(I),I.type="f",I)),K=Math.max(-8,Math.min(8,Math.floor(a(G)/3)))*3,re=Math.pow(10,-K),se=m[8+K/3];return function(ce){return Z(re*ce)+se}}return{format:V,formatPrefix:Y}}var b;T({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function T(k){return b=_(k),e.format=b.format,e.formatPrefix=b.formatPrefix,b}function x(k){return Math.max(0,-a(Math.abs(k)))}function M(k,L){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(L)/3)))*3-a(Math.abs(k)))}function A(k,L){return k=Math.abs(k),L=Math.abs(L)-k,Math.max(0,a(L)-a(k))+1}e.FormatSpecifier=s,e.formatDefaultLocale=T,e.formatLocale=_,e.formatSpecifier=o,e.precisionFixed=x,e.precisionPrefix=M,e.precisionRound=A,Object.defineProperty(e,"__esModule",{value:!0})})});var K4=B((zpe,$4)=>{"use strict";$4.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var zr=B((Npe,Q4)=>{"use strict";var QW=K4();Q4.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&QW(t))return!1}else if(r!=="number")return!1;return e-e<1}});var wt=B((Fpe,j4)=>{"use strict";j4.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 ky=B((nh,e6)=>{(function(e,r){typeof nh=="object"&&typeof e6!="undefined"?r(nh):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(nh,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(o[s]&3)<<4|o[s+1]>>4],f+=r[(o[s+1]&15)<<2|o[s+2]>>6],f+=r[o[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(l){var o=l.length*.75,s=l.length,u,f=0,c,h,d,p;l[l.length-1]==="="&&(o--,l[l.length-2]==="="&&o--);var y=new ArrayBuffer(o),m=new Uint8Array(y);for(u=0;u>4,m[f++]=(h&15)<<4|d>>2,m[f++]=(d&3)<<6|p&63;return y};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var Pl=B((Ipe,r6)=>{"use strict";r6.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var gn=B(si=>{"use strict";var jW=ky().decode,eX=Pl(),qy=Array.isArray,rX=ArrayBuffer,tX=DataView;function t6(e){return rX.isView(e)&&!(e instanceof tX)}si.isTypedArray=t6;function ih(e){return qy(e)||t6(e)}si.isArrayOrTypedArray=ih;function aX(e){return!ih(e[0])}si.isArray1D=aX;si.ensureArray=function(e,r){return qy(e)||(e=[]),e.length=r,e};var ca={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};ca.uint8c=ca.u1c;ca.uint8=ca.u1;ca.int8=ca.i1;ca.uint16=ca.u2;ca.int16=ca.i2;ca.uint32=ca.u4;ca.int32=ca.i4;ca.float32=ca.f4;ca.float64=ca.f8;function Cy(e){return e.constructor===ArrayBuffer}si.isArrayBuffer=Cy;si.decodeTypedArraySpec=function(e){var r=[],t=nX(e),a=t.dtype,n=ca[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;Cy(l)||(l=jW(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,c=+o[0],h=i*c,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var n6=zr(),Sy=gn().isArrayOrTypedArray;s6.exports=function(r,t){if(n6(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o{"use strict";var vu=lh(),uX=/^\w*$/,fX=0,u6=1,oh=2,f6=3,Ho=4;c6.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,l,o,s={};t&&t.length?(o=vu(r,t),l=o.get()):l=r,t=t||"";var u={};if(l)for(i=0;i2)return s[d]=s[d]|oh,c.set(h,null);if(f){for(i=d;i{"use strict";var cX=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,vX=/^[^\.\[\]]+$/;h6.exports=function(e,r){for(;r;){var t=e.match(cX);if(t)e=t[1];else if(e.match(vX))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var sh=B((Gpe,p6)=>{"use strict";var hX=zr();p6.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return hX(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var g6=B((Upe,y6)=>{"use strict";var m6=gn().isArrayOrTypedArray,pc=Pl();y6.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(m6(n)&&m6(i)&&pc(n[0])){if(a==="customdata"||a==="ids")continue;for(var l=Math.min(n.length,i.length),o=0;o{"use strict";function dX(e,r){var t=e%r;return t<0?t+r:t}function pX(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}x6.exports={mod:dX,modHalf:pX}});var Rn=B((Wpe,uh)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,l=e.max,o=e.random;function s(W,te){if(W=W||"",te=te||{},W instanceof s)return W;if(!(this instanceof s))return new s(W,te);var X=u(W);this._originalInput=W,this._r=X.r,this._g=X.g,this._b=X.b,this._a=X.a,this._roundA=n(100*this._a)/100,this._format=te.format||X.format,this._gradientType=te.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=X.ok,this._tc_id=a++}s.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),te,X,ye,_e,xe,Ie;return te=W.r/255,X=W.g/255,ye=W.b/255,te<=.03928?_e=te/12.92:_e=e.pow((te+.055)/1.055,2.4),X<=.03928?xe=X/12.92:xe=e.pow((X+.055)/1.055,2.4),ye<=.03928?Ie=ye/12.92:Ie=e.pow((ye+.055)/1.055,2.4),.2126*_e+.7152*xe+.0722*Ie},setAlpha:function(W){return this._a=I(W),this._roundA=n(100*this._a)/100,this},toHsv:function(){var W=d(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=d(this._r,this._g,this._b),te=n(W.h*360),X=n(W.s*100),ye=n(W.v*100);return this._a==1?"hsv("+te+", "+X+"%, "+ye+"%)":"hsva("+te+", "+X+"%, "+ye+"%, "+this._roundA+")"},toHsl:function(){var W=c(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=c(this._r,this._g,this._b),te=n(W.h*360),X=n(W.s*100),ye=n(W.l*100);return this._a==1?"hsl("+te+", "+X+"%, "+ye+"%)":"hsla("+te+", "+X+"%, "+ye+"%, "+this._roundA+")"},toHex:function(W){return y(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return m(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(G(this._r,255)*100)+"%",g:n(G(this._g,255)*100)+"%",b:n(G(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(G(this._r,255)*100)+"%, "+n(G(this._g,255)*100)+"%, "+n(G(this._b,255)*100)+"%)":"rgba("+n(G(this._r,255)*100)+"%, "+n(G(this._g,255)*100)+"%, "+n(G(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:V[y(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var te="#"+_(this._r,this._g,this._b,this._a),X=te,ye=this._gradientType?"GradientType = 1, ":"";if(W){var _e=s(W);X="#"+_(_e._r,_e._g,_e._b,_e._a)}return"progid:DXImageTransform.Microsoft.gradient("+ye+"startColorstr="+te+",endColorstr="+X+")"},toString:function(W){var te=!!W;W=W||this._format;var X=!1,ye=this._a<1&&this._a>=0,_e=!te&&ye&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return _e?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(X=this.toRgbString()),W==="prgb"&&(X=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(X=this.toHexString()),W==="hex3"&&(X=this.toHexString(!0)),W==="hex4"&&(X=this.toHex8String(!0)),W==="hex8"&&(X=this.toHex8String()),W==="name"&&(X=this.toName()),W==="hsl"&&(X=this.toHslString()),W==="hsv"&&(X=this.toHsvString()),X||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(W,te){var X=W.apply(null,[this].concat([].slice.call(te)));return this._r=X._r,this._g=X._g,this._b=X._b,this.setAlpha(X._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(L,arguments)},_applyCombination:function(W,te){return W.apply(null,[this].concat([].slice.call(te)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},s.fromRatio=function(W,te){if(typeof W=="object"){var X={};for(var ye in W)W.hasOwnProperty(ye)&&(ye==="a"?X[ye]=W[ye]:X[ye]=le(W[ye]));W=X}return s(W,te)};function u(W){var te={r:0,g:0,b:0},X=1,ye=null,_e=null,xe=null,Ie=!1,ze=!1;return typeof W=="string"&&(W=ve(W)),typeof W=="object"&&(ke(W.r)&&ke(W.g)&&ke(W.b)?(te=f(W.r,W.g,W.b),Ie=!0,ze=String(W.r).substr(-1)==="%"?"prgb":"rgb"):ke(W.h)&&ke(W.s)&&ke(W.v)?(ye=le(W.s),_e=le(W.v),te=p(W.h,ye,_e),Ie=!0,ze="hsv"):ke(W.h)&&ke(W.s)&&ke(W.l)&&(ye=le(W.s),xe=le(W.l),te=h(W.h,ye,xe),Ie=!0,ze="hsl"),W.hasOwnProperty("a")&&(X=W.a)),X=I(X),{ok:Ie,format:W.format||ze,r:i(255,l(te.r,0)),g:i(255,l(te.g,0)),b:i(255,l(te.b,0)),a:X}}function f(W,te,X){return{r:G(W,255)*255,g:G(te,255)*255,b:G(X,255)*255}}function c(W,te,X){W=G(W,255),te=G(te,255),X=G(X,255);var ye=l(W,te,X),_e=i(W,te,X),xe,Ie,ze=(ye+_e)/2;if(ye==_e)xe=Ie=0;else{var Re=ye-_e;switch(Ie=ze>.5?Re/(2-ye-_e):Re/(ye+_e),ye){case W:xe=(te-X)/Re+(te1&&(Fe-=1),Fe<1/6?He+(Be-He)*6*Fe:Fe<1/2?Be:Fe<2/3?He+(Be-He)*(2/3-Fe)*6:He}if(te===0)ye=_e=xe=X;else{var ze=X<.5?X*(1+te):X+te-X*te,Re=2*X-ze;ye=Ie(Re,ze,W+1/3),_e=Ie(Re,ze,W),xe=Ie(Re,ze,W-1/3)}return{r:ye*255,g:_e*255,b:xe*255}}function d(W,te,X){W=G(W,255),te=G(te,255),X=G(X,255);var ye=l(W,te,X),_e=i(W,te,X),xe,Ie,ze=ye,Re=ye-_e;if(Ie=ye===0?0:Re/ye,ye==_e)xe=0;else{switch(ye){case W:xe=(te-X)/Re+(te>1)+720)%360;--te;)ye.h=(ye.h+_e)%360,xe.push(s(ye));return xe}function O(W,te){te=te||6;for(var X=s(W).toHsv(),ye=X.h,_e=X.s,xe=X.v,Ie=[],ze=1/te;te--;)Ie.push(s({h:ye,s:_e,v:xe})),xe=(xe+ze)%1;return Ie}s.mix=function(W,te,X){X=X===0?0:X||50;var ye=s(W).toRgb(),_e=s(te).toRgb(),xe=X/100,Ie={r:(_e.r-ye.r)*xe+ye.r,g:(_e.g-ye.g)*xe+ye.g,b:(_e.b-ye.b)*xe+ye.b,a:(_e.a-ye.a)*xe+ye.a};return s(Ie)},s.readability=function(W,te){var X=s(W),ye=s(te);return(e.max(X.getLuminance(),ye.getLuminance())+.05)/(e.min(X.getLuminance(),ye.getLuminance())+.05)},s.isReadable=function(W,te,X){var ye=s.readability(W,te),_e,xe;switch(xe=!1,_e=be(X),_e.level+_e.size){case"AAsmall":case"AAAlarge":xe=ye>=4.5;break;case"AAlarge":xe=ye>=3;break;case"AAAsmall":xe=ye>=7;break}return xe},s.mostReadable=function(W,te,X){var ye=null,_e=0,xe,Ie,ze,Re;X=X||{},Ie=X.includeFallbackColors,ze=X.level,Re=X.size;for(var He=0;He_e&&(_e=xe,ye=s(te[He]));return s.isReadable(W,ye,{level:ze,size:Re})||!Ie?ye:(X.includeFallbackColors=!1,s.mostReadable(W,["#fff","#000"],X))};var U=s.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"},V=s.hexNames=Y(U);function Y(W){var te={};for(var X in W)W.hasOwnProperty(X)&&(te[W[X]]=X);return te}function I(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function G(W,te){re(W)&&(W="100%");var X=se(W);return W=i(te,l(0,parseFloat(W))),X&&(W=parseInt(W*te,10)/100),e.abs(W-te)<1e-6?1:W%te/parseFloat(te)}function Z(W){return i(1,l(0,W))}function K(W){return parseInt(W,16)}function re(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function se(W){return typeof W=="string"&&W.indexOf("%")!=-1}function ce(W){return W.length==1?"0"+W:""+W}function le(W){return W<=1&&(W=W*100+"%"),W}function Q(W){return e.round(parseFloat(W)*255).toString(16)}function ge(W){return K(W)/255}var ue=function(){var W="[-\\+]?\\d+%?",te="[-\\+]?\\d*\\.\\d+%?",X="(?:"+te+")|(?:"+W+")",ye="[\\s|\\(]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")\\s*\\)?",_e="[\\s|\\(]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")\\s*\\)?";return{CSS_UNIT:new RegExp(X),rgb:new RegExp("rgb"+ye),rgba:new RegExp("rgba"+_e),hsl:new RegExp("hsl"+ye),hsla:new RegExp("hsla"+_e),hsv:new RegExp("hsv"+ye),hsva:new RegExp("hsva"+_e),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 ke(W){return!!ue.CSS_UNIT.exec(W)}function ve(W){W=W.replace(r,"").replace(t,"").toLowerCase();var te=!1;if(U[W])W=U[W],te=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var X;return(X=ue.rgb.exec(W))?{r:X[1],g:X[2],b:X[3]}:(X=ue.rgba.exec(W))?{r:X[1],g:X[2],b:X[3],a:X[4]}:(X=ue.hsl.exec(W))?{h:X[1],s:X[2],l:X[3]}:(X=ue.hsla.exec(W))?{h:X[1],s:X[2],l:X[3],a:X[4]}:(X=ue.hsv.exec(W))?{h:X[1],s:X[2],v:X[3]}:(X=ue.hsva.exec(W))?{h:X[1],s:X[2],v:X[3],a:X[4]}:(X=ue.hex8.exec(W))?{r:K(X[1]),g:K(X[2]),b:K(X[3]),a:ge(X[4]),format:te?"name":"hex8"}:(X=ue.hex6.exec(W))?{r:K(X[1]),g:K(X[2]),b:K(X[3]),format:te?"name":"hex"}:(X=ue.hex4.exec(W))?{r:K(X[1]+""+X[1]),g:K(X[2]+""+X[2]),b:K(X[3]+""+X[3]),a:ge(X[4]+""+X[4]),format:te?"name":"hex8"}:(X=ue.hex3.exec(W))?{r:K(X[1]+""+X[1]),g:K(X[2]+""+X[2]),b:K(X[3]+""+X[3]),format:te?"name":"hex"}:!1}function be(W){var te,X;return W=W||{level:"AA",size:"small"},te=(W.level||"AA").toUpperCase(),X=(W.size||"small").toLowerCase(),te!=="AA"&&te!=="AAA"&&(te="AA"),X!=="small"&&X!=="large"&&(X="small"),{level:te,size:X}}typeof uh!="undefined"&&uh.exports?uh.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var mt=B(gc=>{"use strict";var b6=Pl(),mc=Array.isArray;function mX(e,r){var t,a;for(t=0;t{"use strict";_6.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var xc=B((Jpe,w6)=>{"use strict";w6.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var du=B(($pe,A6)=>{"use strict";var T6=xc(),M6=jt(),Dy=M6({editType:"none"});Dy.family.dflt=T6.HOVERFONT;Dy.size.dflt=T6.HOVERFONTSIZE;A6.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:Dy,grouptitlefont:M6({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var bc=B((Kpe,k6)=>{"use strict";var yX=jt(),fh=du().hoverlabel,ch=mt().extendFlat;k6.exports={hoverlabel:{bgcolor:ch({},fh.bgcolor,{arrayOk:!0}),bordercolor:ch({},fh.bordercolor,{arrayOk:!0}),font:yX({arrayOk:!0,editType:"none"}),align:ch({},fh.align,{arrayOk:!0}),namelength:ch({},fh.namelength,{arrayOk:!0}),editType:"none"}}});var tn=B((Qpe,q6)=>{"use strict";var gX=jt(),xX=bc();q6.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:gX({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:xX.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 Oo=B((jpe,S6)=>{"use strict";var bX=Rn(),vh={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)"]]},C6=vh.RdBu;function _X(e,r){if(r||(r=C6),!e)return r;function t(){try{e=vh[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),L6(e)?e:r}function L6(e){var r=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 t=0;t{"use strict";Bo.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Bo.defaultLine="#444";Bo.lightLine="#eee";Bo.background="#fff";Bo.borderLine="#BEC8D9";Bo.lightFraction=100*10/11});var xr=B((rme,D6)=>{"use strict";var an=Rn(),TX=zr(),MX=gn().isTypedArray,ea=D6.exports={},hh=zn();ea.defaults=hh.defaults;var AX=ea.defaultLine=hh.defaultLine;ea.lightLine=hh.lightLine;var Py=ea.background=hh.background;ea.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};ea.rgb=function(e){return ea.tinyRGB(an(e))};ea.opacity=function(e){return e?an(e).getAlpha():0};ea.addOpacity=function(e,r){var t=an(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};ea.combine=function(e,r){var t=an(e).toRgb();if(t.a===1)return an(e).toRgbString();var a=an(r||Py).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return an(i).toRgbString()};ea.interpolate=function(e,r,t){var a=an(e).toRgb(),n=an(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return an(i).toRgbString()};ea.contrast=function(e,r,t){var a=an(e);a.getAlpha()!==1&&(a=an(ea.combine(e,Py)));var n=a.isDark()?r?a.lighten(r):Py:t?a.darken(t):AX;return n.toString()};ea.stroke=function(e,r){var t=an(r);e.style({stroke:ea.tinyRGB(t),"stroke-opacity":t.getAlpha()})};ea.fill=function(e,r){var t=an(r);e.style({fill:ea.tinyRGB(t),"fill-opacity":t.getAlpha()})};ea.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var l=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+l+", "+a[3]+")":"rgb("+l+")"}});var pu=B((tme,E6)=>{"use strict";E6.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var mu=B(P6=>{"use strict";P6.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var F6=B(nn=>{"use strict";var Ry=zr(),R6=Rn(),z6=mt().extendFlat,kX=tn(),qX=Oo(),CX=xr(),LX=pu().DESELECTDIM,yu=lh(),N6=mu().counter,SX=hu().modHalf,Ni=gn().isArrayOrTypedArray,Rl=gn().isTypedArraySpec,zl=gn().decodeTypedArraySpec;nn.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(Ni(e)?e:Rl(e)?zl(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}Rl(e)&&(e=zl(e)),e%1||!Ry(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Rl(e)&&(e=zl(e)),R6(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return R6(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(qX.get(e,t))}},angle:{coerceFunction:function(e,r,t){Rl(e)&&(e=zl(e)),e==="auto"?r.set("auto"):Ry(e)?r.set(SX(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||N6(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!N6(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var I6={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/"},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:{}}},H6={};function O6(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),O6(a,r[t]))}}O6(I6,H6);B6.exports={configAttributes:I6,dfltConfig:H6}});var Ny=B((lme,Y6)=>{"use strict";var zy=kr(),DX=zr(),_c=[];Y6.exports=function(e,r){if(_c.indexOf(e)!==-1)return;_c.push(e);var t=1e3;DX(r)?t=r:r==="long"&&(t=3e3);var a=zy.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(_c);function i(l){l.duration(700).style("opacity",0).each("end",function(o){var s=_c.indexOf(o);s!==-1&&_c.splice(s,1),zy.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var o=zy.select(this);o.append("button").classed("notifier-close",!0).html("×").on("click",function(){o.transition().call(i)});for(var s=o.append("p"),u=l.split(//g),f=0;f{"use strict";var gu=Yo().dfltConfig,Fy=Ny(),Iy=G6.exports={};Iy.log=function(){var e;if(gu.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};Iy.warn=function(){var e;if(gu.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};Iy.error=function(){var e;if(gu.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var ph=B((sme,U6)=>{"use strict";U6.exports=function(){}});var Hy=B((ume,V6)=>{"use strict";V6.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{W6.exports=EX;function EX(){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 J6=B((cme,Z6)=>{Z6.exports=PX;function PX(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var K6=B((vme,$6)=>{$6.exports=RX;function RX(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var Oy=B((hme,Q6)=>{Q6.exports=zX;function zX(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 e7=B((dme,j6)=>{j6.exports=NX;function NX(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],l=r[7],o=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=l,e[14]=o}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var t7=B((pme,r7)=>{r7.exports=FX;function FX(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],y=r[13],m=r[14],_=r[15],b=t*o-a*l,T=t*s-n*l,x=t*u-i*l,M=a*s-n*o,A=a*u-i*o,k=n*u-i*s,L=f*y-c*p,D=f*m-h*p,P=f*_-d*p,R=c*m-h*y,z=c*_-d*y,H=h*_-d*m,O=b*H-T*z+x*R+M*P-A*D+k*L;return O?(O=1/O,e[0]=(o*H-s*z+u*R)*O,e[1]=(n*z-a*H-i*R)*O,e[2]=(y*k-m*A+_*M)*O,e[3]=(h*A-c*k-d*M)*O,e[4]=(s*P-l*H-u*D)*O,e[5]=(t*H-n*P+i*D)*O,e[6]=(m*x-p*k-_*T)*O,e[7]=(f*k-h*x+d*T)*O,e[8]=(l*z-o*P+u*L)*O,e[9]=(a*P-t*z-i*L)*O,e[10]=(p*A-y*x+_*b)*O,e[11]=(c*x-f*A-d*b)*O,e[12]=(o*D-l*R-s*L)*O,e[13]=(t*R-a*D+n*L)*O,e[14]=(y*T-p*M-m*b)*O,e[15]=(f*M-c*T+h*b)*O,e):null}});var n7=B((mme,a7)=>{a7.exports=IX;function IX(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],y=r[13],m=r[14],_=r[15];return e[0]=o*(h*_-d*m)-c*(s*_-u*m)+y*(s*d-u*h),e[1]=-(a*(h*_-d*m)-c*(n*_-i*m)+y*(n*d-i*h)),e[2]=a*(s*_-u*m)-o*(n*_-i*m)+y*(n*u-i*s),e[3]=-(a*(s*d-u*h)-o*(n*d-i*h)+c*(n*u-i*s)),e[4]=-(l*(h*_-d*m)-f*(s*_-u*m)+p*(s*d-u*h)),e[5]=t*(h*_-d*m)-f*(n*_-i*m)+p*(n*d-i*h),e[6]=-(t*(s*_-u*m)-l*(n*_-i*m)+p*(n*u-i*s)),e[7]=t*(s*d-u*h)-l*(n*d-i*h)+f*(n*u-i*s),e[8]=l*(c*_-d*y)-f*(o*_-u*y)+p*(o*d-u*c),e[9]=-(t*(c*_-d*y)-f*(a*_-i*y)+p*(a*d-i*c)),e[10]=t*(o*_-u*y)-l*(a*_-i*y)+p*(a*u-i*o),e[11]=-(t*(o*d-u*c)-l*(a*d-i*c)+f*(a*u-i*o)),e[12]=-(l*(c*m-h*y)-f*(o*m-s*y)+p*(o*h-s*c)),e[13]=t*(c*m-h*y)-f*(a*m-n*y)+p*(a*h-n*c),e[14]=-(t*(o*m-s*y)-l*(a*m-n*y)+p*(a*s-n*o)),e[15]=t*(o*h-s*c)-l*(a*h-n*c)+f*(a*s-n*o),e}});var l7=B((yme,i7)=>{i7.exports=HX;function HX(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],l=e[5],o=e[6],s=e[7],u=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],y=e[14],m=e[15],_=r*l-t*i,b=r*o-a*i,T=r*s-n*i,x=t*o-a*l,M=t*s-n*l,A=a*s-n*o,k=u*p-f*d,L=u*y-c*d,D=u*m-h*d,P=f*y-c*p,R=f*m-h*p,z=c*m-h*y;return _*z-b*R+T*P+x*D-M*L+A*k}});var s7=B((gme,o7)=>{o7.exports=OX;function OX(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=r[4],s=r[5],u=r[6],f=r[7],c=r[8],h=r[9],d=r[10],p=r[11],y=r[12],m=r[13],_=r[14],b=r[15],T=t[0],x=t[1],M=t[2],A=t[3];return e[0]=T*a+x*o+M*c+A*y,e[1]=T*n+x*s+M*h+A*m,e[2]=T*i+x*u+M*d+A*_,e[3]=T*l+x*f+M*p+A*b,T=t[4],x=t[5],M=t[6],A=t[7],e[4]=T*a+x*o+M*c+A*y,e[5]=T*n+x*s+M*h+A*m,e[6]=T*i+x*u+M*d+A*_,e[7]=T*l+x*f+M*p+A*b,T=t[8],x=t[9],M=t[10],A=t[11],e[8]=T*a+x*o+M*c+A*y,e[9]=T*n+x*s+M*h+A*m,e[10]=T*i+x*u+M*d+A*_,e[11]=T*l+x*f+M*p+A*b,T=t[12],x=t[13],M=t[14],A=t[15],e[12]=T*a+x*o+M*c+A*y,e[13]=T*n+x*s+M*h+A*m,e[14]=T*i+x*u+M*d+A*_,e[15]=T*l+x*f+M*p+A*b,e}});var f7=B((xme,u7)=>{u7.exports=BX;function BX(e,r,t){var a=t[0],n=t[1],i=t[2],l,o,s,u,f,c,h,d,p,y,m,_;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(l=r[0],o=r[1],s=r[2],u=r[3],f=r[4],c=r[5],h=r[6],d=r[7],p=r[8],y=r[9],m=r[10],_=r[11],e[0]=l,e[1]=o,e[2]=s,e[3]=u,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=y,e[10]=m,e[11]=_,e[12]=l*a+f*n+p*i+r[12],e[13]=o*a+c*n+y*i+r[13],e[14]=s*a+h*n+m*i+r[14],e[15]=u*a+d*n+_*i+r[15]),e}});var v7=B((bme,c7)=>{c7.exports=YX;function YX(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var d7=B((_me,h7)=>{h7.exports=GX;function GX(e,r,t,a){var n=a[0],i=a[1],l=a[2],o=Math.sqrt(n*n+i*i+l*l),s,u,f,c,h,d,p,y,m,_,b,T,x,M,A,k,L,D,P,R,z,H,O,U;return Math.abs(o)<1e-6?null:(o=1/o,n*=o,i*=o,l*=o,s=Math.sin(t),u=Math.cos(t),f=1-u,c=r[0],h=r[1],d=r[2],p=r[3],y=r[4],m=r[5],_=r[6],b=r[7],T=r[8],x=r[9],M=r[10],A=r[11],k=n*n*f+u,L=i*n*f+l*s,D=l*n*f-i*s,P=n*i*f-l*s,R=i*i*f+u,z=l*i*f+n*s,H=n*l*f+i*s,O=i*l*f-n*s,U=l*l*f+u,e[0]=c*k+y*L+T*D,e[1]=h*k+m*L+x*D,e[2]=d*k+_*L+M*D,e[3]=p*k+b*L+A*D,e[4]=c*P+y*R+T*z,e[5]=h*P+m*R+x*z,e[6]=d*P+_*R+M*z,e[7]=p*P+b*R+A*z,e[8]=c*H+y*O+T*U,e[9]=h*H+m*O+x*U,e[10]=d*H+_*O+M*U,e[11]=p*H+b*O+A*U,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var m7=B((wme,p7)=>{p7.exports=UX;function UX(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],l=r[5],o=r[6],s=r[7],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=l*n+f*a,e[6]=o*n+c*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=f*n-l*a,e[10]=c*n-o*a,e[11]=h*n-s*a,e}});var g7=B((Tme,y7)=>{y7.exports=VX;function VX(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=l*n-f*a,e[2]=o*n-c*a,e[3]=s*n-h*a,e[8]=i*a+u*n,e[9]=l*a+f*n,e[10]=o*a+c*n,e[11]=s*a+h*n,e}});var b7=B((Mme,x7)=>{x7.exports=WX;function WX(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[4],f=r[5],c=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=l*n+f*a,e[2]=o*n+c*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=f*n-l*a,e[6]=c*n-o*a,e[7]=h*n-s*a,e}});var w7=B((Ame,_7)=>{_7.exports=XX;function XX(e,r,t){var a,n,i,l=t[0],o=t[1],s=t[2],u=Math.sqrt(l*l+o*o+s*s);return Math.abs(u)<1e-6?null:(u=1/u,l*=u,o*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=l*l*i+n,e[1]=o*l*i+s*a,e[2]=s*l*i-o*a,e[3]=0,e[4]=l*o*i-s*a,e[5]=o*o*i+n,e[6]=s*o*i+l*a,e[7]=0,e[8]=l*s*i+o*a,e[9]=o*s*i-l*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var M7=B((kme,T7)=>{T7.exports=ZX;function ZX(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=a+a,s=n+n,u=i+i,f=a*o,c=a*s,h=a*u,d=n*s,p=n*u,y=i*u,m=l*o,_=l*s,b=l*u;return e[0]=1-(d+y),e[1]=c+b,e[2]=h-_,e[3]=0,e[4]=c-b,e[5]=1-(f+y),e[6]=p+m,e[7]=0,e[8]=h+_,e[9]=p-m,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var k7=B((qme,A7)=>{A7.exports=JX;function JX(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var C7=B((Cme,q7)=>{q7.exports=$X;function $X(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var S7=B((Lme,L7)=>{L7.exports=KX;function KX(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var E7=B((Sme,D7)=>{D7.exports=QX;function QX(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var R7=B((Dme,P7)=>{P7.exports=jX;function jX(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 By=B((Eme,z7)=>{z7.exports=eZ;function eZ(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=t+t,o=a+a,s=n+n,u=t*l,f=a*l,c=a*o,h=n*l,d=n*o,p=n*s,y=i*l,m=i*o,_=i*s;return e[0]=1-c-p,e[1]=f+_,e[2]=h-m,e[3]=0,e[4]=f-_,e[5]=1-u-p,e[6]=d+y,e[7]=0,e[8]=h+m,e[9]=d-y,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var F7=B((Pme,N7)=>{N7.exports=rZ;function rZ(e,r,t,a,n,i,l){var o=1/(t-r),s=1/(n-a),u=1/(i-l);return e[0]=i*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*o,e[9]=(n+a)*s,e[10]=(l+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*i*2*u,e[15]=0,e}});var H7=B((Rme,I7)=>{I7.exports=tZ;function tZ(e,r,t,a,n){var i=1/Math.tan(r/2),l=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*l,e[15]=0,e}});var B7=B((zme,O7)=>{O7.exports=aZ;function aZ(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),l=Math.tan(r.leftDegrees*Math.PI/180),o=Math.tan(r.rightDegrees*Math.PI/180),s=2/(l+o),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((l-o)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var G7=B((Nme,Y7)=>{Y7.exports=nZ;function nZ(e,r,t,a,n,i,l){var o=1/(r-t),s=1/(a-n),u=1/(i-l);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*s,e[14]=(l+i)*u,e[15]=1,e}});var V7=B((Fme,U7)=>{var iZ=Oy();U7.exports=lZ;function lZ(e,r,t,a){var n,i,l,o,s,u,f,c,h,d,p=r[0],y=r[1],m=r[2],_=a[0],b=a[1],T=a[2],x=t[0],M=t[1],A=t[2];return Math.abs(p-x)<1e-6&&Math.abs(y-M)<1e-6&&Math.abs(m-A)<1e-6?iZ(e):(f=p-x,c=y-M,h=m-A,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,n=b*h-T*c,i=T*f-_*h,l=_*c-b*f,d=Math.sqrt(n*n+i*i+l*l),d?(d=1/d,n*=d,i*=d,l*=d):(n=0,i=0,l=0),o=c*l-h*i,s=h*n-f*l,u=f*i-c*n,d=Math.sqrt(o*o+s*s+u*u),d?(d=1/d,o*=d,s*=d,u*=d):(o=0,s=0,u=0),e[0]=n,e[1]=o,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+i*y+l*m),e[13]=-(o*p+s*y+u*m),e[14]=-(f*p+c*y+h*m),e[15]=1,e)}});var X7=B((Ime,W7)=>{W7.exports=oZ;function oZ(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 Yy=B((Hme,Z7)=>{Z7.exports={create:X6(),clone:J6(),copy:K6(),identity:Oy(),transpose:e7(),invert:t7(),adjoint:n7(),determinant:l7(),multiply:s7(),translate:f7(),scale:v7(),rotate:d7(),rotateX:m7(),rotateY:g7(),rotateZ:b7(),fromRotation:w7(),fromRotationTranslation:M7(),fromScaling:k7(),fromTranslation:C7(),fromXRotation:S7(),fromYRotation:E7(),fromZRotation:R7(),fromQuat:By(),frustum:F7(),perspective:H7(),perspectiveFromFieldOfView:B7(),ortho:G7(),lookAt:V7(),str:X7()}});var mh=B(It=>{"use strict";var sZ=Yy();It.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var uZ=kr(),J7=Go(),fZ=mh(),cZ=Yy();function vZ(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function hZ(e){var r=uZ.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function $7(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function dZ(e,r){K7("global",e,r)}function K7(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):J7.warn("addStyleRule failed"):J7.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function pZ(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&$7(t)}function mZ(e,r,t,a,n){var i=a.split(":"),l=n.split(":"),o="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(o)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[l[0]]=l[1])}),s.setAttribute(o,!0))})}function yZ(e){var r=j7(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=Q7(a);if(n){var i=fZ.convertCssMatrix(n);t=cZ.multiply(t,t,i)}}),t}function Q7(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function j7(e){for(var r=[];gZ(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function gZ(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function xZ(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}ew.exports={getGraphDiv:vZ,isPlotDiv:hZ,removeElement:$7,addStyleRule:dZ,addRelatedStyleRule:K7,deleteRelatedStyleRule:pZ,setStyleOnHover:mZ,getFullTransformMatrix:yZ,getElementTransformMatrix:Q7,getElementAndAncestors:j7,equalDomRects:xZ}});var Tc=B((Yme,rw)=>{"use strict";rw.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 ui=B((Gme,sw)=>{"use strict";var aw=mt().extendFlat,bZ=Pl(),nw={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},iw={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},_Z=nw.flags.slice().concat(["fullReplot"]),wZ=iw.flags.slice().concat("layoutReplot");sw.exports={traces:nw,layout:iw,traceFlags:function(){return tw(_Z)},layoutFlags:function(){return tw(wZ)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";Gy.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Gy.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 Uy=B((Vme,uw)=>{"use strict";uw.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 _a=B(yh=>{"use strict";var fw=Uy(),Wme=fw.FORMAT_LINK,Xme=fw.DATE_FORMAT_LINK;function Vy(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function Nl(e,r){return r?r.d2l(e):e}function cw(e,r){return r?r.l2d(e):e}function TZ(e){return e.x0}function MZ(e){return e.x1}function AZ(e){return e.y0}function kZ(e){return e.y1}function vw(e){return e.x0shift||0}function hw(e){return e.x1shift||0}function dw(e){return e.y0shift||0}function pw(e){return e.y1shift||0}function gh(e,r){return Nl(e.x1,r)+hw(e)-Nl(e.x0,r)-vw(e)}function xh(e,r,t){return Nl(e.y1,t)+pw(e)-Nl(e.y0,t)-dw(e)}function qZ(e,r){return Math.abs(gh(e,r))}function CZ(e,r,t){return Math.abs(xh(e,r,t))}function LZ(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(gh(e,r),2)+Math.pow(xh(e,r,t),2))}function SZ(e,r){return cw((Nl(e.x1,r)+hw(e)+Nl(e.x0,r)+vw(e))/2,r)}function DZ(e,r,t){return cw((Nl(e.y1,t)+pw(e)+Nl(e.y0,t)+dw(e))/2,t)}function EZ(e,r,t){return e.type!=="line"?void 0:xh(e,r,t)/gh(e,r)}mw.exports={x0:TZ,x1:MZ,y0:AZ,y1:kZ,slope:EZ,dx:gh,dy:xh,width:qZ,height:CZ,length:LZ,xcenter:SZ,ycenter:DZ}});var xw=B(($me,gw)=>{"use strict";var PZ=ui().overrideAll,Uo=tn(),yw=jt(),RZ=fi().dash,Fl=mt().extendFlat,zZ=_a().shapeTexttemplateAttrs,NZ=bh();gw.exports=PZ({newshape:{visible:Fl({},Uo.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Fl({},Uo.legend,{}),legendgroup:Fl({},Uo.legendgroup,{}),legendgrouptitle:{text:Fl({},Uo.legendgrouptitle.text,{}),font:yw({})},legendrank:Fl({},Uo.legendrank,{}),legendwidth:Fl({},Uo.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Fl({},RZ,{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:Fl({},Uo.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:zZ({newshape:!0},{keys:Object.keys(NZ)}),font:yw({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var _w=B((Kme,bw)=>{"use strict";var FZ=fi().dash,IZ=mt().extendFlat;bw.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:IZ({},FZ,{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 _h=B((Qme,ww)=>{"use strict";ww.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var xu=B((jme,kw)=>{"use strict";var Wy=jt(),HZ=Tc(),wh=zn(),Tw=xw(),Mw=_w(),OZ=_h(),Aw=mt().extendFlat,Th=Wy({editType:"calc"});Th.family.dflt='"Open Sans", verdana, arial, sans-serif';Th.size.dflt=12;Th.color.dflt=wh.defaultLine;kw.exports={font:Th,title:{text:{valType:"string",editType:"layoutstyle"},font:Wy({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Wy({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:Aw(OZ({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:wh.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:wh.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:wh.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:Tw.newshape,activeshape:Tw.activeshape,newselection:Mw.newselection,activeselection:Mw.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Aw({},HZ.transition,{editType:"none"})}});var qw=nt(()=>{});var BZ={};var Cw=nt(()=>{qw()});var yr=B(Fr=>{"use strict";var bu=Go(),Lw=ph(),Sw=Hy(),YZ=Pl(),GZ=wc().addStyleRule,Dw=mt(),UZ=tn(),VZ=xu(),WZ=Dw.extendFlat,Xy=Dw.extendDeepAll;Fr.modules={};Fr.allCategories={};Fr.allTypes=[];Fr.subplotsRegistry={};Fr.componentsRegistry={};Fr.layoutArrayContainers=[];Fr.layoutArrayRegexes=[];Fr.traceLayoutAttributes={};Fr.localeRegistry={};Fr.apiMethodRegistry={};Fr.collectableSubplotTypes=null;Fr.register=function(r){if(Fr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var QZ=cu().timeFormat,Yw=zr(),Zy=Go(),Hl=hu().mod,Tu=wt(),Nn=Tu.BADNUM,ln=Tu.ONEDAY,Mc=Tu.ONEHOUR,Il=Tu.ONEMIN,wu=Tu.ONESEC,Ac=Tu.EPOCHJD,il=yr(),Nw=cu().utcFormat,jZ=/^\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,eJ=/^\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,Fw=new Date().getFullYear()-70;function ll(e){return e&&il.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Ht.dateTick0=function(e,r){var t=rJ(e,!!r);if(r<2)return t;var a=Ht.dateTime2ms(t,e);return a+=ln*(r-1),Ht.ms2DateTime(a,0,e)};function rJ(e,r){return ll(e)?r?il.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:il.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Ht.dfltRange=function(e){return ll(e)?il.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Ht.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Ah,kh;Ht.dateTime2ms=function(e,r){if(Ht.isJSDate(e)){var t=e.getTimezoneOffset()*Il,a=(e.getUTCMinutes()-e.getMinutes())*Il+(e.getUTCSeconds()-e.getSeconds())*wu+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*Il;t=t-n/2+Hl(a-t+n/2,n)}return e=Number(e)-t,e>=Ah&&e<=kh?e:Nn}if(typeof e!="string"&&typeof e!="number")return Nn;e=String(e);var i=ll(r),l=e.charAt(0);i&&(l==="G"||l==="g")&&(e=e.substr(1),r="");var o=i&&r.substr(0,7)==="chinese",s=e.match(o?eJ:jZ);if(!s)return Nn;var u=s[1],f=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),p=Number(s[11]||0);if(i){if(u.length===2)return Nn;u=Number(u);var y;try{var m=il.getComponentMethod("calendars","getCal")(r);if(o){var _=f.charAt(f.length-1)==="i";f=parseInt(f,10),y=m.newDate(u,m.toMonthIndex(u,f,_),c)}else y=m.newDate(u,Number(f),c)}catch(T){return Nn}return y?(y.toJD()-Ac)*ln+h*Mc+d*Il+p*wu:Nn}u.length===2?u=(Number(u)+2e3-Fw)%100+Fw:u=Number(u),f-=1;var b=new Date(Date.UTC(2e3,f,c,h,d));return b.setUTCFullYear(u),b.getUTCMonth()!==f||b.getUTCDate()!==c?Nn:b.getTime()+p*wu};Ah=Ht.MIN_MS=Ht.dateTime2ms("-9999");kh=Ht.MAX_MS=Ht.dateTime2ms("9999-12-31 23:59:59.9999");Ht.isDateTime=function(e,r){return Ht.dateTime2ms(e,r)!==Nn};function _u(e,r){return String(e+Math.pow(10,r)).substr(1)}var Mh=90*ln,Iw=3*Mc,Hw=5*Il;Ht.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Ah&&e<=kh))return Nn;r||(r=0);var a=Math.floor(Hl(e+.05,1)*10),n=Math.round(e-a/10),i,l,o,s,u,f;if(ll(t)){var c=Math.floor(n/ln)+Ac,h=Math.floor(Hl(e,ln));try{i=il.getComponentMethod("calendars","getCal")(t).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){i=Nw("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;l=r=Ah+ln&&e<=kh-ln))return Nn;var r=Math.floor(Hl(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=QZ("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),l=t.getSeconds(),o=t.getUTCMilliseconds()*10+r;return Gw(a,n,i,l,o)};function Gw(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+_u(r,2)+":"+_u(t,2),(a||n)&&(e+=":"+_u(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+_u(n,i)}return e}Ht.cleanDate=function(e,r,t){if(e===Nn)return r;if(Ht.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(ll(t))return Zy.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Ht.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Ht.isDateTime(e,t))return Zy.error("unrecognized date",e),r;return e};var tJ=/%\d?f/g,aJ=/%h/g,nJ={1:"1",2:"1",3:"2",4:"2"};function Ow(e,r,t,a){e=e.replace(tJ,function(i){var l=Math.min(+i.charAt(1)||6,6),o=(r/1e3%1+2).toFixed(l).substr(2).replace(/0+$/,"")||"0";return o});var n=new Date(Math.floor(r+.05));if(e=e.replace(aJ,function(){return nJ[t("%q")(n)]}),ll(a))try{e=il.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var iJ=[59,59.9,59.99,59.999,59.9999];function lJ(e,r){var t=Hl(e+.05,ln),a=_u(Math.floor(t/Mc),2)+":"+_u(Hl(Math.floor(t/Il),60),2);if(r!=="M"){Yw(r)||(r=0);var n=Math.min(Hl(e/wu,60),iJ[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}Ht.formatDate=function(e,r,t,a,n,i){if(n=ll(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` +`)},C.formatRows=function(J){return J.map(P).join(` +`)};function P(J){return J.map(F).join(v)}function F(J){return w.test(J)?'"'+J.replace(/\"/g,'""')+'"':J}return C},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var L0,S0,D0,E0,L_=this[Y(this,"requestAnimationFrame")]||function(v){setTimeout(v,17)};e.timer=function(){P0.apply(this,arguments)};function P0(v,g,w){var q=arguments.length;q<2&&(g=0),q<3&&(w=Date.now());var C=w+g,S={c:v,t:C,n:null};return S0?S0.n=S:L0=S,S0=S,D0||(E0=clearTimeout(E0),D0=1,L_(Zm)),S}function Zm(){var v=S_(),g=D_()-v;g>24?(isFinite(g)&&(clearTimeout(E0),E0=setTimeout(Zm,g)),D0=0):(D0=1,L_(Zm))}e.timer.flush=function(){S_(),D_()};function S_(){for(var v=Date.now(),g=L0;g;)v>=g.t&&g.c(v-g.t)&&(g.c=null),g=g.n;return v}function D_(){for(var v,g=L0,w=1/0;g;)g.c?(g.t=0;--P)ae.push(C[J[j[P]][2]]);for(P=+me;P1&&Wr(v[w[q-2]],v[w[q-1]],v[C])<=0;)--q;w[q++]=C}return w.slice(0,q)}function JU(v,g){return v[0]-g[0]||v[1]-g[1]}e.geom.polygon=function(v){return Q(v,R0),v};var R0=e.geom.polygon.prototype=[];R0.area=function(){for(var v=-1,g=this.length,w,q=this[g-1],C=0;++vfe)P=P.L;else if(N=g-jU(P,w),N>fe){if(!P.R){q=P;break}P=P.R}else{S>-fe?(q=P.P,C=P):N>-fe?(q=P,C=P.N):q=C=P;break}var F=N_(v);if(lu.insert(q,F),!(!q&&!C)){if(q===C){su(q),C=N_(q.site),lu.insert(F,C),F.edge=C.edge=sc(q.site,F.site),ou(q),ou(C);return}if(!C){F.edge=sc(q.site,F.site);return}su(q),su(C);var J=q.site,$=J.x,j=J.y,ee=v.x-$,me=v.y-j,Te=C.site,ae=Te.x-$,oe=Te.y-j,he=2*(ee*oe-me*ae),we=ee*ee+me*me,Me=ae*ae+oe*oe,pe={x:(oe*we-me*Me)/he+$,y:(ee*Me-ae*we)/he+j};z0(C.edge,J,Te,pe),F.edge=sc(J,v,null,pe),C.edge=sc(v,Te,null,pe),ou(q),ou(C)}}function F_(v,g){var w=v.site,q=w.x,C=w.y,S=C-g;if(!S)return q;var N=v.P;if(!N)return-1/0;w=N.site;var P=w.x,F=w.y,J=F-g;if(!J)return P;var $=P-q,j=1/S-1/J,ee=$/J;return j?(-ee+Math.sqrt(ee*ee-2*j*($*$/(-2*J)-F+J/2+C-S/2)))/j+q:(q+P)/2}function jU(v,g){var w=v.N;if(w)return F_(w,g);var q=v.site;return q.y===g?q.x:1/0}function I_(v){this.site=v,this.edges=[]}I_.prototype.prepare=function(){for(var v=this.edges,g=v.length,w;g--;)w=v[g].edge,(!w.b||!w.a)&&v.splice(g,1);return v.sort(H_),v.length};function eV(v){for(var g=v[0][0],w=v[1][0],q=v[0][1],C=v[1][1],S,N,P,F,J=Ro,$=J.length,j,ee,me,Te,ae,oe;$--;)if(j=J[$],!(!j||!j.prepare()))for(me=j.edges,Te=me.length,ee=0;eefe||_(F-N)>fe)&&(me.splice(ee,0,new N0(iV(j.site,oe,_(P-g)fe?{x:g,y:_(S-g)fe?{x:_(N-C)fe?{x:w,y:_(S-w)fe?{x:_(N-q)=-Se)){var ee=F*F+J*J,me=$*$+oe*oe,Te=(oe*ee-J*me)/j,ae=(F*me-$*ee)/j,oe=ae+P,he=z_.pop()||new rV;he.arc=v,he.site=C,he.x=Te+N,he.y=oe+Math.sqrt(Te*Te+ae*ae),he.cy=oe,v.circle=he;for(var we=null,Me=oc._;Me;)if(he.y0)){if(ae/=me,me<0){if(ae0){if(ae>ee)return;ae>j&&(j=ae)}if(ae=w-P,!(!me&&ae<0)){if(ae/=me,me<0){if(ae>ee)return;ae>j&&(j=ae)}else if(me>0){if(ae0)){if(ae/=Te,Te<0){if(ae0){if(ae>ee)return;ae>j&&(j=ae)}if(ae=q-F,!(!Te&&ae<0)){if(ae/=Te,Te<0){if(ae>ee)return;ae>j&&(j=ae)}else if(Te>0){if(ae0&&(C.a={x:P+j*me,y:F+j*Te}),ee<1&&(C.b={x:P+ee*me,y:F+ee*Te}),C}}}}}}function aV(v){for(var g=iu,w=tV(v[0][0],v[0][1],v[1][0],v[1][1]),q=g.length,C;q--;)C=g[q],(!nV(C,v)||!w(C)||_(C.a.x-C.b.x)=S)return;if($>ee){if(!q)q={x:Te,y:N};else if(q.y>=P)return;w={x:Te,y:P}}else{if(!q)q={x:Te,y:P};else if(q.y1)if($>ee){if(!q)q={x:(N-he)/oe,y:N};else if(q.y>=P)return;w={x:(P-he)/oe,y:P}}else{if(!q)q={x:(P-he)/oe,y:P};else if(q.y=S)return;w={x:S,y:oe*S+he}}else{if(!q)q={x:S,y:oe*S+he};else if(q.x=$&&he.x<=ee&&he.y>=j&&he.y<=me?[[$,me],[ee,me],[ee,j],[$,j]]:[];we.point=F[ae]}),J}function P(F){return F.map(function(J,$){return{x:Math.round(q(J,$)/fe)*fe,y:Math.round(C(J,$)/fe)*fe,i:$}})}return N.links=function(F){return ey(P(F)).edges.filter(function(J){return J.l&&J.r}).map(function(J){return{source:F[J.l.i],target:F[J.r.i]}})},N.triangles=function(F){var J=[];return ey(P(F)).cells.forEach(function($,j){for(var ee=$.site,me=$.edges.sort(H_),Te=-1,ae=me.length,oe,he,we=me[ae-1].edge,Me=we.l===ee?we.r:we.l;++TeMe&&(Me=$.x),$.y>pe&&(pe=$.y),me.push($.x),Te.push($.y);else for(ae=0;aeMe&&(Me=Ue),rr>pe&&(pe=rr),me.push(Ue),Te.push(rr)}var or=Me-he,ar=pe-we;or>ar?pe=we+or:Me=he+ar;function hr(pr,Mr,Kr,Ft,at,er,Dr,Er){if(!(isNaN(Kr)||isNaN(Ft)))if(pr.leaf){var Qr=pr.x,kt=pr.y;if(Qr!=null)if(_(Qr-Kr)+_(kt-Ft)<.01)dr(pr,Mr,Kr,Ft,at,er,Dr,Er);else{var Xt=pr.point;pr.x=pr.y=pr.point=null,dr(pr,Xt,Qr,kt,at,er,Dr,Er),dr(pr,Mr,Kr,Ft,at,er,Dr,Er)}else pr.x=Kr,pr.y=Ft,pr.point=Mr}else dr(pr,Mr,Kr,Ft,at,er,Dr,Er)}function dr(pr,Mr,Kr,Ft,at,er,Dr,Er){var Qr=(at+Dr)*.5,kt=(er+Er)*.5,Xt=Kr>=Qr,xa=Ft>=kt,Ha=xa<<1|Xt;pr.leaf=!1,pr=pr.nodes[Ha]||(pr.nodes[Ha]=Y_()),Xt?at=Qr:Dr=Qr,xa?er=kt:Er=kt,hr(pr,Mr,Kr,Ft,at,er,Dr,Er)}var Sr=Y_();if(Sr.add=function(pr){hr(Sr,pr,+j(pr,++ae),+ee(pr,ae),he,we,Me,pe)},Sr.visit=function(pr){cc(pr,Sr,he,we,Me,pe)},Sr.find=function(pr){return fV(Sr,pr[0],pr[1],he,we,Me,pe)},ae=-1,g==null){for(;++aeS||ee>N||me=Ue,ar=w>=rr,hr=ar<<1|or,dr=hr+4;hrw&&(S=g.slice(w,S),P[N]?P[N]+=S:P[++N]=S),(q=q[0])===(C=C[0])?P[N]?P[N]+=C:P[++N]=C:(P[++N]=null,F.push({i:N,x:nl(q,C)})),w=ay.lastIndex;return w=0&&!(q=e.interpolators[w](v,g)););return q}e.interpolators=[function(v,g){var w=typeof g;return(w==="string"?ga.has(g.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(g)?ry:U_:g instanceof Lt?ry:Array.isArray(g)?H0:w==="object"&&isNaN(g)?G_:nl)(v,g)}],e.interpolateArray=H0;function H0(v,g){var w=[],q=[],C=v.length,S=g.length,N=Math.min(v.length,g.length),P;for(P=0;P=0?v.slice(0,g):v,q=g>=0?v.slice(g+1):"in";return w=cV.get(w)||V_,q=vV.get(q)||U,hV(q(w.apply(null,r.call(arguments,1))))};function hV(v){return function(g){return g<=0?0:g>=1?1:v(g)}}function W_(v){return function(g){return 1-v(1-g)}}function X_(v){return function(g){return .5*(g<.5?v(2*g):2-v(2-2*g))}}function dV(v){return v*v}function pV(v){return v*v*v}function mV(v){if(v<=0)return 0;if(v>=1)return 1;var g=v*v,w=g*v;return 4*(v<.5?w:3*(v-g)+w-.75)}function yV(v){return function(g){return Math.pow(g,v)}}function gV(v){return 1-Math.cos(v*sr)}function xV(v){return Math.pow(2,10*(v-1))}function bV(v){return 1-Math.sqrt(1-v*v)}function _V(v,g){var w;return arguments.length<2&&(g=.45),arguments.length?w=g/ir*Math.asin(1/v):(v=1,w=g/4),function(q){return 1+v*Math.pow(2,-10*q)*Math.sin((q-w)*ir/g)}}function wV(v){return v||(v=1.70158),function(g){return g*g*((v+1)*g-v)}}function TV(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375}e.interpolateHcl=MV;function MV(v,g){v=e.hcl(v),g=e.hcl(g);var w=v.h,q=v.c,C=v.l,S=g.h-w,N=g.c-q,P=g.l-C;return isNaN(N)&&(N=0,q=isNaN(q)?g.c:q),isNaN(S)?(S=0,w=isNaN(w)?g.h:w):S>180?S-=360:S<-180&&(S+=360),function(F){return ni(w+S*F,q+N*F,C+P*F)+""}}e.interpolateHsl=AV;function AV(v,g){v=e.hsl(v),g=e.hsl(g);var w=v.h,q=v.s,C=v.l,S=g.h-w,N=g.s-q,P=g.l-C;return isNaN(N)&&(N=0,q=isNaN(q)?g.s:q),isNaN(S)?(S=0,w=isNaN(w)?g.h:w):S>180?S-=360:S<-180&&(S+=360),function(F){return Fa(w+S*F,q+N*F,C+P*F)+""}}e.interpolateLab=kV;function kV(v,g){v=e.lab(v),g=e.lab(g);var w=v.l,q=v.a,C=v.b,S=g.l-w,N=g.a-q,P=g.b-C;return function(F){return k0(w+S*F,q+N*F,C+P*F)+""}}e.interpolateRound=Z_;function Z_(v,g){return g-=v,function(w){return Math.round(v+g*w)}}e.transform=function(v){var g=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(w){if(w!=null){g.setAttribute("transform",w);var q=g.transform.baseVal.consolidate()}return new J_(q?q.matrix:CV)})(v)};function J_(v){var g=[v.a,v.b],w=[v.c,v.d],q=K_(g),C=$_(g,w),S=K_(qV(w,g,-C))||0;g[0]*w[1]180?g+=360:g-v>180&&(v+=360),q.push({i:w.push(uu(w)+"rotate(",null,")")-2,x:nl(v,g)})):g&&w.push(uu(w)+"rotate("+g+")")}function DV(v,g,w,q){v!==g?q.push({i:w.push(uu(w)+"skewX(",null,")")-2,x:nl(v,g)}):g&&w.push(uu(w)+"skewX("+g+")")}function EV(v,g,w,q){if(v[0]!==g[0]||v[1]!==g[1]){var C=w.push(uu(w)+"scale(",null,",",null,")");q.push({i:C-4,x:nl(v[0],g[0])},{i:C-2,x:nl(v[1],g[1])})}else(g[0]!==1||g[1]!==1)&&w.push(uu(w)+"scale("+g+")")}function Q_(v,g){var w=[],q=[];return v=e.transform(v),g=e.transform(g),LV(v.translate,g.translate,w,q),SV(v.rotate,g.rotate,w,q),DV(v.skew,g.skew,w,q),EV(v.scale,g.scale,w,q),v=g=null,function(C){for(var S=-1,N=q.length,P;++S0?S=pe:(w.c=null,w.t=NaN,w=null,g.end({type:"end",alpha:S=0})):pe>0&&(g.start({type:"start",alpha:S=pe}),w=P0(v.tick)),v):S},v.start=function(){var pe,Ue=me.length,rr=Te.length,or=q[0],ar=q[1],hr,dr;for(pe=0;pe=0;)S.push($=J[F]),$.parent=P,$.depth=P.depth+1;w&&(P.value=0),P.children=J}else w&&(P.value=+w.call(q,P,P.depth)||0),delete P.children;return Ri(C,function(j){var ee,me;v&&(ee=j.children)&&ee.sort(v),w&&(me=j.parent)&&(me.value+=j.value)}),N}return q.sort=function(C){return arguments.length?(v=C,q):v},q.children=function(C){return arguments.length?(g=C,q):g},q.value=function(C){return arguments.length?(w=C,q):w},q.revalue=function(C){return w&&(hc(C,function(S){S.children&&(S.value=0)}),Ri(C,function(S){var N;S.children||(S.value=+w.call(q,S,S.depth)||0),(N=S.parent)&&(N.value+=S.value)})),C},q};function vc(v,g){return e.rebind(v,g,"sort","children","value"),v.nodes=v,v.links=XV,v}function hc(v,g){for(var w=[v];(v=w.pop())!=null;)if(g(v),(C=v.children)&&(q=C.length))for(var q,C;--q>=0;)w.push(C[q])}function Ri(v,g){for(var w=[v],q=[];(v=w.pop())!=null;)if(q.push(v),(N=v.children)&&(S=N.length))for(var C=-1,S,N;++CC&&(C=P),q.push(P)}for(N=0;Nq&&(w=g,q=C);return w}function eW(v){return v.reduce(rW,0)}function rW(v,g){return v+g[1]}e.layout.histogram=function(){var v=!0,g=Number,w=aW,q=tW;function C(S,ee){for(var P=[],F=S.map(g,this),J=w.call(this,F,ee),$=q.call(this,J,F,ee),j,ee=-1,me=F.length,Te=$.length-1,ae=v?1:1/me,oe;++ee0)for(ee=-1;++ee=J[0]&&oe<=J[1]&&(j=P[e.bisect($,oe,1,Te)-1],j.y+=ae,j.push(S[ee]));return P}return C.value=function(S){return arguments.length?(g=S,C):g},C.range=function(S){return arguments.length?(w=Nr(S),C):w},C.bins=function(S){return arguments.length?(q=typeof S=="number"?function(N){return t4(N,S)}:Nr(S),C):q},C.frequency=function(S){return arguments.length?(v=!!S,C):v},C};function tW(v,g){return t4(v,Math.ceil(Math.log(g.length)/Math.LN2+1))}function t4(v,g){for(var w=-1,q=+v[0],C=(v[1]-q)/g,S=[];++w<=g;)S[w]=C*w+q;return S}function aW(v){return[e.min(v),e.max(v)]}e.layout.pack=function(){var v=e.layout.hierarchy().sort(nW),g=0,w=[1,1],q;function C(S,N){var P=v.call(this,S,N),F=P[0],J=w[0],$=w[1],j=q==null?Math.sqrt:typeof q=="function"?q:function(){return q};if(F.x=F.y=0,Ri(F,function(me){me.r=+j(me.value)}),Ri(F,i4),g){var ee=g*(q?1:Math.max(2*F.r/J,2*F.r/$))/2;Ri(F,function(me){me.r+=ee}),Ri(F,i4),Ri(F,function(me){me.r-=ee})}return l4(F,J/2,$/2,q?1:1/Math.max(2*F.r/J,2*F.r/$)),P}return C.size=function(S){return arguments.length?(w=S,C):w},C.radius=function(S){return arguments.length?(q=S==null||typeof S=="function"?S:+S,C):q},C.padding=function(S){return arguments.length?(g=+S,C):g},vc(C,v)};function nW(v,g){return v.value-g.value}function ly(v,g){var w=v._pack_next;v._pack_next=g,g._pack_prev=v,g._pack_next=w,w._pack_prev=g}function a4(v,g){v._pack_next=g,g._pack_prev=v}function n4(v,g){var w=g.x-v.x,q=g.y-v.y,C=v.r+g.r;return .999*C*C>w*w+q*q}function i4(v){if(!(g=v.children)||!(ee=g.length))return;var g,w=1/0,q=-1/0,C=1/0,S=-1/0,N,P,F,J,$,j,ee;function me(pe){w=Math.min(pe.x-pe.r,w),q=Math.max(pe.x+pe.r,q),C=Math.min(pe.y-pe.r,C),S=Math.max(pe.y+pe.r,S)}if(g.forEach(iW),N=g[0],N.x=-N.r,N.y=0,me(N),ee>1&&(P=g[1],P.x=P.r,P.y=0,me(P),ee>2))for(F=g[2],o4(N,P,F),me(F),ly(N,F),N._pack_prev=F,ly(F,P),P=N._pack_next,J=3;Joe.x&&(oe=Ue),Ue.depth>he.depth&&(he=Ue)});var we=g(ae,oe)/2-ae.x,Me=w[0]/(oe.x+g(oe,ae)/2+we),pe=w[1]/(he.depth||1);hc(me,function(Ue){Ue.x=(Ue.x+we)*Me,Ue.y=Ue.depth*pe})}return ee}function S($){for(var j={A:null,children:[$]},ee=[j],me;(me=ee.pop())!=null;)for(var Te=me.children,ae,oe=0,he=Te.length;oe0&&(oW(uW(ae,$,ee),$,Ue),he+=Ue,we+=Ue),Me+=ae.m,he+=me.m,pe+=oe.m,we+=Te.m;ae&&!sy(Te)&&(Te.t=ae,Te.m+=Me-we),me&&!oy(oe)&&(oe.t=me,oe.m+=he-pe,ee=$)}return ee}function J($){$.x*=w[0],$.y=$.depth*w[1]}return C.separation=function($){return arguments.length?(g=$,C):g},C.size=function($){return arguments.length?(q=(w=$)==null?J:null,C):q?null:w},C.nodeSize=function($){return arguments.length?(q=(w=$)==null?null:J,C):q?w:null},vc(C,v)};function s4(v,g){return v.parent==g.parent?1:2}function oy(v){var g=v.children;return g.length?g[0]:v.t}function sy(v){var g=v.children,w;return(w=g.length)?g[w-1]:v.t}function oW(v,g,w){var q=w/(g.i-v.i);g.c-=q,g.s+=w,v.c+=q,g.z+=w,g.m+=w}function sW(v){for(var g=0,w=0,q=v.children,C=q.length,S;--C>=0;)S=q[C],S.z+=g,S.m+=g,g+=S.s+(w+=S.c)}function uW(v,g,w){return v.a.parent===g.parent?v.a:w}e.layout.cluster=function(){var v=e.layout.hierarchy().sort(null).value(null),g=s4,w=[1,1],q=!1;function C(S,N){var P=v.call(this,S,N),F=P[0],J,$=0;Ri(F,function(ae){var oe=ae.children;oe&&oe.length?(ae.x=cW(oe),ae.y=fW(oe)):(ae.x=J?$+=g(ae,J):0,ae.y=0,J=ae)});var j=u4(F),ee=f4(F),me=j.x-g(j,ee)/2,Te=ee.x+g(ee,j)/2;return Ri(F,q?function(ae){ae.x=(ae.x-F.x)*w[0],ae.y=(F.y-ae.y)*w[1]}:function(ae){ae.x=(ae.x-me)/(Te-me)*w[0],ae.y=(1-(F.y?ae.y/F.y:1))*w[1]}),P}return C.separation=function(S){return arguments.length?(g=S,C):g},C.size=function(S){return arguments.length?(q=(w=S)==null,C):q?null:w},C.nodeSize=function(S){return arguments.length?(q=(w=S)!=null,C):q?w:null},vc(C,v)};function fW(v){return 1+e.max(v,function(g){return g.y})}function cW(v){return v.reduce(function(g,w){return g+w.x},0)/v.length}function u4(v){var g=v.children;return g&&g.length?u4(g[0]):v}function f4(v){var g=v.children,w;return g&&(w=g.length)?f4(g[w-1]):v}e.layout.treemap=function(){var v=e.layout.hierarchy(),g=Math.round,w=[1,1],q=null,C=uy,S=!1,N,P="squarify",F=.5*(1+Math.sqrt(5));function J(ae,oe){for(var he=-1,we=ae.length,Me,pe;++he0;)we.push(pe=Me[ar-1]),we.area+=pe.area,P!=="squarify"||(rr=ee(we,or))<=Ue?(Me.pop(),Ue=rr):(we.area-=we.pop().area,me(we,or,he,!1),or=Math.min(he.dx,he.dy),we.length=we.area=0,Ue=1/0);we.length&&(me(we,or,he,!0),we.length=we.area=0),oe.forEach($)}}function j(ae){var oe=ae.children;if(oe&&oe.length){var he=C(ae),we=oe.slice(),Me,pe=[];for(J(we,he.dx*he.dy/ae.value),pe.area=0;Me=we.pop();)pe.push(Me),pe.area+=Me.area,Me.z!=null&&(me(pe,Me.z?he.dx:he.dy,he,!we.length),pe.length=pe.area=0);oe.forEach(j)}}function ee(ae,oe){for(var he=ae.area,we,Me=0,pe=1/0,Ue=-1,rr=ae.length;++UeMe&&(Me=we));return he*=he,oe*=oe,he?Math.max(oe*Me*F/he,he/(oe*pe*F)):1/0}function me(ae,oe,he,we){var Me=-1,pe=ae.length,Ue=he.x,rr=he.y,or=oe?g(ae.area/oe):0,ar;if(oe==he.dx){for((we||or>he.dy)&&(or=he.dy);++Mehe.dx)&&(or=he.dx);++Me1);return v+g*q*Math.sqrt(-2*Math.log(S)/S)}},logNormal:function(){var v=e.random.normal.apply(e,arguments);return function(){return Math.exp(v())}},bates:function(v){var g=e.random.irwinHall(v);return function(){return g()/v}},irwinHall:function(v){return function(){for(var g=0,w=0;w2?dW:vW,J=q?RV:PV;return C=F(v,g,J,w),S=F(g,v,J,zo),P}function P(F){return C(F)}return P.invert=function(F){return S(F)},P.domain=function(F){return arguments.length?(v=F.map(Number),N()):v},P.range=function(F){return arguments.length?(g=F,N()):g},P.rangeRound=function(F){return P.range(F).interpolate(Z_)},P.clamp=function(F){return arguments.length?(q=F,N()):q},P.interpolate=function(F){return arguments.length?(w=F,N()):w},P.ticks=function(F){return vy(v,F)},P.tickFormat=function(F,J){return d3_scale_linearTickFormat(v,F,J)},P.nice=function(F){return p4(v,F),N()},P.copy=function(){return h4(v,g,w,q)},N()}function d4(v,g){return e.rebind(v,g,"range","rangeRound","interpolate","clamp")}function p4(v,g){return fy(v,v4(cy(v,g)[2])),fy(v,v4(cy(v,g)[2])),v}function cy(v,g){g==null&&(g=10);var w=O0(v),q=w[1]-w[0],C=Math.pow(10,Math.floor(Math.log(q/g)/Math.LN10)),S=g/q*C;return S<=.15?C*=10:S<=.35?C*=5:S<=.75&&(C*=2),w[0]=Math.ceil(w[0]/C)*C,w[1]=Math.floor(w[1]/C)*C+C*.5,w[2]=C,w}function vy(v,g){return e.range.apply(e,cy(v,g))}var pW={s:1,g:1,p:1,r:1,e:1};function m4(v){return-Math.floor(Math.log(v)/Math.LN10+.01)}function Dpe(v,g){var w=m4(g[2]);return v in pW?Math.abs(w-m4(Math.max(_(g[0]),_(g[1]))))+ +(v!=="e"):w-(v==="%")*2}e.scale.log=function(){return y4(e.scale.linear().domain([0,1]),10,!0,[1,10])};function y4(v,g,w,q){function C(P){return(w?Math.log(P<0?0:P):-Math.log(P>0?0:-P))/Math.log(g)}function S(P){return w?Math.pow(g,P):-Math.pow(g,-P)}function N(P){return v(C(P))}return N.invert=function(P){return S(v.invert(P))},N.domain=function(P){return arguments.length?(w=P[0]>=0,v.domain((q=P.map(Number)).map(C)),N):q},N.base=function(P){return arguments.length?(g=+P,v.domain(q.map(C)),N):g},N.nice=function(){var P=fy(q.map(C),w?Math:mW);return v.domain(P),q=P.map(S),N},N.ticks=function(){var P=O0(q),F=[],J=P[0],$=P[1],j=Math.floor(C(J)),ee=Math.ceil(C($)),me=g%1?2:g;if(isFinite(ee-j)){if(w){for(;j0;Te--)F.push(S(j)*Te);for(j=0;F[j]$;ee--);F=F.slice(j,ee)}return F},N.copy=function(){return y4(v.copy(),g,w,q)},d4(N,v)}var mW={floor:function(v){return-Math.ceil(-v)},ceil:function(v){return-Math.floor(-v)}};e.scale.pow=function(){return g4(e.scale.linear(),1,[0,1])};function g4(v,g,w){var q=Y0(g),C=Y0(1/g);function S(N){return v(q(N))}return S.invert=function(N){return C(v.invert(N))},S.domain=function(N){return arguments.length?(v.domain((w=N.map(Number)).map(q)),S):w},S.ticks=function(N){return vy(w,N)},S.tickFormat=function(N,P){return d3_scale_linearTickFormat(w,N,P)},S.nice=function(N){return S.domain(p4(w,N))},S.exponent=function(N){return arguments.length?(q=Y0(g=N),C=Y0(1/g),v.domain(w.map(q)),S):g},S.copy=function(){return g4(v.copy(),g,w)},d4(S,v)}function Y0(v){return function(g){return g<0?-Math.pow(-g,v):Math.pow(g,v)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return x4([],{t:"range",a:[[]]})};function x4(v,g){var w,q,C;function S(P){return q[((w.get(P)||(g.t==="range"?w.set(P,v.push(P)):NaN))-1)%q.length]}function N(P,F){return e.range(v.length).map(function(J){return P+F*J})}return S.domain=function(P){if(!arguments.length)return v;v=[],w=new x;for(var F=-1,J=P.length,$;++F0?w[S-1]:v[0],See?0:1;if($=vr)return F($,Te)+(J?F(J,1-Te):"")+"Z";var ae,oe,he,we,Me=0,pe=0,Ue,rr,or,ar,hr,dr,Sr,pr,Mr=[];if((we=(+N.apply(this,arguments)||0)/2)&&(he=q===G0?Math.sqrt(J*J+$*$):+q.apply(this,arguments),Te||(pe*=-1),$&&(pe=oa(he/$*Math.sin(we))),J&&(Me=oa(he/J*Math.sin(we)))),$){Ue=$*Math.cos(j+pe),rr=$*Math.sin(j+pe),or=$*Math.cos(ee-pe),ar=$*Math.sin(ee-pe);var Kr=Math.abs(ee-j-2*pe)<=qe?0:1;if(pe&&U0(Ue,rr,or,ar)===Te^Kr){var Ft=(j+ee)/2;Ue=$*Math.cos(Ft),rr=$*Math.sin(Ft),or=ar=null}}else Ue=rr=0;if(J){hr=J*Math.cos(ee-Me),dr=J*Math.sin(ee-Me),Sr=J*Math.cos(j+Me),pr=J*Math.sin(j+Me);var at=Math.abs(j-ee+2*Me)<=qe?0:1;if(Me&&U0(hr,dr,Sr,pr)===1-Te^at){var er=(j+ee)/2;hr=J*Math.cos(er),dr=J*Math.sin(er),Sr=pr=null}}else hr=dr=0;if(me>fe&&(ae=Math.min(Math.abs($-J)/2,+w.apply(this,arguments)))>.001){oe=J<$^Te?0:1;var Dr=ae,Er=ae;if(me0?0:1}function V0(v,g,w,q,C){var S=v[0]-g[0],N=v[1]-g[1],P=(C?q:-q)/Math.sqrt(S*S+N*N),F=P*N,J=-P*S,$=v[0]+F,j=v[1]+J,ee=g[0]+F,me=g[1]+J,Te=($+ee)/2,ae=(j+me)/2,oe=ee-$,he=me-j,we=oe*oe+he*he,Me=w-q,pe=$*me-ee*j,Ue=(he<0?-1:1)*Math.sqrt(Math.max(0,Me*Me*we-pe*pe)),rr=(pe*he-oe*Ue)/we,or=(-pe*oe-he*Ue)/we,ar=(pe*he+oe*Ue)/we,hr=(-pe*oe+he*Ue)/we,dr=rr-Te,Sr=or-ae,pr=ar-Te,Mr=hr-ae;return dr*dr+Sr*Sr>pr*pr+Mr*Mr&&(rr=ar,or=hr),[[rr-F,or-J],[rr*w/Me,or*w/Me]]}function k4(){return!0}function q4(v){var g=nu,w=lc,q=k4,C=li,S=C.key,N=.7;function P(F){var J=[],$=[],j=-1,ee=F.length,me,Te=Nr(g),ae=Nr(w);function oe(){J.push("M",C(v($),N))}for(;++j1?v.join("L"):v+"Z"}function C4(v){return v.join("L")+"Z"}function AW(v){for(var g=0,w=v.length,q=v[0],C=[q[0],",",q[1]];++g1&&C.push("H",q[0]),C.join("")}function dy(v){for(var g=0,w=v.length,q=v[0],C=[q[0],",",q[1]];++g1){P=g[1],S=v[F],F++,q+="C"+(C[0]+N[0])+","+(C[1]+N[1])+","+(S[0]-P[0])+","+(S[1]-P[1])+","+S[0]+","+S[1];for(var J=2;J9&&(S=w*3/Math.sqrt(S),N[P]=S*q,N[P+1]=S*C));for(P=-1;++P<=F;)S=(v[Math.min(F,P+1)][0]-v[Math.max(0,P-1)][0])/(6*(1+N[P]*N[P])),g.push([S||0,N[P]*S||0]);return g}function RW(v){return v.length<3?li(v):v[0]+W0(v,PW(v))}e.svg.line.radial=function(){var v=q4(E4);return v.radius=v.x,delete v.x,v.angle=v.y,delete v.y,v};function E4(v){for(var g,w=-1,q=v.length,C,S;++wqe)+",1 "+j}function J($,j,ee,me){return"Q 0,0 "+me}return S.radius=function($){return arguments.length?(w=Nr($),S):w},S.source=function($){return arguments.length?(v=Nr($),S):v},S.target=function($){return arguments.length?(g=Nr($),S):g},S.startAngle=function($){return arguments.length?(q=Nr($),S):q},S.endAngle=function($){return arguments.length?(C=Nr($),S):C},S};function zW(v){return v.radius}e.svg.diagonal=function(){var v=R4,g=z4,w=N4;function q(C,S){var N=v.call(this,C,S),P=g.call(this,C,S),F=(N.y+P.y)/2,J=[N,{x:N.x,y:F},{x:P.x,y:F},P];return J=J.map(w),"M"+J[0]+"C"+J[1]+" "+J[2]+" "+J[3]}return q.source=function(C){return arguments.length?(v=Nr(C),q):v},q.target=function(C){return arguments.length?(g=Nr(C),q):g},q.projection=function(C){return arguments.length?(w=C,q):w},q};function N4(v){return[v.x,v.y]}e.svg.diagonal.radial=function(){var v=e.svg.diagonal(),g=N4,w=v.projection;return v.projection=function(q){return arguments.length?w(NW(g=q)):g},v};function NW(v){return function(){var g=v.apply(this,arguments),w=g[0],q=g[1]-sr;return[w*Math.cos(q),w*Math.sin(q)]}}e.svg.symbol=function(){var v=IW,g=FW;function w(q,C){return(I4.get(v.call(this,q,C))||F4)(g.call(this,q,C))}return w.type=function(q){return arguments.length?(v=Nr(q),w):v},w.size=function(q){return arguments.length?(g=Nr(q),w):g},w};function FW(){return 64}function IW(){return"circle"}function F4(v){var g=Math.sqrt(v/qe);return"M0,"+g+"A"+g+","+g+" 0 1,1 0,"+-g+"A"+g+","+g+" 0 1,1 0,"+g+"Z"}var I4=e.map({circle:F4,cross:function(v){var g=Math.sqrt(v/5)/2;return"M"+-3*g+","+-g+"H"+-g+"V"+-3*g+"H"+g+"V"+-g+"H"+3*g+"V"+g+"H"+g+"V"+3*g+"H"+-g+"V"+g+"H"+-3*g+"Z"},diamond:function(v){var g=Math.sqrt(v/(2*H4)),w=g*H4;return"M0,"+-g+"L"+w+",0 0,"+g+" "+-w+",0Z"},square:function(v){var g=Math.sqrt(v)/2;return"M"+-g+","+-g+"L"+g+","+-g+" "+g+","+g+" "+-g+","+g+"Z"},"triangle-down":function(v){var g=Math.sqrt(v/X0),w=g*X0/2;return"M0,"+w+"L"+g+","+-w+" "+-g+","+-w+"Z"},"triangle-up":function(v){var g=Math.sqrt(v/X0),w=g*X0/2;return"M0,"+-w+"L"+g+","+w+" "+-g+","+w+"Z"}});e.svg.symbolTypes=I4.keys();var X0=Math.sqrt(3),H4=Math.tan(30*Ar);be.transition=function(v){for(var g=No||++B4,w=by(v),q=[],C,S,N=J0||{time:Date.now(),ease:mV,delay:0,duration:250},P=-1,F=this.length;++P0;)j[--we].call(v,he);if(oe>=1)return N.event&&N.event.end.call(v,v.__data__,g),--S.count?delete S[q]:delete v[w],1}N||(P=C.time,F=P0(ee,0,P),N=S[q]={tween:new x,time:P,timer:F,delay:C.delay,duration:C.duration,ease:C.ease,index:g},C=null,++S.count)}e.svg.axis=function(){var v=e.scale.linear(),g=Y4,w=6,q=6,C=3,S=[10],N=null,P;function F(J){J.each(function(){var $=e.select(this),j=this.__chart__||v,ee=this.__chart__=v.copy(),me=N==null?ee.ticks?ee.ticks.apply(ee,S):ee.domain():N,Te=P==null?ee.tickFormat?ee.tickFormat.apply(ee,S):U:P,ae=$.selectAll(".tick").data(me,ee),oe=ae.enter().insert("g",".domain").attr("class","tick").style("opacity",fe),he=e.transition(ae.exit()).style("opacity",fe).remove(),we=e.transition(ae.order()).style("opacity",1),Me=Math.max(w,0)+C,pe,Ue=B0(ee),rr=$.selectAll(".domain").data([0]),or=(rr.enter().append("path").attr("class","domain"),e.transition(rr));oe.append("line"),oe.append("text");var ar=oe.select("line"),hr=we.select("line"),dr=ae.select("text").text(Te),Sr=oe.select("text"),pr=we.select("text"),Mr=g==="top"||g==="left"?-1:1,Kr,Ft,at,er;if(g==="bottom"||g==="top"?(pe=BW,Kr="x",at="y",Ft="x2",er="y2",dr.attr("dy",Mr<0?"0em":".71em").style("text-anchor","middle"),or.attr("d","M"+Ue[0]+","+Mr*q+"V0H"+Ue[1]+"V"+Mr*q)):(pe=YW,Kr="y",at="x",Ft="y2",er="x2",dr.attr("dy",".32em").style("text-anchor",Mr<0?"end":"start"),or.attr("d","M"+Mr*q+","+Ue[0]+"H0V"+Ue[1]+"H"+Mr*q)),ar.attr(er,Mr*w),Sr.attr(at,Mr*Me),hr.attr(Ft,0).attr(er,Mr*w),pr.attr(Kr,0).attr(at,Mr*Me),ee.rangeBand){var Dr=ee,Er=Dr.rangeBand()/2;j=ee=function(Qr){return Dr(Qr)+Er}}else j.rangeBand?j=ee:he.call(pe,ee,j);oe.call(pe,j,ee),we.call(pe,ee,ee)})}return F.scale=function(J){return arguments.length?(v=J,F):v},F.orient=function(J){return arguments.length?(g=J in OW?J+"":Y4,F):g},F.ticks=function(){return arguments.length?(S=t(arguments),F):S},F.tickValues=function(J){return arguments.length?(N=J,F):N},F.tickFormat=function(J){return arguments.length?(P=J,F):P},F.tickSize=function(J){var $=arguments.length;return $?(w=+J,q=+arguments[$-1],F):w},F.innerTickSize=function(J){return arguments.length?(w=+J,F):w},F.outerTickSize=function(J){return arguments.length?(q=+J,F):q},F.tickPadding=function(J){return arguments.length?(C=+J,F):C},F.tickSubdivide=function(){return arguments.length&&F},F};var Y4="bottom",OW={top:1,right:1,bottom:1,left:1};function BW(v,g,w){v.attr("transform",function(q){var C=g(q);return"translate("+(isFinite(C)?C:w(q))+",0)"})}function YW(v,g,w){v.attr("transform",function(q){var C=g(q);return"translate(0,"+(isFinite(C)?C:w(q))+")"})}e.svg.brush=function(){var v=ce($,"brushstart","brush","brushend"),g=null,w=null,q=[0,0],C=[0,0],S,N,P=!0,F=!0,J=_y[0];function $(ae){ae.each(function(){var oe=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Te).on("touchstart.brush",Te),he=oe.selectAll(".background").data([0]);he.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oe.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var we=oe.selectAll(".resize").data(J,U);we.exit().remove(),we.enter().append("g").attr("class",function(rr){return"resize "+rr}).style("cursor",function(rr){return GW[rr]}).append("rect").attr("x",function(rr){return/[ew]$/.test(rr)?-3:null}).attr("y",function(rr){return/^[ns]/.test(rr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),we.style("display",$.empty()?"none":null);var Me=e.transition(oe),pe=e.transition(he),Ue;g&&(Ue=B0(g),pe.attr("x",Ue[0]).attr("width",Ue[1]-Ue[0]),ee(Me)),w&&(Ue=B0(w),pe.attr("y",Ue[0]).attr("height",Ue[1]-Ue[0]),me(Me)),j(Me)})}$.event=function(ae){ae.each(function(){var oe=v.of(this,arguments),he={x:q,y:C,i:S,j:N},we=this.__chart__||he;this.__chart__=he,No?e.select(this).transition().each("start.brush",function(){S=we.i,N=we.j,q=we.x,C=we.y,oe({type:"brushstart"})}).tween("brush:brush",function(){var Me=H0(q,he.x),pe=H0(C,he.y);return S=N=null,function(Ue){q=he.x=Me(Ue),C=he.y=pe(Ue),oe({type:"brush",mode:"resize"})}}).each("end.brush",function(){S=he.i,N=he.j,oe({type:"brush",mode:"resize"}),oe({type:"brushend"})}):(oe({type:"brushstart"}),oe({type:"brush",mode:"resize"}),oe({type:"brushend"}))})};function j(ae){ae.selectAll(".resize").attr("transform",function(oe){return"translate("+q[+/e$/.test(oe)]+","+C[+/^s/.test(oe)]+")"})}function ee(ae){ae.select(".extent").attr("x",q[0]),ae.selectAll(".extent,.n>rect,.s>rect").attr("width",q[1]-q[0])}function me(ae){ae.select(".extent").attr("y",C[0]),ae.selectAll(".extent,.e>rect,.w>rect").attr("height",C[1]-C[0])}function Te(){var ae=this,oe=e.select(e.event.target),he=v.of(ae,arguments),we=e.select(ae),Me=oe.datum(),pe=!/^(n|s)$/.test(Me)&&g,Ue=!/^(e|w)$/.test(Me)&&w,rr=oe.classed("extent"),or=fr(ae),ar,hr=e.mouse(ae),dr,Sr=e.select(i(ae)).on("keydown.brush",Kr).on("keyup.brush",Ft);if(e.event.changedTouches?Sr.on("touchmove.brush",at).on("touchend.brush",Dr):Sr.on("mousemove.brush",at).on("mouseup.brush",Dr),we.interrupt().selectAll("*").interrupt(),rr)hr[0]=q[0]-hr[0],hr[1]=C[0]-hr[1];else if(Me){var pr=+/w$/.test(Me),Mr=+/^n/.test(Me);dr=[q[1-pr]-hr[0],C[1-Mr]-hr[1]],hr[0]=q[pr],hr[1]=C[Mr]}else e.event.altKey&&(ar=hr.slice());we.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",oe.style("cursor")),he({type:"brushstart"}),at();function Kr(){e.event.keyCode==32&&(rr||(ar=null,hr[0]-=q[1],hr[1]-=C[1],rr=2),re())}function Ft(){e.event.keyCode==32&&rr==2&&(hr[0]+=q[1],hr[1]+=C[1],rr=0,re())}function at(){var Er=e.mouse(ae),Qr=!1;dr&&(Er[0]+=dr[0],Er[1]+=dr[1]),rr||(e.event.altKey?(ar||(ar=[(q[0]+q[1])/2,(C[0]+C[1])/2]),hr[0]=q[+(Er[0]{(function(e,r){typeof rh=="object"&&typeof X4!="undefined"?r(rh):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(rh,function(e){"use strict";var r=new Date,t=new Date;function a(ie,Ae,Ce,cr){function tr(De){return ie(De=arguments.length===0?new Date:new Date(+De)),De}return tr.floor=function(De){return ie(De=new Date(+De)),De},tr.ceil=function(De){return ie(De=new Date(De-1)),Ae(De,1),ie(De),De},tr.round=function(De){var Le=tr(De),Ye=tr.ceil(De);return De-Le0))return Xe;do Xe.push(Ge=new Date(+De)),Ae(De,Ye),ie(De);while(Ge=Le)for(;ie(Le),!De(Le);)Le.setTime(Le-1)},function(Le,Ye){if(Le>=Le)if(Ye<0)for(;++Ye<=0;)for(;Ae(Le,-1),!De(Le););else for(;--Ye>=0;)for(;Ae(Le,1),!De(Le););})},Ce&&(tr.count=function(De,Le){return r.setTime(+De),t.setTime(+Le),ie(r),ie(t),Math.floor(Ce(r,t))},tr.every=function(De){return De=Math.floor(De),!isFinite(De)||!(De>0)?null:De>1?tr.filter(cr?function(Le){return cr(Le)%De===0}:function(Le){return tr.count(0,Le)%De===0}):tr}),tr}var n=a(function(){},function(ie,Ae){ie.setTime(+ie+Ae)},function(ie,Ae){return Ae-ie});n.every=function(ie){return ie=Math.floor(ie),!isFinite(ie)||!(ie>0)?null:ie>1?a(function(Ae){Ae.setTime(Math.floor(Ae/ie)*ie)},function(Ae,Ce){Ae.setTime(+Ae+Ce*ie)},function(Ae,Ce){return(Ce-Ae)/ie}):n};var i=n.range,l=1e3,o=6e4,s=36e5,u=864e5,f=6048e5,c=a(function(ie){ie.setTime(ie-ie.getMilliseconds())},function(ie,Ae){ie.setTime(+ie+Ae*l)},function(ie,Ae){return(Ae-ie)/l},function(ie){return ie.getUTCSeconds()}),h=c.range,d=a(function(ie){ie.setTime(ie-ie.getMilliseconds()-ie.getSeconds()*l)},function(ie,Ae){ie.setTime(+ie+Ae*o)},function(ie,Ae){return(Ae-ie)/o},function(ie){return ie.getMinutes()}),p=d.range,y=a(function(ie){ie.setTime(ie-ie.getMilliseconds()-ie.getSeconds()*l-ie.getMinutes()*o)},function(ie,Ae){ie.setTime(+ie+Ae*s)},function(ie,Ae){return(Ae-ie)/s},function(ie){return ie.getHours()}),m=y.range,_=a(function(ie){ie.setHours(0,0,0,0)},function(ie,Ae){ie.setDate(ie.getDate()+Ae)},function(ie,Ae){return(Ae-ie-(Ae.getTimezoneOffset()-ie.getTimezoneOffset())*o)/u},function(ie){return ie.getDate()-1}),b=_.range;function T(ie){return a(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-ie)%7),Ae.setHours(0,0,0,0)},function(Ae,Ce){Ae.setDate(Ae.getDate()+Ce*7)},function(Ae,Ce){return(Ce-Ae-(Ce.getTimezoneOffset()-Ae.getTimezoneOffset())*o)/f})}var x=T(0),M=T(1),A=T(2),k=T(3),L=T(4),D=T(5),E=T(6),R=x.range,z=M.range,H=A.range,O=k.range,U=L.range,V=D.range,Y=E.range,I=a(function(ie){ie.setDate(1),ie.setHours(0,0,0,0)},function(ie,Ae){ie.setMonth(ie.getMonth()+Ae)},function(ie,Ae){return Ae.getMonth()-ie.getMonth()+(Ae.getFullYear()-ie.getFullYear())*12},function(ie){return ie.getMonth()}),G=I.range,Z=a(function(ie){ie.setMonth(0,1),ie.setHours(0,0,0,0)},function(ie,Ae){ie.setFullYear(ie.getFullYear()+Ae)},function(ie,Ae){return Ae.getFullYear()-ie.getFullYear()},function(ie){return ie.getFullYear()});Z.every=function(ie){return!isFinite(ie=Math.floor(ie))||!(ie>0)?null:a(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/ie)*ie),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Ce){Ae.setFullYear(Ae.getFullYear()+Ce*ie)})};var K=Z.range,re=a(function(ie){ie.setUTCSeconds(0,0)},function(ie,Ae){ie.setTime(+ie+Ae*o)},function(ie,Ae){return(Ae-ie)/o},function(ie){return ie.getUTCMinutes()}),se=re.range,ce=a(function(ie){ie.setUTCMinutes(0,0,0)},function(ie,Ae){ie.setTime(+ie+Ae*s)},function(ie,Ae){return(Ae-ie)/s},function(ie){return ie.getUTCHours()}),le=ce.range,Q=a(function(ie){ie.setUTCHours(0,0,0,0)},function(ie,Ae){ie.setUTCDate(ie.getUTCDate()+Ae)},function(ie,Ae){return(Ae-ie)/u},function(ie){return ie.getUTCDate()-1}),ge=Q.range;function ue(ie){return a(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-ie)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Ce){Ae.setUTCDate(Ae.getUTCDate()+Ce*7)},function(Ae,Ce){return(Ce-Ae)/f})}var ke=ue(0),ve=ue(1),be=ue(2),W=ue(3),te=ue(4),X=ue(5),ye=ue(6),_e=ke.range,xe=ve.range,Ie=be.range,ze=W.range,Re=te.range,He=X.range,Be=ye.range,Fe=a(function(ie){ie.setUTCDate(1),ie.setUTCHours(0,0,0,0)},function(ie,Ae){ie.setUTCMonth(ie.getUTCMonth()+Ae)},function(ie,Ae){return Ae.getUTCMonth()-ie.getUTCMonth()+(Ae.getUTCFullYear()-ie.getUTCFullYear())*12},function(ie){return ie.getUTCMonth()}),Ee=Fe.range,Je=a(function(ie){ie.setUTCMonth(0,1),ie.setUTCHours(0,0,0,0)},function(ie,Ae){ie.setUTCFullYear(ie.getUTCFullYear()+Ae)},function(ie,Ae){return Ae.getUTCFullYear()-ie.getUTCFullYear()},function(ie){return ie.getUTCFullYear()});Je.every=function(ie){return!isFinite(ie=Math.floor(ie))||!(ie>0)?null:a(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/ie)*ie),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Ce){Ae.setUTCFullYear(Ae.getUTCFullYear()+Ce*ie)})};var We=Je.range;e.timeDay=_,e.timeDays=b,e.timeFriday=D,e.timeFridays=V,e.timeHour=y,e.timeHours=m,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=M,e.timeMondays=z,e.timeMonth=I,e.timeMonths=G,e.timeSaturday=E,e.timeSaturdays=Y,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=x,e.timeSundays=R,e.timeThursday=L,e.timeThursdays=U,e.timeTuesday=A,e.timeTuesdays=H,e.timeWednesday=k,e.timeWednesdays=O,e.timeWeek=x,e.timeWeeks=R,e.timeYear=Z,e.timeYears=K,e.utcDay=Q,e.utcDays=ge,e.utcFriday=X,e.utcFridays=He,e.utcHour=ce,e.utcHours=le,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=re,e.utcMinutes=se,e.utcMonday=ve,e.utcMondays=xe,e.utcMonth=Fe,e.utcMonths=Ee,e.utcSaturday=ye,e.utcSaturdays=Be,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=ke,e.utcSundays=_e,e.utcThursday=te,e.utcThursdays=Re,e.utcTuesday=be,e.utcTuesdays=Ie,e.utcWednesday=W,e.utcWednesdays=ze,e.utcWeek=ke,e.utcWeeks=_e,e.utcYear=Je,e.utcYears=We,Object.defineProperty(e,"__esModule",{value:!0})})});var cu=B((th,Z4)=>{(function(e,r){typeof th=="object"&&typeof Z4!="undefined"?r(th,My()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(th,function(e,r){"use strict";function t(ne){if(0<=ne.y&&ne.y<100){var fe=new Date(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L);return fe.setFullYear(ne.y),fe}return new Date(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L)}function a(ne){if(0<=ne.y&&ne.y<100){var fe=new Date(Date.UTC(-1,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L));return fe.setUTCFullYear(ne.y),fe}return new Date(Date.UTC(ne.y,ne.m,ne.d,ne.H,ne.M,ne.S,ne.L))}function n(ne,fe,Se){return{y:ne,m:fe,d:Se,H:0,M:0,S:0,L:0}}function i(ne){var fe=ne.dateTime,Se=ne.date,qe=ne.time,ir=ne.periods,vr=ne.days,sr=ne.shortDays,Ar=ne.months,Ur=ne.shortMonths,et=h(ir),Wr=d(ir),Nt=h(vr),oa=d(vr),Na=h(sr),sa=d(sr),Sn=h(Ar),Za=d(Ar),ua=h(Ur),Ja=d(Ur),gr={a:Do,A:Eo,b:Sl,B:k0,c:null,d:I,e:I,f:se,H:G,I:Z,j:K,L:re,m:ce,M:le,p:q0,q:ac,Q:Le,s:Ye,S:Q,u:ge,U:ue,V:ke,w:ve,W:be,x:null,X:null,y:W,Y:te,Z:X,"%":De},ct={a:nc,A:ic,b:Ia,B:C0,c:null,d:ye,e:ye,f:Re,H:_e,I:xe,j:Ie,L:ze,m:He,M:Be,p:tu,q:au,Q:Le,s:Ye,S:Fe,u:Ee,U:Je,V:We,w:ie,W:Ae,x:null,X:null,y:Ce,Y:cr,Z:tr,"%":De},Xr={a:Fa,A:fa,b:ai,B:ni,c:Qt,d:L,e:L,f:O,H:E,I:E,j:D,L:H,m:k,M:R,p:_t,q:A,Q:V,s:Y,S:z,u:y,U:m,V:_,w:p,W:b,x:it,X:ma,y:x,Y:T,Z:M,"%":U};gr.x=bt(Se,gr),gr.X=bt(qe,gr),gr.c=bt(fe,gr),ct.x=bt(Se,ct),ct.X=bt(qe,ct),ct.c=bt(fe,ct);function bt(mr,Zr){return function(rt){var nr=[],ya=-1,ht=0,ga=mr.length,Nr,ii,Po;for(rt instanceof Date||(rt=new Date(+rt));++ya53)return null;"w"in nr||(nr.w=1),"Z"in nr?(ht=a(n(nr.y,0,1)),ga=ht.getUTCDay(),ht=ga>4||ga===0?r.utcMonday.ceil(ht):r.utcMonday(ht),ht=r.utcDay.offset(ht,(nr.V-1)*7),nr.y=ht.getUTCFullYear(),nr.m=ht.getUTCMonth(),nr.d=ht.getUTCDate()+(nr.w+6)%7):(ht=t(n(nr.y,0,1)),ga=ht.getDay(),ht=ga>4||ga===0?r.timeMonday.ceil(ht):r.timeMonday(ht),ht=r.timeDay.offset(ht,(nr.V-1)*7),nr.y=ht.getFullYear(),nr.m=ht.getMonth(),nr.d=ht.getDate()+(nr.w+6)%7)}else("W"in nr||"U"in nr)&&("w"in nr||(nr.w="u"in nr?nr.u%7:"W"in nr?1:0),ga="Z"in nr?a(n(nr.y,0,1)).getUTCDay():t(n(nr.y,0,1)).getDay(),nr.m=0,nr.d="W"in nr?(nr.w+6)%7+nr.W*7-(ga+5)%7:nr.w+nr.U*7-(ga+6)%7);return"Z"in nr?(nr.H+=nr.Z/100|0,nr.M+=nr.Z%100,a(nr)):t(nr)}}function vt(mr,Zr,rt,nr){for(var ya=0,ht=Zr.length,ga=rt.length,Nr,ii;ya=ga)return-1;if(Nr=Zr.charCodeAt(ya++),Nr===37){if(Nr=Zr.charAt(ya++),ii=Xr[Nr in l?Zr.charAt(ya++):Nr],!ii||(nr=ii(mr,rt,nr))<0)return-1}else if(Nr!=rt.charCodeAt(nr++))return-1}return nr}function _t(mr,Zr,rt){var nr=et.exec(Zr.slice(rt));return nr?(mr.p=Wr[nr[0].toLowerCase()],rt+nr[0].length):-1}function Fa(mr,Zr,rt){var nr=Na.exec(Zr.slice(rt));return nr?(mr.w=sa[nr[0].toLowerCase()],rt+nr[0].length):-1}function fa(mr,Zr,rt){var nr=Nt.exec(Zr.slice(rt));return nr?(mr.w=oa[nr[0].toLowerCase()],rt+nr[0].length):-1}function ai(mr,Zr,rt){var nr=ua.exec(Zr.slice(rt));return nr?(mr.m=Ja[nr[0].toLowerCase()],rt+nr[0].length):-1}function ni(mr,Zr,rt){var nr=Sn.exec(Zr.slice(rt));return nr?(mr.m=Za[nr[0].toLowerCase()],rt+nr[0].length):-1}function Qt(mr,Zr,rt){return vt(mr,fe,Zr,rt)}function it(mr,Zr,rt){return vt(mr,Se,Zr,rt)}function ma(mr,Zr,rt){return vt(mr,qe,Zr,rt)}function Do(mr){return sr[mr.getDay()]}function Eo(mr){return vr[mr.getDay()]}function Sl(mr){return Ur[mr.getMonth()]}function k0(mr){return Ar[mr.getMonth()]}function q0(mr){return ir[+(mr.getHours()>=12)]}function ac(mr){return 1+~~(mr.getMonth()/3)}function nc(mr){return sr[mr.getUTCDay()]}function ic(mr){return vr[mr.getUTCDay()]}function Ia(mr){return Ur[mr.getUTCMonth()]}function C0(mr){return Ar[mr.getUTCMonth()]}function tu(mr){return ir[+(mr.getUTCHours()>=12)]}function au(mr){return 1+~~(mr.getUTCMonth()/3)}return{format:function(mr){var Zr=bt(mr+="",gr);return Zr.toString=function(){return mr},Zr},parse:function(mr){var Zr=Lt(mr+="",!1);return Zr.toString=function(){return mr},Zr},utcFormat:function(mr){var Zr=bt(mr+="",ct);return Zr.toString=function(){return mr},Zr},utcParse:function(mr){var Zr=Lt(mr+="",!0);return Zr.toString=function(){return mr},Zr}}}var l={"-":"",_:" ",0:"0"},o=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(ne,fe,Se){var qe=ne<0?"-":"",ir=(qe?-ne:ne)+"",vr=ir.length;return qe+(vr68?1900:2e3),Se+qe[0].length):-1}function M(ne,fe,Se){var qe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(fe.slice(Se,Se+6));return qe?(ne.Z=qe[1]?0:-(qe[2]+(qe[3]||"00")),Se+qe[0].length):-1}function A(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+1));return qe?(ne.q=qe[0]*3-3,Se+qe[0].length):-1}function k(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.m=qe[0]-1,Se+qe[0].length):-1}function L(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.d=+qe[0],Se+qe[0].length):-1}function D(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+3));return qe?(ne.m=0,ne.d=+qe[0],Se+qe[0].length):-1}function E(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.H=+qe[0],Se+qe[0].length):-1}function R(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.M=+qe[0],Se+qe[0].length):-1}function z(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+2));return qe?(ne.S=+qe[0],Se+qe[0].length):-1}function H(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+3));return qe?(ne.L=+qe[0],Se+qe[0].length):-1}function O(ne,fe,Se){var qe=o.exec(fe.slice(Se,Se+6));return qe?(ne.L=Math.floor(qe[0]/1e3),Se+qe[0].length):-1}function U(ne,fe,Se){var qe=s.exec(fe.slice(Se,Se+1));return qe?Se+qe[0].length:-1}function V(ne,fe,Se){var qe=o.exec(fe.slice(Se));return qe?(ne.Q=+qe[0],Se+qe[0].length):-1}function Y(ne,fe,Se){var qe=o.exec(fe.slice(Se));return qe?(ne.s=+qe[0],Se+qe[0].length):-1}function I(ne,fe){return f(ne.getDate(),fe,2)}function G(ne,fe){return f(ne.getHours(),fe,2)}function Z(ne,fe){return f(ne.getHours()%12||12,fe,2)}function K(ne,fe){return f(1+r.timeDay.count(r.timeYear(ne),ne),fe,3)}function re(ne,fe){return f(ne.getMilliseconds(),fe,3)}function se(ne,fe){return re(ne,fe)+"000"}function ce(ne,fe){return f(ne.getMonth()+1,fe,2)}function le(ne,fe){return f(ne.getMinutes(),fe,2)}function Q(ne,fe){return f(ne.getSeconds(),fe,2)}function ge(ne){var fe=ne.getDay();return fe===0?7:fe}function ue(ne,fe){return f(r.timeSunday.count(r.timeYear(ne)-1,ne),fe,2)}function ke(ne,fe){var Se=ne.getDay();return ne=Se>=4||Se===0?r.timeThursday(ne):r.timeThursday.ceil(ne),f(r.timeThursday.count(r.timeYear(ne),ne)+(r.timeYear(ne).getDay()===4),fe,2)}function ve(ne){return ne.getDay()}function be(ne,fe){return f(r.timeMonday.count(r.timeYear(ne)-1,ne),fe,2)}function W(ne,fe){return f(ne.getFullYear()%100,fe,2)}function te(ne,fe){return f(ne.getFullYear()%1e4,fe,4)}function X(ne){var fe=ne.getTimezoneOffset();return(fe>0?"-":(fe*=-1,"+"))+f(fe/60|0,"0",2)+f(fe%60,"0",2)}function ye(ne,fe){return f(ne.getUTCDate(),fe,2)}function _e(ne,fe){return f(ne.getUTCHours(),fe,2)}function xe(ne,fe){return f(ne.getUTCHours()%12||12,fe,2)}function Ie(ne,fe){return f(1+r.utcDay.count(r.utcYear(ne),ne),fe,3)}function ze(ne,fe){return f(ne.getUTCMilliseconds(),fe,3)}function Re(ne,fe){return ze(ne,fe)+"000"}function He(ne,fe){return f(ne.getUTCMonth()+1,fe,2)}function Be(ne,fe){return f(ne.getUTCMinutes(),fe,2)}function Fe(ne,fe){return f(ne.getUTCSeconds(),fe,2)}function Ee(ne){var fe=ne.getUTCDay();return fe===0?7:fe}function Je(ne,fe){return f(r.utcSunday.count(r.utcYear(ne)-1,ne),fe,2)}function We(ne,fe){var Se=ne.getUTCDay();return ne=Se>=4||Se===0?r.utcThursday(ne):r.utcThursday.ceil(ne),f(r.utcThursday.count(r.utcYear(ne),ne)+(r.utcYear(ne).getUTCDay()===4),fe,2)}function ie(ne){return ne.getUTCDay()}function Ae(ne,fe){return f(r.utcMonday.count(r.utcYear(ne)-1,ne),fe,2)}function Ce(ne,fe){return f(ne.getUTCFullYear()%100,fe,2)}function cr(ne,fe){return f(ne.getUTCFullYear()%1e4,fe,4)}function tr(){return"+0000"}function De(){return"%"}function Le(ne){return+ne}function Ye(ne){return Math.floor(+ne/1e3)}var Xe;Ge({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 Ge(ne){return Xe=i(ne),e.timeFormat=Xe.format,e.timeParse=Xe.parse,e.utcFormat=Xe.utcFormat,e.utcParse=Xe.utcParse,Xe}var Oe="%Y-%m-%dT%H:%M:%S.%LZ";function $e(ne){return ne.toISOString()}var fr=Date.prototype.toISOString?$e:e.utcFormat(Oe);function lr(ne){var fe=new Date(ne);return isNaN(fe)?null:fe}var Ne=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(Oe);e.isoFormat=fr,e.isoParse=Ne,e.timeFormatDefaultLocale=Ge,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var Ay=B((ah,J4)=>{(function(e,r){typeof ah=="object"&&typeof J4!="undefined"?r(ah):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(ah,function(e){"use strict";function r(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString("en").replace(/,/g,""):k.toString(10)}function t(k,L){if((D=(k=L?k.toExponential(L-1):k.toExponential()).indexOf("e"))<0)return null;var D,E=k.slice(0,D);return[E.length>1?E[0]+E.slice(2):E,+k.slice(D+1)]}function a(k){return k=t(Math.abs(k)),k?k[1]:NaN}function n(k,L){return function(D,E){for(var R=D.length,z=[],H=0,O=k[0],U=0;R>0&&O>0&&(U+O+1>E&&(O=Math.max(1,E-U)),z.push(D.substring(R-=O,R+O)),!((U+=O+1)>E));)O=k[H=(H+1)%k.length];return z.reverse().join(L)}}function i(k){return function(L){return L.replace(/[0-9]/g,function(D){return k[+D]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(k){if(!(L=l.exec(k)))throw new Error("invalid format: "+k);var L;return new s({fill:L[1],align:L[2],sign:L[3],symbol:L[4],zero:L[5],width:L[6],comma:L[7],precision:L[8]&&L[8].slice(1),trim:L[9],type:L[10]})}o.prototype=s.prototype;function s(k){this.fill=k.fill===void 0?" ":k.fill+"",this.align=k.align===void 0?">":k.align+"",this.sign=k.sign===void 0?"-":k.sign+"",this.symbol=k.symbol===void 0?"":k.symbol+"",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?"":k.type+""}s.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(k){e:for(var L=k.length,D=1,E=-1,R;D0&&(E=0);break}return E>0?k.slice(0,E)+k.slice(R+1):k}var f;function c(k,L){var D=t(k,L);if(!D)return k+"";var E=D[0],R=D[1],z=R-(f=Math.max(-8,Math.min(8,Math.floor(R/3)))*3)+1,H=E.length;return z===H?E:z>H?E+new Array(z-H+1).join("0"):z>0?E.slice(0,z)+"."+E.slice(z):"0."+new Array(1-z).join("0")+t(k,Math.max(0,L+z-1))[0]}function h(k,L){var D=t(k,L);if(!D)return k+"";var E=D[0],R=D[1];return R<0?"0."+new Array(-R).join("0")+E:E.length>R+1?E.slice(0,R+1)+"."+E.slice(R+1):E+new Array(R-E.length+2).join("0")}var d={"%":function(k,L){return(k*100).toFixed(L)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,L){return k.toExponential(L)},f:function(k,L){return k.toFixed(L)},g:function(k,L){return k.toPrecision(L)},o:function(k){return Math.round(k).toString(8)},p:function(k,L){return h(k*100,L)},r:h,s:c,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function p(k){return k}var y=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(k){var L=k.grouping===void 0||k.thousands===void 0?p:n(y.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",E=k.currency===void 0?"":k.currency[1]+"",R=k.decimal===void 0?".":k.decimal+"",z=k.numerals===void 0?p:i(y.call(k.numerals,String)),H=k.percent===void 0?"%":k.percent+"",O=k.minus===void 0?"-":k.minus+"",U=k.nan===void 0?"NaN":k.nan+"";function V(I){I=o(I);var G=I.fill,Z=I.align,K=I.sign,re=I.symbol,se=I.zero,ce=I.width,le=I.comma,Q=I.precision,ge=I.trim,ue=I.type;ue==="n"?(le=!0,ue="g"):d[ue]||(Q===void 0&&(Q=12),ge=!0,ue="g"),(se||G==="0"&&Z==="=")&&(se=!0,G="0",Z="=");var ke=re==="$"?D:re==="#"&&/[boxX]/.test(ue)?"0"+ue.toLowerCase():"",ve=re==="$"?E:/[%p]/.test(ue)?H:"",be=d[ue],W=/[defgprs%]/.test(ue);Q=Q===void 0?6:/[gprs]/.test(ue)?Math.max(1,Math.min(21,Q)):Math.max(0,Math.min(20,Q));function te(X){var ye=ke,_e=ve,xe,Ie,ze;if(ue==="c")_e=be(X)+_e,X="";else{X=+X;var Re=X<0||1/X<0;if(X=isNaN(X)?U:be(Math.abs(X),Q),ge&&(X=u(X)),Re&&+X==0&&K!=="+"&&(Re=!1),ye=(Re?K==="("?K:O:K==="-"||K==="("?"":K)+ye,_e=(ue==="s"?m[8+f/3]:"")+_e+(Re&&K==="("?")":""),W){for(xe=-1,Ie=X.length;++xeze||ze>57){_e=(ze===46?R+X.slice(xe+1):X.slice(xe))+_e,X=X.slice(0,xe);break}}}le&&!se&&(X=L(X,1/0));var He=ye.length+X.length+_e.length,Be=He>1)+ye+X+_e+Be.slice(He);break;default:X=Be+ye+X+_e;break}return z(X)}return te.toString=function(){return I+""},te}function Y(I,G){var Z=V((I=o(I),I.type="f",I)),K=Math.max(-8,Math.min(8,Math.floor(a(G)/3)))*3,re=Math.pow(10,-K),se=m[8+K/3];return function(ce){return Z(re*ce)+se}}return{format:V,formatPrefix:Y}}var b;T({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function T(k){return b=_(k),e.format=b.format,e.formatPrefix=b.formatPrefix,b}function x(k){return Math.max(0,-a(Math.abs(k)))}function M(k,L){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(L)/3)))*3-a(Math.abs(k)))}function A(k,L){return k=Math.abs(k),L=Math.abs(L)-k,Math.max(0,a(L)-a(k))+1}e.FormatSpecifier=s,e.formatDefaultLocale=T,e.formatLocale=_,e.formatSpecifier=o,e.precisionFixed=x,e.precisionPrefix=M,e.precisionRound=A,Object.defineProperty(e,"__esModule",{value:!0})})});var K4=B((zpe,$4)=>{"use strict";$4.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var zr=B((Npe,Q4)=>{"use strict";var QW=K4();Q4.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&QW(t))return!1}else if(r!=="number")return!1;return e-e<1}});var wt=B((Fpe,j4)=>{"use strict";j4.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 ky=B((nh,e6)=>{(function(e,r){typeof nh=="object"&&typeof e6!="undefined"?r(nh):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(nh,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(o[s]&3)<<4|o[s+1]>>4],f+=r[(o[s+1]&15)<<2|o[s+2]>>6],f+=r[o[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(l){var o=l.length*.75,s=l.length,u,f=0,c,h,d,p;l[l.length-1]==="="&&(o--,l[l.length-2]==="="&&o--);var y=new ArrayBuffer(o),m=new Uint8Array(y);for(u=0;u>4,m[f++]=(h&15)<<4|d>>2,m[f++]=(d&3)<<6|p&63;return y};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var Pl=B((Ipe,r6)=>{"use strict";r6.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var gn=B(si=>{"use strict";var jW=ky().decode,eX=Pl(),qy=Array.isArray,rX=ArrayBuffer,tX=DataView;function t6(e){return rX.isView(e)&&!(e instanceof tX)}si.isTypedArray=t6;function ih(e){return qy(e)||t6(e)}si.isArrayOrTypedArray=ih;function aX(e){return!ih(e[0])}si.isArray1D=aX;si.ensureArray=function(e,r){return qy(e)||(e=[]),e.length=r,e};var ca={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};ca.uint8c=ca.u1c;ca.uint8=ca.u1;ca.int8=ca.i1;ca.uint16=ca.u2;ca.int16=ca.i2;ca.uint32=ca.u4;ca.int32=ca.i4;ca.float32=ca.f4;ca.float64=ca.f8;function Cy(e){return e.constructor===ArrayBuffer}si.isArrayBuffer=Cy;si.decodeTypedArraySpec=function(e){var r=[],t=nX(e),a=t.dtype,n=ca[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;Cy(l)||(l=jW(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,c=+o[0],h=i*c,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var n6=zr(),Sy=gn().isArrayOrTypedArray;s6.exports=function(r,t){if(n6(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o{"use strict";var vu=lh(),uX=/^\w*$/,fX=0,u6=1,oh=2,f6=3,Ho=4;c6.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,l,o,s={};t&&t.length?(o=vu(r,t),l=o.get()):l=r,t=t||"";var u={};if(l)for(i=0;i2)return s[d]=s[d]|oh,c.set(h,null);if(f){for(i=d;i{"use strict";var cX=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,vX=/^[^\.\[\]]+$/;h6.exports=function(e,r){for(;r;){var t=e.match(cX);if(t)e=t[1];else if(e.match(vX))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var sh=B((Gpe,p6)=>{"use strict";var hX=zr();p6.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return hX(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var g6=B((Upe,y6)=>{"use strict";var m6=gn().isArrayOrTypedArray,pc=Pl();y6.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(m6(n)&&m6(i)&&pc(n[0])){if(a==="customdata"||a==="ids")continue;for(var l=Math.min(n.length,i.length),o=0;o{"use strict";function dX(e,r){var t=e%r;return t<0?t+r:t}function pX(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}x6.exports={mod:dX,modHalf:pX}});var Rn=B((Wpe,uh)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,l=e.max,o=e.random;function s(W,te){if(W=W||"",te=te||{},W instanceof s)return W;if(!(this instanceof s))return new s(W,te);var X=u(W);this._originalInput=W,this._r=X.r,this._g=X.g,this._b=X.b,this._a=X.a,this._roundA=n(100*this._a)/100,this._format=te.format||X.format,this._gradientType=te.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=X.ok,this._tc_id=a++}s.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),te,X,ye,_e,xe,Ie;return te=W.r/255,X=W.g/255,ye=W.b/255,te<=.03928?_e=te/12.92:_e=e.pow((te+.055)/1.055,2.4),X<=.03928?xe=X/12.92:xe=e.pow((X+.055)/1.055,2.4),ye<=.03928?Ie=ye/12.92:Ie=e.pow((ye+.055)/1.055,2.4),.2126*_e+.7152*xe+.0722*Ie},setAlpha:function(W){return this._a=I(W),this._roundA=n(100*this._a)/100,this},toHsv:function(){var W=d(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=d(this._r,this._g,this._b),te=n(W.h*360),X=n(W.s*100),ye=n(W.v*100);return this._a==1?"hsv("+te+", "+X+"%, "+ye+"%)":"hsva("+te+", "+X+"%, "+ye+"%, "+this._roundA+")"},toHsl:function(){var W=c(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=c(this._r,this._g,this._b),te=n(W.h*360),X=n(W.s*100),ye=n(W.l*100);return this._a==1?"hsl("+te+", "+X+"%, "+ye+"%)":"hsla("+te+", "+X+"%, "+ye+"%, "+this._roundA+")"},toHex:function(W){return y(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return m(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(G(this._r,255)*100)+"%",g:n(G(this._g,255)*100)+"%",b:n(G(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(G(this._r,255)*100)+"%, "+n(G(this._g,255)*100)+"%, "+n(G(this._b,255)*100)+"%)":"rgba("+n(G(this._r,255)*100)+"%, "+n(G(this._g,255)*100)+"%, "+n(G(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:V[y(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var te="#"+_(this._r,this._g,this._b,this._a),X=te,ye=this._gradientType?"GradientType = 1, ":"";if(W){var _e=s(W);X="#"+_(_e._r,_e._g,_e._b,_e._a)}return"progid:DXImageTransform.Microsoft.gradient("+ye+"startColorstr="+te+",endColorstr="+X+")"},toString:function(W){var te=!!W;W=W||this._format;var X=!1,ye=this._a<1&&this._a>=0,_e=!te&&ye&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return _e?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(X=this.toRgbString()),W==="prgb"&&(X=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(X=this.toHexString()),W==="hex3"&&(X=this.toHexString(!0)),W==="hex4"&&(X=this.toHex8String(!0)),W==="hex8"&&(X=this.toHex8String()),W==="name"&&(X=this.toName()),W==="hsl"&&(X=this.toHslString()),W==="hsv"&&(X=this.toHsvString()),X||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(W,te){var X=W.apply(null,[this].concat([].slice.call(te)));return this._r=X._r,this._g=X._g,this._b=X._b,this.setAlpha(X._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(L,arguments)},_applyCombination:function(W,te){return W.apply(null,[this].concat([].slice.call(te)))},analogous:function(){return this._applyCombination(H,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},s.fromRatio=function(W,te){if(typeof W=="object"){var X={};for(var ye in W)W.hasOwnProperty(ye)&&(ye==="a"?X[ye]=W[ye]:X[ye]=le(W[ye]));W=X}return s(W,te)};function u(W){var te={r:0,g:0,b:0},X=1,ye=null,_e=null,xe=null,Ie=!1,ze=!1;return typeof W=="string"&&(W=ve(W)),typeof W=="object"&&(ke(W.r)&&ke(W.g)&&ke(W.b)?(te=f(W.r,W.g,W.b),Ie=!0,ze=String(W.r).substr(-1)==="%"?"prgb":"rgb"):ke(W.h)&&ke(W.s)&&ke(W.v)?(ye=le(W.s),_e=le(W.v),te=p(W.h,ye,_e),Ie=!0,ze="hsv"):ke(W.h)&&ke(W.s)&&ke(W.l)&&(ye=le(W.s),xe=le(W.l),te=h(W.h,ye,xe),Ie=!0,ze="hsl"),W.hasOwnProperty("a")&&(X=W.a)),X=I(X),{ok:Ie,format:W.format||ze,r:i(255,l(te.r,0)),g:i(255,l(te.g,0)),b:i(255,l(te.b,0)),a:X}}function f(W,te,X){return{r:G(W,255)*255,g:G(te,255)*255,b:G(X,255)*255}}function c(W,te,X){W=G(W,255),te=G(te,255),X=G(X,255);var ye=l(W,te,X),_e=i(W,te,X),xe,Ie,ze=(ye+_e)/2;if(ye==_e)xe=Ie=0;else{var Re=ye-_e;switch(Ie=ze>.5?Re/(2-ye-_e):Re/(ye+_e),ye){case W:xe=(te-X)/Re+(te1&&(Fe-=1),Fe<1/6?He+(Be-He)*6*Fe:Fe<1/2?Be:Fe<2/3?He+(Be-He)*(2/3-Fe)*6:He}if(te===0)ye=_e=xe=X;else{var ze=X<.5?X*(1+te):X+te-X*te,Re=2*X-ze;ye=Ie(Re,ze,W+1/3),_e=Ie(Re,ze,W),xe=Ie(Re,ze,W-1/3)}return{r:ye*255,g:_e*255,b:xe*255}}function d(W,te,X){W=G(W,255),te=G(te,255),X=G(X,255);var ye=l(W,te,X),_e=i(W,te,X),xe,Ie,ze=ye,Re=ye-_e;if(Ie=ye===0?0:Re/ye,ye==_e)xe=0;else{switch(ye){case W:xe=(te-X)/Re+(te>1)+720)%360;--te;)ye.h=(ye.h+_e)%360,xe.push(s(ye));return xe}function O(W,te){te=te||6;for(var X=s(W).toHsv(),ye=X.h,_e=X.s,xe=X.v,Ie=[],ze=1/te;te--;)Ie.push(s({h:ye,s:_e,v:xe})),xe=(xe+ze)%1;return Ie}s.mix=function(W,te,X){X=X===0?0:X||50;var ye=s(W).toRgb(),_e=s(te).toRgb(),xe=X/100,Ie={r:(_e.r-ye.r)*xe+ye.r,g:(_e.g-ye.g)*xe+ye.g,b:(_e.b-ye.b)*xe+ye.b,a:(_e.a-ye.a)*xe+ye.a};return s(Ie)},s.readability=function(W,te){var X=s(W),ye=s(te);return(e.max(X.getLuminance(),ye.getLuminance())+.05)/(e.min(X.getLuminance(),ye.getLuminance())+.05)},s.isReadable=function(W,te,X){var ye=s.readability(W,te),_e,xe;switch(xe=!1,_e=be(X),_e.level+_e.size){case"AAsmall":case"AAAlarge":xe=ye>=4.5;break;case"AAlarge":xe=ye>=3;break;case"AAAsmall":xe=ye>=7;break}return xe},s.mostReadable=function(W,te,X){var ye=null,_e=0,xe,Ie,ze,Re;X=X||{},Ie=X.includeFallbackColors,ze=X.level,Re=X.size;for(var He=0;He_e&&(_e=xe,ye=s(te[He]));return s.isReadable(W,ye,{level:ze,size:Re})||!Ie?ye:(X.includeFallbackColors=!1,s.mostReadable(W,["#fff","#000"],X))};var U=s.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"},V=s.hexNames=Y(U);function Y(W){var te={};for(var X in W)W.hasOwnProperty(X)&&(te[W[X]]=X);return te}function I(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function G(W,te){re(W)&&(W="100%");var X=se(W);return W=i(te,l(0,parseFloat(W))),X&&(W=parseInt(W*te,10)/100),e.abs(W-te)<1e-6?1:W%te/parseFloat(te)}function Z(W){return i(1,l(0,W))}function K(W){return parseInt(W,16)}function re(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function se(W){return typeof W=="string"&&W.indexOf("%")!=-1}function ce(W){return W.length==1?"0"+W:""+W}function le(W){return W<=1&&(W=W*100+"%"),W}function Q(W){return e.round(parseFloat(W)*255).toString(16)}function ge(W){return K(W)/255}var ue=function(){var W="[-\\+]?\\d+%?",te="[-\\+]?\\d*\\.\\d+%?",X="(?:"+te+")|(?:"+W+")",ye="[\\s|\\(]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")\\s*\\)?",_e="[\\s|\\(]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")[,|\\s]+("+X+")\\s*\\)?";return{CSS_UNIT:new RegExp(X),rgb:new RegExp("rgb"+ye),rgba:new RegExp("rgba"+_e),hsl:new RegExp("hsl"+ye),hsla:new RegExp("hsla"+_e),hsv:new RegExp("hsv"+ye),hsva:new RegExp("hsva"+_e),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 ke(W){return!!ue.CSS_UNIT.exec(W)}function ve(W){W=W.replace(r,"").replace(t,"").toLowerCase();var te=!1;if(U[W])W=U[W],te=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var X;return(X=ue.rgb.exec(W))?{r:X[1],g:X[2],b:X[3]}:(X=ue.rgba.exec(W))?{r:X[1],g:X[2],b:X[3],a:X[4]}:(X=ue.hsl.exec(W))?{h:X[1],s:X[2],l:X[3]}:(X=ue.hsla.exec(W))?{h:X[1],s:X[2],l:X[3],a:X[4]}:(X=ue.hsv.exec(W))?{h:X[1],s:X[2],v:X[3]}:(X=ue.hsva.exec(W))?{h:X[1],s:X[2],v:X[3],a:X[4]}:(X=ue.hex8.exec(W))?{r:K(X[1]),g:K(X[2]),b:K(X[3]),a:ge(X[4]),format:te?"name":"hex8"}:(X=ue.hex6.exec(W))?{r:K(X[1]),g:K(X[2]),b:K(X[3]),format:te?"name":"hex"}:(X=ue.hex4.exec(W))?{r:K(X[1]+""+X[1]),g:K(X[2]+""+X[2]),b:K(X[3]+""+X[3]),a:ge(X[4]+""+X[4]),format:te?"name":"hex8"}:(X=ue.hex3.exec(W))?{r:K(X[1]+""+X[1]),g:K(X[2]+""+X[2]),b:K(X[3]+""+X[3]),format:te?"name":"hex"}:!1}function be(W){var te,X;return W=W||{level:"AA",size:"small"},te=(W.level||"AA").toUpperCase(),X=(W.size||"small").toLowerCase(),te!=="AA"&&te!=="AAA"&&(te="AA"),X!=="small"&&X!=="large"&&(X="small"),{level:te,size:X}}typeof uh!="undefined"&&uh.exports?uh.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var mt=B(gc=>{"use strict";var b6=Pl(),mc=Array.isArray;function mX(e,r){var t,a;for(t=0;t{"use strict";_6.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var xc=B((Jpe,w6)=>{"use strict";w6.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var du=B(($pe,A6)=>{"use strict";var T6=xc(),M6=jt(),Dy=M6({editType:"none"});Dy.family.dflt=T6.HOVERFONT;Dy.size.dflt=T6.HOVERFONTSIZE;A6.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:Dy,grouptitlefont:M6({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var bc=B((Kpe,k6)=>{"use strict";var yX=jt(),fh=du().hoverlabel,ch=mt().extendFlat;k6.exports={hoverlabel:{bgcolor:ch({},fh.bgcolor,{arrayOk:!0}),bordercolor:ch({},fh.bordercolor,{arrayOk:!0}),font:yX({arrayOk:!0,editType:"none"}),align:ch({},fh.align,{arrayOk:!0}),namelength:ch({},fh.namelength,{arrayOk:!0}),editType:"none"}}});var tn=B((Qpe,q6)=>{"use strict";var gX=jt(),xX=bc();q6.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:gX({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:xX.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 Oo=B((jpe,S6)=>{"use strict";var bX=Rn(),vh={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)"]]},C6=vh.RdBu;function _X(e,r){if(r||(r=C6),!e)return r;function t(){try{e=vh[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),L6(e)?e:r}function L6(e){var r=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 t=0;t{"use strict";Bo.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Bo.defaultLine="#444";Bo.lightLine="#eee";Bo.background="#fff";Bo.borderLine="#BEC8D9";Bo.lightFraction=100*10/11});var xr=B((rme,D6)=>{"use strict";var an=Rn(),TX=zr(),MX=gn().isTypedArray,ea=D6.exports={},hh=zn();ea.defaults=hh.defaults;var AX=ea.defaultLine=hh.defaultLine;ea.lightLine=hh.lightLine;var Py=ea.background=hh.background;ea.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};ea.rgb=function(e){return ea.tinyRGB(an(e))};ea.opacity=function(e){return e?an(e).getAlpha():0};ea.addOpacity=function(e,r){var t=an(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};ea.combine=function(e,r){var t=an(e).toRgb();if(t.a===1)return an(e).toRgbString();var a=an(r||Py).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return an(i).toRgbString()};ea.interpolate=function(e,r,t){var a=an(e).toRgb(),n=an(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return an(i).toRgbString()};ea.contrast=function(e,r,t){var a=an(e);a.getAlpha()!==1&&(a=an(ea.combine(e,Py)));var n=a.isDark()?r?a.lighten(r):Py:t?a.darken(t):AX;return n.toString()};ea.stroke=function(e,r){var t=an(r);e.style({stroke:ea.tinyRGB(t),"stroke-opacity":t.getAlpha()})};ea.fill=function(e,r){var t=an(r);e.style({fill:ea.tinyRGB(t),"fill-opacity":t.getAlpha()})};ea.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var l=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+l+", "+a[3]+")":"rgb("+l+")"}});var pu=B((tme,E6)=>{"use strict";E6.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var mu=B(P6=>{"use strict";P6.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var F6=B(nn=>{"use strict";var Ry=zr(),R6=Rn(),z6=mt().extendFlat,kX=tn(),qX=Oo(),CX=xr(),LX=pu().DESELECTDIM,yu=lh(),N6=mu().counter,SX=hu().modHalf,Ni=gn().isArrayOrTypedArray,Rl=gn().isTypedArraySpec,zl=gn().decodeTypedArraySpec;nn.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(Ni(e)?e:Rl(e)?zl(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}Rl(e)&&(e=zl(e)),e%1||!Ry(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Rl(e)&&(e=zl(e)),R6(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return R6(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(qX.get(e,t))}},angle:{coerceFunction:function(e,r,t){Rl(e)&&(e=zl(e)),e==="auto"?r.set("auto"):Ry(e)?r.set(SX(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||N6(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!N6(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var I6={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/"},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:{}}},H6={};function O6(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),O6(a,r[t]))}}O6(I6,H6);B6.exports={configAttributes:I6,dfltConfig:H6}});var Ny=B((lme,Y6)=>{"use strict";var zy=kr(),DX=zr(),_c=[];Y6.exports=function(e,r){if(_c.indexOf(e)!==-1)return;_c.push(e);var t=1e3;DX(r)?t=r:r==="long"&&(t=3e3);var a=zy.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(_c);function i(l){l.duration(700).style("opacity",0).each("end",function(o){var s=_c.indexOf(o);s!==-1&&_c.splice(s,1),zy.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var o=zy.select(this);o.append("button").classed("notifier-close",!0).html("×").on("click",function(){o.transition().call(i)});for(var s=o.append("p"),u=l.split(//g),f=0;f{"use strict";var gu=Yo().dfltConfig,Fy=Ny(),Iy=G6.exports={};Iy.log=function(){var e;if(gu.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};Iy.warn=function(){var e;if(gu.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};Iy.error=function(){var e;if(gu.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var ph=B((sme,U6)=>{"use strict";U6.exports=function(){}});var Hy=B((ume,V6)=>{"use strict";V6.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{W6.exports=EX;function EX(){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 J6=B((cme,Z6)=>{Z6.exports=PX;function PX(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var K6=B((vme,$6)=>{$6.exports=RX;function RX(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var Oy=B((hme,Q6)=>{Q6.exports=zX;function zX(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 e7=B((dme,j6)=>{j6.exports=NX;function NX(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],l=r[7],o=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=l,e[14]=o}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var t7=B((pme,r7)=>{r7.exports=FX;function FX(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],y=r[13],m=r[14],_=r[15],b=t*o-a*l,T=t*s-n*l,x=t*u-i*l,M=a*s-n*o,A=a*u-i*o,k=n*u-i*s,L=f*y-c*p,D=f*m-h*p,E=f*_-d*p,R=c*m-h*y,z=c*_-d*y,H=h*_-d*m,O=b*H-T*z+x*R+M*E-A*D+k*L;return O?(O=1/O,e[0]=(o*H-s*z+u*R)*O,e[1]=(n*z-a*H-i*R)*O,e[2]=(y*k-m*A+_*M)*O,e[3]=(h*A-c*k-d*M)*O,e[4]=(s*E-l*H-u*D)*O,e[5]=(t*H-n*E+i*D)*O,e[6]=(m*x-p*k-_*T)*O,e[7]=(f*k-h*x+d*T)*O,e[8]=(l*z-o*E+u*L)*O,e[9]=(a*E-t*z-i*L)*O,e[10]=(p*A-y*x+_*b)*O,e[11]=(c*x-f*A-d*b)*O,e[12]=(o*D-l*R-s*L)*O,e[13]=(t*R-a*D+n*L)*O,e[14]=(y*T-p*M-m*b)*O,e[15]=(f*M-c*T+h*b)*O,e):null}});var n7=B((mme,a7)=>{a7.exports=IX;function IX(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=r[4],o=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],y=r[13],m=r[14],_=r[15];return e[0]=o*(h*_-d*m)-c*(s*_-u*m)+y*(s*d-u*h),e[1]=-(a*(h*_-d*m)-c*(n*_-i*m)+y*(n*d-i*h)),e[2]=a*(s*_-u*m)-o*(n*_-i*m)+y*(n*u-i*s),e[3]=-(a*(s*d-u*h)-o*(n*d-i*h)+c*(n*u-i*s)),e[4]=-(l*(h*_-d*m)-f*(s*_-u*m)+p*(s*d-u*h)),e[5]=t*(h*_-d*m)-f*(n*_-i*m)+p*(n*d-i*h),e[6]=-(t*(s*_-u*m)-l*(n*_-i*m)+p*(n*u-i*s)),e[7]=t*(s*d-u*h)-l*(n*d-i*h)+f*(n*u-i*s),e[8]=l*(c*_-d*y)-f*(o*_-u*y)+p*(o*d-u*c),e[9]=-(t*(c*_-d*y)-f*(a*_-i*y)+p*(a*d-i*c)),e[10]=t*(o*_-u*y)-l*(a*_-i*y)+p*(a*u-i*o),e[11]=-(t*(o*d-u*c)-l*(a*d-i*c)+f*(a*u-i*o)),e[12]=-(l*(c*m-h*y)-f*(o*m-s*y)+p*(o*h-s*c)),e[13]=t*(c*m-h*y)-f*(a*m-n*y)+p*(a*h-n*c),e[14]=-(t*(o*m-s*y)-l*(a*m-n*y)+p*(a*s-n*o)),e[15]=t*(o*h-s*c)-l*(a*h-n*c)+f*(a*s-n*o),e}});var l7=B((yme,i7)=>{i7.exports=HX;function HX(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],l=e[5],o=e[6],s=e[7],u=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],y=e[14],m=e[15],_=r*l-t*i,b=r*o-a*i,T=r*s-n*i,x=t*o-a*l,M=t*s-n*l,A=a*s-n*o,k=u*p-f*d,L=u*y-c*d,D=u*m-h*d,E=f*y-c*p,R=f*m-h*p,z=c*m-h*y;return _*z-b*R+T*E+x*D-M*L+A*k}});var s7=B((gme,o7)=>{o7.exports=OX;function OX(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=r[4],s=r[5],u=r[6],f=r[7],c=r[8],h=r[9],d=r[10],p=r[11],y=r[12],m=r[13],_=r[14],b=r[15],T=t[0],x=t[1],M=t[2],A=t[3];return e[0]=T*a+x*o+M*c+A*y,e[1]=T*n+x*s+M*h+A*m,e[2]=T*i+x*u+M*d+A*_,e[3]=T*l+x*f+M*p+A*b,T=t[4],x=t[5],M=t[6],A=t[7],e[4]=T*a+x*o+M*c+A*y,e[5]=T*n+x*s+M*h+A*m,e[6]=T*i+x*u+M*d+A*_,e[7]=T*l+x*f+M*p+A*b,T=t[8],x=t[9],M=t[10],A=t[11],e[8]=T*a+x*o+M*c+A*y,e[9]=T*n+x*s+M*h+A*m,e[10]=T*i+x*u+M*d+A*_,e[11]=T*l+x*f+M*p+A*b,T=t[12],x=t[13],M=t[14],A=t[15],e[12]=T*a+x*o+M*c+A*y,e[13]=T*n+x*s+M*h+A*m,e[14]=T*i+x*u+M*d+A*_,e[15]=T*l+x*f+M*p+A*b,e}});var f7=B((xme,u7)=>{u7.exports=BX;function BX(e,r,t){var a=t[0],n=t[1],i=t[2],l,o,s,u,f,c,h,d,p,y,m,_;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(l=r[0],o=r[1],s=r[2],u=r[3],f=r[4],c=r[5],h=r[6],d=r[7],p=r[8],y=r[9],m=r[10],_=r[11],e[0]=l,e[1]=o,e[2]=s,e[3]=u,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=y,e[10]=m,e[11]=_,e[12]=l*a+f*n+p*i+r[12],e[13]=o*a+c*n+y*i+r[13],e[14]=s*a+h*n+m*i+r[14],e[15]=u*a+d*n+_*i+r[15]),e}});var v7=B((bme,c7)=>{c7.exports=YX;function YX(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var d7=B((_me,h7)=>{h7.exports=GX;function GX(e,r,t,a){var n=a[0],i=a[1],l=a[2],o=Math.sqrt(n*n+i*i+l*l),s,u,f,c,h,d,p,y,m,_,b,T,x,M,A,k,L,D,E,R,z,H,O,U;return Math.abs(o)<1e-6?null:(o=1/o,n*=o,i*=o,l*=o,s=Math.sin(t),u=Math.cos(t),f=1-u,c=r[0],h=r[1],d=r[2],p=r[3],y=r[4],m=r[5],_=r[6],b=r[7],T=r[8],x=r[9],M=r[10],A=r[11],k=n*n*f+u,L=i*n*f+l*s,D=l*n*f-i*s,E=n*i*f-l*s,R=i*i*f+u,z=l*i*f+n*s,H=n*l*f+i*s,O=i*l*f-n*s,U=l*l*f+u,e[0]=c*k+y*L+T*D,e[1]=h*k+m*L+x*D,e[2]=d*k+_*L+M*D,e[3]=p*k+b*L+A*D,e[4]=c*E+y*R+T*z,e[5]=h*E+m*R+x*z,e[6]=d*E+_*R+M*z,e[7]=p*E+b*R+A*z,e[8]=c*H+y*O+T*U,e[9]=h*H+m*O+x*U,e[10]=d*H+_*O+M*U,e[11]=p*H+b*O+A*U,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var m7=B((wme,p7)=>{p7.exports=UX;function UX(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],l=r[5],o=r[6],s=r[7],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=l*n+f*a,e[6]=o*n+c*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=f*n-l*a,e[10]=c*n-o*a,e[11]=h*n-s*a,e}});var g7=B((Tme,y7)=>{y7.exports=VX;function VX(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=l*n-f*a,e[2]=o*n-c*a,e[3]=s*n-h*a,e[8]=i*a+u*n,e[9]=l*a+f*n,e[10]=o*a+c*n,e[11]=s*a+h*n,e}});var b7=B((Mme,x7)=>{x7.exports=WX;function WX(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],l=r[1],o=r[2],s=r[3],u=r[4],f=r[5],c=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=l*n+f*a,e[2]=o*n+c*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=f*n-l*a,e[6]=c*n-o*a,e[7]=h*n-s*a,e}});var w7=B((Ame,_7)=>{_7.exports=XX;function XX(e,r,t){var a,n,i,l=t[0],o=t[1],s=t[2],u=Math.sqrt(l*l+o*o+s*s);return Math.abs(u)<1e-6?null:(u=1/u,l*=u,o*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=l*l*i+n,e[1]=o*l*i+s*a,e[2]=s*l*i-o*a,e[3]=0,e[4]=l*o*i-s*a,e[5]=o*o*i+n,e[6]=s*o*i+l*a,e[7]=0,e[8]=l*s*i+o*a,e[9]=o*s*i-l*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var M7=B((kme,T7)=>{T7.exports=ZX;function ZX(e,r,t){var a=r[0],n=r[1],i=r[2],l=r[3],o=a+a,s=n+n,u=i+i,f=a*o,c=a*s,h=a*u,d=n*s,p=n*u,y=i*u,m=l*o,_=l*s,b=l*u;return e[0]=1-(d+y),e[1]=c+b,e[2]=h-_,e[3]=0,e[4]=c-b,e[5]=1-(f+y),e[6]=p+m,e[7]=0,e[8]=h+_,e[9]=p-m,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var k7=B((qme,A7)=>{A7.exports=JX;function JX(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var C7=B((Cme,q7)=>{q7.exports=$X;function $X(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var S7=B((Lme,L7)=>{L7.exports=KX;function KX(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var E7=B((Sme,D7)=>{D7.exports=QX;function QX(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var R7=B((Dme,P7)=>{P7.exports=jX;function jX(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 By=B((Eme,z7)=>{z7.exports=eZ;function eZ(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],l=t+t,o=a+a,s=n+n,u=t*l,f=a*l,c=a*o,h=n*l,d=n*o,p=n*s,y=i*l,m=i*o,_=i*s;return e[0]=1-c-p,e[1]=f+_,e[2]=h-m,e[3]=0,e[4]=f-_,e[5]=1-u-p,e[6]=d+y,e[7]=0,e[8]=h+m,e[9]=d-y,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var F7=B((Pme,N7)=>{N7.exports=rZ;function rZ(e,r,t,a,n,i,l){var o=1/(t-r),s=1/(n-a),u=1/(i-l);return e[0]=i*2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*o,e[9]=(n+a)*s,e[10]=(l+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*i*2*u,e[15]=0,e}});var H7=B((Rme,I7)=>{I7.exports=tZ;function tZ(e,r,t,a,n){var i=1/Math.tan(r/2),l=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*l,e[15]=0,e}});var B7=B((zme,O7)=>{O7.exports=aZ;function aZ(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),l=Math.tan(r.leftDegrees*Math.PI/180),o=Math.tan(r.rightDegrees*Math.PI/180),s=2/(l+o),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((l-o)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var G7=B((Nme,Y7)=>{Y7.exports=nZ;function nZ(e,r,t,a,n,i,l){var o=1/(r-t),s=1/(a-n),u=1/(i-l);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*o,e[13]=(n+a)*s,e[14]=(l+i)*u,e[15]=1,e}});var V7=B((Fme,U7)=>{var iZ=Oy();U7.exports=lZ;function lZ(e,r,t,a){var n,i,l,o,s,u,f,c,h,d,p=r[0],y=r[1],m=r[2],_=a[0],b=a[1],T=a[2],x=t[0],M=t[1],A=t[2];return Math.abs(p-x)<1e-6&&Math.abs(y-M)<1e-6&&Math.abs(m-A)<1e-6?iZ(e):(f=p-x,c=y-M,h=m-A,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,n=b*h-T*c,i=T*f-_*h,l=_*c-b*f,d=Math.sqrt(n*n+i*i+l*l),d?(d=1/d,n*=d,i*=d,l*=d):(n=0,i=0,l=0),o=c*l-h*i,s=h*n-f*l,u=f*i-c*n,d=Math.sqrt(o*o+s*s+u*u),d?(d=1/d,o*=d,s*=d,u*=d):(o=0,s=0,u=0),e[0]=n,e[1]=o,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+i*y+l*m),e[13]=-(o*p+s*y+u*m),e[14]=-(f*p+c*y+h*m),e[15]=1,e)}});var X7=B((Ime,W7)=>{W7.exports=oZ;function oZ(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 Yy=B((Hme,Z7)=>{Z7.exports={create:X6(),clone:J6(),copy:K6(),identity:Oy(),transpose:e7(),invert:t7(),adjoint:n7(),determinant:l7(),multiply:s7(),translate:f7(),scale:v7(),rotate:d7(),rotateX:m7(),rotateY:g7(),rotateZ:b7(),fromRotation:w7(),fromRotationTranslation:M7(),fromScaling:k7(),fromTranslation:C7(),fromXRotation:S7(),fromYRotation:E7(),fromZRotation:R7(),fromQuat:By(),frustum:F7(),perspective:H7(),perspectiveFromFieldOfView:B7(),ortho:G7(),lookAt:V7(),str:X7()}});var mh=B(It=>{"use strict";var sZ=Yy();It.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var uZ=kr(),J7=Go(),fZ=mh(),cZ=Yy();function vZ(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function hZ(e){var r=uZ.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function $7(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function dZ(e,r){K7("global",e,r)}function K7(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):J7.warn("addStyleRule failed"):J7.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function pZ(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&$7(t)}function mZ(e,r,t,a,n){var i=a.split(":"),l=n.split(":"),o="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(o)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[l[0]]=l[1])}),s.setAttribute(o,!0))})}function yZ(e){var r=j7(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=Q7(a);if(n){var i=fZ.convertCssMatrix(n);t=cZ.multiply(t,t,i)}}),t}function Q7(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function j7(e){for(var r=[];gZ(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function gZ(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function xZ(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}ew.exports={getGraphDiv:vZ,isPlotDiv:hZ,removeElement:$7,addStyleRule:dZ,addRelatedStyleRule:K7,deleteRelatedStyleRule:pZ,setStyleOnHover:mZ,getFullTransformMatrix:yZ,getElementTransformMatrix:Q7,getElementAndAncestors:j7,equalDomRects:xZ}});var Tc=B((Yme,rw)=>{"use strict";rw.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 ui=B((Gme,sw)=>{"use strict";var aw=mt().extendFlat,bZ=Pl(),nw={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},iw={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},_Z=nw.flags.slice().concat(["fullReplot"]),wZ=iw.flags.slice().concat("layoutReplot");sw.exports={traces:nw,layout:iw,traceFlags:function(){return tw(_Z)},layoutFlags:function(){return tw(wZ)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";Gy.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Gy.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 Uy=B((Vme,uw)=>{"use strict";uw.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 _a=B(yh=>{"use strict";var fw=Uy(),Wme=fw.FORMAT_LINK,Xme=fw.DATE_FORMAT_LINK;function Vy(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function Nl(e,r){return r?r.d2l(e):e}function cw(e,r){return r?r.l2d(e):e}function TZ(e){return e.x0}function MZ(e){return e.x1}function AZ(e){return e.y0}function kZ(e){return e.y1}function vw(e){return e.x0shift||0}function hw(e){return e.x1shift||0}function dw(e){return e.y0shift||0}function pw(e){return e.y1shift||0}function gh(e,r){return Nl(e.x1,r)+hw(e)-Nl(e.x0,r)-vw(e)}function xh(e,r,t){return Nl(e.y1,t)+pw(e)-Nl(e.y0,t)-dw(e)}function qZ(e,r){return Math.abs(gh(e,r))}function CZ(e,r,t){return Math.abs(xh(e,r,t))}function LZ(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(gh(e,r),2)+Math.pow(xh(e,r,t),2))}function SZ(e,r){return cw((Nl(e.x1,r)+hw(e)+Nl(e.x0,r)+vw(e))/2,r)}function DZ(e,r,t){return cw((Nl(e.y1,t)+pw(e)+Nl(e.y0,t)+dw(e))/2,t)}function EZ(e,r,t){return e.type!=="line"?void 0:xh(e,r,t)/gh(e,r)}mw.exports={x0:TZ,x1:MZ,y0:AZ,y1:kZ,slope:EZ,dx:gh,dy:xh,width:qZ,height:CZ,length:LZ,xcenter:SZ,ycenter:DZ}});var xw=B(($me,gw)=>{"use strict";var PZ=ui().overrideAll,Uo=tn(),yw=jt(),RZ=fi().dash,Fl=mt().extendFlat,zZ=_a().shapeTexttemplateAttrs,NZ=bh();gw.exports=PZ({newshape:{visible:Fl({},Uo.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Fl({},Uo.legend,{}),legendgroup:Fl({},Uo.legendgroup,{}),legendgrouptitle:{text:Fl({},Uo.legendgrouptitle.text,{}),font:yw({})},legendrank:Fl({},Uo.legendrank,{}),legendwidth:Fl({},Uo.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Fl({},RZ,{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:Fl({},Uo.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:zZ({newshape:!0},{keys:Object.keys(NZ)}),font:yw({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var _w=B((Kme,bw)=>{"use strict";var FZ=fi().dash,IZ=mt().extendFlat;bw.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:IZ({},FZ,{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 _h=B((Qme,ww)=>{"use strict";ww.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var xu=B((jme,kw)=>{"use strict";var Wy=jt(),HZ=Tc(),wh=zn(),Tw=xw(),Mw=_w(),OZ=_h(),Aw=mt().extendFlat,Th=Wy({editType:"calc"});Th.family.dflt='"Open Sans", verdana, arial, sans-serif';Th.size.dflt=12;Th.color.dflt=wh.defaultLine;kw.exports={font:Th,title:{text:{valType:"string",editType:"layoutstyle"},font:Wy({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Wy({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:Aw(OZ({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:wh.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:wh.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:wh.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:"plot"},newshape:Tw.newshape,activeshape:Tw.activeshape,newselection:Mw.newselection,activeselection:Mw.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Aw({},HZ.transition,{editType:"none"})}});var qw=nt(()=>{});var BZ={};var Cw=nt(()=>{qw()});var yr=B(Fr=>{"use strict";var bu=Go(),Lw=ph(),Sw=Hy(),YZ=Pl(),GZ=wc().addStyleRule,Dw=mt(),UZ=tn(),VZ=xu(),WZ=Dw.extendFlat,Xy=Dw.extendDeepAll;Fr.modules={};Fr.allCategories={};Fr.allTypes=[];Fr.subplotsRegistry={};Fr.componentsRegistry={};Fr.layoutArrayContainers=[];Fr.layoutArrayRegexes=[];Fr.traceLayoutAttributes={};Fr.localeRegistry={};Fr.apiMethodRegistry={};Fr.collectableSubplotTypes=null;Fr.register=function(r){if(Fr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var QZ=cu().timeFormat,Yw=zr(),Zy=Go(),Hl=hu().mod,Tu=wt(),Nn=Tu.BADNUM,ln=Tu.ONEDAY,Mc=Tu.ONEHOUR,Il=Tu.ONEMIN,wu=Tu.ONESEC,Ac=Tu.EPOCHJD,il=yr(),Nw=cu().utcFormat,jZ=/^\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,eJ=/^\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,Fw=new Date().getFullYear()-70;function ll(e){return e&&il.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Ht.dateTick0=function(e,r){var t=rJ(e,!!r);if(r<2)return t;var a=Ht.dateTime2ms(t,e);return a+=ln*(r-1),Ht.ms2DateTime(a,0,e)};function rJ(e,r){return ll(e)?r?il.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:il.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Ht.dfltRange=function(e){return ll(e)?il.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Ht.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Ah,kh;Ht.dateTime2ms=function(e,r){if(Ht.isJSDate(e)){var t=e.getTimezoneOffset()*Il,a=(e.getUTCMinutes()-e.getMinutes())*Il+(e.getUTCSeconds()-e.getSeconds())*wu+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*Il;t=t-n/2+Hl(a-t+n/2,n)}return e=Number(e)-t,e>=Ah&&e<=kh?e:Nn}if(typeof e!="string"&&typeof e!="number")return Nn;e=String(e);var i=ll(r),l=e.charAt(0);i&&(l==="G"||l==="g")&&(e=e.substr(1),r="");var o=i&&r.substr(0,7)==="chinese",s=e.match(o?eJ:jZ);if(!s)return Nn;var u=s[1],f=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),p=Number(s[11]||0);if(i){if(u.length===2)return Nn;u=Number(u);var y;try{var m=il.getComponentMethod("calendars","getCal")(r);if(o){var _=f.charAt(f.length-1)==="i";f=parseInt(f,10),y=m.newDate(u,m.toMonthIndex(u,f,_),c)}else y=m.newDate(u,Number(f),c)}catch(T){return Nn}return y?(y.toJD()-Ac)*ln+h*Mc+d*Il+p*wu:Nn}u.length===2?u=(Number(u)+2e3-Fw)%100+Fw:u=Number(u),f-=1;var b=new Date(Date.UTC(2e3,f,c,h,d));return b.setUTCFullYear(u),b.getUTCMonth()!==f||b.getUTCDate()!==c?Nn:b.getTime()+p*wu};Ah=Ht.MIN_MS=Ht.dateTime2ms("-9999");kh=Ht.MAX_MS=Ht.dateTime2ms("9999-12-31 23:59:59.9999");Ht.isDateTime=function(e,r){return Ht.dateTime2ms(e,r)!==Nn};function _u(e,r){return String(e+Math.pow(10,r)).substr(1)}var Mh=90*ln,Iw=3*Mc,Hw=5*Il;Ht.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Ah&&e<=kh))return Nn;r||(r=0);var a=Math.floor(Hl(e+.05,1)*10),n=Math.round(e-a/10),i,l,o,s,u,f;if(ll(t)){var c=Math.floor(n/ln)+Ac,h=Math.floor(Hl(e,ln));try{i=il.getComponentMethod("calendars","getCal")(t).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){i=Nw("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;l=r=Ah+ln&&e<=kh-ln))return Nn;var r=Math.floor(Hl(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=QZ("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),l=t.getSeconds(),o=t.getUTCMilliseconds()*10+r;return Gw(a,n,i,l,o)};function Gw(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+_u(r,2)+":"+_u(t,2),(a||n)&&(e+=":"+_u(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+_u(n,i)}return e}Ht.cleanDate=function(e,r,t){if(e===Nn)return r;if(Ht.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(ll(t))return Zy.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Ht.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Ht.isDateTime(e,t))return Zy.error("unrecognized date",e),r;return e};var tJ=/%\d?f/g,aJ=/%h/g,nJ={1:"1",2:"1",3:"2",4:"2"};function Ow(e,r,t,a){e=e.replace(tJ,function(i){var l=Math.min(+i.charAt(1)||6,6),o=(r/1e3%1+2).toFixed(l).substr(2).replace(/0+$/,"")||"0";return o});var n=new Date(Math.floor(r+.05));if(e=e.replace(aJ,function(){return nJ[t("%q")(n)]}),ll(a))try{e=il.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var iJ=[59,59.9,59.99,59.999,59.9999];function lJ(e,r){var t=Hl(e+.05,ln),a=_u(Math.floor(t/Mc),2)+":"+_u(Hl(Math.floor(t/Il),60),2);if(r!=="M"){Yw(r)||(r=0);var n=Math.min(Hl(e/wu,60),iJ[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}Ht.formatDate=function(e,r,t,a,n,i){if(n=ll(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` `+i.year;else return lJ(e,t)+` -`+Ow(i.dayMonthYear,e,a,n);return Ow(r,e,a,n)};var Bw=3*ln;Ht.incrementMonth=function(e,r,t){t=ll(t)&&t;var a=Hl(e,ln);if(e=Math.round(e-a),t)try{var n=Math.round(e/ln)+Ac,i=il.getComponentMethod("calendars","getCal")(t),l=i.fromJD(n);return r%12?i.add(l,r,"m"):i.add(l,r/12,"y"),(l.toJD()-Ac)*ln+a}catch(s){Zy.error("invalid ms "+e+" in calendar "+t)}var o=new Date(e+Bw);return o.setUTCMonth(o.getUTCMonth()+r)+a-Bw};Ht.findExactDates=function(e,r){for(var t=0,a=0,n=0,i=0,l,o,s=ll(r)&&il.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";Vw.exports=function(r){return r}});var Ky=B(ol=>{"use strict";var oJ=zr(),sJ=Go(),uJ=Jy(),fJ=wt().BADNUM,$y=1e-9;ol.findBin=function(e,r,t){if(oJ(r.start))return t?Math.ceil((e-r.start)/r.size-$y)-1:Math.floor((e-r.start)/r.size+$y);var a=0,n=r.length,i=0,l=n>1?(r[n-1]-r[0])/(n-1):1,o,s;for(l>=0?s=t?cJ:vJ:s=t?dJ:hJ,e+=l*$y*(t?-1:1)*(l>=0?1:-1);a90&&sJ.log("Long binary search..."),a-1};function cJ(e,r){return er}function dJ(e,r){return e>=r}ol.sorterAsc=function(e,r){return e-r};ol.sorterDes=function(e,r){return r-e};ol.distinctVals=function(e){var r=e.slice();r.sort(ol.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===fJ;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],l,o=0;o<=t;o++){var s=r[o],u=s-l;l===void 0?(i.push(s),l=s):u>n&&(a=Math.min(a,u),i.push(s),l=s)}return{vals:i,minDiff:a}};ol.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,l=0,o=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};ol.findIndexOfMin=function(e,r){r=r||uJ;for(var t=1/0,a,n=0;n{"use strict";Ww.exports=function(r){return Object.keys(r).sort()}});var Xw=B(Ot=>{"use strict";var kc=zr(),pJ=gn().isArrayOrTypedArray;Ot.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),kc(r)||(r=!1),pJ(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var Qw=B((uye,Kw)=>{"use strict";var Zw=hu(),jy=Zw.mod,mJ=Zw.modHalf,qc=Math.PI,Ol=2*qc;function yJ(e){return e/180*qc}function gJ(e){return e/qc*180}function eg(e){return Math.abs(e[1]-e[0])>Ol-1e-14}function Jw(e,r){return mJ(r-e,Ol)}function xJ(e,r){return Math.abs(Jw(e,r))}function $w(e,r){if(eg(r))return!0;var t,a;r[0]a&&(a+=Ol);var n=jy(e,Ol),i=n+Ol;return n>=t&&n<=a||i>=t&&i<=a}function bJ(e,r,t,a){if(!$w(r,a))return!1;var n,i;return t[0]=n&&e<=i}function rg(e,r,t,a,n,i,l){n=n||0,i=i||0;var o=eg([t,a]),s,u,f,c,h;o?(s=0,u=qc,f=Ol):t{"use strict";Vo.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};Vo.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};Vo.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};Vo.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};Vo.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};Vo.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var t8=B(Wo=>{"use strict";var tg=hu().mod;Wo.segmentsIntersect=r8;function r8(e,r,t,a,n,i,l,o){var s=t-e,u=n-e,f=l-n,c=a-r,h=i-r,d=o-i,p=s*d-f*c;if(p===0)return null;var y=(u*d-f*h)/p,m=(u*c-s*h)/p;return m<0||m>1||y<0||y>1?null:{x:e+s*y,y:r+c*y}}Wo.segmentDistance=function(r,t,a,n,i,l,o,s){if(r8(r,t,a,n,i,l,o,s))return 0;var u=a-r,f=n-t,c=o-i,h=s-l,d=u*u+f*f,p=c*c+h*h,y=Math.min(qh(u,f,d,i-r,l-t),qh(u,f,d,o-r,s-t),qh(c,h,p,r-i,t-l),qh(c,h,p,a-i,n-l));return Math.sqrt(y)};function qh(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var l=a-e,o=n-r;return l*l+o*o}else{var s=a*r-n*e;return s*s/t}}var Ch,ag,e8;Wo.getTextLocation=function(r,t,a,n){if((r!==ag||n!==e8)&&(Ch={},ag=r,e8=n),Ch[a])return Ch[a];var i=r.getPointAtLength(tg(a-n/2,t)),l=r.getPointAtLength(tg(a+n/2,t)),o=Math.atan((l.y-i.y)/(l.x-i.x)),s=r.getPointAtLength(tg(a,t)),u=(s.x*4+i.x+l.x)/6,f=(s.y*4+i.y+l.y)/6,c={x:u,y:f,theta:o};return Ch[a]=c,c};Wo.clearLocationCache=function(){ag=null};Wo.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,l=t.top,o=t.bottom,s=0,u=r.getTotalLength(),f=u,c,h;function d(y){var m=r.getPointAtLength(y);y===0?c=m:y===u&&(h=m);var _=m.xi?m.x-i:0,b=m.yo?m.y-o:0;return Math.sqrt(_*_+b*b)}for(var p=d(s);p;){if(s+=p+a,s>f)return;p=d(s)}for(p=d(f);p;){if(f-=p+a,s>f)return;p=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};Wo.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),l=n.tolerance||.001,o=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,c=i,h,d,p;u0?c=h:f=h,u++}return d}});var Lh=B(Cc=>{"use strict";var sl={};Cc.throttle=function(r,t,a){var n=sl[r],i=Date.now();if(!n){for(var l in sl)sl[l].tsn.ts+t){o();return}n.timer=setTimeout(function(){o(),n.timer=null},t)};Cc.done=function(e){var r=sl[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};Cc.clear=function(e){if(e)a8(sl[e]),delete sl[e];else for(var r in sl)Cc.clear(r)};function a8(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var i8=B((hye,n8)=>{"use strict";n8.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var l8=B((dye,Sh)=>{"use strict";Sh.exports=ng;Sh.exports.isMobile=ng;Sh.exports.default=ng;var MJ=/(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,AJ=/CrOS/,kJ=/android|ipad|playbook|silk/i;function ng(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=MJ.test(r)&&!AJ.test(r)||!!e.tablet&&kJ.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var s8=B((pye,o8)=>{"use strict";var qJ=zr(),CJ=l8();o8.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=LJ(),typeof t!="string")return!0;var a=CJ({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;o--){var s=n[o];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(qJ(u)&&(u=+u),u>=13)return!0}}}return a};function LJ(){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 f8=B((mye,u8)=>{"use strict";var SJ=kr();u8.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(l){return l[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(l){l[0][i]=SJ.select(this)}),n}});var v8=B((yye,c8)=>{"use strict";var DJ=yr();c8.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,l=0;l<2;l++){var o=(i[a]||{}).dictionary;if(o){var s=o[t];if(s)return s}i=DJ.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var d8=B((gye,h8)=>{"use strict";h8.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";p8.exports=function(r){for(var t=RJ(r)?PJ:EJ,a=[],n=0;n{"use strict";y8.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var l=String(t).length,o=String(r).length;if(i>=o+l){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var b8=B((_ye,x8)=>{"use strict";var zJ=zr(),NJ=wt().BADNUM,FJ=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;x8.exports=function(r){return typeof r=="string"&&(r=r.replace(FJ,"")),zJ(r)?Number(r):NJ}});var Pe=B((wye,P8)=>{"use strict";var Lc=kr(),IJ=cu().utcFormat,HJ=Ay().format,k8=zr(),q8=wt(),C8=q8.FP_SAFE,OJ=-C8,_8=q8.BADNUM,de=P8.exports={};de.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var w8={};de.warnBadFormat=function(e){var r=String(e);w8[r]||(w8[r]=1,de.warn('encountered bad format: "'+r+'"'))};de.noFormat=function(e){return String(e)};de.numberFormat=function(e){var r;try{r=HJ(de.adjustFormat(e))}catch(t){return de.warnBadFormat(e),de.noFormat}return r};de.nestedProperty=lh();de.keyedContainer=v6();de.relativeAttr=d6();de.isPlainObject=Pl();de.toLogRange=sh();de.relinkPrivateKeys=g6();var Bl=gn();de.isArrayBuffer=Bl.isArrayBuffer;de.isTypedArray=Bl.isTypedArray;de.isArrayOrTypedArray=Bl.isArrayOrTypedArray;de.isArray1D=Bl.isArray1D;de.ensureArray=Bl.ensureArray;de.concat=Bl.concat;de.maxRowLength=Bl.maxRowLength;de.minRowLength=Bl.minRowLength;var L8=hu();de.mod=L8.mod;de.modHalf=L8.modHalf;var Yl=F6();de.valObjectMeta=Yl.valObjectMeta;de.coerce=Yl.coerce;de.coerce2=Yl.coerce2;de.coerceFont=Yl.coerceFont;de.coercePattern=Yl.coercePattern;de.coerceHoverinfo=Yl.coerceHoverinfo;de.coerceSelectionMarkerOpacity=Yl.coerceSelectionMarkerOpacity;de.validate=Yl.validate;var xn=Uw();de.dateTime2ms=xn.dateTime2ms;de.isDateTime=xn.isDateTime;de.ms2DateTime=xn.ms2DateTime;de.ms2DateTimeLocal=xn.ms2DateTimeLocal;de.cleanDate=xn.cleanDate;de.isJSDate=xn.isJSDate;de.formatDate=xn.formatDate;de.incrementMonth=xn.incrementMonth;de.dateTick0=xn.dateTick0;de.dfltRange=xn.dfltRange;de.findExactDates=xn.findExactDates;de.MIN_MS=xn.MIN_MS;de.MAX_MS=xn.MAX_MS;var Xo=Ky();de.findBin=Xo.findBin;de.sorterAsc=Xo.sorterAsc;de.sorterDes=Xo.sorterDes;de.distinctVals=Xo.distinctVals;de.roundUp=Xo.roundUp;de.sort=Xo.sort;de.findIndexOfMin=Xo.findIndexOfMin;de.sortObjectKeys=Qy();var ul=Xw();de.aggNums=ul.aggNums;de.len=ul.len;de.mean=ul.mean;de.geometricMean=ul.geometricMean;de.median=ul.median;de.midRange=ul.midRange;de.variance=ul.variance;de.stdev=ul.stdev;de.interp=ul.interp;var ci=mh();de.init2dArray=ci.init2dArray;de.transposeRagged=ci.transposeRagged;de.dot=ci.dot;de.translationMatrix=ci.translationMatrix;de.rotationMatrix=ci.rotationMatrix;de.rotationXYMatrix=ci.rotationXYMatrix;de.apply3DTransform=ci.apply3DTransform;de.apply2DTransform=ci.apply2DTransform;de.apply2DTransform2=ci.apply2DTransform2;de.convertCssMatrix=ci.convertCssMatrix;de.inverseTransformMatrix=ci.inverseTransformMatrix;var Fi=Qw();de.deg2rad=Fi.deg2rad;de.rad2deg=Fi.rad2deg;de.angleDelta=Fi.angleDelta;de.angleDist=Fi.angleDist;de.isFullCircle=Fi.isFullCircle;de.isAngleInsideSector=Fi.isAngleInsideSector;de.isPtInsideSector=Fi.isPtInsideSector;de.pathArc=Fi.pathArc;de.pathSector=Fi.pathSector;de.pathAnnulus=Fi.pathAnnulus;var Au=jw();de.isLeftAnchor=Au.isLeftAnchor;de.isCenterAnchor=Au.isCenterAnchor;de.isRightAnchor=Au.isRightAnchor;de.isTopAnchor=Au.isTopAnchor;de.isMiddleAnchor=Au.isMiddleAnchor;de.isBottomAnchor=Au.isBottomAnchor;var ku=t8();de.segmentsIntersect=ku.segmentsIntersect;de.segmentDistance=ku.segmentDistance;de.getTextLocation=ku.getTextLocation;de.clearLocationCache=ku.clearLocationCache;de.getVisibleSegment=ku.getVisibleSegment;de.findPointOnPath=ku.findPointOnPath;var Ph=mt();de.extendFlat=Ph.extendFlat;de.extendDeep=Ph.extendDeep;de.extendDeepAll=Ph.extendDeepAll;de.extendDeepNoArrays=Ph.extendDeepNoArrays;var ig=Go();de.log=ig.log;de.warn=ig.warn;de.error=ig.error;var BJ=mu();de.counterRegex=BJ.counter;var lg=Lh();de.throttle=lg.throttle;de.throttleDone=lg.done;de.clearThrottle=lg.clear;var vi=wc();de.getGraphDiv=vi.getGraphDiv;de.isPlotDiv=vi.isPlotDiv;de.removeElement=vi.removeElement;de.addStyleRule=vi.addStyleRule;de.addRelatedStyleRule=vi.addRelatedStyleRule;de.deleteRelatedStyleRule=vi.deleteRelatedStyleRule;de.setStyleOnHover=vi.setStyleOnHover;de.getFullTransformMatrix=vi.getFullTransformMatrix;de.getElementTransformMatrix=vi.getElementTransformMatrix;de.getElementAndAncestors=vi.getElementAndAncestors;de.equalDomRects=vi.equalDomRects;de.clearResponsive=i8();de.preserveDrawingBuffer=s8();de.makeTraceGroups=f8();de._=v8();de.notifier=Ny();de.filterUnique=d8();de.filterVisible=m8();de.pushUnique=Hy();de.increment=g8();de.cleanNumber=b8();de.ensureNumber=function(r){return k8(r)?(r=Number(r),r>C8||r=r?!1:k8(e)&&e>=0&&e%1===0};de.noop=ph();de.identity=Jy();de.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};de.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};de.simpleMap=function(e,r,t,a,n){for(var i=e.length,l=new Array(i),o=0;o=Math.pow(2,t)?n>10?(de.warn("randstr failed uniqueness"),l):e(r,t,a,(n||0)+1):l};de.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};de.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),l=new Array(t),o,s,u,f;for(o=0;o=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];l[o]=f}return l};de.syncOrAsync=function(e,r,t){var a,n;function i(){return de.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};de.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};de.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,l;for(i=0;i0?n:0})};de.fillArray=function(e,r,t,a){if(a=a||de.identity,de.isArrayOrTypedArray(e))for(var n=0;n1?n+l[1]:"";if(i&&(l.length>1||o.length>4||t))for(;a.test(o);)o=o.replace(a,"$1"+i+"$2");return o+s};de.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var E8=/^\w*$/;de.templateString=function(e,r){var t={};return e.replace(de.TEMPLATE_STRING_REGEX,function(a,n){var i;return E8.test(n)?i=r[n]:(t[n]=t[n]||de.nestedProperty(r,n).get,i=t[n]()),de.isValidTextValue(i)?i:""})};var XJ={max:10,count:0,name:"hovertemplate"};de.hovertemplateString=function(){return og.apply(XJ,arguments)};var ZJ={max:10,count:0,name:"texttemplate"};de.texttemplateString=function(){return og.apply(ZJ,arguments)};var JJ=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $J(e){var r=e.match(JJ);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var KJ={max:10,count:0,name:"texttemplate",parseMultDiv:!0};de.texttemplateStringForShapes=function(){return og.apply(KJ,arguments)};var T8=/^[:|\|]/;function og(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(de.TEMPLATE_STRING_REGEX,function(l,o,s){var u=o==="xother"||o==="yother",f=o==="_xother"||o==="_yother",c=o==="_xother_"||o==="_yother_",h=o==="xother_"||o==="yother_",d=u||f||h||c,p=o;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var y=null,m=null;if(a.parseMultDiv){var _=$J(p);p=_.key,y=_.op,m=_.number}var b;if(d){if(b=r[p],b===void 0)return""}else{var T,x;for(x=3;x=Eh&&l<=M8,u=o>=Eh&&o<=M8;if(s&&(a=10*a+l-Eh),u&&(n=10*n+o-Eh),!s||!u){if(a!==n)return a-n;if(l!==o)return l-o}}return n-a};var Mu=2e9;de.seedPseudoRandom=function(){Mu=2e9};de.pseudoRandom=function(){var e=Mu;return Mu=(69069*Mu+1)%4294967296,Math.abs(Mu-e)<429496729?de.pseudoRandom():Mu/4294967296};de.fillText=function(e,r,t){var a=Array.isArray(t)?function(l){t.push(l)}:function(l){t.text=l},n=de.extractOption(e,r,"htx","hovertext");if(de.isValidTextValue(n))return a(n);var i=de.extractOption(e,r,"tx","text");if(de.isValidTextValue(i))return a(i)};de.isValidTextValue=function(e){return e||e===0};de.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,de.strTranslate(n-u*(t+l),i-u*(a+o))+de.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};de.setTransormAndDisplay=function(e,r){e.attr("transform",de.getTextTransform(r)),e.style("display",r.scale?null:"none")};de.ensureUniformFontSize=function(e,r){var t=de.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};de.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};de.bigFont=function(e){return Math.round(1.2*e)};var A8=de.getFirefoxVersion(),QJ=A8!==null&&A8<86;de.getPositionFromD3Event=function(){return QJ?[Lc.event.layerX,Lc.event.layerY]:[Lc.event.offsetX,Lc.event.offsetY]}});var N8=B(()=>{"use strict";var jJ=Pe(),R8={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(sg in R8)z8=sg.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jJ.addStyleRule(z8,R8[sg]);var z8,sg});var ug=B((Aye,F8)=>{F8.exports=!0});var cg=B((kye,I8)=>{"use strict";var e$=ug(),fg;typeof window.matchMedia=="function"?fg=!window.matchMedia("(hover: none)").matches:fg=e$;I8.exports=fg});var Nh=B((qye,vg)=>{"use strict";var qu=typeof Reflect=="object"?Reflect:null,H8=qu&&typeof qu.apply=="function"?qu.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},Rh;qu&&typeof qu.ownKeys=="function"?Rh=qu.ownKeys:Object.getOwnPropertySymbols?Rh=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Rh=function(r){return Object.getOwnPropertyNames(r)};function r$(e){console&&console.warn&&console.warn(e)}var B8=Number.isNaN||function(r){return r!==r};function yt(){yt.init.call(this)}vg.exports=yt;vg.exports.once=i$;yt.EventEmitter=yt;yt.prototype._events=void 0;yt.prototype._eventsCount=0;yt.prototype._maxListeners=void 0;var O8=10;function zh(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(yt,"defaultMaxListeners",{enumerable:!0,get:function(){return O8},set:function(e){if(typeof e!="number"||e<0||B8(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");O8=e}});yt.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};yt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||B8(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Y8(e){return e._maxListeners===void 0?yt.defaultMaxListeners:e._maxListeners}yt.prototype.getMaxListeners=function(){return Y8(this)};yt.prototype.emit=function(r){for(var t=[],a=1;a0&&(l=t[0]),l instanceof Error)throw l;var o=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw o.context=l,o}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")H8(s,this,t);else for(var u=s.length,f=X8(s,u),a=0;a0&&l.length>n&&!l.warned){l.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=r,o.count=l.length,r$(o)}return e}yt.prototype.addListener=function(r,t){return G8(this,r,t,!1)};yt.prototype.on=yt.prototype.addListener;yt.prototype.prependListener=function(r,t){return G8(this,r,t,!0)};function t$(){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 U8(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=t$.bind(a);return n.listener=t,a.wrapFn=n,n}yt.prototype.once=function(r,t){return zh(t),this.on(r,U8(this,r,t)),this};yt.prototype.prependOnceListener=function(r,t){return zh(t),this.prependListener(r,U8(this,r,t)),this};yt.prototype.removeListener=function(r,t){var a,n,i,l,o;if(zh(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,l=a.length-1;l>=0;l--)if(a[l]===t||a[l].listener===t){o=a[l].listener,i=l;break}if(i<0)return this;i===0?a.shift():a$(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,o||t)}return this};yt.prototype.off=yt.prototype.removeListener;yt.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),l;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function V8(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?n$(n):X8(n,n.length)}yt.prototype.listeners=function(r){return V8(this,r,!0)};yt.prototype.rawListeners=function(r){return V8(this,r,!1)};yt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):W8.call(e,r)};yt.prototype.listenerCount=W8;function W8(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}yt.prototype.eventNames=function(){return this._eventsCount>0?Rh(this._events):[]};function X8(e,r){for(var t=new Array(r),a=0;a{"use strict";var hg=Nh().EventEmitter,o$={init:function(e){if(e._ev instanceof hg)return e;var r=new hg,t=new hg;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function l(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var o;for(o=0;o{"use strict";var $8=Pe(),s$=Yo().dfltConfig;function u$(e,r){for(var t=[],a,n=0;ns$.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};fl.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};fl.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};fl.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";j8.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var Su=B(Zt=>{"use strict";var Fn=yr(),Dc=Pe(),Ih=tn(),pg=xu(),f$=dg(),c$=Tc(),v$=Yo().configAttributes,e9=ui(),hi=Dc.extendDeepAll,Cu=Dc.isPlainObject,h$=Dc.isArrayOrTypedArray,Hh=Dc.nestedProperty,d$=Dc.valObjectMeta,mg="_isSubplotObj",Oh="_isLinkedToArray",p$="_arrayAttrRegexps",t9="_deprecated",yg=[mg,Oh,p$,t9];Zt.IS_SUBPLOT_OBJ=mg;Zt.IS_LINKED_TO_ARRAY=Oh;Zt.DEPRECATED=t9;Zt.UNDERSCORE_ATTRS=yg;Zt.get=function(){var e={};return Fn.allTypes.forEach(function(r){e[r]=y$(r)}),{defs:{valObjects:d$,metaKeys:yg.concat(["description","role","editType","impliedEdits"]),editType:{traces:e9.traces,layout:e9.layout},impliedEdits:{}},traces:e,layout:g$(),frames:x$(),animation:Lu(c$),config:Lu(v$)}};Zt.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var l=e[i];if(yg.indexOf(i)===-1){var o=(a?a+".":"")+i;r(l,i,e,n,o),!Zt.isValObject(l)&&Cu(l)&&i!=="impliedEdits"&&Zt.crawl(l,r,n+1,o)}})};Zt.isValObject=function(e){return e&&e.valType!==void 0};Zt.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function l(s,u,f,c){t=t.slice(0,c).concat([u]),a=a.slice(0,c).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[c-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&o(n,0,"")}function o(s,u,f){var c=s[t[u]],h=f+t[u];if(u===t.length-1)h$(c)&&r.push(i+h);else if(a[u]){if(Array.isArray(c))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var l=r[t];if(!Fh(l))return!1;e=i[n][l]}else e=i[n]}else e=i}}return e}function Fh(e){return e===Math.round(e)&&e>=0}function y$(e){var r,t;r=Fn.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=hi({},Ih),i=hi({},r.attributes);Zt.crawl(i,function(s,u,f,c,h){Hh(n,h).set(void 0),s===void 0&&Hh(i,h).set(void 0)}),hi(a,n),Fn.traceIs(e,"noOpacity")&&delete a.opacity,Fn.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),Fn.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,hi(a,i),t.attributes&&hi(a,t.attributes),a.type=e;var l={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:Lu(a)};if(r.layoutAttributes){var o={};hi(o,r.layoutAttributes),l.layoutAttributes=Lu(o)}return r.animatable||Zt.crawl(l,function(s){Zt.isValObject(s)&&"anim"in s&&delete s.anim}),l}function g$(){var e={},r,t;hi(e,pg);for(r in Fn.subplotsRegistry)if(t=Fn.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var Du=Pe(),M$=tn(),Gl="templateitemname",gg={name:{valType:"string",editType:"none"}};gg[Gl]={valType:"string",editType:"calc"};Zo.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=gg.name,r[Gl]=gg[Gl],r};Zo.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=Du.coerce(i,{},M$,"type");var l={type:t,_template:null};if(t in r){a=e[t];var o=r[t]%a.length;r[t]++,l._template=a[o]}return l}return{newTrace:n}};Zo.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);Du.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};Zo.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[i9(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function o(u){var f={name:u.name,_input:u},c=f[Gl]=u[Gl];if(!n9(c))return f._template=n,f;for(var h=0;h=a&&(t._input||{})._templateitemname;i&&(n=a);var l=r+"["+n+"]",o;function s(){o={},i&&(o[l]={},o[l][Gl]=i)}s();function u(d,p){o[d]=p}function f(d,p){i?Du.nestedProperty(o[l],d).set(p):o[l+"."+d]=p}function c(){var d=o;return s(),d}function h(d,p){d&&f(d,p);var y=c();for(var m in y)Du.nestedProperty(e,m).set(y[m])}return{modifyBase:u,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var wa=B((Pye,l9)=>{"use strict";var Ec=mu().counter;l9.exports={idRegex:{x:Ec("x","( domain)?"),y:Ec("y","( domain)?")},attrRegex:Ec("[xy]axis"),xAxisMatch:Ec("xaxis"),yAxisMatch:Ec("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 Jt=B(on=>{"use strict";var A$=yr(),xg=wa();on.id2name=function(r){if(!(typeof r!="string"||!r.match(xg.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};on.name2id=function(r){if(r.match(xg.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};on.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(xg.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};on.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=on.listIds(e,r),i=new Array(n.length),l;for(l=0;la?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};on.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function o9(e,r){if(r&&r.length){for(var t=0;t{"use strict";function k$(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function q$(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}s9.exports={clearOutlineControllers:k$,clearOutline:q$}});var Bh=B((Nye,u9)=>{"use strict";u9.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var bg=B(Gh=>{"use strict";var Yh=yr(),Fye=wa().SUBPLOT_PATTERN;Gh.getSubplotCalcData=function(e,r,t){var a=Yh.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],l=0;l{"use strict";var C$=yr(),Eu=Pe();Jo.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var l=Jo.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(l)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(l){f9(e,l,n.cache),n.check=function(){if(i){var f=f9(e,l,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:l.type,prop:l.prop,traces:l.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var o=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;Eu.isPlainObject(i)?_g(i,r,l,a+1):r(l,n,i)}})}});var St=B((Oye,q9)=>{"use strict";var b9=kr(),S$=cu().timeFormatLocale,D$=Ay().formatLocale,Pc=zr(),E$=ky(),Jr=yr(),_9=Su(),P$=ot(),ur=Pe(),w9=xr(),d9=wt().BADNUM,sn=Jt(),R$=Ul().clearOutline,z$=Bh(),wg=Tc(),N$=dg(),F$=bg().getModuleCalcData,p9=ur.relinkPrivateKeys,$o=ur._,je=q9.exports={};ur.extendFlat(je,Jr);je.attributes=tn();je.attributes.type.values=je.allTypes;je.fontAttrs=jt();je.layoutAttributes=xu();var Vh=h9();je.executeAPICommand=Vh.executeAPICommand;je.computeAPICommandBindings=Vh.computeAPICommandBindings;je.manageCommandObserver=Vh.manageCommandObserver;je.hasSimpleAPICommandBindings=Vh.hasSimpleAPICommandBindings;je.redrawText=function(e){return e=ur.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Jr.getComponentMethod("annotations","draw")(e),Jr.getComponentMethod("legend","draw")(e),Jr.getComponentMethod("colorbar","draw")(e),r(je.previousPromises(e)))},300)})};je.resize=function(e){e=ur.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||ur.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||ur.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Jr.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};je.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};je.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=ur.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:w9.defaultLine,"pointer-events":"all"}).each(function(){var u=b9.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),l=t.select(".js-link-spacer"),o=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&I$(e,i),l.text(i.text()&&o.text()?" - ":"")}};function I$(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){je.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}je.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=b9.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=je.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var H$=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],O$=["year","month","dayMonth","dayMonthYear"];je.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},l=e._fullData||[],o=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},c;e._transitionData||je.createTransitionData(e),n._dfltTitle={plot:$o(e,"Click to enter Plot title"),subtitle:$o(e,"Click to enter Plot subtitle"),x:$o(e,"Click to enter X axis title"),y:$o(e,"Click to enter Y axis title"),colorbar:$o(e,"Click to enter Colorscale title"),annotation:$o(e,"new text")},n._traceWord=$o(e,"trace");var h=m9(e,H$);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,p=a.height;je.supplyLayoutGlobalDefaults(i,n,h),i.width||(n.width=d),i.height||(n.height=p),je.sanitizeMargins(n)}else{je.supplyLayoutGlobalDefaults(i,n,h);var y=!i.width||!i.height,m=n.autosize,_=f.autosizable,b=y&&(m||_);b?je.plotAutoSize(e,i,n):y&&je.sanitizeMargins(n),!m&&y&&(i.width=n.width,i.height=n.height)}n._d3locale=G$(h,n.separators),n._extraFormat=m9(e,O$),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var T=n._subplots=Y$(),x=n._splomAxes={x:{},y:{}},M=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=B$(l,s),je.supplyDataDefaults(s,o,i,n);var A=Object.keys(x.x),k=Object.keys(x.y);if(A.length>1&&k.length>1){for(Jr.getComponentMethod("grid","sizeDefaults")(i,n),c=0;c15&&k.length>15&&n.shapes.length===0&&n.images.length===0,je.linkSubplots(o,n,l,a),je.cleanPlot(o,n,l,a);var z=!!(a._has&&a._has("cartesian")),H=!!(n._has&&n._has("cartesian")),O=z,U=H;O&&!U?a._bgLayer.remove():U&&!O&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&R$({_fullLayout:a}),U$(o,n),p9(n,a),Jr.getComponentMethod("colorscale","crossTraceDefaults")(o,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var V=n._tracePreGUI,Y={},I;for(I in V)Y[I]="old";for(c=0;c0){var f=1-2*i;l=Math.round(f*l),o=Math.round(f*o)}}var c=je.layoutAttributes.width.min,h=je.layoutAttributes.height.min;l1,p=!t.height&&Math.abs(a.height-o)>1;(p||d)&&(d&&(a.width=l),p&&(a.height=o)),r._initialAutoSize||(r._initialAutoSize={width:l,height:o}),je.sanitizeMargins(a)};je.supplyLayoutModuleDefaults=function(e,r,t,a){var n=Jr.componentsRegistry,i=r._basePlotModules,l,o,s,u=Jr.subplotsRegistry.cartesian;for(l in n)s=n[l],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Jr.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(ur.subplotSort);for(o=0;o1&&(t.l/=m,t.r/=m)}if(h){var _=(t.t+t.b)/h;_>1&&(t.t/=_,t.b/=_)}var b=t.xl!==void 0?t.xl:t.x,T=t.xr!==void 0?t.xr:t.x,x=t.yt!==void 0?t.yt:t.y,M=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:b,size:t.l+y},r:{val:T,size:t.r+y},b:{val:M,size:t.b+y},t:{val:x,size:t.t+y}},p[r]=1}if(!a._replotting)return je.doAutoMargin(e)}};function W$(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=sn.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}je.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),T9(r);var n=r._size,i=r.margin,l={t:0,b:0,l:0,r:0},o=ur.extendFlat({},n),s=i.l,u=i.r,f=i.t,c=i.b,h=r._pushmargin,d=r._pushmarginIds,p=r.minreducedwidth,y=r.minreducedheight;if(i.autoexpand!==!1){for(var m in h)d[m]||delete h[m];var _=e._fullLayout._reservedMargin;for(var b in _)for(var T in _[b]){var x=_[b][T];l[T]=Math.max(l[T],x)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:c}};for(var M in l){var A=0;for(var k in h)k!=="base"&&Pc(h[k][M].size)&&(A=h[k][M].size>A?h[k][M].size:A);var L=Math.max(0,i[M]-A);l[M]=Math.max(0,l[M]-L)}for(var D in h){var P=h[D].l||{},R=h[D].b||{},z=P.val,H=P.size,O=R.val,U=R.size,V=t-l.r-l.l,Y=a-l.t-l.b;for(var I in h){if(Pc(H)&&h[I].r){var G=h[I].r.val,Z=h[I].r.size;if(G>z){var K=(H*G+(Z-V)*z)/(G-z),re=(Z*(1-z)+(H-V)*(1-G))/(G-z);K+re>s+u&&(s=K,u=re)}}if(Pc(U)&&h[I].t){var se=h[I].t.val,ce=h[I].t.size;if(se>O){var le=(U*se+(ce-Y)*O)/(se-O),Q=(ce*(1-O)+(U-Y)*(1-se))/(se-O);le+Q>c+f&&(c=le,f=Q)}}}}}var ge=ur.constrain(t-i.l-i.r,M9,p),ue=ur.constrain(a-i.t-i.b,A9,y),ke=Math.max(0,t-ge),ve=Math.max(0,a-ue);if(ke){var be=(s+u)/ke;be>1&&(s/=be,u/=be)}if(ve){var W=(c+f)/ve;W>1&&(c/=W,f/=W)}if(n.l=Math.round(s)+l.l,n.r=Math.round(u)+l.r,n.t=Math.round(f)+l.t,n.b=Math.round(c)+l.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(je.didMarginChange(o,n)||W$(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};je.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&je.supplyDefaults(e);var l=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(ur.isPlainObject(h)){var p={},y;return Object.keys(h).sort().forEach(function(T){if(["_","["].indexOf(T.charAt(0))===-1){if(typeof h[T]=="function"){d&&(p[T]="_function");return}if(t==="keepdata"){if(T.substr(T.length-3)==="src")return}else if(t==="keepstream"){if(y=h[T+"src"],typeof y=="string"&&y.indexOf(":")>0&&!ur.isPlainObject(h.stream))return}else if(t!=="keepall"&&(y=h[T+"src"],typeof y=="string"&&y.indexOf(":")>0))return;p[T]=u(h[T],d)}}),p}var m=Array.isArray(h),_=ur.isTypedArray(h);if((m||_)&&h.dtype&&h.shape){var b=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:ur.isArrayBuffer(b)?E$.encode(b):b},d)}return m?h.map(function(T){return u(T,d)}):_?ur.simpleMap(h,ur.identity):ur.isJSDate(h)?ur.ms2DateTimeLocal(+h):h}var f={data:(l||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(o),n)){var c=o._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};je.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,l=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Jr.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!a&&d===h&&o(c)}}t.runFn(p),setTimeout(p())})}function o(c){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Jr.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[je.previousPromises,s,t.prepareFn,je.rehover,je.reselect,l],f=ur.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}je.doCalcdata=function(e,r){var t=sn.list(e),a=e._fullData,n=e._fullLayout,i,l,o,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},o=0;o=0;s--)if(M[s].enabled){i._indexToPoints=M[s]._indexToPoints;break}l&&l.calc&&(x=l.calc(e,i))}(!Array.isArray(x)||!x[0])&&(x=[{x:d9,y:d9}]),x[0].t||(x[0].t={}),x[0].trace=i,u[b]=x}}for(g9(t,a,n),o=0;o{"use strict";Ko.xmlns="http://www.w3.org/2000/xmlns/";Ko.svg="http://www.w3.org/2000/svg";Ko.xlink="http://www.w3.org/1999/xlink";Ko.svgAttrs={xmlns:Ko.svg,"xmlns:xlink":Ko.xlink}});var Sa=B((Yye,C9)=>{"use strict";C9.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 va=B(In=>{"use strict";var Bt=kr(),cl=Pe(),$$=cl.strTranslate,Tg=Qo(),K$=Sa().LINE_SPACING,Q$=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;In.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(Q$),i=Bt.select(e.node().parentNode);if(i.empty())return;var l=e.attr("class")?e.attr("class").split(" ")[0]:"text";l+="-math",i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function o(){i.empty()||(l=e.attr("class")+"-math",i.select("svg."+l).remove()),e.text("").style("white-space","pre");var s=cK(e.node(),a);s&&e.style("pointer-events","all"),In.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};tK(n[2],f,function(c,h,d){i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){o(),s();return}var y=i.append("g").classed(l+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});y.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var m=d.width,_=d.height;p.attr({class:l,height:_,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var b=e.node().style.fill||"black",T=p.select("g");T.attr({fill:b,stroke:b});var x=T.node().getBoundingClientRect(),M=x.width,A=x.height;(M>m||A>_)&&(p.style("overflow","hidden"),x=p.node().getBoundingClientRect(),M=x.width,A=x.height);var k=+e.attr("x"),L=+e.attr("y"),D=u||e.node().getBoundingClientRect().height,P=-D/4;if(l[0]==="y")y.attr({transform:"rotate("+[-90,k,L]+")"+$$(-M/2,P-A/2)});else if(l[0]==="l")L=P-A/2;else if(l[0]==="a"&&l.indexOf("atitle")!==0)k=0,L=P;else{var R=e.attr("text-anchor");k=k-M*(R==="middle"?.5:R==="end"?1:0),L=L+P-A/2}p.attr({x:k,y:L}),t&&t.call(e,y),s(y)})})):o(),e};var j$=/(<|<|<)/g,eK=/(>|>|>)/g;function rK(e){return e.replace(j$,"\\lt ").replace(eK,"\\gt ")}var L9=[["$","$"],["\\(","\\)"]];function tK(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){cl.warn("No MathJax version:",MathJax.version);return}var n,i,l,o,s=function(){return i=cl.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:L9},displayAlign:"left"})},u=function(){i=cl.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=L9},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var b="math-output-"+cl.randstr({},64);o=Bt.select("body").append("div").attr({id:b}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(rK(e));var T=o.node();return a===2?MathJax.Hub.Typeset(T):MathJax.typeset([T])},d=function(){var b=o.select(a===2?".MathJax_SVG":".MathJax"),T=!b.empty()&&o.select("svg").node();if(!T)cl.log("There was an error in the tex syntax.",e),t();else{var x=T.getBoundingClientRect(),M;a===2?M=Bt.select("body").select("#MathJax_SVG_glyphs"):M=b.select("defs"),t(b,M,x)}o.remove()},p=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},y=function(){n!=="svg"&&(MathJax.config.startup.output=n)},m=function(){return l!==void 0&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(i)},_=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,h,d,p,m):a===3&&(u(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),y(),_()}))}var P9={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"},aK={sub:"0.3em",sup:"-0.6em"},nK={sub:"-0.21em",sup:"0.42em"},S9="\u200B",D9=["http:","https:","mailto:","",void 0,":"],R9=In.NEWLINES=/(\r\n?|\n)/g,Ag=/(<[^<>]*>)/,kg=/<(\/?)([^ >]*)(\s+(.*))?>/i,iK=//i;In.BR_TAG_ALL=//gi;var z9=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,N9=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,F9=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,lK=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function jo(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&Wh(a)}var oK=/(^|;)\s*color:/;In.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,l=e.split(Ag),o=[],s="",u=0,f=0;fi?o.push(c.substr(0,y-i)+n):o.push(c.substr(0,y));break}s=""}}return o.join("")};var sK={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},uK=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Wh(e){return e.replace(uK,function(r,t){var a;return t.charAt(0)==="#"?a=fK(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=sK[t],a||r})}In.convertEntities=Wh;function fK(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function cK(e,r){r=r.replace(R9," ");var t=!1,a=[],n,i=-1;function l(){i++;var A=document.createElementNS(Tg.svg,"tspan");Bt.select(A).attr({class:"line",dy:i*K$+"em"}),e.appendChild(A),n=A;var k=a;if(a=[{node:A}],k.length>1)for(var L=1;L.",r);return}var k=a.pop();A!==k.type&&cl.log("Start tag <"+k.type+"> doesnt match end tag <"+A+">. Pretending it did match.",r),n=a[a.length-1].node}var f=iK.test(r);f?l():(n=e,a=[{node:e}]);for(var c=r.split(Ag),h=0;h{"use strict";var vK=kr(),Zh=Rn(),zc=zr(),Xh=Pe(),H9=xr(),hK=Oo().isValid;function dK(e,r,t){var a=r?Xh.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if(Xh.isArrayOrTypedArray(n)){for(var l=0;l=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function V9(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),l=0;l{"use strict";var X9=Uy(),mK=X9.FORMAT_LINK,yK=X9.DATE_FORMAT_LINK;function gK(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?qg:Z9)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function qg(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+mK+"."].join(" ")}function Z9(e,r){return qg(e,r)+[" And for dates see: "+yK+".","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(" ")}J9.exports={axisHoverFormat:gK,descriptionOnlyNumbers:qg,descriptionWithDates:Z9}});var bn=B((Wye,vT)=>{"use strict";var $9=jt(),Pu=zn(),cT=fi().dash,Lg=mt().extendFlat,K9=ot().templatedArray,Q9=di().descriptionWithDates,xK=wt().ONEDAY,Ii=wa(),bK=Ii.HOUR_PATTERN,_K=Ii.WEEKDAY_PATTERN,Cg={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},wK=Lg({},Cg,{values:Cg.values.slice().concat(["sync"])});function j9(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var eT={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},rT={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},tT={valType:"data_array",editType:"ticks"},aT={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function nT(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function iT(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var lT={valType:"color",dflt:Pu.defaultLine,editType:"ticks"},oT={valType:"color",dflt:Pu.lightLine,editType:"ticks"};function sT(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var uT=Lg({},cT,{editType:"ticks"}),fT={valType:"boolean",editType:"ticks"};vT.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Pu.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:$9({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Ii.idRegex.x.toString(),Ii.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:[Ii.idRegex.x.toString(),Ii.idRegex.y.toString()],editType:"calc"},rangebreaks:K9("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:[_K,bK,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:xK},editType:"calc"}),tickmode:wK,nticks:j9(),tick0:eT,dtick:rT,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:tT,ticktext:{valType:"data_array",editType:"ticks"},ticks:aT,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:nT(),tickwidth:iT(),tickcolor:lT,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:Lg({},cT,{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:$9({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Q9("tick label")},tickformatstops:K9("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:Q9("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Pu.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:fT,gridcolor:oT,gridwidth:sT(),griddash:uT,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Pu.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Pu.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Ii.idRegex.x.toString(),Ii.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Ii.idRegex.x.toString(),Ii.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Cg,nticks:j9("minor"),tick0:eT,dtick:rT,tickvals:tT,ticks:aT,ticklen:nT("minor"),tickwidth:iT("minor"),tickcolor:lT,gridcolor:oT,gridwidth:sT("minor"),griddash:uT,showgrid:fT,editType:"ticks"},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 Jh=B((Xye,pT)=>{"use strict";var gt=bn(),hT=jt(),dT=mt().extendFlat,TK=ui().overrideAll;pT.exports=TK({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:gt.linecolor,outlinewidth:gt.linewidth,bordercolor:gt.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:gt.minor.tickmode,nticks:gt.nticks,tick0:gt.tick0,dtick:gt.dtick,tickvals:gt.tickvals,ticktext:gt.ticktext,ticks:dT({},gt.ticks,{dflt:""}),ticklabeloverflow:dT({},gt.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:gt.ticklen,tickwidth:gt.tickwidth,tickcolor:gt.tickcolor,ticklabelstep:gt.ticklabelstep,showticklabels:gt.showticklabels,labelalias:gt.labelalias,tickfont:hT({}),tickangle:gt.tickangle,tickformat:gt.tickformat,tickformatstops:gt.tickformatstops,tickprefix:gt.tickprefix,showtickprefix:gt.showtickprefix,ticksuffix:gt.ticksuffix,showticksuffix:gt.showticksuffix,separatethousands:gt.separatethousands,exponentformat:gt.exponentformat,minexponent:gt.minexponent,showexponent:gt.showexponent,title:{text:{valType:"string"},font:hT({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Nc=B((Jye,yT)=>{"use strict";var MK=Jh(),AK=mu().counter,kK=Qy(),mT=Oo().scales,Zye=kK(mT);function $h(e){return"`"+e+"`"}yT.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",l="showScaleDflt"in t?t.showScaleDflt:a==="z",o=typeof t.colorscaleDflt=="string"?mT[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,c;"colorAttr"in t?(f=t.colorAttr,c=t.colorAttr):(f={z:"z",c:"color"}[a],c="in "+$h(u+f));var h=n?" Has an effect only if "+c+" is set to a numerical array.":"",d=a+"auto",p=a+"min",y=a+"max",m=a+"mid",_=$h(u+d),b=$h(u+p),T=$h(u+y),x=b+" and "+T,M={};M[p]=M[y]=void 0;var A={};A[d]=!1;var k={};return f==="color"&&(k.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(k.color.anim=!0)),k[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M},k[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:A},k[y]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:A},k[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:M},k.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},k.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},k.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(k.showscale={valType:"boolean",dflt:l,editType:"calc"},k.colorbar=MK),t.noColorAxis||(k.coloraxis={valType:"subplotid",regex:AK("coloraxis"),dflt:null,editType:"calc"}),k}});var Dg=B(($ye,gT)=>{"use strict";var qK=mt().extendFlat,CK=Nc(),Sg=Oo().scales;gT.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Sg.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Sg.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Sg.RdBu,editType:"calc"}},coloraxis:qK({_isSubplotObj:!0,editType:"calc"},CK("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Eg=B((Kye,xT)=>{"use strict";var LK=Pe();xT.exports=function(r){return LK.isPlainObject(r.colorbar)}});var zg=B(Rg=>{"use strict";var Pg=zr(),bT=Pe(),_T=wt(),SK=_T.ONEDAY,DK=_T.ONEWEEK;Rg.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?SK:1;if(!e)return i;if(Pg(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var l=e.charAt(0),o=e.substr(1);return o=Pg(o)?Number(o):0,o<=0||!(a&&l==="M"&&o===Math.round(o)||t&&l==="L"||t&&l==="D"&&(o===1||o===2))?i:e};Rg.tick0=function(e,r,t,a){if(r==="date")return bT.cleanDate(e,bT.dateTick0(t,a%DK===0?1:0));if(!(a==="D1"||a==="D2"))return Pg(e)?Number(e):0}});var Kh=B((jye,TT)=>{"use strict";var wT=zg(),EK=Pe().isArrayOrTypedArray,PK=gn().isTypedArraySpec,RK=gn().decodeTypedArraySpec;TT.exports=function(r,t,a,n,i){i||(i={});var l=i.isMinor,o=l?r.minor||{}:r,s=l?t.minor:t,u=l?"minor.":"";function f(b){var T=o[b];return PK(T)&&(T=RK(T)),T!==void 0?T:(s._template||{})[b]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=EK(d)?"array":h?"linear":"auto",y=a(u+"tickmode",p);if(y==="auto"||y==="sync")a(u+"nticks");else if(y==="linear"){var m=s.dtick=wT.dtick(h,n);s.tick0=wT.tick0(c,n,t.calendar,m)}else if(n!=="multicategory"){var _=a(u+"tickvals");_===void 0?s.tickmode="auto":l||a("ticktext")}}});var Qh=B((ege,AT)=>{"use strict";var Ng=Pe(),MT=bn();AT.exports=function(r,t,a,n){var i=n.isMinor,l=i?r.minor||{}:r,o=i?t.minor:t,s=i?MT.minor:MT,u=i?"minor.":"",f=Ng.coerce2(l,o,s,"ticklen",i?(t.ticklen||5)*.6:void 0),c=Ng.coerce2(l,o,s,"tickwidth",i?t.tickwidth||1:void 0),h=Ng.coerce2(l,o,s,"tickcolor",(i?t.tickcolor:void 0)||o.color),d=a(u+"ticks",!i&&n.outerTicks||f||c||h?"outside":"");d||(delete o.ticklen,delete o.tickwidth,delete o.tickcolor)}});var Fg=B((rge,kT)=>{"use strict";kT.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var On=B((tge,qT)=>{"use strict";var jh=Pe(),zK=ot();qT.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",l=t[n],o=jh.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=zK.arrayTemplater(t,n,i),f,c;for(f=0;f{"use strict";var Ig=Pe(),NK=xr().contrast,CT=bn(),FK=Fg(),IK=On();LT.exports=function(r,t,a,n,i){i||(i={});var l=a("labelalias");Ig.isPlainObject(l)||delete t.labelalias;var o=FK(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,c=t.ticklabelposition||"",h=c.indexOf("inside")!==-1?NK(i.bgColor):f&&f!==CT.color.dflt?f:u.color;if(Ig.coerceFont(a,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var p=a("tickformat");IK(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:HK}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!p&&n!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function HK(e,r){function t(n,i){return Ig.coerce(e,r,CT.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var rd=B((nge,ST)=>{"use strict";var OK=Fg();ST.exports=function(r,t,a,n,i){i||(i={});var l=i.tickSuffixDflt,o=OK(r),s=a("tickprefix");s&&a("showtickprefix",o);var u=a("ticksuffix",l);u&&a("showticksuffix",o)}});var Hg=B((ige,DT)=>{"use strict";var Vl=Pe(),BK=ot(),YK=Kh(),GK=Qh(),UK=ed(),VK=rd(),WK=Jh();DT.exports=function(r,t,a){var n=BK.newContainer(t,"colorbar"),i=r.colorbar||{};function l(R,z){return Vl.coerce(i,n,WK,R,z)}var o=a.margin||{t:0,b:0,l:0,r:0},s=a.width-o.l-o.r,u=a.height-o.t-o.b,f=l("orientation"),c=f==="v",h=l("thicknessmode");l("thickness",h==="fraction"?30/(c?s:u):30);var d=l("lenmode");l("len",d==="fraction"?1:c?u:s);var p=l("yref"),y=l("xref"),m=p==="paper",_=y==="paper",b,T,x,M="left";c?(x="middle",M=_?"left":"right",b=_?1.02:1,T=.5):(x=m?"bottom":"top",M="center",b=.5,T=m?1.02:1),Vl.coerce(i,n,{x:{valType:"number",min:_?-2:0,max:_?3:1,dflt:b}},"x"),Vl.coerce(i,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:T}},"y"),l("xanchor",M),l("xpad"),l("yanchor",x),l("ypad"),Vl.noneOrAll(i,n,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var A=Vl.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",A.indexOf("inside")!==-1?"hide past domain":"hide past div"),YK(i,n,l,"linear");var k=a.font,L={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:k};A.indexOf("inside")!==-1&&(L.bgColor="black"),VK(i,n,l,"linear",L),UK(i,n,l,"linear",L),GK(i,n,l,"linear",L),l("title.text",a._dfltTitle.colorbar);var D=n.showticklabels?n.tickfont:k,P=Vl.extendFlat({},k,{family:D.family,size:Vl.bigFont(D.size)});Vl.coerceFont(l,"title.font",P),l("title.side",c?"top":"right")}});var Ru=B((lge,RT)=>{"use strict";var ET=zr(),Bg=Pe(),XK=Eg(),ZK=Hg(),PT=Oo().isValid,JK=yr().traceIs;function Og(e,r){var t=r.slice(0,r.length-1);return r?Bg.nestedProperty(e,t).get()||{}:e}RT.exports=function e(r,t,a,n,i){var l=i.prefix,o=i.cLetter,s="_module"in t,u=Og(r,l),f=Og(t,l),c=Og(t._template||{},l)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},p=n(l+"coloraxis");if(p){var y=JK(t,"contour")&&Bg.nestedProperty(t,"contours.coloring").get()||"heatmap",m=d[p];m?(m[2].push(h),m[0]!==y&&(m[0]=!1,Bg.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[y,t,[h]];return}}var _=u[o+"min"],b=u[o+"max"],T=ET(_)&&ET(b)&&_{"use strict";var zT=Pe(),$K=ot(),NT=Dg(),KK=Ru();FT.exports=function(r,t){function a(c,h){return zT.coerce(r,t,NT,c,h)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,l;function o(c,h){return zT.coerce(i,l,NT.coloraxis,c,h)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},l=$K.newContainer(t,s,"coloraxis"),l._name=s,KK(i,l,t,o,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var QK=Pe(),jK=Hn().hasColorscale,eQ=Hn().extractOpts;HT.exports=function(r,t){function a(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function n(f,c){var h=c.container?QK.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=eQ(h),p=d.auto;(p||d.min===void 0)&&a(h,c.min),(p||d.max===void 0)&&a(h,c.max),d.autocolorscale&&a(h,"colorscale")}}for(var i=0;i{"use strict";var BT=zr(),Yg=Pe(),rQ=Hn().extractOpts;YT.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,l=a.containerStr,o=l?Yg.nestedProperty(t,l).get():t,s=rQ(o),u=s.auto!==!1,f=s.min,c=s.max,h=s.mid,d=function(){return Yg.aggNums(Math.min,null,i)},p=function(){return Yg.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(o._colorAx&&BT(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():u&&(o._colorAx&&BT(c)?c=Math.max(c,p()):c=p()),u&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h=0?y=n.colorscale.sequential:y=n.colorscale.sequentialminus,s._sync("colorscale",y)}}});var Gg=B((fge,GT)=>{"use strict";var ad=Oo(),zu=Hn();GT.exports={moduleType:"component",name:"colorscale",attributes:Nc(),layoutAttributes:Dg(),supplyLayoutDefaults:IT(),handleDefaults:Ru(),crossTraceDefaults:OT(),calc:td(),scales:ad.scales,defaultScale:ad.defaultScale,getScale:ad.get,isValidScale:ad.isValid,hasColorscale:zu.hasColorscale,extractOpts:zu.extractOpts,extractScale:zu.extractScale,flipScale:zu.flipScale,makeColorScaleFunc:zu.makeColorScaleFunc,makeColorScaleFuncFromTrace:zu.makeColorScaleFuncFromTrace}});var _n=B((cge,VT)=>{"use strict";var UT=Pe(),tQ=gn().isTypedArraySpec;VT.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 r=e.marker;return UT.isPlainObject(r)&&(UT.isArrayOrTypedArray(r.size)||tQ(r.size))}}});var XT=B((vge,WT)=>{"use strict";var aQ=zr();WT.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,l=a.sizemode==="area"?function(o){return Math.sqrt(o/n)}:function(o){return o/n};return function(o){var s=l(o/t);return aQ(s)&&s>0?Math.max(s,i):0}}});var Hi=B(Da=>{"use strict";var ZT=Pe();Da.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Da.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{KT.exports=sQ;var Ug={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},oQ=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function sQ(e){var r=[];return e.replace(oQ,function(t,a,n){var i=a.toLowerCase();for(n=fQ(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==Ug[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var cQ=Vg(),Ze=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},qr="M0,0Z",QT=Math.sqrt(2),Wl=Math.sqrt(3),Wg=Math.PI,Xg=Math.cos,Zg=Math.sin;aM.exports={circle:{n:0,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Lr(r,t,n):n}},square:{n:1,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.3,2);return Lr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.4,2),n=Ze(e*1.2,2);return Lr(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.8/QT,2),n="l"+a+","+a,i="l"+a+",-"+a,l="l-"+a+",-"+a,o="l-"+a+","+a;return Lr(r,t,"M0,"+a+n+i+l+i+l+o+l+o+n+o+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.951,2),n=Ze(e*.588,2),i=Ze(-e,2),l=Ze(e*-.309,2),o=Ze(e*.809,2);return Lr(r,t,"M"+a+","+l+"L"+n+","+o+"H-"+n+"L-"+a+","+l+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e/2,2),i=Ze(e*Wl/2,2);return Lr(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e/2,2),i=Ze(e*Wl/2,2);return Lr(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.924,2),n=Ze(e*.383,2);return Lr(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(Cr(r))return qr;var a=e*1.4,n=Ze(a*.225,2),i=Ze(a*.951,2),l=Ze(a*.363,2),o=Ze(a*.588,2),s=Ze(-a,2),u=Ze(a*-.309,2),f=Ze(a*.118,2),c=Ze(a*.809,2),h=Ze(a*.382,2);return Lr(r,t,"M"+n+","+u+"H"+i+"L"+l+","+f+"L"+o+","+c+"L0,"+h+"L-"+o+","+c+"L-"+l+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.66,2),n=Ze(e*.38,2),i=Ze(e*.76,2);return Lr(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*Wl*.8,2),n=Ze(e*.8,2),i=Ze(e*1.6,2),l=Ze(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Lr(r,t,"M-"+a+","+n+o+a+","+n+o+"0,-"+i+o+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*Wl*.8,2),n=Ze(e*.8,2),i=Ze(e*1.6,2),l=Ze(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Lr(r,t,"M"+a+",-"+n+o+"-"+a+",-"+n+o+"0,"+i+o+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.1,2),n=Ze(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Lr(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2),n=Ze(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Lr(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.7,2),n=Ze(e*1.4,2);return Lr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2),n=Ze(e*.7,2);return Lr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e/QT,2);return Lr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.3,2);return Lr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.3,2),n=Ze(e*.65,2);return Lr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*.85,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e/2,2),n=Ze(e,2);return Lr(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2);return Lr(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2);return Lr(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(Cr(r))return qr;var a=Wg/2.5,n=2*e*Xg(a),i=2*e*Zg(a);return Lr(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(Cr(r))return qr;var a=Wg/4,n=2*e*Xg(a),i=2*e*Zg(a);return Lr(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function Cr(e){return e===null}var jT,eM,rM,tM;function Lr(e,r,t){if((!e||e%360===0)&&!r)return t;if(rM===e&&tM===r&&jT===t)return eM;rM=e,tM=r,jT=t;function a(m,_){var b=Xg(m),T=Zg(m),x=_[0],M=_[1]+(r||0);return[x*b-M*T,x*T+M*b]}for(var n=e/180*Wg,i=0,l=0,o=cQ(t),s="",u=0;u{"use strict";var ra=kr(),lt=Pe(),vQ=lt.numberFormat,as=zr(),e2=Rn(),id=yr(),Ta=xr(),hQ=Gg(),Ic=lt.strTranslate,ld=va(),dQ=Qo(),pQ=Sa(),mQ=pQ.LINE_SPACING,dM=pu().DESELECTDIM,yQ=_n(),gQ=XT(),xQ=Hi().appendArrayPointValue,Ke=MM.exports={};Ke.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,l=r.size,o=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;o&&e.style("font-family",o),l+1&&e.style("font-size",l+"px"),i&&e.call(Ta.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",Jg(_Q(f))),s&&e.style("text-shadow",s==="auto"?ld.makeTextShadow(Ta.contrast(i)):Jg(s)),u&&e.style("text-decoration-line",Jg(wQ(u)))};function Jg(e){return e==="none"?void 0:e}var bQ={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function _Q(e){return bQ[e]}function wQ(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ke.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Ke.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Ke.setRect=function(e,r,t,a,n){e.call(Ke.setPosition,r,t).call(Ke.setSize,a,n)};Ke.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(as(n)&&as(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",Ic(n,i));else return!1;return!0};Ke.translatePoints=function(e,r,t){e.each(function(a){var n=ra.select(this);Ke.translatePoint(a,n,r,t)})};Ke.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Ke.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,l=i.xcalendar,o=i.ycalendar,s=id.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Ke.hideOutsideRangePoint(u,ra.select(this),t,a,l,o)})})}};Ke.crispRound=function(e,r,t){return!r||!as(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Ke.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},l=t||i.width||0,o=n||i.dash||"";Ta.stroke(r,a||i.color),Ke.dashLine(r,o,l)};Ke.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},l=r||i.width||0,o=a||i.dash||"";ra.select(this).call(Ta.stroke,t||i.color).call(Ke.dashLine,o,l)})};Ke.dashLine=function(e,r,t){t=+t||0,r=Ke.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Ke.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function pM(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,l=n&&Ke.getPatternAttr(n.shape,0,"");if(l){var o=Ke.getPatternAttr(n.bgcolor,0,null),s=Ke.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Ke.getPatternAttr(n.size,0,8),c=Ke.getPatternAttr(n.solidity,0,.3),h=r.uid;Ke.pattern(e,"point",t,h,l,f,c,void 0,n.fillmode,o,s,u)}else if(i&&i.type!=="none"){var d=i.type,p="scatterfill-"+r.uid;if(a&&(p="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var y,m;d==="horizontal"?(y={x:i.start,y:0},m={x:i.stop,y:0}):d==="vertical"&&(y={x:0,y:i.start},m={x:0,y:i.stop}),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.min[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.min[0].val:y.y,!0),m.x=r._xA.c2p(m.x===void 0?r._extremes.x.max[0].val:m.x,!0),m.y=r._yA.c2p(m.y===void 0?r._extremes.y.max[0].val:m.y,!0),e.call(gM,t,p,"linear",i.colorscale,"fill",y,m,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Ke.gradient,t,p,d,i.colorscale,"fill")}else r.fillcolor&&e.call(Ta.fill,r.fillcolor)}Ke.singleFillStyle=function(e,r){var t=ra.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};pM(e,n,r,!1)};Ke.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=ra.select(this);a[0].trace&&pM(n,a[0].trace,r,t)})};var iM=nM();Ke.symbolNames=[];Ke.symbolFuncs=[];Ke.symbolBackOffs=[];Ke.symbolNeedLines={};Ke.symbolNoDot={};Ke.symbolNoFill={};Ke.symbolList=[];Object.keys(iM).forEach(function(e){var r=iM[e],t=r.n;Ke.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Ke.symbolNames[t]=e,Ke.symbolFuncs[t]=r.f,Ke.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Ke.symbolNeedLines[t]=!0),r.noDot?Ke.symbolNoDot[t]=!0:Ke.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Ke.symbolNoFill[t]=!0)});var TQ=Ke.symbolNames.length,MQ="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ke.symbolNumber=function(e){if(as(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Ke.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=TQ||e>=400?0:Math.floor(Math.max(e,0))};function mM(e,r,t,a){var n=e%100;return Ke.symbolFuncs[n](r,t,a)+(e>=200?MQ:"")}var lM=vQ("~f"),yM={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}};Ke.gradient=function(e,r,t,a,n,i){var l=yM[a];return gM(e,r,t,l.type,n,i,l.start,l.stop,!1,l.reversed)};function gM(e,r,t,a,n,i,l,o,s,u){var f=n.length,c;a==="linear"?c={node:"linearGradient",attrs:{x1:l.x,y1:l.y,x2:o.x,y2:o.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(c={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?l.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||l.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Ke.symbolNumber(e.mx||l.symbol)||0;e.om=u%200>=100;var f=a2(e,t),c=t2(e,t);r.attr("d",mM(u,s,f,c))}var h=!1,d,p,y;if(e.so)y=o.outlierwidth,p=o.outliercolor,d=l.outliercolor;else{var m=(o||{}).width;y=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=a.lineScale(e.mlc):lt.isArrayOrTypedArray(o.color)?p=Ta.defaultLine:p=o.color,lt.isArrayOrTypedArray(l.color)&&(d=Ta.defaultLine,h=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=l.color||l.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(Ta.stroke,d).style({"stroke-width":(y||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:y)+"px");var _=l.gradient,b=e.mgt;b?h=!0:b=_&&_.type,lt.isArrayOrTypedArray(b)&&(b=b[0],yM[b]||(b=0));var T=l.pattern,x=T&&Ke.getPatternAttr(T.shape,e.i,"");if(b&&b!=="none"){var M=e.mgc;M?h=!0:M=_.color;var A=t.uid;h&&(A+="-"+e.i),Ke.gradient(r,n,A,b,[[0,M],[1,d]],"fill")}else if(x){var k=!1,L=T.fgcolor;!L&&i&&i.color&&(L=i.color,k=!0);var D=Ke.getPatternAttr(L,e.i,i&&i.color||null),P=Ke.getPatternAttr(T.bgcolor,e.i,null),R=T.fgopacity,z=Ke.getPatternAttr(T.size,e.i,8),H=Ke.getPatternAttr(T.solidity,e.i,.3);k=k||e.mcc||lt.isArrayOrTypedArray(T.shape)||lt.isArrayOrTypedArray(T.bgcolor)||lt.isArrayOrTypedArray(T.fgcolor)||lt.isArrayOrTypedArray(T.size)||lt.isArrayOrTypedArray(T.solidity);var O=t.uid;k&&(O+="-"+e.i),Ke.pattern(r,"point",n,O,x,z,H,e.mcc,T.fillmode,P,D,R)}else lt.isArrayOrTypedArray(d)?Ta.fill(r,d[e.i]):Ta.fill(r,d);y&&Ta.stroke(r,p)}};Ke.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Ke.tryColorscale(t,""),r.lineScale=Ke.tryColorscale(t,"line"),id.traceIs(e,"symbols")&&(r.ms2mrc=yQ.isBubble(e)?gQ(e):function(){return(t.size||6)/2}),e.selectedpoints&<.extendFlat(r,Ke.makeSelectedPointStyleFns(e)),r};Ke.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},l=a.marker||{},o=n.opacity,s=i.opacity,u=l.opacity,f=s!==void 0,c=u!==void 0;(lt.isArrayOrTypedArray(o)||f||c)&&(r.selectedOpacityFn=function(x){var M=x.mo===void 0?n.opacity:x.mo;return x.selected?f?s:M:c?u:dM*M});var h=n.color,d=i.color,p=l.color;(d||p)&&(r.selectedColorFn=function(x){var M=x.mcc||h;return x.selected?d||M:p||M});var y=n.size,m=i.size,_=l.size,b=m!==void 0,T=_!==void 0;return id.traceIs(e,"symbols")&&(b||T)&&(r.selectedSizeFn=function(x){var M=x.mrc||y/2;return x.selected?b?m/2:M:T?_/2:M}),r};Ke.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},l=a.textfont||{},o=n.color,s=i.color,u=l.color;return r.selectedTextColorFn=function(f){var c=f.tc||o;return f.selected?s||c:u||(s?c:Ta.addOpacity(c,dM))},r};Ke.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,l){i.style("opacity",t.selectedOpacityFn(l))}),t.selectedColorFn&&n.push(function(i,l){Ta.fill(i,t.selectedColorFn(l))}),t.selectedSizeFn&&n.push(function(i,l){var o=l.mx||a.symbol||0,s=t.selectedSizeFn(l);i.attr("d",mM(Ke.symbolNumber(o),s,a2(l,r),t2(l,r))),l.mrc2=s}),n.length&&e.each(function(i){for(var l=ra.select(this),o=0;o0?t:0}Ke.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Ke.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,l=t._fullLayout;e.each(function(o){var s=ra.select(this),u=i?lt.extractOption(o,r,"txt","texttemplate"):lt.extractOption(o,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,c=f?f(o,r,l):{},h={};xQ(h,r,o.i);var d=r._meta||{};u=lt.texttemplateString(u,c,l._d3locale,h,o,d)}var p=o.tp||r.textposition,y=bM(o,r),m=a?a(o):o.tc||r.textfont.color;s.call(Ke.font,{family:o.tf||r.textfont.family,weight:o.tw||r.textfont.weight,style:o.ty||r.textfont.style,variant:o.tv||r.textfont.variant,textcase:o.tC||r.textfont.textcase,lineposition:o.tE||r.textfont.lineposition,shadow:o.tS||r.textfont.shadow,size:y,color:m}).text(u).call(ld.convertToTspans,t).call(xM,p,y,o.mrc)})}};Ke.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedTextStyleFns(r);e.each(function(a){var n=ra.select(this),i=t.selectedTextColorFn(a),l=a.tp||r.textposition,o=bM(a,r);Ta.fill(n,i);var s=id.traceIs(r,"bar-like");xM(n,l,o,a.mrc2||a.mrc,s)})}};var oM=.5;Ke.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||x>=f&&x<=s)&&(M<=c&&M>=u||M>=c&&M<=u)&&(e=[x,M])}return e}Ke.applyBackoff=TM;Ke.makeTester=function(){var e=lt.ensureSingleById(ra.select("body"),"svg","js-plotly-tester",function(t){t.attr(dQ.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=lt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ke.tester=e,Ke.testref=r};Ke.savedBBoxes={};var Kg=0,qQ=1e4;Ke.bBox=function(e,r,t){t||(t=sM(e));var a;if(t){if(a=Ke.savedBBoxes[t],a)return lt.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=sM(n),t){var i=+n.getAttribute("x")||0,l=+n.getAttribute("y")||0,o=n.getAttribute("transform");if(!o){var s=Ke.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),l&&(s.top+=l,s.bottom+=l),s}if(t+="~"+i+"~"+l+"~"+o,a=Ke.savedBBoxes[t],a)return lt.extendFlat({},a)}}var u,f;r?u=e:(f=Ke.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),ra.select(u).attr("transform",null).call(ld.positionText,0,0);var c=u.getBoundingClientRect(),h=Ke.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return Kg>=qQ&&(Ke.savedBBoxes={},Kg=0),t&&(Ke.savedBBoxes[t]=d),Kg++,lt.extendFlat({},d)};function sM(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ke.setClipUrl=function(e,r,t){e.attr("clip-path",r2(r,t))};function r2(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Ke.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Ke.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||0,t=t||0,l=l.replace(a,"").trim(),l+=Ic(r,t),l=l.trim(),e[i]("transform",l),l};Ke.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Ke.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||1,t=t||1,l=l.replace(a,"").trim(),l+="scale("+r+","+t+")",l=l.trim(),e[i]("transform",l),l};var CQ=/\s*sc.*/;Ke.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(CQ,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var LQ=/translate\([^)]*\)\s*$/;Ke.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=ra.select(this),i=n.select("text");if(i.node()){var l=parseFloat(i.attr("x")||0),o=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(LQ);r===1&&t===1?a=[]:a=[Ic(l,o),"scale("+r+","+t+")",Ic(-l,-o)],s&&a.push(s),n.attr("transform",a.join(""))}})};function t2(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Ke.getMarkerStandoff=t2;var Fc=Math.atan2,es=Math.cos,Fu=Math.sin;function uM(e,r){var t=r[0],a=r[1];return[t*es(e)-a*Fu(e),t*Fu(e)+a*es(e)]}var fM,cM,vM,hM,Qg,jg;function a2(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||lt.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var l=r._geo.project(e.lonlat);a=l[0],n=l[1]}else{var o=r._xA,s=r._yA;if(o&&s)a=o.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],c=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=Fc(h[1]-n,h[0]-a),p=Fc(c[1]-n,c[0]-a),y;if(i==="north")y=t/180*Math.PI;else if(i==="previous"){var m=u/180*Math.PI,_=f/180*Math.PI,b=fM/180*Math.PI,T=cM/180*Math.PI,x=b-m,M=es(T)*Fu(x),A=Fu(T)*es(_)-es(T)*Fu(_)*es(x);y=-Fc(M,A)-Math.PI,fM=u,cM=f}var k=uM(d,[es(y),0]),L=uM(p,[Fu(y),0]);t=Fc(k[1]+L[1],k[0]+L[0])/Math.PI*180,i==="previous"&&!(jg===r.uid&&e.i===Qg+1)&&(t=null)}if(i==="previous"&&!r._geo)if(jg===r.uid&&e.i===Qg+1&&as(a)&&as(n)){var D=a-vM,P=n-hM,R=r.line&&r.line.shape||"",z=R.slice(R.length-1);z==="h"&&(P=0),z==="v"&&(D=0),t+=Fc(P,D)/Math.PI*180+90}else t=null}return vM=a,hM=n,Qg=e.i,jg=r.uid,t}Ke.getMarkerAngle=a2});var Hc=B((yge,CM)=>{"use strict";var Iu=kr(),SQ=zr(),DQ=St(),n2=yr(),ns=Pe(),AM=ns.strTranslate,od=Br(),sd=xr(),Hu=va(),kM=pu(),EQ=Sa().OPPOSITE_SIDE,qM=/ [XY][0-9]* /,i2=1.6,l2=1.6;function PQ(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,l=t.placeholder,o=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,c=t.containerGroup,h=1,d=n.title,p=(d&&d.text?d.text:"").trim(),y=!1,m=d&&d.font?d.font:{},_=m.family,b=m.size,T=m.color,x=m.weight,M=m.style,A=m.variant,k=m.textcase,L=m.lineposition,D=m.shadow,P=t.subtitlePropName,R=!!P,z=t.subtitlePlaceholder,H=(n.title||{}).subtitle||{text:"",font:{}},O=H.text.trim(),U=!1,V=1,Y=H.font,I=Y.family,G=Y.size,Z=Y.color,K=Y.weight,re=Y.style,se=Y.variant,ce=Y.textcase,le=Y.lineposition,Q=Y.shadow,ge;i==="title.text"?ge="titleText":i.indexOf("axis")!==-1?ge="axisTitleText":i.indexOf("colorbar"!==-1)&&(ge="colorbarTitleText");var ue=e._context.edits[ge];function ke(Be,Fe){return Be===void 0||Fe===void 0?!1:Be.replace(qM," % ")===Fe.replace(qM," % ")}p===""?h=0:ke(p,l)&&(ue||(p=""),h=.2,y=!0),R&&(O===""?V=0:ke(O,z)&&(ue||(O=""),V=.2,U=!0)),t._meta?p=ns.templateString(p,t._meta):a._meta&&(p=ns.templateString(p,a._meta));var ve=p||O||ue,be;c||(c=ns.ensureSingle(a._infolayer,"g","g-"+r),be=a._hColorbarMoveTitle);var W=c.selectAll("text."+r).data(ve?[0]:[]);W.enter().append("text"),W.text(p).attr("class",r),W.exit().remove();var te=null,X=r+"-subtitle",ye=O||ue;if(R&&ye&&(te=c.selectAll("text."+X).data(ye?[0]:[]),te.enter().append("text"),te.text(O).attr("class",X),te.exit().remove()),!ve)return c;function _e(Be,Fe){ns.syncOrAsync([xe,Ie],{title:Be,subtitle:Fe})}function xe(Be){var Fe=Be.title,Ee=Be.subtitle,Je;!f&&be&&(f={}),f?(Je="",f.rotate&&(Je+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||be)&&(Je+=AM(0,(f.offset||0)-(be||0)))):Je=null,Fe.attr("transform",Je);function We(De){if(De){var Le=Iu.select(De.node().parentNode).select("."+X);if(!Le.empty()){var Ye=De.node().getBBox();if(Ye.height){var Xe=Ye.y+Ye.height+i2*G;Le.attr("y",Xe)}}}}if(Fe.style("opacity",h*sd.opacity(T)).call(od.font,{color:sd.rgb(T),size:Iu.round(b,2),family:_,weight:x,style:M,variant:A,textcase:k,shadow:D,lineposition:L}).attr(u).call(Hu.convertToTspans,e,We),Ee){var ie=c.select("."+r+"-math-group"),Ae=Fe.node().getBBox(),Ce=ie.node()?ie.node().getBBox():void 0,cr=Ce?Ce.y+Ce.height+i2*G:Ae.y+Ae.height+l2*G,tr=ns.extendFlat({},u,{y:cr});Ee.attr("transform",Je),Ee.style("opacity",V*sd.opacity(Z)).call(od.font,{color:sd.rgb(Z),size:Iu.round(G,2),family:I,weight:K,style:re,variant:se,textcase:ce,shadow:Q,lineposition:le}).attr(tr).call(Hu.convertToTspans,e)}return DQ.previousPromises(e)}function Ie(Be){var Fe=Be.title,Ee=Iu.select(Fe.node().parentNode);if(s&&s.selection&&s.side&&p){Ee.attr("transform",null);var Je=EQ[s.side],We=s.side==="left"||s.side==="top"?-1:1,ie=SQ(s.pad)?s.pad:2,Ae=od.bBox(Ee.node()),Ce={t:0,b:0,l:0,r:0},cr=e._fullLayout._reservedMargin;for(var tr in cr)for(var De in cr[tr]){var Le=cr[tr][De];Ce[De]=Math.max(Ce[De],Le)}var Ye={left:Ce.l,top:Ce.t,right:a.width-Ce.r,bottom:a.height-Ce.b},Xe=s.maxShift||We*(Ye[s.side]-Ae[s.side]),Ge=0;if(Xe<0)Ge=Xe;else{var Oe=s.offsetLeft||0,$e=s.offsetTop||0;Ae.left-=Oe,Ae.right-=Oe,Ae.top-=$e,Ae.bottom-=$e,s.selection.each(function(){var lr=od.bBox(this);ns.bBoxIntersect(Ae,lr,ie)&&(Ge=Math.max(Ge,We*(lr[s.side]-Ae[Je])+ie))}),Ge=Math.min(Xe,Ge),n._titleScoot=Math.abs(Ge)}if(Ge>0||Xe<0){var fr={left:[-Ge,0],right:[Ge,0],top:[0,-Ge],bottom:[0,Ge]}[s.side];Ee.attr("transform",AM(fr[0],fr[1]))}}}W.call(_e,te);function ze(Be,Fe){Be.text(Fe).on("mouseover.opacity",function(){Iu.select(this).transition().duration(kM.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Iu.select(this).transition().duration(kM.HIDE_PLACEHOLDER).style("opacity",0)})}if(ue&&(p?W.on(".opacity",null):(ze(W,l),y=!0),W.call(Hu.makeEditable,{gd:e}).on("edit",function(Be){o!==void 0?n2.call("_guiRestyle",e,i,Be,o):n2.call("_guiRelayout",e,i,Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(_e)}).on("input",function(Be){this.text(Be||" ").call(Hu.positionText,u.x,u.y)}),R)){if(R&&!p){var Re=W.node().getBBox(),He=Re.y+Re.height+l2*G;te.attr("y",He)}O?te.on(".opacity",null):(ze(te,z),U=!0),te.call(Hu.makeEditable,{gd:e}).on("edit",function(Be){n2.call("_guiRelayout",e,"title.subtitle.text",Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(_e)}).on("input",function(Be){this.text(Be||" ").call(Hu.positionText,te.attr("x"),te.attr("y"))})}return W.classed("js-placeholder",y),te&&te.classed("js-placeholder",U),c}CM.exports={draw:PQ,SUBTITLE_PADDING_EM:l2,SUBTITLE_PADDING_MATHJAX_EM:i2}});var md=B((gge,PM)=>{"use strict";var RQ=kr(),zQ=cu().utcFormat,st=Pe(),NQ=st.numberFormat,Oi=zr(),Xl=st.cleanNumber,FQ=st.ms2DateTime,LM=st.dateTime2ms,Bi=st.ensureNumber,SM=st.isArrayOrTypedArray,Zl=wt(),ud=Zl.FP_SAFE,pi=Zl.BADNUM,IQ=Zl.LOG_CLIP,HQ=Zl.ONEWEEK,fd=Zl.ONEDAY,cd=Zl.ONEHOUR,DM=Zl.ONEMIN,EM=Zl.ONESEC,vd=Jt(),pd=wa(),hd=pd.HOUR_PATTERN,dd=pd.WEEKDAY_PATTERN;function Oc(e){return Math.pow(10,e)}function o2(e){return e!=null}PM.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(x,M){if(x>0)return Math.log(x)/Math.LN10;if(x<=0&&M&&r.range&&r.range.length===2){var A=r.range[0],k=r.range[1];return .5*(A+k-2*IQ*Math.abs(A-k))}else return pi}function l(x,M,A,k){if((k||{}).msUTC&&Oi(x))return+x;var L=LM(x,A||r.calendar);if(L===pi)if(Oi(x)){x=+x;var D=Math.floor(st.mod(x+.05,1)*10),P=Math.round(x-D/10);L=LM(new Date(P))+D/10}else return pi;return L}function o(x,M,A){return FQ(x,M,A||r.calendar)}function s(x){return r._categories[Math.round(x)]}function u(x){if(o2(x)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[x]!==void 0)return r._categoriesMap[x];r._categories.push(typeof x=="number"?String(x):x);var M=r._categories.length-1;return r._categoriesMap[x]=M,M}return pi}function f(x,M){for(var A=new Array(M),k=0;kr.range[1]&&(A=!A);for(var k=A?-1:1,L=k*x,D=0,P=0;Pz)D=P+1;else{D=L<(R+z)/2?P:P+1;break}}var H=r._B[D]||0;return isFinite(H)?p(x,r._m2,H):0},_=function(x){var M=r._rangebreaks.length;if(!M)return y(x,r._m,r._b);for(var A=0,k=0;kr._rangebreaks[k].pmax&&(A=k+1);return y(x,r._m2,r._B[A])}}r.c2l=r.type==="log"?i:Bi,r.l2c=r.type==="log"?Oc:Bi,r.l2p=m,r.p2l=_,r.c2p=r.type==="log"?function(x,M){return m(i(x,M))}:m,r.p2c=r.type==="log"?function(x){return Oc(_(x))}:_,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Xl,r.c2d=r.c2r=r.l2d=r.l2r=Bi,r.d2p=r.r2p=function(x){return r.l2p(Xl(x))},r.p2d=r.p2r=_,r.cleanPos=Bi):r.type==="log"?(r.d2r=r.d2l=function(x,M){return i(Xl(x),M)},r.r2d=r.r2c=function(x){return Oc(Xl(x))},r.d2c=r.r2l=Xl,r.c2d=r.l2r=Bi,r.c2r=i,r.l2d=Oc,r.d2p=function(x,M){return r.l2p(r.d2r(x,M))},r.p2d=function(x){return Oc(_(x))},r.r2p=function(x){return r.l2p(Xl(x))},r.p2r=_,r.cleanPos=Bi):r.type==="date"?(r.d2r=r.r2d=st.identity,r.d2c=r.r2c=r.d2l=r.r2l=l,r.c2d=r.c2r=r.l2d=r.l2r=o,r.d2p=r.r2p=function(x,M,A){return r.l2p(l(x,0,A))},r.p2d=r.p2r=function(x,M,A){return o(_(x),M,A)},r.cleanPos=function(x){return st.cleanDate(x,pi,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(x){var M=d(x);return M!==void 0?M:r.fraction2r(.5)},r.l2r=r.c2r=Bi,r.r2l=d,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(_(x))},r.r2p=r.d2p,r.p2r=_,r.cleanPos=function(x){return typeof x=="string"&&x!==""?x:Bi(x)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(x){var M=h(x);return M!==void 0?M:r.fraction2r(.5)},r.r2c_just_indices=c,r.l2r=r.c2r=Bi,r.r2l=h,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(_(x))},r.r2p=r.d2p,r.p2r=_,r.cleanPos=function(x){return Array.isArray(x)||typeof x=="string"&&x!==""?x:Bi(x)},r.setupMultiCategory=function(x){var M=r._traceIndices,A,k,L=r._matchGroup;if(L&&r._categories.length===0){for(var D in L)if(D!==a){var P=t[vd.id2name(D)];M=M.concat(P._traceIndices)}}var R=[[0,{}],[0,{}]],z=[];for(A=0;AP[1]&&(k[D?0:1]=A),k[0]===k[1]){var R=r.l2r(M),z=r.l2r(A);if(M!==void 0){var H=R+1;A!==void 0&&(H=Math.min(H,z)),k[D?1:0]=H}if(A!==void 0){var O=z+1;M!==void 0&&(O=Math.max(O,R)),k[D?0:1]=O}}}},r.cleanRange=function(x,M){r._cleanRange(x,M),r.limitRange(x)},r._cleanRange=function(x,M){M||(M={}),x||(x="range");var A=st.nestedProperty(r,x).get(),k,L;if(r.type==="date"?L=st.dfltRange(r.calendar):n==="y"?L=pd.DFLTRANGEY:r._name==="realaxis"?L=[0,1]:L=M.dfltRange||pd.DFLTRANGEX,L=L.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(L[0]=0),!A||A.length!==2){st.nestedProperty(r,x).set(L);return}var D=A[0]===null,P=A[1]===null;for(r.type==="date"&&!r.autorange&&(A[0]=st.cleanDate(A[0],pi,r.calendar),A[1]=st.cleanDate(A[1],pi,r.calendar)),k=0;k<2;k++)if(r.type==="date"){if(!st.isDateTime(A[k],r.calendar)){r[x]=L;break}if(r.r2l(A[0])===r.r2l(A[1])){var R=st.constrain(r.r2l(A[0]),st.MIN_MS+1e3,st.MAX_MS-1e3);A[0]=r.l2r(R-1e3),A[1]=r.l2r(R+1e3);break}}else{if(!Oi(A[k]))if(!(D||P)&&Oi(A[1-k]))A[k]=A[1-k]*(k?10:.1);else{r[x]=L;break}if(A[k]<-ud?A[k]=-ud:A[k]>ud&&(A[k]=ud),A[0]===A[1]){var z=Math.max(1,Math.abs(A[0]*1e-6));A[0]-=z,A[1]+=z}}},r.setScale=function(x){var M=t._size;if(r.overlaying){var A=vd.getFromId({_fullLayout:t},r.overlaying);r.domain=A.domain}var k=x&&r._r?"_r":"range",L=r.calendar;r.cleanRange(k);var D=r.r2l(r[k][0],L),P=r.r2l(r[k][1],L),R=n==="y";if(R?(r._offset=M.t+(1-r.domain[1])*M.h,r._length=M.h*(r.domain[1]-r.domain[0]),r._m=r._length/(D-P),r._b=-r._m*P):(r._offset=M.l+r.domain[0]*M.w,r._length=M.w*(r.domain[1]-r.domain[0]),r._m=r._length/(P-D),r._b=-r._m*D),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var z,H;if(r._rangebreaks=r.locateBreaks(Math.min(D,P),Math.max(D,P)),r._rangebreaks.length){for(z=0;zP&&(O=!O),O&&r._rangebreaks.reverse();var U=O?-1:1;for(r._m2=U*r._length/(Math.abs(P-D)-r._lBreaks),r._B.push(-r._m2*(R?P:D)),z=0;zL&&(L+=7,DL&&(L+=24,D=k&&D=k&&x=Q.min&&(reQ.max&&(Q.max=se),ce=!1)}ce&&P.push({min:re,max:se})}};for(A=0;A{"use strict";var RM=zr(),s2=Pe(),OQ=wt().BADNUM,yd=s2.isArrayOrTypedArray,BQ=s2.isDateTime,YQ=s2.cleanNumber,zM=Math.round;FM.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if(yd(n)&&!n.length)return"-";if(!i&&XQ(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var l=[],o=0;oi*2}function NM(e){return Math.max(1,(e-1)/1e3)}function WQ(e,r){for(var t=e.length,a=NM(t),n=0,i=0,l={},o=0;on*2}function XQ(e){return yd(e[0])&&yd(e[1])}});var Bc=B((bge,VM)=>{"use strict";var ZQ=kr(),BM=zr(),Jl=Pe(),gd=wt().FP_SAFE,JQ=yr(),$Q=Br(),YM=Jt(),KQ=YM.getFromId,QQ=YM.isLinked;VM.exports={applyAutorangeOptions:UM,getAutoRange:f2,makePadFn:c2,doAutoRange:ej,findExtremes:rj,concatExtremes:d2};function f2(e,r){var t,a,n=[],i=e._fullLayout,l=c2(i,r,0),o=c2(i,r,1),s=d2(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return Jl.simpleMap(r.range,r.r2l);var c=u[0].val,h=f[0].val;for(t=1;t0&&(P=T-l(A)-o(k),P>x?R/P>M&&(L=A,D=k,M=R/P):R/T>M&&(L={val:A.val,nopad:1},D={val:k.val,nopad:1},M=R/T));function z(Y,I){return Math.max(Y,o(I))}if(c===h){var H=c-1,O=c+1;if(_)if(c===0)n=[0,1];else{var U=(c>0?f:u).reduce(z,0),V=c/(1-Math.min(.5,U/T));n=c>0?[0,V]:[V,0]}else b?n=[Math.max(0,H),Math.max(1,O)]:n=[H,O]}else _?(L.val>=0&&(L={val:0,nopad:1}),D.val<=0&&(D={val:0,nopad:1})):b&&(L.val-M*l(L)<0&&(L={val:0,nopad:1}),D.val<=0&&(D={val:1,nopad:1})),M=(D.val-L.val-IM(r,A.val,k.val))/(T-l(L)-o(D)),n=[L.val-M*l(L),D.val+M*o(D)];return n=UM(n,r),r.limitRange&&r.limitRange(),p&&n.reverse(),Jl.simpleMap(n,r.l2r||Number)}function IM(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),A=x((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),k=x(t.vpadplus||t.vpad),L=x(t.vpadminus||t.vpad);if(!u){if(b=1/0,T=-1/0,s)for(c=0;c0&&(b=h),h>T&&h-gd&&(b=h),h>T&&h=R;c--)P(c);return{min:a,max:n,opts:t}}function v2(e,r,t,a){GM(e,r,t,a,tj)}function h2(e,r,t,a){GM(e,r,t,a,aj)}function GM(e,r,t,a,n){for(var i=a.tozero,l=a.extrapad,o=!0,s=0;s=t&&(u.extrapad||!l)){o=!1;break}else n(r,u.val)&&u.pad<=t&&(l||!u.extrapad)&&(e.splice(s,1),s--)}if(o){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:l})}}function OM(e){return BM(e)&&Math.abs(e)=r}function nj(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&xd(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&xd(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function ij(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&xd(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&xd(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function xd(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),l<=s&&(l=s,a=s)}}return t=nj(t,r),a=ij(a,r),[t,a]}});var $r=B((_ge,hA)=>{"use strict";var Bn=kr(),Yt=zr(),Ou=St(),Gc=yr(),br=Pe(),Bu=br.strTranslate,is=va(),lj=Hc(),Uc=xr(),wn=Br(),oj=bn(),WM=zg(),Ma=wt(),sj=Ma.ONEMAXYEAR,wd=Ma.ONEAVGYEAR,Td=Ma.ONEMINYEAR,uj=Ma.ONEMAXQUARTER,g2=Ma.ONEAVGQUARTER,Md=Ma.ONEMINQUARTER,fj=Ma.ONEMAXMONTH,Yu=Ma.ONEAVGMONTH,Ad=Ma.ONEMINMONTH,Tn=Ma.ONEWEEK,Ba=Ma.ONEDAY,$l=Ba/2,Gi=Ma.ONEHOUR,Vc=Ma.ONEMIN,kd=Ma.ONESEC,cj=Ma.ONEMILLI,vj=Ma.ONEMICROSEC,ls=Ma.MINUS_SIGN,Ld=Ma.BADNUM,x2={K:"zeroline"},b2={K:"gridline",L:"path"},_2={K:"minor-gridline",L:"path"},aA={K:"tick",L:"path"},XM={K:"tick",L:"text"},ZM={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Sd=Sa(),Yc=Sd.MID_SHIFT,os=Sd.CAP_SHIFT,Wc=Sd.LINE_SPACING,hj=Sd.OPPOSITE_SIDE,qd=3,Ve=hA.exports={};Ve.setConvert=md();var dj=u2(),vl=Jt(),pj=vl.idSort,mj=vl.isLinked;Ve.id2name=vl.id2name;Ve.name2id=vl.name2id;Ve.cleanId=vl.cleanId;Ve.list=vl.list;Ve.listIds=vl.listIds;Ve.getFromId=vl.getFromId;Ve.getFromTrace=vl.getFromTrace;var nA=Bc();Ve.getAutoRange=nA.getAutoRange;Ve.findExtremes=nA.findExtremes;var yj=1e-4;function A2(e){var r=(e[1]-e[0])*yj;return[e[0]-r,e[1]+r]}Ve.coerceRef=function(e,r,t,a,n,i){var l=a.charAt(a.length-1),o=t._fullLayout._subplots[l+"axis"],s=a+"ref",u={};return n||(n=o[0]||(typeof i=="string"?i:i[0])),i||(i=n),o=o.concat(o.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:o.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},br.coerce(e,r,u,s)};Ve.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Ve.coercePosition=function(e,r,t,a,n,i){var l,o,s=Ve.getRefType(a);if(s!=="range")l=br.ensureNumber,o=t(n,i);else{var u=Ve.getFromId(r,a);i=u.fraction2r(i),o=t(n,i),l=u.cleanPos}e[n]=l(o)};Ve.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?br.ensureNumber:Ve.getFromId(r,t).cleanPos;return a(e)};Ve.redrawComponents=function(e,r){r=r||Ve.listIds(e);var t=e._fullLayout;function a(n,i,l,o){for(var s=Gc.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Ve.saveRangeInitial=function(e,r){for(var t=Ve.list(e,"",!0),a=!1,n=0;nc*.3||u(a)||u(n))){var h=t.dtick/2;e+=e+hl){var o=Number(t.substr(1));i.exactYears>l&&o%12===0?e=Ve.tickIncrement(e,"M6","reverse")+Ba*1.5:i.exactMonths>l?e=Ve.tickIncrement(e,"M1","reverse")+Ba*15.5:e-=$l;var s=Ve.tickIncrement(e,t);if(s<=a)return s}return e}Ve.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&Yt(r._tmin),n;if(a){var i=Ve.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var l=br.simpleMap(r.range,r.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=br.simpleMap(n,r.l2r),e._isMinor=!0,Ve.prepTicks(e,t),a){var o=Yt(r.dtick),s=Yt(e.dtick),u=o?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);o&&s?p2(u,f)?u===2*Tn&&f===2*Ba&&(e.dtick=Tn):u===2*Tn&&f===3*Ba?e.dtick=Tn:u===Tn&&!(r._input.minor||{}).nticks?e.dtick=Ba:KM(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":p2(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?p2(u,f)||(e.dtick=KM(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function p2(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function KM(e,r){return Math.abs(e/r-1)<.001}Ve.prepTicks=function(e,r){var t=br.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?br.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=br.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,Ve.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,l=a):(i=a,l=a);var o=e[i].value,s=e[l].value,u=Math.abs(s-o),f=t||u,c=0;f>=Td?u>=Td&&u<=sj?c=u:c=wd:t===g2&&f>=Md?u>=Md&&u<=uj?c=u:c=g2:f>=Ad?u>=Ad&&u<=fj?c=u:c=Yu:t===Tn&&f>=Tn?c=Tn:f>=Ba?c=Ba:t===$l&&f>=$l?c=$l:t===Gi&&f>=Gi&&(c=Gi);var h;c>=u&&(c=u,h=!0);var d=n+c;if(r.rangebreaks&&c>0){for(var p=84,y=0,m=0;mTn&&(c=u)}(c>0||a===0)&&(e[a].periodX=n+c/2)}}Ve.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,l=r.ticklabelmode==="period",o=r.range[0]>r.range[1],s=!r.ticklabelindex||br.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=br.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(T?0:1);x--){var M=!x;x?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var A=x?r:br.extendFlat({},r,r.minor);if(M?Ve.prepMinorTicks(A,r,t):Ve.prepTicks(A,t),A.tickmode==="array"){x?(m=[],p=QM(r,!M)):(_=[],y=QM(r,!M));continue}if(A.tickmode==="sync"){m=[],p=Tj(r);continue}var k=A2(u),L=k[0],D=k[1],P=Yt(A.dtick),R=a==="log"&&!(P||A.dtick.charAt(0)==="L"),z=Ve.tickFirst(A,t);if(x){if(r._tmin=z,z=D:O<=D;O=Ve.tickIncrement(O,Y,f,n)){if(x&&U++,A.rangebreaks&&!f){if(O=h)break}if(m.length>d||O===H)break;H=O;var I={value:O};x?(R&&O!==(O|0)&&(I.simpleLabel=!0),i>1&&U%i&&(I.skipLabel=!0),m.push(I)):(I.minor=!0,_.push(I))}}if(!_||_.length<2)s=!1;else{var G=(_[1].value-_[0].value)*(o?-1:1);Xj(G,r.tickformat)||(s=!1)}if(!s)b=m;else{var Z=m.concat(_);l&&m.length&&(Z=Z.slice(1)),Z=Z.sort(function(He,Be){return He.value-Be.value}).filter(function(He,Be,Fe){return Be===0||He.value!==Fe[Be-1].value});var K=Z.map(function(He,Be){return He.minor===void 0&&!He.skipLabel?Be:null}).filter(function(He){return He!==null});K.forEach(function(He){s.map(function(Be){var Fe=He+Be;Fe>=0&&Fe-1;ve--){if(m[ve].drop){m.splice(ve,1);continue}m[ve].value=y2(m[ve].value,r);var X=r.c2p(m[ve].value);(be?te>X-W:teh||Eeh&&(Fe.periodX=h),Een&&hwd)r/=wd,a=n(10),e.dtick="M"+12*Yi(r,a,bd);else if(i>Yu)r/=Yu,e.dtick="M"+Yi(r,1,jM);else if(i>Ba){if(e.dtick=Yi(r,Ba,e._hasDayOfWeekBreaks?[1,2,7,14]:Mj),!t){var l=Ve.getTickFormat(e),o=e.ticklabelmode==="period";o&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=br.dateTick0(e.calendar,2):e.tick0=br.dateTick0(e.calendar,1),o&&(e._dowTick0=e.tick0)}}else i>Gi?e.dtick=Yi(r,Gi,jM):i>Vc?e.dtick=Yi(r,Vc,eA):i>kd?e.dtick=Yi(r,kd,eA):(a=n(10),e.dtick=Yi(r,a,bd))}else if(e.type==="log"){e.tick0=0;var s=br.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+Yi(r,a,bd)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):C2(e)?(e.tick0=0,a=1,e.dtick=Yi(r,a,Aj)):(e.tick0=0,a=n(10),e.dtick=Yi(r,a,bd));if(e.dtick===0&&(e.dtick=1),!Yt(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function sA(e){var r=e.dtick;if(e._tickexponent=0,!Yt(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=Ba&&n<=10||r>=Ba*15)e._tickround="d";else if(r>=Vc&&n<=16||r>=Gi)e._tickround="M";else if(r>=kd&&n<=19||r>=Vc)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(Yt(r)||r.charAt(0)==="L"){var l=e.range.map(e.r2d||Number);Yt(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var o=Math.max(Math.abs(l[0]),Math.abs(l[1])),s=Math.floor(Math.log(o)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(Cd(e.exponentformat)&&!k2(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}Ve.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(Yt(r))return br.increment(e,n*r);var i=r.charAt(0),l=n*Number(r.substr(1));if(i==="M")return br.incrementMonth(e,l,a);if(i==="L")return Math.log(Math.pow(10,e)+l)/Math.LN10;if(i==="D"){var o=r==="D2"?oA:lA,s=e+n*.01,u=br.roundUp(br.mod(s,1),o,t);return Math.floor(s)+Math.log(Bn.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};Ve.tickFirst=function(e,r){var t=e.r2l||Number,a=br.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&_<=e._length?m:null};if(i&&br.isArrayOrTypedArray(e.ticktext)){var c=br.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(u=0;u"+o;else{var u=Zc(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(l+="
")}r.text=l}function qj(e,r,t,a,n){var i=e.dtick,l=r.x,o=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),o||s==="L")r.text=Xc(Math.pow(10,l),e,n,a);else if(Yt(i)||s==="D"&&br.mod(l+.01,1)<.1){var u=Math.round(l),f=Math.abs(u),c=e.exponentformat;c==="power"||Cd(c)&&k2(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":ls)+f+"",r.fontSize*=1.25):(c==="e"||c==="E")&&f>2?r.text="1"+c+(u>0?"+":ls)+f:(r.text=Xc(Math.pow(10,l),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,br.mod(l,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(l<0?.5:.25)))}}function Cj(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function Lj(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),l=n[0]===void 0?"":String(n[0]);t?r.text=l+" - "+i:(r.text=i,r.text2=l)}function Sj(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=Xc(r.x,e,n,a)}function Dj(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=Ej(i);if(l[1]>=100)r.text=Xc(br.deg2rad(r.x),e,n,a);else{var o=r.x<0;l[1]===1?l[0]===1?r.text="\u03C0":r.text=l[0]+"\u03C0":r.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),o&&(r.text=ls+r.text)}}}else r.text=Xc(r.x,e,n,a)}function Ej(e){function r(o,s){return Math.abs(o-s)<=1e-6}function t(o,s){return r(s,0)?o:t(s,o%s)}function a(o){for(var s=1;!r(Math.round(o*s)/s,o);)s*=10;return s}var n=a(e),i=e*n,l=Math.abs(t(i,n));return[Math.round(i/l),Math.round(n/l)]}var Pj=["f","p","n","\u03BC","m","","k","M","G","T"];function Cd(e){return e==="SI"||e==="B"}function k2(e){return e>14||e<-15}function Xc(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Ve.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:l,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:Yt(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};sA(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,ls);var c=Math.pow(10,-i)/2;if(l==="none"&&(o=0),e=Math.abs(e),e"+p+"":l==="B"&&o===9?e+="B":Cd(l)&&(e+=Pj[o/3+5])}return n?ls+e:e}Ve.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*Yu}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var c=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return c===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):c-h}else return typeof s=="number"?1:-1}function n(s,u,f){var c=f||function(p){return p},h=u[0],d=u[1];return(!h&&typeof h!="number"||c(h)<=c(s))&&(!d&&typeof d!="number"||c(d)>=c(s))}function i(s,u){var f=u[0]===null,c=u[1]===null,h=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||h)&&(c||d)}var l,o;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var o={false:{left:0,right:0}};return br.syncOrAsync(n.map(function(s){return function(){if(s){var u=Ve.getFromId(e,s);t||(t={}),t.axShifts=o,t.overlayingShiftedAx=l;var f=Ve.drawOne(e,u,t);return u._shiftPusher&&M2(u,u._fullDepth||0,o,!0),u._r=u.range.slice(),u._rl=br.simpleMap(u._r,u.r2l),f}}}))};Ve.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,l,o;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),c=Ve.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),M2(r,d,a,!0),M2(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=Wj(r,a));var p=h[f+"axislayer"],y=r._mainLinePosition,m=y+=r._shift,_=r._mainMirrorPosition,b=r._vals=Ve.calcTicks(r),T=[r.mirror,m,_].join("_");for(i=0;i0?Fe.bottom-He:0,Be))));var ie=0,Ae=0;if(r._shiftPusher&&(ie=Math.max(Be,Fe.height>0?ze==="l"?He-Fe.left:Fe.right-He:0),r.title.text!==s._dfltTitle[f]&&(Ae=(r._titleStandoff||0)+(r._titleScoot||0),ze==="l"&&(Ae+=tA(r))),r._fullDepth=Math.max(ie,Ae)),r.automargin){Ee={x:0,y:0,r:0,l:0,t:0,b:0};var Ce=[0,1],cr=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(ze==="b"?Ee[ze]=r._depth:(Ee[ze]=r._depth=Math.max(Fe.width>0?He-Fe.top:0,Be),Ce.reverse()),Fe.width>0){var tr=Fe.right-(r._offset+r._length);tr>0&&(Ee.xr=1,Ee.r=tr);var De=r._offset-Fe.left;De>0&&(Ee.xl=0,Ee.l=De)}}else if(ze==="l"?(r._depth=Math.max(Fe.height>0?He-Fe.left:0,Be),Ee[ze]=r._depth-cr):(r._depth=Math.max(Fe.height>0?Fe.right-He:0,Be),Ee[ze]=r._depth+cr,Ce.reverse()),Fe.height>0){var Le=Fe.bottom-(r._offset+r._length);Le>0&&(Ee.yb=0,Ee.b=Le);var Ye=r._offset-Fe.top;Ye>0&&(Ee.yt=1,Ee.t=Ye)}Ee[c]=r.anchor==="free"?r.position:r._anchorAxis.domain[Ce[0]],r.title.text!==s._dfltTitle[f]&&(Ee[ze]+=tA(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Je={x:0,y:0,r:0,l:0,t:0,b:0},Je[Re]=r.linewidth,r.mirror&&r.mirror!==!0&&(Je[Re]+=Be),r.mirror===!0||r.mirror==="ticks"?Je[c]=r._anchorAxis.domain[Ce[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Je[c]=[r._counterDomainMin,r._counterDomainMax][Ce[1]]))}Ie&&(We=Gc.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(rA(Ee,r.automargin),rA(Je,r.automargin)),Ou.autoMargin(e,q2(r),Ee),Ou.autoMargin(e,cA(r),Je),Ou.autoMargin(e,vA(r),We)}),br.syncOrAsync(_e)}};function rA(e,r){if(e){var t=Object.keys(ZM).reduce(function(a,n){return r.indexOf(n)!==-1&&ZM[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function Rj(e,r){var t=[],a,n=function(i,l){var o=i.xbnd[l];o!==null&&t.push(br.extendFlat({},i,{x:o}))};if(r.length){for(a=0;ae.range[1],o=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!o;if(t){var u=l?-1:1;t=t*u}if(a){var f=e.side,c=o&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*c}return e._id.charAt(0)==="x"?function(h){return Bu(n+e._offset+e.l2p(w2(h))+t,i+a)}:function(h){return Bu(i+a,n+e._offset+e.l2p(w2(h))+t)}};function w2(e){return e.periodX!==void 0?e.periodX:e.x}function Ij(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),l=t("bottom"),o=t("inside"),s=l||n||a||i;if(!s&&!o)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,c=qd,h=e.tickfont?e.tickfont.size:12;return(l||a)&&(f+=h*os,c+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,c+=qd),o&&u==="top"&&(c-=h*(1-os)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(c=-c),[s?f:0,o?c:0]}Ve.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,l=e._id.charAt(0),o=(e.linewidth||1)/2;return l==="x"?"M0,"+(r+o*t)+"v"+i*t:"M"+(r+o*t)+",0h"+i*t};Ve.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(z){return a.indexOf(z)!==-1},i=n("top"),l=n("left"),o=n("right"),s=n("bottom"),u=s||l||i||o,f=n("inside"),c=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:u&&(p=0),c&&(h+=p,t)){var y=br.deg2rad(t);h=p*Math.cos(y)+1,d=p*Math.sin(y)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var m={labelStandoff:h,labelShift:d},_,b,T,x,M=0,A=e.side,k=e._id.charAt(0),L=e.tickangle,D;if(k==="x")D=!f&&A==="bottom"||f&&A==="top",x=D?1:-1,f&&(x*=-1),_=d*x,b=r+h*x,T=D?1:-.2,Math.abs(L)===90&&(f?T+=Yc:L===-90&&A==="bottom"?T=os:L===90&&A==="top"?T=Yc:T=.5,M=Yc/2*(L/90)),m.xFn=function(z){return z.dx+_+M*z.fontSize},m.yFn=function(z){return z.dy+b+z.fontSize*T},m.anchorFn=function(z,H){if(u){if(l)return"end";if(o)return"start"}return!Yt(H)||H===0||H===180?"middle":H*x<0!==f?"end":"start"},m.heightFn=function(z,H,O){return H<-60||H>60?-.5*O:e.side==="top"!==f?-O:0};else if(k==="y"){if(D=!f&&A==="left"||f&&A==="right",x=D?1:-1,f&&(x*=-1),_=h,b=d*x,T=0,!f&&Math.abs(L)===90&&(L===-90&&A==="left"||L===90&&A==="right"?T=os:T=.5),f){var P=Yt(L)?+L:0;if(P!==0){var R=br.deg2rad(P);M=Math.abs(Math.sin(R))*os*x,T=0}}m.xFn=function(z){return z.dx+r-(_+z.fontSize*T)*x+M*z.fontSize},m.yFn=function(z){return z.dy+b+z.fontSize*Yc},m.anchorFn=function(z,H){return Yt(H)&&Math.abs(H)===90?"middle":D?"end":"start"},m.heightFn=function(z,H,O){return e.side==="right"&&(H*=-1),H<-30?-O:H<30?-.5*O:0}}return m};function Dd(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Ve.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(l){return l.minor&&!l.noTick}):[]).concat(r.ticks?t.vals.filter(function(l){return!l.minor&&!l.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,Dd);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(l){return Uc.stroke(Bn.select(this),l.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(l){return wn.crispRound(e,l.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),Ed(r,[aA]),i.attr("transform",t.transFn)};Ve.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(_){return _.minor}):[],l=r.showgrid?t.vals.filter(function(_){return!_.minor}):[],o=t.counterAxis;if(o&&Ve.shouldShowZeroLine(e,r,o))for(var s=r.tickmode==="array",u=0;u=0;p--){var y=p?h:d;if(y){var m=y.selectAll("path."+a).data(p?l:i,Dd);m.exit().remove(),m.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),m.attr("transform",t.transFn).attr("d",t.path).each(function(_){return Uc.stroke(Bn.select(this),_.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(_){return wn.dashStyle(_.minor?r.minor.griddash:r.griddash,_.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(_){return(_.minor?c:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&m.attr("d",t.path)}}Ed(r,[b2,_2])}};Ve.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=Ve.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(l,o){return pj(l.id,o.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(Uc.stroke,r.zerolinecolor||Uc.defaultLine).style("stroke-width",wn.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),Ed(r,[x2])};Ve.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",l=t.vals.filter(function(I){return I.text}),o=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?l:[],Dd),c=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(I){var G=Bn.select(this),Z=e._promises.length;G.call(is.positionText,o.xFn(I),o.yFn(I)).call(wn.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(is.convertToTspans,e),e._promises[Z]?c.push(e._promises.pop().then(function(){h(G,s)})):h(G,s)}),Ed(r,[XM]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(I){Bn.select(this).select("text").call(is.positionText,o.xFn(I),o.yFn(I))});function h(I,G){I.each(function(Z){var K=Bn.select(this),re=K.select(".text-math-group"),se=o.anchorFn(Z,G),ce=t.transFn.call(K.node(),Z)+(Yt(G)&&+G!=0?" rotate("+G+","+o.xFn(Z)+","+(o.yFn(Z)-Z.fontSize/2)+")":""),le=is.lineCount(K),Q=Wc*Z.fontSize,ge=o.heightFn(Z,Yt(G)?+G:0,(le-1)*Q);if(ge&&(ce+=Bu(0,ge)),re.empty()){var ue=K.select("text");ue.attr({transform:ce,"text-anchor":se}),ue.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var ke=wn.bBox(re.node()).width,ve=ke*{end:-.5,start:.5}[se];re.attr("transform",ce+Bu(ve,0))}})}r._adjustTickLabelsOverflow=function(){var I=r.ticklabeloverflow;if(!(!I||I==="allow")){var G=I.indexOf("hide")!==-1,Z=r._id.charAt(0)==="x",K=0,re=Z?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var se=br.simpleMap(r.range,r.r2l);K=r.l2p(se[0])+r._offset,re=r.l2p(se[1])+r._offset}var ce=Math.min(K,re),le=Math.max(K,re),Q=r.side,ge=1/0,ue=-1/0;f.each(function(W){var te=Bn.select(this),X=te.select(".text-math-group");if(X.empty()){var ye=wn.bBox(te.node()),_e=0;Z?(ye.right>le||ye.leftle||ye.top+(r.tickangle?0:W.fontSize/4)r["_visibleLabelMin_"+se._id]?W.style("display","none"):le.K==="tick"&&!ce&&W.style("display",null)})})})})},h(f,u+1?u:s);function d(){return c.length&&Promise.all(c)}var p=null;function y(){if(h(f,s),l.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){p=r.autotickangles[0];var I=0,G=[],Z,K=1;f.each(function(Fe){I=Math.max(I,Fe.fontSize);var Ee=r.l2p(Fe.x),Je=T2(this),We=wn.bBox(Je.node());K=Math.max(K,is.lineCount(Je)),G.push({top:0,bottom:10,height:10,left:Ee-We.width/2,right:Ee+We.width/2+2,width:We.width+2})});var re=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,se=l.length,ce=Math.abs((l[se-1].x-l[0].x)*r._m)/(se-1),le=re?ce/2:ce,Q=re?r.ticklen:I*1.25*K,ge=Math.sqrt(Math.pow(le,2)+Math.pow(Q,2)),ue=le/ge,ke=r.autotickangles.map(function(Fe){return Fe*Math.PI/180}),ve=ke.find(function(Fe){return Math.abs(Math.cos(Fe))<=ue});ve===void 0&&(ve=ke.reduce(function(Fe,Ee){return Math.abs(Math.cos(Fe))U*O&&(R=O,L[k]=D[k]=z[k])}var V=Math.abs(R-P);V-x>0?(V-=x,x*=1+x/V):x=0,r._id.charAt(0)!=="y"&&(x=-x),L[A]=b.p2r(b.r2p(D[A])+M*x),b.autorange==="min"||b.autorange==="max reversed"?(L[0]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0):(b.autorange==="max"||b.autorange==="min reversed")&&(L[1]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[b._name+".range"]=L}var Y=br.syncOrAsync(m);return Y&&Y.then&&e._promises.push(Y),Y};function Hj(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,Dd);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Uc.stroke,r.dividercolor).style("stroke-width",wn.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}Ve.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function tA(e){var r=e.title.font.size,t=(e.title.text.match(is.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(os+t*Wc):t?r*(t+1)*Wc:r}function Oj(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,l,o=(r.title.text.match(is.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?l=r._depth+r.title.standoff+i*os:(r.side==="top"||r.side==="left")&&(l=r._depth+r.title.standoff+i*(Yc+o*Wc));else{var s=Zc(r);if(r.type==="multicategory")l=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),l=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?l+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):l+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=Ve.getPxPosition(e,r),c,h,d;n==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-l:f+l):(d=r._offset+r._length/2,h=r.side==="right"?f+l:f-l,c={rotate:"-90",offset:0});var p;if(r.type!=="multicategory"){var y=r._selections[r._id+"tick"];if(p={selection:y,side:r.side},y&&y.node()&&y.node().parentNode){var m=wn.getTranslate(y.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}r.title.hasOwnProperty("standoff")&&(p.pad=0)}return r._titleStandoff=l,lj.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}Ve.shouldShowZeroLine=function(e,r,t){var a=br.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===Ld)&&(fA(r,0)||!Bj(e,r,t,a)||Yj(e,r))};Ve.clipEnds=function(e,r){return r.filter(function(t){return fA(e,t.x)})};function fA(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=vj:/%L/.test(r)?e>=cj:/%[SX]/.test(r)?e>=kd:/%M/.test(r)?e>=Vc:/%[HI]/.test(r)?e>=Gi:/%p/.test(r)?e>=$l:/%[Aadejuwx]/.test(r)?e>=Ba:/%[UVW]/.test(r)?e>=Tn:/%[Bbm]/.test(r)?e>=Ad:/%[q]/.test(r)?e>=Md:/%[Yy]/.test(r)?e>=Td:!0}});var pA=B((wge,dA)=>{"use strict";dA.exports=function(r,t,a){var n,i;if(a){var l=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[l?1:0],i=a[l?0:1]}var o=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);o===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var L2=B((Tge,mA)=>{"use strict";var Zj=pA();mA.exports=function(r,t,a,n){var i=t._template||{},l=t.type||i.type||"-";a("minallowed"),a("maxallowed");var o=a("range");if(!o){var s;!n.noInsiderange&&l!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(o=a("range",s)))}var u=t.getAutorangeDflt(o,n),f=a("autorange",u),c;o&&(o[0]===null&&o[1]===null||(o[0]===null||o[1]===null)&&(f==="reversed"||f===!0)||o[0]!==null&&(f==="min"||f==="max reversed")||o[1]!==null&&(f==="max"||f==="min reversed"))&&(o=void 0,delete t.range,t.autorange=!0,c=!0),c||(u=t.getAutorangeDflt(o,n),f=a("autorange",u)),f&&(Zj(a,f,o),(l==="linear"||l==="-")&&a("rangemode")),t.cleanRange()}});var gA=B((Mge,yA)=>{var Jj={left:0,top:0};yA.exports=$j;function $j(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=Kj(r);return t[0]=a-i.left,t[1]=n-i.top,t}function Kj(e){return e===window||e===document||e===document.body?Jj:e.getBoundingClientRect()}});var S2=B((Age,xA)=>{"use strict";var Qj=ug();function jj(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}xA.exports=Qj&&jj()});var _A=B((kge,bA)=>{"use strict";bA.exports=function(r,t,a,n,i){var l=(r-a)/(n-a),o=l+t/(n-a),s=(l+o)/2;return i==="left"||i==="bottom"?l:i==="center"||i==="middle"?s:i==="right"||i==="top"?o:l<2/3-s?l:o>4/3-s?o:s}});var MA=B((qge,TA)=>{"use strict";var wA=Pe(),eee=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];TA.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=wA.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=wA.constrain(Math.floor(t*3),0,2),eee[t][r]}});var kA=B((Cge,AA)=>{"use strict";var ree=Sc(),tee=Lh(),aee=wc().getGraphDiv,nee=xc(),D2=AA.exports={};D2.wrapped=function(e,r,t){e=aee(e),e._fullLayout&&tee.clear(e._fullLayout._uid+nee.HOVERID),D2.raw(e,r,t)};D2.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&ree.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var mi=B((Lge,LA)=>{"use strict";var iee=gA(),E2=cg(),lee=S2(),oee=Pe().removeElement,see=wa(),ss=LA.exports={};ss.align=_A();ss.getCursor=MA();var qA=kA();ss.unhover=qA.wrapped;ss.unhoverRaw=qA.raw;ss.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,l,o,s,u,f,c,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=m,lee?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=m,i.addEventListener("touchstart",m,{passive:!1})):i.ontouchstart=m;function p(T,x,M){return Math.abs(T)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,c),!d){var x;try{x=new MouseEvent("click",T)}catch(A){var M=P2(T);x=document.createEvent("MouseEvents"),x.initMouseEvent("click",T.bubbles,T.cancelable,T.view,T.detail,T.screenX,T.screenY,M[0],M[1],T.ctrlKey,T.altKey,T.shiftKey,T.metaKey,T.button,T.relatedTarget)}h.dispatchEvent(x)}t._dragging=!1,t._dragged=!1}};function CA(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}ss.coverSlip=CA;function P2(e){return iee(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Kl=B((Sge,SA)=>{"use strict";SA.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var PA=B((Dge,EA)=>{"use strict";var R2=Kl(),Jc="data-savedcursor",DA="!!";EA.exports=function(r,t){var a=r.attr(Jc);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var z2=jt(),uee=zn();RA.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:uee.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:z2({editType:"legend"}),grouptitlefont:z2({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:z2({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Rd=B(Pd=>{"use strict";Pd.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};Pd.isVertical=function(r){return r.orientation!=="h"};Pd.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var H2=B((Rge,zA)=>{"use strict";var F2=yr(),Mn=Pe(),fee=ot(),cee=tn(),vee=N2(),hee=xu(),I2=Rd();function dee(e,r,t,a){var n=r[e]||{},i=fee.newContainer(t,e);function l(Y,I){return Mn.coerce(n,i,vee,Y,I)}var o=Mn.coerceFont(l,"font",t.font);l("bgcolor",t.paper_bgcolor),l("bordercolor");var s=l("visible");if(s){for(var u,f=function(Y,I){var G=u._input,Z=u;return Mn.coerce(G,Z,cee,Y,I)},c=t.font||{},h=Mn.coerceFont(l,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,y="normal",m=(t.shapes||[]).filter(function(Y){return Y.showlegend}),_=a.concat(m).filter(function(Y){return e===(Y.legend||"legend")}),b=0;b<_.length;b++)if(u=_[b],!!u.visible){var T=u._isShape;(u.showlegend||u._dfltShowLegend&&!(u._module&&u._module.attributes&&u._module.attributes.showlegend&&u._module.attributes.showlegend.dflt===!1))&&(d++,u.showlegend&&(p=!0,(!T&&F2.traceIs(u,"pie-like")||u._input.showlegend===!0)&&d++),Mn.coerceFont(f,"legendgrouptitle.font",h)),(!T&&F2.traceIs(u,"bar")&&t.barmode==="stack"||["tonextx","tonexty"].indexOf(u.fill)!==-1)&&(y=I2.isGrouped({traceorder:y})?"grouped+reversed":"reversed"),u.legendgroup!==void 0&&u.legendgroup!==""&&(y=I2.isReversed({traceorder:y})?"reversed+grouped":"grouped")}var x=Mn.coerce(r,t,hee,"showlegend",p&&d>(e==="legend"?1:0));if(x===!1&&(t[e]=void 0),!(x===!1&&!n.uirevision)&&(l("uirevision",t.uirevision),x!==!1)){l("borderwidth");var M=l("orientation"),A=l("yref"),k=l("xref"),L=M==="h",D=A==="paper",P=k==="paper",R,z,H,O="left";L?(R=0,F2.getComponentMethod("rangeslider","isVisible")(r.xaxis)?D?(z=1.1,H="bottom"):(z=1,H="top"):D?(z=-.1,H="top"):(z=0,H="bottom")):(z=1,H="auto",P?R=1.02:(R=1,O="right")),Mn.coerce(n,i,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:R}},"x"),Mn.coerce(n,i,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:z}},"y"),l("traceorder",y),I2.isGrouped(t[e])&&l("tracegroupgap"),l("entrywidth"),l("entrywidthmode"),l("indentation"),l("itemsizing"),l("itemwidth"),l("itemclick"),l("itemdoubleclick"),l("groupclick"),l("xanchor",O),l("yanchor",H),l("valign"),Mn.noneOrAll(n,i,["x","y"]);var U=l("title.text");if(U){l("title.side",L?"left":"top");var V=Mn.extendFlat({},o,{size:Mn.bigFont(o.size)});Mn.coerceFont(l,"title.font",V)}}}}zA.exports=function(r,t,a){var n,i=a.slice(),l=t.shapes;if(l)for(n=0;n{"use strict";var Gu=yr(),B2=Pe(),pee=B2.pushUnique,O2=!0;NA.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,l=n.legend.itemdoubleclick,o=n.legend.groupclick;a===1&&i==="toggle"&&l==="toggleothers"&&O2&&t.data&&t._context.showTips&&B2.notifier(B2._(t,"Double-click on legend to isolate one trace"),"long"),O2=!1;var s;if(a===1?s=i:a===2&&(s=l),!s)return;var u=o==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],c=r.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=t._fullData,d=(n.shapes||[]).filter(function(He){return He.showlegend}),p=h.concat(d),y=c.trace;y._isShape&&(y=y._fullInput);var m=y.legendgroup,_,b,T,x,M,A,k={},L=[],D=[],P=[];function R(He,Be){var Fe=L.indexOf(He),Ee=k.visible;return Ee||(Ee=k.visible=[]),L.indexOf(He)===-1&&(L.push(He),Fe=L.length-1),Ee[Fe]=Be,Fe}var z=(n.shapes||[]).map(function(He){return He._input}),H=!1;function O(He,Be){z[He].visible=Be,H=!0}function U(He,Be){if(!(c.groupTitle&&!u)){var Fe=He._fullInput||He,Ee=Fe._isShape,Je=Fe.index;Je===void 0&&(Je=Fe._index);var We=Fe.visible===!1?!1:Be;Ee?O(Je,We):R(Je,We)}}var V=y.legend,Y=y._fullInput,I=Y&&Y._isShape;if(!I&&Gu.traceIs(y,"pie-like")){var G=c.label,Z=f.indexOf(G);if(s==="toggle")Z===-1?f.push(G):f.splice(Z,1);else if(s==="toggleothers"){var K=Z!==-1,re=[];for(_=0;_{"use strict";IA.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var BA=B((Fge,OA)=>{"use strict";var HA=yr(),G2=Rd();OA.exports=function(r,t,a){var n=t._inHover,i=G2.isGrouped(t),l=G2.isReversed(t),o={},s=[],u=!1,f={},c=0,h=0,d,p;function y(Y,I,G){if(t.visible!==!1&&!(a&&Y!==t._id))if(I===""||!G2.isGrouped(t)){var Z="~~i"+c;s.push(Z),o[Z]=[G],c++}else s.indexOf(I)===-1?(s.push(I),u=!0,o[I]=[G]):o[I].push(G)}for(d=0;dP&&(D=P)}k[d][0]._groupMinRank=D,k[d][0]._preGroupSort=d}var R=function(Y,I){return Y[0]._groupMinRank-I[0]._groupMinRank||Y[0]._preGroupSort-I[0]._preGroupSort},z=function(Y,I){return Y.trace.legendrank-I.trace.legendrank||Y._preSort-I._preSort};for(k.forEach(function(Y,I){Y[0]._preGroupSort=I}),k.sort(R),d=0;d{"use strict";var zd=Pe();function YA(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}us.formatPiePercent=function(r,t){var a=YA((r*100).toPrecision(3));return zd.numSeparate(a,t)+"%"};us.formatPieValue=function(r,t){var a=YA(r.toPrecision(10));return zd.numSeparate(a,t)};us.getFirstFilled=function(r,t){if(zd.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var mee=Br(),yee=xr();GA.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?mee.pointStyle(r,a,n,t):yee.fill(r,t.color)}});var Uu=B((Oge,XA)=>{"use strict";var VA=xr(),WA=$c().castOption,gee=UA();XA.exports=function(r,t,a,n){var i=a.marker.line,l=WA(i.color,t.pts)||VA.defaultLine,o=WA(i.width,t.pts)||0;r.call(gee,t,a,n).style("stroke-width",o).call(VA.stroke,l)}});var X2=B((Bge,jA)=>{"use strict";var Ya=kr(),U2=yr(),Ea=Pe(),ZA=Ea.strTranslate,Ka=Br(),Yn=xr(),V2=Hn().extractOpts,Nd=_n(),xee=Uu(),bee=$c().castOption,_ee=Y2(),JA=12,$A=5,fs=2,wee=10,Vu=5;jA.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",l=a.itemwidth,o=(l+_ee.itemGap*2)/2,s=ZA(o,0),u=function(k,L,D,P){var R;if(k+1)R=k;else if(L&&L.width>0)R=L.width;else return 0;return i?P:Math.min(R,D)};r.each(function(k){var L=Ya.select(this),D=Ea.ensureSingle(L,"g","layers");D.style("opacity",k[0].trace.opacity);var P=a.indentation,R=a.valign,z=k[0].lineHeight,H=k[0].height;if(R==="middle"&&P===0||!z||!H)D.attr("transform",null);else{var O={top:1,bottom:-1}[R],U=O*(.5*(z-H+3))||0,V=a.indentation;D.attr("transform",ZA(V,U))}var Y=D.selectAll("g.legendfill").data([k]);Y.enter().append("g").classed("legendfill",!0);var I=D.selectAll("g.legendlines").data([k]);I.enter().append("g").classed("legendlines",!0);var G=D.selectAll("g.legendsymbols").data([k]);G.enter().append("g").classed("legendsymbols",!0),G.selectAll("g.legendpoints").data([k]).enter().append("g").classed("legendpoints",!0)}).each(A).each(h).each(p).each(d).each(m).each(x).each(T).each(f).each(c).each(_).each(b);function f(k){var L=KA(k),D=L.showFill,P=L.showLine,R=L.showGradientLine,z=L.showGradientFill,H=L.anyFill,O=L.anyLine,U=k[0],V=U.trace,Y,I,G=V2(V),Z=G.colorscale,K=G.reversescale,re=function(ke){if(ke.size())if(D)Ka.fillGroupStyle(ke,t,!0);else{var ve="legendfill-"+V.uid;Ka.gradient(ke,t,ve,W2(K),Z,"fill")}},se=function(ke){if(ke.size()){var ve="legendline-"+V.uid;Ka.lineGroupStyle(ke),Ka.gradient(ke,t,ve,W2(K),Z,"stroke")}},ce=Nd.hasMarkers(V)||!H?"M5,0":O?"M5,-2":"M5,-3",le=Ya.select(this),Q=le.select(".legendfill").selectAll("path").data(D||z?[k]:[]);if(Q.enter().append("path").classed("js-fill",!0),Q.exit().remove(),Q.attr("d",ce+"h"+l+"v6h-"+l+"z").call(re),P||R){var ge=u(void 0,V.line,wee,$A);I=Ea.minExtend(V,{line:{width:ge}}),Y=[Ea.minExtend(U,{trace:I})]}var ue=le.select(".legendlines").selectAll("path").data(P||R?[Y]:[]);ue.enter().append("path").classed("js-line",!0),ue.exit().remove(),ue.attr("d",ce+(R?"l"+l+",0.0001":"h"+l)).call(P?Ka.lineGroupStyle:se)}function c(k){var L=KA(k),D=L.anyFill,P=L.anyLine,R=L.showLine,z=L.showMarker,H=k[0],O=H.trace,U=!z&&!P&&!D&&Nd.hasText(O),V,Y;function I(Q,ge,ue,ke){var ve=Ea.nestedProperty(O,Q).get(),be=Ea.isArrayOrTypedArray(ve)&&ge?ge(ve):ve;if(i&&be&&ke!==void 0&&(be=ke),ue){if(beue[1])return ue[1]}return be}function G(Q){return H._distinct&&H.index&&Q[H.index]?Q[H.index]:Q[0]}if(z||U||R){var Z={},K={};if(z){Z.mc=I("marker.color",G),Z.mx=I("marker.symbol",G),Z.mo=I("marker.opacity",Ea.mean,[.2,1]),Z.mlc=I("marker.line.color",G),Z.mlw=I("marker.line.width",Ea.mean,[0,5],fs),K.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var re=I("marker.size",Ea.mean,[2,16],JA);Z.ms=re,K.marker.size=re}R&&(K.line={width:I("line.width",G,[0,10],$A)}),U&&(Z.tx="Aa",Z.tp=I("textposition",G),Z.ts=10,Z.tc=I("textfont.color",G),Z.tf=I("textfont.family",G),Z.tw=I("textfont.weight",G),Z.ty=I("textfont.style",G),Z.tv=I("textfont.variant",G),Z.tC=I("textfont.textcase",G),Z.tE=I("textfont.lineposition",G),Z.tS=I("textfont.shadow",G)),V=[Ea.minExtend(H,Z)],Y=Ea.minExtend(O,K),Y.selectedpoints=null,Y.texttemplate=null}var se=Ya.select(this).select("g.legendpoints"),ce=se.selectAll("path.scatterpts").data(z?V:[]);ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),ce.exit().remove(),ce.call(Ka.pointStyle,Y,t),z&&(V[0].mrc=3);var le=se.selectAll("g.pointtext").data(U?V:[]);le.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),le.exit().remove(),le.selectAll("text").call(Ka.textPointStyle,Y,t)}function h(k){var L=k[0].trace,D=L.type==="waterfall";if(k[0]._distinct&&D){var P=k[0].trace[k[0].dir].marker;return k[0].mc=P.color,k[0].mlw=P.line.width,k[0].mlc=P.line.color,y(k,this,"waterfall")}var R=[];L.visible&&D&&(R=k[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=Ya.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(R);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(H){var O=Ya.select(this),U=L[H[0]].marker,V=u(void 0,U.line,Vu,fs);O.attr("d",H[1]).style("stroke-width",V+"px").call(Yn.fill,U.color),V&&O.call(Yn.stroke,U.line.color)})}function d(k){y(k,this)}function p(k){y(k,this,"funnel")}function y(k,L,D){var P=k[0].trace,R=P.marker||{},z=R.line||{},H=R.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",O=D?P.visible&&P.type===D:U2.traceIs(P,"bar"),U=Ya.select(L).select("g.legendpoints").selectAll("path.legend"+D).data(O?[k]:[]);U.enter().append("path").classed("legend"+D,!0).attr("d",H).attr("transform",s),U.exit().remove(),U.each(function(V){var Y=Ya.select(this),I=V[0],G=u(I.mlw,R.line,Vu,fs);Y.style("stroke-width",G+"px");var Z=I.mcc;if(!a._inHover&&"mc"in I){var K=V2(R),re=K.mid;re===void 0&&(re=(K.max+K.min)/2),Z=Ka.tryColorscale(R,"")(re)}var se=Z||I.mc||R.color,ce=R.pattern,le=ce&&Ka.getPatternAttr(ce.shape,0,"");if(le){var Q=Ka.getPatternAttr(ce.bgcolor,0,null),ge=Ka.getPatternAttr(ce.fgcolor,0,null),ue=ce.fgopacity,ke=QA(ce.size,8,10),ve=QA(ce.solidity,.5,1),be="legend-"+P.uid;Y.call(Ka.pattern,"legend",t,be,le,ke,ve,Z,ce.fillmode,Q,ge,ue)}else Y.call(Yn.fill,se);G&&Yn.stroke(Y,I.mlc||z.color)})}function m(k){var L=k[0].trace,D=Ya.select(this).select("g.legendpoints").selectAll("path.legendbox").data(L.visible&&U2.traceIs(L,"box-violin")?[k]:[]);D.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.each(function(){var P=Ya.select(this);if((L.boxpoints==="all"||L.points==="all")&&Yn.opacity(L.fillcolor)===0&&Yn.opacity((L.line||{}).color)===0){var R=Ea.minExtend(L,{marker:{size:i?JA:Ea.constrain(L.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});D.call(Ka.pointStyle,R,t)}else{var z=u(void 0,L.line,Vu,fs);P.style("stroke-width",z+"px").call(Yn.fill,L.fillcolor),z&&Yn.stroke(P,L.line.color)}})}function _(k){var L=k[0].trace,D=Ya.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(L.visible&&L.type==="candlestick"?[k,k]:[]);D.enter().append("path").classed("legendcandle",!0).attr("d",function(P,R){return R?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(P,R){var z=Ya.select(this),H=L[R?"increasing":"decreasing"],O=u(void 0,H.line,Vu,fs);z.style("stroke-width",O+"px").call(Yn.fill,H.fillcolor),O&&Yn.stroke(z,H.line.color)})}function b(k){var L=k[0].trace,D=Ya.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(L.visible&&L.type==="ohlc"?[k,k]:[]);D.enter().append("path").classed("legendohlc",!0).attr("d",function(P,R){return R?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(P,R){var z=Ya.select(this),H=L[R?"increasing":"decreasing"],O=u(void 0,H.line,Vu,fs);z.style("fill","none").call(Ka.dashLine,H.line.dash,O),O&&Yn.stroke(z,H.line.color)})}function T(k){M(k,this,"pie")}function x(k){M(k,this,"funnelarea")}function M(k,L,D){var P=k[0],R=P.trace,z=D?R.visible&&R.type===D:U2.traceIs(R,D),H=Ya.select(L).select("g.legendpoints").selectAll("path.legend"+D).data(z?[k]:[]);if(H.enter().append("path").classed("legend"+D,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),H.exit().remove(),H.size()){var O=R.marker||{},U=u(bee(O.line.width,P.pts),O.line,Vu,fs),V="pieLike",Y=Ea.minExtend(R,{marker:{line:{width:U}}},V),I=Ea.minExtend(P,{trace:Y},V);xee(H,I,Y,t)}}function A(k){var L=k[0].trace,D,P=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],D=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],D=!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"]],D="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"]],D=!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"]],D=!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"]],D=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!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"]],D=!1;break}var R=Ya.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);R.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(z,H){var O=Ya.select(this),U=V2(L),V=U.colorscale,Y=U.reversescale,I=function(re){if(re.size()){var se="legendfill-"+L.uid;Ka.gradient(re,t,se,W2(Y,D==="radial"),V,"fill")}},G;if(V){if(!D){var K=V.length;G=H===0?V[Y?K-1:0][1]:H===1?V[Y?0:K-1][1]:V[Math.floor((K-1)/2)][1]}}else{var Z=L.vertexcolor||L.facecolor||L.color;G=Ea.isArrayOrTypedArray(Z)?Z[H]||Z[0]:Z}O.attr("d",z[0]),G?O.call(Yn.fill,G):O.call(I)})}};function W2(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function KA(e){var r=e[0].trace,t=r.contours,a=Nd.hasLines(r),n=Nd.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",l=!1,o=!1;if(t){var s=t.coloring;s==="lines"?l=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(o=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:l,showGradientFill:o,anyLine:a||l,anyFill:i||o}}function QA(e,r,t){return e&&Ea.isArrayOrTypedArray(e)?r:e>t?t:e}});var K2=B((Yge,uk)=>{"use strict";var un=kr(),Gt=Pe(),J2=St(),Zu=yr(),ek=Sc(),Z2=mi(),Ut=Br(),Id=xr(),cs=va(),rk=FA(),$t=Y2(),$2=Sa(),ok=$2.LINE_SPACING,Xu=$2.FROM_TL,tk=$2.FROM_BR,ak=BA(),Tee=X2(),nk=Rd(),Wu=1,Mee=/^legend[0-9]*$/;uk.exports=function(r,t){if(t)ik(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=un.select(this),f=u.attr("class"),c=f.split(" ")[0];c.match(Mee)&&n.indexOf(c)===-1&&u.remove()});for(var l=0;l1)}var p=a.hiddenlabels||[];if(!o&&(!a.showlegend||!s.length))return l.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),J2.autoMargin(e,n);var y=Gt.ensureSingle(l,"g",n,function(L){o||L.attr("pointer-events","all")}),m=Gt.ensureSingleById(a._topdefs,"clipPath",i,function(L){L.append("rect")}),_=Gt.ensureSingle(y,"rect","bg",function(L){L.attr("shape-rendering","crispEdges")});_.call(Id.stroke,t.bordercolor).call(Id.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var b=Gt.ensureSingle(y,"g","scrollbox"),T=t.title;t._titleWidth=0,t._titleHeight=0;var x;T.text?(x=Gt.ensureSingle(b,"text",n+"titletext"),x.attr("text-anchor","start").call(Ut.font,T.font).text(T.text),Hd(x,b,e,t,Wu)):b.selectAll("."+n+"titletext").remove();var M=Gt.ensureSingle(y,"rect","scrollbar",function(L){L.attr($t.scrollBarEnterAttrs).call(Id.fill,$t.scrollBarColor)}),A=b.selectAll("g.groups").data(s);A.enter().append("g").attr("class","groups"),A.exit().remove();var k=A.selectAll("g.traces").data(Gt.identity);k.enter().append("g").attr("class","traces"),k.exit().remove(),k.style("opacity",function(L){var D=L[0].trace;return Zu.traceIs(D,"pie-like")?p.indexOf(L[0].label)!==-1?.5:1:D.visible==="legendonly"?.5:1}).each(function(){un.select(this).call(kee,e,t)}).call(Tee,e,t).each(function(){o||un.select(this).call(qee,e,n)}),Gt.syncOrAsync([J2.previousPromises,function(){return See(e,A,k,t)},function(){var L=a._size,D=t.borderwidth,P=t.xref==="paper",R=t.yref==="paper";if(T.text&&Aee(x,t,D),!o){var z,H;P?z=L.l+L.w*t.x-Xu[Od(t)]*t._width:z=a.width*t.x-Xu[Od(t)]*t._width,R?H=L.t+L.h*(1-t.y)-Xu[Bd(t)]*t._effHeight:H=a.height*(1-t.y)-Xu[Bd(t)]*t._effHeight;var O=Dee(e,n,z,H);if(O)return;if(a.margin.autoexpand){var U=z,V=H;z=P?Gt.constrain(z,0,a.width-t._width):U,H=R?Gt.constrain(H,0,a.height-t._effHeight):V,z!==U&&Gt.log("Constrain "+n+".x to make legend fit inside graph"),H!==V&&Gt.log("Constrain "+n+".y to make legend fit inside graph")}Ut.setTranslate(y,z,H)}if(M.on(".drag",null),y.on("wheel",null),o||t._height<=t._maxHeight||e._context.staticPlot){var Y=t._effHeight;o&&(Y=t._height),_.attr({width:t._width-D,height:Y-D,x:D/2,y:D/2}),Ut.setTranslate(b,0,0),m.select("rect").attr({width:t._width-2*D,height:Y-2*D,x:D,y:D}),Ut.setClipUrl(b,i,e),Ut.setRect(M,0,0,0,0),delete t._scrollY}else{var I=Math.max($t.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),G=t._effHeight-I-2*$t.scrollBarMargin,Z=t._height-t._effHeight,K=G/Z,re=Math.min(t._scrollY||0,Z);_.attr({width:t._width-2*D+$t.scrollBarWidth+$t.scrollBarMargin,height:t._effHeight-D,x:D/2,y:D/2}),m.select("rect").attr({width:t._width-2*D+$t.scrollBarWidth+$t.scrollBarMargin,height:t._effHeight-2*D,x:D,y:D+re}),Ut.setClipUrl(b,i,e),ve(re,I,K),y.on("wheel",function(){re=Gt.constrain(t._scrollY+un.event.deltaY/G*Z,0,Z),ve(re,I,K),re!==0&&re!==Z&&un.event.preventDefault()});var se,ce,le,Q=function(ye,_e,xe){var Ie=(xe-_e)/K+ye;return Gt.constrain(Ie,0,Z)},ge=function(ye,_e,xe){var Ie=(_e-xe)/K+ye;return Gt.constrain(Ie,0,Z)},ue=un.behavior.drag().on("dragstart",function(){var ye=un.event.sourceEvent;ye.type==="touchstart"?se=ye.changedTouches[0].clientY:se=ye.clientY,le=re}).on("drag",function(){var ye=un.event.sourceEvent;ye.buttons===2||ye.ctrlKey||(ye.type==="touchmove"?ce=ye.changedTouches[0].clientY:ce=ye.clientY,re=Q(le,se,ce),ve(re,I,K))});M.call(ue);var ke=un.behavior.drag().on("dragstart",function(){var ye=un.event.sourceEvent;ye.type==="touchstart"&&(se=ye.changedTouches[0].clientY,le=re)}).on("drag",function(){var ye=un.event.sourceEvent;ye.type==="touchmove"&&(ce=ye.changedTouches[0].clientY,re=ge(le,se,ce),ve(re,I,K))});b.call(ke)}function ve(ye,_e,xe){t._scrollY=e._fullLayout[n]._scrollY=ye,Ut.setTranslate(b,0,-ye),Ut.setRect(M,t._width,$t.scrollBarMargin+ye*xe,$t.scrollBarWidth,_e),m.select("rect").attr("y",D+ye)}if(e._context.edits.legendPosition){var be,W,te,X;y.classed("cursor-move",!0),Z2.init({element:y.node(),gd:e,prepFn:function(ye){if(ye.target!==M.node()){var _e=Ut.getTranslate(y);te=_e.x,X=_e.y}},moveFn:function(ye,_e){if(te!==void 0&&X!==void 0){var xe=te+ye,Ie=X+_e;Ut.setTranslate(y,xe,Ie),be=Z2.align(xe,t._width,L.l,L.l+L.w,t.xanchor),W=Z2.align(Ie+t._height,-t._height,L.t+L.h,L.t,t.yanchor)}},doneFn:function(){if(be!==void 0&&W!==void 0){var ye={};ye[n+".x"]=be,ye[n+".y"]=W,Zu.call("_guiRelayout",e,ye)}},clickFn:function(ye,_e){var xe=l.selectAll("g.traces").filter(function(){var Ie=this.getBoundingClientRect();return _e.clientX>=Ie.left&&_e.clientX<=Ie.right&&_e.clientY>=Ie.top&&_e.clientY<=Ie.bottom});xe.size()>0&&sk(e,y,xe,ye,_e)}})}}],e)}}function Fd(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,l=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*l:t+(l||n)}function sk(e,r,t,a,n){var i=t.data()[0][0].trace,l={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(l.group=i._group),Zu.traceIs(i,"pie-like")&&(l.label=t.datum()[0].label);var o=ek.triggerHandler(e,"plotly_legendclick",l);if(a===1){if(o===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&rk(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=ek.triggerHandler(e,"plotly_legenddoubleclick",l);s!==!1&&o!==!1&&rk(t,e,a)}}function kee(e,r,t){var a=Yd(t),n=e.data()[0][0],i=n.trace,l=Zu.traceIs(i,"pie-like"),o=!t._inHover&&r._context.edits.legendText&&!l,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=l?n.label:i.name,i._meta&&(u=Gt.templateString(u,i._meta))));var c=Gt.ensureSingle(e,"text",a+"text");c.attr("text-anchor","start").call(Ut.font,f).text(o?lk(u,s):u);var h=t.indentation+t.itemwidth+$t.itemGap*2;cs.positionText(c,h,0),o?c.call(cs.makeEditable,{gd:r,text:u}).call(Hd,e,r,t).on("edit",function(d){this.text(lk(d,s)).call(Hd,e,r,t);var p=n.trace._fullInput||{},y={};return y.name=d,p._isShape?Zu.call("_guiRelayout",r,"shapes["+i.index+"].name",y.name):Zu.call("_guiRestyle",r,y,i.index)}):Hd(c,e,r,t)}function lk(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function qee(e,r,t){var a=r._context.doubleClickDelay,n,i=1,l=Gt.ensureSingle(e,"rect",t+"toggle",function(o){r._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(Id.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(l.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),sk(r,o,e,i,un.event)}}))}function Hd(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),cs.convertToTspans(e,t,function(){Cee(r,t,a,n)})}function Cee(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),l=i.node(),o=Yd(t);t||(t=r._fullLayout[o]);var s=t.borderwidth,u;a===Wu?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*ok,c,h;if(l){var d=Ut.bBox(l);c=d.height,h=d.width,a===Wu?Ut.setTranslate(i,s,s+c*.75):Ut.setTranslate(i,0,c*.25)}else{var p="."+o+(a===Wu?"title":"")+"text",y=e.select(p),m=cs.lineCount(y),_=y.node();if(c=f*m,h=_?Ut.bBox(_).width:0,a===Wu)t.title.side==="left"&&(h+=$t.itemGap*2),cs.positionText(y,s+$t.titlePad,s+f);else{var b=$t.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(b=$t.itemGap,h-=t.indentation+t.itemwidth),cs.positionText(y,b,-f*((m-1)/2-.3))}}a===Wu?(t._titleWidth=h,t._titleHeight=c):(n.lineHeight=f,n.height=Math.max(c,16)+3,n.width=h)}function Lee(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function See(e,r,t,a){var n=e._fullLayout,i=Yd(a);a||(a=n[i]);var l=n._size,o=nk.isVertical(a),s=nk.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,h=$t.itemGap,d=a.indentation+a.itemwidth+h*2,p=2*(f+h),y=Bd(a),m=a.y<0||a.y===0&&y==="top",_=a.y>1||a.y===1&&y==="bottom",b=a.tracegroupgap,T={};a._maxHeight=Math.max(m||_?n.height/2:l.h,30);var x=0;a._width=0,a._height=0;var M=Lee(a);if(o)t.each(function(le){var Q=le[0].height;Ut.setTranslate(this,f+M[0],f+M[1]+a._height+Q/2+h),a._height+=Q,a._width=Math.max(a._width,le[0].width)}),x=d+a._width,a._width+=h+d+c,a._height+=p,s&&(r.each(function(le,Q){Ut.setTranslate(this,0,Q*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var A=Od(a),k=a.x<0||a.x===0&&A==="right",L=a.x>1||a.x===1&&A==="left",D=_||m,P=n.width/2;a._maxWidth=Math.max(k?D&&A==="left"?l.l+l.w:P:L?D&&A==="right"?l.r+l.w:P:l.w,2*d);var R=0,z=0;t.each(function(le){var Q=Fd(le,a,d);R=Math.max(R,Q),z+=Q}),x=null;var H=0;if(s){var O=0,U=0,V=0;r.each(function(){var le=0,Q=0;un.select(this).selectAll("g.traces").each(function(ue){var ke=Fd(ue,a,d),ve=ue[0].height;Ut.setTranslate(this,M[0],M[1]+f+h+ve/2+Q),Q+=ve,le=Math.max(le,ke),T[ue[0].trace.legendgroup]=le});var ge=le+h;U>0&&ge+f+U>a._maxWidth?(H=Math.max(H,U),U=0,V+=O+b,O=Q):O=Math.max(O,Q),Ut.setTranslate(this,U,V),U+=ge}),a._width=Math.max(H,U)+f,a._height=V+O+p}else{var Y=t.size(),I=z+c+(Y-1)*h=a._maxWidth&&(H=Math.max(H,re),Z=0,K+=G,a._height+=G,G=0),Ut.setTranslate(this,M[0]+f+Z,M[1]+f+K+Q/2+h),re=Z+ge+h,Z+=ue,G=Math.max(G,Q)}),I?(a._width=Z+c,a._height=G+p):(a._width=Math.max(H,re)+c,a._height+=G+p)}}a._width=Math.ceil(Math.max(a._width+M[0],a._titleWidth+2*(f+$t.titlePad))),a._height=Math.ceil(Math.max(a._height+M[1],a._titleHeight+2*(f+$t.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var se=e._context.edits,ce=se.legendText||se.legendPosition;t.each(function(le){var Q=un.select(this).select("."+i+"toggle"),ge=le[0].height,ue=le[0].trace.legendgroup,ke=Fd(le,a,d);s&&ue!==""&&(ke=T[ue]);var ve=ce?d:x||ke;!o&&!u&&(ve+=h/2),Ut.setRect(Q,0,-ge/2,ve,ge)})}function Dee(e,r,t,a){var n=e._fullLayout,i=n[r],l=Od(i),o=Bd(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",c=i.x<.5?"l":"r",h={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return J2.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*Xu[l],r:i._width*tk[l],b:i._effHeight*tk[o],t:i._effHeight*Xu[o]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][c]=h[c]:e._fullLayout._reservedMargin[r][f]=h[f]}function Od(e){return Gt.isRightAnchor(e)?"right":Gt.isCenterAnchor(e)?"center":"left"}function Bd(e){return Gt.isBottomAnchor(e)?"bottom":Gt.isMiddleAnchor(e)?"middle":"top"}function Yd(e){return e._id||"legend"}});var r3=B(e3=>{"use strict";var vs=kr(),hl=zr(),fk=Rn(),Dt=Pe(),Eee=Dt.pushUnique,Q2=Dt.strTranslate,Pee=Dt.strRotate,Ree=Sc(),Gn=va(),zee=PA(),Ui=Br(),ta=xr(),Gd=mi(),Vi=$r(),Nee=wa().zindexSeparator,$u=yr(),yi=Hi(),hs=xc(),Fee=H2(),Iee=K2(),gk=hs.YANGLE,j2=Math.PI*gk/180,Hee=1/Math.sin(j2),Oee=Math.cos(j2),Bee=Math.sin(j2),Tt=hs.HOVERARROWSIZE,Or=hs.HOVERTEXTPAD,ck={box:!0,ohlc:!0,violin:!0,candlestick:!0},Yee={scatter:!0,scattergl:!0,splom:!0};function vk(e,r){return e.distance-r.distance}e3.hover=function(r,t,a,n){r=Dt.getGraphDiv(r);var i=t.target;Dt.throttle(r._fullLayout._uid+hs.HOVERID,hs.HOVERMINTIME,function(){Gee(r,t,a,n,i)})};e3.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=Tk(n),l=Mk(n),o=r.map(function(m){var _=m._x0||m.x0||m.x||0,b=m._x1||m.x1||m.x||0,T=m._y0||m.y0||m.y||0,x=m._y1||m.y1||m.y||0,M=m.eventData;if(M){var A=Math.min(_,b),k=Math.max(_,b),L=Math.min(T,x),D=Math.max(T,x),P=m.trace;if($u.traceIs(P,"gl3d")){var R=n._fullLayout[P.scene]._scene.container,z=R.offsetLeft,H=R.offsetTop;A+=z,k+=z,L+=H,D+=H}M.bbox={x0:A+l,x1:k+l,y0:L+i,y1:D+i},t.inOut_bbox&&t.inOut_bbox.push(M.bbox)}else M=!1;return{color:m.color||ta.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:M}}),s=!1,u=bk(o,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||ta.background,container:vs.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,c=5,h=0,d=0;f.sort(function(m,_){return m.y0-_.y0}).each(function(m,_){var b=m.y0-m.by/2;b-ck[0]._length||X<0||X>L[0]._length)return Gd.unhoverRaw(e,r)}if(r.pointerX=te+k[0]._offset,r.pointerY=X+L[0]._offset,"xval"in r?V=yi.flat(i,r.xval):V=yi.p2c(k,te),"yval"in r?Y=yi.flat(i,r.yval):Y=yi.p2c(L,X),!hl(V[0])||!hl(Y[0]))return Dt.warn("Fx.hover failed",r,e),Gd.unhoverRaw(e,r)}var xe=1/0;function Ie(gr,ct){for(G=0;Gue&&(O.splice(0,ue),xe=O[0].distance),c&&H!==0&&O.length===0){ge.distance=H,ge.index=!1;var _t=K._module.hoverPoints(ge,le,Q,"closest",{hoverLayer:o._hoverlayer});if(_t&&(_t=_t.filter(function(it){return it.spikeDistance<=H})),_t&&_t.length){var Fa,fa=_t.filter(function(it){return it.xa.showspikes&&it.xa.spikesnap!=="hovered data"});if(fa.length){var ai=fa[0];hl(ai.x0)&&hl(ai.y0)&&(Fa=Re(ai),(!ke.vLinePoint||ke.vLinePoint.spikeDistance>Fa.spikeDistance)&&(ke.vLinePoint=Fa))}var ni=_t.filter(function(it){return it.ya.showspikes&&it.ya.spikesnap!=="hovered data"});if(ni.length){var Qt=ni[0];hl(Qt.x0)&&hl(Qt.y0)&&(Fa=Re(Qt),(!ke.hLinePoint||ke.hLinePoint.spikeDistance>Fa.spikeDistance)&&(ke.hLinePoint=Fa))}}}}}Ie();function ze(gr,ct,Xr){for(var bt=null,Lt=1/0,vt,_t=0;_t0&&Math.abs(gr.distance)Le-1;lr--)fr(O[lr]);O=Ge,Ee()}var Ne=e._hoverdata,ne=[],fe=Tk(e),Se=Mk(e);for(I=0;I1||O.length>1)||h==="closest"&&ve&&O.length>1,Sn=ta.combine(o.plot_bgcolor||ta.background,o.paper_bgcolor),Za=bk(O,{gd:e,hovermode:h,rotateLabels:sa,bgColor:Sn,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),ua=Za.hoverLabels;if(yi.isUnifiedHover(h)||(Vee(ua,sa,o,Za.commonLabelBoundingBox),wk(ua,sa,o._invScaleX,o._invScaleY)),n&&n.tagName){var Ja=$u.getComponentMethod("annotations","hasClickToShow")(e,ne);zee(vs.select(n),Ja?"pointer":"")}!n||a||!Zee(e,r,Ne)||(Ne&&e.emit("plotly_unhover",{event:r,points:Ne}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:k,yaxes:L,xvals:V,yvals:Y}))}function xk(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 Uee=/([\s\S]*)<\/extra>/;function bk(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,l=r.bgColor,o=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||hs.HOVERFONT,c=r.fontSize||hs.HOVERFONTSIZE,h=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,p=r.fontVariant||a.font.variant,y=r.fontTextcase||a.font.textcase,m=r.fontLineposition||a.font.lineposition,_=r.fontShadow||a.font.shadow,b=e[0],T=b.xa,x=b.ya,M=n.charAt(0),A=M+"Label",k=b[A];if(k===void 0&&T.type==="multicategory")for(var L=0;La.width-Ne&&(ne=a.width-Ne),cr.attr("d","M"+($e-ne)+",0L"+($e-ne+Tt)+","+lr+Tt+"H"+Ne+"v"+lr+(Or*2+Oe.height)+"H"+-Ne+"V"+lr+Tt+"H"+($e-ne-Tt)+"Z"),$e=ne,G.minX=$e-Ne,G.maxX=$e+Ne,T.side==="top"?(G.minY=fr-(Or*2+Oe.height),G.maxY=fr-Or):(G.minY=fr+Or,G.maxY=fr+(Or*2+Oe.height))}else{var fe,Se,qe;x.side==="right"?(fe="start",Se=1,qe="",$e=T._offset+T._length):(fe="end",Se=-1,qe="-",$e=T._offset),fr=x._offset+(b.y0+b.y1)/2,tr.attr("text-anchor",fe),cr.attr("d","M0,0L"+qe+Tt+","+Tt+"V"+(Or+Oe.height/2)+"h"+qe+(Or*2+Oe.width)+"V-"+(Or+Oe.height/2)+"H"+qe+Tt+"V-"+Tt+"Z"),G.minY=fr-(Or+Oe.height/2),G.maxY=fr+(Or+Oe.height/2),x.side==="right"?(G.minX=$e+Tt,G.maxX=$e+Tt+(Or*2+Oe.width)):(G.minX=$e-Tt-(Or*2+Oe.width),G.maxX=$e-Tt);var ir=Oe.height/2,vr=P-Oe.top-ir,sr="clip"+a._uid+"commonlabel"+x._id,Ar;if($e=0?We=Be:Fe+X=0?We=Fe:Ee+X=0?ie=Re:He+ye=0?ie=He:Je+ye=0,(Ce.idealAlign==="top"||!Wr)&&Nt?(qe-=vr/2,Ce.anchor="end"):Wr?(qe+=vr/2,Ce.anchor="start"):Ce.anchor="middle",Ce.crossPos=qe;else{if(Ce.pos=qe,Wr=Se+ir/2+et<=R,Nt=Se-ir/2-et>=0,(Ce.idealAlign==="left"||!Wr)&&Nt)Se-=ir/2,Ce.anchor="end";else if(Wr)Se+=ir/2,Ce.anchor="start";else{Ce.anchor="middle";var oa=et/2,Na=Se+oa-R,sa=Se-oa;Na>0&&(Se-=Na),sa<0&&(Se+=-sa)}Ce.crossPos=Se}fr.attr("text-anchor",Ce.anchor),Ne&&lr.attr("text-anchor",Ce.anchor),cr.attr("transform",Q2(Se,qe)+(i?Pee(gk):""))}),{hoverLabels:Ae,commonLabelBoundingBox:G}}function hk(e,r,t,a,n,i){var l="",o="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Dt.templateString(e.name,e.trace._meta)),l=mk(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(o+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(o+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(o+=(o?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?o=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(o=e.yLabel):e.yLabel===void 0?o=e.xLabel:o="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(o+=(o?"
":"")+e.text),e.extraText!==void 0&&(o+=(o?"
":"")+e.extraText),i&&o===""&&!e.hovertemplate&&(l===""&&i.remove(),o=l);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(c[s+"other"]=c[s+"Val"],c[s+"otherLabel"]=c[s+"Label"]),o=Dt.hovertemplateString(f,c,a._d3locale,e.eventData[0]||{},e.trace._meta),o=o.replace(Uee,function(h,d){return l=mk(d,e.nameLength),""})}return[o,l]}function Vee(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",l=0,o=1,s=e.size(),u=new Array(s),f=0,c=a.minX,h=a.maxX,d=a.minY,p=a.maxY,y=function(V){return V*t._invScaleX},m=function(V){return V*t._invScaleY};e.each(function(V){var Y=V[n],I=V[i],G=Y._id.charAt(0)==="x",Z=Y.range;f===0&&Z&&Z[0]>Z[1]!==G&&(o=-1);var K=0,re=G?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var se=_k(V,r),ce=V.anchor,le=ce==="end"?-1:1,Q,ge;if(ce==="middle")Q=V.crossPos+(G?m(se.y-V.by/2):y(V.bx/2+V.tx2width/2)),ge=Q+(G?m(V.by):y(V.bx));else if(G)Q=V.crossPos+m(Tt+se.y)-m(V.by/2-Tt),ge=Q+m(V.by);else{var ue=y(le*Tt+se.x),ke=ue+y(le*V.bx);Q=V.crossPos+Math.min(ue,ke),ge=V.crossPos+Math.max(ue,ke)}G?d!==void 0&&p!==void 0&&Math.min(ge,p)-Math.max(Q,d)>1&&(I.side==="left"?(K=I._mainLinePosition,re=t.width):re=I._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ge,h)-Math.max(Q,c)>1&&(I.side==="top"?(K=I._mainLinePosition,re=t.height):re=I._mainLinePosition)}u[f++]=[{datum:V,traceIndex:V.trace.index,dp:0,pos:V.pos,posref:V.posref,size:V.by*(G?Hee:1)/2,pmin:K,pmax:re}]}),u.sort(function(V,Y){return V[0].posref-Y[0].posref||o*(Y[0].traceIndex-V[0].traceIndex)});var _,b,T,x,M,A,k;function L(V){var Y=V[0],I=V[V.length-1];if(b=Y.pmin-Y.pos-Y.dp+Y.size,T=I.pos+I.dp+I.size-Y.pmax,b>.01){for(M=V.length-1;M>=0;M--)V[M].dp+=b;_=!1}if(!(T<.01)){if(b<-.01){for(M=V.length-1;M>=0;M--)V[M].dp-=T;_=!1}if(_){var G=0;for(x=0;xY.pmax&&G++;for(x=V.length-1;x>=0&&!(G<=0);x--)A=V[x],A.pos>Y.pmax-1&&(A.del=!0,G--);for(x=0;x=0;M--)V[M].dp-=T;for(x=V.length-1;x>=0&&!(G<=0);x--)A=V[x],A.pos+A.dp+A.size>Y.pmax&&(A.del=!0,G--)}}}for(;!_&&l<=s;){for(l++,_=!0,x=0;x.01){for(M=P.length-1;M>=0;M--)P[M].dp+=b;for(D.push.apply(D,P),u.splice(x+1,1),k=0,M=D.length-1;M>=0;M--)k+=D[M].dp;for(T=k/D.length,M=D.length-1;M>=0;M--)D[M].dp-=T;_=!1}else x++}u.forEach(L)}for(x=u.length-1;x>=0;x--){var H=u[x];for(M=H.length-1;M>=0;M--){var O=H[M],U=O.datum;U.offset=O.dp,U.del=O.del}}}function _k(e,r){var t=0,a=e.offset;return r&&(a*=-Bee,t=e.offset*Oee),{x:t,y:a}}function Wee(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Tt+Or),a=t+r*(e.txwidth+Or),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Or),{alignShift:r,textShiftX:t,text2ShiftX:a}}function wk(e,r,t,a){var n=function(l){return l*t},i=function(l){return l*a};e.each(function(l){var o=vs.select(this);if(l.del)return o.remove();var s=o.select("text.nums"),u=l.anchor,f=u==="end"?-1:1,c=Wee(l),h=_k(l,r),d=h.x,p=h.y,y=u==="middle";o.select("path").attr("d",y?"M-"+n(l.bx/2+l.tx2width/2)+","+i(p-l.by/2)+"h"+n(l.bx)+"v"+i(l.by)+"h-"+n(l.bx)+"Z":"M0,0L"+n(f*Tt+d)+","+i(Tt+p)+"v"+i(l.by/2-Tt)+"h"+n(f*l.bx)+"v-"+i(l.by)+"H"+n(f*Tt+d)+"V"+i(p-Tt)+"Z");var m=d+c.textShiftX,_=p+l.ty0-l.by/2+Or,b=l.textAlign||"auto";b!=="auto"&&(b==="left"&&u!=="start"?(s.attr("text-anchor","start"),m=y?-l.bx/2-l.tx2width/2+Or:-l.bx-Or):b==="right"&&u!=="end"&&(s.attr("text-anchor","end"),m=y?l.bx/2-l.tx2width/2-Or:l.bx+Or)),s.call(Gn.positionText,n(m),i(_)),l.tx2width&&(o.select("text.name").call(Gn.positionText,n(c.text2ShiftX+c.alignShift*Or+d),i(p+l.ty0-l.by/2+Or)),o.select("rect").call(Ui.setRect,n(c.text2ShiftX+(c.alignShift-1)*l.tx2width/2+d),i(p-l.by/2-1),n(l.tx2width),i(l.by+2)))})}function Xee(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function l(h){return h||hl(h)&&h===0}var o=Array.isArray(t)?function(h,d){var p=Dt.castOption(n,t,h);return l(p)?p:Dt.extractOption({},a,"",d)}:function(h,d){return Dt.extractOption(i,a,h,d)};function s(h,d,p){var y=o(d,p);l(y)&&(e[h]=y)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Dt.constrain(e.x0,0,e.xa._length),e.x1=Dt.constrain(e.x1,0,e.xa._length),e.y0=Dt.constrain(e.y0,0,e.ya._length),e.y1=Dt.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Vi.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Vi.hoverLabelText(e.ya,e.yLabelVal,a.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=Vi.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Vi.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Vi.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Vi.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function dk(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,l=t.event,o=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||o)){var c=ta.combine(n.plot_bgcolor,n.paper_bgcolor);if(o){var h=r.hLinePoint,d,p;u=h&&h.xa,f=h&&h.ya;var y=f.spikesnap;y==="cursor"?(d=l.pointerX,p=l.pointerY):(d=u._offset+h.x,p=f._offset+h.y);var m=fk.readability(h.color,c)<1.5?ta.contrast(c):h.color,_=f.spikemode,b=f.spikethickness,T=f.spikecolor||m,x=Vi.getPxPosition(e,f),M,A;if(_.indexOf("toaxis")!==-1||_.indexOf("across")!==-1){if(_.indexOf("toaxis")!==-1&&(M=x,A=d),_.indexOf("across")!==-1){var k=f._counterDomainMin,L=f._counterDomainMax;f.anchor==="free"&&(k=Math.min(k,f.position),L=Math.max(L,f.position)),M=i.l+k*i.w,A=i.l+L*i.w}a.insert("line",":first-child").attr({x1:M,x2:A,y1:p,y2:p,"stroke-width":b,stroke:T,"stroke-dasharray":Ui.dashStyle(f.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:M,x2:A,y1:p,y2:p,"stroke-width":b+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}_.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:x+(f.side!=="right"?b:-b),cy:p,r:b,fill:T}).classed("spikeline",!0)}if(s){var D=r.vLinePoint,P,R;u=D&&D.xa,f=D&&D.ya;var z=u.spikesnap;z==="cursor"?(P=l.pointerX,R=l.pointerY):(P=u._offset+D.x,R=f._offset+D.y);var H=fk.readability(D.color,c)<1.5?ta.contrast(c):D.color,O=u.spikemode,U=u.spikethickness,V=u.spikecolor||H,Y=Vi.getPxPosition(e,u),I,G;if(O.indexOf("toaxis")!==-1||O.indexOf("across")!==-1){if(O.indexOf("toaxis")!==-1&&(I=Y,G=R),O.indexOf("across")!==-1){var Z=u._counterDomainMin,K=u._counterDomainMax;u.anchor==="free"&&(Z=Math.min(Z,u.position),K=Math.max(K,u.position)),I=i.t+(1-K)*i.h,G=i.t+(1-Z)*i.h}a.insert("line",":first-child").attr({x1:P,x2:P,y1:I,y2:G,"stroke-width":U,stroke:V,"stroke-dasharray":Ui.dashStyle(u.spikedash,U)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:P,x2:P,y1:I,y2:G,"stroke-width":U+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}O.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:P,cy:Y-(u.side!=="top"?U:-U),r:U,fill:V}).classed("spikeline",!0)}}}function Zee(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function pk(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function mk(e,r){return Gn.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Jee(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],l=0;l{"use strict";var $ee=Pe(),Kee=xr(),Qee=Hi().isUnifiedHover;Ak.exports=function(r,t,a,n){n=n||{};var i=t.legend;function l(o){n.font[o]||(n.font[o]=i?t.legend.font[o]:t.font[o])}t&&Qee(t.hovermode)&&(n.font||(n.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),i?(n.bgcolor||(n.bgcolor=Kee.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),$ee.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var qk=B((Vge,kk)=>{"use strict";var jee=Pe(),ere=Ud(),rre=du();kk.exports=function(r,t){function a(n,i){return jee.coerce(r,t,rre,n,i)}ere(r,t,a)}});var Sk=B((Wge,Lk)=>{"use strict";var Ck=Pe(),tre=bc(),are=Ud();Lk.exports=function(r,t,a,n){function i(o,s){return Ck.coerce(r,t,tre,o,s)}var l=Ck.extendFlat({},n.hoverlabel);t.hovertemplate&&(l.namelength=-1),are(r,t,i,l)}});var t3=B((Xge,Dk)=>{"use strict";var nre=Pe(),ire=du();Dk.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:nre.coerce(r,t,ire,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var Rk=B((Zge,Pk)=>{"use strict";var Ek=Pe(),lre=du(),ore=t3(),sre=Ud();Pk.exports=function(r,t){function a(f,c){return Ek.coerce(r,t,lre,f,c)}var n=ore(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var l=t._has("mapbox"),o=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((l||o||s)&&u===1||(l||o)&&s&&u===2)&&(t.dragmode="pan"),sre(r,t,a),Ek.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var Fk=B((Jge,Nk)=>{"use strict";var a3=Pe(),zk=yr();Nk.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return a3.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var fre=yr(),cre=r3().hover;Ik.exports=function(r,t,a){var n=fre.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&cre(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var gi=B((Kge,Yk)=>{"use strict";var vre=kr(),Vd=Pe(),hre=mi(),Kc=Hi(),Ok=du(),Bk=r3();Yk.exports={moduleType:"component",name:"fx",constants:xc(),schema:{layout:Ok},attributes:bc(),layoutAttributes:Ok,supplyLayoutGlobalDefaults:qk(),supplyDefaults:Sk(),supplyLayoutDefaults:Rk(),calc:Fk(),getDistanceFunction:Kc.getDistanceFunction,getClosest:Kc.getClosest,inbox:Kc.inbox,quadrature:Kc.quadrature,appendArrayPointValue:Kc.appendArrayPointValue,castHoverOption:pre,castHoverinfo:mre,hover:Bk.hover,unhover:hre.unhover,loneHover:Bk.loneHover,loneUnhover:dre,click:Hk()};function dre(e){var r=Vd.isD3Selection(e)?e:vre.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function pre(e,r,t){return Vd.castOption(e,r,"hoverlabel."+t)}function mre(e,r,t){function a(n){return Vd.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return Vd.castOption(e,t,"hoverinfo",a)}});var Ku=B(dl=>{"use strict";dl.selectMode=function(e){return e==="lasso"||e==="select"};dl.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};dl.openMode=function(e){return e==="drawline"||e==="drawopenpath"};dl.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};dl.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};dl.selectingOrDrawing=function(e){return dl.freeMode(e)||dl.rectMode(e)}});var Wd=B((jge,Gk)=>{"use strict";Gk.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var Xd=B((e2e,Uk)=>{"use strict";Uk.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 Jd=B((r2e,Vk)=>{"use strict";var Zd=32;Vk.exports={CIRCLE_SIDES:Zd,i000:0,i090:Zd/4,i180:Zd/2,i270:Zd/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var $d=B((t2e,Xk)=>{"use strict";var yre=Pe().strTranslate;function Wk(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function gre(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function xre(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return Wk(e,t[r])}}function bre(e){return yre(e.xaxis._offset,e.yaxis._offset)}Xk.exports={p2r:Wk,r2p:gre,axValue:xre,getTransform:bre}});var Ql=B(pl=>{"use strict";var _re=Vg(),$k=Jd(),Qu=$k.CIRCLE_SIDES,n3=$k.SQRT2,Kk=$d(),Zk=Kk.p2r,Jk=Kk.r2p,wre=[0,3,4,5,6,1,2],Tre=[0,3,4,1,2];pl.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var tq=Ku(),Mre=tq.drawMode,Are=tq.openMode,ju=Jd(),Qk=ju.i000,jk=ju.i090,eq=ju.i180,rq=ju.i270,kre=ju.cos45,qre=ju.sin45,aq=$d(),Qd=aq.p2r,jl=aq.r2p,Cre=Ul(),Lre=Cre.clearOutline,jd=Ql(),Sre=jd.readPaths,Dre=jd.writePaths,Ere=jd.ellipseOver,Pre=jd.fixDatesForPaths;function Rre(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,l=(a.layout||{}).shapes||[];if(!Mre(i)&&n!==void 0){var o=a._fullLayout._activeShapeIndex;if(o{"use strict";var zre=Ku(),Nre=zre.selectMode,Fre=Ul(),Ire=Fre.clearOutline,i3=Ql(),Hre=i3.readPaths,Ore=i3.writePaths,Bre=i3.fixDatesForPaths;lq.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,l=i._fullLayout.newselection,o=t.plotinfo,s=o.xaxis,u=o.yaxis,f=t.isActiveSelection,c=t.dragmode,h=(i.layout||{}).selections||[];if(!Nre(c)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";oq.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 eo=B(ha=>{"use strict";var ds=jc(),sq=Pe(),r1=$r();ha.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ha.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ha.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ha.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ha.extractPathCoords=function(e,r,t){var a=[],n=e.match(ds.segmentRE);return n.forEach(function(i){var l=r[i.charAt(0)].drawn;if(l!==void 0){var o=i.substr(1).match(ds.paramRE);if(!(!o||o.lengthd&&(y="X"),y});return u>d&&(p=p.replace(/[\s,]*X.*/,""),sq.log("Ignoring extra params in segment "+s)),f+p})}function ev(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var s3=B((s2e,vq)=>{"use strict";var Gre=Pe(),ef=$r(),uq=va(),fq=Br(),Ure=Ql().readPaths,o3=eo(),Vre=o3.getPathString,cq=bh(),Wre=Sa().FROM_TL;vq.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var l={};if(a.type!=="path"){var o=ef.getFromId(r,a.xref),s=ef.getFromId(r,a.yref);for(var u in cq){var f=cq[u](a,o,s);f!==void 0&&(l[u]=f)}}i=Gre.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,l)}else i=a.label.text;var c={"data-index":t},h=a.label.font,d={"data-notex":1},p=n.append("g").attr(c).classed("shape-label",!0),y=p.append("text").attr(d).classed("shape-label-text",!0).text(i),m,_,b,T;if(a.path){var x=Vre(r,a),M=Ure(x,r);m=1/0,b=1/0,_=-1/0,T=-1/0;for(var A=0;A=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function Zre(e,r,t,a,n,i,l){var o=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,c=Math.PI/180*i,h=Math.sin(c),d=Math.cos(c),p=n.label.xanchor,y=n.label.yanchor,m,_,b,T;if(f==="line"){o==="start"?(m=e,_=r):o==="end"?(m=t,_=a):(m=(e+t)/2,_=(r+a)/2),p==="auto"&&(o==="start"?s==="auto"?t>e?p="left":te?p="right":te?p="right":te?p="left":t{"use strict";var Jre=Pe(),$re=Jre.strTranslate,hq=mi(),mq=Ku(),Kre=mq.drawMode,yq=mq.selectMode,gq=yr(),dq=xr(),a1=Jd(),Qre=a1.i000,jre=a1.i090,ete=a1.i180,rte=a1.i270,tte=Ul(),xq=tte.clearOutlineControllers,f3=Ql(),t1=f3.pointsOnRectangle,u3=f3.pointsOnEllipse,ate=f3.writePaths,nte=e1().newShapes,ite=e1().createShapeObj,lte=l3(),ote=s3();bq.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function l(){e(r,t,a,n++),(u3(r[0])||a.hasText)&&o({redrawing:!0})}function o(Y){var I={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,I=nte(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,I=lte(t,a),i._fullLayout._reselect=!0),Object.keys(I).length&&gq.call((Y||{}).redrawing?"relayout":"_guiRelayout",i,I)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,c=Kre(f),h=yq(f);(c||h)&&(i._fullLayout._outlining=!0),xq(i),t.attr("d",ate(r));var d,p,y,m,_;if(!n&&(a.isActiveShape||a.isActiveSelection)){_=ste([],r);var b=u.append("g").attr("class","outline-controllers");P(b),V()}if(c&&a.hasText){var T=u.select(".label-temp"),x=ite(t,a,a.dragmode);ote(i,"label-temp",x,T)}function M(Y){y=+Y.srcElement.getAttribute("data-i"),m=+Y.srcElement.getAttribute("data-j"),d[y][m].moveFn=A}function A(Y,I){if(r.length){var G=_[y][m][1],Z=_[y][m][2],K=r[y],re=K.length;if(t1(K)){var se=Y,ce=I;if(a.isActiveSelection){var le=pq(K,m);le[1]===K[m][1]?ce=0:se=0}for(var Q=0;Q1&&!(Y.length===2&&Y[1][0]==="Z")&&(m===0&&(Y[0][0]="M"),r[y]=Y,l(),o())}}function D(Y,I){if(Y===2){y=+I.srcElement.getAttribute("data-i"),m=+I.srcElement.getAttribute("data-j");var G=r[y];!t1(G)&&!u3(G)&&L()}}function P(Y){d=[];for(var I=0;I{"use strict";var fte=kr(),kq=yr(),_q=Pe(),rf=$r(),cte=Ql().readPaths,vte=n1(),l1=s3(),qq=Ul().clearOutlineControllers,c3=xr(),h3=Br(),hte=ot().arrayEditor,wq=mi(),Tq=Kl(),ps=jc(),fn=eo(),v3=fn.getPathString;Sq.exports={draw:d3,drawOne:Cq,eraseActiveShape:mte,drawLabel:l1};function d3(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;nl&&Be>o&&!ze.shiftKey?wq.getCursor(Fe/He,1-Ee/Be):"move";Tq(r,Je),ge=Je.split("-")[0]}}function be(ze){i1(e)||(s&&(_=K(t.xanchor)),u&&(b=re(t.yanchor)),t.type==="path"?R=t.path:(d=s?t.x0:K(t.x0),p=u?t.y0:re(t.y0),y=s?t.x1:K(t.x1),m=u?t.y1:re(t.y1)),dm?(T=p,k="y0",x=m,L="y1"):(T=m,k="y1",x=p,L="y0"),ve(ze),_e(n,t),Ie(r,t,e),Q.moveFn=ge==="move"?X:ye,Q.altKey=ze.altKey)}function W(){i1(e)||(Tq(r),xe(n),Lq(r,e,t),kq.call("_guiRelayout",e,i.getUpdateObj()))}function te(){i1(e)||xe(n)}function X(ze,Re){if(t.type==="path"){var He=function(Ee){return Ee},Be=He,Fe=He;s?h("xanchor",t.xanchor=se(_+ze)):(Be=function(Je){return se(K(Je)+ze)},H&&H.type==="date"&&(Be=fn.encodeDate(Be))),u?h("yanchor",t.yanchor=ce(b+Re)):(Fe=function(Je){return ce(re(Je)+Re)},U&&U.type==="date"&&(Fe=fn.encodeDate(Fe))),h("path",t.path=Mq(R,Be,Fe))}else s?h("xanchor",t.xanchor=se(_+ze)):(h("x0",t.x0=se(d+ze)),h("x1",t.x1=se(y+ze))),u?h("yanchor",t.yanchor=ce(b+Re)):(h("y0",t.y0=ce(p+Re)),h("y1",t.y1=ce(m+Re)));r.attr("d",v3(e,t)),_e(n,t),l1(e,a,t,z)}function ye(ze,Re){if(c){var He=function(Oe){return Oe},Be=He,Fe=He;s?h("xanchor",t.xanchor=se(_+ze)):(Be=function($e){return se(K($e)+ze)},H&&H.type==="date"&&(Be=fn.encodeDate(Be))),u?h("yanchor",t.yanchor=ce(b+Re)):(Fe=function($e){return ce(re($e)+Re)},U&&U.type==="date"&&(Fe=fn.encodeDate(Fe))),h("path",t.path=Mq(R,Be,Fe))}else if(f){if(ge==="resize-over-start-point"){var Ee=d+ze,Je=u?p-Re:p+Re;h("x0",t.x0=s?Ee:se(Ee)),h("y0",t.y0=u?Je:ce(Je))}else if(ge==="resize-over-end-point"){var We=y+ze,ie=u?m-Re:m+Re;h("x1",t.x1=s?We:se(We)),h("y1",t.y1=u?ie:ce(ie))}}else{var Ae=function(Oe){return ge.indexOf(Oe)!==-1},Ce=Ae("n"),cr=Ae("s"),tr=Ae("w"),De=Ae("e"),Le=Ce?T+Re:T,Ye=cr?x+Re:x,Xe=tr?M+ze:M,Ge=De?A+ze:A;u&&(Ce&&(Le=T-Re),cr&&(Ye=x-Re)),(!u&&Ye-Le>o||u&&Le-Ye>o)&&(h(k,t[k]=u?Le:ce(Le)),h(L,t[L]=u?Ye:ce(Ye))),Ge-Xe>l&&(h(D,t[D]=s?Xe:se(Xe)),h(P,t[P]=s?Ge:se(Ge)))}r.attr("d",v3(e,t)),_e(n,t),l1(e,a,t,z)}function _e(ze,Re){(s||u)&&He();function He(){var Be=Re.type!=="path",Fe=ze.selectAll(".visual-cue").data([0]),Ee=1;Fe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ee}).classed("visual-cue",!0);var Je=K(s?Re.xanchor:_q.midRange(Be?[Re.x0,Re.x1]:fn.extractPathCoords(Re.path,ps.paramIsX))),We=re(u?Re.yanchor:_q.midRange(Be?[Re.y0,Re.y1]:fn.extractPathCoords(Re.path,ps.paramIsY)));if(Je=fn.roundPositionForSharpStrokeRendering(Je,Ee),We=fn.roundPositionForSharpStrokeRendering(We,Ee),s&&u){var ie="M"+(Je-1-Ee)+","+(We-1-Ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Fe.attr("d",ie)}else if(s){var Ae="M"+(Je-1-Ee)+","+(We-9-Ee)+"v18 h2 v-18 Z";Fe.attr("d",Ae)}else{var Ce="M"+(Je-9-Ee)+","+(We-1-Ee)+"h18 v2 h-18 Z";Fe.attr("d",Ce)}}}function xe(ze){ze.selectAll(".visual-cue").remove()}function Ie(ze,Re,He){var Be=Re.xref,Fe=Re.yref,Ee=rf.getFromId(He,Be),Je=rf.getFromId(He,Fe),We="";Be!=="paper"&&!Ee.autorange&&(We+=Be),Fe!=="paper"&&!Je.autorange&&(We+=Fe),h3.setClipUrl(ze,We?"clip"+He._fullLayout._uid+We:null,He)}}function Mq(e,r,t){return e.replace(ps.segmentRE,function(a){var n=0,i=a.charAt(0),l=ps.paramIsX[i],o=ps.paramIsY[i],s=ps.numParams[i],u=a.substr(1).replace(ps.paramRE,function(f){return n>=s||(l[n]?f=r(f):o[n]&&(f=t(f)),n++),f});return i+u})}function pte(e,r){if(o1(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){Aq(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=Aq,d3(e)}}}function Aq(e){if(o1(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(qq(e),delete e._fullLayout._activeShapeIndex,d3(e))}}function mte(e){if(o1(e)){qq(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Un=yr(),Dq=St(),Eq=Jt(),Yr=Xd(),yte=s1().eraseActiveShape,u1=Pe(),Ir=u1._,Gr=Hq.exports={};Gr.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Ir(e,"Download plot as a png"):Ir(e,"Download plot")},icon:Yr.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};u1.notifier(Ir(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),Un.call("downloadImage",e,t).then(function(a){u1.notifier(Ir(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){u1.notifier(Ir(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Gr.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Ir(e,"Edit in Chart Studio")},icon:Yr.disk,click:function(e){Dq.sendDataToCloud(e)}};Gr.editInChartStudio={name:"editInChartStudio",title:function(e){return Ir(e,"Edit in Chart Studio")},icon:Yr.pencil,click:function(e){Dq.sendDataToCloud(e)}};Gr.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ir(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Yr.zoombox,click:Ga};Gr.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ir(e,"Pan")},attr:"dragmode",val:"pan",icon:Yr.pan,click:Ga};Gr.select2d={name:"select2d",_cat:"select",title:function(e){return Ir(e,"Box Select")},attr:"dragmode",val:"select",icon:Yr.selectbox,click:Ga};Gr.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ir(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Yr.lasso,click:Ga};Gr.drawclosedpath={name:"drawclosedpath",title:function(e){return Ir(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Yr.drawclosedpath,click:Ga};Gr.drawopenpath={name:"drawopenpath",title:function(e){return Ir(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Yr.drawopenpath,click:Ga};Gr.drawline={name:"drawline",title:function(e){return Ir(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Yr.drawline,click:Ga};Gr.drawrect={name:"drawrect",title:function(e){return Ir(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Yr.drawrect,click:Ga};Gr.drawcircle={name:"drawcircle",title:function(e){return Ir(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Yr.drawcircle,click:Ga};Gr.eraseshape={name:"eraseshape",title:function(e){return Ir(e,"Erase active shape")},icon:Yr.eraseshape,click:yte};Gr.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ir(e,"Zoom in")},attr:"zoom",val:"in",icon:Yr.zoom_plus,click:Ga};Gr.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ir(e,"Zoom out")},attr:"zoom",val:"out",icon:Yr.zoom_minus,click:Ga};Gr.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ir(e,"Autoscale")},attr:"zoom",val:"auto",icon:Yr.autoscale,click:Ga};Gr.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ir(e,"Reset axes")},attr:"zoom",val:"reset",icon:Yr.home,click:Ga};Gr.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ir(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Yr.tooltip_basic,gravity:"ne",click:Ga};Gr.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ir(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Yr.tooltip_compare,gravity:"ne",click:Ga};function Ga(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,l={},o=Eq.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var c=n==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var Oq=y3(),bte=Object.keys(Oq),Bq=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Yq=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Bq),af=[],_te=function(e){if(Yq.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();af.indexOf(r)===-1&&af.push(r),af.indexOf(t)===-1&&af.push(t)}};bte.forEach(function(e){_te(Oq[e])});af.sort();Gq.exports={DRAW_MODES:Bq,backButtons:Yq,foreButtons:af}});var x3=B((d2e,Uq)=>{"use strict";var h2e=g3();Uq.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 Wq=B((p2e,Vq)=>{"use strict";var wte=Pe(),rv=xr(),Tte=ot(),Mte=x3();Vq.exports=function(r,t){var a=r.modebar||{},n=Tte.newContainer(t,"modebar");function i(o,s){return wte.coerce(a,n,Mte,o,s)}i("orientation"),i("bgcolor",rv.addOpacity(t.paper_bgcolor,.5));var l=rv.contrast(rv.rgb(t.modebar.bgcolor));i("color",rv.addOpacity(l,.3)),i("activecolor",rv.addOpacity(l,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var $q=B((m2e,Jq)=>{"use strict";var b3=kr(),Ate=zr(),c1=Pe(),Xq=Xd(),kte=Q0().version,qte=new DOMParser;function Zq(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Wi=Zq.prototype;Wi.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,l="#"+n+" .modebar-group";document.querySelectorAll(l).forEach(function(c){c.style.backgroundColor=i.bgcolor}),c1.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var o=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(o||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Wi.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var l=r.createButton(n);r.buttonElements.push(l),a.appendChild(l)}),r.element.appendChild(a)})};Wi.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};Wi.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(o){e.click(r.graphInfo,o),r.updateActiveButton(o.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&b3.select(t).classed("active",!0);var l=e.icon;return typeof l=="function"?t.appendChild(l()):t.appendChild(this.createIcon(l||Xq.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};Wi.createIcon=function(e){var r=Ate(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=qte.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Wi.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),l=a.getAttribute("data-toggle")==="true",o=b3.select(a),s=function(c,h){var d=r.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(l){if(i===t){var u=!o.classed("active");o.classed("active",u),s(a,u)}}else{var f=i===null?i:c1.nestedProperty(r,i).get();o.classed("active",f===n),s(a,f===n)}})};Wi.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var Ste=Jt(),Kq=_n(),_3=yr(),Dte=Hi().isUnifiedHover,Ete=$q(),v1=y3(),Pte=g3().DRAW_MODES,Rte=Pe().extendDeep;Qq.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,l;Array.isArray(i)&&i.length?l=Ote(i):!a.displayModeBar&&a.watermark?l=[]:l=zte(r),n?n.update(r,l):t._modeBar=Ete(r,l)};function zte(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(I,G){if(typeof G=="string"){if(G.toLowerCase()===I.toLowerCase())return!0}else{var Z=G.name,K=G._cat||G.name;if(Z===I||K===I.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var l=r.modebar.remove;typeof l=="string"&&(l=[l]);var o=a.modeBarButtonsToAdd.concat(i.filter(function(I){for(var G=0;G1?(P=["toggleHover"],R=["resetViews"]):c?(D=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],R=["resetGeo"]):f?(P=["hoverClosest3d"],R=["resetCameraDefault3d","resetCameraLastSave3d"]):y?(D=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],R=["resetViewMapbox"]):m?(D=["zoomInMap","zoomOutMap"],P=["toggleHover"],R=["resetViewMap"]):h?P=["hoverClosestPie"]:T?(P=["hoverClosestCartesian","hoverCompareCartesian"],R=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Ite(t)||M)&&(P=[]),u&&!x&&(D=["zoomIn2d","zoomOut2d","autoScale2d"],R[0]!=="resetViews"&&(R=["resetScale2d"])),f?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!x||p?z=["zoom2d","pan2d"]:y||m||c?z=["pan2d"]:_&&(z=["zoom2d"]),Fte(t)&&z.push("select2d","lasso2d");var H=[],O=function(I){H.indexOf(I)===-1&&P.indexOf(I)!==-1&&H.push(I)};if(Array.isArray(o)){for(var U=[],V=0;V{"use strict";eC.exports={moduleType:"component",name:"modebar",layoutAttributes:x3(),supplyLayoutDefaults:Wq(),manage:jq()}});var T3=B((x2e,rC)=>{"use strict";var Bte=Sa().FROM_BL;rC.exports=function(r,t,a){a===void 0&&(a=Bte[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var ys=B(tv=>{"use strict";var ms=Pe(),M3=Bc(),xi=Jt().id2name,Yte=bn(),tC=T3(),Gte=md(),Ute=wt().ALMOST_EQUAL,Vte=Sa().FROM_BL;tv.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],l=r._axisMatchGroups=[],o,s,u,f,c,h,d,p;for(o=0;oi?t.substr(i):a.substr(n))+l}function Xte(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),l=0;lUte*p&&!b)){for(i=0;iz&&ZP&&(P=Z);var re=(P-D)/(2*R);c/=re,D=s.l2r(D),P=s.l2r(P),s.range=s._input.range=A{"use strict";var d1=kr(),Ua=yr(),An=St(),Vn=Pe(),q3=va(),C3=Wd(),av=xr(),nf=Br(),lC=Hc(),cC=w3(),nv=$r(),ml=Sa(),vC=ys(),Zte=vC.enforce,Jte=vC.clean,oC=Bc().doAutoRange,hC="start",$te="middle",dC="end",Kte=wa().zindexSeparator;aa.layoutStyles=function(e){return Vn.syncOrAsync([An.doAutoMargin,jte],e)};function Qte(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function jte(e){var r=e._fullLayout,t=r._size,a=t.p,n=nv.list(e,"",!0),i,l,o,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(nf.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),aa.drawMainTitle(e),cC.manage(e),!r._has("cartesian"))return An.previousPromises(e);function c(be,W,te){var X=be._lw/2;if(be._id.charAt(0)==="x"){if(W){if(te==="top")return W._offset-a-X}else return t.t+t.h*(1-(be.position||0))+X%1;return W._offset+W._length+a+X}if(W){if(te==="right")return W._offset+W._length+a+X}else return t.l+t.w*(be.position||0)+X%1;return W._offset-a-X}for(i=0;i0){aae(e,i,u,s),o.attr({x:l,y:i,"text-anchor":a,dy:fC(r.yanchor)}).call(q3.positionText,l,i);var f=(r.text.match(q3.BR_TAG_ALL)||[]).length;if(f){var c=ml.LINE_SPACING*f+ml.MID_SHIFT;r.y===0&&(c=-c),o.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",m)})}var h=d1.selectAll(".gtitle-subtitle");if(h.node()){var d=o.node().getBBox(),p=d.y+d.height,y=p+lC.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:l,y,"text-anchor":a,dy:fC(r.yanchor)}).call(q3.positionText,l,y)}}}};function eae(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,l=Vn.isTopAnchor(r)?a:a-n,o=t==="b"?i-l:l;return Vn.isTopAnchor(r)&&t==="t"||Vn.isBottomAnchor(r)&&t==="b"?!1:o.5?"t":"b",l=e._fullLayout.margin[i],o=0;return r.yref==="paper"?o=t+r.pad.t+r.pad.b:r.yref==="container"&&(o=rae(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),o>l?o:0}function aae(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,l=i.y>.5?"t":"b",o={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&eae(e,i,l,r,a)?o[l]=t:i.yref==="container"&&(s[l]=t,e._fullLayout._reservedMargin[n]=s),An.allowAutoMargin(e,n),An.autoMargin(e,n,o)}function nae(e,r){var t=e.title,a=e._size,n=0;switch(r===hC?n=t.pad.l:r===dC&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function iae(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===ml.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function fC(e){return e==="top"?ml.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ml.MID_SHIFT+"em"}function lae(e){var r=e.title,t=$te;return Vn.isRightAnchor(r)?t=dC:Vn.isLeftAnchor(r)&&(t=hC),t}function oae(e){var r=e.title,t="0em";return Vn.isTopAnchor(r)?t=ml.CAP_SHIFT+"em":Vn.isMiddleAnchor(r)&&(t=ml.MID_SHIFT+"em"),t}aa.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var sae=Ql().readPaths,uae=n1(),pC=Ul().clearOutlineControllers,L3=xr(),mC=Br(),fae=ot().arrayEditor,yC=eo(),cae=yC.getPathString;xC.exports={draw:m1,drawOne:gC,activateLastSelection:dae};function m1(e){var r=e._fullLayout;pC(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;m--){var _=l.append("path").attr(s).style("opacity",m?.1:u).call(L3.stroke,c).call(L3.fill,f).call(mC.dashLine,m?"solid":d,m?4+h:h);if(vae(_,e,a),p){var b=fae(e.layout,"selections",a);_.style({cursor:"move"});var T={element:_.node(),plotinfo:n,gd:e,editHelpers:b,isActiveSelection:!0},x=sae(o,e);uae(x,_,T)}else _.style("pointer-events",m?"all":"none");y[m]=_}var M=y[0],A=y[1];A.node().addEventListener("click",function(){return hae(e,M)})}}function vae(e,r,t){var a=t.xref+t.yref;mC.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function hae(e,r){if(y1(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){S3(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=S3,m1(e)}}}function dae(e){if(y1(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=S3,m1(e)}}function S3(e){if(y1(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(pC(e),delete e._fullLayout._activeSelectionIndex,m1(e))}}});var _C=B((T2e,bC)=>{function pae(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,l){return a("temp_status",{seg:n,above:i,below:l})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,l){return a("status",{seg:n,above:i,below:l})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}bC.exports=pae});var TC=B((M2e,wC)=>{function mae(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],l=a[1],o=n[0],s=n[1],u=t[0],f=t[1];return(o-i)*(f-l)-(s-l)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],l=n[0]-a[0],o=t[0]-a[0],s=n[1]-a[1],u=o*l+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=o-i>e&&(l-f)*(i-c)/(o-c)+f-n>e&&(s=!s),l=f,o=c}return s}};return r}wC.exports=mae});var AC=B((A2e,MC)=>{var yae={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};MC.exports=yae});var qC=B((k2e,kC)=>{var iv=AC();function gae(e,r,t){function a(p,y){return{id:t?t.segmentId():-1,start:p,end:y,myFill:{above:null,below:null},otherFill:null}}function n(p,y,m){return{id:t?t.segmentId():-1,start:p,end:y,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var i=iv.create();function l(p,y,m,_,b,T){var x=r.pointsCompare(y,b);return x!==0?x:r.pointsSame(m,T)?0:p!==_?p?1:-1:r.pointAboveOrOnLine(m,_?b:T,_?T:b)?1:-1}function o(p,y){i.insertBefore(p,function(m){var _=l(p.isStart,p.pt,y,m.isStart,m.pt,m.other.pt);return _<0})}function s(p,y){var m=iv.node({isStart:!0,pt:p.start,seg:p,primary:y,other:null,status:null});return o(m,p.end),m}function u(p,y,m){var _=iv.node({isStart:!1,pt:y.end,seg:y,primary:m,other:p,status:null});p.other=_,o(_,p.pt)}function f(p,y){var m=s(p,y);return u(m,p,y),m}function c(p,y){t&&t.segmentChop(p.seg,y),p.other.remove(),p.seg.end=y,p.other.pt=y,o(p.other,p.pt)}function h(p,y){var m=n(y,p.seg.end,p.seg);return c(p,y),f(m,p.primary)}function d(p,y){var m=iv.create();function _(U,V){var Y=U.seg.start,I=U.seg.end,G=V.seg.start,Z=V.seg.end;return r.pointsCollinear(Y,G,Z)?r.pointsCollinear(I,G,Z)||r.pointAboveOrOnLine(I,G,Z)?1:-1:r.pointAboveOrOnLine(Y,G,Z)?1:-1}function b(U){return m.findTransition(function(V){var Y=_(U,V.ev);return Y>0})}function T(U,V){var Y=U.seg,I=V.seg,G=Y.start,Z=Y.end,K=I.start,re=I.end;t&&t.checkIntersection(Y,I);var se=r.linesIntersect(G,Z,K,re);if(se===!1){if(!r.pointsCollinear(G,Z,K)||r.pointsSame(G,re)||r.pointsSame(Z,K))return!1;var ce=r.pointsSame(G,K),le=r.pointsSame(Z,re);if(ce&&le)return V;var Q=!ce&&r.pointBetween(G,K,re),ge=!le&&r.pointBetween(Z,K,re);if(ce)return ge?h(V,Z):h(U,re),V;Q&&(le||(ge?h(V,Z):h(U,re)),h(V,G))}else se.alongA===0&&(se.alongB===-1?h(U,K):se.alongB===0?h(U,se.pt):se.alongB===1&&h(U,re)),se.alongB===0&&(se.alongA===-1?h(V,G):se.alongA===0?h(V,se.pt):se.alongA===1&&h(V,Z));return!1}for(var x=[];!i.isEmpty();){var M=i.getHead();if(t&&t.vert(M.pt[0]),M.isStart){let U=function(){if(k){var V=T(M,k);if(V)return V}return L?T(M,L):!1};var O=U;t&&t.segmentNew(M.seg,M.primary);var A=b(M),k=A.before?A.before.ev:null,L=A.after?A.after.ev:null;t&&t.tempStatus(M.seg,k?k.seg:!1,L?L.seg:!1);var D=U();if(D){if(e){var P;M.seg.myFill.below===null?P=!0:P=M.seg.myFill.above!==M.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=M.seg.myFill;t&&t.segmentUpdate(D.seg),M.other.remove(),M.remove()}if(i.getHead()!==M){t&&t.rewind(M.seg);continue}if(e){var P;M.seg.myFill.below===null?P=!0:P=M.seg.myFill.above!==M.seg.myFill.below,L?M.seg.myFill.below=L.seg.myFill.above:M.seg.myFill.below=p,P?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var R;L?M.primary===L.primary?R=L.seg.otherFill.above:R=L.seg.myFill.above:R=M.primary?y:p,M.seg.otherFill={above:R,below:R}}t&&t.status(M.seg,k?k.seg:!1,L?L.seg:!1),M.other.status=A.insert(iv.node({ev:M}))}else{var z=M.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(z.prev)&&m.exists(z.next)&&T(z.prev.ev,z.next.ev),t&&t.statusRemove(z.ev.seg),z.remove(),!M.primary){var H=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=H}x.push(M.seg)}i.getHead().remove()}return t&&t.done(),x}return e?{addRegion:function(p){for(var y,m=p[p.length-1],_=0;_{function xae(e,r,t){var a=[],n=[];return e.forEach(function(i){var l=i.start,o=i.end;if(r.pointsSame(l,o)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function c(O,U,V){return f.index=O,f.matches_head=U,f.matches_pt1=V,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function lv(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var bae={union:function(e,r){return lv(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return lv(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return lv(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return lv(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return lv(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};SC.exports=bae});var PC=B((L2e,EC)=>{var _ae={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function l(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var o=l(i[0]),s=1;s{var wae=_C(),Tae=TC(),RC=qC(),Mae=LC(),ov=DC(),zC=PC(),Wn=!1,sv=Tae(),cn;cn={buildLog:function(e){return e===!0?Wn=wae():e===!1&&(Wn=!1),Wn===!1?!1:Wn.list},epsilon:function(e){return sv.epsilon(e)},segments:function(e){var r=RC(!0,sv,Wn);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=RC(!1,sv,Wn);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:ov.union(e.combined,Wn),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:ov.intersect(e.combined,Wn),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:ov.difference(e.combined,Wn),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:ov.differenceRev(e.combined,Wn),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:ov.xor(e.combined,Wn),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Mae(e.segments,sv,Wn),inverted:e.inverted}},polygonFromGeoJSON:function(e){return zC.toPolygon(cn,e)},polygonToGeoJSON:function(e){return zC.fromPolygon(cn,sv,e)},union:function(e,r){return uv(e,r,cn.selectUnion)},intersect:function(e,r){return uv(e,r,cn.selectIntersect)},difference:function(e,r){return uv(e,r,cn.selectDifference)},differenceRev:function(e,r){return uv(e,r,cn.selectDifferenceRev)},xor:function(e,r){return uv(e,r,cn.selectXor)}};function uv(e,r,t){var a=cn.segments(e),n=cn.segments(r),i=cn.combine(a,n),l=t(i);return cn.polygon(l)}typeof window=="object"&&(window.PolyBool=cn);NC.exports=cn});var HC=B((D2e,IC)=>{IC.exports=function(r,t,a,n){var i=r[0],l=r[1],o=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;ul!=p>l&&i<(d-c)*(l-h)/(p-h)+c;y&&(o=!o)}return o}});var P3=B((E2e,OC)=>{"use strict";var E3=mh().dot,g1=wt().BADNUM,x1=OC.exports={};x1.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],l=i,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;on||_===g1||_l||y&&u(p))}function c(p,y){var m=p[0],_=p[1];if(m===g1||mn||_===g1||_l)return!1;var b=t.length,T=t[0][0],x=t[0][1],M=0,A,k,L,D,P;for(A=1;AMath.max(k,T)||_>Math.max(L,x)))if(_o||Math.abs(E3(c,u))>n)return!0;return!1};x1.filter=function(r,t){var a=[r[0]],n=0,i=0;function l(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var c=f+1;c1){var o=r.pop();l(o)}return{addPt:l,raw:r,filtered:a}}});var YC=B((P2e,BC)=>{"use strict";BC.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var fL=B((R2e,uL)=>{"use strict";var GC=FC(),Aae=HC(),vv=yr(),kae=Br().dashStyle,fv=xr(),qae=gi(),Cae=Hi().makeEventData,yv=Ku(),Lae=yv.freeMode,Sae=yv.rectMode,hv=yv.drawMode,F3=yv.openMode,I3=yv.selectMode,UC=eo(),VC=jc(),$C=n1(),KC=Ul().clearOutline,QC=Ql(),R3=QC.handleEllipse,Dae=QC.readPaths,Eae=e1().newShapes,Pae=l3(),Rae=D3().activateLastSelection,_1=Pe(),zae=_1.sorterAsc,jC=P3(),cv=Lh(),Xn=Jt().getFromId,Nae=Wd(),Fae=p1().redrawReglTraces,w1=YC(),Xi=w1.MINSELECT,Iae=jC.filter,H3=jC.tester,O3=$d(),WC=O3.p2r,Hae=O3.axValue,Oae=O3.getTransform;function B3(e){return e.subplot!==void 0}function Bae(e,r,t,a,n){var i=!B3(a),l=Lae(n),o=Sae(n),s=F3(n),u=hv(n),f=I3(n),c=n==="drawline",h=n==="drawcircle",d=c||h,p=a.gd,y=p._fullLayout,m=f&&y.newselection.mode==="immediate"&&i,_=y._zoomlayer,b=a.element.getBoundingClientRect(),T=a.plotinfo,x=Oae(T),M=r-b.left,A=t-b.top;y._calcInverseTransform(p);var k=_1.apply3DTransform(y._invTransform)(M,A);M=k[0],A=k[1];var L=y._invScaleX,D=y._invScaleY,P=M,R=A,z="M"+M+","+A,H=a.xaxes[0],O=a.yaxes[0],U=H._length,V=O._length,Y=e.altKey&&!(hv(n)&&s),I,G,Z,K,re,se,ce;rL(e,p,a),l&&(I=Iae([[M,A]],w1.BENDPX));var le=_.selectAll("path.select-outline-"+T.id).data([1]),Q=u?y.newshape:y.newselection;u&&(a.hasText=Q.label.text||Q.label.texttemplate);var ge=u&&!s?Q.fillcolor:"rgba(0,0,0,0)",ue=Q.line.color||(i?fv.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");le.enter().append("path").attr("class","select-outline select-outline-"+T.id).style({opacity:u?Q.opacity/2:1,"stroke-dasharray":kae(Q.line.dash,Q.line.width),"stroke-width":Q.line.width+"px","shape-rendering":"crispEdges"}).call(fv.stroke,ue).call(fv.fill,ge).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",x).attr("d",z+"Z");var ke=_.append("path").attr("class","zoombox-corners").style({fill:fv.background,stroke:fv.defaultLine,"stroke-width":1}).attr("transform",x).attr("d","M0,0Z");if(u&&a.hasText){var ve=_.select(".label-temp");ve.empty()&&(ve=_.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var be=y._uid+w1.SELECTID,W=[],te=T1(p,a.xaxes,a.yaxes,a.subplot);m&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var ye=H._id,_e=O._id;lL(p,ye,_e,te);for(var xe=(p.layout||{}).selections||[],Ie=[],ze=!1,Re=0;Re=0){p._fullLayout._deactivateShape(p);return}if(!u){var xe=y.clickmode;cv.done(be).then(function(){if(cv.clear(be),ye===2){for(le.remove(),re=0;re-1&&eL(_e,p,a.xaxes,a.yaxes,a.subplot,a,le),xe==="event"&&mv(p,void 0);qae.click(p,_e,T.id)}).catch(_1.error)}},a.doneFn=function(){ke.remove(),cv.done(be).then(function(){cv.clear(be),!m&&K&&a.selectionDefs&&(K.subtract=Y,a.selectionDefs.push(K),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,Z)),(m||u)&&dv(a,m),a.doneFnCompleted&&a.doneFnCompleted(W),f&&mv(p,ce)}).catch(_1.error)}}function eL(e,r,t,a,n,i,l){var o=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,c=[],h,d,p,y,m,_,b,T,x,M;if(Wae(o)){rL(e,r,i),h=T1(r,t,a,n);var A=Xae(o,h),k=A.pointNumbers.length>0;if(k?Zae(h,A):Jae(h)&&(b=ZC(A))){for(l&&l.remove(),M=0;M=0}function Vae(e){return e._fullLayout._activeSelectionIndex>=0}function dv(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;Uae(n)&&n._fullLayout._deactivateShape(n),Vae(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,l=i._zoomlayer,o=hv(t),s=I3(t);if(o||s){var u=l.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;o&&(f=Eae(u,e)),f&&vv.call("_guiRelayout",n,{shapes:f});var c;s&&!B3(e)&&(c=Pae(u,e)),c&&(n._fullLayout._noEmitSelectedAtStart=!0,vv.call("_guiRelayout",n,{selections:c}).then(function(){r&&Rae(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function XC(e){return e._id}function T1(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(XC),l=t.map(XC),o,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Zae(e,r){var t=[],a,n,i,l;for(l=0;l0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(l=0;l1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function pv(e,r,t){var a;for(a=0;a-1&&r;if(!l&&r){var ye=JC(e,!0);if(ye.length){var _e=ye[0].xref,xe=ye[0].yref;if(_e&&xe){var Ie=oL(ye),ze=sL([Xn(e,_e,"x"),Xn(e,xe,"y")]);ze(W,Ie)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:X&&mv(e,W),h._reselect=!1}if(!l&&h._deselect){var Re=h._deselect;o=Re.xref,s=Re.yref,Qae(o,s,f)||lL(e,o,s,a),X&&(W.points.length?mv(e,W):U3(e)),h._deselect=!1}return{eventData:W,selectionTesters:t}}function Kae(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";cL.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 gv=B((N2e,vL)=>{"use strict";vL.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var lf=B((I2e,pL)=>{"use strict";var hL=V3(),dL=jt(),M1=wa(),ane=ot().templatedArray,F2e=gv();pL.exports=ane("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:dL({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:hL.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:hL.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",M1.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",M1.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",M1.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",M1.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:dL({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var A1=B((H2e,mL)=>{"use strict";mL.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var W3=B((O2e,yL)=>{"use strict";yL.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var bi=B((B2e,TL)=>{"use strict";var gL=di().axisHoverFormat,nne=_a().texttemplateAttrs,ine=_a().hovertemplateAttrs,xL=Nc(),lne=jt(),one=fi().dash,sne=fi().pattern,une=Br(),fne=A1(),k1=mt().extendFlat,cne=W3();function bL(e){return{valType:"any",dflt:0,editType:"calc"}}function _L(e){return{valType:"any",editType:"calc"}}function wL(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}TL.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:bL("x"),yperiod:bL("y"),xperiod0:_L("x0"),yperiod0:_L("y0"),xperiodalignment:wL("x"),yperiodalignment:wL("y"),xhoverformat:gL("x"),yhoverformat:gL("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:nne({},{}),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:ine({},{keys:fne.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:k1({},one,{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:cne(!0),fillgradient:k1({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:sne,marker:k1({symbol:{valType:"enumerated",values:une.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:k1({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},xL("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"},xL("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:lne({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var X3=B((G2e,kL)=>{"use strict";var ML=lf(),AL=bi().line,vne=fi().dash,q1=mt().extendFlat,hne=ui().overrideAll,dne=ot().templatedArray,Y2e=gv();kL.exports=hne(dne("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:q1({},ML.xref,{}),yref:q1({},ML.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:AL.color,width:q1({},AL.width,{min:1,dflt:1}),dash:q1({},vne,{dflt:"dot"})}}),"arraydraw","from-root")});var SL=B((U2e,LL)=>{"use strict";var qL=Pe(),C1=$r(),pne=On(),mne=X3(),CL=eo();LL.exports=function(r,t){pne(r,t,{name:"selections",handleItemDefaults:yne});for(var a=t.selections,n=0;n{"use strict";DL.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var xv=B((W2e,zL)=>{"use strict";var gne=yr(),PL=Pe(),RL=Jt();zL.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var l=gne.subplotsRegistry.cartesian,o=l.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,c=s.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var NL=D3(),bv=fL();FL.exports={moduleType:"component",name:"selections",layoutAttributes:X3(),supplyLayoutDefaults:SL(),supplyDrawNewSelectionDefaults:EL(),includeBasePlot:xv()("selections"),draw:NL.draw,drawOne:NL.drawOne,reselect:bv.reselect,prepSelect:bv.prepSelect,clearOutline:bv.clearOutline,clearSelectionsCache:bv.clearSelectionsCache,selectOnClick:bv.selectOnClick}});var nS=B((Z2e,aS)=>{"use strict";var Q3=kr(),Zn=Pe(),IL=Zn.numberFormat,xne=Rn(),bne=S2(),L1=yr(),XL=Zn.strTranslate,_ne=va(),HL=xr(),to=Br(),wne=gi(),OL=$r(),Tne=Kl(),Mne=mi(),ZL=Ku(),S1=ZL.selectingOrDrawing,Ane=ZL.freeMode,kne=Sa().FROM_TL,qne=Wd(),Cne=p1().redrawReglTraces,Lne=St(),J3=Jt().getFromId,Sne=of().prepSelect,Dne=of().clearOutline,Ene=of().selectOnClick,Z3=T3(),j3=wa(),BL=j3.MINDRAG,Qa=j3.MINZOOM,YL=!0;function Pne(e,r,t,a,n,i,l,o){var s=e._fullLayout._zoomlayer,u=l+o==="nsew",f=(l+o).length===1,c,h,d,p,y,m,_,b,T,x,M,A,k,L,D,P,R,z,H,O,U,V,Y;t+=r.yaxis._shift;function I(){if(c=r.xaxis,h=r.yaxis,T=c._length,x=h._length,_=c._offset,b=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,l&&o)for(var De=r.overlays,Le=0;Le=0){Ye._fullLayout._deactivateShape(Ye);return}var Xe=Ye._fullLayout.clickmode;if(K3(Ye),De===2&&!f&&We(),u)Xe.indexOf("select")>-1&&Ene(Le,Ye,y,m,r.id,K),Xe.indexOf("event")>-1&&wne.click(Ye,Le,r.id);else if(De===1&&f){var Ge=l?h:c,Oe=l==="s"||o==="w"?0:1,$e=Ge._name+".range["+Oe+"]",fr=Rne(Ge,Oe),lr="left",Ne="middle";if(Ge.fixedrange)return;l?(Ne=l==="n"?"top":"bottom",Ge.side==="right"&&(lr="right")):o==="e"&&(lr="right"),Ye._context.showAxisRangeEntryBoxes&&Q3.select(Z).call(_ne.makeEditable,{gd:Ye,immediate:!0,background:Ye._fullLayout.paper_bgcolor,text:String(fr),fill:Ge.tickfont?Ge.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:Ne}).on("edit",function(ne){var fe=Ge.d2r(ne);fe!==void 0&&L1.call("_guiRelayout",Ye,$e,fe)})}}Mne.init(K);var ce,le,Q,ge,ue,ke,ve,be,W,te;function X(De,Le,Ye){var Xe=Z.getBoundingClientRect();ce=Le-Xe.left,le=Ye-Xe.top,e._fullLayout._calcInverseTransform(e);var Ge=Zn.apply3DTransform(e._fullLayout._invTransform)(ce,le);ce=Ge[0],le=Ge[1],Q={l:ce,r:ce,w:0,t:le,b:le,h:0},ge=e._hmpixcount?e._hmlumcount/e._hmpixcount:xne(e._fullLayout.plot_bgcolor).getLuminance(),ue="M0,0H"+T+"V"+x+"H0V0",ke=!1,ve="xy",te=!1,be=KL(s,ge,_,b,ue),W=QL(s,_,b)}function ye(De,Le){if(e._transitioningWithDuration)return!1;var Ye=Math.max(0,Math.min(T,V*De+ce)),Xe=Math.max(0,Math.min(x,Y*Le+le)),Ge=Math.abs(Ye-ce),Oe=Math.abs(Xe-le);Q.l=Math.min(ce,Ye),Q.r=Math.max(ce,Ye),Q.t=Math.min(le,Xe),Q.b=Math.max(le,Xe);function $e(){ve="",Q.r=Q.l,Q.t=Q.b,W.attr("d","M0,0Z")}if(M.isSubplotConstrained)Ge>Qa||Oe>Qa?(ve="xy",Ge/T>Oe/x?(Oe=Ge*x/T,le>Xe?Q.t=le-Oe:Q.b=le+Oe):(Ge=Oe*T/x,ce>Ye?Q.l=ce-Ge:Q.r=ce+Ge),W.attr("d",D1(Q))):$e();else if(A.isSubplotConstrained)if(Ge>Qa||Oe>Qa){ve="xy";var fr=Math.min(Q.l/T,(x-Q.b)/x),lr=Math.max(Q.r/T,(x-Q.t)/x);Q.l=fr*T,Q.r=lr*T,Q.b=(1-fr)*x,Q.t=(1-lr)*x,W.attr("d",D1(Q))}else $e();else!L||Oe0){var ne;if(A.isSubplotConstrained||!k&&L.length===1){for(ne=0;ne1&&($e.maxallowed!==void 0&&P===($e.range[0]<$e.range[1]?"e":"w")||$e.minallowed!==void 0&&P===($e.range[0]<$e.range[1]?"w":"e"))&&(ir=1,sr=0),qe?(vr=fe,Ar=l||A.isSubplotConstrained?De[1]:tr(fr,vr)):A.yaHash[fr._id]?(vr=fe,Ar=De[1]*fr._length/h._length):A.xaHash[fr._id]?(vr=ne,Ar=k==="ew"?-De[0]*fr._length/c._length:tr(fr,vr,{e:"right",w:"left"}[k])):(vr=Ce(fr,ne,fe),Ar=cr(fr,vr)),vr>1&&(fr.maxallowed!==void 0&&R===(fr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Nne(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function KL(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",XL(t,a)).attr("d",n+"Z")}function QL(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:HL.background,stroke:HL.defaultLine,"stroke-width":1,opacity:0}).attr("transform",XL(r,t)).attr("d","M0,0Z")}function jL(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),eS(e,r,n,i)}function eS(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function K3(e){Q3.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rS(e){YL&&e.data&&e._context.showTips&&(Zn.notifier(Zn._(e,"Double-click to zoom back out"),"long"),YL=!1)}function Fne(e,r){return"M"+(e.l-.5)+","+(r-Qa-.5)+"h-3v"+(2*Qa+1)+"h3ZM"+(e.r+.5)+","+(r-Qa-.5)+"h3v"+(2*Qa+1)+"h-3Z"}function Ine(e,r){return"M"+(r-Qa-.5)+","+(e.t-.5)+"v-3h"+(2*Qa+1)+"v3ZM"+(r-Qa-.5)+","+(e.b+.5)+"v3h"+(2*Qa+1)+"v-3Z"}function D1(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Qa)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function VL(e,r,t,a,n){for(var i=!1,l={},o={},s,u,f,c,h=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var Hne=kr(),E1=gi(),One=mi(),Bne=Kl(),_i=nS().makeDragBox,na=wa().DRAGGERSIZE;P1.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){Hne.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,l){if((t._plots[i].mainplot&&!0)===(t._plots[l].mainplot&&!0)){var o=i.split("y"),s=l.split("y");return o[0]===s[0]?Number(o[1]||1)-Number(s[1]||1):Number(o[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var l=t._plots[i],o=l.xaxis,s=l.yaxis;if(!l.mainplot){var u=_i(r,l,o._offset,s._offset,o._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&E1.hover(r,h,i)},E1.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,One.unhover(r,h))},r._context.showAxisDragHandles&&(_i(r,l,o._offset-na,s._offset-na,na,na,"n","w"),_i(r,l,o._offset+o._length,s._offset-na,na,na,"n","e"),_i(r,l,o._offset-na,s._offset+s._length,na,na,"s","w"),_i(r,l,o._offset+o._length,s._offset+s._length,na,na,"s","e"))}if(r._context.showAxisDragHandles){if(i===o._mainSubplot){var f=o._mainLinePosition;o.side==="top"&&(f-=na),_i(r,l,o._offset+o._length*.1,f,o._length*.8,na,"","ew"),_i(r,l,o._offset,f,o._length*.1,na,"","w"),_i(r,l,o._offset+o._length*.9,f,o._length*.1,na,"","e")}if(i===s._mainSubplot){var c=s._mainLinePosition;s.side!=="right"&&(c-=na),_i(r,l,c,s._offset+s._length*.1,na,s._length*.8,"ns",""),_i(r,l,c,s._offset+s._length*.9,na,s._length*.1,"s",""),_i(r,l,c,s._offset,na,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,E1.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,E1.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},P1.updateFx(r)}};P1.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";Bne(r._draggers,t)}});var oS=B(($2e,lS)=>{"use strict";var iS=yr();lS.exports=function(r){for(var t=iS.layoutArrayContainers,a=iS.layoutArrayRegexes,n=r.split("[")[0],i,l,o=0;o{"use strict";var Yne=Pl(),rx=ph(),_v=Go(),Gne=Ky().sorterAsc,tx=yr();wv.containerArrayMatch=oS();var Une=wv.isAddVal=function(r){return r==="add"||Yne(r)},sS=wv.isRemoveVal=function(r){return r===null||r==="remove"};wv.applyContainerArrayChanges=function(r,t,a,n,i){var l=t.astr,o=tx.getComponentMethod(l,"supplyLayoutDefaults"),s=tx.getComponentMethod(l,"draw"),u=tx.getComponentMethod(l,"drawOne"),f=n.replot||n.recalc||o===rx||s===rx,c=r.layout,h=r._fullLayout;if(a[""]){Object.keys(a).length>1&&_v.warn("Full array edits are incompatible with other edits",l);var d=a[""][""];if(sS(d))t.set(null);else if(Array.isArray(d))t.set(d);else return _v.warn("Unrecognized full array edit value",l,d),!0;return f?!1:(o(c,h),s(r),!0)}var p=Object.keys(a).map(Number).sort(Gne),y=t.get(),m=y||[],_=i(h,l).get(),b=[],T=-1,x=m.length,M,A,k,L,D,P,R,z;for(M=0;Mm.length-(R?0:1)){_v.warn("index out of range",l,k);continue}if(P!==void 0)D.length>1&&_v.warn("Insertion & removal are incompatible with edits to the same index.",l,k),sS(P)?b.push(k):R?(P==="add"&&(P={}),m.splice(k,0,P),_&&_.splice(k,0,{})):_v.warn("Unrecognized full object edit value",l,k,P),T===-1&&(T=k);else for(A=0;A=0;M--)m.splice(b[M],1),_&&_.splice(b[M],1);if(m.length?y||t.set(m):t.set(null),f)return!1;if(o(c,h),u!==rx){var H;if(T===-1)H=p;else{for(x=Math.max(m.length,x),H=[],M=0;M=T));M++)H.push(k);for(M=T;M{"use strict";var hS=zr(),Q2e=By(),dS=yr(),vn=Pe(),Tv=St(),pS=Jt(),mS=xr(),Mv=pS.cleanId,Vne=pS.getFromTrace,ax=dS.traceIs;wi.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&vn.log("Clearing previous rejected promises from queue."),e._promises=[]};wi.cleanLayout=function(e){var r,t;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 a=(Tv.subplotsRegistry.cartesian||{}).attrRegex,n=(Tv.subplotsRegistry.polar||{}).attrRegex,i=(Tv.subplotsRegistry.ternary||{}).attrRegex,l=(Tv.subplotsRegistry.gl3d||{}).attrRegex,o=Object.keys(e);for(r=0;r3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),mS.clean(e),e.template&&e.template.layout&&wi.cleanLayout(e.template.layout),e};function sf(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=Mv(t,a,!0))}wi.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}wi.hasParent=function(e,r){for(var t=vS(r);t;){if(t in e)return!0;t=vS(t)}return!1};var Zne=["x","y","z"];wi.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var F1=kr(),Jne=zr(),$ne=cg(),Qe=Pe(),ut=Qe.nestedProperty,lx=Sc(),ja=Q8(),Jn=yr(),U1=Su(),_r=St(),Va=$r(),Kne=L2(),Qne=bn(),nx=Br(),jne=xr(),eie=ex().initInteractions,rie=Qo(),tie=of().clearOutline,wS=Yo().dfltConfig,z1=uS(),Vt=yS(),tt=p1(),ao=ui(),aie=wa().AX_NAME_PATTERN,ix=0,gS=5;function nie(e,r,t,a){var n;if(e=Qe.getGraphDiv(e),lx.init(e),Qe.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var l=lx.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(l===!1)return Promise.reject();!r&&!t&&!Qe.isPlotDiv(e)&&Qe.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function o(){if(n)return Vr.addFrames(e,n)}MS(e,a),t||(t={}),F1.select(e).classed("js-plotly-plot",!0),nx.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(Vt.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=Vt.cleanLayout(t)),_r.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(kie(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),nx.initGradients(e),nx.initPatterns(e),s&&Va.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&_r.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function AS(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),H1(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&H1(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function uie(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof L.parts[R]!="string";)R--;var z=L.parts[R],H=L.parts[R-1]+"."+z,O=L.parts.slice(0,R).join("."),U=ut(e.layout,O).get(),V=ut(a,O).get(),Y=L.get();if(D!==void 0){_[k]=D,b[k]=z==="reverse"?D:yl(Y);var I=U1.getLayoutValObject(a,L.parts);if(I&&I.impliedEdits&&D!==null)for(var G in I.impliedEdits)T(Qe.relativeAttr(k,G),I.impliedEdits[G]);if(["width","height"].indexOf(k)!==-1)if(D){T("autosize",null);var Z=k==="height"?"width":"height";T(Z,a[Z])}else a[k]=e._initialAutoSize[k];else if(k==="autosize")T("width",D?null:a.width),T("height",D?null:a.height);else if(H.match(RS))A(H),ut(a,O+"._inputRange").set(null);else if(H.match(zS)){A(H),ut(a,O+"._inputRange").set(null);var K=ut(a,O).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else H.match(NS)&&ut(a,O+"._inputDomain").set(null);if(z==="type"){M=U;var re=V.type==="linear"&&D==="log",se=V.type==="log"&&D==="linear";if(re||se){if(!M||!M.range)T(O+".autorange",!0);else if(V.autorange)re&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var ce=M.range[0],le=M.range[1];re?(ce<=0&&le<=0&&T(O+".autorange",!0),ce<=0?ce=le/1e6:le<=0&&(le=ce/1e6),T(O+".range[0]",Math.log(ce)/Math.LN10),T(O+".range[1]",Math.log(le)/Math.LN10)):(T(O+".range[0]",Math.pow(10,ce)),T(O+".range[1]",Math.pow(10,le)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[L.parts[0]]&&L.parts[1]==="radialaxis"&&delete a[L.parts[0]]._subplot.viewInitial["radialaxis.range"],Jn.getComponentMethod("annotations","convertCoords")(e,V,D,T),Jn.getComponentMethod("images","convertCoords")(e,V,D,T)}else T(O+".autorange",!0),T(O+".range",null);ut(a,O+"._inputRange").set(null)}else if(z.match(aie)){var Q=ut(a,k).get(),ge=(D||{}).type;(!ge||ge==="-")&&(ge="linear"),Jn.getComponentMethod("annotations","convertCoords")(e,Q,ge,T),Jn.getComponentMethod("images","convertCoords")(e,Q,ge,T)}var ue=z1.containerArrayMatch(k);if(ue){f=ue.array,c=ue.index;var ke=ue.property,ve=I||{editType:"calc"};c!==""&&ke===""&&(z1.isAddVal(D)?b[k]=null:z1.isRemoveVal(D)?b[k]=(ut(t,f).get()||[])[c]:Qe.warn("unrecognized full object value",r)),ao.update(m,ve),u[f]||(u[f]={});var be=u[f][c];be||(be=u[f][c]={}),be[ke]=D,delete r[k]}else z==="reverse"?(U.range?U.range.reverse():(T(O+".autorange",!0),U.range=[1,0]),V.autorange?m.calc=!0:m.plot=!0):(k==="dragmode"&&(D===!1&&Y!==!1||D!==!1&&Y===!1)||a._has("scatter-like")&&a._has("regl")&&k==="dragmode"&&(D==="lasso"||D==="select")&&!(Y==="lasso"||Y==="select")?m.plot=!0:I?ao.update(m,I):m.calc=!0,L.set(D))}}for(f in u){var W=z1.applyContainerArrayChanges(e,i(t,f),u[f],m,i);W||(m.plot=!0)}for(var te in x){M=Va.getFromId(e,te);var X=M&&M._constraintGroup;if(X){m.calc=!0;for(var ye in X)x[ye]||(Va.getFromId(e,ye)._constraintShrinkable=!0)}}(IS(e)||r.height||r.width)&&(m.plot=!0);var _e=a.shapes;for(c=0;c<_e.length;c++)if(_e[c].showlegend){m.calc=!0;break}return(m.plot||m.calc)&&(m.layoutReplot=!0),{flags:m,rangesAltered:x,undoit:b,redoit:_,eventData:s}}function IS(e){var r=e._fullLayout,t=r.width,a=r.height;return e.layout.autosize&&_r.plotAutoSize(e,e.layout,r),r.width!==t||r.height!==a}function Y1(e,r,t,a){e=Qe.getGraphDiv(e),Vt.clearPromiseQueue(e),Qe.isPlainObject(r)||(r={}),Qe.isPlainObject(t)||(t={}),Object.keys(r).length&&(e.changed=!0),Object.keys(t).length&&(e.changed=!0);var n=Vt.coerceTraceIndices(e,a),i=ES(e,Qe.extendFlat({},r),n),l=i.flags,o=FS(e,Qe.extendFlat({},t)),s=o.flags;(l.calc||s.calc)&&(e.calcdata=void 0),l.clearAxisTypes&&Vt.clearAxisTypes(e,n,t);var u=[];s.layoutReplot?u.push(tt.layoutReplot):l.fullReplot?u.push(Vr._doPlot):(u.push(_r.previousPromises),PS(e,s,o)||_r.supplyDefaults(e),l.style&&u.push(tt.doTraceStyle),(l.colorbars||s.colorbars)&&u.push(tt.doColorBars),s.legend&&u.push(tt.doLegend),s.layoutstyle&&u.push(tt.layoutStyles),s.axrange&&V1(u,o.rangesAltered),s.ticks&&u.push(tt.doTicksRelayout),s.modebar&&u.push(tt.doModeBar),s.camera&&u.push(tt.doCamera),u.push(kv)),u.push(_r.rehover,_r.redrag,_r.reselect),ja.add(e,Y1,[e,i.undoit,o.undoit,i.traces],Y1,[e,i.redoit,o.redoit,i.traces]);var f=Qe.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve(e)),f.then(function(){return e.emit("plotly_update",{data:i.eventData,layout:o.eventData}),e})}function ux(e){return function(t){t._fullLayout._guiEditing=!0;var a=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,a}}var hie=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],die=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function xS(e,r){for(var t=0;t1;)if(a.pop(),t=ut(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function pie(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var c=0;return function(){if(u&&++c===f)return u()}}return new Promise(function(u,f){function c(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var z=a._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var H=0;Ha._timeToNext&&p()};z()}var m=0;function _(z){return Array.isArray(n)?m>=n.length?z.transitionOpts=n[m]:z.transitionOpts=n[0]:z.transitionOpts=n,m++,z}var b,T,x=[],M=r==null,A=Array.isArray(r),k=!M&&!A&&Qe.isPlainObject(r);if(k)x.push({type:"object",data:_(Qe.extendFlat({},r))});else if(M||["string","number"].indexOf(typeof r)!==-1)for(b=0;b0&&PP)&&R.push(T);x=R}}x.length>0?h(x):(e.emit("plotly_animated"),u())})}function wie(e,r,t){if(e=Qe.getGraphDiv(e),r==null)return Promise.resolve();if(!Qe.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 a,n,i,l,o=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=o.length+r.length*2,f=[],c={};for(a=r.length-1;a>=0;a--)if(Qe.isPlainObject(r[a])){var h=r[a].name,d=(s[h]||c[h]||{}).name,p=r[a].name,y=s[d]||c[d];d&&p&&typeof p=="number"&&y&&ixL.index?-1:k.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&Qe.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),l.unshift({type:"insert",index:a,value:n[a]});var o=_r.modifyFrames,s=_r.modifyFrames,u=[e,l],f=[e,i];return ja&&ja.add(e,o,u,s,f),_r.modifyFrames(e,i)}function Mie(e){e=Qe.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return _r.cleanPlot([],{},t,r),_r.purge(e),lx.purge(e),r._container&&r._container.remove(),delete e._context,e}function Aie(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!Qe.equalDomRects(t,r._lastBBox)){var a=r._invTransform=Qe.inverseTransformMatrix(Qe.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function kie(e){var r=F1.select(e),t=e._fullLayout;if(t._calcInverseTransform=Aie,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};F1.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=Qe.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(rie.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Vr.animate=_ie;Vr.addFrames=wie;Vr.deleteFrames=Tie;Vr.addTraces=SS;Vr.deleteTraces=DS;Vr.extendTraces=CS;Vr.moveTraces=ox;Vr.prependTraces=LS;Vr.newPlot=sie;Vr._doPlot=nie;Vr.purge=Mie;Vr.react=gie;Vr.redraw=oie;Vr.relayout=Av;Vr.restyle=O1;Vr.setPlotConfig=iie;Vr.update=Y1;Vr._guiRelayout=ux(Av);Vr._guiRestyle=ux(O1);Vr._guiUpdate=ux(Y1);Vr._storeDirectGUIEdit=vie});var gs=B(Zi=>{"use strict";var qie=yr();Zi.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Zi.getRedrawFunc=function(e){return function(){qie.getComponentMethod("colorbar","draw")(e)}};Zi.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Zi.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var HS=window.URL||window.webkitURL;Zi.createObjectURL=function(e){return HS.createObjectURL(e)};Zi.revokeObjectURL=function(e){return HS.revokeObjectURL(e)};Zi.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=Cie(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Zi.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function Cie(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var vx=kr(),t3e=Pe(),Lie=Br(),Sie=xr(),a3e=Qo(),cx=/"/g,qv="TOBESTRIPPED",Die=new RegExp('("'+qv+")|("+qv+'")',"g");function Eie(e){var r=vx.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function Pie(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}OS.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,l=n._toppaper,o=n.width,s=n.height,u;i.insert("rect",":first-child").call(Lie.setRect,0,0,o,s).call(Sie.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var Rie=Pe(),zie=Nh().EventEmitter,Cv=gs();function Nie(e){var r=e.emitter||new zie,t=new Promise(function(a,n){var i=window.Image,l=e.svg,o=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,c=e.height||150,h=u*f,d=u*c,p=s.getContext("2d",{willReadFrequently:!0}),y=new i,m,_;o==="svg"||Rie.isSafari()?_=Cv.encodeSVG(l):(m=Cv.createBlob(l,"svg"),_=Cv.createObjectURL(m)),s.width=h,s.height=d,y.onload=function(){var b;switch(m=null,Cv.revokeObjectURL(_),o!=="svg"&&p.drawImage(y,0,0,h,d),o){case"jpeg":b=s.toDataURL("image/jpeg");break;case"png":b=s.toDataURL("image/png");break;case"webp":b=s.toDataURL("image/webp");break;case"svg":b=_;break;default:var T="Image format is not jpeg, png, svg or webp.";if(n(new Error(T)),!e.promise)return r.emit("error",T)}a(b),e.promise||r.emit("success",b)},y.onerror=function(b){if(m=null,Cv.revokeObjectURL(_),n(b),!e.promise)return r.emit("error",b)},y.src=_});return e.promise?t:r}BS.exports=Nie});var dx=B((l3e,US)=>{"use strict";var YS=zr(),GS=fx(),Fie=St(),Ji=Pe(),Lv=gs(),Iie=W1(),Hie=X1(),Oie=Q0().version,hx={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 Bie(e,r){r=r||{};var t,a,n,i;Ji.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=Ji.getGraphDiv(e),t=Ji.extendDeep([],e.data),a=Ji.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function l(A){return!(A in r)||Ji.validate(r[A],hx[A])}if(!l("width")&&r.width!==null||!l("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!l("format"))throw new Error("Export format is not "+Ji.join2(hx.format.values,", "," or ")+".");var o={};function s(A,k){return Ji.coerce(r,o,hx,A,k)}var u=s("format"),f=s("width"),c=s("height"),h=s("scale"),d=s("setBackground"),p=s("imageDataOnly"),y=document.createElement("div");y.style.position="absolute",y.style.left="-5000px",document.body.appendChild(y);var m=Ji.extendFlat({},a);f?m.width=f:r.width===null&&YS(i.width)&&(m.width=i.width),c?m.height=c:r.height===null&&YS(i.height)&&(m.height=i.height);var _=Ji.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),b=Lv.getRedrawFunc(y);function T(){return new Promise(function(A){setTimeout(A,Lv.getDelay(y._fullLayout))})}function x(){return new Promise(function(A,k){var L=Iie(y,u,h),D=y._fullLayout.width,P=y._fullLayout.height;function R(){GS.purge(y),document.body.removeChild(y)}if(u==="full-json"){var z=Fie.graphJson(y,!1,"keepdata","object",!0,!0);return z.version=Oie,z=JSON.stringify(z),R(),A(p?z:Lv.encodeJSON(z))}if(R(),u==="svg")return A(p?L:Lv.encodeSVG(L));var H=document.createElement("canvas");H.id=Ji.randstr(),Hie({format:u,width:D,height:P,scale:h,canvas:H,svg:L,promise:!0}).then(A).catch(k)})}function M(A){return p?A.replace(Lv.IMAGE_URL_PREFIX,""):A}return new Promise(function(A,k){GS.newPlot(y,t,m,_).then(b).then(T).then(x).then(function(L){A(M(L))}).catch(function(L){k(L)})})}US.exports=Bie});var ZS=B((o3e,XS)=>{"use strict";var $n=Pe(),Yie=St(),Gie=Su(),Uie=Yo().dfltConfig,Ti=$n.isPlainObject,bs=Array.isArray,VS=$n.isArrayOrTypedArray;XS.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=Gie.get(),n=[],i={_context:$n.extendFlat({},Uie)},l,o;bs(r)?(i.data=$n.extendDeep([],r),l=r):(i.data=[],l=[],n.push(ia("array","data"))),Ti(t)?(i.layout=$n.extendDeep({},t),o=t):(i.layout={},o={},arguments.length>1&&n.push(ia("object","layout"))),Yie.supplyDefaults(i);for(var s=i._fullData,u=l.length,f=0;fc.length&&a.push(ia("unused",n,u.concat(c.length)));var _=c.length,b=Array.isArray(m);b&&(_=Math.min(_,m.length));var T,x,M,A,k;if(h.dimensions===2)for(x=0;x<_;x++)if(bs(f[x])){f[x].length>c[x].length&&a.push(ia("unused",n,u.concat(x,c[x].length)));var L=c[x].length;for(T=0;T<(b?Math.min(L,m[x].length):L);T++)M=b?m[x][T]:m,A=f[x][T],k=c[x][T],$n.validate(A,M)?k!==A&&k!==+A&&a.push(ia("dynamic",n,u.concat(x,T),A,k)):a.push(ia("value",n,u.concat(x,T),A))}else a.push(ia("array",n,u.concat(x),f[x]));else for(x=0;x<_;x++)M=b?m[x]:m,A=f[x],k=c[x],$n.validate(A,M)?k!==A&&k!==+A&&a.push(ia("dynamic",n,u.concat(x),A,k)):a.push(ia("value",n,u.concat(x),A))}else if(h.items&&!p&&bs(f)){var D=m[Object.keys(m)[0]],P=[],R,z;for(R=0;R{"use strict";var Kie=Pe(),J1=gs();function Qie(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(l,o){var s,u;if(n)return s=J1.createBlob(e,t),u=J1.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),J1.revokeObjectURL(u),s=null,l(r);if(Kie.isSafari()){var f=t==="svg"?",":";base64,";return J1.octetStream(f+encodeURIComponent(e)),l(r)}o(new Error("download error"))});return i}JS.exports=Qie});var px=B((f3e,QS)=>{"use strict";var KS=Pe(),jie=dx(),ele=$S(),u3e=gs();function rle(e,r){var t;return KS.isPlainObject(e)||(t=KS.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=jie(e,r),l=r.filename||e.fn||"newplot";l+="."+r.format.replace("-","."),i.then(function(o){return t&&(t._snapshotInProgress=!1),ele(o,l,r.format)}).then(function(o){a(o)}).catch(function(o){t&&(t._snapshotInProgress=!1),n(o)})})}QS.exports=rle});var aD=B(mx=>{"use strict";var hn=Pe(),dn=hn.isPlainObject,jS=Su(),eD=St(),tle=tn(),rD=ot(),tD=Yo().dfltConfig;mx.makeTemplate=function(e){e=hn.isPlainObject(e)?e:hn.getGraphDiv(e),e=hn.extendDeep({_context:tD},{data:e.data,layout:e.layout}),eD.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var p={};Sv(d,p,nle.bind(null,d));var y=hn.coerce(d,{},tle,"type"),m=a.data[y];m||(m=a.data[y]=[]),m.push(p)}),Sv(t,a.layout,ale.bind(null,t)),delete a.layout.template;var n=t.template;if(dn(n)){var i=n.layout,l,o,s,u,f,c;dn(i)&&$1(i,a.layout);var h=n.data;if(dn(h)){for(o in a.data)if(s=h[o],Array.isArray(s)){for(f=a.data[o],c=f.length,u=s.length,l=0;l_?l.push({code:"unused",traceType:d,templateCount:m,dataCount:_}):_>m&&l.push({code:"reused",traceType:d,templateCount:m,dataCount:_})}}function b(T,x){for(var M in T)if(M.charAt(0)!=="_"){var A=T[M],k=Kn(T,M,x);dn(A)?(Array.isArray(T)&&A._template===!1&&A.templateitemname&&l.push({code:"missing",path:k,templateitemname:A.templateitemname}),b(A,k)):Array.isArray(A)&&ile(A)&&b(A,k)}}if(b({data:s,layout:o},""),l.length)return l.map(lle)};function ile(e){for(var r=0;r{"use strict";var Kt=fx();xt._doPlot=Kt._doPlot;xt.newPlot=Kt.newPlot;xt.restyle=Kt.restyle;xt.relayout=Kt.relayout;xt.redraw=Kt.redraw;xt.update=Kt.update;xt._guiRestyle=Kt._guiRestyle;xt._guiRelayout=Kt._guiRelayout;xt._guiUpdate=Kt._guiUpdate;xt._storeDirectGUIEdit=Kt._storeDirectGUIEdit;xt.react=Kt.react;xt.extendTraces=Kt.extendTraces;xt.prependTraces=Kt.prependTraces;xt.addTraces=Kt.addTraces;xt.deleteTraces=Kt.deleteTraces;xt.moveTraces=Kt.moveTraces;xt.purge=Kt.purge;xt.addFrames=Kt.addFrames;xt.deleteFrames=Kt.deleteFrames;xt.animate=Kt.animate;xt.setPlotConfig=Kt.setPlotConfig;var ole=wc().getGraphDiv,sle=s1().eraseActiveShape;xt.deleteActiveShape=function(e){return sle(ole(e))};xt.toImage=dx();xt.validate=ZS();xt.downloadImage=px();var nD=aD();xt.makeTemplate=nD.makeTemplate;xt.validateTemplate=nD.validateTemplate});var Dv=B((h3e,lD)=>{"use strict";var yx=Pe(),ule=yr();lD.exports=function(r,t,a,n){var i=n("x"),l=n("y"),o,s=ule.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=yx.minRowLength(i);l?o=Math.min(u,yx.minRowLength(l)):(o=u,n("y0"),n("dy"))}else{if(!l)return 0;o=yx.minRowLength(l),n("x0"),n("dx")}return t._length=o,o}});var _s=B((d3e,uD)=>{"use strict";var oD=Pe().dateTick0,fle=wt(),cle=fle.ONEWEEK;function sD(e,r){return e%cle===0?oD(r,1):oD(r,0)}uD.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var l=n("xperiod");l&&(n("xperiod0",sD(l,t.xcalendar)),n("xperiodalignment"))}if(i.y){var o=n("yperiod");o&&(n("yperiod0",sD(o,t.ycalendar)),n("yperiodalignment"))}}});var vD=B((p3e,cD)=>{"use strict";var fD=["orientation","groupnorm","stackgaps"];cD.exports=function(r,t,a,n){var i=a._scatterStackOpts,l=n("stackgroup");if(l){var o=t.xaxis+t.yaxis,s=i[o];s||(s=i[o]={});var u=s[l],f=!1;u?u.traces.push(t):(u=s[l]={traceIndices:[],traces:[t]},f=!0);for(var c={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var hD=xr(),dD=Hn().hasColorscale,pD=Ru(),vle=_n();mD.exports=function(r,t,a,n,i,l){var o=vle.isBubble(r),s=(r.line||{}).color,u;if(l=l||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",o?.7:1),i("marker.size"),l.noAngle||(i("marker.angle"),l.noAngleRef||i("marker.angleref"),l.noStandOff||i("marker.standoff")),i("marker.color",a),dD(r,"marker")&&pD(r,t,n,i,{prefix:"marker.",cLetter:"c"}),l.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),l.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:o?u=hD.background:u=hD.defaultLine,i("marker.line.color",u),dD(r,"marker.line")&&pD(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",o?1:0)),o&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),l.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var xD=B((y3e,gD)=>{"use strict";var hle=Pe().isArrayOrTypedArray,dle=Hn().hasColorscale,ple=Ru();gD.exports=function(r,t,a,n,i,l){l||(l={});var o=(r.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),i("line.color",a),dle(r,"line"))ple(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(hle(o)?!1:o)||a;i("line.color",s)}i("line.width"),l.noDash||i("line.dash"),l.backoff&&i("line.backoff")}});var _D=B((g3e,bD)=>{"use strict";bD.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var TD=B((x3e,wD)=>{"use strict";var mle=Pe();wD.exports=function(e,r,t,a,n){n=n||{},a("textposition"),mle.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var kD=B((b3e,AD)=>{"use strict";var Q1=xr(),MD=Pe().isArrayOrTypedArray;function yle(e){for(var r=Q1.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var qD=Pe(),gle=yr(),xle=bi(),ble=A1(),uf=_n(),_le=Dv(),wle=_s(),Tle=vD(),Mle=yD(),Ale=xD(),CD=_D(),kle=TD(),qle=kD(),Cle=Pe().coercePattern;LD.exports=function(r,t,a,n){function i(d,p){return qD.coerce(r,t,xle,d,p)}var l=_le(r,t,n,i);if(l||(t.visible=!1),!!t.visible){wle(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var o=Tle(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!o&&l{"use strict";var Lle=ys().getAxisGroup;DD.exports=function(r,t,a,n,i){var l=t.orientation,o=t[{v:"x",h:"y"}[l]+"axis"],s=Lle(a,o)+l,u=a._alignmentOpts||{},f=n("alignmentgroup"),c=u[s];c||(c=u[s]={});var h=c[f];h?h.traces.push(t):h=c[f]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=h.offsetGroups,y=p[d];t._offsetIndex=0,(i!=="group"||d)&&(y||(y=p[d]={offsetIndex:Object.keys(p).length}),t._offsetIndex=y.offsetIndex)}});var PD=B((T3e,ED)=>{"use strict";var Sle=Pe(),Dle=ff(),Ele=bi();ED.exports=function(r,t){var a,n,i,l=t.scattermode;function o(h){return Sle.coerce(n._input,n,Ele,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var c=r[f];if(c.type==="scatter"&&c.xaxis===s.xaxis&&c.yaxis===s.yaxis){c.opacity=void 0;break}}}}}});var zD=B((M3e,RD)=>{"use strict";var Ple=Pe(),Rle=Bh();RD.exports=function(e,r){function t(n,i){return Ple.coerce(e,r,Rle,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var ws=B((A3e,FD)=>{"use strict";var zle=zr(),ND=Pe(),Nle=ND.dateTime2ms,j1=ND.incrementMonth,Fle=wt(),Ile=Fle.ONEAVGMONTH;FD.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var l=r[a+"period"],o;if(zle(l)){if(l=+l,l<=0)return{vals:n}}else if(typeof l=="string"&&l.charAt(0)==="M"){var s=+l.substring(1);if(s>0&&Math.round(s)===s)o=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",c=i==="end",h=r[a+"period0"],d=Nle(h,u)||0,p=[],y=[],m=[],_=n.length,b=0;b<_;b++){var T=n[b],x,M,A;if(o){for(x=Math.round((T-d)/(o*Ile)),A=j1(d,o*x,u);A>T;)A=j1(A,-o,u);for(;A<=T;)A=j1(A,o,u);M=j1(A,-o,u)}else{for(x=Math.round((T-d)/l),A=d+x*l;A>T;)A-=l;for(;A<=T;)A+=l;M=A-l}p[b]=f?M:c?A:(M+A)/2,y[b]=M,m[b]=A}return{vals:p,starts:y,ends:m}}});var OD=B((k3e,HD)=>{"use strict";var gx=Hn().hasColorscale,xx=td(),ID=_n();HD.exports=function(r,t){ID.hasLines(t)&&gx(t,"line")&&xx(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),ID.hasMarkers(t)&&(gx(t,"marker")&&xx(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),gx(t,"marker.line")&&xx(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var bx=B((q3e,BD)=>{"use strict";var Et=Pe();BD.exports=function(r,t){for(var a=0;a{"use strict";var YD=Pe();GD.exports=function(r,t){YD.isArrayOrTypedArray(t.selectedpoints)&&YD.tagSelected(r,t)}});var Ax=B((L3e,$D)=>{"use strict";var UD=zr(),wx=Pe(),Pv=$r(),VD=ws(),_x=wt().BADNUM,Tx=_n(),Hle=OD(),Ole=bx(),Ble=Ev();function Yle(e,r){var t=e._fullLayout,a=r._xA=Pv.getFromId(e,r.xaxis||"x","x"),n=r._yA=Pv.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),l=n.makeCalcdata(r,"y"),o=VD(r,a,"x",i),s=VD(r,n,"y",l),u=o.vals,f=s.vals,c=r._length,h=new Array(c),d=r.ids,p=Mx(r,t,a,n),y=!1,m,_,b,T,x,M;ZD(t,r);var A="x",k="y",L;if(p)wx.pushUnique(p.traceIndices,r.index),m=p.orientation==="v",m?(k="s",L="x"):(A="s",L="y"),x=p.stackgaps==="interpolate";else{var D=XD(r,c);WD(e,r,a,n,u,f,D)}var P=!!r.xperiodalignment,R=!!r.yperiodalignment;for(_=0;__&&h[T].gap;)T--;for(M=h[T].s,b=h.length-1;b>T;b--)h[b].s=M;for(;_{"use strict";KD.exports=ep;var Gle=Pe().distinctVals;function ep(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var Qn=zr(),no=Pe().isArrayOrTypedArray,cf=wt().BADNUM,Ule=yr(),Rv=$r(),Vle=ys().getAxisGroup,rp=QD();function Wle(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;us+l||!Qn(o))}for(var f=0;f{"use strict";var aE=Ax(),nE=hf().setGroupPositions;function noe(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;uD[f]&&f{"use strict";var loe=Br(),fE=wt(),zv=fE.BADNUM,cE=fE.LOG_CLIP,oE=cE+.5,sE=cE-.5,tp=Pe(),ooe=tp.segmentsIntersect,uE=tp.constrain,Dx=A1();vE.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,l=n.type==="log",o=i.type==="log",s=n._length,u=i._length,f=t.backoff,c=a.marker,h=t.connectGaps,d=t.baseTolerance,p=t.shape,y=p==="linear",m=a.fill&&a.fill!=="none",_=[],b=Dx.minTolerance,T=r.length,x=new Array(T),M=0,A,k,L,D,P,R,z,H,O,U,V,Y,I,G,Z,K;function re(Ne){var ne=r[Ne];if(!ne)return!1;var fe=t.linearized?n.l2p(ne.x):n.c2p(ne.x),Se=t.linearized?i.l2p(ne.y):i.c2p(ne.y);if(fe===zv){if(l&&(fe=n.c2p(ne.x,!0)),fe===zv)return!1;o&&Se===zv&&(fe*=Math.abs(n._m*u*(n._m>0?oE:sE)/(i._m*s*(i._m>0?oE:sE)))),fe*=1e3}if(Se===zv){if(o&&(Se=i.c2p(ne.y,!0)),Se===zv)return!1;Se*=1e3}return[fe,Se]}function se(Ne,ne,fe,Se){var qe=fe-Ne,ir=Se-ne,vr=.5-Ne,sr=.5-ne,Ar=qe*qe+ir*ir,Ur=qe*vr+ir*sr;if(Ur>0&&Ur1||Math.abs(vr.y-fe[0][1])>1)&&(vr=[vr.x,vr.y],Se&&ge(vr,Ne)ve||Ne[1]W)return[uE(Ne[0],ke,ve),uE(Ne[1],be,W)]}function Be(Ne,ne){if(Ne[0]===ne[0]&&(Ne[0]===ke||Ne[0]===ve)||Ne[1]===ne[1]&&(Ne[1]===be||Ne[1]===W))return!0}function Fe(Ne,ne){var fe=[],Se=He(Ne),qe=He(ne);return Se&&qe&&Be(Se,qe)||(Se&&fe.push(Se),qe&&fe.push(qe)),fe}function Ee(Ne,ne,fe){return function(Se,qe){var ir=He(Se),vr=He(qe),sr=[];if(ir&&vr&&Be(ir,vr))return sr;ir&&sr.push(ir),vr&&sr.push(vr);var Ar=2*tp.constrain((Se[Ne]+qe[Ne])/2,ne,fe)-((ir||Se)[Ne]+(vr||qe)[Ne]);if(Ar){var Ur;ir&&vr?Ur=Ar>0==ir[Ne]>vr[Ne]?ir:vr:Ur=ir||vr,Ur[Ne]+=Ar}return sr}}var Je;p==="linear"||p==="spline"?Je=Re:p==="hv"||p==="vh"?Je=Fe:p==="hvh"?Je=Ee(0,ke,ve):p==="vhv"&&(Je=Ee(1,be,W));function We(Ne,ne){var fe=ne[0]-Ne[0],Se=(ne[1]-Ne[1])/fe,qe=(Ne[1]*ne[0]-ne[1]*Ne[0])/fe;return qe>0?[Se>0?ke:ve,W]:[Se>0?ve:ke,be]}function ie(Ne){var ne=Ne[0],fe=Ne[1],Se=ne===x[M-1][0],qe=fe===x[M-1][1];if(!(Se&&qe))if(M>1){var ir=ne===x[M-2][0],vr=fe===x[M-2][1];Se&&(ne===ke||ne===ve)&&ir?vr?M--:x[M-1]=Ne:qe&&(fe===be||fe===W)&&vr?ir?M--:x[M-1]=Ne:x[M++]=Ne}else x[M++]=Ne}function Ae(Ne){x[M-1][0]!==Ne[0]&&x[M-1][1]!==Ne[1]&&ie([_e,xe]),ie(Ne),Ie=null,_e=xe=0}var Ce=tp.isArrayOrTypedArray(c);function cr(Ne){if(Ne&&f&&(Ne.i=A,Ne.d=r,Ne.trace=a,Ne.marker=Ce?c[Ne.i]:c,Ne.backoff=f),ce=Ne[0]/s,le=Ne[1]/u,X=Ne[0]ve?ve:0,ye=Ne[1]W?W:0,X||ye){if(!M)x[M++]=[X||Ne[0],ye||Ne[1]];else if(Ie){var ne=Je(Ie,Ne);ne.length>1&&(Ae(ne[0]),x[M++]=ne[1])}else ze=Je(x[M-1],Ne)[0],x[M++]=ze;var fe=x[M-1];X&&ye&&(fe[0]!==X||fe[1]!==ye)?(Ie&&(_e!==X&&xe!==ye?ie(_e&&xe?We(Ie,Ne):[_e||X,xe||ye]):_e&&xe&&ie([_e,xe])),ie([X,ye])):_e-X&&xe-ye&&ie([X||_e,ye||xe]),Ie=Ne,_e=X,xe=ye}else Ie&&Ae(Je(Ie,Ne)[0]),x[M++]=Ne}for(A=0;AQ(R,tr))break;L=R,I=O[0]*H[0]+O[1]*H[1],I>V?(V=I,D=R,z=!1):I=r.length||!R)break;cr(R),k=R}}Ie&&ie([_e||Ie[0],xe||Ie[1]]),_.push(x.slice(0,M))}var De=p.slice(p.length-1);if(f&&De!=="h"&&De!=="v"){for(var Le=!1,Ye=-1,Xe=[],Ge=0;Ge<_.length;Ge++)for(var Oe=0;Oe<_[Ge].length-1;Oe++){var $e=_[Ge][Oe],fr=_[Ge][Oe+1],lr=loe.applyBackoff(fr,$e);(lr[0]!==fr[0]||lr[1]!==fr[1])&&(Le=!0),Xe[Ye+1]||(Ye++,Xe[Ye]=[$e,[lr[0],lr[1]]])}return Le?Xe:_}return _}});var mE=B((R3e,pE)=>{"use strict";var dE={tonextx:1,tonexty:1,tonext:1};pE.exports=function(r,t,a){var n,i,l,o,s,u={},f=!1,c=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var Mi=kr(),soe=yr(),Nv=Pe(),df=Nv.ensureSingle,gE=Nv.identity,Pt=Br(),pf=_n(),uoe=hE(),foe=mE(),ap=P3().tester;xE.exports=function(r,t,a,n,i,l){var o,s,u=!i,f=!!i&&i.duration>0,c=foe(r,t,a);if(o=n.selectAll("g.trace").data(c,function(d){return d[0].trace.uid}),o.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),o.order(),coe(r,o,t),f){l&&(s=l());var h=Mi.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){n.selectAll("g.trace").each(function(d,p){yE(r,p,t,d,c,this,i)})})}else o.each(function(d,p){yE(r,p,t,d,c,this,i)});u&&o.exit().remove(),n.selectAll("path:not([d])").remove()};function coe(e,r,t){r.each(function(a){var n=df(Mi.select(this),"g","fills");Pt.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,l=[];i._ownfill&&l.push("_ownFill"),i._nexttrace&&l.push("_nextFill");var o=n.selectAll("g").data(l,gE);o.enter().append("g"),o.exit().each(function(s){i[s]=null}).remove(),o.order().each(function(s){i[s]=df(Mi.select(this),"path","js-fill")})})}function yE(e,r,t,a,n,i,l){var o=e._context.staticPlot,s;voe(e,r,t,a,n);var u=!!l&&l.duration>0;function f(Ee){return u?Ee.transition():Ee}var c=t.xaxis,h=t.yaxis,d=a[0].trace,p=d.line,y=Mi.select(i),m=df(y,"g","errorbars"),_=df(y,"g","lines"),b=df(y,"g","points"),T=df(y,"g","text");if(soe.getComponentMethod("errorbars","plot")(e,m,t,l),d.visible!==!0)return;f(y).style("opacity",d.opacity);var x,M,A=d.fill.charAt(d.fill.length-1);A!=="x"&&A!=="y"&&(A="");var k,L;A==="y"?(k=1,L=h.c2p(0,!0)):A==="x"&&(k=0,L=c.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=y;var D="",P=[],R=d._prevtrace,z=null,H=null;R&&(D=R._prevRevpath||"",M=R._nextFill,P=R._ownPolygons,z=R._fillsegments,H=R._fillElement);var O,U,V="",Y="",I,G,Z,K,re,se,ce=[];d._polygons=[];var le=[],Q=[],ge=Nv.noop;if(x=d._ownFill,pf.hasLines(d)||d.fill!=="none"){M&&M.datum(a),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(I=Pt.steps(p.shape),G=Pt.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?I=G=function(Ee){var Je=Ee[Ee.length-1];return Ee.length>1&&Ee[0][0]===Je[0]&&Ee[0][1]===Je[1]?Pt.smoothclosed(Ee.slice(1),p.smoothing):Pt.smoothopen(Ee,p.smoothing)}:I=G=function(Ee){return"M"+Ee.join("L")},Z=function(Ee){return G(Ee.reverse())},Q=uoe(a,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),le=new Array(Q.length);var ue=0;for(s=0;s=o[0]&&y.x<=o[1]&&y.y>=s[0]&&y.y<=s[1]}),h=Math.ceil(c.length/f),d=0;n.forEach(function(y,m){var _=y[0].trace;pf.hasMarkers(_)&&_.marker.maxdisplayed>0&&m{"use strict";_E.exports={container:"marker",min:"cmin",max:"cmax"}});var TE=B((F3e,wE)=>{"use strict";var ip=$r();wE.exports=function(r,t,a){var n={},i={_fullLayout:a},l=ip.getFromTrace(i,t,"x"),o=ip.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=ip.tickText(l,l.c2l(s),!0).text,n.yLabel=ip.tickText(o,o.c2l(u),!0).text,n}});var zx=B((I3e,ME)=>{"use strict";var Ex=kr(),mf=Br(),hoe=yr();function doe(e){var r=Ex.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=Ex.select(this),n=t.trace||t[0].trace;Px(a,n,e)}),r.selectAll("g.text").each(function(t){var a=Ex.select(this),n=t.trace||t[0].trace;Rx(a,n,e)}),r.selectAll("g.trace path.js-line").call(mf.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(mf.fillGroupStyle,e,!1),hoe.getComponentMethod("errorbars","style")(r)}function Px(e,r,t){mf.pointStyle(e.selectAll("path.point"),r,t)}function Rx(e,r,t){mf.textPointStyle(e.selectAll("text"),r,t)}function poe(e,r,t){var a=r[0].trace;a.selectedpoints?(mf.selectedPointStyle(t.selectAll("path.point"),a),mf.selectedTextStyle(t.selectAll("text"),a)):(Px(t,a,e),Rx(t,a,e))}ME.exports={style:doe,stylePoints:Px,styleText:Rx,styleOnSelect:poe}});var kE=B((H3e,AE)=>{"use strict";var yf=xr(),moe=_n();AE.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&yf.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,l=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&yf.opacity(i)?i:l&&yf.opacity(l)&&(t.mlw||((r.marker||{}).line||{}).width)?l:"",n?yf.opacity(n)<.3?yf.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&yf.opacity(a)&&moe.hasLines(r)&&r.line.width?a:r.fillcolor)}});var LE=B((O3e,CE)=>{"use strict";var lp=Pe(),qE=gi(),yoe=yr(),goe=kE(),Nx=xr(),xoe=lp.fillText;CE.exports=function(r,t,a,n){var i=r.cd,l=i[0].trace,o=r.xa,s=r.ya,u=o.c2p(t),f=s.c2p(a),c=[u,f],h=l.hoveron||"",d=l.mode.indexOf("markers")!==-1?3:.5,p=!!l.xperiodalignment,y=!!l.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(Y){if(p){var I=o.c2p(Y.xStart),G=o.c2p(Y.xEnd);return u>=Math.min(I,G)&&u<=Math.max(I,G)?0:1/0}var Z=Math.max(3,Y.mrc||0),K=1-1/Z,re=Math.abs(o.c2p(Y.x)-u);return re=Math.min(I,G)&&f<=Math.max(I,G)?0:1/0}var Z=Math.max(3,Y.mrc||0),K=1-1/Z,re=Math.abs(s.c2p(Y.y)-f);return rece!=W>=ce&&(ke=ge[Q-1][0],ve=ge[Q][0],W-be&&(ue=ke+(ve-ke)*(ce-be)/(W-be),Z=Math.min(Z,ue),K=Math.max(K,ue)));return Z=Math.max(Z,0),K=Math.min(K,o._length),{x0:Z,x1:K,y0:ce,y1:ce}}if(h.indexOf("fills")!==-1&&l._fillElement){var O=z(l._fillElement)&&!z(l._fillExclusionElement);if(O){var U=H(l._polygons);U===null&&(U={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var V=Nx.defaultLine;return Nx.opacity(l.fillcolor)?V=l.fillcolor:Nx.opacity((l.line||{}).color)&&(V=l.line.color),lp.extendFlat(r,{distance:r.maxHoverDistance,x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1,color:V,hovertemplate:!1}),delete r.index,l.text&&!lp.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}});var EE=B((B3e,DE)=>{"use strict";var SE=_n();DE.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=[],o=a[0].trace,s,u,f,c,h=!SE.hasMarkers(o)&&!SE.hasText(o);if(h)return[];if(t===!1)for(s=0;s{"use strict";PE.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var IE=B((G3e,FE)=>{"use strict";var Fv=yr().traceIs,Fx=u2();FE.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(boe(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function boe(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=_oe(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var l=a+"calendar",o=i[l],s={noMultiCategory:!Fv(i,"cartesian")||Fv(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,NE(i,a)){var u=zE(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(NE(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function zE(e){return{v:"x",h:"y"}[e.orientation||"v"]}function NE(e,r){var t=zE(e),a=Fv(e,"box-violin"),n=Fv(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var OE=B((U3e,HE)=>{"use strict";var woe=gn().isTypedArraySpec;function Toe(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,l;if(r.axData)n=r.axData;else for(n=[],i=0;i0||woe(i),o;l&&(o="array");var s=a("categoryorder",o),u;s==="array"&&(u=a("categoryarray")),!l&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=Toe(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var GE=B((V3e,YE)=>{"use strict";var BE=Rn().mix,Moe=zn(),Aoe=Pe();YE.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function l(k,L){return Aoe.coerce2(r,t,n.attributes,k,L)}var o=l("linecolor",i),s=l("linewidth"),u=a("showline",n.showLine||!!o||!!s);u||(delete t.linecolor,delete t.linewidth);var f=BE(i,n.bgColor,n.blend||Moe.lightFraction).toRgbString(),c=l("gridcolor",f),h=l("gridwidth"),d=l("griddash"),p=a("showgrid",n.showGrid||!!c||!!h||!!d);if(p||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var y=BE(t.gridcolor,n.bgColor,67).toRgbString(),m=l("minor.gridcolor",y),_=l("minor.gridwidth",t.gridwidth||1),b=l("minor.griddash",t.griddash||"solid"),T=a("minor.showgrid",!!m||!!_||!!b);T||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var x=l("zerolinecolor",i),M=l("zerolinewidth"),A=a("zeroline",n.showGrid||!!x||!!M);A||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var sp=B((W3e,JE)=>{"use strict";var UE=zr(),koe=yr(),Iv=Pe(),qoe=ot(),Coe=On(),Ix=bn(),VE=Kh(),WE=Qh(),Loe=ed(),Soe=rd(),Doe=OE(),Eoe=GE(),Poe=L2(),XE=md(),op=wa().WEEKDAY_PATTERN,Roe=wa().HOUR_PATTERN;JE.exports=function(r,t,a,n,i){var l=n.letter,o=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},c=t.type||f.type||"-",h;if(c==="date"){var d=koe.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(h=a("ticklabelmode"))}!n.noTicklabelindex&&(c==="date"||c==="linear")&&a("ticklabelindex");var p="";(!n.noTicklabelposition||c==="multicategory")&&(p=Iv.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:l==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),XE(t,i),Poe(r,t,a,n),Doe(r,t,a,n),c!=="category"&&!n.noHover&&a("hoverformat");var y=a("color"),m=y!==Ix.color.dflt?y:o.color,_=s.label||i._dfltTitle[l];if(Soe(r,t,a,c,n),!u)return t;a("title.text",_),Iv.coerceFont(a,"title.font",o,{overrideDflt:{size:Iv.bigFont(o.size),color:m}}),VE(r,t,a,c);var b=n.hasMinor;if(b&&(qoe.newContainer(t,"minor"),VE(r,t,a,c,{isMinor:!0})),Loe(r,t,a,c,n),WE(r,t,a,n),b){var T=n.isMinor;n.isMinor=!0,WE(r,t,a,n),n.isMinor=T}Eoe(r,t,a,{dfltColor:y,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:b,attributes:Ix}),b&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var x=c==="multicategory";if(!n.noTickson&&(c==="category"||x)&&(t.ticks||t.showgrid)){var M;x&&(M="boundaries");var A=a("tickson",M);A==="boundaries"&&delete t.ticklabelposition}if(x){var k=a("showdividers");k&&(a("dividercolor"),a("dividerwidth"))}if(c==="date")if(Coe(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:zoe}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var L=0;L=2){var l="",o,s;if(i.length===2){for(o=0;o<2;o++)if(s=ZE(i[o]),s){l=op;break}}var u=a("pattern",l);if(u===op)for(o=0;o<2;o++)s=ZE(i[o]),s&&(r.bounds[o]=i[o]=s-1);if(u)for(o=0;o<2;o++)switch(s=i[o],u){case op:if(!UE(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[o]=i[o]=s;break;case Roe:if(!UE(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[o]=i[o]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var Foe=zr(),up=Pe();$E.exports=function(r,t,a,n){var i=n.counterAxes||[],l=n.overlayableAxes||[],o=n.letter,s=n.grid,u=n.overlayingDomain,f,c,h,d,p,y;s&&(c=s._domains[o][s._axisMap[t._id]],f=s._anchors[t._id],c&&(h=s[o+"side"].split(" ")[0],d=s.domain[o][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(Foe(r.position)?"free":i[0]||"free"),h=h||(o==="x"?"bottom":"left"),d=d||0,p=0,y=!1;var m=up.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),_=up.coerce(r,t,{side:{valType:"enumerated",values:o==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(o==="y"){var b=a("autoshift");b&&(d=_==="left"?u[0]:u[1],y=t.automargin?t.automargin:!0,p=_==="left"?-3:3),a("shift",p)}a("position",d)}a("automargin",y);var T=!1;if(l.length&&(T=up.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(l),dflt:!1}},"overlaying")),!T){var x=a("domain",c);x[0]>x[1]-1/4096&&(t.domain=c),up.noneOrAll(r.domain,t.domain,c),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var iP=B((Z3e,nP)=>{"use strict";var Ts=Pe(),KE=xr(),Ioe=Hi().isUnifiedHover,Hoe=t3(),QE=ot(),Ooe=xu(),jE=bn(),Boe=IE(),eP=sp(),Yoe=ys(),rP=fp(),Ox=Jt(),$i=Ox.id2name,tP=Ox.name2id,Goe=wa().AX_ID_PATTERN,aP=yr(),cp=aP.traceIs,Hx=aP.getComponentMethod;function vp(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}nP.exports=function(r,t,a){var n=t.autotypenumbers,i={},l={},o={},s={},u={},f={},c={},h={},d={},p={},y,m;for(y=0;y{"use strict";var Uoe=kr(),lP=yr(),hp=Pe(),kn=Br(),dp=$r();oP.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){dp.redrawComponents(r);return}function l(m){var _=m.xaxis,b=m.yaxis;i._defs.select("#"+m.clipId+"> rect").call(kn.setTranslate,0,0).call(kn.setScale,1,1),m.plot.call(kn.setTranslate,_._offset,b._offset).call(kn.setScale,1,1);var T=m.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(kn.setPointGroupScale,1,1),T.selectAll(".textpoint").call(kn.setTextPointsScale,1,1),T.call(kn.hideOutsideRangePoints,m)}function o(m,_){var b=m.plotinfo,T=b.xaxis,x=b.yaxis,M=T._length,A=x._length,k=!!m.xr1,L=!!m.yr1,D=[];if(k){var P=hp.simpleMap(m.xr0,T.r2l),R=hp.simpleMap(m.xr1,T.r2l),z=P[1]-P[0],H=R[1]-R[0];D[0]=(P[0]*(1-_)+_*R[0]-P[0])/(P[1]-P[0])*M,D[2]=M*(1-_+_*H/z),T.range[0]=T.l2r(P[0]*(1-_)+_*R[0]),T.range[1]=T.l2r(P[1]*(1-_)+_*R[1])}else D[0]=0,D[2]=M;if(L){var O=hp.simpleMap(m.yr0,x.r2l),U=hp.simpleMap(m.yr1,x.r2l),V=O[1]-O[0],Y=U[1]-U[0];D[1]=(O[1]*(1-_)+_*U[1]-O[1])/(O[0]-O[1])*A,D[3]=A*(1-_+_*Y/V),x.range[0]=T.l2r(O[0]*(1-_)+_*U[0]),x.range[1]=x.l2r(O[1]*(1-_)+_*U[1])}else D[1]=0,D[3]=A;dp.drawOne(r,T,{skipTitle:!0}),dp.drawOne(r,x,{skipTitle:!0}),dp.redrawComponents(r,[T._id,x._id]);var I=k?M/D[2]:1,G=L?A/D[3]:1,Z=k?D[0]:0,K=L?D[1]:0,re=k?D[0]/D[2]*M:0,se=L?D[1]/D[3]*A:0,ce=T._offset-re,le=x._offset-se;b.clipRect.call(kn.setTranslate,Z,K).call(kn.setScale,1/I,1/G),b.plot.call(kn.setTranslate,ce,le).call(kn.setScale,I,G),kn.setPointGroupScale(b.zoomScalePts,1/I,1/G),kn.setTextPointsScale(b.zoomScaleTxt,1/I,1/G)}var s;n&&(s=n());function u(){for(var m={},_=0;_a.duration?(u(),d=window.cancelAnimationFrame(y)):d=window.requestAnimationFrame(y)}return c=Date.now(),d=window.requestAnimationFrame(y),Promise.resolve()}});var gl=B(Pa=>{"use strict";var mp=kr(),uP=yr(),Ms=Pe(),Voe=St(),Woe=Br(),fP=bg().getModuleCalcData,io=Jt(),Ai=wa(),Xoe=Qo(),jr=Ms.ensureSingle;function pp(e,r,t){return Ms.ensureSingle(e,r,t,function(a){a.datum(t)})}var As=Ai.zindexSeparator;Pa.name="cartesian";Pa.attr=["xaxis","yaxis"];Pa.idRoot=["x","y"];Pa.idRegex=Ai.idRegex;Pa.attrRegex=Ai.attrRegex;Pa.attributes=RE();Pa.layoutAttributes=bn();Pa.supplyLayoutDefaults=iP();Pa.transitionAxes=sP();Pa.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,l=i,o={},s={},u,f,c;for(u=0;u0){var d=h.id;if(d.indexOf(As)!==-1)continue;d+=As+(u+1),h=Ms.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],y,m=0;m1&&(M+=As+x),T.push(o+M),l=0;l1,c=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=jr(a,"path","xlines-above"),r.ylines=jr(a,"path","ylines-above"),r.xaxislayer=jr(a,"g","xaxislayer-above"),r.yaxislayer=jr(a,"g","yaxislayer-above");else{if(!l){var h=jr(a,"g","layer-subplot");r.shapelayer=jr(h,"g","shapelayer"),r.imagelayer=jr(h,"g","imagelayer"),c&&f?(r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer):(r.minorGridlayer=jr(a,"g","minor-gridlayer"),r.gridlayer=jr(a,"g","gridlayer"),r.zerolinelayer=jr(a,"g","zerolinelayer"));var d=jr(a,"g","layer-between");r.shapelayerBetween=jr(d,"g","shapelayer"),r.imagelayerBetween=jr(d,"g","imagelayer"),jr(a,"path","xlines-below"),jr(a,"path","ylines-below"),r.overlinesBelow=jr(a,"g","overlines-below"),jr(a,"g","xaxislayer-below"),jr(a,"g","yaxislayer-below"),r.overaxesBelow=jr(a,"g","overaxes-below")}r.overplot=jr(a,"g","overplot"),r.plot=jr(r.overplot,"g",n),l||(r.xlines=jr(a,"path","xlines-above"),r.ylines=jr(a,"path","ylines-above"),r.overlinesAbove=jr(a,"g","overlines-above"),jr(a,"g","xaxislayer-above"),jr(a,"g","yaxislayer-above"),r.overaxesAbove=jr(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+o),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+o),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var p=c.plotgroup,y=n+"-x",m=n+"-y";r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer,jr(c.overlinesBelow,"path",y),jr(c.overlinesBelow,"path",m),jr(c.overaxesBelow,"g",y),jr(c.overaxesBelow,"g",m),r.plot=jr(c.overplot,"g",n),jr(c.overlinesAbove,"path",y),jr(c.overlinesAbove,"path",m),jr(c.overaxesAbove,"g",y),jr(c.overaxesAbove,"g",m),r.xlines=p.select(".overlines-"+o).select("."+y),r.ylines=p.select(".overlines-"+s).select("."+m),r.xaxislayer=p.select(".overaxes-"+o).select("."+y),r.yaxislayer=p.select(".overaxes-"+s).select("."+m)}l||(u||(pp(r.minorGridlayer,"g",r.xaxis._id),pp(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(_){return _[0]}).sort(io.idSort),pp(r.gridlayer,"g",r.xaxis._id),pp(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(_){return _[0]}).sort(io.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function hP(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=mp.select(this);f.remove(),dP(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],l=0;l{"use strict";var yp=_n();pP.exports={hasLines:yp.hasLines,hasMarkers:yp.hasMarkers,hasText:yp.hasText,isBubble:yp.isBubble,attributes:bi(),layoutAttributes:Bh(),supplyDefaults:SD(),crossTraceDefaults:PD(),supplyLayoutDefaults:zD(),calc:Ax().calc,crossTraceCalc:lE(),arraysToCalcdata:bx(),plot:bE(),colorbar:np(),formatLabels:TE(),style:zx().style,styleOnSelect:zx().styleOnSelect,hoverPoints:LE(),selectPoints:EE(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:gl(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var xP=B((Q3e,gP)=>{"use strict";var Joe=kr(),$oe=xr(),yP=V3(),Bx=Pe(),Koe=Bx.strScale,Qoe=Bx.strRotate,joe=Bx.strTranslate;gP.exports=function(r,t,a){var n=r.node(),i=yP[a.arrowhead||0],l=yP[a.startarrowhead||0],o=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,c=i.backoff*o+a.standoff,h=l.backoff*s+a.startstandoff,d,p,y,m;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},p={x:+r.attr("x2"),y:+r.attr("y2")};var _=d.x-p.x,b=d.y-p.y;if(y=Math.atan2(b,_),m=y+Math.PI,c&&h&&c+h>Math.sqrt(_*_+b*b)){O();return}if(c){if(c*c>_*_+b*b){O();return}var T=c*Math.cos(y),x=c*Math.sin(y);p.x+=T,p.y+=x,r.attr({x2:p.x,y2:p.y})}if(h){if(h*h>_*_+b*b){O();return}var M=h*Math.cos(y),A=h*Math.sin(y);d.x-=M,d.y-=A,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var k=n.getTotalLength(),L="";if(k{"use strict";var bP=kr(),Yx=yr(),ese=St(),oo=Pe(),Gx=oo.strTranslate,Ov=$r(),ks=xr(),xl=Br(),_P=gi(),Ux=va(),Vx=Kl(),Hv=mi(),rse=ot().arrayEditor,tse=xP();MP.exports={draw:ase,drawOne:wP,drawRaw:TP};function ase(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?qe="right":qe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[qe]}for(var be=!1,W=["x","y"],te=0;te1)&&(_e===ye?(tr=xe.r2fraction(r["a"+X]),(tr<0||tr>1)&&(be=!0)):be=!0),Je=xe._offset+xe.r2p(r[X]),Ae=.5}else{var De=cr==="domain";X==="x"?(ie=r[X],Je=De?xe._offset+xe._length*ie:Je=o.l+o.w*ie):(ie=1-r[X],Je=De?xe._offset+xe._length*ie:Je=o.t+o.h*ie),Ae=r.showarrow?.5:ie}if(r.showarrow){Ee.head=Je;var Le=r["a"+X];if(Ce=ze*ve(.5,r.xanchor)-Re*ve(.5,r.yanchor),_e===ye){var Ye=Ov.getRefType(_e);Ye==="domain"?(X==="y"&&(Le=1-Le),Ee.tail=xe._offset+xe._length*Le):Ye==="paper"?X==="y"?(Le=1-Le,Ee.tail=o.t+o.h*Le):Ee.tail=o.l+o.w*Le:Ee.tail=xe._offset+xe.r2p(Le),We=Ce}else Ee.tail=Je+Le,We=Ce+Le;Ee.text=Ee.tail+Ce;var Xe=l[X==="x"?"width":"height"];if(ye==="paper"&&(Ee.head=oo.constrain(Ee.head,1,Xe-1)),_e==="pixel"){var Ge=-Math.max(Ee.tail-3,Ee.text),Oe=Math.min(Ee.tail+3,Ee.text)-Xe;Ge>0?(Ee.tail+=Ge,Ee.text+=Ge):Oe>0&&(Ee.tail-=Oe,Ee.text-=Oe)}Ee.tail+=Fe,Ee.head+=Fe}else Ce=He*ve(Ae,Be),We=Ce,Ee.text=Je+Ce;Ee.text+=Fe,Ce+=Fe,We+=Fe,r["_"+X+"padplus"]=He/2+We,r["_"+X+"padminus"]=He/2-We,r["_"+X+"size"]=He,r["_"+X+"shift"]=Ce}if(be){k.remove();return}var $e=0,fr=0;if(r.align!=="left"&&($e=(Q-ce)*(r.align==="center"?.5:1)),r.valign!=="top"&&(fr=(ge-le)*(r.valign==="middle"?.5:1)),re)K.select("svg").attr({x:P+$e-1,y:P+fr}).call(xl.setClipUrl,z?y:null,e);else{var lr=P+fr-se.top,Ne=P+$e-se.left;V.call(Ux.positionText,Ne,lr).call(xl.setClipUrl,z?y:null,e)}H.select("rect").call(xl.setRect,P,P,Q,ge),R.call(xl.setRect,L/2,L/2,ue-L,ke-L),k.call(xl.setTranslate,Math.round(m.x.text-ue/2),Math.round(m.y.text-ke/2)),T.attr({transform:"rotate("+_+","+m.x.text+","+m.y.text+")"});var ne=function(Se,qe){b.selectAll(".annotation-arrow-g").remove();var ir=m.x.head,vr=m.y.head,sr=m.x.tail+Se,Ar=m.y.tail+qe,Ur=m.x.text+Se,et=m.y.text+qe,Wr=oo.rotationXYMatrix(_,Ur,et),Nt=oo.apply2DTransform(Wr),oa=oo.apply2DTransform2(Wr),Na=+R.attr("width"),sa=+R.attr("height"),Sn=Ur-.5*Na,Za=Sn+Na,ua=et-.5*sa,Ja=ua+sa,gr=[[Sn,ua,Sn,Ja],[Sn,Ja,Za,Ja],[Za,Ja,Za,ua],[Za,ua,Sn,ua]].map(oa);if(!gr.reduce(function(it,ma){return it^!!oo.segmentsIntersect(ir,vr,ir+1e6,vr+1e6,ma[0],ma[1],ma[2],ma[3])},!1)){gr.forEach(function(it){var ma=oo.segmentsIntersect(sr,Ar,ir,vr,it[0],it[1],it[2],it[3]);ma&&(sr=ma.x,Ar=ma.y)});var ct=r.arrowwidth,Xr=r.arrowcolor,bt=r.arrowside,Lt=b.append("g").style({opacity:ks.opacity(Xr)}).classed("annotation-arrow-g",!0),vt=Lt.append("path").attr("d","M"+sr+","+Ar+"L"+ir+","+vr).style("stroke-width",ct+"px").call(ks.stroke,ks.rgb(Xr));if(tse(vt,bt,r),s.annotationPosition&&vt.node().parentNode&&!a){var _t=ir,Fa=vr;if(r.standoff){var fa=Math.sqrt(Math.pow(ir-sr,2)+Math.pow(vr-Ar,2));_t+=r.standoff*(sr-ir)/fa,Fa+=r.standoff*(Ar-vr)/fa}var ai=Lt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(sr-_t)+","+(Ar-Fa),transform:Gx(_t,Fa)}).style("stroke-width",ct+6+"px").call(ks.stroke,"rgba(0,0,0,0)").call(ks.fill,"rgba(0,0,0,0)"),ni,Qt;Hv.init({element:ai.node(),gd:e,prepFn:function(){var it=xl.getTranslate(k);ni=it.x,Qt=it.y,n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(it,ma){var Do=Nt(ni,Qt),Eo=Do[0]+it,Sl=Do[1]+ma;k.call(xl.setTranslate,Eo,Sl),d("x",lo(n,it,"x",o,r)),d("y",lo(i,ma,"y",o,r)),r.axref===r.xref&&d("ax",lo(n,it,"ax",o,r)),r.ayref===r.yref&&d("ay",lo(i,ma,"ay",o,r)),Lt.attr("transform",Gx(it,ma)),T.attr({transform:"rotate("+_+","+Eo+","+Sl+")"})},doneFn:function(){Yx.call("_guiRelayout",e,p());var it=document.querySelector(".js-notes-box-panel");it&&it.redraw(it.selectedObj)}})}}};if(r.showarrow&&ne(0,0),x){var fe;Hv.init({element:k.node(),gd:e,prepFn:function(){fe=T.attr("transform")},moveFn:function(Se,qe){var ir="pointer";if(r.showarrow)r.axref===r.xref?d("ax",lo(n,Se,"ax",o,r)):d("ax",r.ax+Se),r.ayref===r.yref?d("ay",lo(i,qe,"ay",o.w,r)):d("ay",r.ay+qe),ne(Se,qe);else{if(a)return;var vr,sr;if(n)vr=lo(n,Se,"x",o,r);else{var Ar=r._xsize/o.w,Ur=r.x+(r._xshift-r.xshift)/o.w-Ar/2;vr=Hv.align(Ur+Se/o.w,Ar,0,1,r.xanchor)}if(i)sr=lo(i,qe,"y",o,r);else{var et=r._ysize/o.h,Wr=r.y-(r._yshift+r.yshift)/o.h-et/2;sr=Hv.align(Wr-qe/o.h,et,0,1,r.yanchor)}d("x",vr),d("y",sr),(!n||!i)&&(ir=Hv.getCursor(n?.5:vr,i?.5:sr,r.xanchor,r.yanchor))}T.attr({transform:Gx(Se,qe)+fe}),Vx(k,ir)},clickFn:function(Se,qe){r.captureevents&&e.emit("plotly_clickannotation",A(qe))},doneFn:function(){Vx(k),Yx.call("_guiRelayout",e,p());var Se=document.querySelector(".js-notes-box-panel");Se&&Se.redraw(Se.selectedObj)}})}}s.annotationText?V.call(Ux.makeEditable,{delegate:k,gd:e}).call(Y).on("edit",function(G){r.text=G,this.call(Y),d("text",G),n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),Yx.call("_guiRelayout",e,p())}):V.call(Y)}});var SP=B((exe,LP)=>{"use strict";var AP=Pe(),nse=yr(),kP=ot().arrayEditor;LP.exports={hasClickToShow:ise,onClick:lse};function ise(e,r){var t=CP(e,r);return t.on.length>0||t.explicitOff.length>0}function lse(e,r){var t=CP(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},l=e._fullLayout.annotations,o,s;if(a.length||n.length){for(o=0;o{"use strict";var Wx=Pe(),gf=xr();DP.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),l=n("bordercolor"),o=gf.opacity(l);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),Wx.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var c=n("arrowside"),h,d;c.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),c.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",o?t.bordercolor:gf.defaultLine),n("arrowwidth",(o&&s||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),y=a.hoverlabel||{};if(p){var m=n("hoverlabel.bgcolor",y.bgcolor||(gf.opacity(i)?gf.rgb(i):gf.defaultLine)),_=n("hoverlabel.bordercolor",y.bordercolor||gf.contrast(m)),b=Wx.extendFlat({},y.font);b.color||(b.color=_),Wx.coerceFont(n,"hoverlabel.font",b)}n("captureevents",!!p)}});var PP=B((txe,EP)=>{"use strict";var Zx=Pe(),qs=$r(),ose=On(),sse=Xx(),use=lf();EP.exports=function(r,t){ose(r,t,{name:"annotations",handleItemDefaults:fse})};function fse(e,r,t){function a(T,x){return Zx.coerce(e,r,use,T,x)}var n=a("visible"),i=a("clicktoshow");if(n||i){sse(e,r,t,a);for(var l=r.showarrow,o=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var c=o[f],h=qs.coerceRef(e,r,u,c,"","paper");if(h!=="paper"){var d=qs.getFromId(u,h);d._annIndices.push(r._index)}if(qs.coercePosition(r,u,a,h,c,.5),l){var p="a"+c,y=qs.coerceRef(e,r,u,p,"pixel",["pixel","paper"]);y!=="pixel"&&y!==h&&(y=r[p]="pixel");var m=y==="pixel"?s[f]:.4;qs.coercePosition(r,u,a,y,p,m)}a(c+"anchor"),a(c+"shift")}if(Zx.noneOrAll(e,r,["x","y"]),l&&Zx.noneOrAll(e,r,["ax","ay"]),i){var _=a("xclick"),b=a("yclick");r._xclick=_===void 0?r.x:qs.cleanPosition(_,u,r.xref),r._yclick=b===void 0?r.y:qs.cleanPosition(b,u,r.yref)}}}});var NP=B((axe,zP)=>{"use strict";var Jx=Pe(),Cs=$r(),cse=gp().draw;zP.exports=function(r){var t=r._fullLayout,a=Jx.filterVisible(t.annotations);if(a.length&&r._fullData.length)return Jx.syncOrAsync([cse,vse],r)};function vse(e){var r=e._fullLayout;Jx.filterVisible(r.annotations).forEach(function(t){var a=Cs.getFromId(e,t.xref),n=Cs.getFromId(e,t.yref),i=Cs.getRefType(t.xref),l=Cs.getRefType(t.yref);t._extremes={},i==="range"&&RP(t,a),l==="range"&&RP(t,n)})}function RP(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],l=e[a+"ref"],o=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,y=p+f,m=p-f,_;if(o===l){var b=Cs.findExtremes(r,[r.r2c(n)],{ppadplus:h,ppadminus:d}),T=Cs.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,y),ppadminus:Math.max(u,m)});_={min:[b.min[0],T.min[0]],max:[b.max[0],T.max[0]]}}else y=i?y+i:y,m=i?m-i:m,_=Cs.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,h,y),ppadminus:Math.max(u,d,m)});e._extremes[t]=_}});var IP=B((nxe,FP)=>{"use strict";var hse=zr(),dse=sh();FP.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(!(i||l))return;var o=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function c(d){var p=u[d],y=null;i?y=dse(p,t.range):y=Math.pow(10,p),hse(y)||(y=null),n(f+d,y)}for(var h=0;h{"use strict";var $x=gp(),HP=SP();OP.exports={moduleType:"component",name:"annotations",layoutAttributes:lf(),supplyLayoutDefaults:PP(),includeBasePlot:xv()("annotations"),calcAutorange:NP(),draw:$x.draw,drawOne:$x.drawOne,drawRaw:$x.drawRaw,hasClickToShow:HP.hasClickToShow,onClick:HP.onClick,convertCoords:IP()}});var xp=B((lxe,YP)=>{"use strict";var dt=lf(),pse=ui().overrideAll,mse=ot().templatedArray;YP.exports=pse(mse("annotation",{visible:dt.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:dt.xanchor,xshift:dt.xshift,yanchor:dt.yanchor,yshift:dt.yshift,text:dt.text,textangle:dt.textangle,font:dt.font,width:dt.width,height:dt.height,opacity:dt.opacity,align:dt.align,valign:dt.valign,bgcolor:dt.bgcolor,bordercolor:dt.bordercolor,borderpad:dt.borderpad,borderwidth:dt.borderwidth,showarrow:dt.showarrow,arrowcolor:dt.arrowcolor,arrowhead:dt.arrowhead,startarrowhead:dt.startarrowhead,arrowside:dt.arrowside,arrowsize:dt.arrowsize,startarrowsize:dt.startarrowsize,arrowwidth:dt.arrowwidth,standoff:dt.standoff,startstandoff:dt.startstandoff,hovertext:dt.hovertext,hoverlabel:dt.hoverlabel,captureevents:dt.captureevents}),"calc","from-root")});var UP=B((oxe,GP)=>{"use strict";var Kx=Pe(),yse=$r(),gse=On(),xse=Xx(),bse=xp();GP.exports=function(r,t,a){gse(r,t,{name:"annotations",handleItemDefaults:_se,fullLayout:a.fullLayout})};function _se(e,r,t,a){function n(o,s){return Kx.coerce(e,r,bse,o,s)}function i(o){var s=o+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],yse.coercePosition(r,u,n,o,o,.5)}var l=n("visible");l&&(xse(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),Kx.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),Kx.noneOrAll(e,r,["ax","ay"])))}});var ZP=B((sxe,XP)=>{"use strict";var VP=Pe(),WP=$r();XP.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function Qx(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function Tse(e,r){var t=Qx(e.projection,Qx(e.view,Qx(e.model,[r[0],r[1],r[2],1])));return t}JP.exports=Tse});var QP=B((fxe,KP)=>{"use strict";var Mse=gp().drawRaw,Ase=$P(),kse=["x","y","z"];KP.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){o=!0;break}}o?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(l._pdata=Ase(r.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),Mse(r.graphDiv,l,i,r.id,l._xa,l._ya))}}});var rR=B((cxe,eR)=>{"use strict";var qse=yr(),jP=Pe();eR.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:xp()}}},layoutAttributes:xp(),handleDefaults:UP(),includeBasePlot:Cse,convert:ZP(),draw:QP()};function Cse(e,r){var t=qse.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var tR=lf(),aR=jt(),nR=bi().line,Lse=fi().dash,ki=mt().extendFlat,Sse=ot().templatedArray,vxe=gv(),xf=tn(),Dse=_a().shapeTexttemplateAttrs,Ese=bh();iR.exports=Sse("shape",{visible:ki({},xf.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:ki({},xf.legend,{editType:"calc+arraydraw"}),legendgroup:ki({},xf.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:ki({},xf.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:aR({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:ki({},xf.legendrank,{editType:"calc+arraydraw"}),legendwidth:ki({},xf.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:ki({},tR.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:ki({},tR.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:ki({},nR.color,{editType:"arraydraw"}),width:ki({},nR.width,{editType:"calc+arraydraw"}),dash:ki({},Lse,{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:Dse({},{keys:Object.keys(Ese)}),font:aR({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 sR=B((dxe,oR)=>{"use strict";var Bv=Pe(),bf=$r(),Pse=On(),Rse=jx(),lR=eo();oR.exports=function(r,t){Pse(r,t,{name:"shapes",handleItemDefaults:Nse})};function zse(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Nse(e,r,t){function a(G,Z){return Bv.coerce(e,r,Rse,G,Z)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),Bv.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),o=l?"path":"rect",s=a("type",o),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),h=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var y=d[p],m=y+"anchor",_=y==="x"?c:h,b={_fullLayout:t},T,x,M,A=bf.coerceRef(e,r,b,y,void 0,"paper"),k=bf.getRefType(A);if(k==="range"?(T=bf.getFromId(b,A),T._shapeIndices.push(r._index),M=lR.rangeToShapePosition(T),x=lR.shapePositionToRange(T),(T.type==="category"||T.type==="multicategory")&&(a(y+"0shift"),a(y+"1shift"))):x=M=Bv.identity,u){var L=.25,D=.75,P=y+"0",R=y+"1",z=e[P],H=e[R];e[P]=x(e[P],!0),e[R]=x(e[R],!0),_==="pixel"?(a(P,0),a(R,10)):(bf.coercePosition(r,b,a,A,P,L),bf.coercePosition(r,b,a,A,R,D)),r[P]=M(r[P]),r[R]=M(r[R]),e[P]=z,e[R]=H}if(_==="pixel"){var O=e[m];e[m]=x(e[m],!0),bf.coercePosition(r,b,a,A,m,.25),r[m]=M(r[m]),e[m]=O}}u&&Bv.noneOrAll(e,r,["x0","x1","y0","y1"]);var U=s==="line",V,Y;if(u&&(V=a("label.texttemplate")),V||(Y=a("label.text")),Y||V){a("label.textangle");var I=a("label.textposition",U?"middle":"middle center");a("label.xanchor"),a("label.yanchor",zse(U,I)),a("label.padding"),Bv.coerceFont(a,"label.font",t.font)}}}});var cR=B((pxe,fR)=>{"use strict";var Fse=xr(),uR=Pe();function Ise(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}fR.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),uR.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Fse.contrast(i)),a("newshape.line.dash")}var l=r.dragmode==="drawline",o=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(o||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",l?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Ise(l,u)),a("newshape.label.padding"),uR.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var mR=B((mxe,pR)=>{"use strict";var e5=Pe(),_f=$r(),wf=jc(),hR=eo();pR.exports=function(r){var t=r._fullLayout,a=e5.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+l:l;return{ppad:l,ppadplus:o?c:h,ppadminus:o?h:c}}else return{ppad:l}}function vR(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,l,o=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],l=r[a+"1"],n&&(o=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],l=r[a+"anchor"]),i!==void 0)return[u(i)+o,u(l)+s];if(r.path){var c=1/0,h=-1/0,d=r.path.match(wf.segmentRE),p,y,m,_,b;for(e.type==="date"&&(u=hR.decodeDate(u)),p=0;ph&&(h=b)));if(h>=c)return[c,h]}}});var xR=B((yxe,gR)=>{"use strict";var yR=s1();gR.exports={moduleType:"component",name:"shapes",layoutAttributes:jx(),supplyLayoutDefaults:sR(),supplyDrawNewShapeDefaults:cR(),includeBasePlot:xv()("shapes"),calcAutorange:mR(),draw:yR.draw,drawOne:yR.drawOne}});var r5=B((xxe,_R)=>{"use strict";var bR=wa(),Bse=ot().templatedArray,gxe=gv();_R.exports=Bse("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",bR.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",bR.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var TR=B((bxe,wR)=>{"use strict";var Yse=Pe(),t5=$r(),Gse=On(),Use=r5(),Vse="images";wR.exports=function(r,t){var a={name:Vse,handleItemDefaults:Wse};Gse(r,t,a)};function Wse(e,r,t){function a(h,d){return Yse.coerce(e,r,Use,h,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:t},o=["x","y"],s=0;s<2;s++){var u=o[s],f=t5.coerceRef(e,r,l,u,"paper",void 0);if(f!=="paper"){var c=t5.getFromId(l,f);c._imgIndices.push(r._index)}t5.coercePosition(r,l,a,f,u,0)}return r}});var qR=B((_xe,kR)=>{"use strict";var MR=kr(),Xse=Br(),Tf=$r(),AR=Jt(),Zse=Qo();kR.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],l,o;for(o=0;o{"use strict";var CR=zr(),Jse=sh();LR.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(i||l){for(var o=r._fullLayout.images,s=t._id.charAt(0),u,f,c=0;c{"use strict";DR.exports={moduleType:"component",name:"images",layoutAttributes:r5(),supplyLayoutDefaults:TR(),includeBasePlot:xv()("images"),draw:qR(),convertCoords:SR()}});var bp=B((Mxe,PR)=>{"use strict";PR.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 a5=B((Axe,zR)=>{"use strict";var $se=jt(),Kse=zn(),Qse=mt().extendFlat,jse=ui().overrideAll,eue=_h(),RR=ot().templatedArray,rue=RR("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}});zR.exports=jse(RR("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:rue,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:Qse(eue({editType:"arraydraw"}),{}),font:$se({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Kse.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var HR=B((kxe,IR)=>{"use strict";var _p=Pe(),NR=On(),FR=a5(),tue=bp(),aue=tue.name,nue=FR.buttons;IR.exports=function(r,t){var a={name:aue,handleItemDefaults:iue};NR(r,t,a)};function iue(e,r,t){function a(l,o){return _p.coerce(e,r,FR,l,o)}var n=NR(e,r,{name:"buttons",handleItemDefaults:lue}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),_p.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),_p.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function lue(e,r){function t(n,i){return _p.coerce(e,r,nue,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var YR=B((qxe,BR)=>{"use strict";BR.exports=At;var qi=kr(),OR=xr(),Mf=Br(),wp=Pe();function At(e,r,t){this.gd=e,this.container=r,this.id=t,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})}At.barWidth=2;At.barLength=20;At.barRadius=2;At.barPad=1;At.barColor="#808BA4";At.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,l=n.height;this.position=r;var o=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",y=c==="up",m=s,_=f,b,T,x,M;!h&&!d&&!p&&!y&&(this.position.direction="down",h=!0);var A=h||y;A?(b=o,T=b+m,h?(x=u,M=Math.min(x+_,l),_=M-x):(M=u+_,x=Math.max(M-_,0),_=M-x)):(x=u,M=x+_,d?(T=o+m,b=Math.max(T-m,0),m=T-b):(b=o,T=Math.min(b+m,i),m=T-b)),this._box={l:b,t:x,w:m,h:_};var k=s>m,L=At.barLength+2*At.barPad,D=At.barWidth+2*At.barPad,P=o,R=u+f;R+D>l&&(R=l-D);var z=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(OR.fill,At.barColor),k?(this.hbar=z.attr({rx:At.barRadius,ry:At.barRadius,x:P,y:R,width:L,height:D}),this._hbarXMin=P+L/2,this._hbarTranslateMax=m-L):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var H=f>_,O=At.barWidth+2*At.barPad,U=At.barLength+2*At.barPad,V=o+s,Y=u;V+O>i&&(V=i-O);var I=this.container.selectAll("rect.scrollbar-vertical").data(H?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(OR.fill,At.barColor),H?(this.vbar=I.attr({rx:At.barRadius,ry:At.barRadius,x:V,y:Y,width:O,height:U}),this._vbarYMin=Y+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var G=this.id,Z=b-.5,K=H?T+O+.5:T+.5,re=x-.5,se=k?M+D+.5:M+.5,ce=n._topdefs.selectAll("#"+G).data(k||H?[0]:[]);if(ce.exit().remove(),ce.enter().append("clipPath").attr("id",G).append("rect"),k||H?(this._clipRect=ce.select("rect").attr({x:Math.floor(Z),y:Math.floor(re),width:Math.ceil(K)-Math.floor(Z),height:Math.ceil(se)-Math.floor(re)}),this.container.call(Mf.setClipUrl,G,this.gd),this.bg.attr({x:o,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Mf.setClipUrl,null),delete this._clipRect),k||H){var le=qi.behavior.drag().on("dragstart",function(){qi.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(le);var Q=qi.behavior.drag().on("dragstart",function(){qi.event.sourceEvent.preventDefault(),qi.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(Q),H&&this.vbar.on(".drag",null).call(Q)}this.setTranslate(t,a)};At.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Mf.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)};At.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=qi.event.dx),this.vbar&&(t-=qi.event.dy),this.setTranslate(r,t)};At.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=qi.event.deltaY),this.vbar&&(t+=qi.event.deltaY),this.setTranslate(r,t)};At.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=wp.constrain(qi.event.x,a,n),l=(i-a)/(n-a),o=this.position.w-this._box.w;r=l*o}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=wp.constrain(qi.event.y,s,u),c=(f-s)/(u-s),h=this.position.h-this._box.h;t=c*h}this.setTranslate(r,t)};At.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=wp.constrain(r||0,0,a),t=wp.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(Mf.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(Mf.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(Mf.setTranslate,r,t+l*this._vbarTranslateMax)}}});var QR=B((Cxe,KR)=>{"use strict";var Af=kr(),Yv=St(),Gv=xr(),kf=Br(),qn=Pe(),Tp=va(),oue=ot().arrayEditor,UR=Sa().LINE_SPACING,wr=bp(),sue=YR();KR.exports=function(r){var t=r._fullLayout,a=qn.filterVisible(t[wr.name]);function n(h){Yv.autoMargin(r,JR(h))}var i=t._menulayer.selectAll("g."+wr.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(wr.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){Af.select(this).selectAll("g."+wr.headerGroupClassName).each(n)}).remove(),a.length!==0){var l=i.selectAll("g."+wr.headerGroupClassName).data(a,uue);l.enter().append("g").classed(wr.headerGroupClassName,!0);for(var o=qn.ensureSingle(i,"g",wr.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var mue=bp();jR.exports={moduleType:"component",name:mue.name,layoutAttributes:a5(),supplyLayoutDefaults:HR(),draw:QR()}});var Vv=B((Sxe,rz)=>{"use strict";rz.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 o5=B((Dxe,nz)=>{"use strict";var tz=jt(),yue=_h(),gue=mt().extendDeepAll,xue=ui().overrideAll,bue=Tc(),az=ot().templatedArray,Ls=Vv(),_ue=az("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}});nz.exports=xue(az("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:_ue,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:gue(yue({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:bue.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:tz({})},font:tz({}),activebgcolor:{valType:"color",dflt:Ls.gripBgActiveColor},bgcolor:{valType:"color",dflt:Ls.railBgColor},bordercolor:{valType:"color",dflt:Ls.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Ls.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Ls.tickLength},tickcolor:{valType:"color",dflt:Ls.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Ls.minorTickLength}}),"arraydraw","from-root")});var sz=B((Exe,oz)=>{"use strict";var qf=Pe(),iz=On(),lz=o5(),wue=Vv(),Tue=wue.name,Mue=lz.steps;oz.exports=function(r,t){iz(r,t,{name:Tue,handleItemDefaults:Aue})};function Aue(e,r,t){function a(c,h){return qf.coerce(e,r,lz,c,h)}for(var n=iz(e,r,{name:"steps",handleItemDefaults:kue}),i=0,l=0;l{"use strict";var Ci=kr(),Mp=St(),so=xr(),Li=Br(),Cn=Pe(),que=Cn.strTranslate,Wv=va(),Cue=ot().arrayEditor,Pr=Vv(),f5=Sa(),cz=f5.LINE_SPACING,s5=f5.FROM_TL,u5=f5.FROM_BR;yz.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=Lue(a,r),i=a._infolayer.selectAll("g."+Pr.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Pr.containerClassName,!0).style("cursor",t?null:"ew-resize");function l(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Mp.autoMargin(r,vz(f))}if(i.exit().each(function(){Ci.select(this).selectAll("g."+Pr.groupClassName).each(l)}).remove(),n.length!==0){var o=i.selectAll("g."+Pr.groupClassName).data(n,Sue);o.enter().append("g").classed(Pr.groupClassName,!0),o.exit().each(l).remove();for(var s=0;s0&&(o=o.transition().duration(r.transition.duration).ease(r.transition.easing)),o.attr("transform",que(l-Pr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function c5(e,r){var t=e._dims;return t.inputAreaStart+Pr.stepInset+(t.inputAreaLength-2*Pr.stepInset)*Math.min(1,Math.max(0,r))}function fz(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Pr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Pr.stepInset-2*t.inputAreaStart)))}function Fue(e,r,t){var a=t._dims,n=Cn.ensureSingle(e,"rect",Pr.railTouchRectClass,function(i){i.call(pz,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Pr.tickOffset+t.ticklen+a.labelHeight)}).call(so.fill,t.bgcolor).attr("opacity",0),Li.setTranslate(n,0,a.currentValueTotalHeight)}function Iue(e,r){var t=r._dims,a=t.inputAreaLength-Pr.railInset*2,n=Cn.ensureSingle(e,"rect",Pr.railRectClass);n.attr({width:a,height:Pr.railWidth,rx:Pr.railRadius,ry:Pr.railRadius,"shape-rendering":"crispEdges"}).call(so.stroke,r.bordercolor).call(so.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),Li.setTranslate(n,Pr.railInset,(t.inputAreaWidth-Pr.railWidth)*.5+t.currentValueTotalHeight)}});var bz=B((Rxe,xz)=>{"use strict";var Hue=Vv();xz.exports={moduleType:"component",name:Hue.name,layoutAttributes:o5(),supplyLayoutDefaults:sz(),draw:gz()}});var kp=B((zxe,wz)=>{"use strict";var _z=zn();wz.exports={bgcolor:{valType:"color",dflt:_z.background,editType:"plot"},bordercolor:{valType:"color",dflt:_z.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 v5=B((Nxe,Tz)=>{"use strict";Tz.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 qp=B((Fxe,Mz)=>{"use strict";Mz.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 qz=B(Lp=>{"use strict";var Oue=Jt(),Bue=va(),Az=qp(),Yue=Sa().LINE_SPACING,Cp=Az.name;function kz(e){var r=e&&e[Cp];return r&&r.visible}Lp.isVisible=kz;Lp.makeData=function(e){for(var r=Oue.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var Sp=Pe(),Cz=ot(),Lz=Jt(),Gue=kp(),Uue=v5();Sz.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;Sp.isPlainObject(n.rangeslider)||(n.rangeslider={});var l=n.rangeslider,o=Cz.newContainer(i,"rangeslider");function s(M,A){return Sp.coerce(l,o,Gue,M,A)}var u,f;function c(M,A){return Sp.coerce(u,f,Uue,M,A)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(l.range)),s("range");var d=t._subplots;if(d)for(var p=d.cartesian.filter(function(M){return M.substr(0,M.indexOf("y"))===Lz.name2id(a)}).map(function(M){return M.substr(M.indexOf("y"),M.length)}),y=Sp.simpleMap(p,Lz.id2name),m=0;m{"use strict";var Vue=Jt().list,Wue=Bc().getAutoRange,Xue=qp();Ez.exports=function(r){for(var t=Vue(r,"x",!0),a=0;a{"use strict";var Dp=kr(),Zue=yr(),Jue=St(),Rt=Pe(),Ep=Rt.strTranslate,zz=Br(),uo=xr(),$ue=Hc(),Kue=gl(),h5=Jt(),Que=mi(),jue=Kl(),Hr=qp();Nz.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=I.max)V=R[Y+1];else if(U=I.pmax)V=R[Y+1];else if(U0?e.touches[0].clientX:0}function efe(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Hr.slideBoxClassName).node(),i=e.select("rect."+Hr.grabAreaMinClassName).node(),l=e.select("rect."+Hr.grabAreaMaxClassName).node();function o(){var s=Dp.event,u=s.target,f=Rz(s),c=f-e.node().getBoundingClientRect().left,h=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),p=Que.coverSlip();this.addEventListener("touchmove",y),this.addEventListener("touchend",m),p.addEventListener("mousemove",y),p.addEventListener("mouseup",m);function y(_){var b=Rz(_),T=+b-f,x,M,A;switch(u){case n:if(A="ew-resize",h+T>t._length||d+T<0)return;x=h+T,M=d+T;break;case i:if(A="col-resize",h+T>t._length)return;x=h+T,M=d;break;case l:if(A="col-resize",d+T<0)return;x=h,M=d+T;break;default:A="ew-resize",x=c,M=c+T;break}if(M{"use strict";var ffe=Pe(),cfe=kp(),vfe=v5(),d5=qz();Iz.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:ffe.extendFlat({},cfe,{yaxis:vfe})}}},layoutAttributes:kp(),handleDefaults:Dz(),calcAutorange:Pz(),draw:Fz(),isVisible:d5.isVisible,makeData:d5.makeData,autoMarginOpts:d5.autoMarginOpts}});var Pp=B((Gxe,Bz)=>{"use strict";var hfe=jt(),Oz=zn(),dfe=ot().templatedArray,pfe=dfe("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"});Bz.exports={visible:{valType:"boolean",editType:"plot"},buttons:pfe,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:hfe({editType:"plot"}),bgcolor:{valType:"color",dflt:Oz.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Oz.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var p5=B((Uxe,Yz)=>{"use strict";Yz.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Vz=B((Vxe,Uz)=>{"use strict";var Rp=Pe(),mfe=xr(),yfe=ot(),gfe=On(),Gz=Pp(),m5=p5();Uz.exports=function(r,t,a,n,i){var l=r.rangeselector||{},o=yfe.newContainer(t,"rangeselector");function s(d,p){return Rp.coerce(l,o,Gz,d,p)}var u=gfe(l,o,{name:"buttons",handleItemDefaults:xfe,calendar:i}),f=s("visible",u.length>0);if(f){var c=bfe(t,a,n);s("x",c[0]),s("y",c[1]),Rp.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Rp.coerceFont(s,"font",a.font);var h=s("bgcolor");s("activecolor",mfe.contrast(h,m5.lightAmount,m5.darkAmount)),s("bordercolor"),s("borderwidth")}};function xfe(e,r,t,a){var n=a.calendar;function i(s,u){return Rp.coerce(e,r,Gz.buttons,s,u)}var l=i("visible");if(l){var o=i("step");o!=="all"&&(n&&n!=="gregorian"&&(o==="month"||o==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function bfe(e,r,t){for(var a=t.filter(function(o){return r[o].anchor===e._id}),n=0,i=0;i{"use strict";var _fe=My(),wfe=Pe().titleCase;Wz.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=Tfe(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function Tfe(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=_fe["utc"+wfe(n)],l=r.count,o;switch(r.stepmode){case"backward":o=e.l2r(+i.offset(a,-l));break;case"todate":var s=i.offset(a,-l);o=e.l2r(+i.ceil(s));break}var u=t[1];return[o,u]}});var rN=B((Xxe,eN)=>{"use strict";var Np=kr(),Mfe=yr(),Afe=St(),Zz=xr(),jz=Br(),bl=Pe(),Jz=bl.strTranslate,zp=va(),kfe=Jt(),x5=Sa(),$z=x5.LINE_SPACING,Kz=x5.FROM_TL,Qz=x5.FROM_BR,g5=p5(),qfe=Xz();eN.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(Cfe(r),Lfe);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=Np.select(this),l=n,o=l.rangeselector,s=i.selectAll("g.button").data(bl.filterVisible(o.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Np.select(this),c=qfe(l,u);u._isActive=Sfe(l,u,c),f.call(y5,o,u),f.call(Efe,o,u,r),f.on("click",function(){r._dragged||Mfe.call("_guiRelayout",r,c)}),f.on("mouseover",function(){u._isHovered=!0,f.call(y5,o,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(y5,o,u)})}),Rfe(r,s,o,l._name,i)})};function Cfe(e){for(var r=kfe.list(e,"x",!0),t=[],a=0;a{"use strict";tN.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Pp()}}},layoutAttributes:Pp(),handleDefaults:Vz(),draw:rN()}});var fo=B(b5=>{"use strict";var nN=mt().extendFlat;b5.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",l={x:nN({},t,{}),y:nN({},t,{}),editType:e.editType};return e.noGridCell||(l.row={valType:"integer",min:0,dflt:0,editType:e.editType},l.column={valType:"integer",min:0,dflt:0,editType:e.editType}),l};b5.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],l=r.grid;if(l){var o=t("domain.column");o!==void 0&&(o{"use strict";var zfe=Pe(),Nfe=mu().counter,Ffe=fo().attributes,iN=wa().idRegex,Ife=ot(),_5={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:[Nfe("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[iN.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[iN.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:Ffe({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 Fp(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function Hfe(e,r){var t=e.grid||{},a=Fp(r,t,"x"),n=Fp(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),l=Array.isArray(a),o=Array.isArray(n),s=l&&a!==t.xaxes&&o&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(o&&(u=n.length),l&&(f=a.length));var c=Ife.newContainer(r,"grid");function h(A,k){return zfe.coerce(t,c,_5,A,k)}var d=h("rows",u),p=h("columns",f);if(!(d*p>1)){delete r.grid;return}if(!i&&!l&&!o){var y=h("pattern")==="independent";y&&(i=!0)}c._hasSubplotGrid=i;var m=h("roworder"),_=m==="top to bottom",b=i?.2:.1,T=i?.3:.1,x,M;s&&r._splomGridDflt&&(x=r._splomGridDflt.xside,M=r._splomGridDflt.yside),c._domains={x:lN("x",h,b,x,p),y:lN("y",h,T,M,d,_)}}function lN(e,r,t,a,n,i){var l=r(e+"gap",t),o=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=o[0],f=(o[1]-u)/(n-l),c=f*(1-l),h=0;h{"use strict";fN.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 hN=B((Qxe,vN)=>{"use strict";var cN=zr(),Bfe=yr(),Yfe=Pe(),Gfe=ot(),Ufe=w5();vN.exports=function(e,r,t,a){var n="error_"+a.axis,i=Gfe.newContainer(r,n),l=e[n]||{};function o(p,y){return Yfe.coerce(l,i,Ufe,p,y)}var s=l.array!==void 0||l.value!==void 0||l.type==="sqrt",u=o("visible",s);if(u!==!1){var f=o("type","array"in l?"data":"percent"),c=!0;f!=="sqrt"&&(c=o("symmetric",!((f==="data"?"arrayminus":"valueminus")in l))),f==="data"?(o("array"),o("traceref"),c||(o("arrayminus"),o("tracerefminus"))):(f==="percent"||f==="constant")&&(o("value"),c||o("valueminus"));var h="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&o(h,!(l.color||cN(l.thickness)||cN(l.width)))}(!a.inherit||!i[h])&&(o("color",t),o("thickness"),o("width",Bfe.traceIs(r,"gl3d")?0:4))}}});var T5=B((jxe,pN)=>{"use strict";pN.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var c=+n[f];return[c,c]};var i=r.arrayminus||[];return function(u,f){var c=+n[f],h=+i[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var l=dN(t,r.value),o=dN(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=l(u);return[f,f]}:function(u){return[o(u),l(u)]}}};function dN(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var gN=B((e5e,yN)=>{"use strict";var M5=zr(),Vfe=yr(),A5=$r(),Wfe=Pe(),Xfe=T5();yN.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var xN=kr(),co=zr(),Zfe=Br(),Jfe=_n();bN.exports=function(r,t,a,n){var i,l=a.xaxis,o=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(b){return b.id});var y=Jfe.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var m=xN.select(this).selectAll("g.errorbar").data(f,p);if(m.exit().remove(),!!f.length){h.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var _=m.enter().append("g").classed("errorbar",!0);s&&_.style("opacity",0).transition().duration(n.duration).style("opacity",1),Zfe.setClipUrl(m,a.layerClipId,r),m.each(function(b){var T=xN.select(this),x=$fe(b,l,o);if(!(y&&!b.vis)){var M,A=T.select("path.yerror");if(d.visible&&co(x.x)&&co(x.yh)&&co(x.ys)){var k=d.width;M="M"+(x.x-k)+","+x.yh+"h"+2*k+"m-"+k+",0V"+x.ys,x.noYS||(M+="m-"+k+",0h"+2*k),i=!A.size(),i?A=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(A=A.transition().duration(n.duration).ease(n.easing)),A.attr("d",M)}else A.remove();var L=T.select("path.xerror");if(h.visible&&co(x.y)&&co(x.xh)&&co(x.xs)){var D=(h.copy_ystyle?d:h).width;M="M"+x.xh+","+(x.y-D)+"v"+2*D+"m0,-"+D+"H"+x.xs,x.noXS||(M+="m0,-"+D+"v"+2*D),i=!L.size(),i?L=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(L=L.transition().duration(n.duration).ease(n.easing)),L.attr("d",M)}else L.remove()}})}})};function $fe(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),co(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),co(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var MN=B((t5e,TN)=>{"use strict";var Kfe=kr(),wN=xr();TN.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},l=Kfe.select(this);l.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(wN.stroke,n.color),i.copy_ystyle&&(i=n),l.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(wN.stroke,i.color)})}});var qN=B((a5e,kN)=>{"use strict";var Xv=Pe(),AN=ui().overrideAll,Zv=w5(),Ss={error_x:Xv.extendFlat({},Zv),error_y:Xv.extendFlat({},Zv)};delete Ss.error_x.copy_zstyle;delete Ss.error_y.copy_zstyle;delete Ss.error_y.copy_ystyle;var Jv={error_x:Xv.extendFlat({},Zv),error_y:Xv.extendFlat({},Zv),error_z:Xv.extendFlat({},Zv)};delete Jv.error_x.copy_ystyle;delete Jv.error_y.copy_ystyle;delete Jv.error_z.copy_ystyle;delete Jv.error_z.copy_zstyle;kN.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ss,bar:Ss,histogram:Ss,scatter3d:AN(Jv,"calc","nested"),scattergl:AN(Ss,"calc","nested")}},supplyDefaults:hN(),calc:gN(),makeComputeError:T5(),plot:_N(),style:MN(),hoverInfo:Qfe};function Qfe(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var LN=B((n5e,CN)=>{"use strict";CN.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 NN=B((i5e,zN)=>{"use strict";var vo=kr(),k5=Rn(),Hp=St(),SN=yr(),_l=$r(),Ip=mi(),jn=Pe(),Di=jn.strTranslate,RN=mt().extendFlat,q5=Kl(),Si=Br(),C5=xr(),jfe=Hc(),ece=va(),rce=Hn().flipScale,tce=sp(),ace=fp(),nce=bn(),L5=Sa(),DN=L5.LINE_SPACING,EN=L5.FROM_TL,PN=L5.FROM_BR,Mt=LN().cn;function ice(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+Mt.colorbar).data(lce(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(Mt.colorbar,!0),t.each(function(a){var n=vo.select(this);jn.ensureSingle(n,"rect",Mt.cbbg),jn.ensureSingle(n,"g",Mt.cbfills),jn.ensureSingle(n,"g",Mt.cblines),jn.ensureSingle(n,"g",Mt.cbaxis,function(l){l.classed(Mt.crisp,!0)}),jn.ensureSingle(n,"g",Mt.cbtitleunshift,function(l){l.append("g").classed(Mt.cbtitle,!0)}),jn.ensureSingle(n,"rect",Mt.cboutline);var i=oce(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&sce(n,a,e)}),t.exit().each(function(a){Hp.autoMargin(e,a._id)}).remove(),t.order()}function lce(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,l,o;function s(T){return RN(T,{_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 o.calc=="function"?o.calc(e,l,n):(n._fillgradient=i.reversescale?rce(i.colorscale):i.colorscale,n._zrange=[i[o.min],i[o.max]])}for(var f=0;f1){var te=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));ve*=te*jn.roundUp(W/te,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(ue.tick0=0)}ue.dtick=ve}ue.domain=a?[Q+p/x.h,Q+G-p/x.h]:[Q+d/x.w,Q+G-d/x.w],ue.setScale(),e.attr("transform",Di(Math.round(x.l),Math.round(x.t)));var X=e.select("."+Mt.cbtitleunshift).attr("transform",Di(-Math.round(x.l),-Math.round(x.t))),ye=ue.ticklabelposition,_e=ue.title.font.size,xe=e.select("."+Mt.cbaxis),Ie,ze=0,Re=0;function He(We,ie){var Ae={propContainer:ue,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:T._dfltTitle.colorbar,containerGroup:e.select("."+Mt.cbtitle)},Ce=We.charAt(0)==="h"?We.substr(1):"h"+We;e.selectAll("."+Ce+",."+Ce+"-math-group").remove(),jfe.draw(t,We,RN(Ae,ie||{}))}function Be(){if(a&&ke||!a&&!ke){var We,ie;L==="top"&&(We=d+x.l+Z*y,ie=p+x.t+K*(1-Q-G)+3+_e*.75),L==="bottom"&&(We=d+x.l+Z*y,ie=p+x.t+K*(1-Q)-3-_e*.25),L==="right"&&(ie=p+x.t+K*m+3+_e*.75,We=d+x.l+Z*Q),He(ue._id+"title",{attributes:{x:We,y:ie,"text-anchor":a?"start":"middle"}})}}function Fe(){if(a&&!ke||!a&&ke){var We=ue.position||0,ie=ue._offset+ue._length/2,Ae,Ce;if(L==="right")Ce=ie,Ae=x.l+Z*We+10+_e*(ue.showticklabels?1:.5);else if(Ae=ie,L==="bottom"&&(Ce=x.t+K*We+10+(ye.indexOf("inside")===-1?ue.tickfont.size:0)+(ue.ticks!=="intside"&&r.ticklen||0)),L==="top"){var cr=k.text.split("
").length;Ce=x.t+K*We+10-V-DN*_e*cr}He((a?"h":"v")+ue._id+"title",{avoid:{selection:vo.select(t).selectAll("g."+ue._id+"tick"),side:L,offsetTop:a?0:x.t,offsetLeft:a?x.l:0,maxShift:a?T.width:T.height},attributes:{x:Ae,y:Ce,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Ee(){if(!a&&!ke||a&&ke){var We=e.select("."+Mt.cbtitle),ie=We.select("text"),Ae=[-s/2,s/2],Ce=We.select(".h"+ue._id+"title-math-group").node(),cr=15.6;ie.node()&&(cr=parseInt(ie.node().style.fontSize,10)*DN);var tr;if(Ce?(tr=Si.bBox(Ce),Re=tr.width,ze=tr.height,ze>cr&&(Ae[1]-=(ze-cr)/2)):ie.node()&&!ie.classed(Mt.jsPlaceholder)&&(tr=Si.bBox(ie.node()),Re=tr.width,ze=tr.height),a){if(ze){if(ze+=5,L==="top")ue.domain[1]-=ze/x.h,Ae[1]*=-1;else{ue.domain[0]+=ze/x.h;var De=ece.lineCount(ie);Ae[1]+=(1-De)*cr}We.attr("transform",Di(Ae[0],Ae[1])),ue.setScale()}}else Re&&(L==="right"&&(ue.domain[0]+=(Re+_e/2)/x.w),We.attr("transform",Di(Ae[0],Ae[1])),ue.setScale())}e.selectAll("."+Mt.cbfills+",."+Mt.cblines).attr("transform",a?Di(0,Math.round(x.h*(1-ue.domain[1]))):Di(Math.round(x.w*ue.domain[0]),0)),xe.attr("transform",a?Di(0,Math.round(-x.t)):Di(Math.round(-x.l),0));var Le=e.select("."+Mt.cbfills).selectAll("rect."+Mt.cbfill).attr("style","").data(O);Le.enter().append("rect").classed(Mt.cbfill,!0).attr("style",""),Le.exit().remove();var Ye=D.map(ue.c2p).map(Math.round).sort(function(fr,lr){return fr-lr});Le.each(function(fr,lr){var Ne=[lr===0?D[0]:(O[lr]+O[lr-1])/2,lr===O.length-1?D[1]:(O[lr]+O[lr+1])/2].map(ue.c2p).map(Math.round);a&&(Ne[1]=jn.constrain(Ne[1]+(Ne[1]>Ne[0])?1:-1,Ye[0],Ye[1]));var ne=vo.select(this).attr(a?"x":"y",re).attr(a?"y":"x",vo.min(Ne)).attr(a?"width":"height",Math.max(V,2)).attr(a?"height":"width",Math.max(vo.max(Ne)-vo.min(Ne),2));if(r._fillgradient)Si.gradient(ne,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var fe=R(fr).replace("e-","");ne.attr("fill",k5(fe).toHexString())}});var Xe=e.select("."+Mt.cblines).selectAll("path."+Mt.cbline).data(A.color&&A.width?U:[]);Xe.enter().append("path").classed(Mt.cbline,!0),Xe.exit().remove(),Xe.each(function(fr){var lr=re,Ne=Math.round(ue.c2p(fr))+A.width/2%1;vo.select(this).attr("d","M"+(a?lr+","+Ne:Ne+","+lr)+(a?"h":"v")+V).call(Si.lineGroupStyle,A.width,P(fr),A.dash)}),xe.selectAll("g."+ue._id+"tick,path").remove();var Ge=re+V+(s||0)/2-(r.ticks==="outside"?1:0),Oe=_l.calcTicks(ue),$e=_l.getTickSigns(ue)[2];return _l.drawTicks(t,ue,{vals:ue.ticks==="inside"?_l.clipEnds(ue,Oe):Oe,layer:xe,path:_l.makeTickPath(ue,Ge,$e),transFn:_l.makeTransTickFn(ue)}),_l.drawLabels(t,ue,{vals:Oe,layer:xe,transFn:_l.makeTransTickLabelFn(ue),labelFns:_l.makeLabelFns(ue,Ge)})}function Je(){var We,ie=V+s/2;ye.indexOf("inside")===-1&&(We=Si.bBox(xe.node()),ie+=a?We.width:We.height),Ie=X.select("text");var Ae=0,Ce=a&&L==="top",cr=!a&&L==="right",tr=0;if(Ie.node()&&!Ie.classed(Mt.jsPlaceholder)){var De,Le=X.select(".h"+ue._id+"title-math-group").node();Le&&(a&&ke||!a&&!ke)?(We=Si.bBox(Le),Ae=We.width,De=We.height):(We=Si.bBox(X.node()),Ae=We.right-x.l-(a?re:ge),De=We.bottom-x.t-(a?ge:re),!a&&L==="top"&&(ie+=We.height,tr=We.height)),cr&&(Ie.attr("transform",Di(Ae/2+_e/2,0)),Ae*=2),ie=Math.max(ie,a?Ae:De)}var Ye=(a?d:p)*2+ie+u+s/2,Xe=0;!a&&k.text&&h==="bottom"&&m<=0&&(Xe=Ye/2,Ye+=Xe,tr+=Xe),T._hColorbarMoveTitle=Xe,T._hColorbarMoveCBTitle=tr;var Ge=u+s,Oe=(a?re:ge)-Ge/2-(a?d:0),$e=(a?ge:re)-(a?I:p+tr-Xe);e.select("."+Mt.cbbg).attr("x",Oe).attr("y",$e).attr(a?"width":"height",Math.max(Ye-Xe,2)).attr(a?"height":"width",Math.max(I+Ge,2)).call(C5.fill,f).call(C5.stroke,r.bordercolor).style("stroke-width",u);var fr=cr?Math.max(Ae-10,0):0;e.selectAll("."+Mt.cboutline).attr("x",(a?re:ge+d)+fr).attr("y",(a?ge+p-I:re)+(Ce?ze:0)).attr(a?"width":"height",Math.max(V,2)).attr(a?"height":"width",Math.max(I-(a?2*p+ze:2*d+fr),2)).call(C5.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var lr=a?se*Ye:0,Ne=a?0:(1-ce)*Ye-tr;if(lr=b?x.l-lr:-lr,Ne=_?x.t-Ne:-Ne,e.attr("transform",Di(lr,Ne)),!a&&(u||k5(f).getAlpha()&&!k5.equals(T.paper_bgcolor,f))){var ne=xe.selectAll("text"),fe=ne[0].length,Se=e.select("."+Mt.cbbg).node(),qe=Si.bBox(Se),ir=Si.getTranslate(e),vr=2;ne.each(function(Sn,Za){var ua=0,Ja=fe-1;if(Za===ua||Za===Ja){var gr=Si.bBox(this),ct=Si.getTranslate(this),Xr;if(Za===Ja){var bt=gr.right+ct.x,Lt=qe.right+ir.x+ge-u-vr+y;Xr=Lt-bt,Xr>0&&(Xr=0)}else if(Za===ua){var vt=gr.left+ct.x,_t=qe.left+ir.x+ge+u+vr;Xr=_t-vt,Xr<0&&(Xr=0)}Xr&&(fe<3?this.setAttribute("transform","translate("+Xr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var sr={},Ar=EN[c],Ur=PN[c],et=EN[h],Wr=PN[h],Nt=Ye-V;a?(i==="pixels"?(sr.y=m,sr.t=I*et,sr.b=I*Wr):(sr.t=sr.b=0,sr.yt=m+n*et,sr.yb=m-n*Wr),o==="pixels"?(sr.x=y,sr.l=Ye*Ar,sr.r=Ye*Ur):(sr.l=Nt*Ar,sr.r=Nt*Ur,sr.xl=y-l*Ar,sr.xr=y+l*Ur)):(i==="pixels"?(sr.x=y,sr.l=I*Ar,sr.r=I*Ur):(sr.l=sr.r=0,sr.xl=y+n*Ar,sr.xr=y-n*Ur),o==="pixels"?(sr.y=1-m,sr.t=Ye*et,sr.b=Ye*Wr):(sr.t=Nt*et,sr.b=Nt*Wr,sr.yt=m-l*et,sr.yb=m+l*Wr));var oa=r.y<.5?"b":"t",Na=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var sa={r:T.width-Oe-lr,l:Oe+sr.r,b:T.height-$e-Ne,t:$e+sr.b};b&&_?Hp.autoMargin(t,r._id,sr):b?t._fullLayout._reservedMargin[r._id][oa]=sa[oa]:_||a?t._fullLayout._reservedMargin[r._id][Na]=sa[Na]:t._fullLayout._reservedMargin[r._id][oa]=sa[oa]}return jn.syncOrAsync([Hp.previousPromises,Be,Ee,Fe,Hp.previousPromises,Je],t)}function sce(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,l,o,s;Ip.init({element:e.node(),gd:t,prepFn:function(){l=e.attr("transform"),q5(e)},moveFn:function(u,f){e.attr("transform",l+Di(u,f)),o=Ip.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Ip.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var c=Ip.getCursor(o,s,r.xanchor,r.yanchor);q5(e,c)},doneFn:function(){if(q5(e),o!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=o,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?SN.call("_guiRestyle",t,u,r._traceIndex):SN.call("_guiRelayout",t,u)}}})}function uce(e,r,t){var a=r._levels,n=[],i=[],l,o,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],c=1.001*t[1]-.001*t[0];for(o=0;o<1e5&&(l=a.start+o*u,!(u>0?l>=s:l<=s));o++)l>f&&l0?l>=s:l<=s));o++)l>t[0]&&l{"use strict";FN.exports={moduleType:"component",name:"colorbar",attributes:Jh(),supplyDefaults:Hg(),draw:NN().draw,hasColorbar:Eg()}});var ON=B((o5e,HN)=>{"use strict";HN.exports={moduleType:"component",name:"legend",layoutAttributes:N2(),supplyLayoutDefaults:H2(),draw:K2(),style:X2()}});var YN=B((s5e,BN)=>{"use strict";BN.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 UN=B((u5e,GN)=>{"use strict";GN.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var D5=B((f5e,ZN)=>{"use strict";var cce=yr(),XN=Pe(),S5=XN.extendFlat,VN=XN.extendDeep;function WN(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function vce(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}ZN.exports=function(r,t){var a,n=r.data,i=r.layout,l=VN([],n),o=VN({},i,WN(t.tileClass)),s=r._context||{};if(t.width&&(o.width=t.width),t.height&&(o.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){o.annotations=[];var u=Object.keys(o);for(a=0;a{"use strict";var hce=Nh().EventEmitter,dce=yr(),pce=Pe(),JN=gs(),mce=D5(),yce=W1(),gce=X1();function xce(e,r){var t=new hce,a=mce(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var o=JN.getDelay(n._fullLayout);setTimeout(function(){var s=yce(n),u=document.createElement("canvas");u.id=pce.randstr(),t=gce({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},o)}var l=JN.getRedrawFunc(n);return dce.call("_doPlot",n,a.data,a.layout,a.config).then(l).then(i).catch(function(o){t.emit("error",o)}),t}$N.exports=xce});var eF=B((v5e,jN)=>{"use strict";var QN=gs(),bce={getDelay:QN.getDelay,getRedrawFunc:QN.getRedrawFunc,clone:D5(),toSVG:W1(),svgToImg:X1(),toImage:KN(),downloadImage:px()};jN.exports=bce});var tF=B(wl=>{"use strict";wl.version=Q0().version;W4();N8();var _ce=yr(),$v=wl.register=_ce.register,P5=iD(),rF=Object.keys(P5);for(Op=0;Op{"use strict";aF.exports=tF()});var Yp=B((p5e,iF)=>{"use strict";iF.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Tl=B((m5e,uF)=>{"use strict";var qt=bi(),lF=di().axisHoverFormat,wce=_a().hovertemplateAttrs,Tce=_a().texttemplateAttrs,sF=Nc(),Mce=jt(),oF=Yp(),Ace=fi().pattern,Ds=mt().extendFlat,R5=Mce({editType:"calc",arrayOk:!0,colorEditType:"style"}),kce=qt.marker,qce=kce.line,Cce=Ds({},qce.width,{dflt:0}),Lce=Ds({width:Cce,editType:"calc"},sF("marker.line")),Sce=Ds({line:Lce,editType:"calc"},sF("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Ace,cornerradius:{valType:"any",editType:"calc"}});uF.exports={x:qt.x,x0:qt.x0,dx:qt.dx,y:qt.y,y0:qt.y0,dy:qt.dy,xperiod:qt.xperiod,yperiod:qt.yperiod,xperiod0:qt.xperiod0,yperiod0:qt.yperiod0,xperiodalignment:qt.xperiodalignment,yperiodalignment:qt.yperiodalignment,xhoverformat:lF("x"),yhoverformat:lF("y"),text:qt.text,texttemplate:Tce({editType:"plot"},{keys:oF.eventDataKeys}),hovertext:qt.hovertext,hovertemplate:wce({},{keys:oF.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Ds({},R5,{}),insidetextfont:Ds({},R5,{}),outsidetextfont:Ds({},R5,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Ds({},qt.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:Sce,offsetgroup:qt.offsetgroup,alignmentgroup:qt.alignmentgroup,selected:{marker:{opacity:qt.selected.marker.opacity,color:qt.selected.marker.color,editType:"style"},textfont:qt.selected.textfont,editType:"style"},unselected:{marker:{opacity:qt.unselected.marker.opacity,color:qt.unselected.marker.color,editType:"style"},textfont:qt.unselected.textfont,editType:"style"},zorder:qt.zorder}});var Gp=B((y5e,fF)=>{"use strict";fF.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 z5=B((g5e,hF)=>{"use strict";var Dce=xr(),cF=Hn().hasColorscale,vF=Ru(),Ece=Pe().coercePattern;hF.exports=function(r,t,a,n,i){var l=a("marker.color",n),o=cF(r,"marker");o&&vF(r,t,i,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Dce.defaultLine),cF(r,"marker.line")&&vF(r,t,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),Ece(a,"marker.pattern",l,o),a("selected.marker.color"),a("unselected.marker.color")}});var Ki=B((x5e,xF)=>{"use strict";var dF=zr(),Lf=Pe(),pF=xr(),Pce=yr(),Rce=Dv(),zce=_s(),Nce=z5(),Fce=ff(),mF=Tl(),Up=Lf.coerceFont;function Ice(e,r,t,a){function n(u,f){return Lf.coerce(e,r,mF,u,f)}var i=Rce(e,r,a,n);if(!i){r.visible=!1;return}zce(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var l=n("textposition");gF(e,r,a,n,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Nce(e,r,n,t,a);var o=(r.marker.line||{}).color,s=Pce.getComponentMethod("errorbars","supplyDefaults");s(e,r,o||pF.defaultLine,{axis:"y"}),s(e,r,o||pF.defaultLine,{axis:"x",inherit:"y"}),Lf.coerceSelectionMarkerOpacity(r,n)}function Hce(e,r){var t,a;function n(o,s){return Lf.coerce(a._input,a,mF,o,s)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&dF(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function gF(e,r,t,a,n,i){i=i||{};var l=i.moduleHasSelected!==!1,o=i.moduleHasUnselected!==!1,s=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,f=i.moduleHasTextangle!==!1,c=i.moduleHasInsideanchor!==!1,h=!!i.hasPathbar,d=Array.isArray(n)||n==="auto",p=d||n==="inside",y=d||n==="outside";if(p||y){var m=Up(a,"textfont",t.font),_=Lf.extendFlat({},m),b=e.textfont&&e.textfont.color,T=!b;if(T&&delete _.color,Up(a,"insidetextfont",_),h){var x=Lf.extendFlat({},m);T&&delete x.color,Up(a,"pathbar.textfont",x)}y&&Up(a,"outsidetextfont",m),l&&a("selected.textfont.color"),o&&a("unselected.textfont.color"),s&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}p&&c&&a("insidetextanchor")}xF.exports={supplyDefaults:Ice,crossTraceDefaults:Hce,handleText:gF,validateCornerradius:yF}});var N5=B((b5e,bF)=>{"use strict";var Oce=yr(),Bce=$r(),Yce=Pe(),Gce=Gp(),Uce=Ki().validateCornerradius;bF.exports=function(e,r,t){function a(y,m){return Yce.coerce(e,r,Gce,y,m)}for(var n=!1,i=!1,l=!1,o={},s=a("barmode"),u=s==="group",f=0;f0&&!o[h]&&(l=!0),o[h]=!0),c.visible&&c.type==="histogram"){var d=Bce.getFromId({_fullLayout:r},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",i&&!l?0:.2),a("bargroupgap");var p=a("barcornerradius");r.barcornerradius=Uce(p)}});var Vp=B((_5e,_F)=>{"use strict";var Sf=Pe();_F.exports=function(r,t){for(var a=0;a{"use strict";var wF=$r(),TF=ws(),MF=Hn().hasColorscale,AF=td(),Vce=Vp(),Wce=Ev();kF.exports=function(r,t){var a=wF.getFromId(r,t.xaxis||"x"),n=wF.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f,c={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(i=a.makeCalcdata(t,"x",c),o=n.makeCalcdata(t,"y"),s=TF(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y",c),o=a.makeCalcdata(t,"x"),s=TF(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;for(var h=Math.min(l.length,i.length),d=new Array(h),p=0;p{"use strict";var Xce=kr(),Zce=Pe();function Jce(e,r,t){var a=e._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var i=a.uniformtext.mode==="hide",l;switch(t){case"funnelarea":case"pie":case"sunburst":l="g.slice";break;case"treemap":case"icicle":l="g.slice, g.pathbar";break;default:l="g.points > g.point"}r.selectAll(l).each(function(o){var s=o.transform;if(s){s.scale=i&&s.hide?0:n/s.fontSize;var u=Xce.select(this).select("text");Zce.setTransormAndDisplay(u,s)}})}}function $ce(e,r,t){if(t.uniformtext.mode){var a=CF(e),n=t.uniformtext.minsize,i=r.scale*r.fontSize;r.hide=i{"use strict";var Qce=zr(),jce=Rn(),SF=Pe().isArrayOrTypedArray;Es.coerceString=function(e,r,t){if(typeof r=="string"){if(r||!e.noBlank)return r}else if((typeof r=="number"||r===!0)&&!e.strict)return String(r);return t!==void 0?t:e.dflt};Es.coerceNumber=function(e,r,t){if(Qce(r)){r=+r;var a=e.min,n=e.max,i=a!==void 0&&rn;if(!i)return r}return t!==void 0?t:e.dflt};Es.coerceColor=function(e,r,t){return jce(r).isValid()?r:t!==void 0?t:e.dflt};Es.coerceEnumerated=function(e,r,t){return e.coerceNumber&&(r=+r),e.values.indexOf(r)!==-1?r:t!==void 0?t:e.dflt};Es.getValue=function(e,r){var t;return SF(e)?r{"use strict";var Kv=kr(),eve=xr(),Qv=Br(),DF=Pe(),EF=yr(),PF=Ei().resizeText,F5=Tl(),rve=F5.textfont,tve=F5.insidetextfont,ave=F5.outsidetextfont,Aa=Wp();function nve(e){var r=Kv.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");PF(e,r,"bar");var t=r.size(),a=e._fullLayout;r.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(a.barmode==="stack"&&t>1||a.bargap===0&&a.bargroupgap===0&&!n[0].trace.marker.line.width)&&Kv.select(this).attr("shape-rendering","crispEdges")}),r.selectAll("g.points").each(function(n){var i=Kv.select(this),l=n[0].trace;RF(i,l,e)}),EF.getComponentMethod("errorbars","style")(r)}function RF(e,r,t){Qv.pointStyle(e.selectAll("path"),r,t),zF(e,r,t)}function zF(e,r,t){e.selectAll("text").each(function(a){var n=Kv.select(this),i=DF.ensureUniformFontSize(t,NF(n,a,r,t));Qv.font(n,i)})}function ive(e,r,t){var a=r[0].trace;a.selectedpoints?lve(t,a,e):(RF(t,a,e),EF.getComponentMethod("errorbars","style")(t))}function lve(e,r,t){Qv.selectedPointStyle(e.selectAll("path"),r),ove(e.selectAll("text"),r,t)}function ove(e,r,t){e.each(function(a){var n=Kv.select(this),i;if(a.selected){i=DF.ensureUniformFontSize(t,NF(n,a,r,t));var l=r.selected.textfont&&r.selected.textfont.color;l&&(i.color=l),Qv.font(n,i)}else Qv.selectedTextStyle(n,r)})}function NF(e,r,t,a){var n=a._fullLayout.font,i=t.textfont;if(e.classed("bartext-inside")){var l=OF(r,t);i=IF(t,r.i,n,l)}else e.classed("bartext-outside")&&(i=HF(t,r.i,n));return i}function FF(e,r,t){return I5(rve,e.textfont,r,t)}function IF(e,r,t,a){var n=FF(e,r,t),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[r]===void 0;return i&&(n={color:eve.contrast(a),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),I5(tve,e.insidetextfont,r,n)}function HF(e,r,t){var a=FF(e,r,t);return I5(ave,e.outsidetextfont,r,a)}function I5(e,r,t,a){r=r||{};var n=Aa.getValue(r.family,t),i=Aa.getValue(r.size,t),l=Aa.getValue(r.color,t),o=Aa.getValue(r.weight,t),s=Aa.getValue(r.style,t),u=Aa.getValue(r.variant,t),f=Aa.getValue(r.textcase,t),c=Aa.getValue(r.lineposition,t),h=Aa.getValue(r.shadow,t);return{family:Aa.coerceString(e.family,n,a.family),size:Aa.coerceNumber(e.size,i,a.size),color:Aa.coerceColor(e.color,l,a.color),weight:Aa.coerceString(e.weight,o,a.weight),style:Aa.coerceString(e.style,s,a.style),variant:Aa.coerceString(e.variant,u,a.variant),textcase:Aa.coerceString(e.variant,f,a.textcase),lineposition:Aa.coerceString(e.variant,c,a.lineposition),shadow:Aa.coerceString(e.variant,h,a.shadow)}}function OF(e,r){return r.type==="waterfall"?r[e.dir].marker.color:e.mcc||e.mc||r.marker.color}BF.exports={style:nve,styleTextPoints:zF,styleOnSelect:ive,getInsideTextFont:IF,getOutsideTextFont:HF,getBarColor:OF,resizeText:PF}});var Ef=B((k5e,JF)=>{"use strict";var Xp=kr(),Zp=zr(),da=Pe(),sve=va(),uve=xr(),po=Br(),fve=yr(),Jp=$r().tickText,YF=Ei(),cve=YF.recordMinTextSize,vve=YF.clearMinTextSize,H5=ho(),Df=Wp(),hve=Yp(),GF=Tl(),dve=GF.text,pve=GF.textposition,mve=Hi().appendArrayPointValue,Wa=hve.TEXTPAD;function yve(e){return e.id}function gve(e){if(e.ids)return yve}function O5(e){return(e>0)-(e<0)}function Qi(e,r){return e0}function bve(e,r,t,a,n,i){var l=r.xaxis,o=r.yaxis,s=e._fullLayout,u=e._context.staticPlot;n||(n={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},vve("bar",s));var f=da.makeTraceGroups(a,t,"trace bars").each(function(c){var h=Xp.select(this),d=c[0].trace,p=c[0].t,y=d.type==="waterfall",m=d.type==="funnel",_=d.type==="histogram",b=d.type==="bar",T=b||m,x=0;y&&d.connector.visible&&d.connector.mode==="between"&&(x=d.connector.line.width/2);var M=d.orientation==="h",A=VF(n),k=da.ensureSingle(h,"g","points"),L=gve(d),D=k.selectAll("g.point").data(da.identity,L);D.enter().append("g").classed("point",!0),D.exit().remove(),D.each(function(R,z){var H=Xp.select(this),O=xve(R,l,o,M),U=O[0][0],V=O[0][1],Y=O[1][0],I=O[1][1],G=(M?V-U:I-Y)===0;G&&T&&Df.getLineWidth(d,R)&&(G=!1),G||(G=!Zp(U)||!Zp(V)||!Zp(Y)||!Zp(I)),R.isBlank=G,G&&(M?V=U:I=Y),x&&!G&&(M?(U-=Qi(U,V)*x,V+=Qi(U,V)*x):(Y-=Qi(Y,I)*x,I+=Qi(Y,I)*x));var Z,K;if(d.type==="waterfall"){if(!G){var re=d[R.dir].marker;Z=re.line.width,K=re.color}}else Z=Df.getLineWidth(d,R),K=R.mc||d.marker.color;function se(ie){var Ae=Xp.round(Z/2%1,2);return n.gap===0&&n.groupgap===0?Xp.round(Math.round(ie)-Ae,2):ie}function ce(ie,Ae,Ce){return Ce&&ie===Ae?ie:Math.abs(ie-Ae)>=2?se(ie):ie>Ae?Math.ceil(ie):Math.floor(ie)}var le=uve.opacity(K),Q=le<1||Z>.01?se:ce;e._context.staticPlot||(U=Q(U,V,M),V=Q(V,U,M),Y=Q(Y,I,!M),I=Q(I,Y,!M));var ge=M?l.c2p:o.c2p,ue;R.s0>0?ue=R._sMax:R.s0<0?ue=R._sMin:ue=R.s1>0?R._sMax:R._sMin;function ke(ie,Ae){if(!ie)return 0;var Ce=Math.abs(M?I-Y:V-U),cr=Math.abs(M?V-U:I-Y),tr=Q(Math.abs(ge(ue,!0)-ge(0,!0))),De=R.hasB?Math.min(Ce/2,cr/2):Math.min(Ce/2,tr),Le;if(Ae==="%"){var Ye=Math.min(50,ie);Le=Ce*(Ye/100)}else Le=ie;return Q(Math.max(Math.min(Le,De),0))}var ve=b||_?ke(p.cornerradiusvalue,p.cornerradiusform):0,be,W,te="M"+U+","+Y+"V"+I+"H"+V+"V"+Y+"Z",X=0;if(ve&&R.s){var ye=O5(R.s0)===0||O5(R.s)===O5(R.s0)?R.s1:R.s0;if(X=Q(R.hasB?0:Math.abs(ge(ue,!0)-ge(ye,!0))),X0?Math.sqrt(X*(2*ve-X)):0,He=_e>0?Math.max:Math.min;be="M"+U+","+Y+"V"+(I-ze*xe)+"H"+He(V-(ve-X)*_e,U)+"A "+ve+","+ve+" 0 0 "+Ie+" "+V+","+(I-ve*xe-Re)+"V"+(Y+ve*xe+Re)+"A "+ve+","+ve+" 0 0 "+Ie+" "+He(V-(ve-X)*_e,U)+","+(Y+ze*xe)+"Z"}else if(R.hasB)be="M"+(U+ve*_e)+","+Y+"A "+ve+","+ve+" 0 0 "+Ie+" "+U+","+(Y+ve*xe)+"V"+(I-ve*xe)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(U+ve*_e)+","+I+"H"+(V-ve*_e)+"A "+ve+","+ve+" 0 0 "+Ie+" "+V+","+(I-ve*xe)+"V"+(Y+ve*xe)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(V-ve*_e)+","+Y+"Z";else{W=Math.abs(I-Y)+X;var Be=W0?Math.sqrt(X*(2*ve-X)):0,Ee=xe>0?Math.max:Math.min;be="M"+(U+Be*_e)+","+Y+"V"+Ee(I-(ve-X)*xe,Y)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(U+ve*_e-Fe)+","+I+"H"+(V-ve*_e+Fe)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(V-Be*_e)+","+Ee(I-(ve-X)*xe,Y)+"V"+Y+"Z"}}else be=te}else be=te;var Je=UF(da.ensureSingle(H,"path"),s,n,i);if(Je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((V-U)*(I-Y))||G&&e._context.staticPlot?"M0,0Z":be).call(po.setClipUrl,r.layerClipId,e),!s.uniformtext.mode&&A){var We=po.makePointStyleFns(d);po.singlePointStyle(R,Je,d,We,e)}_ve(e,r,H,c,z,U,V,Y,I,ve,X,n,i),r.layerClipId&&po.hideOutsideRangePoint(R,H.select("text"),l,o,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;po.setClipUrl(h,P?null:r.layerClipId,e)});fve.getComponentMethod("errorbars","plot")(e,f,r,n)}function _ve(e,r,t,a,n,i,l,o,s,u,f,c,h){var d=r.xaxis,p=r.yaxis,y=e._fullLayout,m;function _(W,te,X){var ye=da.ensureSingle(W,"text").text(te).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(po.font,X).call(sve.convertToTspans,e);return ye}var b=a[0].trace,T=b.orientation==="h",x=Mve(y,a,n,d,p);m=Ave(b,n);var M=c.mode==="stack"||c.mode==="relative",A=a[n],k=!M||A._outmost,L=A.hasB,D=u&&u-f>Wa;if(!x||m==="none"||(A.isBlank||i===l||o===s)&&(m==="auto"||m==="inside")){t.select("text").remove();return}var P=y.font,R=H5.getBarColor(a[n],b),z=H5.getInsideTextFont(b,n,P,R),H=H5.getOutsideTextFont(b,n,P),O=b.insidetextanchor||"end",U=t.datum();T?d.type==="log"&&U.s0<=0&&(d.range[0]0&&se>0,Q;D?L?Q=Ps(I-2*u,G,re,se,T)||Ps(I,G-2*u,re,se,T):T?Q=Ps(I-(u-f),G,re,se,T)||Ps(I,G-2*(u-f),re,se,T):Q=Ps(I,G-(u-f),re,se,T)||Ps(I-2*(u-f),G,re,se,T):Q=Ps(I,G,re,se,T),le&&Q?m="inside":(m="outside",Z.remove(),Z=null)}else m="inside";if(!Z){ce=da.ensureUniformFontSize(e,m==="outside"?H:z),Z=_(t,x,ce);var ge=Z.attr("transform");if(Z.attr("transform",""),K=po.bBox(Z.node()),re=K.width,se=K.height,Z.attr("transform",ge),re<=0||se<=0){Z.remove();return}}var ue=b.textangle,ke,ve;m==="outside"?(ve=b.constraintext==="both"||b.constraintext==="outside",ke=Tve(i,l,o,s,K,{isHorizontal:T,constrained:ve,angle:ue})):(ve=b.constraintext==="both"||b.constraintext==="inside",ke=ZF(i,l,o,s,K,{isHorizontal:T,constrained:ve,angle:ue,anchor:O,hasB:L,r:u,overhead:f})),ke.fontSize=ce.size,cve(b.type==="histogram"?"bar":b.type,ke,y),A.transform=ke;var be=UF(Z,y,c,h);da.setTransormAndDisplay(be,ke)}function Ps(e,r,t,a,n){if(e<0||r<0)return!1;var i=t<=e&&a<=r,l=t<=r&&a<=e,o=n?e>=t*(r/a):r>=a*(e/t);return i||l||o}function WF(e){return e==="auto"?0:e}function XF(e,r){var t=Math.PI/180*r,a=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t));return{x:e.width*n+e.height*a,y:e.width*a+e.height*n}}function ZF(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=i.anchor,f=u==="end",c=u==="start",h=i.leftToRight||0,d=(h+1)/2,p=1-d,y=i.hasB,m=i.r,_=i.overhead,b=n.width,T=n.height,x=Math.abs(r-e),M=Math.abs(a-t),A=x>2*Wa&&M>2*Wa?Wa:0;x-=2*A,M-=2*A;var k=WF(s);s==="auto"&&!(b<=x&&T<=M)&&(b>x||T>M)&&(!(b>M||T>x)||bWa){var R=wve(e,r,t,a,L,m,_,l,y);D=R.scale,P=R.pad}else D=1,o&&(D=Math.min(1,x/L.x,M/L.y)),P=0;var z=n.left*p+n.right*d,H=(n.top+n.bottom)/2,O=(e+Wa)*p+(r-Wa)*d,U=(t+a)/2,V=0,Y=0;if(c||f){var I=(l?L.x:L.y)/2;m&&(f||y)&&(A+=P);var G=l?Qi(e,r):Qi(t,a);l?c?(O=e+G*A,V=-G*I):(O=r-G*A,V=G*I):c?(U=t+G*A,Y=-G*I):(U=a-G*A,Y=G*I)}return{textX:z,textY:H,targetX:O,targetY:U,anchorX:V,anchorY:Y,scale:D,rotate:k}}function wve(e,r,t,a,n,i,l,o,s){var u=Math.max(0,Math.abs(r-e)-2*Wa),f=Math.max(0,Math.abs(a-t)-2*Wa),c=i-Wa,h=l?c-Math.sqrt(c*c-(c-l)*(c-l)):c,d=s?c*2:o?c-l:2*h,p=s?c*2:o?2*h:c-l,y,m,_,b,T;return n.y/n.x>=f/(u-d)?b=f/n.y:n.y/n.x<=(f-p)/u?b=u/n.x:!s&&o?(y=n.x*n.x+n.y*n.y/4,m=-2*n.x*(u-c)-n.y*(f/2-c),_=(u-c)*(u-c)+(f/2-c)*(f/2-c)-c*c,b=(-m+Math.sqrt(m*m-4*y*_))/(2*y)):s?(y=(n.x*n.x+n.y*n.y)/4,m=-n.x*(u/2-c)-n.y*(f/2-c),_=(u/2-c)*(u/2-c)+(f/2-c)*(f/2-c)-c*c,b=(-m+Math.sqrt(m*m-4*y*_))/(2*y)):(y=n.x*n.x/4+n.y*n.y,m=-n.x*(u/2-c)-2*n.y*(f-c),_=(u/2-c)*(u/2-c)+(f-c)*(f-c)-c*c,b=(-m+Math.sqrt(m*m-4*y*_))/(2*y)),b=Math.min(1,b),o?T=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-n.y*b)/2)*(c-(f-n.y*b)/2)))-l):T=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(u-n.x*b)/2)*(c-(u-n.x*b)/2)))-l),{scale:b,pad:T}}function Tve(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=n.width,f=n.height,c=Math.abs(r-e),h=Math.abs(a-t),d;l?d=h>2*Wa?Wa:0:d=c>2*Wa?Wa:0;var p=1;o&&(p=l?Math.min(1,h/f):Math.min(1,c/u));var y=WF(s),m=XF(n,y),_=(l?m.x:m.y)/2,b=(n.left+n.right)/2,T=(n.top+n.bottom)/2,x=(e+r)/2,M=(t+a)/2,A=0,k=0,L=l?Qi(r,e):Qi(t,a);return l?(x=r-L*d,A=L*_):(M=a+L*d,k=-L*_),{textX:b,textY:T,targetX:x,targetY:M,anchorX:A,anchorY:k,scale:p,rotate:y}}function Mve(e,r,t,a,n){var i=r[0].trace,l=i.texttemplate,o;return l?o=kve(e,r,t,a,n):i.textinfo?o=qve(r,t,a,n):o=Df.getValue(i.text,t),Df.coerceString(dve,o)}function Ave(e,r){var t=Df.getValue(e.textposition,r);return Df.coerceEnumerated(pve,t)}function kve(e,r,t,a,n){var i=r[0].trace,l=da.castOption(i,t,"texttemplate");if(!l)return"";var o=i.type==="histogram",s=i.type==="waterfall",u=i.type==="funnel",f=i.orientation==="h",c,h,d,p;f?(c="y",h=n,d="x",p=a):(c="x",h=a,d="y",p=n);function y(A){return Jp(h,h.c2l(A),!0).text}function m(A){return Jp(p,p.c2l(A),!0).text}var _=r[t],b={};b.label=_.p,b.labelLabel=b[c+"Label"]=y(_.p);var T=da.castOption(i,_.i,"text");(T===0||T)&&(b.text=T),b.value=_.s,b.valueLabel=b[d+"Label"]=m(_.s);var x={};mve(x,i,_.i),(o||x.x===void 0)&&(x.x=f?b.value:b.label),(o||x.y===void 0)&&(x.y=f?b.label:b.value),(o||x.xLabel===void 0)&&(x.xLabel=f?b.valueLabel:b.labelLabel),(o||x.yLabel===void 0)&&(x.yLabel=f?b.labelLabel:b.valueLabel),s&&(b.delta=+_.rawS||_.s,b.deltaLabel=m(b.delta),b.final=_.v,b.finalLabel=m(b.final),b.initial=b.final-b.delta,b.initialLabel=m(b.initial)),u&&(b.value=_.s,b.valueLabel=m(b.value),b.percentInitial=_.begR,b.percentInitialLabel=da.formatPercent(_.begR),b.percentPrevious=_.difR,b.percentPreviousLabel=da.formatPercent(_.difR),b.percentTotal=_.sumR,b.percenTotalLabel=da.formatPercent(_.sumR));var M=da.castOption(i,_.i,"customdata");return M&&(b.customdata=M),da.texttemplateString(l,b,e._d3locale,x,b,i._meta||{})}function qve(e,r,t,a){var n=e[0].trace,i=n.orientation==="h",l=n.type==="waterfall",o=n.type==="funnel";function s(M){var A=i?a:t;return Jp(A,M,!0).text}function u(M){var A=i?t:a;return Jp(A,+M,!0).text}var f=n.textinfo,c=e[r],h=f.split("+"),d=[],p,y=function(M){return h.indexOf(M)!==-1};if(y("label")&&d.push(s(e[r].p)),y("text")&&(p=da.castOption(n,c.i,"text"),(p===0||p)&&d.push(p)),l){var m=+c.rawS||c.s,_=c.v,b=_-m;y("initial")&&d.push(u(b)),y("delta")&&d.push(u(m)),y("final")&&d.push(u(_))}if(o){y("value")&&d.push(u(c.s));var T=0;y("percent initial")&&T++,y("percent previous")&&T++,y("percent total")&&T++;var x=T>1;y("percent initial")&&(p=da.formatPercent(c.begR),x&&(p+=" of initial"),d.push(p)),y("percent previous")&&(p=da.formatPercent(c.difR),x&&(p+=" of previous"),d.push(p)),y("percent total")&&(p=da.formatPercent(c.sumR),x&&(p+=" of total"),d.push(p))}return d.join("
")}JF.exports={plot:bve,toMoveInsideBar:ZF}});var e0=B((q5e,jF)=>{"use strict";var jv=gi(),Cve=yr(),$F=xr(),Lve=Pe().fillText,Sve=Wp().getLineWidth,B5=$r().hoverLabelText,Dve=wt().BADNUM;function Eve(e,r,t,a,n){var i=KF(e,r,t,a,n);if(i){var l=i.cd,o=l[0].trace,s=l[i.index];return i.color=QF(o,s),Cve.getComponentMethod("errorbars","hoverInfo")(s,o,i),[i]}}function KF(e,r,t,a,n){var i=e.cd,l=i[0].trace,o=i[0].t,s=a==="closest",u=l.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,h,d,p,y,m,_,b;l.orientation==="h"?(h=t,d=r,p="y",y="x",m=U,_=z):(h=r,d=t,p="x",y="y",_=U,m=z);var T=l[p+"period"],x=s||T;function M(Q){return k(Q,-1)}function A(Q){return k(Q,1)}function k(Q,ge){var ue=Q.w;return Q[p]+ge*ue/2}function L(Q){return Q[p+"End"]-Q[p+"Start"]}var D=s?M:T?function(Q){return Q.p-L(Q)/2}:function(Q){return Math.min(M(Q),Q.p-o.bardelta/2)},P=s?A:T?function(Q){return Q.p+L(Q)/2}:function(Q){return Math.max(A(Q),Q.p+o.bardelta/2)};function R(Q,ge,ue){return n.finiteRange&&(ue=0),jv.inbox(Q-h,ge-h,ue+Math.min(1,Math.abs(ge-Q)/b)-1)}function z(Q){return R(D(Q),P(Q),f)}function H(Q){return R(M(Q),A(Q),c)}function O(Q){var ge=Q[y];if(u){var ue=Math.abs(Q.rawS)||0;d>0?ge+=ue:d<0&&(ge-=ue)}return ge}function U(Q){var ge=d,ue=Q.b,ke=O(Q);return jv.inbox(ue-ge,ke-ge,f+(ke-ge)/(ke-ue)-1)}function V(Q){var ge=d,ue=Q.b,ke=O(Q);return jv.inbox(ue-ge,ke-ge,c+(ke-ge)/(ke-ue)-1)}var Y=e[p+"a"],I=e[y+"a"];b=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));function G(Q){return(m(Q)+_(Q))/2}var Z=jv.getDistanceFunction(a,m,_,G);if(jv.getClosest(i,Z,e),e.index!==!1&&i[e.index].p!==Dve){x||(D=function(Q){return Math.min(M(Q),Q.p-o.bargroupwidth/2)},P=function(Q){return Math.max(A(Q),Q.p+o.bargroupwidth/2)});var K=e.index,re=i[K],se=l.base?re.b+re.s:re.s;e[y+"0"]=e[y+"1"]=I.c2p(re[y],!0),e[y+"LabelVal"]=se;var ce=o.extents[o.extents.round(re.p)];e[p+"0"]=Y.c2p(s?D(re):ce[0],!0),e[p+"1"]=Y.c2p(s?P(re):ce[1],!0);var le=re.orig_p!==void 0;return e[p+"LabelVal"]=le?re.orig_p:re.p,e.labelLabel=B5(Y,e[p+"LabelVal"],l[p+"hoverformat"]),e.valueLabel=B5(I,e[y+"LabelVal"],l[y+"hoverformat"]),e.baseLabel=B5(I,re.b,l[y+"hoverformat"]),e.spikeDistance=(V(re)+H(re))/2,e[p+"Spike"]=Y.c2p(re.p,!0),Lve(re,l,e),e.hovertemplate=l.hovertemplate,e}}function QF(e,r){var t=r.mcc||e.marker.color,a=r.mlcc||e.marker.line.color,n=Sve(e,r);if($F.opacity(t))return t;if($F.opacity(a)&&n)return a}jF.exports={hoverPoints:Eve,hoverOnBars:KF,getTraceColor:QF}});var rI=B((C5e,eI)=>{"use strict";eI.exports=function(r,t,a){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),a.orientation==="h"?(r.label=r.y,r.value=r.x):(r.label=r.x,r.value=r.y),r}});var r0=B((L5e,tI)=>{"use strict";tI.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=a[0].trace,o=l.type==="funnel",s=l.orientation==="h",u=[],f;if(t===!1)for(f=0;f{"use strict";aI.exports={attributes:Tl(),layoutAttributes:Gp(),supplyDefaults:Ki().supplyDefaults,crossTraceDefaults:Ki().crossTraceDefaults,supplyLayoutDefaults:N5(),calc:qF(),crossTraceCalc:hf().crossTraceCalc,colorbar:np(),arraysToCalcdata:Vp(),plot:Ef().plot,style:ho().style,styleOnSelect:ho().styleOnSelect,hoverPoints:e0().hoverPoints,eventData:rI(),selectPoints:r0(),moduleType:"trace",name:"bar",basePlotModule:gl(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var lI=B((D5e,iI)=>{"use strict";iI.exports=nI()});var sI=B((E5e,oI)=>{"use strict";oI.exports=function(r,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var fI=B((P5e,uI)=>{"use strict";uI.exports={eventDataKeys:["binNumber"]}});var U5=B((R5e,hI)=>{"use strict";var pn=Tl(),cI=di().axisHoverFormat,Rve=_a().hovertemplateAttrs,zve=_a().texttemplateAttrs,Y5=jt(),vI=sI(),Nve=fI(),G5=mt().extendFlat;hI.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:cI("x"),yhoverformat:cI("y"),text:G5({},pn.text,{}),hovertext:G5({},pn.hovertext,{}),orientation:pn.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:vI("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:vI("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:Rve({},{keys:Nve.eventDataKeys}),texttemplate:zve({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:G5({},pn.textposition,{arrayOk:!1}),textfont:Y5({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:Y5({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:Y5({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:pn.insidetextanchor,textangle:pn.textangle,cliponaxis:pn.cliponaxis,constraintext:pn.constraintext,marker:pn.marker,offsetgroup:pn.offsetgroup,alignmentgroup:pn.alignmentgroup,selected:pn.selected,unselected:pn.unselected,zorder:pn.zorder}});var yI=B((z5e,mI)=>{"use strict";var dI=yr(),t0=Pe(),pI=xr(),Fve=Ki().handleText,Ive=z5(),Hve=U5();mI.exports=function(r,t,a,n){function i(b,T){return t0.coerce(r,t,Hve,b,T)}var l=i("x"),o=i("y"),s=i("cumulative.enabled");s&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");Fve(r,t,n,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat");var f=i("orientation",o&&!l?"h":"v"),c=f==="v"?"x":"y",h=f==="v"?"y":"x",d=l&&o?Math.min(t0.minRowLength(l)&&t0.minRowLength(o)):t0.minRowLength(t[c]||[]);if(!d){t.visible=!1;return}t._length=d;var p=dI.getComponentMethod("calendars","handleTraceDefaults");p(r,t,["x","y"],n);var y=t[h];y&&i("histfunc"),i("histnorm"),i("autobin"+c),Ive(r,t,i,a,n),t0.coerceSelectionMarkerOpacity(t,i);var m=(t.marker.line||{}).color,_=dI.getComponentMethod("errorbars","supplyDefaults");_(r,t,m||pI.defaultLine,{axis:"y"}),_(r,t,m||pI.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var _I=B((N5e,bI)=>{"use strict";var a0=Pe(),Ove=Jt(),$p=yr().traceIs,Bve=ff(),Yve=Ki().validateCornerradius,gI=a0.nestedProperty,V5=ys().getAxisGroup,xI=[{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"}],Gve=["x","y"];bI.exports=function(r,t){var a=t._histogramBinOpts={},n=[],i={},l=[],o,s,u,f,c,h,d;function p(U,V){return a0.coerce(o._input,o,o._module.attributes,U,V)}function y(U){return U.orientation==="v"?"x":"y"}function m(U,V){var Y=Ove.getFromTrace({_fullLayout:t},U,V);return Y.type}function _(U,V,Y){var I=U.uid+"__"+Y;V||(V=I);var G=m(U,Y),Z=U[Y+"calendar"]||"",K=a[V],re=!0;K&&(G===K.axType&&Z===K.calendar?(re=!1,K.traces.push(U),K.dirs.push(Y)):(V=I,G!==K.axType&&a0.warn(["Attempted to group the bins of trace",U.index,"set on a","type:"+G,"axis","with bins on","type:"+K.axType,"axis."].join(" ")),Z!==K.calendar&&a0.warn(["Attempted to group the bins of trace",U.index,"set with a",Z,"calendar","with bins",K.calendar?"on a "+K.calendar+" calendar":"w/o a set calendar"].join(" ")))),re&&(a[V]={traces:[U],dirs:[Y],axType:G,calendar:U[Y+"calendar"]||""}),U["_"+Y+"bingroup"]=V}for(c=0;c{"use strict";var Pf=zr();wI.exports={count:function(e,r,t){return t[e]++,1},sum:function(e,r,t,a){var n=a[r];return Pf(n)?(n=Number(n),t[e]+=n,n):0},avg:function(e,r,t,a,n){var i=a[r];return Pf(i)&&(i=Number(i),t[e]+=i,n[e]++),0},min:function(e,r,t,a){var n=a[r];if(Pf(n))if(n=Number(n),Pf(t[e])){if(t[e]>n){var i=n-t[e];return t[e]=n,i}}else return t[e]=n,n;return 0},max:function(e,r,t,a){var n=a[r];if(Pf(n))if(n=Number(n),Pf(t[e])){if(t[e]{"use strict";MI.exports={percent:function(e,r){for(var t=e.length,a=100/r,n=0;n{"use strict";kI.exports=function(r,t){for(var a=r.length,n=0,i=0;i{"use strict";var Rf=wt(),Rs=Rf.ONEAVGYEAR,CI=Rf.ONEAVGMONTH,Qp=Rf.ONEDAY,LI=Rf.ONEHOUR,SI=Rf.ONEMIN,DI=Rf.ONESEC,EI=$r().tickIncrement;zI.exports=function(r,t,a,n,i){var l=-1.1*t,o=-.1*t,s=r-o,u=a[0],f=a[1],c=Math.min(Kp(u+o,u+s,n,i),Kp(f+o,f+s,n,i)),h=Math.min(Kp(u+l,u+o,n,i),Kp(f+l,f+o,n,i)),d,p;if(c>h&&hQp){var y=d===Rs?1:6,m=d===Rs?"M12":"M1";return function(_,b){var T=n.c2d(_,Rs,i),x=T.indexOf("-",y);x>0&&(T=T.substr(0,x));var M=n.d2c(T,0,i);if(M<_){var A=EI(M,m,!1,i);(M+A)/2<_+r&&(M=A)}return b&&p?EI(M,m,!0,i):M}}return function(_,b){var T=d*Math.round(_/d);return T+d/10<_&&T+d*.9<_+r&&(T+=d),b&&p&&(T-=d),T}};function Kp(e,r,t,a){if(e*r<=0)return 1/0;for(var n=Math.abs(r-e),i=t.type==="date",l=PI(n,i),o=0;o<10;o++){var s=PI(l*80,i);if(l===s)break;if(Uve(s,e,r,i,t,a))l=s;else break}return l}function PI(e,r){return r&&e>DI?e>Qp?e>Rs*1.1?Rs:e>CI*1.1?CI:Qp:e>LI?LI:e>SI?SI:DI:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function Uve(e,r,t,a,n,i){if(a&&e>Qp){var l=RI(r,n,i),o=RI(t,n,i),s=e===Rs?0:1;return l[s]!==o[s]}return Math.floor(t/e)-Math.floor(r/e)>.1}function RI(e,r,t){var a=r.c2d(e,Rs,t).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}});var OI=B((B5e,HI)=>{"use strict";var W5=zr(),Xa=Pe(),FI=yr(),ei=$r(),Vve=Vp(),II=TI(),Wve=AI(),Xve=qI(),Zve=NI();function Jve(e,r){var t=[],a=[],n=r.orientation==="h",i=ei.getFromId(e,n?r.yaxis:r.xaxis),l=n?"y":"x",o={x:"y",y:"x"}[l],s=r[l+"calendar"],u=r.cumulative,f,c=X5(e,r,i,l),h=c[0],d=c[1],p=typeof h.size=="string",y=[],m=p?y:h,_=[],b=[],T=[],x=0,M=r.histnorm,A=r.histfunc,k=M.indexOf("density")!==-1,L,D,P;u.enabled&&k&&(M=M.replace(/ ?density$/,""),k=!1);var R=A==="max"||A==="min",z=R?null:0,H=II.count,O=Wve[M],U=!1,V=function(W){return i.r2c(W,0,s)},Y;for(Xa.isArrayOrTypedArray(r[o])&&A!=="count"&&(Y=r[o],U=A==="avg",H=II[A]),f=V(h.start),D=V(h.end)+(f-ei.tickIncrement(f,h.size,!1,s))/1e6;f=0&&P=ke;f--)if(a[f]){ve=f;break}for(f=ke;f<=ve;f++)if(W5(t[f])&&W5(a[f])){var be={p:t[f],s:a[f],b:0};u.enabled||(be.pts=T[f],K?be.ph0=be.ph1=T[f].length?d[T[f][0]]:t[f]:(r._computePh=!0,be.ph0=Q(y[f]),be.ph1=Q(y[f+1],!0))),ue.push(be)}return ue.length===1&&(ue[0].width1=ei.tickIncrement(ue[0].p,h.size,!1,s)-ue[0].p),Vve(ue,r),Xa.isArrayOrTypedArray(r.selectedpoints)&&Xa.tagSelected(ue,r,ce),ue}function X5(e,r,t,a,n){var i=a+"bins",l=e._fullLayout,o=r["_"+a+"bingroup"],s=l._histogramBinOpts[o],u=l.barmode==="overlay",f,c,h,d,p,y,m,_=function(le){return t.r2c(le,0,d)},b=function(le){return t.c2r(le,0,d)},T=t.type==="date"?function(le){return le||le===0?Xa.cleanDate(le,null,d):null}:function(le){return W5(le)?Number(le):null};function x(le,Q,ge){Q[le+"Found"]?(Q[le]=T(Q[le]),Q[le]===null&&(Q[le]=ge[le])):(y[le]=Q[le]=ge[le],Xa.nestedProperty(c[0],i+"."+le).set(ge[le]))}if(r["_"+a+"autoBinFinished"])delete r["_"+a+"autoBinFinished"];else{c=s.traces;var M=[],A=!0,k=!1,L=!1;for(f=0;ft.r2l(Y)&&(G=ei.tickIncrement(G,s.size,!0,d)),H.start=t.l2r(G),V||Xa.nestedProperty(r,i+".start").set(H.start)}var Z=s.end,K=t.r2l(z.end),re=K!==void 0;if((s.endFound||re)&&K!==t.r2l(Z)){var se=re?K:Xa.aggNums(Math.max,null,p);H.end=t.l2r(se),re||Xa.nestedProperty(r,i+".start").set(H.end)}var ce="autobin"+a;return r._input[ce]===!1&&(r._input[i]=Xa.extendFlat({},r[i]||{}),delete r._input[ce],delete r[ce]),[H,p]}function $ve(e,r,t,a,n){var i=e._fullLayout,l=Kve(e,r),o=!1,s=1/0,u=[r],f,c,h;for(f=0;f=0;a--)o(a);else if(r==="increasing"){for(a=1;a=0;a--)e[a]+=e[a+1];t==="exclude"&&(e.push(0),e.shift())}}HI.exports={calc:Jve,calcAllAutoBins:X5}});var YI=B((Y5e,BI)=>{"use strict";var jve=e0().hoverPoints,e0e=$r().hoverLabelText;BI.exports=function(r,t,a,n,i){var l=jve(r,t,a,n,i);if(l){r=l[0];var o=r.cd[r.index],s=r.cd[0].trace;if(!s.cumulative.enabled){var u=s.orientation==="h"?"y":"x";r[u+"Label"]=e0e(r[u+"a"],[o.ph0,o.ph1],s[u+"hoverformat"])}return l}}});var UI=B((G5e,GI)=>{"use strict";GI.exports=function(r,t,a,n,i){if(r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(r.z=t.zLabelVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),!(a.cumulative||{}).enabled){var l=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;r.pointNumbers=l,r.binNumber=r.pointNumber,delete r.pointNumber,delete r.pointIndex;var o;if(a._indexToPoints){o=[];for(var s=0;s{"use strict";VI.exports={attributes:U5(),layoutAttributes:Gp(),supplyDefaults:yI(),crossTraceDefaults:_I(),supplyLayoutDefaults:N5(),calc:OI().calc,crossTraceCalc:hf().crossTraceCalc,plot:Ef().plot,layerName:"barlayer",style:ho().style,styleOnSelect:ho().styleOnSelect,colorbar:np(),hoverPoints:YI(),selectPoints:r0(),eventData:UI(),moduleType:"trace",name:"histogram",basePlotModule:gl(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var ZI=B((V5e,XI)=>{"use strict";XI.exports=WI()});var $I=B((W5e,JI)=>{"use strict";JI.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var J5=B((X5e,jI)=>{"use strict";var pt=Tl(),Z5=bi().line,r0e=tn(),KI=di().axisHoverFormat,t0e=_a().hovertemplateAttrs,a0e=_a().texttemplateAttrs,QI=$I(),Ml=mt().extendFlat,n0e=xr();jI.exports={x:pt.x,x0:pt.x0,dx:pt.dx,y:pt.y,y0:pt.y0,dy:pt.dy,xperiod:pt.xperiod,yperiod:pt.yperiod,xperiod0:pt.xperiod0,yperiod0:pt.yperiod0,xperiodalignment:pt.xperiodalignment,yperiodalignment:pt.yperiodalignment,xhoverformat:KI("x"),yhoverformat:KI("y"),hovertext:pt.hovertext,hovertemplate:t0e({},{keys:QI.eventDataKeys}),hoverinfo:Ml({},r0e.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:a0e({editType:"plot"},{keys:QI.eventDataKeys.concat(["label","value"])}),text:pt.text,textposition:pt.textposition,insidetextanchor:Ml({},pt.insidetextanchor,{dflt:"middle"}),textangle:Ml({},pt.textangle,{dflt:0}),textfont:pt.textfont,insidetextfont:pt.insidetextfont,outsidetextfont:pt.outsidetextfont,constraintext:pt.constraintext,cliponaxis:pt.cliponaxis,orientation:Ml({},pt.orientation,{}),offset:Ml({},pt.offset,{arrayOk:!1}),width:Ml({},pt.width,{arrayOk:!1}),marker:i0e(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ml({},Z5.color,{dflt:n0e.defaultLine}),width:Ml({},Z5.width,{dflt:0,editType:"plot"}),dash:Z5.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:pt.offsetgroup,alignmentgroup:pt.alignmentgroup,zorder:pt.zorder};function i0e(){var e=Ml({},pt.marker);return delete e.pattern,delete e.cornerradius,e}});var $5=B((Z5e,eH)=>{"use strict";eH.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 Q5=B((J5e,tH)=>{"use strict";var jp=Pe(),l0e=ff(),o0e=Ki().handleText,s0e=Dv(),u0e=_s(),rH=J5(),K5=xr();function f0e(e,r,t,a){function n(c,h){return jp.coerce(e,r,rH,c,h)}var i=s0e(e,r,a,n);if(!i){r.visible=!1;return}u0e(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("orientation",r.y&&!r.x?"v":"h"),n("offset"),n("width");var l=n("text");n("hovertext"),n("hovertemplate");var o=n("textposition");o0e(e,r,a,n,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r.textposition!=="none"&&!r.texttemplate&&n("textinfo",jp.isArrayOrTypedArray(l)?"text+value":"value");var s=n("marker.color",t);n("marker.line.color",K5.defaultLine),n("marker.line.width");var u=n("connector.visible");if(u){n("connector.fillcolor",c0e(s));var f=n("connector.line.width");f&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function c0e(e){var r=jp.isArrayOrTypedArray(e)?"#000":e;return K5.addOpacity(r,.5*K5.opacity(r))}function v0e(e,r){var t,a;function n(l){return jp.coerce(a._input,a,rH,l)}for(var i=0;i{"use strict";var h0e=Pe(),d0e=$5();aH.exports=function(e,r,t){var a=!1;function n(o,s){return h0e.coerce(e,r,d0e,o,s)}for(var i=0;i{"use strict";var zf=Pe();iH.exports=function(r,t){for(var a=0;a{"use strict";var oH=$r(),sH=ws(),p0e=lH(),m0e=Ev(),n0=wt().BADNUM;uH.exports=function(r,t){var a=oH.getFromId(r,t.xaxis||"x"),n=oH.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f,c,h;t.orientation==="h"?(i=a.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=sH(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y"),o=a.makeCalcdata(t,"x"),s=sH(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;var d=Math.min(l.length,i.length),p=new Array(d);for(t._base=[],c=0;c{"use strict";var cH=hf().setGroupPositions;vH.exports=function(r,t){var a=r._fullLayout,n=r._fullData,i=r.calcdata,l=t.xaxis,o=t.yaxis,s=[],u=[],f=[],c,h;for(h=0;h{"use strict";var em=kr(),yo=Pe(),dH=Br(),mo=wt().BADNUM,y0e=Ef(),g0e=Ei().clearMinTextSize;mH.exports=function(r,t,a,n){var i=r._fullLayout;g0e("funnel",i),x0e(r,t,a,n),b0e(r,t,a,n),y0e.plot(r,t,a,n,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function x0e(e,r,t,a){var n=r.xaxis,i=r.yaxis;yo.makeTraceGroups(a,t,"trace bars").each(function(l){var o=em.select(this),s=l[0].trace,u=yo.ensureSingle(o,"g","regions");if(!s.connector||!s.connector.visible){u.remove();return}var f=s.orientation==="h",c=u.selectAll("g.region").data(yo.identity);c.enter().append("g").classed("region",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var y=pH(d,n,i,f),m=y[0],_=y[1],b="";m[0]!==mo&&_[0]!==mo&&m[1]!==mo&&_[1]!==mo&&m[2]!==mo&&_[2]!==mo&&m[3]!==mo&&_[3]!==mo&&(f?b+="M"+m[0]+","+_[1]+"L"+m[2]+","+_[2]+"H"+m[3]+"L"+m[1]+","+_[1]+"Z":b+="M"+m[1]+","+_[1]+"L"+m[2]+","+_[3]+"V"+_[2]+"L"+m[1]+","+_[0]+"Z"),b===""&&(b="M0,0Z"),yo.ensureSingle(em.select(this),"path").attr("d",b).call(dH.setClipUrl,r.layerClipId,e)}})})}function b0e(e,r,t,a){var n=r.xaxis,i=r.yaxis;yo.makeTraceGroups(a,t,"trace bars").each(function(l){var o=em.select(this),s=l[0].trace,u=yo.ensureSingle(o,"g","lines");if(!s.connector||!s.connector.visible||!s.connector.line.width){u.remove();return}var f=s.orientation==="h",c=u.selectAll("g.line").data(yo.identity);c.enter().append("g").classed("line",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var y=pH(d,n,i,f),m=y[0],_=y[1],b="";m[3]!==void 0&&_[3]!==void 0&&(f?(b+="M"+m[0]+","+_[1]+"L"+m[2]+","+_[2],b+="M"+m[1]+","+_[1]+"L"+m[3]+","+_[2]):(b+="M"+m[1]+","+_[1]+"L"+m[2]+","+_[3],b+="M"+m[1]+","+_[0]+"L"+m[2]+","+_[2])),b===""&&(b="M0,0Z"),yo.ensureSingle(em.select(this),"path").attr("d",b).call(dH.setClipUrl,r.layerClipId,e)}})})}function pH(e,r,t,a){var n=[],i=[],l=a?r:t,o=a?t:r;return n[0]=l.c2p(e.s0,!0),i[0]=o.c2p(e.p0,!0),n[1]=l.c2p(e.s1,!0),i[1]=o.c2p(e.p1,!0),n[2]=l.c2p(e.nextS0,!0),i[2]=o.c2p(e.nextP0,!0),n[3]=l.c2p(e.nextS1,!0),i[3]=o.c2p(e.nextP1,!0),a?[n,i]:[i,n]}});var bH=B((rbe,xH)=>{"use strict";var i0=kr(),gH=Br(),eb=xr(),_0e=pu().DESELECTDIM,w0e=ho(),T0e=Ei().resizeText,M0e=w0e.styleTextPoints;function A0e(e,r,t){var a=t||i0.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");T0e(e,a,"funnel"),a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=i0.select(this),l=n[0].trace;i.selectAll(".point > path").each(function(o){if(!o.isBlank){var s=l.marker;i0.select(this).call(eb.fill,o.mc||s.color).call(eb.stroke,o.mlc||s.line.color).call(gH.dashLine,s.line.dash,o.mlw||s.line.width).style("opacity",l.selectedpoints&&!o.selected?_0e:1)}}),M0e(i,l,e),i.selectAll(".regions").each(function(){i0.select(this).selectAll("path").style("stroke-width",0).call(eb.fill,l.connector.fillcolor)}),i.selectAll(".lines").each(function(){var o=l.connector.line;gH.lineGroupStyle(i0.select(this).selectAll("path"),o.width,o.color,o.dash)})})}xH.exports={style:A0e}});var TH=B((tbe,wH)=>{"use strict";var _H=xr().opacity,k0e=e0().hoverOnBars,rb=Pe().formatPercent;wH.exports=function(r,t,a,n,i){var l=k0e(r,t,a,n,i);if(l){var o=l.cd,s=o[0].trace,u=s.orientation==="h",f=l.index,c=o[f],h=u?"x":"y";l[h+"LabelVal"]=c.s,l.percentInitial=c.begR,l.percentInitialLabel=rb(c.begR,1),l.percentPrevious=c.difR,l.percentPreviousLabel=rb(c.difR,1),l.percentTotal=c.sumR,l.percentTotalLabel=rb(c.sumR,1);var d=c.hi||s.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var y=d==="all",m=d.split("+"),_=function(b){return y||m.indexOf(b)!==-1};_("percent initial")&&p.push(l.percentInitialLabel+" of initial"),_("percent previous")&&p.push(l.percentPreviousLabel+" of previous"),_("percent total")&&p.push(l.percentTotalLabel+" of total")}return l.extraText=p.join("
"),l.color=q0e(s,c),[l]}};function q0e(e,r){var t=e.marker,a=r.mc||t.color,n=r.mlc||t.line.color,i=r.mlw||t.line.width;if(_H(a))return a;if(_H(n)&&i)return n}});var AH=B((abe,MH)=>{"use strict";MH.exports=function(r,t){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(r.percentInitial=t.percentInitial),"percentPrevious"in t&&(r.percentPrevious=t.percentPrevious),"percentTotal"in t&&(r.percentTotal=t.percentTotal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r}});var qH=B((nbe,kH)=>{"use strict";kH.exports={attributes:J5(),layoutAttributes:$5(),supplyDefaults:Q5().supplyDefaults,crossTraceDefaults:Q5().crossTraceDefaults,supplyLayoutDefaults:nH(),calc:fH(),crossTraceCalc:hH(),plot:yH(),style:bH().style,hoverPoints:TH(),eventData:AH(),selectPoints:r0(),moduleType:"trace",name:"funnel",basePlotModule:gl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var LH=B((ibe,CH)=>{"use strict";CH.exports=qH()});var DH=B((lbe,SH)=>{"use strict";SH.exports={eventDataKeys:["initial","delta","final"]}});var nb=B((obe,RH)=>{"use strict";var ft=Tl(),tb=bi().line,C0e=tn(),EH=di().axisHoverFormat,L0e=_a().hovertemplateAttrs,S0e=_a().texttemplateAttrs,PH=DH(),Nf=mt().extendFlat,D0e=xr();function ab(e){return{marker:{color:Nf({},ft.marker.color,{arrayOk:!1,editType:"style"}),line:{color:Nf({},ft.marker.line.color,{arrayOk:!1,editType:"style"}),width:Nf({},ft.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}RH.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:ft.x,x0:ft.x0,dx:ft.dx,y:ft.y,y0:ft.y0,dy:ft.dy,xperiod:ft.xperiod,yperiod:ft.yperiod,xperiod0:ft.xperiod0,yperiod0:ft.yperiod0,xperiodalignment:ft.xperiodalignment,yperiodalignment:ft.yperiodalignment,xhoverformat:EH("x"),yhoverformat:EH("y"),hovertext:ft.hovertext,hovertemplate:L0e({},{keys:PH.eventDataKeys}),hoverinfo:Nf({},C0e.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:S0e({editType:"plot"},{keys:PH.eventDataKeys.concat(["label"])}),text:ft.text,textposition:ft.textposition,insidetextanchor:ft.insidetextanchor,textangle:ft.textangle,textfont:ft.textfont,insidetextfont:ft.insidetextfont,outsidetextfont:ft.outsidetextfont,constraintext:ft.constraintext,cliponaxis:ft.cliponaxis,orientation:ft.orientation,offset:ft.offset,width:ft.width,increasing:ab("increasing"),decreasing:ab("decreasing"),totals:ab("intermediate sums and total"),connector:{line:{color:Nf({},tb.color,{dflt:D0e.defaultLine}),width:Nf({},tb.width,{editType:"plot"}),dash:tb.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:ft.offsetgroup,alignmentgroup:ft.alignmentgroup,zorder:ft.zorder}});var ib=B((sbe,zH)=>{"use strict";zH.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 Ff=B((ube,NH)=>{"use strict";NH.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var ob=B((fbe,OH)=>{"use strict";var FH=Pe(),E0e=ff(),P0e=Ki().handleText,R0e=Dv(),z0e=_s(),IH=nb(),N0e=xr(),HH=Ff(),F0e=HH.INCREASING.COLOR,I0e=HH.DECREASING.COLOR,H0e="#4499FF";function lb(e,r,t){e(r+".marker.color",t),e(r+".marker.line.color",N0e.defaultLine),e(r+".marker.line.width")}function O0e(e,r,t,a){function n(u,f){return FH.coerce(e,r,IH,u,f)}var i=R0e(e,r,a,n);if(!i){r.visible=!1;return}z0e(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("measure"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var l=n("textposition");P0e(e,r,a,n,l,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r.textposition!=="none"&&(n("texttemplate"),r.texttemplate||n("textinfo")),lb(n,"increasing",F0e),lb(n,"decreasing",I0e),lb(n,"totals",H0e);var o=n("connector.visible");if(o){n("connector.mode");var s=n("connector.line.width");s&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function B0e(e,r){var t,a;function n(l){return FH.coerce(a._input,a,IH,l)}if(r.waterfallmode==="group")for(var i=0;i{"use strict";var Y0e=Pe(),G0e=ib();BH.exports=function(e,r,t){var a=!1;function n(o,s){return Y0e.coerce(e,r,G0e,o,s)}for(var i=0;i{"use strict";var GH=$r(),UH=ws(),VH=Pe().mergeArray,U0e=Ev(),WH=wt().BADNUM;function sb(e){return e==="a"||e==="absolute"}function ub(e){return e==="t"||e==="total"}XH.exports=function(r,t){var a=GH.getFromId(r,t.xaxis||"x"),n=GH.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f;t.orientation==="h"?(i=a.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=UH(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y"),o=a.makeCalcdata(t,"x"),s=UH(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;for(var c=Math.min(l.length,i.length),h=new Array(c),d=0,p,y=!1,m=0;m{"use strict";var JH=hf().setGroupPositions;$H.exports=function(r,t){var a=r._fullLayout,n=r._fullData,i=r.calcdata,l=t.xaxis,o=t.yaxis,s=[],u=[],f=[],c,h;for(h=0;h{"use strict";var QH=kr(),rm=Pe(),V0e=Br(),If=wt().BADNUM,W0e=Ef(),X0e=Ei().clearMinTextSize;jH.exports=function(r,t,a,n){var i=r._fullLayout;X0e("waterfall",i),W0e.plot(r,t,a,n,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),Z0e(r,t,a,n)};function Z0e(e,r,t,a){var n=r.xaxis,i=r.yaxis;rm.makeTraceGroups(a,t,"trace bars").each(function(l){var o=QH.select(this),s=l[0].trace,u=rm.ensureSingle(o,"g","lines");if(!s.connector||!s.connector.visible){u.remove();return}var f=s.orientation==="h",c=s.connector.mode,h=u.selectAll("g.line").data(rm.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,y){if(!(y!==d-1&&!p.cNext)){var m=J0e(p,n,i,f),_=m[0],b=m[1],T="";_[0]!==If&&b[0]!==If&&_[1]!==If&&b[1]!==If&&(c==="spanning"&&!p.isSum&&y>0&&(f?T+="M"+_[0]+","+b[1]+"V"+b[0]:T+="M"+_[1]+","+b[0]+"H"+_[0]),c!=="between"&&(p.isSum||y{"use strict";var tm=kr(),rO=Br(),tO=xr(),$0e=pu().DESELECTDIM,K0e=ho(),Q0e=Ei().resizeText,j0e=K0e.styleTextPoints;function ehe(e,r,t){var a=t||tm.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");Q0e(e,a,"waterfall"),a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=tm.select(this),l=n[0].trace;i.selectAll(".point > path").each(function(o){if(!o.isBlank){var s=l[o.dir].marker;tm.select(this).call(tO.fill,s.color).call(tO.stroke,s.line.color).call(rO.dashLine,s.line.dash,s.line.width).style("opacity",l.selectedpoints&&!o.selected?$0e:1)}}),j0e(i,l,e),i.selectAll(".lines").each(function(){var o=l.connector.line;rO.lineGroupStyle(tm.select(this).selectAll("path"),o.width,o.color,o.dash)})})}aO.exports={style:ehe}});var uO=B((mbe,sO)=>{"use strict";var rhe=$r().hoverLabelText,iO=xr().opacity,the=e0().hoverOnBars,lO=Ff(),oO={increasing:lO.INCREASING.SYMBOL,decreasing:lO.DECREASING.SYMBOL};sO.exports=function(r,t,a,n,i){var l=the(r,t,a,n,i);if(!l)return;var o=l.cd,s=o[0].trace,u=s.orientation==="h",f=u?"x":"y",c=u?r.xa:r.ya;function h(A){return rhe(c,A,s[f+"hoverformat"])}var d=l.index,p=o[d],y=p.isSum?p.b+p.s:p.rawS;l.initial=p.b+p.s-y,l.delta=y,l.final=l.initial+l.delta;var m=h(Math.abs(l.delta));l.deltaLabel=y<0?"("+m+")":m,l.finalLabel=h(l.final),l.initialLabel=h(l.initial);var _=p.hi||s.hoverinfo,b=[];if(_&&_!=="none"&&_!=="skip"){var T=_==="all",x=_.split("+"),M=function(A){return T||x.indexOf(A)!==-1};p.isSum||(M("final")&&(u?!M("x"):!M("y"))&&b.push(l.finalLabel),M("delta")&&(y<0?b.push(l.deltaLabel+" "+oO.decreasing):b.push(l.deltaLabel+" "+oO.increasing)),M("initial")&&b.push("Initial: "+l.initialLabel))}return b.length&&(l.extraText=b.join("
")),l.color=ahe(s,p),[l]};function ahe(e,r){var t=e[r.dir].marker,a=t.color,n=t.line.color,i=t.line.width;if(iO(a))return a;if(iO(n)&&i)return n}});var cO=B((ybe,fO)=>{"use strict";fO.exports=function(r,t){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"initial"in t&&(r.initial=t.initial),"delta"in t&&(r.delta=t.delta),"final"in t&&(r.final=t.final),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r}});var hO=B((gbe,vO)=>{"use strict";vO.exports={attributes:nb(),layoutAttributes:ib(),supplyDefaults:ob().supplyDefaults,crossTraceDefaults:ob().crossTraceDefaults,supplyLayoutDefaults:YH(),calc:ZH(),crossTraceCalc:KH(),plot:eO(),style:nO().style,hoverPoints:uO(),eventData:cO(),selectPoints:r0(),moduleType:"trace",name:"waterfall",basePlotModule:gl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var pO=B((xbe,dO)=>{"use strict";dO.exports=hO()});var nm=B((bbe,mO)=>{"use strict";var nhe=tn(),ihe=fo().attributes,lhe=jt(),ohe=zn(),she=_a().hovertemplateAttrs,uhe=_a().texttemplateAttrs,l0=mt().extendFlat,fhe=fi().pattern,am=lhe({editType:"plot",arrayOk:!0,colorEditType:"plot"});mO.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:ohe.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:fhe,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:l0({},nhe.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:she({},{keys:["label","color","value","percent","text"]}),texttemplate:uhe({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l0({},am,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l0({},am,{}),outsidetextfont:l0({},am,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l0({},am,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:ihe({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 im=B((_be,xO)=>{"use strict";var che=zr(),o0=Pe(),vhe=nm(),hhe=fo().defaults,dhe=Ki().handleText,phe=Pe().coercePattern;function yO(e,r){var t=o0.isArrayOrTypedArray(e),a=o0.isArrayOrTypedArray(r),n=Math.min(t?e.length:1/0,a?r.length:1/0);if(isFinite(n)||(n=0),n&&a){for(var i,l=0;l0){i=!0;break}}i||(n=0)}return{hasLabels:t,hasValues:a,len:n}}function gO(e,r,t,a,n){var i=a("marker.line.width");i&&a("marker.line.color",n?void 0:t.paper_bgcolor);var l=a("marker.colors");phe(a,"marker.pattern",l),e.marker&&!r.marker.pattern.fgcolor&&(r.marker.pattern.fgcolor=e.marker.colors),r.marker.pattern.bgcolor||(r.marker.pattern.bgcolor=t.paper_bgcolor)}function mhe(e,r,t,a){function n(b,T){return o0.coerce(e,r,vhe,b,T)}var i=n("labels"),l=n("values"),o=yO(i,l),s=o.len;if(r._hasLabels=o.hasLabels,r._hasValues=o.hasValues,!r._hasLabels&&r._hasValues&&(n("label0"),n("dlabel")),!s){r.visible=!1;return}r._length=s,gO(e,r,a,n,!0),n("scalegroup");var u=n("text"),f=n("texttemplate"),c;if(f||(c=n("textinfo",o0.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||c&&c!=="none"){var h=n("textposition");dhe(e,r,a,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else c==="none"&&n("textposition","none");hhe(r,a,n);var y=n("hole"),m=n("title.text");if(m){var _=n("title.position",y?"middle center":"top center");!y&&_==="middle center"&&(r.title.position="top center"),o0.coerceFont(n,"title.font",a.font)}n("sort"),n("direction"),n("rotation"),n("pull")}xO.exports={handleLabelsAndValues:yO,handleMarkerDefaults:gO,supplyDefaults:mhe}});var lm=B((wbe,bO)=>{"use strict";bO.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var wO=B((Tbe,_O)=>{"use strict";var yhe=Pe(),ghe=lm();_O.exports=function(r,t){function a(n,i){return yhe.coerce(r,t,ghe,n,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}});var om=B((Mbe,AO)=>{"use strict";var xhe=zr(),fb=Rn(),bhe=xr(),_he={};function whe(e,r){var t=[],a=e._fullLayout,n=a.hiddenlabels||[],i=r.labels,l=r.marker.colors||[],o=r.values,s=r._length,u=r._hasValues&&s,f,c;if(r.dlabel)for(i=new Array(s),f=0;f=0});var x=r.type==="funnelarea"?y:r.sort;return x&&t.sort(function(M,A){return A.v-M.v}),t[0]&&(t[0].vTotal=p),t}function TO(e){return function(t,a){return!t||(t=fb(t),!t.isValid())?!1:(t=bhe.addOpacity(t,t.getAlpha()),e[a]||(e[a]=t),t)}}function The(e,r){var t=(r||{}).type;t||(t="pie");var a=e._fullLayout,n=e.calcdata,i=a[t+"colorway"],l=a["_"+t+"colormap"];a["extend"+t+"colors"]&&(i=MO(i,_he));for(var o=0,s=0;s{"use strict";var Mhe=Hi().appendArrayMultiPointValues;kO.exports=function(r,t){var a={curveNumber:t.index,pointNumbers:r.pts,data:t._input,fullData:t,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return r.pts.length===1&&(a.pointNumber=a.i=r.pts[0]),Mhe(a,t,r.pts),t.type==="funnelarea"&&(delete a.v,delete a.i),a}});var hb=B((kbe,ZO)=>{"use strict";var mn=kr(),Ahe=St(),sm=gi(),PO=xr(),Al=Br(),ka=Pe(),khe=ka.strScale,CO=ka.strTranslate,cb=va(),RO=Ei(),qhe=RO.recordMinTextSize,Che=RO.clearMinTextSize,zO=Yp().TEXTPAD,Tr=$c(),um=qO(),LO=Pe().isValidTextValue;function Lhe(e,r){var t=e._context.staticPlot,a=e._fullLayout,n=a._size;Che("pie",a),IO(r,e),VO(r,n);var i=ka.makeTraceGroups(a._pielayer,r,"trace").each(function(l){var o=mn.select(this),s=l[0],u=s.trace;Ihe(l),o.attr("stroke-linejoin","round"),o.each(function(){var f=mn.select(this).selectAll("g.slice").data(l);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],h=!1;f.each(function(x,M){if(x.hidden){mn.select(this).selectAll("path,g").remove();return}x.pointNumber=x.i,x.curveNumber=u.index,c[x.pxmid[1]<0?0:1][x.pxmid[0]<0?0:1].push(x);var A=s.cx,k=s.cy,L=mn.select(this),D=L.selectAll("path.surface").data([x]);if(D.enter().append("path").classed("surface",!0).style({"pointer-events":t?"none":"all"}),L.call(NO,e,l),u.pull){var P=+Tr.castOption(u.pull,x.pts)||0;P>0&&(A+=P*x.pxmid[0],k+=P*x.pxmid[1])}x.cxFinal=A,x.cyFinal=k;function R(I,G,Z,K){var re=K*(G[0]-I[0]),se=K*(G[1]-I[1]);return"a"+K*s.r+","+K*s.r+" 0 "+x.largeArc+(Z?" 1 ":" 0 ")+re+","+se}var z=u.hole;if(x.v===s.vTotal){var H="M"+(A+x.px0[0])+","+(k+x.px0[1])+R(x.px0,x.pxmid,!0,1)+R(x.pxmid,x.px0,!0,1)+"Z";z?D.attr("d","M"+(A+z*x.px0[0])+","+(k+z*x.px0[1])+R(x.px0,x.pxmid,!1,z)+R(x.pxmid,x.px0,!1,z)+"Z"+H):D.attr("d",H)}else{var O=R(x.px0,x.px1,!0,1);if(z){var U=1-z;D.attr("d","M"+(A+z*x.px1[0])+","+(k+z*x.px1[1])+R(x.px1,x.px0,!1,z)+"l"+U*x.px0[0]+","+U*x.px0[1]+O+"Z")}else D.attr("d","M"+A+","+k+"l"+x.px0[0]+","+x.px0[1]+O+"Z")}WO(e,x,s);var V=Tr.castOption(u.textposition,x.pts),Y=L.selectAll("g.slicetext").data(x.text&&V!=="none"?[0]:[]);Y.enter().append("g").classed("slicetext",!0),Y.exit().remove(),Y.each(function(){var I=ka.ensureSingle(mn.select(this),"text","",function(Q){Q.attr("data-notex",1)}),G=ka.ensureUniformFontSize(e,V==="outside"?Dhe(u,x,a.font):FO(u,x,a.font));I.text(x.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Al.font,G).call(cb.convertToTspans,e);var Z=Al.bBox(I.node()),K;if(V==="outside")K=EO(Z,x);else if(K=HO(Z,x,s),V==="auto"&&K.scale<1){var re=ka.ensureUniformFontSize(e,u.outsidetextfont);I.call(Al.font,re),Z=Al.bBox(I.node()),K=EO(Z,x)}var se=K.textPosAngle,ce=se===void 0?x.pxmid:fm(s.r,se);if(K.targetX=A+ce[0]*K.rCenter+(K.x||0),K.targetY=k+ce[1]*K.rCenter+(K.y||0),XO(K,Z),K.outside){var le=K.targetY;x.yLabelMin=le-Z.height/2,x.yLabelMid=le,x.yLabelMax=le+Z.height/2,x.labelExtraX=0,x.labelExtraY=0,h=!0}K.fontSize=G.size,qhe(u.type,K,a),l[M].transform=K,ka.setTransormAndDisplay(I,K)})});var d=mn.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 x=ka.ensureSingle(mn.select(this),"text","",function(k){k.attr("data-notex",1)}),M=u.title.text;u._meta&&(M=ka.templateString(M,u._meta)),x.text(M).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Al.font,u.title.font).call(cb.convertToTspans,e);var A;u.title.position==="middle center"?A=Rhe(s):A=GO(s,n),x.attr("transform",CO(A.x,A.y)+khe(Math.min(1,A.scale))+CO(A.tx,A.ty))}),h&&Nhe(c,u),She(f,u),h&&u.automargin){var p=Al.bBox(o.node()),y=u.domain,m=n.w*(y.x[1]-y.x[0]),_=n.h*(y.y[1]-y.y[0]),b=(.5*m-s.r)/n.w,T=(.5*_-s.r)/n.h;Ahe.autoMargin(e,"pie."+u.uid+".automargin",{xl:y.x[0]-b,xr:y.x[1]+b,yb:y.y[0]-T,yt:y.y[1]+T,l:Math.max(s.cx-s.r-p.left,0),r:Math.max(p.right-(s.cx+s.r),0),b:Math.max(p.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var l=mn.select(this);l.attr("dy")&&l.attr("dy",l.attr("dy"))})},0)}function She(e,r){e.each(function(t){var a=mn.select(this);if(!t.labelExtraX&&!t.labelExtraY){a.select("path.textline").remove();return}var n=a.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,ka.setTransormAndDisplay(n,t.transform);var i=t.cxFinal+t.pxmid[0],l=t.cyFinal+t.pxmid[1],o="M"+i+","+l,s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var u=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(u)>Math.abs(f)?o+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+s):o+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+s}else o+="V"+(t.yLabelMid+t.labelExtraY)+"h"+s;ka.ensureSingle(a,"path","textline").call(PO.stroke,r.outsidetextfont.color).attr({"stroke-width":Math.min(2,r.outsidetextfont.size/8),d:o,fill:"none"})})}function NO(e,r,t){var a=t[0],n=a.cx,i=a.cy,l=a.trace,o=l.type==="funnelarea";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1),e.on("mouseover",function(s){var u=r._fullLayout,f=r._fullData[l.index];if(!(r._dragging||u.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=sm.castHoverinfo({hoverinfo:[Tr.castOption(c,s.pts)],_module:l._module},u,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var h=s.rInscribed||0,d=n+s.pxmid[0]*(1-h),p=i+s.pxmid[1]*(1-h),y=u.separators,m=[];if(c&&c.indexOf("label")!==-1&&m.push(s.label),s.text=Tr.castOption(f.hovertext||f.text,s.pts),c&&c.indexOf("text")!==-1){var _=s.text;ka.isValidTextValue(_)&&m.push(_)}s.value=s.v,s.valueLabel=Tr.formatPieValue(s.v,y),c&&c.indexOf("value")!==-1&&m.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Tr.formatPiePercent(s.percent,y),c&&c.indexOf("percent")!==-1&&m.push(s.percentLabel);var b=f.hoverlabel,T=b.font,x=[];sm.loneHover({trace:l,x0:d-h*a.r,x1:d+h*a.r,y:p,_x0:o?n+s.TL[0]:d-h*a.r,_x1:o?n+s.TR[0]:d+h*a.r,_y0:o?i+s.TL[1]:p-h*a.r,_y1:o?i+s.BL[1]:p+h*a.r,text:m.join("
"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:Tr.castOption(b.bgcolor,s.pts)||s.color,borderColor:Tr.castOption(b.bordercolor,s.pts),fontFamily:Tr.castOption(T.family,s.pts),fontSize:Tr.castOption(T.size,s.pts),fontColor:Tr.castOption(T.color,s.pts),nameLength:Tr.castOption(b.namelength,s.pts),textAlign:Tr.castOption(b.align,s.pts),hovertemplate:Tr.castOption(f.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[um(s,f)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:r,inOut_bbox:x}),s.bbox=x[0],l._hasHoverLabel=!0}l._hasHoverEvent=!0,r.emit("plotly_hover",{points:[um(s,f)],event:mn.event})}}),e.on("mouseout",function(s){var u=r._fullLayout,f=r._fullData[l.index],c=mn.select(this).datum();l._hasHoverEvent&&(s.originalEvent=mn.event,r.emit("plotly_unhover",{points:[um(c,f)],event:mn.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(sm.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1)}),e.on("click",function(s){var u=r._fullLayout,f=r._fullData[l.index];r._dragging||u.hovermode===!1||(r._hoverdata=[um(s,f)],sm.click(r,mn.event))})}function Dhe(e,r,t){var a=Tr.castOption(e.outsidetextfont.color,r.pts)||Tr.castOption(e.textfont.color,r.pts)||t.color,n=Tr.castOption(e.outsidetextfont.family,r.pts)||Tr.castOption(e.textfont.family,r.pts)||t.family,i=Tr.castOption(e.outsidetextfont.size,r.pts)||Tr.castOption(e.textfont.size,r.pts)||t.size,l=Tr.castOption(e.outsidetextfont.weight,r.pts)||Tr.castOption(e.textfont.weight,r.pts)||t.weight,o=Tr.castOption(e.outsidetextfont.style,r.pts)||Tr.castOption(e.textfont.style,r.pts)||t.style,s=Tr.castOption(e.outsidetextfont.variant,r.pts)||Tr.castOption(e.textfont.variant,r.pts)||t.variant,u=Tr.castOption(e.outsidetextfont.textcase,r.pts)||Tr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Tr.castOption(e.outsidetextfont.lineposition,r.pts)||Tr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Tr.castOption(e.outsidetextfont.shadow,r.pts)||Tr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a,family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:c}}function FO(e,r,t){var a=Tr.castOption(e.insidetextfont.color,r.pts);!a&&e._input.textfont&&(a=Tr.castOption(e._input.textfont.color,r.pts));var n=Tr.castOption(e.insidetextfont.family,r.pts)||Tr.castOption(e.textfont.family,r.pts)||t.family,i=Tr.castOption(e.insidetextfont.size,r.pts)||Tr.castOption(e.textfont.size,r.pts)||t.size,l=Tr.castOption(e.insidetextfont.weight,r.pts)||Tr.castOption(e.textfont.weight,r.pts)||t.weight,o=Tr.castOption(e.insidetextfont.style,r.pts)||Tr.castOption(e.textfont.style,r.pts)||t.style,s=Tr.castOption(e.insidetextfont.variant,r.pts)||Tr.castOption(e.textfont.variant,r.pts)||t.variant,u=Tr.castOption(e.insidetextfont.textcase,r.pts)||Tr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Tr.castOption(e.insidetextfont.lineposition,r.pts)||Tr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Tr.castOption(e.insidetextfont.shadow,r.pts)||Tr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a||PO.contrast(r.color),family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:c}}function IO(e,r){for(var t,a,n=0;n=-4;b-=2)_(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)_(Math.PI*(b+1),"tan")}if(c||d){for(b=4;b>=-4;b-=2)_(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)_(Math.PI*(b+.5),"rad")}}if(o||p||c){var T=Math.sqrt(e.width*e.width+e.height*e.height);if(m={scale:n*a*2/T,rCenter:1-n,rotate:0},m.textPosAngle=(r.startangle+r.stopangle)/2,m.scale>=1)return m;y.push(m)}(p||d)&&(m=SO(e,a,l,s,u),m.textPosAngle=(r.startangle+r.stopangle)/2,y.push(m)),(p||h)&&(m=DO(e,a,l,s,u),m.textPosAngle=(r.startangle+r.stopangle)/2,y.push(m));for(var x=0,M=0,A=0;A=1)break}return y[x]}function Ehe(e,r){var t=e.startangle,a=e.stopangle;return t>r&&r>a||t0?1:-1)/2,y:i/(1+t*t/(a*a)),outside:!0}}function Rhe(e){var r=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/r,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function GO(e,r){var t=1,a=1,n,i=e.trace,l={x:e.cx,y:e.cy},o={tx:0,ty:0};o.ty+=i.title.font.size,n=UO(i),i.title.position.indexOf("top")!==-1?(l.y-=(1+n)*e.r,o.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(l.y+=(1+n)*e.r);var s=zhe(e.r,e.trace.aspectratio),u=r.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+s,l.x-=(1+n)*s,o.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+s,l.x+=(1+n)*s,o.tx-=e.titleBox.width/2),t=u/e.titleBox.width,a=vb(e,r)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(t,a),tx:o.tx,ty:o.ty}}function zhe(e,r){return e/(r===void 0?1:r)}function vb(e,r){var t=e.trace,a=r.h*(t.domain.y[1]-t.domain.y[0]);return Math.min(e.titleBox.height,a/2)}function UO(e){var r=e.pull;if(!r)return 0;var t;if(ka.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function Nhe(e,r){var t,a,n,i,l,o,s,u,f,c,h,d,p;function y(T,x){return T.pxmid[1]-x.pxmid[1]}function m(T,x){return x.pxmid[1]-T.pxmid[1]}function _(T,x){x||(x={});var M=x.labelExtraY+(a?x.yLabelMax:x.yLabelMin),A=a?T.yLabelMin:T.yLabelMax,k=a?T.yLabelMax:T.yLabelMin,L=T.cyFinal+l(T.px0[1],T.px1[1]),D=M-A,P,R,z,H,O,U;if(D*s>0&&(T.labelExtraY=D),!!ka.isArrayOrTypedArray(r.pull))for(R=0;R=(Tr.castOption(r.pull,z.pts)||0))&&((T.pxmid[1]-z.pxmid[1])*s>0?(H=z.cyFinal+l(z.px0[1],z.px1[1]),D=H-A-T.labelExtraY,D*s>0&&(T.labelExtraY+=D)):(k+T.labelExtraY-L)*s>0&&(P=3*o*Math.abs(R-c.indexOf(T)),O=z.cxFinal+i(z.px0[0],z.px1[0]),U=O+P-(T.cxFinal+T.pxmid[0])-T.labelExtraX,U*o>0&&(T.labelExtraX+=U)))}for(a=0;a<2;a++)for(n=a?y:m,l=a?Math.max:Math.min,s=a?1:-1,t=0;t<2;t++){for(i=t?Math.max:Math.min,o=t?1:-1,u=e[a][t],u.sort(n),f=e[1-a][t],c=f.concat(u),d=[],h=0;h1?(u=t.r,f=u/n.aspectratio):(f=t.r,u=f*n.aspectratio),u*=(1+n.baseratio)/2,s=u*f}l=Math.min(l,s/t.vTotal)}for(a=0;ar.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/r.vTotal,.5),u.ring=1-a.hole,u.rInscribed=Phe(u,r))}function fm(e,r){return[e*Math.sin(r),-e*Math.cos(r)]}function WO(e,r,t){var a=e._fullLayout,n=t.trace,i=n.texttemplate,l=n.textinfo;if(!i&&l&&l!=="none"){var o=l.split("+"),s=function(x){return o.indexOf(x)!==-1},u=s("label"),f=s("text"),c=s("value"),h=s("percent"),d=a.separators,p;if(p=u?[r.label]:[],f){var y=Tr.getFirstFilled(n.text,r.pts);LO(y)&&p.push(y)}c&&p.push(Tr.formatPieValue(r.v,d)),h&&p.push(Tr.formatPiePercent(r.v/t.vTotal,d)),r.text=p.join("
")}function m(x){return{label:x.label,value:x.v,valueLabel:Tr.formatPieValue(x.v,a.separators),percent:x.v/t.vTotal,percentLabel:Tr.formatPiePercent(x.v/t.vTotal,a.separators),color:x.color,text:x.text,customdata:ka.castOption(n,x.i,"customdata")}}if(i){var _=ka.castOption(n,r.i,"texttemplate");if(!_)r.text="";else{var b=m(r),T=Tr.getFirstFilled(n.text,r.pts);(LO(T)||T==="")&&(b.text=T),r.text=ka.texttemplateString(_,b,e._fullLayout._d3locale,b,n._meta||{})}}}function XO(e,r){var t=e.rotate*Math.PI/180,a=Math.cos(t),n=Math.sin(t),i=(r.left+r.right)/2,l=(r.top+r.bottom)/2;e.textX=i*a-l*n,e.textY=i*n+l*a,e.noCenter=!0}ZO.exports={plot:Lhe,formatSliceLabel:WO,transformInsideText:HO,determineInsideTextFont:FO,positionTitleOutside:GO,prerenderTitles:IO,layoutAreas:VO,attachFxHandlers:NO,computeTransform:XO}});var KO=B((qbe,$O)=>{"use strict";var JO=kr(),Hhe=Uu(),Ohe=Ei().resizeText;$O.exports=function(r){var t=r._fullLayout._pielayer.selectAll(".trace");Ohe(r,t,"pie"),t.each(function(a){var n=a[0],i=n.trace,l=JO.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(o){JO.select(this).call(Hhe,o,i,r)})})}});var jO=B(Hf=>{"use strict";var QO=St();Hf.name="pie";Hf.plot=function(e,r,t,a){QO.plotBasePlot(Hf.name,e,r,t,a)};Hf.clean=function(e,r,t,a){QO.cleanBasePlot(Hf.name,e,r,t,a)}});var rB=B((Lbe,eB)=>{"use strict";eB.exports={attributes:nm(),supplyDefaults:im().supplyDefaults,supplyLayoutDefaults:wO(),layoutAttributes:lm(),calc:om().calc,crossTraceCalc:om().crossTraceCalc,plot:hb().plot,style:KO(),styleOne:Uu(),moduleType:"trace",name:"pie",basePlotModule:jO(),categories:["pie-like","pie","showLegend"],meta:{}}});var aB=B((Sbe,tB)=>{"use strict";tB.exports=rB()});var iB=B(Of=>{"use strict";var nB=St();Of.name="funnelarea";Of.plot=function(e,r,t,a){nB.plotBasePlot(Of.name,e,r,t,a)};Of.clean=function(e,r,t,a){nB.cleanBasePlot(Of.name,e,r,t,a)}});var db=B((Ebe,lB)=>{"use strict";var qa=nm(),Bhe=tn(),Yhe=fo().attributes,Ghe=_a().hovertemplateAttrs,Uhe=_a().texttemplateAttrs,zs=mt().extendFlat;lB.exports={labels:qa.labels,label0:qa.label0,dlabel:qa.dlabel,values:qa.values,marker:{colors:qa.marker.colors,line:{color:zs({},qa.marker.line.color,{dflt:null}),width:zs({},qa.marker.line.width,{dflt:1}),editType:"calc"},pattern:qa.marker.pattern,editType:"calc"},text:qa.text,hovertext:qa.hovertext,scalegroup:zs({},qa.scalegroup,{}),textinfo:zs({},qa.textinfo,{flags:["label","text","value","percent"]}),texttemplate:Uhe({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:zs({},Bhe.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:Ghe({},{keys:["label","color","value","text","percent"]}),textposition:zs({},qa.textposition,{values:["inside","none"],dflt:"inside"}),textfont:qa.textfont,insidetextfont:qa.insidetextfont,title:{text:qa.title.text,font:qa.title.font,position:zs({},qa.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:Yhe({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 pb=B((Pbe,oB)=>{"use strict";var Vhe=lm().hiddenlabels;oB.exports={hiddenlabels:Vhe,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var fB=B((Rbe,uB)=>{"use strict";var sB=Pe(),Whe=db(),Xhe=fo().defaults,Zhe=Ki().handleText,Jhe=im().handleLabelsAndValues,$he=im().handleMarkerDefaults;uB.exports=function(r,t,a,n){function i(y,m){return sB.coerce(r,t,Whe,y,m)}var l=i("labels"),o=i("values"),s=Jhe(l,o),u=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!u){t.visible=!1;return}t._length=u,$he(r,t,n,i),i("scalegroup");var f=i("text"),c=i("texttemplate"),h;if(c||(h=i("textinfo",Array.isArray(f)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||h&&h!=="none"){var d=i("textposition");Zhe(r,t,n,i,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&i("textposition","none");Xhe(t,n,i);var p=i("title.text");p&&(i("title.position"),sB.coerceFont(i,"title.font",n.font)),i("aspectratio"),i("baseratio")}});var vB=B((zbe,cB)=>{"use strict";var Khe=Pe(),Qhe=pb();cB.exports=function(r,t){function a(n,i){return Khe.coerce(r,t,Qhe,n,i)}a("hiddenlabels"),a("funnelareacolorway",t.colorway),a("extendfunnelareacolors")}});var mb=B((Nbe,dB)=>{"use strict";var hB=om();function jhe(e,r){return hB.calc(e,r)}function ede(e){hB.crossTraceCalc(e,{type:"funnelarea"})}dB.exports={calc:jhe,crossTraceCalc:ede}});var xB=B((Fbe,gB)=>{"use strict";var Ns=kr(),yb=Br(),go=Pe(),rde=go.strScale,pB=go.strTranslate,mB=va(),tde=Ef(),ade=tde.toMoveInsideBar,yB=Ei(),nde=yB.recordMinTextSize,ide=yB.clearMinTextSize,lde=$c(),Bf=hb(),ode=Bf.attachFxHandlers,sde=Bf.determineInsideTextFont,ude=Bf.layoutAreas,fde=Bf.prerenderTitles,cde=Bf.positionTitleOutside,vde=Bf.formatSliceLabel;gB.exports=function(r,t){var a=r._context.staticPlot,n=r._fullLayout;ide("funnelarea",n),fde(t,r),ude(t,n._size),go.makeTraceGroups(n._funnelarealayer,t,"trace").each(function(i){var l=Ns.select(this),o=i[0],s=o.trace;dde(i),l.each(function(){var u=Ns.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(c,h){if(c.hidden){Ns.select(this).selectAll("path,g").remove();return}c.pointNumber=c.i,c.curveNumber=s.index;var d=o.cx,p=o.cy,y=Ns.select(this),m=y.selectAll("path.surface").data([c]);m.enter().append("path").classed("surface",!0).style({"pointer-events":a?"none":"all"}),y.call(ode,r,i);var _="M"+(d+c.TR[0])+","+(p+c.TR[1])+gb(c.TR,c.BR)+gb(c.BR,c.BL)+gb(c.BL,c.TL)+"Z";m.attr("d",_),vde(r,c,o);var b=lde.castOption(s.textposition,c.pts),T=y.selectAll("g.slicetext").data(c.text&&b!=="none"?[0]:[]);T.enter().append("g").classed("slicetext",!0),T.exit().remove(),T.each(function(){var x=go.ensureSingle(Ns.select(this),"text","",function(z){z.attr("data-notex",1)}),M=go.ensureUniformFontSize(r,sde(s,c,n.font));x.text(c.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(yb.font,M).call(mB.convertToTspans,r);var A=yb.bBox(x.node()),k,L,D,P=Math.min(c.BL[1],c.BR[1])+p,R=Math.max(c.TL[1],c.TR[1])+p;L=Math.max(c.TL[0],c.BL[0])+d,D=Math.min(c.TR[0],c.BR[0])+d,k=ade(L,D,P,R,A,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),k.fontSize=M.size,nde(s.type,k,n),i[h].transform=k,go.setTransormAndDisplay(x,k)})});var f=Ns.select(this).selectAll("g.titletext").data(s.title.text?[0]:[]);f.enter().append("g").classed("titletext",!0),f.exit().remove(),f.each(function(){var c=go.ensureSingle(Ns.select(this),"text","",function(p){p.attr("data-notex",1)}),h=s.title.text;s._meta&&(h=go.templateString(h,s._meta)),c.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(yb.font,s.title.font).call(mB.convertToTspans,r);var d=cde(o,n._size);c.attr("transform",pB(d.x,d.y)+rde(Math.min(1,d.scale))+pB(d.tx,d.ty))})})})};function gb(e,r){var t=r[0]-e[0],a=r[1]-e[1];return"l"+t+","+a}function hde(e,r){return[.5*(e[0]+r[0]),.5*(e[1]+r[1])]}function dde(e){if(!e.length)return;var r=e[0],t=r.trace,a=t.aspectratio,n=t.baseratio;n>.999&&(n=.999);var i=Math.pow(n,2),l=r.vTotal,o=l*i/(1-i),s=l,u=o/l;function f(){var H=Math.sqrt(u);return{x:H,y:-H}}function c(){var H=f();return[H.x,H.y]}var h,d=[];d.push(c());var p,y;for(p=e.length-1;p>-1;p--)if(y=e[p],!y.hidden){var m=y.v/s;u+=m,d.push(c())}var _=1/0,b=-1/0;for(p=0;p-1;p--)if(y=e[p],!y.hidden){P+=1;var R=d[P][0],z=d[P][1];y.TL=[-R,z],y.TR=[R,z],y.BL=L,y.BR=D,y.pxmid=hde(y.TR,y.BR),L=y.TL,D=y.TR}}});var wB=B((Ibe,_B)=>{"use strict";var bB=kr(),pde=Uu(),mde=Ei().resizeText;_B.exports=function(r){var t=r._fullLayout._funnelarealayer.selectAll(".trace");mde(r,t,"funnelarea"),t.each(function(a){var n=a[0],i=n.trace,l=bB.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(o){bB.select(this).call(pde,o,i,r)})})}});var MB=B((Hbe,TB)=>{"use strict";TB.exports={moduleType:"trace",name:"funnelarea",basePlotModule:iB(),categories:["pie-like","funnelarea","showLegend"],attributes:db(),layoutAttributes:pb(),supplyDefaults:fB(),supplyLayoutDefaults:vB(),calc:mb().calc,crossTraceCalc:mb().crossTraceCalc,plot:xB(),style:wB(),styleOne:Uu(),meta:{}}});var kB=B((Obe,AB)=>{"use strict";AB.exports=MB()});var CB=B(Yf=>{"use strict";var qB=St();Yf.name="indicator";Yf.plot=function(e,r,t,a){qB.plotBasePlot(Yf.name,e,r,t,a)};Yf.clean=function(e,r,t,a){qB.cleanBasePlot(Yf.name,e,r,t,a)}});var bb=B((Ybe,RB)=>{"use strict";var xo=mt().extendFlat,SB=mt().extendDeep,yde=ui().overrideAll,DB=jt(),EB=zn(),gde=fo().attributes,Ct=bn(),xde=ot().templatedArray,cm=Ff(),LB=di().descriptionOnlyNumbers,xb=DB({editType:"plot",colorEditType:"plot"}),s0={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:EB.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"},PB={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},bde=xde("step",SB({},s0,{range:PB}));RB.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:gde({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:xo({},xb,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:LB("value")},font:xo({},xb,{}),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:LB("value")},increasing:{symbol:{valType:"string",dflt:cm.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:cm.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:cm.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:cm.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:xo({},xb,{}),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:SB({},s0,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:EB.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:yde({range:PB,visible:xo({},Ct.visible,{dflt:!0}),tickmode:Ct.minor.tickmode,nticks:Ct.nticks,tick0:Ct.tick0,dtick:Ct.dtick,tickvals:Ct.tickvals,ticktext:Ct.ticktext,ticks:xo({},Ct.ticks,{dflt:"outside"}),ticklen:Ct.ticklen,tickwidth:Ct.tickwidth,tickcolor:Ct.tickcolor,ticklabelstep:Ct.ticklabelstep,showticklabels:Ct.showticklabels,labelalias:Ct.labelalias,tickfont:DB({}),tickangle:Ct.tickangle,tickformat:Ct.tickformat,tickformatstops:Ct.tickformatstops,tickprefix:Ct.tickprefix,showtickprefix:Ct.showtickprefix,ticksuffix:Ct.ticksuffix,showticksuffix:Ct.showticksuffix,separatethousands:Ct.separatethousands,exponentformat:Ct.exponentformat,minexponent:Ct.minexponent,showexponent:Ct.showexponent,editType:"plot"},"plot"),steps:bde,threshold:{line:{color:xo({},s0.line.color,{}),width:xo({},s0.line.width,{dflt:1}),editType:"plot"},thickness:xo({},s0.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var _b=B((Gbe,zB)=>{"use strict";zB.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var IB=B((Ube,FB)=>{"use strict";var ji=Pe(),hm=bb(),_de=fo().defaults,NB=ot(),wde=On(),vm=_b(),Tde=Kh(),Mde=Qh(),Ade=ed(),kde=rd();function qde(e,r,t,a){function n(A,k){return ji.coerce(e,r,hm,A,k)}_de(r,a,n),n("mode"),r._hasNumber=r.mode.indexOf("number")!==-1,r._hasDelta=r.mode.indexOf("delta")!==-1,r._hasGauge=r.mode.indexOf("gauge")!==-1;var i=n("value");r._range=[0,typeof i=="number"?1.5*i:1];var l=new Array(2),o;if(r._hasNumber){n("number.valueformat");var s=ji.extendFlat({},a.font);s.size=void 0,ji.coerceFont(n,"number.font",s),r.number.font.size===void 0&&(r.number.font.size=vm.defaultNumberFontSize,l[0]=!0),n("number.prefix"),n("number.suffix"),o=r.number.font.size}var u;if(r._hasDelta){var f=ji.extendFlat({},a.font);f.size=void 0,ji.coerceFont(n,"delta.font",f),r.delta.font.size===void 0&&(r.delta.font.size=(r._hasNumber?.5:1)*(o||vm.defaultNumberFontSize),l[1]=!0),n("delta.reference",r.value),n("delta.relative"),n("delta.valueformat",r.delta.relative?"2%":""),n("delta.increasing.symbol"),n("delta.increasing.color"),n("delta.decreasing.symbol"),n("delta.decreasing.color"),n("delta.position"),n("delta.prefix"),n("delta.suffix"),u=r.delta.font.size}r._scaleNumbers=(!r._hasNumber||l[0])&&(!r._hasDelta||l[1])||!1;var c=ji.extendFlat({},a.font);c.size=.25*(o||u||vm.defaultNumberFontSize),ji.coerceFont(n,"title.font",c),n("title.text");var h,d,p,y;function m(A,k){return ji.coerce(h,d,hm.gauge,A,k)}function _(A,k){return ji.coerce(p,y,hm.gauge.axis,A,k)}if(r._hasGauge){h=e.gauge,h||(h={}),d=NB.newContainer(r,"gauge"),m("shape");var b=r._isBullet=r.gauge.shape==="bullet";b||n("title.align","center");var T=r._isAngular=r.gauge.shape==="angular";T||n("align","center"),m("bgcolor",a.paper_bgcolor),m("borderwidth"),m("bordercolor"),m("bar.color"),m("bar.line.color"),m("bar.line.width");var x=vm.valueThickness*(r.gauge.shape==="bullet"?.5:1);m("bar.thickness",x),wde(h,d,{name:"steps",handleItemDefaults:Cde}),m("threshold.value"),m("threshold.thickness"),m("threshold.line.width"),m("threshold.line.color"),p={},h&&(p=h.axis||{}),y=NB.newContainer(d,"axis"),_("visible"),r._range=_("range",r._range);var M={font:a.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};Tde(p,y,_,"linear"),kde(p,y,_,"linear",M),Ade(p,y,_,"linear",M),Mde(p,y,_,M)}else n("title.align","center"),n("align","center"),r._isAngular=r._isBullet=!1;r._length=null}function Cde(e,r){function t(a,n){return ji.coerce(e,r,hm.gauge.steps,a,n)}t("color"),t("line.color"),t("line.width"),t("range"),t("thickness")}FB.exports={supplyDefaults:qde}});var OB=B((Vbe,HB)=>{"use strict";function Lde(e,r){var t=[],a=r.value;typeof r._lastValue!="number"&&(r._lastValue=r.value);var n=r._lastValue,i=n;return r._hasDelta&&typeof r.delta.reference=="number"&&(i=r.delta.reference),t[0]={y:a,lastY:n,delta:a-i,relativeDelta:(a-i)/i},t}HB.exports={calc:Lde}});function kl(e,r,t){e.prototype=r.prototype=t,t.constructor=e}function bo(e,r){var t=Object.create(e.prototype);for(var a in r)t[a]=r[a];return t}var dm=nt(()=>{});function rl(){}function YB(){return this.rgb().formatHex()}function Fde(){return this.rgb().formatHex8()}function Ide(){return JB(this).formatHsl()}function GB(){return this.rgb().formatRgb()}function wo(e){var r,t;return e=(e+"").trim().toLowerCase(),(r=Sde.exec(e))?(t=r[1].length,r=parseInt(r[1],16),t===6?UB(r):t===3?new la(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):t===8?pm(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):t===4?pm(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=Dde.exec(e))?new la(r[1],r[2],r[3],1):(r=Ede.exec(e))?new la(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Pde.exec(e))?pm(r[1],r[2],r[3],r[4]):(r=Rde.exec(e))?pm(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=zde.exec(e))?XB(r[1],r[2]/100,r[3]/100,1):(r=Nde.exec(e))?XB(r[1],r[2]/100,r[3]/100,r[4]):BB.hasOwnProperty(e)?UB(BB[e]):e==="transparent"?new la(NaN,NaN,NaN,0):null}function UB(e){return new la(e>>16&255,e>>8&255,e&255,1)}function pm(e,r,t,a){return a<=0&&(e=r=t=NaN),new la(e,r,t,a)}function f0(e){return e instanceof rl||(e=wo(e)),e?(e=e.rgb(),new la(e.r,e.g,e.b,e.opacity)):new la}function Uf(e,r,t,a){return arguments.length===1?f0(e):new la(e,r,t,a==null?1:a)}function la(e,r,t,a){this.r=+e,this.g=+r,this.b=+t,this.opacity=+a}function VB(){return`#${Fs(this.r)}${Fs(this.g)}${Fs(this.b)}`}function Hde(){return`#${Fs(this.r)}${Fs(this.g)}${Fs(this.b)}${Fs((isNaN(this.opacity)?1:this.opacity)*255)}`}function WB(){let e=ym(this.opacity);return`${e===1?"rgb(":"rgba("}${Is(this.r)}, ${Is(this.g)}, ${Is(this.b)}${e===1?")":`, ${e})`}`}function ym(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Is(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fs(e){return e=Is(e),(e<16?"0":"")+e.toString(16)}function XB(e,r,t,a){return a<=0?e=r=t=NaN:t<=0||t>=1?e=r=NaN:r<=0&&(e=NaN),new Pi(e,r,t,a)}function JB(e){if(e instanceof Pi)return new Pi(e.h,e.s,e.l,e.opacity);if(e instanceof rl||(e=wo(e)),!e)return new Pi;if(e instanceof Pi)return e;e=e.rgb();var r=e.r/255,t=e.g/255,a=e.b/255,n=Math.min(r,t,a),i=Math.max(r,t,a),l=NaN,o=i-n,s=(i+n)/2;return o?(r===i?l=(t-a)/o+(t0&&s<1?0:l,new Pi(l,o,s,e.opacity)}function c0(e,r,t,a){return arguments.length===1?JB(e):new Pi(e,r,t,a==null?1:a)}function Pi(e,r,t,a){this.h=+e,this.s=+r,this.l=+t,this.opacity=+a}function ZB(e){return e=(e||0)%360,e<0?e+360:e}function mm(e){return Math.max(0,Math.min(1,e||0))}function wb(e,r,t){return(e<60?r+(t-r)*e/60:e<180?t:e<240?r+(t-r)*(240-e)/60:r)*255}var _o,Hs,Gf,u0,el,Sde,Dde,Ede,Pde,Rde,zde,Nde,BB,gm=nt(()=>{dm();_o=.7,Hs=1/_o,Gf="\\s*([+-]?\\d+)\\s*",u0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",el="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sde=/^#([0-9a-f]{3,8})$/,Dde=new RegExp(`^rgb\\(${Gf},${Gf},${Gf}\\)$`),Ede=new RegExp(`^rgb\\(${el},${el},${el}\\)$`),Pde=new RegExp(`^rgba\\(${Gf},${Gf},${Gf},${u0}\\)$`),Rde=new RegExp(`^rgba\\(${el},${el},${el},${u0}\\)$`),zde=new RegExp(`^hsl\\(${u0},${el},${el}\\)$`),Nde=new RegExp(`^hsla\\(${u0},${el},${el},${u0}\\)$`),BB={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};kl(rl,wo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:YB,formatHex:YB,formatHex8:Fde,formatHsl:Ide,formatRgb:GB,toString:GB});kl(la,Uf,bo(rl,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_o:Math.pow(_o,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new la(Is(this.r),Is(this.g),Is(this.b),ym(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:VB,formatHex:VB,formatHex8:Hde,formatRgb:WB,toString:WB}));kl(Pi,c0,bo(rl,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new Pi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_o:Math.pow(_o,e),new Pi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,a=t+(t<.5?t:1-t)*r,n=2*t-a;return new la(wb(e>=240?e-240:e+120,n,a),wb(e,n,a),wb(e<120?e+240:e-120,n,a),this.opacity)},clamp(){return new Pi(ZB(this.h),mm(this.s),mm(this.l),ym(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=ym(this.opacity);return`${e===1?"hsl(":"hsla("}${ZB(this.h)}, ${mm(this.s)*100}%, ${mm(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var xm,bm,Tb=nt(()=>{xm=Math.PI/180,bm=180/Math.PI});function rY(e){if(e instanceof tl)return new tl(e.l,e.a,e.b,e.opacity);if(e instanceof ql)return tY(e);e instanceof la||(e=f0(e));var r=qb(e.r),t=qb(e.g),a=qb(e.b),n=Mb((.2225045*r+.7168786*t+.0606169*a)/KB),i,l;return r===t&&t===a?i=l=n:(i=Mb((.4360747*r+.3850649*t+.1430804*a)/$B),l=Mb((.0139322*r+.0971045*t+.7141733*a)/QB)),new tl(116*n-16,500*(i-n),200*(n-l),e.opacity)}function Wf(e,r,t,a){return arguments.length===1?rY(e):new tl(e,r,t,a==null?1:a)}function tl(e,r,t,a){this.l=+e,this.a=+r,this.b=+t,this.opacity=+a}function Mb(e){return e>Ode?Math.pow(e,1/3):e/eY+jB}function Ab(e){return e>Vf?e*e*e:eY*(e-jB)}function kb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bde(e){if(e instanceof ql)return new ql(e.h,e.c,e.l,e.opacity);if(e instanceof tl||(e=rY(e)),e.a===0&&e.b===0)return new ql(NaN,0{dm();gm();Tb();_m=18,$B=.96422,KB=1,QB=.82521,jB=4/29,Vf=6/29,eY=3*Vf*Vf,Ode=Vf*Vf*Vf;kl(tl,Wf,bo(rl,{brighter(e){return new tl(this.l+_m*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new tl(this.l-_m*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,t=isNaN(this.b)?e:e-this.b/200;return r=$B*Ab(r),e=KB*Ab(e),t=QB*Ab(t),new la(kb(3.1338561*r-1.6168667*e-.4906146*t),kb(-.9787684*r+1.9161415*e+.033454*t),kb(.0719453*r-.2289914*e+1.4052427*t),this.opacity)}}));kl(ql,v0,bo(rl,{brighter(e){return new ql(this.h,this.c,this.l+_m*(e==null?1:e),this.opacity)},darker(e){return new ql(this.h,this.c,this.l-_m*(e==null?1:e),this.opacity)},rgb(){return tY(this).rgb()}}))});function Yde(e){if(e instanceof Os)return new Os(e.h,e.s,e.l,e.opacity);e instanceof la||(e=f0(e));var r=e.r/255,t=e.g/255,a=e.b/255,n=(lY*a+nY*r-iY*t)/(lY+nY-iY),i=a-n,l=(h0*(t-n)-Lb*i)/wm,o=Math.sqrt(l*l+i*i)/(h0*n*(1-n)),s=o?Math.atan2(l,i)*bm-120:NaN;return new Os(s<0?s+360:s,o,n,e.opacity)}function Xf(e,r,t,a){return arguments.length===1?Yde(e):new Os(e,r,t,a==null?1:a)}function Os(e,r,t,a){this.h=+e,this.s=+r,this.l=+t,this.opacity=+a}var oY,Cb,Lb,wm,h0,nY,iY,lY,sY=nt(()=>{dm();gm();Tb();oY=-.14861,Cb=1.78277,Lb=-.29227,wm=-.90649,h0=1.97294,nY=h0*wm,iY=h0*Cb,lY=Cb*Lb-wm*oY;kl(Os,Xf,bo(rl,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new Os(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_o:Math.pow(_o,e),new Os(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*xm,r=+this.l,t=isNaN(this.s)?0:this.s*r*(1-r),a=Math.cos(e),n=Math.sin(e);return new la(255*(r+t*(oY*a+Cb*n)),255*(r+t*(Lb*a+wm*n)),255*(r+t*(h0*a)),this.opacity)}}))});var Bs=nt(()=>{gm();aY();sY()});function Sb(e,r,t,a,n){var i=e*e,l=i*e;return((1-3*e+3*i-l)*r+(4-6*i+3*l)*t+(1+3*e+3*i-3*l)*a+l*n)/6}function Tm(e){var r=e.length-1;return function(t){var a=t<=0?t=0:t>=1?(t=1,r-1):Math.floor(t*r),n=e[a],i=e[a+1],l=a>0?e[a-1]:2*n-i,o=a{});function Am(e){var r=e.length;return function(t){var a=Math.floor(((t%=1)<0?++t:t)*r),n=e[(a+r-1)%r],i=e[a%r],l=e[(a+1)%r],o=e[(a+2)%r];return Sb((t-a/r)*r,n,i,l,o)}}var Db=nt(()=>{Mm()});var Zf,Eb=nt(()=>{Zf=e=>()=>e});function uY(e,r){return function(t){return e+t*r}}function Gde(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(a){return Math.pow(e+a*r,t)}}function To(e,r){var t=r-e;return t?uY(e,t>180||t<-180?t-360*Math.round(t/360):t):Zf(isNaN(e)?r:e)}function fY(e){return(e=+e)==1?zt:function(r,t){return t-r?Gde(r,t,e):Zf(isNaN(r)?t:r)}}function zt(e,r){var t=r-e;return t?uY(e,t):Zf(isNaN(e)?r:e)}var Ys=nt(()=>{Eb()});function cY(e){return function(r){var t=r.length,a=new Array(t),n=new Array(t),i=new Array(t),l,o;for(l=0;l{Bs();Mm();Db();Ys();d0=function e(r){var t=fY(r);function a(n,i){var l=t((n=Uf(n)).r,(i=Uf(i)).r),o=t(n.g,i.g),s=t(n.b,i.b),u=zt(n.opacity,i.opacity);return function(f){return n.r=l(f),n.g=o(f),n.b=s(f),n.opacity=u(f),n+""}}return a.gamma=e,a}(1);vY=cY(Tm),hY=cY(Am)});function Jf(e,r){r||(r=[]);var t=e?Math.min(r.length,e.length):0,a=r.slice(),n;return function(i){for(n=0;n{});function dY(e,r){return(km(r)?Jf:Rb)(e,r)}function Rb(e,r){var t=r?r.length:0,a=e?Math.min(t,e.length):0,n=new Array(a),i=new Array(t),l;for(l=0;l{p0();qm()});function Cm(e,r){var t=new Date;return e=+e,r=+r,function(a){return t.setTime(e*(1-a)+r*a),t}}var Nb=nt(()=>{});function yn(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var m0=nt(()=>{});function Lm(e,r){var t={},a={},n;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(n in r)n in e?t[n]=Mo(e[n],r[n]):a[n]=r[n];return function(i){for(n in t)a[n]=t[n](i);return a}}var Fb=nt(()=>{p0()});function Ude(e){return function(){return e}}function Vde(e){return function(r){return e(r)+""}}function Sm(e,r){var t=Hb.lastIndex=Ib.lastIndex=0,a,n,i,l=-1,o=[],s=[];for(e=e+"",r=r+"";(a=Hb.exec(e))&&(n=Ib.exec(r));)(i=n.index)>t&&(i=r.slice(t,i),o[l]?o[l]+=i:o[++l]=i),(a=a[0])===(n=n[0])?o[l]?o[l]+=n:o[++l]=n:(o[++l]=null,s.push({i:l,x:yn(a,n)})),t=Ib.lastIndex;return t{m0();Hb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ib=new RegExp(Hb.source,"g")});function Mo(e,r){var t=typeof r,a;return r==null||t==="boolean"?Zf(r):(t==="number"?yn:t==="string"?(a=wo(r))?(r=a,d0):Sm:r instanceof wo?d0:r instanceof Date?Cm:km(r)?Jf:Array.isArray(r)?Rb:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Lm:yn)(e,r)}var p0=nt(()=>{Bs();Pb();zb();Nb();m0();Fb();Ob();Eb();qm()});function pY(e){var r=e.length;return function(t){return e[Math.max(0,Math.min(r-1,Math.floor(t*r)))]}}var mY=nt(()=>{});function yY(e,r){var t=To(+e,+r);return function(a){var n=t(a);return n-360*Math.floor(n/360)}}var gY=nt(()=>{Ys()});function xY(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var bY=nt(()=>{});function Bb(e,r,t,a,n,i){var l,o,s;return(l=Math.sqrt(e*e+r*r))&&(e/=l,r/=l),(s=e*t+r*a)&&(t-=e*s,a-=r*s),(o=Math.sqrt(t*t+a*a))&&(t/=o,a/=o,s/=o),e*a{_Y=180/Math.PI,Dm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function TY(e){let r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?Dm:Bb(r.a,r.b,r.c,r.d,r.e,r.f)}function MY(e){return e==null?Dm:(Em||(Em=document.createElementNS("http://www.w3.org/2000/svg","g")),Em.setAttribute("transform",e),(e=Em.transform.baseVal.consolidate())?(e=e.matrix,Bb(e.a,e.b,e.c,e.d,e.e,e.f)):Dm)}var Em,AY=nt(()=>{wY()});function kY(e,r,t,a){function n(u){return u.length?u.pop()+" ":""}function i(u,f,c,h,d,p){if(u!==c||f!==h){var y=d.push("translate(",null,r,null,t);p.push({i:y-4,x:yn(u,c)},{i:y-2,x:yn(f,h)})}else(c||h)&&d.push("translate("+c+r+h+t)}function l(u,f,c,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:c.push(n(c)+"rotate(",null,a)-2,x:yn(u,f)})):f&&c.push(n(c)+"rotate("+f+a)}function o(u,f,c,h){u!==f?h.push({i:c.push(n(c)+"skewX(",null,a)-2,x:yn(u,f)}):f&&c.push(n(c)+"skewX("+f+a)}function s(u,f,c,h,d,p){if(u!==c||f!==h){var y=d.push(n(d)+"scale(",null,",",null,")");p.push({i:y-4,x:yn(u,c)},{i:y-2,x:yn(f,h)})}else(c!==1||h!==1)&&d.push(n(d)+"scale("+c+","+h+")")}return function(u,f){var c=[],h=[];return u=e(u),f=e(f),i(u.translateX,u.translateY,f.translateX,f.translateY,c,h),l(u.rotate,f.rotate,c,h),o(u.skewX,f.skewX,c,h),s(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,h),u=f=null,function(d){for(var p=-1,y=h.length,m;++p{m0();AY();qY=kY(TY,"px, ","px)","deg)"),CY=kY(MY,", ",")",")")});function SY(e){return((e=Math.exp(e))+1/e)/2}function Xde(e){return((e=Math.exp(e))-1/e)/2}function Zde(e){return((e=Math.exp(2*e))-1)/(e+1)}var Wde,DY,EY=nt(()=>{Wde=1e-12;DY=function e(r,t,a){function n(i,l){var o=i[0],s=i[1],u=i[2],f=l[0],c=l[1],h=l[2],d=f-o,p=c-s,y=d*d+p*p,m,_;if(y{Bs();Ys();RY=PY(To),zY=PY(zt)});function Yb(e,r){var t=zt((e=Wf(e)).l,(r=Wf(r)).l),a=zt(e.a,r.a),n=zt(e.b,r.b),i=zt(e.opacity,r.opacity);return function(l){return e.l=t(l),e.a=a(l),e.b=n(l),e.opacity=i(l),e+""}}var FY=nt(()=>{Bs();Ys()});function IY(e){return function(r,t){var a=e((r=v0(r)).h,(t=v0(t)).h),n=zt(r.c,t.c),i=zt(r.l,t.l),l=zt(r.opacity,t.opacity);return function(o){return r.h=a(o),r.c=n(o),r.l=i(o),r.opacity=l(o),r+""}}}var HY,OY,BY=nt(()=>{Bs();Ys();HY=IY(To),OY=IY(zt)});function YY(e){return function r(t){t=+t;function a(n,i){var l=e((n=Xf(n)).h,(i=Xf(i)).h),o=zt(n.s,i.s),s=zt(n.l,i.l),u=zt(n.opacity,i.opacity);return function(f){return n.h=l(f),n.s=o(f),n.l=s(Math.pow(f,t)),n.opacity=u(f),n+""}}return a.gamma=r,a}(1)}var GY,UY,VY=nt(()=>{Bs();Ys();GY=YY(To),UY=YY(zt)});function Gb(e,r){r===void 0&&(r=e,e=Mo);for(var t=0,a=r.length-1,n=r[0],i=new Array(a<0?0:a);t{p0()});function XY(e,r){for(var t=new Array(r),a=0;a{});var Ub={};$W(Ub,{interpolate:()=>Mo,interpolateArray:()=>dY,interpolateBasis:()=>Tm,interpolateBasisClosed:()=>Am,interpolateCubehelix:()=>GY,interpolateCubehelixLong:()=>UY,interpolateDate:()=>Cm,interpolateDiscrete:()=>pY,interpolateHcl:()=>HY,interpolateHclLong:()=>OY,interpolateHsl:()=>RY,interpolateHslLong:()=>zY,interpolateHue:()=>yY,interpolateLab:()=>Yb,interpolateNumber:()=>yn,interpolateNumberArray:()=>Jf,interpolateObject:()=>Lm,interpolateRgb:()=>d0,interpolateRgbBasis:()=>vY,interpolateRgbBasisClosed:()=>hY,interpolateRound:()=>xY,interpolateString:()=>Sm,interpolateTransformCss:()=>qY,interpolateTransformSvg:()=>CY,interpolateZoom:()=>DY,piecewise:()=>Gb,quantize:()=>XY});var Vb=nt(()=>{p0();zb();Mm();Db();Nb();mY();gY();m0();qm();Fb();bY();Ob();LY();EY();Pb();NY();FY();BY();VY();WY();ZY()});var eG=B((R4e,jY)=>{"use strict";var Xs=kr(),Jde=(Vb(),Ty(Ub)).interpolate,JY=(Vb(),Ty(Ub)).interpolateNumber,Ao=Pe(),$de=Ao.strScale,g0=Ao.strTranslate,Kde=Ao.rad2deg,Qde=Sa().MID_SHIFT,Ws=Br(),Gs=_b(),Rm=va(),Ca=$r(),jde=sp(),e1e=fp(),r1e=bn(),$f=xr(),Wb={left:"start",center:"middle",right:"end"},Us={left:0,center:.5,right:1},$Y=/[yzafpnµmkMGTPEZY]/;function x0(e){return e&&e.duration>0}jY.exports=function(r,t,a,n){var i=r._fullLayout,l;x0(a)&&n&&(l=n()),Ao.makeTraceGroups(i._indicatorlayer,t,"trace").each(function(o){var s=o[0],u=s.trace,f=Xs.select(this),c=u._hasGauge,h=u._isAngular,d=u._isBullet,p=u.domain,y={w:i._size.w*(p.x[1]-p.x[0]),h:i._size.h*(p.y[1]-p.y[0]),l:i._size.l+i._size.w*p.x[0],r:i._size.r+i._size.w*(1-p.x[1]),t:i._size.t+i._size.h*(1-p.y[1]),b:i._size.b+i._size.h*p.y[0]},m=y.l+y.w/2,_=y.t+y.h/2,b=Math.min(y.w/2,y.h),T=Gs.innerRadius*b,x,M,A,k=u.align||"center";if(M=_,!c)x=y.l+Us[k]*y.w,A=function(Y){return KY(Y,y.w,y.h)};else if(h&&(x=m,M=_+b/2,A=function(Y){return l1e(Y,.9*T)}),d){var L=Gs.bulletPadding,D=1-Gs.bulletNumberDomainSize+L;x=y.l+(D+(1-D)*Us[k])*y.w,A=function(Y){return KY(Y,(Gs.bulletNumberDomainSize-L)*y.w,y.h)}}n1e(r,f,o,{numbersX:x,numbersY:M,numbersScaler:A,transitionOpts:a,onComplete:l});var P,R;c&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},R={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=f.selectAll("g.angular").data(h?o:[]);z.exit().remove();var H=f.selectAll("g.angularaxis").data(h?o:[]);H.exit().remove(),h&&a1e(r,f,o,{radius:b,innerRadius:T,gauge:z,layer:H,size:y,gaugeBg:P,gaugeOutline:R,transitionOpts:a,onComplete:l});var O=f.selectAll("g.bullet").data(d?o:[]);O.exit().remove();var U=f.selectAll("g.bulletaxis").data(d?o:[]);U.exit().remove(),d&&t1e(r,f,o,{gauge:O,layer:U,size:y,gaugeBg:P,gaugeOutline:R,transitionOpts:a,onComplete:l});var V=f.selectAll("text.title").data(o);V.exit().remove(),V.enter().append("text").classed("title",!0),V.attr("text-anchor",function(){return d?Wb.right:Wb[u.title.align]}).text(u.title.text).call(Ws.font,u.title.font).call(Rm.convertToTspans,r),V.attr("transform",function(){var Y=y.l+y.w*Us[u.title.align],I,G=Gs.titlePadding,Z=Ws.bBox(V.node());if(c){if(h)if(u.gauge.axis.visible){var K=Ws.bBox(H.node());I=K.top-G-Z.bottom}else I=y.t+y.h/2-b/2-Z.bottom-G;d&&(I=M-(Z.top+Z.bottom)/2,Y=y.l-Gs.bulletPadding*y.w)}else I=u._numbersTop-G-Z.bottom;return g0(Y,I)})})};function t1e(e,r,t,a){var n=t[0].trace,i=a.gauge,l=a.layer,o=a.gaugeBg,s=a.gaugeOutline,u=a.size,f=n.domain,c=a.transitionOpts,h=a.onComplete,d,p,y,m,_;i.enter().append("g").classed("bullet",!0),i.attr("transform",g0(u.l,u.t)),l.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),l.selectAll("g.xbulletaxistick,path,text").remove();var b=u.h,T=n.gauge.bar.thickness*b,x=f.x[0],M=f.x[0]+(f.x[1]-f.x[0])*(n._hasNumber||n._hasDelta?1-Gs.bulletNumberDomainSize:1);d=y0(e,n.gauge.axis),d._id="xbulletaxis",d.domain=[x,M],d.setScale(),p=Ca.calcTicks(d),y=Ca.makeTransTickFn(d),m=Ca.getTickSigns(d)[2],_=u.t+u.h,d.visible&&(Ca.drawTicks(e,d,{vals:d.ticks==="inside"?Ca.clipEnds(d,p):p,layer:l,path:Ca.makeTickPath(d,_,m),transFn:y}),Ca.drawLabels(e,d,{vals:p,layer:l,transFn:y,labelFns:Ca.makeLabelFns(d,_)}));function A(H){H.attr("width",function(O){return Math.max(0,d.c2p(O.range[1])-d.c2p(O.range[0]))}).attr("x",function(O){return d.c2p(O.range[0])}).attr("y",function(O){return .5*(1-O.thickness)*b}).attr("height",function(O){return O.thickness*b})}var k=[o].concat(n.gauge.steps),L=i.selectAll("g.bg-bullet").data(k);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(A).call(Vs),L.exit().remove();var D=i.selectAll("g.value-bullet").data([n.gauge.bar]);D.enter().append("g").classed("value-bullet",!0).append("rect"),D.select("rect").attr("height",T).attr("y",(b-T)/2).call(Vs),x0(c)?D.select("rect").transition().duration(c.duration).ease(c.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],t[0].y)))):D.select("rect").attr("width",typeof t[0].y=="number"?Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],t[0].y))):0),D.exit().remove();var P=t.filter(function(){return n.gauge.threshold.value||n.gauge.threshold.value===0}),R=i.selectAll("g.threshold-bullet").data(P);R.enter().append("g").classed("threshold-bullet",!0).append("line"),R.select("line").attr("x1",d.c2p(n.gauge.threshold.value)).attr("x2",d.c2p(n.gauge.threshold.value)).attr("y1",(1-n.gauge.threshold.thickness)/2*b).attr("y2",(1-(1-n.gauge.threshold.thickness)/2)*b).call($f.stroke,n.gauge.threshold.line.color).style("stroke-width",n.gauge.threshold.line.width),R.exit().remove();var z=i.selectAll("g.gauge-outline").data([s]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(A).call(Vs),z.exit().remove()}function a1e(e,r,t,a){var n=t[0].trace,i=a.size,l=a.radius,o=a.innerRadius,s=a.gaugeBg,u=a.gaugeOutline,f=[i.l+i.w/2,i.t+i.h/2+l/2],c=a.gauge,h=a.layer,d=a.transitionOpts,p=a.onComplete,y=Math.PI/2;function m(re){var se=n.gauge.axis.range[0],ce=n.gauge.axis.range[1],le=(re-se)/(ce-se)*Math.PI-y;return le<-y?-y:le>y?y:le}function _(re){return Xs.svg.arc().innerRadius((o+l)/2-re/2*(l-o)).outerRadius((o+l)/2+re/2*(l-o)).startAngle(-y)}function b(re){re.attr("d",function(se){return _(se.thickness).startAngle(m(se.range[0])).endAngle(m(se.range[1]))()})}var T,x,M,A;c.enter().append("g").classed("angular",!0),c.attr("transform",g0(f[0],f[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),T=y0(e,n.gauge.axis),T.type="linear",T.range=n.gauge.axis.range,T._id="xangularaxis",T.ticklabeloverflow="allow",T.setScale();var k=function(re){return(T.range[0]-re.x)/(T.range[1]-T.range[0])*Math.PI+Math.PI},L={},D=Ca.makeLabelFns(T,0),P=D.labelStandoff;L.xFn=function(re){var se=k(re);return Math.cos(se)*P},L.yFn=function(re){var se=k(re),ce=Math.sin(se)>0?.2:1;return-Math.sin(se)*(P+re.fontSize*ce)+Math.abs(Math.cos(se))*(re.fontSize*Qde)},L.anchorFn=function(re){var se=k(re),ce=Math.cos(se);return Math.abs(ce)<.1?"middle":ce>0?"start":"end"},L.heightFn=function(re,se,ce){var le=k(re);return-.5*(1+Math.sin(le))*ce};var R=function(re){return g0(f[0]+l*Math.cos(re),f[1]-l*Math.sin(re))};M=function(re){return R(k(re))};var z=function(re){var se=k(re);return R(se)+"rotate("+-Kde(se)+")"};if(x=Ca.calcTicks(T),A=Ca.getTickSigns(T)[2],T.visible){A=T.ticks==="inside"?-1:1;var H=(T.linewidth||1)/2;Ca.drawTicks(e,T,{vals:x,layer:h,path:"M"+A*H+",0h"+A*T.ticklen,transFn:z}),Ca.drawLabels(e,T,{vals:x,layer:h,transFn:M,labelFns:L})}var O=[s].concat(n.gauge.steps),U=c.selectAll("g.bg-arc").data(O);U.enter().append("g").classed("bg-arc",!0).append("path"),U.select("path").call(b).call(Vs),U.exit().remove();var V=_(n.gauge.bar.thickness),Y=c.selectAll("g.value-arc").data([n.gauge.bar]);Y.enter().append("g").classed("value-arc",!0).append("path");var I=Y.select("path");x0(d)?(I.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",i1e(V,m(t[0].lastY),m(t[0].y))),n._lastValue=t[0].y):I.attr("d",typeof t[0].y=="number"?V.endAngle(m(t[0].y)):"M0,0Z"),I.call(Vs),Y.exit().remove(),O=[];var G=n.gauge.threshold.value;(G||G===0)&&O.push({range:[G,G],color:n.gauge.threshold.color,line:{color:n.gauge.threshold.line.color,width:n.gauge.threshold.line.width},thickness:n.gauge.threshold.thickness});var Z=c.selectAll("g.threshold-arc").data(O);Z.enter().append("g").classed("threshold-arc",!0).append("path"),Z.select("path").call(b).call(Vs),Z.exit().remove();var K=c.selectAll("g.gauge-outline").data([u]);K.enter().append("g").classed("gauge-outline",!0).append("path"),K.select("path").call(b).call(Vs),K.exit().remove()}function n1e(e,r,t,a){var n=t[0].trace,i=a.numbersX,l=a.numbersY,o=n.align||"center",s=Wb[o],u=a.transitionOpts,f=a.onComplete,c=Ao.ensureSingle(r,"g","numbers"),h,d,p,y=[];n._hasNumber&&y.push("number"),n._hasDelta&&(y.push("delta"),n.delta.position==="left"&&y.reverse());var m=c.selectAll("text").data(y);m.enter().append("text"),m.attr("text-anchor",function(){return s}).attr("class",function(R){return R}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),m.exit().remove();function _(R,z,H,O){if(R.match("s")&&H>=0!=O>=0&&!z(H).slice(-1).match($Y)&&!z(O).slice(-1).match($Y)){var U=R.slice().replace("s","f").replace(/\d+/,function(Y){return parseInt(Y)-1}),V=y0(e,{tickformat:U});return function(Y){return Math.abs(Y)<1?Ca.tickText(V,Y).text:z(Y)}}else return z}function b(){var R=y0(e,{tickformat:n.number.valueformat},n._range);R.setScale(),Ca.prepTicks(R);var z=function(Y){return Ca.tickText(R,Y).text},H=n.number.suffix,O=n.number.prefix,U=c.select("text.number");function V(){var Y=typeof t[0].y=="number"?O+z(t[0].y)+H:"-";U.text(Y).call(Ws.font,n.number.font).call(Rm.convertToTspans,e)}return x0(u)?U.transition().duration(u.duration).ease(u.easing).each("end",function(){V(),f&&f()}).each("interrupt",function(){V(),f&&f()}).attrTween("text",function(){var Y=Xs.select(this),I=JY(t[0].lastY,t[0].y);n._lastValue=t[0].y;var G=_(n.number.valueformat,z,t[0].lastY,t[0].y);return function(Z){Y.text(O+G(I(Z))+H)}}):V(),h=QY(O+z(t[0].y)+H,n.number.font,s,e),U}function T(){var R=y0(e,{tickformat:n.delta.valueformat},n._range);R.setScale(),Ca.prepTicks(R);var z=function(Z){return Ca.tickText(R,Z).text},H=n.delta.suffix,O=n.delta.prefix,U=function(Z){var K=n.delta.relative?Z.relativeDelta:Z.delta;return K},V=function(Z,K){return Z===0||typeof Z!="number"||isNaN(Z)?"-":(Z>0?n.delta.increasing.symbol:n.delta.decreasing.symbol)+O+K(Z)+H},Y=function(Z){return Z.delta>=0?n.delta.increasing.color:n.delta.decreasing.color};n._deltaLastValue===void 0&&(n._deltaLastValue=U(t[0]));var I=c.select("text.delta");I.call(Ws.font,n.delta.font).call($f.fill,Y({delta:n._deltaLastValue}));function G(){I.text(V(U(t[0]),z)).call($f.fill,Y(t[0])).call(Rm.convertToTspans,e)}return x0(u)?I.transition().duration(u.duration).ease(u.easing).tween("text",function(){var Z=Xs.select(this),K=U(t[0]),re=n._deltaLastValue,se=_(n.delta.valueformat,z,re,K),ce=JY(re,K);return n._deltaLastValue=K,function(le){Z.text(V(ce(le),se)),Z.call($f.fill,Y({delta:ce(le)}))}}).each("end",function(){G(),f&&f()}).each("interrupt",function(){G(),f&&f()}):G(),d=QY(V(U(t[0]),z),n.delta.font,s,e),I}var x=n.mode+n.align,M;if(n._hasDelta&&(M=T(),x+=n.delta.position+n.delta.font.size+n.delta.font.family+n.delta.valueformat,x+=n.delta.increasing.symbol+n.delta.decreasing.symbol,p=d),n._hasNumber&&(b(),x+=n.number.font.size+n.number.font.family+n.number.valueformat+n.number.suffix+n.number.prefix,p=h),n._hasDelta&&n._hasNumber){var A=[(h.left+h.right)/2,(h.top+h.bottom)/2],k=[(d.left+d.right)/2,(d.top+d.bottom)/2],L,D,P=.75*n.delta.font.size;n.delta.position==="left"&&(L=Pm(n,"deltaPos",0,-1*(h.width*Us[n.align]+d.width*(1-Us[n.align])+P),x,Math.min),D=A[1]-k[1],p={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+L,right:h.right,top:Math.min(h.top,d.top+D),bottom:Math.max(h.bottom,d.bottom+D)}),n.delta.position==="right"&&(L=Pm(n,"deltaPos",0,h.width*(1-Us[n.align])+d.width*Us[n.align]+P,x,Math.max),D=A[1]-k[1],p={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+L,top:Math.min(h.top,d.top+D),bottom:Math.max(h.bottom,d.bottom+D)}),n.delta.position==="bottom"&&(L=null,D=d.height,p={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}),n.delta.position==="top"&&(L=null,D=h.top,p={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}),M.attr({dx:L,dy:D})}(n._hasNumber||n._hasDelta)&&c.attr("transform",function(){var R=a.numbersScaler(p);x+=R[2];var z=Pm(n,"numbersScale",1,R[0],x,Math.min),H;n._scaleNumbers||(z=1),n._isAngular?H=l-z*p.bottom:H=l-z*(p.top+p.bottom)/2,n._numbersTop=z*p.top+H;var O=p[o];o==="center"&&(O=(p.left+p.right)/2);var U=i-z*O;return U=Pm(n,"numbersTranslate",0,U,x,Math.max),g0(U,H)+$de(z)})}function Vs(e){e.each(function(r){$f.stroke(Xs.select(this),r.line.color)}).each(function(r){$f.fill(Xs.select(this),r.color)}).style("stroke-width",function(r){return r.line.width})}function i1e(e,r,t){return function(){var a=Jde(r,t);return function(n){return e.endAngle(a(n))()}}}function y0(e,r,t){var a=e._fullLayout,n=Ao.extendFlat({type:"linear",ticks:"outside",range:t,showline:!0},r),i={type:"linear",_id:"x"+r._id},l={letter:"x",font:a.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function o(s,u){return Ao.coerce(n,i,r1e,s,u)}return jde(n,i,o,l,a),e1e(n,i,o,l),i}function KY(e,r,t){var a=Math.min(r/e.width,t/e.height);return[a,e,r+"x"+t]}function l1e(e,r){var t=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),a=r/t;return[a,e,r]}function QY(e,r,t,a){var n=document.createElementNS("http://www.w3.org/2000/svg","text"),i=Xs.select(n);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",t).attr("data-unformatted",e).call(Rm.convertToTspans,a).call(Ws.font,r),Ws.bBox(i.node())}function Pm(e,r,t,a,n,i){var l="_cache"+r;e[l]&&e[l].key===n||(e[l]={key:n,value:t});var o=Ao.aggNums(i,null,[e[l].value,a],2);return e[l].value=o,o}});var tG=B((z4e,rG)=>{"use strict";rG.exports={moduleType:"trace",name:"indicator",basePlotModule:CB(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:bb(),supplyDefaults:IB().supplyDefaults,calc:OB().calc,plot:eG(),meta:{}}});var nG=B((N4e,aG)=>{"use strict";aG.exports=tG()});var Nm=B((F4e,uG)=>{"use strict";var zm=Pe().extendFlat,b0=bi(),iG=di().axisHoverFormat,oG=fi().dash,o1e=bc(),sG=Ff(),s1e=sG.INCREASING.COLOR,u1e=sG.DECREASING.COLOR,Xb=b0.line;function lG(e){return{line:{color:zm({},Xb.color,{dflt:e}),width:Xb.width,dash:oG,editType:"style"},editType:"style"}}uG.exports={xperiod:b0.xperiod,xperiod0:b0.xperiod0,xperiodalignment:b0.xperiodalignment,xhoverformat:iG("x"),yhoverformat:iG("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:zm({},Xb.width,{}),dash:zm({},oG,{}),editType:"style"},increasing:lG(s1e),decreasing:lG(u1e),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:zm({},o1e.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:b0.zorder}});var Zb=B((I4e,fG)=>{"use strict";var f1e=yr(),c1e=Pe();fG.exports=function(r,t,a,n){var i=a("x"),l=a("open"),o=a("high"),s=a("low"),u=a("close");a("hoverlabel.split");var f=f1e.getComponentMethod("calendars","handleTraceDefaults");if(f(r,t,["x"],n),!!(l&&o&&s&&u)){var c=Math.min(l.length,o.length,s.length,u.length);return i&&(c=Math.min(c,c1e.minRowLength(i))),t._length=c,c}}});var hG=B((H4e,vG)=>{"use strict";var v1e=Pe(),h1e=Zb(),d1e=_s(),p1e=Nm();vG.exports=function(r,t,a,n){function i(o,s){return v1e.coerce(r,t,p1e,o,s)}var l=h1e(r,t,i,n);if(!l){t.visible=!1;return}d1e(r,t,n,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),cG(r,t,i,"increasing"),cG(r,t,i,"decreasing"),i("text"),i("hovertext"),i("tickwidth"),n._requestRangeslider[t.xaxis]=!0,i("zorder")};function cG(e,r,t,a){t(a+".line.color"),t(a+".line.width",r.line.width),t(a+".line.dash",r.line.dash)}});var Jb=B((O4e,pG)=>{"use strict";var Kf=Pe(),Fm=Kf._,Im=$r(),m1e=ws(),_0=wt().BADNUM;function y1e(e,r){var t=Im.getFromId(e,r.xaxis),a=Im.getFromId(e,r.yaxis),n=x1e(e,t,r),i=r._minDiff;r._minDiff=null;var l=r._origX;r._origX=null;var o=r._xcalc;r._xcalc=null;var s=dG(e,r,l,o,a,g1e);return r._extremes[t._id]=Im.findExtremes(t,o,{vpad:i/2}),s.length?(Kf.extendFlat(s[0].t,{wHover:i/2,tickLen:n}),s):[{t:{empty:!0}}]}function g1e(e,r,t,a){return{o:e,h:r,l:t,c:a}}function dG(e,r,t,a,n,i){for(var l=n.makeCalcdata(r,"open"),o=n.makeCalcdata(r,"high"),s=n.makeCalcdata(r,"low"),u=n.makeCalcdata(r,"close"),f=Kf.isArrayOrTypedArray(r.text),c=Kf.isArrayOrTypedArray(r.hovertext),h=!0,d=null,p=!!r.xperiodalignment,y=[],m=0;md):h=M>b,d=M;var A=i(b,T,x,M);A.pos=_,A.yc=(b+M)/2,A.i=m,A.dir=h?"increasing":"decreasing",A.x=A.pos,A.y=[x,T],p&&(A.orig_p=t[m]),f&&(A.tx=r.text[m]),c&&(A.htx=r.hovertext[m]),y.push(A)}else y.push({pos:_,empty:!0})}return r._extremes[n._id]=Im.findExtremes(n,Kf.concat(s,o),{padded:!0}),y.length&&(y[0].t={labels:{open:Fm(e,"open:")+" ",high:Fm(e,"high:")+" ",low:Fm(e,"low:")+" ",close:Fm(e,"close:")+" "}}),y}function x1e(e,r,t){var a=t._minDiff;if(!a){var n=e._fullData,i=[];a=1/0;var l;for(l=0;l{"use strict";var b1e=kr(),mG=Pe();yG.exports=function(r,t,a,n){var i=t.yaxis,l=t.xaxis,o=!!l.rangebreaks;mG.makeTraceGroups(n,a,"trace ohlc").each(function(s){var u=b1e.select(this),f=s[0],c=f.t,h=f.trace;if(h.visible!==!0||c.empty){u.remove();return}var d=c.tickLen,p=u.selectAll("path").data(mG.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(y){if(y.empty)return"M0,0Z";var m=l.c2p(y.pos-d,!0),_=l.c2p(y.pos+d,!0),b=o?(m+_)/2:l.c2p(y.pos,!0),T=i.c2p(y.o,!0),x=i.c2p(y.h,!0),M=i.c2p(y.l,!0),A=i.c2p(y.c,!0);return"M"+m+","+T+"H"+b+"M"+b+","+x+"V"+M+"M"+_+","+A+"H"+b})})}});var bG=B((Y4e,xG)=>{"use strict";var $b=kr(),_1e=Br(),w1e=xr();xG.exports=function(r,t,a){var n=a||$b.select(r).selectAll("g.ohlclayer").selectAll("g.trace");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var l=i[0].trace;$b.select(this).selectAll("path").each(function(o){if(!o.empty){var s=l[o.dir].line;$b.select(this).style("fill","none").call(w1e.stroke,s.color).call(_1e.dashLine,s.dash,s.width).style("opacity",l.selectedpoints&&!o.selected?.3:1)}})})}});var Qb=B((G4e,AG)=>{"use strict";var Kb=$r(),T1e=Pe(),Hm=gi(),M1e=xr(),A1e=Pe().fillText,_G=Ff(),k1e={increasing:_G.INCREASING.SYMBOL,decreasing:_G.DECREASING.SYMBOL};function q1e(e,r,t,a){var n=e.cd,i=n[0].trace;return i.hoverlabel.split?TG(e,r,t,a):MG(e,r,t,a)}function wG(e,r,t,a){var n=e.cd,i=e.xa,l=n[0].trace,o=n[0].t,s=l.type,u=s==="ohlc"?"l":"min",f=s==="ohlc"?"h":"max",c,h,d=o.bPos||0,p=function(P){return P.pos+d-r},y=o.bdPos||o.tickLen,m=o.wHover,_=Math.min(1,y/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));c=e.maxHoverDistance-_,h=e.maxSpikeDistance-_;function b(P){var R=p(P);return Hm.inbox(R-m,R+m,c)}function T(P){var R=P[u],z=P[f];return R===z||Hm.inbox(R-t,z-t,c)}function x(P){return(b(P)+T(P))/2}var M=Hm.getDistanceFunction(a,b,T,x);if(Hm.getClosest(n,M,e),e.index===!1)return null;var A=n[e.index];if(A.empty)return null;var k=A.dir,L=l[k],D=L.line.color;return M1e.opacity(D)&&L.line.width?e.color=D:e.color=L.fillcolor,e.x0=i.c2p(A.pos+d-y,!0),e.x1=i.c2p(A.pos+d+y,!0),e.xLabelVal=A.orig_p!==void 0?A.orig_p:A.pos,e.spikeDistance=x(A)*h/c,e.xSpike=i.c2p(A.pos,!0),e}function TG(e,r,t,a){var n=e.cd,i=e.ya,l=n[0].trace,o=n[0].t,s=[],u=wG(e,r,t,a);if(!u)return[];var f=u.index,c=n[f],h=c.hi||l.hoverinfo,d=h.split("+"),p=h==="all",y=p||d.indexOf("y")!==-1;if(!y)return[];for(var m=["high","open","close","low"],_={},b=0;b"+o.labels[T]+Kb.hoverLabelText(i,x,l.yhoverformat)):(A=T1e.extendFlat({},u),A.y0=A.y1=M,A.yLabelVal=x,A.yLabel=o.labels[T]+Kb.hoverLabelText(i,x,l.yhoverformat),A.name="",s.push(A),_[x]=A)}return s}function MG(e,r,t,a){var n=e.cd,i=e.ya,l=n[0].trace,o=n[0].t,s=wG(e,r,t,a);if(!s)return[];var u=s.index,f=n[u],c=s.index=f.i,h=f.dir;function d(x){return o.labels[x]+Kb.hoverLabelText(i,l[x][c],l.yhoverformat)}var p=f.hi||l.hoverinfo,y=p.split("+"),m=p==="all",_=m||y.indexOf("y")!==-1,b=m||y.indexOf("text")!==-1,T=_?[d("open"),d("high"),d("low"),d("close")+" "+k1e[h]]:[];return b&&A1e(f,l,T),s.extraText=T.join("
"),s.y0=s.y1=i.c2p(f.yc,!0),[s]}AG.exports={hoverPoints:q1e,hoverSplit:TG,hoverOnPoints:MG}});var jb=B((U4e,kG)=>{"use strict";kG.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=[],o,s=a[0].t.bPos||0;if(t===!1)for(o=0;o{"use strict";qG.exports={moduleType:"trace",name:"ohlc",basePlotModule:gl(),categories:["cartesian","svg","showLegend"],meta:{},attributes:Nm(),supplyDefaults:hG(),calc:Jb().calc,plot:gG(),style:bG(),hoverPoints:Qb().hoverPoints,selectPoints:jb()}});var SG=B((W4e,LG)=>{"use strict";LG.exports=CG()});var zG=B((X4e,RG)=>{"use strict";var C1e=W3(),ri=bi(),DG=Tl(),L1e=zn(),EG=di().axisHoverFormat,S1e=_a().hovertemplateAttrs,Cl=mt().extendFlat,Qf=ri.marker,PG=Qf.line;RG.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:ri.xperiod,yperiod:ri.yperiod,xperiod0:ri.xperiod0,yperiod0:ri.yperiod0,xperiodalignment:ri.xperiodalignment,yperiodalignment:ri.yperiodalignment,xhoverformat:EG("x"),yhoverformat:EG("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:Cl({},Qf.symbol,{arrayOk:!1,editType:"plot"}),opacity:Cl({},Qf.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Cl({},Qf.angle,{arrayOk:!1,editType:"calc"}),size:Cl({},Qf.size,{arrayOk:!1,editType:"calc"}),color:Cl({},Qf.color,{arrayOk:!1,editType:"style"}),line:{color:Cl({},PG.color,{arrayOk:!1,dflt:L1e.defaultLine,editType:"style"}),width:Cl({},PG.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:C1e(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:DG.offsetgroup,alignmentgroup:DG.alignmentgroup,selected:{marker:ri.selected.marker,editType:"style"},unselected:{marker:ri.unselected.marker,editType:"style"},text:Cl({},ri.text,{}),hovertext:Cl({},ri.hovertext,{}),hovertemplate:S1e({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:ri.zorder}});var r_=B((Z4e,IG)=>{"use strict";var e_=Pe().extendFlat,NG=di().axisHoverFormat,Ln=Nm(),jf=zG();function FG(e){return{line:{color:e_({},jf.line.color,{dflt:e}),width:jf.line.width,editType:"style"},fillcolor:jf.fillcolor,editType:"style"}}IG.exports={xperiod:Ln.xperiod,xperiod0:Ln.xperiod0,xperiodalignment:Ln.xperiodalignment,xhoverformat:NG("x"),yhoverformat:NG("y"),x:Ln.x,open:Ln.open,high:Ln.high,low:Ln.low,close:Ln.close,line:{width:e_({},jf.line.width,{}),editType:"style"},increasing:FG(Ln.increasing.line.color.dflt),decreasing:FG(Ln.decreasing.line.color.dflt),text:Ln.text,hovertext:Ln.hovertext,whiskerwidth:e_({},jf.whiskerwidth,{dflt:0}),hoverlabel:Ln.hoverlabel,zorder:jf.zorder}});var t_=B((J4e,HG)=>{"use strict";HG.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 YG=B(($4e,BG)=>{"use strict";var D1e=yr(),E1e=Pe(),P1e=t_();function OG(e,r,t,a,n){for(var i=n+"Layout",l=!1,o=0;o{"use strict";var GG=$r(),z1e=Pe(),N1e=ys().getAxisGroup,UG=["v","h"];function F1e(e,r){for(var t=e.calcdata,a=r.xaxis,n=r.yaxis,i=0;i1,b=1-i[e+"gap"],T=1-i[e+"groupgap"];for(s=0;s0;if(k==="positive"?(I=L*(A?1:.5),K=Z,G=K=P):k==="negative"?(I=K=P,G=L*(A?1:.5),re=Z):(I=G=L,K=re=Z),ue){var ke=x.pointpos,ve=x.jitter,be=x.marker.size/2,W=0;ke+ve>=0&&(W=Z*(ke+ve),W>I?(ge=!0,le=be,se=W):W>K&&(le=be,se=I)),W<=I&&(se=I);var te=0;ke-ve<=0&&(te=-Z*(ke-ve),te>G?(ge=!0,Q=be,ce=te):te>re&&(Q=be,ce=G)),te<=G&&(ce=G)}else se=I,ce=G;var X=new Array(f.length);for(u=0;u{"use strict";var I1e=Pe(),H1e=xr(),O1e=Zb(),B1e=_s(),Y1e=r_();JG.exports=function(r,t,a,n){function i(o,s){return I1e.coerce(r,t,Y1e,o,s)}var l=O1e(r,t,i,n);if(!l){t.visible=!1;return}B1e(r,t,n,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),ZG(r,t,i,"increasing"),ZG(r,t,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),n._requestRangeslider[t.xaxis]=!0,i("zorder")};function ZG(e,r,t,a){var n=t(a+".line.color");t(a+".line.width",r.line.width),t(a+".fillcolor",H1e.addOpacity(n,.5))}});var eU=B((j4e,jG)=>{"use strict";var KG=Pe(),QG=$r(),G1e=ws(),U1e=Jb().calcCommon;jG.exports=function(e,r){var t=e._fullLayout,a=QG.getFromId(e,r.xaxis),n=QG.getFromId(e,r.yaxis),i=a.makeCalcdata(r,"x"),l=G1e(r,a,"x",i).vals,o=U1e(e,r,i,l,n,V1e);return o.length?(KG.extendFlat(o[0].t,{num:t._numBoxes,dPos:KG.distinctVals(l).minDiff/2,posLetter:"x",valLetter:"y"}),t._numBoxes++,o):[{t:{empty:!0}}]};function V1e(e,r,t,a){return{min:t,q1:Math.min(e,a),med:a,q3:Math.max(e,a),max:r}}});var lU=B((e6e,iU)=>{"use strict";var ec=kr(),Zs=Pe(),W1e=Br(),rU=5,X1e=.01;function Z1e(e,r,t,a){var n=e._context.staticPlot,i=r.xaxis,l=r.yaxis;Zs.makeTraceGroups(a,t,"trace boxes").each(function(o){var s=ec.select(this),u=o[0],f=u.t,c=u.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){s.remove();return}var h,d;c.orientation==="h"?(h=l,d=i):(h=i,d=l),tU(s,{pos:h,val:d},c,f,n),aU(s,{x:i,y:l},c,f),nU(s,{pos:h,val:d},c,f)})}function tU(e,r,t,a,n){var i=t.orientation==="h",l=r.val,o=r.pos,s=!!o.rangebreaks,u=a.bPos,f=a.wdPos||0,c=a.bPosPxOffset||0,h=t.whiskerwidth||0,d=t.showwhiskers!==!1,p=t.notched||!1,y=p?1-2*t.notchwidth:1,m,_;Array.isArray(a.bdPos)?(m=a.bdPos[0],_=a.bdPos[1]):(m=a.bdPos,_=a.bdPos);var b=e.selectAll("path.box").data(t.type!=="violin"||t.box.visible?Zs.identity:[]);b.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),b.exit().remove(),b.each(function(T){if(T.empty)return ec.select(this).attr("d","M0,0Z");var x=o.c2l(T.pos+u,!0),M=o.l2p(x-m)+c,A=o.l2p(x+_)+c,k=s?(M+A)/2:o.l2p(x)+c,L=t.whiskerwidth,D=s?M*L+(1-L)*k:o.l2p(x-f)+c,P=s?A*L+(1-L)*k:o.l2p(x+f)+c,R=o.l2p(x-m*y)+c,z=o.l2p(x+_*y)+c,H=t.sizemode==="sd",O=l.c2p(H?T.mean-T.sd:T.q1,!0),U=H?l.c2p(T.mean+T.sd,!0):l.c2p(T.q3,!0),V=Zs.constrain(H?l.c2p(T.mean,!0):l.c2p(T.med,!0),Math.min(O,U)+1,Math.max(O,U)-1),Y=T.lf===void 0||t.boxpoints===!1||H,I=l.c2p(Y?T.min:T.lf,!0),G=l.c2p(Y?T.max:T.uf,!0),Z=l.c2p(T.ln,!0),K=l.c2p(T.un,!0);i?ec.select(this).attr("d","M"+V+","+R+"V"+z+"M"+O+","+M+"V"+A+(p?"H"+Z+"L"+V+","+z+"L"+K+","+A:"")+"H"+U+"V"+M+(p?"H"+K+"L"+V+","+R+"L"+Z+","+M:"")+"Z"+(d?"M"+O+","+k+"H"+I+"M"+U+","+k+"H"+G+(h===0?"":"M"+I+","+D+"V"+P+"M"+G+","+D+"V"+P):"")):ec.select(this).attr("d","M"+R+","+V+"H"+z+"M"+M+","+O+"H"+A+(p?"V"+Z+"L"+z+","+V+"L"+A+","+K:"")+"V"+U+"H"+M+(p?"V"+K+"L"+R+","+V+"L"+M+","+Z:"")+"Z"+(d?"M"+k+","+O+"V"+I+"M"+k+","+U+"V"+G+(h===0?"":"M"+D+","+I+"H"+P+"M"+D+","+G+"H"+P):""))})}function aU(e,r,t,a){var n=r.x,i=r.y,l=a.bdPos,o=a.bPos,s=t.boxpoints||t.points;Zs.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=a,d.trace=t}),h},f=e.selectAll("g.points").data(s?u:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(h){var d,p=h.pts2,y=Math.max((h.max-h.min)/10,h.q3-h.q1),m=y*1e-9,_=y*X1e,b=[],T=0,x;if(t.jitter){if(y===0)for(T=1,b=new Array(p.length),d=0;dh.lo&&(P.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(W1e.translatePoints,n,i)}function nU(e,r,t,a){var n=r.val,i=r.pos,l=!!i.rangebreaks,o=a.bPos,s=a.bPosPxOffset||0,u=t.boxmean||(t.meanline||{}).visible,f,c;Array.isArray(a.bdPos)?(f=a.bdPos[0],c=a.bdPos[1]):(f=a.bdPos,c=a.bdPos);var h=e.selectAll("path.mean").data(t.type==="box"&&t.boxmean||t.type==="violin"&&t.box.visible&&t.meanline.visible?Zs.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=i.c2l(d.pos+o,!0),y=i.l2p(p-f)+s,m=i.l2p(p+c)+s,_=l?(y+m)/2:i.l2p(p)+s,b=n.c2p(d.mean,!0),T=n.c2p(d.mean-d.sd,!0),x=n.c2p(d.mean+d.sd,!0);t.orientation==="h"?ec.select(this).attr("d","M"+b+","+y+"V"+m+(u==="sd"?"m0,0L"+T+","+_+"L"+b+","+y+"L"+x+","+_+"Z":"")):ec.select(this).attr("d","M"+y+","+b+"H"+m+(u==="sd"?"m0,0L"+_+","+T+"L"+y+","+b+"L"+_+","+x+"Z":""))})}iU.exports={plot:Z1e,plotBoxAndWhiskers:tU,plotPoints:aU,plotBoxMean:nU}});var sU=B((r6e,oU)=>{"use strict";var a_=kr(),n_=xr(),i_=Br();function J1e(e,r,t){var a=t||a_.select(e).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=a_.select(this),l=n[0].trace,o=l.line.width;function s(c,h,d,p){c.style("stroke-width",h+"px").call(n_.stroke,d).call(n_.fill,p)}var u=i.selectAll("path.box");if(l.type==="candlestick")u.each(function(c){if(!c.empty){var h=a_.select(this),d=l[c.dir];s(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",l.selectedpoints&&!c.selected?.3:1)}});else{s(u,o,l.line.color,l.fillcolor),i.selectAll("path.mean").style({"stroke-width":o,"stroke-dasharray":2*o+"px,"+o+"px"}).call(n_.stroke,l.line.color);var f=i.selectAll("path.point");i_.pointStyle(f,l,e)}})}function $1e(e,r,t){var a=r[0].trace,n=t.selectAll("path.point");a.selectedpoints?i_.selectedPointStyle(n,a):i_.pointStyle(n,a,e)}oU.exports={style:J1e,styleOnSelect:$1e}});var fU=B((t6e,uU)=>{"use strict";uU.exports={moduleType:"trace",name:"candlestick",basePlotModule:gl(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:r_(),layoutAttributes:t_(),supplyLayoutDefaults:YG().supplyLayoutDefaults,crossTraceCalc:XG().crossTraceCalc,supplyDefaults:$G(),calc:eU(),plot:lU().plot,layerName:"boxlayer",style:sU().style,hoverPoints:Qb().hoverPoints,selectPoints:jb()}});var vU=B((a6e,cU)=>{"use strict";cU.exports=fU()});var Ra=B((n6e,dU)=>{"use strict";var hU=Object.getOwnPropertySymbols,K1e=Object.prototype.hasOwnProperty,Q1e=Object.prototype.propertyIsEnumerable;function j1e(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function epe(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}dU.exports=epe()?Object.assign:function(e,r){for(var t,a=j1e(e),n,i=1;i{var Bm=Ra();function pU(){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={}}Bm(pU.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function l_(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function Om(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}Bm(l_.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Rr.local.differentCalendars||Rr.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+Om(Math.abs(this.year()),4)+"-"+Om(this.month(),2)+"-"+Om(this.day(),2)}});function o_(){this.shortYearCutoff="+10"}Bm(o_.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new l_(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+Om(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Rr.local.invalidMonth||Rr.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Rr.local.invalidMonth||Rr.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),l=e.monthOfYear()+(t==="m"?r:0),n=e.day(),o=function(f){for(;lc-1+f.minMonth;)i++,l-=c,c=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,l)&&(l=this.newDate(i,e.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l)))):t==="m"&&(o(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l))));var s=[i,this.fromMonthOfYear(i,l),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,o)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Rr=mU.exports=new pU;Rr.cdate=l_;Rr.baseCalendar=o_;Rr.calendars.gregorian=s_});var yU=B(()=>{var u_=Ra(),pa=za();u_(pa.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"});pa.local=pa.regionalOptions[""];u_(pa.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});u_(pa.baseCalendar.prototype,{UNIX_EPOCH:pa.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:pa.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw pa.local.invalidFormat||pa.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,l=t.monthNamesShort||this.local.monthNamesShort,o=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(x,M){for(var A=1;T+A1},f=function(x,M,A,k){var L=""+M;if(u(x,k))for(;L.length1},b=function(z,H){var O=_(z,H),U=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],V=new RegExp("^-?\\d{1,"+U+"}"),Y=r.substring(L).match(V);if(!Y)throw(pa.local.missingNumberAt||pa.regionalOptions[""].missingNumberAt).replace(/\{0\}/,L);return L+=Y[0].length,parseInt(Y[0],10)},T=this,x=function(){if(typeof o=="function"){_("m");var z=o.call(T,r.substring(L));return L+=z.length,z}return b("m")},M=function(z,H,O,U){for(var V=_(z,U)?O:H,Y=0;Y-1){h=1,d=p;for(var R=this.daysInMonth(c,h);d>R;R=this.daysInMonth(c,h))h++,d-=R}return f>-1?this.fromJD(f):this.newDate(c,h,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,l=function(o){try{return i.parseDate(a,o,n)}catch(c){}o=o.toLowerCase();for(var s=(o.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(o);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(o);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?l(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var gU=B(()=>{var ko=za(),rpe=Ra(),f_=ko.instance();function Ym(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ym.prototype=new ko.baseCalendar;rpe(Ym.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(ape);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(npe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(ipe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw ko.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw ko.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,ko.local.invalidyear),n=Co[a-Co[0]],i=n>>9&4095,l=n>>5&15,o=n&31,s;s=f_.newDate(i,l,o),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=qo[e-qo[0]],a=t>>13,n=a?12:11;if(r>n)throw ko.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,ko.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),l=ope(e,i,t,n);return f_.toJD(l.year,l.month,l.day)},fromJD:function(e){var r=f_.fromJD(e),t=lpe(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match(tpe),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),l=+r[4];return this.newDate(t,i,l)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),l=this.toChineseMonth(a,n),o=Object.getPrototypeOf(Ym.prototype).add.call(this,e,r,t);if(t==="y"){var s=o.year(),u=o.month(),f=this.isIntercalaryMonth(s,l),c=i&&f?this.toMonthIndex(s,l,!0):this.toMonthIndex(s,l,!1);c!==u&&o.month(c)}return o}});var tpe=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,ape=/^\d?\d[iI]?/m,npe=/^闰?十?[一二三四五六七八九]?月/m,ipe=/^闰?十?[一二三四五六七八九]?/m;ko.calendars.chinese=Ym;var qo=[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],Co=[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 lpe(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var o=typeof r=="number"&&r>=1&&r<=12;if(!o)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=Co[n.year-Co[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=Co[i.year-Co[0]];var c=u>>9&4095,h=u>>5&15,d=u&31,p,y=new Date(c,h-1,d),m=new Date(n.year,n.month-1,n.day);p=Math.round((m-y)/(24*3600*1e3));var _=qo[i.year-qo[0]],b;for(b=0;b<13;b++){var T=_&1<<12-b?30:29;if(p>13;return!x||b=1888&&e<=2111;if(!o)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),l={year:e,month:r,day:t,isIntercalary:f}}var c;c=l.day-1;var h=qo[l.year-qo[0]],d=h>>13,p;d&&(l.month>d||l.isIntercalary)?p=l.month:p=l.month-1;for(var y=0;y>9&4095,T=_>>5&15,x=_&31,M=new Date(b,T-1,x+c);return i.year=M.getFullYear(),i.month=1+M.getMonth(),i.day=M.getDate(),i}});var xU=B(()=>{var Js=za(),spe=Ra();function c_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}c_.prototype=new Js.baseCalendar;spe(c_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Js.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Js.local.invalidYear||Js.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Js.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Js.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});Js.calendars.coptic=c_});var bU=B(()=>{var Ll=za(),upe=Ra();function v_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}v_.prototype=new Ll.baseCalendar;upe(v_.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ll.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ll.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ll.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Ll.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Ll.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Ll.local.invalidDate);return{century:fpe[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,Ll.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var fpe={20:"Fruitbat",21:"Anchovy"};Ll.calendars.discworld=v_});var _U=B(()=>{var $s=za(),cpe=Ra();function h_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}h_.prototype=new $s.baseCalendar;cpe(h_.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(t){var r=this._validate(t,this.minMonth,this.minDay,$s.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$s.local.invalidYear||$s.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,$s.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,$s.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});$s.calendars.ethiopian=h_});var wU=B(()=>{var Lo=za(),vpe=Ra();function d_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}d_.prototype=new Lo.baseCalendar;vpe(d_.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Lo.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,Gm(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Lo.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Lo.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Lo.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&Gm(this.daysInYear(e),10)===5?30:r===9&&Gm(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Lo.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Lo.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var l=7;l<=this.monthsInYear(e);l++)i+=this.daysInMonth(e,l);for(var l=1;l=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function Gm(e,r){return e-r*Math.floor(e/r)}Lo.calendars.hebrew=d_});var TU=B(()=>{var w0=za(),hpe=Ra();function p_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}p_.prototype=new w0.baseCalendar;hpe(p_.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,w0.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,w0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,w0.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});w0.calendars.islamic=p_});var MU=B(()=>{var T0=za(),dpe=Ra();function m_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}m_.prototype=new T0.baseCalendar;dpe(m_.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(t){var r=this._validate(t,this.minMonth,this.minDay,T0.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,T0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,T0.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),l=i-Math.floor(i<14?1:13),o=a-Math.floor(l>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,l,s)}});T0.calendars.julian=m_});var kU=B(()=>{var ti=za(),ppe=Ra();function g_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}g_.prototype=new ti.baseCalendar;ppe(g_.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,ti.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,ti.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ti.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,ti.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ti.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,ti.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,ti.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,ti.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,ti.local.invalidDate),n=a.toJD(),i=this._toHaab(n),l=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=y_(e+8+17*20,365);return[Math.floor(r/20)+1,y_(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[AU(e+20,20),AU(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,ti.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function y_(e,r){return e-r*Math.floor(e/r)}function AU(e,r){return y_(e-1,r)+1}ti.calendars.mayan=g_});var CU=B(()=>{var Ks=za(),mpe=Ra();function x_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}x_.prototype=new Ks.baseCalendar;var qU=Ks.instance("gregorian");mpe(x_.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 r=this._validate(e,this.minMonth,this.minDay,Ks.local.invalidYear||Ks.regionalOptions[""].invalidYear);return qU.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Ks.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Ks.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),l=1;l=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});Ks.calendars.nanakshahi=x_});var LU=B(()=>{var Qs=za(),ype=Ra();function b_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b_.prototype=new Qs.baseCalendar;ype(b_.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Qs.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Qs.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,Qs.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=Qs.instance(),i=0,l=r,o=e;this._createMissingCalendarData(e);var s=e-(l>9||l===9&&t>=this.NEPALI_CALENDAR_DATA[o][0]?56:57);for(r!==9&&(i=t,l--);l!==9;)l<=0&&(l=12,o--),i+=this.NEPALI_CALENDAR_DATA[o][l],l--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[o][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[o][9]-this.NEPALI_CALENDAR_DATA[o][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=Qs.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var l=9,o=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][l]-o+1;n>s;)l++,l>12&&(l=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][l];var u=this.NEPALI_CALENDAR_DATA[i][l]-(s-n);return this.newDate(i,l,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var rc=za(),gpe=Ra();function Um(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Um.prototype=new rc.baseCalendar;gpe(Um.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,rc.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,rc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,rc.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+__(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=__(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),l=__(a,366);n=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var o=n+2820*t+474;o=o<=0?o-1:o;var s=e-this.toJD(o,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(o,u,1)+1;return this.newDate(o,u,f)}});function __(e,r){return e-r*Math.floor(e/r)}rc.calendars.persian=Um;rc.calendars.jalali=Um});var DU=B(()=>{var js=za(),xpe=Ra(),Vm=js.instance();function w_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}w_.prototype=new js.baseCalendar;xpe(w_.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(t){var r=this._validate(t,this.minMonth,this.minDay,js.local.invalidYear),t=this._t2gYear(r.year());return Vm.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,js.local.invalidYear),n=this._t2gYear(a.year());return Vm.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,js.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,js.local.invalidDate),n=this._t2gYear(a.year());return Vm.toJD(n,a.month(),a.day())},fromJD:function(e){var r=Vm.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});js.calendars.taiwan=w_});var EU=B(()=>{var eu=za(),bpe=Ra(),Wm=eu.instance();function T_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}T_.prototype=new eu.baseCalendar;bpe(T_.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(t){var r=this._validate(t,this.minMonth,this.minDay,eu.local.invalidYear),t=this._t2gYear(r.year());return Wm.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,eu.local.invalidYear),n=this._t2gYear(a.year());return Wm.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,eu.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,eu.local.invalidDate),n=this._t2gYear(a.year());return Wm.toJD(n,a.month(),a.day())},fromJD:function(e){var r=Wm.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});eu.calendars.thai=T_});var PU=B(()=>{var ru=za(),_pe=Ra();function M_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M_.prototype=new ru.baseCalendar;_pe(M_.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 r=this._validate(e,this.minMonth,this.minDay,ru.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,ru.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return So[n]-So[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,ru.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+So[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),l=i+1,o=n-12*i,s=r-So[t-1]+1;return this.newDate(l,o,s)},isValid:function(e,r,t){var a=ru.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=ru.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});ru.calendars.ummalqura=M_;var So=[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 zU=B((N6e,RU)=>{"use strict";RU.exports=za();yU();gU();xU();bU();_U();wU();TU();MU();kU();CU();LU();SU();DU();EU();PU()});var YU=B((F6e,BU)=>{"use strict";var FU=zU(),M0=Pe(),IU=wt(),wpe=IU.EPOCHJD,Tpe=IU.ONEDAY,q_={valType:"enumerated",values:M0.sortObjectKeys(FU.calendars),editType:"calc",dflt:"gregorian"},HU=function(e,r,t,a){var n={};return n[t]=q_,M0.coerce(e,r,n,t,a)},Mpe=function(e,r,t,a){for(var n=0;n{"use strict";GU.exports=YU()});var Spe=B((H6e,WU)=>{var VU=nF();VU.register([lI(),ZI(),LH(),pO(),aB(),kB(),nG(),SG(),vU(),UU()]);WU.exports=VU});return Spe();})(); +`+Ow(i.dayMonthYear,e,a,n);return Ow(r,e,a,n)};var Bw=3*ln;Ht.incrementMonth=function(e,r,t){t=ll(t)&&t;var a=Hl(e,ln);if(e=Math.round(e-a),t)try{var n=Math.round(e/ln)+Ac,i=il.getComponentMethod("calendars","getCal")(t),l=i.fromJD(n);return r%12?i.add(l,r,"m"):i.add(l,r/12,"y"),(l.toJD()-Ac)*ln+a}catch(s){Zy.error("invalid ms "+e+" in calendar "+t)}var o=new Date(e+Bw);return o.setUTCMonth(o.getUTCMonth()+r)+a-Bw};Ht.findExactDates=function(e,r){for(var t=0,a=0,n=0,i=0,l,o,s=ll(r)&&il.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";Vw.exports=function(r){return r}});var Ky=B(ol=>{"use strict";var oJ=zr(),sJ=Go(),uJ=Jy(),fJ=wt().BADNUM,$y=1e-9;ol.findBin=function(e,r,t){if(oJ(r.start))return t?Math.ceil((e-r.start)/r.size-$y)-1:Math.floor((e-r.start)/r.size+$y);var a=0,n=r.length,i=0,l=n>1?(r[n-1]-r[0])/(n-1):1,o,s;for(l>=0?s=t?cJ:vJ:s=t?dJ:hJ,e+=l*$y*(t?-1:1)*(l>=0?1:-1);a90&&sJ.log("Long binary search..."),a-1};function cJ(e,r){return er}function dJ(e,r){return e>=r}ol.sorterAsc=function(e,r){return e-r};ol.sorterDes=function(e,r){return r-e};ol.distinctVals=function(e){var r=e.slice();r.sort(ol.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===fJ;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],l,o=0;o<=t;o++){var s=r[o],u=s-l;l===void 0?(i.push(s),l=s):u>n&&(a=Math.min(a,u),i.push(s),l=s)}return{vals:i,minDiff:a}};ol.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,l=0,o=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};ol.findIndexOfMin=function(e,r){r=r||uJ;for(var t=1/0,a,n=0;n{"use strict";Ww.exports=function(r){return Object.keys(r).sort()}});var Xw=B(Ot=>{"use strict";var kc=zr(),pJ=gn().isArrayOrTypedArray;Ot.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),kc(r)||(r=!1),pJ(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var Qw=B((uye,Kw)=>{"use strict";var Zw=hu(),jy=Zw.mod,mJ=Zw.modHalf,qc=Math.PI,Ol=2*qc;function yJ(e){return e/180*qc}function gJ(e){return e/qc*180}function eg(e){return Math.abs(e[1]-e[0])>Ol-1e-14}function Jw(e,r){return mJ(r-e,Ol)}function xJ(e,r){return Math.abs(Jw(e,r))}function $w(e,r){if(eg(r))return!0;var t,a;r[0]a&&(a+=Ol);var n=jy(e,Ol),i=n+Ol;return n>=t&&n<=a||i>=t&&i<=a}function bJ(e,r,t,a){if(!$w(r,a))return!1;var n,i;return t[0]=n&&e<=i}function rg(e,r,t,a,n,i,l){n=n||0,i=i||0;var o=eg([t,a]),s,u,f,c,h;o?(s=0,u=qc,f=Ol):t{"use strict";Vo.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};Vo.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};Vo.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};Vo.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};Vo.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};Vo.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var t8=B(Wo=>{"use strict";var tg=hu().mod;Wo.segmentsIntersect=r8;function r8(e,r,t,a,n,i,l,o){var s=t-e,u=n-e,f=l-n,c=a-r,h=i-r,d=o-i,p=s*d-f*c;if(p===0)return null;var y=(u*d-f*h)/p,m=(u*c-s*h)/p;return m<0||m>1||y<0||y>1?null:{x:e+s*y,y:r+c*y}}Wo.segmentDistance=function(r,t,a,n,i,l,o,s){if(r8(r,t,a,n,i,l,o,s))return 0;var u=a-r,f=n-t,c=o-i,h=s-l,d=u*u+f*f,p=c*c+h*h,y=Math.min(qh(u,f,d,i-r,l-t),qh(u,f,d,o-r,s-t),qh(c,h,p,r-i,t-l),qh(c,h,p,a-i,n-l));return Math.sqrt(y)};function qh(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var l=a-e,o=n-r;return l*l+o*o}else{var s=a*r-n*e;return s*s/t}}var Ch,ag,e8;Wo.getTextLocation=function(r,t,a,n){if((r!==ag||n!==e8)&&(Ch={},ag=r,e8=n),Ch[a])return Ch[a];var i=r.getPointAtLength(tg(a-n/2,t)),l=r.getPointAtLength(tg(a+n/2,t)),o=Math.atan((l.y-i.y)/(l.x-i.x)),s=r.getPointAtLength(tg(a,t)),u=(s.x*4+i.x+l.x)/6,f=(s.y*4+i.y+l.y)/6,c={x:u,y:f,theta:o};return Ch[a]=c,c};Wo.clearLocationCache=function(){ag=null};Wo.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,l=t.top,o=t.bottom,s=0,u=r.getTotalLength(),f=u,c,h;function d(y){var m=r.getPointAtLength(y);y===0?c=m:y===u&&(h=m);var _=m.xi?m.x-i:0,b=m.yo?m.y-o:0;return Math.sqrt(_*_+b*b)}for(var p=d(s);p;){if(s+=p+a,s>f)return;p=d(s)}for(p=d(f);p;){if(f-=p+a,s>f)return;p=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};Wo.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),l=n.tolerance||.001,o=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,c=i,h,d,p;u0?c=h:f=h,u++}return d}});var Lh=B(Cc=>{"use strict";var sl={};Cc.throttle=function(r,t,a){var n=sl[r],i=Date.now();if(!n){for(var l in sl)sl[l].tsn.ts+t){o();return}n.timer=setTimeout(function(){o(),n.timer=null},t)};Cc.done=function(e){var r=sl[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};Cc.clear=function(e){if(e)a8(sl[e]),delete sl[e];else for(var r in sl)Cc.clear(r)};function a8(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var i8=B((hye,n8)=>{"use strict";n8.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var l8=B((dye,Sh)=>{"use strict";Sh.exports=ng;Sh.exports.isMobile=ng;Sh.exports.default=ng;var MJ=/(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,AJ=/CrOS/,kJ=/android|ipad|playbook|silk/i;function ng(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=MJ.test(r)&&!AJ.test(r)||!!e.tablet&&kJ.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var s8=B((pye,o8)=>{"use strict";var qJ=zr(),CJ=l8();o8.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=LJ(),typeof t!="string")return!0;var a=CJ({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;o--){var s=n[o];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(qJ(u)&&(u=+u),u>=13)return!0}}}return a};function LJ(){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 f8=B((mye,u8)=>{"use strict";var SJ=kr();u8.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(l){return l[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(l){l[0][i]=SJ.select(this)}),n}});var v8=B((yye,c8)=>{"use strict";var DJ=yr();c8.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,l=0;l<2;l++){var o=(i[a]||{}).dictionary;if(o){var s=o[t];if(s)return s}i=DJ.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var d8=B((gye,h8)=>{"use strict";h8.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";p8.exports=function(r){for(var t=RJ(r)?PJ:EJ,a=[],n=0;n{"use strict";y8.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var l=String(t).length,o=String(r).length;if(i>=o+l){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var b8=B((_ye,x8)=>{"use strict";var zJ=zr(),NJ=wt().BADNUM,FJ=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;x8.exports=function(r){return typeof r=="string"&&(r=r.replace(FJ,"")),zJ(r)?Number(r):NJ}});var Pe=B((wye,P8)=>{"use strict";var Lc=kr(),IJ=cu().utcFormat,HJ=Ay().format,k8=zr(),q8=wt(),C8=q8.FP_SAFE,OJ=-C8,_8=q8.BADNUM,de=P8.exports={};de.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var w8={};de.warnBadFormat=function(e){var r=String(e);w8[r]||(w8[r]=1,de.warn('encountered bad format: "'+r+'"'))};de.noFormat=function(e){return String(e)};de.numberFormat=function(e){var r;try{r=HJ(de.adjustFormat(e))}catch(t){return de.warnBadFormat(e),de.noFormat}return r};de.nestedProperty=lh();de.keyedContainer=v6();de.relativeAttr=d6();de.isPlainObject=Pl();de.toLogRange=sh();de.relinkPrivateKeys=g6();var Bl=gn();de.isArrayBuffer=Bl.isArrayBuffer;de.isTypedArray=Bl.isTypedArray;de.isArrayOrTypedArray=Bl.isArrayOrTypedArray;de.isArray1D=Bl.isArray1D;de.ensureArray=Bl.ensureArray;de.concat=Bl.concat;de.maxRowLength=Bl.maxRowLength;de.minRowLength=Bl.minRowLength;var L8=hu();de.mod=L8.mod;de.modHalf=L8.modHalf;var Yl=F6();de.valObjectMeta=Yl.valObjectMeta;de.coerce=Yl.coerce;de.coerce2=Yl.coerce2;de.coerceFont=Yl.coerceFont;de.coercePattern=Yl.coercePattern;de.coerceHoverinfo=Yl.coerceHoverinfo;de.coerceSelectionMarkerOpacity=Yl.coerceSelectionMarkerOpacity;de.validate=Yl.validate;var xn=Uw();de.dateTime2ms=xn.dateTime2ms;de.isDateTime=xn.isDateTime;de.ms2DateTime=xn.ms2DateTime;de.ms2DateTimeLocal=xn.ms2DateTimeLocal;de.cleanDate=xn.cleanDate;de.isJSDate=xn.isJSDate;de.formatDate=xn.formatDate;de.incrementMonth=xn.incrementMonth;de.dateTick0=xn.dateTick0;de.dfltRange=xn.dfltRange;de.findExactDates=xn.findExactDates;de.MIN_MS=xn.MIN_MS;de.MAX_MS=xn.MAX_MS;var Xo=Ky();de.findBin=Xo.findBin;de.sorterAsc=Xo.sorterAsc;de.sorterDes=Xo.sorterDes;de.distinctVals=Xo.distinctVals;de.roundUp=Xo.roundUp;de.sort=Xo.sort;de.findIndexOfMin=Xo.findIndexOfMin;de.sortObjectKeys=Qy();var ul=Xw();de.aggNums=ul.aggNums;de.len=ul.len;de.mean=ul.mean;de.geometricMean=ul.geometricMean;de.median=ul.median;de.midRange=ul.midRange;de.variance=ul.variance;de.stdev=ul.stdev;de.interp=ul.interp;var ci=mh();de.init2dArray=ci.init2dArray;de.transposeRagged=ci.transposeRagged;de.dot=ci.dot;de.translationMatrix=ci.translationMatrix;de.rotationMatrix=ci.rotationMatrix;de.rotationXYMatrix=ci.rotationXYMatrix;de.apply3DTransform=ci.apply3DTransform;de.apply2DTransform=ci.apply2DTransform;de.apply2DTransform2=ci.apply2DTransform2;de.convertCssMatrix=ci.convertCssMatrix;de.inverseTransformMatrix=ci.inverseTransformMatrix;var Fi=Qw();de.deg2rad=Fi.deg2rad;de.rad2deg=Fi.rad2deg;de.angleDelta=Fi.angleDelta;de.angleDist=Fi.angleDist;de.isFullCircle=Fi.isFullCircle;de.isAngleInsideSector=Fi.isAngleInsideSector;de.isPtInsideSector=Fi.isPtInsideSector;de.pathArc=Fi.pathArc;de.pathSector=Fi.pathSector;de.pathAnnulus=Fi.pathAnnulus;var Au=jw();de.isLeftAnchor=Au.isLeftAnchor;de.isCenterAnchor=Au.isCenterAnchor;de.isRightAnchor=Au.isRightAnchor;de.isTopAnchor=Au.isTopAnchor;de.isMiddleAnchor=Au.isMiddleAnchor;de.isBottomAnchor=Au.isBottomAnchor;var ku=t8();de.segmentsIntersect=ku.segmentsIntersect;de.segmentDistance=ku.segmentDistance;de.getTextLocation=ku.getTextLocation;de.clearLocationCache=ku.clearLocationCache;de.getVisibleSegment=ku.getVisibleSegment;de.findPointOnPath=ku.findPointOnPath;var Ph=mt();de.extendFlat=Ph.extendFlat;de.extendDeep=Ph.extendDeep;de.extendDeepAll=Ph.extendDeepAll;de.extendDeepNoArrays=Ph.extendDeepNoArrays;var ig=Go();de.log=ig.log;de.warn=ig.warn;de.error=ig.error;var BJ=mu();de.counterRegex=BJ.counter;var lg=Lh();de.throttle=lg.throttle;de.throttleDone=lg.done;de.clearThrottle=lg.clear;var vi=wc();de.getGraphDiv=vi.getGraphDiv;de.isPlotDiv=vi.isPlotDiv;de.removeElement=vi.removeElement;de.addStyleRule=vi.addStyleRule;de.addRelatedStyleRule=vi.addRelatedStyleRule;de.deleteRelatedStyleRule=vi.deleteRelatedStyleRule;de.setStyleOnHover=vi.setStyleOnHover;de.getFullTransformMatrix=vi.getFullTransformMatrix;de.getElementTransformMatrix=vi.getElementTransformMatrix;de.getElementAndAncestors=vi.getElementAndAncestors;de.equalDomRects=vi.equalDomRects;de.clearResponsive=i8();de.preserveDrawingBuffer=s8();de.makeTraceGroups=f8();de._=v8();de.notifier=Ny();de.filterUnique=d8();de.filterVisible=m8();de.pushUnique=Hy();de.increment=g8();de.cleanNumber=b8();de.ensureNumber=function(r){return k8(r)?(r=Number(r),r>C8||r=r?!1:k8(e)&&e>=0&&e%1===0};de.noop=ph();de.identity=Jy();de.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};de.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};de.simpleMap=function(e,r,t,a,n){for(var i=e.length,l=new Array(i),o=0;o=Math.pow(2,t)?n>10?(de.warn("randstr failed uniqueness"),l):e(r,t,a,(n||0)+1):l};de.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};de.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),l=new Array(t),o,s,u,f;for(o=0;o=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];l[o]=f}return l};de.syncOrAsync=function(e,r,t){var a,n;function i(){return de.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};de.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};de.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,l;for(i=0;i0?n:0})};de.fillArray=function(e,r,t,a){if(a=a||de.identity,de.isArrayOrTypedArray(e))for(var n=0;n1?n+l[1]:"";if(i&&(l.length>1||o.length>4||t))for(;a.test(o);)o=o.replace(a,"$1"+i+"$2");return o+s};de.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var E8=/^\w*$/;de.templateString=function(e,r){var t={};return e.replace(de.TEMPLATE_STRING_REGEX,function(a,n){var i;return E8.test(n)?i=r[n]:(t[n]=t[n]||de.nestedProperty(r,n).get,i=t[n]()),de.isValidTextValue(i)?i:""})};var XJ={max:10,count:0,name:"hovertemplate"};de.hovertemplateString=function(){return og.apply(XJ,arguments)};var ZJ={max:10,count:0,name:"texttemplate"};de.texttemplateString=function(){return og.apply(ZJ,arguments)};var JJ=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $J(e){var r=e.match(JJ);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var KJ={max:10,count:0,name:"texttemplate",parseMultDiv:!0};de.texttemplateStringForShapes=function(){return og.apply(KJ,arguments)};var T8=/^[:|\|]/;function og(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(de.TEMPLATE_STRING_REGEX,function(l,o,s){var u=o==="xother"||o==="yother",f=o==="_xother"||o==="_yother",c=o==="_xother_"||o==="_yother_",h=o==="xother_"||o==="yother_",d=u||f||h||c,p=o;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var y=null,m=null;if(a.parseMultDiv){var _=$J(p);p=_.key,y=_.op,m=_.number}var b;if(d){if(b=r[p],b===void 0)return""}else{var T,x;for(x=3;x=Eh&&l<=M8,u=o>=Eh&&o<=M8;if(s&&(a=10*a+l-Eh),u&&(n=10*n+o-Eh),!s||!u){if(a!==n)return a-n;if(l!==o)return l-o}}return n-a};var Mu=2e9;de.seedPseudoRandom=function(){Mu=2e9};de.pseudoRandom=function(){var e=Mu;return Mu=(69069*Mu+1)%4294967296,Math.abs(Mu-e)<429496729?de.pseudoRandom():Mu/4294967296};de.fillText=function(e,r,t){var a=Array.isArray(t)?function(l){t.push(l)}:function(l){t.text=l},n=de.extractOption(e,r,"htx","hovertext");if(de.isValidTextValue(n))return a(n);var i=de.extractOption(e,r,"tx","text");if(de.isValidTextValue(i))return a(i)};de.isValidTextValue=function(e){return e||e===0};de.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,de.strTranslate(n-u*(t+l),i-u*(a+o))+de.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};de.setTransormAndDisplay=function(e,r){e.attr("transform",de.getTextTransform(r)),e.style("display",r.scale?null:"none")};de.ensureUniformFontSize=function(e,r){var t=de.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};de.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};de.bigFont=function(e){return Math.round(1.2*e)};var A8=de.getFirefoxVersion(),QJ=A8!==null&&A8<86;de.getPositionFromD3Event=function(){return QJ?[Lc.event.layerX,Lc.event.layerY]:[Lc.event.offsetX,Lc.event.offsetY]}});var N8=B(()=>{"use strict";var jJ=Pe(),R8={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(sg in R8)z8=sg.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jJ.addStyleRule(z8,R8[sg]);var z8,sg});var ug=B((Aye,F8)=>{F8.exports=!0});var cg=B((kye,I8)=>{"use strict";var e$=ug(),fg;typeof window.matchMedia=="function"?fg=!window.matchMedia("(hover: none)").matches:fg=e$;I8.exports=fg});var Nh=B((qye,vg)=>{"use strict";var qu=typeof Reflect=="object"?Reflect:null,H8=qu&&typeof qu.apply=="function"?qu.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},Rh;qu&&typeof qu.ownKeys=="function"?Rh=qu.ownKeys:Object.getOwnPropertySymbols?Rh=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:Rh=function(r){return Object.getOwnPropertyNames(r)};function r$(e){console&&console.warn&&console.warn(e)}var B8=Number.isNaN||function(r){return r!==r};function yt(){yt.init.call(this)}vg.exports=yt;vg.exports.once=i$;yt.EventEmitter=yt;yt.prototype._events=void 0;yt.prototype._eventsCount=0;yt.prototype._maxListeners=void 0;var O8=10;function zh(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(yt,"defaultMaxListeners",{enumerable:!0,get:function(){return O8},set:function(e){if(typeof e!="number"||e<0||B8(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");O8=e}});yt.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};yt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||B8(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Y8(e){return e._maxListeners===void 0?yt.defaultMaxListeners:e._maxListeners}yt.prototype.getMaxListeners=function(){return Y8(this)};yt.prototype.emit=function(r){for(var t=[],a=1;a0&&(l=t[0]),l instanceof Error)throw l;var o=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw o.context=l,o}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")H8(s,this,t);else for(var u=s.length,f=X8(s,u),a=0;a0&&l.length>n&&!l.warned){l.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=r,o.count=l.length,r$(o)}return e}yt.prototype.addListener=function(r,t){return G8(this,r,t,!1)};yt.prototype.on=yt.prototype.addListener;yt.prototype.prependListener=function(r,t){return G8(this,r,t,!0)};function t$(){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 U8(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=t$.bind(a);return n.listener=t,a.wrapFn=n,n}yt.prototype.once=function(r,t){return zh(t),this.on(r,U8(this,r,t)),this};yt.prototype.prependOnceListener=function(r,t){return zh(t),this.prependListener(r,U8(this,r,t)),this};yt.prototype.removeListener=function(r,t){var a,n,i,l,o;if(zh(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,l=a.length-1;l>=0;l--)if(a[l]===t||a[l].listener===t){o=a[l].listener,i=l;break}if(i<0)return this;i===0?a.shift():a$(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,o||t)}return this};yt.prototype.off=yt.prototype.removeListener;yt.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),l;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function V8(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?n$(n):X8(n,n.length)}yt.prototype.listeners=function(r){return V8(this,r,!0)};yt.prototype.rawListeners=function(r){return V8(this,r,!1)};yt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):W8.call(e,r)};yt.prototype.listenerCount=W8;function W8(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}yt.prototype.eventNames=function(){return this._eventsCount>0?Rh(this._events):[]};function X8(e,r){for(var t=new Array(r),a=0;a{"use strict";var hg=Nh().EventEmitter,o$={init:function(e){if(e._ev instanceof hg)return e;var r=new hg,t=new hg;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function l(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var o;for(o=0;o{"use strict";var $8=Pe(),s$=Yo().dfltConfig;function u$(e,r){for(var t=[],a,n=0;ns$.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};fl.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};fl.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};fl.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";j8.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var Su=B(Zt=>{"use strict";var Fn=yr(),Dc=Pe(),Ih=tn(),pg=xu(),f$=dg(),c$=Tc(),v$=Yo().configAttributes,e9=ui(),hi=Dc.extendDeepAll,Cu=Dc.isPlainObject,h$=Dc.isArrayOrTypedArray,Hh=Dc.nestedProperty,d$=Dc.valObjectMeta,mg="_isSubplotObj",Oh="_isLinkedToArray",p$="_arrayAttrRegexps",t9="_deprecated",yg=[mg,Oh,p$,t9];Zt.IS_SUBPLOT_OBJ=mg;Zt.IS_LINKED_TO_ARRAY=Oh;Zt.DEPRECATED=t9;Zt.UNDERSCORE_ATTRS=yg;Zt.get=function(){var e={};return Fn.allTypes.forEach(function(r){e[r]=y$(r)}),{defs:{valObjects:d$,metaKeys:yg.concat(["description","role","editType","impliedEdits"]),editType:{traces:e9.traces,layout:e9.layout},impliedEdits:{}},traces:e,layout:g$(),frames:x$(),animation:Lu(c$),config:Lu(v$)}};Zt.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var l=e[i];if(yg.indexOf(i)===-1){var o=(a?a+".":"")+i;r(l,i,e,n,o),!Zt.isValObject(l)&&Cu(l)&&i!=="impliedEdits"&&Zt.crawl(l,r,n+1,o)}})};Zt.isValObject=function(e){return e&&e.valType!==void 0};Zt.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function l(s,u,f,c){t=t.slice(0,c).concat([u]),a=a.slice(0,c).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[c-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&o(n,0,"")}function o(s,u,f){var c=s[t[u]],h=f+t[u];if(u===t.length-1)h$(c)&&r.push(i+h);else if(a[u]){if(Array.isArray(c))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var l=r[t];if(!Fh(l))return!1;e=i[n][l]}else e=i[n]}else e=i}}return e}function Fh(e){return e===Math.round(e)&&e>=0}function y$(e){var r,t;r=Fn.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=hi({},Ih),i=hi({},r.attributes);Zt.crawl(i,function(s,u,f,c,h){Hh(n,h).set(void 0),s===void 0&&Hh(i,h).set(void 0)}),hi(a,n),Fn.traceIs(e,"noOpacity")&&delete a.opacity,Fn.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),Fn.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,hi(a,i),t.attributes&&hi(a,t.attributes),a.type=e;var l={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:Lu(a)};if(r.layoutAttributes){var o={};hi(o,r.layoutAttributes),l.layoutAttributes=Lu(o)}return r.animatable||Zt.crawl(l,function(s){Zt.isValObject(s)&&"anim"in s&&delete s.anim}),l}function g$(){var e={},r,t;hi(e,pg);for(r in Fn.subplotsRegistry)if(t=Fn.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var Du=Pe(),M$=tn(),Gl="templateitemname",gg={name:{valType:"string",editType:"none"}};gg[Gl]={valType:"string",editType:"calc"};Zo.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=gg.name,r[Gl]=gg[Gl],r};Zo.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=Du.coerce(i,{},M$,"type");var l={type:t,_template:null};if(t in r){a=e[t];var o=r[t]%a.length;r[t]++,l._template=a[o]}return l}return{newTrace:n}};Zo.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);Du.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};Zo.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[i9(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var l={};function o(u){var f={name:u.name,_input:u},c=f[Gl]=u[Gl];if(!n9(c))return f._template=n,f;for(var h=0;h=a&&(t._input||{})._templateitemname;i&&(n=a);var l=r+"["+n+"]",o;function s(){o={},i&&(o[l]={},o[l][Gl]=i)}s();function u(d,p){o[d]=p}function f(d,p){i?Du.nestedProperty(o[l],d).set(p):o[l+"."+d]=p}function c(){var d=o;return s(),d}function h(d,p){d&&f(d,p);var y=c();for(var m in y)Du.nestedProperty(e,m).set(y[m])}return{modifyBase:u,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var wa=B((Pye,l9)=>{"use strict";var Ec=mu().counter;l9.exports={idRegex:{x:Ec("x","( domain)?"),y:Ec("y","( domain)?")},attrRegex:Ec("[xy]axis"),xAxisMatch:Ec("xaxis"),yAxisMatch:Ec("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 Jt=B(on=>{"use strict";var A$=yr(),xg=wa();on.id2name=function(r){if(!(typeof r!="string"||!r.match(xg.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};on.name2id=function(r){if(r.match(xg.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};on.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(xg.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};on.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=on.listIds(e,r),i=new Array(n.length),l;for(l=0;la?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};on.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function o9(e,r){if(r&&r.length){for(var t=0;t{"use strict";function k$(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function q$(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}s9.exports={clearOutlineControllers:k$,clearOutline:q$}});var Bh=B((Nye,u9)=>{"use strict";u9.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var bg=B(Gh=>{"use strict";var Yh=yr(),Fye=wa().SUBPLOT_PATTERN;Gh.getSubplotCalcData=function(e,r,t){var a=Yh.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],l=0;l{"use strict";var C$=yr(),Eu=Pe();Jo.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var l=Jo.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(l)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(l){f9(e,l,n.cache),n.check=function(){if(i){var f=f9(e,l,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:l.type,prop:l.prop,traces:l.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var o=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;Eu.isPlainObject(i)?_g(i,r,l,a+1):r(l,n,i)}})}});var St=B((Oye,q9)=>{"use strict";var b9=kr(),S$=cu().timeFormatLocale,D$=Ay().formatLocale,Pc=zr(),E$=ky(),Jr=yr(),_9=Su(),P$=ot(),ur=Pe(),w9=xr(),d9=wt().BADNUM,sn=Jt(),R$=Ul().clearOutline,z$=Bh(),wg=Tc(),N$=dg(),F$=bg().getModuleCalcData,p9=ur.relinkPrivateKeys,$o=ur._,je=q9.exports={};ur.extendFlat(je,Jr);je.attributes=tn();je.attributes.type.values=je.allTypes;je.fontAttrs=jt();je.layoutAttributes=xu();var Vh=h9();je.executeAPICommand=Vh.executeAPICommand;je.computeAPICommandBindings=Vh.computeAPICommandBindings;je.manageCommandObserver=Vh.manageCommandObserver;je.hasSimpleAPICommandBindings=Vh.hasSimpleAPICommandBindings;je.redrawText=function(e){return e=ur.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Jr.getComponentMethod("annotations","draw")(e),Jr.getComponentMethod("legend","draw")(e),Jr.getComponentMethod("colorbar","draw")(e),r(je.previousPromises(e)))},300)})};je.resize=function(e){e=ur.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||ur.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||ur.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Jr.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};je.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};je.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=ur.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:w9.defaultLine,"pointer-events":"all"}).each(function(){var u=b9.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),l=t.select(".js-link-spacer"),o=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&I$(e,i),l.text(i.text()&&o.text()?" - ":"")}};function I$(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){je.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}je.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=b9.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=je.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var H$=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],O$=["year","month","dayMonth","dayMonthYear"];je.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},l=e._fullData||[],o=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},c;e._transitionData||je.createTransitionData(e),n._dfltTitle={plot:$o(e,"Click to enter Plot title"),subtitle:$o(e,"Click to enter Plot subtitle"),x:$o(e,"Click to enter X axis title"),y:$o(e,"Click to enter Y axis title"),colorbar:$o(e,"Click to enter Colorscale title"),annotation:$o(e,"new text")},n._traceWord=$o(e,"trace");var h=m9(e,H$);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,p=a.height;je.supplyLayoutGlobalDefaults(i,n,h),i.width||(n.width=d),i.height||(n.height=p),je.sanitizeMargins(n)}else{je.supplyLayoutGlobalDefaults(i,n,h);var y=!i.width||!i.height,m=n.autosize,_=f.autosizable,b=y&&(m||_);b?je.plotAutoSize(e,i,n):y&&je.sanitizeMargins(n),!m&&y&&(i.width=n.width,i.height=n.height)}n._d3locale=G$(h,n.separators),n._extraFormat=m9(e,O$),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var T=n._subplots=Y$(),x=n._splomAxes={x:{},y:{}},M=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=B$(l,s),je.supplyDataDefaults(s,o,i,n);var A=Object.keys(x.x),k=Object.keys(x.y);if(A.length>1&&k.length>1){for(Jr.getComponentMethod("grid","sizeDefaults")(i,n),c=0;c15&&k.length>15&&n.shapes.length===0&&n.images.length===0,je.linkSubplots(o,n,l,a),je.cleanPlot(o,n,l,a);var z=!!(a._has&&a._has("cartesian")),H=!!(n._has&&n._has("cartesian")),O=z,U=H;O&&!U?a._bgLayer.remove():U&&!O&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&R$({_fullLayout:a}),U$(o,n),p9(n,a),Jr.getComponentMethod("colorscale","crossTraceDefaults")(o,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var V=n._tracePreGUI,Y={},I;for(I in V)Y[I]="old";for(c=0;c0){var f=1-2*i;l=Math.round(f*l),o=Math.round(f*o)}}var c=je.layoutAttributes.width.min,h=je.layoutAttributes.height.min;l1,p=!t.height&&Math.abs(a.height-o)>1;(p||d)&&(d&&(a.width=l),p&&(a.height=o)),r._initialAutoSize||(r._initialAutoSize={width:l,height:o}),je.sanitizeMargins(a)};je.supplyLayoutModuleDefaults=function(e,r,t,a){var n=Jr.componentsRegistry,i=r._basePlotModules,l,o,s,u=Jr.subplotsRegistry.cartesian;for(l in n)s=n[l],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Jr.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(ur.subplotSort);for(o=0;o1&&(t.l/=m,t.r/=m)}if(h){var _=(t.t+t.b)/h;_>1&&(t.t/=_,t.b/=_)}var b=t.xl!==void 0?t.xl:t.x,T=t.xr!==void 0?t.xr:t.x,x=t.yt!==void 0?t.yt:t.y,M=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:b,size:t.l+y},r:{val:T,size:t.r+y},b:{val:M,size:t.b+y},t:{val:x,size:t.t+y}},p[r]=1}if(!a._replotting)return je.doAutoMargin(e)}};function W$(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=sn.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}je.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),T9(r);var n=r._size,i=r.margin,l={t:0,b:0,l:0,r:0},o=ur.extendFlat({},n),s=i.l,u=i.r,f=i.t,c=i.b,h=r._pushmargin,d=r._pushmarginIds,p=r.minreducedwidth,y=r.minreducedheight;if(i.autoexpand!==!1){for(var m in h)d[m]||delete h[m];var _=e._fullLayout._reservedMargin;for(var b in _)for(var T in _[b]){var x=_[b][T];l[T]=Math.max(l[T],x)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:c}};for(var M in l){var A=0;for(var k in h)k!=="base"&&Pc(h[k][M].size)&&(A=h[k][M].size>A?h[k][M].size:A);var L=Math.max(0,i[M]-A);l[M]=Math.max(0,l[M]-L)}for(var D in h){var E=h[D].l||{},R=h[D].b||{},z=E.val,H=E.size,O=R.val,U=R.size,V=t-l.r-l.l,Y=a-l.t-l.b;for(var I in h){if(Pc(H)&&h[I].r){var G=h[I].r.val,Z=h[I].r.size;if(G>z){var K=(H*G+(Z-V)*z)/(G-z),re=(Z*(1-z)+(H-V)*(1-G))/(G-z);K+re>s+u&&(s=K,u=re)}}if(Pc(U)&&h[I].t){var se=h[I].t.val,ce=h[I].t.size;if(se>O){var le=(U*se+(ce-Y)*O)/(se-O),Q=(ce*(1-O)+(U-Y)*(1-se))/(se-O);le+Q>c+f&&(c=le,f=Q)}}}}}var ge=ur.constrain(t-i.l-i.r,M9,p),ue=ur.constrain(a-i.t-i.b,A9,y),ke=Math.max(0,t-ge),ve=Math.max(0,a-ue);if(ke){var be=(s+u)/ke;be>1&&(s/=be,u/=be)}if(ve){var W=(c+f)/ve;W>1&&(c/=W,f/=W)}if(n.l=Math.round(s)+l.l,n.r=Math.round(u)+l.r,n.t=Math.round(f)+l.t,n.b=Math.round(c)+l.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(je.didMarginChange(o,n)||W$(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};je.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&je.supplyDefaults(e);var l=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(ur.isPlainObject(h)){var p={},y;return Object.keys(h).sort().forEach(function(T){if(["_","["].indexOf(T.charAt(0))===-1){if(typeof h[T]=="function"){d&&(p[T]="_function");return}if(t==="keepdata"){if(T.substr(T.length-3)==="src")return}else if(t==="keepstream"){if(y=h[T+"src"],typeof y=="string"&&y.indexOf(":")>0&&!ur.isPlainObject(h.stream))return}else if(t!=="keepall"&&(y=h[T+"src"],typeof y=="string"&&y.indexOf(":")>0))return;p[T]=u(h[T],d)}}),p}var m=Array.isArray(h),_=ur.isTypedArray(h);if((m||_)&&h.dtype&&h.shape){var b=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:ur.isArrayBuffer(b)?E$.encode(b):b},d)}return m?h.map(function(T){return u(T,d)}):_?ur.simpleMap(h,ur.identity):ur.isJSDate(h)?ur.ms2DateTimeLocal(+h):h}var f={data:(l||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(o),n)){var c=o._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};je.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,l=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Jr.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!a&&d===h&&o(c)}}t.runFn(p),setTimeout(p())})}function o(c){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Jr.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[je.previousPromises,s,t.prepareFn,je.rehover,je.reselect,l],f=ur.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}je.doCalcdata=function(e,r){var t=sn.list(e),a=e._fullData,n=e._fullLayout,i,l,o,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},o=0;o=0;s--)if(M[s].enabled){i._indexToPoints=M[s]._indexToPoints;break}l&&l.calc&&(x=l.calc(e,i))}(!Array.isArray(x)||!x[0])&&(x=[{x:d9,y:d9}]),x[0].t||(x[0].t={}),x[0].trace=i,u[b]=x}}for(g9(t,a,n),o=0;o{"use strict";Ko.xmlns="http://www.w3.org/2000/xmlns/";Ko.svg="http://www.w3.org/2000/svg";Ko.xlink="http://www.w3.org/1999/xlink";Ko.svgAttrs={xmlns:Ko.svg,"xmlns:xlink":Ko.xlink}});var Sa=B((Yye,C9)=>{"use strict";C9.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 va=B(In=>{"use strict";var Bt=kr(),cl=Pe(),$$=cl.strTranslate,Tg=Qo(),K$=Sa().LINE_SPACING,Q$=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;In.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(Q$),i=Bt.select(e.node().parentNode);if(i.empty())return;var l=e.attr("class")?e.attr("class").split(" ")[0]:"text";l+="-math",i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function o(){i.empty()||(l=e.attr("class")+"-math",i.select("svg."+l).remove()),e.text("").style("white-space","pre");var s=cK(e.node(),a);s&&e.style("pointer-events","all"),In.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};tK(n[2],f,function(c,h,d){i.selectAll("svg."+l).remove(),i.selectAll("g."+l+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){o(),s();return}var y=i.append("g").classed(l+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});y.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var m=d.width,_=d.height;p.attr({class:l,height:_,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var b=e.node().style.fill||"black",T=p.select("g");T.attr({fill:b,stroke:b});var x=T.node().getBoundingClientRect(),M=x.width,A=x.height;(M>m||A>_)&&(p.style("overflow","hidden"),x=p.node().getBoundingClientRect(),M=x.width,A=x.height);var k=+e.attr("x"),L=+e.attr("y"),D=u||e.node().getBoundingClientRect().height,E=-D/4;if(l[0]==="y")y.attr({transform:"rotate("+[-90,k,L]+")"+$$(-M/2,E-A/2)});else if(l[0]==="l")L=E-A/2;else if(l[0]==="a"&&l.indexOf("atitle")!==0)k=0,L=E;else{var R=e.attr("text-anchor");k=k-M*(R==="middle"?.5:R==="end"?1:0),L=L+E-A/2}p.attr({x:k,y:L}),t&&t.call(e,y),s(y)})})):o(),e};var j$=/(<|<|<)/g,eK=/(>|>|>)/g;function rK(e){return e.replace(j$,"\\lt ").replace(eK,"\\gt ")}var L9=[["$","$"],["\\(","\\)"]];function tK(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){cl.warn("No MathJax version:",MathJax.version);return}var n,i,l,o,s=function(){return i=cl.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:L9},displayAlign:"left"})},u=function(){i=cl.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=L9},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var b="math-output-"+cl.randstr({},64);o=Bt.select("body").append("div").attr({id:b}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(rK(e));var T=o.node();return a===2?MathJax.Hub.Typeset(T):MathJax.typeset([T])},d=function(){var b=o.select(a===2?".MathJax_SVG":".MathJax"),T=!b.empty()&&o.select("svg").node();if(!T)cl.log("There was an error in the tex syntax.",e),t();else{var x=T.getBoundingClientRect(),M;a===2?M=Bt.select("body").select("#MathJax_SVG_glyphs"):M=b.select("defs"),t(b,M,x)}o.remove()},p=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},y=function(){n!=="svg"&&(MathJax.config.startup.output=n)},m=function(){return l!==void 0&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(i)},_=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,h,d,p,m):a===3&&(u(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),y(),_()}))}var P9={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"},aK={sub:"0.3em",sup:"-0.6em"},nK={sub:"-0.21em",sup:"0.42em"},S9="\u200B",D9=["http:","https:","mailto:","",void 0,":"],R9=In.NEWLINES=/(\r\n?|\n)/g,Ag=/(<[^<>]*>)/,kg=/<(\/?)([^ >]*)(\s+(.*))?>/i,iK=//i;In.BR_TAG_ALL=//gi;var z9=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,N9=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,F9=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,lK=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function jo(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&Wh(a)}var oK=/(^|;)\s*color:/;In.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,l=e.split(Ag),o=[],s="",u=0,f=0;fi?o.push(c.substr(0,y-i)+n):o.push(c.substr(0,y));break}s=""}}return o.join("")};var sK={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},uK=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Wh(e){return e.replace(uK,function(r,t){var a;return t.charAt(0)==="#"?a=fK(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=sK[t],a||r})}In.convertEntities=Wh;function fK(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function cK(e,r){r=r.replace(R9," ");var t=!1,a=[],n,i=-1;function l(){i++;var A=document.createElementNS(Tg.svg,"tspan");Bt.select(A).attr({class:"line",dy:i*K$+"em"}),e.appendChild(A),n=A;var k=a;if(a=[{node:A}],k.length>1)for(var L=1;L.",r);return}var k=a.pop();A!==k.type&&cl.log("Start tag <"+k.type+"> doesnt match end tag <"+A+">. Pretending it did match.",r),n=a[a.length-1].node}var f=iK.test(r);f?l():(n=e,a=[{node:e}]);for(var c=r.split(Ag),h=0;h{"use strict";var vK=kr(),Zh=Rn(),zc=zr(),Xh=Pe(),H9=xr(),hK=Oo().isValid;function dK(e,r,t){var a=r?Xh.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if(Xh.isArrayOrTypedArray(n)){for(var l=0;l=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function V9(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),l=0;l{"use strict";var X9=Uy(),mK=X9.FORMAT_LINK,yK=X9.DATE_FORMAT_LINK;function gK(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?qg:Z9)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function qg(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+mK+"."].join(" ")}function Z9(e,r){return qg(e,r)+[" And for dates see: "+yK+".","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(" ")}J9.exports={axisHoverFormat:gK,descriptionOnlyNumbers:qg,descriptionWithDates:Z9}});var bn=B((Wye,vT)=>{"use strict";var $9=jt(),Pu=zn(),cT=fi().dash,Lg=mt().extendFlat,K9=ot().templatedArray,Q9=di().descriptionWithDates,xK=wt().ONEDAY,Ii=wa(),bK=Ii.HOUR_PATTERN,_K=Ii.WEEKDAY_PATTERN,Cg={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},wK=Lg({},Cg,{values:Cg.values.slice().concat(["sync"])});function j9(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var eT={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},rT={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},tT={valType:"data_array",editType:"ticks"},aT={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function nT(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function iT(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var lT={valType:"color",dflt:Pu.defaultLine,editType:"ticks"},oT={valType:"color",dflt:Pu.lightLine,editType:"ticks"};function sT(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var uT=Lg({},cT,{editType:"ticks"}),fT={valType:"boolean",editType:"ticks"};vT.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Pu.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:$9({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Ii.idRegex.x.toString(),Ii.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:[Ii.idRegex.x.toString(),Ii.idRegex.y.toString()],editType:"calc"},rangebreaks:K9("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:[_K,bK,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:xK},editType:"calc"}),tickmode:wK,nticks:j9(),tick0:eT,dtick:rT,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:tT,ticktext:{valType:"data_array",editType:"ticks"},ticks:aT,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:nT(),tickwidth:iT(),tickcolor:lT,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:Lg({},cT,{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:$9({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Q9("tick label")},tickformatstops:K9("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:Q9("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Pu.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:fT,gridcolor:oT,gridwidth:sT(),griddash:uT,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Pu.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Pu.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Ii.idRegex.x.toString(),Ii.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Ii.idRegex.x.toString(),Ii.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Cg,nticks:j9("minor"),tick0:eT,dtick:rT,tickvals:tT,ticks:aT,ticklen:nT("minor"),tickwidth:iT("minor"),tickcolor:lT,gridcolor:oT,gridwidth:sT("minor"),griddash:uT,showgrid:fT,editType:"ticks"},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 Jh=B((Xye,pT)=>{"use strict";var gt=bn(),hT=jt(),dT=mt().extendFlat,TK=ui().overrideAll;pT.exports=TK({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:gt.linecolor,outlinewidth:gt.linewidth,bordercolor:gt.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:gt.minor.tickmode,nticks:gt.nticks,tick0:gt.tick0,dtick:gt.dtick,tickvals:gt.tickvals,ticktext:gt.ticktext,ticks:dT({},gt.ticks,{dflt:""}),ticklabeloverflow:dT({},gt.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:gt.ticklen,tickwidth:gt.tickwidth,tickcolor:gt.tickcolor,ticklabelstep:gt.ticklabelstep,showticklabels:gt.showticklabels,labelalias:gt.labelalias,tickfont:hT({}),tickangle:gt.tickangle,tickformat:gt.tickformat,tickformatstops:gt.tickformatstops,tickprefix:gt.tickprefix,showtickprefix:gt.showtickprefix,ticksuffix:gt.ticksuffix,showticksuffix:gt.showticksuffix,separatethousands:gt.separatethousands,exponentformat:gt.exponentformat,minexponent:gt.minexponent,showexponent:gt.showexponent,title:{text:{valType:"string"},font:hT({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Nc=B((Jye,yT)=>{"use strict";var MK=Jh(),AK=mu().counter,kK=Qy(),mT=Oo().scales,Zye=kK(mT);function $h(e){return"`"+e+"`"}yT.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",l="showScaleDflt"in t?t.showScaleDflt:a==="z",o=typeof t.colorscaleDflt=="string"?mT[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,c;"colorAttr"in t?(f=t.colorAttr,c=t.colorAttr):(f={z:"z",c:"color"}[a],c="in "+$h(u+f));var h=n?" Has an effect only if "+c+" is set to a numerical array.":"",d=a+"auto",p=a+"min",y=a+"max",m=a+"mid",_=$h(u+d),b=$h(u+p),T=$h(u+y),x=b+" and "+T,M={};M[p]=M[y]=void 0;var A={};A[d]=!1;var k={};return f==="color"&&(k.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(k.color.anim=!0)),k[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M},k[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:A},k[y]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:A},k[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:M},k.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},k.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},k.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(k.showscale={valType:"boolean",dflt:l,editType:"calc"},k.colorbar=MK),t.noColorAxis||(k.coloraxis={valType:"subplotid",regex:AK("coloraxis"),dflt:null,editType:"calc"}),k}});var Dg=B(($ye,gT)=>{"use strict";var qK=mt().extendFlat,CK=Nc(),Sg=Oo().scales;gT.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Sg.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Sg.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Sg.RdBu,editType:"calc"}},coloraxis:qK({_isSubplotObj:!0,editType:"calc"},CK("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Eg=B((Kye,xT)=>{"use strict";var LK=Pe();xT.exports=function(r){return LK.isPlainObject(r.colorbar)}});var zg=B(Rg=>{"use strict";var Pg=zr(),bT=Pe(),_T=wt(),SK=_T.ONEDAY,DK=_T.ONEWEEK;Rg.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?SK:1;if(!e)return i;if(Pg(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var l=e.charAt(0),o=e.substr(1);return o=Pg(o)?Number(o):0,o<=0||!(a&&l==="M"&&o===Math.round(o)||t&&l==="L"||t&&l==="D"&&(o===1||o===2))?i:e};Rg.tick0=function(e,r,t,a){if(r==="date")return bT.cleanDate(e,bT.dateTick0(t,a%DK===0?1:0));if(!(a==="D1"||a==="D2"))return Pg(e)?Number(e):0}});var Kh=B((jye,TT)=>{"use strict";var wT=zg(),EK=Pe().isArrayOrTypedArray,PK=gn().isTypedArraySpec,RK=gn().decodeTypedArraySpec;TT.exports=function(r,t,a,n,i){i||(i={});var l=i.isMinor,o=l?r.minor||{}:r,s=l?t.minor:t,u=l?"minor.":"";function f(b){var T=o[b];return PK(T)&&(T=RK(T)),T!==void 0?T:(s._template||{})[b]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=EK(d)?"array":h?"linear":"auto",y=a(u+"tickmode",p);if(y==="auto"||y==="sync")a(u+"nticks");else if(y==="linear"){var m=s.dtick=wT.dtick(h,n);s.tick0=wT.tick0(c,n,t.calendar,m)}else if(n!=="multicategory"){var _=a(u+"tickvals");_===void 0?s.tickmode="auto":l||a("ticktext")}}});var Qh=B((ege,AT)=>{"use strict";var Ng=Pe(),MT=bn();AT.exports=function(r,t,a,n){var i=n.isMinor,l=i?r.minor||{}:r,o=i?t.minor:t,s=i?MT.minor:MT,u=i?"minor.":"",f=Ng.coerce2(l,o,s,"ticklen",i?(t.ticklen||5)*.6:void 0),c=Ng.coerce2(l,o,s,"tickwidth",i?t.tickwidth||1:void 0),h=Ng.coerce2(l,o,s,"tickcolor",(i?t.tickcolor:void 0)||o.color),d=a(u+"ticks",!i&&n.outerTicks||f||c||h?"outside":"");d||(delete o.ticklen,delete o.tickwidth,delete o.tickcolor)}});var Fg=B((rge,kT)=>{"use strict";kT.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var On=B((tge,qT)=>{"use strict";var jh=Pe(),zK=ot();qT.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",l=t[n],o=jh.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=zK.arrayTemplater(t,n,i),f,c;for(f=0;f{"use strict";var Ig=Pe(),NK=xr().contrast,CT=bn(),FK=Fg(),IK=On();LT.exports=function(r,t,a,n,i){i||(i={});var l=a("labelalias");Ig.isPlainObject(l)||delete t.labelalias;var o=FK(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,c=t.ticklabelposition||"",h=c.indexOf("inside")!==-1?NK(i.bgColor):f&&f!==CT.color.dflt?f:u.color;if(Ig.coerceFont(a,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var p=a("tickformat");IK(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:HK}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!p&&n!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function HK(e,r){function t(n,i){return Ig.coerce(e,r,CT.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var rd=B((nge,ST)=>{"use strict";var OK=Fg();ST.exports=function(r,t,a,n,i){i||(i={});var l=i.tickSuffixDflt,o=OK(r),s=a("tickprefix");s&&a("showtickprefix",o);var u=a("ticksuffix",l);u&&a("showticksuffix",o)}});var Hg=B((ige,DT)=>{"use strict";var Vl=Pe(),BK=ot(),YK=Kh(),GK=Qh(),UK=ed(),VK=rd(),WK=Jh();DT.exports=function(r,t,a){var n=BK.newContainer(t,"colorbar"),i=r.colorbar||{};function l(R,z){return Vl.coerce(i,n,WK,R,z)}var o=a.margin||{t:0,b:0,l:0,r:0},s=a.width-o.l-o.r,u=a.height-o.t-o.b,f=l("orientation"),c=f==="v",h=l("thicknessmode");l("thickness",h==="fraction"?30/(c?s:u):30);var d=l("lenmode");l("len",d==="fraction"?1:c?u:s);var p=l("yref"),y=l("xref"),m=p==="paper",_=y==="paper",b,T,x,M="left";c?(x="middle",M=_?"left":"right",b=_?1.02:1,T=.5):(x=m?"bottom":"top",M="center",b=.5,T=m?1.02:1),Vl.coerce(i,n,{x:{valType:"number",min:_?-2:0,max:_?3:1,dflt:b}},"x"),Vl.coerce(i,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:T}},"y"),l("xanchor",M),l("xpad"),l("yanchor",x),l("ypad"),Vl.noneOrAll(i,n,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var A=Vl.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",A.indexOf("inside")!==-1?"hide past domain":"hide past div"),YK(i,n,l,"linear");var k=a.font,L={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:k};A.indexOf("inside")!==-1&&(L.bgColor="black"),VK(i,n,l,"linear",L),UK(i,n,l,"linear",L),GK(i,n,l,"linear",L),l("title.text",a._dfltTitle.colorbar);var D=n.showticklabels?n.tickfont:k,E=Vl.extendFlat({},k,{family:D.family,size:Vl.bigFont(D.size)});Vl.coerceFont(l,"title.font",E),l("title.side",c?"top":"right")}});var Ru=B((lge,RT)=>{"use strict";var ET=zr(),Bg=Pe(),XK=Eg(),ZK=Hg(),PT=Oo().isValid,JK=yr().traceIs;function Og(e,r){var t=r.slice(0,r.length-1);return r?Bg.nestedProperty(e,t).get()||{}:e}RT.exports=function e(r,t,a,n,i){var l=i.prefix,o=i.cLetter,s="_module"in t,u=Og(r,l),f=Og(t,l),c=Og(t._template||{},l)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},p=n(l+"coloraxis");if(p){var y=JK(t,"contour")&&Bg.nestedProperty(t,"contours.coloring").get()||"heatmap",m=d[p];m?(m[2].push(h),m[0]!==y&&(m[0]=!1,Bg.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[y,t,[h]];return}}var _=u[o+"min"],b=u[o+"max"],T=ET(_)&&ET(b)&&_{"use strict";var zT=Pe(),$K=ot(),NT=Dg(),KK=Ru();FT.exports=function(r,t){function a(c,h){return zT.coerce(r,t,NT,c,h)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,l;function o(c,h){return zT.coerce(i,l,NT.coloraxis,c,h)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},l=$K.newContainer(t,s,"coloraxis"),l._name=s,KK(i,l,t,o,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var QK=Pe(),jK=Hn().hasColorscale,eQ=Hn().extractOpts;HT.exports=function(r,t){function a(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function n(f,c){var h=c.container?QK.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=eQ(h),p=d.auto;(p||d.min===void 0)&&a(h,c.min),(p||d.max===void 0)&&a(h,c.max),d.autocolorscale&&a(h,"colorscale")}}for(var i=0;i{"use strict";var BT=zr(),Yg=Pe(),rQ=Hn().extractOpts;YT.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,l=a.containerStr,o=l?Yg.nestedProperty(t,l).get():t,s=rQ(o),u=s.auto!==!1,f=s.min,c=s.max,h=s.mid,d=function(){return Yg.aggNums(Math.min,null,i)},p=function(){return Yg.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(o._colorAx&&BT(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():u&&(o._colorAx&&BT(c)?c=Math.max(c,p()):c=p()),u&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h=0?y=n.colorscale.sequential:y=n.colorscale.sequentialminus,s._sync("colorscale",y)}}});var Gg=B((fge,GT)=>{"use strict";var ad=Oo(),zu=Hn();GT.exports={moduleType:"component",name:"colorscale",attributes:Nc(),layoutAttributes:Dg(),supplyLayoutDefaults:IT(),handleDefaults:Ru(),crossTraceDefaults:OT(),calc:td(),scales:ad.scales,defaultScale:ad.defaultScale,getScale:ad.get,isValidScale:ad.isValid,hasColorscale:zu.hasColorscale,extractOpts:zu.extractOpts,extractScale:zu.extractScale,flipScale:zu.flipScale,makeColorScaleFunc:zu.makeColorScaleFunc,makeColorScaleFuncFromTrace:zu.makeColorScaleFuncFromTrace}});var _n=B((cge,VT)=>{"use strict";var UT=Pe(),tQ=gn().isTypedArraySpec;VT.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 r=e.marker;return UT.isPlainObject(r)&&(UT.isArrayOrTypedArray(r.size)||tQ(r.size))}}});var XT=B((vge,WT)=>{"use strict";var aQ=zr();WT.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,l=a.sizemode==="area"?function(o){return Math.sqrt(o/n)}:function(o){return o/n};return function(o){var s=l(o/t);return aQ(s)&&s>0?Math.max(s,i):0}}});var Hi=B(Da=>{"use strict";var ZT=Pe();Da.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Da.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{KT.exports=sQ;var Ug={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},oQ=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function sQ(e){var r=[];return e.replace(oQ,function(t,a,n){var i=a.toLowerCase();for(n=fQ(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==Ug[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var cQ=Vg(),Ze=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},qr="M0,0Z",QT=Math.sqrt(2),Wl=Math.sqrt(3),Wg=Math.PI,Xg=Math.cos,Zg=Math.sin;aM.exports={circle:{n:0,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Lr(r,t,n):n}},square:{n:1,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.3,2);return Lr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.4,2),n=Ze(e*1.2,2);return Lr(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.8/QT,2),n="l"+a+","+a,i="l"+a+",-"+a,l="l-"+a+",-"+a,o="l-"+a+","+a;return Lr(r,t,"M0,"+a+n+i+l+i+l+o+l+o+n+o+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2/Wl,2),n=Ze(e/2,2),i=Ze(e,2);return Lr(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.6,2),n=Ze(e*1.2,2);return Lr(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.951,2),n=Ze(e*.588,2),i=Ze(-e,2),l=Ze(e*-.309,2),o=Ze(e*.809,2);return Lr(r,t,"M"+a+","+l+"L"+n+","+o+"H-"+n+"L-"+a+","+l+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e/2,2),i=Ze(e*Wl/2,2);return Lr(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e/2,2),i=Ze(e*Wl/2,2);return Lr(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.924,2),n=Ze(e*.383,2);return Lr(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(Cr(r))return qr;var a=e*1.4,n=Ze(a*.225,2),i=Ze(a*.951,2),l=Ze(a*.363,2),o=Ze(a*.588,2),s=Ze(-a,2),u=Ze(a*-.309,2),f=Ze(a*.118,2),c=Ze(a*.809,2),h=Ze(a*.382,2);return Lr(r,t,"M"+n+","+u+"H"+i+"L"+l+","+f+"L"+o+","+c+"L0,"+h+"L-"+o+","+c+"L-"+l+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.66,2),n=Ze(e*.38,2),i=Ze(e*.76,2);return Lr(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*Wl*.8,2),n=Ze(e*.8,2),i=Ze(e*1.6,2),l=Ze(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Lr(r,t,"M-"+a+","+n+o+a+","+n+o+"0,-"+i+o+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*Wl*.8,2),n=Ze(e*.8,2),i=Ze(e*1.6,2),l=Ze(e*4,2),o="A "+l+","+l+" 0 0 1 ";return Lr(r,t,"M"+a+",-"+n+o+"-"+a+",-"+n+o+"0,"+i+o+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.1,2),n=Ze(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Lr(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2),n=Ze(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Lr(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*.7,2),n=Ze(e*1.4,2);return Lr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2),n=Ze(e*.7,2);return Lr(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e/QT,2);return Lr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.3,2);return Lr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.3,2),n=Ze(e*.65,2);return Lr(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*.85,2);return Lr(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e/2,2),n=Ze(e,2);return Lr(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.2,2),n=Ze(e*1.6,2),i=Ze(e*.8,2);return Lr(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2);return Lr(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*1.4,2);return Lr(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2);return Lr(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e,2),n=Ze(e*2,2);return Lr(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(Cr(r))return qr;var a=Ze(e*2,2),n=Ze(e,2);return Lr(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(Cr(r))return qr;var a=Wg/2.5,n=2*e*Xg(a),i=2*e*Zg(a);return Lr(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(Cr(r))return qr;var a=Wg/4,n=2*e*Xg(a),i=2*e*Zg(a);return Lr(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function Cr(e){return e===null}var jT,eM,rM,tM;function Lr(e,r,t){if((!e||e%360===0)&&!r)return t;if(rM===e&&tM===r&&jT===t)return eM;rM=e,tM=r,jT=t;function a(m,_){var b=Xg(m),T=Zg(m),x=_[0],M=_[1]+(r||0);return[x*b-M*T,x*T+M*b]}for(var n=e/180*Wg,i=0,l=0,o=cQ(t),s="",u=0;u{"use strict";var ra=kr(),lt=Pe(),vQ=lt.numberFormat,as=zr(),e2=Rn(),id=yr(),Ta=xr(),hQ=Gg(),Ic=lt.strTranslate,ld=va(),dQ=Qo(),pQ=Sa(),mQ=pQ.LINE_SPACING,dM=pu().DESELECTDIM,yQ=_n(),gQ=XT(),xQ=Hi().appendArrayPointValue,Ke=MM.exports={};Ke.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,l=r.size,o=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;o&&e.style("font-family",o),l+1&&e.style("font-size",l+"px"),i&&e.call(Ta.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",Jg(_Q(f))),s&&e.style("text-shadow",s==="auto"?ld.makeTextShadow(Ta.contrast(i)):Jg(s)),u&&e.style("text-decoration-line",Jg(wQ(u)))};function Jg(e){return e==="none"?void 0:e}var bQ={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function _Q(e){return bQ[e]}function wQ(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ke.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Ke.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Ke.setRect=function(e,r,t,a,n){e.call(Ke.setPosition,r,t).call(Ke.setSize,a,n)};Ke.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(as(n)&&as(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",Ic(n,i));else return!1;return!0};Ke.translatePoints=function(e,r,t){e.each(function(a){var n=ra.select(this);Ke.translatePoint(a,n,r,t)})};Ke.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Ke.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,l=i.xcalendar,o=i.ycalendar,s=id.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Ke.hideOutsideRangePoint(u,ra.select(this),t,a,l,o)})})}};Ke.crispRound=function(e,r,t){return!r||!as(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Ke.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},l=t||i.width||0,o=n||i.dash||"";Ta.stroke(r,a||i.color),Ke.dashLine(r,o,l)};Ke.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},l=r||i.width||0,o=a||i.dash||"";ra.select(this).call(Ta.stroke,t||i.color).call(Ke.dashLine,o,l)})};Ke.dashLine=function(e,r,t){t=+t||0,r=Ke.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Ke.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function pM(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,l=n&&Ke.getPatternAttr(n.shape,0,"");if(l){var o=Ke.getPatternAttr(n.bgcolor,0,null),s=Ke.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Ke.getPatternAttr(n.size,0,8),c=Ke.getPatternAttr(n.solidity,0,.3),h=r.uid;Ke.pattern(e,"point",t,h,l,f,c,void 0,n.fillmode,o,s,u)}else if(i&&i.type!=="none"){var d=i.type,p="scatterfill-"+r.uid;if(a&&(p="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var y,m;d==="horizontal"?(y={x:i.start,y:0},m={x:i.stop,y:0}):d==="vertical"&&(y={x:0,y:i.start},m={x:0,y:i.stop}),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.min[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.min[0].val:y.y,!0),m.x=r._xA.c2p(m.x===void 0?r._extremes.x.max[0].val:m.x,!0),m.y=r._yA.c2p(m.y===void 0?r._extremes.y.max[0].val:m.y,!0),e.call(gM,t,p,"linear",i.colorscale,"fill",y,m,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Ke.gradient,t,p,d,i.colorscale,"fill")}else r.fillcolor&&e.call(Ta.fill,r.fillcolor)}Ke.singleFillStyle=function(e,r){var t=ra.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};pM(e,n,r,!1)};Ke.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=ra.select(this);a[0].trace&&pM(n,a[0].trace,r,t)})};var iM=nM();Ke.symbolNames=[];Ke.symbolFuncs=[];Ke.symbolBackOffs=[];Ke.symbolNeedLines={};Ke.symbolNoDot={};Ke.symbolNoFill={};Ke.symbolList=[];Object.keys(iM).forEach(function(e){var r=iM[e],t=r.n;Ke.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Ke.symbolNames[t]=e,Ke.symbolFuncs[t]=r.f,Ke.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Ke.symbolNeedLines[t]=!0),r.noDot?Ke.symbolNoDot[t]=!0:Ke.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Ke.symbolNoFill[t]=!0)});var TQ=Ke.symbolNames.length,MQ="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ke.symbolNumber=function(e){if(as(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Ke.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=TQ||e>=400?0:Math.floor(Math.max(e,0))};function mM(e,r,t,a){var n=e%100;return Ke.symbolFuncs[n](r,t,a)+(e>=200?MQ:"")}var lM=vQ("~f"),yM={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}};Ke.gradient=function(e,r,t,a,n,i){var l=yM[a];return gM(e,r,t,l.type,n,i,l.start,l.stop,!1,l.reversed)};function gM(e,r,t,a,n,i,l,o,s,u){var f=n.length,c;a==="linear"?c={node:"linearGradient",attrs:{x1:l.x,y1:l.y,x2:o.x,y2:o.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(c={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?l.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||l.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Ke.symbolNumber(e.mx||l.symbol)||0;e.om=u%200>=100;var f=a2(e,t),c=t2(e,t);r.attr("d",mM(u,s,f,c))}var h=!1,d,p,y;if(e.so)y=o.outlierwidth,p=o.outliercolor,d=l.outliercolor;else{var m=(o||{}).width;y=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=a.lineScale(e.mlc):lt.isArrayOrTypedArray(o.color)?p=Ta.defaultLine:p=o.color,lt.isArrayOrTypedArray(l.color)&&(d=Ta.defaultLine,h=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=l.color||l.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(Ta.stroke,d).style({"stroke-width":(y||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:y)+"px");var _=l.gradient,b=e.mgt;b?h=!0:b=_&&_.type,lt.isArrayOrTypedArray(b)&&(b=b[0],yM[b]||(b=0));var T=l.pattern,x=T&&Ke.getPatternAttr(T.shape,e.i,"");if(b&&b!=="none"){var M=e.mgc;M?h=!0:M=_.color;var A=t.uid;h&&(A+="-"+e.i),Ke.gradient(r,n,A,b,[[0,M],[1,d]],"fill")}else if(x){var k=!1,L=T.fgcolor;!L&&i&&i.color&&(L=i.color,k=!0);var D=Ke.getPatternAttr(L,e.i,i&&i.color||null),E=Ke.getPatternAttr(T.bgcolor,e.i,null),R=T.fgopacity,z=Ke.getPatternAttr(T.size,e.i,8),H=Ke.getPatternAttr(T.solidity,e.i,.3);k=k||e.mcc||lt.isArrayOrTypedArray(T.shape)||lt.isArrayOrTypedArray(T.bgcolor)||lt.isArrayOrTypedArray(T.fgcolor)||lt.isArrayOrTypedArray(T.size)||lt.isArrayOrTypedArray(T.solidity);var O=t.uid;k&&(O+="-"+e.i),Ke.pattern(r,"point",n,O,x,z,H,e.mcc,T.fillmode,E,D,R)}else lt.isArrayOrTypedArray(d)?Ta.fill(r,d[e.i]):Ta.fill(r,d);y&&Ta.stroke(r,p)}};Ke.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Ke.tryColorscale(t,""),r.lineScale=Ke.tryColorscale(t,"line"),id.traceIs(e,"symbols")&&(r.ms2mrc=yQ.isBubble(e)?gQ(e):function(){return(t.size||6)/2}),e.selectedpoints&<.extendFlat(r,Ke.makeSelectedPointStyleFns(e)),r};Ke.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},l=a.marker||{},o=n.opacity,s=i.opacity,u=l.opacity,f=s!==void 0,c=u!==void 0;(lt.isArrayOrTypedArray(o)||f||c)&&(r.selectedOpacityFn=function(x){var M=x.mo===void 0?n.opacity:x.mo;return x.selected?f?s:M:c?u:dM*M});var h=n.color,d=i.color,p=l.color;(d||p)&&(r.selectedColorFn=function(x){var M=x.mcc||h;return x.selected?d||M:p||M});var y=n.size,m=i.size,_=l.size,b=m!==void 0,T=_!==void 0;return id.traceIs(e,"symbols")&&(b||T)&&(r.selectedSizeFn=function(x){var M=x.mrc||y/2;return x.selected?b?m/2:M:T?_/2:M}),r};Ke.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},l=a.textfont||{},o=n.color,s=i.color,u=l.color;return r.selectedTextColorFn=function(f){var c=f.tc||o;return f.selected?s||c:u||(s?c:Ta.addOpacity(c,dM))},r};Ke.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,l){i.style("opacity",t.selectedOpacityFn(l))}),t.selectedColorFn&&n.push(function(i,l){Ta.fill(i,t.selectedColorFn(l))}),t.selectedSizeFn&&n.push(function(i,l){var o=l.mx||a.symbol||0,s=t.selectedSizeFn(l);i.attr("d",mM(Ke.symbolNumber(o),s,a2(l,r),t2(l,r))),l.mrc2=s}),n.length&&e.each(function(i){for(var l=ra.select(this),o=0;o0?t:0}Ke.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Ke.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,l=t._fullLayout;e.each(function(o){var s=ra.select(this),u=i?lt.extractOption(o,r,"txt","texttemplate"):lt.extractOption(o,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,c=f?f(o,r,l):{},h={};xQ(h,r,o.i);var d=r._meta||{};u=lt.texttemplateString(u,c,l._d3locale,h,o,d)}var p=o.tp||r.textposition,y=bM(o,r),m=a?a(o):o.tc||r.textfont.color;s.call(Ke.font,{family:o.tf||r.textfont.family,weight:o.tw||r.textfont.weight,style:o.ty||r.textfont.style,variant:o.tv||r.textfont.variant,textcase:o.tC||r.textfont.textcase,lineposition:o.tE||r.textfont.lineposition,shadow:o.tS||r.textfont.shadow,size:y,color:m}).text(u).call(ld.convertToTspans,t).call(xM,p,y,o.mrc)})}};Ke.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Ke.makeSelectedTextStyleFns(r);e.each(function(a){var n=ra.select(this),i=t.selectedTextColorFn(a),l=a.tp||r.textposition,o=bM(a,r);Ta.fill(n,i);var s=id.traceIs(r,"bar-like");xM(n,l,o,a.mrc2||a.mrc,s)})}};var oM=.5;Ke.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||x>=f&&x<=s)&&(M<=c&&M>=u||M>=c&&M<=u)&&(e=[x,M])}return e}Ke.applyBackoff=TM;Ke.makeTester=function(){var e=lt.ensureSingleById(ra.select("body"),"svg","js-plotly-tester",function(t){t.attr(dQ.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=lt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ke.tester=e,Ke.testref=r};Ke.savedBBoxes={};var Kg=0,qQ=1e4;Ke.bBox=function(e,r,t){t||(t=sM(e));var a;if(t){if(a=Ke.savedBBoxes[t],a)return lt.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=sM(n),t){var i=+n.getAttribute("x")||0,l=+n.getAttribute("y")||0,o=n.getAttribute("transform");if(!o){var s=Ke.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),l&&(s.top+=l,s.bottom+=l),s}if(t+="~"+i+"~"+l+"~"+o,a=Ke.savedBBoxes[t],a)return lt.extendFlat({},a)}}var u,f;r?u=e:(f=Ke.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),ra.select(u).attr("transform",null).call(ld.positionText,0,0);var c=u.getBoundingClientRect(),h=Ke.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return Kg>=qQ&&(Ke.savedBBoxes={},Kg=0),t&&(Ke.savedBBoxes[t]=d),Kg++,lt.extendFlat({},d)};function sM(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ke.setClipUrl=function(e,r,t){e.attr("clip-path",r2(r,t))};function r2(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Ke.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Ke.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||0,t=t||0,l=l.replace(a,"").trim(),l+=Ic(r,t),l=l.trim(),e[i]("transform",l),l};Ke.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,l,o){return[l,o].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Ke.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",l=e[n]("transform")||"";return r=r||1,t=t||1,l=l.replace(a,"").trim(),l+="scale("+r+","+t+")",l=l.trim(),e[i]("transform",l),l};var CQ=/\s*sc.*/;Ke.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(CQ,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var LQ=/translate\([^)]*\)\s*$/;Ke.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=ra.select(this),i=n.select("text");if(i.node()){var l=parseFloat(i.attr("x")||0),o=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(LQ);r===1&&t===1?a=[]:a=[Ic(l,o),"scale("+r+","+t+")",Ic(-l,-o)],s&&a.push(s),n.attr("transform",a.join(""))}})};function t2(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Ke.getMarkerStandoff=t2;var Fc=Math.atan2,es=Math.cos,Fu=Math.sin;function uM(e,r){var t=r[0],a=r[1];return[t*es(e)-a*Fu(e),t*Fu(e)+a*es(e)]}var fM,cM,vM,hM,Qg,jg;function a2(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||lt.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var l=r._geo.project(e.lonlat);a=l[0],n=l[1]}else{var o=r._xA,s=r._yA;if(o&&s)a=o.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],c=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=Fc(h[1]-n,h[0]-a),p=Fc(c[1]-n,c[0]-a),y;if(i==="north")y=t/180*Math.PI;else if(i==="previous"){var m=u/180*Math.PI,_=f/180*Math.PI,b=fM/180*Math.PI,T=cM/180*Math.PI,x=b-m,M=es(T)*Fu(x),A=Fu(T)*es(_)-es(T)*Fu(_)*es(x);y=-Fc(M,A)-Math.PI,fM=u,cM=f}var k=uM(d,[es(y),0]),L=uM(p,[Fu(y),0]);t=Fc(k[1]+L[1],k[0]+L[0])/Math.PI*180,i==="previous"&&!(jg===r.uid&&e.i===Qg+1)&&(t=null)}if(i==="previous"&&!r._geo)if(jg===r.uid&&e.i===Qg+1&&as(a)&&as(n)){var D=a-vM,E=n-hM,R=r.line&&r.line.shape||"",z=R.slice(R.length-1);z==="h"&&(E=0),z==="v"&&(D=0),t+=Fc(E,D)/Math.PI*180+90}else t=null}return vM=a,hM=n,Qg=e.i,jg=r.uid,t}Ke.getMarkerAngle=a2});var Hc=B((yge,CM)=>{"use strict";var Iu=kr(),SQ=zr(),DQ=St(),n2=yr(),ns=Pe(),AM=ns.strTranslate,od=Br(),sd=xr(),Hu=va(),kM=pu(),EQ=Sa().OPPOSITE_SIDE,qM=/ [XY][0-9]* /,i2=1.6,l2=1.6;function PQ(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,l=t.placeholder,o=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,c=t.containerGroup,h=1,d=n.title,p=(d&&d.text?d.text:"").trim(),y=!1,m=d&&d.font?d.font:{},_=m.family,b=m.size,T=m.color,x=m.weight,M=m.style,A=m.variant,k=m.textcase,L=m.lineposition,D=m.shadow,E=t.subtitlePropName,R=!!E,z=t.subtitlePlaceholder,H=(n.title||{}).subtitle||{text:"",font:{}},O=H.text.trim(),U=!1,V=1,Y=H.font,I=Y.family,G=Y.size,Z=Y.color,K=Y.weight,re=Y.style,se=Y.variant,ce=Y.textcase,le=Y.lineposition,Q=Y.shadow,ge;i==="title.text"?ge="titleText":i.indexOf("axis")!==-1?ge="axisTitleText":i.indexOf("colorbar"!==-1)&&(ge="colorbarTitleText");var ue=e._context.edits[ge];function ke(Be,Fe){return Be===void 0||Fe===void 0?!1:Be.replace(qM," % ")===Fe.replace(qM," % ")}p===""?h=0:ke(p,l)&&(ue||(p=""),h=.2,y=!0),R&&(O===""?V=0:ke(O,z)&&(ue||(O=""),V=.2,U=!0)),t._meta?p=ns.templateString(p,t._meta):a._meta&&(p=ns.templateString(p,a._meta));var ve=p||O||ue,be;c||(c=ns.ensureSingle(a._infolayer,"g","g-"+r),be=a._hColorbarMoveTitle);var W=c.selectAll("text."+r).data(ve?[0]:[]);W.enter().append("text"),W.text(p).attr("class",r),W.exit().remove();var te=null,X=r+"-subtitle",ye=O||ue;if(R&&ye&&(te=c.selectAll("text."+X).data(ye?[0]:[]),te.enter().append("text"),te.text(O).attr("class",X),te.exit().remove()),!ve)return c;function _e(Be,Fe){ns.syncOrAsync([xe,Ie],{title:Be,subtitle:Fe})}function xe(Be){var Fe=Be.title,Ee=Be.subtitle,Je;!f&&be&&(f={}),f?(Je="",f.rotate&&(Je+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||be)&&(Je+=AM(0,(f.offset||0)-(be||0)))):Je=null,Fe.attr("transform",Je);function We(De){if(De){var Le=Iu.select(De.node().parentNode).select("."+X);if(!Le.empty()){var Ye=De.node().getBBox();if(Ye.height){var Xe=Ye.y+Ye.height+i2*G;Le.attr("y",Xe)}}}}if(Fe.style("opacity",h*sd.opacity(T)).call(od.font,{color:sd.rgb(T),size:Iu.round(b,2),family:_,weight:x,style:M,variant:A,textcase:k,shadow:D,lineposition:L}).attr(u).call(Hu.convertToTspans,e,We),Ee){var ie=c.select("."+r+"-math-group"),Ae=Fe.node().getBBox(),Ce=ie.node()?ie.node().getBBox():void 0,cr=Ce?Ce.y+Ce.height+i2*G:Ae.y+Ae.height+l2*G,tr=ns.extendFlat({},u,{y:cr});Ee.attr("transform",Je),Ee.style("opacity",V*sd.opacity(Z)).call(od.font,{color:sd.rgb(Z),size:Iu.round(G,2),family:I,weight:K,style:re,variant:se,textcase:ce,shadow:Q,lineposition:le}).attr(tr).call(Hu.convertToTspans,e)}return DQ.previousPromises(e)}function Ie(Be){var Fe=Be.title,Ee=Iu.select(Fe.node().parentNode);if(s&&s.selection&&s.side&&p){Ee.attr("transform",null);var Je=EQ[s.side],We=s.side==="left"||s.side==="top"?-1:1,ie=SQ(s.pad)?s.pad:2,Ae=od.bBox(Ee.node()),Ce={t:0,b:0,l:0,r:0},cr=e._fullLayout._reservedMargin;for(var tr in cr)for(var De in cr[tr]){var Le=cr[tr][De];Ce[De]=Math.max(Ce[De],Le)}var Ye={left:Ce.l,top:Ce.t,right:a.width-Ce.r,bottom:a.height-Ce.b},Xe=s.maxShift||We*(Ye[s.side]-Ae[s.side]),Ge=0;if(Xe<0)Ge=Xe;else{var Oe=s.offsetLeft||0,$e=s.offsetTop||0;Ae.left-=Oe,Ae.right-=Oe,Ae.top-=$e,Ae.bottom-=$e,s.selection.each(function(){var lr=od.bBox(this);ns.bBoxIntersect(Ae,lr,ie)&&(Ge=Math.max(Ge,We*(lr[s.side]-Ae[Je])+ie))}),Ge=Math.min(Xe,Ge),n._titleScoot=Math.abs(Ge)}if(Ge>0||Xe<0){var fr={left:[-Ge,0],right:[Ge,0],top:[0,-Ge],bottom:[0,Ge]}[s.side];Ee.attr("transform",AM(fr[0],fr[1]))}}}W.call(_e,te);function ze(Be,Fe){Be.text(Fe).on("mouseover.opacity",function(){Iu.select(this).transition().duration(kM.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Iu.select(this).transition().duration(kM.HIDE_PLACEHOLDER).style("opacity",0)})}if(ue&&(p?W.on(".opacity",null):(ze(W,l),y=!0),W.call(Hu.makeEditable,{gd:e}).on("edit",function(Be){o!==void 0?n2.call("_guiRestyle",e,i,Be,o):n2.call("_guiRelayout",e,i,Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(_e)}).on("input",function(Be){this.text(Be||" ").call(Hu.positionText,u.x,u.y)}),R)){if(R&&!p){var Re=W.node().getBBox(),He=Re.y+Re.height+l2*G;te.attr("y",He)}O?te.on(".opacity",null):(ze(te,z),U=!0),te.call(Hu.makeEditable,{gd:e}).on("edit",function(Be){n2.call("_guiRelayout",e,"title.subtitle.text",Be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(_e)}).on("input",function(Be){this.text(Be||" ").call(Hu.positionText,te.attr("x"),te.attr("y"))})}return W.classed("js-placeholder",y),te&&te.classed("js-placeholder",U),c}CM.exports={draw:PQ,SUBTITLE_PADDING_EM:l2,SUBTITLE_PADDING_MATHJAX_EM:i2}});var md=B((gge,PM)=>{"use strict";var RQ=kr(),zQ=cu().utcFormat,st=Pe(),NQ=st.numberFormat,Oi=zr(),Xl=st.cleanNumber,FQ=st.ms2DateTime,LM=st.dateTime2ms,Bi=st.ensureNumber,SM=st.isArrayOrTypedArray,Zl=wt(),ud=Zl.FP_SAFE,pi=Zl.BADNUM,IQ=Zl.LOG_CLIP,HQ=Zl.ONEWEEK,fd=Zl.ONEDAY,cd=Zl.ONEHOUR,DM=Zl.ONEMIN,EM=Zl.ONESEC,vd=Jt(),pd=wa(),hd=pd.HOUR_PATTERN,dd=pd.WEEKDAY_PATTERN;function Oc(e){return Math.pow(10,e)}function o2(e){return e!=null}PM.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(x,M){if(x>0)return Math.log(x)/Math.LN10;if(x<=0&&M&&r.range&&r.range.length===2){var A=r.range[0],k=r.range[1];return .5*(A+k-2*IQ*Math.abs(A-k))}else return pi}function l(x,M,A,k){if((k||{}).msUTC&&Oi(x))return+x;var L=LM(x,A||r.calendar);if(L===pi)if(Oi(x)){x=+x;var D=Math.floor(st.mod(x+.05,1)*10),E=Math.round(x-D/10);L=LM(new Date(E))+D/10}else return pi;return L}function o(x,M,A){return FQ(x,M,A||r.calendar)}function s(x){return r._categories[Math.round(x)]}function u(x){if(o2(x)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[x]!==void 0)return r._categoriesMap[x];r._categories.push(typeof x=="number"?String(x):x);var M=r._categories.length-1;return r._categoriesMap[x]=M,M}return pi}function f(x,M){for(var A=new Array(M),k=0;kr.range[1]&&(A=!A);for(var k=A?-1:1,L=k*x,D=0,E=0;Ez)D=E+1;else{D=L<(R+z)/2?E:E+1;break}}var H=r._B[D]||0;return isFinite(H)?p(x,r._m2,H):0},_=function(x){var M=r._rangebreaks.length;if(!M)return y(x,r._m,r._b);for(var A=0,k=0;kr._rangebreaks[k].pmax&&(A=k+1);return y(x,r._m2,r._B[A])}}r.c2l=r.type==="log"?i:Bi,r.l2c=r.type==="log"?Oc:Bi,r.l2p=m,r.p2l=_,r.c2p=r.type==="log"?function(x,M){return m(i(x,M))}:m,r.p2c=r.type==="log"?function(x){return Oc(_(x))}:_,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Xl,r.c2d=r.c2r=r.l2d=r.l2r=Bi,r.d2p=r.r2p=function(x){return r.l2p(Xl(x))},r.p2d=r.p2r=_,r.cleanPos=Bi):r.type==="log"?(r.d2r=r.d2l=function(x,M){return i(Xl(x),M)},r.r2d=r.r2c=function(x){return Oc(Xl(x))},r.d2c=r.r2l=Xl,r.c2d=r.l2r=Bi,r.c2r=i,r.l2d=Oc,r.d2p=function(x,M){return r.l2p(r.d2r(x,M))},r.p2d=function(x){return Oc(_(x))},r.r2p=function(x){return r.l2p(Xl(x))},r.p2r=_,r.cleanPos=Bi):r.type==="date"?(r.d2r=r.r2d=st.identity,r.d2c=r.r2c=r.d2l=r.r2l=l,r.c2d=r.c2r=r.l2d=r.l2r=o,r.d2p=r.r2p=function(x,M,A){return r.l2p(l(x,0,A))},r.p2d=r.p2r=function(x,M,A){return o(_(x),M,A)},r.cleanPos=function(x){return st.cleanDate(x,pi,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(x){var M=d(x);return M!==void 0?M:r.fraction2r(.5)},r.l2r=r.c2r=Bi,r.r2l=d,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(_(x))},r.r2p=r.d2p,r.p2r=_,r.cleanPos=function(x){return typeof x=="string"&&x!==""?x:Bi(x)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(x){var M=h(x);return M!==void 0?M:r.fraction2r(.5)},r.r2c_just_indices=c,r.l2r=r.c2r=Bi,r.r2l=h,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(_(x))},r.r2p=r.d2p,r.p2r=_,r.cleanPos=function(x){return Array.isArray(x)||typeof x=="string"&&x!==""?x:Bi(x)},r.setupMultiCategory=function(x){var M=r._traceIndices,A,k,L=r._matchGroup;if(L&&r._categories.length===0){for(var D in L)if(D!==a){var E=t[vd.id2name(D)];M=M.concat(E._traceIndices)}}var R=[[0,{}],[0,{}]],z=[];for(A=0;AE[1]&&(k[D?0:1]=A),k[0]===k[1]){var R=r.l2r(M),z=r.l2r(A);if(M!==void 0){var H=R+1;A!==void 0&&(H=Math.min(H,z)),k[D?1:0]=H}if(A!==void 0){var O=z+1;M!==void 0&&(O=Math.max(O,R)),k[D?0:1]=O}}}},r.cleanRange=function(x,M){r._cleanRange(x,M),r.limitRange(x)},r._cleanRange=function(x,M){M||(M={}),x||(x="range");var A=st.nestedProperty(r,x).get(),k,L;if(r.type==="date"?L=st.dfltRange(r.calendar):n==="y"?L=pd.DFLTRANGEY:r._name==="realaxis"?L=[0,1]:L=M.dfltRange||pd.DFLTRANGEX,L=L.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(L[0]=0),!A||A.length!==2){st.nestedProperty(r,x).set(L);return}var D=A[0]===null,E=A[1]===null;for(r.type==="date"&&!r.autorange&&(A[0]=st.cleanDate(A[0],pi,r.calendar),A[1]=st.cleanDate(A[1],pi,r.calendar)),k=0;k<2;k++)if(r.type==="date"){if(!st.isDateTime(A[k],r.calendar)){r[x]=L;break}if(r.r2l(A[0])===r.r2l(A[1])){var R=st.constrain(r.r2l(A[0]),st.MIN_MS+1e3,st.MAX_MS-1e3);A[0]=r.l2r(R-1e3),A[1]=r.l2r(R+1e3);break}}else{if(!Oi(A[k]))if(!(D||E)&&Oi(A[1-k]))A[k]=A[1-k]*(k?10:.1);else{r[x]=L;break}if(A[k]<-ud?A[k]=-ud:A[k]>ud&&(A[k]=ud),A[0]===A[1]){var z=Math.max(1,Math.abs(A[0]*1e-6));A[0]-=z,A[1]+=z}}},r.setScale=function(x){var M=t._size;if(r.overlaying){var A=vd.getFromId({_fullLayout:t},r.overlaying);r.domain=A.domain}var k=x&&r._r?"_r":"range",L=r.calendar;r.cleanRange(k);var D=r.r2l(r[k][0],L),E=r.r2l(r[k][1],L),R=n==="y";if(R?(r._offset=M.t+(1-r.domain[1])*M.h,r._length=M.h*(r.domain[1]-r.domain[0]),r._m=r._length/(D-E),r._b=-r._m*E):(r._offset=M.l+r.domain[0]*M.w,r._length=M.w*(r.domain[1]-r.domain[0]),r._m=r._length/(E-D),r._b=-r._m*D),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var z,H;if(r._rangebreaks=r.locateBreaks(Math.min(D,E),Math.max(D,E)),r._rangebreaks.length){for(z=0;zE&&(O=!O),O&&r._rangebreaks.reverse();var U=O?-1:1;for(r._m2=U*r._length/(Math.abs(E-D)-r._lBreaks),r._B.push(-r._m2*(R?E:D)),z=0;zL&&(L+=7,DL&&(L+=24,D=k&&D=k&&x=Q.min&&(reQ.max&&(Q.max=se),ce=!1)}ce&&E.push({min:re,max:se})}};for(A=0;A{"use strict";var RM=zr(),s2=Pe(),OQ=wt().BADNUM,yd=s2.isArrayOrTypedArray,BQ=s2.isDateTime,YQ=s2.cleanNumber,zM=Math.round;FM.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if(yd(n)&&!n.length)return"-";if(!i&&XQ(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var l=[],o=0;oi*2}function NM(e){return Math.max(1,(e-1)/1e3)}function WQ(e,r){for(var t=e.length,a=NM(t),n=0,i=0,l={},o=0;on*2}function XQ(e){return yd(e[0])&&yd(e[1])}});var Bc=B((bge,VM)=>{"use strict";var ZQ=kr(),BM=zr(),Jl=Pe(),gd=wt().FP_SAFE,JQ=yr(),$Q=Br(),YM=Jt(),KQ=YM.getFromId,QQ=YM.isLinked;VM.exports={applyAutorangeOptions:UM,getAutoRange:f2,makePadFn:c2,doAutoRange:ej,findExtremes:rj,concatExtremes:d2};function f2(e,r){var t,a,n=[],i=e._fullLayout,l=c2(i,r,0),o=c2(i,r,1),s=d2(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return Jl.simpleMap(r.range,r.r2l);var c=u[0].val,h=f[0].val;for(t=1;t0&&(E=T-l(A)-o(k),E>x?R/E>M&&(L=A,D=k,M=R/E):R/T>M&&(L={val:A.val,nopad:1},D={val:k.val,nopad:1},M=R/T));function z(Y,I){return Math.max(Y,o(I))}if(c===h){var H=c-1,O=c+1;if(_)if(c===0)n=[0,1];else{var U=(c>0?f:u).reduce(z,0),V=c/(1-Math.min(.5,U/T));n=c>0?[0,V]:[V,0]}else b?n=[Math.max(0,H),Math.max(1,O)]:n=[H,O]}else _?(L.val>=0&&(L={val:0,nopad:1}),D.val<=0&&(D={val:0,nopad:1})):b&&(L.val-M*l(L)<0&&(L={val:0,nopad:1}),D.val<=0&&(D={val:1,nopad:1})),M=(D.val-L.val-IM(r,A.val,k.val))/(T-l(L)-o(D)),n=[L.val-M*l(L),D.val+M*o(D)];return n=UM(n,r),r.limitRange&&r.limitRange(),p&&n.reverse(),Jl.simpleMap(n,r.l2r||Number)}function IM(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),A=x((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),k=x(t.vpadplus||t.vpad),L=x(t.vpadminus||t.vpad);if(!u){if(b=1/0,T=-1/0,s)for(c=0;c0&&(b=h),h>T&&h-gd&&(b=h),h>T&&h=R;c--)E(c);return{min:a,max:n,opts:t}}function v2(e,r,t,a){GM(e,r,t,a,tj)}function h2(e,r,t,a){GM(e,r,t,a,aj)}function GM(e,r,t,a,n){for(var i=a.tozero,l=a.extrapad,o=!0,s=0;s=t&&(u.extrapad||!l)){o=!1;break}else n(r,u.val)&&u.pad<=t&&(l||!u.extrapad)&&(e.splice(s,1),s--)}if(o){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:l})}}function OM(e){return BM(e)&&Math.abs(e)=r}function nj(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&xd(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&xd(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function ij(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&xd(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&xd(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function xd(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),l<=s&&(l=s,a=s)}}return t=nj(t,r),a=ij(a,r),[t,a]}});var $r=B((_ge,hA)=>{"use strict";var Bn=kr(),Yt=zr(),Ou=St(),Gc=yr(),br=Pe(),Bu=br.strTranslate,is=va(),lj=Hc(),Uc=xr(),wn=Br(),oj=bn(),WM=zg(),Ma=wt(),sj=Ma.ONEMAXYEAR,wd=Ma.ONEAVGYEAR,Td=Ma.ONEMINYEAR,uj=Ma.ONEMAXQUARTER,g2=Ma.ONEAVGQUARTER,Md=Ma.ONEMINQUARTER,fj=Ma.ONEMAXMONTH,Yu=Ma.ONEAVGMONTH,Ad=Ma.ONEMINMONTH,Tn=Ma.ONEWEEK,Ba=Ma.ONEDAY,$l=Ba/2,Gi=Ma.ONEHOUR,Vc=Ma.ONEMIN,kd=Ma.ONESEC,cj=Ma.ONEMILLI,vj=Ma.ONEMICROSEC,ls=Ma.MINUS_SIGN,Ld=Ma.BADNUM,x2={K:"zeroline"},b2={K:"gridline",L:"path"},_2={K:"minor-gridline",L:"path"},aA={K:"tick",L:"path"},XM={K:"tick",L:"text"},ZM={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Sd=Sa(),Yc=Sd.MID_SHIFT,os=Sd.CAP_SHIFT,Wc=Sd.LINE_SPACING,hj=Sd.OPPOSITE_SIDE,qd=3,Ve=hA.exports={};Ve.setConvert=md();var dj=u2(),vl=Jt(),pj=vl.idSort,mj=vl.isLinked;Ve.id2name=vl.id2name;Ve.name2id=vl.name2id;Ve.cleanId=vl.cleanId;Ve.list=vl.list;Ve.listIds=vl.listIds;Ve.getFromId=vl.getFromId;Ve.getFromTrace=vl.getFromTrace;var nA=Bc();Ve.getAutoRange=nA.getAutoRange;Ve.findExtremes=nA.findExtremes;var yj=1e-4;function A2(e){var r=(e[1]-e[0])*yj;return[e[0]-r,e[1]+r]}Ve.coerceRef=function(e,r,t,a,n,i){var l=a.charAt(a.length-1),o=t._fullLayout._subplots[l+"axis"],s=a+"ref",u={};return n||(n=o[0]||(typeof i=="string"?i:i[0])),i||(i=n),o=o.concat(o.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:o.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},br.coerce(e,r,u,s)};Ve.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Ve.coercePosition=function(e,r,t,a,n,i){var l,o,s=Ve.getRefType(a);if(s!=="range")l=br.ensureNumber,o=t(n,i);else{var u=Ve.getFromId(r,a);i=u.fraction2r(i),o=t(n,i),l=u.cleanPos}e[n]=l(o)};Ve.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?br.ensureNumber:Ve.getFromId(r,t).cleanPos;return a(e)};Ve.redrawComponents=function(e,r){r=r||Ve.listIds(e);var t=e._fullLayout;function a(n,i,l,o){for(var s=Gc.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Ve.saveRangeInitial=function(e,r){for(var t=Ve.list(e,"",!0),a=!1,n=0;nc*.3||u(a)||u(n))){var h=t.dtick/2;e+=e+hl){var o=Number(t.substr(1));i.exactYears>l&&o%12===0?e=Ve.tickIncrement(e,"M6","reverse")+Ba*1.5:i.exactMonths>l?e=Ve.tickIncrement(e,"M1","reverse")+Ba*15.5:e-=$l;var s=Ve.tickIncrement(e,t);if(s<=a)return s}return e}Ve.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&Yt(r._tmin),n;if(a){var i=Ve.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var l=br.simpleMap(r.range,r.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=br.simpleMap(n,r.l2r),e._isMinor=!0,Ve.prepTicks(e,t),a){var o=Yt(r.dtick),s=Yt(e.dtick),u=o?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);o&&s?p2(u,f)?u===2*Tn&&f===2*Ba&&(e.dtick=Tn):u===2*Tn&&f===3*Ba?e.dtick=Tn:u===Tn&&!(r._input.minor||{}).nticks?e.dtick=Ba:KM(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":p2(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?p2(u,f)||(e.dtick=KM(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function p2(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function KM(e,r){return Math.abs(e/r-1)<.001}Ve.prepTicks=function(e,r){var t=br.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?br.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=br.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,Ve.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,l=a):(i=a,l=a);var o=e[i].value,s=e[l].value,u=Math.abs(s-o),f=t||u,c=0;f>=Td?u>=Td&&u<=sj?c=u:c=wd:t===g2&&f>=Md?u>=Md&&u<=uj?c=u:c=g2:f>=Ad?u>=Ad&&u<=fj?c=u:c=Yu:t===Tn&&f>=Tn?c=Tn:f>=Ba?c=Ba:t===$l&&f>=$l?c=$l:t===Gi&&f>=Gi&&(c=Gi);var h;c>=u&&(c=u,h=!0);var d=n+c;if(r.rangebreaks&&c>0){for(var p=84,y=0,m=0;mTn&&(c=u)}(c>0||a===0)&&(e[a].periodX=n+c/2)}}Ve.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,l=r.ticklabelmode==="period",o=r.range[0]>r.range[1],s=!r.ticklabelindex||br.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=br.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(T?0:1);x--){var M=!x;x?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var A=x?r:br.extendFlat({},r,r.minor);if(M?Ve.prepMinorTicks(A,r,t):Ve.prepTicks(A,t),A.tickmode==="array"){x?(m=[],p=QM(r,!M)):(_=[],y=QM(r,!M));continue}if(A.tickmode==="sync"){m=[],p=Tj(r);continue}var k=A2(u),L=k[0],D=k[1],E=Yt(A.dtick),R=a==="log"&&!(E||A.dtick.charAt(0)==="L"),z=Ve.tickFirst(A,t);if(x){if(r._tmin=z,z=D:O<=D;O=Ve.tickIncrement(O,Y,f,n)){if(x&&U++,A.rangebreaks&&!f){if(O=h)break}if(m.length>d||O===H)break;H=O;var I={value:O};x?(R&&O!==(O|0)&&(I.simpleLabel=!0),i>1&&U%i&&(I.skipLabel=!0),m.push(I)):(I.minor=!0,_.push(I))}}if(!_||_.length<2)s=!1;else{var G=(_[1].value-_[0].value)*(o?-1:1);Xj(G,r.tickformat)||(s=!1)}if(!s)b=m;else{var Z=m.concat(_);l&&m.length&&(Z=Z.slice(1)),Z=Z.sort(function(He,Be){return He.value-Be.value}).filter(function(He,Be,Fe){return Be===0||He.value!==Fe[Be-1].value});var K=Z.map(function(He,Be){return He.minor===void 0&&!He.skipLabel?Be:null}).filter(function(He){return He!==null});K.forEach(function(He){s.map(function(Be){var Fe=He+Be;Fe>=0&&Fe-1;ve--){if(m[ve].drop){m.splice(ve,1);continue}m[ve].value=y2(m[ve].value,r);var X=r.c2p(m[ve].value);(be?te>X-W:teh||Eeh&&(Fe.periodX=h),Een&&hwd)r/=wd,a=n(10),e.dtick="M"+12*Yi(r,a,bd);else if(i>Yu)r/=Yu,e.dtick="M"+Yi(r,1,jM);else if(i>Ba){if(e.dtick=Yi(r,Ba,e._hasDayOfWeekBreaks?[1,2,7,14]:Mj),!t){var l=Ve.getTickFormat(e),o=e.ticklabelmode==="period";o&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=br.dateTick0(e.calendar,2):e.tick0=br.dateTick0(e.calendar,1),o&&(e._dowTick0=e.tick0)}}else i>Gi?e.dtick=Yi(r,Gi,jM):i>Vc?e.dtick=Yi(r,Vc,eA):i>kd?e.dtick=Yi(r,kd,eA):(a=n(10),e.dtick=Yi(r,a,bd))}else if(e.type==="log"){e.tick0=0;var s=br.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+Yi(r,a,bd)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):C2(e)?(e.tick0=0,a=1,e.dtick=Yi(r,a,Aj)):(e.tick0=0,a=n(10),e.dtick=Yi(r,a,bd));if(e.dtick===0&&(e.dtick=1),!Yt(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function sA(e){var r=e.dtick;if(e._tickexponent=0,!Yt(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=Ba&&n<=10||r>=Ba*15)e._tickround="d";else if(r>=Vc&&n<=16||r>=Gi)e._tickround="M";else if(r>=kd&&n<=19||r>=Vc)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(Yt(r)||r.charAt(0)==="L"){var l=e.range.map(e.r2d||Number);Yt(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var o=Math.max(Math.abs(l[0]),Math.abs(l[1])),s=Math.floor(Math.log(o)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(Cd(e.exponentformat)&&!k2(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}Ve.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(Yt(r))return br.increment(e,n*r);var i=r.charAt(0),l=n*Number(r.substr(1));if(i==="M")return br.incrementMonth(e,l,a);if(i==="L")return Math.log(Math.pow(10,e)+l)/Math.LN10;if(i==="D"){var o=r==="D2"?oA:lA,s=e+n*.01,u=br.roundUp(br.mod(s,1),o,t);return Math.floor(s)+Math.log(Bn.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};Ve.tickFirst=function(e,r){var t=e.r2l||Number,a=br.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&_<=e._length?m:null};if(i&&br.isArrayOrTypedArray(e.ticktext)){var c=br.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(u=0;u"+o;else{var u=Zc(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(l+="
")}r.text=l}function qj(e,r,t,a,n){var i=e.dtick,l=r.x,o=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),o||s==="L")r.text=Xc(Math.pow(10,l),e,n,a);else if(Yt(i)||s==="D"&&br.mod(l+.01,1)<.1){var u=Math.round(l),f=Math.abs(u),c=e.exponentformat;c==="power"||Cd(c)&&k2(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":ls)+f+"",r.fontSize*=1.25):(c==="e"||c==="E")&&f>2?r.text="1"+c+(u>0?"+":ls)+f:(r.text=Xc(Math.pow(10,l),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,br.mod(l,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(l<0?.5:.25)))}}function Cj(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function Lj(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),l=n[0]===void 0?"":String(n[0]);t?r.text=l+" - "+i:(r.text=i,r.text2=l)}function Sj(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=Xc(r.x,e,n,a)}function Dj(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var l=Ej(i);if(l[1]>=100)r.text=Xc(br.deg2rad(r.x),e,n,a);else{var o=r.x<0;l[1]===1?l[0]===1?r.text="\u03C0":r.text=l[0]+"\u03C0":r.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),o&&(r.text=ls+r.text)}}}else r.text=Xc(r.x,e,n,a)}function Ej(e){function r(o,s){return Math.abs(o-s)<=1e-6}function t(o,s){return r(s,0)?o:t(s,o%s)}function a(o){for(var s=1;!r(Math.round(o*s)/s,o);)s*=10;return s}var n=a(e),i=e*n,l=Math.abs(t(i,n));return[Math.round(i/l),Math.round(n/l)]}var Pj=["f","p","n","\u03BC","m","","k","M","G","T"];function Cd(e){return e==="SI"||e==="B"}function k2(e){return e>14||e<-15}function Xc(e,r,t,a){var n=e<0,i=r._tickround,l=t||r.exponentformat||"B",o=r._tickexponent,s=Ve.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:l,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:Yt(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};sA(f),i=(Number(f._tickround)||0)+4,o=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,ls);var c=Math.pow(10,-i)/2;if(l==="none"&&(o=0),e=Math.abs(e),e"+p+"":l==="B"&&o===9?e+="B":Cd(l)&&(e+=Pj[o/3+5])}return n?ls+e:e}Ve.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*Yu}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var c=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return c===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):c-h}else return typeof s=="number"?1:-1}function n(s,u,f){var c=f||function(p){return p},h=u[0],d=u[1];return(!h&&typeof h!="number"||c(h)<=c(s))&&(!d&&typeof d!="number"||c(d)>=c(s))}function i(s,u){var f=u[0]===null,c=u[1]===null,h=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||h)&&(c||d)}var l,o;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var o={false:{left:0,right:0}};return br.syncOrAsync(n.map(function(s){return function(){if(s){var u=Ve.getFromId(e,s);t||(t={}),t.axShifts=o,t.overlayingShiftedAx=l;var f=Ve.drawOne(e,u,t);return u._shiftPusher&&M2(u,u._fullDepth||0,o,!0),u._r=u.range.slice(),u._rl=br.simpleMap(u._r,u.r2l),f}}}))};Ve.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,l,o;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),c=Ve.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),M2(r,d,a,!0),M2(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=Wj(r,a));var p=h[f+"axislayer"],y=r._mainLinePosition,m=y+=r._shift,_=r._mainMirrorPosition,b=r._vals=Ve.calcTicks(r),T=[r.mirror,m,_].join("_");for(i=0;i0?Fe.bottom-He:0,Be))));var ie=0,Ae=0;if(r._shiftPusher&&(ie=Math.max(Be,Fe.height>0?ze==="l"?He-Fe.left:Fe.right-He:0),r.title.text!==s._dfltTitle[f]&&(Ae=(r._titleStandoff||0)+(r._titleScoot||0),ze==="l"&&(Ae+=tA(r))),r._fullDepth=Math.max(ie,Ae)),r.automargin){Ee={x:0,y:0,r:0,l:0,t:0,b:0};var Ce=[0,1],cr=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(ze==="b"?Ee[ze]=r._depth:(Ee[ze]=r._depth=Math.max(Fe.width>0?He-Fe.top:0,Be),Ce.reverse()),Fe.width>0){var tr=Fe.right-(r._offset+r._length);tr>0&&(Ee.xr=1,Ee.r=tr);var De=r._offset-Fe.left;De>0&&(Ee.xl=0,Ee.l=De)}}else if(ze==="l"?(r._depth=Math.max(Fe.height>0?He-Fe.left:0,Be),Ee[ze]=r._depth-cr):(r._depth=Math.max(Fe.height>0?Fe.right-He:0,Be),Ee[ze]=r._depth+cr,Ce.reverse()),Fe.height>0){var Le=Fe.bottom-(r._offset+r._length);Le>0&&(Ee.yb=0,Ee.b=Le);var Ye=r._offset-Fe.top;Ye>0&&(Ee.yt=1,Ee.t=Ye)}Ee[c]=r.anchor==="free"?r.position:r._anchorAxis.domain[Ce[0]],r.title.text!==s._dfltTitle[f]&&(Ee[ze]+=tA(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Je={x:0,y:0,r:0,l:0,t:0,b:0},Je[Re]=r.linewidth,r.mirror&&r.mirror!==!0&&(Je[Re]+=Be),r.mirror===!0||r.mirror==="ticks"?Je[c]=r._anchorAxis.domain[Ce[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Je[c]=[r._counterDomainMin,r._counterDomainMax][Ce[1]]))}Ie&&(We=Gc.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(rA(Ee,r.automargin),rA(Je,r.automargin)),Ou.autoMargin(e,q2(r),Ee),Ou.autoMargin(e,cA(r),Je),Ou.autoMargin(e,vA(r),We)}),br.syncOrAsync(_e)}};function rA(e,r){if(e){var t=Object.keys(ZM).reduce(function(a,n){return r.indexOf(n)!==-1&&ZM[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function Rj(e,r){var t=[],a,n=function(i,l){var o=i.xbnd[l];o!==null&&t.push(br.extendFlat({},i,{x:o}))};if(r.length){for(a=0;ae.range[1],o=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!o;if(t){var u=l?-1:1;t=t*u}if(a){var f=e.side,c=o&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*c}return e._id.charAt(0)==="x"?function(h){return Bu(n+e._offset+e.l2p(w2(h))+t,i+a)}:function(h){return Bu(i+a,n+e._offset+e.l2p(w2(h))+t)}};function w2(e){return e.periodX!==void 0?e.periodX:e.x}function Ij(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),l=t("bottom"),o=t("inside"),s=l||n||a||i;if(!s&&!o)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,c=qd,h=e.tickfont?e.tickfont.size:12;return(l||a)&&(f+=h*os,c+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,c+=qd),o&&u==="top"&&(c-=h*(1-os)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(c=-c),[s?f:0,o?c:0]}Ve.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,l=e._id.charAt(0),o=(e.linewidth||1)/2;return l==="x"?"M0,"+(r+o*t)+"v"+i*t:"M"+(r+o*t)+",0h"+i*t};Ve.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(z){return a.indexOf(z)!==-1},i=n("top"),l=n("left"),o=n("right"),s=n("bottom"),u=s||l||i||o,f=n("inside"),c=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:u&&(p=0),c&&(h+=p,t)){var y=br.deg2rad(t);h=p*Math.cos(y)+1,d=p*Math.sin(y)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var m={labelStandoff:h,labelShift:d},_,b,T,x,M=0,A=e.side,k=e._id.charAt(0),L=e.tickangle,D;if(k==="x")D=!f&&A==="bottom"||f&&A==="top",x=D?1:-1,f&&(x*=-1),_=d*x,b=r+h*x,T=D?1:-.2,Math.abs(L)===90&&(f?T+=Yc:L===-90&&A==="bottom"?T=os:L===90&&A==="top"?T=Yc:T=.5,M=Yc/2*(L/90)),m.xFn=function(z){return z.dx+_+M*z.fontSize},m.yFn=function(z){return z.dy+b+z.fontSize*T},m.anchorFn=function(z,H){if(u){if(l)return"end";if(o)return"start"}return!Yt(H)||H===0||H===180?"middle":H*x<0!==f?"end":"start"},m.heightFn=function(z,H,O){return H<-60||H>60?-.5*O:e.side==="top"!==f?-O:0};else if(k==="y"){if(D=!f&&A==="left"||f&&A==="right",x=D?1:-1,f&&(x*=-1),_=h,b=d*x,T=0,!f&&Math.abs(L)===90&&(L===-90&&A==="left"||L===90&&A==="right"?T=os:T=.5),f){var E=Yt(L)?+L:0;if(E!==0){var R=br.deg2rad(E);M=Math.abs(Math.sin(R))*os*x,T=0}}m.xFn=function(z){return z.dx+r-(_+z.fontSize*T)*x+M*z.fontSize},m.yFn=function(z){return z.dy+b+z.fontSize*Yc},m.anchorFn=function(z,H){return Yt(H)&&Math.abs(H)===90?"middle":D?"end":"start"},m.heightFn=function(z,H,O){return e.side==="right"&&(H*=-1),H<-30?-O:H<30?-.5*O:0}}return m};function Dd(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Ve.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(l){return l.minor&&!l.noTick}):[]).concat(r.ticks?t.vals.filter(function(l){return!l.minor&&!l.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,Dd);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(l){return Uc.stroke(Bn.select(this),l.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(l){return wn.crispRound(e,l.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),Ed(r,[aA]),i.attr("transform",t.transFn)};Ve.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(_){return _.minor}):[],l=r.showgrid?t.vals.filter(function(_){return!_.minor}):[],o=t.counterAxis;if(o&&Ve.shouldShowZeroLine(e,r,o))for(var s=r.tickmode==="array",u=0;u=0;p--){var y=p?h:d;if(y){var m=y.selectAll("path."+a).data(p?l:i,Dd);m.exit().remove(),m.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),m.attr("transform",t.transFn).attr("d",t.path).each(function(_){return Uc.stroke(Bn.select(this),_.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(_){return wn.dashStyle(_.minor?r.minor.griddash:r.griddash,_.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(_){return(_.minor?c:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&m.attr("d",t.path)}}Ed(r,[b2,_2])}};Ve.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=Ve.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(l,o){return pj(l.id,o.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(Uc.stroke,r.zerolinecolor||Uc.defaultLine).style("stroke-width",wn.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),Ed(r,[x2])};Ve.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",l=t.vals.filter(function(I){return I.text}),o=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?l:[],Dd),c=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(I){var G=Bn.select(this),Z=e._promises.length;G.call(is.positionText,o.xFn(I),o.yFn(I)).call(wn.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(is.convertToTspans,e),e._promises[Z]?c.push(e._promises.pop().then(function(){h(G,s)})):h(G,s)}),Ed(r,[XM]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(I){Bn.select(this).select("text").call(is.positionText,o.xFn(I),o.yFn(I))});function h(I,G){I.each(function(Z){var K=Bn.select(this),re=K.select(".text-math-group"),se=o.anchorFn(Z,G),ce=t.transFn.call(K.node(),Z)+(Yt(G)&&+G!=0?" rotate("+G+","+o.xFn(Z)+","+(o.yFn(Z)-Z.fontSize/2)+")":""),le=is.lineCount(K),Q=Wc*Z.fontSize,ge=o.heightFn(Z,Yt(G)?+G:0,(le-1)*Q);if(ge&&(ce+=Bu(0,ge)),re.empty()){var ue=K.select("text");ue.attr({transform:ce,"text-anchor":se}),ue.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var ke=wn.bBox(re.node()).width,ve=ke*{end:-.5,start:.5}[se];re.attr("transform",ce+Bu(ve,0))}})}r._adjustTickLabelsOverflow=function(){var I=r.ticklabeloverflow;if(!(!I||I==="allow")){var G=I.indexOf("hide")!==-1,Z=r._id.charAt(0)==="x",K=0,re=Z?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var se=br.simpleMap(r.range,r.r2l);K=r.l2p(se[0])+r._offset,re=r.l2p(se[1])+r._offset}var ce=Math.min(K,re),le=Math.max(K,re),Q=r.side,ge=1/0,ue=-1/0;f.each(function(W){var te=Bn.select(this),X=te.select(".text-math-group");if(X.empty()){var ye=wn.bBox(te.node()),_e=0;Z?(ye.right>le||ye.leftle||ye.top+(r.tickangle?0:W.fontSize/4)r["_visibleLabelMin_"+se._id]?W.style("display","none"):le.K==="tick"&&!ce&&W.style("display",null)})})})})},h(f,u+1?u:s);function d(){return c.length&&Promise.all(c)}var p=null;function y(){if(h(f,s),l.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){p=r.autotickangles[0];var I=0,G=[],Z,K=1;f.each(function(Fe){I=Math.max(I,Fe.fontSize);var Ee=r.l2p(Fe.x),Je=T2(this),We=wn.bBox(Je.node());K=Math.max(K,is.lineCount(Je)),G.push({top:0,bottom:10,height:10,left:Ee-We.width/2,right:Ee+We.width/2+2,width:We.width+2})});var re=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,se=l.length,ce=Math.abs((l[se-1].x-l[0].x)*r._m)/(se-1),le=re?ce/2:ce,Q=re?r.ticklen:I*1.25*K,ge=Math.sqrt(Math.pow(le,2)+Math.pow(Q,2)),ue=le/ge,ke=r.autotickangles.map(function(Fe){return Fe*Math.PI/180}),ve=ke.find(function(Fe){return Math.abs(Math.cos(Fe))<=ue});ve===void 0&&(ve=ke.reduce(function(Fe,Ee){return Math.abs(Math.cos(Fe))U*O&&(R=O,L[k]=D[k]=z[k])}var V=Math.abs(R-E);V-x>0?(V-=x,x*=1+x/V):x=0,r._id.charAt(0)!=="y"&&(x=-x),L[A]=b.p2r(b.r2p(D[A])+M*x),b.autorange==="min"||b.autorange==="max reversed"?(L[0]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0):(b.autorange==="max"||b.autorange==="min reversed")&&(L[1]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[b._name+".range"]=L}var Y=br.syncOrAsync(m);return Y&&Y.then&&e._promises.push(Y),Y};function Hj(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,Dd);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Uc.stroke,r.dividercolor).style("stroke-width",wn.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}Ve.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function tA(e){var r=e.title.font.size,t=(e.title.text.match(is.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(os+t*Wc):t?r*(t+1)*Wc:r}function Oj(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,l,o=(r.title.text.match(is.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?l=r._depth+r.title.standoff+i*os:(r.side==="top"||r.side==="left")&&(l=r._depth+r.title.standoff+i*(Yc+o*Wc));else{var s=Zc(r);if(r.type==="multicategory")l=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),l=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?l+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):l+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=Ve.getPxPosition(e,r),c,h,d;n==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-l:f+l):(d=r._offset+r._length/2,h=r.side==="right"?f+l:f-l,c={rotate:"-90",offset:0});var p;if(r.type!=="multicategory"){var y=r._selections[r._id+"tick"];if(p={selection:y,side:r.side},y&&y.node()&&y.node().parentNode){var m=wn.getTranslate(y.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}r.title.hasOwnProperty("standoff")&&(p.pad=0)}return r._titleStandoff=l,lj.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}Ve.shouldShowZeroLine=function(e,r,t){var a=br.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===Ld)&&(fA(r,0)||!Bj(e,r,t,a)||Yj(e,r))};Ve.clipEnds=function(e,r){return r.filter(function(t){return fA(e,t.x)})};function fA(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=vj:/%L/.test(r)?e>=cj:/%[SX]/.test(r)?e>=kd:/%M/.test(r)?e>=Vc:/%[HI]/.test(r)?e>=Gi:/%p/.test(r)?e>=$l:/%[Aadejuwx]/.test(r)?e>=Ba:/%[UVW]/.test(r)?e>=Tn:/%[Bbm]/.test(r)?e>=Ad:/%[q]/.test(r)?e>=Md:/%[Yy]/.test(r)?e>=Td:!0}});var pA=B((wge,dA)=>{"use strict";dA.exports=function(r,t,a){var n,i;if(a){var l=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[l?1:0],i=a[l?0:1]}var o=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);o===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var L2=B((Tge,mA)=>{"use strict";var Zj=pA();mA.exports=function(r,t,a,n){var i=t._template||{},l=t.type||i.type||"-";a("minallowed"),a("maxallowed");var o=a("range");if(!o){var s;!n.noInsiderange&&l!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(o=a("range",s)))}var u=t.getAutorangeDflt(o,n),f=a("autorange",u),c;o&&(o[0]===null&&o[1]===null||(o[0]===null||o[1]===null)&&(f==="reversed"||f===!0)||o[0]!==null&&(f==="min"||f==="max reversed")||o[1]!==null&&(f==="max"||f==="min reversed"))&&(o=void 0,delete t.range,t.autorange=!0,c=!0),c||(u=t.getAutorangeDflt(o,n),f=a("autorange",u)),f&&(Zj(a,f,o),(l==="linear"||l==="-")&&a("rangemode")),t.cleanRange()}});var gA=B((Mge,yA)=>{var Jj={left:0,top:0};yA.exports=$j;function $j(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=Kj(r);return t[0]=a-i.left,t[1]=n-i.top,t}function Kj(e){return e===window||e===document||e===document.body?Jj:e.getBoundingClientRect()}});var S2=B((Age,xA)=>{"use strict";var Qj=ug();function jj(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}xA.exports=Qj&&jj()});var _A=B((kge,bA)=>{"use strict";bA.exports=function(r,t,a,n,i){var l=(r-a)/(n-a),o=l+t/(n-a),s=(l+o)/2;return i==="left"||i==="bottom"?l:i==="center"||i==="middle"?s:i==="right"||i==="top"?o:l<2/3-s?l:o>4/3-s?o:s}});var MA=B((qge,TA)=>{"use strict";var wA=Pe(),eee=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];TA.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=wA.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=wA.constrain(Math.floor(t*3),0,2),eee[t][r]}});var kA=B((Cge,AA)=>{"use strict";var ree=Sc(),tee=Lh(),aee=wc().getGraphDiv,nee=xc(),D2=AA.exports={};D2.wrapped=function(e,r,t){e=aee(e),e._fullLayout&&tee.clear(e._fullLayout._uid+nee.HOVERID),D2.raw(e,r,t)};D2.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&ree.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var mi=B((Lge,LA)=>{"use strict";var iee=gA(),E2=cg(),lee=S2(),oee=Pe().removeElement,see=wa(),ss=LA.exports={};ss.align=_A();ss.getCursor=MA();var qA=kA();ss.unhover=qA.wrapped;ss.unhoverRaw=qA.raw;ss.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,l,o,s,u,f,c,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=m,lee?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=m,i.addEventListener("touchstart",m,{passive:!1})):i.ontouchstart=m;function p(T,x,M){return Math.abs(T)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,c),!d){var x;try{x=new MouseEvent("click",T)}catch(A){var M=P2(T);x=document.createEvent("MouseEvents"),x.initMouseEvent("click",T.bubbles,T.cancelable,T.view,T.detail,T.screenX,T.screenY,M[0],M[1],T.ctrlKey,T.altKey,T.shiftKey,T.metaKey,T.button,T.relatedTarget)}h.dispatchEvent(x)}t._dragging=!1,t._dragged=!1}};function CA(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}ss.coverSlip=CA;function P2(e){return iee(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Kl=B((Sge,SA)=>{"use strict";SA.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var PA=B((Dge,EA)=>{"use strict";var R2=Kl(),Jc="data-savedcursor",DA="!!";EA.exports=function(r,t){var a=r.attr(Jc);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var z2=jt(),uee=zn();RA.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:uee.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:z2({editType:"legend"}),grouptitlefont:z2({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:z2({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Rd=B(Pd=>{"use strict";Pd.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};Pd.isVertical=function(r){return r.orientation!=="h"};Pd.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var H2=B((Rge,zA)=>{"use strict";var F2=yr(),Mn=Pe(),fee=ot(),cee=tn(),vee=N2(),hee=xu(),I2=Rd();function dee(e,r,t,a){var n=r[e]||{},i=fee.newContainer(t,e);function l(Y,I){return Mn.coerce(n,i,vee,Y,I)}var o=Mn.coerceFont(l,"font",t.font);l("bgcolor",t.paper_bgcolor),l("bordercolor");var s=l("visible");if(s){for(var u,f=function(Y,I){var G=u._input,Z=u;return Mn.coerce(G,Z,cee,Y,I)},c=t.font||{},h=Mn.coerceFont(l,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,y="normal",m=(t.shapes||[]).filter(function(Y){return Y.showlegend}),_=a.concat(m).filter(function(Y){return e===(Y.legend||"legend")}),b=0;b<_.length;b++)if(u=_[b],!!u.visible){var T=u._isShape;(u.showlegend||u._dfltShowLegend&&!(u._module&&u._module.attributes&&u._module.attributes.showlegend&&u._module.attributes.showlegend.dflt===!1))&&(d++,u.showlegend&&(p=!0,(!T&&F2.traceIs(u,"pie-like")||u._input.showlegend===!0)&&d++),Mn.coerceFont(f,"legendgrouptitle.font",h)),(!T&&F2.traceIs(u,"bar")&&t.barmode==="stack"||["tonextx","tonexty"].indexOf(u.fill)!==-1)&&(y=I2.isGrouped({traceorder:y})?"grouped+reversed":"reversed"),u.legendgroup!==void 0&&u.legendgroup!==""&&(y=I2.isReversed({traceorder:y})?"reversed+grouped":"grouped")}var x=Mn.coerce(r,t,hee,"showlegend",p&&d>(e==="legend"?1:0));if(x===!1&&(t[e]=void 0),!(x===!1&&!n.uirevision)&&(l("uirevision",t.uirevision),x!==!1)){l("borderwidth");var M=l("orientation"),A=l("yref"),k=l("xref"),L=M==="h",D=A==="paper",E=k==="paper",R,z,H,O="left";L?(R=0,F2.getComponentMethod("rangeslider","isVisible")(r.xaxis)?D?(z=1.1,H="bottom"):(z=1,H="top"):D?(z=-.1,H="top"):(z=0,H="bottom")):(z=1,H="auto",E?R=1.02:(R=1,O="right")),Mn.coerce(n,i,{x:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:R}},"x"),Mn.coerce(n,i,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:z}},"y"),l("traceorder",y),I2.isGrouped(t[e])&&l("tracegroupgap"),l("entrywidth"),l("entrywidthmode"),l("indentation"),l("itemsizing"),l("itemwidth"),l("itemclick"),l("itemdoubleclick"),l("groupclick"),l("xanchor",O),l("yanchor",H),l("valign"),Mn.noneOrAll(n,i,["x","y"]);var U=l("title.text");if(U){l("title.side",L?"left":"top");var V=Mn.extendFlat({},o,{size:Mn.bigFont(o.size)});Mn.coerceFont(l,"title.font",V)}}}}zA.exports=function(r,t,a){var n,i=a.slice(),l=t.shapes;if(l)for(n=0;n{"use strict";var Gu=yr(),B2=Pe(),pee=B2.pushUnique,O2=!0;NA.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,l=n.legend.itemdoubleclick,o=n.legend.groupclick;a===1&&i==="toggle"&&l==="toggleothers"&&O2&&t.data&&t._context.showTips&&B2.notifier(B2._(t,"Double-click on legend to isolate one trace"),"long"),O2=!1;var s;if(a===1?s=i:a===2&&(s=l),!s)return;var u=o==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],c=r.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=t._fullData,d=(n.shapes||[]).filter(function(He){return He.showlegend}),p=h.concat(d),y=c.trace;y._isShape&&(y=y._fullInput);var m=y.legendgroup,_,b,T,x,M,A,k={},L=[],D=[],E=[];function R(He,Be){var Fe=L.indexOf(He),Ee=k.visible;return Ee||(Ee=k.visible=[]),L.indexOf(He)===-1&&(L.push(He),Fe=L.length-1),Ee[Fe]=Be,Fe}var z=(n.shapes||[]).map(function(He){return He._input}),H=!1;function O(He,Be){z[He].visible=Be,H=!0}function U(He,Be){if(!(c.groupTitle&&!u)){var Fe=He._fullInput||He,Ee=Fe._isShape,Je=Fe.index;Je===void 0&&(Je=Fe._index);var We=Fe.visible===!1?!1:Be;Ee?O(Je,We):R(Je,We)}}var V=y.legend,Y=y._fullInput,I=Y&&Y._isShape;if(!I&&Gu.traceIs(y,"pie-like")){var G=c.label,Z=f.indexOf(G);if(s==="toggle")Z===-1?f.push(G):f.splice(Z,1);else if(s==="toggleothers"){var K=Z!==-1,re=[];for(_=0;_{"use strict";IA.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var BA=B((Fge,OA)=>{"use strict";var HA=yr(),G2=Rd();OA.exports=function(r,t,a){var n=t._inHover,i=G2.isGrouped(t),l=G2.isReversed(t),o={},s=[],u=!1,f={},c=0,h=0,d,p;function y(Y,I,G){if(t.visible!==!1&&!(a&&Y!==t._id))if(I===""||!G2.isGrouped(t)){var Z="~~i"+c;s.push(Z),o[Z]=[G],c++}else s.indexOf(I)===-1?(s.push(I),u=!0,o[I]=[G]):o[I].push(G)}for(d=0;dE&&(D=E)}k[d][0]._groupMinRank=D,k[d][0]._preGroupSort=d}var R=function(Y,I){return Y[0]._groupMinRank-I[0]._groupMinRank||Y[0]._preGroupSort-I[0]._preGroupSort},z=function(Y,I){return Y.trace.legendrank-I.trace.legendrank||Y._preSort-I._preSort};for(k.forEach(function(Y,I){Y[0]._preGroupSort=I}),k.sort(R),d=0;d{"use strict";var zd=Pe();function YA(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}us.formatPiePercent=function(r,t){var a=YA((r*100).toPrecision(3));return zd.numSeparate(a,t)+"%"};us.formatPieValue=function(r,t){var a=YA(r.toPrecision(10));return zd.numSeparate(a,t)};us.getFirstFilled=function(r,t){if(zd.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var mee=Br(),yee=xr();GA.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?mee.pointStyle(r,a,n,t):yee.fill(r,t.color)}});var Uu=B((Oge,XA)=>{"use strict";var VA=xr(),WA=$c().castOption,gee=UA();XA.exports=function(r,t,a,n){var i=a.marker.line,l=WA(i.color,t.pts)||VA.defaultLine,o=WA(i.width,t.pts)||0;r.call(gee,t,a,n).style("stroke-width",o).call(VA.stroke,l)}});var X2=B((Bge,jA)=>{"use strict";var Ya=kr(),U2=yr(),Ea=Pe(),ZA=Ea.strTranslate,Ka=Br(),Yn=xr(),V2=Hn().extractOpts,Nd=_n(),xee=Uu(),bee=$c().castOption,_ee=Y2(),JA=12,$A=5,fs=2,wee=10,Vu=5;jA.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",l=a.itemwidth,o=(l+_ee.itemGap*2)/2,s=ZA(o,0),u=function(k,L,D,E){var R;if(k+1)R=k;else if(L&&L.width>0)R=L.width;else return 0;return i?E:Math.min(R,D)};r.each(function(k){var L=Ya.select(this),D=Ea.ensureSingle(L,"g","layers");D.style("opacity",k[0].trace.opacity);var E=a.indentation,R=a.valign,z=k[0].lineHeight,H=k[0].height;if(R==="middle"&&E===0||!z||!H)D.attr("transform",null);else{var O={top:1,bottom:-1}[R],U=O*(.5*(z-H+3))||0,V=a.indentation;D.attr("transform",ZA(V,U))}var Y=D.selectAll("g.legendfill").data([k]);Y.enter().append("g").classed("legendfill",!0);var I=D.selectAll("g.legendlines").data([k]);I.enter().append("g").classed("legendlines",!0);var G=D.selectAll("g.legendsymbols").data([k]);G.enter().append("g").classed("legendsymbols",!0),G.selectAll("g.legendpoints").data([k]).enter().append("g").classed("legendpoints",!0)}).each(A).each(h).each(p).each(d).each(m).each(x).each(T).each(f).each(c).each(_).each(b);function f(k){var L=KA(k),D=L.showFill,E=L.showLine,R=L.showGradientLine,z=L.showGradientFill,H=L.anyFill,O=L.anyLine,U=k[0],V=U.trace,Y,I,G=V2(V),Z=G.colorscale,K=G.reversescale,re=function(ke){if(ke.size())if(D)Ka.fillGroupStyle(ke,t,!0);else{var ve="legendfill-"+V.uid;Ka.gradient(ke,t,ve,W2(K),Z,"fill")}},se=function(ke){if(ke.size()){var ve="legendline-"+V.uid;Ka.lineGroupStyle(ke),Ka.gradient(ke,t,ve,W2(K),Z,"stroke")}},ce=Nd.hasMarkers(V)||!H?"M5,0":O?"M5,-2":"M5,-3",le=Ya.select(this),Q=le.select(".legendfill").selectAll("path").data(D||z?[k]:[]);if(Q.enter().append("path").classed("js-fill",!0),Q.exit().remove(),Q.attr("d",ce+"h"+l+"v6h-"+l+"z").call(re),E||R){var ge=u(void 0,V.line,wee,$A);I=Ea.minExtend(V,{line:{width:ge}}),Y=[Ea.minExtend(U,{trace:I})]}var ue=le.select(".legendlines").selectAll("path").data(E||R?[Y]:[]);ue.enter().append("path").classed("js-line",!0),ue.exit().remove(),ue.attr("d",ce+(R?"l"+l+",0.0001":"h"+l)).call(E?Ka.lineGroupStyle:se)}function c(k){var L=KA(k),D=L.anyFill,E=L.anyLine,R=L.showLine,z=L.showMarker,H=k[0],O=H.trace,U=!z&&!E&&!D&&Nd.hasText(O),V,Y;function I(Q,ge,ue,ke){var ve=Ea.nestedProperty(O,Q).get(),be=Ea.isArrayOrTypedArray(ve)&&ge?ge(ve):ve;if(i&&be&&ke!==void 0&&(be=ke),ue){if(beue[1])return ue[1]}return be}function G(Q){return H._distinct&&H.index&&Q[H.index]?Q[H.index]:Q[0]}if(z||U||R){var Z={},K={};if(z){Z.mc=I("marker.color",G),Z.mx=I("marker.symbol",G),Z.mo=I("marker.opacity",Ea.mean,[.2,1]),Z.mlc=I("marker.line.color",G),Z.mlw=I("marker.line.width",Ea.mean,[0,5],fs),K.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var re=I("marker.size",Ea.mean,[2,16],JA);Z.ms=re,K.marker.size=re}R&&(K.line={width:I("line.width",G,[0,10],$A)}),U&&(Z.tx="Aa",Z.tp=I("textposition",G),Z.ts=10,Z.tc=I("textfont.color",G),Z.tf=I("textfont.family",G),Z.tw=I("textfont.weight",G),Z.ty=I("textfont.style",G),Z.tv=I("textfont.variant",G),Z.tC=I("textfont.textcase",G),Z.tE=I("textfont.lineposition",G),Z.tS=I("textfont.shadow",G)),V=[Ea.minExtend(H,Z)],Y=Ea.minExtend(O,K),Y.selectedpoints=null,Y.texttemplate=null}var se=Ya.select(this).select("g.legendpoints"),ce=se.selectAll("path.scatterpts").data(z?V:[]);ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),ce.exit().remove(),ce.call(Ka.pointStyle,Y,t),z&&(V[0].mrc=3);var le=se.selectAll("g.pointtext").data(U?V:[]);le.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),le.exit().remove(),le.selectAll("text").call(Ka.textPointStyle,Y,t)}function h(k){var L=k[0].trace,D=L.type==="waterfall";if(k[0]._distinct&&D){var E=k[0].trace[k[0].dir].marker;return k[0].mc=E.color,k[0].mlw=E.line.width,k[0].mlc=E.line.color,y(k,this,"waterfall")}var R=[];L.visible&&D&&(R=k[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=Ya.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(R);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(H){var O=Ya.select(this),U=L[H[0]].marker,V=u(void 0,U.line,Vu,fs);O.attr("d",H[1]).style("stroke-width",V+"px").call(Yn.fill,U.color),V&&O.call(Yn.stroke,U.line.color)})}function d(k){y(k,this)}function p(k){y(k,this,"funnel")}function y(k,L,D){var E=k[0].trace,R=E.marker||{},z=R.line||{},H=R.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",O=D?E.visible&&E.type===D:U2.traceIs(E,"bar"),U=Ya.select(L).select("g.legendpoints").selectAll("path.legend"+D).data(O?[k]:[]);U.enter().append("path").classed("legend"+D,!0).attr("d",H).attr("transform",s),U.exit().remove(),U.each(function(V){var Y=Ya.select(this),I=V[0],G=u(I.mlw,R.line,Vu,fs);Y.style("stroke-width",G+"px");var Z=I.mcc;if(!a._inHover&&"mc"in I){var K=V2(R),re=K.mid;re===void 0&&(re=(K.max+K.min)/2),Z=Ka.tryColorscale(R,"")(re)}var se=Z||I.mc||R.color,ce=R.pattern,le=ce&&Ka.getPatternAttr(ce.shape,0,"");if(le){var Q=Ka.getPatternAttr(ce.bgcolor,0,null),ge=Ka.getPatternAttr(ce.fgcolor,0,null),ue=ce.fgopacity,ke=QA(ce.size,8,10),ve=QA(ce.solidity,.5,1),be="legend-"+E.uid;Y.call(Ka.pattern,"legend",t,be,le,ke,ve,Z,ce.fillmode,Q,ge,ue)}else Y.call(Yn.fill,se);G&&Yn.stroke(Y,I.mlc||z.color)})}function m(k){var L=k[0].trace,D=Ya.select(this).select("g.legendpoints").selectAll("path.legendbox").data(L.visible&&U2.traceIs(L,"box-violin")?[k]:[]);D.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.each(function(){var E=Ya.select(this);if((L.boxpoints==="all"||L.points==="all")&&Yn.opacity(L.fillcolor)===0&&Yn.opacity((L.line||{}).color)===0){var R=Ea.minExtend(L,{marker:{size:i?JA:Ea.constrain(L.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});D.call(Ka.pointStyle,R,t)}else{var z=u(void 0,L.line,Vu,fs);E.style("stroke-width",z+"px").call(Yn.fill,L.fillcolor),z&&Yn.stroke(E,L.line.color)}})}function _(k){var L=k[0].trace,D=Ya.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(L.visible&&L.type==="candlestick"?[k,k]:[]);D.enter().append("path").classed("legendcandle",!0).attr("d",function(E,R){return R?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(E,R){var z=Ya.select(this),H=L[R?"increasing":"decreasing"],O=u(void 0,H.line,Vu,fs);z.style("stroke-width",O+"px").call(Yn.fill,H.fillcolor),O&&Yn.stroke(z,H.line.color)})}function b(k){var L=k[0].trace,D=Ya.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(L.visible&&L.type==="ohlc"?[k,k]:[]);D.enter().append("path").classed("legendohlc",!0).attr("d",function(E,R){return R?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(E,R){var z=Ya.select(this),H=L[R?"increasing":"decreasing"],O=u(void 0,H.line,Vu,fs);z.style("fill","none").call(Ka.dashLine,H.line.dash,O),O&&Yn.stroke(z,H.line.color)})}function T(k){M(k,this,"pie")}function x(k){M(k,this,"funnelarea")}function M(k,L,D){var E=k[0],R=E.trace,z=D?R.visible&&R.type===D:U2.traceIs(R,D),H=Ya.select(L).select("g.legendpoints").selectAll("path.legend"+D).data(z?[k]:[]);if(H.enter().append("path").classed("legend"+D,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),H.exit().remove(),H.size()){var O=R.marker||{},U=u(bee(O.line.width,E.pts),O.line,Vu,fs),V="pieLike",Y=Ea.minExtend(R,{marker:{line:{width:U}}},V),I=Ea.minExtend(E,{trace:Y},V);xee(H,I,Y,t)}}function A(k){var L=k[0].trace,D,E=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":E=[["M-15,-2V4H15V-2Z"]],D=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":E=[["M-6,-6V6H6V-6Z"]],D=!0;break;case"densitymapbox":case"densitymap":E=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],D="radial";break;case"cone":E=[["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"]],D=!1;break;case"streamtube":E=[["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"]],D=!1;break;case"surface":E=[["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"]],D=!0;break;case"mesh3d":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!1;break;case"volume":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!0;break;case"isosurface":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],D=!1;break}var R=Ya.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(E);R.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(z,H){var O=Ya.select(this),U=V2(L),V=U.colorscale,Y=U.reversescale,I=function(re){if(re.size()){var se="legendfill-"+L.uid;Ka.gradient(re,t,se,W2(Y,D==="radial"),V,"fill")}},G;if(V){if(!D){var K=V.length;G=H===0?V[Y?K-1:0][1]:H===1?V[Y?0:K-1][1]:V[Math.floor((K-1)/2)][1]}}else{var Z=L.vertexcolor||L.facecolor||L.color;G=Ea.isArrayOrTypedArray(Z)?Z[H]||Z[0]:Z}O.attr("d",z[0]),G?O.call(Yn.fill,G):O.call(I)})}};function W2(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function KA(e){var r=e[0].trace,t=r.contours,a=Nd.hasLines(r),n=Nd.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",l=!1,o=!1;if(t){var s=t.coloring;s==="lines"?l=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(o=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:l,showGradientFill:o,anyLine:a||l,anyFill:i||o}}function QA(e,r,t){return e&&Ea.isArrayOrTypedArray(e)?r:e>t?t:e}});var K2=B((Yge,uk)=>{"use strict";var un=kr(),Gt=Pe(),J2=St(),Zu=yr(),ek=Sc(),Z2=mi(),Ut=Br(),Id=xr(),cs=va(),rk=FA(),$t=Y2(),$2=Sa(),ok=$2.LINE_SPACING,Xu=$2.FROM_TL,tk=$2.FROM_BR,ak=BA(),Tee=X2(),nk=Rd(),Wu=1,Mee=/^legend[0-9]*$/;uk.exports=function(r,t){if(t)ik(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=un.select(this),f=u.attr("class"),c=f.split(" ")[0];c.match(Mee)&&n.indexOf(c)===-1&&u.remove()});for(var l=0;l1)}var p=a.hiddenlabels||[];if(!o&&(!a.showlegend||!s.length))return l.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),J2.autoMargin(e,n);var y=Gt.ensureSingle(l,"g",n,function(L){o||L.attr("pointer-events","all")}),m=Gt.ensureSingleById(a._topdefs,"clipPath",i,function(L){L.append("rect")}),_=Gt.ensureSingle(y,"rect","bg",function(L){L.attr("shape-rendering","crispEdges")});_.call(Id.stroke,t.bordercolor).call(Id.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var b=Gt.ensureSingle(y,"g","scrollbox"),T=t.title;t._titleWidth=0,t._titleHeight=0;var x;T.text?(x=Gt.ensureSingle(b,"text",n+"titletext"),x.attr("text-anchor","start").call(Ut.font,T.font).text(T.text),Hd(x,b,e,t,Wu)):b.selectAll("."+n+"titletext").remove();var M=Gt.ensureSingle(y,"rect","scrollbar",function(L){L.attr($t.scrollBarEnterAttrs).call(Id.fill,$t.scrollBarColor)}),A=b.selectAll("g.groups").data(s);A.enter().append("g").attr("class","groups"),A.exit().remove();var k=A.selectAll("g.traces").data(Gt.identity);k.enter().append("g").attr("class","traces"),k.exit().remove(),k.style("opacity",function(L){var D=L[0].trace;return Zu.traceIs(D,"pie-like")?p.indexOf(L[0].label)!==-1?.5:1:D.visible==="legendonly"?.5:1}).each(function(){un.select(this).call(kee,e,t)}).call(Tee,e,t).each(function(){o||un.select(this).call(qee,e,n)}),Gt.syncOrAsync([J2.previousPromises,function(){return See(e,A,k,t)},function(){var L=a._size,D=t.borderwidth,E=t.xref==="paper",R=t.yref==="paper";if(T.text&&Aee(x,t,D),!o){var z,H;E?z=L.l+L.w*t.x-Xu[Od(t)]*t._width:z=a.width*t.x-Xu[Od(t)]*t._width,R?H=L.t+L.h*(1-t.y)-Xu[Bd(t)]*t._effHeight:H=a.height*(1-t.y)-Xu[Bd(t)]*t._effHeight;var O=Dee(e,n,z,H);if(O)return;if(a.margin.autoexpand){var U=z,V=H;z=E?Gt.constrain(z,0,a.width-t._width):U,H=R?Gt.constrain(H,0,a.height-t._effHeight):V,z!==U&&Gt.log("Constrain "+n+".x to make legend fit inside graph"),H!==V&&Gt.log("Constrain "+n+".y to make legend fit inside graph")}Ut.setTranslate(y,z,H)}if(M.on(".drag",null),y.on("wheel",null),o||t._height<=t._maxHeight||e._context.staticPlot){var Y=t._effHeight;o&&(Y=t._height),_.attr({width:t._width-D,height:Y-D,x:D/2,y:D/2}),Ut.setTranslate(b,0,0),m.select("rect").attr({width:t._width-2*D,height:Y-2*D,x:D,y:D}),Ut.setClipUrl(b,i,e),Ut.setRect(M,0,0,0,0),delete t._scrollY}else{var I=Math.max($t.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),G=t._effHeight-I-2*$t.scrollBarMargin,Z=t._height-t._effHeight,K=G/Z,re=Math.min(t._scrollY||0,Z);_.attr({width:t._width-2*D+$t.scrollBarWidth+$t.scrollBarMargin,height:t._effHeight-D,x:D/2,y:D/2}),m.select("rect").attr({width:t._width-2*D+$t.scrollBarWidth+$t.scrollBarMargin,height:t._effHeight-2*D,x:D,y:D+re}),Ut.setClipUrl(b,i,e),ve(re,I,K),y.on("wheel",function(){re=Gt.constrain(t._scrollY+un.event.deltaY/G*Z,0,Z),ve(re,I,K),re!==0&&re!==Z&&un.event.preventDefault()});var se,ce,le,Q=function(ye,_e,xe){var Ie=(xe-_e)/K+ye;return Gt.constrain(Ie,0,Z)},ge=function(ye,_e,xe){var Ie=(_e-xe)/K+ye;return Gt.constrain(Ie,0,Z)},ue=un.behavior.drag().on("dragstart",function(){var ye=un.event.sourceEvent;ye.type==="touchstart"?se=ye.changedTouches[0].clientY:se=ye.clientY,le=re}).on("drag",function(){var ye=un.event.sourceEvent;ye.buttons===2||ye.ctrlKey||(ye.type==="touchmove"?ce=ye.changedTouches[0].clientY:ce=ye.clientY,re=Q(le,se,ce),ve(re,I,K))});M.call(ue);var ke=un.behavior.drag().on("dragstart",function(){var ye=un.event.sourceEvent;ye.type==="touchstart"&&(se=ye.changedTouches[0].clientY,le=re)}).on("drag",function(){var ye=un.event.sourceEvent;ye.type==="touchmove"&&(ce=ye.changedTouches[0].clientY,re=ge(le,se,ce),ve(re,I,K))});b.call(ke)}function ve(ye,_e,xe){t._scrollY=e._fullLayout[n]._scrollY=ye,Ut.setTranslate(b,0,-ye),Ut.setRect(M,t._width,$t.scrollBarMargin+ye*xe,$t.scrollBarWidth,_e),m.select("rect").attr("y",D+ye)}if(e._context.edits.legendPosition){var be,W,te,X;y.classed("cursor-move",!0),Z2.init({element:y.node(),gd:e,prepFn:function(ye){if(ye.target!==M.node()){var _e=Ut.getTranslate(y);te=_e.x,X=_e.y}},moveFn:function(ye,_e){if(te!==void 0&&X!==void 0){var xe=te+ye,Ie=X+_e;Ut.setTranslate(y,xe,Ie),be=Z2.align(xe,t._width,L.l,L.l+L.w,t.xanchor),W=Z2.align(Ie+t._height,-t._height,L.t+L.h,L.t,t.yanchor)}},doneFn:function(){if(be!==void 0&&W!==void 0){var ye={};ye[n+".x"]=be,ye[n+".y"]=W,Zu.call("_guiRelayout",e,ye)}},clickFn:function(ye,_e){var xe=l.selectAll("g.traces").filter(function(){var Ie=this.getBoundingClientRect();return _e.clientX>=Ie.left&&_e.clientX<=Ie.right&&_e.clientY>=Ie.top&&_e.clientY<=Ie.bottom});xe.size()>0&&sk(e,y,xe,ye,_e)}})}}],e)}}function Fd(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,l=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*l:t+(l||n)}function sk(e,r,t,a,n){var i=t.data()[0][0].trace,l={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(l.group=i._group),Zu.traceIs(i,"pie-like")&&(l.label=t.datum()[0].label);var o=ek.triggerHandler(e,"plotly_legendclick",l);if(a===1){if(o===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&rk(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=ek.triggerHandler(e,"plotly_legenddoubleclick",l);s!==!1&&o!==!1&&rk(t,e,a)}}function kee(e,r,t){var a=Yd(t),n=e.data()[0][0],i=n.trace,l=Zu.traceIs(i,"pie-like"),o=!t._inHover&&r._context.edits.legendText&&!l,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=l?n.label:i.name,i._meta&&(u=Gt.templateString(u,i._meta))));var c=Gt.ensureSingle(e,"text",a+"text");c.attr("text-anchor","start").call(Ut.font,f).text(o?lk(u,s):u);var h=t.indentation+t.itemwidth+$t.itemGap*2;cs.positionText(c,h,0),o?c.call(cs.makeEditable,{gd:r,text:u}).call(Hd,e,r,t).on("edit",function(d){this.text(lk(d,s)).call(Hd,e,r,t);var p=n.trace._fullInput||{},y={};return y.name=d,p._isShape?Zu.call("_guiRelayout",r,"shapes["+i.index+"].name",y.name):Zu.call("_guiRestyle",r,y,i.index)}):Hd(c,e,r,t)}function lk(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function qee(e,r,t){var a=r._context.doubleClickDelay,n,i=1,l=Gt.ensureSingle(e,"rect",t+"toggle",function(o){r._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(Id.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(l.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),sk(r,o,e,i,un.event)}}))}function Hd(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),cs.convertToTspans(e,t,function(){Cee(r,t,a,n)})}function Cee(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),l=i.node(),o=Yd(t);t||(t=r._fullLayout[o]);var s=t.borderwidth,u;a===Wu?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*ok,c,h;if(l){var d=Ut.bBox(l);c=d.height,h=d.width,a===Wu?Ut.setTranslate(i,s,s+c*.75):Ut.setTranslate(i,0,c*.25)}else{var p="."+o+(a===Wu?"title":"")+"text",y=e.select(p),m=cs.lineCount(y),_=y.node();if(c=f*m,h=_?Ut.bBox(_).width:0,a===Wu)t.title.side==="left"&&(h+=$t.itemGap*2),cs.positionText(y,s+$t.titlePad,s+f);else{var b=$t.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(b=$t.itemGap,h-=t.indentation+t.itemwidth),cs.positionText(y,b,-f*((m-1)/2-.3))}}a===Wu?(t._titleWidth=h,t._titleHeight=c):(n.lineHeight=f,n.height=Math.max(c,16)+3,n.width=h)}function Lee(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function See(e,r,t,a){var n=e._fullLayout,i=Yd(a);a||(a=n[i]);var l=n._size,o=nk.isVertical(a),s=nk.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,h=$t.itemGap,d=a.indentation+a.itemwidth+h*2,p=2*(f+h),y=Bd(a),m=a.y<0||a.y===0&&y==="top",_=a.y>1||a.y===1&&y==="bottom",b=a.tracegroupgap,T={};a._maxHeight=Math.max(m||_?n.height/2:l.h,30);var x=0;a._width=0,a._height=0;var M=Lee(a);if(o)t.each(function(le){var Q=le[0].height;Ut.setTranslate(this,f+M[0],f+M[1]+a._height+Q/2+h),a._height+=Q,a._width=Math.max(a._width,le[0].width)}),x=d+a._width,a._width+=h+d+c,a._height+=p,s&&(r.each(function(le,Q){Ut.setTranslate(this,0,Q*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var A=Od(a),k=a.x<0||a.x===0&&A==="right",L=a.x>1||a.x===1&&A==="left",D=_||m,E=n.width/2;a._maxWidth=Math.max(k?D&&A==="left"?l.l+l.w:E:L?D&&A==="right"?l.r+l.w:E:l.w,2*d);var R=0,z=0;t.each(function(le){var Q=Fd(le,a,d);R=Math.max(R,Q),z+=Q}),x=null;var H=0;if(s){var O=0,U=0,V=0;r.each(function(){var le=0,Q=0;un.select(this).selectAll("g.traces").each(function(ue){var ke=Fd(ue,a,d),ve=ue[0].height;Ut.setTranslate(this,M[0],M[1]+f+h+ve/2+Q),Q+=ve,le=Math.max(le,ke),T[ue[0].trace.legendgroup]=le});var ge=le+h;U>0&&ge+f+U>a._maxWidth?(H=Math.max(H,U),U=0,V+=O+b,O=Q):O=Math.max(O,Q),Ut.setTranslate(this,U,V),U+=ge}),a._width=Math.max(H,U)+f,a._height=V+O+p}else{var Y=t.size(),I=z+c+(Y-1)*h=a._maxWidth&&(H=Math.max(H,re),Z=0,K+=G,a._height+=G,G=0),Ut.setTranslate(this,M[0]+f+Z,M[1]+f+K+Q/2+h),re=Z+ge+h,Z+=ue,G=Math.max(G,Q)}),I?(a._width=Z+c,a._height=G+p):(a._width=Math.max(H,re)+c,a._height+=G+p)}}a._width=Math.ceil(Math.max(a._width+M[0],a._titleWidth+2*(f+$t.titlePad))),a._height=Math.ceil(Math.max(a._height+M[1],a._titleHeight+2*(f+$t.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var se=e._context.edits,ce=se.legendText||se.legendPosition;t.each(function(le){var Q=un.select(this).select("."+i+"toggle"),ge=le[0].height,ue=le[0].trace.legendgroup,ke=Fd(le,a,d);s&&ue!==""&&(ke=T[ue]);var ve=ce?d:x||ke;!o&&!u&&(ve+=h/2),Ut.setRect(Q,0,-ge/2,ve,ge)})}function Dee(e,r,t,a){var n=e._fullLayout,i=n[r],l=Od(i),o=Bd(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",c=i.x<.5?"l":"r",h={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return J2.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*Xu[l],r:i._width*tk[l],b:i._effHeight*tk[o],t:i._effHeight*Xu[o]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][c]=h[c]:e._fullLayout._reservedMargin[r][f]=h[f]}function Od(e){return Gt.isRightAnchor(e)?"right":Gt.isCenterAnchor(e)?"center":"left"}function Bd(e){return Gt.isBottomAnchor(e)?"bottom":Gt.isMiddleAnchor(e)?"middle":"top"}function Yd(e){return e._id||"legend"}});var r3=B(e3=>{"use strict";var vs=kr(),hl=zr(),fk=Rn(),Dt=Pe(),Eee=Dt.pushUnique,Q2=Dt.strTranslate,Pee=Dt.strRotate,Ree=Sc(),Gn=va(),zee=PA(),Ui=Br(),ta=xr(),Gd=mi(),Vi=$r(),Nee=wa().zindexSeparator,$u=yr(),yi=Hi(),hs=xc(),Fee=H2(),Iee=K2(),gk=hs.YANGLE,j2=Math.PI*gk/180,Hee=1/Math.sin(j2),Oee=Math.cos(j2),Bee=Math.sin(j2),Tt=hs.HOVERARROWSIZE,Or=hs.HOVERTEXTPAD,ck={box:!0,ohlc:!0,violin:!0,candlestick:!0},Yee={scatter:!0,scattergl:!0,splom:!0};function vk(e,r){return e.distance-r.distance}e3.hover=function(r,t,a,n){r=Dt.getGraphDiv(r);var i=t.target;Dt.throttle(r._fullLayout._uid+hs.HOVERID,hs.HOVERMINTIME,function(){Gee(r,t,a,n,i)})};e3.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=Tk(n),l=Mk(n),o=r.map(function(m){var _=m._x0||m.x0||m.x||0,b=m._x1||m.x1||m.x||0,T=m._y0||m.y0||m.y||0,x=m._y1||m.y1||m.y||0,M=m.eventData;if(M){var A=Math.min(_,b),k=Math.max(_,b),L=Math.min(T,x),D=Math.max(T,x),E=m.trace;if($u.traceIs(E,"gl3d")){var R=n._fullLayout[E.scene]._scene.container,z=R.offsetLeft,H=R.offsetTop;A+=z,k+=z,L+=H,D+=H}M.bbox={x0:A+l,x1:k+l,y0:L+i,y1:D+i},t.inOut_bbox&&t.inOut_bbox.push(M.bbox)}else M=!1;return{color:m.color||ta.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:M}}),s=!1,u=bk(o,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||ta.background,container:vs.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,c=5,h=0,d=0;f.sort(function(m,_){return m.y0-_.y0}).each(function(m,_){var b=m.y0-m.by/2;b-ck[0]._length||X<0||X>L[0]._length)return Gd.unhoverRaw(e,r)}if(r.pointerX=te+k[0]._offset,r.pointerY=X+L[0]._offset,"xval"in r?V=yi.flat(i,r.xval):V=yi.p2c(k,te),"yval"in r?Y=yi.flat(i,r.yval):Y=yi.p2c(L,X),!hl(V[0])||!hl(Y[0]))return Dt.warn("Fx.hover failed",r,e),Gd.unhoverRaw(e,r)}var xe=1/0;function Ie(gr,ct){for(G=0;Gue&&(O.splice(0,ue),xe=O[0].distance),c&&H!==0&&O.length===0){ge.distance=H,ge.index=!1;var _t=K._module.hoverPoints(ge,le,Q,"closest",{hoverLayer:o._hoverlayer});if(_t&&(_t=_t.filter(function(it){return it.spikeDistance<=H})),_t&&_t.length){var Fa,fa=_t.filter(function(it){return it.xa.showspikes&&it.xa.spikesnap!=="hovered data"});if(fa.length){var ai=fa[0];hl(ai.x0)&&hl(ai.y0)&&(Fa=Re(ai),(!ke.vLinePoint||ke.vLinePoint.spikeDistance>Fa.spikeDistance)&&(ke.vLinePoint=Fa))}var ni=_t.filter(function(it){return it.ya.showspikes&&it.ya.spikesnap!=="hovered data"});if(ni.length){var Qt=ni[0];hl(Qt.x0)&&hl(Qt.y0)&&(Fa=Re(Qt),(!ke.hLinePoint||ke.hLinePoint.spikeDistance>Fa.spikeDistance)&&(ke.hLinePoint=Fa))}}}}}Ie();function ze(gr,ct,Xr){for(var bt=null,Lt=1/0,vt,_t=0;_t0&&Math.abs(gr.distance)Le-1;lr--)fr(O[lr]);O=Ge,Ee()}var Ne=e._hoverdata,ne=[],fe=Tk(e),Se=Mk(e);for(I=0;I1||O.length>1)||h==="closest"&&ve&&O.length>1,Sn=ta.combine(o.plot_bgcolor||ta.background,o.paper_bgcolor),Za=bk(O,{gd:e,hovermode:h,rotateLabels:sa,bgColor:Sn,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),ua=Za.hoverLabels;if(yi.isUnifiedHover(h)||(Vee(ua,sa,o,Za.commonLabelBoundingBox),wk(ua,sa,o._invScaleX,o._invScaleY)),n&&n.tagName){var Ja=$u.getComponentMethod("annotations","hasClickToShow")(e,ne);zee(vs.select(n),Ja?"pointer":"")}!n||a||!Zee(e,r,Ne)||(Ne&&e.emit("plotly_unhover",{event:r,points:Ne}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:k,yaxes:L,xvals:V,yvals:Y}))}function xk(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 Uee=/([\s\S]*)<\/extra>/;function bk(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,l=r.bgColor,o=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||hs.HOVERFONT,c=r.fontSize||hs.HOVERFONTSIZE,h=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,p=r.fontVariant||a.font.variant,y=r.fontTextcase||a.font.textcase,m=r.fontLineposition||a.font.lineposition,_=r.fontShadow||a.font.shadow,b=e[0],T=b.xa,x=b.ya,M=n.charAt(0),A=M+"Label",k=b[A];if(k===void 0&&T.type==="multicategory")for(var L=0;La.width-Ne&&(ne=a.width-Ne),cr.attr("d","M"+($e-ne)+",0L"+($e-ne+Tt)+","+lr+Tt+"H"+Ne+"v"+lr+(Or*2+Oe.height)+"H"+-Ne+"V"+lr+Tt+"H"+($e-ne-Tt)+"Z"),$e=ne,G.minX=$e-Ne,G.maxX=$e+Ne,T.side==="top"?(G.minY=fr-(Or*2+Oe.height),G.maxY=fr-Or):(G.minY=fr+Or,G.maxY=fr+(Or*2+Oe.height))}else{var fe,Se,qe;x.side==="right"?(fe="start",Se=1,qe="",$e=T._offset+T._length):(fe="end",Se=-1,qe="-",$e=T._offset),fr=x._offset+(b.y0+b.y1)/2,tr.attr("text-anchor",fe),cr.attr("d","M0,0L"+qe+Tt+","+Tt+"V"+(Or+Oe.height/2)+"h"+qe+(Or*2+Oe.width)+"V-"+(Or+Oe.height/2)+"H"+qe+Tt+"V-"+Tt+"Z"),G.minY=fr-(Or+Oe.height/2),G.maxY=fr+(Or+Oe.height/2),x.side==="right"?(G.minX=$e+Tt,G.maxX=$e+Tt+(Or*2+Oe.width)):(G.minX=$e-Tt-(Or*2+Oe.width),G.maxX=$e-Tt);var ir=Oe.height/2,vr=E-Oe.top-ir,sr="clip"+a._uid+"commonlabel"+x._id,Ar;if($e=0?We=Be:Fe+X=0?We=Fe:Ee+X=0?ie=Re:He+ye=0?ie=He:Je+ye=0,(Ce.idealAlign==="top"||!Wr)&&Nt?(qe-=vr/2,Ce.anchor="end"):Wr?(qe+=vr/2,Ce.anchor="start"):Ce.anchor="middle",Ce.crossPos=qe;else{if(Ce.pos=qe,Wr=Se+ir/2+et<=R,Nt=Se-ir/2-et>=0,(Ce.idealAlign==="left"||!Wr)&&Nt)Se-=ir/2,Ce.anchor="end";else if(Wr)Se+=ir/2,Ce.anchor="start";else{Ce.anchor="middle";var oa=et/2,Na=Se+oa-R,sa=Se-oa;Na>0&&(Se-=Na),sa<0&&(Se+=-sa)}Ce.crossPos=Se}fr.attr("text-anchor",Ce.anchor),Ne&&lr.attr("text-anchor",Ce.anchor),cr.attr("transform",Q2(Se,qe)+(i?Pee(gk):""))}),{hoverLabels:Ae,commonLabelBoundingBox:G}}function hk(e,r,t,a,n,i){var l="",o="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Dt.templateString(e.name,e.trace._meta)),l=mk(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(o+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(o+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(o+=(o?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?o=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(o=e.yLabel):e.yLabel===void 0?o=e.xLabel:o="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(o+=(o?"
":"")+e.text),e.extraText!==void 0&&(o+=(o?"
":"")+e.extraText),i&&o===""&&!e.hovertemplate&&(l===""&&i.remove(),o=l);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(c[s+"other"]=c[s+"Val"],c[s+"otherLabel"]=c[s+"Label"]),o=Dt.hovertemplateString(f,c,a._d3locale,e.eventData[0]||{},e.trace._meta),o=o.replace(Uee,function(h,d){return l=mk(d,e.nameLength),""})}return[o,l]}function Vee(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",l=0,o=1,s=e.size(),u=new Array(s),f=0,c=a.minX,h=a.maxX,d=a.minY,p=a.maxY,y=function(V){return V*t._invScaleX},m=function(V){return V*t._invScaleY};e.each(function(V){var Y=V[n],I=V[i],G=Y._id.charAt(0)==="x",Z=Y.range;f===0&&Z&&Z[0]>Z[1]!==G&&(o=-1);var K=0,re=G?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var se=_k(V,r),ce=V.anchor,le=ce==="end"?-1:1,Q,ge;if(ce==="middle")Q=V.crossPos+(G?m(se.y-V.by/2):y(V.bx/2+V.tx2width/2)),ge=Q+(G?m(V.by):y(V.bx));else if(G)Q=V.crossPos+m(Tt+se.y)-m(V.by/2-Tt),ge=Q+m(V.by);else{var ue=y(le*Tt+se.x),ke=ue+y(le*V.bx);Q=V.crossPos+Math.min(ue,ke),ge=V.crossPos+Math.max(ue,ke)}G?d!==void 0&&p!==void 0&&Math.min(ge,p)-Math.max(Q,d)>1&&(I.side==="left"?(K=I._mainLinePosition,re=t.width):re=I._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ge,h)-Math.max(Q,c)>1&&(I.side==="top"?(K=I._mainLinePosition,re=t.height):re=I._mainLinePosition)}u[f++]=[{datum:V,traceIndex:V.trace.index,dp:0,pos:V.pos,posref:V.posref,size:V.by*(G?Hee:1)/2,pmin:K,pmax:re}]}),u.sort(function(V,Y){return V[0].posref-Y[0].posref||o*(Y[0].traceIndex-V[0].traceIndex)});var _,b,T,x,M,A,k;function L(V){var Y=V[0],I=V[V.length-1];if(b=Y.pmin-Y.pos-Y.dp+Y.size,T=I.pos+I.dp+I.size-Y.pmax,b>.01){for(M=V.length-1;M>=0;M--)V[M].dp+=b;_=!1}if(!(T<.01)){if(b<-.01){for(M=V.length-1;M>=0;M--)V[M].dp-=T;_=!1}if(_){var G=0;for(x=0;xY.pmax&&G++;for(x=V.length-1;x>=0&&!(G<=0);x--)A=V[x],A.pos>Y.pmax-1&&(A.del=!0,G--);for(x=0;x=0;M--)V[M].dp-=T;for(x=V.length-1;x>=0&&!(G<=0);x--)A=V[x],A.pos+A.dp+A.size>Y.pmax&&(A.del=!0,G--)}}}for(;!_&&l<=s;){for(l++,_=!0,x=0;x.01){for(M=E.length-1;M>=0;M--)E[M].dp+=b;for(D.push.apply(D,E),u.splice(x+1,1),k=0,M=D.length-1;M>=0;M--)k+=D[M].dp;for(T=k/D.length,M=D.length-1;M>=0;M--)D[M].dp-=T;_=!1}else x++}u.forEach(L)}for(x=u.length-1;x>=0;x--){var H=u[x];for(M=H.length-1;M>=0;M--){var O=H[M],U=O.datum;U.offset=O.dp,U.del=O.del}}}function _k(e,r){var t=0,a=e.offset;return r&&(a*=-Bee,t=e.offset*Oee),{x:t,y:a}}function Wee(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Tt+Or),a=t+r*(e.txwidth+Or),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Or),{alignShift:r,textShiftX:t,text2ShiftX:a}}function wk(e,r,t,a){var n=function(l){return l*t},i=function(l){return l*a};e.each(function(l){var o=vs.select(this);if(l.del)return o.remove();var s=o.select("text.nums"),u=l.anchor,f=u==="end"?-1:1,c=Wee(l),h=_k(l,r),d=h.x,p=h.y,y=u==="middle";o.select("path").attr("d",y?"M-"+n(l.bx/2+l.tx2width/2)+","+i(p-l.by/2)+"h"+n(l.bx)+"v"+i(l.by)+"h-"+n(l.bx)+"Z":"M0,0L"+n(f*Tt+d)+","+i(Tt+p)+"v"+i(l.by/2-Tt)+"h"+n(f*l.bx)+"v-"+i(l.by)+"H"+n(f*Tt+d)+"V"+i(p-Tt)+"Z");var m=d+c.textShiftX,_=p+l.ty0-l.by/2+Or,b=l.textAlign||"auto";b!=="auto"&&(b==="left"&&u!=="start"?(s.attr("text-anchor","start"),m=y?-l.bx/2-l.tx2width/2+Or:-l.bx-Or):b==="right"&&u!=="end"&&(s.attr("text-anchor","end"),m=y?l.bx/2-l.tx2width/2-Or:l.bx+Or)),s.call(Gn.positionText,n(m),i(_)),l.tx2width&&(o.select("text.name").call(Gn.positionText,n(c.text2ShiftX+c.alignShift*Or+d),i(p+l.ty0-l.by/2+Or)),o.select("rect").call(Ui.setRect,n(c.text2ShiftX+(c.alignShift-1)*l.tx2width/2+d),i(p-l.by/2-1),n(l.tx2width),i(l.by+2)))})}function Xee(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function l(h){return h||hl(h)&&h===0}var o=Array.isArray(t)?function(h,d){var p=Dt.castOption(n,t,h);return l(p)?p:Dt.extractOption({},a,"",d)}:function(h,d){return Dt.extractOption(i,a,h,d)};function s(h,d,p){var y=o(d,p);l(y)&&(e[h]=y)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=Dt.constrain(e.x0,0,e.xa._length),e.x1=Dt.constrain(e.x1,0,e.xa._length),e.y0=Dt.constrain(e.y0,0,e.ya._length),e.y1=Dt.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Vi.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Vi.hoverLabelText(e.ya,e.yLabelVal,a.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=Vi.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Vi.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Vi.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Vi.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function dk(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,l=t.event,o=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||o)){var c=ta.combine(n.plot_bgcolor,n.paper_bgcolor);if(o){var h=r.hLinePoint,d,p;u=h&&h.xa,f=h&&h.ya;var y=f.spikesnap;y==="cursor"?(d=l.pointerX,p=l.pointerY):(d=u._offset+h.x,p=f._offset+h.y);var m=fk.readability(h.color,c)<1.5?ta.contrast(c):h.color,_=f.spikemode,b=f.spikethickness,T=f.spikecolor||m,x=Vi.getPxPosition(e,f),M,A;if(_.indexOf("toaxis")!==-1||_.indexOf("across")!==-1){if(_.indexOf("toaxis")!==-1&&(M=x,A=d),_.indexOf("across")!==-1){var k=f._counterDomainMin,L=f._counterDomainMax;f.anchor==="free"&&(k=Math.min(k,f.position),L=Math.max(L,f.position)),M=i.l+k*i.w,A=i.l+L*i.w}a.insert("line",":first-child").attr({x1:M,x2:A,y1:p,y2:p,"stroke-width":b,stroke:T,"stroke-dasharray":Ui.dashStyle(f.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:M,x2:A,y1:p,y2:p,"stroke-width":b+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}_.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:x+(f.side!=="right"?b:-b),cy:p,r:b,fill:T}).classed("spikeline",!0)}if(s){var D=r.vLinePoint,E,R;u=D&&D.xa,f=D&&D.ya;var z=u.spikesnap;z==="cursor"?(E=l.pointerX,R=l.pointerY):(E=u._offset+D.x,R=f._offset+D.y);var H=fk.readability(D.color,c)<1.5?ta.contrast(c):D.color,O=u.spikemode,U=u.spikethickness,V=u.spikecolor||H,Y=Vi.getPxPosition(e,u),I,G;if(O.indexOf("toaxis")!==-1||O.indexOf("across")!==-1){if(O.indexOf("toaxis")!==-1&&(I=Y,G=R),O.indexOf("across")!==-1){var Z=u._counterDomainMin,K=u._counterDomainMax;u.anchor==="free"&&(Z=Math.min(Z,u.position),K=Math.max(K,u.position)),I=i.t+(1-K)*i.h,G=i.t+(1-Z)*i.h}a.insert("line",":first-child").attr({x1:E,x2:E,y1:I,y2:G,"stroke-width":U,stroke:V,"stroke-dasharray":Ui.dashStyle(u.spikedash,U)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:E,x2:E,y1:I,y2:G,"stroke-width":U+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}O.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:E,cy:Y-(u.side!=="top"?U:-U),r:U,fill:V}).classed("spikeline",!0)}}}function Zee(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function pk(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function mk(e,r){return Gn.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Jee(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],l=0;l{"use strict";var $ee=Pe(),Kee=xr(),Qee=Hi().isUnifiedHover;Ak.exports=function(r,t,a,n){n=n||{};var i=t.legend;function l(o){n.font[o]||(n.font[o]=i?t.legend.font[o]:t.font[o])}t&&Qee(t.hovermode)&&(n.font||(n.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),i?(n.bgcolor||(n.bgcolor=Kee.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),$ee.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var qk=B((Vge,kk)=>{"use strict";var jee=Pe(),ere=Ud(),rre=du();kk.exports=function(r,t){function a(n,i){return jee.coerce(r,t,rre,n,i)}ere(r,t,a)}});var Sk=B((Wge,Lk)=>{"use strict";var Ck=Pe(),tre=bc(),are=Ud();Lk.exports=function(r,t,a,n){function i(o,s){return Ck.coerce(r,t,tre,o,s)}var l=Ck.extendFlat({},n.hoverlabel);t.hovertemplate&&(l.namelength=-1),are(r,t,i,l)}});var t3=B((Xge,Dk)=>{"use strict";var nre=Pe(),ire=du();Dk.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:nre.coerce(r,t,ire,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var Rk=B((Zge,Pk)=>{"use strict";var Ek=Pe(),lre=du(),ore=t3(),sre=Ud();Pk.exports=function(r,t){function a(f,c){return Ek.coerce(r,t,lre,f,c)}var n=ore(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var l=t._has("mapbox"),o=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((l||o||s)&&u===1||(l||o)&&s&&u===2)&&(t.dragmode="pan"),sre(r,t,a),Ek.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var Fk=B((Jge,Nk)=>{"use strict";var a3=Pe(),zk=yr();Nk.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return a3.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var fre=yr(),cre=r3().hover;Ik.exports=function(r,t,a){var n=fre.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&cre(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var gi=B((Kge,Yk)=>{"use strict";var vre=kr(),Vd=Pe(),hre=mi(),Kc=Hi(),Ok=du(),Bk=r3();Yk.exports={moduleType:"component",name:"fx",constants:xc(),schema:{layout:Ok},attributes:bc(),layoutAttributes:Ok,supplyLayoutGlobalDefaults:qk(),supplyDefaults:Sk(),supplyLayoutDefaults:Rk(),calc:Fk(),getDistanceFunction:Kc.getDistanceFunction,getClosest:Kc.getClosest,inbox:Kc.inbox,quadrature:Kc.quadrature,appendArrayPointValue:Kc.appendArrayPointValue,castHoverOption:pre,castHoverinfo:mre,hover:Bk.hover,unhover:hre.unhover,loneHover:Bk.loneHover,loneUnhover:dre,click:Hk()};function dre(e){var r=Vd.isD3Selection(e)?e:vre.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function pre(e,r,t){return Vd.castOption(e,r,"hoverlabel."+t)}function mre(e,r,t){function a(n){return Vd.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return Vd.castOption(e,t,"hoverinfo",a)}});var Ku=B(dl=>{"use strict";dl.selectMode=function(e){return e==="lasso"||e==="select"};dl.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};dl.openMode=function(e){return e==="drawline"||e==="drawopenpath"};dl.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};dl.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};dl.selectingOrDrawing=function(e){return dl.freeMode(e)||dl.rectMode(e)}});var Wd=B((jge,Gk)=>{"use strict";Gk.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var Xd=B((e2e,Uk)=>{"use strict";Uk.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 Jd=B((r2e,Vk)=>{"use strict";var Zd=32;Vk.exports={CIRCLE_SIDES:Zd,i000:0,i090:Zd/4,i180:Zd/2,i270:Zd/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var $d=B((t2e,Xk)=>{"use strict";var yre=Pe().strTranslate;function Wk(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function gre(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function xre(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return Wk(e,t[r])}}function bre(e){return yre(e.xaxis._offset,e.yaxis._offset)}Xk.exports={p2r:Wk,r2p:gre,axValue:xre,getTransform:bre}});var Ql=B(pl=>{"use strict";var _re=Vg(),$k=Jd(),Qu=$k.CIRCLE_SIDES,n3=$k.SQRT2,Kk=$d(),Zk=Kk.p2r,Jk=Kk.r2p,wre=[0,3,4,5,6,1,2],Tre=[0,3,4,1,2];pl.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var tq=Ku(),Mre=tq.drawMode,Are=tq.openMode,ju=Jd(),Qk=ju.i000,jk=ju.i090,eq=ju.i180,rq=ju.i270,kre=ju.cos45,qre=ju.sin45,aq=$d(),Qd=aq.p2r,jl=aq.r2p,Cre=Ul(),Lre=Cre.clearOutline,jd=Ql(),Sre=jd.readPaths,Dre=jd.writePaths,Ere=jd.ellipseOver,Pre=jd.fixDatesForPaths;function Rre(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,l=(a.layout||{}).shapes||[];if(!Mre(i)&&n!==void 0){var o=a._fullLayout._activeShapeIndex;if(o{"use strict";var zre=Ku(),Nre=zre.selectMode,Fre=Ul(),Ire=Fre.clearOutline,i3=Ql(),Hre=i3.readPaths,Ore=i3.writePaths,Bre=i3.fixDatesForPaths;lq.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,l=i._fullLayout.newselection,o=t.plotinfo,s=o.xaxis,u=o.yaxis,f=t.isActiveSelection,c=t.dragmode,h=(i.layout||{}).selections||[];if(!Nre(c)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";oq.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 eo=B(ha=>{"use strict";var ds=jc(),sq=Pe(),r1=$r();ha.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ha.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ha.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ha.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ha.extractPathCoords=function(e,r,t){var a=[],n=e.match(ds.segmentRE);return n.forEach(function(i){var l=r[i.charAt(0)].drawn;if(l!==void 0){var o=i.substr(1).match(ds.paramRE);if(!(!o||o.lengthd&&(y="X"),y});return u>d&&(p=p.replace(/[\s,]*X.*/,""),sq.log("Ignoring extra params in segment "+s)),f+p})}function ev(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var s3=B((s2e,vq)=>{"use strict";var Gre=Pe(),ef=$r(),uq=va(),fq=Br(),Ure=Ql().readPaths,o3=eo(),Vre=o3.getPathString,cq=bh(),Wre=Sa().FROM_TL;vq.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var l={};if(a.type!=="path"){var o=ef.getFromId(r,a.xref),s=ef.getFromId(r,a.yref);for(var u in cq){var f=cq[u](a,o,s);f!==void 0&&(l[u]=f)}}i=Gre.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,l)}else i=a.label.text;var c={"data-index":t},h=a.label.font,d={"data-notex":1},p=n.append("g").attr(c).classed("shape-label",!0),y=p.append("text").attr(d).classed("shape-label-text",!0).text(i),m,_,b,T;if(a.path){var x=Vre(r,a),M=Ure(x,r);m=1/0,b=1/0,_=-1/0,T=-1/0;for(var A=0;A=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function Zre(e,r,t,a,n,i,l){var o=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,c=Math.PI/180*i,h=Math.sin(c),d=Math.cos(c),p=n.label.xanchor,y=n.label.yanchor,m,_,b,T;if(f==="line"){o==="start"?(m=e,_=r):o==="end"?(m=t,_=a):(m=(e+t)/2,_=(r+a)/2),p==="auto"&&(o==="start"?s==="auto"?t>e?p="left":te?p="right":te?p="right":te?p="left":t{"use strict";var Jre=Pe(),$re=Jre.strTranslate,hq=mi(),mq=Ku(),Kre=mq.drawMode,yq=mq.selectMode,gq=yr(),dq=xr(),a1=Jd(),Qre=a1.i000,jre=a1.i090,ete=a1.i180,rte=a1.i270,tte=Ul(),xq=tte.clearOutlineControllers,f3=Ql(),t1=f3.pointsOnRectangle,u3=f3.pointsOnEllipse,ate=f3.writePaths,nte=e1().newShapes,ite=e1().createShapeObj,lte=l3(),ote=s3();bq.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function l(){e(r,t,a,n++),(u3(r[0])||a.hasText)&&o({redrawing:!0})}function o(Y){var I={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,I=nte(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,I=lte(t,a),i._fullLayout._reselect=!0),Object.keys(I).length&&gq.call((Y||{}).redrawing?"relayout":"_guiRelayout",i,I)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,c=Kre(f),h=yq(f);(c||h)&&(i._fullLayout._outlining=!0),xq(i),t.attr("d",ate(r));var d,p,y,m,_;if(!n&&(a.isActiveShape||a.isActiveSelection)){_=ste([],r);var b=u.append("g").attr("class","outline-controllers");E(b),V()}if(c&&a.hasText){var T=u.select(".label-temp"),x=ite(t,a,a.dragmode);ote(i,"label-temp",x,T)}function M(Y){y=+Y.srcElement.getAttribute("data-i"),m=+Y.srcElement.getAttribute("data-j"),d[y][m].moveFn=A}function A(Y,I){if(r.length){var G=_[y][m][1],Z=_[y][m][2],K=r[y],re=K.length;if(t1(K)){var se=Y,ce=I;if(a.isActiveSelection){var le=pq(K,m);le[1]===K[m][1]?ce=0:se=0}for(var Q=0;Q1&&!(Y.length===2&&Y[1][0]==="Z")&&(m===0&&(Y[0][0]="M"),r[y]=Y,l(),o())}}function D(Y,I){if(Y===2){y=+I.srcElement.getAttribute("data-i"),m=+I.srcElement.getAttribute("data-j");var G=r[y];!t1(G)&&!u3(G)&&L()}}function E(Y){d=[];for(var I=0;I{"use strict";var fte=kr(),kq=yr(),_q=Pe(),rf=$r(),cte=Ql().readPaths,vte=n1(),l1=s3(),qq=Ul().clearOutlineControllers,c3=xr(),h3=Br(),hte=ot().arrayEditor,wq=mi(),Tq=Kl(),ps=jc(),fn=eo(),v3=fn.getPathString;Sq.exports={draw:d3,drawOne:Cq,eraseActiveShape:mte,drawLabel:l1};function d3(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;nl&&Be>o&&!ze.shiftKey?wq.getCursor(Fe/He,1-Ee/Be):"move";Tq(r,Je),ge=Je.split("-")[0]}}function be(ze){i1(e)||(s&&(_=K(t.xanchor)),u&&(b=re(t.yanchor)),t.type==="path"?R=t.path:(d=s?t.x0:K(t.x0),p=u?t.y0:re(t.y0),y=s?t.x1:K(t.x1),m=u?t.y1:re(t.y1)),dm?(T=p,k="y0",x=m,L="y1"):(T=m,k="y1",x=p,L="y0"),ve(ze),_e(n,t),Ie(r,t,e),Q.moveFn=ge==="move"?X:ye,Q.altKey=ze.altKey)}function W(){i1(e)||(Tq(r),xe(n),Lq(r,e,t),kq.call("_guiRelayout",e,i.getUpdateObj()))}function te(){i1(e)||xe(n)}function X(ze,Re){if(t.type==="path"){var He=function(Ee){return Ee},Be=He,Fe=He;s?h("xanchor",t.xanchor=se(_+ze)):(Be=function(Je){return se(K(Je)+ze)},H&&H.type==="date"&&(Be=fn.encodeDate(Be))),u?h("yanchor",t.yanchor=ce(b+Re)):(Fe=function(Je){return ce(re(Je)+Re)},U&&U.type==="date"&&(Fe=fn.encodeDate(Fe))),h("path",t.path=Mq(R,Be,Fe))}else s?h("xanchor",t.xanchor=se(_+ze)):(h("x0",t.x0=se(d+ze)),h("x1",t.x1=se(y+ze))),u?h("yanchor",t.yanchor=ce(b+Re)):(h("y0",t.y0=ce(p+Re)),h("y1",t.y1=ce(m+Re)));r.attr("d",v3(e,t)),_e(n,t),l1(e,a,t,z)}function ye(ze,Re){if(c){var He=function(Oe){return Oe},Be=He,Fe=He;s?h("xanchor",t.xanchor=se(_+ze)):(Be=function($e){return se(K($e)+ze)},H&&H.type==="date"&&(Be=fn.encodeDate(Be))),u?h("yanchor",t.yanchor=ce(b+Re)):(Fe=function($e){return ce(re($e)+Re)},U&&U.type==="date"&&(Fe=fn.encodeDate(Fe))),h("path",t.path=Mq(R,Be,Fe))}else if(f){if(ge==="resize-over-start-point"){var Ee=d+ze,Je=u?p-Re:p+Re;h("x0",t.x0=s?Ee:se(Ee)),h("y0",t.y0=u?Je:ce(Je))}else if(ge==="resize-over-end-point"){var We=y+ze,ie=u?m-Re:m+Re;h("x1",t.x1=s?We:se(We)),h("y1",t.y1=u?ie:ce(ie))}}else{var Ae=function(Oe){return ge.indexOf(Oe)!==-1},Ce=Ae("n"),cr=Ae("s"),tr=Ae("w"),De=Ae("e"),Le=Ce?T+Re:T,Ye=cr?x+Re:x,Xe=tr?M+ze:M,Ge=De?A+ze:A;u&&(Ce&&(Le=T-Re),cr&&(Ye=x-Re)),(!u&&Ye-Le>o||u&&Le-Ye>o)&&(h(k,t[k]=u?Le:ce(Le)),h(L,t[L]=u?Ye:ce(Ye))),Ge-Xe>l&&(h(D,t[D]=s?Xe:se(Xe)),h(E,t[E]=s?Ge:se(Ge)))}r.attr("d",v3(e,t)),_e(n,t),l1(e,a,t,z)}function _e(ze,Re){(s||u)&&He();function He(){var Be=Re.type!=="path",Fe=ze.selectAll(".visual-cue").data([0]),Ee=1;Fe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ee}).classed("visual-cue",!0);var Je=K(s?Re.xanchor:_q.midRange(Be?[Re.x0,Re.x1]:fn.extractPathCoords(Re.path,ps.paramIsX))),We=re(u?Re.yanchor:_q.midRange(Be?[Re.y0,Re.y1]:fn.extractPathCoords(Re.path,ps.paramIsY)));if(Je=fn.roundPositionForSharpStrokeRendering(Je,Ee),We=fn.roundPositionForSharpStrokeRendering(We,Ee),s&&u){var ie="M"+(Je-1-Ee)+","+(We-1-Ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Fe.attr("d",ie)}else if(s){var Ae="M"+(Je-1-Ee)+","+(We-9-Ee)+"v18 h2 v-18 Z";Fe.attr("d",Ae)}else{var Ce="M"+(Je-9-Ee)+","+(We-1-Ee)+"h18 v2 h-18 Z";Fe.attr("d",Ce)}}}function xe(ze){ze.selectAll(".visual-cue").remove()}function Ie(ze,Re,He){var Be=Re.xref,Fe=Re.yref,Ee=rf.getFromId(He,Be),Je=rf.getFromId(He,Fe),We="";Be!=="paper"&&!Ee.autorange&&(We+=Be),Fe!=="paper"&&!Je.autorange&&(We+=Fe),h3.setClipUrl(ze,We?"clip"+He._fullLayout._uid+We:null,He)}}function Mq(e,r,t){return e.replace(ps.segmentRE,function(a){var n=0,i=a.charAt(0),l=ps.paramIsX[i],o=ps.paramIsY[i],s=ps.numParams[i],u=a.substr(1).replace(ps.paramRE,function(f){return n>=s||(l[n]?f=r(f):o[n]&&(f=t(f)),n++),f});return i+u})}function pte(e,r){if(o1(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){Aq(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=Aq,d3(e)}}}function Aq(e){if(o1(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(qq(e),delete e._fullLayout._activeShapeIndex,d3(e))}}function mte(e){if(o1(e)){qq(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Un=yr(),Dq=St(),Eq=Jt(),Yr=Xd(),yte=s1().eraseActiveShape,u1=Pe(),Ir=u1._,Gr=Hq.exports={};Gr.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Ir(e,"Download plot as a png"):Ir(e,"Download plot")},icon:Yr.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};u1.notifier(Ir(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),Un.call("downloadImage",e,t).then(function(a){u1.notifier(Ir(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){u1.notifier(Ir(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Gr.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Ir(e,"Edit in Chart Studio")},icon:Yr.disk,click:function(e){Dq.sendDataToCloud(e)}};Gr.editInChartStudio={name:"editInChartStudio",title:function(e){return Ir(e,"Edit in Chart Studio")},icon:Yr.pencil,click:function(e){Dq.sendDataToCloud(e)}};Gr.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ir(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Yr.zoombox,click:Ga};Gr.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ir(e,"Pan")},attr:"dragmode",val:"pan",icon:Yr.pan,click:Ga};Gr.select2d={name:"select2d",_cat:"select",title:function(e){return Ir(e,"Box Select")},attr:"dragmode",val:"select",icon:Yr.selectbox,click:Ga};Gr.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ir(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Yr.lasso,click:Ga};Gr.drawclosedpath={name:"drawclosedpath",title:function(e){return Ir(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Yr.drawclosedpath,click:Ga};Gr.drawopenpath={name:"drawopenpath",title:function(e){return Ir(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Yr.drawopenpath,click:Ga};Gr.drawline={name:"drawline",title:function(e){return Ir(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Yr.drawline,click:Ga};Gr.drawrect={name:"drawrect",title:function(e){return Ir(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Yr.drawrect,click:Ga};Gr.drawcircle={name:"drawcircle",title:function(e){return Ir(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Yr.drawcircle,click:Ga};Gr.eraseshape={name:"eraseshape",title:function(e){return Ir(e,"Erase active shape")},icon:Yr.eraseshape,click:yte};Gr.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ir(e,"Zoom in")},attr:"zoom",val:"in",icon:Yr.zoom_plus,click:Ga};Gr.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ir(e,"Zoom out")},attr:"zoom",val:"out",icon:Yr.zoom_minus,click:Ga};Gr.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ir(e,"Autoscale")},attr:"zoom",val:"auto",icon:Yr.autoscale,click:Ga};Gr.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ir(e,"Reset axes")},attr:"zoom",val:"reset",icon:Yr.home,click:Ga};Gr.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ir(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Yr.tooltip_basic,gravity:"ne",click:Ga};Gr.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ir(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Yr.tooltip_compare,gravity:"ne",click:Ga};function Ga(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,l={},o=Eq.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var c=n==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var Oq=y3(),bte=Object.keys(Oq),Bq=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Yq=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Bq),af=[],_te=function(e){if(Yq.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();af.indexOf(r)===-1&&af.push(r),af.indexOf(t)===-1&&af.push(t)}};bte.forEach(function(e){_te(Oq[e])});af.sort();Gq.exports={DRAW_MODES:Bq,backButtons:Yq,foreButtons:af}});var x3=B((d2e,Uq)=>{"use strict";var h2e=g3();Uq.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 Wq=B((p2e,Vq)=>{"use strict";var wte=Pe(),rv=xr(),Tte=ot(),Mte=x3();Vq.exports=function(r,t){var a=r.modebar||{},n=Tte.newContainer(t,"modebar");function i(o,s){return wte.coerce(a,n,Mte,o,s)}i("orientation"),i("bgcolor",rv.addOpacity(t.paper_bgcolor,.5));var l=rv.contrast(rv.rgb(t.modebar.bgcolor));i("color",rv.addOpacity(l,.3)),i("activecolor",rv.addOpacity(l,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var $q=B((m2e,Jq)=>{"use strict";var b3=kr(),Ate=zr(),c1=Pe(),Xq=Xd(),kte=Q0().version,qte=new DOMParser;function Zq(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Wi=Zq.prototype;Wi.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,l="#"+n+" .modebar-group";document.querySelectorAll(l).forEach(function(c){c.style.backgroundColor=i.bgcolor}),c1.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var o=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(o||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};Wi.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var l=r.createButton(n);r.buttonElements.push(l),a.appendChild(l)}),r.element.appendChild(a)})};Wi.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};Wi.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(o){e.click(r.graphInfo,o),r.updateActiveButton(o.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&b3.select(t).classed("active",!0);var l=e.icon;return typeof l=="function"?t.appendChild(l()):t.appendChild(this.createIcon(l||Xq.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};Wi.createIcon=function(e){var r=Ate(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=qte.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Wi.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),l=a.getAttribute("data-toggle")==="true",o=b3.select(a),s=function(c,h){var d=r.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(l){if(i===t){var u=!o.classed("active");o.classed("active",u),s(a,u)}}else{var f=i===null?i:c1.nestedProperty(r,i).get();o.classed("active",f===n),s(a,f===n)}})};Wi.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var Ste=Jt(),Kq=_n(),_3=yr(),Dte=Hi().isUnifiedHover,Ete=$q(),v1=y3(),Pte=g3().DRAW_MODES,Rte=Pe().extendDeep;Qq.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,l;Array.isArray(i)&&i.length?l=Ote(i):!a.displayModeBar&&a.watermark?l=[]:l=zte(r),n?n.update(r,l):t._modeBar=Ete(r,l)};function zte(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(I,G){if(typeof G=="string"){if(G.toLowerCase()===I.toLowerCase())return!0}else{var Z=G.name,K=G._cat||G.name;if(Z===I||K===I.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var l=r.modebar.remove;typeof l=="string"&&(l=[l]);var o=a.modeBarButtonsToAdd.concat(i.filter(function(I){for(var G=0;G1?(E=["toggleHover"],R=["resetViews"]):c?(D=["zoomInGeo","zoomOutGeo"],E=["hoverClosestGeo"],R=["resetGeo"]):f?(E=["hoverClosest3d"],R=["resetCameraDefault3d","resetCameraLastSave3d"]):y?(D=["zoomInMapbox","zoomOutMapbox"],E=["toggleHover"],R=["resetViewMapbox"]):m?(D=["zoomInMap","zoomOutMap"],E=["toggleHover"],R=["resetViewMap"]):h?E=["hoverClosestPie"]:T?(E=["hoverClosestCartesian","hoverCompareCartesian"],R=["resetViewSankey"]):E=["toggleHover"],u&&E.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Ite(t)||M)&&(E=[]),u&&!x&&(D=["zoomIn2d","zoomOut2d","autoScale2d"],R[0]!=="resetViews"&&(R=["resetScale2d"])),f?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!x||p?z=["zoom2d","pan2d"]:y||m||c?z=["pan2d"]:_&&(z=["zoom2d"]),Fte(t)&&z.push("select2d","lasso2d");var H=[],O=function(I){H.indexOf(I)===-1&&E.indexOf(I)!==-1&&H.push(I)};if(Array.isArray(o)){for(var U=[],V=0;V{"use strict";eC.exports={moduleType:"component",name:"modebar",layoutAttributes:x3(),supplyLayoutDefaults:Wq(),manage:jq()}});var T3=B((x2e,rC)=>{"use strict";var Bte=Sa().FROM_BL;rC.exports=function(r,t,a){a===void 0&&(a=Bte[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var ys=B(tv=>{"use strict";var ms=Pe(),M3=Bc(),xi=Jt().id2name,Yte=bn(),tC=T3(),Gte=md(),Ute=wt().ALMOST_EQUAL,Vte=Sa().FROM_BL;tv.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],l=r._axisMatchGroups=[],o,s,u,f,c,h,d,p;for(o=0;oi?t.substr(i):a.substr(n))+l}function Xte(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),l=0;lUte*p&&!b)){for(i=0;iz&&ZE&&(E=Z);var re=(E-D)/(2*R);c/=re,D=s.l2r(D),E=s.l2r(E),s.range=s._input.range=A{"use strict";var d1=kr(),Ua=yr(),An=St(),Vn=Pe(),q3=va(),C3=Wd(),av=xr(),nf=Br(),lC=Hc(),cC=w3(),nv=$r(),ml=Sa(),vC=ys(),Zte=vC.enforce,Jte=vC.clean,oC=Bc().doAutoRange,hC="start",$te="middle",dC="end",Kte=wa().zindexSeparator;aa.layoutStyles=function(e){return Vn.syncOrAsync([An.doAutoMargin,jte],e)};function Qte(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function jte(e){var r=e._fullLayout,t=r._size,a=t.p,n=nv.list(e,"",!0),i,l,o,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(nf.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),aa.drawMainTitle(e),cC.manage(e),!r._has("cartesian"))return An.previousPromises(e);function c(be,W,te){var X=be._lw/2;if(be._id.charAt(0)==="x"){if(W){if(te==="top")return W._offset-a-X}else return t.t+t.h*(1-(be.position||0))+X%1;return W._offset+W._length+a+X}if(W){if(te==="right")return W._offset+W._length+a+X}else return t.l+t.w*(be.position||0)+X%1;return W._offset-a-X}for(i=0;i0){aae(e,i,u,s),o.attr({x:l,y:i,"text-anchor":a,dy:fC(r.yanchor)}).call(q3.positionText,l,i);var f=(r.text.match(q3.BR_TAG_ALL)||[]).length;if(f){var c=ml.LINE_SPACING*f+ml.MID_SHIFT;r.y===0&&(c=-c),o.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",m)})}var h=d1.selectAll(".gtitle-subtitle");if(h.node()){var d=o.node().getBBox(),p=d.y+d.height,y=p+lC.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:l,y,"text-anchor":a,dy:fC(r.yanchor)}).call(q3.positionText,l,y)}}}};function eae(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,l=Vn.isTopAnchor(r)?a:a-n,o=t==="b"?i-l:l;return Vn.isTopAnchor(r)&&t==="t"||Vn.isBottomAnchor(r)&&t==="b"?!1:o.5?"t":"b",l=e._fullLayout.margin[i],o=0;return r.yref==="paper"?o=t+r.pad.t+r.pad.b:r.yref==="container"&&(o=rae(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),o>l?o:0}function aae(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,l=i.y>.5?"t":"b",o={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&eae(e,i,l,r,a)?o[l]=t:i.yref==="container"&&(s[l]=t,e._fullLayout._reservedMargin[n]=s),An.allowAutoMargin(e,n),An.autoMargin(e,n,o)}function nae(e,r){var t=e.title,a=e._size,n=0;switch(r===hC?n=t.pad.l:r===dC&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function iae(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===ml.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function fC(e){return e==="top"?ml.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ml.MID_SHIFT+"em"}function lae(e){var r=e.title,t=$te;return Vn.isRightAnchor(r)?t=dC:Vn.isLeftAnchor(r)&&(t=hC),t}function oae(e){var r=e.title,t="0em";return Vn.isTopAnchor(r)?t=ml.CAP_SHIFT+"em":Vn.isMiddleAnchor(r)&&(t=ml.MID_SHIFT+"em"),t}aa.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var sae=Ql().readPaths,uae=n1(),pC=Ul().clearOutlineControllers,L3=xr(),mC=Br(),fae=ot().arrayEditor,yC=eo(),cae=yC.getPathString;xC.exports={draw:m1,drawOne:gC,activateLastSelection:dae};function m1(e){var r=e._fullLayout;pC(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;m--){var _=l.append("path").attr(s).style("opacity",m?.1:u).call(L3.stroke,c).call(L3.fill,f).call(mC.dashLine,m?"solid":d,m?4+h:h);if(vae(_,e,a),p){var b=fae(e.layout,"selections",a);_.style({cursor:"move"});var T={element:_.node(),plotinfo:n,gd:e,editHelpers:b,isActiveSelection:!0},x=sae(o,e);uae(x,_,T)}else _.style("pointer-events",m?"all":"none");y[m]=_}var M=y[0],A=y[1];A.node().addEventListener("click",function(){return hae(e,M)})}}function vae(e,r,t){var a=t.xref+t.yref;mC.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function hae(e,r){if(y1(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){S3(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=S3,m1(e)}}}function dae(e){if(y1(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=S3,m1(e)}}function S3(e){if(y1(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(pC(e),delete e._fullLayout._activeSelectionIndex,m1(e))}}});var _C=B((T2e,bC)=>{function pae(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,l){return a("temp_status",{seg:n,above:i,below:l})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,l){return a("status",{seg:n,above:i,below:l})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}bC.exports=pae});var TC=B((M2e,wC)=>{function mae(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],l=a[1],o=n[0],s=n[1],u=t[0],f=t[1];return(o-i)*(f-l)-(s-l)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],l=n[0]-a[0],o=t[0]-a[0],s=n[1]-a[1],u=o*l+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=o-i>e&&(l-f)*(i-c)/(o-c)+f-n>e&&(s=!s),l=f,o=c}return s}};return r}wC.exports=mae});var AC=B((A2e,MC)=>{var yae={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};MC.exports=yae});var qC=B((k2e,kC)=>{var iv=AC();function gae(e,r,t){function a(p,y){return{id:t?t.segmentId():-1,start:p,end:y,myFill:{above:null,below:null},otherFill:null}}function n(p,y,m){return{id:t?t.segmentId():-1,start:p,end:y,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var i=iv.create();function l(p,y,m,_,b,T){var x=r.pointsCompare(y,b);return x!==0?x:r.pointsSame(m,T)?0:p!==_?p?1:-1:r.pointAboveOrOnLine(m,_?b:T,_?T:b)?1:-1}function o(p,y){i.insertBefore(p,function(m){var _=l(p.isStart,p.pt,y,m.isStart,m.pt,m.other.pt);return _<0})}function s(p,y){var m=iv.node({isStart:!0,pt:p.start,seg:p,primary:y,other:null,status:null});return o(m,p.end),m}function u(p,y,m){var _=iv.node({isStart:!1,pt:y.end,seg:y,primary:m,other:p,status:null});p.other=_,o(_,p.pt)}function f(p,y){var m=s(p,y);return u(m,p,y),m}function c(p,y){t&&t.segmentChop(p.seg,y),p.other.remove(),p.seg.end=y,p.other.pt=y,o(p.other,p.pt)}function h(p,y){var m=n(y,p.seg.end,p.seg);return c(p,y),f(m,p.primary)}function d(p,y){var m=iv.create();function _(U,V){var Y=U.seg.start,I=U.seg.end,G=V.seg.start,Z=V.seg.end;return r.pointsCollinear(Y,G,Z)?r.pointsCollinear(I,G,Z)||r.pointAboveOrOnLine(I,G,Z)?1:-1:r.pointAboveOrOnLine(Y,G,Z)?1:-1}function b(U){return m.findTransition(function(V){var Y=_(U,V.ev);return Y>0})}function T(U,V){var Y=U.seg,I=V.seg,G=Y.start,Z=Y.end,K=I.start,re=I.end;t&&t.checkIntersection(Y,I);var se=r.linesIntersect(G,Z,K,re);if(se===!1){if(!r.pointsCollinear(G,Z,K)||r.pointsSame(G,re)||r.pointsSame(Z,K))return!1;var ce=r.pointsSame(G,K),le=r.pointsSame(Z,re);if(ce&&le)return V;var Q=!ce&&r.pointBetween(G,K,re),ge=!le&&r.pointBetween(Z,K,re);if(ce)return ge?h(V,Z):h(U,re),V;Q&&(le||(ge?h(V,Z):h(U,re)),h(V,G))}else se.alongA===0&&(se.alongB===-1?h(U,K):se.alongB===0?h(U,se.pt):se.alongB===1&&h(U,re)),se.alongB===0&&(se.alongA===-1?h(V,G):se.alongA===0?h(V,se.pt):se.alongA===1&&h(V,Z));return!1}for(var x=[];!i.isEmpty();){var M=i.getHead();if(t&&t.vert(M.pt[0]),M.isStart){let U=function(){if(k){var V=T(M,k);if(V)return V}return L?T(M,L):!1};var O=U;t&&t.segmentNew(M.seg,M.primary);var A=b(M),k=A.before?A.before.ev:null,L=A.after?A.after.ev:null;t&&t.tempStatus(M.seg,k?k.seg:!1,L?L.seg:!1);var D=U();if(D){if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,E&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=M.seg.myFill;t&&t.segmentUpdate(D.seg),M.other.remove(),M.remove()}if(i.getHead()!==M){t&&t.rewind(M.seg);continue}if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,L?M.seg.myFill.below=L.seg.myFill.above:M.seg.myFill.below=p,E?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var R;L?M.primary===L.primary?R=L.seg.otherFill.above:R=L.seg.myFill.above:R=M.primary?y:p,M.seg.otherFill={above:R,below:R}}t&&t.status(M.seg,k?k.seg:!1,L?L.seg:!1),M.other.status=A.insert(iv.node({ev:M}))}else{var z=M.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(z.prev)&&m.exists(z.next)&&T(z.prev.ev,z.next.ev),t&&t.statusRemove(z.ev.seg),z.remove(),!M.primary){var H=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=H}x.push(M.seg)}i.getHead().remove()}return t&&t.done(),x}return e?{addRegion:function(p){for(var y,m=p[p.length-1],_=0;_{function xae(e,r,t){var a=[],n=[];return e.forEach(function(i){var l=i.start,o=i.end;if(r.pointsSame(l,o)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function c(O,U,V){return f.index=O,f.matches_head=U,f.matches_pt1=V,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function lv(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var bae={union:function(e,r){return lv(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return lv(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return lv(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return lv(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return lv(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};SC.exports=bae});var PC=B((L2e,EC)=>{var _ae={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function l(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var o=l(i[0]),s=1;s{var wae=_C(),Tae=TC(),RC=qC(),Mae=LC(),ov=DC(),zC=PC(),Wn=!1,sv=Tae(),cn;cn={buildLog:function(e){return e===!0?Wn=wae():e===!1&&(Wn=!1),Wn===!1?!1:Wn.list},epsilon:function(e){return sv.epsilon(e)},segments:function(e){var r=RC(!0,sv,Wn);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=RC(!1,sv,Wn);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:ov.union(e.combined,Wn),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:ov.intersect(e.combined,Wn),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:ov.difference(e.combined,Wn),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:ov.differenceRev(e.combined,Wn),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:ov.xor(e.combined,Wn),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Mae(e.segments,sv,Wn),inverted:e.inverted}},polygonFromGeoJSON:function(e){return zC.toPolygon(cn,e)},polygonToGeoJSON:function(e){return zC.fromPolygon(cn,sv,e)},union:function(e,r){return uv(e,r,cn.selectUnion)},intersect:function(e,r){return uv(e,r,cn.selectIntersect)},difference:function(e,r){return uv(e,r,cn.selectDifference)},differenceRev:function(e,r){return uv(e,r,cn.selectDifferenceRev)},xor:function(e,r){return uv(e,r,cn.selectXor)}};function uv(e,r,t){var a=cn.segments(e),n=cn.segments(r),i=cn.combine(a,n),l=t(i);return cn.polygon(l)}typeof window=="object"&&(window.PolyBool=cn);NC.exports=cn});var HC=B((D2e,IC)=>{IC.exports=function(r,t,a,n){var i=r[0],l=r[1],o=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;ul!=p>l&&i<(d-c)*(l-h)/(p-h)+c;y&&(o=!o)}return o}});var P3=B((E2e,OC)=>{"use strict";var E3=mh().dot,g1=wt().BADNUM,x1=OC.exports={};x1.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],l=i,o;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),o=1;on||_===g1||_l||y&&u(p))}function c(p,y){var m=p[0],_=p[1];if(m===g1||mn||_===g1||_l)return!1;var b=t.length,T=t[0][0],x=t[0][1],M=0,A,k,L,D,E;for(A=1;AMath.max(k,T)||_>Math.max(L,x)))if(_o||Math.abs(E3(c,u))>n)return!0;return!1};x1.filter=function(r,t){var a=[r[0]],n=0,i=0;function l(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var c=f+1;c1){var o=r.pop();l(o)}return{addPt:l,raw:r,filtered:a}}});var YC=B((P2e,BC)=>{"use strict";BC.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var fL=B((R2e,uL)=>{"use strict";var GC=FC(),Aae=HC(),vv=yr(),kae=Br().dashStyle,fv=xr(),qae=gi(),Cae=Hi().makeEventData,yv=Ku(),Lae=yv.freeMode,Sae=yv.rectMode,hv=yv.drawMode,F3=yv.openMode,I3=yv.selectMode,UC=eo(),VC=jc(),$C=n1(),KC=Ul().clearOutline,QC=Ql(),R3=QC.handleEllipse,Dae=QC.readPaths,Eae=e1().newShapes,Pae=l3(),Rae=D3().activateLastSelection,_1=Pe(),zae=_1.sorterAsc,jC=P3(),cv=Lh(),Xn=Jt().getFromId,Nae=Wd(),Fae=p1().redrawReglTraces,w1=YC(),Xi=w1.MINSELECT,Iae=jC.filter,H3=jC.tester,O3=$d(),WC=O3.p2r,Hae=O3.axValue,Oae=O3.getTransform;function B3(e){return e.subplot!==void 0}function Bae(e,r,t,a,n){var i=!B3(a),l=Lae(n),o=Sae(n),s=F3(n),u=hv(n),f=I3(n),c=n==="drawline",h=n==="drawcircle",d=c||h,p=a.gd,y=p._fullLayout,m=f&&y.newselection.mode==="immediate"&&i,_=y._zoomlayer,b=a.element.getBoundingClientRect(),T=a.plotinfo,x=Oae(T),M=r-b.left,A=t-b.top;y._calcInverseTransform(p);var k=_1.apply3DTransform(y._invTransform)(M,A);M=k[0],A=k[1];var L=y._invScaleX,D=y._invScaleY,E=M,R=A,z="M"+M+","+A,H=a.xaxes[0],O=a.yaxes[0],U=H._length,V=O._length,Y=e.altKey&&!(hv(n)&&s),I,G,Z,K,re,se,ce;rL(e,p,a),l&&(I=Iae([[M,A]],w1.BENDPX));var le=_.selectAll("path.select-outline-"+T.id).data([1]),Q=u?y.newshape:y.newselection;u&&(a.hasText=Q.label.text||Q.label.texttemplate);var ge=u&&!s?Q.fillcolor:"rgba(0,0,0,0)",ue=Q.line.color||(i?fv.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");le.enter().append("path").attr("class","select-outline select-outline-"+T.id).style({opacity:u?Q.opacity/2:1,"stroke-dasharray":kae(Q.line.dash,Q.line.width),"stroke-width":Q.line.width+"px","shape-rendering":"crispEdges"}).call(fv.stroke,ue).call(fv.fill,ge).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",x).attr("d",z+"Z");var ke=_.append("path").attr("class","zoombox-corners").style({fill:fv.background,stroke:fv.defaultLine,"stroke-width":1}).attr("transform",x).attr("d","M0,0Z");if(u&&a.hasText){var ve=_.select(".label-temp");ve.empty()&&(ve=_.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var be=y._uid+w1.SELECTID,W=[],te=T1(p,a.xaxes,a.yaxes,a.subplot);m&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var ye=H._id,_e=O._id;lL(p,ye,_e,te);for(var xe=(p.layout||{}).selections||[],Ie=[],ze=!1,Re=0;Re=0){p._fullLayout._deactivateShape(p);return}if(!u){var xe=y.clickmode;cv.done(be).then(function(){if(cv.clear(be),ye===2){for(le.remove(),re=0;re-1&&eL(_e,p,a.xaxes,a.yaxes,a.subplot,a,le),xe==="event"&&mv(p,void 0);qae.click(p,_e,T.id)}).catch(_1.error)}},a.doneFn=function(){ke.remove(),cv.done(be).then(function(){cv.clear(be),!m&&K&&a.selectionDefs&&(K.subtract=Y,a.selectionDefs.push(K),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,Z)),(m||u)&&dv(a,m),a.doneFnCompleted&&a.doneFnCompleted(W),f&&mv(p,ce)}).catch(_1.error)}}function eL(e,r,t,a,n,i,l){var o=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,c=[],h,d,p,y,m,_,b,T,x,M;if(Wae(o)){rL(e,r,i),h=T1(r,t,a,n);var A=Xae(o,h),k=A.pointNumbers.length>0;if(k?Zae(h,A):Jae(h)&&(b=ZC(A))){for(l&&l.remove(),M=0;M=0}function Vae(e){return e._fullLayout._activeSelectionIndex>=0}function dv(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;Uae(n)&&n._fullLayout._deactivateShape(n),Vae(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,l=i._zoomlayer,o=hv(t),s=I3(t);if(o||s){var u=l.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;o&&(f=Eae(u,e)),f&&vv.call("_guiRelayout",n,{shapes:f});var c;s&&!B3(e)&&(c=Pae(u,e)),c&&(n._fullLayout._noEmitSelectedAtStart=!0,vv.call("_guiRelayout",n,{selections:c}).then(function(){r&&Rae(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function XC(e){return e._id}function T1(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(XC),l=t.map(XC),o,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Zae(e,r){var t=[],a,n,i,l;for(l=0;l0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(l=0;l1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function pv(e,r,t){var a;for(a=0;a-1&&r;if(!l&&r){var ye=JC(e,!0);if(ye.length){var _e=ye[0].xref,xe=ye[0].yref;if(_e&&xe){var Ie=oL(ye),ze=sL([Xn(e,_e,"x"),Xn(e,xe,"y")]);ze(W,Ie)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:X&&mv(e,W),h._reselect=!1}if(!l&&h._deselect){var Re=h._deselect;o=Re.xref,s=Re.yref,Qae(o,s,f)||lL(e,o,s,a),X&&(W.points.length?mv(e,W):U3(e)),h._deselect=!1}return{eventData:W,selectionTesters:t}}function Kae(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";cL.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 gv=B((N2e,vL)=>{"use strict";vL.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var lf=B((I2e,pL)=>{"use strict";var hL=V3(),dL=jt(),M1=wa(),ane=ot().templatedArray,F2e=gv();pL.exports=ane("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:dL({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:hL.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:hL.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",M1.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",M1.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",M1.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",M1.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:dL({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var A1=B((H2e,mL)=>{"use strict";mL.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var W3=B((O2e,yL)=>{"use strict";yL.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var bi=B((B2e,TL)=>{"use strict";var gL=di().axisHoverFormat,nne=_a().texttemplateAttrs,ine=_a().hovertemplateAttrs,xL=Nc(),lne=jt(),one=fi().dash,sne=fi().pattern,une=Br(),fne=A1(),k1=mt().extendFlat,cne=W3();function bL(e){return{valType:"any",dflt:0,editType:"calc"}}function _L(e){return{valType:"any",editType:"calc"}}function wL(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}TL.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:bL("x"),yperiod:bL("y"),xperiod0:_L("x0"),yperiod0:_L("y0"),xperiodalignment:wL("x"),yperiodalignment:wL("y"),xhoverformat:gL("x"),yhoverformat:gL("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:nne({},{}),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:ine({},{keys:fne.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:k1({},one,{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:cne(!0),fillgradient:k1({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:sne,marker:k1({symbol:{valType:"enumerated",values:une.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:k1({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},xL("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"},xL("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:lne({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var X3=B((G2e,kL)=>{"use strict";var ML=lf(),AL=bi().line,vne=fi().dash,q1=mt().extendFlat,hne=ui().overrideAll,dne=ot().templatedArray,Y2e=gv();kL.exports=hne(dne("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:q1({},ML.xref,{}),yref:q1({},ML.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:AL.color,width:q1({},AL.width,{min:1,dflt:1}),dash:q1({},vne,{dflt:"dot"})}}),"arraydraw","from-root")});var SL=B((U2e,LL)=>{"use strict";var qL=Pe(),C1=$r(),pne=On(),mne=X3(),CL=eo();LL.exports=function(r,t){pne(r,t,{name:"selections",handleItemDefaults:yne});for(var a=t.selections,n=0;n{"use strict";DL.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var xv=B((W2e,zL)=>{"use strict";var gne=yr(),PL=Pe(),RL=Jt();zL.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var l=gne.subplotsRegistry.cartesian,o=l.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,c=s.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var NL=D3(),bv=fL();FL.exports={moduleType:"component",name:"selections",layoutAttributes:X3(),supplyLayoutDefaults:SL(),supplyDrawNewSelectionDefaults:EL(),includeBasePlot:xv()("selections"),draw:NL.draw,drawOne:NL.drawOne,reselect:bv.reselect,prepSelect:bv.prepSelect,clearOutline:bv.clearOutline,clearSelectionsCache:bv.clearSelectionsCache,selectOnClick:bv.selectOnClick}});var nS=B((Z2e,aS)=>{"use strict";var Q3=kr(),Zn=Pe(),IL=Zn.numberFormat,xne=Rn(),bne=S2(),L1=yr(),XL=Zn.strTranslate,_ne=va(),HL=xr(),to=Br(),wne=gi(),OL=$r(),Tne=Kl(),Mne=mi(),ZL=Ku(),S1=ZL.selectingOrDrawing,Ane=ZL.freeMode,kne=Sa().FROM_TL,qne=Wd(),Cne=p1().redrawReglTraces,Lne=St(),J3=Jt().getFromId,Sne=of().prepSelect,Dne=of().clearOutline,Ene=of().selectOnClick,Z3=T3(),j3=wa(),BL=j3.MINDRAG,Qa=j3.MINZOOM,YL=!0;function Pne(e,r,t,a,n,i,l,o){var s=e._fullLayout._zoomlayer,u=l+o==="nsew",f=(l+o).length===1,c,h,d,p,y,m,_,b,T,x,M,A,k,L,D,E,R,z,H,O,U,V,Y;t+=r.yaxis._shift;function I(){if(c=r.xaxis,h=r.yaxis,T=c._length,x=h._length,_=c._offset,b=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,l&&o)for(var De=r.overlays,Le=0;Le=0){Ye._fullLayout._deactivateShape(Ye);return}var Xe=Ye._fullLayout.clickmode;if(K3(Ye),De===2&&!f&&We(),u)Xe.indexOf("select")>-1&&Ene(Le,Ye,y,m,r.id,K),Xe.indexOf("event")>-1&&wne.click(Ye,Le,r.id);else if(De===1&&f){var Ge=l?h:c,Oe=l==="s"||o==="w"?0:1,$e=Ge._name+".range["+Oe+"]",fr=Rne(Ge,Oe),lr="left",Ne="middle";if(Ge.fixedrange)return;l?(Ne=l==="n"?"top":"bottom",Ge.side==="right"&&(lr="right")):o==="e"&&(lr="right"),Ye._context.showAxisRangeEntryBoxes&&Q3.select(Z).call(_ne.makeEditable,{gd:Ye,immediate:!0,background:Ye._fullLayout.paper_bgcolor,text:String(fr),fill:Ge.tickfont?Ge.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:Ne}).on("edit",function(ne){var fe=Ge.d2r(ne);fe!==void 0&&L1.call("_guiRelayout",Ye,$e,fe)})}}Mne.init(K);var ce,le,Q,ge,ue,ke,ve,be,W,te;function X(De,Le,Ye){var Xe=Z.getBoundingClientRect();ce=Le-Xe.left,le=Ye-Xe.top,e._fullLayout._calcInverseTransform(e);var Ge=Zn.apply3DTransform(e._fullLayout._invTransform)(ce,le);ce=Ge[0],le=Ge[1],Q={l:ce,r:ce,w:0,t:le,b:le,h:0},ge=e._hmpixcount?e._hmlumcount/e._hmpixcount:xne(e._fullLayout.plot_bgcolor).getLuminance(),ue="M0,0H"+T+"V"+x+"H0V0",ke=!1,ve="xy",te=!1,be=KL(s,ge,_,b,ue),W=QL(s,_,b)}function ye(De,Le){if(e._transitioningWithDuration)return!1;var Ye=Math.max(0,Math.min(T,V*De+ce)),Xe=Math.max(0,Math.min(x,Y*Le+le)),Ge=Math.abs(Ye-ce),Oe=Math.abs(Xe-le);Q.l=Math.min(ce,Ye),Q.r=Math.max(ce,Ye),Q.t=Math.min(le,Xe),Q.b=Math.max(le,Xe);function $e(){ve="",Q.r=Q.l,Q.t=Q.b,W.attr("d","M0,0Z")}if(M.isSubplotConstrained)Ge>Qa||Oe>Qa?(ve="xy",Ge/T>Oe/x?(Oe=Ge*x/T,le>Xe?Q.t=le-Oe:Q.b=le+Oe):(Ge=Oe*T/x,ce>Ye?Q.l=ce-Ge:Q.r=ce+Ge),W.attr("d",D1(Q))):$e();else if(A.isSubplotConstrained)if(Ge>Qa||Oe>Qa){ve="xy";var fr=Math.min(Q.l/T,(x-Q.b)/x),lr=Math.max(Q.r/T,(x-Q.t)/x);Q.l=fr*T,Q.r=lr*T,Q.b=(1-fr)*x,Q.t=(1-lr)*x,W.attr("d",D1(Q))}else $e();else!L||Oe0){var ne;if(A.isSubplotConstrained||!k&&L.length===1){for(ne=0;ne1&&($e.maxallowed!==void 0&&E===($e.range[0]<$e.range[1]?"e":"w")||$e.minallowed!==void 0&&E===($e.range[0]<$e.range[1]?"w":"e"))&&(ir=1,sr=0),qe?(vr=fe,Ar=l||A.isSubplotConstrained?De[1]:tr(fr,vr)):A.yaHash[fr._id]?(vr=fe,Ar=De[1]*fr._length/h._length):A.xaHash[fr._id]?(vr=ne,Ar=k==="ew"?-De[0]*fr._length/c._length:tr(fr,vr,{e:"right",w:"left"}[k])):(vr=Ce(fr,ne,fe),Ar=cr(fr,vr)),vr>1&&(fr.maxallowed!==void 0&&R===(fr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Nne(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function KL(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",XL(t,a)).attr("d",n+"Z")}function QL(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:HL.background,stroke:HL.defaultLine,"stroke-width":1,opacity:0}).attr("transform",XL(r,t)).attr("d","M0,0Z")}function jL(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),eS(e,r,n,i)}function eS(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function K3(e){Q3.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rS(e){YL&&e.data&&e._context.showTips&&(Zn.notifier(Zn._(e,"Double-click to zoom back out"),"long"),YL=!1)}function Fne(e,r){return"M"+(e.l-.5)+","+(r-Qa-.5)+"h-3v"+(2*Qa+1)+"h3ZM"+(e.r+.5)+","+(r-Qa-.5)+"h3v"+(2*Qa+1)+"h-3Z"}function Ine(e,r){return"M"+(r-Qa-.5)+","+(e.t-.5)+"v-3h"+(2*Qa+1)+"v3ZM"+(r-Qa-.5)+","+(e.b+.5)+"v3h"+(2*Qa+1)+"v-3Z"}function D1(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Qa)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function VL(e,r,t,a,n){for(var i=!1,l={},o={},s,u,f,c,h=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var Hne=kr(),E1=gi(),One=mi(),Bne=Kl(),_i=nS().makeDragBox,na=wa().DRAGGERSIZE;P1.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){Hne.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,l){if((t._plots[i].mainplot&&!0)===(t._plots[l].mainplot&&!0)){var o=i.split("y"),s=l.split("y");return o[0]===s[0]?Number(o[1]||1)-Number(s[1]||1):Number(o[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var l=t._plots[i],o=l.xaxis,s=l.yaxis;if(!l.mainplot){var u=_i(r,l,o._offset,s._offset,o._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&E1.hover(r,h,i)},E1.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,One.unhover(r,h))},r._context.showAxisDragHandles&&(_i(r,l,o._offset-na,s._offset-na,na,na,"n","w"),_i(r,l,o._offset+o._length,s._offset-na,na,na,"n","e"),_i(r,l,o._offset-na,s._offset+s._length,na,na,"s","w"),_i(r,l,o._offset+o._length,s._offset+s._length,na,na,"s","e"))}if(r._context.showAxisDragHandles){if(i===o._mainSubplot){var f=o._mainLinePosition;o.side==="top"&&(f-=na),_i(r,l,o._offset+o._length*.1,f,o._length*.8,na,"","ew"),_i(r,l,o._offset,f,o._length*.1,na,"","w"),_i(r,l,o._offset+o._length*.9,f,o._length*.1,na,"","e")}if(i===s._mainSubplot){var c=s._mainLinePosition;s.side!=="right"&&(c-=na),_i(r,l,c,s._offset+s._length*.1,na,s._length*.8,"ns",""),_i(r,l,c,s._offset+s._length*.9,na,s._length*.1,"s",""),_i(r,l,c,s._offset,na,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,E1.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,E1.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},P1.updateFx(r)}};P1.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";Bne(r._draggers,t)}});var oS=B(($2e,lS)=>{"use strict";var iS=yr();lS.exports=function(r){for(var t=iS.layoutArrayContainers,a=iS.layoutArrayRegexes,n=r.split("[")[0],i,l,o=0;o{"use strict";var Yne=Pl(),rx=ph(),_v=Go(),Gne=Ky().sorterAsc,tx=yr();wv.containerArrayMatch=oS();var Une=wv.isAddVal=function(r){return r==="add"||Yne(r)},sS=wv.isRemoveVal=function(r){return r===null||r==="remove"};wv.applyContainerArrayChanges=function(r,t,a,n,i){var l=t.astr,o=tx.getComponentMethod(l,"supplyLayoutDefaults"),s=tx.getComponentMethod(l,"draw"),u=tx.getComponentMethod(l,"drawOne"),f=n.replot||n.recalc||o===rx||s===rx,c=r.layout,h=r._fullLayout;if(a[""]){Object.keys(a).length>1&&_v.warn("Full array edits are incompatible with other edits",l);var d=a[""][""];if(sS(d))t.set(null);else if(Array.isArray(d))t.set(d);else return _v.warn("Unrecognized full array edit value",l,d),!0;return f?!1:(o(c,h),s(r),!0)}var p=Object.keys(a).map(Number).sort(Gne),y=t.get(),m=y||[],_=i(h,l).get(),b=[],T=-1,x=m.length,M,A,k,L,D,E,R,z;for(M=0;Mm.length-(R?0:1)){_v.warn("index out of range",l,k);continue}if(E!==void 0)D.length>1&&_v.warn("Insertion & removal are incompatible with edits to the same index.",l,k),sS(E)?b.push(k):R?(E==="add"&&(E={}),m.splice(k,0,E),_&&_.splice(k,0,{})):_v.warn("Unrecognized full object edit value",l,k,E),T===-1&&(T=k);else for(A=0;A=0;M--)m.splice(b[M],1),_&&_.splice(b[M],1);if(m.length?y||t.set(m):t.set(null),f)return!1;if(o(c,h),u!==rx){var H;if(T===-1)H=p;else{for(x=Math.max(m.length,x),H=[],M=0;M=T));M++)H.push(k);for(M=T;M{"use strict";var hS=zr(),Q2e=By(),dS=yr(),vn=Pe(),Tv=St(),pS=Jt(),mS=xr(),Mv=pS.cleanId,Vne=pS.getFromTrace,ax=dS.traceIs;wi.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&vn.log("Clearing previous rejected promises from queue."),e._promises=[]};wi.cleanLayout=function(e){var r,t;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 a=(Tv.subplotsRegistry.cartesian||{}).attrRegex,n=(Tv.subplotsRegistry.polar||{}).attrRegex,i=(Tv.subplotsRegistry.ternary||{}).attrRegex,l=(Tv.subplotsRegistry.gl3d||{}).attrRegex,o=Object.keys(e);for(r=0;r3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),mS.clean(e),e.template&&e.template.layout&&wi.cleanLayout(e.template.layout),e};function sf(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=Mv(t,a,!0))}wi.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}wi.hasParent=function(e,r){for(var t=vS(r);t;){if(t in e)return!0;t=vS(t)}return!1};var Zne=["x","y","z"];wi.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var F1=kr(),Jne=zr(),$ne=cg(),Qe=Pe(),ut=Qe.nestedProperty,lx=Sc(),ja=Q8(),Jn=yr(),U1=Su(),_r=St(),Va=$r(),Kne=L2(),Qne=bn(),nx=Br(),jne=xr(),eie=ex().initInteractions,rie=Qo(),tie=of().clearOutline,wS=Yo().dfltConfig,z1=uS(),Vt=yS(),tt=p1(),ao=ui(),aie=wa().AX_NAME_PATTERN,ix=0,gS=5;function nie(e,r,t,a){var n;if(e=Qe.getGraphDiv(e),lx.init(e),Qe.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var l=lx.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(l===!1)return Promise.reject();!r&&!t&&!Qe.isPlotDiv(e)&&Qe.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function o(){if(n)return Vr.addFrames(e,n)}MS(e,a),t||(t={}),F1.select(e).classed("js-plotly-plot",!0),nx.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(Vt.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=Vt.cleanLayout(t)),_r.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(kie(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),nx.initGradients(e),nx.initPatterns(e),s&&Va.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&_r.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function AS(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),H1(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&H1(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function uie(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof L.parts[R]!="string";)R--;var z=L.parts[R],H=L.parts[R-1]+"."+z,O=L.parts.slice(0,R).join("."),U=ut(e.layout,O).get(),V=ut(a,O).get(),Y=L.get();if(D!==void 0){_[k]=D,b[k]=z==="reverse"?D:yl(Y);var I=U1.getLayoutValObject(a,L.parts);if(I&&I.impliedEdits&&D!==null)for(var G in I.impliedEdits)T(Qe.relativeAttr(k,G),I.impliedEdits[G]);if(["width","height"].indexOf(k)!==-1)if(D){T("autosize",null);var Z=k==="height"?"width":"height";T(Z,a[Z])}else a[k]=e._initialAutoSize[k];else if(k==="autosize")T("width",D?null:a.width),T("height",D?null:a.height);else if(H.match(RS))A(H),ut(a,O+"._inputRange").set(null);else if(H.match(zS)){A(H),ut(a,O+"._inputRange").set(null);var K=ut(a,O).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else H.match(NS)&&ut(a,O+"._inputDomain").set(null);if(z==="type"){M=U;var re=V.type==="linear"&&D==="log",se=V.type==="log"&&D==="linear";if(re||se){if(!M||!M.range)T(O+".autorange",!0);else if(V.autorange)re&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var ce=M.range[0],le=M.range[1];re?(ce<=0&&le<=0&&T(O+".autorange",!0),ce<=0?ce=le/1e6:le<=0&&(le=ce/1e6),T(O+".range[0]",Math.log(ce)/Math.LN10),T(O+".range[1]",Math.log(le)/Math.LN10)):(T(O+".range[0]",Math.pow(10,ce)),T(O+".range[1]",Math.pow(10,le)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[L.parts[0]]&&L.parts[1]==="radialaxis"&&delete a[L.parts[0]]._subplot.viewInitial["radialaxis.range"],Jn.getComponentMethod("annotations","convertCoords")(e,V,D,T),Jn.getComponentMethod("images","convertCoords")(e,V,D,T)}else T(O+".autorange",!0),T(O+".range",null);ut(a,O+"._inputRange").set(null)}else if(z.match(aie)){var Q=ut(a,k).get(),ge=(D||{}).type;(!ge||ge==="-")&&(ge="linear"),Jn.getComponentMethod("annotations","convertCoords")(e,Q,ge,T),Jn.getComponentMethod("images","convertCoords")(e,Q,ge,T)}var ue=z1.containerArrayMatch(k);if(ue){f=ue.array,c=ue.index;var ke=ue.property,ve=I||{editType:"calc"};c!==""&&ke===""&&(z1.isAddVal(D)?b[k]=null:z1.isRemoveVal(D)?b[k]=(ut(t,f).get()||[])[c]:Qe.warn("unrecognized full object value",r)),ao.update(m,ve),u[f]||(u[f]={});var be=u[f][c];be||(be=u[f][c]={}),be[ke]=D,delete r[k]}else z==="reverse"?(U.range?U.range.reverse():(T(O+".autorange",!0),U.range=[1,0]),V.autorange?m.calc=!0:m.plot=!0):(k==="dragmode"&&(D===!1&&Y!==!1||D!==!1&&Y===!1)||a._has("scatter-like")&&a._has("regl")&&k==="dragmode"&&(D==="lasso"||D==="select")&&!(Y==="lasso"||Y==="select")?m.plot=!0:I?ao.update(m,I):m.calc=!0,L.set(D))}}for(f in u){var W=z1.applyContainerArrayChanges(e,i(t,f),u[f],m,i);W||(m.plot=!0)}for(var te in x){M=Va.getFromId(e,te);var X=M&&M._constraintGroup;if(X){m.calc=!0;for(var ye in X)x[ye]||(Va.getFromId(e,ye)._constraintShrinkable=!0)}}(IS(e)||r.height||r.width)&&(m.plot=!0);var _e=a.shapes;for(c=0;c<_e.length;c++)if(_e[c].showlegend){m.calc=!0;break}return(m.plot||m.calc)&&(m.layoutReplot=!0),{flags:m,rangesAltered:x,undoit:b,redoit:_,eventData:s}}function IS(e){var r=e._fullLayout,t=r.width,a=r.height;return e.layout.autosize&&_r.plotAutoSize(e,e.layout,r),r.width!==t||r.height!==a}function Y1(e,r,t,a){e=Qe.getGraphDiv(e),Vt.clearPromiseQueue(e),Qe.isPlainObject(r)||(r={}),Qe.isPlainObject(t)||(t={}),Object.keys(r).length&&(e.changed=!0),Object.keys(t).length&&(e.changed=!0);var n=Vt.coerceTraceIndices(e,a),i=ES(e,Qe.extendFlat({},r),n),l=i.flags,o=FS(e,Qe.extendFlat({},t)),s=o.flags;(l.calc||s.calc)&&(e.calcdata=void 0),l.clearAxisTypes&&Vt.clearAxisTypes(e,n,t);var u=[];s.layoutReplot?u.push(tt.layoutReplot):l.fullReplot?u.push(Vr._doPlot):(u.push(_r.previousPromises),PS(e,s,o)||_r.supplyDefaults(e),l.style&&u.push(tt.doTraceStyle),(l.colorbars||s.colorbars)&&u.push(tt.doColorBars),s.legend&&u.push(tt.doLegend),s.layoutstyle&&u.push(tt.layoutStyles),s.axrange&&V1(u,o.rangesAltered),s.ticks&&u.push(tt.doTicksRelayout),s.modebar&&u.push(tt.doModeBar),s.camera&&u.push(tt.doCamera),u.push(kv)),u.push(_r.rehover,_r.redrag,_r.reselect),ja.add(e,Y1,[e,i.undoit,o.undoit,i.traces],Y1,[e,i.redoit,o.redoit,i.traces]);var f=Qe.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve(e)),f.then(function(){return e.emit("plotly_update",{data:i.eventData,layout:o.eventData}),e})}function ux(e){return function(t){t._fullLayout._guiEditing=!0;var a=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,a}}var hie=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],die=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function xS(e,r){for(var t=0;t1;)if(a.pop(),t=ut(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function pie(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function o(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var c=0;return function(){if(u&&++c===f)return u()}}return new Promise(function(u,f){function c(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var z=a._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var H=0;Ha._timeToNext&&p()};z()}var m=0;function _(z){return Array.isArray(n)?m>=n.length?z.transitionOpts=n[m]:z.transitionOpts=n[0]:z.transitionOpts=n,m++,z}var b,T,x=[],M=r==null,A=Array.isArray(r),k=!M&&!A&&Qe.isPlainObject(r);if(k)x.push({type:"object",data:_(Qe.extendFlat({},r))});else if(M||["string","number"].indexOf(typeof r)!==-1)for(b=0;b0&&EE)&&R.push(T);x=R}}x.length>0?h(x):(e.emit("plotly_animated"),u())})}function wie(e,r,t){if(e=Qe.getGraphDiv(e),r==null)return Promise.resolve();if(!Qe.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 a,n,i,l,o=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=o.length+r.length*2,f=[],c={};for(a=r.length-1;a>=0;a--)if(Qe.isPlainObject(r[a])){var h=r[a].name,d=(s[h]||c[h]||{}).name,p=r[a].name,y=s[d]||c[d];d&&p&&typeof p=="number"&&y&&ixL.index?-1:k.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&Qe.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),l.unshift({type:"insert",index:a,value:n[a]});var o=_r.modifyFrames,s=_r.modifyFrames,u=[e,l],f=[e,i];return ja&&ja.add(e,o,u,s,f),_r.modifyFrames(e,i)}function Mie(e){e=Qe.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return _r.cleanPlot([],{},t,r),_r.purge(e),lx.purge(e),r._container&&r._container.remove(),delete e._context,e}function Aie(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!Qe.equalDomRects(t,r._lastBBox)){var a=r._invTransform=Qe.inverseTransformMatrix(Qe.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function kie(e){var r=F1.select(e),t=e._fullLayout;if(t._calcInverseTransform=Aie,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};F1.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=Qe.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(rie.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Vr.animate=_ie;Vr.addFrames=wie;Vr.deleteFrames=Tie;Vr.addTraces=SS;Vr.deleteTraces=DS;Vr.extendTraces=CS;Vr.moveTraces=ox;Vr.prependTraces=LS;Vr.newPlot=sie;Vr._doPlot=nie;Vr.purge=Mie;Vr.react=gie;Vr.redraw=oie;Vr.relayout=Av;Vr.restyle=O1;Vr.setPlotConfig=iie;Vr.update=Y1;Vr._guiRelayout=ux(Av);Vr._guiRestyle=ux(O1);Vr._guiUpdate=ux(Y1);Vr._storeDirectGUIEdit=vie});var gs=B(Zi=>{"use strict";var qie=yr();Zi.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Zi.getRedrawFunc=function(e){return function(){qie.getComponentMethod("colorbar","draw")(e)}};Zi.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Zi.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var HS=window.URL||window.webkitURL;Zi.createObjectURL=function(e){return HS.createObjectURL(e)};Zi.revokeObjectURL=function(e){return HS.revokeObjectURL(e)};Zi.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=Cie(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Zi.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function Cie(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var vx=kr(),t3e=Pe(),Lie=Br(),Sie=xr(),a3e=Qo(),cx=/"/g,qv="TOBESTRIPPED",Die=new RegExp('("'+qv+")|("+qv+'")',"g");function Eie(e){var r=vx.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function Pie(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}OS.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,l=n._toppaper,o=n.width,s=n.height,u;i.insert("rect",":first-child").call(Lie.setRect,0,0,o,s).call(Sie.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var Rie=Pe(),zie=Nh().EventEmitter,Cv=gs();function Nie(e){var r=e.emitter||new zie,t=new Promise(function(a,n){var i=window.Image,l=e.svg,o=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,c=e.height||150,h=u*f,d=u*c,p=s.getContext("2d",{willReadFrequently:!0}),y=new i,m,_;o==="svg"||Rie.isSafari()?_=Cv.encodeSVG(l):(m=Cv.createBlob(l,"svg"),_=Cv.createObjectURL(m)),s.width=h,s.height=d,y.onload=function(){var b;switch(m=null,Cv.revokeObjectURL(_),o!=="svg"&&p.drawImage(y,0,0,h,d),o){case"jpeg":b=s.toDataURL("image/jpeg");break;case"png":b=s.toDataURL("image/png");break;case"webp":b=s.toDataURL("image/webp");break;case"svg":b=_;break;default:var T="Image format is not jpeg, png, svg or webp.";if(n(new Error(T)),!e.promise)return r.emit("error",T)}a(b),e.promise||r.emit("success",b)},y.onerror=function(b){if(m=null,Cv.revokeObjectURL(_),n(b),!e.promise)return r.emit("error",b)},y.src=_});return e.promise?t:r}BS.exports=Nie});var dx=B((l3e,US)=>{"use strict";var YS=zr(),GS=fx(),Fie=St(),Ji=Pe(),Lv=gs(),Iie=W1(),Hie=X1(),Oie=Q0().version,hx={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 Bie(e,r){r=r||{};var t,a,n,i;Ji.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=Ji.getGraphDiv(e),t=Ji.extendDeep([],e.data),a=Ji.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function l(A){return!(A in r)||Ji.validate(r[A],hx[A])}if(!l("width")&&r.width!==null||!l("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!l("format"))throw new Error("Export format is not "+Ji.join2(hx.format.values,", "," or ")+".");var o={};function s(A,k){return Ji.coerce(r,o,hx,A,k)}var u=s("format"),f=s("width"),c=s("height"),h=s("scale"),d=s("setBackground"),p=s("imageDataOnly"),y=document.createElement("div");y.style.position="absolute",y.style.left="-5000px",document.body.appendChild(y);var m=Ji.extendFlat({},a);f?m.width=f:r.width===null&&YS(i.width)&&(m.width=i.width),c?m.height=c:r.height===null&&YS(i.height)&&(m.height=i.height);var _=Ji.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),b=Lv.getRedrawFunc(y);function T(){return new Promise(function(A){setTimeout(A,Lv.getDelay(y._fullLayout))})}function x(){return new Promise(function(A,k){var L=Iie(y,u,h),D=y._fullLayout.width,E=y._fullLayout.height;function R(){GS.purge(y),document.body.removeChild(y)}if(u==="full-json"){var z=Fie.graphJson(y,!1,"keepdata","object",!0,!0);return z.version=Oie,z=JSON.stringify(z),R(),A(p?z:Lv.encodeJSON(z))}if(R(),u==="svg")return A(p?L:Lv.encodeSVG(L));var H=document.createElement("canvas");H.id=Ji.randstr(),Hie({format:u,width:D,height:E,scale:h,canvas:H,svg:L,promise:!0}).then(A).catch(k)})}function M(A){return p?A.replace(Lv.IMAGE_URL_PREFIX,""):A}return new Promise(function(A,k){GS.newPlot(y,t,m,_).then(b).then(T).then(x).then(function(L){A(M(L))}).catch(function(L){k(L)})})}US.exports=Bie});var ZS=B((o3e,XS)=>{"use strict";var $n=Pe(),Yie=St(),Gie=Su(),Uie=Yo().dfltConfig,Ti=$n.isPlainObject,bs=Array.isArray,VS=$n.isArrayOrTypedArray;XS.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=Gie.get(),n=[],i={_context:$n.extendFlat({},Uie)},l,o;bs(r)?(i.data=$n.extendDeep([],r),l=r):(i.data=[],l=[],n.push(ia("array","data"))),Ti(t)?(i.layout=$n.extendDeep({},t),o=t):(i.layout={},o={},arguments.length>1&&n.push(ia("object","layout"))),Yie.supplyDefaults(i);for(var s=i._fullData,u=l.length,f=0;fc.length&&a.push(ia("unused",n,u.concat(c.length)));var _=c.length,b=Array.isArray(m);b&&(_=Math.min(_,m.length));var T,x,M,A,k;if(h.dimensions===2)for(x=0;x<_;x++)if(bs(f[x])){f[x].length>c[x].length&&a.push(ia("unused",n,u.concat(x,c[x].length)));var L=c[x].length;for(T=0;T<(b?Math.min(L,m[x].length):L);T++)M=b?m[x][T]:m,A=f[x][T],k=c[x][T],$n.validate(A,M)?k!==A&&k!==+A&&a.push(ia("dynamic",n,u.concat(x,T),A,k)):a.push(ia("value",n,u.concat(x,T),A))}else a.push(ia("array",n,u.concat(x),f[x]));else for(x=0;x<_;x++)M=b?m[x]:m,A=f[x],k=c[x],$n.validate(A,M)?k!==A&&k!==+A&&a.push(ia("dynamic",n,u.concat(x),A,k)):a.push(ia("value",n,u.concat(x),A))}else if(h.items&&!p&&bs(f)){var D=m[Object.keys(m)[0]],E=[],R,z;for(R=0;R{"use strict";var Kie=Pe(),J1=gs();function Qie(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(l,o){var s,u;if(n)return s=J1.createBlob(e,t),u=J1.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),J1.revokeObjectURL(u),s=null,l(r);if(Kie.isSafari()){var f=t==="svg"?",":";base64,";return J1.octetStream(f+encodeURIComponent(e)),l(r)}o(new Error("download error"))});return i}JS.exports=Qie});var px=B((f3e,QS)=>{"use strict";var KS=Pe(),jie=dx(),ele=$S(),u3e=gs();function rle(e,r){var t;return KS.isPlainObject(e)||(t=KS.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=jie(e,r),l=r.filename||e.fn||"newplot";l+="."+r.format.replace("-","."),i.then(function(o){return t&&(t._snapshotInProgress=!1),ele(o,l,r.format)}).then(function(o){a(o)}).catch(function(o){t&&(t._snapshotInProgress=!1),n(o)})})}QS.exports=rle});var aD=B(mx=>{"use strict";var hn=Pe(),dn=hn.isPlainObject,jS=Su(),eD=St(),tle=tn(),rD=ot(),tD=Yo().dfltConfig;mx.makeTemplate=function(e){e=hn.isPlainObject(e)?e:hn.getGraphDiv(e),e=hn.extendDeep({_context:tD},{data:e.data,layout:e.layout}),eD.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var p={};Sv(d,p,nle.bind(null,d));var y=hn.coerce(d,{},tle,"type"),m=a.data[y];m||(m=a.data[y]=[]),m.push(p)}),Sv(t,a.layout,ale.bind(null,t)),delete a.layout.template;var n=t.template;if(dn(n)){var i=n.layout,l,o,s,u,f,c;dn(i)&&$1(i,a.layout);var h=n.data;if(dn(h)){for(o in a.data)if(s=h[o],Array.isArray(s)){for(f=a.data[o],c=f.length,u=s.length,l=0;l_?l.push({code:"unused",traceType:d,templateCount:m,dataCount:_}):_>m&&l.push({code:"reused",traceType:d,templateCount:m,dataCount:_})}}function b(T,x){for(var M in T)if(M.charAt(0)!=="_"){var A=T[M],k=Kn(T,M,x);dn(A)?(Array.isArray(T)&&A._template===!1&&A.templateitemname&&l.push({code:"missing",path:k,templateitemname:A.templateitemname}),b(A,k)):Array.isArray(A)&&ile(A)&&b(A,k)}}if(b({data:s,layout:o},""),l.length)return l.map(lle)};function ile(e){for(var r=0;r{"use strict";var Kt=fx();xt._doPlot=Kt._doPlot;xt.newPlot=Kt.newPlot;xt.restyle=Kt.restyle;xt.relayout=Kt.relayout;xt.redraw=Kt.redraw;xt.update=Kt.update;xt._guiRestyle=Kt._guiRestyle;xt._guiRelayout=Kt._guiRelayout;xt._guiUpdate=Kt._guiUpdate;xt._storeDirectGUIEdit=Kt._storeDirectGUIEdit;xt.react=Kt.react;xt.extendTraces=Kt.extendTraces;xt.prependTraces=Kt.prependTraces;xt.addTraces=Kt.addTraces;xt.deleteTraces=Kt.deleteTraces;xt.moveTraces=Kt.moveTraces;xt.purge=Kt.purge;xt.addFrames=Kt.addFrames;xt.deleteFrames=Kt.deleteFrames;xt.animate=Kt.animate;xt.setPlotConfig=Kt.setPlotConfig;var ole=wc().getGraphDiv,sle=s1().eraseActiveShape;xt.deleteActiveShape=function(e){return sle(ole(e))};xt.toImage=dx();xt.validate=ZS();xt.downloadImage=px();var nD=aD();xt.makeTemplate=nD.makeTemplate;xt.validateTemplate=nD.validateTemplate});var Dv=B((h3e,lD)=>{"use strict";var yx=Pe(),ule=yr();lD.exports=function(r,t,a,n){var i=n("x"),l=n("y"),o,s=ule.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=yx.minRowLength(i);l?o=Math.min(u,yx.minRowLength(l)):(o=u,n("y0"),n("dy"))}else{if(!l)return 0;o=yx.minRowLength(l),n("x0"),n("dx")}return t._length=o,o}});var _s=B((d3e,uD)=>{"use strict";var oD=Pe().dateTick0,fle=wt(),cle=fle.ONEWEEK;function sD(e,r){return e%cle===0?oD(r,1):oD(r,0)}uD.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var l=n("xperiod");l&&(n("xperiod0",sD(l,t.xcalendar)),n("xperiodalignment"))}if(i.y){var o=n("yperiod");o&&(n("yperiod0",sD(o,t.ycalendar)),n("yperiodalignment"))}}});var vD=B((p3e,cD)=>{"use strict";var fD=["orientation","groupnorm","stackgaps"];cD.exports=function(r,t,a,n){var i=a._scatterStackOpts,l=n("stackgroup");if(l){var o=t.xaxis+t.yaxis,s=i[o];s||(s=i[o]={});var u=s[l],f=!1;u?u.traces.push(t):(u=s[l]={traceIndices:[],traces:[t]},f=!0);for(var c={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var hD=xr(),dD=Hn().hasColorscale,pD=Ru(),vle=_n();mD.exports=function(r,t,a,n,i,l){var o=vle.isBubble(r),s=(r.line||{}).color,u;if(l=l||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",o?.7:1),i("marker.size"),l.noAngle||(i("marker.angle"),l.noAngleRef||i("marker.angleref"),l.noStandOff||i("marker.standoff")),i("marker.color",a),dD(r,"marker")&&pD(r,t,n,i,{prefix:"marker.",cLetter:"c"}),l.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),l.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:o?u=hD.background:u=hD.defaultLine,i("marker.line.color",u),dD(r,"marker.line")&&pD(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",o?1:0)),o&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),l.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var xD=B((y3e,gD)=>{"use strict";var hle=Pe().isArrayOrTypedArray,dle=Hn().hasColorscale,ple=Ru();gD.exports=function(r,t,a,n,i,l){l||(l={});var o=(r.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),i("line.color",a),dle(r,"line"))ple(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(hle(o)?!1:o)||a;i("line.color",s)}i("line.width"),l.noDash||i("line.dash"),l.backoff&&i("line.backoff")}});var _D=B((g3e,bD)=>{"use strict";bD.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var TD=B((x3e,wD)=>{"use strict";var mle=Pe();wD.exports=function(e,r,t,a,n){n=n||{},a("textposition"),mle.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var kD=B((b3e,AD)=>{"use strict";var Q1=xr(),MD=Pe().isArrayOrTypedArray;function yle(e){for(var r=Q1.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var qD=Pe(),gle=yr(),xle=bi(),ble=A1(),uf=_n(),_le=Dv(),wle=_s(),Tle=vD(),Mle=yD(),Ale=xD(),CD=_D(),kle=TD(),qle=kD(),Cle=Pe().coercePattern;LD.exports=function(r,t,a,n){function i(d,p){return qD.coerce(r,t,xle,d,p)}var l=_le(r,t,n,i);if(l||(t.visible=!1),!!t.visible){wle(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var o=Tle(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!o&&l{"use strict";var Lle=ys().getAxisGroup;DD.exports=function(r,t,a,n,i){var l=t.orientation,o=t[{v:"x",h:"y"}[l]+"axis"],s=Lle(a,o)+l,u=a._alignmentOpts||{},f=n("alignmentgroup"),c=u[s];c||(c=u[s]={});var h=c[f];h?h.traces.push(t):h=c[f]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=h.offsetGroups,y=p[d];t._offsetIndex=0,(i!=="group"||d)&&(y||(y=p[d]={offsetIndex:Object.keys(p).length}),t._offsetIndex=y.offsetIndex)}});var PD=B((T3e,ED)=>{"use strict";var Sle=Pe(),Dle=ff(),Ele=bi();ED.exports=function(r,t){var a,n,i,l=t.scattermode;function o(h){return Sle.coerce(n._input,n,Ele,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var c=r[f];if(c.type==="scatter"&&c.xaxis===s.xaxis&&c.yaxis===s.yaxis){c.opacity=void 0;break}}}}}});var zD=B((M3e,RD)=>{"use strict";var Ple=Pe(),Rle=Bh();RD.exports=function(e,r){function t(n,i){return Ple.coerce(e,r,Rle,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var ws=B((A3e,FD)=>{"use strict";var zle=zr(),ND=Pe(),Nle=ND.dateTime2ms,j1=ND.incrementMonth,Fle=wt(),Ile=Fle.ONEAVGMONTH;FD.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var l=r[a+"period"],o;if(zle(l)){if(l=+l,l<=0)return{vals:n}}else if(typeof l=="string"&&l.charAt(0)==="M"){var s=+l.substring(1);if(s>0&&Math.round(s)===s)o=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",c=i==="end",h=r[a+"period0"],d=Nle(h,u)||0,p=[],y=[],m=[],_=n.length,b=0;b<_;b++){var T=n[b],x,M,A;if(o){for(x=Math.round((T-d)/(o*Ile)),A=j1(d,o*x,u);A>T;)A=j1(A,-o,u);for(;A<=T;)A=j1(A,o,u);M=j1(A,-o,u)}else{for(x=Math.round((T-d)/l),A=d+x*l;A>T;)A-=l;for(;A<=T;)A+=l;M=A-l}p[b]=f?M:c?A:(M+A)/2,y[b]=M,m[b]=A}return{vals:p,starts:y,ends:m}}});var OD=B((k3e,HD)=>{"use strict";var gx=Hn().hasColorscale,xx=td(),ID=_n();HD.exports=function(r,t){ID.hasLines(t)&&gx(t,"line")&&xx(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),ID.hasMarkers(t)&&(gx(t,"marker")&&xx(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),gx(t,"marker.line")&&xx(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var bx=B((q3e,BD)=>{"use strict";var Et=Pe();BD.exports=function(r,t){for(var a=0;a{"use strict";var YD=Pe();GD.exports=function(r,t){YD.isArrayOrTypedArray(t.selectedpoints)&&YD.tagSelected(r,t)}});var Ax=B((L3e,$D)=>{"use strict";var UD=zr(),wx=Pe(),Pv=$r(),VD=ws(),_x=wt().BADNUM,Tx=_n(),Hle=OD(),Ole=bx(),Ble=Ev();function Yle(e,r){var t=e._fullLayout,a=r._xA=Pv.getFromId(e,r.xaxis||"x","x"),n=r._yA=Pv.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),l=n.makeCalcdata(r,"y"),o=VD(r,a,"x",i),s=VD(r,n,"y",l),u=o.vals,f=s.vals,c=r._length,h=new Array(c),d=r.ids,p=Mx(r,t,a,n),y=!1,m,_,b,T,x,M;ZD(t,r);var A="x",k="y",L;if(p)wx.pushUnique(p.traceIndices,r.index),m=p.orientation==="v",m?(k="s",L="x"):(A="s",L="y"),x=p.stackgaps==="interpolate";else{var D=XD(r,c);WD(e,r,a,n,u,f,D)}var E=!!r.xperiodalignment,R=!!r.yperiodalignment;for(_=0;__&&h[T].gap;)T--;for(M=h[T].s,b=h.length-1;b>T;b--)h[b].s=M;for(;_{"use strict";KD.exports=ep;var Gle=Pe().distinctVals;function ep(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var Qn=zr(),no=Pe().isArrayOrTypedArray,cf=wt().BADNUM,Ule=yr(),Rv=$r(),Vle=ys().getAxisGroup,rp=QD();function Wle(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;us+l||!Qn(o))}for(var f=0;f{"use strict";var aE=Ax(),nE=hf().setGroupPositions;function noe(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,l=e.calcdata,o=[],s=[],u=0;uD[f]&&f{"use strict";var loe=Br(),fE=wt(),zv=fE.BADNUM,cE=fE.LOG_CLIP,oE=cE+.5,sE=cE-.5,tp=Pe(),ooe=tp.segmentsIntersect,uE=tp.constrain,Dx=A1();vE.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,l=n.type==="log",o=i.type==="log",s=n._length,u=i._length,f=t.backoff,c=a.marker,h=t.connectGaps,d=t.baseTolerance,p=t.shape,y=p==="linear",m=a.fill&&a.fill!=="none",_=[],b=Dx.minTolerance,T=r.length,x=new Array(T),M=0,A,k,L,D,E,R,z,H,O,U,V,Y,I,G,Z,K;function re(Ne){var ne=r[Ne];if(!ne)return!1;var fe=t.linearized?n.l2p(ne.x):n.c2p(ne.x),Se=t.linearized?i.l2p(ne.y):i.c2p(ne.y);if(fe===zv){if(l&&(fe=n.c2p(ne.x,!0)),fe===zv)return!1;o&&Se===zv&&(fe*=Math.abs(n._m*u*(n._m>0?oE:sE)/(i._m*s*(i._m>0?oE:sE)))),fe*=1e3}if(Se===zv){if(o&&(Se=i.c2p(ne.y,!0)),Se===zv)return!1;Se*=1e3}return[fe,Se]}function se(Ne,ne,fe,Se){var qe=fe-Ne,ir=Se-ne,vr=.5-Ne,sr=.5-ne,Ar=qe*qe+ir*ir,Ur=qe*vr+ir*sr;if(Ur>0&&Ur1||Math.abs(vr.y-fe[0][1])>1)&&(vr=[vr.x,vr.y],Se&&ge(vr,Ne)ve||Ne[1]W)return[uE(Ne[0],ke,ve),uE(Ne[1],be,W)]}function Be(Ne,ne){if(Ne[0]===ne[0]&&(Ne[0]===ke||Ne[0]===ve)||Ne[1]===ne[1]&&(Ne[1]===be||Ne[1]===W))return!0}function Fe(Ne,ne){var fe=[],Se=He(Ne),qe=He(ne);return Se&&qe&&Be(Se,qe)||(Se&&fe.push(Se),qe&&fe.push(qe)),fe}function Ee(Ne,ne,fe){return function(Se,qe){var ir=He(Se),vr=He(qe),sr=[];if(ir&&vr&&Be(ir,vr))return sr;ir&&sr.push(ir),vr&&sr.push(vr);var Ar=2*tp.constrain((Se[Ne]+qe[Ne])/2,ne,fe)-((ir||Se)[Ne]+(vr||qe)[Ne]);if(Ar){var Ur;ir&&vr?Ur=Ar>0==ir[Ne]>vr[Ne]?ir:vr:Ur=ir||vr,Ur[Ne]+=Ar}return sr}}var Je;p==="linear"||p==="spline"?Je=Re:p==="hv"||p==="vh"?Je=Fe:p==="hvh"?Je=Ee(0,ke,ve):p==="vhv"&&(Je=Ee(1,be,W));function We(Ne,ne){var fe=ne[0]-Ne[0],Se=(ne[1]-Ne[1])/fe,qe=(Ne[1]*ne[0]-ne[1]*Ne[0])/fe;return qe>0?[Se>0?ke:ve,W]:[Se>0?ve:ke,be]}function ie(Ne){var ne=Ne[0],fe=Ne[1],Se=ne===x[M-1][0],qe=fe===x[M-1][1];if(!(Se&&qe))if(M>1){var ir=ne===x[M-2][0],vr=fe===x[M-2][1];Se&&(ne===ke||ne===ve)&&ir?vr?M--:x[M-1]=Ne:qe&&(fe===be||fe===W)&&vr?ir?M--:x[M-1]=Ne:x[M++]=Ne}else x[M++]=Ne}function Ae(Ne){x[M-1][0]!==Ne[0]&&x[M-1][1]!==Ne[1]&&ie([_e,xe]),ie(Ne),Ie=null,_e=xe=0}var Ce=tp.isArrayOrTypedArray(c);function cr(Ne){if(Ne&&f&&(Ne.i=A,Ne.d=r,Ne.trace=a,Ne.marker=Ce?c[Ne.i]:c,Ne.backoff=f),ce=Ne[0]/s,le=Ne[1]/u,X=Ne[0]ve?ve:0,ye=Ne[1]W?W:0,X||ye){if(!M)x[M++]=[X||Ne[0],ye||Ne[1]];else if(Ie){var ne=Je(Ie,Ne);ne.length>1&&(Ae(ne[0]),x[M++]=ne[1])}else ze=Je(x[M-1],Ne)[0],x[M++]=ze;var fe=x[M-1];X&&ye&&(fe[0]!==X||fe[1]!==ye)?(Ie&&(_e!==X&&xe!==ye?ie(_e&&xe?We(Ie,Ne):[_e||X,xe||ye]):_e&&xe&&ie([_e,xe])),ie([X,ye])):_e-X&&xe-ye&&ie([X||_e,ye||xe]),Ie=Ne,_e=X,xe=ye}else Ie&&Ae(Je(Ie,Ne)[0]),x[M++]=Ne}for(A=0;AQ(R,tr))break;L=R,I=O[0]*H[0]+O[1]*H[1],I>V?(V=I,D=R,z=!1):I=r.length||!R)break;cr(R),k=R}}Ie&&ie([_e||Ie[0],xe||Ie[1]]),_.push(x.slice(0,M))}var De=p.slice(p.length-1);if(f&&De!=="h"&&De!=="v"){for(var Le=!1,Ye=-1,Xe=[],Ge=0;Ge<_.length;Ge++)for(var Oe=0;Oe<_[Ge].length-1;Oe++){var $e=_[Ge][Oe],fr=_[Ge][Oe+1],lr=loe.applyBackoff(fr,$e);(lr[0]!==fr[0]||lr[1]!==fr[1])&&(Le=!0),Xe[Ye+1]||(Ye++,Xe[Ye]=[$e,[lr[0],lr[1]]])}return Le?Xe:_}return _}});var mE=B((R3e,pE)=>{"use strict";var dE={tonextx:1,tonexty:1,tonext:1};pE.exports=function(r,t,a){var n,i,l,o,s,u={},f=!1,c=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var Mi=kr(),soe=yr(),Nv=Pe(),df=Nv.ensureSingle,gE=Nv.identity,Pt=Br(),pf=_n(),uoe=hE(),foe=mE(),ap=P3().tester;xE.exports=function(r,t,a,n,i,l){var o,s,u=!i,f=!!i&&i.duration>0,c=foe(r,t,a);if(o=n.selectAll("g.trace").data(c,function(d){return d[0].trace.uid}),o.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),o.order(),coe(r,o,t),f){l&&(s=l());var h=Mi.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){n.selectAll("g.trace").each(function(d,p){yE(r,p,t,d,c,this,i)})})}else o.each(function(d,p){yE(r,p,t,d,c,this,i)});u&&o.exit().remove(),n.selectAll("path:not([d])").remove()};function coe(e,r,t){r.each(function(a){var n=df(Mi.select(this),"g","fills");Pt.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,l=[];i._ownfill&&l.push("_ownFill"),i._nexttrace&&l.push("_nextFill");var o=n.selectAll("g").data(l,gE);o.enter().append("g"),o.exit().each(function(s){i[s]=null}).remove(),o.order().each(function(s){i[s]=df(Mi.select(this),"path","js-fill")})})}function yE(e,r,t,a,n,i,l){var o=e._context.staticPlot,s;voe(e,r,t,a,n);var u=!!l&&l.duration>0;function f(Ee){return u?Ee.transition():Ee}var c=t.xaxis,h=t.yaxis,d=a[0].trace,p=d.line,y=Mi.select(i),m=df(y,"g","errorbars"),_=df(y,"g","lines"),b=df(y,"g","points"),T=df(y,"g","text");if(soe.getComponentMethod("errorbars","plot")(e,m,t,l),d.visible!==!0)return;f(y).style("opacity",d.opacity);var x,M,A=d.fill.charAt(d.fill.length-1);A!=="x"&&A!=="y"&&(A="");var k,L;A==="y"?(k=1,L=h.c2p(0,!0)):A==="x"&&(k=0,L=c.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=y;var D="",E=[],R=d._prevtrace,z=null,H=null;R&&(D=R._prevRevpath||"",M=R._nextFill,E=R._ownPolygons,z=R._fillsegments,H=R._fillElement);var O,U,V="",Y="",I,G,Z,K,re,se,ce=[];d._polygons=[];var le=[],Q=[],ge=Nv.noop;if(x=d._ownFill,pf.hasLines(d)||d.fill!=="none"){M&&M.datum(a),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(I=Pt.steps(p.shape),G=Pt.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?I=G=function(Ee){var Je=Ee[Ee.length-1];return Ee.length>1&&Ee[0][0]===Je[0]&&Ee[0][1]===Je[1]?Pt.smoothclosed(Ee.slice(1),p.smoothing):Pt.smoothopen(Ee,p.smoothing)}:I=G=function(Ee){return"M"+Ee.join("L")},Z=function(Ee){return G(Ee.reverse())},Q=uoe(a,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),le=new Array(Q.length);var ue=0;for(s=0;s=o[0]&&y.x<=o[1]&&y.y>=s[0]&&y.y<=s[1]}),h=Math.ceil(c.length/f),d=0;n.forEach(function(y,m){var _=y[0].trace;pf.hasMarkers(_)&&_.marker.maxdisplayed>0&&m{"use strict";_E.exports={container:"marker",min:"cmin",max:"cmax"}});var TE=B((F3e,wE)=>{"use strict";var ip=$r();wE.exports=function(r,t,a){var n={},i={_fullLayout:a},l=ip.getFromTrace(i,t,"x"),o=ip.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=ip.tickText(l,l.c2l(s),!0).text,n.yLabel=ip.tickText(o,o.c2l(u),!0).text,n}});var zx=B((I3e,ME)=>{"use strict";var Ex=kr(),mf=Br(),hoe=yr();function doe(e){var r=Ex.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=Ex.select(this),n=t.trace||t[0].trace;Px(a,n,e)}),r.selectAll("g.text").each(function(t){var a=Ex.select(this),n=t.trace||t[0].trace;Rx(a,n,e)}),r.selectAll("g.trace path.js-line").call(mf.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(mf.fillGroupStyle,e,!1),hoe.getComponentMethod("errorbars","style")(r)}function Px(e,r,t){mf.pointStyle(e.selectAll("path.point"),r,t)}function Rx(e,r,t){mf.textPointStyle(e.selectAll("text"),r,t)}function poe(e,r,t){var a=r[0].trace;a.selectedpoints?(mf.selectedPointStyle(t.selectAll("path.point"),a),mf.selectedTextStyle(t.selectAll("text"),a)):(Px(t,a,e),Rx(t,a,e))}ME.exports={style:doe,stylePoints:Px,styleText:Rx,styleOnSelect:poe}});var kE=B((H3e,AE)=>{"use strict";var yf=xr(),moe=_n();AE.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&yf.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,l=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&yf.opacity(i)?i:l&&yf.opacity(l)&&(t.mlw||((r.marker||{}).line||{}).width)?l:"",n?yf.opacity(n)<.3?yf.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&yf.opacity(a)&&moe.hasLines(r)&&r.line.width?a:r.fillcolor)}});var LE=B((O3e,CE)=>{"use strict";var lp=Pe(),qE=gi(),yoe=yr(),goe=kE(),Nx=xr(),xoe=lp.fillText;CE.exports=function(r,t,a,n){var i=r.cd,l=i[0].trace,o=r.xa,s=r.ya,u=o.c2p(t),f=s.c2p(a),c=[u,f],h=l.hoveron||"",d=l.mode.indexOf("markers")!==-1?3:.5,p=!!l.xperiodalignment,y=!!l.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(Y){if(p){var I=o.c2p(Y.xStart),G=o.c2p(Y.xEnd);return u>=Math.min(I,G)&&u<=Math.max(I,G)?0:1/0}var Z=Math.max(3,Y.mrc||0),K=1-1/Z,re=Math.abs(o.c2p(Y.x)-u);return re=Math.min(I,G)&&f<=Math.max(I,G)?0:1/0}var Z=Math.max(3,Y.mrc||0),K=1-1/Z,re=Math.abs(s.c2p(Y.y)-f);return rece!=W>=ce&&(ke=ge[Q-1][0],ve=ge[Q][0],W-be&&(ue=ke+(ve-ke)*(ce-be)/(W-be),Z=Math.min(Z,ue),K=Math.max(K,ue)));return Z=Math.max(Z,0),K=Math.min(K,o._length),{x0:Z,x1:K,y0:ce,y1:ce}}if(h.indexOf("fills")!==-1&&l._fillElement){var O=z(l._fillElement)&&!z(l._fillExclusionElement);if(O){var U=H(l._polygons);U===null&&(U={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var V=Nx.defaultLine;return Nx.opacity(l.fillcolor)?V=l.fillcolor:Nx.opacity((l.line||{}).color)&&(V=l.line.color),lp.extendFlat(r,{distance:r.maxHoverDistance,x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1,color:V,hovertemplate:!1}),delete r.index,l.text&&!lp.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}}});var EE=B((B3e,DE)=>{"use strict";var SE=_n();DE.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=[],o=a[0].trace,s,u,f,c,h=!SE.hasMarkers(o)&&!SE.hasText(o);if(h)return[];if(t===!1)for(s=0;s{"use strict";PE.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var IE=B((G3e,FE)=>{"use strict";var Fv=yr().traceIs,Fx=u2();FE.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(boe(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function boe(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=_oe(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var l=a+"calendar",o=i[l],s={noMultiCategory:!Fv(i,"cartesian")||Fv(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,NE(i,a)){var u=zE(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(NE(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function zE(e){return{v:"x",h:"y"}[e.orientation||"v"]}function NE(e,r){var t=zE(e),a=Fv(e,"box-violin"),n=Fv(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var OE=B((U3e,HE)=>{"use strict";var woe=gn().isTypedArraySpec;function Toe(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,l;if(r.axData)n=r.axData;else for(n=[],i=0;i0||woe(i),o;l&&(o="array");var s=a("categoryorder",o),u;s==="array"&&(u=a("categoryarray")),!l&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=Toe(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var GE=B((V3e,YE)=>{"use strict";var BE=Rn().mix,Moe=zn(),Aoe=Pe();YE.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function l(k,L){return Aoe.coerce2(r,t,n.attributes,k,L)}var o=l("linecolor",i),s=l("linewidth"),u=a("showline",n.showLine||!!o||!!s);u||(delete t.linecolor,delete t.linewidth);var f=BE(i,n.bgColor,n.blend||Moe.lightFraction).toRgbString(),c=l("gridcolor",f),h=l("gridwidth"),d=l("griddash"),p=a("showgrid",n.showGrid||!!c||!!h||!!d);if(p||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var y=BE(t.gridcolor,n.bgColor,67).toRgbString(),m=l("minor.gridcolor",y),_=l("minor.gridwidth",t.gridwidth||1),b=l("minor.griddash",t.griddash||"solid"),T=a("minor.showgrid",!!m||!!_||!!b);T||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var x=l("zerolinecolor",i),M=l("zerolinewidth"),A=a("zeroline",n.showGrid||!!x||!!M);A||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var sp=B((W3e,JE)=>{"use strict";var UE=zr(),koe=yr(),Iv=Pe(),qoe=ot(),Coe=On(),Ix=bn(),VE=Kh(),WE=Qh(),Loe=ed(),Soe=rd(),Doe=OE(),Eoe=GE(),Poe=L2(),XE=md(),op=wa().WEEKDAY_PATTERN,Roe=wa().HOUR_PATTERN;JE.exports=function(r,t,a,n,i){var l=n.letter,o=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},c=t.type||f.type||"-",h;if(c==="date"){var d=koe.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(h=a("ticklabelmode"))}!n.noTicklabelindex&&(c==="date"||c==="linear")&&a("ticklabelindex");var p="";(!n.noTicklabelposition||c==="multicategory")&&(p=Iv.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:l==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),XE(t,i),Poe(r,t,a,n),Doe(r,t,a,n),c!=="category"&&!n.noHover&&a("hoverformat");var y=a("color"),m=y!==Ix.color.dflt?y:o.color,_=s.label||i._dfltTitle[l];if(Soe(r,t,a,c,n),!u)return t;a("title.text",_),Iv.coerceFont(a,"title.font",o,{overrideDflt:{size:Iv.bigFont(o.size),color:m}}),VE(r,t,a,c);var b=n.hasMinor;if(b&&(qoe.newContainer(t,"minor"),VE(r,t,a,c,{isMinor:!0})),Loe(r,t,a,c,n),WE(r,t,a,n),b){var T=n.isMinor;n.isMinor=!0,WE(r,t,a,n),n.isMinor=T}Eoe(r,t,a,{dfltColor:y,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:b,attributes:Ix}),b&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var x=c==="multicategory";if(!n.noTickson&&(c==="category"||x)&&(t.ticks||t.showgrid)){var M;x&&(M="boundaries");var A=a("tickson",M);A==="boundaries"&&delete t.ticklabelposition}if(x){var k=a("showdividers");k&&(a("dividercolor"),a("dividerwidth"))}if(c==="date")if(Coe(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:zoe}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var L=0;L=2){var l="",o,s;if(i.length===2){for(o=0;o<2;o++)if(s=ZE(i[o]),s){l=op;break}}var u=a("pattern",l);if(u===op)for(o=0;o<2;o++)s=ZE(i[o]),s&&(r.bounds[o]=i[o]=s-1);if(u)for(o=0;o<2;o++)switch(s=i[o],u){case op:if(!UE(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[o]=i[o]=s;break;case Roe:if(!UE(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[o]=i[o]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var Foe=zr(),up=Pe();$E.exports=function(r,t,a,n){var i=n.counterAxes||[],l=n.overlayableAxes||[],o=n.letter,s=n.grid,u=n.overlayingDomain,f,c,h,d,p,y;s&&(c=s._domains[o][s._axisMap[t._id]],f=s._anchors[t._id],c&&(h=s[o+"side"].split(" ")[0],d=s.domain[o][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(Foe(r.position)?"free":i[0]||"free"),h=h||(o==="x"?"bottom":"left"),d=d||0,p=0,y=!1;var m=up.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),_=up.coerce(r,t,{side:{valType:"enumerated",values:o==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(o==="y"){var b=a("autoshift");b&&(d=_==="left"?u[0]:u[1],y=t.automargin?t.automargin:!0,p=_==="left"?-3:3),a("shift",p)}a("position",d)}a("automargin",y);var T=!1;if(l.length&&(T=up.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(l),dflt:!1}},"overlaying")),!T){var x=a("domain",c);x[0]>x[1]-1/4096&&(t.domain=c),up.noneOrAll(r.domain,t.domain,c),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var iP=B((Z3e,nP)=>{"use strict";var Ts=Pe(),KE=xr(),Ioe=Hi().isUnifiedHover,Hoe=t3(),QE=ot(),Ooe=xu(),jE=bn(),Boe=IE(),eP=sp(),Yoe=ys(),rP=fp(),Ox=Jt(),$i=Ox.id2name,tP=Ox.name2id,Goe=wa().AX_ID_PATTERN,aP=yr(),cp=aP.traceIs,Hx=aP.getComponentMethod;function vp(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}nP.exports=function(r,t,a){var n=t.autotypenumbers,i={},l={},o={},s={},u={},f={},c={},h={},d={},p={},y,m;for(y=0;y{"use strict";var Uoe=kr(),lP=yr(),hp=Pe(),kn=Br(),dp=$r();oP.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){dp.redrawComponents(r);return}function l(m){var _=m.xaxis,b=m.yaxis;i._defs.select("#"+m.clipId+"> rect").call(kn.setTranslate,0,0).call(kn.setScale,1,1),m.plot.call(kn.setTranslate,_._offset,b._offset).call(kn.setScale,1,1);var T=m.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(kn.setPointGroupScale,1,1),T.selectAll(".textpoint").call(kn.setTextPointsScale,1,1),T.call(kn.hideOutsideRangePoints,m)}function o(m,_){var b=m.plotinfo,T=b.xaxis,x=b.yaxis,M=T._length,A=x._length,k=!!m.xr1,L=!!m.yr1,D=[];if(k){var E=hp.simpleMap(m.xr0,T.r2l),R=hp.simpleMap(m.xr1,T.r2l),z=E[1]-E[0],H=R[1]-R[0];D[0]=(E[0]*(1-_)+_*R[0]-E[0])/(E[1]-E[0])*M,D[2]=M*(1-_+_*H/z),T.range[0]=T.l2r(E[0]*(1-_)+_*R[0]),T.range[1]=T.l2r(E[1]*(1-_)+_*R[1])}else D[0]=0,D[2]=M;if(L){var O=hp.simpleMap(m.yr0,x.r2l),U=hp.simpleMap(m.yr1,x.r2l),V=O[1]-O[0],Y=U[1]-U[0];D[1]=(O[1]*(1-_)+_*U[1]-O[1])/(O[0]-O[1])*A,D[3]=A*(1-_+_*Y/V),x.range[0]=T.l2r(O[0]*(1-_)+_*U[0]),x.range[1]=x.l2r(O[1]*(1-_)+_*U[1])}else D[1]=0,D[3]=A;dp.drawOne(r,T,{skipTitle:!0}),dp.drawOne(r,x,{skipTitle:!0}),dp.redrawComponents(r,[T._id,x._id]);var I=k?M/D[2]:1,G=L?A/D[3]:1,Z=k?D[0]:0,K=L?D[1]:0,re=k?D[0]/D[2]*M:0,se=L?D[1]/D[3]*A:0,ce=T._offset-re,le=x._offset-se;b.clipRect.call(kn.setTranslate,Z,K).call(kn.setScale,1/I,1/G),b.plot.call(kn.setTranslate,ce,le).call(kn.setScale,I,G),kn.setPointGroupScale(b.zoomScalePts,1/I,1/G),kn.setTextPointsScale(b.zoomScaleTxt,1/I,1/G)}var s;n&&(s=n());function u(){for(var m={},_=0;_a.duration?(u(),d=window.cancelAnimationFrame(y)):d=window.requestAnimationFrame(y)}return c=Date.now(),d=window.requestAnimationFrame(y),Promise.resolve()}});var gl=B(Pa=>{"use strict";var mp=kr(),uP=yr(),Ms=Pe(),Voe=St(),Woe=Br(),fP=bg().getModuleCalcData,io=Jt(),Ai=wa(),Xoe=Qo(),jr=Ms.ensureSingle;function pp(e,r,t){return Ms.ensureSingle(e,r,t,function(a){a.datum(t)})}var As=Ai.zindexSeparator;Pa.name="cartesian";Pa.attr=["xaxis","yaxis"];Pa.idRoot=["x","y"];Pa.idRegex=Ai.idRegex;Pa.attrRegex=Ai.attrRegex;Pa.attributes=RE();Pa.layoutAttributes=bn();Pa.supplyLayoutDefaults=iP();Pa.transitionAxes=sP();Pa.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,l=i,o={},s={},u,f,c;for(u=0;u0){var d=h.id;if(d.indexOf(As)!==-1)continue;d+=As+(u+1),h=Ms.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],y,m=0;m1&&(M+=As+x),T.push(o+M),l=0;l1,c=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=jr(a,"path","xlines-above"),r.ylines=jr(a,"path","ylines-above"),r.xaxislayer=jr(a,"g","xaxislayer-above"),r.yaxislayer=jr(a,"g","yaxislayer-above");else{if(!l){var h=jr(a,"g","layer-subplot");r.shapelayer=jr(h,"g","shapelayer"),r.imagelayer=jr(h,"g","imagelayer"),c&&f?(r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer):(r.minorGridlayer=jr(a,"g","minor-gridlayer"),r.gridlayer=jr(a,"g","gridlayer"),r.zerolinelayer=jr(a,"g","zerolinelayer"));var d=jr(a,"g","layer-between");r.shapelayerBetween=jr(d,"g","shapelayer"),r.imagelayerBetween=jr(d,"g","imagelayer"),jr(a,"path","xlines-below"),jr(a,"path","ylines-below"),r.overlinesBelow=jr(a,"g","overlines-below"),jr(a,"g","xaxislayer-below"),jr(a,"g","yaxislayer-below"),r.overaxesBelow=jr(a,"g","overaxes-below")}r.overplot=jr(a,"g","overplot"),r.plot=jr(r.overplot,"g",n),l||(r.xlines=jr(a,"path","xlines-above"),r.ylines=jr(a,"path","ylines-above"),r.overlinesAbove=jr(a,"g","overlines-above"),jr(a,"g","xaxislayer-above"),jr(a,"g","yaxislayer-above"),r.overaxesAbove=jr(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+o),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+o),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var p=c.plotgroup,y=n+"-x",m=n+"-y";r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer,jr(c.overlinesBelow,"path",y),jr(c.overlinesBelow,"path",m),jr(c.overaxesBelow,"g",y),jr(c.overaxesBelow,"g",m),r.plot=jr(c.overplot,"g",n),jr(c.overlinesAbove,"path",y),jr(c.overlinesAbove,"path",m),jr(c.overaxesAbove,"g",y),jr(c.overaxesAbove,"g",m),r.xlines=p.select(".overlines-"+o).select("."+y),r.ylines=p.select(".overlines-"+s).select("."+m),r.xaxislayer=p.select(".overaxes-"+o).select("."+y),r.yaxislayer=p.select(".overaxes-"+s).select("."+m)}l||(u||(pp(r.minorGridlayer,"g",r.xaxis._id),pp(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(_){return _[0]}).sort(io.idSort),pp(r.gridlayer,"g",r.xaxis._id),pp(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(_){return _[0]}).sort(io.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function hP(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=mp.select(this);f.remove(),dP(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],l=0;l{"use strict";var yp=_n();pP.exports={hasLines:yp.hasLines,hasMarkers:yp.hasMarkers,hasText:yp.hasText,isBubble:yp.isBubble,attributes:bi(),layoutAttributes:Bh(),supplyDefaults:SD(),crossTraceDefaults:PD(),supplyLayoutDefaults:zD(),calc:Ax().calc,crossTraceCalc:lE(),arraysToCalcdata:bx(),plot:bE(),colorbar:np(),formatLabels:TE(),style:zx().style,styleOnSelect:zx().styleOnSelect,hoverPoints:LE(),selectPoints:EE(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:gl(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var xP=B((Q3e,gP)=>{"use strict";var Joe=kr(),$oe=xr(),yP=V3(),Bx=Pe(),Koe=Bx.strScale,Qoe=Bx.strRotate,joe=Bx.strTranslate;gP.exports=function(r,t,a){var n=r.node(),i=yP[a.arrowhead||0],l=yP[a.startarrowhead||0],o=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,c=i.backoff*o+a.standoff,h=l.backoff*s+a.startstandoff,d,p,y,m;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},p={x:+r.attr("x2"),y:+r.attr("y2")};var _=d.x-p.x,b=d.y-p.y;if(y=Math.atan2(b,_),m=y+Math.PI,c&&h&&c+h>Math.sqrt(_*_+b*b)){O();return}if(c){if(c*c>_*_+b*b){O();return}var T=c*Math.cos(y),x=c*Math.sin(y);p.x+=T,p.y+=x,r.attr({x2:p.x,y2:p.y})}if(h){if(h*h>_*_+b*b){O();return}var M=h*Math.cos(y),A=h*Math.sin(y);d.x-=M,d.y-=A,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var k=n.getTotalLength(),L="";if(k{"use strict";var bP=kr(),Yx=yr(),ese=St(),oo=Pe(),Gx=oo.strTranslate,Ov=$r(),ks=xr(),xl=Br(),_P=gi(),Ux=va(),Vx=Kl(),Hv=mi(),rse=ot().arrayEditor,tse=xP();MP.exports={draw:ase,drawOne:wP,drawRaw:TP};function ase(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?qe="right":qe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[qe]}for(var be=!1,W=["x","y"],te=0;te1)&&(_e===ye?(tr=xe.r2fraction(r["a"+X]),(tr<0||tr>1)&&(be=!0)):be=!0),Je=xe._offset+xe.r2p(r[X]),Ae=.5}else{var De=cr==="domain";X==="x"?(ie=r[X],Je=De?xe._offset+xe._length*ie:Je=o.l+o.w*ie):(ie=1-r[X],Je=De?xe._offset+xe._length*ie:Je=o.t+o.h*ie),Ae=r.showarrow?.5:ie}if(r.showarrow){Ee.head=Je;var Le=r["a"+X];if(Ce=ze*ve(.5,r.xanchor)-Re*ve(.5,r.yanchor),_e===ye){var Ye=Ov.getRefType(_e);Ye==="domain"?(X==="y"&&(Le=1-Le),Ee.tail=xe._offset+xe._length*Le):Ye==="paper"?X==="y"?(Le=1-Le,Ee.tail=o.t+o.h*Le):Ee.tail=o.l+o.w*Le:Ee.tail=xe._offset+xe.r2p(Le),We=Ce}else Ee.tail=Je+Le,We=Ce+Le;Ee.text=Ee.tail+Ce;var Xe=l[X==="x"?"width":"height"];if(ye==="paper"&&(Ee.head=oo.constrain(Ee.head,1,Xe-1)),_e==="pixel"){var Ge=-Math.max(Ee.tail-3,Ee.text),Oe=Math.min(Ee.tail+3,Ee.text)-Xe;Ge>0?(Ee.tail+=Ge,Ee.text+=Ge):Oe>0&&(Ee.tail-=Oe,Ee.text-=Oe)}Ee.tail+=Fe,Ee.head+=Fe}else Ce=He*ve(Ae,Be),We=Ce,Ee.text=Je+Ce;Ee.text+=Fe,Ce+=Fe,We+=Fe,r["_"+X+"padplus"]=He/2+We,r["_"+X+"padminus"]=He/2-We,r["_"+X+"size"]=He,r["_"+X+"shift"]=Ce}if(be){k.remove();return}var $e=0,fr=0;if(r.align!=="left"&&($e=(Q-ce)*(r.align==="center"?.5:1)),r.valign!=="top"&&(fr=(ge-le)*(r.valign==="middle"?.5:1)),re)K.select("svg").attr({x:E+$e-1,y:E+fr}).call(xl.setClipUrl,z?y:null,e);else{var lr=E+fr-se.top,Ne=E+$e-se.left;V.call(Ux.positionText,Ne,lr).call(xl.setClipUrl,z?y:null,e)}H.select("rect").call(xl.setRect,E,E,Q,ge),R.call(xl.setRect,L/2,L/2,ue-L,ke-L),k.call(xl.setTranslate,Math.round(m.x.text-ue/2),Math.round(m.y.text-ke/2)),T.attr({transform:"rotate("+_+","+m.x.text+","+m.y.text+")"});var ne=function(Se,qe){b.selectAll(".annotation-arrow-g").remove();var ir=m.x.head,vr=m.y.head,sr=m.x.tail+Se,Ar=m.y.tail+qe,Ur=m.x.text+Se,et=m.y.text+qe,Wr=oo.rotationXYMatrix(_,Ur,et),Nt=oo.apply2DTransform(Wr),oa=oo.apply2DTransform2(Wr),Na=+R.attr("width"),sa=+R.attr("height"),Sn=Ur-.5*Na,Za=Sn+Na,ua=et-.5*sa,Ja=ua+sa,gr=[[Sn,ua,Sn,Ja],[Sn,Ja,Za,Ja],[Za,Ja,Za,ua],[Za,ua,Sn,ua]].map(oa);if(!gr.reduce(function(it,ma){return it^!!oo.segmentsIntersect(ir,vr,ir+1e6,vr+1e6,ma[0],ma[1],ma[2],ma[3])},!1)){gr.forEach(function(it){var ma=oo.segmentsIntersect(sr,Ar,ir,vr,it[0],it[1],it[2],it[3]);ma&&(sr=ma.x,Ar=ma.y)});var ct=r.arrowwidth,Xr=r.arrowcolor,bt=r.arrowside,Lt=b.append("g").style({opacity:ks.opacity(Xr)}).classed("annotation-arrow-g",!0),vt=Lt.append("path").attr("d","M"+sr+","+Ar+"L"+ir+","+vr).style("stroke-width",ct+"px").call(ks.stroke,ks.rgb(Xr));if(tse(vt,bt,r),s.annotationPosition&&vt.node().parentNode&&!a){var _t=ir,Fa=vr;if(r.standoff){var fa=Math.sqrt(Math.pow(ir-sr,2)+Math.pow(vr-Ar,2));_t+=r.standoff*(sr-ir)/fa,Fa+=r.standoff*(Ar-vr)/fa}var ai=Lt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(sr-_t)+","+(Ar-Fa),transform:Gx(_t,Fa)}).style("stroke-width",ct+6+"px").call(ks.stroke,"rgba(0,0,0,0)").call(ks.fill,"rgba(0,0,0,0)"),ni,Qt;Hv.init({element:ai.node(),gd:e,prepFn:function(){var it=xl.getTranslate(k);ni=it.x,Qt=it.y,n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(it,ma){var Do=Nt(ni,Qt),Eo=Do[0]+it,Sl=Do[1]+ma;k.call(xl.setTranslate,Eo,Sl),d("x",lo(n,it,"x",o,r)),d("y",lo(i,ma,"y",o,r)),r.axref===r.xref&&d("ax",lo(n,it,"ax",o,r)),r.ayref===r.yref&&d("ay",lo(i,ma,"ay",o,r)),Lt.attr("transform",Gx(it,ma)),T.attr({transform:"rotate("+_+","+Eo+","+Sl+")"})},doneFn:function(){Yx.call("_guiRelayout",e,p());var it=document.querySelector(".js-notes-box-panel");it&&it.redraw(it.selectedObj)}})}}};if(r.showarrow&&ne(0,0),x){var fe;Hv.init({element:k.node(),gd:e,prepFn:function(){fe=T.attr("transform")},moveFn:function(Se,qe){var ir="pointer";if(r.showarrow)r.axref===r.xref?d("ax",lo(n,Se,"ax",o,r)):d("ax",r.ax+Se),r.ayref===r.yref?d("ay",lo(i,qe,"ay",o.w,r)):d("ay",r.ay+qe),ne(Se,qe);else{if(a)return;var vr,sr;if(n)vr=lo(n,Se,"x",o,r);else{var Ar=r._xsize/o.w,Ur=r.x+(r._xshift-r.xshift)/o.w-Ar/2;vr=Hv.align(Ur+Se/o.w,Ar,0,1,r.xanchor)}if(i)sr=lo(i,qe,"y",o,r);else{var et=r._ysize/o.h,Wr=r.y-(r._yshift+r.yshift)/o.h-et/2;sr=Hv.align(Wr-qe/o.h,et,0,1,r.yanchor)}d("x",vr),d("y",sr),(!n||!i)&&(ir=Hv.getCursor(n?.5:vr,i?.5:sr,r.xanchor,r.yanchor))}T.attr({transform:Gx(Se,qe)+fe}),Vx(k,ir)},clickFn:function(Se,qe){r.captureevents&&e.emit("plotly_clickannotation",A(qe))},doneFn:function(){Vx(k),Yx.call("_guiRelayout",e,p());var Se=document.querySelector(".js-notes-box-panel");Se&&Se.redraw(Se.selectedObj)}})}}s.annotationText?V.call(Ux.makeEditable,{delegate:k,gd:e}).call(Y).on("edit",function(G){r.text=G,this.call(Y),d("text",G),n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),Yx.call("_guiRelayout",e,p())}):V.call(Y)}});var SP=B((exe,LP)=>{"use strict";var AP=Pe(),nse=yr(),kP=ot().arrayEditor;LP.exports={hasClickToShow:ise,onClick:lse};function ise(e,r){var t=CP(e,r);return t.on.length>0||t.explicitOff.length>0}function lse(e,r){var t=CP(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},l=e._fullLayout.annotations,o,s;if(a.length||n.length){for(o=0;o{"use strict";var Wx=Pe(),gf=xr();DP.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),l=n("bordercolor"),o=gf.opacity(l);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),Wx.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var c=n("arrowside"),h,d;c.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),c.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",o?t.bordercolor:gf.defaultLine),n("arrowwidth",(o&&s||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),y=a.hoverlabel||{};if(p){var m=n("hoverlabel.bgcolor",y.bgcolor||(gf.opacity(i)?gf.rgb(i):gf.defaultLine)),_=n("hoverlabel.bordercolor",y.bordercolor||gf.contrast(m)),b=Wx.extendFlat({},y.font);b.color||(b.color=_),Wx.coerceFont(n,"hoverlabel.font",b)}n("captureevents",!!p)}});var PP=B((txe,EP)=>{"use strict";var Zx=Pe(),qs=$r(),ose=On(),sse=Xx(),use=lf();EP.exports=function(r,t){ose(r,t,{name:"annotations",handleItemDefaults:fse})};function fse(e,r,t){function a(T,x){return Zx.coerce(e,r,use,T,x)}var n=a("visible"),i=a("clicktoshow");if(n||i){sse(e,r,t,a);for(var l=r.showarrow,o=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var c=o[f],h=qs.coerceRef(e,r,u,c,"","paper");if(h!=="paper"){var d=qs.getFromId(u,h);d._annIndices.push(r._index)}if(qs.coercePosition(r,u,a,h,c,.5),l){var p="a"+c,y=qs.coerceRef(e,r,u,p,"pixel",["pixel","paper"]);y!=="pixel"&&y!==h&&(y=r[p]="pixel");var m=y==="pixel"?s[f]:.4;qs.coercePosition(r,u,a,y,p,m)}a(c+"anchor"),a(c+"shift")}if(Zx.noneOrAll(e,r,["x","y"]),l&&Zx.noneOrAll(e,r,["ax","ay"]),i){var _=a("xclick"),b=a("yclick");r._xclick=_===void 0?r.x:qs.cleanPosition(_,u,r.xref),r._yclick=b===void 0?r.y:qs.cleanPosition(b,u,r.yref)}}}});var NP=B((axe,zP)=>{"use strict";var Jx=Pe(),Cs=$r(),cse=gp().draw;zP.exports=function(r){var t=r._fullLayout,a=Jx.filterVisible(t.annotations);if(a.length&&r._fullData.length)return Jx.syncOrAsync([cse,vse],r)};function vse(e){var r=e._fullLayout;Jx.filterVisible(r.annotations).forEach(function(t){var a=Cs.getFromId(e,t.xref),n=Cs.getFromId(e,t.yref),i=Cs.getRefType(t.xref),l=Cs.getRefType(t.yref);t._extremes={},i==="range"&&RP(t,a),l==="range"&&RP(t,n)})}function RP(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],l=e[a+"ref"],o=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,y=p+f,m=p-f,_;if(o===l){var b=Cs.findExtremes(r,[r.r2c(n)],{ppadplus:h,ppadminus:d}),T=Cs.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,y),ppadminus:Math.max(u,m)});_={min:[b.min[0],T.min[0]],max:[b.max[0],T.max[0]]}}else y=i?y+i:y,m=i?m-i:m,_=Cs.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,h,y),ppadminus:Math.max(u,d,m)});e._extremes[t]=_}});var IP=B((nxe,FP)=>{"use strict";var hse=zr(),dse=sh();FP.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(!(i||l))return;var o=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function c(d){var p=u[d],y=null;i?y=dse(p,t.range):y=Math.pow(10,p),hse(y)||(y=null),n(f+d,y)}for(var h=0;h{"use strict";var $x=gp(),HP=SP();OP.exports={moduleType:"component",name:"annotations",layoutAttributes:lf(),supplyLayoutDefaults:PP(),includeBasePlot:xv()("annotations"),calcAutorange:NP(),draw:$x.draw,drawOne:$x.drawOne,drawRaw:$x.drawRaw,hasClickToShow:HP.hasClickToShow,onClick:HP.onClick,convertCoords:IP()}});var xp=B((lxe,YP)=>{"use strict";var dt=lf(),pse=ui().overrideAll,mse=ot().templatedArray;YP.exports=pse(mse("annotation",{visible:dt.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:dt.xanchor,xshift:dt.xshift,yanchor:dt.yanchor,yshift:dt.yshift,text:dt.text,textangle:dt.textangle,font:dt.font,width:dt.width,height:dt.height,opacity:dt.opacity,align:dt.align,valign:dt.valign,bgcolor:dt.bgcolor,bordercolor:dt.bordercolor,borderpad:dt.borderpad,borderwidth:dt.borderwidth,showarrow:dt.showarrow,arrowcolor:dt.arrowcolor,arrowhead:dt.arrowhead,startarrowhead:dt.startarrowhead,arrowside:dt.arrowside,arrowsize:dt.arrowsize,startarrowsize:dt.startarrowsize,arrowwidth:dt.arrowwidth,standoff:dt.standoff,startstandoff:dt.startstandoff,hovertext:dt.hovertext,hoverlabel:dt.hoverlabel,captureevents:dt.captureevents}),"calc","from-root")});var UP=B((oxe,GP)=>{"use strict";var Kx=Pe(),yse=$r(),gse=On(),xse=Xx(),bse=xp();GP.exports=function(r,t,a){gse(r,t,{name:"annotations",handleItemDefaults:_se,fullLayout:a.fullLayout})};function _se(e,r,t,a){function n(o,s){return Kx.coerce(e,r,bse,o,s)}function i(o){var s=o+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],yse.coercePosition(r,u,n,o,o,.5)}var l=n("visible");l&&(xse(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),Kx.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),Kx.noneOrAll(e,r,["ax","ay"])))}});var ZP=B((sxe,XP)=>{"use strict";var VP=Pe(),WP=$r();XP.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function Qx(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function Tse(e,r){var t=Qx(e.projection,Qx(e.view,Qx(e.model,[r[0],r[1],r[2],1])));return t}JP.exports=Tse});var QP=B((fxe,KP)=>{"use strict";var Mse=gp().drawRaw,Ase=$P(),kse=["x","y","z"];KP.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){o=!0;break}}o?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(l._pdata=Ase(r.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),Mse(r.graphDiv,l,i,r.id,l._xa,l._ya))}}});var rR=B((cxe,eR)=>{"use strict";var qse=yr(),jP=Pe();eR.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:xp()}}},layoutAttributes:xp(),handleDefaults:UP(),includeBasePlot:Cse,convert:ZP(),draw:QP()};function Cse(e,r){var t=qse.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var tR=lf(),aR=jt(),nR=bi().line,Lse=fi().dash,ki=mt().extendFlat,Sse=ot().templatedArray,vxe=gv(),xf=tn(),Dse=_a().shapeTexttemplateAttrs,Ese=bh();iR.exports=Sse("shape",{visible:ki({},xf.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:ki({},xf.legend,{editType:"calc+arraydraw"}),legendgroup:ki({},xf.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:ki({},xf.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:aR({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:ki({},xf.legendrank,{editType:"calc+arraydraw"}),legendwidth:ki({},xf.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:ki({},tR.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:ki({},tR.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:ki({},nR.color,{editType:"arraydraw"}),width:ki({},nR.width,{editType:"calc+arraydraw"}),dash:ki({},Lse,{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:Dse({},{keys:Object.keys(Ese)}),font:aR({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 sR=B((dxe,oR)=>{"use strict";var Bv=Pe(),bf=$r(),Pse=On(),Rse=jx(),lR=eo();oR.exports=function(r,t){Pse(r,t,{name:"shapes",handleItemDefaults:Nse})};function zse(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Nse(e,r,t){function a(G,Z){return Bv.coerce(e,r,Rse,G,Z)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),Bv.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),o=l?"path":"rect",s=a("type",o),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),h=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var y=d[p],m=y+"anchor",_=y==="x"?c:h,b={_fullLayout:t},T,x,M,A=bf.coerceRef(e,r,b,y,void 0,"paper"),k=bf.getRefType(A);if(k==="range"?(T=bf.getFromId(b,A),T._shapeIndices.push(r._index),M=lR.rangeToShapePosition(T),x=lR.shapePositionToRange(T),(T.type==="category"||T.type==="multicategory")&&(a(y+"0shift"),a(y+"1shift"))):x=M=Bv.identity,u){var L=.25,D=.75,E=y+"0",R=y+"1",z=e[E],H=e[R];e[E]=x(e[E],!0),e[R]=x(e[R],!0),_==="pixel"?(a(E,0),a(R,10)):(bf.coercePosition(r,b,a,A,E,L),bf.coercePosition(r,b,a,A,R,D)),r[E]=M(r[E]),r[R]=M(r[R]),e[E]=z,e[R]=H}if(_==="pixel"){var O=e[m];e[m]=x(e[m],!0),bf.coercePosition(r,b,a,A,m,.25),r[m]=M(r[m]),e[m]=O}}u&&Bv.noneOrAll(e,r,["x0","x1","y0","y1"]);var U=s==="line",V,Y;if(u&&(V=a("label.texttemplate")),V||(Y=a("label.text")),Y||V){a("label.textangle");var I=a("label.textposition",U?"middle":"middle center");a("label.xanchor"),a("label.yanchor",zse(U,I)),a("label.padding"),Bv.coerceFont(a,"label.font",t.font)}}}});var cR=B((pxe,fR)=>{"use strict";var Fse=xr(),uR=Pe();function Ise(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}fR.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),uR.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Fse.contrast(i)),a("newshape.line.dash")}var l=r.dragmode==="drawline",o=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(o||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",l?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Ise(l,u)),a("newshape.label.padding"),uR.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var mR=B((mxe,pR)=>{"use strict";var e5=Pe(),_f=$r(),wf=jc(),hR=eo();pR.exports=function(r){var t=r._fullLayout,a=e5.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+l:l;return{ppad:l,ppadplus:o?c:h,ppadminus:o?h:c}}else return{ppad:l}}function vR(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,l,o=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],l=r[a+"1"],n&&(o=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],l=r[a+"anchor"]),i!==void 0)return[u(i)+o,u(l)+s];if(r.path){var c=1/0,h=-1/0,d=r.path.match(wf.segmentRE),p,y,m,_,b;for(e.type==="date"&&(u=hR.decodeDate(u)),p=0;ph&&(h=b)));if(h>=c)return[c,h]}}});var xR=B((yxe,gR)=>{"use strict";var yR=s1();gR.exports={moduleType:"component",name:"shapes",layoutAttributes:jx(),supplyLayoutDefaults:sR(),supplyDrawNewShapeDefaults:cR(),includeBasePlot:xv()("shapes"),calcAutorange:mR(),draw:yR.draw,drawOne:yR.drawOne}});var r5=B((xxe,_R)=>{"use strict";var bR=wa(),Bse=ot().templatedArray,gxe=gv();_R.exports=Bse("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",bR.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",bR.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var TR=B((bxe,wR)=>{"use strict";var Yse=Pe(),t5=$r(),Gse=On(),Use=r5(),Vse="images";wR.exports=function(r,t){var a={name:Vse,handleItemDefaults:Wse};Gse(r,t,a)};function Wse(e,r,t){function a(h,d){return Yse.coerce(e,r,Use,h,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:t},o=["x","y"],s=0;s<2;s++){var u=o[s],f=t5.coerceRef(e,r,l,u,"paper",void 0);if(f!=="paper"){var c=t5.getFromId(l,f);c._imgIndices.push(r._index)}t5.coercePosition(r,l,a,f,u,0)}return r}});var qR=B((_xe,kR)=>{"use strict";var MR=kr(),Xse=Br(),Tf=$r(),AR=Jt(),Zse=Qo();kR.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],l,o;for(o=0;o{"use strict";var CR=zr(),Jse=sh();LR.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",l=a==="linear"&&t.type==="log";if(i||l){for(var o=r._fullLayout.images,s=t._id.charAt(0),u,f,c=0;c{"use strict";DR.exports={moduleType:"component",name:"images",layoutAttributes:r5(),supplyLayoutDefaults:TR(),includeBasePlot:xv()("images"),draw:qR(),convertCoords:SR()}});var bp=B((Mxe,PR)=>{"use strict";PR.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 a5=B((Axe,zR)=>{"use strict";var $se=jt(),Kse=zn(),Qse=mt().extendFlat,jse=ui().overrideAll,eue=_h(),RR=ot().templatedArray,rue=RR("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}});zR.exports=jse(RR("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:rue,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:Qse(eue({editType:"arraydraw"}),{}),font:$se({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Kse.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var HR=B((kxe,IR)=>{"use strict";var _p=Pe(),NR=On(),FR=a5(),tue=bp(),aue=tue.name,nue=FR.buttons;IR.exports=function(r,t){var a={name:aue,handleItemDefaults:iue};NR(r,t,a)};function iue(e,r,t){function a(l,o){return _p.coerce(e,r,FR,l,o)}var n=NR(e,r,{name:"buttons",handleItemDefaults:lue}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),_p.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),_p.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function lue(e,r){function t(n,i){return _p.coerce(e,r,nue,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var YR=B((qxe,BR)=>{"use strict";BR.exports=At;var qi=kr(),OR=xr(),Mf=Br(),wp=Pe();function At(e,r,t){this.gd=e,this.container=r,this.id=t,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})}At.barWidth=2;At.barLength=20;At.barRadius=2;At.barPad=1;At.barColor="#808BA4";At.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,l=n.height;this.position=r;var o=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",y=c==="up",m=s,_=f,b,T,x,M;!h&&!d&&!p&&!y&&(this.position.direction="down",h=!0);var A=h||y;A?(b=o,T=b+m,h?(x=u,M=Math.min(x+_,l),_=M-x):(M=u+_,x=Math.max(M-_,0),_=M-x)):(x=u,M=x+_,d?(T=o+m,b=Math.max(T-m,0),m=T-b):(b=o,T=Math.min(b+m,i),m=T-b)),this._box={l:b,t:x,w:m,h:_};var k=s>m,L=At.barLength+2*At.barPad,D=At.barWidth+2*At.barPad,E=o,R=u+f;R+D>l&&(R=l-D);var z=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(OR.fill,At.barColor),k?(this.hbar=z.attr({rx:At.barRadius,ry:At.barRadius,x:E,y:R,width:L,height:D}),this._hbarXMin=E+L/2,this._hbarTranslateMax=m-L):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var H=f>_,O=At.barWidth+2*At.barPad,U=At.barLength+2*At.barPad,V=o+s,Y=u;V+O>i&&(V=i-O);var I=this.container.selectAll("rect.scrollbar-vertical").data(H?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(OR.fill,At.barColor),H?(this.vbar=I.attr({rx:At.barRadius,ry:At.barRadius,x:V,y:Y,width:O,height:U}),this._vbarYMin=Y+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var G=this.id,Z=b-.5,K=H?T+O+.5:T+.5,re=x-.5,se=k?M+D+.5:M+.5,ce=n._topdefs.selectAll("#"+G).data(k||H?[0]:[]);if(ce.exit().remove(),ce.enter().append("clipPath").attr("id",G).append("rect"),k||H?(this._clipRect=ce.select("rect").attr({x:Math.floor(Z),y:Math.floor(re),width:Math.ceil(K)-Math.floor(Z),height:Math.ceil(se)-Math.floor(re)}),this.container.call(Mf.setClipUrl,G,this.gd),this.bg.attr({x:o,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Mf.setClipUrl,null),delete this._clipRect),k||H){var le=qi.behavior.drag().on("dragstart",function(){qi.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(le);var Q=qi.behavior.drag().on("dragstart",function(){qi.event.sourceEvent.preventDefault(),qi.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(Q),H&&this.vbar.on(".drag",null).call(Q)}this.setTranslate(t,a)};At.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Mf.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)};At.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=qi.event.dx),this.vbar&&(t-=qi.event.dy),this.setTranslate(r,t)};At.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=qi.event.deltaY),this.vbar&&(t+=qi.event.deltaY),this.setTranslate(r,t)};At.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=wp.constrain(qi.event.x,a,n),l=(i-a)/(n-a),o=this.position.w-this._box.w;r=l*o}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=wp.constrain(qi.event.y,s,u),c=(f-s)/(u-s),h=this.position.h-this._box.h;t=c*h}this.setTranslate(r,t)};At.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=wp.constrain(r||0,0,a),t=wp.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(Mf.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(Mf.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(Mf.setTranslate,r,t+l*this._vbarTranslateMax)}}});var QR=B((Cxe,KR)=>{"use strict";var Af=kr(),Yv=St(),Gv=xr(),kf=Br(),qn=Pe(),Tp=va(),oue=ot().arrayEditor,UR=Sa().LINE_SPACING,wr=bp(),sue=YR();KR.exports=function(r){var t=r._fullLayout,a=qn.filterVisible(t[wr.name]);function n(h){Yv.autoMargin(r,JR(h))}var i=t._menulayer.selectAll("g."+wr.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(wr.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){Af.select(this).selectAll("g."+wr.headerGroupClassName).each(n)}).remove(),a.length!==0){var l=i.selectAll("g."+wr.headerGroupClassName).data(a,uue);l.enter().append("g").classed(wr.headerGroupClassName,!0);for(var o=qn.ensureSingle(i,"g",wr.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var mue=bp();jR.exports={moduleType:"component",name:mue.name,layoutAttributes:a5(),supplyLayoutDefaults:HR(),draw:QR()}});var Vv=B((Sxe,rz)=>{"use strict";rz.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 o5=B((Dxe,nz)=>{"use strict";var tz=jt(),yue=_h(),gue=mt().extendDeepAll,xue=ui().overrideAll,bue=Tc(),az=ot().templatedArray,Ls=Vv(),_ue=az("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}});nz.exports=xue(az("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:_ue,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:gue(yue({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:bue.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:tz({})},font:tz({}),activebgcolor:{valType:"color",dflt:Ls.gripBgActiveColor},bgcolor:{valType:"color",dflt:Ls.railBgColor},bordercolor:{valType:"color",dflt:Ls.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Ls.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Ls.tickLength},tickcolor:{valType:"color",dflt:Ls.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Ls.minorTickLength}}),"arraydraw","from-root")});var sz=B((Exe,oz)=>{"use strict";var qf=Pe(),iz=On(),lz=o5(),wue=Vv(),Tue=wue.name,Mue=lz.steps;oz.exports=function(r,t){iz(r,t,{name:Tue,handleItemDefaults:Aue})};function Aue(e,r,t){function a(c,h){return qf.coerce(e,r,lz,c,h)}for(var n=iz(e,r,{name:"steps",handleItemDefaults:kue}),i=0,l=0;l{"use strict";var Ci=kr(),Mp=St(),so=xr(),Li=Br(),Cn=Pe(),que=Cn.strTranslate,Wv=va(),Cue=ot().arrayEditor,Pr=Vv(),f5=Sa(),cz=f5.LINE_SPACING,s5=f5.FROM_TL,u5=f5.FROM_BR;yz.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=Lue(a,r),i=a._infolayer.selectAll("g."+Pr.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Pr.containerClassName,!0).style("cursor",t?null:"ew-resize");function l(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Mp.autoMargin(r,vz(f))}if(i.exit().each(function(){Ci.select(this).selectAll("g."+Pr.groupClassName).each(l)}).remove(),n.length!==0){var o=i.selectAll("g."+Pr.groupClassName).data(n,Sue);o.enter().append("g").classed(Pr.groupClassName,!0),o.exit().each(l).remove();for(var s=0;s0&&(o=o.transition().duration(r.transition.duration).ease(r.transition.easing)),o.attr("transform",que(l-Pr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function c5(e,r){var t=e._dims;return t.inputAreaStart+Pr.stepInset+(t.inputAreaLength-2*Pr.stepInset)*Math.min(1,Math.max(0,r))}function fz(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Pr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Pr.stepInset-2*t.inputAreaStart)))}function Fue(e,r,t){var a=t._dims,n=Cn.ensureSingle(e,"rect",Pr.railTouchRectClass,function(i){i.call(pz,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Pr.tickOffset+t.ticklen+a.labelHeight)}).call(so.fill,t.bgcolor).attr("opacity",0),Li.setTranslate(n,0,a.currentValueTotalHeight)}function Iue(e,r){var t=r._dims,a=t.inputAreaLength-Pr.railInset*2,n=Cn.ensureSingle(e,"rect",Pr.railRectClass);n.attr({width:a,height:Pr.railWidth,rx:Pr.railRadius,ry:Pr.railRadius,"shape-rendering":"crispEdges"}).call(so.stroke,r.bordercolor).call(so.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),Li.setTranslate(n,Pr.railInset,(t.inputAreaWidth-Pr.railWidth)*.5+t.currentValueTotalHeight)}});var bz=B((Rxe,xz)=>{"use strict";var Hue=Vv();xz.exports={moduleType:"component",name:Hue.name,layoutAttributes:o5(),supplyLayoutDefaults:sz(),draw:gz()}});var kp=B((zxe,wz)=>{"use strict";var _z=zn();wz.exports={bgcolor:{valType:"color",dflt:_z.background,editType:"plot"},bordercolor:{valType:"color",dflt:_z.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 v5=B((Nxe,Tz)=>{"use strict";Tz.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 qp=B((Fxe,Mz)=>{"use strict";Mz.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 qz=B(Lp=>{"use strict";var Oue=Jt(),Bue=va(),Az=qp(),Yue=Sa().LINE_SPACING,Cp=Az.name;function kz(e){var r=e&&e[Cp];return r&&r.visible}Lp.isVisible=kz;Lp.makeData=function(e){for(var r=Oue.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var Sp=Pe(),Cz=ot(),Lz=Jt(),Gue=kp(),Uue=v5();Sz.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;Sp.isPlainObject(n.rangeslider)||(n.rangeslider={});var l=n.rangeslider,o=Cz.newContainer(i,"rangeslider");function s(M,A){return Sp.coerce(l,o,Gue,M,A)}var u,f;function c(M,A){return Sp.coerce(u,f,Uue,M,A)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(l.range)),s("range");var d=t._subplots;if(d)for(var p=d.cartesian.filter(function(M){return M.substr(0,M.indexOf("y"))===Lz.name2id(a)}).map(function(M){return M.substr(M.indexOf("y"),M.length)}),y=Sp.simpleMap(p,Lz.id2name),m=0;m{"use strict";var Vue=Jt().list,Wue=Bc().getAutoRange,Xue=qp();Ez.exports=function(r){for(var t=Vue(r,"x",!0),a=0;a{"use strict";var Dp=kr(),Zue=yr(),Jue=St(),Rt=Pe(),Ep=Rt.strTranslate,zz=Br(),uo=xr(),$ue=Hc(),Kue=gl(),h5=Jt(),Que=mi(),jue=Kl(),Hr=qp();Nz.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=I.max)V=R[Y+1];else if(U=I.pmax)V=R[Y+1];else if(U0?e.touches[0].clientX:0}function efe(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Hr.slideBoxClassName).node(),i=e.select("rect."+Hr.grabAreaMinClassName).node(),l=e.select("rect."+Hr.grabAreaMaxClassName).node();function o(){var s=Dp.event,u=s.target,f=Rz(s),c=f-e.node().getBoundingClientRect().left,h=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),p=Que.coverSlip();this.addEventListener("touchmove",y),this.addEventListener("touchend",m),p.addEventListener("mousemove",y),p.addEventListener("mouseup",m);function y(_){var b=Rz(_),T=+b-f,x,M,A;switch(u){case n:if(A="ew-resize",h+T>t._length||d+T<0)return;x=h+T,M=d+T;break;case i:if(A="col-resize",h+T>t._length)return;x=h+T,M=d;break;case l:if(A="col-resize",d+T<0)return;x=h,M=d+T;break;default:A="ew-resize",x=c,M=c+T;break}if(M{"use strict";var ffe=Pe(),cfe=kp(),vfe=v5(),d5=qz();Iz.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:ffe.extendFlat({},cfe,{yaxis:vfe})}}},layoutAttributes:kp(),handleDefaults:Dz(),calcAutorange:Pz(),draw:Fz(),isVisible:d5.isVisible,makeData:d5.makeData,autoMarginOpts:d5.autoMarginOpts}});var Pp=B((Gxe,Bz)=>{"use strict";var hfe=jt(),Oz=zn(),dfe=ot().templatedArray,pfe=dfe("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"});Bz.exports={visible:{valType:"boolean",editType:"plot"},buttons:pfe,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:hfe({editType:"plot"}),bgcolor:{valType:"color",dflt:Oz.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Oz.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var p5=B((Uxe,Yz)=>{"use strict";Yz.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Vz=B((Vxe,Uz)=>{"use strict";var Rp=Pe(),mfe=xr(),yfe=ot(),gfe=On(),Gz=Pp(),m5=p5();Uz.exports=function(r,t,a,n,i){var l=r.rangeselector||{},o=yfe.newContainer(t,"rangeselector");function s(d,p){return Rp.coerce(l,o,Gz,d,p)}var u=gfe(l,o,{name:"buttons",handleItemDefaults:xfe,calendar:i}),f=s("visible",u.length>0);if(f){var c=bfe(t,a,n);s("x",c[0]),s("y",c[1]),Rp.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Rp.coerceFont(s,"font",a.font);var h=s("bgcolor");s("activecolor",mfe.contrast(h,m5.lightAmount,m5.darkAmount)),s("bordercolor"),s("borderwidth")}};function xfe(e,r,t,a){var n=a.calendar;function i(s,u){return Rp.coerce(e,r,Gz.buttons,s,u)}var l=i("visible");if(l){var o=i("step");o!=="all"&&(n&&n!=="gregorian"&&(o==="month"||o==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function bfe(e,r,t){for(var a=t.filter(function(o){return r[o].anchor===e._id}),n=0,i=0;i{"use strict";var _fe=My(),wfe=Pe().titleCase;Wz.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=Tfe(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function Tfe(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=_fe["utc"+wfe(n)],l=r.count,o;switch(r.stepmode){case"backward":o=e.l2r(+i.offset(a,-l));break;case"todate":var s=i.offset(a,-l);o=e.l2r(+i.ceil(s));break}var u=t[1];return[o,u]}});var rN=B((Xxe,eN)=>{"use strict";var Np=kr(),Mfe=yr(),Afe=St(),Zz=xr(),jz=Br(),bl=Pe(),Jz=bl.strTranslate,zp=va(),kfe=Jt(),x5=Sa(),$z=x5.LINE_SPACING,Kz=x5.FROM_TL,Qz=x5.FROM_BR,g5=p5(),qfe=Xz();eN.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(Cfe(r),Lfe);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=Np.select(this),l=n,o=l.rangeselector,s=i.selectAll("g.button").data(bl.filterVisible(o.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Np.select(this),c=qfe(l,u);u._isActive=Sfe(l,u,c),f.call(y5,o,u),f.call(Efe,o,u,r),f.on("click",function(){r._dragged||Mfe.call("_guiRelayout",r,c)}),f.on("mouseover",function(){u._isHovered=!0,f.call(y5,o,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(y5,o,u)})}),Rfe(r,s,o,l._name,i)})};function Cfe(e){for(var r=kfe.list(e,"x",!0),t=[],a=0;a{"use strict";tN.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Pp()}}},layoutAttributes:Pp(),handleDefaults:Vz(),draw:rN()}});var fo=B(b5=>{"use strict";var nN=mt().extendFlat;b5.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",l={x:nN({},t,{}),y:nN({},t,{}),editType:e.editType};return e.noGridCell||(l.row={valType:"integer",min:0,dflt:0,editType:e.editType},l.column={valType:"integer",min:0,dflt:0,editType:e.editType}),l};b5.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],l=r.grid;if(l){var o=t("domain.column");o!==void 0&&(o{"use strict";var zfe=Pe(),Nfe=mu().counter,Ffe=fo().attributes,iN=wa().idRegex,Ife=ot(),_5={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:[Nfe("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[iN.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[iN.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:Ffe({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 Fp(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function Hfe(e,r){var t=e.grid||{},a=Fp(r,t,"x"),n=Fp(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),l=Array.isArray(a),o=Array.isArray(n),s=l&&a!==t.xaxes&&o&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(o&&(u=n.length),l&&(f=a.length));var c=Ife.newContainer(r,"grid");function h(A,k){return zfe.coerce(t,c,_5,A,k)}var d=h("rows",u),p=h("columns",f);if(!(d*p>1)){delete r.grid;return}if(!i&&!l&&!o){var y=h("pattern")==="independent";y&&(i=!0)}c._hasSubplotGrid=i;var m=h("roworder"),_=m==="top to bottom",b=i?.2:.1,T=i?.3:.1,x,M;s&&r._splomGridDflt&&(x=r._splomGridDflt.xside,M=r._splomGridDflt.yside),c._domains={x:lN("x",h,b,x,p),y:lN("y",h,T,M,d,_)}}function lN(e,r,t,a,n,i){var l=r(e+"gap",t),o=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=o[0],f=(o[1]-u)/(n-l),c=f*(1-l),h=0;h{"use strict";fN.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 hN=B((Qxe,vN)=>{"use strict";var cN=zr(),Bfe=yr(),Yfe=Pe(),Gfe=ot(),Ufe=w5();vN.exports=function(e,r,t,a){var n="error_"+a.axis,i=Gfe.newContainer(r,n),l=e[n]||{};function o(p,y){return Yfe.coerce(l,i,Ufe,p,y)}var s=l.array!==void 0||l.value!==void 0||l.type==="sqrt",u=o("visible",s);if(u!==!1){var f=o("type","array"in l?"data":"percent"),c=!0;f!=="sqrt"&&(c=o("symmetric",!((f==="data"?"arrayminus":"valueminus")in l))),f==="data"?(o("array"),o("traceref"),c||(o("arrayminus"),o("tracerefminus"))):(f==="percent"||f==="constant")&&(o("value"),c||o("valueminus"));var h="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&o(h,!(l.color||cN(l.thickness)||cN(l.width)))}(!a.inherit||!i[h])&&(o("color",t),o("thickness"),o("width",Bfe.traceIs(r,"gl3d")?0:4))}}});var T5=B((jxe,pN)=>{"use strict";pN.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var c=+n[f];return[c,c]};var i=r.arrayminus||[];return function(u,f){var c=+n[f],h=+i[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var l=dN(t,r.value),o=dN(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=l(u);return[f,f]}:function(u){return[o(u),l(u)]}}};function dN(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var gN=B((e5e,yN)=>{"use strict";var M5=zr(),Vfe=yr(),A5=$r(),Wfe=Pe(),Xfe=T5();yN.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var xN=kr(),co=zr(),Zfe=Br(),Jfe=_n();bN.exports=function(r,t,a,n){var i,l=a.xaxis,o=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(b){return b.id});var y=Jfe.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var m=xN.select(this).selectAll("g.errorbar").data(f,p);if(m.exit().remove(),!!f.length){h.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var _=m.enter().append("g").classed("errorbar",!0);s&&_.style("opacity",0).transition().duration(n.duration).style("opacity",1),Zfe.setClipUrl(m,a.layerClipId,r),m.each(function(b){var T=xN.select(this),x=$fe(b,l,o);if(!(y&&!b.vis)){var M,A=T.select("path.yerror");if(d.visible&&co(x.x)&&co(x.yh)&&co(x.ys)){var k=d.width;M="M"+(x.x-k)+","+x.yh+"h"+2*k+"m-"+k+",0V"+x.ys,x.noYS||(M+="m-"+k+",0h"+2*k),i=!A.size(),i?A=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(A=A.transition().duration(n.duration).ease(n.easing)),A.attr("d",M)}else A.remove();var L=T.select("path.xerror");if(h.visible&&co(x.y)&&co(x.xh)&&co(x.xs)){var D=(h.copy_ystyle?d:h).width;M="M"+x.xh+","+(x.y-D)+"v"+2*D+"m0,-"+D+"H"+x.xs,x.noXS||(M+="m0,-"+D+"v"+2*D),i=!L.size(),i?L=T.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(L=L.transition().duration(n.duration).ease(n.easing)),L.attr("d",M)}else L.remove()}})}})};function $fe(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),co(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),co(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var MN=B((t5e,TN)=>{"use strict";var Kfe=kr(),wN=xr();TN.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},l=Kfe.select(this);l.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(wN.stroke,n.color),i.copy_ystyle&&(i=n),l.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(wN.stroke,i.color)})}});var qN=B((a5e,kN)=>{"use strict";var Xv=Pe(),AN=ui().overrideAll,Zv=w5(),Ss={error_x:Xv.extendFlat({},Zv),error_y:Xv.extendFlat({},Zv)};delete Ss.error_x.copy_zstyle;delete Ss.error_y.copy_zstyle;delete Ss.error_y.copy_ystyle;var Jv={error_x:Xv.extendFlat({},Zv),error_y:Xv.extendFlat({},Zv),error_z:Xv.extendFlat({},Zv)};delete Jv.error_x.copy_ystyle;delete Jv.error_y.copy_ystyle;delete Jv.error_z.copy_ystyle;delete Jv.error_z.copy_zstyle;kN.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ss,bar:Ss,histogram:Ss,scatter3d:AN(Jv,"calc","nested"),scattergl:AN(Ss,"calc","nested")}},supplyDefaults:hN(),calc:gN(),makeComputeError:T5(),plot:_N(),style:MN(),hoverInfo:Qfe};function Qfe(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var LN=B((n5e,CN)=>{"use strict";CN.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 NN=B((i5e,zN)=>{"use strict";var vo=kr(),k5=Rn(),Hp=St(),SN=yr(),_l=$r(),Ip=mi(),jn=Pe(),Di=jn.strTranslate,RN=mt().extendFlat,q5=Kl(),Si=Br(),C5=xr(),jfe=Hc(),ece=va(),rce=Hn().flipScale,tce=sp(),ace=fp(),nce=bn(),L5=Sa(),DN=L5.LINE_SPACING,EN=L5.FROM_TL,PN=L5.FROM_BR,Mt=LN().cn;function ice(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+Mt.colorbar).data(lce(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(Mt.colorbar,!0),t.each(function(a){var n=vo.select(this);jn.ensureSingle(n,"rect",Mt.cbbg),jn.ensureSingle(n,"g",Mt.cbfills),jn.ensureSingle(n,"g",Mt.cblines),jn.ensureSingle(n,"g",Mt.cbaxis,function(l){l.classed(Mt.crisp,!0)}),jn.ensureSingle(n,"g",Mt.cbtitleunshift,function(l){l.append("g").classed(Mt.cbtitle,!0)}),jn.ensureSingle(n,"rect",Mt.cboutline);var i=oce(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&sce(n,a,e)}),t.exit().each(function(a){Hp.autoMargin(e,a._id)}).remove(),t.order()}function lce(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,l,o;function s(T){return RN(T,{_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 o.calc=="function"?o.calc(e,l,n):(n._fillgradient=i.reversescale?rce(i.colorscale):i.colorscale,n._zrange=[i[o.min],i[o.max]])}for(var f=0;f1){var te=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));ve*=te*jn.roundUp(W/te,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(ue.tick0=0)}ue.dtick=ve}ue.domain=a?[Q+p/x.h,Q+G-p/x.h]:[Q+d/x.w,Q+G-d/x.w],ue.setScale(),e.attr("transform",Di(Math.round(x.l),Math.round(x.t)));var X=e.select("."+Mt.cbtitleunshift).attr("transform",Di(-Math.round(x.l),-Math.round(x.t))),ye=ue.ticklabelposition,_e=ue.title.font.size,xe=e.select("."+Mt.cbaxis),Ie,ze=0,Re=0;function He(We,ie){var Ae={propContainer:ue,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:T._dfltTitle.colorbar,containerGroup:e.select("."+Mt.cbtitle)},Ce=We.charAt(0)==="h"?We.substr(1):"h"+We;e.selectAll("."+Ce+",."+Ce+"-math-group").remove(),jfe.draw(t,We,RN(Ae,ie||{}))}function Be(){if(a&&ke||!a&&!ke){var We,ie;L==="top"&&(We=d+x.l+Z*y,ie=p+x.t+K*(1-Q-G)+3+_e*.75),L==="bottom"&&(We=d+x.l+Z*y,ie=p+x.t+K*(1-Q)-3-_e*.25),L==="right"&&(ie=p+x.t+K*m+3+_e*.75,We=d+x.l+Z*Q),He(ue._id+"title",{attributes:{x:We,y:ie,"text-anchor":a?"start":"middle"}})}}function Fe(){if(a&&!ke||!a&&ke){var We=ue.position||0,ie=ue._offset+ue._length/2,Ae,Ce;if(L==="right")Ce=ie,Ae=x.l+Z*We+10+_e*(ue.showticklabels?1:.5);else if(Ae=ie,L==="bottom"&&(Ce=x.t+K*We+10+(ye.indexOf("inside")===-1?ue.tickfont.size:0)+(ue.ticks!=="intside"&&r.ticklen||0)),L==="top"){var cr=k.text.split("
").length;Ce=x.t+K*We+10-V-DN*_e*cr}He((a?"h":"v")+ue._id+"title",{avoid:{selection:vo.select(t).selectAll("g."+ue._id+"tick"),side:L,offsetTop:a?0:x.t,offsetLeft:a?x.l:0,maxShift:a?T.width:T.height},attributes:{x:Ae,y:Ce,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Ee(){if(!a&&!ke||a&&ke){var We=e.select("."+Mt.cbtitle),ie=We.select("text"),Ae=[-s/2,s/2],Ce=We.select(".h"+ue._id+"title-math-group").node(),cr=15.6;ie.node()&&(cr=parseInt(ie.node().style.fontSize,10)*DN);var tr;if(Ce?(tr=Si.bBox(Ce),Re=tr.width,ze=tr.height,ze>cr&&(Ae[1]-=(ze-cr)/2)):ie.node()&&!ie.classed(Mt.jsPlaceholder)&&(tr=Si.bBox(ie.node()),Re=tr.width,ze=tr.height),a){if(ze){if(ze+=5,L==="top")ue.domain[1]-=ze/x.h,Ae[1]*=-1;else{ue.domain[0]+=ze/x.h;var De=ece.lineCount(ie);Ae[1]+=(1-De)*cr}We.attr("transform",Di(Ae[0],Ae[1])),ue.setScale()}}else Re&&(L==="right"&&(ue.domain[0]+=(Re+_e/2)/x.w),We.attr("transform",Di(Ae[0],Ae[1])),ue.setScale())}e.selectAll("."+Mt.cbfills+",."+Mt.cblines).attr("transform",a?Di(0,Math.round(x.h*(1-ue.domain[1]))):Di(Math.round(x.w*ue.domain[0]),0)),xe.attr("transform",a?Di(0,Math.round(-x.t)):Di(Math.round(-x.l),0));var Le=e.select("."+Mt.cbfills).selectAll("rect."+Mt.cbfill).attr("style","").data(O);Le.enter().append("rect").classed(Mt.cbfill,!0).attr("style",""),Le.exit().remove();var Ye=D.map(ue.c2p).map(Math.round).sort(function(fr,lr){return fr-lr});Le.each(function(fr,lr){var Ne=[lr===0?D[0]:(O[lr]+O[lr-1])/2,lr===O.length-1?D[1]:(O[lr]+O[lr+1])/2].map(ue.c2p).map(Math.round);a&&(Ne[1]=jn.constrain(Ne[1]+(Ne[1]>Ne[0])?1:-1,Ye[0],Ye[1]));var ne=vo.select(this).attr(a?"x":"y",re).attr(a?"y":"x",vo.min(Ne)).attr(a?"width":"height",Math.max(V,2)).attr(a?"height":"width",Math.max(vo.max(Ne)-vo.min(Ne),2));if(r._fillgradient)Si.gradient(ne,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var fe=R(fr).replace("e-","");ne.attr("fill",k5(fe).toHexString())}});var Xe=e.select("."+Mt.cblines).selectAll("path."+Mt.cbline).data(A.color&&A.width?U:[]);Xe.enter().append("path").classed(Mt.cbline,!0),Xe.exit().remove(),Xe.each(function(fr){var lr=re,Ne=Math.round(ue.c2p(fr))+A.width/2%1;vo.select(this).attr("d","M"+(a?lr+","+Ne:Ne+","+lr)+(a?"h":"v")+V).call(Si.lineGroupStyle,A.width,E(fr),A.dash)}),xe.selectAll("g."+ue._id+"tick,path").remove();var Ge=re+V+(s||0)/2-(r.ticks==="outside"?1:0),Oe=_l.calcTicks(ue),$e=_l.getTickSigns(ue)[2];return _l.drawTicks(t,ue,{vals:ue.ticks==="inside"?_l.clipEnds(ue,Oe):Oe,layer:xe,path:_l.makeTickPath(ue,Ge,$e),transFn:_l.makeTransTickFn(ue)}),_l.drawLabels(t,ue,{vals:Oe,layer:xe,transFn:_l.makeTransTickLabelFn(ue),labelFns:_l.makeLabelFns(ue,Ge)})}function Je(){var We,ie=V+s/2;ye.indexOf("inside")===-1&&(We=Si.bBox(xe.node()),ie+=a?We.width:We.height),Ie=X.select("text");var Ae=0,Ce=a&&L==="top",cr=!a&&L==="right",tr=0;if(Ie.node()&&!Ie.classed(Mt.jsPlaceholder)){var De,Le=X.select(".h"+ue._id+"title-math-group").node();Le&&(a&&ke||!a&&!ke)?(We=Si.bBox(Le),Ae=We.width,De=We.height):(We=Si.bBox(X.node()),Ae=We.right-x.l-(a?re:ge),De=We.bottom-x.t-(a?ge:re),!a&&L==="top"&&(ie+=We.height,tr=We.height)),cr&&(Ie.attr("transform",Di(Ae/2+_e/2,0)),Ae*=2),ie=Math.max(ie,a?Ae:De)}var Ye=(a?d:p)*2+ie+u+s/2,Xe=0;!a&&k.text&&h==="bottom"&&m<=0&&(Xe=Ye/2,Ye+=Xe,tr+=Xe),T._hColorbarMoveTitle=Xe,T._hColorbarMoveCBTitle=tr;var Ge=u+s,Oe=(a?re:ge)-Ge/2-(a?d:0),$e=(a?ge:re)-(a?I:p+tr-Xe);e.select("."+Mt.cbbg).attr("x",Oe).attr("y",$e).attr(a?"width":"height",Math.max(Ye-Xe,2)).attr(a?"height":"width",Math.max(I+Ge,2)).call(C5.fill,f).call(C5.stroke,r.bordercolor).style("stroke-width",u);var fr=cr?Math.max(Ae-10,0):0;e.selectAll("."+Mt.cboutline).attr("x",(a?re:ge+d)+fr).attr("y",(a?ge+p-I:re)+(Ce?ze:0)).attr(a?"width":"height",Math.max(V,2)).attr(a?"height":"width",Math.max(I-(a?2*p+ze:2*d+fr),2)).call(C5.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var lr=a?se*Ye:0,Ne=a?0:(1-ce)*Ye-tr;if(lr=b?x.l-lr:-lr,Ne=_?x.t-Ne:-Ne,e.attr("transform",Di(lr,Ne)),!a&&(u||k5(f).getAlpha()&&!k5.equals(T.paper_bgcolor,f))){var ne=xe.selectAll("text"),fe=ne[0].length,Se=e.select("."+Mt.cbbg).node(),qe=Si.bBox(Se),ir=Si.getTranslate(e),vr=2;ne.each(function(Sn,Za){var ua=0,Ja=fe-1;if(Za===ua||Za===Ja){var gr=Si.bBox(this),ct=Si.getTranslate(this),Xr;if(Za===Ja){var bt=gr.right+ct.x,Lt=qe.right+ir.x+ge-u-vr+y;Xr=Lt-bt,Xr>0&&(Xr=0)}else if(Za===ua){var vt=gr.left+ct.x,_t=qe.left+ir.x+ge+u+vr;Xr=_t-vt,Xr<0&&(Xr=0)}Xr&&(fe<3?this.setAttribute("transform","translate("+Xr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var sr={},Ar=EN[c],Ur=PN[c],et=EN[h],Wr=PN[h],Nt=Ye-V;a?(i==="pixels"?(sr.y=m,sr.t=I*et,sr.b=I*Wr):(sr.t=sr.b=0,sr.yt=m+n*et,sr.yb=m-n*Wr),o==="pixels"?(sr.x=y,sr.l=Ye*Ar,sr.r=Ye*Ur):(sr.l=Nt*Ar,sr.r=Nt*Ur,sr.xl=y-l*Ar,sr.xr=y+l*Ur)):(i==="pixels"?(sr.x=y,sr.l=I*Ar,sr.r=I*Ur):(sr.l=sr.r=0,sr.xl=y+n*Ar,sr.xr=y-n*Ur),o==="pixels"?(sr.y=1-m,sr.t=Ye*et,sr.b=Ye*Wr):(sr.t=Nt*et,sr.b=Nt*Wr,sr.yt=m-l*et,sr.yb=m+l*Wr));var oa=r.y<.5?"b":"t",Na=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var sa={r:T.width-Oe-lr,l:Oe+sr.r,b:T.height-$e-Ne,t:$e+sr.b};b&&_?Hp.autoMargin(t,r._id,sr):b?t._fullLayout._reservedMargin[r._id][oa]=sa[oa]:_||a?t._fullLayout._reservedMargin[r._id][Na]=sa[Na]:t._fullLayout._reservedMargin[r._id][oa]=sa[oa]}return jn.syncOrAsync([Hp.previousPromises,Be,Ee,Fe,Hp.previousPromises,Je],t)}function sce(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,l,o,s;Ip.init({element:e.node(),gd:t,prepFn:function(){l=e.attr("transform"),q5(e)},moveFn:function(u,f){e.attr("transform",l+Di(u,f)),o=Ip.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Ip.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var c=Ip.getCursor(o,s,r.xanchor,r.yanchor);q5(e,c)},doneFn:function(){if(q5(e),o!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=o,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?SN.call("_guiRestyle",t,u,r._traceIndex):SN.call("_guiRelayout",t,u)}}})}function uce(e,r,t){var a=r._levels,n=[],i=[],l,o,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],c=1.001*t[1]-.001*t[0];for(o=0;o<1e5&&(l=a.start+o*u,!(u>0?l>=s:l<=s));o++)l>f&&l0?l>=s:l<=s));o++)l>t[0]&&l{"use strict";FN.exports={moduleType:"component",name:"colorbar",attributes:Jh(),supplyDefaults:Hg(),draw:NN().draw,hasColorbar:Eg()}});var ON=B((o5e,HN)=>{"use strict";HN.exports={moduleType:"component",name:"legend",layoutAttributes:N2(),supplyLayoutDefaults:H2(),draw:K2(),style:X2()}});var YN=B((s5e,BN)=>{"use strict";BN.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 UN=B((u5e,GN)=>{"use strict";GN.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var D5=B((f5e,ZN)=>{"use strict";var cce=yr(),XN=Pe(),S5=XN.extendFlat,VN=XN.extendDeep;function WN(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function vce(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}ZN.exports=function(r,t){var a,n=r.data,i=r.layout,l=VN([],n),o=VN({},i,WN(t.tileClass)),s=r._context||{};if(t.width&&(o.width=t.width),t.height&&(o.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){o.annotations=[];var u=Object.keys(o);for(a=0;a{"use strict";var hce=Nh().EventEmitter,dce=yr(),pce=Pe(),JN=gs(),mce=D5(),yce=W1(),gce=X1();function xce(e,r){var t=new hce,a=mce(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var o=JN.getDelay(n._fullLayout);setTimeout(function(){var s=yce(n),u=document.createElement("canvas");u.id=pce.randstr(),t=gce({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},o)}var l=JN.getRedrawFunc(n);return dce.call("_doPlot",n,a.data,a.layout,a.config).then(l).then(i).catch(function(o){t.emit("error",o)}),t}$N.exports=xce});var eF=B((v5e,jN)=>{"use strict";var QN=gs(),bce={getDelay:QN.getDelay,getRedrawFunc:QN.getRedrawFunc,clone:D5(),toSVG:W1(),svgToImg:X1(),toImage:KN(),downloadImage:px()};jN.exports=bce});var tF=B(wl=>{"use strict";wl.version=Q0().version;W4();N8();var _ce=yr(),$v=wl.register=_ce.register,P5=iD(),rF=Object.keys(P5);for(Op=0;Op{"use strict";aF.exports=tF()});var Yp=B((p5e,iF)=>{"use strict";iF.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Tl=B((m5e,uF)=>{"use strict";var qt=bi(),lF=di().axisHoverFormat,wce=_a().hovertemplateAttrs,Tce=_a().texttemplateAttrs,sF=Nc(),Mce=jt(),oF=Yp(),Ace=fi().pattern,Ds=mt().extendFlat,R5=Mce({editType:"calc",arrayOk:!0,colorEditType:"style"}),kce=qt.marker,qce=kce.line,Cce=Ds({},qce.width,{dflt:0}),Lce=Ds({width:Cce,editType:"calc"},sF("marker.line")),Sce=Ds({line:Lce,editType:"calc"},sF("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Ace,cornerradius:{valType:"any",editType:"calc"}});uF.exports={x:qt.x,x0:qt.x0,dx:qt.dx,y:qt.y,y0:qt.y0,dy:qt.dy,xperiod:qt.xperiod,yperiod:qt.yperiod,xperiod0:qt.xperiod0,yperiod0:qt.yperiod0,xperiodalignment:qt.xperiodalignment,yperiodalignment:qt.yperiodalignment,xhoverformat:lF("x"),yhoverformat:lF("y"),text:qt.text,texttemplate:Tce({editType:"plot"},{keys:oF.eventDataKeys}),hovertext:qt.hovertext,hovertemplate:wce({},{keys:oF.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Ds({},R5,{}),insidetextfont:Ds({},R5,{}),outsidetextfont:Ds({},R5,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Ds({},qt.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:Sce,offsetgroup:qt.offsetgroup,alignmentgroup:qt.alignmentgroup,selected:{marker:{opacity:qt.selected.marker.opacity,color:qt.selected.marker.color,editType:"style"},textfont:qt.selected.textfont,editType:"style"},unselected:{marker:{opacity:qt.unselected.marker.opacity,color:qt.unselected.marker.color,editType:"style"},textfont:qt.unselected.textfont,editType:"style"},zorder:qt.zorder}});var Gp=B((y5e,fF)=>{"use strict";fF.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 z5=B((g5e,hF)=>{"use strict";var Dce=xr(),cF=Hn().hasColorscale,vF=Ru(),Ece=Pe().coercePattern;hF.exports=function(r,t,a,n,i){var l=a("marker.color",n),o=cF(r,"marker");o&&vF(r,t,i,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Dce.defaultLine),cF(r,"marker.line")&&vF(r,t,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),Ece(a,"marker.pattern",l,o),a("selected.marker.color"),a("unselected.marker.color")}});var Ki=B((x5e,xF)=>{"use strict";var dF=zr(),Lf=Pe(),pF=xr(),Pce=yr(),Rce=Dv(),zce=_s(),Nce=z5(),Fce=ff(),mF=Tl(),Up=Lf.coerceFont;function Ice(e,r,t,a){function n(u,f){return Lf.coerce(e,r,mF,u,f)}var i=Rce(e,r,a,n);if(!i){r.visible=!1;return}zce(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var l=n("textposition");gF(e,r,a,n,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Nce(e,r,n,t,a);var o=(r.marker.line||{}).color,s=Pce.getComponentMethod("errorbars","supplyDefaults");s(e,r,o||pF.defaultLine,{axis:"y"}),s(e,r,o||pF.defaultLine,{axis:"x",inherit:"y"}),Lf.coerceSelectionMarkerOpacity(r,n)}function Hce(e,r){var t,a;function n(o,s){return Lf.coerce(a._input,a,mF,o,s)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&dF(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function gF(e,r,t,a,n,i){i=i||{};var l=i.moduleHasSelected!==!1,o=i.moduleHasUnselected!==!1,s=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,f=i.moduleHasTextangle!==!1,c=i.moduleHasInsideanchor!==!1,h=!!i.hasPathbar,d=Array.isArray(n)||n==="auto",p=d||n==="inside",y=d||n==="outside";if(p||y){var m=Up(a,"textfont",t.font),_=Lf.extendFlat({},m),b=e.textfont&&e.textfont.color,T=!b;if(T&&delete _.color,Up(a,"insidetextfont",_),h){var x=Lf.extendFlat({},m);T&&delete x.color,Up(a,"pathbar.textfont",x)}y&&Up(a,"outsidetextfont",m),l&&a("selected.textfont.color"),o&&a("unselected.textfont.color"),s&&a("constraintext"),u&&a("cliponaxis"),f&&a("textangle"),a("texttemplate")}p&&c&&a("insidetextanchor")}xF.exports={supplyDefaults:Ice,crossTraceDefaults:Hce,handleText:gF,validateCornerradius:yF}});var N5=B((b5e,bF)=>{"use strict";var Oce=yr(),Bce=$r(),Yce=Pe(),Gce=Gp(),Uce=Ki().validateCornerradius;bF.exports=function(e,r,t){function a(y,m){return Yce.coerce(e,r,Gce,y,m)}for(var n=!1,i=!1,l=!1,o={},s=a("barmode"),u=s==="group",f=0;f0&&!o[h]&&(l=!0),o[h]=!0),c.visible&&c.type==="histogram"){var d=Bce.getFromId({_fullLayout:r},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(i=!0)}}if(!n){delete r.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",i&&!l?0:.2),a("bargroupgap");var p=a("barcornerradius");r.barcornerradius=Uce(p)}});var Vp=B((_5e,_F)=>{"use strict";var Sf=Pe();_F.exports=function(r,t){for(var a=0;a{"use strict";var wF=$r(),TF=ws(),MF=Hn().hasColorscale,AF=td(),Vce=Vp(),Wce=Ev();kF.exports=function(r,t){var a=wF.getFromId(r,t.xaxis||"x"),n=wF.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f,c={msUTC:!!(t.base||t.base===0)};t.orientation==="h"?(i=a.makeCalcdata(t,"x",c),o=n.makeCalcdata(t,"y"),s=TF(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y",c),o=a.makeCalcdata(t,"x"),s=TF(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;for(var h=Math.min(l.length,i.length),d=new Array(h),p=0;p{"use strict";var Xce=kr(),Zce=Pe();function Jce(e,r,t){var a=e._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var i=a.uniformtext.mode==="hide",l;switch(t){case"funnelarea":case"pie":case"sunburst":l="g.slice";break;case"treemap":case"icicle":l="g.slice, g.pathbar";break;default:l="g.points > g.point"}r.selectAll(l).each(function(o){var s=o.transform;if(s){s.scale=i&&s.hide?0:n/s.fontSize;var u=Xce.select(this).select("text");Zce.setTransormAndDisplay(u,s)}})}}function $ce(e,r,t){if(t.uniformtext.mode){var a=CF(e),n=t.uniformtext.minsize,i=r.scale*r.fontSize;r.hide=i{"use strict";var Qce=zr(),jce=Rn(),SF=Pe().isArrayOrTypedArray;Es.coerceString=function(e,r,t){if(typeof r=="string"){if(r||!e.noBlank)return r}else if((typeof r=="number"||r===!0)&&!e.strict)return String(r);return t!==void 0?t:e.dflt};Es.coerceNumber=function(e,r,t){if(Qce(r)){r=+r;var a=e.min,n=e.max,i=a!==void 0&&rn;if(!i)return r}return t!==void 0?t:e.dflt};Es.coerceColor=function(e,r,t){return jce(r).isValid()?r:t!==void 0?t:e.dflt};Es.coerceEnumerated=function(e,r,t){return e.coerceNumber&&(r=+r),e.values.indexOf(r)!==-1?r:t!==void 0?t:e.dflt};Es.getValue=function(e,r){var t;return SF(e)?r{"use strict";var Kv=kr(),eve=xr(),Qv=Br(),DF=Pe(),EF=yr(),PF=Ei().resizeText,F5=Tl(),rve=F5.textfont,tve=F5.insidetextfont,ave=F5.outsidetextfont,Aa=Wp();function nve(e){var r=Kv.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");PF(e,r,"bar");var t=r.size(),a=e._fullLayout;r.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(a.barmode==="stack"&&t>1||a.bargap===0&&a.bargroupgap===0&&!n[0].trace.marker.line.width)&&Kv.select(this).attr("shape-rendering","crispEdges")}),r.selectAll("g.points").each(function(n){var i=Kv.select(this),l=n[0].trace;RF(i,l,e)}),EF.getComponentMethod("errorbars","style")(r)}function RF(e,r,t){Qv.pointStyle(e.selectAll("path"),r,t),zF(e,r,t)}function zF(e,r,t){e.selectAll("text").each(function(a){var n=Kv.select(this),i=DF.ensureUniformFontSize(t,NF(n,a,r,t));Qv.font(n,i)})}function ive(e,r,t){var a=r[0].trace;a.selectedpoints?lve(t,a,e):(RF(t,a,e),EF.getComponentMethod("errorbars","style")(t))}function lve(e,r,t){Qv.selectedPointStyle(e.selectAll("path"),r),ove(e.selectAll("text"),r,t)}function ove(e,r,t){e.each(function(a){var n=Kv.select(this),i;if(a.selected){i=DF.ensureUniformFontSize(t,NF(n,a,r,t));var l=r.selected.textfont&&r.selected.textfont.color;l&&(i.color=l),Qv.font(n,i)}else Qv.selectedTextStyle(n,r)})}function NF(e,r,t,a){var n=a._fullLayout.font,i=t.textfont;if(e.classed("bartext-inside")){var l=OF(r,t);i=IF(t,r.i,n,l)}else e.classed("bartext-outside")&&(i=HF(t,r.i,n));return i}function FF(e,r,t){return I5(rve,e.textfont,r,t)}function IF(e,r,t,a){var n=FF(e,r,t),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[r]===void 0;return i&&(n={color:eve.contrast(a),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),I5(tve,e.insidetextfont,r,n)}function HF(e,r,t){var a=FF(e,r,t);return I5(ave,e.outsidetextfont,r,a)}function I5(e,r,t,a){r=r||{};var n=Aa.getValue(r.family,t),i=Aa.getValue(r.size,t),l=Aa.getValue(r.color,t),o=Aa.getValue(r.weight,t),s=Aa.getValue(r.style,t),u=Aa.getValue(r.variant,t),f=Aa.getValue(r.textcase,t),c=Aa.getValue(r.lineposition,t),h=Aa.getValue(r.shadow,t);return{family:Aa.coerceString(e.family,n,a.family),size:Aa.coerceNumber(e.size,i,a.size),color:Aa.coerceColor(e.color,l,a.color),weight:Aa.coerceString(e.weight,o,a.weight),style:Aa.coerceString(e.style,s,a.style),variant:Aa.coerceString(e.variant,u,a.variant),textcase:Aa.coerceString(e.variant,f,a.textcase),lineposition:Aa.coerceString(e.variant,c,a.lineposition),shadow:Aa.coerceString(e.variant,h,a.shadow)}}function OF(e,r){return r.type==="waterfall"?r[e.dir].marker.color:e.mcc||e.mc||r.marker.color}BF.exports={style:nve,styleTextPoints:zF,styleOnSelect:ive,getInsideTextFont:IF,getOutsideTextFont:HF,getBarColor:OF,resizeText:PF}});var Ef=B((k5e,JF)=>{"use strict";var Xp=kr(),Zp=zr(),da=Pe(),sve=va(),uve=xr(),po=Br(),fve=yr(),Jp=$r().tickText,YF=Ei(),cve=YF.recordMinTextSize,vve=YF.clearMinTextSize,H5=ho(),Df=Wp(),hve=Yp(),GF=Tl(),dve=GF.text,pve=GF.textposition,mve=Hi().appendArrayPointValue,Wa=hve.TEXTPAD;function yve(e){return e.id}function gve(e){if(e.ids)return yve}function O5(e){return(e>0)-(e<0)}function Qi(e,r){return e0}function bve(e,r,t,a,n,i){var l=r.xaxis,o=r.yaxis,s=e._fullLayout,u=e._context.staticPlot;n||(n={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},vve("bar",s));var f=da.makeTraceGroups(a,t,"trace bars").each(function(c){var h=Xp.select(this),d=c[0].trace,p=c[0].t,y=d.type==="waterfall",m=d.type==="funnel",_=d.type==="histogram",b=d.type==="bar",T=b||m,x=0;y&&d.connector.visible&&d.connector.mode==="between"&&(x=d.connector.line.width/2);var M=d.orientation==="h",A=VF(n),k=da.ensureSingle(h,"g","points"),L=gve(d),D=k.selectAll("g.point").data(da.identity,L);D.enter().append("g").classed("point",!0),D.exit().remove(),D.each(function(R,z){var H=Xp.select(this),O=xve(R,l,o,M),U=O[0][0],V=O[0][1],Y=O[1][0],I=O[1][1],G=(M?V-U:I-Y)===0;G&&T&&Df.getLineWidth(d,R)&&(G=!1),G||(G=!Zp(U)||!Zp(V)||!Zp(Y)||!Zp(I)),R.isBlank=G,G&&(M?V=U:I=Y),x&&!G&&(M?(U-=Qi(U,V)*x,V+=Qi(U,V)*x):(Y-=Qi(Y,I)*x,I+=Qi(Y,I)*x));var Z,K;if(d.type==="waterfall"){if(!G){var re=d[R.dir].marker;Z=re.line.width,K=re.color}}else Z=Df.getLineWidth(d,R),K=R.mc||d.marker.color;function se(ie){var Ae=Xp.round(Z/2%1,2);return n.gap===0&&n.groupgap===0?Xp.round(Math.round(ie)-Ae,2):ie}function ce(ie,Ae,Ce){return Ce&&ie===Ae?ie:Math.abs(ie-Ae)>=2?se(ie):ie>Ae?Math.ceil(ie):Math.floor(ie)}var le=uve.opacity(K),Q=le<1||Z>.01?se:ce;e._context.staticPlot||(U=Q(U,V,M),V=Q(V,U,M),Y=Q(Y,I,!M),I=Q(I,Y,!M));var ge=M?l.c2p:o.c2p,ue;R.s0>0?ue=R._sMax:R.s0<0?ue=R._sMin:ue=R.s1>0?R._sMax:R._sMin;function ke(ie,Ae){if(!ie)return 0;var Ce=Math.abs(M?I-Y:V-U),cr=Math.abs(M?V-U:I-Y),tr=Q(Math.abs(ge(ue,!0)-ge(0,!0))),De=R.hasB?Math.min(Ce/2,cr/2):Math.min(Ce/2,tr),Le;if(Ae==="%"){var Ye=Math.min(50,ie);Le=Ce*(Ye/100)}else Le=ie;return Q(Math.max(Math.min(Le,De),0))}var ve=b||_?ke(p.cornerradiusvalue,p.cornerradiusform):0,be,W,te="M"+U+","+Y+"V"+I+"H"+V+"V"+Y+"Z",X=0;if(ve&&R.s){var ye=O5(R.s0)===0||O5(R.s)===O5(R.s0)?R.s1:R.s0;if(X=Q(R.hasB?0:Math.abs(ge(ue,!0)-ge(ye,!0))),X0?Math.sqrt(X*(2*ve-X)):0,He=_e>0?Math.max:Math.min;be="M"+U+","+Y+"V"+(I-ze*xe)+"H"+He(V-(ve-X)*_e,U)+"A "+ve+","+ve+" 0 0 "+Ie+" "+V+","+(I-ve*xe-Re)+"V"+(Y+ve*xe+Re)+"A "+ve+","+ve+" 0 0 "+Ie+" "+He(V-(ve-X)*_e,U)+","+(Y+ze*xe)+"Z"}else if(R.hasB)be="M"+(U+ve*_e)+","+Y+"A "+ve+","+ve+" 0 0 "+Ie+" "+U+","+(Y+ve*xe)+"V"+(I-ve*xe)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(U+ve*_e)+","+I+"H"+(V-ve*_e)+"A "+ve+","+ve+" 0 0 "+Ie+" "+V+","+(I-ve*xe)+"V"+(Y+ve*xe)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(V-ve*_e)+","+Y+"Z";else{W=Math.abs(I-Y)+X;var Be=W0?Math.sqrt(X*(2*ve-X)):0,Ee=xe>0?Math.max:Math.min;be="M"+(U+Be*_e)+","+Y+"V"+Ee(I-(ve-X)*xe,Y)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(U+ve*_e-Fe)+","+I+"H"+(V-ve*_e+Fe)+"A "+ve+","+ve+" 0 0 "+Ie+" "+(V-Be*_e)+","+Ee(I-(ve-X)*xe,Y)+"V"+Y+"Z"}}else be=te}else be=te;var Je=UF(da.ensureSingle(H,"path"),s,n,i);if(Je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((V-U)*(I-Y))||G&&e._context.staticPlot?"M0,0Z":be).call(po.setClipUrl,r.layerClipId,e),!s.uniformtext.mode&&A){var We=po.makePointStyleFns(d);po.singlePointStyle(R,Je,d,We,e)}_ve(e,r,H,c,z,U,V,Y,I,ve,X,n,i),r.layerClipId&&po.hideOutsideRangePoint(R,H.select("text"),l,o,d.xcalendar,d.ycalendar)});var E=d.cliponaxis===!1;po.setClipUrl(h,E?null:r.layerClipId,e)});fve.getComponentMethod("errorbars","plot")(e,f,r,n)}function _ve(e,r,t,a,n,i,l,o,s,u,f,c,h){var d=r.xaxis,p=r.yaxis,y=e._fullLayout,m;function _(W,te,X){var ye=da.ensureSingle(W,"text").text(te).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(po.font,X).call(sve.convertToTspans,e);return ye}var b=a[0].trace,T=b.orientation==="h",x=Mve(y,a,n,d,p);m=Ave(b,n);var M=c.mode==="stack"||c.mode==="relative",A=a[n],k=!M||A._outmost,L=A.hasB,D=u&&u-f>Wa;if(!x||m==="none"||(A.isBlank||i===l||o===s)&&(m==="auto"||m==="inside")){t.select("text").remove();return}var E=y.font,R=H5.getBarColor(a[n],b),z=H5.getInsideTextFont(b,n,E,R),H=H5.getOutsideTextFont(b,n,E),O=b.insidetextanchor||"end",U=t.datum();T?d.type==="log"&&U.s0<=0&&(d.range[0]0&&se>0,Q;D?L?Q=Ps(I-2*u,G,re,se,T)||Ps(I,G-2*u,re,se,T):T?Q=Ps(I-(u-f),G,re,se,T)||Ps(I,G-2*(u-f),re,se,T):Q=Ps(I,G-(u-f),re,se,T)||Ps(I-2*(u-f),G,re,se,T):Q=Ps(I,G,re,se,T),le&&Q?m="inside":(m="outside",Z.remove(),Z=null)}else m="inside";if(!Z){ce=da.ensureUniformFontSize(e,m==="outside"?H:z),Z=_(t,x,ce);var ge=Z.attr("transform");if(Z.attr("transform",""),K=po.bBox(Z.node()),re=K.width,se=K.height,Z.attr("transform",ge),re<=0||se<=0){Z.remove();return}}var ue=b.textangle,ke,ve;m==="outside"?(ve=b.constraintext==="both"||b.constraintext==="outside",ke=Tve(i,l,o,s,K,{isHorizontal:T,constrained:ve,angle:ue})):(ve=b.constraintext==="both"||b.constraintext==="inside",ke=ZF(i,l,o,s,K,{isHorizontal:T,constrained:ve,angle:ue,anchor:O,hasB:L,r:u,overhead:f})),ke.fontSize=ce.size,cve(b.type==="histogram"?"bar":b.type,ke,y),A.transform=ke;var be=UF(Z,y,c,h);da.setTransormAndDisplay(be,ke)}function Ps(e,r,t,a,n){if(e<0||r<0)return!1;var i=t<=e&&a<=r,l=t<=r&&a<=e,o=n?e>=t*(r/a):r>=a*(e/t);return i||l||o}function WF(e){return e==="auto"?0:e}function XF(e,r){var t=Math.PI/180*r,a=Math.abs(Math.sin(t)),n=Math.abs(Math.cos(t));return{x:e.width*n+e.height*a,y:e.width*a+e.height*n}}function ZF(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=i.anchor,f=u==="end",c=u==="start",h=i.leftToRight||0,d=(h+1)/2,p=1-d,y=i.hasB,m=i.r,_=i.overhead,b=n.width,T=n.height,x=Math.abs(r-e),M=Math.abs(a-t),A=x>2*Wa&&M>2*Wa?Wa:0;x-=2*A,M-=2*A;var k=WF(s);s==="auto"&&!(b<=x&&T<=M)&&(b>x||T>M)&&(!(b>M||T>x)||bWa){var R=wve(e,r,t,a,L,m,_,l,y);D=R.scale,E=R.pad}else D=1,o&&(D=Math.min(1,x/L.x,M/L.y)),E=0;var z=n.left*p+n.right*d,H=(n.top+n.bottom)/2,O=(e+Wa)*p+(r-Wa)*d,U=(t+a)/2,V=0,Y=0;if(c||f){var I=(l?L.x:L.y)/2;m&&(f||y)&&(A+=E);var G=l?Qi(e,r):Qi(t,a);l?c?(O=e+G*A,V=-G*I):(O=r-G*A,V=G*I):c?(U=t+G*A,Y=-G*I):(U=a-G*A,Y=G*I)}return{textX:z,textY:H,targetX:O,targetY:U,anchorX:V,anchorY:Y,scale:D,rotate:k}}function wve(e,r,t,a,n,i,l,o,s){var u=Math.max(0,Math.abs(r-e)-2*Wa),f=Math.max(0,Math.abs(a-t)-2*Wa),c=i-Wa,h=l?c-Math.sqrt(c*c-(c-l)*(c-l)):c,d=s?c*2:o?c-l:2*h,p=s?c*2:o?2*h:c-l,y,m,_,b,T;return n.y/n.x>=f/(u-d)?b=f/n.y:n.y/n.x<=(f-p)/u?b=u/n.x:!s&&o?(y=n.x*n.x+n.y*n.y/4,m=-2*n.x*(u-c)-n.y*(f/2-c),_=(u-c)*(u-c)+(f/2-c)*(f/2-c)-c*c,b=(-m+Math.sqrt(m*m-4*y*_))/(2*y)):s?(y=(n.x*n.x+n.y*n.y)/4,m=-n.x*(u/2-c)-n.y*(f/2-c),_=(u/2-c)*(u/2-c)+(f/2-c)*(f/2-c)-c*c,b=(-m+Math.sqrt(m*m-4*y*_))/(2*y)):(y=n.x*n.x/4+n.y*n.y,m=-n.x*(u/2-c)-2*n.y*(f-c),_=(u/2-c)*(u/2-c)+(f-c)*(f-c)-c*c,b=(-m+Math.sqrt(m*m-4*y*_))/(2*y)),b=Math.min(1,b),o?T=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-n.y*b)/2)*(c-(f-n.y*b)/2)))-l):T=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(u-n.x*b)/2)*(c-(u-n.x*b)/2)))-l),{scale:b,pad:T}}function Tve(e,r,t,a,n,i){var l=!!i.isHorizontal,o=!!i.constrained,s=i.angle||0,u=n.width,f=n.height,c=Math.abs(r-e),h=Math.abs(a-t),d;l?d=h>2*Wa?Wa:0:d=c>2*Wa?Wa:0;var p=1;o&&(p=l?Math.min(1,h/f):Math.min(1,c/u));var y=WF(s),m=XF(n,y),_=(l?m.x:m.y)/2,b=(n.left+n.right)/2,T=(n.top+n.bottom)/2,x=(e+r)/2,M=(t+a)/2,A=0,k=0,L=l?Qi(r,e):Qi(t,a);return l?(x=r-L*d,A=L*_):(M=a+L*d,k=-L*_),{textX:b,textY:T,targetX:x,targetY:M,anchorX:A,anchorY:k,scale:p,rotate:y}}function Mve(e,r,t,a,n){var i=r[0].trace,l=i.texttemplate,o;return l?o=kve(e,r,t,a,n):i.textinfo?o=qve(r,t,a,n):o=Df.getValue(i.text,t),Df.coerceString(dve,o)}function Ave(e,r){var t=Df.getValue(e.textposition,r);return Df.coerceEnumerated(pve,t)}function kve(e,r,t,a,n){var i=r[0].trace,l=da.castOption(i,t,"texttemplate");if(!l)return"";var o=i.type==="histogram",s=i.type==="waterfall",u=i.type==="funnel",f=i.orientation==="h",c,h,d,p;f?(c="y",h=n,d="x",p=a):(c="x",h=a,d="y",p=n);function y(A){return Jp(h,h.c2l(A),!0).text}function m(A){return Jp(p,p.c2l(A),!0).text}var _=r[t],b={};b.label=_.p,b.labelLabel=b[c+"Label"]=y(_.p);var T=da.castOption(i,_.i,"text");(T===0||T)&&(b.text=T),b.value=_.s,b.valueLabel=b[d+"Label"]=m(_.s);var x={};mve(x,i,_.i),(o||x.x===void 0)&&(x.x=f?b.value:b.label),(o||x.y===void 0)&&(x.y=f?b.label:b.value),(o||x.xLabel===void 0)&&(x.xLabel=f?b.valueLabel:b.labelLabel),(o||x.yLabel===void 0)&&(x.yLabel=f?b.labelLabel:b.valueLabel),s&&(b.delta=+_.rawS||_.s,b.deltaLabel=m(b.delta),b.final=_.v,b.finalLabel=m(b.final),b.initial=b.final-b.delta,b.initialLabel=m(b.initial)),u&&(b.value=_.s,b.valueLabel=m(b.value),b.percentInitial=_.begR,b.percentInitialLabel=da.formatPercent(_.begR),b.percentPrevious=_.difR,b.percentPreviousLabel=da.formatPercent(_.difR),b.percentTotal=_.sumR,b.percenTotalLabel=da.formatPercent(_.sumR));var M=da.castOption(i,_.i,"customdata");return M&&(b.customdata=M),da.texttemplateString(l,b,e._d3locale,x,b,i._meta||{})}function qve(e,r,t,a){var n=e[0].trace,i=n.orientation==="h",l=n.type==="waterfall",o=n.type==="funnel";function s(M){var A=i?a:t;return Jp(A,M,!0).text}function u(M){var A=i?t:a;return Jp(A,+M,!0).text}var f=n.textinfo,c=e[r],h=f.split("+"),d=[],p,y=function(M){return h.indexOf(M)!==-1};if(y("label")&&d.push(s(e[r].p)),y("text")&&(p=da.castOption(n,c.i,"text"),(p===0||p)&&d.push(p)),l){var m=+c.rawS||c.s,_=c.v,b=_-m;y("initial")&&d.push(u(b)),y("delta")&&d.push(u(m)),y("final")&&d.push(u(_))}if(o){y("value")&&d.push(u(c.s));var T=0;y("percent initial")&&T++,y("percent previous")&&T++,y("percent total")&&T++;var x=T>1;y("percent initial")&&(p=da.formatPercent(c.begR),x&&(p+=" of initial"),d.push(p)),y("percent previous")&&(p=da.formatPercent(c.difR),x&&(p+=" of previous"),d.push(p)),y("percent total")&&(p=da.formatPercent(c.sumR),x&&(p+=" of total"),d.push(p))}return d.join("
")}JF.exports={plot:bve,toMoveInsideBar:ZF}});var e0=B((q5e,jF)=>{"use strict";var jv=gi(),Cve=yr(),$F=xr(),Lve=Pe().fillText,Sve=Wp().getLineWidth,B5=$r().hoverLabelText,Dve=wt().BADNUM;function Eve(e,r,t,a,n){var i=KF(e,r,t,a,n);if(i){var l=i.cd,o=l[0].trace,s=l[i.index];return i.color=QF(o,s),Cve.getComponentMethod("errorbars","hoverInfo")(s,o,i),[i]}}function KF(e,r,t,a,n){var i=e.cd,l=i[0].trace,o=i[0].t,s=a==="closest",u=l.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,h,d,p,y,m,_,b;l.orientation==="h"?(h=t,d=r,p="y",y="x",m=U,_=z):(h=r,d=t,p="x",y="y",_=U,m=z);var T=l[p+"period"],x=s||T;function M(Q){return k(Q,-1)}function A(Q){return k(Q,1)}function k(Q,ge){var ue=Q.w;return Q[p]+ge*ue/2}function L(Q){return Q[p+"End"]-Q[p+"Start"]}var D=s?M:T?function(Q){return Q.p-L(Q)/2}:function(Q){return Math.min(M(Q),Q.p-o.bardelta/2)},E=s?A:T?function(Q){return Q.p+L(Q)/2}:function(Q){return Math.max(A(Q),Q.p+o.bardelta/2)};function R(Q,ge,ue){return n.finiteRange&&(ue=0),jv.inbox(Q-h,ge-h,ue+Math.min(1,Math.abs(ge-Q)/b)-1)}function z(Q){return R(D(Q),E(Q),f)}function H(Q){return R(M(Q),A(Q),c)}function O(Q){var ge=Q[y];if(u){var ue=Math.abs(Q.rawS)||0;d>0?ge+=ue:d<0&&(ge-=ue)}return ge}function U(Q){var ge=d,ue=Q.b,ke=O(Q);return jv.inbox(ue-ge,ke-ge,f+(ke-ge)/(ke-ue)-1)}function V(Q){var ge=d,ue=Q.b,ke=O(Q);return jv.inbox(ue-ge,ke-ge,c+(ke-ge)/(ke-ue)-1)}var Y=e[p+"a"],I=e[y+"a"];b=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));function G(Q){return(m(Q)+_(Q))/2}var Z=jv.getDistanceFunction(a,m,_,G);if(jv.getClosest(i,Z,e),e.index!==!1&&i[e.index].p!==Dve){x||(D=function(Q){return Math.min(M(Q),Q.p-o.bargroupwidth/2)},E=function(Q){return Math.max(A(Q),Q.p+o.bargroupwidth/2)});var K=e.index,re=i[K],se=l.base?re.b+re.s:re.s;e[y+"0"]=e[y+"1"]=I.c2p(re[y],!0),e[y+"LabelVal"]=se;var ce=o.extents[o.extents.round(re.p)];e[p+"0"]=Y.c2p(s?D(re):ce[0],!0),e[p+"1"]=Y.c2p(s?E(re):ce[1],!0);var le=re.orig_p!==void 0;return e[p+"LabelVal"]=le?re.orig_p:re.p,e.labelLabel=B5(Y,e[p+"LabelVal"],l[p+"hoverformat"]),e.valueLabel=B5(I,e[y+"LabelVal"],l[y+"hoverformat"]),e.baseLabel=B5(I,re.b,l[y+"hoverformat"]),e.spikeDistance=(V(re)+H(re))/2,e[p+"Spike"]=Y.c2p(re.p,!0),Lve(re,l,e),e.hovertemplate=l.hovertemplate,e}}function QF(e,r){var t=r.mcc||e.marker.color,a=r.mlcc||e.marker.line.color,n=Sve(e,r);if($F.opacity(t))return t;if($F.opacity(a)&&n)return a}jF.exports={hoverPoints:Eve,hoverOnBars:KF,getTraceColor:QF}});var rI=B((C5e,eI)=>{"use strict";eI.exports=function(r,t,a){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),a.orientation==="h"?(r.label=r.y,r.value=r.x):(r.label=r.x,r.value=r.y),r}});var r0=B((L5e,tI)=>{"use strict";tI.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=a[0].trace,o=l.type==="funnel",s=l.orientation==="h",u=[],f;if(t===!1)for(f=0;f{"use strict";aI.exports={attributes:Tl(),layoutAttributes:Gp(),supplyDefaults:Ki().supplyDefaults,crossTraceDefaults:Ki().crossTraceDefaults,supplyLayoutDefaults:N5(),calc:qF(),crossTraceCalc:hf().crossTraceCalc,colorbar:np(),arraysToCalcdata:Vp(),plot:Ef().plot,style:ho().style,styleOnSelect:ho().styleOnSelect,hoverPoints:e0().hoverPoints,eventData:rI(),selectPoints:r0(),moduleType:"trace",name:"bar",basePlotModule:gl(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var lI=B((D5e,iI)=>{"use strict";iI.exports=nI()});var sI=B((E5e,oI)=>{"use strict";oI.exports=function(r,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var fI=B((P5e,uI)=>{"use strict";uI.exports={eventDataKeys:["binNumber"]}});var U5=B((R5e,hI)=>{"use strict";var pn=Tl(),cI=di().axisHoverFormat,Rve=_a().hovertemplateAttrs,zve=_a().texttemplateAttrs,Y5=jt(),vI=sI(),Nve=fI(),G5=mt().extendFlat;hI.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:cI("x"),yhoverformat:cI("y"),text:G5({},pn.text,{}),hovertext:G5({},pn.hovertext,{}),orientation:pn.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:vI("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:vI("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:Rve({},{keys:Nve.eventDataKeys}),texttemplate:zve({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:G5({},pn.textposition,{arrayOk:!1}),textfont:Y5({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:Y5({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:Y5({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:pn.insidetextanchor,textangle:pn.textangle,cliponaxis:pn.cliponaxis,constraintext:pn.constraintext,marker:pn.marker,offsetgroup:pn.offsetgroup,alignmentgroup:pn.alignmentgroup,selected:pn.selected,unselected:pn.unselected,zorder:pn.zorder}});var yI=B((z5e,mI)=>{"use strict";var dI=yr(),t0=Pe(),pI=xr(),Fve=Ki().handleText,Ive=z5(),Hve=U5();mI.exports=function(r,t,a,n){function i(b,T){return t0.coerce(r,t,Hve,b,T)}var l=i("x"),o=i("y"),s=i("cumulative.enabled");s&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");Fve(r,t,n,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat");var f=i("orientation",o&&!l?"h":"v"),c=f==="v"?"x":"y",h=f==="v"?"y":"x",d=l&&o?Math.min(t0.minRowLength(l)&&t0.minRowLength(o)):t0.minRowLength(t[c]||[]);if(!d){t.visible=!1;return}t._length=d;var p=dI.getComponentMethod("calendars","handleTraceDefaults");p(r,t,["x","y"],n);var y=t[h];y&&i("histfunc"),i("histnorm"),i("autobin"+c),Ive(r,t,i,a,n),t0.coerceSelectionMarkerOpacity(t,i);var m=(t.marker.line||{}).color,_=dI.getComponentMethod("errorbars","supplyDefaults");_(r,t,m||pI.defaultLine,{axis:"y"}),_(r,t,m||pI.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var _I=B((N5e,bI)=>{"use strict";var a0=Pe(),Ove=Jt(),$p=yr().traceIs,Bve=ff(),Yve=Ki().validateCornerradius,gI=a0.nestedProperty,V5=ys().getAxisGroup,xI=[{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"}],Gve=["x","y"];bI.exports=function(r,t){var a=t._histogramBinOpts={},n=[],i={},l=[],o,s,u,f,c,h,d;function p(U,V){return a0.coerce(o._input,o,o._module.attributes,U,V)}function y(U){return U.orientation==="v"?"x":"y"}function m(U,V){var Y=Ove.getFromTrace({_fullLayout:t},U,V);return Y.type}function _(U,V,Y){var I=U.uid+"__"+Y;V||(V=I);var G=m(U,Y),Z=U[Y+"calendar"]||"",K=a[V],re=!0;K&&(G===K.axType&&Z===K.calendar?(re=!1,K.traces.push(U),K.dirs.push(Y)):(V=I,G!==K.axType&&a0.warn(["Attempted to group the bins of trace",U.index,"set on a","type:"+G,"axis","with bins on","type:"+K.axType,"axis."].join(" ")),Z!==K.calendar&&a0.warn(["Attempted to group the bins of trace",U.index,"set with a",Z,"calendar","with bins",K.calendar?"on a "+K.calendar+" calendar":"w/o a set calendar"].join(" ")))),re&&(a[V]={traces:[U],dirs:[Y],axType:G,calendar:U[Y+"calendar"]||""}),U["_"+Y+"bingroup"]=V}for(c=0;c{"use strict";var Pf=zr();wI.exports={count:function(e,r,t){return t[e]++,1},sum:function(e,r,t,a){var n=a[r];return Pf(n)?(n=Number(n),t[e]+=n,n):0},avg:function(e,r,t,a,n){var i=a[r];return Pf(i)&&(i=Number(i),t[e]+=i,n[e]++),0},min:function(e,r,t,a){var n=a[r];if(Pf(n))if(n=Number(n),Pf(t[e])){if(t[e]>n){var i=n-t[e];return t[e]=n,i}}else return t[e]=n,n;return 0},max:function(e,r,t,a){var n=a[r];if(Pf(n))if(n=Number(n),Pf(t[e])){if(t[e]{"use strict";MI.exports={percent:function(e,r){for(var t=e.length,a=100/r,n=0;n{"use strict";kI.exports=function(r,t){for(var a=r.length,n=0,i=0;i{"use strict";var Rf=wt(),Rs=Rf.ONEAVGYEAR,CI=Rf.ONEAVGMONTH,Qp=Rf.ONEDAY,LI=Rf.ONEHOUR,SI=Rf.ONEMIN,DI=Rf.ONESEC,EI=$r().tickIncrement;zI.exports=function(r,t,a,n,i){var l=-1.1*t,o=-.1*t,s=r-o,u=a[0],f=a[1],c=Math.min(Kp(u+o,u+s,n,i),Kp(f+o,f+s,n,i)),h=Math.min(Kp(u+l,u+o,n,i),Kp(f+l,f+o,n,i)),d,p;if(c>h&&hQp){var y=d===Rs?1:6,m=d===Rs?"M12":"M1";return function(_,b){var T=n.c2d(_,Rs,i),x=T.indexOf("-",y);x>0&&(T=T.substr(0,x));var M=n.d2c(T,0,i);if(M<_){var A=EI(M,m,!1,i);(M+A)/2<_+r&&(M=A)}return b&&p?EI(M,m,!0,i):M}}return function(_,b){var T=d*Math.round(_/d);return T+d/10<_&&T+d*.9<_+r&&(T+=d),b&&p&&(T-=d),T}};function Kp(e,r,t,a){if(e*r<=0)return 1/0;for(var n=Math.abs(r-e),i=t.type==="date",l=PI(n,i),o=0;o<10;o++){var s=PI(l*80,i);if(l===s)break;if(Uve(s,e,r,i,t,a))l=s;else break}return l}function PI(e,r){return r&&e>DI?e>Qp?e>Rs*1.1?Rs:e>CI*1.1?CI:Qp:e>LI?LI:e>SI?SI:DI:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function Uve(e,r,t,a,n,i){if(a&&e>Qp){var l=RI(r,n,i),o=RI(t,n,i),s=e===Rs?0:1;return l[s]!==o[s]}return Math.floor(t/e)-Math.floor(r/e)>.1}function RI(e,r,t){var a=r.c2d(e,Rs,t).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}});var OI=B((B5e,HI)=>{"use strict";var W5=zr(),Xa=Pe(),FI=yr(),ei=$r(),Vve=Vp(),II=TI(),Wve=AI(),Xve=qI(),Zve=NI();function Jve(e,r){var t=[],a=[],n=r.orientation==="h",i=ei.getFromId(e,n?r.yaxis:r.xaxis),l=n?"y":"x",o={x:"y",y:"x"}[l],s=r[l+"calendar"],u=r.cumulative,f,c=X5(e,r,i,l),h=c[0],d=c[1],p=typeof h.size=="string",y=[],m=p?y:h,_=[],b=[],T=[],x=0,M=r.histnorm,A=r.histfunc,k=M.indexOf("density")!==-1,L,D,E;u.enabled&&k&&(M=M.replace(/ ?density$/,""),k=!1);var R=A==="max"||A==="min",z=R?null:0,H=II.count,O=Wve[M],U=!1,V=function(W){return i.r2c(W,0,s)},Y;for(Xa.isArrayOrTypedArray(r[o])&&A!=="count"&&(Y=r[o],U=A==="avg",H=II[A]),f=V(h.start),D=V(h.end)+(f-ei.tickIncrement(f,h.size,!1,s))/1e6;f=0&&E=ke;f--)if(a[f]){ve=f;break}for(f=ke;f<=ve;f++)if(W5(t[f])&&W5(a[f])){var be={p:t[f],s:a[f],b:0};u.enabled||(be.pts=T[f],K?be.ph0=be.ph1=T[f].length?d[T[f][0]]:t[f]:(r._computePh=!0,be.ph0=Q(y[f]),be.ph1=Q(y[f+1],!0))),ue.push(be)}return ue.length===1&&(ue[0].width1=ei.tickIncrement(ue[0].p,h.size,!1,s)-ue[0].p),Vve(ue,r),Xa.isArrayOrTypedArray(r.selectedpoints)&&Xa.tagSelected(ue,r,ce),ue}function X5(e,r,t,a,n){var i=a+"bins",l=e._fullLayout,o=r["_"+a+"bingroup"],s=l._histogramBinOpts[o],u=l.barmode==="overlay",f,c,h,d,p,y,m,_=function(le){return t.r2c(le,0,d)},b=function(le){return t.c2r(le,0,d)},T=t.type==="date"?function(le){return le||le===0?Xa.cleanDate(le,null,d):null}:function(le){return W5(le)?Number(le):null};function x(le,Q,ge){Q[le+"Found"]?(Q[le]=T(Q[le]),Q[le]===null&&(Q[le]=ge[le])):(y[le]=Q[le]=ge[le],Xa.nestedProperty(c[0],i+"."+le).set(ge[le]))}if(r["_"+a+"autoBinFinished"])delete r["_"+a+"autoBinFinished"];else{c=s.traces;var M=[],A=!0,k=!1,L=!1;for(f=0;ft.r2l(Y)&&(G=ei.tickIncrement(G,s.size,!0,d)),H.start=t.l2r(G),V||Xa.nestedProperty(r,i+".start").set(H.start)}var Z=s.end,K=t.r2l(z.end),re=K!==void 0;if((s.endFound||re)&&K!==t.r2l(Z)){var se=re?K:Xa.aggNums(Math.max,null,p);H.end=t.l2r(se),re||Xa.nestedProperty(r,i+".start").set(H.end)}var ce="autobin"+a;return r._input[ce]===!1&&(r._input[i]=Xa.extendFlat({},r[i]||{}),delete r._input[ce],delete r[ce]),[H,p]}function $ve(e,r,t,a,n){var i=e._fullLayout,l=Kve(e,r),o=!1,s=1/0,u=[r],f,c,h;for(f=0;f=0;a--)o(a);else if(r==="increasing"){for(a=1;a=0;a--)e[a]+=e[a+1];t==="exclude"&&(e.push(0),e.shift())}}HI.exports={calc:Jve,calcAllAutoBins:X5}});var YI=B((Y5e,BI)=>{"use strict";var jve=e0().hoverPoints,e0e=$r().hoverLabelText;BI.exports=function(r,t,a,n,i){var l=jve(r,t,a,n,i);if(l){r=l[0];var o=r.cd[r.index],s=r.cd[0].trace;if(!s.cumulative.enabled){var u=s.orientation==="h"?"y":"x";r[u+"Label"]=e0e(r[u+"a"],[o.ph0,o.ph1],s[u+"hoverformat"])}return l}}});var UI=B((G5e,GI)=>{"use strict";GI.exports=function(r,t,a,n,i){if(r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(r.z=t.zLabelVal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),!(a.cumulative||{}).enabled){var l=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;r.pointNumbers=l,r.binNumber=r.pointNumber,delete r.pointNumber,delete r.pointIndex;var o;if(a._indexToPoints){o=[];for(var s=0;s{"use strict";VI.exports={attributes:U5(),layoutAttributes:Gp(),supplyDefaults:yI(),crossTraceDefaults:_I(),supplyLayoutDefaults:N5(),calc:OI().calc,crossTraceCalc:hf().crossTraceCalc,plot:Ef().plot,layerName:"barlayer",style:ho().style,styleOnSelect:ho().styleOnSelect,colorbar:np(),hoverPoints:YI(),selectPoints:r0(),eventData:UI(),moduleType:"trace",name:"histogram",basePlotModule:gl(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var ZI=B((V5e,XI)=>{"use strict";XI.exports=WI()});var $I=B((W5e,JI)=>{"use strict";JI.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var J5=B((X5e,jI)=>{"use strict";var pt=Tl(),Z5=bi().line,r0e=tn(),KI=di().axisHoverFormat,t0e=_a().hovertemplateAttrs,a0e=_a().texttemplateAttrs,QI=$I(),Ml=mt().extendFlat,n0e=xr();jI.exports={x:pt.x,x0:pt.x0,dx:pt.dx,y:pt.y,y0:pt.y0,dy:pt.dy,xperiod:pt.xperiod,yperiod:pt.yperiod,xperiod0:pt.xperiod0,yperiod0:pt.yperiod0,xperiodalignment:pt.xperiodalignment,yperiodalignment:pt.yperiodalignment,xhoverformat:KI("x"),yhoverformat:KI("y"),hovertext:pt.hovertext,hovertemplate:t0e({},{keys:QI.eventDataKeys}),hoverinfo:Ml({},r0e.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:a0e({editType:"plot"},{keys:QI.eventDataKeys.concat(["label","value"])}),text:pt.text,textposition:pt.textposition,insidetextanchor:Ml({},pt.insidetextanchor,{dflt:"middle"}),textangle:Ml({},pt.textangle,{dflt:0}),textfont:pt.textfont,insidetextfont:pt.insidetextfont,outsidetextfont:pt.outsidetextfont,constraintext:pt.constraintext,cliponaxis:pt.cliponaxis,orientation:Ml({},pt.orientation,{}),offset:Ml({},pt.offset,{arrayOk:!1}),width:Ml({},pt.width,{arrayOk:!1}),marker:i0e(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ml({},Z5.color,{dflt:n0e.defaultLine}),width:Ml({},Z5.width,{dflt:0,editType:"plot"}),dash:Z5.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:pt.offsetgroup,alignmentgroup:pt.alignmentgroup,zorder:pt.zorder};function i0e(){var e=Ml({},pt.marker);return delete e.pattern,delete e.cornerradius,e}});var $5=B((Z5e,eH)=>{"use strict";eH.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 Q5=B((J5e,tH)=>{"use strict";var jp=Pe(),l0e=ff(),o0e=Ki().handleText,s0e=Dv(),u0e=_s(),rH=J5(),K5=xr();function f0e(e,r,t,a){function n(c,h){return jp.coerce(e,r,rH,c,h)}var i=s0e(e,r,a,n);if(!i){r.visible=!1;return}u0e(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("orientation",r.y&&!r.x?"v":"h"),n("offset"),n("width");var l=n("text");n("hovertext"),n("hovertemplate");var o=n("textposition");o0e(e,r,a,n,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r.textposition!=="none"&&!r.texttemplate&&n("textinfo",jp.isArrayOrTypedArray(l)?"text+value":"value");var s=n("marker.color",t);n("marker.line.color",K5.defaultLine),n("marker.line.width");var u=n("connector.visible");if(u){n("connector.fillcolor",c0e(s));var f=n("connector.line.width");f&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function c0e(e){var r=jp.isArrayOrTypedArray(e)?"#000":e;return K5.addOpacity(r,.5*K5.opacity(r))}function v0e(e,r){var t,a;function n(l){return jp.coerce(a._input,a,rH,l)}for(var i=0;i{"use strict";var h0e=Pe(),d0e=$5();aH.exports=function(e,r,t){var a=!1;function n(o,s){return h0e.coerce(e,r,d0e,o,s)}for(var i=0;i{"use strict";var zf=Pe();iH.exports=function(r,t){for(var a=0;a{"use strict";var oH=$r(),sH=ws(),p0e=lH(),m0e=Ev(),n0=wt().BADNUM;uH.exports=function(r,t){var a=oH.getFromId(r,t.xaxis||"x"),n=oH.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f,c,h;t.orientation==="h"?(i=a.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=sH(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y"),o=a.makeCalcdata(t,"x"),s=sH(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;var d=Math.min(l.length,i.length),p=new Array(d);for(t._base=[],c=0;c{"use strict";var cH=hf().setGroupPositions;vH.exports=function(r,t){var a=r._fullLayout,n=r._fullData,i=r.calcdata,l=t.xaxis,o=t.yaxis,s=[],u=[],f=[],c,h;for(h=0;h{"use strict";var em=kr(),yo=Pe(),dH=Br(),mo=wt().BADNUM,y0e=Ef(),g0e=Ei().clearMinTextSize;mH.exports=function(r,t,a,n){var i=r._fullLayout;g0e("funnel",i),x0e(r,t,a,n),b0e(r,t,a,n),y0e.plot(r,t,a,n,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function x0e(e,r,t,a){var n=r.xaxis,i=r.yaxis;yo.makeTraceGroups(a,t,"trace bars").each(function(l){var o=em.select(this),s=l[0].trace,u=yo.ensureSingle(o,"g","regions");if(!s.connector||!s.connector.visible){u.remove();return}var f=s.orientation==="h",c=u.selectAll("g.region").data(yo.identity);c.enter().append("g").classed("region",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var y=pH(d,n,i,f),m=y[0],_=y[1],b="";m[0]!==mo&&_[0]!==mo&&m[1]!==mo&&_[1]!==mo&&m[2]!==mo&&_[2]!==mo&&m[3]!==mo&&_[3]!==mo&&(f?b+="M"+m[0]+","+_[1]+"L"+m[2]+","+_[2]+"H"+m[3]+"L"+m[1]+","+_[1]+"Z":b+="M"+m[1]+","+_[1]+"L"+m[2]+","+_[3]+"V"+_[2]+"L"+m[1]+","+_[0]+"Z"),b===""&&(b="M0,0Z"),yo.ensureSingle(em.select(this),"path").attr("d",b).call(dH.setClipUrl,r.layerClipId,e)}})})}function b0e(e,r,t,a){var n=r.xaxis,i=r.yaxis;yo.makeTraceGroups(a,t,"trace bars").each(function(l){var o=em.select(this),s=l[0].trace,u=yo.ensureSingle(o,"g","lines");if(!s.connector||!s.connector.visible||!s.connector.line.width){u.remove();return}var f=s.orientation==="h",c=u.selectAll("g.line").data(yo.identity);c.enter().append("g").classed("line",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var y=pH(d,n,i,f),m=y[0],_=y[1],b="";m[3]!==void 0&&_[3]!==void 0&&(f?(b+="M"+m[0]+","+_[1]+"L"+m[2]+","+_[2],b+="M"+m[1]+","+_[1]+"L"+m[3]+","+_[2]):(b+="M"+m[1]+","+_[1]+"L"+m[2]+","+_[3],b+="M"+m[1]+","+_[0]+"L"+m[2]+","+_[2])),b===""&&(b="M0,0Z"),yo.ensureSingle(em.select(this),"path").attr("d",b).call(dH.setClipUrl,r.layerClipId,e)}})})}function pH(e,r,t,a){var n=[],i=[],l=a?r:t,o=a?t:r;return n[0]=l.c2p(e.s0,!0),i[0]=o.c2p(e.p0,!0),n[1]=l.c2p(e.s1,!0),i[1]=o.c2p(e.p1,!0),n[2]=l.c2p(e.nextS0,!0),i[2]=o.c2p(e.nextP0,!0),n[3]=l.c2p(e.nextS1,!0),i[3]=o.c2p(e.nextP1,!0),a?[n,i]:[i,n]}});var bH=B((rbe,xH)=>{"use strict";var i0=kr(),gH=Br(),eb=xr(),_0e=pu().DESELECTDIM,w0e=ho(),T0e=Ei().resizeText,M0e=w0e.styleTextPoints;function A0e(e,r,t){var a=t||i0.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");T0e(e,a,"funnel"),a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=i0.select(this),l=n[0].trace;i.selectAll(".point > path").each(function(o){if(!o.isBlank){var s=l.marker;i0.select(this).call(eb.fill,o.mc||s.color).call(eb.stroke,o.mlc||s.line.color).call(gH.dashLine,s.line.dash,o.mlw||s.line.width).style("opacity",l.selectedpoints&&!o.selected?_0e:1)}}),M0e(i,l,e),i.selectAll(".regions").each(function(){i0.select(this).selectAll("path").style("stroke-width",0).call(eb.fill,l.connector.fillcolor)}),i.selectAll(".lines").each(function(){var o=l.connector.line;gH.lineGroupStyle(i0.select(this).selectAll("path"),o.width,o.color,o.dash)})})}xH.exports={style:A0e}});var TH=B((tbe,wH)=>{"use strict";var _H=xr().opacity,k0e=e0().hoverOnBars,rb=Pe().formatPercent;wH.exports=function(r,t,a,n,i){var l=k0e(r,t,a,n,i);if(l){var o=l.cd,s=o[0].trace,u=s.orientation==="h",f=l.index,c=o[f],h=u?"x":"y";l[h+"LabelVal"]=c.s,l.percentInitial=c.begR,l.percentInitialLabel=rb(c.begR,1),l.percentPrevious=c.difR,l.percentPreviousLabel=rb(c.difR,1),l.percentTotal=c.sumR,l.percentTotalLabel=rb(c.sumR,1);var d=c.hi||s.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var y=d==="all",m=d.split("+"),_=function(b){return y||m.indexOf(b)!==-1};_("percent initial")&&p.push(l.percentInitialLabel+" of initial"),_("percent previous")&&p.push(l.percentPreviousLabel+" of previous"),_("percent total")&&p.push(l.percentTotalLabel+" of total")}return l.extraText=p.join("
"),l.color=q0e(s,c),[l]}};function q0e(e,r){var t=e.marker,a=r.mc||t.color,n=r.mlc||t.line.color,i=r.mlw||t.line.width;if(_H(a))return a;if(_H(n)&&i)return n}});var AH=B((abe,MH)=>{"use strict";MH.exports=function(r,t){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(r.percentInitial=t.percentInitial),"percentPrevious"in t&&(r.percentPrevious=t.percentPrevious),"percentTotal"in t&&(r.percentTotal=t.percentTotal),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r}});var qH=B((nbe,kH)=>{"use strict";kH.exports={attributes:J5(),layoutAttributes:$5(),supplyDefaults:Q5().supplyDefaults,crossTraceDefaults:Q5().crossTraceDefaults,supplyLayoutDefaults:nH(),calc:fH(),crossTraceCalc:hH(),plot:yH(),style:bH().style,hoverPoints:TH(),eventData:AH(),selectPoints:r0(),moduleType:"trace",name:"funnel",basePlotModule:gl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var LH=B((ibe,CH)=>{"use strict";CH.exports=qH()});var DH=B((lbe,SH)=>{"use strict";SH.exports={eventDataKeys:["initial","delta","final"]}});var nb=B((obe,RH)=>{"use strict";var ft=Tl(),tb=bi().line,C0e=tn(),EH=di().axisHoverFormat,L0e=_a().hovertemplateAttrs,S0e=_a().texttemplateAttrs,PH=DH(),Nf=mt().extendFlat,D0e=xr();function ab(e){return{marker:{color:Nf({},ft.marker.color,{arrayOk:!1,editType:"style"}),line:{color:Nf({},ft.marker.line.color,{arrayOk:!1,editType:"style"}),width:Nf({},ft.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}RH.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:ft.x,x0:ft.x0,dx:ft.dx,y:ft.y,y0:ft.y0,dy:ft.dy,xperiod:ft.xperiod,yperiod:ft.yperiod,xperiod0:ft.xperiod0,yperiod0:ft.yperiod0,xperiodalignment:ft.xperiodalignment,yperiodalignment:ft.yperiodalignment,xhoverformat:EH("x"),yhoverformat:EH("y"),hovertext:ft.hovertext,hovertemplate:L0e({},{keys:PH.eventDataKeys}),hoverinfo:Nf({},C0e.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:S0e({editType:"plot"},{keys:PH.eventDataKeys.concat(["label"])}),text:ft.text,textposition:ft.textposition,insidetextanchor:ft.insidetextanchor,textangle:ft.textangle,textfont:ft.textfont,insidetextfont:ft.insidetextfont,outsidetextfont:ft.outsidetextfont,constraintext:ft.constraintext,cliponaxis:ft.cliponaxis,orientation:ft.orientation,offset:ft.offset,width:ft.width,increasing:ab("increasing"),decreasing:ab("decreasing"),totals:ab("intermediate sums and total"),connector:{line:{color:Nf({},tb.color,{dflt:D0e.defaultLine}),width:Nf({},tb.width,{editType:"plot"}),dash:tb.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:ft.offsetgroup,alignmentgroup:ft.alignmentgroup,zorder:ft.zorder}});var ib=B((sbe,zH)=>{"use strict";zH.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 Ff=B((ube,NH)=>{"use strict";NH.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var ob=B((fbe,OH)=>{"use strict";var FH=Pe(),E0e=ff(),P0e=Ki().handleText,R0e=Dv(),z0e=_s(),IH=nb(),N0e=xr(),HH=Ff(),F0e=HH.INCREASING.COLOR,I0e=HH.DECREASING.COLOR,H0e="#4499FF";function lb(e,r,t){e(r+".marker.color",t),e(r+".marker.line.color",N0e.defaultLine),e(r+".marker.line.width")}function O0e(e,r,t,a){function n(u,f){return FH.coerce(e,r,IH,u,f)}var i=R0e(e,r,a,n);if(!i){r.visible=!1;return}z0e(e,r,a,n),n("xhoverformat"),n("yhoverformat"),n("measure"),n("orientation",r.x&&!r.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate");var l=n("textposition");P0e(e,r,a,n,l,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),r.textposition!=="none"&&(n("texttemplate"),r.texttemplate||n("textinfo")),lb(n,"increasing",F0e),lb(n,"decreasing",I0e),lb(n,"totals",H0e);var o=n("connector.visible");if(o){n("connector.mode");var s=n("connector.line.width");s&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function B0e(e,r){var t,a;function n(l){return FH.coerce(a._input,a,IH,l)}if(r.waterfallmode==="group")for(var i=0;i{"use strict";var Y0e=Pe(),G0e=ib();BH.exports=function(e,r,t){var a=!1;function n(o,s){return Y0e.coerce(e,r,G0e,o,s)}for(var i=0;i{"use strict";var GH=$r(),UH=ws(),VH=Pe().mergeArray,U0e=Ev(),WH=wt().BADNUM;function sb(e){return e==="a"||e==="absolute"}function ub(e){return e==="t"||e==="total"}XH.exports=function(r,t){var a=GH.getFromId(r,t.xaxis||"x"),n=GH.getFromId(r,t.yaxis||"y"),i,l,o,s,u,f;t.orientation==="h"?(i=a.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=UH(t,n,"y",o),u=!!t.yperiodalignment,f="y"):(i=n.makeCalcdata(t,"y"),o=a.makeCalcdata(t,"x"),s=UH(t,a,"x",o),u=!!t.xperiodalignment,f="x"),l=s.vals;for(var c=Math.min(l.length,i.length),h=new Array(c),d=0,p,y=!1,m=0;m{"use strict";var JH=hf().setGroupPositions;$H.exports=function(r,t){var a=r._fullLayout,n=r._fullData,i=r.calcdata,l=t.xaxis,o=t.yaxis,s=[],u=[],f=[],c,h;for(h=0;h{"use strict";var QH=kr(),rm=Pe(),V0e=Br(),If=wt().BADNUM,W0e=Ef(),X0e=Ei().clearMinTextSize;jH.exports=function(r,t,a,n){var i=r._fullLayout;X0e("waterfall",i),W0e.plot(r,t,a,n,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),Z0e(r,t,a,n)};function Z0e(e,r,t,a){var n=r.xaxis,i=r.yaxis;rm.makeTraceGroups(a,t,"trace bars").each(function(l){var o=QH.select(this),s=l[0].trace,u=rm.ensureSingle(o,"g","lines");if(!s.connector||!s.connector.visible){u.remove();return}var f=s.orientation==="h",c=s.connector.mode,h=u.selectAll("g.line").data(rm.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,y){if(!(y!==d-1&&!p.cNext)){var m=J0e(p,n,i,f),_=m[0],b=m[1],T="";_[0]!==If&&b[0]!==If&&_[1]!==If&&b[1]!==If&&(c==="spanning"&&!p.isSum&&y>0&&(f?T+="M"+_[0]+","+b[1]+"V"+b[0]:T+="M"+_[1]+","+b[0]+"H"+_[0]),c!=="between"&&(p.isSum||y{"use strict";var tm=kr(),rO=Br(),tO=xr(),$0e=pu().DESELECTDIM,K0e=ho(),Q0e=Ei().resizeText,j0e=K0e.styleTextPoints;function ehe(e,r,t){var a=t||tm.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");Q0e(e,a,"waterfall"),a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=tm.select(this),l=n[0].trace;i.selectAll(".point > path").each(function(o){if(!o.isBlank){var s=l[o.dir].marker;tm.select(this).call(tO.fill,s.color).call(tO.stroke,s.line.color).call(rO.dashLine,s.line.dash,s.line.width).style("opacity",l.selectedpoints&&!o.selected?$0e:1)}}),j0e(i,l,e),i.selectAll(".lines").each(function(){var o=l.connector.line;rO.lineGroupStyle(tm.select(this).selectAll("path"),o.width,o.color,o.dash)})})}aO.exports={style:ehe}});var uO=B((mbe,sO)=>{"use strict";var rhe=$r().hoverLabelText,iO=xr().opacity,the=e0().hoverOnBars,lO=Ff(),oO={increasing:lO.INCREASING.SYMBOL,decreasing:lO.DECREASING.SYMBOL};sO.exports=function(r,t,a,n,i){var l=the(r,t,a,n,i);if(!l)return;var o=l.cd,s=o[0].trace,u=s.orientation==="h",f=u?"x":"y",c=u?r.xa:r.ya;function h(A){return rhe(c,A,s[f+"hoverformat"])}var d=l.index,p=o[d],y=p.isSum?p.b+p.s:p.rawS;l.initial=p.b+p.s-y,l.delta=y,l.final=l.initial+l.delta;var m=h(Math.abs(l.delta));l.deltaLabel=y<0?"("+m+")":m,l.finalLabel=h(l.final),l.initialLabel=h(l.initial);var _=p.hi||s.hoverinfo,b=[];if(_&&_!=="none"&&_!=="skip"){var T=_==="all",x=_.split("+"),M=function(A){return T||x.indexOf(A)!==-1};p.isSum||(M("final")&&(u?!M("x"):!M("y"))&&b.push(l.finalLabel),M("delta")&&(y<0?b.push(l.deltaLabel+" "+oO.decreasing):b.push(l.deltaLabel+" "+oO.increasing)),M("initial")&&b.push("Initial: "+l.initialLabel))}return b.length&&(l.extraText=b.join("
")),l.color=ahe(s,p),[l]};function ahe(e,r){var t=e[r.dir].marker,a=t.color,n=t.line.color,i=t.line.width;if(iO(a))return a;if(iO(n)&&i)return n}});var cO=B((ybe,fO)=>{"use strict";fO.exports=function(r,t){return r.x="xVal"in t?t.xVal:t.x,r.y="yVal"in t?t.yVal:t.y,"initial"in t&&(r.initial=t.initial),"delta"in t&&(r.delta=t.delta),"final"in t&&(r.final=t.final),t.xa&&(r.xaxis=t.xa),t.ya&&(r.yaxis=t.ya),r}});var hO=B((gbe,vO)=>{"use strict";vO.exports={attributes:nb(),layoutAttributes:ib(),supplyDefaults:ob().supplyDefaults,crossTraceDefaults:ob().crossTraceDefaults,supplyLayoutDefaults:YH(),calc:ZH(),crossTraceCalc:KH(),plot:eO(),style:nO().style,hoverPoints:uO(),eventData:cO(),selectPoints:r0(),moduleType:"trace",name:"waterfall",basePlotModule:gl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var pO=B((xbe,dO)=>{"use strict";dO.exports=hO()});var nm=B((bbe,mO)=>{"use strict";var nhe=tn(),ihe=fo().attributes,lhe=jt(),ohe=zn(),she=_a().hovertemplateAttrs,uhe=_a().texttemplateAttrs,l0=mt().extendFlat,fhe=fi().pattern,am=lhe({editType:"plot",arrayOk:!0,colorEditType:"plot"});mO.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:ohe.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:fhe,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:l0({},nhe.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:she({},{keys:["label","color","value","percent","text"]}),texttemplate:uhe({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l0({},am,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l0({},am,{}),outsidetextfont:l0({},am,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l0({},am,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:ihe({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 im=B((_be,xO)=>{"use strict";var che=zr(),o0=Pe(),vhe=nm(),hhe=fo().defaults,dhe=Ki().handleText,phe=Pe().coercePattern;function yO(e,r){var t=o0.isArrayOrTypedArray(e),a=o0.isArrayOrTypedArray(r),n=Math.min(t?e.length:1/0,a?r.length:1/0);if(isFinite(n)||(n=0),n&&a){for(var i,l=0;l0){i=!0;break}}i||(n=0)}return{hasLabels:t,hasValues:a,len:n}}function gO(e,r,t,a,n){var i=a("marker.line.width");i&&a("marker.line.color",n?void 0:t.paper_bgcolor);var l=a("marker.colors");phe(a,"marker.pattern",l),e.marker&&!r.marker.pattern.fgcolor&&(r.marker.pattern.fgcolor=e.marker.colors),r.marker.pattern.bgcolor||(r.marker.pattern.bgcolor=t.paper_bgcolor)}function mhe(e,r,t,a){function n(b,T){return o0.coerce(e,r,vhe,b,T)}var i=n("labels"),l=n("values"),o=yO(i,l),s=o.len;if(r._hasLabels=o.hasLabels,r._hasValues=o.hasValues,!r._hasLabels&&r._hasValues&&(n("label0"),n("dlabel")),!s){r.visible=!1;return}r._length=s,gO(e,r,a,n,!0),n("scalegroup");var u=n("text"),f=n("texttemplate"),c;if(f||(c=n("textinfo",o0.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||c&&c!=="none"){var h=n("textposition");dhe(e,r,a,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else c==="none"&&n("textposition","none");hhe(r,a,n);var y=n("hole"),m=n("title.text");if(m){var _=n("title.position",y?"middle center":"top center");!y&&_==="middle center"&&(r.title.position="top center"),o0.coerceFont(n,"title.font",a.font)}n("sort"),n("direction"),n("rotation"),n("pull")}xO.exports={handleLabelsAndValues:yO,handleMarkerDefaults:gO,supplyDefaults:mhe}});var lm=B((wbe,bO)=>{"use strict";bO.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var wO=B((Tbe,_O)=>{"use strict";var yhe=Pe(),ghe=lm();_O.exports=function(r,t){function a(n,i){return yhe.coerce(r,t,ghe,n,i)}a("hiddenlabels"),a("piecolorway",t.colorway),a("extendpiecolors")}});var om=B((Mbe,AO)=>{"use strict";var xhe=zr(),fb=Rn(),bhe=xr(),_he={};function whe(e,r){var t=[],a=e._fullLayout,n=a.hiddenlabels||[],i=r.labels,l=r.marker.colors||[],o=r.values,s=r._length,u=r._hasValues&&s,f,c;if(r.dlabel)for(i=new Array(s),f=0;f=0});var x=r.type==="funnelarea"?y:r.sort;return x&&t.sort(function(M,A){return A.v-M.v}),t[0]&&(t[0].vTotal=p),t}function TO(e){return function(t,a){return!t||(t=fb(t),!t.isValid())?!1:(t=bhe.addOpacity(t,t.getAlpha()),e[a]||(e[a]=t),t)}}function The(e,r){var t=(r||{}).type;t||(t="pie");var a=e._fullLayout,n=e.calcdata,i=a[t+"colorway"],l=a["_"+t+"colormap"];a["extend"+t+"colors"]&&(i=MO(i,_he));for(var o=0,s=0;s{"use strict";var Mhe=Hi().appendArrayMultiPointValues;kO.exports=function(r,t){var a={curveNumber:t.index,pointNumbers:r.pts,data:t._input,fullData:t,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return r.pts.length===1&&(a.pointNumber=a.i=r.pts[0]),Mhe(a,t,r.pts),t.type==="funnelarea"&&(delete a.v,delete a.i),a}});var hb=B((kbe,ZO)=>{"use strict";var mn=kr(),Ahe=St(),sm=gi(),PO=xr(),Al=Br(),ka=Pe(),khe=ka.strScale,CO=ka.strTranslate,cb=va(),RO=Ei(),qhe=RO.recordMinTextSize,Che=RO.clearMinTextSize,zO=Yp().TEXTPAD,Tr=$c(),um=qO(),LO=Pe().isValidTextValue;function Lhe(e,r){var t=e._context.staticPlot,a=e._fullLayout,n=a._size;Che("pie",a),IO(r,e),VO(r,n);var i=ka.makeTraceGroups(a._pielayer,r,"trace").each(function(l){var o=mn.select(this),s=l[0],u=s.trace;Ihe(l),o.attr("stroke-linejoin","round"),o.each(function(){var f=mn.select(this).selectAll("g.slice").data(l);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],h=!1;f.each(function(x,M){if(x.hidden){mn.select(this).selectAll("path,g").remove();return}x.pointNumber=x.i,x.curveNumber=u.index,c[x.pxmid[1]<0?0:1][x.pxmid[0]<0?0:1].push(x);var A=s.cx,k=s.cy,L=mn.select(this),D=L.selectAll("path.surface").data([x]);if(D.enter().append("path").classed("surface",!0).style({"pointer-events":t?"none":"all"}),L.call(NO,e,l),u.pull){var E=+Tr.castOption(u.pull,x.pts)||0;E>0&&(A+=E*x.pxmid[0],k+=E*x.pxmid[1])}x.cxFinal=A,x.cyFinal=k;function R(I,G,Z,K){var re=K*(G[0]-I[0]),se=K*(G[1]-I[1]);return"a"+K*s.r+","+K*s.r+" 0 "+x.largeArc+(Z?" 1 ":" 0 ")+re+","+se}var z=u.hole;if(x.v===s.vTotal){var H="M"+(A+x.px0[0])+","+(k+x.px0[1])+R(x.px0,x.pxmid,!0,1)+R(x.pxmid,x.px0,!0,1)+"Z";z?D.attr("d","M"+(A+z*x.px0[0])+","+(k+z*x.px0[1])+R(x.px0,x.pxmid,!1,z)+R(x.pxmid,x.px0,!1,z)+"Z"+H):D.attr("d",H)}else{var O=R(x.px0,x.px1,!0,1);if(z){var U=1-z;D.attr("d","M"+(A+z*x.px1[0])+","+(k+z*x.px1[1])+R(x.px1,x.px0,!1,z)+"l"+U*x.px0[0]+","+U*x.px0[1]+O+"Z")}else D.attr("d","M"+A+","+k+"l"+x.px0[0]+","+x.px0[1]+O+"Z")}WO(e,x,s);var V=Tr.castOption(u.textposition,x.pts),Y=L.selectAll("g.slicetext").data(x.text&&V!=="none"?[0]:[]);Y.enter().append("g").classed("slicetext",!0),Y.exit().remove(),Y.each(function(){var I=ka.ensureSingle(mn.select(this),"text","",function(Q){Q.attr("data-notex",1)}),G=ka.ensureUniformFontSize(e,V==="outside"?Dhe(u,x,a.font):FO(u,x,a.font));I.text(x.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Al.font,G).call(cb.convertToTspans,e);var Z=Al.bBox(I.node()),K;if(V==="outside")K=EO(Z,x);else if(K=HO(Z,x,s),V==="auto"&&K.scale<1){var re=ka.ensureUniformFontSize(e,u.outsidetextfont);I.call(Al.font,re),Z=Al.bBox(I.node()),K=EO(Z,x)}var se=K.textPosAngle,ce=se===void 0?x.pxmid:fm(s.r,se);if(K.targetX=A+ce[0]*K.rCenter+(K.x||0),K.targetY=k+ce[1]*K.rCenter+(K.y||0),XO(K,Z),K.outside){var le=K.targetY;x.yLabelMin=le-Z.height/2,x.yLabelMid=le,x.yLabelMax=le+Z.height/2,x.labelExtraX=0,x.labelExtraY=0,h=!0}K.fontSize=G.size,qhe(u.type,K,a),l[M].transform=K,ka.setTransormAndDisplay(I,K)})});var d=mn.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 x=ka.ensureSingle(mn.select(this),"text","",function(k){k.attr("data-notex",1)}),M=u.title.text;u._meta&&(M=ka.templateString(M,u._meta)),x.text(M).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Al.font,u.title.font).call(cb.convertToTspans,e);var A;u.title.position==="middle center"?A=Rhe(s):A=GO(s,n),x.attr("transform",CO(A.x,A.y)+khe(Math.min(1,A.scale))+CO(A.tx,A.ty))}),h&&Nhe(c,u),She(f,u),h&&u.automargin){var p=Al.bBox(o.node()),y=u.domain,m=n.w*(y.x[1]-y.x[0]),_=n.h*(y.y[1]-y.y[0]),b=(.5*m-s.r)/n.w,T=(.5*_-s.r)/n.h;Ahe.autoMargin(e,"pie."+u.uid+".automargin",{xl:y.x[0]-b,xr:y.x[1]+b,yb:y.y[0]-T,yt:y.y[1]+T,l:Math.max(s.cx-s.r-p.left,0),r:Math.max(p.right-(s.cx+s.r),0),b:Math.max(p.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var l=mn.select(this);l.attr("dy")&&l.attr("dy",l.attr("dy"))})},0)}function She(e,r){e.each(function(t){var a=mn.select(this);if(!t.labelExtraX&&!t.labelExtraY){a.select("path.textline").remove();return}var n=a.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,ka.setTransormAndDisplay(n,t.transform);var i=t.cxFinal+t.pxmid[0],l=t.cyFinal+t.pxmid[1],o="M"+i+","+l,s=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var u=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(u)>Math.abs(f)?o+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(i+t.labelExtraX+s):o+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+s}else o+="V"+(t.yLabelMid+t.labelExtraY)+"h"+s;ka.ensureSingle(a,"path","textline").call(PO.stroke,r.outsidetextfont.color).attr({"stroke-width":Math.min(2,r.outsidetextfont.size/8),d:o,fill:"none"})})}function NO(e,r,t){var a=t[0],n=a.cx,i=a.cy,l=a.trace,o=l.type==="funnelarea";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1),e.on("mouseover",function(s){var u=r._fullLayout,f=r._fullData[l.index];if(!(r._dragging||u.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=sm.castHoverinfo({hoverinfo:[Tr.castOption(c,s.pts)],_module:l._module},u,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var h=s.rInscribed||0,d=n+s.pxmid[0]*(1-h),p=i+s.pxmid[1]*(1-h),y=u.separators,m=[];if(c&&c.indexOf("label")!==-1&&m.push(s.label),s.text=Tr.castOption(f.hovertext||f.text,s.pts),c&&c.indexOf("text")!==-1){var _=s.text;ka.isValidTextValue(_)&&m.push(_)}s.value=s.v,s.valueLabel=Tr.formatPieValue(s.v,y),c&&c.indexOf("value")!==-1&&m.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Tr.formatPiePercent(s.percent,y),c&&c.indexOf("percent")!==-1&&m.push(s.percentLabel);var b=f.hoverlabel,T=b.font,x=[];sm.loneHover({trace:l,x0:d-h*a.r,x1:d+h*a.r,y:p,_x0:o?n+s.TL[0]:d-h*a.r,_x1:o?n+s.TR[0]:d+h*a.r,_y0:o?i+s.TL[1]:p-h*a.r,_y1:o?i+s.BL[1]:p+h*a.r,text:m.join("
"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:Tr.castOption(b.bgcolor,s.pts)||s.color,borderColor:Tr.castOption(b.bordercolor,s.pts),fontFamily:Tr.castOption(T.family,s.pts),fontSize:Tr.castOption(T.size,s.pts),fontColor:Tr.castOption(T.color,s.pts),nameLength:Tr.castOption(b.namelength,s.pts),textAlign:Tr.castOption(b.align,s.pts),hovertemplate:Tr.castOption(f.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[um(s,f)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:r,inOut_bbox:x}),s.bbox=x[0],l._hasHoverLabel=!0}l._hasHoverEvent=!0,r.emit("plotly_hover",{points:[um(s,f)],event:mn.event})}}),e.on("mouseout",function(s){var u=r._fullLayout,f=r._fullData[l.index],c=mn.select(this).datum();l._hasHoverEvent&&(s.originalEvent=mn.event,r.emit("plotly_unhover",{points:[um(c,f)],event:mn.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(sm.loneUnhover(u._hoverlayer.node()),l._hasHoverLabel=!1)}),e.on("click",function(s){var u=r._fullLayout,f=r._fullData[l.index];r._dragging||u.hovermode===!1||(r._hoverdata=[um(s,f)],sm.click(r,mn.event))})}function Dhe(e,r,t){var a=Tr.castOption(e.outsidetextfont.color,r.pts)||Tr.castOption(e.textfont.color,r.pts)||t.color,n=Tr.castOption(e.outsidetextfont.family,r.pts)||Tr.castOption(e.textfont.family,r.pts)||t.family,i=Tr.castOption(e.outsidetextfont.size,r.pts)||Tr.castOption(e.textfont.size,r.pts)||t.size,l=Tr.castOption(e.outsidetextfont.weight,r.pts)||Tr.castOption(e.textfont.weight,r.pts)||t.weight,o=Tr.castOption(e.outsidetextfont.style,r.pts)||Tr.castOption(e.textfont.style,r.pts)||t.style,s=Tr.castOption(e.outsidetextfont.variant,r.pts)||Tr.castOption(e.textfont.variant,r.pts)||t.variant,u=Tr.castOption(e.outsidetextfont.textcase,r.pts)||Tr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Tr.castOption(e.outsidetextfont.lineposition,r.pts)||Tr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Tr.castOption(e.outsidetextfont.shadow,r.pts)||Tr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a,family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:c}}function FO(e,r,t){var a=Tr.castOption(e.insidetextfont.color,r.pts);!a&&e._input.textfont&&(a=Tr.castOption(e._input.textfont.color,r.pts));var n=Tr.castOption(e.insidetextfont.family,r.pts)||Tr.castOption(e.textfont.family,r.pts)||t.family,i=Tr.castOption(e.insidetextfont.size,r.pts)||Tr.castOption(e.textfont.size,r.pts)||t.size,l=Tr.castOption(e.insidetextfont.weight,r.pts)||Tr.castOption(e.textfont.weight,r.pts)||t.weight,o=Tr.castOption(e.insidetextfont.style,r.pts)||Tr.castOption(e.textfont.style,r.pts)||t.style,s=Tr.castOption(e.insidetextfont.variant,r.pts)||Tr.castOption(e.textfont.variant,r.pts)||t.variant,u=Tr.castOption(e.insidetextfont.textcase,r.pts)||Tr.castOption(e.textfont.textcase,r.pts)||t.textcase,f=Tr.castOption(e.insidetextfont.lineposition,r.pts)||Tr.castOption(e.textfont.lineposition,r.pts)||t.lineposition,c=Tr.castOption(e.insidetextfont.shadow,r.pts)||Tr.castOption(e.textfont.shadow,r.pts)||t.shadow;return{color:a||PO.contrast(r.color),family:n,size:i,weight:l,style:o,variant:s,textcase:u,lineposition:f,shadow:c}}function IO(e,r){for(var t,a,n=0;n=-4;b-=2)_(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)_(Math.PI*(b+1),"tan")}if(c||d){for(b=4;b>=-4;b-=2)_(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)_(Math.PI*(b+.5),"rad")}}if(o||p||c){var T=Math.sqrt(e.width*e.width+e.height*e.height);if(m={scale:n*a*2/T,rCenter:1-n,rotate:0},m.textPosAngle=(r.startangle+r.stopangle)/2,m.scale>=1)return m;y.push(m)}(p||d)&&(m=SO(e,a,l,s,u),m.textPosAngle=(r.startangle+r.stopangle)/2,y.push(m)),(p||h)&&(m=DO(e,a,l,s,u),m.textPosAngle=(r.startangle+r.stopangle)/2,y.push(m));for(var x=0,M=0,A=0;A=1)break}return y[x]}function Ehe(e,r){var t=e.startangle,a=e.stopangle;return t>r&&r>a||t0?1:-1)/2,y:i/(1+t*t/(a*a)),outside:!0}}function Rhe(e){var r=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/r,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function GO(e,r){var t=1,a=1,n,i=e.trace,l={x:e.cx,y:e.cy},o={tx:0,ty:0};o.ty+=i.title.font.size,n=UO(i),i.title.position.indexOf("top")!==-1?(l.y-=(1+n)*e.r,o.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(l.y+=(1+n)*e.r);var s=zhe(e.r,e.trace.aspectratio),u=r.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+s,l.x-=(1+n)*s,o.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+s,l.x+=(1+n)*s,o.tx-=e.titleBox.width/2),t=u/e.titleBox.width,a=vb(e,r)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(t,a),tx:o.tx,ty:o.ty}}function zhe(e,r){return e/(r===void 0?1:r)}function vb(e,r){var t=e.trace,a=r.h*(t.domain.y[1]-t.domain.y[0]);return Math.min(e.titleBox.height,a/2)}function UO(e){var r=e.pull;if(!r)return 0;var t;if(ka.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function Nhe(e,r){var t,a,n,i,l,o,s,u,f,c,h,d,p;function y(T,x){return T.pxmid[1]-x.pxmid[1]}function m(T,x){return x.pxmid[1]-T.pxmid[1]}function _(T,x){x||(x={});var M=x.labelExtraY+(a?x.yLabelMax:x.yLabelMin),A=a?T.yLabelMin:T.yLabelMax,k=a?T.yLabelMax:T.yLabelMin,L=T.cyFinal+l(T.px0[1],T.px1[1]),D=M-A,E,R,z,H,O,U;if(D*s>0&&(T.labelExtraY=D),!!ka.isArrayOrTypedArray(r.pull))for(R=0;R=(Tr.castOption(r.pull,z.pts)||0))&&((T.pxmid[1]-z.pxmid[1])*s>0?(H=z.cyFinal+l(z.px0[1],z.px1[1]),D=H-A-T.labelExtraY,D*s>0&&(T.labelExtraY+=D)):(k+T.labelExtraY-L)*s>0&&(E=3*o*Math.abs(R-c.indexOf(T)),O=z.cxFinal+i(z.px0[0],z.px1[0]),U=O+E-(T.cxFinal+T.pxmid[0])-T.labelExtraX,U*o>0&&(T.labelExtraX+=U)))}for(a=0;a<2;a++)for(n=a?y:m,l=a?Math.max:Math.min,s=a?1:-1,t=0;t<2;t++){for(i=t?Math.max:Math.min,o=t?1:-1,u=e[a][t],u.sort(n),f=e[1-a][t],c=f.concat(u),d=[],h=0;h1?(u=t.r,f=u/n.aspectratio):(f=t.r,u=f*n.aspectratio),u*=(1+n.baseratio)/2,s=u*f}l=Math.min(l,s/t.vTotal)}for(a=0;ar.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/r.vTotal,.5),u.ring=1-a.hole,u.rInscribed=Phe(u,r))}function fm(e,r){return[e*Math.sin(r),-e*Math.cos(r)]}function WO(e,r,t){var a=e._fullLayout,n=t.trace,i=n.texttemplate,l=n.textinfo;if(!i&&l&&l!=="none"){var o=l.split("+"),s=function(x){return o.indexOf(x)!==-1},u=s("label"),f=s("text"),c=s("value"),h=s("percent"),d=a.separators,p;if(p=u?[r.label]:[],f){var y=Tr.getFirstFilled(n.text,r.pts);LO(y)&&p.push(y)}c&&p.push(Tr.formatPieValue(r.v,d)),h&&p.push(Tr.formatPiePercent(r.v/t.vTotal,d)),r.text=p.join("
")}function m(x){return{label:x.label,value:x.v,valueLabel:Tr.formatPieValue(x.v,a.separators),percent:x.v/t.vTotal,percentLabel:Tr.formatPiePercent(x.v/t.vTotal,a.separators),color:x.color,text:x.text,customdata:ka.castOption(n,x.i,"customdata")}}if(i){var _=ka.castOption(n,r.i,"texttemplate");if(!_)r.text="";else{var b=m(r),T=Tr.getFirstFilled(n.text,r.pts);(LO(T)||T==="")&&(b.text=T),r.text=ka.texttemplateString(_,b,e._fullLayout._d3locale,b,n._meta||{})}}}function XO(e,r){var t=e.rotate*Math.PI/180,a=Math.cos(t),n=Math.sin(t),i=(r.left+r.right)/2,l=(r.top+r.bottom)/2;e.textX=i*a-l*n,e.textY=i*n+l*a,e.noCenter=!0}ZO.exports={plot:Lhe,formatSliceLabel:WO,transformInsideText:HO,determineInsideTextFont:FO,positionTitleOutside:GO,prerenderTitles:IO,layoutAreas:VO,attachFxHandlers:NO,computeTransform:XO}});var KO=B((qbe,$O)=>{"use strict";var JO=kr(),Hhe=Uu(),Ohe=Ei().resizeText;$O.exports=function(r){var t=r._fullLayout._pielayer.selectAll(".trace");Ohe(r,t,"pie"),t.each(function(a){var n=a[0],i=n.trace,l=JO.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(o){JO.select(this).call(Hhe,o,i,r)})})}});var jO=B(Hf=>{"use strict";var QO=St();Hf.name="pie";Hf.plot=function(e,r,t,a){QO.plotBasePlot(Hf.name,e,r,t,a)};Hf.clean=function(e,r,t,a){QO.cleanBasePlot(Hf.name,e,r,t,a)}});var rB=B((Lbe,eB)=>{"use strict";eB.exports={attributes:nm(),supplyDefaults:im().supplyDefaults,supplyLayoutDefaults:wO(),layoutAttributes:lm(),calc:om().calc,crossTraceCalc:om().crossTraceCalc,plot:hb().plot,style:KO(),styleOne:Uu(),moduleType:"trace",name:"pie",basePlotModule:jO(),categories:["pie-like","pie","showLegend"],meta:{}}});var aB=B((Sbe,tB)=>{"use strict";tB.exports=rB()});var iB=B(Of=>{"use strict";var nB=St();Of.name="funnelarea";Of.plot=function(e,r,t,a){nB.plotBasePlot(Of.name,e,r,t,a)};Of.clean=function(e,r,t,a){nB.cleanBasePlot(Of.name,e,r,t,a)}});var db=B((Ebe,lB)=>{"use strict";var qa=nm(),Bhe=tn(),Yhe=fo().attributes,Ghe=_a().hovertemplateAttrs,Uhe=_a().texttemplateAttrs,zs=mt().extendFlat;lB.exports={labels:qa.labels,label0:qa.label0,dlabel:qa.dlabel,values:qa.values,marker:{colors:qa.marker.colors,line:{color:zs({},qa.marker.line.color,{dflt:null}),width:zs({},qa.marker.line.width,{dflt:1}),editType:"calc"},pattern:qa.marker.pattern,editType:"calc"},text:qa.text,hovertext:qa.hovertext,scalegroup:zs({},qa.scalegroup,{}),textinfo:zs({},qa.textinfo,{flags:["label","text","value","percent"]}),texttemplate:Uhe({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:zs({},Bhe.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:Ghe({},{keys:["label","color","value","text","percent"]}),textposition:zs({},qa.textposition,{values:["inside","none"],dflt:"inside"}),textfont:qa.textfont,insidetextfont:qa.insidetextfont,title:{text:qa.title.text,font:qa.title.font,position:zs({},qa.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:Yhe({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 pb=B((Pbe,oB)=>{"use strict";var Vhe=lm().hiddenlabels;oB.exports={hiddenlabels:Vhe,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var fB=B((Rbe,uB)=>{"use strict";var sB=Pe(),Whe=db(),Xhe=fo().defaults,Zhe=Ki().handleText,Jhe=im().handleLabelsAndValues,$he=im().handleMarkerDefaults;uB.exports=function(r,t,a,n){function i(y,m){return sB.coerce(r,t,Whe,y,m)}var l=i("labels"),o=i("values"),s=Jhe(l,o),u=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!u){t.visible=!1;return}t._length=u,$he(r,t,n,i),i("scalegroup");var f=i("text"),c=i("texttemplate"),h;if(c||(h=i("textinfo",Array.isArray(f)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||h&&h!=="none"){var d=i("textposition");Zhe(r,t,n,i,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&i("textposition","none");Xhe(t,n,i);var p=i("title.text");p&&(i("title.position"),sB.coerceFont(i,"title.font",n.font)),i("aspectratio"),i("baseratio")}});var vB=B((zbe,cB)=>{"use strict";var Khe=Pe(),Qhe=pb();cB.exports=function(r,t){function a(n,i){return Khe.coerce(r,t,Qhe,n,i)}a("hiddenlabels"),a("funnelareacolorway",t.colorway),a("extendfunnelareacolors")}});var mb=B((Nbe,dB)=>{"use strict";var hB=om();function jhe(e,r){return hB.calc(e,r)}function ede(e){hB.crossTraceCalc(e,{type:"funnelarea"})}dB.exports={calc:jhe,crossTraceCalc:ede}});var xB=B((Fbe,gB)=>{"use strict";var Ns=kr(),yb=Br(),go=Pe(),rde=go.strScale,pB=go.strTranslate,mB=va(),tde=Ef(),ade=tde.toMoveInsideBar,yB=Ei(),nde=yB.recordMinTextSize,ide=yB.clearMinTextSize,lde=$c(),Bf=hb(),ode=Bf.attachFxHandlers,sde=Bf.determineInsideTextFont,ude=Bf.layoutAreas,fde=Bf.prerenderTitles,cde=Bf.positionTitleOutside,vde=Bf.formatSliceLabel;gB.exports=function(r,t){var a=r._context.staticPlot,n=r._fullLayout;ide("funnelarea",n),fde(t,r),ude(t,n._size),go.makeTraceGroups(n._funnelarealayer,t,"trace").each(function(i){var l=Ns.select(this),o=i[0],s=o.trace;dde(i),l.each(function(){var u=Ns.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(c,h){if(c.hidden){Ns.select(this).selectAll("path,g").remove();return}c.pointNumber=c.i,c.curveNumber=s.index;var d=o.cx,p=o.cy,y=Ns.select(this),m=y.selectAll("path.surface").data([c]);m.enter().append("path").classed("surface",!0).style({"pointer-events":a?"none":"all"}),y.call(ode,r,i);var _="M"+(d+c.TR[0])+","+(p+c.TR[1])+gb(c.TR,c.BR)+gb(c.BR,c.BL)+gb(c.BL,c.TL)+"Z";m.attr("d",_),vde(r,c,o);var b=lde.castOption(s.textposition,c.pts),T=y.selectAll("g.slicetext").data(c.text&&b!=="none"?[0]:[]);T.enter().append("g").classed("slicetext",!0),T.exit().remove(),T.each(function(){var x=go.ensureSingle(Ns.select(this),"text","",function(z){z.attr("data-notex",1)}),M=go.ensureUniformFontSize(r,sde(s,c,n.font));x.text(c.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(yb.font,M).call(mB.convertToTspans,r);var A=yb.bBox(x.node()),k,L,D,E=Math.min(c.BL[1],c.BR[1])+p,R=Math.max(c.TL[1],c.TR[1])+p;L=Math.max(c.TL[0],c.BL[0])+d,D=Math.min(c.TR[0],c.BR[0])+d,k=ade(L,D,E,R,A,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),k.fontSize=M.size,nde(s.type,k,n),i[h].transform=k,go.setTransormAndDisplay(x,k)})});var f=Ns.select(this).selectAll("g.titletext").data(s.title.text?[0]:[]);f.enter().append("g").classed("titletext",!0),f.exit().remove(),f.each(function(){var c=go.ensureSingle(Ns.select(this),"text","",function(p){p.attr("data-notex",1)}),h=s.title.text;s._meta&&(h=go.templateString(h,s._meta)),c.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(yb.font,s.title.font).call(mB.convertToTspans,r);var d=cde(o,n._size);c.attr("transform",pB(d.x,d.y)+rde(Math.min(1,d.scale))+pB(d.tx,d.ty))})})})};function gb(e,r){var t=r[0]-e[0],a=r[1]-e[1];return"l"+t+","+a}function hde(e,r){return[.5*(e[0]+r[0]),.5*(e[1]+r[1])]}function dde(e){if(!e.length)return;var r=e[0],t=r.trace,a=t.aspectratio,n=t.baseratio;n>.999&&(n=.999);var i=Math.pow(n,2),l=r.vTotal,o=l*i/(1-i),s=l,u=o/l;function f(){var H=Math.sqrt(u);return{x:H,y:-H}}function c(){var H=f();return[H.x,H.y]}var h,d=[];d.push(c());var p,y;for(p=e.length-1;p>-1;p--)if(y=e[p],!y.hidden){var m=y.v/s;u+=m,d.push(c())}var _=1/0,b=-1/0;for(p=0;p-1;p--)if(y=e[p],!y.hidden){E+=1;var R=d[E][0],z=d[E][1];y.TL=[-R,z],y.TR=[R,z],y.BL=L,y.BR=D,y.pxmid=hde(y.TR,y.BR),L=y.TL,D=y.TR}}});var wB=B((Ibe,_B)=>{"use strict";var bB=kr(),pde=Uu(),mde=Ei().resizeText;_B.exports=function(r){var t=r._fullLayout._funnelarealayer.selectAll(".trace");mde(r,t,"funnelarea"),t.each(function(a){var n=a[0],i=n.trace,l=bB.select(this);l.style({opacity:i.opacity}),l.selectAll("path.surface").each(function(o){bB.select(this).call(pde,o,i,r)})})}});var MB=B((Hbe,TB)=>{"use strict";TB.exports={moduleType:"trace",name:"funnelarea",basePlotModule:iB(),categories:["pie-like","funnelarea","showLegend"],attributes:db(),layoutAttributes:pb(),supplyDefaults:fB(),supplyLayoutDefaults:vB(),calc:mb().calc,crossTraceCalc:mb().crossTraceCalc,plot:xB(),style:wB(),styleOne:Uu(),meta:{}}});var kB=B((Obe,AB)=>{"use strict";AB.exports=MB()});var CB=B(Yf=>{"use strict";var qB=St();Yf.name="indicator";Yf.plot=function(e,r,t,a){qB.plotBasePlot(Yf.name,e,r,t,a)};Yf.clean=function(e,r,t,a){qB.cleanBasePlot(Yf.name,e,r,t,a)}});var bb=B((Ybe,RB)=>{"use strict";var xo=mt().extendFlat,SB=mt().extendDeep,yde=ui().overrideAll,DB=jt(),EB=zn(),gde=fo().attributes,Ct=bn(),xde=ot().templatedArray,cm=Ff(),LB=di().descriptionOnlyNumbers,xb=DB({editType:"plot",colorEditType:"plot"}),s0={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:EB.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"},PB={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},bde=xde("step",SB({},s0,{range:PB}));RB.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:gde({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:xo({},xb,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:LB("value")},font:xo({},xb,{}),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:LB("value")},increasing:{symbol:{valType:"string",dflt:cm.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:cm.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:cm.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:cm.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:xo({},xb,{}),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:SB({},s0,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:EB.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:yde({range:PB,visible:xo({},Ct.visible,{dflt:!0}),tickmode:Ct.minor.tickmode,nticks:Ct.nticks,tick0:Ct.tick0,dtick:Ct.dtick,tickvals:Ct.tickvals,ticktext:Ct.ticktext,ticks:xo({},Ct.ticks,{dflt:"outside"}),ticklen:Ct.ticklen,tickwidth:Ct.tickwidth,tickcolor:Ct.tickcolor,ticklabelstep:Ct.ticklabelstep,showticklabels:Ct.showticklabels,labelalias:Ct.labelalias,tickfont:DB({}),tickangle:Ct.tickangle,tickformat:Ct.tickformat,tickformatstops:Ct.tickformatstops,tickprefix:Ct.tickprefix,showtickprefix:Ct.showtickprefix,ticksuffix:Ct.ticksuffix,showticksuffix:Ct.showticksuffix,separatethousands:Ct.separatethousands,exponentformat:Ct.exponentformat,minexponent:Ct.minexponent,showexponent:Ct.showexponent,editType:"plot"},"plot"),steps:bde,threshold:{line:{color:xo({},s0.line.color,{}),width:xo({},s0.line.width,{dflt:1}),editType:"plot"},thickness:xo({},s0.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var _b=B((Gbe,zB)=>{"use strict";zB.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var IB=B((Ube,FB)=>{"use strict";var ji=Pe(),hm=bb(),_de=fo().defaults,NB=ot(),wde=On(),vm=_b(),Tde=Kh(),Mde=Qh(),Ade=ed(),kde=rd();function qde(e,r,t,a){function n(A,k){return ji.coerce(e,r,hm,A,k)}_de(r,a,n),n("mode"),r._hasNumber=r.mode.indexOf("number")!==-1,r._hasDelta=r.mode.indexOf("delta")!==-1,r._hasGauge=r.mode.indexOf("gauge")!==-1;var i=n("value");r._range=[0,typeof i=="number"?1.5*i:1];var l=new Array(2),o;if(r._hasNumber){n("number.valueformat");var s=ji.extendFlat({},a.font);s.size=void 0,ji.coerceFont(n,"number.font",s),r.number.font.size===void 0&&(r.number.font.size=vm.defaultNumberFontSize,l[0]=!0),n("number.prefix"),n("number.suffix"),o=r.number.font.size}var u;if(r._hasDelta){var f=ji.extendFlat({},a.font);f.size=void 0,ji.coerceFont(n,"delta.font",f),r.delta.font.size===void 0&&(r.delta.font.size=(r._hasNumber?.5:1)*(o||vm.defaultNumberFontSize),l[1]=!0),n("delta.reference",r.value),n("delta.relative"),n("delta.valueformat",r.delta.relative?"2%":""),n("delta.increasing.symbol"),n("delta.increasing.color"),n("delta.decreasing.symbol"),n("delta.decreasing.color"),n("delta.position"),n("delta.prefix"),n("delta.suffix"),u=r.delta.font.size}r._scaleNumbers=(!r._hasNumber||l[0])&&(!r._hasDelta||l[1])||!1;var c=ji.extendFlat({},a.font);c.size=.25*(o||u||vm.defaultNumberFontSize),ji.coerceFont(n,"title.font",c),n("title.text");var h,d,p,y;function m(A,k){return ji.coerce(h,d,hm.gauge,A,k)}function _(A,k){return ji.coerce(p,y,hm.gauge.axis,A,k)}if(r._hasGauge){h=e.gauge,h||(h={}),d=NB.newContainer(r,"gauge"),m("shape");var b=r._isBullet=r.gauge.shape==="bullet";b||n("title.align","center");var T=r._isAngular=r.gauge.shape==="angular";T||n("align","center"),m("bgcolor",a.paper_bgcolor),m("borderwidth"),m("bordercolor"),m("bar.color"),m("bar.line.color"),m("bar.line.width");var x=vm.valueThickness*(r.gauge.shape==="bullet"?.5:1);m("bar.thickness",x),wde(h,d,{name:"steps",handleItemDefaults:Cde}),m("threshold.value"),m("threshold.thickness"),m("threshold.line.width"),m("threshold.line.color"),p={},h&&(p=h.axis||{}),y=NB.newContainer(d,"axis"),_("visible"),r._range=_("range",r._range);var M={font:a.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};Tde(p,y,_,"linear"),kde(p,y,_,"linear",M),Ade(p,y,_,"linear",M),Mde(p,y,_,M)}else n("title.align","center"),n("align","center"),r._isAngular=r._isBullet=!1;r._length=null}function Cde(e,r){function t(a,n){return ji.coerce(e,r,hm.gauge.steps,a,n)}t("color"),t("line.color"),t("line.width"),t("range"),t("thickness")}FB.exports={supplyDefaults:qde}});var OB=B((Vbe,HB)=>{"use strict";function Lde(e,r){var t=[],a=r.value;typeof r._lastValue!="number"&&(r._lastValue=r.value);var n=r._lastValue,i=n;return r._hasDelta&&typeof r.delta.reference=="number"&&(i=r.delta.reference),t[0]={y:a,lastY:n,delta:a-i,relativeDelta:(a-i)/i},t}HB.exports={calc:Lde}});function kl(e,r,t){e.prototype=r.prototype=t,t.constructor=e}function bo(e,r){var t=Object.create(e.prototype);for(var a in r)t[a]=r[a];return t}var dm=nt(()=>{});function rl(){}function YB(){return this.rgb().formatHex()}function Fde(){return this.rgb().formatHex8()}function Ide(){return JB(this).formatHsl()}function GB(){return this.rgb().formatRgb()}function wo(e){var r,t;return e=(e+"").trim().toLowerCase(),(r=Sde.exec(e))?(t=r[1].length,r=parseInt(r[1],16),t===6?UB(r):t===3?new la(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):t===8?pm(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):t===4?pm(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=Dde.exec(e))?new la(r[1],r[2],r[3],1):(r=Ede.exec(e))?new la(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Pde.exec(e))?pm(r[1],r[2],r[3],r[4]):(r=Rde.exec(e))?pm(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=zde.exec(e))?XB(r[1],r[2]/100,r[3]/100,1):(r=Nde.exec(e))?XB(r[1],r[2]/100,r[3]/100,r[4]):BB.hasOwnProperty(e)?UB(BB[e]):e==="transparent"?new la(NaN,NaN,NaN,0):null}function UB(e){return new la(e>>16&255,e>>8&255,e&255,1)}function pm(e,r,t,a){return a<=0&&(e=r=t=NaN),new la(e,r,t,a)}function f0(e){return e instanceof rl||(e=wo(e)),e?(e=e.rgb(),new la(e.r,e.g,e.b,e.opacity)):new la}function Uf(e,r,t,a){return arguments.length===1?f0(e):new la(e,r,t,a==null?1:a)}function la(e,r,t,a){this.r=+e,this.g=+r,this.b=+t,this.opacity=+a}function VB(){return`#${Fs(this.r)}${Fs(this.g)}${Fs(this.b)}`}function Hde(){return`#${Fs(this.r)}${Fs(this.g)}${Fs(this.b)}${Fs((isNaN(this.opacity)?1:this.opacity)*255)}`}function WB(){let e=ym(this.opacity);return`${e===1?"rgb(":"rgba("}${Is(this.r)}, ${Is(this.g)}, ${Is(this.b)}${e===1?")":`, ${e})`}`}function ym(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Is(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fs(e){return e=Is(e),(e<16?"0":"")+e.toString(16)}function XB(e,r,t,a){return a<=0?e=r=t=NaN:t<=0||t>=1?e=r=NaN:r<=0&&(e=NaN),new Pi(e,r,t,a)}function JB(e){if(e instanceof Pi)return new Pi(e.h,e.s,e.l,e.opacity);if(e instanceof rl||(e=wo(e)),!e)return new Pi;if(e instanceof Pi)return e;e=e.rgb();var r=e.r/255,t=e.g/255,a=e.b/255,n=Math.min(r,t,a),i=Math.max(r,t,a),l=NaN,o=i-n,s=(i+n)/2;return o?(r===i?l=(t-a)/o+(t0&&s<1?0:l,new Pi(l,o,s,e.opacity)}function c0(e,r,t,a){return arguments.length===1?JB(e):new Pi(e,r,t,a==null?1:a)}function Pi(e,r,t,a){this.h=+e,this.s=+r,this.l=+t,this.opacity=+a}function ZB(e){return e=(e||0)%360,e<0?e+360:e}function mm(e){return Math.max(0,Math.min(1,e||0))}function wb(e,r,t){return(e<60?r+(t-r)*e/60:e<180?t:e<240?r+(t-r)*(240-e)/60:r)*255}var _o,Hs,Gf,u0,el,Sde,Dde,Ede,Pde,Rde,zde,Nde,BB,gm=nt(()=>{dm();_o=.7,Hs=1/_o,Gf="\\s*([+-]?\\d+)\\s*",u0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",el="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Sde=/^#([0-9a-f]{3,8})$/,Dde=new RegExp(`^rgb\\(${Gf},${Gf},${Gf}\\)$`),Ede=new RegExp(`^rgb\\(${el},${el},${el}\\)$`),Pde=new RegExp(`^rgba\\(${Gf},${Gf},${Gf},${u0}\\)$`),Rde=new RegExp(`^rgba\\(${el},${el},${el},${u0}\\)$`),zde=new RegExp(`^hsl\\(${u0},${el},${el}\\)$`),Nde=new RegExp(`^hsla\\(${u0},${el},${el},${u0}\\)$`),BB={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};kl(rl,wo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:YB,formatHex:YB,formatHex8:Fde,formatHsl:Ide,formatRgb:GB,toString:GB});kl(la,Uf,bo(rl,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_o:Math.pow(_o,e),new la(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new la(Is(this.r),Is(this.g),Is(this.b),ym(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:VB,formatHex:VB,formatHex8:Hde,formatRgb:WB,toString:WB}));kl(Pi,c0,bo(rl,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new Pi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_o:Math.pow(_o,e),new Pi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,a=t+(t<.5?t:1-t)*r,n=2*t-a;return new la(wb(e>=240?e-240:e+120,n,a),wb(e,n,a),wb(e<120?e+240:e-120,n,a),this.opacity)},clamp(){return new Pi(ZB(this.h),mm(this.s),mm(this.l),ym(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=ym(this.opacity);return`${e===1?"hsl(":"hsla("}${ZB(this.h)}, ${mm(this.s)*100}%, ${mm(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var xm,bm,Tb=nt(()=>{xm=Math.PI/180,bm=180/Math.PI});function rY(e){if(e instanceof tl)return new tl(e.l,e.a,e.b,e.opacity);if(e instanceof ql)return tY(e);e instanceof la||(e=f0(e));var r=qb(e.r),t=qb(e.g),a=qb(e.b),n=Mb((.2225045*r+.7168786*t+.0606169*a)/KB),i,l;return r===t&&t===a?i=l=n:(i=Mb((.4360747*r+.3850649*t+.1430804*a)/$B),l=Mb((.0139322*r+.0971045*t+.7141733*a)/QB)),new tl(116*n-16,500*(i-n),200*(n-l),e.opacity)}function Wf(e,r,t,a){return arguments.length===1?rY(e):new tl(e,r,t,a==null?1:a)}function tl(e,r,t,a){this.l=+e,this.a=+r,this.b=+t,this.opacity=+a}function Mb(e){return e>Ode?Math.pow(e,1/3):e/eY+jB}function Ab(e){return e>Vf?e*e*e:eY*(e-jB)}function kb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Bde(e){if(e instanceof ql)return new ql(e.h,e.c,e.l,e.opacity);if(e instanceof tl||(e=rY(e)),e.a===0&&e.b===0)return new ql(NaN,0{dm();gm();Tb();_m=18,$B=.96422,KB=1,QB=.82521,jB=4/29,Vf=6/29,eY=3*Vf*Vf,Ode=Vf*Vf*Vf;kl(tl,Wf,bo(rl,{brighter(e){return new tl(this.l+_m*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new tl(this.l-_m*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,r=isNaN(this.a)?e:e+this.a/500,t=isNaN(this.b)?e:e-this.b/200;return r=$B*Ab(r),e=KB*Ab(e),t=QB*Ab(t),new la(kb(3.1338561*r-1.6168667*e-.4906146*t),kb(-.9787684*r+1.9161415*e+.033454*t),kb(.0719453*r-.2289914*e+1.4052427*t),this.opacity)}}));kl(ql,v0,bo(rl,{brighter(e){return new ql(this.h,this.c,this.l+_m*(e==null?1:e),this.opacity)},darker(e){return new ql(this.h,this.c,this.l-_m*(e==null?1:e),this.opacity)},rgb(){return tY(this).rgb()}}))});function Yde(e){if(e instanceof Os)return new Os(e.h,e.s,e.l,e.opacity);e instanceof la||(e=f0(e));var r=e.r/255,t=e.g/255,a=e.b/255,n=(lY*a+nY*r-iY*t)/(lY+nY-iY),i=a-n,l=(h0*(t-n)-Lb*i)/wm,o=Math.sqrt(l*l+i*i)/(h0*n*(1-n)),s=o?Math.atan2(l,i)*bm-120:NaN;return new Os(s<0?s+360:s,o,n,e.opacity)}function Xf(e,r,t,a){return arguments.length===1?Yde(e):new Os(e,r,t,a==null?1:a)}function Os(e,r,t,a){this.h=+e,this.s=+r,this.l=+t,this.opacity=+a}var oY,Cb,Lb,wm,h0,nY,iY,lY,sY=nt(()=>{dm();gm();Tb();oY=-.14861,Cb=1.78277,Lb=-.29227,wm=-.90649,h0=1.97294,nY=h0*wm,iY=h0*Cb,lY=Cb*Lb-wm*oY;kl(Os,Xf,bo(rl,{brighter(e){return e=e==null?Hs:Math.pow(Hs,e),new Os(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_o:Math.pow(_o,e),new Os(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*xm,r=+this.l,t=isNaN(this.s)?0:this.s*r*(1-r),a=Math.cos(e),n=Math.sin(e);return new la(255*(r+t*(oY*a+Cb*n)),255*(r+t*(Lb*a+wm*n)),255*(r+t*(h0*a)),this.opacity)}}))});var Bs=nt(()=>{gm();aY();sY()});function Sb(e,r,t,a,n){var i=e*e,l=i*e;return((1-3*e+3*i-l)*r+(4-6*i+3*l)*t+(1+3*e+3*i-3*l)*a+l*n)/6}function Tm(e){var r=e.length-1;return function(t){var a=t<=0?t=0:t>=1?(t=1,r-1):Math.floor(t*r),n=e[a],i=e[a+1],l=a>0?e[a-1]:2*n-i,o=a{});function Am(e){var r=e.length;return function(t){var a=Math.floor(((t%=1)<0?++t:t)*r),n=e[(a+r-1)%r],i=e[a%r],l=e[(a+1)%r],o=e[(a+2)%r];return Sb((t-a/r)*r,n,i,l,o)}}var Db=nt(()=>{Mm()});var Zf,Eb=nt(()=>{Zf=e=>()=>e});function uY(e,r){return function(t){return e+t*r}}function Gde(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(a){return Math.pow(e+a*r,t)}}function To(e,r){var t=r-e;return t?uY(e,t>180||t<-180?t-360*Math.round(t/360):t):Zf(isNaN(e)?r:e)}function fY(e){return(e=+e)==1?zt:function(r,t){return t-r?Gde(r,t,e):Zf(isNaN(r)?t:r)}}function zt(e,r){var t=r-e;return t?uY(e,t):Zf(isNaN(e)?r:e)}var Ys=nt(()=>{Eb()});function cY(e){return function(r){var t=r.length,a=new Array(t),n=new Array(t),i=new Array(t),l,o;for(l=0;l{Bs();Mm();Db();Ys();d0=function e(r){var t=fY(r);function a(n,i){var l=t((n=Uf(n)).r,(i=Uf(i)).r),o=t(n.g,i.g),s=t(n.b,i.b),u=zt(n.opacity,i.opacity);return function(f){return n.r=l(f),n.g=o(f),n.b=s(f),n.opacity=u(f),n+""}}return a.gamma=e,a}(1);vY=cY(Tm),hY=cY(Am)});function Jf(e,r){r||(r=[]);var t=e?Math.min(r.length,e.length):0,a=r.slice(),n;return function(i){for(n=0;n{});function dY(e,r){return(km(r)?Jf:Rb)(e,r)}function Rb(e,r){var t=r?r.length:0,a=e?Math.min(t,e.length):0,n=new Array(a),i=new Array(t),l;for(l=0;l{p0();qm()});function Cm(e,r){var t=new Date;return e=+e,r=+r,function(a){return t.setTime(e*(1-a)+r*a),t}}var Nb=nt(()=>{});function yn(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var m0=nt(()=>{});function Lm(e,r){var t={},a={},n;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(n in r)n in e?t[n]=Mo(e[n],r[n]):a[n]=r[n];return function(i){for(n in t)a[n]=t[n](i);return a}}var Fb=nt(()=>{p0()});function Ude(e){return function(){return e}}function Vde(e){return function(r){return e(r)+""}}function Sm(e,r){var t=Hb.lastIndex=Ib.lastIndex=0,a,n,i,l=-1,o=[],s=[];for(e=e+"",r=r+"";(a=Hb.exec(e))&&(n=Ib.exec(r));)(i=n.index)>t&&(i=r.slice(t,i),o[l]?o[l]+=i:o[++l]=i),(a=a[0])===(n=n[0])?o[l]?o[l]+=n:o[++l]=n:(o[++l]=null,s.push({i:l,x:yn(a,n)})),t=Ib.lastIndex;return t{m0();Hb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ib=new RegExp(Hb.source,"g")});function Mo(e,r){var t=typeof r,a;return r==null||t==="boolean"?Zf(r):(t==="number"?yn:t==="string"?(a=wo(r))?(r=a,d0):Sm:r instanceof wo?d0:r instanceof Date?Cm:km(r)?Jf:Array.isArray(r)?Rb:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Lm:yn)(e,r)}var p0=nt(()=>{Bs();Pb();zb();Nb();m0();Fb();Ob();Eb();qm()});function pY(e){var r=e.length;return function(t){return e[Math.max(0,Math.min(r-1,Math.floor(t*r)))]}}var mY=nt(()=>{});function yY(e,r){var t=To(+e,+r);return function(a){var n=t(a);return n-360*Math.floor(n/360)}}var gY=nt(()=>{Ys()});function xY(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var bY=nt(()=>{});function Bb(e,r,t,a,n,i){var l,o,s;return(l=Math.sqrt(e*e+r*r))&&(e/=l,r/=l),(s=e*t+r*a)&&(t-=e*s,a-=r*s),(o=Math.sqrt(t*t+a*a))&&(t/=o,a/=o,s/=o),e*a{_Y=180/Math.PI,Dm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function TY(e){let r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?Dm:Bb(r.a,r.b,r.c,r.d,r.e,r.f)}function MY(e){return e==null?Dm:(Em||(Em=document.createElementNS("http://www.w3.org/2000/svg","g")),Em.setAttribute("transform",e),(e=Em.transform.baseVal.consolidate())?(e=e.matrix,Bb(e.a,e.b,e.c,e.d,e.e,e.f)):Dm)}var Em,AY=nt(()=>{wY()});function kY(e,r,t,a){function n(u){return u.length?u.pop()+" ":""}function i(u,f,c,h,d,p){if(u!==c||f!==h){var y=d.push("translate(",null,r,null,t);p.push({i:y-4,x:yn(u,c)},{i:y-2,x:yn(f,h)})}else(c||h)&&d.push("translate("+c+r+h+t)}function l(u,f,c,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:c.push(n(c)+"rotate(",null,a)-2,x:yn(u,f)})):f&&c.push(n(c)+"rotate("+f+a)}function o(u,f,c,h){u!==f?h.push({i:c.push(n(c)+"skewX(",null,a)-2,x:yn(u,f)}):f&&c.push(n(c)+"skewX("+f+a)}function s(u,f,c,h,d,p){if(u!==c||f!==h){var y=d.push(n(d)+"scale(",null,",",null,")");p.push({i:y-4,x:yn(u,c)},{i:y-2,x:yn(f,h)})}else(c!==1||h!==1)&&d.push(n(d)+"scale("+c+","+h+")")}return function(u,f){var c=[],h=[];return u=e(u),f=e(f),i(u.translateX,u.translateY,f.translateX,f.translateY,c,h),l(u.rotate,f.rotate,c,h),o(u.skewX,f.skewX,c,h),s(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,h),u=f=null,function(d){for(var p=-1,y=h.length,m;++p{m0();AY();qY=kY(TY,"px, ","px)","deg)"),CY=kY(MY,", ",")",")")});function SY(e){return((e=Math.exp(e))+1/e)/2}function Xde(e){return((e=Math.exp(e))-1/e)/2}function Zde(e){return((e=Math.exp(2*e))-1)/(e+1)}var Wde,DY,EY=nt(()=>{Wde=1e-12;DY=function e(r,t,a){function n(i,l){var o=i[0],s=i[1],u=i[2],f=l[0],c=l[1],h=l[2],d=f-o,p=c-s,y=d*d+p*p,m,_;if(y{Bs();Ys();RY=PY(To),zY=PY(zt)});function Yb(e,r){var t=zt((e=Wf(e)).l,(r=Wf(r)).l),a=zt(e.a,r.a),n=zt(e.b,r.b),i=zt(e.opacity,r.opacity);return function(l){return e.l=t(l),e.a=a(l),e.b=n(l),e.opacity=i(l),e+""}}var FY=nt(()=>{Bs();Ys()});function IY(e){return function(r,t){var a=e((r=v0(r)).h,(t=v0(t)).h),n=zt(r.c,t.c),i=zt(r.l,t.l),l=zt(r.opacity,t.opacity);return function(o){return r.h=a(o),r.c=n(o),r.l=i(o),r.opacity=l(o),r+""}}}var HY,OY,BY=nt(()=>{Bs();Ys();HY=IY(To),OY=IY(zt)});function YY(e){return function r(t){t=+t;function a(n,i){var l=e((n=Xf(n)).h,(i=Xf(i)).h),o=zt(n.s,i.s),s=zt(n.l,i.l),u=zt(n.opacity,i.opacity);return function(f){return n.h=l(f),n.s=o(f),n.l=s(Math.pow(f,t)),n.opacity=u(f),n+""}}return a.gamma=r,a}(1)}var GY,UY,VY=nt(()=>{Bs();Ys();GY=YY(To),UY=YY(zt)});function Gb(e,r){r===void 0&&(r=e,e=Mo);for(var t=0,a=r.length-1,n=r[0],i=new Array(a<0?0:a);t{p0()});function XY(e,r){for(var t=new Array(r),a=0;a{});var Ub={};$W(Ub,{interpolate:()=>Mo,interpolateArray:()=>dY,interpolateBasis:()=>Tm,interpolateBasisClosed:()=>Am,interpolateCubehelix:()=>GY,interpolateCubehelixLong:()=>UY,interpolateDate:()=>Cm,interpolateDiscrete:()=>pY,interpolateHcl:()=>HY,interpolateHclLong:()=>OY,interpolateHsl:()=>RY,interpolateHslLong:()=>zY,interpolateHue:()=>yY,interpolateLab:()=>Yb,interpolateNumber:()=>yn,interpolateNumberArray:()=>Jf,interpolateObject:()=>Lm,interpolateRgb:()=>d0,interpolateRgbBasis:()=>vY,interpolateRgbBasisClosed:()=>hY,interpolateRound:()=>xY,interpolateString:()=>Sm,interpolateTransformCss:()=>qY,interpolateTransformSvg:()=>CY,interpolateZoom:()=>DY,piecewise:()=>Gb,quantize:()=>XY});var Vb=nt(()=>{p0();zb();Mm();Db();Nb();mY();gY();m0();qm();Fb();bY();Ob();LY();EY();Pb();NY();FY();BY();VY();WY();ZY()});var eG=B((R4e,jY)=>{"use strict";var Xs=kr(),Jde=(Vb(),Ty(Ub)).interpolate,JY=(Vb(),Ty(Ub)).interpolateNumber,Ao=Pe(),$de=Ao.strScale,g0=Ao.strTranslate,Kde=Ao.rad2deg,Qde=Sa().MID_SHIFT,Ws=Br(),Gs=_b(),Rm=va(),Ca=$r(),jde=sp(),e1e=fp(),r1e=bn(),$f=xr(),Wb={left:"start",center:"middle",right:"end"},Us={left:0,center:.5,right:1},$Y=/[yzafpnµmkMGTPEZY]/;function x0(e){return e&&e.duration>0}jY.exports=function(r,t,a,n){var i=r._fullLayout,l;x0(a)&&n&&(l=n()),Ao.makeTraceGroups(i._indicatorlayer,t,"trace").each(function(o){var s=o[0],u=s.trace,f=Xs.select(this),c=u._hasGauge,h=u._isAngular,d=u._isBullet,p=u.domain,y={w:i._size.w*(p.x[1]-p.x[0]),h:i._size.h*(p.y[1]-p.y[0]),l:i._size.l+i._size.w*p.x[0],r:i._size.r+i._size.w*(1-p.x[1]),t:i._size.t+i._size.h*(1-p.y[1]),b:i._size.b+i._size.h*p.y[0]},m=y.l+y.w/2,_=y.t+y.h/2,b=Math.min(y.w/2,y.h),T=Gs.innerRadius*b,x,M,A,k=u.align||"center";if(M=_,!c)x=y.l+Us[k]*y.w,A=function(Y){return KY(Y,y.w,y.h)};else if(h&&(x=m,M=_+b/2,A=function(Y){return l1e(Y,.9*T)}),d){var L=Gs.bulletPadding,D=1-Gs.bulletNumberDomainSize+L;x=y.l+(D+(1-D)*Us[k])*y.w,A=function(Y){return KY(Y,(Gs.bulletNumberDomainSize-L)*y.w,y.h)}}n1e(r,f,o,{numbersX:x,numbersY:M,numbersScaler:A,transitionOpts:a,onComplete:l});var E,R;c&&(E={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},R={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=f.selectAll("g.angular").data(h?o:[]);z.exit().remove();var H=f.selectAll("g.angularaxis").data(h?o:[]);H.exit().remove(),h&&a1e(r,f,o,{radius:b,innerRadius:T,gauge:z,layer:H,size:y,gaugeBg:E,gaugeOutline:R,transitionOpts:a,onComplete:l});var O=f.selectAll("g.bullet").data(d?o:[]);O.exit().remove();var U=f.selectAll("g.bulletaxis").data(d?o:[]);U.exit().remove(),d&&t1e(r,f,o,{gauge:O,layer:U,size:y,gaugeBg:E,gaugeOutline:R,transitionOpts:a,onComplete:l});var V=f.selectAll("text.title").data(o);V.exit().remove(),V.enter().append("text").classed("title",!0),V.attr("text-anchor",function(){return d?Wb.right:Wb[u.title.align]}).text(u.title.text).call(Ws.font,u.title.font).call(Rm.convertToTspans,r),V.attr("transform",function(){var Y=y.l+y.w*Us[u.title.align],I,G=Gs.titlePadding,Z=Ws.bBox(V.node());if(c){if(h)if(u.gauge.axis.visible){var K=Ws.bBox(H.node());I=K.top-G-Z.bottom}else I=y.t+y.h/2-b/2-Z.bottom-G;d&&(I=M-(Z.top+Z.bottom)/2,Y=y.l-Gs.bulletPadding*y.w)}else I=u._numbersTop-G-Z.bottom;return g0(Y,I)})})};function t1e(e,r,t,a){var n=t[0].trace,i=a.gauge,l=a.layer,o=a.gaugeBg,s=a.gaugeOutline,u=a.size,f=n.domain,c=a.transitionOpts,h=a.onComplete,d,p,y,m,_;i.enter().append("g").classed("bullet",!0),i.attr("transform",g0(u.l,u.t)),l.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),l.selectAll("g.xbulletaxistick,path,text").remove();var b=u.h,T=n.gauge.bar.thickness*b,x=f.x[0],M=f.x[0]+(f.x[1]-f.x[0])*(n._hasNumber||n._hasDelta?1-Gs.bulletNumberDomainSize:1);d=y0(e,n.gauge.axis),d._id="xbulletaxis",d.domain=[x,M],d.setScale(),p=Ca.calcTicks(d),y=Ca.makeTransTickFn(d),m=Ca.getTickSigns(d)[2],_=u.t+u.h,d.visible&&(Ca.drawTicks(e,d,{vals:d.ticks==="inside"?Ca.clipEnds(d,p):p,layer:l,path:Ca.makeTickPath(d,_,m),transFn:y}),Ca.drawLabels(e,d,{vals:p,layer:l,transFn:y,labelFns:Ca.makeLabelFns(d,_)}));function A(H){H.attr("width",function(O){return Math.max(0,d.c2p(O.range[1])-d.c2p(O.range[0]))}).attr("x",function(O){return d.c2p(O.range[0])}).attr("y",function(O){return .5*(1-O.thickness)*b}).attr("height",function(O){return O.thickness*b})}var k=[o].concat(n.gauge.steps),L=i.selectAll("g.bg-bullet").data(k);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(A).call(Vs),L.exit().remove();var D=i.selectAll("g.value-bullet").data([n.gauge.bar]);D.enter().append("g").classed("value-bullet",!0).append("rect"),D.select("rect").attr("height",T).attr("y",(b-T)/2).call(Vs),x0(c)?D.select("rect").transition().duration(c.duration).ease(c.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],t[0].y)))):D.select("rect").attr("width",typeof t[0].y=="number"?Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],t[0].y))):0),D.exit().remove();var E=t.filter(function(){return n.gauge.threshold.value||n.gauge.threshold.value===0}),R=i.selectAll("g.threshold-bullet").data(E);R.enter().append("g").classed("threshold-bullet",!0).append("line"),R.select("line").attr("x1",d.c2p(n.gauge.threshold.value)).attr("x2",d.c2p(n.gauge.threshold.value)).attr("y1",(1-n.gauge.threshold.thickness)/2*b).attr("y2",(1-(1-n.gauge.threshold.thickness)/2)*b).call($f.stroke,n.gauge.threshold.line.color).style("stroke-width",n.gauge.threshold.line.width),R.exit().remove();var z=i.selectAll("g.gauge-outline").data([s]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(A).call(Vs),z.exit().remove()}function a1e(e,r,t,a){var n=t[0].trace,i=a.size,l=a.radius,o=a.innerRadius,s=a.gaugeBg,u=a.gaugeOutline,f=[i.l+i.w/2,i.t+i.h/2+l/2],c=a.gauge,h=a.layer,d=a.transitionOpts,p=a.onComplete,y=Math.PI/2;function m(re){var se=n.gauge.axis.range[0],ce=n.gauge.axis.range[1],le=(re-se)/(ce-se)*Math.PI-y;return le<-y?-y:le>y?y:le}function _(re){return Xs.svg.arc().innerRadius((o+l)/2-re/2*(l-o)).outerRadius((o+l)/2+re/2*(l-o)).startAngle(-y)}function b(re){re.attr("d",function(se){return _(se.thickness).startAngle(m(se.range[0])).endAngle(m(se.range[1]))()})}var T,x,M,A;c.enter().append("g").classed("angular",!0),c.attr("transform",g0(f[0],f[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),T=y0(e,n.gauge.axis),T.type="linear",T.range=n.gauge.axis.range,T._id="xangularaxis",T.ticklabeloverflow="allow",T.setScale();var k=function(re){return(T.range[0]-re.x)/(T.range[1]-T.range[0])*Math.PI+Math.PI},L={},D=Ca.makeLabelFns(T,0),E=D.labelStandoff;L.xFn=function(re){var se=k(re);return Math.cos(se)*E},L.yFn=function(re){var se=k(re),ce=Math.sin(se)>0?.2:1;return-Math.sin(se)*(E+re.fontSize*ce)+Math.abs(Math.cos(se))*(re.fontSize*Qde)},L.anchorFn=function(re){var se=k(re),ce=Math.cos(se);return Math.abs(ce)<.1?"middle":ce>0?"start":"end"},L.heightFn=function(re,se,ce){var le=k(re);return-.5*(1+Math.sin(le))*ce};var R=function(re){return g0(f[0]+l*Math.cos(re),f[1]-l*Math.sin(re))};M=function(re){return R(k(re))};var z=function(re){var se=k(re);return R(se)+"rotate("+-Kde(se)+")"};if(x=Ca.calcTicks(T),A=Ca.getTickSigns(T)[2],T.visible){A=T.ticks==="inside"?-1:1;var H=(T.linewidth||1)/2;Ca.drawTicks(e,T,{vals:x,layer:h,path:"M"+A*H+",0h"+A*T.ticklen,transFn:z}),Ca.drawLabels(e,T,{vals:x,layer:h,transFn:M,labelFns:L})}var O=[s].concat(n.gauge.steps),U=c.selectAll("g.bg-arc").data(O);U.enter().append("g").classed("bg-arc",!0).append("path"),U.select("path").call(b).call(Vs),U.exit().remove();var V=_(n.gauge.bar.thickness),Y=c.selectAll("g.value-arc").data([n.gauge.bar]);Y.enter().append("g").classed("value-arc",!0).append("path");var I=Y.select("path");x0(d)?(I.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",i1e(V,m(t[0].lastY),m(t[0].y))),n._lastValue=t[0].y):I.attr("d",typeof t[0].y=="number"?V.endAngle(m(t[0].y)):"M0,0Z"),I.call(Vs),Y.exit().remove(),O=[];var G=n.gauge.threshold.value;(G||G===0)&&O.push({range:[G,G],color:n.gauge.threshold.color,line:{color:n.gauge.threshold.line.color,width:n.gauge.threshold.line.width},thickness:n.gauge.threshold.thickness});var Z=c.selectAll("g.threshold-arc").data(O);Z.enter().append("g").classed("threshold-arc",!0).append("path"),Z.select("path").call(b).call(Vs),Z.exit().remove();var K=c.selectAll("g.gauge-outline").data([u]);K.enter().append("g").classed("gauge-outline",!0).append("path"),K.select("path").call(b).call(Vs),K.exit().remove()}function n1e(e,r,t,a){var n=t[0].trace,i=a.numbersX,l=a.numbersY,o=n.align||"center",s=Wb[o],u=a.transitionOpts,f=a.onComplete,c=Ao.ensureSingle(r,"g","numbers"),h,d,p,y=[];n._hasNumber&&y.push("number"),n._hasDelta&&(y.push("delta"),n.delta.position==="left"&&y.reverse());var m=c.selectAll("text").data(y);m.enter().append("text"),m.attr("text-anchor",function(){return s}).attr("class",function(R){return R}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),m.exit().remove();function _(R,z,H,O){if(R.match("s")&&H>=0!=O>=0&&!z(H).slice(-1).match($Y)&&!z(O).slice(-1).match($Y)){var U=R.slice().replace("s","f").replace(/\d+/,function(Y){return parseInt(Y)-1}),V=y0(e,{tickformat:U});return function(Y){return Math.abs(Y)<1?Ca.tickText(V,Y).text:z(Y)}}else return z}function b(){var R=y0(e,{tickformat:n.number.valueformat},n._range);R.setScale(),Ca.prepTicks(R);var z=function(Y){return Ca.tickText(R,Y).text},H=n.number.suffix,O=n.number.prefix,U=c.select("text.number");function V(){var Y=typeof t[0].y=="number"?O+z(t[0].y)+H:"-";U.text(Y).call(Ws.font,n.number.font).call(Rm.convertToTspans,e)}return x0(u)?U.transition().duration(u.duration).ease(u.easing).each("end",function(){V(),f&&f()}).each("interrupt",function(){V(),f&&f()}).attrTween("text",function(){var Y=Xs.select(this),I=JY(t[0].lastY,t[0].y);n._lastValue=t[0].y;var G=_(n.number.valueformat,z,t[0].lastY,t[0].y);return function(Z){Y.text(O+G(I(Z))+H)}}):V(),h=QY(O+z(t[0].y)+H,n.number.font,s,e),U}function T(){var R=y0(e,{tickformat:n.delta.valueformat},n._range);R.setScale(),Ca.prepTicks(R);var z=function(Z){return Ca.tickText(R,Z).text},H=n.delta.suffix,O=n.delta.prefix,U=function(Z){var K=n.delta.relative?Z.relativeDelta:Z.delta;return K},V=function(Z,K){return Z===0||typeof Z!="number"||isNaN(Z)?"-":(Z>0?n.delta.increasing.symbol:n.delta.decreasing.symbol)+O+K(Z)+H},Y=function(Z){return Z.delta>=0?n.delta.increasing.color:n.delta.decreasing.color};n._deltaLastValue===void 0&&(n._deltaLastValue=U(t[0]));var I=c.select("text.delta");I.call(Ws.font,n.delta.font).call($f.fill,Y({delta:n._deltaLastValue}));function G(){I.text(V(U(t[0]),z)).call($f.fill,Y(t[0])).call(Rm.convertToTspans,e)}return x0(u)?I.transition().duration(u.duration).ease(u.easing).tween("text",function(){var Z=Xs.select(this),K=U(t[0]),re=n._deltaLastValue,se=_(n.delta.valueformat,z,re,K),ce=JY(re,K);return n._deltaLastValue=K,function(le){Z.text(V(ce(le),se)),Z.call($f.fill,Y({delta:ce(le)}))}}).each("end",function(){G(),f&&f()}).each("interrupt",function(){G(),f&&f()}):G(),d=QY(V(U(t[0]),z),n.delta.font,s,e),I}var x=n.mode+n.align,M;if(n._hasDelta&&(M=T(),x+=n.delta.position+n.delta.font.size+n.delta.font.family+n.delta.valueformat,x+=n.delta.increasing.symbol+n.delta.decreasing.symbol,p=d),n._hasNumber&&(b(),x+=n.number.font.size+n.number.font.family+n.number.valueformat+n.number.suffix+n.number.prefix,p=h),n._hasDelta&&n._hasNumber){var A=[(h.left+h.right)/2,(h.top+h.bottom)/2],k=[(d.left+d.right)/2,(d.top+d.bottom)/2],L,D,E=.75*n.delta.font.size;n.delta.position==="left"&&(L=Pm(n,"deltaPos",0,-1*(h.width*Us[n.align]+d.width*(1-Us[n.align])+E),x,Math.min),D=A[1]-k[1],p={width:h.width+d.width+E,height:Math.max(h.height,d.height),left:d.left+L,right:h.right,top:Math.min(h.top,d.top+D),bottom:Math.max(h.bottom,d.bottom+D)}),n.delta.position==="right"&&(L=Pm(n,"deltaPos",0,h.width*(1-Us[n.align])+d.width*Us[n.align]+E,x,Math.max),D=A[1]-k[1],p={width:h.width+d.width+E,height:Math.max(h.height,d.height),left:h.left,right:d.right+L,top:Math.min(h.top,d.top+D),bottom:Math.max(h.bottom,d.bottom+D)}),n.delta.position==="bottom"&&(L=null,D=d.height,p={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}),n.delta.position==="top"&&(L=null,D=h.top,p={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}),M.attr({dx:L,dy:D})}(n._hasNumber||n._hasDelta)&&c.attr("transform",function(){var R=a.numbersScaler(p);x+=R[2];var z=Pm(n,"numbersScale",1,R[0],x,Math.min),H;n._scaleNumbers||(z=1),n._isAngular?H=l-z*p.bottom:H=l-z*(p.top+p.bottom)/2,n._numbersTop=z*p.top+H;var O=p[o];o==="center"&&(O=(p.left+p.right)/2);var U=i-z*O;return U=Pm(n,"numbersTranslate",0,U,x,Math.max),g0(U,H)+$de(z)})}function Vs(e){e.each(function(r){$f.stroke(Xs.select(this),r.line.color)}).each(function(r){$f.fill(Xs.select(this),r.color)}).style("stroke-width",function(r){return r.line.width})}function i1e(e,r,t){return function(){var a=Jde(r,t);return function(n){return e.endAngle(a(n))()}}}function y0(e,r,t){var a=e._fullLayout,n=Ao.extendFlat({type:"linear",ticks:"outside",range:t,showline:!0},r),i={type:"linear",_id:"x"+r._id},l={letter:"x",font:a.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function o(s,u){return Ao.coerce(n,i,r1e,s,u)}return jde(n,i,o,l,a),e1e(n,i,o,l),i}function KY(e,r,t){var a=Math.min(r/e.width,t/e.height);return[a,e,r+"x"+t]}function l1e(e,r){var t=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),a=r/t;return[a,e,r]}function QY(e,r,t,a){var n=document.createElementNS("http://www.w3.org/2000/svg","text"),i=Xs.select(n);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",t).attr("data-unformatted",e).call(Rm.convertToTspans,a).call(Ws.font,r),Ws.bBox(i.node())}function Pm(e,r,t,a,n,i){var l="_cache"+r;e[l]&&e[l].key===n||(e[l]={key:n,value:t});var o=Ao.aggNums(i,null,[e[l].value,a],2);return e[l].value=o,o}});var tG=B((z4e,rG)=>{"use strict";rG.exports={moduleType:"trace",name:"indicator",basePlotModule:CB(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:bb(),supplyDefaults:IB().supplyDefaults,calc:OB().calc,plot:eG(),meta:{}}});var nG=B((N4e,aG)=>{"use strict";aG.exports=tG()});var Nm=B((F4e,uG)=>{"use strict";var zm=Pe().extendFlat,b0=bi(),iG=di().axisHoverFormat,oG=fi().dash,o1e=bc(),sG=Ff(),s1e=sG.INCREASING.COLOR,u1e=sG.DECREASING.COLOR,Xb=b0.line;function lG(e){return{line:{color:zm({},Xb.color,{dflt:e}),width:Xb.width,dash:oG,editType:"style"},editType:"style"}}uG.exports={xperiod:b0.xperiod,xperiod0:b0.xperiod0,xperiodalignment:b0.xperiodalignment,xhoverformat:iG("x"),yhoverformat:iG("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:zm({},Xb.width,{}),dash:zm({},oG,{}),editType:"style"},increasing:lG(s1e),decreasing:lG(u1e),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:zm({},o1e.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:b0.zorder}});var Zb=B((I4e,fG)=>{"use strict";var f1e=yr(),c1e=Pe();fG.exports=function(r,t,a,n){var i=a("x"),l=a("open"),o=a("high"),s=a("low"),u=a("close");a("hoverlabel.split");var f=f1e.getComponentMethod("calendars","handleTraceDefaults");if(f(r,t,["x"],n),!!(l&&o&&s&&u)){var c=Math.min(l.length,o.length,s.length,u.length);return i&&(c=Math.min(c,c1e.minRowLength(i))),t._length=c,c}}});var hG=B((H4e,vG)=>{"use strict";var v1e=Pe(),h1e=Zb(),d1e=_s(),p1e=Nm();vG.exports=function(r,t,a,n){function i(o,s){return v1e.coerce(r,t,p1e,o,s)}var l=h1e(r,t,i,n);if(!l){t.visible=!1;return}d1e(r,t,n,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),cG(r,t,i,"increasing"),cG(r,t,i,"decreasing"),i("text"),i("hovertext"),i("tickwidth"),n._requestRangeslider[t.xaxis]=!0,i("zorder")};function cG(e,r,t,a){t(a+".line.color"),t(a+".line.width",r.line.width),t(a+".line.dash",r.line.dash)}});var Jb=B((O4e,pG)=>{"use strict";var Kf=Pe(),Fm=Kf._,Im=$r(),m1e=ws(),_0=wt().BADNUM;function y1e(e,r){var t=Im.getFromId(e,r.xaxis),a=Im.getFromId(e,r.yaxis),n=x1e(e,t,r),i=r._minDiff;r._minDiff=null;var l=r._origX;r._origX=null;var o=r._xcalc;r._xcalc=null;var s=dG(e,r,l,o,a,g1e);return r._extremes[t._id]=Im.findExtremes(t,o,{vpad:i/2}),s.length?(Kf.extendFlat(s[0].t,{wHover:i/2,tickLen:n}),s):[{t:{empty:!0}}]}function g1e(e,r,t,a){return{o:e,h:r,l:t,c:a}}function dG(e,r,t,a,n,i){for(var l=n.makeCalcdata(r,"open"),o=n.makeCalcdata(r,"high"),s=n.makeCalcdata(r,"low"),u=n.makeCalcdata(r,"close"),f=Kf.isArrayOrTypedArray(r.text),c=Kf.isArrayOrTypedArray(r.hovertext),h=!0,d=null,p=!!r.xperiodalignment,y=[],m=0;md):h=M>b,d=M;var A=i(b,T,x,M);A.pos=_,A.yc=(b+M)/2,A.i=m,A.dir=h?"increasing":"decreasing",A.x=A.pos,A.y=[x,T],p&&(A.orig_p=t[m]),f&&(A.tx=r.text[m]),c&&(A.htx=r.hovertext[m]),y.push(A)}else y.push({pos:_,empty:!0})}return r._extremes[n._id]=Im.findExtremes(n,Kf.concat(s,o),{padded:!0}),y.length&&(y[0].t={labels:{open:Fm(e,"open:")+" ",high:Fm(e,"high:")+" ",low:Fm(e,"low:")+" ",close:Fm(e,"close:")+" "}}),y}function x1e(e,r,t){var a=t._minDiff;if(!a){var n=e._fullData,i=[];a=1/0;var l;for(l=0;l{"use strict";var b1e=kr(),mG=Pe();yG.exports=function(r,t,a,n){var i=t.yaxis,l=t.xaxis,o=!!l.rangebreaks;mG.makeTraceGroups(n,a,"trace ohlc").each(function(s){var u=b1e.select(this),f=s[0],c=f.t,h=f.trace;if(h.visible!==!0||c.empty){u.remove();return}var d=c.tickLen,p=u.selectAll("path").data(mG.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(y){if(y.empty)return"M0,0Z";var m=l.c2p(y.pos-d,!0),_=l.c2p(y.pos+d,!0),b=o?(m+_)/2:l.c2p(y.pos,!0),T=i.c2p(y.o,!0),x=i.c2p(y.h,!0),M=i.c2p(y.l,!0),A=i.c2p(y.c,!0);return"M"+m+","+T+"H"+b+"M"+b+","+x+"V"+M+"M"+_+","+A+"H"+b})})}});var bG=B((Y4e,xG)=>{"use strict";var $b=kr(),_1e=Br(),w1e=xr();xG.exports=function(r,t,a){var n=a||$b.select(r).selectAll("g.ohlclayer").selectAll("g.trace");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var l=i[0].trace;$b.select(this).selectAll("path").each(function(o){if(!o.empty){var s=l[o.dir].line;$b.select(this).style("fill","none").call(w1e.stroke,s.color).call(_1e.dashLine,s.dash,s.width).style("opacity",l.selectedpoints&&!o.selected?.3:1)}})})}});var Qb=B((G4e,AG)=>{"use strict";var Kb=$r(),T1e=Pe(),Hm=gi(),M1e=xr(),A1e=Pe().fillText,_G=Ff(),k1e={increasing:_G.INCREASING.SYMBOL,decreasing:_G.DECREASING.SYMBOL};function q1e(e,r,t,a){var n=e.cd,i=n[0].trace;return i.hoverlabel.split?TG(e,r,t,a):MG(e,r,t,a)}function wG(e,r,t,a){var n=e.cd,i=e.xa,l=n[0].trace,o=n[0].t,s=l.type,u=s==="ohlc"?"l":"min",f=s==="ohlc"?"h":"max",c,h,d=o.bPos||0,p=function(E){return E.pos+d-r},y=o.bdPos||o.tickLen,m=o.wHover,_=Math.min(1,y/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));c=e.maxHoverDistance-_,h=e.maxSpikeDistance-_;function b(E){var R=p(E);return Hm.inbox(R-m,R+m,c)}function T(E){var R=E[u],z=E[f];return R===z||Hm.inbox(R-t,z-t,c)}function x(E){return(b(E)+T(E))/2}var M=Hm.getDistanceFunction(a,b,T,x);if(Hm.getClosest(n,M,e),e.index===!1)return null;var A=n[e.index];if(A.empty)return null;var k=A.dir,L=l[k],D=L.line.color;return M1e.opacity(D)&&L.line.width?e.color=D:e.color=L.fillcolor,e.x0=i.c2p(A.pos+d-y,!0),e.x1=i.c2p(A.pos+d+y,!0),e.xLabelVal=A.orig_p!==void 0?A.orig_p:A.pos,e.spikeDistance=x(A)*h/c,e.xSpike=i.c2p(A.pos,!0),e}function TG(e,r,t,a){var n=e.cd,i=e.ya,l=n[0].trace,o=n[0].t,s=[],u=wG(e,r,t,a);if(!u)return[];var f=u.index,c=n[f],h=c.hi||l.hoverinfo,d=h.split("+"),p=h==="all",y=p||d.indexOf("y")!==-1;if(!y)return[];for(var m=["high","open","close","low"],_={},b=0;b"+o.labels[T]+Kb.hoverLabelText(i,x,l.yhoverformat)):(A=T1e.extendFlat({},u),A.y0=A.y1=M,A.yLabelVal=x,A.yLabel=o.labels[T]+Kb.hoverLabelText(i,x,l.yhoverformat),A.name="",s.push(A),_[x]=A)}return s}function MG(e,r,t,a){var n=e.cd,i=e.ya,l=n[0].trace,o=n[0].t,s=wG(e,r,t,a);if(!s)return[];var u=s.index,f=n[u],c=s.index=f.i,h=f.dir;function d(x){return o.labels[x]+Kb.hoverLabelText(i,l[x][c],l.yhoverformat)}var p=f.hi||l.hoverinfo,y=p.split("+"),m=p==="all",_=m||y.indexOf("y")!==-1,b=m||y.indexOf("text")!==-1,T=_?[d("open"),d("high"),d("low"),d("close")+" "+k1e[h]]:[];return b&&A1e(f,l,T),s.extraText=T.join("
"),s.y0=s.y1=i.c2p(f.yc,!0),[s]}AG.exports={hoverPoints:q1e,hoverSplit:TG,hoverOnPoints:MG}});var jb=B((U4e,kG)=>{"use strict";kG.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,l=[],o,s=a[0].t.bPos||0;if(t===!1)for(o=0;o{"use strict";qG.exports={moduleType:"trace",name:"ohlc",basePlotModule:gl(),categories:["cartesian","svg","showLegend"],meta:{},attributes:Nm(),supplyDefaults:hG(),calc:Jb().calc,plot:gG(),style:bG(),hoverPoints:Qb().hoverPoints,selectPoints:jb()}});var SG=B((W4e,LG)=>{"use strict";LG.exports=CG()});var zG=B((X4e,RG)=>{"use strict";var C1e=W3(),ri=bi(),DG=Tl(),L1e=zn(),EG=di().axisHoverFormat,S1e=_a().hovertemplateAttrs,Cl=mt().extendFlat,Qf=ri.marker,PG=Qf.line;RG.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:ri.xperiod,yperiod:ri.yperiod,xperiod0:ri.xperiod0,yperiod0:ri.yperiod0,xperiodalignment:ri.xperiodalignment,yperiodalignment:ri.yperiodalignment,xhoverformat:EG("x"),yhoverformat:EG("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:Cl({},Qf.symbol,{arrayOk:!1,editType:"plot"}),opacity:Cl({},Qf.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Cl({},Qf.angle,{arrayOk:!1,editType:"calc"}),size:Cl({},Qf.size,{arrayOk:!1,editType:"calc"}),color:Cl({},Qf.color,{arrayOk:!1,editType:"style"}),line:{color:Cl({},PG.color,{arrayOk:!1,dflt:L1e.defaultLine,editType:"style"}),width:Cl({},PG.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:C1e(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:DG.offsetgroup,alignmentgroup:DG.alignmentgroup,selected:{marker:ri.selected.marker,editType:"style"},unselected:{marker:ri.unselected.marker,editType:"style"},text:Cl({},ri.text,{}),hovertext:Cl({},ri.hovertext,{}),hovertemplate:S1e({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:ri.zorder}});var r_=B((Z4e,IG)=>{"use strict";var e_=Pe().extendFlat,NG=di().axisHoverFormat,Ln=Nm(),jf=zG();function FG(e){return{line:{color:e_({},jf.line.color,{dflt:e}),width:jf.line.width,editType:"style"},fillcolor:jf.fillcolor,editType:"style"}}IG.exports={xperiod:Ln.xperiod,xperiod0:Ln.xperiod0,xperiodalignment:Ln.xperiodalignment,xhoverformat:NG("x"),yhoverformat:NG("y"),x:Ln.x,open:Ln.open,high:Ln.high,low:Ln.low,close:Ln.close,line:{width:e_({},jf.line.width,{}),editType:"style"},increasing:FG(Ln.increasing.line.color.dflt),decreasing:FG(Ln.decreasing.line.color.dflt),text:Ln.text,hovertext:Ln.hovertext,whiskerwidth:e_({},jf.whiskerwidth,{dflt:0}),hoverlabel:Ln.hoverlabel,zorder:jf.zorder}});var t_=B((J4e,HG)=>{"use strict";HG.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 YG=B(($4e,BG)=>{"use strict";var D1e=yr(),E1e=Pe(),P1e=t_();function OG(e,r,t,a,n){for(var i=n+"Layout",l=!1,o=0;o{"use strict";var GG=$r(),z1e=Pe(),N1e=ys().getAxisGroup,UG=["v","h"];function F1e(e,r){for(var t=e.calcdata,a=r.xaxis,n=r.yaxis,i=0;i1,b=1-i[e+"gap"],T=1-i[e+"groupgap"];for(s=0;s0;if(k==="positive"?(I=L*(A?1:.5),K=Z,G=K=E):k==="negative"?(I=K=E,G=L*(A?1:.5),re=Z):(I=G=L,K=re=Z),ue){var ke=x.pointpos,ve=x.jitter,be=x.marker.size/2,W=0;ke+ve>=0&&(W=Z*(ke+ve),W>I?(ge=!0,le=be,se=W):W>K&&(le=be,se=I)),W<=I&&(se=I);var te=0;ke-ve<=0&&(te=-Z*(ke-ve),te>G?(ge=!0,Q=be,ce=te):te>re&&(Q=be,ce=G)),te<=G&&(ce=G)}else se=I,ce=G;var X=new Array(f.length);for(u=0;u{"use strict";var I1e=Pe(),H1e=xr(),O1e=Zb(),B1e=_s(),Y1e=r_();JG.exports=function(r,t,a,n){function i(o,s){return I1e.coerce(r,t,Y1e,o,s)}var l=O1e(r,t,i,n);if(!l){t.visible=!1;return}B1e(r,t,n,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),ZG(r,t,i,"increasing"),ZG(r,t,i,"decreasing"),i("text"),i("hovertext"),i("whiskerwidth"),n._requestRangeslider[t.xaxis]=!0,i("zorder")};function ZG(e,r,t,a){var n=t(a+".line.color");t(a+".line.width",r.line.width),t(a+".fillcolor",H1e.addOpacity(n,.5))}});var eU=B((j4e,jG)=>{"use strict";var KG=Pe(),QG=$r(),G1e=ws(),U1e=Jb().calcCommon;jG.exports=function(e,r){var t=e._fullLayout,a=QG.getFromId(e,r.xaxis),n=QG.getFromId(e,r.yaxis),i=a.makeCalcdata(r,"x"),l=G1e(r,a,"x",i).vals,o=U1e(e,r,i,l,n,V1e);return o.length?(KG.extendFlat(o[0].t,{num:t._numBoxes,dPos:KG.distinctVals(l).minDiff/2,posLetter:"x",valLetter:"y"}),t._numBoxes++,o):[{t:{empty:!0}}]};function V1e(e,r,t,a){return{min:t,q1:Math.min(e,a),med:a,q3:Math.max(e,a),max:r}}});var lU=B((e6e,iU)=>{"use strict";var ec=kr(),Zs=Pe(),W1e=Br(),rU=5,X1e=.01;function Z1e(e,r,t,a){var n=e._context.staticPlot,i=r.xaxis,l=r.yaxis;Zs.makeTraceGroups(a,t,"trace boxes").each(function(o){var s=ec.select(this),u=o[0],f=u.t,c=u.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){s.remove();return}var h,d;c.orientation==="h"?(h=l,d=i):(h=i,d=l),tU(s,{pos:h,val:d},c,f,n),aU(s,{x:i,y:l},c,f),nU(s,{pos:h,val:d},c,f)})}function tU(e,r,t,a,n){var i=t.orientation==="h",l=r.val,o=r.pos,s=!!o.rangebreaks,u=a.bPos,f=a.wdPos||0,c=a.bPosPxOffset||0,h=t.whiskerwidth||0,d=t.showwhiskers!==!1,p=t.notched||!1,y=p?1-2*t.notchwidth:1,m,_;Array.isArray(a.bdPos)?(m=a.bdPos[0],_=a.bdPos[1]):(m=a.bdPos,_=a.bdPos);var b=e.selectAll("path.box").data(t.type!=="violin"||t.box.visible?Zs.identity:[]);b.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),b.exit().remove(),b.each(function(T){if(T.empty)return ec.select(this).attr("d","M0,0Z");var x=o.c2l(T.pos+u,!0),M=o.l2p(x-m)+c,A=o.l2p(x+_)+c,k=s?(M+A)/2:o.l2p(x)+c,L=t.whiskerwidth,D=s?M*L+(1-L)*k:o.l2p(x-f)+c,E=s?A*L+(1-L)*k:o.l2p(x+f)+c,R=o.l2p(x-m*y)+c,z=o.l2p(x+_*y)+c,H=t.sizemode==="sd",O=l.c2p(H?T.mean-T.sd:T.q1,!0),U=H?l.c2p(T.mean+T.sd,!0):l.c2p(T.q3,!0),V=Zs.constrain(H?l.c2p(T.mean,!0):l.c2p(T.med,!0),Math.min(O,U)+1,Math.max(O,U)-1),Y=T.lf===void 0||t.boxpoints===!1||H,I=l.c2p(Y?T.min:T.lf,!0),G=l.c2p(Y?T.max:T.uf,!0),Z=l.c2p(T.ln,!0),K=l.c2p(T.un,!0);i?ec.select(this).attr("d","M"+V+","+R+"V"+z+"M"+O+","+M+"V"+A+(p?"H"+Z+"L"+V+","+z+"L"+K+","+A:"")+"H"+U+"V"+M+(p?"H"+K+"L"+V+","+R+"L"+Z+","+M:"")+"Z"+(d?"M"+O+","+k+"H"+I+"M"+U+","+k+"H"+G+(h===0?"":"M"+I+","+D+"V"+E+"M"+G+","+D+"V"+E):"")):ec.select(this).attr("d","M"+R+","+V+"H"+z+"M"+M+","+O+"H"+A+(p?"V"+Z+"L"+z+","+V+"L"+A+","+K:"")+"V"+U+"H"+M+(p?"V"+K+"L"+R+","+V+"L"+M+","+Z:"")+"Z"+(d?"M"+k+","+O+"V"+I+"M"+k+","+U+"V"+G+(h===0?"":"M"+D+","+I+"H"+E+"M"+D+","+G+"H"+E):""))})}function aU(e,r,t,a){var n=r.x,i=r.y,l=a.bdPos,o=a.bPos,s=t.boxpoints||t.points;Zs.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=a,d.trace=t}),h},f=e.selectAll("g.points").data(s?u:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(h){var d,p=h.pts2,y=Math.max((h.max-h.min)/10,h.q3-h.q1),m=y*1e-9,_=y*X1e,b=[],T=0,x;if(t.jitter){if(y===0)for(T=1,b=new Array(p.length),d=0;dh.lo&&(E.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(W1e.translatePoints,n,i)}function nU(e,r,t,a){var n=r.val,i=r.pos,l=!!i.rangebreaks,o=a.bPos,s=a.bPosPxOffset||0,u=t.boxmean||(t.meanline||{}).visible,f,c;Array.isArray(a.bdPos)?(f=a.bdPos[0],c=a.bdPos[1]):(f=a.bdPos,c=a.bdPos);var h=e.selectAll("path.mean").data(t.type==="box"&&t.boxmean||t.type==="violin"&&t.box.visible&&t.meanline.visible?Zs.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=i.c2l(d.pos+o,!0),y=i.l2p(p-f)+s,m=i.l2p(p+c)+s,_=l?(y+m)/2:i.l2p(p)+s,b=n.c2p(d.mean,!0),T=n.c2p(d.mean-d.sd,!0),x=n.c2p(d.mean+d.sd,!0);t.orientation==="h"?ec.select(this).attr("d","M"+b+","+y+"V"+m+(u==="sd"?"m0,0L"+T+","+_+"L"+b+","+y+"L"+x+","+_+"Z":"")):ec.select(this).attr("d","M"+y+","+b+"H"+m+(u==="sd"?"m0,0L"+_+","+T+"L"+y+","+b+"L"+_+","+x+"Z":""))})}iU.exports={plot:Z1e,plotBoxAndWhiskers:tU,plotPoints:aU,plotBoxMean:nU}});var sU=B((r6e,oU)=>{"use strict";var a_=kr(),n_=xr(),i_=Br();function J1e(e,r,t){var a=t||a_.select(e).selectAll("g.trace.boxes");a.style("opacity",function(n){return n[0].trace.opacity}),a.each(function(n){var i=a_.select(this),l=n[0].trace,o=l.line.width;function s(c,h,d,p){c.style("stroke-width",h+"px").call(n_.stroke,d).call(n_.fill,p)}var u=i.selectAll("path.box");if(l.type==="candlestick")u.each(function(c){if(!c.empty){var h=a_.select(this),d=l[c.dir];s(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",l.selectedpoints&&!c.selected?.3:1)}});else{s(u,o,l.line.color,l.fillcolor),i.selectAll("path.mean").style({"stroke-width":o,"stroke-dasharray":2*o+"px,"+o+"px"}).call(n_.stroke,l.line.color);var f=i.selectAll("path.point");i_.pointStyle(f,l,e)}})}function $1e(e,r,t){var a=r[0].trace,n=t.selectAll("path.point");a.selectedpoints?i_.selectedPointStyle(n,a):i_.pointStyle(n,a,e)}oU.exports={style:J1e,styleOnSelect:$1e}});var fU=B((t6e,uU)=>{"use strict";uU.exports={moduleType:"trace",name:"candlestick",basePlotModule:gl(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:r_(),layoutAttributes:t_(),supplyLayoutDefaults:YG().supplyLayoutDefaults,crossTraceCalc:XG().crossTraceCalc,supplyDefaults:$G(),calc:eU(),plot:lU().plot,layerName:"boxlayer",style:sU().style,hoverPoints:Qb().hoverPoints,selectPoints:jb()}});var vU=B((a6e,cU)=>{"use strict";cU.exports=fU()});var Ra=B((n6e,dU)=>{"use strict";var hU=Object.getOwnPropertySymbols,K1e=Object.prototype.hasOwnProperty,Q1e=Object.prototype.propertyIsEnumerable;function j1e(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function epe(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}dU.exports=epe()?Object.assign:function(e,r){for(var t,a=j1e(e),n,i=1;i{var Bm=Ra();function pU(){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={}}Bm(pU.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function l_(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function Om(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}Bm(l_.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Rr.local.differentCalendars||Rr.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+Om(Math.abs(this.year()),4)+"-"+Om(this.month(),2)+"-"+Om(this.day(),2)}});function o_(){this.shortYearCutoff="+10"}Bm(o_.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new l_(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+Om(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Rr.local.invalidMonth||Rr.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Rr.local.invalidMonth||Rr.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Rr.local.invalidYear||Rr.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),l=e.monthOfYear()+(t==="m"?r:0),n=e.day(),o=function(f){for(;lc-1+f.minMonth;)i++,l-=c,c=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,l)&&(l=this.newDate(i,e.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l)))):t==="m"&&(o(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,l))));var s=[i,this.fromMonthOfYear(i,l),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,o)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Rr.local.invalidDate||Rr.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Rr=mU.exports=new pU;Rr.cdate=l_;Rr.baseCalendar=o_;Rr.calendars.gregorian=s_});var yU=B(()=>{var u_=Ra(),pa=za();u_(pa.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"});pa.local=pa.regionalOptions[""];u_(pa.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});u_(pa.baseCalendar.prototype,{UNIX_EPOCH:pa.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:pa.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw pa.local.invalidFormat||pa.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,l=t.monthNamesShort||this.local.monthNamesShort,o=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(x,M){for(var A=1;T+A1},f=function(x,M,A,k){var L=""+M;if(u(x,k))for(;L.length1},b=function(z,H){var O=_(z,H),U=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],V=new RegExp("^-?\\d{1,"+U+"}"),Y=r.substring(L).match(V);if(!Y)throw(pa.local.missingNumberAt||pa.regionalOptions[""].missingNumberAt).replace(/\{0\}/,L);return L+=Y[0].length,parseInt(Y[0],10)},T=this,x=function(){if(typeof o=="function"){_("m");var z=o.call(T,r.substring(L));return L+=z.length,z}return b("m")},M=function(z,H,O,U){for(var V=_(z,U)?O:H,Y=0;Y-1){h=1,d=p;for(var R=this.daysInMonth(c,h);d>R;R=this.daysInMonth(c,h))h++,d-=R}return f>-1?this.fromJD(f):this.newDate(c,h,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,l=function(o){try{return i.parseDate(a,o,n)}catch(c){}o=o.toLowerCase();for(var s=(o.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(o);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(o);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?l(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var gU=B(()=>{var ko=za(),rpe=Ra(),f_=ko.instance();function Ym(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ym.prototype=new ko.baseCalendar;rpe(Ym.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(ape);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(npe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(ipe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw ko.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw ko.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,ko.local.invalidyear),n=Co[a-Co[0]],i=n>>9&4095,l=n>>5&15,o=n&31,s;s=f_.newDate(i,l,o),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=qo[e-qo[0]],a=t>>13,n=a?12:11;if(r>n)throw ko.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,ko.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),l=ope(e,i,t,n);return f_.toJD(l.year,l.month,l.day)},fromJD:function(e){var r=f_.fromJD(e),t=lpe(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match(tpe),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),l=+r[4];return this.newDate(t,i,l)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),l=this.toChineseMonth(a,n),o=Object.getPrototypeOf(Ym.prototype).add.call(this,e,r,t);if(t==="y"){var s=o.year(),u=o.month(),f=this.isIntercalaryMonth(s,l),c=i&&f?this.toMonthIndex(s,l,!0):this.toMonthIndex(s,l,!1);c!==u&&o.month(c)}return o}});var tpe=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,ape=/^\d?\d[iI]?/m,npe=/^闰?十?[一二三四五六七八九]?月/m,ipe=/^闰?十?[一二三四五六七八九]?/m;ko.calendars.chinese=Ym;var qo=[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],Co=[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 lpe(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var o=typeof r=="number"&&r>=1&&r<=12;if(!o)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=Co[n.year-Co[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=Co[i.year-Co[0]];var c=u>>9&4095,h=u>>5&15,d=u&31,p,y=new Date(c,h-1,d),m=new Date(n.year,n.month-1,n.day);p=Math.round((m-y)/(24*3600*1e3));var _=qo[i.year-qo[0]],b;for(b=0;b<13;b++){var T=_&1<<12-b?30:29;if(p>13;return!x||b=1888&&e<=2111;if(!o)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),l={year:e,month:r,day:t,isIntercalary:f}}var c;c=l.day-1;var h=qo[l.year-qo[0]],d=h>>13,p;d&&(l.month>d||l.isIntercalary)?p=l.month:p=l.month-1;for(var y=0;y>9&4095,T=_>>5&15,x=_&31,M=new Date(b,T-1,x+c);return i.year=M.getFullYear(),i.month=1+M.getMonth(),i.day=M.getDate(),i}});var xU=B(()=>{var Js=za(),spe=Ra();function c_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}c_.prototype=new Js.baseCalendar;spe(c_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Js.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Js.local.invalidYear||Js.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Js.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Js.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});Js.calendars.coptic=c_});var bU=B(()=>{var Ll=za(),upe=Ra();function v_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}v_.prototype=new Ll.baseCalendar;upe(v_.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ll.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ll.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ll.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Ll.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Ll.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Ll.local.invalidDate);return{century:fpe[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,Ll.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var fpe={20:"Fruitbat",21:"Anchovy"};Ll.calendars.discworld=v_});var _U=B(()=>{var $s=za(),cpe=Ra();function h_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}h_.prototype=new $s.baseCalendar;cpe(h_.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(t){var r=this._validate(t,this.minMonth,this.minDay,$s.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$s.local.invalidYear||$s.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,$s.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,$s.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});$s.calendars.ethiopian=h_});var wU=B(()=>{var Lo=za(),vpe=Ra();function d_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}d_.prototype=new Lo.baseCalendar;vpe(d_.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Lo.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,Gm(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Lo.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Lo.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Lo.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&Gm(this.daysInYear(e),10)===5?30:r===9&&Gm(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Lo.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Lo.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var l=7;l<=this.monthsInYear(e);l++)i+=this.daysInMonth(e,l);for(var l=1;l=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function Gm(e,r){return e-r*Math.floor(e/r)}Lo.calendars.hebrew=d_});var TU=B(()=>{var w0=za(),hpe=Ra();function p_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}p_.prototype=new w0.baseCalendar;hpe(p_.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,w0.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,w0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,w0.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});w0.calendars.islamic=p_});var MU=B(()=>{var T0=za(),dpe=Ra();function m_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}m_.prototype=new T0.baseCalendar;dpe(m_.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(t){var r=this._validate(t,this.minMonth,this.minDay,T0.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,T0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,T0.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),l=i-Math.floor(i<14?1:13),o=a-Math.floor(l>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,l,s)}});T0.calendars.julian=m_});var kU=B(()=>{var ti=za(),ppe=Ra();function g_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}g_.prototype=new ti.baseCalendar;ppe(g_.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,ti.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,ti.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ti.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,ti.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ti.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,ti.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,ti.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,ti.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,ti.local.invalidDate),n=a.toJD(),i=this._toHaab(n),l=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=y_(e+8+17*20,365);return[Math.floor(r/20)+1,y_(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[AU(e+20,20),AU(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,ti.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function y_(e,r){return e-r*Math.floor(e/r)}function AU(e,r){return y_(e-1,r)+1}ti.calendars.mayan=g_});var CU=B(()=>{var Ks=za(),mpe=Ra();function x_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}x_.prototype=new Ks.baseCalendar;var qU=Ks.instance("gregorian");mpe(x_.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 r=this._validate(e,this.minMonth,this.minDay,Ks.local.invalidYear||Ks.regionalOptions[""].invalidYear);return qU.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Ks.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,Ks.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),l=1;l=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});Ks.calendars.nanakshahi=x_});var LU=B(()=>{var Qs=za(),ype=Ra();function b_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}b_.prototype=new Qs.baseCalendar;ype(b_.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Qs.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Qs.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,Qs.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=Qs.instance(),i=0,l=r,o=e;this._createMissingCalendarData(e);var s=e-(l>9||l===9&&t>=this.NEPALI_CALENDAR_DATA[o][0]?56:57);for(r!==9&&(i=t,l--);l!==9;)l<=0&&(l=12,o--),i+=this.NEPALI_CALENDAR_DATA[o][l],l--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[o][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[o][9]-this.NEPALI_CALENDAR_DATA[o][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=Qs.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var l=9,o=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][l]-o+1;n>s;)l++,l>12&&(l=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][l];var u=this.NEPALI_CALENDAR_DATA[i][l]-(s-n);return this.newDate(i,l,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var rc=za(),gpe=Ra();function Um(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Um.prototype=new rc.baseCalendar;gpe(Um.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,rc.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,rc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,rc.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+__(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=__(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),l=__(a,366);n=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var o=n+2820*t+474;o=o<=0?o-1:o;var s=e-this.toJD(o,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(o,u,1)+1;return this.newDate(o,u,f)}});function __(e,r){return e-r*Math.floor(e/r)}rc.calendars.persian=Um;rc.calendars.jalali=Um});var DU=B(()=>{var js=za(),xpe=Ra(),Vm=js.instance();function w_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}w_.prototype=new js.baseCalendar;xpe(w_.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(t){var r=this._validate(t,this.minMonth,this.minDay,js.local.invalidYear),t=this._t2gYear(r.year());return Vm.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,js.local.invalidYear),n=this._t2gYear(a.year());return Vm.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,js.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,js.local.invalidDate),n=this._t2gYear(a.year());return Vm.toJD(n,a.month(),a.day())},fromJD:function(e){var r=Vm.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});js.calendars.taiwan=w_});var EU=B(()=>{var eu=za(),bpe=Ra(),Wm=eu.instance();function T_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}T_.prototype=new eu.baseCalendar;bpe(T_.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(t){var r=this._validate(t,this.minMonth,this.minDay,eu.local.invalidYear),t=this._t2gYear(r.year());return Wm.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,eu.local.invalidYear),n=this._t2gYear(a.year());return Wm.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,eu.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,eu.local.invalidDate),n=this._t2gYear(a.year());return Wm.toJD(n,a.month(),a.day())},fromJD:function(e){var r=Wm.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});eu.calendars.thai=T_});var PU=B(()=>{var ru=za(),_pe=Ra();function M_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M_.prototype=new ru.baseCalendar;_pe(M_.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 r=this._validate(e,this.minMonth,this.minDay,ru.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,ru.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return So[n]-So[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,ru.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+So[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),l=i+1,o=n-12*i,s=r-So[t-1]+1;return this.newDate(l,o,s)},isValid:function(e,r,t){var a=ru.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=ru.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});ru.calendars.ummalqura=M_;var So=[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 zU=B((N6e,RU)=>{"use strict";RU.exports=za();yU();gU();xU();bU();_U();wU();TU();MU();kU();CU();LU();SU();DU();EU();PU()});var YU=B((F6e,BU)=>{"use strict";var FU=zU(),M0=Pe(),IU=wt(),wpe=IU.EPOCHJD,Tpe=IU.ONEDAY,q_={valType:"enumerated",values:M0.sortObjectKeys(FU.calendars),editType:"calc",dflt:"gregorian"},HU=function(e,r,t,a){var n={};return n[t]=q_,M0.coerce(e,r,n,t,a)},Mpe=function(e,r,t,a){for(var n=0;n{"use strict";GU.exports=YU()});var Spe=B((H6e,WU)=>{var VU=nF();VU.register([lI(),ZI(),LH(),pO(),aB(),kB(),nG(),SG(),vU(),UU()]);WU.exports=VU});return Spe();})(); /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/dist/plotly-geo.js b/dist/plotly-geo.js index abbfc3838b8..7fdc9bfe187 100644 --- a/dist/plotly-geo.js +++ b/dist/plotly-geo.js @@ -13710,7 +13710,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13734,10 +13734,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54107,8 +54107,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54121,18 +54127,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-geo.min.js b/dist/plotly-geo.min.js index f0a76745965..0f8ae9dcb4e 100644 --- a/dist/plotly-geo.min.js +++ b/dist/plotly-geo.min.js @@ -12,13 +12,13 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var O_=Object.defineProperty;var UI=Object.getOwnPropertyDescriptor;var YI=Object.getOwnPropertyNames;var GI=Object.prototype.hasOwnProperty;var U_=(e,r)=>()=>(e&&(r=e(e=0)),r);var te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var VI=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of YI(r))!GI.call(e,a)&&a!==t&&O_(e,a,{get:()=>r[a],enumerable:!(n=UI(r,a))||n.enumerable});return e};var WI=e=>VI(O_({},"__esModule",{value:!0}),e);var Jh=te(Y_=>{"use strict";Y_.version="3.0.0-rc.0"});var V_=te((G_,$h)=>{(function(r,t,n){t[r]=t[r]||n(),typeof $h!="undefined"&&$h.exports?$h.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:G_,function(){"use strict";var r,t,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(M){return setImmediate(M)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(M,b,_,A){return Object.defineProperty(M,b,{value:_,writable:!0,configurable:A!==!1})}}catch(x){r=function(b,_,A){return b[_]=A,b}}n=function(){var M,b,_;function A(S,k){this.fn=S,this.self=k,this.next=void 0}return{add:function(k,D){_=new A(k,D),b?b.next=_:M=_,b=_,_=void 0},drain:function(){var k=M;for(M=b=t=void 0;k;)k.fn.call(k.self),k=k.next}}}();function o(x,M){n.add(x,M),t||(t=i(n.drain))}function l(x){var M,b=typeof x;return x!=null&&(b=="object"||b=="function")&&(M=x.then),typeof M=="function"?M:!1}function s(){for(var x=0;x0&&o(s,b))}catch(_){v.call(new d(b),_)}}}function v(x){var M=this;M.triggered||(M.triggered=!0,M.def&&(M=M.def),M.msg=x,M.state=2,M.chain.length>0&&o(s,M))}function h(x,M,b,_){for(var A=0;A{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},n=self.document;function a(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(n)try{t(n.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var w=p.length,C=new Array(w);w--;)C[w]=p[w];return C}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(p,w){l.call(this,p,w+"")},o.setAttributeNS=function(p,w,C){s.call(this,p,w,C+"")},u.setProperty=function(p,w,C){f.call(this,p,w+"",C)}}e.ascending=v;function v(c,p){return cp?1:c>=p?0:NaN}e.descending=function(c,p){return pc?1:p>=c?0:NaN},e.min=function(c,p){var w=-1,C=c.length,q,E;if(arguments.length===1){for(;++w=E){q=E;break}for(;++wE&&(q=E)}else{for(;++w=E){q=E;break}for(;++wE&&(q=E)}return q},e.max=function(c,p){var w=-1,C=c.length,q,E;if(arguments.length===1){for(;++w=E){q=E;break}for(;++wq&&(q=E)}else{for(;++w=E){q=E;break}for(;++wq&&(q=E)}return q},e.extent=function(c,p){var w=-1,C=c.length,q,E,Y;if(arguments.length===1){for(;++w=E){q=Y=E;break}for(;++wE&&(q=E),Y=E){q=Y=E;break}for(;++wE&&(q=E),Y1)return Y/(j-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,w,C,q){for(arguments.length<3&&(C=0),arguments.length<4&&(q=p.length);C>>1;c(p[E],w)<0?C=E+1:q=E}return C},right:function(p,w,C,q){for(arguments.length<3&&(C=0),arguments.length<4&&(q=p.length);C>>1;c(p[E],w)>0?q=E:C=E+1}return C}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,w){return v(c(p),w)}:c)},e.shuffle=function(c,p,w){(C=arguments.length)<3&&(w=c.length,C<2&&(p=0));for(var C=w-p,q,E;C;)E=Math.random()*C--|0,q=c[C+p],c[C+p]=c[E+p],c[E+p]=q;return c},e.permute=function(c,p){for(var w=p.length,C=new Array(w);w--;)C[w]=c[p[w]];return C},e.pairs=function(c){for(var p=0,w=c.length-1,C,q=c[0],E=new Array(w<0?0:w);p=0;)for(Y=c[p],w=Y.length;--w>=0;)E[--q]=Y[w];return E};var x=Math.abs;e.range=function(c,p,w){if(arguments.length<3&&(w=1,arguments.length<2&&(p=c,c=0)),(p-c)/w===1/0)throw new Error("infinite range");var C=[],q=M(x(w)),E=-1,Y;if(c*=q,p*=q,w*=q,w<0)for(;(Y=c+w*++E)>p;)C.push(Y/q);else for(;(Y=c+w*++E)=p.length)return q?q.call(c,j):C?j.sort(C):j;for(var ie=-1,ge=j.length,me=p[ae++],Re,Ye,ye,Ce=new _,De;++ie=p.length)return N;var ae=[],ie=w[j++];return N.forEach(function(ge,me){ae.push({key:ge,values:Y(me,j)})}),ie?ae.sort(function(ge,me){return ie(ge.key,me.key)}):ae}return c.map=function(N,j){return E(j,N,0)},c.entries=function(N){return Y(E(e.map,N,0),0)},c.key=function(N){return p.push(N),c},c.sortKeys=function(N){return w[p.length-1]=N,c},c.sortValues=function(N){return C=N,c},c.rollup=function(N){return q=N,c},c},e.set=function(c){var p=new X;if(c)for(var w=0,C=c.length;w=0&&(C=c.slice(w+1),c=c.slice(0,w)),c)return arguments.length<2?this[c].on(C):this[c].on(C,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(C,null);return this}};function de(c){var p=[],w=new _;function C(){for(var q=p,E=-1,Y=q.length,N;++E=0&&(w=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),Me.hasOwnProperty(w)?{space:Me[w],local:c}:c}},pe.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var w=this.node();return c=e.ns.qualify(c),c.local?w.getAttributeNS(c.space,c.local):w.getAttribute(c)}for(p in c)this.each(Fe(p,c[p]));return this}return this.each(Fe(c,p))};function Fe(c,p){c=e.ns.qualify(c);function w(){this.removeAttribute(c)}function C(){this.removeAttributeNS(c.space,c.local)}function q(){this.setAttribute(c,p)}function E(){this.setAttributeNS(c.space,c.local,p)}function Y(){var j=p.apply(this,arguments);j==null?this.removeAttribute(c):this.setAttribute(c,j)}function N(){var j=p.apply(this,arguments);j==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,j)}return p==null?c.local?C:w:typeof p=="function"?c.local?N:Y:c.local?E:q}function Oe(c){return c.trim().replace(/\s+/g," ")}pe.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var w=this.node(),C=(c=nr(c)).length,q=-1;if(p=w.classList){for(;++q=0;)(E=w[C])&&(q&&q!==E.nextSibling&&q.parentNode.insertBefore(E,q),q=E);return this},pe.sort=function(c){c=Ve.apply(this,arguments);for(var p=-1,w=this.length;++p=p&&(p=q+1);!(j=Y[p])&&++p0&&(c=c.slice(0,q));var Y=mr.get(c);Y&&(c=Y,E=gr);function N(){var ie=this[C];ie&&(this.removeEventListener(c,ie,ie.$),delete this[C])}function j(){var ie=E(p,t(arguments));N.call(this),this.addEventListener(c,this[C]=ie,ie.$=w),ie._=p}function ae(){var ie=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),ge;for(var me in this)if(ge=me.match(ie)){var Re=this[me];this.removeEventListener(ge[1],Re,Re.$),delete this[me]}}return q?p?j:N:p?ee:ae}var mr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mr.forEach(function(c){"on"+c in n&&mr.remove(c)});function Mr(c,p){return function(w){var C=e.event;e.event=w,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=C}}}function gr(c,p){var w=Mr(c,p);return function(C){var q=this,E=C.relatedTarget;(!E||E!==q&&!(E.compareDocumentPosition(q)&8))&&w.call(q,C)}}var dr,Tr=0;function Pr(c){var p=".dragsuppress-"+ ++Tr,w="click"+p,C=e.select(i(c)).on("touchmove"+p,qe).on("dragstart"+p,qe).on("selectstart"+p,qe);if(dr==null&&(dr="onselectstart"in c?!1:ne(c.style,"userSelect")),dr){var q=a(c).style,E=q[dr];q[dr]="none"}return function(Y){if(C.on(p,null),dr&&(q[dr]=E),Y){var N=function(){C.on(w,null)};C.on(w,function(){qe(),N()},!0),setTimeout(N,0)}}}e.mouse=function(c){return sr(c,Be())};var Ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function sr(c,p){p.changedTouches&&(p=p.changedTouches[0]);var w=c.ownerSVGElement||c;if(w.createSVGPoint){var C=w.createSVGPoint();if(Ur<0){var q=i(c);if(q.scrollX||q.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var E=w[0][0].getScreenCTM();Ur=!(E.f||E.e),w.remove()}}return Ur?(C.x=p.pageX,C.y=p.pageY):(C.x=p.clientX,C.y=p.clientY),C=C.matrixTransform(c.getScreenCTM().inverse()),[C.x,C.y]}var Y=c.getBoundingClientRect();return[p.clientX-Y.left-c.clientLeft,p.clientY-Y.top-c.clientTop]}e.touch=function(c,p,w){if(arguments.length<3&&(w=p,p=Be().changedTouches),p){for(var C=0,q=p.length,E;C0?1:c<0?-1:0}function St(c,p,w){return(p[0]-c[0])*(w[1]-c[1])-(p[1]-c[1])*(w[0]-c[0])}function hn(c){return c>1?0:c<-1?We:Math.acos(c)}function Fn(c){return c>1?Hr:c<-1?-Hr:Math.asin(c)}function $n(c){return((c=Math.exp(c))-1/c)/2}function Xt(c){return((c=Math.exp(c))+1/c)/2}function cn(c){return((c=Math.exp(2*c))-1)/(c+1)}function sn(c){return(c=Math.sin(c/2))*c}var Kt=Math.SQRT2,aa=2,rt=4;e.interpolateZoom=function(c,p){var w=c[0],C=c[1],q=c[2],E=p[0],Y=p[1],N=p[2],j=E-w,ae=Y-C,ie=j*j+ae*ae,ge,me;if(ie<$e)me=Math.log(N/q)/Kt,ge=function(Ue){return[w+Ue*j,C+Ue*ae,q*Math.exp(Kt*Ue*me)]};else{var Re=Math.sqrt(ie),Ye=(N*N-q*q+rt*ie)/(2*q*aa*Re),ye=(N*N-q*q-rt*ie)/(2*N*aa*Re),Ce=Math.log(Math.sqrt(Ye*Ye+1)-Ye),De=Math.log(Math.sqrt(ye*ye+1)-ye);me=(De-Ce)/Kt,ge=function(Ue){var Ge=Ue*me,Pe=Xt(Ce),_r=q/(aa*Re)*(Pe*cn(Kt*Ge+Ce)-$n(Ce));return[w+_r*j,C+_r*ae,q*Pe/Xt(Kt*Ge+Ce)]}}return ge.duration=me*1e3,ge},e.behavior.zoom=function(){var c={x:0,y:0,k:1},p,w,C,q=[960,500],E=Qt,Y=250,N=0,j="mousedown.zoom",ae="mousemove.zoom",ie="mouseup.zoom",ge,me="touchstart.zoom",Re,Ye=Ne(Ge,"zoomstart","zoom","zoomend"),ye,Ce,De,Ue;dn||(dn="onwheel"in n?(Ct=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(Ct=function(){return e.event.wheelDelta},"mousewheel"):(Ct=function(){return-e.event.detail},"MozMousePixelScroll"));function Ge(Fr){Fr.on(j,ht).on(dn+".zoom",Zn).on("dblclick.zoom",on).on(me,jt)}Ge.event=function(Fr){Fr.each(function(){var _t=Ye.of(this,arguments),wt=c;ga?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},$r(_t)}).tween("zoom:zoom",function(){var Jt=q[0],Nn=q[1],oa=w?w[0]:Jt/2,Da=w?w[1]:Nn/2,ja=e.interpolateZoom([(oa-c.x)/c.k,(Da-c.y)/c.k,Jt/c.k],[(oa-wt.x)/wt.k,(Da-wt.y)/wt.k,Jt/wt.k]);return function(fi){var Ja=ja(fi),Si=Jt/Ja[2];this.__chart__=c={x:oa-Ja[0]*Si,y:Da-Ja[1]*Si,k:Si},bt(_t)}}).each("interrupt.zoom",function(){Qr(_t)}).each("end.zoom",function(){Qr(_t)}):(this.__chart__=c,$r(_t),bt(_t),Qr(_t))})},Ge.translate=function(Fr){return arguments.length?(c={x:+Fr[0],y:+Fr[1],k:c.k},Jr(),Ge):[c.x,c.y]},Ge.scale=function(Fr){return arguments.length?(c={x:c.x,y:c.y,k:null},Or(+Fr),Jr(),Ge):c.k},Ge.scaleExtent=function(Fr){return arguments.length?(E=Fr==null?Qt:[+Fr[0],+Fr[1]],Ge):E},Ge.center=function(Fr){return arguments.length?(C=Fr&&[+Fr[0],+Fr[1]],Ge):C},Ge.size=function(Fr){return arguments.length?(q=Fr&&[+Fr[0],+Fr[1]],Ge):q},Ge.duration=function(Fr){return arguments.length?(Y=+Fr,Ge):Y},Ge.x=function(Fr){return arguments.length?(Ce=Fr,ye=Fr.copy(),c={x:0,y:0,k:1},Ge):Ce},Ge.y=function(Fr){return arguments.length?(Ue=Fr,De=Fr.copy(),c={x:0,y:0,k:1},Ge):Ue};function Pe(Fr){return[(Fr[0]-c.x)/c.k,(Fr[1]-c.y)/c.k]}function _r(Fr){return[Fr[0]*c.k+c.x,Fr[1]*c.k+c.y]}function Or(Fr){c.k=Math.max(E[0],Math.min(E[1],Fr))}function Wr(Fr,_t){_t=_r(_t),c.x+=Fr[0]-_t[0],c.y+=Fr[1]-_t[1]}function Gr(Fr,_t,wt,Jt){Fr.__chart__={x:c.x,y:c.y,k:c.k},Or(Math.pow(2,Jt)),Wr(w=_t,wt),Fr=e.select(Fr),Y>0&&(Fr=Fr.transition().duration(Y)),Fr.call(Ge.event)}function Jr(){Ce&&Ce.domain(ye.range().map(function(Fr){return(Fr-c.x)/c.k}).map(ye.invert)),Ue&&Ue.domain(De.range().map(function(Fr){return(Fr-c.y)/c.k}).map(De.invert))}function $r(Fr){N++||Fr({type:"zoomstart"})}function bt(Fr){Jr(),Fr({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function Qr(Fr){--N||(Fr({type:"zoomend"}),w=null)}function ht(){var Fr=this,_t=Ye.of(Fr,arguments),wt=0,Jt=e.select(i(Fr)).on(ae,Da).on(ie,ja),Nn=Pe(e.mouse(Fr)),oa=Pr(Fr);vt.call(Fr),$r(_t);function Da(){wt=1,Wr(e.mouse(Fr),Nn),bt(_t)}function ja(){Jt.on(ae,null).on(ie,null),oa(wt),Qr(_t)}}function jt(){var Fr=this,_t=Ye.of(Fr,arguments),wt={},Jt=0,Nn,oa=".zoom-"+e.event.changedTouches[0].identifier,Da="touchmove"+oa,ja="touchend"+oa,fi=[],Ja=e.select(Fr),Si=Pr(Fr);Ci(),$r(_t),Ja.on(j,null).on(me,Ci);function Ha(){var ul=e.touches(Fr);return Nn=c.k,ul.forEach(function(Ea){Ea.identifier in wt&&(wt[Ea.identifier]=Pe(Ea))}),ul}function Ci(){var ul=e.event.target;e.select(ul).on(Da,Zf).on(ja,OI),fi.push(ul);for(var Ea=e.event.changedTouches,mo=0,jl=Ea.length;mo1){var Xf=yo[0],qu=yo[1],jh=Xf[0]-qu[0],B_=Xf[1]-qu[1];Jt=jh*jh+B_*B_}}function Zf(){var ul=e.touches(Fr),Ea,mo,jl,yo;vt.call(Fr);for(var g0=0,Xf=ul.length;g01?1:p,w=w<0?0:w>1?1:w,q=w<=.5?w*(1+p):w+p-w*p,C=2*w-q;function E(N){return N>360?N-=360:N<0&&(N+=360),N<60?C+(q-C)*N/60:N<180?q:N<240?C+(q-C)*(240-N)/60:C}function Y(N){return Math.round(E(N)*255)}return new Hn(Y(c+120),Y(c),Y(c-120))}e.hcl=Sn;function Sn(c,p,w){return this instanceof Sn?(this.h=+c,this.c=+p,void(this.l=+w)):arguments.length<2?c instanceof Sn?new Sn(c.h,c.c,c.l):c instanceof wn?El(c.l,c.a,c.b):El((c=Br((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new Sn(c,p,w)}var Na=Sn.prototype=new pn;Na.brighter=function(c){return new Sn(this.h,this.c,Math.min(100,this.l+It*(arguments.length?c:1)))},Na.darker=function(c){return new Sn(this.h,this.c,Math.max(0,this.l-It*(arguments.length?c:1)))},Na.rgb=function(){return da(this.h,this.c,this.l).rgb()};function da(c,p,w){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new wn(w,Math.cos(c*=lt)*p,Math.sin(c)*p)}e.lab=wn;function wn(c,p,w){return this instanceof wn?(this.l=+c,this.a=+p,void(this.b=+w)):arguments.length<2?c instanceof wn?new wn(c.l,c.a,c.b):c instanceof Sn?da(c.h,c.c,c.l):Br((c=Hn(c)).r,c.g,c.b):new wn(c,p,w)}var It=18,In=.95047,gi=1,io=1.08883,mi=wn.prototype=new pn;mi.brighter=function(c){return new wn(Math.min(100,this.l+It*(arguments.length?c:1)),this.a,this.b)},mi.darker=function(c){return new wn(Math.max(0,this.l-It*(arguments.length?c:1)),this.a,this.b)},mi.rgb=function(){return ms(this.l,this.a,this.b)};function ms(c,p,w){var C=(c+16)/116,q=C+p/500,E=C-w/200;return q=Bo(q)*In,C=Bo(C)*gi,E=Bo(E)*io,new Hn(Oo(3.2404542*q-1.5371385*C-.4985314*E),Oo(-.969266*q+1.8760108*C+.041556*E),Oo(.0556434*q-.2040259*C+1.0572252*E))}function El(c,p,w){return c>0?new Sn(Math.atan2(w,p)*xt,Math.sqrt(p*p+w*w),c):new Sn(NaN,NaN,c)}function Bo(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function ys(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Oo(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Hn;function Hn(c,p,w){return this instanceof Hn?(this.r=~~c,this.g=~~p,void(this.b=~~w)):arguments.length<2?c instanceof Hn?new Hn(c.r,c.g,c.b):Lt(""+c,Hn,ha):new Hn(c,p,w)}function yi(c){return new Hn(c>>16,c>>8&255,c&255)}function Uo(c){return yi(c)+""}var bi=Hn.prototype=new pn;bi.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,w=this.g,C=this.b,q=30;return!p&&!w&&!C?new Hn(q,q,q):(p&&p>4,C=C>>4|C,q=j&240,q=q>>4|q,E=j&15,E=E<<4|E):c.length===7&&(C=(j&16711680)>>16,q=(j&65280)>>8,E=j&255)),p(C,q,E))}function Ht(c,p,w){var C=Math.min(c/=255,p/=255,w/=255),q=Math.max(c,p,w),E=q-C,Y,N,j=(q+C)/2;return E?(N=j<.5?E/(q+C):E/(2-q-C),c==q?Y=(p-w)/E+(p0&&j<1?0:Y),new tn(Y,N,j)}function Br(c,p,w){c=Vn(c),p=Vn(p),w=Vn(w);var C=ys((.4124564*c+.3575761*p+.1804375*w)/In),q=ys((.2126729*c+.7151522*p+.072175*w)/gi),E=ys((.0193339*c+.119192*p+.9503041*w)/io);return wn(116*q-16,500*(C-q),200*(q-E))}function Vn(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function nn(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var Dn=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});Dn.forEach(function(c,p){Dn.set(c,yi(p))});function At(c){return typeof c=="function"?c:function(){return c}}e.functor=At,e.xhr=Wa(V);function Wa(c){return function(p,w,C){return arguments.length===2&&typeof w=="function"&&(C=w,w=null),Yo(p,w,c,C)}}function Yo(c,p,w,C){var q={},E=e.dispatch("beforesend","progress","load","error"),Y={},N=new XMLHttpRequest,j=null;self.XDomainRequest&&!("withCredentials"in N)&&/^(http(s)?:)?\/\//.test(c)&&(N=new XDomainRequest),"onload"in N?N.onload=N.onerror=ae:N.onreadystatechange=function(){N.readyState>3&&ae()};function ae(){var ie=N.status,ge;if(!ie&&cu(N)||ie>=200&&ie<300||ie===304){try{ge=w.call(q,N)}catch(me){E.error.call(q,me);return}E.load.call(q,ge)}else E.error.call(q,N)}return N.onprogress=function(ie){var ge=e.event;e.event=ie;try{E.progress.call(q,N)}finally{e.event=ge}},q.header=function(ie,ge){return ie=(ie+"").toLowerCase(),arguments.length<2?Y[ie]:(ge==null?delete Y[ie]:Y[ie]=ge+"",q)},q.mimeType=function(ie){return arguments.length?(p=ie==null?null:ie+"",q):p},q.responseType=function(ie){return arguments.length?(j=ie,q):j},q.response=function(ie){return w=ie,q},["get","post"].forEach(function(ie){q[ie]=function(){return q.send.apply(q,[ie].concat(t(arguments)))}}),q.send=function(ie,ge,me){if(arguments.length===2&&typeof ge=="function"&&(me=ge,ge=null),N.open(ie,c,!0),p!=null&&!("accept"in Y)&&(Y.accept=p+",*/*"),N.setRequestHeader)for(var Re in Y)N.setRequestHeader(Re,Y[Re]);return p!=null&&N.overrideMimeType&&N.overrideMimeType(p),j!=null&&(N.responseType=j),me!=null&&q.on("error",me).on("load",function(Ye){me(null,Ye)}),E.beforesend.call(q,N),N.send(ge==null?null:ge),q},q.abort=function(){return N.abort(),q},e.rebind(q,E,"on"),C==null?q:q.get(wf(C))}function wf(c){return c.length===1?function(p,w){c(p==null?w:null)}:c}function cu(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var w=new RegExp('["'+c+` -]`),C=c.charCodeAt(0);function q(ae,ie,ge){arguments.length<3&&(ge=ie,ie=null);var me=Yo(ae,p,ie==null?E:Y(ie),ge);return me.row=function(Re){return arguments.length?me.response((ie=Re)==null?E:Y(Re)):ie},me}function E(ae){return q.parse(ae.responseText)}function Y(ae){return function(ie){return q.parse(ie.responseText,ae)}}q.parse=function(ae,ie){var ge;return q.parseRows(ae,function(me,Re){if(ge)return ge(me,Re-1);var Ye=function(ye){for(var Ce={},De=me.length,Ue=0;Ue=Ye)return me;if(Ue)return Ue=!1,ge;var _r=ye;if(ae.charCodeAt(_r)===34){for(var Or=_r;Or++{var O_=Object.defineProperty;var UI=Object.getOwnPropertyDescriptor;var YI=Object.getOwnPropertyNames;var GI=Object.prototype.hasOwnProperty;var U_=(e,r)=>()=>(e&&(r=e(e=0)),r);var ne=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var VI=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of YI(r))!GI.call(e,a)&&a!==t&&O_(e,a,{get:()=>r[a],enumerable:!(n=UI(r,a))||n.enumerable});return e};var WI=e=>VI(O_({},"__esModule",{value:!0}),e);var Jh=ne(Y_=>{"use strict";Y_.version="3.0.0-rc.0"});var V_=ne((G_,$h)=>{(function(r,t,n){t[r]=t[r]||n(),typeof $h!="undefined"&&$h.exports?$h.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:G_,function(){"use strict";var r,t,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(T,_,b,A){return Object.defineProperty(T,_,{value:b,writable:!0,configurable:A!==!1})}}catch(x){r=function(_,b,A){return _[b]=A,_}}n=function(){var T,_,b;function A(S,M){this.fn=S,this.self=M,this.next=void 0}return{add:function(M,D){b=new A(M,D),_?_.next=b:T=b,_=b,b=void 0},drain:function(){var M=T;for(T=_=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(x,T){n.add(x,T),t||(t=i(n.drain))}function l(x){var T,_=typeof x;return x!=null&&(_=="object"||_=="function")&&(T=x.then),typeof T=="function"?T:!1}function s(){for(var x=0;x0&&o(s,_))}catch(b){v.call(new d(_),b)}}}function v(x){var T=this;T.triggered||(T.triggered=!0,T.def&&(T=T.def),T.msg=x,T.state=2,T.chain.length>0&&o(s,T))}function h(x,T,_,b){for(var A=0;A{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},n=self.document;function a(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(n)try{t(n.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var w=p.length,C=new Array(w);w--;)C[w]=p[w];return C}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(p,w){l.call(this,p,w+"")},o.setAttributeNS=function(p,w,C){s.call(this,p,w,C+"")},u.setProperty=function(p,w,C){f.call(this,p,w+"",C)}}e.ascending=v;function v(c,p){return cp?1:c>=p?0:NaN}e.descending=function(c,p){return pc?1:p>=c?0:NaN},e.min=function(c,p){var w=-1,C=c.length,q,E;if(arguments.length===1){for(;++w=E){q=E;break}for(;++wE&&(q=E)}else{for(;++w=E){q=E;break}for(;++wE&&(q=E)}return q},e.max=function(c,p){var w=-1,C=c.length,q,E;if(arguments.length===1){for(;++w=E){q=E;break}for(;++wq&&(q=E)}else{for(;++w=E){q=E;break}for(;++wq&&(q=E)}return q},e.extent=function(c,p){var w=-1,C=c.length,q,E,G;if(arguments.length===1){for(;++w=E){q=G=E;break}for(;++wE&&(q=E),G=E){q=G=E;break}for(;++wE&&(q=E),G1)return G/(j-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,w,C,q){for(arguments.length<3&&(C=0),arguments.length<4&&(q=p.length);C>>1;c(p[E],w)<0?C=E+1:q=E}return C},right:function(p,w,C,q){for(arguments.length<3&&(C=0),arguments.length<4&&(q=p.length);C>>1;c(p[E],w)>0?q=E:C=E+1}return C}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,w){return v(c(p),w)}:c)},e.shuffle=function(c,p,w){(C=arguments.length)<3&&(w=c.length,C<2&&(p=0));for(var C=w-p,q,E;C;)E=Math.random()*C--|0,q=c[C+p],c[C+p]=c[E+p],c[E+p]=q;return c},e.permute=function(c,p){for(var w=p.length,C=new Array(w);w--;)C[w]=c[p[w]];return C},e.pairs=function(c){for(var p=0,w=c.length-1,C,q=c[0],E=new Array(w<0?0:w);p=0;)for(G=c[p],w=G.length;--w>=0;)E[--q]=G[w];return E};var x=Math.abs;e.range=function(c,p,w){if(arguments.length<3&&(w=1,arguments.length<2&&(p=c,c=0)),(p-c)/w===1/0)throw new Error("infinite range");var C=[],q=T(x(w)),E=-1,G;if(c*=q,p*=q,w*=q,w<0)for(;(G=c+w*++E)>p;)C.push(G/q);else for(;(G=c+w*++E)=p.length)return q?q.call(c,j):C?j.sort(C):j;for(var ie=-1,ge=j.length,me=p[ae++],Re,Ye,ye,Ce=new b,De;++ie=p.length)return N;var ae=[],ie=w[j++];return N.forEach(function(ge,me){ae.push({key:ge,values:G(me,j)})}),ie?ae.sort(function(ge,me){return ie(ge.key,me.key)}):ae}return c.map=function(N,j){return E(j,N,0)},c.entries=function(N){return G(E(e.map,N,0),0)},c.key=function(N){return p.push(N),c},c.sortKeys=function(N){return w[p.length-1]=N,c},c.sortValues=function(N){return C=N,c},c.rollup=function(N){return q=N,c},c},e.set=function(c){var p=new X;if(c)for(var w=0,C=c.length;w=0&&(C=c.slice(w+1),c=c.slice(0,w)),c)return arguments.length<2?this[c].on(C):this[c].on(C,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(C,null);return this}};function de(c){var p=[],w=new b;function C(){for(var q=p,E=-1,G=q.length,N;++E=0&&(w=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),Me.hasOwnProperty(w)?{space:Me[w],local:c}:c}},pe.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var w=this.node();return c=e.ns.qualify(c),c.local?w.getAttributeNS(c.space,c.local):w.getAttribute(c)}for(p in c)this.each(Fe(p,c[p]));return this}return this.each(Fe(c,p))};function Fe(c,p){c=e.ns.qualify(c);function w(){this.removeAttribute(c)}function C(){this.removeAttributeNS(c.space,c.local)}function q(){this.setAttribute(c,p)}function E(){this.setAttributeNS(c.space,c.local,p)}function G(){var j=p.apply(this,arguments);j==null?this.removeAttribute(c):this.setAttribute(c,j)}function N(){var j=p.apply(this,arguments);j==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,j)}return p==null?c.local?C:w:typeof p=="function"?c.local?N:G:c.local?E:q}function Oe(c){return c.trim().replace(/\s+/g," ")}pe.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var w=this.node(),C=(c=nr(c)).length,q=-1;if(p=w.classList){for(;++q=0;)(E=w[C])&&(q&&q!==E.nextSibling&&q.parentNode.insertBefore(E,q),q=E);return this},pe.sort=function(c){c=Ve.apply(this,arguments);for(var p=-1,w=this.length;++p=p&&(p=q+1);!(j=G[p])&&++p0&&(c=c.slice(0,q));var G=mr.get(c);G&&(c=G,E=gr);function N(){var ie=this[C];ie&&(this.removeEventListener(c,ie,ie.$),delete this[C])}function j(){var ie=E(p,t(arguments));N.call(this),this.addEventListener(c,this[C]=ie,ie.$=w),ie._=p}function ae(){var ie=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),ge;for(var me in this)if(ge=me.match(ie)){var Re=this[me];this.removeEventListener(ge[1],Re,Re.$),delete this[me]}}return q?p?j:N:p?re:ae}var mr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mr.forEach(function(c){"on"+c in n&&mr.remove(c)});function Mr(c,p){return function(w){var C=e.event;e.event=w,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=C}}}function gr(c,p){var w=Mr(c,p);return function(C){var q=this,E=C.relatedTarget;(!E||E!==q&&!(E.compareDocumentPosition(q)&8))&&w.call(q,C)}}var dr,Tr=0;function Pr(c){var p=".dragsuppress-"+ ++Tr,w="click"+p,C=e.select(i(c)).on("touchmove"+p,qe).on("dragstart"+p,qe).on("selectstart"+p,qe);if(dr==null&&(dr="onselectstart"in c?!1:te(c.style,"userSelect")),dr){var q=a(c).style,E=q[dr];q[dr]="none"}return function(G){if(C.on(p,null),dr&&(q[dr]=E),G){var N=function(){C.on(w,null)};C.on(w,function(){qe(),N()},!0),setTimeout(N,0)}}}e.mouse=function(c){return sr(c,Be())};var Ur=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function sr(c,p){p.changedTouches&&(p=p.changedTouches[0]);var w=c.ownerSVGElement||c;if(w.createSVGPoint){var C=w.createSVGPoint();if(Ur<0){var q=i(c);if(q.scrollX||q.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var E=w[0][0].getScreenCTM();Ur=!(E.f||E.e),w.remove()}}return Ur?(C.x=p.pageX,C.y=p.pageY):(C.x=p.clientX,C.y=p.clientY),C=C.matrixTransform(c.getScreenCTM().inverse()),[C.x,C.y]}var G=c.getBoundingClientRect();return[p.clientX-G.left-c.clientLeft,p.clientY-G.top-c.clientTop]}e.touch=function(c,p,w){if(arguments.length<3&&(w=p,p=Be().changedTouches),p){for(var C=0,q=p.length,E;C0?1:c<0?-1:0}function St(c,p,w){return(p[0]-c[0])*(w[1]-c[1])-(p[1]-c[1])*(w[0]-c[0])}function hn(c){return c>1?0:c<-1?We:Math.acos(c)}function Fn(c){return c>1?Hr:c<-1?-Hr:Math.asin(c)}function $n(c){return((c=Math.exp(c))-1/c)/2}function Xt(c){return((c=Math.exp(c))+1/c)/2}function cn(c){return((c=Math.exp(2*c))-1)/(c+1)}function sn(c){return(c=Math.sin(c/2))*c}var Kt=Math.SQRT2,aa=2,rt=4;e.interpolateZoom=function(c,p){var w=c[0],C=c[1],q=c[2],E=p[0],G=p[1],N=p[2],j=E-w,ae=G-C,ie=j*j+ae*ae,ge,me;if(ie<$e)me=Math.log(N/q)/Kt,ge=function(Ue){return[w+Ue*j,C+Ue*ae,q*Math.exp(Kt*Ue*me)]};else{var Re=Math.sqrt(ie),Ye=(N*N-q*q+rt*ie)/(2*q*aa*Re),ye=(N*N-q*q-rt*ie)/(2*N*aa*Re),Ce=Math.log(Math.sqrt(Ye*Ye+1)-Ye),De=Math.log(Math.sqrt(ye*ye+1)-ye);me=(De-Ce)/Kt,ge=function(Ue){var Ge=Ue*me,Pe=Xt(Ce),_r=q/(aa*Re)*(Pe*cn(Kt*Ge+Ce)-$n(Ce));return[w+_r*j,C+_r*ae,q*Pe/Xt(Kt*Ge+Ce)]}}return ge.duration=me*1e3,ge},e.behavior.zoom=function(){var c={x:0,y:0,k:1},p,w,C,q=[960,500],E=Qt,G=250,N=0,j="mousedown.zoom",ae="mousemove.zoom",ie="mouseup.zoom",ge,me="touchstart.zoom",Re,Ye=Ne(Ge,"zoomstart","zoom","zoomend"),ye,Ce,De,Ue;dn||(dn="onwheel"in n?(Ct=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(Ct=function(){return e.event.wheelDelta},"mousewheel"):(Ct=function(){return-e.event.detail},"MozMousePixelScroll"));function Ge(Fr){Fr.on(j,ht).on(dn+".zoom",Zn).on("dblclick.zoom",on).on(me,jt)}Ge.event=function(Fr){Fr.each(function(){var _t=Ye.of(this,arguments),wt=c;ga?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},$r(_t)}).tween("zoom:zoom",function(){var Jt=q[0],Nn=q[1],oa=w?w[0]:Jt/2,Da=w?w[1]:Nn/2,ja=e.interpolateZoom([(oa-c.x)/c.k,(Da-c.y)/c.k,Jt/c.k],[(oa-wt.x)/wt.k,(Da-wt.y)/wt.k,Jt/wt.k]);return function(fi){var Ja=ja(fi),Si=Jt/Ja[2];this.__chart__=c={x:oa-Ja[0]*Si,y:Da-Ja[1]*Si,k:Si},bt(_t)}}).each("interrupt.zoom",function(){Qr(_t)}).each("end.zoom",function(){Qr(_t)}):(this.__chart__=c,$r(_t),bt(_t),Qr(_t))})},Ge.translate=function(Fr){return arguments.length?(c={x:+Fr[0],y:+Fr[1],k:c.k},Jr(),Ge):[c.x,c.y]},Ge.scale=function(Fr){return arguments.length?(c={x:c.x,y:c.y,k:null},Or(+Fr),Jr(),Ge):c.k},Ge.scaleExtent=function(Fr){return arguments.length?(E=Fr==null?Qt:[+Fr[0],+Fr[1]],Ge):E},Ge.center=function(Fr){return arguments.length?(C=Fr&&[+Fr[0],+Fr[1]],Ge):C},Ge.size=function(Fr){return arguments.length?(q=Fr&&[+Fr[0],+Fr[1]],Ge):q},Ge.duration=function(Fr){return arguments.length?(G=+Fr,Ge):G},Ge.x=function(Fr){return arguments.length?(Ce=Fr,ye=Fr.copy(),c={x:0,y:0,k:1},Ge):Ce},Ge.y=function(Fr){return arguments.length?(Ue=Fr,De=Fr.copy(),c={x:0,y:0,k:1},Ge):Ue};function Pe(Fr){return[(Fr[0]-c.x)/c.k,(Fr[1]-c.y)/c.k]}function _r(Fr){return[Fr[0]*c.k+c.x,Fr[1]*c.k+c.y]}function Or(Fr){c.k=Math.max(E[0],Math.min(E[1],Fr))}function Wr(Fr,_t){_t=_r(_t),c.x+=Fr[0]-_t[0],c.y+=Fr[1]-_t[1]}function Gr(Fr,_t,wt,Jt){Fr.__chart__={x:c.x,y:c.y,k:c.k},Or(Math.pow(2,Jt)),Wr(w=_t,wt),Fr=e.select(Fr),G>0&&(Fr=Fr.transition().duration(G)),Fr.call(Ge.event)}function Jr(){Ce&&Ce.domain(ye.range().map(function(Fr){return(Fr-c.x)/c.k}).map(ye.invert)),Ue&&Ue.domain(De.range().map(function(Fr){return(Fr-c.y)/c.k}).map(De.invert))}function $r(Fr){N++||Fr({type:"zoomstart"})}function bt(Fr){Jr(),Fr({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function Qr(Fr){--N||(Fr({type:"zoomend"}),w=null)}function ht(){var Fr=this,_t=Ye.of(Fr,arguments),wt=0,Jt=e.select(i(Fr)).on(ae,Da).on(ie,ja),Nn=Pe(e.mouse(Fr)),oa=Pr(Fr);vt.call(Fr),$r(_t);function Da(){wt=1,Wr(e.mouse(Fr),Nn),bt(_t)}function ja(){Jt.on(ae,null).on(ie,null),oa(wt),Qr(_t)}}function jt(){var Fr=this,_t=Ye.of(Fr,arguments),wt={},Jt=0,Nn,oa=".zoom-"+e.event.changedTouches[0].identifier,Da="touchmove"+oa,ja="touchend"+oa,fi=[],Ja=e.select(Fr),Si=Pr(Fr);Ci(),$r(_t),Ja.on(j,null).on(me,Ci);function Ha(){var ul=e.touches(Fr);return Nn=c.k,ul.forEach(function(Ea){Ea.identifier in wt&&(wt[Ea.identifier]=Pe(Ea))}),ul}function Ci(){var ul=e.event.target;e.select(ul).on(Da,Zf).on(ja,OI),fi.push(ul);for(var Ea=e.event.changedTouches,mo=0,jl=Ea.length;mo1){var Xf=yo[0],qu=yo[1],jh=Xf[0]-qu[0],B_=Xf[1]-qu[1];Jt=jh*jh+B_*B_}}function Zf(){var ul=e.touches(Fr),Ea,mo,jl,yo;vt.call(Fr);for(var g0=0,Xf=ul.length;g01?1:p,w=w<0?0:w>1?1:w,q=w<=.5?w*(1+p):w+p-w*p,C=2*w-q;function E(N){return N>360?N-=360:N<0&&(N+=360),N<60?C+(q-C)*N/60:N<180?q:N<240?C+(q-C)*(240-N)/60:C}function G(N){return Math.round(E(N)*255)}return new Hn(G(c+120),G(c),G(c-120))}e.hcl=Sn;function Sn(c,p,w){return this instanceof Sn?(this.h=+c,this.c=+p,void(this.l=+w)):arguments.length<2?c instanceof Sn?new Sn(c.h,c.c,c.l):c instanceof wn?El(c.l,c.a,c.b):El((c=Br((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new Sn(c,p,w)}var Na=Sn.prototype=new pn;Na.brighter=function(c){return new Sn(this.h,this.c,Math.min(100,this.l+It*(arguments.length?c:1)))},Na.darker=function(c){return new Sn(this.h,this.c,Math.max(0,this.l-It*(arguments.length?c:1)))},Na.rgb=function(){return da(this.h,this.c,this.l).rgb()};function da(c,p,w){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new wn(w,Math.cos(c*=lt)*p,Math.sin(c)*p)}e.lab=wn;function wn(c,p,w){return this instanceof wn?(this.l=+c,this.a=+p,void(this.b=+w)):arguments.length<2?c instanceof wn?new wn(c.l,c.a,c.b):c instanceof Sn?da(c.h,c.c,c.l):Br((c=Hn(c)).r,c.g,c.b):new wn(c,p,w)}var It=18,In=.95047,gi=1,io=1.08883,mi=wn.prototype=new pn;mi.brighter=function(c){return new wn(Math.min(100,this.l+It*(arguments.length?c:1)),this.a,this.b)},mi.darker=function(c){return new wn(Math.max(0,this.l-It*(arguments.length?c:1)),this.a,this.b)},mi.rgb=function(){return ms(this.l,this.a,this.b)};function ms(c,p,w){var C=(c+16)/116,q=C+p/500,E=C-w/200;return q=Bo(q)*In,C=Bo(C)*gi,E=Bo(E)*io,new Hn(Oo(3.2404542*q-1.5371385*C-.4985314*E),Oo(-.969266*q+1.8760108*C+.041556*E),Oo(.0556434*q-.2040259*C+1.0572252*E))}function El(c,p,w){return c>0?new Sn(Math.atan2(w,p)*xt,Math.sqrt(p*p+w*w),c):new Sn(NaN,NaN,c)}function Bo(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function ys(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Oo(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Hn;function Hn(c,p,w){return this instanceof Hn?(this.r=~~c,this.g=~~p,void(this.b=~~w)):arguments.length<2?c instanceof Hn?new Hn(c.r,c.g,c.b):Lt(""+c,Hn,ha):new Hn(c,p,w)}function yi(c){return new Hn(c>>16,c>>8&255,c&255)}function Uo(c){return yi(c)+""}var bi=Hn.prototype=new pn;bi.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,w=this.g,C=this.b,q=30;return!p&&!w&&!C?new Hn(q,q,q):(p&&p>4,C=C>>4|C,q=j&240,q=q>>4|q,E=j&15,E=E<<4|E):c.length===7&&(C=(j&16711680)>>16,q=(j&65280)>>8,E=j&255)),p(C,q,E))}function Ht(c,p,w){var C=Math.min(c/=255,p/=255,w/=255),q=Math.max(c,p,w),E=q-C,G,N,j=(q+C)/2;return E?(N=j<.5?E/(q+C):E/(2-q-C),c==q?G=(p-w)/E+(p0&&j<1?0:G),new tn(G,N,j)}function Br(c,p,w){c=Vn(c),p=Vn(p),w=Vn(w);var C=ys((.4124564*c+.3575761*p+.1804375*w)/In),q=ys((.2126729*c+.7151522*p+.072175*w)/gi),E=ys((.0193339*c+.119192*p+.9503041*w)/io);return wn(116*q-16,500*(C-q),200*(q-E))}function Vn(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function nn(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var Dn=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});Dn.forEach(function(c,p){Dn.set(c,yi(p))});function At(c){return typeof c=="function"?c:function(){return c}}e.functor=At,e.xhr=Wa(V);function Wa(c){return function(p,w,C){return arguments.length===2&&typeof w=="function"&&(C=w,w=null),Yo(p,w,c,C)}}function Yo(c,p,w,C){var q={},E=e.dispatch("beforesend","progress","load","error"),G={},N=new XMLHttpRequest,j=null;self.XDomainRequest&&!("withCredentials"in N)&&/^(http(s)?:)?\/\//.test(c)&&(N=new XDomainRequest),"onload"in N?N.onload=N.onerror=ae:N.onreadystatechange=function(){N.readyState>3&&ae()};function ae(){var ie=N.status,ge;if(!ie&&cu(N)||ie>=200&&ie<300||ie===304){try{ge=w.call(q,N)}catch(me){E.error.call(q,me);return}E.load.call(q,ge)}else E.error.call(q,N)}return N.onprogress=function(ie){var ge=e.event;e.event=ie;try{E.progress.call(q,N)}finally{e.event=ge}},q.header=function(ie,ge){return ie=(ie+"").toLowerCase(),arguments.length<2?G[ie]:(ge==null?delete G[ie]:G[ie]=ge+"",q)},q.mimeType=function(ie){return arguments.length?(p=ie==null?null:ie+"",q):p},q.responseType=function(ie){return arguments.length?(j=ie,q):j},q.response=function(ie){return w=ie,q},["get","post"].forEach(function(ie){q[ie]=function(){return q.send.apply(q,[ie].concat(t(arguments)))}}),q.send=function(ie,ge,me){if(arguments.length===2&&typeof ge=="function"&&(me=ge,ge=null),N.open(ie,c,!0),p!=null&&!("accept"in G)&&(G.accept=p+",*/*"),N.setRequestHeader)for(var Re in G)N.setRequestHeader(Re,G[Re]);return p!=null&&N.overrideMimeType&&N.overrideMimeType(p),j!=null&&(N.responseType=j),me!=null&&q.on("error",me).on("load",function(Ye){me(null,Ye)}),E.beforesend.call(q,N),N.send(ge==null?null:ge),q},q.abort=function(){return N.abort(),q},e.rebind(q,E,"on"),C==null?q:q.get(wf(C))}function wf(c){return c.length===1?function(p,w){c(p==null?w:null)}:c}function cu(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var w=new RegExp('["'+c+` +]`),C=c.charCodeAt(0);function q(ae,ie,ge){arguments.length<3&&(ge=ie,ie=null);var me=Yo(ae,p,ie==null?E:G(ie),ge);return me.row=function(Re){return arguments.length?me.response((ie=Re)==null?E:G(Re)):ie},me}function E(ae){return q.parse(ae.responseText)}function G(ae){return function(ie){return q.parse(ie.responseText,ae)}}q.parse=function(ae,ie){var ge;return q.parseRows(ae,function(me,Re){if(ge)return ge(me,Re-1);var Ye=function(ye){for(var Ce={},De=me.length,Ue=0;Ue=Ye)return me;if(Ue)return Ue=!1,ge;var _r=ye;if(ae.charCodeAt(_r)===34){for(var Or=_r;Or++24?(isFinite(p)&&(clearTimeout(vu),vu=setTimeout(_i,p)),Vo=0):(Vo=1,Pl(_i))}e.timer.flush=function(){lo(),Wo()};function lo(){for(var c=Date.now(),p=oo;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function Wo(){for(var c,p=oo,w=1/0;p;)p.c?(p.t=0;--N)ye.push(q[ae[ge[N]][2]]);for(N=+Re;N1&&St(c[w[C-2]],c[w[C-1]],c[q])<=0;)--C;w[C++]=q}return w.slice(0,C)}function Zc(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return Se(c,_s),c};var _s=e.geom.polygon.prototype=[];_s.area=function(){for(var c=-1,p=this.length,w,C=this[p-1],q=0;++cke)N=N.L;else if(Y=p-Fv(N,w),Y>ke){if(!N.R){C=N;break}N=N.R}else{E>-ke?(C=N.P,q=N):Y>-ke?(C=N,q=N.N):C=q=N;break}var j=Ms(c);if(Oi.insert(C,j),!(!C&&!q)){if(C===q){co(C),q=Ms(C.site),Oi.insert(j,q),j.edge=q.edge=Il(C.site,j.site),fo(C),fo(q);return}if(!q){j.edge=Il(C.site,j.site);return}co(C),co(q);var ae=C.site,ie=ae.x,ge=ae.y,me=c.x-ie,Re=c.y-ge,Ye=q.site,ye=Ye.x-ie,Ce=Ye.y-ge,De=2*(me*Ce-Re*ye),Ue=me*me+Re*Re,Ge=ye*ye+Ce*Ce,Pe={x:(Ce*Ue-Re*Ge)/De+ie,y:(me*Ge-ye*Ue)/De+ge};Gi(q.edge,ae,Ye,Pe),j.edge=Il(ae,c,null,Pe),q.edge=Il(c,Ye,null,Pe),fo(C),fo(q)}}function Ts(c,p){var w=c.site,C=w.x,q=w.y,E=q-p;if(!E)return C;var Y=c.P;if(!Y)return-1/0;w=Y.site;var N=w.x,j=w.y,ae=j-p;if(!ae)return N;var ie=N-C,ge=1/E-1/ae,me=ie/ae;return ge?(-me+Math.sqrt(me*me-2*ge*(ie*ie/(-2*ae)-j+ae/2+q-E/2)))/ge+C:(C+N)/2}function Fv(c,p){var w=c.N;if(w)return Ts(w,p);var C=c.site;return C.y===p?C.x:1/0}function Xo(c){this.site=c,this.edges=[]}Xo.prototype.prepare=function(){for(var c=this.edges,p=c.length,w;p--;)w=c[p].edge,(!w.b||!w.a)&&c.splice(p,1);return c.sort(Fl),c.length};function kf(c){for(var p=c[0][0],w=c[1][0],C=c[0][1],q=c[1][1],E,Y,N,j,ae=uo,ie=ae.length,ge,me,Re,Ye,ye,Ce;ie--;)if(ge=ae[ie],!(!ge||!ge.prepare()))for(Re=ge.edges,Ye=Re.length,me=0;meke||x(j-Y)>ke)&&(Re.splice(me,0,new jo(Hv(ge.site,Ce,x(N-p)ke?{x:p,y:x(E-p)ke?{x:x(Y-q)ke?{x:w,y:x(E-w)ke?{x:x(Y-C)=-$e)){var me=j*j+ae*ae,Re=ie*ie+Ce*Ce,Ye=(Ce*me-ae*Re)/ge,ye=(j*Re-ie*me)/ge,Ce=ye+N,De=Tf.pop()||new Jc;De.arc=c,De.site=q,De.x=Ye+Y,De.y=Ce+Math.sqrt(Ye*Ye+ye*ye),De.cy=Ce,c.circle=De;for(var Ue=null,Ge=Nl._;Ge;)if(De.y0)){if(ye/=Re,Re<0){if(ye0){if(ye>me)return;ye>ge&&(ge=ye)}if(ye=w-N,!(!Re&&ye<0)){if(ye/=Re,Re<0){if(ye>me)return;ye>ge&&(ge=ye)}else if(Re>0){if(ye0)){if(ye/=Ye,Ye<0){if(ye0){if(ye>me)return;ye>ge&&(ge=ye)}if(ye=C-j,!(!Ye&&ye<0)){if(ye/=Ye,Ye<0){if(ye>me)return;ye>ge&&(ge=ye)}else if(Ye>0){if(ye0&&(q.a={x:N+ge*Re,y:j+ge*Ye}),me<1&&(q.b={x:N+me*Re,y:j+me*Ye}),q}}}}}}function xi(c){for(var p=so,w=Sf(c[0][0],c[0][1],c[1][0],c[1][1]),C=p.length,q;C--;)q=p[C],(!Iv(q,c)||!w(q)||x(q.a.x-q.b.x)=E)return;if(ie>me){if(!C)C={x:Ye,y:Y};else if(C.y>=N)return;w={x:Ye,y:N}}else{if(!C)C={x:Ye,y:N};else if(C.y1)if(ie>me){if(!C)C={x:(Y-De)/Ce,y:Y};else if(C.y>=N)return;w={x:(N-De)/Ce,y:N}}else{if(!C)C={x:(N-De)/Ce,y:N};else if(C.y=E)return;w={x:E,y:Ce*E+De}}else{if(!C)C={x:E,y:Ce*E+De};else if(C.x=ie&&De.x<=me&&De.y>=ge&&De.y<=Re?[[ie,Re],[me,Re],[me,ge],[ie,ge]]:[];Ue.point=j[ye]}),ae}function N(j){return j.map(function(ae,ie){return{x:Math.round(C(ae,ie)/ke)*ke,y:Math.round(q(ae,ie)/ke)*ke,i:ie}})}return Y.links=function(j){return Ss(N(j)).edges.filter(function(ae){return ae.l&&ae.r}).map(function(ae){return{source:j[ae.l.i],target:j[ae.r.i]}})},Y.triangles=function(j){var ae=[];return Ss(N(j)).cells.forEach(function(ie,ge){for(var me=ie.site,Re=ie.edges.sort(Fl),Ye=-1,ye=Re.length,Ce,De,Ue=Re[ye-1].edge,Ge=Ue.l===me?Ue.r:Ue.l;++YeGe&&(Ge=ie.x),ie.y>Pe&&(Pe=ie.y),Re.push(ie.x),Ye.push(ie.y);else for(ye=0;yeGe&&(Ge=_r),Or>Pe&&(Pe=Or),Re.push(_r),Ye.push(Or)}var Wr=Ge-De,Gr=Pe-Ue;Wr>Gr?Pe=Ue+Wr:Ge=De+Gr;function Jr(Qr,ht,jt,Zn,on,Fr,_t,wt){if(!(isNaN(jt)||isNaN(Zn)))if(Qr.leaf){var Jt=Qr.x,Nn=Qr.y;if(Jt!=null)if(x(Jt-jt)+x(Nn-Zn)<.01)$r(Qr,ht,jt,Zn,on,Fr,_t,wt);else{var oa=Qr.point;Qr.x=Qr.y=Qr.point=null,$r(Qr,oa,Jt,Nn,on,Fr,_t,wt),$r(Qr,ht,jt,Zn,on,Fr,_t,wt)}else Qr.x=jt,Qr.y=Zn,Qr.point=ht}else $r(Qr,ht,jt,Zn,on,Fr,_t,wt)}function $r(Qr,ht,jt,Zn,on,Fr,_t,wt){var Jt=(on+_t)*.5,Nn=(Fr+wt)*.5,oa=jt>=Jt,Da=Zn>=Nn,ja=Da<<1|oa;Qr.leaf=!1,Qr=Qr.nodes[ja]||(Qr.nodes[ja]=gu()),oa?on=Jt:_t=Jt,Da?Fr=Nn:wt=Nn,Jr(Qr,ht,jt,Zn,on,Fr,_t,wt)}var bt=gu();if(bt.add=function(Qr){Jr(bt,Qr,+ge(Qr,++ye),+me(Qr,ye),De,Ue,Ge,Pe)},bt.visit=function(Qr){oi(Qr,bt,De,Ue,Ge,Pe)},bt.find=function(Qr){return mu(bt,Qr[0],Qr[1],De,Ue,Ge,Pe)},ye=-1,p==null){for(;++yeE||me>Y||Re=_r,Gr=w>=Or,Jr=Gr<<1|Wr,$r=Jr+4;Jr<$r;++Jr)if(ie=Pe[Jr&3])switch(Jr&3){case 0:ae(ie,ge,me,_r,Or);break;case 1:ae(ie,_r,me,Re,Or);break;case 2:ae(ie,ge,Or,_r,Ye);break;case 3:ae(ie,_r,Or,Re,Ye);break}}}(c,C,q,E,Y),j}e.interpolateRgb=yu;function yu(c,p){c=e.rgb(c),p=e.rgb(p);var w=c.r,C=c.g,q=c.b,E=p.r-w,Y=p.g-C,N=p.b-q;return function(j){return"#"+Kr(Math.round(w+E*j))+Kr(Math.round(C+Y*j))+Kr(Math.round(q+N*j))}}e.interpolateObject=Fa;function Fa(c,p){var w={},C={},q;for(q in c)q in p?w[q]=Qo(c[q],p[q]):C[q]=c[q];for(q in p)q in c||(C[q]=p[q]);return function(E){for(q in w)C[q]=w[q](E);return C}}e.interpolateNumber=Kn;function Kn(c,p){return c=+c,p=+p,function(w){return c*(1-w)+p*w}}e.interpolateString=Aa;function Aa(c,p){var w=Vi.lastIndex=Ls.lastIndex=0,C,q,E,Y=-1,N=[],j=[];for(c=c+"",p=p+"";(C=Vi.exec(c))&&(q=Ls.exec(p));)(E=q.index)>w&&(E=p.slice(w,E),N[Y]?N[Y]+=E:N[++Y]=E),(C=C[0])===(q=q[0])?N[Y]?N[Y]+=q:N[++Y]=q:(N[++Y]=null,j.push({i:Y,x:Kn(C,q)})),w=Ls.lastIndex;return w=0&&!(C=e.interpolators[w](c,p)););return C}e.interpolators=[function(c,p){var w=typeof p;return(w==="string"?Dn.has(p.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(p)?yu:Aa:p instanceof pn?yu:Array.isArray(p)?Ol:w==="object"&&isNaN(p)?Fa:Kn)(c,p)}],e.interpolateArray=Ol;function Ol(c,p){var w=[],C=[],q=c.length,E=p.length,Y=Math.min(c.length,p.length),N;for(N=0;N=0?c.slice(0,p):c,C=p>=0?c.slice(p+1):"in";return w=$c.get(w)||Cf,C=Bv.get(C)||V,Ov(C(w.apply(null,r.call(arguments,1))))};function Ov(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function Lf(c){return function(p){return 1-c(1-p)}}function qf(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function Df(c){return c*c}function Ef(c){return c*c*c}function Kc(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,w=p*c;return 4*(c<.5?w:3*(c-p)+w-.75)}function Qc(c){return function(p){return Math.pow(p,c)}}function qs(c){return 1-Math.cos(c*Hr)}function Ds(c){return Math.pow(2,10*(c-1))}function wi(c){return 1-Math.sqrt(1-c*c)}function bu(c,p){var w;return arguments.length<2&&(p=.45),arguments.length?w=p/qr*Math.asin(1/c):(c=1,w=p/4),function(C){return 1+c*Math.pow(2,-10*C)*Math.sin((C-w)*qr/p)}}function Es(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function _u(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=e0;function e0(c,p){c=e.hcl(c),p=e.hcl(p);var w=c.h,C=c.c,q=c.l,E=p.h-w,Y=p.c-C,N=p.l-q;return isNaN(Y)&&(Y=0,C=isNaN(C)?p.c:C),isNaN(E)?(E=0,w=isNaN(w)?p.h:w):E>180?E-=360:E<-180&&(E+=360),function(j){return da(w+E*j,C+Y*j,q+N*j)+""}}e.interpolateHsl=Pf;function Pf(c,p){c=e.hsl(c),p=e.hsl(p);var w=c.h,C=c.s,q=c.l,E=p.h-w,Y=p.s-C,N=p.l-q;return isNaN(Y)&&(Y=0,C=isNaN(C)?p.s:C),isNaN(E)?(E=0,w=isNaN(w)?p.h:w):E>180?E-=360:E<-180&&(E+=360),function(j){return ha(w+E*j,C+Y*j,q+N*j)+""}}e.interpolateLab=Uv;function Uv(c,p){c=e.lab(c),p=e.lab(p);var w=c.l,C=c.a,q=c.b,E=p.l-w,Y=p.a-C,N=p.b-q;return function(j){return ms(w+E*j,C+Y*j,q+N*j)+""}}e.interpolateRound=ho;function ho(c,p){return p-=c,function(w){return Math.round(c+p*w)}}e.transform=function(c){var p=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(w){if(w!=null){p.setAttribute("transform",w);var C=p.transform.baseVal.consolidate()}return new xu(C?C.matrix:Rf)})(c)};function xu(c){var p=[c.a,c.b],w=[c.c,c.d],C=Ps(p),q=Ul(p,w),E=Ps(Rs(w,p,-q))||0;p[0]*w[1]180?p+=360:p-c>180&&(c+=360),C.push({i:w.push(po(w)+"rotate(",null,")")-2,x:Kn(c,p)})):p&&w.push(po(w)+"rotate("+p+")")}function t0(c,p,w,C){c!==p?C.push({i:w.push(po(w)+"skewX(",null,")")-2,x:Kn(c,p)}):p&&w.push(po(w)+"skewX("+p+")")}function Nf(c,p,w,C){if(c[0]!==p[0]||c[1]!==p[1]){var q=w.push(po(w)+"scale(",null,",",null,")");C.push({i:q-4,x:Kn(c[0],p[0])},{i:q-2,x:Kn(c[1],p[1])})}else(p[0]!==1||p[1]!==1)&&w.push(po(w)+"scale("+p+")")}function wu(c,p){var w=[],C=[];return c=e.transform(c),p=e.transform(p),r0(c.translate,p.translate,w,C),zf(c.rotate,p.rotate,w,C),t0(c.skew,p.skew,w,C),Nf(c.scale,p.scale,w,C),c=p=null,function(q){for(var E=-1,Y=C.length,N;++E0?E=Pe:(w.c=null,w.t=NaN,w=null,p.end({type:"end",alpha:E=0})):Pe>0&&(p.start({type:"start",alpha:E=Pe}),w=Rl(c.tick)),c):E},c.start=function(){var Pe,_r=Re.length,Or=Ye.length,Wr=C[0],Gr=C[1],Jr,$r;for(Pe=0;Pe<_r;++Pe)($r=Re[Pe]).index=Pe,$r.weight=0;for(Pe=0;Pe=0;)E.push(ie=ae[j]),ie.parent=N,ie.depth=N.depth+1;w&&(N.value=0),N.children=ae}else w&&(N.value=+w.call(C,N,N.depth)||0),delete N.children;return Ia(q,function(ge){var me,Re;c&&(me=ge.children)&&me.sort(c),w&&(Re=ge.parent)&&(Re.value+=ge.value)}),Y}return C.sort=function(q){return arguments.length?(c=q,C):c},C.children=function(q){return arguments.length?(p=q,C):p},C.value=function(q){return arguments.length?(w=q,C):w},C.revalue=function(q){return w&&(Ai(q,function(E){E.children&&(E.value=0)}),Ia(q,function(E){var Y;E.children||(E.value=+w.call(C,E,E.depth)||0),(Y=E.parent)&&(Y.value+=E.value)})),q},C};function Wi(c,p){return e.rebind(c,p,"sort","children","value"),c.nodes=c,c.links=Za,c}function Ai(c,p){for(var w=[c];(c=w.pop())!=null;)if(p(c),(q=c.children)&&(C=q.length))for(var C,q;--C>=0;)w.push(q[C])}function Ia(c,p){for(var w=[c],C=[];(c=w.pop())!=null;)if(C.push(c),(Y=c.children)&&(E=Y.length))for(var q=-1,E,Y;++qq&&(q=N),C.push(N)}for(Y=0;YC&&(w=p,C=q);return w}function Is(c){return c.reduce(rl,0)}function rl(c,p){return c+p[1]}e.layout.histogram=function(){var c=!0,p=Number,w=Vl,C=Hs;function q(E,me){for(var N=[],j=E.map(p,this),ae=w.call(this,j,me),ie=C.call(this,ae,j,me),ge,me=-1,Re=j.length,Ye=ie.length-1,ye=c?1:1/Re,Ce;++me0)for(me=-1;++me=ae[0]&&Ce<=ae[1]&&(ge=N[e.bisect(ie,Ce,1,Ye)-1],ge.y+=ye,ge.push(E[me]));return N}return q.value=function(E){return arguments.length?(p=E,q):p},q.range=function(E){return arguments.length?(w=At(E),q):w},q.bins=function(E){return arguments.length?(C=typeof E=="number"?function(Y){return tl(Y,E)}:At(E),q):C},q.frequency=function(E){return arguments.length?(c=!!E,q):c},q};function Hs(c,p){return tl(c,Math.ceil(Math.log(p.length)/Math.LN2+1))}function tl(c,p){for(var w=-1,C=+c[0],q=(c[1]-C)/p,E=[];++w<=p;)E[w]=q*w+C;return E}function Vl(c){return[e.min(c),e.max(c)]}e.layout.pack=function(){var c=e.layout.hierarchy().sort(Tu),p=0,w=[1,1],C;function q(E,Y){var N=c.call(this,E,Y),j=N[0],ae=w[0],ie=w[1],ge=C==null?Math.sqrt:typeof C=="function"?C:function(){return C};if(j.x=j.y=0,Ia(j,function(Re){Re.r=+ge(Re.value)}),Ia(j,f0),p){var me=p*(C?1:Math.max(2*j.r/ae,2*j.r/ie))/2;Ia(j,function(Re){Re.r+=me}),Ia(j,f0),Ia(j,function(Re){Re.r-=me})}return Su(j,ae/2,ie/2,C?1:1/Math.max(2*j.r/ae,2*j.r/ie)),N}return q.size=function(E){return arguments.length?(w=E,q):w},q.radius=function(E){return arguments.length?(C=E==null||typeof E=="function"?E:+E,q):C},q.padding=function(E){return arguments.length?(p=+E,q):p},Wi(q,c)};function Tu(c,p){return c.value-p.value}function Bs(c,p){var w=c._pack_next;c._pack_next=p,p._pack_prev=c,p._pack_next=w,w._pack_prev=p}function u0(c,p){c._pack_next=p,p._pack_prev=c}function ku(c,p){var w=p.x-c.x,C=p.y-c.y,q=c.r+p.r;return .999*q*q>w*w+C*C}function f0(c){if(!(p=c.children)||!(me=p.length))return;var p,w=1/0,C=-1/0,q=1/0,E=-1/0,Y,N,j,ae,ie,ge,me;function Re(Pe){w=Math.min(Pe.x-Pe.r,w),C=Math.max(Pe.x+Pe.r,C),q=Math.min(Pe.y-Pe.r,q),E=Math.max(Pe.y+Pe.r,E)}if(p.forEach(c0),Y=p[0],Y.x=-Y.r,Y.y=0,Re(Y),me>1&&(N=p[1],N.x=N.r,N.y=0,Re(N),me>2))for(j=p[2],Wn(Y,N,j),Re(j),Bs(Y,j),Y._pack_prev=j,Bs(j,N),N=Y._pack_next,ae=3;aeCe.x&&(Ce=_r),_r.depth>De.depth&&(De=_r)});var Ue=p(ye,Ce)/2-ye.x,Ge=w[0]/(Ce.x+p(Ce,ye)/2+Ue),Pe=w[1]/(De.depth||1);Ai(Re,function(_r){_r.x=(_r.x+Ue)*Ge,_r.y=_r.depth*Pe})}return me}function E(ie){for(var ge={A:null,children:[ie]},me=[ge],Re;(Re=me.pop())!=null;)for(var Ye=Re.children,ye,Ce=0,De=Ye.length;Ce0&&(Os(I(ye,ie,me),ie,_r),De+=_r,Ue+=_r),Ge+=ye.m,De+=Re.m,Pe+=Ce.m,Ue+=Ye.m;ye&&!Cu(Ye)&&(Ye.t=ye,Ye.m+=Ge-Ue),Re&&!Wl(Ce)&&(Ce.t=Re,Ce.m+=De-Pe,me=ie)}return me}function ae(ie){ie.x*=w[0],ie.y=ie.depth*w[1]}return q.separation=function(ie){return arguments.length?(p=ie,q):p},q.size=function(ie){return arguments.length?(C=(w=ie)==null?ae:null,q):C?null:w},q.nodeSize=function(ie){return arguments.length?(C=(w=ie)==null?null:ae,q):C?w:null},Wi(q,c)};function li(c,p){return c.parent==p.parent?1:2}function Wl(c){var p=c.children;return p.length?p[0]:c.t}function Cu(c){var p=c.children,w;return(w=p.length)?p[w-1]:c.t}function Os(c,p,w){var C=w/(p.i-c.i);p.c-=C,p.s+=w,c.c+=C,p.z+=w,p.m+=w}function Yf(c){for(var p=0,w=0,C=c.children,q=C.length,E;--q>=0;)E=C[q],E.z+=p,E.m+=p,p+=E.s+(w+=E.c)}function I(c,p,w){return c.a.parent===p.parent?c.a:w}e.layout.cluster=function(){var c=e.layout.hierarchy().sort(null).value(null),p=li,w=[1,1],C=!1;function q(E,Y){var N=c.call(this,E,Y),j=N[0],ae,ie=0;Ia(j,function(ye){var Ce=ye.children;Ce&&Ce.length?(ye.x=ce(Ce),ye.y=J(Ce)):(ye.x=ae?ie+=p(ye,ae):0,ye.y=0,ae=ye)});var ge=oe(j),me=we(j),Re=ge.x-p(ge,me)/2,Ye=me.x+p(me,ge)/2;return Ia(j,C?function(ye){ye.x=(ye.x-j.x)*w[0],ye.y=(j.y-ye.y)*w[1]}:function(ye){ye.x=(ye.x-Re)/(Ye-Re)*w[0],ye.y=(1-(j.y?ye.y/j.y:1))*w[1]}),N}return q.separation=function(E){return arguments.length?(p=E,q):p},q.size=function(E){return arguments.length?(C=(w=E)==null,q):C?null:w},q.nodeSize=function(E){return arguments.length?(C=(w=E)!=null,q):C?w:null},Wi(q,c)};function J(c){return 1+e.max(c,function(p){return p.y})}function ce(c){return c.reduce(function(p,w){return p+w.x},0)/c.length}function oe(c){var p=c.children;return p&&p.length?oe(p[0]):c}function we(c){var p=c.children,w;return p&&(w=p.length)?we(p[w-1]):c}e.layout.treemap=function(){var c=e.layout.hierarchy(),p=Math.round,w=[1,1],C=null,q=He,E=!1,Y,N="squarify",j=.5*(1+Math.sqrt(5));function ae(ye,Ce){for(var De=-1,Ue=ye.length,Ge,Pe;++De0;)Ue.push(Pe=Ge[Gr-1]),Ue.area+=Pe.area,N!=="squarify"||(Or=me(Ue,Wr))<=_r?(Ge.pop(),_r=Or):(Ue.area-=Ue.pop().area,Re(Ue,Wr,De,!1),Wr=Math.min(De.dx,De.dy),Ue.length=Ue.area=0,_r=1/0);Ue.length&&(Re(Ue,Wr,De,!0),Ue.length=Ue.area=0),Ce.forEach(ie)}}function ge(ye){var Ce=ye.children;if(Ce&&Ce.length){var De=q(ye),Ue=Ce.slice(),Ge,Pe=[];for(ae(Ue,De.dx*De.dy/ye.value),Pe.area=0;Ge=Ue.pop();)Pe.push(Ge),Pe.area+=Ge.area,Ge.z!=null&&(Re(Pe,Ge.z?De.dx:De.dy,De,!Ue.length),Pe.length=Pe.area=0);Ce.forEach(ge)}}function me(ye,Ce){for(var De=ye.area,Ue,Ge=0,Pe=1/0,_r=-1,Or=ye.length;++_rGe&&(Ge=Ue));return De*=De,Ce*=Ce,De?Math.max(Ce*Ge*j/De,De/(Ce*Pe*j)):1/0}function Re(ye,Ce,De,Ue){var Ge=-1,Pe=ye.length,_r=De.x,Or=De.y,Wr=Ce?p(ye.area/Ce):0,Gr;if(Ce==De.dx){for((Ue||Wr>De.dy)&&(Wr=De.dy);++GeDe.dx)&&(Wr=De.dx);++Ge1);return c+p*C*Math.sqrt(-2*Math.log(E)/E)}},logNormal:function(){var c=e.random.normal.apply(e,arguments);return function(){return Math.exp(c())}},bates:function(c){var p=e.random.irwinHall(c);return function(){return p()/c}},irwinHall:function(c){return function(){for(var p=0,w=0;w2?wr:br,ae=C?If:Ff;return q=j(c,p,ae,w),E=j(p,c,ae,Qo),N}function N(j){return q(j)}return N.invert=function(j){return E(j)},N.domain=function(j){return arguments.length?(c=j.map(Number),Y()):c},N.range=function(j){return arguments.length?(p=j,Y()):p},N.rangeRound=function(j){return N.range(j).interpolate(ho)},N.clamp=function(j){return arguments.length?(C=j,Y()):C},N.interpolate=function(j){return arguments.length?(w=j,Y()):w},N.ticks=function(j){return nt(c,j)},N.tickFormat=function(j,ae){return d3_scale_linearTickFormat(c,j,ae)},N.nice=function(j){return jr(c,j),Y()},N.copy=function(){return Lr(c,p,w,C)},Y()}function et(c,p){return e.rebind(c,p,"range","rangeRound","interpolate","clamp")}function jr(c,p){return Qe(c,hr(tt(c,p)[2])),Qe(c,hr(tt(c,p)[2])),c}function tt(c,p){p==null&&(p=10);var w=or(c),C=w[1]-w[0],q=Math.pow(10,Math.floor(Math.log(C/p)/Math.LN10)),E=p/C*q;return E<=.15?q*=10:E<=.35?q*=5:E<=.75&&(q*=2),w[0]=Math.ceil(w[0]/q)*q,w[1]=Math.floor(w[1]/q)*q+q*.5,w[2]=q,w}function nt(c,p){return e.range.apply(e,tt(c,p))}var Dr={s:1,g:1,p:1,r:1,e:1};function Ir(c){return-Math.floor(Math.log(c)/Math.LN10+.01)}function it(c,p){var w=Ir(p[2]);return c in Dr?Math.abs(w-Ir(Math.max(x(p[0]),x(p[1]))))+ +(c!=="e"):w-(c==="%")*2}e.scale.log=function(){return pt(e.scale.linear().domain([0,1]),10,!0,[1,10])};function pt(c,p,w,C){function q(N){return(w?Math.log(N<0?0:N):-Math.log(N>0?0:-N))/Math.log(p)}function E(N){return w?Math.pow(p,N):-Math.pow(p,-N)}function Y(N){return c(q(N))}return Y.invert=function(N){return E(c.invert(N))},Y.domain=function(N){return arguments.length?(w=N[0]>=0,c.domain((C=N.map(Number)).map(q)),Y):C},Y.base=function(N){return arguments.length?(p=+N,c.domain(C.map(q)),Y):p},Y.nice=function(){var N=Qe(C.map(q),w?Math:Yt);return c.domain(N),C=N.map(E),Y},Y.ticks=function(){var N=or(C),j=[],ae=N[0],ie=N[1],ge=Math.floor(q(ae)),me=Math.ceil(q(ie)),Re=p%1?2:p;if(isFinite(me-ge)){if(w){for(;ge0;Ye--)j.push(E(ge)*Ye);for(ge=0;j[ge]ie;me--);j=j.slice(ge,me)}return j},Y.copy=function(){return pt(c.copy(),p,w,C)},et(Y,c)}var Yt={floor:function(c){return-Math.ceil(-c)},ceil:function(c){return-Math.floor(-c)}};e.scale.pow=function(){return en(e.scale.linear(),1,[0,1])};function en(c,p,w){var C=Wt(p),q=Wt(1/p);function E(Y){return c(C(Y))}return E.invert=function(Y){return q(c.invert(Y))},E.domain=function(Y){return arguments.length?(c.domain((w=Y.map(Number)).map(C)),E):w},E.ticks=function(Y){return nt(w,Y)},E.tickFormat=function(Y,N){return d3_scale_linearTickFormat(w,Y,N)},E.nice=function(Y){return E.domain(jr(w,Y))},E.exponent=function(Y){return arguments.length?(C=Wt(p=Y),q=Wt(1/p),c.domain(w.map(C)),E):p},E.copy=function(){return en(c.copy(),p,w)},et(E,c)}function Wt(c){return function(p){return p<0?-Math.pow(-p,c):Math.pow(p,c)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return gn([],{t:"range",a:[[]]})};function gn(c,p){var w,C,q;function E(N){return C[((w.get(N)||(p.t==="range"?w.set(N,c.push(N)):NaN))-1)%C.length]}function Y(N,j){return e.range(c.length).map(function(ae){return N+j*ae})}return E.domain=function(N){if(!arguments.length)return c;c=[],w=new _;for(var j=-1,ae=N.length,ie;++j0?w[E-1]:c[0],Eme?0:1;if(ie=Vr)return j(ie,Ye)+(ae?j(ae,1-Ye):"")+"Z";var ye,Ce,De,Ue,Ge=0,Pe=0,_r,Or,Wr,Gr,Jr,$r,bt,Qr,ht=[];if((Ue=(+Y.apply(this,arguments)||0)/2)&&(De=C===Zi?Math.sqrt(ae*ae+ie*ie):+C.apply(this,arguments),Ye||(Pe*=-1),ie&&(Pe=Fn(De/ie*Math.sin(Ue))),ae&&(Ge=Fn(De/ae*Math.sin(Ue)))),ie){_r=ie*Math.cos(ge+Pe),Or=ie*Math.sin(ge+Pe),Wr=ie*Math.cos(me-Pe),Gr=ie*Math.sin(me-Pe);var jt=Math.abs(me-ge-2*Pe)<=We?0:1;if(Pe&&Lu(_r,Or,Wr,Gr)===Ye^jt){var Zn=(ge+me)/2;_r=ie*Math.cos(Zn),Or=ie*Math.sin(Zn),Wr=Gr=null}}else _r=Or=0;if(ae){Jr=ae*Math.cos(me-Ge),$r=ae*Math.sin(me-Ge),bt=ae*Math.cos(ge+Ge),Qr=ae*Math.sin(ge+Ge);var on=Math.abs(ge-me+2*Ge)<=We?0:1;if(Ge&&Lu(Jr,$r,bt,Qr)===1-Ye^on){var Fr=(ge+me)/2;Jr=ae*Math.cos(Fr),$r=ae*Math.sin(Fr),bt=Qr=null}}else Jr=$r=0;if(Re>ke&&(ye=Math.min(Math.abs(ie-ae)/2,+w.apply(this,arguments)))>.001){Ce=ae0?0:1}function v0(c,p,w,C,q){var E=c[0]-p[0],Y=c[1]-p[1],N=(q?C:-C)/Math.sqrt(E*E+Y*Y),j=N*Y,ae=-N*E,ie=c[0]+j,ge=c[1]+ae,me=p[0]+j,Re=p[1]+ae,Ye=(ie+me)/2,ye=(ge+Re)/2,Ce=me-ie,De=Re-ge,Ue=Ce*Ce+De*De,Ge=w-C,Pe=ie*Re-me*ge,_r=(De<0?-1:1)*Math.sqrt(Math.max(0,Ge*Ge*Ue-Pe*Pe)),Or=(Pe*De-Ce*_r)/Ue,Wr=(-Pe*Ce-De*_r)/Ue,Gr=(Pe*De+Ce*_r)/Ue,Jr=(-Pe*Ce+De*_r)/Ue,$r=Or-Ye,bt=Wr-ye,Qr=Gr-Ye,ht=Jr-ye;return $r*$r+bt*bt>Qr*Qr+ht*ht&&(Or=Gr,Wr=Jr),[[Or-j,Wr-ae],[Or*w/Ge,Wr*w/Ge]]}function h0(){return!0}function Uh(c){var p=zl,w=bs,C=h0,q=Xi,E=q.key,Y=.7;function N(j){var ae=[],ie=[],ge=-1,me=j.length,Re,Ye=At(p),ye=At(w);function Ce(){ae.push("M",q(c(ie),Y))}for(;++ge1?c.join("L"):c+"Z"}function Yh(c){return c.join("L")+"Z"}function Gh(c){for(var p=0,w=c.length,C=c[0],q=[C[0],",",C[1]];++p1&&q.push("H",C[0]),q.join("")}function d0(c){for(var p=0,w=c.length,C=c[0],q=[C[0],",",C[1]];++p1){N=p[1],E=c[j],j++,C+="C"+(q[0]+Y[0])+","+(q[1]+Y[1])+","+(E[0]-N[0])+","+(E[1]-N[1])+","+E[0]+","+E[1];for(var ae=2;ae9&&(E=w*3/Math.sqrt(E),Y[N]=E*C,Y[N+1]=E*q));for(N=-1;++N<=j;)E=(c[Math.min(j,N+1)][0]-c[Math.max(0,N-1)][0])/(6*(1+Y[N]*Y[N])),p.push([E||0,Y[N]*E||0]);return p}function ue(c){return c.length<3?Xi(c):c[0]+p0(c,Z(c))}e.svg.line.radial=function(){var c=Uh(ve);return c.radius=c.x,delete c.x,c.angle=c.y,delete c.y,c};function ve(c){for(var p,w=-1,C=c.length,q,E;++wWe)+",1 "+ge}function ae(ie,ge,me,Re){return"Q 0,0 "+Re}return E.radius=function(ie){return arguments.length?(w=At(ie),E):w},E.source=function(ie){return arguments.length?(c=At(ie),E):c},E.target=function(ie){return arguments.length?(p=At(ie),E):p},E.startAngle=function(ie){return arguments.length?(C=At(ie),E):C},E.endAngle=function(ie){return arguments.length?(q=At(ie),E):q},E};function Le(c){return c.radius}e.svg.diagonal=function(){var c=he,p=xe,w=ze;function C(q,E){var Y=c.call(this,q,E),N=p.call(this,q,E),j=(Y.y+N.y)/2,ae=[Y,{x:Y.x,y:j},{x:N.x,y:j},N];return ae=ae.map(w),"M"+ae[0]+"C"+ae[1]+" "+ae[2]+" "+ae[3]}return C.source=function(q){return arguments.length?(c=At(q),C):c},C.target=function(q){return arguments.length?(p=At(q),C):p},C.projection=function(q){return arguments.length?(w=q,C):w},C};function ze(c){return[c.x,c.y]}e.svg.diagonal.radial=function(){var c=e.svg.diagonal(),p=ze,w=c.projection;return c.projection=function(C){return arguments.length?w(tr(p=C)):p},c};function tr(c){return function(){var p=c.apply(this,arguments),w=p[0],C=p[1]-Hr;return[w*Math.cos(C),w*Math.sin(C)]}}e.svg.symbol=function(){var c=Ar,p=vr;function w(C,q){return(at.get(c.call(this,C,q))||Zr)(p.call(this,C,q))}return w.type=function(C){return arguments.length?(c=At(C),w):c},w.size=function(C){return arguments.length?(p=At(C),w):p},w};function vr(){return 64}function Ar(){return"circle"}function Zr(c){var p=Math.sqrt(c/We);return"M0,"+p+"A"+p+","+p+" 0 1,1 0,"+-p+"A"+p+","+p+" 0 1,1 0,"+p+"Z"}var at=e.map({circle:Zr,cross:function(c){var p=Math.sqrt(c/5)/2;return"M"+-3*p+","+-p+"H"+-p+"V"+-3*p+"H"+p+"V"+-p+"H"+3*p+"V"+p+"H"+p+"V"+3*p+"H"+-p+"V"+p+"H"+-3*p+"Z"},diamond:function(c){var p=Math.sqrt(c/(2*st)),w=p*st;return"M0,"+-p+"L"+w+",0 0,"+p+" "+-w+",0Z"},square:function(c){var p=Math.sqrt(c)/2;return"M"+-p+","+-p+"L"+p+","+-p+" "+p+","+p+" "+-p+","+p+"Z"},"triangle-down":function(c){var p=Math.sqrt(c/ot),w=p*ot/2;return"M0,"+w+"L"+p+","+-w+" "+-p+","+-w+"Z"},"triangle-up":function(c){var p=Math.sqrt(c/ot),w=p*ot/2;return"M0,"+-w+"L"+p+","+w+" "+-p+","+w+"Z"}});e.svg.symbolTypes=at.keys();var ot=Math.sqrt(3),st=Math.tan(30*lt);pe.transition=function(c){for(var p=ga||++zn,w=La(c),C=[],q,E,Y=ui||{time:Date.now(),ease:Kc,delay:0,duration:250},N=-1,j=this.length;++N0;)ge[--Ue].call(c,De);if(Ce>=1)return Y.event&&Y.event.end.call(c,c.__data__,p),--E.count?delete E[C]:delete c[w],1}Y||(N=q.time,j=Rl(me,0,N),Y=E[C]={tween:new _,time:N,timer:j,delay:q.delay,duration:q.duration,ease:q.ease,index:p},q=null,++E.count)}e.svg.axis=function(){var c=e.scale.linear(),p=ji,w=6,C=6,q=3,E=[10],Y=null,N;function j(ae){ae.each(function(){var ie=e.select(this),ge=this.__chart__||c,me=this.__chart__=c.copy(),Re=Y==null?me.ticks?me.ticks.apply(me,E):me.domain():Y,Ye=N==null?me.tickFormat?me.tickFormat.apply(me,E):V:N,ye=ie.selectAll(".tick").data(Re,me),Ce=ye.enter().insert("g",".domain").attr("class","tick").style("opacity",ke),De=e.transition(ye.exit()).style("opacity",ke).remove(),Ue=e.transition(ye.order()).style("opacity",1),Ge=Math.max(w,0)+q,Pe,_r=ur(me),Or=ie.selectAll(".domain").data([0]),Wr=(Or.enter().append("path").attr("class","domain"),e.transition(Or));Ce.append("line"),Ce.append("text");var Gr=Ce.select("line"),Jr=Ue.select("line"),$r=ye.select("text").text(Ye),bt=Ce.select("text"),Qr=Ue.select("text"),ht=p==="top"||p==="left"?-1:1,jt,Zn,on,Fr;if(p==="bottom"||p==="top"?(Pe=ll,jt="x",on="y",Zn="x2",Fr="y2",$r.attr("dy",ht<0?"0em":".71em").style("text-anchor","middle"),Wr.attr("d","M"+_r[0]+","+ht*C+"V0H"+_r[1]+"V"+ht*C)):(Pe=sl,jt="y",on="x",Zn="y2",Fr="x2",$r.attr("dy",".32em").style("text-anchor",ht<0?"end":"start"),Wr.attr("d","M"+ht*C+","+_r[0]+"H0V"+_r[1]+"H"+ht*C)),Gr.attr(Fr,ht*w),bt.attr(on,ht*Ge),Jr.attr(Zn,0).attr(Fr,ht*w),Qr.attr(jt,0).attr(on,ht*Ge),me.rangeBand){var _t=me,wt=_t.rangeBand()/2;ge=me=function(Jt){return _t(Jt)+wt}}else ge.rangeBand?ge=me:De.call(Pe,me,ge);Ce.call(Pe,ge,me),Ue.call(Pe,me,me)})}return j.scale=function(ae){return arguments.length?(c=ae,j):c},j.orient=function(ae){return arguments.length?(p=ae in ol?ae+"":ji,j):p},j.ticks=function(){return arguments.length?(E=t(arguments),j):E},j.tickValues=function(ae){return arguments.length?(Y=ae,j):Y},j.tickFormat=function(ae){return arguments.length?(N=ae,j):N},j.tickSize=function(ae){var ie=arguments.length;return ie?(w=+ae,C=+arguments[ie-1],j):w},j.innerTickSize=function(ae){return arguments.length?(w=+ae,j):w},j.outerTickSize=function(ae){return arguments.length?(C=+ae,j):C},j.tickPadding=function(ae){return arguments.length?(q=+ae,j):q},j.tickSubdivide=function(){return arguments.length&&j},j};var ji="bottom",ol={top:1,right:1,bottom:1,left:1};function ll(c,p,w){c.attr("transform",function(C){var q=p(C);return"translate("+(isFinite(q)?q:w(C))+",0)"})}function sl(c,p,w){c.attr("transform",function(C){var q=p(C);return"translate(0,"+(isFinite(q)?q:w(C))+")"})}e.svg.brush=function(){var c=Ne(ie,"brushstart","brush","brushend"),p=null,w=null,C=[0,0],q=[0,0],E,Y,N=!0,j=!0,ae=go[0];function ie(ye){ye.each(function(){var Ce=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ye).on("touchstart.brush",Ye),De=Ce.selectAll(".background").data([0]);De.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ce.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ue=Ce.selectAll(".resize").data(ae,V);Ue.exit().remove(),Ue.enter().append("g").attr("class",function(Or){return"resize "+Or}).style("cursor",function(Or){return Xl[Or]}).append("rect").attr("x",function(Or){return/[ew]$/.test(Or)?-3:null}).attr("y",function(Or){return/^[ns]/.test(Or)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ue.style("display",ie.empty()?"none":null);var Ge=e.transition(Ce),Pe=e.transition(De),_r;p&&(_r=ur(p),Pe.attr("x",_r[0]).attr("width",_r[1]-_r[0]),me(Ge)),w&&(_r=ur(w),Pe.attr("y",_r[0]).attr("height",_r[1]-_r[0]),Re(Ge)),ge(Ge)})}ie.event=function(ye){ye.each(function(){var Ce=c.of(this,arguments),De={x:C,y:q,i:E,j:Y},Ue=this.__chart__||De;this.__chart__=De,ga?e.select(this).transition().each("start.brush",function(){E=Ue.i,Y=Ue.j,C=Ue.x,q=Ue.y,Ce({type:"brushstart"})}).tween("brush:brush",function(){var Ge=Ol(C,De.x),Pe=Ol(q,De.y);return E=Y=null,function(_r){C=De.x=Ge(_r),q=De.y=Pe(_r),Ce({type:"brush",mode:"resize"})}}).each("end.brush",function(){E=De.i,Y=De.j,Ce({type:"brush",mode:"resize"}),Ce({type:"brushend"})}):(Ce({type:"brushstart"}),Ce({type:"brush",mode:"resize"}),Ce({type:"brushend"}))})};function ge(ye){ye.selectAll(".resize").attr("transform",function(Ce){return"translate("+C[+/e$/.test(Ce)]+","+q[+/^s/.test(Ce)]+")"})}function me(ye){ye.select(".extent").attr("x",C[0]),ye.selectAll(".extent,.n>rect,.s>rect").attr("width",C[1]-C[0])}function Re(ye){ye.select(".extent").attr("y",q[0]),ye.selectAll(".extent,.e>rect,.w>rect").attr("height",q[1]-q[0])}function Ye(){var ye=this,Ce=e.select(e.event.target),De=c.of(ye,arguments),Ue=e.select(ye),Ge=Ce.datum(),Pe=!/^(n|s)$/.test(Ge)&&p,_r=!/^(e|w)$/.test(Ge)&&w,Or=Ce.classed("extent"),Wr=Pr(ye),Gr,Jr=e.mouse(ye),$r,bt=e.select(i(ye)).on("keydown.brush",jt).on("keyup.brush",Zn);if(e.event.changedTouches?bt.on("touchmove.brush",on).on("touchend.brush",_t):bt.on("mousemove.brush",on).on("mouseup.brush",_t),Ue.interrupt().selectAll("*").interrupt(),Or)Jr[0]=C[0]-Jr[0],Jr[1]=q[0]-Jr[1];else if(Ge){var Qr=+/w$/.test(Ge),ht=+/^n/.test(Ge);$r=[C[1-Qr]-Jr[0],q[1-ht]-Jr[1]],Jr[0]=C[Qr],Jr[1]=q[ht]}else e.event.altKey&&(Gr=Jr.slice());Ue.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ce.style("cursor")),De({type:"brushstart"}),on();function jt(){e.event.keyCode==32&&(Or||(Gr=null,Jr[0]-=C[1],Jr[1]-=q[1],Or=2),qe())}function Zn(){e.event.keyCode==32&&Or==2&&(Jr[0]+=C[1],Jr[1]+=q[1],Or=0,qe())}function on(){var wt=e.mouse(ye),Jt=!1;$r&&(wt[0]+=$r[0],wt[1]+=$r[1]),Or||(e.event.altKey?(Gr||(Gr=[(C[0]+C[1])/2,(q[0]+q[1])/2]),Jr[0]=C[+(wt[0]{(function(e,r){typeof Qh=="object"&&typeof W_!="undefined"?r(Qh):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(Qh,function(e){"use strict";var r=new Date,t=new Date;function n(Ae,Ve,je,zr){function kr(er){return Ae(er=arguments.length===0?new Date:new Date(+er)),er}return kr.floor=function(er){return Ae(er=new Date(+er)),er},kr.ceil=function(er){return Ae(er=new Date(er-1)),Ve(er,1),Ae(er),er},kr.round=function(er){var Ke=kr(er),mr=kr.ceil(er);return er-Ke0))return Mr;do Mr.push(gr=new Date(+er)),Ve(er,mr),Ae(er);while(gr=Ke)for(;Ae(Ke),!er(Ke);)Ke.setTime(Ke-1)},function(Ke,mr){if(Ke>=Ke)if(mr<0)for(;++mr<=0;)for(;Ve(Ke,-1),!er(Ke););else for(;--mr>=0;)for(;Ve(Ke,1),!er(Ke););})},je&&(kr.count=function(er,Ke){return r.setTime(+er),t.setTime(+Ke),Ae(r),Ae(t),Math.floor(je(r,t))},kr.every=function(er){return er=Math.floor(er),!isFinite(er)||!(er>0)?null:er>1?kr.filter(zr?function(Ke){return zr(Ke)%er===0}:function(Ke){return kr.count(0,Ke)%er===0}):kr}),kr}var a=n(function(){},function(Ae,Ve){Ae.setTime(+Ae+Ve)},function(Ae,Ve){return Ve-Ae});a.every=function(Ae){return Ae=Math.floor(Ae),!isFinite(Ae)||!(Ae>0)?null:Ae>1?n(function(Ve){Ve.setTime(Math.floor(Ve/Ae)*Ae)},function(Ve,je){Ve.setTime(+Ve+je*Ae)},function(Ve,je){return(je-Ve)/Ae}):a};var i=a.range,o=1e3,l=6e4,s=36e5,u=864e5,f=6048e5,v=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds())},function(Ae,Ve){Ae.setTime(+Ae+Ve*o)},function(Ae,Ve){return(Ve-Ae)/o},function(Ae){return Ae.getUTCSeconds()}),h=v.range,d=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o)},function(Ae,Ve){Ae.setTime(+Ae+Ve*l)},function(Ae,Ve){return(Ve-Ae)/l},function(Ae){return Ae.getMinutes()}),m=d.range,g=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o-Ae.getMinutes()*l)},function(Ae,Ve){Ae.setTime(+Ae+Ve*s)},function(Ae,Ve){return(Ve-Ae)/s},function(Ae){return Ae.getHours()}),y=g.range,x=n(function(Ae){Ae.setHours(0,0,0,0)},function(Ae,Ve){Ae.setDate(Ae.getDate()+Ve)},function(Ae,Ve){return(Ve-Ae-(Ve.getTimezoneOffset()-Ae.getTimezoneOffset())*l)/u},function(Ae){return Ae.getDate()-1}),M=x.range;function b(Ae){return n(function(Ve){Ve.setDate(Ve.getDate()-(Ve.getDay()+7-Ae)%7),Ve.setHours(0,0,0,0)},function(Ve,je){Ve.setDate(Ve.getDate()+je*7)},function(Ve,je){return(je-Ve-(je.getTimezoneOffset()-Ve.getTimezoneOffset())*l)/f})}var _=b(0),A=b(1),S=b(2),k=b(3),D=b(4),z=b(5),F=b(6),O=_.range,G=A.range,B=S.range,X=k.range,V=D.range,re=z.range,ne=F.range,K=n(function(Ae){Ae.setDate(1),Ae.setHours(0,0,0,0)},function(Ae,Ve){Ae.setMonth(Ae.getMonth()+Ve)},function(Ae,Ve){return Ve.getMonth()-Ae.getMonth()+(Ve.getFullYear()-Ae.getFullYear())*12},function(Ae){return Ae.getMonth()}),ee=K.range,fe=n(function(Ae){Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Ve){Ae.setFullYear(Ae.getFullYear()+Ve)},function(Ae,Ve){return Ve.getFullYear()-Ae.getFullYear()},function(Ae){return Ae.getFullYear()});fe.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(Ve){Ve.setFullYear(Math.floor(Ve.getFullYear()/Ae)*Ae),Ve.setMonth(0,1),Ve.setHours(0,0,0,0)},function(Ve,je){Ve.setFullYear(Ve.getFullYear()+je*Ae)})};var de=fe.range,qe=n(function(Ae){Ae.setUTCSeconds(0,0)},function(Ae,Ve){Ae.setTime(+Ae+Ve*l)},function(Ae,Ve){return(Ve-Ae)/l},function(Ae){return Ae.getUTCMinutes()}),Be=qe.range,Ne=n(function(Ae){Ae.setUTCMinutes(0,0,0)},function(Ae,Ve){Ae.setTime(+Ae+Ve*s)},function(Ae,Ve){return(Ve-Ae)/s},function(Ae){return Ae.getUTCHours()}),Ie=Ne.range,Se=n(function(Ae){Ae.setUTCHours(0,0,0,0)},function(Ae,Ve){Ae.setUTCDate(Ae.getUTCDate()+Ve)},function(Ae,Ve){return(Ve-Ae)/u},function(Ae){return Ae.getUTCDate()-1}),Xe=Se.range;function se(Ae){return n(function(Ve){Ve.setUTCDate(Ve.getUTCDate()-(Ve.getUTCDay()+7-Ae)%7),Ve.setUTCHours(0,0,0,0)},function(Ve,je){Ve.setUTCDate(Ve.getUTCDate()+je*7)},function(Ve,je){return(je-Ve)/f})}var be=se(0),Te=se(1),pe=se(2),W=se(3),Q=se(4),$=se(5),Me=se(6),Fe=be.range,Oe=Te.range,fr=pe.range,nr=W.range,Ze=Q.range,ar=$.range,lr=Me.range,ir=n(function(Ae){Ae.setUTCDate(1),Ae.setUTCHours(0,0,0,0)},function(Ae,Ve){Ae.setUTCMonth(Ae.getUTCMonth()+Ve)},function(Ae,Ve){return Ve.getUTCMonth()-Ae.getUTCMonth()+(Ve.getUTCFullYear()-Ae.getUTCFullYear())*12},function(Ae){return Ae.getUTCMonth()}),rr=ir.range,Cr=n(function(Ae){Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Ve){Ae.setUTCFullYear(Ae.getUTCFullYear()+Ve)},function(Ae,Ve){return Ve.getUTCFullYear()-Ae.getUTCFullYear()},function(Ae){return Ae.getUTCFullYear()});Cr.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(Ve){Ve.setUTCFullYear(Math.floor(Ve.getUTCFullYear()/Ae)*Ae),Ve.setUTCMonth(0,1),Ve.setUTCHours(0,0,0,0)},function(Ve,je){Ve.setUTCFullYear(Ve.getUTCFullYear()+je*Ae)})};var yr=Cr.range;e.timeDay=x,e.timeDays=M,e.timeFriday=z,e.timeFridays=re,e.timeHour=g,e.timeHours=y,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=m,e.timeMonday=A,e.timeMondays=G,e.timeMonth=K,e.timeMonths=ee,e.timeSaturday=F,e.timeSaturdays=ne,e.timeSecond=v,e.timeSeconds=h,e.timeSunday=_,e.timeSundays=O,e.timeThursday=D,e.timeThursdays=V,e.timeTuesday=S,e.timeTuesdays=B,e.timeWednesday=k,e.timeWednesdays=X,e.timeWeek=_,e.timeWeeks=O,e.timeYear=fe,e.timeYears=de,e.utcDay=Se,e.utcDays=Xe,e.utcFriday=$,e.utcFridays=ar,e.utcHour=Ne,e.utcHours=Ie,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=qe,e.utcMinutes=Be,e.utcMonday=Te,e.utcMondays=Oe,e.utcMonth=ir,e.utcMonths=rr,e.utcSaturday=Me,e.utcSaturdays=lr,e.utcSecond=v,e.utcSeconds=h,e.utcSunday=be,e.utcSundays=Fe,e.utcThursday=Q,e.utcThursdays=Ze,e.utcTuesday=pe,e.utcTuesdays=fr,e.utcWednesday=W,e.utcWednesdays=nr,e.utcWeek=be,e.utcWeeks=Fe,e.utcYear=Cr,e.utcYears=yr,Object.defineProperty(e,"__esModule",{value:!0})})});var m0=te((ed,Z_)=>{(function(e,r){typeof ed=="object"&&typeof Z_!="undefined"?r(ed,_y()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(ed,function(e,r){"use strict";function t(_e){if(0<=_e.y&&_e.y<100){var ke=new Date(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L);return ke.setFullYear(_e.y),ke}return new Date(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L)}function n(_e){if(0<=_e.y&&_e.y<100){var ke=new Date(Date.UTC(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L));return ke.setUTCFullYear(_e.y),ke}return new Date(Date.UTC(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L))}function a(_e,ke,$e){return{y:_e,m:ke,d:$e,H:0,M:0,S:0,L:0}}function i(_e){var ke=_e.dateTime,$e=_e.date,We=_e.time,qr=_e.periods,Vr=_e.days,Hr=_e.shortDays,lt=_e.months,xt=_e.shortMonths,Rt=h(qr),St=d(qr),hn=h(Vr),Fn=d(Vr),$n=h(Hr),Xt=d(Hr),cn=h(lt),sn=d(lt),Kt=h(xt),aa=d(xt),rt={a:gi,A:io,b:mi,B:ms,c:null,d:K,e:K,f:Be,H:ee,I:fe,j:de,L:qe,m:Ne,M:Ie,p:El,q:Bo,Q:Ke,s:mr,S:Se,u:Xe,U:se,V:be,w:Te,W:pe,x:null,X:null,y:W,Y:Q,Z:$,"%":er},Qt={a:ys,A:Oo,b:Hn,B:yi,c:null,d:Me,e:Me,f:Ze,H:Fe,I:Oe,j:fr,L:nr,m:ar,M:lr,p:Uo,q:bi,Q:Ke,s:mr,S:ir,u:rr,U:Cr,V:yr,w:Ae,W:Ve,x:null,X:null,y:je,Y:zr,Z:kr,"%":er},Ct={a:ha,A:Sn,b:Na,B:da,c:wn,d:D,e:D,f:X,H:F,I:F,j:z,L:B,m:k,M:O,p:un,q:S,Q:re,s:ne,S:G,u:g,U:y,V:x,w:m,W:M,x:It,X:In,y:_,Y:b,Z:A,"%":V};rt.x=dn($e,rt),rt.X=dn(We,rt),rt.c=dn(ke,rt),Qt.x=dn($e,Qt),Qt.X=dn(We,Qt),Qt.c=dn(ke,Qt);function dn(Kr,Lt){return function(Ht){var Br=[],Vn=-1,nn=0,Dn=Kr.length,At,Wa,Yo;for(Ht instanceof Date||(Ht=new Date(+Ht));++Vn53)return null;"w"in Br||(Br.w=1),"Z"in Br?(nn=n(a(Br.y,0,1)),Dn=nn.getUTCDay(),nn=Dn>4||Dn===0?r.utcMonday.ceil(nn):r.utcMonday(nn),nn=r.utcDay.offset(nn,(Br.V-1)*7),Br.y=nn.getUTCFullYear(),Br.m=nn.getUTCMonth(),Br.d=nn.getUTCDate()+(Br.w+6)%7):(nn=t(a(Br.y,0,1)),Dn=nn.getDay(),nn=Dn>4||Dn===0?r.timeMonday.ceil(nn):r.timeMonday(nn),nn=r.timeDay.offset(nn,(Br.V-1)*7),Br.y=nn.getFullYear(),Br.m=nn.getMonth(),Br.d=nn.getDate()+(Br.w+6)%7)}else("W"in Br||"U"in Br)&&("w"in Br||(Br.w="u"in Br?Br.u%7:"W"in Br?1:0),Dn="Z"in Br?n(a(Br.y,0,1)).getUTCDay():t(a(Br.y,0,1)).getDay(),Br.m=0,Br.d="W"in Br?(Br.w+6)%7+Br.W*7-(Dn+5)%7:Br.w+Br.U*7-(Dn+6)%7);return"Z"in Br?(Br.H+=Br.Z/100|0,Br.M+=Br.Z%100,n(Br)):t(Br)}}function tn(Kr,Lt,Ht,Br){for(var Vn=0,nn=Lt.length,Dn=Ht.length,At,Wa;Vn=Dn)return-1;if(At=Lt.charCodeAt(Vn++),At===37){if(At=Lt.charAt(Vn++),Wa=Ct[At in o?Lt.charAt(Vn++):At],!Wa||(Br=Wa(Kr,Ht,Br))<0)return-1}else if(At!=Ht.charCodeAt(Br++))return-1}return Br}function un(Kr,Lt,Ht){var Br=Rt.exec(Lt.slice(Ht));return Br?(Kr.p=St[Br[0].toLowerCase()],Ht+Br[0].length):-1}function ha(Kr,Lt,Ht){var Br=$n.exec(Lt.slice(Ht));return Br?(Kr.w=Xt[Br[0].toLowerCase()],Ht+Br[0].length):-1}function Sn(Kr,Lt,Ht){var Br=hn.exec(Lt.slice(Ht));return Br?(Kr.w=Fn[Br[0].toLowerCase()],Ht+Br[0].length):-1}function Na(Kr,Lt,Ht){var Br=Kt.exec(Lt.slice(Ht));return Br?(Kr.m=aa[Br[0].toLowerCase()],Ht+Br[0].length):-1}function da(Kr,Lt,Ht){var Br=cn.exec(Lt.slice(Ht));return Br?(Kr.m=sn[Br[0].toLowerCase()],Ht+Br[0].length):-1}function wn(Kr,Lt,Ht){return tn(Kr,ke,Lt,Ht)}function It(Kr,Lt,Ht){return tn(Kr,$e,Lt,Ht)}function In(Kr,Lt,Ht){return tn(Kr,We,Lt,Ht)}function gi(Kr){return Hr[Kr.getDay()]}function io(Kr){return Vr[Kr.getDay()]}function mi(Kr){return xt[Kr.getMonth()]}function ms(Kr){return lt[Kr.getMonth()]}function El(Kr){return qr[+(Kr.getHours()>=12)]}function Bo(Kr){return 1+~~(Kr.getMonth()/3)}function ys(Kr){return Hr[Kr.getUTCDay()]}function Oo(Kr){return Vr[Kr.getUTCDay()]}function Hn(Kr){return xt[Kr.getUTCMonth()]}function yi(Kr){return lt[Kr.getUTCMonth()]}function Uo(Kr){return qr[+(Kr.getUTCHours()>=12)]}function bi(Kr){return 1+~~(Kr.getUTCMonth()/3)}return{format:function(Kr){var Lt=dn(Kr+="",rt);return Lt.toString=function(){return Kr},Lt},parse:function(Kr){var Lt=pn(Kr+="",!1);return Lt.toString=function(){return Kr},Lt},utcFormat:function(Kr){var Lt=dn(Kr+="",Qt);return Lt.toString=function(){return Kr},Lt},utcParse:function(Kr){var Lt=pn(Kr+="",!0);return Lt.toString=function(){return Kr},Lt}}}var o={"-":"",_:" ",0:"0"},l=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(_e,ke,$e){var We=_e<0?"-":"",qr=(We?-_e:_e)+"",Vr=qr.length;return We+(Vr<$e?new Array($e-Vr+1).join(ke)+qr:qr)}function v(_e){return _e.replace(u,"\\$&")}function h(_e){return new RegExp("^(?:"+_e.map(v).join("|")+")","i")}function d(_e){for(var ke={},$e=-1,We=_e.length;++$e68?1900:2e3),$e+We[0].length):-1}function A(_e,ke,$e){var We=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ke.slice($e,$e+6));return We?(_e.Z=We[1]?0:-(We[2]+(We[3]||"00")),$e+We[0].length):-1}function S(_e,ke,$e){var We=l.exec(ke.slice($e,$e+1));return We?(_e.q=We[0]*3-3,$e+We[0].length):-1}function k(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.m=We[0]-1,$e+We[0].length):-1}function D(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.d=+We[0],$e+We[0].length):-1}function z(_e,ke,$e){var We=l.exec(ke.slice($e,$e+3));return We?(_e.m=0,_e.d=+We[0],$e+We[0].length):-1}function F(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.H=+We[0],$e+We[0].length):-1}function O(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.M=+We[0],$e+We[0].length):-1}function G(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.S=+We[0],$e+We[0].length):-1}function B(_e,ke,$e){var We=l.exec(ke.slice($e,$e+3));return We?(_e.L=+We[0],$e+We[0].length):-1}function X(_e,ke,$e){var We=l.exec(ke.slice($e,$e+6));return We?(_e.L=Math.floor(We[0]/1e3),$e+We[0].length):-1}function V(_e,ke,$e){var We=s.exec(ke.slice($e,$e+1));return We?$e+We[0].length:-1}function re(_e,ke,$e){var We=l.exec(ke.slice($e));return We?(_e.Q=+We[0],$e+We[0].length):-1}function ne(_e,ke,$e){var We=l.exec(ke.slice($e));return We?(_e.s=+We[0],$e+We[0].length):-1}function K(_e,ke){return f(_e.getDate(),ke,2)}function ee(_e,ke){return f(_e.getHours(),ke,2)}function fe(_e,ke){return f(_e.getHours()%12||12,ke,2)}function de(_e,ke){return f(1+r.timeDay.count(r.timeYear(_e),_e),ke,3)}function qe(_e,ke){return f(_e.getMilliseconds(),ke,3)}function Be(_e,ke){return qe(_e,ke)+"000"}function Ne(_e,ke){return f(_e.getMonth()+1,ke,2)}function Ie(_e,ke){return f(_e.getMinutes(),ke,2)}function Se(_e,ke){return f(_e.getSeconds(),ke,2)}function Xe(_e){var ke=_e.getDay();return ke===0?7:ke}function se(_e,ke){return f(r.timeSunday.count(r.timeYear(_e)-1,_e),ke,2)}function be(_e,ke){var $e=_e.getDay();return _e=$e>=4||$e===0?r.timeThursday(_e):r.timeThursday.ceil(_e),f(r.timeThursday.count(r.timeYear(_e),_e)+(r.timeYear(_e).getDay()===4),ke,2)}function Te(_e){return _e.getDay()}function pe(_e,ke){return f(r.timeMonday.count(r.timeYear(_e)-1,_e),ke,2)}function W(_e,ke){return f(_e.getFullYear()%100,ke,2)}function Q(_e,ke){return f(_e.getFullYear()%1e4,ke,4)}function $(_e){var ke=_e.getTimezoneOffset();return(ke>0?"-":(ke*=-1,"+"))+f(ke/60|0,"0",2)+f(ke%60,"0",2)}function Me(_e,ke){return f(_e.getUTCDate(),ke,2)}function Fe(_e,ke){return f(_e.getUTCHours(),ke,2)}function Oe(_e,ke){return f(_e.getUTCHours()%12||12,ke,2)}function fr(_e,ke){return f(1+r.utcDay.count(r.utcYear(_e),_e),ke,3)}function nr(_e,ke){return f(_e.getUTCMilliseconds(),ke,3)}function Ze(_e,ke){return nr(_e,ke)+"000"}function ar(_e,ke){return f(_e.getUTCMonth()+1,ke,2)}function lr(_e,ke){return f(_e.getUTCMinutes(),ke,2)}function ir(_e,ke){return f(_e.getUTCSeconds(),ke,2)}function rr(_e){var ke=_e.getUTCDay();return ke===0?7:ke}function Cr(_e,ke){return f(r.utcSunday.count(r.utcYear(_e)-1,_e),ke,2)}function yr(_e,ke){var $e=_e.getUTCDay();return _e=$e>=4||$e===0?r.utcThursday(_e):r.utcThursday.ceil(_e),f(r.utcThursday.count(r.utcYear(_e),_e)+(r.utcYear(_e).getUTCDay()===4),ke,2)}function Ae(_e){return _e.getUTCDay()}function Ve(_e,ke){return f(r.utcMonday.count(r.utcYear(_e)-1,_e),ke,2)}function je(_e,ke){return f(_e.getUTCFullYear()%100,ke,2)}function zr(_e,ke){return f(_e.getUTCFullYear()%1e4,ke,4)}function kr(){return"+0000"}function er(){return"%"}function Ke(_e){return+_e}function mr(_e){return Math.floor(+_e/1e3)}var Mr;gr({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 gr(_e){return Mr=i(_e),e.timeFormat=Mr.format,e.timeParse=Mr.parse,e.utcFormat=Mr.utcFormat,e.utcParse=Mr.utcParse,Mr}var dr="%Y-%m-%dT%H:%M:%S.%LZ";function Tr(_e){return _e.toISOString()}var Pr=Date.prototype.toISOString?Tr:e.utcFormat(dr);function Ur(_e){var ke=new Date(_e);return isNaN(ke)?null:ke}var sr=+new Date("2000-01-01T00:00:00.000Z")?Ur:e.utcParse(dr);e.isoFormat=Pr,e.isoParse=sr,e.timeFormatDefaultLocale=gr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var xy=te((rd,X_)=>{(function(e,r){typeof rd=="object"&&typeof X_!="undefined"?r(rd):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(rd,function(e){"use strict";function r(k){return Math.abs(k=Math.round(k))>=1e21?k.toLocaleString("en").replace(/,/g,""):k.toString(10)}function t(k,D){if((z=(k=D?k.toExponential(D-1):k.toExponential()).indexOf("e"))<0)return null;var z,F=k.slice(0,z);return[F.length>1?F[0]+F.slice(2):F,+k.slice(z+1)]}function n(k){return k=t(Math.abs(k)),k?k[1]:NaN}function a(k,D){return function(z,F){for(var O=z.length,G=[],B=0,X=k[0],V=0;O>0&&X>0&&(V+X+1>F&&(X=Math.max(1,F-V)),G.push(z.substring(O-=X,O+X)),!((V+=X+1)>F));)X=k[B=(B+1)%k.length];return G.reverse().join(D)}}function i(k){return function(D){return D.replace(/[0-9]/g,function(z){return k[+z]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(k){if(!(D=o.exec(k)))throw new Error("invalid format: "+k);var D;return new s({fill:D[1],align:D[2],sign:D[3],symbol:D[4],zero:D[5],width:D[6],comma:D[7],precision:D[8]&&D[8].slice(1),trim:D[9],type:D[10]})}l.prototype=s.prototype;function s(k){this.fill=k.fill===void 0?" ":k.fill+"",this.align=k.align===void 0?">":k.align+"",this.sign=k.sign===void 0?"-":k.sign+"",this.symbol=k.symbol===void 0?"":k.symbol+"",this.zero=!!k.zero,this.width=k.width===void 0?void 0:+k.width,this.comma=!!k.comma,this.precision=k.precision===void 0?void 0:+k.precision,this.trim=!!k.trim,this.type=k.type===void 0?"":k.type+""}s.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(k){e:for(var D=k.length,z=1,F=-1,O;z0&&(F=0);break}return F>0?k.slice(0,F)+k.slice(O+1):k}var f;function v(k,D){var z=t(k,D);if(!z)return k+"";var F=z[0],O=z[1],G=O-(f=Math.max(-8,Math.min(8,Math.floor(O/3)))*3)+1,B=F.length;return G===B?F:G>B?F+new Array(G-B+1).join("0"):G>0?F.slice(0,G)+"."+F.slice(G):"0."+new Array(1-G).join("0")+t(k,Math.max(0,D+G-1))[0]}function h(k,D){var z=t(k,D);if(!z)return k+"";var F=z[0],O=z[1];return O<0?"0."+new Array(-O).join("0")+F:F.length>O+1?F.slice(0,O+1)+"."+F.slice(O+1):F+new Array(O-F.length+2).join("0")}var d={"%":function(k,D){return(k*100).toFixed(D)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,D){return k.toExponential(D)},f:function(k,D){return k.toFixed(D)},g:function(k,D){return k.toPrecision(D)},o:function(k){return Math.round(k).toString(8)},p:function(k,D){return h(k*100,D)},r:h,s:v,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var g=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function x(k){var D=k.grouping===void 0||k.thousands===void 0?m:a(g.call(k.grouping,Number),k.thousands+""),z=k.currency===void 0?"":k.currency[0]+"",F=k.currency===void 0?"":k.currency[1]+"",O=k.decimal===void 0?".":k.decimal+"",G=k.numerals===void 0?m:i(g.call(k.numerals,String)),B=k.percent===void 0?"%":k.percent+"",X=k.minus===void 0?"-":k.minus+"",V=k.nan===void 0?"NaN":k.nan+"";function re(K){K=l(K);var ee=K.fill,fe=K.align,de=K.sign,qe=K.symbol,Be=K.zero,Ne=K.width,Ie=K.comma,Se=K.precision,Xe=K.trim,se=K.type;se==="n"?(Ie=!0,se="g"):d[se]||(Se===void 0&&(Se=12),Xe=!0,se="g"),(Be||ee==="0"&&fe==="=")&&(Be=!0,ee="0",fe="=");var be=qe==="$"?z:qe==="#"&&/[boxX]/.test(se)?"0"+se.toLowerCase():"",Te=qe==="$"?F:/[%p]/.test(se)?B:"",pe=d[se],W=/[defgprs%]/.test(se);Se=Se===void 0?6:/[gprs]/.test(se)?Math.max(1,Math.min(21,Se)):Math.max(0,Math.min(20,Se));function Q($){var Me=be,Fe=Te,Oe,fr,nr;if(se==="c")Fe=pe($)+Fe,$="";else{$=+$;var Ze=$<0||1/$<0;if($=isNaN($)?V:pe(Math.abs($),Se),Xe&&($=u($)),Ze&&+$==0&&de!=="+"&&(Ze=!1),Me=(Ze?de==="("?de:X:de==="-"||de==="("?"":de)+Me,Fe=(se==="s"?y[8+f/3]:"")+Fe+(Ze&&de==="("?")":""),W){for(Oe=-1,fr=$.length;++Oenr||nr>57){Fe=(nr===46?O+$.slice(Oe+1):$.slice(Oe))+Fe,$=$.slice(0,Oe);break}}}Ie&&!Be&&($=D($,1/0));var ar=Me.length+$.length+Fe.length,lr=ar>1)+Me+$+Fe+lr.slice(ar);break;default:$=lr+Me+$+Fe;break}return G($)}return Q.toString=function(){return K+""},Q}function ne(K,ee){var fe=re((K=l(K),K.type="f",K)),de=Math.max(-8,Math.min(8,Math.floor(n(ee)/3)))*3,qe=Math.pow(10,-de),Be=y[8+de/3];return function(Ne){return fe(qe*Ne)+Be}}return{format:re,formatPrefix:ne}}var M;b({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function b(k){return M=x(k),e.format=M.format,e.formatPrefix=M.formatPrefix,M}function _(k){return Math.max(0,-n(Math.abs(k)))}function A(k,D){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(D)/3)))*3-n(Math.abs(k)))}function S(k,D){return k=Math.abs(k),D=Math.abs(D)-k,Math.max(0,n(D)-n(k))+1}e.FormatSpecifier=s,e.formatDefaultLocale=b,e.formatLocale=x,e.formatSpecifier=l,e.precisionFixed=_,e.precisionPrefix=A,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})})});var J_=te((Yoe,j_)=>{"use strict";j_.exports=function(e){for(var r=e.length,t,n=0;n13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var Bt=te((Goe,$_)=>{"use strict";var ZI=J_();$_.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&ZI(t))return!1}else if(r!=="number")return!1;return e-e<1}});var En=te((Voe,K_)=>{"use strict";K_.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 wy=te((td,Q_)=>{(function(e,r){typeof td=="object"&&typeof Q_!="undefined"?r(td):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(td,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],f+=r[(l[s]&3)<<4|l[s+1]>>4],f+=r[(l[s+1]&15)<<2|l[s+2]>>6],f+=r[l[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(o){var l=o.length*.75,s=o.length,u,f=0,v,h,d,m;o[o.length-1]==="="&&(l--,o[o.length-2]==="="&&l--);var g=new ArrayBuffer(l),y=new Uint8Array(g);for(u=0;u>4,y[f++]=(h&15)<<4|d>>2,y[f++]=(d&3)<<6|m&63;return g};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})})});var Gs=te((Woe,e6)=>{"use strict";e6.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var Ji=te(fl=>{"use strict";var XI=wy().decode,jI=Gs(),My=Array.isArray,JI=ArrayBuffer,$I=DataView;function r6(e){return JI.isView(e)&&!(e instanceof $I)}fl.isTypedArray=r6;function nd(e){return My(e)||r6(e)}fl.isArrayOrTypedArray=nd;function KI(e){return!nd(e[0])}fl.isArray1D=KI;fl.ensureArray=function(e,r){return My(e)||(e=[]),e.length=r,e};var Ta={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};Ta.uint8c=Ta.u1c;Ta.uint8=Ta.u1;Ta.int8=Ta.i1;Ta.uint16=Ta.u2;Ta.int16=Ta.i2;Ta.uint32=Ta.u4;Ta.int32=Ta.i4;Ta.float32=Ta.f4;Ta.float64=Ta.f8;function Ay(e){return e.constructor===ArrayBuffer}fl.isArrayBuffer=Ay;fl.decodeTypedArraySpec=function(e){var r=[],t=QI(e),n=t.dtype,a=Ta[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=t.bdata;Ay(o)||(o=XI(o));var l=t.shape===void 0?[o.byteLength/i]:(""+t.shape).split(",");l.reverse();var s=l.length,u,f,v=+l[0],h=i*v,d=0;if(s===1)r=new a(o);else if(s===2)for(u=+l[1],f=0;f{"use strict";var n6=Bt(),ky=Ji().isArrayOrTypedArray;l6.exports=function(r,t){if(n6(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var n=t.split("."),a,i,o,l;for(l=0;l{"use strict";var y0=$v(),aH=/^\w*$/,iH=0,s6=1,ad=2,u6=3,jf=4;f6.exports=function(r,t,n,a){n=n||"name",a=a||"value";var i,o,l,s={};t&&t.length?(l=y0(r,t),o=l.get()):o=r,t=t||"";var u={};if(o)for(i=0;i2)return s[d]=s[d]|ad,v.set(h,null);if(f){for(i=d;i{"use strict";var oH=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,lH=/^[^\.\[\]]+$/;v6.exports=function(e,r){for(;r;){var t=e.match(oH);if(t)e=t[1];else if(e.match(lH))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var id=te(($oe,d6)=>{"use strict";var sH=Bt();d6.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return sH(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}});var m6=te((Koe,g6)=>{"use strict";var p6=Ji().isArrayOrTypedArray,Kv=Gs();g6.exports=function e(r,t){for(var n in t){var a=t[n],i=r[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in r)continue;r[n]=a}else if(p6(a)&&p6(i)&&Kv(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),l=0;l{"use strict";function uH(e,r){var t=e%r;return t<0?t+r:t}function fH(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}y6.exports={mod:uH,modHalf:fH}});var Jl=te((ele,od)=>{(function(e){var r=/^\s+/,t=/\s+$/,n=0,a=e.round,i=e.min,o=e.max,l=e.random;function s(W,Q){if(W=W||"",Q=Q||{},W instanceof s)return W;if(!(this instanceof s))return new s(W,Q);var $=u(W);this._originalInput=W,this._r=$.r,this._g=$.g,this._b=$.b,this._a=$.a,this._roundA=a(100*this._a)/100,this._format=Q.format||$.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=$.ok,this._tc_id=n++}s.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),Q,$,Me,Fe,Oe,fr;return Q=W.r/255,$=W.g/255,Me=W.b/255,Q<=.03928?Fe=Q/12.92:Fe=e.pow((Q+.055)/1.055,2.4),$<=.03928?Oe=$/12.92:Oe=e.pow(($+.055)/1.055,2.4),Me<=.03928?fr=Me/12.92:fr=e.pow((Me+.055)/1.055,2.4),.2126*Fe+.7152*Oe+.0722*fr},setAlpha:function(W){return this._a=K(W),this._roundA=a(100*this._a)/100,this},toHsv:function(){var W=d(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=d(this._r,this._g,this._b),Q=a(W.h*360),$=a(W.s*100),Me=a(W.v*100);return this._a==1?"hsv("+Q+", "+$+"%, "+Me+"%)":"hsva("+Q+", "+$+"%, "+Me+"%, "+this._roundA+")"},toHsl:function(){var W=v(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=v(this._r,this._g,this._b),Q=a(W.h*360),$=a(W.s*100),Me=a(W.l*100);return this._a==1?"hsl("+Q+", "+$+"%, "+Me+"%)":"hsla("+Q+", "+$+"%, "+Me+"%, "+this._roundA+")"},toHex:function(W){return g(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return y(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(ee(this._r,255)*100)+"%",g:a(ee(this._g,255)*100)+"%",b:a(ee(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+a(ee(this._r,255)*100)+"%, "+a(ee(this._g,255)*100)+"%, "+a(ee(this._b,255)*100)+"%)":"rgba("+a(ee(this._r,255)*100)+"%, "+a(ee(this._g,255)*100)+"%, "+a(ee(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:re[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var Q="#"+x(this._r,this._g,this._b,this._a),$=Q,Me=this._gradientType?"GradientType = 1, ":"";if(W){var Fe=s(W);$="#"+x(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+Me+"startColorstr="+Q+",endColorstr="+$+")"},toString:function(W){var Q=!!W;W=W||this._format;var $=!1,Me=this._a<1&&this._a>=0,Fe=!Q&&Me&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return Fe?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&($=this.toRgbString()),W==="prgb"&&($=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&($=this.toHexString()),W==="hex3"&&($=this.toHexString(!0)),W==="hex4"&&($=this.toHex8String(!0)),W==="hex8"&&($=this.toHex8String()),W==="name"&&($=this.toName()),W==="hsl"&&($=this.toHslString()),W==="hsv"&&($=this.toHsvString()),$||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(W,Q){var $=W.apply(null,[this].concat([].slice.call(Q)));return this._r=$._r,this._g=$._g,this._b=$._b,this.setAlpha($._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(M,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(D,arguments)},_applyCombination:function(W,Q){return W.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(z,arguments)},monochromatic:function(){return this._applyCombination(X,arguments)},splitcomplement:function(){return this._applyCombination(G,arguments)},triad:function(){return this._applyCombination(F,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},s.fromRatio=function(W,Q){if(typeof W=="object"){var $={};for(var Me in W)W.hasOwnProperty(Me)&&(Me==="a"?$[Me]=W[Me]:$[Me]=Ie(W[Me]));W=$}return s(W,Q)};function u(W){var Q={r:0,g:0,b:0},$=1,Me=null,Fe=null,Oe=null,fr=!1,nr=!1;return typeof W=="string"&&(W=Te(W)),typeof W=="object"&&(be(W.r)&&be(W.g)&&be(W.b)?(Q=f(W.r,W.g,W.b),fr=!0,nr=String(W.r).substr(-1)==="%"?"prgb":"rgb"):be(W.h)&&be(W.s)&&be(W.v)?(Me=Ie(W.s),Fe=Ie(W.v),Q=m(W.h,Me,Fe),fr=!0,nr="hsv"):be(W.h)&&be(W.s)&&be(W.l)&&(Me=Ie(W.s),Oe=Ie(W.l),Q=h(W.h,Me,Oe),fr=!0,nr="hsl"),W.hasOwnProperty("a")&&($=W.a)),$=K($),{ok:fr,format:W.format||nr,r:i(255,o(Q.r,0)),g:i(255,o(Q.g,0)),b:i(255,o(Q.b,0)),a:$}}function f(W,Q,$){return{r:ee(W,255)*255,g:ee(Q,255)*255,b:ee($,255)*255}}function v(W,Q,$){W=ee(W,255),Q=ee(Q,255),$=ee($,255);var Me=o(W,Q,$),Fe=i(W,Q,$),Oe,fr,nr=(Me+Fe)/2;if(Me==Fe)Oe=fr=0;else{var Ze=Me-Fe;switch(fr=nr>.5?Ze/(2-Me-Fe):Ze/(Me+Fe),Me){case W:Oe=(Q-$)/Ze+(Q<$?6:0);break;case Q:Oe=($-W)/Ze+2;break;case $:Oe=(W-Q)/Ze+4;break}Oe/=6}return{h:Oe,s:fr,l:nr}}function h(W,Q,$){var Me,Fe,Oe;W=ee(W,360),Q=ee(Q,100),$=ee($,100);function fr(ar,lr,ir){return ir<0&&(ir+=1),ir>1&&(ir-=1),ir<1/6?ar+(lr-ar)*6*ir:ir<1/2?lr:ir<2/3?ar+(lr-ar)*(2/3-ir)*6:ar}if(Q===0)Me=Fe=Oe=$;else{var nr=$<.5?$*(1+Q):$+Q-$*Q,Ze=2*$-nr;Me=fr(Ze,nr,W+1/3),Fe=fr(Ze,nr,W),Oe=fr(Ze,nr,W-1/3)}return{r:Me*255,g:Fe*255,b:Oe*255}}function d(W,Q,$){W=ee(W,255),Q=ee(Q,255),$=ee($,255);var Me=o(W,Q,$),Fe=i(W,Q,$),Oe,fr,nr=Me,Ze=Me-Fe;if(fr=Me===0?0:Ze/Me,Me==Fe)Oe=0;else{switch(Me){case W:Oe=(Q-$)/Ze+(Q<$?6:0);break;case Q:Oe=($-W)/Ze+2;break;case $:Oe=(W-Q)/Ze+4;break}Oe/=6}return{h:Oe,s:fr,v:nr}}function m(W,Q,$){W=ee(W,360)*6,Q=ee(Q,100),$=ee($,100);var Me=e.floor(W),Fe=W-Me,Oe=$*(1-Q),fr=$*(1-Fe*Q),nr=$*(1-(1-Fe)*Q),Ze=Me%6,ar=[$,fr,Oe,Oe,nr,$][Ze],lr=[nr,$,$,fr,Oe,Oe][Ze],ir=[Oe,Oe,nr,$,$,fr][Ze];return{r:ar*255,g:lr*255,b:ir*255}}function g(W,Q,$,Me){var Fe=[Ne(a(W).toString(16)),Ne(a(Q).toString(16)),Ne(a($).toString(16))];return Me&&Fe[0].charAt(0)==Fe[0].charAt(1)&&Fe[1].charAt(0)==Fe[1].charAt(1)&&Fe[2].charAt(0)==Fe[2].charAt(1)?Fe[0].charAt(0)+Fe[1].charAt(0)+Fe[2].charAt(0):Fe.join("")}function y(W,Q,$,Me,Fe){var Oe=[Ne(a(W).toString(16)),Ne(a(Q).toString(16)),Ne(a($).toString(16)),Ne(Se(Me))];return Fe&&Oe[0].charAt(0)==Oe[0].charAt(1)&&Oe[1].charAt(0)==Oe[1].charAt(1)&&Oe[2].charAt(0)==Oe[2].charAt(1)&&Oe[3].charAt(0)==Oe[3].charAt(1)?Oe[0].charAt(0)+Oe[1].charAt(0)+Oe[2].charAt(0)+Oe[3].charAt(0):Oe.join("")}function x(W,Q,$,Me){var Fe=[Ne(Se(Me)),Ne(a(W).toString(16)),Ne(a(Q).toString(16)),Ne(a($).toString(16))];return Fe.join("")}s.equals=function(W,Q){return!W||!Q?!1:s(W).toRgbString()==s(Q).toRgbString()},s.random=function(){return s.fromRatio({r:l(),g:l(),b:l()})};function M(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.s-=Q/100,$.s=fe($.s),s($)}function b(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.s+=Q/100,$.s=fe($.s),s($)}function _(W){return s(W).desaturate(100)}function A(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.l+=Q/100,$.l=fe($.l),s($)}function S(W,Q){Q=Q===0?0:Q||10;var $=s(W).toRgb();return $.r=o(0,i(255,$.r-a(255*-(Q/100)))),$.g=o(0,i(255,$.g-a(255*-(Q/100)))),$.b=o(0,i(255,$.b-a(255*-(Q/100)))),s($)}function k(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.l-=Q/100,$.l=fe($.l),s($)}function D(W,Q){var $=s(W).toHsl(),Me=($.h+Q)%360;return $.h=Me<0?360+Me:Me,s($)}function z(W){var Q=s(W).toHsl();return Q.h=(Q.h+180)%360,s(Q)}function F(W){var Q=s(W).toHsl(),$=Q.h;return[s(W),s({h:($+120)%360,s:Q.s,l:Q.l}),s({h:($+240)%360,s:Q.s,l:Q.l})]}function O(W){var Q=s(W).toHsl(),$=Q.h;return[s(W),s({h:($+90)%360,s:Q.s,l:Q.l}),s({h:($+180)%360,s:Q.s,l:Q.l}),s({h:($+270)%360,s:Q.s,l:Q.l})]}function G(W){var Q=s(W).toHsl(),$=Q.h;return[s(W),s({h:($+72)%360,s:Q.s,l:Q.l}),s({h:($+216)%360,s:Q.s,l:Q.l})]}function B(W,Q,$){Q=Q||6,$=$||30;var Me=s(W).toHsl(),Fe=360/$,Oe=[s(W)];for(Me.h=(Me.h-(Fe*Q>>1)+720)%360;--Q;)Me.h=(Me.h+Fe)%360,Oe.push(s(Me));return Oe}function X(W,Q){Q=Q||6;for(var $=s(W).toHsv(),Me=$.h,Fe=$.s,Oe=$.v,fr=[],nr=1/Q;Q--;)fr.push(s({h:Me,s:Fe,v:Oe})),Oe=(Oe+nr)%1;return fr}s.mix=function(W,Q,$){$=$===0?0:$||50;var Me=s(W).toRgb(),Fe=s(Q).toRgb(),Oe=$/100,fr={r:(Fe.r-Me.r)*Oe+Me.r,g:(Fe.g-Me.g)*Oe+Me.g,b:(Fe.b-Me.b)*Oe+Me.b,a:(Fe.a-Me.a)*Oe+Me.a};return s(fr)},s.readability=function(W,Q){var $=s(W),Me=s(Q);return(e.max($.getLuminance(),Me.getLuminance())+.05)/(e.min($.getLuminance(),Me.getLuminance())+.05)},s.isReadable=function(W,Q,$){var Me=s.readability(W,Q),Fe,Oe;switch(Oe=!1,Fe=pe($),Fe.level+Fe.size){case"AAsmall":case"AAAlarge":Oe=Me>=4.5;break;case"AAlarge":Oe=Me>=3;break;case"AAAsmall":Oe=Me>=7;break}return Oe},s.mostReadable=function(W,Q,$){var Me=null,Fe=0,Oe,fr,nr,Ze;$=$||{},fr=$.includeFallbackColors,nr=$.level,Ze=$.size;for(var ar=0;arFe&&(Fe=Oe,Me=s(Q[ar]));return s.isReadable(W,Me,{level:nr,size:Ze})||!fr?Me:($.includeFallbackColors=!1,s.mostReadable(W,["#fff","#000"],$))};var V=s.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"},re=s.hexNames=ne(V);function ne(W){var Q={};for(var $ in W)W.hasOwnProperty($)&&(Q[W[$]]=$);return Q}function K(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function ee(W,Q){qe(W)&&(W="100%");var $=Be(W);return W=i(Q,o(0,parseFloat(W))),$&&(W=parseInt(W*Q,10)/100),e.abs(W-Q)<1e-6?1:W%Q/parseFloat(Q)}function fe(W){return i(1,o(0,W))}function de(W){return parseInt(W,16)}function qe(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function Be(W){return typeof W=="string"&&W.indexOf("%")!=-1}function Ne(W){return W.length==1?"0"+W:""+W}function Ie(W){return W<=1&&(W=W*100+"%"),W}function Se(W){return e.round(parseFloat(W)*255).toString(16)}function Xe(W){return de(W)/255}var se=function(){var W="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",$="(?:"+Q+")|(?:"+W+")",Me="[\\s|\\(]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")\\s*\\)?",Fe="[\\s|\\(]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")\\s*\\)?";return{CSS_UNIT:new RegExp($),rgb:new RegExp("rgb"+Me),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+Me),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+Me),hsva:new RegExp("hsva"+Fe),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 be(W){return!!se.CSS_UNIT.exec(W)}function Te(W){W=W.replace(r,"").replace(t,"").toLowerCase();var Q=!1;if(V[W])W=V[W],Q=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var $;return($=se.rgb.exec(W))?{r:$[1],g:$[2],b:$[3]}:($=se.rgba.exec(W))?{r:$[1],g:$[2],b:$[3],a:$[4]}:($=se.hsl.exec(W))?{h:$[1],s:$[2],l:$[3]}:($=se.hsla.exec(W))?{h:$[1],s:$[2],l:$[3],a:$[4]}:($=se.hsv.exec(W))?{h:$[1],s:$[2],v:$[3]}:($=se.hsva.exec(W))?{h:$[1],s:$[2],v:$[3],a:$[4]}:($=se.hex8.exec(W))?{r:de($[1]),g:de($[2]),b:de($[3]),a:Xe($[4]),format:Q?"name":"hex8"}:($=se.hex6.exec(W))?{r:de($[1]),g:de($[2]),b:de($[3]),format:Q?"name":"hex"}:($=se.hex4.exec(W))?{r:de($[1]+""+$[1]),g:de($[2]+""+$[2]),b:de($[3]+""+$[3]),a:Xe($[4]+""+$[4]),format:Q?"name":"hex8"}:($=se.hex3.exec(W))?{r:de($[1]+""+$[1]),g:de($[2]+""+$[2]),b:de($[3]+""+$[3]),format:Q?"name":"hex"}:!1}function pe(W){var Q,$;return W=W||{level:"AA",size:"small"},Q=(W.level||"AA").toUpperCase(),$=(W.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),$!=="small"&&$!=="large"&&($="small"),{level:Q,size:$}}typeof od!="undefined"&&od.exports?od.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var la=te(r1=>{"use strict";var b6=Gs(),Qv=Array.isArray;function cH(e,r){var t,n;for(t=0;t{"use strict";_6.exports=function(e){var r=e.variantValues,t=e.editType,n=e.colorEditType;n===void 0&&(n=t);var a={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:n},weight:a,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var t1=te((nle,x6)=>{"use strict";x6.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var _0=te((ale,A6)=>{"use strict";var w6=t1(),M6=$a(),Sy=M6({editType:"none"});Sy.family.dflt=w6.HOVERFONT;Sy.size.dflt=w6.HOVERFONTSIZE;A6.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:Sy,grouptitlefont:M6({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var ud=te((ile,T6)=>{"use strict";var vH=$a(),ld=_0().hoverlabel,sd=la().extendFlat;T6.exports={hoverlabel:{bgcolor:sd({},ld.bgcolor,{arrayOk:!0}),bordercolor:sd({},ld.bordercolor,{arrayOk:!0}),font:vH({arrayOk:!0,editType:"none"}),align:sd({},ld.align,{arrayOk:!0}),namelength:sd({},ld.namelength,{arrayOk:!0}),editType:"none"}}});var bo=te((ole,k6)=>{"use strict";var hH=$a(),dH=ud();k6.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:hH({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:dH.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 Jf=te((lle,L6)=>{"use strict";var pH=Jl(),fd={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)"]]},S6=fd.RdBu;function gH(e,r){if(r||(r=S6),!e)return r;function t(){try{e=fd[e]||JSON.parse(e)}catch(n){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),C6(e)?e:r}function C6(e){var r=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 t=0;t{"use strict";$f.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];$f.defaultLine="#444";$f.lightLine="#eee";$f.background="#fff";$f.borderLine="#BEC8D9";$f.lightFraction=100*10/11});var zt=te((ule,q6)=>{"use strict";var Li=Jl(),yH=Bt(),bH=Ji().isTypedArray,ma=q6.exports={},cd=cl();ma.defaults=cd.defaults;var _H=ma.defaultLine=cd.defaultLine;ma.lightLine=cd.lightLine;var Ly=ma.background=cd.background;ma.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};ma.rgb=function(e){return ma.tinyRGB(Li(e))};ma.opacity=function(e){return e?Li(e).getAlpha():0};ma.addOpacity=function(e,r){var t=Li(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};ma.combine=function(e,r){var t=Li(e).toRgb();if(t.a===1)return Li(e).toRgbString();var n=Li(r||Ly).toRgb(),a=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},i={r:a.r*(1-t.a)+t.r*t.a,g:a.g*(1-t.a)+t.g*t.a,b:a.b*(1-t.a)+t.b*t.a};return Li(i).toRgbString()};ma.interpolate=function(e,r,t){var n=Li(e).toRgb(),a=Li(r).toRgb(),i={r:t*n.r+(1-t)*a.r,g:t*n.g+(1-t)*a.g,b:t*n.b+(1-t)*a.b};return Li(i).toRgbString()};ma.contrast=function(e,r,t){var n=Li(e);n.getAlpha()!==1&&(n=Li(ma.combine(e,Ly)));var a=n.isDark()?r?n.lighten(r):Ly:t?n.darken(t):_H;return a.toString()};ma.stroke=function(e,r){var t=Li(r);e.style({stroke:ma.tinyRGB(t),"stroke-opacity":t.getAlpha()})};ma.fill=function(e,r){var t=Li(r);e.style({fill:ma.tinyRGB(t),"fill-opacity":t.getAlpha()})};ma.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,n,a,i;for(t=0;t=0)))return e;if(i===3)n[i]>1&&(n[i]=1);else if(n[i]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return a?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var vd=te((fle,D6)=>{"use strict";D6.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var x0=te(E6=>{"use strict";E6.counter=function(e,r,t,n){var a=(r||"")+(t?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+a)}});var N6=te(qi=>{"use strict";var qy=Bt(),P6=Jl(),R6=la().extendFlat,xH=bo(),wH=Jf(),MH=zt(),AH=vd().DESELECTDIM,w0=$v(),z6=x0().counter,TH=b0().modHalf,$l=Ji().isArrayOrTypedArray,Du=Ji().isTypedArraySpec,Eu=Ji().decodeTypedArraySpec;qi.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set($l(e)?e:Du(e)?Eu(e):t)}},enumerated:{coerceFunction:function(e,r,t,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,n=0;nn.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}Du(e)&&(e=Eu(e)),e%1||!qy(e)||n.min!==void 0&&en.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?r.set(t):r.set(String(e))}else n.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Du(e)&&(e=Eu(e)),P6(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function n(a){return P6(a).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(n)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(wH.get(e,t))}},angle:{coerceFunction:function(e,r,t){Du(e)&&(e=Eu(e)),e==="auto"?r.set("auto"):qy(e)?r.set(TH(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,n){var a=n.regex||z6(t);if(typeof e=="string"&&a.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!z6(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var a=e.split("+"),i=0;i{"use strict";var F6={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/"},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:{}}},I6={};function H6(e,r){for(var t in e){var n=e[t];n.valType?r[t]=n.dflt:(r[t]||(r[t]={}),H6(n,r[t]))}}H6(F6,I6);B6.exports={configAttributes:F6,dfltConfig:I6}});var Ey=te((dle,O6)=>{"use strict";var Dy=kt(),kH=Bt(),n1=[];O6.exports=function(e,r){if(n1.indexOf(e)!==-1)return;n1.push(e);var t=1e3;kH(r)?t=r:r==="long"&&(t=3e3);var n=Dy.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(n1);function i(o){o.duration(700).style("opacity",0).each("end",function(l){var s=n1.indexOf(l);s!==-1&&n1.splice(s,1),Dy.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Dy.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(i)});for(var s=l.append("p"),u=o.split(//g),f=0;f{"use strict";var M0=Kf().dfltConfig,Py=Ey(),Ry=U6.exports={};Ry.log=function(){var e;if(M0.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};Ry.warn=function(){var e;if(M0.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};Ry.error=function(){var e;if(M0.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var dd=te((gle,Y6)=>{"use strict";Y6.exports=function(){}});var zy=te((mle,G6)=>{"use strict";G6.exports=function(r,t){if(t instanceof RegExp){for(var n=t.toString(),a=0;a{V6.exports=SH;function SH(){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 X6=te((ble,Z6)=>{Z6.exports=CH;function CH(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var J6=te((_le,j6)=>{j6.exports=LH;function LH(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var Ny=te((xle,$6)=>{$6.exports=qH;function qH(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 Q6=te((wle,K6)=>{K6.exports=DH;function DH(e,r){if(e===r){var t=r[1],n=r[2],a=r[3],i=r[6],o=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=n,e[9]=i,e[11]=r[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var rx=te((Mle,ex)=>{ex.exports=EH;function EH(e,r){var t=r[0],n=r[1],a=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],x=r[15],M=t*l-n*o,b=t*s-a*o,_=t*u-i*o,A=n*s-a*l,S=n*u-i*l,k=a*u-i*s,D=f*g-v*m,z=f*y-h*m,F=f*x-d*m,O=v*y-h*g,G=v*x-d*g,B=h*x-d*y,X=M*B-b*G+_*O+A*F-S*z+k*D;return X?(X=1/X,e[0]=(l*B-s*G+u*O)*X,e[1]=(a*G-n*B-i*O)*X,e[2]=(g*k-y*S+x*A)*X,e[3]=(h*S-v*k-d*A)*X,e[4]=(s*F-o*B-u*z)*X,e[5]=(t*B-a*F+i*z)*X,e[6]=(y*_-m*k-x*b)*X,e[7]=(f*k-h*_+d*b)*X,e[8]=(o*G-l*F+u*D)*X,e[9]=(n*F-t*G-i*D)*X,e[10]=(m*S-g*_+x*M)*X,e[11]=(v*_-f*S-d*M)*X,e[12]=(l*z-o*O-s*D)*X,e[13]=(t*O-n*z+a*D)*X,e[14]=(g*b-m*A-y*M)*X,e[15]=(f*A-v*b+h*M)*X,e):null}});var nx=te((Ale,tx)=>{tx.exports=PH;function PH(e,r){var t=r[0],n=r[1],a=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],x=r[15];return e[0]=l*(h*x-d*y)-v*(s*x-u*y)+g*(s*d-u*h),e[1]=-(n*(h*x-d*y)-v*(a*x-i*y)+g*(a*d-i*h)),e[2]=n*(s*x-u*y)-l*(a*x-i*y)+g*(a*u-i*s),e[3]=-(n*(s*d-u*h)-l*(a*d-i*h)+v*(a*u-i*s)),e[4]=-(o*(h*x-d*y)-f*(s*x-u*y)+m*(s*d-u*h)),e[5]=t*(h*x-d*y)-f*(a*x-i*y)+m*(a*d-i*h),e[6]=-(t*(s*x-u*y)-o*(a*x-i*y)+m*(a*u-i*s)),e[7]=t*(s*d-u*h)-o*(a*d-i*h)+f*(a*u-i*s),e[8]=o*(v*x-d*g)-f*(l*x-u*g)+m*(l*d-u*v),e[9]=-(t*(v*x-d*g)-f*(n*x-i*g)+m*(n*d-i*v)),e[10]=t*(l*x-u*g)-o*(n*x-i*g)+m*(n*u-i*l),e[11]=-(t*(l*d-u*v)-o*(n*d-i*v)+f*(n*u-i*l)),e[12]=-(o*(v*y-h*g)-f*(l*y-s*g)+m*(l*h-s*v)),e[13]=t*(v*y-h*g)-f*(n*y-a*g)+m*(n*h-a*v),e[14]=-(t*(l*y-s*g)-o*(n*y-a*g)+m*(n*s-a*l)),e[15]=t*(l*h-s*v)-o*(n*h-a*v)+f*(n*s-a*l),e}});var ix=te((Tle,ax)=>{ax.exports=RH;function RH(e){var r=e[0],t=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],f=e[9],v=e[10],h=e[11],d=e[12],m=e[13],g=e[14],y=e[15],x=r*o-t*i,M=r*l-n*i,b=r*s-a*i,_=t*l-n*o,A=t*s-a*o,S=n*s-a*l,k=u*m-f*d,D=u*g-v*d,z=u*y-h*d,F=f*g-v*m,O=f*y-h*m,G=v*y-h*g;return x*G-M*O+b*F+_*z-A*D+S*k}});var lx=te((kle,ox)=>{ox.exports=zH;function zH(e,r,t){var n=r[0],a=r[1],i=r[2],o=r[3],l=r[4],s=r[5],u=r[6],f=r[7],v=r[8],h=r[9],d=r[10],m=r[11],g=r[12],y=r[13],x=r[14],M=r[15],b=t[0],_=t[1],A=t[2],S=t[3];return e[0]=b*n+_*l+A*v+S*g,e[1]=b*a+_*s+A*h+S*y,e[2]=b*i+_*u+A*d+S*x,e[3]=b*o+_*f+A*m+S*M,b=t[4],_=t[5],A=t[6],S=t[7],e[4]=b*n+_*l+A*v+S*g,e[5]=b*a+_*s+A*h+S*y,e[6]=b*i+_*u+A*d+S*x,e[7]=b*o+_*f+A*m+S*M,b=t[8],_=t[9],A=t[10],S=t[11],e[8]=b*n+_*l+A*v+S*g,e[9]=b*a+_*s+A*h+S*y,e[10]=b*i+_*u+A*d+S*x,e[11]=b*o+_*f+A*m+S*M,b=t[12],_=t[13],A=t[14],S=t[15],e[12]=b*n+_*l+A*v+S*g,e[13]=b*a+_*s+A*h+S*y,e[14]=b*i+_*u+A*d+S*x,e[15]=b*o+_*f+A*m+S*M,e}});var ux=te((Sle,sx)=>{sx.exports=NH;function NH(e,r,t){var n=t[0],a=t[1],i=t[2],o,l,s,u,f,v,h,d,m,g,y,x;return r===e?(e[12]=r[0]*n+r[4]*a+r[8]*i+r[12],e[13]=r[1]*n+r[5]*a+r[9]*i+r[13],e[14]=r[2]*n+r[6]*a+r[10]*i+r[14],e[15]=r[3]*n+r[7]*a+r[11]*i+r[15]):(o=r[0],l=r[1],s=r[2],u=r[3],f=r[4],v=r[5],h=r[6],d=r[7],m=r[8],g=r[9],y=r[10],x=r[11],e[0]=o,e[1]=l,e[2]=s,e[3]=u,e[4]=f,e[5]=v,e[6]=h,e[7]=d,e[8]=m,e[9]=g,e[10]=y,e[11]=x,e[12]=o*n+f*a+m*i+r[12],e[13]=l*n+v*a+g*i+r[13],e[14]=s*n+h*a+y*i+r[14],e[15]=u*n+d*a+x*i+r[15]),e}});var cx=te((Cle,fx)=>{fx.exports=FH;function FH(e,r,t){var n=t[0],a=t[1],i=t[2];return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[3]=r[3]*n,e[4]=r[4]*a,e[5]=r[5]*a,e[6]=r[6]*a,e[7]=r[7]*a,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var hx=te((Lle,vx)=>{vx.exports=IH;function IH(e,r,t,n){var a=n[0],i=n[1],o=n[2],l=Math.sqrt(a*a+i*i+o*o),s,u,f,v,h,d,m,g,y,x,M,b,_,A,S,k,D,z,F,O,G,B,X,V;return Math.abs(l)<1e-6?null:(l=1/l,a*=l,i*=l,o*=l,s=Math.sin(t),u=Math.cos(t),f=1-u,v=r[0],h=r[1],d=r[2],m=r[3],g=r[4],y=r[5],x=r[6],M=r[7],b=r[8],_=r[9],A=r[10],S=r[11],k=a*a*f+u,D=i*a*f+o*s,z=o*a*f-i*s,F=a*i*f-o*s,O=i*i*f+u,G=o*i*f+a*s,B=a*o*f+i*s,X=i*o*f-a*s,V=o*o*f+u,e[0]=v*k+g*D+b*z,e[1]=h*k+y*D+_*z,e[2]=d*k+x*D+A*z,e[3]=m*k+M*D+S*z,e[4]=v*F+g*O+b*G,e[5]=h*F+y*O+_*G,e[6]=d*F+x*O+A*G,e[7]=m*F+M*O+S*G,e[8]=v*B+g*X+b*V,e[9]=h*B+y*X+_*V,e[10]=d*B+x*X+A*V,e[11]=m*B+M*X+S*V,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var px=te((qle,dx)=>{dx.exports=HH;function HH(e,r,t){var n=Math.sin(t),a=Math.cos(t),i=r[4],o=r[5],l=r[6],s=r[7],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*a+u*n,e[5]=o*a+f*n,e[6]=l*a+v*n,e[7]=s*a+h*n,e[8]=u*a-i*n,e[9]=f*a-o*n,e[10]=v*a-l*n,e[11]=h*a-s*n,e}});var mx=te((Dle,gx)=>{gx.exports=BH;function BH(e,r,t){var n=Math.sin(t),a=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*a-u*n,e[1]=o*a-f*n,e[2]=l*a-v*n,e[3]=s*a-h*n,e[8]=i*n+u*a,e[9]=o*n+f*a,e[10]=l*n+v*a,e[11]=s*n+h*a,e}});var bx=te((Ele,yx)=>{yx.exports=OH;function OH(e,r,t){var n=Math.sin(t),a=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[4],f=r[5],v=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*a+u*n,e[1]=o*a+f*n,e[2]=l*a+v*n,e[3]=s*a+h*n,e[4]=u*a-i*n,e[5]=f*a-o*n,e[6]=v*a-l*n,e[7]=h*a-s*n,e}});var xx=te((Ple,_x)=>{_x.exports=UH;function UH(e,r,t){var n,a,i,o=t[0],l=t[1],s=t[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,l*=u,s*=u,n=Math.sin(r),a=Math.cos(r),i=1-a,e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Mx=te((Rle,wx)=>{wx.exports=YH;function YH(e,r,t){var n=r[0],a=r[1],i=r[2],o=r[3],l=n+n,s=a+a,u=i+i,f=n*l,v=n*s,h=n*u,d=a*s,m=a*u,g=i*u,y=o*l,x=o*s,M=o*u;return e[0]=1-(d+g),e[1]=v+M,e[2]=h-x,e[3]=0,e[4]=v-M,e[5]=1-(f+g),e[6]=m+y,e[7]=0,e[8]=h+x,e[9]=m-y,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Tx=te((zle,Ax)=>{Ax.exports=GH;function GH(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Sx=te((Nle,kx)=>{kx.exports=VH;function VH(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Lx=te((Fle,Cx)=>{Cx.exports=WH;function WH(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Dx=te((Ile,qx)=>{qx.exports=ZH;function ZH(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Px=te((Hle,Ex)=>{Ex.exports=XH;function XH(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,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 Fy=te((Ble,Rx)=>{Rx.exports=jH;function jH(e,r){var t=r[0],n=r[1],a=r[2],i=r[3],o=t+t,l=n+n,s=a+a,u=t*o,f=n*o,v=n*l,h=a*o,d=a*l,m=a*s,g=i*o,y=i*l,x=i*s;return e[0]=1-v-m,e[1]=f+x,e[2]=h-y,e[3]=0,e[4]=f-x,e[5]=1-u-m,e[6]=d+g,e[7]=0,e[8]=h+y,e[9]=d-g,e[10]=1-u-v,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Nx=te((Ole,zx)=>{zx.exports=JH;function JH(e,r,t,n,a,i,o){var l=1/(t-r),s=1/(a-n),u=1/(i-o);return e[0]=i*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(a+n)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var Ix=te((Ule,Fx)=>{Fx.exports=$H;function $H(e,r,t,n,a){var i=1/Math.tan(r/2),o=1/(n-a);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var Bx=te((Yle,Hx)=>{Hx.exports=KH;function KH(e,r,t,n){var a=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),o=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-l)*s*.5),e[9]=(a-i)*u*.5,e[10]=n/(t-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*t/(t-n),e[15]=0,e}});var Ux=te((Gle,Ox)=>{Ox.exports=QH;function QH(e,r,t,n,a,i,o){var l=1/(r-t),s=1/(n-a),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(a+n)*s,e[14]=(o+i)*u,e[15]=1,e}});var Gx=te((Vle,Yx)=>{var eB=Ny();Yx.exports=rB;function rB(e,r,t,n){var a,i,o,l,s,u,f,v,h,d,m=r[0],g=r[1],y=r[2],x=n[0],M=n[1],b=n[2],_=t[0],A=t[1],S=t[2];return Math.abs(m-_)<1e-6&&Math.abs(g-A)<1e-6&&Math.abs(y-S)<1e-6?eB(e):(f=m-_,v=g-A,h=y-S,d=1/Math.sqrt(f*f+v*v+h*h),f*=d,v*=d,h*=d,a=M*h-b*v,i=b*f-x*h,o=x*v-M*f,d=Math.sqrt(a*a+i*i+o*o),d?(d=1/d,a*=d,i*=d,o*=d):(a=0,i=0,o=0),l=v*o-h*i,s=h*a-f*o,u=f*i-v*a,d=Math.sqrt(l*l+s*s+u*u),d?(d=1/d,l*=d,s*=d,u*=d):(l=0,s=0,u=0),e[0]=a,e[1]=l,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=v,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(a*m+i*g+o*y),e[13]=-(l*m+s*g+u*y),e[14]=-(f*m+v*g+h*y),e[15]=1,e)}});var Wx=te((Wle,Vx)=>{Vx.exports=tB;function tB(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 Iy=te((Zle,Zx)=>{Zx.exports={create:W6(),clone:X6(),copy:J6(),identity:Ny(),transpose:Q6(),invert:rx(),adjoint:nx(),determinant:ix(),multiply:lx(),translate:ux(),scale:cx(),rotate:hx(),rotateX:px(),rotateY:mx(),rotateZ:bx(),fromRotation:xx(),fromRotationTranslation:Mx(),fromScaling:Tx(),fromTranslation:Sx(),fromXRotation:Lx(),fromYRotation:Dx(),fromZRotation:Px(),fromQuat:Fy(),frustum:Nx(),perspective:Ix(),perspectiveFromFieldOfView:Bx(),ortho:Ux(),lookAt:Gx(),str:Wx()}});var pd=te(Xn=>{"use strict";var nB=Iy();Xn.init2dArray=function(e,r){for(var t=new Array(e),n=0;n{"use strict";var aB=kt(),Xx=Pu(),iB=pd(),oB=Iy();function lB(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function sB(e){var r=aB.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function jx(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function uB(e,r){Jx("global",e,r)}function Jx(e,r,t){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):Xx.warn("addStyleRule failed"):Xx.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function fB(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&jx(t)}function cB(e,r,t,n,a){var i=n.split(":"),o=a.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(l)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[o[0]]=o[1])}),s.setAttribute(l,!0))})}function vB(e){var r=Kx(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(n){var a=$x(n);if(a){var i=iB.convertCssMatrix(a);t=oB.multiply(t,t,i)}}),t}function $x(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function Kx(e){for(var r=[];hB(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function hB(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function dB(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}Qx.exports={getGraphDiv:lB,isPlotDiv:sB,removeElement:jx,addStyleRule:uB,addRelatedStyleRule:Jx,deleteRelatedStyleRule:fB,setStyleOnHover:cB,getFullTransformMatrix:vB,getElementTransformMatrix:$x,getElementAndAncestors:Kx,equalDomRects:dB}});var i1=te((Jle,e7)=>{"use strict";e7.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 _o=te(($le,l7)=>{"use strict";var t7=la().extendFlat,pB=Gs(),n7={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},a7={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},gB=n7.flags.slice().concat(["fullReplot"]),mB=a7.flags.slice().concat("layoutReplot");l7.exports={traces:n7,layout:a7,traceFlags:function(){return r7(gB)},layoutFlags:function(){return r7(mB)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var n=t.split("+"),a=0;a{"use strict";Hy.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Hy.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 By=te((Qle,s7)=>{"use strict";s7.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 Ru=te(gd=>{"use strict";var u7=By(),ese=u7.FORMAT_LINK,rse=u7.DATE_FORMAT_LINK;function Oy(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var n=[],a=0;a{"use strict";function zu(e,r){return r?r.d2l(e):e}function f7(e,r){return r?r.l2d(e):e}function yB(e){return e.x0}function bB(e){return e.x1}function _B(e){return e.y0}function xB(e){return e.y1}function c7(e){return e.x0shift||0}function v7(e){return e.x1shift||0}function h7(e){return e.y0shift||0}function d7(e){return e.y1shift||0}function md(e,r){return zu(e.x1,r)+v7(e)-zu(e.x0,r)-c7(e)}function yd(e,r,t){return zu(e.y1,t)+d7(e)-zu(e.y0,t)-h7(e)}function wB(e,r){return Math.abs(md(e,r))}function MB(e,r,t){return Math.abs(yd(e,r,t))}function AB(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(md(e,r),2)+Math.pow(yd(e,r,t),2))}function TB(e,r){return f7((zu(e.x1,r)+v7(e)+zu(e.x0,r)+c7(e))/2,r)}function kB(e,r,t){return f7((zu(e.y1,t)+d7(e)+zu(e.y0,t)+h7(e))/2,t)}function SB(e,r,t){return e.type!=="line"?void 0:yd(e,r,t)/md(e,r)}p7.exports={x0:yB,x1:bB,y0:_B,y1:xB,slope:SB,dx:md,dy:yd,width:wB,height:MB,length:AB,xcenter:TB,ycenter:kB}});var y7=te((ase,m7)=>{"use strict";var CB=_o().overrideAll,Qf=bo(),g7=$a(),LB=Kl().dash,Nu=la().extendFlat,qB=Ru().shapeTexttemplateAttrs,DB=bd();m7.exports=CB({newshape:{visible:Nu({},Qf.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Nu({},Qf.legend,{}),legendgroup:Nu({},Qf.legendgroup,{}),legendgrouptitle:{text:Nu({},Qf.legendgrouptitle.text,{}),font:g7({})},legendrank:Nu({},Qf.legendrank,{}),legendwidth:Nu({},Qf.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Nu({},LB,{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:Nu({},Qf.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:qB({newshape:!0},{keys:Object.keys(DB)}),font:g7({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var _7=te((ise,b7)=>{"use strict";var EB=Kl().dash,PB=la().extendFlat;b7.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:PB({},EB,{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 _d=te((ose,x7)=>{"use strict";x7.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var A0=te((lse,T7)=>{"use strict";var Uy=$a(),RB=i1(),xd=cl(),w7=y7(),M7=_7(),zB=_d(),A7=la().extendFlat,wd=Uy({editType:"calc"});wd.family.dflt='"Open Sans", verdana, arial, sans-serif';wd.size.dflt=12;wd.color.dflt=xd.defaultLine;T7.exports={font:wd,title:{text:{valType:"string",editType:"layoutstyle"},font:Uy({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Uy({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:A7(zB({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:xd.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:xd.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:xd.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:w7.newshape,activeshape:w7.activeshape,newselection:M7.newselection,activeselection:M7.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:A7({},RB.transition,{editType:"none"})}});var k7=U_(()=>{});var NB={};var S7=U_(()=>{k7()});var dt=te(Dt=>{"use strict";var T0=Pu(),C7=dd(),L7=zy(),FB=Gs(),IB=a1().addStyleRule,q7=la(),HB=bo(),BB=A0(),OB=q7.extendFlat,Yy=q7.extendDeepAll;Dt.modules={};Dt.allCategories={};Dt.allTypes=[];Dt.subplotsRegistry={};Dt.componentsRegistry={};Dt.layoutArrayContainers=[];Dt.layoutArrayRegexes=[];Dt.traceLayoutAttributes={};Dt.localeRegistry={};Dt.apiMethodRegistry={};Dt.collectableSubplotTypes=null;Dt.register=function(r){if(Dt.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var ZB=m0().timeFormat,O7=Bt(),Gy=Pu(),Iu=b0().mod,C0=En(),xo=C0.BADNUM,Di=C0.ONEDAY,o1=C0.ONEHOUR,Fu=C0.ONEMIN,S0=C0.ONESEC,l1=C0.EPOCHJD,Vs=dt(),z7=m0().utcFormat,XB=/^\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,jB=/^\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,N7=new Date().getFullYear()-70;function Ws(e){return e&&Vs.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}jn.dateTick0=function(e,r){var t=JB(e,!!r);if(r<2)return t;var n=jn.dateTime2ms(t,e);return n+=Di*(r-1),jn.ms2DateTime(n,0,e)};function JB(e,r){return Ws(e)?r?Vs.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Vs.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}jn.dfltRange=function(e){return Ws(e)?Vs.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};jn.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Ad,Td;jn.dateTime2ms=function(e,r){if(jn.isJSDate(e)){var t=e.getTimezoneOffset()*Fu,n=(e.getUTCMinutes()-e.getMinutes())*Fu+(e.getUTCSeconds()-e.getSeconds())*S0+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*Fu;t=t-a/2+Iu(n-t+a/2,a)}return e=Number(e)-t,e>=Ad&&e<=Td?e:xo}if(typeof e!="string"&&typeof e!="number")return xo;e=String(e);var i=Ws(r),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.substr(1),r="");var l=i&&r.substr(0,7)==="chinese",s=e.match(l?jB:XB);if(!s)return xo;var u=s[1],f=s[3]||"1",v=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),m=Number(s[11]||0);if(i){if(u.length===2)return xo;u=Number(u);var g;try{var y=Vs.getComponentMethod("calendars","getCal")(r);if(l){var x=f.charAt(f.length-1)==="i";f=parseInt(f,10),g=y.newDate(u,y.toMonthIndex(u,f,x),v)}else g=y.newDate(u,Number(f),v)}catch(b){return xo}return g?(g.toJD()-l1)*Di+h*o1+d*Fu+m*S0:xo}u.length===2?u=(Number(u)+2e3-N7)%100+N7:u=Number(u),f-=1;var M=new Date(Date.UTC(2e3,f,v,h,d));return M.setUTCFullYear(u),M.getUTCMonth()!==f||M.getUTCDate()!==v?xo:M.getTime()+m*S0};Ad=jn.MIN_MS=jn.dateTime2ms("-9999");Td=jn.MAX_MS=jn.dateTime2ms("9999-12-31 23:59:59.9999");jn.isDateTime=function(e,r){return jn.dateTime2ms(e,r)!==xo};function k0(e,r){return String(e+Math.pow(10,r)).substr(1)}var Md=90*Di,F7=3*o1,I7=5*Fu;jn.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Ad&&e<=Td))return xo;r||(r=0);var n=Math.floor(Iu(e+.05,1)*10),a=Math.round(e-n/10),i,o,l,s,u,f;if(Ws(t)){var v=Math.floor(a/Di)+l1,h=Math.floor(Iu(e,Di));try{i=Vs.getComponentMethod("calendars","getCal")(t).fromJD(v).formatDate("yyyy-mm-dd")}catch(d){i=z7("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=r=Ad+Di&&e<=Td-Di))return xo;var r=Math.floor(Iu(e+.05,1)*10),t=new Date(Math.round(e-r/10)),n=ZB("%Y-%m-%d")(t),a=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return U7(n,a,i,o,l)};function U7(e,r,t,n,a){if((r||t||n||a)&&(e+=" "+k0(r,2)+":"+k0(t,2),(n||a)&&(e+=":"+k0(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+k0(a,i)}return e}jn.cleanDate=function(e,r,t){if(e===xo)return r;if(jn.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Ws(t))return Gy.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=jn.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!jn.isDateTime(e,t))return Gy.error("unrecognized date",e),r;return e};var $B=/%\d?f/g,KB=/%h/g,QB={1:"1",2:"1",3:"2",4:"2"};function H7(e,r,t,n){e=e.replace($B,function(i){var o=Math.min(+i.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return l});var a=new Date(Math.floor(r+.05));if(e=e.replace(KB,function(){return QB[t("%q")(a)]}),Ws(n))try{e=Vs.getComponentMethod("calendars","worldCalFmt")(e,r,n)}catch(i){return"Invalid"}return t(e)(a)}var eO=[59,59.9,59.99,59.999,59.9999];function rO(e,r){var t=Iu(e+.05,Di),n=k0(Math.floor(t/o1),2)+":"+k0(Iu(Math.floor(t/Fu),60),2);if(r!=="M"){O7(r)||(r=0);var a=Math.min(Iu(e/S0,60),eO[r]),i=(100+a).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}jn.formatDate=function(e,r,t,n,a,i){if(a=Ws(a)&&a,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` +`)};function N(ae){return ae.map(j).join(c)}function j(ae){return w.test(ae)?'"'+ae.replace(/\"/g,'""')+'"':ae}return q},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var oo,Go,Vo,vu,Pl=this[te(this,"requestAnimationFrame")]||function(c){setTimeout(c,17)};e.timer=function(){Rl.apply(this,arguments)};function Rl(c,p,w){var C=arguments.length;C<2&&(p=0),C<3&&(w=Date.now());var q=w+p,E={c,t:q,n:null};return Go?Go.n=E:oo=E,Go=E,Vo||(vu=clearTimeout(vu),Vo=1,Pl(_i)),E}function _i(){var c=lo(),p=Wo()-c;p>24?(isFinite(p)&&(clearTimeout(vu),vu=setTimeout(_i,p)),Vo=0):(Vo=1,Pl(_i))}e.timer.flush=function(){lo(),Wo()};function lo(){for(var c=Date.now(),p=oo;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function Wo(){for(var c,p=oo,w=1/0;p;)p.c?(p.t=0;--N)ye.push(q[ae[ge[N]][2]]);for(N=+Re;N1&&St(c[w[C-2]],c[w[C-1]],c[q])<=0;)--C;w[C++]=q}return w.slice(0,C)}function Zc(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return Se(c,_s),c};var _s=e.geom.polygon.prototype=[];_s.area=function(){for(var c=-1,p=this.length,w,C=this[p-1],q=0;++cke)N=N.L;else if(G=p-Fv(N,w),G>ke){if(!N.R){C=N;break}N=N.R}else{E>-ke?(C=N.P,q=N):G>-ke?(C=N,q=N.N):C=q=N;break}var j=Ms(c);if(Oi.insert(C,j),!(!C&&!q)){if(C===q){co(C),q=Ms(C.site),Oi.insert(j,q),j.edge=q.edge=Il(C.site,j.site),fo(C),fo(q);return}if(!q){j.edge=Il(C.site,j.site);return}co(C),co(q);var ae=C.site,ie=ae.x,ge=ae.y,me=c.x-ie,Re=c.y-ge,Ye=q.site,ye=Ye.x-ie,Ce=Ye.y-ge,De=2*(me*Ce-Re*ye),Ue=me*me+Re*Re,Ge=ye*ye+Ce*Ce,Pe={x:(Ce*Ue-Re*Ge)/De+ie,y:(me*Ge-ye*Ue)/De+ge};Gi(q.edge,ae,Ye,Pe),j.edge=Il(ae,c,null,Pe),q.edge=Il(c,Ye,null,Pe),fo(C),fo(q)}}function Ts(c,p){var w=c.site,C=w.x,q=w.y,E=q-p;if(!E)return C;var G=c.P;if(!G)return-1/0;w=G.site;var N=w.x,j=w.y,ae=j-p;if(!ae)return N;var ie=N-C,ge=1/E-1/ae,me=ie/ae;return ge?(-me+Math.sqrt(me*me-2*ge*(ie*ie/(-2*ae)-j+ae/2+q-E/2)))/ge+C:(C+N)/2}function Fv(c,p){var w=c.N;if(w)return Ts(w,p);var C=c.site;return C.y===p?C.x:1/0}function Xo(c){this.site=c,this.edges=[]}Xo.prototype.prepare=function(){for(var c=this.edges,p=c.length,w;p--;)w=c[p].edge,(!w.b||!w.a)&&c.splice(p,1);return c.sort(Fl),c.length};function kf(c){for(var p=c[0][0],w=c[1][0],C=c[0][1],q=c[1][1],E,G,N,j,ae=uo,ie=ae.length,ge,me,Re,Ye,ye,Ce;ie--;)if(ge=ae[ie],!(!ge||!ge.prepare()))for(Re=ge.edges,Ye=Re.length,me=0;meke||x(j-G)>ke)&&(Re.splice(me,0,new jo(Hv(ge.site,Ce,x(N-p)ke?{x:p,y:x(E-p)ke?{x:x(G-q)ke?{x:w,y:x(E-w)ke?{x:x(G-C)=-$e)){var me=j*j+ae*ae,Re=ie*ie+Ce*Ce,Ye=(Ce*me-ae*Re)/ge,ye=(j*Re-ie*me)/ge,Ce=ye+N,De=Tf.pop()||new Jc;De.arc=c,De.site=q,De.x=Ye+G,De.y=Ce+Math.sqrt(Ye*Ye+ye*ye),De.cy=Ce,c.circle=De;for(var Ue=null,Ge=Nl._;Ge;)if(De.y0)){if(ye/=Re,Re<0){if(ye0){if(ye>me)return;ye>ge&&(ge=ye)}if(ye=w-N,!(!Re&&ye<0)){if(ye/=Re,Re<0){if(ye>me)return;ye>ge&&(ge=ye)}else if(Re>0){if(ye0)){if(ye/=Ye,Ye<0){if(ye0){if(ye>me)return;ye>ge&&(ge=ye)}if(ye=C-j,!(!Ye&&ye<0)){if(ye/=Ye,Ye<0){if(ye>me)return;ye>ge&&(ge=ye)}else if(Ye>0){if(ye0&&(q.a={x:N+ge*Re,y:j+ge*Ye}),me<1&&(q.b={x:N+me*Re,y:j+me*Ye}),q}}}}}}function xi(c){for(var p=so,w=Sf(c[0][0],c[0][1],c[1][0],c[1][1]),C=p.length,q;C--;)q=p[C],(!Iv(q,c)||!w(q)||x(q.a.x-q.b.x)=E)return;if(ie>me){if(!C)C={x:Ye,y:G};else if(C.y>=N)return;w={x:Ye,y:N}}else{if(!C)C={x:Ye,y:N};else if(C.y1)if(ie>me){if(!C)C={x:(G-De)/Ce,y:G};else if(C.y>=N)return;w={x:(N-De)/Ce,y:N}}else{if(!C)C={x:(N-De)/Ce,y:N};else if(C.y=E)return;w={x:E,y:Ce*E+De}}else{if(!C)C={x:E,y:Ce*E+De};else if(C.x=ie&&De.x<=me&&De.y>=ge&&De.y<=Re?[[ie,Re],[me,Re],[me,ge],[ie,ge]]:[];Ue.point=j[ye]}),ae}function N(j){return j.map(function(ae,ie){return{x:Math.round(C(ae,ie)/ke)*ke,y:Math.round(q(ae,ie)/ke)*ke,i:ie}})}return G.links=function(j){return Ss(N(j)).edges.filter(function(ae){return ae.l&&ae.r}).map(function(ae){return{source:j[ae.l.i],target:j[ae.r.i]}})},G.triangles=function(j){var ae=[];return Ss(N(j)).cells.forEach(function(ie,ge){for(var me=ie.site,Re=ie.edges.sort(Fl),Ye=-1,ye=Re.length,Ce,De,Ue=Re[ye-1].edge,Ge=Ue.l===me?Ue.r:Ue.l;++YeGe&&(Ge=ie.x),ie.y>Pe&&(Pe=ie.y),Re.push(ie.x),Ye.push(ie.y);else for(ye=0;yeGe&&(Ge=_r),Or>Pe&&(Pe=Or),Re.push(_r),Ye.push(Or)}var Wr=Ge-De,Gr=Pe-Ue;Wr>Gr?Pe=Ue+Wr:Ge=De+Gr;function Jr(Qr,ht,jt,Zn,on,Fr,_t,wt){if(!(isNaN(jt)||isNaN(Zn)))if(Qr.leaf){var Jt=Qr.x,Nn=Qr.y;if(Jt!=null)if(x(Jt-jt)+x(Nn-Zn)<.01)$r(Qr,ht,jt,Zn,on,Fr,_t,wt);else{var oa=Qr.point;Qr.x=Qr.y=Qr.point=null,$r(Qr,oa,Jt,Nn,on,Fr,_t,wt),$r(Qr,ht,jt,Zn,on,Fr,_t,wt)}else Qr.x=jt,Qr.y=Zn,Qr.point=ht}else $r(Qr,ht,jt,Zn,on,Fr,_t,wt)}function $r(Qr,ht,jt,Zn,on,Fr,_t,wt){var Jt=(on+_t)*.5,Nn=(Fr+wt)*.5,oa=jt>=Jt,Da=Zn>=Nn,ja=Da<<1|oa;Qr.leaf=!1,Qr=Qr.nodes[ja]||(Qr.nodes[ja]=gu()),oa?on=Jt:_t=Jt,Da?Fr=Nn:wt=Nn,Jr(Qr,ht,jt,Zn,on,Fr,_t,wt)}var bt=gu();if(bt.add=function(Qr){Jr(bt,Qr,+ge(Qr,++ye),+me(Qr,ye),De,Ue,Ge,Pe)},bt.visit=function(Qr){oi(Qr,bt,De,Ue,Ge,Pe)},bt.find=function(Qr){return mu(bt,Qr[0],Qr[1],De,Ue,Ge,Pe)},ye=-1,p==null){for(;++yeE||me>G||Re=_r,Gr=w>=Or,Jr=Gr<<1|Wr,$r=Jr+4;Jr<$r;++Jr)if(ie=Pe[Jr&3])switch(Jr&3){case 0:ae(ie,ge,me,_r,Or);break;case 1:ae(ie,_r,me,Re,Or);break;case 2:ae(ie,ge,Or,_r,Ye);break;case 3:ae(ie,_r,Or,Re,Ye);break}}}(c,C,q,E,G),j}e.interpolateRgb=yu;function yu(c,p){c=e.rgb(c),p=e.rgb(p);var w=c.r,C=c.g,q=c.b,E=p.r-w,G=p.g-C,N=p.b-q;return function(j){return"#"+Kr(Math.round(w+E*j))+Kr(Math.round(C+G*j))+Kr(Math.round(q+N*j))}}e.interpolateObject=Fa;function Fa(c,p){var w={},C={},q;for(q in c)q in p?w[q]=Qo(c[q],p[q]):C[q]=c[q];for(q in p)q in c||(C[q]=p[q]);return function(E){for(q in w)C[q]=w[q](E);return C}}e.interpolateNumber=Kn;function Kn(c,p){return c=+c,p=+p,function(w){return c*(1-w)+p*w}}e.interpolateString=Aa;function Aa(c,p){var w=Vi.lastIndex=Ls.lastIndex=0,C,q,E,G=-1,N=[],j=[];for(c=c+"",p=p+"";(C=Vi.exec(c))&&(q=Ls.exec(p));)(E=q.index)>w&&(E=p.slice(w,E),N[G]?N[G]+=E:N[++G]=E),(C=C[0])===(q=q[0])?N[G]?N[G]+=q:N[++G]=q:(N[++G]=null,j.push({i:G,x:Kn(C,q)})),w=Ls.lastIndex;return w=0&&!(C=e.interpolators[w](c,p)););return C}e.interpolators=[function(c,p){var w=typeof p;return(w==="string"?Dn.has(p.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(p)?yu:Aa:p instanceof pn?yu:Array.isArray(p)?Ol:w==="object"&&isNaN(p)?Fa:Kn)(c,p)}],e.interpolateArray=Ol;function Ol(c,p){var w=[],C=[],q=c.length,E=p.length,G=Math.min(c.length,p.length),N;for(N=0;N=0?c.slice(0,p):c,C=p>=0?c.slice(p+1):"in";return w=$c.get(w)||Cf,C=Bv.get(C)||V,Ov(C(w.apply(null,r.call(arguments,1))))};function Ov(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function Lf(c){return function(p){return 1-c(1-p)}}function qf(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function Df(c){return c*c}function Ef(c){return c*c*c}function Kc(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,w=p*c;return 4*(c<.5?w:3*(c-p)+w-.75)}function Qc(c){return function(p){return Math.pow(p,c)}}function qs(c){return 1-Math.cos(c*Hr)}function Ds(c){return Math.pow(2,10*(c-1))}function wi(c){return 1-Math.sqrt(1-c*c)}function bu(c,p){var w;return arguments.length<2&&(p=.45),arguments.length?w=p/qr*Math.asin(1/c):(c=1,w=p/4),function(C){return 1+c*Math.pow(2,-10*C)*Math.sin((C-w)*qr/p)}}function Es(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function _u(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=e0;function e0(c,p){c=e.hcl(c),p=e.hcl(p);var w=c.h,C=c.c,q=c.l,E=p.h-w,G=p.c-C,N=p.l-q;return isNaN(G)&&(G=0,C=isNaN(C)?p.c:C),isNaN(E)?(E=0,w=isNaN(w)?p.h:w):E>180?E-=360:E<-180&&(E+=360),function(j){return da(w+E*j,C+G*j,q+N*j)+""}}e.interpolateHsl=Pf;function Pf(c,p){c=e.hsl(c),p=e.hsl(p);var w=c.h,C=c.s,q=c.l,E=p.h-w,G=p.s-C,N=p.l-q;return isNaN(G)&&(G=0,C=isNaN(C)?p.s:C),isNaN(E)?(E=0,w=isNaN(w)?p.h:w):E>180?E-=360:E<-180&&(E+=360),function(j){return ha(w+E*j,C+G*j,q+N*j)+""}}e.interpolateLab=Uv;function Uv(c,p){c=e.lab(c),p=e.lab(p);var w=c.l,C=c.a,q=c.b,E=p.l-w,G=p.a-C,N=p.b-q;return function(j){return ms(w+E*j,C+G*j,q+N*j)+""}}e.interpolateRound=ho;function ho(c,p){return p-=c,function(w){return Math.round(c+p*w)}}e.transform=function(c){var p=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(w){if(w!=null){p.setAttribute("transform",w);var C=p.transform.baseVal.consolidate()}return new xu(C?C.matrix:Rf)})(c)};function xu(c){var p=[c.a,c.b],w=[c.c,c.d],C=Ps(p),q=Ul(p,w),E=Ps(Rs(w,p,-q))||0;p[0]*w[1]180?p+=360:p-c>180&&(c+=360),C.push({i:w.push(po(w)+"rotate(",null,")")-2,x:Kn(c,p)})):p&&w.push(po(w)+"rotate("+p+")")}function t0(c,p,w,C){c!==p?C.push({i:w.push(po(w)+"skewX(",null,")")-2,x:Kn(c,p)}):p&&w.push(po(w)+"skewX("+p+")")}function Nf(c,p,w,C){if(c[0]!==p[0]||c[1]!==p[1]){var q=w.push(po(w)+"scale(",null,",",null,")");C.push({i:q-4,x:Kn(c[0],p[0])},{i:q-2,x:Kn(c[1],p[1])})}else(p[0]!==1||p[1]!==1)&&w.push(po(w)+"scale("+p+")")}function wu(c,p){var w=[],C=[];return c=e.transform(c),p=e.transform(p),r0(c.translate,p.translate,w,C),zf(c.rotate,p.rotate,w,C),t0(c.skew,p.skew,w,C),Nf(c.scale,p.scale,w,C),c=p=null,function(q){for(var E=-1,G=C.length,N;++E0?E=Pe:(w.c=null,w.t=NaN,w=null,p.end({type:"end",alpha:E=0})):Pe>0&&(p.start({type:"start",alpha:E=Pe}),w=Rl(c.tick)),c):E},c.start=function(){var Pe,_r=Re.length,Or=Ye.length,Wr=C[0],Gr=C[1],Jr,$r;for(Pe=0;Pe<_r;++Pe)($r=Re[Pe]).index=Pe,$r.weight=0;for(Pe=0;Pe=0;)E.push(ie=ae[j]),ie.parent=N,ie.depth=N.depth+1;w&&(N.value=0),N.children=ae}else w&&(N.value=+w.call(C,N,N.depth)||0),delete N.children;return Ia(q,function(ge){var me,Re;c&&(me=ge.children)&&me.sort(c),w&&(Re=ge.parent)&&(Re.value+=ge.value)}),G}return C.sort=function(q){return arguments.length?(c=q,C):c},C.children=function(q){return arguments.length?(p=q,C):p},C.value=function(q){return arguments.length?(w=q,C):w},C.revalue=function(q){return w&&(Ai(q,function(E){E.children&&(E.value=0)}),Ia(q,function(E){var G;E.children||(E.value=+w.call(C,E,E.depth)||0),(G=E.parent)&&(G.value+=E.value)})),q},C};function Wi(c,p){return e.rebind(c,p,"sort","children","value"),c.nodes=c,c.links=Za,c}function Ai(c,p){for(var w=[c];(c=w.pop())!=null;)if(p(c),(q=c.children)&&(C=q.length))for(var C,q;--C>=0;)w.push(q[C])}function Ia(c,p){for(var w=[c],C=[];(c=w.pop())!=null;)if(C.push(c),(G=c.children)&&(E=G.length))for(var q=-1,E,G;++qq&&(q=N),C.push(N)}for(G=0;GC&&(w=p,C=q);return w}function Is(c){return c.reduce(rl,0)}function rl(c,p){return c+p[1]}e.layout.histogram=function(){var c=!0,p=Number,w=Vl,C=Hs;function q(E,me){for(var N=[],j=E.map(p,this),ae=w.call(this,j,me),ie=C.call(this,ae,j,me),ge,me=-1,Re=j.length,Ye=ie.length-1,ye=c?1:1/Re,Ce;++me0)for(me=-1;++me=ae[0]&&Ce<=ae[1]&&(ge=N[e.bisect(ie,Ce,1,Ye)-1],ge.y+=ye,ge.push(E[me]));return N}return q.value=function(E){return arguments.length?(p=E,q):p},q.range=function(E){return arguments.length?(w=At(E),q):w},q.bins=function(E){return arguments.length?(C=typeof E=="number"?function(G){return tl(G,E)}:At(E),q):C},q.frequency=function(E){return arguments.length?(c=!!E,q):c},q};function Hs(c,p){return tl(c,Math.ceil(Math.log(p.length)/Math.LN2+1))}function tl(c,p){for(var w=-1,C=+c[0],q=(c[1]-C)/p,E=[];++w<=p;)E[w]=q*w+C;return E}function Vl(c){return[e.min(c),e.max(c)]}e.layout.pack=function(){var c=e.layout.hierarchy().sort(Tu),p=0,w=[1,1],C;function q(E,G){var N=c.call(this,E,G),j=N[0],ae=w[0],ie=w[1],ge=C==null?Math.sqrt:typeof C=="function"?C:function(){return C};if(j.x=j.y=0,Ia(j,function(Re){Re.r=+ge(Re.value)}),Ia(j,f0),p){var me=p*(C?1:Math.max(2*j.r/ae,2*j.r/ie))/2;Ia(j,function(Re){Re.r+=me}),Ia(j,f0),Ia(j,function(Re){Re.r-=me})}return Su(j,ae/2,ie/2,C?1:1/Math.max(2*j.r/ae,2*j.r/ie)),N}return q.size=function(E){return arguments.length?(w=E,q):w},q.radius=function(E){return arguments.length?(C=E==null||typeof E=="function"?E:+E,q):C},q.padding=function(E){return arguments.length?(p=+E,q):p},Wi(q,c)};function Tu(c,p){return c.value-p.value}function Bs(c,p){var w=c._pack_next;c._pack_next=p,p._pack_prev=c,p._pack_next=w,w._pack_prev=p}function u0(c,p){c._pack_next=p,p._pack_prev=c}function ku(c,p){var w=p.x-c.x,C=p.y-c.y,q=c.r+p.r;return .999*q*q>w*w+C*C}function f0(c){if(!(p=c.children)||!(me=p.length))return;var p,w=1/0,C=-1/0,q=1/0,E=-1/0,G,N,j,ae,ie,ge,me;function Re(Pe){w=Math.min(Pe.x-Pe.r,w),C=Math.max(Pe.x+Pe.r,C),q=Math.min(Pe.y-Pe.r,q),E=Math.max(Pe.y+Pe.r,E)}if(p.forEach(c0),G=p[0],G.x=-G.r,G.y=0,Re(G),me>1&&(N=p[1],N.x=N.r,N.y=0,Re(N),me>2))for(j=p[2],Wn(G,N,j),Re(j),Bs(G,j),G._pack_prev=j,Bs(j,N),N=G._pack_next,ae=3;aeCe.x&&(Ce=_r),_r.depth>De.depth&&(De=_r)});var Ue=p(ye,Ce)/2-ye.x,Ge=w[0]/(Ce.x+p(Ce,ye)/2+Ue),Pe=w[1]/(De.depth||1);Ai(Re,function(_r){_r.x=(_r.x+Ue)*Ge,_r.y=_r.depth*Pe})}return me}function E(ie){for(var ge={A:null,children:[ie]},me=[ge],Re;(Re=me.pop())!=null;)for(var Ye=Re.children,ye,Ce=0,De=Ye.length;Ce0&&(Os(I(ye,ie,me),ie,_r),De+=_r,Ue+=_r),Ge+=ye.m,De+=Re.m,Pe+=Ce.m,Ue+=Ye.m;ye&&!Cu(Ye)&&(Ye.t=ye,Ye.m+=Ge-Ue),Re&&!Wl(Ce)&&(Ce.t=Re,Ce.m+=De-Pe,me=ie)}return me}function ae(ie){ie.x*=w[0],ie.y=ie.depth*w[1]}return q.separation=function(ie){return arguments.length?(p=ie,q):p},q.size=function(ie){return arguments.length?(C=(w=ie)==null?ae:null,q):C?null:w},q.nodeSize=function(ie){return arguments.length?(C=(w=ie)==null?null:ae,q):C?w:null},Wi(q,c)};function li(c,p){return c.parent==p.parent?1:2}function Wl(c){var p=c.children;return p.length?p[0]:c.t}function Cu(c){var p=c.children,w;return(w=p.length)?p[w-1]:c.t}function Os(c,p,w){var C=w/(p.i-c.i);p.c-=C,p.s+=w,c.c+=C,p.z+=w,p.m+=w}function Yf(c){for(var p=0,w=0,C=c.children,q=C.length,E;--q>=0;)E=C[q],E.z+=p,E.m+=p,p+=E.s+(w+=E.c)}function I(c,p,w){return c.a.parent===p.parent?c.a:w}e.layout.cluster=function(){var c=e.layout.hierarchy().sort(null).value(null),p=li,w=[1,1],C=!1;function q(E,G){var N=c.call(this,E,G),j=N[0],ae,ie=0;Ia(j,function(ye){var Ce=ye.children;Ce&&Ce.length?(ye.x=ce(Ce),ye.y=J(Ce)):(ye.x=ae?ie+=p(ye,ae):0,ye.y=0,ae=ye)});var ge=oe(j),me=we(j),Re=ge.x-p(ge,me)/2,Ye=me.x+p(me,ge)/2;return Ia(j,C?function(ye){ye.x=(ye.x-j.x)*w[0],ye.y=(j.y-ye.y)*w[1]}:function(ye){ye.x=(ye.x-Re)/(Ye-Re)*w[0],ye.y=(1-(j.y?ye.y/j.y:1))*w[1]}),N}return q.separation=function(E){return arguments.length?(p=E,q):p},q.size=function(E){return arguments.length?(C=(w=E)==null,q):C?null:w},q.nodeSize=function(E){return arguments.length?(C=(w=E)!=null,q):C?w:null},Wi(q,c)};function J(c){return 1+e.max(c,function(p){return p.y})}function ce(c){return c.reduce(function(p,w){return p+w.x},0)/c.length}function oe(c){var p=c.children;return p&&p.length?oe(p[0]):c}function we(c){var p=c.children,w;return p&&(w=p.length)?we(p[w-1]):c}e.layout.treemap=function(){var c=e.layout.hierarchy(),p=Math.round,w=[1,1],C=null,q=He,E=!1,G,N="squarify",j=.5*(1+Math.sqrt(5));function ae(ye,Ce){for(var De=-1,Ue=ye.length,Ge,Pe;++De0;)Ue.push(Pe=Ge[Gr-1]),Ue.area+=Pe.area,N!=="squarify"||(Or=me(Ue,Wr))<=_r?(Ge.pop(),_r=Or):(Ue.area-=Ue.pop().area,Re(Ue,Wr,De,!1),Wr=Math.min(De.dx,De.dy),Ue.length=Ue.area=0,_r=1/0);Ue.length&&(Re(Ue,Wr,De,!0),Ue.length=Ue.area=0),Ce.forEach(ie)}}function ge(ye){var Ce=ye.children;if(Ce&&Ce.length){var De=q(ye),Ue=Ce.slice(),Ge,Pe=[];for(ae(Ue,De.dx*De.dy/ye.value),Pe.area=0;Ge=Ue.pop();)Pe.push(Ge),Pe.area+=Ge.area,Ge.z!=null&&(Re(Pe,Ge.z?De.dx:De.dy,De,!Ue.length),Pe.length=Pe.area=0);Ce.forEach(ge)}}function me(ye,Ce){for(var De=ye.area,Ue,Ge=0,Pe=1/0,_r=-1,Or=ye.length;++_rGe&&(Ge=Ue));return De*=De,Ce*=Ce,De?Math.max(Ce*Ge*j/De,De/(Ce*Pe*j)):1/0}function Re(ye,Ce,De,Ue){var Ge=-1,Pe=ye.length,_r=De.x,Or=De.y,Wr=Ce?p(ye.area/Ce):0,Gr;if(Ce==De.dx){for((Ue||Wr>De.dy)&&(Wr=De.dy);++GeDe.dx)&&(Wr=De.dx);++Ge1);return c+p*C*Math.sqrt(-2*Math.log(E)/E)}},logNormal:function(){var c=e.random.normal.apply(e,arguments);return function(){return Math.exp(c())}},bates:function(c){var p=e.random.irwinHall(c);return function(){return p()/c}},irwinHall:function(c){return function(){for(var p=0,w=0;w2?wr:br,ae=C?If:Ff;return q=j(c,p,ae,w),E=j(p,c,ae,Qo),N}function N(j){return q(j)}return N.invert=function(j){return E(j)},N.domain=function(j){return arguments.length?(c=j.map(Number),G()):c},N.range=function(j){return arguments.length?(p=j,G()):p},N.rangeRound=function(j){return N.range(j).interpolate(ho)},N.clamp=function(j){return arguments.length?(C=j,G()):C},N.interpolate=function(j){return arguments.length?(w=j,G()):w},N.ticks=function(j){return nt(c,j)},N.tickFormat=function(j,ae){return d3_scale_linearTickFormat(c,j,ae)},N.nice=function(j){return jr(c,j),G()},N.copy=function(){return Lr(c,p,w,C)},G()}function et(c,p){return e.rebind(c,p,"range","rangeRound","interpolate","clamp")}function jr(c,p){return Qe(c,hr(tt(c,p)[2])),Qe(c,hr(tt(c,p)[2])),c}function tt(c,p){p==null&&(p=10);var w=or(c),C=w[1]-w[0],q=Math.pow(10,Math.floor(Math.log(C/p)/Math.LN10)),E=p/C*q;return E<=.15?q*=10:E<=.35?q*=5:E<=.75&&(q*=2),w[0]=Math.ceil(w[0]/q)*q,w[1]=Math.floor(w[1]/q)*q+q*.5,w[2]=q,w}function nt(c,p){return e.range.apply(e,tt(c,p))}var Dr={s:1,g:1,p:1,r:1,e:1};function Ir(c){return-Math.floor(Math.log(c)/Math.LN10+.01)}function it(c,p){var w=Ir(p[2]);return c in Dr?Math.abs(w-Ir(Math.max(x(p[0]),x(p[1]))))+ +(c!=="e"):w-(c==="%")*2}e.scale.log=function(){return pt(e.scale.linear().domain([0,1]),10,!0,[1,10])};function pt(c,p,w,C){function q(N){return(w?Math.log(N<0?0:N):-Math.log(N>0?0:-N))/Math.log(p)}function E(N){return w?Math.pow(p,N):-Math.pow(p,-N)}function G(N){return c(q(N))}return G.invert=function(N){return E(c.invert(N))},G.domain=function(N){return arguments.length?(w=N[0]>=0,c.domain((C=N.map(Number)).map(q)),G):C},G.base=function(N){return arguments.length?(p=+N,c.domain(C.map(q)),G):p},G.nice=function(){var N=Qe(C.map(q),w?Math:Yt);return c.domain(N),C=N.map(E),G},G.ticks=function(){var N=or(C),j=[],ae=N[0],ie=N[1],ge=Math.floor(q(ae)),me=Math.ceil(q(ie)),Re=p%1?2:p;if(isFinite(me-ge)){if(w){for(;ge0;Ye--)j.push(E(ge)*Ye);for(ge=0;j[ge]ie;me--);j=j.slice(ge,me)}return j},G.copy=function(){return pt(c.copy(),p,w,C)},et(G,c)}var Yt={floor:function(c){return-Math.ceil(-c)},ceil:function(c){return-Math.floor(-c)}};e.scale.pow=function(){return en(e.scale.linear(),1,[0,1])};function en(c,p,w){var C=Wt(p),q=Wt(1/p);function E(G){return c(C(G))}return E.invert=function(G){return q(c.invert(G))},E.domain=function(G){return arguments.length?(c.domain((w=G.map(Number)).map(C)),E):w},E.ticks=function(G){return nt(w,G)},E.tickFormat=function(G,N){return d3_scale_linearTickFormat(w,G,N)},E.nice=function(G){return E.domain(jr(w,G))},E.exponent=function(G){return arguments.length?(C=Wt(p=G),q=Wt(1/p),c.domain(w.map(C)),E):p},E.copy=function(){return en(c.copy(),p,w)},et(E,c)}function Wt(c){return function(p){return p<0?-Math.pow(-p,c):Math.pow(p,c)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return gn([],{t:"range",a:[[]]})};function gn(c,p){var w,C,q;function E(N){return C[((w.get(N)||(p.t==="range"?w.set(N,c.push(N)):NaN))-1)%C.length]}function G(N,j){return e.range(c.length).map(function(ae){return N+j*ae})}return E.domain=function(N){if(!arguments.length)return c;c=[],w=new b;for(var j=-1,ae=N.length,ie;++j0?w[E-1]:c[0],Eme?0:1;if(ie=Vr)return j(ie,Ye)+(ae?j(ae,1-Ye):"")+"Z";var ye,Ce,De,Ue,Ge=0,Pe=0,_r,Or,Wr,Gr,Jr,$r,bt,Qr,ht=[];if((Ue=(+G.apply(this,arguments)||0)/2)&&(De=C===Zi?Math.sqrt(ae*ae+ie*ie):+C.apply(this,arguments),Ye||(Pe*=-1),ie&&(Pe=Fn(De/ie*Math.sin(Ue))),ae&&(Ge=Fn(De/ae*Math.sin(Ue)))),ie){_r=ie*Math.cos(ge+Pe),Or=ie*Math.sin(ge+Pe),Wr=ie*Math.cos(me-Pe),Gr=ie*Math.sin(me-Pe);var jt=Math.abs(me-ge-2*Pe)<=We?0:1;if(Pe&&Lu(_r,Or,Wr,Gr)===Ye^jt){var Zn=(ge+me)/2;_r=ie*Math.cos(Zn),Or=ie*Math.sin(Zn),Wr=Gr=null}}else _r=Or=0;if(ae){Jr=ae*Math.cos(me-Ge),$r=ae*Math.sin(me-Ge),bt=ae*Math.cos(ge+Ge),Qr=ae*Math.sin(ge+Ge);var on=Math.abs(ge-me+2*Ge)<=We?0:1;if(Ge&&Lu(Jr,$r,bt,Qr)===1-Ye^on){var Fr=(ge+me)/2;Jr=ae*Math.cos(Fr),$r=ae*Math.sin(Fr),bt=Qr=null}}else Jr=$r=0;if(Re>ke&&(ye=Math.min(Math.abs(ie-ae)/2,+w.apply(this,arguments)))>.001){Ce=ae0?0:1}function v0(c,p,w,C,q){var E=c[0]-p[0],G=c[1]-p[1],N=(q?C:-C)/Math.sqrt(E*E+G*G),j=N*G,ae=-N*E,ie=c[0]+j,ge=c[1]+ae,me=p[0]+j,Re=p[1]+ae,Ye=(ie+me)/2,ye=(ge+Re)/2,Ce=me-ie,De=Re-ge,Ue=Ce*Ce+De*De,Ge=w-C,Pe=ie*Re-me*ge,_r=(De<0?-1:1)*Math.sqrt(Math.max(0,Ge*Ge*Ue-Pe*Pe)),Or=(Pe*De-Ce*_r)/Ue,Wr=(-Pe*Ce-De*_r)/Ue,Gr=(Pe*De+Ce*_r)/Ue,Jr=(-Pe*Ce+De*_r)/Ue,$r=Or-Ye,bt=Wr-ye,Qr=Gr-Ye,ht=Jr-ye;return $r*$r+bt*bt>Qr*Qr+ht*ht&&(Or=Gr,Wr=Jr),[[Or-j,Wr-ae],[Or*w/Ge,Wr*w/Ge]]}function h0(){return!0}function Uh(c){var p=zl,w=bs,C=h0,q=Xi,E=q.key,G=.7;function N(j){var ae=[],ie=[],ge=-1,me=j.length,Re,Ye=At(p),ye=At(w);function Ce(){ae.push("M",q(c(ie),G))}for(;++ge1?c.join("L"):c+"Z"}function Yh(c){return c.join("L")+"Z"}function Gh(c){for(var p=0,w=c.length,C=c[0],q=[C[0],",",C[1]];++p1&&q.push("H",C[0]),q.join("")}function d0(c){for(var p=0,w=c.length,C=c[0],q=[C[0],",",C[1]];++p1){N=p[1],E=c[j],j++,C+="C"+(q[0]+G[0])+","+(q[1]+G[1])+","+(E[0]-N[0])+","+(E[1]-N[1])+","+E[0]+","+E[1];for(var ae=2;ae9&&(E=w*3/Math.sqrt(E),G[N]=E*C,G[N+1]=E*q));for(N=-1;++N<=j;)E=(c[Math.min(j,N+1)][0]-c[Math.max(0,N-1)][0])/(6*(1+G[N]*G[N])),p.push([E||0,G[N]*E||0]);return p}function ue(c){return c.length<3?Xi(c):c[0]+p0(c,Z(c))}e.svg.line.radial=function(){var c=Uh(ve);return c.radius=c.x,delete c.x,c.angle=c.y,delete c.y,c};function ve(c){for(var p,w=-1,C=c.length,q,E;++wWe)+",1 "+ge}function ae(ie,ge,me,Re){return"Q 0,0 "+Re}return E.radius=function(ie){return arguments.length?(w=At(ie),E):w},E.source=function(ie){return arguments.length?(c=At(ie),E):c},E.target=function(ie){return arguments.length?(p=At(ie),E):p},E.startAngle=function(ie){return arguments.length?(C=At(ie),E):C},E.endAngle=function(ie){return arguments.length?(q=At(ie),E):q},E};function Le(c){return c.radius}e.svg.diagonal=function(){var c=he,p=xe,w=ze;function C(q,E){var G=c.call(this,q,E),N=p.call(this,q,E),j=(G.y+N.y)/2,ae=[G,{x:G.x,y:j},{x:N.x,y:j},N];return ae=ae.map(w),"M"+ae[0]+"C"+ae[1]+" "+ae[2]+" "+ae[3]}return C.source=function(q){return arguments.length?(c=At(q),C):c},C.target=function(q){return arguments.length?(p=At(q),C):p},C.projection=function(q){return arguments.length?(w=q,C):w},C};function ze(c){return[c.x,c.y]}e.svg.diagonal.radial=function(){var c=e.svg.diagonal(),p=ze,w=c.projection;return c.projection=function(C){return arguments.length?w(tr(p=C)):p},c};function tr(c){return function(){var p=c.apply(this,arguments),w=p[0],C=p[1]-Hr;return[w*Math.cos(C),w*Math.sin(C)]}}e.svg.symbol=function(){var c=Ar,p=vr;function w(C,q){return(at.get(c.call(this,C,q))||Zr)(p.call(this,C,q))}return w.type=function(C){return arguments.length?(c=At(C),w):c},w.size=function(C){return arguments.length?(p=At(C),w):p},w};function vr(){return 64}function Ar(){return"circle"}function Zr(c){var p=Math.sqrt(c/We);return"M0,"+p+"A"+p+","+p+" 0 1,1 0,"+-p+"A"+p+","+p+" 0 1,1 0,"+p+"Z"}var at=e.map({circle:Zr,cross:function(c){var p=Math.sqrt(c/5)/2;return"M"+-3*p+","+-p+"H"+-p+"V"+-3*p+"H"+p+"V"+-p+"H"+3*p+"V"+p+"H"+p+"V"+3*p+"H"+-p+"V"+p+"H"+-3*p+"Z"},diamond:function(c){var p=Math.sqrt(c/(2*st)),w=p*st;return"M0,"+-p+"L"+w+",0 0,"+p+" "+-w+",0Z"},square:function(c){var p=Math.sqrt(c)/2;return"M"+-p+","+-p+"L"+p+","+-p+" "+p+","+p+" "+-p+","+p+"Z"},"triangle-down":function(c){var p=Math.sqrt(c/ot),w=p*ot/2;return"M0,"+w+"L"+p+","+-w+" "+-p+","+-w+"Z"},"triangle-up":function(c){var p=Math.sqrt(c/ot),w=p*ot/2;return"M0,"+-w+"L"+p+","+w+" "+-p+","+w+"Z"}});e.svg.symbolTypes=at.keys();var ot=Math.sqrt(3),st=Math.tan(30*lt);pe.transition=function(c){for(var p=ga||++zn,w=La(c),C=[],q,E,G=ui||{time:Date.now(),ease:Kc,delay:0,duration:250},N=-1,j=this.length;++N0;)ge[--Ue].call(c,De);if(Ce>=1)return G.event&&G.event.end.call(c,c.__data__,p),--E.count?delete E[C]:delete c[w],1}G||(N=q.time,j=Rl(me,0,N),G=E[C]={tween:new b,time:N,timer:j,delay:q.delay,duration:q.duration,ease:q.ease,index:p},q=null,++E.count)}e.svg.axis=function(){var c=e.scale.linear(),p=ji,w=6,C=6,q=3,E=[10],G=null,N;function j(ae){ae.each(function(){var ie=e.select(this),ge=this.__chart__||c,me=this.__chart__=c.copy(),Re=G==null?me.ticks?me.ticks.apply(me,E):me.domain():G,Ye=N==null?me.tickFormat?me.tickFormat.apply(me,E):V:N,ye=ie.selectAll(".tick").data(Re,me),Ce=ye.enter().insert("g",".domain").attr("class","tick").style("opacity",ke),De=e.transition(ye.exit()).style("opacity",ke).remove(),Ue=e.transition(ye.order()).style("opacity",1),Ge=Math.max(w,0)+q,Pe,_r=ur(me),Or=ie.selectAll(".domain").data([0]),Wr=(Or.enter().append("path").attr("class","domain"),e.transition(Or));Ce.append("line"),Ce.append("text");var Gr=Ce.select("line"),Jr=Ue.select("line"),$r=ye.select("text").text(Ye),bt=Ce.select("text"),Qr=Ue.select("text"),ht=p==="top"||p==="left"?-1:1,jt,Zn,on,Fr;if(p==="bottom"||p==="top"?(Pe=ll,jt="x",on="y",Zn="x2",Fr="y2",$r.attr("dy",ht<0?"0em":".71em").style("text-anchor","middle"),Wr.attr("d","M"+_r[0]+","+ht*C+"V0H"+_r[1]+"V"+ht*C)):(Pe=sl,jt="y",on="x",Zn="y2",Fr="x2",$r.attr("dy",".32em").style("text-anchor",ht<0?"end":"start"),Wr.attr("d","M"+ht*C+","+_r[0]+"H0V"+_r[1]+"H"+ht*C)),Gr.attr(Fr,ht*w),bt.attr(on,ht*Ge),Jr.attr(Zn,0).attr(Fr,ht*w),Qr.attr(jt,0).attr(on,ht*Ge),me.rangeBand){var _t=me,wt=_t.rangeBand()/2;ge=me=function(Jt){return _t(Jt)+wt}}else ge.rangeBand?ge=me:De.call(Pe,me,ge);Ce.call(Pe,ge,me),Ue.call(Pe,me,me)})}return j.scale=function(ae){return arguments.length?(c=ae,j):c},j.orient=function(ae){return arguments.length?(p=ae in ol?ae+"":ji,j):p},j.ticks=function(){return arguments.length?(E=t(arguments),j):E},j.tickValues=function(ae){return arguments.length?(G=ae,j):G},j.tickFormat=function(ae){return arguments.length?(N=ae,j):N},j.tickSize=function(ae){var ie=arguments.length;return ie?(w=+ae,C=+arguments[ie-1],j):w},j.innerTickSize=function(ae){return arguments.length?(w=+ae,j):w},j.outerTickSize=function(ae){return arguments.length?(C=+ae,j):C},j.tickPadding=function(ae){return arguments.length?(q=+ae,j):q},j.tickSubdivide=function(){return arguments.length&&j},j};var ji="bottom",ol={top:1,right:1,bottom:1,left:1};function ll(c,p,w){c.attr("transform",function(C){var q=p(C);return"translate("+(isFinite(q)?q:w(C))+",0)"})}function sl(c,p,w){c.attr("transform",function(C){var q=p(C);return"translate(0,"+(isFinite(q)?q:w(C))+")"})}e.svg.brush=function(){var c=Ne(ie,"brushstart","brush","brushend"),p=null,w=null,C=[0,0],q=[0,0],E,G,N=!0,j=!0,ae=go[0];function ie(ye){ye.each(function(){var Ce=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ye).on("touchstart.brush",Ye),De=Ce.selectAll(".background").data([0]);De.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ce.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ue=Ce.selectAll(".resize").data(ae,V);Ue.exit().remove(),Ue.enter().append("g").attr("class",function(Or){return"resize "+Or}).style("cursor",function(Or){return Xl[Or]}).append("rect").attr("x",function(Or){return/[ew]$/.test(Or)?-3:null}).attr("y",function(Or){return/^[ns]/.test(Or)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ue.style("display",ie.empty()?"none":null);var Ge=e.transition(Ce),Pe=e.transition(De),_r;p&&(_r=ur(p),Pe.attr("x",_r[0]).attr("width",_r[1]-_r[0]),me(Ge)),w&&(_r=ur(w),Pe.attr("y",_r[0]).attr("height",_r[1]-_r[0]),Re(Ge)),ge(Ge)})}ie.event=function(ye){ye.each(function(){var Ce=c.of(this,arguments),De={x:C,y:q,i:E,j:G},Ue=this.__chart__||De;this.__chart__=De,ga?e.select(this).transition().each("start.brush",function(){E=Ue.i,G=Ue.j,C=Ue.x,q=Ue.y,Ce({type:"brushstart"})}).tween("brush:brush",function(){var Ge=Ol(C,De.x),Pe=Ol(q,De.y);return E=G=null,function(_r){C=De.x=Ge(_r),q=De.y=Pe(_r),Ce({type:"brush",mode:"resize"})}}).each("end.brush",function(){E=De.i,G=De.j,Ce({type:"brush",mode:"resize"}),Ce({type:"brushend"})}):(Ce({type:"brushstart"}),Ce({type:"brush",mode:"resize"}),Ce({type:"brushend"}))})};function ge(ye){ye.selectAll(".resize").attr("transform",function(Ce){return"translate("+C[+/e$/.test(Ce)]+","+q[+/^s/.test(Ce)]+")"})}function me(ye){ye.select(".extent").attr("x",C[0]),ye.selectAll(".extent,.n>rect,.s>rect").attr("width",C[1]-C[0])}function Re(ye){ye.select(".extent").attr("y",q[0]),ye.selectAll(".extent,.e>rect,.w>rect").attr("height",q[1]-q[0])}function Ye(){var ye=this,Ce=e.select(e.event.target),De=c.of(ye,arguments),Ue=e.select(ye),Ge=Ce.datum(),Pe=!/^(n|s)$/.test(Ge)&&p,_r=!/^(e|w)$/.test(Ge)&&w,Or=Ce.classed("extent"),Wr=Pr(ye),Gr,Jr=e.mouse(ye),$r,bt=e.select(i(ye)).on("keydown.brush",jt).on("keyup.brush",Zn);if(e.event.changedTouches?bt.on("touchmove.brush",on).on("touchend.brush",_t):bt.on("mousemove.brush",on).on("mouseup.brush",_t),Ue.interrupt().selectAll("*").interrupt(),Or)Jr[0]=C[0]-Jr[0],Jr[1]=q[0]-Jr[1];else if(Ge){var Qr=+/w$/.test(Ge),ht=+/^n/.test(Ge);$r=[C[1-Qr]-Jr[0],q[1-ht]-Jr[1]],Jr[0]=C[Qr],Jr[1]=q[ht]}else e.event.altKey&&(Gr=Jr.slice());Ue.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ce.style("cursor")),De({type:"brushstart"}),on();function jt(){e.event.keyCode==32&&(Or||(Gr=null,Jr[0]-=C[1],Jr[1]-=q[1],Or=2),qe())}function Zn(){e.event.keyCode==32&&Or==2&&(Jr[0]+=C[1],Jr[1]+=q[1],Or=0,qe())}function on(){var wt=e.mouse(ye),Jt=!1;$r&&(wt[0]+=$r[0],wt[1]+=$r[1]),Or||(e.event.altKey?(Gr||(Gr=[(C[0]+C[1])/2,(q[0]+q[1])/2]),Jr[0]=C[+(wt[0]{(function(e,r){typeof Qh=="object"&&typeof W_!="undefined"?r(Qh):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(Qh,function(e){"use strict";var r=new Date,t=new Date;function n(Ae,Ve,je,zr){function kr(er){return Ae(er=arguments.length===0?new Date:new Date(+er)),er}return kr.floor=function(er){return Ae(er=new Date(+er)),er},kr.ceil=function(er){return Ae(er=new Date(er-1)),Ve(er,1),Ae(er),er},kr.round=function(er){var Ke=kr(er),mr=kr.ceil(er);return er-Ke0))return Mr;do Mr.push(gr=new Date(+er)),Ve(er,mr),Ae(er);while(gr=Ke)for(;Ae(Ke),!er(Ke);)Ke.setTime(Ke-1)},function(Ke,mr){if(Ke>=Ke)if(mr<0)for(;++mr<=0;)for(;Ve(Ke,-1),!er(Ke););else for(;--mr>=0;)for(;Ve(Ke,1),!er(Ke););})},je&&(kr.count=function(er,Ke){return r.setTime(+er),t.setTime(+Ke),Ae(r),Ae(t),Math.floor(je(r,t))},kr.every=function(er){return er=Math.floor(er),!isFinite(er)||!(er>0)?null:er>1?kr.filter(zr?function(Ke){return zr(Ke)%er===0}:function(Ke){return kr.count(0,Ke)%er===0}):kr}),kr}var a=n(function(){},function(Ae,Ve){Ae.setTime(+Ae+Ve)},function(Ae,Ve){return Ve-Ae});a.every=function(Ae){return Ae=Math.floor(Ae),!isFinite(Ae)||!(Ae>0)?null:Ae>1?n(function(Ve){Ve.setTime(Math.floor(Ve/Ae)*Ae)},function(Ve,je){Ve.setTime(+Ve+je*Ae)},function(Ve,je){return(je-Ve)/Ae}):a};var i=a.range,o=1e3,l=6e4,s=36e5,u=864e5,f=6048e5,v=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds())},function(Ae,Ve){Ae.setTime(+Ae+Ve*o)},function(Ae,Ve){return(Ve-Ae)/o},function(Ae){return Ae.getUTCSeconds()}),h=v.range,d=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o)},function(Ae,Ve){Ae.setTime(+Ae+Ve*l)},function(Ae,Ve){return(Ve-Ae)/l},function(Ae){return Ae.getMinutes()}),m=d.range,g=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o-Ae.getMinutes()*l)},function(Ae,Ve){Ae.setTime(+Ae+Ve*s)},function(Ae,Ve){return(Ve-Ae)/s},function(Ae){return Ae.getHours()}),y=g.range,x=n(function(Ae){Ae.setHours(0,0,0,0)},function(Ae,Ve){Ae.setDate(Ae.getDate()+Ve)},function(Ae,Ve){return(Ve-Ae-(Ve.getTimezoneOffset()-Ae.getTimezoneOffset())*l)/u},function(Ae){return Ae.getDate()-1}),T=x.range;function _(Ae){return n(function(Ve){Ve.setDate(Ve.getDate()-(Ve.getDay()+7-Ae)%7),Ve.setHours(0,0,0,0)},function(Ve,je){Ve.setDate(Ve.getDate()+je*7)},function(Ve,je){return(je-Ve-(je.getTimezoneOffset()-Ve.getTimezoneOffset())*l)/f})}var b=_(0),A=_(1),S=_(2),M=_(3),D=_(4),z=_(5),F=_(6),H=b.range,Y=A.range,O=S.range,X=M.range,V=D.range,ee=z.range,te=F.range,K=n(function(Ae){Ae.setDate(1),Ae.setHours(0,0,0,0)},function(Ae,Ve){Ae.setMonth(Ae.getMonth()+Ve)},function(Ae,Ve){return Ve.getMonth()-Ae.getMonth()+(Ve.getFullYear()-Ae.getFullYear())*12},function(Ae){return Ae.getMonth()}),re=K.range,fe=n(function(Ae){Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Ve){Ae.setFullYear(Ae.getFullYear()+Ve)},function(Ae,Ve){return Ve.getFullYear()-Ae.getFullYear()},function(Ae){return Ae.getFullYear()});fe.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(Ve){Ve.setFullYear(Math.floor(Ve.getFullYear()/Ae)*Ae),Ve.setMonth(0,1),Ve.setHours(0,0,0,0)},function(Ve,je){Ve.setFullYear(Ve.getFullYear()+je*Ae)})};var de=fe.range,qe=n(function(Ae){Ae.setUTCSeconds(0,0)},function(Ae,Ve){Ae.setTime(+Ae+Ve*l)},function(Ae,Ve){return(Ve-Ae)/l},function(Ae){return Ae.getUTCMinutes()}),Be=qe.range,Ne=n(function(Ae){Ae.setUTCMinutes(0,0,0)},function(Ae,Ve){Ae.setTime(+Ae+Ve*s)},function(Ae,Ve){return(Ve-Ae)/s},function(Ae){return Ae.getUTCHours()}),Ie=Ne.range,Se=n(function(Ae){Ae.setUTCHours(0,0,0,0)},function(Ae,Ve){Ae.setUTCDate(Ae.getUTCDate()+Ve)},function(Ae,Ve){return(Ve-Ae)/u},function(Ae){return Ae.getUTCDate()-1}),Xe=Se.range;function se(Ae){return n(function(Ve){Ve.setUTCDate(Ve.getUTCDate()-(Ve.getUTCDay()+7-Ae)%7),Ve.setUTCHours(0,0,0,0)},function(Ve,je){Ve.setUTCDate(Ve.getUTCDate()+je*7)},function(Ve,je){return(je-Ve)/f})}var be=se(0),Te=se(1),pe=se(2),W=se(3),Q=se(4),$=se(5),Me=se(6),Fe=be.range,Oe=Te.range,fr=pe.range,nr=W.range,Ze=Q.range,ar=$.range,lr=Me.range,ir=n(function(Ae){Ae.setUTCDate(1),Ae.setUTCHours(0,0,0,0)},function(Ae,Ve){Ae.setUTCMonth(Ae.getUTCMonth()+Ve)},function(Ae,Ve){return Ve.getUTCMonth()-Ae.getUTCMonth()+(Ve.getUTCFullYear()-Ae.getUTCFullYear())*12},function(Ae){return Ae.getUTCMonth()}),rr=ir.range,Cr=n(function(Ae){Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Ve){Ae.setUTCFullYear(Ae.getUTCFullYear()+Ve)},function(Ae,Ve){return Ve.getUTCFullYear()-Ae.getUTCFullYear()},function(Ae){return Ae.getUTCFullYear()});Cr.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(Ve){Ve.setUTCFullYear(Math.floor(Ve.getUTCFullYear()/Ae)*Ae),Ve.setUTCMonth(0,1),Ve.setUTCHours(0,0,0,0)},function(Ve,je){Ve.setUTCFullYear(Ve.getUTCFullYear()+je*Ae)})};var yr=Cr.range;e.timeDay=x,e.timeDays=T,e.timeFriday=z,e.timeFridays=ee,e.timeHour=g,e.timeHours=y,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=m,e.timeMonday=A,e.timeMondays=Y,e.timeMonth=K,e.timeMonths=re,e.timeSaturday=F,e.timeSaturdays=te,e.timeSecond=v,e.timeSeconds=h,e.timeSunday=b,e.timeSundays=H,e.timeThursday=D,e.timeThursdays=V,e.timeTuesday=S,e.timeTuesdays=O,e.timeWednesday=M,e.timeWednesdays=X,e.timeWeek=b,e.timeWeeks=H,e.timeYear=fe,e.timeYears=de,e.utcDay=Se,e.utcDays=Xe,e.utcFriday=$,e.utcFridays=ar,e.utcHour=Ne,e.utcHours=Ie,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=qe,e.utcMinutes=Be,e.utcMonday=Te,e.utcMondays=Oe,e.utcMonth=ir,e.utcMonths=rr,e.utcSaturday=Me,e.utcSaturdays=lr,e.utcSecond=v,e.utcSeconds=h,e.utcSunday=be,e.utcSundays=Fe,e.utcThursday=Q,e.utcThursdays=Ze,e.utcTuesday=pe,e.utcTuesdays=fr,e.utcWednesday=W,e.utcWednesdays=nr,e.utcWeek=be,e.utcWeeks=Fe,e.utcYear=Cr,e.utcYears=yr,Object.defineProperty(e,"__esModule",{value:!0})})});var m0=ne((ed,Z_)=>{(function(e,r){typeof ed=="object"&&typeof Z_!="undefined"?r(ed,_y()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(ed,function(e,r){"use strict";function t(_e){if(0<=_e.y&&_e.y<100){var ke=new Date(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L);return ke.setFullYear(_e.y),ke}return new Date(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L)}function n(_e){if(0<=_e.y&&_e.y<100){var ke=new Date(Date.UTC(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L));return ke.setUTCFullYear(_e.y),ke}return new Date(Date.UTC(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L))}function a(_e,ke,$e){return{y:_e,m:ke,d:$e,H:0,M:0,S:0,L:0}}function i(_e){var ke=_e.dateTime,$e=_e.date,We=_e.time,qr=_e.periods,Vr=_e.days,Hr=_e.shortDays,lt=_e.months,xt=_e.shortMonths,Rt=h(qr),St=d(qr),hn=h(Vr),Fn=d(Vr),$n=h(Hr),Xt=d(Hr),cn=h(lt),sn=d(lt),Kt=h(xt),aa=d(xt),rt={a:gi,A:io,b:mi,B:ms,c:null,d:K,e:K,f:Be,H:re,I:fe,j:de,L:qe,m:Ne,M:Ie,p:El,q:Bo,Q:Ke,s:mr,S:Se,u:Xe,U:se,V:be,w:Te,W:pe,x:null,X:null,y:W,Y:Q,Z:$,"%":er},Qt={a:ys,A:Oo,b:Hn,B:yi,c:null,d:Me,e:Me,f:Ze,H:Fe,I:Oe,j:fr,L:nr,m:ar,M:lr,p:Uo,q:bi,Q:Ke,s:mr,S:ir,u:rr,U:Cr,V:yr,w:Ae,W:Ve,x:null,X:null,y:je,Y:zr,Z:kr,"%":er},Ct={a:ha,A:Sn,b:Na,B:da,c:wn,d:D,e:D,f:X,H:F,I:F,j:z,L:O,m:M,M:H,p:un,q:S,Q:ee,s:te,S:Y,u:g,U:y,V:x,w:m,W:T,x:It,X:In,y:b,Y:_,Z:A,"%":V};rt.x=dn($e,rt),rt.X=dn(We,rt),rt.c=dn(ke,rt),Qt.x=dn($e,Qt),Qt.X=dn(We,Qt),Qt.c=dn(ke,Qt);function dn(Kr,Lt){return function(Ht){var Br=[],Vn=-1,nn=0,Dn=Kr.length,At,Wa,Yo;for(Ht instanceof Date||(Ht=new Date(+Ht));++Vn53)return null;"w"in Br||(Br.w=1),"Z"in Br?(nn=n(a(Br.y,0,1)),Dn=nn.getUTCDay(),nn=Dn>4||Dn===0?r.utcMonday.ceil(nn):r.utcMonday(nn),nn=r.utcDay.offset(nn,(Br.V-1)*7),Br.y=nn.getUTCFullYear(),Br.m=nn.getUTCMonth(),Br.d=nn.getUTCDate()+(Br.w+6)%7):(nn=t(a(Br.y,0,1)),Dn=nn.getDay(),nn=Dn>4||Dn===0?r.timeMonday.ceil(nn):r.timeMonday(nn),nn=r.timeDay.offset(nn,(Br.V-1)*7),Br.y=nn.getFullYear(),Br.m=nn.getMonth(),Br.d=nn.getDate()+(Br.w+6)%7)}else("W"in Br||"U"in Br)&&("w"in Br||(Br.w="u"in Br?Br.u%7:"W"in Br?1:0),Dn="Z"in Br?n(a(Br.y,0,1)).getUTCDay():t(a(Br.y,0,1)).getDay(),Br.m=0,Br.d="W"in Br?(Br.w+6)%7+Br.W*7-(Dn+5)%7:Br.w+Br.U*7-(Dn+6)%7);return"Z"in Br?(Br.H+=Br.Z/100|0,Br.M+=Br.Z%100,n(Br)):t(Br)}}function tn(Kr,Lt,Ht,Br){for(var Vn=0,nn=Lt.length,Dn=Ht.length,At,Wa;Vn=Dn)return-1;if(At=Lt.charCodeAt(Vn++),At===37){if(At=Lt.charAt(Vn++),Wa=Ct[At in o?Lt.charAt(Vn++):At],!Wa||(Br=Wa(Kr,Ht,Br))<0)return-1}else if(At!=Ht.charCodeAt(Br++))return-1}return Br}function un(Kr,Lt,Ht){var Br=Rt.exec(Lt.slice(Ht));return Br?(Kr.p=St[Br[0].toLowerCase()],Ht+Br[0].length):-1}function ha(Kr,Lt,Ht){var Br=$n.exec(Lt.slice(Ht));return Br?(Kr.w=Xt[Br[0].toLowerCase()],Ht+Br[0].length):-1}function Sn(Kr,Lt,Ht){var Br=hn.exec(Lt.slice(Ht));return Br?(Kr.w=Fn[Br[0].toLowerCase()],Ht+Br[0].length):-1}function Na(Kr,Lt,Ht){var Br=Kt.exec(Lt.slice(Ht));return Br?(Kr.m=aa[Br[0].toLowerCase()],Ht+Br[0].length):-1}function da(Kr,Lt,Ht){var Br=cn.exec(Lt.slice(Ht));return Br?(Kr.m=sn[Br[0].toLowerCase()],Ht+Br[0].length):-1}function wn(Kr,Lt,Ht){return tn(Kr,ke,Lt,Ht)}function It(Kr,Lt,Ht){return tn(Kr,$e,Lt,Ht)}function In(Kr,Lt,Ht){return tn(Kr,We,Lt,Ht)}function gi(Kr){return Hr[Kr.getDay()]}function io(Kr){return Vr[Kr.getDay()]}function mi(Kr){return xt[Kr.getMonth()]}function ms(Kr){return lt[Kr.getMonth()]}function El(Kr){return qr[+(Kr.getHours()>=12)]}function Bo(Kr){return 1+~~(Kr.getMonth()/3)}function ys(Kr){return Hr[Kr.getUTCDay()]}function Oo(Kr){return Vr[Kr.getUTCDay()]}function Hn(Kr){return xt[Kr.getUTCMonth()]}function yi(Kr){return lt[Kr.getUTCMonth()]}function Uo(Kr){return qr[+(Kr.getUTCHours()>=12)]}function bi(Kr){return 1+~~(Kr.getUTCMonth()/3)}return{format:function(Kr){var Lt=dn(Kr+="",rt);return Lt.toString=function(){return Kr},Lt},parse:function(Kr){var Lt=pn(Kr+="",!1);return Lt.toString=function(){return Kr},Lt},utcFormat:function(Kr){var Lt=dn(Kr+="",Qt);return Lt.toString=function(){return Kr},Lt},utcParse:function(Kr){var Lt=pn(Kr+="",!0);return Lt.toString=function(){return Kr},Lt}}}var o={"-":"",_:" ",0:"0"},l=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(_e,ke,$e){var We=_e<0?"-":"",qr=(We?-_e:_e)+"",Vr=qr.length;return We+(Vr<$e?new Array($e-Vr+1).join(ke)+qr:qr)}function v(_e){return _e.replace(u,"\\$&")}function h(_e){return new RegExp("^(?:"+_e.map(v).join("|")+")","i")}function d(_e){for(var ke={},$e=-1,We=_e.length;++$e68?1900:2e3),$e+We[0].length):-1}function A(_e,ke,$e){var We=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ke.slice($e,$e+6));return We?(_e.Z=We[1]?0:-(We[2]+(We[3]||"00")),$e+We[0].length):-1}function S(_e,ke,$e){var We=l.exec(ke.slice($e,$e+1));return We?(_e.q=We[0]*3-3,$e+We[0].length):-1}function M(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.m=We[0]-1,$e+We[0].length):-1}function D(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.d=+We[0],$e+We[0].length):-1}function z(_e,ke,$e){var We=l.exec(ke.slice($e,$e+3));return We?(_e.m=0,_e.d=+We[0],$e+We[0].length):-1}function F(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.H=+We[0],$e+We[0].length):-1}function H(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.M=+We[0],$e+We[0].length):-1}function Y(_e,ke,$e){var We=l.exec(ke.slice($e,$e+2));return We?(_e.S=+We[0],$e+We[0].length):-1}function O(_e,ke,$e){var We=l.exec(ke.slice($e,$e+3));return We?(_e.L=+We[0],$e+We[0].length):-1}function X(_e,ke,$e){var We=l.exec(ke.slice($e,$e+6));return We?(_e.L=Math.floor(We[0]/1e3),$e+We[0].length):-1}function V(_e,ke,$e){var We=s.exec(ke.slice($e,$e+1));return We?$e+We[0].length:-1}function ee(_e,ke,$e){var We=l.exec(ke.slice($e));return We?(_e.Q=+We[0],$e+We[0].length):-1}function te(_e,ke,$e){var We=l.exec(ke.slice($e));return We?(_e.s=+We[0],$e+We[0].length):-1}function K(_e,ke){return f(_e.getDate(),ke,2)}function re(_e,ke){return f(_e.getHours(),ke,2)}function fe(_e,ke){return f(_e.getHours()%12||12,ke,2)}function de(_e,ke){return f(1+r.timeDay.count(r.timeYear(_e),_e),ke,3)}function qe(_e,ke){return f(_e.getMilliseconds(),ke,3)}function Be(_e,ke){return qe(_e,ke)+"000"}function Ne(_e,ke){return f(_e.getMonth()+1,ke,2)}function Ie(_e,ke){return f(_e.getMinutes(),ke,2)}function Se(_e,ke){return f(_e.getSeconds(),ke,2)}function Xe(_e){var ke=_e.getDay();return ke===0?7:ke}function se(_e,ke){return f(r.timeSunday.count(r.timeYear(_e)-1,_e),ke,2)}function be(_e,ke){var $e=_e.getDay();return _e=$e>=4||$e===0?r.timeThursday(_e):r.timeThursday.ceil(_e),f(r.timeThursday.count(r.timeYear(_e),_e)+(r.timeYear(_e).getDay()===4),ke,2)}function Te(_e){return _e.getDay()}function pe(_e,ke){return f(r.timeMonday.count(r.timeYear(_e)-1,_e),ke,2)}function W(_e,ke){return f(_e.getFullYear()%100,ke,2)}function Q(_e,ke){return f(_e.getFullYear()%1e4,ke,4)}function $(_e){var ke=_e.getTimezoneOffset();return(ke>0?"-":(ke*=-1,"+"))+f(ke/60|0,"0",2)+f(ke%60,"0",2)}function Me(_e,ke){return f(_e.getUTCDate(),ke,2)}function Fe(_e,ke){return f(_e.getUTCHours(),ke,2)}function Oe(_e,ke){return f(_e.getUTCHours()%12||12,ke,2)}function fr(_e,ke){return f(1+r.utcDay.count(r.utcYear(_e),_e),ke,3)}function nr(_e,ke){return f(_e.getUTCMilliseconds(),ke,3)}function Ze(_e,ke){return nr(_e,ke)+"000"}function ar(_e,ke){return f(_e.getUTCMonth()+1,ke,2)}function lr(_e,ke){return f(_e.getUTCMinutes(),ke,2)}function ir(_e,ke){return f(_e.getUTCSeconds(),ke,2)}function rr(_e){var ke=_e.getUTCDay();return ke===0?7:ke}function Cr(_e,ke){return f(r.utcSunday.count(r.utcYear(_e)-1,_e),ke,2)}function yr(_e,ke){var $e=_e.getUTCDay();return _e=$e>=4||$e===0?r.utcThursday(_e):r.utcThursday.ceil(_e),f(r.utcThursday.count(r.utcYear(_e),_e)+(r.utcYear(_e).getUTCDay()===4),ke,2)}function Ae(_e){return _e.getUTCDay()}function Ve(_e,ke){return f(r.utcMonday.count(r.utcYear(_e)-1,_e),ke,2)}function je(_e,ke){return f(_e.getUTCFullYear()%100,ke,2)}function zr(_e,ke){return f(_e.getUTCFullYear()%1e4,ke,4)}function kr(){return"+0000"}function er(){return"%"}function Ke(_e){return+_e}function mr(_e){return Math.floor(+_e/1e3)}var Mr;gr({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 gr(_e){return Mr=i(_e),e.timeFormat=Mr.format,e.timeParse=Mr.parse,e.utcFormat=Mr.utcFormat,e.utcParse=Mr.utcParse,Mr}var dr="%Y-%m-%dT%H:%M:%S.%LZ";function Tr(_e){return _e.toISOString()}var Pr=Date.prototype.toISOString?Tr:e.utcFormat(dr);function Ur(_e){var ke=new Date(_e);return isNaN(ke)?null:ke}var sr=+new Date("2000-01-01T00:00:00.000Z")?Ur:e.utcParse(dr);e.isoFormat=Pr,e.isoParse=sr,e.timeFormatDefaultLocale=gr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var xy=ne((rd,X_)=>{(function(e,r){typeof rd=="object"&&typeof X_!="undefined"?r(rd):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(rd,function(e){"use strict";function r(M){return Math.abs(M=Math.round(M))>=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function t(M,D){if((z=(M=D?M.toExponential(D-1):M.toExponential()).indexOf("e"))<0)return null;var z,F=M.slice(0,z);return[F.length>1?F[0]+F.slice(2):F,+M.slice(z+1)]}function n(M){return M=t(Math.abs(M)),M?M[1]:NaN}function a(M,D){return function(z,F){for(var H=z.length,Y=[],O=0,X=M[0],V=0;H>0&&X>0&&(V+X+1>F&&(X=Math.max(1,F-V)),Y.push(z.substring(H-=X,H+X)),!((V+=X+1)>F));)X=M[O=(O+1)%M.length];return Y.reverse().join(D)}}function i(M){return function(D){return D.replace(/[0-9]/g,function(z){return M[+z]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(M){if(!(D=o.exec(M)))throw new Error("invalid format: "+M);var D;return new s({fill:D[1],align:D[2],sign:D[3],symbol:D[4],zero:D[5],width:D[6],comma:D[7],precision:D[8]&&D[8].slice(1),trim:D[9],type:D[10]})}l.prototype=s.prototype;function s(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}s.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(M){e:for(var D=M.length,z=1,F=-1,H;z0&&(F=0);break}return F>0?M.slice(0,F)+M.slice(H+1):M}var f;function v(M,D){var z=t(M,D);if(!z)return M+"";var F=z[0],H=z[1],Y=H-(f=Math.max(-8,Math.min(8,Math.floor(H/3)))*3)+1,O=F.length;return Y===O?F:Y>O?F+new Array(Y-O+1).join("0"):Y>0?F.slice(0,Y)+"."+F.slice(Y):"0."+new Array(1-Y).join("0")+t(M,Math.max(0,D+Y-1))[0]}function h(M,D){var z=t(M,D);if(!z)return M+"";var F=z[0],H=z[1];return H<0?"0."+new Array(-H).join("0")+F:F.length>H+1?F.slice(0,H+1)+"."+F.slice(H+1):F+new Array(H-F.length+2).join("0")}var d={"%":function(M,D){return(M*100).toFixed(D)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d:r,e:function(M,D){return M.toExponential(D)},f:function(M,D){return M.toFixed(D)},g:function(M,D){return M.toPrecision(D)},o:function(M){return Math.round(M).toString(8)},p:function(M,D){return h(M*100,D)},r:h,s:v,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function m(M){return M}var g=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function x(M){var D=M.grouping===void 0||M.thousands===void 0?m:a(g.call(M.grouping,Number),M.thousands+""),z=M.currency===void 0?"":M.currency[0]+"",F=M.currency===void 0?"":M.currency[1]+"",H=M.decimal===void 0?".":M.decimal+"",Y=M.numerals===void 0?m:i(g.call(M.numerals,String)),O=M.percent===void 0?"%":M.percent+"",X=M.minus===void 0?"-":M.minus+"",V=M.nan===void 0?"NaN":M.nan+"";function ee(K){K=l(K);var re=K.fill,fe=K.align,de=K.sign,qe=K.symbol,Be=K.zero,Ne=K.width,Ie=K.comma,Se=K.precision,Xe=K.trim,se=K.type;se==="n"?(Ie=!0,se="g"):d[se]||(Se===void 0&&(Se=12),Xe=!0,se="g"),(Be||re==="0"&&fe==="=")&&(Be=!0,re="0",fe="=");var be=qe==="$"?z:qe==="#"&&/[boxX]/.test(se)?"0"+se.toLowerCase():"",Te=qe==="$"?F:/[%p]/.test(se)?O:"",pe=d[se],W=/[defgprs%]/.test(se);Se=Se===void 0?6:/[gprs]/.test(se)?Math.max(1,Math.min(21,Se)):Math.max(0,Math.min(20,Se));function Q($){var Me=be,Fe=Te,Oe,fr,nr;if(se==="c")Fe=pe($)+Fe,$="";else{$=+$;var Ze=$<0||1/$<0;if($=isNaN($)?V:pe(Math.abs($),Se),Xe&&($=u($)),Ze&&+$==0&&de!=="+"&&(Ze=!1),Me=(Ze?de==="("?de:X:de==="-"||de==="("?"":de)+Me,Fe=(se==="s"?y[8+f/3]:"")+Fe+(Ze&&de==="("?")":""),W){for(Oe=-1,fr=$.length;++Oenr||nr>57){Fe=(nr===46?H+$.slice(Oe+1):$.slice(Oe))+Fe,$=$.slice(0,Oe);break}}}Ie&&!Be&&($=D($,1/0));var ar=Me.length+$.length+Fe.length,lr=ar>1)+Me+$+Fe+lr.slice(ar);break;default:$=lr+Me+$+Fe;break}return Y($)}return Q.toString=function(){return K+""},Q}function te(K,re){var fe=ee((K=l(K),K.type="f",K)),de=Math.max(-8,Math.min(8,Math.floor(n(re)/3)))*3,qe=Math.pow(10,-de),Be=y[8+de/3];return function(Ne){return fe(qe*Ne)+Be}}return{format:ee,formatPrefix:te}}var T;_({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function _(M){return T=x(M),e.format=T.format,e.formatPrefix=T.formatPrefix,T}function b(M){return Math.max(0,-n(Math.abs(M)))}function A(M,D){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(D)/3)))*3-n(Math.abs(M)))}function S(M,D){return M=Math.abs(M),D=Math.abs(D)-M,Math.max(0,n(D)-n(M))+1}e.FormatSpecifier=s,e.formatDefaultLocale=_,e.formatLocale=x,e.formatSpecifier=l,e.precisionFixed=b,e.precisionPrefix=A,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})})});var J_=ne((Yoe,j_)=>{"use strict";j_.exports=function(e){for(var r=e.length,t,n=0;n13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var Bt=ne((Goe,$_)=>{"use strict";var ZI=J_();$_.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&ZI(t))return!1}else if(r!=="number")return!1;return e-e<1}});var En=ne((Voe,K_)=>{"use strict";K_.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 wy=ne((td,Q_)=>{(function(e,r){typeof td=="object"&&typeof Q_!="undefined"?r(td):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(td,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],f+=r[(l[s]&3)<<4|l[s+1]>>4],f+=r[(l[s+1]&15)<<2|l[s+2]>>6],f+=r[l[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(o){var l=o.length*.75,s=o.length,u,f=0,v,h,d,m;o[o.length-1]==="="&&(l--,o[o.length-2]==="="&&l--);var g=new ArrayBuffer(l),y=new Uint8Array(g);for(u=0;u>4,y[f++]=(h&15)<<4|d>>2,y[f++]=(d&3)<<6|m&63;return g};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})})});var Gs=ne((Woe,e6)=>{"use strict";e6.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var Ji=ne(fl=>{"use strict";var XI=wy().decode,jI=Gs(),My=Array.isArray,JI=ArrayBuffer,$I=DataView;function r6(e){return JI.isView(e)&&!(e instanceof $I)}fl.isTypedArray=r6;function nd(e){return My(e)||r6(e)}fl.isArrayOrTypedArray=nd;function KI(e){return!nd(e[0])}fl.isArray1D=KI;fl.ensureArray=function(e,r){return My(e)||(e=[]),e.length=r,e};var Ta={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};Ta.uint8c=Ta.u1c;Ta.uint8=Ta.u1;Ta.int8=Ta.i1;Ta.uint16=Ta.u2;Ta.int16=Ta.i2;Ta.uint32=Ta.u4;Ta.int32=Ta.i4;Ta.float32=Ta.f4;Ta.float64=Ta.f8;function Ay(e){return e.constructor===ArrayBuffer}fl.isArrayBuffer=Ay;fl.decodeTypedArraySpec=function(e){var r=[],t=QI(e),n=t.dtype,a=Ta[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=t.bdata;Ay(o)||(o=XI(o));var l=t.shape===void 0?[o.byteLength/i]:(""+t.shape).split(",");l.reverse();var s=l.length,u,f,v=+l[0],h=i*v,d=0;if(s===1)r=new a(o);else if(s===2)for(u=+l[1],f=0;f{"use strict";var n6=Bt(),ky=Ji().isArrayOrTypedArray;l6.exports=function(r,t){if(n6(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var n=t.split("."),a,i,o,l;for(l=0;l{"use strict";var y0=$v(),aH=/^\w*$/,iH=0,s6=1,ad=2,u6=3,jf=4;f6.exports=function(r,t,n,a){n=n||"name",a=a||"value";var i,o,l,s={};t&&t.length?(l=y0(r,t),o=l.get()):o=r,t=t||"";var u={};if(o)for(i=0;i2)return s[d]=s[d]|ad,v.set(h,null);if(f){for(i=d;i{"use strict";var oH=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,lH=/^[^\.\[\]]+$/;v6.exports=function(e,r){for(;r;){var t=e.match(oH);if(t)e=t[1];else if(e.match(lH))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var id=ne(($oe,d6)=>{"use strict";var sH=Bt();d6.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return sH(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}});var m6=ne((Koe,g6)=>{"use strict";var p6=Ji().isArrayOrTypedArray,Kv=Gs();g6.exports=function e(r,t){for(var n in t){var a=t[n],i=r[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in r)continue;r[n]=a}else if(p6(a)&&p6(i)&&Kv(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),l=0;l{"use strict";function uH(e,r){var t=e%r;return t<0?t+r:t}function fH(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}y6.exports={mod:uH,modHalf:fH}});var Jl=ne((ele,od)=>{(function(e){var r=/^\s+/,t=/\s+$/,n=0,a=e.round,i=e.min,o=e.max,l=e.random;function s(W,Q){if(W=W||"",Q=Q||{},W instanceof s)return W;if(!(this instanceof s))return new s(W,Q);var $=u(W);this._originalInput=W,this._r=$.r,this._g=$.g,this._b=$.b,this._a=$.a,this._roundA=a(100*this._a)/100,this._format=Q.format||$.format,this._gradientType=Q.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=$.ok,this._tc_id=n++}s.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),Q,$,Me,Fe,Oe,fr;return Q=W.r/255,$=W.g/255,Me=W.b/255,Q<=.03928?Fe=Q/12.92:Fe=e.pow((Q+.055)/1.055,2.4),$<=.03928?Oe=$/12.92:Oe=e.pow(($+.055)/1.055,2.4),Me<=.03928?fr=Me/12.92:fr=e.pow((Me+.055)/1.055,2.4),.2126*Fe+.7152*Oe+.0722*fr},setAlpha:function(W){return this._a=K(W),this._roundA=a(100*this._a)/100,this},toHsv:function(){var W=d(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=d(this._r,this._g,this._b),Q=a(W.h*360),$=a(W.s*100),Me=a(W.v*100);return this._a==1?"hsv("+Q+", "+$+"%, "+Me+"%)":"hsva("+Q+", "+$+"%, "+Me+"%, "+this._roundA+")"},toHsl:function(){var W=v(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=v(this._r,this._g,this._b),Q=a(W.h*360),$=a(W.s*100),Me=a(W.l*100);return this._a==1?"hsl("+Q+", "+$+"%, "+Me+"%)":"hsla("+Q+", "+$+"%, "+Me+"%, "+this._roundA+")"},toHex:function(W){return g(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return y(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(re(this._r,255)*100)+"%",g:a(re(this._g,255)*100)+"%",b:a(re(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+a(re(this._r,255)*100)+"%, "+a(re(this._g,255)*100)+"%, "+a(re(this._b,255)*100)+"%)":"rgba("+a(re(this._r,255)*100)+"%, "+a(re(this._g,255)*100)+"%, "+a(re(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ee[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var Q="#"+x(this._r,this._g,this._b,this._a),$=Q,Me=this._gradientType?"GradientType = 1, ":"";if(W){var Fe=s(W);$="#"+x(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+Me+"startColorstr="+Q+",endColorstr="+$+")"},toString:function(W){var Q=!!W;W=W||this._format;var $=!1,Me=this._a<1&&this._a>=0,Fe=!Q&&Me&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return Fe?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&($=this.toRgbString()),W==="prgb"&&($=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&($=this.toHexString()),W==="hex3"&&($=this.toHexString(!0)),W==="hex4"&&($=this.toHex8String(!0)),W==="hex8"&&($=this.toHex8String()),W==="name"&&($=this.toName()),W==="hsl"&&($=this.toHslString()),W==="hsv"&&($=this.toHsvString()),$||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(W,Q){var $=W.apply(null,[this].concat([].slice.call(Q)));return this._r=$._r,this._g=$._g,this._b=$._b,this.setAlpha($._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(T,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(D,arguments)},_applyCombination:function(W,Q){return W.apply(null,[this].concat([].slice.call(Q)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(z,arguments)},monochromatic:function(){return this._applyCombination(X,arguments)},splitcomplement:function(){return this._applyCombination(Y,arguments)},triad:function(){return this._applyCombination(F,arguments)},tetrad:function(){return this._applyCombination(H,arguments)}},s.fromRatio=function(W,Q){if(typeof W=="object"){var $={};for(var Me in W)W.hasOwnProperty(Me)&&(Me==="a"?$[Me]=W[Me]:$[Me]=Ie(W[Me]));W=$}return s(W,Q)};function u(W){var Q={r:0,g:0,b:0},$=1,Me=null,Fe=null,Oe=null,fr=!1,nr=!1;return typeof W=="string"&&(W=Te(W)),typeof W=="object"&&(be(W.r)&&be(W.g)&&be(W.b)?(Q=f(W.r,W.g,W.b),fr=!0,nr=String(W.r).substr(-1)==="%"?"prgb":"rgb"):be(W.h)&&be(W.s)&&be(W.v)?(Me=Ie(W.s),Fe=Ie(W.v),Q=m(W.h,Me,Fe),fr=!0,nr="hsv"):be(W.h)&&be(W.s)&&be(W.l)&&(Me=Ie(W.s),Oe=Ie(W.l),Q=h(W.h,Me,Oe),fr=!0,nr="hsl"),W.hasOwnProperty("a")&&($=W.a)),$=K($),{ok:fr,format:W.format||nr,r:i(255,o(Q.r,0)),g:i(255,o(Q.g,0)),b:i(255,o(Q.b,0)),a:$}}function f(W,Q,$){return{r:re(W,255)*255,g:re(Q,255)*255,b:re($,255)*255}}function v(W,Q,$){W=re(W,255),Q=re(Q,255),$=re($,255);var Me=o(W,Q,$),Fe=i(W,Q,$),Oe,fr,nr=(Me+Fe)/2;if(Me==Fe)Oe=fr=0;else{var Ze=Me-Fe;switch(fr=nr>.5?Ze/(2-Me-Fe):Ze/(Me+Fe),Me){case W:Oe=(Q-$)/Ze+(Q<$?6:0);break;case Q:Oe=($-W)/Ze+2;break;case $:Oe=(W-Q)/Ze+4;break}Oe/=6}return{h:Oe,s:fr,l:nr}}function h(W,Q,$){var Me,Fe,Oe;W=re(W,360),Q=re(Q,100),$=re($,100);function fr(ar,lr,ir){return ir<0&&(ir+=1),ir>1&&(ir-=1),ir<1/6?ar+(lr-ar)*6*ir:ir<1/2?lr:ir<2/3?ar+(lr-ar)*(2/3-ir)*6:ar}if(Q===0)Me=Fe=Oe=$;else{var nr=$<.5?$*(1+Q):$+Q-$*Q,Ze=2*$-nr;Me=fr(Ze,nr,W+1/3),Fe=fr(Ze,nr,W),Oe=fr(Ze,nr,W-1/3)}return{r:Me*255,g:Fe*255,b:Oe*255}}function d(W,Q,$){W=re(W,255),Q=re(Q,255),$=re($,255);var Me=o(W,Q,$),Fe=i(W,Q,$),Oe,fr,nr=Me,Ze=Me-Fe;if(fr=Me===0?0:Ze/Me,Me==Fe)Oe=0;else{switch(Me){case W:Oe=(Q-$)/Ze+(Q<$?6:0);break;case Q:Oe=($-W)/Ze+2;break;case $:Oe=(W-Q)/Ze+4;break}Oe/=6}return{h:Oe,s:fr,v:nr}}function m(W,Q,$){W=re(W,360)*6,Q=re(Q,100),$=re($,100);var Me=e.floor(W),Fe=W-Me,Oe=$*(1-Q),fr=$*(1-Fe*Q),nr=$*(1-(1-Fe)*Q),Ze=Me%6,ar=[$,fr,Oe,Oe,nr,$][Ze],lr=[nr,$,$,fr,Oe,Oe][Ze],ir=[Oe,Oe,nr,$,$,fr][Ze];return{r:ar*255,g:lr*255,b:ir*255}}function g(W,Q,$,Me){var Fe=[Ne(a(W).toString(16)),Ne(a(Q).toString(16)),Ne(a($).toString(16))];return Me&&Fe[0].charAt(0)==Fe[0].charAt(1)&&Fe[1].charAt(0)==Fe[1].charAt(1)&&Fe[2].charAt(0)==Fe[2].charAt(1)?Fe[0].charAt(0)+Fe[1].charAt(0)+Fe[2].charAt(0):Fe.join("")}function y(W,Q,$,Me,Fe){var Oe=[Ne(a(W).toString(16)),Ne(a(Q).toString(16)),Ne(a($).toString(16)),Ne(Se(Me))];return Fe&&Oe[0].charAt(0)==Oe[0].charAt(1)&&Oe[1].charAt(0)==Oe[1].charAt(1)&&Oe[2].charAt(0)==Oe[2].charAt(1)&&Oe[3].charAt(0)==Oe[3].charAt(1)?Oe[0].charAt(0)+Oe[1].charAt(0)+Oe[2].charAt(0)+Oe[3].charAt(0):Oe.join("")}function x(W,Q,$,Me){var Fe=[Ne(Se(Me)),Ne(a(W).toString(16)),Ne(a(Q).toString(16)),Ne(a($).toString(16))];return Fe.join("")}s.equals=function(W,Q){return!W||!Q?!1:s(W).toRgbString()==s(Q).toRgbString()},s.random=function(){return s.fromRatio({r:l(),g:l(),b:l()})};function T(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.s-=Q/100,$.s=fe($.s),s($)}function _(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.s+=Q/100,$.s=fe($.s),s($)}function b(W){return s(W).desaturate(100)}function A(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.l+=Q/100,$.l=fe($.l),s($)}function S(W,Q){Q=Q===0?0:Q||10;var $=s(W).toRgb();return $.r=o(0,i(255,$.r-a(255*-(Q/100)))),$.g=o(0,i(255,$.g-a(255*-(Q/100)))),$.b=o(0,i(255,$.b-a(255*-(Q/100)))),s($)}function M(W,Q){Q=Q===0?0:Q||10;var $=s(W).toHsl();return $.l-=Q/100,$.l=fe($.l),s($)}function D(W,Q){var $=s(W).toHsl(),Me=($.h+Q)%360;return $.h=Me<0?360+Me:Me,s($)}function z(W){var Q=s(W).toHsl();return Q.h=(Q.h+180)%360,s(Q)}function F(W){var Q=s(W).toHsl(),$=Q.h;return[s(W),s({h:($+120)%360,s:Q.s,l:Q.l}),s({h:($+240)%360,s:Q.s,l:Q.l})]}function H(W){var Q=s(W).toHsl(),$=Q.h;return[s(W),s({h:($+90)%360,s:Q.s,l:Q.l}),s({h:($+180)%360,s:Q.s,l:Q.l}),s({h:($+270)%360,s:Q.s,l:Q.l})]}function Y(W){var Q=s(W).toHsl(),$=Q.h;return[s(W),s({h:($+72)%360,s:Q.s,l:Q.l}),s({h:($+216)%360,s:Q.s,l:Q.l})]}function O(W,Q,$){Q=Q||6,$=$||30;var Me=s(W).toHsl(),Fe=360/$,Oe=[s(W)];for(Me.h=(Me.h-(Fe*Q>>1)+720)%360;--Q;)Me.h=(Me.h+Fe)%360,Oe.push(s(Me));return Oe}function X(W,Q){Q=Q||6;for(var $=s(W).toHsv(),Me=$.h,Fe=$.s,Oe=$.v,fr=[],nr=1/Q;Q--;)fr.push(s({h:Me,s:Fe,v:Oe})),Oe=(Oe+nr)%1;return fr}s.mix=function(W,Q,$){$=$===0?0:$||50;var Me=s(W).toRgb(),Fe=s(Q).toRgb(),Oe=$/100,fr={r:(Fe.r-Me.r)*Oe+Me.r,g:(Fe.g-Me.g)*Oe+Me.g,b:(Fe.b-Me.b)*Oe+Me.b,a:(Fe.a-Me.a)*Oe+Me.a};return s(fr)},s.readability=function(W,Q){var $=s(W),Me=s(Q);return(e.max($.getLuminance(),Me.getLuminance())+.05)/(e.min($.getLuminance(),Me.getLuminance())+.05)},s.isReadable=function(W,Q,$){var Me=s.readability(W,Q),Fe,Oe;switch(Oe=!1,Fe=pe($),Fe.level+Fe.size){case"AAsmall":case"AAAlarge":Oe=Me>=4.5;break;case"AAlarge":Oe=Me>=3;break;case"AAAsmall":Oe=Me>=7;break}return Oe},s.mostReadable=function(W,Q,$){var Me=null,Fe=0,Oe,fr,nr,Ze;$=$||{},fr=$.includeFallbackColors,nr=$.level,Ze=$.size;for(var ar=0;arFe&&(Fe=Oe,Me=s(Q[ar]));return s.isReadable(W,Me,{level:nr,size:Ze})||!fr?Me:($.includeFallbackColors=!1,s.mostReadable(W,["#fff","#000"],$))};var V=s.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"},ee=s.hexNames=te(V);function te(W){var Q={};for(var $ in W)W.hasOwnProperty($)&&(Q[W[$]]=$);return Q}function K(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function re(W,Q){qe(W)&&(W="100%");var $=Be(W);return W=i(Q,o(0,parseFloat(W))),$&&(W=parseInt(W*Q,10)/100),e.abs(W-Q)<1e-6?1:W%Q/parseFloat(Q)}function fe(W){return i(1,o(0,W))}function de(W){return parseInt(W,16)}function qe(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function Be(W){return typeof W=="string"&&W.indexOf("%")!=-1}function Ne(W){return W.length==1?"0"+W:""+W}function Ie(W){return W<=1&&(W=W*100+"%"),W}function Se(W){return e.round(parseFloat(W)*255).toString(16)}function Xe(W){return de(W)/255}var se=function(){var W="[-\\+]?\\d+%?",Q="[-\\+]?\\d*\\.\\d+%?",$="(?:"+Q+")|(?:"+W+")",Me="[\\s|\\(]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")\\s*\\)?",Fe="[\\s|\\(]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")[,|\\s]+("+$+")\\s*\\)?";return{CSS_UNIT:new RegExp($),rgb:new RegExp("rgb"+Me),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+Me),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+Me),hsva:new RegExp("hsva"+Fe),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 be(W){return!!se.CSS_UNIT.exec(W)}function Te(W){W=W.replace(r,"").replace(t,"").toLowerCase();var Q=!1;if(V[W])W=V[W],Q=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var $;return($=se.rgb.exec(W))?{r:$[1],g:$[2],b:$[3]}:($=se.rgba.exec(W))?{r:$[1],g:$[2],b:$[3],a:$[4]}:($=se.hsl.exec(W))?{h:$[1],s:$[2],l:$[3]}:($=se.hsla.exec(W))?{h:$[1],s:$[2],l:$[3],a:$[4]}:($=se.hsv.exec(W))?{h:$[1],s:$[2],v:$[3]}:($=se.hsva.exec(W))?{h:$[1],s:$[2],v:$[3],a:$[4]}:($=se.hex8.exec(W))?{r:de($[1]),g:de($[2]),b:de($[3]),a:Xe($[4]),format:Q?"name":"hex8"}:($=se.hex6.exec(W))?{r:de($[1]),g:de($[2]),b:de($[3]),format:Q?"name":"hex"}:($=se.hex4.exec(W))?{r:de($[1]+""+$[1]),g:de($[2]+""+$[2]),b:de($[3]+""+$[3]),a:Xe($[4]+""+$[4]),format:Q?"name":"hex8"}:($=se.hex3.exec(W))?{r:de($[1]+""+$[1]),g:de($[2]+""+$[2]),b:de($[3]+""+$[3]),format:Q?"name":"hex"}:!1}function pe(W){var Q,$;return W=W||{level:"AA",size:"small"},Q=(W.level||"AA").toUpperCase(),$=(W.size||"small").toLowerCase(),Q!=="AA"&&Q!=="AAA"&&(Q="AA"),$!=="small"&&$!=="large"&&($="small"),{level:Q,size:$}}typeof od!="undefined"&&od.exports?od.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var la=ne(r1=>{"use strict";var b6=Gs(),Qv=Array.isArray;function cH(e,r){var t,n;for(t=0;t{"use strict";_6.exports=function(e){var r=e.variantValues,t=e.editType,n=e.colorEditType;n===void 0&&(n=t);var a={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:n},weight:a,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var t1=ne((nle,x6)=>{"use strict";x6.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var _0=ne((ale,A6)=>{"use strict";var w6=t1(),M6=$a(),Sy=M6({editType:"none"});Sy.family.dflt=w6.HOVERFONT;Sy.size.dflt=w6.HOVERFONTSIZE;A6.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:Sy,grouptitlefont:M6({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var ud=ne((ile,T6)=>{"use strict";var vH=$a(),ld=_0().hoverlabel,sd=la().extendFlat;T6.exports={hoverlabel:{bgcolor:sd({},ld.bgcolor,{arrayOk:!0}),bordercolor:sd({},ld.bordercolor,{arrayOk:!0}),font:vH({arrayOk:!0,editType:"none"}),align:sd({},ld.align,{arrayOk:!0}),namelength:sd({},ld.namelength,{arrayOk:!0}),editType:"none"}}});var bo=ne((ole,k6)=>{"use strict";var hH=$a(),dH=ud();k6.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:hH({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:dH.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 Jf=ne((lle,L6)=>{"use strict";var pH=Jl(),fd={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)"]]},S6=fd.RdBu;function gH(e,r){if(r||(r=S6),!e)return r;function t(){try{e=fd[e]||JSON.parse(e)}catch(n){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),C6(e)?e:r}function C6(e){var r=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 t=0;t{"use strict";$f.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];$f.defaultLine="#444";$f.lightLine="#eee";$f.background="#fff";$f.borderLine="#BEC8D9";$f.lightFraction=100*10/11});var zt=ne((ule,q6)=>{"use strict";var Li=Jl(),yH=Bt(),bH=Ji().isTypedArray,ma=q6.exports={},cd=cl();ma.defaults=cd.defaults;var _H=ma.defaultLine=cd.defaultLine;ma.lightLine=cd.lightLine;var Ly=ma.background=cd.background;ma.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};ma.rgb=function(e){return ma.tinyRGB(Li(e))};ma.opacity=function(e){return e?Li(e).getAlpha():0};ma.addOpacity=function(e,r){var t=Li(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};ma.combine=function(e,r){var t=Li(e).toRgb();if(t.a===1)return Li(e).toRgbString();var n=Li(r||Ly).toRgb(),a=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},i={r:a.r*(1-t.a)+t.r*t.a,g:a.g*(1-t.a)+t.g*t.a,b:a.b*(1-t.a)+t.b*t.a};return Li(i).toRgbString()};ma.interpolate=function(e,r,t){var n=Li(e).toRgb(),a=Li(r).toRgb(),i={r:t*n.r+(1-t)*a.r,g:t*n.g+(1-t)*a.g,b:t*n.b+(1-t)*a.b};return Li(i).toRgbString()};ma.contrast=function(e,r,t){var n=Li(e);n.getAlpha()!==1&&(n=Li(ma.combine(e,Ly)));var a=n.isDark()?r?n.lighten(r):Ly:t?n.darken(t):_H;return a.toString()};ma.stroke=function(e,r){var t=Li(r);e.style({stroke:ma.tinyRGB(t),"stroke-opacity":t.getAlpha()})};ma.fill=function(e,r){var t=Li(r);e.style({fill:ma.tinyRGB(t),"fill-opacity":t.getAlpha()})};ma.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,n,a,i;for(t=0;t=0)))return e;if(i===3)n[i]>1&&(n[i]=1);else if(n[i]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return a?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var vd=ne((fle,D6)=>{"use strict";D6.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var x0=ne(E6=>{"use strict";E6.counter=function(e,r,t,n){var a=(r||"")+(t?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+a)}});var N6=ne(qi=>{"use strict";var qy=Bt(),P6=Jl(),R6=la().extendFlat,xH=bo(),wH=Jf(),MH=zt(),AH=vd().DESELECTDIM,w0=$v(),z6=x0().counter,TH=b0().modHalf,$l=Ji().isArrayOrTypedArray,Du=Ji().isTypedArraySpec,Eu=Ji().decodeTypedArraySpec;qi.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set($l(e)?e:Du(e)?Eu(e):t)}},enumerated:{coerceFunction:function(e,r,t,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,n=0;nn.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}Du(e)&&(e=Eu(e)),e%1||!qy(e)||n.min!==void 0&&en.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?r.set(t):r.set(String(e))}else n.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Du(e)&&(e=Eu(e)),P6(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function n(a){return P6(a).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(n)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(wH.get(e,t))}},angle:{coerceFunction:function(e,r,t){Du(e)&&(e=Eu(e)),e==="auto"?r.set("auto"):qy(e)?r.set(TH(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,n){var a=n.regex||z6(t);if(typeof e=="string"&&a.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!z6(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var a=e.split("+"),i=0;i{"use strict";var F6={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/"},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:{}}},I6={};function H6(e,r){for(var t in e){var n=e[t];n.valType?r[t]=n.dflt:(r[t]||(r[t]={}),H6(n,r[t]))}}H6(F6,I6);B6.exports={configAttributes:F6,dfltConfig:I6}});var Ey=ne((dle,O6)=>{"use strict";var Dy=kt(),kH=Bt(),n1=[];O6.exports=function(e,r){if(n1.indexOf(e)!==-1)return;n1.push(e);var t=1e3;kH(r)?t=r:r==="long"&&(t=3e3);var n=Dy.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(n1);function i(o){o.duration(700).style("opacity",0).each("end",function(l){var s=n1.indexOf(l);s!==-1&&n1.splice(s,1),Dy.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Dy.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(i)});for(var s=l.append("p"),u=o.split(//g),f=0;f{"use strict";var M0=Kf().dfltConfig,Py=Ey(),Ry=U6.exports={};Ry.log=function(){var e;if(M0.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};Ry.warn=function(){var e;if(M0.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};Ry.error=function(){var e;if(M0.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var dd=ne((gle,Y6)=>{"use strict";Y6.exports=function(){}});var zy=ne((mle,G6)=>{"use strict";G6.exports=function(r,t){if(t instanceof RegExp){for(var n=t.toString(),a=0;a{V6.exports=SH;function SH(){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 X6=ne((ble,Z6)=>{Z6.exports=CH;function CH(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var J6=ne((_le,j6)=>{j6.exports=LH;function LH(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var Ny=ne((xle,$6)=>{$6.exports=qH;function qH(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 Q6=ne((wle,K6)=>{K6.exports=DH;function DH(e,r){if(e===r){var t=r[1],n=r[2],a=r[3],i=r[6],o=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=n,e[9]=i,e[11]=r[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var rx=ne((Mle,ex)=>{ex.exports=EH;function EH(e,r){var t=r[0],n=r[1],a=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],x=r[15],T=t*l-n*o,_=t*s-a*o,b=t*u-i*o,A=n*s-a*l,S=n*u-i*l,M=a*u-i*s,D=f*g-v*m,z=f*y-h*m,F=f*x-d*m,H=v*y-h*g,Y=v*x-d*g,O=h*x-d*y,X=T*O-_*Y+b*H+A*F-S*z+M*D;return X?(X=1/X,e[0]=(l*O-s*Y+u*H)*X,e[1]=(a*Y-n*O-i*H)*X,e[2]=(g*M-y*S+x*A)*X,e[3]=(h*S-v*M-d*A)*X,e[4]=(s*F-o*O-u*z)*X,e[5]=(t*O-a*F+i*z)*X,e[6]=(y*b-m*M-x*_)*X,e[7]=(f*M-h*b+d*_)*X,e[8]=(o*Y-l*F+u*D)*X,e[9]=(n*F-t*Y-i*D)*X,e[10]=(m*S-g*b+x*T)*X,e[11]=(v*b-f*S-d*T)*X,e[12]=(l*z-o*H-s*D)*X,e[13]=(t*H-n*z+a*D)*X,e[14]=(g*_-m*A-y*T)*X,e[15]=(f*A-v*_+h*T)*X,e):null}});var nx=ne((Ale,tx)=>{tx.exports=PH;function PH(e,r){var t=r[0],n=r[1],a=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],v=r[9],h=r[10],d=r[11],m=r[12],g=r[13],y=r[14],x=r[15];return e[0]=l*(h*x-d*y)-v*(s*x-u*y)+g*(s*d-u*h),e[1]=-(n*(h*x-d*y)-v*(a*x-i*y)+g*(a*d-i*h)),e[2]=n*(s*x-u*y)-l*(a*x-i*y)+g*(a*u-i*s),e[3]=-(n*(s*d-u*h)-l*(a*d-i*h)+v*(a*u-i*s)),e[4]=-(o*(h*x-d*y)-f*(s*x-u*y)+m*(s*d-u*h)),e[5]=t*(h*x-d*y)-f*(a*x-i*y)+m*(a*d-i*h),e[6]=-(t*(s*x-u*y)-o*(a*x-i*y)+m*(a*u-i*s)),e[7]=t*(s*d-u*h)-o*(a*d-i*h)+f*(a*u-i*s),e[8]=o*(v*x-d*g)-f*(l*x-u*g)+m*(l*d-u*v),e[9]=-(t*(v*x-d*g)-f*(n*x-i*g)+m*(n*d-i*v)),e[10]=t*(l*x-u*g)-o*(n*x-i*g)+m*(n*u-i*l),e[11]=-(t*(l*d-u*v)-o*(n*d-i*v)+f*(n*u-i*l)),e[12]=-(o*(v*y-h*g)-f*(l*y-s*g)+m*(l*h-s*v)),e[13]=t*(v*y-h*g)-f*(n*y-a*g)+m*(n*h-a*v),e[14]=-(t*(l*y-s*g)-o*(n*y-a*g)+m*(n*s-a*l)),e[15]=t*(l*h-s*v)-o*(n*h-a*v)+f*(n*s-a*l),e}});var ix=ne((Tle,ax)=>{ax.exports=RH;function RH(e){var r=e[0],t=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],f=e[9],v=e[10],h=e[11],d=e[12],m=e[13],g=e[14],y=e[15],x=r*o-t*i,T=r*l-n*i,_=r*s-a*i,b=t*l-n*o,A=t*s-a*o,S=n*s-a*l,M=u*m-f*d,D=u*g-v*d,z=u*y-h*d,F=f*g-v*m,H=f*y-h*m,Y=v*y-h*g;return x*Y-T*H+_*F+b*z-A*D+S*M}});var lx=ne((kle,ox)=>{ox.exports=zH;function zH(e,r,t){var n=r[0],a=r[1],i=r[2],o=r[3],l=r[4],s=r[5],u=r[6],f=r[7],v=r[8],h=r[9],d=r[10],m=r[11],g=r[12],y=r[13],x=r[14],T=r[15],_=t[0],b=t[1],A=t[2],S=t[3];return e[0]=_*n+b*l+A*v+S*g,e[1]=_*a+b*s+A*h+S*y,e[2]=_*i+b*u+A*d+S*x,e[3]=_*o+b*f+A*m+S*T,_=t[4],b=t[5],A=t[6],S=t[7],e[4]=_*n+b*l+A*v+S*g,e[5]=_*a+b*s+A*h+S*y,e[6]=_*i+b*u+A*d+S*x,e[7]=_*o+b*f+A*m+S*T,_=t[8],b=t[9],A=t[10],S=t[11],e[8]=_*n+b*l+A*v+S*g,e[9]=_*a+b*s+A*h+S*y,e[10]=_*i+b*u+A*d+S*x,e[11]=_*o+b*f+A*m+S*T,_=t[12],b=t[13],A=t[14],S=t[15],e[12]=_*n+b*l+A*v+S*g,e[13]=_*a+b*s+A*h+S*y,e[14]=_*i+b*u+A*d+S*x,e[15]=_*o+b*f+A*m+S*T,e}});var ux=ne((Sle,sx)=>{sx.exports=NH;function NH(e,r,t){var n=t[0],a=t[1],i=t[2],o,l,s,u,f,v,h,d,m,g,y,x;return r===e?(e[12]=r[0]*n+r[4]*a+r[8]*i+r[12],e[13]=r[1]*n+r[5]*a+r[9]*i+r[13],e[14]=r[2]*n+r[6]*a+r[10]*i+r[14],e[15]=r[3]*n+r[7]*a+r[11]*i+r[15]):(o=r[0],l=r[1],s=r[2],u=r[3],f=r[4],v=r[5],h=r[6],d=r[7],m=r[8],g=r[9],y=r[10],x=r[11],e[0]=o,e[1]=l,e[2]=s,e[3]=u,e[4]=f,e[5]=v,e[6]=h,e[7]=d,e[8]=m,e[9]=g,e[10]=y,e[11]=x,e[12]=o*n+f*a+m*i+r[12],e[13]=l*n+v*a+g*i+r[13],e[14]=s*n+h*a+y*i+r[14],e[15]=u*n+d*a+x*i+r[15]),e}});var cx=ne((Cle,fx)=>{fx.exports=FH;function FH(e,r,t){var n=t[0],a=t[1],i=t[2];return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[3]=r[3]*n,e[4]=r[4]*a,e[5]=r[5]*a,e[6]=r[6]*a,e[7]=r[7]*a,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var hx=ne((Lle,vx)=>{vx.exports=IH;function IH(e,r,t,n){var a=n[0],i=n[1],o=n[2],l=Math.sqrt(a*a+i*i+o*o),s,u,f,v,h,d,m,g,y,x,T,_,b,A,S,M,D,z,F,H,Y,O,X,V;return Math.abs(l)<1e-6?null:(l=1/l,a*=l,i*=l,o*=l,s=Math.sin(t),u=Math.cos(t),f=1-u,v=r[0],h=r[1],d=r[2],m=r[3],g=r[4],y=r[5],x=r[6],T=r[7],_=r[8],b=r[9],A=r[10],S=r[11],M=a*a*f+u,D=i*a*f+o*s,z=o*a*f-i*s,F=a*i*f-o*s,H=i*i*f+u,Y=o*i*f+a*s,O=a*o*f+i*s,X=i*o*f-a*s,V=o*o*f+u,e[0]=v*M+g*D+_*z,e[1]=h*M+y*D+b*z,e[2]=d*M+x*D+A*z,e[3]=m*M+T*D+S*z,e[4]=v*F+g*H+_*Y,e[5]=h*F+y*H+b*Y,e[6]=d*F+x*H+A*Y,e[7]=m*F+T*H+S*Y,e[8]=v*O+g*X+_*V,e[9]=h*O+y*X+b*V,e[10]=d*O+x*X+A*V,e[11]=m*O+T*X+S*V,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var px=ne((qle,dx)=>{dx.exports=HH;function HH(e,r,t){var n=Math.sin(t),a=Math.cos(t),i=r[4],o=r[5],l=r[6],s=r[7],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*a+u*n,e[5]=o*a+f*n,e[6]=l*a+v*n,e[7]=s*a+h*n,e[8]=u*a-i*n,e[9]=f*a-o*n,e[10]=v*a-l*n,e[11]=h*a-s*n,e}});var mx=ne((Dle,gx)=>{gx.exports=BH;function BH(e,r,t){var n=Math.sin(t),a=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[8],f=r[9],v=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*a-u*n,e[1]=o*a-f*n,e[2]=l*a-v*n,e[3]=s*a-h*n,e[8]=i*n+u*a,e[9]=o*n+f*a,e[10]=l*n+v*a,e[11]=s*n+h*a,e}});var bx=ne((Ele,yx)=>{yx.exports=OH;function OH(e,r,t){var n=Math.sin(t),a=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[4],f=r[5],v=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*a+u*n,e[1]=o*a+f*n,e[2]=l*a+v*n,e[3]=s*a+h*n,e[4]=u*a-i*n,e[5]=f*a-o*n,e[6]=v*a-l*n,e[7]=h*a-s*n,e}});var xx=ne((Ple,_x)=>{_x.exports=UH;function UH(e,r,t){var n,a,i,o=t[0],l=t[1],s=t[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,l*=u,s*=u,n=Math.sin(r),a=Math.cos(r),i=1-a,e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Mx=ne((Rle,wx)=>{wx.exports=YH;function YH(e,r,t){var n=r[0],a=r[1],i=r[2],o=r[3],l=n+n,s=a+a,u=i+i,f=n*l,v=n*s,h=n*u,d=a*s,m=a*u,g=i*u,y=o*l,x=o*s,T=o*u;return e[0]=1-(d+g),e[1]=v+T,e[2]=h-x,e[3]=0,e[4]=v-T,e[5]=1-(f+g),e[6]=m+y,e[7]=0,e[8]=h+x,e[9]=m-y,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Tx=ne((zle,Ax)=>{Ax.exports=GH;function GH(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Sx=ne((Nle,kx)=>{kx.exports=VH;function VH(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Lx=ne((Fle,Cx)=>{Cx.exports=WH;function WH(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Dx=ne((Ile,qx)=>{qx.exports=ZH;function ZH(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Px=ne((Hle,Ex)=>{Ex.exports=XH;function XH(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,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 Fy=ne((Ble,Rx)=>{Rx.exports=jH;function jH(e,r){var t=r[0],n=r[1],a=r[2],i=r[3],o=t+t,l=n+n,s=a+a,u=t*o,f=n*o,v=n*l,h=a*o,d=a*l,m=a*s,g=i*o,y=i*l,x=i*s;return e[0]=1-v-m,e[1]=f+x,e[2]=h-y,e[3]=0,e[4]=f-x,e[5]=1-u-m,e[6]=d+g,e[7]=0,e[8]=h+y,e[9]=d-g,e[10]=1-u-v,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Nx=ne((Ole,zx)=>{zx.exports=JH;function JH(e,r,t,n,a,i,o){var l=1/(t-r),s=1/(a-n),u=1/(i-o);return e[0]=i*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(a+n)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var Ix=ne((Ule,Fx)=>{Fx.exports=$H;function $H(e,r,t,n,a){var i=1/Math.tan(r/2),o=1/(n-a);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var Bx=ne((Yle,Hx)=>{Hx.exports=KH;function KH(e,r,t,n){var a=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),o=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-l)*s*.5),e[9]=(a-i)*u*.5,e[10]=n/(t-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*t/(t-n),e[15]=0,e}});var Ux=ne((Gle,Ox)=>{Ox.exports=QH;function QH(e,r,t,n,a,i,o){var l=1/(r-t),s=1/(n-a),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(a+n)*s,e[14]=(o+i)*u,e[15]=1,e}});var Gx=ne((Vle,Yx)=>{var eB=Ny();Yx.exports=rB;function rB(e,r,t,n){var a,i,o,l,s,u,f,v,h,d,m=r[0],g=r[1],y=r[2],x=n[0],T=n[1],_=n[2],b=t[0],A=t[1],S=t[2];return Math.abs(m-b)<1e-6&&Math.abs(g-A)<1e-6&&Math.abs(y-S)<1e-6?eB(e):(f=m-b,v=g-A,h=y-S,d=1/Math.sqrt(f*f+v*v+h*h),f*=d,v*=d,h*=d,a=T*h-_*v,i=_*f-x*h,o=x*v-T*f,d=Math.sqrt(a*a+i*i+o*o),d?(d=1/d,a*=d,i*=d,o*=d):(a=0,i=0,o=0),l=v*o-h*i,s=h*a-f*o,u=f*i-v*a,d=Math.sqrt(l*l+s*s+u*u),d?(d=1/d,l*=d,s*=d,u*=d):(l=0,s=0,u=0),e[0]=a,e[1]=l,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=v,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(a*m+i*g+o*y),e[13]=-(l*m+s*g+u*y),e[14]=-(f*m+v*g+h*y),e[15]=1,e)}});var Wx=ne((Wle,Vx)=>{Vx.exports=tB;function tB(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 Iy=ne((Zle,Zx)=>{Zx.exports={create:W6(),clone:X6(),copy:J6(),identity:Ny(),transpose:Q6(),invert:rx(),adjoint:nx(),determinant:ix(),multiply:lx(),translate:ux(),scale:cx(),rotate:hx(),rotateX:px(),rotateY:mx(),rotateZ:bx(),fromRotation:xx(),fromRotationTranslation:Mx(),fromScaling:Tx(),fromTranslation:Sx(),fromXRotation:Lx(),fromYRotation:Dx(),fromZRotation:Px(),fromQuat:Fy(),frustum:Nx(),perspective:Ix(),perspectiveFromFieldOfView:Bx(),ortho:Ux(),lookAt:Gx(),str:Wx()}});var pd=ne(Xn=>{"use strict";var nB=Iy();Xn.init2dArray=function(e,r){for(var t=new Array(e),n=0;n{"use strict";var aB=kt(),Xx=Pu(),iB=pd(),oB=Iy();function lB(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function sB(e){var r=aB.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function jx(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function uB(e,r){Jx("global",e,r)}function Jx(e,r,t){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):Xx.warn("addStyleRule failed"):Xx.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function fB(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&jx(t)}function cB(e,r,t,n,a){var i=n.split(":"),o=a.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(l)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[o[0]]=o[1])}),s.setAttribute(l,!0))})}function vB(e){var r=Kx(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(n){var a=$x(n);if(a){var i=iB.convertCssMatrix(a);t=oB.multiply(t,t,i)}}),t}function $x(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function Kx(e){for(var r=[];hB(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function hB(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function dB(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}Qx.exports={getGraphDiv:lB,isPlotDiv:sB,removeElement:jx,addStyleRule:uB,addRelatedStyleRule:Jx,deleteRelatedStyleRule:fB,setStyleOnHover:cB,getFullTransformMatrix:vB,getElementTransformMatrix:$x,getElementAndAncestors:Kx,equalDomRects:dB}});var i1=ne((Jle,e7)=>{"use strict";e7.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 _o=ne(($le,l7)=>{"use strict";var t7=la().extendFlat,pB=Gs(),n7={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},a7={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},gB=n7.flags.slice().concat(["fullReplot"]),mB=a7.flags.slice().concat("layoutReplot");l7.exports={traces:n7,layout:a7,traceFlags:function(){return r7(gB)},layoutFlags:function(){return r7(mB)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var n=t.split("+"),a=0;a{"use strict";Hy.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Hy.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 By=ne((Qle,s7)=>{"use strict";s7.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 Ru=ne(gd=>{"use strict";var u7=By(),ese=u7.FORMAT_LINK,rse=u7.DATE_FORMAT_LINK;function Oy(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var n=[],a=0;a{"use strict";function zu(e,r){return r?r.d2l(e):e}function f7(e,r){return r?r.l2d(e):e}function yB(e){return e.x0}function bB(e){return e.x1}function _B(e){return e.y0}function xB(e){return e.y1}function c7(e){return e.x0shift||0}function v7(e){return e.x1shift||0}function h7(e){return e.y0shift||0}function d7(e){return e.y1shift||0}function md(e,r){return zu(e.x1,r)+v7(e)-zu(e.x0,r)-c7(e)}function yd(e,r,t){return zu(e.y1,t)+d7(e)-zu(e.y0,t)-h7(e)}function wB(e,r){return Math.abs(md(e,r))}function MB(e,r,t){return Math.abs(yd(e,r,t))}function AB(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(md(e,r),2)+Math.pow(yd(e,r,t),2))}function TB(e,r){return f7((zu(e.x1,r)+v7(e)+zu(e.x0,r)+c7(e))/2,r)}function kB(e,r,t){return f7((zu(e.y1,t)+d7(e)+zu(e.y0,t)+h7(e))/2,t)}function SB(e,r,t){return e.type!=="line"?void 0:yd(e,r,t)/md(e,r)}p7.exports={x0:yB,x1:bB,y0:_B,y1:xB,slope:SB,dx:md,dy:yd,width:wB,height:MB,length:AB,xcenter:TB,ycenter:kB}});var y7=ne((ase,m7)=>{"use strict";var CB=_o().overrideAll,Qf=bo(),g7=$a(),LB=Kl().dash,Nu=la().extendFlat,qB=Ru().shapeTexttemplateAttrs,DB=bd();m7.exports=CB({newshape:{visible:Nu({},Qf.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Nu({},Qf.legend,{}),legendgroup:Nu({},Qf.legendgroup,{}),legendgrouptitle:{text:Nu({},Qf.legendgrouptitle.text,{}),font:g7({})},legendrank:Nu({},Qf.legendrank,{}),legendwidth:Nu({},Qf.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Nu({},LB,{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:Nu({},Qf.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:qB({newshape:!0},{keys:Object.keys(DB)}),font:g7({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var _7=ne((ise,b7)=>{"use strict";var EB=Kl().dash,PB=la().extendFlat;b7.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:PB({},EB,{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 _d=ne((ose,x7)=>{"use strict";x7.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var A0=ne((lse,T7)=>{"use strict";var Uy=$a(),RB=i1(),xd=cl(),w7=y7(),M7=_7(),zB=_d(),A7=la().extendFlat,wd=Uy({editType:"calc"});wd.family.dflt='"Open Sans", verdana, arial, sans-serif';wd.size.dflt=12;wd.color.dflt=xd.defaultLine;T7.exports={font:wd,title:{text:{valType:"string",editType:"layoutstyle"},font:Uy({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Uy({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:A7(zB({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:xd.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:xd.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:xd.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:"plot"},newshape:w7.newshape,activeshape:w7.activeshape,newselection:M7.newselection,activeselection:M7.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:A7({},RB.transition,{editType:"none"})}});var k7=U_(()=>{});var NB={};var S7=U_(()=>{k7()});var dt=ne(Dt=>{"use strict";var T0=Pu(),C7=dd(),L7=zy(),FB=Gs(),IB=a1().addStyleRule,q7=la(),HB=bo(),BB=A0(),OB=q7.extendFlat,Yy=q7.extendDeepAll;Dt.modules={};Dt.allCategories={};Dt.allTypes=[];Dt.subplotsRegistry={};Dt.componentsRegistry={};Dt.layoutArrayContainers=[];Dt.layoutArrayRegexes=[];Dt.traceLayoutAttributes={};Dt.localeRegistry={};Dt.apiMethodRegistry={};Dt.collectableSubplotTypes=null;Dt.register=function(r){if(Dt.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var ZB=m0().timeFormat,O7=Bt(),Gy=Pu(),Iu=b0().mod,C0=En(),xo=C0.BADNUM,Di=C0.ONEDAY,o1=C0.ONEHOUR,Fu=C0.ONEMIN,S0=C0.ONESEC,l1=C0.EPOCHJD,Vs=dt(),z7=m0().utcFormat,XB=/^\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,jB=/^\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,N7=new Date().getFullYear()-70;function Ws(e){return e&&Vs.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}jn.dateTick0=function(e,r){var t=JB(e,!!r);if(r<2)return t;var n=jn.dateTime2ms(t,e);return n+=Di*(r-1),jn.ms2DateTime(n,0,e)};function JB(e,r){return Ws(e)?r?Vs.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Vs.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}jn.dfltRange=function(e){return Ws(e)?Vs.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};jn.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Ad,Td;jn.dateTime2ms=function(e,r){if(jn.isJSDate(e)){var t=e.getTimezoneOffset()*Fu,n=(e.getUTCMinutes()-e.getMinutes())*Fu+(e.getUTCSeconds()-e.getSeconds())*S0+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*Fu;t=t-a/2+Iu(n-t+a/2,a)}return e=Number(e)-t,e>=Ad&&e<=Td?e:xo}if(typeof e!="string"&&typeof e!="number")return xo;e=String(e);var i=Ws(r),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.substr(1),r="");var l=i&&r.substr(0,7)==="chinese",s=e.match(l?jB:XB);if(!s)return xo;var u=s[1],f=s[3]||"1",v=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),m=Number(s[11]||0);if(i){if(u.length===2)return xo;u=Number(u);var g;try{var y=Vs.getComponentMethod("calendars","getCal")(r);if(l){var x=f.charAt(f.length-1)==="i";f=parseInt(f,10),g=y.newDate(u,y.toMonthIndex(u,f,x),v)}else g=y.newDate(u,Number(f),v)}catch(_){return xo}return g?(g.toJD()-l1)*Di+h*o1+d*Fu+m*S0:xo}u.length===2?u=(Number(u)+2e3-N7)%100+N7:u=Number(u),f-=1;var T=new Date(Date.UTC(2e3,f,v,h,d));return T.setUTCFullYear(u),T.getUTCMonth()!==f||T.getUTCDate()!==v?xo:T.getTime()+m*S0};Ad=jn.MIN_MS=jn.dateTime2ms("-9999");Td=jn.MAX_MS=jn.dateTime2ms("9999-12-31 23:59:59.9999");jn.isDateTime=function(e,r){return jn.dateTime2ms(e,r)!==xo};function k0(e,r){return String(e+Math.pow(10,r)).substr(1)}var Md=90*Di,F7=3*o1,I7=5*Fu;jn.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Ad&&e<=Td))return xo;r||(r=0);var n=Math.floor(Iu(e+.05,1)*10),a=Math.round(e-n/10),i,o,l,s,u,f;if(Ws(t)){var v=Math.floor(a/Di)+l1,h=Math.floor(Iu(e,Di));try{i=Vs.getComponentMethod("calendars","getCal")(t).fromJD(v).formatDate("yyyy-mm-dd")}catch(d){i=z7("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=r=Ad+Di&&e<=Td-Di))return xo;var r=Math.floor(Iu(e+.05,1)*10),t=new Date(Math.round(e-r/10)),n=ZB("%Y-%m-%d")(t),a=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return U7(n,a,i,o,l)};function U7(e,r,t,n,a){if((r||t||n||a)&&(e+=" "+k0(r,2)+":"+k0(t,2),(n||a)&&(e+=":"+k0(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+k0(a,i)}return e}jn.cleanDate=function(e,r,t){if(e===xo)return r;if(jn.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Ws(t))return Gy.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=jn.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!jn.isDateTime(e,t))return Gy.error("unrecognized date",e),r;return e};var $B=/%\d?f/g,KB=/%h/g,QB={1:"1",2:"1",3:"2",4:"2"};function H7(e,r,t,n){e=e.replace($B,function(i){var o=Math.min(+i.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return l});var a=new Date(Math.floor(r+.05));if(e=e.replace(KB,function(){return QB[t("%q")(a)]}),Ws(n))try{e=Vs.getComponentMethod("calendars","worldCalFmt")(e,r,n)}catch(i){return"Invalid"}return t(e)(a)}var eO=[59,59.9,59.99,59.999,59.9999];function rO(e,r){var t=Iu(e+.05,Di),n=k0(Math.floor(t/o1),2)+":"+k0(Iu(Math.floor(t/Fu),60),2);if(r!=="M"){O7(r)||(r=0);var a=Math.min(Iu(e/S0,60),eO[r]),i=(100+a).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}jn.formatDate=function(e,r,t,n,a,i){if(a=Ws(a)&&a,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` `+i.year;else return rO(e,t)+` -`+H7(i.dayMonthYear,e,n,a);return H7(r,e,n,a)};var B7=3*Di;jn.incrementMonth=function(e,r,t){t=Ws(t)&&t;var n=Iu(e,Di);if(e=Math.round(e-n),t)try{var a=Math.round(e/Di)+l1,i=Vs.getComponentMethod("calendars","getCal")(t),o=i.fromJD(a);return r%12?i.add(o,r,"m"):i.add(o,r/12,"y"),(o.toJD()-l1)*Di+n}catch(s){Gy.error("invalid ms "+e+" in calendar "+t)}var l=new Date(e+B7);return l.setUTCMonth(l.getUTCMonth()+r)+n-B7};jn.findExactDates=function(e,r){for(var t=0,n=0,a=0,i=0,o,l,s=Ws(r)&&Vs.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";G7.exports=function(r){return r}});var Wy=te(Zs=>{"use strict";var tO=Bt(),nO=Pu(),aO=kd(),iO=En().BADNUM,Vy=1e-9;Zs.findBin=function(e,r,t){if(tO(r.start))return t?Math.ceil((e-r.start)/r.size-Vy)-1:Math.floor((e-r.start)/r.size+Vy);var n=0,a=r.length,i=0,o=a>1?(r[a-1]-r[0])/(a-1):1,l,s;for(o>=0?s=t?oO:lO:s=t?uO:sO,e+=o*Vy*(t?-1:1)*(o>=0?1:-1);n90&&nO.log("Long binary search..."),n-1};function oO(e,r){return er}function uO(e,r){return e>=r}Zs.sorterAsc=function(e,r){return e-r};Zs.sorterDes=function(e,r){return r-e};Zs.distinctVals=function(e){var r=e.slice();r.sort(Zs.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===iO;t--);for(var n=r[t]-r[0]||1,a=n/(t||1)/1e4,i=[],o,l=0;l<=t;l++){var s=r[l],u=s-o;o===void 0?(i.push(s),o=s):u>a&&(n=Math.min(n,u),i.push(s),o=s)}return{vals:i,minDiff:n}};Zs.roundUp=function(e,r,t){for(var n=0,a=r.length-1,i,o=0,l=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;n0&&(n=1),t&&n)return e.sort(r)}return n?e:e.reverse()};Zs.findIndexOfMin=function(e,r){r=r||aO;for(var t=1/0,n,a=0;a{"use strict";V7.exports=function(r){return Object.keys(r).sort()}});var W7=te(Jn=>{"use strict";var s1=Bt(),fO=Ji().isArrayOrTypedArray;Jn.aggNums=function(e,r,t,n){var a,i;if((!n||n>t.length)&&(n=t.length),s1(r)||(r=!1),fO(t[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var $7=te((mse,J7)=>{"use strict";var Z7=b0(),Zy=Z7.mod,cO=Z7.modHalf,u1=Math.PI,Hu=2*u1;function vO(e){return e/180*u1}function hO(e){return e/u1*180}function Xy(e){return Math.abs(e[1]-e[0])>Hu-1e-14}function X7(e,r){return cO(r-e,Hu)}function dO(e,r){return Math.abs(X7(e,r))}function j7(e,r){if(Xy(r))return!0;var t,n;r[0]n&&(n+=Hu);var a=Zy(e,Hu),i=a+Hu;return a>=t&&a<=n||i>=t&&i<=n}function pO(e,r,t,n){if(!j7(r,n))return!1;var a,i;return t[0]=a&&e<=i}function jy(e,r,t,n,a,i,o){a=a||0,i=i||0;var l=Xy([t,n]),s,u,f,v,h;l?(s=0,u=u1,f=Hu):t{"use strict";ec.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};ec.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};ec.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};ec.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};ec.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};ec.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var rw=te(rc=>{"use strict";var Jy=b0().mod;rc.segmentsIntersect=ew;function ew(e,r,t,n,a,i,o,l){var s=t-e,u=a-e,f=o-a,v=n-r,h=i-r,d=l-i,m=s*d-f*v;if(m===0)return null;var g=(u*d-f*h)/m,y=(u*v-s*h)/m;return y<0||y>1||g<0||g>1?null:{x:e+s*g,y:r+v*g}}rc.segmentDistance=function(r,t,n,a,i,o,l,s){if(ew(r,t,n,a,i,o,l,s))return 0;var u=n-r,f=a-t,v=l-i,h=s-o,d=u*u+f*f,m=v*v+h*h,g=Math.min(Cd(u,f,d,i-r,o-t),Cd(u,f,d,l-r,s-t),Cd(v,h,m,r-i,t-o),Cd(v,h,m,n-i,a-o));return Math.sqrt(g)};function Cd(e,r,t,n,a){var i=n*e+a*r;if(i<0)return n*n+a*a;if(i>t){var o=n-e,l=a-r;return o*o+l*l}else{var s=n*r-a*e;return s*s/t}}var Ld,$y,Q7;rc.getTextLocation=function(r,t,n,a){if((r!==$y||a!==Q7)&&(Ld={},$y=r,Q7=a),Ld[n])return Ld[n];var i=r.getPointAtLength(Jy(n-a/2,t)),o=r.getPointAtLength(Jy(n+a/2,t)),l=Math.atan((o.y-i.y)/(o.x-i.x)),s=r.getPointAtLength(Jy(n,t)),u=(s.x*4+i.x+o.x)/6,f=(s.y*4+i.y+o.y)/6,v={x:u,y:f,theta:l};return Ld[n]=v,v};rc.clearLocationCache=function(){$y=null};rc.getVisibleSegment=function(r,t,n){var a=t.left,i=t.right,o=t.top,l=t.bottom,s=0,u=r.getTotalLength(),f=u,v,h;function d(g){var y=r.getPointAtLength(g);g===0?v=y:g===u&&(h=y);var x=y.xi?y.x-i:0,M=y.yl?y.y-l:0;return Math.sqrt(x*x+M*M)}for(var m=d(s);m;){if(s+=m+n,s>f)return;m=d(s)}for(m=d(f);m;){if(f-=m+n,s>f)return;m=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(v.x-h.x)<.1&&Math.abs(v.y-h.y)<.1}};rc.findPointOnPath=function(r,t,n,a){a=a||{};for(var i=a.pathLength||r.getTotalLength(),o=a.tolerance||.001,l=a.iterationLimit||30,s=r.getPointAtLength(0)[n]>r.getPointAtLength(i)[n]?-1:1,u=0,f=0,v=i,h,d,m;u0?v=h:f=h,u++}return d}});var qd=te(f1=>{"use strict";var Xs={};f1.throttle=function(r,t,n){var a=Xs[r],i=Date.now();if(!a){for(var o in Xs)Xs[o].tsa.ts+t){l();return}a.timer=setTimeout(function(){l(),a.timer=null},t)};f1.done=function(e){var r=Xs[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var n=r.onDone;r.onDone=function(){n&&n(),t(),r.onDone=null}})};f1.clear=function(e){if(e)tw(Xs[e]),delete Xs[e];else for(var r in Xs)f1.clear(r)};function tw(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var aw=te((xse,nw)=>{"use strict";nw.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var iw=te((wse,Dd)=>{"use strict";Dd.exports=Ky;Dd.exports.isMobile=Ky;Dd.exports.default=Ky;var bO=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,_O=/CrOS/,xO=/android|ipad|playbook|silk/i;function Ky(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=bO.test(r)&&!_O.test(r)||!!e.tablet&&xO.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var lw=te((Mse,ow)=>{"use strict";var wO=Bt(),MO=iw();ow.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=AO(),typeof t!="string")return!0;var n=MO({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var a=t.split(" "),i=1;i-1;l--){var s=a[l];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(wO(u)&&(u=+u),u>=13)return!0}}}return n};function AO(){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 uw=te((Ase,sw)=>{"use strict";var TO=kt();sw.exports=function(r,t,n){var a=r.selectAll("g."+n.replace(/\s/g,".")).data(t,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=TO.select(this)}),a}});var cw=te((Tse,fw)=>{"use strict";var kO=dt();fw.exports=function(r,t){for(var n=r._context.locale,a=0;a<2;a++){for(var i=r._context.locales,o=0;o<2;o++){var l=(i[n]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=kO.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return t}});var hw=te((kse,vw)=>{"use strict";vw.exports=function(r){for(var t={},n=[],a=0,i=0;i{"use strict";dw.exports=function(r){for(var t=LO(r)?CO:SO,n=[],a=0;a{"use strict";gw.exports=function(r,t){if(!t)return r;var n=1/Math.abs(t),a=n>1?(n*r+n*t)/n:r+t,i=String(a).length;if(i>16){var o=String(t).length,l=String(r).length;if(i>=l+o){var s=parseFloat(a).toPrecision(12);s.indexOf("e+")===-1&&(a=+s)}}return a}});var bw=te((Lse,yw)=>{"use strict";var qO=Bt(),DO=En().BADNUM,EO=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;yw.exports=function(r){return typeof r=="string"&&(r=r.replace(EO,"")),qO(r)?Number(r):DO}});var pr=te((qse,Ew)=>{"use strict";var c1=kt(),PO=m0().utcFormat,RO=xy().format,Tw=Bt(),kw=En(),Sw=kw.FP_SAFE,zO=-Sw,_w=kw.BADNUM,Ee=Ew.exports={};Ee.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var xw={};Ee.warnBadFormat=function(e){var r=String(e);xw[r]||(xw[r]=1,Ee.warn('encountered bad format: "'+r+'"'))};Ee.noFormat=function(e){return String(e)};Ee.numberFormat=function(e){var r;try{r=RO(Ee.adjustFormat(e))}catch(t){return Ee.warnBadFormat(e),Ee.noFormat}return r};Ee.nestedProperty=$v();Ee.keyedContainer=c6();Ee.relativeAttr=h6();Ee.isPlainObject=Gs();Ee.toLogRange=id();Ee.relinkPrivateKeys=m6();var Bu=Ji();Ee.isArrayBuffer=Bu.isArrayBuffer;Ee.isTypedArray=Bu.isTypedArray;Ee.isArrayOrTypedArray=Bu.isArrayOrTypedArray;Ee.isArray1D=Bu.isArray1D;Ee.ensureArray=Bu.ensureArray;Ee.concat=Bu.concat;Ee.maxRowLength=Bu.maxRowLength;Ee.minRowLength=Bu.minRowLength;var Cw=b0();Ee.mod=Cw.mod;Ee.modHalf=Cw.modHalf;var Ou=N6();Ee.valObjectMeta=Ou.valObjectMeta;Ee.coerce=Ou.coerce;Ee.coerce2=Ou.coerce2;Ee.coerceFont=Ou.coerceFont;Ee.coercePattern=Ou.coercePattern;Ee.coerceHoverinfo=Ou.coerceHoverinfo;Ee.coerceSelectionMarkerOpacity=Ou.coerceSelectionMarkerOpacity;Ee.validate=Ou.validate;var $i=Y7();Ee.dateTime2ms=$i.dateTime2ms;Ee.isDateTime=$i.isDateTime;Ee.ms2DateTime=$i.ms2DateTime;Ee.ms2DateTimeLocal=$i.ms2DateTimeLocal;Ee.cleanDate=$i.cleanDate;Ee.isJSDate=$i.isJSDate;Ee.formatDate=$i.formatDate;Ee.incrementMonth=$i.incrementMonth;Ee.dateTick0=$i.dateTick0;Ee.dfltRange=$i.dfltRange;Ee.findExactDates=$i.findExactDates;Ee.MIN_MS=$i.MIN_MS;Ee.MAX_MS=$i.MAX_MS;var tc=Wy();Ee.findBin=tc.findBin;Ee.sorterAsc=tc.sorterAsc;Ee.sorterDes=tc.sorterDes;Ee.distinctVals=tc.distinctVals;Ee.roundUp=tc.roundUp;Ee.sort=tc.sort;Ee.findIndexOfMin=tc.findIndexOfMin;Ee.sortObjectKeys=Sd();var js=W7();Ee.aggNums=js.aggNums;Ee.len=js.len;Ee.mean=js.mean;Ee.geometricMean=js.geometricMean;Ee.median=js.median;Ee.midRange=js.midRange;Ee.variance=js.variance;Ee.stdev=js.stdev;Ee.interp=js.interp;var vl=pd();Ee.init2dArray=vl.init2dArray;Ee.transposeRagged=vl.transposeRagged;Ee.dot=vl.dot;Ee.translationMatrix=vl.translationMatrix;Ee.rotationMatrix=vl.rotationMatrix;Ee.rotationXYMatrix=vl.rotationXYMatrix;Ee.apply3DTransform=vl.apply3DTransform;Ee.apply2DTransform=vl.apply2DTransform;Ee.apply2DTransform2=vl.apply2DTransform2;Ee.convertCssMatrix=vl.convertCssMatrix;Ee.inverseTransformMatrix=vl.inverseTransformMatrix;var Ql=$7();Ee.deg2rad=Ql.deg2rad;Ee.rad2deg=Ql.rad2deg;Ee.angleDelta=Ql.angleDelta;Ee.angleDist=Ql.angleDist;Ee.isFullCircle=Ql.isFullCircle;Ee.isAngleInsideSector=Ql.isAngleInsideSector;Ee.isPtInsideSector=Ql.isPtInsideSector;Ee.pathArc=Ql.pathArc;Ee.pathSector=Ql.pathSector;Ee.pathAnnulus=Ql.pathAnnulus;var q0=K7();Ee.isLeftAnchor=q0.isLeftAnchor;Ee.isCenterAnchor=q0.isCenterAnchor;Ee.isRightAnchor=q0.isRightAnchor;Ee.isTopAnchor=q0.isTopAnchor;Ee.isMiddleAnchor=q0.isMiddleAnchor;Ee.isBottomAnchor=q0.isBottomAnchor;var D0=rw();Ee.segmentsIntersect=D0.segmentsIntersect;Ee.segmentDistance=D0.segmentDistance;Ee.getTextLocation=D0.getTextLocation;Ee.clearLocationCache=D0.clearLocationCache;Ee.getVisibleSegment=D0.getVisibleSegment;Ee.findPointOnPath=D0.findPointOnPath;var Rd=la();Ee.extendFlat=Rd.extendFlat;Ee.extendDeep=Rd.extendDeep;Ee.extendDeepAll=Rd.extendDeepAll;Ee.extendDeepNoArrays=Rd.extendDeepNoArrays;var Qy=Pu();Ee.log=Qy.log;Ee.warn=Qy.warn;Ee.error=Qy.error;var NO=x0();Ee.counterRegex=NO.counter;var e2=qd();Ee.throttle=e2.throttle;Ee.throttleDone=e2.done;Ee.clearThrottle=e2.clear;var hl=a1();Ee.getGraphDiv=hl.getGraphDiv;Ee.isPlotDiv=hl.isPlotDiv;Ee.removeElement=hl.removeElement;Ee.addStyleRule=hl.addStyleRule;Ee.addRelatedStyleRule=hl.addRelatedStyleRule;Ee.deleteRelatedStyleRule=hl.deleteRelatedStyleRule;Ee.setStyleOnHover=hl.setStyleOnHover;Ee.getFullTransformMatrix=hl.getFullTransformMatrix;Ee.getElementTransformMatrix=hl.getElementTransformMatrix;Ee.getElementAndAncestors=hl.getElementAndAncestors;Ee.equalDomRects=hl.equalDomRects;Ee.clearResponsive=aw();Ee.preserveDrawingBuffer=lw();Ee.makeTraceGroups=uw();Ee._=cw();Ee.notifier=Ey();Ee.filterUnique=hw();Ee.filterVisible=pw();Ee.pushUnique=zy();Ee.increment=mw();Ee.cleanNumber=bw();Ee.ensureNumber=function(r){return Tw(r)?(r=Number(r),r>Sw||r=r?!1:Tw(e)&&e>=0&&e%1===0};Ee.noop=dd();Ee.identity=kd();Ee.repeat=function(e,r){for(var t=new Array(r),n=0;nt?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};Ee.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};Ee.simpleMap=function(e,r,t,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,t)?a>10?(Ee.warn("randstr failed uniqueness"),o):e(r,t,n,(a||0)+1):o};Ee.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(n){n[r]=e,t[n.name]=n,t.optionList.push(n)},t["_"+r]=e,t};Ee.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,n=2*t,a=2*r-1,i=new Array(a),o=new Array(t),l,s,u,f;for(l=0;l=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=t&&(u=n-1-u),f+=e[u]*i[s];o[l]=f}return o};Ee.syncOrAsync=function(e,r,t){var n,a;function i(){return Ee.syncOrAsync(e,r,t)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(r),n&&n.then)return n.then(i);return t&&t(r)};Ee.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};Ee.noneOrAll=function(e,r,t){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};Ee.fillArray=function(e,r,t,n){if(n=n||Ee.identity,Ee.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||t))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s};Ee.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Dw=/^\w*$/;Ee.templateString=function(e,r){var t={};return e.replace(Ee.TEMPLATE_STRING_REGEX,function(n,a){var i;return Dw.test(a)?i=r[a]:(t[a]=t[a]||Ee.nestedProperty(r,a).get,i=t[a]()),Ee.isValidTextValue(i)?i:""})};var UO={max:10,count:0,name:"hovertemplate"};Ee.hovertemplateString=function(){return r2.apply(UO,arguments)};var YO={max:10,count:0,name:"texttemplate"};Ee.texttemplateString=function(){return r2.apply(YO,arguments)};var GO=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function VO(e){var r=e.match(GO);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var WO={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ee.texttemplateStringForShapes=function(){return r2.apply(WO,arguments)};var ww=/^[:|\|]/;function r2(e,r,t){var n=this,a=arguments;r||(r={});var i={};return e.replace(Ee.TEMPLATE_STRING_REGEX,function(o,l,s){var u=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",h=l==="xother_"||l==="yother_",d=u||f||h||v,m=l;(f||v)&&(m=m.substring(1)),(h||v)&&(m=m.substring(0,m.length-1));var g=null,y=null;if(n.parseMultDiv){var x=VO(m);m=x.key,g=x.op,y=x.number}var M;if(d){if(M=r[m],M===void 0)return""}else{var b,_;for(_=3;_=Pd&&o<=Mw,u=l>=Pd&&l<=Mw;if(s&&(n=10*n+o-Pd),u&&(a=10*a+l-Pd),!s||!u){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var L0=2e9;Ee.seedPseudoRandom=function(){L0=2e9};Ee.pseudoRandom=function(){var e=L0;return L0=(69069*L0+1)%4294967296,Math.abs(L0-e)<429496729?Ee.pseudoRandom():L0/4294967296};Ee.fillText=function(e,r,t){var n=Array.isArray(t)?function(o){t.push(o)}:function(o){t.text=o},a=Ee.extractOption(e,r,"htx","hovertext");if(Ee.isValidTextValue(a))return n(a);var i=Ee.extractOption(e,r,"tx","text");if(Ee.isValidTextValue(i))return n(i)};Ee.isValidTextValue=function(e){return e||e===0};Ee.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",n=0;n1&&(u=1):u=0,Ee.strTranslate(a-u*(t+o),i-u*(n+l))+Ee.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+n)+")":"")};Ee.setTransormAndDisplay=function(e,r){e.attr("transform",Ee.getTextTransform(r)),e.style("display",r.scale?null:"none")};Ee.ensureUniformFontSize=function(e,r){var t=Ee.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};Ee.join2=function(e,r,t){var n=e.length;return n>1?e.slice(0,-1).join(r)+t+e[n-1]:e.join(r)};Ee.bigFont=function(e){return Math.round(1.2*e)};var Aw=Ee.getFirefoxVersion(),ZO=Aw!==null&&Aw<86;Ee.getPositionFromD3Event=function(){return ZO?[c1.event.layerX,c1.event.layerY]:[c1.event.offsetX,c1.event.offsetY]}});var zw=te(()=>{"use strict";var XO=pr(),Pw={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(t2 in Pw)Rw=t2.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),XO.addStyleRule(Rw,Pw[t2]);var Rw,t2});var n2=te((Pse,Nw)=>{Nw.exports=!0});var i2=te((Rse,Fw)=>{"use strict";var jO=n2(),a2;typeof window.matchMedia=="function"?a2=!window.matchMedia("(hover: none)").matches:a2=jO;Fw.exports=a2});var Fd=te((zse,o2)=>{"use strict";var E0=typeof Reflect=="object"?Reflect:null,Iw=E0&&typeof E0.apply=="function"?E0.apply:function(r,t,n){return Function.prototype.apply.call(r,t,n)},zd;E0&&typeof E0.ownKeys=="function"?zd=E0.ownKeys:Object.getOwnPropertySymbols?zd=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:zd=function(r){return Object.getOwnPropertyNames(r)};function JO(e){console&&console.warn&&console.warn(e)}var Bw=Number.isNaN||function(r){return r!==r};function An(){An.init.call(this)}o2.exports=An;o2.exports.once=eU;An.EventEmitter=An;An.prototype._events=void 0;An.prototype._eventsCount=0;An.prototype._maxListeners=void 0;var Hw=10;function Nd(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(An,"defaultMaxListeners",{enumerable:!0,get:function(){return Hw},set:function(e){if(typeof e!="number"||e<0||Bw(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Hw=e}});An.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};An.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Bw(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Ow(e){return e._maxListeners===void 0?An.defaultMaxListeners:e._maxListeners}An.prototype.getMaxListeners=function(){return Ow(this)};An.prototype.emit=function(r){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")Iw(s,this,t);else for(var u=s.length,f=Ww(s,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=o.length,JO(l)}return e}An.prototype.addListener=function(r,t){return Uw(this,r,t,!1)};An.prototype.on=An.prototype.addListener;An.prototype.prependListener=function(r,t){return Uw(this,r,t,!0)};function $O(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Yw(e,r,t){var n={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},a=$O.bind(n);return a.listener=t,n.wrapFn=a,a}An.prototype.once=function(r,t){return Nd(t),this.on(r,Yw(this,r,t)),this};An.prototype.prependOnceListener=function(r,t){return Nd(t),this.prependListener(r,Yw(this,r,t)),this};An.prototype.removeListener=function(r,t){var n,a,i,o,l;if(Nd(t),a=this._events,a===void 0)return this;if(n=a[r],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete a[r],a.removeListener&&this.emit("removeListener",r,n.listener||t));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():KO(n,i),n.length===1&&(a[r]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};An.prototype.off=An.prototype.removeListener;An.prototype.removeAllListeners=function(r){var t,n,a;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[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(r,t[a]);return this};function Gw(e,r,t){var n=e._events;if(n===void 0)return[];var a=n[r];return a===void 0?[]:typeof a=="function"?t?[a.listener||a]:[a]:t?QO(a):Ww(a,a.length)}An.prototype.listeners=function(r){return Gw(this,r,!0)};An.prototype.rawListeners=function(r){return Gw(this,r,!1)};An.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):Vw.call(e,r)};An.prototype.listenerCount=Vw;function Vw(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}An.prototype.eventNames=function(){return this._eventsCount>0?zd(this._events):[]};function Ww(e,r){for(var t=new Array(r),n=0;n{"use strict";var l2=Fd().EventEmitter,tU={init:function(e){if(e._ev instanceof l2)return e;var r=new l2,t=new l2;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(n,a){r.emit(n,a),t.emit(n,a)},e},triggerHandler:function(e,r,t){var n,a=e._ev;if(!a)return;var i=a._events[r];if(!i)return;function o(s){if(s.listener){if(a.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(a,[t])}else return s.apply(a,[t])}i=Array.isArray(i)?i:[i];var l;for(l=0;l{"use strict";var jw=pr(),nU=Kf().dfltConfig;function aU(e,r){for(var t=[],n,a=0;anU.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Js.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Js.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Js.undo=function(r){var t,n;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n{"use strict";Kw.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var z0=te(sa=>{"use strict";var wo=dt(),h1=pr(),Hd=bo(),u2=A0(),iU=s2(),oU=i1(),lU=Kf().configAttributes,Qw=_o(),dl=h1.extendDeepAll,P0=h1.isPlainObject,sU=h1.isArrayOrTypedArray,Bd=h1.nestedProperty,uU=h1.valObjectMeta,f2="_isSubplotObj",Od="_isLinkedToArray",fU="_arrayAttrRegexps",r9="_deprecated",c2=[f2,Od,fU,r9];sa.IS_SUBPLOT_OBJ=f2;sa.IS_LINKED_TO_ARRAY=Od;sa.DEPRECATED=r9;sa.UNDERSCORE_ATTRS=c2;sa.get=function(){var e={};return wo.allTypes.forEach(function(r){e[r]=vU(r)}),{defs:{valObjects:uU,metaKeys:c2.concat(["description","role","editType","impliedEdits"]),editType:{traces:Qw.traces,layout:Qw.layout},impliedEdits:{}},traces:e,layout:hU(),frames:dU(),animation:R0(oU),config:R0(lU)}};sa.crawl=function(e,r,t,n){var a=t||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(c2.indexOf(i)===-1){var l=(n?n+".":"")+i;r(o,i,e,a,l),!sa.isValObject(o)&&P0(o)&&i!=="impliedEdits"&&sa.crawl(o,r,a+1,l)}})};sa.isValObject=function(e){return e&&e.valType!==void 0};sa.findArrayAttributes=function(e){var r=[],t=[],n=[],a,i;function o(s,u,f,v){t=t.slice(0,v).concat([u]),n=n.slice(0,v).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[v-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&l(a,0,"")}function l(s,u,f){var v=s[t[u]],h=f+t[u];if(u===t.length-1)sU(v)&&r.push(i+h);else if(n[u]){if(Array.isArray(v))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var o=r[t];if(!Id(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function Id(e){return e===Math.round(e)&&e>=0}function vU(e){var r,t;r=wo.modules[e]._module,t=r.basePlotModule;var n={};n.type=null;var a=dl({},Hd),i=dl({},r.attributes);sa.crawl(i,function(s,u,f,v,h){Bd(a,h).set(void 0),s===void 0&&Bd(i,h).set(void 0)}),dl(n,a),wo.traceIs(e,"noOpacity")&&delete n.opacity,wo.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),wo.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),r.selectPoints||delete n.selectedpoints,dl(n,i),t.attributes&&dl(n,t.attributes),n.type=e;var o={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:R0(n)};if(r.layoutAttributes){var l={};dl(l,r.layoutAttributes),o.layoutAttributes=R0(l)}return r.animatable||sa.crawl(o,function(s){sa.isValObject(s)&&"anim"in s&&delete s.anim}),o}function hU(){var e={},r,t;dl(e,u2);for(r in wo.subplotsRegistry)if(t=wo.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var n=0;n{"use strict";var N0=pr(),bU=bo(),Uu="templateitemname",v2={name:{valType:"string",editType:"none"}};v2[Uu]={valType:"string",editType:"calc"};nc.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=v2.name,r[Uu]=v2[Uu],r};nc.traceTemplater=function(e){var r={},t,n;for(t in e)n=e[t],Array.isArray(n)&&n.length&&(r[t]=0);function a(i){t=N0.coerce(i,{},bU,"type");var o={type:t,_template:null};if(t in r){n=e[t];var l=r[t]%n.length;r[t]++,o._template=n[l]}return o}return{newTrace:a}};nc.newContainer=function(e,r,t){var n=e._template,a=n&&(n[r]||t&&n[t]);N0.isPlainObject(a)||(a=null);var i=e[r]={_template:a};return i};nc.arrayTemplater=function(e,r,t){var n=e._template,a=n&&n[a9(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function l(u){var f={name:u.name,_input:u},v=f[Uu]=u[Uu];if(!n9(v))return f._template=a,f;for(var h=0;h=n&&(t._input||{})._templateitemname;i&&(a=n);var o=r+"["+a+"]",l;function s(){l={},i&&(l[o]={},l[o][Uu]=i)}s();function u(d,m){l[d]=m}function f(d,m){i?N0.nestedProperty(l[o],d).set(m):l[o+"."+d]=m}function v(){var d=l;return s(),d}function h(d,m){d&&f(d,m);var g=v();for(var y in g)N0.nestedProperty(e,y).set(g[y])}return{modifyBase:u,modifyItem:f,getUpdateObj:v,applyUpdate:h}}});var Pa=te((Ose,i9)=>{"use strict";var d1=x0().counter;i9.exports={idRegex:{x:d1("x","( domain)?"),y:d1("y","( domain)?")},attrRegex:d1("[xy]axis"),xAxisMatch:d1("xaxis"),yAxisMatch:d1("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 ya=te(Ei=>{"use strict";var _U=dt(),h2=Pa();Ei.id2name=function(r){if(!(typeof r!="string"||!r.match(h2.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};Ei.name2id=function(r){if(r.match(h2.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};Ei.cleanId=function(r,t,n){var a=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(h2.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(a&&!n)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(a&&n?" domain":"")}};Ei.list=function(e,r,t){var n=e._fullLayout;if(!n)return[];var a=Ei.listIds(e,r),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};Ei.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function o9(e,r){if(r&&r.length){for(var t=0;t{"use strict";function xU(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function wU(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}l9.exports={clearOutlineControllers:xU,clearOutline:wU}});var Ud=te((Gse,s9)=>{"use strict";s9.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var p1=te(Gd=>{"use strict";var Yd=dt(),Vse=Pa().SUBPLOT_PATTERN;Gd.getSubplotCalcData=function(e,r,t){var n=Yd.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var MU=dt(),F0=pr();ac.manageCommandObserver=function(e,r,t,n){var a={},i=!0;r&&r._commandObserver&&(a=r._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=ac.hasSimpleAPICommandBindings(e,t,a.lookupTable);if(r&&r._commandObserver){if(o)return a;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,a}if(o){u9(e,o,a.cache),a.check=function(){if(i){var f=u9(e,o,a.cache);return f.changed&&n&&a.lookupTable[f.value]!==void 0&&(a.disable(),Promise.resolve(n({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[f.value]})).then(a.enable,a.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+a;F0.isPlainObject(i)?d2(i,r,o,n+1):r(o,a,i)}})}});var ua=te((Xse,k9)=>{"use strict";var b9=kt(),TU=m0().timeFormatLocale,kU=xy().formatLocale,g1=Bt(),SU=wy(),Zt=dt(),_9=z0(),CU=_n(),Xr=pr(),x9=zt(),h9=En().BADNUM,Pi=ya(),LU=Yu().clearOutline,qU=Ud(),p2=i1(),DU=s2(),EU=p1().getModuleCalcData,d9=Xr.relinkPrivateKeys,ic=Xr._,Nr=k9.exports={};Xr.extendFlat(Nr,Zt);Nr.attributes=bo();Nr.attributes.type.values=Nr.allTypes;Nr.fontAttrs=$a();Nr.layoutAttributes=A0();var Wd=v9();Nr.executeAPICommand=Wd.executeAPICommand;Nr.computeAPICommandBindings=Wd.computeAPICommandBindings;Nr.manageCommandObserver=Wd.manageCommandObserver;Nr.hasSimpleAPICommandBindings=Wd.hasSimpleAPICommandBindings;Nr.redrawText=function(e){return e=Xr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Zt.getComponentMethod("annotations","draw")(e),Zt.getComponentMethod("legend","draw")(e),Zt.getComponentMethod("colorbar","draw")(e),r(Nr.previousPromises(e)))},300)})};Nr.resize=function(e){e=Xr.getGraphDiv(e);var r,t=new Promise(function(n,a){(!e||Xr.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Xr.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Zt.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return r&&r(t),t};Nr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};Nr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=Xr.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:x9.defaultLine,"pointer-events":"all"}).each(function(){var u=b9.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=t.node(),a={y:r._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=r.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=r._paper.attr("width")-7),t.attr(a);var i=t.select(".js-link-to-tool"),o=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&PU(e,i),o.text(i.text()&&l.text()?" - ":"")}};function PU(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){Nr.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),a=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}Nr.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=b9.select(e).append("div").attr("id","hiddenform").style("display","none"),n=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),a=n.append("input").attr({type:"text",name:"data"});return a.node().value=Nr.graphJson(e,!1,"keepdata"),n.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var RU=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],zU=["year","month","dayMonth","dayMonthYear"];Nr.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],l=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},v;e._transitionData||Nr.createTransitionData(e),a._dfltTitle={plot:ic(e,"Click to enter Plot title"),subtitle:ic(e,"Click to enter Plot subtitle"),x:ic(e,"Click to enter X axis title"),y:ic(e,"Click to enter Y axis title"),colorbar:ic(e,"Click to enter Colorscale title"),annotation:ic(e,"new text")},a._traceWord=ic(e,"trace");var h=p9(e,RU);if(a._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,m=n.height;Nr.supplyLayoutGlobalDefaults(i,a,h),i.width||(a.width=d),i.height||(a.height=m),Nr.sanitizeMargins(a)}else{Nr.supplyLayoutGlobalDefaults(i,a,h);var g=!i.width||!i.height,y=a.autosize,x=f.autosizable,M=g&&(y||x);M?Nr.plotAutoSize(e,i,a):g&&Nr.sanitizeMargins(a),!y&&g&&(i.width=a.width,i.height=a.height)}a._d3locale=IU(h,a.separators),a._extraFormat=p9(e,zU),a._initialAutoSizeIsDone=!0,a._dataLength=s.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var b=a._subplots=FU(),_=a._splomAxes={x:{},y:{}},A=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=NU(o,s),Nr.supplyDataDefaults(s,l,i,a);var S=Object.keys(_.x),k=Object.keys(_.y);if(S.length>1&&k.length>1){for(Zt.getComponentMethod("grid","sizeDefaults")(i,a),v=0;v15&&k.length>15&&a.shapes.length===0&&a.images.length===0,Nr.linkSubplots(l,a,o,n),Nr.cleanPlot(l,a,o,n);var G=!!(n._has&&n._has("cartesian")),B=!!(a._has&&a._has("cartesian")),X=G,V=B;X&&!V?n._bgLayer.remove():V&&!X&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&LU({_fullLayout:n}),HU(l,a),d9(a,n),Zt.getComponentMethod("colorscale","crossTraceDefaults")(l,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var re=a._tracePreGUI,ne={},K;for(K in re)ne[K]="old";for(v=0;v0){var f=1-2*i;o=Math.round(f*o),l=Math.round(f*l)}}var v=Nr.layoutAttributes.width.min,h=Nr.layoutAttributes.height.min;o1,m=!t.height&&Math.abs(n.height-l)>1;(m||d)&&(d&&(n.width=o),m&&(n.height=l)),r._initialAutoSize||(r._initialAutoSize={width:o,height:l}),Nr.sanitizeMargins(n)};Nr.supplyLayoutModuleDefaults=function(e,r,t,n){var a=Zt.componentsRegistry,i=r._basePlotModules,o,l,s,u=Zt.subplotsRegistry.cartesian;for(o in a)s=a[o],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Zt.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(Xr.subplotSort);for(l=0;l1&&(t.l/=y,t.r/=y)}if(h){var x=(t.t+t.b)/h;x>1&&(t.t/=x,t.b/=x)}var M=t.xl!==void 0?t.xl:t.x,b=t.xr!==void 0?t.xr:t.x,_=t.yt!==void 0?t.yt:t.y,A=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:M,size:t.l+g},r:{val:b,size:t.r+g},b:{val:A,size:t.b+g},t:{val:_,size:t.t+g}},m[r]=1}if(!n._replotting)return Nr.doAutoMargin(e)}};function OU(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=Pi.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}Nr.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,n=r.height;r._size||(r._size={}),w9(r);var a=r._size,i=r.margin,o={t:0,b:0,l:0,r:0},l=Xr.extendFlat({},a),s=i.l,u=i.r,f=i.t,v=i.b,h=r._pushmargin,d=r._pushmarginIds,m=r.minreducedwidth,g=r.minreducedheight;if(i.autoexpand!==!1){for(var y in h)d[y]||delete h[y];var x=e._fullLayout._reservedMargin;for(var M in x)for(var b in x[M]){var _=x[M][b];o[b]=Math.max(o[b],_)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:v}};for(var A in o){var S=0;for(var k in h)k!=="base"&&g1(h[k][A].size)&&(S=h[k][A].size>S?h[k][A].size:S);var D=Math.max(0,i[A]-S);o[A]=Math.max(0,o[A]-D)}for(var z in h){var F=h[z].l||{},O=h[z].b||{},G=F.val,B=F.size,X=O.val,V=O.size,re=t-o.r-o.l,ne=n-o.t-o.b;for(var K in h){if(g1(B)&&h[K].r){var ee=h[K].r.val,fe=h[K].r.size;if(ee>G){var de=(B*ee+(fe-re)*G)/(ee-G),qe=(fe*(1-G)+(B-re)*(1-ee))/(ee-G);de+qe>s+u&&(s=de,u=qe)}}if(g1(V)&&h[K].t){var Be=h[K].t.val,Ne=h[K].t.size;if(Be>X){var Ie=(V*Be+(Ne-ne)*X)/(Be-X),Se=(Ne*(1-X)+(V-ne)*(1-Be))/(Be-X);Ie+Se>v+f&&(v=Ie,f=Se)}}}}}var Xe=Xr.constrain(t-i.l-i.r,M9,m),se=Xr.constrain(n-i.t-i.b,A9,g),be=Math.max(0,t-Xe),Te=Math.max(0,n-se);if(be){var pe=(s+u)/be;pe>1&&(s/=pe,u/=pe)}if(Te){var W=(v+f)/Te;W>1&&(v/=W,f/=W)}if(a.l=Math.round(s)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(f)+o.t,a.b=Math.round(v)+o.b,a.p=Math.round(i.pad),a.w=Math.round(t)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!r._replotting&&(Nr.didMarginChange(l,a)||OU(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};Nr.graphJson=function(e,r,t,n,a,i){(a&&r&&!e._fullData||a&&!r&&!e._fullLayout)&&Nr.supplyDefaults(e);var o=a?e._fullData:e.data,l=a?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Xr.isPlainObject(h)){var m={},g;return Object.keys(h).sort().forEach(function(b){if(["_","["].indexOf(b.charAt(0))===-1){if(typeof h[b]=="function"){d&&(m[b]="_function");return}if(t==="keepdata"){if(b.substr(b.length-3)==="src")return}else if(t==="keepstream"){if(g=h[b+"src"],typeof g=="string"&&g.indexOf(":")>0&&!Xr.isPlainObject(h.stream))return}else if(t!=="keepall"&&(g=h[b+"src"],typeof g=="string"&&g.indexOf(":")>0))return;m[b]=u(h[b],d)}}),m}var y=Array.isArray(h),x=Xr.isTypedArray(h);if((y||x)&&h.dtype&&h.shape){var M=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Xr.isArrayBuffer(M)?SU.encode(M):M},d)}return y?h.map(function(b){return u(b,d)}):x?Xr.simpleMap(h,Xr.identity):Xr.isJSDate(h)?Xr.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(l),a)){var v=l._size;f.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),n==="object"?f:JSON.stringify(f)};Nr.modifyFrames=function(e,r){var t,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Zt.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function m(){return h++,function(){d++,!n&&d===h&&l(v)}}t.runFn(m),setTimeout(m())})}function l(v){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Zt.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(v)}function s(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[Nr.previousPromises,s,t.prepareFn,Nr.rehover,Nr.reselect,o],f=Xr.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}Nr.doCalcdata=function(e,r){var t=Pi.list(e),n=e._fullData,a=e._fullLayout,i,o,l,s,u=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},l=0;l=0;s--)if(A[s].enabled){i._indexToPoints=A[s]._indexToPoints;break}o&&o.calc&&(_=o.calc(e,i))}(!Array.isArray(_)||!_[0])&&(_=[{x:h9,y:h9}]),_[0].t||(_[0].t={}),_[0].trace=i,u[M]=_}}for(m9(t,n,a),l=0;l{"use strict";oc.xmlns="http://www.w3.org/2000/xmlns/";oc.svg="http://www.w3.org/2000/svg";oc.xlink="http://www.w3.org/1999/xlink";oc.svgAttrs={xmlns:oc.svg,"xmlns:xlink":oc.xlink}});var Ka=te((Jse,S9)=>{"use strict";S9.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 ci=te(Mo=>{"use strict";var Qn=kt(),$s=pr(),VU=$s.strTranslate,g2=lc(),WU=Ka().LINE_SPACING,ZU=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Mo.convertToTspans=function(e,r,t){var n=e.text(),a=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&n.match(ZU),i=Qn.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function l(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var s=oY(e.node(),n);s&&e.style("pointer-events","all"),Mo.positionText(e),t&&t.call(e)}return a?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};$U(a[2],f,function(v,h,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var m=v&&v.select("svg");if(!m||!m.node()){l(),s();return}var g=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});g.node().appendChild(m.node()),h&&h.node()&&m.node().insertBefore(h.node().cloneNode(!0),m.node().firstChild);var y=d.width,x=d.height;m.attr({class:o,height:x,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var M=e.node().style.fill||"black",b=m.select("g");b.attr({fill:M,stroke:M});var _=b.node().getBoundingClientRect(),A=_.width,S=_.height;(A>y||S>x)&&(m.style("overflow","hidden"),_=m.node().getBoundingClientRect(),A=_.width,S=_.height);var k=+e.attr("x"),D=+e.attr("y"),z=u||e.node().getBoundingClientRect().height,F=-z/4;if(o[0]==="y")g.attr({transform:"rotate("+[-90,k,D]+")"+VU(-A/2,F-S/2)});else if(o[0]==="l")D=F-S/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)k=0,D=F;else{var O=e.attr("text-anchor");k=k-A*(O==="middle"?.5:O==="end"?1:0),D=D+F-S/2}m.attr({x:k,y:D}),t&&t.call(e,g),s(g)})})):l(),e};var XU=/(<|<|<)/g,jU=/(>|>|>)/g;function JU(e){return e.replace(XU,"\\lt ").replace(jU,"\\gt ")}var C9=[["$","$"],["\\(","\\)"]];function $U(e,r,t){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){$s.warn("No MathJax version:",MathJax.version);return}var a,i,o,l,s=function(){return i=$s.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:C9},displayAlign:"left"})},u=function(){i=$s.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=C9},f=function(){if(a=MathJax.Hub.config.menuSettings.renderer,a!=="SVG")return MathJax.Hub.setRenderer("SVG")},v=function(){a=MathJax.config.startup.output,a!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var M="math-output-"+$s.randstr({},64);l=Qn.select("body").append("div").attr({id:M}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(JU(e));var b=l.node();return n===2?MathJax.Hub.Typeset(b):MathJax.typeset([b])},d=function(){var M=l.select(n===2?".MathJax_SVG":".MathJax"),b=!M.empty()&&l.select("svg").node();if(!b)$s.log("There was an error in the tex syntax.",e),t();else{var _=b.getBoundingClientRect(),A;n===2?A=Qn.select("body").select("#MathJax_SVG_glyphs"):A=M.select("defs"),t(M,A,_)}l.remove()},m=function(){if(a!=="SVG")return MathJax.Hub.setRenderer(a)},g=function(){a!=="svg"&&(MathJax.config.startup.output=a)},y=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(i)},x=function(){MathJax.config=i};n===2?MathJax.Hub.Queue(s,f,h,d,m,y):n===3&&(u(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),g(),x()}))}var E9={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"},KU={sub:"0.3em",sup:"-0.6em"},QU={sub:"-0.21em",sup:"0.42em"},L9="\u200B",q9=["http:","https:","mailto:","",void 0,":"],P9=Mo.NEWLINES=/(\r\n?|\n)/g,y2=/(<[^<>]*>)/,b2=/<(\/?)([^ >]*)(\s+(.*))?>/i,eY=//i;Mo.BR_TAG_ALL=//gi;var R9=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,z9=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,N9=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,rY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function sc(e,r){if(!e)return null;var t=e.match(r),n=t&&(t[3]||t[4]);return n&&Zd(n)}var tY=/(^|;)\s*color:/;Mo.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,n=r.allowedTags!==void 0?r.allowedTags:["br"],a="...",i=a.length,o=e.split(y2),l=[],s="",u=0,f=0;fi?l.push(v.substr(0,g-i)+a):l.push(v.substr(0,g));break}s=""}}return l.join("")};var nY={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},aY=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Zd(e){return e.replace(aY,function(r,t){var n;return t.charAt(0)==="#"?n=iY(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):n=nY[t],n||r})}Mo.convertEntities=Zd;function iY(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function oY(e,r){r=r.replace(P9," ");var t=!1,n=[],a,i=-1;function o(){i++;var S=document.createElementNS(g2.svg,"tspan");Qn.select(S).attr({class:"line",dy:i*WU+"em"}),e.appendChild(S),a=S;var k=n;if(n=[{node:S}],k.length>1)for(var D=1;D.",r);return}var k=n.pop();S!==k.type&&$s.log("Start tag <"+k.type+"> doesnt match end tag <"+S+">. Pretending it did match.",r),a=n[n.length-1].node}var f=eY.test(r);f?o():(a=e,n=[{node:e}]);for(var v=r.split(y2),h=0;h{"use strict";var lY=kt(),jd=Jl(),y1=Bt(),Xd=pr(),I9=zt(),sY=Jf().isValid;function uY(e,r,t){var n=r?Xd.nestedProperty(e,r).get()||{}:e,a=n[t||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(Xd.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];t[a]=[1-i[0],i[1]]}return t}function G9(e,r){r=r||{};for(var t=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var W9=By(),cY=W9.FORMAT_LINK,vY=W9.DATE_FORMAT_LINK;function hY(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?_2:Z9)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function _2(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+cY+"."].join(" ")}function Z9(e,r){return _2(e,r)+[" And for dates see: "+vY+".","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(" ")}X9.exports={axisHoverFormat:hY,descriptionOnlyNumbers:_2,descriptionWithDates:Z9}});var pl=te((eue,c8)=>{"use strict";var j9=$a(),I0=cl(),f8=Kl().dash,M2=la().extendFlat,J9=_n().templatedArray,$9=x2().descriptionWithDates,dY=En().ONEDAY,rs=Pa(),pY=rs.HOUR_PATTERN,gY=rs.WEEKDAY_PATTERN,w2={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},mY=M2({},w2,{values:w2.values.slice().concat(["sync"])});function K9(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Q9={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},e8={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},r8={valType:"data_array",editType:"ticks"},t8={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function n8(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function a8(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var i8={valType:"color",dflt:I0.defaultLine,editType:"ticks"},o8={valType:"color",dflt:I0.lightLine,editType:"ticks"};function l8(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var s8=M2({},f8,{editType:"ticks"}),u8={valType:"boolean",editType:"ticks"};c8.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:I0.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:j9({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[rs.idRegex.x.toString(),rs.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:[rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"calc"},rangebreaks:J9("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:[gY,pY,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:dY},editType:"calc"}),tickmode:mY,nticks:K9(),tick0:Q9,dtick:e8,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:r8,ticktext:{valType:"data_array",editType:"ticks"},ticks:t8,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:n8(),tickwidth:a8(),tickcolor:i8,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:M2({},f8,{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:j9({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:$9("tick label")},tickformatstops:J9("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:$9("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:I0.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:u8,gridcolor:o8,gridwidth:l8(),griddash:s8,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:I0.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:I0.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},minor:{tickmode:w2,nticks:K9("minor"),tick0:Q9,dtick:e8,tickvals:r8,ticks:t8,ticklen:n8("minor"),tickwidth:a8("minor"),tickcolor:i8,gridcolor:o8,gridwidth:l8("minor"),griddash:s8,showgrid:u8,editType:"ticks"},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 Jd=te((rue,d8)=>{"use strict";var Tn=pl(),v8=$a(),h8=la().extendFlat,yY=_o().overrideAll;d8.exports=yY({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:Tn.linecolor,outlinewidth:Tn.linewidth,bordercolor:Tn.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Tn.minor.tickmode,nticks:Tn.nticks,tick0:Tn.tick0,dtick:Tn.dtick,tickvals:Tn.tickvals,ticktext:Tn.ticktext,ticks:h8({},Tn.ticks,{dflt:""}),ticklabeloverflow:h8({},Tn.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:Tn.ticklen,tickwidth:Tn.tickwidth,tickcolor:Tn.tickcolor,ticklabelstep:Tn.ticklabelstep,showticklabels:Tn.showticklabels,labelalias:Tn.labelalias,tickfont:v8({}),tickangle:Tn.tickangle,tickformat:Tn.tickformat,tickformatstops:Tn.tickformatstops,tickprefix:Tn.tickprefix,showtickprefix:Tn.showtickprefix,ticksuffix:Tn.ticksuffix,showticksuffix:Tn.showticksuffix,separatethousands:Tn.separatethousands,exponentformat:Tn.exponentformat,minexponent:Tn.minexponent,showexponent:Tn.showexponent,title:{text:{valType:"string"},font:v8({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var H0=te((nue,g8)=>{"use strict";var bY=Jd(),_Y=x0().counter,xY=Sd(),p8=Jf().scales,tue=xY(p8);function $d(e){return"`"+e+"`"}g8.exports=function(r,t){r=r||"",t=t||{};var n=t.cLetter||"c",a="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",o="showScaleDflt"in t?t.showScaleDflt:n==="z",l=typeof t.colorscaleDflt=="string"?p8[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,v;"colorAttr"in t?(f=t.colorAttr,v=t.colorAttr):(f={z:"z",c:"color"}[n],v="in "+$d(u+f));var h=a?" Has an effect only if "+v+" is set to a numerical array.":"",d=n+"auto",m=n+"min",g=n+"max",y=n+"mid",x=$d(u+d),M=$d(u+m),b=$d(u+g),_=M+" and "+b,A={};A[m]=A[g]=void 0;var S={};S[d]=!1;var k={};return f==="color"&&(k.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(k.color.anim=!0)),k[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:A},k[m]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},k[g]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},k[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:A},k.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},k.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},k.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(k.showscale={valType:"boolean",dflt:o,editType:"calc"},k.colorbar=bY),t.noColorAxis||(k.coloraxis={valType:"subplotid",regex:_Y("coloraxis"),dflt:null,editType:"calc"}),k}});var T2=te((aue,m8)=>{"use strict";var wY=la().extendFlat,MY=H0(),A2=Jf().scales;m8.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:A2.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:A2.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:A2.RdBu,editType:"calc"}},coloraxis:wY({_isSubplotObj:!0,editType:"calc"},MY("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var k2=te((iue,y8)=>{"use strict";var AY=pr();y8.exports=function(r){return AY.isPlainObject(r.colorbar)}});var L2=te(C2=>{"use strict";var S2=Bt(),b8=pr(),_8=En(),TY=_8.ONEDAY,kY=_8.ONEWEEK;C2.dtick=function(e,r){var t=r==="log",n=r==="date",a=r==="category",i=n?TY:1;if(!e)return i;if(S2(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||t))return i;var o=e.charAt(0),l=e.substr(1);return l=S2(l)?Number(l):0,l<=0||!(n&&o==="M"&&l===Math.round(l)||t&&o==="L"||t&&o==="D"&&(l===1||l===2))?i:e};C2.tick0=function(e,r,t,n){if(r==="date")return b8.cleanDate(e,b8.dateTick0(t,n%kY===0?1:0));if(!(n==="D1"||n==="D2"))return S2(e)?Number(e):0}});var q2=te((lue,w8)=>{"use strict";var x8=L2(),SY=pr().isArrayOrTypedArray,CY=Ji().isTypedArraySpec,LY=Ji().decodeTypedArraySpec;w8.exports=function(r,t,n,a,i){i||(i={});var o=i.isMinor,l=o?r.minor||{}:r,s=o?t.minor:t,u=o?"minor.":"";function f(M){var b=l[M];return CY(b)&&(b=LY(b)),b!==void 0?b:(s._template||{})[M]}var v=f("tick0"),h=f("dtick"),d=f("tickvals"),m=SY(d)?"array":h?"linear":"auto",g=n(u+"tickmode",m);if(g==="auto"||g==="sync")n(u+"nticks");else if(g==="linear"){var y=s.dtick=x8.dtick(h,a);s.tick0=x8.tick0(v,a,t.calendar,y)}else if(a!=="multicategory"){var x=n(u+"tickvals");x===void 0?s.tickmode="auto":o||n("ticktext")}}});var E2=te((sue,A8)=>{"use strict";var D2=pr(),M8=pl();A8.exports=function(r,t,n,a){var i=a.isMinor,o=i?r.minor||{}:r,l=i?t.minor:t,s=i?M8.minor:M8,u=i?"minor.":"",f=D2.coerce2(o,l,s,"ticklen",i?(t.ticklen||5)*.6:void 0),v=D2.coerce2(o,l,s,"tickwidth",i?t.tickwidth||1:void 0),h=D2.coerce2(o,l,s,"tickcolor",(i?t.tickcolor:void 0)||l.color),d=n(u+"ticks",!i&&a.outerTicks||f||v||h?"outside":"");d||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var P2=te((uue,T8)=>{"use strict";T8.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],n=t.filter(function(i){return r[i]!==void 0}),a=function(i){return r[i]===r[n[0]]};if(n.every(a)||n.length===1)return r[n[0]]}});var gl=te((fue,k8)=>{"use strict";var Kd=pr(),qY=_n();k8.exports=function(r,t,n){var a=n.name,i=n.inclusionAttr||"visible",o=t[a],l=Kd.isArrayOrTypedArray(r[a])?r[a]:[],s=t[a]=[],u=qY.arrayTemplater(t,a,i),f,v;for(f=0;f{"use strict";var R2=pr(),DY=zt().contrast,S8=pl(),EY=P2(),PY=gl();C8.exports=function(r,t,n,a,i){i||(i={});var o=n("labelalias");R2.isPlainObject(o)||delete t.labelalias;var l=EY(r),s=n("showticklabels");if(s){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},f=t.color,v=t.ticklabelposition||"",h=v.indexOf("inside")!==-1?DY(i.bgColor):f&&f!==S8.color.dflt?f:u.color;if(R2.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var d=n("tickangle");!i.noAutotickangles&&d==="auto"&&n("autotickangles")}if(a!=="category"){var m=n("tickformat");PY(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:RY}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!m&&a!=="date"&&(n("showexponent",l),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function RY(e,r){function t(a,i){return R2.coerce(e,r,S8.tickformatstops,a,i)}var n=t("enabled");n&&(t("dtickrange"),t("value"))}});var N2=te((vue,L8)=>{"use strict";var zY=P2();L8.exports=function(r,t,n,a,i){i||(i={});var o=i.tickSuffixDflt,l=zY(r),s=n("tickprefix");s&&n("showtickprefix",l);var u=n("ticksuffix",o);u&&n("showticksuffix",l)}});var F2=te((hue,q8)=>{"use strict";var Gu=pr(),NY=_n(),FY=q2(),IY=E2(),HY=z2(),BY=N2(),OY=Jd();q8.exports=function(r,t,n){var a=NY.newContainer(t,"colorbar"),i=r.colorbar||{};function o(O,G){return Gu.coerce(i,a,OY,O,G)}var l=n.margin||{t:0,b:0,l:0,r:0},s=n.width-l.l-l.r,u=n.height-l.t-l.b,f=o("orientation"),v=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(v?s:u):30);var d=o("lenmode");o("len",d==="fraction"?1:v?u:s);var m=o("yref"),g=o("xref"),y=m==="paper",x=g==="paper",M,b,_,A="left";v?(_="middle",A=x?"left":"right",M=x?1.02:1,b=.5):(_=y?"bottom":"top",A="center",M=.5,b=y?1.02:1),Gu.coerce(i,a,{x:{valType:"number",min:x?-2:0,max:x?3:1,dflt:M}},"x"),Gu.coerce(i,a,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:b}},"y"),o("xanchor",A),o("xpad"),o("yanchor",_),o("ypad"),Gu.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var S=Gu.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",S.indexOf("inside")!==-1?"hide past domain":"hide past div"),FY(i,a,o,"linear");var k=n.font,D={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:k};S.indexOf("inside")!==-1&&(D.bgColor="black"),BY(i,a,o,"linear",D),HY(i,a,o,"linear",D),IY(i,a,o,"linear",D),o("title.text",n._dfltTitle.colorbar);var z=a.showticklabels?a.tickfont:k,F=Gu.extendFlat({},k,{family:z.family,size:Gu.bigFont(z.size)});Gu.coerceFont(o,"title.font",F),o("title.side",v?"top":"right")}});var B0=te((due,P8)=>{"use strict";var D8=Bt(),H2=pr(),UY=k2(),YY=F2(),E8=Jf().isValid,GY=dt().traceIs;function I2(e,r){var t=r.slice(0,r.length-1);return r?H2.nestedProperty(e,t).get()||{}:e}P8.exports=function e(r,t,n,a,i){var o=i.prefix,l=i.cLetter,s="_module"in t,u=I2(r,o),f=I2(t,o),v=I2(t._template||{},o)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,n,a,i)};if(s){var d=n._colorAxes||{},m=a(o+"coloraxis");if(m){var g=GY(t,"contour")&&H2.nestedProperty(t,"contours.coloring").get()||"heatmap",y=d[m];y?(y[2].push(h),y[0]!==g&&(y[0]=!1,H2.warn(["Ignoring coloraxis:",m,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[m]=[g,t,[h]];return}}var x=u[l+"min"],M=u[l+"max"],b=D8(x)&&D8(M)&&x{"use strict";var R8=pr(),VY=_n(),z8=T2(),WY=B0();N8.exports=function(r,t){function n(v,h){return R8.coerce(r,t,z8,v,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=t._colorAxes,i,o;function l(v,h){return R8.coerce(i,o,z8.coloraxis,v,h)}for(var s in a){var u=a[s];if(u[0])i=r[s]||{},o=VY.newContainer(t,s,"coloraxis"),o._name=s,WY(i,o,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var ZY=pr(),XY=es().hasColorscale,jY=es().extractOpts;I8.exports=function(r,t){function n(f,v){var h=f["_"+v];h!==void 0&&(f[v]=h)}function a(f,v){var h=v.container?ZY.nestedProperty(f,v.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=jY(h),m=d.auto;(m||d.min===void 0)&&n(h,v.min),(m||d.max===void 0)&&n(h,v.max),d.autocolorscale&&n(h,"colorscale")}}for(var i=0;i{"use strict";var B8=Bt(),B2=pr(),JY=es().extractOpts;O8.exports=function(r,t,n){var a=r._fullLayout,i=n.vals,o=n.containerStr,l=o?B2.nestedProperty(t,o).get():t,s=JY(l),u=s.auto!==!1,f=s.min,v=s.max,h=s.mid,d=function(){return B2.aggNums(Math.min,null,i)},m=function(){return B2.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(l._colorAx&&B8(f)?f=Math.min(f,d()):f=d()),v===void 0?v=m():u&&(l._colorAx&&B8(v)?v=Math.max(v,m()):v=m()),u&&h!==void 0&&(v-h>h-f?f=h-(v-h):v-h=0?g=a.colorscale.sequential:g=a.colorscale.sequentialminus,s._sync("colorscale",g)}}});var rp=te((yue,U8)=>{"use strict";var ep=Jf(),O0=es();U8.exports={moduleType:"component",name:"colorscale",attributes:H0(),layoutAttributes:T2(),supplyLayoutDefaults:F8(),handleDefaults:B0(),crossTraceDefaults:H8(),calc:Qd(),scales:ep.scales,defaultScale:ep.defaultScale,getScale:ep.get,isValidScale:ep.isValid,hasColorscale:O0.hasColorscale,extractOpts:O0.extractOpts,extractScale:O0.extractScale,flipScale:O0.flipScale,makeColorScaleFunc:O0.makeColorScaleFunc,makeColorScaleFuncFromTrace:O0.makeColorScaleFuncFromTrace}});var Qa=te((bue,G8)=>{"use strict";var Y8=pr(),$Y=Ji().isTypedArraySpec;G8.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 r=e.marker;return Y8.isPlainObject(r)&&(Y8.isArrayOrTypedArray(r.size)||$Y(r.size))}}});var W8=te((_ue,V8)=>{"use strict";var KY=Bt();V8.exports=function(r,t){t||(t=2);var n=r.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(l){return Math.sqrt(l/a)}:function(l){return l/a};return function(l){var s=o(l/t);return KY(s)&&s>0?Math.max(s,i):0}}});var Vu=te(Ba=>{"use strict";var Z8=pr();Ba.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Ba.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&t.index{J8.exports=nG;var O2={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},tG=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function nG(e){var r=[];return e.replace(tG,function(t,n,a){var i=n.toLowerCase();for(a=iG(a),i=="m"&&a.length>2&&(r.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==O2[i])return a.unshift(n),r.push(a);if(a.length{"use strict";var oG=U2(),Sr=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},gt="M0,0Z",$8=Math.sqrt(2),Wu=Math.sqrt(3),Y2=Math.PI,G2=Math.cos,V2=Math.sin;tM.exports={circle:{n:0,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return t?yt(r,t,a):a}},square:{n:1,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.3,2);return yt(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.4,2),a=Sr(e*1.2,2);return yt(r,t,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.8/$8,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,l="l-"+n+","+n;return yt(r,t,"M0,"+n+a+i+o+i+o+l+o+l+a+l+a+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.951,2),a=Sr(e*.588,2),i=Sr(-e,2),o=Sr(e*-.309,2),l=Sr(e*.809,2);return yt(r,t,"M"+n+","+o+"L"+a+","+l+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e/2,2),i=Sr(e*Wu/2,2);return yt(r,t,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e/2,2),i=Sr(e*Wu/2,2);return yt(r,t,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.924,2),a=Sr(e*.383,2);return yt(r,t,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,r,t){if(mt(r))return gt;var n=e*1.4,a=Sr(n*.225,2),i=Sr(n*.951,2),o=Sr(n*.363,2),l=Sr(n*.588,2),s=Sr(-n,2),u=Sr(n*-.309,2),f=Sr(n*.118,2),v=Sr(n*.809,2),h=Sr(n*.382,2);return yt(r,t,"M"+a+","+u+"H"+i+"L"+o+","+f+"L"+l+","+v+"L0,"+h+"L-"+l+","+v+"L-"+o+","+f+"L-"+i+","+u+"H-"+a+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.66,2),a=Sr(e*.38,2),i=Sr(e*.76,2);return yt(r,t,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*Wu*.8,2),a=Sr(e*.8,2),i=Sr(e*1.6,2),o=Sr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return yt(r,t,"M-"+n+","+a+l+n+","+a+l+"0,-"+i+l+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*Wu*.8,2),a=Sr(e*.8,2),i=Sr(e*1.6,2),o=Sr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return yt(r,t,"M"+n+",-"+a+l+"-"+n+",-"+a+l+"0,"+i+l+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.1,2),a=Sr(e*2,2),i="A "+a+","+a+" 0 0 1 ";return yt(r,t,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2),a=Sr(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return yt(r,t,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.7,2),a=Sr(e*1.4,2);return yt(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2),a=Sr(e*.7,2);return yt(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e/$8,2);return yt(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"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,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e*1.3,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e*1.3,2),a=Sr(e*.65,2);return yt(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2);return yt(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*.85,2);return yt(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e/2,2),a=Sr(e,2);return yt(r,t,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2);return yt(r,t,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2);return yt(r,t,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(mt(r))return gt;var n=Y2/2.5,a=2*e*G2(n),i=2*e*V2(n);return yt(r,t,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(mt(r))return gt;var n=Y2/4,a=2*e*G2(n),i=2*e*V2(n);return yt(r,t,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function mt(e){return e===null}var K8,Q8,eM,rM;function yt(e,r,t){if((!e||e%360===0)&&!r)return t;if(eM===e&&rM===r&&K8===t)return Q8;eM=e,rM=r,K8=t;function n(y,x){var M=G2(y),b=V2(y),_=x[0],A=x[1]+(r||0);return[_*M-A*b,_*b+A*M]}for(var a=e/180*Y2,i=0,o=0,l=oG(t),s="",u=0;u{"use strict";var ba=kt(),fn=pr(),lG=fn.numberFormat,vc=Bt(),$2=Jl(),np=dt(),Ra=zt(),sG=rp(),_1=fn.strTranslate,ap=ci(),uG=lc(),fG=Ka(),cG=fG.LINE_SPACING,hM=vd().DESELECTDIM,vG=Qa(),hG=W8(),dG=Vu().appendArrayPointValue,Er=MM.exports={};Er.font=function(e,r){var t=r.variant,n=r.style,a=r.weight,i=r.color,o=r.size,l=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(Ra.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),t&&e.style("font-variant",t),f&&e.style("text-transform",W2(gG(f))),s&&e.style("text-shadow",s==="auto"?ap.makeTextShadow(Ra.contrast(i)):W2(s)),u&&e.style("text-decoration-line",W2(mG(u)))};function W2(e){return e==="none"?void 0:e}var pG={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function gG(e){return pG[e]}function mG(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Er.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Er.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Er.setRect=function(e,r,t,n,a){e.call(Er.setPosition,r,t).call(Er.setSize,n,a)};Er.translatePoint=function(e,r,t,n){var a=t.c2p(e.x),i=n.c2p(e.y);if(vc(a)&&vc(i)&&r.node())r.node().nodeName==="text"?r.attr("x",a).attr("y",i):r.attr("transform",_1(a,i));else return!1;return!0};Er.translatePoints=function(e,r,t){e.each(function(n){var a=ba.select(this);Er.translatePoint(n,a,r,t)})};Er.hideOutsideRangePoint=function(e,r,t,n,a,i){r.attr("display",t.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};Er.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,n=r.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,l=i.ycalendar,s=np.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Er.hideOutsideRangePoint(u,ba.select(this),t,n,o,l)})})}};Er.crispRound=function(e,r,t){return!r||!vc(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Er.singleLineStyle=function(e,r,t,n,a){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";Ra.stroke(r,n||i.color),Er.dashLine(r,l,o)};Er.lineGroupStyle=function(e,r,t,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=n||i.dash||"";ba.select(this).call(Ra.stroke,t||i.color).call(Er.dashLine,l,o)})};Er.dashLine=function(e,r,t){t=+t||0,r=Er.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Er.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function dM(e,r,t,n){var a=r.fillpattern,i=r.fillgradient,o=a&&Er.getPatternAttr(a.shape,0,"");if(o){var l=Er.getPatternAttr(a.bgcolor,0,null),s=Er.getPatternAttr(a.fgcolor,0,null),u=a.fgopacity,f=Er.getPatternAttr(a.size,0,8),v=Er.getPatternAttr(a.solidity,0,.3),h=r.uid;Er.pattern(e,"point",t,h,o,f,v,void 0,a.fillmode,l,s,u)}else if(i&&i.type!=="none"){var d=i.type,m="scatterfill-"+r.uid;if(n&&(m="legendfill-"+r.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var g,y;d==="horizontal"?(g={x:i.start,y:0},y={x:i.stop,y:0}):d==="vertical"&&(g={x:0,y:i.start},y={x:0,y:i.stop}),g.x=r._xA.c2p(g.x===void 0?r._extremes.x.min[0].val:g.x,!0),g.y=r._yA.c2p(g.y===void 0?r._extremes.y.min[0].val:g.y,!0),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.max[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.max[0].val:y.y,!0),e.call(mM,t,m,"linear",i.colorscale,"fill",g,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Er.gradient,t,m,d,i.colorscale,"fill")}else r.fillcolor&&e.call(Ra.fill,r.fillcolor)}Er.singleFillStyle=function(e,r){var t=ba.select(e.node()),n=t.data(),a=((n[0]||[])[0]||{}).trace||{};dM(e,a,r,!1)};Er.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(n){var a=ba.select(this);n[0].trace&&dM(a,n[0].trace,r,t)})};var aM=nM();Er.symbolNames=[];Er.symbolFuncs=[];Er.symbolBackOffs=[];Er.symbolNeedLines={};Er.symbolNoDot={};Er.symbolNoFill={};Er.symbolList=[];Object.keys(aM).forEach(function(e){var r=aM[e],t=r.n;Er.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Er.symbolNames[t]=e,Er.symbolFuncs[t]=r.f,Er.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Er.symbolNeedLines[t]=!0),r.noDot?Er.symbolNoDot[t]=!0:Er.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Er.symbolNoFill[t]=!0)});var yG=Er.symbolNames.length,bG="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Er.symbolNumber=function(e){if(vc(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Er.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=yG||e>=400?0:Math.floor(Math.max(e,0))};function pM(e,r,t,n){var a=e%100;return Er.symbolFuncs[a](r,t,n)+(e>=200?bG:"")}var iM=lG("~f"),gM={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}};Er.gradient=function(e,r,t,n,a,i){var o=gM[n];return mM(e,r,t,o.type,a,i,o.start,o.stop,!1,o.reversed)};function mM(e,r,t,n,a,i,o,l,s,u){var f=a.length,v;n==="linear"?v={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(v={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var s;e.ms==="various"||o.size==="various"?s=3:s=n.ms2mrc(e.ms),e.mrc=s,n.selectedSizeFn&&(s=e.mrc=n.selectedSizeFn(e));var u=Er.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var f=e3(e,t),v=Q2(e,t);r.attr("d",pM(u,s,f,v))}var h=!1,d,m,g;if(e.so)g=l.outlierwidth,m=l.outliercolor,d=o.outliercolor;else{var y=(l||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?m=e.mlcc=n.lineScale(e.mlc):fn.isArrayOrTypedArray(l.color)?m=Ra.defaultLine:m=l.color,fn.isArrayOrTypedArray(o.color)&&(d=Ra.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)r.call(Ra.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:g)+"px");var x=o.gradient,M=e.mgt;M?h=!0:M=x&&x.type,fn.isArrayOrTypedArray(M)&&(M=M[0],gM[M]||(M=0));var b=o.pattern,_=b&&Er.getPatternAttr(b.shape,e.i,"");if(M&&M!=="none"){var A=e.mgc;A?h=!0:A=x.color;var S=t.uid;h&&(S+="-"+e.i),Er.gradient(r,a,S,M,[[0,A],[1,d]],"fill")}else if(_){var k=!1,D=b.fgcolor;!D&&i&&i.color&&(D=i.color,k=!0);var z=Er.getPatternAttr(D,e.i,i&&i.color||null),F=Er.getPatternAttr(b.bgcolor,e.i,null),O=b.fgopacity,G=Er.getPatternAttr(b.size,e.i,8),B=Er.getPatternAttr(b.solidity,e.i,.3);k=k||e.mcc||fn.isArrayOrTypedArray(b.shape)||fn.isArrayOrTypedArray(b.bgcolor)||fn.isArrayOrTypedArray(b.fgcolor)||fn.isArrayOrTypedArray(b.size)||fn.isArrayOrTypedArray(b.solidity);var X=t.uid;k&&(X+="-"+e.i),Er.pattern(r,"point",a,X,_,G,B,e.mcc,b.fillmode,F,z,O)}else fn.isArrayOrTypedArray(d)?Ra.fill(r,d[e.i]):Ra.fill(r,d);g&&Ra.stroke(r,m)}};Er.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Er.tryColorscale(t,""),r.lineScale=Er.tryColorscale(t,"line"),np.traceIs(e,"symbols")&&(r.ms2mrc=vG.isBubble(e)?hG(e):function(){return(t.size||6)/2}),e.selectedpoints&&fn.extendFlat(r,Er.makeSelectedPointStyleFns(e)),r};Er.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.marker||{},i=t.marker||{},o=n.marker||{},l=a.opacity,s=i.opacity,u=o.opacity,f=s!==void 0,v=u!==void 0;(fn.isArrayOrTypedArray(l)||f||v)&&(r.selectedOpacityFn=function(_){var A=_.mo===void 0?a.opacity:_.mo;return _.selected?f?s:A:v?u:hM*A});var h=a.color,d=i.color,m=o.color;(d||m)&&(r.selectedColorFn=function(_){var A=_.mcc||h;return _.selected?d||A:m||A});var g=a.size,y=i.size,x=o.size,M=y!==void 0,b=x!==void 0;return np.traceIs(e,"symbols")&&(M||b)&&(r.selectedSizeFn=function(_){var A=_.mrc||g/2;return _.selected?M?y/2:A:b?x/2:A}),r};Er.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=t.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return r.selectedTextColorFn=function(f){var v=f.tc||l;return f.selected?s||v:u||(s?v:Ra.addOpacity(v,hM))},r};Er.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Er.makeSelectedPointStyleFns(r),n=r.marker||{},a=[];t.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",t.selectedOpacityFn(o))}),t.selectedColorFn&&a.push(function(i,o){Ra.fill(i,t.selectedColorFn(o))}),t.selectedSizeFn&&a.push(function(i,o){var l=o.mx||n.symbol||0,s=t.selectedSizeFn(o);i.attr("d",pM(Er.symbolNumber(l),s,e3(o,r),Q2(o,r))),o.mrc2=s}),a.length&&e.each(function(i){for(var o=ba.select(this),l=0;l0?t:0}Er.textPointStyle=function(e,r,t){if(e.size()){var n;if(r.selectedpoints){var a=Er.makeSelectedTextStyleFns(r);n=a.selectedTextColorFn}var i=r.texttemplate,o=t._fullLayout;e.each(function(l){var s=ba.select(this),u=i?fn.extractOption(l,r,"txt","texttemplate"):fn.extractOption(l,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,v=f?f(l,r,o):{},h={};dG(h,r,l.i);var d=r._meta||{};u=fn.texttemplateString(u,v,o._d3locale,h,l,d)}var m=l.tp||r.textposition,g=bM(l,r),y=n?n(l):l.tc||r.textfont.color;s.call(Er.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:g,color:y}).text(u).call(ap.convertToTspans,t).call(yM,m,g,l.mrc)})}};Er.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Er.makeSelectedTextStyleFns(r);e.each(function(n){var a=ba.select(this),i=t.selectedTextColorFn(n),o=n.tp||r.textposition,l=bM(n,r);Ra.fill(a,i);var s=np.traceIs(r,"bar-like");yM(a,o,l,n.mrc2||n.mrc,s)})}};var oM=.5;Er.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],n=[],a;for(a=1;a=s||_>=f&&_<=s)&&(A<=v&&A>=u||A>=v&&A<=u)&&(e=[_,A])}return e}Er.applyBackoff=wM;Er.makeTester=function(){var e=fn.ensureSingleById(ba.select("body"),"svg","js-plotly-tester",function(t){t.attr(uG.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=fn.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Er.tester=e,Er.testref=r};Er.savedBBoxes={};var X2=0,wG=1e4;Er.bBox=function(e,r,t){t||(t=lM(e));var n;if(t){if(n=Er.savedBBoxes[t],n)return fn.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(t=lM(a),t){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,l=a.getAttribute("transform");if(!l){var s=Er.bBox(a,!1,t);return i&&(s.left+=i,s.right+=i),o&&(s.top+=o,s.bottom+=o),s}if(t+="~"+i+"~"+o+"~"+l,n=Er.savedBBoxes[t],n)return fn.extendFlat({},n)}}var u,f;r?u=e:(f=Er.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),ba.select(u).attr("transform",null).call(ap.positionText,0,0);var v=u.getBoundingClientRect(),h=Er.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:v.height,width:v.width,left:v.left-h.left,top:v.top-h.top,right:v.right-h.left,bottom:v.bottom-h.top};return X2>=wG&&(Er.savedBBoxes={},X2=0),t&&(Er.savedBBoxes[t]=d),X2++,fn.extendFlat({},d)};function lM(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Er.setClipUrl=function(e,r,t){e.attr("clip-path",K2(r,t))};function K2(e,r){if(!e)return null;var t=r._context,n=t._exportedPlot?"":t._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Er.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};Er.setTranslate=function(e,r,t){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return r=r||0,t=t||0,o=o.replace(n,"").trim(),o+=_1(r,t),o=o.trim(),e[i]("transform",o),o};Er.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};Er.setScale=function(e,r,t){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return r=r||1,t=t||1,o=o.replace(n,"").trim(),o+="scale("+r+","+t+")",o=o.trim(),e[i]("transform",o),o};var MG=/\s*sc.*/;Er.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var n=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(MG,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var AG=/translate\([^)]*\)\s*$/;Er.setTextPointsScale=function(e,r,t){e&&e.each(function(){var n,a=ba.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(AG);r===1&&t===1?n=[]:n=[_1(o,l),"scale("+r+","+t+")",_1(-o,-l)],s&&n.push(s),a.attr("transform",n.join(""))}})};function Q2(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Er.getMarkerStandoff=Q2;var b1=Math.atan2,uc=Math.cos,Y0=Math.sin;function sM(e,r){var t=r[0],n=r[1];return[t*uc(e)-n*Y0(e),t*Y0(e)+n*uc(e)]}var uM,fM,cM,vM,j2,J2;function e3(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||fn.isArrayOrTypedArray(t))&&(t=0));var n,a,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var o=r._geo.project(e.lonlat);n=o[0],a=o[1]}else{var l=r._xA,s=r._yA;if(l&&s)n=l.c2p(e.x),a=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],v=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=b1(h[1]-a,h[0]-n),m=b1(v[1]-a,v[0]-n),g;if(i==="north")g=t/180*Math.PI;else if(i==="previous"){var y=u/180*Math.PI,x=f/180*Math.PI,M=uM/180*Math.PI,b=fM/180*Math.PI,_=M-y,A=uc(b)*Y0(_),S=Y0(b)*uc(x)-uc(b)*Y0(x)*uc(_);g=-b1(A,S)-Math.PI,uM=u,fM=f}var k=sM(d,[uc(g),0]),D=sM(m,[Y0(g),0]);t=b1(k[1]+D[1],k[0]+D[0])/Math.PI*180,i==="previous"&&!(J2===r.uid&&e.i===j2+1)&&(t=null)}if(i==="previous"&&!r._geo)if(J2===r.uid&&e.i===j2+1&&vc(n)&&vc(a)){var z=n-cM,F=a-vM,O=r.line&&r.line.shape||"",G=O.slice(O.length-1);G==="h"&&(F=0),G==="v"&&(z=0),t+=b1(F,z)/Math.PI*180+90}else t=null}return cM=n,vM=a,j2=e.i,J2=r.uid,t}Er.getMarkerAngle=e3});var x1=te((Tue,SM)=>{"use strict";var G0=kt(),TG=Bt(),kG=ua(),r3=dt(),hc=pr(),AM=hc.strTranslate,ip=ln(),op=zt(),V0=ci(),TM=vd(),SG=Ka().OPPOSITE_SIDE,kM=/ [XY][0-9]* /,t3=1.6,n3=1.6;function CG(e,r,t){var n=e._fullLayout,a=t.propContainer,i=t.propName,o=t.placeholder,l=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,v=t.containerGroup,h=1,d=a.title,m=(d&&d.text?d.text:"").trim(),g=!1,y=d&&d.font?d.font:{},x=y.family,M=y.size,b=y.color,_=y.weight,A=y.style,S=y.variant,k=y.textcase,D=y.lineposition,z=y.shadow,F=t.subtitlePropName,O=!!F,G=t.subtitlePlaceholder,B=(a.title||{}).subtitle||{text:"",font:{}},X=B.text.trim(),V=!1,re=1,ne=B.font,K=ne.family,ee=ne.size,fe=ne.color,de=ne.weight,qe=ne.style,Be=ne.variant,Ne=ne.textcase,Ie=ne.lineposition,Se=ne.shadow,Xe;i==="title.text"?Xe="titleText":i.indexOf("axis")!==-1?Xe="axisTitleText":i.indexOf("colorbar"!==-1)&&(Xe="colorbarTitleText");var se=e._context.edits[Xe];function be(lr,ir){return lr===void 0||ir===void 0?!1:lr.replace(kM," % ")===ir.replace(kM," % ")}m===""?h=0:be(m,o)&&(se||(m=""),h=.2,g=!0),O&&(X===""?re=0:be(X,G)&&(se||(X=""),re=.2,V=!0)),t._meta?m=hc.templateString(m,t._meta):n._meta&&(m=hc.templateString(m,n._meta));var Te=m||X||se,pe;v||(v=hc.ensureSingle(n._infolayer,"g","g-"+r),pe=n._hColorbarMoveTitle);var W=v.selectAll("text."+r).data(Te?[0]:[]);W.enter().append("text"),W.text(m).attr("class",r),W.exit().remove();var Q=null,$=r+"-subtitle",Me=X||se;if(O&&Me&&(Q=v.selectAll("text."+$).data(Me?[0]:[]),Q.enter().append("text"),Q.text(X).attr("class",$),Q.exit().remove()),!Te)return v;function Fe(lr,ir){hc.syncOrAsync([Oe,fr],{title:lr,subtitle:ir})}function Oe(lr){var ir=lr.title,rr=lr.subtitle,Cr;!f&&pe&&(f={}),f?(Cr="",f.rotate&&(Cr+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||pe)&&(Cr+=AM(0,(f.offset||0)-(pe||0)))):Cr=null,ir.attr("transform",Cr);function yr(er){if(er){var Ke=G0.select(er.node().parentNode).select("."+$);if(!Ke.empty()){var mr=er.node().getBBox();if(mr.height){var Mr=mr.y+mr.height+t3*ee;Ke.attr("y",Mr)}}}}if(ir.style("opacity",h*op.opacity(b)).call(ip.font,{color:op.rgb(b),size:G0.round(M,2),family:x,weight:_,style:A,variant:S,textcase:k,shadow:z,lineposition:D}).attr(u).call(V0.convertToTspans,e,yr),rr){var Ae=v.select("."+r+"-math-group"),Ve=ir.node().getBBox(),je=Ae.node()?Ae.node().getBBox():void 0,zr=je?je.y+je.height+t3*ee:Ve.y+Ve.height+n3*ee,kr=hc.extendFlat({},u,{y:zr});rr.attr("transform",Cr),rr.style("opacity",re*op.opacity(fe)).call(ip.font,{color:op.rgb(fe),size:G0.round(ee,2),family:K,weight:de,style:qe,variant:Be,textcase:Ne,shadow:Se,lineposition:Ie}).attr(kr).call(V0.convertToTspans,e)}return kG.previousPromises(e)}function fr(lr){var ir=lr.title,rr=G0.select(ir.node().parentNode);if(s&&s.selection&&s.side&&m){rr.attr("transform",null);var Cr=SG[s.side],yr=s.side==="left"||s.side==="top"?-1:1,Ae=TG(s.pad)?s.pad:2,Ve=ip.bBox(rr.node()),je={t:0,b:0,l:0,r:0},zr=e._fullLayout._reservedMargin;for(var kr in zr)for(var er in zr[kr]){var Ke=zr[kr][er];je[er]=Math.max(je[er],Ke)}var mr={left:je.l,top:je.t,right:n.width-je.r,bottom:n.height-je.b},Mr=s.maxShift||yr*(mr[s.side]-Ve[s.side]),gr=0;if(Mr<0)gr=Mr;else{var dr=s.offsetLeft||0,Tr=s.offsetTop||0;Ve.left-=dr,Ve.right-=dr,Ve.top-=Tr,Ve.bottom-=Tr,s.selection.each(function(){var Ur=ip.bBox(this);hc.bBoxIntersect(Ve,Ur,Ae)&&(gr=Math.max(gr,yr*(Ur[s.side]-Ve[Cr])+Ae))}),gr=Math.min(Mr,gr),a._titleScoot=Math.abs(gr)}if(gr>0||Mr<0){var Pr={left:[-gr,0],right:[gr,0],top:[0,-gr],bottom:[0,gr]}[s.side];rr.attr("transform",AM(Pr[0],Pr[1]))}}}W.call(Fe,Q);function nr(lr,ir){lr.text(ir).on("mouseover.opacity",function(){G0.select(this).transition().duration(TM.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){G0.select(this).transition().duration(TM.HIDE_PLACEHOLDER).style("opacity",0)})}if(se&&(m?W.on(".opacity",null):(nr(W,o),g=!0),W.call(V0.makeEditable,{gd:e}).on("edit",function(lr){l!==void 0?r3.call("_guiRestyle",e,i,lr,l):r3.call("_guiRelayout",e,i,lr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Fe)}).on("input",function(lr){this.text(lr||" ").call(V0.positionText,u.x,u.y)}),O)){if(O&&!m){var Ze=W.node().getBBox(),ar=Ze.y+Ze.height+n3*ee;Q.attr("y",ar)}X?Q.on(".opacity",null):(nr(Q,G),V=!0),Q.call(V0.makeEditable,{gd:e}).on("edit",function(lr){r3.call("_guiRelayout",e,"title.subtitle.text",lr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Fe)}).on("input",function(lr){this.text(lr||" ").call(V0.positionText,Q.attr("x"),Q.attr("y"))})}return W.classed("js-placeholder",g),Q&&Q.classed("js-placeholder",V),v}SM.exports={draw:CG,SUBTITLE_PADDING_EM:n3,SUBTITLE_PADDING_MATHJAX_EM:t3}});var dp=te((kue,EM)=>{"use strict";var LG=kt(),qG=m0().utcFormat,yn=pr(),DG=yn.numberFormat,ts=Bt(),Zu=yn.cleanNumber,EG=yn.ms2DateTime,CM=yn.dateTime2ms,ns=yn.ensureNumber,LM=yn.isArrayOrTypedArray,Xu=En(),lp=Xu.FP_SAFE,ml=Xu.BADNUM,PG=Xu.LOG_CLIP,RG=Xu.ONEWEEK,sp=Xu.ONEDAY,up=Xu.ONEHOUR,qM=Xu.ONEMIN,DM=Xu.ONESEC,fp=ya(),hp=Pa(),cp=hp.HOUR_PATTERN,vp=hp.WEEKDAY_PATTERN;function w1(e){return Math.pow(10,e)}function a3(e){return e!=null}EM.exports=function(r,t){t=t||{};var n=r._id||"x",a=n.charAt(0);function i(_,A){if(_>0)return Math.log(_)/Math.LN10;if(_<=0&&A&&r.range&&r.range.length===2){var S=r.range[0],k=r.range[1];return .5*(S+k-2*PG*Math.abs(S-k))}else return ml}function o(_,A,S,k){if((k||{}).msUTC&&ts(_))return+_;var D=CM(_,S||r.calendar);if(D===ml)if(ts(_)){_=+_;var z=Math.floor(yn.mod(_+.05,1)*10),F=Math.round(_-z/10);D=CM(new Date(F))+z/10}else return ml;return D}function l(_,A,S){return EG(_,A,S||r.calendar)}function s(_){return r._categories[Math.round(_)]}function u(_){if(a3(_)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[_]!==void 0)return r._categoriesMap[_];r._categories.push(typeof _=="number"?String(_):_);var A=r._categories.length-1;return r._categoriesMap[_]=A,A}return ml}function f(_,A){for(var S=new Array(A),k=0;kr.range[1]&&(S=!S);for(var k=S?-1:1,D=k*_,z=0,F=0;FG)z=F+1;else{z=D<(O+G)/2?F:F+1;break}}var B=r._B[z]||0;return isFinite(B)?m(_,r._m2,B):0},x=function(_){var A=r._rangebreaks.length;if(!A)return g(_,r._m,r._b);for(var S=0,k=0;kr._rangebreaks[k].pmax&&(S=k+1);return g(_,r._m2,r._B[S])}}r.c2l=r.type==="log"?i:ns,r.l2c=r.type==="log"?w1:ns,r.l2p=y,r.p2l=x,r.c2p=r.type==="log"?function(_,A){return y(i(_,A))}:y,r.p2c=r.type==="log"?function(_){return w1(x(_))}:x,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Zu,r.c2d=r.c2r=r.l2d=r.l2r=ns,r.d2p=r.r2p=function(_){return r.l2p(Zu(_))},r.p2d=r.p2r=x,r.cleanPos=ns):r.type==="log"?(r.d2r=r.d2l=function(_,A){return i(Zu(_),A)},r.r2d=r.r2c=function(_){return w1(Zu(_))},r.d2c=r.r2l=Zu,r.c2d=r.l2r=ns,r.c2r=i,r.l2d=w1,r.d2p=function(_,A){return r.l2p(r.d2r(_,A))},r.p2d=function(_){return w1(x(_))},r.r2p=function(_){return r.l2p(Zu(_))},r.p2r=x,r.cleanPos=ns):r.type==="date"?(r.d2r=r.r2d=yn.identity,r.d2c=r.r2c=r.d2l=r.r2l=o,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(_,A,S){return r.l2p(o(_,0,S))},r.p2d=r.p2r=function(_,A,S){return l(x(_),A,S)},r.cleanPos=function(_){return yn.cleanDate(_,ml,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(_){var A=d(_);return A!==void 0?A:r.fraction2r(.5)},r.l2r=r.c2r=ns,r.r2l=d,r.d2p=function(_){return r.l2p(r.r2c(_))},r.p2d=function(_){return s(x(_))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(_){return typeof _=="string"&&_!==""?_:ns(_)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(_){var A=h(_);return A!==void 0?A:r.fraction2r(.5)},r.r2c_just_indices=v,r.l2r=r.c2r=ns,r.r2l=h,r.d2p=function(_){return r.l2p(r.r2c(_))},r.p2d=function(_){return s(x(_))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(_){return Array.isArray(_)||typeof _=="string"&&_!==""?_:ns(_)},r.setupMultiCategory=function(_){var A=r._traceIndices,S,k,D=r._matchGroup;if(D&&r._categories.length===0){for(var z in D)if(z!==n){var F=t[fp.id2name(z)];A=A.concat(F._traceIndices)}}var O=[[0,{}],[0,{}]],G=[];for(S=0;SF[1]&&(k[z?0:1]=S),k[0]===k[1]){var O=r.l2r(A),G=r.l2r(S);if(A!==void 0){var B=O+1;S!==void 0&&(B=Math.min(B,G)),k[z?1:0]=B}if(S!==void 0){var X=G+1;A!==void 0&&(X=Math.max(X,O)),k[z?0:1]=X}}}},r.cleanRange=function(_,A){r._cleanRange(_,A),r.limitRange(_)},r._cleanRange=function(_,A){A||(A={}),_||(_="range");var S=yn.nestedProperty(r,_).get(),k,D;if(r.type==="date"?D=yn.dfltRange(r.calendar):a==="y"?D=hp.DFLTRANGEY:r._name==="realaxis"?D=[0,1]:D=A.dfltRange||hp.DFLTRANGEX,D=D.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(D[0]=0),!S||S.length!==2){yn.nestedProperty(r,_).set(D);return}var z=S[0]===null,F=S[1]===null;for(r.type==="date"&&!r.autorange&&(S[0]=yn.cleanDate(S[0],ml,r.calendar),S[1]=yn.cleanDate(S[1],ml,r.calendar)),k=0;k<2;k++)if(r.type==="date"){if(!yn.isDateTime(S[k],r.calendar)){r[_]=D;break}if(r.r2l(S[0])===r.r2l(S[1])){var O=yn.constrain(r.r2l(S[0]),yn.MIN_MS+1e3,yn.MAX_MS-1e3);S[0]=r.l2r(O-1e3),S[1]=r.l2r(O+1e3);break}}else{if(!ts(S[k]))if(!(z||F)&&ts(S[1-k]))S[k]=S[1-k]*(k?10:.1);else{r[_]=D;break}if(S[k]<-lp?S[k]=-lp:S[k]>lp&&(S[k]=lp),S[0]===S[1]){var G=Math.max(1,Math.abs(S[0]*1e-6));S[0]-=G,S[1]+=G}}},r.setScale=function(_){var A=t._size;if(r.overlaying){var S=fp.getFromId({_fullLayout:t},r.overlaying);r.domain=S.domain}var k=_&&r._r?"_r":"range",D=r.calendar;r.cleanRange(k);var z=r.r2l(r[k][0],D),F=r.r2l(r[k][1],D),O=a==="y";if(O?(r._offset=A.t+(1-r.domain[1])*A.h,r._length=A.h*(r.domain[1]-r.domain[0]),r._m=r._length/(z-F),r._b=-r._m*F):(r._offset=A.l+r.domain[0]*A.w,r._length=A.w*(r.domain[1]-r.domain[0]),r._m=r._length/(F-z),r._b=-r._m*z),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var G,B;if(r._rangebreaks=r.locateBreaks(Math.min(z,F),Math.max(z,F)),r._rangebreaks.length){for(G=0;GF&&(X=!X),X&&r._rangebreaks.reverse();var V=X?-1:1;for(r._m2=V*r._length/(Math.abs(F-z)-r._lBreaks),r._B.push(-r._m2*(O?F:z)),G=0;GD&&(D+=7,zD&&(D+=24,z=k&&z=k&&_=Se.min&&(qeSe.max&&(Se.max=Be),Ne=!1)}Ne&&F.push({min:qe,max:Be})}};for(S=0;S{"use strict";var PM=Bt(),i3=pr(),zG=En().BADNUM,pp=i3.isArrayOrTypedArray,NG=i3.isDateTime,FG=i3.cleanNumber,RM=Math.round;NM.exports=function(r,t,n){var a=r,i=n.noMultiCategory;if(pp(a)&&!a.length)return"-";if(!i&&UG(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],l=0;li*2}function zM(e){return Math.max(1,(e-1)/1e3)}function OG(e,r){for(var t=e.length,n=zM(t),a=0,i=0,o={},l=0;la*2}function UG(e){return pp(e[0])&&pp(e[1])}});var Ju=te((Cue,GM)=>{"use strict";var YG=kt(),BM=Bt(),ju=pr(),gp=En().FP_SAFE,GG=dt(),VG=ln(),OM=ya(),WG=OM.getFromId,ZG=OM.isLinked;GM.exports={applyAutorangeOptions:YM,getAutoRange:l3,makePadFn:s3,doAutoRange:jG,findExtremes:JG,concatExtremes:c3};function l3(e,r){var t,n,a=[],i=e._fullLayout,o=s3(i,r,0),l=s3(i,r,1),s=c3(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return ju.simpleMap(r.range,r.r2l);var v=u[0].val,h=f[0].val;for(t=1;t0&&(F=b-o(S)-l(k),F>_?O/F>A&&(D=S,z=k,A=O/F):O/b>A&&(D={val:S.val,nopad:1},z={val:k.val,nopad:1},A=O/b));function G(ne,K){return Math.max(ne,l(K))}if(v===h){var B=v-1,X=v+1;if(x)if(v===0)a=[0,1];else{var V=(v>0?f:u).reduce(G,0),re=v/(1-Math.min(.5,V/b));a=v>0?[0,re]:[re,0]}else M?a=[Math.max(0,B),Math.max(1,X)]:a=[B,X]}else x?(D.val>=0&&(D={val:0,nopad:1}),z.val<=0&&(z={val:0,nopad:1})):M&&(D.val-A*o(D)<0&&(D={val:0,nopad:1}),z.val<=0&&(z={val:1,nopad:1})),A=(z.val-D.val-FM(r,S.val,k.val))/(b-o(D)-l(z)),a=[D.val-A*o(D),z.val+A*l(z)];return a=YM(a,r),r.limitRange&&r.limitRange(),m&&a.reverse(),ju.simpleMap(a,r.l2r||Number)}function FM(e,r,t){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),S=_((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),k=_(t.vpadplus||t.vpad),D=_(t.vpadminus||t.vpad);if(!u){if(M=1/0,b=-1/0,s)for(v=0;v0&&(M=h),h>b&&h-gp&&(M=h),h>b&&h=O;v--)F(v);return{min:n,max:a,opts:t}}function u3(e,r,t,n){UM(e,r,t,n,$G)}function f3(e,r,t,n){UM(e,r,t,n,KG)}function UM(e,r,t,n,a){for(var i=n.tozero,o=n.extrapad,l=!0,s=0;s=t&&(u.extrapad||!o)){l=!1;break}else a(r,u.val)&&u.pad<=t&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:o})}}function HM(e){return BM(e)&&Math.abs(e)=r}function QG(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&mp(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&mp(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function eV(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&mp(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&mp(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function mp(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),o<=s&&(o=s,n=s)}}return t=QG(t,r),n=eV(n,r),[t,n]}});var Cn=te((Lue,vA)=>{"use strict";var Ao=kt(),ea=Bt(),W0=ua(),A1=dt(),ut=pr(),Z0=ut.strTranslate,dc=ci(),rV=x1(),T1=zt(),Ki=ln(),tV=pl(),VM=L2(),za=En(),nV=za.ONEMAXYEAR,_p=za.ONEAVGYEAR,xp=za.ONEMINYEAR,aV=za.ONEMAXQUARTER,p3=za.ONEAVGQUARTER,wp=za.ONEMINQUARTER,iV=za.ONEMAXMONTH,X0=za.ONEAVGMONTH,Mp=za.ONEMINMONTH,Qi=za.ONEWEEK,ei=za.ONEDAY,$u=ei/2,is=za.ONEHOUR,k1=za.ONEMIN,Ap=za.ONESEC,oV=za.ONEMILLI,lV=za.ONEMICROSEC,pc=za.MINUS_SIGN,Sp=za.BADNUM,g3={K:"zeroline"},m3={K:"gridline",L:"path"},y3={K:"minor-gridline",L:"path"},tA={K:"tick",L:"path"},WM={K:"tick",L:"text"},ZM={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Cp=Ka(),M1=Cp.MID_SHIFT,gc=Cp.CAP_SHIFT,S1=Cp.LINE_SPACING,sV=Cp.OPPOSITE_SIDE,Tp=3,xr=vA.exports={};xr.setConvert=dp();var uV=o3(),Ks=ya(),fV=Ks.idSort,cV=Ks.isLinked;xr.id2name=Ks.id2name;xr.name2id=Ks.name2id;xr.cleanId=Ks.cleanId;xr.list=Ks.list;xr.listIds=Ks.listIds;xr.getFromId=Ks.getFromId;xr.getFromTrace=Ks.getFromTrace;var nA=Ju();xr.getAutoRange=nA.getAutoRange;xr.findExtremes=nA.findExtremes;var vV=1e-4;function w3(e){var r=(e[1]-e[0])*vV;return[e[0]-r,e[1]+r]}xr.coerceRef=function(e,r,t,n,a,i){var o=n.charAt(n.length-1),l=t._fullLayout._subplots[o+"axis"],s=n+"ref",u={};return a||(a=l[0]||(typeof i=="string"?i:i[0])),i||(i=a),l=l.concat(l.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:l.concat(i?typeof i=="string"?[i]:i:[]),dflt:a},ut.coerce(e,r,u,s)};xr.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};xr.coercePosition=function(e,r,t,n,a,i){var o,l,s=xr.getRefType(n);if(s!=="range")o=ut.ensureNumber,l=t(a,i);else{var u=xr.getFromId(r,n);i=u.fraction2r(i),l=t(a,i),o=u.cleanPos}e[a]=o(l)};xr.cleanPosition=function(e,r,t){var n=t==="paper"||t==="pixel"?ut.ensureNumber:xr.getFromId(r,t).cleanPos;return n(e)};xr.redrawComponents=function(e,r){r=r||xr.listIds(e);var t=e._fullLayout;function n(a,i,o,l){for(var s=A1.getComponentMethod(a,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};xr.saveRangeInitial=function(e,r){for(var t=xr.list(e,"",!0),n=!1,a=0;av*.3||u(n)||u(a))){var h=t.dtick/2;e+=e+ho){var l=Number(t.substr(1));i.exactYears>o&&l%12===0?e=xr.tickIncrement(e,"M6","reverse")+ei*1.5:i.exactMonths>o?e=xr.tickIncrement(e,"M1","reverse")+ei*15.5:e-=$u;var s=xr.tickIncrement(e,t);if(s<=n)return s}return e}xr.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var n=r.dtick&&ea(r._tmin),a;if(n){var i=xr.tickIncrement(r._tmin,r.dtick,!0);a=[r._tmin,i*.99+r._tmin*.01]}else{var o=ut.simpleMap(r.range,r.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=ut.simpleMap(a,r.l2r),e._isMinor=!0,xr.prepTicks(e,t),n){var l=ea(r.dtick),s=ea(e.dtick),u=l?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);l&&s?v3(u,f)?u===2*Qi&&f===2*ei&&(e.dtick=Qi):u===2*Qi&&f===3*ei?e.dtick=Qi:u===Qi&&!(r._input.minor||{}).nticks?e.dtick=ei:JM(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":v3(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?v3(u,f)||(e.dtick=JM(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function v3(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function JM(e,r){return Math.abs(e/r-1)<.001}xr.prepTicks=function(e,r){var t=ut.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ut.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=ut.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(t[1]-t[0])/n,xr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var l=e[i].value,s=e[o].value,u=Math.abs(s-l),f=t||u,v=0;f>=xp?u>=xp&&u<=nV?v=u:v=_p:t===p3&&f>=wp?u>=wp&&u<=aV?v=u:v=p3:f>=Mp?u>=Mp&&u<=iV?v=u:v=X0:t===Qi&&f>=Qi?v=Qi:f>=ei?v=ei:t===$u&&f>=$u?v=$u:t===is&&f>=is&&(v=is);var h;v>=u&&(v=u,h=!0);var d=a+v;if(r.rangebreaks&&v>0){for(var m=84,g=0,y=0;yQi&&(v=u)}(v>0||n===0)&&(e[n].periodX=a+v/2)}}xr.calcTicks=function(r,t){for(var n=r.type,a=r.calendar,i=r.ticklabelstep,o=r.ticklabelmode==="period",l=r.range[0]>r.range[1],s=!r.ticklabelindex||ut.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=ut.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(b?0:1);_--){var A=!_;_?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var S=_?r:ut.extendFlat({},r,r.minor);if(A?xr.prepMinorTicks(S,r,t):xr.prepTicks(S,t),S.tickmode==="array"){_?(y=[],m=$M(r,!A)):(x=[],g=$M(r,!A));continue}if(S.tickmode==="sync"){y=[],m=yV(r);continue}var k=w3(u),D=k[0],z=k[1],F=ea(S.dtick),O=n==="log"&&!(F||S.dtick.charAt(0)==="L"),G=xr.tickFirst(S,t);if(_){if(r._tmin=G,G=z:X<=z;X=xr.tickIncrement(X,ne,f,a)){if(_&&V++,S.rangebreaks&&!f){if(X=h)break}if(y.length>d||X===B)break;B=X;var K={value:X};_?(O&&X!==(X|0)&&(K.simpleLabel=!0),i>1&&V%i&&(K.skipLabel=!0),y.push(K)):(K.minor=!0,x.push(K))}}if(!x||x.length<2)s=!1;else{var ee=(x[1].value-x[0].value)*(l?-1:1);UV(ee,r.tickformat)||(s=!1)}if(!s)M=y;else{var fe=y.concat(x);o&&y.length&&(fe=fe.slice(1)),fe=fe.sort(function(ar,lr){return ar.value-lr.value}).filter(function(ar,lr,ir){return lr===0||ar.value!==ir[lr-1].value});var de=fe.map(function(ar,lr){return ar.minor===void 0&&!ar.skipLabel?lr:null}).filter(function(ar){return ar!==null});de.forEach(function(ar){s.map(function(lr){var ir=ar+lr;ir>=0&&ir-1;Te--){if(y[Te].drop){y.splice(Te,1);continue}y[Te].value=d3(y[Te].value,r);var $=r.c2p(y[Te].value);(pe?Q>$-W:Q<$+W)?y.splice(f?Te+1:Te,1):Q=$}}T3(r)&&Math.abs(u[1]-u[0])===360&&y.pop(),r._tmax=(y[y.length-1]||{}).value,r._prevDateHead="",r._inCalcTicks=!0;var Me,Fe=function(ar){ar.text="",r._prevDateHead=Me};y=y.concat(x);function Oe(ar,lr){var ir=xr.tickText(ar,lr.value,!1,lr.simpleLabel),rr=lr.periodX;return rr!==void 0&&(ir.periodX=rr,(rr>h||rrh&&(ir.periodX=h),rra&&h_p)r/=_p,n=a(10),e.dtick="M"+12*as(r,n,yp);else if(i>X0)r/=X0,e.dtick="M"+as(r,1,KM);else if(i>ei){if(e.dtick=as(r,ei,e._hasDayOfWeekBreaks?[1,2,7,14]:bV),!t){var o=xr.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=ut.dateTick0(e.calendar,2):e.tick0=ut.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else i>is?e.dtick=as(r,is,KM):i>k1?e.dtick=as(r,k1,QM):i>Ap?e.dtick=as(r,Ap,QM):(n=a(10),e.dtick=as(r,n,yp))}else if(e.type==="log"){e.tick0=0;var s=ut.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,n=a(10),e.dtick="L"+as(r,n,yp)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):T3(e)?(e.tick0=0,n=1,e.dtick=as(r,n,_V)):(e.tick0=0,n=a(10),e.dtick=as(r,n,yp));if(e.dtick===0&&(e.dtick=1),!ea(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function lA(e){var r=e.dtick;if(e._tickexponent=0,!ea(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),n=e.l2r(t).replace(/(^-|i)/g,""),a=n.length;if(String(r).charAt(0)==="M")a>10||n.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=ei&&a<=10||r>=ei*15)e._tickround="d";else if(r>=k1&&a<=16||r>=is)e._tickround="M";else if(r>=Ap&&a<=19||r>=k1)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(ea(r)||r.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);ea(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(kp(e.exponentformat)&&!M3(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}xr.tickIncrement=function(e,r,t,n){var a=t?-1:1;if(ea(r))return ut.increment(e,a*r);var i=r.charAt(0),o=a*Number(r.substr(1));if(i==="M")return ut.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var l=r==="D2"?oA:iA,s=e+a*.01,u=ut.roundUp(ut.mod(s,1),l,t);return Math.floor(s)+Math.log(Ao.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};xr.tickFirst=function(e,r){var t=e.r2l||Number,n=ut.simpleMap(e.range,t,void 0,void 0,r),a=n[1]=0&&x<=e._length?y:null};if(i&&ut.isArrayOrTypedArray(e.ticktext)){var v=ut.simpleMap(e.range,e.r2l),h=(Math.abs(v[1]-v[0])-(e._lBreaks||0))/1e4;for(u=0;u"+l;else{var u=L1(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(o+="
")}r.text=o}function wV(e,r,t,n,a){var i=e.dtick,o=r.x,l=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&s!=="L"&&(i="L3",s="L"),l||s==="L")r.text=C1(Math.pow(10,o),e,a,n);else if(ea(i)||s==="D"&&ut.mod(o+.01,1)<.1){var u=Math.round(o),f=Math.abs(u),v=e.exponentformat;v==="power"||kp(v)&&M3(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":pc)+f+"",r.fontSize*=1.25):(v==="e"||v==="E")&&f>2?r.text="1"+v+(u>0?"+":pc)+f:(r.text=C1(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,ut.mod(o,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(o<0?.5:.25)))}}function MV(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function AV(e,r,t){var n=Math.round(r.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);t?r.text=o+" - "+i:(r.text=i,r.text2=o)}function TV(e,r,t,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(a="hide"),r.text=C1(r.x,e,a,n)}function kV(e,r,t,n,a){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var o=SV(i);if(o[1]>=100)r.text=C1(ut.deg2rad(r.x),e,a,n);else{var l=r.x<0;o[1]===1?o[0]===1?r.text="\u03C0":r.text=o[0]+"\u03C0":r.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),l&&(r.text=pc+r.text)}}}else r.text=C1(r.x,e,a,n)}function SV(e){function r(l,s){return Math.abs(l-s)<=1e-6}function t(l,s){return r(s,0)?l:t(s,l%s)}function n(l){for(var s=1;!r(Math.round(l*s)/s,l);)s*=10;return s}var a=n(e),i=e*a,o=Math.abs(t(i,a));return[Math.round(i/o),Math.round(a/o)]}var CV=["f","p","n","\u03BC","m","","k","M","G","T"];function kp(e){return e==="SI"||e==="B"}function M3(e){return e>14||e<-15}function C1(e,r,t,n){var a=e<0,i=r._tickround,o=t||r.exponentformat||"B",l=r._tickexponent,s=xr.getTickFormat(r),u=r.separatethousands;if(n){var f={exponentformat:o,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:ea(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};lA(f),i=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,pc);var v=Math.pow(10,-i)/2;if(o==="none"&&(l=0),e=Math.abs(e),e"+m+"":o==="B"&&l===9?e+="B":kp(o)&&(e+=CV[l/3+5])}return a?pc+e:e}xr.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*X0}function n(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var v=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return v===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):v-h}else return typeof s=="number"?1:-1}function a(s,u,f){var v=f||function(m){return m},h=u[0],d=u[1];return(!h&&typeof h!="number"||v(h)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function i(s,u){var f=u[0]===null,v=u[1]===null,h=n(s,u[0])>=0,d=n(s,u[1])<=0;return(f||h)&&(v||d)}var o,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&a.unshift(a.splice(f,1).shift())}});var l={false:{left:0,right:0}};return ut.syncOrAsync(a.map(function(s){return function(){if(s){var u=xr.getFromId(e,s);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=o;var f=xr.drawOne(e,u,t);return u._shiftPusher&&x3(u,u._fullDepth||0,l,!0),u._r=u.range.slice(),u._rl=ut.simpleMap(u._r,u.r2l),f}}}))};xr.drawOne=function(e,r,t){t=t||{};var n=t.axShifts||{},a=t.overlayingShiftedAx||[],i,o,l;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),v=xr.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||a.indexOf(r._id)!==-1||a.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),x3(r,d,n,!0),x3(r,r.shift||0,n,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=OV(r,n));var m=h[f+"axislayer"],g=r._mainLinePosition,y=g+=r._shift,x=r._mainMirrorPosition,M=r._vals=xr.calcTicks(r),b=[r.mirror,y,x].join("_");for(i=0;i0?ir.bottom-ar:0,lr))));var Ae=0,Ve=0;if(r._shiftPusher&&(Ae=Math.max(lr,ir.height>0?nr==="l"?ar-ir.left:ir.right-ar:0),r.title.text!==s._dfltTitle[f]&&(Ve=(r._titleStandoff||0)+(r._titleScoot||0),nr==="l"&&(Ve+=rA(r))),r._fullDepth=Math.max(Ae,Ve)),r.automargin){rr={x:0,y:0,r:0,l:0,t:0,b:0};var je=[0,1],zr=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(nr==="b"?rr[nr]=r._depth:(rr[nr]=r._depth=Math.max(ir.width>0?ar-ir.top:0,lr),je.reverse()),ir.width>0){var kr=ir.right-(r._offset+r._length);kr>0&&(rr.xr=1,rr.r=kr);var er=r._offset-ir.left;er>0&&(rr.xl=0,rr.l=er)}}else if(nr==="l"?(r._depth=Math.max(ir.height>0?ar-ir.left:0,lr),rr[nr]=r._depth-zr):(r._depth=Math.max(ir.height>0?ir.right-ar:0,lr),rr[nr]=r._depth+zr,je.reverse()),ir.height>0){var Ke=ir.bottom-(r._offset+r._length);Ke>0&&(rr.yb=0,rr.b=Ke);var mr=r._offset-ir.top;mr>0&&(rr.yt=1,rr.t=mr)}rr[v]=r.anchor==="free"?r.position:r._anchorAxis.domain[je[0]],r.title.text!==s._dfltTitle[f]&&(rr[nr]+=rA(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Cr={x:0,y:0,r:0,l:0,t:0,b:0},Cr[Ze]=r.linewidth,r.mirror&&r.mirror!==!0&&(Cr[Ze]+=lr),r.mirror===!0||r.mirror==="ticks"?Cr[v]=r._anchorAxis.domain[je[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Cr[v]=[r._counterDomainMin,r._counterDomainMax][je[1]]))}fr&&(yr=A1.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(eA(rr,r.automargin),eA(Cr,r.automargin)),W0.autoMargin(e,A3(r),rr),W0.autoMargin(e,fA(r),Cr),W0.autoMargin(e,cA(r),yr)}),ut.syncOrAsync(Fe)}};function eA(e,r){if(e){var t=Object.keys(ZM).reduce(function(n,a){return r.indexOf(a)!==-1&&ZM[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){t[n]||(n.length===1?e[n]=0:delete e[n])})}}function LV(e,r){var t=[],n,a=function(i,o){var l=i.xbnd[o];l!==null&&t.push(ut.extendFlat({},i,{x:l}))};if(r.length){for(n=0;ne.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!l;if(t){var u=o?-1:1;t=t*u}if(n){var f=e.side,v=l&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;n=n*v}return e._id.charAt(0)==="x"?function(h){return Z0(a+e._offset+e.l2p(b3(h))+t,i+n)}:function(h){return Z0(i+n,a+e._offset+e.l2p(b3(h))+t)}};function b3(e){return e.periodX!==void 0?e.periodX:e.x}function PV(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},n=t("top"),a=t("left"),i=t("right"),o=t("bottom"),l=t("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,v=Tp,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(f+=h*gc,v+=(e.linewidth||0)/2),(a||i)&&(f+=(e.linewidth||0)/2,v+=Tp),l&&u==="top"&&(v-=h*(1-gc)),(a||n)&&(f=-f),(u==="bottom"||u==="right")&&(v=-v),[s?f:0,l?v:0]}xr.makeTickPath=function(e,r,t,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return o==="x"?"M0,"+(r+l*t)+"v"+i*t:"M"+(r+l*t)+",0h"+i*t};xr.makeLabelFns=function(e,r,t){var n=e.ticklabelposition||"",a=function(G){return n.indexOf(G)!==-1},i=a("top"),o=a("left"),l=a("right"),s=a("bottom"),u=s||o||i||l,f=a("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,m=v?e.ticklen:0;if(f?m*=-1:u&&(m=0),v&&(h+=m,t)){var g=ut.deg2rad(t);h=m*Math.cos(g)+1,d=m*Math.sin(g)}e.showticklabels&&(v||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:h,labelShift:d},x,M,b,_,A=0,S=e.side,k=e._id.charAt(0),D=e.tickangle,z;if(k==="x")z=!f&&S==="bottom"||f&&S==="top",_=z?1:-1,f&&(_*=-1),x=d*_,M=r+h*_,b=z?1:-.2,Math.abs(D)===90&&(f?b+=M1:D===-90&&S==="bottom"?b=gc:D===90&&S==="top"?b=M1:b=.5,A=M1/2*(D/90)),y.xFn=function(G){return G.dx+x+A*G.fontSize},y.yFn=function(G){return G.dy+M+G.fontSize*b},y.anchorFn=function(G,B){if(u){if(o)return"end";if(l)return"start"}return!ea(B)||B===0||B===180?"middle":B*_<0!==f?"end":"start"},y.heightFn=function(G,B,X){return B<-60||B>60?-.5*X:e.side==="top"!==f?-X:0};else if(k==="y"){if(z=!f&&S==="left"||f&&S==="right",_=z?1:-1,f&&(_*=-1),x=h,M=d*_,b=0,!f&&Math.abs(D)===90&&(D===-90&&S==="left"||D===90&&S==="right"?b=gc:b=.5),f){var F=ea(D)?+D:0;if(F!==0){var O=ut.deg2rad(F);A=Math.abs(Math.sin(O))*gc*_,b=0}}y.xFn=function(G){return G.dx+r-(x+G.fontSize*b)*_+A*G.fontSize},y.yFn=function(G){return G.dy+M+G.fontSize*M1},y.anchorFn=function(G,B){return ea(B)&&Math.abs(B)===90?"middle":z?"end":"start"},y.heightFn=function(G,B,X){return e.side==="right"&&(B*=-1),B<-30?-X:B<30?-.5*X:0}}return y};function Lp(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}xr.drawTicks=function(e,r,t){t=t||{};var n=r._id+"tick",a=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(r.ticks?t.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=t.layer.selectAll("path."+n).data(a,Lp);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(o){return T1.stroke(Ao.select(this),o.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(o){return Ki.crispRound(e,o.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),qp(r,[tA]),i.attr("transform",t.transFn)};xr.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var n=r._id+"grid",a=r.minor&&r.minor.showgrid,i=a?t.vals.filter(function(x){return x.minor}):[],o=r.showgrid?t.vals.filter(function(x){return!x.minor}):[],l=t.counterAxis;if(l&&xr.shouldShowZeroLine(e,r,l))for(var s=r.tickmode==="array",u=0;u=0;m--){var g=m?h:d;if(g){var y=g.selectAll("path."+n).data(m?o:i,Lp);y.exit().remove(),y.enter().append("path").classed(n,1).classed("crisp",t.crisp!==!1),y.attr("transform",t.transFn).attr("d",t.path).each(function(x){return T1.stroke(Ao.select(this),x.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(x){return Ki.dashStyle(x.minor?r.minor.griddash:r.griddash,x.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(x){return(x.minor?v:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&y.attr("d",t.path)}}qp(r,[m3,y3])}};xr.drawZeroLine=function(e,r,t){t=t||t;var n=r._id+"zl",a=xr.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+n).data(a?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(o,l){return fV(o.id,l.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(T1.stroke,r.zerolinecolor||T1.defaultLine).style("stroke-width",Ki.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),qp(r,[g3])};xr.drawLabels=function(e,r,t){t=t||{};var n=e._fullLayout,a=r._id,i=t.cls||a+"tick",o=t.vals.filter(function(K){return K.text}),l=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?o:[],Lp),v=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(K){var ee=Ao.select(this),fe=e._promises.length;ee.call(dc.positionText,l.xFn(K),l.yFn(K)).call(Ki.font,{family:K.font,size:K.fontSize,color:K.fontColor,weight:K.fontWeight,style:K.fontStyle,variant:K.fontVariant,textcase:K.fontTextcase,lineposition:K.fontLineposition,shadow:K.fontShadow}).text(K.text).call(dc.convertToTspans,e),e._promises[fe]?v.push(e._promises.pop().then(function(){h(ee,s)})):h(ee,s)}),qp(r,[WM]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(K){Ao.select(this).select("text").call(dc.positionText,l.xFn(K),l.yFn(K))});function h(K,ee){K.each(function(fe){var de=Ao.select(this),qe=de.select(".text-math-group"),Be=l.anchorFn(fe,ee),Ne=t.transFn.call(de.node(),fe)+(ea(ee)&&+ee!=0?" rotate("+ee+","+l.xFn(fe)+","+(l.yFn(fe)-fe.fontSize/2)+")":""),Ie=dc.lineCount(de),Se=S1*fe.fontSize,Xe=l.heightFn(fe,ea(ee)?+ee:0,(Ie-1)*Se);if(Xe&&(Ne+=Z0(0,Xe)),qe.empty()){var se=de.select("text");se.attr({transform:Ne,"text-anchor":Be}),se.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var be=Ki.bBox(qe.node()).width,Te=be*{end:-.5,start:.5}[Be];qe.attr("transform",Ne+Z0(Te,0))}})}r._adjustTickLabelsOverflow=function(){var K=r.ticklabeloverflow;if(!(!K||K==="allow")){var ee=K.indexOf("hide")!==-1,fe=r._id.charAt(0)==="x",de=0,qe=fe?e._fullLayout.width:e._fullLayout.height;if(K.indexOf("domain")!==-1){var Be=ut.simpleMap(r.range,r.r2l);de=r.l2p(Be[0])+r._offset,qe=r.l2p(Be[1])+r._offset}var Ne=Math.min(de,qe),Ie=Math.max(de,qe),Se=r.side,Xe=1/0,se=-1/0;f.each(function(W){var Q=Ao.select(this),$=Q.select(".text-math-group");if($.empty()){var Me=Ki.bBox(Q.node()),Fe=0;fe?(Me.right>Ie||Me.leftIe||Me.top+(r.tickangle?0:W.fontSize/4)r["_visibleLabelMin_"+Be._id]?W.style("display","none"):Ie.K==="tick"&&!Ne&&W.style("display",null)})})})})},h(f,u+1?u:s);function d(){return v.length&&Promise.all(v)}var m=null;function g(){if(h(f,s),o.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){m=r.autotickangles[0];var K=0,ee=[],fe,de=1;f.each(function(ir){K=Math.max(K,ir.fontSize);var rr=r.l2p(ir.x),Cr=_3(this),yr=Ki.bBox(Cr.node());de=Math.max(de,dc.lineCount(Cr)),ee.push({top:0,bottom:10,height:10,left:rr-yr.width/2,right:rr+yr.width/2+2,width:yr.width+2})});var qe=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,Be=o.length,Ne=Math.abs((o[Be-1].x-o[0].x)*r._m)/(Be-1),Ie=qe?Ne/2:Ne,Se=qe?r.ticklen:K*1.25*de,Xe=Math.sqrt(Math.pow(Ie,2)+Math.pow(Se,2)),se=Ie/Xe,be=r.autotickangles.map(function(ir){return ir*Math.PI/180}),Te=be.find(function(ir){return Math.abs(Math.cos(ir))<=se});Te===void 0&&(Te=be.reduce(function(ir,rr){return Math.abs(Math.cos(ir))V*X&&(O=X,D[k]=z[k]=G[k])}var re=Math.abs(O-F);re-_>0?(re-=_,_*=1+_/re):_=0,r._id.charAt(0)!=="y"&&(_=-_),D[S]=M.p2r(M.r2p(z[S])+A*_),M.autorange==="min"||M.autorange==="max reversed"?(D[0]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0):(M.autorange==="max"||M.autorange==="min reversed")&&(D[1]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[M._name+".range"]=D}var ne=ut.syncOrAsync(y);return ne&&ne.then&&e._promises.push(ne),ne};function RV(e,r,t){var n=r._id+"divider",a=t.vals,i=t.layer.selectAll("path."+n).data(a,Lp);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(T1.stroke,r.dividercolor).style("stroke-width",Ki.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}xr.getPxPosition=function(e,r){var t=e._fullLayout._size,n=r._id.charAt(0),a=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:n==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:n==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function rA(e){var r=e.title.font.size,t=(e.title.text.match(dc.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(gc+t*S1):t?r*(t+1)*S1:r}function zV(e,r){var t=e._fullLayout,n=r._id,a=n.charAt(0),i=r.title.font.size,o,l=(r.title.text.match(dc.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?o=r._depth+r.title.standoff+i*gc:(r.side==="top"||r.side==="left")&&(o=r._depth+r.title.standoff+i*(M1+l*S1));else{var s=L1(r);if(r.type==="multicategory")o=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),o=10+u+(r.linewidth?r.linewidth-1:0)}s||(a==="x"?o+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):o+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=xr.getPxPosition(e,r),v,h,d;a==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-o:f+o):(d=r._offset+r._length/2,h=r.side==="right"?f+o:f-o,v={rotate:"-90",offset:0});var m;if(r.type!=="multicategory"){var g=r._selections[r._id+"tick"];if(m={selection:g,side:r.side},g&&g.node()&&g.node().parentNode){var y=Ki.getTranslate(g.node().parentNode);m.offsetLeft=y.x,m.offsetTop=y.y}r.title.hasOwnProperty("standoff")&&(m.pad=0)}return r._titleStandoff=o,rV.draw(e,n+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[a],avoid:m,transform:v,attributes:{x:h,y:d,"text-anchor":"middle"}})}xr.shouldShowZeroLine=function(e,r,t){var n=ut.simpleMap(r.range,r.r2l);return n[0]*n[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===Sp)&&(uA(r,0)||!NV(e,r,t,n)||FV(e,r))};xr.clipEnds=function(e,r){return r.filter(function(t){return uA(e,t.x)})};function uA(e,r){var t=e.l2p(r);return t>1&&t1)for(a=1;a=a.min&&e=lV:/%L/.test(r)?e>=oV:/%[SX]/.test(r)?e>=Ap:/%M/.test(r)?e>=k1:/%[HI]/.test(r)?e>=is:/%p/.test(r)?e>=$u:/%[Aadejuwx]/.test(r)?e>=ei:/%[UVW]/.test(r)?e>=Qi:/%[Bbm]/.test(r)?e>=Mp:/%[q]/.test(r)?e>=wp:/%[Yy]/.test(r)?e>=xp:!0}});var dA=te((que,hA)=>{"use strict";hA.exports=function(r,t,n){var a,i;if(n){var o=t==="reversed"||t==="min reversed"||t==="max reversed";a=n[o?1:0],i=n[o?0:1]}var l=r("autorangeoptions.minallowed",i===null?a:void 0),s=r("autorangeoptions.maxallowed",a===null?i:void 0);l===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var k3=te((Due,pA)=>{"use strict";var YV=dA();pA.exports=function(r,t,n,a){var i=t._template||{},o=t.type||i.type||"-";n("minallowed"),n("maxallowed");var l=n("range");if(!l){var s;!a.noInsiderange&&o!=="log"&&(s=n("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(l=n("range",s)))}var u=t.getAutorangeDflt(l,a),f=n("autorange",u),v;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,v=!0),v||(u=t.getAutorangeDflt(l,a),f=n("autorange",u)),f&&(YV(n,f,l),(o==="linear"||o==="-")&&n("rangemode")),t.cleanRange()}});var mA=te((Eue,gA)=>{var GV={left:0,top:0};gA.exports=VV;function VV(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=WV(r);return t[0]=n-i.left,t[1]=a-i.top,t}function WV(e){return e===window||e===document||e===document.body?GV:e.getBoundingClientRect()}});var S3=te((Pue,yA)=>{"use strict";var ZV=n2();function XV(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}yA.exports=ZV&&XV()});var _A=te((Rue,bA)=>{"use strict";bA.exports=function(r,t,n,a,i){var o=(r-n)/(a-n),l=o+t/(a-n),s=(o+l)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?s:i==="right"||i==="top"?l:o<2/3-s?o:l>4/3-s?l:s}});var MA=te((zue,wA)=>{"use strict";var xA=pr(),jV=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];wA.exports=function(r,t,n,a){return n==="left"?r=0:n==="center"?r=1:n==="right"?r=2:r=xA.constrain(Math.floor(r*3),0,2),a==="bottom"?t=0:a==="middle"?t=1:a==="top"?t=2:t=xA.constrain(Math.floor(t*3),0,2),jV[t][r]}});var TA=te((Nue,AA)=>{"use strict";var JV=v1(),$V=qd(),KV=a1().getGraphDiv,QV=t1(),C3=AA.exports={};C3.wrapped=function(e,r,t){e=KV(e),e._fullLayout&&$V.clear(e._fullLayout._uid+QV.HOVERID),C3.raw(e,r,t)};C3.raw=function(r,t){var n=r._fullLayout,a=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&JV.triggerHandler(r,"plotly_beforehover",t)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&a&&r.emit("plotly_unhover",{event:t,points:a}))}});var To=te((Fue,CA)=>{"use strict";var eW=mA(),L3=i2(),rW=S3(),tW=pr().removeElement,nW=Pa(),mc=CA.exports={};mc.align=_A();mc.getCursor=MA();var kA=TA();mc.unhover=kA.wrapped;mc.unhoverRaw=kA.raw;mc.init=function(r){var t=r.gd,n=1,a=t._context.doubleClickDelay,i=r.element,o,l,s,u,f,v,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=y,rW?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=y,i.addEventListener("touchstart",y,{passive:!1})):i.ontouchstart=y;function m(b,_,A){return Math.abs(b)a&&(n=Math.max(n-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(n,v),!d){var _;try{_=new MouseEvent("click",b)}catch(S){var A=q3(b);_=document.createEvent("MouseEvents"),_.initMouseEvent("click",b.bubbles,b.cancelable,b.view,b.detail,b.screenX,b.screenY,A[0],A[1],b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget)}h.dispatchEvent(_)}t._dragging=!1,t._dragged=!1}};function SA(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}mc.coverSlip=SA;function q3(e){return eW(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Ku=te((Iue,LA)=>{"use strict";LA.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&r.classed(n,!1)}),t&&r.classed("cursor-"+t,!0)}});var EA=te((Hue,DA)=>{"use strict";var D3=Ku(),q1="data-savedcursor",qA="!!";DA.exports=function(r,t){var n=r.attr(q1);if(t){if(!n){for(var a=(r.attr("class")||"").split(" "),i=0;i{"use strict";var E3=$a(),aW=cl();PA.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:aW.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:E3({editType:"legend"}),grouptitlefont:E3({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:E3({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Ep=te(Dp=>{"use strict";Dp.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};Dp.isVertical=function(r){return r.orientation!=="h"};Dp.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var N3=te((Uue,RA)=>{"use strict";var R3=dt(),eo=pr(),iW=_n(),oW=bo(),lW=P3(),sW=A0(),z3=Ep();function uW(e,r,t,n){var a=r[e]||{},i=iW.newContainer(t,e);function o(ne,K){return eo.coerce(a,i,lW,ne,K)}var l=eo.coerceFont(o,"font",t.font);o("bgcolor",t.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var u,f=function(ne,K){var ee=u._input,fe=u;return eo.coerce(ee,fe,oW,ne,K)},v=t.font||{},h=eo.coerceFont(o,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),d=0,m=!1,g="normal",y=(t.shapes||[]).filter(function(ne){return ne.showlegend}),x=n.concat(y).filter(function(ne){return e===(ne.legend||"legend")}),M=0;M(e==="legend"?1:0));if(_===!1&&(t[e]=void 0),!(_===!1&&!a.uirevision)&&(o("uirevision",t.uirevision),_!==!1)){o("borderwidth");var A=o("orientation"),S=o("yref"),k=o("xref"),D=A==="h",z=S==="paper",F=k==="paper",O,G,B,X="left";D?(O=0,R3.getComponentMethod("rangeslider","isVisible")(r.xaxis)?z?(G=1.1,B="bottom"):(G=1,B="top"):z?(G=-.1,B="top"):(G=0,B="bottom")):(G=1,B="auto",F?O=1.02:(O=1,X="right")),eo.coerce(a,i,{x:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:O}},"x"),eo.coerce(a,i,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:G}},"y"),o("traceorder",g),z3.isGrouped(t[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",X),o("yanchor",B),o("valign"),eo.noneOrAll(a,i,["x","y"]);var V=o("title.text");if(V){o("title.side",D?"left":"top");var re=eo.extendFlat({},l,{size:eo.bigFont(l.size)});eo.coerceFont(o,"title.font",re)}}}}RA.exports=function(r,t,n){var a,i=n.slice(),o=t.shapes;if(o)for(a=0;a{"use strict";var j0=dt(),I3=pr(),fW=I3.pushUnique,F3=!0;zA.exports=function(r,t,n){var a=t._fullLayout;if(t._dragged||t._editing)return;var i=a.legend.itemclick,o=a.legend.itemdoubleclick,l=a.legend.groupclick;n===1&&i==="toggle"&&o==="toggleothers"&&F3&&t.data&&t._context.showTips&&I3.notifier(I3._(t,"Double-click on legend to isolate one trace"),"long"),F3=!1;var s;if(n===1?s=i:n===2&&(s=o),!s)return;var u=l==="togglegroup",f=a.hiddenlabels?a.hiddenlabels.slice():[],v=r.data()[0][0];if(v.groupTitle&&v.noClick)return;var h=t._fullData,d=(a.shapes||[]).filter(function(ar){return ar.showlegend}),m=h.concat(d),g=v.trace;g._isShape&&(g=g._fullInput);var y=g.legendgroup,x,M,b,_,A,S,k={},D=[],z=[],F=[];function O(ar,lr){var ir=D.indexOf(ar),rr=k.visible;return rr||(rr=k.visible=[]),D.indexOf(ar)===-1&&(D.push(ar),ir=D.length-1),rr[ir]=lr,ir}var G=(a.shapes||[]).map(function(ar){return ar._input}),B=!1;function X(ar,lr){G[ar].visible=lr,B=!0}function V(ar,lr){if(!(v.groupTitle&&!u)){var ir=ar._fullInput||ar,rr=ir._isShape,Cr=ir.index;Cr===void 0&&(Cr=ir._index);var yr=ir.visible===!1?!1:lr;rr?X(Cr,yr):O(Cr,yr)}}var re=g.legend,ne=g._fullInput,K=ne&&ne._isShape;if(!K&&j0.traceIs(g,"pie-like")){var ee=v.label,fe=f.indexOf(ee);if(s==="toggle")fe===-1?f.push(ee):f.splice(fe,1);else if(s==="toggleothers"){var de=fe!==-1,qe=[];for(x=0;x{"use strict";FA.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var BA=te((Vue,HA)=>{"use strict";var IA=dt(),B3=Ep();HA.exports=function(r,t,n){var a=t._inHover,i=B3.isGrouped(t),o=B3.isReversed(t),l={},s=[],u=!1,f={},v=0,h=0,d,m;function g(ne,K,ee){if(t.visible!==!1&&!(n&&ne!==t._id))if(K===""||!B3.isGrouped(t)){var fe="~~i"+v;s.push(fe),l[fe]=[ee],v++}else s.indexOf(K)===-1?(s.push(K),u=!0,l[K]=[ee]):l[K].push(ee)}for(d=0;dF&&(z=F)}k[d][0]._groupMinRank=z,k[d][0]._preGroupSort=d}var O=function(ne,K){return ne[0]._groupMinRank-K[0]._groupMinRank||ne[0]._preGroupSort-K[0]._preGroupSort},G=function(ne,K){return ne.trace.legendrank-K.trace.legendrank||ne._preSort-K._preSort};for(k.forEach(function(ne,K){ne[0]._preGroupSort=K}),k.sort(O),d=0;d{"use strict";var Pp=pr();function OA(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}yc.formatPiePercent=function(r,t){var n=OA((r*100).toPrecision(3));return Pp.numSeparate(n,t)+"%"};yc.formatPieValue=function(r,t){var n=OA(r.toPrecision(10));return Pp.numSeparate(n,t)};yc.getFirstFilled=function(r,t){if(Pp.isArrayOrTypedArray(r))for(var n=0;n{"use strict";var cW=ln(),vW=zt();UA.exports=function(r,t,n,a){var i=n.marker.pattern;i&&i.shape?cW.pointStyle(r,n,a,t):vW.fill(r,t.color)}});var ZA=te((Xue,WA)=>{"use strict";var GA=zt(),VA=O3().castOption,hW=YA();WA.exports=function(r,t,n,a){var i=n.marker.line,o=VA(i.color,t.pts)||GA.defaultLine,l=VA(i.width,t.pts)||0;r.call(hW,t,n,a).style("stroke-width",l).call(GA.stroke,o)}});var V3=te((jue,QA)=>{"use strict";var ri=kt(),U3=dt(),Oa=pr(),XA=Oa.strTranslate,vi=ln(),ko=zt(),Y3=es().extractOpts,Rp=Qa(),dW=ZA(),pW=O3().castOption,gW=H3(),jA=12,JA=5,bc=2,mW=10,J0=5;QA.exports=function(r,t,n){var a=t._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,l=(o+gW.itemGap*2)/2,s=XA(l,0),u=function(k,D,z,F){var O;if(k+1)O=k;else if(D&&D.width>0)O=D.width;else return 0;return i?F:Math.min(O,z)};r.each(function(k){var D=ri.select(this),z=Oa.ensureSingle(D,"g","layers");z.style("opacity",k[0].trace.opacity);var F=n.indentation,O=n.valign,G=k[0].lineHeight,B=k[0].height;if(O==="middle"&&F===0||!G||!B)z.attr("transform",null);else{var X={top:1,bottom:-1}[O],V=X*(.5*(G-B+3))||0,re=n.indentation;z.attr("transform",XA(re,V))}var ne=z.selectAll("g.legendfill").data([k]);ne.enter().append("g").classed("legendfill",!0);var K=z.selectAll("g.legendlines").data([k]);K.enter().append("g").classed("legendlines",!0);var ee=z.selectAll("g.legendsymbols").data([k]);ee.enter().append("g").classed("legendsymbols",!0),ee.selectAll("g.legendpoints").data([k]).enter().append("g").classed("legendpoints",!0)}).each(S).each(h).each(m).each(d).each(y).each(_).each(b).each(f).each(v).each(x).each(M);function f(k){var D=$A(k),z=D.showFill,F=D.showLine,O=D.showGradientLine,G=D.showGradientFill,B=D.anyFill,X=D.anyLine,V=k[0],re=V.trace,ne,K,ee=Y3(re),fe=ee.colorscale,de=ee.reversescale,qe=function(be){if(be.size())if(z)vi.fillGroupStyle(be,t,!0);else{var Te="legendfill-"+re.uid;vi.gradient(be,t,Te,G3(de),fe,"fill")}},Be=function(be){if(be.size()){var Te="legendline-"+re.uid;vi.lineGroupStyle(be),vi.gradient(be,t,Te,G3(de),fe,"stroke")}},Ne=Rp.hasMarkers(re)||!B?"M5,0":X?"M5,-2":"M5,-3",Ie=ri.select(this),Se=Ie.select(".legendfill").selectAll("path").data(z||G?[k]:[]);if(Se.enter().append("path").classed("js-fill",!0),Se.exit().remove(),Se.attr("d",Ne+"h"+o+"v6h-"+o+"z").call(qe),F||O){var Xe=u(void 0,re.line,mW,JA);K=Oa.minExtend(re,{line:{width:Xe}}),ne=[Oa.minExtend(V,{trace:K})]}var se=Ie.select(".legendlines").selectAll("path").data(F||O?[ne]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",Ne+(O?"l"+o+",0.0001":"h"+o)).call(F?vi.lineGroupStyle:Be)}function v(k){var D=$A(k),z=D.anyFill,F=D.anyLine,O=D.showLine,G=D.showMarker,B=k[0],X=B.trace,V=!G&&!F&&!z&&Rp.hasText(X),re,ne;function K(Se,Xe,se,be){var Te=Oa.nestedProperty(X,Se).get(),pe=Oa.isArrayOrTypedArray(Te)&&Xe?Xe(Te):Te;if(i&&pe&&be!==void 0&&(pe=be),se){if(pese[1])return se[1]}return pe}function ee(Se){return B._distinct&&B.index&&Se[B.index]?Se[B.index]:Se[0]}if(G||V||O){var fe={},de={};if(G){fe.mc=K("marker.color",ee),fe.mx=K("marker.symbol",ee),fe.mo=K("marker.opacity",Oa.mean,[.2,1]),fe.mlc=K("marker.line.color",ee),fe.mlw=K("marker.line.width",Oa.mean,[0,5],bc),de.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var qe=K("marker.size",Oa.mean,[2,16],jA);fe.ms=qe,de.marker.size=qe}O&&(de.line={width:K("line.width",ee,[0,10],JA)}),V&&(fe.tx="Aa",fe.tp=K("textposition",ee),fe.ts=10,fe.tc=K("textfont.color",ee),fe.tf=K("textfont.family",ee),fe.tw=K("textfont.weight",ee),fe.ty=K("textfont.style",ee),fe.tv=K("textfont.variant",ee),fe.tC=K("textfont.textcase",ee),fe.tE=K("textfont.lineposition",ee),fe.tS=K("textfont.shadow",ee)),re=[Oa.minExtend(B,fe)],ne=Oa.minExtend(X,de),ne.selectedpoints=null,ne.texttemplate=null}var Be=ri.select(this).select("g.legendpoints"),Ne=Be.selectAll("path.scatterpts").data(G?re:[]);Ne.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),Ne.exit().remove(),Ne.call(vi.pointStyle,ne,t),G&&(re[0].mrc=3);var Ie=Be.selectAll("g.pointtext").data(V?re:[]);Ie.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),Ie.exit().remove(),Ie.selectAll("text").call(vi.textPointStyle,ne,t)}function h(k){var D=k[0].trace,z=D.type==="waterfall";if(k[0]._distinct&&z){var F=k[0].trace[k[0].dir].marker;return k[0].mc=F.color,k[0].mlw=F.line.width,k[0].mlc=F.line.color,g(k,this,"waterfall")}var O=[];D.visible&&z&&(O=k[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 G=ri.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(O);G.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),G.exit().remove(),G.each(function(B){var X=ri.select(this),V=D[B[0]].marker,re=u(void 0,V.line,J0,bc);X.attr("d",B[1]).style("stroke-width",re+"px").call(ko.fill,V.color),re&&X.call(ko.stroke,V.line.color)})}function d(k){g(k,this)}function m(k){g(k,this,"funnel")}function g(k,D,z){var F=k[0].trace,O=F.marker||{},G=O.line||{},B=O.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",X=z?F.visible&&F.type===z:U3.traceIs(F,"bar"),V=ri.select(D).select("g.legendpoints").selectAll("path.legend"+z).data(X?[k]:[]);V.enter().append("path").classed("legend"+z,!0).attr("d",B).attr("transform",s),V.exit().remove(),V.each(function(re){var ne=ri.select(this),K=re[0],ee=u(K.mlw,O.line,J0,bc);ne.style("stroke-width",ee+"px");var fe=K.mcc;if(!n._inHover&&"mc"in K){var de=Y3(O),qe=de.mid;qe===void 0&&(qe=(de.max+de.min)/2),fe=vi.tryColorscale(O,"")(qe)}var Be=fe||K.mc||O.color,Ne=O.pattern,Ie=Ne&&vi.getPatternAttr(Ne.shape,0,"");if(Ie){var Se=vi.getPatternAttr(Ne.bgcolor,0,null),Xe=vi.getPatternAttr(Ne.fgcolor,0,null),se=Ne.fgopacity,be=KA(Ne.size,8,10),Te=KA(Ne.solidity,.5,1),pe="legend-"+F.uid;ne.call(vi.pattern,"legend",t,pe,Ie,be,Te,fe,Ne.fillmode,Se,Xe,se)}else ne.call(ko.fill,Be);ee&&ko.stroke(ne,K.mlc||G.color)})}function y(k){var D=k[0].trace,z=ri.select(this).select("g.legendpoints").selectAll("path.legendbox").data(D.visible&&U3.traceIs(D,"box-violin")?[k]:[]);z.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),z.exit().remove(),z.each(function(){var F=ri.select(this);if((D.boxpoints==="all"||D.points==="all")&&ko.opacity(D.fillcolor)===0&&ko.opacity((D.line||{}).color)===0){var O=Oa.minExtend(D,{marker:{size:i?jA:Oa.constrain(D.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});z.call(vi.pointStyle,O,t)}else{var G=u(void 0,D.line,J0,bc);F.style("stroke-width",G+"px").call(ko.fill,D.fillcolor),G&&ko.stroke(F,D.line.color)}})}function x(k){var D=k[0].trace,z=ri.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(D.visible&&D.type==="candlestick"?[k,k]:[]);z.enter().append("path").classed("legendcandle",!0).attr("d",function(F,O){return O?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(F,O){var G=ri.select(this),B=D[O?"increasing":"decreasing"],X=u(void 0,B.line,J0,bc);G.style("stroke-width",X+"px").call(ko.fill,B.fillcolor),X&&ko.stroke(G,B.line.color)})}function M(k){var D=k[0].trace,z=ri.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(D.visible&&D.type==="ohlc"?[k,k]:[]);z.enter().append("path").classed("legendohlc",!0).attr("d",function(F,O){return O?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(F,O){var G=ri.select(this),B=D[O?"increasing":"decreasing"],X=u(void 0,B.line,J0,bc);G.style("fill","none").call(vi.dashLine,B.line.dash,X),X&&ko.stroke(G,B.line.color)})}function b(k){A(k,this,"pie")}function _(k){A(k,this,"funnelarea")}function A(k,D,z){var F=k[0],O=F.trace,G=z?O.visible&&O.type===z:U3.traceIs(O,z),B=ri.select(D).select("g.legendpoints").selectAll("path.legend"+z).data(G?[k]:[]);if(B.enter().append("path").classed("legend"+z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),B.exit().remove(),B.size()){var X=O.marker||{},V=u(pW(X.line.width,F.pts),X.line,J0,bc),re="pieLike",ne=Oa.minExtend(O,{marker:{line:{width:V}}},re),K=Oa.minExtend(F,{trace:ne},re);dW(B,K,ne,t)}}function S(k){var D=k[0].trace,z,F=[];if(D.visible)switch(D.type){case"histogram2d":case"heatmap":F=[["M-15,-2V4H15V-2Z"]],z=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":F=[["M-6,-6V6H6V-6Z"]],z=!0;break;case"densitymapbox":case"densitymap":F=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],z="radial";break;case"cone":F=[["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"]],z=!1;break;case"streamtube":F=[["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"]],z=!1;break;case"surface":F=[["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"]],z=!0;break;case"mesh3d":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!1;break;case"volume":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!0;break;case"isosurface":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],z=!1;break}var O=ri.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(F);O.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),O.exit().remove(),O.each(function(G,B){var X=ri.select(this),V=Y3(D),re=V.colorscale,ne=V.reversescale,K=function(qe){if(qe.size()){var Be="legendfill-"+D.uid;vi.gradient(qe,t,Be,G3(ne,z==="radial"),re,"fill")}},ee;if(re){if(!z){var de=re.length;ee=B===0?re[ne?de-1:0][1]:B===1?re[ne?0:de-1][1]:re[Math.floor((de-1)/2)][1]}}else{var fe=D.vertexcolor||D.facecolor||D.color;ee=Oa.isArrayOrTypedArray(fe)?fe[B]||fe[0]:fe}X.attr("d",G[0]),ee?X.call(ko.fill,ee):X.call(K)})}};function G3(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function $A(e){var r=e[0].trace,t=r.contours,n=Rp.hasLines(r),a=Rp.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",o=!1,l=!1;if(t){var s=t.coloring;s==="lines"?o=!0:n=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:n||o,anyFill:i||l}}function KA(e,r,t){return e&&Oa.isArrayOrTypedArray(e)?r:e>t?t:e}});var j3=te((Jue,uT)=>{"use strict";var Ri=kt(),ra=pr(),Z3=ua(),Q0=dt(),eT=v1(),W3=To(),ta=ln(),Np=zt(),_c=ci(),rT=NA(),fa=H3(),X3=Ka(),lT=X3.LINE_SPACING,K0=X3.FROM_TL,tT=X3.FROM_BR,nT=BA(),yW=V3(),aT=Ep(),$0=1,bW=/^legend[0-9]*$/;uT.exports=function(r,t){if(t)iT(r,t);else{var n=r._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Ri.select(this),f=u.attr("class"),v=f.split(" ")[0];v.match(bW)&&a.indexOf(v)===-1&&u.remove()});for(var o=0;o1)}var m=n.hiddenlabels||[];if(!l&&(!n.showlegend||!s.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),Z3.autoMargin(e,a);var g=ra.ensureSingle(o,"g",a,function(D){l||D.attr("pointer-events","all")}),y=ra.ensureSingleById(n._topdefs,"clipPath",i,function(D){D.append("rect")}),x=ra.ensureSingle(g,"rect","bg",function(D){D.attr("shape-rendering","crispEdges")});x.call(Np.stroke,t.bordercolor).call(Np.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var M=ra.ensureSingle(g,"g","scrollbox"),b=t.title;t._titleWidth=0,t._titleHeight=0;var _;b.text?(_=ra.ensureSingle(M,"text",a+"titletext"),_.attr("text-anchor","start").call(ta.font,b.font).text(b.text),Fp(_,M,e,t,$0)):M.selectAll("."+a+"titletext").remove();var A=ra.ensureSingle(g,"rect","scrollbar",function(D){D.attr(fa.scrollBarEnterAttrs).call(Np.fill,fa.scrollBarColor)}),S=M.selectAll("g.groups").data(s);S.enter().append("g").attr("class","groups"),S.exit().remove();var k=S.selectAll("g.traces").data(ra.identity);k.enter().append("g").attr("class","traces"),k.exit().remove(),k.style("opacity",function(D){var z=D[0].trace;return Q0.traceIs(z,"pie-like")?m.indexOf(D[0].label)!==-1?.5:1:z.visible==="legendonly"?.5:1}).each(function(){Ri.select(this).call(xW,e,t)}).call(yW,e,t).each(function(){l||Ri.select(this).call(wW,e,a)}),ra.syncOrAsync([Z3.previousPromises,function(){return TW(e,S,k,t)},function(){var D=n._size,z=t.borderwidth,F=t.xref==="paper",O=t.yref==="paper";if(b.text&&_W(_,t,z),!l){var G,B;F?G=D.l+D.w*t.x-K0[Ip(t)]*t._width:G=n.width*t.x-K0[Ip(t)]*t._width,O?B=D.t+D.h*(1-t.y)-K0[Hp(t)]*t._effHeight:B=n.height*(1-t.y)-K0[Hp(t)]*t._effHeight;var X=kW(e,a,G,B);if(X)return;if(n.margin.autoexpand){var V=G,re=B;G=F?ra.constrain(G,0,n.width-t._width):V,B=O?ra.constrain(B,0,n.height-t._effHeight):re,G!==V&&ra.log("Constrain "+a+".x to make legend fit inside graph"),B!==re&&ra.log("Constrain "+a+".y to make legend fit inside graph")}ta.setTranslate(g,G,B)}if(A.on(".drag",null),g.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var ne=t._effHeight;l&&(ne=t._height),x.attr({width:t._width-z,height:ne-z,x:z/2,y:z/2}),ta.setTranslate(M,0,0),y.select("rect").attr({width:t._width-2*z,height:ne-2*z,x:z,y:z}),ta.setClipUrl(M,i,e),ta.setRect(A,0,0,0,0),delete t._scrollY}else{var K=Math.max(fa.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),ee=t._effHeight-K-2*fa.scrollBarMargin,fe=t._height-t._effHeight,de=ee/fe,qe=Math.min(t._scrollY||0,fe);x.attr({width:t._width-2*z+fa.scrollBarWidth+fa.scrollBarMargin,height:t._effHeight-z,x:z/2,y:z/2}),y.select("rect").attr({width:t._width-2*z+fa.scrollBarWidth+fa.scrollBarMargin,height:t._effHeight-2*z,x:z,y:z+qe}),ta.setClipUrl(M,i,e),Te(qe,K,de),g.on("wheel",function(){qe=ra.constrain(t._scrollY+Ri.event.deltaY/ee*fe,0,fe),Te(qe,K,de),qe!==0&&qe!==fe&&Ri.event.preventDefault()});var Be,Ne,Ie,Se=function(Me,Fe,Oe){var fr=(Oe-Fe)/de+Me;return ra.constrain(fr,0,fe)},Xe=function(Me,Fe,Oe){var fr=(Fe-Oe)/de+Me;return ra.constrain(fr,0,fe)},se=Ri.behavior.drag().on("dragstart",function(){var Me=Ri.event.sourceEvent;Me.type==="touchstart"?Be=Me.changedTouches[0].clientY:Be=Me.clientY,Ie=qe}).on("drag",function(){var Me=Ri.event.sourceEvent;Me.buttons===2||Me.ctrlKey||(Me.type==="touchmove"?Ne=Me.changedTouches[0].clientY:Ne=Me.clientY,qe=Se(Ie,Be,Ne),Te(qe,K,de))});A.call(se);var be=Ri.behavior.drag().on("dragstart",function(){var Me=Ri.event.sourceEvent;Me.type==="touchstart"&&(Be=Me.changedTouches[0].clientY,Ie=qe)}).on("drag",function(){var Me=Ri.event.sourceEvent;Me.type==="touchmove"&&(Ne=Me.changedTouches[0].clientY,qe=Xe(Ie,Be,Ne),Te(qe,K,de))});M.call(be)}function Te(Me,Fe,Oe){t._scrollY=e._fullLayout[a]._scrollY=Me,ta.setTranslate(M,0,-Me),ta.setRect(A,t._width,fa.scrollBarMargin+Me*Oe,fa.scrollBarWidth,Fe),y.select("rect").attr("y",z+Me)}if(e._context.edits.legendPosition){var pe,W,Q,$;g.classed("cursor-move",!0),W3.init({element:g.node(),gd:e,prepFn:function(Me){if(Me.target!==A.node()){var Fe=ta.getTranslate(g);Q=Fe.x,$=Fe.y}},moveFn:function(Me,Fe){if(Q!==void 0&&$!==void 0){var Oe=Q+Me,fr=$+Fe;ta.setTranslate(g,Oe,fr),pe=W3.align(Oe,t._width,D.l,D.l+D.w,t.xanchor),W=W3.align(fr+t._height,-t._height,D.t+D.h,D.t,t.yanchor)}},doneFn:function(){if(pe!==void 0&&W!==void 0){var Me={};Me[a+".x"]=pe,Me[a+".y"]=W,Q0.call("_guiRelayout",e,Me)}},clickFn:function(Me,Fe){var Oe=o.selectAll("g.traces").filter(function(){var fr=this.getBoundingClientRect();return Fe.clientX>=fr.left&&Fe.clientX<=fr.right&&Fe.clientY>=fr.top&&Fe.clientY<=fr.bottom});Oe.size()>0&&sT(e,g,Oe,Me,Fe)}})}}],e)}}function zp(e,r,t){var n=e[0],a=n.width,i=r.entrywidthmode,o=n.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*o:t+(o||a)}function sT(e,r,t,n,a){var i=t.data()[0][0].trace,o={event:a,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(o.group=i._group),Q0.traceIs(i,"pie-like")&&(o.label=t.datum()[0].label);var l=eT.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&rT(t,e,n)},e._context.doubleClickDelay)}else if(n===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=eT.triggerHandler(e,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&rT(t,e,n)}}function xW(e,r,t){var n=Bp(t),a=e.data()[0][0],i=a.trace,o=Q0.traceIs(i,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!o,s=t._maxNameLength,u,f;a.groupTitle?(u=a.groupTitle.text,f=a.groupTitle.font):(f=t.font,t.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=ra.templateString(u,i._meta))));var v=ra.ensureSingle(e,"text",n+"text");v.attr("text-anchor","start").call(ta.font,f).text(l?oT(u,s):u);var h=t.indentation+t.itemwidth+fa.itemGap*2;_c.positionText(v,h,0),l?v.call(_c.makeEditable,{gd:r,text:u}).call(Fp,e,r,t).on("edit",function(d){this.text(oT(d,s)).call(Fp,e,r,t);var m=a.trace._fullInput||{},g={};return g.name=d,m._isShape?Q0.call("_guiRelayout",r,"shapes["+i.index+"].name",g.name):Q0.call("_guiRestyle",r,g,i.index)}):Fp(v,e,r,t)}function oT(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var n=t-e.length;n>0;n--)e+=" ";return e}function wW(e,r,t){var n=r._context.doubleClickDelay,a,i=1,o=ra.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(Np.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-r._legendMouseDownTimen&&(i=Math.max(i-1,1)),sT(r,l,e,i,Ri.event)}}))}function Fp(e,r,t,n,a){n._inHover&&e.attr("data-notex",!0),_c.convertToTspans(e,t,function(){MW(r,t,n,a)})}function MW(e,r,t,n){var a=e.data()[0][0];if(!t._inHover&&a&&!a.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),o=i.node(),l=Bp(t);t||(t=r._fullLayout[l]);var s=t.borderwidth,u;n===$0?u=t.title.font:a.groupTitle?u=a.groupTitle.font:u=t.font;var f=u.size*lT,v,h;if(o){var d=ta.bBox(o);v=d.height,h=d.width,n===$0?ta.setTranslate(i,s,s+v*.75):ta.setTranslate(i,0,v*.25)}else{var m="."+l+(n===$0?"title":"")+"text",g=e.select(m),y=_c.lineCount(g),x=g.node();if(v=f*y,h=x?ta.bBox(x).width:0,n===$0)t.title.side==="left"&&(h+=fa.itemGap*2),_c.positionText(g,s+fa.titlePad,s+f);else{var M=fa.itemGap*2+t.indentation+t.itemwidth;a.groupTitle&&(M=fa.itemGap,h-=t.indentation+t.itemwidth),_c.positionText(g,M,-f*((y-1)/2-.3))}}n===$0?(t._titleWidth=h,t._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=h)}function AW(e){var r=0,t=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(r=e._titleWidth),n.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function TW(e,r,t,n){var a=e._fullLayout,i=Bp(n);n||(n=a[i]);var o=a._size,l=aT.isVertical(n),s=aT.isGrouped(n),u=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,h=fa.itemGap,d=n.indentation+n.itemwidth+h*2,m=2*(f+h),g=Hp(n),y=n.y<0||n.y===0&&g==="top",x=n.y>1||n.y===1&&g==="bottom",M=n.tracegroupgap,b={};n._maxHeight=Math.max(y||x?a.height/2:o.h,30);var _=0;n._width=0,n._height=0;var A=AW(n);if(l)t.each(function(Ie){var Se=Ie[0].height;ta.setTranslate(this,f+A[0],f+A[1]+n._height+Se/2+h),n._height+=Se,n._width=Math.max(n._width,Ie[0].width)}),_=d+n._width,n._width+=h+d+v,n._height+=m,s&&(r.each(function(Ie,Se){ta.setTranslate(this,0,Se*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var S=Ip(n),k=n.x<0||n.x===0&&S==="right",D=n.x>1||n.x===1&&S==="left",z=x||y,F=a.width/2;n._maxWidth=Math.max(k?z&&S==="left"?o.l+o.w:F:D?z&&S==="right"?o.r+o.w:F:o.w,2*d);var O=0,G=0;t.each(function(Ie){var Se=zp(Ie,n,d);O=Math.max(O,Se),G+=Se}),_=null;var B=0;if(s){var X=0,V=0,re=0;r.each(function(){var Ie=0,Se=0;Ri.select(this).selectAll("g.traces").each(function(se){var be=zp(se,n,d),Te=se[0].height;ta.setTranslate(this,A[0],A[1]+f+h+Te/2+Se),Se+=Te,Ie=Math.max(Ie,be),b[se[0].trace.legendgroup]=Ie});var Xe=Ie+h;V>0&&Xe+f+V>n._maxWidth?(B=Math.max(B,V),V=0,re+=X+M,X=Se):X=Math.max(X,Se),ta.setTranslate(this,V,re),V+=Xe}),n._width=Math.max(B,V)+f,n._height=re+X+m}else{var ne=t.size(),K=G+v+(ne-1)*h=n._maxWidth&&(B=Math.max(B,qe),fe=0,de+=ee,n._height+=ee,ee=0),ta.setTranslate(this,A[0]+f+fe,A[1]+f+de+Se/2+h),qe=fe+Xe+h,fe+=se,ee=Math.max(ee,Se)}),K?(n._width=fe+v,n._height=ee+m):(n._width=Math.max(B,qe)+v,n._height+=ee+m)}}n._width=Math.ceil(Math.max(n._width+A[0],n._titleWidth+2*(f+fa.titlePad))),n._height=Math.ceil(Math.max(n._height+A[1],n._titleHeight+2*(f+fa.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Be=e._context.edits,Ne=Be.legendText||Be.legendPosition;t.each(function(Ie){var Se=Ri.select(this).select("."+i+"toggle"),Xe=Ie[0].height,se=Ie[0].trace.legendgroup,be=zp(Ie,n,d);s&&se!==""&&(be=b[se]);var Te=Ne?d:_||be;!l&&!u&&(Te+=h/2),ta.setRect(Se,0,-Xe/2,Te,Xe)})}function kW(e,r,t,n){var a=e._fullLayout,i=a[r],o=Ip(i),l=Hp(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",v=i.x<.5?"l":"r",h={r:a.width-t,l:t+i._width,b:a.height-n,t:n+i._effHeight};if(s&&u)return Z3.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*K0[o],r:i._width*tT[o],b:i._effHeight*tT[l],t:i._effHeight*K0[l]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][v]=h[v]:e._fullLayout._reservedMargin[r][f]=h[f]}function Ip(e){return ra.isRightAnchor(e)?"right":ra.isCenterAnchor(e)?"center":"left"}function Hp(e){return ra.isBottomAnchor(e)?"bottom":ra.isMiddleAnchor(e)?"middle":"top"}function Bp(e){return e._id||"legend"}});var Q3=te(K3=>{"use strict";var xc=kt(),Qs=Bt(),fT=Jl(),On=pr(),SW=On.pushUnique,J3=On.strTranslate,CW=On.strRotate,LW=v1(),So=ci(),qW=EA(),os=ln(),_a=zt(),Op=To(),ls=Cn(),DW=Pa().zindexSeparator,rv=dt(),yl=Vu(),wc=t1(),EW=N3(),PW=j3(),yT=wc.YANGLE,$3=Math.PI*yT/180,RW=1/Math.sin($3),zW=Math.cos($3),NW=Math.sin($3),Ln=wc.HOVERARROWSIZE,Nt=wc.HOVERTEXTPAD,cT={box:!0,ohlc:!0,violin:!0,candlestick:!0},FW={scatter:!0,scattergl:!0,splom:!0};function vT(e,r){return e.distance-r.distance}K3.hover=function(r,t,n,a){r=On.getGraphDiv(r);var i=t.target;On.throttle(r._fullLayout._uid+wc.HOVERID,wc.HOVERMINTIME,function(){IW(r,t,n,a,i)})};K3.loneHover=function(r,t){var n=!0;Array.isArray(r)||(n=!1,r=[r]);var a=t.gd,i=MT(a),o=AT(a),l=r.map(function(y){var x=y._x0||y.x0||y.x||0,M=y._x1||y.x1||y.x||0,b=y._y0||y.y0||y.y||0,_=y._y1||y.y1||y.y||0,A=y.eventData;if(A){var S=Math.min(x,M),k=Math.max(x,M),D=Math.min(b,_),z=Math.max(b,_),F=y.trace;if(rv.traceIs(F,"gl3d")){var O=a._fullLayout[F.scene]._scene.container,G=O.offsetLeft,B=O.offsetTop;S+=G,k+=G,D+=B,z+=B}A.bbox={x0:S+o,x1:k+o,y0:D+i,y1:z+i},t.inOut_bbox&&t.inOut_bbox.push(A.bbox)}else A=!1;return{color:y.color||_a.defaultLine,x0:y.x0||y.x||0,x1:y.x1||y.x||0,y0:y.y0||y.y||0,y1:y.y1||y.y||0,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:y.text,name:y.name,idealAlign:y.idealAlign,borderColor:y.borderColor,fontFamily:y.fontFamily,fontSize:y.fontSize,fontColor:y.fontColor,fontWeight:y.fontWeight,fontStyle:y.fontStyle,fontVariant:y.fontVariant,nameLength:y.nameLength,textAlign:y.textAlign,trace:y.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:y.hovertemplate||!1,hovertemplateLabels:y.hovertemplateLabels||!1,eventData:A}}),s=!1,u=_T(l,{gd:a,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||_a.background,container:xc.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,v=5,h=0,d=0;f.sort(function(y,x){return y.y0-x.y0}).each(function(y,x){var M=y.y0-y.by/2;M-vk[0]._length||$<0||$>D[0]._length)return Op.unhoverRaw(e,r)}if(r.pointerX=Q+k[0]._offset,r.pointerY=$+D[0]._offset,"xval"in r?re=yl.flat(i,r.xval):re=yl.p2c(k,Q),"yval"in r?ne=yl.flat(i,r.yval):ne=yl.p2c(D,$),!Qs(re[0])||!Qs(ne[0]))return On.warn("Fx.hover failed",r,e),Op.unhoverRaw(e,r)}var Oe=1/0;function fr(rt,Qt){for(ee=0;eese&&(X.splice(0,se),Oe=X[0].distance),v&&B!==0&&X.length===0){Xe.distance=B,Xe.index=!1;var un=de._module.hoverPoints(Xe,Ie,Se,"closest",{hoverLayer:l._hoverlayer});if(un&&(un=un.filter(function(It){return It.spikeDistance<=B})),un&&un.length){var ha,Sn=un.filter(function(It){return It.xa.showspikes&&It.xa.spikesnap!=="hovered data"});if(Sn.length){var Na=Sn[0];Qs(Na.x0)&&Qs(Na.y0)&&(ha=Ze(Na),(!be.vLinePoint||be.vLinePoint.spikeDistance>ha.spikeDistance)&&(be.vLinePoint=ha))}var da=un.filter(function(It){return It.ya.showspikes&&It.ya.spikesnap!=="hovered data"});if(da.length){var wn=da[0];Qs(wn.x0)&&Qs(wn.y0)&&(ha=Ze(wn),(!be.hLinePoint||be.hLinePoint.spikeDistance>ha.spikeDistance)&&(be.hLinePoint=ha))}}}}}fr();function nr(rt,Qt,Ct){for(var dn=null,pn=1/0,tn,un=0;un0&&Math.abs(rt.distance)Ke-1;Ur--)Pr(X[Ur]);X=gr,rr()}var sr=e._hoverdata,_e=[],ke=MT(e),$e=AT(e);for(K=0;K1||X.length>1)||h==="closest"&&Te&&X.length>1,cn=_a.combine(l.plot_bgcolor||_a.background,l.paper_bgcolor),sn=_T(X,{gd:e,hovermode:h,rotateLabels:Xt,bgColor:cn,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),Kt=sn.hoverLabels;if(yl.isUnifiedHover(h)||(BW(Kt,Xt,l,sn.commonLabelBoundingBox),wT(Kt,Xt,l._invScaleX,l._invScaleY)),a&&a.tagName){var aa=rv.getComponentMethod("annotations","hasClickToShow")(e,_e);qW(xc.select(a),aa?"pointer":"")}!a||n||!YW(e,r,sr)||(sr&&e.emit("plotly_unhover",{event:r,points:sr}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:k,yaxes:D,xvals:re,yvals:ne}))}function bT(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 HW=/([\s\S]*)<\/extra>/;function _T(e,r){var t=r.gd,n=t._fullLayout,a=r.hovermode,i=r.rotateLabels,o=r.bgColor,l=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||wc.HOVERFONT,v=r.fontSize||wc.HOVERFONTSIZE,h=r.fontWeight||n.font.weight,d=r.fontStyle||n.font.style,m=r.fontVariant||n.font.variant,g=r.fontTextcase||n.font.textcase,y=r.fontLineposition||n.font.lineposition,x=r.fontShadow||n.font.shadow,M=e[0],b=M.xa,_=M.ya,A=a.charAt(0),S=A+"Label",k=M[S];if(k===void 0&&b.type==="multicategory")for(var D=0;Dn.width-sr&&(_e=n.width-sr),zr.attr("d","M"+(Tr-_e)+",0L"+(Tr-_e+Ln)+","+Ur+Ln+"H"+sr+"v"+Ur+(Nt*2+dr.height)+"H"+-sr+"V"+Ur+Ln+"H"+(Tr-_e-Ln)+"Z"),Tr=_e,ee.minX=Tr-sr,ee.maxX=Tr+sr,b.side==="top"?(ee.minY=Pr-(Nt*2+dr.height),ee.maxY=Pr-Nt):(ee.minY=Pr+Nt,ee.maxY=Pr+(Nt*2+dr.height))}else{var ke,$e,We;_.side==="right"?(ke="start",$e=1,We="",Tr=b._offset+b._length):(ke="end",$e=-1,We="-",Tr=b._offset),Pr=_._offset+(M.y0+M.y1)/2,kr.attr("text-anchor",ke),zr.attr("d","M0,0L"+We+Ln+","+Ln+"V"+(Nt+dr.height/2)+"h"+We+(Nt*2+dr.width)+"V-"+(Nt+dr.height/2)+"H"+We+Ln+"V-"+Ln+"Z"),ee.minY=Pr-(Nt+dr.height/2),ee.maxY=Pr+(Nt+dr.height/2),_.side==="right"?(ee.minX=Tr+Ln,ee.maxX=Tr+Ln+(Nt*2+dr.width)):(ee.minX=Tr-Ln-(Nt*2+dr.width),ee.maxX=Tr-Ln);var qr=dr.height/2,Vr=F-dr.top-qr,Hr="clip"+n._uid+"commonlabel"+_._id,lt;if(Tr=0?yr=lr:ir+$=0?yr=ir:rr+$=0?Ae=Ze:ar+Me=0?Ae=ar:Cr+Me=0,(je.idealAlign==="top"||!St)&&hn?(We-=Vr/2,je.anchor="end"):St?(We+=Vr/2,je.anchor="start"):je.anchor="middle",je.crossPos=We;else{if(je.pos=We,St=$e+qr/2+Rt<=O,hn=$e-qr/2-Rt>=0,(je.idealAlign==="left"||!St)&&hn)$e-=qr/2,je.anchor="end";else if(St)$e+=qr/2,je.anchor="start";else{je.anchor="middle";var Fn=Rt/2,$n=$e+Fn-O,Xt=$e-Fn;$n>0&&($e-=$n),Xt<0&&($e+=-Xt)}je.crossPos=$e}Pr.attr("text-anchor",je.anchor),sr&&Ur.attr("text-anchor",je.anchor),zr.attr("transform",J3($e,We)+(i?CW(yT):""))}),{hoverLabels:Ve,commonLabelBoundingBox:ee}}function hT(e,r,t,n,a,i){var o="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=On.templateString(e.name,e.trace._meta)),o=gT(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===a?l=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),i&&l===""&&!e.hovertemplate&&(o===""&&i.remove(),l=o);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[s+"Label"]!==a&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),l=On.hovertemplateString(f,v,n._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(HW,function(h,d){return o=gT(d,e.nameLength),""})}return[l,o]}function BW(e,r,t,n){var a=r?"xa":"ya",i=r?"ya":"xa",o=0,l=1,s=e.size(),u=new Array(s),f=0,v=n.minX,h=n.maxX,d=n.minY,m=n.maxY,g=function(re){return re*t._invScaleX},y=function(re){return re*t._invScaleY};e.each(function(re){var ne=re[a],K=re[i],ee=ne._id.charAt(0)==="x",fe=ne.range;f===0&&fe&&fe[0]>fe[1]!==ee&&(l=-1);var de=0,qe=ee?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var Be=xT(re,r),Ne=re.anchor,Ie=Ne==="end"?-1:1,Se,Xe;if(Ne==="middle")Se=re.crossPos+(ee?y(Be.y-re.by/2):g(re.bx/2+re.tx2width/2)),Xe=Se+(ee?y(re.by):g(re.bx));else if(ee)Se=re.crossPos+y(Ln+Be.y)-y(re.by/2-Ln),Xe=Se+y(re.by);else{var se=g(Ie*Ln+Be.x),be=se+g(Ie*re.bx);Se=re.crossPos+Math.min(se,be),Xe=re.crossPos+Math.max(se,be)}ee?d!==void 0&&m!==void 0&&Math.min(Xe,m)-Math.max(Se,d)>1&&(K.side==="left"?(de=K._mainLinePosition,qe=t.width):qe=K._mainLinePosition):v!==void 0&&h!==void 0&&Math.min(Xe,h)-Math.max(Se,v)>1&&(K.side==="top"?(de=K._mainLinePosition,qe=t.height):qe=K._mainLinePosition)}u[f++]=[{datum:re,traceIndex:re.trace.index,dp:0,pos:re.pos,posref:re.posref,size:re.by*(ee?RW:1)/2,pmin:de,pmax:qe}]}),u.sort(function(re,ne){return re[0].posref-ne[0].posref||l*(ne[0].traceIndex-re[0].traceIndex)});var x,M,b,_,A,S,k;function D(re){var ne=re[0],K=re[re.length-1];if(M=ne.pmin-ne.pos-ne.dp+ne.size,b=K.pos+K.dp+K.size-ne.pmax,M>.01){for(A=re.length-1;A>=0;A--)re[A].dp+=M;x=!1}if(!(b<.01)){if(M<-.01){for(A=re.length-1;A>=0;A--)re[A].dp-=b;x=!1}if(x){var ee=0;for(_=0;_ne.pmax&&ee++;for(_=re.length-1;_>=0&&!(ee<=0);_--)S=re[_],S.pos>ne.pmax-1&&(S.del=!0,ee--);for(_=0;_=0;A--)re[A].dp-=b;for(_=re.length-1;_>=0&&!(ee<=0);_--)S=re[_],S.pos+S.dp+S.size>ne.pmax&&(S.del=!0,ee--)}}}for(;!x&&o<=s;){for(o++,x=!0,_=0;_.01){for(A=F.length-1;A>=0;A--)F[A].dp+=M;for(z.push.apply(z,F),u.splice(_+1,1),k=0,A=z.length-1;A>=0;A--)k+=z[A].dp;for(b=k/z.length,A=z.length-1;A>=0;A--)z[A].dp-=b;x=!1}else _++}u.forEach(D)}for(_=u.length-1;_>=0;_--){var B=u[_];for(A=B.length-1;A>=0;A--){var X=B[A],V=X.datum;V.offset=X.dp,V.del=X.del}}}function xT(e,r){var t=0,n=e.offset;return r&&(n*=-NW,t=e.offset*zW),{x:t,y:n}}function OW(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Ln+Nt),n=t+r*(e.txwidth+Nt),a=e.anchor==="middle";return a&&(t-=e.tx2width/2,n+=e.txwidth/2+Nt),{alignShift:r,textShiftX:t,text2ShiftX:n}}function wT(e,r,t,n){var a=function(o){return o*t},i=function(o){return o*n};e.each(function(o){var l=xc.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),u=o.anchor,f=u==="end"?-1:1,v=OW(o),h=xT(o,r),d=h.x,m=h.y,g=u==="middle";l.select("path").attr("d",g?"M-"+a(o.bx/2+o.tx2width/2)+","+i(m-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":"M0,0L"+a(f*Ln+d)+","+i(Ln+m)+"v"+i(o.by/2-Ln)+"h"+a(f*o.bx)+"v-"+i(o.by)+"H"+a(f*Ln+d)+"V"+i(m-Ln)+"Z");var y=d+v.textShiftX,x=m+o.ty0-o.by/2+Nt,M=o.textAlign||"auto";M!=="auto"&&(M==="left"&&u!=="start"?(s.attr("text-anchor","start"),y=g?-o.bx/2-o.tx2width/2+Nt:-o.bx-Nt):M==="right"&&u!=="end"&&(s.attr("text-anchor","end"),y=g?o.bx/2-o.tx2width/2-Nt:o.bx+Nt)),s.call(So.positionText,a(y),i(x)),o.tx2width&&(l.select("text.name").call(So.positionText,a(v.text2ShiftX+v.alignShift*Nt+d),i(m+o.ty0-o.by/2+Nt)),l.select("rect").call(os.setRect,a(v.text2ShiftX+(v.alignShift-1)*o.tx2width/2+d),i(m-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function UW(e,r){var t=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[t]||{};function o(h){return h||Qs(h)&&h===0}var l=Array.isArray(t)?function(h,d){var m=On.castOption(a,t,h);return o(m)?m:On.extractOption({},n,"",d)}:function(h,d){return On.extractOption(i,n,h,d)};function s(h,d,m){var g=l(d,m);o(g)&&(e[h]=g)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=On.constrain(e.x0,0,e.xa._length),e.x1=On.constrain(e.x1,0,e.xa._length),e.y0=On.constrain(e.y0,0,e.ya._length),e.y1=On.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:ls.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:ls.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=ls.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+ls.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=ls.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+ls.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var v=e.hoverinfo||e.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(e.xLabel=void 0),v.indexOf("y")===-1&&(e.yLabel=void 0),v.indexOf("z")===-1&&(e.zLabel=void 0),v.indexOf("text")===-1&&(e.text=void 0),v.indexOf("name")===-1&&(e.name=void 0)),e}function dT(e,r,t){var n=t.container,a=t.fullLayout,i=a._size,o=t.event,l=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(n.selectAll(".spikeline").remove(),!!(s||l)){var v=_a.combine(a.plot_bgcolor,a.paper_bgcolor);if(l){var h=r.hLinePoint,d,m;u=h&&h.xa,f=h&&h.ya;var g=f.spikesnap;g==="cursor"?(d=o.pointerX,m=o.pointerY):(d=u._offset+h.x,m=f._offset+h.y);var y=fT.readability(h.color,v)<1.5?_a.contrast(v):h.color,x=f.spikemode,M=f.spikethickness,b=f.spikecolor||y,_=ls.getPxPosition(e,f),A,S;if(x.indexOf("toaxis")!==-1||x.indexOf("across")!==-1){if(x.indexOf("toaxis")!==-1&&(A=_,S=d),x.indexOf("across")!==-1){var k=f._counterDomainMin,D=f._counterDomainMax;f.anchor==="free"&&(k=Math.min(k,f.position),D=Math.max(D,f.position)),A=i.l+k*i.w,S=i.l+D*i.w}n.insert("line",":first-child").attr({x1:A,x2:S,y1:m,y2:m,"stroke-width":M,stroke:b,"stroke-dasharray":os.dashStyle(f.spikedash,M)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:A,x2:S,y1:m,y2:m,"stroke-width":M+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}x.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:_+(f.side!=="right"?M:-M),cy:m,r:M,fill:b}).classed("spikeline",!0)}if(s){var z=r.vLinePoint,F,O;u=z&&z.xa,f=z&&z.ya;var G=u.spikesnap;G==="cursor"?(F=o.pointerX,O=o.pointerY):(F=u._offset+z.x,O=f._offset+z.y);var B=fT.readability(z.color,v)<1.5?_a.contrast(v):z.color,X=u.spikemode,V=u.spikethickness,re=u.spikecolor||B,ne=ls.getPxPosition(e,u),K,ee;if(X.indexOf("toaxis")!==-1||X.indexOf("across")!==-1){if(X.indexOf("toaxis")!==-1&&(K=ne,ee=O),X.indexOf("across")!==-1){var fe=u._counterDomainMin,de=u._counterDomainMax;u.anchor==="free"&&(fe=Math.min(fe,u.position),de=Math.max(de,u.position)),K=i.t+(1-de)*i.h,ee=i.t+(1-fe)*i.h}n.insert("line",":first-child").attr({x1:F,x2:F,y1:K,y2:ee,"stroke-width":V,stroke:re,"stroke-dasharray":os.dashStyle(u.spikedash,V)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:F,x2:F,y1:K,y2:ee,"stroke-width":V+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}X.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:F,cy:ne-(u.side!=="top"?V:-V),r:V,fill:re}).classed("spikeline",!0)}}}function YW(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var n=t.length-1;n>=0;n--){var a=t[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function pT(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function gT(e,r){return So.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function GW(e,r){for(var t=r.charAt(0),n=[],a=[],i=[],o=0;o{"use strict";var VW=pr(),WW=zt(),ZW=Vu().isUnifiedHover;TT.exports=function(r,t,n,a){a=a||{};var i=t.legend;function o(l){a.font[l]||(a.font[l]=i?t.legend.font[l]:t.font[l])}t&&ZW(t.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=WW.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),VW.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var ST=te((Que,kT)=>{"use strict";var XW=pr(),jW=Up(),JW=_0();kT.exports=function(r,t){function n(a,i){return XW.coerce(r,t,JW,a,i)}jW(r,t,n)}});var qT=te((efe,LT)=>{"use strict";var CT=pr(),$W=ud(),KW=Up();LT.exports=function(r,t,n,a){function i(l,s){return CT.coerce(r,t,$W,l,s)}var o=CT.extendFlat({},a.hoverlabel);t.hovertemplate&&(o.namelength=-1),KW(r,t,i,o)}});var e5=te((rfe,DT)=>{"use strict";var QW=pr(),eZ=_0();DT.exports=function(r,t){function n(a,i){return t[a]!==void 0?t[a]:QW.coerce(r,t,eZ,a,i)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var RT=te((tfe,PT)=>{"use strict";var ET=pr(),rZ=_0(),tZ=e5(),nZ=Up();PT.exports=function(r,t){function n(f,v){return ET.coerce(r,t,rZ,f,v)}var a=tZ(r,t);a&&(n("hoverdistance"),n("spikedistance"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=t._has("mapbox"),l=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((o||l||s)&&u===1||(o||l)&&s&&u===2)&&(t.dragmode="pan"),nZ(r,t,n),ET.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var FT=te((nfe,NT)=>{"use strict";var r5=pr(),zT=dt();NT.exports=function(r){var t=r.calcdata,n=r._fullLayout;function a(u){return function(f){return r5.coerceHoverinfo({hoverinfo:f},{_module:u._module},n)}}for(var i=0;i{"use strict";var iZ=dt(),oZ=Q3().hover;IT.exports=function(r,t,n){var a=iZ.getComponentMethod("annotations","onClick")(r,r._hoverdata);n!==void 0&&oZ(r,t,n,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(a&&a.then?a.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var ss=te((ife,UT)=>{"use strict";var lZ=kt(),Yp=pr(),sZ=To(),D1=Vu(),BT=_0(),OT=Q3();UT.exports={moduleType:"component",name:"fx",constants:t1(),schema:{layout:BT},attributes:ud(),layoutAttributes:BT,supplyLayoutGlobalDefaults:ST(),supplyDefaults:qT(),supplyLayoutDefaults:RT(),calc:FT(),getDistanceFunction:D1.getDistanceFunction,getClosest:D1.getClosest,inbox:D1.inbox,quadrature:D1.quadrature,appendArrayPointValue:D1.appendArrayPointValue,castHoverOption:fZ,castHoverinfo:cZ,hover:OT.hover,unhover:sZ.unhover,loneHover:OT.loneHover,loneUnhover:uZ,click:HT()};function uZ(e){var r=Yp.isD3Selection(e)?e:lZ.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function fZ(e,r,t){return Yp.castOption(e,r,"hoverlabel."+t)}function cZ(e,r,t){function n(a){return Yp.coerceHoverinfo({hoverinfo:a},{_module:e._module},r)}return Yp.castOption(e,t,"hoverinfo",n)}});var tv=te(eu=>{"use strict";eu.selectMode=function(e){return e==="lasso"||e==="select"};eu.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};eu.openMode=function(e){return e==="drawline"||e==="drawopenpath"};eu.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};eu.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};eu.selectingOrDrawing=function(e){return eu.freeMode(e)||eu.rectMode(e)}});var Gp=te((lfe,YT)=>{"use strict";YT.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var Vp=te((sfe,GT)=>{"use strict";GT.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 Zp=te((ufe,VT)=>{"use strict";var Wp=32;VT.exports={CIRCLE_SIDES:Wp,i000:0,i090:Wp/4,i180:Wp/2,i270:Wp/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var Xp=te((ffe,ZT)=>{"use strict";var vZ=pr().strTranslate;function WT(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function hZ(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function dZ(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return WT(e,t[r])}}function pZ(e){return vZ(e.xaxis._offset,e.yaxis._offset)}ZT.exports={p2r:WT,r2p:hZ,axValue:dZ,getTransform:pZ}});var Qu=te(ru=>{"use strict";var gZ=U2(),JT=Zp(),nv=JT.CIRCLE_SIDES,t5=JT.SQRT2,$T=Xp(),XT=$T.p2r,jT=$T.r2p,mZ=[0,3,4,5,6,1,2],yZ=[0,3,4,1,2];ru.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",n=0;n0&&s{"use strict";var tk=tv(),bZ=tk.drawMode,_Z=tk.openMode,av=Zp(),KT=av.i000,QT=av.i090,ek=av.i180,rk=av.i270,xZ=av.cos45,wZ=av.sin45,nk=Xp(),Jp=nk.p2r,ef=nk.r2p,MZ=Yu(),AZ=MZ.clearOutline,$p=Qu(),TZ=$p.readPaths,kZ=$p.writePaths,SZ=$p.ellipseOver,CZ=$p.fixDatesForPaths;function LZ(e,r){if(e.length){var t=e[0][0];if(t){var n=r.gd,a=r.isActiveShape,i=r.dragmode,o=(n.layout||{}).shapes||[];if(!bZ(i)&&a!==void 0){var l=n._fullLayout._activeShapeIndex;if(l{"use strict";var qZ=tv(),DZ=qZ.selectMode,EZ=Yu(),PZ=EZ.clearOutline,n5=Qu(),RZ=n5.readPaths,zZ=n5.writePaths,NZ=n5.fixDatesForPaths;ok.exports=function(r,t){if(r.length){var n=r[0][0];if(n){var a=n.getAttribute("d"),i=t.gd,o=i._fullLayout.newselection,l=t.plotinfo,s=l.xaxis,u=l.yaxis,f=t.isActiveSelection,v=t.dragmode,h=(i.layout||{}).selections||[];if(!DZ(v)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";lk.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 rf=te(ka=>{"use strict";var Mc=P1(),sk=pr(),Qp=Cn();ka.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ka.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ka.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ka.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ka.extractPathCoords=function(e,r,t){var n=[],a=e.match(Mc.segmentRE);return a.forEach(function(i){var o=r[i.charAt(0)].drawn;if(o!==void 0){var l=i.substr(1).match(Mc.paramRE);if(!(!l||l.lengthd&&(g="X"),g});return u>d&&(m=m.replace(/[\s,]*X.*/,""),sk.log("Ignoring extra params in segment "+s)),f+m})}function R1(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var o5=te((gfe,vk)=>{"use strict";var IZ=pr(),iv=Cn(),uk=ci(),fk=ln(),HZ=Qu().readPaths,i5=rf(),BZ=i5.getPathString,ck=bd(),OZ=Ka().FROM_TL;vk.exports=function(r,t,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var l=iv.getFromId(r,n.xref),s=iv.getFromId(r,n.yref);for(var u in ck){var f=ck[u](n,l,s);f!==void 0&&(o[u]=f)}}i=IZ.texttemplateStringForShapes(n.label.texttemplate,{},r._fullLayout._d3locale,o)}else i=n.label.text;var v={"data-index":t},h=n.label.font,d={"data-notex":1},m=a.append("g").attr(v).classed("shape-label",!0),g=m.append("text").attr(d).classed("shape-label-text",!0).text(i),y,x,M,b;if(n.path){var _=BZ(r,n),A=HZ(_,r);y=1/0,M=1/0,x=-1/0,b=-1/0;for(var S=0;S=e?a=r-n:a=n-r,-180/Math.PI*Math.atan2(a,i)}function YZ(e,r,t,n,a,i,o){var l=a.label.textposition,s=a.label.textangle,u=a.label.padding,f=a.type,v=Math.PI/180*i,h=Math.sin(v),d=Math.cos(v),m=a.label.xanchor,g=a.label.yanchor,y,x,M,b;if(f==="line"){l==="start"?(y=e,x=r):l==="end"?(y=t,x=n):(y=(e+t)/2,x=(r+n)/2),m==="auto"&&(l==="start"?s==="auto"?t>e?m="left":te?m="right":te?m="right":te?m="left":t{"use strict";var GZ=pr(),VZ=GZ.strTranslate,hk=To(),gk=tv(),WZ=gk.drawMode,mk=gk.selectMode,yk=dt(),dk=zt(),rg=Zp(),ZZ=rg.i000,XZ=rg.i090,jZ=rg.i180,JZ=rg.i270,$Z=Yu(),bk=$Z.clearOutlineControllers,s5=Qu(),eg=s5.pointsOnRectangle,l5=s5.pointsOnEllipse,KZ=s5.writePaths,QZ=Kp().newShapes,eX=Kp().createShapeObj,rX=a5(),tX=o5();_k.exports=function e(r,t,n,a){a||(a=0);var i=n.gd;function o(){e(r,t,n,a++),(l5(r[0])||n.hasText)&&l({redrawing:!0})}function l(ne){var K={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,K=QZ(t,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,K=rX(t,n),i._fullLayout._reselect=!0),Object.keys(K).length&&yk.call((ne||{}).redrawing?"relayout":"_guiRelayout",i,K)}var s=i._fullLayout,u=s._zoomlayer,f=n.dragmode,v=WZ(f),h=mk(f);(v||h)&&(i._fullLayout._outlining=!0),bk(i),t.attr("d",KZ(r));var d,m,g,y,x;if(!a&&(n.isActiveShape||n.isActiveSelection)){x=nX([],r);var M=u.append("g").attr("class","outline-controllers");F(M),re()}if(v&&n.hasText){var b=u.select(".label-temp"),_=eX(t,n,n.dragmode);tX(i,"label-temp",_,b)}function A(ne){g=+ne.srcElement.getAttribute("data-i"),y=+ne.srcElement.getAttribute("data-j"),d[g][y].moveFn=S}function S(ne,K){if(r.length){var ee=x[g][y][1],fe=x[g][y][2],de=r[g],qe=de.length;if(eg(de)){var Be=ne,Ne=K;if(n.isActiveSelection){var Ie=pk(de,y);Ie[1]===de[y][1]?Ne=0:Be=0}for(var Se=0;Se1&&!(ne.length===2&&ne[1][0]==="Z")&&(y===0&&(ne[0][0]="M"),r[g]=ne,o(),l())}}function z(ne,K){if(ne===2){g=+K.srcElement.getAttribute("data-i"),y=+K.srcElement.getAttribute("data-j");var ee=r[g];!eg(ee)&&!l5(ee)&&D()}}function F(ne){d=[];for(var K=0;K{"use strict";var iX=kt(),kk=dt(),xk=pr(),ov=Cn(),oX=Qu().readPaths,lX=tg(),ag=o5(),Sk=Yu().clearOutlineControllers,u5=zt(),c5=ln(),sX=_n().arrayEditor,wk=To(),Mk=Ku(),Ac=P1(),zi=rf(),f5=zi.getPathString;qk.exports={draw:v5,drawOne:Ck,eraseActiveShape:cX,drawLabel:ag};function v5(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var n=r._plots[t].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;ao&&lr>l&&!nr.shiftKey?wk.getCursor(ir/ar,1-rr/lr):"move";Mk(r,Cr),Xe=Cr.split("-")[0]}}function pe(nr){ng(e)||(s&&(x=de(t.xanchor)),u&&(M=qe(t.yanchor)),t.type==="path"?O=t.path:(d=s?t.x0:de(t.x0),m=u?t.y0:qe(t.y0),g=s?t.x1:de(t.x1),y=u?t.y1:qe(t.y1)),dy?(b=m,k="y0",_=y,D="y1"):(b=y,k="y1",_=m,D="y0"),Te(nr),Fe(a,t),fr(r,t,e),Se.moveFn=Xe==="move"?$:Me,Se.altKey=nr.altKey)}function W(){ng(e)||(Mk(r),Oe(a),Lk(r,e,t),kk.call("_guiRelayout",e,i.getUpdateObj()))}function Q(){ng(e)||Oe(a)}function $(nr,Ze){if(t.type==="path"){var ar=function(rr){return rr},lr=ar,ir=ar;s?h("xanchor",t.xanchor=Be(x+nr)):(lr=function(Cr){return Be(de(Cr)+nr)},B&&B.type==="date"&&(lr=zi.encodeDate(lr))),u?h("yanchor",t.yanchor=Ne(M+Ze)):(ir=function(Cr){return Ne(qe(Cr)+Ze)},V&&V.type==="date"&&(ir=zi.encodeDate(ir))),h("path",t.path=Ak(O,lr,ir))}else s?h("xanchor",t.xanchor=Be(x+nr)):(h("x0",t.x0=Be(d+nr)),h("x1",t.x1=Be(g+nr))),u?h("yanchor",t.yanchor=Ne(M+Ze)):(h("y0",t.y0=Ne(m+Ze)),h("y1",t.y1=Ne(y+Ze)));r.attr("d",f5(e,t)),Fe(a,t),ag(e,n,t,G)}function Me(nr,Ze){if(v){var ar=function(dr){return dr},lr=ar,ir=ar;s?h("xanchor",t.xanchor=Be(x+nr)):(lr=function(Tr){return Be(de(Tr)+nr)},B&&B.type==="date"&&(lr=zi.encodeDate(lr))),u?h("yanchor",t.yanchor=Ne(M+Ze)):(ir=function(Tr){return Ne(qe(Tr)+Ze)},V&&V.type==="date"&&(ir=zi.encodeDate(ir))),h("path",t.path=Ak(O,lr,ir))}else if(f){if(Xe==="resize-over-start-point"){var rr=d+nr,Cr=u?m-Ze:m+Ze;h("x0",t.x0=s?rr:Be(rr)),h("y0",t.y0=u?Cr:Ne(Cr))}else if(Xe==="resize-over-end-point"){var yr=g+nr,Ae=u?y-Ze:y+Ze;h("x1",t.x1=s?yr:Be(yr)),h("y1",t.y1=u?Ae:Ne(Ae))}}else{var Ve=function(dr){return Xe.indexOf(dr)!==-1},je=Ve("n"),zr=Ve("s"),kr=Ve("w"),er=Ve("e"),Ke=je?b+Ze:b,mr=zr?_+Ze:_,Mr=kr?A+nr:A,gr=er?S+nr:S;u&&(je&&(Ke=b-Ze),zr&&(mr=_-Ze)),(!u&&mr-Ke>l||u&&Ke-mr>l)&&(h(k,t[k]=u?Ke:Ne(Ke)),h(D,t[D]=u?mr:Ne(mr))),gr-Mr>o&&(h(z,t[z]=s?Mr:Be(Mr)),h(F,t[F]=s?gr:Be(gr)))}r.attr("d",f5(e,t)),Fe(a,t),ag(e,n,t,G)}function Fe(nr,Ze){(s||u)&&ar();function ar(){var lr=Ze.type!=="path",ir=nr.selectAll(".visual-cue").data([0]),rr=1;ir.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":rr}).classed("visual-cue",!0);var Cr=de(s?Ze.xanchor:xk.midRange(lr?[Ze.x0,Ze.x1]:zi.extractPathCoords(Ze.path,Ac.paramIsX))),yr=qe(u?Ze.yanchor:xk.midRange(lr?[Ze.y0,Ze.y1]:zi.extractPathCoords(Ze.path,Ac.paramIsY)));if(Cr=zi.roundPositionForSharpStrokeRendering(Cr,rr),yr=zi.roundPositionForSharpStrokeRendering(yr,rr),s&&u){var Ae="M"+(Cr-1-rr)+","+(yr-1-rr)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ir.attr("d",Ae)}else if(s){var Ve="M"+(Cr-1-rr)+","+(yr-9-rr)+"v18 h2 v-18 Z";ir.attr("d",Ve)}else{var je="M"+(Cr-9-rr)+","+(yr-1-rr)+"h18 v2 h-18 Z";ir.attr("d",je)}}}function Oe(nr){nr.selectAll(".visual-cue").remove()}function fr(nr,Ze,ar){var lr=Ze.xref,ir=Ze.yref,rr=ov.getFromId(ar,lr),Cr=ov.getFromId(ar,ir),yr="";lr!=="paper"&&!rr.autorange&&(yr+=lr),ir!=="paper"&&!Cr.autorange&&(yr+=ir),c5.setClipUrl(nr,yr?"clip"+ar._fullLayout._uid+yr:null,ar)}}function Ak(e,r,t){return e.replace(Ac.segmentRE,function(n){var a=0,i=n.charAt(0),o=Ac.paramIsX[i],l=Ac.paramIsY[i],s=Ac.numParams[i],u=n.substr(1).replace(Ac.paramRE,function(f){return a>=s||(o[a]?f=r(f):l[a]&&(f=t(f)),a++),f});return i+u})}function fX(e,r){if(ig(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Tk(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Tk,v5(e)}}}function Tk(e){if(ig(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(Sk(e),delete e._fullLayout._activeShapeIndex,v5(e))}}function cX(e){if(ig(e)){Sk(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Co=dt(),Dk=ua(),Ek=ya(),Ot=Vp(),vX=og().eraseActiveShape,lg=pr(),Et=lg._,Ut=Hk.exports={};Ut.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Et(e,"Download plot as a png"):Et(e,"Download plot")},icon:Ot.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};lg.notifier(Et(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in r&&(t[n]=r[n])}),Co.call("downloadImage",e,t).then(function(n){lg.notifier(Et(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){lg.notifier(Et(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ut.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Et(e,"Edit in Chart Studio")},icon:Ot.disk,click:function(e){Dk.sendDataToCloud(e)}};Ut.editInChartStudio={name:"editInChartStudio",title:function(e){return Et(e,"Edit in Chart Studio")},icon:Ot.pencil,click:function(e){Dk.sendDataToCloud(e)}};Ut.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Et(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Ot.zoombox,click:ti};Ut.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Et(e,"Pan")},attr:"dragmode",val:"pan",icon:Ot.pan,click:ti};Ut.select2d={name:"select2d",_cat:"select",title:function(e){return Et(e,"Box Select")},attr:"dragmode",val:"select",icon:Ot.selectbox,click:ti};Ut.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Et(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Ot.lasso,click:ti};Ut.drawclosedpath={name:"drawclosedpath",title:function(e){return Et(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Ot.drawclosedpath,click:ti};Ut.drawopenpath={name:"drawopenpath",title:function(e){return Et(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Ot.drawopenpath,click:ti};Ut.drawline={name:"drawline",title:function(e){return Et(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Ot.drawline,click:ti};Ut.drawrect={name:"drawrect",title:function(e){return Et(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Ot.drawrect,click:ti};Ut.drawcircle={name:"drawcircle",title:function(e){return Et(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Ot.drawcircle,click:ti};Ut.eraseshape={name:"eraseshape",title:function(e){return Et(e,"Erase active shape")},icon:Ot.eraseshape,click:vX};Ut.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Et(e,"Zoom in")},attr:"zoom",val:"in",icon:Ot.zoom_plus,click:ti};Ut.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Et(e,"Zoom out")},attr:"zoom",val:"out",icon:Ot.zoom_minus,click:ti};Ut.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Et(e,"Autoscale")},attr:"zoom",val:"auto",icon:Ot.autoscale,click:ti};Ut.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Et(e,"Reset axes")},attr:"zoom",val:"reset",icon:Ot.home,click:ti};Ut.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Et(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Ot.tooltip_basic,gravity:"ne",click:ti};Ut.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Et(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Ot.tooltip_compare,gravity:"ne",click:ti};function ti(e,r){var t=r.currentTarget,n=t.getAttribute("data-attr"),a=t.getAttribute("data-val")||!0,i=e._fullLayout,o={},l=Ek.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(n==="zoom"){var v=a==="in"?.5:2,h=(1+v)/2,d=(1-v)/2,m;for(f=0;f{"use strict";var Bk=p5(),pX=Object.keys(Bk),Ok=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Uk=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Ok),sv=[],gX=function(e){if(Uk.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();sv.indexOf(r)===-1&&sv.push(r),sv.indexOf(t)===-1&&sv.push(t)}};pX.forEach(function(e){gX(Bk[e])});sv.sort();Yk.exports={DRAW_MODES:Ok,backButtons:Uk,foreButtons:sv}});var m5=te((wfe,Gk)=>{"use strict";var xfe=g5();Gk.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 Wk=te((Mfe,Vk)=>{"use strict";var mX=pr(),z1=zt(),yX=_n(),bX=m5();Vk.exports=function(r,t){var n=r.modebar||{},a=yX.newContainer(t,"modebar");function i(l,s){return mX.coerce(n,a,bX,l,s)}i("orientation"),i("bgcolor",z1.addOpacity(t.paper_bgcolor,.5));var o=z1.contrast(z1.rgb(t.modebar.bgcolor));i("color",z1.addOpacity(o,.3)),i("activecolor",z1.addOpacity(o,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var Jk=te((Afe,jk)=>{"use strict";var y5=kt(),_X=Bt(),ug=pr(),Zk=Vp(),xX=Jh().version,wX=new DOMParser;function Xk(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var us=Xk.prototype;us.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(v){v.style.backgroundColor=i.bgcolor}),ug.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var l=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(l||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};us.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var n=r.createGroup();t.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var o=r.createButton(a);r.buttonElements.push(o),n.appendChild(o)}),r.element.appendChild(n)})};us.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};us.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&t.setAttribute("data-title",n),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),t.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&y5.select(t).classed("active",!0);var o=e.icon;return typeof o=="function"?t.appendChild(o()):t.appendChild(this.createIcon(o||Zk.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};us.createIcon=function(e){var r=_X(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(t,"svg"),n.setAttribute("viewBox",[0,0,e.width,r].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(t,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=wX.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};us.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",l=y5.select(n),s=function(v,h){var d=r.modebar,m=v.querySelector(".icon path");m&&(h||v.matches(":hover")?m.style.fill=d.activecolor:m.style.fill=d.color)};if(o){if(i===t){var u=!l.classed("active");l.classed("active",u),s(n,u)}}else{var f=i===null?i:ug.nestedProperty(r,i).get();l.classed("active",f===a),s(n,f===a)}})};us.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var TX=ya(),$k=Qa(),b5=dt(),kX=Vu().isUnifiedHover,SX=Jk(),fg=p5(),CX=g5().DRAW_MODES,LX=pr().extendDeep;Kk.exports=function(r){var t=r._fullLayout,n=r._context,a=t._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete t._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 i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=zX(i):!n.displayModeBar&&n.watermark?o=[]:o=qX(r),a?a.update(r,o):t._modeBar=SX(r,o)};function qX(e){var r=e._fullLayout,t=e._fullData,n=e._context;function a(K,ee){if(typeof ee=="string"){if(ee.toLowerCase()===K.toLowerCase())return!0}else{var fe=ee.name,de=ee._cat||ee.name;if(fe===K||de===K.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var o=r.modebar.remove;typeof o=="string"&&(o=[o]);var l=n.modeBarButtonsToAdd.concat(i.filter(function(K){for(var ee=0;ee1?(F=["toggleHover"],O=["resetViews"]):v?(z=["zoomInGeo","zoomOutGeo"],F=["hoverClosestGeo"],O=["resetGeo"]):f?(F=["hoverClosest3d"],O=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(z=["zoomInMapbox","zoomOutMapbox"],F=["toggleHover"],O=["resetViewMapbox"]):y?(z=["zoomInMap","zoomOutMap"],F=["toggleHover"],O=["resetViewMap"]):h?F=["hoverClosestPie"]:b?(F=["hoverClosestCartesian","hoverCompareCartesian"],O=["resetViewSankey"]):F=["toggleHover"],u&&F.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(PX(t)||A)&&(F=[]),u&&!_&&(z=["zoomIn2d","zoomOut2d","autoScale2d"],O[0]!=="resetViews"&&(O=["resetScale2d"])),f?G=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!_||m?G=["zoom2d","pan2d"]:g||y||v?G=["pan2d"]:x&&(G=["zoom2d"]),EX(t)&&G.push("select2d","lasso2d");var B=[],X=function(K){B.indexOf(K)===-1&&F.indexOf(K)!==-1&&B.push(K)};if(Array.isArray(l)){for(var V=[],re=0;re{"use strict";eS.exports={moduleType:"component",name:"modebar",layoutAttributes:m5(),supplyLayoutDefaults:Wk(),manage:Qk()}});var x5=te((Sfe,rS)=>{"use strict";var NX=Ka().FROM_BL;rS.exports=function(r,t,n){n===void 0&&(n=NX[r.constraintoward||"center"]);var a=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=a[0]+(a[1]-a[0])*n;r.range=r._input.range=[r.l2r(i+(a[0]-i)*t),r.l2r(i+(a[1]-i)*t)],r.setScale()}});var F1=te(N1=>{"use strict";var Tc=pr(),w5=Ju(),bl=ya().id2name,FX=pl(),tS=x5(),IX=dp(),HX=En().ALMOST_EQUAL,BX=Ka().FROM_BL;N1.handleDefaults=function(e,r,t){var n=t.axIds,a=t.axHasImage,i=r._axisConstraintGroups=[],o=r._axisMatchGroups=[],l,s,u,f,v,h,d,m;for(l=0;li?t.substr(i):n.substr(a))+o}function UX(e,r){for(var t=r._size,n=t.h/t.w,a={},i=Object.keys(e),o=0;oHX*m&&!M)){for(i=0;iG&&feF&&(F=fe);var qe=(F-z)/(2*O);v/=qe,z=s.l2r(z),F=s.l2r(F),s.range=s._input.range=S{"use strict";var vg=kt(),ni=dt(),ro=ua(),Lo=pr(),T5=ci(),k5=Gp(),I1=zt(),uv=ln(),oS=x1(),cS=_5(),H1=Cn(),tu=Ka(),vS=F1(),YX=vS.enforce,GX=vS.clean,lS=Ju().doAutoRange,hS="start",VX="middle",dS="end",WX=Pa().zindexSeparator;xa.layoutStyles=function(e){return Lo.syncOrAsync([ro.doAutoMargin,XX],e)};function ZX(e,r,t){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]r[0])return!0}return!1}function XX(e){var r=e._fullLayout,t=r._size,n=t.p,a=H1.list(e,"",!0),i,o,l,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(uv.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),xa.drawMainTitle(e),cS.manage(e),!r._has("cartesian"))return ro.previousPromises(e);function v(pe,W,Q){var $=pe._lw/2;if(pe._id.charAt(0)==="x"){if(W){if(Q==="top")return W._offset-n-$}else return t.t+t.h*(1-(pe.position||0))+$%1;return W._offset+W._length+n+$}if(W){if(Q==="right")return W._offset+W._length+n+$}else return t.l+t.w*(pe.position||0)+$%1;return W._offset-n-$}for(i=0;i0){KX(e,i,u,s),l.attr({x:o,y:i,"text-anchor":n,dy:fS(r.yanchor)}).call(T5.positionText,o,i);var f=(r.text.match(T5.BR_TAG_ALL)||[]).length;if(f){var v=tu.LINE_SPACING*f+tu.MID_SHIFT;r.y===0&&(v=-v),l.selectAll(".line").each(function(){var y=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",y)})}var h=vg.selectAll(".gtitle-subtitle");if(h.node()){var d=l.node().getBBox(),m=d.y+d.height,g=m+oS.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:o,y:g,"text-anchor":n,dy:fS(r.yanchor)}).call(T5.positionText,o,g)}}}};function jX(e,r,t,n,a){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=Lo.isTopAnchor(r)?n:n-a,l=t==="b"?i-o:o;return Lo.isTopAnchor(r)&&t==="t"||Lo.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",o=e._fullLayout.margin[i],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=JX(i,n,a,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>o?l:0}function KX(e,r,t,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",l={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&jX(e,i,o,r,n)?l[o]=t:i.yref==="container"&&(s[o]=t,e._fullLayout._reservedMargin[a]=s),ro.allowAutoMargin(e,a),ro.autoMargin(e,a,l)}function QX(e,r){var t=e.title,n=e._size,a=0;switch(r===hS?a=t.pad.l:r===dS&&(a=-t.pad.r),t.xref){case"paper":return n.l+n.w*t.x+a;case"container":default:return e.width*t.x+a}}function ej(e,r){var t=e.title,n=e._size,a=0;if(r==="0em"||!r?a=-t.pad.b:r===tu.CAP_SHIFT+"em"&&(a=t.pad.t),t.y==="auto")return n.t/2;switch(t.yref){case"paper":return n.t+n.h-n.h*t.y+a;case"container":default:return e.height-e.height*t.y+a}}function fS(e){return e==="top"?tu.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":tu.MID_SHIFT+"em"}function rj(e){var r=e.title,t=VX;return Lo.isRightAnchor(r)?t=dS:Lo.isLeftAnchor(r)&&(t=hS),t}function tj(e){var r=e.title,t="0em";return Lo.isTopAnchor(r)?t=tu.CAP_SHIFT+"em":Lo.isMiddleAnchor(r)&&(t=tu.MID_SHIFT+"em"),t}xa.doTraceStyle=function(e){var r=e.calcdata,t=[],n;for(n=0;n{"use strict";var nj=Qu().readPaths,aj=tg(),pS=Yu().clearOutlineControllers,S5=zt(),gS=ln(),ij=_n().arrayEditor,mS=rf(),oj=mS.getPathString;bS.exports={draw:dg,drawOne:yS,activateLastSelection:uj};function dg(e){var r=e._fullLayout;pS(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var n=r._plots[t].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;y--){var x=o.append("path").attr(s).style("opacity",y?.1:u).call(S5.stroke,v).call(S5.fill,f).call(gS.dashLine,y?"solid":d,y?4+h:h);if(lj(x,e,n),m){var M=ij(e.layout,"selections",n);x.style({cursor:"move"});var b={element:x.node(),plotinfo:a,gd:e,editHelpers:M,isActiveSelection:!0},_=nj(l,e);aj(_,x,b)}else x.style("pointer-events",y?"all":"none");g[y]=x}var A=g[0],S=g[1];S.node().addEventListener("click",function(){return sj(e,A)})}}function lj(e,r,t){var n=t.xref+t.yref;gS.setClipUrl(e,"clip"+r._fullLayout._uid+n,r)}function sj(e,r){if(pg(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){C5(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=C5,dg(e)}}}function uj(e){if(pg(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=C5,dg(e)}}function C5(e){if(pg(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(pS(e),delete e._fullLayout._activeSelectionIndex,dg(e))}}});var xS=te((Dfe,_S)=>{function fj(){var e,r=0,t=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===t?e:(t=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}_S.exports=fj});var MS=te((Efe,wS)=>{function cj(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,n,a){var i=n[0],o=n[1],l=a[0],s=a[1],u=t[0],f=t[1];return(l-i)*(f-o)-(s-o)*(u-i)>=-e},pointBetween:function(t,n,a){var i=t[1]-n[1],o=a[0]-n[0],l=t[0]-n[0],s=a[1]-n[1],u=l*o+i*s;if(u-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=l-i>e&&(o-f)*(i-v)/(l-v)+f-a>e&&(s=!s),o=f,l=v}return s}};return r}wS.exports=cj});var TS=te((Pfe,AS)=>{var vj={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var n=e.root,a=e.root.next;a!==null;){if(t(a)){r.prev=a.prev,r.next=a,a.prev.next=r,a.prev=r;return}n=a,a=a.next}n.next=r,r.prev=n,r.next=null},findTransition:function(r){for(var t=e.root,n=e.root.next;n!==null&&!r(n);)t=n,n=n.next;return{before:t===e.root?null:t,after:n,insert:function(a){return a.prev=t,a.next=n,t.next=a,n!==null&&(n.prev=a),a}}}};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}};AS.exports=vj});var SS=te((Rfe,kS)=>{var B1=TS();function hj(e,r,t){function n(m,g){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:null,below:null},otherFill:null}}function a(m,g,y){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:y.myFill.above,below:y.myFill.below},otherFill:null}}var i=B1.create();function o(m,g,y,x,M,b){var _=r.pointsCompare(g,M);return _!==0?_:r.pointsSame(y,b)?0:m!==x?m?1:-1:r.pointAboveOrOnLine(y,x?M:b,x?b:M)?1:-1}function l(m,g){i.insertBefore(m,function(y){var x=o(m.isStart,m.pt,g,y.isStart,y.pt,y.other.pt);return x<0})}function s(m,g){var y=B1.node({isStart:!0,pt:m.start,seg:m,primary:g,other:null,status:null});return l(y,m.end),y}function u(m,g,y){var x=B1.node({isStart:!1,pt:g.end,seg:g,primary:y,other:m,status:null});m.other=x,l(x,m.pt)}function f(m,g){var y=s(m,g);return u(y,m,g),y}function v(m,g){t&&t.segmentChop(m.seg,g),m.other.remove(),m.seg.end=g,m.other.pt=g,l(m.other,m.pt)}function h(m,g){var y=a(g,m.seg.end,m.seg);return v(m,g),f(y,m.primary)}function d(m,g){var y=B1.create();function x(V,re){var ne=V.seg.start,K=V.seg.end,ee=re.seg.start,fe=re.seg.end;return r.pointsCollinear(ne,ee,fe)?r.pointsCollinear(K,ee,fe)||r.pointAboveOrOnLine(K,ee,fe)?1:-1:r.pointAboveOrOnLine(ne,ee,fe)?1:-1}function M(V){return y.findTransition(function(re){var ne=x(V,re.ev);return ne>0})}function b(V,re){var ne=V.seg,K=re.seg,ee=ne.start,fe=ne.end,de=K.start,qe=K.end;t&&t.checkIntersection(ne,K);var Be=r.linesIntersect(ee,fe,de,qe);if(Be===!1){if(!r.pointsCollinear(ee,fe,de)||r.pointsSame(ee,qe)||r.pointsSame(fe,de))return!1;var Ne=r.pointsSame(ee,de),Ie=r.pointsSame(fe,qe);if(Ne&&Ie)return re;var Se=!Ne&&r.pointBetween(ee,de,qe),Xe=!Ie&&r.pointBetween(fe,de,qe);if(Ne)return Xe?h(re,fe):h(V,qe),re;Se&&(Ie||(Xe?h(re,fe):h(V,qe)),h(re,ee))}else Be.alongA===0&&(Be.alongB===-1?h(V,de):Be.alongB===0?h(V,Be.pt):Be.alongB===1&&h(V,qe)),Be.alongB===0&&(Be.alongA===-1?h(re,ee):Be.alongA===0?h(re,Be.pt):Be.alongA===1&&h(re,fe));return!1}for(var _=[];!i.isEmpty();){var A=i.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let V=function(){if(k){var re=b(A,k);if(re)return re}return D?b(A,D):!1};var X=V;t&&t.segmentNew(A.seg,A.primary);var S=M(A),k=S.before?S.before.ev:null,D=S.after?S.after.ev:null;t&&t.tempStatus(A.seg,k?k.seg:!1,D?D.seg:!1);var z=V();if(z){if(e){var F;A.seg.myFill.below===null?F=!0:F=A.seg.myFill.above!==A.seg.myFill.below,F&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(z.seg),A.other.remove(),A.remove()}if(i.getHead()!==A){t&&t.rewind(A.seg);continue}if(e){var F;A.seg.myFill.below===null?F=!0:F=A.seg.myFill.above!==A.seg.myFill.below,D?A.seg.myFill.below=D.seg.myFill.above:A.seg.myFill.below=m,F?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var O;D?A.primary===D.primary?O=D.seg.otherFill.above:O=D.seg.myFill.above:O=A.primary?g:m,A.seg.otherFill={above:O,below:O}}t&&t.status(A.seg,k?k.seg:!1,D?D.seg:!1),A.other.status=S.insert(B1.node({ev:A}))}else{var G=A.status;if(G===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(y.exists(G.prev)&&y.exists(G.next)&&b(G.prev.ev,G.next.ev),t&&t.statusRemove(G.ev.seg),G.remove(),!A.primary){var B=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=B}_.push(A.seg)}i.getHead().remove()}return t&&t.done(),_}return e?{addRegion:function(m){for(var g,y=m[m.length-1],x=0;x{function dj(e,r,t){var n=[],a=[];return e.forEach(function(i){var o=i.start,l=i.end;if(r.pointsSame(o,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function v(X,V,re){return f.index=X,f.matches_head=V,f.matches_pt1=re,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function O1(e,r,t){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);r[i]!==0&&n.push({id:t?t.segmentId():-1,start:a.start,end:a.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(n),n}var pj={union:function(e,r){return O1(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return O1(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return O1(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return O1(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return O1(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};qS.exports=pj});var PS=te((Ffe,ES)=>{var gj={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=o(i[0]),s=1;s{var mj=xS(),yj=MS(),RS=SS(),bj=LS(),U1=DS(),zS=PS(),qo=!1,Y1=yj(),Ni;Ni={buildLog:function(e){return e===!0?qo=mj():e===!1&&(qo=!1),qo===!1?!1:qo.list},epsilon:function(e){return Y1.epsilon(e)},segments:function(e){var r=RS(!0,Y1,qo);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=RS(!1,Y1,qo);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:U1.union(e.combined,qo),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:U1.intersect(e.combined,qo),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:U1.difference(e.combined,qo),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:U1.differenceRev(e.combined,qo),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:U1.xor(e.combined,qo),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:bj(e.segments,Y1,qo),inverted:e.inverted}},polygonFromGeoJSON:function(e){return zS.toPolygon(Ni,e)},polygonToGeoJSON:function(e){return zS.fromPolygon(Ni,Y1,e)},union:function(e,r){return G1(e,r,Ni.selectUnion)},intersect:function(e,r){return G1(e,r,Ni.selectIntersect)},difference:function(e,r){return G1(e,r,Ni.selectDifference)},differenceRev:function(e,r){return G1(e,r,Ni.selectDifferenceRev)},xor:function(e,r){return G1(e,r,Ni.selectXor)}};function G1(e,r,t){var n=Ni.segments(e),a=Ni.segments(r),i=Ni.combine(n,a),o=t(i);return Ni.polygon(o)}typeof window=="object"&&(window.PolyBool=Ni);NS.exports=Ni});var HS=te((Hfe,IS)=>{IS.exports=function(r,t,n,a){var i=r[0],o=r[1],l=!1;n===void 0&&(n=0),a===void 0&&(a=t.length);for(var s=a-n,u=0,f=s-1;uo!=m>o&&i<(d-v)*(o-h)/(m-h)+v;g&&(l=!l)}return l}});var yg=te((Bfe,BS)=>{"use strict";var q5=pd().dot,gg=En().BADNUM,mg=BS.exports={};mg.tester=function(r){var t=r.slice(),n=t[0][0],a=n,i=t[0][1],o=i,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;la||x===gg||xo||g&&u(m))}function v(m,g){var y=m[0],x=m[1];if(y===gg||ya||x===gg||xo)return!1;var M=t.length,b=t[0][0],_=t[0][1],A=0,S,k,D,z,F;for(S=1;SMath.max(k,b)||x>Math.max(D,_)))if(xl||Math.abs(q5(v,u))>a)return!0;return!1};mg.filter=function(r,t){var n=[r[0]],a=0,i=0;function o(s){r.push(s);var u=n.length,f=a;n.splice(i+1);for(var v=f+1;v1){var l=r.pop();o(l)}return{addPt:o,raw:r,filtered:n}}});var US=te((Ofe,OS)=>{"use strict";OS.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var fC=te((Ufe,uC)=>{"use strict";var YS=FS(),_j=HS(),Z1=dt(),xj=ln().dashStyle,V1=zt(),wj=ss(),Mj=Vu().makeEventData,K1=tv(),Aj=K1.freeMode,Tj=K1.rectMode,X1=K1.drawMode,R5=K1.openMode,z5=K1.selectMode,GS=rf(),VS=P1(),JS=tg(),$S=Yu().clearOutline,KS=Qu(),D5=KS.handleEllipse,kj=KS.readPaths,Sj=Kp().newShapes,Cj=a5(),Lj=L5().activateLastSelection,_g=pr(),qj=_g.sorterAsc,QS=yg(),W1=qd(),Do=ya().getFromId,Dj=Gp(),Ej=hg().redrawReglTraces,xg=US(),fs=xg.MINSELECT,Pj=QS.filter,N5=QS.tester,F5=Xp(),WS=F5.p2r,Rj=F5.axValue,zj=F5.getTransform;function I5(e){return e.subplot!==void 0}function Nj(e,r,t,n,a){var i=!I5(n),o=Aj(a),l=Tj(a),s=R5(a),u=X1(a),f=z5(a),v=a==="drawline",h=a==="drawcircle",d=v||h,m=n.gd,g=m._fullLayout,y=f&&g.newselection.mode==="immediate"&&i,x=g._zoomlayer,M=n.element.getBoundingClientRect(),b=n.plotinfo,_=zj(b),A=r-M.left,S=t-M.top;g._calcInverseTransform(m);var k=_g.apply3DTransform(g._invTransform)(A,S);A=k[0],S=k[1];var D=g._invScaleX,z=g._invScaleY,F=A,O=S,G="M"+A+","+S,B=n.xaxes[0],X=n.yaxes[0],V=B._length,re=X._length,ne=e.altKey&&!(X1(a)&&s),K,ee,fe,de,qe,Be,Ne;rC(e,m,n),o&&(K=Pj([[A,S]],xg.BENDPX));var Ie=x.selectAll("path.select-outline-"+b.id).data([1]),Se=u?g.newshape:g.newselection;u&&(n.hasText=Se.label.text||Se.label.texttemplate);var Xe=u&&!s?Se.fillcolor:"rgba(0,0,0,0)",se=Se.line.color||(i?V1.contrast(m._fullLayout.plot_bgcolor):"#7f7f7f");Ie.enter().append("path").attr("class","select-outline select-outline-"+b.id).style({opacity:u?Se.opacity/2:1,"stroke-dasharray":xj(Se.line.dash,Se.line.width),"stroke-width":Se.line.width+"px","shape-rendering":"crispEdges"}).call(V1.stroke,se).call(V1.fill,Xe).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",_).attr("d",G+"Z");var be=x.append("path").attr("class","zoombox-corners").style({fill:V1.background,stroke:V1.defaultLine,"stroke-width":1}).attr("transform",_).attr("d","M0,0Z");if(u&&n.hasText){var Te=x.select(".label-temp");Te.empty()&&(Te=x.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var pe=g._uid+xg.SELECTID,W=[],Q=wg(m,n.xaxes,n.yaxes,n.subplot);y&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var Me=B._id,Fe=X._id;oC(m,Me,Fe,Q);for(var Oe=(m.layout||{}).selections||[],fr=[],nr=!1,Ze=0;Ze=0){m._fullLayout._deactivateShape(m);return}if(!u){var Oe=g.clickmode;W1.done(pe).then(function(){if(W1.clear(pe),Me===2){for(Ie.remove(),qe=0;qe-1&&eC(Fe,m,n.xaxes,n.yaxes,n.subplot,n,Ie),Oe==="event"&&$1(m,void 0);wj.click(m,Fe,b.id)}).catch(_g.error)}},n.doneFn=function(){be.remove(),W1.done(pe).then(function(){W1.clear(pe),!y&&de&&n.selectionDefs&&(de.subtract=ne,n.selectionDefs.push(de),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,fe)),(y||u)&&j1(n,y),n.doneFnCompleted&&n.doneFnCompleted(W),f&&$1(m,Ne)}).catch(_g.error)}}function eC(e,r,t,n,a,i,o){var l=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,v=[],h,d,m,g,y,x,M,b,_,A;if(Oj(l)){rC(e,r,i),h=wg(r,t,n,a);var S=Uj(l,h),k=S.pointNumbers.length>0;if(k?Yj(h,S):Gj(h)&&(M=XS(S))){for(o&&o.remove(),A=0;A=0}function Bj(e){return e._fullLayout._activeSelectionIndex>=0}function j1(e,r){var t=e.dragmode,n=e.plotinfo,a=e.gd;Hj(a)&&a._fullLayout._deactivateShape(a),Bj(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,l=X1(t),s=z5(t);if(l||s){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var f;l&&(f=Sj(u,e)),f&&Z1.call("_guiRelayout",a,{shapes:f});var v;s&&!I5(e)&&(v=Cj(u,e)),v&&(a._fullLayout._noEmitSelectedAtStart=!0,Z1.call("_guiRelayout",a,{selections:v}).then(function(){r&&Lj(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function ZS(e){return e._id}function wg(e,r,t,n){if(!e.calcdata)return[];var a=[],i=r.map(ZS),o=t.map(ZS),l,s,u;for(u=0;u0,i=a?n[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Yj(e,r){var t=[],n,a,i,o;for(o=0;o0&&t.push(n);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(a=r.searchInfo.cd[0].trace,a.selectedpoints.length===r.pointNumbers.length))){for(o=0;o1||(r+=n.selectedpoints.length,r>1)))return!1;return r===1}function J1(e,r,t){var n;for(n=0;n-1&&r;if(!o&&r){var Me=jS(e,!0);if(Me.length){var Fe=Me[0].xref,Oe=Me[0].yref;if(Fe&&Oe){var fr=lC(Me),nr=sC([Do(e,Fe,"x"),Do(e,Oe,"y")]);nr(W,fr)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:$&&$1(e,W),h._reselect=!1}if(!o&&h._deselect){var Ze=h._deselect;l=Ze.xref,s=Ze.yref,Zj(l,s,f)||oC(e,l,s,n),$&&(W.points.length?$1(e,W):O5(e)),h._deselect=!1}return{eventData:W,selectionTesters:t}}function Wj(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";cC.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 Q1=te((Gfe,vC)=>{"use strict";vC.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var fv=te((Wfe,pC)=>{"use strict";var hC=U5(),dC=$a(),Mg=Pa(),Kj=_n().templatedArray,Vfe=Q1();pC.exports=Kj("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:dC({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:hC.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:hC.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",Mg.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Mg.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Mg.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",Mg.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:dC({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Ag=te((Zfe,gC)=>{"use strict";gC.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Y5=te((Xfe,mC)=>{"use strict";mC.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var kc=te((jfe,MC)=>{"use strict";var yC=x2().axisHoverFormat,Qj=Ru().texttemplateAttrs,eJ=Ru().hovertemplateAttrs,bC=H0(),rJ=$a(),tJ=Kl().dash,nJ=Kl().pattern,aJ=ln(),iJ=Ag(),Tg=la().extendFlat,oJ=Y5();function _C(e){return{valType:"any",dflt:0,editType:"calc"}}function xC(e){return{valType:"any",editType:"calc"}}function wC(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}MC.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:_C("x"),yperiod:_C("y"),xperiod0:xC("x0"),yperiod0:xC("y0"),xperiodalignment:wC("x"),yperiodalignment:wC("y"),xhoverformat:yC("x"),yhoverformat:yC("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:Qj({},{}),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:eJ({},{keys:iJ.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Tg({},tJ,{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:oJ(!0),fillgradient:Tg({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:nJ,marker:Tg({symbol:{valType:"enumerated",values:aJ.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:Tg({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},bC("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"},bC("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:rJ({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var G5=te(($fe,kC)=>{"use strict";var AC=fv(),TC=kc().line,lJ=Kl().dash,kg=la().extendFlat,sJ=_o().overrideAll,uJ=_n().templatedArray,Jfe=Q1();kC.exports=sJ(uJ("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:kg({},AC.xref,{}),yref:kg({},AC.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:TC.color,width:kg({},TC.width,{min:1,dflt:1}),dash:kg({},lJ,{dflt:"dot"})}}),"arraydraw","from-root")});var qC=te((Kfe,LC)=>{"use strict";var SC=pr(),Sg=Cn(),fJ=gl(),cJ=G5(),CC=rf();LC.exports=function(r,t){fJ(r,t,{name:"selections",handleItemDefaults:vJ});for(var n=t.selections,a=0;a{"use strict";DC.exports=function(r,t,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var eh=te((ece,zC)=>{"use strict";var hJ=dt(),PC=pr(),RC=ya();zC.exports=function(r){return function(n,a){var i=n[r];if(Array.isArray(i))for(var o=hJ.subplotsRegistry.cartesian,l=o.idRegex,s=a._subplots,u=s.xaxis,f=s.yaxis,v=s.cartesian,h=a._has("cartesian"),d=0;d{"use strict";var NC=L5(),rh=fC();FC.exports={moduleType:"component",name:"selections",layoutAttributes:G5(),supplyLayoutDefaults:qC(),supplyDrawNewSelectionDefaults:EC(),includeBasePlot:eh()("selections"),draw:NC.draw,drawOne:NC.drawOne,reselect:rh.reselect,prepSelect:rh.prepSelect,clearOutline:rh.clearOutline,clearSelectionsCache:rh.clearSelectionsCache,selectOnClick:rh.selectOnClick}});var aL=te((tce,nL)=>{"use strict";var j5=kt(),Eo=pr(),IC=Eo.numberFormat,dJ=Jl(),pJ=S3(),Cg=dt(),ZC=Eo.strTranslate,gJ=ci(),HC=zt(),nf=ln(),mJ=ss(),BC=Cn(),yJ=Ku(),bJ=To(),XC=tv(),Lg=XC.selectingOrDrawing,_J=XC.freeMode,xJ=Ka().FROM_TL,wJ=Gp(),MJ=hg().redrawReglTraces,AJ=ua(),W5=ya().getFromId,TJ=nu().prepSelect,kJ=nu().clearOutline,SJ=nu().selectOnClick,V5=x5(),J5=Pa(),OC=J5.MINDRAG,hi=J5.MINZOOM,UC=!0;function CJ(e,r,t,n,a,i,o,l){var s=e._fullLayout._zoomlayer,u=o+l==="nsew",f=(o+l).length===1,v,h,d,m,g,y,x,M,b,_,A,S,k,D,z,F,O,G,B,X,V,re,ne;t+=r.yaxis._shift;function K(){if(v=r.xaxis,h=r.yaxis,b=v._length,_=h._length,x=v._offset,M=h._offset,d={},d[v._id]=v,m={},m[h._id]=h,o&&l)for(var er=r.overlays,Ke=0;Ke=0){mr._fullLayout._deactivateShape(mr);return}var Mr=mr._fullLayout.clickmode;if(X5(mr),er===2&&!f&&yr(),u)Mr.indexOf("select")>-1&&SJ(Ke,mr,g,y,r.id,de),Mr.indexOf("event")>-1&&mJ.click(mr,Ke,r.id);else if(er===1&&f){var gr=o?h:v,dr=o==="s"||l==="w"?0:1,Tr=gr._name+".range["+dr+"]",Pr=LJ(gr,dr),Ur="left",sr="middle";if(gr.fixedrange)return;o?(sr=o==="n"?"top":"bottom",gr.side==="right"&&(Ur="right")):l==="e"&&(Ur="right"),mr._context.showAxisRangeEntryBoxes&&j5.select(fe).call(gJ.makeEditable,{gd:mr,immediate:!0,background:mr._fullLayout.paper_bgcolor,text:String(Pr),fill:gr.tickfont?gr.tickfont.color:"#444",horizontalAlign:Ur,verticalAlign:sr}).on("edit",function(_e){var ke=gr.d2r(_e);ke!==void 0&&Cg.call("_guiRelayout",mr,Tr,ke)})}}bJ.init(de);var Ne,Ie,Se,Xe,se,be,Te,pe,W,Q;function $(er,Ke,mr){var Mr=fe.getBoundingClientRect();Ne=Ke-Mr.left,Ie=mr-Mr.top,e._fullLayout._calcInverseTransform(e);var gr=Eo.apply3DTransform(e._fullLayout._invTransform)(Ne,Ie);Ne=gr[0],Ie=gr[1],Se={l:Ne,r:Ne,w:0,t:Ie,b:Ie,h:0},Xe=e._hmpixcount?e._hmlumcount/e._hmpixcount:dJ(e._fullLayout.plot_bgcolor).getLuminance(),se="M0,0H"+b+"V"+_+"H0V0",be=!1,Te="xy",Q=!1,pe=$C(s,Xe,x,M,se),W=KC(s,x,M)}function Me(er,Ke){if(e._transitioningWithDuration)return!1;var mr=Math.max(0,Math.min(b,re*er+Ne)),Mr=Math.max(0,Math.min(_,ne*Ke+Ie)),gr=Math.abs(mr-Ne),dr=Math.abs(Mr-Ie);Se.l=Math.min(Ne,mr),Se.r=Math.max(Ne,mr),Se.t=Math.min(Ie,Mr),Se.b=Math.max(Ie,Mr);function Tr(){Te="",Se.r=Se.l,Se.t=Se.b,W.attr("d","M0,0Z")}if(A.isSubplotConstrained)gr>hi||dr>hi?(Te="xy",gr/b>dr/_?(dr=gr*_/b,Ie>Mr?Se.t=Ie-dr:Se.b=Ie+dr):(gr=dr*b/_,Ne>mr?Se.l=Ne-gr:Se.r=Ne+gr),W.attr("d",qg(Se))):Tr();else if(S.isSubplotConstrained)if(gr>hi||dr>hi){Te="xy";var Pr=Math.min(Se.l/b,(_-Se.b)/_),Ur=Math.max(Se.r/b,(_-Se.t)/_);Se.l=Pr*b,Se.r=Ur*b,Se.b=(1-Pr)*_,Se.t=(1-Ur)*_,W.attr("d",qg(Se))}else Tr();else!D||dr0){var _e;if(S.isSubplotConstrained||!k&&D.length===1){for(_e=0;_e1&&(Tr.maxallowed!==void 0&&F===(Tr.range[0]1&&(Pr.maxallowed!==void 0&&O===(Pr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function DJ(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function $C(e,r,t,n,a){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",ZC(t,n)).attr("d",a+"Z")}function KC(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:HC.background,stroke:HC.defaultLine,"stroke-width":1,opacity:0}).attr("transform",ZC(r,t)).attr("d","M0,0Z")}function QC(e,r,t,n,a,i){e.attr("d",n+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),eL(e,r,a,i)}function eL(e,r,t,n){t||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function X5(e){j5.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rL(e){UC&&e.data&&e._context.showTips&&(Eo.notifier(Eo._(e,"Double-click to zoom back out"),"long"),UC=!1)}function EJ(e,r){return"M"+(e.l-.5)+","+(r-hi-.5)+"h-3v"+(2*hi+1)+"h3ZM"+(e.r+.5)+","+(r-hi-.5)+"h3v"+(2*hi+1)+"h-3Z"}function PJ(e,r){return"M"+(r-hi-.5)+","+(e.t-.5)+"v-3h"+(2*hi+1)+"v3ZM"+(r-hi-.5)+","+(e.b+.5)+"v3h"+(2*hi+1)+"v-3Z"}function qg(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,hi)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function VC(e,r,t,n,a){for(var i=!1,o={},l={},s,u,f,v,h=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m{"use strict";var RJ=kt(),Dg=ss(),zJ=To(),NJ=Ku(),_l=aL().makeDragBox,wa=Pa().DRAGGERSIZE;Eg.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){RJ.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var n=Object.keys(t._plots||{}).sort(function(i,o){if((t._plots[i].mainplot&&!0)===(t._plots[o].mainplot&&!0)){var l=i.split("y"),s=o.split("y");return l[0]===s[0]?Number(l[1]||1)-Number(s[1]||1):Number(l[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});n.forEach(function(i){var o=t._plots[i],l=o.xaxis,s=o.yaxis;if(!o.mainplot){var u=_l(r,o,l._offset,s._offset,l._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&Dg.hover(r,h,i)},Dg.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,zJ.unhover(r,h))},r._context.showAxisDragHandles&&(_l(r,o,l._offset-wa,s._offset-wa,wa,wa,"n","w"),_l(r,o,l._offset+l._length,s._offset-wa,wa,wa,"n","e"),_l(r,o,l._offset-wa,s._offset+s._length,wa,wa,"s","w"),_l(r,o,l._offset+l._length,s._offset+s._length,wa,wa,"s","e"))}if(r._context.showAxisDragHandles){if(i===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=wa),_l(r,o,l._offset+l._length*.1,f,l._length*.8,wa,"","ew"),_l(r,o,l._offset,f,l._length*.1,wa,"","w"),_l(r,o,l._offset+l._length*.9,f,l._length*.1,wa,"","e")}if(i===s._mainSubplot){var v=s._mainLinePosition;s.side!=="right"&&(v-=wa),_l(r,o,v,s._offset+s._length*.1,wa,s._length*.8,"ns",""),_l(r,o,v,s._offset+s._length*.9,wa,s._length*.1,"s",""),_l(r,o,v,s._offset,wa,s._length*.1,"n","")}}});var a=t._hoverlayer.node();a.onmousemove=function(i){i.target=r._fullLayout._lasthover,Dg.hover(r,i,t._hoversubplot)},a.onclick=function(i){i.target=r._fullLayout._lasthover,Dg.click(r,i)},a.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Eg.updateFx(r)}};Eg.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";NJ(r._draggers,t)}});var lL=te((ace,oL)=>{"use strict";var iL=dt();oL.exports=function(r){for(var t=iL.layoutArrayContainers,n=iL.layoutArrayRegexes,a=r.split("[")[0],i,o,l=0;l{"use strict";var FJ=Gs(),K5=dd(),th=Pu(),IJ=Wy().sorterAsc,Q5=dt();nh.containerArrayMatch=lL();var HJ=nh.isAddVal=function(r){return r==="add"||FJ(r)},sL=nh.isRemoveVal=function(r){return r===null||r==="remove"};nh.applyContainerArrayChanges=function(r,t,n,a,i){var o=t.astr,l=Q5.getComponentMethod(o,"supplyLayoutDefaults"),s=Q5.getComponentMethod(o,"draw"),u=Q5.getComponentMethod(o,"drawOne"),f=a.replot||a.recalc||l===K5||s===K5,v=r.layout,h=r._fullLayout;if(n[""]){Object.keys(n).length>1&&th.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(sL(d))t.set(null);else if(Array.isArray(d))t.set(d);else return th.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(l(v,h),s(r),!0)}var m=Object.keys(n).map(Number).sort(IJ),g=t.get(),y=g||[],x=i(h,o).get(),M=[],b=-1,_=y.length,A,S,k,D,z,F,O,G;for(A=0;Ay.length-(O?0:1)){th.warn("index out of range",o,k);continue}if(F!==void 0)z.length>1&&th.warn("Insertion & removal are incompatible with edits to the same index.",o,k),sL(F)?M.push(k):O?(F==="add"&&(F={}),y.splice(k,0,F),x&&x.splice(k,0,{})):th.warn("Unrecognized full object edit value",o,k,F),b===-1&&(b=k);else for(S=0;S=0;A--)y.splice(M[A],1),x&&x.splice(M[A],1);if(y.length?g||t.set(y):t.set(null),f)return!1;if(l(v,h),u!==K5){var B;if(b===-1)B=m;else{for(_=Math.max(y.length,_),B=[],A=0;A=b));A++)B.push(k);for(A=b;A<_;A++)B.push(A)}for(A=0;A{"use strict";var hL=Bt(),oce=Fy(),dL=dt(),Fi=pr(),ah=ua(),pL=ya(),gL=zt(),ih=pL.cleanId,BJ=pL.getFromTrace,eb=dL.traceIs;xl.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Fi.log("Clearing previous rejected promises from queue."),e._promises=[]};xl.cleanLayout=function(e){var r,t;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=(ah.subplotsRegistry.cartesian||{}).attrRegex,a=(ah.subplotsRegistry.polar||{}).attrRegex,i=(ah.subplotsRegistry.ternary||{}).attrRegex,o=(ah.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(y.x=1.02,y.xanchor="left"):y.x<-2&&(y.x=-.02,y.xanchor="right"),y.y>3?(y.y=1.02,y.yanchor="bottom"):y.y<-2&&(y.y=-.02,y.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),gL.clean(e),e.template&&e.template.layout&&xl.cleanLayout(e.template.layout),e};function cv(e,r){var t=e[r],n=r.charAt(0);t&&t!=="paper"&&(e[r]=ih(t,n,!0))}xl.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}xl.hasParent=function(e,r){for(var t=vL(r);t;){if(t in e)return!0;t=vL(t)}return!1};var YJ=["x","y","z"];xl.clearAxisTypes=function(e,r,t){for(var n=0;n{"use strict";var Ng=kt(),GJ=Bt(),VJ=i2(),Rr=pr(),bn=Rr.nestedProperty,nb=v1(),di=$w(),Po=dt(),Yg=z0(),ft=ua(),ai=Cn(),WJ=k3(),ZJ=pl(),rb=ln(),XJ=zt(),jJ=$5().initInteractions,JJ=lc(),$J=nu().clearOutline,wL=Kf().dfltConfig,Rg=uL(),na=mL(),rn=hg(),af=_o(),KJ=Pa().AX_NAME_PATTERN,tb=0,yL=5;function QJ(e,r,t,n){var a;if(e=Rr.getGraphDiv(e),nb.init(e),Rr.isPlainObject(r)){var i=r;r=i.data,t=i.layout,n=i.config,a=i.frames}var o=nb.triggerHandler(e,"plotly_beforeplot",[r,t,n]);if(o===!1)return Promise.reject();!r&&!t&&!Rr.isPlotDiv(e)&&Rr.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(a)return Vt.addFrames(e,a)}AL(e,n),t||(t={}),Ng.select(e).classed("js-plotly-plot",!0),rb.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(na.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=na.cleanLayout(t)),ft.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(x$(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),rb.initGradients(e),rb.initPatterns(e),s&&ai.saveShowSpikeInitial(e);var v=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;v&&ft.doCalcdata(e);for(var h=0;h=e.data.length||a<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(a,n+1)>-1||a>=0&&r.indexOf(-e.data.length+a)>-1||a<0&&r.indexOf(e.data.length+a)>-1)throw new Error("each index in "+t+" must be unique.")}}function TL(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),Ig(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&Ig(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function a$(e,r,t){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),n=0;n=0&&f=0&&f0&&typeof D.parts[O]!="string";)O--;var G=D.parts[O],B=D.parts[O-1]+"."+G,X=D.parts.slice(0,O).join("."),V=bn(e.layout,X).get(),re=bn(n,X).get(),ne=D.get();if(z!==void 0){x[k]=z,M[k]=G==="reverse"?z:au(ne);var K=Yg.getLayoutValObject(n,D.parts);if(K&&K.impliedEdits&&z!==null)for(var ee in K.impliedEdits)b(Rr.relativeAttr(k,ee),K.impliedEdits[ee]);if(["width","height"].indexOf(k)!==-1)if(z){b("autosize",null);var fe=k==="height"?"width":"height";b(fe,n[fe])}else n[k]=e._initialAutoSize[k];else if(k==="autosize")b("width",z?null:n.width),b("height",z?null:n.height);else if(B.match(RL))S(B),bn(n,X+"._inputRange").set(null);else if(B.match(zL)){S(B),bn(n,X+"._inputRange").set(null);var de=bn(n,X).get();de._inputDomain&&(de._input.domain=de._inputDomain.slice())}else B.match(NL)&&bn(n,X+"._inputDomain").set(null);if(G==="type"){A=V;var qe=re.type==="linear"&&z==="log",Be=re.type==="log"&&z==="linear";if(qe||Be){if(!A||!A.range)b(X+".autorange",!0);else if(re.autorange)qe&&(A.range=A.range[1]>A.range[0]?[1,2]:[2,1]);else{var Ne=A.range[0],Ie=A.range[1];qe?(Ne<=0&&Ie<=0&&b(X+".autorange",!0),Ne<=0?Ne=Ie/1e6:Ie<=0&&(Ie=Ne/1e6),b(X+".range[0]",Math.log(Ne)/Math.LN10),b(X+".range[1]",Math.log(Ie)/Math.LN10)):(b(X+".range[0]",Math.pow(10,Ne)),b(X+".range[1]",Math.pow(10,Ie)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[D.parts[0]]&&D.parts[1]==="radialaxis"&&delete n[D.parts[0]]._subplot.viewInitial["radialaxis.range"],Po.getComponentMethod("annotations","convertCoords")(e,re,z,b),Po.getComponentMethod("images","convertCoords")(e,re,z,b)}else b(X+".autorange",!0),b(X+".range",null);bn(n,X+"._inputRange").set(null)}else if(G.match(KJ)){var Se=bn(n,k).get(),Xe=(z||{}).type;(!Xe||Xe==="-")&&(Xe="linear"),Po.getComponentMethod("annotations","convertCoords")(e,Se,Xe,b),Po.getComponentMethod("images","convertCoords")(e,Se,Xe,b)}var se=Rg.containerArrayMatch(k);if(se){f=se.array,v=se.index;var be=se.property,Te=K||{editType:"calc"};v!==""&&be===""&&(Rg.isAddVal(z)?M[k]=null:Rg.isRemoveVal(z)?M[k]=(bn(t,f).get()||[])[v]:Rr.warn("unrecognized full object value",r)),af.update(y,Te),u[f]||(u[f]={});var pe=u[f][v];pe||(pe=u[f][v]={}),pe[be]=z,delete r[k]}else G==="reverse"?(V.range?V.range.reverse():(b(X+".autorange",!0),V.range=[1,0]),re.autorange?y.calc=!0:y.plot=!0):(k==="dragmode"&&(z===!1&&ne!==!1||z!==!1&&ne===!1)||n._has("scatter-like")&&n._has("regl")&&k==="dragmode"&&(z==="lasso"||z==="select")&&!(ne==="lasso"||ne==="select")?y.plot=!0:K?af.update(y,K):y.calc=!0,D.set(z))}}for(f in u){var W=Rg.applyContainerArrayChanges(e,i(t,f),u[f],y,i);W||(y.plot=!0)}for(var Q in _){A=ai.getFromId(e,Q);var $=A&&A._constraintGroup;if($){y.calc=!0;for(var Me in $)_[Me]||(ai.getFromId(e,Me)._constraintShrinkable=!0)}}(IL(e)||r.height||r.width)&&(y.plot=!0);var Fe=n.shapes;for(v=0;v1;)if(n.pop(),t=bn(r,n.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function f$(e,r){for(var t=0;t=a.length?a[0]:a[u]:a}function l(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var v=0;return function(){if(u&&++v===f)return u()}}return new Promise(function(u,f){function v(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var G=n._frameQueue.pop();G.onInterrupt&&G.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(G){if(G.length!==0){for(var B=0;Bn._timeToNext&&m()};G()}var y=0;function x(G){return Array.isArray(a)?y>=a.length?G.transitionOpts=a[y]:G.transitionOpts=a[0]:G.transitionOpts=a,y++,G}var M,b,_=[],A=r==null,S=Array.isArray(r),k=!A&&!S&&Rr.isPlainObject(r);if(k)_.push({type:"object",data:x(Rr.extendFlat({},r))});else if(A||["string","number"].indexOf(typeof r)!==-1)for(M=0;M0&&F<_.length-1){var O=[];for(M=0;M<_.length;M++)b=_[M],(_[M].type!=="byname"||M>F)&&O.push(b);_=O}}_.length>0?h(_):(e.emit("plotly_animated"),u())})}function m$(e,r,t){if(e=Rr.getGraphDiv(e),r==null)return Promise.resolve();if(!Rr.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,a,i,o,l=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=l.length+r.length*2,f=[],v={};for(n=r.length-1;n>=0;n--)if(Rr.isPlainObject(r[n])){var h=r[n].name,d=(s[h]||v[h]||{}).name,m=r[n].name,g=s[d]||v[d];d&&m&&typeof m=="number"&&g&&tbD.index?-1:k.index=0;n--){if(a=f[n].frame,typeof a.name=="number"&&Rr.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;s[a.name="frame "+e._transitionData._counter++];);if(s[a.name]){for(i=0;i=0;t--)n=r[t],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var l=ft.modifyFrames,s=ft.modifyFrames,u=[e,o],f=[e,i];return di&&di.add(e,l,u,s,f),ft.modifyFrames(e,i)}function b$(e){e=Rr.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return ft.cleanPlot([],{},t,r),ft.purge(e),nb.purge(e),r._container&&r._container.remove(),delete e._context,e}function _$(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!Rr.equalDomRects(t,r._lastBBox)){var n=r._invTransform=Rr.inverseTransformMatrix(Rr.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),r._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),r._lastBBox=t}}function x$(e){var r=Ng.select(e),t=e._fullLayout;if(t._calcInverseTransform=_$,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var n={};Ng.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),t._uid=Rr.randstr(n)}t._paperdiv.selectAll(".main-svg").attr(JJ.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var a=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=a.append("g").classed("imagelayer",!0),t._shapeLowerLayer=a.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Vt.animate=g$;Vt.addFrames=m$;Vt.deleteFrames=y$;Vt.addTraces=qL;Vt.deleteTraces=DL;Vt.extendTraces=CL;Vt.moveTraces=ab;Vt.prependTraces=LL;Vt.newPlot=n$;Vt._doPlot=QJ;Vt.purge=b$;Vt.react=h$;Vt.redraw=t$;Vt.relayout=oh;Vt.restyle=Hg;Vt.setPlotConfig=e$;Vt.update=Og;Vt._guiRelayout=ob(oh);Vt._guiRestyle=ob(Hg);Vt._guiUpdate=ob(Og);Vt._storeDirectGUIEdit=l$});var Sc=te(cs=>{"use strict";var w$=dt();cs.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};cs.getRedrawFunc=function(e){return function(){w$.getComponentMethod("colorbar","draw")(e)}};cs.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};cs.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var HL=window.URL||window.webkitURL;cs.createObjectURL=function(e){return HL.createObjectURL(e)};cs.revokeObjectURL=function(e){return HL.revokeObjectURL(e)};cs.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=M$(window.atob(e));return new window.Blob([t],{type:"image/"+r})};cs.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function M$(e){for(var r=e.length,t=new ArrayBuffer(r),n=new Uint8Array(t),a=0;a{"use strict";var ub=kt(),fce=pr(),A$=ln(),T$=zt(),cce=lc(),sb=/"/g,sh="TOBESTRIPPED",k$=new RegExp('("'+sh+")|("+sh+'")',"g");function S$(e){var r=ub.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":r.html(n).text()});return r.remove(),t}function C$(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}BL.exports=function(r,t,n){var a=r._fullLayout,i=a._paper,o=a._toppaper,l=a.width,s=a.height,u;i.insert("rect",":first-child").call(A$.setRect,0,0,l,s).call(T$.fill,a.paper_bgcolor);var f=a._basePlotModules||[];for(u=0;u{"use strict";var L$=pr(),q$=Fd().EventEmitter,uh=Sc();function D$(e){var r=e.emitter||new q$,t=new Promise(function(n,a){var i=window.Image,o=e.svg,l=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,v=e.height||150,h=u*f,d=u*v,m=s.getContext("2d",{willReadFrequently:!0}),g=new i,y,x;l==="svg"||L$.isSafari()?x=uh.encodeSVG(o):(y=uh.createBlob(o,"svg"),x=uh.createObjectURL(y)),s.width=h,s.height=d,g.onload=function(){var M;switch(y=null,uh.revokeObjectURL(x),l!=="svg"&&m.drawImage(g,0,0,h,d),l){case"jpeg":M=s.toDataURL("image/jpeg");break;case"png":M=s.toDataURL("image/png");break;case"webp":M=s.toDataURL("image/webp");break;case"svg":M=x;break;default:var b="Image format is not jpeg, png, svg or webp.";if(a(new Error(b)),!e.promise)return r.emit("error",b)}n(M),e.promise||r.emit("success",M)},g.onerror=function(M){if(y=null,uh.revokeObjectURL(x),a(M),!e.promise)return r.emit("error",M)},g.src=x});return e.promise?t:r}OL.exports=D$});var cb=te((dce,GL)=>{"use strict";var UL=Bt(),YL=lb(),E$=ua(),vs=pr(),fh=Sc(),P$=Vg(),R$=Wg(),z$=Jh().version,fb={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 N$(e,r){r=r||{};var t,n,a,i;vs.isPlainObject(e)?(t=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=vs.getGraphDiv(e),t=vs.extendDeep([],e.data),n=vs.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(S){return!(S in r)||vs.validate(r[S],fb[S])}if(!o("width")&&r.width!==null||!o("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+vs.join2(fb.format.values,", "," or ")+".");var l={};function s(S,k){return vs.coerce(r,l,fb,S,k)}var u=s("format"),f=s("width"),v=s("height"),h=s("scale"),d=s("setBackground"),m=s("imageDataOnly"),g=document.createElement("div");g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);var y=vs.extendFlat({},n);f?y.width=f:r.width===null&&UL(i.width)&&(y.width=i.width),v?y.height=v:r.height===null&&UL(i.height)&&(y.height=i.height);var x=vs.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),M=fh.getRedrawFunc(g);function b(){return new Promise(function(S){setTimeout(S,fh.getDelay(g._fullLayout))})}function _(){return new Promise(function(S,k){var D=P$(g,u,h),z=g._fullLayout.width,F=g._fullLayout.height;function O(){YL.purge(g),document.body.removeChild(g)}if(u==="full-json"){var G=E$.graphJson(g,!1,"keepdata","object",!0,!0);return G.version=z$,G=JSON.stringify(G),O(),S(m?G:fh.encodeJSON(G))}if(O(),u==="svg")return S(m?D:fh.encodeSVG(D));var B=document.createElement("canvas");B.id=vs.randstr(),R$({format:u,width:z,height:F,scale:h,canvas:B,svg:D,promise:!0}).then(S).catch(k)})}function A(S){return m?S.replace(fh.IMAGE_URL_PREFIX,""):S}return new Promise(function(S,k){YL.newPlot(g,t,y,x).then(M).then(b).then(_).then(function(D){S(A(D))}).catch(function(D){k(D)})})}GL.exports=N$});var XL=te((pce,ZL)=>{"use strict";var Ro=pr(),F$=ua(),I$=z0(),H$=Kf().dfltConfig,wl=Ro.isPlainObject,Lc=Array.isArray,VL=Ro.isArrayOrTypedArray;ZL.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var n=I$.get(),a=[],i={_context:Ro.extendFlat({},H$)},o,l;Lc(r)?(i.data=Ro.extendDeep([],r),o=r):(i.data=[],o=[],a.push(Ma("array","data"))),wl(t)?(i.layout=Ro.extendDeep({},t),l=t):(i.layout={},l={},arguments.length>1&&a.push(Ma("object","layout"))),F$.supplyDefaults(i);for(var s=i._fullData,u=o.length,f=0;fv.length&&n.push(Ma("unused",a,u.concat(v.length)));var x=v.length,M=Array.isArray(y);M&&(x=Math.min(x,y.length));var b,_,A,S,k;if(h.dimensions===2)for(_=0;_v[_].length&&n.push(Ma("unused",a,u.concat(_,v[_].length)));var D=v[_].length;for(b=0;b<(M?Math.min(D,y[_].length):D);b++)A=M?y[_][b]:y,S=f[_][b],k=v[_][b],Ro.validate(S,A)?k!==S&&k!==+S&&n.push(Ma("dynamic",a,u.concat(_,b),S,k)):n.push(Ma("value",a,u.concat(_,b),S))}else n.push(Ma("array",a,u.concat(_),f[_]));else for(_=0;_{"use strict";var W$=pr(),Xg=Sc();function Z$(e,r,t){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,l){var s,u;if(a)return s=Xg.createBlob(e,t),u=Xg.createObjectURL(s),n.href=u,n.download=r,document.body.appendChild(n),n.click(),document.body.removeChild(n),Xg.revokeObjectURL(u),s=null,o(r);if(W$.isSafari()){var f=t==="svg"?",":";base64,";return Xg.octetStream(f+encodeURIComponent(e)),o(r)}l(new Error("download error"))});return i}jL.exports=Z$});var vb=te((yce,KL)=>{"use strict";var $L=pr(),X$=cb(),j$=JL(),mce=Sc();function J$(e,r){var t;return $L.isPlainObject(e)||(t=$L.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(n,a){t&&t._snapshotInProgress&&a(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=X$(e,r),o=r.filename||e.fn||"newplot";o+="."+r.format.replace("-","."),i.then(function(l){return t&&(t._snapshotInProgress=!1),j$(l,o,r.format)}).then(function(l){n(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),a(l)})})}KL.exports=J$});var nq=te(hb=>{"use strict";var Ii=pr(),Hi=Ii.isPlainObject,QL=z0(),eq=ua(),$$=bo(),rq=_n(),tq=Kf().dfltConfig;hb.makeTemplate=function(e){e=Ii.isPlainObject(e)?e:Ii.getGraphDiv(e),e=Ii.extendDeep({_context:tq},{data:e.data,layout:e.layout}),eq.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var n={data:{},layout:{}};r.forEach(function(d){var m={};ch(d,m,Q$.bind(null,d));var g=Ii.coerce(d,{},$$,"type"),y=n.data[g];y||(y=n.data[g]=[]),y.push(m)}),ch(t,n.layout,K$.bind(null,t)),delete n.layout.template;var a=t.template;if(Hi(a)){var i=a.layout,o,l,s,u,f,v;Hi(i)&&jg(i,n.layout);var h=a.data;if(Hi(h)){for(l in n.data)if(s=h[l],Array.isArray(s)){for(f=n.data[l],v=f.length,u=s.length,o=0;ox?o.push({code:"unused",traceType:d,templateCount:y,dataCount:x}):x>y&&o.push({code:"reused",traceType:d,templateCount:y,dataCount:x})}}function M(b,_){for(var A in b)if(A.charAt(0)!=="_"){var S=b[A],k=zo(b,A,_);Hi(S)?(Array.isArray(b)&&S._template===!1&&S.templateitemname&&o.push({code:"missing",path:k,templateitemname:S.templateitemname}),M(S,k)):Array.isArray(S)&&eK(S)&&M(S,k)}}if(M({data:s,layout:l},""),o.length)return o.map(rK)};function eK(e){for(var r=0;r{"use strict";var ca=lb();kn._doPlot=ca._doPlot;kn.newPlot=ca.newPlot;kn.restyle=ca.restyle;kn.relayout=ca.relayout;kn.redraw=ca.redraw;kn.update=ca.update;kn._guiRestyle=ca._guiRestyle;kn._guiRelayout=ca._guiRelayout;kn._guiUpdate=ca._guiUpdate;kn._storeDirectGUIEdit=ca._storeDirectGUIEdit;kn.react=ca.react;kn.extendTraces=ca.extendTraces;kn.prependTraces=ca.prependTraces;kn.addTraces=ca.addTraces;kn.deleteTraces=ca.deleteTraces;kn.moveTraces=ca.moveTraces;kn.purge=ca.purge;kn.addFrames=ca.addFrames;kn.deleteFrames=ca.deleteFrames;kn.animate=ca.animate;kn.setPlotConfig=ca.setPlotConfig;var tK=a1().getGraphDiv,nK=og().eraseActiveShape;kn.deleteActiveShape=function(e){return nK(tK(e))};kn.toImage=cb();kn.validate=XL();kn.downloadImage=vb();var aq=nq();kn.makeTemplate=aq.makeTemplate;kn.validateTemplate=aq.validateTemplate});var lq=te((xce,oq)=>{"use strict";var db=pr(),aK=dt();oq.exports=function(r,t,n,a){var i=a("x"),o=a("y"),l,s=aK.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],n),i){var u=db.minRowLength(i);o?l=Math.min(u,db.minRowLength(o)):(l=u,a("y0"),a("dy"))}else{if(!o)return 0;l=db.minRowLength(o),a("x0"),a("dx")}return t._length=l,l}});var cq=te((wce,fq)=>{"use strict";var sq=pr().dateTick0,iK=En(),oK=iK.ONEWEEK;function uq(e,r){return e%oK===0?sq(r,1):sq(r,0)}fq.exports=function(r,t,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",uq(o,t.xcalendar)),a("xperiodalignment"))}if(i.y){var l=a("yperiod");l&&(a("yperiod0",uq(l,t.ycalendar)),a("yperiodalignment"))}}});var dq=te((Mce,hq)=>{"use strict";var vq=["orientation","groupnorm","stackgaps"];hq.exports=function(r,t,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var u=s[o],f=!1;u?u.traces.push(t):(u=s[o]={traceIndices:[],traces:[t]},f=!0);for(var v={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var pq=zt(),gq=es().hasColorscale,mq=B0(),lK=Qa();yq.exports=function(r,t,n,a,i,o){var l=lK.isBubble(r),s=(r.line||{}).color,u;if(o=o||{},s&&(n=s),i("marker.symbol"),i("marker.opacity",l?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),gq(r,"marker")&&mq(r,t,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:l?u=pq.background:u=pq.defaultLine,i("marker.line.color",u),gq(r,"marker.line")&&mq(r,t,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",l?1:0)),l&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var gb=te((Tce,bq)=>{"use strict";var sK=pr().isArrayOrTypedArray,uK=es().hasColorscale,fK=B0();bq.exports=function(r,t,n,a,i,o){o||(o={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),i("line.color",n),uK(r,"line"))fK(r,t,a,i,{prefix:"line.",cLetter:"c"});else{var s=(sK(l)?!1:l)||n;i("line.color",s)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var xq=te((kce,_q)=>{"use strict";_q.exports=function(r,t,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var mb=te((Sce,wq)=>{"use strict";var cK=pr();wq.exports=function(e,r,t,n,a){a=a||{},n("textposition"),cK.coerceFont(n,"textfont",a.font||t.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var yb=te((Cce,Aq)=>{"use strict";var $g=zt(),Mq=pr().isArrayOrTypedArray;function vK(e){for(var r=$g.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var Tq=pr(),hK=dt(),dK=kc(),pK=Ag(),vv=Qa(),gK=lq(),mK=cq(),yK=dq(),bK=pb(),_K=gb(),kq=xq(),xK=mb(),wK=yb(),MK=pr().coercePattern;Sq.exports=function(r,t,n,a){function i(d,m){return Tq.coerce(r,t,dK,d,m)}var o=gK(r,t,a,i);if(o||(t.visible=!1),!!t.visible){mK(r,t,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var l=yK(r,t,a,i);a.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!l&&o{"use strict";var AK=F1().getAxisGroup;Lq.exports=function(r,t,n,a,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=AK(n,l)+o,u=n._alignmentOpts||{},f=a("alignmentgroup"),v=u[s];v||(v=u[s]={});var h=v[f];h?h.traces.push(t):h=v[f]={traces:[t],alignmentIndex:Object.keys(v).length,offsetGroups:{}};var d=a("offsetgroup")||"",m=h.offsetGroups,g=m[d];t._offsetIndex=0,(i!=="group"||d)&&(g||(g=m[d]={offsetIndex:Object.keys(m).length}),t._offsetIndex=g.offsetIndex)}});var Eq=te((Dce,Dq)=>{"use strict";var TK=pr(),kK=qq(),SK=kc();Dq.exports=function(r,t){var n,a,i,o=t.scattermode;function l(h){return TK.coerce(a._input,a,SK,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var v=r[f];if(v.type==="scatter"&&v.xaxis===s.xaxis&&v.yaxis===s.yaxis){v.opacity=void 0;break}}}}}});var Rq=te((Ece,Pq)=>{"use strict";var CK=pr(),LK=Ud();Pq.exports=function(e,r){function t(a,i){return CK.coerce(e,r,LK,a,i)}var n=r.barmode==="group";r.scattermode==="group"&&t("scattergap",n?r.bargap:.2)}});var Fq=te((Pce,Nq)=>{"use strict";var qK=Bt(),zq=pr(),DK=zq.dateTime2ms,Kg=zq.incrementMonth,EK=En(),PK=EK.ONEAVGMONTH;Nq.exports=function(r,t,n,a){if(t.type!=="date")return{vals:a};var i=r[n+"periodalignment"];if(!i)return{vals:a};var o=r[n+"period"],l;if(qK(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:a}}for(var u=t.calendar,f=i==="start",v=i==="end",h=r[n+"period0"],d=DK(h,u)||0,m=[],g=[],y=[],x=a.length,M=0;Mb;)S=Kg(S,-l,u);for(;S<=b;)S=Kg(S,l,u);A=Kg(S,-l,u)}else{for(_=Math.round((b-d)/o),S=d+_*o;S>b;)S-=o;for(;S<=b;)S+=o;A=S-o}m[M]=f?A:v?S:(A+S)/2,g[M]=A,y[M]=S}return{vals:m,starts:g,ends:y}}});var xb=te((Rce,Hq)=>{"use strict";var bb=es().hasColorscale,_b=Qd(),Iq=Qa();Hq.exports=function(r,t){Iq.hasLines(t)&&bb(t,"line")&&_b(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),Iq.hasMarkers(t)&&(bb(t,"marker")&&_b(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),bb(t,"marker.line")&&_b(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var vh=te((zce,Bq)=>{"use strict";var Un=pr();Bq.exports=function(r,t){for(var n=0;n{"use strict";var Oq=pr();Uq.exports=function(r,t){Oq.isArrayOrTypedArray(t.selectedpoints)&&Oq.tagSelected(r,t)}});var em=te((Fce,jq)=>{"use strict";var Yq=Bt(),Mb=pr(),hh=Cn(),Gq=Fq(),wb=En().BADNUM,Ab=Qa(),RK=xb(),zK=vh(),NK=Qg();function FK(e,r){var t=e._fullLayout,n=r._xA=hh.getFromId(e,r.xaxis||"x","x"),a=r._yA=hh.getFromId(e,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),l=Gq(r,n,"x",i),s=Gq(r,a,"y",o),u=l.vals,f=s.vals,v=r._length,h=new Array(v),d=r.ids,m=Tb(r,t,n,a),g=!1,y,x,M,b,_,A;Zq(t,r);var S="x",k="y",D;if(m)Mb.pushUnique(m.traceIndices,r.index),y=m.orientation==="v",y?(k="s",D="x"):(S="s",D="y"),_=m.stackgaps==="interpolate";else{var z=Wq(r,v);Vq(e,r,n,a,u,f,z)}var F=!!r.xperiodalignment,O=!!r.yperiodalignment;for(x=0;xx&&h[b].gap;)b--;for(A=h[b].s,M=h.length-1;M>b;M--)h[M].s=A;for(;x{"use strict";Jq.exports=rm;var IK=pr().distinctVals;function rm(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,n=r.posAxis._id.charAt(0),a=[],i=0;i{"use strict";var No=Bt(),of=pr().isArrayOrTypedArray,hv=En().BADNUM,HK=dt(),dh=Cn(),BK=F1().getAxisGroup,tm=$q();function OK(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;us+o||!No(l))}for(var f=0;f{"use strict";var nD=em(),aD=tD().setGroupPositions;function QK(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;uz[f]&&f{"use strict";var rQ=ln(),fD=En(),ph=fD.BADNUM,cD=fD.LOG_CLIP,lD=cD+.5,sD=cD-.5,nm=pr(),tQ=nm.segmentsIntersect,uD=nm.constrain,Db=Ag();vD.exports=function(r,t){var n=t.trace||{},a=t.xaxis,i=t.yaxis,o=a.type==="log",l=i.type==="log",s=a._length,u=i._length,f=t.backoff,v=n.marker,h=t.connectGaps,d=t.baseTolerance,m=t.shape,g=m==="linear",y=n.fill&&n.fill!=="none",x=[],M=Db.minTolerance,b=r.length,_=new Array(b),A=0,S,k,D,z,F,O,G,B,X,V,re,ne,K,ee,fe,de;function qe(sr){var _e=r[sr];if(!_e)return!1;var ke=t.linearized?a.l2p(_e.x):a.c2p(_e.x),$e=t.linearized?i.l2p(_e.y):i.c2p(_e.y);if(ke===ph){if(o&&(ke=a.c2p(_e.x,!0)),ke===ph)return!1;l&&$e===ph&&(ke*=Math.abs(a._m*u*(a._m>0?lD:sD)/(i._m*s*(i._m>0?lD:sD)))),ke*=1e3}if($e===ph){if(l&&($e=i.c2p(_e.y,!0)),$e===ph)return!1;$e*=1e3}return[ke,$e]}function Be(sr,_e,ke,$e){var We=ke-sr,qr=$e-_e,Vr=.5-sr,Hr=.5-_e,lt=We*We+qr*qr,xt=We*Vr+qr*Hr;if(xt>0&&xt1||Math.abs(Vr.y-ke[0][1])>1)&&(Vr=[Vr.x,Vr.y],$e&&Xe(Vr,sr)Te||sr[1]W)return[uD(sr[0],be,Te),uD(sr[1],pe,W)]}function lr(sr,_e){if(sr[0]===_e[0]&&(sr[0]===be||sr[0]===Te)||sr[1]===_e[1]&&(sr[1]===pe||sr[1]===W))return!0}function ir(sr,_e){var ke=[],$e=ar(sr),We=ar(_e);return $e&&We&&lr($e,We)||($e&&ke.push($e),We&&ke.push(We)),ke}function rr(sr,_e,ke){return function($e,We){var qr=ar($e),Vr=ar(We),Hr=[];if(qr&&Vr&&lr(qr,Vr))return Hr;qr&&Hr.push(qr),Vr&&Hr.push(Vr);var lt=2*nm.constrain(($e[sr]+We[sr])/2,_e,ke)-((qr||$e)[sr]+(Vr||We)[sr]);if(lt){var xt;qr&&Vr?xt=lt>0==qr[sr]>Vr[sr]?qr:Vr:xt=qr||Vr,xt[sr]+=lt}return Hr}}var Cr;m==="linear"||m==="spline"?Cr=Ze:m==="hv"||m==="vh"?Cr=ir:m==="hvh"?Cr=rr(0,be,Te):m==="vhv"&&(Cr=rr(1,pe,W));function yr(sr,_e){var ke=_e[0]-sr[0],$e=(_e[1]-sr[1])/ke,We=(sr[1]*_e[0]-_e[1]*sr[0])/ke;return We>0?[$e>0?be:Te,W]:[$e>0?Te:be,pe]}function Ae(sr){var _e=sr[0],ke=sr[1],$e=_e===_[A-1][0],We=ke===_[A-1][1];if(!($e&&We))if(A>1){var qr=_e===_[A-2][0],Vr=ke===_[A-2][1];$e&&(_e===be||_e===Te)&&qr?Vr?A--:_[A-1]=sr:We&&(ke===pe||ke===W)&&Vr?qr?A--:_[A-1]=sr:_[A++]=sr}else _[A++]=sr}function Ve(sr){_[A-1][0]!==sr[0]&&_[A-1][1]!==sr[1]&&Ae([Fe,Oe]),Ae(sr),fr=null,Fe=Oe=0}var je=nm.isArrayOrTypedArray(v);function zr(sr){if(sr&&f&&(sr.i=S,sr.d=r,sr.trace=n,sr.marker=je?v[sr.i]:v,sr.backoff=f),Ne=sr[0]/s,Ie=sr[1]/u,$=sr[0]Te?Te:0,Me=sr[1]W?W:0,$||Me){if(!A)_[A++]=[$||sr[0],Me||sr[1]];else if(fr){var _e=Cr(fr,sr);_e.length>1&&(Ve(_e[0]),_[A++]=_e[1])}else nr=Cr(_[A-1],sr)[0],_[A++]=nr;var ke=_[A-1];$&&Me&&(ke[0]!==$||ke[1]!==Me)?(fr&&(Fe!==$&&Oe!==Me?Ae(Fe&&Oe?yr(fr,sr):[Fe||$,Oe||Me]):Fe&&Oe&&Ae([Fe,Oe])),Ae([$,Me])):Fe-$&&Oe-Me&&Ae([$||Fe,Me||Oe]),fr=sr,Fe=$,Oe=Me}else fr&&Ve(Cr(fr,sr)[0]),_[A++]=sr}for(S=0;SSe(O,kr))break;D=O,K=X[0]*B[0]+X[1]*B[1],K>re?(re=K,z=O,G=!1):K=r.length||!O)break;zr(O),k=O}}fr&&Ae([Fe||fr[0],Oe||fr[1]]),x.push(_.slice(0,A))}var er=m.slice(m.length-1);if(f&&er!=="h"&&er!=="v"){for(var Ke=!1,mr=-1,Mr=[],gr=0;gr{"use strict";var dD={tonextx:1,tonexty:1,tonext:1};pD.exports=function(r,t,n){var a,i,o,l,s,u={},f=!1,v=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var Ml=kt(),nQ=dt(),gh=pr(),pv=gh.ensureSingle,yD=gh.identity,Yn=ln(),gv=Qa(),aQ=hD(),iQ=gD(),am=yg().tester;bD.exports=function(r,t,n,a,i,o){var l,s,u=!i,f=!!i&&i.duration>0,v=iQ(r,t,n);if(l=a.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),oQ(r,l,t),f){o&&(s=o());var h=Ml.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){a.selectAll("g.trace").each(function(d,m){mD(r,m,t,d,v,this,i)})})}else l.each(function(d,m){mD(r,m,t,d,v,this,i)});u&&l.exit().remove(),a.selectAll("path:not([d])").remove()};function oQ(e,r,t){r.each(function(n){var a=pv(Ml.select(this),"g","fills");Yn.setClipUrl(a,t.layerClipId,e);var i=n[0].trace,o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var l=a.selectAll("g").data(o,yD);l.enter().append("g"),l.exit().each(function(s){i[s]=null}).remove(),l.order().each(function(s){i[s]=pv(Ml.select(this),"path","js-fill")})})}function mD(e,r,t,n,a,i,o){var l=e._context.staticPlot,s;lQ(e,r,t,n,a);var u=!!o&&o.duration>0;function f(rr){return u?rr.transition():rr}var v=t.xaxis,h=t.yaxis,d=n[0].trace,m=d.line,g=Ml.select(i),y=pv(g,"g","errorbars"),x=pv(g,"g","lines"),M=pv(g,"g","points"),b=pv(g,"g","text");if(nQ.getComponentMethod("errorbars","plot")(e,y,t,o),d.visible!==!0)return;f(g).style("opacity",d.opacity);var _,A,S=d.fill.charAt(d.fill.length-1);S!=="x"&&S!=="y"&&(S="");var k,D;S==="y"?(k=1,D=h.c2p(0,!0)):S==="x"&&(k=0,D=v.c2p(0,!0)),n[0][t.isRangePlot?"nodeRangePlot3":"node3"]=g;var z="",F=[],O=d._prevtrace,G=null,B=null;O&&(z=O._prevRevpath||"",A=O._nextFill,F=O._ownPolygons,G=O._fillsegments,B=O._fillElement);var X,V,re="",ne="",K,ee,fe,de,qe,Be,Ne=[];d._polygons=[];var Ie=[],Se=[],Xe=gh.noop;if(_=d._ownFill,gv.hasLines(d)||d.fill!=="none"){A&&A.datum(n),["hv","vh","hvh","vhv"].indexOf(m.shape)!==-1?(K=Yn.steps(m.shape),ee=Yn.steps(m.shape.split("").reverse().join(""))):m.shape==="spline"?K=ee=function(rr){var Cr=rr[rr.length-1];return rr.length>1&&rr[0][0]===Cr[0]&&rr[0][1]===Cr[1]?Yn.smoothclosed(rr.slice(1),m.smoothing):Yn.smoothopen(rr,m.smoothing)}:K=ee=function(rr){return"M"+rr.join("L")},fe=function(rr){return ee(rr.reverse())},Se=aQ(n,{xaxis:v,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(m.width||1,3)/4,shape:m.shape,backoff:m.backoff,simplify:m.simplify,fill:d.fill}),Ie=new Array(Se.length);var se=0;for(s=0;s=l[0]&&g.x<=l[1]&&g.y>=s[0]&&g.y<=s[1]}),h=Math.ceil(v.length/f),d=0;a.forEach(function(g,y){var x=g[0].trace;gv.hasMarkers(x)&&x.marker.maxdisplayed>0&&y{"use strict";xD.exports={container:"marker",min:"cmin",max:"cmax"}});var MD=te((Vce,wD)=>{"use strict";var im=Cn();wD.exports=function(r,t,n){var a={},i={_fullLayout:n},o=im.getFromTrace(i,t,"x"),l=im.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),a.xLabel=im.tickText(o,o.c2l(s),!0).text,a.yLabel=im.tickText(l,l.c2l(u),!0).text,a}});var mh=te((Wce,AD)=>{"use strict";var Pb=kt(),mv=ln(),sQ=dt();function uQ(e){var r=Pb.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var n=Pb.select(this),a=t.trace||t[0].trace;Rb(n,a,e)}),r.selectAll("g.text").each(function(t){var n=Pb.select(this),a=t.trace||t[0].trace;zb(n,a,e)}),r.selectAll("g.trace path.js-line").call(mv.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(mv.fillGroupStyle,e,!1),sQ.getComponentMethod("errorbars","style")(r)}function Rb(e,r,t){mv.pointStyle(e.selectAll("path.point"),r,t)}function zb(e,r,t){mv.textPointStyle(e.selectAll("text"),r,t)}function fQ(e,r,t){var n=r[0].trace;n.selectedpoints?(mv.selectedPointStyle(t.selectAll("path.point"),n),mv.selectedTextStyle(t.selectAll("text"),n)):(Rb(t,n,e),zb(t,n,e))}AD.exports={style:uQ,stylePoints:Rb,styleText:zb,styleOnSelect:fQ}});var Nb=te((Zce,TD)=>{"use strict";var yv=zt(),cQ=Qa();TD.exports=function(r,t){var n,a;if(r.mode==="lines")return n=r.line.color,n&&yv.opacity(n)?n:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,o=t.mlcc||((r.marker||{}).line||{}).color;return a=i&&yv.opacity(i)?i:o&&yv.opacity(o)&&(t.mlw||((r.marker||{}).line||{}).width)?o:"",a?yv.opacity(a)<.3?yv.addOpacity(a,.3):a:(n=(r.line||{}).color,n&&yv.opacity(n)&&cQ.hasLines(r)&&r.line.width?n:r.fillcolor)}});var CD=te((Xce,SD)=>{"use strict";var om=pr(),kD=ss(),vQ=dt(),hQ=Nb(),Fb=zt(),dQ=om.fillText;SD.exports=function(r,t,n,a){var i=r.cd,o=i[0].trace,l=r.xa,s=r.ya,u=l.c2p(t),f=s.c2p(n),v=[u,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,m=!!o.xperiodalignment,g=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var y=function(ne){if(m){var K=l.c2p(ne.xStart),ee=l.c2p(ne.xEnd);return u>=Math.min(K,ee)&&u<=Math.max(K,ee)?0:1/0}var fe=Math.max(3,ne.mrc||0),de=1-1/fe,qe=Math.abs(l.c2p(ne.x)-u);return qe=Math.min(K,ee)&&f<=Math.max(K,ee)?0:1/0}var fe=Math.max(3,ne.mrc||0),de=1-1/fe,qe=Math.abs(s.c2p(ne.y)-f);return qeNe!=W>=Ne&&(be=Xe[Se-1][0],Te=Xe[Se][0],W-pe&&(se=be+(Te-be)*(Ne-pe)/(W-pe),fe=Math.min(fe,se),de=Math.max(de,se)));return fe=Math.max(fe,0),de=Math.min(de,l._length),{x0:fe,x1:de,y0:Ne,y1:Ne}}if(h.indexOf("fills")!==-1&&o._fillElement){var X=G(o._fillElement)&&!G(o._fillExclusionElement);if(X){var V=B(o._polygons);V===null&&(V={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var re=Fb.defaultLine;return Fb.opacity(o.fillcolor)?re=o.fillcolor:Fb.opacity((o.line||{}).color)&&(re=o.line.color),om.extendFlat(r,{distance:r.maxHoverDistance,x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1,color:re,hovertemplate:!1}),delete r.index,o.text&&!om.isArrayOrTypedArray(o.text)?r.text=String(o.text):r.text=o.name,[r]}}}});var DD=te((jce,qD)=>{"use strict";var LD=Qa();qD.exports=function(r,t){var n=r.cd,a=r.xaxis,i=r.yaxis,o=[],l=n[0].trace,s,u,f,v,h=!LD.hasMarkers(l)&&!LD.hasText(l);if(h)return[];if(t===!1)for(s=0;s{"use strict";ED.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var FD=te(($ce,ND)=>{"use strict";var yh=dt().traceIs,Ib=o3();ND.exports=function(r,t,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(pQ(t,a.data),t.type==="-"?t.type="linear":r.type=t.type)};function pQ(e,r){if(e.type==="-"){var t=e._id,n=t.charAt(0),a;t.indexOf("scene")!==-1&&(t=n);var i=gQ(r,t,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",l=i[o],s={noMultiCategory:!yh(i,"cartesian")||yh(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,zD(i,n)){var u=RD(i),f=[];for(a=0;a0&&(a["_"+t+"axes"]||{})[r])return a;if((a[t+"axis"]||t)===r){if(zD(a,t))return a;if((a[t]||[]).length||a[t+"0"])return a}}}function RD(e){return{v:"x",h:"y"}[e.orientation||"v"]}function zD(e,r){var t=RD(e),n=yh(e,"box-violin"),a=yh(e._fullInput||{},"candlestick");return n&&!a&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var HD=te((Kce,ID)=>{"use strict";var mQ=Ji().isTypedArraySpec;function yQ(e,r){var t=r.dataAttr||e._id.charAt(0),n={},a,i,o;if(r.axData)a=r.axData;else for(a=[],i=0;i0||mQ(i),l;o&&(l="array");var s=n("categoryorder",l),u;s==="array"&&(u=n("categoryarray")),!o&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=yQ(t,a).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var UD=te((Qce,OD)=>{"use strict";var BD=Jl().mix,bQ=cl(),_Q=pr();OD.exports=function(r,t,n,a){a=a||{};var i=a.dfltColor;function o(k,D){return _Q.coerce2(r,t,a.attributes,k,D)}var l=o("linecolor",i),s=o("linewidth"),u=n("showline",a.showLine||!!l||!!s);u||(delete t.linecolor,delete t.linewidth);var f=BD(i,a.bgColor,a.blend||bQ.lightFraction).toRgbString(),v=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),m=n("showgrid",a.showGrid||!!v||!!h||!!d);if(m||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),a.hasMinor){var g=BD(t.gridcolor,a.bgColor,67).toRgbString(),y=o("minor.gridcolor",g),x=o("minor.gridwidth",t.gridwidth||1),M=o("minor.griddash",t.griddash||"solid"),b=n("minor.showgrid",!!y||!!x||!!M);b||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!a.noZeroLine){var _=o("zerolinecolor",i),A=o("zerolinewidth"),S=n("zeroline",a.showGrid||!!_||!!A);S||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var Bb=te((e0e,XD)=>{"use strict";var YD=Bt(),xQ=dt(),bh=pr(),wQ=_n(),MQ=gl(),Hb=pl(),GD=q2(),VD=E2(),AQ=z2(),TQ=N2(),kQ=HD(),SQ=UD(),CQ=k3(),WD=dp(),lm=Pa().WEEKDAY_PATTERN,LQ=Pa().HOUR_PATTERN;XD.exports=function(r,t,n,a,i){var o=a.letter,l=a.font||{},s=a.splomStash||{},u=n("visible",!a.visibleDflt),f=t._template||{},v=t.type||f.type||"-",h;if(v==="date"){var d=xQ.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",a.calendar),a.noTicklabelmode||(h=n("ticklabelmode"))}!a.noTicklabelindex&&(v==="date"||v==="linear")&&n("ticklabelindex");var m="";(!a.noTicklabelposition||v==="multicategory")&&(m=bh.coerce(r,t,{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")),a.noTicklabeloverflow||n("ticklabeloverflow",m.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),WD(t,i),CQ(r,t,n,a),kQ(r,t,n,a),v!=="category"&&!a.noHover&&n("hoverformat");var g=n("color"),y=g!==Hb.color.dflt?g:l.color,x=s.label||i._dfltTitle[o];if(TQ(r,t,n,v,a),!u)return t;n("title.text",x),bh.coerceFont(n,"title.font",l,{overrideDflt:{size:bh.bigFont(l.size),color:y}}),GD(r,t,n,v);var M=a.hasMinor;if(M&&(wQ.newContainer(t,"minor"),GD(r,t,n,v,{isMinor:!0})),AQ(r,t,n,v,a),VD(r,t,n,a),M){var b=a.isMinor;a.isMinor=!0,VD(r,t,n,a),a.isMinor=b}SQ(r,t,n,{dfltColor:g,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:M,attributes:Hb}),M&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&n("mirror");var _=v==="multicategory";if(!a.noTickson&&(v==="category"||_)&&(t.ticks||t.showgrid)){var A;_&&(A="boundaries");var S=n("tickson",A);S==="boundaries"&&delete t.ticklabelposition}if(_){var k=n("showdividers");k&&(n("dividercolor"),n("dividerwidth"))}if(v==="date")if(MQ(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:qQ}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var D=0;D=2){var o="",l,s;if(i.length===2){for(l=0;l<2;l++)if(s=ZD(i[l]),s){o=lm;break}}var u=n("pattern",o);if(u===lm)for(l=0;l<2;l++)s=ZD(i[l]),s&&(r.bounds[l]=i[l]=s-1);if(u)for(l=0;l<2;l++)switch(s=i[l],u){case lm:if(!YD(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[l]=i[l]=s;break;case LQ:if(!YD(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[l]=i[l]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var EQ=Bt(),sm=pr();jD.exports=function(r,t,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],l=a.letter,s=a.grid,u=a.overlayingDomain,f,v,h,d,m,g;s&&(v=s._domains[l][s._axisMap[t._id]],f=s._anchors[t._id],v&&(h=s[l+"side"].split(" ")[0],d=s.domain[l][h==="right"||h==="top"?1:0])),v=v||[0,1],f=f||(EQ(r.position)?"free":i[0]||"free"),h=h||(l==="x"?"bottom":"left"),d=d||0,m=0,g=!1;var y=sm.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),x=sm.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(y==="free"){if(l==="y"){var M=n("autoshift");M&&(d=x==="left"?u[0]:u[1],g=t.automargin?t.automargin:!0,m=x==="left"?-3:3),n("shift",m)}n("position",d)}n("automargin",g);var b=!1;if(o.length&&(b=sm.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!b){var _=n("domain",v);_[0]>_[1]-1/4096&&(t.domain=v),sm.noneOrAll(r.domain,t.domain,v),t.tickmode==="sync"&&(t.tickmode="auto")}return n("layer"),t}});var aE=te((t0e,nE)=>{"use strict";var qc=pr(),JD=zt(),PQ=Vu().isUnifiedHover,RQ=e5(),$D=_n(),zQ=A0(),KD=pl(),NQ=FD(),QD=Bb(),FQ=F1(),eE=Ob(),Yb=ya(),hs=Yb.id2name,rE=Yb.name2id,IQ=Pa().AX_ID_PATTERN,tE=dt(),um=tE.traceIs,Ub=tE.getComponentMethod;function fm(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}nE.exports=function(r,t,n){var a=t.autotypenumbers,i={},o={},l={},s={},u={},f={},v={},h={},d={},m={},g,y;for(g=0;g{"use strict";var HQ=kt(),iE=dt(),cm=pr(),to=ln(),vm=Cn();oE.exports=function(r,t,n,a){var i=r._fullLayout;if(t.length===0){vm.redrawComponents(r);return}function o(y){var x=y.xaxis,M=y.yaxis;i._defs.select("#"+y.clipId+"> rect").call(to.setTranslate,0,0).call(to.setScale,1,1),y.plot.call(to.setTranslate,x._offset,M._offset).call(to.setScale,1,1);var b=y.plot.selectAll(".scatterlayer .trace");b.selectAll(".point").call(to.setPointGroupScale,1,1),b.selectAll(".textpoint").call(to.setTextPointsScale,1,1),b.call(to.hideOutsideRangePoints,y)}function l(y,x){var M=y.plotinfo,b=M.xaxis,_=M.yaxis,A=b._length,S=_._length,k=!!y.xr1,D=!!y.yr1,z=[];if(k){var F=cm.simpleMap(y.xr0,b.r2l),O=cm.simpleMap(y.xr1,b.r2l),G=F[1]-F[0],B=O[1]-O[0];z[0]=(F[0]*(1-x)+x*O[0]-F[0])/(F[1]-F[0])*A,z[2]=A*(1-x+x*B/G),b.range[0]=b.l2r(F[0]*(1-x)+x*O[0]),b.range[1]=b.l2r(F[1]*(1-x)+x*O[1])}else z[0]=0,z[2]=A;if(D){var X=cm.simpleMap(y.yr0,_.r2l),V=cm.simpleMap(y.yr1,_.r2l),re=X[1]-X[0],ne=V[1]-V[0];z[1]=(X[1]*(1-x)+x*V[1]-X[1])/(X[0]-X[1])*S,z[3]=S*(1-x+x*ne/re),_.range[0]=b.l2r(X[0]*(1-x)+x*V[0]),_.range[1]=_.l2r(X[1]*(1-x)+x*V[1])}else z[1]=0,z[3]=S;vm.drawOne(r,b,{skipTitle:!0}),vm.drawOne(r,_,{skipTitle:!0}),vm.redrawComponents(r,[b._id,_._id]);var K=k?A/z[2]:1,ee=D?S/z[3]:1,fe=k?z[0]:0,de=D?z[1]:0,qe=k?z[0]/z[2]*A:0,Be=D?z[1]/z[3]*S:0,Ne=b._offset-qe,Ie=_._offset-Be;M.clipRect.call(to.setTranslate,fe,de).call(to.setScale,1/K,1/ee),M.plot.call(to.setTranslate,Ne,Ie).call(to.setScale,K,ee),to.setPointGroupScale(M.zoomScalePts,1/K,1/ee),to.setTextPointsScale(M.zoomScaleTxt,1/K,1/ee)}var s;a&&(s=a());function u(){for(var y={},x=0;xn.duration?(u(),d=window.cancelAnimationFrame(g)):d=window.requestAnimationFrame(g)}return v=Date.now(),d=window.requestAnimationFrame(g),Promise.resolve()}});var Gb=te(Ua=>{"use strict";var dm=kt(),sE=dt(),Dc=pr(),BQ=ua(),OQ=ln(),uE=p1().getModuleCalcData,lf=ya(),Al=Pa(),UQ=lc(),$t=Dc.ensureSingle;function hm(e,r,t){return Dc.ensureSingle(e,r,t,function(n){n.datum(t)})}var Ec=Al.zindexSeparator;Ua.name="cartesian";Ua.attr=["xaxis","yaxis"];Ua.idRoot=["x","y"];Ua.idRegex=Al.idRegex;Ua.attrRegex=Al.attrRegex;Ua.attributes=PD();Ua.layoutAttributes=pl();Ua.supplyLayoutDefaults=aE();Ua.transitionAxes=lE();Ua.finalizeSubplots=function(e,r){var t=r._subplots,n=t.xaxis,a=t.yaxis,i=t.cartesian,o=i,l={},s={},u,f,v;for(u=0;u0){var d=h.id;if(d.indexOf(Ec)!==-1)continue;d+=Ec+(u+1),h=Dc.extendFlat({},h,{id:d,plot:a._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var m=[],g,y=0;y1&&(A+=Ec+_),b.push(l+A),o=0;o1,v=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=$t(n,"path","xlines-above"),r.ylines=$t(n,"path","ylines-above"),r.xaxislayer=$t(n,"g","xaxislayer-above"),r.yaxislayer=$t(n,"g","yaxislayer-above");else{if(!o){var h=$t(n,"g","layer-subplot");r.shapelayer=$t(h,"g","shapelayer"),r.imagelayer=$t(h,"g","imagelayer"),v&&f?(r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer):(r.minorGridlayer=$t(n,"g","minor-gridlayer"),r.gridlayer=$t(n,"g","gridlayer"),r.zerolinelayer=$t(n,"g","zerolinelayer"));var d=$t(n,"g","layer-between");r.shapelayerBetween=$t(d,"g","shapelayer"),r.imagelayerBetween=$t(d,"g","imagelayer"),$t(n,"path","xlines-below"),$t(n,"path","ylines-below"),r.overlinesBelow=$t(n,"g","overlines-below"),$t(n,"g","xaxislayer-below"),$t(n,"g","yaxislayer-below"),r.overaxesBelow=$t(n,"g","overaxes-below")}r.overplot=$t(n,"g","overplot"),r.plot=$t(r.overplot,"g",a),o||(r.xlines=$t(n,"path","xlines-above"),r.ylines=$t(n,"path","ylines-above"),r.overlinesAbove=$t(n,"g","overlines-above"),$t(n,"g","xaxislayer-above"),$t(n,"g","yaxislayer-above"),r.overaxesAbove=$t(n,"g","overaxes-above"),r.xlines=n.select(".xlines-"+l),r.ylines=n.select(".ylines-"+s),r.xaxislayer=n.select(".xaxislayer-"+l),r.yaxislayer=n.select(".yaxislayer-"+s))}else{var m=v.plotgroup,g=a+"-x",y=a+"-y";r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer,$t(v.overlinesBelow,"path",g),$t(v.overlinesBelow,"path",y),$t(v.overaxesBelow,"g",g),$t(v.overaxesBelow,"g",y),r.plot=$t(v.overplot,"g",a),$t(v.overlinesAbove,"path",g),$t(v.overlinesAbove,"path",y),$t(v.overaxesAbove,"g",g),$t(v.overaxesAbove,"g",y),r.xlines=m.select(".overlines-"+l).select("."+g),r.ylines=m.select(".overlines-"+s).select("."+y),r.xaxislayer=m.select(".overaxes-"+l).select("."+g),r.yaxislayer=m.select(".overaxes-"+s).select("."+y)}o||(u||(hm(r.minorGridlayer,"g",r.xaxis._id),hm(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(x){return x[0]}).sort(lf.idSort),hm(r.gridlayer,"g",r.xaxis._id),hm(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(x){return x[0]}).sort(lf.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function vE(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=dm.select(this);f.remove(),hE(u,r),t[u]=!0});for(var n in r._plots)for(var a=r._plots[n],i=a.overlays||[],o=0;o{"use strict";var pm=Qa();dE.exports={hasLines:pm.hasLines,hasMarkers:pm.hasMarkers,hasText:pm.hasText,isBubble:pm.isBubble,attributes:kc(),layoutAttributes:Ud(),supplyDefaults:Cq(),crossTraceDefaults:Eq(),supplyLayoutDefaults:Rq(),calc:em().calc,crossTraceCalc:oD(),arraysToCalcdata:vh(),plot:_D(),colorbar:Eb(),formatLabels:MD(),style:mh().style,styleOnSelect:mh().styleOnSelect,hoverPoints:CD(),selectPoints:DD(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Gb(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var yE=te((o0e,mE)=>{"use strict";var GQ=kt(),VQ=zt(),gE=U5(),Vb=pr(),WQ=Vb.strScale,ZQ=Vb.strRotate,XQ=Vb.strTranslate;mE.exports=function(r,t,n){var a=r.node(),i=gE[n.arrowhead||0],o=gE[n.startarrowhead||0],l=(n.arrowwidth||1)*(n.arrowsize||1),s=(n.arrowwidth||1)*(n.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,v=i.backoff*l+n.standoff,h=o.backoff*s+n.startstandoff,d,m,g,y;if(a.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},m={x:+r.attr("x2"),y:+r.attr("y2")};var x=d.x-m.x,M=d.y-m.y;if(g=Math.atan2(M,x),y=g+Math.PI,v&&h&&v+h>Math.sqrt(x*x+M*M)){X();return}if(v){if(v*v>x*x+M*M){X();return}var b=v*Math.cos(g),_=v*Math.sin(g);m.x+=b,m.y+=_,r.attr({x2:m.x,y2:m.y})}if(h){if(h*h>x*x+M*M){X();return}var A=h*Math.cos(g),S=h*Math.sin(g);d.x-=A,d.y-=S,r.attr({x1:d.x,y1:d.y})}}else if(a.nodeName==="path"){var k=a.getTotalLength(),D="";if(k{"use strict";var bE=kt(),Wb=dt(),jQ=ua(),uf=pr(),Zb=uf.strTranslate,xh=Cn(),Pc=zt(),iu=ln(),_E=ss(),Xb=ci(),jb=Ku(),_h=To(),JQ=_n().arrayEditor,$Q=yE();ME.exports={draw:KQ,drawOne:xE,drawRaw:wE};function KQ(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?We="right":We="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[We]}for(var pe=!1,W=["x","y"],Q=0;Q1)&&(Fe===Me?(kr=Oe.r2fraction(r["a"+$]),(kr<0||kr>1)&&(pe=!0)):pe=!0),Cr=Oe._offset+Oe.r2p(r[$]),Ve=.5}else{var er=zr==="domain";$==="x"?(Ae=r[$],Cr=er?Oe._offset+Oe._length*Ae:Cr=l.l+l.w*Ae):(Ae=1-r[$],Cr=er?Oe._offset+Oe._length*Ae:Cr=l.t+l.h*Ae),Ve=r.showarrow?.5:Ae}if(r.showarrow){rr.head=Cr;var Ke=r["a"+$];if(je=nr*Te(.5,r.xanchor)-Ze*Te(.5,r.yanchor),Fe===Me){var mr=xh.getRefType(Fe);mr==="domain"?($==="y"&&(Ke=1-Ke),rr.tail=Oe._offset+Oe._length*Ke):mr==="paper"?$==="y"?(Ke=1-Ke,rr.tail=l.t+l.h*Ke):rr.tail=l.l+l.w*Ke:rr.tail=Oe._offset+Oe.r2p(Ke),yr=je}else rr.tail=Cr+Ke,yr=je+Ke;rr.text=rr.tail+je;var Mr=o[$==="x"?"width":"height"];if(Me==="paper"&&(rr.head=uf.constrain(rr.head,1,Mr-1)),Fe==="pixel"){var gr=-Math.max(rr.tail-3,rr.text),dr=Math.min(rr.tail+3,rr.text)-Mr;gr>0?(rr.tail+=gr,rr.text+=gr):dr>0&&(rr.tail-=dr,rr.text-=dr)}rr.tail+=ir,rr.head+=ir}else je=ar*Te(Ve,lr),yr=je,rr.text=Cr+je;rr.text+=ir,je+=ir,yr+=ir,r["_"+$+"padplus"]=ar/2+yr,r["_"+$+"padminus"]=ar/2-yr,r["_"+$+"size"]=ar,r["_"+$+"shift"]=je}if(pe){k.remove();return}var Tr=0,Pr=0;if(r.align!=="left"&&(Tr=(Se-Ne)*(r.align==="center"?.5:1)),r.valign!=="top"&&(Pr=(Xe-Ie)*(r.valign==="middle"?.5:1)),qe)de.select("svg").attr({x:F+Tr-1,y:F+Pr}).call(iu.setClipUrl,G?g:null,e);else{var Ur=F+Pr-Be.top,sr=F+Tr-Be.left;re.call(Xb.positionText,sr,Ur).call(iu.setClipUrl,G?g:null,e)}B.select("rect").call(iu.setRect,F,F,Se,Xe),O.call(iu.setRect,D/2,D/2,se-D,be-D),k.call(iu.setTranslate,Math.round(y.x.text-se/2),Math.round(y.y.text-be/2)),b.attr({transform:"rotate("+x+","+y.x.text+","+y.y.text+")"});var _e=function($e,We){M.selectAll(".annotation-arrow-g").remove();var qr=y.x.head,Vr=y.y.head,Hr=y.x.tail+$e,lt=y.y.tail+We,xt=y.x.text+$e,Rt=y.y.text+We,St=uf.rotationXYMatrix(x,xt,Rt),hn=uf.apply2DTransform(St),Fn=uf.apply2DTransform2(St),$n=+O.attr("width"),Xt=+O.attr("height"),cn=xt-.5*$n,sn=cn+$n,Kt=Rt-.5*Xt,aa=Kt+Xt,rt=[[cn,Kt,cn,aa],[cn,aa,sn,aa],[sn,aa,sn,Kt],[sn,Kt,cn,Kt]].map(Fn);if(!rt.reduce(function(It,In){return It^!!uf.segmentsIntersect(qr,Vr,qr+1e6,Vr+1e6,In[0],In[1],In[2],In[3])},!1)){rt.forEach(function(It){var In=uf.segmentsIntersect(Hr,lt,qr,Vr,It[0],It[1],It[2],It[3]);In&&(Hr=In.x,lt=In.y)});var Qt=r.arrowwidth,Ct=r.arrowcolor,dn=r.arrowside,pn=M.append("g").style({opacity:Pc.opacity(Ct)}).classed("annotation-arrow-g",!0),tn=pn.append("path").attr("d","M"+Hr+","+lt+"L"+qr+","+Vr).style("stroke-width",Qt+"px").call(Pc.stroke,Pc.rgb(Ct));if($Q(tn,dn,r),s.annotationPosition&&tn.node().parentNode&&!n){var un=qr,ha=Vr;if(r.standoff){var Sn=Math.sqrt(Math.pow(qr-Hr,2)+Math.pow(Vr-lt,2));un+=r.standoff*(Hr-qr)/Sn,ha+=r.standoff*(lt-Vr)/Sn}var Na=pn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Hr-un)+","+(lt-ha),transform:Zb(un,ha)}).style("stroke-width",Qt+6+"px").call(Pc.stroke,"rgba(0,0,0,0)").call(Pc.fill,"rgba(0,0,0,0)"),da,wn;_h.init({element:Na.node(),gd:e,prepFn:function(){var It=iu.getTranslate(k);da=It.x,wn=It.y,a&&a.autorange&&h(a._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(It,In){var gi=hn(da,wn),io=gi[0]+It,mi=gi[1]+In;k.call(iu.setTranslate,io,mi),d("x",sf(a,It,"x",l,r)),d("y",sf(i,In,"y",l,r)),r.axref===r.xref&&d("ax",sf(a,It,"ax",l,r)),r.ayref===r.yref&&d("ay",sf(i,In,"ay",l,r)),pn.attr("transform",Zb(It,In)),b.attr({transform:"rotate("+x+","+io+","+mi+")"})},doneFn:function(){Wb.call("_guiRelayout",e,m());var It=document.querySelector(".js-notes-box-panel");It&&It.redraw(It.selectedObj)}})}}};if(r.showarrow&&_e(0,0),_){var ke;_h.init({element:k.node(),gd:e,prepFn:function(){ke=b.attr("transform")},moveFn:function($e,We){var qr="pointer";if(r.showarrow)r.axref===r.xref?d("ax",sf(a,$e,"ax",l,r)):d("ax",r.ax+$e),r.ayref===r.yref?d("ay",sf(i,We,"ay",l.w,r)):d("ay",r.ay+We),_e($e,We);else{if(n)return;var Vr,Hr;if(a)Vr=sf(a,$e,"x",l,r);else{var lt=r._xsize/l.w,xt=r.x+(r._xshift-r.xshift)/l.w-lt/2;Vr=_h.align(xt+$e/l.w,lt,0,1,r.xanchor)}if(i)Hr=sf(i,We,"y",l,r);else{var Rt=r._ysize/l.h,St=r.y-(r._yshift+r.yshift)/l.h-Rt/2;Hr=_h.align(St-We/l.h,Rt,0,1,r.yanchor)}d("x",Vr),d("y",Hr),(!a||!i)&&(qr=_h.getCursor(a?.5:Vr,i?.5:Hr,r.xanchor,r.yanchor))}b.attr({transform:Zb($e,We)+ke}),jb(k,qr)},clickFn:function($e,We){r.captureevents&&e.emit("plotly_clickannotation",S(We))},doneFn:function(){jb(k),Wb.call("_guiRelayout",e,m());var $e=document.querySelector(".js-notes-box-panel");$e&&$e.redraw($e.selectedObj)}})}}s.annotationText?re.call(Xb.makeEditable,{delegate:k,gd:e}).call(ne).on("edit",function(ee){r.text=ee,this.call(ne),d("text",ee),a&&a.autorange&&h(a._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),Wb.call("_guiRelayout",e,m())}):re.call(ne)}});var LE=te((s0e,CE)=>{"use strict";var AE=pr(),QQ=dt(),TE=_n().arrayEditor;CE.exports={hasClickToShow:eee,onClick:ree};function eee(e,r){var t=SE(e,r);return t.on.length>0||t.explicitOff.length>0}function ree(e,r){var t=SE(e,r),n=t.on,a=t.off.concat(t.explicitOff),i={},o=e._fullLayout.annotations,l,s;if(n.length||a.length){for(l=0;l{"use strict";var Jb=pr(),bv=zt();qE.exports=function(r,t,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),l=bv.opacity(o);a("borderpad");var s=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),Jb.coerceFont(a,"font",n.font),a("width"),a("align");var f=a("height");if(f&&a("valign"),u){var v=a("arrowside"),h,d;v.indexOf("end")!==-1&&(h=a("arrowhead"),d=a("arrowsize")),v.indexOf("start")!==-1&&(a("startarrowhead",h),a("startarrowsize",d)),a("arrowcolor",l?t.bordercolor:bv.defaultLine),a("arrowwidth",(l&&s||1)*2),a("standoff"),a("startstandoff")}var m=a("hovertext"),g=n.hoverlabel||{};if(m){var y=a("hoverlabel.bgcolor",g.bgcolor||(bv.opacity(i)?bv.rgb(i):bv.defaultLine)),x=a("hoverlabel.bordercolor",g.bordercolor||bv.contrast(y)),M=Jb.extendFlat({},g.font);M.color||(M.color=x),Jb.coerceFont(a,"hoverlabel.font",M)}a("captureevents",!!m)}});var EE=te((f0e,DE)=>{"use strict";var Kb=pr(),Rc=Cn(),tee=gl(),nee=$b(),aee=fv();DE.exports=function(r,t){tee(r,t,{name:"annotations",handleItemDefaults:iee})};function iee(e,r,t){function n(b,_){return Kb.coerce(e,r,aee,b,_)}var a=n("visible"),i=n("clicktoshow");if(a||i){nee(e,r,t,n);for(var o=r.showarrow,l=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var v=l[f],h=Rc.coerceRef(e,r,u,v,"","paper");if(h!=="paper"){var d=Rc.getFromId(u,h);d._annIndices.push(r._index)}if(Rc.coercePosition(r,u,n,h,v,.5),o){var m="a"+v,g=Rc.coerceRef(e,r,u,m,"pixel",["pixel","paper"]);g!=="pixel"&&g!==h&&(g=r[m]="pixel");var y=g==="pixel"?s[f]:.4;Rc.coercePosition(r,u,n,g,m,y)}n(v+"anchor"),n(v+"shift")}if(Kb.noneOrAll(e,r,["x","y"]),o&&Kb.noneOrAll(e,r,["ax","ay"]),i){var x=n("xclick"),M=n("yclick");r._xclick=x===void 0?r.x:Rc.cleanPosition(x,u,r.xref),r._yclick=M===void 0?r.y:Rc.cleanPosition(M,u,r.yref)}}}});var zE=te((c0e,RE)=>{"use strict";var Qb=pr(),zc=Cn(),oee=gm().draw;RE.exports=function(r){var t=r._fullLayout,n=Qb.filterVisible(t.annotations);if(n.length&&r._fullData.length)return Qb.syncOrAsync([oee,lee],r)};function lee(e){var r=e._fullLayout;Qb.filterVisible(r.annotations).forEach(function(t){var n=zc.getFromId(e,t.xref),a=zc.getFromId(e,t.yref),i=zc.getRefType(t.xref),o=zc.getRefType(t.yref);t._extremes={},i==="range"&&PE(t,n),o==="range"&&PE(t,a)})}function PE(e,r){var t=r._id,n=t.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],l=e["a"+n+"ref"],s=e["_"+n+"padplus"],u=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],v=3*e.arrowsize*e.arrowwidth||0,h=v+f,d=v-f,m=3*e.startarrowsize*e.arrowwidth||0,g=m+f,y=m-f,x;if(l===o){var M=zc.findExtremes(r,[r.r2c(a)],{ppadplus:h,ppadminus:d}),b=zc.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,g),ppadminus:Math.max(u,y)});x={min:[M.min[0],b.min[0]],max:[M.max[0],b.max[0]]}}else g=i?g+i:g,y=i?y-i:y,x=zc.findExtremes(r,[r.r2c(a)],{ppadplus:Math.max(s,h,g),ppadminus:Math.max(u,d,y)});e._extremes[t]=x}});var FE=te((v0e,NE)=>{"use strict";var see=Bt(),uee=id();NE.exports=function(r,t,n,a){t=t||{};var i=n==="log"&&t.type==="linear",o=n==="linear"&&t.type==="log";if(!(i||o))return;var l=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function v(d){var m=u[d],g=null;i?g=uee(m,t.range):g=Math.pow(10,m),see(g)||(g=null),a(f+d,g)}for(var h=0;h{"use strict";var e4=gm(),IE=LE();HE.exports={moduleType:"component",name:"annotations",layoutAttributes:fv(),supplyLayoutDefaults:EE(),includeBasePlot:eh()("annotations"),calcAutorange:zE(),draw:e4.draw,drawOne:e4.drawOne,drawRaw:e4.drawRaw,hasClickToShow:IE.hasClickToShow,onClick:IE.onClick,convertCoords:FE()}});var mm=te((d0e,OE)=>{"use strict";var xn=fv(),fee=_o().overrideAll,cee=_n().templatedArray;OE.exports=fee(cee("annotation",{visible:xn.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:xn.xanchor,xshift:xn.xshift,yanchor:xn.yanchor,yshift:xn.yshift,text:xn.text,textangle:xn.textangle,font:xn.font,width:xn.width,height:xn.height,opacity:xn.opacity,align:xn.align,valign:xn.valign,bgcolor:xn.bgcolor,bordercolor:xn.bordercolor,borderpad:xn.borderpad,borderwidth:xn.borderwidth,showarrow:xn.showarrow,arrowcolor:xn.arrowcolor,arrowhead:xn.arrowhead,startarrowhead:xn.startarrowhead,arrowside:xn.arrowside,arrowsize:xn.arrowsize,startarrowsize:xn.startarrowsize,arrowwidth:xn.arrowwidth,standoff:xn.standoff,startstandoff:xn.startstandoff,hovertext:xn.hovertext,hoverlabel:xn.hoverlabel,captureevents:xn.captureevents}),"calc","from-root")});var YE=te((p0e,UE)=>{"use strict";var r4=pr(),vee=Cn(),hee=gl(),dee=$b(),pee=mm();UE.exports=function(r,t,n){hee(r,t,{name:"annotations",handleItemDefaults:gee,fullLayout:n.fullLayout})};function gee(e,r,t,n){function a(l,s){return r4.coerce(e,r,pee,l,s)}function i(l){var s=l+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],vee.coercePosition(r,u,a,l,l,.5)}var o=a("visible");o&&(dee(e,r,n.fullLayout,a),i("x"),i("y"),i("z"),r4.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",a("ax",-10),a("ay",-30),r4.noneOrAll(e,r,["ax","ay"])))}});var ZE=te((g0e,WE)=>{"use strict";var GE=pr(),VE=Cn();WE.exports=function(r){for(var t=r.fullSceneLayout,n=t.annotations,a=0;a{"use strict";function t4(e,r){var t=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)t[a]+=e[4*n+a]*r[n];return t}function yee(e,r){var t=t4(e.projection,t4(e.view,t4(e.model,[r[0],r[1],r[2],1])));return t}XE.exports=yee});var $E=te((y0e,JE)=>{"use strict";var bee=gm().drawRaw,_ee=jE(),xee=["x","y","z"];JE.exports=function(r){for(var t=r.fullSceneLayout,n=r.dataScale,a=t.annotations,i=0;i1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(o._pdata=_ee(r.glplot.cameraParams,[t.xaxis.r2l(o.x)*n[0],t.yaxis.r2l(o.y)*n[1],t.zaxis.r2l(o.z)*n[2]]),bee(r.graphDiv,o,i,r.id,o._xa,o._ya))}}});var eP=te((b0e,QE)=>{"use strict";var wee=dt(),KE=pr();QE.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:mm()}}},layoutAttributes:mm(),handleDefaults:YE(),includeBasePlot:Mee,convert:ZE(),draw:$E()};function Mee(e,r){var t=wee.subplotsRegistry.gl3d;if(t)for(var n=t.attrRegex,a=Object.keys(e),i=0;i{"use strict";var rP=fv(),tP=$a(),nP=kc().line,Aee=Kl().dash,Tl=la().extendFlat,Tee=_n().templatedArray,_0e=Q1(),_v=bo(),kee=Ru().shapeTexttemplateAttrs,See=bd();aP.exports=Tee("shape",{visible:Tl({},_v.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Tl({},_v.legend,{editType:"calc+arraydraw"}),legendgroup:Tl({},_v.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Tl({},_v.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:tP({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Tl({},_v.legendrank,{editType:"calc+arraydraw"}),legendwidth:Tl({},_v.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:Tl({},rP.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:Tl({},rP.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:Tl({},nP.color,{editType:"arraydraw"}),width:Tl({},nP.width,{editType:"calc+arraydraw"}),dash:Tl({},Aee,{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:kee({},{keys:Object.keys(See)}),font:tP({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 lP=te((w0e,oP)=>{"use strict";var wh=pr(),xv=Cn(),Cee=gl(),Lee=n4(),iP=rf();oP.exports=function(r,t){Cee(r,t,{name:"shapes",handleItemDefaults:Dee})};function qee(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Dee(e,r,t){function n(ee,fe){return wh.coerce(e,r,Lee,ee,fe)}r._isShape=!0;var a=n("visible");if(a){var i=n("showlegend");i&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),wh.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),l=o?"path":"rect",s=n("type",l),u=s!=="path";u&&delete r.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var v=n("xsizemode"),h=n("ysizemode"),d=["x","y"],m=0;m<2;m++){var g=d[m],y=g+"anchor",x=g==="x"?v:h,M={_fullLayout:t},b,_,A,S=xv.coerceRef(e,r,M,g,void 0,"paper"),k=xv.getRefType(S);if(k==="range"?(b=xv.getFromId(M,S),b._shapeIndices.push(r._index),A=iP.rangeToShapePosition(b),_=iP.shapePositionToRange(b),(b.type==="category"||b.type==="multicategory")&&(n(g+"0shift"),n(g+"1shift"))):_=A=wh.identity,u){var D=.25,z=.75,F=g+"0",O=g+"1",G=e[F],B=e[O];e[F]=_(e[F],!0),e[O]=_(e[O],!0),x==="pixel"?(n(F,0),n(O,10)):(xv.coercePosition(r,M,n,S,F,D),xv.coercePosition(r,M,n,S,O,z)),r[F]=A(r[F]),r[O]=A(r[O]),e[F]=G,e[O]=B}if(x==="pixel"){var X=e[y];e[y]=_(e[y],!0),xv.coercePosition(r,M,n,S,y,.25),r[y]=A(r[y]),e[y]=X}}u&&wh.noneOrAll(e,r,["x0","x1","y0","y1"]);var V=s==="line",re,ne;if(u&&(re=n("label.texttemplate")),re||(ne=n("label.text")),ne||re){n("label.textangle");var K=n("label.textposition",V?"middle":"middle center");n("label.xanchor"),n("label.yanchor",qee(V,K)),n("label.padding"),wh.coerceFont(n,"label.font",t.font)}}}});var fP=te((M0e,uP)=>{"use strict";var Eee=zt(),sP=pr();function Pee(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}uP.exports=function(r,t,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),sP.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(r||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Eee.contrast(i)),n("newshape.line.dash")}var o=r.dragmode==="drawline",l=n("newshape.label.text"),s=n("newshape.label.texttemplate");if(l||s){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",Pee(o,u)),n("newshape.label.padding"),sP.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var pP=te((A0e,dP)=>{"use strict";var a4=pr(),wv=Cn(),Mv=P1(),vP=rf();dP.exports=function(r){var t=r._fullLayout,n=a4.filterVisible(t.shapes);if(!(!n.length||!r._fullData.length))for(var a=0;a0?u+o:o;return{ppad:o,ppadplus:l?v:h,ppadminus:l?h:v}}else return{ppad:o}}function cP(e,r,t){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,l=0,s=0,u=a?e.r2c:e.d2c,f=r[n+"sizemode"]==="scaled";if(f?(i=r[n+"0"],o=r[n+"1"],a&&(l=r[n+"0shift"],s=r[n+"1shift"])):(i=r[n+"anchor"],o=r[n+"anchor"]),i!==void 0)return[u(i)+l,u(o)+s];if(r.path){var v=1/0,h=-1/0,d=r.path.match(Mv.segmentRE),m,g,y,x,M;for(e.type==="date"&&(u=vP.decodeDate(u)),m=0;mh&&(h=M)));if(h>=v)return[v,h]}}});var yP=te((T0e,mP)=>{"use strict";var gP=og();mP.exports={moduleType:"component",name:"shapes",layoutAttributes:n4(),supplyLayoutDefaults:lP(),supplyDrawNewShapeDefaults:fP(),includeBasePlot:eh()("shapes"),calcAutorange:pP(),draw:gP.draw,drawOne:gP.drawOne}});var i4=te((S0e,_P)=>{"use strict";var bP=Pa(),Nee=_n().templatedArray,k0e=Q1();_P.exports=Nee("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",bP.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",bP.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var wP=te((C0e,xP)=>{"use strict";var Fee=pr(),o4=Cn(),Iee=gl(),Hee=i4(),Bee="images";xP.exports=function(r,t){var n={name:Bee,handleItemDefaults:Oee};Iee(r,t,n)};function Oee(e,r,t){function n(h,d){return Fee.coerce(e,r,Hee,h,d)}var a=n("source"),i=n("visible",!!a);if(!i)return r;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:t},l=["x","y"],s=0;s<2;s++){var u=l[s],f=o4.coerceRef(e,r,o,u,"paper",void 0);if(f!=="paper"){var v=o4.getFromId(o,f);v._imgIndices.push(r._index)}o4.coercePosition(r,o,n,f,u,0)}return r}});var kP=te((L0e,TP)=>{"use strict";var MP=kt(),Uee=ln(),Av=Cn(),AP=ya(),Yee=lc();TP.exports=function(r){var t=r._fullLayout,n=[],a={},i=[],o,l;for(l=0;l{"use strict";var SP=Bt(),Gee=id();CP.exports=function(r,t,n,a){t=t||{};var i=n==="log"&&t.type==="linear",o=n==="linear"&&t.type==="log";if(i||o){for(var l=r._fullLayout.images,s=t._id.charAt(0),u,f,v=0;v{"use strict";qP.exports={moduleType:"component",name:"images",layoutAttributes:i4(),supplyLayoutDefaults:wP(),includeBasePlot:eh()("images"),draw:kP(),convertCoords:LP()}});var ym=te((E0e,EP)=>{"use strict";EP.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 l4=te((P0e,RP)=>{"use strict";var Vee=$a(),Wee=cl(),Zee=la().extendFlat,Xee=_o().overrideAll,jee=_d(),PP=_n().templatedArray,Jee=PP("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}});RP.exports=Xee(PP("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:Jee,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:Zee(jee({editType:"arraydraw"}),{}),font:Vee({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Wee.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var IP=te((R0e,FP)=>{"use strict";var bm=pr(),zP=gl(),NP=l4(),$ee=ym(),Kee=$ee.name,Qee=NP.buttons;FP.exports=function(r,t){var n={name:Kee,handleItemDefaults:ere};zP(r,t,n)};function ere(e,r,t){function n(o,l){return bm.coerce(e,r,NP,o,l)}var a=zP(e,r,{name:"buttons",handleItemDefaults:rre}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),bm.noneOrAll(e,r,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),bm.coerceFont(n,"font",t.font),n("bgcolor",t.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function rre(e,r){function t(a,i){return bm.coerce(e,r,Qee,a,i)}var n=t("visible",e.method==="skip"||Array.isArray(e.args));n&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var OP=te((z0e,BP)=>{"use strict";BP.exports=Pn;var kl=kt(),HP=zt(),Tv=ln(),_m=pr();function Pn(e,r,t){this.gd=e,this.container=r,this.id=t,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})}Pn.barWidth=2;Pn.barLength=20;Pn.barRadius=2;Pn.barPad=1;Pn.barColor="#808BA4";Pn.prototype.enable=function(r,t,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=r;var l=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,v=this.position.direction,h=v==="down",d=v==="left",m=v==="right",g=v==="up",y=s,x=f,M,b,_,A;!h&&!d&&!m&&!g&&(this.position.direction="down",h=!0);var S=h||g;S?(M=l,b=M+y,h?(_=u,A=Math.min(_+x,o),x=A-_):(A=u+x,_=Math.max(A-x,0),x=A-_)):(_=u,A=_+x,d?(b=l+y,M=Math.max(b-y,0),y=b-M):(M=l,b=Math.min(M+y,i),y=b-M)),this._box={l:M,t:_,w:y,h:x};var k=s>y,D=Pn.barLength+2*Pn.barPad,z=Pn.barWidth+2*Pn.barPad,F=l,O=u+f;O+z>o&&(O=o-z);var G=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);G.exit().on(".drag",null).remove(),G.enter().append("rect").classed("scrollbar-horizontal",!0).call(HP.fill,Pn.barColor),k?(this.hbar=G.attr({rx:Pn.barRadius,ry:Pn.barRadius,x:F,y:O,width:D,height:z}),this._hbarXMin=F+D/2,this._hbarTranslateMax=y-D):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=f>x,X=Pn.barWidth+2*Pn.barPad,V=Pn.barLength+2*Pn.barPad,re=l+s,ne=u;re+X>i&&(re=i-X);var K=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);K.exit().on(".drag",null).remove(),K.enter().append("rect").classed("scrollbar-vertical",!0).call(HP.fill,Pn.barColor),B?(this.vbar=K.attr({rx:Pn.barRadius,ry:Pn.barRadius,x:re,y:ne,width:X,height:V}),this._vbarYMin=ne+V/2,this._vbarTranslateMax=x-V):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ee=this.id,fe=M-.5,de=B?b+X+.5:b+.5,qe=_-.5,Be=k?A+z+.5:A+.5,Ne=a._topdefs.selectAll("#"+ee).data(k||B?[0]:[]);if(Ne.exit().remove(),Ne.enter().append("clipPath").attr("id",ee).append("rect"),k||B?(this._clipRect=Ne.select("rect").attr({x:Math.floor(fe),y:Math.floor(qe),width:Math.ceil(de)-Math.floor(fe),height:Math.ceil(Be)-Math.floor(qe)}),this.container.call(Tv.setClipUrl,ee,this.gd),this.bg.attr({x:l,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Tv.setClipUrl,null),delete this._clipRect),k||B){var Ie=kl.behavior.drag().on("dragstart",function(){kl.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Ie);var Se=kl.behavior.drag().on("dragstart",function(){kl.event.sourceEvent.preventDefault(),kl.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(Se),B&&this.vbar.on(".drag",null).call(Se)}this.setTranslate(t,n)};Pn.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Tv.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)};Pn.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=kl.event.dx),this.vbar&&(t-=kl.event.dy),this.setTranslate(r,t)};Pn.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=kl.event.deltaY),this.vbar&&(t+=kl.event.deltaY),this.setTranslate(r,t)};Pn.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var n=r+this._hbarXMin,a=n+this._hbarTranslateMax,i=_m.constrain(kl.event.x,n,a),o=(i-n)/(a-n),l=this.position.w-this._box.w;r=o*l}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=_m.constrain(kl.event.y,s,u),v=(f-s)/(u-s),h=this.position.h-this._box.h;t=v*h}this.setTranslate(r,t)};Pn.prototype.setTranslate=function(r,t){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(r=_m.constrain(r||0,0,n),t=_m.constrain(t||0,0,a),this.translateX=r,this.translateY=t,this.container.call(Tv.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/n;this.hbar.call(Tv.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var o=t/a;this.vbar.call(Tv.setTranslate,r,t+o*this._vbarTranslateMax)}}});var $P=te((N0e,JP)=>{"use strict";var kv=kt(),Mh=ua(),Ah=zt(),Sv=ln(),no=pr(),xm=ci(),tre=_n().arrayEditor,YP=Ka().LINE_SPACING,ct=ym(),nre=OP();JP.exports=function(r){var t=r._fullLayout,n=no.filterVisible(t[ct.name]);function a(h){Mh.autoMargin(r,XP(h))}var i=t._menulayer.selectAll("g."+ct.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(ct.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){kv.select(this).selectAll("g."+ct.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+ct.headerGroupClassName).data(n,are);o.enter().append("g").classed(ct.headerGroupClassName,!0);for(var l=no.ensureSingle(i,"g",ct.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var cre=ym();KP.exports={moduleType:"component",name:cre.name,layoutAttributes:l4(),supplyLayoutDefaults:IP(),draw:$P()}});var kh=te((I0e,eR)=>{"use strict";eR.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 c4=te((H0e,nR)=>{"use strict";var rR=$a(),vre=_d(),hre=la().extendDeepAll,dre=_o().overrideAll,pre=i1(),tR=_n().templatedArray,Nc=kh(),gre=tR("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}});nR.exports=dre(tR("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:gre,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:hre(vre({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:pre.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:rR({})},font:rR({}),activebgcolor:{valType:"color",dflt:Nc.gripBgActiveColor},bgcolor:{valType:"color",dflt:Nc.railBgColor},bordercolor:{valType:"color",dflt:Nc.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Nc.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Nc.tickLength},tickcolor:{valType:"color",dflt:Nc.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Nc.minorTickLength}}),"arraydraw","from-root")});var lR=te((B0e,oR)=>{"use strict";var Cv=pr(),aR=gl(),iR=c4(),mre=kh(),yre=mre.name,bre=iR.steps;oR.exports=function(r,t){aR(r,t,{name:yre,handleItemDefaults:_re})};function _re(e,r,t){function n(v,h){return Cv.coerce(e,r,iR,v,h)}for(var a=aR(e,r,{name:"steps",handleItemDefaults:xre}),i=0,o=0;o{"use strict";var Sl=kt(),wm=ua(),ff=zt(),Cl=ln(),ao=pr(),wre=ao.strTranslate,Sh=ci(),Mre=_n().arrayEditor,Mt=kh(),d4=Ka(),fR=d4.LINE_SPACING,v4=d4.FROM_TL,h4=d4.FROM_BR;gR.exports=function(r){var t=r._context.staticPlot,n=r._fullLayout,a=Are(n,r),i=n._infolayer.selectAll("g."+Mt.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(Mt.containerClassName,!0).style("cursor",t?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),wm.autoMargin(r,cR(f))}if(i.exit().each(function(){Sl.select(this).selectAll("g."+Mt.groupClassName).each(o)}).remove(),a.length!==0){var l=i.selectAll("g."+Mt.groupClassName).data(a,Tre);l.enter().append("g").classed(Mt.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",wre(o-Mt.gripWidth*.5,r._dims.currentValueTotalHeight))}}function p4(e,r){var t=e._dims;return t.inputAreaStart+Mt.stepInset+(t.inputAreaLength-2*Mt.stepInset)*Math.min(1,Math.max(0,r))}function uR(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Mt.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Mt.stepInset-2*t.inputAreaStart)))}function Ere(e,r,t){var n=t._dims,a=ao.ensureSingle(e,"rect",Mt.railTouchRectClass,function(i){i.call(dR,r,e,t).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Mt.tickOffset+t.ticklen+n.labelHeight)}).call(ff.fill,t.bgcolor).attr("opacity",0),Cl.setTranslate(a,0,n.currentValueTotalHeight)}function Pre(e,r){var t=r._dims,n=t.inputAreaLength-Mt.railInset*2,a=ao.ensureSingle(e,"rect",Mt.railRectClass);a.attr({width:n,height:Mt.railWidth,rx:Mt.railRadius,ry:Mt.railRadius,"shape-rendering":"crispEdges"}).call(ff.stroke,r.bordercolor).call(ff.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),Cl.setTranslate(a,Mt.railInset,(t.inputAreaWidth-Mt.railWidth)*.5+t.currentValueTotalHeight)}});var bR=te((U0e,yR)=>{"use strict";var Rre=kh();yR.exports={moduleType:"component",name:Rre.name,layoutAttributes:c4(),supplyLayoutDefaults:lR(),draw:mR()}});var Am=te((Y0e,xR)=>{"use strict";var _R=cl();xR.exports={bgcolor:{valType:"color",dflt:_R.background,editType:"plot"},bordercolor:{valType:"color",dflt:_R.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 g4=te((G0e,wR)=>{"use strict";wR.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 Tm=te((V0e,MR)=>{"use strict";MR.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 kR=te(Sm=>{"use strict";var zre=ya(),Nre=ci(),AR=Tm(),Fre=Ka().LINE_SPACING,km=AR.name;function TR(e){var r=e&&e[km];return r&&r.visible}Sm.isVisible=TR;Sm.makeData=function(e){for(var r=zre.list({_fullLayout:e},"x",!0),t=e.margin,n=[],a=0;a{"use strict";var Cm=pr(),SR=_n(),CR=ya(),Ire=Am(),Hre=g4();LR.exports=function(r,t,n){var a=r[n],i=t[n];if(!(a.rangeslider||t._requestRangeslider[i._id]))return;Cm.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,l=SR.newContainer(i,"rangeslider");function s(A,S){return Cm.coerce(o,l,Ire,A,S)}var u,f;function v(A,S){return Cm.coerce(u,f,Hre,A,S)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(o.range)),s("range");var d=t._subplots;if(d)for(var m=d.cartesian.filter(function(A){return A.substr(0,A.indexOf("y"))===CR.name2id(n)}).map(function(A){return A.substr(A.indexOf("y"),A.length)}),g=Cm.simpleMap(m,CR.id2name),y=0;y{"use strict";var Bre=ya().list,Ore=Ju().getAutoRange,Ure=Tm();DR.exports=function(r){for(var t=Bre(r,"x",!0),n=0;n{"use strict";var Lm=kt(),Yre=dt(),Gre=ua(),Gn=pr(),qm=Gn.strTranslate,RR=ln(),cf=zt(),Vre=x1(),Wre=Gb(),m4=ya(),Zre=To(),Xre=Ku(),Pt=Tm();zR.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,n=0;n=K.max)re=O[ne+1];else if(V=K.pmax)re=O[ne+1];else if(V0?e.touches[0].clientX:0}function jre(e,r,t,n){if(r._context.staticPlot)return;var a=e.select("rect."+Pt.slideBoxClassName).node(),i=e.select("rect."+Pt.grabAreaMinClassName).node(),o=e.select("rect."+Pt.grabAreaMaxClassName).node();function l(){var s=Lm.event,u=s.target,f=PR(s),v=f-e.node().getBoundingClientRect().left,h=n.d2p(t._rl[0]),d=n.d2p(t._rl[1]),m=Zre.coverSlip();this.addEventListener("touchmove",g),this.addEventListener("touchend",y),m.addEventListener("mousemove",g),m.addEventListener("mouseup",y);function g(x){var M=PR(x),b=+M-f,_,A,S;switch(u){case a:if(S="ew-resize",h+b>t._length||d+b<0)return;_=h+b,A=d+b;break;case i:if(S="col-resize",h+b>t._length)return;_=h+b,A=d;break;case o:if(S="col-resize",d+b<0)return;_=h,A=d+b;break;default:S="ew-resize",_=v,A=v+b;break}if(A<_){var k=A;A=_,_=k}n._pixelMin=_,n._pixelMax=A,Xre(Lm.select(m),S),Jre(e,r,t,n)}function y(){m.removeEventListener("mousemove",g),m.removeEventListener("mouseup",y),this.removeEventListener("touchmove",g),this.removeEventListener("touchend",y),Gn.removeElement(m)}}e.on("mousedown",l),e.on("touchstart",l)}function Jre(e,r,t,n){function a(l){return t.l2r(Gn.constrain(l,n._rl[0],n._rl[1]))}var i=a(n.p2d(n._pixelMin)),o=a(n.p2d(n._pixelMax));window.requestAnimationFrame(function(){Yre.call("_guiRelayout",r,t._name+".range",[i,o])})}function $re(e,r,t,n,a,i){var o=Pt.handleWidth/2;function l(x){return Gn.constrain(x,0,n._width)}function s(x){return Gn.constrain(x,0,n._height)}function u(x){return Gn.constrain(x,-o,n._width+o)}var f=l(n.d2p(t._rl[0])),v=l(n.d2p(t._rl[1]));if(e.select("rect."+Pt.slideBoxClassName).attr("x",f).attr("width",v-f),e.select("rect."+Pt.maskMinClassName).attr("width",f),e.select("rect."+Pt.maskMaxClassName).attr("x",v).attr("width",n._width-v),i.rangemode!=="match"){var h=n._height-s(n.d2pOppAxis(a._rl[1])),d=n._height-s(n.d2pOppAxis(a._rl[0]));e.select("rect."+Pt.maskMinOppAxisClassName).attr("x",f).attr("height",h).attr("width",v-f),e.select("rect."+Pt.maskMaxOppAxisClassName).attr("x",f).attr("y",d).attr("height",n._height-d).attr("width",v-f),e.select("rect."+Pt.slideBoxClassName).attr("y",h).attr("height",d-h)}var m=.5,g=Math.round(u(f-o))-m,y=Math.round(u(v-o))+m;e.select("g."+Pt.grabberMinClassName).attr("transform",qm(g,m)),e.select("g."+Pt.grabberMaxClassName).attr("transform",qm(y,m))}function Kre(e,r,t,n){var a=Gn.ensureSingle(e,"rect",Pt.bgClassName,function(s){s.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),i=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,o=-n._offsetShift,l=RR.crispRound(r,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:qm(o,o),"stroke-width":l}).call(cf.stroke,n.bordercolor).call(cf.fill,n.bgcolor)}function Qre(e,r,t,n){var a=r._fullLayout,i=Gn.ensureSingleById(a._topdefs,"clipPath",n._clipId,function(o){o.append("rect").attr({x:0,y:0})});i.select("rect").attr({width:n._width,height:n._height})}function ete(e,r,t,n){var a=r.calcdata,i=e.selectAll("g."+Pt.rangePlotClassName).data(t._subplotsWith,Gn.identity);i.enter().append("g").attr("class",function(l){return Pt.rangePlotClassName+" "+l}).call(RR.setClipUrl,n._clipId,r),i.order(),i.exit().remove();var o;i.each(function(l,s){var u=Lm.select(this),f=s===0,v=m4.getFromId(r,l,"y"),h=v._name,d=n[h],m={data:[],layout:{xaxis:{type:t.type,domain:[0,1],range:n.range.slice(),calendar:t.calendar},width:n._width,height:n._height,margin:{t:0,b:0,l:0,r:0}},_context:r._context};t.rangebreaks&&(m.layout.xaxis.rangebreaks=t.rangebreaks),m.layout[h]={type:v.type,domain:[0,1],range:d.rangemode!=="match"?d.range.slice():v.range.slice(),calendar:v.calendar},v.rangebreaks&&(m.layout[h].rangebreaks=v.rangebreaks),Gre.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[h];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var x={id:l,plotgroup:u,xaxis:g,yaxis:y,isRangePlot:!0};f?o=x:(x.mainplot="xy",x.mainplotinfo=o),Wre.rangePlot(r,x,rte(a,l))})}function rte(e,r){for(var t=[],n=0;n{"use strict";var ite=pr(),ote=Am(),lte=g4(),y4=kR();FR.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:ite.extendFlat({},ote,{yaxis:lte})}}},layoutAttributes:Am(),handleDefaults:qR(),calcAutorange:ER(),draw:NR(),isVisible:y4.isVisible,makeData:y4.makeData,autoMarginOpts:y4.autoMarginOpts}});var Dm=te(($0e,BR)=>{"use strict";var ste=$a(),HR=cl(),ute=_n().templatedArray,fte=ute("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"});BR.exports={visible:{valType:"boolean",editType:"plot"},buttons:fte,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:ste({editType:"plot"}),bgcolor:{valType:"color",dflt:HR.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:HR.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var b4=te((K0e,OR)=>{"use strict";OR.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var GR=te((Q0e,YR)=>{"use strict";var Em=pr(),cte=zt(),vte=_n(),hte=gl(),UR=Dm(),_4=b4();YR.exports=function(r,t,n,a,i){var o=r.rangeselector||{},l=vte.newContainer(t,"rangeselector");function s(d,m){return Em.coerce(o,l,UR,d,m)}var u=hte(o,l,{name:"buttons",handleItemDefaults:dte,calendar:i}),f=s("visible",u.length>0);if(f){var v=pte(t,n,a);s("x",v[0]),s("y",v[1]),Em.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Em.coerceFont(s,"font",n.font);var h=s("bgcolor");s("activecolor",cte.contrast(h,_4.lightAmount,_4.darkAmount)),s("bordercolor"),s("borderwidth")}};function dte(e,r,t,n){var a=n.calendar;function i(s,u){return Em.coerce(e,r,UR.buttons,s,u)}var o=i("visible");if(o){var l=i("step");l!=="all"&&(a&&a!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function pte(e,r,t){for(var n=t.filter(function(l){return r[l].anchor===e._id}),a=0,i=0;i{"use strict";var gte=_y(),mte=pr().titleCase;VR.exports=function(r,t){var n=r._name,a={};if(t.step==="all")a[n+".autorange"]=!0;else{var i=yte(r,t);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function yte(e,r){var t=e.range,n=new Date(e.r2l(t[1])),a=r.step,i=gte["utc"+mte(a)],o=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+i.offset(n,-o));break;case"todate":var s=i.offset(n,-o);l=e.l2r(+i.ceil(s));break}var u=t[1];return[l,u]}});var ez=te((rve,QR)=>{"use strict";var Rm=kt(),bte=dt(),_te=ua(),ZR=zt(),KR=ln(),ou=pr(),XR=ou.strTranslate,Pm=ci(),xte=ya(),M4=Ka(),jR=M4.LINE_SPACING,JR=M4.FROM_TL,$R=M4.FROM_BR,w4=b4(),wte=WR();QR.exports=function(r){var t=r._fullLayout,n=t._infolayer.selectAll(".rangeselector").data(Mte(r),Ate);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=Rm.select(this),o=a,l=o.rangeselector,s=i.selectAll("g.button").data(ou.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Rm.select(this),v=wte(o,u);u._isActive=Tte(o,u,v),f.call(x4,l,u),f.call(Ste,l,u,r),f.on("click",function(){r._dragged||bte.call("_guiRelayout",r,v)}),f.on("mouseover",function(){u._isHovered=!0,f.call(x4,l,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(x4,l,u)})}),Lte(r,s,l,o._name,i)})};function Mte(e){for(var r=xte.list(e,"x",!0),t=[],n=0;n{"use strict";rz.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Dm()}}},layoutAttributes:Dm(),handleDefaults:GR(),draw:ez()}});var zm=te(A4=>{"use strict";var nz=la().extendFlat;A4.attributes=function(e,r){e=e||{},r=r||{};var t={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+" ":"",a=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",o={x:nz({},t,{}),y:nz({},t,{}),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};A4.defaults=function(e,r,t,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=r.grid;if(o){var l=t("domain.column");l!==void 0&&(l{"use strict";var qte=pr(),Dte=x0().counter,Ete=zm().attributes,az=Pa().idRegex,Pte=_n(),T4={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:[Dte("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[az.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[az.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:Ete({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 Nm(e,r,t){var n=r[t+"axes"],a=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(n))return n;if(a.length)return a}function Rte(e,r){var t=e.grid||{},n=Nm(r,t,"x"),a=Nm(r,t,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),o=Array.isArray(n),l=Array.isArray(a),s=o&&n!==t.xaxes&&l&&a!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(l&&(u=a.length),o&&(f=n.length));var v=Pte.newContainer(r,"grid");function h(S,k){return qte.coerce(t,v,T4,S,k)}var d=h("rows",u),m=h("columns",f);if(!(d*m>1)){delete r.grid;return}if(!i&&!o&&!l){var g=h("pattern")==="independent";g&&(i=!0)}v._hasSubplotGrid=i;var y=h("roworder"),x=y==="top to bottom",M=i?.2:.1,b=i?.3:.1,_,A;s&&r._splomGridDflt&&(_=r._splomGridDflt.xside,A=r._splomGridDflt.yside),v._domains={x:iz("x",h,M,_,m),y:iz("y",h,b,A,d,x)}}function iz(e,r,t,n,a,i){var o=r(e+"gap",t),l=r("domain."+e);r(e+"side",n);for(var s=new Array(a),u=l[0],f=(l[1]-u)/(a-o),v=f*(1-o),h=0;h{"use strict";uz.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 vz=te((ove,cz)=>{"use strict";var fz=Bt(),Nte=dt(),Fte=pr(),Ite=_n(),Hte=k4();cz.exports=function(e,r,t,n){var a="error_"+n.axis,i=Ite.newContainer(r,a),o=e[a]||{};function l(m,g){return Fte.coerce(o,i,Hte,m,g)}var s=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=l("visible",s);if(u!==!1){var f=l("type","array"in o?"data":"percent"),v=!0;f!=="sqrt"&&(v=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(l("array"),l("traceref"),v||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),v||l("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=r["error_"+n.inherit];(d||{}).visible&&l(h,!(o.color||fz(o.thickness)||fz(o.width)))}(!n.inherit||!i[h])&&(l("color",t),l("thickness"),l("width",Nte.traceIs(r,"gl3d")?0:4))}}});var S4=te((lve,dz)=>{"use strict";dz.exports=function(r){var t=r.type,n=r.symmetric;if(t==="data"){var a=r.array||[];if(n)return function(u,f){var v=+a[f];return[v,v]};var i=r.arrayminus||[];return function(u,f){var v=+a[f],h=+i[f];return!isNaN(v)||!isNaN(h)?[h||0,v||0]:[NaN,NaN]}}else{var o=hz(t,r.value),l=hz(t,r.valueminus);return n||r.valueminus===void 0?function(u){var f=o(u);return[f,f]}:function(u){return[l(u),o(u)]}}};function hz(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var mz=te((sve,gz)=>{"use strict";var C4=Bt(),Bte=dt(),L4=Cn(),Ote=pr(),Ute=S4();gz.exports=function(r){for(var t=r.calcdata,n=0;n{"use strict";var yz=kt(),vf=Bt(),Yte=ln(),Gte=Qa();bz.exports=function(r,t,n,a){var i,o=n.xaxis,l=n.yaxis,s=a&&a.duration>0,u=r._context.staticPlot;t.each(function(f){var v=f[0].trace,h=v.error_x||{},d=v.error_y||{},m;v.ids&&(m=function(M){return M.id});var g=Gte.hasMarkers(v)&&v.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var y=yz.select(this).selectAll("g.errorbar").data(f,m);if(y.exit().remove(),!!f.length){h.visible||y.selectAll("path.xerror").remove(),d.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var x=y.enter().append("g").classed("errorbar",!0);s&&x.style("opacity",0).transition().duration(a.duration).style("opacity",1),Yte.setClipUrl(y,n.layerClipId,r),y.each(function(M){var b=yz.select(this),_=Vte(M,o,l);if(!(g&&!M.vis)){var A,S=b.select("path.yerror");if(d.visible&&vf(_.x)&&vf(_.yh)&&vf(_.ys)){var k=d.width;A="M"+(_.x-k)+","+_.yh+"h"+2*k+"m-"+k+",0V"+_.ys,_.noYS||(A+="m-"+k+",0h"+2*k),i=!S.size(),i?S=b.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(S=S.transition().duration(a.duration).ease(a.easing)),S.attr("d",A)}else S.remove();var D=b.select("path.xerror");if(h.visible&&vf(_.y)&&vf(_.xh)&&vf(_.xs)){var z=(h.copy_ystyle?d:h).width;A="M"+_.xh+","+(_.y-z)+"v"+2*z+"m0,-"+z+"H"+_.xs,_.noXS||(A+="m0,-"+z+"v"+2*z),i=!D.size(),i?D=b.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(D=D.transition().duration(a.duration).ease(a.easing)),D.attr("d",A)}else D.remove()}})}})};function Vte(e,r,t){var n={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(n.yh=t.c2p(e.yh),n.ys=t.c2p(e.ys),vf(n.ys)||(n.noYS=!0,n.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),vf(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}});var Mz=te((fve,wz)=>{"use strict";var Wte=kt(),xz=zt();wz.exports=function(r){r.each(function(t){var n=t[0].trace,a=n.error_y||{},i=n.error_x||{},o=Wte.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(xz.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(xz.stroke,i.color)})}});var kz=te((cve,Tz)=>{"use strict";var Ch=pr(),Az=_o().overrideAll,Lh=k4(),Fc={error_x:Ch.extendFlat({},Lh),error_y:Ch.extendFlat({},Lh)};delete Fc.error_x.copy_zstyle;delete Fc.error_y.copy_zstyle;delete Fc.error_y.copy_ystyle;var qh={error_x:Ch.extendFlat({},Lh),error_y:Ch.extendFlat({},Lh),error_z:Ch.extendFlat({},Lh)};delete qh.error_x.copy_ystyle;delete qh.error_y.copy_ystyle;delete qh.error_z.copy_ystyle;delete qh.error_z.copy_zstyle;Tz.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Fc,bar:Fc,histogram:Fc,scatter3d:Az(qh,"calc","nested"),scattergl:Az(Fc,"calc","nested")}},supplyDefaults:vz(),calc:mz(),makeComputeError:S4(),plot:_z(),style:Mz(),hoverInfo:Zte};function Zte(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var Cz=te((vve,Sz)=>{"use strict";Sz.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 zz=te((hve,Rz)=>{"use strict";var hf=kt(),q4=Jl(),Im=ua(),Lz=dt(),lu=Cn(),Fm=To(),Fo=pr(),ql=Fo.strTranslate,Pz=la().extendFlat,D4=Ku(),Ll=ln(),E4=zt(),Xte=x1(),jte=ci(),Jte=es().flipScale,$te=Bb(),Kte=Ob(),Qte=pl(),P4=Ka(),qz=P4.LINE_SPACING,Dz=P4.FROM_TL,Ez=P4.FROM_BR,qn=Cz().cn;function ene(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+qn.colorbar).data(rne(e),function(n){return n._id});t.enter().append("g").attr("class",function(n){return n._id}).classed(qn.colorbar,!0),t.each(function(n){var a=hf.select(this);Fo.ensureSingle(a,"rect",qn.cbbg),Fo.ensureSingle(a,"g",qn.cbfills),Fo.ensureSingle(a,"g",qn.cblines),Fo.ensureSingle(a,"g",qn.cbaxis,function(o){o.classed(qn.crisp,!0)}),Fo.ensureSingle(a,"g",qn.cbtitleunshift,function(o){o.append("g").classed(qn.cbtitle,!0)}),Fo.ensureSingle(a,"rect",qn.cboutline);var i=tne(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&nne(a,n,e)}),t.exit().each(function(n){Im.autoMargin(e,n._id)}).remove(),t.order()}function rne(e){var r=e._fullLayout,t=e.calcdata,n=[],a,i,o,l;function s(b){return Pz(b,{_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 l.calc=="function"?l.calc(e,o,a):(a._fillgradient=i.reversescale?Jte(i.colorscale):i.colorscale,a._zrange=[i[l.min],i[l.max]])}for(var f=0;f1){var Q=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));Te*=Q*Fo.roundUp(W/Q,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=Te}se.domain=n?[Se+m/_.h,Se+ee-m/_.h]:[Se+d/_.w,Se+ee-d/_.w],se.setScale(),e.attr("transform",ql(Math.round(_.l),Math.round(_.t)));var $=e.select("."+qn.cbtitleunshift).attr("transform",ql(-Math.round(_.l),-Math.round(_.t))),Me=se.ticklabelposition,Fe=se.title.font.size,Oe=e.select("."+qn.cbaxis),fr,nr=0,Ze=0;function ar(yr,Ae){var Ve={propContainer:se,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:b._dfltTitle.colorbar,containerGroup:e.select("."+qn.cbtitle)},je=yr.charAt(0)==="h"?yr.substr(1):"h"+yr;e.selectAll("."+je+",."+je+"-math-group").remove(),Xte.draw(t,yr,Pz(Ve,Ae||{}))}function lr(){if(n&&be||!n&&!be){var yr,Ae;D==="top"&&(yr=d+_.l+fe*g,Ae=m+_.t+de*(1-Se-ee)+3+Fe*.75),D==="bottom"&&(yr=d+_.l+fe*g,Ae=m+_.t+de*(1-Se)-3-Fe*.25),D==="right"&&(Ae=m+_.t+de*y+3+Fe*.75,yr=d+_.l+fe*Se),ar(se._id+"title",{attributes:{x:yr,y:Ae,"text-anchor":n?"start":"middle"}})}}function ir(){if(n&&!be||!n&&be){var yr=se.position||0,Ae=se._offset+se._length/2,Ve,je;if(D==="right")je=Ae,Ve=_.l+fe*yr+10+Fe*(se.showticklabels?1:.5);else if(Ve=Ae,D==="bottom"&&(je=_.t+de*yr+10+(Me.indexOf("inside")===-1?se.tickfont.size:0)+(se.ticks!=="intside"&&r.ticklen||0)),D==="top"){var zr=k.text.split("
").length;je=_.t+de*yr+10-re-qz*Fe*zr}ar((n?"h":"v")+se._id+"title",{avoid:{selection:hf.select(t).selectAll("g."+se._id+"tick"),side:D,offsetTop:n?0:_.t,offsetLeft:n?_.l:0,maxShift:n?b.width:b.height},attributes:{x:Ve,y:je,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function rr(){if(!n&&!be||n&&be){var yr=e.select("."+qn.cbtitle),Ae=yr.select("text"),Ve=[-s/2,s/2],je=yr.select(".h"+se._id+"title-math-group").node(),zr=15.6;Ae.node()&&(zr=parseInt(Ae.node().style.fontSize,10)*qz);var kr;if(je?(kr=Ll.bBox(je),Ze=kr.width,nr=kr.height,nr>zr&&(Ve[1]-=(nr-zr)/2)):Ae.node()&&!Ae.classed(qn.jsPlaceholder)&&(kr=Ll.bBox(Ae.node()),Ze=kr.width,nr=kr.height),n){if(nr){if(nr+=5,D==="top")se.domain[1]-=nr/_.h,Ve[1]*=-1;else{se.domain[0]+=nr/_.h;var er=jte.lineCount(Ae);Ve[1]+=(1-er)*zr}yr.attr("transform",ql(Ve[0],Ve[1])),se.setScale()}}else Ze&&(D==="right"&&(se.domain[0]+=(Ze+Fe/2)/_.w),yr.attr("transform",ql(Ve[0],Ve[1])),se.setScale())}e.selectAll("."+qn.cbfills+",."+qn.cblines).attr("transform",n?ql(0,Math.round(_.h*(1-se.domain[1]))):ql(Math.round(_.w*se.domain[0]),0)),Oe.attr("transform",n?ql(0,Math.round(-_.t)):ql(Math.round(-_.l),0));var Ke=e.select("."+qn.cbfills).selectAll("rect."+qn.cbfill).attr("style","").data(X);Ke.enter().append("rect").classed(qn.cbfill,!0).attr("style",""),Ke.exit().remove();var mr=z.map(se.c2p).map(Math.round).sort(function(Pr,Ur){return Pr-Ur});Ke.each(function(Pr,Ur){var sr=[Ur===0?z[0]:(X[Ur]+X[Ur-1])/2,Ur===X.length-1?z[1]:(X[Ur]+X[Ur+1])/2].map(se.c2p).map(Math.round);n&&(sr[1]=Fo.constrain(sr[1]+(sr[1]>sr[0])?1:-1,mr[0],mr[1]));var _e=hf.select(this).attr(n?"x":"y",qe).attr(n?"y":"x",hf.min(sr)).attr(n?"width":"height",Math.max(re,2)).attr(n?"height":"width",Math.max(hf.max(sr)-hf.min(sr),2));if(r._fillgradient)Ll.gradient(_e,t,r._id,n?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var ke=O(Pr).replace("e-","");_e.attr("fill",q4(ke).toHexString())}});var Mr=e.select("."+qn.cblines).selectAll("path."+qn.cbline).data(S.color&&S.width?V:[]);Mr.enter().append("path").classed(qn.cbline,!0),Mr.exit().remove(),Mr.each(function(Pr){var Ur=qe,sr=Math.round(se.c2p(Pr))+S.width/2%1;hf.select(this).attr("d","M"+(n?Ur+","+sr:sr+","+Ur)+(n?"h":"v")+re).call(Ll.lineGroupStyle,S.width,F(Pr),S.dash)}),Oe.selectAll("g."+se._id+"tick,path").remove();var gr=qe+re+(s||0)/2-(r.ticks==="outside"?1:0),dr=lu.calcTicks(se),Tr=lu.getTickSigns(se)[2];return lu.drawTicks(t,se,{vals:se.ticks==="inside"?lu.clipEnds(se,dr):dr,layer:Oe,path:lu.makeTickPath(se,gr,Tr),transFn:lu.makeTransTickFn(se)}),lu.drawLabels(t,se,{vals:dr,layer:Oe,transFn:lu.makeTransTickLabelFn(se),labelFns:lu.makeLabelFns(se,gr)})}function Cr(){var yr,Ae=re+s/2;Me.indexOf("inside")===-1&&(yr=Ll.bBox(Oe.node()),Ae+=n?yr.width:yr.height),fr=$.select("text");var Ve=0,je=n&&D==="top",zr=!n&&D==="right",kr=0;if(fr.node()&&!fr.classed(qn.jsPlaceholder)){var er,Ke=$.select(".h"+se._id+"title-math-group").node();Ke&&(n&&be||!n&&!be)?(yr=Ll.bBox(Ke),Ve=yr.width,er=yr.height):(yr=Ll.bBox($.node()),Ve=yr.right-_.l-(n?qe:Xe),er=yr.bottom-_.t-(n?Xe:qe),!n&&D==="top"&&(Ae+=yr.height,kr=yr.height)),zr&&(fr.attr("transform",ql(Ve/2+Fe/2,0)),Ve*=2),Ae=Math.max(Ae,n?Ve:er)}var mr=(n?d:m)*2+Ae+u+s/2,Mr=0;!n&&k.text&&h==="bottom"&&y<=0&&(Mr=mr/2,mr+=Mr,kr+=Mr),b._hColorbarMoveTitle=Mr,b._hColorbarMoveCBTitle=kr;var gr=u+s,dr=(n?qe:Xe)-gr/2-(n?d:0),Tr=(n?Xe:qe)-(n?K:m+kr-Mr);e.select("."+qn.cbbg).attr("x",dr).attr("y",Tr).attr(n?"width":"height",Math.max(mr-Mr,2)).attr(n?"height":"width",Math.max(K+gr,2)).call(E4.fill,f).call(E4.stroke,r.bordercolor).style("stroke-width",u);var Pr=zr?Math.max(Ve-10,0):0;e.selectAll("."+qn.cboutline).attr("x",(n?qe:Xe+d)+Pr).attr("y",(n?Xe+m-K:qe)+(je?nr:0)).attr(n?"width":"height",Math.max(re,2)).attr(n?"height":"width",Math.max(K-(n?2*m+nr:2*d+Pr),2)).call(E4.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var Ur=n?Be*mr:0,sr=n?0:(1-Ne)*mr-kr;if(Ur=M?_.l-Ur:-Ur,sr=x?_.t-sr:-sr,e.attr("transform",ql(Ur,sr)),!n&&(u||q4(f).getAlpha()&&!q4.equals(b.paper_bgcolor,f))){var _e=Oe.selectAll("text"),ke=_e[0].length,$e=e.select("."+qn.cbbg).node(),We=Ll.bBox($e),qr=Ll.getTranslate(e),Vr=2;_e.each(function(cn,sn){var Kt=0,aa=ke-1;if(sn===Kt||sn===aa){var rt=Ll.bBox(this),Qt=Ll.getTranslate(this),Ct;if(sn===aa){var dn=rt.right+Qt.x,pn=We.right+qr.x+Xe-u-Vr+g;Ct=pn-dn,Ct>0&&(Ct=0)}else if(sn===Kt){var tn=rt.left+Qt.x,un=We.left+qr.x+Xe+u+Vr;Ct=un-tn,Ct<0&&(Ct=0)}Ct&&(ke<3?this.setAttribute("transform","translate("+Ct+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Hr={},lt=Dz[v],xt=Ez[v],Rt=Dz[h],St=Ez[h],hn=mr-re;n?(i==="pixels"?(Hr.y=y,Hr.t=K*Rt,Hr.b=K*St):(Hr.t=Hr.b=0,Hr.yt=y+a*Rt,Hr.yb=y-a*St),l==="pixels"?(Hr.x=g,Hr.l=mr*lt,Hr.r=mr*xt):(Hr.l=hn*lt,Hr.r=hn*xt,Hr.xl=g-o*lt,Hr.xr=g+o*xt)):(i==="pixels"?(Hr.x=g,Hr.l=K*lt,Hr.r=K*xt):(Hr.l=Hr.r=0,Hr.xl=g+a*lt,Hr.xr=g-a*xt),l==="pixels"?(Hr.y=1-y,Hr.t=mr*Rt,Hr.b=mr*St):(Hr.t=hn*Rt,Hr.b=hn*St,Hr.yt=y-o*Rt,Hr.yb=y+o*St));var Fn=r.y<.5?"b":"t",$n=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var Xt={r:b.width-dr-Ur,l:dr+Hr.r,b:b.height-Tr-sr,t:Tr+Hr.b};M&&x?Im.autoMargin(t,r._id,Hr):M?t._fullLayout._reservedMargin[r._id][Fn]=Xt[Fn]:x||n?t._fullLayout._reservedMargin[r._id][$n]=Xt[$n]:t._fullLayout._reservedMargin[r._id][Fn]=Xt[Fn]}return Fo.syncOrAsync([Im.previousPromises,lr,rr,ir,Im.previousPromises,Cr],t)}function nne(e,r,t){var n=r.orientation==="v",a=t._fullLayout,i=a._size,o,l,s;Fm.init({element:e.node(),gd:t,prepFn:function(){o=e.attr("transform"),D4(e)},moveFn:function(u,f){e.attr("transform",o+ql(u,f)),l=Fm.align((n?r._uFrac:r._vFrac)+u/i.w,n?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Fm.align((n?r._vFrac:1-r._uFrac)-f/i.h,n?r._lenFrac:r._thickFrac,0,1,r.yanchor);var v=Fm.getCursor(l,s,r.xanchor,r.yanchor);D4(e,v)},doneFn:function(){if(D4(e),l!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=l,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?Lz.call("_guiRestyle",t,u,r._traceIndex):Lz.call("_guiRelayout",t,u)}}})}function ane(e,r,t){var n=r._levels,a=[],i=[],o,l,s=n.end+n.size/100,u=n.size,f=1.001*t[0]-.001*t[1],v=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(o=n.start+l*u,!(u>0?o>=s:o<=s));l++)o>f&&o0?o>=s:o<=s));l++)o>t[0]&&o{"use strict";Nz.exports={moduleType:"component",name:"colorbar",attributes:Jd(),supplyDefaults:F2(),draw:zz().draw,hasColorbar:k2()}});var Hz=te((pve,Iz)=>{"use strict";Iz.exports={moduleType:"component",name:"legend",layoutAttributes:P3(),supplyLayoutDefaults:N3(),draw:j3(),style:V3()}});var Oz=te((gve,Bz)=>{"use strict";Bz.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 Yz=te((mve,Uz)=>{"use strict";Uz.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var z4=te((yve,Zz)=>{"use strict";var one=dt(),Wz=pr(),R4=Wz.extendFlat,Gz=Wz.extendDeep;function Vz(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function lne(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}Zz.exports=function(r,t){var n,a=r.data,i=r.layout,o=Gz([],a),l=Gz({},i,Vz(t.tileClass)),s=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var u=Object.keys(l);for(n=0;n{"use strict";var sne=Fd().EventEmitter,une=dt(),fne=pr(),Xz=Sc(),cne=z4(),vne=Vg(),hne=Wg();function dne(e,r){var t=new sne,n=cne(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var l=Xz.getDelay(a._fullLayout);setTimeout(function(){var s=vne(a),u=document.createElement("canvas");u.id=fne.randstr(),t=hne({format:r.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){a&&document.body.removeChild(a)}},l)}var o=Xz.getRedrawFunc(a);return une.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(l){t.emit("error",l)}),t}jz.exports=dne});var Qz=te((_ve,Kz)=>{"use strict";var $z=Sc(),pne={getDelay:$z.getDelay,getRedrawFunc:$z.getRedrawFunc,clone:z4(),toSVG:Vg(),svgToImg:Wg(),toImage:Jz(),downloadImage:vb()};Kz.exports=pne});var rN=te(su=>{"use strict";su.version=Jh().version;V_();zw();var gne=dt(),Dh=su.register=gne.register,F4=iq(),eN=Object.keys(F4);for(Hm=0;Hm{"use strict";tN.exports=rN()});var Eh=te((Mve,oN)=>{"use strict";var mne=Ru().hovertemplateAttrs,yne=Ru().texttemplateAttrs,bne=Y5(),ds=kc(),_ne=bo(),aN=H0(),xne=Kl().dash,Ic=la().extendFlat,wne=_o().overrideAll,Io=ds.marker,iN=ds.line,Mne=Io.line;oN.exports=wne({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:Ic({},ds.mode,{dflt:"markers"}),text:Ic({},ds.text,{}),texttemplate:yne({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:Ic({},ds.hovertext,{}),textfont:ds.textfont,textposition:ds.textposition,line:{color:iN.color,width:iN.width,dash:xne},connectgaps:ds.connectgaps,marker:Ic({symbol:Io.symbol,opacity:Io.opacity,angle:Io.angle,angleref:Ic({},Io.angleref,{values:["previous","up","north"]}),standoff:Io.standoff,size:Io.size,sizeref:Io.sizeref,sizemin:Io.sizemin,sizemode:Io.sizemode,colorbar:Io.colorbar,line:Ic({width:Mne.width},aN("marker.line")),gradient:Io.gradient},aN("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:bne(),selected:ds.selected,unselected:ds.unselected,hoverinfo:Ic({},_ne.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:mne()},"calc","nested")});var sN=te((Ave,lN)=>{"use strict";var I4=pr(),H4=Qa(),Ane=pb(),Tne=gb(),kne=mb(),Sne=yb(),Cne=Eh();lN.exports=function(r,t,n,a){function i(d,m){return I4.coerce(r,t,Cne,d,m)}var o=i("locations"),l;if(o&&o.length){var s=i("geojson"),u;(typeof s=="string"&&s!==""||I4.isPlainObject(s))&&(u="geojson-id");var f=i("locationmode",u);f==="geojson-id"&&i("featureidkey"),l=o.length}else{var v=i("lon")||[],h=i("lat")||[];l=Math.min(v.length,h.length)}if(!l){t.visible=!1;return}t._length=l,i("text"),i("hovertext"),i("hovertemplate"),i("mode"),H4.hasMarkers(t)&&Ane(r,t,n,a,i,{gradient:!0}),H4.hasLines(t)&&(Tne(r,t,n,a,i),i("connectgaps")),H4.hasText(t)&&(i("texttemplate"),kne(r,t,a,i)),i("fill"),t.fill!=="none"&&Sne(r,t,n,i),I4.coerceSelectionMarkerOpacity(t,i)}});var cN=te((Tve,fN)=>{"use strict";var uN=Cn();fN.exports=function(r,t,n){var a={},i=n[t.geo]._subplot,o=i.mockAxis,l=r.lonlat;return a.lonLabel=uN.tickText(o,o.c2l(l[0]),!0).text,a.latLabel=uN.tickText(o,o.c2l(l[1]),!0).text,a}});var gN=te((kve,pN)=>{"use strict";var B4=Bt(),vN=En().BADNUM,Lne=xb(),qne=vh(),Dne=Qg(),Ene=pr().isArrayOrTypedArray,hN=pr()._;function dN(e){return e&&typeof e=="string"}pN.exports=function(r,t){var n=Ene(t.locations),a=n?t.locations.length:t._length,i=new Array(a),o;t.geojson?o=function(h){return dN(h)||B4(h)}:o=dN;for(var l=0;l{"use strict";Ya.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"};Ya.axesNames=["lonaxis","lataxis"];Ya.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Ya.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Ya.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]}};Ya.clipPad=.001;Ya.precision=.1;Ya.landColor="#F0DC82";Ya.waterColor="#3399FF";Ya.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Ya.sphereSVG={type:"Sphere"};Ya.fillLayers={ocean:1,land:1,lakes:1};Ya.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Ya.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Ya.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Ya.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var O4=te((Om,mN)=>{(function(e,r){typeof Om=="object"&&typeof mN!="undefined"?r(Om):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.topojson=e.topojson||{}))})(Om,function(e){"use strict";function r(b){return b}function t(b){if(b==null)return r;var _,A,S=b.scale[0],k=b.scale[1],D=b.translate[0],z=b.translate[1];return function(F,O){O||(_=A=0);var G=2,B=F.length,X=new Array(B);for(X[0]=(_+=F[0])*S+D,X[1]=(A+=F[1])*k+z;GD&&(D=G[0]),G[1]z&&(z=G[1])}function O(G){switch(G.type){case"GeometryCollection":G.geometries.forEach(O);break;case"Point":F(G.coordinates);break;case"MultiPoint":G.coordinates.forEach(F);break}}b.arcs.forEach(function(G){for(var B=-1,X=G.length,V;++BD&&(D=V[0]),V[1]z&&(z=V[1])});for(A in b.objects)O(b.objects[A]);return[S,k,D,z]}function a(b,_){for(var A,S=b.length,k=S-_;k<--S;)A=b[k],b[k++]=b[S],b[S]=A}function i(b,_){return typeof _=="string"&&(_=b.objects[_]),_.type==="GeometryCollection"?{type:"FeatureCollection",features:_.geometries.map(function(A){return o(b,A)})}:o(b,_)}function o(b,_){var A=_.id,S=_.bbox,k=_.properties==null?{}:_.properties,D=l(b,_);return A==null&&S==null?{type:"Feature",properties:k,geometry:D}:S==null?{type:"Feature",id:A,properties:k,geometry:D}:{type:"Feature",id:A,bbox:S,properties:k,geometry:D}}function l(b,_){var A=t(b.transform),S=b.arcs;function k(B,X){X.length&&X.pop();for(var V=S[B<0?~B:B],re=0,ne=V.length;re1)S=v(b,_,A);else for(k=0,S=new Array(D=b.arcs.length);k1)for(var X=1,V=F(G[0]),re,ne;XV&&(ne=G[0],G[0]=G[X],G[X]=ne,V=re);return G}).filter(function(O){return O.length>0})}}function g(b,_){for(var A=0,S=b.length;A>>1;b[k]<_?A=k+1:S=k}return A}function y(b){var _={},A=b.map(function(){return[]});function S(K,ee){K.forEach(function(fe){fe<0&&(fe=~fe);var de=_[fe];de?de.push(ee):_[fe]=[ee]})}function k(K,ee){K.forEach(function(fe){S(fe,ee)})}function D(K,ee){K.type==="GeometryCollection"?K.geometries.forEach(function(fe){D(fe,ee)}):K.type in z&&z[K.type](K.arcs,ee)}var z={LineString:S,MultiLineString:k,Polygon:k,MultiPolygon:function(K,ee){K.forEach(function(fe){k(fe,ee)})}};b.forEach(D);for(var F in _)for(var O=_[F],G=O.length,B=0;B=2))throw new Error("n must be \u22652");O=b.bbox||n(b);var A=O[0],S=O[1],k=O[2],D=O[3],z;_={scale:[k-A?(k-A)/(z-1):1,D-S?(D-S)/(z-1):1],translate:[A,S]}}else O=b.bbox;var F=x(_),O,G,B=b.objects,X={};function V(K){return F(K)}function re(K){var ee;switch(K.type){case"GeometryCollection":ee={type:"GeometryCollection",geometries:K.geometries.map(re)};break;case"Point":ee={type:"Point",coordinates:V(K.coordinates)};break;case"MultiPoint":ee={type:"MultiPoint",coordinates:K.coordinates.map(V)};break;default:return K}return K.id!=null&&(ee.id=K.id),K.bbox!=null&&(ee.bbox=K.bbox),K.properties!=null&&(ee.properties=K.properties),ee}function ne(K){var ee=0,fe=1,de=K.length,qe,Be=new Array(de);for(Be[0]=F(K[0],0);++ee{"use strict";var U4=yN.exports={},Pne=Ph().locationmodeToLayer,Rne=O4().feature;U4.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};U4.getTopojsonPath=function(e,r){return e+r+".json"};U4.getTopojsonFeatures=function(e,r){var t=Pne[e.locationmode],n=r.objects[t];return Rne(r,n).features}});var bN=te(Rh=>{"use strict";var zne=En().BADNUM;Rh.calcTraceToLineCoords=function(e){for(var r=e[0].trace,t=r.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};Rh.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};Rh.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var r=new Array(e.length),t=0;t{_N.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 Vm=te(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var Bi=63710088e-1,G4={centimeters:Bi*100,centimetres:Bi*100,degrees:360/(2*Math.PI),feet:Bi*3.28084,inches:Bi*39.37,kilometers:Bi/1e3,kilometres:Bi/1e3,meters:Bi,metres:Bi,miles:Bi/1609.344,millimeters:Bi*1e3,millimetres:Bi*1e3,nauticalmiles:Bi/1852,radians:1,yards:Bi*1.0936},Y4={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 df(e,r,t={}){let n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=r||{},n.geometry=e,n}function Nne(e,r,t={}){switch(e){case"Point":return V4(r).geometry;case"LineString":return Z4(r).geometry;case"Polygon":return W4(r).geometry;case"MultiPoint":return MN(r).geometry;case"MultiLineString":return wN(r).geometry;case"MultiPolygon":return AN(r).geometry;default:throw new Error(e+" is invalid")}}function V4(e,r,t={}){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(!Ym(e[0])||!Ym(e[1]))throw new Error("coordinates must contain numbers");return df({type:"Point",coordinates:e},r,t)}function Fne(e,r,t={}){return Gm(e.map(n=>V4(n,r)),t)}function W4(e,r,t={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;iW4(n,r)),t)}function Z4(e,r,t={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return df({type:"LineString",coordinates:e},r,t)}function Hne(e,r,t={}){return Gm(e.map(n=>Z4(n,r)),t)}function Gm(e,r={}){let t={type:"FeatureCollection"};return r.id&&(t.id=r.id),r.bbox&&(t.bbox=r.bbox),t.features=e,t}function wN(e,r,t={}){return df({type:"MultiLineString",coordinates:e},r,t)}function MN(e,r,t={}){return df({type:"MultiPoint",coordinates:e},r,t)}function AN(e,r,t={}){return df({type:"MultiPolygon",coordinates:e},r,t)}function Bne(e,r,t={}){return df({type:"GeometryCollection",geometries:e},r,t)}function One(e,r=0){if(r&&!(r>=0))throw new Error("precision must be a positive number");let t=Math.pow(10,r||0);return Math.round(e*t)/t}function TN(e,r="kilometers"){let t=G4[r];if(!t)throw new Error(r+" units is invalid");return e*t}function X4(e,r="kilometers"){let t=G4[r];if(!t)throw new Error(r+" units is invalid");return e/t}function Une(e,r){return kN(X4(e,r))}function Yne(e){let r=e%360;return r<0&&(r+=360),r}function Gne(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function kN(e){return e%(2*Math.PI)*180/Math.PI}function Vne(e){return e%360*Math.PI/180}function Wne(e,r="kilometers",t="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return TN(X4(e,r),t)}function Zne(e,r="meters",t="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=Y4[r];if(!n)throw new Error("invalid original units");let a=Y4[t];if(!a)throw new Error("invalid final units");return e/n*a}function Ym(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Xne(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jne(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(r=>{if(!Ym(r))throw new Error("bbox must only contain numbers")})}function Jne(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")}vn.areaFactors=Y4;vn.azimuthToBearing=Gne;vn.bearingToAzimuth=Yne;vn.convertArea=Zne;vn.convertLength=Wne;vn.degreesToRadians=Vne;vn.earthRadius=Bi;vn.factors=G4;vn.feature=df;vn.featureCollection=Gm;vn.geometry=Nne;vn.geometryCollection=Bne;vn.isNumber=Ym;vn.isObject=Xne;vn.lengthToDegrees=Une;vn.lengthToRadians=X4;vn.lineString=Z4;vn.lineStrings=Hne;vn.multiLineString=wN;vn.multiPoint=MN;vn.multiPolygon=AN;vn.point=V4;vn.points=Fne;vn.polygon=W4;vn.polygons=Ine;vn.radiansToDegrees=kN;vn.radiansToLength=TN;vn.round=One;vn.validateBBox=jne;vn.validateId=Jne});var Zm=te(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});var ii=Vm();function zh(e,r,t){if(e!==null)for(var n,a,i,o,l,s,u,f=0,v=0,h,d=e.type,m=d==="FeatureCollection",g=d==="Feature",y=m?e.features.length:1,x=0;xs||m>u||g>f){l=v,s=n,u=m,f=g,i=0;return}var y=ii.lineString.call(void 0,[l,v],t.properties);if(r(y,n,a,g,i)===!1)return!1;i++,l=v})===!1)return!1}}})}function nae(e,r,t){var n=t,a=!1;return LN(e,function(i,o,l,s,u){a===!1&&t===void 0?n=i:n=r(n,i,o,l,s,u),a=!0}),n}function qN(e,r){if(!e)throw new Error("geojson is required");Wm(e,function(t,n,a){if(t.geometry!==null){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(r(t,n,a,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var DN=Vm(),lae=Zm();function RN(e){return lae.geomReduce.call(void 0,e,(r,t)=>r+sae(t),0)}function sae(e){let r=0,t;switch(e.type){case"Polygon":return EN(e.coordinates);case"MultiPolygon":for(t=0;t0){r+=Math.abs(PN(e[0]));for(let t=1;t=r?(n+2)%r:n+2],l=a[0]*J4,s=i[1]*J4,u=o[0]*J4;t+=(u-l)*Math.sin(s),n++}return t*uae}var fae=RN;Xm.area=RN;Xm.default=fae});var FN=te(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var cae=Vm(),vae=Zm();function NN(e,r={}){let t=0,n=0,a=0;return vae.coordEach.call(void 0,e,function(i){t+=i[0],n+=i[1],a++},!0),cae.point.call(void 0,[t/a,n/a],r.properties)}var hae=NN;jm.centroid=NN;jm.default=hae});var HN=te(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var dae=Zm();function IN(e,r={}){if(e.bbox!=null&&r.recompute!==!0)return e.bbox;let t=[1/0,1/0,-1/0,-1/0];return dae.coordEach.call(void 0,e,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]{"use strict";var gae=kt(),UN=xN(),{area:mae}=zN(),{centroid:yae}=FN(),{bbox:bae}=HN(),BN=kd(),qv=Pu(),_ae=Gs(),xae=$v(),$m=yg(),ON=Object.keys(UN),wae={"ISO-3":BN,"USA-states":BN,"country names":Mae};function Mae(e){for(var r=0;r0&&f[v+1][0]<0)return v;return null}switch(n==="RUS"||n==="FJI"?i=function(f){var v;if(u(f)===null)v=f;else for(v=new Array(f.length),s=0;sv?h[d++]=[f[s][0]+360,f[s][1]]:s===v?(h[d++]=f[s],h[d++]=[f[s][0],-90]):h[d++]=f[s];var m=$m.tester(h);m.pts.pop(),a.push(m)}:i=function(f){a.push($m.tester(f))},r.type){case"MultiPolygon":for(o=0;o0?m.properties.ct=Sae(m):m.properties.ct=[NaN,NaN],h.fIn=f,h.fOut=m,a.push(m)}else qv.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[v]}switch(t.type){case"FeatureCollection":var s=t.features;for(i=0;ia&&(a=l,t=o)}else t=r;return yae(t).geometry.coordinates}function Cae(e){var r=window.PlotlyGeoAssets||{},t=[];function n(s){return new Promise(function(u,f){gae.json(s,function(v,h){if(v){delete r[s];var d=v.status===404?'GeoJSON at URL "'+s+'" does not exist.':"Unexpected error while fetching from "+s;return f(new Error(d))}return r[s]=h,u(h)})})}function a(s){return new Promise(function(u,f){var v=0,h=setInterval(function(){if(r[s]&&r[s]!=="pending")return clearInterval(h),u(r[s]);if(v>100)return clearInterval(h),f("Unexpected error while fetching from "+s);v++},50)})}for(var i=0;i{"use strict";var qae=kt(),Dae=ln(),VN=zt(),WN=mh(),Eae=WN.stylePoints,Pae=WN.styleText;ZN.exports=function(r,t){t&&Rae(r,t)};function Rae(e,r){var t=r[0].trace,n=r[0].node3;n.style("opacity",r[0].trace.opacity),Eae(n,t,e),Pae(n,t,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=qae.select(this),o=a.trace,l=o.line||{};i.call(VN.stroke,l.color).call(Dae.dashLine,l.dash||"",l.width||0),o.fill!=="none"&&i.call(VN.fill,o.fillcolor)})}});var r_=te((Ive,JN)=>{"use strict";var XN=kt(),ey=pr(),zae=Um().getTopojsonFeatures,K4=bN(),Qm=Km(),jN=Ju().findExtremes,e_=En().BADNUM,Nae=em().calcMarkerSize,Q4=Qa(),Fae=$4();function Iae(e,r,t){var n=r.layers.frontplot.select(".scatterlayer"),a=ey.makeTraceGroups(n,t,"trace scattergeo");function i(o,l){o.lonlat[0]===e_&&XN.select(l).remove()}a.selectAll("*").remove(),a.each(function(o){var l=XN.select(this),s=o[0].trace;if(Q4.hasLines(s)||s.fill!=="none"){var u=K4.calcTraceToLineCoords(o),f=s.fill!=="none"?K4.makePolygon(u):K4.makeLine(u);l.selectAll("path.js-line").data([{geojson:f,trace:s}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}Q4.hasMarkers(s)&&l.selectAll("path.point").data(ey.identity).enter().append("path").classed("point",!0).each(function(v){i(v,this)}),Q4.hasText(s)&&l.selectAll("g").data(ey.identity).enter().append("g").append("text").each(function(v){i(v,this)}),Fae(e,o)})}function Hae(e,r){var t=e[0].trace,n=r[t.geo],a=n._subplot,i=t._length,o,l;if(ey.isArrayOrTypedArray(t.locations)){var s=t.locationmode,u=s==="geojson-id"?Qm.extractTraceFeature(e):zae(t,a.topojson);for(o=0;o{"use strict";var Bae=ss(),Oae=En().BADNUM,Uae=Nb(),Yae=pr().fillText,Gae=Eh();$N.exports=function(r,t,n){var a=r.cd,i=a[0].trace,o=r.xa,l=r.ya,s=r.subplot,u=s.projection.isLonLatOverEdges,f=s.project;function v(M){var b=M.lonlat;if(b[0]===Oae||u(b))return 1/0;var _=f(b),A=f([t,n]),S=Math.abs(_[0]-A[0]),k=Math.abs(_[1]-A[1]),D=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(S*S+k*k)-D,1-3/D)}if(Bae.getClosest(a,v,r),r.index!==!1){var h=a[r.index],d=h.lonlat,m=[o.c2p(d),l.c2p(d)],g=h.mrc||1;r.x0=m[0]-g,r.x1=m[0]+g,r.y0=m[1]-g,r.y1=m[1]+g,r.loc=h.loc,r.lon=d[0],r.lat=d[1];var y={};y[i.geo]={_subplot:s};var x=i._module.formatLabels(h,i,y);return r.lonLabel=x.lonLabel,r.latLabel=x.latLabel,r.color=Uae(i,h),r.extraText=Vae(i,h,r,a[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function Vae(e,r,t,n){if(e.hovertemplate)return;var a=r.hi||e.hoverinfo,i=a==="all"?Gae.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),l=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,f=[];function v(h){return h+"\xB0"}return o?f.push(r.loc):l&&s?f.push("("+v(t.latLabel)+", "+v(t.lonLabel)+")"):l?f.push(n.lon+v(t.lonLabel)):s&&f.push(n.lat+v(t.latLabel)),u&&Yae(r,e,f),f.join("
")}});var eF=te((Bve,QN)=>{"use strict";QN.exports=function(r,t,n,a,i){r.lon=t.lon,r.lat=t.lat,r.location=t.loc?t.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(r.properties=o.fIn.properties),r}});var nF=te((Ove,tF)=>{"use strict";var rF=Qa(),Wae=En().BADNUM;tF.exports=function(r,t){var n=r.cd,a=r.xaxis,i=r.yaxis,o=[],l=n[0].trace,s,u,f,v,h,d=!rF.hasMarkers(l)&&!rF.hasText(l);if(d)return[];if(t===!1)for(h=0;h{(function(e,r){typeof ry=="object"&&typeof aF!="undefined"?r(ry):typeof define=="function"&&define.amd?define(["exports"],r):r(e.d3=e.d3||{})})(ry,function(e){"use strict";function r(se,be){return sebe?1:se>=be?0:NaN}function t(se){return se.length===1&&(se=n(se)),{left:function(be,Te,pe,W){for(pe==null&&(pe=0),W==null&&(W=be.length);pe>>1;se(be[Q],Te)<0?pe=Q+1:W=Q}return pe},right:function(be,Te,pe,W){for(pe==null&&(pe=0),W==null&&(W=be.length);pe>>1;se(be[Q],Te)>0?W=Q:pe=Q+1}return pe}}}function n(se){return function(be,Te){return r(se(be),Te)}}var a=t(r),i=a.right,o=a.left;function l(se,be){be==null&&(be=s);for(var Te=0,pe=se.length-1,W=se[0],Q=new Array(pe<0?0:pe);Tese?1:be>=se?0:NaN}function v(se){return se===null?NaN:+se}function h(se,be){var Te=se.length,pe=0,W=-1,Q=0,$,Me,Fe=0;if(be==null)for(;++W1)return Fe/(pe-1)}function d(se,be){var Te=h(se,be);return Te&&Math.sqrt(Te)}function m(se,be){var Te=se.length,pe=-1,W,Q,$;if(be==null){for(;++pe=W)for(Q=$=W;++peW&&(Q=W),$=W)for(Q=$=W;++peW&&(Q=W),$0)return[se];if((pe=be0)for(se=Math.ceil(se/Me),be=Math.floor(be/Me),$=new Array(Q=Math.ceil(be-se+1));++W=0?(Q>=A?10:Q>=S?5:Q>=k?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(Q>=A?10:Q>=S?5:Q>=k?2:1)}function F(se,be,Te){var pe=Math.abs(be-se)/Math.max(0,Te),W=Math.pow(10,Math.floor(Math.log(pe)/Math.LN10)),Q=pe/W;return Q>=A?W*=10:Q>=S?W*=5:Q>=k&&(W*=2),benr;)Ze.pop(),--ar;var lr=new Array(ar+1),ir;for(Q=0;Q<=ar;++Q)ir=lr[Q]=[],ir.x0=Q>0?Ze[Q-1]:fr,ir.x1=Q=1)return+Te(se[pe-1],pe-1,se);var pe,W=(pe-1)*be,Q=Math.floor(W),$=+Te(se[Q],Q,se),Me=+Te(se[Q+1],Q+1,se);return $+(Me-$)*(W-Q)}}function X(se,be,Te){return se=x.call(se,v).sort(r),Math.ceil((Te-be)/(2*(B(se,.75)-B(se,.25))*Math.pow(se.length,-1/3)))}function V(se,be,Te){return Math.ceil((Te-be)/(3.5*d(se)*Math.pow(se.length,-1/3)))}function re(se,be){var Te=se.length,pe=-1,W,Q;if(be==null){for(;++pe=W)for(Q=W;++peQ&&(Q=W)}else for(;++pe=W)for(Q=W;++peQ&&(Q=W);return Q}function ne(se,be){var Te=se.length,pe=Te,W=-1,Q,$=0;if(be==null)for(;++W=0;)for($=se[be],Te=$.length;--Te>=0;)Q[--W]=$[Te];return Q}function fe(se,be){var Te=se.length,pe=-1,W,Q;if(be==null){for(;++pe=W)for(Q=W;++peW&&(Q=W)}else for(;++pe=W)for(Q=W;++peW&&(Q=W);return Q}function de(se,be){for(var Te=be.length,pe=new Array(Te);Te--;)pe[Te]=se[be[Te]];return pe}function qe(se,be){if(Te=se.length){var Te,pe=0,W=0,Q,$=se[W];for(be==null&&(be=r);++pe{(function(e,r){typeof ty=="object"&&typeof iF!="undefined"?r(ty,t_()):typeof define=="function"&&define.amd?define(["exports","d3-array"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(ty,function(e,r){"use strict";function t(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(I){i(a,I,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(I,J,ce){var oe=I.s=J+ce,we=oe-J,He=oe-we;I.t=J-He+(ce-we)}var o=1e-6,l=1e-12,s=Math.PI,u=s/2,f=s/4,v=s*2,h=180/s,d=s/180,m=Math.abs,g=Math.atan,y=Math.atan2,x=Math.cos,M=Math.ceil,b=Math.exp,_=Math.log,A=Math.pow,S=Math.sin,k=Math.sign||function(I){return I>0?1:I<0?-1:0},D=Math.sqrt,z=Math.tan;function F(I){return I>1?0:I<-1?s:Math.acos(I)}function O(I){return I>1?u:I<-1?-u:Math.asin(I)}function G(I){return(I=S(I/2))*I}function B(){}function X(I,J){I&&re.hasOwnProperty(I.type)&&re[I.type](I,J)}var V={Feature:function(I,J){X(I.geometry,J)},FeatureCollection:function(I,J){for(var ce=I.features,oe=-1,we=ce.length;++oe=0?1:-1,we=oe*ce,He=x(J),Je=S(J),or=Se*Je,ur=Ie*He+or*x(we),br=or*oe*S(we);fe.add(y(br,ur)),Ne=I,Ie=He,Se=Je}function W(I){return de.reset(),ee(I,Xe),de*2}function Q(I){return[y(I[1],I[0]),O(I[2])]}function $(I){var J=I[0],ce=I[1],oe=x(ce);return[oe*x(J),oe*S(J),S(ce)]}function Me(I,J){return I[0]*J[0]+I[1]*J[1]+I[2]*J[2]}function Fe(I,J){return[I[1]*J[2]-I[2]*J[1],I[2]*J[0]-I[0]*J[2],I[0]*J[1]-I[1]*J[0]]}function Oe(I,J){I[0]+=J[0],I[1]+=J[1],I[2]+=J[2]}function fr(I,J){return[I[0]*J,I[1]*J,I[2]*J]}function nr(I){var J=D(I[0]*I[0]+I[1]*I[1]+I[2]*I[2]);I[0]/=J,I[1]/=J,I[2]/=J}var Ze,ar,lr,ir,rr,Cr,yr,Ae,Ve=t(),je,zr,kr={point:er,lineStart:mr,lineEnd:Mr,polygonStart:function(){kr.point=gr,kr.lineStart=dr,kr.lineEnd=Tr,Ve.reset(),Xe.polygonStart()},polygonEnd:function(){Xe.polygonEnd(),kr.point=er,kr.lineStart=mr,kr.lineEnd=Mr,fe<0?(Ze=-(lr=180),ar=-(ir=90)):Ve>o?ir=90:Ve<-o&&(ar=-90),zr[0]=Ze,zr[1]=lr},sphere:function(){Ze=-(lr=180),ar=-(ir=90)}};function er(I,J){je.push(zr=[Ze=I,lr=I]),Jir&&(ir=J)}function Ke(I,J){var ce=$([I*d,J*d]);if(Ae){var oe=Fe(Ae,ce),we=[oe[1],-oe[0],0],He=Fe(we,oe);nr(He),He=Q(He);var Je=I-rr,or=Je>0?1:-1,ur=He[0]*h*or,br,Qe=m(Je)>180;Qe^(or*rrir&&(ir=br)):(ur=(ur+360)%360-180,Qe^(or*rrir&&(ir=J))),Qe?IPr(Ze,lr)&&(lr=I):Pr(I,lr)>Pr(Ze,lr)&&(Ze=I):lr>=Ze?(Ilr&&(lr=I)):I>rr?Pr(Ze,I)>Pr(Ze,lr)&&(lr=I):Pr(I,lr)>Pr(Ze,lr)&&(Ze=I)}else je.push(zr=[Ze=I,lr=I]);Jir&&(ir=J),Ae=ce,rr=I}function mr(){kr.point=Ke}function Mr(){zr[0]=Ze,zr[1]=lr,kr.point=er,Ae=null}function gr(I,J){if(Ae){var ce=I-rr;Ve.add(m(ce)>180?ce+(ce>0?360:-360):ce)}else Cr=I,yr=J;Xe.point(I,J),Ke(I,J)}function dr(){Xe.lineStart()}function Tr(){gr(Cr,yr),Xe.lineEnd(),m(Ve)>o&&(Ze=-(lr=180)),zr[0]=Ze,zr[1]=lr,Ae=null}function Pr(I,J){return(J-=I)<0?J+360:J}function Ur(I,J){return I[0]-J[0]}function sr(I,J){return I[0]<=I[1]?I[0]<=J&&J<=I[1]:JPr(oe[0],oe[1])&&(oe[1]=we[1]),Pr(we[0],oe[1])>Pr(oe[0],oe[1])&&(oe[0]=we[0])):He.push(oe=we);for(Je=-1/0,ce=He.length-1,J=0,oe=He[ce];J<=ce;oe=we,++J)we=He[J],(or=Pr(oe[1],we[0]))>Je&&(Je=or,Ze=we[0],lr=oe[1])}return je=zr=null,Ze===1/0||ar===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ze,ar],[lr,ir]]}var ke,$e,We,qr,Vr,Hr,lt,xt,Rt,St,hn,Fn,$n,Xt,cn,sn,Kt={sphere:B,point:aa,lineStart:Qt,lineEnd:pn,polygonStart:function(){Kt.lineStart=tn,Kt.lineEnd=un},polygonEnd:function(){Kt.lineStart=Qt,Kt.lineEnd=pn}};function aa(I,J){I*=d,J*=d;var ce=x(J);rt(ce*x(I),ce*S(I),S(J))}function rt(I,J,ce){++ke,We+=(I-We)/ke,qr+=(J-qr)/ke,Vr+=(ce-Vr)/ke}function Qt(){Kt.point=Ct}function Ct(I,J){I*=d,J*=d;var ce=x(J);Xt=ce*x(I),cn=ce*S(I),sn=S(J),Kt.point=dn,rt(Xt,cn,sn)}function dn(I,J){I*=d,J*=d;var ce=x(J),oe=ce*x(I),we=ce*S(I),He=S(J),Je=y(D((Je=cn*He-sn*we)*Je+(Je=sn*oe-Xt*He)*Je+(Je=Xt*we-cn*oe)*Je),Xt*oe+cn*we+sn*He);$e+=Je,Hr+=Je*(Xt+(Xt=oe)),lt+=Je*(cn+(cn=we)),xt+=Je*(sn+(sn=He)),rt(Xt,cn,sn)}function pn(){Kt.point=aa}function tn(){Kt.point=ha}function un(){Sn(Fn,$n),Kt.point=aa}function ha(I,J){Fn=I,$n=J,I*=d,J*=d,Kt.point=Sn;var ce=x(J);Xt=ce*x(I),cn=ce*S(I),sn=S(J),rt(Xt,cn,sn)}function Sn(I,J){I*=d,J*=d;var ce=x(J),oe=ce*x(I),we=ce*S(I),He=S(J),Je=cn*He-sn*we,or=sn*oe-Xt*He,ur=Xt*we-cn*oe,br=D(Je*Je+or*or+ur*ur),Qe=O(br),hr=br&&-Qe/br;Rt+=hr*Je,St+=hr*or,hn+=hr*ur,$e+=Qe,Hr+=Qe*(Xt+(Xt=oe)),lt+=Qe*(cn+(cn=we)),xt+=Qe*(sn+(sn=He)),rt(Xt,cn,sn)}function Na(I){ke=$e=We=qr=Vr=Hr=lt=xt=Rt=St=hn=0,ee(I,Kt);var J=Rt,ce=St,oe=hn,we=J*J+ce*ce+oe*oe;return wes?I+Math.round(-I/v)*v:I,J]}It.invert=It;function In(I,J,ce){return(I%=v)?J||ce?wn(io(I),mi(J,ce)):io(I):J||ce?mi(J,ce):It}function gi(I){return function(J,ce){return J+=I,[J>s?J-v:J<-s?J+v:J,ce]}}function io(I){var J=gi(I);return J.invert=gi(-I),J}function mi(I,J){var ce=x(I),oe=S(I),we=x(J),He=S(J);function Je(or,ur){var br=x(ur),Qe=x(or)*br,hr=S(or)*br,cr=S(ur),wr=cr*ce+Qe*oe;return[y(hr*we-wr*He,Qe*ce-cr*oe),O(wr*we+hr*He)]}return Je.invert=function(or,ur){var br=x(ur),Qe=x(or)*br,hr=S(or)*br,cr=S(ur),wr=cr*we-hr*He;return[y(hr*we+cr*He,Qe*ce+wr*oe),O(wr*ce-Qe*oe)]},Je}function ms(I){I=In(I[0]*d,I[1]*d,I.length>2?I[2]*d:0);function J(ce){return ce=I(ce[0]*d,ce[1]*d),ce[0]*=h,ce[1]*=h,ce}return J.invert=function(ce){return ce=I.invert(ce[0]*d,ce[1]*d),ce[0]*=h,ce[1]*=h,ce},J}function El(I,J,ce,oe,we,He){if(ce){var Je=x(J),or=S(J),ur=oe*ce;we==null?(we=J+oe*v,He=J-ur/2):(we=Bo(Je,we),He=Bo(Je,He),(oe>0?weHe)&&(we+=oe*v));for(var br,Qe=we;oe>0?Qe>He:Qe1&&I.push(I.pop().concat(I.shift()))},result:function(){var ce=I;return I=[],J=null,ce}}}function Hn(I,J){return m(I[0]-J[0])=0;--or)we.point((hr=Qe[or])[0],hr[1]);else oe(cr.x,cr.p.x,-1,we);cr=cr.p}cr=cr.o,Qe=cr.z,wr=!wr}while(!cr.v);we.lineEnd()}}}function bi(I){if(J=I.length){for(var J,ce=0,oe=I[0],we;++ce=0?1:-1,Wt=en*Yt,gn=Wt>s,qt=et*it;if(Kr.add(y(qt*en*S(Wt),jr*pt+qt*x(Wt))),Je+=gn?Yt+en*v:Yt,gn^wr>=ce^Dr>=ce){var ia=Fe($(cr),$(nt));nr(ia);var Rn=Fe(He,ia);nr(Rn);var mn=(gn^Yt>=0?-1:1)*O(Rn[2]);(oe>mn||oe===mn&&(ia[0]||ia[1]))&&(or+=gn^Yt>=0?1:-1)}}return(Je<-o||Je0){for(ur||(we.polygonStart(),ur=!0),we.lineStart(),pt=0;pt1&&Ir&2&&it.push(it.pop().concat(it.shift())),Qe.push(it.filter(Vn))}}return cr}}function Vn(I){return I.length>1}function nn(I,J){return((I=I.x)[0]<0?I[1]-u-o:u-I[1])-((J=J.x)[0]<0?J[1]-u-o:u-J[1])}var Dn=Br(function(){return!0},At,Yo,[-s,-u]);function At(I){var J=NaN,ce=NaN,oe=NaN,we;return{lineStart:function(){I.lineStart(),we=1},point:function(He,Je){var or=He>0?s:-s,ur=m(He-J);m(ur-s)0?u:-u),I.point(oe,ce),I.lineEnd(),I.lineStart(),I.point(or,ce),I.point(He,ce),we=0):oe!==or&&ur>=s&&(m(J-oe)o?g((S(J)*(He=x(oe))*S(ce)-S(oe)*(we=x(J))*S(I))/(we*He*Je)):(J+oe)/2}function Yo(I,J,ce,oe){var we;if(I==null)we=ce*u,oe.point(-s,we),oe.point(0,we),oe.point(s,we),oe.point(s,0),oe.point(s,-we),oe.point(0,-we),oe.point(-s,-we),oe.point(-s,0),oe.point(-s,we);else if(m(I[0]-J[0])>o){var He=I[0]0,we=m(J)>o;function He(Qe,hr,cr,wr){El(wr,I,ce,cr,Qe,hr)}function Je(Qe,hr){return x(Qe)*x(hr)>J}function or(Qe){var hr,cr,wr,Lr,et;return{lineStart:function(){Lr=wr=!1,et=1},point:function(jr,tt){var nt=[jr,tt],Dr,Ir=Je(jr,tt),it=oe?Ir?0:br(jr,tt):Ir?br(jr+(jr<0?s:-s),tt):0;if(!hr&&(Lr=wr=Ir)&&Qe.lineStart(),Ir!==wr&&(Dr=ur(hr,nt),(!Dr||Hn(hr,Dr)||Hn(nt,Dr))&&(nt[2]=1)),Ir!==wr)et=0,Ir?(Qe.lineStart(),Dr=ur(nt,hr),Qe.point(Dr[0],Dr[1])):(Dr=ur(hr,nt),Qe.point(Dr[0],Dr[1],2),Qe.lineEnd()),hr=Dr;else if(we&&hr&&oe^Ir){var pt;!(it&cr)&&(pt=ur(nt,hr,!0))&&(et=0,oe?(Qe.lineStart(),Qe.point(pt[0][0],pt[0][1]),Qe.point(pt[1][0],pt[1][1]),Qe.lineEnd()):(Qe.point(pt[1][0],pt[1][1]),Qe.lineEnd(),Qe.lineStart(),Qe.point(pt[0][0],pt[0][1],3)))}Ir&&(!hr||!Hn(hr,nt))&&Qe.point(nt[0],nt[1]),hr=nt,wr=Ir,cr=it},lineEnd:function(){wr&&Qe.lineEnd(),hr=null},clean:function(){return et|(Lr&&wr)<<1}}}function ur(Qe,hr,cr){var wr=$(Qe),Lr=$(hr),et=[1,0,0],jr=Fe(wr,Lr),tt=Me(jr,jr),nt=jr[0],Dr=tt-nt*nt;if(!Dr)return!cr&&Qe;var Ir=J*tt/Dr,it=-J*nt/Dr,pt=Fe(et,jr),Yt=fr(et,Ir),en=fr(jr,it);Oe(Yt,en);var Wt=pt,gn=Me(Yt,Wt),qt=Me(Wt,Wt),ia=gn*gn-qt*(Me(Yt,Yt)-1);if(!(ia<0)){var Rn=D(ia),mn=fr(Wt,(-gn-Rn)/qt);if(Oe(mn,Yt),mn=Q(mn),!cr)return mn;var Yr=Qe[0],Gt=hr[0],Bn=Qe[1],pa=hr[1],Xa;Gt0^mn[1]<(m(mn[0]-Yr)s^(Yr<=mn[0]&&mn[0]<=Gt)){var si=fr(Wt,(-gn+Rn)/qt);return Oe(si,Yt),[mn,Q(si)]}}}function br(Qe,hr){var cr=oe?I:s-I,wr=0;return Qe<-cr?wr|=1:Qe>cr&&(wr|=2),hr<-cr?wr|=4:hr>cr&&(wr|=8),wr}return Br(Je,or,He,oe?[0,-I]:[-s,I-s])}function cu(I,J,ce,oe,we,He){var Je=I[0],or=I[1],ur=J[0],br=J[1],Qe=0,hr=1,cr=ur-Je,wr=br-or,Lr;if(Lr=ce-Je,!(!cr&&Lr>0)){if(Lr/=cr,cr<0){if(Lr0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}if(Lr=we-Je,!(!cr&&Lr<0)){if(Lr/=cr,cr<0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}else if(cr>0){if(Lr0)){if(Lr/=wr,wr<0){if(Lr0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}if(Lr=He-or,!(!wr&&Lr<0)){if(Lr/=wr,wr<0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}else if(wr>0){if(Lr0&&(I[0]=Je+Qe*cr,I[1]=or+Qe*wr),hr<1&&(J[0]=Je+hr*cr,J[1]=or+hr*wr),!0}}}}}var oo=1e9,Go=-oo;function Vo(I,J,ce,oe){function we(br,Qe){return I<=br&&br<=ce&&J<=Qe&&Qe<=oe}function He(br,Qe,hr,cr){var wr=0,Lr=0;if(br==null||(wr=Je(br,hr))!==(Lr=Je(Qe,hr))||ur(br,Qe)<0^hr>0)do cr.point(wr===0||wr===3?I:ce,wr>1?oe:J);while((wr=(wr+hr+4)%4)!==Lr);else cr.point(Qe[0],Qe[1])}function Je(br,Qe){return m(br[0]-I)0?0:3:m(br[0]-ce)0?2:1:m(br[1]-J)0?1:0:Qe>0?3:2}function or(br,Qe){return ur(br.x,Qe.x)}function ur(br,Qe){var hr=Je(br,1),cr=Je(Qe,1);return hr!==cr?hr-cr:hr===0?Qe[1]-br[1]:hr===1?br[0]-Qe[0]:hr===2?br[1]-Qe[1]:Qe[0]-br[0]}return function(br){var Qe=br,hr=Oo(),cr,wr,Lr,et,jr,tt,nt,Dr,Ir,it,pt,Yt={point:en,lineStart:ia,lineEnd:Rn,polygonStart:gn,polygonEnd:qt};function en(Yr,Gt){we(Yr,Gt)&&Qe.point(Yr,Gt)}function Wt(){for(var Yr=0,Gt=0,Bn=wr.length;Gtoe&&(al-nl)*(oe-si)>(Zl-si)*(I-nl)&&++Yr:Zl<=oe&&(al-nl)*(oe-si)<(Zl-si)*(I-nl)&&--Yr;return Yr}function gn(){Qe=hr,cr=[],wr=[],pt=!0}function qt(){var Yr=Wt(),Gt=pt&&Yr,Bn=(cr=r.merge(cr)).length;(Gt||Bn)&&(br.polygonStart(),Gt&&(br.lineStart(),He(null,null,1,br),br.lineEnd()),Bn&&Uo(cr,or,Yr,He,br),br.polygonEnd()),Qe=br,cr=wr=Lr=null}function ia(){Yt.point=mn,wr&&wr.push(Lr=[]),it=!0,Ir=!1,nt=Dr=NaN}function Rn(){cr&&(mn(et,jr),tt&&Ir&&hr.rejoin(),cr.push(hr.result())),Yt.point=en,Ir&&Qe.lineEnd()}function mn(Yr,Gt){var Bn=we(Yr,Gt);if(wr&&Lr.push([Yr,Gt]),it)et=Yr,jr=Gt,tt=Bn,it=!1,Bn&&(Qe.lineStart(),Qe.point(Yr,Gt));else if(Bn&&Ir)Qe.point(Yr,Gt);else{var pa=[nt=Math.max(Go,Math.min(oo,nt)),Dr=Math.max(Go,Math.min(oo,Dr))],Xa=[Yr=Math.max(Go,Math.min(oo,Yr)),Gt=Math.max(Go,Math.min(oo,Gt))];cu(pa,Xa,I,J,ce,oe)?(Ir||(Qe.lineStart(),Qe.point(pa[0],pa[1])),Qe.point(Xa[0],Xa[1]),Bn||Qe.lineEnd(),pt=!1):Bn&&(Qe.lineStart(),Qe.point(Yr,Gt),pt=!1)}nt=Yr,Dr=Gt,Ir=Bn}return Yt}}function vu(){var I=0,J=0,ce=960,oe=500,we,He,Je;return Je={stream:function(or){return we&&He===or?we:we=Vo(I,J,ce,oe)(He=or)},extent:function(or){return arguments.length?(I=+or[0][0],J=+or[0][1],ce=+or[1][0],oe=+or[1][1],we=He=null,Je):[[I,J],[ce,oe]]}}}var Pl=t(),Rl,_i,lo,Wo={sphere:B,point:B,lineStart:zl,lineEnd:B,polygonStart:B,polygonEnd:B};function zl(){Wo.point=Mf,Wo.lineEnd=bs}function bs(){Wo.point=Wo.lineEnd=B}function Mf(I,J){I*=d,J*=d,Rl=I,_i=S(J),lo=x(J),Wo.point=Zc}function Zc(I,J){I*=d,J*=d;var ce=S(J),oe=x(J),we=m(I-Rl),He=x(we),Je=S(we),or=oe*Je,ur=lo*ce-_i*oe*He,br=_i*ce+lo*oe*He;Pl.add(y(D(or*or+ur*ur),br)),Rl=I,_i=ce,lo=oe}function _s(I){return Pl.reset(),ee(I,Wo),+Pl}var xs=[null,null],ws={type:"LineString",coordinates:xs};function Zo(I,J){return xs[0]=I,xs[1]=J,_s(ws)}var so={Feature:function(I,J){return Oi(I.geometry,J)},FeatureCollection:function(I,J){for(var ce=I.features,oe=-1,we=ce.length;++oe0&&(we=Zo(I[He],I[He-1]),we>0&&ce<=we&&oe<=we&&(ce+oe-we)*(1-Math.pow((ce-oe)/we,2))o}).map(cr)).concat(r.range(M(He/br)*br,we,br).filter(function(Dr){return m(Dr%hr)>o}).map(wr))}return tt.lines=function(){return nt().map(function(Dr){return{type:"LineString",coordinates:Dr}})},tt.outline=function(){return{type:"Polygon",coordinates:[Lr(oe).concat(et(Je).slice(1),Lr(ce).reverse().slice(1),et(or).reverse().slice(1))]}},tt.extent=function(Dr){return arguments.length?tt.extentMajor(Dr).extentMinor(Dr):tt.extentMinor()},tt.extentMajor=function(Dr){return arguments.length?(oe=+Dr[0][0],ce=+Dr[1][0],or=+Dr[0][1],Je=+Dr[1][1],oe>ce&&(Dr=oe,oe=ce,ce=Dr),or>Je&&(Dr=or,or=Je,Je=Dr),tt.precision(jr)):[[oe,or],[ce,Je]]},tt.extentMinor=function(Dr){return arguments.length?(J=+Dr[0][0],I=+Dr[1][0],He=+Dr[0][1],we=+Dr[1][1],J>I&&(Dr=J,J=I,I=Dr),He>we&&(Dr=He,He=we,we=Dr),tt.precision(jr)):[[J,He],[I,we]]},tt.step=function(Dr){return arguments.length?tt.stepMajor(Dr).stepMinor(Dr):tt.stepMinor()},tt.stepMajor=function(Dr){return arguments.length?(Qe=+Dr[0],hr=+Dr[1],tt):[Qe,hr]},tt.stepMinor=function(Dr){return arguments.length?(ur=+Dr[0],br=+Dr[1],tt):[ur,br]},tt.precision=function(Dr){return arguments.length?(jr=+Dr,cr=Ui(He,we,90),wr=As(J,I,jr),Lr=Ui(or,Je,90),et=As(oe,ce,jr),tt):jr},tt.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ts(){return jc()()}function Fv(I,J){var ce=I[0]*d,oe=I[1]*d,we=J[0]*d,He=J[1]*d,Je=x(oe),or=S(oe),ur=x(He),br=S(He),Qe=Je*x(ce),hr=Je*S(ce),cr=ur*x(we),wr=ur*S(we),Lr=2*O(D(G(He-oe)+Je*ur*G(we-ce))),et=S(Lr),jr=Lr?function(tt){var nt=S(tt*=Lr)/et,Dr=S(Lr-tt)/et,Ir=Dr*Qe+nt*cr,it=Dr*hr+nt*wr,pt=Dr*or+nt*br;return[y(it,Ir)*h,y(pt,D(Ir*Ir+it*it))*h]}:function(){return[ce*h,oe*h]};return jr.distance=Lr,jr}function Xo(I){return I}var kf=t(),Fl=t(),Jc,fo,co,Sf,xi={point:B,lineStart:B,lineEnd:B,polygonStart:function(){xi.lineStart=Iv,xi.lineEnd=Hv},polygonEnd:function(){xi.lineStart=xi.lineEnd=xi.point=B,kf.add(m(Fl)),Fl.reset()},result:function(){var I=kf/2;return kf.reset(),I}};function Iv(){xi.point=Yi}function Yi(I,J){xi.point=Il,Jc=co=I,fo=Sf=J}function Il(I,J){Fl.add(Sf*I-co*J),co=I,Sf=J}function Hv(){Il(Jc,fo)}var Gi=1/0,jo=Gi,Jo=-Gi,$o=Jo,vo={point:ks,lineStart:B,lineEnd:B,polygonStart:B,polygonEnd:B,result:function(){var I=[[Gi,jo],[Jo,$o]];return Jo=$o=-(jo=Gi=1/0),I}};function ks(I,J){IJo&&(Jo=I),J$o&&($o=J)}var du=0,Ss=0,Cs=0,Ko=0,Hl=0,Bl=0,pu=0,gu=0,oi=0,mu,yu,Fa,Kn,Aa={point:Vi,lineStart:Ls,lineEnd:Cf,polygonStart:function(){Aa.lineStart=$c,Aa.lineEnd=Bv},polygonEnd:function(){Aa.point=Vi,Aa.lineStart=Ls,Aa.lineEnd=Cf},result:function(){var I=oi?[pu/oi,gu/oi]:Bl?[Ko/Bl,Hl/Bl]:Cs?[du/Cs,Ss/Cs]:[NaN,NaN];return du=Ss=Cs=Ko=Hl=Bl=pu=gu=oi=0,I}};function Vi(I,J){du+=I,Ss+=J,++Cs}function Ls(){Aa.point=Qo}function Qo(I,J){Aa.point=Ol,Vi(Fa=I,Kn=J)}function Ol(I,J){var ce=I-Fa,oe=J-Kn,we=D(ce*ce+oe*oe);Ko+=we*(Fa+I)/2,Hl+=we*(Kn+J)/2,Bl+=we,Vi(Fa=I,Kn=J)}function Cf(){Aa.point=Vi}function $c(){Aa.point=Ov}function Bv(){Lf(mu,yu)}function Ov(I,J){Aa.point=Lf,Vi(mu=Fa=I,yu=Kn=J)}function Lf(I,J){var ce=I-Fa,oe=J-Kn,we=D(ce*ce+oe*oe);Ko+=we*(Fa+I)/2,Hl+=we*(Kn+J)/2,Bl+=we,we=Kn*I-Fa*J,pu+=we*(Fa+I),gu+=we*(Kn+J),oi+=we*3,Vi(Fa=I,Kn=J)}function qf(I){this._context=I}qf.prototype={_radius:4.5,pointRadius:function(I){return this._radius=I,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(I,J){switch(this._point){case 0:{this._context.moveTo(I,J),this._point=1;break}case 1:{this._context.lineTo(I,J);break}default:{this._context.moveTo(I+this._radius,J),this._context.arc(I,J,this._radius,0,v);break}}},result:B};var Df=t(),Ef,Kc,Qc,qs,Ds,wi={point:B,lineStart:function(){wi.point=bu},lineEnd:function(){Ef&&Es(Kc,Qc),wi.point=B},polygonStart:function(){Ef=!0},polygonEnd:function(){Ef=null},result:function(){var I=+Df;return Df.reset(),I}};function bu(I,J){wi.point=Es,Kc=qs=I,Qc=Ds=J}function Es(I,J){qs-=I,Ds-=J,Df.add(D(qs*qs+Ds*Ds)),qs=I,Ds=J}function _u(){this._string=[]}_u.prototype={_radius:4.5,_circle:e0(4.5),pointRadius:function(I){return(I=+I)!==this._radius&&(this._radius=I,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(I,J){switch(this._point){case 0:{this._string.push("M",I,",",J),this._point=1;break}case 1:{this._string.push("L",I,",",J);break}default:{this._circle==null&&(this._circle=e0(this._radius)),this._string.push("M",I,",",J,this._circle);break}}},result:function(){if(this._string.length){var I=this._string.join("");return this._string=[],I}else return null}};function e0(I){return"m0,"+I+"a"+I+","+I+" 0 1,1 0,"+-2*I+"a"+I+","+I+" 0 1,1 0,"+2*I+"z"}function Pf(I,J){var ce=4.5,oe,we;function He(Je){return Je&&(typeof ce=="function"&&we.pointRadius(+ce.apply(this,arguments)),ee(Je,oe(we))),we.result()}return He.area=function(Je){return ee(Je,oe(xi)),xi.result()},He.measure=function(Je){return ee(Je,oe(wi)),wi.result()},He.bounds=function(Je){return ee(Je,oe(vo)),vo.result()},He.centroid=function(Je){return ee(Je,oe(Aa)),Aa.result()},He.projection=function(Je){return arguments.length?(oe=Je==null?(I=null,Xo):(I=Je).stream,He):I},He.context=function(Je){return arguments.length?(we=Je==null?(J=null,new _u):new qf(J=Je),typeof ce!="function"&&we.pointRadius(ce),He):J},He.pointRadius=function(Je){return arguments.length?(ce=typeof Je=="function"?Je:(we.pointRadius(+Je),+Je),He):ce},He.projection(I).context(J)}function Uv(I){return{stream:ho(I)}}function ho(I){return function(J){var ce=new xu;for(var oe in I)ce[oe]=I[oe];return ce.stream=J,ce}}function xu(){}xu.prototype={constructor:xu,point:function(I,J){this.stream.point(I,J)},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 Ul(I,J,ce){var oe=I.clipExtent&&I.clipExtent();return I.scale(150).translate([0,0]),oe!=null&&I.clipExtent(null),ee(ce,I.stream(vo)),J(vo.result()),oe!=null&&I.clipExtent(oe),I}function Ps(I,J,ce){return Ul(I,function(oe){var we=J[1][0]-J[0][0],He=J[1][1]-J[0][1],Je=Math.min(we/(oe[1][0]-oe[0][0]),He/(oe[1][1]-oe[0][1])),or=+J[0][0]+(we-Je*(oe[1][0]+oe[0][0]))/2,ur=+J[0][1]+(He-Je*(oe[1][1]+oe[0][1]))/2;I.scale(150*Je).translate([or,ur])},ce)}function Rs(I,J,ce){return Ps(I,[[0,0],J],ce)}function Rf(I,J,ce){return Ul(I,function(oe){var we=+J,He=we/(oe[1][0]-oe[0][0]),Je=(we-He*(oe[1][0]+oe[0][0]))/2,or=-He*oe[0][1];I.scale(150*He).translate([Je,or])},ce)}function po(I,J,ce){return Ul(I,function(oe){var we=+J,He=we/(oe[1][1]-oe[0][1]),Je=-He*oe[0][0],or=(we-He*(oe[1][1]+oe[0][1]))/2;I.scale(150*He).translate([Je,or])},ce)}var r0=16,zf=x(30*d);function t0(I,J){return+J?wu(I,J):Nf(I)}function Nf(I){return ho({point:function(J,ce){J=I(J,ce),this.stream.point(J[0],J[1])}})}function wu(I,J){function ce(oe,we,He,Je,or,ur,br,Qe,hr,cr,wr,Lr,et,jr){var tt=br-oe,nt=Qe-we,Dr=tt*tt+nt*nt;if(Dr>4*J&&et--){var Ir=Je+cr,it=or+wr,pt=ur+Lr,Yt=D(Ir*Ir+it*it+pt*pt),en=O(pt/=Yt),Wt=m(m(pt)-1)J||m((tt*Rn+nt*mn)/Dr-.5)>.3||Je*cr+or*wr+ur*Lr2?Yr[2]%360*d:0,Rn()):[or*h,ur*h,br*h]},qt.angle=function(Yr){return arguments.length?(hr=Yr%360*d,Rn()):hr*h},qt.reflectX=function(Yr){return arguments.length?(cr=Yr?-1:1,Rn()):cr<0},qt.reflectY=function(Yr){return arguments.length?(wr=Yr?-1:1,Rn()):wr<0},qt.precision=function(Yr){return arguments.length?(pt=t0(Yt,it=Yr*Yr),mn()):D(it)},qt.fitExtent=function(Yr,Gt){return Ps(qt,Yr,Gt)},qt.fitSize=function(Yr,Gt){return Rs(qt,Yr,Gt)},qt.fitWidth=function(Yr,Gt){return Rf(qt,Yr,Gt)},qt.fitHeight=function(Yr,Gt){return po(qt,Yr,Gt)};function Rn(){var Yr=Hf(ce,0,0,cr,wr,hr).apply(null,J(He,Je)),Gt=(hr?Hf:Yv)(ce,oe-Yr[0],we-Yr[1],cr,wr,hr);return Qe=In(or,ur,br),Yt=wn(J,Gt),en=wn(Qe,Yt),pt=t0(Yt,it),mn()}function mn(){return Wt=gn=null,qt}return function(){return J=I.apply(this,arguments),qt.invert=J.invert&&ia,Rn()}}function Yl(I){var J=0,ce=s/3,oe=Bf(I),we=oe(J,ce);return we.parallels=function(He){return arguments.length?oe(J=He[0]*d,ce=He[1]*d):[J*h,ce*h]},we}function Of(I){var J=x(I);function ce(oe,we){return[oe*J,S(we)/J]}return ce.invert=function(oe,we){return[oe/J,O(we*J)]},ce}function n0(I,J){var ce=S(I),oe=(ce+S(J))/2;if(m(oe)=.12&&jr<.234&&et>=-.425&&et<-.214?we:jr>=.166&&jr<.234&&et>=-.214&&et<-.115?Je:ce).invert(cr)},Qe.stream=function(cr){return I&&J===cr?I:I=Gv([ce.stream(J=cr),we.stream(cr),Je.stream(cr)])},Qe.precision=function(cr){return arguments.length?(ce.precision(cr),we.precision(cr),Je.precision(cr),hr()):ce.precision()},Qe.scale=function(cr){return arguments.length?(ce.scale(cr),we.scale(cr*.35),Je.scale(cr),Qe.translate(ce.translate())):ce.scale()},Qe.translate=function(cr){if(!arguments.length)return ce.translate();var wr=ce.scale(),Lr=+cr[0],et=+cr[1];return oe=ce.translate(cr).clipExtent([[Lr-.455*wr,et-.238*wr],[Lr+.455*wr,et+.238*wr]]).stream(br),He=we.translate([Lr-.307*wr,et+.201*wr]).clipExtent([[Lr-.425*wr+o,et+.12*wr+o],[Lr-.214*wr-o,et+.234*wr-o]]).stream(br),or=Je.translate([Lr-.205*wr,et+.212*wr]).clipExtent([[Lr-.214*wr+o,et+.166*wr+o],[Lr-.115*wr-o,et+.234*wr-o]]).stream(br),hr()},Qe.fitExtent=function(cr,wr){return Ps(Qe,cr,wr)},Qe.fitSize=function(cr,wr){return Rs(Qe,cr,wr)},Qe.fitWidth=function(cr,wr){return Rf(Qe,cr,wr)},Qe.fitHeight=function(cr,wr){return po(Qe,cr,wr)};function hr(){return I=J=null,Qe}return Qe.scale(1070)}function Wi(I){return function(J,ce){var oe=x(J),we=x(ce),He=I(oe*we);return[He*we*S(J),He*S(ce)]}}function Ai(I){return function(J,ce){var oe=D(J*J+ce*ce),we=I(oe),He=S(we),Je=x(we);return[y(J*He,oe*Je),O(oe&&ce*He/oe)]}}var Ia=Wi(function(I){return D(2/(1+I))});Ia.invert=Ai(function(I){return 2*O(I/2)});function Wv(){return Mi(Ia).scale(124.75).clipAngle(180-.001)}var Gl=Wi(function(I){return(I=F(I))&&I/S(I)});Gl.invert=Ai(function(I){return I});function i0(){return Mi(Gl).scale(79.4188).clipAngle(180-.001)}function Za(I,J){return[I,_(z((u+J)/2))]}Za.invert=function(I,J){return[I,2*g(b(J))-u]};function o0(){return l0(Za).scale(961/v)}function l0(I){var J=Mi(I),ce=J.center,oe=J.scale,we=J.translate,He=J.clipExtent,Je=null,or,ur,br;J.scale=function(hr){return arguments.length?(oe(hr),Qe()):oe()},J.translate=function(hr){return arguments.length?(we(hr),Qe()):we()},J.center=function(hr){return arguments.length?(ce(hr),Qe()):ce()},J.clipExtent=function(hr){return arguments.length?(hr==null?Je=or=ur=br=null:(Je=+hr[0][0],or=+hr[0][1],ur=+hr[1][0],br=+hr[1][1]),Qe()):Je==null?null:[[Je,or],[ur,br]]};function Qe(){var hr=s*oe(),cr=J(ms(J.rotate()).invert([0,0]));return He(Je==null?[[cr[0]-hr,cr[1]-hr],[cr[0]+hr,cr[1]+hr]]:I===Za?[[Math.max(cr[0]-hr,Je),or],[Math.min(cr[0]+hr,ur),br]]:[[Je,Math.max(cr[1]-hr,or)],[ur,Math.min(cr[1]+hr,br)]])}return Qe()}function zs(I){return z((u+I)/2)}function s0(I,J){var ce=x(I),oe=I===J?S(I):_(ce/x(J))/_(zs(J)/zs(I)),we=ce*A(zs(I),oe)/oe;if(!oe)return Za;function He(Je,or){we>0?or<-u+o&&(or=-u+o):or>u-o&&(or=u-o);var ur=we/A(zs(or),oe);return[ur*S(oe*Je),we-ur*x(oe*Je)]}return He.invert=function(Je,or){var ur=we-or,br=k(oe)*D(Je*Je+ur*ur),Qe=y(Je,m(ur))*k(ur);return ur*oe<0&&(Qe-=s*k(Je)*k(ur)),[Qe/oe,2*g(A(we/br,1/oe))-u]},He}function Mu(){return Yl(s0).scale(109.5).parallels([30,30])}function Ns(I,J){return[I,J]}Ns.invert=Ns;function Au(){return Mi(Ns).scale(152.63)}function Fs(I,J){var ce=x(I),oe=I===J?S(I):(ce-x(J))/(J-I),we=ce/oe+I;if(m(oe)o&&--oe>0);return[I/(.8707+(He=ce*ce)*(-.131979+He*(-.013791+He*He*He*(.003971-.001529*He)))),ce]};function Su(){return Mi(Uf).scale(175.295)}function Wn(I,J){return[x(J)*S(I),S(J)]}Wn.invert=Ai(O);function li(){return Mi(Wn).scale(249.5).clipAngle(90+o)}function Wl(I,J){var ce=x(J),oe=1+x(I)*ce;return[ce*S(I)/oe,S(J)/oe]}Wl.invert=Ai(function(I){return 2*g(I)});function Cu(){return Mi(Wl).scale(250).clipAngle(142)}function Os(I,J){return[_(z((u+J)/2)),-I]}Os.invert=function(I,J){return[-J,2*g(b(I))-u]};function Yf(){var I=l0(Os),J=I.center,ce=I.rotate;return I.center=function(oe){return arguments.length?J([-oe[1],oe[0]]):(oe=J(),[oe[1],-oe[0]])},I.rotate=function(oe){return arguments.length?ce([oe[0],oe[1],oe.length>2?oe[2]+90:90]):(oe=ce(),[oe[0],oe[1],oe[2]-90])},ce([0,0,90]).scale(159.155)}e.geoAlbers=a0,e.geoAlbersUsa=Vv,e.geoArea=W,e.geoAzimuthalEqualArea=Wv,e.geoAzimuthalEqualAreaRaw=Ia,e.geoAzimuthalEquidistant=i0,e.geoAzimuthalEquidistantRaw=Gl,e.geoBounds=_e,e.geoCentroid=Na,e.geoCircle=ys,e.geoClipAntimeridian=Dn,e.geoClipCircle=wf,e.geoClipExtent=vu,e.geoClipRectangle=Vo,e.geoConicConformal=Mu,e.geoConicConformalRaw=s0,e.geoConicEqualArea=el,e.geoConicEqualAreaRaw=n0,e.geoConicEquidistant=Zv,e.geoConicEquidistantRaw=Fs,e.geoContains=Ms,e.geoDistance=Zo,e.geoEqualEarth=u0,e.geoEqualEarthRaw=Bs,e.geoEquirectangular=Au,e.geoEquirectangularRaw=Ns,e.geoGnomonic=f0,e.geoGnomonicRaw=ku,e.geoGraticule=jc,e.geoGraticule10=Ts,e.geoIdentity=c0,e.geoInterpolate=Fv,e.geoLength=_s,e.geoMercator=o0,e.geoMercatorRaw=Za,e.geoNaturalEarth1=Su,e.geoNaturalEarth1Raw=Uf,e.geoOrthographic=li,e.geoOrthographicRaw=Wn,e.geoPath=Pf,e.geoProjection=Mi,e.geoProjectionMutator=Bf,e.geoRotation=ms,e.geoStereographic=Cu,e.geoStereographicRaw=Wl,e.geoStream=ee,e.geoTransform=Uv,e.geoTransverseMercator=Yf,e.geoTransverseMercatorRaw=Os,Object.defineProperty(e,"__esModule",{value:!0})})});var lF=te((ny,oF)=>{(function(e,r){typeof ny=="object"&&typeof oF!="undefined"?r(ny,n_(),t_()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],r):r(e.d3=e.d3||{},e.d3,e.d3)})(ny,function(e,r,t){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,l=Math.exp,s=Math.floor,u=Math.log,f=Math.max,v=Math.min,h=Math.pow,d=Math.round,m=Math.sign||function(T){return T>0?1:T<0?-1:0},g=Math.sin,y=Math.tan,x=1e-6,M=1e-12,b=Math.PI,_=b/2,A=b/4,S=Math.SQRT1_2,k=V(2),D=V(b),z=b*2,F=180/b,O=b/180;function G(T){return T?T/Math.sin(T):1}function B(T){return T>1?_:T<-1?-_:Math.asin(T)}function X(T){return T>1?0:T<-1?b:Math.acos(T)}function V(T){return T>0?Math.sqrt(T):0}function re(T){return T=l(2*T),(T-1)/(T+1)}function ne(T){return(l(T)-l(-T))/2}function K(T){return(l(T)+l(-T))/2}function ee(T){return u(T+V(T*T+1))}function fe(T){return u(T+V(T*T-1))}function de(T){var L=y(T/2),P=2*u(o(T/2))/(L*L);function R(U,H){var Z=o(U),ue=o(H),ve=g(H),le=ue*Z,he=-((1-le?u((1+le)/2)/(1-le):-.5)+P/(1+le));return[he*ue*g(U),he*ve]}return R.invert=function(U,H){var Z=V(U*U+H*H),ue=-T/2,ve=50,le;if(!Z)return[0,0];do{var he=ue/2,xe=o(he),Le=g(he),ze=Le/xe,tr=-u(n(xe));ue-=le=(2/ze*tr-P*ze-Z)/(-tr/(Le*Le)+1-P/(2*xe*xe))*(xe<0?.7:1)}while(n(le)>x&&--ve>0);var vr=g(ue);return[i(U*vr,Z*o(ue)),B(H*vr/Z)]},R}function qe(){var T=_,L=r.geoProjectionMutator(de),P=L(T);return P.radius=function(R){return arguments.length?L(T=R*O):T*F},P.scale(179.976).clipAngle(147)}function Be(T,L){var P=o(L),R=G(X(P*o(T/=2)));return[2*P*g(T)*R,g(L)*R]}Be.invert=function(T,L){if(!(T*T+4*L*L>b*b+x)){var P=T,R=L,U=25;do{var H=g(P),Z=g(P/2),ue=o(P/2),ve=g(R),le=o(R),he=g(2*R),xe=ve*ve,Le=le*le,ze=Z*Z,tr=1-Le*ue*ue,vr=tr?X(le*ue)*V(Ar=1/tr):Ar=0,Ar,Zr=2*vr*le*Z-T,at=vr*ve-L,ot=Ar*(Le*ze+vr*le*ue*xe),st=Ar*(.5*H*he-vr*2*ve*Z),vt=Ar*.25*(he*Z-vr*ve*Le*H),an=Ar*(xe*ue+vr*ze*le),Mn=st*vt-an*ot;if(!Mn)break;var Ft=(at*st-Zr*an)/Mn,zn=(Zr*vt-at*ot)/Mn;P-=Ft,R-=zn}while((n(Ft)>x||n(zn)>x)&&--U>0);return[P,R]}};function Ne(){return r.geoProjection(Be).scale(152.63)}function Ie(T){var L=g(T),P=o(T),R=T>=0?1:-1,U=y(R*T),H=(1+L-P)/2;function Z(ue,ve){var le=o(ve),he=o(ue/=2);return[(1+le)*g(ue),(R*ve>-i(he,U)-.001?0:-R*10)+H+g(ve)*P-(1+le)*L*he]}return Z.invert=function(ue,ve){var le=0,he=0,xe=50;do{var Le=o(le),ze=g(le),tr=o(he),vr=g(he),Ar=1+tr,Zr=Ar*ze-ue,at=H+vr*P-Ar*L*Le-ve,ot=Ar*Le/2,st=-ze*vr,vt=L*Ar*ze/2,an=P*tr+L*Le*vr,Mn=st*vt-an*ot,Ft=(at*st-Zr*an)/Mn/2,zn=(Zr*vt-at*ot)/Mn;n(zn)>2&&(zn/=2),le-=Ft,he-=zn}while((n(Ft)>x||n(zn)>x)&&--xe>0);return R*he>-i(o(le),U)-.001?[le*2,he]:null},Z}function Se(){var T=20*O,L=T>=0?1:-1,P=y(L*T),R=r.geoProjectionMutator(Ie),U=R(T),H=U.stream;return U.parallel=function(Z){return arguments.length?(P=y((L=(T=Z*O)>=0?1:-1)*T),R(T)):T*F},U.stream=function(Z){var ue=U.rotate(),ve=H(Z),le=(U.rotate([0,0]),H(Z)),he=U.precision();return U.rotate(ue),ve.sphere=function(){le.polygonStart(),le.lineStart();for(var xe=L*-180;L*xe<180;xe+=L*90)le.point(xe,L*90);if(T)for(;L*(xe-=3*L*he)>=-180;)le.point(xe,L*-i(o(xe*O/2),P)*F);le.lineEnd(),le.polygonEnd()},ve},U.scale(218.695).center([0,28.0974])}function Xe(T,L){var P=y(L/2),R=V(1-P*P),U=1+R*o(T/=2),H=g(T)*R/U,Z=P/U,ue=H*H,ve=Z*Z;return[4/3*H*(3+ue-3*ve),4/3*Z*(3+3*ue-ve)]}Xe.invert=function(T,L){if(T*=3/8,L*=3/8,!T&&n(L)>1)return null;var P=T*T,R=L*L,U=1+P+R,H=V((U-V(U*U-4*L*L))/2),Z=B(H)/3,ue=H?fe(n(L/H))/3:ee(n(T))/3,ve=o(Z),le=K(ue),he=le*le-ve*ve;return[m(T)*2*i(ne(ue)*ve,.25-he),m(L)*2*i(le*g(Z),.25+he)]};function se(){return r.geoProjection(Xe).scale(66.1603)}var be=V(8),Te=u(1+k);function pe(T,L){var P=n(L);return PM&&--R>0);return[T/(o(P)*(be-1/g(P))),m(L)*P]};function W(){return r.geoProjection(pe).scale(112.314)}function Q(T){var L=2*b/T;function P(R,U){var H=r.geoAzimuthalEquidistantRaw(R,U);if(n(R)>_){var Z=i(H[1],H[0]),ue=V(H[0]*H[0]+H[1]*H[1]),ve=L*d((Z-_)/L)+_,le=i(g(Z-=ve),2-o(Z));Z=ve+B(b/ue*g(le))-le,H[0]=ue*o(Z),H[1]=ue*g(Z)}return H}return P.invert=function(R,U){var H=V(R*R+U*U);if(H>_){var Z=i(U,R),ue=L*d((Z-_)/L)+_,ve=Z>ue?-1:1,le=H*o(ue-Z),he=1/y(ve*X((le-b)/V(b*(b-2*le)+H*H)));Z=ue+2*a((he+ve*V(he*he-3))/3),R=H*o(Z),U=H*g(Z)}return r.geoAzimuthalEquidistantRaw.invert(R,U)},P}function $(){var T=5,L=r.geoProjectionMutator(Q),P=L(T),R=P.stream,U=.01,H=-o(U*O),Z=g(U*O);return P.lobes=function(ue){return arguments.length?L(T=+ue):T},P.stream=function(ue){var ve=P.rotate(),le=R(ue),he=(P.rotate([0,0]),R(ue));return P.rotate(ve),le.sphere=function(){he.polygonStart(),he.lineStart();for(var xe=0,Le=360/T,ze=2*b/T,tr=90-180/T,vr=_;xe0&&n(U)>x);return R<0?NaN:P}function nr(T,L,P){return L===void 0&&(L=40),P===void 0&&(P=M),function(R,U,H,Z){var ue,ve,le;H=H===void 0?0:+H,Z=Z===void 0?0:+Z;for(var he=0;heue){H-=ve/=2,Z-=le/=2;continue}ue=tr;var vr=(H>0?-1:1)*P,Ar=(Z>0?-1:1)*P,Zr=T(H+vr,Z),at=T(H,Z+Ar),ot=(Zr[0]-xe[0])/vr,st=(Zr[1]-xe[1])/vr,vt=(at[0]-xe[0])/Ar,an=(at[1]-xe[1])/Ar,Mn=an*ot-st*vt,Ft=(n(Mn)<.5?.5:1)/Mn;if(ve=(ze*vt-Le*an)*Ft,le=(Le*st-ze*ot)*Ft,H+=ve,Z+=le,n(ve)0&&(ue[1]*=1+ve/1.5*ue[0]*ue[0]),ue}return R.invert=nr(R),R}function ar(){return r.geoProjection(Ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function lr(T,L){var P=T*g(L),R=30,U;do L-=U=(L+g(L)-P)/(1+o(L));while(n(U)>x&&--R>0);return L/2}function ir(T,L,P){function R(U,H){return[T*U*o(H=lr(P,H)),L*g(H)]}return R.invert=function(U,H){return H=B(H/L),[U/(T*o(H)),B((2*H+g(2*H))/P)]},R}var rr=ir(k/_,k,b);function Cr(){return r.geoProjection(rr).scale(169.529)}var yr=2.00276,Ae=1.11072;function Ve(T,L){var P=lr(b,L);return[yr*T/(1/o(L)+Ae/o(P)),(L+k*g(P))/yr]}Ve.invert=function(T,L){var P=yr*L,R=L<0?-A:A,U=25,H,Z;do Z=P-k*g(R),R-=H=(g(2*R)+2*R-b*g(Z))/(2*o(2*R)+2+b*o(Z)*k*o(R));while(n(H)>x&&--U>0);return Z=P-k*g(R),[T*(1/o(Z)+Ae/o(R))/yr,Z]};function je(){return r.geoProjection(Ve).scale(160.857)}function zr(T){var L=0,P=r.geoProjectionMutator(T),R=P(L);return R.parallel=function(U){return arguments.length?P(L=U*O):L*F},R}function kr(T,L){return[T*o(L),L]}kr.invert=function(T,L){return[T/o(L),L]};function er(){return r.geoProjection(kr).scale(152.63)}function Ke(T){if(!T)return kr;var L=1/y(T);function P(R,U){var H=L+T-U,Z=H&&R*o(U)/H;return[H*g(Z),L-H*o(Z)]}return P.invert=function(R,U){var H=V(R*R+(U=L-U)*U),Z=L+T-H;return[H/o(Z)*i(R,U),Z]},P}function mr(){return zr(Ke).scale(123.082).center([0,26.1441]).parallel(45)}function Mr(T){function L(P,R){var U=_-R,H=U&&P*T*g(U)/U;return[U*g(H)/T,_-U*o(H)]}return L.invert=function(P,R){var U=P*T,H=_-R,Z=V(U*U+H*H),ue=i(U,H);return[(Z?Z/g(Z):1)*ue/T,_-Z]},L}function gr(){var T=.5,L=r.geoProjectionMutator(Mr),P=L(T);return P.fraction=function(R){return arguments.length?L(T=+R):T},P.scale(158.837)}var dr=ir(1,4/b,b);function Tr(){return r.geoProjection(dr).scale(152.63)}function Pr(T,L,P,R,U,H){var Z=o(H),ue;if(n(T)>1||n(H)>1)ue=X(P*U+L*R*Z);else{var ve=g(T/2),le=g(H/2);ue=2*B(V(ve*ve+L*R*le*le))}return n(ue)>x?[ue,i(R*g(H),L*U-P*R*Z)]:[0,0]}function Ur(T,L,P){return X((T*T+L*L-P*P)/(2*T*L))}function sr(T){return T-2*b*s((T+b)/(2*b))}function _e(T,L,P){for(var R=[[T[0],T[1],g(T[1]),o(T[1])],[L[0],L[1],g(L[1]),o(L[1])],[P[0],P[1],g(P[1]),o(P[1])]],U=R[2],H,Z=0;Z<3;++Z,U=H)H=R[Z],U.v=Pr(H[1]-U[1],U[3],U[2],H[3],H[2],H[0]-U[0]),U.point=[0,0];var ue=Ur(R[0].v[0],R[2].v[0],R[1].v[0]),ve=Ur(R[0].v[0],R[1].v[0],R[2].v[0]),le=b-ue;R[2].point[1]=0,R[0].point[0]=-(R[1].point[0]=R[0].v[0]/2);var he=[R[2].point[0]=R[0].point[0]+R[2].v[0]*o(ue),2*(R[0].point[1]=R[1].point[1]=R[2].v[0]*g(ue))];function xe(Le,ze){var tr=g(ze),vr=o(ze),Ar=new Array(3),Zr;for(Zr=0;Zr<3;++Zr){var at=R[Zr];if(Ar[Zr]=Pr(ze-at[1],at[3],at[2],vr,tr,Le-at[0]),!Ar[Zr][0])return at.point;Ar[Zr][1]=sr(Ar[Zr][1]-at.v[1])}var ot=he.slice();for(Zr=0;Zr<3;++Zr){var st=Zr==2?0:Zr+1,vt=Ur(R[Zr].v[0],Ar[Zr][0],Ar[st][0]);Ar[Zr][1]<0&&(vt=-vt),Zr?Zr==1?(vt=ve-vt,ot[0]-=Ar[Zr][0]*o(vt),ot[1]-=Ar[Zr][0]*g(vt)):(vt=le-vt,ot[0]+=Ar[Zr][0]*o(vt),ot[1]+=Ar[Zr][0]*g(vt)):(ot[0]+=Ar[Zr][0]*o(vt),ot[1]-=Ar[Zr][0]*g(vt))}return ot[0]/=3,ot[1]/=3,ot}return xe}function ke(T){return T[0]*=O,T[1]*=O,T}function $e(){return We([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function We(T,L,P){var R=r.geoCentroid({type:"MultiPoint",coordinates:[T,L,P]}),U=[-R[0],-R[1]],H=r.geoRotation(U),Z=_e(ke(H(T)),ke(H(L)),ke(H(P)));Z.invert=nr(Z);var ue=r.geoProjection(Z).rotate(U),ve=ue.center;return delete ue.rotate,ue.center=function(le){return arguments.length?ve(H(le)):H.invert(ve())},ue.clipAngle(90)}function qr(T,L){var P=V(1-g(L));return[2/D*T*P,D*(1-P)]}qr.invert=function(T,L){var P=(P=L/D-1)*P;return[P>0?T*V(b/P)/2:0,B(1-P)]};function Vr(){return r.geoProjection(qr).scale(95.6464).center([0,30])}function Hr(T){var L=y(T);function P(R,U){return[R,(R?R/g(R):1)*(g(U)*o(R)-L*o(U))]}return P.invert=L?function(R,U){R&&(U*=g(R)/R);var H=o(R);return[R,2*i(V(H*H+L*L-U*U)-H,L-U)]}:function(R,U){return[R,B(R?U*y(R)/R:U)]},P}function lt(){return zr(Hr).scale(249.828).clipAngle(90)}var xt=V(3);function Rt(T,L){return[xt*T*(2*o(2*L/3)-1)/D,xt*D*g(L/3)]}Rt.invert=function(T,L){var P=3*B(L/(xt*D));return[D*T/(xt*(2*o(2*P/3)-1)),P]};function St(){return r.geoProjection(Rt).scale(156.19)}function hn(T){var L=o(T);function P(R,U){return[R*L,g(U)/L]}return P.invert=function(R,U){return[R/L,B(U*L)]},P}function Fn(){return zr(hn).parallel(38.58).scale(195.044)}function $n(T){var L=o(T);function P(R,U){return[R*L,(1+L)*y(U/2)]}return P.invert=function(R,U){return[R/L,a(U/(1+L))*2]},P}function Xt(){return zr($n).scale(124.75)}function cn(T,L){var P=V(8/(3*b));return[P*T*(1-n(L)/b),P*L]}cn.invert=function(T,L){var P=V(8/(3*b)),R=L/P;return[T/(P*(1-n(R)/b)),R]};function sn(){return r.geoProjection(cn).scale(165.664)}function Kt(T,L){var P=V(4-3*g(n(L)));return[2/V(6*b)*T*P,m(L)*V(2*b/3)*(2-P)]}Kt.invert=function(T,L){var P=2-n(L)/V(2*b/3);return[T*V(6*b)/(2*P),m(L)*B((4-P*P)/3)]};function aa(){return r.geoProjection(Kt).scale(165.664)}function rt(T,L){var P=V(b*(4+b));return[2/P*T*(1+V(1-4*L*L/(b*b))),4/P*L]}rt.invert=function(T,L){var P=V(b*(4+b))/2;return[T*P/(1+V(1-L*L*(4+b)/(4*b))),L*P/2]};function Qt(){return r.geoProjection(rt).scale(180.739)}function Ct(T,L){var P=(2+_)*g(L);L/=2;for(var R=0,U=1/0;R<10&&n(U)>x;R++){var H=o(L);L-=U=(L+g(L)*(H+2)-P)/(2*H*(1+H))}return[2/V(b*(4+b))*T*(1+o(L)),2*V(b/(4+b))*g(L)]}Ct.invert=function(T,L){var P=L*V((4+b)/b)/2,R=B(P),U=o(R);return[T/(2/V(b*(4+b))*(1+U)),B((R+P*(U+2))/(2+_))]};function dn(){return r.geoProjection(Ct).scale(180.739)}function pn(T,L){return[T*(1+o(L))/V(2+b),2*L/V(2+b)]}pn.invert=function(T,L){var P=V(2+b),R=L*P/2;return[P*T/(1+o(R)),R]};function tn(){return r.geoProjection(pn).scale(173.044)}function un(T,L){for(var P=(1+_)*g(L),R=0,U=1/0;R<10&&n(U)>x;R++)L-=U=(L+g(L)-P)/(1+o(L));return P=V(2+b),[T*(1+o(L))/P,2*L/P]}un.invert=function(T,L){var P=1+_,R=V(P/2);return[T*2*R/(1+o(L*=R)),B((L+g(L))/P)]};function ha(){return r.geoProjection(un).scale(173.044)}var Sn=3+2*k;function Na(T,L){var P=g(T/=2),R=o(T),U=V(o(L)),H=o(L/=2),Z=g(L)/(H+k*R*U),ue=V(2/(1+Z*Z)),ve=V((k*H+(R+P)*U)/(k*H+(R-P)*U));return[Sn*(ue*(ve-1/ve)-2*u(ve)),Sn*(ue*Z*(ve+1/ve)-2*a(Z))]}Na.invert=function(T,L){if(!(H=Xe.invert(T/1.2,L*1.065)))return null;var P=H[0],R=H[1],U=20,H;T/=Sn,L/=Sn;do{var Z=P/2,ue=R/2,ve=g(Z),le=o(Z),he=g(ue),xe=o(ue),Le=o(R),ze=V(Le),tr=he/(xe+k*le*ze),vr=tr*tr,Ar=V(2/(1+vr)),Zr=k*xe+(le+ve)*ze,at=k*xe+(le-ve)*ze,ot=Zr/at,st=V(ot),vt=st-1/st,an=st+1/st,Mn=Ar*vt-2*u(st)-T,Ft=Ar*tr*an-2*a(tr)-L,zn=he&&S*ze*ve*vr/he,ga=(k*le*xe+ze)/(2*(xe+k*le*ze)*(xe+k*le*ze)*ze),ui=-.5*tr*Ar*Ar*Ar,il=ui*zn,Us=ui*ga,La=(La=2*xe+k*ze*(le-ve))*La*st,qa=(k*le*xe*ze+Le)/La,ji=-(k*ve*he)/(ze*La),ol=vt*il-2*qa/st+Ar*(qa+qa/ot),ll=vt*Us-2*ji/st+Ar*(ji+ji/ot),sl=tr*an*il-2*zn/(1+vr)+Ar*an*zn+Ar*tr*(qa-qa/ot),Xl=tr*an*Us-2*ga/(1+vr)+Ar*an*ga+Ar*tr*(ji-ji/ot),go=ll*sl-Xl*ol;if(!go)break;var Ys=(Ft*ll-Mn*Xl)/go,Wf=(Mn*sl-Ft*ol)/go;P-=Ys,R=f(-_,v(_,R-Wf))}while((n(Ys)>x||n(Wf)>x)&&--U>0);return n(n(R)-_)R){var xe=V(he),Le=i(le,ve),ze=P*d(Le/P),tr=Le-ze,vr=T*o(tr),Ar=(T*g(tr)-tr*g(vr))/(_-vr),Zr=Hn(tr,Ar),at=(b-T)/yi(Zr,vr,b);ve=xe;var ot=50,st;do ve-=st=(T+yi(Zr,vr,ve)*at-xe)/(Zr(ve)*at);while(n(st)>x&&--ot>0);le=tr*g(ve),ve<_&&(le-=Ar*(ve-_));var vt=g(ze),an=o(ze);ue[0]=ve*an-le*vt,ue[1]=ve*vt+le*an}return ue}return U.invert=function(H,Z){var ue=H*H+Z*Z;if(ue>R){var ve=V(ue),le=i(Z,H),he=P*d(le/P),xe=le-he;H=ve*o(xe),Z=ve*g(xe);for(var Le=H-_,ze=g(H),tr=Z/ze,vr=H<_?1/0:0,Ar=10;;){var Zr=T*g(tr),at=T*o(tr),ot=g(at),st=_-at,vt=(Zr-tr*ot)/st,an=Hn(tr,vt);if(n(vr)x||n(tr)>x)&&--vr>0);return[xe,Le]},ve}var Kr=bi(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Lt(){return r.geoProjection(Kr).scale(149.995)}var Ht=bi(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Br(){return r.geoProjection(Ht).scale(153.93)}var Vn=bi(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function nn(){return r.geoProjection(Vn).scale(130.945)}function Dn(T,L){var P=T*T,R=L*L;return[T*(1-.162388*R)*(.87-952426e-9*P*P),L*(1+R/12)]}Dn.invert=function(T,L){var P=T,R=L,U=50,H;do{var Z=R*R;R-=H=(R*(1+Z/12)-L)/(1+Z/4)}while(n(H)>x&&--U>0);U=50,T/=1-.162388*Z;do{var ue=(ue=P*P)*ue;P-=H=(P*(.87-952426e-9*ue)-T)/(.87-.00476213*ue)}while(n(H)>x&&--U>0);return[P,R]};function At(){return r.geoProjection(Dn).scale(131.747)}var Wa=bi(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Yo(){return r.geoProjection(Wa).scale(131.087)}function wf(T){var L=T(_,0)[0]-T(-_,0)[0];function P(R,U){var H=R>0?-.5:.5,Z=T(R+H*b,U);return Z[0]-=H*L,Z}return T.invert&&(P.invert=function(R,U){var H=R>0?-.5:.5,Z=T.invert(R+H*L,U),ue=Z[0]-H*b;return ue<-b?ue+=2*b:ue>b&&(ue-=2*b),Z[0]=ue,Z}),P}function cu(T,L){var P=m(T),R=m(L),U=o(L),H=o(T)*U,Z=g(T)*U,ue=g(R*L);T=n(i(Z,ue)),L=B(H),n(T-_)>x&&(T%=_);var ve=oo(T>b/4?_-T:T,L);return T>b/4&&(ue=ve[0],ve[0]=-ve[1],ve[1]=-ue),ve[0]*=P,ve[1]*=-R,ve}cu.invert=function(T,L){n(T)>1&&(T=m(T)*2-T),n(L)>1&&(L=m(L)*2-L);var P=m(T),R=m(L),U=-P*T,H=-R*L,Z=H/U<1,ue=Go(Z?H:U,Z?U:H),ve=ue[0],le=ue[1],he=o(le);return Z&&(ve=-_-ve),[P*(i(g(ve)*he,-g(le))+b),R*B(o(ve)*he)]};function oo(T,L){if(L===_)return[0,0];var P=g(L),R=P*P,U=R*R,H=1+U,Z=1+3*U,ue=1-U,ve=B(1/V(H)),le=ue+R*H*ve,he=(1-P)/le,xe=V(he),Le=he*H,ze=V(Le),tr=xe*ue,vr,Ar;if(T===0)return[0,-(tr+R*ze)];var Zr=o(L),at=1/Zr,ot=2*P*Zr,st=(-3*R+ve*Z)*ot,vt=(-le*Zr-(1-P)*st)/(le*le),an=.5*vt/xe,Mn=ue*an-2*R*xe*ot,Ft=R*H*vt+he*Z*ot,zn=-at*ot,ga=-at*Ft,ui=-2*at*Mn,il=4*T/b,Us;if(T>.222*b||L.175*b){if(vr=(tr+R*V(Le*(1+U)-tr*tr))/(1+U),T>b/4)return[vr,vr];var La=vr,qa=.5*vr;vr=.5*(qa+La),Ar=50;do{var ji=V(Le-vr*vr),ol=vr*(ui+zn*ji)+ga*B(vr/ze)-il;if(!ol)break;ol<0?qa=vr:La=vr,vr=.5*(qa+La)}while(n(La-qa)>x&&--Ar>0)}else{vr=x,Ar=25;do{var ll=vr*vr,sl=V(Le-ll),Xl=ui+zn*sl,go=vr*Xl+ga*B(vr/ze)-il,Ys=Xl+(ga-zn*ll)/sl;vr-=Us=sl?go/Ys:0}while(n(Us)>x&&--Ar>0)}return[vr,-tr-R*V(Le-vr*vr)]}function Go(T,L){for(var P=0,R=1,U=.5,H=50;;){var Z=U*U,ue=V(U),ve=B(1/V(1+Z)),le=1-Z+U*(1+Z)*ve,he=(1-ue)/le,xe=V(he),Le=he*(1+Z),ze=xe*(1-Z),tr=Le-T*T,vr=V(tr),Ar=L+ze+U*vr;if(n(R-P)0?P=U:R=U,U=.5*(P+R)}if(!H)return null;var Zr=B(ue),at=o(Zr),ot=1/at,st=2*ue*at,vt=(-3*U+ve*(1+3*Z))*st,an=(-le*at-(1-ue)*vt)/(le*le),Mn=.5*an/xe,Ft=(1-Z)*Mn-2*U*xe*st,zn=-2*ot*Ft,ga=-ot*st,ui=-ot*(U*(1+Z)*an+he*(1+3*Z)*st);return[b/4*(T*(zn+ga*vr)+ui*B(T/V(Le))),Zr]}function Vo(){return r.geoProjection(wf(cu)).scale(239.75)}function vu(T,L,P){var R,U,H;return T?(R=Pl(T,P),L?(U=Pl(L,1-P),H=U[1]*U[1]+P*R[0]*R[0]*U[0]*U[0],[[R[0]*U[2]/H,R[1]*R[2]*U[0]*U[1]/H],[R[1]*U[1]/H,-R[0]*R[2]*U[0]*U[2]/H],[R[2]*U[1]*U[2]/H,-P*R[0]*R[1]*U[0]/H]]):[[R[0],0],[R[1],0],[R[2],0]]):(U=Pl(L,1-P),[[0,U[0]/U[1]],[1/U[1],0],[U[2]/U[1],0]])}function Pl(T,L){var P,R,U,H,Z;if(L=1-x)return P=(1-L)/4,R=K(T),H=re(T),U=1/R,Z=R*ne(T),[H+P*(Z-T)/(R*R),U-P*H*U*(Z-T),U+P*H*U*(Z+T),2*a(l(T))-_+P*(Z-T)/R];var ue=[1,0,0,0,0,0,0,0,0],ve=[V(L),0,0,0,0,0,0,0,0],le=0;for(R=V(1-L),Z=1;n(ve[le]/ue[le])>x&&le<8;)P=ue[le++],ve[le]=(P-R)/2,ue[le]=(P+R)/2,R=V(P*R),Z*=2;U=Z*ue[le]*T;do H=ve[le]*g(R=U)/ue[le],U=(B(H)+U)/2;while(--le);return[g(U),H=o(U),H/o(U-R),U]}function Rl(T,L,P){var R=n(T),U=n(L),H=ne(U);if(R){var Z=1/g(R),ue=1/(y(R)*y(R)),ve=-(ue+P*(H*H*Z*Z)-1+P),le=(P-1)*ue,he=(-ve+V(ve*ve-4*le))/2;return[_i(a(1/V(he)),P)*m(T),_i(a(V((he/ue-1)/P)),1-P)*m(L)]}return[0,_i(a(H),1-P)*m(L)]}function _i(T,L){if(!L)return T;if(L===1)return u(y(T/2+A));for(var P=1,R=V(1-L),U=V(L),H=0;n(U)>x;H++){if(T%b){var Z=a(R*y(T)/P);Z<0&&(Z+=b),T+=Z+~~(T/b)*b}else T+=T;U=(P+R)/2,R=V(P*R),U=((P=U)-R)/2}return T/(h(2,H)*P)}function lo(T,L){var P=(k-1)/(k+1),R=V(1-P*P),U=_i(_,R*R),H=-1,Z=u(y(b/4+n(L)/2)),ue=l(H*Z)/V(P),ve=Wo(ue*o(H*T),ue*g(H*T)),le=Rl(ve[0],ve[1],R*R);return[-le[1],(L>=0?1:-1)*(.5*U-le[0])]}function Wo(T,L){var P=T*T,R=L+1,U=1-P-L*L;return[.5*((T>=0?_:-_)-i(U,2*T)),-.25*u(U*U+4*P)+.5*u(R*R+P)]}function zl(T,L){var P=L[0]*L[0]+L[1]*L[1];return[(T[0]*L[0]+T[1]*L[1])/P,(T[1]*L[0]-T[0]*L[1])/P]}lo.invert=function(T,L){var P=(k-1)/(k+1),R=V(1-P*P),U=_i(_,R*R),H=-1,Z=vu(.5*U-L,-T,R*R),ue=zl(Z[0],Z[1]),ve=i(ue[1],ue[0])/H;return[ve,2*a(l(.5/H*u(P*ue[0]*ue[0]+P*ue[1]*ue[1])))-_]};function bs(){return r.geoProjection(wf(lo)).scale(151.496)}function Mf(T){var L=g(T),P=o(T),R=Zc(T);R.invert=Zc(-T);function U(H,Z){var ue=R(H,Z);H=ue[0],Z=ue[1];var ve=g(Z),le=o(Z),he=o(H),xe=X(L*ve+P*le*he),Le=g(xe),ze=n(Le)>x?xe/Le:1;return[ze*P*g(H),(n(H)>_?ze:-ze)*(L*le-P*ve*he)]}return U.invert=function(H,Z){var ue=V(H*H+Z*Z),ve=-g(ue),le=o(ue),he=ue*le,xe=-Z*ve,Le=ue*L,ze=V(he*he+xe*xe-Le*Le),tr=i(he*Le+xe*ze,xe*Le-he*ze),vr=(ue>_?-1:1)*i(H*ve,ue*o(tr)*le+Z*g(tr)*ve);return R.invert(vr,tr)},U}function Zc(T){var L=g(T),P=o(T);return function(R,U){var H=o(U),Z=o(R)*H,ue=g(R)*H,ve=g(U);return[i(ue,Z*P-ve*L),B(ve*P+Z*L)]}}function _s(){var T=0,L=r.geoProjectionMutator(Mf),P=L(T),R=P.rotate,U=P.stream,H=r.geoCircle();return P.parallel=function(Z){if(!arguments.length)return T*F;var ue=P.rotate();return L(T=Z*O).rotate(ue)},P.rotate=function(Z){return arguments.length?(R.call(P,[Z[0],Z[1]-T*F]),H.center([-Z[0],-Z[1]]),P):(Z=R.call(P),Z[1]+=T*F,Z)},P.stream=function(Z){return Z=U(Z),Z.sphere=function(){Z.polygonStart();var ue=.01,ve=H.radius(90-ue)().coordinates[0],le=ve.length-1,he=-1,xe;for(Z.lineStart();++he=0;)Z.point((xe=ve[he])[0],xe[1]);Z.lineEnd(),Z.polygonEnd()},Z},P.scale(79.4187).parallel(45).clipAngle(180-.001)}var xs=3,ws=B(1-1/xs)*F,Zo=hn(0);function so(T){var L=ws*O,P=qr(b,L)[0]-qr(-b,L)[0],R=Zo(0,L)[1],U=qr(0,L)[1],H=D-U,Z=z/T,ue=4/z,ve=R+H*H*4/z;function le(he,xe){var Le,ze=n(xe);if(ze>L){var tr=v(T-1,f(0,s((he+b)/Z)));he+=b*(T-1)/T-tr*Z,Le=qr(he,ze),Le[0]=Le[0]*z/P-z*(T-1)/(2*T)+tr*z/T,Le[1]=R+(Le[1]-U)*4*H/z,xe<0&&(Le[1]=-Le[1])}else Le=Zo(he,xe);return Le[0]*=ue,Le[1]/=ve,Le}return le.invert=function(he,xe){he/=ue,xe*=ve;var Le=n(xe);if(Le>R){var ze=v(T-1,f(0,s((he+b)/Z)));he=(he+b*(T-1)/T-ze*Z)*P/z;var tr=qr.invert(he,.25*(Le-R)*z/H+U);return tr[0]-=b*(T-1)/T-ze*Z,xe<0&&(tr[1]=-tr[1]),tr}return Zo.invert(he,xe)},le}function uo(T,L){return[T,L&1?90-x:ws]}function Oi(T,L){return[T,L&1?-90+x:-ws]}function Af(T){return[T[0]*(1-x),T[1]]}function hu(T){var L=[].concat(t.range(-180,180+T/2,T).map(uo),t.range(180,-180-T/2,-T).map(Oi));return{type:"Polygon",coordinates:[T===180?L.map(Af):L]}}function Nl(){var T=4,L=r.geoProjectionMutator(so),P=L(T),R=P.stream;return P.lobes=function(U){return arguments.length?L(T=+U):T},P.stream=function(U){var H=P.rotate(),Z=R(U),ue=(P.rotate([0,0]),R(U));return P.rotate(H),Z.sphere=function(){r.geoStream(hu(180/T),ue)},Z},P.scale(239.75)}function Tf(T){var L=1+T,P=g(1/L),R=B(P),U=2*V(b/(H=b+4*R*L)),H,Z=.5*U*(L+V(T*(2+T))),ue=T*T,ve=L*L;function le(he,xe){var Le=1-g(xe),ze,tr;if(Le&&Le<2){var vr=_-xe,Ar=25,Zr;do{var at=g(vr),ot=o(vr),st=R+i(at,L-ot),vt=1+ve-2*L*ot;vr-=Zr=(vr-ue*R-L*at+vt*st-.5*Le*H)/(2*L*at*st)}while(n(Zr)>M&&--Ar>0);ze=U*V(vt),tr=he*st/b}else ze=U*(T+Le),tr=he*R/b;return[ze*g(tr),Z-ze*o(tr)]}return le.invert=function(he,xe){var Le=he*he+(xe-=Z)*xe,ze=(1+ve-Le/(U*U))/(2*L),tr=X(ze),vr=g(tr),Ar=R+i(vr,L-ze);return[B(he/V(Le))*b/Ar,B(1-2*(tr-ue*R-L*vr+(1+ve-2*L*ze)*Ar)/H)]},le}function Xc(){var T=1,L=r.geoProjectionMutator(Tf),P=L(T);return P.ratio=function(R){return arguments.length?L(T=+R):T},P.scale(167.774).center([0,18.67])}var Ms=.7109889596207567,Ui=.0528035274542;function As(T,L){return L>-Ms?(T=rr(T,L),T[1]+=Ui,T):kr(T,L)}As.invert=function(T,L){return L>-Ms?rr.invert(T,L-Ui):kr.invert(T,L)};function jc(){return r.geoProjection(As).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ts(T,L){return n(L)>Ms?(T=rr(T,L),T[1]-=L>0?Ui:-Ui,T):kr(T,L)}Ts.invert=function(T,L){return n(L)>Ms?rr.invert(T,L+(L>0?Ui:-Ui)):kr.invert(T,L)};function Fv(){return r.geoProjection(Ts).scale(152.63)}function Xo(T,L,P,R){var U=V(4*b/(2*P+(1+T-L/2)*g(2*P)+(T+L)/2*g(4*P)+L/2*g(6*P))),H=V(R*g(P)*V((1+T*o(2*P)+L*o(4*P))/(1+T+L))),Z=P*ve(1);function ue(xe){return V(1+T*o(2*xe)+L*o(4*xe))}function ve(xe){var Le=xe*P;return(2*Le+(1+T-L/2)*g(2*Le)+(T+L)/2*g(4*Le)+L/2*g(6*Le))/P}function le(xe){return ue(xe)*g(xe)}var he=function(xe,Le){var ze=P*fr(ve,Z*g(Le)/P,Le/b);isNaN(ze)&&(ze=P*m(Le));var tr=U*ue(ze);return[tr*H*xe/b*o(ze),tr/H*g(ze)]};return he.invert=function(xe,Le){var ze=fr(le,Le*H/U);return[xe*b/(o(ze)*U*H*ue(ze)),B(P*ve(ze/P)/Z)]},P===0&&(U=V(R/b),he=function(xe,Le){return[xe*U,g(Le)/U]},he.invert=function(xe,Le){return[xe/U,B(Le*U)]}),he}function kf(){var T=1,L=0,P=45*O,R=2,U=r.geoProjectionMutator(Xo),H=U(T,L,P,R);return H.a=function(Z){return arguments.length?U(T=+Z,L,P,R):T},H.b=function(Z){return arguments.length?U(T,L=+Z,P,R):L},H.psiMax=function(Z){return arguments.length?U(T,L,P=+Z*O,R):P*F},H.ratio=function(Z){return arguments.length?U(T,L,P,R=+Z):R},H.scale(180.739)}function Fl(T,L,P,R,U,H,Z,ue,ve,le,he){if(he.nanEncountered)return NaN;var xe,Le,ze,tr,vr,Ar,Zr,at,ot,st;if(xe=P-L,Le=T(L+xe*.25),ze=T(P-xe*.25),isNaN(Le)){he.nanEncountered=!0;return}if(isNaN(ze)){he.nanEncountered=!0;return}return tr=xe*(R+4*Le+U)/12,vr=xe*(U+4*ze+H)/12,Ar=tr+vr,st=(Ar-Z)/15,le>ve?(he.maxDepthCount++,Ar+st):Math.abs(st)>1;do ve[Ar]>ze?vr=Ar:tr=Ar,Ar=tr+vr>>1;while(Ar>tr);var Zr=ve[Ar+1]-ve[Ar];return Zr&&(Zr=(ze-ve[Ar+1])/Zr),(Ar+1+Zr)/Z}var xe=2*he(1)/b*H/P,Le=function(ze,tr){var vr=he(n(g(tr))),Ar=R(vr)*ze;return vr/=xe,[Ar,tr>=0?vr:-vr]};return Le.invert=function(ze,tr){var vr;return tr*=xe,n(tr)<1&&(vr=m(tr)*B(U(n(tr))*H)),[ze/R(n(tr)),vr]},Le}function co(){var T=0,L=2.5,P=1.183136,R=r.geoProjectionMutator(fo),U=R(T,L,P);return U.alpha=function(H){return arguments.length?R(T=+H,L,P):T},U.k=function(H){return arguments.length?R(T,L=+H,P):L},U.gamma=function(H){return arguments.length?R(T,L,P=+H):P},U.scale(152.63)}function Sf(T,L){return n(T[0]-L[0])=0;--ve)P=T[1][ve],R=P[0][0],U=P[0][1],H=P[1][1],Z=P[2][0],ue=P[2][1],L.push(xi([[Z-x,ue-x],[Z-x,H+x],[R+x,H+x],[R+x,U-x]],30));return{type:"Polygon",coordinates:[t.merge(L)]}}function Yi(T,L,P){var R,U;function H(ve,le){for(var he=le<0?-1:1,xe=L[+(le<0)],Le=0,ze=xe.length-1;Lexe[Le][2][0];++Le);var tr=T(ve-xe[Le][1][0],le);return tr[0]+=T(xe[Le][1][0],he*le>he*xe[Le][0][1]?xe[Le][0][1]:le)[0],tr}P?H.invert=P(H):T.invert&&(H.invert=function(ve,le){for(var he=U[+(le<0)],xe=L[+(le<0)],Le=0,ze=he.length;Letr&&(vr=ze,ze=tr,tr=vr),[[xe,ze],[Le,tr]]})}),Z):L.map(function(le){return le.map(function(he){return[[he[0][0]*F,he[0][1]*F],[he[1][0]*F,he[1][1]*F],[he[2][0]*F,he[2][1]*F]]})})},L!=null&&Z.lobes(L),Z}var Il=[[[[-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 Hv(){return Yi(Ve,Il).scale(160.857)}var Gi=[[[[-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 jo(){return Yi(Ts,Gi).scale(152.63)}var Jo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $o(){return Yi(rr,Jo).scale(169.529)}var vo=[[[[-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 ks(){return Yi(rr,vo).scale(169.529).rotate([20,0])}var du=[[[[-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 Ss(){return Yi(As,du,nr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Cs=[[[[-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 Ko(){return Yi(kr,Cs).scale(152.63).rotate([-20,0])}function Hl(T,L){return[3/z*T*V(b*b/3-L*L),L]}Hl.invert=function(T,L){return[z/3*T/V(b*b/3-L*L),L]};function Bl(){return r.geoProjection(Hl).scale(158.837)}function pu(T){function L(P,R){if(n(n(R)-_)2)return null;P/=2,R/=2;var H=P*P,Z=R*R,ue=2*R/(1+H+Z);return ue=h((1+ue)/(1-ue),1/T),[i(2*P,1-H-Z)/T,B((ue-1)/(ue+1))]},L}function gu(){var T=.5,L=r.geoProjectionMutator(pu),P=L(T);return P.spacing=function(R){return arguments.length?L(T=+R):T},P.scale(124.75)}var oi=b/k;function mu(T,L){return[T*(1+V(o(L)))/2,L/(o(L/2)*o(T/6))]}mu.invert=function(T,L){var P=n(T),R=n(L),U=x,H=_;Rx||n(Ar)>x)&&--U>0);return U&&[P,R]};function Kn(){return r.geoProjection(Fa).scale(139.98)}function Aa(T,L){return[g(T)/o(L),y(L)*o(T)]}Aa.invert=function(T,L){var P=T*T,R=L*L,U=R+1,H=P+U,Z=T?S*V((H-V(H*H-4*P))/P):1/V(U);return[B(T*Z),m(L)*X(Z)]};function Vi(){return r.geoProjection(Aa).scale(144.049).clipAngle(90-.001)}function Ls(T){var L=o(T),P=y(A+T/2);function R(U,H){var Z=H-T,ue=n(Z)=0;)he=T[le],xe=he[0]+ue*(ze=xe)-ve*Le,Le=he[1]+ue*Le+ve*ze;return xe=ue*(ze=xe)-ve*Le,Le=ue*Le+ve*ze,[xe,Le]}return P.invert=function(R,U){var H=20,Z=R,ue=U;do{for(var ve=L,le=T[ve],he=le[0],xe=le[1],Le=0,ze=0,tr;--ve>=0;)le=T[ve],Le=he+Z*(tr=Le)-ue*ze,ze=xe+Z*ze+ue*tr,he=le[0]+Z*(tr=he)-ue*xe,xe=le[1]+Z*xe+ue*tr;Le=he+Z*(tr=Le)-ue*ze,ze=xe+Z*ze+ue*tr,he=Z*(tr=he)-ue*xe-R,xe=Z*xe+ue*tr-U;var vr=Le*Le+ze*ze,Ar,Zr;Z-=Ar=(he*Le+xe*ze)/vr,ue-=Zr=(xe*Le-he*ze)/vr}while(n(Ar)+n(Zr)>x*x&&--H>0);if(H){var at=V(Z*Z+ue*ue),ot=2*a(at*.5),st=g(ot);return[i(Z*st,at*o(ot)),at?B(ue*st/at):0]}},P}var Bv=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Ov=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Lf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],qf=[[.9245,0],[0,0],[.01943,0]],Df=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Ef(){return wi(Bv,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Kc(){return wi(Ov,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Qc(){return wi(Lf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function qs(){return wi(qf,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ds(){return wi(Df,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function wi(T,L){var P=r.geoProjection($c(T)).rotate(L).clipAngle(90),R=r.geoRotation(L),U=P.center;return delete P.rotate,P.center=function(H){return arguments.length?U(R(H)):R.invert(U())},P}var bu=V(6),Es=V(7);function _u(T,L){var P=B(7*g(L)/(3*bu));return[bu*T*(2*o(2*P/3)-1)/Es,9*g(P/3)/Es]}_u.invert=function(T,L){var P=3*B(L*Es/9);return[T*Es/(bu*(2*o(2*P/3)-1)),B(g(P)*3*bu/7)]};function e0(){return r.geoProjection(_u).scale(164.859)}function Pf(T,L){for(var P=(1+S)*g(L),R=L,U=0,H;U<25&&(R-=H=(g(R/2)+g(R)-P)/(.5*o(R/2)+o(R)),!(n(H)M&&--R>0);return H=P*P,Z=H*H,ue=H*Z,[T/(.84719-.13063*H+ue*ue*(-.04515+.05494*H-.02326*Z+.00331*ue)),P]};function Ps(){return r.geoProjection(Ul).scale(175.295)}function Rs(T,L){return[T*(1+o(L))/2,2*(L-y(L/2))]}Rs.invert=function(T,L){for(var P=L/2,R=0,U=1/0;R<10&&n(U)>x;++R){var H=o(L/2);L-=U=(L-y(L/2)-P)/(1-.5/(H*H))}return[2*T/(1+o(L)),L]};function Rf(){return r.geoProjection(Rs).scale(152.63)}var po=[[[[-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 r0(){return Yi(Me(1/0),po).rotate([20,0]).scale(152.63)}function zf(T,L){var P=g(L),R=o(L),U=m(T);if(T===0||n(L)===_)return[0,L];if(L===0)return[T,0];if(n(T)===_)return[T*R,_*P];var H=b/(2*T)-2*T/b,Z=2*L/b,ue=(1-Z*Z)/(P-Z),ve=H*H,le=ue*ue,he=1+ve/le,xe=1+le/ve,Le=(H*P/ue-H/2)/he,ze=(le*P/ve+ue/2)/xe,tr=Le*Le+R*R/he,vr=ze*ze-(le*P*P/ve+ue*P-1)/xe;return[_*(Le+V(tr)*U),_*(ze+V(vr<0?0:vr)*m(-L*H)*U)]}zf.invert=function(T,L){T/=_,L/=_;var P=T*T,R=L*L,U=P+R,H=b*b;return[T?(U-1+V((1-U)*(1-U)+4*P))/(2*T)*_:0,fr(function(Z){return U*(b*g(Z)-2*Z)*b+4*Z*Z*(L-g(Z))+2*b*Z-H*L},0)]};function t0(){return r.geoProjection(zf).scale(127.267)}var Nf=1.0148,wu=.23185,Ff=-.14499,If=.02406,Yv=Nf,Hf=5*wu,Mi=7*Ff,Bf=9*If,Yl=1.790857183;function Of(T,L){var P=L*L;return[T,L*(Nf+P*P*(wu+P*(Ff+If*P)))]}Of.invert=function(T,L){L>Yl?L=Yl:L<-Yl&&(L=-Yl);var P=L,R;do{var U=P*P;P-=R=(P*(Nf+U*U*(wu+U*(Ff+If*U)))-L)/(Yv+U*U*(Hf+U*(Mi+Bf*U)))}while(n(R)>x);return[T,P]};function n0(){return r.geoProjection(Of).scale(139.319)}function el(T,L){if(n(L)x&&--U>0);return Z=y(R),[(n(L)=0;)if(R=L[ue],P[0]===R[0]&&P[1]===R[1]){if(H)return[H,P];H=P}}}function l0(T){for(var L=T.length,P=[],R=T[L-1],U=0;U0?[-R[0],0]:[180-R[0],180])};var L=Mu.map(function(P){return{face:P,project:T(P)}});return[-1,0,0,1,0,1,4,5].forEach(function(P,R){var U=L[P];U&&(U.children||(U.children=[])).push(L[R])}),Gl(L[0],function(P,R){return L[P<-b/2?R<0?6:4:P<0?R<0?2:0:PR^ze>R&&P<(Le-le)*(R-he)/(ze-he)+le&&(U=!U)}return U}function ku(T,L){var P=L.stream,R;if(!P)throw new Error("invalid projection");switch(T&&T.type){case"Feature":R=c0;break;case"FeatureCollection":R=f0;break;default:R=Su;break}return R(T,P)}function f0(T,L){return{type:"FeatureCollection",features:T.features.map(function(P){return c0(P,L)})}}function c0(T,L){return{type:"Feature",id:T.id,properties:T.properties,geometry:Su(T.geometry,L)}}function Uf(T,L){return{type:"GeometryCollection",geometries:T.geometries.map(function(P){return Su(P,L)})}}function Su(T,L){if(!T)return null;if(T.type==="GeometryCollection")return Uf(T,L);var P;switch(T.type){case"Point":P=Wl;break;case"MultiPoint":P=Wl;break;case"LineString":P=Cu;break;case"MultiLineString":P=Cu;break;case"Polygon":P=Os;break;case"MultiPolygon":P=Os;break;case"Sphere":P=Os;break;default:return null}return r.geoStream(T,L(P)),P.result()}var Wn=[],li=[],Wl={point:function(T,L){Wn.push([T,L])},result:function(){var T=Wn.length?Wn.length<2?{type:"Point",coordinates:Wn[0]}:{type:"MultiPoint",coordinates:Wn}:null;return Wn=[],T}},Cu={lineStart:Tu,point:function(T,L){Wn.push([T,L])},lineEnd:function(){Wn.length&&(li.push(Wn),Wn=[])},result:function(){var T=li.length?li.length<2?{type:"LineString",coordinates:li[0]}:{type:"MultiLineString",coordinates:li}:null;return li=[],T}},Os={polygonStart:Tu,lineStart:Tu,point:function(T,L){Wn.push([T,L])},lineEnd:function(){var T=Wn.length;if(T){do Wn.push(Wn[0].slice());while(++T<4);li.push(Wn),Wn=[]}},polygonEnd:Tu,result:function(){if(!li.length)return null;var T=[],L=[];return li.forEach(function(P){Bs(P)?T.push([P]):L.push(P)}),L.forEach(function(P){var R=P[0];T.some(function(U){if(u0(U[0],R))return U.push(P),!0})||T.push([P])}),li=[],T.length?T.length>1?{type:"MultiPolygon",coordinates:T}:{type:"Polygon",coordinates:T[0]}:null}};function Yf(T){var L=T(_,0)[0]-T(-_,0)[0];function P(R,U){var H=n(R)<_,Z=T(H?R:R>0?R-b:R+b,U),ue=(Z[0]-Z[1])*S,ve=(Z[0]+Z[1])*S;if(H)return[ue,ve];var le=L*S,he=ue>0^ve>0?-1:1;return[he*ue-m(ve)*le,he*ve-m(ue)*le]}return T.invert&&(P.invert=function(R,U){var H=(R+U)*S,Z=(U-R)*S,ue=n(H)<.5*L&&n(Z)<.5*L;if(!ue){var ve=L*S,le=H>0^Z>0?-1:1,he=-le*R+(Z>0?1:-1)*ve,xe=-le*U+(H>0?1:-1)*ve;H=(-he-xe)*S,Z=(he-xe)*S}var Le=T.invert(H,Z);return ue||(Le[0]+=H>0?b:-b),Le}),r.geoProjection(P).rotate([-90,-90,45]).clipAngle(180-.001)}function I(){return Yf(cu).scale(176.423)}function J(){return Yf(lo).scale(111.48)}function ce(T,L){if(!(0<=(L=+L)&&L<=20))throw new Error("invalid digits");function P(le){var he=le.length,xe=2,Le=new Array(he);for(Le[0]=+le[0].toFixed(L),Le[1]=+le[1].toFixed(L);xe2||ze[0]!=he[0]||ze[1]!=he[1])&&(xe.push(ze),he=ze)}return xe.length===1&&le.length>1&&xe.push(P(le[le.length-1])),xe}function H(le){return le.map(U)}function Z(le){if(le==null)return le;var he;switch(le.type){case"GeometryCollection":he={type:"GeometryCollection",geometries:le.geometries.map(Z)};break;case"Point":he={type:"Point",coordinates:P(le.coordinates)};break;case"MultiPoint":he={type:le.type,coordinates:R(le.coordinates)};break;case"LineString":he={type:le.type,coordinates:U(le.coordinates)};break;case"MultiLineString":case"Polygon":he={type:le.type,coordinates:H(le.coordinates)};break;case"MultiPolygon":he={type:"MultiPolygon",coordinates:le.coordinates.map(H)};break;default:return le}return le.bbox!=null&&(he.bbox=le.bbox),he}function ue(le){var he={type:"Feature",properties:le.properties,geometry:Z(le.geometry)};return le.id!=null&&(he.id=le.id),le.bbox!=null&&(he.bbox=le.bbox),he}if(T!=null)switch(T.type){case"Feature":return ue(T);case"FeatureCollection":{var ve={type:"FeatureCollection",features:T.features.map(ue)};return T.bbox!=null&&(ve.bbox=T.bbox),ve}default:return Z(T)}return T}function oe(T){var L=g(T);function P(R,U){var H=L?y(R*L/2)/L:R/2;if(!U)return[2*H,-T];var Z=2*a(H*g(U)),ue=1/y(U);return[g(Z)*ue,U+(1-o(Z))*ue-T]}return P.invert=function(R,U){if(n(U+=T)x&&--ue>0);var Le=R*(le=y(Z)),ze=y(n(U)0?_:-_)*(ve+U*(he-Z)/2+U*U*(he-2*ve+Z)/2)]}Je.invert=function(T,L){var P=L/_,R=P*90,U=v(18,n(R/5)),H=f(0,s(U));do{var Z=He[H][1],ue=He[H+1][1],ve=He[v(19,H+2)][1],le=ve-Z,he=ve-2*ue+Z,xe=2*(n(P)-ue)/le,Le=he/le,ze=xe*(1-Le*xe*(1-2*Le*xe));if(ze>=0||H===1){R=(L>=0?5:-5)*(ze+U);var tr=50,vr;do U=v(18,n(R)/5),H=s(U),ze=U-H,Z=He[H][1],ue=He[H+1][1],ve=He[v(19,H+2)][1],R-=(vr=(L>=0?_:-_)*(ue+ze*(ve-Z)/2+ze*ze*(ve-2*ue+Z)/2)-L)*F;while(n(vr)>M&&--tr>0);break}}while(--H>=0);var Ar=He[H][0],Zr=He[H+1][0],at=He[v(19,H+2)][0];return[T/(Zr+ze*(at-Ar)/2+ze*ze*(at-2*Zr+Ar)/2),R*O]};function or(){return r.geoProjection(Je).scale(152.63)}function ur(T){function L(P,R){var U=o(R),H=(T-1)/(T-U*o(P));return[H*U*g(P),H*g(R)]}return L.invert=function(P,R){var U=P*P+R*R,H=V(U),Z=(T-V(1-U*(T+1)/(T-1)))/((T-1)/H+H/(T-1));return[i(P*Z,H*V(1-Z*Z)),H?B(R*Z/H):0]},L}function br(T,L){var P=ur(T);if(!L)return P;var R=o(L),U=g(L);function H(Z,ue){var ve=P(Z,ue),le=ve[1],he=le*U/(T-1)+R;return[ve[0]*R/he,le/he]}return H.invert=function(Z,ue){var ve=(T-1)/(T-1-ue*U);return P.invert(ve*Z,ve*ue*R)},H}function Qe(){var T=2,L=0,P=r.geoProjectionMutator(br),R=P(T,L);return R.distance=function(U){return arguments.length?P(T=+U,L):T},R.tilt=function(U){return arguments.length?P(T,L=U*O):L*F},R.scale(432.147).clipAngle(X(1/T)*F-1e-6)}var hr=1e-4,cr=1e4,wr=-180,Lr=wr+hr,et=180,jr=et-hr,tt=-90,nt=tt+hr,Dr=90,Ir=Dr-hr;function it(T){return T.length>0}function pt(T){return Math.floor(T*cr)/cr}function Yt(T){return T===tt||T===Dr?[0,T]:[wr,pt(T)]}function en(T){var L=T[0],P=T[1],R=!1;return L<=Lr?(L=wr,R=!0):L>=jr&&(L=et,R=!0),P<=nt?(P=tt,R=!0):P>=Ir&&(P=Dr,R=!0),R?[L,P]:T}function Wt(T){return T.map(en)}function gn(T,L,P){for(var R=0,U=T.length;R=jr||he<=nt||he>=Ir){H[Z]=en(ve);for(var xe=Z+1;xeLr&&zent&&tr=ue)break;P.push({index:-1,polygon:L,ring:H=H.slice(xe-1)}),H[0]=Yt(H[0][1]),Z=-1,ue=H.length}}}}function qt(T){var L,P=T.length,R={},U={},H,Z,ue,ve,le;for(L=0;L0?b-ue:ue)*F],le=r.geoProjection(T(Z)).rotate(ve),he=r.geoRotation(ve),xe=le.center;return delete le.rotate,le.center=function(Le){return arguments.length?xe(he(Le)):he.invert(xe())},le.clipAngle(90)}function pa(T){var L=o(T);function P(R,U){var H=r.geoGnomonicRaw(R,U);return H[0]*=L,H}return P.invert=function(R,U){return r.geoGnomonicRaw.invert(R/L,U)},P}function Xa(){return Zi([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Zi(T,L){return Bn(pa,T,L)}function Ti(T){if(!(T*=2))return r.geoAzimuthalEquidistantRaw;var L=-T/2,P=-L,R=T*T,U=y(P),H=.5/g(P);function Z(ue,ve){var le=X(o(ve)*o(ue-L)),he=X(o(ve)*o(ue-P)),xe=ve<0?-1:1;return le*=le,he*=he,[(le-he)/(2*T),xe*V(4*R*he-(R-le+he)*(R-le+he))/(2*T)]}return Z.invert=function(ue,ve){var le=ve*ve,he=o(V(le+(Le=ue+L)*Le)),xe=o(V(le+(Le=ue+P)*Le)),Le,ze;return[i(ze=he-xe,Le=(he+xe)*U),(ve<0?-1:1)*X(V(Le*Le+ze*ze)*H)]},Z}function nl(){return si([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function si(T,L){return Bn(Ti,T,L)}function al(T,L){if(n(L)x&&--ue>0);return[m(T)*(V(U*U+4)+U)*b/4,_*Z]};function Xi(){return r.geoProjection(Gf).scale(127.16)}function Yh(T,L,P,R,U){function H(Z,ue){var ve=P*g(R*ue),le=V(1-ve*ve),he=V(2/(1+le*o(Z*=U)));return[T*le*he*g(Z),L*ve*he]}return H.invert=function(Z,ue){var ve=Z/T,le=ue/L,he=V(ve*ve+le*le),xe=2*B(he/2);return[i(Z*y(xe),T*he)/U,he&&B(ue*g(xe)/(L*P*he))/R]},H}function Gh(T,L,P,R){var U=b/3;T=f(T,x),L=f(L,x),T=v(T,_),L=v(L,b-x),P=f(P,0),P=v(P,100-x),R=f(R,x);var H=P/100+1,Z=R/100,ue=X(H*o(U))/U,ve=g(T)/g(ue*_),le=L/b,he=V(Z*g(T/2)/g(L/2)),xe=he/V(le*ve*ue),Le=1/(he*V(le*ve*ue));return Yh(xe,Le,ve,ue,le)}function d0(){var T=65*O,L=60*O,P=20,R=200,U=r.geoProjectionMutator(Gh),H=U(T,L,P,R);return H.poleline=function(Z){return arguments.length?U(T=+Z*O,L,P,R):T*F},H.parallels=function(Z){return arguments.length?U(T,L=+Z*O,P,R):L*F},H.inflation=function(Z){return arguments.length?U(T,L,P=+Z,R):P},H.ratio=function(Z){return arguments.length?U(T,L,P,R=+Z):R},H.scale(163.775)}function Xv(){return d0().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Vh=4*b+3*V(3),Wh=2*V(2*b*V(3)/Vh),Zh=ir(Wh*V(3)/b,Wh,Vh/6);function p0(){return r.geoProjection(Zh).scale(176.84)}function Vf(T,L){return[T*V(1-3*L*L/(b*b)),L]}Vf.invert=function(T,L){return[T/V(1-3*L*L/(b*b)),L]};function Xh(){return r.geoProjection(Vf).scale(152.63)}function jv(T,L){var P=o(L),R=o(T)*P,U=1-R,H=o(T=i(g(T)*P,-g(L))),Z=g(T);return P=V(1-R*R),[Z*P-H*U,-H*P-Z*U]}jv.invert=function(T,L){var P=(T*T+L*L)/-2,R=V(-P*(2+P)),U=L*P+T*R,H=T*P-L*R,Z=V(H*H+U*U);return[i(R*U,Z*(1+P)),Z?-B(R*H/Z):0]};function by(){return r.geoProjection(jv).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Jv(T,L){var P=Be(T,L);return[(P[0]+T/_)/2,(P[1]+L)/2]}Jv.invert=function(T,L){var P=T,R=L,U=25;do{var H=o(R),Z=g(R),ue=g(2*R),ve=Z*Z,le=H*H,he=g(P),xe=o(P/2),Le=g(P/2),ze=Le*Le,tr=1-le*xe*xe,vr=tr?X(H*xe)*V(Ar=1/tr):Ar=0,Ar,Zr=.5*(2*vr*H*Le+P/_)-T,at=.5*(vr*Z+R)-L,ot=.5*Ar*(le*ze+vr*H*xe*ve)+.5/_,st=Ar*(he*ue/4-vr*Z*Le),vt=.125*Ar*(ue*Le-vr*Z*le*he),an=.5*Ar*(ve*xe+vr*ze*H)+.5,Mn=st*vt-an*ot,Ft=(at*st-Zr*an)/Mn,zn=(Zr*vt-at*ot)/Mn;P-=Ft,R-=zn}while((n(Ft)>x||n(zn)>x)&&--U>0);return[P,R]};function ki(){return r.geoProjection(Jv).scale(158.837)}e.geoNaturalEarth=r.geoNaturalEarth1,e.geoNaturalEarthRaw=r.geoNaturalEarth1Raw,e.geoAiry=qe,e.geoAiryRaw=de,e.geoAitoff=Ne,e.geoAitoffRaw=Be,e.geoArmadillo=Se,e.geoArmadilloRaw=Ie,e.geoAugust=se,e.geoAugustRaw=Xe,e.geoBaker=W,e.geoBakerRaw=pe,e.geoBerghaus=$,e.geoBerghausRaw=Q,e.geoBertin1953=ar,e.geoBertin1953Raw=Ze,e.geoBoggs=je,e.geoBoggsRaw=Ve,e.geoBonne=mr,e.geoBonneRaw=Ke,e.geoBottomley=gr,e.geoBottomleyRaw=Mr,e.geoBromley=Tr,e.geoBromleyRaw=dr,e.geoChamberlin=We,e.geoChamberlinRaw=_e,e.geoChamberlinAfrica=$e,e.geoCollignon=Vr,e.geoCollignonRaw=qr,e.geoCraig=lt,e.geoCraigRaw=Hr,e.geoCraster=St,e.geoCrasterRaw=Rt,e.geoCylindricalEqualArea=Fn,e.geoCylindricalEqualAreaRaw=hn,e.geoCylindricalStereographic=Xt,e.geoCylindricalStereographicRaw=$n,e.geoEckert1=sn,e.geoEckert1Raw=cn,e.geoEckert2=aa,e.geoEckert2Raw=Kt,e.geoEckert3=Qt,e.geoEckert3Raw=rt,e.geoEckert4=dn,e.geoEckert4Raw=Ct,e.geoEckert5=tn,e.geoEckert5Raw=pn,e.geoEckert6=ha,e.geoEckert6Raw=un,e.geoEisenlohr=da,e.geoEisenlohrRaw=Na,e.geoFahey=In,e.geoFaheyRaw=It,e.geoFoucaut=io,e.geoFoucautRaw=gi,e.geoFoucautSinusoidal=ms,e.geoFoucautSinusoidalRaw=mi,e.geoGilbert=ys,e.geoGingery=Uo,e.geoGingeryRaw=Oo,e.geoGinzburg4=Lt,e.geoGinzburg4Raw=Kr,e.geoGinzburg5=Br,e.geoGinzburg5Raw=Ht,e.geoGinzburg6=nn,e.geoGinzburg6Raw=Vn,e.geoGinzburg8=At,e.geoGinzburg8Raw=Dn,e.geoGinzburg9=Yo,e.geoGinzburg9Raw=Wa,e.geoGringorten=Vo,e.geoGringortenRaw=cu,e.geoGuyou=bs,e.geoGuyouRaw=lo,e.geoHammer=Oe,e.geoHammerRaw=Me,e.geoHammerRetroazimuthal=_s,e.geoHammerRetroazimuthalRaw=Mf,e.geoHealpix=Nl,e.geoHealpixRaw=so,e.geoHill=Xc,e.geoHillRaw=Tf,e.geoHomolosine=Fv,e.geoHomolosineRaw=Ts,e.geoHufnagel=kf,e.geoHufnagelRaw=Xo,e.geoHyperelliptical=co,e.geoHyperellipticalRaw=fo,e.geoInterrupt=Yi,e.geoInterruptedBoggs=Hv,e.geoInterruptedHomolosine=jo,e.geoInterruptedMollweide=$o,e.geoInterruptedMollweideHemispheres=ks,e.geoInterruptedSinuMollweide=Ss,e.geoInterruptedSinusoidal=Ko,e.geoKavrayskiy7=Bl,e.geoKavrayskiy7Raw=Hl,e.geoLagrange=gu,e.geoLagrangeRaw=pu,e.geoLarrivee=yu,e.geoLarriveeRaw=mu,e.geoLaskowski=Kn,e.geoLaskowskiRaw=Fa,e.geoLittrow=Vi,e.geoLittrowRaw=Aa,e.geoLoximuthal=Qo,e.geoLoximuthalRaw=Ls,e.geoMiller=Cf,e.geoMillerRaw=Ol,e.geoModifiedStereographic=wi,e.geoModifiedStereographicRaw=$c,e.geoModifiedStereographicAlaska=Ef,e.geoModifiedStereographicGs48=Kc,e.geoModifiedStereographicGs50=Qc,e.geoModifiedStereographicMiller=qs,e.geoModifiedStereographicLee=Ds,e.geoMollweide=Cr,e.geoMollweideRaw=rr,e.geoMtFlatPolarParabolic=e0,e.geoMtFlatPolarParabolicRaw=_u,e.geoMtFlatPolarQuartic=Uv,e.geoMtFlatPolarQuarticRaw=Pf,e.geoMtFlatPolarSinusoidal=xu,e.geoMtFlatPolarSinusoidalRaw=ho,e.geoNaturalEarth2=Ps,e.geoNaturalEarth2Raw=Ul,e.geoNellHammer=Rf,e.geoNellHammerRaw=Rs,e.geoInterruptedQuarticAuthalic=r0,e.geoNicolosi=t0,e.geoNicolosiRaw=zf,e.geoPatterson=n0,e.geoPattersonRaw=Of,e.geoPolyconic=a0,e.geoPolyconicRaw=el,e.geoPolyhedral=Gl,e.geoPolyhedralButterfly=Ns,e.geoPolyhedralCollignon=Zv,e.geoPolyhedralWaterman=Is,e.geoProject=ku,e.geoGringortenQuincuncial=I,e.geoPeirceQuincuncial=J,e.geoPierceQuincuncial=J,e.geoQuantize=ce,e.geoQuincuncial=Yf,e.geoRectangularPolyconic=we,e.geoRectangularPolyconicRaw=oe,e.geoRobinson=or,e.geoRobinsonRaw=Je,e.geoSatellite=Qe,e.geoSatelliteRaw=br,e.geoSinuMollweide=jc,e.geoSinuMollweideRaw=As,e.geoSinusoidal=er,e.geoSinusoidalRaw=kr,e.geoStitch=mn,e.geoTimes=Gt,e.geoTimesRaw=Yr,e.geoTwoPointAzimuthal=Zi,e.geoTwoPointAzimuthalRaw=pa,e.geoTwoPointAzimuthalUsa=Xa,e.geoTwoPointEquidistant=si,e.geoTwoPointEquidistantRaw=Ti,e.geoTwoPointEquidistantUsa=nl,e.geoVanDerGrinten=Zl,e.geoVanDerGrintenRaw=al,e.geoVanDerGrinten2=v0,e.geoVanDerGrinten2Raw=Lu,e.geoVanDerGrinten3=Uh,e.geoVanDerGrinten3Raw=h0,e.geoVanDerGrinten4=Xi,e.geoVanDerGrinten4Raw=Gf,e.geoWagner=d0,e.geoWagner7=Xv,e.geoWagnerRaw=Gh,e.geoWagner4=p0,e.geoWagner4Raw=Zh,e.geoWagner6=Xh,e.geoWagner6Raw=Vf,e.geoWiechel=by,e.geoWiechelRaw=jv,e.geoWinkel3=ki,e.geoWinkel3Raw=Jv,Object.defineProperty(e,"__esModule",{value:!0})})});var vF=te((Uve,cF)=>{"use strict";var va=kt(),a_=pr(),Zae=dt(),Dv=Math.PI/180,Hc=180/Math.PI,o_={cursor:"pointer"},l_={cursor:"auto"};function Xae(e,r){var t=e.projection,n;return r._isScoped?n=jae:r._isClipped?n=$ae:n=Jae,n(e,t)}cF.exports=Xae;function s_(e,r){return va.behavior.zoom().translate(r.translate()).scale(r.scale())}function u_(e,r,t){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],l=a._fullLayout,s=l[n],u={},f={};function v(h,d){u[n+"."+h]=a_.nestedProperty(o,h).get(),Zae.call("_storeDirectGUIEdit",i,l._preGUI,u);var m=a_.nestedProperty(s,h);m.get()!==d&&(m.set(d),a_.nestedProperty(o,h).set(d),f[n+"."+h]=d)}t(v),v("projection.scale",r.scale()/e.fitScale),v("fitbounds",!1),a.emit("plotly_relayout",f)}function jae(e,r){var t=s_(e,r);function n(){va.select(this).style(o_)}function a(){r.scale(va.event.scale).translate(va.event.translate),e.render(!0);var l=r.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":r.scale()/e.fitScale,"geo.center.lon":l[0],"geo.center.lat":l[1]})}function i(l){var s=r.invert(e.midPt);l("center.lon",s[0]),l("center.lat",s[1])}function o(){va.select(this).style(l_),u_(e,r,i)}return t.on("zoomstart",n).on("zoom",a).on("zoomend",o),t}function Jae(e,r){var t=s_(e,r),n=2,a,i,o,l,s,u,f,v,h;function d(b){return r.invert(b)}function m(b){var _=d(b);if(!_)return!0;var A=r(_);return Math.abs(A[0]-b[0])>n||Math.abs(A[1]-b[1])>n}function g(){va.select(this).style(o_),a=va.mouse(this),i=r.rotate(),o=r.translate(),l=i,s=d(a)}function y(){if(u=va.mouse(this),m(a)){t.scale(r.scale()),t.translate(r.translate());return}r.scale(va.event.scale),r.translate([o[0],va.event.translate[1]]),s?d(u)&&(v=d(u),f=[l[0]+(v[0]-s[0]),i[1],i[2]],r.rotate(f),l=f):(a=u,s=d(a)),h=!0,e.render(!0);var b=r.rotate(),_=r.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":r.scale()/e.fitScale,"geo.center.lon":_[0],"geo.center.lat":_[1],"geo.projection.rotation.lon":-b[0]})}function x(){va.select(this).style(l_),h&&u_(e,r,M)}function M(b){var _=r.rotate(),A=r.invert(e.midPt);b("projection.rotation.lon",-_[0]),b("center.lon",A[0]),b("center.lat",A[1])}return t.on("zoomstart",g).on("zoom",y).on("zoomend",x),t}function $ae(e,r){var t={r:r.rotate(),k:r.scale()},n=s_(e,r),a=iie(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,l;n.on("zoomstart",function(){va.select(this).style(o_);var h=va.mouse(this),d=r.rotate(),m=d,g=r.translate(),y=Kae(d);l=ay(r,h),o.call(n,"zoom",function(){var x=va.mouse(this);if(r.scale(t.k=va.event.scale),!l)h=x,l=ay(r,h);else if(ay(r,x)){r.rotate(d).translate(g);var M=ay(r,x),b=eie(l,M),_=tie(Qae(y,b)),A=t.r=rie(_,l,m);(!isFinite(A[0])||!isFinite(A[1])||!isFinite(A[2]))&&(A=m),r.rotate(A),m=A}u(a.of(this,arguments))}),s(a.of(this,arguments))}).on("zoomend",function(){va.select(this).style(l_),o.call(n,"zoom",null),f(a.of(this,arguments)),u_(e,r,v)}).on("zoom.redraw",function(){e.render(!0);var h=r.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":r.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function s(h){i++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function f(h){--i||h({type:"zoomend"})}function v(h){var d=r.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return va.rebind(n,a,"on")}function ay(e,r){var t=e.invert(r);return t&&isFinite(t[0])&&isFinite(t[1])&&nie(t)}function Kae(e){var r=.5*e[0]*Dv,t=.5*e[1]*Dv,n=.5*e[2]*Dv,a=Math.sin(r),i=Math.cos(r),o=Math.sin(t),l=Math.cos(t),s=Math.sin(n),u=Math.cos(n);return[i*l*u+a*o*s,a*l*u-i*o*s,i*o*u+a*l*s,i*l*s-a*o*u]}function Qae(e,r){var t=e[0],n=e[1],a=e[2],i=e[3],o=r[0],l=r[1],s=r[2],u=r[3];return[t*o-n*l-a*s-i*u,t*l+n*o+a*u-i*s,t*s-n*u+a*o+i*l,t*u+n*s-a*l+i*o]}function eie(e,r){if(!(!e||!r)){var t=aie(e,r),n=Math.sqrt(fF(t,t)),a=.5*Math.acos(Math.max(-1,Math.min(1,fF(e,r)))),i=Math.sin(a)/n;return n&&[Math.cos(a),t[2]*i,-t[1]*i,t[0]*i]}}function rie(e,r,t){var n=i_(r,2,e[0]);n=i_(n,1,e[1]),n=i_(n,0,e[2]-t[2]);var a=r[0],i=r[1],o=r[2],l=n[0],s=n[1],u=n[2],f=Math.atan2(i,a)*Hc,v=Math.sqrt(a*a+i*i),h,d;Math.abs(s)>v?(d=(s>0?90:-90)-f,h=0):(d=Math.asin(s/v)*Hc-f,h=Math.sqrt(v*v-s*s));var m=180-d-2*f,g=(Math.atan2(u,l)-Math.atan2(o,h))*Hc,y=(Math.atan2(u,l)-Math.atan2(o,-h))*Hc,x=sF(t[0],t[1],d,g),M=sF(t[0],t[1],m,y);return x<=M?[d,g,t[2]]:[m,y,t[2]]}function sF(e,r,t,n){var a=uF(t-e),i=uF(n-r);return Math.sqrt(a*a+i*i)}function uF(e){return(e%360+540)%360-180}function i_(e,r,t){var n=t*Dv,a=e.slice(),i=r===0?1:0,o=r===2?1:2,l=Math.cos(n),s=Math.sin(n);return a[i]=e[i]*l-e[o]*s,a[o]=e[o]*l+e[i]*s,a}function tie(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*Hc,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*Hc,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*Hc]}function nie(e){var r=e[0]*Dv,t=e[1]*Dv,n=Math.cos(t);return[n*Math.cos(r),n*Math.sin(r),Math.sin(t)]}function fF(e,r){for(var t=0,n=0,a=e.length;n{"use strict";var uu=kt(),v_=n_(),oie=v_.geoPath,lie=v_.geoDistance,sie=lF(),uie=dt(),Fh=pr(),fie=Fh.strTranslate,iy=zt(),Nh=ln(),hF=ss(),cie=ua(),c_=Cn(),dF=Ju().getAutoRange,f_=To(),vie=nu().prepSelect,hie=nu().clearOutline,die=nu().selectOnClick,pie=vF(),pi=Ph(),gie=Km(),gF=Um(),mie=O4().feature;function mF(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 Dl=mF.prototype;yF.exports=function(r){return new mF(r)};Dl.plot=function(e,r,t,n){var a=this;if(n)return a.update(e,r,!0);a._geoCalcData=e,a._fullLayout=r;var i=r[this.id],o=[],l=!1;for(var s in pi.layerNameToAdjective)if(s!=="frame"&&i["show"+s]){l=!0;break}for(var u=!1,f=0;f0&&o._module.calcGeoJSON(i,r)}if(!t){var l=this.updateProjection(e,r);if(l)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(r,n),this.updateDims(r,n),this.updateFx(r,n),cie.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Dl.updateProjection=function(e,r){var t=this.graphDiv,n=r[this.id],a=r._size,i=n.domain,o=n.projection,l=n.lonaxis,s=n.lataxis,u=l._ax,f=s._ax,v=this.projection=yie(n),h=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],d=n.center||{},m=o.rotation||{},g=l.range||[],y=s.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],f._length=h[1][1]-h[0][1],u.range=dF(t,u),f.range=dF(t,f);var x=(u.range[0]+u.range[1])/2,M=(f.range[0]+f.range[1])/2;if(n._isScoped)d={lon:x,lat:M};else if(n._isClipped){d={lon:x,lat:M},m={lon:x,lat:M,roll:m.roll};var b=o.type,_=pi.lonaxisSpan[b]/2||180,A=pi.lataxisSpan[b]/2||90;g=[x-_,x+_],y=[M-A,M+A]}else d={lon:x,lat:M},m={lon:x,lat:m.lat,roll:m.roll}}v.center([d.lon-m.lon,d.lat-m.lat]).rotate([-m.lon,-m.lat,m.roll]).parallels(o.parallels);var S=pF(g,y);v.fitExtent(h,S);var k=this.bounds=v.getBounds(S),D=this.fitScale=v.scale(),z=v.translate();if(n.fitbounds){var F=v.getBounds(pF(u.range,f.range)),O=Math.min((k[1][0]-k[0][0])/(F[1][0]-F[0][0]),(k[1][1]-k[0][1])/(F[1][1]-F[0][1]));isFinite(O)?v.scale(O*D):Fh.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(o.scale*D);var G=this.midPt=[(k[0][0]+k[1][0])/2,(k[0][1]+k[1][1])/2];if(v.translate([z[0]+(G[0]-z[0]),z[1]+(G[1]-z[1])]).clipExtent(k),n._isAlbersUsa){var B=v([d.lon,d.lat]),X=v.translate();v.translate([X[0]-(B[0]-X[0]),X[1]-(B[1]-X[1])])}};Dl.updateBaseLayers=function(e,r){var t=this,n=t.topojson,a=t.layers,i=t.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function l(h){return!!pi.lineLayers[h]}function s(h){return!!pi.fillLayers[h]}var u=this.hasChoropleth?pi.layersForChoropleth:pi.layers,f=u.filter(function(h){return l(h)||s(h)?r["show"+h]:o(h)?r[h].showgrid:!0}),v=t.framework.selectAll(".layer").data(f,String);v.exit().each(function(h){delete a[h],delete i[h],uu.select(this).remove()}),v.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=a[h]=uu.select(this);h==="bg"?t.bgRect=d.append("rect").style("pointer-events","all"):o(h)?i[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):l(h)?i[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):s(h)&&(i[h]=d.append("path").style("stroke","none"))}),v.order(),v.each(function(h){var d=i[h],m=pi.layerNameToAdjective[h];h==="frame"?d.datum(pi.sphereSVG):l(h)||s(h)?d.datum(mie(n,n.objects[h])):o(h)&&d.datum(bie(h,r,e)).call(iy.stroke,r[h].gridcolor).call(Nh.dashLine,r[h].griddash,r[h].gridwidth),l(h)?d.call(iy.stroke,r[m+"color"]).call(Nh.dashLine,"",r[m+"width"]):s(h)&&d.call(iy.fill,r[m+"color"])})};Dl.updateDims=function(e,r){var t=this.bounds,n=(r.framewidth||0)/2,a=t[0][0]-n,i=t[0][1]-n,o=t[1][0]-a+n,l=t[1][1]-i+n;Nh.setRect(this.clipRect,a,i,o,l),this.bgRect.call(Nh.setRect,a,i,o,l).call(iy.fill,r.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=l};Dl.updateFx=function(e,r){var t=this,n=t.graphDiv,a=t.bgRect,i=e.dragmode,o=e.clickmode;if(t.isStatic)return;function l(){var v=t.viewInitial,h={};for(var d in v)h[t.id+"."+d]=v[d];uie.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function s(v){return t.projection.invert([v[0]+t.xaxis._offset,v[1]+t.yaxis._offset])}var u=function(v,h){if(h.isRect){var d=v.range={};d[t.id]=[s([h.xmin,h.ymin]),s([h.xmax,h.ymax])]}else{var m=v.lassoPoints={};m[t.id]=h.map(s)}},f={element:t.bgRect.node(),gd:n,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:u},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id,clickFn:function(v){v===2&&hie(n)}};i==="pan"?(a.node().onmousedown=null,a.call(pie(t,r)),a.on("dblclick.zoom",l),n._context._scrollZoom.geo||a.on("wheel.zoom",null)):(i==="select"||i==="lasso")&&(a.on(".zoom",null),f.prepFn=function(v,h,d){vie(v,h,d,f,i)},f_.init(f)),a.on("mousemove",function(){var v=t.projection.invert(Fh.getPositionFromD3Event());if(!v)return f_.unhover(n,uu.event);t.xaxis.p2c=function(){return v[0]},t.yaxis.p2c=function(){return v[1]},hF.hover(n,uu.event,t.id)}),a.on("mouseout",function(){n._dragging||f_.unhover(n,uu.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&die(uu.event,n,[t.xaxis],[t.yaxis],t.id,f),o.indexOf("event")>-1&&hF.click(n,uu.event))})};Dl.makeFramework=function(){var e=this,r=e.graphDiv,t=r._fullLayout,n="clip"+t._uid+e.id;e.clipDef=t._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=uu.select(e.container).append("g").attr("class","geo "+e.id).call(Nh.setClipUrl,n,r),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c_.setConvert(e.mockAxis,t)};Dl.saveViewInitial=function(e){var r=e.center||{},t=e.projection,n=t.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":t.scale};var a;e._isScoped?a={"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:a={"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":n.lon},Fh.extendFlat(this.viewInitial,a)};Dl.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Dl._render=function(){var e=this.projection,r=e.getPath(),t;function n(i){var o=e(i.lonlat);return o?fie(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",function(i){return r(i.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr("display",a).attr("transform",n)};function yie(e){var r=e.projection,t=r.type,n=pi.projNames[t];n="geo"+Fh.titleCase(n);for(var a=v_[n]||sie[n],i=a(),o=e._isSatellite?Math.acos(1/r.distance)*180/Math.PI:e._isClipped?pi.lonaxisSpan[t]/2:null,l=["center","rotate","parallels","clipExtent"],s=function(v){return v?i:[]},u=0;um}else return!1},i.getPath=function(){return oie().projection(i)},i.getBounds=function(v){return i.getPath().bounds(v)},i.precision(pi.precision),e._isSatellite&&i.tilt(r.tilt).distance(r.distance),o&&i.clipAngle(o-pi.clipPad),i}function bie(e,r,t){var n=1e-6,a=2.5,i=r[e],o=pi.scopeDefaults[r.scope],l,s,u;e==="lonaxis"?(l=o.lonaxisRange,s=o.lataxisRange,u=function(M,b){return[M,b]}):e==="lataxis"&&(l=o.lataxisRange,s=o.lonaxisRange,u=function(M,b){return[b,M]});var f={type:"linear",range:[l[0],l[1]-n],tick0:i.tick0,dtick:i.dtick};c_.setConvert(f,t);var v=c_.calcTicks(f);!r.isScoped&&e==="lonaxis"&&v.pop();for(var h=v.length,d=new Array(h),m=0;m0&&a<0&&(a+=360);var l=(a-n)/4;return{type:"Polygon",coordinates:[[[n,i],[n,o],[n+l,o],[n+2*l,o],[n+3*l,o],[a,o],[a,i],[a-l,i],[a-2*l,i],[a-3*l,i],[n,i]]]}}});var h_=te((Gve,wF)=>{"use strict";var Pv=cl(),_ie=zm().attributes,xie=Kl().dash,Ev=Ph(),wie=_o().overrideAll,_F=Sd(),xF={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:Pv.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:xie},Mie=wF.exports=wie({domain:_ie({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:_F(Ev.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:_F(Ev.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:Pv.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:Ev.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:Ev.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:Ev.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:Ev.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:Pv.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:Pv.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:Pv.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:Pv.background},lonaxis:xF,lataxis:xF},"plot","from-root");Mie.uirevision={valType:"any",editType:"none"}});var AF=te((Vve,MF)=>{"use strict";var Aie=pr(),Tie=_n(),kie=zm().defaults;MF.exports=function(r,t,n,a){var i=a.type,o=a.attributes,l=a.handleDefaults,s=a.partition||"x",u=t._subplots[i],f=u.length,v=f&&u[0].replace(/\d+$/,""),h,d;function m(M,b){return Aie.coerce(h,d,o,M,b)}for(var g=0;g{"use strict";var oy=pr(),Sie=AF(),Cie=p1().getSubplotData,ly=Ph(),Lie=h_(),TF=ly.axesNames;kF.exports=function(r,t,n){Sie(r,t,n,{type:"geo",attributes:Lie,handleDefaults:qie,fullData:n,partition:"y"})};function qie(e,r,t,n){var a=Cie(n.fullData,"geo",n.id),i=a.map(function(de){return de.index}),o=t("resolution"),l=t("scope"),s=ly.scopeDefaults[l],u=t("projection.type",s.projType),f=r._isAlbersUsa=u==="albers usa";f&&(l=r.scope="usa");var v=r._isScoped=l!=="world",h=r._isSatellite=u==="satellite",d=r._isConic=u.indexOf("conic")!==-1||u==="albers",m=r._isClipped=!!ly.lonaxisSpan[u];if(e.visible===!1){var g=oy.extendDeep({},r._template);g.showcoastlines=!1,g.showcountries=!1,g.showframe=!1,g.showlakes=!1,g.showland=!1,g.showocean=!1,g.showrivers=!1,g.showsubunits=!1,g.lonaxis&&(g.lonaxis.showgrid=!1),g.lataxis&&(g.lataxis.showgrid=!1),r._template=g}for(var y=t("visible"),x,M=0;M0&&B<0&&(B+=360);var X=(G+B)/2,V;if(!f){var re=v?s.projRotate:[X,0,0];V=t("projection.rotation.lon",re[0]),t("projection.rotation.lat",re[1]),t("projection.rotation.roll",re[2]),x=t("showcoastlines",!v&&y),x&&(t("coastlinecolor"),t("coastlinewidth")),x=t("showocean",y?void 0:!1),x&&t("oceancolor")}var ne,K;if(f?(ne=-96.6,K=38.7):(ne=v?X:V,K=(O[0]+O[1])/2),t("center.lon",ne),t("center.lat",K),h&&(t("projection.tilt"),t("projection.distance")),d){var ee=s.projParallels||[0,60];t("projection.parallels",ee)}t("projection.scale"),x=t("showland",y?void 0:!1),x&&t("landcolor"),x=t("showlakes",y?void 0:!1),x&&t("lakecolor"),x=t("showrivers",y?void 0:!1),x&&(t("rivercolor"),t("riverwidth")),x=t("showcountries",v&&l!=="usa"&&y),x&&(t("countrycolor"),t("countrywidth")),(l==="usa"||l==="north america"&&o===50)&&(t("showsubunits",y),t("subunitcolor"),t("subunitwidth")),v||(x=t("showframe",y),x&&(t("framecolor"),t("framewidth"))),t("bgcolor");var fe=t("fitbounds");fe&&(delete r.projection.scale,v?(delete r.center.lon,delete r.center.lat):m?(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon,delete r.projection.rotation.lat,delete r.lonaxis.range,delete r.lataxis.range):(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon))}});var d_=te((Zve,qF)=>{"use strict";var Die=p1().getSubplotCalcData,Eie=pr().counterRegex,Pie=bF(),ps="geo",CF=Eie(ps),LF={};LF[ps]={valType:"subplotid",dflt:ps,editType:"calc"};function Rie(e){for(var r=e._fullLayout,t=e.calcdata,n=r._subplots[ps],a=0;a{"use strict";DF.exports={attributes:Eh(),supplyDefaults:sN(),colorbar:Eb(),formatLabels:cN(),calc:gN(),calcGeoJSON:r_().calcGeoJSON,plot:r_().plot,style:$4(),styleOnSelect:mh().styleOnSelect,hoverPoints:KN(),eventData:eF(),selectPoints:nF(),moduleType:"trace",name:"scattergeo",basePlotModule:d_(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var RF=te((jve,PF)=>{"use strict";PF.exports=EF()});var sy=te((Jve,FF)=>{"use strict";var Fie=Ru().hovertemplateAttrs,gf=Eh(),Iie=H0(),zF=bo(),Hie=cl().defaultLine,pf=la().extendFlat,NF=gf.marker.line;FF.exports=pf({locations:{valType:"data_array",editType:"calc"},locationmode:gf.locationmode,z:{valType:"data_array",editType:"calc"},geojson:pf({},gf.geojson,{}),featureidkey:gf.featureidkey,text:pf({},gf.text,{}),hovertext:pf({},gf.hovertext,{}),marker:{line:{color:pf({},NF.color,{dflt:Hie}),width:pf({},NF.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:gf.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:gf.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:pf({},zF.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Fie(),showlegend:pf({},zF.showlegend,{dflt:!1})},Iie("",{cLetter:"z",editTypeOverride:"calc"}))});var HF=te(($ve,IF)=>{"use strict";var uy=pr(),Bie=B0(),Oie=sy();IF.exports=function(r,t,n,a){function i(h,d){return uy.coerce(r,t,Oie,h,d)}var o=i("locations"),l=i("z");if(!(o&&o.length&&uy.isArrayOrTypedArray(l)&&l.length)){t.visible=!1;return}t._length=Math.min(o.length,l.length);var s=i("geojson"),u;(typeof s=="string"&&s!==""||uy.isPlainObject(s))&&(u="geojson-id");var f=i("locationmode",u);f==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate");var v=i("marker.line.width");v&&i("marker.line.color"),i("marker.opacity"),Bie(r,t,a,i,{prefix:"",cLetter:"z"}),uy.coerceSelectionMarkerOpacity(t,i)}});var OF=te((Kve,BF)=>{"use strict";BF.exports={min:"zmin",max:"zmax"}});var VF=te((Qve,GF)=>{"use strict";var UF=Bt(),Uie=En().BADNUM,Yie=Qd(),Gie=vh(),Vie=Qg();function YF(e){return e&&typeof e=="string"}GF.exports=function(r,t){var n=t._length,a=new Array(n),i;t.geojson?i=function(f){return YF(f)||UF(f)}:i=YF;for(var o=0;o{"use strict";var Wie=kt(),Zie=zt(),p_=ln(),Xie=rp();function jie(e,r){r&&WF(e,r)}function WF(e,r){var t=r[0].trace,n=r[0].node3,a=n.selectAll(".choroplethlocation"),i=t.marker||{},o=i.line||{},l=Xie.makeColorScaleFuncFromTrace(t);a.each(function(s){Wie.select(this).attr("fill",l(s.z)).call(Zie.stroke,s.mlc||o.color).call(p_.dashLine,"",s.mlw||o.width||0).style("opacity",i.opacity)}),p_.selectedPointStyle(a,t)}function Jie(e,r){var t=r[0].node3,n=r[0].trace;n.selectedpoints?p_.selectedPointStyle(t.selectAll(".choroplethlocation"),n):WF(e,r)}ZF.exports={style:jie,styleOnSelect:Jie}});var g_=te((r1e,JF)=>{"use strict";var $ie=kt(),XF=pr(),Rv=Km(),Kie=Um().getTopojsonFeatures,jF=Ju().findExtremes,Qie=fy().style;function eoe(e,r,t){var n=r.layers.backplot.select(".choroplethlayer");XF.makeTraceGroups(n,t,"trace choropleth").each(function(a){var i=$ie.select(this),o=i.selectAll("path.choroplethlocation").data(XF.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Qie(e,a)})}function roe(e,r){for(var t=e[0].trace,n=r[t.geo],a=n._subplot,i=t.locationmode,o=t._length,l=i==="geojson-id"?Rv.extractTraceFeature(e):Kie(t,a.topojson),s=[],u=[],f=0;f{"use strict";var toe=Cn(),noe=sy(),aoe=pr().fillText;$F.exports=function(r,t,n){var a=r.cd,i=a[0].trace,o=r.subplot,l,s,u,f,v=[t,n],h=[t+360,n];for(s=0;s")}}});var eI=te((n1e,QF)=>{"use strict";QF.exports=function(r,t,n,a,i){r.location=t.location,r.z=t.z;var o=a[i];return o.fIn&&o.fIn.properties&&(r.properties=o.fIn.properties),r.ct=o.ct,r}});var tI=te((a1e,rI)=>{"use strict";rI.exports=function(r,t){var n=r.cd,a=r.xaxis,i=r.yaxis,o=[],l,s,u,f,v;if(t===!1)for(l=0;l{"use strict";nI.exports={attributes:sy(),supplyDefaults:HF(),colorbar:OF(),calc:VF(),calcGeoJSON:g_().calcGeoJSON,plot:g_().plot,style:fy().style,styleOnSelect:fy().styleOnSelect,hoverPoints:KF(),eventData:eI(),selectPoints:tI(),moduleType:"trace",name:"choropleth",basePlotModule:d_(),categories:["geo","noOpacity","showLegend"],meta:{}}});var oI=te((o1e,iI)=>{"use strict";iI.exports=aI()});var Ga=te((l1e,sI)=>{"use strict";var lI=Object.getOwnPropertySymbols,ooe=Object.prototype.hasOwnProperty,loe=Object.prototype.propertyIsEnumerable;function soe(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function uoe(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}sI.exports=uoe()?Object.assign:function(e,r){for(var t,n=soe(e),a,i=1;i{var vy=Ga();function uI(){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={}}vy(uI.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var n="",a=0;t>0;){var i=t%10;n=(i===0?"":e[i]+r[a])+n,a++,t=Math.floor(t/10)}return n.indexOf(e[1]+r[1])===0&&(n=n.substr(1)),n||e[0]}}});function m_(e,r,t,n){if(this._calendar=e,this._year=r,this._month=t,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function cy(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}vy(m_.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Tt.local.differentCalendars||Tt.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+cy(Math.abs(this.year()),4)+"-"+cy(this.month(),2)+"-"+cy(this.day(),2)}});function y_(){this.shortYearCutoff="+10"}vy(y_.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new m_(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+cy(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Tt.local.invalidMonth||Tt.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Tt.local.invalidMonth||Tt.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var n=this._validate(e,r,t,Tt.local.invalidDate||Tt.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,r,t){var n=this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var n=e.toJD()+r*(t==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(t==="y"?r:0),o=e.monthOfYear()+(t==="m"?r:0),a=e.day(),l=function(f){for(;ov-1+f.minMonth;)i++,o-=v,v=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):t==="m"&&(l(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=t<0?-1:1;r=this._add(e,t*a[0]+i*a[1],a[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate);var n=t==="y"?r:e.year(),a=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,r,t){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,r,this.minDay);n=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=a-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,r,t){var n=this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Tt=fI.exports=new uI;Tt.cdate=m_;Tt.baseCalendar=y_;Tt.calendars.gregorian=b_});var cI=te(()=>{var __=Ga(),Ca=Va();__(Ca.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"});Ca.local=Ca.regionalOptions[""];__(Ca.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});__(Ca.baseCalendar.prototype,{UNIX_EPOCH:Ca.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Ca.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw Ca.local.invalidFormat||Ca.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var n=t.dayNamesShort||this.local.dayNamesShort,a=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,o=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(_,A){for(var S=1;b+S1},f=function(_,A,S,k){var D=""+A;if(u(_,k))for(;D.length1},M=function(G,B){var X=x(G,B),V=[2,3,X?4:2,X?4:2,10,11,20]["oyYJ@!".indexOf(G)+1],re=new RegExp("^-?\\d{1,"+V+"}"),ne=r.substring(D).match(re);if(!ne)throw(Ca.local.missingNumberAt||Ca.regionalOptions[""].missingNumberAt).replace(/\{0\}/,D);return D+=ne[0].length,parseInt(ne[0],10)},b=this,_=function(){if(typeof l=="function"){x("m");var G=l.call(b,r.substring(D));return D+=G.length,G}return M("m")},A=function(G,B,X,V){for(var re=x(G,V)?X:B,ne=0;ne-1){h=1,d=m;for(var O=this.daysInMonth(v,h);d>O;O=this.daysInMonth(v,h))h++,d-=O}return f>-1?this.fromJD(f):this.newDate(v,h,d)},determineDate:function(e,r,t,n,a){t&&typeof t!="object"&&(a=n,n=t,t=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(l){try{return i.parseDate(n,l,a)}catch(v){}l=l.toLowerCase();for(var s=(l.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(l);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(l);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var vI=te(()=>{var mf=Va(),foe=Ga(),x_=mf.instance();function hy(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}hy.prototype=new mf.baseCalendar;foe(hy.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(voe);return t?t[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(hoe);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),i=["\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"][a-1];return this.isIntercalaryMonth(t,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(doe);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(t,n)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),n;if(isNaN(t))r[0]==="\u95F0"&&(n=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var a=r[r.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,t,n);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var n=this.intercalaryMonth(e),a=t&&r!==n;if(a||r<1||r>12)throw mf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!t&&r<=n?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),n=t?12:11;if(r<0||r>n)throw mf.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var n=this._validateYear(e,mf.local.invalidyear),a=bf[n-bf[0]],i=a>>9&4095,o=a>>5&15,l=a&31,s;s=x_.newDate(i,o,l),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=yf[e-yf[0]],n=t>>13,a=n?12:11;if(r>a)throw mf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,i,t,mf.local.invalidDate);e=this._validateYear(n.year()),r=n.month(),t=n.day();var a=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),o=goe(e,i,t,a);return x_.toJD(o.year,o.month,o.day)},fromJD:function(e){var r=x_.fromJD(e),t=poe(r.year(),r.month(),r.day()),n=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,n,t.day)},fromString:function(e){var r=e.match(coe),t=this._validateYear(+r[1]),n=+r[2],a=!!r[3],i=this.toMonthIndex(t,n,a),o=+r[4];return this.newDate(t,i,o)},add:function(e,r,t){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),l=Object.getPrototypeOf(hy.prototype).add.call(this,e,r,t);if(t==="y"){var s=l.year(),u=l.month(),f=this.isIntercalaryMonth(s,o),v=i&&f?this.toMonthIndex(s,o,!0):this.toMonthIndex(s,o,!1);v!==u&&l.month(v)}return l}});var coe=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,voe=/^\d?\d[iI]?/m,hoe=/^闰?十?[一二三四五六七八九]?月/m,doe=/^闰?十?[一二三四五六七八九]?/m;mf.calendars.chinese=hy;var yf=[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],bf=[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 poe(e,r,t,n){var a,i;if(typeof e=="object")a=e,i=r||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");a={year:e,month:r,day:t},i=n||{}}var u=bf[a.year-bf[0]],f=a.year<<9|a.month<<5|a.day;i.year=f>=u?a.year:a.year-1,u=bf[i.year-bf[0]];var v=u>>9&4095,h=u>>5&15,d=u&31,m,g=new Date(v,h-1,d),y=new Date(a.year,a.month-1,a.day);m=Math.round((y-g)/(24*3600*1e3));var x=yf[i.year-yf[0]],M;for(M=0;M<13;M++){var b=x&1<<12-M?30:29;if(m>13;return!_||M<_?(i.isIntercalary=!1,i.month=1+M):M===_?(i.isIntercalary=!0,i.month=M):(i.isIntercalary=!1,i.month=M),i.day=1+m,i}function goe(e,r,t,n,a){var i,o;if(typeof e=="object")o=e,i=r||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,i=n):(f=!!n,i=a||{}),o={year:e,month:r,day:t,isIntercalary:f}}var v;v=o.day-1;var h=yf[o.year-yf[0]],d=h>>13,m;d&&(o.month>d||o.isIntercalary)?m=o.month:m=o.month-1;for(var g=0;g>9&4095,b=x>>5&15,_=x&31,A=new Date(M,b-1,_+v);return i.year=A.getFullYear(),i.month=1+A.getMonth(),i.day=A.getDate(),i}});var hI=te(()=>{var Bc=Va(),moe=Ga();function w_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}w_.prototype=new Bc.baseCalendar;moe(w_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Bc.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Bc.local.invalidYear||Bc.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Bc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,Bc.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});Bc.calendars.coptic=w_});var dI=te(()=>{var fu=Va(),yoe=Ga();function M_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M_.prototype=new fu.baseCalendar;yoe(M_.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,fu.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fu.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fu.local.invalidYear),400},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,fu.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,fu.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,r,t){var n=this.dayOfWeek(e,r,t);return n>=2&&n<=6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,fu.local.invalidDate);return{century:boe[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,r,t){var n=this._validate(e,r,t,fu.local.invalidDate);return e=n.year()+(n.year()<0?1:0),r=n.month(),t=n.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,n=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,n)}});var boe={20:"Fruitbat",21:"Anchovy"};fu.calendars.discworld=M_});var pI=te(()=>{var Oc=Va(),_oe=Ga();function A_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}A_.prototype=new Oc.baseCalendar;_oe(A_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Oc.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Oc.local.invalidYear||Oc.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Oc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,Oc.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});Oc.calendars.ethiopian=A_});var gI=te(()=>{var _f=Va(),xoe=Ga();function T_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}T_.prototype=new _f.baseCalendar;xoe(T_.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 r=this._validate(e,this.minMonth,this.minDay,_f.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,dy(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,_f.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,_f.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,_f.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&dy(this.daysInYear(e),10)===5?30:r===9&&dy(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,_f.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,r,t){var n=this._validate(e,r,t,_f.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+t+1;if(r<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});function dy(e,r){return e-r*Math.floor(e/r)}_f.calendars.hebrew=T_});var mI=te(()=>{var Ih=Va(),woe=Ga();function k_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}k_.prototype=new Ih.baseCalendar;woe(k_.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 r=this._validate(e,this.minMonth,this.minDay,Ih.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);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,r){var t=this._validate(e,r,this.minDay,Ih.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,Ih.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});Ih.calendars.islamic=k_});var yI=te(()=>{var Hh=Va(),Moe=Ga();function S_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}S_.prototype=new Hh.baseCalendar;Moe(S_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Hh.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Hh.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,Hh.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,n=Math.floor((t-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((t-a)/30.6001),o=i-Math.floor(i<14?1:13),l=n-Math.floor(o>2?4716:4715),s=t-a-Math.floor(30.6001*i);return l<=0&&l--,this.newDate(l,o,s)}});Hh.calendars.julian=S_});var _I=te(()=>{var Ho=Va(),Aoe=Ga();function L_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}L_.prototype=new Ho.baseCalendar;Aoe(L_.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,Ho.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ho.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return t+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&n<0)throw"Invalid Mayan year";r=r*20+n}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ho.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Ho.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ho.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Ho.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,Ho.local.invalidDate);return n.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Ho.local.invalidDate),!0},extraInfo:function(e,r,t){var n=this._validate(e,r,t,Ho.local.invalidDate),a=n.toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=C_(e+8+17*20,365);return[Math.floor(r/20)+1,C_(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[bI(e+20,20),bI(e+4,13)]},toJD:function(e,r,t){var n=this._validate(e,r,t,Ho.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),n=e%20;return this.newDate(r,t,n)}});function C_(e,r){return e-r*Math.floor(e/r)}function bI(e,r){return C_(e-1,r)+1}Ho.calendars.mayan=L_});var wI=te(()=>{var Uc=Va(),Toe=Ga();function q_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}q_.prototype=new Uc.baseCalendar;var xI=Uc.instance("gregorian");Toe(q_.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 r=this._validate(e,this.minMonth,this.minDay,Uc.local.invalidYear||Uc.regionalOptions[""].invalidYear);return xI.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Uc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,Uc.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,n=1;t>this.daysInMonth(r,n);)t-=this.daysInMonth(r,n),n++;return this.newDate(r,n,t)}});Uc.calendars.nanakshahi=q_});var MI=te(()=>{var Yc=Va(),koe=Ga();function D_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D_.prototype=new Yc.baseCalendar;koe(D_.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Yc.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Yc.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var n=this._validate(e,r,t,Yc.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=Yc.instance(),i=0,o=r,l=e;this._createMissingCalendarData(e);var s=e-(o>9||o===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(i=t,o--);o!==9;)o<=0&&(o=12,l--),i+=this.NEPALI_CALENDAR_DATA[l][o],o--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[l][0],i<0&&(i+=a.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=Yc.instance(),t=r.fromJD(e),n=t.year(),a=t.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)o++,o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var zv=Va(),Soe=Ga();function py(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}py.prototype=new zv.baseCalendar;Soe(py.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,zv.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,zv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,zv.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e-(e>=0?474:473),i=474+E_(a,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(a/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),n=E_(r,1029983),a=2820;if(n!==1029982){var i=Math.floor(n/366),o=E_(n,366);a=Math.floor((2134*i+2816*o+2815)/1028522)+i+1}var l=a+2820*t+474;l=l<=0?l-1:l;var s=e-this.toJD(l,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}});function E_(e,r){return e-r*Math.floor(e/r)}zv.calendars.persian=py;zv.calendars.jalali=py});var TI=te(()=>{var Gc=Va(),Coe=Ga(),gy=Gc.instance();function P_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P_.prototype=new Gc.baseCalendar;Coe(P_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Gc.local.invalidYear),t=this._t2gYear(r.year());return gy.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,Gc.local.invalidYear),a=this._t2gYear(n.year());return gy.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Gc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,Gc.local.invalidDate),a=this._t2gYear(n.year());return gy.toJD(a,n.month(),n.day())},fromJD:function(e){var r=gy.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Gc.calendars.taiwan=P_});var kI=te(()=>{var Vc=Va(),Loe=Ga(),my=Vc.instance();function R_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}R_.prototype=new Vc.baseCalendar;Loe(R_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Vc.local.invalidYear),t=this._t2gYear(r.year());return my.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,Vc.local.invalidYear),a=this._t2gYear(n.year());return my.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Vc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,Vc.local.invalidDate),a=this._t2gYear(n.year());return my.toJD(a,n.month(),n.day())},fromJD:function(e){var r=my.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Vc.calendars.thai=R_});var SI=te(()=>{var Wc=Va(),qoe=Ga();function z_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z_.prototype=new Wc.baseCalendar;qoe(z_.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 r=this._validate(e,this.minMonth,this.minDay,Wc.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,Wc.local.invalidMonth),n=t.toJD()-24e5+.5,a=0,i=0;in)return xf[a]-xf[a-1];a++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,Wc.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+xf[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,n=0;nr);n++)t++;var a=t+15292,i=Math.floor((a-1)/12),o=i+1,l=a-12*i,s=r-xf[t-1]+1;return this.newDate(o,l,s)},isValid:function(e,r,t){var n=Wc.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,r,t,n){var a=Wc.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});Wc.calendars.ummalqura=z_;var xf=[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 LI=te((H1e,CI)=>{"use strict";CI.exports=Va();cI();vI();hI();dI();pI();gI();mI();yI();_I();wI();MI();AI();TI();kI();SI()});var NI=te((B1e,zI)=>{"use strict";var DI=LI(),Bh=pr(),EI=En(),Doe=EI.EPOCHJD,Eoe=EI.ONEDAY,I_={valType:"enumerated",values:Bh.sortObjectKeys(DI.calendars),editType:"calc",dflt:"gregorian"},PI=function(e,r,t,n){var a={};return a[t]=I_,Bh.coerce(e,r,a,t,n)},Poe=function(e,r,t,n){for(var a=0;a{"use strict";FI.exports=NI()});var Hoe=te((U1e,BI)=>{var HI=nN();HI.register([RF(),oI(),II()]);BI.exports=HI});return Hoe();})(); +`+H7(i.dayMonthYear,e,n,a);return H7(r,e,n,a)};var B7=3*Di;jn.incrementMonth=function(e,r,t){t=Ws(t)&&t;var n=Iu(e,Di);if(e=Math.round(e-n),t)try{var a=Math.round(e/Di)+l1,i=Vs.getComponentMethod("calendars","getCal")(t),o=i.fromJD(a);return r%12?i.add(o,r,"m"):i.add(o,r/12,"y"),(o.toJD()-l1)*Di+n}catch(s){Gy.error("invalid ms "+e+" in calendar "+t)}var l=new Date(e+B7);return l.setUTCMonth(l.getUTCMonth()+r)+n-B7};jn.findExactDates=function(e,r){for(var t=0,n=0,a=0,i=0,o,l,s=Ws(r)&&Vs.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";G7.exports=function(r){return r}});var Wy=ne(Zs=>{"use strict";var tO=Bt(),nO=Pu(),aO=kd(),iO=En().BADNUM,Vy=1e-9;Zs.findBin=function(e,r,t){if(tO(r.start))return t?Math.ceil((e-r.start)/r.size-Vy)-1:Math.floor((e-r.start)/r.size+Vy);var n=0,a=r.length,i=0,o=a>1?(r[a-1]-r[0])/(a-1):1,l,s;for(o>=0?s=t?oO:lO:s=t?uO:sO,e+=o*Vy*(t?-1:1)*(o>=0?1:-1);n90&&nO.log("Long binary search..."),n-1};function oO(e,r){return er}function uO(e,r){return e>=r}Zs.sorterAsc=function(e,r){return e-r};Zs.sorterDes=function(e,r){return r-e};Zs.distinctVals=function(e){var r=e.slice();r.sort(Zs.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===iO;t--);for(var n=r[t]-r[0]||1,a=n/(t||1)/1e4,i=[],o,l=0;l<=t;l++){var s=r[l],u=s-o;o===void 0?(i.push(s),o=s):u>a&&(n=Math.min(n,u),i.push(s),o=s)}return{vals:i,minDiff:n}};Zs.roundUp=function(e,r,t){for(var n=0,a=r.length-1,i,o=0,l=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;n0&&(n=1),t&&n)return e.sort(r)}return n?e:e.reverse()};Zs.findIndexOfMin=function(e,r){r=r||aO;for(var t=1/0,n,a=0;a{"use strict";V7.exports=function(r){return Object.keys(r).sort()}});var W7=ne(Jn=>{"use strict";var s1=Bt(),fO=Ji().isArrayOrTypedArray;Jn.aggNums=function(e,r,t,n){var a,i;if((!n||n>t.length)&&(n=t.length),s1(r)||(r=!1),fO(t[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var $7=ne((mse,J7)=>{"use strict";var Z7=b0(),Zy=Z7.mod,cO=Z7.modHalf,u1=Math.PI,Hu=2*u1;function vO(e){return e/180*u1}function hO(e){return e/u1*180}function Xy(e){return Math.abs(e[1]-e[0])>Hu-1e-14}function X7(e,r){return cO(r-e,Hu)}function dO(e,r){return Math.abs(X7(e,r))}function j7(e,r){if(Xy(r))return!0;var t,n;r[0]n&&(n+=Hu);var a=Zy(e,Hu),i=a+Hu;return a>=t&&a<=n||i>=t&&i<=n}function pO(e,r,t,n){if(!j7(r,n))return!1;var a,i;return t[0]=a&&e<=i}function jy(e,r,t,n,a,i,o){a=a||0,i=i||0;var l=Xy([t,n]),s,u,f,v,h;l?(s=0,u=u1,f=Hu):t{"use strict";ec.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};ec.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};ec.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};ec.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};ec.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};ec.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var rw=ne(rc=>{"use strict";var Jy=b0().mod;rc.segmentsIntersect=ew;function ew(e,r,t,n,a,i,o,l){var s=t-e,u=a-e,f=o-a,v=n-r,h=i-r,d=l-i,m=s*d-f*v;if(m===0)return null;var g=(u*d-f*h)/m,y=(u*v-s*h)/m;return y<0||y>1||g<0||g>1?null:{x:e+s*g,y:r+v*g}}rc.segmentDistance=function(r,t,n,a,i,o,l,s){if(ew(r,t,n,a,i,o,l,s))return 0;var u=n-r,f=a-t,v=l-i,h=s-o,d=u*u+f*f,m=v*v+h*h,g=Math.min(Cd(u,f,d,i-r,o-t),Cd(u,f,d,l-r,s-t),Cd(v,h,m,r-i,t-o),Cd(v,h,m,n-i,a-o));return Math.sqrt(g)};function Cd(e,r,t,n,a){var i=n*e+a*r;if(i<0)return n*n+a*a;if(i>t){var o=n-e,l=a-r;return o*o+l*l}else{var s=n*r-a*e;return s*s/t}}var Ld,$y,Q7;rc.getTextLocation=function(r,t,n,a){if((r!==$y||a!==Q7)&&(Ld={},$y=r,Q7=a),Ld[n])return Ld[n];var i=r.getPointAtLength(Jy(n-a/2,t)),o=r.getPointAtLength(Jy(n+a/2,t)),l=Math.atan((o.y-i.y)/(o.x-i.x)),s=r.getPointAtLength(Jy(n,t)),u=(s.x*4+i.x+o.x)/6,f=(s.y*4+i.y+o.y)/6,v={x:u,y:f,theta:l};return Ld[n]=v,v};rc.clearLocationCache=function(){$y=null};rc.getVisibleSegment=function(r,t,n){var a=t.left,i=t.right,o=t.top,l=t.bottom,s=0,u=r.getTotalLength(),f=u,v,h;function d(g){var y=r.getPointAtLength(g);g===0?v=y:g===u&&(h=y);var x=y.xi?y.x-i:0,T=y.yl?y.y-l:0;return Math.sqrt(x*x+T*T)}for(var m=d(s);m;){if(s+=m+n,s>f)return;m=d(s)}for(m=d(f);m;){if(f-=m+n,s>f)return;m=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(v.x-h.x)<.1&&Math.abs(v.y-h.y)<.1}};rc.findPointOnPath=function(r,t,n,a){a=a||{};for(var i=a.pathLength||r.getTotalLength(),o=a.tolerance||.001,l=a.iterationLimit||30,s=r.getPointAtLength(0)[n]>r.getPointAtLength(i)[n]?-1:1,u=0,f=0,v=i,h,d,m;u0?v=h:f=h,u++}return d}});var qd=ne(f1=>{"use strict";var Xs={};f1.throttle=function(r,t,n){var a=Xs[r],i=Date.now();if(!a){for(var o in Xs)Xs[o].tsa.ts+t){l();return}a.timer=setTimeout(function(){l(),a.timer=null},t)};f1.done=function(e){var r=Xs[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var n=r.onDone;r.onDone=function(){n&&n(),t(),r.onDone=null}})};f1.clear=function(e){if(e)tw(Xs[e]),delete Xs[e];else for(var r in Xs)f1.clear(r)};function tw(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var aw=ne((xse,nw)=>{"use strict";nw.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var iw=ne((wse,Dd)=>{"use strict";Dd.exports=Ky;Dd.exports.isMobile=Ky;Dd.exports.default=Ky;var bO=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,_O=/CrOS/,xO=/android|ipad|playbook|silk/i;function Ky(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=bO.test(r)&&!_O.test(r)||!!e.tablet&&xO.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var lw=ne((Mse,ow)=>{"use strict";var wO=Bt(),MO=iw();ow.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=AO(),typeof t!="string")return!0;var n=MO({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var a=t.split(" "),i=1;i-1;l--){var s=a[l];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(wO(u)&&(u=+u),u>=13)return!0}}}return n};function AO(){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 uw=ne((Ase,sw)=>{"use strict";var TO=kt();sw.exports=function(r,t,n){var a=r.selectAll("g."+n.replace(/\s/g,".")).data(t,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=TO.select(this)}),a}});var cw=ne((Tse,fw)=>{"use strict";var kO=dt();fw.exports=function(r,t){for(var n=r._context.locale,a=0;a<2;a++){for(var i=r._context.locales,o=0;o<2;o++){var l=(i[n]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=kO.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return t}});var hw=ne((kse,vw)=>{"use strict";vw.exports=function(r){for(var t={},n=[],a=0,i=0;i{"use strict";dw.exports=function(r){for(var t=LO(r)?CO:SO,n=[],a=0;a{"use strict";gw.exports=function(r,t){if(!t)return r;var n=1/Math.abs(t),a=n>1?(n*r+n*t)/n:r+t,i=String(a).length;if(i>16){var o=String(t).length,l=String(r).length;if(i>=l+o){var s=parseFloat(a).toPrecision(12);s.indexOf("e+")===-1&&(a=+s)}}return a}});var bw=ne((Lse,yw)=>{"use strict";var qO=Bt(),DO=En().BADNUM,EO=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;yw.exports=function(r){return typeof r=="string"&&(r=r.replace(EO,"")),qO(r)?Number(r):DO}});var pr=ne((qse,Ew)=>{"use strict";var c1=kt(),PO=m0().utcFormat,RO=xy().format,Tw=Bt(),kw=En(),Sw=kw.FP_SAFE,zO=-Sw,_w=kw.BADNUM,Ee=Ew.exports={};Ee.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var xw={};Ee.warnBadFormat=function(e){var r=String(e);xw[r]||(xw[r]=1,Ee.warn('encountered bad format: "'+r+'"'))};Ee.noFormat=function(e){return String(e)};Ee.numberFormat=function(e){var r;try{r=RO(Ee.adjustFormat(e))}catch(t){return Ee.warnBadFormat(e),Ee.noFormat}return r};Ee.nestedProperty=$v();Ee.keyedContainer=c6();Ee.relativeAttr=h6();Ee.isPlainObject=Gs();Ee.toLogRange=id();Ee.relinkPrivateKeys=m6();var Bu=Ji();Ee.isArrayBuffer=Bu.isArrayBuffer;Ee.isTypedArray=Bu.isTypedArray;Ee.isArrayOrTypedArray=Bu.isArrayOrTypedArray;Ee.isArray1D=Bu.isArray1D;Ee.ensureArray=Bu.ensureArray;Ee.concat=Bu.concat;Ee.maxRowLength=Bu.maxRowLength;Ee.minRowLength=Bu.minRowLength;var Cw=b0();Ee.mod=Cw.mod;Ee.modHalf=Cw.modHalf;var Ou=N6();Ee.valObjectMeta=Ou.valObjectMeta;Ee.coerce=Ou.coerce;Ee.coerce2=Ou.coerce2;Ee.coerceFont=Ou.coerceFont;Ee.coercePattern=Ou.coercePattern;Ee.coerceHoverinfo=Ou.coerceHoverinfo;Ee.coerceSelectionMarkerOpacity=Ou.coerceSelectionMarkerOpacity;Ee.validate=Ou.validate;var $i=Y7();Ee.dateTime2ms=$i.dateTime2ms;Ee.isDateTime=$i.isDateTime;Ee.ms2DateTime=$i.ms2DateTime;Ee.ms2DateTimeLocal=$i.ms2DateTimeLocal;Ee.cleanDate=$i.cleanDate;Ee.isJSDate=$i.isJSDate;Ee.formatDate=$i.formatDate;Ee.incrementMonth=$i.incrementMonth;Ee.dateTick0=$i.dateTick0;Ee.dfltRange=$i.dfltRange;Ee.findExactDates=$i.findExactDates;Ee.MIN_MS=$i.MIN_MS;Ee.MAX_MS=$i.MAX_MS;var tc=Wy();Ee.findBin=tc.findBin;Ee.sorterAsc=tc.sorterAsc;Ee.sorterDes=tc.sorterDes;Ee.distinctVals=tc.distinctVals;Ee.roundUp=tc.roundUp;Ee.sort=tc.sort;Ee.findIndexOfMin=tc.findIndexOfMin;Ee.sortObjectKeys=Sd();var js=W7();Ee.aggNums=js.aggNums;Ee.len=js.len;Ee.mean=js.mean;Ee.geometricMean=js.geometricMean;Ee.median=js.median;Ee.midRange=js.midRange;Ee.variance=js.variance;Ee.stdev=js.stdev;Ee.interp=js.interp;var vl=pd();Ee.init2dArray=vl.init2dArray;Ee.transposeRagged=vl.transposeRagged;Ee.dot=vl.dot;Ee.translationMatrix=vl.translationMatrix;Ee.rotationMatrix=vl.rotationMatrix;Ee.rotationXYMatrix=vl.rotationXYMatrix;Ee.apply3DTransform=vl.apply3DTransform;Ee.apply2DTransform=vl.apply2DTransform;Ee.apply2DTransform2=vl.apply2DTransform2;Ee.convertCssMatrix=vl.convertCssMatrix;Ee.inverseTransformMatrix=vl.inverseTransformMatrix;var Ql=$7();Ee.deg2rad=Ql.deg2rad;Ee.rad2deg=Ql.rad2deg;Ee.angleDelta=Ql.angleDelta;Ee.angleDist=Ql.angleDist;Ee.isFullCircle=Ql.isFullCircle;Ee.isAngleInsideSector=Ql.isAngleInsideSector;Ee.isPtInsideSector=Ql.isPtInsideSector;Ee.pathArc=Ql.pathArc;Ee.pathSector=Ql.pathSector;Ee.pathAnnulus=Ql.pathAnnulus;var q0=K7();Ee.isLeftAnchor=q0.isLeftAnchor;Ee.isCenterAnchor=q0.isCenterAnchor;Ee.isRightAnchor=q0.isRightAnchor;Ee.isTopAnchor=q0.isTopAnchor;Ee.isMiddleAnchor=q0.isMiddleAnchor;Ee.isBottomAnchor=q0.isBottomAnchor;var D0=rw();Ee.segmentsIntersect=D0.segmentsIntersect;Ee.segmentDistance=D0.segmentDistance;Ee.getTextLocation=D0.getTextLocation;Ee.clearLocationCache=D0.clearLocationCache;Ee.getVisibleSegment=D0.getVisibleSegment;Ee.findPointOnPath=D0.findPointOnPath;var Rd=la();Ee.extendFlat=Rd.extendFlat;Ee.extendDeep=Rd.extendDeep;Ee.extendDeepAll=Rd.extendDeepAll;Ee.extendDeepNoArrays=Rd.extendDeepNoArrays;var Qy=Pu();Ee.log=Qy.log;Ee.warn=Qy.warn;Ee.error=Qy.error;var NO=x0();Ee.counterRegex=NO.counter;var e2=qd();Ee.throttle=e2.throttle;Ee.throttleDone=e2.done;Ee.clearThrottle=e2.clear;var hl=a1();Ee.getGraphDiv=hl.getGraphDiv;Ee.isPlotDiv=hl.isPlotDiv;Ee.removeElement=hl.removeElement;Ee.addStyleRule=hl.addStyleRule;Ee.addRelatedStyleRule=hl.addRelatedStyleRule;Ee.deleteRelatedStyleRule=hl.deleteRelatedStyleRule;Ee.setStyleOnHover=hl.setStyleOnHover;Ee.getFullTransformMatrix=hl.getFullTransformMatrix;Ee.getElementTransformMatrix=hl.getElementTransformMatrix;Ee.getElementAndAncestors=hl.getElementAndAncestors;Ee.equalDomRects=hl.equalDomRects;Ee.clearResponsive=aw();Ee.preserveDrawingBuffer=lw();Ee.makeTraceGroups=uw();Ee._=cw();Ee.notifier=Ey();Ee.filterUnique=hw();Ee.filterVisible=pw();Ee.pushUnique=zy();Ee.increment=mw();Ee.cleanNumber=bw();Ee.ensureNumber=function(r){return Tw(r)?(r=Number(r),r>Sw||r=r?!1:Tw(e)&&e>=0&&e%1===0};Ee.noop=dd();Ee.identity=kd();Ee.repeat=function(e,r){for(var t=new Array(r),n=0;nt?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};Ee.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};Ee.simpleMap=function(e,r,t,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,t)?a>10?(Ee.warn("randstr failed uniqueness"),o):e(r,t,n,(a||0)+1):o};Ee.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(n){n[r]=e,t[n.name]=n,t.optionList.push(n)},t["_"+r]=e,t};Ee.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,n=2*t,a=2*r-1,i=new Array(a),o=new Array(t),l,s,u,f;for(l=0;l=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=t&&(u=n-1-u),f+=e[u]*i[s];o[l]=f}return o};Ee.syncOrAsync=function(e,r,t){var n,a;function i(){return Ee.syncOrAsync(e,r,t)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(r),n&&n.then)return n.then(i);return t&&t(r)};Ee.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};Ee.noneOrAll=function(e,r,t){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};Ee.fillArray=function(e,r,t,n){if(n=n||Ee.identity,Ee.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||t))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s};Ee.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Dw=/^\w*$/;Ee.templateString=function(e,r){var t={};return e.replace(Ee.TEMPLATE_STRING_REGEX,function(n,a){var i;return Dw.test(a)?i=r[a]:(t[a]=t[a]||Ee.nestedProperty(r,a).get,i=t[a]()),Ee.isValidTextValue(i)?i:""})};var UO={max:10,count:0,name:"hovertemplate"};Ee.hovertemplateString=function(){return r2.apply(UO,arguments)};var YO={max:10,count:0,name:"texttemplate"};Ee.texttemplateString=function(){return r2.apply(YO,arguments)};var GO=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function VO(e){var r=e.match(GO);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var WO={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ee.texttemplateStringForShapes=function(){return r2.apply(WO,arguments)};var ww=/^[:|\|]/;function r2(e,r,t){var n=this,a=arguments;r||(r={});var i={};return e.replace(Ee.TEMPLATE_STRING_REGEX,function(o,l,s){var u=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",h=l==="xother_"||l==="yother_",d=u||f||h||v,m=l;(f||v)&&(m=m.substring(1)),(h||v)&&(m=m.substring(0,m.length-1));var g=null,y=null;if(n.parseMultDiv){var x=VO(m);m=x.key,g=x.op,y=x.number}var T;if(d){if(T=r[m],T===void 0)return""}else{var _,b;for(b=3;b=Pd&&o<=Mw,u=l>=Pd&&l<=Mw;if(s&&(n=10*n+o-Pd),u&&(a=10*a+l-Pd),!s||!u){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var L0=2e9;Ee.seedPseudoRandom=function(){L0=2e9};Ee.pseudoRandom=function(){var e=L0;return L0=(69069*L0+1)%4294967296,Math.abs(L0-e)<429496729?Ee.pseudoRandom():L0/4294967296};Ee.fillText=function(e,r,t){var n=Array.isArray(t)?function(o){t.push(o)}:function(o){t.text=o},a=Ee.extractOption(e,r,"htx","hovertext");if(Ee.isValidTextValue(a))return n(a);var i=Ee.extractOption(e,r,"tx","text");if(Ee.isValidTextValue(i))return n(i)};Ee.isValidTextValue=function(e){return e||e===0};Ee.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",n=0;n1&&(u=1):u=0,Ee.strTranslate(a-u*(t+o),i-u*(n+l))+Ee.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+n)+")":"")};Ee.setTransormAndDisplay=function(e,r){e.attr("transform",Ee.getTextTransform(r)),e.style("display",r.scale?null:"none")};Ee.ensureUniformFontSize=function(e,r){var t=Ee.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};Ee.join2=function(e,r,t){var n=e.length;return n>1?e.slice(0,-1).join(r)+t+e[n-1]:e.join(r)};Ee.bigFont=function(e){return Math.round(1.2*e)};var Aw=Ee.getFirefoxVersion(),ZO=Aw!==null&&Aw<86;Ee.getPositionFromD3Event=function(){return ZO?[c1.event.layerX,c1.event.layerY]:[c1.event.offsetX,c1.event.offsetY]}});var zw=ne(()=>{"use strict";var XO=pr(),Pw={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(t2 in Pw)Rw=t2.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),XO.addStyleRule(Rw,Pw[t2]);var Rw,t2});var n2=ne((Pse,Nw)=>{Nw.exports=!0});var i2=ne((Rse,Fw)=>{"use strict";var jO=n2(),a2;typeof window.matchMedia=="function"?a2=!window.matchMedia("(hover: none)").matches:a2=jO;Fw.exports=a2});var Fd=ne((zse,o2)=>{"use strict";var E0=typeof Reflect=="object"?Reflect:null,Iw=E0&&typeof E0.apply=="function"?E0.apply:function(r,t,n){return Function.prototype.apply.call(r,t,n)},zd;E0&&typeof E0.ownKeys=="function"?zd=E0.ownKeys:Object.getOwnPropertySymbols?zd=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:zd=function(r){return Object.getOwnPropertyNames(r)};function JO(e){console&&console.warn&&console.warn(e)}var Bw=Number.isNaN||function(r){return r!==r};function An(){An.init.call(this)}o2.exports=An;o2.exports.once=eU;An.EventEmitter=An;An.prototype._events=void 0;An.prototype._eventsCount=0;An.prototype._maxListeners=void 0;var Hw=10;function Nd(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(An,"defaultMaxListeners",{enumerable:!0,get:function(){return Hw},set:function(e){if(typeof e!="number"||e<0||Bw(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Hw=e}});An.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};An.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Bw(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Ow(e){return e._maxListeners===void 0?An.defaultMaxListeners:e._maxListeners}An.prototype.getMaxListeners=function(){return Ow(this)};An.prototype.emit=function(r){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")Iw(s,this,t);else for(var u=s.length,f=Ww(s,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=o.length,JO(l)}return e}An.prototype.addListener=function(r,t){return Uw(this,r,t,!1)};An.prototype.on=An.prototype.addListener;An.prototype.prependListener=function(r,t){return Uw(this,r,t,!0)};function $O(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Yw(e,r,t){var n={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},a=$O.bind(n);return a.listener=t,n.wrapFn=a,a}An.prototype.once=function(r,t){return Nd(t),this.on(r,Yw(this,r,t)),this};An.prototype.prependOnceListener=function(r,t){return Nd(t),this.prependListener(r,Yw(this,r,t)),this};An.prototype.removeListener=function(r,t){var n,a,i,o,l;if(Nd(t),a=this._events,a===void 0)return this;if(n=a[r],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete a[r],a.removeListener&&this.emit("removeListener",r,n.listener||t));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){l=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():KO(n,i),n.length===1&&(a[r]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};An.prototype.off=An.prototype.removeListener;An.prototype.removeAllListeners=function(r){var t,n,a;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[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(r,t[a]);return this};function Gw(e,r,t){var n=e._events;if(n===void 0)return[];var a=n[r];return a===void 0?[]:typeof a=="function"?t?[a.listener||a]:[a]:t?QO(a):Ww(a,a.length)}An.prototype.listeners=function(r){return Gw(this,r,!0)};An.prototype.rawListeners=function(r){return Gw(this,r,!1)};An.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):Vw.call(e,r)};An.prototype.listenerCount=Vw;function Vw(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}An.prototype.eventNames=function(){return this._eventsCount>0?zd(this._events):[]};function Ww(e,r){for(var t=new Array(r),n=0;n{"use strict";var l2=Fd().EventEmitter,tU={init:function(e){if(e._ev instanceof l2)return e;var r=new l2,t=new l2;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(n,a){r.emit(n,a),t.emit(n,a)},e},triggerHandler:function(e,r,t){var n,a=e._ev;if(!a)return;var i=a._events[r];if(!i)return;function o(s){if(s.listener){if(a.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(a,[t])}else return s.apply(a,[t])}i=Array.isArray(i)?i:[i];var l;for(l=0;l{"use strict";var jw=pr(),nU=Kf().dfltConfig;function aU(e,r){for(var t=[],n,a=0;anU.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Js.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Js.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Js.undo=function(r){var t,n;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n{"use strict";Kw.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var z0=ne(sa=>{"use strict";var wo=dt(),h1=pr(),Hd=bo(),u2=A0(),iU=s2(),oU=i1(),lU=Kf().configAttributes,Qw=_o(),dl=h1.extendDeepAll,P0=h1.isPlainObject,sU=h1.isArrayOrTypedArray,Bd=h1.nestedProperty,uU=h1.valObjectMeta,f2="_isSubplotObj",Od="_isLinkedToArray",fU="_arrayAttrRegexps",r9="_deprecated",c2=[f2,Od,fU,r9];sa.IS_SUBPLOT_OBJ=f2;sa.IS_LINKED_TO_ARRAY=Od;sa.DEPRECATED=r9;sa.UNDERSCORE_ATTRS=c2;sa.get=function(){var e={};return wo.allTypes.forEach(function(r){e[r]=vU(r)}),{defs:{valObjects:uU,metaKeys:c2.concat(["description","role","editType","impliedEdits"]),editType:{traces:Qw.traces,layout:Qw.layout},impliedEdits:{}},traces:e,layout:hU(),frames:dU(),animation:R0(oU),config:R0(lU)}};sa.crawl=function(e,r,t,n){var a=t||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(c2.indexOf(i)===-1){var l=(n?n+".":"")+i;r(o,i,e,a,l),!sa.isValObject(o)&&P0(o)&&i!=="impliedEdits"&&sa.crawl(o,r,a+1,l)}})};sa.isValObject=function(e){return e&&e.valType!==void 0};sa.findArrayAttributes=function(e){var r=[],t=[],n=[],a,i;function o(s,u,f,v){t=t.slice(0,v).concat([u]),n=n.slice(0,v).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[v-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&l(a,0,"")}function l(s,u,f){var v=s[t[u]],h=f+t[u];if(u===t.length-1)sU(v)&&r.push(i+h);else if(n[u]){if(Array.isArray(v))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var o=r[t];if(!Id(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function Id(e){return e===Math.round(e)&&e>=0}function vU(e){var r,t;r=wo.modules[e]._module,t=r.basePlotModule;var n={};n.type=null;var a=dl({},Hd),i=dl({},r.attributes);sa.crawl(i,function(s,u,f,v,h){Bd(a,h).set(void 0),s===void 0&&Bd(i,h).set(void 0)}),dl(n,a),wo.traceIs(e,"noOpacity")&&delete n.opacity,wo.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),wo.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),r.selectPoints||delete n.selectedpoints,dl(n,i),t.attributes&&dl(n,t.attributes),n.type=e;var o={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:R0(n)};if(r.layoutAttributes){var l={};dl(l,r.layoutAttributes),o.layoutAttributes=R0(l)}return r.animatable||sa.crawl(o,function(s){sa.isValObject(s)&&"anim"in s&&delete s.anim}),o}function hU(){var e={},r,t;dl(e,u2);for(r in wo.subplotsRegistry)if(t=wo.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var n=0;n{"use strict";var N0=pr(),bU=bo(),Uu="templateitemname",v2={name:{valType:"string",editType:"none"}};v2[Uu]={valType:"string",editType:"calc"};nc.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=v2.name,r[Uu]=v2[Uu],r};nc.traceTemplater=function(e){var r={},t,n;for(t in e)n=e[t],Array.isArray(n)&&n.length&&(r[t]=0);function a(i){t=N0.coerce(i,{},bU,"type");var o={type:t,_template:null};if(t in r){n=e[t];var l=r[t]%n.length;r[t]++,o._template=n[l]}return o}return{newTrace:a}};nc.newContainer=function(e,r,t){var n=e._template,a=n&&(n[r]||t&&n[t]);N0.isPlainObject(a)||(a=null);var i=e[r]={_template:a};return i};nc.arrayTemplater=function(e,r,t){var n=e._template,a=n&&n[a9(r)],i=n&&n[r];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function l(u){var f={name:u.name,_input:u},v=f[Uu]=u[Uu];if(!n9(v))return f._template=a,f;for(var h=0;h=n&&(t._input||{})._templateitemname;i&&(a=n);var o=r+"["+a+"]",l;function s(){l={},i&&(l[o]={},l[o][Uu]=i)}s();function u(d,m){l[d]=m}function f(d,m){i?N0.nestedProperty(l[o],d).set(m):l[o+"."+d]=m}function v(){var d=l;return s(),d}function h(d,m){d&&f(d,m);var g=v();for(var y in g)N0.nestedProperty(e,y).set(g[y])}return{modifyBase:u,modifyItem:f,getUpdateObj:v,applyUpdate:h}}});var Pa=ne((Ose,i9)=>{"use strict";var d1=x0().counter;i9.exports={idRegex:{x:d1("x","( domain)?"),y:d1("y","( domain)?")},attrRegex:d1("[xy]axis"),xAxisMatch:d1("xaxis"),yAxisMatch:d1("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 ya=ne(Ei=>{"use strict";var _U=dt(),h2=Pa();Ei.id2name=function(r){if(!(typeof r!="string"||!r.match(h2.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};Ei.name2id=function(r){if(r.match(h2.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};Ei.cleanId=function(r,t,n){var a=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(h2.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(a&&!n)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(a&&n?" domain":"")}};Ei.list=function(e,r,t){var n=e._fullLayout;if(!n)return[];var a=Ei.listIds(e,r),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};Ei.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function o9(e,r){if(r&&r.length){for(var t=0;t{"use strict";function xU(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function wU(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}l9.exports={clearOutlineControllers:xU,clearOutline:wU}});var Ud=ne((Gse,s9)=>{"use strict";s9.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var p1=ne(Gd=>{"use strict";var Yd=dt(),Vse=Pa().SUBPLOT_PATTERN;Gd.getSubplotCalcData=function(e,r,t){var n=Yd.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var MU=dt(),F0=pr();ac.manageCommandObserver=function(e,r,t,n){var a={},i=!0;r&&r._commandObserver&&(a=r._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=ac.hasSimpleAPICommandBindings(e,t,a.lookupTable);if(r&&r._commandObserver){if(o)return a;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,a}if(o){u9(e,o,a.cache),a.check=function(){if(i){var f=u9(e,o,a.cache);return f.changed&&n&&a.lookupTable[f.value]!==void 0&&(a.disable(),Promise.resolve(n({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[f.value]})).then(a.enable,a.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+a;F0.isPlainObject(i)?d2(i,r,o,n+1):r(o,a,i)}})}});var ua=ne((Xse,k9)=>{"use strict";var b9=kt(),TU=m0().timeFormatLocale,kU=xy().formatLocale,g1=Bt(),SU=wy(),Zt=dt(),_9=z0(),CU=_n(),Xr=pr(),x9=zt(),h9=En().BADNUM,Pi=ya(),LU=Yu().clearOutline,qU=Ud(),p2=i1(),DU=s2(),EU=p1().getModuleCalcData,d9=Xr.relinkPrivateKeys,ic=Xr._,Nr=k9.exports={};Xr.extendFlat(Nr,Zt);Nr.attributes=bo();Nr.attributes.type.values=Nr.allTypes;Nr.fontAttrs=$a();Nr.layoutAttributes=A0();var Wd=v9();Nr.executeAPICommand=Wd.executeAPICommand;Nr.computeAPICommandBindings=Wd.computeAPICommandBindings;Nr.manageCommandObserver=Wd.manageCommandObserver;Nr.hasSimpleAPICommandBindings=Wd.hasSimpleAPICommandBindings;Nr.redrawText=function(e){return e=Xr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(Zt.getComponentMethod("annotations","draw")(e),Zt.getComponentMethod("legend","draw")(e),Zt.getComponentMethod("colorbar","draw")(e),r(Nr.previousPromises(e)))},300)})};Nr.resize=function(e){e=Xr.getGraphDiv(e);var r,t=new Promise(function(n,a){(!e||Xr.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Xr.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,Zt.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return r&&r(t),t};Nr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};Nr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=Xr.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:x9.defaultLine,"pointer-events":"all"}).each(function(){var u=b9.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=t.node(),a={y:r._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=r.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=r._paper.attr("width")-7),t.attr(a);var i=t.select(".js-link-to-tool"),o=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&PU(e,i),o.text(i.text()&&l.text()?" - ":"")}};function PU(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){Nr.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),a=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}Nr.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=b9.select(e).append("div").attr("id","hiddenform").style("display","none"),n=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),a=n.append("input").attr({type:"text",name:"data"});return a.node().value=Nr.graphJson(e,!1,"keepdata"),n.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var RU=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],zU=["year","month","dayMonth","dayMonthYear"];Nr.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],l=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},v;e._transitionData||Nr.createTransitionData(e),a._dfltTitle={plot:ic(e,"Click to enter Plot title"),subtitle:ic(e,"Click to enter Plot subtitle"),x:ic(e,"Click to enter X axis title"),y:ic(e,"Click to enter Y axis title"),colorbar:ic(e,"Click to enter Colorscale title"),annotation:ic(e,"new text")},a._traceWord=ic(e,"trace");var h=p9(e,RU);if(a._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,m=n.height;Nr.supplyLayoutGlobalDefaults(i,a,h),i.width||(a.width=d),i.height||(a.height=m),Nr.sanitizeMargins(a)}else{Nr.supplyLayoutGlobalDefaults(i,a,h);var g=!i.width||!i.height,y=a.autosize,x=f.autosizable,T=g&&(y||x);T?Nr.plotAutoSize(e,i,a):g&&Nr.sanitizeMargins(a),!y&&g&&(i.width=a.width,i.height=a.height)}a._d3locale=IU(h,a.separators),a._extraFormat=p9(e,zU),a._initialAutoSizeIsDone=!0,a._dataLength=s.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var _=a._subplots=FU(),b=a._splomAxes={x:{},y:{}},A=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=NU(o,s),Nr.supplyDataDefaults(s,l,i,a);var S=Object.keys(b.x),M=Object.keys(b.y);if(S.length>1&&M.length>1){for(Zt.getComponentMethod("grid","sizeDefaults")(i,a),v=0;v15&&M.length>15&&a.shapes.length===0&&a.images.length===0,Nr.linkSubplots(l,a,o,n),Nr.cleanPlot(l,a,o,n);var Y=!!(n._has&&n._has("cartesian")),O=!!(a._has&&a._has("cartesian")),X=Y,V=O;X&&!V?n._bgLayer.remove():V&&!X&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&LU({_fullLayout:n}),HU(l,a),d9(a,n),Zt.getComponentMethod("colorscale","crossTraceDefaults")(l,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var ee=a._tracePreGUI,te={},K;for(K in ee)te[K]="old";for(v=0;v0){var f=1-2*i;o=Math.round(f*o),l=Math.round(f*l)}}var v=Nr.layoutAttributes.width.min,h=Nr.layoutAttributes.height.min;o1,m=!t.height&&Math.abs(n.height-l)>1;(m||d)&&(d&&(n.width=o),m&&(n.height=l)),r._initialAutoSize||(r._initialAutoSize={width:o,height:l}),Nr.sanitizeMargins(n)};Nr.supplyLayoutModuleDefaults=function(e,r,t,n){var a=Zt.componentsRegistry,i=r._basePlotModules,o,l,s,u=Zt.subplotsRegistry.cartesian;for(o in a)s=a[o],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(Zt.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(Xr.subplotSort);for(l=0;l1&&(t.l/=y,t.r/=y)}if(h){var x=(t.t+t.b)/h;x>1&&(t.t/=x,t.b/=x)}var T=t.xl!==void 0?t.xl:t.x,_=t.xr!==void 0?t.xr:t.x,b=t.yt!==void 0?t.yt:t.y,A=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:T,size:t.l+g},r:{val:_,size:t.r+g},b:{val:A,size:t.b+g},t:{val:b,size:t.t+g}},m[r]=1}if(!n._replotting)return Nr.doAutoMargin(e)}};function OU(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=Pi.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}Nr.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,n=r.height;r._size||(r._size={}),w9(r);var a=r._size,i=r.margin,o={t:0,b:0,l:0,r:0},l=Xr.extendFlat({},a),s=i.l,u=i.r,f=i.t,v=i.b,h=r._pushmargin,d=r._pushmarginIds,m=r.minreducedwidth,g=r.minreducedheight;if(i.autoexpand!==!1){for(var y in h)d[y]||delete h[y];var x=e._fullLayout._reservedMargin;for(var T in x)for(var _ in x[T]){var b=x[T][_];o[_]=Math.max(o[_],b)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:v}};for(var A in o){var S=0;for(var M in h)M!=="base"&&g1(h[M][A].size)&&(S=h[M][A].size>S?h[M][A].size:S);var D=Math.max(0,i[A]-S);o[A]=Math.max(0,o[A]-D)}for(var z in h){var F=h[z].l||{},H=h[z].b||{},Y=F.val,O=F.size,X=H.val,V=H.size,ee=t-o.r-o.l,te=n-o.t-o.b;for(var K in h){if(g1(O)&&h[K].r){var re=h[K].r.val,fe=h[K].r.size;if(re>Y){var de=(O*re+(fe-ee)*Y)/(re-Y),qe=(fe*(1-Y)+(O-ee)*(1-re))/(re-Y);de+qe>s+u&&(s=de,u=qe)}}if(g1(V)&&h[K].t){var Be=h[K].t.val,Ne=h[K].t.size;if(Be>X){var Ie=(V*Be+(Ne-te)*X)/(Be-X),Se=(Ne*(1-X)+(V-te)*(1-Be))/(Be-X);Ie+Se>v+f&&(v=Ie,f=Se)}}}}}var Xe=Xr.constrain(t-i.l-i.r,M9,m),se=Xr.constrain(n-i.t-i.b,A9,g),be=Math.max(0,t-Xe),Te=Math.max(0,n-se);if(be){var pe=(s+u)/be;pe>1&&(s/=pe,u/=pe)}if(Te){var W=(v+f)/Te;W>1&&(v/=W,f/=W)}if(a.l=Math.round(s)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(f)+o.t,a.b=Math.round(v)+o.b,a.p=Math.round(i.pad),a.w=Math.round(t)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!r._replotting&&(Nr.didMarginChange(l,a)||OU(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};Nr.graphJson=function(e,r,t,n,a,i){(a&&r&&!e._fullData||a&&!r&&!e._fullLayout)&&Nr.supplyDefaults(e);var o=a?e._fullData:e.data,l=a?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Xr.isPlainObject(h)){var m={},g;return Object.keys(h).sort().forEach(function(_){if(["_","["].indexOf(_.charAt(0))===-1){if(typeof h[_]=="function"){d&&(m[_]="_function");return}if(t==="keepdata"){if(_.substr(_.length-3)==="src")return}else if(t==="keepstream"){if(g=h[_+"src"],typeof g=="string"&&g.indexOf(":")>0&&!Xr.isPlainObject(h.stream))return}else if(t!=="keepall"&&(g=h[_+"src"],typeof g=="string"&&g.indexOf(":")>0))return;m[_]=u(h[_],d)}}),m}var y=Array.isArray(h),x=Xr.isTypedArray(h);if((y||x)&&h.dtype&&h.shape){var T=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Xr.isArrayBuffer(T)?SU.encode(T):T},d)}return y?h.map(function(_){return u(_,d)}):x?Xr.simpleMap(h,Xr.identity):Xr.isJSDate(h)?Xr.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(l),a)){var v=l._size;f.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),n==="object"?f:JSON.stringify(f)};Nr.modifyFrames=function(e,r){var t,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return Zt.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function m(){return h++,function(){d++,!n&&d===h&&l(v)}}t.runFn(m),setTimeout(m())})}function l(v){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return Zt.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(v)}function s(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[Nr.previousPromises,s,t.prepareFn,Nr.rehover,Nr.reselect,o],f=Xr.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}Nr.doCalcdata=function(e,r){var t=Pi.list(e),n=e._fullData,a=e._fullLayout,i,o,l,s,u=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},l=0;l=0;s--)if(A[s].enabled){i._indexToPoints=A[s]._indexToPoints;break}o&&o.calc&&(b=o.calc(e,i))}(!Array.isArray(b)||!b[0])&&(b=[{x:h9,y:h9}]),b[0].t||(b[0].t={}),b[0].trace=i,u[T]=b}}for(m9(t,n,a),l=0;l{"use strict";oc.xmlns="http://www.w3.org/2000/xmlns/";oc.svg="http://www.w3.org/2000/svg";oc.xlink="http://www.w3.org/1999/xlink";oc.svgAttrs={xmlns:oc.svg,"xmlns:xlink":oc.xlink}});var Ka=ne((Jse,S9)=>{"use strict";S9.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 ci=ne(Mo=>{"use strict";var Qn=kt(),$s=pr(),VU=$s.strTranslate,g2=lc(),WU=Ka().LINE_SPACING,ZU=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Mo.convertToTspans=function(e,r,t){var n=e.text(),a=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&n.match(ZU),i=Qn.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function l(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var s=oY(e.node(),n);s&&e.style("pointer-events","all"),Mo.positionText(e),t&&t.call(e)}return a?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};$U(a[2],f,function(v,h,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var m=v&&v.select("svg");if(!m||!m.node()){l(),s();return}var g=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});g.node().appendChild(m.node()),h&&h.node()&&m.node().insertBefore(h.node().cloneNode(!0),m.node().firstChild);var y=d.width,x=d.height;m.attr({class:o,height:x,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var T=e.node().style.fill||"black",_=m.select("g");_.attr({fill:T,stroke:T});var b=_.node().getBoundingClientRect(),A=b.width,S=b.height;(A>y||S>x)&&(m.style("overflow","hidden"),b=m.node().getBoundingClientRect(),A=b.width,S=b.height);var M=+e.attr("x"),D=+e.attr("y"),z=u||e.node().getBoundingClientRect().height,F=-z/4;if(o[0]==="y")g.attr({transform:"rotate("+[-90,M,D]+")"+VU(-A/2,F-S/2)});else if(o[0]==="l")D=F-S/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)M=0,D=F;else{var H=e.attr("text-anchor");M=M-A*(H==="middle"?.5:H==="end"?1:0),D=D+F-S/2}m.attr({x:M,y:D}),t&&t.call(e,g),s(g)})})):l(),e};var XU=/(<|<|<)/g,jU=/(>|>|>)/g;function JU(e){return e.replace(XU,"\\lt ").replace(jU,"\\gt ")}var C9=[["$","$"],["\\(","\\)"]];function $U(e,r,t){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){$s.warn("No MathJax version:",MathJax.version);return}var a,i,o,l,s=function(){return i=$s.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:C9},displayAlign:"left"})},u=function(){i=$s.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=C9},f=function(){if(a=MathJax.Hub.config.menuSettings.renderer,a!=="SVG")return MathJax.Hub.setRenderer("SVG")},v=function(){a=MathJax.config.startup.output,a!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var T="math-output-"+$s.randstr({},64);l=Qn.select("body").append("div").attr({id:T}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(JU(e));var _=l.node();return n===2?MathJax.Hub.Typeset(_):MathJax.typeset([_])},d=function(){var T=l.select(n===2?".MathJax_SVG":".MathJax"),_=!T.empty()&&l.select("svg").node();if(!_)$s.log("There was an error in the tex syntax.",e),t();else{var b=_.getBoundingClientRect(),A;n===2?A=Qn.select("body").select("#MathJax_SVG_glyphs"):A=T.select("defs"),t(T,A,b)}l.remove()},m=function(){if(a!=="SVG")return MathJax.Hub.setRenderer(a)},g=function(){a!=="svg"&&(MathJax.config.startup.output=a)},y=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(i)},x=function(){MathJax.config=i};n===2?MathJax.Hub.Queue(s,f,h,d,m,y):n===3&&(u(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),g(),x()}))}var E9={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"},KU={sub:"0.3em",sup:"-0.6em"},QU={sub:"-0.21em",sup:"0.42em"},L9="\u200B",q9=["http:","https:","mailto:","",void 0,":"],P9=Mo.NEWLINES=/(\r\n?|\n)/g,y2=/(<[^<>]*>)/,b2=/<(\/?)([^ >]*)(\s+(.*))?>/i,eY=//i;Mo.BR_TAG_ALL=//gi;var R9=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,z9=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,N9=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,rY=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function sc(e,r){if(!e)return null;var t=e.match(r),n=t&&(t[3]||t[4]);return n&&Zd(n)}var tY=/(^|;)\s*color:/;Mo.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,n=r.allowedTags!==void 0?r.allowedTags:["br"],a="...",i=a.length,o=e.split(y2),l=[],s="",u=0,f=0;fi?l.push(v.substr(0,g-i)+a):l.push(v.substr(0,g));break}s=""}}return l.join("")};var nY={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},aY=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Zd(e){return e.replace(aY,function(r,t){var n;return t.charAt(0)==="#"?n=iY(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):n=nY[t],n||r})}Mo.convertEntities=Zd;function iY(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function oY(e,r){r=r.replace(P9," ");var t=!1,n=[],a,i=-1;function o(){i++;var S=document.createElementNS(g2.svg,"tspan");Qn.select(S).attr({class:"line",dy:i*WU+"em"}),e.appendChild(S),a=S;var M=n;if(n=[{node:S}],M.length>1)for(var D=1;D.",r);return}var M=n.pop();S!==M.type&&$s.log("Start tag <"+M.type+"> doesnt match end tag <"+S+">. Pretending it did match.",r),a=n[n.length-1].node}var f=eY.test(r);f?o():(a=e,n=[{node:e}]);for(var v=r.split(y2),h=0;h{"use strict";var lY=kt(),jd=Jl(),y1=Bt(),Xd=pr(),I9=zt(),sY=Jf().isValid;function uY(e,r,t){var n=r?Xd.nestedProperty(e,r).get()||{}:e,a=n[t||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(Xd.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];t[a]=[1-i[0],i[1]]}return t}function G9(e,r){r=r||{};for(var t=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var W9=By(),cY=W9.FORMAT_LINK,vY=W9.DATE_FORMAT_LINK;function hY(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?_2:Z9)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function _2(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+cY+"."].join(" ")}function Z9(e,r){return _2(e,r)+[" And for dates see: "+vY+".","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(" ")}X9.exports={axisHoverFormat:hY,descriptionOnlyNumbers:_2,descriptionWithDates:Z9}});var pl=ne((eue,c8)=>{"use strict";var j9=$a(),I0=cl(),f8=Kl().dash,M2=la().extendFlat,J9=_n().templatedArray,$9=x2().descriptionWithDates,dY=En().ONEDAY,rs=Pa(),pY=rs.HOUR_PATTERN,gY=rs.WEEKDAY_PATTERN,w2={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},mY=M2({},w2,{values:w2.values.slice().concat(["sync"])});function K9(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Q9={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},e8={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},r8={valType:"data_array",editType:"ticks"},t8={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function n8(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function a8(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var i8={valType:"color",dflt:I0.defaultLine,editType:"ticks"},o8={valType:"color",dflt:I0.lightLine,editType:"ticks"};function l8(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var s8=M2({},f8,{editType:"ticks"}),u8={valType:"boolean",editType:"ticks"};c8.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:I0.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:j9({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[rs.idRegex.x.toString(),rs.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:[rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"calc"},rangebreaks:J9("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:[gY,pY,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:dY},editType:"calc"}),tickmode:mY,nticks:K9(),tick0:Q9,dtick:e8,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:r8,ticktext:{valType:"data_array",editType:"ticks"},ticks:t8,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:n8(),tickwidth:a8(),tickcolor:i8,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:M2({},f8,{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:j9({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:$9("tick label")},tickformatstops:J9("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:$9("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:I0.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:u8,gridcolor:o8,gridwidth:l8(),griddash:s8,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:I0.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:I0.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},minor:{tickmode:w2,nticks:K9("minor"),tick0:Q9,dtick:e8,tickvals:r8,ticks:t8,ticklen:n8("minor"),tickwidth:a8("minor"),tickcolor:i8,gridcolor:o8,gridwidth:l8("minor"),griddash:s8,showgrid:u8,editType:"ticks"},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 Jd=ne((rue,d8)=>{"use strict";var Tn=pl(),v8=$a(),h8=la().extendFlat,yY=_o().overrideAll;d8.exports=yY({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:Tn.linecolor,outlinewidth:Tn.linewidth,bordercolor:Tn.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Tn.minor.tickmode,nticks:Tn.nticks,tick0:Tn.tick0,dtick:Tn.dtick,tickvals:Tn.tickvals,ticktext:Tn.ticktext,ticks:h8({},Tn.ticks,{dflt:""}),ticklabeloverflow:h8({},Tn.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:Tn.ticklen,tickwidth:Tn.tickwidth,tickcolor:Tn.tickcolor,ticklabelstep:Tn.ticklabelstep,showticklabels:Tn.showticklabels,labelalias:Tn.labelalias,tickfont:v8({}),tickangle:Tn.tickangle,tickformat:Tn.tickformat,tickformatstops:Tn.tickformatstops,tickprefix:Tn.tickprefix,showtickprefix:Tn.showtickprefix,ticksuffix:Tn.ticksuffix,showticksuffix:Tn.showticksuffix,separatethousands:Tn.separatethousands,exponentformat:Tn.exponentformat,minexponent:Tn.minexponent,showexponent:Tn.showexponent,title:{text:{valType:"string"},font:v8({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var H0=ne((nue,g8)=>{"use strict";var bY=Jd(),_Y=x0().counter,xY=Sd(),p8=Jf().scales,tue=xY(p8);function $d(e){return"`"+e+"`"}g8.exports=function(r,t){r=r||"",t=t||{};var n=t.cLetter||"c",a="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",o="showScaleDflt"in t?t.showScaleDflt:n==="z",l=typeof t.colorscaleDflt=="string"?p8[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,v;"colorAttr"in t?(f=t.colorAttr,v=t.colorAttr):(f={z:"z",c:"color"}[n],v="in "+$d(u+f));var h=a?" Has an effect only if "+v+" is set to a numerical array.":"",d=n+"auto",m=n+"min",g=n+"max",y=n+"mid",x=$d(u+d),T=$d(u+m),_=$d(u+g),b=T+" and "+_,A={};A[m]=A[g]=void 0;var S={};S[d]=!1;var M={};return f==="color"&&(M.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(M.color.anim=!0)),M[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:A},M[m]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},M[g]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},M[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:A},M.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},M.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},M.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(M.showscale={valType:"boolean",dflt:o,editType:"calc"},M.colorbar=bY),t.noColorAxis||(M.coloraxis={valType:"subplotid",regex:_Y("coloraxis"),dflt:null,editType:"calc"}),M}});var T2=ne((aue,m8)=>{"use strict";var wY=la().extendFlat,MY=H0(),A2=Jf().scales;m8.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:A2.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:A2.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:A2.RdBu,editType:"calc"}},coloraxis:wY({_isSubplotObj:!0,editType:"calc"},MY("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var k2=ne((iue,y8)=>{"use strict";var AY=pr();y8.exports=function(r){return AY.isPlainObject(r.colorbar)}});var L2=ne(C2=>{"use strict";var S2=Bt(),b8=pr(),_8=En(),TY=_8.ONEDAY,kY=_8.ONEWEEK;C2.dtick=function(e,r){var t=r==="log",n=r==="date",a=r==="category",i=n?TY:1;if(!e)return i;if(S2(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||t))return i;var o=e.charAt(0),l=e.substr(1);return l=S2(l)?Number(l):0,l<=0||!(n&&o==="M"&&l===Math.round(l)||t&&o==="L"||t&&o==="D"&&(l===1||l===2))?i:e};C2.tick0=function(e,r,t,n){if(r==="date")return b8.cleanDate(e,b8.dateTick0(t,n%kY===0?1:0));if(!(n==="D1"||n==="D2"))return S2(e)?Number(e):0}});var q2=ne((lue,w8)=>{"use strict";var x8=L2(),SY=pr().isArrayOrTypedArray,CY=Ji().isTypedArraySpec,LY=Ji().decodeTypedArraySpec;w8.exports=function(r,t,n,a,i){i||(i={});var o=i.isMinor,l=o?r.minor||{}:r,s=o?t.minor:t,u=o?"minor.":"";function f(T){var _=l[T];return CY(_)&&(_=LY(_)),_!==void 0?_:(s._template||{})[T]}var v=f("tick0"),h=f("dtick"),d=f("tickvals"),m=SY(d)?"array":h?"linear":"auto",g=n(u+"tickmode",m);if(g==="auto"||g==="sync")n(u+"nticks");else if(g==="linear"){var y=s.dtick=x8.dtick(h,a);s.tick0=x8.tick0(v,a,t.calendar,y)}else if(a!=="multicategory"){var x=n(u+"tickvals");x===void 0?s.tickmode="auto":o||n("ticktext")}}});var E2=ne((sue,A8)=>{"use strict";var D2=pr(),M8=pl();A8.exports=function(r,t,n,a){var i=a.isMinor,o=i?r.minor||{}:r,l=i?t.minor:t,s=i?M8.minor:M8,u=i?"minor.":"",f=D2.coerce2(o,l,s,"ticklen",i?(t.ticklen||5)*.6:void 0),v=D2.coerce2(o,l,s,"tickwidth",i?t.tickwidth||1:void 0),h=D2.coerce2(o,l,s,"tickcolor",(i?t.tickcolor:void 0)||l.color),d=n(u+"ticks",!i&&a.outerTicks||f||v||h?"outside":"");d||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var P2=ne((uue,T8)=>{"use strict";T8.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],n=t.filter(function(i){return r[i]!==void 0}),a=function(i){return r[i]===r[n[0]]};if(n.every(a)||n.length===1)return r[n[0]]}});var gl=ne((fue,k8)=>{"use strict";var Kd=pr(),qY=_n();k8.exports=function(r,t,n){var a=n.name,i=n.inclusionAttr||"visible",o=t[a],l=Kd.isArrayOrTypedArray(r[a])?r[a]:[],s=t[a]=[],u=qY.arrayTemplater(t,a,i),f,v;for(f=0;f{"use strict";var R2=pr(),DY=zt().contrast,S8=pl(),EY=P2(),PY=gl();C8.exports=function(r,t,n,a,i){i||(i={});var o=n("labelalias");R2.isPlainObject(o)||delete t.labelalias;var l=EY(r),s=n("showticklabels");if(s){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},f=t.color,v=t.ticklabelposition||"",h=v.indexOf("inside")!==-1?DY(i.bgColor):f&&f!==S8.color.dflt?f:u.color;if(R2.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var d=n("tickangle");!i.noAutotickangles&&d==="auto"&&n("autotickangles")}if(a!=="category"){var m=n("tickformat");PY(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:RY}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!m&&a!=="date"&&(n("showexponent",l),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function RY(e,r){function t(a,i){return R2.coerce(e,r,S8.tickformatstops,a,i)}var n=t("enabled");n&&(t("dtickrange"),t("value"))}});var N2=ne((vue,L8)=>{"use strict";var zY=P2();L8.exports=function(r,t,n,a,i){i||(i={});var o=i.tickSuffixDflt,l=zY(r),s=n("tickprefix");s&&n("showtickprefix",l);var u=n("ticksuffix",o);u&&n("showticksuffix",l)}});var F2=ne((hue,q8)=>{"use strict";var Gu=pr(),NY=_n(),FY=q2(),IY=E2(),HY=z2(),BY=N2(),OY=Jd();q8.exports=function(r,t,n){var a=NY.newContainer(t,"colorbar"),i=r.colorbar||{};function o(H,Y){return Gu.coerce(i,a,OY,H,Y)}var l=n.margin||{t:0,b:0,l:0,r:0},s=n.width-l.l-l.r,u=n.height-l.t-l.b,f=o("orientation"),v=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(v?s:u):30);var d=o("lenmode");o("len",d==="fraction"?1:v?u:s);var m=o("yref"),g=o("xref"),y=m==="paper",x=g==="paper",T,_,b,A="left";v?(b="middle",A=x?"left":"right",T=x?1.02:1,_=.5):(b=y?"bottom":"top",A="center",T=.5,_=y?1.02:1),Gu.coerce(i,a,{x:{valType:"number",min:x?-2:0,max:x?3:1,dflt:T}},"x"),Gu.coerce(i,a,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:_}},"y"),o("xanchor",A),o("xpad"),o("yanchor",b),o("ypad"),Gu.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var S=Gu.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",S.indexOf("inside")!==-1?"hide past domain":"hide past div"),FY(i,a,o,"linear");var M=n.font,D={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};S.indexOf("inside")!==-1&&(D.bgColor="black"),BY(i,a,o,"linear",D),HY(i,a,o,"linear",D),IY(i,a,o,"linear",D),o("title.text",n._dfltTitle.colorbar);var z=a.showticklabels?a.tickfont:M,F=Gu.extendFlat({},M,{family:z.family,size:Gu.bigFont(z.size)});Gu.coerceFont(o,"title.font",F),o("title.side",v?"top":"right")}});var B0=ne((due,P8)=>{"use strict";var D8=Bt(),H2=pr(),UY=k2(),YY=F2(),E8=Jf().isValid,GY=dt().traceIs;function I2(e,r){var t=r.slice(0,r.length-1);return r?H2.nestedProperty(e,t).get()||{}:e}P8.exports=function e(r,t,n,a,i){var o=i.prefix,l=i.cLetter,s="_module"in t,u=I2(r,o),f=I2(t,o),v=I2(t._template||{},o)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,n,a,i)};if(s){var d=n._colorAxes||{},m=a(o+"coloraxis");if(m){var g=GY(t,"contour")&&H2.nestedProperty(t,"contours.coloring").get()||"heatmap",y=d[m];y?(y[2].push(h),y[0]!==g&&(y[0]=!1,H2.warn(["Ignoring coloraxis:",m,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[m]=[g,t,[h]];return}}var x=u[l+"min"],T=u[l+"max"],_=D8(x)&&D8(T)&&x{"use strict";var R8=pr(),VY=_n(),z8=T2(),WY=B0();N8.exports=function(r,t){function n(v,h){return R8.coerce(r,t,z8,v,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=t._colorAxes,i,o;function l(v,h){return R8.coerce(i,o,z8.coloraxis,v,h)}for(var s in a){var u=a[s];if(u[0])i=r[s]||{},o=VY.newContainer(t,s,"coloraxis"),o._name=s,WY(i,o,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var ZY=pr(),XY=es().hasColorscale,jY=es().extractOpts;I8.exports=function(r,t){function n(f,v){var h=f["_"+v];h!==void 0&&(f[v]=h)}function a(f,v){var h=v.container?ZY.nestedProperty(f,v.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=jY(h),m=d.auto;(m||d.min===void 0)&&n(h,v.min),(m||d.max===void 0)&&n(h,v.max),d.autocolorscale&&n(h,"colorscale")}}for(var i=0;i{"use strict";var B8=Bt(),B2=pr(),JY=es().extractOpts;O8.exports=function(r,t,n){var a=r._fullLayout,i=n.vals,o=n.containerStr,l=o?B2.nestedProperty(t,o).get():t,s=JY(l),u=s.auto!==!1,f=s.min,v=s.max,h=s.mid,d=function(){return B2.aggNums(Math.min,null,i)},m=function(){return B2.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(l._colorAx&&B8(f)?f=Math.min(f,d()):f=d()),v===void 0?v=m():u&&(l._colorAx&&B8(v)?v=Math.max(v,m()):v=m()),u&&h!==void 0&&(v-h>h-f?f=h-(v-h):v-h=0?g=a.colorscale.sequential:g=a.colorscale.sequentialminus,s._sync("colorscale",g)}}});var rp=ne((yue,U8)=>{"use strict";var ep=Jf(),O0=es();U8.exports={moduleType:"component",name:"colorscale",attributes:H0(),layoutAttributes:T2(),supplyLayoutDefaults:F8(),handleDefaults:B0(),crossTraceDefaults:H8(),calc:Qd(),scales:ep.scales,defaultScale:ep.defaultScale,getScale:ep.get,isValidScale:ep.isValid,hasColorscale:O0.hasColorscale,extractOpts:O0.extractOpts,extractScale:O0.extractScale,flipScale:O0.flipScale,makeColorScaleFunc:O0.makeColorScaleFunc,makeColorScaleFuncFromTrace:O0.makeColorScaleFuncFromTrace}});var Qa=ne((bue,G8)=>{"use strict";var Y8=pr(),$Y=Ji().isTypedArraySpec;G8.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 r=e.marker;return Y8.isPlainObject(r)&&(Y8.isArrayOrTypedArray(r.size)||$Y(r.size))}}});var W8=ne((_ue,V8)=>{"use strict";var KY=Bt();V8.exports=function(r,t){t||(t=2);var n=r.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(l){return Math.sqrt(l/a)}:function(l){return l/a};return function(l){var s=o(l/t);return KY(s)&&s>0?Math.max(s,i):0}}});var Vu=ne(Ba=>{"use strict";var Z8=pr();Ba.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Ba.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&t.index{J8.exports=nG;var O2={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},tG=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function nG(e){var r=[];return e.replace(tG,function(t,n,a){var i=n.toLowerCase();for(a=iG(a),i=="m"&&a.length>2&&(r.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==O2[i])return a.unshift(n),r.push(a);if(a.length{"use strict";var oG=U2(),Sr=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},gt="M0,0Z",$8=Math.sqrt(2),Wu=Math.sqrt(3),Y2=Math.PI,G2=Math.cos,V2=Math.sin;tM.exports={circle:{n:0,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return t?yt(r,t,a):a}},square:{n:1,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.3,2);return yt(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.4,2),a=Sr(e*1.2,2);return yt(r,t,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.8/$8,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,l="l-"+n+","+n;return yt(r,t,"M0,"+n+a+i+o+i+o+l+o+l+a+l+a+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2/Wu,2),a=Sr(e/2,2),i=Sr(e,2);return yt(r,t,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.6,2),a=Sr(e*1.2,2);return yt(r,t,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.951,2),a=Sr(e*.588,2),i=Sr(-e,2),o=Sr(e*-.309,2),l=Sr(e*.809,2);return yt(r,t,"M"+n+","+o+"L"+a+","+l+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e/2,2),i=Sr(e*Wu/2,2);return yt(r,t,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e/2,2),i=Sr(e*Wu/2,2);return yt(r,t,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.924,2),a=Sr(e*.383,2);return yt(r,t,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,r,t){if(mt(r))return gt;var n=e*1.4,a=Sr(n*.225,2),i=Sr(n*.951,2),o=Sr(n*.363,2),l=Sr(n*.588,2),s=Sr(-n,2),u=Sr(n*-.309,2),f=Sr(n*.118,2),v=Sr(n*.809,2),h=Sr(n*.382,2);return yt(r,t,"M"+a+","+u+"H"+i+"L"+o+","+f+"L"+l+","+v+"L0,"+h+"L-"+l+","+v+"L-"+o+","+f+"L-"+i+","+u+"H-"+a+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.66,2),a=Sr(e*.38,2),i=Sr(e*.76,2);return yt(r,t,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*Wu*.8,2),a=Sr(e*.8,2),i=Sr(e*1.6,2),o=Sr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return yt(r,t,"M-"+n+","+a+l+n+","+a+l+"0,-"+i+l+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*Wu*.8,2),a=Sr(e*.8,2),i=Sr(e*1.6,2),o=Sr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return yt(r,t,"M"+n+",-"+a+l+"-"+n+",-"+a+l+"0,"+i+l+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.1,2),a=Sr(e*2,2),i="A "+a+","+a+" 0 0 1 ";return yt(r,t,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2),a=Sr(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return yt(r,t,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*.7,2),a=Sr(e*1.4,2);return yt(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2),a=Sr(e*.7,2);return yt(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e/$8,2);return yt(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"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,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e*1.3,2);return yt(r,t,"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,r,t){if(mt(r))return gt;var n=Sr(e*1.3,2),a=Sr(e*.65,2);return yt(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2);return yt(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*.85,2);return yt(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e/2,2),a=Sr(e,2);return yt(r,t,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.2,2),a=Sr(e*1.6,2),i=Sr(e*.8,2);return yt(r,t,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2);return yt(r,t,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*1.4,2);return yt(r,t,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2);return yt(r,t,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e,2),a=Sr(e*2,2);return yt(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(mt(r))return gt;var n=Sr(e*2,2),a=Sr(e,2);return yt(r,t,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(mt(r))return gt;var n=Y2/2.5,a=2*e*G2(n),i=2*e*V2(n);return yt(r,t,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(mt(r))return gt;var n=Y2/4,a=2*e*G2(n),i=2*e*V2(n);return yt(r,t,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function mt(e){return e===null}var K8,Q8,eM,rM;function yt(e,r,t){if((!e||e%360===0)&&!r)return t;if(eM===e&&rM===r&&K8===t)return Q8;eM=e,rM=r,K8=t;function n(y,x){var T=G2(y),_=V2(y),b=x[0],A=x[1]+(r||0);return[b*T-A*_,b*_+A*T]}for(var a=e/180*Y2,i=0,o=0,l=oG(t),s="",u=0;u{"use strict";var ba=kt(),fn=pr(),lG=fn.numberFormat,vc=Bt(),$2=Jl(),np=dt(),Ra=zt(),sG=rp(),_1=fn.strTranslate,ap=ci(),uG=lc(),fG=Ka(),cG=fG.LINE_SPACING,hM=vd().DESELECTDIM,vG=Qa(),hG=W8(),dG=Vu().appendArrayPointValue,Er=MM.exports={};Er.font=function(e,r){var t=r.variant,n=r.style,a=r.weight,i=r.color,o=r.size,l=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(Ra.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),t&&e.style("font-variant",t),f&&e.style("text-transform",W2(gG(f))),s&&e.style("text-shadow",s==="auto"?ap.makeTextShadow(Ra.contrast(i)):W2(s)),u&&e.style("text-decoration-line",W2(mG(u)))};function W2(e){return e==="none"?void 0:e}var pG={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function gG(e){return pG[e]}function mG(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Er.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Er.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Er.setRect=function(e,r,t,n,a){e.call(Er.setPosition,r,t).call(Er.setSize,n,a)};Er.translatePoint=function(e,r,t,n){var a=t.c2p(e.x),i=n.c2p(e.y);if(vc(a)&&vc(i)&&r.node())r.node().nodeName==="text"?r.attr("x",a).attr("y",i):r.attr("transform",_1(a,i));else return!1;return!0};Er.translatePoints=function(e,r,t){e.each(function(n){var a=ba.select(this);Er.translatePoint(n,a,r,t)})};Er.hideOutsideRangePoint=function(e,r,t,n,a,i){r.attr("display",t.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};Er.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,n=r.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,l=i.ycalendar,s=np.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Er.hideOutsideRangePoint(u,ba.select(this),t,n,o,l)})})}};Er.crispRound=function(e,r,t){return!r||!vc(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Er.singleLineStyle=function(e,r,t,n,a){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";Ra.stroke(r,n||i.color),Er.dashLine(r,l,o)};Er.lineGroupStyle=function(e,r,t,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=n||i.dash||"";ba.select(this).call(Ra.stroke,t||i.color).call(Er.dashLine,l,o)})};Er.dashLine=function(e,r,t){t=+t||0,r=Er.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Er.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function dM(e,r,t,n){var a=r.fillpattern,i=r.fillgradient,o=a&&Er.getPatternAttr(a.shape,0,"");if(o){var l=Er.getPatternAttr(a.bgcolor,0,null),s=Er.getPatternAttr(a.fgcolor,0,null),u=a.fgopacity,f=Er.getPatternAttr(a.size,0,8),v=Er.getPatternAttr(a.solidity,0,.3),h=r.uid;Er.pattern(e,"point",t,h,o,f,v,void 0,a.fillmode,l,s,u)}else if(i&&i.type!=="none"){var d=i.type,m="scatterfill-"+r.uid;if(n&&(m="legendfill-"+r.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var g,y;d==="horizontal"?(g={x:i.start,y:0},y={x:i.stop,y:0}):d==="vertical"&&(g={x:0,y:i.start},y={x:0,y:i.stop}),g.x=r._xA.c2p(g.x===void 0?r._extremes.x.min[0].val:g.x,!0),g.y=r._yA.c2p(g.y===void 0?r._extremes.y.min[0].val:g.y,!0),y.x=r._xA.c2p(y.x===void 0?r._extremes.x.max[0].val:y.x,!0),y.y=r._yA.c2p(y.y===void 0?r._extremes.y.max[0].val:y.y,!0),e.call(mM,t,m,"linear",i.colorscale,"fill",g,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Er.gradient,t,m,d,i.colorscale,"fill")}else r.fillcolor&&e.call(Ra.fill,r.fillcolor)}Er.singleFillStyle=function(e,r){var t=ba.select(e.node()),n=t.data(),a=((n[0]||[])[0]||{}).trace||{};dM(e,a,r,!1)};Er.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(n){var a=ba.select(this);n[0].trace&&dM(a,n[0].trace,r,t)})};var aM=nM();Er.symbolNames=[];Er.symbolFuncs=[];Er.symbolBackOffs=[];Er.symbolNeedLines={};Er.symbolNoDot={};Er.symbolNoFill={};Er.symbolList=[];Object.keys(aM).forEach(function(e){var r=aM[e],t=r.n;Er.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Er.symbolNames[t]=e,Er.symbolFuncs[t]=r.f,Er.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Er.symbolNeedLines[t]=!0),r.noDot?Er.symbolNoDot[t]=!0:Er.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Er.symbolNoFill[t]=!0)});var yG=Er.symbolNames.length,bG="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Er.symbolNumber=function(e){if(vc(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Er.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=yG||e>=400?0:Math.floor(Math.max(e,0))};function pM(e,r,t,n){var a=e%100;return Er.symbolFuncs[a](r,t,n)+(e>=200?bG:"")}var iM=lG("~f"),gM={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}};Er.gradient=function(e,r,t,n,a,i){var o=gM[n];return mM(e,r,t,o.type,a,i,o.start,o.stop,!1,o.reversed)};function mM(e,r,t,n,a,i,o,l,s,u){var f=a.length,v;n==="linear"?v={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(v={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var s;e.ms==="various"||o.size==="various"?s=3:s=n.ms2mrc(e.ms),e.mrc=s,n.selectedSizeFn&&(s=e.mrc=n.selectedSizeFn(e));var u=Er.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var f=e3(e,t),v=Q2(e,t);r.attr("d",pM(u,s,f,v))}var h=!1,d,m,g;if(e.so)g=l.outlierwidth,m=l.outliercolor,d=o.outliercolor;else{var y=(l||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?m=e.mlcc=n.lineScale(e.mlc):fn.isArrayOrTypedArray(l.color)?m=Ra.defaultLine:m=l.color,fn.isArrayOrTypedArray(o.color)&&(d=Ra.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)r.call(Ra.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:g)+"px");var x=o.gradient,T=e.mgt;T?h=!0:T=x&&x.type,fn.isArrayOrTypedArray(T)&&(T=T[0],gM[T]||(T=0));var _=o.pattern,b=_&&Er.getPatternAttr(_.shape,e.i,"");if(T&&T!=="none"){var A=e.mgc;A?h=!0:A=x.color;var S=t.uid;h&&(S+="-"+e.i),Er.gradient(r,a,S,T,[[0,A],[1,d]],"fill")}else if(b){var M=!1,D=_.fgcolor;!D&&i&&i.color&&(D=i.color,M=!0);var z=Er.getPatternAttr(D,e.i,i&&i.color||null),F=Er.getPatternAttr(_.bgcolor,e.i,null),H=_.fgopacity,Y=Er.getPatternAttr(_.size,e.i,8),O=Er.getPatternAttr(_.solidity,e.i,.3);M=M||e.mcc||fn.isArrayOrTypedArray(_.shape)||fn.isArrayOrTypedArray(_.bgcolor)||fn.isArrayOrTypedArray(_.fgcolor)||fn.isArrayOrTypedArray(_.size)||fn.isArrayOrTypedArray(_.solidity);var X=t.uid;M&&(X+="-"+e.i),Er.pattern(r,"point",a,X,b,Y,O,e.mcc,_.fillmode,F,z,H)}else fn.isArrayOrTypedArray(d)?Ra.fill(r,d[e.i]):Ra.fill(r,d);g&&Ra.stroke(r,m)}};Er.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Er.tryColorscale(t,""),r.lineScale=Er.tryColorscale(t,"line"),np.traceIs(e,"symbols")&&(r.ms2mrc=vG.isBubble(e)?hG(e):function(){return(t.size||6)/2}),e.selectedpoints&&fn.extendFlat(r,Er.makeSelectedPointStyleFns(e)),r};Er.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.marker||{},i=t.marker||{},o=n.marker||{},l=a.opacity,s=i.opacity,u=o.opacity,f=s!==void 0,v=u!==void 0;(fn.isArrayOrTypedArray(l)||f||v)&&(r.selectedOpacityFn=function(b){var A=b.mo===void 0?a.opacity:b.mo;return b.selected?f?s:A:v?u:hM*A});var h=a.color,d=i.color,m=o.color;(d||m)&&(r.selectedColorFn=function(b){var A=b.mcc||h;return b.selected?d||A:m||A});var g=a.size,y=i.size,x=o.size,T=y!==void 0,_=x!==void 0;return np.traceIs(e,"symbols")&&(T||_)&&(r.selectedSizeFn=function(b){var A=b.mrc||g/2;return b.selected?T?y/2:A:_?x/2:A}),r};Er.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=t.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return r.selectedTextColorFn=function(f){var v=f.tc||l;return f.selected?s||v:u||(s?v:Ra.addOpacity(v,hM))},r};Er.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Er.makeSelectedPointStyleFns(r),n=r.marker||{},a=[];t.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",t.selectedOpacityFn(o))}),t.selectedColorFn&&a.push(function(i,o){Ra.fill(i,t.selectedColorFn(o))}),t.selectedSizeFn&&a.push(function(i,o){var l=o.mx||n.symbol||0,s=t.selectedSizeFn(o);i.attr("d",pM(Er.symbolNumber(l),s,e3(o,r),Q2(o,r))),o.mrc2=s}),a.length&&e.each(function(i){for(var o=ba.select(this),l=0;l0?t:0}Er.textPointStyle=function(e,r,t){if(e.size()){var n;if(r.selectedpoints){var a=Er.makeSelectedTextStyleFns(r);n=a.selectedTextColorFn}var i=r.texttemplate,o=t._fullLayout;e.each(function(l){var s=ba.select(this),u=i?fn.extractOption(l,r,"txt","texttemplate"):fn.extractOption(l,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,v=f?f(l,r,o):{},h={};dG(h,r,l.i);var d=r._meta||{};u=fn.texttemplateString(u,v,o._d3locale,h,l,d)}var m=l.tp||r.textposition,g=bM(l,r),y=n?n(l):l.tc||r.textfont.color;s.call(Er.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:g,color:y}).text(u).call(ap.convertToTspans,t).call(yM,m,g,l.mrc)})}};Er.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Er.makeSelectedTextStyleFns(r);e.each(function(n){var a=ba.select(this),i=t.selectedTextColorFn(n),o=n.tp||r.textposition,l=bM(n,r);Ra.fill(a,i);var s=np.traceIs(r,"bar-like");yM(a,o,l,n.mrc2||n.mrc,s)})}};var oM=.5;Er.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],n=[],a;for(a=1;a=s||b>=f&&b<=s)&&(A<=v&&A>=u||A>=v&&A<=u)&&(e=[b,A])}return e}Er.applyBackoff=wM;Er.makeTester=function(){var e=fn.ensureSingleById(ba.select("body"),"svg","js-plotly-tester",function(t){t.attr(uG.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=fn.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Er.tester=e,Er.testref=r};Er.savedBBoxes={};var X2=0,wG=1e4;Er.bBox=function(e,r,t){t||(t=lM(e));var n;if(t){if(n=Er.savedBBoxes[t],n)return fn.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(t=lM(a),t){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,l=a.getAttribute("transform");if(!l){var s=Er.bBox(a,!1,t);return i&&(s.left+=i,s.right+=i),o&&(s.top+=o,s.bottom+=o),s}if(t+="~"+i+"~"+o+"~"+l,n=Er.savedBBoxes[t],n)return fn.extendFlat({},n)}}var u,f;r?u=e:(f=Er.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),ba.select(u).attr("transform",null).call(ap.positionText,0,0);var v=u.getBoundingClientRect(),h=Er.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:v.height,width:v.width,left:v.left-h.left,top:v.top-h.top,right:v.right-h.left,bottom:v.bottom-h.top};return X2>=wG&&(Er.savedBBoxes={},X2=0),t&&(Er.savedBBoxes[t]=d),X2++,fn.extendFlat({},d)};function lM(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Er.setClipUrl=function(e,r,t){e.attr("clip-path",K2(r,t))};function K2(e,r){if(!e)return null;var t=r._context,n=t._exportedPlot?"":t._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Er.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};Er.setTranslate=function(e,r,t){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return r=r||0,t=t||0,o=o.replace(n,"").trim(),o+=_1(r,t),o=o.trim(),e[i]("transform",o),o};Er.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};Er.setScale=function(e,r,t){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return r=r||1,t=t||1,o=o.replace(n,"").trim(),o+="scale("+r+","+t+")",o=o.trim(),e[i]("transform",o),o};var MG=/\s*sc.*/;Er.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var n=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(MG,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var AG=/translate\([^)]*\)\s*$/;Er.setTextPointsScale=function(e,r,t){e&&e.each(function(){var n,a=ba.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(AG);r===1&&t===1?n=[]:n=[_1(o,l),"scale("+r+","+t+")",_1(-o,-l)],s&&n.push(s),a.attr("transform",n.join(""))}})};function Q2(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Er.getMarkerStandoff=Q2;var b1=Math.atan2,uc=Math.cos,Y0=Math.sin;function sM(e,r){var t=r[0],n=r[1];return[t*uc(e)-n*Y0(e),t*Y0(e)+n*uc(e)]}var uM,fM,cM,vM,j2,J2;function e3(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||fn.isArrayOrTypedArray(t))&&(t=0));var n,a,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var o=r._geo.project(e.lonlat);n=o[0],a=o[1]}else{var l=r._xA,s=r._yA;if(l&&s)n=l.c2p(e.x),a=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],v=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=b1(h[1]-a,h[0]-n),m=b1(v[1]-a,v[0]-n),g;if(i==="north")g=t/180*Math.PI;else if(i==="previous"){var y=u/180*Math.PI,x=f/180*Math.PI,T=uM/180*Math.PI,_=fM/180*Math.PI,b=T-y,A=uc(_)*Y0(b),S=Y0(_)*uc(x)-uc(_)*Y0(x)*uc(b);g=-b1(A,S)-Math.PI,uM=u,fM=f}var M=sM(d,[uc(g),0]),D=sM(m,[Y0(g),0]);t=b1(M[1]+D[1],M[0]+D[0])/Math.PI*180,i==="previous"&&!(J2===r.uid&&e.i===j2+1)&&(t=null)}if(i==="previous"&&!r._geo)if(J2===r.uid&&e.i===j2+1&&vc(n)&&vc(a)){var z=n-cM,F=a-vM,H=r.line&&r.line.shape||"",Y=H.slice(H.length-1);Y==="h"&&(F=0),Y==="v"&&(z=0),t+=b1(F,z)/Math.PI*180+90}else t=null}return cM=n,vM=a,j2=e.i,J2=r.uid,t}Er.getMarkerAngle=e3});var x1=ne((Tue,SM)=>{"use strict";var G0=kt(),TG=Bt(),kG=ua(),r3=dt(),hc=pr(),AM=hc.strTranslate,ip=ln(),op=zt(),V0=ci(),TM=vd(),SG=Ka().OPPOSITE_SIDE,kM=/ [XY][0-9]* /,t3=1.6,n3=1.6;function CG(e,r,t){var n=e._fullLayout,a=t.propContainer,i=t.propName,o=t.placeholder,l=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,v=t.containerGroup,h=1,d=a.title,m=(d&&d.text?d.text:"").trim(),g=!1,y=d&&d.font?d.font:{},x=y.family,T=y.size,_=y.color,b=y.weight,A=y.style,S=y.variant,M=y.textcase,D=y.lineposition,z=y.shadow,F=t.subtitlePropName,H=!!F,Y=t.subtitlePlaceholder,O=(a.title||{}).subtitle||{text:"",font:{}},X=O.text.trim(),V=!1,ee=1,te=O.font,K=te.family,re=te.size,fe=te.color,de=te.weight,qe=te.style,Be=te.variant,Ne=te.textcase,Ie=te.lineposition,Se=te.shadow,Xe;i==="title.text"?Xe="titleText":i.indexOf("axis")!==-1?Xe="axisTitleText":i.indexOf("colorbar"!==-1)&&(Xe="colorbarTitleText");var se=e._context.edits[Xe];function be(lr,ir){return lr===void 0||ir===void 0?!1:lr.replace(kM," % ")===ir.replace(kM," % ")}m===""?h=0:be(m,o)&&(se||(m=""),h=.2,g=!0),H&&(X===""?ee=0:be(X,Y)&&(se||(X=""),ee=.2,V=!0)),t._meta?m=hc.templateString(m,t._meta):n._meta&&(m=hc.templateString(m,n._meta));var Te=m||X||se,pe;v||(v=hc.ensureSingle(n._infolayer,"g","g-"+r),pe=n._hColorbarMoveTitle);var W=v.selectAll("text."+r).data(Te?[0]:[]);W.enter().append("text"),W.text(m).attr("class",r),W.exit().remove();var Q=null,$=r+"-subtitle",Me=X||se;if(H&&Me&&(Q=v.selectAll("text."+$).data(Me?[0]:[]),Q.enter().append("text"),Q.text(X).attr("class",$),Q.exit().remove()),!Te)return v;function Fe(lr,ir){hc.syncOrAsync([Oe,fr],{title:lr,subtitle:ir})}function Oe(lr){var ir=lr.title,rr=lr.subtitle,Cr;!f&&pe&&(f={}),f?(Cr="",f.rotate&&(Cr+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||pe)&&(Cr+=AM(0,(f.offset||0)-(pe||0)))):Cr=null,ir.attr("transform",Cr);function yr(er){if(er){var Ke=G0.select(er.node().parentNode).select("."+$);if(!Ke.empty()){var mr=er.node().getBBox();if(mr.height){var Mr=mr.y+mr.height+t3*re;Ke.attr("y",Mr)}}}}if(ir.style("opacity",h*op.opacity(_)).call(ip.font,{color:op.rgb(_),size:G0.round(T,2),family:x,weight:b,style:A,variant:S,textcase:M,shadow:z,lineposition:D}).attr(u).call(V0.convertToTspans,e,yr),rr){var Ae=v.select("."+r+"-math-group"),Ve=ir.node().getBBox(),je=Ae.node()?Ae.node().getBBox():void 0,zr=je?je.y+je.height+t3*re:Ve.y+Ve.height+n3*re,kr=hc.extendFlat({},u,{y:zr});rr.attr("transform",Cr),rr.style("opacity",ee*op.opacity(fe)).call(ip.font,{color:op.rgb(fe),size:G0.round(re,2),family:K,weight:de,style:qe,variant:Be,textcase:Ne,shadow:Se,lineposition:Ie}).attr(kr).call(V0.convertToTspans,e)}return kG.previousPromises(e)}function fr(lr){var ir=lr.title,rr=G0.select(ir.node().parentNode);if(s&&s.selection&&s.side&&m){rr.attr("transform",null);var Cr=SG[s.side],yr=s.side==="left"||s.side==="top"?-1:1,Ae=TG(s.pad)?s.pad:2,Ve=ip.bBox(rr.node()),je={t:0,b:0,l:0,r:0},zr=e._fullLayout._reservedMargin;for(var kr in zr)for(var er in zr[kr]){var Ke=zr[kr][er];je[er]=Math.max(je[er],Ke)}var mr={left:je.l,top:je.t,right:n.width-je.r,bottom:n.height-je.b},Mr=s.maxShift||yr*(mr[s.side]-Ve[s.side]),gr=0;if(Mr<0)gr=Mr;else{var dr=s.offsetLeft||0,Tr=s.offsetTop||0;Ve.left-=dr,Ve.right-=dr,Ve.top-=Tr,Ve.bottom-=Tr,s.selection.each(function(){var Ur=ip.bBox(this);hc.bBoxIntersect(Ve,Ur,Ae)&&(gr=Math.max(gr,yr*(Ur[s.side]-Ve[Cr])+Ae))}),gr=Math.min(Mr,gr),a._titleScoot=Math.abs(gr)}if(gr>0||Mr<0){var Pr={left:[-gr,0],right:[gr,0],top:[0,-gr],bottom:[0,gr]}[s.side];rr.attr("transform",AM(Pr[0],Pr[1]))}}}W.call(Fe,Q);function nr(lr,ir){lr.text(ir).on("mouseover.opacity",function(){G0.select(this).transition().duration(TM.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){G0.select(this).transition().duration(TM.HIDE_PLACEHOLDER).style("opacity",0)})}if(se&&(m?W.on(".opacity",null):(nr(W,o),g=!0),W.call(V0.makeEditable,{gd:e}).on("edit",function(lr){l!==void 0?r3.call("_guiRestyle",e,i,lr,l):r3.call("_guiRelayout",e,i,lr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Fe)}).on("input",function(lr){this.text(lr||" ").call(V0.positionText,u.x,u.y)}),H)){if(H&&!m){var Ze=W.node().getBBox(),ar=Ze.y+Ze.height+n3*re;Q.attr("y",ar)}X?Q.on(".opacity",null):(nr(Q,Y),V=!0),Q.call(V0.makeEditable,{gd:e}).on("edit",function(lr){r3.call("_guiRelayout",e,"title.subtitle.text",lr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Fe)}).on("input",function(lr){this.text(lr||" ").call(V0.positionText,Q.attr("x"),Q.attr("y"))})}return W.classed("js-placeholder",g),Q&&Q.classed("js-placeholder",V),v}SM.exports={draw:CG,SUBTITLE_PADDING_EM:n3,SUBTITLE_PADDING_MATHJAX_EM:t3}});var dp=ne((kue,EM)=>{"use strict";var LG=kt(),qG=m0().utcFormat,yn=pr(),DG=yn.numberFormat,ts=Bt(),Zu=yn.cleanNumber,EG=yn.ms2DateTime,CM=yn.dateTime2ms,ns=yn.ensureNumber,LM=yn.isArrayOrTypedArray,Xu=En(),lp=Xu.FP_SAFE,ml=Xu.BADNUM,PG=Xu.LOG_CLIP,RG=Xu.ONEWEEK,sp=Xu.ONEDAY,up=Xu.ONEHOUR,qM=Xu.ONEMIN,DM=Xu.ONESEC,fp=ya(),hp=Pa(),cp=hp.HOUR_PATTERN,vp=hp.WEEKDAY_PATTERN;function w1(e){return Math.pow(10,e)}function a3(e){return e!=null}EM.exports=function(r,t){t=t||{};var n=r._id||"x",a=n.charAt(0);function i(b,A){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&A&&r.range&&r.range.length===2){var S=r.range[0],M=r.range[1];return .5*(S+M-2*PG*Math.abs(S-M))}else return ml}function o(b,A,S,M){if((M||{}).msUTC&&ts(b))return+b;var D=CM(b,S||r.calendar);if(D===ml)if(ts(b)){b=+b;var z=Math.floor(yn.mod(b+.05,1)*10),F=Math.round(b-z/10);D=CM(new Date(F))+z/10}else return ml;return D}function l(b,A,S){return EG(b,A,S||r.calendar)}function s(b){return r._categories[Math.round(b)]}function u(b){if(a3(b)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[b]!==void 0)return r._categoriesMap[b];r._categories.push(typeof b=="number"?String(b):b);var A=r._categories.length-1;return r._categoriesMap[b]=A,A}return ml}function f(b,A){for(var S=new Array(A),M=0;Mr.range[1]&&(S=!S);for(var M=S?-1:1,D=M*b,z=0,F=0;FY)z=F+1;else{z=D<(H+Y)/2?F:F+1;break}}var O=r._B[z]||0;return isFinite(O)?m(b,r._m2,O):0},x=function(b){var A=r._rangebreaks.length;if(!A)return g(b,r._m,r._b);for(var S=0,M=0;Mr._rangebreaks[M].pmax&&(S=M+1);return g(b,r._m2,r._B[S])}}r.c2l=r.type==="log"?i:ns,r.l2c=r.type==="log"?w1:ns,r.l2p=y,r.p2l=x,r.c2p=r.type==="log"?function(b,A){return y(i(b,A))}:y,r.p2c=r.type==="log"?function(b){return w1(x(b))}:x,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Zu,r.c2d=r.c2r=r.l2d=r.l2r=ns,r.d2p=r.r2p=function(b){return r.l2p(Zu(b))},r.p2d=r.p2r=x,r.cleanPos=ns):r.type==="log"?(r.d2r=r.d2l=function(b,A){return i(Zu(b),A)},r.r2d=r.r2c=function(b){return w1(Zu(b))},r.d2c=r.r2l=Zu,r.c2d=r.l2r=ns,r.c2r=i,r.l2d=w1,r.d2p=function(b,A){return r.l2p(r.d2r(b,A))},r.p2d=function(b){return w1(x(b))},r.r2p=function(b){return r.l2p(Zu(b))},r.p2r=x,r.cleanPos=ns):r.type==="date"?(r.d2r=r.r2d=yn.identity,r.d2c=r.r2c=r.d2l=r.r2l=o,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(b,A,S){return r.l2p(o(b,0,S))},r.p2d=r.p2r=function(b,A,S){return l(x(b),A,S)},r.cleanPos=function(b){return yn.cleanDate(b,ml,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var A=d(b);return A!==void 0?A:r.fraction2r(.5)},r.l2r=r.c2r=ns,r.r2l=d,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(x(b))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(b){return typeof b=="string"&&b!==""?b:ns(b)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var A=h(b);return A!==void 0?A:r.fraction2r(.5)},r.r2c_just_indices=v,r.l2r=r.c2r=ns,r.r2l=h,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(x(b))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:ns(b)},r.setupMultiCategory=function(b){var A=r._traceIndices,S,M,D=r._matchGroup;if(D&&r._categories.length===0){for(var z in D)if(z!==n){var F=t[fp.id2name(z)];A=A.concat(F._traceIndices)}}var H=[[0,{}],[0,{}]],Y=[];for(S=0;SF[1]&&(M[z?0:1]=S),M[0]===M[1]){var H=r.l2r(A),Y=r.l2r(S);if(A!==void 0){var O=H+1;S!==void 0&&(O=Math.min(O,Y)),M[z?1:0]=O}if(S!==void 0){var X=Y+1;A!==void 0&&(X=Math.max(X,H)),M[z?0:1]=X}}}},r.cleanRange=function(b,A){r._cleanRange(b,A),r.limitRange(b)},r._cleanRange=function(b,A){A||(A={}),b||(b="range");var S=yn.nestedProperty(r,b).get(),M,D;if(r.type==="date"?D=yn.dfltRange(r.calendar):a==="y"?D=hp.DFLTRANGEY:r._name==="realaxis"?D=[0,1]:D=A.dfltRange||hp.DFLTRANGEX,D=D.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(D[0]=0),!S||S.length!==2){yn.nestedProperty(r,b).set(D);return}var z=S[0]===null,F=S[1]===null;for(r.type==="date"&&!r.autorange&&(S[0]=yn.cleanDate(S[0],ml,r.calendar),S[1]=yn.cleanDate(S[1],ml,r.calendar)),M=0;M<2;M++)if(r.type==="date"){if(!yn.isDateTime(S[M],r.calendar)){r[b]=D;break}if(r.r2l(S[0])===r.r2l(S[1])){var H=yn.constrain(r.r2l(S[0]),yn.MIN_MS+1e3,yn.MAX_MS-1e3);S[0]=r.l2r(H-1e3),S[1]=r.l2r(H+1e3);break}}else{if(!ts(S[M]))if(!(z||F)&&ts(S[1-M]))S[M]=S[1-M]*(M?10:.1);else{r[b]=D;break}if(S[M]<-lp?S[M]=-lp:S[M]>lp&&(S[M]=lp),S[0]===S[1]){var Y=Math.max(1,Math.abs(S[0]*1e-6));S[0]-=Y,S[1]+=Y}}},r.setScale=function(b){var A=t._size;if(r.overlaying){var S=fp.getFromId({_fullLayout:t},r.overlaying);r.domain=S.domain}var M=b&&r._r?"_r":"range",D=r.calendar;r.cleanRange(M);var z=r.r2l(r[M][0],D),F=r.r2l(r[M][1],D),H=a==="y";if(H?(r._offset=A.t+(1-r.domain[1])*A.h,r._length=A.h*(r.domain[1]-r.domain[0]),r._m=r._length/(z-F),r._b=-r._m*F):(r._offset=A.l+r.domain[0]*A.w,r._length=A.w*(r.domain[1]-r.domain[0]),r._m=r._length/(F-z),r._b=-r._m*z),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var Y,O;if(r._rangebreaks=r.locateBreaks(Math.min(z,F),Math.max(z,F)),r._rangebreaks.length){for(Y=0;YF&&(X=!X),X&&r._rangebreaks.reverse();var V=X?-1:1;for(r._m2=V*r._length/(Math.abs(F-z)-r._lBreaks),r._B.push(-r._m2*(H?F:z)),Y=0;YD&&(D+=7,zD&&(D+=24,z=M&&z=M&&b=Se.min&&(qeSe.max&&(Se.max=Be),Ne=!1)}Ne&&F.push({min:qe,max:Be})}};for(S=0;S{"use strict";var PM=Bt(),i3=pr(),zG=En().BADNUM,pp=i3.isArrayOrTypedArray,NG=i3.isDateTime,FG=i3.cleanNumber,RM=Math.round;NM.exports=function(r,t,n){var a=r,i=n.noMultiCategory;if(pp(a)&&!a.length)return"-";if(!i&&UG(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],l=0;li*2}function zM(e){return Math.max(1,(e-1)/1e3)}function OG(e,r){for(var t=e.length,n=zM(t),a=0,i=0,o={},l=0;la*2}function UG(e){return pp(e[0])&&pp(e[1])}});var Ju=ne((Cue,GM)=>{"use strict";var YG=kt(),BM=Bt(),ju=pr(),gp=En().FP_SAFE,GG=dt(),VG=ln(),OM=ya(),WG=OM.getFromId,ZG=OM.isLinked;GM.exports={applyAutorangeOptions:YM,getAutoRange:l3,makePadFn:s3,doAutoRange:jG,findExtremes:JG,concatExtremes:c3};function l3(e,r){var t,n,a=[],i=e._fullLayout,o=s3(i,r,0),l=s3(i,r,1),s=c3(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return ju.simpleMap(r.range,r.r2l);var v=u[0].val,h=f[0].val;for(t=1;t0&&(F=_-o(S)-l(M),F>b?H/F>A&&(D=S,z=M,A=H/F):H/_>A&&(D={val:S.val,nopad:1},z={val:M.val,nopad:1},A=H/_));function Y(te,K){return Math.max(te,l(K))}if(v===h){var O=v-1,X=v+1;if(x)if(v===0)a=[0,1];else{var V=(v>0?f:u).reduce(Y,0),ee=v/(1-Math.min(.5,V/_));a=v>0?[0,ee]:[ee,0]}else T?a=[Math.max(0,O),Math.max(1,X)]:a=[O,X]}else x?(D.val>=0&&(D={val:0,nopad:1}),z.val<=0&&(z={val:0,nopad:1})):T&&(D.val-A*o(D)<0&&(D={val:0,nopad:1}),z.val<=0&&(z={val:1,nopad:1})),A=(z.val-D.val-FM(r,S.val,M.val))/(_-o(D)-l(z)),a=[D.val-A*o(D),z.val+A*l(z)];return a=YM(a,r),r.limitRange&&r.limitRange(),m&&a.reverse(),ju.simpleMap(a,r.l2r||Number)}function FM(e,r,t){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),S=b((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),M=b(t.vpadplus||t.vpad),D=b(t.vpadminus||t.vpad);if(!u){if(T=1/0,_=-1/0,s)for(v=0;v0&&(T=h),h>_&&h-gp&&(T=h),h>_&&h=H;v--)F(v);return{min:n,max:a,opts:t}}function u3(e,r,t,n){UM(e,r,t,n,$G)}function f3(e,r,t,n){UM(e,r,t,n,KG)}function UM(e,r,t,n,a){for(var i=n.tozero,o=n.extrapad,l=!0,s=0;s=t&&(u.extrapad||!o)){l=!1;break}else a(r,u.val)&&u.pad<=t&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:o})}}function HM(e){return BM(e)&&Math.abs(e)=r}function QG(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&mp(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&mp(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function eV(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&mp(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&mp(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function mp(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),o<=s&&(o=s,n=s)}}return t=QG(t,r),n=eV(n,r),[t,n]}});var Cn=ne((Lue,vA)=>{"use strict";var Ao=kt(),ea=Bt(),W0=ua(),A1=dt(),ut=pr(),Z0=ut.strTranslate,dc=ci(),rV=x1(),T1=zt(),Ki=ln(),tV=pl(),VM=L2(),za=En(),nV=za.ONEMAXYEAR,_p=za.ONEAVGYEAR,xp=za.ONEMINYEAR,aV=za.ONEMAXQUARTER,p3=za.ONEAVGQUARTER,wp=za.ONEMINQUARTER,iV=za.ONEMAXMONTH,X0=za.ONEAVGMONTH,Mp=za.ONEMINMONTH,Qi=za.ONEWEEK,ei=za.ONEDAY,$u=ei/2,is=za.ONEHOUR,k1=za.ONEMIN,Ap=za.ONESEC,oV=za.ONEMILLI,lV=za.ONEMICROSEC,pc=za.MINUS_SIGN,Sp=za.BADNUM,g3={K:"zeroline"},m3={K:"gridline",L:"path"},y3={K:"minor-gridline",L:"path"},tA={K:"tick",L:"path"},WM={K:"tick",L:"text"},ZM={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Cp=Ka(),M1=Cp.MID_SHIFT,gc=Cp.CAP_SHIFT,S1=Cp.LINE_SPACING,sV=Cp.OPPOSITE_SIDE,Tp=3,xr=vA.exports={};xr.setConvert=dp();var uV=o3(),Ks=ya(),fV=Ks.idSort,cV=Ks.isLinked;xr.id2name=Ks.id2name;xr.name2id=Ks.name2id;xr.cleanId=Ks.cleanId;xr.list=Ks.list;xr.listIds=Ks.listIds;xr.getFromId=Ks.getFromId;xr.getFromTrace=Ks.getFromTrace;var nA=Ju();xr.getAutoRange=nA.getAutoRange;xr.findExtremes=nA.findExtremes;var vV=1e-4;function w3(e){var r=(e[1]-e[0])*vV;return[e[0]-r,e[1]+r]}xr.coerceRef=function(e,r,t,n,a,i){var o=n.charAt(n.length-1),l=t._fullLayout._subplots[o+"axis"],s=n+"ref",u={};return a||(a=l[0]||(typeof i=="string"?i:i[0])),i||(i=a),l=l.concat(l.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:l.concat(i?typeof i=="string"?[i]:i:[]),dflt:a},ut.coerce(e,r,u,s)};xr.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};xr.coercePosition=function(e,r,t,n,a,i){var o,l,s=xr.getRefType(n);if(s!=="range")o=ut.ensureNumber,l=t(a,i);else{var u=xr.getFromId(r,n);i=u.fraction2r(i),l=t(a,i),o=u.cleanPos}e[a]=o(l)};xr.cleanPosition=function(e,r,t){var n=t==="paper"||t==="pixel"?ut.ensureNumber:xr.getFromId(r,t).cleanPos;return n(e)};xr.redrawComponents=function(e,r){r=r||xr.listIds(e);var t=e._fullLayout;function n(a,i,o,l){for(var s=A1.getComponentMethod(a,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};xr.saveRangeInitial=function(e,r){for(var t=xr.list(e,"",!0),n=!1,a=0;av*.3||u(n)||u(a))){var h=t.dtick/2;e+=e+ho){var l=Number(t.substr(1));i.exactYears>o&&l%12===0?e=xr.tickIncrement(e,"M6","reverse")+ei*1.5:i.exactMonths>o?e=xr.tickIncrement(e,"M1","reverse")+ei*15.5:e-=$u;var s=xr.tickIncrement(e,t);if(s<=n)return s}return e}xr.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var n=r.dtick&&ea(r._tmin),a;if(n){var i=xr.tickIncrement(r._tmin,r.dtick,!0);a=[r._tmin,i*.99+r._tmin*.01]}else{var o=ut.simpleMap(r.range,r.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=ut.simpleMap(a,r.l2r),e._isMinor=!0,xr.prepTicks(e,t),n){var l=ea(r.dtick),s=ea(e.dtick),u=l?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);l&&s?v3(u,f)?u===2*Qi&&f===2*ei&&(e.dtick=Qi):u===2*Qi&&f===3*ei?e.dtick=Qi:u===Qi&&!(r._input.minor||{}).nticks?e.dtick=ei:JM(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":v3(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?v3(u,f)||(e.dtick=JM(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function v3(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function JM(e,r){return Math.abs(e/r-1)<.001}xr.prepTicks=function(e,r){var t=ut.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ut.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=ut.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(t[1]-t[0])/n,xr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var l=e[i].value,s=e[o].value,u=Math.abs(s-l),f=t||u,v=0;f>=xp?u>=xp&&u<=nV?v=u:v=_p:t===p3&&f>=wp?u>=wp&&u<=aV?v=u:v=p3:f>=Mp?u>=Mp&&u<=iV?v=u:v=X0:t===Qi&&f>=Qi?v=Qi:f>=ei?v=ei:t===$u&&f>=$u?v=$u:t===is&&f>=is&&(v=is);var h;v>=u&&(v=u,h=!0);var d=a+v;if(r.rangebreaks&&v>0){for(var m=84,g=0,y=0;yQi&&(v=u)}(v>0||n===0)&&(e[n].periodX=a+v/2)}}xr.calcTicks=function(r,t){for(var n=r.type,a=r.calendar,i=r.ticklabelstep,o=r.ticklabelmode==="period",l=r.range[0]>r.range[1],s=!r.ticklabelindex||ut.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=ut.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(_?0:1);b--){var A=!b;b?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var S=b?r:ut.extendFlat({},r,r.minor);if(A?xr.prepMinorTicks(S,r,t):xr.prepTicks(S,t),S.tickmode==="array"){b?(y=[],m=$M(r,!A)):(x=[],g=$M(r,!A));continue}if(S.tickmode==="sync"){y=[],m=yV(r);continue}var M=w3(u),D=M[0],z=M[1],F=ea(S.dtick),H=n==="log"&&!(F||S.dtick.charAt(0)==="L"),Y=xr.tickFirst(S,t);if(b){if(r._tmin=Y,Y=z:X<=z;X=xr.tickIncrement(X,te,f,a)){if(b&&V++,S.rangebreaks&&!f){if(X=h)break}if(y.length>d||X===O)break;O=X;var K={value:X};b?(H&&X!==(X|0)&&(K.simpleLabel=!0),i>1&&V%i&&(K.skipLabel=!0),y.push(K)):(K.minor=!0,x.push(K))}}if(!x||x.length<2)s=!1;else{var re=(x[1].value-x[0].value)*(l?-1:1);UV(re,r.tickformat)||(s=!1)}if(!s)T=y;else{var fe=y.concat(x);o&&y.length&&(fe=fe.slice(1)),fe=fe.sort(function(ar,lr){return ar.value-lr.value}).filter(function(ar,lr,ir){return lr===0||ar.value!==ir[lr-1].value});var de=fe.map(function(ar,lr){return ar.minor===void 0&&!ar.skipLabel?lr:null}).filter(function(ar){return ar!==null});de.forEach(function(ar){s.map(function(lr){var ir=ar+lr;ir>=0&&ir-1;Te--){if(y[Te].drop){y.splice(Te,1);continue}y[Te].value=d3(y[Te].value,r);var $=r.c2p(y[Te].value);(pe?Q>$-W:Q<$+W)?y.splice(f?Te+1:Te,1):Q=$}}T3(r)&&Math.abs(u[1]-u[0])===360&&y.pop(),r._tmax=(y[y.length-1]||{}).value,r._prevDateHead="",r._inCalcTicks=!0;var Me,Fe=function(ar){ar.text="",r._prevDateHead=Me};y=y.concat(x);function Oe(ar,lr){var ir=xr.tickText(ar,lr.value,!1,lr.simpleLabel),rr=lr.periodX;return rr!==void 0&&(ir.periodX=rr,(rr>h||rrh&&(ir.periodX=h),rra&&h_p)r/=_p,n=a(10),e.dtick="M"+12*as(r,n,yp);else if(i>X0)r/=X0,e.dtick="M"+as(r,1,KM);else if(i>ei){if(e.dtick=as(r,ei,e._hasDayOfWeekBreaks?[1,2,7,14]:bV),!t){var o=xr.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=ut.dateTick0(e.calendar,2):e.tick0=ut.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else i>is?e.dtick=as(r,is,KM):i>k1?e.dtick=as(r,k1,QM):i>Ap?e.dtick=as(r,Ap,QM):(n=a(10),e.dtick=as(r,n,yp))}else if(e.type==="log"){e.tick0=0;var s=ut.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,n=a(10),e.dtick="L"+as(r,n,yp)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):T3(e)?(e.tick0=0,n=1,e.dtick=as(r,n,_V)):(e.tick0=0,n=a(10),e.dtick=as(r,n,yp));if(e.dtick===0&&(e.dtick=1),!ea(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function lA(e){var r=e.dtick;if(e._tickexponent=0,!ea(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),n=e.l2r(t).replace(/(^-|i)/g,""),a=n.length;if(String(r).charAt(0)==="M")a>10||n.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=ei&&a<=10||r>=ei*15)e._tickround="d";else if(r>=k1&&a<=16||r>=is)e._tickround="M";else if(r>=Ap&&a<=19||r>=k1)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(ea(r)||r.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);ea(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(kp(e.exponentformat)&&!M3(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}xr.tickIncrement=function(e,r,t,n){var a=t?-1:1;if(ea(r))return ut.increment(e,a*r);var i=r.charAt(0),o=a*Number(r.substr(1));if(i==="M")return ut.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var l=r==="D2"?oA:iA,s=e+a*.01,u=ut.roundUp(ut.mod(s,1),l,t);return Math.floor(s)+Math.log(Ao.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};xr.tickFirst=function(e,r){var t=e.r2l||Number,n=ut.simpleMap(e.range,t,void 0,void 0,r),a=n[1]=0&&x<=e._length?y:null};if(i&&ut.isArrayOrTypedArray(e.ticktext)){var v=ut.simpleMap(e.range,e.r2l),h=(Math.abs(v[1]-v[0])-(e._lBreaks||0))/1e4;for(u=0;u"+l;else{var u=L1(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(o+="
")}r.text=o}function wV(e,r,t,n,a){var i=e.dtick,o=r.x,l=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&s!=="L"&&(i="L3",s="L"),l||s==="L")r.text=C1(Math.pow(10,o),e,a,n);else if(ea(i)||s==="D"&&ut.mod(o+.01,1)<.1){var u=Math.round(o),f=Math.abs(u),v=e.exponentformat;v==="power"||kp(v)&&M3(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":pc)+f+"",r.fontSize*=1.25):(v==="e"||v==="E")&&f>2?r.text="1"+v+(u>0?"+":pc)+f:(r.text=C1(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,ut.mod(o,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(o<0?.5:.25)))}}function MV(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function AV(e,r,t){var n=Math.round(r.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);t?r.text=o+" - "+i:(r.text=i,r.text2=o)}function TV(e,r,t,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(a="hide"),r.text=C1(r.x,e,a,n)}function kV(e,r,t,n,a){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var o=SV(i);if(o[1]>=100)r.text=C1(ut.deg2rad(r.x),e,a,n);else{var l=r.x<0;o[1]===1?o[0]===1?r.text="\u03C0":r.text=o[0]+"\u03C0":r.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),l&&(r.text=pc+r.text)}}}else r.text=C1(r.x,e,a,n)}function SV(e){function r(l,s){return Math.abs(l-s)<=1e-6}function t(l,s){return r(s,0)?l:t(s,l%s)}function n(l){for(var s=1;!r(Math.round(l*s)/s,l);)s*=10;return s}var a=n(e),i=e*a,o=Math.abs(t(i,a));return[Math.round(i/o),Math.round(a/o)]}var CV=["f","p","n","\u03BC","m","","k","M","G","T"];function kp(e){return e==="SI"||e==="B"}function M3(e){return e>14||e<-15}function C1(e,r,t,n){var a=e<0,i=r._tickround,o=t||r.exponentformat||"B",l=r._tickexponent,s=xr.getTickFormat(r),u=r.separatethousands;if(n){var f={exponentformat:o,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:ea(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};lA(f),i=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,pc);var v=Math.pow(10,-i)/2;if(o==="none"&&(l=0),e=Math.abs(e),e"+m+"":o==="B"&&l===9?e+="B":kp(o)&&(e+=CV[l/3+5])}return a?pc+e:e}xr.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*X0}function n(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var v=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return v===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):v-h}else return typeof s=="number"?1:-1}function a(s,u,f){var v=f||function(m){return m},h=u[0],d=u[1];return(!h&&typeof h!="number"||v(h)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function i(s,u){var f=u[0]===null,v=u[1]===null,h=n(s,u[0])>=0,d=n(s,u[1])<=0;return(f||h)&&(v||d)}var o,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&a.unshift(a.splice(f,1).shift())}});var l={false:{left:0,right:0}};return ut.syncOrAsync(a.map(function(s){return function(){if(s){var u=xr.getFromId(e,s);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=o;var f=xr.drawOne(e,u,t);return u._shiftPusher&&x3(u,u._fullDepth||0,l,!0),u._r=u.range.slice(),u._rl=ut.simpleMap(u._r,u.r2l),f}}}))};xr.drawOne=function(e,r,t){t=t||{};var n=t.axShifts||{},a=t.overlayingShiftedAx||[],i,o,l;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),v=xr.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||a.indexOf(r._id)!==-1||a.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),x3(r,d,n,!0),x3(r,r.shift||0,n,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=OV(r,n));var m=h[f+"axislayer"],g=r._mainLinePosition,y=g+=r._shift,x=r._mainMirrorPosition,T=r._vals=xr.calcTicks(r),_=[r.mirror,y,x].join("_");for(i=0;i0?ir.bottom-ar:0,lr))));var Ae=0,Ve=0;if(r._shiftPusher&&(Ae=Math.max(lr,ir.height>0?nr==="l"?ar-ir.left:ir.right-ar:0),r.title.text!==s._dfltTitle[f]&&(Ve=(r._titleStandoff||0)+(r._titleScoot||0),nr==="l"&&(Ve+=rA(r))),r._fullDepth=Math.max(Ae,Ve)),r.automargin){rr={x:0,y:0,r:0,l:0,t:0,b:0};var je=[0,1],zr=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(nr==="b"?rr[nr]=r._depth:(rr[nr]=r._depth=Math.max(ir.width>0?ar-ir.top:0,lr),je.reverse()),ir.width>0){var kr=ir.right-(r._offset+r._length);kr>0&&(rr.xr=1,rr.r=kr);var er=r._offset-ir.left;er>0&&(rr.xl=0,rr.l=er)}}else if(nr==="l"?(r._depth=Math.max(ir.height>0?ar-ir.left:0,lr),rr[nr]=r._depth-zr):(r._depth=Math.max(ir.height>0?ir.right-ar:0,lr),rr[nr]=r._depth+zr,je.reverse()),ir.height>0){var Ke=ir.bottom-(r._offset+r._length);Ke>0&&(rr.yb=0,rr.b=Ke);var mr=r._offset-ir.top;mr>0&&(rr.yt=1,rr.t=mr)}rr[v]=r.anchor==="free"?r.position:r._anchorAxis.domain[je[0]],r.title.text!==s._dfltTitle[f]&&(rr[nr]+=rA(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Cr={x:0,y:0,r:0,l:0,t:0,b:0},Cr[Ze]=r.linewidth,r.mirror&&r.mirror!==!0&&(Cr[Ze]+=lr),r.mirror===!0||r.mirror==="ticks"?Cr[v]=r._anchorAxis.domain[je[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Cr[v]=[r._counterDomainMin,r._counterDomainMax][je[1]]))}fr&&(yr=A1.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(eA(rr,r.automargin),eA(Cr,r.automargin)),W0.autoMargin(e,A3(r),rr),W0.autoMargin(e,fA(r),Cr),W0.autoMargin(e,cA(r),yr)}),ut.syncOrAsync(Fe)}};function eA(e,r){if(e){var t=Object.keys(ZM).reduce(function(n,a){return r.indexOf(a)!==-1&&ZM[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){t[n]||(n.length===1?e[n]=0:delete e[n])})}}function LV(e,r){var t=[],n,a=function(i,o){var l=i.xbnd[o];l!==null&&t.push(ut.extendFlat({},i,{x:l}))};if(r.length){for(n=0;ne.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!l;if(t){var u=o?-1:1;t=t*u}if(n){var f=e.side,v=l&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;n=n*v}return e._id.charAt(0)==="x"?function(h){return Z0(a+e._offset+e.l2p(b3(h))+t,i+n)}:function(h){return Z0(i+n,a+e._offset+e.l2p(b3(h))+t)}};function b3(e){return e.periodX!==void 0?e.periodX:e.x}function PV(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},n=t("top"),a=t("left"),i=t("right"),o=t("bottom"),l=t("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,v=Tp,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(f+=h*gc,v+=(e.linewidth||0)/2),(a||i)&&(f+=(e.linewidth||0)/2,v+=Tp),l&&u==="top"&&(v-=h*(1-gc)),(a||n)&&(f=-f),(u==="bottom"||u==="right")&&(v=-v),[s?f:0,l?v:0]}xr.makeTickPath=function(e,r,t,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return o==="x"?"M0,"+(r+l*t)+"v"+i*t:"M"+(r+l*t)+",0h"+i*t};xr.makeLabelFns=function(e,r,t){var n=e.ticklabelposition||"",a=function(Y){return n.indexOf(Y)!==-1},i=a("top"),o=a("left"),l=a("right"),s=a("bottom"),u=s||o||i||l,f=a("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,m=v?e.ticklen:0;if(f?m*=-1:u&&(m=0),v&&(h+=m,t)){var g=ut.deg2rad(t);h=m*Math.cos(g)+1,d=m*Math.sin(g)}e.showticklabels&&(v||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:h,labelShift:d},x,T,_,b,A=0,S=e.side,M=e._id.charAt(0),D=e.tickangle,z;if(M==="x")z=!f&&S==="bottom"||f&&S==="top",b=z?1:-1,f&&(b*=-1),x=d*b,T=r+h*b,_=z?1:-.2,Math.abs(D)===90&&(f?_+=M1:D===-90&&S==="bottom"?_=gc:D===90&&S==="top"?_=M1:_=.5,A=M1/2*(D/90)),y.xFn=function(Y){return Y.dx+x+A*Y.fontSize},y.yFn=function(Y){return Y.dy+T+Y.fontSize*_},y.anchorFn=function(Y,O){if(u){if(o)return"end";if(l)return"start"}return!ea(O)||O===0||O===180?"middle":O*b<0!==f?"end":"start"},y.heightFn=function(Y,O,X){return O<-60||O>60?-.5*X:e.side==="top"!==f?-X:0};else if(M==="y"){if(z=!f&&S==="left"||f&&S==="right",b=z?1:-1,f&&(b*=-1),x=h,T=d*b,_=0,!f&&Math.abs(D)===90&&(D===-90&&S==="left"||D===90&&S==="right"?_=gc:_=.5),f){var F=ea(D)?+D:0;if(F!==0){var H=ut.deg2rad(F);A=Math.abs(Math.sin(H))*gc*b,_=0}}y.xFn=function(Y){return Y.dx+r-(x+Y.fontSize*_)*b+A*Y.fontSize},y.yFn=function(Y){return Y.dy+T+Y.fontSize*M1},y.anchorFn=function(Y,O){return ea(O)&&Math.abs(O)===90?"middle":z?"end":"start"},y.heightFn=function(Y,O,X){return e.side==="right"&&(O*=-1),O<-30?-X:O<30?-.5*X:0}}return y};function Lp(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}xr.drawTicks=function(e,r,t){t=t||{};var n=r._id+"tick",a=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(r.ticks?t.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=t.layer.selectAll("path."+n).data(a,Lp);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(o){return T1.stroke(Ao.select(this),o.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(o){return Ki.crispRound(e,o.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),qp(r,[tA]),i.attr("transform",t.transFn)};xr.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var n=r._id+"grid",a=r.minor&&r.minor.showgrid,i=a?t.vals.filter(function(x){return x.minor}):[],o=r.showgrid?t.vals.filter(function(x){return!x.minor}):[],l=t.counterAxis;if(l&&xr.shouldShowZeroLine(e,r,l))for(var s=r.tickmode==="array",u=0;u=0;m--){var g=m?h:d;if(g){var y=g.selectAll("path."+n).data(m?o:i,Lp);y.exit().remove(),y.enter().append("path").classed(n,1).classed("crisp",t.crisp!==!1),y.attr("transform",t.transFn).attr("d",t.path).each(function(x){return T1.stroke(Ao.select(this),x.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(x){return Ki.dashStyle(x.minor?r.minor.griddash:r.griddash,x.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(x){return(x.minor?v:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&y.attr("d",t.path)}}qp(r,[m3,y3])}};xr.drawZeroLine=function(e,r,t){t=t||t;var n=r._id+"zl",a=xr.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+n).data(a?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(o,l){return fV(o.id,l.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(T1.stroke,r.zerolinecolor||T1.defaultLine).style("stroke-width",Ki.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),qp(r,[g3])};xr.drawLabels=function(e,r,t){t=t||{};var n=e._fullLayout,a=r._id,i=t.cls||a+"tick",o=t.vals.filter(function(K){return K.text}),l=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?o:[],Lp),v=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(K){var re=Ao.select(this),fe=e._promises.length;re.call(dc.positionText,l.xFn(K),l.yFn(K)).call(Ki.font,{family:K.font,size:K.fontSize,color:K.fontColor,weight:K.fontWeight,style:K.fontStyle,variant:K.fontVariant,textcase:K.fontTextcase,lineposition:K.fontLineposition,shadow:K.fontShadow}).text(K.text).call(dc.convertToTspans,e),e._promises[fe]?v.push(e._promises.pop().then(function(){h(re,s)})):h(re,s)}),qp(r,[WM]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(K){Ao.select(this).select("text").call(dc.positionText,l.xFn(K),l.yFn(K))});function h(K,re){K.each(function(fe){var de=Ao.select(this),qe=de.select(".text-math-group"),Be=l.anchorFn(fe,re),Ne=t.transFn.call(de.node(),fe)+(ea(re)&&+re!=0?" rotate("+re+","+l.xFn(fe)+","+(l.yFn(fe)-fe.fontSize/2)+")":""),Ie=dc.lineCount(de),Se=S1*fe.fontSize,Xe=l.heightFn(fe,ea(re)?+re:0,(Ie-1)*Se);if(Xe&&(Ne+=Z0(0,Xe)),qe.empty()){var se=de.select("text");se.attr({transform:Ne,"text-anchor":Be}),se.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var be=Ki.bBox(qe.node()).width,Te=be*{end:-.5,start:.5}[Be];qe.attr("transform",Ne+Z0(Te,0))}})}r._adjustTickLabelsOverflow=function(){var K=r.ticklabeloverflow;if(!(!K||K==="allow")){var re=K.indexOf("hide")!==-1,fe=r._id.charAt(0)==="x",de=0,qe=fe?e._fullLayout.width:e._fullLayout.height;if(K.indexOf("domain")!==-1){var Be=ut.simpleMap(r.range,r.r2l);de=r.l2p(Be[0])+r._offset,qe=r.l2p(Be[1])+r._offset}var Ne=Math.min(de,qe),Ie=Math.max(de,qe),Se=r.side,Xe=1/0,se=-1/0;f.each(function(W){var Q=Ao.select(this),$=Q.select(".text-math-group");if($.empty()){var Me=Ki.bBox(Q.node()),Fe=0;fe?(Me.right>Ie||Me.leftIe||Me.top+(r.tickangle?0:W.fontSize/4)r["_visibleLabelMin_"+Be._id]?W.style("display","none"):Ie.K==="tick"&&!Ne&&W.style("display",null)})})})})},h(f,u+1?u:s);function d(){return v.length&&Promise.all(v)}var m=null;function g(){if(h(f,s),o.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){m=r.autotickangles[0];var K=0,re=[],fe,de=1;f.each(function(ir){K=Math.max(K,ir.fontSize);var rr=r.l2p(ir.x),Cr=_3(this),yr=Ki.bBox(Cr.node());de=Math.max(de,dc.lineCount(Cr)),re.push({top:0,bottom:10,height:10,left:rr-yr.width/2,right:rr+yr.width/2+2,width:yr.width+2})});var qe=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,Be=o.length,Ne=Math.abs((o[Be-1].x-o[0].x)*r._m)/(Be-1),Ie=qe?Ne/2:Ne,Se=qe?r.ticklen:K*1.25*de,Xe=Math.sqrt(Math.pow(Ie,2)+Math.pow(Se,2)),se=Ie/Xe,be=r.autotickangles.map(function(ir){return ir*Math.PI/180}),Te=be.find(function(ir){return Math.abs(Math.cos(ir))<=se});Te===void 0&&(Te=be.reduce(function(ir,rr){return Math.abs(Math.cos(ir))V*X&&(H=X,D[M]=z[M]=Y[M])}var ee=Math.abs(H-F);ee-b>0?(ee-=b,b*=1+b/ee):b=0,r._id.charAt(0)!=="y"&&(b=-b),D[S]=T.p2r(T.r2p(z[S])+A*b),T.autorange==="min"||T.autorange==="max reversed"?(D[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):(T.autorange==="max"||T.autorange==="min reversed")&&(D[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[T._name+".range"]=D}var te=ut.syncOrAsync(y);return te&&te.then&&e._promises.push(te),te};function RV(e,r,t){var n=r._id+"divider",a=t.vals,i=t.layer.selectAll("path."+n).data(a,Lp);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(T1.stroke,r.dividercolor).style("stroke-width",Ki.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}xr.getPxPosition=function(e,r){var t=e._fullLayout._size,n=r._id.charAt(0),a=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:n==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:n==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function rA(e){var r=e.title.font.size,t=(e.title.text.match(dc.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(gc+t*S1):t?r*(t+1)*S1:r}function zV(e,r){var t=e._fullLayout,n=r._id,a=n.charAt(0),i=r.title.font.size,o,l=(r.title.text.match(dc.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?o=r._depth+r.title.standoff+i*gc:(r.side==="top"||r.side==="left")&&(o=r._depth+r.title.standoff+i*(M1+l*S1));else{var s=L1(r);if(r.type==="multicategory")o=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),o=10+u+(r.linewidth?r.linewidth-1:0)}s||(a==="x"?o+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):o+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=xr.getPxPosition(e,r),v,h,d;a==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-o:f+o):(d=r._offset+r._length/2,h=r.side==="right"?f+o:f-o,v={rotate:"-90",offset:0});var m;if(r.type!=="multicategory"){var g=r._selections[r._id+"tick"];if(m={selection:g,side:r.side},g&&g.node()&&g.node().parentNode){var y=Ki.getTranslate(g.node().parentNode);m.offsetLeft=y.x,m.offsetTop=y.y}r.title.hasOwnProperty("standoff")&&(m.pad=0)}return r._titleStandoff=o,rV.draw(e,n+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[a],avoid:m,transform:v,attributes:{x:h,y:d,"text-anchor":"middle"}})}xr.shouldShowZeroLine=function(e,r,t){var n=ut.simpleMap(r.range,r.r2l);return n[0]*n[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===Sp)&&(uA(r,0)||!NV(e,r,t,n)||FV(e,r))};xr.clipEnds=function(e,r){return r.filter(function(t){return uA(e,t.x)})};function uA(e,r){var t=e.l2p(r);return t>1&&t1)for(a=1;a=a.min&&e=lV:/%L/.test(r)?e>=oV:/%[SX]/.test(r)?e>=Ap:/%M/.test(r)?e>=k1:/%[HI]/.test(r)?e>=is:/%p/.test(r)?e>=$u:/%[Aadejuwx]/.test(r)?e>=ei:/%[UVW]/.test(r)?e>=Qi:/%[Bbm]/.test(r)?e>=Mp:/%[q]/.test(r)?e>=wp:/%[Yy]/.test(r)?e>=xp:!0}});var dA=ne((que,hA)=>{"use strict";hA.exports=function(r,t,n){var a,i;if(n){var o=t==="reversed"||t==="min reversed"||t==="max reversed";a=n[o?1:0],i=n[o?0:1]}var l=r("autorangeoptions.minallowed",i===null?a:void 0),s=r("autorangeoptions.maxallowed",a===null?i:void 0);l===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var k3=ne((Due,pA)=>{"use strict";var YV=dA();pA.exports=function(r,t,n,a){var i=t._template||{},o=t.type||i.type||"-";n("minallowed"),n("maxallowed");var l=n("range");if(!l){var s;!a.noInsiderange&&o!=="log"&&(s=n("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(l=n("range",s)))}var u=t.getAutorangeDflt(l,a),f=n("autorange",u),v;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,v=!0),v||(u=t.getAutorangeDflt(l,a),f=n("autorange",u)),f&&(YV(n,f,l),(o==="linear"||o==="-")&&n("rangemode")),t.cleanRange()}});var mA=ne((Eue,gA)=>{var GV={left:0,top:0};gA.exports=VV;function VV(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=WV(r);return t[0]=n-i.left,t[1]=a-i.top,t}function WV(e){return e===window||e===document||e===document.body?GV:e.getBoundingClientRect()}});var S3=ne((Pue,yA)=>{"use strict";var ZV=n2();function XV(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}yA.exports=ZV&&XV()});var _A=ne((Rue,bA)=>{"use strict";bA.exports=function(r,t,n,a,i){var o=(r-n)/(a-n),l=o+t/(a-n),s=(o+l)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?s:i==="right"||i==="top"?l:o<2/3-s?o:l>4/3-s?l:s}});var MA=ne((zue,wA)=>{"use strict";var xA=pr(),jV=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];wA.exports=function(r,t,n,a){return n==="left"?r=0:n==="center"?r=1:n==="right"?r=2:r=xA.constrain(Math.floor(r*3),0,2),a==="bottom"?t=0:a==="middle"?t=1:a==="top"?t=2:t=xA.constrain(Math.floor(t*3),0,2),jV[t][r]}});var TA=ne((Nue,AA)=>{"use strict";var JV=v1(),$V=qd(),KV=a1().getGraphDiv,QV=t1(),C3=AA.exports={};C3.wrapped=function(e,r,t){e=KV(e),e._fullLayout&&$V.clear(e._fullLayout._uid+QV.HOVERID),C3.raw(e,r,t)};C3.raw=function(r,t){var n=r._fullLayout,a=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&JV.triggerHandler(r,"plotly_beforehover",t)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&a&&r.emit("plotly_unhover",{event:t,points:a}))}});var To=ne((Fue,CA)=>{"use strict";var eW=mA(),L3=i2(),rW=S3(),tW=pr().removeElement,nW=Pa(),mc=CA.exports={};mc.align=_A();mc.getCursor=MA();var kA=TA();mc.unhover=kA.wrapped;mc.unhoverRaw=kA.raw;mc.init=function(r){var t=r.gd,n=1,a=t._context.doubleClickDelay,i=r.element,o,l,s,u,f,v,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=y,rW?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=y,i.addEventListener("touchstart",y,{passive:!1})):i.ontouchstart=y;function m(_,b,A){return Math.abs(_)a&&(n=Math.max(n-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(n,v),!d){var b;try{b=new MouseEvent("click",_)}catch(S){var A=q3(_);b=document.createEvent("MouseEvents"),b.initMouseEvent("click",_.bubbles,_.cancelable,_.view,_.detail,_.screenX,_.screenY,A[0],A[1],_.ctrlKey,_.altKey,_.shiftKey,_.metaKey,_.button,_.relatedTarget)}h.dispatchEvent(b)}t._dragging=!1,t._dragged=!1}};function SA(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}mc.coverSlip=SA;function q3(e){return eW(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Ku=ne((Iue,LA)=>{"use strict";LA.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&r.classed(n,!1)}),t&&r.classed("cursor-"+t,!0)}});var EA=ne((Hue,DA)=>{"use strict";var D3=Ku(),q1="data-savedcursor",qA="!!";DA.exports=function(r,t){var n=r.attr(q1);if(t){if(!n){for(var a=(r.attr("class")||"").split(" "),i=0;i{"use strict";var E3=$a(),aW=cl();PA.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:aW.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:E3({editType:"legend"}),grouptitlefont:E3({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:E3({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Ep=ne(Dp=>{"use strict";Dp.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};Dp.isVertical=function(r){return r.orientation!=="h"};Dp.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var N3=ne((Uue,RA)=>{"use strict";var R3=dt(),eo=pr(),iW=_n(),oW=bo(),lW=P3(),sW=A0(),z3=Ep();function uW(e,r,t,n){var a=r[e]||{},i=iW.newContainer(t,e);function o(te,K){return eo.coerce(a,i,lW,te,K)}var l=eo.coerceFont(o,"font",t.font);o("bgcolor",t.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var u,f=function(te,K){var re=u._input,fe=u;return eo.coerce(re,fe,oW,te,K)},v=t.font||{},h=eo.coerceFont(o,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),d=0,m=!1,g="normal",y=(t.shapes||[]).filter(function(te){return te.showlegend}),x=n.concat(y).filter(function(te){return e===(te.legend||"legend")}),T=0;T(e==="legend"?1:0));if(b===!1&&(t[e]=void 0),!(b===!1&&!a.uirevision)&&(o("uirevision",t.uirevision),b!==!1)){o("borderwidth");var A=o("orientation"),S=o("yref"),M=o("xref"),D=A==="h",z=S==="paper",F=M==="paper",H,Y,O,X="left";D?(H=0,R3.getComponentMethod("rangeslider","isVisible")(r.xaxis)?z?(Y=1.1,O="bottom"):(Y=1,O="top"):z?(Y=-.1,O="top"):(Y=0,O="bottom")):(Y=1,O="auto",F?H=1.02:(H=1,X="right")),eo.coerce(a,i,{x:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:H}},"x"),eo.coerce(a,i,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:Y}},"y"),o("traceorder",g),z3.isGrouped(t[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",X),o("yanchor",O),o("valign"),eo.noneOrAll(a,i,["x","y"]);var V=o("title.text");if(V){o("title.side",D?"left":"top");var ee=eo.extendFlat({},l,{size:eo.bigFont(l.size)});eo.coerceFont(o,"title.font",ee)}}}}RA.exports=function(r,t,n){var a,i=n.slice(),o=t.shapes;if(o)for(a=0;a{"use strict";var j0=dt(),I3=pr(),fW=I3.pushUnique,F3=!0;zA.exports=function(r,t,n){var a=t._fullLayout;if(t._dragged||t._editing)return;var i=a.legend.itemclick,o=a.legend.itemdoubleclick,l=a.legend.groupclick;n===1&&i==="toggle"&&o==="toggleothers"&&F3&&t.data&&t._context.showTips&&I3.notifier(I3._(t,"Double-click on legend to isolate one trace"),"long"),F3=!1;var s;if(n===1?s=i:n===2&&(s=o),!s)return;var u=l==="togglegroup",f=a.hiddenlabels?a.hiddenlabels.slice():[],v=r.data()[0][0];if(v.groupTitle&&v.noClick)return;var h=t._fullData,d=(a.shapes||[]).filter(function(ar){return ar.showlegend}),m=h.concat(d),g=v.trace;g._isShape&&(g=g._fullInput);var y=g.legendgroup,x,T,_,b,A,S,M={},D=[],z=[],F=[];function H(ar,lr){var ir=D.indexOf(ar),rr=M.visible;return rr||(rr=M.visible=[]),D.indexOf(ar)===-1&&(D.push(ar),ir=D.length-1),rr[ir]=lr,ir}var Y=(a.shapes||[]).map(function(ar){return ar._input}),O=!1;function X(ar,lr){Y[ar].visible=lr,O=!0}function V(ar,lr){if(!(v.groupTitle&&!u)){var ir=ar._fullInput||ar,rr=ir._isShape,Cr=ir.index;Cr===void 0&&(Cr=ir._index);var yr=ir.visible===!1?!1:lr;rr?X(Cr,yr):H(Cr,yr)}}var ee=g.legend,te=g._fullInput,K=te&&te._isShape;if(!K&&j0.traceIs(g,"pie-like")){var re=v.label,fe=f.indexOf(re);if(s==="toggle")fe===-1?f.push(re):f.splice(fe,1);else if(s==="toggleothers"){var de=fe!==-1,qe=[];for(x=0;x{"use strict";FA.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var BA=ne((Vue,HA)=>{"use strict";var IA=dt(),B3=Ep();HA.exports=function(r,t,n){var a=t._inHover,i=B3.isGrouped(t),o=B3.isReversed(t),l={},s=[],u=!1,f={},v=0,h=0,d,m;function g(te,K,re){if(t.visible!==!1&&!(n&&te!==t._id))if(K===""||!B3.isGrouped(t)){var fe="~~i"+v;s.push(fe),l[fe]=[re],v++}else s.indexOf(K)===-1?(s.push(K),u=!0,l[K]=[re]):l[K].push(re)}for(d=0;dF&&(z=F)}M[d][0]._groupMinRank=z,M[d][0]._preGroupSort=d}var H=function(te,K){return te[0]._groupMinRank-K[0]._groupMinRank||te[0]._preGroupSort-K[0]._preGroupSort},Y=function(te,K){return te.trace.legendrank-K.trace.legendrank||te._preSort-K._preSort};for(M.forEach(function(te,K){te[0]._preGroupSort=K}),M.sort(H),d=0;d{"use strict";var Pp=pr();function OA(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}yc.formatPiePercent=function(r,t){var n=OA((r*100).toPrecision(3));return Pp.numSeparate(n,t)+"%"};yc.formatPieValue=function(r,t){var n=OA(r.toPrecision(10));return Pp.numSeparate(n,t)};yc.getFirstFilled=function(r,t){if(Pp.isArrayOrTypedArray(r))for(var n=0;n{"use strict";var cW=ln(),vW=zt();UA.exports=function(r,t,n,a){var i=n.marker.pattern;i&&i.shape?cW.pointStyle(r,n,a,t):vW.fill(r,t.color)}});var ZA=ne((Xue,WA)=>{"use strict";var GA=zt(),VA=O3().castOption,hW=YA();WA.exports=function(r,t,n,a){var i=n.marker.line,o=VA(i.color,t.pts)||GA.defaultLine,l=VA(i.width,t.pts)||0;r.call(hW,t,n,a).style("stroke-width",l).call(GA.stroke,o)}});var V3=ne((jue,QA)=>{"use strict";var ri=kt(),U3=dt(),Oa=pr(),XA=Oa.strTranslate,vi=ln(),ko=zt(),Y3=es().extractOpts,Rp=Qa(),dW=ZA(),pW=O3().castOption,gW=H3(),jA=12,JA=5,bc=2,mW=10,J0=5;QA.exports=function(r,t,n){var a=t._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,l=(o+gW.itemGap*2)/2,s=XA(l,0),u=function(M,D,z,F){var H;if(M+1)H=M;else if(D&&D.width>0)H=D.width;else return 0;return i?F:Math.min(H,z)};r.each(function(M){var D=ri.select(this),z=Oa.ensureSingle(D,"g","layers");z.style("opacity",M[0].trace.opacity);var F=n.indentation,H=n.valign,Y=M[0].lineHeight,O=M[0].height;if(H==="middle"&&F===0||!Y||!O)z.attr("transform",null);else{var X={top:1,bottom:-1}[H],V=X*(.5*(Y-O+3))||0,ee=n.indentation;z.attr("transform",XA(ee,V))}var te=z.selectAll("g.legendfill").data([M]);te.enter().append("g").classed("legendfill",!0);var K=z.selectAll("g.legendlines").data([M]);K.enter().append("g").classed("legendlines",!0);var re=z.selectAll("g.legendsymbols").data([M]);re.enter().append("g").classed("legendsymbols",!0),re.selectAll("g.legendpoints").data([M]).enter().append("g").classed("legendpoints",!0)}).each(S).each(h).each(m).each(d).each(y).each(b).each(_).each(f).each(v).each(x).each(T);function f(M){var D=$A(M),z=D.showFill,F=D.showLine,H=D.showGradientLine,Y=D.showGradientFill,O=D.anyFill,X=D.anyLine,V=M[0],ee=V.trace,te,K,re=Y3(ee),fe=re.colorscale,de=re.reversescale,qe=function(be){if(be.size())if(z)vi.fillGroupStyle(be,t,!0);else{var Te="legendfill-"+ee.uid;vi.gradient(be,t,Te,G3(de),fe,"fill")}},Be=function(be){if(be.size()){var Te="legendline-"+ee.uid;vi.lineGroupStyle(be),vi.gradient(be,t,Te,G3(de),fe,"stroke")}},Ne=Rp.hasMarkers(ee)||!O?"M5,0":X?"M5,-2":"M5,-3",Ie=ri.select(this),Se=Ie.select(".legendfill").selectAll("path").data(z||Y?[M]:[]);if(Se.enter().append("path").classed("js-fill",!0),Se.exit().remove(),Se.attr("d",Ne+"h"+o+"v6h-"+o+"z").call(qe),F||H){var Xe=u(void 0,ee.line,mW,JA);K=Oa.minExtend(ee,{line:{width:Xe}}),te=[Oa.minExtend(V,{trace:K})]}var se=Ie.select(".legendlines").selectAll("path").data(F||H?[te]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",Ne+(H?"l"+o+",0.0001":"h"+o)).call(F?vi.lineGroupStyle:Be)}function v(M){var D=$A(M),z=D.anyFill,F=D.anyLine,H=D.showLine,Y=D.showMarker,O=M[0],X=O.trace,V=!Y&&!F&&!z&&Rp.hasText(X),ee,te;function K(Se,Xe,se,be){var Te=Oa.nestedProperty(X,Se).get(),pe=Oa.isArrayOrTypedArray(Te)&&Xe?Xe(Te):Te;if(i&&pe&&be!==void 0&&(pe=be),se){if(pese[1])return se[1]}return pe}function re(Se){return O._distinct&&O.index&&Se[O.index]?Se[O.index]:Se[0]}if(Y||V||H){var fe={},de={};if(Y){fe.mc=K("marker.color",re),fe.mx=K("marker.symbol",re),fe.mo=K("marker.opacity",Oa.mean,[.2,1]),fe.mlc=K("marker.line.color",re),fe.mlw=K("marker.line.width",Oa.mean,[0,5],bc),de.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var qe=K("marker.size",Oa.mean,[2,16],jA);fe.ms=qe,de.marker.size=qe}H&&(de.line={width:K("line.width",re,[0,10],JA)}),V&&(fe.tx="Aa",fe.tp=K("textposition",re),fe.ts=10,fe.tc=K("textfont.color",re),fe.tf=K("textfont.family",re),fe.tw=K("textfont.weight",re),fe.ty=K("textfont.style",re),fe.tv=K("textfont.variant",re),fe.tC=K("textfont.textcase",re),fe.tE=K("textfont.lineposition",re),fe.tS=K("textfont.shadow",re)),ee=[Oa.minExtend(O,fe)],te=Oa.minExtend(X,de),te.selectedpoints=null,te.texttemplate=null}var Be=ri.select(this).select("g.legendpoints"),Ne=Be.selectAll("path.scatterpts").data(Y?ee:[]);Ne.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),Ne.exit().remove(),Ne.call(vi.pointStyle,te,t),Y&&(ee[0].mrc=3);var Ie=Be.selectAll("g.pointtext").data(V?ee:[]);Ie.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),Ie.exit().remove(),Ie.selectAll("text").call(vi.textPointStyle,te,t)}function h(M){var D=M[0].trace,z=D.type==="waterfall";if(M[0]._distinct&&z){var F=M[0].trace[M[0].dir].marker;return M[0].mc=F.color,M[0].mlw=F.line.width,M[0].mlc=F.line.color,g(M,this,"waterfall")}var H=[];D.visible&&z&&(H=M[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 Y=ri.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(H);Y.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(O){var X=ri.select(this),V=D[O[0]].marker,ee=u(void 0,V.line,J0,bc);X.attr("d",O[1]).style("stroke-width",ee+"px").call(ko.fill,V.color),ee&&X.call(ko.stroke,V.line.color)})}function d(M){g(M,this)}function m(M){g(M,this,"funnel")}function g(M,D,z){var F=M[0].trace,H=F.marker||{},Y=H.line||{},O=H.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",X=z?F.visible&&F.type===z:U3.traceIs(F,"bar"),V=ri.select(D).select("g.legendpoints").selectAll("path.legend"+z).data(X?[M]:[]);V.enter().append("path").classed("legend"+z,!0).attr("d",O).attr("transform",s),V.exit().remove(),V.each(function(ee){var te=ri.select(this),K=ee[0],re=u(K.mlw,H.line,J0,bc);te.style("stroke-width",re+"px");var fe=K.mcc;if(!n._inHover&&"mc"in K){var de=Y3(H),qe=de.mid;qe===void 0&&(qe=(de.max+de.min)/2),fe=vi.tryColorscale(H,"")(qe)}var Be=fe||K.mc||H.color,Ne=H.pattern,Ie=Ne&&vi.getPatternAttr(Ne.shape,0,"");if(Ie){var Se=vi.getPatternAttr(Ne.bgcolor,0,null),Xe=vi.getPatternAttr(Ne.fgcolor,0,null),se=Ne.fgopacity,be=KA(Ne.size,8,10),Te=KA(Ne.solidity,.5,1),pe="legend-"+F.uid;te.call(vi.pattern,"legend",t,pe,Ie,be,Te,fe,Ne.fillmode,Se,Xe,se)}else te.call(ko.fill,Be);re&&ko.stroke(te,K.mlc||Y.color)})}function y(M){var D=M[0].trace,z=ri.select(this).select("g.legendpoints").selectAll("path.legendbox").data(D.visible&&U3.traceIs(D,"box-violin")?[M]:[]);z.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),z.exit().remove(),z.each(function(){var F=ri.select(this);if((D.boxpoints==="all"||D.points==="all")&&ko.opacity(D.fillcolor)===0&&ko.opacity((D.line||{}).color)===0){var H=Oa.minExtend(D,{marker:{size:i?jA:Oa.constrain(D.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});z.call(vi.pointStyle,H,t)}else{var Y=u(void 0,D.line,J0,bc);F.style("stroke-width",Y+"px").call(ko.fill,D.fillcolor),Y&&ko.stroke(F,D.line.color)}})}function x(M){var D=M[0].trace,z=ri.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(D.visible&&D.type==="candlestick"?[M,M]:[]);z.enter().append("path").classed("legendcandle",!0).attr("d",function(F,H){return H?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(F,H){var Y=ri.select(this),O=D[H?"increasing":"decreasing"],X=u(void 0,O.line,J0,bc);Y.style("stroke-width",X+"px").call(ko.fill,O.fillcolor),X&&ko.stroke(Y,O.line.color)})}function T(M){var D=M[0].trace,z=ri.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(D.visible&&D.type==="ohlc"?[M,M]:[]);z.enter().append("path").classed("legendohlc",!0).attr("d",function(F,H){return H?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(F,H){var Y=ri.select(this),O=D[H?"increasing":"decreasing"],X=u(void 0,O.line,J0,bc);Y.style("fill","none").call(vi.dashLine,O.line.dash,X),X&&ko.stroke(Y,O.line.color)})}function _(M){A(M,this,"pie")}function b(M){A(M,this,"funnelarea")}function A(M,D,z){var F=M[0],H=F.trace,Y=z?H.visible&&H.type===z:U3.traceIs(H,z),O=ri.select(D).select("g.legendpoints").selectAll("path.legend"+z).data(Y?[M]:[]);if(O.enter().append("path").classed("legend"+z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),O.exit().remove(),O.size()){var X=H.marker||{},V=u(pW(X.line.width,F.pts),X.line,J0,bc),ee="pieLike",te=Oa.minExtend(H,{marker:{line:{width:V}}},ee),K=Oa.minExtend(F,{trace:te},ee);dW(O,K,te,t)}}function S(M){var D=M[0].trace,z,F=[];if(D.visible)switch(D.type){case"histogram2d":case"heatmap":F=[["M-15,-2V4H15V-2Z"]],z=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":F=[["M-6,-6V6H6V-6Z"]],z=!0;break;case"densitymapbox":case"densitymap":F=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],z="radial";break;case"cone":F=[["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"]],z=!1;break;case"streamtube":F=[["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"]],z=!1;break;case"surface":F=[["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"]],z=!0;break;case"mesh3d":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!1;break;case"volume":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!0;break;case"isosurface":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],z=!1;break}var H=ri.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(F);H.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),H.exit().remove(),H.each(function(Y,O){var X=ri.select(this),V=Y3(D),ee=V.colorscale,te=V.reversescale,K=function(qe){if(qe.size()){var Be="legendfill-"+D.uid;vi.gradient(qe,t,Be,G3(te,z==="radial"),ee,"fill")}},re;if(ee){if(!z){var de=ee.length;re=O===0?ee[te?de-1:0][1]:O===1?ee[te?0:de-1][1]:ee[Math.floor((de-1)/2)][1]}}else{var fe=D.vertexcolor||D.facecolor||D.color;re=Oa.isArrayOrTypedArray(fe)?fe[O]||fe[0]:fe}X.attr("d",Y[0]),re?X.call(ko.fill,re):X.call(K)})}};function G3(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function $A(e){var r=e[0].trace,t=r.contours,n=Rp.hasLines(r),a=Rp.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",o=!1,l=!1;if(t){var s=t.coloring;s==="lines"?o=!0:n=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:n||o,anyFill:i||l}}function KA(e,r,t){return e&&Oa.isArrayOrTypedArray(e)?r:e>t?t:e}});var j3=ne((Jue,uT)=>{"use strict";var Ri=kt(),ra=pr(),Z3=ua(),Q0=dt(),eT=v1(),W3=To(),ta=ln(),Np=zt(),_c=ci(),rT=NA(),fa=H3(),X3=Ka(),lT=X3.LINE_SPACING,K0=X3.FROM_TL,tT=X3.FROM_BR,nT=BA(),yW=V3(),aT=Ep(),$0=1,bW=/^legend[0-9]*$/;uT.exports=function(r,t){if(t)iT(r,t);else{var n=r._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Ri.select(this),f=u.attr("class"),v=f.split(" ")[0];v.match(bW)&&a.indexOf(v)===-1&&u.remove()});for(var o=0;o1)}var m=n.hiddenlabels||[];if(!l&&(!n.showlegend||!s.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),Z3.autoMargin(e,a);var g=ra.ensureSingle(o,"g",a,function(D){l||D.attr("pointer-events","all")}),y=ra.ensureSingleById(n._topdefs,"clipPath",i,function(D){D.append("rect")}),x=ra.ensureSingle(g,"rect","bg",function(D){D.attr("shape-rendering","crispEdges")});x.call(Np.stroke,t.bordercolor).call(Np.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var T=ra.ensureSingle(g,"g","scrollbox"),_=t.title;t._titleWidth=0,t._titleHeight=0;var b;_.text?(b=ra.ensureSingle(T,"text",a+"titletext"),b.attr("text-anchor","start").call(ta.font,_.font).text(_.text),Fp(b,T,e,t,$0)):T.selectAll("."+a+"titletext").remove();var A=ra.ensureSingle(g,"rect","scrollbar",function(D){D.attr(fa.scrollBarEnterAttrs).call(Np.fill,fa.scrollBarColor)}),S=T.selectAll("g.groups").data(s);S.enter().append("g").attr("class","groups"),S.exit().remove();var M=S.selectAll("g.traces").data(ra.identity);M.enter().append("g").attr("class","traces"),M.exit().remove(),M.style("opacity",function(D){var z=D[0].trace;return Q0.traceIs(z,"pie-like")?m.indexOf(D[0].label)!==-1?.5:1:z.visible==="legendonly"?.5:1}).each(function(){Ri.select(this).call(xW,e,t)}).call(yW,e,t).each(function(){l||Ri.select(this).call(wW,e,a)}),ra.syncOrAsync([Z3.previousPromises,function(){return TW(e,S,M,t)},function(){var D=n._size,z=t.borderwidth,F=t.xref==="paper",H=t.yref==="paper";if(_.text&&_W(b,t,z),!l){var Y,O;F?Y=D.l+D.w*t.x-K0[Ip(t)]*t._width:Y=n.width*t.x-K0[Ip(t)]*t._width,H?O=D.t+D.h*(1-t.y)-K0[Hp(t)]*t._effHeight:O=n.height*(1-t.y)-K0[Hp(t)]*t._effHeight;var X=kW(e,a,Y,O);if(X)return;if(n.margin.autoexpand){var V=Y,ee=O;Y=F?ra.constrain(Y,0,n.width-t._width):V,O=H?ra.constrain(O,0,n.height-t._effHeight):ee,Y!==V&&ra.log("Constrain "+a+".x to make legend fit inside graph"),O!==ee&&ra.log("Constrain "+a+".y to make legend fit inside graph")}ta.setTranslate(g,Y,O)}if(A.on(".drag",null),g.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var te=t._effHeight;l&&(te=t._height),x.attr({width:t._width-z,height:te-z,x:z/2,y:z/2}),ta.setTranslate(T,0,0),y.select("rect").attr({width:t._width-2*z,height:te-2*z,x:z,y:z}),ta.setClipUrl(T,i,e),ta.setRect(A,0,0,0,0),delete t._scrollY}else{var K=Math.max(fa.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),re=t._effHeight-K-2*fa.scrollBarMargin,fe=t._height-t._effHeight,de=re/fe,qe=Math.min(t._scrollY||0,fe);x.attr({width:t._width-2*z+fa.scrollBarWidth+fa.scrollBarMargin,height:t._effHeight-z,x:z/2,y:z/2}),y.select("rect").attr({width:t._width-2*z+fa.scrollBarWidth+fa.scrollBarMargin,height:t._effHeight-2*z,x:z,y:z+qe}),ta.setClipUrl(T,i,e),Te(qe,K,de),g.on("wheel",function(){qe=ra.constrain(t._scrollY+Ri.event.deltaY/re*fe,0,fe),Te(qe,K,de),qe!==0&&qe!==fe&&Ri.event.preventDefault()});var Be,Ne,Ie,Se=function(Me,Fe,Oe){var fr=(Oe-Fe)/de+Me;return ra.constrain(fr,0,fe)},Xe=function(Me,Fe,Oe){var fr=(Fe-Oe)/de+Me;return ra.constrain(fr,0,fe)},se=Ri.behavior.drag().on("dragstart",function(){var Me=Ri.event.sourceEvent;Me.type==="touchstart"?Be=Me.changedTouches[0].clientY:Be=Me.clientY,Ie=qe}).on("drag",function(){var Me=Ri.event.sourceEvent;Me.buttons===2||Me.ctrlKey||(Me.type==="touchmove"?Ne=Me.changedTouches[0].clientY:Ne=Me.clientY,qe=Se(Ie,Be,Ne),Te(qe,K,de))});A.call(se);var be=Ri.behavior.drag().on("dragstart",function(){var Me=Ri.event.sourceEvent;Me.type==="touchstart"&&(Be=Me.changedTouches[0].clientY,Ie=qe)}).on("drag",function(){var Me=Ri.event.sourceEvent;Me.type==="touchmove"&&(Ne=Me.changedTouches[0].clientY,qe=Xe(Ie,Be,Ne),Te(qe,K,de))});T.call(be)}function Te(Me,Fe,Oe){t._scrollY=e._fullLayout[a]._scrollY=Me,ta.setTranslate(T,0,-Me),ta.setRect(A,t._width,fa.scrollBarMargin+Me*Oe,fa.scrollBarWidth,Fe),y.select("rect").attr("y",z+Me)}if(e._context.edits.legendPosition){var pe,W,Q,$;g.classed("cursor-move",!0),W3.init({element:g.node(),gd:e,prepFn:function(Me){if(Me.target!==A.node()){var Fe=ta.getTranslate(g);Q=Fe.x,$=Fe.y}},moveFn:function(Me,Fe){if(Q!==void 0&&$!==void 0){var Oe=Q+Me,fr=$+Fe;ta.setTranslate(g,Oe,fr),pe=W3.align(Oe,t._width,D.l,D.l+D.w,t.xanchor),W=W3.align(fr+t._height,-t._height,D.t+D.h,D.t,t.yanchor)}},doneFn:function(){if(pe!==void 0&&W!==void 0){var Me={};Me[a+".x"]=pe,Me[a+".y"]=W,Q0.call("_guiRelayout",e,Me)}},clickFn:function(Me,Fe){var Oe=o.selectAll("g.traces").filter(function(){var fr=this.getBoundingClientRect();return Fe.clientX>=fr.left&&Fe.clientX<=fr.right&&Fe.clientY>=fr.top&&Fe.clientY<=fr.bottom});Oe.size()>0&&sT(e,g,Oe,Me,Fe)}})}}],e)}}function zp(e,r,t){var n=e[0],a=n.width,i=r.entrywidthmode,o=n.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*o:t+(o||a)}function sT(e,r,t,n,a){var i=t.data()[0][0].trace,o={event:a,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(o.group=i._group),Q0.traceIs(i,"pie-like")&&(o.label=t.datum()[0].label);var l=eT.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&rT(t,e,n)},e._context.doubleClickDelay)}else if(n===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=eT.triggerHandler(e,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&rT(t,e,n)}}function xW(e,r,t){var n=Bp(t),a=e.data()[0][0],i=a.trace,o=Q0.traceIs(i,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!o,s=t._maxNameLength,u,f;a.groupTitle?(u=a.groupTitle.text,f=a.groupTitle.font):(f=t.font,t.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=ra.templateString(u,i._meta))));var v=ra.ensureSingle(e,"text",n+"text");v.attr("text-anchor","start").call(ta.font,f).text(l?oT(u,s):u);var h=t.indentation+t.itemwidth+fa.itemGap*2;_c.positionText(v,h,0),l?v.call(_c.makeEditable,{gd:r,text:u}).call(Fp,e,r,t).on("edit",function(d){this.text(oT(d,s)).call(Fp,e,r,t);var m=a.trace._fullInput||{},g={};return g.name=d,m._isShape?Q0.call("_guiRelayout",r,"shapes["+i.index+"].name",g.name):Q0.call("_guiRestyle",r,g,i.index)}):Fp(v,e,r,t)}function oT(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var n=t-e.length;n>0;n--)e+=" ";return e}function wW(e,r,t){var n=r._context.doubleClickDelay,a,i=1,o=ra.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(Np.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-r._legendMouseDownTimen&&(i=Math.max(i-1,1)),sT(r,l,e,i,Ri.event)}}))}function Fp(e,r,t,n,a){n._inHover&&e.attr("data-notex",!0),_c.convertToTspans(e,t,function(){MW(r,t,n,a)})}function MW(e,r,t,n){var a=e.data()[0][0];if(!t._inHover&&a&&!a.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),o=i.node(),l=Bp(t);t||(t=r._fullLayout[l]);var s=t.borderwidth,u;n===$0?u=t.title.font:a.groupTitle?u=a.groupTitle.font:u=t.font;var f=u.size*lT,v,h;if(o){var d=ta.bBox(o);v=d.height,h=d.width,n===$0?ta.setTranslate(i,s,s+v*.75):ta.setTranslate(i,0,v*.25)}else{var m="."+l+(n===$0?"title":"")+"text",g=e.select(m),y=_c.lineCount(g),x=g.node();if(v=f*y,h=x?ta.bBox(x).width:0,n===$0)t.title.side==="left"&&(h+=fa.itemGap*2),_c.positionText(g,s+fa.titlePad,s+f);else{var T=fa.itemGap*2+t.indentation+t.itemwidth;a.groupTitle&&(T=fa.itemGap,h-=t.indentation+t.itemwidth),_c.positionText(g,T,-f*((y-1)/2-.3))}}n===$0?(t._titleWidth=h,t._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=h)}function AW(e){var r=0,t=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(r=e._titleWidth),n.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function TW(e,r,t,n){var a=e._fullLayout,i=Bp(n);n||(n=a[i]);var o=a._size,l=aT.isVertical(n),s=aT.isGrouped(n),u=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,h=fa.itemGap,d=n.indentation+n.itemwidth+h*2,m=2*(f+h),g=Hp(n),y=n.y<0||n.y===0&&g==="top",x=n.y>1||n.y===1&&g==="bottom",T=n.tracegroupgap,_={};n._maxHeight=Math.max(y||x?a.height/2:o.h,30);var b=0;n._width=0,n._height=0;var A=AW(n);if(l)t.each(function(Ie){var Se=Ie[0].height;ta.setTranslate(this,f+A[0],f+A[1]+n._height+Se/2+h),n._height+=Se,n._width=Math.max(n._width,Ie[0].width)}),b=d+n._width,n._width+=h+d+v,n._height+=m,s&&(r.each(function(Ie,Se){ta.setTranslate(this,0,Se*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var S=Ip(n),M=n.x<0||n.x===0&&S==="right",D=n.x>1||n.x===1&&S==="left",z=x||y,F=a.width/2;n._maxWidth=Math.max(M?z&&S==="left"?o.l+o.w:F:D?z&&S==="right"?o.r+o.w:F:o.w,2*d);var H=0,Y=0;t.each(function(Ie){var Se=zp(Ie,n,d);H=Math.max(H,Se),Y+=Se}),b=null;var O=0;if(s){var X=0,V=0,ee=0;r.each(function(){var Ie=0,Se=0;Ri.select(this).selectAll("g.traces").each(function(se){var be=zp(se,n,d),Te=se[0].height;ta.setTranslate(this,A[0],A[1]+f+h+Te/2+Se),Se+=Te,Ie=Math.max(Ie,be),_[se[0].trace.legendgroup]=Ie});var Xe=Ie+h;V>0&&Xe+f+V>n._maxWidth?(O=Math.max(O,V),V=0,ee+=X+T,X=Se):X=Math.max(X,Se),ta.setTranslate(this,V,ee),V+=Xe}),n._width=Math.max(O,V)+f,n._height=ee+X+m}else{var te=t.size(),K=Y+v+(te-1)*h=n._maxWidth&&(O=Math.max(O,qe),fe=0,de+=re,n._height+=re,re=0),ta.setTranslate(this,A[0]+f+fe,A[1]+f+de+Se/2+h),qe=fe+Xe+h,fe+=se,re=Math.max(re,Se)}),K?(n._width=fe+v,n._height=re+m):(n._width=Math.max(O,qe)+v,n._height+=re+m)}}n._width=Math.ceil(Math.max(n._width+A[0],n._titleWidth+2*(f+fa.titlePad))),n._height=Math.ceil(Math.max(n._height+A[1],n._titleHeight+2*(f+fa.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Be=e._context.edits,Ne=Be.legendText||Be.legendPosition;t.each(function(Ie){var Se=Ri.select(this).select("."+i+"toggle"),Xe=Ie[0].height,se=Ie[0].trace.legendgroup,be=zp(Ie,n,d);s&&se!==""&&(be=_[se]);var Te=Ne?d:b||be;!l&&!u&&(Te+=h/2),ta.setRect(Se,0,-Xe/2,Te,Xe)})}function kW(e,r,t,n){var a=e._fullLayout,i=a[r],o=Ip(i),l=Hp(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",v=i.x<.5?"l":"r",h={r:a.width-t,l:t+i._width,b:a.height-n,t:n+i._effHeight};if(s&&u)return Z3.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*K0[o],r:i._width*tT[o],b:i._effHeight*tT[l],t:i._effHeight*K0[l]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][v]=h[v]:e._fullLayout._reservedMargin[r][f]=h[f]}function Ip(e){return ra.isRightAnchor(e)?"right":ra.isCenterAnchor(e)?"center":"left"}function Hp(e){return ra.isBottomAnchor(e)?"bottom":ra.isMiddleAnchor(e)?"middle":"top"}function Bp(e){return e._id||"legend"}});var Q3=ne(K3=>{"use strict";var xc=kt(),Qs=Bt(),fT=Jl(),On=pr(),SW=On.pushUnique,J3=On.strTranslate,CW=On.strRotate,LW=v1(),So=ci(),qW=EA(),os=ln(),_a=zt(),Op=To(),ls=Cn(),DW=Pa().zindexSeparator,rv=dt(),yl=Vu(),wc=t1(),EW=N3(),PW=j3(),yT=wc.YANGLE,$3=Math.PI*yT/180,RW=1/Math.sin($3),zW=Math.cos($3),NW=Math.sin($3),Ln=wc.HOVERARROWSIZE,Nt=wc.HOVERTEXTPAD,cT={box:!0,ohlc:!0,violin:!0,candlestick:!0},FW={scatter:!0,scattergl:!0,splom:!0};function vT(e,r){return e.distance-r.distance}K3.hover=function(r,t,n,a){r=On.getGraphDiv(r);var i=t.target;On.throttle(r._fullLayout._uid+wc.HOVERID,wc.HOVERMINTIME,function(){IW(r,t,n,a,i)})};K3.loneHover=function(r,t){var n=!0;Array.isArray(r)||(n=!1,r=[r]);var a=t.gd,i=MT(a),o=AT(a),l=r.map(function(y){var x=y._x0||y.x0||y.x||0,T=y._x1||y.x1||y.x||0,_=y._y0||y.y0||y.y||0,b=y._y1||y.y1||y.y||0,A=y.eventData;if(A){var S=Math.min(x,T),M=Math.max(x,T),D=Math.min(_,b),z=Math.max(_,b),F=y.trace;if(rv.traceIs(F,"gl3d")){var H=a._fullLayout[F.scene]._scene.container,Y=H.offsetLeft,O=H.offsetTop;S+=Y,M+=Y,D+=O,z+=O}A.bbox={x0:S+o,x1:M+o,y0:D+i,y1:z+i},t.inOut_bbox&&t.inOut_bbox.push(A.bbox)}else A=!1;return{color:y.color||_a.defaultLine,x0:y.x0||y.x||0,x1:y.x1||y.x||0,y0:y.y0||y.y||0,y1:y.y1||y.y||0,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:y.text,name:y.name,idealAlign:y.idealAlign,borderColor:y.borderColor,fontFamily:y.fontFamily,fontSize:y.fontSize,fontColor:y.fontColor,fontWeight:y.fontWeight,fontStyle:y.fontStyle,fontVariant:y.fontVariant,nameLength:y.nameLength,textAlign:y.textAlign,trace:y.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:y.hovertemplate||!1,hovertemplateLabels:y.hovertemplateLabels||!1,eventData:A}}),s=!1,u=_T(l,{gd:a,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||_a.background,container:xc.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,v=5,h=0,d=0;f.sort(function(y,x){return y.y0-x.y0}).each(function(y,x){var T=y.y0-y.by/2;T-vM[0]._length||$<0||$>D[0]._length)return Op.unhoverRaw(e,r)}if(r.pointerX=Q+M[0]._offset,r.pointerY=$+D[0]._offset,"xval"in r?ee=yl.flat(i,r.xval):ee=yl.p2c(M,Q),"yval"in r?te=yl.flat(i,r.yval):te=yl.p2c(D,$),!Qs(ee[0])||!Qs(te[0]))return On.warn("Fx.hover failed",r,e),Op.unhoverRaw(e,r)}var Oe=1/0;function fr(rt,Qt){for(re=0;rese&&(X.splice(0,se),Oe=X[0].distance),v&&O!==0&&X.length===0){Xe.distance=O,Xe.index=!1;var un=de._module.hoverPoints(Xe,Ie,Se,"closest",{hoverLayer:l._hoverlayer});if(un&&(un=un.filter(function(It){return It.spikeDistance<=O})),un&&un.length){var ha,Sn=un.filter(function(It){return It.xa.showspikes&&It.xa.spikesnap!=="hovered data"});if(Sn.length){var Na=Sn[0];Qs(Na.x0)&&Qs(Na.y0)&&(ha=Ze(Na),(!be.vLinePoint||be.vLinePoint.spikeDistance>ha.spikeDistance)&&(be.vLinePoint=ha))}var da=un.filter(function(It){return It.ya.showspikes&&It.ya.spikesnap!=="hovered data"});if(da.length){var wn=da[0];Qs(wn.x0)&&Qs(wn.y0)&&(ha=Ze(wn),(!be.hLinePoint||be.hLinePoint.spikeDistance>ha.spikeDistance)&&(be.hLinePoint=ha))}}}}}fr();function nr(rt,Qt,Ct){for(var dn=null,pn=1/0,tn,un=0;un0&&Math.abs(rt.distance)Ke-1;Ur--)Pr(X[Ur]);X=gr,rr()}var sr=e._hoverdata,_e=[],ke=MT(e),$e=AT(e);for(K=0;K1||X.length>1)||h==="closest"&&Te&&X.length>1,cn=_a.combine(l.plot_bgcolor||_a.background,l.paper_bgcolor),sn=_T(X,{gd:e,hovermode:h,rotateLabels:Xt,bgColor:cn,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),Kt=sn.hoverLabels;if(yl.isUnifiedHover(h)||(BW(Kt,Xt,l,sn.commonLabelBoundingBox),wT(Kt,Xt,l._invScaleX,l._invScaleY)),a&&a.tagName){var aa=rv.getComponentMethod("annotations","hasClickToShow")(e,_e);qW(xc.select(a),aa?"pointer":"")}!a||n||!YW(e,r,sr)||(sr&&e.emit("plotly_unhover",{event:r,points:sr}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:M,yaxes:D,xvals:ee,yvals:te}))}function bT(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 HW=/([\s\S]*)<\/extra>/;function _T(e,r){var t=r.gd,n=t._fullLayout,a=r.hovermode,i=r.rotateLabels,o=r.bgColor,l=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||wc.HOVERFONT,v=r.fontSize||wc.HOVERFONTSIZE,h=r.fontWeight||n.font.weight,d=r.fontStyle||n.font.style,m=r.fontVariant||n.font.variant,g=r.fontTextcase||n.font.textcase,y=r.fontLineposition||n.font.lineposition,x=r.fontShadow||n.font.shadow,T=e[0],_=T.xa,b=T.ya,A=a.charAt(0),S=A+"Label",M=T[S];if(M===void 0&&_.type==="multicategory")for(var D=0;Dn.width-sr&&(_e=n.width-sr),zr.attr("d","M"+(Tr-_e)+",0L"+(Tr-_e+Ln)+","+Ur+Ln+"H"+sr+"v"+Ur+(Nt*2+dr.height)+"H"+-sr+"V"+Ur+Ln+"H"+(Tr-_e-Ln)+"Z"),Tr=_e,re.minX=Tr-sr,re.maxX=Tr+sr,_.side==="top"?(re.minY=Pr-(Nt*2+dr.height),re.maxY=Pr-Nt):(re.minY=Pr+Nt,re.maxY=Pr+(Nt*2+dr.height))}else{var ke,$e,We;b.side==="right"?(ke="start",$e=1,We="",Tr=_._offset+_._length):(ke="end",$e=-1,We="-",Tr=_._offset),Pr=b._offset+(T.y0+T.y1)/2,kr.attr("text-anchor",ke),zr.attr("d","M0,0L"+We+Ln+","+Ln+"V"+(Nt+dr.height/2)+"h"+We+(Nt*2+dr.width)+"V-"+(Nt+dr.height/2)+"H"+We+Ln+"V-"+Ln+"Z"),re.minY=Pr-(Nt+dr.height/2),re.maxY=Pr+(Nt+dr.height/2),b.side==="right"?(re.minX=Tr+Ln,re.maxX=Tr+Ln+(Nt*2+dr.width)):(re.minX=Tr-Ln-(Nt*2+dr.width),re.maxX=Tr-Ln);var qr=dr.height/2,Vr=F-dr.top-qr,Hr="clip"+n._uid+"commonlabel"+b._id,lt;if(Tr=0?yr=lr:ir+$=0?yr=ir:rr+$=0?Ae=Ze:ar+Me=0?Ae=ar:Cr+Me=0,(je.idealAlign==="top"||!St)&&hn?(We-=Vr/2,je.anchor="end"):St?(We+=Vr/2,je.anchor="start"):je.anchor="middle",je.crossPos=We;else{if(je.pos=We,St=$e+qr/2+Rt<=H,hn=$e-qr/2-Rt>=0,(je.idealAlign==="left"||!St)&&hn)$e-=qr/2,je.anchor="end";else if(St)$e+=qr/2,je.anchor="start";else{je.anchor="middle";var Fn=Rt/2,$n=$e+Fn-H,Xt=$e-Fn;$n>0&&($e-=$n),Xt<0&&($e+=-Xt)}je.crossPos=$e}Pr.attr("text-anchor",je.anchor),sr&&Ur.attr("text-anchor",je.anchor),zr.attr("transform",J3($e,We)+(i?CW(yT):""))}),{hoverLabels:Ve,commonLabelBoundingBox:re}}function hT(e,r,t,n,a,i){var o="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=On.templateString(e.name,e.trace._meta)),o=gT(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===a?l=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),i&&l===""&&!e.hovertemplate&&(o===""&&i.remove(),l=o);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[s+"Label"]!==a&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),l=On.hovertemplateString(f,v,n._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(HW,function(h,d){return o=gT(d,e.nameLength),""})}return[l,o]}function BW(e,r,t,n){var a=r?"xa":"ya",i=r?"ya":"xa",o=0,l=1,s=e.size(),u=new Array(s),f=0,v=n.minX,h=n.maxX,d=n.minY,m=n.maxY,g=function(ee){return ee*t._invScaleX},y=function(ee){return ee*t._invScaleY};e.each(function(ee){var te=ee[a],K=ee[i],re=te._id.charAt(0)==="x",fe=te.range;f===0&&fe&&fe[0]>fe[1]!==re&&(l=-1);var de=0,qe=re?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var Be=xT(ee,r),Ne=ee.anchor,Ie=Ne==="end"?-1:1,Se,Xe;if(Ne==="middle")Se=ee.crossPos+(re?y(Be.y-ee.by/2):g(ee.bx/2+ee.tx2width/2)),Xe=Se+(re?y(ee.by):g(ee.bx));else if(re)Se=ee.crossPos+y(Ln+Be.y)-y(ee.by/2-Ln),Xe=Se+y(ee.by);else{var se=g(Ie*Ln+Be.x),be=se+g(Ie*ee.bx);Se=ee.crossPos+Math.min(se,be),Xe=ee.crossPos+Math.max(se,be)}re?d!==void 0&&m!==void 0&&Math.min(Xe,m)-Math.max(Se,d)>1&&(K.side==="left"?(de=K._mainLinePosition,qe=t.width):qe=K._mainLinePosition):v!==void 0&&h!==void 0&&Math.min(Xe,h)-Math.max(Se,v)>1&&(K.side==="top"?(de=K._mainLinePosition,qe=t.height):qe=K._mainLinePosition)}u[f++]=[{datum:ee,traceIndex:ee.trace.index,dp:0,pos:ee.pos,posref:ee.posref,size:ee.by*(re?RW:1)/2,pmin:de,pmax:qe}]}),u.sort(function(ee,te){return ee[0].posref-te[0].posref||l*(te[0].traceIndex-ee[0].traceIndex)});var x,T,_,b,A,S,M;function D(ee){var te=ee[0],K=ee[ee.length-1];if(T=te.pmin-te.pos-te.dp+te.size,_=K.pos+K.dp+K.size-te.pmax,T>.01){for(A=ee.length-1;A>=0;A--)ee[A].dp+=T;x=!1}if(!(_<.01)){if(T<-.01){for(A=ee.length-1;A>=0;A--)ee[A].dp-=_;x=!1}if(x){var re=0;for(b=0;bte.pmax&&re++;for(b=ee.length-1;b>=0&&!(re<=0);b--)S=ee[b],S.pos>te.pmax-1&&(S.del=!0,re--);for(b=0;b=0;A--)ee[A].dp-=_;for(b=ee.length-1;b>=0&&!(re<=0);b--)S=ee[b],S.pos+S.dp+S.size>te.pmax&&(S.del=!0,re--)}}}for(;!x&&o<=s;){for(o++,x=!0,b=0;b.01){for(A=F.length-1;A>=0;A--)F[A].dp+=T;for(z.push.apply(z,F),u.splice(b+1,1),M=0,A=z.length-1;A>=0;A--)M+=z[A].dp;for(_=M/z.length,A=z.length-1;A>=0;A--)z[A].dp-=_;x=!1}else b++}u.forEach(D)}for(b=u.length-1;b>=0;b--){var O=u[b];for(A=O.length-1;A>=0;A--){var X=O[A],V=X.datum;V.offset=X.dp,V.del=X.del}}}function xT(e,r){var t=0,n=e.offset;return r&&(n*=-NW,t=e.offset*zW),{x:t,y:n}}function OW(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Ln+Nt),n=t+r*(e.txwidth+Nt),a=e.anchor==="middle";return a&&(t-=e.tx2width/2,n+=e.txwidth/2+Nt),{alignShift:r,textShiftX:t,text2ShiftX:n}}function wT(e,r,t,n){var a=function(o){return o*t},i=function(o){return o*n};e.each(function(o){var l=xc.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),u=o.anchor,f=u==="end"?-1:1,v=OW(o),h=xT(o,r),d=h.x,m=h.y,g=u==="middle";l.select("path").attr("d",g?"M-"+a(o.bx/2+o.tx2width/2)+","+i(m-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":"M0,0L"+a(f*Ln+d)+","+i(Ln+m)+"v"+i(o.by/2-Ln)+"h"+a(f*o.bx)+"v-"+i(o.by)+"H"+a(f*Ln+d)+"V"+i(m-Ln)+"Z");var y=d+v.textShiftX,x=m+o.ty0-o.by/2+Nt,T=o.textAlign||"auto";T!=="auto"&&(T==="left"&&u!=="start"?(s.attr("text-anchor","start"),y=g?-o.bx/2-o.tx2width/2+Nt:-o.bx-Nt):T==="right"&&u!=="end"&&(s.attr("text-anchor","end"),y=g?o.bx/2-o.tx2width/2-Nt:o.bx+Nt)),s.call(So.positionText,a(y),i(x)),o.tx2width&&(l.select("text.name").call(So.positionText,a(v.text2ShiftX+v.alignShift*Nt+d),i(m+o.ty0-o.by/2+Nt)),l.select("rect").call(os.setRect,a(v.text2ShiftX+(v.alignShift-1)*o.tx2width/2+d),i(m-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function UW(e,r){var t=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[t]||{};function o(h){return h||Qs(h)&&h===0}var l=Array.isArray(t)?function(h,d){var m=On.castOption(a,t,h);return o(m)?m:On.extractOption({},n,"",d)}:function(h,d){return On.extractOption(i,n,h,d)};function s(h,d,m){var g=l(d,m);o(g)&&(e[h]=g)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=On.constrain(e.x0,0,e.xa._length),e.x1=On.constrain(e.x1,0,e.xa._length),e.y0=On.constrain(e.y0,0,e.ya._length),e.y1=On.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:ls.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:ls.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=ls.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+ls.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=ls.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+ls.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var v=e.hoverinfo||e.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(e.xLabel=void 0),v.indexOf("y")===-1&&(e.yLabel=void 0),v.indexOf("z")===-1&&(e.zLabel=void 0),v.indexOf("text")===-1&&(e.text=void 0),v.indexOf("name")===-1&&(e.name=void 0)),e}function dT(e,r,t){var n=t.container,a=t.fullLayout,i=a._size,o=t.event,l=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(n.selectAll(".spikeline").remove(),!!(s||l)){var v=_a.combine(a.plot_bgcolor,a.paper_bgcolor);if(l){var h=r.hLinePoint,d,m;u=h&&h.xa,f=h&&h.ya;var g=f.spikesnap;g==="cursor"?(d=o.pointerX,m=o.pointerY):(d=u._offset+h.x,m=f._offset+h.y);var y=fT.readability(h.color,v)<1.5?_a.contrast(v):h.color,x=f.spikemode,T=f.spikethickness,_=f.spikecolor||y,b=ls.getPxPosition(e,f),A,S;if(x.indexOf("toaxis")!==-1||x.indexOf("across")!==-1){if(x.indexOf("toaxis")!==-1&&(A=b,S=d),x.indexOf("across")!==-1){var M=f._counterDomainMin,D=f._counterDomainMax;f.anchor==="free"&&(M=Math.min(M,f.position),D=Math.max(D,f.position)),A=i.l+M*i.w,S=i.l+D*i.w}n.insert("line",":first-child").attr({x1:A,x2:S,y1:m,y2:m,"stroke-width":T,stroke:_,"stroke-dasharray":os.dashStyle(f.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:A,x2:S,y1:m,y2:m,"stroke-width":T+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}x.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:b+(f.side!=="right"?T:-T),cy:m,r:T,fill:_}).classed("spikeline",!0)}if(s){var z=r.vLinePoint,F,H;u=z&&z.xa,f=z&&z.ya;var Y=u.spikesnap;Y==="cursor"?(F=o.pointerX,H=o.pointerY):(F=u._offset+z.x,H=f._offset+z.y);var O=fT.readability(z.color,v)<1.5?_a.contrast(v):z.color,X=u.spikemode,V=u.spikethickness,ee=u.spikecolor||O,te=ls.getPxPosition(e,u),K,re;if(X.indexOf("toaxis")!==-1||X.indexOf("across")!==-1){if(X.indexOf("toaxis")!==-1&&(K=te,re=H),X.indexOf("across")!==-1){var fe=u._counterDomainMin,de=u._counterDomainMax;u.anchor==="free"&&(fe=Math.min(fe,u.position),de=Math.max(de,u.position)),K=i.t+(1-de)*i.h,re=i.t+(1-fe)*i.h}n.insert("line",":first-child").attr({x1:F,x2:F,y1:K,y2:re,"stroke-width":V,stroke:ee,"stroke-dasharray":os.dashStyle(u.spikedash,V)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:F,x2:F,y1:K,y2:re,"stroke-width":V+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}X.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:F,cy:te-(u.side!=="top"?V:-V),r:V,fill:ee}).classed("spikeline",!0)}}}function YW(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var n=t.length-1;n>=0;n--){var a=t[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function pT(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function gT(e,r){return So.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function GW(e,r){for(var t=r.charAt(0),n=[],a=[],i=[],o=0;o{"use strict";var VW=pr(),WW=zt(),ZW=Vu().isUnifiedHover;TT.exports=function(r,t,n,a){a=a||{};var i=t.legend;function o(l){a.font[l]||(a.font[l]=i?t.legend.font[l]:t.font[l])}t&&ZW(t.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=WW.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),VW.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var ST=ne((Que,kT)=>{"use strict";var XW=pr(),jW=Up(),JW=_0();kT.exports=function(r,t){function n(a,i){return XW.coerce(r,t,JW,a,i)}jW(r,t,n)}});var qT=ne((efe,LT)=>{"use strict";var CT=pr(),$W=ud(),KW=Up();LT.exports=function(r,t,n,a){function i(l,s){return CT.coerce(r,t,$W,l,s)}var o=CT.extendFlat({},a.hoverlabel);t.hovertemplate&&(o.namelength=-1),KW(r,t,i,o)}});var e5=ne((rfe,DT)=>{"use strict";var QW=pr(),eZ=_0();DT.exports=function(r,t){function n(a,i){return t[a]!==void 0?t[a]:QW.coerce(r,t,eZ,a,i)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var RT=ne((tfe,PT)=>{"use strict";var ET=pr(),rZ=_0(),tZ=e5(),nZ=Up();PT.exports=function(r,t){function n(f,v){return ET.coerce(r,t,rZ,f,v)}var a=tZ(r,t);a&&(n("hoverdistance"),n("spikedistance"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=t._has("mapbox"),l=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((o||l||s)&&u===1||(o||l)&&s&&u===2)&&(t.dragmode="pan"),nZ(r,t,n),ET.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var FT=ne((nfe,NT)=>{"use strict";var r5=pr(),zT=dt();NT.exports=function(r){var t=r.calcdata,n=r._fullLayout;function a(u){return function(f){return r5.coerceHoverinfo({hoverinfo:f},{_module:u._module},n)}}for(var i=0;i{"use strict";var iZ=dt(),oZ=Q3().hover;IT.exports=function(r,t,n){var a=iZ.getComponentMethod("annotations","onClick")(r,r._hoverdata);n!==void 0&&oZ(r,t,n,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(a&&a.then?a.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var ss=ne((ife,UT)=>{"use strict";var lZ=kt(),Yp=pr(),sZ=To(),D1=Vu(),BT=_0(),OT=Q3();UT.exports={moduleType:"component",name:"fx",constants:t1(),schema:{layout:BT},attributes:ud(),layoutAttributes:BT,supplyLayoutGlobalDefaults:ST(),supplyDefaults:qT(),supplyLayoutDefaults:RT(),calc:FT(),getDistanceFunction:D1.getDistanceFunction,getClosest:D1.getClosest,inbox:D1.inbox,quadrature:D1.quadrature,appendArrayPointValue:D1.appendArrayPointValue,castHoverOption:fZ,castHoverinfo:cZ,hover:OT.hover,unhover:sZ.unhover,loneHover:OT.loneHover,loneUnhover:uZ,click:HT()};function uZ(e){var r=Yp.isD3Selection(e)?e:lZ.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function fZ(e,r,t){return Yp.castOption(e,r,"hoverlabel."+t)}function cZ(e,r,t){function n(a){return Yp.coerceHoverinfo({hoverinfo:a},{_module:e._module},r)}return Yp.castOption(e,t,"hoverinfo",n)}});var tv=ne(eu=>{"use strict";eu.selectMode=function(e){return e==="lasso"||e==="select"};eu.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};eu.openMode=function(e){return e==="drawline"||e==="drawopenpath"};eu.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};eu.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};eu.selectingOrDrawing=function(e){return eu.freeMode(e)||eu.rectMode(e)}});var Gp=ne((lfe,YT)=>{"use strict";YT.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var Vp=ne((sfe,GT)=>{"use strict";GT.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 Zp=ne((ufe,VT)=>{"use strict";var Wp=32;VT.exports={CIRCLE_SIDES:Wp,i000:0,i090:Wp/4,i180:Wp/2,i270:Wp/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var Xp=ne((ffe,ZT)=>{"use strict";var vZ=pr().strTranslate;function WT(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function hZ(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function dZ(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return WT(e,t[r])}}function pZ(e){return vZ(e.xaxis._offset,e.yaxis._offset)}ZT.exports={p2r:WT,r2p:hZ,axValue:dZ,getTransform:pZ}});var Qu=ne(ru=>{"use strict";var gZ=U2(),JT=Zp(),nv=JT.CIRCLE_SIDES,t5=JT.SQRT2,$T=Xp(),XT=$T.p2r,jT=$T.r2p,mZ=[0,3,4,5,6,1,2],yZ=[0,3,4,1,2];ru.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",n=0;n0&&s{"use strict";var tk=tv(),bZ=tk.drawMode,_Z=tk.openMode,av=Zp(),KT=av.i000,QT=av.i090,ek=av.i180,rk=av.i270,xZ=av.cos45,wZ=av.sin45,nk=Xp(),Jp=nk.p2r,ef=nk.r2p,MZ=Yu(),AZ=MZ.clearOutline,$p=Qu(),TZ=$p.readPaths,kZ=$p.writePaths,SZ=$p.ellipseOver,CZ=$p.fixDatesForPaths;function LZ(e,r){if(e.length){var t=e[0][0];if(t){var n=r.gd,a=r.isActiveShape,i=r.dragmode,o=(n.layout||{}).shapes||[];if(!bZ(i)&&a!==void 0){var l=n._fullLayout._activeShapeIndex;if(l{"use strict";var qZ=tv(),DZ=qZ.selectMode,EZ=Yu(),PZ=EZ.clearOutline,n5=Qu(),RZ=n5.readPaths,zZ=n5.writePaths,NZ=n5.fixDatesForPaths;ok.exports=function(r,t){if(r.length){var n=r[0][0];if(n){var a=n.getAttribute("d"),i=t.gd,o=i._fullLayout.newselection,l=t.plotinfo,s=l.xaxis,u=l.yaxis,f=t.isActiveSelection,v=t.dragmode,h=(i.layout||{}).selections||[];if(!DZ(v)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";lk.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 rf=ne(ka=>{"use strict";var Mc=P1(),sk=pr(),Qp=Cn();ka.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ka.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ka.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ka.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ka.extractPathCoords=function(e,r,t){var n=[],a=e.match(Mc.segmentRE);return a.forEach(function(i){var o=r[i.charAt(0)].drawn;if(o!==void 0){var l=i.substr(1).match(Mc.paramRE);if(!(!l||l.lengthd&&(g="X"),g});return u>d&&(m=m.replace(/[\s,]*X.*/,""),sk.log("Ignoring extra params in segment "+s)),f+m})}function R1(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var o5=ne((gfe,vk)=>{"use strict";var IZ=pr(),iv=Cn(),uk=ci(),fk=ln(),HZ=Qu().readPaths,i5=rf(),BZ=i5.getPathString,ck=bd(),OZ=Ka().FROM_TL;vk.exports=function(r,t,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var l=iv.getFromId(r,n.xref),s=iv.getFromId(r,n.yref);for(var u in ck){var f=ck[u](n,l,s);f!==void 0&&(o[u]=f)}}i=IZ.texttemplateStringForShapes(n.label.texttemplate,{},r._fullLayout._d3locale,o)}else i=n.label.text;var v={"data-index":t},h=n.label.font,d={"data-notex":1},m=a.append("g").attr(v).classed("shape-label",!0),g=m.append("text").attr(d).classed("shape-label-text",!0).text(i),y,x,T,_;if(n.path){var b=BZ(r,n),A=HZ(b,r);y=1/0,T=1/0,x=-1/0,_=-1/0;for(var S=0;S=e?a=r-n:a=n-r,-180/Math.PI*Math.atan2(a,i)}function YZ(e,r,t,n,a,i,o){var l=a.label.textposition,s=a.label.textangle,u=a.label.padding,f=a.type,v=Math.PI/180*i,h=Math.sin(v),d=Math.cos(v),m=a.label.xanchor,g=a.label.yanchor,y,x,T,_;if(f==="line"){l==="start"?(y=e,x=r):l==="end"?(y=t,x=n):(y=(e+t)/2,x=(r+n)/2),m==="auto"&&(l==="start"?s==="auto"?t>e?m="left":te?m="right":te?m="right":te?m="left":t{"use strict";var GZ=pr(),VZ=GZ.strTranslate,hk=To(),gk=tv(),WZ=gk.drawMode,mk=gk.selectMode,yk=dt(),dk=zt(),rg=Zp(),ZZ=rg.i000,XZ=rg.i090,jZ=rg.i180,JZ=rg.i270,$Z=Yu(),bk=$Z.clearOutlineControllers,s5=Qu(),eg=s5.pointsOnRectangle,l5=s5.pointsOnEllipse,KZ=s5.writePaths,QZ=Kp().newShapes,eX=Kp().createShapeObj,rX=a5(),tX=o5();_k.exports=function e(r,t,n,a){a||(a=0);var i=n.gd;function o(){e(r,t,n,a++),(l5(r[0])||n.hasText)&&l({redrawing:!0})}function l(te){var K={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,K=QZ(t,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,K=rX(t,n),i._fullLayout._reselect=!0),Object.keys(K).length&&yk.call((te||{}).redrawing?"relayout":"_guiRelayout",i,K)}var s=i._fullLayout,u=s._zoomlayer,f=n.dragmode,v=WZ(f),h=mk(f);(v||h)&&(i._fullLayout._outlining=!0),bk(i),t.attr("d",KZ(r));var d,m,g,y,x;if(!a&&(n.isActiveShape||n.isActiveSelection)){x=nX([],r);var T=u.append("g").attr("class","outline-controllers");F(T),ee()}if(v&&n.hasText){var _=u.select(".label-temp"),b=eX(t,n,n.dragmode);tX(i,"label-temp",b,_)}function A(te){g=+te.srcElement.getAttribute("data-i"),y=+te.srcElement.getAttribute("data-j"),d[g][y].moveFn=S}function S(te,K){if(r.length){var re=x[g][y][1],fe=x[g][y][2],de=r[g],qe=de.length;if(eg(de)){var Be=te,Ne=K;if(n.isActiveSelection){var Ie=pk(de,y);Ie[1]===de[y][1]?Ne=0:Be=0}for(var Se=0;Se1&&!(te.length===2&&te[1][0]==="Z")&&(y===0&&(te[0][0]="M"),r[g]=te,o(),l())}}function z(te,K){if(te===2){g=+K.srcElement.getAttribute("data-i"),y=+K.srcElement.getAttribute("data-j");var re=r[g];!eg(re)&&!l5(re)&&D()}}function F(te){d=[];for(var K=0;K{"use strict";var iX=kt(),kk=dt(),xk=pr(),ov=Cn(),oX=Qu().readPaths,lX=tg(),ag=o5(),Sk=Yu().clearOutlineControllers,u5=zt(),c5=ln(),sX=_n().arrayEditor,wk=To(),Mk=Ku(),Ac=P1(),zi=rf(),f5=zi.getPathString;qk.exports={draw:v5,drawOne:Ck,eraseActiveShape:cX,drawLabel:ag};function v5(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var n=r._plots[t].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;ao&&lr>l&&!nr.shiftKey?wk.getCursor(ir/ar,1-rr/lr):"move";Mk(r,Cr),Xe=Cr.split("-")[0]}}function pe(nr){ng(e)||(s&&(x=de(t.xanchor)),u&&(T=qe(t.yanchor)),t.type==="path"?H=t.path:(d=s?t.x0:de(t.x0),m=u?t.y0:qe(t.y0),g=s?t.x1:de(t.x1),y=u?t.y1:qe(t.y1)),dy?(_=m,M="y0",b=y,D="y1"):(_=y,M="y1",b=m,D="y0"),Te(nr),Fe(a,t),fr(r,t,e),Se.moveFn=Xe==="move"?$:Me,Se.altKey=nr.altKey)}function W(){ng(e)||(Mk(r),Oe(a),Lk(r,e,t),kk.call("_guiRelayout",e,i.getUpdateObj()))}function Q(){ng(e)||Oe(a)}function $(nr,Ze){if(t.type==="path"){var ar=function(rr){return rr},lr=ar,ir=ar;s?h("xanchor",t.xanchor=Be(x+nr)):(lr=function(Cr){return Be(de(Cr)+nr)},O&&O.type==="date"&&(lr=zi.encodeDate(lr))),u?h("yanchor",t.yanchor=Ne(T+Ze)):(ir=function(Cr){return Ne(qe(Cr)+Ze)},V&&V.type==="date"&&(ir=zi.encodeDate(ir))),h("path",t.path=Ak(H,lr,ir))}else s?h("xanchor",t.xanchor=Be(x+nr)):(h("x0",t.x0=Be(d+nr)),h("x1",t.x1=Be(g+nr))),u?h("yanchor",t.yanchor=Ne(T+Ze)):(h("y0",t.y0=Ne(m+Ze)),h("y1",t.y1=Ne(y+Ze)));r.attr("d",f5(e,t)),Fe(a,t),ag(e,n,t,Y)}function Me(nr,Ze){if(v){var ar=function(dr){return dr},lr=ar,ir=ar;s?h("xanchor",t.xanchor=Be(x+nr)):(lr=function(Tr){return Be(de(Tr)+nr)},O&&O.type==="date"&&(lr=zi.encodeDate(lr))),u?h("yanchor",t.yanchor=Ne(T+Ze)):(ir=function(Tr){return Ne(qe(Tr)+Ze)},V&&V.type==="date"&&(ir=zi.encodeDate(ir))),h("path",t.path=Ak(H,lr,ir))}else if(f){if(Xe==="resize-over-start-point"){var rr=d+nr,Cr=u?m-Ze:m+Ze;h("x0",t.x0=s?rr:Be(rr)),h("y0",t.y0=u?Cr:Ne(Cr))}else if(Xe==="resize-over-end-point"){var yr=g+nr,Ae=u?y-Ze:y+Ze;h("x1",t.x1=s?yr:Be(yr)),h("y1",t.y1=u?Ae:Ne(Ae))}}else{var Ve=function(dr){return Xe.indexOf(dr)!==-1},je=Ve("n"),zr=Ve("s"),kr=Ve("w"),er=Ve("e"),Ke=je?_+Ze:_,mr=zr?b+Ze:b,Mr=kr?A+nr:A,gr=er?S+nr:S;u&&(je&&(Ke=_-Ze),zr&&(mr=b-Ze)),(!u&&mr-Ke>l||u&&Ke-mr>l)&&(h(M,t[M]=u?Ke:Ne(Ke)),h(D,t[D]=u?mr:Ne(mr))),gr-Mr>o&&(h(z,t[z]=s?Mr:Be(Mr)),h(F,t[F]=s?gr:Be(gr)))}r.attr("d",f5(e,t)),Fe(a,t),ag(e,n,t,Y)}function Fe(nr,Ze){(s||u)&&ar();function ar(){var lr=Ze.type!=="path",ir=nr.selectAll(".visual-cue").data([0]),rr=1;ir.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":rr}).classed("visual-cue",!0);var Cr=de(s?Ze.xanchor:xk.midRange(lr?[Ze.x0,Ze.x1]:zi.extractPathCoords(Ze.path,Ac.paramIsX))),yr=qe(u?Ze.yanchor:xk.midRange(lr?[Ze.y0,Ze.y1]:zi.extractPathCoords(Ze.path,Ac.paramIsY)));if(Cr=zi.roundPositionForSharpStrokeRendering(Cr,rr),yr=zi.roundPositionForSharpStrokeRendering(yr,rr),s&&u){var Ae="M"+(Cr-1-rr)+","+(yr-1-rr)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ir.attr("d",Ae)}else if(s){var Ve="M"+(Cr-1-rr)+","+(yr-9-rr)+"v18 h2 v-18 Z";ir.attr("d",Ve)}else{var je="M"+(Cr-9-rr)+","+(yr-1-rr)+"h18 v2 h-18 Z";ir.attr("d",je)}}}function Oe(nr){nr.selectAll(".visual-cue").remove()}function fr(nr,Ze,ar){var lr=Ze.xref,ir=Ze.yref,rr=ov.getFromId(ar,lr),Cr=ov.getFromId(ar,ir),yr="";lr!=="paper"&&!rr.autorange&&(yr+=lr),ir!=="paper"&&!Cr.autorange&&(yr+=ir),c5.setClipUrl(nr,yr?"clip"+ar._fullLayout._uid+yr:null,ar)}}function Ak(e,r,t){return e.replace(Ac.segmentRE,function(n){var a=0,i=n.charAt(0),o=Ac.paramIsX[i],l=Ac.paramIsY[i],s=Ac.numParams[i],u=n.substr(1).replace(Ac.paramRE,function(f){return a>=s||(o[a]?f=r(f):l[a]&&(f=t(f)),a++),f});return i+u})}function fX(e,r){if(ig(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Tk(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Tk,v5(e)}}}function Tk(e){if(ig(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(Sk(e),delete e._fullLayout._activeShapeIndex,v5(e))}}function cX(e){if(ig(e)){Sk(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Co=dt(),Dk=ua(),Ek=ya(),Ot=Vp(),vX=og().eraseActiveShape,lg=pr(),Et=lg._,Ut=Hk.exports={};Ut.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Et(e,"Download plot as a png"):Et(e,"Download plot")},icon:Ot.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};lg.notifier(Et(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in r&&(t[n]=r[n])}),Co.call("downloadImage",e,t).then(function(n){lg.notifier(Et(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){lg.notifier(Et(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ut.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Et(e,"Edit in Chart Studio")},icon:Ot.disk,click:function(e){Dk.sendDataToCloud(e)}};Ut.editInChartStudio={name:"editInChartStudio",title:function(e){return Et(e,"Edit in Chart Studio")},icon:Ot.pencil,click:function(e){Dk.sendDataToCloud(e)}};Ut.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Et(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Ot.zoombox,click:ti};Ut.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Et(e,"Pan")},attr:"dragmode",val:"pan",icon:Ot.pan,click:ti};Ut.select2d={name:"select2d",_cat:"select",title:function(e){return Et(e,"Box Select")},attr:"dragmode",val:"select",icon:Ot.selectbox,click:ti};Ut.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Et(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Ot.lasso,click:ti};Ut.drawclosedpath={name:"drawclosedpath",title:function(e){return Et(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Ot.drawclosedpath,click:ti};Ut.drawopenpath={name:"drawopenpath",title:function(e){return Et(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Ot.drawopenpath,click:ti};Ut.drawline={name:"drawline",title:function(e){return Et(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Ot.drawline,click:ti};Ut.drawrect={name:"drawrect",title:function(e){return Et(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Ot.drawrect,click:ti};Ut.drawcircle={name:"drawcircle",title:function(e){return Et(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Ot.drawcircle,click:ti};Ut.eraseshape={name:"eraseshape",title:function(e){return Et(e,"Erase active shape")},icon:Ot.eraseshape,click:vX};Ut.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Et(e,"Zoom in")},attr:"zoom",val:"in",icon:Ot.zoom_plus,click:ti};Ut.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Et(e,"Zoom out")},attr:"zoom",val:"out",icon:Ot.zoom_minus,click:ti};Ut.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Et(e,"Autoscale")},attr:"zoom",val:"auto",icon:Ot.autoscale,click:ti};Ut.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Et(e,"Reset axes")},attr:"zoom",val:"reset",icon:Ot.home,click:ti};Ut.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Et(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Ot.tooltip_basic,gravity:"ne",click:ti};Ut.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Et(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Ot.tooltip_compare,gravity:"ne",click:ti};function ti(e,r){var t=r.currentTarget,n=t.getAttribute("data-attr"),a=t.getAttribute("data-val")||!0,i=e._fullLayout,o={},l=Ek.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(n==="zoom"){var v=a==="in"?.5:2,h=(1+v)/2,d=(1-v)/2,m;for(f=0;f{"use strict";var Bk=p5(),pX=Object.keys(Bk),Ok=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Uk=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Ok),sv=[],gX=function(e){if(Uk.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();sv.indexOf(r)===-1&&sv.push(r),sv.indexOf(t)===-1&&sv.push(t)}};pX.forEach(function(e){gX(Bk[e])});sv.sort();Yk.exports={DRAW_MODES:Ok,backButtons:Uk,foreButtons:sv}});var m5=ne((wfe,Gk)=>{"use strict";var xfe=g5();Gk.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 Wk=ne((Mfe,Vk)=>{"use strict";var mX=pr(),z1=zt(),yX=_n(),bX=m5();Vk.exports=function(r,t){var n=r.modebar||{},a=yX.newContainer(t,"modebar");function i(l,s){return mX.coerce(n,a,bX,l,s)}i("orientation"),i("bgcolor",z1.addOpacity(t.paper_bgcolor,.5));var o=z1.contrast(z1.rgb(t.modebar.bgcolor));i("color",z1.addOpacity(o,.3)),i("activecolor",z1.addOpacity(o,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var Jk=ne((Afe,jk)=>{"use strict";var y5=kt(),_X=Bt(),ug=pr(),Zk=Vp(),xX=Jh().version,wX=new DOMParser;function Xk(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var us=Xk.prototype;us.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(v){v.style.backgroundColor=i.bgcolor}),ug.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var l=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(l||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};us.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var n=r.createGroup();t.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var o=r.createButton(a);r.buttonElements.push(o),n.appendChild(o)}),r.element.appendChild(n)})};us.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};us.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&t.setAttribute("data-title",n),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),t.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&y5.select(t).classed("active",!0);var o=e.icon;return typeof o=="function"?t.appendChild(o()):t.appendChild(this.createIcon(o||Zk.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};us.createIcon=function(e){var r=_X(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(t,"svg"),n.setAttribute("viewBox",[0,0,e.width,r].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(t,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=wX.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};us.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",l=y5.select(n),s=function(v,h){var d=r.modebar,m=v.querySelector(".icon path");m&&(h||v.matches(":hover")?m.style.fill=d.activecolor:m.style.fill=d.color)};if(o){if(i===t){var u=!l.classed("active");l.classed("active",u),s(n,u)}}else{var f=i===null?i:ug.nestedProperty(r,i).get();l.classed("active",f===a),s(n,f===a)}})};us.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var TX=ya(),$k=Qa(),b5=dt(),kX=Vu().isUnifiedHover,SX=Jk(),fg=p5(),CX=g5().DRAW_MODES,LX=pr().extendDeep;Kk.exports=function(r){var t=r._fullLayout,n=r._context,a=t._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete t._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 i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=zX(i):!n.displayModeBar&&n.watermark?o=[]:o=qX(r),a?a.update(r,o):t._modeBar=SX(r,o)};function qX(e){var r=e._fullLayout,t=e._fullData,n=e._context;function a(K,re){if(typeof re=="string"){if(re.toLowerCase()===K.toLowerCase())return!0}else{var fe=re.name,de=re._cat||re.name;if(fe===K||de===K.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var o=r.modebar.remove;typeof o=="string"&&(o=[o]);var l=n.modeBarButtonsToAdd.concat(i.filter(function(K){for(var re=0;re1?(F=["toggleHover"],H=["resetViews"]):v?(z=["zoomInGeo","zoomOutGeo"],F=["hoverClosestGeo"],H=["resetGeo"]):f?(F=["hoverClosest3d"],H=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(z=["zoomInMapbox","zoomOutMapbox"],F=["toggleHover"],H=["resetViewMapbox"]):y?(z=["zoomInMap","zoomOutMap"],F=["toggleHover"],H=["resetViewMap"]):h?F=["hoverClosestPie"]:_?(F=["hoverClosestCartesian","hoverCompareCartesian"],H=["resetViewSankey"]):F=["toggleHover"],u&&F.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(PX(t)||A)&&(F=[]),u&&!b&&(z=["zoomIn2d","zoomOut2d","autoScale2d"],H[0]!=="resetViews"&&(H=["resetScale2d"])),f?Y=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||m?Y=["zoom2d","pan2d"]:g||y||v?Y=["pan2d"]:x&&(Y=["zoom2d"]),EX(t)&&Y.push("select2d","lasso2d");var O=[],X=function(K){O.indexOf(K)===-1&&F.indexOf(K)!==-1&&O.push(K)};if(Array.isArray(l)){for(var V=[],ee=0;ee{"use strict";eS.exports={moduleType:"component",name:"modebar",layoutAttributes:m5(),supplyLayoutDefaults:Wk(),manage:Qk()}});var x5=ne((Sfe,rS)=>{"use strict";var NX=Ka().FROM_BL;rS.exports=function(r,t,n){n===void 0&&(n=NX[r.constraintoward||"center"]);var a=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=a[0]+(a[1]-a[0])*n;r.range=r._input.range=[r.l2r(i+(a[0]-i)*t),r.l2r(i+(a[1]-i)*t)],r.setScale()}});var F1=ne(N1=>{"use strict";var Tc=pr(),w5=Ju(),bl=ya().id2name,FX=pl(),tS=x5(),IX=dp(),HX=En().ALMOST_EQUAL,BX=Ka().FROM_BL;N1.handleDefaults=function(e,r,t){var n=t.axIds,a=t.axHasImage,i=r._axisConstraintGroups=[],o=r._axisMatchGroups=[],l,s,u,f,v,h,d,m;for(l=0;li?t.substr(i):n.substr(a))+o}function UX(e,r){for(var t=r._size,n=t.h/t.w,a={},i=Object.keys(e),o=0;oHX*m&&!T)){for(i=0;iY&&feF&&(F=fe);var qe=(F-z)/(2*H);v/=qe,z=s.l2r(z),F=s.l2r(F),s.range=s._input.range=S{"use strict";var vg=kt(),ni=dt(),ro=ua(),Lo=pr(),T5=ci(),k5=Gp(),I1=zt(),uv=ln(),oS=x1(),cS=_5(),H1=Cn(),tu=Ka(),vS=F1(),YX=vS.enforce,GX=vS.clean,lS=Ju().doAutoRange,hS="start",VX="middle",dS="end",WX=Pa().zindexSeparator;xa.layoutStyles=function(e){return Lo.syncOrAsync([ro.doAutoMargin,XX],e)};function ZX(e,r,t){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]r[0])return!0}return!1}function XX(e){var r=e._fullLayout,t=r._size,n=t.p,a=H1.list(e,"",!0),i,o,l,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(uv.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),xa.drawMainTitle(e),cS.manage(e),!r._has("cartesian"))return ro.previousPromises(e);function v(pe,W,Q){var $=pe._lw/2;if(pe._id.charAt(0)==="x"){if(W){if(Q==="top")return W._offset-n-$}else return t.t+t.h*(1-(pe.position||0))+$%1;return W._offset+W._length+n+$}if(W){if(Q==="right")return W._offset+W._length+n+$}else return t.l+t.w*(pe.position||0)+$%1;return W._offset-n-$}for(i=0;i0){KX(e,i,u,s),l.attr({x:o,y:i,"text-anchor":n,dy:fS(r.yanchor)}).call(T5.positionText,o,i);var f=(r.text.match(T5.BR_TAG_ALL)||[]).length;if(f){var v=tu.LINE_SPACING*f+tu.MID_SHIFT;r.y===0&&(v=-v),l.selectAll(".line").each(function(){var y=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",y)})}var h=vg.selectAll(".gtitle-subtitle");if(h.node()){var d=l.node().getBBox(),m=d.y+d.height,g=m+oS.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:o,y:g,"text-anchor":n,dy:fS(r.yanchor)}).call(T5.positionText,o,g)}}}};function jX(e,r,t,n,a){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=Lo.isTopAnchor(r)?n:n-a,l=t==="b"?i-o:o;return Lo.isTopAnchor(r)&&t==="t"||Lo.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",o=e._fullLayout.margin[i],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=JX(i,n,a,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>o?l:0}function KX(e,r,t,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",l={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&jX(e,i,o,r,n)?l[o]=t:i.yref==="container"&&(s[o]=t,e._fullLayout._reservedMargin[a]=s),ro.allowAutoMargin(e,a),ro.autoMargin(e,a,l)}function QX(e,r){var t=e.title,n=e._size,a=0;switch(r===hS?a=t.pad.l:r===dS&&(a=-t.pad.r),t.xref){case"paper":return n.l+n.w*t.x+a;case"container":default:return e.width*t.x+a}}function ej(e,r){var t=e.title,n=e._size,a=0;if(r==="0em"||!r?a=-t.pad.b:r===tu.CAP_SHIFT+"em"&&(a=t.pad.t),t.y==="auto")return n.t/2;switch(t.yref){case"paper":return n.t+n.h-n.h*t.y+a;case"container":default:return e.height-e.height*t.y+a}}function fS(e){return e==="top"?tu.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":tu.MID_SHIFT+"em"}function rj(e){var r=e.title,t=VX;return Lo.isRightAnchor(r)?t=dS:Lo.isLeftAnchor(r)&&(t=hS),t}function tj(e){var r=e.title,t="0em";return Lo.isTopAnchor(r)?t=tu.CAP_SHIFT+"em":Lo.isMiddleAnchor(r)&&(t=tu.MID_SHIFT+"em"),t}xa.doTraceStyle=function(e){var r=e.calcdata,t=[],n;for(n=0;n{"use strict";var nj=Qu().readPaths,aj=tg(),pS=Yu().clearOutlineControllers,S5=zt(),gS=ln(),ij=_n().arrayEditor,mS=rf(),oj=mS.getPathString;bS.exports={draw:dg,drawOne:yS,activateLastSelection:uj};function dg(e){var r=e._fullLayout;pS(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var n=r._plots[t].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;y--){var x=o.append("path").attr(s).style("opacity",y?.1:u).call(S5.stroke,v).call(S5.fill,f).call(gS.dashLine,y?"solid":d,y?4+h:h);if(lj(x,e,n),m){var T=ij(e.layout,"selections",n);x.style({cursor:"move"});var _={element:x.node(),plotinfo:a,gd:e,editHelpers:T,isActiveSelection:!0},b=nj(l,e);aj(b,x,_)}else x.style("pointer-events",y?"all":"none");g[y]=x}var A=g[0],S=g[1];S.node().addEventListener("click",function(){return sj(e,A)})}}function lj(e,r,t){var n=t.xref+t.yref;gS.setClipUrl(e,"clip"+r._fullLayout._uid+n,r)}function sj(e,r){if(pg(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){C5(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=C5,dg(e)}}}function uj(e){if(pg(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=C5,dg(e)}}function C5(e){if(pg(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(pS(e),delete e._fullLayout._activeSelectionIndex,dg(e))}}});var xS=ne((Dfe,_S)=>{function fj(){var e,r=0,t=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===t?e:(t=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}_S.exports=fj});var MS=ne((Efe,wS)=>{function cj(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,n,a){var i=n[0],o=n[1],l=a[0],s=a[1],u=t[0],f=t[1];return(l-i)*(f-o)-(s-o)*(u-i)>=-e},pointBetween:function(t,n,a){var i=t[1]-n[1],o=a[0]-n[0],l=t[0]-n[0],s=a[1]-n[1],u=l*o+i*s;if(u-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=l-i>e&&(o-f)*(i-v)/(l-v)+f-a>e&&(s=!s),o=f,l=v}return s}};return r}wS.exports=cj});var TS=ne((Pfe,AS)=>{var vj={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var n=e.root,a=e.root.next;a!==null;){if(t(a)){r.prev=a.prev,r.next=a,a.prev.next=r,a.prev=r;return}n=a,a=a.next}n.next=r,r.prev=n,r.next=null},findTransition:function(r){for(var t=e.root,n=e.root.next;n!==null&&!r(n);)t=n,n=n.next;return{before:t===e.root?null:t,after:n,insert:function(a){return a.prev=t,a.next=n,t.next=a,n!==null&&(n.prev=a),a}}}};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}};AS.exports=vj});var SS=ne((Rfe,kS)=>{var B1=TS();function hj(e,r,t){function n(m,g){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:null,below:null},otherFill:null}}function a(m,g,y){return{id:t?t.segmentId():-1,start:m,end:g,myFill:{above:y.myFill.above,below:y.myFill.below},otherFill:null}}var i=B1.create();function o(m,g,y,x,T,_){var b=r.pointsCompare(g,T);return b!==0?b:r.pointsSame(y,_)?0:m!==x?m?1:-1:r.pointAboveOrOnLine(y,x?T:_,x?_:T)?1:-1}function l(m,g){i.insertBefore(m,function(y){var x=o(m.isStart,m.pt,g,y.isStart,y.pt,y.other.pt);return x<0})}function s(m,g){var y=B1.node({isStart:!0,pt:m.start,seg:m,primary:g,other:null,status:null});return l(y,m.end),y}function u(m,g,y){var x=B1.node({isStart:!1,pt:g.end,seg:g,primary:y,other:m,status:null});m.other=x,l(x,m.pt)}function f(m,g){var y=s(m,g);return u(y,m,g),y}function v(m,g){t&&t.segmentChop(m.seg,g),m.other.remove(),m.seg.end=g,m.other.pt=g,l(m.other,m.pt)}function h(m,g){var y=a(g,m.seg.end,m.seg);return v(m,g),f(y,m.primary)}function d(m,g){var y=B1.create();function x(V,ee){var te=V.seg.start,K=V.seg.end,re=ee.seg.start,fe=ee.seg.end;return r.pointsCollinear(te,re,fe)?r.pointsCollinear(K,re,fe)||r.pointAboveOrOnLine(K,re,fe)?1:-1:r.pointAboveOrOnLine(te,re,fe)?1:-1}function T(V){return y.findTransition(function(ee){var te=x(V,ee.ev);return te>0})}function _(V,ee){var te=V.seg,K=ee.seg,re=te.start,fe=te.end,de=K.start,qe=K.end;t&&t.checkIntersection(te,K);var Be=r.linesIntersect(re,fe,de,qe);if(Be===!1){if(!r.pointsCollinear(re,fe,de)||r.pointsSame(re,qe)||r.pointsSame(fe,de))return!1;var Ne=r.pointsSame(re,de),Ie=r.pointsSame(fe,qe);if(Ne&&Ie)return ee;var Se=!Ne&&r.pointBetween(re,de,qe),Xe=!Ie&&r.pointBetween(fe,de,qe);if(Ne)return Xe?h(ee,fe):h(V,qe),ee;Se&&(Ie||(Xe?h(ee,fe):h(V,qe)),h(ee,re))}else Be.alongA===0&&(Be.alongB===-1?h(V,de):Be.alongB===0?h(V,Be.pt):Be.alongB===1&&h(V,qe)),Be.alongB===0&&(Be.alongA===-1?h(ee,re):Be.alongA===0?h(ee,Be.pt):Be.alongA===1&&h(ee,fe));return!1}for(var b=[];!i.isEmpty();){var A=i.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let V=function(){if(M){var ee=_(A,M);if(ee)return ee}return D?_(A,D):!1};var X=V;t&&t.segmentNew(A.seg,A.primary);var S=T(A),M=S.before?S.before.ev:null,D=S.after?S.after.ev:null;t&&t.tempStatus(A.seg,M?M.seg:!1,D?D.seg:!1);var z=V();if(z){if(e){var F;A.seg.myFill.below===null?F=!0:F=A.seg.myFill.above!==A.seg.myFill.below,F&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(z.seg),A.other.remove(),A.remove()}if(i.getHead()!==A){t&&t.rewind(A.seg);continue}if(e){var F;A.seg.myFill.below===null?F=!0:F=A.seg.myFill.above!==A.seg.myFill.below,D?A.seg.myFill.below=D.seg.myFill.above:A.seg.myFill.below=m,F?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var H;D?A.primary===D.primary?H=D.seg.otherFill.above:H=D.seg.myFill.above:H=A.primary?g:m,A.seg.otherFill={above:H,below:H}}t&&t.status(A.seg,M?M.seg:!1,D?D.seg:!1),A.other.status=S.insert(B1.node({ev:A}))}else{var Y=A.status;if(Y===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(y.exists(Y.prev)&&y.exists(Y.next)&&_(Y.prev.ev,Y.next.ev),t&&t.statusRemove(Y.ev.seg),Y.remove(),!A.primary){var O=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=O}b.push(A.seg)}i.getHead().remove()}return t&&t.done(),b}return e?{addRegion:function(m){for(var g,y=m[m.length-1],x=0;x{function dj(e,r,t){var n=[],a=[];return e.forEach(function(i){var o=i.start,l=i.end;if(r.pointsSame(o,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function v(X,V,ee){return f.index=X,f.matches_head=V,f.matches_pt1=ee,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function O1(e,r,t){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);r[i]!==0&&n.push({id:t?t.segmentId():-1,start:a.start,end:a.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(n),n}var pj={union:function(e,r){return O1(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return O1(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return O1(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return O1(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return O1(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};qS.exports=pj});var PS=ne((Ffe,ES)=>{var gj={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=o(i[0]),s=1;s{var mj=xS(),yj=MS(),RS=SS(),bj=LS(),U1=DS(),zS=PS(),qo=!1,Y1=yj(),Ni;Ni={buildLog:function(e){return e===!0?qo=mj():e===!1&&(qo=!1),qo===!1?!1:qo.list},epsilon:function(e){return Y1.epsilon(e)},segments:function(e){var r=RS(!0,Y1,qo);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=RS(!1,Y1,qo);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:U1.union(e.combined,qo),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:U1.intersect(e.combined,qo),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:U1.difference(e.combined,qo),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:U1.differenceRev(e.combined,qo),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:U1.xor(e.combined,qo),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:bj(e.segments,Y1,qo),inverted:e.inverted}},polygonFromGeoJSON:function(e){return zS.toPolygon(Ni,e)},polygonToGeoJSON:function(e){return zS.fromPolygon(Ni,Y1,e)},union:function(e,r){return G1(e,r,Ni.selectUnion)},intersect:function(e,r){return G1(e,r,Ni.selectIntersect)},difference:function(e,r){return G1(e,r,Ni.selectDifference)},differenceRev:function(e,r){return G1(e,r,Ni.selectDifferenceRev)},xor:function(e,r){return G1(e,r,Ni.selectXor)}};function G1(e,r,t){var n=Ni.segments(e),a=Ni.segments(r),i=Ni.combine(n,a),o=t(i);return Ni.polygon(o)}typeof window=="object"&&(window.PolyBool=Ni);NS.exports=Ni});var HS=ne((Hfe,IS)=>{IS.exports=function(r,t,n,a){var i=r[0],o=r[1],l=!1;n===void 0&&(n=0),a===void 0&&(a=t.length);for(var s=a-n,u=0,f=s-1;uo!=m>o&&i<(d-v)*(o-h)/(m-h)+v;g&&(l=!l)}return l}});var yg=ne((Bfe,BS)=>{"use strict";var q5=pd().dot,gg=En().BADNUM,mg=BS.exports={};mg.tester=function(r){var t=r.slice(),n=t[0][0],a=n,i=t[0][1],o=i,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;la||x===gg||xo||g&&u(m))}function v(m,g){var y=m[0],x=m[1];if(y===gg||ya||x===gg||xo)return!1;var T=t.length,_=t[0][0],b=t[0][1],A=0,S,M,D,z,F;for(S=1;SMath.max(M,_)||x>Math.max(D,b)))if(xl||Math.abs(q5(v,u))>a)return!0;return!1};mg.filter=function(r,t){var n=[r[0]],a=0,i=0;function o(s){r.push(s);var u=n.length,f=a;n.splice(i+1);for(var v=f+1;v1){var l=r.pop();o(l)}return{addPt:o,raw:r,filtered:n}}});var US=ne((Ofe,OS)=>{"use strict";OS.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var fC=ne((Ufe,uC)=>{"use strict";var YS=FS(),_j=HS(),Z1=dt(),xj=ln().dashStyle,V1=zt(),wj=ss(),Mj=Vu().makeEventData,K1=tv(),Aj=K1.freeMode,Tj=K1.rectMode,X1=K1.drawMode,R5=K1.openMode,z5=K1.selectMode,GS=rf(),VS=P1(),JS=tg(),$S=Yu().clearOutline,KS=Qu(),D5=KS.handleEllipse,kj=KS.readPaths,Sj=Kp().newShapes,Cj=a5(),Lj=L5().activateLastSelection,_g=pr(),qj=_g.sorterAsc,QS=yg(),W1=qd(),Do=ya().getFromId,Dj=Gp(),Ej=hg().redrawReglTraces,xg=US(),fs=xg.MINSELECT,Pj=QS.filter,N5=QS.tester,F5=Xp(),WS=F5.p2r,Rj=F5.axValue,zj=F5.getTransform;function I5(e){return e.subplot!==void 0}function Nj(e,r,t,n,a){var i=!I5(n),o=Aj(a),l=Tj(a),s=R5(a),u=X1(a),f=z5(a),v=a==="drawline",h=a==="drawcircle",d=v||h,m=n.gd,g=m._fullLayout,y=f&&g.newselection.mode==="immediate"&&i,x=g._zoomlayer,T=n.element.getBoundingClientRect(),_=n.plotinfo,b=zj(_),A=r-T.left,S=t-T.top;g._calcInverseTransform(m);var M=_g.apply3DTransform(g._invTransform)(A,S);A=M[0],S=M[1];var D=g._invScaleX,z=g._invScaleY,F=A,H=S,Y="M"+A+","+S,O=n.xaxes[0],X=n.yaxes[0],V=O._length,ee=X._length,te=e.altKey&&!(X1(a)&&s),K,re,fe,de,qe,Be,Ne;rC(e,m,n),o&&(K=Pj([[A,S]],xg.BENDPX));var Ie=x.selectAll("path.select-outline-"+_.id).data([1]),Se=u?g.newshape:g.newselection;u&&(n.hasText=Se.label.text||Se.label.texttemplate);var Xe=u&&!s?Se.fillcolor:"rgba(0,0,0,0)",se=Se.line.color||(i?V1.contrast(m._fullLayout.plot_bgcolor):"#7f7f7f");Ie.enter().append("path").attr("class","select-outline select-outline-"+_.id).style({opacity:u?Se.opacity/2:1,"stroke-dasharray":xj(Se.line.dash,Se.line.width),"stroke-width":Se.line.width+"px","shape-rendering":"crispEdges"}).call(V1.stroke,se).call(V1.fill,Xe).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",b).attr("d",Y+"Z");var be=x.append("path").attr("class","zoombox-corners").style({fill:V1.background,stroke:V1.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(u&&n.hasText){var Te=x.select(".label-temp");Te.empty()&&(Te=x.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var pe=g._uid+xg.SELECTID,W=[],Q=wg(m,n.xaxes,n.yaxes,n.subplot);y&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var Me=O._id,Fe=X._id;oC(m,Me,Fe,Q);for(var Oe=(m.layout||{}).selections||[],fr=[],nr=!1,Ze=0;Ze=0){m._fullLayout._deactivateShape(m);return}if(!u){var Oe=g.clickmode;W1.done(pe).then(function(){if(W1.clear(pe),Me===2){for(Ie.remove(),qe=0;qe-1&&eC(Fe,m,n.xaxes,n.yaxes,n.subplot,n,Ie),Oe==="event"&&$1(m,void 0);wj.click(m,Fe,_.id)}).catch(_g.error)}},n.doneFn=function(){be.remove(),W1.done(pe).then(function(){W1.clear(pe),!y&&de&&n.selectionDefs&&(de.subtract=te,n.selectionDefs.push(de),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,fe)),(y||u)&&j1(n,y),n.doneFnCompleted&&n.doneFnCompleted(W),f&&$1(m,Ne)}).catch(_g.error)}}function eC(e,r,t,n,a,i,o){var l=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,v=[],h,d,m,g,y,x,T,_,b,A;if(Oj(l)){rC(e,r,i),h=wg(r,t,n,a);var S=Uj(l,h),M=S.pointNumbers.length>0;if(M?Yj(h,S):Gj(h)&&(T=XS(S))){for(o&&o.remove(),A=0;A=0}function Bj(e){return e._fullLayout._activeSelectionIndex>=0}function j1(e,r){var t=e.dragmode,n=e.plotinfo,a=e.gd;Hj(a)&&a._fullLayout._deactivateShape(a),Bj(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,l=X1(t),s=z5(t);if(l||s){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var f;l&&(f=Sj(u,e)),f&&Z1.call("_guiRelayout",a,{shapes:f});var v;s&&!I5(e)&&(v=Cj(u,e)),v&&(a._fullLayout._noEmitSelectedAtStart=!0,Z1.call("_guiRelayout",a,{selections:v}).then(function(){r&&Lj(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function ZS(e){return e._id}function wg(e,r,t,n){if(!e.calcdata)return[];var a=[],i=r.map(ZS),o=t.map(ZS),l,s,u;for(u=0;u0,i=a?n[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Yj(e,r){var t=[],n,a,i,o;for(o=0;o0&&t.push(n);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(a=r.searchInfo.cd[0].trace,a.selectedpoints.length===r.pointNumbers.length))){for(o=0;o1||(r+=n.selectedpoints.length,r>1)))return!1;return r===1}function J1(e,r,t){var n;for(n=0;n-1&&r;if(!o&&r){var Me=jS(e,!0);if(Me.length){var Fe=Me[0].xref,Oe=Me[0].yref;if(Fe&&Oe){var fr=lC(Me),nr=sC([Do(e,Fe,"x"),Do(e,Oe,"y")]);nr(W,fr)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:$&&$1(e,W),h._reselect=!1}if(!o&&h._deselect){var Ze=h._deselect;l=Ze.xref,s=Ze.yref,Zj(l,s,f)||oC(e,l,s,n),$&&(W.points.length?$1(e,W):O5(e)),h._deselect=!1}return{eventData:W,selectionTesters:t}}function Wj(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";cC.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 Q1=ne((Gfe,vC)=>{"use strict";vC.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var fv=ne((Wfe,pC)=>{"use strict";var hC=U5(),dC=$a(),Mg=Pa(),Kj=_n().templatedArray,Vfe=Q1();pC.exports=Kj("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:dC({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:hC.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:hC.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",Mg.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Mg.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Mg.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",Mg.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:dC({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Ag=ne((Zfe,gC)=>{"use strict";gC.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Y5=ne((Xfe,mC)=>{"use strict";mC.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var kc=ne((jfe,MC)=>{"use strict";var yC=x2().axisHoverFormat,Qj=Ru().texttemplateAttrs,eJ=Ru().hovertemplateAttrs,bC=H0(),rJ=$a(),tJ=Kl().dash,nJ=Kl().pattern,aJ=ln(),iJ=Ag(),Tg=la().extendFlat,oJ=Y5();function _C(e){return{valType:"any",dflt:0,editType:"calc"}}function xC(e){return{valType:"any",editType:"calc"}}function wC(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}MC.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:_C("x"),yperiod:_C("y"),xperiod0:xC("x0"),yperiod0:xC("y0"),xperiodalignment:wC("x"),yperiodalignment:wC("y"),xhoverformat:yC("x"),yhoverformat:yC("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:Qj({},{}),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:eJ({},{keys:iJ.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Tg({},tJ,{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:oJ(!0),fillgradient:Tg({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:nJ,marker:Tg({symbol:{valType:"enumerated",values:aJ.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:Tg({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},bC("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"},bC("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:rJ({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var G5=ne(($fe,kC)=>{"use strict";var AC=fv(),TC=kc().line,lJ=Kl().dash,kg=la().extendFlat,sJ=_o().overrideAll,uJ=_n().templatedArray,Jfe=Q1();kC.exports=sJ(uJ("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:kg({},AC.xref,{}),yref:kg({},AC.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:TC.color,width:kg({},TC.width,{min:1,dflt:1}),dash:kg({},lJ,{dflt:"dot"})}}),"arraydraw","from-root")});var qC=ne((Kfe,LC)=>{"use strict";var SC=pr(),Sg=Cn(),fJ=gl(),cJ=G5(),CC=rf();LC.exports=function(r,t){fJ(r,t,{name:"selections",handleItemDefaults:vJ});for(var n=t.selections,a=0;a{"use strict";DC.exports=function(r,t,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var eh=ne((ece,zC)=>{"use strict";var hJ=dt(),PC=pr(),RC=ya();zC.exports=function(r){return function(n,a){var i=n[r];if(Array.isArray(i))for(var o=hJ.subplotsRegistry.cartesian,l=o.idRegex,s=a._subplots,u=s.xaxis,f=s.yaxis,v=s.cartesian,h=a._has("cartesian"),d=0;d{"use strict";var NC=L5(),rh=fC();FC.exports={moduleType:"component",name:"selections",layoutAttributes:G5(),supplyLayoutDefaults:qC(),supplyDrawNewSelectionDefaults:EC(),includeBasePlot:eh()("selections"),draw:NC.draw,drawOne:NC.drawOne,reselect:rh.reselect,prepSelect:rh.prepSelect,clearOutline:rh.clearOutline,clearSelectionsCache:rh.clearSelectionsCache,selectOnClick:rh.selectOnClick}});var aL=ne((tce,nL)=>{"use strict";var j5=kt(),Eo=pr(),IC=Eo.numberFormat,dJ=Jl(),pJ=S3(),Cg=dt(),ZC=Eo.strTranslate,gJ=ci(),HC=zt(),nf=ln(),mJ=ss(),BC=Cn(),yJ=Ku(),bJ=To(),XC=tv(),Lg=XC.selectingOrDrawing,_J=XC.freeMode,xJ=Ka().FROM_TL,wJ=Gp(),MJ=hg().redrawReglTraces,AJ=ua(),W5=ya().getFromId,TJ=nu().prepSelect,kJ=nu().clearOutline,SJ=nu().selectOnClick,V5=x5(),J5=Pa(),OC=J5.MINDRAG,hi=J5.MINZOOM,UC=!0;function CJ(e,r,t,n,a,i,o,l){var s=e._fullLayout._zoomlayer,u=o+l==="nsew",f=(o+l).length===1,v,h,d,m,g,y,x,T,_,b,A,S,M,D,z,F,H,Y,O,X,V,ee,te;t+=r.yaxis._shift;function K(){if(v=r.xaxis,h=r.yaxis,_=v._length,b=h._length,x=v._offset,T=h._offset,d={},d[v._id]=v,m={},m[h._id]=h,o&&l)for(var er=r.overlays,Ke=0;Ke=0){mr._fullLayout._deactivateShape(mr);return}var Mr=mr._fullLayout.clickmode;if(X5(mr),er===2&&!f&&yr(),u)Mr.indexOf("select")>-1&&SJ(Ke,mr,g,y,r.id,de),Mr.indexOf("event")>-1&&mJ.click(mr,Ke,r.id);else if(er===1&&f){var gr=o?h:v,dr=o==="s"||l==="w"?0:1,Tr=gr._name+".range["+dr+"]",Pr=LJ(gr,dr),Ur="left",sr="middle";if(gr.fixedrange)return;o?(sr=o==="n"?"top":"bottom",gr.side==="right"&&(Ur="right")):l==="e"&&(Ur="right"),mr._context.showAxisRangeEntryBoxes&&j5.select(fe).call(gJ.makeEditable,{gd:mr,immediate:!0,background:mr._fullLayout.paper_bgcolor,text:String(Pr),fill:gr.tickfont?gr.tickfont.color:"#444",horizontalAlign:Ur,verticalAlign:sr}).on("edit",function(_e){var ke=gr.d2r(_e);ke!==void 0&&Cg.call("_guiRelayout",mr,Tr,ke)})}}bJ.init(de);var Ne,Ie,Se,Xe,se,be,Te,pe,W,Q;function $(er,Ke,mr){var Mr=fe.getBoundingClientRect();Ne=Ke-Mr.left,Ie=mr-Mr.top,e._fullLayout._calcInverseTransform(e);var gr=Eo.apply3DTransform(e._fullLayout._invTransform)(Ne,Ie);Ne=gr[0],Ie=gr[1],Se={l:Ne,r:Ne,w:0,t:Ie,b:Ie,h:0},Xe=e._hmpixcount?e._hmlumcount/e._hmpixcount:dJ(e._fullLayout.plot_bgcolor).getLuminance(),se="M0,0H"+_+"V"+b+"H0V0",be=!1,Te="xy",Q=!1,pe=$C(s,Xe,x,T,se),W=KC(s,x,T)}function Me(er,Ke){if(e._transitioningWithDuration)return!1;var mr=Math.max(0,Math.min(_,ee*er+Ne)),Mr=Math.max(0,Math.min(b,te*Ke+Ie)),gr=Math.abs(mr-Ne),dr=Math.abs(Mr-Ie);Se.l=Math.min(Ne,mr),Se.r=Math.max(Ne,mr),Se.t=Math.min(Ie,Mr),Se.b=Math.max(Ie,Mr);function Tr(){Te="",Se.r=Se.l,Se.t=Se.b,W.attr("d","M0,0Z")}if(A.isSubplotConstrained)gr>hi||dr>hi?(Te="xy",gr/_>dr/b?(dr=gr*b/_,Ie>Mr?Se.t=Ie-dr:Se.b=Ie+dr):(gr=dr*_/b,Ne>mr?Se.l=Ne-gr:Se.r=Ne+gr),W.attr("d",qg(Se))):Tr();else if(S.isSubplotConstrained)if(gr>hi||dr>hi){Te="xy";var Pr=Math.min(Se.l/_,(b-Se.b)/b),Ur=Math.max(Se.r/_,(b-Se.t)/b);Se.l=Pr*_,Se.r=Ur*_,Se.b=(1-Pr)*b,Se.t=(1-Ur)*b,W.attr("d",qg(Se))}else Tr();else!D||dr0){var _e;if(S.isSubplotConstrained||!M&&D.length===1){for(_e=0;_e1&&(Tr.maxallowed!==void 0&&F===(Tr.range[0]1&&(Pr.maxallowed!==void 0&&H===(Pr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function DJ(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function $C(e,r,t,n,a){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",ZC(t,n)).attr("d",a+"Z")}function KC(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:HC.background,stroke:HC.defaultLine,"stroke-width":1,opacity:0}).attr("transform",ZC(r,t)).attr("d","M0,0Z")}function QC(e,r,t,n,a,i){e.attr("d",n+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),eL(e,r,a,i)}function eL(e,r,t,n){t||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function X5(e){j5.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function rL(e){UC&&e.data&&e._context.showTips&&(Eo.notifier(Eo._(e,"Double-click to zoom back out"),"long"),UC=!1)}function EJ(e,r){return"M"+(e.l-.5)+","+(r-hi-.5)+"h-3v"+(2*hi+1)+"h3ZM"+(e.r+.5)+","+(r-hi-.5)+"h3v"+(2*hi+1)+"h-3Z"}function PJ(e,r){return"M"+(r-hi-.5)+","+(e.t-.5)+"v-3h"+(2*hi+1)+"v3ZM"+(r-hi-.5)+","+(e.b+.5)+"v3h"+(2*hi+1)+"v-3Z"}function qg(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,hi)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function VC(e,r,t,n,a){for(var i=!1,o={},l={},s,u,f,v,h=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m{"use strict";var RJ=kt(),Dg=ss(),zJ=To(),NJ=Ku(),_l=aL().makeDragBox,wa=Pa().DRAGGERSIZE;Eg.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){RJ.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var n=Object.keys(t._plots||{}).sort(function(i,o){if((t._plots[i].mainplot&&!0)===(t._plots[o].mainplot&&!0)){var l=i.split("y"),s=o.split("y");return l[0]===s[0]?Number(l[1]||1)-Number(s[1]||1):Number(l[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});n.forEach(function(i){var o=t._plots[i],l=o.xaxis,s=o.yaxis;if(!o.mainplot){var u=_l(r,o,l._offset,s._offset,l._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&Dg.hover(r,h,i)},Dg.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,zJ.unhover(r,h))},r._context.showAxisDragHandles&&(_l(r,o,l._offset-wa,s._offset-wa,wa,wa,"n","w"),_l(r,o,l._offset+l._length,s._offset-wa,wa,wa,"n","e"),_l(r,o,l._offset-wa,s._offset+s._length,wa,wa,"s","w"),_l(r,o,l._offset+l._length,s._offset+s._length,wa,wa,"s","e"))}if(r._context.showAxisDragHandles){if(i===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=wa),_l(r,o,l._offset+l._length*.1,f,l._length*.8,wa,"","ew"),_l(r,o,l._offset,f,l._length*.1,wa,"","w"),_l(r,o,l._offset+l._length*.9,f,l._length*.1,wa,"","e")}if(i===s._mainSubplot){var v=s._mainLinePosition;s.side!=="right"&&(v-=wa),_l(r,o,v,s._offset+s._length*.1,wa,s._length*.8,"ns",""),_l(r,o,v,s._offset+s._length*.9,wa,s._length*.1,"s",""),_l(r,o,v,s._offset,wa,s._length*.1,"n","")}}});var a=t._hoverlayer.node();a.onmousemove=function(i){i.target=r._fullLayout._lasthover,Dg.hover(r,i,t._hoversubplot)},a.onclick=function(i){i.target=r._fullLayout._lasthover,Dg.click(r,i)},a.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},Eg.updateFx(r)}};Eg.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";NJ(r._draggers,t)}});var lL=ne((ace,oL)=>{"use strict";var iL=dt();oL.exports=function(r){for(var t=iL.layoutArrayContainers,n=iL.layoutArrayRegexes,a=r.split("[")[0],i,o,l=0;l{"use strict";var FJ=Gs(),K5=dd(),th=Pu(),IJ=Wy().sorterAsc,Q5=dt();nh.containerArrayMatch=lL();var HJ=nh.isAddVal=function(r){return r==="add"||FJ(r)},sL=nh.isRemoveVal=function(r){return r===null||r==="remove"};nh.applyContainerArrayChanges=function(r,t,n,a,i){var o=t.astr,l=Q5.getComponentMethod(o,"supplyLayoutDefaults"),s=Q5.getComponentMethod(o,"draw"),u=Q5.getComponentMethod(o,"drawOne"),f=a.replot||a.recalc||l===K5||s===K5,v=r.layout,h=r._fullLayout;if(n[""]){Object.keys(n).length>1&&th.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(sL(d))t.set(null);else if(Array.isArray(d))t.set(d);else return th.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(l(v,h),s(r),!0)}var m=Object.keys(n).map(Number).sort(IJ),g=t.get(),y=g||[],x=i(h,o).get(),T=[],_=-1,b=y.length,A,S,M,D,z,F,H,Y;for(A=0;Ay.length-(H?0:1)){th.warn("index out of range",o,M);continue}if(F!==void 0)z.length>1&&th.warn("Insertion & removal are incompatible with edits to the same index.",o,M),sL(F)?T.push(M):H?(F==="add"&&(F={}),y.splice(M,0,F),x&&x.splice(M,0,{})):th.warn("Unrecognized full object edit value",o,M,F),_===-1&&(_=M);else for(S=0;S=0;A--)y.splice(T[A],1),x&&x.splice(T[A],1);if(y.length?g||t.set(y):t.set(null),f)return!1;if(l(v,h),u!==K5){var O;if(_===-1)O=m;else{for(b=Math.max(y.length,b),O=[],A=0;A=_));A++)O.push(M);for(A=_;A{"use strict";var hL=Bt(),oce=Fy(),dL=dt(),Fi=pr(),ah=ua(),pL=ya(),gL=zt(),ih=pL.cleanId,BJ=pL.getFromTrace,eb=dL.traceIs;xl.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Fi.log("Clearing previous rejected promises from queue."),e._promises=[]};xl.cleanLayout=function(e){var r,t;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=(ah.subplotsRegistry.cartesian||{}).attrRegex,a=(ah.subplotsRegistry.polar||{}).attrRegex,i=(ah.subplotsRegistry.ternary||{}).attrRegex,o=(ah.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(y.x=1.02,y.xanchor="left"):y.x<-2&&(y.x=-.02,y.xanchor="right"),y.y>3?(y.y=1.02,y.yanchor="bottom"):y.y<-2&&(y.y=-.02,y.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),gL.clean(e),e.template&&e.template.layout&&xl.cleanLayout(e.template.layout),e};function cv(e,r){var t=e[r],n=r.charAt(0);t&&t!=="paper"&&(e[r]=ih(t,n,!0))}xl.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}xl.hasParent=function(e,r){for(var t=vL(r);t;){if(t in e)return!0;t=vL(t)}return!1};var YJ=["x","y","z"];xl.clearAxisTypes=function(e,r,t){for(var n=0;n{"use strict";var Ng=kt(),GJ=Bt(),VJ=i2(),Rr=pr(),bn=Rr.nestedProperty,nb=v1(),di=$w(),Po=dt(),Yg=z0(),ft=ua(),ai=Cn(),WJ=k3(),ZJ=pl(),rb=ln(),XJ=zt(),jJ=$5().initInteractions,JJ=lc(),$J=nu().clearOutline,wL=Kf().dfltConfig,Rg=uL(),na=mL(),rn=hg(),af=_o(),KJ=Pa().AX_NAME_PATTERN,tb=0,yL=5;function QJ(e,r,t,n){var a;if(e=Rr.getGraphDiv(e),nb.init(e),Rr.isPlainObject(r)){var i=r;r=i.data,t=i.layout,n=i.config,a=i.frames}var o=nb.triggerHandler(e,"plotly_beforeplot",[r,t,n]);if(o===!1)return Promise.reject();!r&&!t&&!Rr.isPlotDiv(e)&&Rr.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(a)return Vt.addFrames(e,a)}AL(e,n),t||(t={}),Ng.select(e).classed("js-plotly-plot",!0),rb.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(na.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=na.cleanLayout(t)),ft.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(x$(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),rb.initGradients(e),rb.initPatterns(e),s&&ai.saveShowSpikeInitial(e);var v=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;v&&ft.doCalcdata(e);for(var h=0;h=e.data.length||a<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(a,n+1)>-1||a>=0&&r.indexOf(-e.data.length+a)>-1||a<0&&r.indexOf(e.data.length+a)>-1)throw new Error("each index in "+t+" must be unique.")}}function TL(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),Ig(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&Ig(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function a$(e,r,t){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),n=0;n=0&&f=0&&f0&&typeof D.parts[H]!="string";)H--;var Y=D.parts[H],O=D.parts[H-1]+"."+Y,X=D.parts.slice(0,H).join("."),V=bn(e.layout,X).get(),ee=bn(n,X).get(),te=D.get();if(z!==void 0){x[M]=z,T[M]=Y==="reverse"?z:au(te);var K=Yg.getLayoutValObject(n,D.parts);if(K&&K.impliedEdits&&z!==null)for(var re in K.impliedEdits)_(Rr.relativeAttr(M,re),K.impliedEdits[re]);if(["width","height"].indexOf(M)!==-1)if(z){_("autosize",null);var fe=M==="height"?"width":"height";_(fe,n[fe])}else n[M]=e._initialAutoSize[M];else if(M==="autosize")_("width",z?null:n.width),_("height",z?null:n.height);else if(O.match(RL))S(O),bn(n,X+"._inputRange").set(null);else if(O.match(zL)){S(O),bn(n,X+"._inputRange").set(null);var de=bn(n,X).get();de._inputDomain&&(de._input.domain=de._inputDomain.slice())}else O.match(NL)&&bn(n,X+"._inputDomain").set(null);if(Y==="type"){A=V;var qe=ee.type==="linear"&&z==="log",Be=ee.type==="log"&&z==="linear";if(qe||Be){if(!A||!A.range)_(X+".autorange",!0);else if(ee.autorange)qe&&(A.range=A.range[1]>A.range[0]?[1,2]:[2,1]);else{var Ne=A.range[0],Ie=A.range[1];qe?(Ne<=0&&Ie<=0&&_(X+".autorange",!0),Ne<=0?Ne=Ie/1e6:Ie<=0&&(Ie=Ne/1e6),_(X+".range[0]",Math.log(Ne)/Math.LN10),_(X+".range[1]",Math.log(Ie)/Math.LN10)):(_(X+".range[0]",Math.pow(10,Ne)),_(X+".range[1]",Math.pow(10,Ie)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[D.parts[0]]&&D.parts[1]==="radialaxis"&&delete n[D.parts[0]]._subplot.viewInitial["radialaxis.range"],Po.getComponentMethod("annotations","convertCoords")(e,ee,z,_),Po.getComponentMethod("images","convertCoords")(e,ee,z,_)}else _(X+".autorange",!0),_(X+".range",null);bn(n,X+"._inputRange").set(null)}else if(Y.match(KJ)){var Se=bn(n,M).get(),Xe=(z||{}).type;(!Xe||Xe==="-")&&(Xe="linear"),Po.getComponentMethod("annotations","convertCoords")(e,Se,Xe,_),Po.getComponentMethod("images","convertCoords")(e,Se,Xe,_)}var se=Rg.containerArrayMatch(M);if(se){f=se.array,v=se.index;var be=se.property,Te=K||{editType:"calc"};v!==""&&be===""&&(Rg.isAddVal(z)?T[M]=null:Rg.isRemoveVal(z)?T[M]=(bn(t,f).get()||[])[v]:Rr.warn("unrecognized full object value",r)),af.update(y,Te),u[f]||(u[f]={});var pe=u[f][v];pe||(pe=u[f][v]={}),pe[be]=z,delete r[M]}else Y==="reverse"?(V.range?V.range.reverse():(_(X+".autorange",!0),V.range=[1,0]),ee.autorange?y.calc=!0:y.plot=!0):(M==="dragmode"&&(z===!1&&te!==!1||z!==!1&&te===!1)||n._has("scatter-like")&&n._has("regl")&&M==="dragmode"&&(z==="lasso"||z==="select")&&!(te==="lasso"||te==="select")?y.plot=!0:K?af.update(y,K):y.calc=!0,D.set(z))}}for(f in u){var W=Rg.applyContainerArrayChanges(e,i(t,f),u[f],y,i);W||(y.plot=!0)}for(var Q in b){A=ai.getFromId(e,Q);var $=A&&A._constraintGroup;if($){y.calc=!0;for(var Me in $)b[Me]||(ai.getFromId(e,Me)._constraintShrinkable=!0)}}(IL(e)||r.height||r.width)&&(y.plot=!0);var Fe=n.shapes;for(v=0;v1;)if(n.pop(),t=bn(r,n.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function f$(e,r){for(var t=0;t=a.length?a[0]:a[u]:a}function l(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var v=0;return function(){if(u&&++v===f)return u()}}return new Promise(function(u,f){function v(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var Y=n._frameQueue.pop();Y.onInterrupt&&Y.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(Y){if(Y.length!==0){for(var O=0;On._timeToNext&&m()};Y()}var y=0;function x(Y){return Array.isArray(a)?y>=a.length?Y.transitionOpts=a[y]:Y.transitionOpts=a[0]:Y.transitionOpts=a,y++,Y}var T,_,b=[],A=r==null,S=Array.isArray(r),M=!A&&!S&&Rr.isPlainObject(r);if(M)b.push({type:"object",data:x(Rr.extendFlat({},r))});else if(A||["string","number"].indexOf(typeof r)!==-1)for(T=0;T0&&FF)&&H.push(_);b=H}}b.length>0?h(b):(e.emit("plotly_animated"),u())})}function m$(e,r,t){if(e=Rr.getGraphDiv(e),r==null)return Promise.resolve();if(!Rr.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,a,i,o,l=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=l.length+r.length*2,f=[],v={};for(n=r.length-1;n>=0;n--)if(Rr.isPlainObject(r[n])){var h=r[n].name,d=(s[h]||v[h]||{}).name,m=r[n].name,g=s[d]||v[d];d&&m&&typeof m=="number"&&g&&tbD.index?-1:M.index=0;n--){if(a=f[n].frame,typeof a.name=="number"&&Rr.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;s[a.name="frame "+e._transitionData._counter++];);if(s[a.name]){for(i=0;i=0;t--)n=r[t],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var l=ft.modifyFrames,s=ft.modifyFrames,u=[e,o],f=[e,i];return di&&di.add(e,l,u,s,f),ft.modifyFrames(e,i)}function b$(e){e=Rr.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return ft.cleanPlot([],{},t,r),ft.purge(e),nb.purge(e),r._container&&r._container.remove(),delete e._context,e}function _$(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!Rr.equalDomRects(t,r._lastBBox)){var n=r._invTransform=Rr.inverseTransformMatrix(Rr.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),r._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),r._lastBBox=t}}function x$(e){var r=Ng.select(e),t=e._fullLayout;if(t._calcInverseTransform=_$,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var n={};Ng.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),t._uid=Rr.randstr(n)}t._paperdiv.selectAll(".main-svg").attr(JJ.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var a=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=a.append("g").classed("imagelayer",!0),t._shapeLowerLayer=a.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Vt.animate=g$;Vt.addFrames=m$;Vt.deleteFrames=y$;Vt.addTraces=qL;Vt.deleteTraces=DL;Vt.extendTraces=CL;Vt.moveTraces=ab;Vt.prependTraces=LL;Vt.newPlot=n$;Vt._doPlot=QJ;Vt.purge=b$;Vt.react=h$;Vt.redraw=t$;Vt.relayout=oh;Vt.restyle=Hg;Vt.setPlotConfig=e$;Vt.update=Og;Vt._guiRelayout=ob(oh);Vt._guiRestyle=ob(Hg);Vt._guiUpdate=ob(Og);Vt._storeDirectGUIEdit=l$});var Sc=ne(cs=>{"use strict";var w$=dt();cs.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};cs.getRedrawFunc=function(e){return function(){w$.getComponentMethod("colorbar","draw")(e)}};cs.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};cs.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var HL=window.URL||window.webkitURL;cs.createObjectURL=function(e){return HL.createObjectURL(e)};cs.revokeObjectURL=function(e){return HL.revokeObjectURL(e)};cs.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=M$(window.atob(e));return new window.Blob([t],{type:"image/"+r})};cs.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function M$(e){for(var r=e.length,t=new ArrayBuffer(r),n=new Uint8Array(t),a=0;a{"use strict";var ub=kt(),fce=pr(),A$=ln(),T$=zt(),cce=lc(),sb=/"/g,sh="TOBESTRIPPED",k$=new RegExp('("'+sh+")|("+sh+'")',"g");function S$(e){var r=ub.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":r.html(n).text()});return r.remove(),t}function C$(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}BL.exports=function(r,t,n){var a=r._fullLayout,i=a._paper,o=a._toppaper,l=a.width,s=a.height,u;i.insert("rect",":first-child").call(A$.setRect,0,0,l,s).call(T$.fill,a.paper_bgcolor);var f=a._basePlotModules||[];for(u=0;u{"use strict";var L$=pr(),q$=Fd().EventEmitter,uh=Sc();function D$(e){var r=e.emitter||new q$,t=new Promise(function(n,a){var i=window.Image,o=e.svg,l=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,v=e.height||150,h=u*f,d=u*v,m=s.getContext("2d",{willReadFrequently:!0}),g=new i,y,x;l==="svg"||L$.isSafari()?x=uh.encodeSVG(o):(y=uh.createBlob(o,"svg"),x=uh.createObjectURL(y)),s.width=h,s.height=d,g.onload=function(){var T;switch(y=null,uh.revokeObjectURL(x),l!=="svg"&&m.drawImage(g,0,0,h,d),l){case"jpeg":T=s.toDataURL("image/jpeg");break;case"png":T=s.toDataURL("image/png");break;case"webp":T=s.toDataURL("image/webp");break;case"svg":T=x;break;default:var _="Image format is not jpeg, png, svg or webp.";if(a(new Error(_)),!e.promise)return r.emit("error",_)}n(T),e.promise||r.emit("success",T)},g.onerror=function(T){if(y=null,uh.revokeObjectURL(x),a(T),!e.promise)return r.emit("error",T)},g.src=x});return e.promise?t:r}OL.exports=D$});var cb=ne((dce,GL)=>{"use strict";var UL=Bt(),YL=lb(),E$=ua(),vs=pr(),fh=Sc(),P$=Vg(),R$=Wg(),z$=Jh().version,fb={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 N$(e,r){r=r||{};var t,n,a,i;vs.isPlainObject(e)?(t=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=vs.getGraphDiv(e),t=vs.extendDeep([],e.data),n=vs.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(S){return!(S in r)||vs.validate(r[S],fb[S])}if(!o("width")&&r.width!==null||!o("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+vs.join2(fb.format.values,", "," or ")+".");var l={};function s(S,M){return vs.coerce(r,l,fb,S,M)}var u=s("format"),f=s("width"),v=s("height"),h=s("scale"),d=s("setBackground"),m=s("imageDataOnly"),g=document.createElement("div");g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);var y=vs.extendFlat({},n);f?y.width=f:r.width===null&&UL(i.width)&&(y.width=i.width),v?y.height=v:r.height===null&&UL(i.height)&&(y.height=i.height);var x=vs.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),T=fh.getRedrawFunc(g);function _(){return new Promise(function(S){setTimeout(S,fh.getDelay(g._fullLayout))})}function b(){return new Promise(function(S,M){var D=P$(g,u,h),z=g._fullLayout.width,F=g._fullLayout.height;function H(){YL.purge(g),document.body.removeChild(g)}if(u==="full-json"){var Y=E$.graphJson(g,!1,"keepdata","object",!0,!0);return Y.version=z$,Y=JSON.stringify(Y),H(),S(m?Y:fh.encodeJSON(Y))}if(H(),u==="svg")return S(m?D:fh.encodeSVG(D));var O=document.createElement("canvas");O.id=vs.randstr(),R$({format:u,width:z,height:F,scale:h,canvas:O,svg:D,promise:!0}).then(S).catch(M)})}function A(S){return m?S.replace(fh.IMAGE_URL_PREFIX,""):S}return new Promise(function(S,M){YL.newPlot(g,t,y,x).then(T).then(_).then(b).then(function(D){S(A(D))}).catch(function(D){M(D)})})}GL.exports=N$});var XL=ne((pce,ZL)=>{"use strict";var Ro=pr(),F$=ua(),I$=z0(),H$=Kf().dfltConfig,wl=Ro.isPlainObject,Lc=Array.isArray,VL=Ro.isArrayOrTypedArray;ZL.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var n=I$.get(),a=[],i={_context:Ro.extendFlat({},H$)},o,l;Lc(r)?(i.data=Ro.extendDeep([],r),o=r):(i.data=[],o=[],a.push(Ma("array","data"))),wl(t)?(i.layout=Ro.extendDeep({},t),l=t):(i.layout={},l={},arguments.length>1&&a.push(Ma("object","layout"))),F$.supplyDefaults(i);for(var s=i._fullData,u=o.length,f=0;fv.length&&n.push(Ma("unused",a,u.concat(v.length)));var x=v.length,T=Array.isArray(y);T&&(x=Math.min(x,y.length));var _,b,A,S,M;if(h.dimensions===2)for(b=0;bv[b].length&&n.push(Ma("unused",a,u.concat(b,v[b].length)));var D=v[b].length;for(_=0;_<(T?Math.min(D,y[b].length):D);_++)A=T?y[b][_]:y,S=f[b][_],M=v[b][_],Ro.validate(S,A)?M!==S&&M!==+S&&n.push(Ma("dynamic",a,u.concat(b,_),S,M)):n.push(Ma("value",a,u.concat(b,_),S))}else n.push(Ma("array",a,u.concat(b),f[b]));else for(b=0;b{"use strict";var W$=pr(),Xg=Sc();function Z$(e,r,t){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,l){var s,u;if(a)return s=Xg.createBlob(e,t),u=Xg.createObjectURL(s),n.href=u,n.download=r,document.body.appendChild(n),n.click(),document.body.removeChild(n),Xg.revokeObjectURL(u),s=null,o(r);if(W$.isSafari()){var f=t==="svg"?",":";base64,";return Xg.octetStream(f+encodeURIComponent(e)),o(r)}l(new Error("download error"))});return i}jL.exports=Z$});var vb=ne((yce,KL)=>{"use strict";var $L=pr(),X$=cb(),j$=JL(),mce=Sc();function J$(e,r){var t;return $L.isPlainObject(e)||(t=$L.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(n,a){t&&t._snapshotInProgress&&a(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=X$(e,r),o=r.filename||e.fn||"newplot";o+="."+r.format.replace("-","."),i.then(function(l){return t&&(t._snapshotInProgress=!1),j$(l,o,r.format)}).then(function(l){n(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),a(l)})})}KL.exports=J$});var nq=ne(hb=>{"use strict";var Ii=pr(),Hi=Ii.isPlainObject,QL=z0(),eq=ua(),$$=bo(),rq=_n(),tq=Kf().dfltConfig;hb.makeTemplate=function(e){e=Ii.isPlainObject(e)?e:Ii.getGraphDiv(e),e=Ii.extendDeep({_context:tq},{data:e.data,layout:e.layout}),eq.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var n={data:{},layout:{}};r.forEach(function(d){var m={};ch(d,m,Q$.bind(null,d));var g=Ii.coerce(d,{},$$,"type"),y=n.data[g];y||(y=n.data[g]=[]),y.push(m)}),ch(t,n.layout,K$.bind(null,t)),delete n.layout.template;var a=t.template;if(Hi(a)){var i=a.layout,o,l,s,u,f,v;Hi(i)&&jg(i,n.layout);var h=a.data;if(Hi(h)){for(l in n.data)if(s=h[l],Array.isArray(s)){for(f=n.data[l],v=f.length,u=s.length,o=0;ox?o.push({code:"unused",traceType:d,templateCount:y,dataCount:x}):x>y&&o.push({code:"reused",traceType:d,templateCount:y,dataCount:x})}}function T(_,b){for(var A in _)if(A.charAt(0)!=="_"){var S=_[A],M=zo(_,A,b);Hi(S)?(Array.isArray(_)&&S._template===!1&&S.templateitemname&&o.push({code:"missing",path:M,templateitemname:S.templateitemname}),T(S,M)):Array.isArray(S)&&eK(S)&&T(S,M)}}if(T({data:s,layout:l},""),o.length)return o.map(rK)};function eK(e){for(var r=0;r{"use strict";var ca=lb();kn._doPlot=ca._doPlot;kn.newPlot=ca.newPlot;kn.restyle=ca.restyle;kn.relayout=ca.relayout;kn.redraw=ca.redraw;kn.update=ca.update;kn._guiRestyle=ca._guiRestyle;kn._guiRelayout=ca._guiRelayout;kn._guiUpdate=ca._guiUpdate;kn._storeDirectGUIEdit=ca._storeDirectGUIEdit;kn.react=ca.react;kn.extendTraces=ca.extendTraces;kn.prependTraces=ca.prependTraces;kn.addTraces=ca.addTraces;kn.deleteTraces=ca.deleteTraces;kn.moveTraces=ca.moveTraces;kn.purge=ca.purge;kn.addFrames=ca.addFrames;kn.deleteFrames=ca.deleteFrames;kn.animate=ca.animate;kn.setPlotConfig=ca.setPlotConfig;var tK=a1().getGraphDiv,nK=og().eraseActiveShape;kn.deleteActiveShape=function(e){return nK(tK(e))};kn.toImage=cb();kn.validate=XL();kn.downloadImage=vb();var aq=nq();kn.makeTemplate=aq.makeTemplate;kn.validateTemplate=aq.validateTemplate});var lq=ne((xce,oq)=>{"use strict";var db=pr(),aK=dt();oq.exports=function(r,t,n,a){var i=a("x"),o=a("y"),l,s=aK.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],n),i){var u=db.minRowLength(i);o?l=Math.min(u,db.minRowLength(o)):(l=u,a("y0"),a("dy"))}else{if(!o)return 0;l=db.minRowLength(o),a("x0"),a("dx")}return t._length=l,l}});var cq=ne((wce,fq)=>{"use strict";var sq=pr().dateTick0,iK=En(),oK=iK.ONEWEEK;function uq(e,r){return e%oK===0?sq(r,1):sq(r,0)}fq.exports=function(r,t,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",uq(o,t.xcalendar)),a("xperiodalignment"))}if(i.y){var l=a("yperiod");l&&(a("yperiod0",uq(l,t.ycalendar)),a("yperiodalignment"))}}});var dq=ne((Mce,hq)=>{"use strict";var vq=["orientation","groupnorm","stackgaps"];hq.exports=function(r,t,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var u=s[o],f=!1;u?u.traces.push(t):(u=s[o]={traceIndices:[],traces:[t]},f=!0);for(var v={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var pq=zt(),gq=es().hasColorscale,mq=B0(),lK=Qa();yq.exports=function(r,t,n,a,i,o){var l=lK.isBubble(r),s=(r.line||{}).color,u;if(o=o||{},s&&(n=s),i("marker.symbol"),i("marker.opacity",l?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),gq(r,"marker")&&mq(r,t,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:l?u=pq.background:u=pq.defaultLine,i("marker.line.color",u),gq(r,"marker.line")&&mq(r,t,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",l?1:0)),l&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var gb=ne((Tce,bq)=>{"use strict";var sK=pr().isArrayOrTypedArray,uK=es().hasColorscale,fK=B0();bq.exports=function(r,t,n,a,i,o){o||(o={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),i("line.color",n),uK(r,"line"))fK(r,t,a,i,{prefix:"line.",cLetter:"c"});else{var s=(sK(l)?!1:l)||n;i("line.color",s)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var xq=ne((kce,_q)=>{"use strict";_q.exports=function(r,t,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var mb=ne((Sce,wq)=>{"use strict";var cK=pr();wq.exports=function(e,r,t,n,a){a=a||{},n("textposition"),cK.coerceFont(n,"textfont",a.font||t.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var yb=ne((Cce,Aq)=>{"use strict";var $g=zt(),Mq=pr().isArrayOrTypedArray;function vK(e){for(var r=$g.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var Tq=pr(),hK=dt(),dK=kc(),pK=Ag(),vv=Qa(),gK=lq(),mK=cq(),yK=dq(),bK=pb(),_K=gb(),kq=xq(),xK=mb(),wK=yb(),MK=pr().coercePattern;Sq.exports=function(r,t,n,a){function i(d,m){return Tq.coerce(r,t,dK,d,m)}var o=gK(r,t,a,i);if(o||(t.visible=!1),!!t.visible){mK(r,t,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var l=yK(r,t,a,i);a.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!l&&o{"use strict";var AK=F1().getAxisGroup;Lq.exports=function(r,t,n,a,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=AK(n,l)+o,u=n._alignmentOpts||{},f=a("alignmentgroup"),v=u[s];v||(v=u[s]={});var h=v[f];h?h.traces.push(t):h=v[f]={traces:[t],alignmentIndex:Object.keys(v).length,offsetGroups:{}};var d=a("offsetgroup")||"",m=h.offsetGroups,g=m[d];t._offsetIndex=0,(i!=="group"||d)&&(g||(g=m[d]={offsetIndex:Object.keys(m).length}),t._offsetIndex=g.offsetIndex)}});var Eq=ne((Dce,Dq)=>{"use strict";var TK=pr(),kK=qq(),SK=kc();Dq.exports=function(r,t){var n,a,i,o=t.scattermode;function l(h){return TK.coerce(a._input,a,SK,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var v=r[f];if(v.type==="scatter"&&v.xaxis===s.xaxis&&v.yaxis===s.yaxis){v.opacity=void 0;break}}}}}});var Rq=ne((Ece,Pq)=>{"use strict";var CK=pr(),LK=Ud();Pq.exports=function(e,r){function t(a,i){return CK.coerce(e,r,LK,a,i)}var n=r.barmode==="group";r.scattermode==="group"&&t("scattergap",n?r.bargap:.2)}});var Fq=ne((Pce,Nq)=>{"use strict";var qK=Bt(),zq=pr(),DK=zq.dateTime2ms,Kg=zq.incrementMonth,EK=En(),PK=EK.ONEAVGMONTH;Nq.exports=function(r,t,n,a){if(t.type!=="date")return{vals:a};var i=r[n+"periodalignment"];if(!i)return{vals:a};var o=r[n+"period"],l;if(qK(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:a}}for(var u=t.calendar,f=i==="start",v=i==="end",h=r[n+"period0"],d=DK(h,u)||0,m=[],g=[],y=[],x=a.length,T=0;T_;)S=Kg(S,-l,u);for(;S<=_;)S=Kg(S,l,u);A=Kg(S,-l,u)}else{for(b=Math.round((_-d)/o),S=d+b*o;S>_;)S-=o;for(;S<=_;)S+=o;A=S-o}m[T]=f?A:v?S:(A+S)/2,g[T]=A,y[T]=S}return{vals:m,starts:g,ends:y}}});var xb=ne((Rce,Hq)=>{"use strict";var bb=es().hasColorscale,_b=Qd(),Iq=Qa();Hq.exports=function(r,t){Iq.hasLines(t)&&bb(t,"line")&&_b(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),Iq.hasMarkers(t)&&(bb(t,"marker")&&_b(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),bb(t,"marker.line")&&_b(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var vh=ne((zce,Bq)=>{"use strict";var Un=pr();Bq.exports=function(r,t){for(var n=0;n{"use strict";var Oq=pr();Uq.exports=function(r,t){Oq.isArrayOrTypedArray(t.selectedpoints)&&Oq.tagSelected(r,t)}});var em=ne((Fce,jq)=>{"use strict";var Yq=Bt(),Mb=pr(),hh=Cn(),Gq=Fq(),wb=En().BADNUM,Ab=Qa(),RK=xb(),zK=vh(),NK=Qg();function FK(e,r){var t=e._fullLayout,n=r._xA=hh.getFromId(e,r.xaxis||"x","x"),a=r._yA=hh.getFromId(e,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),l=Gq(r,n,"x",i),s=Gq(r,a,"y",o),u=l.vals,f=s.vals,v=r._length,h=new Array(v),d=r.ids,m=Tb(r,t,n,a),g=!1,y,x,T,_,b,A;Zq(t,r);var S="x",M="y",D;if(m)Mb.pushUnique(m.traceIndices,r.index),y=m.orientation==="v",y?(M="s",D="x"):(S="s",D="y"),b=m.stackgaps==="interpolate";else{var z=Wq(r,v);Vq(e,r,n,a,u,f,z)}var F=!!r.xperiodalignment,H=!!r.yperiodalignment;for(x=0;xx&&h[_].gap;)_--;for(A=h[_].s,T=h.length-1;T>_;T--)h[T].s=A;for(;x<_;)if(x++,h[x].gap){for(T=x+1;h[T].gap;)T++;for(var V=h[x-1][D],ee=h[x-1].s,te=(h[T].s-ee)/(h[T][D]-V);x{"use strict";Jq.exports=rm;var IK=pr().distinctVals;function rm(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,n=r.posAxis._id.charAt(0),a=[],i=0;i{"use strict";var No=Bt(),of=pr().isArrayOrTypedArray,hv=En().BADNUM,HK=dt(),dh=Cn(),BK=F1().getAxisGroup,tm=$q();function OK(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;us+o||!No(l))}for(var f=0;f{"use strict";var nD=em(),aD=tD().setGroupPositions;function QK(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;uz[f]&&f{"use strict";var rQ=ln(),fD=En(),ph=fD.BADNUM,cD=fD.LOG_CLIP,lD=cD+.5,sD=cD-.5,nm=pr(),tQ=nm.segmentsIntersect,uD=nm.constrain,Db=Ag();vD.exports=function(r,t){var n=t.trace||{},a=t.xaxis,i=t.yaxis,o=a.type==="log",l=i.type==="log",s=a._length,u=i._length,f=t.backoff,v=n.marker,h=t.connectGaps,d=t.baseTolerance,m=t.shape,g=m==="linear",y=n.fill&&n.fill!=="none",x=[],T=Db.minTolerance,_=r.length,b=new Array(_),A=0,S,M,D,z,F,H,Y,O,X,V,ee,te,K,re,fe,de;function qe(sr){var _e=r[sr];if(!_e)return!1;var ke=t.linearized?a.l2p(_e.x):a.c2p(_e.x),$e=t.linearized?i.l2p(_e.y):i.c2p(_e.y);if(ke===ph){if(o&&(ke=a.c2p(_e.x,!0)),ke===ph)return!1;l&&$e===ph&&(ke*=Math.abs(a._m*u*(a._m>0?lD:sD)/(i._m*s*(i._m>0?lD:sD)))),ke*=1e3}if($e===ph){if(l&&($e=i.c2p(_e.y,!0)),$e===ph)return!1;$e*=1e3}return[ke,$e]}function Be(sr,_e,ke,$e){var We=ke-sr,qr=$e-_e,Vr=.5-sr,Hr=.5-_e,lt=We*We+qr*qr,xt=We*Vr+qr*Hr;if(xt>0&&xt1||Math.abs(Vr.y-ke[0][1])>1)&&(Vr=[Vr.x,Vr.y],$e&&Xe(Vr,sr)Te||sr[1]W)return[uD(sr[0],be,Te),uD(sr[1],pe,W)]}function lr(sr,_e){if(sr[0]===_e[0]&&(sr[0]===be||sr[0]===Te)||sr[1]===_e[1]&&(sr[1]===pe||sr[1]===W))return!0}function ir(sr,_e){var ke=[],$e=ar(sr),We=ar(_e);return $e&&We&&lr($e,We)||($e&&ke.push($e),We&&ke.push(We)),ke}function rr(sr,_e,ke){return function($e,We){var qr=ar($e),Vr=ar(We),Hr=[];if(qr&&Vr&&lr(qr,Vr))return Hr;qr&&Hr.push(qr),Vr&&Hr.push(Vr);var lt=2*nm.constrain(($e[sr]+We[sr])/2,_e,ke)-((qr||$e)[sr]+(Vr||We)[sr]);if(lt){var xt;qr&&Vr?xt=lt>0==qr[sr]>Vr[sr]?qr:Vr:xt=qr||Vr,xt[sr]+=lt}return Hr}}var Cr;m==="linear"||m==="spline"?Cr=Ze:m==="hv"||m==="vh"?Cr=ir:m==="hvh"?Cr=rr(0,be,Te):m==="vhv"&&(Cr=rr(1,pe,W));function yr(sr,_e){var ke=_e[0]-sr[0],$e=(_e[1]-sr[1])/ke,We=(sr[1]*_e[0]-_e[1]*sr[0])/ke;return We>0?[$e>0?be:Te,W]:[$e>0?Te:be,pe]}function Ae(sr){var _e=sr[0],ke=sr[1],$e=_e===b[A-1][0],We=ke===b[A-1][1];if(!($e&&We))if(A>1){var qr=_e===b[A-2][0],Vr=ke===b[A-2][1];$e&&(_e===be||_e===Te)&&qr?Vr?A--:b[A-1]=sr:We&&(ke===pe||ke===W)&&Vr?qr?A--:b[A-1]=sr:b[A++]=sr}else b[A++]=sr}function Ve(sr){b[A-1][0]!==sr[0]&&b[A-1][1]!==sr[1]&&Ae([Fe,Oe]),Ae(sr),fr=null,Fe=Oe=0}var je=nm.isArrayOrTypedArray(v);function zr(sr){if(sr&&f&&(sr.i=S,sr.d=r,sr.trace=n,sr.marker=je?v[sr.i]:v,sr.backoff=f),Ne=sr[0]/s,Ie=sr[1]/u,$=sr[0]Te?Te:0,Me=sr[1]W?W:0,$||Me){if(!A)b[A++]=[$||sr[0],Me||sr[1]];else if(fr){var _e=Cr(fr,sr);_e.length>1&&(Ve(_e[0]),b[A++]=_e[1])}else nr=Cr(b[A-1],sr)[0],b[A++]=nr;var ke=b[A-1];$&&Me&&(ke[0]!==$||ke[1]!==Me)?(fr&&(Fe!==$&&Oe!==Me?Ae(Fe&&Oe?yr(fr,sr):[Fe||$,Oe||Me]):Fe&&Oe&&Ae([Fe,Oe])),Ae([$,Me])):Fe-$&&Oe-Me&&Ae([$||Fe,Me||Oe]),fr=sr,Fe=$,Oe=Me}else fr&&Ve(Cr(fr,sr)[0]),b[A++]=sr}for(S=0;S<_;S++)if(M=qe(S),!!M){for(A=0,fr=null,zr(M),S++;S<_;S++){if(z=qe(S),!z){if(h)continue;break}if(!g||!t.simplify){zr(z);continue}var kr=qe(S+1);if(V=Xe(z,M),!(!(y&&(A===0||A===_-1))&&VSe(H,kr))break;D=H,K=X[0]*O[0]+X[1]*O[1],K>ee?(ee=K,z=H,Y=!1):K=r.length||!H)break;zr(H),M=H}}fr&&Ae([Fe||fr[0],Oe||fr[1]]),x.push(b.slice(0,A))}var er=m.slice(m.length-1);if(f&&er!=="h"&&er!=="v"){for(var Ke=!1,mr=-1,Mr=[],gr=0;gr{"use strict";var dD={tonextx:1,tonexty:1,tonext:1};pD.exports=function(r,t,n){var a,i,o,l,s,u={},f=!1,v=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var Ml=kt(),nQ=dt(),gh=pr(),pv=gh.ensureSingle,yD=gh.identity,Yn=ln(),gv=Qa(),aQ=hD(),iQ=gD(),am=yg().tester;bD.exports=function(r,t,n,a,i,o){var l,s,u=!i,f=!!i&&i.duration>0,v=iQ(r,t,n);if(l=a.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),oQ(r,l,t),f){o&&(s=o());var h=Ml.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){a.selectAll("g.trace").each(function(d,m){mD(r,m,t,d,v,this,i)})})}else l.each(function(d,m){mD(r,m,t,d,v,this,i)});u&&l.exit().remove(),a.selectAll("path:not([d])").remove()};function oQ(e,r,t){r.each(function(n){var a=pv(Ml.select(this),"g","fills");Yn.setClipUrl(a,t.layerClipId,e);var i=n[0].trace,o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var l=a.selectAll("g").data(o,yD);l.enter().append("g"),l.exit().each(function(s){i[s]=null}).remove(),l.order().each(function(s){i[s]=pv(Ml.select(this),"path","js-fill")})})}function mD(e,r,t,n,a,i,o){var l=e._context.staticPlot,s;lQ(e,r,t,n,a);var u=!!o&&o.duration>0;function f(rr){return u?rr.transition():rr}var v=t.xaxis,h=t.yaxis,d=n[0].trace,m=d.line,g=Ml.select(i),y=pv(g,"g","errorbars"),x=pv(g,"g","lines"),T=pv(g,"g","points"),_=pv(g,"g","text");if(nQ.getComponentMethod("errorbars","plot")(e,y,t,o),d.visible!==!0)return;f(g).style("opacity",d.opacity);var b,A,S=d.fill.charAt(d.fill.length-1);S!=="x"&&S!=="y"&&(S="");var M,D;S==="y"?(M=1,D=h.c2p(0,!0)):S==="x"&&(M=0,D=v.c2p(0,!0)),n[0][t.isRangePlot?"nodeRangePlot3":"node3"]=g;var z="",F=[],H=d._prevtrace,Y=null,O=null;H&&(z=H._prevRevpath||"",A=H._nextFill,F=H._ownPolygons,Y=H._fillsegments,O=H._fillElement);var X,V,ee="",te="",K,re,fe,de,qe,Be,Ne=[];d._polygons=[];var Ie=[],Se=[],Xe=gh.noop;if(b=d._ownFill,gv.hasLines(d)||d.fill!=="none"){A&&A.datum(n),["hv","vh","hvh","vhv"].indexOf(m.shape)!==-1?(K=Yn.steps(m.shape),re=Yn.steps(m.shape.split("").reverse().join(""))):m.shape==="spline"?K=re=function(rr){var Cr=rr[rr.length-1];return rr.length>1&&rr[0][0]===Cr[0]&&rr[0][1]===Cr[1]?Yn.smoothclosed(rr.slice(1),m.smoothing):Yn.smoothopen(rr,m.smoothing)}:K=re=function(rr){return"M"+rr.join("L")},fe=function(rr){return re(rr.reverse())},Se=aQ(n,{xaxis:v,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(m.width||1,3)/4,shape:m.shape,backoff:m.backoff,simplify:m.simplify,fill:d.fill}),Ie=new Array(Se.length);var se=0;for(s=0;s=l[0]&&g.x<=l[1]&&g.y>=s[0]&&g.y<=s[1]}),h=Math.ceil(v.length/f),d=0;a.forEach(function(g,y){var x=g[0].trace;gv.hasMarkers(x)&&x.marker.maxdisplayed>0&&y{"use strict";xD.exports={container:"marker",min:"cmin",max:"cmax"}});var MD=ne((Vce,wD)=>{"use strict";var im=Cn();wD.exports=function(r,t,n){var a={},i={_fullLayout:n},o=im.getFromTrace(i,t,"x"),l=im.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),a.xLabel=im.tickText(o,o.c2l(s),!0).text,a.yLabel=im.tickText(l,l.c2l(u),!0).text,a}});var mh=ne((Wce,AD)=>{"use strict";var Pb=kt(),mv=ln(),sQ=dt();function uQ(e){var r=Pb.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var n=Pb.select(this),a=t.trace||t[0].trace;Rb(n,a,e)}),r.selectAll("g.text").each(function(t){var n=Pb.select(this),a=t.trace||t[0].trace;zb(n,a,e)}),r.selectAll("g.trace path.js-line").call(mv.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(mv.fillGroupStyle,e,!1),sQ.getComponentMethod("errorbars","style")(r)}function Rb(e,r,t){mv.pointStyle(e.selectAll("path.point"),r,t)}function zb(e,r,t){mv.textPointStyle(e.selectAll("text"),r,t)}function fQ(e,r,t){var n=r[0].trace;n.selectedpoints?(mv.selectedPointStyle(t.selectAll("path.point"),n),mv.selectedTextStyle(t.selectAll("text"),n)):(Rb(t,n,e),zb(t,n,e))}AD.exports={style:uQ,stylePoints:Rb,styleText:zb,styleOnSelect:fQ}});var Nb=ne((Zce,TD)=>{"use strict";var yv=zt(),cQ=Qa();TD.exports=function(r,t){var n,a;if(r.mode==="lines")return n=r.line.color,n&&yv.opacity(n)?n:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,o=t.mlcc||((r.marker||{}).line||{}).color;return a=i&&yv.opacity(i)?i:o&&yv.opacity(o)&&(t.mlw||((r.marker||{}).line||{}).width)?o:"",a?yv.opacity(a)<.3?yv.addOpacity(a,.3):a:(n=(r.line||{}).color,n&&yv.opacity(n)&&cQ.hasLines(r)&&r.line.width?n:r.fillcolor)}});var CD=ne((Xce,SD)=>{"use strict";var om=pr(),kD=ss(),vQ=dt(),hQ=Nb(),Fb=zt(),dQ=om.fillText;SD.exports=function(r,t,n,a){var i=r.cd,o=i[0].trace,l=r.xa,s=r.ya,u=l.c2p(t),f=s.c2p(n),v=[u,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,m=!!o.xperiodalignment,g=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var y=function(te){if(m){var K=l.c2p(te.xStart),re=l.c2p(te.xEnd);return u>=Math.min(K,re)&&u<=Math.max(K,re)?0:1/0}var fe=Math.max(3,te.mrc||0),de=1-1/fe,qe=Math.abs(l.c2p(te.x)-u);return qe=Math.min(K,re)&&f<=Math.max(K,re)?0:1/0}var fe=Math.max(3,te.mrc||0),de=1-1/fe,qe=Math.abs(s.c2p(te.y)-f);return qeNe!=W>=Ne&&(be=Xe[Se-1][0],Te=Xe[Se][0],W-pe&&(se=be+(Te-be)*(Ne-pe)/(W-pe),fe=Math.min(fe,se),de=Math.max(de,se)));return fe=Math.max(fe,0),de=Math.min(de,l._length),{x0:fe,x1:de,y0:Ne,y1:Ne}}if(h.indexOf("fills")!==-1&&o._fillElement){var X=Y(o._fillElement)&&!Y(o._fillExclusionElement);if(X){var V=O(o._polygons);V===null&&(V={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var ee=Fb.defaultLine;return Fb.opacity(o.fillcolor)?ee=o.fillcolor:Fb.opacity((o.line||{}).color)&&(ee=o.line.color),om.extendFlat(r,{distance:r.maxHoverDistance,x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1,color:ee,hovertemplate:!1}),delete r.index,o.text&&!om.isArrayOrTypedArray(o.text)?r.text=String(o.text):r.text=o.name,[r]}}}});var DD=ne((jce,qD)=>{"use strict";var LD=Qa();qD.exports=function(r,t){var n=r.cd,a=r.xaxis,i=r.yaxis,o=[],l=n[0].trace,s,u,f,v,h=!LD.hasMarkers(l)&&!LD.hasText(l);if(h)return[];if(t===!1)for(s=0;s{"use strict";ED.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var FD=ne(($ce,ND)=>{"use strict";var yh=dt().traceIs,Ib=o3();ND.exports=function(r,t,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(pQ(t,a.data),t.type==="-"?t.type="linear":r.type=t.type)};function pQ(e,r){if(e.type==="-"){var t=e._id,n=t.charAt(0),a;t.indexOf("scene")!==-1&&(t=n);var i=gQ(r,t,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",l=i[o],s={noMultiCategory:!yh(i,"cartesian")||yh(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,zD(i,n)){var u=RD(i),f=[];for(a=0;a0&&(a["_"+t+"axes"]||{})[r])return a;if((a[t+"axis"]||t)===r){if(zD(a,t))return a;if((a[t]||[]).length||a[t+"0"])return a}}}function RD(e){return{v:"x",h:"y"}[e.orientation||"v"]}function zD(e,r){var t=RD(e),n=yh(e,"box-violin"),a=yh(e._fullInput||{},"candlestick");return n&&!a&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var HD=ne((Kce,ID)=>{"use strict";var mQ=Ji().isTypedArraySpec;function yQ(e,r){var t=r.dataAttr||e._id.charAt(0),n={},a,i,o;if(r.axData)a=r.axData;else for(a=[],i=0;i0||mQ(i),l;o&&(l="array");var s=n("categoryorder",l),u;s==="array"&&(u=n("categoryarray")),!o&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=yQ(t,a).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var UD=ne((Qce,OD)=>{"use strict";var BD=Jl().mix,bQ=cl(),_Q=pr();OD.exports=function(r,t,n,a){a=a||{};var i=a.dfltColor;function o(M,D){return _Q.coerce2(r,t,a.attributes,M,D)}var l=o("linecolor",i),s=o("linewidth"),u=n("showline",a.showLine||!!l||!!s);u||(delete t.linecolor,delete t.linewidth);var f=BD(i,a.bgColor,a.blend||bQ.lightFraction).toRgbString(),v=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),m=n("showgrid",a.showGrid||!!v||!!h||!!d);if(m||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),a.hasMinor){var g=BD(t.gridcolor,a.bgColor,67).toRgbString(),y=o("minor.gridcolor",g),x=o("minor.gridwidth",t.gridwidth||1),T=o("minor.griddash",t.griddash||"solid"),_=n("minor.showgrid",!!y||!!x||!!T);_||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!a.noZeroLine){var b=o("zerolinecolor",i),A=o("zerolinewidth"),S=n("zeroline",a.showGrid||!!b||!!A);S||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var Bb=ne((e0e,XD)=>{"use strict";var YD=Bt(),xQ=dt(),bh=pr(),wQ=_n(),MQ=gl(),Hb=pl(),GD=q2(),VD=E2(),AQ=z2(),TQ=N2(),kQ=HD(),SQ=UD(),CQ=k3(),WD=dp(),lm=Pa().WEEKDAY_PATTERN,LQ=Pa().HOUR_PATTERN;XD.exports=function(r,t,n,a,i){var o=a.letter,l=a.font||{},s=a.splomStash||{},u=n("visible",!a.visibleDflt),f=t._template||{},v=t.type||f.type||"-",h;if(v==="date"){var d=xQ.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",a.calendar),a.noTicklabelmode||(h=n("ticklabelmode"))}!a.noTicklabelindex&&(v==="date"||v==="linear")&&n("ticklabelindex");var m="";(!a.noTicklabelposition||v==="multicategory")&&(m=bh.coerce(r,t,{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")),a.noTicklabeloverflow||n("ticklabeloverflow",m.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),WD(t,i),CQ(r,t,n,a),kQ(r,t,n,a),v!=="category"&&!a.noHover&&n("hoverformat");var g=n("color"),y=g!==Hb.color.dflt?g:l.color,x=s.label||i._dfltTitle[o];if(TQ(r,t,n,v,a),!u)return t;n("title.text",x),bh.coerceFont(n,"title.font",l,{overrideDflt:{size:bh.bigFont(l.size),color:y}}),GD(r,t,n,v);var T=a.hasMinor;if(T&&(wQ.newContainer(t,"minor"),GD(r,t,n,v,{isMinor:!0})),AQ(r,t,n,v,a),VD(r,t,n,a),T){var _=a.isMinor;a.isMinor=!0,VD(r,t,n,a),a.isMinor=_}SQ(r,t,n,{dfltColor:g,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:T,attributes:Hb}),T&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&n("mirror");var b=v==="multicategory";if(!a.noTickson&&(v==="category"||b)&&(t.ticks||t.showgrid)){var A;b&&(A="boundaries");var S=n("tickson",A);S==="boundaries"&&delete t.ticklabelposition}if(b){var M=n("showdividers");M&&(n("dividercolor"),n("dividerwidth"))}if(v==="date")if(MQ(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:qQ}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var D=0;D=2){var o="",l,s;if(i.length===2){for(l=0;l<2;l++)if(s=ZD(i[l]),s){o=lm;break}}var u=n("pattern",o);if(u===lm)for(l=0;l<2;l++)s=ZD(i[l]),s&&(r.bounds[l]=i[l]=s-1);if(u)for(l=0;l<2;l++)switch(s=i[l],u){case lm:if(!YD(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[l]=i[l]=s;break;case LQ:if(!YD(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[l]=i[l]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var EQ=Bt(),sm=pr();jD.exports=function(r,t,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],l=a.letter,s=a.grid,u=a.overlayingDomain,f,v,h,d,m,g;s&&(v=s._domains[l][s._axisMap[t._id]],f=s._anchors[t._id],v&&(h=s[l+"side"].split(" ")[0],d=s.domain[l][h==="right"||h==="top"?1:0])),v=v||[0,1],f=f||(EQ(r.position)?"free":i[0]||"free"),h=h||(l==="x"?"bottom":"left"),d=d||0,m=0,g=!1;var y=sm.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),x=sm.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(y==="free"){if(l==="y"){var T=n("autoshift");T&&(d=x==="left"?u[0]:u[1],g=t.automargin?t.automargin:!0,m=x==="left"?-3:3),n("shift",m)}n("position",d)}n("automargin",g);var _=!1;if(o.length&&(_=sm.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!_){var b=n("domain",v);b[0]>b[1]-1/4096&&(t.domain=v),sm.noneOrAll(r.domain,t.domain,v),t.tickmode==="sync"&&(t.tickmode="auto")}return n("layer"),t}});var aE=ne((t0e,nE)=>{"use strict";var qc=pr(),JD=zt(),PQ=Vu().isUnifiedHover,RQ=e5(),$D=_n(),zQ=A0(),KD=pl(),NQ=FD(),QD=Bb(),FQ=F1(),eE=Ob(),Yb=ya(),hs=Yb.id2name,rE=Yb.name2id,IQ=Pa().AX_ID_PATTERN,tE=dt(),um=tE.traceIs,Ub=tE.getComponentMethod;function fm(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}nE.exports=function(r,t,n){var a=t.autotypenumbers,i={},o={},l={},s={},u={},f={},v={},h={},d={},m={},g,y;for(g=0;g{"use strict";var HQ=kt(),iE=dt(),cm=pr(),to=ln(),vm=Cn();oE.exports=function(r,t,n,a){var i=r._fullLayout;if(t.length===0){vm.redrawComponents(r);return}function o(y){var x=y.xaxis,T=y.yaxis;i._defs.select("#"+y.clipId+"> rect").call(to.setTranslate,0,0).call(to.setScale,1,1),y.plot.call(to.setTranslate,x._offset,T._offset).call(to.setScale,1,1);var _=y.plot.selectAll(".scatterlayer .trace");_.selectAll(".point").call(to.setPointGroupScale,1,1),_.selectAll(".textpoint").call(to.setTextPointsScale,1,1),_.call(to.hideOutsideRangePoints,y)}function l(y,x){var T=y.plotinfo,_=T.xaxis,b=T.yaxis,A=_._length,S=b._length,M=!!y.xr1,D=!!y.yr1,z=[];if(M){var F=cm.simpleMap(y.xr0,_.r2l),H=cm.simpleMap(y.xr1,_.r2l),Y=F[1]-F[0],O=H[1]-H[0];z[0]=(F[0]*(1-x)+x*H[0]-F[0])/(F[1]-F[0])*A,z[2]=A*(1-x+x*O/Y),_.range[0]=_.l2r(F[0]*(1-x)+x*H[0]),_.range[1]=_.l2r(F[1]*(1-x)+x*H[1])}else z[0]=0,z[2]=A;if(D){var X=cm.simpleMap(y.yr0,b.r2l),V=cm.simpleMap(y.yr1,b.r2l),ee=X[1]-X[0],te=V[1]-V[0];z[1]=(X[1]*(1-x)+x*V[1]-X[1])/(X[0]-X[1])*S,z[3]=S*(1-x+x*te/ee),b.range[0]=_.l2r(X[0]*(1-x)+x*V[0]),b.range[1]=b.l2r(X[1]*(1-x)+x*V[1])}else z[1]=0,z[3]=S;vm.drawOne(r,_,{skipTitle:!0}),vm.drawOne(r,b,{skipTitle:!0}),vm.redrawComponents(r,[_._id,b._id]);var K=M?A/z[2]:1,re=D?S/z[3]:1,fe=M?z[0]:0,de=D?z[1]:0,qe=M?z[0]/z[2]*A:0,Be=D?z[1]/z[3]*S:0,Ne=_._offset-qe,Ie=b._offset-Be;T.clipRect.call(to.setTranslate,fe,de).call(to.setScale,1/K,1/re),T.plot.call(to.setTranslate,Ne,Ie).call(to.setScale,K,re),to.setPointGroupScale(T.zoomScalePts,1/K,1/re),to.setTextPointsScale(T.zoomScaleTxt,1/K,1/re)}var s;a&&(s=a());function u(){for(var y={},x=0;xn.duration?(u(),d=window.cancelAnimationFrame(g)):d=window.requestAnimationFrame(g)}return v=Date.now(),d=window.requestAnimationFrame(g),Promise.resolve()}});var Gb=ne(Ua=>{"use strict";var dm=kt(),sE=dt(),Dc=pr(),BQ=ua(),OQ=ln(),uE=p1().getModuleCalcData,lf=ya(),Al=Pa(),UQ=lc(),$t=Dc.ensureSingle;function hm(e,r,t){return Dc.ensureSingle(e,r,t,function(n){n.datum(t)})}var Ec=Al.zindexSeparator;Ua.name="cartesian";Ua.attr=["xaxis","yaxis"];Ua.idRoot=["x","y"];Ua.idRegex=Al.idRegex;Ua.attrRegex=Al.attrRegex;Ua.attributes=PD();Ua.layoutAttributes=pl();Ua.supplyLayoutDefaults=aE();Ua.transitionAxes=lE();Ua.finalizeSubplots=function(e,r){var t=r._subplots,n=t.xaxis,a=t.yaxis,i=t.cartesian,o=i,l={},s={},u,f,v;for(u=0;u0){var d=h.id;if(d.indexOf(Ec)!==-1)continue;d+=Ec+(u+1),h=Dc.extendFlat({},h,{id:d,plot:a._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var m=[],g,y=0;y1&&(A+=Ec+b),_.push(l+A),o=0;o1,v=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=$t(n,"path","xlines-above"),r.ylines=$t(n,"path","ylines-above"),r.xaxislayer=$t(n,"g","xaxislayer-above"),r.yaxislayer=$t(n,"g","yaxislayer-above");else{if(!o){var h=$t(n,"g","layer-subplot");r.shapelayer=$t(h,"g","shapelayer"),r.imagelayer=$t(h,"g","imagelayer"),v&&f?(r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer):(r.minorGridlayer=$t(n,"g","minor-gridlayer"),r.gridlayer=$t(n,"g","gridlayer"),r.zerolinelayer=$t(n,"g","zerolinelayer"));var d=$t(n,"g","layer-between");r.shapelayerBetween=$t(d,"g","shapelayer"),r.imagelayerBetween=$t(d,"g","imagelayer"),$t(n,"path","xlines-below"),$t(n,"path","ylines-below"),r.overlinesBelow=$t(n,"g","overlines-below"),$t(n,"g","xaxislayer-below"),$t(n,"g","yaxislayer-below"),r.overaxesBelow=$t(n,"g","overaxes-below")}r.overplot=$t(n,"g","overplot"),r.plot=$t(r.overplot,"g",a),o||(r.xlines=$t(n,"path","xlines-above"),r.ylines=$t(n,"path","ylines-above"),r.overlinesAbove=$t(n,"g","overlines-above"),$t(n,"g","xaxislayer-above"),$t(n,"g","yaxislayer-above"),r.overaxesAbove=$t(n,"g","overaxes-above"),r.xlines=n.select(".xlines-"+l),r.ylines=n.select(".ylines-"+s),r.xaxislayer=n.select(".xaxislayer-"+l),r.yaxislayer=n.select(".yaxislayer-"+s))}else{var m=v.plotgroup,g=a+"-x",y=a+"-y";r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer,$t(v.overlinesBelow,"path",g),$t(v.overlinesBelow,"path",y),$t(v.overaxesBelow,"g",g),$t(v.overaxesBelow,"g",y),r.plot=$t(v.overplot,"g",a),$t(v.overlinesAbove,"path",g),$t(v.overlinesAbove,"path",y),$t(v.overaxesAbove,"g",g),$t(v.overaxesAbove,"g",y),r.xlines=m.select(".overlines-"+l).select("."+g),r.ylines=m.select(".overlines-"+s).select("."+y),r.xaxislayer=m.select(".overaxes-"+l).select("."+g),r.yaxislayer=m.select(".overaxes-"+s).select("."+y)}o||(u||(hm(r.minorGridlayer,"g",r.xaxis._id),hm(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(x){return x[0]}).sort(lf.idSort),hm(r.gridlayer,"g",r.xaxis._id),hm(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(x){return x[0]}).sort(lf.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function vE(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=dm.select(this);f.remove(),hE(u,r),t[u]=!0});for(var n in r._plots)for(var a=r._plots[n],i=a.overlays||[],o=0;o{"use strict";var pm=Qa();dE.exports={hasLines:pm.hasLines,hasMarkers:pm.hasMarkers,hasText:pm.hasText,isBubble:pm.isBubble,attributes:kc(),layoutAttributes:Ud(),supplyDefaults:Cq(),crossTraceDefaults:Eq(),supplyLayoutDefaults:Rq(),calc:em().calc,crossTraceCalc:oD(),arraysToCalcdata:vh(),plot:_D(),colorbar:Eb(),formatLabels:MD(),style:mh().style,styleOnSelect:mh().styleOnSelect,hoverPoints:CD(),selectPoints:DD(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Gb(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var yE=ne((o0e,mE)=>{"use strict";var GQ=kt(),VQ=zt(),gE=U5(),Vb=pr(),WQ=Vb.strScale,ZQ=Vb.strRotate,XQ=Vb.strTranslate;mE.exports=function(r,t,n){var a=r.node(),i=gE[n.arrowhead||0],o=gE[n.startarrowhead||0],l=(n.arrowwidth||1)*(n.arrowsize||1),s=(n.arrowwidth||1)*(n.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,v=i.backoff*l+n.standoff,h=o.backoff*s+n.startstandoff,d,m,g,y;if(a.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},m={x:+r.attr("x2"),y:+r.attr("y2")};var x=d.x-m.x,T=d.y-m.y;if(g=Math.atan2(T,x),y=g+Math.PI,v&&h&&v+h>Math.sqrt(x*x+T*T)){X();return}if(v){if(v*v>x*x+T*T){X();return}var _=v*Math.cos(g),b=v*Math.sin(g);m.x+=_,m.y+=b,r.attr({x2:m.x,y2:m.y})}if(h){if(h*h>x*x+T*T){X();return}var A=h*Math.cos(g),S=h*Math.sin(g);d.x-=A,d.y-=S,r.attr({x1:d.x,y1:d.y})}}else if(a.nodeName==="path"){var M=a.getTotalLength(),D="";if(M{"use strict";var bE=kt(),Wb=dt(),jQ=ua(),uf=pr(),Zb=uf.strTranslate,xh=Cn(),Pc=zt(),iu=ln(),_E=ss(),Xb=ci(),jb=Ku(),_h=To(),JQ=_n().arrayEditor,$Q=yE();ME.exports={draw:KQ,drawOne:xE,drawRaw:wE};function KQ(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?We="right":We="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[We]}for(var pe=!1,W=["x","y"],Q=0;Q1)&&(Fe===Me?(kr=Oe.r2fraction(r["a"+$]),(kr<0||kr>1)&&(pe=!0)):pe=!0),Cr=Oe._offset+Oe.r2p(r[$]),Ve=.5}else{var er=zr==="domain";$==="x"?(Ae=r[$],Cr=er?Oe._offset+Oe._length*Ae:Cr=l.l+l.w*Ae):(Ae=1-r[$],Cr=er?Oe._offset+Oe._length*Ae:Cr=l.t+l.h*Ae),Ve=r.showarrow?.5:Ae}if(r.showarrow){rr.head=Cr;var Ke=r["a"+$];if(je=nr*Te(.5,r.xanchor)-Ze*Te(.5,r.yanchor),Fe===Me){var mr=xh.getRefType(Fe);mr==="domain"?($==="y"&&(Ke=1-Ke),rr.tail=Oe._offset+Oe._length*Ke):mr==="paper"?$==="y"?(Ke=1-Ke,rr.tail=l.t+l.h*Ke):rr.tail=l.l+l.w*Ke:rr.tail=Oe._offset+Oe.r2p(Ke),yr=je}else rr.tail=Cr+Ke,yr=je+Ke;rr.text=rr.tail+je;var Mr=o[$==="x"?"width":"height"];if(Me==="paper"&&(rr.head=uf.constrain(rr.head,1,Mr-1)),Fe==="pixel"){var gr=-Math.max(rr.tail-3,rr.text),dr=Math.min(rr.tail+3,rr.text)-Mr;gr>0?(rr.tail+=gr,rr.text+=gr):dr>0&&(rr.tail-=dr,rr.text-=dr)}rr.tail+=ir,rr.head+=ir}else je=ar*Te(Ve,lr),yr=je,rr.text=Cr+je;rr.text+=ir,je+=ir,yr+=ir,r["_"+$+"padplus"]=ar/2+yr,r["_"+$+"padminus"]=ar/2-yr,r["_"+$+"size"]=ar,r["_"+$+"shift"]=je}if(pe){M.remove();return}var Tr=0,Pr=0;if(r.align!=="left"&&(Tr=(Se-Ne)*(r.align==="center"?.5:1)),r.valign!=="top"&&(Pr=(Xe-Ie)*(r.valign==="middle"?.5:1)),qe)de.select("svg").attr({x:F+Tr-1,y:F+Pr}).call(iu.setClipUrl,Y?g:null,e);else{var Ur=F+Pr-Be.top,sr=F+Tr-Be.left;ee.call(Xb.positionText,sr,Ur).call(iu.setClipUrl,Y?g:null,e)}O.select("rect").call(iu.setRect,F,F,Se,Xe),H.call(iu.setRect,D/2,D/2,se-D,be-D),M.call(iu.setTranslate,Math.round(y.x.text-se/2),Math.round(y.y.text-be/2)),_.attr({transform:"rotate("+x+","+y.x.text+","+y.y.text+")"});var _e=function($e,We){T.selectAll(".annotation-arrow-g").remove();var qr=y.x.head,Vr=y.y.head,Hr=y.x.tail+$e,lt=y.y.tail+We,xt=y.x.text+$e,Rt=y.y.text+We,St=uf.rotationXYMatrix(x,xt,Rt),hn=uf.apply2DTransform(St),Fn=uf.apply2DTransform2(St),$n=+H.attr("width"),Xt=+H.attr("height"),cn=xt-.5*$n,sn=cn+$n,Kt=Rt-.5*Xt,aa=Kt+Xt,rt=[[cn,Kt,cn,aa],[cn,aa,sn,aa],[sn,aa,sn,Kt],[sn,Kt,cn,Kt]].map(Fn);if(!rt.reduce(function(It,In){return It^!!uf.segmentsIntersect(qr,Vr,qr+1e6,Vr+1e6,In[0],In[1],In[2],In[3])},!1)){rt.forEach(function(It){var In=uf.segmentsIntersect(Hr,lt,qr,Vr,It[0],It[1],It[2],It[3]);In&&(Hr=In.x,lt=In.y)});var Qt=r.arrowwidth,Ct=r.arrowcolor,dn=r.arrowside,pn=T.append("g").style({opacity:Pc.opacity(Ct)}).classed("annotation-arrow-g",!0),tn=pn.append("path").attr("d","M"+Hr+","+lt+"L"+qr+","+Vr).style("stroke-width",Qt+"px").call(Pc.stroke,Pc.rgb(Ct));if($Q(tn,dn,r),s.annotationPosition&&tn.node().parentNode&&!n){var un=qr,ha=Vr;if(r.standoff){var Sn=Math.sqrt(Math.pow(qr-Hr,2)+Math.pow(Vr-lt,2));un+=r.standoff*(Hr-qr)/Sn,ha+=r.standoff*(lt-Vr)/Sn}var Na=pn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Hr-un)+","+(lt-ha),transform:Zb(un,ha)}).style("stroke-width",Qt+6+"px").call(Pc.stroke,"rgba(0,0,0,0)").call(Pc.fill,"rgba(0,0,0,0)"),da,wn;_h.init({element:Na.node(),gd:e,prepFn:function(){var It=iu.getTranslate(M);da=It.x,wn=It.y,a&&a.autorange&&h(a._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(It,In){var gi=hn(da,wn),io=gi[0]+It,mi=gi[1]+In;M.call(iu.setTranslate,io,mi),d("x",sf(a,It,"x",l,r)),d("y",sf(i,In,"y",l,r)),r.axref===r.xref&&d("ax",sf(a,It,"ax",l,r)),r.ayref===r.yref&&d("ay",sf(i,In,"ay",l,r)),pn.attr("transform",Zb(It,In)),_.attr({transform:"rotate("+x+","+io+","+mi+")"})},doneFn:function(){Wb.call("_guiRelayout",e,m());var It=document.querySelector(".js-notes-box-panel");It&&It.redraw(It.selectedObj)}})}}};if(r.showarrow&&_e(0,0),b){var ke;_h.init({element:M.node(),gd:e,prepFn:function(){ke=_.attr("transform")},moveFn:function($e,We){var qr="pointer";if(r.showarrow)r.axref===r.xref?d("ax",sf(a,$e,"ax",l,r)):d("ax",r.ax+$e),r.ayref===r.yref?d("ay",sf(i,We,"ay",l.w,r)):d("ay",r.ay+We),_e($e,We);else{if(n)return;var Vr,Hr;if(a)Vr=sf(a,$e,"x",l,r);else{var lt=r._xsize/l.w,xt=r.x+(r._xshift-r.xshift)/l.w-lt/2;Vr=_h.align(xt+$e/l.w,lt,0,1,r.xanchor)}if(i)Hr=sf(i,We,"y",l,r);else{var Rt=r._ysize/l.h,St=r.y-(r._yshift+r.yshift)/l.h-Rt/2;Hr=_h.align(St-We/l.h,Rt,0,1,r.yanchor)}d("x",Vr),d("y",Hr),(!a||!i)&&(qr=_h.getCursor(a?.5:Vr,i?.5:Hr,r.xanchor,r.yanchor))}_.attr({transform:Zb($e,We)+ke}),jb(M,qr)},clickFn:function($e,We){r.captureevents&&e.emit("plotly_clickannotation",S(We))},doneFn:function(){jb(M),Wb.call("_guiRelayout",e,m());var $e=document.querySelector(".js-notes-box-panel");$e&&$e.redraw($e.selectedObj)}})}}s.annotationText?ee.call(Xb.makeEditable,{delegate:M,gd:e}).call(te).on("edit",function(re){r.text=re,this.call(te),d("text",re),a&&a.autorange&&h(a._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),Wb.call("_guiRelayout",e,m())}):ee.call(te)}});var LE=ne((s0e,CE)=>{"use strict";var AE=pr(),QQ=dt(),TE=_n().arrayEditor;CE.exports={hasClickToShow:eee,onClick:ree};function eee(e,r){var t=SE(e,r);return t.on.length>0||t.explicitOff.length>0}function ree(e,r){var t=SE(e,r),n=t.on,a=t.off.concat(t.explicitOff),i={},o=e._fullLayout.annotations,l,s;if(n.length||a.length){for(l=0;l{"use strict";var Jb=pr(),bv=zt();qE.exports=function(r,t,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),l=bv.opacity(o);a("borderpad");var s=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),Jb.coerceFont(a,"font",n.font),a("width"),a("align");var f=a("height");if(f&&a("valign"),u){var v=a("arrowside"),h,d;v.indexOf("end")!==-1&&(h=a("arrowhead"),d=a("arrowsize")),v.indexOf("start")!==-1&&(a("startarrowhead",h),a("startarrowsize",d)),a("arrowcolor",l?t.bordercolor:bv.defaultLine),a("arrowwidth",(l&&s||1)*2),a("standoff"),a("startstandoff")}var m=a("hovertext"),g=n.hoverlabel||{};if(m){var y=a("hoverlabel.bgcolor",g.bgcolor||(bv.opacity(i)?bv.rgb(i):bv.defaultLine)),x=a("hoverlabel.bordercolor",g.bordercolor||bv.contrast(y)),T=Jb.extendFlat({},g.font);T.color||(T.color=x),Jb.coerceFont(a,"hoverlabel.font",T)}a("captureevents",!!m)}});var EE=ne((f0e,DE)=>{"use strict";var Kb=pr(),Rc=Cn(),tee=gl(),nee=$b(),aee=fv();DE.exports=function(r,t){tee(r,t,{name:"annotations",handleItemDefaults:iee})};function iee(e,r,t){function n(_,b){return Kb.coerce(e,r,aee,_,b)}var a=n("visible"),i=n("clicktoshow");if(a||i){nee(e,r,t,n);for(var o=r.showarrow,l=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var v=l[f],h=Rc.coerceRef(e,r,u,v,"","paper");if(h!=="paper"){var d=Rc.getFromId(u,h);d._annIndices.push(r._index)}if(Rc.coercePosition(r,u,n,h,v,.5),o){var m="a"+v,g=Rc.coerceRef(e,r,u,m,"pixel",["pixel","paper"]);g!=="pixel"&&g!==h&&(g=r[m]="pixel");var y=g==="pixel"?s[f]:.4;Rc.coercePosition(r,u,n,g,m,y)}n(v+"anchor"),n(v+"shift")}if(Kb.noneOrAll(e,r,["x","y"]),o&&Kb.noneOrAll(e,r,["ax","ay"]),i){var x=n("xclick"),T=n("yclick");r._xclick=x===void 0?r.x:Rc.cleanPosition(x,u,r.xref),r._yclick=T===void 0?r.y:Rc.cleanPosition(T,u,r.yref)}}}});var zE=ne((c0e,RE)=>{"use strict";var Qb=pr(),zc=Cn(),oee=gm().draw;RE.exports=function(r){var t=r._fullLayout,n=Qb.filterVisible(t.annotations);if(n.length&&r._fullData.length)return Qb.syncOrAsync([oee,lee],r)};function lee(e){var r=e._fullLayout;Qb.filterVisible(r.annotations).forEach(function(t){var n=zc.getFromId(e,t.xref),a=zc.getFromId(e,t.yref),i=zc.getRefType(t.xref),o=zc.getRefType(t.yref);t._extremes={},i==="range"&&PE(t,n),o==="range"&&PE(t,a)})}function PE(e,r){var t=r._id,n=t.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],l=e["a"+n+"ref"],s=e["_"+n+"padplus"],u=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],v=3*e.arrowsize*e.arrowwidth||0,h=v+f,d=v-f,m=3*e.startarrowsize*e.arrowwidth||0,g=m+f,y=m-f,x;if(l===o){var T=zc.findExtremes(r,[r.r2c(a)],{ppadplus:h,ppadminus:d}),_=zc.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,g),ppadminus:Math.max(u,y)});x={min:[T.min[0],_.min[0]],max:[T.max[0],_.max[0]]}}else g=i?g+i:g,y=i?y-i:y,x=zc.findExtremes(r,[r.r2c(a)],{ppadplus:Math.max(s,h,g),ppadminus:Math.max(u,d,y)});e._extremes[t]=x}});var FE=ne((v0e,NE)=>{"use strict";var see=Bt(),uee=id();NE.exports=function(r,t,n,a){t=t||{};var i=n==="log"&&t.type==="linear",o=n==="linear"&&t.type==="log";if(!(i||o))return;var l=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function v(d){var m=u[d],g=null;i?g=uee(m,t.range):g=Math.pow(10,m),see(g)||(g=null),a(f+d,g)}for(var h=0;h{"use strict";var e4=gm(),IE=LE();HE.exports={moduleType:"component",name:"annotations",layoutAttributes:fv(),supplyLayoutDefaults:EE(),includeBasePlot:eh()("annotations"),calcAutorange:zE(),draw:e4.draw,drawOne:e4.drawOne,drawRaw:e4.drawRaw,hasClickToShow:IE.hasClickToShow,onClick:IE.onClick,convertCoords:FE()}});var mm=ne((d0e,OE)=>{"use strict";var xn=fv(),fee=_o().overrideAll,cee=_n().templatedArray;OE.exports=fee(cee("annotation",{visible:xn.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:xn.xanchor,xshift:xn.xshift,yanchor:xn.yanchor,yshift:xn.yshift,text:xn.text,textangle:xn.textangle,font:xn.font,width:xn.width,height:xn.height,opacity:xn.opacity,align:xn.align,valign:xn.valign,bgcolor:xn.bgcolor,bordercolor:xn.bordercolor,borderpad:xn.borderpad,borderwidth:xn.borderwidth,showarrow:xn.showarrow,arrowcolor:xn.arrowcolor,arrowhead:xn.arrowhead,startarrowhead:xn.startarrowhead,arrowside:xn.arrowside,arrowsize:xn.arrowsize,startarrowsize:xn.startarrowsize,arrowwidth:xn.arrowwidth,standoff:xn.standoff,startstandoff:xn.startstandoff,hovertext:xn.hovertext,hoverlabel:xn.hoverlabel,captureevents:xn.captureevents}),"calc","from-root")});var YE=ne((p0e,UE)=>{"use strict";var r4=pr(),vee=Cn(),hee=gl(),dee=$b(),pee=mm();UE.exports=function(r,t,n){hee(r,t,{name:"annotations",handleItemDefaults:gee,fullLayout:n.fullLayout})};function gee(e,r,t,n){function a(l,s){return r4.coerce(e,r,pee,l,s)}function i(l){var s=l+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],vee.coercePosition(r,u,a,l,l,.5)}var o=a("visible");o&&(dee(e,r,n.fullLayout,a),i("x"),i("y"),i("z"),r4.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",a("ax",-10),a("ay",-30),r4.noneOrAll(e,r,["ax","ay"])))}});var ZE=ne((g0e,WE)=>{"use strict";var GE=pr(),VE=Cn();WE.exports=function(r){for(var t=r.fullSceneLayout,n=t.annotations,a=0;a{"use strict";function t4(e,r){var t=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)t[a]+=e[4*n+a]*r[n];return t}function yee(e,r){var t=t4(e.projection,t4(e.view,t4(e.model,[r[0],r[1],r[2],1])));return t}XE.exports=yee});var $E=ne((y0e,JE)=>{"use strict";var bee=gm().drawRaw,_ee=jE(),xee=["x","y","z"];JE.exports=function(r){for(var t=r.fullSceneLayout,n=r.dataScale,a=t.annotations,i=0;i1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(o._pdata=_ee(r.glplot.cameraParams,[t.xaxis.r2l(o.x)*n[0],t.yaxis.r2l(o.y)*n[1],t.zaxis.r2l(o.z)*n[2]]),bee(r.graphDiv,o,i,r.id,o._xa,o._ya))}}});var eP=ne((b0e,QE)=>{"use strict";var wee=dt(),KE=pr();QE.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:mm()}}},layoutAttributes:mm(),handleDefaults:YE(),includeBasePlot:Mee,convert:ZE(),draw:$E()};function Mee(e,r){var t=wee.subplotsRegistry.gl3d;if(t)for(var n=t.attrRegex,a=Object.keys(e),i=0;i{"use strict";var rP=fv(),tP=$a(),nP=kc().line,Aee=Kl().dash,Tl=la().extendFlat,Tee=_n().templatedArray,_0e=Q1(),_v=bo(),kee=Ru().shapeTexttemplateAttrs,See=bd();aP.exports=Tee("shape",{visible:Tl({},_v.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Tl({},_v.legend,{editType:"calc+arraydraw"}),legendgroup:Tl({},_v.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Tl({},_v.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:tP({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Tl({},_v.legendrank,{editType:"calc+arraydraw"}),legendwidth:Tl({},_v.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:Tl({},rP.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:Tl({},rP.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:Tl({},nP.color,{editType:"arraydraw"}),width:Tl({},nP.width,{editType:"calc+arraydraw"}),dash:Tl({},Aee,{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:kee({},{keys:Object.keys(See)}),font:tP({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 lP=ne((w0e,oP)=>{"use strict";var wh=pr(),xv=Cn(),Cee=gl(),Lee=n4(),iP=rf();oP.exports=function(r,t){Cee(r,t,{name:"shapes",handleItemDefaults:Dee})};function qee(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Dee(e,r,t){function n(re,fe){return wh.coerce(e,r,Lee,re,fe)}r._isShape=!0;var a=n("visible");if(a){var i=n("showlegend");i&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),wh.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),l=o?"path":"rect",s=n("type",l),u=s!=="path";u&&delete r.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var v=n("xsizemode"),h=n("ysizemode"),d=["x","y"],m=0;m<2;m++){var g=d[m],y=g+"anchor",x=g==="x"?v:h,T={_fullLayout:t},_,b,A,S=xv.coerceRef(e,r,T,g,void 0,"paper"),M=xv.getRefType(S);if(M==="range"?(_=xv.getFromId(T,S),_._shapeIndices.push(r._index),A=iP.rangeToShapePosition(_),b=iP.shapePositionToRange(_),(_.type==="category"||_.type==="multicategory")&&(n(g+"0shift"),n(g+"1shift"))):b=A=wh.identity,u){var D=.25,z=.75,F=g+"0",H=g+"1",Y=e[F],O=e[H];e[F]=b(e[F],!0),e[H]=b(e[H],!0),x==="pixel"?(n(F,0),n(H,10)):(xv.coercePosition(r,T,n,S,F,D),xv.coercePosition(r,T,n,S,H,z)),r[F]=A(r[F]),r[H]=A(r[H]),e[F]=Y,e[H]=O}if(x==="pixel"){var X=e[y];e[y]=b(e[y],!0),xv.coercePosition(r,T,n,S,y,.25),r[y]=A(r[y]),e[y]=X}}u&&wh.noneOrAll(e,r,["x0","x1","y0","y1"]);var V=s==="line",ee,te;if(u&&(ee=n("label.texttemplate")),ee||(te=n("label.text")),te||ee){n("label.textangle");var K=n("label.textposition",V?"middle":"middle center");n("label.xanchor"),n("label.yanchor",qee(V,K)),n("label.padding"),wh.coerceFont(n,"label.font",t.font)}}}});var fP=ne((M0e,uP)=>{"use strict";var Eee=zt(),sP=pr();function Pee(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}uP.exports=function(r,t,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),sP.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(r||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Eee.contrast(i)),n("newshape.line.dash")}var o=r.dragmode==="drawline",l=n("newshape.label.text"),s=n("newshape.label.texttemplate");if(l||s){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",Pee(o,u)),n("newshape.label.padding"),sP.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var pP=ne((A0e,dP)=>{"use strict";var a4=pr(),wv=Cn(),Mv=P1(),vP=rf();dP.exports=function(r){var t=r._fullLayout,n=a4.filterVisible(t.shapes);if(!(!n.length||!r._fullData.length))for(var a=0;a0?u+o:o;return{ppad:o,ppadplus:l?v:h,ppadminus:l?h:v}}else return{ppad:o}}function cP(e,r,t){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,l=0,s=0,u=a?e.r2c:e.d2c,f=r[n+"sizemode"]==="scaled";if(f?(i=r[n+"0"],o=r[n+"1"],a&&(l=r[n+"0shift"],s=r[n+"1shift"])):(i=r[n+"anchor"],o=r[n+"anchor"]),i!==void 0)return[u(i)+l,u(o)+s];if(r.path){var v=1/0,h=-1/0,d=r.path.match(Mv.segmentRE),m,g,y,x,T;for(e.type==="date"&&(u=vP.decodeDate(u)),m=0;mh&&(h=T)));if(h>=v)return[v,h]}}});var yP=ne((T0e,mP)=>{"use strict";var gP=og();mP.exports={moduleType:"component",name:"shapes",layoutAttributes:n4(),supplyLayoutDefaults:lP(),supplyDrawNewShapeDefaults:fP(),includeBasePlot:eh()("shapes"),calcAutorange:pP(),draw:gP.draw,drawOne:gP.drawOne}});var i4=ne((S0e,_P)=>{"use strict";var bP=Pa(),Nee=_n().templatedArray,k0e=Q1();_P.exports=Nee("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",bP.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",bP.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var wP=ne((C0e,xP)=>{"use strict";var Fee=pr(),o4=Cn(),Iee=gl(),Hee=i4(),Bee="images";xP.exports=function(r,t){var n={name:Bee,handleItemDefaults:Oee};Iee(r,t,n)};function Oee(e,r,t){function n(h,d){return Fee.coerce(e,r,Hee,h,d)}var a=n("source"),i=n("visible",!!a);if(!i)return r;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:t},l=["x","y"],s=0;s<2;s++){var u=l[s],f=o4.coerceRef(e,r,o,u,"paper",void 0);if(f!=="paper"){var v=o4.getFromId(o,f);v._imgIndices.push(r._index)}o4.coercePosition(r,o,n,f,u,0)}return r}});var kP=ne((L0e,TP)=>{"use strict";var MP=kt(),Uee=ln(),Av=Cn(),AP=ya(),Yee=lc();TP.exports=function(r){var t=r._fullLayout,n=[],a={},i=[],o,l;for(l=0;l{"use strict";var SP=Bt(),Gee=id();CP.exports=function(r,t,n,a){t=t||{};var i=n==="log"&&t.type==="linear",o=n==="linear"&&t.type==="log";if(i||o){for(var l=r._fullLayout.images,s=t._id.charAt(0),u,f,v=0;v{"use strict";qP.exports={moduleType:"component",name:"images",layoutAttributes:i4(),supplyLayoutDefaults:wP(),includeBasePlot:eh()("images"),draw:kP(),convertCoords:LP()}});var ym=ne((E0e,EP)=>{"use strict";EP.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 l4=ne((P0e,RP)=>{"use strict";var Vee=$a(),Wee=cl(),Zee=la().extendFlat,Xee=_o().overrideAll,jee=_d(),PP=_n().templatedArray,Jee=PP("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}});RP.exports=Xee(PP("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:Jee,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:Zee(jee({editType:"arraydraw"}),{}),font:Vee({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Wee.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var IP=ne((R0e,FP)=>{"use strict";var bm=pr(),zP=gl(),NP=l4(),$ee=ym(),Kee=$ee.name,Qee=NP.buttons;FP.exports=function(r,t){var n={name:Kee,handleItemDefaults:ere};zP(r,t,n)};function ere(e,r,t){function n(o,l){return bm.coerce(e,r,NP,o,l)}var a=zP(e,r,{name:"buttons",handleItemDefaults:rre}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),bm.noneOrAll(e,r,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),bm.coerceFont(n,"font",t.font),n("bgcolor",t.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function rre(e,r){function t(a,i){return bm.coerce(e,r,Qee,a,i)}var n=t("visible",e.method==="skip"||Array.isArray(e.args));n&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var OP=ne((z0e,BP)=>{"use strict";BP.exports=Pn;var kl=kt(),HP=zt(),Tv=ln(),_m=pr();function Pn(e,r,t){this.gd=e,this.container=r,this.id=t,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})}Pn.barWidth=2;Pn.barLength=20;Pn.barRadius=2;Pn.barPad=1;Pn.barColor="#808BA4";Pn.prototype.enable=function(r,t,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=r;var l=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,v=this.position.direction,h=v==="down",d=v==="left",m=v==="right",g=v==="up",y=s,x=f,T,_,b,A;!h&&!d&&!m&&!g&&(this.position.direction="down",h=!0);var S=h||g;S?(T=l,_=T+y,h?(b=u,A=Math.min(b+x,o),x=A-b):(A=u+x,b=Math.max(A-x,0),x=A-b)):(b=u,A=b+x,d?(_=l+y,T=Math.max(_-y,0),y=_-T):(T=l,_=Math.min(T+y,i),y=_-T)),this._box={l:T,t:b,w:y,h:x};var M=s>y,D=Pn.barLength+2*Pn.barPad,z=Pn.barWidth+2*Pn.barPad,F=l,H=u+f;H+z>o&&(H=o-z);var Y=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);Y.exit().on(".drag",null).remove(),Y.enter().append("rect").classed("scrollbar-horizontal",!0).call(HP.fill,Pn.barColor),M?(this.hbar=Y.attr({rx:Pn.barRadius,ry:Pn.barRadius,x:F,y:H,width:D,height:z}),this._hbarXMin=F+D/2,this._hbarTranslateMax=y-D):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=f>x,X=Pn.barWidth+2*Pn.barPad,V=Pn.barLength+2*Pn.barPad,ee=l+s,te=u;ee+X>i&&(ee=i-X);var K=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);K.exit().on(".drag",null).remove(),K.enter().append("rect").classed("scrollbar-vertical",!0).call(HP.fill,Pn.barColor),O?(this.vbar=K.attr({rx:Pn.barRadius,ry:Pn.barRadius,x:ee,y:te,width:X,height:V}),this._vbarYMin=te+V/2,this._vbarTranslateMax=x-V):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var re=this.id,fe=T-.5,de=O?_+X+.5:_+.5,qe=b-.5,Be=M?A+z+.5:A+.5,Ne=a._topdefs.selectAll("#"+re).data(M||O?[0]:[]);if(Ne.exit().remove(),Ne.enter().append("clipPath").attr("id",re).append("rect"),M||O?(this._clipRect=Ne.select("rect").attr({x:Math.floor(fe),y:Math.floor(qe),width:Math.ceil(de)-Math.floor(fe),height:Math.ceil(Be)-Math.floor(qe)}),this.container.call(Tv.setClipUrl,re,this.gd),this.bg.attr({x:l,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Tv.setClipUrl,null),delete this._clipRect),M||O){var Ie=kl.behavior.drag().on("dragstart",function(){kl.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Ie);var Se=kl.behavior.drag().on("dragstart",function(){kl.event.sourceEvent.preventDefault(),kl.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(Se),O&&this.vbar.on(".drag",null).call(Se)}this.setTranslate(t,n)};Pn.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Tv.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)};Pn.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=kl.event.dx),this.vbar&&(t-=kl.event.dy),this.setTranslate(r,t)};Pn.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=kl.event.deltaY),this.vbar&&(t+=kl.event.deltaY),this.setTranslate(r,t)};Pn.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var n=r+this._hbarXMin,a=n+this._hbarTranslateMax,i=_m.constrain(kl.event.x,n,a),o=(i-n)/(a-n),l=this.position.w-this._box.w;r=o*l}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=_m.constrain(kl.event.y,s,u),v=(f-s)/(u-s),h=this.position.h-this._box.h;t=v*h}this.setTranslate(r,t)};Pn.prototype.setTranslate=function(r,t){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(r=_m.constrain(r||0,0,n),t=_m.constrain(t||0,0,a),this.translateX=r,this.translateY=t,this.container.call(Tv.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/n;this.hbar.call(Tv.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var o=t/a;this.vbar.call(Tv.setTranslate,r,t+o*this._vbarTranslateMax)}}});var $P=ne((N0e,JP)=>{"use strict";var kv=kt(),Mh=ua(),Ah=zt(),Sv=ln(),no=pr(),xm=ci(),tre=_n().arrayEditor,YP=Ka().LINE_SPACING,ct=ym(),nre=OP();JP.exports=function(r){var t=r._fullLayout,n=no.filterVisible(t[ct.name]);function a(h){Mh.autoMargin(r,XP(h))}var i=t._menulayer.selectAll("g."+ct.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(ct.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){kv.select(this).selectAll("g."+ct.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+ct.headerGroupClassName).data(n,are);o.enter().append("g").classed(ct.headerGroupClassName,!0);for(var l=no.ensureSingle(i,"g",ct.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var cre=ym();KP.exports={moduleType:"component",name:cre.name,layoutAttributes:l4(),supplyLayoutDefaults:IP(),draw:$P()}});var kh=ne((I0e,eR)=>{"use strict";eR.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 c4=ne((H0e,nR)=>{"use strict";var rR=$a(),vre=_d(),hre=la().extendDeepAll,dre=_o().overrideAll,pre=i1(),tR=_n().templatedArray,Nc=kh(),gre=tR("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}});nR.exports=dre(tR("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:gre,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:hre(vre({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:pre.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:rR({})},font:rR({}),activebgcolor:{valType:"color",dflt:Nc.gripBgActiveColor},bgcolor:{valType:"color",dflt:Nc.railBgColor},bordercolor:{valType:"color",dflt:Nc.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Nc.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Nc.tickLength},tickcolor:{valType:"color",dflt:Nc.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Nc.minorTickLength}}),"arraydraw","from-root")});var lR=ne((B0e,oR)=>{"use strict";var Cv=pr(),aR=gl(),iR=c4(),mre=kh(),yre=mre.name,bre=iR.steps;oR.exports=function(r,t){aR(r,t,{name:yre,handleItemDefaults:_re})};function _re(e,r,t){function n(v,h){return Cv.coerce(e,r,iR,v,h)}for(var a=aR(e,r,{name:"steps",handleItemDefaults:xre}),i=0,o=0;o{"use strict";var Sl=kt(),wm=ua(),ff=zt(),Cl=ln(),ao=pr(),wre=ao.strTranslate,Sh=ci(),Mre=_n().arrayEditor,Mt=kh(),d4=Ka(),fR=d4.LINE_SPACING,v4=d4.FROM_TL,h4=d4.FROM_BR;gR.exports=function(r){var t=r._context.staticPlot,n=r._fullLayout,a=Are(n,r),i=n._infolayer.selectAll("g."+Mt.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(Mt.containerClassName,!0).style("cursor",t?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),wm.autoMargin(r,cR(f))}if(i.exit().each(function(){Sl.select(this).selectAll("g."+Mt.groupClassName).each(o)}).remove(),a.length!==0){var l=i.selectAll("g."+Mt.groupClassName).data(a,Tre);l.enter().append("g").classed(Mt.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",wre(o-Mt.gripWidth*.5,r._dims.currentValueTotalHeight))}}function p4(e,r){var t=e._dims;return t.inputAreaStart+Mt.stepInset+(t.inputAreaLength-2*Mt.stepInset)*Math.min(1,Math.max(0,r))}function uR(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Mt.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Mt.stepInset-2*t.inputAreaStart)))}function Ere(e,r,t){var n=t._dims,a=ao.ensureSingle(e,"rect",Mt.railTouchRectClass,function(i){i.call(dR,r,e,t).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Mt.tickOffset+t.ticklen+n.labelHeight)}).call(ff.fill,t.bgcolor).attr("opacity",0),Cl.setTranslate(a,0,n.currentValueTotalHeight)}function Pre(e,r){var t=r._dims,n=t.inputAreaLength-Mt.railInset*2,a=ao.ensureSingle(e,"rect",Mt.railRectClass);a.attr({width:n,height:Mt.railWidth,rx:Mt.railRadius,ry:Mt.railRadius,"shape-rendering":"crispEdges"}).call(ff.stroke,r.bordercolor).call(ff.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),Cl.setTranslate(a,Mt.railInset,(t.inputAreaWidth-Mt.railWidth)*.5+t.currentValueTotalHeight)}});var bR=ne((U0e,yR)=>{"use strict";var Rre=kh();yR.exports={moduleType:"component",name:Rre.name,layoutAttributes:c4(),supplyLayoutDefaults:lR(),draw:mR()}});var Am=ne((Y0e,xR)=>{"use strict";var _R=cl();xR.exports={bgcolor:{valType:"color",dflt:_R.background,editType:"plot"},bordercolor:{valType:"color",dflt:_R.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 g4=ne((G0e,wR)=>{"use strict";wR.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 Tm=ne((V0e,MR)=>{"use strict";MR.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 kR=ne(Sm=>{"use strict";var zre=ya(),Nre=ci(),AR=Tm(),Fre=Ka().LINE_SPACING,km=AR.name;function TR(e){var r=e&&e[km];return r&&r.visible}Sm.isVisible=TR;Sm.makeData=function(e){for(var r=zre.list({_fullLayout:e},"x",!0),t=e.margin,n=[],a=0;a{"use strict";var Cm=pr(),SR=_n(),CR=ya(),Ire=Am(),Hre=g4();LR.exports=function(r,t,n){var a=r[n],i=t[n];if(!(a.rangeslider||t._requestRangeslider[i._id]))return;Cm.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,l=SR.newContainer(i,"rangeslider");function s(A,S){return Cm.coerce(o,l,Ire,A,S)}var u,f;function v(A,S){return Cm.coerce(u,f,Hre,A,S)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(o.range)),s("range");var d=t._subplots;if(d)for(var m=d.cartesian.filter(function(A){return A.substr(0,A.indexOf("y"))===CR.name2id(n)}).map(function(A){return A.substr(A.indexOf("y"),A.length)}),g=Cm.simpleMap(m,CR.id2name),y=0;y{"use strict";var Bre=ya().list,Ore=Ju().getAutoRange,Ure=Tm();DR.exports=function(r){for(var t=Bre(r,"x",!0),n=0;n{"use strict";var Lm=kt(),Yre=dt(),Gre=ua(),Gn=pr(),qm=Gn.strTranslate,RR=ln(),cf=zt(),Vre=x1(),Wre=Gb(),m4=ya(),Zre=To(),Xre=Ku(),Pt=Tm();zR.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,n=0;n=K.max)ee=H[te+1];else if(V=K.pmax)ee=H[te+1];else if(V0?e.touches[0].clientX:0}function jre(e,r,t,n){if(r._context.staticPlot)return;var a=e.select("rect."+Pt.slideBoxClassName).node(),i=e.select("rect."+Pt.grabAreaMinClassName).node(),o=e.select("rect."+Pt.grabAreaMaxClassName).node();function l(){var s=Lm.event,u=s.target,f=PR(s),v=f-e.node().getBoundingClientRect().left,h=n.d2p(t._rl[0]),d=n.d2p(t._rl[1]),m=Zre.coverSlip();this.addEventListener("touchmove",g),this.addEventListener("touchend",y),m.addEventListener("mousemove",g),m.addEventListener("mouseup",y);function g(x){var T=PR(x),_=+T-f,b,A,S;switch(u){case a:if(S="ew-resize",h+_>t._length||d+_<0)return;b=h+_,A=d+_;break;case i:if(S="col-resize",h+_>t._length)return;b=h+_,A=d;break;case o:if(S="col-resize",d+_<0)return;b=h,A=d+_;break;default:S="ew-resize",b=v,A=v+_;break}if(A{"use strict";var ite=pr(),ote=Am(),lte=g4(),y4=kR();FR.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:ite.extendFlat({},ote,{yaxis:lte})}}},layoutAttributes:Am(),handleDefaults:qR(),calcAutorange:ER(),draw:NR(),isVisible:y4.isVisible,makeData:y4.makeData,autoMarginOpts:y4.autoMarginOpts}});var Dm=ne(($0e,BR)=>{"use strict";var ste=$a(),HR=cl(),ute=_n().templatedArray,fte=ute("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"});BR.exports={visible:{valType:"boolean",editType:"plot"},buttons:fte,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:ste({editType:"plot"}),bgcolor:{valType:"color",dflt:HR.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:HR.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var b4=ne((K0e,OR)=>{"use strict";OR.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var GR=ne((Q0e,YR)=>{"use strict";var Em=pr(),cte=zt(),vte=_n(),hte=gl(),UR=Dm(),_4=b4();YR.exports=function(r,t,n,a,i){var o=r.rangeselector||{},l=vte.newContainer(t,"rangeselector");function s(d,m){return Em.coerce(o,l,UR,d,m)}var u=hte(o,l,{name:"buttons",handleItemDefaults:dte,calendar:i}),f=s("visible",u.length>0);if(f){var v=pte(t,n,a);s("x",v[0]),s("y",v[1]),Em.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),Em.coerceFont(s,"font",n.font);var h=s("bgcolor");s("activecolor",cte.contrast(h,_4.lightAmount,_4.darkAmount)),s("bordercolor"),s("borderwidth")}};function dte(e,r,t,n){var a=n.calendar;function i(s,u){return Em.coerce(e,r,UR.buttons,s,u)}var o=i("visible");if(o){var l=i("step");l!=="all"&&(a&&a!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function pte(e,r,t){for(var n=t.filter(function(l){return r[l].anchor===e._id}),a=0,i=0;i{"use strict";var gte=_y(),mte=pr().titleCase;VR.exports=function(r,t){var n=r._name,a={};if(t.step==="all")a[n+".autorange"]=!0;else{var i=yte(r,t);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function yte(e,r){var t=e.range,n=new Date(e.r2l(t[1])),a=r.step,i=gte["utc"+mte(a)],o=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+i.offset(n,-o));break;case"todate":var s=i.offset(n,-o);l=e.l2r(+i.ceil(s));break}var u=t[1];return[l,u]}});var ez=ne((rve,QR)=>{"use strict";var Rm=kt(),bte=dt(),_te=ua(),ZR=zt(),KR=ln(),ou=pr(),XR=ou.strTranslate,Pm=ci(),xte=ya(),M4=Ka(),jR=M4.LINE_SPACING,JR=M4.FROM_TL,$R=M4.FROM_BR,w4=b4(),wte=WR();QR.exports=function(r){var t=r._fullLayout,n=t._infolayer.selectAll(".rangeselector").data(Mte(r),Ate);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=Rm.select(this),o=a,l=o.rangeselector,s=i.selectAll("g.button").data(ou.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=Rm.select(this),v=wte(o,u);u._isActive=Tte(o,u,v),f.call(x4,l,u),f.call(Ste,l,u,r),f.on("click",function(){r._dragged||bte.call("_guiRelayout",r,v)}),f.on("mouseover",function(){u._isHovered=!0,f.call(x4,l,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(x4,l,u)})}),Lte(r,s,l,o._name,i)})};function Mte(e){for(var r=xte.list(e,"x",!0),t=[],n=0;n{"use strict";rz.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Dm()}}},layoutAttributes:Dm(),handleDefaults:GR(),draw:ez()}});var zm=ne(A4=>{"use strict";var nz=la().extendFlat;A4.attributes=function(e,r){e=e||{},r=r||{};var t={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+" ":"",a=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",o={x:nz({},t,{}),y:nz({},t,{}),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};A4.defaults=function(e,r,t,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=r.grid;if(o){var l=t("domain.column");l!==void 0&&(l{"use strict";var qte=pr(),Dte=x0().counter,Ete=zm().attributes,az=Pa().idRegex,Pte=_n(),T4={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:[Dte("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[az.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[az.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:Ete({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 Nm(e,r,t){var n=r[t+"axes"],a=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(n))return n;if(a.length)return a}function Rte(e,r){var t=e.grid||{},n=Nm(r,t,"x"),a=Nm(r,t,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),o=Array.isArray(n),l=Array.isArray(a),s=o&&n!==t.xaxes&&l&&a!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(l&&(u=a.length),o&&(f=n.length));var v=Pte.newContainer(r,"grid");function h(S,M){return qte.coerce(t,v,T4,S,M)}var d=h("rows",u),m=h("columns",f);if(!(d*m>1)){delete r.grid;return}if(!i&&!o&&!l){var g=h("pattern")==="independent";g&&(i=!0)}v._hasSubplotGrid=i;var y=h("roworder"),x=y==="top to bottom",T=i?.2:.1,_=i?.3:.1,b,A;s&&r._splomGridDflt&&(b=r._splomGridDflt.xside,A=r._splomGridDflt.yside),v._domains={x:iz("x",h,T,b,m),y:iz("y",h,_,A,d,x)}}function iz(e,r,t,n,a,i){var o=r(e+"gap",t),l=r("domain."+e);r(e+"side",n);for(var s=new Array(a),u=l[0],f=(l[1]-u)/(a-o),v=f*(1-o),h=0;h{"use strict";uz.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 vz=ne((ove,cz)=>{"use strict";var fz=Bt(),Nte=dt(),Fte=pr(),Ite=_n(),Hte=k4();cz.exports=function(e,r,t,n){var a="error_"+n.axis,i=Ite.newContainer(r,a),o=e[a]||{};function l(m,g){return Fte.coerce(o,i,Hte,m,g)}var s=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=l("visible",s);if(u!==!1){var f=l("type","array"in o?"data":"percent"),v=!0;f!=="sqrt"&&(v=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(l("array"),l("traceref"),v||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),v||l("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=r["error_"+n.inherit];(d||{}).visible&&l(h,!(o.color||fz(o.thickness)||fz(o.width)))}(!n.inherit||!i[h])&&(l("color",t),l("thickness"),l("width",Nte.traceIs(r,"gl3d")?0:4))}}});var S4=ne((lve,dz)=>{"use strict";dz.exports=function(r){var t=r.type,n=r.symmetric;if(t==="data"){var a=r.array||[];if(n)return function(u,f){var v=+a[f];return[v,v]};var i=r.arrayminus||[];return function(u,f){var v=+a[f],h=+i[f];return!isNaN(v)||!isNaN(h)?[h||0,v||0]:[NaN,NaN]}}else{var o=hz(t,r.value),l=hz(t,r.valueminus);return n||r.valueminus===void 0?function(u){var f=o(u);return[f,f]}:function(u){return[l(u),o(u)]}}};function hz(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var mz=ne((sve,gz)=>{"use strict";var C4=Bt(),Bte=dt(),L4=Cn(),Ote=pr(),Ute=S4();gz.exports=function(r){for(var t=r.calcdata,n=0;n{"use strict";var yz=kt(),vf=Bt(),Yte=ln(),Gte=Qa();bz.exports=function(r,t,n,a){var i,o=n.xaxis,l=n.yaxis,s=a&&a.duration>0,u=r._context.staticPlot;t.each(function(f){var v=f[0].trace,h=v.error_x||{},d=v.error_y||{},m;v.ids&&(m=function(T){return T.id});var g=Gte.hasMarkers(v)&&v.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var y=yz.select(this).selectAll("g.errorbar").data(f,m);if(y.exit().remove(),!!f.length){h.visible||y.selectAll("path.xerror").remove(),d.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var x=y.enter().append("g").classed("errorbar",!0);s&&x.style("opacity",0).transition().duration(a.duration).style("opacity",1),Yte.setClipUrl(y,n.layerClipId,r),y.each(function(T){var _=yz.select(this),b=Vte(T,o,l);if(!(g&&!T.vis)){var A,S=_.select("path.yerror");if(d.visible&&vf(b.x)&&vf(b.yh)&&vf(b.ys)){var M=d.width;A="M"+(b.x-M)+","+b.yh+"h"+2*M+"m-"+M+",0V"+b.ys,b.noYS||(A+="m-"+M+",0h"+2*M),i=!S.size(),i?S=_.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(S=S.transition().duration(a.duration).ease(a.easing)),S.attr("d",A)}else S.remove();var D=_.select("path.xerror");if(h.visible&&vf(b.y)&&vf(b.xh)&&vf(b.xs)){var z=(h.copy_ystyle?d:h).width;A="M"+b.xh+","+(b.y-z)+"v"+2*z+"m0,-"+z+"H"+b.xs,b.noXS||(A+="m0,-"+z+"v"+2*z),i=!D.size(),i?D=_.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(D=D.transition().duration(a.duration).ease(a.easing)),D.attr("d",A)}else D.remove()}})}})};function Vte(e,r,t){var n={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(n.yh=t.c2p(e.yh),n.ys=t.c2p(e.ys),vf(n.ys)||(n.noYS=!0,n.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),vf(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}});var Mz=ne((fve,wz)=>{"use strict";var Wte=kt(),xz=zt();wz.exports=function(r){r.each(function(t){var n=t[0].trace,a=n.error_y||{},i=n.error_x||{},o=Wte.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(xz.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(xz.stroke,i.color)})}});var kz=ne((cve,Tz)=>{"use strict";var Ch=pr(),Az=_o().overrideAll,Lh=k4(),Fc={error_x:Ch.extendFlat({},Lh),error_y:Ch.extendFlat({},Lh)};delete Fc.error_x.copy_zstyle;delete Fc.error_y.copy_zstyle;delete Fc.error_y.copy_ystyle;var qh={error_x:Ch.extendFlat({},Lh),error_y:Ch.extendFlat({},Lh),error_z:Ch.extendFlat({},Lh)};delete qh.error_x.copy_ystyle;delete qh.error_y.copy_ystyle;delete qh.error_z.copy_ystyle;delete qh.error_z.copy_zstyle;Tz.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Fc,bar:Fc,histogram:Fc,scatter3d:Az(qh,"calc","nested"),scattergl:Az(Fc,"calc","nested")}},supplyDefaults:vz(),calc:mz(),makeComputeError:S4(),plot:_z(),style:Mz(),hoverInfo:Zte};function Zte(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var Cz=ne((vve,Sz)=>{"use strict";Sz.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 zz=ne((hve,Rz)=>{"use strict";var hf=kt(),q4=Jl(),Im=ua(),Lz=dt(),lu=Cn(),Fm=To(),Fo=pr(),ql=Fo.strTranslate,Pz=la().extendFlat,D4=Ku(),Ll=ln(),E4=zt(),Xte=x1(),jte=ci(),Jte=es().flipScale,$te=Bb(),Kte=Ob(),Qte=pl(),P4=Ka(),qz=P4.LINE_SPACING,Dz=P4.FROM_TL,Ez=P4.FROM_BR,qn=Cz().cn;function ene(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+qn.colorbar).data(rne(e),function(n){return n._id});t.enter().append("g").attr("class",function(n){return n._id}).classed(qn.colorbar,!0),t.each(function(n){var a=hf.select(this);Fo.ensureSingle(a,"rect",qn.cbbg),Fo.ensureSingle(a,"g",qn.cbfills),Fo.ensureSingle(a,"g",qn.cblines),Fo.ensureSingle(a,"g",qn.cbaxis,function(o){o.classed(qn.crisp,!0)}),Fo.ensureSingle(a,"g",qn.cbtitleunshift,function(o){o.append("g").classed(qn.cbtitle,!0)}),Fo.ensureSingle(a,"rect",qn.cboutline);var i=tne(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&nne(a,n,e)}),t.exit().each(function(n){Im.autoMargin(e,n._id)}).remove(),t.order()}function rne(e){var r=e._fullLayout,t=e.calcdata,n=[],a,i,o,l;function s(_){return Pz(_,{_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 l.calc=="function"?l.calc(e,o,a):(a._fillgradient=i.reversescale?Jte(i.colorscale):i.colorscale,a._zrange=[i[l.min],i[l.max]])}for(var f=0;f1){var Q=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));Te*=Q*Fo.roundUp(W/Q,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=Te}se.domain=n?[Se+m/b.h,Se+re-m/b.h]:[Se+d/b.w,Se+re-d/b.w],se.setScale(),e.attr("transform",ql(Math.round(b.l),Math.round(b.t)));var $=e.select("."+qn.cbtitleunshift).attr("transform",ql(-Math.round(b.l),-Math.round(b.t))),Me=se.ticklabelposition,Fe=se.title.font.size,Oe=e.select("."+qn.cbaxis),fr,nr=0,Ze=0;function ar(yr,Ae){var Ve={propContainer:se,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:_._dfltTitle.colorbar,containerGroup:e.select("."+qn.cbtitle)},je=yr.charAt(0)==="h"?yr.substr(1):"h"+yr;e.selectAll("."+je+",."+je+"-math-group").remove(),Xte.draw(t,yr,Pz(Ve,Ae||{}))}function lr(){if(n&&be||!n&&!be){var yr,Ae;D==="top"&&(yr=d+b.l+fe*g,Ae=m+b.t+de*(1-Se-re)+3+Fe*.75),D==="bottom"&&(yr=d+b.l+fe*g,Ae=m+b.t+de*(1-Se)-3-Fe*.25),D==="right"&&(Ae=m+b.t+de*y+3+Fe*.75,yr=d+b.l+fe*Se),ar(se._id+"title",{attributes:{x:yr,y:Ae,"text-anchor":n?"start":"middle"}})}}function ir(){if(n&&!be||!n&&be){var yr=se.position||0,Ae=se._offset+se._length/2,Ve,je;if(D==="right")je=Ae,Ve=b.l+fe*yr+10+Fe*(se.showticklabels?1:.5);else if(Ve=Ae,D==="bottom"&&(je=b.t+de*yr+10+(Me.indexOf("inside")===-1?se.tickfont.size:0)+(se.ticks!=="intside"&&r.ticklen||0)),D==="top"){var zr=M.text.split("
").length;je=b.t+de*yr+10-ee-qz*Fe*zr}ar((n?"h":"v")+se._id+"title",{avoid:{selection:hf.select(t).selectAll("g."+se._id+"tick"),side:D,offsetTop:n?0:b.t,offsetLeft:n?b.l:0,maxShift:n?_.width:_.height},attributes:{x:Ve,y:je,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function rr(){if(!n&&!be||n&&be){var yr=e.select("."+qn.cbtitle),Ae=yr.select("text"),Ve=[-s/2,s/2],je=yr.select(".h"+se._id+"title-math-group").node(),zr=15.6;Ae.node()&&(zr=parseInt(Ae.node().style.fontSize,10)*qz);var kr;if(je?(kr=Ll.bBox(je),Ze=kr.width,nr=kr.height,nr>zr&&(Ve[1]-=(nr-zr)/2)):Ae.node()&&!Ae.classed(qn.jsPlaceholder)&&(kr=Ll.bBox(Ae.node()),Ze=kr.width,nr=kr.height),n){if(nr){if(nr+=5,D==="top")se.domain[1]-=nr/b.h,Ve[1]*=-1;else{se.domain[0]+=nr/b.h;var er=jte.lineCount(Ae);Ve[1]+=(1-er)*zr}yr.attr("transform",ql(Ve[0],Ve[1])),se.setScale()}}else Ze&&(D==="right"&&(se.domain[0]+=(Ze+Fe/2)/b.w),yr.attr("transform",ql(Ve[0],Ve[1])),se.setScale())}e.selectAll("."+qn.cbfills+",."+qn.cblines).attr("transform",n?ql(0,Math.round(b.h*(1-se.domain[1]))):ql(Math.round(b.w*se.domain[0]),0)),Oe.attr("transform",n?ql(0,Math.round(-b.t)):ql(Math.round(-b.l),0));var Ke=e.select("."+qn.cbfills).selectAll("rect."+qn.cbfill).attr("style","").data(X);Ke.enter().append("rect").classed(qn.cbfill,!0).attr("style",""),Ke.exit().remove();var mr=z.map(se.c2p).map(Math.round).sort(function(Pr,Ur){return Pr-Ur});Ke.each(function(Pr,Ur){var sr=[Ur===0?z[0]:(X[Ur]+X[Ur-1])/2,Ur===X.length-1?z[1]:(X[Ur]+X[Ur+1])/2].map(se.c2p).map(Math.round);n&&(sr[1]=Fo.constrain(sr[1]+(sr[1]>sr[0])?1:-1,mr[0],mr[1]));var _e=hf.select(this).attr(n?"x":"y",qe).attr(n?"y":"x",hf.min(sr)).attr(n?"width":"height",Math.max(ee,2)).attr(n?"height":"width",Math.max(hf.max(sr)-hf.min(sr),2));if(r._fillgradient)Ll.gradient(_e,t,r._id,n?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var ke=H(Pr).replace("e-","");_e.attr("fill",q4(ke).toHexString())}});var Mr=e.select("."+qn.cblines).selectAll("path."+qn.cbline).data(S.color&&S.width?V:[]);Mr.enter().append("path").classed(qn.cbline,!0),Mr.exit().remove(),Mr.each(function(Pr){var Ur=qe,sr=Math.round(se.c2p(Pr))+S.width/2%1;hf.select(this).attr("d","M"+(n?Ur+","+sr:sr+","+Ur)+(n?"h":"v")+ee).call(Ll.lineGroupStyle,S.width,F(Pr),S.dash)}),Oe.selectAll("g."+se._id+"tick,path").remove();var gr=qe+ee+(s||0)/2-(r.ticks==="outside"?1:0),dr=lu.calcTicks(se),Tr=lu.getTickSigns(se)[2];return lu.drawTicks(t,se,{vals:se.ticks==="inside"?lu.clipEnds(se,dr):dr,layer:Oe,path:lu.makeTickPath(se,gr,Tr),transFn:lu.makeTransTickFn(se)}),lu.drawLabels(t,se,{vals:dr,layer:Oe,transFn:lu.makeTransTickLabelFn(se),labelFns:lu.makeLabelFns(se,gr)})}function Cr(){var yr,Ae=ee+s/2;Me.indexOf("inside")===-1&&(yr=Ll.bBox(Oe.node()),Ae+=n?yr.width:yr.height),fr=$.select("text");var Ve=0,je=n&&D==="top",zr=!n&&D==="right",kr=0;if(fr.node()&&!fr.classed(qn.jsPlaceholder)){var er,Ke=$.select(".h"+se._id+"title-math-group").node();Ke&&(n&&be||!n&&!be)?(yr=Ll.bBox(Ke),Ve=yr.width,er=yr.height):(yr=Ll.bBox($.node()),Ve=yr.right-b.l-(n?qe:Xe),er=yr.bottom-b.t-(n?Xe:qe),!n&&D==="top"&&(Ae+=yr.height,kr=yr.height)),zr&&(fr.attr("transform",ql(Ve/2+Fe/2,0)),Ve*=2),Ae=Math.max(Ae,n?Ve:er)}var mr=(n?d:m)*2+Ae+u+s/2,Mr=0;!n&&M.text&&h==="bottom"&&y<=0&&(Mr=mr/2,mr+=Mr,kr+=Mr),_._hColorbarMoveTitle=Mr,_._hColorbarMoveCBTitle=kr;var gr=u+s,dr=(n?qe:Xe)-gr/2-(n?d:0),Tr=(n?Xe:qe)-(n?K:m+kr-Mr);e.select("."+qn.cbbg).attr("x",dr).attr("y",Tr).attr(n?"width":"height",Math.max(mr-Mr,2)).attr(n?"height":"width",Math.max(K+gr,2)).call(E4.fill,f).call(E4.stroke,r.bordercolor).style("stroke-width",u);var Pr=zr?Math.max(Ve-10,0):0;e.selectAll("."+qn.cboutline).attr("x",(n?qe:Xe+d)+Pr).attr("y",(n?Xe+m-K:qe)+(je?nr:0)).attr(n?"width":"height",Math.max(ee,2)).attr(n?"height":"width",Math.max(K-(n?2*m+nr:2*d+Pr),2)).call(E4.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var Ur=n?Be*mr:0,sr=n?0:(1-Ne)*mr-kr;if(Ur=T?b.l-Ur:-Ur,sr=x?b.t-sr:-sr,e.attr("transform",ql(Ur,sr)),!n&&(u||q4(f).getAlpha()&&!q4.equals(_.paper_bgcolor,f))){var _e=Oe.selectAll("text"),ke=_e[0].length,$e=e.select("."+qn.cbbg).node(),We=Ll.bBox($e),qr=Ll.getTranslate(e),Vr=2;_e.each(function(cn,sn){var Kt=0,aa=ke-1;if(sn===Kt||sn===aa){var rt=Ll.bBox(this),Qt=Ll.getTranslate(this),Ct;if(sn===aa){var dn=rt.right+Qt.x,pn=We.right+qr.x+Xe-u-Vr+g;Ct=pn-dn,Ct>0&&(Ct=0)}else if(sn===Kt){var tn=rt.left+Qt.x,un=We.left+qr.x+Xe+u+Vr;Ct=un-tn,Ct<0&&(Ct=0)}Ct&&(ke<3?this.setAttribute("transform","translate("+Ct+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Hr={},lt=Dz[v],xt=Ez[v],Rt=Dz[h],St=Ez[h],hn=mr-ee;n?(i==="pixels"?(Hr.y=y,Hr.t=K*Rt,Hr.b=K*St):(Hr.t=Hr.b=0,Hr.yt=y+a*Rt,Hr.yb=y-a*St),l==="pixels"?(Hr.x=g,Hr.l=mr*lt,Hr.r=mr*xt):(Hr.l=hn*lt,Hr.r=hn*xt,Hr.xl=g-o*lt,Hr.xr=g+o*xt)):(i==="pixels"?(Hr.x=g,Hr.l=K*lt,Hr.r=K*xt):(Hr.l=Hr.r=0,Hr.xl=g+a*lt,Hr.xr=g-a*xt),l==="pixels"?(Hr.y=1-y,Hr.t=mr*Rt,Hr.b=mr*St):(Hr.t=hn*Rt,Hr.b=hn*St,Hr.yt=y-o*Rt,Hr.yb=y+o*St));var Fn=r.y<.5?"b":"t",$n=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var Xt={r:_.width-dr-Ur,l:dr+Hr.r,b:_.height-Tr-sr,t:Tr+Hr.b};T&&x?Im.autoMargin(t,r._id,Hr):T?t._fullLayout._reservedMargin[r._id][Fn]=Xt[Fn]:x||n?t._fullLayout._reservedMargin[r._id][$n]=Xt[$n]:t._fullLayout._reservedMargin[r._id][Fn]=Xt[Fn]}return Fo.syncOrAsync([Im.previousPromises,lr,rr,ir,Im.previousPromises,Cr],t)}function nne(e,r,t){var n=r.orientation==="v",a=t._fullLayout,i=a._size,o,l,s;Fm.init({element:e.node(),gd:t,prepFn:function(){o=e.attr("transform"),D4(e)},moveFn:function(u,f){e.attr("transform",o+ql(u,f)),l=Fm.align((n?r._uFrac:r._vFrac)+u/i.w,n?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=Fm.align((n?r._vFrac:1-r._uFrac)-f/i.h,n?r._lenFrac:r._thickFrac,0,1,r.yanchor);var v=Fm.getCursor(l,s,r.xanchor,r.yanchor);D4(e,v)},doneFn:function(){if(D4(e),l!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=l,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?Lz.call("_guiRestyle",t,u,r._traceIndex):Lz.call("_guiRelayout",t,u)}}})}function ane(e,r,t){var n=r._levels,a=[],i=[],o,l,s=n.end+n.size/100,u=n.size,f=1.001*t[0]-.001*t[1],v=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(o=n.start+l*u,!(u>0?o>=s:o<=s));l++)o>f&&o0?o>=s:o<=s));l++)o>t[0]&&o{"use strict";Nz.exports={moduleType:"component",name:"colorbar",attributes:Jd(),supplyDefaults:F2(),draw:zz().draw,hasColorbar:k2()}});var Hz=ne((pve,Iz)=>{"use strict";Iz.exports={moduleType:"component",name:"legend",layoutAttributes:P3(),supplyLayoutDefaults:N3(),draw:j3(),style:V3()}});var Oz=ne((gve,Bz)=>{"use strict";Bz.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 Yz=ne((mve,Uz)=>{"use strict";Uz.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var z4=ne((yve,Zz)=>{"use strict";var one=dt(),Wz=pr(),R4=Wz.extendFlat,Gz=Wz.extendDeep;function Vz(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function lne(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}Zz.exports=function(r,t){var n,a=r.data,i=r.layout,o=Gz([],a),l=Gz({},i,Vz(t.tileClass)),s=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var u=Object.keys(l);for(n=0;n{"use strict";var sne=Fd().EventEmitter,une=dt(),fne=pr(),Xz=Sc(),cne=z4(),vne=Vg(),hne=Wg();function dne(e,r){var t=new sne,n=cne(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var l=Xz.getDelay(a._fullLayout);setTimeout(function(){var s=vne(a),u=document.createElement("canvas");u.id=fne.randstr(),t=hne({format:r.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){a&&document.body.removeChild(a)}},l)}var o=Xz.getRedrawFunc(a);return une.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(l){t.emit("error",l)}),t}jz.exports=dne});var Qz=ne((_ve,Kz)=>{"use strict";var $z=Sc(),pne={getDelay:$z.getDelay,getRedrawFunc:$z.getRedrawFunc,clone:z4(),toSVG:Vg(),svgToImg:Wg(),toImage:Jz(),downloadImage:vb()};Kz.exports=pne});var rN=ne(su=>{"use strict";su.version=Jh().version;V_();zw();var gne=dt(),Dh=su.register=gne.register,F4=iq(),eN=Object.keys(F4);for(Hm=0;Hm{"use strict";tN.exports=rN()});var Eh=ne((Mve,oN)=>{"use strict";var mne=Ru().hovertemplateAttrs,yne=Ru().texttemplateAttrs,bne=Y5(),ds=kc(),_ne=bo(),aN=H0(),xne=Kl().dash,Ic=la().extendFlat,wne=_o().overrideAll,Io=ds.marker,iN=ds.line,Mne=Io.line;oN.exports=wne({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:Ic({},ds.mode,{dflt:"markers"}),text:Ic({},ds.text,{}),texttemplate:yne({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:Ic({},ds.hovertext,{}),textfont:ds.textfont,textposition:ds.textposition,line:{color:iN.color,width:iN.width,dash:xne},connectgaps:ds.connectgaps,marker:Ic({symbol:Io.symbol,opacity:Io.opacity,angle:Io.angle,angleref:Ic({},Io.angleref,{values:["previous","up","north"]}),standoff:Io.standoff,size:Io.size,sizeref:Io.sizeref,sizemin:Io.sizemin,sizemode:Io.sizemode,colorbar:Io.colorbar,line:Ic({width:Mne.width},aN("marker.line")),gradient:Io.gradient},aN("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:bne(),selected:ds.selected,unselected:ds.unselected,hoverinfo:Ic({},_ne.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:mne()},"calc","nested")});var sN=ne((Ave,lN)=>{"use strict";var I4=pr(),H4=Qa(),Ane=pb(),Tne=gb(),kne=mb(),Sne=yb(),Cne=Eh();lN.exports=function(r,t,n,a){function i(d,m){return I4.coerce(r,t,Cne,d,m)}var o=i("locations"),l;if(o&&o.length){var s=i("geojson"),u;(typeof s=="string"&&s!==""||I4.isPlainObject(s))&&(u="geojson-id");var f=i("locationmode",u);f==="geojson-id"&&i("featureidkey"),l=o.length}else{var v=i("lon")||[],h=i("lat")||[];l=Math.min(v.length,h.length)}if(!l){t.visible=!1;return}t._length=l,i("text"),i("hovertext"),i("hovertemplate"),i("mode"),H4.hasMarkers(t)&&Ane(r,t,n,a,i,{gradient:!0}),H4.hasLines(t)&&(Tne(r,t,n,a,i),i("connectgaps")),H4.hasText(t)&&(i("texttemplate"),kne(r,t,a,i)),i("fill"),t.fill!=="none"&&Sne(r,t,n,i),I4.coerceSelectionMarkerOpacity(t,i)}});var cN=ne((Tve,fN)=>{"use strict";var uN=Cn();fN.exports=function(r,t,n){var a={},i=n[t.geo]._subplot,o=i.mockAxis,l=r.lonlat;return a.lonLabel=uN.tickText(o,o.c2l(l[0]),!0).text,a.latLabel=uN.tickText(o,o.c2l(l[1]),!0).text,a}});var gN=ne((kve,pN)=>{"use strict";var B4=Bt(),vN=En().BADNUM,Lne=xb(),qne=vh(),Dne=Qg(),Ene=pr().isArrayOrTypedArray,hN=pr()._;function dN(e){return e&&typeof e=="string"}pN.exports=function(r,t){var n=Ene(t.locations),a=n?t.locations.length:t._length,i=new Array(a),o;t.geojson?o=function(h){return dN(h)||B4(h)}:o=dN;for(var l=0;l{"use strict";Ya.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"};Ya.axesNames=["lonaxis","lataxis"];Ya.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Ya.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Ya.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]}};Ya.clipPad=.001;Ya.precision=.1;Ya.landColor="#F0DC82";Ya.waterColor="#3399FF";Ya.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Ya.sphereSVG={type:"Sphere"};Ya.fillLayers={ocean:1,land:1,lakes:1};Ya.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Ya.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Ya.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Ya.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var O4=ne((Om,mN)=>{(function(e,r){typeof Om=="object"&&typeof mN!="undefined"?r(Om):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.topojson=e.topojson||{}))})(Om,function(e){"use strict";function r(_){return _}function t(_){if(_==null)return r;var b,A,S=_.scale[0],M=_.scale[1],D=_.translate[0],z=_.translate[1];return function(F,H){H||(b=A=0);var Y=2,O=F.length,X=new Array(O);for(X[0]=(b+=F[0])*S+D,X[1]=(A+=F[1])*M+z;YD&&(D=Y[0]),Y[1]z&&(z=Y[1])}function H(Y){switch(Y.type){case"GeometryCollection":Y.geometries.forEach(H);break;case"Point":F(Y.coordinates);break;case"MultiPoint":Y.coordinates.forEach(F);break}}_.arcs.forEach(function(Y){for(var O=-1,X=Y.length,V;++OD&&(D=V[0]),V[1]z&&(z=V[1])});for(A in _.objects)H(_.objects[A]);return[S,M,D,z]}function a(_,b){for(var A,S=_.length,M=S-b;M<--S;)A=_[M],_[M++]=_[S],_[S]=A}function i(_,b){return typeof b=="string"&&(b=_.objects[b]),b.type==="GeometryCollection"?{type:"FeatureCollection",features:b.geometries.map(function(A){return o(_,A)})}:o(_,b)}function o(_,b){var A=b.id,S=b.bbox,M=b.properties==null?{}:b.properties,D=l(_,b);return A==null&&S==null?{type:"Feature",properties:M,geometry:D}:S==null?{type:"Feature",id:A,properties:M,geometry:D}:{type:"Feature",id:A,bbox:S,properties:M,geometry:D}}function l(_,b){var A=t(_.transform),S=_.arcs;function M(O,X){X.length&&X.pop();for(var V=S[O<0?~O:O],ee=0,te=V.length;ee1)S=v(_,b,A);else for(M=0,S=new Array(D=_.arcs.length);M1)for(var X=1,V=F(Y[0]),ee,te;XV&&(te=Y[0],Y[0]=Y[X],Y[X]=te,V=ee);return Y}).filter(function(H){return H.length>0})}}function g(_,b){for(var A=0,S=_.length;A>>1;_[M]=2))throw new Error("n must be \u22652");H=_.bbox||n(_);var A=H[0],S=H[1],M=H[2],D=H[3],z;b={scale:[M-A?(M-A)/(z-1):1,D-S?(D-S)/(z-1):1],translate:[A,S]}}else H=_.bbox;var F=x(b),H,Y,O=_.objects,X={};function V(K){return F(K)}function ee(K){var re;switch(K.type){case"GeometryCollection":re={type:"GeometryCollection",geometries:K.geometries.map(ee)};break;case"Point":re={type:"Point",coordinates:V(K.coordinates)};break;case"MultiPoint":re={type:"MultiPoint",coordinates:K.coordinates.map(V)};break;default:return K}return K.id!=null&&(re.id=K.id),K.bbox!=null&&(re.bbox=K.bbox),K.properties!=null&&(re.properties=K.properties),re}function te(K){var re=0,fe=1,de=K.length,qe,Be=new Array(de);for(Be[0]=F(K[0],0);++re{"use strict";var U4=yN.exports={},Pne=Ph().locationmodeToLayer,Rne=O4().feature;U4.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};U4.getTopojsonPath=function(e,r){return e+r+".json"};U4.getTopojsonFeatures=function(e,r){var t=Pne[e.locationmode],n=r.objects[t];return Rne(r,n).features}});var bN=ne(Rh=>{"use strict";var zne=En().BADNUM;Rh.calcTraceToLineCoords=function(e){for(var r=e[0].trace,t=r.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};Rh.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};Rh.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var r=new Array(e.length),t=0;t{_N.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 Vm=ne(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var Bi=63710088e-1,G4={centimeters:Bi*100,centimetres:Bi*100,degrees:360/(2*Math.PI),feet:Bi*3.28084,inches:Bi*39.37,kilometers:Bi/1e3,kilometres:Bi/1e3,meters:Bi,metres:Bi,miles:Bi/1609.344,millimeters:Bi*1e3,millimetres:Bi*1e3,nauticalmiles:Bi/1852,radians:1,yards:Bi*1.0936},Y4={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 df(e,r,t={}){let n={type:"Feature"};return(t.id===0||t.id)&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.properties=r||{},n.geometry=e,n}function Nne(e,r,t={}){switch(e){case"Point":return V4(r).geometry;case"LineString":return Z4(r).geometry;case"Polygon":return W4(r).geometry;case"MultiPoint":return MN(r).geometry;case"MultiLineString":return wN(r).geometry;case"MultiPolygon":return AN(r).geometry;default:throw new Error(e+" is invalid")}}function V4(e,r,t={}){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(!Ym(e[0])||!Ym(e[1]))throw new Error("coordinates must contain numbers");return df({type:"Point",coordinates:e},r,t)}function Fne(e,r,t={}){return Gm(e.map(n=>V4(n,r)),t)}function W4(e,r,t={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;iW4(n,r)),t)}function Z4(e,r,t={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return df({type:"LineString",coordinates:e},r,t)}function Hne(e,r,t={}){return Gm(e.map(n=>Z4(n,r)),t)}function Gm(e,r={}){let t={type:"FeatureCollection"};return r.id&&(t.id=r.id),r.bbox&&(t.bbox=r.bbox),t.features=e,t}function wN(e,r,t={}){return df({type:"MultiLineString",coordinates:e},r,t)}function MN(e,r,t={}){return df({type:"MultiPoint",coordinates:e},r,t)}function AN(e,r,t={}){return df({type:"MultiPolygon",coordinates:e},r,t)}function Bne(e,r,t={}){return df({type:"GeometryCollection",geometries:e},r,t)}function One(e,r=0){if(r&&!(r>=0))throw new Error("precision must be a positive number");let t=Math.pow(10,r||0);return Math.round(e*t)/t}function TN(e,r="kilometers"){let t=G4[r];if(!t)throw new Error(r+" units is invalid");return e*t}function X4(e,r="kilometers"){let t=G4[r];if(!t)throw new Error(r+" units is invalid");return e/t}function Une(e,r){return kN(X4(e,r))}function Yne(e){let r=e%360;return r<0&&(r+=360),r}function Gne(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function kN(e){return e%(2*Math.PI)*180/Math.PI}function Vne(e){return e%360*Math.PI/180}function Wne(e,r="kilometers",t="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return TN(X4(e,r),t)}function Zne(e,r="meters",t="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=Y4[r];if(!n)throw new Error("invalid original units");let a=Y4[t];if(!a)throw new Error("invalid final units");return e/n*a}function Ym(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Xne(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jne(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(r=>{if(!Ym(r))throw new Error("bbox must only contain numbers")})}function Jne(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")}vn.areaFactors=Y4;vn.azimuthToBearing=Gne;vn.bearingToAzimuth=Yne;vn.convertArea=Zne;vn.convertLength=Wne;vn.degreesToRadians=Vne;vn.earthRadius=Bi;vn.factors=G4;vn.feature=df;vn.featureCollection=Gm;vn.geometry=Nne;vn.geometryCollection=Bne;vn.isNumber=Ym;vn.isObject=Xne;vn.lengthToDegrees=Une;vn.lengthToRadians=X4;vn.lineString=Z4;vn.lineStrings=Hne;vn.multiLineString=wN;vn.multiPoint=MN;vn.multiPolygon=AN;vn.point=V4;vn.points=Fne;vn.polygon=W4;vn.polygons=Ine;vn.radiansToDegrees=kN;vn.radiansToLength=TN;vn.round=One;vn.validateBBox=jne;vn.validateId=Jne});var Zm=ne(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});var ii=Vm();function zh(e,r,t){if(e!==null)for(var n,a,i,o,l,s,u,f=0,v=0,h,d=e.type,m=d==="FeatureCollection",g=d==="Feature",y=m?e.features.length:1,x=0;xs||m>u||g>f){l=v,s=n,u=m,f=g,i=0;return}var y=ii.lineString.call(void 0,[l,v],t.properties);if(r(y,n,a,g,i)===!1)return!1;i++,l=v})===!1)return!1}}})}function nae(e,r,t){var n=t,a=!1;return LN(e,function(i,o,l,s,u){a===!1&&t===void 0?n=i:n=r(n,i,o,l,s,u),a=!0}),n}function qN(e,r){if(!e)throw new Error("geojson is required");Wm(e,function(t,n,a){if(t.geometry!==null){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(r(t,n,a,0,0)===!1)return!1;break;case"Polygon":for(var l=0;l{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var DN=Vm(),lae=Zm();function RN(e){return lae.geomReduce.call(void 0,e,(r,t)=>r+sae(t),0)}function sae(e){let r=0,t;switch(e.type){case"Polygon":return EN(e.coordinates);case"MultiPolygon":for(t=0;t0){r+=Math.abs(PN(e[0]));for(let t=1;t=r?(n+2)%r:n+2],l=a[0]*J4,s=i[1]*J4,u=o[0]*J4;t+=(u-l)*Math.sin(s),n++}return t*uae}var fae=RN;Xm.area=RN;Xm.default=fae});var FN=ne(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var cae=Vm(),vae=Zm();function NN(e,r={}){let t=0,n=0,a=0;return vae.coordEach.call(void 0,e,function(i){t+=i[0],n+=i[1],a++},!0),cae.point.call(void 0,[t/a,n/a],r.properties)}var hae=NN;jm.centroid=NN;jm.default=hae});var HN=ne(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var dae=Zm();function IN(e,r={}){if(e.bbox!=null&&r.recompute!==!0)return e.bbox;let t=[1/0,1/0,-1/0,-1/0];return dae.coordEach.call(void 0,e,n=>{t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]{"use strict";var gae=kt(),UN=xN(),{area:mae}=zN(),{centroid:yae}=FN(),{bbox:bae}=HN(),BN=kd(),qv=Pu(),_ae=Gs(),xae=$v(),$m=yg(),ON=Object.keys(UN),wae={"ISO-3":BN,"USA-states":BN,"country names":Mae};function Mae(e){for(var r=0;r0&&f[v+1][0]<0)return v;return null}switch(n==="RUS"||n==="FJI"?i=function(f){var v;if(u(f)===null)v=f;else for(v=new Array(f.length),s=0;sv?h[d++]=[f[s][0]+360,f[s][1]]:s===v?(h[d++]=f[s],h[d++]=[f[s][0],-90]):h[d++]=f[s];var m=$m.tester(h);m.pts.pop(),a.push(m)}:i=function(f){a.push($m.tester(f))},r.type){case"MultiPolygon":for(o=0;o0?m.properties.ct=Sae(m):m.properties.ct=[NaN,NaN],h.fIn=f,h.fOut=m,a.push(m)}else qv.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[v]}switch(t.type){case"FeatureCollection":var s=t.features;for(i=0;ia&&(a=l,t=o)}else t=r;return yae(t).geometry.coordinates}function Cae(e){var r=window.PlotlyGeoAssets||{},t=[];function n(s){return new Promise(function(u,f){gae.json(s,function(v,h){if(v){delete r[s];var d=v.status===404?'GeoJSON at URL "'+s+'" does not exist.':"Unexpected error while fetching from "+s;return f(new Error(d))}return r[s]=h,u(h)})})}function a(s){return new Promise(function(u,f){var v=0,h=setInterval(function(){if(r[s]&&r[s]!=="pending")return clearInterval(h),u(r[s]);if(v>100)return clearInterval(h),f("Unexpected error while fetching from "+s);v++},50)})}for(var i=0;i{"use strict";var qae=kt(),Dae=ln(),VN=zt(),WN=mh(),Eae=WN.stylePoints,Pae=WN.styleText;ZN.exports=function(r,t){t&&Rae(r,t)};function Rae(e,r){var t=r[0].trace,n=r[0].node3;n.style("opacity",r[0].trace.opacity),Eae(n,t,e),Pae(n,t,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=qae.select(this),o=a.trace,l=o.line||{};i.call(VN.stroke,l.color).call(Dae.dashLine,l.dash||"",l.width||0),o.fill!=="none"&&i.call(VN.fill,o.fillcolor)})}});var r_=ne((Ive,JN)=>{"use strict";var XN=kt(),ey=pr(),zae=Um().getTopojsonFeatures,K4=bN(),Qm=Km(),jN=Ju().findExtremes,e_=En().BADNUM,Nae=em().calcMarkerSize,Q4=Qa(),Fae=$4();function Iae(e,r,t){var n=r.layers.frontplot.select(".scatterlayer"),a=ey.makeTraceGroups(n,t,"trace scattergeo");function i(o,l){o.lonlat[0]===e_&&XN.select(l).remove()}a.selectAll("*").remove(),a.each(function(o){var l=XN.select(this),s=o[0].trace;if(Q4.hasLines(s)||s.fill!=="none"){var u=K4.calcTraceToLineCoords(o),f=s.fill!=="none"?K4.makePolygon(u):K4.makeLine(u);l.selectAll("path.js-line").data([{geojson:f,trace:s}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}Q4.hasMarkers(s)&&l.selectAll("path.point").data(ey.identity).enter().append("path").classed("point",!0).each(function(v){i(v,this)}),Q4.hasText(s)&&l.selectAll("g").data(ey.identity).enter().append("g").append("text").each(function(v){i(v,this)}),Fae(e,o)})}function Hae(e,r){var t=e[0].trace,n=r[t.geo],a=n._subplot,i=t._length,o,l;if(ey.isArrayOrTypedArray(t.locations)){var s=t.locationmode,u=s==="geojson-id"?Qm.extractTraceFeature(e):zae(t,a.topojson);for(o=0;o{"use strict";var Bae=ss(),Oae=En().BADNUM,Uae=Nb(),Yae=pr().fillText,Gae=Eh();$N.exports=function(r,t,n){var a=r.cd,i=a[0].trace,o=r.xa,l=r.ya,s=r.subplot,u=s.projection.isLonLatOverEdges,f=s.project;function v(T){var _=T.lonlat;if(_[0]===Oae||u(_))return 1/0;var b=f(_),A=f([t,n]),S=Math.abs(b[0]-A[0]),M=Math.abs(b[1]-A[1]),D=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(S*S+M*M)-D,1-3/D)}if(Bae.getClosest(a,v,r),r.index!==!1){var h=a[r.index],d=h.lonlat,m=[o.c2p(d),l.c2p(d)],g=h.mrc||1;r.x0=m[0]-g,r.x1=m[0]+g,r.y0=m[1]-g,r.y1=m[1]+g,r.loc=h.loc,r.lon=d[0],r.lat=d[1];var y={};y[i.geo]={_subplot:s};var x=i._module.formatLabels(h,i,y);return r.lonLabel=x.lonLabel,r.latLabel=x.latLabel,r.color=Uae(i,h),r.extraText=Vae(i,h,r,a[0].t.labels),r.hovertemplate=i.hovertemplate,[r]}};function Vae(e,r,t,n){if(e.hovertemplate)return;var a=r.hi||e.hoverinfo,i=a==="all"?Gae.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),l=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,f=[];function v(h){return h+"\xB0"}return o?f.push(r.loc):l&&s?f.push("("+v(t.latLabel)+", "+v(t.lonLabel)+")"):l?f.push(n.lon+v(t.lonLabel)):s&&f.push(n.lat+v(t.latLabel)),u&&Yae(r,e,f),f.join("
")}});var eF=ne((Bve,QN)=>{"use strict";QN.exports=function(r,t,n,a,i){r.lon=t.lon,r.lat=t.lat,r.location=t.loc?t.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(r.properties=o.fIn.properties),r}});var nF=ne((Ove,tF)=>{"use strict";var rF=Qa(),Wae=En().BADNUM;tF.exports=function(r,t){var n=r.cd,a=r.xaxis,i=r.yaxis,o=[],l=n[0].trace,s,u,f,v,h,d=!rF.hasMarkers(l)&&!rF.hasText(l);if(d)return[];if(t===!1)for(h=0;h{(function(e,r){typeof ry=="object"&&typeof aF!="undefined"?r(ry):typeof define=="function"&&define.amd?define(["exports"],r):r(e.d3=e.d3||{})})(ry,function(e){"use strict";function r(se,be){return sebe?1:se>=be?0:NaN}function t(se){return se.length===1&&(se=n(se)),{left:function(be,Te,pe,W){for(pe==null&&(pe=0),W==null&&(W=be.length);pe>>1;se(be[Q],Te)<0?pe=Q+1:W=Q}return pe},right:function(be,Te,pe,W){for(pe==null&&(pe=0),W==null&&(W=be.length);pe>>1;se(be[Q],Te)>0?W=Q:pe=Q+1}return pe}}}function n(se){return function(be,Te){return r(se(be),Te)}}var a=t(r),i=a.right,o=a.left;function l(se,be){be==null&&(be=s);for(var Te=0,pe=se.length-1,W=se[0],Q=new Array(pe<0?0:pe);Tese?1:be>=se?0:NaN}function v(se){return se===null?NaN:+se}function h(se,be){var Te=se.length,pe=0,W=-1,Q=0,$,Me,Fe=0;if(be==null)for(;++W1)return Fe/(pe-1)}function d(se,be){var Te=h(se,be);return Te&&Math.sqrt(Te)}function m(se,be){var Te=se.length,pe=-1,W,Q,$;if(be==null){for(;++pe=W)for(Q=$=W;++peW&&(Q=W),$=W)for(Q=$=W;++peW&&(Q=W),$0)return[se];if((pe=be0)for(se=Math.ceil(se/Me),be=Math.floor(be/Me),$=new Array(Q=Math.ceil(be-se+1));++W=0?(Q>=A?10:Q>=S?5:Q>=M?2:1)*Math.pow(10,W):-Math.pow(10,-W)/(Q>=A?10:Q>=S?5:Q>=M?2:1)}function F(se,be,Te){var pe=Math.abs(be-se)/Math.max(0,Te),W=Math.pow(10,Math.floor(Math.log(pe)/Math.LN10)),Q=pe/W;return Q>=A?W*=10:Q>=S?W*=5:Q>=M&&(W*=2),benr;)Ze.pop(),--ar;var lr=new Array(ar+1),ir;for(Q=0;Q<=ar;++Q)ir=lr[Q]=[],ir.x0=Q>0?Ze[Q-1]:fr,ir.x1=Q=1)return+Te(se[pe-1],pe-1,se);var pe,W=(pe-1)*be,Q=Math.floor(W),$=+Te(se[Q],Q,se),Me=+Te(se[Q+1],Q+1,se);return $+(Me-$)*(W-Q)}}function X(se,be,Te){return se=x.call(se,v).sort(r),Math.ceil((Te-be)/(2*(O(se,.75)-O(se,.25))*Math.pow(se.length,-1/3)))}function V(se,be,Te){return Math.ceil((Te-be)/(3.5*d(se)*Math.pow(se.length,-1/3)))}function ee(se,be){var Te=se.length,pe=-1,W,Q;if(be==null){for(;++pe=W)for(Q=W;++peQ&&(Q=W)}else for(;++pe=W)for(Q=W;++peQ&&(Q=W);return Q}function te(se,be){var Te=se.length,pe=Te,W=-1,Q,$=0;if(be==null)for(;++W=0;)for($=se[be],Te=$.length;--Te>=0;)Q[--W]=$[Te];return Q}function fe(se,be){var Te=se.length,pe=-1,W,Q;if(be==null){for(;++pe=W)for(Q=W;++peW&&(Q=W)}else for(;++pe=W)for(Q=W;++peW&&(Q=W);return Q}function de(se,be){for(var Te=be.length,pe=new Array(Te);Te--;)pe[Te]=se[be[Te]];return pe}function qe(se,be){if(Te=se.length){var Te,pe=0,W=0,Q,$=se[W];for(be==null&&(be=r);++pe{(function(e,r){typeof ty=="object"&&typeof iF!="undefined"?r(ty,t_()):typeof define=="function"&&define.amd?define(["exports","d3-array"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(ty,function(e,r){"use strict";function t(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(I){i(a,I,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(I,J,ce){var oe=I.s=J+ce,we=oe-J,He=oe-we;I.t=J-He+(ce-we)}var o=1e-6,l=1e-12,s=Math.PI,u=s/2,f=s/4,v=s*2,h=180/s,d=s/180,m=Math.abs,g=Math.atan,y=Math.atan2,x=Math.cos,T=Math.ceil,_=Math.exp,b=Math.log,A=Math.pow,S=Math.sin,M=Math.sign||function(I){return I>0?1:I<0?-1:0},D=Math.sqrt,z=Math.tan;function F(I){return I>1?0:I<-1?s:Math.acos(I)}function H(I){return I>1?u:I<-1?-u:Math.asin(I)}function Y(I){return(I=S(I/2))*I}function O(){}function X(I,J){I&&ee.hasOwnProperty(I.type)&&ee[I.type](I,J)}var V={Feature:function(I,J){X(I.geometry,J)},FeatureCollection:function(I,J){for(var ce=I.features,oe=-1,we=ce.length;++oe=0?1:-1,we=oe*ce,He=x(J),Je=S(J),or=Se*Je,ur=Ie*He+or*x(we),br=or*oe*S(we);fe.add(y(br,ur)),Ne=I,Ie=He,Se=Je}function W(I){return de.reset(),re(I,Xe),de*2}function Q(I){return[y(I[1],I[0]),H(I[2])]}function $(I){var J=I[0],ce=I[1],oe=x(ce);return[oe*x(J),oe*S(J),S(ce)]}function Me(I,J){return I[0]*J[0]+I[1]*J[1]+I[2]*J[2]}function Fe(I,J){return[I[1]*J[2]-I[2]*J[1],I[2]*J[0]-I[0]*J[2],I[0]*J[1]-I[1]*J[0]]}function Oe(I,J){I[0]+=J[0],I[1]+=J[1],I[2]+=J[2]}function fr(I,J){return[I[0]*J,I[1]*J,I[2]*J]}function nr(I){var J=D(I[0]*I[0]+I[1]*I[1]+I[2]*I[2]);I[0]/=J,I[1]/=J,I[2]/=J}var Ze,ar,lr,ir,rr,Cr,yr,Ae,Ve=t(),je,zr,kr={point:er,lineStart:mr,lineEnd:Mr,polygonStart:function(){kr.point=gr,kr.lineStart=dr,kr.lineEnd=Tr,Ve.reset(),Xe.polygonStart()},polygonEnd:function(){Xe.polygonEnd(),kr.point=er,kr.lineStart=mr,kr.lineEnd=Mr,fe<0?(Ze=-(lr=180),ar=-(ir=90)):Ve>o?ir=90:Ve<-o&&(ar=-90),zr[0]=Ze,zr[1]=lr},sphere:function(){Ze=-(lr=180),ar=-(ir=90)}};function er(I,J){je.push(zr=[Ze=I,lr=I]),Jir&&(ir=J)}function Ke(I,J){var ce=$([I*d,J*d]);if(Ae){var oe=Fe(Ae,ce),we=[oe[1],-oe[0],0],He=Fe(we,oe);nr(He),He=Q(He);var Je=I-rr,or=Je>0?1:-1,ur=He[0]*h*or,br,Qe=m(Je)>180;Qe^(or*rrir&&(ir=br)):(ur=(ur+360)%360-180,Qe^(or*rrir&&(ir=J))),Qe?IPr(Ze,lr)&&(lr=I):Pr(I,lr)>Pr(Ze,lr)&&(Ze=I):lr>=Ze?(Ilr&&(lr=I)):I>rr?Pr(Ze,I)>Pr(Ze,lr)&&(lr=I):Pr(I,lr)>Pr(Ze,lr)&&(Ze=I)}else je.push(zr=[Ze=I,lr=I]);Jir&&(ir=J),Ae=ce,rr=I}function mr(){kr.point=Ke}function Mr(){zr[0]=Ze,zr[1]=lr,kr.point=er,Ae=null}function gr(I,J){if(Ae){var ce=I-rr;Ve.add(m(ce)>180?ce+(ce>0?360:-360):ce)}else Cr=I,yr=J;Xe.point(I,J),Ke(I,J)}function dr(){Xe.lineStart()}function Tr(){gr(Cr,yr),Xe.lineEnd(),m(Ve)>o&&(Ze=-(lr=180)),zr[0]=Ze,zr[1]=lr,Ae=null}function Pr(I,J){return(J-=I)<0?J+360:J}function Ur(I,J){return I[0]-J[0]}function sr(I,J){return I[0]<=I[1]?I[0]<=J&&J<=I[1]:JPr(oe[0],oe[1])&&(oe[1]=we[1]),Pr(we[0],oe[1])>Pr(oe[0],oe[1])&&(oe[0]=we[0])):He.push(oe=we);for(Je=-1/0,ce=He.length-1,J=0,oe=He[ce];J<=ce;oe=we,++J)we=He[J],(or=Pr(oe[1],we[0]))>Je&&(Je=or,Ze=we[0],lr=oe[1])}return je=zr=null,Ze===1/0||ar===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ze,ar],[lr,ir]]}var ke,$e,We,qr,Vr,Hr,lt,xt,Rt,St,hn,Fn,$n,Xt,cn,sn,Kt={sphere:O,point:aa,lineStart:Qt,lineEnd:pn,polygonStart:function(){Kt.lineStart=tn,Kt.lineEnd=un},polygonEnd:function(){Kt.lineStart=Qt,Kt.lineEnd=pn}};function aa(I,J){I*=d,J*=d;var ce=x(J);rt(ce*x(I),ce*S(I),S(J))}function rt(I,J,ce){++ke,We+=(I-We)/ke,qr+=(J-qr)/ke,Vr+=(ce-Vr)/ke}function Qt(){Kt.point=Ct}function Ct(I,J){I*=d,J*=d;var ce=x(J);Xt=ce*x(I),cn=ce*S(I),sn=S(J),Kt.point=dn,rt(Xt,cn,sn)}function dn(I,J){I*=d,J*=d;var ce=x(J),oe=ce*x(I),we=ce*S(I),He=S(J),Je=y(D((Je=cn*He-sn*we)*Je+(Je=sn*oe-Xt*He)*Je+(Je=Xt*we-cn*oe)*Je),Xt*oe+cn*we+sn*He);$e+=Je,Hr+=Je*(Xt+(Xt=oe)),lt+=Je*(cn+(cn=we)),xt+=Je*(sn+(sn=He)),rt(Xt,cn,sn)}function pn(){Kt.point=aa}function tn(){Kt.point=ha}function un(){Sn(Fn,$n),Kt.point=aa}function ha(I,J){Fn=I,$n=J,I*=d,J*=d,Kt.point=Sn;var ce=x(J);Xt=ce*x(I),cn=ce*S(I),sn=S(J),rt(Xt,cn,sn)}function Sn(I,J){I*=d,J*=d;var ce=x(J),oe=ce*x(I),we=ce*S(I),He=S(J),Je=cn*He-sn*we,or=sn*oe-Xt*He,ur=Xt*we-cn*oe,br=D(Je*Je+or*or+ur*ur),Qe=H(br),hr=br&&-Qe/br;Rt+=hr*Je,St+=hr*or,hn+=hr*ur,$e+=Qe,Hr+=Qe*(Xt+(Xt=oe)),lt+=Qe*(cn+(cn=we)),xt+=Qe*(sn+(sn=He)),rt(Xt,cn,sn)}function Na(I){ke=$e=We=qr=Vr=Hr=lt=xt=Rt=St=hn=0,re(I,Kt);var J=Rt,ce=St,oe=hn,we=J*J+ce*ce+oe*oe;return wes?I+Math.round(-I/v)*v:I,J]}It.invert=It;function In(I,J,ce){return(I%=v)?J||ce?wn(io(I),mi(J,ce)):io(I):J||ce?mi(J,ce):It}function gi(I){return function(J,ce){return J+=I,[J>s?J-v:J<-s?J+v:J,ce]}}function io(I){var J=gi(I);return J.invert=gi(-I),J}function mi(I,J){var ce=x(I),oe=S(I),we=x(J),He=S(J);function Je(or,ur){var br=x(ur),Qe=x(or)*br,hr=S(or)*br,cr=S(ur),wr=cr*ce+Qe*oe;return[y(hr*we-wr*He,Qe*ce-cr*oe),H(wr*we+hr*He)]}return Je.invert=function(or,ur){var br=x(ur),Qe=x(or)*br,hr=S(or)*br,cr=S(ur),wr=cr*we-hr*He;return[y(hr*we+cr*He,Qe*ce+wr*oe),H(wr*ce-Qe*oe)]},Je}function ms(I){I=In(I[0]*d,I[1]*d,I.length>2?I[2]*d:0);function J(ce){return ce=I(ce[0]*d,ce[1]*d),ce[0]*=h,ce[1]*=h,ce}return J.invert=function(ce){return ce=I.invert(ce[0]*d,ce[1]*d),ce[0]*=h,ce[1]*=h,ce},J}function El(I,J,ce,oe,we,He){if(ce){var Je=x(J),or=S(J),ur=oe*ce;we==null?(we=J+oe*v,He=J-ur/2):(we=Bo(Je,we),He=Bo(Je,He),(oe>0?weHe)&&(we+=oe*v));for(var br,Qe=we;oe>0?Qe>He:Qe1&&I.push(I.pop().concat(I.shift()))},result:function(){var ce=I;return I=[],J=null,ce}}}function Hn(I,J){return m(I[0]-J[0])=0;--or)we.point((hr=Qe[or])[0],hr[1]);else oe(cr.x,cr.p.x,-1,we);cr=cr.p}cr=cr.o,Qe=cr.z,wr=!wr}while(!cr.v);we.lineEnd()}}}function bi(I){if(J=I.length){for(var J,ce=0,oe=I[0],we;++ce=0?1:-1,Wt=en*Yt,gn=Wt>s,qt=et*it;if(Kr.add(y(qt*en*S(Wt),jr*pt+qt*x(Wt))),Je+=gn?Yt+en*v:Yt,gn^wr>=ce^Dr>=ce){var ia=Fe($(cr),$(nt));nr(ia);var Rn=Fe(He,ia);nr(Rn);var mn=(gn^Yt>=0?-1:1)*H(Rn[2]);(oe>mn||oe===mn&&(ia[0]||ia[1]))&&(or+=gn^Yt>=0?1:-1)}}return(Je<-o||Je0){for(ur||(we.polygonStart(),ur=!0),we.lineStart(),pt=0;pt1&&Ir&2&&it.push(it.pop().concat(it.shift())),Qe.push(it.filter(Vn))}}return cr}}function Vn(I){return I.length>1}function nn(I,J){return((I=I.x)[0]<0?I[1]-u-o:u-I[1])-((J=J.x)[0]<0?J[1]-u-o:u-J[1])}var Dn=Br(function(){return!0},At,Yo,[-s,-u]);function At(I){var J=NaN,ce=NaN,oe=NaN,we;return{lineStart:function(){I.lineStart(),we=1},point:function(He,Je){var or=He>0?s:-s,ur=m(He-J);m(ur-s)0?u:-u),I.point(oe,ce),I.lineEnd(),I.lineStart(),I.point(or,ce),I.point(He,ce),we=0):oe!==or&&ur>=s&&(m(J-oe)o?g((S(J)*(He=x(oe))*S(ce)-S(oe)*(we=x(J))*S(I))/(we*He*Je)):(J+oe)/2}function Yo(I,J,ce,oe){var we;if(I==null)we=ce*u,oe.point(-s,we),oe.point(0,we),oe.point(s,we),oe.point(s,0),oe.point(s,-we),oe.point(0,-we),oe.point(-s,-we),oe.point(-s,0),oe.point(-s,we);else if(m(I[0]-J[0])>o){var He=I[0]0,we=m(J)>o;function He(Qe,hr,cr,wr){El(wr,I,ce,cr,Qe,hr)}function Je(Qe,hr){return x(Qe)*x(hr)>J}function or(Qe){var hr,cr,wr,Lr,et;return{lineStart:function(){Lr=wr=!1,et=1},point:function(jr,tt){var nt=[jr,tt],Dr,Ir=Je(jr,tt),it=oe?Ir?0:br(jr,tt):Ir?br(jr+(jr<0?s:-s),tt):0;if(!hr&&(Lr=wr=Ir)&&Qe.lineStart(),Ir!==wr&&(Dr=ur(hr,nt),(!Dr||Hn(hr,Dr)||Hn(nt,Dr))&&(nt[2]=1)),Ir!==wr)et=0,Ir?(Qe.lineStart(),Dr=ur(nt,hr),Qe.point(Dr[0],Dr[1])):(Dr=ur(hr,nt),Qe.point(Dr[0],Dr[1],2),Qe.lineEnd()),hr=Dr;else if(we&&hr&&oe^Ir){var pt;!(it&cr)&&(pt=ur(nt,hr,!0))&&(et=0,oe?(Qe.lineStart(),Qe.point(pt[0][0],pt[0][1]),Qe.point(pt[1][0],pt[1][1]),Qe.lineEnd()):(Qe.point(pt[1][0],pt[1][1]),Qe.lineEnd(),Qe.lineStart(),Qe.point(pt[0][0],pt[0][1],3)))}Ir&&(!hr||!Hn(hr,nt))&&Qe.point(nt[0],nt[1]),hr=nt,wr=Ir,cr=it},lineEnd:function(){wr&&Qe.lineEnd(),hr=null},clean:function(){return et|(Lr&&wr)<<1}}}function ur(Qe,hr,cr){var wr=$(Qe),Lr=$(hr),et=[1,0,0],jr=Fe(wr,Lr),tt=Me(jr,jr),nt=jr[0],Dr=tt-nt*nt;if(!Dr)return!cr&&Qe;var Ir=J*tt/Dr,it=-J*nt/Dr,pt=Fe(et,jr),Yt=fr(et,Ir),en=fr(jr,it);Oe(Yt,en);var Wt=pt,gn=Me(Yt,Wt),qt=Me(Wt,Wt),ia=gn*gn-qt*(Me(Yt,Yt)-1);if(!(ia<0)){var Rn=D(ia),mn=fr(Wt,(-gn-Rn)/qt);if(Oe(mn,Yt),mn=Q(mn),!cr)return mn;var Yr=Qe[0],Gt=hr[0],Bn=Qe[1],pa=hr[1],Xa;Gt0^mn[1]<(m(mn[0]-Yr)s^(Yr<=mn[0]&&mn[0]<=Gt)){var si=fr(Wt,(-gn+Rn)/qt);return Oe(si,Yt),[mn,Q(si)]}}}function br(Qe,hr){var cr=oe?I:s-I,wr=0;return Qe<-cr?wr|=1:Qe>cr&&(wr|=2),hr<-cr?wr|=4:hr>cr&&(wr|=8),wr}return Br(Je,or,He,oe?[0,-I]:[-s,I-s])}function cu(I,J,ce,oe,we,He){var Je=I[0],or=I[1],ur=J[0],br=J[1],Qe=0,hr=1,cr=ur-Je,wr=br-or,Lr;if(Lr=ce-Je,!(!cr&&Lr>0)){if(Lr/=cr,cr<0){if(Lr0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}if(Lr=we-Je,!(!cr&&Lr<0)){if(Lr/=cr,cr<0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}else if(cr>0){if(Lr0)){if(Lr/=wr,wr<0){if(Lr0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}if(Lr=He-or,!(!wr&&Lr<0)){if(Lr/=wr,wr<0){if(Lr>hr)return;Lr>Qe&&(Qe=Lr)}else if(wr>0){if(Lr0&&(I[0]=Je+Qe*cr,I[1]=or+Qe*wr),hr<1&&(J[0]=Je+hr*cr,J[1]=or+hr*wr),!0}}}}}var oo=1e9,Go=-oo;function Vo(I,J,ce,oe){function we(br,Qe){return I<=br&&br<=ce&&J<=Qe&&Qe<=oe}function He(br,Qe,hr,cr){var wr=0,Lr=0;if(br==null||(wr=Je(br,hr))!==(Lr=Je(Qe,hr))||ur(br,Qe)<0^hr>0)do cr.point(wr===0||wr===3?I:ce,wr>1?oe:J);while((wr=(wr+hr+4)%4)!==Lr);else cr.point(Qe[0],Qe[1])}function Je(br,Qe){return m(br[0]-I)0?0:3:m(br[0]-ce)0?2:1:m(br[1]-J)0?1:0:Qe>0?3:2}function or(br,Qe){return ur(br.x,Qe.x)}function ur(br,Qe){var hr=Je(br,1),cr=Je(Qe,1);return hr!==cr?hr-cr:hr===0?Qe[1]-br[1]:hr===1?br[0]-Qe[0]:hr===2?br[1]-Qe[1]:Qe[0]-br[0]}return function(br){var Qe=br,hr=Oo(),cr,wr,Lr,et,jr,tt,nt,Dr,Ir,it,pt,Yt={point:en,lineStart:ia,lineEnd:Rn,polygonStart:gn,polygonEnd:qt};function en(Yr,Gt){we(Yr,Gt)&&Qe.point(Yr,Gt)}function Wt(){for(var Yr=0,Gt=0,Bn=wr.length;Gtoe&&(al-nl)*(oe-si)>(Zl-si)*(I-nl)&&++Yr:Zl<=oe&&(al-nl)*(oe-si)<(Zl-si)*(I-nl)&&--Yr;return Yr}function gn(){Qe=hr,cr=[],wr=[],pt=!0}function qt(){var Yr=Wt(),Gt=pt&&Yr,Bn=(cr=r.merge(cr)).length;(Gt||Bn)&&(br.polygonStart(),Gt&&(br.lineStart(),He(null,null,1,br),br.lineEnd()),Bn&&Uo(cr,or,Yr,He,br),br.polygonEnd()),Qe=br,cr=wr=Lr=null}function ia(){Yt.point=mn,wr&&wr.push(Lr=[]),it=!0,Ir=!1,nt=Dr=NaN}function Rn(){cr&&(mn(et,jr),tt&&Ir&&hr.rejoin(),cr.push(hr.result())),Yt.point=en,Ir&&Qe.lineEnd()}function mn(Yr,Gt){var Bn=we(Yr,Gt);if(wr&&Lr.push([Yr,Gt]),it)et=Yr,jr=Gt,tt=Bn,it=!1,Bn&&(Qe.lineStart(),Qe.point(Yr,Gt));else if(Bn&&Ir)Qe.point(Yr,Gt);else{var pa=[nt=Math.max(Go,Math.min(oo,nt)),Dr=Math.max(Go,Math.min(oo,Dr))],Xa=[Yr=Math.max(Go,Math.min(oo,Yr)),Gt=Math.max(Go,Math.min(oo,Gt))];cu(pa,Xa,I,J,ce,oe)?(Ir||(Qe.lineStart(),Qe.point(pa[0],pa[1])),Qe.point(Xa[0],Xa[1]),Bn||Qe.lineEnd(),pt=!1):Bn&&(Qe.lineStart(),Qe.point(Yr,Gt),pt=!1)}nt=Yr,Dr=Gt,Ir=Bn}return Yt}}function vu(){var I=0,J=0,ce=960,oe=500,we,He,Je;return Je={stream:function(or){return we&&He===or?we:we=Vo(I,J,ce,oe)(He=or)},extent:function(or){return arguments.length?(I=+or[0][0],J=+or[0][1],ce=+or[1][0],oe=+or[1][1],we=He=null,Je):[[I,J],[ce,oe]]}}}var Pl=t(),Rl,_i,lo,Wo={sphere:O,point:O,lineStart:zl,lineEnd:O,polygonStart:O,polygonEnd:O};function zl(){Wo.point=Mf,Wo.lineEnd=bs}function bs(){Wo.point=Wo.lineEnd=O}function Mf(I,J){I*=d,J*=d,Rl=I,_i=S(J),lo=x(J),Wo.point=Zc}function Zc(I,J){I*=d,J*=d;var ce=S(J),oe=x(J),we=m(I-Rl),He=x(we),Je=S(we),or=oe*Je,ur=lo*ce-_i*oe*He,br=_i*ce+lo*oe*He;Pl.add(y(D(or*or+ur*ur),br)),Rl=I,_i=ce,lo=oe}function _s(I){return Pl.reset(),re(I,Wo),+Pl}var xs=[null,null],ws={type:"LineString",coordinates:xs};function Zo(I,J){return xs[0]=I,xs[1]=J,_s(ws)}var so={Feature:function(I,J){return Oi(I.geometry,J)},FeatureCollection:function(I,J){for(var ce=I.features,oe=-1,we=ce.length;++oe0&&(we=Zo(I[He],I[He-1]),we>0&&ce<=we&&oe<=we&&(ce+oe-we)*(1-Math.pow((ce-oe)/we,2))o}).map(cr)).concat(r.range(T(He/br)*br,we,br).filter(function(Dr){return m(Dr%hr)>o}).map(wr))}return tt.lines=function(){return nt().map(function(Dr){return{type:"LineString",coordinates:Dr}})},tt.outline=function(){return{type:"Polygon",coordinates:[Lr(oe).concat(et(Je).slice(1),Lr(ce).reverse().slice(1),et(or).reverse().slice(1))]}},tt.extent=function(Dr){return arguments.length?tt.extentMajor(Dr).extentMinor(Dr):tt.extentMinor()},tt.extentMajor=function(Dr){return arguments.length?(oe=+Dr[0][0],ce=+Dr[1][0],or=+Dr[0][1],Je=+Dr[1][1],oe>ce&&(Dr=oe,oe=ce,ce=Dr),or>Je&&(Dr=or,or=Je,Je=Dr),tt.precision(jr)):[[oe,or],[ce,Je]]},tt.extentMinor=function(Dr){return arguments.length?(J=+Dr[0][0],I=+Dr[1][0],He=+Dr[0][1],we=+Dr[1][1],J>I&&(Dr=J,J=I,I=Dr),He>we&&(Dr=He,He=we,we=Dr),tt.precision(jr)):[[J,He],[I,we]]},tt.step=function(Dr){return arguments.length?tt.stepMajor(Dr).stepMinor(Dr):tt.stepMinor()},tt.stepMajor=function(Dr){return arguments.length?(Qe=+Dr[0],hr=+Dr[1],tt):[Qe,hr]},tt.stepMinor=function(Dr){return arguments.length?(ur=+Dr[0],br=+Dr[1],tt):[ur,br]},tt.precision=function(Dr){return arguments.length?(jr=+Dr,cr=Ui(He,we,90),wr=As(J,I,jr),Lr=Ui(or,Je,90),et=As(oe,ce,jr),tt):jr},tt.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ts(){return jc()()}function Fv(I,J){var ce=I[0]*d,oe=I[1]*d,we=J[0]*d,He=J[1]*d,Je=x(oe),or=S(oe),ur=x(He),br=S(He),Qe=Je*x(ce),hr=Je*S(ce),cr=ur*x(we),wr=ur*S(we),Lr=2*H(D(Y(He-oe)+Je*ur*Y(we-ce))),et=S(Lr),jr=Lr?function(tt){var nt=S(tt*=Lr)/et,Dr=S(Lr-tt)/et,Ir=Dr*Qe+nt*cr,it=Dr*hr+nt*wr,pt=Dr*or+nt*br;return[y(it,Ir)*h,y(pt,D(Ir*Ir+it*it))*h]}:function(){return[ce*h,oe*h]};return jr.distance=Lr,jr}function Xo(I){return I}var kf=t(),Fl=t(),Jc,fo,co,Sf,xi={point:O,lineStart:O,lineEnd:O,polygonStart:function(){xi.lineStart=Iv,xi.lineEnd=Hv},polygonEnd:function(){xi.lineStart=xi.lineEnd=xi.point=O,kf.add(m(Fl)),Fl.reset()},result:function(){var I=kf/2;return kf.reset(),I}};function Iv(){xi.point=Yi}function Yi(I,J){xi.point=Il,Jc=co=I,fo=Sf=J}function Il(I,J){Fl.add(Sf*I-co*J),co=I,Sf=J}function Hv(){Il(Jc,fo)}var Gi=1/0,jo=Gi,Jo=-Gi,$o=Jo,vo={point:ks,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var I=[[Gi,jo],[Jo,$o]];return Jo=$o=-(jo=Gi=1/0),I}};function ks(I,J){IJo&&(Jo=I),J$o&&($o=J)}var du=0,Ss=0,Cs=0,Ko=0,Hl=0,Bl=0,pu=0,gu=0,oi=0,mu,yu,Fa,Kn,Aa={point:Vi,lineStart:Ls,lineEnd:Cf,polygonStart:function(){Aa.lineStart=$c,Aa.lineEnd=Bv},polygonEnd:function(){Aa.point=Vi,Aa.lineStart=Ls,Aa.lineEnd=Cf},result:function(){var I=oi?[pu/oi,gu/oi]:Bl?[Ko/Bl,Hl/Bl]:Cs?[du/Cs,Ss/Cs]:[NaN,NaN];return du=Ss=Cs=Ko=Hl=Bl=pu=gu=oi=0,I}};function Vi(I,J){du+=I,Ss+=J,++Cs}function Ls(){Aa.point=Qo}function Qo(I,J){Aa.point=Ol,Vi(Fa=I,Kn=J)}function Ol(I,J){var ce=I-Fa,oe=J-Kn,we=D(ce*ce+oe*oe);Ko+=we*(Fa+I)/2,Hl+=we*(Kn+J)/2,Bl+=we,Vi(Fa=I,Kn=J)}function Cf(){Aa.point=Vi}function $c(){Aa.point=Ov}function Bv(){Lf(mu,yu)}function Ov(I,J){Aa.point=Lf,Vi(mu=Fa=I,yu=Kn=J)}function Lf(I,J){var ce=I-Fa,oe=J-Kn,we=D(ce*ce+oe*oe);Ko+=we*(Fa+I)/2,Hl+=we*(Kn+J)/2,Bl+=we,we=Kn*I-Fa*J,pu+=we*(Fa+I),gu+=we*(Kn+J),oi+=we*3,Vi(Fa=I,Kn=J)}function qf(I){this._context=I}qf.prototype={_radius:4.5,pointRadius:function(I){return this._radius=I,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(I,J){switch(this._point){case 0:{this._context.moveTo(I,J),this._point=1;break}case 1:{this._context.lineTo(I,J);break}default:{this._context.moveTo(I+this._radius,J),this._context.arc(I,J,this._radius,0,v);break}}},result:O};var Df=t(),Ef,Kc,Qc,qs,Ds,wi={point:O,lineStart:function(){wi.point=bu},lineEnd:function(){Ef&&Es(Kc,Qc),wi.point=O},polygonStart:function(){Ef=!0},polygonEnd:function(){Ef=null},result:function(){var I=+Df;return Df.reset(),I}};function bu(I,J){wi.point=Es,Kc=qs=I,Qc=Ds=J}function Es(I,J){qs-=I,Ds-=J,Df.add(D(qs*qs+Ds*Ds)),qs=I,Ds=J}function _u(){this._string=[]}_u.prototype={_radius:4.5,_circle:e0(4.5),pointRadius:function(I){return(I=+I)!==this._radius&&(this._radius=I,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(I,J){switch(this._point){case 0:{this._string.push("M",I,",",J),this._point=1;break}case 1:{this._string.push("L",I,",",J);break}default:{this._circle==null&&(this._circle=e0(this._radius)),this._string.push("M",I,",",J,this._circle);break}}},result:function(){if(this._string.length){var I=this._string.join("");return this._string=[],I}else return null}};function e0(I){return"m0,"+I+"a"+I+","+I+" 0 1,1 0,"+-2*I+"a"+I+","+I+" 0 1,1 0,"+2*I+"z"}function Pf(I,J){var ce=4.5,oe,we;function He(Je){return Je&&(typeof ce=="function"&&we.pointRadius(+ce.apply(this,arguments)),re(Je,oe(we))),we.result()}return He.area=function(Je){return re(Je,oe(xi)),xi.result()},He.measure=function(Je){return re(Je,oe(wi)),wi.result()},He.bounds=function(Je){return re(Je,oe(vo)),vo.result()},He.centroid=function(Je){return re(Je,oe(Aa)),Aa.result()},He.projection=function(Je){return arguments.length?(oe=Je==null?(I=null,Xo):(I=Je).stream,He):I},He.context=function(Je){return arguments.length?(we=Je==null?(J=null,new _u):new qf(J=Je),typeof ce!="function"&&we.pointRadius(ce),He):J},He.pointRadius=function(Je){return arguments.length?(ce=typeof Je=="function"?Je:(we.pointRadius(+Je),+Je),He):ce},He.projection(I).context(J)}function Uv(I){return{stream:ho(I)}}function ho(I){return function(J){var ce=new xu;for(var oe in I)ce[oe]=I[oe];return ce.stream=J,ce}}function xu(){}xu.prototype={constructor:xu,point:function(I,J){this.stream.point(I,J)},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 Ul(I,J,ce){var oe=I.clipExtent&&I.clipExtent();return I.scale(150).translate([0,0]),oe!=null&&I.clipExtent(null),re(ce,I.stream(vo)),J(vo.result()),oe!=null&&I.clipExtent(oe),I}function Ps(I,J,ce){return Ul(I,function(oe){var we=J[1][0]-J[0][0],He=J[1][1]-J[0][1],Je=Math.min(we/(oe[1][0]-oe[0][0]),He/(oe[1][1]-oe[0][1])),or=+J[0][0]+(we-Je*(oe[1][0]+oe[0][0]))/2,ur=+J[0][1]+(He-Je*(oe[1][1]+oe[0][1]))/2;I.scale(150*Je).translate([or,ur])},ce)}function Rs(I,J,ce){return Ps(I,[[0,0],J],ce)}function Rf(I,J,ce){return Ul(I,function(oe){var we=+J,He=we/(oe[1][0]-oe[0][0]),Je=(we-He*(oe[1][0]+oe[0][0]))/2,or=-He*oe[0][1];I.scale(150*He).translate([Je,or])},ce)}function po(I,J,ce){return Ul(I,function(oe){var we=+J,He=we/(oe[1][1]-oe[0][1]),Je=-He*oe[0][0],or=(we-He*(oe[1][1]+oe[0][1]))/2;I.scale(150*He).translate([Je,or])},ce)}var r0=16,zf=x(30*d);function t0(I,J){return+J?wu(I,J):Nf(I)}function Nf(I){return ho({point:function(J,ce){J=I(J,ce),this.stream.point(J[0],J[1])}})}function wu(I,J){function ce(oe,we,He,Je,or,ur,br,Qe,hr,cr,wr,Lr,et,jr){var tt=br-oe,nt=Qe-we,Dr=tt*tt+nt*nt;if(Dr>4*J&&et--){var Ir=Je+cr,it=or+wr,pt=ur+Lr,Yt=D(Ir*Ir+it*it+pt*pt),en=H(pt/=Yt),Wt=m(m(pt)-1)J||m((tt*Rn+nt*mn)/Dr-.5)>.3||Je*cr+or*wr+ur*Lr2?Yr[2]%360*d:0,Rn()):[or*h,ur*h,br*h]},qt.angle=function(Yr){return arguments.length?(hr=Yr%360*d,Rn()):hr*h},qt.reflectX=function(Yr){return arguments.length?(cr=Yr?-1:1,Rn()):cr<0},qt.reflectY=function(Yr){return arguments.length?(wr=Yr?-1:1,Rn()):wr<0},qt.precision=function(Yr){return arguments.length?(pt=t0(Yt,it=Yr*Yr),mn()):D(it)},qt.fitExtent=function(Yr,Gt){return Ps(qt,Yr,Gt)},qt.fitSize=function(Yr,Gt){return Rs(qt,Yr,Gt)},qt.fitWidth=function(Yr,Gt){return Rf(qt,Yr,Gt)},qt.fitHeight=function(Yr,Gt){return po(qt,Yr,Gt)};function Rn(){var Yr=Hf(ce,0,0,cr,wr,hr).apply(null,J(He,Je)),Gt=(hr?Hf:Yv)(ce,oe-Yr[0],we-Yr[1],cr,wr,hr);return Qe=In(or,ur,br),Yt=wn(J,Gt),en=wn(Qe,Yt),pt=t0(Yt,it),mn()}function mn(){return Wt=gn=null,qt}return function(){return J=I.apply(this,arguments),qt.invert=J.invert&&ia,Rn()}}function Yl(I){var J=0,ce=s/3,oe=Bf(I),we=oe(J,ce);return we.parallels=function(He){return arguments.length?oe(J=He[0]*d,ce=He[1]*d):[J*h,ce*h]},we}function Of(I){var J=x(I);function ce(oe,we){return[oe*J,S(we)/J]}return ce.invert=function(oe,we){return[oe/J,H(we*J)]},ce}function n0(I,J){var ce=S(I),oe=(ce+S(J))/2;if(m(oe)=.12&&jr<.234&&et>=-.425&&et<-.214?we:jr>=.166&&jr<.234&&et>=-.214&&et<-.115?Je:ce).invert(cr)},Qe.stream=function(cr){return I&&J===cr?I:I=Gv([ce.stream(J=cr),we.stream(cr),Je.stream(cr)])},Qe.precision=function(cr){return arguments.length?(ce.precision(cr),we.precision(cr),Je.precision(cr),hr()):ce.precision()},Qe.scale=function(cr){return arguments.length?(ce.scale(cr),we.scale(cr*.35),Je.scale(cr),Qe.translate(ce.translate())):ce.scale()},Qe.translate=function(cr){if(!arguments.length)return ce.translate();var wr=ce.scale(),Lr=+cr[0],et=+cr[1];return oe=ce.translate(cr).clipExtent([[Lr-.455*wr,et-.238*wr],[Lr+.455*wr,et+.238*wr]]).stream(br),He=we.translate([Lr-.307*wr,et+.201*wr]).clipExtent([[Lr-.425*wr+o,et+.12*wr+o],[Lr-.214*wr-o,et+.234*wr-o]]).stream(br),or=Je.translate([Lr-.205*wr,et+.212*wr]).clipExtent([[Lr-.214*wr+o,et+.166*wr+o],[Lr-.115*wr-o,et+.234*wr-o]]).stream(br),hr()},Qe.fitExtent=function(cr,wr){return Ps(Qe,cr,wr)},Qe.fitSize=function(cr,wr){return Rs(Qe,cr,wr)},Qe.fitWidth=function(cr,wr){return Rf(Qe,cr,wr)},Qe.fitHeight=function(cr,wr){return po(Qe,cr,wr)};function hr(){return I=J=null,Qe}return Qe.scale(1070)}function Wi(I){return function(J,ce){var oe=x(J),we=x(ce),He=I(oe*we);return[He*we*S(J),He*S(ce)]}}function Ai(I){return function(J,ce){var oe=D(J*J+ce*ce),we=I(oe),He=S(we),Je=x(we);return[y(J*He,oe*Je),H(oe&&ce*He/oe)]}}var Ia=Wi(function(I){return D(2/(1+I))});Ia.invert=Ai(function(I){return 2*H(I/2)});function Wv(){return Mi(Ia).scale(124.75).clipAngle(180-.001)}var Gl=Wi(function(I){return(I=F(I))&&I/S(I)});Gl.invert=Ai(function(I){return I});function i0(){return Mi(Gl).scale(79.4188).clipAngle(180-.001)}function Za(I,J){return[I,b(z((u+J)/2))]}Za.invert=function(I,J){return[I,2*g(_(J))-u]};function o0(){return l0(Za).scale(961/v)}function l0(I){var J=Mi(I),ce=J.center,oe=J.scale,we=J.translate,He=J.clipExtent,Je=null,or,ur,br;J.scale=function(hr){return arguments.length?(oe(hr),Qe()):oe()},J.translate=function(hr){return arguments.length?(we(hr),Qe()):we()},J.center=function(hr){return arguments.length?(ce(hr),Qe()):ce()},J.clipExtent=function(hr){return arguments.length?(hr==null?Je=or=ur=br=null:(Je=+hr[0][0],or=+hr[0][1],ur=+hr[1][0],br=+hr[1][1]),Qe()):Je==null?null:[[Je,or],[ur,br]]};function Qe(){var hr=s*oe(),cr=J(ms(J.rotate()).invert([0,0]));return He(Je==null?[[cr[0]-hr,cr[1]-hr],[cr[0]+hr,cr[1]+hr]]:I===Za?[[Math.max(cr[0]-hr,Je),or],[Math.min(cr[0]+hr,ur),br]]:[[Je,Math.max(cr[1]-hr,or)],[ur,Math.min(cr[1]+hr,br)]])}return Qe()}function zs(I){return z((u+I)/2)}function s0(I,J){var ce=x(I),oe=I===J?S(I):b(ce/x(J))/b(zs(J)/zs(I)),we=ce*A(zs(I),oe)/oe;if(!oe)return Za;function He(Je,or){we>0?or<-u+o&&(or=-u+o):or>u-o&&(or=u-o);var ur=we/A(zs(or),oe);return[ur*S(oe*Je),we-ur*x(oe*Je)]}return He.invert=function(Je,or){var ur=we-or,br=M(oe)*D(Je*Je+ur*ur),Qe=y(Je,m(ur))*M(ur);return ur*oe<0&&(Qe-=s*M(Je)*M(ur)),[Qe/oe,2*g(A(we/br,1/oe))-u]},He}function Mu(){return Yl(s0).scale(109.5).parallels([30,30])}function Ns(I,J){return[I,J]}Ns.invert=Ns;function Au(){return Mi(Ns).scale(152.63)}function Fs(I,J){var ce=x(I),oe=I===J?S(I):(ce-x(J))/(J-I),we=ce/oe+I;if(m(oe)o&&--oe>0);return[I/(.8707+(He=ce*ce)*(-.131979+He*(-.013791+He*He*He*(.003971-.001529*He)))),ce]};function Su(){return Mi(Uf).scale(175.295)}function Wn(I,J){return[x(J)*S(I),S(J)]}Wn.invert=Ai(H);function li(){return Mi(Wn).scale(249.5).clipAngle(90+o)}function Wl(I,J){var ce=x(J),oe=1+x(I)*ce;return[ce*S(I)/oe,S(J)/oe]}Wl.invert=Ai(function(I){return 2*g(I)});function Cu(){return Mi(Wl).scale(250).clipAngle(142)}function Os(I,J){return[b(z((u+J)/2)),-I]}Os.invert=function(I,J){return[-J,2*g(_(I))-u]};function Yf(){var I=l0(Os),J=I.center,ce=I.rotate;return I.center=function(oe){return arguments.length?J([-oe[1],oe[0]]):(oe=J(),[oe[1],-oe[0]])},I.rotate=function(oe){return arguments.length?ce([oe[0],oe[1],oe.length>2?oe[2]+90:90]):(oe=ce(),[oe[0],oe[1],oe[2]-90])},ce([0,0,90]).scale(159.155)}e.geoAlbers=a0,e.geoAlbersUsa=Vv,e.geoArea=W,e.geoAzimuthalEqualArea=Wv,e.geoAzimuthalEqualAreaRaw=Ia,e.geoAzimuthalEquidistant=i0,e.geoAzimuthalEquidistantRaw=Gl,e.geoBounds=_e,e.geoCentroid=Na,e.geoCircle=ys,e.geoClipAntimeridian=Dn,e.geoClipCircle=wf,e.geoClipExtent=vu,e.geoClipRectangle=Vo,e.geoConicConformal=Mu,e.geoConicConformalRaw=s0,e.geoConicEqualArea=el,e.geoConicEqualAreaRaw=n0,e.geoConicEquidistant=Zv,e.geoConicEquidistantRaw=Fs,e.geoContains=Ms,e.geoDistance=Zo,e.geoEqualEarth=u0,e.geoEqualEarthRaw=Bs,e.geoEquirectangular=Au,e.geoEquirectangularRaw=Ns,e.geoGnomonic=f0,e.geoGnomonicRaw=ku,e.geoGraticule=jc,e.geoGraticule10=Ts,e.geoIdentity=c0,e.geoInterpolate=Fv,e.geoLength=_s,e.geoMercator=o0,e.geoMercatorRaw=Za,e.geoNaturalEarth1=Su,e.geoNaturalEarth1Raw=Uf,e.geoOrthographic=li,e.geoOrthographicRaw=Wn,e.geoPath=Pf,e.geoProjection=Mi,e.geoProjectionMutator=Bf,e.geoRotation=ms,e.geoStereographic=Cu,e.geoStereographicRaw=Wl,e.geoStream=re,e.geoTransform=Uv,e.geoTransverseMercator=Yf,e.geoTransverseMercatorRaw=Os,Object.defineProperty(e,"__esModule",{value:!0})})});var lF=ne((ny,oF)=>{(function(e,r){typeof ny=="object"&&typeof oF!="undefined"?r(ny,n_(),t_()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],r):r(e.d3=e.d3||{},e.d3,e.d3)})(ny,function(e,r,t){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,l=Math.exp,s=Math.floor,u=Math.log,f=Math.max,v=Math.min,h=Math.pow,d=Math.round,m=Math.sign||function(k){return k>0?1:k<0?-1:0},g=Math.sin,y=Math.tan,x=1e-6,T=1e-12,_=Math.PI,b=_/2,A=_/4,S=Math.SQRT1_2,M=V(2),D=V(_),z=_*2,F=180/_,H=_/180;function Y(k){return k?k/Math.sin(k):1}function O(k){return k>1?b:k<-1?-b:Math.asin(k)}function X(k){return k>1?0:k<-1?_:Math.acos(k)}function V(k){return k>0?Math.sqrt(k):0}function ee(k){return k=l(2*k),(k-1)/(k+1)}function te(k){return(l(k)-l(-k))/2}function K(k){return(l(k)+l(-k))/2}function re(k){return u(k+V(k*k+1))}function fe(k){return u(k+V(k*k-1))}function de(k){var L=y(k/2),P=2*u(o(k/2))/(L*L);function R(U,B){var Z=o(U),ue=o(B),ve=g(B),le=ue*Z,he=-((1-le?u((1+le)/2)/(1-le):-.5)+P/(1+le));return[he*ue*g(U),he*ve]}return R.invert=function(U,B){var Z=V(U*U+B*B),ue=-k/2,ve=50,le;if(!Z)return[0,0];do{var he=ue/2,xe=o(he),Le=g(he),ze=Le/xe,tr=-u(n(xe));ue-=le=(2/ze*tr-P*ze-Z)/(-tr/(Le*Le)+1-P/(2*xe*xe))*(xe<0?.7:1)}while(n(le)>x&&--ve>0);var vr=g(ue);return[i(U*vr,Z*o(ue)),O(B*vr/Z)]},R}function qe(){var k=b,L=r.geoProjectionMutator(de),P=L(k);return P.radius=function(R){return arguments.length?L(k=R*H):k*F},P.scale(179.976).clipAngle(147)}function Be(k,L){var P=o(L),R=Y(X(P*o(k/=2)));return[2*P*g(k)*R,g(L)*R]}Be.invert=function(k,L){if(!(k*k+4*L*L>_*_+x)){var P=k,R=L,U=25;do{var B=g(P),Z=g(P/2),ue=o(P/2),ve=g(R),le=o(R),he=g(2*R),xe=ve*ve,Le=le*le,ze=Z*Z,tr=1-Le*ue*ue,vr=tr?X(le*ue)*V(Ar=1/tr):Ar=0,Ar,Zr=2*vr*le*Z-k,at=vr*ve-L,ot=Ar*(Le*ze+vr*le*ue*xe),st=Ar*(.5*B*he-vr*2*ve*Z),vt=Ar*.25*(he*Z-vr*ve*Le*B),an=Ar*(xe*ue+vr*ze*le),Mn=st*vt-an*ot;if(!Mn)break;var Ft=(at*st-Zr*an)/Mn,zn=(Zr*vt-at*ot)/Mn;P-=Ft,R-=zn}while((n(Ft)>x||n(zn)>x)&&--U>0);return[P,R]}};function Ne(){return r.geoProjection(Be).scale(152.63)}function Ie(k){var L=g(k),P=o(k),R=k>=0?1:-1,U=y(R*k),B=(1+L-P)/2;function Z(ue,ve){var le=o(ve),he=o(ue/=2);return[(1+le)*g(ue),(R*ve>-i(he,U)-.001?0:-R*10)+B+g(ve)*P-(1+le)*L*he]}return Z.invert=function(ue,ve){var le=0,he=0,xe=50;do{var Le=o(le),ze=g(le),tr=o(he),vr=g(he),Ar=1+tr,Zr=Ar*ze-ue,at=B+vr*P-Ar*L*Le-ve,ot=Ar*Le/2,st=-ze*vr,vt=L*Ar*ze/2,an=P*tr+L*Le*vr,Mn=st*vt-an*ot,Ft=(at*st-Zr*an)/Mn/2,zn=(Zr*vt-at*ot)/Mn;n(zn)>2&&(zn/=2),le-=Ft,he-=zn}while((n(Ft)>x||n(zn)>x)&&--xe>0);return R*he>-i(o(le),U)-.001?[le*2,he]:null},Z}function Se(){var k=20*H,L=k>=0?1:-1,P=y(L*k),R=r.geoProjectionMutator(Ie),U=R(k),B=U.stream;return U.parallel=function(Z){return arguments.length?(P=y((L=(k=Z*H)>=0?1:-1)*k),R(k)):k*F},U.stream=function(Z){var ue=U.rotate(),ve=B(Z),le=(U.rotate([0,0]),B(Z)),he=U.precision();return U.rotate(ue),ve.sphere=function(){le.polygonStart(),le.lineStart();for(var xe=L*-180;L*xe<180;xe+=L*90)le.point(xe,L*90);if(k)for(;L*(xe-=3*L*he)>=-180;)le.point(xe,L*-i(o(xe*H/2),P)*F);le.lineEnd(),le.polygonEnd()},ve},U.scale(218.695).center([0,28.0974])}function Xe(k,L){var P=y(L/2),R=V(1-P*P),U=1+R*o(k/=2),B=g(k)*R/U,Z=P/U,ue=B*B,ve=Z*Z;return[4/3*B*(3+ue-3*ve),4/3*Z*(3+3*ue-ve)]}Xe.invert=function(k,L){if(k*=3/8,L*=3/8,!k&&n(L)>1)return null;var P=k*k,R=L*L,U=1+P+R,B=V((U-V(U*U-4*L*L))/2),Z=O(B)/3,ue=B?fe(n(L/B))/3:re(n(k))/3,ve=o(Z),le=K(ue),he=le*le-ve*ve;return[m(k)*2*i(te(ue)*ve,.25-he),m(L)*2*i(le*g(Z),.25+he)]};function se(){return r.geoProjection(Xe).scale(66.1603)}var be=V(8),Te=u(1+M);function pe(k,L){var P=n(L);return PT&&--R>0);return[k/(o(P)*(be-1/g(P))),m(L)*P]};function W(){return r.geoProjection(pe).scale(112.314)}function Q(k){var L=2*_/k;function P(R,U){var B=r.geoAzimuthalEquidistantRaw(R,U);if(n(R)>b){var Z=i(B[1],B[0]),ue=V(B[0]*B[0]+B[1]*B[1]),ve=L*d((Z-b)/L)+b,le=i(g(Z-=ve),2-o(Z));Z=ve+O(_/ue*g(le))-le,B[0]=ue*o(Z),B[1]=ue*g(Z)}return B}return P.invert=function(R,U){var B=V(R*R+U*U);if(B>b){var Z=i(U,R),ue=L*d((Z-b)/L)+b,ve=Z>ue?-1:1,le=B*o(ue-Z),he=1/y(ve*X((le-_)/V(_*(_-2*le)+B*B)));Z=ue+2*a((he+ve*V(he*he-3))/3),R=B*o(Z),U=B*g(Z)}return r.geoAzimuthalEquidistantRaw.invert(R,U)},P}function $(){var k=5,L=r.geoProjectionMutator(Q),P=L(k),R=P.stream,U=.01,B=-o(U*H),Z=g(U*H);return P.lobes=function(ue){return arguments.length?L(k=+ue):k},P.stream=function(ue){var ve=P.rotate(),le=R(ue),he=(P.rotate([0,0]),R(ue));return P.rotate(ve),le.sphere=function(){he.polygonStart(),he.lineStart();for(var xe=0,Le=360/k,ze=2*_/k,tr=90-180/k,vr=b;xe0&&n(U)>x);return R<0?NaN:P}function nr(k,L,P){return L===void 0&&(L=40),P===void 0&&(P=T),function(R,U,B,Z){var ue,ve,le;B=B===void 0?0:+B,Z=Z===void 0?0:+Z;for(var he=0;heue){B-=ve/=2,Z-=le/=2;continue}ue=tr;var vr=(B>0?-1:1)*P,Ar=(Z>0?-1:1)*P,Zr=k(B+vr,Z),at=k(B,Z+Ar),ot=(Zr[0]-xe[0])/vr,st=(Zr[1]-xe[1])/vr,vt=(at[0]-xe[0])/Ar,an=(at[1]-xe[1])/Ar,Mn=an*ot-st*vt,Ft=(n(Mn)<.5?.5:1)/Mn;if(ve=(ze*vt-Le*an)*Ft,le=(Le*st-ze*ot)*Ft,B+=ve,Z+=le,n(ve)0&&(ue[1]*=1+ve/1.5*ue[0]*ue[0]),ue}return R.invert=nr(R),R}function ar(){return r.geoProjection(Ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function lr(k,L){var P=k*g(L),R=30,U;do L-=U=(L+g(L)-P)/(1+o(L));while(n(U)>x&&--R>0);return L/2}function ir(k,L,P){function R(U,B){return[k*U*o(B=lr(P,B)),L*g(B)]}return R.invert=function(U,B){return B=O(B/L),[U/(k*o(B)),O((2*B+g(2*B))/P)]},R}var rr=ir(M/b,M,_);function Cr(){return r.geoProjection(rr).scale(169.529)}var yr=2.00276,Ae=1.11072;function Ve(k,L){var P=lr(_,L);return[yr*k/(1/o(L)+Ae/o(P)),(L+M*g(P))/yr]}Ve.invert=function(k,L){var P=yr*L,R=L<0?-A:A,U=25,B,Z;do Z=P-M*g(R),R-=B=(g(2*R)+2*R-_*g(Z))/(2*o(2*R)+2+_*o(Z)*M*o(R));while(n(B)>x&&--U>0);return Z=P-M*g(R),[k*(1/o(Z)+Ae/o(R))/yr,Z]};function je(){return r.geoProjection(Ve).scale(160.857)}function zr(k){var L=0,P=r.geoProjectionMutator(k),R=P(L);return R.parallel=function(U){return arguments.length?P(L=U*H):L*F},R}function kr(k,L){return[k*o(L),L]}kr.invert=function(k,L){return[k/o(L),L]};function er(){return r.geoProjection(kr).scale(152.63)}function Ke(k){if(!k)return kr;var L=1/y(k);function P(R,U){var B=L+k-U,Z=B&&R*o(U)/B;return[B*g(Z),L-B*o(Z)]}return P.invert=function(R,U){var B=V(R*R+(U=L-U)*U),Z=L+k-B;return[B/o(Z)*i(R,U),Z]},P}function mr(){return zr(Ke).scale(123.082).center([0,26.1441]).parallel(45)}function Mr(k){function L(P,R){var U=b-R,B=U&&P*k*g(U)/U;return[U*g(B)/k,b-U*o(B)]}return L.invert=function(P,R){var U=P*k,B=b-R,Z=V(U*U+B*B),ue=i(U,B);return[(Z?Z/g(Z):1)*ue/k,b-Z]},L}function gr(){var k=.5,L=r.geoProjectionMutator(Mr),P=L(k);return P.fraction=function(R){return arguments.length?L(k=+R):k},P.scale(158.837)}var dr=ir(1,4/_,_);function Tr(){return r.geoProjection(dr).scale(152.63)}function Pr(k,L,P,R,U,B){var Z=o(B),ue;if(n(k)>1||n(B)>1)ue=X(P*U+L*R*Z);else{var ve=g(k/2),le=g(B/2);ue=2*O(V(ve*ve+L*R*le*le))}return n(ue)>x?[ue,i(R*g(B),L*U-P*R*Z)]:[0,0]}function Ur(k,L,P){return X((k*k+L*L-P*P)/(2*k*L))}function sr(k){return k-2*_*s((k+_)/(2*_))}function _e(k,L,P){for(var R=[[k[0],k[1],g(k[1]),o(k[1])],[L[0],L[1],g(L[1]),o(L[1])],[P[0],P[1],g(P[1]),o(P[1])]],U=R[2],B,Z=0;Z<3;++Z,U=B)B=R[Z],U.v=Pr(B[1]-U[1],U[3],U[2],B[3],B[2],B[0]-U[0]),U.point=[0,0];var ue=Ur(R[0].v[0],R[2].v[0],R[1].v[0]),ve=Ur(R[0].v[0],R[1].v[0],R[2].v[0]),le=_-ue;R[2].point[1]=0,R[0].point[0]=-(R[1].point[0]=R[0].v[0]/2);var he=[R[2].point[0]=R[0].point[0]+R[2].v[0]*o(ue),2*(R[0].point[1]=R[1].point[1]=R[2].v[0]*g(ue))];function xe(Le,ze){var tr=g(ze),vr=o(ze),Ar=new Array(3),Zr;for(Zr=0;Zr<3;++Zr){var at=R[Zr];if(Ar[Zr]=Pr(ze-at[1],at[3],at[2],vr,tr,Le-at[0]),!Ar[Zr][0])return at.point;Ar[Zr][1]=sr(Ar[Zr][1]-at.v[1])}var ot=he.slice();for(Zr=0;Zr<3;++Zr){var st=Zr==2?0:Zr+1,vt=Ur(R[Zr].v[0],Ar[Zr][0],Ar[st][0]);Ar[Zr][1]<0&&(vt=-vt),Zr?Zr==1?(vt=ve-vt,ot[0]-=Ar[Zr][0]*o(vt),ot[1]-=Ar[Zr][0]*g(vt)):(vt=le-vt,ot[0]+=Ar[Zr][0]*o(vt),ot[1]+=Ar[Zr][0]*g(vt)):(ot[0]+=Ar[Zr][0]*o(vt),ot[1]-=Ar[Zr][0]*g(vt))}return ot[0]/=3,ot[1]/=3,ot}return xe}function ke(k){return k[0]*=H,k[1]*=H,k}function $e(){return We([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function We(k,L,P){var R=r.geoCentroid({type:"MultiPoint",coordinates:[k,L,P]}),U=[-R[0],-R[1]],B=r.geoRotation(U),Z=_e(ke(B(k)),ke(B(L)),ke(B(P)));Z.invert=nr(Z);var ue=r.geoProjection(Z).rotate(U),ve=ue.center;return delete ue.rotate,ue.center=function(le){return arguments.length?ve(B(le)):B.invert(ve())},ue.clipAngle(90)}function qr(k,L){var P=V(1-g(L));return[2/D*k*P,D*(1-P)]}qr.invert=function(k,L){var P=(P=L/D-1)*P;return[P>0?k*V(_/P)/2:0,O(1-P)]};function Vr(){return r.geoProjection(qr).scale(95.6464).center([0,30])}function Hr(k){var L=y(k);function P(R,U){return[R,(R?R/g(R):1)*(g(U)*o(R)-L*o(U))]}return P.invert=L?function(R,U){R&&(U*=g(R)/R);var B=o(R);return[R,2*i(V(B*B+L*L-U*U)-B,L-U)]}:function(R,U){return[R,O(R?U*y(R)/R:U)]},P}function lt(){return zr(Hr).scale(249.828).clipAngle(90)}var xt=V(3);function Rt(k,L){return[xt*k*(2*o(2*L/3)-1)/D,xt*D*g(L/3)]}Rt.invert=function(k,L){var P=3*O(L/(xt*D));return[D*k/(xt*(2*o(2*P/3)-1)),P]};function St(){return r.geoProjection(Rt).scale(156.19)}function hn(k){var L=o(k);function P(R,U){return[R*L,g(U)/L]}return P.invert=function(R,U){return[R/L,O(U*L)]},P}function Fn(){return zr(hn).parallel(38.58).scale(195.044)}function $n(k){var L=o(k);function P(R,U){return[R*L,(1+L)*y(U/2)]}return P.invert=function(R,U){return[R/L,a(U/(1+L))*2]},P}function Xt(){return zr($n).scale(124.75)}function cn(k,L){var P=V(8/(3*_));return[P*k*(1-n(L)/_),P*L]}cn.invert=function(k,L){var P=V(8/(3*_)),R=L/P;return[k/(P*(1-n(R)/_)),R]};function sn(){return r.geoProjection(cn).scale(165.664)}function Kt(k,L){var P=V(4-3*g(n(L)));return[2/V(6*_)*k*P,m(L)*V(2*_/3)*(2-P)]}Kt.invert=function(k,L){var P=2-n(L)/V(2*_/3);return[k*V(6*_)/(2*P),m(L)*O((4-P*P)/3)]};function aa(){return r.geoProjection(Kt).scale(165.664)}function rt(k,L){var P=V(_*(4+_));return[2/P*k*(1+V(1-4*L*L/(_*_))),4/P*L]}rt.invert=function(k,L){var P=V(_*(4+_))/2;return[k*P/(1+V(1-L*L*(4+_)/(4*_))),L*P/2]};function Qt(){return r.geoProjection(rt).scale(180.739)}function Ct(k,L){var P=(2+b)*g(L);L/=2;for(var R=0,U=1/0;R<10&&n(U)>x;R++){var B=o(L);L-=U=(L+g(L)*(B+2)-P)/(2*B*(1+B))}return[2/V(_*(4+_))*k*(1+o(L)),2*V(_/(4+_))*g(L)]}Ct.invert=function(k,L){var P=L*V((4+_)/_)/2,R=O(P),U=o(R);return[k/(2/V(_*(4+_))*(1+U)),O((R+P*(U+2))/(2+b))]};function dn(){return r.geoProjection(Ct).scale(180.739)}function pn(k,L){return[k*(1+o(L))/V(2+_),2*L/V(2+_)]}pn.invert=function(k,L){var P=V(2+_),R=L*P/2;return[P*k/(1+o(R)),R]};function tn(){return r.geoProjection(pn).scale(173.044)}function un(k,L){for(var P=(1+b)*g(L),R=0,U=1/0;R<10&&n(U)>x;R++)L-=U=(L+g(L)-P)/(1+o(L));return P=V(2+_),[k*(1+o(L))/P,2*L/P]}un.invert=function(k,L){var P=1+b,R=V(P/2);return[k*2*R/(1+o(L*=R)),O((L+g(L))/P)]};function ha(){return r.geoProjection(un).scale(173.044)}var Sn=3+2*M;function Na(k,L){var P=g(k/=2),R=o(k),U=V(o(L)),B=o(L/=2),Z=g(L)/(B+M*R*U),ue=V(2/(1+Z*Z)),ve=V((M*B+(R+P)*U)/(M*B+(R-P)*U));return[Sn*(ue*(ve-1/ve)-2*u(ve)),Sn*(ue*Z*(ve+1/ve)-2*a(Z))]}Na.invert=function(k,L){if(!(B=Xe.invert(k/1.2,L*1.065)))return null;var P=B[0],R=B[1],U=20,B;k/=Sn,L/=Sn;do{var Z=P/2,ue=R/2,ve=g(Z),le=o(Z),he=g(ue),xe=o(ue),Le=o(R),ze=V(Le),tr=he/(xe+M*le*ze),vr=tr*tr,Ar=V(2/(1+vr)),Zr=M*xe+(le+ve)*ze,at=M*xe+(le-ve)*ze,ot=Zr/at,st=V(ot),vt=st-1/st,an=st+1/st,Mn=Ar*vt-2*u(st)-k,Ft=Ar*tr*an-2*a(tr)-L,zn=he&&S*ze*ve*vr/he,ga=(M*le*xe+ze)/(2*(xe+M*le*ze)*(xe+M*le*ze)*ze),ui=-.5*tr*Ar*Ar*Ar,il=ui*zn,Us=ui*ga,La=(La=2*xe+M*ze*(le-ve))*La*st,qa=(M*le*xe*ze+Le)/La,ji=-(M*ve*he)/(ze*La),ol=vt*il-2*qa/st+Ar*(qa+qa/ot),ll=vt*Us-2*ji/st+Ar*(ji+ji/ot),sl=tr*an*il-2*zn/(1+vr)+Ar*an*zn+Ar*tr*(qa-qa/ot),Xl=tr*an*Us-2*ga/(1+vr)+Ar*an*ga+Ar*tr*(ji-ji/ot),go=ll*sl-Xl*ol;if(!go)break;var Ys=(Ft*ll-Mn*Xl)/go,Wf=(Mn*sl-Ft*ol)/go;P-=Ys,R=f(-b,v(b,R-Wf))}while((n(Ys)>x||n(Wf)>x)&&--U>0);return n(n(R)-b)R){var xe=V(he),Le=i(le,ve),ze=P*d(Le/P),tr=Le-ze,vr=k*o(tr),Ar=(k*g(tr)-tr*g(vr))/(b-vr),Zr=Hn(tr,Ar),at=(_-k)/yi(Zr,vr,_);ve=xe;var ot=50,st;do ve-=st=(k+yi(Zr,vr,ve)*at-xe)/(Zr(ve)*at);while(n(st)>x&&--ot>0);le=tr*g(ve),veR){var ve=V(ue),le=i(Z,B),he=P*d(le/P),xe=le-he;B=ve*o(xe),Z=ve*g(xe);for(var Le=B-b,ze=g(B),tr=Z/ze,vr=Bx||n(tr)>x)&&--vr>0);return[xe,Le]},ve}var Kr=bi(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Lt(){return r.geoProjection(Kr).scale(149.995)}var Ht=bi(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Br(){return r.geoProjection(Ht).scale(153.93)}var Vn=bi(5/6*_,-.62636,-.0344,0,1.3493,-.05524,0,.045);function nn(){return r.geoProjection(Vn).scale(130.945)}function Dn(k,L){var P=k*k,R=L*L;return[k*(1-.162388*R)*(.87-952426e-9*P*P),L*(1+R/12)]}Dn.invert=function(k,L){var P=k,R=L,U=50,B;do{var Z=R*R;R-=B=(R*(1+Z/12)-L)/(1+Z/4)}while(n(B)>x&&--U>0);U=50,k/=1-.162388*Z;do{var ue=(ue=P*P)*ue;P-=B=(P*(.87-952426e-9*ue)-k)/(.87-.00476213*ue)}while(n(B)>x&&--U>0);return[P,R]};function At(){return r.geoProjection(Dn).scale(131.747)}var Wa=bi(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Yo(){return r.geoProjection(Wa).scale(131.087)}function wf(k){var L=k(b,0)[0]-k(-b,0)[0];function P(R,U){var B=R>0?-.5:.5,Z=k(R+B*_,U);return Z[0]-=B*L,Z}return k.invert&&(P.invert=function(R,U){var B=R>0?-.5:.5,Z=k.invert(R+B*L,U),ue=Z[0]-B*_;return ue<-_?ue+=2*_:ue>_&&(ue-=2*_),Z[0]=ue,Z}),P}function cu(k,L){var P=m(k),R=m(L),U=o(L),B=o(k)*U,Z=g(k)*U,ue=g(R*L);k=n(i(Z,ue)),L=O(B),n(k-b)>x&&(k%=b);var ve=oo(k>_/4?b-k:k,L);return k>_/4&&(ue=ve[0],ve[0]=-ve[1],ve[1]=-ue),ve[0]*=P,ve[1]*=-R,ve}cu.invert=function(k,L){n(k)>1&&(k=m(k)*2-k),n(L)>1&&(L=m(L)*2-L);var P=m(k),R=m(L),U=-P*k,B=-R*L,Z=B/U<1,ue=Go(Z?B:U,Z?U:B),ve=ue[0],le=ue[1],he=o(le);return Z&&(ve=-b-ve),[P*(i(g(ve)*he,-g(le))+_),R*O(o(ve)*he)]};function oo(k,L){if(L===b)return[0,0];var P=g(L),R=P*P,U=R*R,B=1+U,Z=1+3*U,ue=1-U,ve=O(1/V(B)),le=ue+R*B*ve,he=(1-P)/le,xe=V(he),Le=he*B,ze=V(Le),tr=xe*ue,vr,Ar;if(k===0)return[0,-(tr+R*ze)];var Zr=o(L),at=1/Zr,ot=2*P*Zr,st=(-3*R+ve*Z)*ot,vt=(-le*Zr-(1-P)*st)/(le*le),an=.5*vt/xe,Mn=ue*an-2*R*xe*ot,Ft=R*B*vt+he*Z*ot,zn=-at*ot,ga=-at*Ft,ui=-2*at*Mn,il=4*k/_,Us;if(k>.222*_||L<_/4&&k>.175*_){if(vr=(tr+R*V(Le*(1+U)-tr*tr))/(1+U),k>_/4)return[vr,vr];var La=vr,qa=.5*vr;vr=.5*(qa+La),Ar=50;do{var ji=V(Le-vr*vr),ol=vr*(ui+zn*ji)+ga*O(vr/ze)-il;if(!ol)break;ol<0?qa=vr:La=vr,vr=.5*(qa+La)}while(n(La-qa)>x&&--Ar>0)}else{vr=x,Ar=25;do{var ll=vr*vr,sl=V(Le-ll),Xl=ui+zn*sl,go=vr*Xl+ga*O(vr/ze)-il,Ys=Xl+(ga-zn*ll)/sl;vr-=Us=sl?go/Ys:0}while(n(Us)>x&&--Ar>0)}return[vr,-tr-R*V(Le-vr*vr)]}function Go(k,L){for(var P=0,R=1,U=.5,B=50;;){var Z=U*U,ue=V(U),ve=O(1/V(1+Z)),le=1-Z+U*(1+Z)*ve,he=(1-ue)/le,xe=V(he),Le=he*(1+Z),ze=xe*(1-Z),tr=Le-k*k,vr=V(tr),Ar=L+ze+U*vr;if(n(R-P)0?P=U:R=U,U=.5*(P+R)}if(!B)return null;var Zr=O(ue),at=o(Zr),ot=1/at,st=2*ue*at,vt=(-3*U+ve*(1+3*Z))*st,an=(-le*at-(1-ue)*vt)/(le*le),Mn=.5*an/xe,Ft=(1-Z)*Mn-2*U*xe*st,zn=-2*ot*Ft,ga=-ot*st,ui=-ot*(U*(1+Z)*an+he*(1+3*Z)*st);return[_/4*(k*(zn+ga*vr)+ui*O(k/V(Le))),Zr]}function Vo(){return r.geoProjection(wf(cu)).scale(239.75)}function vu(k,L,P){var R,U,B;return k?(R=Pl(k,P),L?(U=Pl(L,1-P),B=U[1]*U[1]+P*R[0]*R[0]*U[0]*U[0],[[R[0]*U[2]/B,R[1]*R[2]*U[0]*U[1]/B],[R[1]*U[1]/B,-R[0]*R[2]*U[0]*U[2]/B],[R[2]*U[1]*U[2]/B,-P*R[0]*R[1]*U[0]/B]]):[[R[0],0],[R[1],0],[R[2],0]]):(U=Pl(L,1-P),[[0,U[0]/U[1]],[1/U[1],0],[U[2]/U[1],0]])}function Pl(k,L){var P,R,U,B,Z;if(L=1-x)return P=(1-L)/4,R=K(k),B=ee(k),U=1/R,Z=R*te(k),[B+P*(Z-k)/(R*R),U-P*B*U*(Z-k),U+P*B*U*(Z+k),2*a(l(k))-b+P*(Z-k)/R];var ue=[1,0,0,0,0,0,0,0,0],ve=[V(L),0,0,0,0,0,0,0,0],le=0;for(R=V(1-L),Z=1;n(ve[le]/ue[le])>x&&le<8;)P=ue[le++],ve[le]=(P-R)/2,ue[le]=(P+R)/2,R=V(P*R),Z*=2;U=Z*ue[le]*k;do B=ve[le]*g(R=U)/ue[le],U=(O(B)+U)/2;while(--le);return[g(U),B=o(U),B/o(U-R),U]}function Rl(k,L,P){var R=n(k),U=n(L),B=te(U);if(R){var Z=1/g(R),ue=1/(y(R)*y(R)),ve=-(ue+P*(B*B*Z*Z)-1+P),le=(P-1)*ue,he=(-ve+V(ve*ve-4*le))/2;return[_i(a(1/V(he)),P)*m(k),_i(a(V((he/ue-1)/P)),1-P)*m(L)]}return[0,_i(a(B),1-P)*m(L)]}function _i(k,L){if(!L)return k;if(L===1)return u(y(k/2+A));for(var P=1,R=V(1-L),U=V(L),B=0;n(U)>x;B++){if(k%_){var Z=a(R*y(k)/P);Z<0&&(Z+=_),k+=Z+~~(k/_)*_}else k+=k;U=(P+R)/2,R=V(P*R),U=((P=U)-R)/2}return k/(h(2,B)*P)}function lo(k,L){var P=(M-1)/(M+1),R=V(1-P*P),U=_i(b,R*R),B=-1,Z=u(y(_/4+n(L)/2)),ue=l(B*Z)/V(P),ve=Wo(ue*o(B*k),ue*g(B*k)),le=Rl(ve[0],ve[1],R*R);return[-le[1],(L>=0?1:-1)*(.5*U-le[0])]}function Wo(k,L){var P=k*k,R=L+1,U=1-P-L*L;return[.5*((k>=0?b:-b)-i(U,2*k)),-.25*u(U*U+4*P)+.5*u(R*R+P)]}function zl(k,L){var P=L[0]*L[0]+L[1]*L[1];return[(k[0]*L[0]+k[1]*L[1])/P,(k[1]*L[0]-k[0]*L[1])/P]}lo.invert=function(k,L){var P=(M-1)/(M+1),R=V(1-P*P),U=_i(b,R*R),B=-1,Z=vu(.5*U-L,-k,R*R),ue=zl(Z[0],Z[1]),ve=i(ue[1],ue[0])/B;return[ve,2*a(l(.5/B*u(P*ue[0]*ue[0]+P*ue[1]*ue[1])))-b]};function bs(){return r.geoProjection(wf(lo)).scale(151.496)}function Mf(k){var L=g(k),P=o(k),R=Zc(k);R.invert=Zc(-k);function U(B,Z){var ue=R(B,Z);B=ue[0],Z=ue[1];var ve=g(Z),le=o(Z),he=o(B),xe=X(L*ve+P*le*he),Le=g(xe),ze=n(Le)>x?xe/Le:1;return[ze*P*g(B),(n(B)>b?ze:-ze)*(L*le-P*ve*he)]}return U.invert=function(B,Z){var ue=V(B*B+Z*Z),ve=-g(ue),le=o(ue),he=ue*le,xe=-Z*ve,Le=ue*L,ze=V(he*he+xe*xe-Le*Le),tr=i(he*Le+xe*ze,xe*Le-he*ze),vr=(ue>b?-1:1)*i(B*ve,ue*o(tr)*le+Z*g(tr)*ve);return R.invert(vr,tr)},U}function Zc(k){var L=g(k),P=o(k);return function(R,U){var B=o(U),Z=o(R)*B,ue=g(R)*B,ve=g(U);return[i(ue,Z*P-ve*L),O(ve*P+Z*L)]}}function _s(){var k=0,L=r.geoProjectionMutator(Mf),P=L(k),R=P.rotate,U=P.stream,B=r.geoCircle();return P.parallel=function(Z){if(!arguments.length)return k*F;var ue=P.rotate();return L(k=Z*H).rotate(ue)},P.rotate=function(Z){return arguments.length?(R.call(P,[Z[0],Z[1]-k*F]),B.center([-Z[0],-Z[1]]),P):(Z=R.call(P),Z[1]+=k*F,Z)},P.stream=function(Z){return Z=U(Z),Z.sphere=function(){Z.polygonStart();var ue=.01,ve=B.radius(90-ue)().coordinates[0],le=ve.length-1,he=-1,xe;for(Z.lineStart();++he=0;)Z.point((xe=ve[he])[0],xe[1]);Z.lineEnd(),Z.polygonEnd()},Z},P.scale(79.4187).parallel(45).clipAngle(180-.001)}var xs=3,ws=O(1-1/xs)*F,Zo=hn(0);function so(k){var L=ws*H,P=qr(_,L)[0]-qr(-_,L)[0],R=Zo(0,L)[1],U=qr(0,L)[1],B=D-U,Z=z/k,ue=4/z,ve=R+B*B*4/z;function le(he,xe){var Le,ze=n(xe);if(ze>L){var tr=v(k-1,f(0,s((he+_)/Z)));he+=_*(k-1)/k-tr*Z,Le=qr(he,ze),Le[0]=Le[0]*z/P-z*(k-1)/(2*k)+tr*z/k,Le[1]=R+(Le[1]-U)*4*B/z,xe<0&&(Le[1]=-Le[1])}else Le=Zo(he,xe);return Le[0]*=ue,Le[1]/=ve,Le}return le.invert=function(he,xe){he/=ue,xe*=ve;var Le=n(xe);if(Le>R){var ze=v(k-1,f(0,s((he+_)/Z)));he=(he+_*(k-1)/k-ze*Z)*P/z;var tr=qr.invert(he,.25*(Le-R)*z/B+U);return tr[0]-=_*(k-1)/k-ze*Z,xe<0&&(tr[1]=-tr[1]),tr}return Zo.invert(he,xe)},le}function uo(k,L){return[k,L&1?90-x:ws]}function Oi(k,L){return[k,L&1?-90+x:-ws]}function Af(k){return[k[0]*(1-x),k[1]]}function hu(k){var L=[].concat(t.range(-180,180+k/2,k).map(uo),t.range(180,-180-k/2,-k).map(Oi));return{type:"Polygon",coordinates:[k===180?L.map(Af):L]}}function Nl(){var k=4,L=r.geoProjectionMutator(so),P=L(k),R=P.stream;return P.lobes=function(U){return arguments.length?L(k=+U):k},P.stream=function(U){var B=P.rotate(),Z=R(U),ue=(P.rotate([0,0]),R(U));return P.rotate(B),Z.sphere=function(){r.geoStream(hu(180/k),ue)},Z},P.scale(239.75)}function Tf(k){var L=1+k,P=g(1/L),R=O(P),U=2*V(_/(B=_+4*R*L)),B,Z=.5*U*(L+V(k*(2+k))),ue=k*k,ve=L*L;function le(he,xe){var Le=1-g(xe),ze,tr;if(Le&&Le<2){var vr=b-xe,Ar=25,Zr;do{var at=g(vr),ot=o(vr),st=R+i(at,L-ot),vt=1+ve-2*L*ot;vr-=Zr=(vr-ue*R-L*at+vt*st-.5*Le*B)/(2*L*at*st)}while(n(Zr)>T&&--Ar>0);ze=U*V(vt),tr=he*st/_}else ze=U*(k+Le),tr=he*R/_;return[ze*g(tr),Z-ze*o(tr)]}return le.invert=function(he,xe){var Le=he*he+(xe-=Z)*xe,ze=(1+ve-Le/(U*U))/(2*L),tr=X(ze),vr=g(tr),Ar=R+i(vr,L-ze);return[O(he/V(Le))*_/Ar,O(1-2*(tr-ue*R-L*vr+(1+ve-2*L*ze)*Ar)/B)]},le}function Xc(){var k=1,L=r.geoProjectionMutator(Tf),P=L(k);return P.ratio=function(R){return arguments.length?L(k=+R):k},P.scale(167.774).center([0,18.67])}var Ms=.7109889596207567,Ui=.0528035274542;function As(k,L){return L>-Ms?(k=rr(k,L),k[1]+=Ui,k):kr(k,L)}As.invert=function(k,L){return L>-Ms?rr.invert(k,L-Ui):kr.invert(k,L)};function jc(){return r.geoProjection(As).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ts(k,L){return n(L)>Ms?(k=rr(k,L),k[1]-=L>0?Ui:-Ui,k):kr(k,L)}Ts.invert=function(k,L){return n(L)>Ms?rr.invert(k,L+(L>0?Ui:-Ui)):kr.invert(k,L)};function Fv(){return r.geoProjection(Ts).scale(152.63)}function Xo(k,L,P,R){var U=V(4*_/(2*P+(1+k-L/2)*g(2*P)+(k+L)/2*g(4*P)+L/2*g(6*P))),B=V(R*g(P)*V((1+k*o(2*P)+L*o(4*P))/(1+k+L))),Z=P*ve(1);function ue(xe){return V(1+k*o(2*xe)+L*o(4*xe))}function ve(xe){var Le=xe*P;return(2*Le+(1+k-L/2)*g(2*Le)+(k+L)/2*g(4*Le)+L/2*g(6*Le))/P}function le(xe){return ue(xe)*g(xe)}var he=function(xe,Le){var ze=P*fr(ve,Z*g(Le)/P,Le/_);isNaN(ze)&&(ze=P*m(Le));var tr=U*ue(ze);return[tr*B*xe/_*o(ze),tr/B*g(ze)]};return he.invert=function(xe,Le){var ze=fr(le,Le*B/U);return[xe*_/(o(ze)*U*B*ue(ze)),O(P*ve(ze/P)/Z)]},P===0&&(U=V(R/_),he=function(xe,Le){return[xe*U,g(Le)/U]},he.invert=function(xe,Le){return[xe/U,O(Le*U)]}),he}function kf(){var k=1,L=0,P=45*H,R=2,U=r.geoProjectionMutator(Xo),B=U(k,L,P,R);return B.a=function(Z){return arguments.length?U(k=+Z,L,P,R):k},B.b=function(Z){return arguments.length?U(k,L=+Z,P,R):L},B.psiMax=function(Z){return arguments.length?U(k,L,P=+Z*H,R):P*F},B.ratio=function(Z){return arguments.length?U(k,L,P,R=+Z):R},B.scale(180.739)}function Fl(k,L,P,R,U,B,Z,ue,ve,le,he){if(he.nanEncountered)return NaN;var xe,Le,ze,tr,vr,Ar,Zr,at,ot,st;if(xe=P-L,Le=k(L+xe*.25),ze=k(P-xe*.25),isNaN(Le)){he.nanEncountered=!0;return}if(isNaN(ze)){he.nanEncountered=!0;return}return tr=xe*(R+4*Le+U)/12,vr=xe*(U+4*ze+B)/12,Ar=tr+vr,st=(Ar-Z)/15,le>ve?(he.maxDepthCount++,Ar+st):Math.abs(st)>1;do ve[Ar]>ze?vr=Ar:tr=Ar,Ar=tr+vr>>1;while(Ar>tr);var Zr=ve[Ar+1]-ve[Ar];return Zr&&(Zr=(ze-ve[Ar+1])/Zr),(Ar+1+Zr)/Z}var xe=2*he(1)/_*B/P,Le=function(ze,tr){var vr=he(n(g(tr))),Ar=R(vr)*ze;return vr/=xe,[Ar,tr>=0?vr:-vr]};return Le.invert=function(ze,tr){var vr;return tr*=xe,n(tr)<1&&(vr=m(tr)*O(U(n(tr))*B)),[ze/R(n(tr)),vr]},Le}function co(){var k=0,L=2.5,P=1.183136,R=r.geoProjectionMutator(fo),U=R(k,L,P);return U.alpha=function(B){return arguments.length?R(k=+B,L,P):k},U.k=function(B){return arguments.length?R(k,L=+B,P):L},U.gamma=function(B){return arguments.length?R(k,L,P=+B):P},U.scale(152.63)}function Sf(k,L){return n(k[0]-L[0])=0;--ve)P=k[1][ve],R=P[0][0],U=P[0][1],B=P[1][1],Z=P[2][0],ue=P[2][1],L.push(xi([[Z-x,ue-x],[Z-x,B+x],[R+x,B+x],[R+x,U-x]],30));return{type:"Polygon",coordinates:[t.merge(L)]}}function Yi(k,L,P){var R,U;function B(ve,le){for(var he=le<0?-1:1,xe=L[+(le<0)],Le=0,ze=xe.length-1;Lexe[Le][2][0];++Le);var tr=k(ve-xe[Le][1][0],le);return tr[0]+=k(xe[Le][1][0],he*le>he*xe[Le][0][1]?xe[Le][0][1]:le)[0],tr}P?B.invert=P(B):k.invert&&(B.invert=function(ve,le){for(var he=U[+(le<0)],xe=L[+(le<0)],Le=0,ze=he.length;Letr&&(vr=ze,ze=tr,tr=vr),[[xe,ze],[Le,tr]]})}),Z):L.map(function(le){return le.map(function(he){return[[he[0][0]*F,he[0][1]*F],[he[1][0]*F,he[1][1]*F],[he[2][0]*F,he[2][1]*F]]})})},L!=null&&Z.lobes(L),Z}var Il=[[[[-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 Hv(){return Yi(Ve,Il).scale(160.857)}var Gi=[[[[-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 jo(){return Yi(Ts,Gi).scale(152.63)}var Jo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $o(){return Yi(rr,Jo).scale(169.529)}var vo=[[[[-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 ks(){return Yi(rr,vo).scale(169.529).rotate([20,0])}var du=[[[[-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 Ss(){return Yi(As,du,nr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Cs=[[[[-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 Ko(){return Yi(kr,Cs).scale(152.63).rotate([-20,0])}function Hl(k,L){return[3/z*k*V(_*_/3-L*L),L]}Hl.invert=function(k,L){return[z/3*k/V(_*_/3-L*L),L]};function Bl(){return r.geoProjection(Hl).scale(158.837)}function pu(k){function L(P,R){if(n(n(R)-b)2)return null;P/=2,R/=2;var B=P*P,Z=R*R,ue=2*R/(1+B+Z);return ue=h((1+ue)/(1-ue),1/k),[i(2*P,1-B-Z)/k,O((ue-1)/(ue+1))]},L}function gu(){var k=.5,L=r.geoProjectionMutator(pu),P=L(k);return P.spacing=function(R){return arguments.length?L(k=+R):k},P.scale(124.75)}var oi=_/M;function mu(k,L){return[k*(1+V(o(L)))/2,L/(o(L/2)*o(k/6))]}mu.invert=function(k,L){var P=n(k),R=n(L),U=x,B=b;Rx||n(Ar)>x)&&--U>0);return U&&[P,R]};function Kn(){return r.geoProjection(Fa).scale(139.98)}function Aa(k,L){return[g(k)/o(L),y(L)*o(k)]}Aa.invert=function(k,L){var P=k*k,R=L*L,U=R+1,B=P+U,Z=k?S*V((B-V(B*B-4*P))/P):1/V(U);return[O(k*Z),m(L)*X(Z)]};function Vi(){return r.geoProjection(Aa).scale(144.049).clipAngle(90-.001)}function Ls(k){var L=o(k),P=y(A+k/2);function R(U,B){var Z=B-k,ue=n(Z)=0;)he=k[le],xe=he[0]+ue*(ze=xe)-ve*Le,Le=he[1]+ue*Le+ve*ze;return xe=ue*(ze=xe)-ve*Le,Le=ue*Le+ve*ze,[xe,Le]}return P.invert=function(R,U){var B=20,Z=R,ue=U;do{for(var ve=L,le=k[ve],he=le[0],xe=le[1],Le=0,ze=0,tr;--ve>=0;)le=k[ve],Le=he+Z*(tr=Le)-ue*ze,ze=xe+Z*ze+ue*tr,he=le[0]+Z*(tr=he)-ue*xe,xe=le[1]+Z*xe+ue*tr;Le=he+Z*(tr=Le)-ue*ze,ze=xe+Z*ze+ue*tr,he=Z*(tr=he)-ue*xe-R,xe=Z*xe+ue*tr-U;var vr=Le*Le+ze*ze,Ar,Zr;Z-=Ar=(he*Le+xe*ze)/vr,ue-=Zr=(xe*Le-he*ze)/vr}while(n(Ar)+n(Zr)>x*x&&--B>0);if(B){var at=V(Z*Z+ue*ue),ot=2*a(at*.5),st=g(ot);return[i(Z*st,at*o(ot)),at?O(ue*st/at):0]}},P}var Bv=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Ov=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Lf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],qf=[[.9245,0],[0,0],[.01943,0]],Df=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Ef(){return wi(Bv,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Kc(){return wi(Ov,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Qc(){return wi(Lf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function qs(){return wi(qf,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ds(){return wi(Df,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function wi(k,L){var P=r.geoProjection($c(k)).rotate(L).clipAngle(90),R=r.geoRotation(L),U=P.center;return delete P.rotate,P.center=function(B){return arguments.length?U(R(B)):R.invert(U())},P}var bu=V(6),Es=V(7);function _u(k,L){var P=O(7*g(L)/(3*bu));return[bu*k*(2*o(2*P/3)-1)/Es,9*g(P/3)/Es]}_u.invert=function(k,L){var P=3*O(L*Es/9);return[k*Es/(bu*(2*o(2*P/3)-1)),O(g(P)*3*bu/7)]};function e0(){return r.geoProjection(_u).scale(164.859)}function Pf(k,L){for(var P=(1+S)*g(L),R=L,U=0,B;U<25&&(R-=B=(g(R/2)+g(R)-P)/(.5*o(R/2)+o(R)),!(n(B)T&&--R>0);return B=P*P,Z=B*B,ue=B*Z,[k/(.84719-.13063*B+ue*ue*(-.04515+.05494*B-.02326*Z+.00331*ue)),P]};function Ps(){return r.geoProjection(Ul).scale(175.295)}function Rs(k,L){return[k*(1+o(L))/2,2*(L-y(L/2))]}Rs.invert=function(k,L){for(var P=L/2,R=0,U=1/0;R<10&&n(U)>x;++R){var B=o(L/2);L-=U=(L-y(L/2)-P)/(1-.5/(B*B))}return[2*k/(1+o(L)),L]};function Rf(){return r.geoProjection(Rs).scale(152.63)}var po=[[[[-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 r0(){return Yi(Me(1/0),po).rotate([20,0]).scale(152.63)}function zf(k,L){var P=g(L),R=o(L),U=m(k);if(k===0||n(L)===b)return[0,L];if(L===0)return[k,0];if(n(k)===b)return[k*R,b*P];var B=_/(2*k)-2*k/_,Z=2*L/_,ue=(1-Z*Z)/(P-Z),ve=B*B,le=ue*ue,he=1+ve/le,xe=1+le/ve,Le=(B*P/ue-B/2)/he,ze=(le*P/ve+ue/2)/xe,tr=Le*Le+R*R/he,vr=ze*ze-(le*P*P/ve+ue*P-1)/xe;return[b*(Le+V(tr)*U),b*(ze+V(vr<0?0:vr)*m(-L*B)*U)]}zf.invert=function(k,L){k/=b,L/=b;var P=k*k,R=L*L,U=P+R,B=_*_;return[k?(U-1+V((1-U)*(1-U)+4*P))/(2*k)*b:0,fr(function(Z){return U*(_*g(Z)-2*Z)*_+4*Z*Z*(L-g(Z))+2*_*Z-B*L},0)]};function t0(){return r.geoProjection(zf).scale(127.267)}var Nf=1.0148,wu=.23185,Ff=-.14499,If=.02406,Yv=Nf,Hf=5*wu,Mi=7*Ff,Bf=9*If,Yl=1.790857183;function Of(k,L){var P=L*L;return[k,L*(Nf+P*P*(wu+P*(Ff+If*P)))]}Of.invert=function(k,L){L>Yl?L=Yl:L<-Yl&&(L=-Yl);var P=L,R;do{var U=P*P;P-=R=(P*(Nf+U*U*(wu+U*(Ff+If*U)))-L)/(Yv+U*U*(Hf+U*(Mi+Bf*U)))}while(n(R)>x);return[k,P]};function n0(){return r.geoProjection(Of).scale(139.319)}function el(k,L){if(n(L)x&&--U>0);return Z=y(R),[(n(L)=0;)if(R=L[ue],P[0]===R[0]&&P[1]===R[1]){if(B)return[B,P];B=P}}}function l0(k){for(var L=k.length,P=[],R=k[L-1],U=0;U0?[-R[0],0]:[180-R[0],180])};var L=Mu.map(function(P){return{face:P,project:k(P)}});return[-1,0,0,1,0,1,4,5].forEach(function(P,R){var U=L[P];U&&(U.children||(U.children=[])).push(L[R])}),Gl(L[0],function(P,R){return L[P<-_/2?R<0?6:4:P<0?R<0?2:0:P<_/2?R<0?3:1:R<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Is(k){k=k||function(Z){var ue=Z.length===6?r.geoCentroid({type:"MultiPoint",coordinates:Z}):Z[0];return r.geoGnomonic().scale(1).translate([0,0]).rotate([-ue[0],-ue[1]])};var L=Mu.map(function(Z){for(var ue=Z.map(Vl),ve=ue.length,le=ue[ve-1],he,xe=[],Le=0;LeR^ze>R&&P<(Le-le)*(R-he)/(ze-he)+le&&(U=!U)}return U}function ku(k,L){var P=L.stream,R;if(!P)throw new Error("invalid projection");switch(k&&k.type){case"Feature":R=c0;break;case"FeatureCollection":R=f0;break;default:R=Su;break}return R(k,P)}function f0(k,L){return{type:"FeatureCollection",features:k.features.map(function(P){return c0(P,L)})}}function c0(k,L){return{type:"Feature",id:k.id,properties:k.properties,geometry:Su(k.geometry,L)}}function Uf(k,L){return{type:"GeometryCollection",geometries:k.geometries.map(function(P){return Su(P,L)})}}function Su(k,L){if(!k)return null;if(k.type==="GeometryCollection")return Uf(k,L);var P;switch(k.type){case"Point":P=Wl;break;case"MultiPoint":P=Wl;break;case"LineString":P=Cu;break;case"MultiLineString":P=Cu;break;case"Polygon":P=Os;break;case"MultiPolygon":P=Os;break;case"Sphere":P=Os;break;default:return null}return r.geoStream(k,L(P)),P.result()}var Wn=[],li=[],Wl={point:function(k,L){Wn.push([k,L])},result:function(){var k=Wn.length?Wn.length<2?{type:"Point",coordinates:Wn[0]}:{type:"MultiPoint",coordinates:Wn}:null;return Wn=[],k}},Cu={lineStart:Tu,point:function(k,L){Wn.push([k,L])},lineEnd:function(){Wn.length&&(li.push(Wn),Wn=[])},result:function(){var k=li.length?li.length<2?{type:"LineString",coordinates:li[0]}:{type:"MultiLineString",coordinates:li}:null;return li=[],k}},Os={polygonStart:Tu,lineStart:Tu,point:function(k,L){Wn.push([k,L])},lineEnd:function(){var k=Wn.length;if(k){do Wn.push(Wn[0].slice());while(++k<4);li.push(Wn),Wn=[]}},polygonEnd:Tu,result:function(){if(!li.length)return null;var k=[],L=[];return li.forEach(function(P){Bs(P)?k.push([P]):L.push(P)}),L.forEach(function(P){var R=P[0];k.some(function(U){if(u0(U[0],R))return U.push(P),!0})||k.push([P])}),li=[],k.length?k.length>1?{type:"MultiPolygon",coordinates:k}:{type:"Polygon",coordinates:k[0]}:null}};function Yf(k){var L=k(b,0)[0]-k(-b,0)[0];function P(R,U){var B=n(R)0?R-_:R+_,U),ue=(Z[0]-Z[1])*S,ve=(Z[0]+Z[1])*S;if(B)return[ue,ve];var le=L*S,he=ue>0^ve>0?-1:1;return[he*ue-m(ve)*le,he*ve-m(ue)*le]}return k.invert&&(P.invert=function(R,U){var B=(R+U)*S,Z=(U-R)*S,ue=n(B)<.5*L&&n(Z)<.5*L;if(!ue){var ve=L*S,le=B>0^Z>0?-1:1,he=-le*R+(Z>0?1:-1)*ve,xe=-le*U+(B>0?1:-1)*ve;B=(-he-xe)*S,Z=(he-xe)*S}var Le=k.invert(B,Z);return ue||(Le[0]+=B>0?_:-_),Le}),r.geoProjection(P).rotate([-90,-90,45]).clipAngle(180-.001)}function I(){return Yf(cu).scale(176.423)}function J(){return Yf(lo).scale(111.48)}function ce(k,L){if(!(0<=(L=+L)&&L<=20))throw new Error("invalid digits");function P(le){var he=le.length,xe=2,Le=new Array(he);for(Le[0]=+le[0].toFixed(L),Le[1]=+le[1].toFixed(L);xe2||ze[0]!=he[0]||ze[1]!=he[1])&&(xe.push(ze),he=ze)}return xe.length===1&&le.length>1&&xe.push(P(le[le.length-1])),xe}function B(le){return le.map(U)}function Z(le){if(le==null)return le;var he;switch(le.type){case"GeometryCollection":he={type:"GeometryCollection",geometries:le.geometries.map(Z)};break;case"Point":he={type:"Point",coordinates:P(le.coordinates)};break;case"MultiPoint":he={type:le.type,coordinates:R(le.coordinates)};break;case"LineString":he={type:le.type,coordinates:U(le.coordinates)};break;case"MultiLineString":case"Polygon":he={type:le.type,coordinates:B(le.coordinates)};break;case"MultiPolygon":he={type:"MultiPolygon",coordinates:le.coordinates.map(B)};break;default:return le}return le.bbox!=null&&(he.bbox=le.bbox),he}function ue(le){var he={type:"Feature",properties:le.properties,geometry:Z(le.geometry)};return le.id!=null&&(he.id=le.id),le.bbox!=null&&(he.bbox=le.bbox),he}if(k!=null)switch(k.type){case"Feature":return ue(k);case"FeatureCollection":{var ve={type:"FeatureCollection",features:k.features.map(ue)};return k.bbox!=null&&(ve.bbox=k.bbox),ve}default:return Z(k)}return k}function oe(k){var L=g(k);function P(R,U){var B=L?y(R*L/2)/L:R/2;if(!U)return[2*B,-k];var Z=2*a(B*g(U)),ue=1/y(U);return[g(Z)*ue,U+(1-o(Z))*ue-k]}return P.invert=function(R,U){if(n(U+=k)x&&--ue>0);var Le=R*(le=y(Z)),ze=y(n(U)0?b:-b)*(ve+U*(he-Z)/2+U*U*(he-2*ve+Z)/2)]}Je.invert=function(k,L){var P=L/b,R=P*90,U=v(18,n(R/5)),B=f(0,s(U));do{var Z=He[B][1],ue=He[B+1][1],ve=He[v(19,B+2)][1],le=ve-Z,he=ve-2*ue+Z,xe=2*(n(P)-ue)/le,Le=he/le,ze=xe*(1-Le*xe*(1-2*Le*xe));if(ze>=0||B===1){R=(L>=0?5:-5)*(ze+U);var tr=50,vr;do U=v(18,n(R)/5),B=s(U),ze=U-B,Z=He[B][1],ue=He[B+1][1],ve=He[v(19,B+2)][1],R-=(vr=(L>=0?b:-b)*(ue+ze*(ve-Z)/2+ze*ze*(ve-2*ue+Z)/2)-L)*F;while(n(vr)>T&&--tr>0);break}}while(--B>=0);var Ar=He[B][0],Zr=He[B+1][0],at=He[v(19,B+2)][0];return[k/(Zr+ze*(at-Ar)/2+ze*ze*(at-2*Zr+Ar)/2),R*H]};function or(){return r.geoProjection(Je).scale(152.63)}function ur(k){function L(P,R){var U=o(R),B=(k-1)/(k-U*o(P));return[B*U*g(P),B*g(R)]}return L.invert=function(P,R){var U=P*P+R*R,B=V(U),Z=(k-V(1-U*(k+1)/(k-1)))/((k-1)/B+B/(k-1));return[i(P*Z,B*V(1-Z*Z)),B?O(R*Z/B):0]},L}function br(k,L){var P=ur(k);if(!L)return P;var R=o(L),U=g(L);function B(Z,ue){var ve=P(Z,ue),le=ve[1],he=le*U/(k-1)+R;return[ve[0]*R/he,le/he]}return B.invert=function(Z,ue){var ve=(k-1)/(k-1-ue*U);return P.invert(ve*Z,ve*ue*R)},B}function Qe(){var k=2,L=0,P=r.geoProjectionMutator(br),R=P(k,L);return R.distance=function(U){return arguments.length?P(k=+U,L):k},R.tilt=function(U){return arguments.length?P(k,L=U*H):L*F},R.scale(432.147).clipAngle(X(1/k)*F-1e-6)}var hr=1e-4,cr=1e4,wr=-180,Lr=wr+hr,et=180,jr=et-hr,tt=-90,nt=tt+hr,Dr=90,Ir=Dr-hr;function it(k){return k.length>0}function pt(k){return Math.floor(k*cr)/cr}function Yt(k){return k===tt||k===Dr?[0,k]:[wr,pt(k)]}function en(k){var L=k[0],P=k[1],R=!1;return L<=Lr?(L=wr,R=!0):L>=jr&&(L=et,R=!0),P<=nt?(P=tt,R=!0):P>=Ir&&(P=Dr,R=!0),R?[L,P]:k}function Wt(k){return k.map(en)}function gn(k,L,P){for(var R=0,U=k.length;R=jr||he<=nt||he>=Ir){B[Z]=en(ve);for(var xe=Z+1;xeLr&&zent&&tr=ue)break;P.push({index:-1,polygon:L,ring:B=B.slice(xe-1)}),B[0]=Yt(B[0][1]),Z=-1,ue=B.length}}}}function qt(k){var L,P=k.length,R={},U={},B,Z,ue,ve,le;for(L=0;L0?_-ue:ue)*F],le=r.geoProjection(k(Z)).rotate(ve),he=r.geoRotation(ve),xe=le.center;return delete le.rotate,le.center=function(Le){return arguments.length?xe(he(Le)):he.invert(xe())},le.clipAngle(90)}function pa(k){var L=o(k);function P(R,U){var B=r.geoGnomonicRaw(R,U);return B[0]*=L,B}return P.invert=function(R,U){return r.geoGnomonicRaw.invert(R/L,U)},P}function Xa(){return Zi([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Zi(k,L){return Bn(pa,k,L)}function Ti(k){if(!(k*=2))return r.geoAzimuthalEquidistantRaw;var L=-k/2,P=-L,R=k*k,U=y(P),B=.5/g(P);function Z(ue,ve){var le=X(o(ve)*o(ue-L)),he=X(o(ve)*o(ue-P)),xe=ve<0?-1:1;return le*=le,he*=he,[(le-he)/(2*k),xe*V(4*R*he-(R-le+he)*(R-le+he))/(2*k)]}return Z.invert=function(ue,ve){var le=ve*ve,he=o(V(le+(Le=ue+L)*Le)),xe=o(V(le+(Le=ue+P)*Le)),Le,ze;return[i(ze=he-xe,Le=(he+xe)*U),(ve<0?-1:1)*X(V(Le*Le+ze*ze)*B)]},Z}function nl(){return si([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function si(k,L){return Bn(Ti,k,L)}function al(k,L){if(n(L)x&&--ue>0);return[m(k)*(V(U*U+4)+U)*_/4,b*Z]};function Xi(){return r.geoProjection(Gf).scale(127.16)}function Yh(k,L,P,R,U){function B(Z,ue){var ve=P*g(R*ue),le=V(1-ve*ve),he=V(2/(1+le*o(Z*=U)));return[k*le*he*g(Z),L*ve*he]}return B.invert=function(Z,ue){var ve=Z/k,le=ue/L,he=V(ve*ve+le*le),xe=2*O(he/2);return[i(Z*y(xe),k*he)/U,he&&O(ue*g(xe)/(L*P*he))/R]},B}function Gh(k,L,P,R){var U=_/3;k=f(k,x),L=f(L,x),k=v(k,b),L=v(L,_-x),P=f(P,0),P=v(P,100-x),R=f(R,x);var B=P/100+1,Z=R/100,ue=X(B*o(U))/U,ve=g(k)/g(ue*b),le=L/_,he=V(Z*g(k/2)/g(L/2)),xe=he/V(le*ve*ue),Le=1/(he*V(le*ve*ue));return Yh(xe,Le,ve,ue,le)}function d0(){var k=65*H,L=60*H,P=20,R=200,U=r.geoProjectionMutator(Gh),B=U(k,L,P,R);return B.poleline=function(Z){return arguments.length?U(k=+Z*H,L,P,R):k*F},B.parallels=function(Z){return arguments.length?U(k,L=+Z*H,P,R):L*F},B.inflation=function(Z){return arguments.length?U(k,L,P=+Z,R):P},B.ratio=function(Z){return arguments.length?U(k,L,P,R=+Z):R},B.scale(163.775)}function Xv(){return d0().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Vh=4*_+3*V(3),Wh=2*V(2*_*V(3)/Vh),Zh=ir(Wh*V(3)/_,Wh,Vh/6);function p0(){return r.geoProjection(Zh).scale(176.84)}function Vf(k,L){return[k*V(1-3*L*L/(_*_)),L]}Vf.invert=function(k,L){return[k/V(1-3*L*L/(_*_)),L]};function Xh(){return r.geoProjection(Vf).scale(152.63)}function jv(k,L){var P=o(L),R=o(k)*P,U=1-R,B=o(k=i(g(k)*P,-g(L))),Z=g(k);return P=V(1-R*R),[Z*P-B*U,-B*P-Z*U]}jv.invert=function(k,L){var P=(k*k+L*L)/-2,R=V(-P*(2+P)),U=L*P+k*R,B=k*P-L*R,Z=V(B*B+U*U);return[i(R*U,Z*(1+P)),Z?-O(R*B/Z):0]};function by(){return r.geoProjection(jv).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Jv(k,L){var P=Be(k,L);return[(P[0]+k/b)/2,(P[1]+L)/2]}Jv.invert=function(k,L){var P=k,R=L,U=25;do{var B=o(R),Z=g(R),ue=g(2*R),ve=Z*Z,le=B*B,he=g(P),xe=o(P/2),Le=g(P/2),ze=Le*Le,tr=1-le*xe*xe,vr=tr?X(B*xe)*V(Ar=1/tr):Ar=0,Ar,Zr=.5*(2*vr*B*Le+P/b)-k,at=.5*(vr*Z+R)-L,ot=.5*Ar*(le*ze+vr*B*xe*ve)+.5/b,st=Ar*(he*ue/4-vr*Z*Le),vt=.125*Ar*(ue*Le-vr*Z*le*he),an=.5*Ar*(ve*xe+vr*ze*B)+.5,Mn=st*vt-an*ot,Ft=(at*st-Zr*an)/Mn,zn=(Zr*vt-at*ot)/Mn;P-=Ft,R-=zn}while((n(Ft)>x||n(zn)>x)&&--U>0);return[P,R]};function ki(){return r.geoProjection(Jv).scale(158.837)}e.geoNaturalEarth=r.geoNaturalEarth1,e.geoNaturalEarthRaw=r.geoNaturalEarth1Raw,e.geoAiry=qe,e.geoAiryRaw=de,e.geoAitoff=Ne,e.geoAitoffRaw=Be,e.geoArmadillo=Se,e.geoArmadilloRaw=Ie,e.geoAugust=se,e.geoAugustRaw=Xe,e.geoBaker=W,e.geoBakerRaw=pe,e.geoBerghaus=$,e.geoBerghausRaw=Q,e.geoBertin1953=ar,e.geoBertin1953Raw=Ze,e.geoBoggs=je,e.geoBoggsRaw=Ve,e.geoBonne=mr,e.geoBonneRaw=Ke,e.geoBottomley=gr,e.geoBottomleyRaw=Mr,e.geoBromley=Tr,e.geoBromleyRaw=dr,e.geoChamberlin=We,e.geoChamberlinRaw=_e,e.geoChamberlinAfrica=$e,e.geoCollignon=Vr,e.geoCollignonRaw=qr,e.geoCraig=lt,e.geoCraigRaw=Hr,e.geoCraster=St,e.geoCrasterRaw=Rt,e.geoCylindricalEqualArea=Fn,e.geoCylindricalEqualAreaRaw=hn,e.geoCylindricalStereographic=Xt,e.geoCylindricalStereographicRaw=$n,e.geoEckert1=sn,e.geoEckert1Raw=cn,e.geoEckert2=aa,e.geoEckert2Raw=Kt,e.geoEckert3=Qt,e.geoEckert3Raw=rt,e.geoEckert4=dn,e.geoEckert4Raw=Ct,e.geoEckert5=tn,e.geoEckert5Raw=pn,e.geoEckert6=ha,e.geoEckert6Raw=un,e.geoEisenlohr=da,e.geoEisenlohrRaw=Na,e.geoFahey=In,e.geoFaheyRaw=It,e.geoFoucaut=io,e.geoFoucautRaw=gi,e.geoFoucautSinusoidal=ms,e.geoFoucautSinusoidalRaw=mi,e.geoGilbert=ys,e.geoGingery=Uo,e.geoGingeryRaw=Oo,e.geoGinzburg4=Lt,e.geoGinzburg4Raw=Kr,e.geoGinzburg5=Br,e.geoGinzburg5Raw=Ht,e.geoGinzburg6=nn,e.geoGinzburg6Raw=Vn,e.geoGinzburg8=At,e.geoGinzburg8Raw=Dn,e.geoGinzburg9=Yo,e.geoGinzburg9Raw=Wa,e.geoGringorten=Vo,e.geoGringortenRaw=cu,e.geoGuyou=bs,e.geoGuyouRaw=lo,e.geoHammer=Oe,e.geoHammerRaw=Me,e.geoHammerRetroazimuthal=_s,e.geoHammerRetroazimuthalRaw=Mf,e.geoHealpix=Nl,e.geoHealpixRaw=so,e.geoHill=Xc,e.geoHillRaw=Tf,e.geoHomolosine=Fv,e.geoHomolosineRaw=Ts,e.geoHufnagel=kf,e.geoHufnagelRaw=Xo,e.geoHyperelliptical=co,e.geoHyperellipticalRaw=fo,e.geoInterrupt=Yi,e.geoInterruptedBoggs=Hv,e.geoInterruptedHomolosine=jo,e.geoInterruptedMollweide=$o,e.geoInterruptedMollweideHemispheres=ks,e.geoInterruptedSinuMollweide=Ss,e.geoInterruptedSinusoidal=Ko,e.geoKavrayskiy7=Bl,e.geoKavrayskiy7Raw=Hl,e.geoLagrange=gu,e.geoLagrangeRaw=pu,e.geoLarrivee=yu,e.geoLarriveeRaw=mu,e.geoLaskowski=Kn,e.geoLaskowskiRaw=Fa,e.geoLittrow=Vi,e.geoLittrowRaw=Aa,e.geoLoximuthal=Qo,e.geoLoximuthalRaw=Ls,e.geoMiller=Cf,e.geoMillerRaw=Ol,e.geoModifiedStereographic=wi,e.geoModifiedStereographicRaw=$c,e.geoModifiedStereographicAlaska=Ef,e.geoModifiedStereographicGs48=Kc,e.geoModifiedStereographicGs50=Qc,e.geoModifiedStereographicMiller=qs,e.geoModifiedStereographicLee=Ds,e.geoMollweide=Cr,e.geoMollweideRaw=rr,e.geoMtFlatPolarParabolic=e0,e.geoMtFlatPolarParabolicRaw=_u,e.geoMtFlatPolarQuartic=Uv,e.geoMtFlatPolarQuarticRaw=Pf,e.geoMtFlatPolarSinusoidal=xu,e.geoMtFlatPolarSinusoidalRaw=ho,e.geoNaturalEarth2=Ps,e.geoNaturalEarth2Raw=Ul,e.geoNellHammer=Rf,e.geoNellHammerRaw=Rs,e.geoInterruptedQuarticAuthalic=r0,e.geoNicolosi=t0,e.geoNicolosiRaw=zf,e.geoPatterson=n0,e.geoPattersonRaw=Of,e.geoPolyconic=a0,e.geoPolyconicRaw=el,e.geoPolyhedral=Gl,e.geoPolyhedralButterfly=Ns,e.geoPolyhedralCollignon=Zv,e.geoPolyhedralWaterman=Is,e.geoProject=ku,e.geoGringortenQuincuncial=I,e.geoPeirceQuincuncial=J,e.geoPierceQuincuncial=J,e.geoQuantize=ce,e.geoQuincuncial=Yf,e.geoRectangularPolyconic=we,e.geoRectangularPolyconicRaw=oe,e.geoRobinson=or,e.geoRobinsonRaw=Je,e.geoSatellite=Qe,e.geoSatelliteRaw=br,e.geoSinuMollweide=jc,e.geoSinuMollweideRaw=As,e.geoSinusoidal=er,e.geoSinusoidalRaw=kr,e.geoStitch=mn,e.geoTimes=Gt,e.geoTimesRaw=Yr,e.geoTwoPointAzimuthal=Zi,e.geoTwoPointAzimuthalRaw=pa,e.geoTwoPointAzimuthalUsa=Xa,e.geoTwoPointEquidistant=si,e.geoTwoPointEquidistantRaw=Ti,e.geoTwoPointEquidistantUsa=nl,e.geoVanDerGrinten=Zl,e.geoVanDerGrintenRaw=al,e.geoVanDerGrinten2=v0,e.geoVanDerGrinten2Raw=Lu,e.geoVanDerGrinten3=Uh,e.geoVanDerGrinten3Raw=h0,e.geoVanDerGrinten4=Xi,e.geoVanDerGrinten4Raw=Gf,e.geoWagner=d0,e.geoWagner7=Xv,e.geoWagnerRaw=Gh,e.geoWagner4=p0,e.geoWagner4Raw=Zh,e.geoWagner6=Xh,e.geoWagner6Raw=Vf,e.geoWiechel=by,e.geoWiechelRaw=jv,e.geoWinkel3=ki,e.geoWinkel3Raw=Jv,Object.defineProperty(e,"__esModule",{value:!0})})});var vF=ne((Uve,cF)=>{"use strict";var va=kt(),a_=pr(),Zae=dt(),Dv=Math.PI/180,Hc=180/Math.PI,o_={cursor:"pointer"},l_={cursor:"auto"};function Xae(e,r){var t=e.projection,n;return r._isScoped?n=jae:r._isClipped?n=$ae:n=Jae,n(e,t)}cF.exports=Xae;function s_(e,r){return va.behavior.zoom().translate(r.translate()).scale(r.scale())}function u_(e,r,t){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],l=a._fullLayout,s=l[n],u={},f={};function v(h,d){u[n+"."+h]=a_.nestedProperty(o,h).get(),Zae.call("_storeDirectGUIEdit",i,l._preGUI,u);var m=a_.nestedProperty(s,h);m.get()!==d&&(m.set(d),a_.nestedProperty(o,h).set(d),f[n+"."+h]=d)}t(v),v("projection.scale",r.scale()/e.fitScale),v("fitbounds",!1),a.emit("plotly_relayout",f)}function jae(e,r){var t=s_(e,r);function n(){va.select(this).style(o_)}function a(){r.scale(va.event.scale).translate(va.event.translate),e.render(!0);var l=r.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":r.scale()/e.fitScale,"geo.center.lon":l[0],"geo.center.lat":l[1]})}function i(l){var s=r.invert(e.midPt);l("center.lon",s[0]),l("center.lat",s[1])}function o(){va.select(this).style(l_),u_(e,r,i)}return t.on("zoomstart",n).on("zoom",a).on("zoomend",o),t}function Jae(e,r){var t=s_(e,r),n=2,a,i,o,l,s,u,f,v,h;function d(_){return r.invert(_)}function m(_){var b=d(_);if(!b)return!0;var A=r(b);return Math.abs(A[0]-_[0])>n||Math.abs(A[1]-_[1])>n}function g(){va.select(this).style(o_),a=va.mouse(this),i=r.rotate(),o=r.translate(),l=i,s=d(a)}function y(){if(u=va.mouse(this),m(a)){t.scale(r.scale()),t.translate(r.translate());return}r.scale(va.event.scale),r.translate([o[0],va.event.translate[1]]),s?d(u)&&(v=d(u),f=[l[0]+(v[0]-s[0]),i[1],i[2]],r.rotate(f),l=f):(a=u,s=d(a)),h=!0,e.render(!0);var _=r.rotate(),b=r.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":r.scale()/e.fitScale,"geo.center.lon":b[0],"geo.center.lat":b[1],"geo.projection.rotation.lon":-_[0]})}function x(){va.select(this).style(l_),h&&u_(e,r,T)}function T(_){var b=r.rotate(),A=r.invert(e.midPt);_("projection.rotation.lon",-b[0]),_("center.lon",A[0]),_("center.lat",A[1])}return t.on("zoomstart",g).on("zoom",y).on("zoomend",x),t}function $ae(e,r){var t={r:r.rotate(),k:r.scale()},n=s_(e,r),a=iie(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,l;n.on("zoomstart",function(){va.select(this).style(o_);var h=va.mouse(this),d=r.rotate(),m=d,g=r.translate(),y=Kae(d);l=ay(r,h),o.call(n,"zoom",function(){var x=va.mouse(this);if(r.scale(t.k=va.event.scale),!l)h=x,l=ay(r,h);else if(ay(r,x)){r.rotate(d).translate(g);var T=ay(r,x),_=eie(l,T),b=tie(Qae(y,_)),A=t.r=rie(b,l,m);(!isFinite(A[0])||!isFinite(A[1])||!isFinite(A[2]))&&(A=m),r.rotate(A),m=A}u(a.of(this,arguments))}),s(a.of(this,arguments))}).on("zoomend",function(){va.select(this).style(l_),o.call(n,"zoom",null),f(a.of(this,arguments)),u_(e,r,v)}).on("zoom.redraw",function(){e.render(!0);var h=r.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":r.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function s(h){i++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function f(h){--i||h({type:"zoomend"})}function v(h){var d=r.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return va.rebind(n,a,"on")}function ay(e,r){var t=e.invert(r);return t&&isFinite(t[0])&&isFinite(t[1])&&nie(t)}function Kae(e){var r=.5*e[0]*Dv,t=.5*e[1]*Dv,n=.5*e[2]*Dv,a=Math.sin(r),i=Math.cos(r),o=Math.sin(t),l=Math.cos(t),s=Math.sin(n),u=Math.cos(n);return[i*l*u+a*o*s,a*l*u-i*o*s,i*o*u+a*l*s,i*l*s-a*o*u]}function Qae(e,r){var t=e[0],n=e[1],a=e[2],i=e[3],o=r[0],l=r[1],s=r[2],u=r[3];return[t*o-n*l-a*s-i*u,t*l+n*o+a*u-i*s,t*s-n*u+a*o+i*l,t*u+n*s-a*l+i*o]}function eie(e,r){if(!(!e||!r)){var t=aie(e,r),n=Math.sqrt(fF(t,t)),a=.5*Math.acos(Math.max(-1,Math.min(1,fF(e,r)))),i=Math.sin(a)/n;return n&&[Math.cos(a),t[2]*i,-t[1]*i,t[0]*i]}}function rie(e,r,t){var n=i_(r,2,e[0]);n=i_(n,1,e[1]),n=i_(n,0,e[2]-t[2]);var a=r[0],i=r[1],o=r[2],l=n[0],s=n[1],u=n[2],f=Math.atan2(i,a)*Hc,v=Math.sqrt(a*a+i*i),h,d;Math.abs(s)>v?(d=(s>0?90:-90)-f,h=0):(d=Math.asin(s/v)*Hc-f,h=Math.sqrt(v*v-s*s));var m=180-d-2*f,g=(Math.atan2(u,l)-Math.atan2(o,h))*Hc,y=(Math.atan2(u,l)-Math.atan2(o,-h))*Hc,x=sF(t[0],t[1],d,g),T=sF(t[0],t[1],m,y);return x<=T?[d,g,t[2]]:[m,y,t[2]]}function sF(e,r,t,n){var a=uF(t-e),i=uF(n-r);return Math.sqrt(a*a+i*i)}function uF(e){return(e%360+540)%360-180}function i_(e,r,t){var n=t*Dv,a=e.slice(),i=r===0?1:0,o=r===2?1:2,l=Math.cos(n),s=Math.sin(n);return a[i]=e[i]*l-e[o]*s,a[o]=e[o]*l+e[i]*s,a}function tie(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*Hc,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*Hc,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*Hc]}function nie(e){var r=e[0]*Dv,t=e[1]*Dv,n=Math.cos(t);return[n*Math.cos(r),n*Math.sin(r),Math.sin(t)]}function fF(e,r){for(var t=0,n=0,a=e.length;n{"use strict";var uu=kt(),v_=n_(),oie=v_.geoPath,lie=v_.geoDistance,sie=lF(),uie=dt(),Fh=pr(),fie=Fh.strTranslate,iy=zt(),Nh=ln(),hF=ss(),cie=ua(),c_=Cn(),dF=Ju().getAutoRange,f_=To(),vie=nu().prepSelect,hie=nu().clearOutline,die=nu().selectOnClick,pie=vF(),pi=Ph(),gie=Km(),gF=Um(),mie=O4().feature;function mF(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 Dl=mF.prototype;yF.exports=function(r){return new mF(r)};Dl.plot=function(e,r,t,n){var a=this;if(n)return a.update(e,r,!0);a._geoCalcData=e,a._fullLayout=r;var i=r[this.id],o=[],l=!1;for(var s in pi.layerNameToAdjective)if(s!=="frame"&&i["show"+s]){l=!0;break}for(var u=!1,f=0;f0&&o._module.calcGeoJSON(i,r)}if(!t){var l=this.updateProjection(e,r);if(l)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(r,n),this.updateDims(r,n),this.updateFx(r,n),cie.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Dl.updateProjection=function(e,r){var t=this.graphDiv,n=r[this.id],a=r._size,i=n.domain,o=n.projection,l=n.lonaxis,s=n.lataxis,u=l._ax,f=s._ax,v=this.projection=yie(n),h=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],d=n.center||{},m=o.rotation||{},g=l.range||[],y=s.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],f._length=h[1][1]-h[0][1],u.range=dF(t,u),f.range=dF(t,f);var x=(u.range[0]+u.range[1])/2,T=(f.range[0]+f.range[1])/2;if(n._isScoped)d={lon:x,lat:T};else if(n._isClipped){d={lon:x,lat:T},m={lon:x,lat:T,roll:m.roll};var _=o.type,b=pi.lonaxisSpan[_]/2||180,A=pi.lataxisSpan[_]/2||90;g=[x-b,x+b],y=[T-A,T+A]}else d={lon:x,lat:T},m={lon:x,lat:m.lat,roll:m.roll}}v.center([d.lon-m.lon,d.lat-m.lat]).rotate([-m.lon,-m.lat,m.roll]).parallels(o.parallels);var S=pF(g,y);v.fitExtent(h,S);var M=this.bounds=v.getBounds(S),D=this.fitScale=v.scale(),z=v.translate();if(n.fitbounds){var F=v.getBounds(pF(u.range,f.range)),H=Math.min((M[1][0]-M[0][0])/(F[1][0]-F[0][0]),(M[1][1]-M[0][1])/(F[1][1]-F[0][1]));isFinite(H)?v.scale(H*D):Fh.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(o.scale*D);var Y=this.midPt=[(M[0][0]+M[1][0])/2,(M[0][1]+M[1][1])/2];if(v.translate([z[0]+(Y[0]-z[0]),z[1]+(Y[1]-z[1])]).clipExtent(M),n._isAlbersUsa){var O=v([d.lon,d.lat]),X=v.translate();v.translate([X[0]-(O[0]-X[0]),X[1]-(O[1]-X[1])])}};Dl.updateBaseLayers=function(e,r){var t=this,n=t.topojson,a=t.layers,i=t.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function l(h){return!!pi.lineLayers[h]}function s(h){return!!pi.fillLayers[h]}var u=this.hasChoropleth?pi.layersForChoropleth:pi.layers,f=u.filter(function(h){return l(h)||s(h)?r["show"+h]:o(h)?r[h].showgrid:!0}),v=t.framework.selectAll(".layer").data(f,String);v.exit().each(function(h){delete a[h],delete i[h],uu.select(this).remove()}),v.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=a[h]=uu.select(this);h==="bg"?t.bgRect=d.append("rect").style("pointer-events","all"):o(h)?i[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):l(h)?i[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):s(h)&&(i[h]=d.append("path").style("stroke","none"))}),v.order(),v.each(function(h){var d=i[h],m=pi.layerNameToAdjective[h];h==="frame"?d.datum(pi.sphereSVG):l(h)||s(h)?d.datum(mie(n,n.objects[h])):o(h)&&d.datum(bie(h,r,e)).call(iy.stroke,r[h].gridcolor).call(Nh.dashLine,r[h].griddash,r[h].gridwidth),l(h)?d.call(iy.stroke,r[m+"color"]).call(Nh.dashLine,"",r[m+"width"]):s(h)&&d.call(iy.fill,r[m+"color"])})};Dl.updateDims=function(e,r){var t=this.bounds,n=(r.framewidth||0)/2,a=t[0][0]-n,i=t[0][1]-n,o=t[1][0]-a+n,l=t[1][1]-i+n;Nh.setRect(this.clipRect,a,i,o,l),this.bgRect.call(Nh.setRect,a,i,o,l).call(iy.fill,r.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=l};Dl.updateFx=function(e,r){var t=this,n=t.graphDiv,a=t.bgRect,i=e.dragmode,o=e.clickmode;if(t.isStatic)return;function l(){var v=t.viewInitial,h={};for(var d in v)h[t.id+"."+d]=v[d];uie.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function s(v){return t.projection.invert([v[0]+t.xaxis._offset,v[1]+t.yaxis._offset])}var u=function(v,h){if(h.isRect){var d=v.range={};d[t.id]=[s([h.xmin,h.ymin]),s([h.xmax,h.ymax])]}else{var m=v.lassoPoints={};m[t.id]=h.map(s)}},f={element:t.bgRect.node(),gd:n,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:u},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id,clickFn:function(v){v===2&&hie(n)}};i==="pan"?(a.node().onmousedown=null,a.call(pie(t,r)),a.on("dblclick.zoom",l),n._context._scrollZoom.geo||a.on("wheel.zoom",null)):(i==="select"||i==="lasso")&&(a.on(".zoom",null),f.prepFn=function(v,h,d){vie(v,h,d,f,i)},f_.init(f)),a.on("mousemove",function(){var v=t.projection.invert(Fh.getPositionFromD3Event());if(!v)return f_.unhover(n,uu.event);t.xaxis.p2c=function(){return v[0]},t.yaxis.p2c=function(){return v[1]},hF.hover(n,uu.event,t.id)}),a.on("mouseout",function(){n._dragging||f_.unhover(n,uu.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&die(uu.event,n,[t.xaxis],[t.yaxis],t.id,f),o.indexOf("event")>-1&&hF.click(n,uu.event))})};Dl.makeFramework=function(){var e=this,r=e.graphDiv,t=r._fullLayout,n="clip"+t._uid+e.id;e.clipDef=t._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=uu.select(e.container).append("g").attr("class","geo "+e.id).call(Nh.setClipUrl,n,r),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c_.setConvert(e.mockAxis,t)};Dl.saveViewInitial=function(e){var r=e.center||{},t=e.projection,n=t.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":t.scale};var a;e._isScoped?a={"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:a={"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":n.lon},Fh.extendFlat(this.viewInitial,a)};Dl.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Dl._render=function(){var e=this.projection,r=e.getPath(),t;function n(i){var o=e(i.lonlat);return o?fie(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",function(i){return r(i.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr("display",a).attr("transform",n)};function yie(e){var r=e.projection,t=r.type,n=pi.projNames[t];n="geo"+Fh.titleCase(n);for(var a=v_[n]||sie[n],i=a(),o=e._isSatellite?Math.acos(1/r.distance)*180/Math.PI:e._isClipped?pi.lonaxisSpan[t]/2:null,l=["center","rotate","parallels","clipExtent"],s=function(v){return v?i:[]},u=0;um}else return!1},i.getPath=function(){return oie().projection(i)},i.getBounds=function(v){return i.getPath().bounds(v)},i.precision(pi.precision),e._isSatellite&&i.tilt(r.tilt).distance(r.distance),o&&i.clipAngle(o-pi.clipPad),i}function bie(e,r,t){var n=1e-6,a=2.5,i=r[e],o=pi.scopeDefaults[r.scope],l,s,u;e==="lonaxis"?(l=o.lonaxisRange,s=o.lataxisRange,u=function(T,_){return[T,_]}):e==="lataxis"&&(l=o.lataxisRange,s=o.lonaxisRange,u=function(T,_){return[_,T]});var f={type:"linear",range:[l[0],l[1]-n],tick0:i.tick0,dtick:i.dtick};c_.setConvert(f,t);var v=c_.calcTicks(f);!r.isScoped&&e==="lonaxis"&&v.pop();for(var h=v.length,d=new Array(h),m=0;m0&&a<0&&(a+=360);var l=(a-n)/4;return{type:"Polygon",coordinates:[[[n,i],[n,o],[n+l,o],[n+2*l,o],[n+3*l,o],[a,o],[a,i],[a-l,i],[a-2*l,i],[a-3*l,i],[n,i]]]}}});var h_=ne((Gve,wF)=>{"use strict";var Pv=cl(),_ie=zm().attributes,xie=Kl().dash,Ev=Ph(),wie=_o().overrideAll,_F=Sd(),xF={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:Pv.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:xie},Mie=wF.exports=wie({domain:_ie({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:_F(Ev.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:_F(Ev.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:Pv.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:Ev.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:Ev.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:Ev.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:Ev.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:Pv.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:Pv.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:Pv.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:Pv.background},lonaxis:xF,lataxis:xF},"plot","from-root");Mie.uirevision={valType:"any",editType:"none"}});var AF=ne((Vve,MF)=>{"use strict";var Aie=pr(),Tie=_n(),kie=zm().defaults;MF.exports=function(r,t,n,a){var i=a.type,o=a.attributes,l=a.handleDefaults,s=a.partition||"x",u=t._subplots[i],f=u.length,v=f&&u[0].replace(/\d+$/,""),h,d;function m(T,_){return Aie.coerce(h,d,o,T,_)}for(var g=0;g{"use strict";var oy=pr(),Sie=AF(),Cie=p1().getSubplotData,ly=Ph(),Lie=h_(),TF=ly.axesNames;kF.exports=function(r,t,n){Sie(r,t,n,{type:"geo",attributes:Lie,handleDefaults:qie,fullData:n,partition:"y"})};function qie(e,r,t,n){var a=Cie(n.fullData,"geo",n.id),i=a.map(function(de){return de.index}),o=t("resolution"),l=t("scope"),s=ly.scopeDefaults[l],u=t("projection.type",s.projType),f=r._isAlbersUsa=u==="albers usa";f&&(l=r.scope="usa");var v=r._isScoped=l!=="world",h=r._isSatellite=u==="satellite",d=r._isConic=u.indexOf("conic")!==-1||u==="albers",m=r._isClipped=!!ly.lonaxisSpan[u];if(e.visible===!1){var g=oy.extendDeep({},r._template);g.showcoastlines=!1,g.showcountries=!1,g.showframe=!1,g.showlakes=!1,g.showland=!1,g.showocean=!1,g.showrivers=!1,g.showsubunits=!1,g.lonaxis&&(g.lonaxis.showgrid=!1),g.lataxis&&(g.lataxis.showgrid=!1),r._template=g}for(var y=t("visible"),x,T=0;T0&&O<0&&(O+=360);var X=(Y+O)/2,V;if(!f){var ee=v?s.projRotate:[X,0,0];V=t("projection.rotation.lon",ee[0]),t("projection.rotation.lat",ee[1]),t("projection.rotation.roll",ee[2]),x=t("showcoastlines",!v&&y),x&&(t("coastlinecolor"),t("coastlinewidth")),x=t("showocean",y?void 0:!1),x&&t("oceancolor")}var te,K;if(f?(te=-96.6,K=38.7):(te=v?X:V,K=(H[0]+H[1])/2),t("center.lon",te),t("center.lat",K),h&&(t("projection.tilt"),t("projection.distance")),d){var re=s.projParallels||[0,60];t("projection.parallels",re)}t("projection.scale"),x=t("showland",y?void 0:!1),x&&t("landcolor"),x=t("showlakes",y?void 0:!1),x&&t("lakecolor"),x=t("showrivers",y?void 0:!1),x&&(t("rivercolor"),t("riverwidth")),x=t("showcountries",v&&l!=="usa"&&y),x&&(t("countrycolor"),t("countrywidth")),(l==="usa"||l==="north america"&&o===50)&&(t("showsubunits",y),t("subunitcolor"),t("subunitwidth")),v||(x=t("showframe",y),x&&(t("framecolor"),t("framewidth"))),t("bgcolor");var fe=t("fitbounds");fe&&(delete r.projection.scale,v?(delete r.center.lon,delete r.center.lat):m?(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon,delete r.projection.rotation.lat,delete r.lonaxis.range,delete r.lataxis.range):(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon))}});var d_=ne((Zve,qF)=>{"use strict";var Die=p1().getSubplotCalcData,Eie=pr().counterRegex,Pie=bF(),ps="geo",CF=Eie(ps),LF={};LF[ps]={valType:"subplotid",dflt:ps,editType:"calc"};function Rie(e){for(var r=e._fullLayout,t=e.calcdata,n=r._subplots[ps],a=0;a{"use strict";DF.exports={attributes:Eh(),supplyDefaults:sN(),colorbar:Eb(),formatLabels:cN(),calc:gN(),calcGeoJSON:r_().calcGeoJSON,plot:r_().plot,style:$4(),styleOnSelect:mh().styleOnSelect,hoverPoints:KN(),eventData:eF(),selectPoints:nF(),moduleType:"trace",name:"scattergeo",basePlotModule:d_(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var RF=ne((jve,PF)=>{"use strict";PF.exports=EF()});var sy=ne((Jve,FF)=>{"use strict";var Fie=Ru().hovertemplateAttrs,gf=Eh(),Iie=H0(),zF=bo(),Hie=cl().defaultLine,pf=la().extendFlat,NF=gf.marker.line;FF.exports=pf({locations:{valType:"data_array",editType:"calc"},locationmode:gf.locationmode,z:{valType:"data_array",editType:"calc"},geojson:pf({},gf.geojson,{}),featureidkey:gf.featureidkey,text:pf({},gf.text,{}),hovertext:pf({},gf.hovertext,{}),marker:{line:{color:pf({},NF.color,{dflt:Hie}),width:pf({},NF.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:gf.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:gf.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:pf({},zF.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Fie(),showlegend:pf({},zF.showlegend,{dflt:!1})},Iie("",{cLetter:"z",editTypeOverride:"calc"}))});var HF=ne(($ve,IF)=>{"use strict";var uy=pr(),Bie=B0(),Oie=sy();IF.exports=function(r,t,n,a){function i(h,d){return uy.coerce(r,t,Oie,h,d)}var o=i("locations"),l=i("z");if(!(o&&o.length&&uy.isArrayOrTypedArray(l)&&l.length)){t.visible=!1;return}t._length=Math.min(o.length,l.length);var s=i("geojson"),u;(typeof s=="string"&&s!==""||uy.isPlainObject(s))&&(u="geojson-id");var f=i("locationmode",u);f==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate");var v=i("marker.line.width");v&&i("marker.line.color"),i("marker.opacity"),Bie(r,t,a,i,{prefix:"",cLetter:"z"}),uy.coerceSelectionMarkerOpacity(t,i)}});var OF=ne((Kve,BF)=>{"use strict";BF.exports={min:"zmin",max:"zmax"}});var VF=ne((Qve,GF)=>{"use strict";var UF=Bt(),Uie=En().BADNUM,Yie=Qd(),Gie=vh(),Vie=Qg();function YF(e){return e&&typeof e=="string"}GF.exports=function(r,t){var n=t._length,a=new Array(n),i;t.geojson?i=function(f){return YF(f)||UF(f)}:i=YF;for(var o=0;o{"use strict";var Wie=kt(),Zie=zt(),p_=ln(),Xie=rp();function jie(e,r){r&&WF(e,r)}function WF(e,r){var t=r[0].trace,n=r[0].node3,a=n.selectAll(".choroplethlocation"),i=t.marker||{},o=i.line||{},l=Xie.makeColorScaleFuncFromTrace(t);a.each(function(s){Wie.select(this).attr("fill",l(s.z)).call(Zie.stroke,s.mlc||o.color).call(p_.dashLine,"",s.mlw||o.width||0).style("opacity",i.opacity)}),p_.selectedPointStyle(a,t)}function Jie(e,r){var t=r[0].node3,n=r[0].trace;n.selectedpoints?p_.selectedPointStyle(t.selectAll(".choroplethlocation"),n):WF(e,r)}ZF.exports={style:jie,styleOnSelect:Jie}});var g_=ne((r1e,JF)=>{"use strict";var $ie=kt(),XF=pr(),Rv=Km(),Kie=Um().getTopojsonFeatures,jF=Ju().findExtremes,Qie=fy().style;function eoe(e,r,t){var n=r.layers.backplot.select(".choroplethlayer");XF.makeTraceGroups(n,t,"trace choropleth").each(function(a){var i=$ie.select(this),o=i.selectAll("path.choroplethlocation").data(XF.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Qie(e,a)})}function roe(e,r){for(var t=e[0].trace,n=r[t.geo],a=n._subplot,i=t.locationmode,o=t._length,l=i==="geojson-id"?Rv.extractTraceFeature(e):Kie(t,a.topojson),s=[],u=[],f=0;f{"use strict";var toe=Cn(),noe=sy(),aoe=pr().fillText;$F.exports=function(r,t,n){var a=r.cd,i=a[0].trace,o=r.subplot,l,s,u,f,v=[t,n],h=[t+360,n];for(s=0;s")}}});var eI=ne((n1e,QF)=>{"use strict";QF.exports=function(r,t,n,a,i){r.location=t.location,r.z=t.z;var o=a[i];return o.fIn&&o.fIn.properties&&(r.properties=o.fIn.properties),r.ct=o.ct,r}});var tI=ne((a1e,rI)=>{"use strict";rI.exports=function(r,t){var n=r.cd,a=r.xaxis,i=r.yaxis,o=[],l,s,u,f,v;if(t===!1)for(l=0;l{"use strict";nI.exports={attributes:sy(),supplyDefaults:HF(),colorbar:OF(),calc:VF(),calcGeoJSON:g_().calcGeoJSON,plot:g_().plot,style:fy().style,styleOnSelect:fy().styleOnSelect,hoverPoints:KF(),eventData:eI(),selectPoints:tI(),moduleType:"trace",name:"choropleth",basePlotModule:d_(),categories:["geo","noOpacity","showLegend"],meta:{}}});var oI=ne((o1e,iI)=>{"use strict";iI.exports=aI()});var Ga=ne((l1e,sI)=>{"use strict";var lI=Object.getOwnPropertySymbols,ooe=Object.prototype.hasOwnProperty,loe=Object.prototype.propertyIsEnumerable;function soe(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function uoe(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var n=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}sI.exports=uoe()?Object.assign:function(e,r){for(var t,n=soe(e),a,i=1;i{var vy=Ga();function uI(){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={}}vy(uI.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var n="",a=0;t>0;){var i=t%10;n=(i===0?"":e[i]+r[a])+n,a++,t=Math.floor(t/10)}return n.indexOf(e[1]+r[1])===0&&(n=n.substr(1)),n||e[0]}}});function m_(e,r,t,n){if(this._calendar=e,this._year=r,this._month=t,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function cy(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}vy(m_.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Tt.local.differentCalendars||Tt.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+cy(Math.abs(this.year()),4)+"-"+cy(this.month(),2)+"-"+cy(this.day(),2)}});function y_(){this.shortYearCutoff="+10"}vy(y_.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new m_(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+cy(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Tt.local.invalidMonth||Tt.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Tt.local.invalidMonth||Tt.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Tt.local.invalidYear||Tt.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var n=this._validate(e,r,t,Tt.local.invalidDate||Tt.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,r,t){var n=this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var n=e.toJD()+r*(t==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(t==="y"?r:0),o=e.monthOfYear()+(t==="m"?r:0),a=e.day(),l=function(f){for(;ov-1+f.minMonth;)i++,o-=v,v=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):t==="m"&&(l(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=t<0?-1:1;r=this._add(e,t*a[0]+i*a[1],a[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate);var n=t==="y"?r:e.year(),a=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,r,t){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,r,this.minDay);n=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=a-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,r,t){var n=this._validate(e,r,t,Tt.local.invalidDate||Tt.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Tt=fI.exports=new uI;Tt.cdate=m_;Tt.baseCalendar=y_;Tt.calendars.gregorian=b_});var cI=ne(()=>{var __=Ga(),Ca=Va();__(Ca.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"});Ca.local=Ca.regionalOptions[""];__(Ca.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});__(Ca.baseCalendar.prototype,{UNIX_EPOCH:Ca.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Ca.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw Ca.local.invalidFormat||Ca.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var n=t.dayNamesShort||this.local.dayNamesShort,a=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,o=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(b,A){for(var S=1;_+S1},f=function(b,A,S,M){var D=""+A;if(u(b,M))for(;D.length1},T=function(Y,O){var X=x(Y,O),V=[2,3,X?4:2,X?4:2,10,11,20]["oyYJ@!".indexOf(Y)+1],ee=new RegExp("^-?\\d{1,"+V+"}"),te=r.substring(D).match(ee);if(!te)throw(Ca.local.missingNumberAt||Ca.regionalOptions[""].missingNumberAt).replace(/\{0\}/,D);return D+=te[0].length,parseInt(te[0],10)},_=this,b=function(){if(typeof l=="function"){x("m");var Y=l.call(_,r.substring(D));return D+=Y.length,Y}return T("m")},A=function(Y,O,X,V){for(var ee=x(Y,V)?X:O,te=0;te-1){h=1,d=m;for(var H=this.daysInMonth(v,h);d>H;H=this.daysInMonth(v,h))h++,d-=H}return f>-1?this.fromJD(f):this.newDate(v,h,d)},determineDate:function(e,r,t,n,a){t&&typeof t!="object"&&(a=n,n=t,t=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(l){try{return i.parseDate(n,l,a)}catch(v){}l=l.toLowerCase();for(var s=(l.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(l);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(l);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var vI=ne(()=>{var mf=Va(),foe=Ga(),x_=mf.instance();function hy(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}hy.prototype=new mf.baseCalendar;foe(hy.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(voe);return t?t[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(hoe);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),i=["\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"][a-1];return this.isIntercalaryMonth(t,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(doe);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(t,n)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),n;if(isNaN(t))r[0]==="\u95F0"&&(n=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var a=r[r.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,t,n);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var n=this.intercalaryMonth(e),a=t&&r!==n;if(a||r<1||r>12)throw mf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!t&&r<=n?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),n=t?12:11;if(r<0||r>n)throw mf.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var n=this._validateYear(e,mf.local.invalidyear),a=bf[n-bf[0]],i=a>>9&4095,o=a>>5&15,l=a&31,s;s=x_.newDate(i,o,l),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=yf[e-yf[0]],n=t>>13,a=n?12:11;if(r>a)throw mf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,i,t,mf.local.invalidDate);e=this._validateYear(n.year()),r=n.month(),t=n.day();var a=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),o=goe(e,i,t,a);return x_.toJD(o.year,o.month,o.day)},fromJD:function(e){var r=x_.fromJD(e),t=poe(r.year(),r.month(),r.day()),n=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,n,t.day)},fromString:function(e){var r=e.match(coe),t=this._validateYear(+r[1]),n=+r[2],a=!!r[3],i=this.toMonthIndex(t,n,a),o=+r[4];return this.newDate(t,i,o)},add:function(e,r,t){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),l=Object.getPrototypeOf(hy.prototype).add.call(this,e,r,t);if(t==="y"){var s=l.year(),u=l.month(),f=this.isIntercalaryMonth(s,o),v=i&&f?this.toMonthIndex(s,o,!0):this.toMonthIndex(s,o,!1);v!==u&&l.month(v)}return l}});var coe=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,voe=/^\d?\d[iI]?/m,hoe=/^闰?十?[一二三四五六七八九]?月/m,doe=/^闰?十?[一二三四五六七八九]?/m;mf.calendars.chinese=hy;var yf=[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],bf=[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 poe(e,r,t,n){var a,i;if(typeof e=="object")a=e,i=r||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");a={year:e,month:r,day:t},i=n||{}}var u=bf[a.year-bf[0]],f=a.year<<9|a.month<<5|a.day;i.year=f>=u?a.year:a.year-1,u=bf[i.year-bf[0]];var v=u>>9&4095,h=u>>5&15,d=u&31,m,g=new Date(v,h-1,d),y=new Date(a.year,a.month-1,a.day);m=Math.round((y-g)/(24*3600*1e3));var x=yf[i.year-yf[0]],T;for(T=0;T<13;T++){var _=x&1<<12-T?30:29;if(m<_)break;m-=_}var b=x>>13;return!b||T=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,i=n):(f=!!n,i=a||{}),o={year:e,month:r,day:t,isIntercalary:f}}var v;v=o.day-1;var h=yf[o.year-yf[0]],d=h>>13,m;d&&(o.month>d||o.isIntercalary)?m=o.month:m=o.month-1;for(var g=0;g>9&4095,_=x>>5&15,b=x&31,A=new Date(T,_-1,b+v);return i.year=A.getFullYear(),i.month=1+A.getMonth(),i.day=A.getDate(),i}});var hI=ne(()=>{var Bc=Va(),moe=Ga();function w_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}w_.prototype=new Bc.baseCalendar;moe(w_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Bc.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Bc.local.invalidYear||Bc.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Bc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,Bc.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});Bc.calendars.coptic=w_});var dI=ne(()=>{var fu=Va(),yoe=Ga();function M_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M_.prototype=new fu.baseCalendar;yoe(M_.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,fu.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fu.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fu.local.invalidYear),400},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,fu.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,fu.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,r,t){var n=this.dayOfWeek(e,r,t);return n>=2&&n<=6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,fu.local.invalidDate);return{century:boe[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,r,t){var n=this._validate(e,r,t,fu.local.invalidDate);return e=n.year()+(n.year()<0?1:0),r=n.month(),t=n.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,n=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,n)}});var boe={20:"Fruitbat",21:"Anchovy"};fu.calendars.discworld=M_});var pI=ne(()=>{var Oc=Va(),_oe=Ga();function A_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}A_.prototype=new Oc.baseCalendar;_oe(A_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Oc.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Oc.local.invalidYear||Oc.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Oc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,Oc.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});Oc.calendars.ethiopian=A_});var gI=ne(()=>{var _f=Va(),xoe=Ga();function T_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}T_.prototype=new _f.baseCalendar;xoe(T_.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 r=this._validate(e,this.minMonth,this.minDay,_f.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,dy(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,_f.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,_f.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,_f.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&dy(this.daysInYear(e),10)===5?30:r===9&&dy(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,_f.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,r,t){var n=this._validate(e,r,t,_f.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+t+1;if(r<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});function dy(e,r){return e-r*Math.floor(e/r)}_f.calendars.hebrew=T_});var mI=ne(()=>{var Ih=Va(),woe=Ga();function k_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}k_.prototype=new Ih.baseCalendar;woe(k_.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 r=this._validate(e,this.minMonth,this.minDay,Ih.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);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,r){var t=this._validate(e,r,this.minDay,Ih.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,Ih.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});Ih.calendars.islamic=k_});var yI=ne(()=>{var Hh=Va(),Moe=Ga();function S_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}S_.prototype=new Hh.baseCalendar;Moe(S_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Hh.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Hh.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,Hh.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,n=Math.floor((t-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((t-a)/30.6001),o=i-Math.floor(i<14?1:13),l=n-Math.floor(o>2?4716:4715),s=t-a-Math.floor(30.6001*i);return l<=0&&l--,this.newDate(l,o,s)}});Hh.calendars.julian=S_});var _I=ne(()=>{var Ho=Va(),Aoe=Ga();function L_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}L_.prototype=new Ho.baseCalendar;Aoe(L_.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,Ho.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ho.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return t+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&n<0)throw"Invalid Mayan year";r=r*20+n}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ho.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Ho.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ho.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Ho.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,Ho.local.invalidDate);return n.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Ho.local.invalidDate),!0},extraInfo:function(e,r,t){var n=this._validate(e,r,t,Ho.local.invalidDate),a=n.toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=C_(e+8+17*20,365);return[Math.floor(r/20)+1,C_(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[bI(e+20,20),bI(e+4,13)]},toJD:function(e,r,t){var n=this._validate(e,r,t,Ho.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),n=e%20;return this.newDate(r,t,n)}});function C_(e,r){return e-r*Math.floor(e/r)}function bI(e,r){return C_(e-1,r)+1}Ho.calendars.mayan=L_});var wI=ne(()=>{var Uc=Va(),Toe=Ga();function q_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}q_.prototype=new Uc.baseCalendar;var xI=Uc.instance("gregorian");Toe(q_.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 r=this._validate(e,this.minMonth,this.minDay,Uc.local.invalidYear||Uc.regionalOptions[""].invalidYear);return xI.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Uc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,Uc.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,n=1;t>this.daysInMonth(r,n);)t-=this.daysInMonth(r,n),n++;return this.newDate(r,n,t)}});Uc.calendars.nanakshahi=q_});var MI=ne(()=>{var Yc=Va(),koe=Ga();function D_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D_.prototype=new Yc.baseCalendar;koe(D_.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Yc.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Yc.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var n=this._validate(e,r,t,Yc.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=Yc.instance(),i=0,o=r,l=e;this._createMissingCalendarData(e);var s=e-(o>9||o===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(i=t,o--);o!==9;)o<=0&&(o=12,l--),i+=this.NEPALI_CALENDAR_DATA[l][o],o--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[l][0],i<0&&(i+=a.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=Yc.instance(),t=r.fromJD(e),n=t.year(),a=t.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)o++,o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var zv=Va(),Soe=Ga();function py(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}py.prototype=new zv.baseCalendar;Soe(py.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,zv.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,zv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,zv.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e-(e>=0?474:473),i=474+E_(a,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(a/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),n=E_(r,1029983),a=2820;if(n!==1029982){var i=Math.floor(n/366),o=E_(n,366);a=Math.floor((2134*i+2816*o+2815)/1028522)+i+1}var l=a+2820*t+474;l=l<=0?l-1:l;var s=e-this.toJD(l,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}});function E_(e,r){return e-r*Math.floor(e/r)}zv.calendars.persian=py;zv.calendars.jalali=py});var TI=ne(()=>{var Gc=Va(),Coe=Ga(),gy=Gc.instance();function P_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P_.prototype=new Gc.baseCalendar;Coe(P_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Gc.local.invalidYear),t=this._t2gYear(r.year());return gy.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,Gc.local.invalidYear),a=this._t2gYear(n.year());return gy.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Gc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,Gc.local.invalidDate),a=this._t2gYear(n.year());return gy.toJD(a,n.month(),n.day())},fromJD:function(e){var r=gy.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Gc.calendars.taiwan=P_});var kI=ne(()=>{var Vc=Va(),Loe=Ga(),my=Vc.instance();function R_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}R_.prototype=new Vc.baseCalendar;Loe(R_.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(t){var r=this._validate(t,this.minMonth,this.minDay,Vc.local.invalidYear),t=this._t2gYear(r.year());return my.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,Vc.local.invalidYear),a=this._t2gYear(n.year());return my.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Vc.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,Vc.local.invalidDate),a=this._t2gYear(n.year());return my.toJD(a,n.month(),n.day())},fromJD:function(e){var r=my.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});Vc.calendars.thai=R_});var SI=ne(()=>{var Wc=Va(),qoe=Ga();function z_(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z_.prototype=new Wc.baseCalendar;qoe(z_.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 r=this._validate(e,this.minMonth,this.minDay,Wc.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,Wc.local.invalidMonth),n=t.toJD()-24e5+.5,a=0,i=0;in)return xf[a]-xf[a-1];a++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,Wc.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+xf[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,n=0;nr);n++)t++;var a=t+15292,i=Math.floor((a-1)/12),o=i+1,l=a-12*i,s=r-xf[t-1]+1;return this.newDate(o,l,s)},isValid:function(e,r,t){var n=Wc.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,r,t,n){var a=Wc.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});Wc.calendars.ummalqura=z_;var xf=[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 LI=ne((H1e,CI)=>{"use strict";CI.exports=Va();cI();vI();hI();dI();pI();gI();mI();yI();_I();wI();MI();AI();TI();kI();SI()});var NI=ne((B1e,zI)=>{"use strict";var DI=LI(),Bh=pr(),EI=En(),Doe=EI.EPOCHJD,Eoe=EI.ONEDAY,I_={valType:"enumerated",values:Bh.sortObjectKeys(DI.calendars),editType:"calc",dflt:"gregorian"},PI=function(e,r,t,n){var a={};return a[t]=I_,Bh.coerce(e,r,a,t,n)},Poe=function(e,r,t,n){for(var a=0;a{"use strict";FI.exports=NI()});var Hoe=ne((U1e,BI)=>{var HI=nN();HI.register([RF(),oI(),II()]);BI.exports=HI});return Hoe();})(); /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/dist/plotly-gl2d.js b/dist/plotly-gl2d.js index 7cab17b4234..cf48cd33d31 100644 --- a/dist/plotly-gl2d.js +++ b/dist/plotly-gl2d.js @@ -13710,7 +13710,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13734,10 +13734,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54107,8 +54107,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54121,18 +54127,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-gl2d.min.js b/dist/plotly-gl2d.min.js index 45705a7bb5e..e3f513df69e 100644 --- a/dist/plotly-gl2d.min.js +++ b/dist/plotly-gl2d.min.js @@ -12,13 +12,13 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var tM=Object.defineProperty;var Rae=Object.getOwnPropertyDescriptor;var Pae=Object.getOwnPropertyNames;var Nae=Object.prototype.hasOwnProperty;var aM=(e,r)=>()=>(e&&(r=e(e=0)),r);var R=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Iae=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Pae(r))!Nae.call(e,n)&&n!==t&&tM(e,n,{get:()=>r[n],enumerable:!(a=Rae(r,n))||a.enumerable});return e};var Oae=e=>Iae(tM({},"__esModule",{value:!0}),e);var Ry=R(nM=>{"use strict";nM.version="3.0.0-rc.0"});var oM=R((iM,Py)=>{(function(r,t,a){t[r]=t[r]||a(),typeof Py!="undefined"&&Py.exports?Py.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:iM,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(_,w,x,T){return Object.defineProperty(_,w,{value:x,writable:!0,configurable:T!==!1})}}catch(b){r=function(w,x,T){return w[x]=T,w}}a=function(){var _,w,x;function T(S,M){this.fn=S,this.self=M,this.next=void 0}return{add:function(M,k){x=new T(M,k),w?w.next=x:_=x,w=x,x=void 0},drain:function(){var M=_;for(_=w=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(b,_){a.add(b,_),t||(t=i(a.drain))}function l(b){var _,w=typeof b;return b!=null&&(w=="object"||w=="function")&&(_=b.then),typeof _=="function"?_:!1}function s(){for(var b=0;b0&&o(s,w))}catch(x){c.call(new d(w),x)}}}function c(b){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=b,_.state=2,_.chain.length>0&&o(s,_))}function h(b,_,w,x){for(var T=0;T<_.length;T++)(function(M){b.resolve(_[M]).then(function(D){w(M,D)},x)})(T)}function d(b){this.def=b,this.triggered=!1}function p(b){this.promise=b,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(b){if(typeof b!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new p(this);this.then=function(x,T){var S={success:typeof x=="function"?x:!0,failure:typeof T=="function"?T:!1};return S.promise=new this.constructor(function(k,D){if(typeof k!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=k,S.reject=D}),_.chain.push(S),_.state!==0&&o(s,_),S.promise},this.catch=function(x){return this.then(void 0,x)};try{b.call(void 0,function(x){f.call(_,x)},function(x){c.call(_,x)})}catch(w){c.call(_,w)}}var m=r({},"constructor",g,!1);return g.prototype=m,r(m,"__NPO__",0,!1),r(g,"resolve",function(_){var w=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new w(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");T(_)})}),r(g,"reject",function(_){return new this(function(x,T){if(typeof x!="function"||typeof T!="function")throw TypeError("Not a function");T(_)})}),r(g,"all",function(_){var w=this;return n.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):_.length===0?w.resolve([]):new w(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");var M=_.length,k=Array(M),D=0;h(w,_,function(N,q){k[N]=q,++D===M&&T(k)},S)})}),r(g,"race",function(_){var w=this;return n.call(_)!="[object Array]"?w.reject(TypeError("Not an array")):new w(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");h(w,_,function(k,D){T(D)},S)})}),g})});var ta=R((CMe,Ny)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(v){return r.call(v)},a=self.document;function n(v){return v&&(v.ownerDocument||v.document||v).documentElement}function i(v){return v&&(v.ownerDocument&&v.ownerDocument.defaultView||v.document&&v||v.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(v){t=function(y){for(var A=y.length,C=new Array(A);A--;)C[A]=y[A];return C}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(v){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(y,A){l.call(this,y,A+"")},o.setAttributeNS=function(y,A,C){s.call(this,y,A,C+"")},u.setProperty=function(y,A,C){f.call(this,y,A+"",C)}}e.ascending=c;function c(v,y){return vy?1:v>=y?0:NaN}e.descending=function(v,y){return yv?1:y>=v?0:NaN},e.min=function(v,y){var A=-1,C=v.length,E,L;if(arguments.length===1){for(;++A=L){E=L;break}for(;++AL&&(E=L)}else{for(;++A=L){E=L;break}for(;++AL&&(E=L)}return E},e.max=function(v,y){var A=-1,C=v.length,E,L;if(arguments.length===1){for(;++A=L){E=L;break}for(;++AE&&(E=L)}else{for(;++A=L){E=L;break}for(;++AE&&(E=L)}return E},e.extent=function(v,y){var A=-1,C=v.length,E,L,I;if(arguments.length===1){for(;++A=L){E=I=L;break}for(;++AL&&(E=L),I=L){E=I=L;break}for(;++AL&&(E=L),I1)return I/(B-1)},e.deviation=function(){var v=e.variance.apply(this,arguments);return v&&Math.sqrt(v)};function p(v){return{left:function(y,A,C,E){for(arguments.length<3&&(C=0),arguments.length<4&&(E=y.length);C>>1;v(y[L],A)<0?C=L+1:E=L}return C},right:function(y,A,C,E){for(arguments.length<3&&(C=0),arguments.length<4&&(E=y.length);C>>1;v(y[L],A)>0?E=L:C=L+1}return C}}}var g=p(c);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(v){return p(v.length===1?function(y,A){return c(v(y),A)}:v)},e.shuffle=function(v,y,A){(C=arguments.length)<3&&(A=v.length,C<2&&(y=0));for(var C=A-y,E,L;C;)L=Math.random()*C--|0,E=v[C+y],v[C+y]=v[L+y],v[L+y]=E;return v},e.permute=function(v,y){for(var A=y.length,C=new Array(A);A--;)C[A]=v[y[A]];return C},e.pairs=function(v){for(var y=0,A=v.length-1,C,E=v[0],L=new Array(A<0?0:A);y=0;)for(I=v[y],A=I.length;--A>=0;)L[--E]=I[A];return L};var b=Math.abs;e.range=function(v,y,A){if(arguments.length<3&&(A=1,arguments.length<2&&(y=v,v=0)),(y-v)/A===1/0)throw new Error("infinite range");var C=[],E=_(b(A)),L=-1,I;if(v*=E,y*=E,A*=E,A<0)for(;(I=v+A*++L)>y;)C.push(I/E);else for(;(I=v+A*++L)=y.length)return E?E.call(v,B):C?B.sort(C):B;for(var J=-1,Q=B.length,ee=y[W++],Me,qe,ne,he=new x,we;++J=y.length)return F;var W=[],J=A[B++];return F.forEach(function(Q,ee){W.push({key:Q,values:I(ee,B)})}),J?W.sort(function(Q,ee){return J(Q.key,ee.key)}):W}return v.map=function(F,B){return L(B,F,0)},v.entries=function(F){return I(L(e.map,F,0),0)},v.key=function(F){return y.push(F),v},v.sortKeys=function(F){return A[y.length-1]=F,v},v.sortValues=function(F){return C=F,v},v.rollup=function(F){return E=F,v},v},e.set=function(v){var y=new U;if(v)for(var A=0,C=v.length;A=0&&(C=v.slice(A+1),v=v.slice(0,A)),v)return arguments.length<2?this[v].on(C):this[v].on(C,y);if(arguments.length===2){if(y==null)for(v in this)this.hasOwnProperty(v)&&this[v].on(C,null);return this}};function K(v){var y=[],A=new x;function C(){for(var E=y,L=-1,I=E.length,F;++L=0&&(A=v.slice(0,y))!=="xmlns"&&(v=v.slice(y+1)),Te.hasOwnProperty(A)?{space:Te[A],local:v}:v}},Ce.attr=function(v,y){if(arguments.length<2){if(typeof v=="string"){var A=this.node();return v=e.ns.qualify(v),v.local?A.getAttributeNS(v.space,v.local):A.getAttribute(v)}for(y in v)this.each(Pe(y,v[y]));return this}return this.each(Pe(v,y))};function Pe(v,y){v=e.ns.qualify(v);function A(){this.removeAttribute(v)}function C(){this.removeAttributeNS(v.space,v.local)}function E(){this.setAttribute(v,y)}function L(){this.setAttributeNS(v.space,v.local,y)}function I(){var B=y.apply(this,arguments);B==null?this.removeAttribute(v):this.setAttribute(v,B)}function F(){var B=y.apply(this,arguments);B==null?this.removeAttributeNS(v.space,v.local):this.setAttributeNS(v.space,v.local,B)}return y==null?v.local?C:A:typeof y=="function"?v.local?F:I:v.local?L:E}function Ne(v){return v.trim().replace(/\s+/g," ")}Ce.classed=function(v,y){if(arguments.length<2){if(typeof v=="string"){var A=this.node(),C=(v=Ke(v)).length,E=-1;if(y=A.classList){for(;++E=0;)(L=A[C])&&(E&&E!==L.nextSibling&&E.parentNode.insertBefore(L,E),E=L);return this},Ce.sort=function(v){v=Oe.apply(this,arguments);for(var y=-1,A=this.length;++y=y&&(y=E+1);!(B=I[y])&&++y0&&(v=v.slice(0,E));var I=pr.get(v);I&&(v=I,L=mr);function F(){var J=this[C];J&&(this.removeEventListener(v,J,J.$),delete this[C])}function B(){var J=L(y,t(arguments));F.call(this),this.addEventListener(v,this[C]=J,J.$=A),J._=y}function W(){var J=new RegExp("^__on([^.]+)"+e.requote(v)+"$"),Q;for(var ee in this)if(Q=ee.match(J)){var Me=this[ee];this.removeEventListener(Q[1],Me,Me.$),delete this[ee]}}return E?y?B:F:y?V:W}var pr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&pr.forEach(function(v){"on"+v in a&&pr.remove(v)});function Tr(v,y){return function(A){var C=e.event;e.event=A,y[0]=this.__data__;try{v.apply(this,y)}finally{e.event=C}}}function mr(v,y){var A=Tr(v,y);return function(C){var E=this,L=C.relatedTarget;(!L||L!==E&&!(L.compareDocumentPosition(E)&8))&&A.call(E,C)}}var vr,Cr=0;function Ir(v){var y=".dragsuppress-"+ ++Cr,A="click"+y,C=e.select(i(v)).on("touchmove"+y,ve).on("dragstart"+y,ve).on("selectstart"+y,ve);if(vr==null&&(vr="onselectstart"in v?!1:H(v.style,"userSelect")),vr){var E=n(v).style,L=E[vr];E[vr]="none"}return function(I){if(C.on(y,null),vr&&(E[vr]=L),I){var F=function(){C.on(A,null)};C.on(A,function(){ve(),F()},!0),setTimeout(F,0)}}}e.mouse=function(v){return Ze(v,xe())};var Gr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ze(v,y){y.changedTouches&&(y=y.changedTouches[0]);var A=v.ownerSVGElement||v;if(A.createSVGPoint){var C=A.createSVGPoint();if(Gr<0){var E=i(v);if(E.scrollX||E.scrollY){A=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=A[0][0].getScreenCTM();Gr=!(L.f||L.e),A.remove()}}return Gr?(C.x=y.pageX,C.y=y.pageY):(C.x=y.clientX,C.y=y.clientY),C=C.matrixTransform(v.getScreenCTM().inverse()),[C.x,C.y]}var I=v.getBoundingClientRect();return[y.clientX-I.left-v.clientLeft,y.clientY-I.top-v.clientTop]}e.touch=function(v,y,A){if(arguments.length<3&&(A=y,y=xe().changedTouches),y){for(var C=0,E=y.length,L;C0?1:v<0?-1:0}function aa(v,y,A){return(y[0]-v[0])*(A[1]-v[1])-(y[1]-v[1])*(A[0]-v[0])}function Qa(v){return v>1?0:v<-1?Ie:Math.acos(v)}function Ln(v){return v>1?$r:v<-1?-$r:Math.asin(v)}function si(v){return((v=Math.exp(v))-1/v)/2}function Dn(v){return((v=Math.exp(v))+1/v)/2}function Vi(v){return((v=Math.exp(2*v))-1)/(v+1)}function Bn(v){return(v=Math.sin(v/2))*v}var qn=Math.SQRT2,yi=2,_t=4;e.interpolateZoom=function(v,y){var A=v[0],C=v[1],E=v[2],L=y[0],I=y[1],F=y[2],B=L-A,W=I-C,J=B*B+W*W,Q,ee;if(J0&&(zr=zr.transition().duration(I)),zr.call(Re.event)}function it(){he&&he.domain(ne.range().map(function(zr){return(zr-v.x)/v.k}).map(ne.invert)),Fe&&Fe.domain(we.range().map(function(zr){return(zr-v.y)/v.k}).map(we.invert))}function ot(zr){F++||zr({type:"zoomstart"})}function qt(zr){it(),zr({type:"zoom",scale:v.k,translate:[v.x,v.y]})}function ct(zr){--F||(zr({type:"zoomend"}),A=null)}function kt(){var zr=this,Ft=qe.of(zr,arguments),Ut=0,ua=e.select(i(zr)).on(W,Hn).on(J,Qn),Ba=me(e.mouse(zr)),cn=Ir(zr);Xv.call(zr),ot(Ft);function Hn(){Ut=1,Pr(e.mouse(zr),Ba),qt(Ft)}function Qn(){ua.on(W,null).on(J,null),cn(Ut),ct(Ft)}}function ha(){var zr=this,Ft=qe.of(zr,arguments),Ut={},ua=0,Ba,cn=".zoom-"+e.event.changedTouches[0].identifier,Hn="touchmove"+cn,Qn="touchend"+cn,gi=[],G=e.select(zr),ie=Ir(zr);We(),ot(Ft),G.on(B,null).on(ee,We);function ue(){var $e=e.touches(zr);return Ba=v.k,$e.forEach(function(br){br.identifier in Ut&&(Ut[br.identifier]=me(br))}),$e}function We(){var $e=e.event.target;e.select($e).on(Hn,Qe).on(Qn,ar),gi.push($e);for(var br=e.event.changedTouches,Dr=0,qr=br.length;Dr1){var ft=Fr[0],Zr=Fr[1],hr=ft[0]-Zr[0],ze=ft[1]-Zr[1];ua=hr*hr+ze*ze}}function Qe(){var $e=e.touches(zr),br,Dr,qr,Fr;Xv.call(zr);for(var xt=0,ft=$e.length;xt1?1:y,A=A<0?0:A>1?1:A,E=A<=.5?A*(1+y):A+y-A*y,C=2*A-E;function L(F){return F>360?F-=360:F<0&&(F+=360),F<60?C+(E-C)*F/60:F<180?E:F<240?C+(E-C)*(240-F)/60:C}function I(F){return Math.round(L(F)*255)}return new ui(I(v+120),I(v),I(v-120))}e.hcl=on;function on(v,y,A){return this instanceof on?(this.h=+v,this.c=+y,void(this.l=+A)):arguments.length<2?v instanceof on?new on(v.h,v.c,v.l):v instanceof xn?As(v.l,v.a,v.b):As((v=jr((v=e.rgb(v)).r,v.g,v.b)).l,v.a,v.b):new on(v,y,A)}var Yi=on.prototype=new Xa;Yi.brighter=function(v){return new on(this.h,this.c,Math.min(100,this.l+Aa*(arguments.length?v:1)))},Yi.darker=function(v){return new on(this.h,this.c,Math.max(0,this.l-Aa*(arguments.length?v:1)))},Yi.rgb=function(){return Wi(this.h,this.c,this.l).rgb()};function Wi(v,y,A){return isNaN(v)&&(v=0),isNaN(y)&&(y=0),new xn(A,Math.cos(v*=St)*y,Math.sin(v)*y)}e.lab=xn;function xn(v,y,A){return this instanceof xn?(this.l=+v,this.a=+y,void(this.b=+A)):arguments.length<2?v instanceof xn?new xn(v.l,v.a,v.b):v instanceof on?Wi(v.h,v.c,v.l):jr((v=ui(v)).r,v.g,v.b):new xn(v,y,A)}var Aa=18,Un=.95047,_s=1,ws=1.08883,Bl=xn.prototype=new Xa;Bl.brighter=function(v){return new xn(Math.min(100,this.l+Aa*(arguments.length?v:1)),this.a,this.b)},Bl.darker=function(v){return new xn(Math.max(0,this.l-Aa*(arguments.length?v:1)),this.a,this.b)},Bl.rgb=function(){return _v(this.l,this.a,this.b)};function _v(v,y,A){var C=(v+16)/116,E=C+y/500,L=C-A/200;return E=Bf(E)*Un,C=Bf(C)*_s,L=Bf(L)*ws,new ui(ol(3.2404542*E-1.5371385*C-.4985314*L),ol(-.969266*E+1.8760108*C+.041556*L),ol(.0556434*E-.2040259*C+1.0572252*L))}function As(v,y,A){return v>0?new on(Math.atan2(A,y)*ea,Math.sqrt(y*y+A*A),v):new on(NaN,NaN,v)}function Bf(v){return v>.206893034?v*v*v:(v-4/29)/7.787037}function Uf(v){return v>.008856?Math.pow(v,1/3):7.787037*v+4/29}function ol(v){return Math.round(255*(v<=.00304?12.92*v:1.055*Math.pow(v,1/2.4)-.055))}e.rgb=ui;function ui(v,y,A){return this instanceof ui?(this.r=~~v,this.g=~~y,void(this.b=~~A)):arguments.length<2?v instanceof ui?new ui(v.r,v.g,v.b):jt(""+v,ui,en):new ui(v,y,A)}function ll(v){return new ui(v>>16,v>>8&255,v&255)}function Ts(v){return ll(v)+""}var go=ui.prototype=new Xa;go.brighter=function(v){v=Math.pow(.7,arguments.length?v:1);var y=this.r,A=this.g,C=this.b,E=30;return!y&&!A&&!C?new ui(E,E,E):(y&&y>4,C=C>>4|C,E=B&240,E=E>>4|E,L=B&15,L=L<<4|L):v.length===7&&(C=(B&16711680)>>16,E=(B&65280)>>8,L=B&255)),y(C,E,L))}function va(v,y,A){var C=Math.min(v/=255,y/=255,A/=255),E=Math.max(v,y,A),L=E-C,I,F,B=(E+C)/2;return L?(F=B<.5?L/(E+C):L/(2-E-C),v==E?I=(y-A)/L+(y0&&B<1?0:I),new Sa(I,F,B)}function jr(v,y,A){v=Gn(v),y=Gn(y),A=Gn(A);var C=Uf((.4124564*v+.3575761*y+.1804375*A)/Un),E=Uf((.2126729*v+.7151522*y+.072175*A)/_s),L=Uf((.0193339*v+.119192*y+.9503041*A)/ws);return xn(116*E-16,500*(C-E),200*(E-L))}function Gn(v){return(v/=255)<=.04045?v/12.92:Math.pow((v+.055)/1.055,2.4)}function Ea(v){var y=parseFloat(v);return v.charAt(v.length-1)==="%"?Math.round(y*2.55):y}var Fn=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});Fn.forEach(function(v,y){Fn.set(v,ll(y))});function Vt(v){return typeof v=="function"?v:function(){return v}}e.functor=Vt,e.xhr=bo($);function bo(v){return function(y,A,C){return arguments.length===2&&typeof A=="function"&&(C=A,A=null),Ul(y,A,v,C)}}function Ul(v,y,A,C){var E={},L=e.dispatch("beforesend","progress","load","error"),I={},F=new XMLHttpRequest,B=null;self.XDomainRequest&&!("withCredentials"in F)&&/^(http(s)?:)?\/\//.test(v)&&(F=new XDomainRequest),"onload"in F?F.onload=F.onerror=W:F.onreadystatechange=function(){F.readyState>3&&W()};function W(){var J=F.status,Q;if(!J&&E5(F)||J>=200&&J<300||J===304){try{Q=A.call(E,F)}catch(ee){L.error.call(E,ee);return}L.load.call(E,Q)}else L.error.call(E,F)}return F.onprogress=function(J){var Q=e.event;e.event=J;try{L.progress.call(E,F)}finally{e.event=Q}},E.header=function(J,Q){return J=(J+"").toLowerCase(),arguments.length<2?I[J]:(Q==null?delete I[J]:I[J]=Q+"",E)},E.mimeType=function(J){return arguments.length?(y=J==null?null:J+"",E):y},E.responseType=function(J){return arguments.length?(B=J,E):B},E.response=function(J){return A=J,E},["get","post"].forEach(function(J){E[J]=function(){return E.send.apply(E,[J].concat(t(arguments)))}}),E.send=function(J,Q,ee){if(arguments.length===2&&typeof Q=="function"&&(ee=Q,Q=null),F.open(J,v,!0),y!=null&&!("accept"in I)&&(I.accept=y+",*/*"),F.setRequestHeader)for(var Me in I)F.setRequestHeader(Me,I[Me]);return y!=null&&F.overrideMimeType&&F.overrideMimeType(y),B!=null&&(F.responseType=B),ee!=null&&E.on("error",ee).on("load",function(qe){ee(null,qe)}),L.beforesend.call(E,F),F.send(Q==null?null:Q),E},E.abort=function(){return F.abort(),E},e.rebind(E,L,"on"),C==null?E:E.get(Gl(C))}function Gl(v){return v.length===1?function(y,A){v(y==null?A:null)}:v}function E5(v){var y=v.responseType;return y&&y!=="text"?v.response:v.responseText}e.dsv=function(v,y){var A=new RegExp('["'+v+` -]`),C=v.charCodeAt(0);function E(W,J,Q){arguments.length<3&&(Q=J,J=null);var ee=Ul(W,y,J==null?L:I(J),Q);return ee.row=function(Me){return arguments.length?ee.response((J=Me)==null?L:I(Me)):J},ee}function L(W){return E.parse(W.responseText)}function I(W){return function(J){return E.parse(J.responseText,W)}}E.parse=function(W,J){var Q;return E.parseRows(W,function(ee,Me){if(Q)return Q(ee,Me-1);var qe=function(ne){for(var he={},we=ee.length,Fe=0;Fe=qe)return ee;if(Fe)return Fe=!1,Q;var cr=ne;if(W.charCodeAt(cr)===34){for(var Mr=cr;Mr++24?(isFinite(y)&&(clearTimeout(Do),Do=setTimeout(ks,y)),Ms=0):(Ms=1,wv(ks))}e.timer.flush=function(){Gf(),td()};function Gf(){for(var v=Date.now(),y=Pi;y;)v>=y.t&&y.c(v-y.t)&&(y.c=null),y=y.n;return v}function td(){for(var v,y=Pi,A=1/0;y;)y.c?(y.t=0;--F)ne.push(E[W[Q[F]][2]]);for(F=+Me;F1&&aa(v[A[C-2]],v[A[C-1]],v[E])<=0;)--C;A[C++]=E}return A.slice(0,C)}function L5(v,y){return v[0]-y[0]||v[1]-y[1]}e.geom.polygon=function(v){return re(v,Av),v};var Av=e.geom.polygon.prototype=[];Av.area=function(){for(var v=-1,y=this.length,A,C=this[y-1],E=0;++vye)F=F.L;else if(I=y-Nm(F,A),I>ye){if(!F.R){C=F;break}F=F.R}else{L>-ye?(C=F.P,E=F):I>-ye?(C=F,E=F.N):C=E=F;break}var B=nd(v);if(xo.insert(C,B),!(!C&&!E)){if(C===E){mu(C),E=nd(C.site),xo.insert(B,E),B.edge=E.edge=Wf(C.site,B.site),qo(C),qo(E);return}if(!E){B.edge=Wf(C.site,B.site);return}mu(C),mu(E);var W=C.site,J=W.x,Q=W.y,ee=v.x-J,Me=v.y-Q,qe=E.site,ne=qe.x-J,he=qe.y-Q,we=2*(ee*he-Me*ne),Fe=ee*ee+Me*Me,Re=ne*ne+he*he,me={x:(he*Fe-Me*Re)/we+J,y:(ee*Re-ne*Fe)/we+Q};yu(E.edge,W,qe,me),B.edge=Wf(W,v,null,me),E.edge=Wf(v,qe,null,me),qo(C),qo(E)}}function id(v,y){var A=v.site,C=A.x,E=A.y,L=E-y;if(!L)return C;var I=v.P;if(!I)return-1/0;A=I.site;var F=A.x,B=A.y,W=B-y;if(!W)return F;var J=F-C,Q=1/L-1/W,ee=J/W;return Q?(-ee+Math.sqrt(ee*ee-2*Q*(J*J/(-2*W)-B+W/2+E-L/2)))/Q+C:(C+F)/2}function Nm(v,y){var A=v.N;if(A)return id(A,y);var C=v.site;return C.y===y?C.x:1/0}function od(v){this.site=v,this.edges=[]}od.prototype.prepare=function(){for(var v=this.edges,y=v.length,A;y--;)A=v[y].edge,(!A.b||!A.a)&&v.splice(y,1);return v.sort(kv),v.length};function pu(v){for(var y=v[0][0],A=v[1][0],C=v[0][1],E=v[1][1],L,I,F,B,W=sl,J=W.length,Q,ee,Me,qe,ne,he;J--;)if(Q=W[J],!(!Q||!Q.prepare()))for(Me=Q.edges,qe=Me.length,ee=0;eeye||b(B-I)>ye)&&(Me.splice(ee,0,new Cv(F5(Q.site,he,b(F-y)ye?{x:y,y:b(L-y)ye?{x:b(I-E)ye?{x:A,y:b(L-A)ye?{x:b(I-C)=-Ge)){var ee=B*B+W*W,Me=J*J+he*he,qe=(he*ee-W*Me)/Q,ne=(B*Me-J*ee)/Q,he=ne+F,we=Mv.pop()||new ld;we.arc=v,we.site=E,we.x=qe+I,we.y=he+Math.sqrt(qe*qe+ne*ne),we.cy=he,v.circle=we;for(var Fe=null,Re=Cs._;Re;)if(we.y0)){if(ne/=Me,Me<0){if(ne0){if(ne>ee)return;ne>Q&&(Q=ne)}if(ne=A-F,!(!Me&&ne<0)){if(ne/=Me,Me<0){if(ne>ee)return;ne>Q&&(Q=ne)}else if(Me>0){if(ne0)){if(ne/=qe,qe<0){if(ne0){if(ne>ee)return;ne>Q&&(Q=ne)}if(ne=C-B,!(!qe&&ne<0)){if(ne/=qe,qe<0){if(ne>ee)return;ne>Q&&(Q=ne)}else if(qe>0){if(ne0&&(E.a={x:F+Q*Me,y:B+Q*qe}),ee<1&&(E.b={x:F+ee*Me,y:B+ee*qe}),E}}}}}}function q5(v){for(var y=Vl,A=D5(v[0][0],v[0][1],v[1][0],v[1][1]),C=y.length,E;C--;)E=y[C],(!sd(E,v)||!A(E)||b(E.a.x-E.b.x)=L)return;if(J>ee){if(!C)C={x:qe,y:I};else if(C.y>=F)return;A={x:qe,y:F}}else{if(!C)C={x:qe,y:F};else if(C.y1)if(J>ee){if(!C)C={x:(I-we)/he,y:I};else if(C.y>=F)return;A={x:(F-we)/he,y:F}}else{if(!C)C={x:(F-we)/he,y:F};else if(C.y=L)return;A={x:L,y:he*L+we}}else{if(!C)C={x:L,y:he*L+we};else if(C.x=J&&we.x<=ee&&we.y>=Q&&we.y<=Me?[[J,Me],[ee,Me],[ee,Q],[J,Q]]:[];Fe.point=B[ne]}),W}function F(B){return B.map(function(W,J){return{x:Math.round(C(W,J)/ye)*ye,y:Math.round(E(W,J)/ye)*ye,i:J}})}return I.links=function(B){return bu(F(B)).edges.filter(function(W){return W.l&&W.r}).map(function(W){return{source:B[W.l.i],target:B[W.r.i]}})},I.triangles=function(B){var W=[];return bu(F(B)).cells.forEach(function(J,Q){for(var ee=J.site,Me=J.edges.sort(kv),qe=-1,ne=Me.length,he,we,Fe=Me[ne-1].edge,Re=Fe.l===ee?Fe.r:Fe.l;++qeRe&&(Re=J.x),J.y>me&&(me=J.y),Me.push(J.x),qe.push(J.y);else for(ne=0;neRe&&(Re=cr),Mr>me&&(me=Mr),Me.push(cr),qe.push(Mr)}var Pr=Re-we,Yr=me-Fe;Pr>Yr?me=Fe+Pr:Re=we+Yr;function it(ct,kt,ha,tn,xa,zr,Ft,Ut){if(!(isNaN(ha)||isNaN(tn)))if(ct.leaf){var ua=ct.x,Ba=ct.y;if(ua!=null)if(b(ua-ha)+b(Ba-tn)<.01)ot(ct,kt,ha,tn,xa,zr,Ft,Ut);else{var cn=ct.point;ct.x=ct.y=ct.point=null,ot(ct,cn,ua,Ba,xa,zr,Ft,Ut),ot(ct,kt,ha,tn,xa,zr,Ft,Ut)}else ct.x=ha,ct.y=tn,ct.point=kt}else ot(ct,kt,ha,tn,xa,zr,Ft,Ut)}function ot(ct,kt,ha,tn,xa,zr,Ft,Ut){var ua=(xa+Ft)*.5,Ba=(zr+Ut)*.5,cn=ha>=ua,Hn=tn>=Ba,Qn=Hn<<1|cn;ct.leaf=!1,ct=ct.nodes[Qn]||(ct.nodes[Qn]=zm()),cn?xa=ua:Ft=ua,Hn?zr=Ba:Ut=Ba,it(ct,kt,ha,tn,xa,zr,Ft,Ut)}var qt=zm();if(qt.add=function(ct){it(qt,ct,+Q(ct,++ne),+ee(ct,ne),we,Fe,Re,me)},qt.visit=function(ct){Zf(ct,qt,we,Fe,Re,me)},qt.find=function(ct){return Bm(qt,ct[0],ct[1],we,Fe,Re,me)},ne=-1,y==null){for(;++neL||ee>I||Me=cr,Yr=A>=Mr,it=Yr<<1|Pr,ot=it+4;itA&&(L=y.slice(A,L),F[I]?F[I]+=L:F[++I]=L),(C=C[0])===(E=E[0])?F[I]?F[I]+=E:F[++I]=E:(F[++I]=null,B.push({i:I,x:ji(C,E)})),A=Lv.lastIndex;return A=0&&!(C=e.interpolators[A](v,y)););return C}e.interpolators=[function(v,y){var A=typeof y;return(A==="string"?Fn.has(y.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(y)?Ls:Xi:y instanceof Xa?Ls:Array.isArray(y)?Jf:A==="object"&&isNaN(y)?Um:ji)(v,y)}],e.interpolateArray=Jf;function Jf(v,y){var A=[],C=[],E=v.length,L=y.length,I=Math.min(v.length,y.length),F;for(F=0;F=0?v.slice(0,y):v,C=y>=0?v.slice(y+1):"in";return A=Gm.get(A)||ud,C=Hm.get(C)||$,O5(C(A.apply(null,r.call(arguments,1))))};function O5(v){return function(y){return y<=0?0:y>=1?1:v(y)}}function Ds(v){return function(y){return 1-v(1-y)}}function Rn(v){return function(y){return .5*(y<.5?v(2*y):2-v(2-2*y))}}function Vm(v){return v*v}function Ym(v){return v*v*v}function qs(v){if(v<=0)return 0;if(v>=1)return 1;var y=v*v,A=y*v;return 4*(v<.5?A:3*(v-y)+A-.75)}function Wm(v){return function(y){return Math.pow(y,v)}}function jm(v){return 1-Math.cos(v*$r)}function z5(v){return Math.pow(2,10*(v-1))}function B5(v){return 1-Math.sqrt(1-v*v)}function U5(v,y){var A;return arguments.length<2&&(y=.45),arguments.length?A=y/Wr*Math.asin(1/v):(v=1,A=y/4),function(C){return 1+v*Math.pow(2,-10*C)*Math.sin((C-A)*Wr/y)}}function G5(v){return v||(v=1.70158),function(y){return y*y*((v+1)*y-v)}}function fd(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375}e.interpolateHcl=Xm;function Xm(v,y){v=e.hcl(v),y=e.hcl(y);var A=v.h,C=v.c,E=v.l,L=y.h-A,I=y.c-C,F=y.l-E;return isNaN(I)&&(I=0,C=isNaN(C)?y.c:C),isNaN(L)?(L=0,A=isNaN(A)?y.h:A):L>180?L-=360:L<-180&&(L+=360),function(B){return Wi(A+L*B,C+I*B,E+F*B)+""}}e.interpolateHsl=H5;function H5(v,y){v=e.hsl(v),y=e.hsl(y);var A=v.h,C=v.s,E=v.l,L=y.h-A,I=y.s-C,F=y.l-E;return isNaN(I)&&(I=0,C=isNaN(C)?y.s:C),isNaN(L)?(L=0,A=isNaN(A)?y.h:A):L>180?L-=360:L<-180&&(L+=360),function(B){return en(A+L*B,C+I*B,E+F*B)+""}}e.interpolateLab=Zm;function Zm(v,y){v=e.lab(v),y=e.lab(y);var A=v.l,C=v.a,E=v.b,L=y.l-A,I=y.a-C,F=y.b-E;return function(B){return _v(A+L*B,C+I*B,E+F*B)+""}}e.interpolateRound=cd;function cd(v,y){return y-=v,function(A){return Math.round(v+y*A)}}e.transform=function(v){var y=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(A){if(A!=null){y.setAttribute("transform",A);var C=y.transform.baseVal.consolidate()}return new Jm(C?C.matrix:Dv)})(v)};function Jm(v){var y=[v.a,v.b],A=[v.c,v.d],C=$m(y),E=$f(y,A),L=$m(jl(A,y,-E))||0;y[0]*A[1]180?y+=360:y-v>180&&(v+=360),C.push({i:A.push(Fs(A)+"rotate(",null,")")-2,x:ji(v,y)})):y&&A.push(Fs(A)+"rotate("+y+")")}function ey(v,y,A,C){v!==y?C.push({i:A.push(Fs(A)+"skewX(",null,")")-2,x:ji(v,y)}):y&&A.push(Fs(A)+"skewX("+y+")")}function ry(v,y,A,C){if(v[0]!==y[0]||v[1]!==y[1]){var E=A.push(Fs(A)+"scale(",null,",",null,")");C.push({i:E-4,x:ji(v[0],y[0])},{i:E-2,x:ji(v[1],y[1])})}else(y[0]!==1||y[1]!==1)&&A.push(Fs(A)+"scale("+y+")")}function vd(v,y){var A=[],C=[];return v=e.transform(v),y=e.transform(y),Km(v.translate,y.translate,A,C),Qm(v.rotate,y.rotate,A,C),ey(v.skew,y.skew,A,C),ry(v.scale,y.scale,A,C),v=y=null,function(E){for(var L=-1,I=C.length,F;++L0?L=me:(A.c=null,A.t=NaN,A=null,y.end({type:"end",alpha:L=0})):me>0&&(y.start({type:"start",alpha:L=me}),A=Ss(v.tick)),v):L},v.start=function(){var me,cr=Me.length,Mr=qe.length,Pr=C[0],Yr=C[1],it,ot;for(me=0;me=0;)L.push(J=W[B]),J.parent=F,J.depth=F.depth+1;A&&(F.value=0),F.children=W}else A&&(F.value=+A.call(C,F,F.depth)||0),delete F.children;return Fo(E,function(Q){var ee,Me;v&&(ee=Q.children)&&ee.sort(v),A&&(Me=Q.parent)&&(Me.value+=Q.value)}),I}return C.sort=function(E){return arguments.length?(v=E,C):v},C.children=function(E){return arguments.length?(y=E,C):y},C.value=function(E){return arguments.length?(A=E,C):A},C.revalue=function(E){return A&&(Kf(E,function(L){L.children&&(L.value=0)}),Fo(E,function(L){var I;L.children||(L.value=+A.call(C,L,L.depth)||0),(I=L.parent)&&(I.value+=L.value)})),E},C};function _u(v,y){return e.rebind(v,y,"sort","children","value"),v.nodes=v,v.links=X5,v}function Kf(v,y){for(var A=[v];(v=A.pop())!=null;)if(y(v),(E=v.children)&&(C=E.length))for(var C,E;--C>=0;)A.push(E[C])}function Fo(v,y){for(var A=[v],C=[];(v=A.pop())!=null;)if(C.push(v),(I=v.children)&&(L=I.length))for(var E=-1,L,I;++EE&&(E=F),C.push(F)}for(I=0;IC&&(A=y,C=E);return A}function $5(v){return v.reduce(K5,0)}function K5(v,y){return v+y[1]}e.layout.histogram=function(){var v=!0,y=Number,A=e_,C=Q5;function E(L,ee){for(var F=[],B=L.map(y,this),W=A.call(this,B,ee),J=C.call(this,W,B,ee),Q,ee=-1,Me=B.length,qe=J.length-1,ne=v?1:1/Me,he;++ee0)for(ee=-1;++ee=W[0]&&he<=W[1]&&(Q=F[e.bisect(J,he,1,qe)-1],Q.y+=ne,Q.push(L[ee]));return F}return E.value=function(L){return arguments.length?(y=L,E):y},E.range=function(L){return arguments.length?(A=Vt(L),E):A},E.bins=function(L){return arguments.length?(C=typeof L=="number"?function(I){return cy(I,L)}:Vt(L),E):C},E.frequency=function(L){return arguments.length?(v=!!L,E):v},E};function Q5(v,y){return cy(v,Math.ceil(Math.log(y.length)/Math.LN2+1))}function cy(v,y){for(var A=-1,C=+v[0],E=(v[1]-C)/y,L=[];++A<=y;)L[A]=E*A+C;return L}function e_(v){return[e.min(v),e.max(v)]}e.layout.pack=function(){var v=e.layout.hierarchy().sort(md),y=0,A=[1,1],C;function E(L,I){var F=v.call(this,L,I),B=F[0],W=A[0],J=A[1],Q=C==null?Math.sqrt:typeof C=="function"?C:function(){return C};if(B.x=B.y=0,Fo(B,function(Me){Me.r=+Q(Me.value)}),Fo(B,hy),y){var ee=y*(C?1:Math.max(2*B.r/W,2*B.r/J))/2;Fo(B,function(Me){Me.r+=ee}),Fo(B,hy),Fo(B,function(Me){Me.r-=ee})}return dy(B,W/2,J/2,C?1:1/Math.max(2*B.r/W,2*B.r/J)),F}return E.size=function(L){return arguments.length?(A=L,E):A},E.radius=function(L){return arguments.length?(C=L==null||typeof L=="function"?L:+L,E):C},E.padding=function(L){return arguments.length?(y=+L,E):y},_u(E,v)};function md(v,y){return v.value-y.value}function yd(v,y){var A=v._pack_next;v._pack_next=y,y._pack_prev=v,y._pack_next=A,A._pack_prev=y}function gd(v,y){v._pack_next=y,y._pack_prev=v}function vy(v,y){var A=y.x-v.x,C=y.y-v.y,E=v.r+y.r;return .999*E*E>A*A+C*C}function hy(v){if(!(y=v.children)||!(ee=y.length))return;var y,A=1/0,C=-1/0,E=1/0,L=-1/0,I,F,B,W,J,Q,ee;function Me(me){A=Math.min(me.x-me.r,A),C=Math.max(me.x+me.r,C),E=Math.min(me.y-me.r,E),L=Math.max(me.y+me.r,L)}if(y.forEach(r_),I=y[0],I.x=-I.r,I.y=0,Me(I),ee>1&&(F=y[1],F.x=F.r,F.y=0,Me(F),ee>2))for(B=y[2],a_(I,F,B),Me(B),yd(I,B),I._pack_prev=B,yd(B,F),F=I._pack_next,W=3;Whe.x&&(he=cr),cr.depth>we.depth&&(we=cr)});var Fe=y(ne,he)/2-ne.x,Re=A[0]/(he.x+y(he,ne)/2+Fe),me=A[1]/(we.depth||1);Kf(Me,function(cr){cr.x=(cr.x+Fe)*Re,cr.y=cr.depth*me})}return ee}function L(J){for(var Q={A:null,children:[J]},ee=[Q],Me;(Me=ee.pop())!=null;)for(var qe=Me.children,ne,he=0,we=qe.length;he0&&(n_(gy(ne,J,ee),J,cr),we+=cr,Fe+=cr),Re+=ne.m,we+=Me.m,me+=he.m,Fe+=qe.m;ne&&!yy(qe)&&(qe.t=ne,qe.m+=Re-Fe),Me&&!my(he)&&(he.t=Me,he.m+=we-me,ee=J)}return ee}function W(J){J.x*=A[0],J.y=J.depth*A[1]}return E.separation=function(J){return arguments.length?(y=J,E):y},E.size=function(J){return arguments.length?(C=(A=J)==null?W:null,E):C?null:A},E.nodeSize=function(J){return arguments.length?(C=(A=J)==null?null:W,E):C?A:null},_u(E,v)};function py(v,y){return v.parent==y.parent?1:2}function my(v){var y=v.children;return y.length?y[0]:v.t}function yy(v){var y=v.children,A;return(A=y.length)?y[A-1]:v.t}function n_(v,y,A){var C=A/(y.i-v.i);y.c-=C,y.s+=A,v.c+=C,y.z+=A,y.m+=A}function bd(v){for(var y=0,A=0,C=v.children,E=C.length,L;--E>=0;)L=C[E],L.z+=y,L.m+=y,y+=L.s+(A+=L.c)}function gy(v,y,A){return v.a.parent===y.parent?v.a:A}e.layout.cluster=function(){var v=e.layout.hierarchy().sort(null).value(null),y=py,A=[1,1],C=!1;function E(L,I){var F=v.call(this,L,I),B=F[0],W,J=0;Fo(B,function(ne){var he=ne.children;he&&he.length?(ne.x=by(he),ne.y=Ro(he)):(ne.x=W?J+=y(ne,W):0,ne.y=0,W=ne)});var Q=xy(B),ee=_y(B),Me=Q.x-y(Q,ee)/2,qe=ee.x+y(ee,Q)/2;return Fo(B,C?function(ne){ne.x=(ne.x-B.x)*A[0],ne.y=(B.y-ne.y)*A[1]}:function(ne){ne.x=(ne.x-Me)/(qe-Me)*A[0],ne.y=(1-(B.y?ne.y/B.y:1))*A[1]}),F}return E.separation=function(L){return arguments.length?(y=L,E):y},E.size=function(L){return arguments.length?(C=(A=L)==null,E):C?null:A},E.nodeSize=function(L){return arguments.length?(C=(A=L)!=null,E):C?A:null},_u(E,v)};function Ro(v){return 1+e.max(v,function(y){return y.y})}function by(v){return v.reduce(function(y,A){return y+A.x},0)/v.length}function xy(v){var y=v.children;return y&&y.length?xy(y[0]):v}function _y(v){var y=v.children,A;return y&&(A=y.length)?_y(y[A-1]):v}e.layout.treemap=function(){var v=e.layout.hierarchy(),y=Math.round,A=[1,1],C=null,E=xd,L=!1,I,F="squarify",B=.5*(1+Math.sqrt(5));function W(ne,he){for(var we=-1,Fe=ne.length,Re,me;++we0;)Fe.push(me=Re[Yr-1]),Fe.area+=me.area,F!=="squarify"||(Mr=ee(Fe,Pr))<=cr?(Re.pop(),cr=Mr):(Fe.area-=Fe.pop().area,Me(Fe,Pr,we,!1),Pr=Math.min(we.dx,we.dy),Fe.length=Fe.area=0,cr=1/0);Fe.length&&(Me(Fe,Pr,we,!0),Fe.length=Fe.area=0),he.forEach(J)}}function Q(ne){var he=ne.children;if(he&&he.length){var we=E(ne),Fe=he.slice(),Re,me=[];for(W(Fe,we.dx*we.dy/ne.value),me.area=0;Re=Fe.pop();)me.push(Re),me.area+=Re.area,Re.z!=null&&(Me(me,Re.z?we.dx:we.dy,we,!Fe.length),me.length=me.area=0);he.forEach(Q)}}function ee(ne,he){for(var we=ne.area,Fe,Re=0,me=1/0,cr=-1,Mr=ne.length;++crRe&&(Re=Fe));return we*=we,he*=he,we?Math.max(he*Re*B/we,we/(he*me*B)):1/0}function Me(ne,he,we,Fe){var Re=-1,me=ne.length,cr=we.x,Mr=we.y,Pr=he?y(ne.area/he):0,Yr;if(he==we.dx){for((Fe||Pr>we.dy)&&(Pr=we.dy);++Rewe.dx)&&(Pr=we.dx);++Re1);return v+y*C*Math.sqrt(-2*Math.log(L)/L)}},logNormal:function(){var v=e.random.normal.apply(e,arguments);return function(){return Math.exp(v())}},bates:function(v){var y=e.random.irwinHall(v);return function(){return y()/v}},irwinHall:function(v){return function(){for(var y=0,A=0;A2?Tu:i_,W=C?ay:ty;return E=B(v,y,W,A),L=B(y,v,W,Wl),F}function F(B){return E(B)}return F.invert=function(B){return L(B)},F.domain=function(B){return arguments.length?(v=B.map(Number),I()):v},F.range=function(B){return arguments.length?(y=B,I()):y},F.rangeRound=function(B){return F.range(B).interpolate(cd)},F.clamp=function(B){return arguments.length?(C=B,I()):C},F.interpolate=function(B){return arguments.length?(A=B,I()):A},F.ticks=function(B){return ec(v,B)},F.tickFormat=function(B,W){return d3_scale_linearTickFormat(v,B,W)},F.nice=function(B){return _d(v,B),I()},F.copy=function(){return Ay(v,y,A,C)},I()}function Rs(v,y){return e.rebind(v,y,"range","rangeRound","interpolate","clamp")}function _d(v,y){return wu(v,Pn(Xl(v,y)[2])),wu(v,Pn(Xl(v,y)[2])),v}function Xl(v,y){y==null&&(y=10);var A=Pv(v),C=A[1]-A[0],E=Math.pow(10,Math.floor(Math.log(C/y)/Math.LN10)),L=y/C*E;return L<=.15?E*=10:L<=.35?E*=5:L<=.75&&(E*=2),A[0]=Math.ceil(A[0]/E)*E,A[1]=Math.floor(A[1]/E)*E+E*.5,A[2]=E,A}function ec(v,y){return e.range.apply(e,Xl(v,y))}var wd={s:1,g:1,p:1,r:1,e:1};function Iv(v){return-Math.floor(Math.log(v)/Math.LN10+.01)}function Ty(v,y){var A=Iv(y[2]);return v in wd?Math.abs(A-Iv(Math.max(b(y[0]),b(y[1]))))+ +(v!=="e"):A-(v==="%")*2}e.scale.log=function(){return Ov(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Ov(v,y,A,C){function E(F){return(A?Math.log(F<0?0:F):-Math.log(F>0?0:-F))/Math.log(y)}function L(F){return A?Math.pow(y,F):-Math.pow(y,-F)}function I(F){return v(E(F))}return I.invert=function(F){return L(v.invert(F))},I.domain=function(F){return arguments.length?(A=F[0]>=0,v.domain((C=F.map(Number)).map(E)),I):C},I.base=function(F){return arguments.length?(y=+F,v.domain(C.map(E)),I):y},I.nice=function(){var F=wu(C.map(E),A?Math:zv);return v.domain(F),C=F.map(L),I},I.ticks=function(){var F=Pv(C),B=[],W=F[0],J=F[1],Q=Math.floor(E(W)),ee=Math.ceil(E(J)),Me=y%1?2:y;if(isFinite(ee-Q)){if(A){for(;Q0;qe--)B.push(L(Q)*qe);for(Q=0;B[Q]J;ee--);B=B.slice(Q,ee)}return B},I.copy=function(){return Ov(v.copy(),y,A,C)},Rs(I,v)}var zv={floor:function(v){return-Math.ceil(-v)},ceil:function(v){return-Math.floor(-v)}};e.scale.pow=function(){return Ad(e.scale.linear(),1,[0,1])};function Ad(v,y,A){var C=rc(y),E=rc(1/y);function L(I){return v(C(I))}return L.invert=function(I){return E(v.invert(I))},L.domain=function(I){return arguments.length?(v.domain((A=I.map(Number)).map(C)),L):A},L.ticks=function(I){return ec(A,I)},L.tickFormat=function(I,F){return d3_scale_linearTickFormat(A,I,F)},L.nice=function(I){return L.domain(_d(A,I))},L.exponent=function(I){return arguments.length?(C=rc(y=I),E=rc(1/y),v.domain(A.map(C)),L):y},L.copy=function(){return Ad(v.copy(),y,A)},Rs(L,v)}function rc(v){return function(y){return y<0?-Math.pow(-y,v):Math.pow(y,v)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Td([],{t:"range",a:[[]]})};function Td(v,y){var A,C,E;function L(F){return C[((A.get(F)||(y.t==="range"?A.set(F,v.push(F)):NaN))-1)%C.length]}function I(F,B){return e.range(v.length).map(function(W){return F+B*W})}return L.domain=function(F){if(!arguments.length)return v;v=[],A=new x;for(var B=-1,W=F.length,J;++B0?A[L-1]:v[0],Lee?0:1;if(J=tt)return B(J,qe)+(W?B(W,1-qe):"")+"Z";var ne,he,we,Fe,Re=0,me=0,cr,Mr,Pr,Yr,it,ot,qt,ct,kt=[];if((Fe=(+I.apply(this,arguments)||0)/2)&&(we=C===tc?Math.sqrt(W*W+J*J):+C.apply(this,arguments),qe||(me*=-1),J&&(me=Ln(we/J*Math.sin(Fe))),W&&(Re=Ln(we/W*Math.sin(Fe)))),J){cr=J*Math.cos(Q+me),Mr=J*Math.sin(Q+me),Pr=J*Math.cos(ee-me),Yr=J*Math.sin(ee-me);var ha=Math.abs(ee-Q-2*me)<=Ie?0:1;if(me&&ac(cr,Mr,Pr,Yr)===qe^ha){var tn=(Q+ee)/2;cr=J*Math.cos(tn),Mr=J*Math.sin(tn),Pr=Yr=null}}else cr=Mr=0;if(W){it=W*Math.cos(ee-Re),ot=W*Math.sin(ee-Re),qt=W*Math.cos(Q+Re),ct=W*Math.sin(Q+Re);var xa=Math.abs(Q-ee+2*Re)<=Ie?0:1;if(Re&&ac(it,ot,qt,ct)===1-qe^xa){var zr=(Q+ee)/2;it=W*Math.cos(zr),ot=W*Math.sin(zr),qt=ct=null}}else it=ot=0;if(Me>ye&&(ne=Math.min(Math.abs(J-W)/2,+A.apply(this,arguments)))>.001){he=W0?0:1}function nc(v,y,A,C,E){var L=v[0]-y[0],I=v[1]-y[1],F=(E?C:-C)/Math.sqrt(L*L+I*I),B=F*I,W=-F*L,J=v[0]+B,Q=v[1]+W,ee=y[0]+B,Me=y[1]+W,qe=(J+ee)/2,ne=(Q+Me)/2,he=ee-J,we=Me-Q,Fe=he*he+we*we,Re=A-C,me=J*Me-ee*Q,cr=(we<0?-1:1)*Math.sqrt(Math.max(0,Re*Re*Fe-me*me)),Mr=(me*we-he*cr)/Fe,Pr=(-me*he-we*cr)/Fe,Yr=(me*we+he*cr)/Fe,it=(-me*he+we*cr)/Fe,ot=Mr-qe,qt=Pr-ne,ct=Yr-qe,kt=it-ne;return ot*ot+qt*qt>ct*ct+kt*kt&&(Mr=Yr,Pr=it),[[Mr-B,Pr-W],[Mr*A/Re,Pr*A/Re]]}function Uv(){return!0}function Pd(v){var y=Hl,A=du,C=Uv,E=Ni,L=E.key,I=.7;function F(B){var W=[],J=[],Q=-1,ee=B.length,Me,qe=Vt(y),ne=Vt(A);function he(){W.push("M",E(v(J),I))}for(;++Q1?v.join("L"):v+"Z"}function Hv(v){return v.join("L")+"Z"}function ic(v){for(var y=0,A=v.length,C=v[0],E=[C[0],",",C[1]];++y1&&E.push("H",C[0]),E.join("")}function Vv(v){for(var y=0,A=v.length,C=v[0],E=[C[0],",",C[1]];++y1){F=y[1],L=v[B],B++,C+="C"+(E[0]+I[0])+","+(E[1]+I[1])+","+(L[0]-F[0])+","+(L[1]-F[1])+","+L[0]+","+L[1];for(var W=2;W9&&(L=A*3/Math.sqrt(L),I[F]=L*C,I[F+1]=L*E));for(F=-1;++F<=B;)L=(v[Math.min(B,F+1)][0]-v[Math.max(0,F-1)][0])/(6*(1+I[F]*I[F])),y.push([L||0,I[F]*L||0]);return y}function Cy(v){return v.length<3?Ni(v):v[0]+Ps(v,l_(v))}e.svg.line.radial=function(){var v=Pd(Id);return v.radius=v.x,delete v.x,v.angle=v.y,delete v.y,v};function Id(v){for(var y,A=-1,C=v.length,E,L;++AIe)+",1 "+Q}function W(J,Q,ee,Me){return"Q 0,0 "+Me}return L.radius=function(J){return arguments.length?(A=Vt(J),L):A},L.source=function(J){return arguments.length?(v=Vt(J),L):v},L.target=function(J){return arguments.length?(y=Vt(J),L):y},L.startAngle=function(J){return arguments.length?(C=Vt(J),L):C},L.endAngle=function(J){return arguments.length?(E=Vt(J),L):E},L};function zd(v){return v.radius}e.svg.diagonal=function(){var v=Ey,y=Is,A=Ly;function C(E,L){var I=v.call(this,E,L),F=y.call(this,E,L),B=(I.y+F.y)/2,W=[I,{x:I.x,y:B},{x:F.x,y:B},F];return W=W.map(A),"M"+W[0]+"C"+W[1]+" "+W[2]+" "+W[3]}return C.source=function(E){return arguments.length?(v=Vt(E),C):v},C.target=function(E){return arguments.length?(y=Vt(E),C):y},C.projection=function(E){return arguments.length?(A=E,C):A},C};function Ly(v){return[v.x,v.y]}e.svg.diagonal.radial=function(){var v=e.svg.diagonal(),y=Ly,A=v.projection;return v.projection=function(C){return arguments.length?A(s_(y=C)):y},v};function s_(v){return function(){var y=v.apply(this,arguments),A=y[0],C=y[1]-$r;return[A*Math.cos(C),A*Math.sin(C)]}}e.svg.symbol=function(){var v=f_,y=u_;function A(C,E){return(qy.get(v.call(this,C,E))||Dy)(y.call(this,C,E))}return A.type=function(C){return arguments.length?(v=Vt(C),A):v},A.size=function(C){return arguments.length?(y=Vt(C),A):y},A};function u_(){return 64}function f_(){return"circle"}function Dy(v){var y=Math.sqrt(v/Ie);return"M0,"+y+"A"+y+","+y+" 0 1,1 0,"+-y+"A"+y+","+y+" 0 1,1 0,"+y+"Z"}var qy=e.map({circle:Dy,cross:function(v){var y=Math.sqrt(v/5)/2;return"M"+-3*y+","+-y+"H"+-y+"V"+-3*y+"H"+y+"V"+-y+"H"+3*y+"V"+y+"H"+y+"V"+3*y+"H"+-y+"V"+y+"H"+-3*y+"Z"},diamond:function(v){var y=Math.sqrt(v/(2*Fy)),A=y*Fy;return"M0,"+-y+"L"+A+",0 0,"+y+" "+-A+",0Z"},square:function(v){var y=Math.sqrt(v)/2;return"M"+-y+","+-y+"L"+y+","+-y+" "+y+","+y+" "+-y+","+y+"Z"},"triangle-down":function(v){var y=Math.sqrt(v/jv),A=y*jv/2;return"M0,"+A+"L"+y+","+-A+" "+-y+","+-A+"Z"},"triangle-up":function(v){var y=Math.sqrt(v/jv),A=y*jv/2;return"M0,"+-A+"L"+y+","+A+" "+-y+","+A+"Z"}});e.svg.symbolTypes=qy.keys();var jv=Math.sqrt(3),Fy=Math.tan(30*St);Ce.transition=function(v){for(var y=$l||++Zv,A=Jv(v),C=[],E,L,I=Lu||{time:Date.now(),ease:qs,delay:0,duration:250},F=-1,B=this.length;++F0;)Q[--Fe].call(v,we);if(he>=1)return I.event&&I.event.end.call(v,v.__data__,y),--L.count?delete L[C]:delete v[A],1}I||(F=E.time,B=Ss(ee,0,F),I=L[C]={tween:new x,time:F,timer:B,delay:E.delay,duration:E.duration,ease:E.ease,index:y},E=null,++L.count)}e.svg.axis=function(){var v=e.scale.linear(),y=$v,A=6,C=6,E=3,L=[10],I=null,F;function B(W){W.each(function(){var J=e.select(this),Q=this.__chart__||v,ee=this.__chart__=v.copy(),Me=I==null?ee.ticks?ee.ticks.apply(ee,L):ee.domain():I,qe=F==null?ee.tickFormat?ee.tickFormat.apply(ee,L):$:F,ne=J.selectAll(".tick").data(Me,ee),he=ne.enter().insert("g",".domain").attr("class","tick").style("opacity",ye),we=e.transition(ne.exit()).style("opacity",ye).remove(),Fe=e.transition(ne.order()).style("opacity",1),Re=Math.max(A,0)+E,me,cr=Nv(ee),Mr=J.selectAll(".domain").data([0]),Pr=(Mr.enter().append("path").attr("class","domain"),e.transition(Mr));he.append("line"),he.append("text");var Yr=he.select("line"),it=Fe.select("line"),ot=ne.select("text").text(qe),qt=he.select("text"),ct=Fe.select("text"),kt=y==="top"||y==="left"?-1:1,ha,tn,xa,zr;if(y==="bottom"||y==="top"?(me=Hd,ha="x",xa="y",tn="x2",zr="y2",ot.attr("dy",kt<0?"0em":".71em").style("text-anchor","middle"),Pr.attr("d","M"+cr[0]+","+kt*C+"V0H"+cr[1]+"V"+kt*C)):(me=Vd,ha="y",xa="x",tn="y2",zr="x2",ot.attr("dy",".32em").style("text-anchor",kt<0?"end":"start"),Pr.attr("d","M"+kt*C+","+cr[0]+"H0V"+cr[1]+"H"+kt*C)),Yr.attr(zr,kt*A),qt.attr(xa,kt*Re),it.attr(tn,0).attr(zr,kt*A),ct.attr(ha,0).attr(xa,kt*Re),ee.rangeBand){var Ft=ee,Ut=Ft.rangeBand()/2;Q=ee=function(ua){return Ft(ua)+Ut}}else Q.rangeBand?Q=ee:we.call(me,ee,Q);he.call(me,Q,ee),Fe.call(me,ee,ee)})}return B.scale=function(W){return arguments.length?(v=W,B):v},B.orient=function(W){return arguments.length?(y=W in Gd?W+"":$v,B):y},B.ticks=function(){return arguments.length?(L=t(arguments),B):L},B.tickValues=function(W){return arguments.length?(I=W,B):I},B.tickFormat=function(W){return arguments.length?(F=W,B):F},B.tickSize=function(W){var J=arguments.length;return J?(A=+W,C=+arguments[J-1],B):A},B.innerTickSize=function(W){return arguments.length?(A=+W,B):A},B.outerTickSize=function(W){return arguments.length?(C=+W,B):C},B.tickPadding=function(W){return arguments.length?(E=+W,B):E},B.tickSubdivide=function(){return arguments.length&&B},B};var $v="bottom",Gd={top:1,right:1,bottom:1,left:1};function Hd(v,y,A){v.attr("transform",function(C){var E=y(C);return"translate("+(isFinite(E)?E:A(C))+",0)"})}function Vd(v,y,A){v.attr("transform",function(C){var E=y(C);return"translate(0,"+(isFinite(E)?E:A(C))+")"})}e.svg.brush=function(){var v=se(J,"brushstart","brush","brushend"),y=null,A=null,C=[0,0],E=[0,0],L,I,F=!0,B=!0,W=sc[0];function J(ne){ne.each(function(){var he=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",qe).on("touchstart.brush",qe),we=he.selectAll(".background").data([0]);we.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),he.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Fe=he.selectAll(".resize").data(W,$);Fe.exit().remove(),Fe.enter().append("g").attr("class",function(Mr){return"resize "+Mr}).style("cursor",function(Mr){return Yd[Mr]}).append("rect").attr("x",function(Mr){return/[ew]$/.test(Mr)?-3:null}).attr("y",function(Mr){return/^[ns]/.test(Mr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Fe.style("display",J.empty()?"none":null);var Re=e.transition(he),me=e.transition(we),cr;y&&(cr=Nv(y),me.attr("x",cr[0]).attr("width",cr[1]-cr[0]),ee(Re)),A&&(cr=Nv(A),me.attr("y",cr[0]).attr("height",cr[1]-cr[0]),Me(Re)),Q(Re)})}J.event=function(ne){ne.each(function(){var he=v.of(this,arguments),we={x:C,y:E,i:L,j:I},Fe=this.__chart__||we;this.__chart__=we,$l?e.select(this).transition().each("start.brush",function(){L=Fe.i,I=Fe.j,C=Fe.x,E=Fe.y,he({type:"brushstart"})}).tween("brush:brush",function(){var Re=Jf(C,we.x),me=Jf(E,we.y);return L=I=null,function(cr){C=we.x=Re(cr),E=we.y=me(cr),he({type:"brush",mode:"resize"})}}).each("end.brush",function(){L=we.i,I=we.j,he({type:"brush",mode:"resize"}),he({type:"brushend"})}):(he({type:"brushstart"}),he({type:"brush",mode:"resize"}),he({type:"brushend"}))})};function Q(ne){ne.selectAll(".resize").attr("transform",function(he){return"translate("+C[+/e$/.test(he)]+","+E[+/^s/.test(he)]+")"})}function ee(ne){ne.select(".extent").attr("x",C[0]),ne.selectAll(".extent,.n>rect,.s>rect").attr("width",C[1]-C[0])}function Me(ne){ne.select(".extent").attr("y",E[0]),ne.selectAll(".extent,.e>rect,.w>rect").attr("height",E[1]-E[0])}function qe(){var ne=this,he=e.select(e.event.target),we=v.of(ne,arguments),Fe=e.select(ne),Re=he.datum(),me=!/^(n|s)$/.test(Re)&&y,cr=!/^(e|w)$/.test(Re)&&A,Mr=he.classed("extent"),Pr=Ir(ne),Yr,it=e.mouse(ne),ot,qt=e.select(i(ne)).on("keydown.brush",ha).on("keyup.brush",tn);if(e.event.changedTouches?qt.on("touchmove.brush",xa).on("touchend.brush",Ft):qt.on("mousemove.brush",xa).on("mouseup.brush",Ft),Fe.interrupt().selectAll("*").interrupt(),Mr)it[0]=C[0]-it[0],it[1]=E[0]-it[1];else if(Re){var ct=+/w$/.test(Re),kt=+/^n/.test(Re);ot=[C[1-ct]-it[0],E[1-kt]-it[1]],it[0]=C[ct],it[1]=E[kt]}else e.event.altKey&&(Yr=it.slice());Fe.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",he.style("cursor")),we({type:"brushstart"}),xa();function ha(){e.event.keyCode==32&&(Mr||(Yr=null,it[0]-=C[1],it[1]-=E[1],Mr=2),ve())}function tn(){e.event.keyCode==32&&Mr==2&&(it[0]+=C[1],it[1]+=E[1],Mr=0,ve())}function xa(){var Ut=e.mouse(ne),ua=!1;ot&&(Ut[0]+=ot[0],Ut[1]+=ot[1]),Mr||(e.event.altKey?(Yr||(Yr=[(C[0]+C[1])/2,(E[0]+E[1])/2]),it[0]=C[+(Ut[0]{(function(e,r){typeof Iy=="object"&&typeof lM!="undefined"?r(Iy):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(Iy,function(e){"use strict";var r=new Date,t=new Date;function a(de,Oe,Ue,rt){function Ur(Ye){return de(Ye=arguments.length===0?new Date:new Date(+Ye)),Ye}return Ur.floor=function(Ye){return de(Ye=new Date(+Ye)),Ye},Ur.ceil=function(Ye){return de(Ye=new Date(Ye-1)),Oe(Ye,1),de(Ye),Ye},Ur.round=function(Ye){var Ve=Ur(Ye),pr=Ur.ceil(Ye);return Ye-Ve0))return Tr;do Tr.push(mr=new Date(+Ye)),Oe(Ye,pr),de(Ye);while(mr=Ve)for(;de(Ve),!Ye(Ve);)Ve.setTime(Ve-1)},function(Ve,pr){if(Ve>=Ve)if(pr<0)for(;++pr<=0;)for(;Oe(Ve,-1),!Ye(Ve););else for(;--pr>=0;)for(;Oe(Ve,1),!Ye(Ve););})},Ue&&(Ur.count=function(Ye,Ve){return r.setTime(+Ye),t.setTime(+Ve),de(r),de(t),Math.floor(Ue(r,t))},Ur.every=function(Ye){return Ye=Math.floor(Ye),!isFinite(Ye)||!(Ye>0)?null:Ye>1?Ur.filter(rt?function(Ve){return rt(Ve)%Ye===0}:function(Ve){return Ur.count(0,Ve)%Ye===0}):Ur}),Ur}var n=a(function(){},function(de,Oe){de.setTime(+de+Oe)},function(de,Oe){return Oe-de});n.every=function(de){return de=Math.floor(de),!isFinite(de)||!(de>0)?null:de>1?a(function(Oe){Oe.setTime(Math.floor(Oe/de)*de)},function(Oe,Ue){Oe.setTime(+Oe+Ue*de)},function(Oe,Ue){return(Ue-Oe)/de}):n};var i=n.range,o=1e3,l=6e4,s=36e5,u=864e5,f=6048e5,c=a(function(de){de.setTime(de-de.getMilliseconds())},function(de,Oe){de.setTime(+de+Oe*o)},function(de,Oe){return(Oe-de)/o},function(de){return de.getUTCSeconds()}),h=c.range,d=a(function(de){de.setTime(de-de.getMilliseconds()-de.getSeconds()*o)},function(de,Oe){de.setTime(+de+Oe*l)},function(de,Oe){return(Oe-de)/l},function(de){return de.getMinutes()}),p=d.range,g=a(function(de){de.setTime(de-de.getMilliseconds()-de.getSeconds()*o-de.getMinutes()*l)},function(de,Oe){de.setTime(+de+Oe*s)},function(de,Oe){return(Oe-de)/s},function(de){return de.getHours()}),m=g.range,b=a(function(de){de.setHours(0,0,0,0)},function(de,Oe){de.setDate(de.getDate()+Oe)},function(de,Oe){return(Oe-de-(Oe.getTimezoneOffset()-de.getTimezoneOffset())*l)/u},function(de){return de.getDate()-1}),_=b.range;function w(de){return a(function(Oe){Oe.setDate(Oe.getDate()-(Oe.getDay()+7-de)%7),Oe.setHours(0,0,0,0)},function(Oe,Ue){Oe.setDate(Oe.getDate()+Ue*7)},function(Oe,Ue){return(Ue-Oe-(Ue.getTimezoneOffset()-Oe.getTimezoneOffset())*l)/f})}var x=w(0),T=w(1),S=w(2),M=w(3),k=w(4),D=w(5),P=w(6),N=x.range,q=T.range,O=S.range,U=M.range,$=k.range,j=D.range,H=P.range,z=a(function(de){de.setDate(1),de.setHours(0,0,0,0)},function(de,Oe){de.setMonth(de.getMonth()+Oe)},function(de,Oe){return Oe.getMonth()-de.getMonth()+(Oe.getFullYear()-de.getFullYear())*12},function(de){return de.getMonth()}),V=z.range,X=a(function(de){de.setMonth(0,1),de.setHours(0,0,0,0)},function(de,Oe){de.setFullYear(de.getFullYear()+Oe)},function(de,Oe){return Oe.getFullYear()-de.getFullYear()},function(de){return de.getFullYear()});X.every=function(de){return!isFinite(de=Math.floor(de))||!(de>0)?null:a(function(Oe){Oe.setFullYear(Math.floor(Oe.getFullYear()/de)*de),Oe.setMonth(0,1),Oe.setHours(0,0,0,0)},function(Oe,Ue){Oe.setFullYear(Oe.getFullYear()+Ue*de)})};var K=X.range,ve=a(function(de){de.setUTCSeconds(0,0)},function(de,Oe){de.setTime(+de+Oe*l)},function(de,Oe){return(Oe-de)/l},function(de){return de.getUTCMinutes()}),xe=ve.range,se=a(function(de){de.setUTCMinutes(0,0,0)},function(de,Oe){de.setTime(+de+Oe*s)},function(de,Oe){return(Oe-de)/s},function(de){return de.getUTCHours()}),be=se.range,re=a(function(de){de.setUTCHours(0,0,0,0)},function(de,Oe){de.setUTCDate(de.getUTCDate()+Oe)},function(de,Oe){return(Oe-de)/u},function(de){return de.getUTCDate()-1}),ke=re.range;function ge(de){return a(function(Oe){Oe.setUTCDate(Oe.getUTCDate()-(Oe.getUTCDay()+7-de)%7),Oe.setUTCHours(0,0,0,0)},function(Oe,Ue){Oe.setUTCDate(Oe.getUTCDate()+Ue*7)},function(Oe,Ue){return(Ue-Oe)/f})}var Ee=ge(0),De=ge(1),Ce=ge(2),Y=ge(3),ae=ge(4),Z=ge(5),Te=ge(6),Pe=Ee.range,Ne=De.range,lr=Ce.range,Ke=Y.range,Je=ae.range,or=Z.range,yr=Te.range,ir=a(function(de){de.setUTCDate(1),de.setUTCHours(0,0,0,0)},function(de,Oe){de.setUTCMonth(de.getUTCMonth()+Oe)},function(de,Oe){return Oe.getUTCMonth()-de.getUTCMonth()+(Oe.getUTCFullYear()-de.getUTCFullYear())*12},function(de){return de.getUTCMonth()}),Xe=ir.range,Lr=a(function(de){de.setUTCMonth(0,1),de.setUTCHours(0,0,0,0)},function(de,Oe){de.setUTCFullYear(de.getUTCFullYear()+Oe)},function(de,Oe){return Oe.getUTCFullYear()-de.getUTCFullYear()},function(de){return de.getUTCFullYear()});Lr.every=function(de){return!isFinite(de=Math.floor(de))||!(de>0)?null:a(function(Oe){Oe.setUTCFullYear(Math.floor(Oe.getUTCFullYear()/de)*de),Oe.setUTCMonth(0,1),Oe.setUTCHours(0,0,0,0)},function(Oe,Ue){Oe.setUTCFullYear(Oe.getUTCFullYear()+Ue*de)})};var Ar=Lr.range;e.timeDay=b,e.timeDays=_,e.timeFriday=D,e.timeFridays=j,e.timeHour=g,e.timeHours=m,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=T,e.timeMondays=q,e.timeMonth=z,e.timeMonths=V,e.timeSaturday=P,e.timeSaturdays=H,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=x,e.timeSundays=N,e.timeThursday=k,e.timeThursdays=$,e.timeTuesday=S,e.timeTuesdays=O,e.timeWednesday=M,e.timeWednesdays=U,e.timeWeek=x,e.timeWeeks=N,e.timeYear=X,e.timeYears=K,e.utcDay=re,e.utcDays=ke,e.utcFriday=Z,e.utcFridays=or,e.utcHour=se,e.utcHours=be,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=ve,e.utcMinutes=xe,e.utcMonday=De,e.utcMondays=Ne,e.utcMonth=ir,e.utcMonths=Xe,e.utcSaturday=Te,e.utcSaturdays=yr,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=Ee,e.utcSundays=Pe,e.utcThursday=ae,e.utcThursdays=Je,e.utcTuesday=Ce,e.utcTuesdays=lr,e.utcWednesday=Y,e.utcWednesdays=Ke,e.utcWeek=Ee,e.utcWeeks=Pe,e.utcYear=Lr,e.utcYears=Ar,Object.defineProperty(e,"__esModule",{value:!0})})});var Kv=R((Oy,sM)=>{(function(e,r){typeof Oy=="object"&&typeof sM!="undefined"?r(Oy,c_()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(Oy,function(e,r){"use strict";function t(oe){if(0<=oe.y&&oe.y<100){var ye=new Date(-1,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L);return ye.setFullYear(oe.y),ye}return new Date(oe.y,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L)}function a(oe){if(0<=oe.y&&oe.y<100){var ye=new Date(Date.UTC(-1,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L));return ye.setUTCFullYear(oe.y),ye}return new Date(Date.UTC(oe.y,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L))}function n(oe,ye,Ge){return{y:oe,m:ye,d:Ge,H:0,M:0,S:0,L:0}}function i(oe){var ye=oe.dateTime,Ge=oe.date,Ie=oe.time,Wr=oe.periods,tt=oe.days,$r=oe.shortDays,St=oe.months,ea=oe.shortMonths,ma=h(Wr),aa=d(Wr),Qa=h(tt),Ln=d(tt),si=h($r),Dn=d($r),Vi=h(St),Bn=d(St),qn=h(ea),yi=d(ea),_t={a:_s,A:ws,b:Bl,B:_v,c:null,d:z,e:z,f:xe,H:V,I:X,j:K,L:ve,m:se,M:be,p:As,q:Bf,Q:Ve,s:pr,S:re,u:ke,U:ge,V:Ee,w:De,W:Ce,x:null,X:null,y:Y,Y:ae,Z,"%":Ye},Ma={a:Uf,A:ol,b:ui,B:ll,c:null,d:Te,e:Te,f:Je,H:Pe,I:Ne,j:lr,L:Ke,m:or,M:yr,p:Ts,q:go,Q:Ve,s:pr,S:ir,u:Xe,U:Lr,V:Ar,w:de,W:Oe,x:null,X:null,y:Ue,Y:rt,Z:Ur,"%":Ye},ra={a:en,A:on,b:Yi,B:Wi,c:xn,d:k,e:k,f:U,H:P,I:P,j:D,L:O,m:M,M:N,p:La,q:S,Q:j,s:H,S:q,u:g,U:m,V:b,w:p,W:_,x:Aa,X:Un,y:x,Y:w,Z:T,"%":$};_t.x=Pa(Ge,_t),_t.X=Pa(Ie,_t),_t.c=Pa(ye,_t),Ma.x=Pa(Ge,Ma),Ma.X=Pa(Ie,Ma),Ma.c=Pa(ye,Ma);function Pa(yt,jt){return function(va){var jr=[],Gn=-1,Ea=0,Fn=yt.length,Vt,bo,Ul;for(va instanceof Date||(va=new Date(+va));++Gn53)return null;"w"in jr||(jr.w=1),"Z"in jr?(Ea=a(n(jr.y,0,1)),Fn=Ea.getUTCDay(),Ea=Fn>4||Fn===0?r.utcMonday.ceil(Ea):r.utcMonday(Ea),Ea=r.utcDay.offset(Ea,(jr.V-1)*7),jr.y=Ea.getUTCFullYear(),jr.m=Ea.getUTCMonth(),jr.d=Ea.getUTCDate()+(jr.w+6)%7):(Ea=t(n(jr.y,0,1)),Fn=Ea.getDay(),Ea=Fn>4||Fn===0?r.timeMonday.ceil(Ea):r.timeMonday(Ea),Ea=r.timeDay.offset(Ea,(jr.V-1)*7),jr.y=Ea.getFullYear(),jr.m=Ea.getMonth(),jr.d=Ea.getDate()+(jr.w+6)%7)}else("W"in jr||"U"in jr)&&("w"in jr||(jr.w="u"in jr?jr.u%7:"W"in jr?1:0),Fn="Z"in jr?a(n(jr.y,0,1)).getUTCDay():t(n(jr.y,0,1)).getDay(),jr.m=0,jr.d="W"in jr?(jr.w+6)%7+jr.W*7-(Fn+5)%7:jr.w+jr.U*7-(Fn+6)%7);return"Z"in jr?(jr.H+=jr.Z/100|0,jr.M+=jr.Z%100,a(jr)):t(jr)}}function Sa(yt,jt,va,jr){for(var Gn=0,Ea=jt.length,Fn=va.length,Vt,bo;Gn=Fn)return-1;if(Vt=jt.charCodeAt(Gn++),Vt===37){if(Vt=jt.charAt(Gn++),bo=ra[Vt in o?jt.charAt(Gn++):Vt],!bo||(jr=bo(yt,va,jr))<0)return-1}else if(Vt!=va.charCodeAt(jr++))return-1}return jr}function La(yt,jt,va){var jr=ma.exec(jt.slice(va));return jr?(yt.p=aa[jr[0].toLowerCase()],va+jr[0].length):-1}function en(yt,jt,va){var jr=si.exec(jt.slice(va));return jr?(yt.w=Dn[jr[0].toLowerCase()],va+jr[0].length):-1}function on(yt,jt,va){var jr=Qa.exec(jt.slice(va));return jr?(yt.w=Ln[jr[0].toLowerCase()],va+jr[0].length):-1}function Yi(yt,jt,va){var jr=qn.exec(jt.slice(va));return jr?(yt.m=yi[jr[0].toLowerCase()],va+jr[0].length):-1}function Wi(yt,jt,va){var jr=Vi.exec(jt.slice(va));return jr?(yt.m=Bn[jr[0].toLowerCase()],va+jr[0].length):-1}function xn(yt,jt,va){return Sa(yt,ye,jt,va)}function Aa(yt,jt,va){return Sa(yt,Ge,jt,va)}function Un(yt,jt,va){return Sa(yt,Ie,jt,va)}function _s(yt){return $r[yt.getDay()]}function ws(yt){return tt[yt.getDay()]}function Bl(yt){return ea[yt.getMonth()]}function _v(yt){return St[yt.getMonth()]}function As(yt){return Wr[+(yt.getHours()>=12)]}function Bf(yt){return 1+~~(yt.getMonth()/3)}function Uf(yt){return $r[yt.getUTCDay()]}function ol(yt){return tt[yt.getUTCDay()]}function ui(yt){return ea[yt.getUTCMonth()]}function ll(yt){return St[yt.getUTCMonth()]}function Ts(yt){return Wr[+(yt.getUTCHours()>=12)]}function go(yt){return 1+~~(yt.getUTCMonth()/3)}return{format:function(yt){var jt=Pa(yt+="",_t);return jt.toString=function(){return yt},jt},parse:function(yt){var jt=Xa(yt+="",!1);return jt.toString=function(){return yt},jt},utcFormat:function(yt){var jt=Pa(yt+="",Ma);return jt.toString=function(){return yt},jt},utcParse:function(yt){var jt=Xa(yt+="",!0);return jt.toString=function(){return yt},jt}}}var o={"-":"",_:" ",0:"0"},l=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(oe,ye,Ge){var Ie=oe<0?"-":"",Wr=(Ie?-oe:oe)+"",tt=Wr.length;return Ie+(tt68?1900:2e3),Ge+Ie[0].length):-1}function T(oe,ye,Ge){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ye.slice(Ge,Ge+6));return Ie?(oe.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Ge+Ie[0].length):-1}function S(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+1));return Ie?(oe.q=Ie[0]*3-3,Ge+Ie[0].length):-1}function M(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.m=Ie[0]-1,Ge+Ie[0].length):-1}function k(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.d=+Ie[0],Ge+Ie[0].length):-1}function D(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+3));return Ie?(oe.m=0,oe.d=+Ie[0],Ge+Ie[0].length):-1}function P(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.H=+Ie[0],Ge+Ie[0].length):-1}function N(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.M=+Ie[0],Ge+Ie[0].length):-1}function q(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.S=+Ie[0],Ge+Ie[0].length):-1}function O(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+3));return Ie?(oe.L=+Ie[0],Ge+Ie[0].length):-1}function U(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+6));return Ie?(oe.L=Math.floor(Ie[0]/1e3),Ge+Ie[0].length):-1}function $(oe,ye,Ge){var Ie=s.exec(ye.slice(Ge,Ge+1));return Ie?Ge+Ie[0].length:-1}function j(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge));return Ie?(oe.Q=+Ie[0],Ge+Ie[0].length):-1}function H(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge));return Ie?(oe.s=+Ie[0],Ge+Ie[0].length):-1}function z(oe,ye){return f(oe.getDate(),ye,2)}function V(oe,ye){return f(oe.getHours(),ye,2)}function X(oe,ye){return f(oe.getHours()%12||12,ye,2)}function K(oe,ye){return f(1+r.timeDay.count(r.timeYear(oe),oe),ye,3)}function ve(oe,ye){return f(oe.getMilliseconds(),ye,3)}function xe(oe,ye){return ve(oe,ye)+"000"}function se(oe,ye){return f(oe.getMonth()+1,ye,2)}function be(oe,ye){return f(oe.getMinutes(),ye,2)}function re(oe,ye){return f(oe.getSeconds(),ye,2)}function ke(oe){var ye=oe.getDay();return ye===0?7:ye}function ge(oe,ye){return f(r.timeSunday.count(r.timeYear(oe)-1,oe),ye,2)}function Ee(oe,ye){var Ge=oe.getDay();return oe=Ge>=4||Ge===0?r.timeThursday(oe):r.timeThursday.ceil(oe),f(r.timeThursday.count(r.timeYear(oe),oe)+(r.timeYear(oe).getDay()===4),ye,2)}function De(oe){return oe.getDay()}function Ce(oe,ye){return f(r.timeMonday.count(r.timeYear(oe)-1,oe),ye,2)}function Y(oe,ye){return f(oe.getFullYear()%100,ye,2)}function ae(oe,ye){return f(oe.getFullYear()%1e4,ye,4)}function Z(oe){var ye=oe.getTimezoneOffset();return(ye>0?"-":(ye*=-1,"+"))+f(ye/60|0,"0",2)+f(ye%60,"0",2)}function Te(oe,ye){return f(oe.getUTCDate(),ye,2)}function Pe(oe,ye){return f(oe.getUTCHours(),ye,2)}function Ne(oe,ye){return f(oe.getUTCHours()%12||12,ye,2)}function lr(oe,ye){return f(1+r.utcDay.count(r.utcYear(oe),oe),ye,3)}function Ke(oe,ye){return f(oe.getUTCMilliseconds(),ye,3)}function Je(oe,ye){return Ke(oe,ye)+"000"}function or(oe,ye){return f(oe.getUTCMonth()+1,ye,2)}function yr(oe,ye){return f(oe.getUTCMinutes(),ye,2)}function ir(oe,ye){return f(oe.getUTCSeconds(),ye,2)}function Xe(oe){var ye=oe.getUTCDay();return ye===0?7:ye}function Lr(oe,ye){return f(r.utcSunday.count(r.utcYear(oe)-1,oe),ye,2)}function Ar(oe,ye){var Ge=oe.getUTCDay();return oe=Ge>=4||Ge===0?r.utcThursday(oe):r.utcThursday.ceil(oe),f(r.utcThursday.count(r.utcYear(oe),oe)+(r.utcYear(oe).getUTCDay()===4),ye,2)}function de(oe){return oe.getUTCDay()}function Oe(oe,ye){return f(r.utcMonday.count(r.utcYear(oe)-1,oe),ye,2)}function Ue(oe,ye){return f(oe.getUTCFullYear()%100,ye,2)}function rt(oe,ye){return f(oe.getUTCFullYear()%1e4,ye,4)}function Ur(){return"+0000"}function Ye(){return"%"}function Ve(oe){return+oe}function pr(oe){return Math.floor(+oe/1e3)}var Tr;mr({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 mr(oe){return Tr=i(oe),e.timeFormat=Tr.format,e.timeParse=Tr.parse,e.utcFormat=Tr.utcFormat,e.utcParse=Tr.utcParse,Tr}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function Cr(oe){return oe.toISOString()}var Ir=Date.prototype.toISOString?Cr:e.utcFormat(vr);function Gr(oe){var ye=new Date(oe);return isNaN(ye)?null:ye}var Ze=+new Date("2000-01-01T00:00:00.000Z")?Gr:e.utcParse(vr);e.isoFormat=Ir,e.isoParse=Ze,e.timeFormatDefaultLocale=mr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var v_=R((zy,uM)=>{(function(e,r){typeof zy=="object"&&typeof uM!="undefined"?r(zy):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(zy,function(e){"use strict";function r(M){return Math.abs(M=Math.round(M))>=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function t(M,k){if((D=(M=k?M.toExponential(k-1):M.toExponential()).indexOf("e"))<0)return null;var D,P=M.slice(0,D);return[P.length>1?P[0]+P.slice(2):P,+M.slice(D+1)]}function a(M){return M=t(Math.abs(M)),M?M[1]:NaN}function n(M,k){return function(D,P){for(var N=D.length,q=[],O=0,U=M[0],$=0;N>0&&U>0&&($+U+1>P&&(U=Math.max(1,P-$)),q.push(D.substring(N-=U,N+U)),!(($+=U+1)>P));)U=M[O=(O+1)%M.length];return q.reverse().join(k)}}function i(M){return function(k){return k.replace(/[0-9]/g,function(D){return M[+D]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(M){if(!(k=o.exec(M)))throw new Error("invalid format: "+M);var k;return new s({fill:k[1],align:k[2],sign:k[3],symbol:k[4],zero:k[5],width:k[6],comma:k[7],precision:k[8]&&k[8].slice(1),trim:k[9],type:k[10]})}l.prototype=s.prototype;function s(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}s.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(M){e:for(var k=M.length,D=1,P=-1,N;D0&&(P=0);break}return P>0?M.slice(0,P)+M.slice(N+1):M}var f;function c(M,k){var D=t(M,k);if(!D)return M+"";var P=D[0],N=D[1],q=N-(f=Math.max(-8,Math.min(8,Math.floor(N/3)))*3)+1,O=P.length;return q===O?P:q>O?P+new Array(q-O+1).join("0"):q>0?P.slice(0,q)+"."+P.slice(q):"0."+new Array(1-q).join("0")+t(M,Math.max(0,k+q-1))[0]}function h(M,k){var D=t(M,k);if(!D)return M+"";var P=D[0],N=D[1];return N<0?"0."+new Array(-N).join("0")+P:P.length>N+1?P.slice(0,N+1)+"."+P.slice(N+1):P+new Array(N-P.length+2).join("0")}var d={"%":function(M,k){return(M*100).toFixed(k)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d:r,e:function(M,k){return M.toExponential(k)},f:function(M,k){return M.toFixed(k)},g:function(M,k){return M.toPrecision(k)},o:function(M){return Math.round(M).toString(8)},p:function(M,k){return h(M*100,k)},r:h,s:c,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function p(M){return M}var g=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function b(M){var k=M.grouping===void 0||M.thousands===void 0?p:n(g.call(M.grouping,Number),M.thousands+""),D=M.currency===void 0?"":M.currency[0]+"",P=M.currency===void 0?"":M.currency[1]+"",N=M.decimal===void 0?".":M.decimal+"",q=M.numerals===void 0?p:i(g.call(M.numerals,String)),O=M.percent===void 0?"%":M.percent+"",U=M.minus===void 0?"-":M.minus+"",$=M.nan===void 0?"NaN":M.nan+"";function j(z){z=l(z);var V=z.fill,X=z.align,K=z.sign,ve=z.symbol,xe=z.zero,se=z.width,be=z.comma,re=z.precision,ke=z.trim,ge=z.type;ge==="n"?(be=!0,ge="g"):d[ge]||(re===void 0&&(re=12),ke=!0,ge="g"),(xe||V==="0"&&X==="=")&&(xe=!0,V="0",X="=");var Ee=ve==="$"?D:ve==="#"&&/[boxX]/.test(ge)?"0"+ge.toLowerCase():"",De=ve==="$"?P:/[%p]/.test(ge)?O:"",Ce=d[ge],Y=/[defgprs%]/.test(ge);re=re===void 0?6:/[gprs]/.test(ge)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function ae(Z){var Te=Ee,Pe=De,Ne,lr,Ke;if(ge==="c")Pe=Ce(Z)+Pe,Z="";else{Z=+Z;var Je=Z<0||1/Z<0;if(Z=isNaN(Z)?$:Ce(Math.abs(Z),re),ke&&(Z=u(Z)),Je&&+Z==0&&K!=="+"&&(Je=!1),Te=(Je?K==="("?K:U:K==="-"||K==="("?"":K)+Te,Pe=(ge==="s"?m[8+f/3]:"")+Pe+(Je&&K==="("?")":""),Y){for(Ne=-1,lr=Z.length;++NeKe||Ke>57){Pe=(Ke===46?N+Z.slice(Ne+1):Z.slice(Ne))+Pe,Z=Z.slice(0,Ne);break}}}be&&!xe&&(Z=k(Z,1/0));var or=Te.length+Z.length+Pe.length,yr=or>1)+Te+Z+Pe+yr.slice(or);break;default:Z=yr+Te+Z+Pe;break}return q(Z)}return ae.toString=function(){return z+""},ae}function H(z,V){var X=j((z=l(z),z.type="f",z)),K=Math.max(-8,Math.min(8,Math.floor(a(V)/3)))*3,ve=Math.pow(10,-K),xe=m[8+K/3];return function(se){return X(ve*se)+xe}}return{format:j,formatPrefix:H}}var _;w({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function w(M){return _=b(M),e.format=_.format,e.formatPrefix=_.formatPrefix,_}function x(M){return Math.max(0,-a(Math.abs(M)))}function T(M,k){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(k)/3)))*3-a(Math.abs(M)))}function S(M,k){return M=Math.abs(M),k=Math.abs(k)-M,Math.max(0,a(k)-a(M))+1}e.FormatSpecifier=s,e.formatDefaultLocale=w,e.formatLocale=b,e.formatSpecifier=l,e.precisionFixed=x,e.precisionPrefix=T,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})})});var cM=R((EMe,fM)=>{"use strict";fM.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var ia=R((LMe,vM)=>{"use strict";var zae=cM();vM.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&zae(t))return!1}else if(r!=="number")return!1;return e-e<1}});var _n=R((DMe,hM)=>{"use strict";hM.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 h_=R((By,dM)=>{(function(e,r){typeof By=="object"&&typeof dM!="undefined"?r(By):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(By,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(l[s]&3)<<4|l[s+1]>>4],f+=r[(l[s+1]&15)<<2|l[s+2]>>6],f+=r[l[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(o){var l=o.length*.75,s=o.length,u,f=0,c,h,d,p;o[o.length-1]==="="&&(l--,o[o.length-2]==="="&&l--);var g=new ArrayBuffer(l),m=new Uint8Array(g);for(u=0;u>4,m[f++]=(h&15)<<4|d>>2,m[f++]=(d&3)<<6|p&63;return g};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var Ru=R((qMe,pM)=>{"use strict";pM.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var ro=R(cl=>{"use strict";var Bae=h_().decode,Uae=Ru(),d_=Array.isArray,Gae=ArrayBuffer,Hae=DataView;function mM(e){return Gae.isView(e)&&!(e instanceof Hae)}cl.isTypedArray=mM;function Uy(e){return d_(e)||mM(e)}cl.isArrayOrTypedArray=Uy;function Vae(e){return!Uy(e[0])}cl.isArray1D=Vae;cl.ensureArray=function(e,r){return d_(e)||(e=[]),e.length=r,e};var ti={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};ti.uint8c=ti.u1c;ti.uint8=ti.u1;ti.int8=ti.i1;ti.uint16=ti.u2;ti.int16=ti.i2;ti.uint32=ti.u4;ti.int32=ti.i4;ti.float32=ti.f4;ti.float64=ti.f8;function p_(e){return e.constructor===ArrayBuffer}cl.isArrayBuffer=p_;cl.decodeTypedArraySpec=function(e){var r=[],t=Yae(e),a=t.dtype,n=ti[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,o=t.bdata;p_(o)||(o=Bae(o));var l=t.shape===void 0?[o.byteLength/i]:(""+t.shape).split(",");l.reverse();var s=l.length,u,f,c=+l[0],h=i*c,d=0;if(s===1)r=new n(o);else if(s===2)for(u=+l[1],f=0;f{"use strict";var gM=ia(),y_=ro().isArrayOrTypedArray;wM.exports=function(r,t){if(gM(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,o,l;for(l=0;l{"use strict";var Qv=Gy(),Jae=/^\w*$/,$ae=0,AM=1,Hy=2,TM=3,uc=4;MM.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,o,l,s={};t&&t.length?(l=Qv(r,t),o=l.get()):o=r,t=t||"";var u={};if(o)for(i=0;i2)return s[d]=s[d]|Hy,c.set(h,null);if(f){for(i=d;i{"use strict";var Kae=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Qae=/^[^\.\[\]]+$/;kM.exports=function(e,r){for(;r;){var t=e.match(Kae);if(t)e=t[1];else if(e.match(Qae))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var Vy=R((IMe,EM)=>{"use strict";var ene=ia();EM.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return ene(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var qM=R((OMe,DM)=>{"use strict";var LM=ro().isArrayOrTypedArray,Zd=Ru();DM.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(LM(n)&&LM(i)&&Zd(n[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(n.length,i.length),l=0;l{"use strict";function rne(e,r){var t=e%r;return t<0?t+r:t}function tne(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}FM.exports={mod:rne,modHalf:tne}});var vl=R((BMe,Yy)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,o=e.max,l=e.random;function s(Y,ae){if(Y=Y||"",ae=ae||{},Y instanceof s)return Y;if(!(this instanceof s))return new s(Y,ae);var Z=u(Y);this._originalInput=Y,this._r=Z.r,this._g=Z.g,this._b=Z.b,this._a=Z.a,this._roundA=n(100*this._a)/100,this._format=ae.format||Z.format,this._gradientType=ae.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=Z.ok,this._tc_id=a++}s.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 Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ae,Z,Te,Pe,Ne,lr;return ae=Y.r/255,Z=Y.g/255,Te=Y.b/255,ae<=.03928?Pe=ae/12.92:Pe=e.pow((ae+.055)/1.055,2.4),Z<=.03928?Ne=Z/12.92:Ne=e.pow((Z+.055)/1.055,2.4),Te<=.03928?lr=Te/12.92:lr=e.pow((Te+.055)/1.055,2.4),.2126*Pe+.7152*Ne+.0722*lr},setAlpha:function(Y){return this._a=z(Y),this._roundA=n(100*this._a)/100,this},toHsv:function(){var Y=d(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=d(this._r,this._g,this._b),ae=n(Y.h*360),Z=n(Y.s*100),Te=n(Y.v*100);return this._a==1?"hsv("+ae+", "+Z+"%, "+Te+"%)":"hsva("+ae+", "+Z+"%, "+Te+"%, "+this._roundA+")"},toHsl:function(){var Y=c(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=c(this._r,this._g,this._b),ae=n(Y.h*360),Z=n(Y.s*100),Te=n(Y.l*100);return this._a==1?"hsl("+ae+", "+Z+"%, "+Te+"%)":"hsla("+ae+", "+Z+"%, "+Te+"%, "+this._roundA+")"},toHex:function(Y){return g(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return m(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(V(this._r,255)*100)+"%",g:n(V(this._g,255)*100)+"%",b:n(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%)":"rgba("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ae="#"+b(this._r,this._g,this._b,this._a),Z=ae,Te=this._gradientType?"GradientType = 1, ":"";if(Y){var Pe=s(Y);Z="#"+b(Pe._r,Pe._g,Pe._b,Pe._a)}return"progid:DXImageTransform.Microsoft.gradient("+Te+"startColorstr="+ae+",endColorstr="+Z+")"},toString:function(Y){var ae=!!Y;Y=Y||this._format;var Z=!1,Te=this._a<1&&this._a>=0,Pe=!ae&&Te&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return Pe?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(Z=this.toRgbString()),Y==="prgb"&&(Z=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(Z=this.toHexString()),Y==="hex3"&&(Z=this.toHexString(!0)),Y==="hex4"&&(Z=this.toHex8String(!0)),Y==="hex8"&&(Z=this.toHex8String()),Y==="name"&&(Z=this.toName()),Y==="hsl"&&(Z=this.toHslString()),Y==="hsv"&&(Z=this.toHsvString()),Z||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Y,ae){var Z=Y.apply(null,[this].concat([].slice.call(ae)));return this._r=Z._r,this._g=Z._g,this._b=Z._b,this.setAlpha(Z._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(Y,ae){return Y.apply(null,[this].concat([].slice.call(ae)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},s.fromRatio=function(Y,ae){if(typeof Y=="object"){var Z={};for(var Te in Y)Y.hasOwnProperty(Te)&&(Te==="a"?Z[Te]=Y[Te]:Z[Te]=be(Y[Te]));Y=Z}return s(Y,ae)};function u(Y){var ae={r:0,g:0,b:0},Z=1,Te=null,Pe=null,Ne=null,lr=!1,Ke=!1;return typeof Y=="string"&&(Y=De(Y)),typeof Y=="object"&&(Ee(Y.r)&&Ee(Y.g)&&Ee(Y.b)?(ae=f(Y.r,Y.g,Y.b),lr=!0,Ke=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):Ee(Y.h)&&Ee(Y.s)&&Ee(Y.v)?(Te=be(Y.s),Pe=be(Y.v),ae=p(Y.h,Te,Pe),lr=!0,Ke="hsv"):Ee(Y.h)&&Ee(Y.s)&&Ee(Y.l)&&(Te=be(Y.s),Ne=be(Y.l),ae=h(Y.h,Te,Ne),lr=!0,Ke="hsl"),Y.hasOwnProperty("a")&&(Z=Y.a)),Z=z(Z),{ok:lr,format:Y.format||Ke,r:i(255,o(ae.r,0)),g:i(255,o(ae.g,0)),b:i(255,o(ae.b,0)),a:Z}}function f(Y,ae,Z){return{r:V(Y,255)*255,g:V(ae,255)*255,b:V(Z,255)*255}}function c(Y,ae,Z){Y=V(Y,255),ae=V(ae,255),Z=V(Z,255);var Te=o(Y,ae,Z),Pe=i(Y,ae,Z),Ne,lr,Ke=(Te+Pe)/2;if(Te==Pe)Ne=lr=0;else{var Je=Te-Pe;switch(lr=Ke>.5?Je/(2-Te-Pe):Je/(Te+Pe),Te){case Y:Ne=(ae-Z)/Je+(ae1&&(ir-=1),ir<1/6?or+(yr-or)*6*ir:ir<1/2?yr:ir<2/3?or+(yr-or)*(2/3-ir)*6:or}if(ae===0)Te=Pe=Ne=Z;else{var Ke=Z<.5?Z*(1+ae):Z+ae-Z*ae,Je=2*Z-Ke;Te=lr(Je,Ke,Y+1/3),Pe=lr(Je,Ke,Y),Ne=lr(Je,Ke,Y-1/3)}return{r:Te*255,g:Pe*255,b:Ne*255}}function d(Y,ae,Z){Y=V(Y,255),ae=V(ae,255),Z=V(Z,255);var Te=o(Y,ae,Z),Pe=i(Y,ae,Z),Ne,lr,Ke=Te,Je=Te-Pe;if(lr=Te===0?0:Je/Te,Te==Pe)Ne=0;else{switch(Te){case Y:Ne=(ae-Z)/Je+(ae>1)+720)%360;--ae;)Te.h=(Te.h+Pe)%360,Ne.push(s(Te));return Ne}function U(Y,ae){ae=ae||6;for(var Z=s(Y).toHsv(),Te=Z.h,Pe=Z.s,Ne=Z.v,lr=[],Ke=1/ae;ae--;)lr.push(s({h:Te,s:Pe,v:Ne})),Ne=(Ne+Ke)%1;return lr}s.mix=function(Y,ae,Z){Z=Z===0?0:Z||50;var Te=s(Y).toRgb(),Pe=s(ae).toRgb(),Ne=Z/100,lr={r:(Pe.r-Te.r)*Ne+Te.r,g:(Pe.g-Te.g)*Ne+Te.g,b:(Pe.b-Te.b)*Ne+Te.b,a:(Pe.a-Te.a)*Ne+Te.a};return s(lr)},s.readability=function(Y,ae){var Z=s(Y),Te=s(ae);return(e.max(Z.getLuminance(),Te.getLuminance())+.05)/(e.min(Z.getLuminance(),Te.getLuminance())+.05)},s.isReadable=function(Y,ae,Z){var Te=s.readability(Y,ae),Pe,Ne;switch(Ne=!1,Pe=Ce(Z),Pe.level+Pe.size){case"AAsmall":case"AAAlarge":Ne=Te>=4.5;break;case"AAlarge":Ne=Te>=3;break;case"AAAsmall":Ne=Te>=7;break}return Ne},s.mostReadable=function(Y,ae,Z){var Te=null,Pe=0,Ne,lr,Ke,Je;Z=Z||{},lr=Z.includeFallbackColors,Ke=Z.level,Je=Z.size;for(var or=0;orPe&&(Pe=Ne,Te=s(ae[or]));return s.isReadable(Y,Te,{level:Ke,size:Je})||!lr?Te:(Z.includeFallbackColors=!1,s.mostReadable(Y,["#fff","#000"],Z))};var $=s.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"},j=s.hexNames=H($);function H(Y){var ae={};for(var Z in Y)Y.hasOwnProperty(Z)&&(ae[Y[Z]]=Z);return ae}function z(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function V(Y,ae){ve(Y)&&(Y="100%");var Z=xe(Y);return Y=i(ae,o(0,parseFloat(Y))),Z&&(Y=parseInt(Y*ae,10)/100),e.abs(Y-ae)<1e-6?1:Y%ae/parseFloat(ae)}function X(Y){return i(1,o(0,Y))}function K(Y){return parseInt(Y,16)}function ve(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function xe(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function se(Y){return Y.length==1?"0"+Y:""+Y}function be(Y){return Y<=1&&(Y=Y*100+"%"),Y}function re(Y){return e.round(parseFloat(Y)*255).toString(16)}function ke(Y){return K(Y)/255}var ge=function(){var Y="[-\\+]?\\d+%?",ae="[-\\+]?\\d*\\.\\d+%?",Z="(?:"+ae+")|(?:"+Y+")",Te="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?",Pe="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?";return{CSS_UNIT:new RegExp(Z),rgb:new RegExp("rgb"+Te),rgba:new RegExp("rgba"+Pe),hsl:new RegExp("hsl"+Te),hsla:new RegExp("hsla"+Pe),hsv:new RegExp("hsv"+Te),hsva:new RegExp("hsva"+Pe),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 Ee(Y){return!!ge.CSS_UNIT.exec(Y)}function De(Y){Y=Y.replace(r,"").replace(t,"").toLowerCase();var ae=!1;if($[Y])Y=$[Y],ae=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Z;return(Z=ge.rgb.exec(Y))?{r:Z[1],g:Z[2],b:Z[3]}:(Z=ge.rgba.exec(Y))?{r:Z[1],g:Z[2],b:Z[3],a:Z[4]}:(Z=ge.hsl.exec(Y))?{h:Z[1],s:Z[2],l:Z[3]}:(Z=ge.hsla.exec(Y))?{h:Z[1],s:Z[2],l:Z[3],a:Z[4]}:(Z=ge.hsv.exec(Y))?{h:Z[1],s:Z[2],v:Z[3]}:(Z=ge.hsva.exec(Y))?{h:Z[1],s:Z[2],v:Z[3],a:Z[4]}:(Z=ge.hex8.exec(Y))?{r:K(Z[1]),g:K(Z[2]),b:K(Z[3]),a:ke(Z[4]),format:ae?"name":"hex8"}:(Z=ge.hex6.exec(Y))?{r:K(Z[1]),g:K(Z[2]),b:K(Z[3]),format:ae?"name":"hex"}:(Z=ge.hex4.exec(Y))?{r:K(Z[1]+""+Z[1]),g:K(Z[2]+""+Z[2]),b:K(Z[3]+""+Z[3]),a:ke(Z[4]+""+Z[4]),format:ae?"name":"hex8"}:(Z=ge.hex3.exec(Y))?{r:K(Z[1]+""+Z[1]),g:K(Z[2]+""+Z[2]),b:K(Z[3]+""+Z[3]),format:ae?"name":"hex"}:!1}function Ce(Y){var ae,Z;return Y=Y||{level:"AA",size:"small"},ae=(Y.level||"AA").toUpperCase(),Z=(Y.size||"small").toLowerCase(),ae!=="AA"&&ae!=="AAA"&&(ae="AA"),Z!=="small"&&Z!=="large"&&(Z="small"),{level:ae,size:Z}}typeof Yy!="undefined"&&Yy.exports?Yy.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var hn=R(Kd=>{"use strict";var RM=Ru(),Jd=Array.isArray;function ane(e,r){var t,a;for(t=0;t{"use strict";PM.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var Qd=R((HMe,NM)=>{"use strict";NM.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var r0=R((VMe,zM)=>{"use strict";var IM=Qd(),OM=ci(),g_=OM({editType:"none"});g_.family.dflt=IM.HOVERFONT;g_.size.dflt=IM.HOVERFONTSIZE;zM.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:g_,grouptitlefont:OM({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var Xy=R((YMe,BM)=>{"use strict";var nne=ci(),Wy=r0().hoverlabel,jy=hn().extendFlat;BM.exports={hoverlabel:{bgcolor:jy({},Wy.bgcolor,{arrayOk:!0}),bordercolor:jy({},Wy.bordercolor,{arrayOk:!0}),font:nne({arrayOk:!0,editType:"none"}),align:jy({},Wy.align,{arrayOk:!0}),namelength:jy({},Wy.namelength,{arrayOk:!0}),editType:"none"}}});var hl=R((WMe,UM)=>{"use strict";var ine=ci(),one=Xy();UM.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:ine({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:one.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 fc=R((jMe,VM)=>{"use strict";var lne=vl(),Zy={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)"]]},GM=Zy.RdBu;function sne(e,r){if(r||(r=GM),!e)return r;function t(){try{e=Zy[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),HM(e)?e:r}function HM(e){var r=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 t=0;t{"use strict";cc.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];cc.defaultLine="#444";cc.lightLine="#eee";cc.background="#fff";cc.borderLine="#BEC8D9";cc.lightFraction=100*10/11});var Qt=R((ZMe,YM)=>{"use strict";var to=vl(),fne=ia(),cne=ro().isTypedArray,Wn=YM.exports={},Jy=Kl();Wn.defaults=Jy.defaults;var vne=Wn.defaultLine=Jy.defaultLine;Wn.lightLine=Jy.lightLine;var x_=Wn.background=Jy.background;Wn.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};Wn.rgb=function(e){return Wn.tinyRGB(to(e))};Wn.opacity=function(e){return e?to(e).getAlpha():0};Wn.addOpacity=function(e,r){var t=to(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};Wn.combine=function(e,r){var t=to(e).toRgb();if(t.a===1)return to(e).toRgbString();var a=to(r||x_).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return to(i).toRgbString()};Wn.interpolate=function(e,r,t){var a=to(e).toRgb(),n=to(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return to(i).toRgbString()};Wn.contrast=function(e,r,t){var a=to(e);a.getAlpha()!==1&&(a=to(Wn.combine(e,x_)));var n=a.isDark()?r?a.lighten(r):x_:t?a.darken(t):vne;return n.toString()};Wn.stroke=function(e,r){var t=to(r);e.style({stroke:Wn.tinyRGB(t),"stroke-opacity":t.getAlpha()})};Wn.fill=function(e,r){var t=to(r);e.style({fill:Wn.tinyRGB(t),"fill-opacity":t.getAlpha()})};Wn.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}});var t0=R((JMe,WM)=>{"use strict";WM.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var a0=R(jM=>{"use strict";jM.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var $M=R(ao=>{"use strict";var __=ia(),XM=vl(),ZM=hn().extendFlat,hne=hl(),dne=fc(),pne=Qt(),mne=t0().DESELECTDIM,n0=Gy(),JM=a0().counter,yne=e0().modHalf,Ql=ro().isArrayOrTypedArray,Pu=ro().isTypedArraySpec,Nu=ro().decodeTypedArraySpec;ao.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(Ql(e)?e:Pu(e)?Nu(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}Pu(e)&&(e=Nu(e)),e%1||!__(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Pu(e)&&(e=Nu(e)),XM(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return XM(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(dne.get(e,t))}},angle:{coerceFunction:function(e,r,t){Pu(e)&&(e=Nu(e)),e==="auto"?r.set("auto"):__(e)?r.set(yne(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||JM(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!JM(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var KM={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/"},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:{}}},QM={};function eS(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),eS(a,r[t]))}}eS(KM,QM);rS.exports={configAttributes:KM,dfltConfig:QM}});var A_=R((eSe,tS)=>{"use strict";var w_=ta(),gne=ia(),e1=[];tS.exports=function(e,r){if(e1.indexOf(e)!==-1)return;e1.push(e);var t=1e3;gne(r)?t=r:r==="long"&&(t=3e3);var a=w_.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(e1);function i(o){o.duration(700).style("opacity",0).each("end",function(l){var s=e1.indexOf(l);s!==-1&&e1.splice(s,1),w_.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=w_.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(i)});for(var s=l.append("p"),u=o.split(//g),f=0;f{"use strict";var i0=vc().dfltConfig,T_=A_(),M_=aS.exports={};M_.log=function(){var e;if(i0.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};M_.warn=function(){var e;if(i0.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};M_.error=function(){var e;if(i0.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var Ky=R((tSe,nS)=>{"use strict";nS.exports=function(){}});var S_=R((aSe,iS)=>{"use strict";iS.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{oS.exports=bne;function bne(){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 uS=R((iSe,sS)=>{sS.exports=xne;function xne(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var cS=R((oSe,fS)=>{fS.exports=_ne;function _ne(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var k_=R((lSe,vS)=>{vS.exports=wne;function wne(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 dS=R((sSe,hS)=>{hS.exports=Ane;function Ane(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],o=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=o,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var mS=R((uSe,pS)=>{pS.exports=Tne;function Tne(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],g=r[13],m=r[14],b=r[15],_=t*l-a*o,w=t*s-n*o,x=t*u-i*o,T=a*s-n*l,S=a*u-i*l,M=n*u-i*s,k=f*g-c*p,D=f*m-h*p,P=f*b-d*p,N=c*m-h*g,q=c*b-d*g,O=h*b-d*m,U=_*O-w*q+x*N+T*P-S*D+M*k;return U?(U=1/U,e[0]=(l*O-s*q+u*N)*U,e[1]=(n*q-a*O-i*N)*U,e[2]=(g*M-m*S+b*T)*U,e[3]=(h*S-c*M-d*T)*U,e[4]=(s*P-o*O-u*D)*U,e[5]=(t*O-n*P+i*D)*U,e[6]=(m*x-p*M-b*w)*U,e[7]=(f*M-h*x+d*w)*U,e[8]=(o*q-l*P+u*k)*U,e[9]=(a*P-t*q-i*k)*U,e[10]=(p*S-g*x+b*_)*U,e[11]=(c*x-f*S-d*_)*U,e[12]=(l*D-o*N-s*k)*U,e[13]=(t*N-a*D+n*k)*U,e[14]=(g*w-p*T-m*_)*U,e[15]=(f*T-c*w+h*_)*U,e):null}});var gS=R((fSe,yS)=>{yS.exports=Mne;function Mne(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],g=r[13],m=r[14],b=r[15];return e[0]=l*(h*b-d*m)-c*(s*b-u*m)+g*(s*d-u*h),e[1]=-(a*(h*b-d*m)-c*(n*b-i*m)+g*(n*d-i*h)),e[2]=a*(s*b-u*m)-l*(n*b-i*m)+g*(n*u-i*s),e[3]=-(a*(s*d-u*h)-l*(n*d-i*h)+c*(n*u-i*s)),e[4]=-(o*(h*b-d*m)-f*(s*b-u*m)+p*(s*d-u*h)),e[5]=t*(h*b-d*m)-f*(n*b-i*m)+p*(n*d-i*h),e[6]=-(t*(s*b-u*m)-o*(n*b-i*m)+p*(n*u-i*s)),e[7]=t*(s*d-u*h)-o*(n*d-i*h)+f*(n*u-i*s),e[8]=o*(c*b-d*g)-f*(l*b-u*g)+p*(l*d-u*c),e[9]=-(t*(c*b-d*g)-f*(a*b-i*g)+p*(a*d-i*c)),e[10]=t*(l*b-u*g)-o*(a*b-i*g)+p*(a*u-i*l),e[11]=-(t*(l*d-u*c)-o*(a*d-i*c)+f*(a*u-i*l)),e[12]=-(o*(c*m-h*g)-f*(l*m-s*g)+p*(l*h-s*c)),e[13]=t*(c*m-h*g)-f*(a*m-n*g)+p*(a*h-n*c),e[14]=-(t*(l*m-s*g)-o*(a*m-n*g)+p*(a*s-n*l)),e[15]=t*(l*h-s*c)-o*(a*h-n*c)+f*(a*s-n*l),e}});var xS=R((cSe,bS)=>{bS.exports=Sne;function Sne(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],g=e[14],m=e[15],b=r*o-t*i,_=r*l-a*i,w=r*s-n*i,x=t*l-a*o,T=t*s-n*o,S=a*s-n*l,M=u*p-f*d,k=u*g-c*d,D=u*m-h*d,P=f*g-c*p,N=f*m-h*p,q=c*m-h*g;return b*q-_*N+w*P+x*D-T*k+S*M}});var wS=R((vSe,_S)=>{_S.exports=kne;function kne(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=r[4],s=r[5],u=r[6],f=r[7],c=r[8],h=r[9],d=r[10],p=r[11],g=r[12],m=r[13],b=r[14],_=r[15],w=t[0],x=t[1],T=t[2],S=t[3];return e[0]=w*a+x*l+T*c+S*g,e[1]=w*n+x*s+T*h+S*m,e[2]=w*i+x*u+T*d+S*b,e[3]=w*o+x*f+T*p+S*_,w=t[4],x=t[5],T=t[6],S=t[7],e[4]=w*a+x*l+T*c+S*g,e[5]=w*n+x*s+T*h+S*m,e[6]=w*i+x*u+T*d+S*b,e[7]=w*o+x*f+T*p+S*_,w=t[8],x=t[9],T=t[10],S=t[11],e[8]=w*a+x*l+T*c+S*g,e[9]=w*n+x*s+T*h+S*m,e[10]=w*i+x*u+T*d+S*b,e[11]=w*o+x*f+T*p+S*_,w=t[12],x=t[13],T=t[14],S=t[15],e[12]=w*a+x*l+T*c+S*g,e[13]=w*n+x*s+T*h+S*m,e[14]=w*i+x*u+T*d+S*b,e[15]=w*o+x*f+T*p+S*_,e}});var TS=R((hSe,AS)=>{AS.exports=Cne;function Cne(e,r,t){var a=t[0],n=t[1],i=t[2],o,l,s,u,f,c,h,d,p,g,m,b;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(o=r[0],l=r[1],s=r[2],u=r[3],f=r[4],c=r[5],h=r[6],d=r[7],p=r[8],g=r[9],m=r[10],b=r[11],e[0]=o,e[1]=l,e[2]=s,e[3]=u,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=g,e[10]=m,e[11]=b,e[12]=o*a+f*n+p*i+r[12],e[13]=l*a+c*n+g*i+r[13],e[14]=s*a+h*n+m*i+r[14],e[15]=u*a+d*n+b*i+r[15]),e}});var SS=R((dSe,MS)=>{MS.exports=Ene;function Ene(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var CS=R((pSe,kS)=>{kS.exports=Lne;function Lne(e,r,t,a){var n=a[0],i=a[1],o=a[2],l=Math.sqrt(n*n+i*i+o*o),s,u,f,c,h,d,p,g,m,b,_,w,x,T,S,M,k,D,P,N,q,O,U,$;return Math.abs(l)<1e-6?null:(l=1/l,n*=l,i*=l,o*=l,s=Math.sin(t),u=Math.cos(t),f=1-u,c=r[0],h=r[1],d=r[2],p=r[3],g=r[4],m=r[5],b=r[6],_=r[7],w=r[8],x=r[9],T=r[10],S=r[11],M=n*n*f+u,k=i*n*f+o*s,D=o*n*f-i*s,P=n*i*f-o*s,N=i*i*f+u,q=o*i*f+n*s,O=n*o*f+i*s,U=i*o*f-n*s,$=o*o*f+u,e[0]=c*M+g*k+w*D,e[1]=h*M+m*k+x*D,e[2]=d*M+b*k+T*D,e[3]=p*M+_*k+S*D,e[4]=c*P+g*N+w*q,e[5]=h*P+m*N+x*q,e[6]=d*P+b*N+T*q,e[7]=p*P+_*N+S*q,e[8]=c*O+g*U+w*$,e[9]=h*O+m*U+x*$,e[10]=d*O+b*U+T*$,e[11]=p*O+_*U+S*$,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var LS=R((mSe,ES)=>{ES.exports=Dne;function Dne(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],o=r[5],l=r[6],s=r[7],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=o*n+f*a,e[6]=l*n+c*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=f*n-o*a,e[10]=c*n-l*a,e[11]=h*n-s*a,e}});var qS=R((ySe,DS)=>{DS.exports=qne;function qne(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=o*n-f*a,e[2]=l*n-c*a,e[3]=s*n-h*a,e[8]=i*a+u*n,e[9]=o*a+f*n,e[10]=l*a+c*n,e[11]=s*a+h*n,e}});var RS=R((gSe,FS)=>{FS.exports=Fne;function Fne(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[4],f=r[5],c=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=o*n+f*a,e[2]=l*n+c*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=f*n-o*a,e[6]=c*n-l*a,e[7]=h*n-s*a,e}});var NS=R((bSe,PS)=>{PS.exports=Rne;function Rne(e,r,t){var a,n,i,o=t[0],l=t[1],s=t[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,l*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=o*o*i+n,e[1]=l*o*i+s*a,e[2]=s*o*i-l*a,e[3]=0,e[4]=o*l*i-s*a,e[5]=l*l*i+n,e[6]=s*l*i+o*a,e[7]=0,e[8]=o*s*i+l*a,e[9]=l*s*i-o*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var OS=R((xSe,IS)=>{IS.exports=Pne;function Pne(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=a+a,s=n+n,u=i+i,f=a*l,c=a*s,h=a*u,d=n*s,p=n*u,g=i*u,m=o*l,b=o*s,_=o*u;return e[0]=1-(d+g),e[1]=c+_,e[2]=h-b,e[3]=0,e[4]=c-_,e[5]=1-(f+g),e[6]=p+m,e[7]=0,e[8]=h+b,e[9]=p-m,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var BS=R((_Se,zS)=>{zS.exports=Nne;function Nne(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var GS=R((wSe,US)=>{US.exports=Ine;function Ine(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var VS=R((ASe,HS)=>{HS.exports=One;function One(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var WS=R((TSe,YS)=>{YS.exports=zne;function zne(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var XS=R((MSe,jS)=>{jS.exports=Bne;function Bne(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 C_=R((SSe,ZS)=>{ZS.exports=Une;function Une(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=t+t,l=a+a,s=n+n,u=t*o,f=a*o,c=a*l,h=n*o,d=n*l,p=n*s,g=i*o,m=i*l,b=i*s;return e[0]=1-c-p,e[1]=f+b,e[2]=h-m,e[3]=0,e[4]=f-b,e[5]=1-u-p,e[6]=d+g,e[7]=0,e[8]=h+m,e[9]=d-g,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var $S=R((kSe,JS)=>{JS.exports=Gne;function Gne(e,r,t,a,n,i,o){var l=1/(t-r),s=1/(n-a),u=1/(i-o);return e[0]=i*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(n+a)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var QS=R((CSe,KS)=>{KS.exports=Hne;function Hne(e,r,t,a,n){var i=1/Math.tan(r/2),o=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*o,e[15]=0,e}});var rk=R((ESe,ek)=>{ek.exports=Vne;function Vne(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),o=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-l)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var ak=R((LSe,tk)=>{tk.exports=Yne;function Yne(e,r,t,a,n,i,o){var l=1/(r-t),s=1/(a-n),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(n+a)*s,e[14]=(o+i)*u,e[15]=1,e}});var ik=R((DSe,nk)=>{var Wne=k_();nk.exports=jne;function jne(e,r,t,a){var n,i,o,l,s,u,f,c,h,d,p=r[0],g=r[1],m=r[2],b=a[0],_=a[1],w=a[2],x=t[0],T=t[1],S=t[2];return Math.abs(p-x)<1e-6&&Math.abs(g-T)<1e-6&&Math.abs(m-S)<1e-6?Wne(e):(f=p-x,c=g-T,h=m-S,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,n=_*h-w*c,i=w*f-b*h,o=b*c-_*f,d=Math.sqrt(n*n+i*i+o*o),d?(d=1/d,n*=d,i*=d,o*=d):(n=0,i=0,o=0),l=c*o-h*i,s=h*n-f*o,u=f*i-c*n,d=Math.sqrt(l*l+s*s+u*u),d?(d=1/d,l*=d,s*=d,u*=d):(l=0,s=0,u=0),e[0]=n,e[1]=l,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+i*g+o*m),e[13]=-(l*p+s*g+u*m),e[14]=-(f*p+c*g+h*m),e[15]=1,e)}});var lk=R((qSe,ok)=>{ok.exports=Xne;function Xne(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 E_=R((FSe,sk)=>{sk.exports={create:lS(),clone:uS(),copy:cS(),identity:k_(),transpose:dS(),invert:mS(),adjoint:gS(),determinant:xS(),multiply:wS(),translate:TS(),scale:SS(),rotate:CS(),rotateX:LS(),rotateY:qS(),rotateZ:RS(),fromRotation:NS(),fromRotationTranslation:OS(),fromScaling:BS(),fromTranslation:GS(),fromXRotation:VS(),fromYRotation:WS(),fromZRotation:XS(),fromQuat:C_(),frustum:$S(),perspective:QS(),perspectiveFromFieldOfView:rk(),ortho:ak(),lookAt:ik(),str:lk()}});var Qy=R(dn=>{"use strict";var Zne=E_();dn.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var Jne=ta(),uk=hc(),$ne=Qy(),Kne=E_();function Qne(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function eie(e){var r=Jne.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function fk(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function rie(e,r){ck("global",e,r)}function ck(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):uk.warn("addStyleRule failed"):uk.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function tie(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&fk(t)}function aie(e,r,t,a,n){var i=a.split(":"),o=n.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(l)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[o[0]]=o[1])}),s.setAttribute(l,!0))})}function nie(e){var r=hk(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=vk(a);if(n){var i=$ne.convertCssMatrix(n);t=Kne.multiply(t,t,i)}}),t}function vk(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function hk(e){for(var r=[];iie(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function iie(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function oie(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}dk.exports={getGraphDiv:Qne,isPlotDiv:eie,removeElement:fk,addStyleRule:rie,addRelatedStyleRule:ck,deleteRelatedStyleRule:tie,setStyleOnHover:aie,getFullTransformMatrix:nie,getElementTransformMatrix:vk,getElementAndAncestors:hk,equalDomRects:oie}});var t1=R((NSe,pk)=>{"use strict";pk.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 dl=R((ISe,wk)=>{"use strict";var yk=hn().extendFlat,lie=Ru(),gk={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},bk={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},sie=gk.flags.slice().concat(["fullReplot"]),uie=bk.flags.slice().concat("layoutReplot");wk.exports={traces:gk,layout:bk,traceFlags:function(){return mk(sie)},layoutFlags:function(){return mk(uie)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";L_.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};L_.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 D_=R((zSe,Ak)=>{"use strict";Ak.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 o0=R(eg=>{"use strict";var Tk=D_(),BSe=Tk.FORMAT_LINK,USe=Tk.DATE_FORMAT_LINK;function q_(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function Ou(e,r){return r?r.d2l(e):e}function Mk(e,r){return r?r.l2d(e):e}function fie(e){return e.x0}function cie(e){return e.x1}function vie(e){return e.y0}function hie(e){return e.y1}function Sk(e){return e.x0shift||0}function kk(e){return e.x1shift||0}function Ck(e){return e.y0shift||0}function Ek(e){return e.y1shift||0}function rg(e,r){return Ou(e.x1,r)+kk(e)-Ou(e.x0,r)-Sk(e)}function tg(e,r,t){return Ou(e.y1,t)+Ek(e)-Ou(e.y0,t)-Ck(e)}function die(e,r){return Math.abs(rg(e,r))}function pie(e,r,t){return Math.abs(tg(e,r,t))}function mie(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(rg(e,r),2)+Math.pow(tg(e,r,t),2))}function yie(e,r){return Mk((Ou(e.x1,r)+kk(e)+Ou(e.x0,r)+Sk(e))/2,r)}function gie(e,r,t){return Mk((Ou(e.y1,t)+Ek(e)+Ou(e.y0,t)+Ck(e))/2,t)}function bie(e,r,t){return e.type!=="line"?void 0:tg(e,r,t)/rg(e,r)}Lk.exports={x0:fie,x1:cie,y0:vie,y1:hie,slope:bie,dx:rg,dy:tg,width:die,height:pie,length:mie,xcenter:yie,ycenter:gie}});var Fk=R((VSe,qk)=>{"use strict";var xie=dl().overrideAll,dc=hl(),Dk=ci(),_ie=Iu().dash,zu=hn().extendFlat,wie=o0().shapeTexttemplateAttrs,Aie=ag();qk.exports=xie({newshape:{visible:zu({},dc.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:zu({},dc.legend,{}),legendgroup:zu({},dc.legendgroup,{}),legendgrouptitle:{text:zu({},dc.legendgrouptitle.text,{}),font:Dk({})},legendrank:zu({},dc.legendrank,{}),legendwidth:zu({},dc.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:zu({},_ie,{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:zu({},dc.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:wie({newshape:!0},{keys:Object.keys(Aie)}),font:Dk({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Pk=R((YSe,Rk)=>{"use strict";var Tie=Iu().dash,Mie=hn().extendFlat;Rk.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:Mie({},Tie,{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 ng=R((WSe,Nk)=>{"use strict";Nk.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var l0=R((jSe,Bk)=>{"use strict";var F_=ci(),Sie=t1(),ig=Kl(),Ik=Fk(),Ok=Pk(),kie=ng(),zk=hn().extendFlat,og=F_({editType:"calc"});og.family.dflt='"Open Sans", verdana, arial, sans-serif';og.size.dflt=12;og.color.dflt=ig.defaultLine;Bk.exports={font:og,title:{text:{valType:"string",editType:"layoutstyle"},font:F_({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:F_({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:zk(kie({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:ig.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:ig.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:ig.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:Ik.newshape,activeshape:Ik.activeshape,newselection:Ok.newselection,activeselection:Ok.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:zk({},Sie.transition,{editType:"none"})}});var Uk=aM(()=>{});var Cie={};var Gk=aM(()=>{Uk()});var Ct=R(Xt=>{"use strict";var s0=hc(),Hk=Ky(),Vk=S_(),Eie=Ru(),Lie=r1().addStyleRule,Yk=hn(),Die=hl(),qie=l0(),Fie=Yk.extendFlat,R_=Yk.extendDeepAll;Xt.modules={};Xt.allCategories={};Xt.allTypes=[];Xt.subplotsRegistry={};Xt.componentsRegistry={};Xt.layoutArrayContainers=[];Xt.layoutArrayRegexes=[];Xt.traceLayoutAttributes={};Xt.localeRegistry={};Xt.apiMethodRegistry={};Xt.collectableSubplotTypes=null;Xt.register=function(r){if(Xt.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var zie=Kv().timeFormat,tC=ia(),P_=hc(),Uu=e0().mod,c0=_n(),Io=c0.BADNUM,no=c0.ONEDAY,a1=c0.ONEHOUR,Bu=c0.ONEMIN,f0=c0.ONESEC,n1=c0.EPOCHJD,Bs=Ct(),Jk=Kv().utcFormat,Bie=/^\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,Uie=/^\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,$k=new Date().getFullYear()-70;function Us(e){return e&&Bs.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}pn.dateTick0=function(e,r){var t=Gie(e,!!r);if(r<2)return t;var a=pn.dateTime2ms(t,e);return a+=no*(r-1),pn.ms2DateTime(a,0,e)};function Gie(e,r){return Us(e)?r?Bs.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Bs.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}pn.dfltRange=function(e){return Us(e)?Bs.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};pn.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var sg,ug;pn.dateTime2ms=function(e,r){if(pn.isJSDate(e)){var t=e.getTimezoneOffset()*Bu,a=(e.getUTCMinutes()-e.getMinutes())*Bu+(e.getUTCSeconds()-e.getSeconds())*f0+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*Bu;t=t-n/2+Uu(a-t+n/2,n)}return e=Number(e)-t,e>=sg&&e<=ug?e:Io}if(typeof e!="string"&&typeof e!="number")return Io;e=String(e);var i=Us(r),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.substr(1),r="");var l=i&&r.substr(0,7)==="chinese",s=e.match(l?Uie:Bie);if(!s)return Io;var u=s[1],f=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),p=Number(s[11]||0);if(i){if(u.length===2)return Io;u=Number(u);var g;try{var m=Bs.getComponentMethod("calendars","getCal")(r);if(l){var b=f.charAt(f.length-1)==="i";f=parseInt(f,10),g=m.newDate(u,m.toMonthIndex(u,f,b),c)}else g=m.newDate(u,Number(f),c)}catch(w){return Io}return g?(g.toJD()-n1)*no+h*a1+d*Bu+p*f0:Io}u.length===2?u=(Number(u)+2e3-$k)%100+$k:u=Number(u),f-=1;var _=new Date(Date.UTC(2e3,f,c,h,d));return _.setUTCFullYear(u),_.getUTCMonth()!==f||_.getUTCDate()!==c?Io:_.getTime()+p*f0};sg=pn.MIN_MS=pn.dateTime2ms("-9999");ug=pn.MAX_MS=pn.dateTime2ms("9999-12-31 23:59:59.9999");pn.isDateTime=function(e,r){return pn.dateTime2ms(e,r)!==Io};function u0(e,r){return String(e+Math.pow(10,r)).substr(1)}var lg=90*no,Kk=3*a1,Qk=5*Bu;pn.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=sg&&e<=ug))return Io;r||(r=0);var a=Math.floor(Uu(e+.05,1)*10),n=Math.round(e-a/10),i,o,l,s,u,f;if(Us(t)){var c=Math.floor(n/no)+n1,h=Math.floor(Uu(e,no));try{i=Bs.getComponentMethod("calendars","getCal")(t).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){i=Jk("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=r=sg+no&&e<=ug-no))return Io;var r=Math.floor(Uu(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=zie("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return aC(a,n,i,o,l)};function aC(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+u0(r,2)+":"+u0(t,2),(a||n)&&(e+=":"+u0(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+u0(n,i)}return e}pn.cleanDate=function(e,r,t){if(e===Io)return r;if(pn.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Us(t))return P_.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=pn.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!pn.isDateTime(e,t))return P_.error("unrecognized date",e),r;return e};var Hie=/%\d?f/g,Vie=/%h/g,Yie={1:"1",2:"1",3:"2",4:"2"};function eC(e,r,t,a){e=e.replace(Hie,function(i){var o=Math.min(+i.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return l});var n=new Date(Math.floor(r+.05));if(e=e.replace(Vie,function(){return Yie[t("%q")(n)]}),Us(a))try{e=Bs.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var Wie=[59,59.9,59.99,59.999,59.9999];function jie(e,r){var t=Uu(e+.05,no),a=u0(Math.floor(t/a1),2)+":"+u0(Uu(Math.floor(t/Bu),60),2);if(r!=="M"){tC(r)||(r=0);var n=Math.min(Uu(e/f0,60),Wie[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}pn.formatDate=function(e,r,t,a,n,i){if(n=Us(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` +"use strict";var Plotly=(()=>{var tM=Object.defineProperty;var Rae=Object.getOwnPropertyDescriptor;var Pae=Object.getOwnPropertyNames;var Nae=Object.prototype.hasOwnProperty;var aM=(e,r)=>()=>(e&&(r=e(e=0)),r);var R=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Iae=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Pae(r))!Nae.call(e,n)&&n!==t&&tM(e,n,{get:()=>r[n],enumerable:!(a=Rae(r,n))||a.enumerable});return e};var Oae=e=>Iae(tM({},"__esModule",{value:!0}),e);var Ry=R(nM=>{"use strict";nM.version="3.0.0-rc.0"});var oM=R((iM,Py)=>{(function(r,t,a){t[r]=t[r]||a(),typeof Py!="undefined"&&Py.exports?Py.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:iM,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(_,A,b,T){return Object.defineProperty(_,A,{value:b,writable:!0,configurable:T!==!1})}}catch(x){r=function(A,b,T){return A[b]=T,A}}a=function(){var _,A,b;function T(S,M){this.fn=S,this.self=M,this.next=void 0}return{add:function(M,k){b=new T(M,k),A?A.next=b:_=b,A=b,b=void 0},drain:function(){var M=_;for(_=A=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(x,_){a.add(x,_),t||(t=i(a.drain))}function l(x){var _,A=typeof x;return x!=null&&(A=="object"||A=="function")&&(_=x.then),typeof _=="function"?_:!1}function s(){for(var x=0;x0&&o(s,A))}catch(b){c.call(new d(A),b)}}}function c(x){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=x,_.state=2,_.chain.length>0&&o(s,_))}function h(x,_,A,b){for(var T=0;T<_.length;T++)(function(M){x.resolve(_[M]).then(function(D){A(M,D)},b)})(T)}function d(x){this.def=x,this.triggered=!1}function p(x){this.promise=x,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(x){if(typeof x!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new p(this);this.then=function(b,T){var S={success:typeof b=="function"?b:!0,failure:typeof T=="function"?T:!1};return S.promise=new this.constructor(function(k,D){if(typeof k!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=k,S.reject=D}),_.chain.push(S),_.state!==0&&o(s,_),S.promise},this.catch=function(b){return this.then(void 0,b)};try{x.call(void 0,function(b){f.call(_,b)},function(b){c.call(_,b)})}catch(A){c.call(_,A)}}var m=r({},"constructor",g,!1);return g.prototype=m,r(m,"__NPO__",0,!1),r(g,"resolve",function(_){var A=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new A(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");T(_)})}),r(g,"reject",function(_){return new this(function(b,T){if(typeof b!="function"||typeof T!="function")throw TypeError("Not a function");T(_)})}),r(g,"all",function(_){var A=this;return n.call(_)!="[object Array]"?A.reject(TypeError("Not an array")):_.length===0?A.resolve([]):new A(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");var M=_.length,k=Array(M),D=0;h(A,_,function(N,q){k[N]=q,++D===M&&T(k)},S)})}),r(g,"race",function(_){var A=this;return n.call(_)!="[object Array]"?A.reject(TypeError("Not an array")):new A(function(T,S){if(typeof T!="function"||typeof S!="function")throw TypeError("Not a function");h(A,_,function(k,D){T(D)},S)})}),g})});var ta=R((CMe,Ny)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(v){return r.call(v)},a=self.document;function n(v){return v&&(v.ownerDocument||v.document||v).documentElement}function i(v){return v&&(v.ownerDocument&&v.ownerDocument.defaultView||v.document&&v||v.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(v){t=function(y){for(var w=y.length,C=new Array(w);w--;)C[w]=y[w];return C}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(v){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(y,w){l.call(this,y,w+"")},o.setAttributeNS=function(y,w,C){s.call(this,y,w,C+"")},u.setProperty=function(y,w,C){f.call(this,y,w+"",C)}}e.ascending=c;function c(v,y){return vy?1:v>=y?0:NaN}e.descending=function(v,y){return yv?1:y>=v?0:NaN},e.min=function(v,y){var w=-1,C=v.length,E,L;if(arguments.length===1){for(;++w=L){E=L;break}for(;++wL&&(E=L)}else{for(;++w=L){E=L;break}for(;++wL&&(E=L)}return E},e.max=function(v,y){var w=-1,C=v.length,E,L;if(arguments.length===1){for(;++w=L){E=L;break}for(;++wE&&(E=L)}else{for(;++w=L){E=L;break}for(;++wE&&(E=L)}return E},e.extent=function(v,y){var w=-1,C=v.length,E,L,I;if(arguments.length===1){for(;++w=L){E=I=L;break}for(;++wL&&(E=L),I=L){E=I=L;break}for(;++wL&&(E=L),I1)return I/(z-1)},e.deviation=function(){var v=e.variance.apply(this,arguments);return v&&Math.sqrt(v)};function p(v){return{left:function(y,w,C,E){for(arguments.length<3&&(C=0),arguments.length<4&&(E=y.length);C>>1;v(y[L],w)<0?C=L+1:E=L}return C},right:function(y,w,C,E){for(arguments.length<3&&(C=0),arguments.length<4&&(E=y.length);C>>1;v(y[L],w)>0?E=L:C=L+1}return C}}}var g=p(c);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(v){return p(v.length===1?function(y,w){return c(v(y),w)}:v)},e.shuffle=function(v,y,w){(C=arguments.length)<3&&(w=v.length,C<2&&(y=0));for(var C=w-y,E,L;C;)L=Math.random()*C--|0,E=v[C+y],v[C+y]=v[L+y],v[L+y]=E;return v},e.permute=function(v,y){for(var w=y.length,C=new Array(w);w--;)C[w]=v[y[w]];return C},e.pairs=function(v){for(var y=0,w=v.length-1,C,E=v[0],L=new Array(w<0?0:w);y=0;)for(I=v[y],w=I.length;--w>=0;)L[--E]=I[w];return L};var x=Math.abs;e.range=function(v,y,w){if(arguments.length<3&&(w=1,arguments.length<2&&(y=v,v=0)),(y-v)/w===1/0)throw new Error("infinite range");var C=[],E=_(x(w)),L=-1,I;if(v*=E,y*=E,w*=E,w<0)for(;(I=v+w*++L)>y;)C.push(I/E);else for(;(I=v+w*++L)=y.length)return E?E.call(v,z):C?z.sort(C):z;for(var J=-1,Q=z.length,ee=y[X++],Me,qe,ne,he=new b,we;++J=y.length)return F;var X=[],J=w[z++];return F.forEach(function(Q,ee){X.push({key:Q,values:I(ee,z)})}),J?X.sort(function(Q,ee){return J(Q.key,ee.key)}):X}return v.map=function(F,z){return L(z,F,0)},v.entries=function(F){return I(L(e.map,F,0),0)},v.key=function(F){return y.push(F),v},v.sortKeys=function(F){return w[y.length-1]=F,v},v.sortValues=function(F){return C=F,v},v.rollup=function(F){return E=F,v},v},e.set=function(v){var y=new U;if(v)for(var w=0,C=v.length;w=0&&(C=v.slice(w+1),v=v.slice(0,w)),v)return arguments.length<2?this[v].on(C):this[v].on(C,y);if(arguments.length===2){if(y==null)for(v in this)this.hasOwnProperty(v)&&this[v].on(C,null);return this}};function K(v){var y=[],w=new b;function C(){for(var E=y,L=-1,I=E.length,F;++L=0&&(w=v.slice(0,y))!=="xmlns"&&(v=v.slice(y+1)),Te.hasOwnProperty(w)?{space:Te[w],local:v}:v}},Ce.attr=function(v,y){if(arguments.length<2){if(typeof v=="string"){var w=this.node();return v=e.ns.qualify(v),v.local?w.getAttributeNS(v.space,v.local):w.getAttribute(v)}for(y in v)this.each(Pe(y,v[y]));return this}return this.each(Pe(v,y))};function Pe(v,y){v=e.ns.qualify(v);function w(){this.removeAttribute(v)}function C(){this.removeAttributeNS(v.space,v.local)}function E(){this.setAttribute(v,y)}function L(){this.setAttributeNS(v.space,v.local,y)}function I(){var z=y.apply(this,arguments);z==null?this.removeAttribute(v):this.setAttribute(v,z)}function F(){var z=y.apply(this,arguments);z==null?this.removeAttributeNS(v.space,v.local):this.setAttributeNS(v.space,v.local,z)}return y==null?v.local?C:w:typeof y=="function"?v.local?F:I:v.local?L:E}function Ne(v){return v.trim().replace(/\s+/g," ")}Ce.classed=function(v,y){if(arguments.length<2){if(typeof v=="string"){var w=this.node(),C=(v=Ke(v)).length,E=-1;if(y=w.classList){for(;++E=0;)(L=w[C])&&(E&&E!==L.nextSibling&&E.parentNode.insertBefore(L,E),E=L);return this},Ce.sort=function(v){v=Oe.apply(this,arguments);for(var y=-1,w=this.length;++y=y&&(y=E+1);!(z=I[y])&&++y0&&(v=v.slice(0,E));var I=pr.get(v);I&&(v=I,L=mr);function F(){var J=this[C];J&&(this.removeEventListener(v,J,J.$),delete this[C])}function z(){var J=L(y,t(arguments));F.call(this),this.addEventListener(v,this[C]=J,J.$=w),J._=y}function X(){var J=new RegExp("^__on([^.]+)"+e.requote(v)+"$"),Q;for(var ee in this)if(Q=ee.match(J)){var Me=this[ee];this.removeEventListener(Q[1],Me,Me.$),delete this[ee]}}return E?y?z:F:y?V:X}var pr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&pr.forEach(function(v){"on"+v in a&&pr.remove(v)});function Tr(v,y){return function(w){var C=e.event;e.event=w,y[0]=this.__data__;try{v.apply(this,y)}finally{e.event=C}}}function mr(v,y){var w=Tr(v,y);return function(C){var E=this,L=C.relatedTarget;(!L||L!==E&&!(L.compareDocumentPosition(E)&8))&&w.call(E,C)}}var vr,Cr=0;function Ir(v){var y=".dragsuppress-"+ ++Cr,w="click"+y,C=e.select(i(v)).on("touchmove"+y,ve).on("dragstart"+y,ve).on("selectstart"+y,ve);if(vr==null&&(vr="onselectstart"in v?!1:H(v.style,"userSelect")),vr){var E=n(v).style,L=E[vr];E[vr]="none"}return function(I){if(C.on(y,null),vr&&(E[vr]=L),I){var F=function(){C.on(w,null)};C.on(w,function(){ve(),F()},!0),setTimeout(F,0)}}}e.mouse=function(v){return Ze(v,xe())};var Gr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ze(v,y){y.changedTouches&&(y=y.changedTouches[0]);var w=v.ownerSVGElement||v;if(w.createSVGPoint){var C=w.createSVGPoint();if(Gr<0){var E=i(v);if(E.scrollX||E.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=w[0][0].getScreenCTM();Gr=!(L.f||L.e),w.remove()}}return Gr?(C.x=y.pageX,C.y=y.pageY):(C.x=y.clientX,C.y=y.clientY),C=C.matrixTransform(v.getScreenCTM().inverse()),[C.x,C.y]}var I=v.getBoundingClientRect();return[y.clientX-I.left-v.clientLeft,y.clientY-I.top-v.clientTop]}e.touch=function(v,y,w){if(arguments.length<3&&(w=y,y=xe().changedTouches),y){for(var C=0,E=y.length,L;C0?1:v<0?-1:0}function aa(v,y,w){return(y[0]-v[0])*(w[1]-v[1])-(y[1]-v[1])*(w[0]-v[0])}function Qa(v){return v>1?0:v<-1?Ie:Math.acos(v)}function Ln(v){return v>1?$r:v<-1?-$r:Math.asin(v)}function si(v){return((v=Math.exp(v))-1/v)/2}function Dn(v){return((v=Math.exp(v))+1/v)/2}function Vi(v){return((v=Math.exp(2*v))-1)/(v+1)}function Bn(v){return(v=Math.sin(v/2))*v}var qn=Math.SQRT2,yi=2,_t=4;e.interpolateZoom=function(v,y){var w=v[0],C=v[1],E=v[2],L=y[0],I=y[1],F=y[2],z=L-w,X=I-C,J=z*z+X*X,Q,ee;if(J0&&(zr=zr.transition().duration(I)),zr.call(Re.event)}function it(){he&&he.domain(ne.range().map(function(zr){return(zr-v.x)/v.k}).map(ne.invert)),Fe&&Fe.domain(we.range().map(function(zr){return(zr-v.y)/v.k}).map(we.invert))}function ot(zr){F++||zr({type:"zoomstart"})}function qt(zr){it(),zr({type:"zoom",scale:v.k,translate:[v.x,v.y]})}function ct(zr){--F||(zr({type:"zoomend"}),w=null)}function kt(){var zr=this,Ft=qe.of(zr,arguments),Ut=0,ua=e.select(i(zr)).on(X,Hn).on(J,Qn),Ba=me(e.mouse(zr)),cn=Ir(zr);Xv.call(zr),ot(Ft);function Hn(){Ut=1,Pr(e.mouse(zr),Ba),qt(Ft)}function Qn(){ua.on(X,null).on(J,null),cn(Ut),ct(Ft)}}function ha(){var zr=this,Ft=qe.of(zr,arguments),Ut={},ua=0,Ba,cn=".zoom-"+e.event.changedTouches[0].identifier,Hn="touchmove"+cn,Qn="touchend"+cn,gi=[],G=e.select(zr),ie=Ir(zr);We(),ot(Ft),G.on(z,null).on(ee,We);function ue(){var $e=e.touches(zr);return Ba=v.k,$e.forEach(function(br){br.identifier in Ut&&(Ut[br.identifier]=me(br))}),$e}function We(){var $e=e.event.target;e.select($e).on(Hn,Qe).on(Qn,ar),gi.push($e);for(var br=e.event.changedTouches,Dr=0,qr=br.length;Dr1){var ft=Fr[0],Zr=Fr[1],hr=ft[0]-Zr[0],ze=ft[1]-Zr[1];ua=hr*hr+ze*ze}}function Qe(){var $e=e.touches(zr),br,Dr,qr,Fr;Xv.call(zr);for(var xt=0,ft=$e.length;xt1?1:y,w=w<0?0:w>1?1:w,E=w<=.5?w*(1+y):w+y-w*y,C=2*w-E;function L(F){return F>360?F-=360:F<0&&(F+=360),F<60?C+(E-C)*F/60:F<180?E:F<240?C+(E-C)*(240-F)/60:C}function I(F){return Math.round(L(F)*255)}return new ui(I(v+120),I(v),I(v-120))}e.hcl=on;function on(v,y,w){return this instanceof on?(this.h=+v,this.c=+y,void(this.l=+w)):arguments.length<2?v instanceof on?new on(v.h,v.c,v.l):v instanceof xn?As(v.l,v.a,v.b):As((v=jr((v=e.rgb(v)).r,v.g,v.b)).l,v.a,v.b):new on(v,y,w)}var Yi=on.prototype=new Xa;Yi.brighter=function(v){return new on(this.h,this.c,Math.min(100,this.l+Aa*(arguments.length?v:1)))},Yi.darker=function(v){return new on(this.h,this.c,Math.max(0,this.l-Aa*(arguments.length?v:1)))},Yi.rgb=function(){return Wi(this.h,this.c,this.l).rgb()};function Wi(v,y,w){return isNaN(v)&&(v=0),isNaN(y)&&(y=0),new xn(w,Math.cos(v*=St)*y,Math.sin(v)*y)}e.lab=xn;function xn(v,y,w){return this instanceof xn?(this.l=+v,this.a=+y,void(this.b=+w)):arguments.length<2?v instanceof xn?new xn(v.l,v.a,v.b):v instanceof on?Wi(v.h,v.c,v.l):jr((v=ui(v)).r,v.g,v.b):new xn(v,y,w)}var Aa=18,Un=.95047,_s=1,ws=1.08883,Bl=xn.prototype=new Xa;Bl.brighter=function(v){return new xn(Math.min(100,this.l+Aa*(arguments.length?v:1)),this.a,this.b)},Bl.darker=function(v){return new xn(Math.max(0,this.l-Aa*(arguments.length?v:1)),this.a,this.b)},Bl.rgb=function(){return _v(this.l,this.a,this.b)};function _v(v,y,w){var C=(v+16)/116,E=C+y/500,L=C-w/200;return E=Bf(E)*Un,C=Bf(C)*_s,L=Bf(L)*ws,new ui(ol(3.2404542*E-1.5371385*C-.4985314*L),ol(-.969266*E+1.8760108*C+.041556*L),ol(.0556434*E-.2040259*C+1.0572252*L))}function As(v,y,w){return v>0?new on(Math.atan2(w,y)*ea,Math.sqrt(y*y+w*w),v):new on(NaN,NaN,v)}function Bf(v){return v>.206893034?v*v*v:(v-4/29)/7.787037}function Uf(v){return v>.008856?Math.pow(v,1/3):7.787037*v+4/29}function ol(v){return Math.round(255*(v<=.00304?12.92*v:1.055*Math.pow(v,1/2.4)-.055))}e.rgb=ui;function ui(v,y,w){return this instanceof ui?(this.r=~~v,this.g=~~y,void(this.b=~~w)):arguments.length<2?v instanceof ui?new ui(v.r,v.g,v.b):jt(""+v,ui,en):new ui(v,y,w)}function ll(v){return new ui(v>>16,v>>8&255,v&255)}function Ts(v){return ll(v)+""}var go=ui.prototype=new Xa;go.brighter=function(v){v=Math.pow(.7,arguments.length?v:1);var y=this.r,w=this.g,C=this.b,E=30;return!y&&!w&&!C?new ui(E,E,E):(y&&y>4,C=C>>4|C,E=z&240,E=E>>4|E,L=z&15,L=L<<4|L):v.length===7&&(C=(z&16711680)>>16,E=(z&65280)>>8,L=z&255)),y(C,E,L))}function va(v,y,w){var C=Math.min(v/=255,y/=255,w/=255),E=Math.max(v,y,w),L=E-C,I,F,z=(E+C)/2;return L?(F=z<.5?L/(E+C):L/(2-E-C),v==E?I=(y-w)/L+(y0&&z<1?0:I),new Sa(I,F,z)}function jr(v,y,w){v=Gn(v),y=Gn(y),w=Gn(w);var C=Uf((.4124564*v+.3575761*y+.1804375*w)/Un),E=Uf((.2126729*v+.7151522*y+.072175*w)/_s),L=Uf((.0193339*v+.119192*y+.9503041*w)/ws);return xn(116*E-16,500*(C-E),200*(E-L))}function Gn(v){return(v/=255)<=.04045?v/12.92:Math.pow((v+.055)/1.055,2.4)}function Ea(v){var y=parseFloat(v);return v.charAt(v.length-1)==="%"?Math.round(y*2.55):y}var Fn=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});Fn.forEach(function(v,y){Fn.set(v,ll(y))});function Vt(v){return typeof v=="function"?v:function(){return v}}e.functor=Vt,e.xhr=bo($);function bo(v){return function(y,w,C){return arguments.length===2&&typeof w=="function"&&(C=w,w=null),Ul(y,w,v,C)}}function Ul(v,y,w,C){var E={},L=e.dispatch("beforesend","progress","load","error"),I={},F=new XMLHttpRequest,z=null;self.XDomainRequest&&!("withCredentials"in F)&&/^(http(s)?:)?\/\//.test(v)&&(F=new XDomainRequest),"onload"in F?F.onload=F.onerror=X:F.onreadystatechange=function(){F.readyState>3&&X()};function X(){var J=F.status,Q;if(!J&&E5(F)||J>=200&&J<300||J===304){try{Q=w.call(E,F)}catch(ee){L.error.call(E,ee);return}L.load.call(E,Q)}else L.error.call(E,F)}return F.onprogress=function(J){var Q=e.event;e.event=J;try{L.progress.call(E,F)}finally{e.event=Q}},E.header=function(J,Q){return J=(J+"").toLowerCase(),arguments.length<2?I[J]:(Q==null?delete I[J]:I[J]=Q+"",E)},E.mimeType=function(J){return arguments.length?(y=J==null?null:J+"",E):y},E.responseType=function(J){return arguments.length?(z=J,E):z},E.response=function(J){return w=J,E},["get","post"].forEach(function(J){E[J]=function(){return E.send.apply(E,[J].concat(t(arguments)))}}),E.send=function(J,Q,ee){if(arguments.length===2&&typeof Q=="function"&&(ee=Q,Q=null),F.open(J,v,!0),y!=null&&!("accept"in I)&&(I.accept=y+",*/*"),F.setRequestHeader)for(var Me in I)F.setRequestHeader(Me,I[Me]);return y!=null&&F.overrideMimeType&&F.overrideMimeType(y),z!=null&&(F.responseType=z),ee!=null&&E.on("error",ee).on("load",function(qe){ee(null,qe)}),L.beforesend.call(E,F),F.send(Q==null?null:Q),E},E.abort=function(){return F.abort(),E},e.rebind(E,L,"on"),C==null?E:E.get(Gl(C))}function Gl(v){return v.length===1?function(y,w){v(y==null?w:null)}:v}function E5(v){var y=v.responseType;return y&&y!=="text"?v.response:v.responseText}e.dsv=function(v,y){var w=new RegExp('["'+v+` +]`),C=v.charCodeAt(0);function E(X,J,Q){arguments.length<3&&(Q=J,J=null);var ee=Ul(X,y,J==null?L:I(J),Q);return ee.row=function(Me){return arguments.length?ee.response((J=Me)==null?L:I(Me)):J},ee}function L(X){return E.parse(X.responseText)}function I(X){return function(J){return E.parse(J.responseText,X)}}E.parse=function(X,J){var Q;return E.parseRows(X,function(ee,Me){if(Q)return Q(ee,Me-1);var qe=function(ne){for(var he={},we=ee.length,Fe=0;Fe=qe)return ee;if(Fe)return Fe=!1,Q;var cr=ne;if(X.charCodeAt(cr)===34){for(var Mr=cr;Mr++24?(isFinite(y)&&(clearTimeout(Do),Do=setTimeout(ks,y)),Ms=0):(Ms=1,wv(ks))}e.timer.flush=function(){Gf(),td()};function Gf(){for(var v=Date.now(),y=Pi;y;)v>=y.t&&y.c(v-y.t)&&(y.c=null),y=y.n;return v}function td(){for(var v,y=Pi,w=1/0;y;)y.c?(y.t=0;--F)ne.push(E[X[Q[F]][2]]);for(F=+Me;F1&&aa(v[w[C-2]],v[w[C-1]],v[E])<=0;)--C;w[C++]=E}return w.slice(0,C)}function L5(v,y){return v[0]-y[0]||v[1]-y[1]}e.geom.polygon=function(v){return re(v,Av),v};var Av=e.geom.polygon.prototype=[];Av.area=function(){for(var v=-1,y=this.length,w,C=this[y-1],E=0;++vye)F=F.L;else if(I=y-Nm(F,w),I>ye){if(!F.R){C=F;break}F=F.R}else{L>-ye?(C=F.P,E=F):I>-ye?(C=F,E=F.N):C=E=F;break}var z=nd(v);if(xo.insert(C,z),!(!C&&!E)){if(C===E){mu(C),E=nd(C.site),xo.insert(z,E),z.edge=E.edge=Wf(C.site,z.site),qo(C),qo(E);return}if(!E){z.edge=Wf(C.site,z.site);return}mu(C),mu(E);var X=C.site,J=X.x,Q=X.y,ee=v.x-J,Me=v.y-Q,qe=E.site,ne=qe.x-J,he=qe.y-Q,we=2*(ee*he-Me*ne),Fe=ee*ee+Me*Me,Re=ne*ne+he*he,me={x:(he*Fe-Me*Re)/we+J,y:(ee*Re-ne*Fe)/we+Q};yu(E.edge,X,qe,me),z.edge=Wf(X,v,null,me),E.edge=Wf(v,qe,null,me),qo(C),qo(E)}}function id(v,y){var w=v.site,C=w.x,E=w.y,L=E-y;if(!L)return C;var I=v.P;if(!I)return-1/0;w=I.site;var F=w.x,z=w.y,X=z-y;if(!X)return F;var J=F-C,Q=1/L-1/X,ee=J/X;return Q?(-ee+Math.sqrt(ee*ee-2*Q*(J*J/(-2*X)-z+X/2+E-L/2)))/Q+C:(C+F)/2}function Nm(v,y){var w=v.N;if(w)return id(w,y);var C=v.site;return C.y===y?C.x:1/0}function od(v){this.site=v,this.edges=[]}od.prototype.prepare=function(){for(var v=this.edges,y=v.length,w;y--;)w=v[y].edge,(!w.b||!w.a)&&v.splice(y,1);return v.sort(kv),v.length};function pu(v){for(var y=v[0][0],w=v[1][0],C=v[0][1],E=v[1][1],L,I,F,z,X=sl,J=X.length,Q,ee,Me,qe,ne,he;J--;)if(Q=X[J],!(!Q||!Q.prepare()))for(Me=Q.edges,qe=Me.length,ee=0;eeye||x(z-I)>ye)&&(Me.splice(ee,0,new Cv(F5(Q.site,he,x(F-y)ye?{x:y,y:x(L-y)ye?{x:x(I-E)ye?{x:w,y:x(L-w)ye?{x:x(I-C)=-Ge)){var ee=z*z+X*X,Me=J*J+he*he,qe=(he*ee-X*Me)/Q,ne=(z*Me-J*ee)/Q,he=ne+F,we=Mv.pop()||new ld;we.arc=v,we.site=E,we.x=qe+I,we.y=he+Math.sqrt(qe*qe+ne*ne),we.cy=he,v.circle=we;for(var Fe=null,Re=Cs._;Re;)if(we.y0)){if(ne/=Me,Me<0){if(ne0){if(ne>ee)return;ne>Q&&(Q=ne)}if(ne=w-F,!(!Me&&ne<0)){if(ne/=Me,Me<0){if(ne>ee)return;ne>Q&&(Q=ne)}else if(Me>0){if(ne0)){if(ne/=qe,qe<0){if(ne0){if(ne>ee)return;ne>Q&&(Q=ne)}if(ne=C-z,!(!qe&&ne<0)){if(ne/=qe,qe<0){if(ne>ee)return;ne>Q&&(Q=ne)}else if(qe>0){if(ne0&&(E.a={x:F+Q*Me,y:z+Q*qe}),ee<1&&(E.b={x:F+ee*Me,y:z+ee*qe}),E}}}}}}function q5(v){for(var y=Vl,w=D5(v[0][0],v[0][1],v[1][0],v[1][1]),C=y.length,E;C--;)E=y[C],(!sd(E,v)||!w(E)||x(E.a.x-E.b.x)=L)return;if(J>ee){if(!C)C={x:qe,y:I};else if(C.y>=F)return;w={x:qe,y:F}}else{if(!C)C={x:qe,y:F};else if(C.y1)if(J>ee){if(!C)C={x:(I-we)/he,y:I};else if(C.y>=F)return;w={x:(F-we)/he,y:F}}else{if(!C)C={x:(F-we)/he,y:F};else if(C.y=L)return;w={x:L,y:he*L+we}}else{if(!C)C={x:L,y:he*L+we};else if(C.x=J&&we.x<=ee&&we.y>=Q&&we.y<=Me?[[J,Me],[ee,Me],[ee,Q],[J,Q]]:[];Fe.point=z[ne]}),X}function F(z){return z.map(function(X,J){return{x:Math.round(C(X,J)/ye)*ye,y:Math.round(E(X,J)/ye)*ye,i:J}})}return I.links=function(z){return bu(F(z)).edges.filter(function(X){return X.l&&X.r}).map(function(X){return{source:z[X.l.i],target:z[X.r.i]}})},I.triangles=function(z){var X=[];return bu(F(z)).cells.forEach(function(J,Q){for(var ee=J.site,Me=J.edges.sort(kv),qe=-1,ne=Me.length,he,we,Fe=Me[ne-1].edge,Re=Fe.l===ee?Fe.r:Fe.l;++qeRe&&(Re=J.x),J.y>me&&(me=J.y),Me.push(J.x),qe.push(J.y);else for(ne=0;neRe&&(Re=cr),Mr>me&&(me=Mr),Me.push(cr),qe.push(Mr)}var Pr=Re-we,Yr=me-Fe;Pr>Yr?me=Fe+Pr:Re=we+Yr;function it(ct,kt,ha,tn,xa,zr,Ft,Ut){if(!(isNaN(ha)||isNaN(tn)))if(ct.leaf){var ua=ct.x,Ba=ct.y;if(ua!=null)if(x(ua-ha)+x(Ba-tn)<.01)ot(ct,kt,ha,tn,xa,zr,Ft,Ut);else{var cn=ct.point;ct.x=ct.y=ct.point=null,ot(ct,cn,ua,Ba,xa,zr,Ft,Ut),ot(ct,kt,ha,tn,xa,zr,Ft,Ut)}else ct.x=ha,ct.y=tn,ct.point=kt}else ot(ct,kt,ha,tn,xa,zr,Ft,Ut)}function ot(ct,kt,ha,tn,xa,zr,Ft,Ut){var ua=(xa+Ft)*.5,Ba=(zr+Ut)*.5,cn=ha>=ua,Hn=tn>=Ba,Qn=Hn<<1|cn;ct.leaf=!1,ct=ct.nodes[Qn]||(ct.nodes[Qn]=zm()),cn?xa=ua:Ft=ua,Hn?zr=Ba:Ut=Ba,it(ct,kt,ha,tn,xa,zr,Ft,Ut)}var qt=zm();if(qt.add=function(ct){it(qt,ct,+Q(ct,++ne),+ee(ct,ne),we,Fe,Re,me)},qt.visit=function(ct){Zf(ct,qt,we,Fe,Re,me)},qt.find=function(ct){return Bm(qt,ct[0],ct[1],we,Fe,Re,me)},ne=-1,y==null){for(;++neL||ee>I||Me=cr,Yr=w>=Mr,it=Yr<<1|Pr,ot=it+4;itw&&(L=y.slice(w,L),F[I]?F[I]+=L:F[++I]=L),(C=C[0])===(E=E[0])?F[I]?F[I]+=E:F[++I]=E:(F[++I]=null,z.push({i:I,x:ji(C,E)})),w=Lv.lastIndex;return w=0&&!(C=e.interpolators[w](v,y)););return C}e.interpolators=[function(v,y){var w=typeof y;return(w==="string"?Fn.has(y.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(y)?Ls:Xi:y instanceof Xa?Ls:Array.isArray(y)?Jf:w==="object"&&isNaN(y)?Um:ji)(v,y)}],e.interpolateArray=Jf;function Jf(v,y){var w=[],C=[],E=v.length,L=y.length,I=Math.min(v.length,y.length),F;for(F=0;F=0?v.slice(0,y):v,C=y>=0?v.slice(y+1):"in";return w=Gm.get(w)||ud,C=Hm.get(C)||$,O5(C(w.apply(null,r.call(arguments,1))))};function O5(v){return function(y){return y<=0?0:y>=1?1:v(y)}}function Ds(v){return function(y){return 1-v(1-y)}}function Rn(v){return function(y){return .5*(y<.5?v(2*y):2-v(2-2*y))}}function Vm(v){return v*v}function Ym(v){return v*v*v}function qs(v){if(v<=0)return 0;if(v>=1)return 1;var y=v*v,w=y*v;return 4*(v<.5?w:3*(v-y)+w-.75)}function Wm(v){return function(y){return Math.pow(y,v)}}function jm(v){return 1-Math.cos(v*$r)}function z5(v){return Math.pow(2,10*(v-1))}function B5(v){return 1-Math.sqrt(1-v*v)}function U5(v,y){var w;return arguments.length<2&&(y=.45),arguments.length?w=y/Wr*Math.asin(1/v):(v=1,w=y/4),function(C){return 1+v*Math.pow(2,-10*C)*Math.sin((C-w)*Wr/y)}}function G5(v){return v||(v=1.70158),function(y){return y*y*((v+1)*y-v)}}function fd(v){return v<1/2.75?7.5625*v*v:v<2/2.75?7.5625*(v-=1.5/2.75)*v+.75:v<2.5/2.75?7.5625*(v-=2.25/2.75)*v+.9375:7.5625*(v-=2.625/2.75)*v+.984375}e.interpolateHcl=Xm;function Xm(v,y){v=e.hcl(v),y=e.hcl(y);var w=v.h,C=v.c,E=v.l,L=y.h-w,I=y.c-C,F=y.l-E;return isNaN(I)&&(I=0,C=isNaN(C)?y.c:C),isNaN(L)?(L=0,w=isNaN(w)?y.h:w):L>180?L-=360:L<-180&&(L+=360),function(z){return Wi(w+L*z,C+I*z,E+F*z)+""}}e.interpolateHsl=H5;function H5(v,y){v=e.hsl(v),y=e.hsl(y);var w=v.h,C=v.s,E=v.l,L=y.h-w,I=y.s-C,F=y.l-E;return isNaN(I)&&(I=0,C=isNaN(C)?y.s:C),isNaN(L)?(L=0,w=isNaN(w)?y.h:w):L>180?L-=360:L<-180&&(L+=360),function(z){return en(w+L*z,C+I*z,E+F*z)+""}}e.interpolateLab=Zm;function Zm(v,y){v=e.lab(v),y=e.lab(y);var w=v.l,C=v.a,E=v.b,L=y.l-w,I=y.a-C,F=y.b-E;return function(z){return _v(w+L*z,C+I*z,E+F*z)+""}}e.interpolateRound=cd;function cd(v,y){return y-=v,function(w){return Math.round(v+y*w)}}e.transform=function(v){var y=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(w){if(w!=null){y.setAttribute("transform",w);var C=y.transform.baseVal.consolidate()}return new Jm(C?C.matrix:Dv)})(v)};function Jm(v){var y=[v.a,v.b],w=[v.c,v.d],C=$m(y),E=$f(y,w),L=$m(jl(w,y,-E))||0;y[0]*w[1]180?y+=360:y-v>180&&(v+=360),C.push({i:w.push(Fs(w)+"rotate(",null,")")-2,x:ji(v,y)})):y&&w.push(Fs(w)+"rotate("+y+")")}function ey(v,y,w,C){v!==y?C.push({i:w.push(Fs(w)+"skewX(",null,")")-2,x:ji(v,y)}):y&&w.push(Fs(w)+"skewX("+y+")")}function ry(v,y,w,C){if(v[0]!==y[0]||v[1]!==y[1]){var E=w.push(Fs(w)+"scale(",null,",",null,")");C.push({i:E-4,x:ji(v[0],y[0])},{i:E-2,x:ji(v[1],y[1])})}else(y[0]!==1||y[1]!==1)&&w.push(Fs(w)+"scale("+y+")")}function vd(v,y){var w=[],C=[];return v=e.transform(v),y=e.transform(y),Km(v.translate,y.translate,w,C),Qm(v.rotate,y.rotate,w,C),ey(v.skew,y.skew,w,C),ry(v.scale,y.scale,w,C),v=y=null,function(E){for(var L=-1,I=C.length,F;++L0?L=me:(w.c=null,w.t=NaN,w=null,y.end({type:"end",alpha:L=0})):me>0&&(y.start({type:"start",alpha:L=me}),w=Ss(v.tick)),v):L},v.start=function(){var me,cr=Me.length,Mr=qe.length,Pr=C[0],Yr=C[1],it,ot;for(me=0;me=0;)L.push(J=X[z]),J.parent=F,J.depth=F.depth+1;w&&(F.value=0),F.children=X}else w&&(F.value=+w.call(C,F,F.depth)||0),delete F.children;return Fo(E,function(Q){var ee,Me;v&&(ee=Q.children)&&ee.sort(v),w&&(Me=Q.parent)&&(Me.value+=Q.value)}),I}return C.sort=function(E){return arguments.length?(v=E,C):v},C.children=function(E){return arguments.length?(y=E,C):y},C.value=function(E){return arguments.length?(w=E,C):w},C.revalue=function(E){return w&&(Kf(E,function(L){L.children&&(L.value=0)}),Fo(E,function(L){var I;L.children||(L.value=+w.call(C,L,L.depth)||0),(I=L.parent)&&(I.value+=L.value)})),E},C};function _u(v,y){return e.rebind(v,y,"sort","children","value"),v.nodes=v,v.links=X5,v}function Kf(v,y){for(var w=[v];(v=w.pop())!=null;)if(y(v),(E=v.children)&&(C=E.length))for(var C,E;--C>=0;)w.push(E[C])}function Fo(v,y){for(var w=[v],C=[];(v=w.pop())!=null;)if(C.push(v),(I=v.children)&&(L=I.length))for(var E=-1,L,I;++EE&&(E=F),C.push(F)}for(I=0;IC&&(w=y,C=E);return w}function $5(v){return v.reduce(K5,0)}function K5(v,y){return v+y[1]}e.layout.histogram=function(){var v=!0,y=Number,w=e_,C=Q5;function E(L,ee){for(var F=[],z=L.map(y,this),X=w.call(this,z,ee),J=C.call(this,X,z,ee),Q,ee=-1,Me=z.length,qe=J.length-1,ne=v?1:1/Me,he;++ee0)for(ee=-1;++ee=X[0]&&he<=X[1]&&(Q=F[e.bisect(J,he,1,qe)-1],Q.y+=ne,Q.push(L[ee]));return F}return E.value=function(L){return arguments.length?(y=L,E):y},E.range=function(L){return arguments.length?(w=Vt(L),E):w},E.bins=function(L){return arguments.length?(C=typeof L=="number"?function(I){return cy(I,L)}:Vt(L),E):C},E.frequency=function(L){return arguments.length?(v=!!L,E):v},E};function Q5(v,y){return cy(v,Math.ceil(Math.log(y.length)/Math.LN2+1))}function cy(v,y){for(var w=-1,C=+v[0],E=(v[1]-C)/y,L=[];++w<=y;)L[w]=E*w+C;return L}function e_(v){return[e.min(v),e.max(v)]}e.layout.pack=function(){var v=e.layout.hierarchy().sort(md),y=0,w=[1,1],C;function E(L,I){var F=v.call(this,L,I),z=F[0],X=w[0],J=w[1],Q=C==null?Math.sqrt:typeof C=="function"?C:function(){return C};if(z.x=z.y=0,Fo(z,function(Me){Me.r=+Q(Me.value)}),Fo(z,hy),y){var ee=y*(C?1:Math.max(2*z.r/X,2*z.r/J))/2;Fo(z,function(Me){Me.r+=ee}),Fo(z,hy),Fo(z,function(Me){Me.r-=ee})}return dy(z,X/2,J/2,C?1:1/Math.max(2*z.r/X,2*z.r/J)),F}return E.size=function(L){return arguments.length?(w=L,E):w},E.radius=function(L){return arguments.length?(C=L==null||typeof L=="function"?L:+L,E):C},E.padding=function(L){return arguments.length?(y=+L,E):y},_u(E,v)};function md(v,y){return v.value-y.value}function yd(v,y){var w=v._pack_next;v._pack_next=y,y._pack_prev=v,y._pack_next=w,w._pack_prev=y}function gd(v,y){v._pack_next=y,y._pack_prev=v}function vy(v,y){var w=y.x-v.x,C=y.y-v.y,E=v.r+y.r;return .999*E*E>w*w+C*C}function hy(v){if(!(y=v.children)||!(ee=y.length))return;var y,w=1/0,C=-1/0,E=1/0,L=-1/0,I,F,z,X,J,Q,ee;function Me(me){w=Math.min(me.x-me.r,w),C=Math.max(me.x+me.r,C),E=Math.min(me.y-me.r,E),L=Math.max(me.y+me.r,L)}if(y.forEach(r_),I=y[0],I.x=-I.r,I.y=0,Me(I),ee>1&&(F=y[1],F.x=F.r,F.y=0,Me(F),ee>2))for(z=y[2],a_(I,F,z),Me(z),yd(I,z),I._pack_prev=z,yd(z,F),F=I._pack_next,X=3;Xhe.x&&(he=cr),cr.depth>we.depth&&(we=cr)});var Fe=y(ne,he)/2-ne.x,Re=w[0]/(he.x+y(he,ne)/2+Fe),me=w[1]/(we.depth||1);Kf(Me,function(cr){cr.x=(cr.x+Fe)*Re,cr.y=cr.depth*me})}return ee}function L(J){for(var Q={A:null,children:[J]},ee=[Q],Me;(Me=ee.pop())!=null;)for(var qe=Me.children,ne,he=0,we=qe.length;he0&&(n_(gy(ne,J,ee),J,cr),we+=cr,Fe+=cr),Re+=ne.m,we+=Me.m,me+=he.m,Fe+=qe.m;ne&&!yy(qe)&&(qe.t=ne,qe.m+=Re-Fe),Me&&!my(he)&&(he.t=Me,he.m+=we-me,ee=J)}return ee}function X(J){J.x*=w[0],J.y=J.depth*w[1]}return E.separation=function(J){return arguments.length?(y=J,E):y},E.size=function(J){return arguments.length?(C=(w=J)==null?X:null,E):C?null:w},E.nodeSize=function(J){return arguments.length?(C=(w=J)==null?null:X,E):C?w:null},_u(E,v)};function py(v,y){return v.parent==y.parent?1:2}function my(v){var y=v.children;return y.length?y[0]:v.t}function yy(v){var y=v.children,w;return(w=y.length)?y[w-1]:v.t}function n_(v,y,w){var C=w/(y.i-v.i);y.c-=C,y.s+=w,v.c+=C,y.z+=w,y.m+=w}function bd(v){for(var y=0,w=0,C=v.children,E=C.length,L;--E>=0;)L=C[E],L.z+=y,L.m+=y,y+=L.s+(w+=L.c)}function gy(v,y,w){return v.a.parent===y.parent?v.a:w}e.layout.cluster=function(){var v=e.layout.hierarchy().sort(null).value(null),y=py,w=[1,1],C=!1;function E(L,I){var F=v.call(this,L,I),z=F[0],X,J=0;Fo(z,function(ne){var he=ne.children;he&&he.length?(ne.x=by(he),ne.y=Ro(he)):(ne.x=X?J+=y(ne,X):0,ne.y=0,X=ne)});var Q=xy(z),ee=_y(z),Me=Q.x-y(Q,ee)/2,qe=ee.x+y(ee,Q)/2;return Fo(z,C?function(ne){ne.x=(ne.x-z.x)*w[0],ne.y=(z.y-ne.y)*w[1]}:function(ne){ne.x=(ne.x-Me)/(qe-Me)*w[0],ne.y=(1-(z.y?ne.y/z.y:1))*w[1]}),F}return E.separation=function(L){return arguments.length?(y=L,E):y},E.size=function(L){return arguments.length?(C=(w=L)==null,E):C?null:w},E.nodeSize=function(L){return arguments.length?(C=(w=L)!=null,E):C?w:null},_u(E,v)};function Ro(v){return 1+e.max(v,function(y){return y.y})}function by(v){return v.reduce(function(y,w){return y+w.x},0)/v.length}function xy(v){var y=v.children;return y&&y.length?xy(y[0]):v}function _y(v){var y=v.children,w;return y&&(w=y.length)?_y(y[w-1]):v}e.layout.treemap=function(){var v=e.layout.hierarchy(),y=Math.round,w=[1,1],C=null,E=xd,L=!1,I,F="squarify",z=.5*(1+Math.sqrt(5));function X(ne,he){for(var we=-1,Fe=ne.length,Re,me;++we0;)Fe.push(me=Re[Yr-1]),Fe.area+=me.area,F!=="squarify"||(Mr=ee(Fe,Pr))<=cr?(Re.pop(),cr=Mr):(Fe.area-=Fe.pop().area,Me(Fe,Pr,we,!1),Pr=Math.min(we.dx,we.dy),Fe.length=Fe.area=0,cr=1/0);Fe.length&&(Me(Fe,Pr,we,!0),Fe.length=Fe.area=0),he.forEach(J)}}function Q(ne){var he=ne.children;if(he&&he.length){var we=E(ne),Fe=he.slice(),Re,me=[];for(X(Fe,we.dx*we.dy/ne.value),me.area=0;Re=Fe.pop();)me.push(Re),me.area+=Re.area,Re.z!=null&&(Me(me,Re.z?we.dx:we.dy,we,!Fe.length),me.length=me.area=0);he.forEach(Q)}}function ee(ne,he){for(var we=ne.area,Fe,Re=0,me=1/0,cr=-1,Mr=ne.length;++crRe&&(Re=Fe));return we*=we,he*=he,we?Math.max(he*Re*z/we,we/(he*me*z)):1/0}function Me(ne,he,we,Fe){var Re=-1,me=ne.length,cr=we.x,Mr=we.y,Pr=he?y(ne.area/he):0,Yr;if(he==we.dx){for((Fe||Pr>we.dy)&&(Pr=we.dy);++Rewe.dx)&&(Pr=we.dx);++Re1);return v+y*C*Math.sqrt(-2*Math.log(L)/L)}},logNormal:function(){var v=e.random.normal.apply(e,arguments);return function(){return Math.exp(v())}},bates:function(v){var y=e.random.irwinHall(v);return function(){return y()/v}},irwinHall:function(v){return function(){for(var y=0,w=0;w2?Tu:i_,X=C?ay:ty;return E=z(v,y,X,w),L=z(y,v,X,Wl),F}function F(z){return E(z)}return F.invert=function(z){return L(z)},F.domain=function(z){return arguments.length?(v=z.map(Number),I()):v},F.range=function(z){return arguments.length?(y=z,I()):y},F.rangeRound=function(z){return F.range(z).interpolate(cd)},F.clamp=function(z){return arguments.length?(C=z,I()):C},F.interpolate=function(z){return arguments.length?(w=z,I()):w},F.ticks=function(z){return ec(v,z)},F.tickFormat=function(z,X){return d3_scale_linearTickFormat(v,z,X)},F.nice=function(z){return _d(v,z),I()},F.copy=function(){return Ay(v,y,w,C)},I()}function Rs(v,y){return e.rebind(v,y,"range","rangeRound","interpolate","clamp")}function _d(v,y){return wu(v,Pn(Xl(v,y)[2])),wu(v,Pn(Xl(v,y)[2])),v}function Xl(v,y){y==null&&(y=10);var w=Pv(v),C=w[1]-w[0],E=Math.pow(10,Math.floor(Math.log(C/y)/Math.LN10)),L=y/C*E;return L<=.15?E*=10:L<=.35?E*=5:L<=.75&&(E*=2),w[0]=Math.ceil(w[0]/E)*E,w[1]=Math.floor(w[1]/E)*E+E*.5,w[2]=E,w}function ec(v,y){return e.range.apply(e,Xl(v,y))}var wd={s:1,g:1,p:1,r:1,e:1};function Iv(v){return-Math.floor(Math.log(v)/Math.LN10+.01)}function Ty(v,y){var w=Iv(y[2]);return v in wd?Math.abs(w-Iv(Math.max(x(y[0]),x(y[1]))))+ +(v!=="e"):w-(v==="%")*2}e.scale.log=function(){return Ov(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Ov(v,y,w,C){function E(F){return(w?Math.log(F<0?0:F):-Math.log(F>0?0:-F))/Math.log(y)}function L(F){return w?Math.pow(y,F):-Math.pow(y,-F)}function I(F){return v(E(F))}return I.invert=function(F){return L(v.invert(F))},I.domain=function(F){return arguments.length?(w=F[0]>=0,v.domain((C=F.map(Number)).map(E)),I):C},I.base=function(F){return arguments.length?(y=+F,v.domain(C.map(E)),I):y},I.nice=function(){var F=wu(C.map(E),w?Math:zv);return v.domain(F),C=F.map(L),I},I.ticks=function(){var F=Pv(C),z=[],X=F[0],J=F[1],Q=Math.floor(E(X)),ee=Math.ceil(E(J)),Me=y%1?2:y;if(isFinite(ee-Q)){if(w){for(;Q0;qe--)z.push(L(Q)*qe);for(Q=0;z[Q]J;ee--);z=z.slice(Q,ee)}return z},I.copy=function(){return Ov(v.copy(),y,w,C)},Rs(I,v)}var zv={floor:function(v){return-Math.ceil(-v)},ceil:function(v){return-Math.floor(-v)}};e.scale.pow=function(){return Ad(e.scale.linear(),1,[0,1])};function Ad(v,y,w){var C=rc(y),E=rc(1/y);function L(I){return v(C(I))}return L.invert=function(I){return E(v.invert(I))},L.domain=function(I){return arguments.length?(v.domain((w=I.map(Number)).map(C)),L):w},L.ticks=function(I){return ec(w,I)},L.tickFormat=function(I,F){return d3_scale_linearTickFormat(w,I,F)},L.nice=function(I){return L.domain(_d(w,I))},L.exponent=function(I){return arguments.length?(C=rc(y=I),E=rc(1/y),v.domain(w.map(C)),L):y},L.copy=function(){return Ad(v.copy(),y,w)},Rs(L,v)}function rc(v){return function(y){return y<0?-Math.pow(-y,v):Math.pow(y,v)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Td([],{t:"range",a:[[]]})};function Td(v,y){var w,C,E;function L(F){return C[((w.get(F)||(y.t==="range"?w.set(F,v.push(F)):NaN))-1)%C.length]}function I(F,z){return e.range(v.length).map(function(X){return F+z*X})}return L.domain=function(F){if(!arguments.length)return v;v=[],w=new b;for(var z=-1,X=F.length,J;++z0?w[L-1]:v[0],Lee?0:1;if(J=tt)return z(J,qe)+(X?z(X,1-qe):"")+"Z";var ne,he,we,Fe,Re=0,me=0,cr,Mr,Pr,Yr,it,ot,qt,ct,kt=[];if((Fe=(+I.apply(this,arguments)||0)/2)&&(we=C===tc?Math.sqrt(X*X+J*J):+C.apply(this,arguments),qe||(me*=-1),J&&(me=Ln(we/J*Math.sin(Fe))),X&&(Re=Ln(we/X*Math.sin(Fe)))),J){cr=J*Math.cos(Q+me),Mr=J*Math.sin(Q+me),Pr=J*Math.cos(ee-me),Yr=J*Math.sin(ee-me);var ha=Math.abs(ee-Q-2*me)<=Ie?0:1;if(me&&ac(cr,Mr,Pr,Yr)===qe^ha){var tn=(Q+ee)/2;cr=J*Math.cos(tn),Mr=J*Math.sin(tn),Pr=Yr=null}}else cr=Mr=0;if(X){it=X*Math.cos(ee-Re),ot=X*Math.sin(ee-Re),qt=X*Math.cos(Q+Re),ct=X*Math.sin(Q+Re);var xa=Math.abs(Q-ee+2*Re)<=Ie?0:1;if(Re&&ac(it,ot,qt,ct)===1-qe^xa){var zr=(Q+ee)/2;it=X*Math.cos(zr),ot=X*Math.sin(zr),qt=ct=null}}else it=ot=0;if(Me>ye&&(ne=Math.min(Math.abs(J-X)/2,+w.apply(this,arguments)))>.001){he=X0?0:1}function nc(v,y,w,C,E){var L=v[0]-y[0],I=v[1]-y[1],F=(E?C:-C)/Math.sqrt(L*L+I*I),z=F*I,X=-F*L,J=v[0]+z,Q=v[1]+X,ee=y[0]+z,Me=y[1]+X,qe=(J+ee)/2,ne=(Q+Me)/2,he=ee-J,we=Me-Q,Fe=he*he+we*we,Re=w-C,me=J*Me-ee*Q,cr=(we<0?-1:1)*Math.sqrt(Math.max(0,Re*Re*Fe-me*me)),Mr=(me*we-he*cr)/Fe,Pr=(-me*he-we*cr)/Fe,Yr=(me*we+he*cr)/Fe,it=(-me*he+we*cr)/Fe,ot=Mr-qe,qt=Pr-ne,ct=Yr-qe,kt=it-ne;return ot*ot+qt*qt>ct*ct+kt*kt&&(Mr=Yr,Pr=it),[[Mr-z,Pr-X],[Mr*w/Re,Pr*w/Re]]}function Uv(){return!0}function Pd(v){var y=Hl,w=du,C=Uv,E=Ni,L=E.key,I=.7;function F(z){var X=[],J=[],Q=-1,ee=z.length,Me,qe=Vt(y),ne=Vt(w);function he(){X.push("M",E(v(J),I))}for(;++Q1?v.join("L"):v+"Z"}function Hv(v){return v.join("L")+"Z"}function ic(v){for(var y=0,w=v.length,C=v[0],E=[C[0],",",C[1]];++y1&&E.push("H",C[0]),E.join("")}function Vv(v){for(var y=0,w=v.length,C=v[0],E=[C[0],",",C[1]];++y1){F=y[1],L=v[z],z++,C+="C"+(E[0]+I[0])+","+(E[1]+I[1])+","+(L[0]-F[0])+","+(L[1]-F[1])+","+L[0]+","+L[1];for(var X=2;X9&&(L=w*3/Math.sqrt(L),I[F]=L*C,I[F+1]=L*E));for(F=-1;++F<=z;)L=(v[Math.min(z,F+1)][0]-v[Math.max(0,F-1)][0])/(6*(1+I[F]*I[F])),y.push([L||0,I[F]*L||0]);return y}function Cy(v){return v.length<3?Ni(v):v[0]+Ps(v,l_(v))}e.svg.line.radial=function(){var v=Pd(Id);return v.radius=v.x,delete v.x,v.angle=v.y,delete v.y,v};function Id(v){for(var y,w=-1,C=v.length,E,L;++wIe)+",1 "+Q}function X(J,Q,ee,Me){return"Q 0,0 "+Me}return L.radius=function(J){return arguments.length?(w=Vt(J),L):w},L.source=function(J){return arguments.length?(v=Vt(J),L):v},L.target=function(J){return arguments.length?(y=Vt(J),L):y},L.startAngle=function(J){return arguments.length?(C=Vt(J),L):C},L.endAngle=function(J){return arguments.length?(E=Vt(J),L):E},L};function zd(v){return v.radius}e.svg.diagonal=function(){var v=Ey,y=Is,w=Ly;function C(E,L){var I=v.call(this,E,L),F=y.call(this,E,L),z=(I.y+F.y)/2,X=[I,{x:I.x,y:z},{x:F.x,y:z},F];return X=X.map(w),"M"+X[0]+"C"+X[1]+" "+X[2]+" "+X[3]}return C.source=function(E){return arguments.length?(v=Vt(E),C):v},C.target=function(E){return arguments.length?(y=Vt(E),C):y},C.projection=function(E){return arguments.length?(w=E,C):w},C};function Ly(v){return[v.x,v.y]}e.svg.diagonal.radial=function(){var v=e.svg.diagonal(),y=Ly,w=v.projection;return v.projection=function(C){return arguments.length?w(s_(y=C)):y},v};function s_(v){return function(){var y=v.apply(this,arguments),w=y[0],C=y[1]-$r;return[w*Math.cos(C),w*Math.sin(C)]}}e.svg.symbol=function(){var v=f_,y=u_;function w(C,E){return(qy.get(v.call(this,C,E))||Dy)(y.call(this,C,E))}return w.type=function(C){return arguments.length?(v=Vt(C),w):v},w.size=function(C){return arguments.length?(y=Vt(C),w):y},w};function u_(){return 64}function f_(){return"circle"}function Dy(v){var y=Math.sqrt(v/Ie);return"M0,"+y+"A"+y+","+y+" 0 1,1 0,"+-y+"A"+y+","+y+" 0 1,1 0,"+y+"Z"}var qy=e.map({circle:Dy,cross:function(v){var y=Math.sqrt(v/5)/2;return"M"+-3*y+","+-y+"H"+-y+"V"+-3*y+"H"+y+"V"+-y+"H"+3*y+"V"+y+"H"+y+"V"+3*y+"H"+-y+"V"+y+"H"+-3*y+"Z"},diamond:function(v){var y=Math.sqrt(v/(2*Fy)),w=y*Fy;return"M0,"+-y+"L"+w+",0 0,"+y+" "+-w+",0Z"},square:function(v){var y=Math.sqrt(v)/2;return"M"+-y+","+-y+"L"+y+","+-y+" "+y+","+y+" "+-y+","+y+"Z"},"triangle-down":function(v){var y=Math.sqrt(v/jv),w=y*jv/2;return"M0,"+w+"L"+y+","+-w+" "+-y+","+-w+"Z"},"triangle-up":function(v){var y=Math.sqrt(v/jv),w=y*jv/2;return"M0,"+-w+"L"+y+","+w+" "+-y+","+w+"Z"}});e.svg.symbolTypes=qy.keys();var jv=Math.sqrt(3),Fy=Math.tan(30*St);Ce.transition=function(v){for(var y=$l||++Zv,w=Jv(v),C=[],E,L,I=Lu||{time:Date.now(),ease:qs,delay:0,duration:250},F=-1,z=this.length;++F0;)Q[--Fe].call(v,we);if(he>=1)return I.event&&I.event.end.call(v,v.__data__,y),--L.count?delete L[C]:delete v[w],1}I||(F=E.time,z=Ss(ee,0,F),I=L[C]={tween:new b,time:F,timer:z,delay:E.delay,duration:E.duration,ease:E.ease,index:y},E=null,++L.count)}e.svg.axis=function(){var v=e.scale.linear(),y=$v,w=6,C=6,E=3,L=[10],I=null,F;function z(X){X.each(function(){var J=e.select(this),Q=this.__chart__||v,ee=this.__chart__=v.copy(),Me=I==null?ee.ticks?ee.ticks.apply(ee,L):ee.domain():I,qe=F==null?ee.tickFormat?ee.tickFormat.apply(ee,L):$:F,ne=J.selectAll(".tick").data(Me,ee),he=ne.enter().insert("g",".domain").attr("class","tick").style("opacity",ye),we=e.transition(ne.exit()).style("opacity",ye).remove(),Fe=e.transition(ne.order()).style("opacity",1),Re=Math.max(w,0)+E,me,cr=Nv(ee),Mr=J.selectAll(".domain").data([0]),Pr=(Mr.enter().append("path").attr("class","domain"),e.transition(Mr));he.append("line"),he.append("text");var Yr=he.select("line"),it=Fe.select("line"),ot=ne.select("text").text(qe),qt=he.select("text"),ct=Fe.select("text"),kt=y==="top"||y==="left"?-1:1,ha,tn,xa,zr;if(y==="bottom"||y==="top"?(me=Hd,ha="x",xa="y",tn="x2",zr="y2",ot.attr("dy",kt<0?"0em":".71em").style("text-anchor","middle"),Pr.attr("d","M"+cr[0]+","+kt*C+"V0H"+cr[1]+"V"+kt*C)):(me=Vd,ha="y",xa="x",tn="y2",zr="x2",ot.attr("dy",".32em").style("text-anchor",kt<0?"end":"start"),Pr.attr("d","M"+kt*C+","+cr[0]+"H0V"+cr[1]+"H"+kt*C)),Yr.attr(zr,kt*w),qt.attr(xa,kt*Re),it.attr(tn,0).attr(zr,kt*w),ct.attr(ha,0).attr(xa,kt*Re),ee.rangeBand){var Ft=ee,Ut=Ft.rangeBand()/2;Q=ee=function(ua){return Ft(ua)+Ut}}else Q.rangeBand?Q=ee:we.call(me,ee,Q);he.call(me,Q,ee),Fe.call(me,ee,ee)})}return z.scale=function(X){return arguments.length?(v=X,z):v},z.orient=function(X){return arguments.length?(y=X in Gd?X+"":$v,z):y},z.ticks=function(){return arguments.length?(L=t(arguments),z):L},z.tickValues=function(X){return arguments.length?(I=X,z):I},z.tickFormat=function(X){return arguments.length?(F=X,z):F},z.tickSize=function(X){var J=arguments.length;return J?(w=+X,C=+arguments[J-1],z):w},z.innerTickSize=function(X){return arguments.length?(w=+X,z):w},z.outerTickSize=function(X){return arguments.length?(C=+X,z):C},z.tickPadding=function(X){return arguments.length?(E=+X,z):E},z.tickSubdivide=function(){return arguments.length&&z},z};var $v="bottom",Gd={top:1,right:1,bottom:1,left:1};function Hd(v,y,w){v.attr("transform",function(C){var E=y(C);return"translate("+(isFinite(E)?E:w(C))+",0)"})}function Vd(v,y,w){v.attr("transform",function(C){var E=y(C);return"translate(0,"+(isFinite(E)?E:w(C))+")"})}e.svg.brush=function(){var v=se(J,"brushstart","brush","brushend"),y=null,w=null,C=[0,0],E=[0,0],L,I,F=!0,z=!0,X=sc[0];function J(ne){ne.each(function(){var he=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",qe).on("touchstart.brush",qe),we=he.selectAll(".background").data([0]);we.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),he.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Fe=he.selectAll(".resize").data(X,$);Fe.exit().remove(),Fe.enter().append("g").attr("class",function(Mr){return"resize "+Mr}).style("cursor",function(Mr){return Yd[Mr]}).append("rect").attr("x",function(Mr){return/[ew]$/.test(Mr)?-3:null}).attr("y",function(Mr){return/^[ns]/.test(Mr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Fe.style("display",J.empty()?"none":null);var Re=e.transition(he),me=e.transition(we),cr;y&&(cr=Nv(y),me.attr("x",cr[0]).attr("width",cr[1]-cr[0]),ee(Re)),w&&(cr=Nv(w),me.attr("y",cr[0]).attr("height",cr[1]-cr[0]),Me(Re)),Q(Re)})}J.event=function(ne){ne.each(function(){var he=v.of(this,arguments),we={x:C,y:E,i:L,j:I},Fe=this.__chart__||we;this.__chart__=we,$l?e.select(this).transition().each("start.brush",function(){L=Fe.i,I=Fe.j,C=Fe.x,E=Fe.y,he({type:"brushstart"})}).tween("brush:brush",function(){var Re=Jf(C,we.x),me=Jf(E,we.y);return L=I=null,function(cr){C=we.x=Re(cr),E=we.y=me(cr),he({type:"brush",mode:"resize"})}}).each("end.brush",function(){L=we.i,I=we.j,he({type:"brush",mode:"resize"}),he({type:"brushend"})}):(he({type:"brushstart"}),he({type:"brush",mode:"resize"}),he({type:"brushend"}))})};function Q(ne){ne.selectAll(".resize").attr("transform",function(he){return"translate("+C[+/e$/.test(he)]+","+E[+/^s/.test(he)]+")"})}function ee(ne){ne.select(".extent").attr("x",C[0]),ne.selectAll(".extent,.n>rect,.s>rect").attr("width",C[1]-C[0])}function Me(ne){ne.select(".extent").attr("y",E[0]),ne.selectAll(".extent,.e>rect,.w>rect").attr("height",E[1]-E[0])}function qe(){var ne=this,he=e.select(e.event.target),we=v.of(ne,arguments),Fe=e.select(ne),Re=he.datum(),me=!/^(n|s)$/.test(Re)&&y,cr=!/^(e|w)$/.test(Re)&&w,Mr=he.classed("extent"),Pr=Ir(ne),Yr,it=e.mouse(ne),ot,qt=e.select(i(ne)).on("keydown.brush",ha).on("keyup.brush",tn);if(e.event.changedTouches?qt.on("touchmove.brush",xa).on("touchend.brush",Ft):qt.on("mousemove.brush",xa).on("mouseup.brush",Ft),Fe.interrupt().selectAll("*").interrupt(),Mr)it[0]=C[0]-it[0],it[1]=E[0]-it[1];else if(Re){var ct=+/w$/.test(Re),kt=+/^n/.test(Re);ot=[C[1-ct]-it[0],E[1-kt]-it[1]],it[0]=C[ct],it[1]=E[kt]}else e.event.altKey&&(Yr=it.slice());Fe.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",he.style("cursor")),we({type:"brushstart"}),xa();function ha(){e.event.keyCode==32&&(Mr||(Yr=null,it[0]-=C[1],it[1]-=E[1],Mr=2),ve())}function tn(){e.event.keyCode==32&&Mr==2&&(it[0]+=C[1],it[1]+=E[1],Mr=0,ve())}function xa(){var Ut=e.mouse(ne),ua=!1;ot&&(Ut[0]+=ot[0],Ut[1]+=ot[1]),Mr||(e.event.altKey?(Yr||(Yr=[(C[0]+C[1])/2,(E[0]+E[1])/2]),it[0]=C[+(Ut[0]{(function(e,r){typeof Iy=="object"&&typeof lM!="undefined"?r(Iy):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(Iy,function(e){"use strict";var r=new Date,t=new Date;function a(de,Oe,Ue,rt){function Ur(Ye){return de(Ye=arguments.length===0?new Date:new Date(+Ye)),Ye}return Ur.floor=function(Ye){return de(Ye=new Date(+Ye)),Ye},Ur.ceil=function(Ye){return de(Ye=new Date(Ye-1)),Oe(Ye,1),de(Ye),Ye},Ur.round=function(Ye){var Ve=Ur(Ye),pr=Ur.ceil(Ye);return Ye-Ve0))return Tr;do Tr.push(mr=new Date(+Ye)),Oe(Ye,pr),de(Ye);while(mr=Ve)for(;de(Ve),!Ye(Ve);)Ve.setTime(Ve-1)},function(Ve,pr){if(Ve>=Ve)if(pr<0)for(;++pr<=0;)for(;Oe(Ve,-1),!Ye(Ve););else for(;--pr>=0;)for(;Oe(Ve,1),!Ye(Ve););})},Ue&&(Ur.count=function(Ye,Ve){return r.setTime(+Ye),t.setTime(+Ve),de(r),de(t),Math.floor(Ue(r,t))},Ur.every=function(Ye){return Ye=Math.floor(Ye),!isFinite(Ye)||!(Ye>0)?null:Ye>1?Ur.filter(rt?function(Ve){return rt(Ve)%Ye===0}:function(Ve){return Ur.count(0,Ve)%Ye===0}):Ur}),Ur}var n=a(function(){},function(de,Oe){de.setTime(+de+Oe)},function(de,Oe){return Oe-de});n.every=function(de){return de=Math.floor(de),!isFinite(de)||!(de>0)?null:de>1?a(function(Oe){Oe.setTime(Math.floor(Oe/de)*de)},function(Oe,Ue){Oe.setTime(+Oe+Ue*de)},function(Oe,Ue){return(Ue-Oe)/de}):n};var i=n.range,o=1e3,l=6e4,s=36e5,u=864e5,f=6048e5,c=a(function(de){de.setTime(de-de.getMilliseconds())},function(de,Oe){de.setTime(+de+Oe*o)},function(de,Oe){return(Oe-de)/o},function(de){return de.getUTCSeconds()}),h=c.range,d=a(function(de){de.setTime(de-de.getMilliseconds()-de.getSeconds()*o)},function(de,Oe){de.setTime(+de+Oe*l)},function(de,Oe){return(Oe-de)/l},function(de){return de.getMinutes()}),p=d.range,g=a(function(de){de.setTime(de-de.getMilliseconds()-de.getSeconds()*o-de.getMinutes()*l)},function(de,Oe){de.setTime(+de+Oe*s)},function(de,Oe){return(Oe-de)/s},function(de){return de.getHours()}),m=g.range,x=a(function(de){de.setHours(0,0,0,0)},function(de,Oe){de.setDate(de.getDate()+Oe)},function(de,Oe){return(Oe-de-(Oe.getTimezoneOffset()-de.getTimezoneOffset())*l)/u},function(de){return de.getDate()-1}),_=x.range;function A(de){return a(function(Oe){Oe.setDate(Oe.getDate()-(Oe.getDay()+7-de)%7),Oe.setHours(0,0,0,0)},function(Oe,Ue){Oe.setDate(Oe.getDate()+Ue*7)},function(Oe,Ue){return(Ue-Oe-(Ue.getTimezoneOffset()-Oe.getTimezoneOffset())*l)/f})}var b=A(0),T=A(1),S=A(2),M=A(3),k=A(4),D=A(5),P=A(6),N=b.range,q=T.range,O=S.range,U=M.range,$=k.range,W=D.range,H=P.range,B=a(function(de){de.setDate(1),de.setHours(0,0,0,0)},function(de,Oe){de.setMonth(de.getMonth()+Oe)},function(de,Oe){return Oe.getMonth()-de.getMonth()+(Oe.getFullYear()-de.getFullYear())*12},function(de){return de.getMonth()}),V=B.range,j=a(function(de){de.setMonth(0,1),de.setHours(0,0,0,0)},function(de,Oe){de.setFullYear(de.getFullYear()+Oe)},function(de,Oe){return Oe.getFullYear()-de.getFullYear()},function(de){return de.getFullYear()});j.every=function(de){return!isFinite(de=Math.floor(de))||!(de>0)?null:a(function(Oe){Oe.setFullYear(Math.floor(Oe.getFullYear()/de)*de),Oe.setMonth(0,1),Oe.setHours(0,0,0,0)},function(Oe,Ue){Oe.setFullYear(Oe.getFullYear()+Ue*de)})};var K=j.range,ve=a(function(de){de.setUTCSeconds(0,0)},function(de,Oe){de.setTime(+de+Oe*l)},function(de,Oe){return(Oe-de)/l},function(de){return de.getUTCMinutes()}),xe=ve.range,se=a(function(de){de.setUTCMinutes(0,0,0)},function(de,Oe){de.setTime(+de+Oe*s)},function(de,Oe){return(Oe-de)/s},function(de){return de.getUTCHours()}),be=se.range,re=a(function(de){de.setUTCHours(0,0,0,0)},function(de,Oe){de.setUTCDate(de.getUTCDate()+Oe)},function(de,Oe){return(Oe-de)/u},function(de){return de.getUTCDate()-1}),ke=re.range;function ge(de){return a(function(Oe){Oe.setUTCDate(Oe.getUTCDate()-(Oe.getUTCDay()+7-de)%7),Oe.setUTCHours(0,0,0,0)},function(Oe,Ue){Oe.setUTCDate(Oe.getUTCDate()+Ue*7)},function(Oe,Ue){return(Ue-Oe)/f})}var Ee=ge(0),De=ge(1),Ce=ge(2),Y=ge(3),ae=ge(4),Z=ge(5),Te=ge(6),Pe=Ee.range,Ne=De.range,lr=Ce.range,Ke=Y.range,Je=ae.range,or=Z.range,yr=Te.range,ir=a(function(de){de.setUTCDate(1),de.setUTCHours(0,0,0,0)},function(de,Oe){de.setUTCMonth(de.getUTCMonth()+Oe)},function(de,Oe){return Oe.getUTCMonth()-de.getUTCMonth()+(Oe.getUTCFullYear()-de.getUTCFullYear())*12},function(de){return de.getUTCMonth()}),Xe=ir.range,Lr=a(function(de){de.setUTCMonth(0,1),de.setUTCHours(0,0,0,0)},function(de,Oe){de.setUTCFullYear(de.getUTCFullYear()+Oe)},function(de,Oe){return Oe.getUTCFullYear()-de.getUTCFullYear()},function(de){return de.getUTCFullYear()});Lr.every=function(de){return!isFinite(de=Math.floor(de))||!(de>0)?null:a(function(Oe){Oe.setUTCFullYear(Math.floor(Oe.getUTCFullYear()/de)*de),Oe.setUTCMonth(0,1),Oe.setUTCHours(0,0,0,0)},function(Oe,Ue){Oe.setUTCFullYear(Oe.getUTCFullYear()+Ue*de)})};var Ar=Lr.range;e.timeDay=x,e.timeDays=_,e.timeFriday=D,e.timeFridays=W,e.timeHour=g,e.timeHours=m,e.timeInterval=a,e.timeMillisecond=n,e.timeMilliseconds=i,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=T,e.timeMondays=q,e.timeMonth=B,e.timeMonths=V,e.timeSaturday=P,e.timeSaturdays=H,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=b,e.timeSundays=N,e.timeThursday=k,e.timeThursdays=$,e.timeTuesday=S,e.timeTuesdays=O,e.timeWednesday=M,e.timeWednesdays=U,e.timeWeek=b,e.timeWeeks=N,e.timeYear=j,e.timeYears=K,e.utcDay=re,e.utcDays=ke,e.utcFriday=Z,e.utcFridays=or,e.utcHour=se,e.utcHours=be,e.utcMillisecond=n,e.utcMilliseconds=i,e.utcMinute=ve,e.utcMinutes=xe,e.utcMonday=De,e.utcMondays=Ne,e.utcMonth=ir,e.utcMonths=Xe,e.utcSaturday=Te,e.utcSaturdays=yr,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=Ee,e.utcSundays=Pe,e.utcThursday=ae,e.utcThursdays=Je,e.utcTuesday=Ce,e.utcTuesdays=lr,e.utcWednesday=Y,e.utcWednesdays=Ke,e.utcWeek=Ee,e.utcWeeks=Pe,e.utcYear=Lr,e.utcYears=Ar,Object.defineProperty(e,"__esModule",{value:!0})})});var Kv=R((Oy,sM)=>{(function(e,r){typeof Oy=="object"&&typeof sM!="undefined"?r(Oy,c_()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(Oy,function(e,r){"use strict";function t(oe){if(0<=oe.y&&oe.y<100){var ye=new Date(-1,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L);return ye.setFullYear(oe.y),ye}return new Date(oe.y,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L)}function a(oe){if(0<=oe.y&&oe.y<100){var ye=new Date(Date.UTC(-1,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L));return ye.setUTCFullYear(oe.y),ye}return new Date(Date.UTC(oe.y,oe.m,oe.d,oe.H,oe.M,oe.S,oe.L))}function n(oe,ye,Ge){return{y:oe,m:ye,d:Ge,H:0,M:0,S:0,L:0}}function i(oe){var ye=oe.dateTime,Ge=oe.date,Ie=oe.time,Wr=oe.periods,tt=oe.days,$r=oe.shortDays,St=oe.months,ea=oe.shortMonths,ma=h(Wr),aa=d(Wr),Qa=h(tt),Ln=d(tt),si=h($r),Dn=d($r),Vi=h(St),Bn=d(St),qn=h(ea),yi=d(ea),_t={a:_s,A:ws,b:Bl,B:_v,c:null,d:B,e:B,f:xe,H:V,I:j,j:K,L:ve,m:se,M:be,p:As,q:Bf,Q:Ve,s:pr,S:re,u:ke,U:ge,V:Ee,w:De,W:Ce,x:null,X:null,y:Y,Y:ae,Z,"%":Ye},Ma={a:Uf,A:ol,b:ui,B:ll,c:null,d:Te,e:Te,f:Je,H:Pe,I:Ne,j:lr,L:Ke,m:or,M:yr,p:Ts,q:go,Q:Ve,s:pr,S:ir,u:Xe,U:Lr,V:Ar,w:de,W:Oe,x:null,X:null,y:Ue,Y:rt,Z:Ur,"%":Ye},ra={a:en,A:on,b:Yi,B:Wi,c:xn,d:k,e:k,f:U,H:P,I:P,j:D,L:O,m:M,M:N,p:La,q:S,Q:W,s:H,S:q,u:g,U:m,V:x,w:p,W:_,x:Aa,X:Un,y:b,Y:A,Z:T,"%":$};_t.x=Pa(Ge,_t),_t.X=Pa(Ie,_t),_t.c=Pa(ye,_t),Ma.x=Pa(Ge,Ma),Ma.X=Pa(Ie,Ma),Ma.c=Pa(ye,Ma);function Pa(yt,jt){return function(va){var jr=[],Gn=-1,Ea=0,Fn=yt.length,Vt,bo,Ul;for(va instanceof Date||(va=new Date(+va));++Gn53)return null;"w"in jr||(jr.w=1),"Z"in jr?(Ea=a(n(jr.y,0,1)),Fn=Ea.getUTCDay(),Ea=Fn>4||Fn===0?r.utcMonday.ceil(Ea):r.utcMonday(Ea),Ea=r.utcDay.offset(Ea,(jr.V-1)*7),jr.y=Ea.getUTCFullYear(),jr.m=Ea.getUTCMonth(),jr.d=Ea.getUTCDate()+(jr.w+6)%7):(Ea=t(n(jr.y,0,1)),Fn=Ea.getDay(),Ea=Fn>4||Fn===0?r.timeMonday.ceil(Ea):r.timeMonday(Ea),Ea=r.timeDay.offset(Ea,(jr.V-1)*7),jr.y=Ea.getFullYear(),jr.m=Ea.getMonth(),jr.d=Ea.getDate()+(jr.w+6)%7)}else("W"in jr||"U"in jr)&&("w"in jr||(jr.w="u"in jr?jr.u%7:"W"in jr?1:0),Fn="Z"in jr?a(n(jr.y,0,1)).getUTCDay():t(n(jr.y,0,1)).getDay(),jr.m=0,jr.d="W"in jr?(jr.w+6)%7+jr.W*7-(Fn+5)%7:jr.w+jr.U*7-(Fn+6)%7);return"Z"in jr?(jr.H+=jr.Z/100|0,jr.M+=jr.Z%100,a(jr)):t(jr)}}function Sa(yt,jt,va,jr){for(var Gn=0,Ea=jt.length,Fn=va.length,Vt,bo;Gn=Fn)return-1;if(Vt=jt.charCodeAt(Gn++),Vt===37){if(Vt=jt.charAt(Gn++),bo=ra[Vt in o?jt.charAt(Gn++):Vt],!bo||(jr=bo(yt,va,jr))<0)return-1}else if(Vt!=va.charCodeAt(jr++))return-1}return jr}function La(yt,jt,va){var jr=ma.exec(jt.slice(va));return jr?(yt.p=aa[jr[0].toLowerCase()],va+jr[0].length):-1}function en(yt,jt,va){var jr=si.exec(jt.slice(va));return jr?(yt.w=Dn[jr[0].toLowerCase()],va+jr[0].length):-1}function on(yt,jt,va){var jr=Qa.exec(jt.slice(va));return jr?(yt.w=Ln[jr[0].toLowerCase()],va+jr[0].length):-1}function Yi(yt,jt,va){var jr=qn.exec(jt.slice(va));return jr?(yt.m=yi[jr[0].toLowerCase()],va+jr[0].length):-1}function Wi(yt,jt,va){var jr=Vi.exec(jt.slice(va));return jr?(yt.m=Bn[jr[0].toLowerCase()],va+jr[0].length):-1}function xn(yt,jt,va){return Sa(yt,ye,jt,va)}function Aa(yt,jt,va){return Sa(yt,Ge,jt,va)}function Un(yt,jt,va){return Sa(yt,Ie,jt,va)}function _s(yt){return $r[yt.getDay()]}function ws(yt){return tt[yt.getDay()]}function Bl(yt){return ea[yt.getMonth()]}function _v(yt){return St[yt.getMonth()]}function As(yt){return Wr[+(yt.getHours()>=12)]}function Bf(yt){return 1+~~(yt.getMonth()/3)}function Uf(yt){return $r[yt.getUTCDay()]}function ol(yt){return tt[yt.getUTCDay()]}function ui(yt){return ea[yt.getUTCMonth()]}function ll(yt){return St[yt.getUTCMonth()]}function Ts(yt){return Wr[+(yt.getUTCHours()>=12)]}function go(yt){return 1+~~(yt.getUTCMonth()/3)}return{format:function(yt){var jt=Pa(yt+="",_t);return jt.toString=function(){return yt},jt},parse:function(yt){var jt=Xa(yt+="",!1);return jt.toString=function(){return yt},jt},utcFormat:function(yt){var jt=Pa(yt+="",Ma);return jt.toString=function(){return yt},jt},utcParse:function(yt){var jt=Xa(yt+="",!0);return jt.toString=function(){return yt},jt}}}var o={"-":"",_:" ",0:"0"},l=/^\s*\d+/,s=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(oe,ye,Ge){var Ie=oe<0?"-":"",Wr=(Ie?-oe:oe)+"",tt=Wr.length;return Ie+(tt68?1900:2e3),Ge+Ie[0].length):-1}function T(oe,ye,Ge){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ye.slice(Ge,Ge+6));return Ie?(oe.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Ge+Ie[0].length):-1}function S(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+1));return Ie?(oe.q=Ie[0]*3-3,Ge+Ie[0].length):-1}function M(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.m=Ie[0]-1,Ge+Ie[0].length):-1}function k(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.d=+Ie[0],Ge+Ie[0].length):-1}function D(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+3));return Ie?(oe.m=0,oe.d=+Ie[0],Ge+Ie[0].length):-1}function P(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.H=+Ie[0],Ge+Ie[0].length):-1}function N(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.M=+Ie[0],Ge+Ie[0].length):-1}function q(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+2));return Ie?(oe.S=+Ie[0],Ge+Ie[0].length):-1}function O(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+3));return Ie?(oe.L=+Ie[0],Ge+Ie[0].length):-1}function U(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge,Ge+6));return Ie?(oe.L=Math.floor(Ie[0]/1e3),Ge+Ie[0].length):-1}function $(oe,ye,Ge){var Ie=s.exec(ye.slice(Ge,Ge+1));return Ie?Ge+Ie[0].length:-1}function W(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge));return Ie?(oe.Q=+Ie[0],Ge+Ie[0].length):-1}function H(oe,ye,Ge){var Ie=l.exec(ye.slice(Ge));return Ie?(oe.s=+Ie[0],Ge+Ie[0].length):-1}function B(oe,ye){return f(oe.getDate(),ye,2)}function V(oe,ye){return f(oe.getHours(),ye,2)}function j(oe,ye){return f(oe.getHours()%12||12,ye,2)}function K(oe,ye){return f(1+r.timeDay.count(r.timeYear(oe),oe),ye,3)}function ve(oe,ye){return f(oe.getMilliseconds(),ye,3)}function xe(oe,ye){return ve(oe,ye)+"000"}function se(oe,ye){return f(oe.getMonth()+1,ye,2)}function be(oe,ye){return f(oe.getMinutes(),ye,2)}function re(oe,ye){return f(oe.getSeconds(),ye,2)}function ke(oe){var ye=oe.getDay();return ye===0?7:ye}function ge(oe,ye){return f(r.timeSunday.count(r.timeYear(oe)-1,oe),ye,2)}function Ee(oe,ye){var Ge=oe.getDay();return oe=Ge>=4||Ge===0?r.timeThursday(oe):r.timeThursday.ceil(oe),f(r.timeThursday.count(r.timeYear(oe),oe)+(r.timeYear(oe).getDay()===4),ye,2)}function De(oe){return oe.getDay()}function Ce(oe,ye){return f(r.timeMonday.count(r.timeYear(oe)-1,oe),ye,2)}function Y(oe,ye){return f(oe.getFullYear()%100,ye,2)}function ae(oe,ye){return f(oe.getFullYear()%1e4,ye,4)}function Z(oe){var ye=oe.getTimezoneOffset();return(ye>0?"-":(ye*=-1,"+"))+f(ye/60|0,"0",2)+f(ye%60,"0",2)}function Te(oe,ye){return f(oe.getUTCDate(),ye,2)}function Pe(oe,ye){return f(oe.getUTCHours(),ye,2)}function Ne(oe,ye){return f(oe.getUTCHours()%12||12,ye,2)}function lr(oe,ye){return f(1+r.utcDay.count(r.utcYear(oe),oe),ye,3)}function Ke(oe,ye){return f(oe.getUTCMilliseconds(),ye,3)}function Je(oe,ye){return Ke(oe,ye)+"000"}function or(oe,ye){return f(oe.getUTCMonth()+1,ye,2)}function yr(oe,ye){return f(oe.getUTCMinutes(),ye,2)}function ir(oe,ye){return f(oe.getUTCSeconds(),ye,2)}function Xe(oe){var ye=oe.getUTCDay();return ye===0?7:ye}function Lr(oe,ye){return f(r.utcSunday.count(r.utcYear(oe)-1,oe),ye,2)}function Ar(oe,ye){var Ge=oe.getUTCDay();return oe=Ge>=4||Ge===0?r.utcThursday(oe):r.utcThursday.ceil(oe),f(r.utcThursday.count(r.utcYear(oe),oe)+(r.utcYear(oe).getUTCDay()===4),ye,2)}function de(oe){return oe.getUTCDay()}function Oe(oe,ye){return f(r.utcMonday.count(r.utcYear(oe)-1,oe),ye,2)}function Ue(oe,ye){return f(oe.getUTCFullYear()%100,ye,2)}function rt(oe,ye){return f(oe.getUTCFullYear()%1e4,ye,4)}function Ur(){return"+0000"}function Ye(){return"%"}function Ve(oe){return+oe}function pr(oe){return Math.floor(+oe/1e3)}var Tr;mr({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 mr(oe){return Tr=i(oe),e.timeFormat=Tr.format,e.timeParse=Tr.parse,e.utcFormat=Tr.utcFormat,e.utcParse=Tr.utcParse,Tr}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function Cr(oe){return oe.toISOString()}var Ir=Date.prototype.toISOString?Cr:e.utcFormat(vr);function Gr(oe){var ye=new Date(oe);return isNaN(ye)?null:ye}var Ze=+new Date("2000-01-01T00:00:00.000Z")?Gr:e.utcParse(vr);e.isoFormat=Ir,e.isoParse=Ze,e.timeFormatDefaultLocale=mr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var v_=R((zy,uM)=>{(function(e,r){typeof zy=="object"&&typeof uM!="undefined"?r(zy):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(zy,function(e){"use strict";function r(M){return Math.abs(M=Math.round(M))>=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function t(M,k){if((D=(M=k?M.toExponential(k-1):M.toExponential()).indexOf("e"))<0)return null;var D,P=M.slice(0,D);return[P.length>1?P[0]+P.slice(2):P,+M.slice(D+1)]}function a(M){return M=t(Math.abs(M)),M?M[1]:NaN}function n(M,k){return function(D,P){for(var N=D.length,q=[],O=0,U=M[0],$=0;N>0&&U>0&&($+U+1>P&&(U=Math.max(1,P-$)),q.push(D.substring(N-=U,N+U)),!(($+=U+1)>P));)U=M[O=(O+1)%M.length];return q.reverse().join(k)}}function i(M){return function(k){return k.replace(/[0-9]/g,function(D){return M[+D]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(M){if(!(k=o.exec(M)))throw new Error("invalid format: "+M);var k;return new s({fill:k[1],align:k[2],sign:k[3],symbol:k[4],zero:k[5],width:k[6],comma:k[7],precision:k[8]&&k[8].slice(1),trim:k[9],type:k[10]})}l.prototype=s.prototype;function s(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}s.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(M){e:for(var k=M.length,D=1,P=-1,N;D0&&(P=0);break}return P>0?M.slice(0,P)+M.slice(N+1):M}var f;function c(M,k){var D=t(M,k);if(!D)return M+"";var P=D[0],N=D[1],q=N-(f=Math.max(-8,Math.min(8,Math.floor(N/3)))*3)+1,O=P.length;return q===O?P:q>O?P+new Array(q-O+1).join("0"):q>0?P.slice(0,q)+"."+P.slice(q):"0."+new Array(1-q).join("0")+t(M,Math.max(0,k+q-1))[0]}function h(M,k){var D=t(M,k);if(!D)return M+"";var P=D[0],N=D[1];return N<0?"0."+new Array(-N).join("0")+P:P.length>N+1?P.slice(0,N+1)+"."+P.slice(N+1):P+new Array(N-P.length+2).join("0")}var d={"%":function(M,k){return(M*100).toFixed(k)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d:r,e:function(M,k){return M.toExponential(k)},f:function(M,k){return M.toFixed(k)},g:function(M,k){return M.toPrecision(k)},o:function(M){return Math.round(M).toString(8)},p:function(M,k){return h(M*100,k)},r:h,s:c,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function p(M){return M}var g=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function x(M){var k=M.grouping===void 0||M.thousands===void 0?p:n(g.call(M.grouping,Number),M.thousands+""),D=M.currency===void 0?"":M.currency[0]+"",P=M.currency===void 0?"":M.currency[1]+"",N=M.decimal===void 0?".":M.decimal+"",q=M.numerals===void 0?p:i(g.call(M.numerals,String)),O=M.percent===void 0?"%":M.percent+"",U=M.minus===void 0?"-":M.minus+"",$=M.nan===void 0?"NaN":M.nan+"";function W(B){B=l(B);var V=B.fill,j=B.align,K=B.sign,ve=B.symbol,xe=B.zero,se=B.width,be=B.comma,re=B.precision,ke=B.trim,ge=B.type;ge==="n"?(be=!0,ge="g"):d[ge]||(re===void 0&&(re=12),ke=!0,ge="g"),(xe||V==="0"&&j==="=")&&(xe=!0,V="0",j="=");var Ee=ve==="$"?D:ve==="#"&&/[boxX]/.test(ge)?"0"+ge.toLowerCase():"",De=ve==="$"?P:/[%p]/.test(ge)?O:"",Ce=d[ge],Y=/[defgprs%]/.test(ge);re=re===void 0?6:/[gprs]/.test(ge)?Math.max(1,Math.min(21,re)):Math.max(0,Math.min(20,re));function ae(Z){var Te=Ee,Pe=De,Ne,lr,Ke;if(ge==="c")Pe=Ce(Z)+Pe,Z="";else{Z=+Z;var Je=Z<0||1/Z<0;if(Z=isNaN(Z)?$:Ce(Math.abs(Z),re),ke&&(Z=u(Z)),Je&&+Z==0&&K!=="+"&&(Je=!1),Te=(Je?K==="("?K:U:K==="-"||K==="("?"":K)+Te,Pe=(ge==="s"?m[8+f/3]:"")+Pe+(Je&&K==="("?")":""),Y){for(Ne=-1,lr=Z.length;++NeKe||Ke>57){Pe=(Ke===46?N+Z.slice(Ne+1):Z.slice(Ne))+Pe,Z=Z.slice(0,Ne);break}}}be&&!xe&&(Z=k(Z,1/0));var or=Te.length+Z.length+Pe.length,yr=or>1)+Te+Z+Pe+yr.slice(or);break;default:Z=yr+Te+Z+Pe;break}return q(Z)}return ae.toString=function(){return B+""},ae}function H(B,V){var j=W((B=l(B),B.type="f",B)),K=Math.max(-8,Math.min(8,Math.floor(a(V)/3)))*3,ve=Math.pow(10,-K),xe=m[8+K/3];return function(se){return j(ve*se)+xe}}return{format:W,formatPrefix:H}}var _;A({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function A(M){return _=x(M),e.format=_.format,e.formatPrefix=_.formatPrefix,_}function b(M){return Math.max(0,-a(Math.abs(M)))}function T(M,k){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a(k)/3)))*3-a(Math.abs(M)))}function S(M,k){return M=Math.abs(M),k=Math.abs(k)-M,Math.max(0,a(k)-a(M))+1}e.FormatSpecifier=s,e.formatDefaultLocale=A,e.formatLocale=x,e.formatSpecifier=l,e.precisionFixed=b,e.precisionPrefix=T,e.precisionRound=S,Object.defineProperty(e,"__esModule",{value:!0})})});var cM=R((EMe,fM)=>{"use strict";fM.exports=function(e){for(var r=e.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var ia=R((LMe,vM)=>{"use strict";var zae=cM();vM.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&zae(t))return!1}else if(r!=="number")return!1;return e-e<1}});var _n=R((DMe,hM)=>{"use strict";hM.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 h_=R((By,dM)=>{(function(e,r){typeof By=="object"&&typeof dM!="undefined"?r(By):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(By,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a>2],f+=r[(l[s]&3)<<4|l[s+1]>>4],f+=r[(l[s+1]&15)<<2|l[s+2]>>6],f+=r[l[s+2]&63];return u%3===2?f=f.substring(0,f.length-1)+"=":u%3===1&&(f=f.substring(0,f.length-2)+"=="),f},i=function(o){var l=o.length*.75,s=o.length,u,f=0,c,h,d,p;o[o.length-1]==="="&&(l--,o[o.length-2]==="="&&l--);var g=new ArrayBuffer(l),m=new Uint8Array(g);for(u=0;u>4,m[f++]=(h&15)<<4|d>>2,m[f++]=(d&3)<<6|p&63;return g};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var Ru=R((qMe,pM)=>{"use strict";pM.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var ro=R(cl=>{"use strict";var Bae=h_().decode,Uae=Ru(),d_=Array.isArray,Gae=ArrayBuffer,Hae=DataView;function mM(e){return Gae.isView(e)&&!(e instanceof Hae)}cl.isTypedArray=mM;function Uy(e){return d_(e)||mM(e)}cl.isArrayOrTypedArray=Uy;function Vae(e){return!Uy(e[0])}cl.isArray1D=Vae;cl.ensureArray=function(e,r){return d_(e)||(e=[]),e.length=r,e};var ti={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};ti.uint8c=ti.u1c;ti.uint8=ti.u1;ti.int8=ti.i1;ti.uint16=ti.u2;ti.int16=ti.i2;ti.uint32=ti.u4;ti.int32=ti.i4;ti.float32=ti.f4;ti.float64=ti.f8;function p_(e){return e.constructor===ArrayBuffer}cl.isArrayBuffer=p_;cl.decodeTypedArraySpec=function(e){var r=[],t=Yae(e),a=t.dtype,n=ti[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,o=t.bdata;p_(o)||(o=Bae(o));var l=t.shape===void 0?[o.byteLength/i]:(""+t.shape).split(",");l.reverse();var s=l.length,u,f,c=+l[0],h=i*c,d=0;if(s===1)r=new n(o);else if(s===2)for(u=+l[1],f=0;f{"use strict";var gM=ia(),y_=ro().isArrayOrTypedArray;wM.exports=function(r,t){if(gM(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,o,l;for(l=0;l{"use strict";var Qv=Gy(),Jae=/^\w*$/,$ae=0,AM=1,Hy=2,TM=3,uc=4;MM.exports=function(r,t,a,n){a=a||"name",n=n||"value";var i,o,l,s={};t&&t.length?(l=Qv(r,t),o=l.get()):o=r,t=t||"";var u={};if(o)for(i=0;i2)return s[d]=s[d]|Hy,c.set(h,null);if(f){for(i=d;i{"use strict";var Kae=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Qae=/^[^\.\[\]]+$/;kM.exports=function(e,r){for(;r;){var t=e.match(Kae);if(t)e=t[1];else if(e.match(Qae))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var Vy=R((IMe,EM)=>{"use strict";var ene=ia();EM.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var a=Math.log(Math.min(t[0],t[1]))/Math.LN10;return ene(a)||(a=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),a}});var qM=R((OMe,DM)=>{"use strict";var LM=ro().isArrayOrTypedArray,Zd=Ru();DM.exports=function e(r,t){for(var a in t){var n=t[a],i=r[a];if(i!==n)if(a.charAt(0)==="_"||typeof n=="function"){if(a in r)continue;r[a]=n}else if(LM(n)&&LM(i)&&Zd(n[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(n.length,i.length),l=0;l{"use strict";function rne(e,r){var t=e%r;return t<0?t+r:t}function tne(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}FM.exports={mod:rne,modHalf:tne}});var vl=R((BMe,Yy)=>{(function(e){var r=/^\s+/,t=/\s+$/,a=0,n=e.round,i=e.min,o=e.max,l=e.random;function s(Y,ae){if(Y=Y||"",ae=ae||{},Y instanceof s)return Y;if(!(this instanceof s))return new s(Y,ae);var Z=u(Y);this._originalInput=Y,this._r=Z.r,this._g=Z.g,this._b=Z.b,this._a=Z.a,this._roundA=n(100*this._a)/100,this._format=ae.format||Z.format,this._gradientType=ae.gradientType,this._r<1&&(this._r=n(this._r)),this._g<1&&(this._g=n(this._g)),this._b<1&&(this._b=n(this._b)),this._ok=Z.ok,this._tc_id=a++}s.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 Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ae,Z,Te,Pe,Ne,lr;return ae=Y.r/255,Z=Y.g/255,Te=Y.b/255,ae<=.03928?Pe=ae/12.92:Pe=e.pow((ae+.055)/1.055,2.4),Z<=.03928?Ne=Z/12.92:Ne=e.pow((Z+.055)/1.055,2.4),Te<=.03928?lr=Te/12.92:lr=e.pow((Te+.055)/1.055,2.4),.2126*Pe+.7152*Ne+.0722*lr},setAlpha:function(Y){return this._a=B(Y),this._roundA=n(100*this._a)/100,this},toHsv:function(){var Y=d(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=d(this._r,this._g,this._b),ae=n(Y.h*360),Z=n(Y.s*100),Te=n(Y.v*100);return this._a==1?"hsv("+ae+", "+Z+"%, "+Te+"%)":"hsva("+ae+", "+Z+"%, "+Te+"%, "+this._roundA+")"},toHsl:function(){var Y=c(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=c(this._r,this._g,this._b),ae=n(Y.h*360),Z=n(Y.s*100),Te=n(Y.l*100);return this._a==1?"hsl("+ae+", "+Z+"%, "+Te+"%)":"hsla("+ae+", "+Z+"%, "+Te+"%, "+this._roundA+")"},toHex:function(Y){return g(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return m(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:n(this._r),g:n(this._g),b:n(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+n(this._r)+", "+n(this._g)+", "+n(this._b)+")":"rgba("+n(this._r)+", "+n(this._g)+", "+n(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:n(V(this._r,255)*100)+"%",g:n(V(this._g,255)*100)+"%",b:n(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%)":"rgba("+n(V(this._r,255)*100)+"%, "+n(V(this._g,255)*100)+"%, "+n(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:W[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ae="#"+x(this._r,this._g,this._b,this._a),Z=ae,Te=this._gradientType?"GradientType = 1, ":"";if(Y){var Pe=s(Y);Z="#"+x(Pe._r,Pe._g,Pe._b,Pe._a)}return"progid:DXImageTransform.Microsoft.gradient("+Te+"startColorstr="+ae+",endColorstr="+Z+")"},toString:function(Y){var ae=!!Y;Y=Y||this._format;var Z=!1,Te=this._a<1&&this._a>=0,Pe=!ae&&Te&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return Pe?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(Z=this.toRgbString()),Y==="prgb"&&(Z=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(Z=this.toHexString()),Y==="hex3"&&(Z=this.toHexString(!0)),Y==="hex4"&&(Z=this.toHex8String(!0)),Y==="hex8"&&(Z=this.toHex8String()),Y==="name"&&(Z=this.toName()),Y==="hsl"&&(Z=this.toHslString()),Y==="hsv"&&(Z=this.toHsvString()),Z||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Y,ae){var Z=Y.apply(null,[this].concat([].slice.call(ae)));return this._r=Z._r,this._g=Z._g,this._b=Z._b,this.setAlpha(Z._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(S,arguments)},darken:function(){return this._applyModification(M,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(A,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(Y,ae){return Y.apply(null,[this].concat([].slice.call(ae)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(D,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},s.fromRatio=function(Y,ae){if(typeof Y=="object"){var Z={};for(var Te in Y)Y.hasOwnProperty(Te)&&(Te==="a"?Z[Te]=Y[Te]:Z[Te]=be(Y[Te]));Y=Z}return s(Y,ae)};function u(Y){var ae={r:0,g:0,b:0},Z=1,Te=null,Pe=null,Ne=null,lr=!1,Ke=!1;return typeof Y=="string"&&(Y=De(Y)),typeof Y=="object"&&(Ee(Y.r)&&Ee(Y.g)&&Ee(Y.b)?(ae=f(Y.r,Y.g,Y.b),lr=!0,Ke=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):Ee(Y.h)&&Ee(Y.s)&&Ee(Y.v)?(Te=be(Y.s),Pe=be(Y.v),ae=p(Y.h,Te,Pe),lr=!0,Ke="hsv"):Ee(Y.h)&&Ee(Y.s)&&Ee(Y.l)&&(Te=be(Y.s),Ne=be(Y.l),ae=h(Y.h,Te,Ne),lr=!0,Ke="hsl"),Y.hasOwnProperty("a")&&(Z=Y.a)),Z=B(Z),{ok:lr,format:Y.format||Ke,r:i(255,o(ae.r,0)),g:i(255,o(ae.g,0)),b:i(255,o(ae.b,0)),a:Z}}function f(Y,ae,Z){return{r:V(Y,255)*255,g:V(ae,255)*255,b:V(Z,255)*255}}function c(Y,ae,Z){Y=V(Y,255),ae=V(ae,255),Z=V(Z,255);var Te=o(Y,ae,Z),Pe=i(Y,ae,Z),Ne,lr,Ke=(Te+Pe)/2;if(Te==Pe)Ne=lr=0;else{var Je=Te-Pe;switch(lr=Ke>.5?Je/(2-Te-Pe):Je/(Te+Pe),Te){case Y:Ne=(ae-Z)/Je+(ae1&&(ir-=1),ir<1/6?or+(yr-or)*6*ir:ir<1/2?yr:ir<2/3?or+(yr-or)*(2/3-ir)*6:or}if(ae===0)Te=Pe=Ne=Z;else{var Ke=Z<.5?Z*(1+ae):Z+ae-Z*ae,Je=2*Z-Ke;Te=lr(Je,Ke,Y+1/3),Pe=lr(Je,Ke,Y),Ne=lr(Je,Ke,Y-1/3)}return{r:Te*255,g:Pe*255,b:Ne*255}}function d(Y,ae,Z){Y=V(Y,255),ae=V(ae,255),Z=V(Z,255);var Te=o(Y,ae,Z),Pe=i(Y,ae,Z),Ne,lr,Ke=Te,Je=Te-Pe;if(lr=Te===0?0:Je/Te,Te==Pe)Ne=0;else{switch(Te){case Y:Ne=(ae-Z)/Je+(ae>1)+720)%360;--ae;)Te.h=(Te.h+Pe)%360,Ne.push(s(Te));return Ne}function U(Y,ae){ae=ae||6;for(var Z=s(Y).toHsv(),Te=Z.h,Pe=Z.s,Ne=Z.v,lr=[],Ke=1/ae;ae--;)lr.push(s({h:Te,s:Pe,v:Ne})),Ne=(Ne+Ke)%1;return lr}s.mix=function(Y,ae,Z){Z=Z===0?0:Z||50;var Te=s(Y).toRgb(),Pe=s(ae).toRgb(),Ne=Z/100,lr={r:(Pe.r-Te.r)*Ne+Te.r,g:(Pe.g-Te.g)*Ne+Te.g,b:(Pe.b-Te.b)*Ne+Te.b,a:(Pe.a-Te.a)*Ne+Te.a};return s(lr)},s.readability=function(Y,ae){var Z=s(Y),Te=s(ae);return(e.max(Z.getLuminance(),Te.getLuminance())+.05)/(e.min(Z.getLuminance(),Te.getLuminance())+.05)},s.isReadable=function(Y,ae,Z){var Te=s.readability(Y,ae),Pe,Ne;switch(Ne=!1,Pe=Ce(Z),Pe.level+Pe.size){case"AAsmall":case"AAAlarge":Ne=Te>=4.5;break;case"AAlarge":Ne=Te>=3;break;case"AAAsmall":Ne=Te>=7;break}return Ne},s.mostReadable=function(Y,ae,Z){var Te=null,Pe=0,Ne,lr,Ke,Je;Z=Z||{},lr=Z.includeFallbackColors,Ke=Z.level,Je=Z.size;for(var or=0;orPe&&(Pe=Ne,Te=s(ae[or]));return s.isReadable(Y,Te,{level:Ke,size:Je})||!lr?Te:(Z.includeFallbackColors=!1,s.mostReadable(Y,["#fff","#000"],Z))};var $=s.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"},W=s.hexNames=H($);function H(Y){var ae={};for(var Z in Y)Y.hasOwnProperty(Z)&&(ae[Y[Z]]=Z);return ae}function B(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function V(Y,ae){ve(Y)&&(Y="100%");var Z=xe(Y);return Y=i(ae,o(0,parseFloat(Y))),Z&&(Y=parseInt(Y*ae,10)/100),e.abs(Y-ae)<1e-6?1:Y%ae/parseFloat(ae)}function j(Y){return i(1,o(0,Y))}function K(Y){return parseInt(Y,16)}function ve(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function xe(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function se(Y){return Y.length==1?"0"+Y:""+Y}function be(Y){return Y<=1&&(Y=Y*100+"%"),Y}function re(Y){return e.round(parseFloat(Y)*255).toString(16)}function ke(Y){return K(Y)/255}var ge=function(){var Y="[-\\+]?\\d+%?",ae="[-\\+]?\\d*\\.\\d+%?",Z="(?:"+ae+")|(?:"+Y+")",Te="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?",Pe="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?";return{CSS_UNIT:new RegExp(Z),rgb:new RegExp("rgb"+Te),rgba:new RegExp("rgba"+Pe),hsl:new RegExp("hsl"+Te),hsla:new RegExp("hsla"+Pe),hsv:new RegExp("hsv"+Te),hsva:new RegExp("hsva"+Pe),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 Ee(Y){return!!ge.CSS_UNIT.exec(Y)}function De(Y){Y=Y.replace(r,"").replace(t,"").toLowerCase();var ae=!1;if($[Y])Y=$[Y],ae=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Z;return(Z=ge.rgb.exec(Y))?{r:Z[1],g:Z[2],b:Z[3]}:(Z=ge.rgba.exec(Y))?{r:Z[1],g:Z[2],b:Z[3],a:Z[4]}:(Z=ge.hsl.exec(Y))?{h:Z[1],s:Z[2],l:Z[3]}:(Z=ge.hsla.exec(Y))?{h:Z[1],s:Z[2],l:Z[3],a:Z[4]}:(Z=ge.hsv.exec(Y))?{h:Z[1],s:Z[2],v:Z[3]}:(Z=ge.hsva.exec(Y))?{h:Z[1],s:Z[2],v:Z[3],a:Z[4]}:(Z=ge.hex8.exec(Y))?{r:K(Z[1]),g:K(Z[2]),b:K(Z[3]),a:ke(Z[4]),format:ae?"name":"hex8"}:(Z=ge.hex6.exec(Y))?{r:K(Z[1]),g:K(Z[2]),b:K(Z[3]),format:ae?"name":"hex"}:(Z=ge.hex4.exec(Y))?{r:K(Z[1]+""+Z[1]),g:K(Z[2]+""+Z[2]),b:K(Z[3]+""+Z[3]),a:ke(Z[4]+""+Z[4]),format:ae?"name":"hex8"}:(Z=ge.hex3.exec(Y))?{r:K(Z[1]+""+Z[1]),g:K(Z[2]+""+Z[2]),b:K(Z[3]+""+Z[3]),format:ae?"name":"hex"}:!1}function Ce(Y){var ae,Z;return Y=Y||{level:"AA",size:"small"},ae=(Y.level||"AA").toUpperCase(),Z=(Y.size||"small").toLowerCase(),ae!=="AA"&&ae!=="AAA"&&(ae="AA"),Z!=="small"&&Z!=="large"&&(Z="small"),{level:ae,size:Z}}typeof Yy!="undefined"&&Yy.exports?Yy.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):window.tinycolor=s})(Math)});var hn=R(Kd=>{"use strict";var RM=Ru(),Jd=Array.isArray;function ane(e,r){var t,a;for(t=0;t{"use strict";PM.exports=function(e){var r=e.variantValues,t=e.editType,a=e.colorEditType;a===void 0&&(a=t);var n={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:a},weight:n,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var Qd=R((HMe,NM)=>{"use strict";NM.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var r0=R((VMe,zM)=>{"use strict";var IM=Qd(),OM=ci(),g_=OM({editType:"none"});g_.family.dflt=IM.HOVERFONT;g_.size.dflt=IM.HOVERFONTSIZE;zM.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:g_,grouptitlefont:OM({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var Xy=R((YMe,BM)=>{"use strict";var nne=ci(),Wy=r0().hoverlabel,jy=hn().extendFlat;BM.exports={hoverlabel:{bgcolor:jy({},Wy.bgcolor,{arrayOk:!0}),bordercolor:jy({},Wy.bordercolor,{arrayOk:!0}),font:nne({arrayOk:!0,editType:"none"}),align:jy({},Wy.align,{arrayOk:!0}),namelength:jy({},Wy.namelength,{arrayOk:!0}),editType:"none"}}});var hl=R((WMe,UM)=>{"use strict";var ine=ci(),one=Xy();UM.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:ine({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:one.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 fc=R((jMe,VM)=>{"use strict";var lne=vl(),Zy={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)"]]},GM=Zy.RdBu;function sne(e,r){if(r||(r=GM),!e)return r;function t(){try{e=Zy[e]||JSON.parse(e)}catch(a){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),HM(e)?e:r}function HM(e){var r=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 t=0;t{"use strict";cc.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];cc.defaultLine="#444";cc.lightLine="#eee";cc.background="#fff";cc.borderLine="#BEC8D9";cc.lightFraction=100*10/11});var Qt=R((ZMe,YM)=>{"use strict";var to=vl(),fne=ia(),cne=ro().isTypedArray,Wn=YM.exports={},Jy=Kl();Wn.defaults=Jy.defaults;var vne=Wn.defaultLine=Jy.defaultLine;Wn.lightLine=Jy.lightLine;var x_=Wn.background=Jy.background;Wn.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};Wn.rgb=function(e){return Wn.tinyRGB(to(e))};Wn.opacity=function(e){return e?to(e).getAlpha():0};Wn.addOpacity=function(e,r){var t=to(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};Wn.combine=function(e,r){var t=to(e).toRgb();if(t.a===1)return to(e).toRgbString();var a=to(r||x_).toRgb(),n=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},i={r:n.r*(1-t.a)+t.r*t.a,g:n.g*(1-t.a)+t.g*t.a,b:n.b*(1-t.a)+t.b*t.a};return to(i).toRgbString()};Wn.interpolate=function(e,r,t){var a=to(e).toRgb(),n=to(r).toRgb(),i={r:t*a.r+(1-t)*n.r,g:t*a.g+(1-t)*n.g,b:t*a.b+(1-t)*n.b};return to(i).toRgbString()};Wn.contrast=function(e,r,t){var a=to(e);a.getAlpha()!==1&&(a=to(Wn.combine(e,x_)));var n=a.isDark()?r?a.lighten(r):x_:t?a.darken(t):vne;return n.toString()};Wn.stroke=function(e,r){var t=to(r);e.style({stroke:Wn.tinyRGB(t),"stroke-opacity":t.getAlpha()})};Wn.fill=function(e,r){var t=to(r);e.style({fill:Wn.tinyRGB(t),"fill-opacity":t.getAlpha()})};Wn.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,a,n,i;for(t=0;t=0)))return e;if(i===3)a[i]>1&&(a[i]=1);else if(a[i]>=1)return e}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return n?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}});var t0=R((JMe,WM)=>{"use strict";WM.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var a0=R(jM=>{"use strict";jM.counter=function(e,r,t,a){var n=(r||"")+(t?"":"$"),i=a===!1?"":"^";return e==="xy"?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+n):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+n)}});var $M=R(ao=>{"use strict";var __=ia(),XM=vl(),ZM=hn().extendFlat,hne=hl(),dne=fc(),pne=Qt(),mne=t0().DESELECTDIM,n0=Gy(),JM=a0().counter,yne=e0().modHalf,Ql=ro().isArrayOrTypedArray,Pu=ro().isTypedArraySpec,Nu=ro().decodeTypedArraySpec;ao.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(Ql(e)?e:Pu(e)?Nu(e):t)}},enumerated:{coerceFunction:function(e,r,t,a){a.coerceNumber&&(e=+e),a.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,a=0;aa.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}Pu(e)&&(e=Nu(e)),e%1||!__(e)||a.min!==void 0&&ea.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,a){if(typeof e!="string"){var n=typeof e=="number";a.strict===!0||!n?r.set(t):r.set(String(e))}else a.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Pu(e)&&(e=Nu(e)),XM(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function a(n){return XM(n).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(a)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(dne.get(e,t))}},angle:{coerceFunction:function(e,r,t){Pu(e)&&(e=Nu(e)),e==="auto"?r.set("auto"):__(e)?r.set(yne(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,a){var n=a.regex||JM(t);if(typeof e=="string"&&n.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!JM(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,a){if((a.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var n=e.split("+"),i=0;i{"use strict";var KM={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/"},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:{}}},QM={};function eS(e,r){for(var t in e){var a=e[t];a.valType?r[t]=a.dflt:(r[t]||(r[t]={}),eS(a,r[t]))}}eS(KM,QM);rS.exports={configAttributes:KM,dfltConfig:QM}});var A_=R((eSe,tS)=>{"use strict";var w_=ta(),gne=ia(),e1=[];tS.exports=function(e,r){if(e1.indexOf(e)!==-1)return;e1.push(e);var t=1e3;gne(r)?t=r:r==="long"&&(t=3e3);var a=w_.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var n=a.selectAll(".notifier-note").data(e1);function i(o){o.duration(700).style("opacity",0).each("end",function(l){var s=e1.indexOf(l);s!==-1&&e1.splice(s,1),w_.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=w_.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(i)});for(var s=l.append("p"),u=o.split(//g),f=0;f{"use strict";var i0=vc().dfltConfig,T_=A_(),M_=aS.exports={};M_.log=function(){var e;if(i0.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};M_.warn=function(){var e;if(i0.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};M_.error=function(){var e;if(i0.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var Ky=R((tSe,nS)=>{"use strict";nS.exports=function(){}});var S_=R((aSe,iS)=>{"use strict";iS.exports=function(r,t){if(t instanceof RegExp){for(var a=t.toString(),n=0;n{oS.exports=bne;function bne(){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 uS=R((iSe,sS)=>{sS.exports=xne;function xne(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var cS=R((oSe,fS)=>{fS.exports=_ne;function _ne(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var k_=R((lSe,vS)=>{vS.exports=wne;function wne(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 dS=R((sSe,hS)=>{hS.exports=Ane;function Ane(e,r){if(e===r){var t=r[1],a=r[2],n=r[3],i=r[6],o=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=a,e[9]=i,e[11]=r[14],e[12]=n,e[13]=o,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var mS=R((uSe,pS)=>{pS.exports=Tne;function Tne(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],g=r[13],m=r[14],x=r[15],_=t*l-a*o,A=t*s-n*o,b=t*u-i*o,T=a*s-n*l,S=a*u-i*l,M=n*u-i*s,k=f*g-c*p,D=f*m-h*p,P=f*x-d*p,N=c*m-h*g,q=c*x-d*g,O=h*x-d*m,U=_*O-A*q+b*N+T*P-S*D+M*k;return U?(U=1/U,e[0]=(l*O-s*q+u*N)*U,e[1]=(n*q-a*O-i*N)*U,e[2]=(g*M-m*S+x*T)*U,e[3]=(h*S-c*M-d*T)*U,e[4]=(s*P-o*O-u*D)*U,e[5]=(t*O-n*P+i*D)*U,e[6]=(m*b-p*M-x*A)*U,e[7]=(f*M-h*b+d*A)*U,e[8]=(o*q-l*P+u*k)*U,e[9]=(a*P-t*q-i*k)*U,e[10]=(p*S-g*b+x*_)*U,e[11]=(c*b-f*S-d*_)*U,e[12]=(l*D-o*N-s*k)*U,e[13]=(t*N-a*D+n*k)*U,e[14]=(g*A-p*T-m*_)*U,e[15]=(f*T-c*A+h*_)*U,e):null}});var gS=R((fSe,yS)=>{yS.exports=Mne;function Mne(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=r[4],l=r[5],s=r[6],u=r[7],f=r[8],c=r[9],h=r[10],d=r[11],p=r[12],g=r[13],m=r[14],x=r[15];return e[0]=l*(h*x-d*m)-c*(s*x-u*m)+g*(s*d-u*h),e[1]=-(a*(h*x-d*m)-c*(n*x-i*m)+g*(n*d-i*h)),e[2]=a*(s*x-u*m)-l*(n*x-i*m)+g*(n*u-i*s),e[3]=-(a*(s*d-u*h)-l*(n*d-i*h)+c*(n*u-i*s)),e[4]=-(o*(h*x-d*m)-f*(s*x-u*m)+p*(s*d-u*h)),e[5]=t*(h*x-d*m)-f*(n*x-i*m)+p*(n*d-i*h),e[6]=-(t*(s*x-u*m)-o*(n*x-i*m)+p*(n*u-i*s)),e[7]=t*(s*d-u*h)-o*(n*d-i*h)+f*(n*u-i*s),e[8]=o*(c*x-d*g)-f*(l*x-u*g)+p*(l*d-u*c),e[9]=-(t*(c*x-d*g)-f*(a*x-i*g)+p*(a*d-i*c)),e[10]=t*(l*x-u*g)-o*(a*x-i*g)+p*(a*u-i*l),e[11]=-(t*(l*d-u*c)-o*(a*d-i*c)+f*(a*u-i*l)),e[12]=-(o*(c*m-h*g)-f*(l*m-s*g)+p*(l*h-s*c)),e[13]=t*(c*m-h*g)-f*(a*m-n*g)+p*(a*h-n*c),e[14]=-(t*(l*m-s*g)-o*(a*m-n*g)+p*(a*s-n*l)),e[15]=t*(l*h-s*c)-o*(a*h-n*c)+f*(a*s-n*l),e}});var xS=R((cSe,bS)=>{bS.exports=Sne;function Sne(e){var r=e[0],t=e[1],a=e[2],n=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],g=e[14],m=e[15],x=r*o-t*i,_=r*l-a*i,A=r*s-n*i,b=t*l-a*o,T=t*s-n*o,S=a*s-n*l,M=u*p-f*d,k=u*g-c*d,D=u*m-h*d,P=f*g-c*p,N=f*m-h*p,q=c*m-h*g;return x*q-_*N+A*P+b*D-T*k+S*M}});var wS=R((vSe,_S)=>{_S.exports=kne;function kne(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=r[4],s=r[5],u=r[6],f=r[7],c=r[8],h=r[9],d=r[10],p=r[11],g=r[12],m=r[13],x=r[14],_=r[15],A=t[0],b=t[1],T=t[2],S=t[3];return e[0]=A*a+b*l+T*c+S*g,e[1]=A*n+b*s+T*h+S*m,e[2]=A*i+b*u+T*d+S*x,e[3]=A*o+b*f+T*p+S*_,A=t[4],b=t[5],T=t[6],S=t[7],e[4]=A*a+b*l+T*c+S*g,e[5]=A*n+b*s+T*h+S*m,e[6]=A*i+b*u+T*d+S*x,e[7]=A*o+b*f+T*p+S*_,A=t[8],b=t[9],T=t[10],S=t[11],e[8]=A*a+b*l+T*c+S*g,e[9]=A*n+b*s+T*h+S*m,e[10]=A*i+b*u+T*d+S*x,e[11]=A*o+b*f+T*p+S*_,A=t[12],b=t[13],T=t[14],S=t[15],e[12]=A*a+b*l+T*c+S*g,e[13]=A*n+b*s+T*h+S*m,e[14]=A*i+b*u+T*d+S*x,e[15]=A*o+b*f+T*p+S*_,e}});var TS=R((hSe,AS)=>{AS.exports=Cne;function Cne(e,r,t){var a=t[0],n=t[1],i=t[2],o,l,s,u,f,c,h,d,p,g,m,x;return r===e?(e[12]=r[0]*a+r[4]*n+r[8]*i+r[12],e[13]=r[1]*a+r[5]*n+r[9]*i+r[13],e[14]=r[2]*a+r[6]*n+r[10]*i+r[14],e[15]=r[3]*a+r[7]*n+r[11]*i+r[15]):(o=r[0],l=r[1],s=r[2],u=r[3],f=r[4],c=r[5],h=r[6],d=r[7],p=r[8],g=r[9],m=r[10],x=r[11],e[0]=o,e[1]=l,e[2]=s,e[3]=u,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=g,e[10]=m,e[11]=x,e[12]=o*a+f*n+p*i+r[12],e[13]=l*a+c*n+g*i+r[13],e[14]=s*a+h*n+m*i+r[14],e[15]=u*a+d*n+x*i+r[15]),e}});var SS=R((dSe,MS)=>{MS.exports=Ene;function Ene(e,r,t){var a=t[0],n=t[1],i=t[2];return e[0]=r[0]*a,e[1]=r[1]*a,e[2]=r[2]*a,e[3]=r[3]*a,e[4]=r[4]*n,e[5]=r[5]*n,e[6]=r[6]*n,e[7]=r[7]*n,e[8]=r[8]*i,e[9]=r[9]*i,e[10]=r[10]*i,e[11]=r[11]*i,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var CS=R((pSe,kS)=>{kS.exports=Lne;function Lne(e,r,t,a){var n=a[0],i=a[1],o=a[2],l=Math.sqrt(n*n+i*i+o*o),s,u,f,c,h,d,p,g,m,x,_,A,b,T,S,M,k,D,P,N,q,O,U,$;return Math.abs(l)<1e-6?null:(l=1/l,n*=l,i*=l,o*=l,s=Math.sin(t),u=Math.cos(t),f=1-u,c=r[0],h=r[1],d=r[2],p=r[3],g=r[4],m=r[5],x=r[6],_=r[7],A=r[8],b=r[9],T=r[10],S=r[11],M=n*n*f+u,k=i*n*f+o*s,D=o*n*f-i*s,P=n*i*f-o*s,N=i*i*f+u,q=o*i*f+n*s,O=n*o*f+i*s,U=i*o*f-n*s,$=o*o*f+u,e[0]=c*M+g*k+A*D,e[1]=h*M+m*k+b*D,e[2]=d*M+x*k+T*D,e[3]=p*M+_*k+S*D,e[4]=c*P+g*N+A*q,e[5]=h*P+m*N+b*q,e[6]=d*P+x*N+T*q,e[7]=p*P+_*N+S*q,e[8]=c*O+g*U+A*$,e[9]=h*O+m*U+b*$,e[10]=d*O+x*U+T*$,e[11]=p*O+_*U+S*$,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var LS=R((mSe,ES)=>{ES.exports=Dne;function Dne(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[4],o=r[5],l=r[6],s=r[7],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=i*n+u*a,e[5]=o*n+f*a,e[6]=l*n+c*a,e[7]=s*n+h*a,e[8]=u*n-i*a,e[9]=f*n-o*a,e[10]=c*n-l*a,e[11]=h*n-s*a,e}});var qS=R((ySe,DS)=>{DS.exports=qne;function qne(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[8],f=r[9],c=r[10],h=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n-u*a,e[1]=o*n-f*a,e[2]=l*n-c*a,e[3]=s*n-h*a,e[8]=i*a+u*n,e[9]=o*a+f*n,e[10]=l*a+c*n,e[11]=s*a+h*n,e}});var RS=R((gSe,FS)=>{FS.exports=Fne;function Fne(e,r,t){var a=Math.sin(t),n=Math.cos(t),i=r[0],o=r[1],l=r[2],s=r[3],u=r[4],f=r[5],c=r[6],h=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=i*n+u*a,e[1]=o*n+f*a,e[2]=l*n+c*a,e[3]=s*n+h*a,e[4]=u*n-i*a,e[5]=f*n-o*a,e[6]=c*n-l*a,e[7]=h*n-s*a,e}});var NS=R((bSe,PS)=>{PS.exports=Rne;function Rne(e,r,t){var a,n,i,o=t[0],l=t[1],s=t[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,l*=u,s*=u,a=Math.sin(r),n=Math.cos(r),i=1-n,e[0]=o*o*i+n,e[1]=l*o*i+s*a,e[2]=s*o*i-l*a,e[3]=0,e[4]=o*l*i-s*a,e[5]=l*l*i+n,e[6]=s*l*i+o*a,e[7]=0,e[8]=o*s*i+l*a,e[9]=l*s*i-o*a,e[10]=s*s*i+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var OS=R((xSe,IS)=>{IS.exports=Pne;function Pne(e,r,t){var a=r[0],n=r[1],i=r[2],o=r[3],l=a+a,s=n+n,u=i+i,f=a*l,c=a*s,h=a*u,d=n*s,p=n*u,g=i*u,m=o*l,x=o*s,_=o*u;return e[0]=1-(d+g),e[1]=c+_,e[2]=h-x,e[3]=0,e[4]=c-_,e[5]=1-(f+g),e[6]=p+m,e[7]=0,e[8]=h+x,e[9]=p-m,e[10]=1-(f+d),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var BS=R((_Se,zS)=>{zS.exports=Nne;function Nne(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var GS=R((wSe,US)=>{US.exports=Ine;function Ine(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var VS=R((ASe,HS)=>{HS.exports=One;function One(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var WS=R((TSe,YS)=>{YS.exports=zne;function zne(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var XS=R((MSe,jS)=>{jS.exports=Bne;function Bne(e,r){var t=Math.sin(r),a=Math.cos(r);return e[0]=a,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,e[5]=a,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 C_=R((SSe,ZS)=>{ZS.exports=Une;function Une(e,r){var t=r[0],a=r[1],n=r[2],i=r[3],o=t+t,l=a+a,s=n+n,u=t*o,f=a*o,c=a*l,h=n*o,d=n*l,p=n*s,g=i*o,m=i*l,x=i*s;return e[0]=1-c-p,e[1]=f+x,e[2]=h-m,e[3]=0,e[4]=f-x,e[5]=1-u-p,e[6]=d+g,e[7]=0,e[8]=h+m,e[9]=d-g,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var $S=R((kSe,JS)=>{JS.exports=Gne;function Gne(e,r,t,a,n,i,o){var l=1/(t-r),s=1/(n-a),u=1/(i-o);return e[0]=i*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*s,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(n+a)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var QS=R((CSe,KS)=>{KS.exports=Hne;function Hne(e,r,t,a,n){var i=1/Math.tan(r/2),o=1/(a-n);return e[0]=i/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+a)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*a*o,e[15]=0,e}});var rk=R((ESe,ek)=>{ek.exports=Vne;function Vne(e,r,t,a){var n=Math.tan(r.upDegrees*Math.PI/180),i=Math.tan(r.downDegrees*Math.PI/180),o=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(n+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-l)*s*.5),e[9]=(n-i)*u*.5,e[10]=a/(t-a),e[11]=-1,e[12]=0,e[13]=0,e[14]=a*t/(t-a),e[15]=0,e}});var ak=R((LSe,tk)=>{tk.exports=Yne;function Yne(e,r,t,a,n,i,o){var l=1/(r-t),s=1/(a-n),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(r+t)*l,e[13]=(n+a)*s,e[14]=(o+i)*u,e[15]=1,e}});var ik=R((DSe,nk)=>{var Wne=k_();nk.exports=jne;function jne(e,r,t,a){var n,i,o,l,s,u,f,c,h,d,p=r[0],g=r[1],m=r[2],x=a[0],_=a[1],A=a[2],b=t[0],T=t[1],S=t[2];return Math.abs(p-b)<1e-6&&Math.abs(g-T)<1e-6&&Math.abs(m-S)<1e-6?Wne(e):(f=p-b,c=g-T,h=m-S,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,n=_*h-A*c,i=A*f-x*h,o=x*c-_*f,d=Math.sqrt(n*n+i*i+o*o),d?(d=1/d,n*=d,i*=d,o*=d):(n=0,i=0,o=0),l=c*o-h*i,s=h*n-f*o,u=f*i-c*n,d=Math.sqrt(l*l+s*s+u*u),d?(d=1/d,l*=d,s*=d,u*=d):(l=0,s=0,u=0),e[0]=n,e[1]=l,e[2]=f,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+i*g+o*m),e[13]=-(l*p+s*g+u*m),e[14]=-(f*p+c*g+h*m),e[15]=1,e)}});var lk=R((qSe,ok)=>{ok.exports=Xne;function Xne(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 E_=R((FSe,sk)=>{sk.exports={create:lS(),clone:uS(),copy:cS(),identity:k_(),transpose:dS(),invert:mS(),adjoint:gS(),determinant:xS(),multiply:wS(),translate:TS(),scale:SS(),rotate:CS(),rotateX:LS(),rotateY:qS(),rotateZ:RS(),fromRotation:NS(),fromRotationTranslation:OS(),fromScaling:BS(),fromTranslation:GS(),fromXRotation:VS(),fromYRotation:WS(),fromZRotation:XS(),fromQuat:C_(),frustum:$S(),perspective:QS(),perspectiveFromFieldOfView:rk(),ortho:ak(),lookAt:ik(),str:lk()}});var Qy=R(dn=>{"use strict";var Zne=E_();dn.init2dArray=function(e,r){for(var t=new Array(e),a=0;a{"use strict";var Jne=ta(),uk=hc(),$ne=Qy(),Kne=E_();function Qne(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function eie(e){var r=Jne.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function fk(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function rie(e,r){ck("global",e,r)}function ck(e,r,t){var a="plotly.js-style-"+e,n=document.getElementById(a);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",a),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var i=n.sheet;i?i.insertRule?i.insertRule(r+"{"+t+"}",0):i.addRule?i.addRule(r,t,0):uk.warn("addStyleRule failed"):uk.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function tie(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&fk(t)}function aie(e,r,t,a,n){var i=a.split(":"),o=n.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(s){s.getAttribute(l)||(s.addEventListener("mouseenter",function(){var u=this.querySelector(t);u&&(u.style[i[0]]=i[1])}),s.addEventListener("mouseleave",function(){var u=this.querySelector(t);u&&(r&&this.matches(r)?u.style[i[0]]=i[1]:u.style[o[0]]=o[1])}),s.setAttribute(l,!0))})}function nie(e){var r=hk(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(a){var n=vk(a);if(n){var i=$ne.convertCssMatrix(n);t=Kne.multiply(t,t,i)}}),t}function vk(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function hk(e){for(var r=[];iie(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function iie(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function oie(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}dk.exports={getGraphDiv:Qne,isPlotDiv:eie,removeElement:fk,addStyleRule:rie,addRelatedStyleRule:ck,deleteRelatedStyleRule:tie,setStyleOnHover:aie,getFullTransformMatrix:nie,getElementTransformMatrix:vk,getElementAndAncestors:hk,equalDomRects:oie}});var t1=R((NSe,pk)=>{"use strict";pk.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 dl=R((ISe,wk)=>{"use strict";var yk=hn().extendFlat,lie=Ru(),gk={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},bk={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},sie=gk.flags.slice().concat(["fullReplot"]),uie=bk.flags.slice().concat("layoutReplot");wk.exports={traces:gk,layout:bk,traceFlags:function(){return mk(sie)},layoutFlags:function(){return mk(uie)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var a=t.split("+"),n=0;n{"use strict";L_.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};L_.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 D_=R((zSe,Ak)=>{"use strict";Ak.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 o0=R(eg=>{"use strict";var Tk=D_(),BSe=Tk.FORMAT_LINK,USe=Tk.DATE_FORMAT_LINK;function q_(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var a=[],n=0;n{"use strict";function Ou(e,r){return r?r.d2l(e):e}function Mk(e,r){return r?r.l2d(e):e}function fie(e){return e.x0}function cie(e){return e.x1}function vie(e){return e.y0}function hie(e){return e.y1}function Sk(e){return e.x0shift||0}function kk(e){return e.x1shift||0}function Ck(e){return e.y0shift||0}function Ek(e){return e.y1shift||0}function rg(e,r){return Ou(e.x1,r)+kk(e)-Ou(e.x0,r)-Sk(e)}function tg(e,r,t){return Ou(e.y1,t)+Ek(e)-Ou(e.y0,t)-Ck(e)}function die(e,r){return Math.abs(rg(e,r))}function pie(e,r,t){return Math.abs(tg(e,r,t))}function mie(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(rg(e,r),2)+Math.pow(tg(e,r,t),2))}function yie(e,r){return Mk((Ou(e.x1,r)+kk(e)+Ou(e.x0,r)+Sk(e))/2,r)}function gie(e,r,t){return Mk((Ou(e.y1,t)+Ek(e)+Ou(e.y0,t)+Ck(e))/2,t)}function bie(e,r,t){return e.type!=="line"?void 0:tg(e,r,t)/rg(e,r)}Lk.exports={x0:fie,x1:cie,y0:vie,y1:hie,slope:bie,dx:rg,dy:tg,width:die,height:pie,length:mie,xcenter:yie,ycenter:gie}});var Fk=R((VSe,qk)=>{"use strict";var xie=dl().overrideAll,dc=hl(),Dk=ci(),_ie=Iu().dash,zu=hn().extendFlat,wie=o0().shapeTexttemplateAttrs,Aie=ag();qk.exports=xie({newshape:{visible:zu({},dc.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:zu({},dc.legend,{}),legendgroup:zu({},dc.legendgroup,{}),legendgrouptitle:{text:zu({},dc.legendgrouptitle.text,{}),font:Dk({})},legendrank:zu({},dc.legendrank,{}),legendwidth:zu({},dc.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:zu({},_ie,{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:zu({},dc.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:wie({newshape:!0},{keys:Object.keys(Aie)}),font:Dk({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Pk=R((YSe,Rk)=>{"use strict";var Tie=Iu().dash,Mie=hn().extendFlat;Rk.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:Mie({},Tie,{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 ng=R((WSe,Nk)=>{"use strict";Nk.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var l0=R((jSe,Bk)=>{"use strict";var F_=ci(),Sie=t1(),ig=Kl(),Ik=Fk(),Ok=Pk(),kie=ng(),zk=hn().extendFlat,og=F_({editType:"calc"});og.family.dflt='"Open Sans", verdana, arial, sans-serif';og.size.dflt=12;og.color.dflt=ig.defaultLine;Bk.exports={font:og,title:{text:{valType:"string",editType:"layoutstyle"},font:F_({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:F_({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:zk(kie({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:ig.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:ig.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:ig.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:"plot"},newshape:Ik.newshape,activeshape:Ik.activeshape,newselection:Ok.newselection,activeselection:Ok.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:zk({},Sie.transition,{editType:"none"})}});var Uk=aM(()=>{});var Cie={};var Gk=aM(()=>{Uk()});var Ct=R(Xt=>{"use strict";var s0=hc(),Hk=Ky(),Vk=S_(),Eie=Ru(),Lie=r1().addStyleRule,Yk=hn(),Die=hl(),qie=l0(),Fie=Yk.extendFlat,R_=Yk.extendDeepAll;Xt.modules={};Xt.allCategories={};Xt.allTypes=[];Xt.subplotsRegistry={};Xt.componentsRegistry={};Xt.layoutArrayContainers=[];Xt.layoutArrayRegexes=[];Xt.traceLayoutAttributes={};Xt.localeRegistry={};Xt.apiMethodRegistry={};Xt.collectableSubplotTypes=null;Xt.register=function(r){if(Xt.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var zie=Kv().timeFormat,tC=ia(),P_=hc(),Uu=e0().mod,c0=_n(),Io=c0.BADNUM,no=c0.ONEDAY,a1=c0.ONEHOUR,Bu=c0.ONEMIN,f0=c0.ONESEC,n1=c0.EPOCHJD,Bs=Ct(),Jk=Kv().utcFormat,Bie=/^\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,Uie=/^\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,$k=new Date().getFullYear()-70;function Us(e){return e&&Bs.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}pn.dateTick0=function(e,r){var t=Gie(e,!!r);if(r<2)return t;var a=pn.dateTime2ms(t,e);return a+=no*(r-1),pn.ms2DateTime(a,0,e)};function Gie(e,r){return Us(e)?r?Bs.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Bs.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}pn.dfltRange=function(e){return Us(e)?Bs.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};pn.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var sg,ug;pn.dateTime2ms=function(e,r){if(pn.isJSDate(e)){var t=e.getTimezoneOffset()*Bu,a=(e.getUTCMinutes()-e.getMinutes())*Bu+(e.getUTCSeconds()-e.getSeconds())*f0+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var n=3*Bu;t=t-n/2+Uu(a-t+n/2,n)}return e=Number(e)-t,e>=sg&&e<=ug?e:Io}if(typeof e!="string"&&typeof e!="number")return Io;e=String(e);var i=Us(r),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.substr(1),r="");var l=i&&r.substr(0,7)==="chinese",s=e.match(l?Uie:Bie);if(!s)return Io;var u=s[1],f=s[3]||"1",c=Number(s[5]||1),h=Number(s[7]||0),d=Number(s[9]||0),p=Number(s[11]||0);if(i){if(u.length===2)return Io;u=Number(u);var g;try{var m=Bs.getComponentMethod("calendars","getCal")(r);if(l){var x=f.charAt(f.length-1)==="i";f=parseInt(f,10),g=m.newDate(u,m.toMonthIndex(u,f,x),c)}else g=m.newDate(u,Number(f),c)}catch(A){return Io}return g?(g.toJD()-n1)*no+h*a1+d*Bu+p*f0:Io}u.length===2?u=(Number(u)+2e3-$k)%100+$k:u=Number(u),f-=1;var _=new Date(Date.UTC(2e3,f,c,h,d));return _.setUTCFullYear(u),_.getUTCMonth()!==f||_.getUTCDate()!==c?Io:_.getTime()+p*f0};sg=pn.MIN_MS=pn.dateTime2ms("-9999");ug=pn.MAX_MS=pn.dateTime2ms("9999-12-31 23:59:59.9999");pn.isDateTime=function(e,r){return pn.dateTime2ms(e,r)!==Io};function u0(e,r){return String(e+Math.pow(10,r)).substr(1)}var lg=90*no,Kk=3*a1,Qk=5*Bu;pn.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=sg&&e<=ug))return Io;r||(r=0);var a=Math.floor(Uu(e+.05,1)*10),n=Math.round(e-a/10),i,o,l,s,u,f;if(Us(t)){var c=Math.floor(n/no)+n1,h=Math.floor(Uu(e,no));try{i=Bs.getComponentMethod("calendars","getCal")(t).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){i=Jk("G%Y-%m-%d")(new Date(n))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=r=sg+no&&e<=ug-no))return Io;var r=Math.floor(Uu(e+.05,1)*10),t=new Date(Math.round(e-r/10)),a=zie("%Y-%m-%d")(t),n=t.getHours(),i=t.getMinutes(),o=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return aC(a,n,i,o,l)};function aC(e,r,t,a,n){if((r||t||a||n)&&(e+=" "+u0(r,2)+":"+u0(t,2),(a||n)&&(e+=":"+u0(a,2),n))){for(var i=4;n%10===0;)i-=1,n/=10;e+="."+u0(n,i)}return e}pn.cleanDate=function(e,r,t){if(e===Io)return r;if(pn.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Us(t))return P_.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=pn.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!pn.isDateTime(e,t))return P_.error("unrecognized date",e),r;return e};var Hie=/%\d?f/g,Vie=/%h/g,Yie={1:"1",2:"1",3:"2",4:"2"};function eC(e,r,t,a){e=e.replace(Hie,function(i){var o=Math.min(+i.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return l});var n=new Date(Math.floor(r+.05));if(e=e.replace(Vie,function(){return Yie[t("%q")(n)]}),Us(a))try{e=Bs.getComponentMethod("calendars","worldCalFmt")(e,r,a)}catch(i){return"Invalid"}return t(e)(n)}var Wie=[59,59.9,59.99,59.999,59.9999];function jie(e,r){var t=Uu(e+.05,no),a=u0(Math.floor(t/a1),2)+":"+u0(Uu(Math.floor(t/Bu),60),2);if(r!=="M"){tC(r)||(r=0);var n=Math.min(Uu(e/f0,60),Wie[r]),i=(100+n).toFixed(r).substr(1);r>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),a+=":"+i}return a}pn.formatDate=function(e,r,t,a,n,i){if(n=Us(n)&&n,!r)if(t==="y")r=i.year;else if(t==="m")r=i.month;else if(t==="d")r=i.dayMonth+` `+i.year;else return jie(e,t)+` -`+eC(i.dayMonthYear,e,a,n);return eC(r,e,a,n)};var rC=3*no;pn.incrementMonth=function(e,r,t){t=Us(t)&&t;var a=Uu(e,no);if(e=Math.round(e-a),t)try{var n=Math.round(e/no)+n1,i=Bs.getComponentMethod("calendars","getCal")(t),o=i.fromJD(n);return r%12?i.add(o,r,"m"):i.add(o,r/12,"y"),(o.toJD()-n1)*no+a}catch(s){P_.error("invalid ms "+e+" in calendar "+t)}var l=new Date(e+rC);return l.setUTCMonth(l.getUTCMonth()+r)+a-rC};pn.findExactDates=function(e,r){for(var t=0,a=0,n=0,i=0,o,l,s=Us(r)&&Bs.getComponentMethod("calendars","getCal")(r),u=0;u{"use strict";iC.exports=function(r){return r}});var I_=R(Gs=>{"use strict";var Xie=ia(),Zie=hc(),Jie=fg(),$ie=_n().BADNUM,N_=1e-9;Gs.findBin=function(e,r,t){if(Xie(r.start))return t?Math.ceil((e-r.start)/r.size-N_)-1:Math.floor((e-r.start)/r.size+N_);var a=0,n=r.length,i=0,o=n>1?(r[n-1]-r[0])/(n-1):1,l,s;for(o>=0?s=t?Kie:Qie:s=t?roe:eoe,e+=o*N_*(t?-1:1)*(o>=0?1:-1);a90&&Zie.log("Long binary search..."),a-1};function Kie(e,r){return er}function roe(e,r){return e>=r}Gs.sorterAsc=function(e,r){return e-r};Gs.sorterDes=function(e,r){return r-e};Gs.distinctVals=function(e){var r=e.slice();r.sort(Gs.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===$ie;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],o,l=0;l<=t;l++){var s=r[l],u=s-o;o===void 0?(i.push(s),o=s):u>n&&(a=Math.min(a,u),i.push(s),o=s)}return{vals:i,minDiff:a}};Gs.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,o=0,l=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};Gs.findIndexOfMin=function(e,r){r=r||Jie;for(var t=1/0,a,n=0;n{"use strict";oC.exports=function(r){return Object.keys(r).sort()}});var lC=R(mn=>{"use strict";var i1=ia(),toe=ro().isArrayOrTypedArray;mn.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),i1(r)||(r=!1),toe(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var vC=R((ake,cC)=>{"use strict";var sC=e0(),O_=sC.mod,aoe=sC.modHalf,o1=Math.PI,Gu=2*o1;function noe(e){return e/180*o1}function ioe(e){return e/o1*180}function z_(e){return Math.abs(e[1]-e[0])>Gu-1e-14}function uC(e,r){return aoe(r-e,Gu)}function ooe(e,r){return Math.abs(uC(e,r))}function fC(e,r){if(z_(r))return!0;var t,a;r[0]a&&(a+=Gu);var n=O_(e,Gu),i=n+Gu;return n>=t&&n<=a||i>=t&&i<=a}function loe(e,r,t,a){if(!fC(r,a))return!1;var n,i;return t[0]=n&&e<=i}function B_(e,r,t,a,n,i,o){n=n||0,i=i||0;var l=z_([t,a]),s,u,f,c,h;l?(s=0,u=o1,f=Gu):t{"use strict";pc.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};pc.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};pc.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};pc.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};pc.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};pc.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var mC=R(mc=>{"use strict";var U_=e0().mod;mc.segmentsIntersect=pC;function pC(e,r,t,a,n,i,o,l){var s=t-e,u=n-e,f=o-n,c=a-r,h=i-r,d=l-i,p=s*d-f*c;if(p===0)return null;var g=(u*d-f*h)/p,m=(u*c-s*h)/p;return m<0||m>1||g<0||g>1?null:{x:e+s*g,y:r+c*g}}mc.segmentDistance=function(r,t,a,n,i,o,l,s){if(pC(r,t,a,n,i,o,l,s))return 0;var u=a-r,f=n-t,c=l-i,h=s-o,d=u*u+f*f,p=c*c+h*h,g=Math.min(vg(u,f,d,i-r,o-t),vg(u,f,d,l-r,s-t),vg(c,h,p,r-i,t-o),vg(c,h,p,a-i,n-o));return Math.sqrt(g)};function vg(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var o=a-e,l=n-r;return o*o+l*l}else{var s=a*r-n*e;return s*s/t}}var hg,G_,dC;mc.getTextLocation=function(r,t,a,n){if((r!==G_||n!==dC)&&(hg={},G_=r,dC=n),hg[a])return hg[a];var i=r.getPointAtLength(U_(a-n/2,t)),o=r.getPointAtLength(U_(a+n/2,t)),l=Math.atan((o.y-i.y)/(o.x-i.x)),s=r.getPointAtLength(U_(a,t)),u=(s.x*4+i.x+o.x)/6,f=(s.y*4+i.y+o.y)/6,c={x:u,y:f,theta:l};return hg[a]=c,c};mc.clearLocationCache=function(){G_=null};mc.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,o=t.top,l=t.bottom,s=0,u=r.getTotalLength(),f=u,c,h;function d(g){var m=r.getPointAtLength(g);g===0?c=m:g===u&&(h=m);var b=m.xi?m.x-i:0,_=m.yl?m.y-l:0;return Math.sqrt(b*b+_*_)}for(var p=d(s);p;){if(s+=p+a,s>f)return;p=d(s)}for(p=d(f);p;){if(f-=p+a,s>f)return;p=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};mc.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),o=n.tolerance||.001,l=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,c=i,h,d,p;u0?c=h:f=h,u++}return d}});var dg=R(l1=>{"use strict";var Hs={};l1.throttle=function(r,t,a){var n=Hs[r],i=Date.now();if(!n){for(var o in Hs)Hs[o].tsn.ts+t){l();return}n.timer=setTimeout(function(){l(),n.timer=null},t)};l1.done=function(e){var r=Hs[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};l1.clear=function(e){if(e)yC(Hs[e]),delete Hs[e];else for(var r in Hs)l1.clear(r)};function yC(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var bC=R((lke,gC)=>{"use strict";gC.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var xC=R((ske,pg)=>{"use strict";pg.exports=H_;pg.exports.isMobile=H_;pg.exports.default=H_;var coe=/(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,voe=/CrOS/,hoe=/android|ipad|playbook|silk/i;function H_(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=coe.test(r)&&!voe.test(r)||!!e.tablet&&hoe.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var wC=R((uke,_C)=>{"use strict";var doe=ia(),poe=xC();_C.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=moe(),typeof t!="string")return!0;var a=poe({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;l--){var s=n[l];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(doe(u)&&(u=+u),u>=13)return!0}}}return a};function moe(){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 TC=R((fke,AC)=>{"use strict";var yoe=ta();AC.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][i]=yoe.select(this)}),n}});var SC=R((cke,MC)=>{"use strict";var goe=Ct();MC.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,o=0;o<2;o++){var l=(i[a]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=goe.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var CC=R((vke,kC)=>{"use strict";kC.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";EC.exports=function(r){for(var t=_oe(r)?xoe:boe,a=[],n=0;n{"use strict";DC.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var o=String(t).length,l=String(r).length;if(i>=l+o){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var RC=R((pke,FC)=>{"use strict";var woe=ia(),Aoe=_n().BADNUM,Toe=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;FC.exports=function(r){return typeof r=="string"&&(r=r.replace(Toe,"")),woe(r)?Number(r):Aoe}});var fr=R((mke,jC)=>{"use strict";var s1=ta(),Moe=Kv().utcFormat,Soe=v_().format,BC=ia(),UC=_n(),GC=UC.FP_SAFE,koe=-GC,PC=UC.BADNUM,Ae=jC.exports={};Ae.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var NC={};Ae.warnBadFormat=function(e){var r=String(e);NC[r]||(NC[r]=1,Ae.warn('encountered bad format: "'+r+'"'))};Ae.noFormat=function(e){return String(e)};Ae.numberFormat=function(e){var r;try{r=Soe(Ae.adjustFormat(e))}catch(t){return Ae.warnBadFormat(e),Ae.noFormat}return r};Ae.nestedProperty=Gy();Ae.keyedContainer=SM();Ae.relativeAttr=CM();Ae.isPlainObject=Ru();Ae.toLogRange=Vy();Ae.relinkPrivateKeys=qM();var Hu=ro();Ae.isArrayBuffer=Hu.isArrayBuffer;Ae.isTypedArray=Hu.isTypedArray;Ae.isArrayOrTypedArray=Hu.isArrayOrTypedArray;Ae.isArray1D=Hu.isArray1D;Ae.ensureArray=Hu.ensureArray;Ae.concat=Hu.concat;Ae.maxRowLength=Hu.maxRowLength;Ae.minRowLength=Hu.minRowLength;var HC=e0();Ae.mod=HC.mod;Ae.modHalf=HC.modHalf;var Vu=$M();Ae.valObjectMeta=Vu.valObjectMeta;Ae.coerce=Vu.coerce;Ae.coerce2=Vu.coerce2;Ae.coerceFont=Vu.coerceFont;Ae.coercePattern=Vu.coercePattern;Ae.coerceHoverinfo=Vu.coerceHoverinfo;Ae.coerceSelectionMarkerOpacity=Vu.coerceSelectionMarkerOpacity;Ae.validate=Vu.validate;var _o=nC();Ae.dateTime2ms=_o.dateTime2ms;Ae.isDateTime=_o.isDateTime;Ae.ms2DateTime=_o.ms2DateTime;Ae.ms2DateTimeLocal=_o.ms2DateTimeLocal;Ae.cleanDate=_o.cleanDate;Ae.isJSDate=_o.isJSDate;Ae.formatDate=_o.formatDate;Ae.incrementMonth=_o.incrementMonth;Ae.dateTick0=_o.dateTick0;Ae.dfltRange=_o.dfltRange;Ae.findExactDates=_o.findExactDates;Ae.MIN_MS=_o.MIN_MS;Ae.MAX_MS=_o.MAX_MS;var yc=I_();Ae.findBin=yc.findBin;Ae.sorterAsc=yc.sorterAsc;Ae.sorterDes=yc.sorterDes;Ae.distinctVals=yc.distinctVals;Ae.roundUp=yc.roundUp;Ae.sort=yc.sort;Ae.findIndexOfMin=yc.findIndexOfMin;Ae.sortObjectKeys=cg();var Vs=lC();Ae.aggNums=Vs.aggNums;Ae.len=Vs.len;Ae.mean=Vs.mean;Ae.geometricMean=Vs.geometricMean;Ae.median=Vs.median;Ae.midRange=Vs.midRange;Ae.variance=Vs.variance;Ae.stdev=Vs.stdev;Ae.interp=Vs.interp;var pl=Qy();Ae.init2dArray=pl.init2dArray;Ae.transposeRagged=pl.transposeRagged;Ae.dot=pl.dot;Ae.translationMatrix=pl.translationMatrix;Ae.rotationMatrix=pl.rotationMatrix;Ae.rotationXYMatrix=pl.rotationXYMatrix;Ae.apply3DTransform=pl.apply3DTransform;Ae.apply2DTransform=pl.apply2DTransform;Ae.apply2DTransform2=pl.apply2DTransform2;Ae.convertCssMatrix=pl.convertCssMatrix;Ae.inverseTransformMatrix=pl.inverseTransformMatrix;var es=vC();Ae.deg2rad=es.deg2rad;Ae.rad2deg=es.rad2deg;Ae.angleDelta=es.angleDelta;Ae.angleDist=es.angleDist;Ae.isFullCircle=es.isFullCircle;Ae.isAngleInsideSector=es.isAngleInsideSector;Ae.isPtInsideSector=es.isPtInsideSector;Ae.pathArc=es.pathArc;Ae.pathSector=es.pathSector;Ae.pathAnnulus=es.pathAnnulus;var h0=hC();Ae.isLeftAnchor=h0.isLeftAnchor;Ae.isCenterAnchor=h0.isCenterAnchor;Ae.isRightAnchor=h0.isRightAnchor;Ae.isTopAnchor=h0.isTopAnchor;Ae.isMiddleAnchor=h0.isMiddleAnchor;Ae.isBottomAnchor=h0.isBottomAnchor;var d0=mC();Ae.segmentsIntersect=d0.segmentsIntersect;Ae.segmentDistance=d0.segmentDistance;Ae.getTextLocation=d0.getTextLocation;Ae.clearLocationCache=d0.clearLocationCache;Ae.getVisibleSegment=d0.getVisibleSegment;Ae.findPointOnPath=d0.findPointOnPath;var gg=hn();Ae.extendFlat=gg.extendFlat;Ae.extendDeep=gg.extendDeep;Ae.extendDeepAll=gg.extendDeepAll;Ae.extendDeepNoArrays=gg.extendDeepNoArrays;var V_=hc();Ae.log=V_.log;Ae.warn=V_.warn;Ae.error=V_.error;var Coe=a0();Ae.counterRegex=Coe.counter;var Y_=dg();Ae.throttle=Y_.throttle;Ae.throttleDone=Y_.done;Ae.clearThrottle=Y_.clear;var ml=r1();Ae.getGraphDiv=ml.getGraphDiv;Ae.isPlotDiv=ml.isPlotDiv;Ae.removeElement=ml.removeElement;Ae.addStyleRule=ml.addStyleRule;Ae.addRelatedStyleRule=ml.addRelatedStyleRule;Ae.deleteRelatedStyleRule=ml.deleteRelatedStyleRule;Ae.setStyleOnHover=ml.setStyleOnHover;Ae.getFullTransformMatrix=ml.getFullTransformMatrix;Ae.getElementTransformMatrix=ml.getElementTransformMatrix;Ae.getElementAndAncestors=ml.getElementAndAncestors;Ae.equalDomRects=ml.equalDomRects;Ae.clearResponsive=bC();Ae.preserveDrawingBuffer=wC();Ae.makeTraceGroups=TC();Ae._=SC();Ae.notifier=A_();Ae.filterUnique=CC();Ae.filterVisible=LC();Ae.pushUnique=S_();Ae.increment=qC();Ae.cleanNumber=RC();Ae.ensureNumber=function(r){return BC(r)?(r=Number(r),r>GC||r=r?!1:BC(e)&&e>=0&&e%1===0};Ae.noop=Ky();Ae.identity=fg();Ae.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};Ae.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};Ae.simpleMap=function(e,r,t,a,n){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,t)?n>10?(Ae.warn("randstr failed uniqueness"),o):e(r,t,a,(n||0)+1):o};Ae.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};Ae.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),o=new Array(t),l,s,u,f;for(l=0;l=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];o[l]=f}return o};Ae.syncOrAsync=function(e,r,t){var a,n;function i(){return Ae.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};Ae.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};Ae.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,o;for(i=0;i0?n:0})};Ae.fillArray=function(e,r,t,a){if(a=a||Ae.identity,Ae.isArrayOrTypedArray(e))for(var n=0;n1?n+o[1]:"";if(i&&(o.length>1||l.length>4||t))for(;a.test(l);)l=l.replace(a,"$1"+i+"$2");return l+s};Ae.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var WC=/^\w*$/;Ae.templateString=function(e,r){var t={};return e.replace(Ae.TEMPLATE_STRING_REGEX,function(a,n){var i;return WC.test(n)?i=r[n]:(t[n]=t[n]||Ae.nestedProperty(r,n).get,i=t[n]()),Ae.isValidTextValue(i)?i:""})};var Roe={max:10,count:0,name:"hovertemplate"};Ae.hovertemplateString=function(){return W_.apply(Roe,arguments)};var Poe={max:10,count:0,name:"texttemplate"};Ae.texttemplateString=function(){return W_.apply(Poe,arguments)};var Noe=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Ioe(e){var r=e.match(Noe);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var Ooe={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ae.texttemplateStringForShapes=function(){return W_.apply(Ooe,arguments)};var IC=/^[:|\|]/;function W_(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(Ae.TEMPLATE_STRING_REGEX,function(o,l,s){var u=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",c=l==="_xother_"||l==="_yother_",h=l==="xother_"||l==="yother_",d=u||f||h||c,p=l;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var g=null,m=null;if(a.parseMultDiv){var b=Ioe(p);p=b.key,g=b.op,m=b.number}var _;if(d){if(_=r[p],_===void 0)return""}else{var w,x;for(x=3;x=yg&&o<=OC,u=l>=yg&&l<=OC;if(s&&(a=10*a+o-yg),u&&(n=10*n+l-yg),!s||!u){if(a!==n)return a-n;if(o!==l)return o-l}}return n-a};var v0=2e9;Ae.seedPseudoRandom=function(){v0=2e9};Ae.pseudoRandom=function(){var e=v0;return v0=(69069*v0+1)%4294967296,Math.abs(v0-e)<429496729?Ae.pseudoRandom():v0/4294967296};Ae.fillText=function(e,r,t){var a=Array.isArray(t)?function(o){t.push(o)}:function(o){t.text=o},n=Ae.extractOption(e,r,"htx","hovertext");if(Ae.isValidTextValue(n))return a(n);var i=Ae.extractOption(e,r,"tx","text");if(Ae.isValidTextValue(i))return a(i)};Ae.isValidTextValue=function(e){return e||e===0};Ae.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,Ae.strTranslate(n-u*(t+o),i-u*(a+l))+Ae.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};Ae.setTransormAndDisplay=function(e,r){e.attr("transform",Ae.getTextTransform(r)),e.style("display",r.scale?null:"none")};Ae.ensureUniformFontSize=function(e,r){var t=Ae.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};Ae.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};Ae.bigFont=function(e){return Math.round(1.2*e)};var zC=Ae.getFirefoxVersion(),zoe=zC!==null&&zC<86;Ae.getPositionFromD3Event=function(){return zoe?[s1.event.layerX,s1.event.layerY]:[s1.event.offsetX,s1.event.offsetY]}});var JC=R(()=>{"use strict";var Boe=fr(),XC={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(j_ in XC)ZC=j_.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Boe.addStyleRule(ZC,XC[j_]);var ZC,j_});var X_=R((bke,$C)=>{$C.exports=!0});var J_=R((xke,KC)=>{"use strict";var Uoe=X_(),Z_;typeof window.matchMedia=="function"?Z_=!window.matchMedia("(hover: none)").matches:Z_=Uoe;KC.exports=Z_});var _g=R((_ke,$_)=>{"use strict";var p0=typeof Reflect=="object"?Reflect:null,QC=p0&&typeof p0.apply=="function"?p0.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},bg;p0&&typeof p0.ownKeys=="function"?bg=p0.ownKeys:Object.getOwnPropertySymbols?bg=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:bg=function(r){return Object.getOwnPropertyNames(r)};function Goe(e){console&&console.warn&&console.warn(e)}var rE=Number.isNaN||function(r){return r!==r};function Ga(){Ga.init.call(this)}$_.exports=Ga;$_.exports.once=Woe;Ga.EventEmitter=Ga;Ga.prototype._events=void 0;Ga.prototype._eventsCount=0;Ga.prototype._maxListeners=void 0;var eE=10;function xg(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ga,"defaultMaxListeners",{enumerable:!0,get:function(){return eE},set:function(e){if(typeof e!="number"||e<0||rE(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");eE=e}});Ga.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};Ga.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||rE(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function tE(e){return e._maxListeners===void 0?Ga.defaultMaxListeners:e._maxListeners}Ga.prototype.getMaxListeners=function(){return tE(this)};Ga.prototype.emit=function(r){for(var t=[],a=1;a0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")QC(s,this,t);else for(var u=s.length,f=lE(s,u),a=0;a0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=o.length,Goe(l)}return e}Ga.prototype.addListener=function(r,t){return aE(this,r,t,!1)};Ga.prototype.on=Ga.prototype.addListener;Ga.prototype.prependListener=function(r,t){return aE(this,r,t,!0)};function Hoe(){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 nE(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=Hoe.bind(a);return n.listener=t,a.wrapFn=n,n}Ga.prototype.once=function(r,t){return xg(t),this.on(r,nE(this,r,t)),this};Ga.prototype.prependOnceListener=function(r,t){return xg(t),this.prependListener(r,nE(this,r,t)),this};Ga.prototype.removeListener=function(r,t){var a,n,i,o,l;if(xg(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,o=a.length-1;o>=0;o--)if(a[o]===t||a[o].listener===t){l=a[o].listener,i=o;break}if(i<0)return this;i===0?a.shift():Voe(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};Ga.prototype.off=Ga.prototype.removeListener;Ga.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),o;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function iE(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?Yoe(n):lE(n,n.length)}Ga.prototype.listeners=function(r){return iE(this,r,!0)};Ga.prototype.rawListeners=function(r){return iE(this,r,!1)};Ga.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):oE.call(e,r)};Ga.prototype.listenerCount=oE;function oE(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Ga.prototype.eventNames=function(){return this._eventsCount>0?bg(this._events):[]};function lE(e,r){for(var t=new Array(r),a=0;a{"use strict";var K_=_g().EventEmitter,Xoe={init:function(e){if(e._ev instanceof K_)return e;var r=new K_,t=new K_;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function o(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var l;for(l=0;l{"use strict";var fE=fr(),Zoe=vc().dfltConfig;function Joe(e,r){for(var t=[],a,n=0;nZoe.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Ys.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Ys.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Ys.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";hE.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var g0=R(Nn=>{"use strict";var Oo=Ct(),f1=fr(),Ag=hl(),e4=l0(),$oe=Q_(),Koe=t1(),Qoe=vc().configAttributes,dE=dl(),yl=f1.extendDeepAll,m0=f1.isPlainObject,ele=f1.isArrayOrTypedArray,Tg=f1.nestedProperty,rle=f1.valObjectMeta,r4="_isSubplotObj",Mg="_isLinkedToArray",tle="_arrayAttrRegexps",mE="_deprecated",t4=[r4,Mg,tle,mE];Nn.IS_SUBPLOT_OBJ=r4;Nn.IS_LINKED_TO_ARRAY=Mg;Nn.DEPRECATED=mE;Nn.UNDERSCORE_ATTRS=t4;Nn.get=function(){var e={};return Oo.allTypes.forEach(function(r){e[r]=nle(r)}),{defs:{valObjects:rle,metaKeys:t4.concat(["description","role","editType","impliedEdits"]),editType:{traces:dE.traces,layout:dE.layout},impliedEdits:{}},traces:e,layout:ile(),frames:ole(),animation:y0(Koe),config:y0(Qoe)}};Nn.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var o=e[i];if(t4.indexOf(i)===-1){var l=(a?a+".":"")+i;r(o,i,e,n,l),!Nn.isValObject(o)&&m0(o)&&i!=="impliedEdits"&&Nn.crawl(o,r,n+1,l)}})};Nn.isValObject=function(e){return e&&e.valType!==void 0};Nn.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function o(s,u,f,c){t=t.slice(0,c).concat([u]),a=a.slice(0,c).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[c-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&l(n,0,"")}function l(s,u,f){var c=s[t[u]],h=f+t[u];if(u===t.length-1)ele(c)&&r.push(i+h);else if(a[u]){if(Array.isArray(c))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var o=r[t];if(!wg(o))return!1;e=i[n][o]}else e=i[n]}else e=i}}return e}function wg(e){return e===Math.round(e)&&e>=0}function nle(e){var r,t;r=Oo.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=yl({},Ag),i=yl({},r.attributes);Nn.crawl(i,function(s,u,f,c,h){Tg(n,h).set(void 0),s===void 0&&Tg(i,h).set(void 0)}),yl(a,n),Oo.traceIs(e,"noOpacity")&&delete a.opacity,Oo.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),Oo.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,yl(a,i),t.attributes&&yl(a,t.attributes),a.type=e;var o={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:y0(a)};if(r.layoutAttributes){var l={};yl(l,r.layoutAttributes),o.layoutAttributes=y0(l)}return r.animatable||Nn.crawl(o,function(s){Nn.isValObject(s)&&"anim"in s&&delete s.anim}),o}function ile(){var e={},r,t;yl(e,e4);for(r in Oo.subplotsRegistry)if(t=Oo.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var b0=fr(),cle=hl(),Yu="templateitemname",a4={name:{valType:"string",editType:"none"}};a4[Yu]={valType:"string",editType:"calc"};gc.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=a4.name,r[Yu]=a4[Yu],r};gc.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=b0.coerce(i,{},cle,"type");var o={type:t,_template:null};if(t in r){a=e[t];var l=r[t]%a.length;r[t]++,o._template=a[l]}return o}return{newTrace:n}};gc.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);b0.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};gc.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[bE(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function l(u){var f={name:u.name,_input:u},c=f[Yu]=u[Yu];if(!gE(c))return f._template=n,f;for(var h=0;h=a&&(t._input||{})._templateitemname;i&&(n=a);var o=r+"["+n+"]",l;function s(){l={},i&&(l[o]={},l[o][Yu]=i)}s();function u(d,p){l[d]=p}function f(d,p){i?b0.nestedProperty(l[o],d).set(p):l[o+"."+d]=p}function c(){var d=l;return s(),d}function h(d,p){d&&f(d,p);var g=c();for(var m in g)b0.nestedProperty(e,m).set(g[m])}return{modifyBase:u,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var ai=R((kke,xE)=>{"use strict";var c1=a0().counter;xE.exports={idRegex:{x:c1("x","( domain)?"),y:c1("y","( domain)?")},attrRegex:c1("[xy]axis"),xAxisMatch:c1("xaxis"),yAxisMatch:c1("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 an=R(io=>{"use strict";var vle=Ct(),n4=ai();io.id2name=function(r){if(!(typeof r!="string"||!r.match(n4.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};io.name2id=function(r){if(r.match(n4.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};io.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(n4.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};io.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=io.listIds(e,r),i=new Array(n.length),o;for(o=0;oa?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};io.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function _E(e,r){if(r&&r.length){for(var t=0;t{"use strict";function hle(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function dle(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}wE.exports={clearOutlineControllers:hle,clearOutline:dle}});var Sg=R((Lke,AE)=>{"use strict";AE.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var v1=R(Cg=>{"use strict";var kg=Ct(),Dke=ai().SUBPLOT_PATTERN;Cg.getSubplotCalcData=function(e,r,t){var a=kg.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],o=0;o{"use strict";var ple=Ct(),x0=fr();bc.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=bc.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(o)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(o){TE(e,o,n.cache),n.check=function(){if(i){var f=TE(e,o,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;x0.isPlainObject(i)?i4(i,r,o,a+1):r(o,n,i)}})}});var jn=R((Rke,UE)=>{"use strict";var RE=ta(),yle=Kv().timeFormatLocale,gle=v_().formatLocale,h1=ia(),ble=h_(),pa=Ct(),PE=g0(),xle=Da(),Qr=fr(),NE=Qt(),CE=_n().BADNUM,oo=an(),_le=Wu().clearOutline,wle=Sg(),o4=t1(),Ale=Q_(),Tle=v1().getModuleCalcData,EE=Qr.relinkPrivateKeys,xc=Qr._,Br=UE.exports={};Qr.extendFlat(Br,pa);Br.attributes=hl();Br.attributes.type.values=Br.allTypes;Br.fontAttrs=ci();Br.layoutAttributes=l0();var Lg=kE();Br.executeAPICommand=Lg.executeAPICommand;Br.computeAPICommandBindings=Lg.computeAPICommandBindings;Br.manageCommandObserver=Lg.manageCommandObserver;Br.hasSimpleAPICommandBindings=Lg.hasSimpleAPICommandBindings;Br.redrawText=function(e){return e=Qr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(pa.getComponentMethod("annotations","draw")(e),pa.getComponentMethod("legend","draw")(e),pa.getComponentMethod("colorbar","draw")(e),r(Br.previousPromises(e)))},300)})};Br.resize=function(e){e=Qr.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||Qr.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Qr.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,pa.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};Br.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};Br.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=Qr.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:NE.defaultLine,"pointer-events":"all"}).each(function(){var u=RE.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),o=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&Mle(e,i),o.text(i.text()&&l.text()?" - ":"")}};function Mle(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){Br.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}Br.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=RE.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=Br.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var Sle=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],kle=["year","month","dayMonth","dayMonthYear"];Br.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},o=e._fullData||[],l=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},c;e._transitionData||Br.createTransitionData(e),n._dfltTitle={plot:xc(e,"Click to enter Plot title"),subtitle:xc(e,"Click to enter Plot subtitle"),x:xc(e,"Click to enter X axis title"),y:xc(e,"Click to enter Y axis title"),colorbar:xc(e,"Click to enter Colorscale title"),annotation:xc(e,"new text")},n._traceWord=xc(e,"trace");var h=LE(e,Sle);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,p=a.height;Br.supplyLayoutGlobalDefaults(i,n,h),i.width||(n.width=d),i.height||(n.height=p),Br.sanitizeMargins(n)}else{Br.supplyLayoutGlobalDefaults(i,n,h);var g=!i.width||!i.height,m=n.autosize,b=f.autosizable,_=g&&(m||b);_?Br.plotAutoSize(e,i,n):g&&Br.sanitizeMargins(n),!m&&g&&(i.width=n.width,i.height=n.height)}n._d3locale=Lle(h,n.separators),n._extraFormat=LE(e,kle),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var w=n._subplots=Ele(),x=n._splomAxes={x:{},y:{}},T=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=Cle(o,s),Br.supplyDataDefaults(s,l,i,n);var S=Object.keys(x.x),M=Object.keys(x.y);if(S.length>1&&M.length>1){for(pa.getComponentMethod("grid","sizeDefaults")(i,n),c=0;c15&&M.length>15&&n.shapes.length===0&&n.images.length===0,Br.linkSubplots(l,n,o,a),Br.cleanPlot(l,n,o,a);var q=!!(a._has&&a._has("cartesian")),O=!!(n._has&&n._has("cartesian")),U=q,$=O;U&&!$?a._bgLayer.remove():$&&!U&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&_le({_fullLayout:a}),Dle(l,n),EE(n,a),pa.getComponentMethod("colorscale","crossTraceDefaults")(l,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var j=n._tracePreGUI,H={},z;for(z in j)H[z]="old";for(c=0;c0){var f=1-2*i;o=Math.round(f*o),l=Math.round(f*l)}}var c=Br.layoutAttributes.width.min,h=Br.layoutAttributes.height.min;o1,p=!t.height&&Math.abs(a.height-l)>1;(p||d)&&(d&&(a.width=o),p&&(a.height=l)),r._initialAutoSize||(r._initialAutoSize={width:o,height:l}),Br.sanitizeMargins(a)};Br.supplyLayoutModuleDefaults=function(e,r,t,a){var n=pa.componentsRegistry,i=r._basePlotModules,o,l,s,u=pa.subplotsRegistry.cartesian;for(o in n)s=n[o],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(pa.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(Qr.subplotSort);for(l=0;l1&&(t.l/=m,t.r/=m)}if(h){var b=(t.t+t.b)/h;b>1&&(t.t/=b,t.b/=b)}var _=t.xl!==void 0?t.xl:t.x,w=t.xr!==void 0?t.xr:t.x,x=t.yt!==void 0?t.yt:t.y,T=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:_,size:t.l+g},r:{val:w,size:t.r+g},b:{val:T,size:t.b+g},t:{val:x,size:t.t+g}},p[r]=1}if(!a._replotting)return Br.doAutoMargin(e)}};function Fle(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=oo.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}Br.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),IE(r);var n=r._size,i=r.margin,o={t:0,b:0,l:0,r:0},l=Qr.extendFlat({},n),s=i.l,u=i.r,f=i.t,c=i.b,h=r._pushmargin,d=r._pushmarginIds,p=r.minreducedwidth,g=r.minreducedheight;if(i.autoexpand!==!1){for(var m in h)d[m]||delete h[m];var b=e._fullLayout._reservedMargin;for(var _ in b)for(var w in b[_]){var x=b[_][w];o[w]=Math.max(o[w],x)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:c}};for(var T in o){var S=0;for(var M in h)M!=="base"&&h1(h[M][T].size)&&(S=h[M][T].size>S?h[M][T].size:S);var k=Math.max(0,i[T]-S);o[T]=Math.max(0,o[T]-k)}for(var D in h){var P=h[D].l||{},N=h[D].b||{},q=P.val,O=P.size,U=N.val,$=N.size,j=t-o.r-o.l,H=a-o.t-o.b;for(var z in h){if(h1(O)&&h[z].r){var V=h[z].r.val,X=h[z].r.size;if(V>q){var K=(O*V+(X-j)*q)/(V-q),ve=(X*(1-q)+(O-j)*(1-V))/(V-q);K+ve>s+u&&(s=K,u=ve)}}if(h1($)&&h[z].t){var xe=h[z].t.val,se=h[z].t.size;if(xe>U){var be=($*xe+(se-H)*U)/(xe-U),re=(se*(1-U)+($-H)*(1-xe))/(xe-U);be+re>c+f&&(c=be,f=re)}}}}}var ke=Qr.constrain(t-i.l-i.r,OE,p),ge=Qr.constrain(a-i.t-i.b,zE,g),Ee=Math.max(0,t-ke),De=Math.max(0,a-ge);if(Ee){var Ce=(s+u)/Ee;Ce>1&&(s/=Ce,u/=Ce)}if(De){var Y=(c+f)/De;Y>1&&(c/=Y,f/=Y)}if(n.l=Math.round(s)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(f)+o.t,n.b=Math.round(c)+o.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(Br.didMarginChange(l,n)||Fle(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var ae=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};Br.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&Br.supplyDefaults(e);var o=n?e._fullData:e.data,l=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Qr.isPlainObject(h)){var p={},g;return Object.keys(h).sort().forEach(function(w){if(["_","["].indexOf(w.charAt(0))===-1){if(typeof h[w]=="function"){d&&(p[w]="_function");return}if(t==="keepdata"){if(w.substr(w.length-3)==="src")return}else if(t==="keepstream"){if(g=h[w+"src"],typeof g=="string"&&g.indexOf(":")>0&&!Qr.isPlainObject(h.stream))return}else if(t!=="keepall"&&(g=h[w+"src"],typeof g=="string"&&g.indexOf(":")>0))return;p[w]=u(h[w],d)}}),p}var m=Array.isArray(h),b=Qr.isTypedArray(h);if((m||b)&&h.dtype&&h.shape){var _=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Qr.isArrayBuffer(_)?ble.encode(_):_},d)}return m?h.map(function(w){return u(w,d)}):b?Qr.simpleMap(h,Qr.identity):Qr.isJSDate(h)?Qr.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(l),n)){var c=l._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};Br.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,o=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return pa.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!a&&d===h&&l(c)}}t.runFn(p),setTimeout(p())})}function l(c){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return pa.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[Br.previousPromises,s,t.prepareFn,Br.rehover,Br.reselect,o],f=Qr.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}Br.doCalcdata=function(e,r){var t=oo.list(e),a=e._fullData,n=e._fullLayout,i,o,l,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},l=0;l=0;s--)if(T[s].enabled){i._indexToPoints=T[s]._indexToPoints;break}o&&o.calc&&(x=o.calc(e,i))}(!Array.isArray(x)||!x[0])&&(x=[{x:CE,y:CE}]),x[0].t||(x[0].t={}),x[0].trace=i,u[_]=x}}for(qE(t,a,n),l=0;l{"use strict";_c.xmlns="http://www.w3.org/2000/xmlns/";_c.svg="http://www.w3.org/2000/svg";_c.xlink="http://www.w3.org/1999/xlink";_c.svgAttrs={xmlns:_c.svg,"xmlns:xlink":_c.xlink}});var ki=R((Nke,GE)=>{"use strict";GE.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 Ci=R(zo=>{"use strict";var wn=ta(),Ws=fr(),Ile=Ws.strTranslate,l4=ju(),Ole=ki().LINE_SPACING,zle=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;zo.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(zle),i=wn.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function l(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var s=Kle(e.node(),a);s&&e.style("pointer-events","all"),zo.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};Hle(n[2],f,function(c,h,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){l(),s();return}var g=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});g.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var m=d.width,b=d.height;p.attr({class:o,height:b,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _=e.node().style.fill||"black",w=p.select("g");w.attr({fill:_,stroke:_});var x=w.node().getBoundingClientRect(),T=x.width,S=x.height;(T>m||S>b)&&(p.style("overflow","hidden"),x=p.node().getBoundingClientRect(),T=x.width,S=x.height);var M=+e.attr("x"),k=+e.attr("y"),D=u||e.node().getBoundingClientRect().height,P=-D/4;if(o[0]==="y")g.attr({transform:"rotate("+[-90,M,k]+")"+Ile(-T/2,P-S/2)});else if(o[0]==="l")k=P-S/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)M=0,k=P;else{var N=e.attr("text-anchor");M=M-T*(N==="middle"?.5:N==="end"?1:0),k=k+P-S/2}p.attr({x:M,y:k}),t&&t.call(e,g),s(g)})})):l(),e};var Ble=/(<|<|<)/g,Ule=/(>|>|>)/g;function Gle(e){return e.replace(Ble,"\\lt ").replace(Ule,"\\gt ")}var HE=[["$","$"],["\\(","\\)"]];function Hle(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){Ws.warn("No MathJax version:",MathJax.version);return}var n,i,o,l,s=function(){return i=Ws.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:HE},displayAlign:"left"})},u=function(){i=Ws.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=HE},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var _="math-output-"+Ws.randstr({},64);l=wn.select("body").append("div").attr({id:_}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(Gle(e));var w=l.node();return a===2?MathJax.Hub.Typeset(w):MathJax.typeset([w])},d=function(){var _=l.select(a===2?".MathJax_SVG":".MathJax"),w=!_.empty()&&l.select("svg").node();if(!w)Ws.log("There was an error in the tex syntax.",e),t();else{var x=w.getBoundingClientRect(),T;a===2?T=wn.select("body").select("#MathJax_SVG_glyphs"):T=_.select("defs"),t(_,T,x)}l.remove()},p=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},g=function(){n!=="svg"&&(MathJax.config.startup.output=n)},m=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(i)},b=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,h,d,p,m):a===3&&(u(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),g(),b()}))}var jE={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"},Vle={sub:"0.3em",sup:"-0.6em"},Yle={sub:"-0.21em",sup:"0.42em"},VE="\u200B",YE=["http:","https:","mailto:","",void 0,":"],XE=zo.NEWLINES=/(\r\n?|\n)/g,u4=/(<[^<>]*>)/,f4=/<(\/?)([^ >]*)(\s+(.*))?>/i,Wle=//i;zo.BR_TAG_ALL=//gi;var ZE=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,JE=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,$E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,jle=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function wc(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&Dg(a)}var Xle=/(^|;)\s*color:/;zo.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,o=e.split(u4),l=[],s="",u=0,f=0;fi?l.push(c.substr(0,g-i)+n):l.push(c.substr(0,g));break}s=""}}return l.join("")};var Zle={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Jle=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Dg(e){return e.replace(Jle,function(r,t){var a;return t.charAt(0)==="#"?a=$le(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=Zle[t],a||r})}zo.convertEntities=Dg;function $le(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function Kle(e,r){r=r.replace(XE," ");var t=!1,a=[],n,i=-1;function o(){i++;var S=document.createElementNS(l4.svg,"tspan");wn.select(S).attr({class:"line",dy:i*Ole+"em"}),e.appendChild(S),n=S;var M=a;if(a=[{node:S}],M.length>1)for(var k=1;k.",r);return}var M=a.pop();S!==M.type&&Ws.log("Start tag <"+M.type+"> doesnt match end tag <"+S+">. Pretending it did match.",r),n=a[a.length-1].node}var f=Wle.test(r);f?o():(n=e,a=[{node:e}]);for(var c=r.split(u4),h=0;h{"use strict";var Qle=ta(),Fg=vl(),p1=ia(),qg=fr(),QE=Qt(),ese=fc().isValid;function rse(e,r,t){var a=r?qg.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if(qg.isArrayOrTypedArray(n)){for(var o=0;o=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function iL(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),o=0;o{"use strict";var lL=D_(),ase=lL.FORMAT_LINK,nse=lL.DATE_FORMAT_LINK;function ise(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?c4:sL)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function c4(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+ase+"."].join(" ")}function sL(e,r){return c4(e,r)+[" And for dates see: "+nse+".","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(" ")}uL.exports={axisHoverFormat:ise,descriptionOnlyNumbers:c4,descriptionWithDates:sL}});var Bo=R((Bke,SL)=>{"use strict";var fL=ci(),_0=Kl(),ML=Iu().dash,h4=hn().extendFlat,cL=Da().templatedArray,vL=m1().descriptionWithDates,ose=_n().ONEDAY,rs=ai(),lse=rs.HOUR_PATTERN,sse=rs.WEEKDAY_PATTERN,v4={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},use=h4({},v4,{values:v4.values.slice().concat(["sync"])});function hL(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var dL={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},pL={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},mL={valType:"data_array",editType:"ticks"},yL={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function gL(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function bL(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var xL={valType:"color",dflt:_0.defaultLine,editType:"ticks"},_L={valType:"color",dflt:_0.lightLine,editType:"ticks"};function wL(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var AL=h4({},ML,{editType:"ticks"}),TL={valType:"boolean",editType:"ticks"};SL.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:_0.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:fL({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[rs.idRegex.x.toString(),rs.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:[rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"calc"},rangebreaks:cL("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:[sse,lse,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:ose},editType:"calc"}),tickmode:use,nticks:hL(),tick0:dL,dtick:pL,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:mL,ticktext:{valType:"data_array",editType:"ticks"},ticks:yL,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:gL(),tickwidth:bL(),tickcolor:xL,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:h4({},ML,{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:fL({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:vL("tick label")},tickformatstops:cL("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:vL("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:_0.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:TL,gridcolor:_L,gridwidth:wL(),griddash:AL,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:_0.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:_0.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},minor:{tickmode:v4,nticks:hL("minor"),tick0:dL,dtick:pL,tickvals:mL,ticks:yL,ticklen:gL("minor"),tickwidth:bL("minor"),tickcolor:xL,gridcolor:_L,gridwidth:wL("minor"),griddash:AL,showgrid:TL,editType:"ticks"},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 Rg=R((Uke,EL)=>{"use strict";var Ha=Bo(),kL=ci(),CL=hn().extendFlat,fse=dl().overrideAll;EL.exports=fse({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:Ha.linecolor,outlinewidth:Ha.linewidth,bordercolor:Ha.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Ha.minor.tickmode,nticks:Ha.nticks,tick0:Ha.tick0,dtick:Ha.dtick,tickvals:Ha.tickvals,ticktext:Ha.ticktext,ticks:CL({},Ha.ticks,{dflt:""}),ticklabeloverflow:CL({},Ha.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:Ha.ticklen,tickwidth:Ha.tickwidth,tickcolor:Ha.tickcolor,ticklabelstep:Ha.ticklabelstep,showticklabels:Ha.showticklabels,labelalias:Ha.labelalias,tickfont:kL({}),tickangle:Ha.tickangle,tickformat:Ha.tickformat,tickformatstops:Ha.tickformatstops,tickprefix:Ha.tickprefix,showtickprefix:Ha.showtickprefix,ticksuffix:Ha.ticksuffix,showticksuffix:Ha.showticksuffix,separatethousands:Ha.separatethousands,exponentformat:Ha.exponentformat,minexponent:Ha.minexponent,showexponent:Ha.showexponent,title:{text:{valType:"string"},font:kL({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Ac=R((Hke,DL)=>{"use strict";var cse=Rg(),vse=a0().counter,hse=cg(),LL=fc().scales,Gke=hse(LL);function Pg(e){return"`"+e+"`"}DL.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",o="showScaleDflt"in t?t.showScaleDflt:a==="z",l=typeof t.colorscaleDflt=="string"?LL[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,c;"colorAttr"in t?(f=t.colorAttr,c=t.colorAttr):(f={z:"z",c:"color"}[a],c="in "+Pg(u+f));var h=n?" Has an effect only if "+c+" is set to a numerical array.":"",d=a+"auto",p=a+"min",g=a+"max",m=a+"mid",b=Pg(u+d),_=Pg(u+p),w=Pg(u+g),x=_+" and "+w,T={};T[p]=T[g]=void 0;var S={};S[d]=!1;var M={};return f==="color"&&(M.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(M.color.anim=!0)),M[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},M[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},M[g]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},M[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},M.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},M.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},M.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(M.showscale={valType:"boolean",dflt:o,editType:"calc"},M.colorbar=cse),t.noColorAxis||(M.coloraxis={valType:"subplotid",regex:vse("coloraxis"),dflt:null,editType:"calc"}),M}});var p4=R((Vke,qL)=>{"use strict";var dse=hn().extendFlat,pse=Ac(),d4=fc().scales;qL.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:d4.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:d4.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:d4.RdBu,editType:"calc"}},coloraxis:dse({_isSubplotObj:!0,editType:"calc"},pse("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var m4=R((Yke,FL)=>{"use strict";var mse=fr();FL.exports=function(r){return mse.isPlainObject(r.colorbar)}});var b4=R(g4=>{"use strict";var y4=ia(),RL=fr(),PL=_n(),yse=PL.ONEDAY,gse=PL.ONEWEEK;g4.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?yse:1;if(!e)return i;if(y4(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var o=e.charAt(0),l=e.substr(1);return l=y4(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||t&&o==="L"||t&&o==="D"&&(l===1||l===2))?i:e};g4.tick0=function(e,r,t,a){if(r==="date")return RL.cleanDate(e,RL.dateTick0(t,a%gse===0?1:0));if(!(a==="D1"||a==="D2"))return y4(e)?Number(e):0}});var x4=R((jke,IL)=>{"use strict";var NL=b4(),bse=fr().isArrayOrTypedArray,xse=ro().isTypedArraySpec,_se=ro().decodeTypedArraySpec;IL.exports=function(r,t,a,n,i){i||(i={});var o=i.isMinor,l=o?r.minor||{}:r,s=o?t.minor:t,u=o?"minor.":"";function f(_){var w=l[_];return xse(w)&&(w=_se(w)),w!==void 0?w:(s._template||{})[_]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=bse(d)?"array":h?"linear":"auto",g=a(u+"tickmode",p);if(g==="auto"||g==="sync")a(u+"nticks");else if(g==="linear"){var m=s.dtick=NL.dtick(h,n);s.tick0=NL.tick0(c,n,t.calendar,m)}else if(n!=="multicategory"){var b=a(u+"tickvals");b===void 0?s.tickmode="auto":o||a("ticktext")}}});var w4=R((Xke,zL)=>{"use strict";var _4=fr(),OL=Bo();zL.exports=function(r,t,a,n){var i=n.isMinor,o=i?r.minor||{}:r,l=i?t.minor:t,s=i?OL.minor:OL,u=i?"minor.":"",f=_4.coerce2(o,l,s,"ticklen",i?(t.ticklen||5)*.6:void 0),c=_4.coerce2(o,l,s,"tickwidth",i?t.tickwidth||1:void 0),h=_4.coerce2(o,l,s,"tickcolor",(i?t.tickcolor:void 0)||l.color),d=a(u+"ticks",!i&&n.outerTicks||f||c||h?"outside":"");d||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var A4=R((Zke,BL)=>{"use strict";BL.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var wo=R((Jke,UL)=>{"use strict";var Ng=fr(),wse=Da();UL.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",o=t[n],l=Ng.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=wse.arrayTemplater(t,n,i),f,c;for(f=0;f{"use strict";var T4=fr(),Ase=Qt().contrast,GL=Bo(),Tse=A4(),Mse=wo();HL.exports=function(r,t,a,n,i){i||(i={});var o=a("labelalias");T4.isPlainObject(o)||delete t.labelalias;var l=Tse(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,c=t.ticklabelposition||"",h=c.indexOf("inside")!==-1?Ase(i.bgColor):f&&f!==GL.color.dflt?f:u.color;if(T4.coerceFont(a,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var p=a("tickformat");Mse(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Sse}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!p&&n!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function Sse(e,r){function t(n,i){return T4.coerce(e,r,GL.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var S4=R((Kke,VL)=>{"use strict";var kse=A4();VL.exports=function(r,t,a,n,i){i||(i={});var o=i.tickSuffixDflt,l=kse(r),s=a("tickprefix");s&&a("showtickprefix",l);var u=a("ticksuffix",o);u&&a("showticksuffix",l)}});var k4=R((Qke,YL)=>{"use strict";var Xu=fr(),Cse=Da(),Ese=x4(),Lse=w4(),Dse=M4(),qse=S4(),Fse=Rg();YL.exports=function(r,t,a){var n=Cse.newContainer(t,"colorbar"),i=r.colorbar||{};function o(N,q){return Xu.coerce(i,n,Fse,N,q)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,u=a.height-l.t-l.b,f=o("orientation"),c=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(c?s:u):30);var d=o("lenmode");o("len",d==="fraction"?1:c?u:s);var p=o("yref"),g=o("xref"),m=p==="paper",b=g==="paper",_,w,x,T="left";c?(x="middle",T=b?"left":"right",_=b?1.02:1,w=.5):(x=m?"bottom":"top",T="center",_=.5,w=m?1.02:1),Xu.coerce(i,n,{x:{valType:"number",min:b?-2:0,max:b?3:1,dflt:_}},"x"),Xu.coerce(i,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:w}},"y"),o("xanchor",T),o("xpad"),o("yanchor",x),o("ypad"),Xu.noneOrAll(i,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var S=Xu.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",S.indexOf("inside")!==-1?"hide past domain":"hide past div"),Ese(i,n,o,"linear");var M=a.font,k={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};S.indexOf("inside")!==-1&&(k.bgColor="black"),qse(i,n,o,"linear",k),Dse(i,n,o,"linear",k),Lse(i,n,o,"linear",k),o("title.text",a._dfltTitle.colorbar);var D=n.showticklabels?n.tickfont:M,P=Xu.extendFlat({},M,{family:D.family,size:Xu.bigFont(D.size)});Xu.coerceFont(o,"title.font",P),o("title.side",c?"top":"right")}});var w0=R((eCe,XL)=>{"use strict";var WL=ia(),E4=fr(),Rse=m4(),Pse=k4(),jL=fc().isValid,Nse=Ct().traceIs;function C4(e,r){var t=r.slice(0,r.length-1);return r?E4.nestedProperty(e,t).get()||{}:e}XL.exports=function e(r,t,a,n,i){var o=i.prefix,l=i.cLetter,s="_module"in t,u=C4(r,o),f=C4(t,o),c=C4(t._template||{},o)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},p=n(o+"coloraxis");if(p){var g=Nse(t,"contour")&&E4.nestedProperty(t,"contours.coloring").get()||"heatmap",m=d[p];m?(m[2].push(h),m[0]!==g&&(m[0]=!1,E4.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[g,t,[h]];return}}var b=u[l+"min"],_=u[l+"max"],w=WL(b)&&WL(_)&&b<_,x=n(o+l+"auto",!w);x?n(o+l+"mid"):(n(o+l+"min"),n(o+l+"max"));var T=u.colorscale,S=c.colorscale,M;if(T!==void 0&&(M=!jL(T)),S!==void 0&&(M=!jL(S)),n(o+"autocolorscale",M),n(o+"colorscale"),n(o+"reversescale"),o!=="marker.line."){var k;o&&s&&(k=Rse(u));var D=n(o+"showscale",k);D&&(o&&c&&(f._template=c),Pse(u,f,a))}}});var KL=R((rCe,$L)=>{"use strict";var ZL=fr(),Ise=Da(),JL=p4(),Ose=w0();$L.exports=function(r,t){function a(c,h){return ZL.coerce(r,t,JL,c,h)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,o;function l(c,h){return ZL.coerce(i,o,JL.coloraxis,c,h)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},o=Ise.newContainer(t,s,"coloraxis"),o._name=s,Ose(i,o,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var zse=fr(),Bse=gl().hasColorscale,Use=gl().extractOpts;QL.exports=function(r,t){function a(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function n(f,c){var h=c.container?zse.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=Use(h),p=d.auto;(p||d.min===void 0)&&a(h,c.min),(p||d.max===void 0)&&a(h,c.max),d.autocolorscale&&a(h,"colorscale")}}for(var i=0;i{"use strict";var rD=ia(),L4=fr(),Gse=gl().extractOpts;tD.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,o=a.containerStr,l=o?L4.nestedProperty(t,o).get():t,s=Gse(l),u=s.auto!==!1,f=s.min,c=s.max,h=s.mid,d=function(){return L4.aggNums(Math.min,null,i)},p=function(){return L4.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(l._colorAx&&rD(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():u&&(l._colorAx&&rD(c)?c=Math.max(c,p()):c=p()),u&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h=0?g=n.colorscale.sequential:g=n.colorscale.sequentialminus,s._sync("colorscale",g)}}});var T0=R((nCe,aD)=>{"use strict";var Ig=fc(),A0=gl();aD.exports={moduleType:"component",name:"colorscale",attributes:Ac(),layoutAttributes:p4(),supplyLayoutDefaults:KL(),handleDefaults:w0(),crossTraceDefaults:eD(),calc:D4(),scales:Ig.scales,defaultScale:Ig.defaultScale,getScale:Ig.get,isValidScale:Ig.isValid,hasColorscale:A0.hasColorscale,extractOpts:A0.extractOpts,extractScale:A0.extractScale,flipScale:A0.flipScale,makeColorScaleFunc:A0.makeColorScaleFunc,makeColorScaleFuncFromTrace:A0.makeColorScaleFuncFromTrace}});var ni=R((iCe,iD)=>{"use strict";var nD=fr(),Hse=ro().isTypedArraySpec;iD.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 r=e.marker;return nD.isPlainObject(r)&&(nD.isArrayOrTypedArray(r.size)||Hse(r.size))}}});var q4=R((oCe,oD)=>{"use strict";var Vse=ia();oD.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/n)}:function(l){return l/n};return function(l){var s=o(l/t);return Vse(s)&&s>0?Math.max(s,i):0}}});var js=R(bi=>{"use strict";var lD=fr();bi.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};bi.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{fD.exports=Zse;var F4={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Xse=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Zse(e){var r=[];return e.replace(Xse,function(t,a,n){var i=a.toLowerCase();for(n=$se(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==F4[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var Kse=y1(),kr=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},Nt="M0,0Z",cD=Math.sqrt(2),Zu=Math.sqrt(3),R4=Math.PI,P4=Math.cos,N4=Math.sin;mD.exports={circle:{n:0,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Ot(r,t,n):n}},square:{n:1,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.3,2);return Ot(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.4,2),n=kr(e*1.2,2);return Ot(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.8/cD,2),n="l"+a+","+a,i="l"+a+",-"+a,o="l-"+a+",-"+a,l="l-"+a+","+a;return Ot(r,t,"M0,"+a+n+i+o+i+o+l+o+l+n+l+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.951,2),n=kr(e*.588,2),i=kr(-e,2),o=kr(e*-.309,2),l=kr(e*.809,2);return Ot(r,t,"M"+a+","+o+"L"+n+","+l+"H-"+n+"L-"+a+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e/2,2),i=kr(e*Zu/2,2);return Ot(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e/2,2),i=kr(e*Zu/2,2);return Ot(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.924,2),n=kr(e*.383,2);return Ot(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(It(r))return Nt;var a=e*1.4,n=kr(a*.225,2),i=kr(a*.951,2),o=kr(a*.363,2),l=kr(a*.588,2),s=kr(-a,2),u=kr(a*-.309,2),f=kr(a*.118,2),c=kr(a*.809,2),h=kr(a*.382,2);return Ot(r,t,"M"+n+","+u+"H"+i+"L"+o+","+f+"L"+l+","+c+"L0,"+h+"L-"+l+","+c+"L-"+o+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.66,2),n=kr(e*.38,2),i=kr(e*.76,2);return Ot(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*Zu*.8,2),n=kr(e*.8,2),i=kr(e*1.6,2),o=kr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Ot(r,t,"M-"+a+","+n+l+a+","+n+l+"0,-"+i+l+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*Zu*.8,2),n=kr(e*.8,2),i=kr(e*1.6,2),o=kr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Ot(r,t,"M"+a+",-"+n+l+"-"+a+",-"+n+l+"0,"+i+l+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.1,2),n=kr(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Ot(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2),n=kr(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Ot(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.7,2),n=kr(e*1.4,2);return Ot(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2),n=kr(e*.7,2);return Ot(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e/cD,2);return Ot(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.3,2);return Ot(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.3,2),n=kr(e*.65,2);return Ot(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*.85,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(It(r))return Nt;var a=kr(e/2,2),n=kr(e,2);return Ot(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2);return Ot(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2);return Ot(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(It(r))return Nt;var a=R4/2.5,n=2*e*P4(a),i=2*e*N4(a);return Ot(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(It(r))return Nt;var a=R4/4,n=2*e*P4(a),i=2*e*N4(a);return Ot(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function It(e){return e===null}var vD,hD,dD,pD;function Ot(e,r,t){if((!e||e%360===0)&&!r)return t;if(dD===e&&pD===r&&vD===t)return hD;dD=e,pD=r,vD=t;function a(m,b){var _=P4(m),w=N4(m),x=b[0],T=b[1]+(r||0);return[x*_-T*w,x*w+T*_]}for(var n=e/180*R4,i=0,o=0,l=Kse(t),s="",u=0;u{"use strict";var Xn=ta(),ka=fr(),Qse=ka.numberFormat,kc=ia(),G4=vl(),zg=Ct(),vi=Qt(),eue=T0(),b1=ka.strTranslate,Bg=Ci(),rue=ju(),tue=ki(),aue=tue.LINE_SPACING,kD=t0().DESELECTDIM,nue=ni(),iue=q4(),oue=js().appendArrayPointValue,Rr=ID.exports={};Rr.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,o=r.size,l=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(vi.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",I4(sue(f))),s&&e.style("text-shadow",s==="auto"?Bg.makeTextShadow(vi.contrast(i)):I4(s)),u&&e.style("text-decoration-line",I4(uue(u)))};function I4(e){return e==="none"?void 0:e}var lue={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function sue(e){return lue[e]}function uue(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Rr.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Rr.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Rr.setRect=function(e,r,t,a,n){e.call(Rr.setPosition,r,t).call(Rr.setSize,a,n)};Rr.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(kc(n)&&kc(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",b1(n,i));else return!1;return!0};Rr.translatePoints=function(e,r,t){e.each(function(a){var n=Xn.select(this);Rr.translatePoint(a,n,r,t)})};Rr.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Rr.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,o=i.xcalendar,l=i.ycalendar,s=zg.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Rr.hideOutsideRangePoint(u,Xn.select(this),t,a,o,l)})})}};Rr.crispRound=function(e,r,t){return!r||!kc(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Rr.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=n||i.dash||"";vi.stroke(r,a||i.color),Rr.dashLine(r,l,o)};Rr.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";Xn.select(this).call(vi.stroke,t||i.color).call(Rr.dashLine,l,o)})};Rr.dashLine=function(e,r,t){t=+t||0,r=Rr.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Rr.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function CD(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,o=n&&Rr.getPatternAttr(n.shape,0,"");if(o){var l=Rr.getPatternAttr(n.bgcolor,0,null),s=Rr.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Rr.getPatternAttr(n.size,0,8),c=Rr.getPatternAttr(n.solidity,0,.3),h=r.uid;Rr.pattern(e,"point",t,h,o,f,c,void 0,n.fillmode,l,s,u)}else if(i&&i.type!=="none"){var d=i.type,p="scatterfill-"+r.uid;if(a&&(p="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var g,m;d==="horizontal"?(g={x:i.start,y:0},m={x:i.stop,y:0}):d==="vertical"&&(g={x:0,y:i.start},m={x:0,y:i.stop}),g.x=r._xA.c2p(g.x===void 0?r._extremes.x.min[0].val:g.x,!0),g.y=r._yA.c2p(g.y===void 0?r._extremes.y.min[0].val:g.y,!0),m.x=r._xA.c2p(m.x===void 0?r._extremes.x.max[0].val:m.x,!0),m.y=r._yA.c2p(m.y===void 0?r._extremes.y.max[0].val:m.y,!0),e.call(DD,t,p,"linear",i.colorscale,"fill",g,m,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Rr.gradient,t,p,d,i.colorscale,"fill")}else r.fillcolor&&e.call(vi.fill,r.fillcolor)}Rr.singleFillStyle=function(e,r){var t=Xn.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};CD(e,n,r,!1)};Rr.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=Xn.select(this);a[0].trace&&CD(n,a[0].trace,r,t)})};var gD=yD();Rr.symbolNames=[];Rr.symbolFuncs=[];Rr.symbolBackOffs=[];Rr.symbolNeedLines={};Rr.symbolNoDot={};Rr.symbolNoFill={};Rr.symbolList=[];Object.keys(gD).forEach(function(e){var r=gD[e],t=r.n;Rr.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Rr.symbolNames[t]=e,Rr.symbolFuncs[t]=r.f,Rr.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Rr.symbolNeedLines[t]=!0),r.noDot?Rr.symbolNoDot[t]=!0:Rr.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Rr.symbolNoFill[t]=!0)});var fue=Rr.symbolNames.length,cue="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Rr.symbolNumber=function(e){if(kc(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Rr.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=fue||e>=400?0:Math.floor(Math.max(e,0))};function ED(e,r,t,a){var n=e%100;return Rr.symbolFuncs[n](r,t,a)+(e>=200?cue:"")}var bD=Qse("~f"),LD={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}};Rr.gradient=function(e,r,t,a,n,i){var o=LD[a];return DD(e,r,t,o.type,n,i,o.start,o.stop,!1,o.reversed)};function DD(e,r,t,a,n,i,o,l,s,u){var f=n.length,c;a==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(c={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||o.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Rr.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var f=Y4(e,t),c=V4(e,t);r.attr("d",ED(u,s,f,c))}var h=!1,d,p,g;if(e.so)g=l.outlierwidth,p=l.outliercolor,d=o.outliercolor;else{var m=(l||{}).width;g=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=a.lineScale(e.mlc):ka.isArrayOrTypedArray(l.color)?p=vi.defaultLine:p=l.color,ka.isArrayOrTypedArray(o.color)&&(d=vi.defaultLine,h=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(vi.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:g)+"px");var b=o.gradient,_=e.mgt;_?h=!0:_=b&&b.type,ka.isArrayOrTypedArray(_)&&(_=_[0],LD[_]||(_=0));var w=o.pattern,x=w&&Rr.getPatternAttr(w.shape,e.i,"");if(_&&_!=="none"){var T=e.mgc;T?h=!0:T=b.color;var S=t.uid;h&&(S+="-"+e.i),Rr.gradient(r,n,S,_,[[0,T],[1,d]],"fill")}else if(x){var M=!1,k=w.fgcolor;!k&&i&&i.color&&(k=i.color,M=!0);var D=Rr.getPatternAttr(k,e.i,i&&i.color||null),P=Rr.getPatternAttr(w.bgcolor,e.i,null),N=w.fgopacity,q=Rr.getPatternAttr(w.size,e.i,8),O=Rr.getPatternAttr(w.solidity,e.i,.3);M=M||e.mcc||ka.isArrayOrTypedArray(w.shape)||ka.isArrayOrTypedArray(w.bgcolor)||ka.isArrayOrTypedArray(w.fgcolor)||ka.isArrayOrTypedArray(w.size)||ka.isArrayOrTypedArray(w.solidity);var U=t.uid;M&&(U+="-"+e.i),Rr.pattern(r,"point",n,U,x,q,O,e.mcc,w.fillmode,P,D,N)}else ka.isArrayOrTypedArray(d)?vi.fill(r,d[e.i]):vi.fill(r,d);g&&vi.stroke(r,p)}};Rr.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Rr.tryColorscale(t,""),r.lineScale=Rr.tryColorscale(t,"line"),zg.traceIs(e,"symbols")&&(r.ms2mrc=nue.isBubble(e)?iue(e):function(){return(t.size||6)/2}),e.selectedpoints&&ka.extendFlat(r,Rr.makeSelectedPointStyleFns(e)),r};Rr.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},o=a.marker||{},l=n.opacity,s=i.opacity,u=o.opacity,f=s!==void 0,c=u!==void 0;(ka.isArrayOrTypedArray(l)||f||c)&&(r.selectedOpacityFn=function(x){var T=x.mo===void 0?n.opacity:x.mo;return x.selected?f?s:T:c?u:kD*T});var h=n.color,d=i.color,p=o.color;(d||p)&&(r.selectedColorFn=function(x){var T=x.mcc||h;return x.selected?d||T:p||T});var g=n.size,m=i.size,b=o.size,_=m!==void 0,w=b!==void 0;return zg.traceIs(e,"symbols")&&(_||w)&&(r.selectedSizeFn=function(x){var T=x.mrc||g/2;return x.selected?_?m/2:T:w?b/2:T}),r};Rr.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},o=a.textfont||{},l=n.color,s=i.color,u=o.color;return r.selectedTextColorFn=function(f){var c=f.tc||l;return f.selected?s||c:u||(s?c:vi.addOpacity(c,kD))},r};Rr.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Rr.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,o){i.style("opacity",t.selectedOpacityFn(o))}),t.selectedColorFn&&n.push(function(i,o){vi.fill(i,t.selectedColorFn(o))}),t.selectedSizeFn&&n.push(function(i,o){var l=o.mx||a.symbol||0,s=t.selectedSizeFn(o);i.attr("d",ED(Rr.symbolNumber(l),s,Y4(o,r),V4(o,r))),o.mrc2=s}),n.length&&e.each(function(i){for(var o=Xn.select(this),l=0;l0?t:0}Rr.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Rr.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,o=t._fullLayout;e.each(function(l){var s=Xn.select(this),u=i?ka.extractOption(l,r,"txt","texttemplate"):ka.extractOption(l,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,c=f?f(l,r,o):{},h={};oue(h,r,l.i);var d=r._meta||{};u=ka.texttemplateString(u,c,o._d3locale,h,l,d)}var p=l.tp||r.textposition,g=FD(l,r),m=a?a(l):l.tc||r.textfont.color;s.call(Rr.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:g,color:m}).text(u).call(Bg.convertToTspans,t).call(qD,p,g,l.mrc)})}};Rr.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Rr.makeSelectedTextStyleFns(r);e.each(function(a){var n=Xn.select(this),i=t.selectedTextColorFn(a),o=a.tp||r.textposition,l=FD(a,r);vi.fill(n,i);var s=zg.traceIs(r,"bar-like");qD(n,o,l,a.mrc2||a.mrc,s)})}};var xD=.5;Rr.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||x>=f&&x<=s)&&(T<=c&&T>=u||T>=c&&T<=u)&&(e=[x,T])}return e}Rr.applyBackoff=ND;Rr.makeTester=function(){var e=ka.ensureSingleById(Xn.select("body"),"svg","js-plotly-tester",function(t){t.attr(rue.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=ka.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Rr.tester=e,Rr.testref=r};Rr.savedBBoxes={};var z4=0,due=1e4;Rr.bBox=function(e,r,t){t||(t=_D(e));var a;if(t){if(a=Rr.savedBBoxes[t],a)return ka.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=_D(n),t){var i=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,l=n.getAttribute("transform");if(!l){var s=Rr.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),o&&(s.top+=o,s.bottom+=o),s}if(t+="~"+i+"~"+o+"~"+l,a=Rr.savedBBoxes[t],a)return ka.extendFlat({},a)}}var u,f;r?u=e:(f=Rr.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),Xn.select(u).attr("transform",null).call(Bg.positionText,0,0);var c=u.getBoundingClientRect(),h=Rr.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return z4>=due&&(Rr.savedBBoxes={},z4=0),t&&(Rr.savedBBoxes[t]=d),z4++,ka.extendFlat({},d)};function _D(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Rr.setClipUrl=function(e,r,t){e.attr("clip-path",H4(r,t))};function H4(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Rr.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Rr.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||0,t=t||0,o=o.replace(a,"").trim(),o+=b1(r,t),o=o.trim(),e[i]("transform",o),o};Rr.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Rr.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||1,t=t||1,o=o.replace(a,"").trim(),o+="scale("+r+","+t+")",o=o.trim(),e[i]("transform",o),o};var pue=/\s*sc.*/;Rr.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(pue,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var mue=/translate\([^)]*\)\s*$/;Rr.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=Xn.select(this),i=n.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(mue);r===1&&t===1?a=[]:a=[b1(o,l),"scale("+r+","+t+")",b1(-o,-l)],s&&a.push(s),n.attr("transform",a.join(""))}})};function V4(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Rr.getMarkerStandoff=V4;var g1=Math.atan2,Tc=Math.cos,S0=Math.sin;function wD(e,r){var t=r[0],a=r[1];return[t*Tc(e)-a*S0(e),t*S0(e)+a*Tc(e)]}var AD,TD,MD,SD,B4,U4;function Y4(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||ka.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var o=r._geo.project(e.lonlat);a=o[0],n=o[1]}else{var l=r._xA,s=r._yA;if(l&&s)a=l.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],c=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=g1(h[1]-n,h[0]-a),p=g1(c[1]-n,c[0]-a),g;if(i==="north")g=t/180*Math.PI;else if(i==="previous"){var m=u/180*Math.PI,b=f/180*Math.PI,_=AD/180*Math.PI,w=TD/180*Math.PI,x=_-m,T=Tc(w)*S0(x),S=S0(w)*Tc(b)-Tc(w)*S0(b)*Tc(x);g=-g1(T,S)-Math.PI,AD=u,TD=f}var M=wD(d,[Tc(g),0]),k=wD(p,[S0(g),0]);t=g1(M[1]+k[1],M[0]+k[0])/Math.PI*180,i==="previous"&&!(U4===r.uid&&e.i===B4+1)&&(t=null)}if(i==="previous"&&!r._geo)if(U4===r.uid&&e.i===B4+1&&kc(a)&&kc(n)){var D=a-MD,P=n-SD,N=r.line&&r.line.shape||"",q=N.slice(N.length-1);q==="h"&&(P=0),q==="v"&&(D=0),t+=g1(P,D)/Math.PI*180+90}else t=null}return MD=a,SD=n,B4=e.i,U4=r.uid,t}Rr.getMarkerAngle=Y4});var x1=R((cCe,UD)=>{"use strict";var k0=ta(),yue=ia(),gue=jn(),W4=Ct(),Cc=fr(),OD=Cc.strTranslate,Ug=Ca(),Gg=Qt(),C0=Ci(),zD=t0(),bue=ki().OPPOSITE_SIDE,BD=/ [XY][0-9]* /,j4=1.6,X4=1.6;function xue(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,o=t.placeholder,l=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,c=t.containerGroup,h=1,d=n.title,p=(d&&d.text?d.text:"").trim(),g=!1,m=d&&d.font?d.font:{},b=m.family,_=m.size,w=m.color,x=m.weight,T=m.style,S=m.variant,M=m.textcase,k=m.lineposition,D=m.shadow,P=t.subtitlePropName,N=!!P,q=t.subtitlePlaceholder,O=(n.title||{}).subtitle||{text:"",font:{}},U=O.text.trim(),$=!1,j=1,H=O.font,z=H.family,V=H.size,X=H.color,K=H.weight,ve=H.style,xe=H.variant,se=H.textcase,be=H.lineposition,re=H.shadow,ke;i==="title.text"?ke="titleText":i.indexOf("axis")!==-1?ke="axisTitleText":i.indexOf("colorbar"!==-1)&&(ke="colorbarTitleText");var ge=e._context.edits[ke];function Ee(yr,ir){return yr===void 0||ir===void 0?!1:yr.replace(BD," % ")===ir.replace(BD," % ")}p===""?h=0:Ee(p,o)&&(ge||(p=""),h=.2,g=!0),N&&(U===""?j=0:Ee(U,q)&&(ge||(U=""),j=.2,$=!0)),t._meta?p=Cc.templateString(p,t._meta):a._meta&&(p=Cc.templateString(p,a._meta));var De=p||U||ge,Ce;c||(c=Cc.ensureSingle(a._infolayer,"g","g-"+r),Ce=a._hColorbarMoveTitle);var Y=c.selectAll("text."+r).data(De?[0]:[]);Y.enter().append("text"),Y.text(p).attr("class",r),Y.exit().remove();var ae=null,Z=r+"-subtitle",Te=U||ge;if(N&&Te&&(ae=c.selectAll("text."+Z).data(Te?[0]:[]),ae.enter().append("text"),ae.text(U).attr("class",Z),ae.exit().remove()),!De)return c;function Pe(yr,ir){Cc.syncOrAsync([Ne,lr],{title:yr,subtitle:ir})}function Ne(yr){var ir=yr.title,Xe=yr.subtitle,Lr;!f&&Ce&&(f={}),f?(Lr="",f.rotate&&(Lr+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||Ce)&&(Lr+=OD(0,(f.offset||0)-(Ce||0)))):Lr=null,ir.attr("transform",Lr);function Ar(Ye){if(Ye){var Ve=k0.select(Ye.node().parentNode).select("."+Z);if(!Ve.empty()){var pr=Ye.node().getBBox();if(pr.height){var Tr=pr.y+pr.height+j4*V;Ve.attr("y",Tr)}}}}if(ir.style("opacity",h*Gg.opacity(w)).call(Ug.font,{color:Gg.rgb(w),size:k0.round(_,2),family:b,weight:x,style:T,variant:S,textcase:M,shadow:D,lineposition:k}).attr(u).call(C0.convertToTspans,e,Ar),Xe){var de=c.select("."+r+"-math-group"),Oe=ir.node().getBBox(),Ue=de.node()?de.node().getBBox():void 0,rt=Ue?Ue.y+Ue.height+j4*V:Oe.y+Oe.height+X4*V,Ur=Cc.extendFlat({},u,{y:rt});Xe.attr("transform",Lr),Xe.style("opacity",j*Gg.opacity(X)).call(Ug.font,{color:Gg.rgb(X),size:k0.round(V,2),family:z,weight:K,style:ve,variant:xe,textcase:se,shadow:re,lineposition:be}).attr(Ur).call(C0.convertToTspans,e)}return gue.previousPromises(e)}function lr(yr){var ir=yr.title,Xe=k0.select(ir.node().parentNode);if(s&&s.selection&&s.side&&p){Xe.attr("transform",null);var Lr=bue[s.side],Ar=s.side==="left"||s.side==="top"?-1:1,de=yue(s.pad)?s.pad:2,Oe=Ug.bBox(Xe.node()),Ue={t:0,b:0,l:0,r:0},rt=e._fullLayout._reservedMargin;for(var Ur in rt)for(var Ye in rt[Ur]){var Ve=rt[Ur][Ye];Ue[Ye]=Math.max(Ue[Ye],Ve)}var pr={left:Ue.l,top:Ue.t,right:a.width-Ue.r,bottom:a.height-Ue.b},Tr=s.maxShift||Ar*(pr[s.side]-Oe[s.side]),mr=0;if(Tr<0)mr=Tr;else{var vr=s.offsetLeft||0,Cr=s.offsetTop||0;Oe.left-=vr,Oe.right-=vr,Oe.top-=Cr,Oe.bottom-=Cr,s.selection.each(function(){var Gr=Ug.bBox(this);Cc.bBoxIntersect(Oe,Gr,de)&&(mr=Math.max(mr,Ar*(Gr[s.side]-Oe[Lr])+de))}),mr=Math.min(Tr,mr),n._titleScoot=Math.abs(mr)}if(mr>0||Tr<0){var Ir={left:[-mr,0],right:[mr,0],top:[0,-mr],bottom:[0,mr]}[s.side];Xe.attr("transform",OD(Ir[0],Ir[1]))}}}Y.call(Pe,ae);function Ke(yr,ir){yr.text(ir).on("mouseover.opacity",function(){k0.select(this).transition().duration(zD.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k0.select(this).transition().duration(zD.HIDE_PLACEHOLDER).style("opacity",0)})}if(ge&&(p?Y.on(".opacity",null):(Ke(Y,o),g=!0),Y.call(C0.makeEditable,{gd:e}).on("edit",function(yr){l!==void 0?W4.call("_guiRestyle",e,i,yr,l):W4.call("_guiRelayout",e,i,yr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Pe)}).on("input",function(yr){this.text(yr||" ").call(C0.positionText,u.x,u.y)}),N)){if(N&&!p){var Je=Y.node().getBBox(),or=Je.y+Je.height+X4*V;ae.attr("y",or)}U?ae.on(".opacity",null):(Ke(ae,q),$=!0),ae.call(C0.makeEditable,{gd:e}).on("edit",function(yr){W4.call("_guiRelayout",e,"title.subtitle.text",yr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Pe)}).on("input",function(yr){this.text(yr||" ").call(C0.positionText,ae.attr("x"),ae.attr("y"))})}return Y.classed("js-placeholder",g),ae&&ae.classed("js-placeholder",$),c}UD.exports={draw:xue,SUBTITLE_PADDING_EM:X4,SUBTITLE_PADDING_MATHJAX_EM:j4}});var Jg=R((vCe,WD)=>{"use strict";var _ue=ta(),wue=Kv().utcFormat,qa=fr(),Aue=qa.numberFormat,ts=ia(),Ju=qa.cleanNumber,Tue=qa.ms2DateTime,GD=qa.dateTime2ms,as=qa.ensureNumber,HD=qa.isArrayOrTypedArray,$u=_n(),Hg=$u.FP_SAFE,bl=$u.BADNUM,Mue=$u.LOG_CLIP,Sue=$u.ONEWEEK,Vg=$u.ONEDAY,Yg=$u.ONEHOUR,VD=$u.ONEMIN,YD=$u.ONESEC,Wg=an(),Zg=ai(),jg=Zg.HOUR_PATTERN,Xg=Zg.WEEKDAY_PATTERN;function _1(e){return Math.pow(10,e)}function Z4(e){return e!=null}WD.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(x,T){if(x>0)return Math.log(x)/Math.LN10;if(x<=0&&T&&r.range&&r.range.length===2){var S=r.range[0],M=r.range[1];return .5*(S+M-2*Mue*Math.abs(S-M))}else return bl}function o(x,T,S,M){if((M||{}).msUTC&&ts(x))return+x;var k=GD(x,S||r.calendar);if(k===bl)if(ts(x)){x=+x;var D=Math.floor(qa.mod(x+.05,1)*10),P=Math.round(x-D/10);k=GD(new Date(P))+D/10}else return bl;return k}function l(x,T,S){return Tue(x,T,S||r.calendar)}function s(x){return r._categories[Math.round(x)]}function u(x){if(Z4(x)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[x]!==void 0)return r._categoriesMap[x];r._categories.push(typeof x=="number"?String(x):x);var T=r._categories.length-1;return r._categoriesMap[x]=T,T}return bl}function f(x,T){for(var S=new Array(T),M=0;Mr.range[1]&&(S=!S);for(var M=S?-1:1,k=M*x,D=0,P=0;Pq)D=P+1;else{D=k<(N+q)/2?P:P+1;break}}var O=r._B[D]||0;return isFinite(O)?p(x,r._m2,O):0},b=function(x){var T=r._rangebreaks.length;if(!T)return g(x,r._m,r._b);for(var S=0,M=0;Mr._rangebreaks[M].pmax&&(S=M+1);return g(x,r._m2,r._B[S])}}r.c2l=r.type==="log"?i:as,r.l2c=r.type==="log"?_1:as,r.l2p=m,r.p2l=b,r.c2p=r.type==="log"?function(x,T){return m(i(x,T))}:m,r.p2c=r.type==="log"?function(x){return _1(b(x))}:b,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Ju,r.c2d=r.c2r=r.l2d=r.l2r=as,r.d2p=r.r2p=function(x){return r.l2p(Ju(x))},r.p2d=r.p2r=b,r.cleanPos=as):r.type==="log"?(r.d2r=r.d2l=function(x,T){return i(Ju(x),T)},r.r2d=r.r2c=function(x){return _1(Ju(x))},r.d2c=r.r2l=Ju,r.c2d=r.l2r=as,r.c2r=i,r.l2d=_1,r.d2p=function(x,T){return r.l2p(r.d2r(x,T))},r.p2d=function(x){return _1(b(x))},r.r2p=function(x){return r.l2p(Ju(x))},r.p2r=b,r.cleanPos=as):r.type==="date"?(r.d2r=r.r2d=qa.identity,r.d2c=r.r2c=r.d2l=r.r2l=o,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(x,T,S){return r.l2p(o(x,0,S))},r.p2d=r.p2r=function(x,T,S){return l(b(x),T,S)},r.cleanPos=function(x){return qa.cleanDate(x,bl,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(x){var T=d(x);return T!==void 0?T:r.fraction2r(.5)},r.l2r=r.c2r=as,r.r2l=d,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(b(x))},r.r2p=r.d2p,r.p2r=b,r.cleanPos=function(x){return typeof x=="string"&&x!==""?x:as(x)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(x){var T=h(x);return T!==void 0?T:r.fraction2r(.5)},r.r2c_just_indices=c,r.l2r=r.c2r=as,r.r2l=h,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return s(b(x))},r.r2p=r.d2p,r.p2r=b,r.cleanPos=function(x){return Array.isArray(x)||typeof x=="string"&&x!==""?x:as(x)},r.setupMultiCategory=function(x){var T=r._traceIndices,S,M,k=r._matchGroup;if(k&&r._categories.length===0){for(var D in k)if(D!==a){var P=t[Wg.id2name(D)];T=T.concat(P._traceIndices)}}var N=[[0,{}],[0,{}]],q=[];for(S=0;SP[1]&&(M[D?0:1]=S),M[0]===M[1]){var N=r.l2r(T),q=r.l2r(S);if(T!==void 0){var O=N+1;S!==void 0&&(O=Math.min(O,q)),M[D?1:0]=O}if(S!==void 0){var U=q+1;T!==void 0&&(U=Math.max(U,N)),M[D?0:1]=U}}}},r.cleanRange=function(x,T){r._cleanRange(x,T),r.limitRange(x)},r._cleanRange=function(x,T){T||(T={}),x||(x="range");var S=qa.nestedProperty(r,x).get(),M,k;if(r.type==="date"?k=qa.dfltRange(r.calendar):n==="y"?k=Zg.DFLTRANGEY:r._name==="realaxis"?k=[0,1]:k=T.dfltRange||Zg.DFLTRANGEX,k=k.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(k[0]=0),!S||S.length!==2){qa.nestedProperty(r,x).set(k);return}var D=S[0]===null,P=S[1]===null;for(r.type==="date"&&!r.autorange&&(S[0]=qa.cleanDate(S[0],bl,r.calendar),S[1]=qa.cleanDate(S[1],bl,r.calendar)),M=0;M<2;M++)if(r.type==="date"){if(!qa.isDateTime(S[M],r.calendar)){r[x]=k;break}if(r.r2l(S[0])===r.r2l(S[1])){var N=qa.constrain(r.r2l(S[0]),qa.MIN_MS+1e3,qa.MAX_MS-1e3);S[0]=r.l2r(N-1e3),S[1]=r.l2r(N+1e3);break}}else{if(!ts(S[M]))if(!(D||P)&&ts(S[1-M]))S[M]=S[1-M]*(M?10:.1);else{r[x]=k;break}if(S[M]<-Hg?S[M]=-Hg:S[M]>Hg&&(S[M]=Hg),S[0]===S[1]){var q=Math.max(1,Math.abs(S[0]*1e-6));S[0]-=q,S[1]+=q}}},r.setScale=function(x){var T=t._size;if(r.overlaying){var S=Wg.getFromId({_fullLayout:t},r.overlaying);r.domain=S.domain}var M=x&&r._r?"_r":"range",k=r.calendar;r.cleanRange(M);var D=r.r2l(r[M][0],k),P=r.r2l(r[M][1],k),N=n==="y";if(N?(r._offset=T.t+(1-r.domain[1])*T.h,r._length=T.h*(r.domain[1]-r.domain[0]),r._m=r._length/(D-P),r._b=-r._m*P):(r._offset=T.l+r.domain[0]*T.w,r._length=T.w*(r.domain[1]-r.domain[0]),r._m=r._length/(P-D),r._b=-r._m*D),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var q,O;if(r._rangebreaks=r.locateBreaks(Math.min(D,P),Math.max(D,P)),r._rangebreaks.length){for(q=0;qP&&(U=!U),U&&r._rangebreaks.reverse();var $=U?-1:1;for(r._m2=$*r._length/(Math.abs(P-D)-r._lBreaks),r._B.push(-r._m2*(N?P:D)),q=0;qk&&(k+=7,Dk&&(k+=24,D=M&&D=M&&x=re.min&&(vere.max&&(re.max=xe),se=!1)}se&&P.push({min:ve,max:xe})}};for(S=0;S{"use strict";var jD=ia(),J4=fr(),kue=_n().BADNUM,$g=J4.isArrayOrTypedArray,Cue=J4.isDateTime,Eue=J4.cleanNumber,XD=Math.round;JD.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if($g(n)&&!n.length)return"-";if(!i&&Rue(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var o=[],l=0;li*2}function ZD(e){return Math.max(1,(e-1)/1e3)}function Fue(e,r){for(var t=e.length,a=ZD(t),n=0,i=0,o={},l=0;ln*2}function Rue(e){return $g(e[0])&&$g(e[1])}});var E0=R((dCe,nq)=>{"use strict";var Pue=ta(),eq=ia(),Ku=fr(),Kg=_n().FP_SAFE,Nue=Ct(),Iue=Ca(),rq=an(),Oue=rq.getFromId,zue=rq.isLinked;nq.exports={applyAutorangeOptions:aq,getAutoRange:K4,makePadFn:Q4,doAutoRange:Uue,findExtremes:Gue,concatExtremes:tw};function K4(e,r){var t,a,n=[],i=e._fullLayout,o=Q4(i,r,0),l=Q4(i,r,1),s=tw(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return Ku.simpleMap(r.range,r.r2l);var c=u[0].val,h=f[0].val;for(t=1;t0&&(P=w-o(S)-l(M),P>x?N/P>T&&(k=S,D=M,T=N/P):N/w>T&&(k={val:S.val,nopad:1},D={val:M.val,nopad:1},T=N/w));function q(H,z){return Math.max(H,l(z))}if(c===h){var O=c-1,U=c+1;if(b)if(c===0)n=[0,1];else{var $=(c>0?f:u).reduce(q,0),j=c/(1-Math.min(.5,$/w));n=c>0?[0,j]:[j,0]}else _?n=[Math.max(0,O),Math.max(1,U)]:n=[O,U]}else b?(k.val>=0&&(k={val:0,nopad:1}),D.val<=0&&(D={val:0,nopad:1})):_&&(k.val-T*o(k)<0&&(k={val:0,nopad:1}),D.val<=0&&(D={val:1,nopad:1})),T=(D.val-k.val-$D(r,S.val,M.val))/(w-o(k)-l(D)),n=[k.val-T*o(k),D.val+T*l(D)];return n=aq(n,r),r.limitRange&&r.limitRange(),p&&n.reverse(),Ku.simpleMap(n,r.l2r||Number)}function $D(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),S=x((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),M=x(t.vpadplus||t.vpad),k=x(t.vpadminus||t.vpad);if(!u){if(_=1/0,w=-1/0,s)for(c=0;c0&&(_=h),h>w&&h-Kg&&(_=h),h>w&&h=N;c--)P(c);return{min:a,max:n,opts:t}}function ew(e,r,t,a){tq(e,r,t,a,Hue)}function rw(e,r,t,a){tq(e,r,t,a,Vue)}function tq(e,r,t,a,n){for(var i=a.tozero,o=a.extrapad,l=!0,s=0;s=t&&(u.extrapad||!o)){l=!1;break}else n(r,u.val)&&u.pad<=t&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:o})}}function QD(e){return eq(e)&&Math.abs(e)=r}function Yue(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&Qg(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&Qg(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function Wue(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&Qg(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&Qg(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function Qg(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),o<=s&&(o=s,a=s)}}return t=Yue(t,r),a=Wue(a,r),[t,a]}});var Va=R((pCe,Sq)=>{"use strict";var Uo=ta(),An=ia(),L0=jn(),A1=Ct(),Et=fr(),D0=Et.strTranslate,Ec=Ci(),jue=x1(),T1=Qt(),Ao=Ca(),Xue=Bo(),iq=b4(),hi=_n(),Zue=hi.ONEMAXYEAR,t2=hi.ONEAVGYEAR,a2=hi.ONEMINYEAR,Jue=hi.ONEMAXQUARTER,ow=hi.ONEAVGQUARTER,n2=hi.ONEMINQUARTER,$ue=hi.ONEMAXMONTH,q0=hi.ONEAVGMONTH,i2=hi.ONEMINMONTH,To=hi.ONEWEEK,Ei=hi.ONEDAY,Qu=Ei/2,is=hi.ONEHOUR,M1=hi.ONEMIN,o2=hi.ONESEC,Kue=hi.ONEMILLI,Que=hi.ONEMICROSEC,Lc=hi.MINUS_SIGN,u2=hi.BADNUM,lw={K:"zeroline"},sw={K:"gridline",L:"path"},uw={K:"minor-gridline",L:"path"},mq={K:"tick",L:"path"},oq={K:"tick",L:"text"},lq={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},f2=ki(),w1=f2.MID_SHIFT,Dc=f2.CAP_SHIFT,S1=f2.LINE_SPACING,efe=f2.OPPOSITE_SIDE,l2=3,gr=Sq.exports={};gr.setConvert=Jg();var rfe=$4(),Xs=an(),tfe=Xs.idSort,afe=Xs.isLinked;gr.id2name=Xs.id2name;gr.name2id=Xs.name2id;gr.cleanId=Xs.cleanId;gr.list=Xs.list;gr.listIds=Xs.listIds;gr.getFromId=Xs.getFromId;gr.getFromTrace=Xs.getFromTrace;var yq=E0();gr.getAutoRange=yq.getAutoRange;gr.findExtremes=yq.findExtremes;var nfe=1e-4;function hw(e){var r=(e[1]-e[0])*nfe;return[e[0]-r,e[1]+r]}gr.coerceRef=function(e,r,t,a,n,i){var o=a.charAt(a.length-1),l=t._fullLayout._subplots[o+"axis"],s=a+"ref",u={};return n||(n=l[0]||(typeof i=="string"?i:i[0])),i||(i=n),l=l.concat(l.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:l.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},Et.coerce(e,r,u,s)};gr.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};gr.coercePosition=function(e,r,t,a,n,i){var o,l,s=gr.getRefType(a);if(s!=="range")o=Et.ensureNumber,l=t(n,i);else{var u=gr.getFromId(r,a);i=u.fraction2r(i),l=t(n,i),o=u.cleanPos}e[n]=o(l)};gr.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?Et.ensureNumber:gr.getFromId(r,t).cleanPos;return a(e)};gr.redrawComponents=function(e,r){r=r||gr.listIds(e);var t=e._fullLayout;function a(n,i,o,l){for(var s=A1.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};gr.saveRangeInitial=function(e,r){for(var t=gr.list(e,"",!0),a=!1,n=0;nc*.3||u(a)||u(n))){var h=t.dtick/2;e+=e+ho){var l=Number(t.substr(1));i.exactYears>o&&l%12===0?e=gr.tickIncrement(e,"M6","reverse")+Ei*1.5:i.exactMonths>o?e=gr.tickIncrement(e,"M1","reverse")+Ei*15.5:e-=Qu;var s=gr.tickIncrement(e,t);if(s<=a)return s}return e}gr.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&An(r._tmin),n;if(a){var i=gr.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var o=Et.simpleMap(r.range,r.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Et.simpleMap(n,r.l2r),e._isMinor=!0,gr.prepTicks(e,t),a){var l=An(r.dtick),s=An(e.dtick),u=l?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);l&&s?aw(u,f)?u===2*To&&f===2*Ei&&(e.dtick=To):u===2*To&&f===3*Ei?e.dtick=To:u===To&&!(r._input.minor||{}).nticks?e.dtick=Ei:fq(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":aw(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?aw(u,f)||(e.dtick=fq(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function aw(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function fq(e,r){return Math.abs(e/r-1)<.001}gr.prepTicks=function(e,r){var t=Et.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?Et.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=Et.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,gr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,o=a):(i=a,o=a);var l=e[i].value,s=e[o].value,u=Math.abs(s-l),f=t||u,c=0;f>=a2?u>=a2&&u<=Zue?c=u:c=t2:t===ow&&f>=n2?u>=n2&&u<=Jue?c=u:c=ow:f>=i2?u>=i2&&u<=$ue?c=u:c=q0:t===To&&f>=To?c=To:f>=Ei?c=Ei:t===Qu&&f>=Qu?c=Qu:t===is&&f>=is&&(c=is);var h;c>=u&&(c=u,h=!0);var d=n+c;if(r.rangebreaks&&c>0){for(var p=84,g=0,m=0;mTo&&(c=u)}(c>0||a===0)&&(e[a].periodX=n+c/2)}}gr.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,o=r.ticklabelmode==="period",l=r.range[0]>r.range[1],s=!r.ticklabelindex||Et.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=Et.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(w?0:1);x--){var T=!x;x?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var S=x?r:Et.extendFlat({},r,r.minor);if(T?gr.prepMinorTicks(S,r,t):gr.prepTicks(S,t),S.tickmode==="array"){x?(m=[],p=cq(r,!T)):(b=[],g=cq(r,!T));continue}if(S.tickmode==="sync"){m=[],p=ffe(r);continue}var M=hw(u),k=M[0],D=M[1],P=An(S.dtick),N=a==="log"&&!(P||S.dtick.charAt(0)==="L"),q=gr.tickFirst(S,t);if(x){if(r._tmin=q,q=D:U<=D;U=gr.tickIncrement(U,H,f,n)){if(x&&$++,S.rangebreaks&&!f){if(U=h)break}if(m.length>d||U===O)break;O=U;var z={value:U};x?(N&&U!==(U|0)&&(z.simpleLabel=!0),i>1&&$%i&&(z.skipLabel=!0),m.push(z)):(z.minor=!0,b.push(z))}}if(!b||b.length<2)s=!1;else{var V=(b[1].value-b[0].value)*(l?-1:1);Rfe(V,r.tickformat)||(s=!1)}if(!s)_=m;else{var X=m.concat(b);o&&m.length&&(X=X.slice(1)),X=X.sort(function(or,yr){return or.value-yr.value}).filter(function(or,yr,ir){return yr===0||or.value!==ir[yr-1].value});var K=X.map(function(or,yr){return or.minor===void 0&&!or.skipLabel?yr:null}).filter(function(or){return or!==null});K.forEach(function(or){s.map(function(yr){var ir=or+yr;ir>=0&&ir-1;De--){if(m[De].drop){m.splice(De,1);continue}m[De].value=iw(m[De].value,r);var Z=r.c2p(m[De].value);(Ce?ae>Z-Y:aeh||Xeh&&(ir.periodX=h),Xen&&ht2)r/=t2,a=n(10),e.dtick="M"+12*ns(r,a,e2);else if(i>q0)r/=q0,e.dtick="M"+ns(r,1,vq);else if(i>Ei){if(e.dtick=ns(r,Ei,e._hasDayOfWeekBreaks?[1,2,7,14]:cfe),!t){var o=gr.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Et.dateTick0(e.calendar,2):e.tick0=Et.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else i>is?e.dtick=ns(r,is,vq):i>M1?e.dtick=ns(r,M1,hq):i>o2?e.dtick=ns(r,o2,hq):(a=n(10),e.dtick=ns(r,a,e2))}else if(e.type==="log"){e.tick0=0;var s=Et.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+ns(r,a,e2)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):mw(e)?(e.tick0=0,a=1,e.dtick=ns(r,a,vfe)):(e.tick0=0,a=n(10),e.dtick=ns(r,a,e2));if(e.dtick===0&&(e.dtick=1),!An(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function _q(e){var r=e.dtick;if(e._tickexponent=0,!An(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=Ei&&n<=10||r>=Ei*15)e._tickround="d";else if(r>=M1&&n<=16||r>=is)e._tickround="M";else if(r>=o2&&n<=19||r>=M1)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(An(r)||r.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);An(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(s2(e.exponentformat)&&!dw(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}gr.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(An(r))return Et.increment(e,n*r);var i=r.charAt(0),o=n*Number(r.substr(1));if(i==="M")return Et.incrementMonth(e,o,a);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var l=r==="D2"?xq:bq,s=e+n*.01,u=Et.roundUp(Et.mod(s,1),l,t);return Math.floor(s)+Math.log(Uo.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};gr.tickFirst=function(e,r){var t=e.r2l||Number,a=Et.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&b<=e._length?m:null};if(i&&Et.isArrayOrTypedArray(e.ticktext)){var c=Et.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(u=0;u"+l;else{var u=C1(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(o+="
")}r.text=o}function dfe(e,r,t,a,n){var i=e.dtick,o=r.x,l=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),l||s==="L")r.text=k1(Math.pow(10,o),e,n,a);else if(An(i)||s==="D"&&Et.mod(o+.01,1)<.1){var u=Math.round(o),f=Math.abs(u),c=e.exponentformat;c==="power"||s2(c)&&dw(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":Lc)+f+"",r.fontSize*=1.25):(c==="e"||c==="E")&&f>2?r.text="1"+c+(u>0?"+":Lc)+f:(r.text=k1(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,Et.mod(o,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(o<0?.5:.25)))}}function pfe(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function mfe(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);t?r.text=o+" - "+i:(r.text=i,r.text2=o)}function yfe(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=k1(r.x,e,n,a)}function gfe(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var o=bfe(i);if(o[1]>=100)r.text=k1(Et.deg2rad(r.x),e,n,a);else{var l=r.x<0;o[1]===1?o[0]===1?r.text="\u03C0":r.text=o[0]+"\u03C0":r.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),l&&(r.text=Lc+r.text)}}}else r.text=k1(r.x,e,n,a)}function bfe(e){function r(l,s){return Math.abs(l-s)<=1e-6}function t(l,s){return r(s,0)?l:t(s,l%s)}function a(l){for(var s=1;!r(Math.round(l*s)/s,l);)s*=10;return s}var n=a(e),i=e*n,o=Math.abs(t(i,n));return[Math.round(i/o),Math.round(n/o)]}var xfe=["f","p","n","\u03BC","m","","k","M","G","T"];function s2(e){return e==="SI"||e==="B"}function dw(e){return e>14||e<-15}function k1(e,r,t,a){var n=e<0,i=r._tickround,o=t||r.exponentformat||"B",l=r._tickexponent,s=gr.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:o,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:An(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};_q(f),i=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,Lc);var c=Math.pow(10,-i)/2;if(o==="none"&&(l=0),e=Math.abs(e),e"+p+"":o==="B"&&l===9?e+="B":s2(o)&&(e+=xfe[l/3+5])}return n?Lc+e:e}gr.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*q0}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var c=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return c===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):c-h}else return typeof s=="number"?1:-1}function n(s,u,f){var c=f||function(p){return p},h=u[0],d=u[1];return(!h&&typeof h!="number"||c(h)<=c(s))&&(!d&&typeof d!="number"||c(d)>=c(s))}function i(s,u){var f=u[0]===null,c=u[1]===null,h=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||h)&&(c||d)}var o,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var l={false:{left:0,right:0}};return Et.syncOrAsync(n.map(function(s){return function(){if(s){var u=gr.getFromId(e,s);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=o;var f=gr.drawOne(e,u,t);return u._shiftPusher&&vw(u,u._fullDepth||0,l,!0),u._r=u.range.slice(),u._rl=Et.simpleMap(u._r,u.r2l),f}}}))};gr.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,o,l;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),c=gr.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),vw(r,d,a,!0),vw(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=Ffe(r,a));var p=h[f+"axislayer"],g=r._mainLinePosition,m=g+=r._shift,b=r._mainMirrorPosition,_=r._vals=gr.calcTicks(r),w=[r.mirror,m,b].join("_");for(i=0;i<_.length;i++)_[i].axInfo=w;r._selections={},r._tickAngles&&(r._prevTickAngles=r._tickAngles),r._tickAngles={},r._depth=null;var x={};function T(Ke){var Je=u+(Ke||"tick");return x[Je]||(x[Je]=Tfe(r,Je,m)),x[Je]}if(r.visible){var S=gr.makeTransTickFn(r),M=gr.makeTransTickLabelFn(r),k,D,P=r.ticks==="inside",N=r.ticks==="outside";if(r.tickson==="boundaries"){var q=_fe(r,_);D=gr.clipEnds(r,q),k=P?D:q}else D=gr.clipEnds(r,_),k=P&&r.ticklabelmode!=="period"?D:_;var O=r._gridVals=D,U=Afe(r,_);if(!s._hasOnlyLargeSploms){var $=r._subplotsWith,j={};for(i=0;i<$.length;i++){o=$[i],l=s._plots[o];var H=l[c+"axis"],z=H._mainAxis._id;if(!j[z]){j[z]=1;var V=f==="x"?"M0,"+H._offset+"v"+H._length:"M"+H._offset+",0h"+H._length;gr.drawGrid(e,r,{vals:O,counterAxis:H,layer:l.gridlayer.select("."+u),minorLayer:l.minorGridlayer.select("."+u),path:V,transFn:S}),gr.drawZeroLine(e,r,{counterAxis:H,layer:l.zerolinelayer,path:V,transFn:S})}}}var X,K=gr.getTickSigns(r),ve=gr.getTickSigns(r,"minor");if(r.ticks||r.minor&&r.minor.ticks){var xe=gr.makeTickPath(r,m,K[2]),se=gr.makeTickPath(r,m,ve[2],{minor:!0}),be,re,ke,ge;if(r._anchorAxis&&r.mirror&&r.mirror!==!0?(be=gr.makeTickPath(r,b,K[3]),re=gr.makeTickPath(r,b,ve[3],{minor:!0}),ke=xe+be,ge=se+re):(be="",re="",ke=xe,ge=se),r.showdividers&&N&&r.tickson==="boundaries"){var Ee={};for(i=0;i0?ir.bottom-or:0,yr))));var de=0,Oe=0;if(r._shiftPusher&&(de=Math.max(yr,ir.height>0?Ke==="l"?or-ir.left:ir.right-or:0),r.title.text!==s._dfltTitle[f]&&(Oe=(r._titleStandoff||0)+(r._titleScoot||0),Ke==="l"&&(Oe+=pq(r))),r._fullDepth=Math.max(de,Oe)),r.automargin){Xe={x:0,y:0,r:0,l:0,t:0,b:0};var Ue=[0,1],rt=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Ke==="b"?Xe[Ke]=r._depth:(Xe[Ke]=r._depth=Math.max(ir.width>0?or-ir.top:0,yr),Ue.reverse()),ir.width>0){var Ur=ir.right-(r._offset+r._length);Ur>0&&(Xe.xr=1,Xe.r=Ur);var Ye=r._offset-ir.left;Ye>0&&(Xe.xl=0,Xe.l=Ye)}}else if(Ke==="l"?(r._depth=Math.max(ir.height>0?or-ir.left:0,yr),Xe[Ke]=r._depth-rt):(r._depth=Math.max(ir.height>0?ir.right-or:0,yr),Xe[Ke]=r._depth+rt,Ue.reverse()),ir.height>0){var Ve=ir.bottom-(r._offset+r._length);Ve>0&&(Xe.yb=0,Xe.b=Ve);var pr=r._offset-ir.top;pr>0&&(Xe.yt=1,Xe.t=pr)}Xe[c]=r.anchor==="free"?r.position:r._anchorAxis.domain[Ue[0]],r.title.text!==s._dfltTitle[f]&&(Xe[Ke]+=pq(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Lr={x:0,y:0,r:0,l:0,t:0,b:0},Lr[Je]=r.linewidth,r.mirror&&r.mirror!==!0&&(Lr[Je]+=yr),r.mirror===!0||r.mirror==="ticks"?Lr[c]=r._anchorAxis.domain[Ue[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Lr[c]=[r._counterDomainMin,r._counterDomainMax][Ue[1]]))}lr&&(Ar=A1.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(dq(Xe,r.automargin),dq(Lr,r.automargin)),L0.autoMargin(e,pw(r),Xe),L0.autoMargin(e,Tq(r),Lr),L0.autoMargin(e,Mq(r),Ar)}),Et.syncOrAsync(Pe)}};function dq(e,r){if(e){var t=Object.keys(lq).reduce(function(a,n){return r.indexOf(n)!==-1&&lq[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function _fe(e,r){var t=[],a,n=function(i,o){var l=i.xbnd[o];l!==null&&t.push(Et.extendFlat({},i,{x:l}))};if(r.length){for(a=0;ae.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!l;if(t){var u=o?-1:1;t=t*u}if(a){var f=e.side,c=l&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*c}return e._id.charAt(0)==="x"?function(h){return D0(n+e._offset+e.l2p(fw(h))+t,i+a)}:function(h){return D0(i+a,n+e._offset+e.l2p(fw(h))+t)}};function fw(e){return e.periodX!==void 0?e.periodX:e.x}function Mfe(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),o=t("bottom"),l=t("inside"),s=o||n||a||i;if(!s&&!l)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,c=l2,h=e.tickfont?e.tickfont.size:12;return(o||a)&&(f+=h*Dc,c+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,c+=l2),l&&u==="top"&&(c-=h*(1-Dc)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(c=-c),[s?f:0,l?c:0]}gr.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return o==="x"?"M0,"+(r+l*t)+"v"+i*t:"M"+(r+l*t)+",0h"+i*t};gr.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(q){return a.indexOf(q)!==-1},i=n("top"),o=n("left"),l=n("right"),s=n("bottom"),u=s||o||i||l,f=n("inside"),c=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:u&&(p=0),c&&(h+=p,t)){var g=Et.deg2rad(t);h=p*Math.cos(g)+1,d=p*Math.sin(g)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var m={labelStandoff:h,labelShift:d},b,_,w,x,T=0,S=e.side,M=e._id.charAt(0),k=e.tickangle,D;if(M==="x")D=!f&&S==="bottom"||f&&S==="top",x=D?1:-1,f&&(x*=-1),b=d*x,_=r+h*x,w=D?1:-.2,Math.abs(k)===90&&(f?w+=w1:k===-90&&S==="bottom"?w=Dc:k===90&&S==="top"?w=w1:w=.5,T=w1/2*(k/90)),m.xFn=function(q){return q.dx+b+T*q.fontSize},m.yFn=function(q){return q.dy+_+q.fontSize*w},m.anchorFn=function(q,O){if(u){if(o)return"end";if(l)return"start"}return!An(O)||O===0||O===180?"middle":O*x<0!==f?"end":"start"},m.heightFn=function(q,O,U){return O<-60||O>60?-.5*U:e.side==="top"!==f?-U:0};else if(M==="y"){if(D=!f&&S==="left"||f&&S==="right",x=D?1:-1,f&&(x*=-1),b=h,_=d*x,w=0,!f&&Math.abs(k)===90&&(k===-90&&S==="left"||k===90&&S==="right"?w=Dc:w=.5),f){var P=An(k)?+k:0;if(P!==0){var N=Et.deg2rad(P);T=Math.abs(Math.sin(N))*Dc*x,w=0}}m.xFn=function(q){return q.dx+r-(b+q.fontSize*w)*x+T*q.fontSize},m.yFn=function(q){return q.dy+_+q.fontSize*w1},m.anchorFn=function(q,O){return An(O)&&Math.abs(O)===90?"middle":D?"end":"start"},m.heightFn=function(q,O,U){return e.side==="right"&&(O*=-1),O<-30?-U:O<30?-.5*U:0}}return m};function c2(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}gr.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(r.ticks?t.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,c2);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(o){return T1.stroke(Uo.select(this),o.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(o){return Ao.crispRound(e,o.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),v2(r,[mq]),i.attr("transform",t.transFn)};gr.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(b){return b.minor}):[],o=r.showgrid?t.vals.filter(function(b){return!b.minor}):[],l=t.counterAxis;if(l&&gr.shouldShowZeroLine(e,r,l))for(var s=r.tickmode==="array",u=0;u=0;p--){var g=p?h:d;if(g){var m=g.selectAll("path."+a).data(p?o:i,c2);m.exit().remove(),m.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),m.attr("transform",t.transFn).attr("d",t.path).each(function(b){return T1.stroke(Uo.select(this),b.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(b){return Ao.dashStyle(b.minor?r.minor.griddash:r.griddash,b.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(b){return(b.minor?c:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&m.attr("d",t.path)}}v2(r,[sw,uw])}};gr.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=gr.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(o,l){return tfe(o.id,l.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(T1.stroke,r.zerolinecolor||T1.defaultLine).style("stroke-width",Ao.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),v2(r,[lw])};gr.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",o=t.vals.filter(function(z){return z.text}),l=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?o:[],c2),c=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(z){var V=Uo.select(this),X=e._promises.length;V.call(Ec.positionText,l.xFn(z),l.yFn(z)).call(Ao.font,{family:z.font,size:z.fontSize,color:z.fontColor,weight:z.fontWeight,style:z.fontStyle,variant:z.fontVariant,textcase:z.fontTextcase,lineposition:z.fontLineposition,shadow:z.fontShadow}).text(z.text).call(Ec.convertToTspans,e),e._promises[X]?c.push(e._promises.pop().then(function(){h(V,s)})):h(V,s)}),v2(r,[oq]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(z){Uo.select(this).select("text").call(Ec.positionText,l.xFn(z),l.yFn(z))});function h(z,V){z.each(function(X){var K=Uo.select(this),ve=K.select(".text-math-group"),xe=l.anchorFn(X,V),se=t.transFn.call(K.node(),X)+(An(V)&&+V!=0?" rotate("+V+","+l.xFn(X)+","+(l.yFn(X)-X.fontSize/2)+")":""),be=Ec.lineCount(K),re=S1*X.fontSize,ke=l.heightFn(X,An(V)?+V:0,(be-1)*re);if(ke&&(se+=D0(0,ke)),ve.empty()){var ge=K.select("text");ge.attr({transform:se,"text-anchor":xe}),ge.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var Ee=Ao.bBox(ve.node()).width,De=Ee*{end:-.5,start:.5}[xe];ve.attr("transform",se+D0(De,0))}})}r._adjustTickLabelsOverflow=function(){var z=r.ticklabeloverflow;if(!(!z||z==="allow")){var V=z.indexOf("hide")!==-1,X=r._id.charAt(0)==="x",K=0,ve=X?e._fullLayout.width:e._fullLayout.height;if(z.indexOf("domain")!==-1){var xe=Et.simpleMap(r.range,r.r2l);K=r.l2p(xe[0])+r._offset,ve=r.l2p(xe[1])+r._offset}var se=Math.min(K,ve),be=Math.max(K,ve),re=r.side,ke=1/0,ge=-1/0;f.each(function(Y){var ae=Uo.select(this),Z=ae.select(".text-math-group");if(Z.empty()){var Te=Ao.bBox(ae.node()),Pe=0;X?(Te.right>be||Te.leftbe||Te.top+(r.tickangle?0:Y.fontSize/4)r["_visibleLabelMin_"+xe._id]?Y.style("display","none"):be.K==="tick"&&!se&&Y.style("display",null)})})})})},h(f,u+1?u:s);function d(){return c.length&&Promise.all(c)}var p=null;function g(){if(h(f,s),o.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){p=r.autotickangles[0];var z=0,V=[],X,K=1;f.each(function(ir){z=Math.max(z,ir.fontSize);var Xe=r.l2p(ir.x),Lr=cw(this),Ar=Ao.bBox(Lr.node());K=Math.max(K,Ec.lineCount(Lr)),V.push({top:0,bottom:10,height:10,left:Xe-Ar.width/2,right:Xe+Ar.width/2+2,width:Ar.width+2})});var ve=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,xe=o.length,se=Math.abs((o[xe-1].x-o[0].x)*r._m)/(xe-1),be=ve?se/2:se,re=ve?r.ticklen:z*1.25*K,ke=Math.sqrt(Math.pow(be,2)+Math.pow(re,2)),ge=be/ke,Ee=r.autotickangles.map(function(ir){return ir*Math.PI/180}),De=Ee.find(function(ir){return Math.abs(Math.cos(ir))<=ge});De===void 0&&(De=Ee.reduce(function(ir,Xe){return Math.abs(Math.cos(ir))$*U&&(N=U,k[M]=D[M]=q[M])}var j=Math.abs(N-P);j-x>0?(j-=x,x*=1+x/j):x=0,r._id.charAt(0)!=="y"&&(x=-x),k[S]=_.p2r(_.r2p(D[S])+T*x),_.autorange==="min"||_.autorange==="max reversed"?(k[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(k[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[_._name+".range"]=k}var H=Et.syncOrAsync(m);return H&&H.then&&e._promises.push(H),H};function Sfe(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,c2);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(T1.stroke,r.dividercolor).style("stroke-width",Ao.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}gr.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function pq(e){var r=e.title.font.size,t=(e.title.text.match(Ec.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(Dc+t*S1):t?r*(t+1)*S1:r}function kfe(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,o,l=(r.title.text.match(Ec.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?o=r._depth+r.title.standoff+i*Dc:(r.side==="top"||r.side==="left")&&(o=r._depth+r.title.standoff+i*(w1+l*S1));else{var s=C1(r);if(r.type==="multicategory")o=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),o=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?o+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):o+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=gr.getPxPosition(e,r),c,h,d;n==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-o:f+o):(d=r._offset+r._length/2,h=r.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(r.type!=="multicategory"){var g=r._selections[r._id+"tick"];if(p={selection:g,side:r.side},g&&g.node()&&g.node().parentNode){var m=Ao.getTranslate(g.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}r.title.hasOwnProperty("standoff")&&(p.pad=0)}return r._titleStandoff=o,jue.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}gr.shouldShowZeroLine=function(e,r,t){var a=Et.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===u2)&&(Aq(r,0)||!Cfe(e,r,t,a)||Efe(e,r))};gr.clipEnds=function(e,r){return r.filter(function(t){return Aq(e,t.x)})};function Aq(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=Que:/%L/.test(r)?e>=Kue:/%[SX]/.test(r)?e>=o2:/%M/.test(r)?e>=M1:/%[HI]/.test(r)?e>=is:/%p/.test(r)?e>=Qu:/%[Aadejuwx]/.test(r)?e>=Ei:/%[UVW]/.test(r)?e>=To:/%[Bbm]/.test(r)?e>=i2:/%[q]/.test(r)?e>=n2:/%[Yy]/.test(r)?e>=a2:!0}});var Cq=R((mCe,kq)=>{"use strict";kq.exports=function(r,t,a){var n,i;if(a){var o=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[o?1:0],i=a[o?0:1]}var l=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);l===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var yw=R((yCe,Eq)=>{"use strict";var Pfe=Cq();Eq.exports=function(r,t,a,n){var i=t._template||{},o=t.type||i.type||"-";a("minallowed"),a("maxallowed");var l=a("range");if(!l){var s;!n.noInsiderange&&o!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(l=a("range",s)))}var u=t.getAutorangeDflt(l,n),f=a("autorange",u),c;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,c=!0),c||(u=t.getAutorangeDflt(l,n),f=a("autorange",u)),f&&(Pfe(a,f,l),(o==="linear"||o==="-")&&a("rangemode")),t.cleanRange()}});var Dq=R((gCe,Lq)=>{var Nfe={left:0,top:0};Lq.exports=Ife;function Ife(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=Ofe(r);return t[0]=a-i.left,t[1]=n-i.top,t}function Ofe(e){return e===window||e===document||e===document.body?Nfe:e.getBoundingClientRect()}});var gw=R((bCe,qq)=>{"use strict";var zfe=X_();function Bfe(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}qq.exports=zfe&&Bfe()});var Rq=R((xCe,Fq)=>{"use strict";Fq.exports=function(r,t,a,n,i){var o=(r-a)/(n-a),l=o+t/(n-a),s=(o+l)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?s:i==="right"||i==="top"?l:o<2/3-s?o:l>4/3-s?l:s}});var Iq=R((_Ce,Nq)=>{"use strict";var Pq=fr(),Ufe=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Nq.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=Pq.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=Pq.constrain(Math.floor(t*3),0,2),Ufe[t][r]}});var zq=R((wCe,Oq)=>{"use strict";var Gfe=u1(),Hfe=dg(),Vfe=r1().getGraphDiv,Yfe=Qd(),bw=Oq.exports={};bw.wrapped=function(e,r,t){e=Vfe(e),e._fullLayout&&Hfe.clear(e._fullLayout._uid+Yfe.HOVERID),bw.raw(e,r,t)};bw.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&Gfe.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var xl=R((ACe,Gq)=>{"use strict";var Wfe=Dq(),xw=J_(),jfe=gw(),Xfe=fr().removeElement,Zfe=ai(),qc=Gq.exports={};qc.align=Rq();qc.getCursor=Iq();var Bq=zq();qc.unhover=Bq.wrapped;qc.unhoverRaw=Bq.raw;qc.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,o,l,s,u,f,c,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=m,jfe?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=m,i.addEventListener("touchstart",m,{passive:!1})):i.ontouchstart=m;function p(w,x,T){return Math.abs(w)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,c),!d){var x;try{x=new MouseEvent("click",w)}catch(S){var T=_w(w);x=document.createEvent("MouseEvents"),x.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,T[0],T[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}h.dispatchEvent(x)}t._dragging=!1,t._dragged=!1}};function Uq(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}qc.coverSlip=Uq;function _w(e){return Wfe(e.changedTouches?e.changedTouches[0]:e,document.body)}});var ef=R((TCe,Hq)=>{"use strict";Hq.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var Wq=R((MCe,Yq)=>{"use strict";var ww=ef(),E1="data-savedcursor",Vq="!!";Yq.exports=function(r,t){var a=r.attr(E1);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var Aw=ci(),Jfe=Kl();jq.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Jfe.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:Aw({editType:"legend"}),grouptitlefont:Aw({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:Aw({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var d2=R(h2=>{"use strict";h2.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};h2.isVertical=function(r){return r.orientation!=="h"};h2.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var kw=R((CCe,Xq)=>{"use strict";var Mw=Ct(),Mo=fr(),$fe=Da(),Kfe=hl(),Qfe=Tw(),ece=l0(),Sw=d2();function rce(e,r,t,a){var n=r[e]||{},i=$fe.newContainer(t,e);function o(H,z){return Mo.coerce(n,i,Qfe,H,z)}var l=Mo.coerceFont(o,"font",t.font);o("bgcolor",t.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var u,f=function(H,z){var V=u._input,X=u;return Mo.coerce(V,X,Kfe,H,z)},c=t.font||{},h=Mo.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,g="normal",m=(t.shapes||[]).filter(function(H){return H.showlegend}),b=a.concat(m).filter(function(H){return e===(H.legend||"legend")}),_=0;_(e==="legend"?1:0));if(x===!1&&(t[e]=void 0),!(x===!1&&!n.uirevision)&&(o("uirevision",t.uirevision),x!==!1)){o("borderwidth");var T=o("orientation"),S=o("yref"),M=o("xref"),k=T==="h",D=S==="paper",P=M==="paper",N,q,O,U="left";k?(N=0,Mw.getComponentMethod("rangeslider","isVisible")(r.xaxis)?D?(q=1.1,O="bottom"):(q=1,O="top"):D?(q=-.1,O="top"):(q=0,O="bottom")):(q=1,O="auto",P?N=1.02:(N=1,U="right")),Mo.coerce(n,i,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:N}},"x"),Mo.coerce(n,i,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:q}},"y"),o("traceorder",g),Sw.isGrouped(t[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",U),o("yanchor",O),o("valign"),Mo.noneOrAll(n,i,["x","y"]);var $=o("title.text");if($){o("title.side",k?"left":"top");var j=Mo.extendFlat({},l,{size:Mo.bigFont(l.size)});Mo.coerceFont(o,"title.font",j)}}}}Xq.exports=function(r,t,a){var n,i=a.slice(),o=t.shapes;if(o)for(n=0;n{"use strict";var F0=Ct(),Ew=fr(),tce=Ew.pushUnique,Cw=!0;Zq.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,o=n.legend.itemdoubleclick,l=n.legend.groupclick;a===1&&i==="toggle"&&o==="toggleothers"&&Cw&&t.data&&t._context.showTips&&Ew.notifier(Ew._(t,"Double-click on legend to isolate one trace"),"long"),Cw=!1;var s;if(a===1?s=i:a===2&&(s=o),!s)return;var u=l==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],c=r.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=t._fullData,d=(n.shapes||[]).filter(function(or){return or.showlegend}),p=h.concat(d),g=c.trace;g._isShape&&(g=g._fullInput);var m=g.legendgroup,b,_,w,x,T,S,M={},k=[],D=[],P=[];function N(or,yr){var ir=k.indexOf(or),Xe=M.visible;return Xe||(Xe=M.visible=[]),k.indexOf(or)===-1&&(k.push(or),ir=k.length-1),Xe[ir]=yr,ir}var q=(n.shapes||[]).map(function(or){return or._input}),O=!1;function U(or,yr){q[or].visible=yr,O=!0}function $(or,yr){if(!(c.groupTitle&&!u)){var ir=or._fullInput||or,Xe=ir._isShape,Lr=ir.index;Lr===void 0&&(Lr=ir._index);var Ar=ir.visible===!1?!1:yr;Xe?U(Lr,Ar):N(Lr,Ar)}}var j=g.legend,H=g._fullInput,z=H&&H._isShape;if(!z&&F0.traceIs(g,"pie-like")){var V=c.label,X=f.indexOf(V);if(s==="toggle")X===-1?f.push(V):f.splice(X,1);else if(s==="toggleothers"){var K=X!==-1,ve=[];for(b=0;b{"use strict";$q.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var eF=R((DCe,Qq)=>{"use strict";var Kq=Ct(),Dw=d2();Qq.exports=function(r,t,a){var n=t._inHover,i=Dw.isGrouped(t),o=Dw.isReversed(t),l={},s=[],u=!1,f={},c=0,h=0,d,p;function g(H,z,V){if(t.visible!==!1&&!(a&&H!==t._id))if(z===""||!Dw.isGrouped(t)){var X="~~i"+c;s.push(X),l[X]=[V],c++}else s.indexOf(z)===-1?(s.push(z),u=!0,l[z]=[V]):l[z].push(V)}for(d=0;dP&&(D=P)}M[d][0]._groupMinRank=D,M[d][0]._preGroupSort=d}var N=function(H,z){return H[0]._groupMinRank-z[0]._groupMinRank||H[0]._preGroupSort-z[0]._preGroupSort},q=function(H,z){return H.trace.legendrank-z.trace.legendrank||H._preSort-z._preSort};for(M.forEach(function(H,z){H[0]._preGroupSort=z}),M.sort(N),d=0;d{"use strict";var p2=fr();function rF(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Fc.formatPiePercent=function(r,t){var a=rF((r*100).toPrecision(3));return p2.numSeparate(a,t)+"%"};Fc.formatPieValue=function(r,t){var a=rF(r.toPrecision(10));return p2.numSeparate(a,t)};Fc.getFirstFilled=function(r,t){if(p2.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var ace=Ca(),nce=Qt();tF.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?ace.pointStyle(r,a,n,t):nce.fill(r,t.color)}});var lF=R((RCe,oF)=>{"use strict";var nF=Qt(),iF=qw().castOption,ice=aF();oF.exports=function(r,t,a,n){var i=a.marker.line,o=iF(i.color,t.pts)||nF.defaultLine,l=iF(i.width,t.pts)||0;r.call(ice,t,a,n).style("stroke-width",l).call(nF.stroke,o)}});var Nw=R((PCe,hF)=>{"use strict";var Li=ta(),Fw=Ct(),xi=fr(),sF=xi.strTranslate,zi=Ca(),Go=Qt(),Rw=gl().extractOpts,m2=ni(),oce=lF(),lce=qw().castOption,sce=Lw(),uF=12,fF=5,Rc=2,uce=10,R0=5;hF.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",o=a.itemwidth,l=(o+sce.itemGap*2)/2,s=sF(l,0),u=function(M,k,D,P){var N;if(M+1)N=M;else if(k&&k.width>0)N=k.width;else return 0;return i?P:Math.min(N,D)};r.each(function(M){var k=Li.select(this),D=xi.ensureSingle(k,"g","layers");D.style("opacity",M[0].trace.opacity);var P=a.indentation,N=a.valign,q=M[0].lineHeight,O=M[0].height;if(N==="middle"&&P===0||!q||!O)D.attr("transform",null);else{var U={top:1,bottom:-1}[N],$=U*(.5*(q-O+3))||0,j=a.indentation;D.attr("transform",sF(j,$))}var H=D.selectAll("g.legendfill").data([M]);H.enter().append("g").classed("legendfill",!0);var z=D.selectAll("g.legendlines").data([M]);z.enter().append("g").classed("legendlines",!0);var V=D.selectAll("g.legendsymbols").data([M]);V.enter().append("g").classed("legendsymbols",!0),V.selectAll("g.legendpoints").data([M]).enter().append("g").classed("legendpoints",!0)}).each(S).each(h).each(p).each(d).each(m).each(x).each(w).each(f).each(c).each(b).each(_);function f(M){var k=cF(M),D=k.showFill,P=k.showLine,N=k.showGradientLine,q=k.showGradientFill,O=k.anyFill,U=k.anyLine,$=M[0],j=$.trace,H,z,V=Rw(j),X=V.colorscale,K=V.reversescale,ve=function(Ee){if(Ee.size())if(D)zi.fillGroupStyle(Ee,t,!0);else{var De="legendfill-"+j.uid;zi.gradient(Ee,t,De,Pw(K),X,"fill")}},xe=function(Ee){if(Ee.size()){var De="legendline-"+j.uid;zi.lineGroupStyle(Ee),zi.gradient(Ee,t,De,Pw(K),X,"stroke")}},se=m2.hasMarkers(j)||!O?"M5,0":U?"M5,-2":"M5,-3",be=Li.select(this),re=be.select(".legendfill").selectAll("path").data(D||q?[M]:[]);if(re.enter().append("path").classed("js-fill",!0),re.exit().remove(),re.attr("d",se+"h"+o+"v6h-"+o+"z").call(ve),P||N){var ke=u(void 0,j.line,uce,fF);z=xi.minExtend(j,{line:{width:ke}}),H=[xi.minExtend($,{trace:z})]}var ge=be.select(".legendlines").selectAll("path").data(P||N?[H]:[]);ge.enter().append("path").classed("js-line",!0),ge.exit().remove(),ge.attr("d",se+(N?"l"+o+",0.0001":"h"+o)).call(P?zi.lineGroupStyle:xe)}function c(M){var k=cF(M),D=k.anyFill,P=k.anyLine,N=k.showLine,q=k.showMarker,O=M[0],U=O.trace,$=!q&&!P&&!D&&m2.hasText(U),j,H;function z(re,ke,ge,Ee){var De=xi.nestedProperty(U,re).get(),Ce=xi.isArrayOrTypedArray(De)&&ke?ke(De):De;if(i&&Ce&&Ee!==void 0&&(Ce=Ee),ge){if(Cege[1])return ge[1]}return Ce}function V(re){return O._distinct&&O.index&&re[O.index]?re[O.index]:re[0]}if(q||$||N){var X={},K={};if(q){X.mc=z("marker.color",V),X.mx=z("marker.symbol",V),X.mo=z("marker.opacity",xi.mean,[.2,1]),X.mlc=z("marker.line.color",V),X.mlw=z("marker.line.width",xi.mean,[0,5],Rc),K.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ve=z("marker.size",xi.mean,[2,16],uF);X.ms=ve,K.marker.size=ve}N&&(K.line={width:z("line.width",V,[0,10],fF)}),$&&(X.tx="Aa",X.tp=z("textposition",V),X.ts=10,X.tc=z("textfont.color",V),X.tf=z("textfont.family",V),X.tw=z("textfont.weight",V),X.ty=z("textfont.style",V),X.tv=z("textfont.variant",V),X.tC=z("textfont.textcase",V),X.tE=z("textfont.lineposition",V),X.tS=z("textfont.shadow",V)),j=[xi.minExtend(O,X)],H=xi.minExtend(U,K),H.selectedpoints=null,H.texttemplate=null}var xe=Li.select(this).select("g.legendpoints"),se=xe.selectAll("path.scatterpts").data(q?j:[]);se.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),se.exit().remove(),se.call(zi.pointStyle,H,t),q&&(j[0].mrc=3);var be=xe.selectAll("g.pointtext").data($?j:[]);be.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),be.exit().remove(),be.selectAll("text").call(zi.textPointStyle,H,t)}function h(M){var k=M[0].trace,D=k.type==="waterfall";if(M[0]._distinct&&D){var P=M[0].trace[M[0].dir].marker;return M[0].mc=P.color,M[0].mlw=P.line.width,M[0].mlc=P.line.color,g(M,this,"waterfall")}var N=[];k.visible&&D&&(N=M[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=Li.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(N);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(O){var U=Li.select(this),$=k[O[0]].marker,j=u(void 0,$.line,R0,Rc);U.attr("d",O[1]).style("stroke-width",j+"px").call(Go.fill,$.color),j&&U.call(Go.stroke,$.line.color)})}function d(M){g(M,this)}function p(M){g(M,this,"funnel")}function g(M,k,D){var P=M[0].trace,N=P.marker||{},q=N.line||{},O=N.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",U=D?P.visible&&P.type===D:Fw.traceIs(P,"bar"),$=Li.select(k).select("g.legendpoints").selectAll("path.legend"+D).data(U?[M]:[]);$.enter().append("path").classed("legend"+D,!0).attr("d",O).attr("transform",s),$.exit().remove(),$.each(function(j){var H=Li.select(this),z=j[0],V=u(z.mlw,N.line,R0,Rc);H.style("stroke-width",V+"px");var X=z.mcc;if(!a._inHover&&"mc"in z){var K=Rw(N),ve=K.mid;ve===void 0&&(ve=(K.max+K.min)/2),X=zi.tryColorscale(N,"")(ve)}var xe=X||z.mc||N.color,se=N.pattern,be=se&&zi.getPatternAttr(se.shape,0,"");if(be){var re=zi.getPatternAttr(se.bgcolor,0,null),ke=zi.getPatternAttr(se.fgcolor,0,null),ge=se.fgopacity,Ee=vF(se.size,8,10),De=vF(se.solidity,.5,1),Ce="legend-"+P.uid;H.call(zi.pattern,"legend",t,Ce,be,Ee,De,X,se.fillmode,re,ke,ge)}else H.call(Go.fill,xe);V&&Go.stroke(H,z.mlc||q.color)})}function m(M){var k=M[0].trace,D=Li.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&Fw.traceIs(k,"box-violin")?[M]:[]);D.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.each(function(){var P=Li.select(this);if((k.boxpoints==="all"||k.points==="all")&&Go.opacity(k.fillcolor)===0&&Go.opacity((k.line||{}).color)===0){var N=xi.minExtend(k,{marker:{size:i?uF:xi.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});D.call(zi.pointStyle,N,t)}else{var q=u(void 0,k.line,R0,Rc);P.style("stroke-width",q+"px").call(Go.fill,k.fillcolor),q&&Go.stroke(P,k.line.color)}})}function b(M){var k=M[0].trace,D=Li.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(k.visible&&k.type==="candlestick"?[M,M]:[]);D.enter().append("path").classed("legendcandle",!0).attr("d",function(P,N){return N?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(P,N){var q=Li.select(this),O=k[N?"increasing":"decreasing"],U=u(void 0,O.line,R0,Rc);q.style("stroke-width",U+"px").call(Go.fill,O.fillcolor),U&&Go.stroke(q,O.line.color)})}function _(M){var k=M[0].trace,D=Li.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(k.visible&&k.type==="ohlc"?[M,M]:[]);D.enter().append("path").classed("legendohlc",!0).attr("d",function(P,N){return N?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(P,N){var q=Li.select(this),O=k[N?"increasing":"decreasing"],U=u(void 0,O.line,R0,Rc);q.style("fill","none").call(zi.dashLine,O.line.dash,U),U&&Go.stroke(q,O.line.color)})}function w(M){T(M,this,"pie")}function x(M){T(M,this,"funnelarea")}function T(M,k,D){var P=M[0],N=P.trace,q=D?N.visible&&N.type===D:Fw.traceIs(N,D),O=Li.select(k).select("g.legendpoints").selectAll("path.legend"+D).data(q?[M]:[]);if(O.enter().append("path").classed("legend"+D,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),O.exit().remove(),O.size()){var U=N.marker||{},$=u(lce(U.line.width,P.pts),U.line,R0,Rc),j="pieLike",H=xi.minExtend(N,{marker:{line:{width:$}}},j),z=xi.minExtend(P,{trace:H},j);oce(O,z,H,t)}}function S(M){var k=M[0].trace,D,P=[];if(k.visible)switch(k.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],D=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],D=!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"]],D="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"]],D=!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"]],D=!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"]],D=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!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"]],D=!1;break}var N=Li.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);N.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(q,O){var U=Li.select(this),$=Rw(k),j=$.colorscale,H=$.reversescale,z=function(ve){if(ve.size()){var xe="legendfill-"+k.uid;zi.gradient(ve,t,xe,Pw(H,D==="radial"),j,"fill")}},V;if(j){if(!D){var K=j.length;V=O===0?j[H?K-1:0][1]:O===1?j[H?0:K-1][1]:j[Math.floor((K-1)/2)][1]}}else{var X=k.vertexcolor||k.facecolor||k.color;V=xi.isArrayOrTypedArray(X)?X[O]||X[0]:X}U.attr("d",q[0]),V?U.call(Go.fill,V):U.call(z)})}};function Pw(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function cF(e){var r=e[0].trace,t=r.contours,a=m2.hasLines(r),n=m2.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",o=!1,l=!1;if(t){var s=t.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:i||l}}function vF(e,r,t){return e&&xi.isArrayOrTypedArray(e)?r:e>t?t:e}});var Bw=R((NCe,AF)=>{"use strict";var lo=ta(),Tn=fr(),Ow=jn(),I0=Ct(),dF=u1(),Iw=xl(),Mn=Ca(),g2=Qt(),Pc=Ci(),pF=Jq(),In=Lw(),zw=ki(),_F=zw.LINE_SPACING,N0=zw.FROM_TL,mF=zw.FROM_BR,yF=eF(),fce=Nw(),gF=d2(),P0=1,cce=/^legend[0-9]*$/;AF.exports=function(r,t){if(t)bF(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=lo.select(this),f=u.attr("class"),c=f.split(" ")[0];c.match(cce)&&n.indexOf(c)===-1&&u.remove()});for(var o=0;o1)}var p=a.hiddenlabels||[];if(!l&&(!a.showlegend||!s.length))return o.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),Ow.autoMargin(e,n);var g=Tn.ensureSingle(o,"g",n,function(k){l||k.attr("pointer-events","all")}),m=Tn.ensureSingleById(a._topdefs,"clipPath",i,function(k){k.append("rect")}),b=Tn.ensureSingle(g,"rect","bg",function(k){k.attr("shape-rendering","crispEdges")});b.call(g2.stroke,t.bordercolor).call(g2.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var _=Tn.ensureSingle(g,"g","scrollbox"),w=t.title;t._titleWidth=0,t._titleHeight=0;var x;w.text?(x=Tn.ensureSingle(_,"text",n+"titletext"),x.attr("text-anchor","start").call(Mn.font,w.font).text(w.text),b2(x,_,e,t,P0)):_.selectAll("."+n+"titletext").remove();var T=Tn.ensureSingle(g,"rect","scrollbar",function(k){k.attr(In.scrollBarEnterAttrs).call(g2.fill,In.scrollBarColor)}),S=_.selectAll("g.groups").data(s);S.enter().append("g").attr("class","groups"),S.exit().remove();var M=S.selectAll("g.traces").data(Tn.identity);M.enter().append("g").attr("class","traces"),M.exit().remove(),M.style("opacity",function(k){var D=k[0].trace;return I0.traceIs(D,"pie-like")?p.indexOf(k[0].label)!==-1?.5:1:D.visible==="legendonly"?.5:1}).each(function(){lo.select(this).call(hce,e,t)}).call(fce,e,t).each(function(){l||lo.select(this).call(dce,e,n)}),Tn.syncOrAsync([Ow.previousPromises,function(){return yce(e,S,M,t)},function(){var k=a._size,D=t.borderwidth,P=t.xref==="paper",N=t.yref==="paper";if(w.text&&vce(x,t,D),!l){var q,O;P?q=k.l+k.w*t.x-N0[x2(t)]*t._width:q=a.width*t.x-N0[x2(t)]*t._width,N?O=k.t+k.h*(1-t.y)-N0[_2(t)]*t._effHeight:O=a.height*(1-t.y)-N0[_2(t)]*t._effHeight;var U=gce(e,n,q,O);if(U)return;if(a.margin.autoexpand){var $=q,j=O;q=P?Tn.constrain(q,0,a.width-t._width):$,O=N?Tn.constrain(O,0,a.height-t._effHeight):j,q!==$&&Tn.log("Constrain "+n+".x to make legend fit inside graph"),O!==j&&Tn.log("Constrain "+n+".y to make legend fit inside graph")}Mn.setTranslate(g,q,O)}if(T.on(".drag",null),g.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var H=t._effHeight;l&&(H=t._height),b.attr({width:t._width-D,height:H-D,x:D/2,y:D/2}),Mn.setTranslate(_,0,0),m.select("rect").attr({width:t._width-2*D,height:H-2*D,x:D,y:D}),Mn.setClipUrl(_,i,e),Mn.setRect(T,0,0,0,0),delete t._scrollY}else{var z=Math.max(In.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),V=t._effHeight-z-2*In.scrollBarMargin,X=t._height-t._effHeight,K=V/X,ve=Math.min(t._scrollY||0,X);b.attr({width:t._width-2*D+In.scrollBarWidth+In.scrollBarMargin,height:t._effHeight-D,x:D/2,y:D/2}),m.select("rect").attr({width:t._width-2*D+In.scrollBarWidth+In.scrollBarMargin,height:t._effHeight-2*D,x:D,y:D+ve}),Mn.setClipUrl(_,i,e),De(ve,z,K),g.on("wheel",function(){ve=Tn.constrain(t._scrollY+lo.event.deltaY/V*X,0,X),De(ve,z,K),ve!==0&&ve!==X&&lo.event.preventDefault()});var xe,se,be,re=function(Te,Pe,Ne){var lr=(Ne-Pe)/K+Te;return Tn.constrain(lr,0,X)},ke=function(Te,Pe,Ne){var lr=(Pe-Ne)/K+Te;return Tn.constrain(lr,0,X)},ge=lo.behavior.drag().on("dragstart",function(){var Te=lo.event.sourceEvent;Te.type==="touchstart"?xe=Te.changedTouches[0].clientY:xe=Te.clientY,be=ve}).on("drag",function(){var Te=lo.event.sourceEvent;Te.buttons===2||Te.ctrlKey||(Te.type==="touchmove"?se=Te.changedTouches[0].clientY:se=Te.clientY,ve=re(be,xe,se),De(ve,z,K))});T.call(ge);var Ee=lo.behavior.drag().on("dragstart",function(){var Te=lo.event.sourceEvent;Te.type==="touchstart"&&(xe=Te.changedTouches[0].clientY,be=ve)}).on("drag",function(){var Te=lo.event.sourceEvent;Te.type==="touchmove"&&(se=Te.changedTouches[0].clientY,ve=ke(be,xe,se),De(ve,z,K))});_.call(Ee)}function De(Te,Pe,Ne){t._scrollY=e._fullLayout[n]._scrollY=Te,Mn.setTranslate(_,0,-Te),Mn.setRect(T,t._width,In.scrollBarMargin+Te*Ne,In.scrollBarWidth,Pe),m.select("rect").attr("y",D+Te)}if(e._context.edits.legendPosition){var Ce,Y,ae,Z;g.classed("cursor-move",!0),Iw.init({element:g.node(),gd:e,prepFn:function(Te){if(Te.target!==T.node()){var Pe=Mn.getTranslate(g);ae=Pe.x,Z=Pe.y}},moveFn:function(Te,Pe){if(ae!==void 0&&Z!==void 0){var Ne=ae+Te,lr=Z+Pe;Mn.setTranslate(g,Ne,lr),Ce=Iw.align(Ne,t._width,k.l,k.l+k.w,t.xanchor),Y=Iw.align(lr+t._height,-t._height,k.t+k.h,k.t,t.yanchor)}},doneFn:function(){if(Ce!==void 0&&Y!==void 0){var Te={};Te[n+".x"]=Ce,Te[n+".y"]=Y,I0.call("_guiRelayout",e,Te)}},clickFn:function(Te,Pe){var Ne=o.selectAll("g.traces").filter(function(){var lr=this.getBoundingClientRect();return Pe.clientX>=lr.left&&Pe.clientX<=lr.right&&Pe.clientY>=lr.top&&Pe.clientY<=lr.bottom});Ne.size()>0&&wF(e,g,Ne,Te,Pe)}})}}],e)}}function y2(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,o=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*o:t+(o||n)}function wF(e,r,t,a,n){var i=t.data()[0][0].trace,o={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(o.group=i._group),I0.traceIs(i,"pie-like")&&(o.label=t.datum()[0].label);var l=dF.triggerHandler(e,"plotly_legendclick",o);if(a===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&pF(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=dF.triggerHandler(e,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&pF(t,e,a)}}function hce(e,r,t){var a=w2(t),n=e.data()[0][0],i=n.trace,o=I0.traceIs(i,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!o,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=o?n.label:i.name,i._meta&&(u=Tn.templateString(u,i._meta))));var c=Tn.ensureSingle(e,"text",a+"text");c.attr("text-anchor","start").call(Mn.font,f).text(l?xF(u,s):u);var h=t.indentation+t.itemwidth+In.itemGap*2;Pc.positionText(c,h,0),l?c.call(Pc.makeEditable,{gd:r,text:u}).call(b2,e,r,t).on("edit",function(d){this.text(xF(d,s)).call(b2,e,r,t);var p=n.trace._fullInput||{},g={};return g.name=d,p._isShape?I0.call("_guiRelayout",r,"shapes["+i.index+"].name",g.name):I0.call("_guiRestyle",r,g,i.index)}):b2(c,e,r,t)}function xF(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function dce(e,r,t){var a=r._context.doubleClickDelay,n,i=1,o=Tn.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(g2.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),wF(r,l,e,i,lo.event)}}))}function b2(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),Pc.convertToTspans(e,t,function(){pce(r,t,a,n)})}function pce(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),o=i.node(),l=w2(t);t||(t=r._fullLayout[l]);var s=t.borderwidth,u;a===P0?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*_F,c,h;if(o){var d=Mn.bBox(o);c=d.height,h=d.width,a===P0?Mn.setTranslate(i,s,s+c*.75):Mn.setTranslate(i,0,c*.25)}else{var p="."+l+(a===P0?"title":"")+"text",g=e.select(p),m=Pc.lineCount(g),b=g.node();if(c=f*m,h=b?Mn.bBox(b).width:0,a===P0)t.title.side==="left"&&(h+=In.itemGap*2),Pc.positionText(g,s+In.titlePad,s+f);else{var _=In.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(_=In.itemGap,h-=t.indentation+t.itemwidth),Pc.positionText(g,_,-f*((m-1)/2-.3))}}a===P0?(t._titleWidth=h,t._titleHeight=c):(n.lineHeight=f,n.height=Math.max(c,16)+3,n.width=h)}function mce(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function yce(e,r,t,a){var n=e._fullLayout,i=w2(a);a||(a=n[i]);var o=n._size,l=gF.isVertical(a),s=gF.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,h=In.itemGap,d=a.indentation+a.itemwidth+h*2,p=2*(f+h),g=_2(a),m=a.y<0||a.y===0&&g==="top",b=a.y>1||a.y===1&&g==="bottom",_=a.tracegroupgap,w={};a._maxHeight=Math.max(m||b?n.height/2:o.h,30);var x=0;a._width=0,a._height=0;var T=mce(a);if(l)t.each(function(be){var re=be[0].height;Mn.setTranslate(this,f+T[0],f+T[1]+a._height+re/2+h),a._height+=re,a._width=Math.max(a._width,be[0].width)}),x=d+a._width,a._width+=h+d+c,a._height+=p,s&&(r.each(function(be,re){Mn.setTranslate(this,0,re*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var S=x2(a),M=a.x<0||a.x===0&&S==="right",k=a.x>1||a.x===1&&S==="left",D=b||m,P=n.width/2;a._maxWidth=Math.max(M?D&&S==="left"?o.l+o.w:P:k?D&&S==="right"?o.r+o.w:P:o.w,2*d);var N=0,q=0;t.each(function(be){var re=y2(be,a,d);N=Math.max(N,re),q+=re}),x=null;var O=0;if(s){var U=0,$=0,j=0;r.each(function(){var be=0,re=0;lo.select(this).selectAll("g.traces").each(function(ge){var Ee=y2(ge,a,d),De=ge[0].height;Mn.setTranslate(this,T[0],T[1]+f+h+De/2+re),re+=De,be=Math.max(be,Ee),w[ge[0].trace.legendgroup]=be});var ke=be+h;$>0&&ke+f+$>a._maxWidth?(O=Math.max(O,$),$=0,j+=U+_,U=re):U=Math.max(U,re),Mn.setTranslate(this,$,j),$+=ke}),a._width=Math.max(O,$)+f,a._height=j+U+p}else{var H=t.size(),z=q+c+(H-1)*h=a._maxWidth&&(O=Math.max(O,ve),X=0,K+=V,a._height+=V,V=0),Mn.setTranslate(this,T[0]+f+X,T[1]+f+K+re/2+h),ve=X+ke+h,X+=ge,V=Math.max(V,re)}),z?(a._width=X+c,a._height=V+p):(a._width=Math.max(O,ve)+c,a._height+=V+p)}}a._width=Math.ceil(Math.max(a._width+T[0],a._titleWidth+2*(f+In.titlePad))),a._height=Math.ceil(Math.max(a._height+T[1],a._titleHeight+2*(f+In.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var xe=e._context.edits,se=xe.legendText||xe.legendPosition;t.each(function(be){var re=lo.select(this).select("."+i+"toggle"),ke=be[0].height,ge=be[0].trace.legendgroup,Ee=y2(be,a,d);s&&ge!==""&&(Ee=w[ge]);var De=se?d:x||Ee;!l&&!u&&(De+=h/2),Mn.setRect(re,0,-ke/2,De,ke)})}function gce(e,r,t,a){var n=e._fullLayout,i=n[r],o=x2(i),l=_2(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",c=i.x<.5?"l":"r",h={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return Ow.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*N0[o],r:i._width*mF[o],b:i._effHeight*mF[l],t:i._effHeight*N0[l]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][c]=h[c]:e._fullLayout._reservedMargin[r][f]=h[f]}function x2(e){return Tn.isRightAnchor(e)?"right":Tn.isCenterAnchor(e)?"center":"left"}function _2(e){return Tn.isBottomAnchor(e)?"bottom":Tn.isMiddleAnchor(e)?"middle":"top"}function w2(e){return e._id||"legend"}});var Vw=R(Hw=>{"use strict";var Nc=ta(),Zs=ia(),TF=vl(),ln=fr(),bce=ln.pushUnique,Uw=ln.strTranslate,xce=ln.strRotate,_ce=u1(),Ho=Ci(),wce=Wq(),os=Ca(),Zn=Qt(),A2=xl(),ls=Va(),Ace=ai().zindexSeparator,z0=Ct(),_l=js(),Ic=Qd(),Tce=kw(),Mce=Bw(),qF=Ic.YANGLE,Gw=Math.PI*qF/180,Sce=1/Math.sin(Gw),kce=Math.cos(Gw),Cce=Math.sin(Gw),Wa=Ic.HOVERARROWSIZE,Kt=Ic.HOVERTEXTPAD,MF={box:!0,ohlc:!0,violin:!0,candlestick:!0},Ece={scatter:!0,scattergl:!0,splom:!0};function SF(e,r){return e.distance-r.distance}Hw.hover=function(r,t,a,n){r=ln.getGraphDiv(r);var i=t.target;ln.throttle(r._fullLayout._uid+Ic.HOVERID,Ic.HOVERMINTIME,function(){Lce(r,t,a,n,i)})};Hw.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=IF(n),o=OF(n),l=r.map(function(m){var b=m._x0||m.x0||m.x||0,_=m._x1||m.x1||m.x||0,w=m._y0||m.y0||m.y||0,x=m._y1||m.y1||m.y||0,T=m.eventData;if(T){var S=Math.min(b,_),M=Math.max(b,_),k=Math.min(w,x),D=Math.max(w,x),P=m.trace;if(z0.traceIs(P,"gl3d")){var N=n._fullLayout[P.scene]._scene.container,q=N.offsetLeft,O=N.offsetTop;S+=q,M+=q,k+=O,D+=O}T.bbox={x0:S+o,x1:M+o,y0:k+i,y1:D+i},t.inOut_bbox&&t.inOut_bbox.push(T.bbox)}else T=!1;return{color:m.color||Zn.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:T}}),s=!1,u=RF(l,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||Zn.background,container:Nc.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,c=5,h=0,d=0;f.sort(function(m,b){return m.y0-b.y0}).each(function(m,b){var _=m.y0-m.by/2;_-cM[0]._length||Z<0||Z>k[0]._length)return A2.unhoverRaw(e,r)}if(r.pointerX=ae+M[0]._offset,r.pointerY=Z+k[0]._offset,"xval"in r?j=_l.flat(i,r.xval):j=_l.p2c(M,ae),"yval"in r?H=_l.flat(i,r.yval):H=_l.p2c(k,Z),!Zs(j[0])||!Zs(H[0]))return ln.warn("Fx.hover failed",r,e),A2.unhoverRaw(e,r)}var Ne=1/0;function lr(_t,Ma){for(V=0;V<$.length;V++)if(X=$[V],!(!X||!X[0]||!X[0].trace)&&(K=X[0].trace,!(K.visible!==!0||K._length===0)&&["carpet","contourcarpet"].indexOf(K._module.name)===-1)){if(se=h,_l.isUnifiedHover(se)&&(se=se.charAt(0)),K.type==="splom"?(xe=0,ve=i[xe]):(ve=_l.getSubplot(K),xe=i.indexOf(ve)),ke={cd:X,trace:K,xa:M[xe],ya:k[xe],maxHoverDistance:q,maxSpikeDistance:O,index:!1,distance:Math.min(Ne,q),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:Zn.defaultLine,name:K.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},l[ve]&&(ke.subplot=l[ve]._subplot),l._splomScenes&&l._splomScenes[K.uid]&&(ke.scene=l._splomScenes[K.uid]),se==="array"){var ra=r[V];"pointNumber"in ra?(ke.index=ra.pointNumber,se="closest"):(se="","xval"in ra&&(be=ra.xval,se="x"),"yval"in ra&&(re=ra.yval,se=se?"closest":"y"))}else _t!==void 0&&Ma!==void 0?(be=_t,re=Ma):(be=j[xe],re=H[xe]);if(ge=U.length,q!==0)if(K._module&&K._module.hoverPoints){var Pa=K._module.hoverPoints(ke,be,re,se,{finiteRange:!0,hoverLayer:l._hoverlayer,hoversubplots:s,gd:e});if(Pa)for(var Xa,Sa=0;Sage&&(U.splice(0,ge),Ne=U[0].distance),c&&O!==0&&U.length===0){ke.distance=O,ke.index=!1;var La=K._module.hoverPoints(ke,be,re,"closest",{hoverLayer:l._hoverlayer});if(La&&(La=La.filter(function(Aa){return Aa.spikeDistance<=O})),La&&La.length){var en,on=La.filter(function(Aa){return Aa.xa.showspikes&&Aa.xa.spikesnap!=="hovered data"});if(on.length){var Yi=on[0];Zs(Yi.x0)&&Zs(Yi.y0)&&(en=Je(Yi),(!Ee.vLinePoint||Ee.vLinePoint.spikeDistance>en.spikeDistance)&&(Ee.vLinePoint=en))}var Wi=La.filter(function(Aa){return Aa.ya.showspikes&&Aa.ya.spikesnap!=="hovered data"});if(Wi.length){var xn=Wi[0];Zs(xn.x0)&&Zs(xn.y0)&&(en=Je(xn),(!Ee.hLinePoint||Ee.hLinePoint.spikeDistance>en.spikeDistance)&&(Ee.hLinePoint=en))}}}}}lr();function Ke(_t,Ma,ra){for(var Pa=null,Xa=1/0,Sa,La=0;La<_t.length;La++)g&&g._id!==_t[La].xa._id||m&&m._id!==_t[La].ya._id||(Sa=_t[La].spikeDistance,ra&&La===0&&(Sa=-1/0),Sa<=Xa&&Sa<=Ma&&(Pa=_t[La],Xa=Sa));return Pa}function Je(_t){return _t?{xa:_t.xa,ya:_t.ya,x:_t.xSpike!==void 0?_t.xSpike:(_t.x0+_t.x1)/2,y:_t.ySpike!==void 0?_t.ySpike:(_t.y0+_t.y1)/2,distance:_t.distance,spikeDistance:_t.spikeDistance,curveNumber:_t.trace.index,color:_t.color,pointNumber:_t.index}:null}var or={fullLayout:l,container:l._hoverlayer,event:r},yr=e._spikepoints,ir={vLinePoint:Ee.vLinePoint,hLinePoint:Ee.hLinePoint};e._spikepoints=ir;var Xe=function(){var _t=U.filter(function(ra){return g&&g._id===ra.xa._id&&m&&m._id===ra.ya._id}),Ma=U.filter(function(ra){return!(g&&g._id===ra.xa._id&&m&&m._id===ra.ya._id)});_t.sort(SF),Ma.sort(SF),U=_t.concat(Ma),U=Nce(U,h)};Xe();var Lr=h.charAt(0),Ar=(Lr==="x"||Lr==="y")&&U[0]&&Ece[U[0].trace.type];if(c&&O!==0&&U.length!==0){var de=U.filter(function(_t){return _t.ya.showspikes}),Oe=Ke(de,O,Ar);Ee.hLinePoint=Je(Oe);var Ue=U.filter(function(_t){return _t.xa.showspikes}),rt=Ke(Ue,O,Ar);Ee.vLinePoint=Je(rt)}if(U.length===0){var Ur=A2.unhoverRaw(e,r);return c&&(Ee.hLinePoint!==null||Ee.vLinePoint!==null)&&EF(yr)&&CF(e,Ee,or),Ur}if(c&&EF(yr)&&CF(e,Ee,or),_l.isXYhover(se)&&U[0].length!==0&&U[0].trace.type!=="splom"){var Ye=U[0];MF[Ye.trace.type]?U=U.filter(function(_t){return _t.trace.index===Ye.trace.index}):U=[Ye];var Ve=U.length,pr=DF("x",Ye,l),Tr=DF("y",Ye,l);lr(pr,Tr);var mr=[],vr={},Cr=0,Ir=function(_t){var Ma=MF[_t.trace.type]?FF(_t):_t.trace.index;if(!vr[Ma])Cr++,vr[Ma]=Cr,mr.push(_t);else{var ra=vr[Ma]-1,Pa=mr[ra];ra>0&&Math.abs(_t.distance)Ve-1;Gr--)Ir(U[Gr]);U=mr,Xe()}var Ze=e._hoverdata,oe=[],ye=IF(e),Ge=OF(e);for(z=0;z1||U.length>1)||h==="closest"&&De&&U.length>1,Vi=Zn.combine(l.plot_bgcolor||Zn.background,l.paper_bgcolor),Bn=RF(U,{gd:e,hovermode:h,rotateLabels:Dn,bgColor:Vi,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),qn=Bn.hoverLabels;if(_l.isUnifiedHover(h)||(qce(qn,Dn,l,Bn.commonLabelBoundingBox),NF(qn,Dn,l._invScaleX,l._invScaleY)),n&&n.tagName){var yi=z0.getComponentMethod("annotations","hasClickToShow")(e,oe);wce(Nc.select(n),yi?"pointer":"")}!n||a||!Pce(e,r,Ze)||(Ze&&e.emit("plotly_unhover",{event:r,points:Ze}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:M,yaxes:k,xvals:j,yvals:H}))}function FF(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 Dce=/([\s\S]*)<\/extra>/;function RF(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,o=r.bgColor,l=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||Ic.HOVERFONT,c=r.fontSize||Ic.HOVERFONTSIZE,h=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,p=r.fontVariant||a.font.variant,g=r.fontTextcase||a.font.textcase,m=r.fontLineposition||a.font.lineposition,b=r.fontShadow||a.font.shadow,_=e[0],w=_.xa,x=_.ya,T=n.charAt(0),S=T+"Label",M=_[S];if(M===void 0&&w.type==="multicategory")for(var k=0;ka.width-Ze&&(oe=a.width-Ze),rt.attr("d","M"+(Cr-oe)+",0L"+(Cr-oe+Wa)+","+Gr+Wa+"H"+Ze+"v"+Gr+(Kt*2+vr.height)+"H"+-Ze+"V"+Gr+Wa+"H"+(Cr-oe-Wa)+"Z"),Cr=oe,V.minX=Cr-Ze,V.maxX=Cr+Ze,w.side==="top"?(V.minY=Ir-(Kt*2+vr.height),V.maxY=Ir-Kt):(V.minY=Ir+Kt,V.maxY=Ir+(Kt*2+vr.height))}else{var ye,Ge,Ie;x.side==="right"?(ye="start",Ge=1,Ie="",Cr=w._offset+w._length):(ye="end",Ge=-1,Ie="-",Cr=w._offset),Ir=x._offset+(_.y0+_.y1)/2,Ur.attr("text-anchor",ye),rt.attr("d","M0,0L"+Ie+Wa+","+Wa+"V"+(Kt+vr.height/2)+"h"+Ie+(Kt*2+vr.width)+"V-"+(Kt+vr.height/2)+"H"+Ie+Wa+"V-"+Wa+"Z"),V.minY=Ir-(Kt+vr.height/2),V.maxY=Ir+(Kt+vr.height/2),x.side==="right"?(V.minX=Cr+Wa,V.maxX=Cr+Wa+(Kt*2+vr.width)):(V.minX=Cr-Wa-(Kt*2+vr.width),V.maxX=Cr-Wa);var Wr=vr.height/2,tt=P-vr.top-Wr,$r="clip"+a._uid+"commonlabel"+x._id,St;if(Cr=0?Ar=yr:ir+Z=0?Ar=ir:Xe+Z=0?de=Je:or+Te=0?de=or:Lr+Te=0,(Ue.idealAlign==="top"||!aa)&&Qa?(Ie-=tt/2,Ue.anchor="end"):aa?(Ie+=tt/2,Ue.anchor="start"):Ue.anchor="middle",Ue.crossPos=Ie;else{if(Ue.pos=Ie,aa=Ge+Wr/2+ma<=N,Qa=Ge-Wr/2-ma>=0,(Ue.idealAlign==="left"||!aa)&&Qa)Ge-=Wr/2,Ue.anchor="end";else if(aa)Ge+=Wr/2,Ue.anchor="start";else{Ue.anchor="middle";var Ln=ma/2,si=Ge+Ln-N,Dn=Ge-Ln;si>0&&(Ge-=si),Dn<0&&(Ge+=-Dn)}Ue.crossPos=Ge}Ir.attr("text-anchor",Ue.anchor),Ze&&Gr.attr("text-anchor",Ue.anchor),rt.attr("transform",Uw(Ge,Ie)+(i?xce(qF):""))}),{hoverLabels:Oe,commonLabelBoundingBox:V}}function kF(e,r,t,a,n,i){var o="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=ln.templateString(e.name,e.trace._meta)),o=LF(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?l=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),i&&l===""&&!e.hovertemplate&&(o===""&&i.remove(),l=o);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(c[s+"other"]=c[s+"Val"],c[s+"otherLabel"]=c[s+"Label"]),l=ln.hovertemplateString(f,c,a._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(Dce,function(h,d){return o=LF(d,e.nameLength),""})}return[l,o]}function qce(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",o=0,l=1,s=e.size(),u=new Array(s),f=0,c=a.minX,h=a.maxX,d=a.minY,p=a.maxY,g=function(j){return j*t._invScaleX},m=function(j){return j*t._invScaleY};e.each(function(j){var H=j[n],z=j[i],V=H._id.charAt(0)==="x",X=H.range;f===0&&X&&X[0]>X[1]!==V&&(l=-1);var K=0,ve=V?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var xe=PF(j,r),se=j.anchor,be=se==="end"?-1:1,re,ke;if(se==="middle")re=j.crossPos+(V?m(xe.y-j.by/2):g(j.bx/2+j.tx2width/2)),ke=re+(V?m(j.by):g(j.bx));else if(V)re=j.crossPos+m(Wa+xe.y)-m(j.by/2-Wa),ke=re+m(j.by);else{var ge=g(be*Wa+xe.x),Ee=ge+g(be*j.bx);re=j.crossPos+Math.min(ge,Ee),ke=j.crossPos+Math.max(ge,Ee)}V?d!==void 0&&p!==void 0&&Math.min(ke,p)-Math.max(re,d)>1&&(z.side==="left"?(K=z._mainLinePosition,ve=t.width):ve=z._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ke,h)-Math.max(re,c)>1&&(z.side==="top"?(K=z._mainLinePosition,ve=t.height):ve=z._mainLinePosition)}u[f++]=[{datum:j,traceIndex:j.trace.index,dp:0,pos:j.pos,posref:j.posref,size:j.by*(V?Sce:1)/2,pmin:K,pmax:ve}]}),u.sort(function(j,H){return j[0].posref-H[0].posref||l*(H[0].traceIndex-j[0].traceIndex)});var b,_,w,x,T,S,M;function k(j){var H=j[0],z=j[j.length-1];if(_=H.pmin-H.pos-H.dp+H.size,w=z.pos+z.dp+z.size-H.pmax,_>.01){for(T=j.length-1;T>=0;T--)j[T].dp+=_;b=!1}if(!(w<.01)){if(_<-.01){for(T=j.length-1;T>=0;T--)j[T].dp-=w;b=!1}if(b){var V=0;for(x=0;xH.pmax&&V++;for(x=j.length-1;x>=0&&!(V<=0);x--)S=j[x],S.pos>H.pmax-1&&(S.del=!0,V--);for(x=0;x=0;T--)j[T].dp-=w;for(x=j.length-1;x>=0&&!(V<=0);x--)S=j[x],S.pos+S.dp+S.size>H.pmax&&(S.del=!0,V--)}}}for(;!b&&o<=s;){for(o++,b=!0,x=0;x.01){for(T=P.length-1;T>=0;T--)P[T].dp+=_;for(D.push.apply(D,P),u.splice(x+1,1),M=0,T=D.length-1;T>=0;T--)M+=D[T].dp;for(w=M/D.length,T=D.length-1;T>=0;T--)D[T].dp-=w;b=!1}else x++}u.forEach(k)}for(x=u.length-1;x>=0;x--){var O=u[x];for(T=O.length-1;T>=0;T--){var U=O[T],$=U.datum;$.offset=U.dp,$.del=U.del}}}function PF(e,r){var t=0,a=e.offset;return r&&(a*=-Cce,t=e.offset*kce),{x:t,y:a}}function Fce(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Wa+Kt),a=t+r*(e.txwidth+Kt),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Kt),{alignShift:r,textShiftX:t,text2ShiftX:a}}function NF(e,r,t,a){var n=function(o){return o*t},i=function(o){return o*a};e.each(function(o){var l=Nc.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),u=o.anchor,f=u==="end"?-1:1,c=Fce(o),h=PF(o,r),d=h.x,p=h.y,g=u==="middle";l.select("path").attr("d",g?"M-"+n(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+n(o.bx)+"v"+i(o.by)+"h-"+n(o.bx)+"Z":"M0,0L"+n(f*Wa+d)+","+i(Wa+p)+"v"+i(o.by/2-Wa)+"h"+n(f*o.bx)+"v-"+i(o.by)+"H"+n(f*Wa+d)+"V"+i(p-Wa)+"Z");var m=d+c.textShiftX,b=p+o.ty0-o.by/2+Kt,_=o.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(s.attr("text-anchor","start"),m=g?-o.bx/2-o.tx2width/2+Kt:-o.bx-Kt):_==="right"&&u!=="end"&&(s.attr("text-anchor","end"),m=g?o.bx/2-o.tx2width/2-Kt:o.bx+Kt)),s.call(Ho.positionText,n(m),i(b)),o.tx2width&&(l.select("text.name").call(Ho.positionText,n(c.text2ShiftX+c.alignShift*Kt+d),i(p+o.ty0-o.by/2+Kt)),l.select("rect").call(os.setRect,n(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),i(p-o.by/2-1),n(o.tx2width),i(o.by+2)))})}function Rce(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function o(h){return h||Zs(h)&&h===0}var l=Array.isArray(t)?function(h,d){var p=ln.castOption(n,t,h);return o(p)?p:ln.extractOption({},a,"",d)}:function(h,d){return ln.extractOption(i,a,h,d)};function s(h,d,p){var g=l(d,p);o(g)&&(e[h]=g)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=ln.constrain(e.x0,0,e.xa._length),e.x1=ln.constrain(e.x1,0,e.xa._length),e.y0=ln.constrain(e.y0,0,e.ya._length),e.y1=ln.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:ls.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:ls.hoverLabelText(e.ya,e.yLabelVal,a.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=ls.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+ls.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=ls.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+ls.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function CF(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,o=t.event,l=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||l)){var c=Zn.combine(n.plot_bgcolor,n.paper_bgcolor);if(l){var h=r.hLinePoint,d,p;u=h&&h.xa,f=h&&h.ya;var g=f.spikesnap;g==="cursor"?(d=o.pointerX,p=o.pointerY):(d=u._offset+h.x,p=f._offset+h.y);var m=TF.readability(h.color,c)<1.5?Zn.contrast(c):h.color,b=f.spikemode,_=f.spikethickness,w=f.spikecolor||m,x=ls.getPxPosition(e,f),T,S;if(b.indexOf("toaxis")!==-1||b.indexOf("across")!==-1){if(b.indexOf("toaxis")!==-1&&(T=x,S=d),b.indexOf("across")!==-1){var M=f._counterDomainMin,k=f._counterDomainMax;f.anchor==="free"&&(M=Math.min(M,f.position),k=Math.max(k,f.position)),T=i.l+M*i.w,S=i.l+k*i.w}a.insert("line",":first-child").attr({x1:T,x2:S,y1:p,y2:p,"stroke-width":_,stroke:w,"stroke-dasharray":os.dashStyle(f.spikedash,_)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:T,x2:S,y1:p,y2:p,"stroke-width":_+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}b.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:x+(f.side!=="right"?_:-_),cy:p,r:_,fill:w}).classed("spikeline",!0)}if(s){var D=r.vLinePoint,P,N;u=D&&D.xa,f=D&&D.ya;var q=u.spikesnap;q==="cursor"?(P=o.pointerX,N=o.pointerY):(P=u._offset+D.x,N=f._offset+D.y);var O=TF.readability(D.color,c)<1.5?Zn.contrast(c):D.color,U=u.spikemode,$=u.spikethickness,j=u.spikecolor||O,H=ls.getPxPosition(e,u),z,V;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(z=H,V=N),U.indexOf("across")!==-1){var X=u._counterDomainMin,K=u._counterDomainMax;u.anchor==="free"&&(X=Math.min(X,u.position),K=Math.max(K,u.position)),z=i.t+(1-K)*i.h,V=i.t+(1-X)*i.h}a.insert("line",":first-child").attr({x1:P,x2:P,y1:z,y2:V,"stroke-width":$,stroke:j,"stroke-dasharray":os.dashStyle(u.spikedash,$)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:P,x2:P,y1:z,y2:V,"stroke-width":$+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:P,cy:H-(u.side!=="top"?$:-$),r:$,fill:j}).classed("spikeline",!0)}}}function Pce(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function EF(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function LF(e,r){return Ho.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Nce(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],o=0;o{"use strict";var Ice=fr(),Oce=Qt(),zce=js().isUnifiedHover;zF.exports=function(r,t,a,n){n=n||{};var i=t.legend;function o(l){n.font[l]||(n.font[l]=i?t.legend.font[l]:t.font[l])}t&&zce(t.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(n.bgcolor||(n.bgcolor=Oce.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),Ice.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var UF=R((zCe,BF)=>{"use strict";var Bce=fr(),Uce=T2(),Gce=r0();BF.exports=function(r,t){function a(n,i){return Bce.coerce(r,t,Gce,n,i)}Uce(r,t,a)}});var VF=R((BCe,HF)=>{"use strict";var GF=fr(),Hce=Xy(),Vce=T2();HF.exports=function(r,t,a,n){function i(l,s){return GF.coerce(r,t,Hce,l,s)}var o=GF.extendFlat({},n.hoverlabel);t.hovertemplate&&(o.namelength=-1),Vce(r,t,i,o)}});var Yw=R((UCe,YF)=>{"use strict";var Yce=fr(),Wce=r0();YF.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:Yce.coerce(r,t,Wce,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var XF=R((GCe,jF)=>{"use strict";var WF=fr(),jce=r0(),Xce=Yw(),Zce=T2();jF.exports=function(r,t){function a(f,c){return WF.coerce(r,t,jce,f,c)}var n=Xce(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var o=t._has("mapbox"),l=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((o||l||s)&&u===1||(o||l)&&s&&u===2)&&(t.dragmode="pan"),Zce(r,t,a),WF.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var $F=R((HCe,JF)=>{"use strict";var Ww=fr(),ZF=Ct();JF.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return Ww.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var $ce=Ct(),Kce=Vw().hover;KF.exports=function(r,t,a){var n=$ce.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&Kce(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var rf=R((YCe,tR)=>{"use strict";var Qce=ta(),M2=fr(),eve=xl(),L1=js(),eR=r0(),rR=Vw();tR.exports={moduleType:"component",name:"fx",constants:Qd(),schema:{layout:eR},attributes:Xy(),layoutAttributes:eR,supplyLayoutGlobalDefaults:UF(),supplyDefaults:VF(),supplyLayoutDefaults:XF(),calc:$F(),getDistanceFunction:L1.getDistanceFunction,getClosest:L1.getClosest,inbox:L1.inbox,quadrature:L1.quadrature,appendArrayPointValue:L1.appendArrayPointValue,castHoverOption:tve,castHoverinfo:ave,hover:rR.hover,unhover:eve.unhover,loneHover:rR.loneHover,loneUnhover:rve,click:QF()};function rve(e){var r=M2.isD3Selection(e)?e:Qce.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function tve(e,r,t){return M2.castOption(e,r,"hoverlabel."+t)}function ave(e,r,t){function a(n){return M2.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return M2.castOption(e,t,"hoverinfo",a)}});var tf=R(Js=>{"use strict";Js.selectMode=function(e){return e==="lasso"||e==="select"};Js.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Js.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Js.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Js.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Js.selectingOrDrawing=function(e){return Js.freeMode(e)||Js.rectMode(e)}});var S2=R((jCe,aR)=>{"use strict";aR.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var k2=R((XCe,nR)=>{"use strict";nR.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 E2=R((ZCe,iR)=>{"use strict";var C2=32;iR.exports={CIRCLE_SIDES:C2,i000:0,i090:C2/4,i180:C2/2,i270:C2/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var L2=R((JCe,lR)=>{"use strict";var nve=fr().strTranslate;function oR(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function ive(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function ove(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return oR(e,t[r])}}function lve(e){return nve(e.xaxis._offset,e.yaxis._offset)}lR.exports={p2r:oR,r2p:ive,axValue:ove,getTransform:lve}});var af=R($s=>{"use strict";var sve=y1(),fR=E2(),B0=fR.CIRCLE_SIDES,jw=fR.SQRT2,cR=L2(),sR=cR.p2r,uR=cR.r2p,uve=[0,3,4,5,6,1,2],fve=[0,3,4,1,2];$s.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var mR=tf(),cve=mR.drawMode,vve=mR.openMode,U0=E2(),vR=U0.i000,hR=U0.i090,dR=U0.i180,pR=U0.i270,hve=U0.cos45,dve=U0.sin45,yR=L2(),q2=yR.p2r,nf=yR.r2p,pve=Wu(),mve=pve.clearOutline,F2=af(),yve=F2.readPaths,gve=F2.writePaths,bve=F2.ellipseOver,xve=F2.fixDatesForPaths;function _ve(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,o=(a.layout||{}).shapes||[];if(!cve(i)&&n!==void 0){var l=a._fullLayout._activeShapeIndex;if(l{"use strict";var wve=tf(),Ave=wve.selectMode,Tve=Wu(),Mve=Tve.clearOutline,Xw=af(),Sve=Xw.readPaths,kve=Xw.writePaths,Cve=Xw.fixDatesForPaths;xR.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,o=i._fullLayout.newselection,l=t.plotinfo,s=l.xaxis,u=l.yaxis,f=t.isActiveSelection,c=t.dragmode,h=(i.layout||{}).selections||[];if(!Ave(c)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";_R.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 of=R(ii=>{"use strict";var Oc=q1(),wR=fr(),P2=Va();ii.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ii.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ii.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ii.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ii.extractPathCoords=function(e,r,t){var a=[],n=e.match(Oc.segmentRE);return n.forEach(function(i){var o=r[i.charAt(0)].drawn;if(o!==void 0){var l=i.substr(1).match(Oc.paramRE);if(!(!l||l.lengthd&&(g="X"),g});return u>d&&(p=p.replace(/[\s,]*X.*/,""),wR.log("Ignoring extra params in segment "+s)),f+p})}function F1(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var $w=R((tEe,SR)=>{"use strict";var Lve=fr(),G0=Va(),AR=Ci(),TR=Ca(),Dve=af().readPaths,Jw=of(),qve=Jw.getPathString,MR=ag(),Fve=ki().FROM_TL;SR.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var o={};if(a.type!=="path"){var l=G0.getFromId(r,a.xref),s=G0.getFromId(r,a.yref);for(var u in MR){var f=MR[u](a,l,s);f!==void 0&&(o[u]=f)}}i=Lve.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,o)}else i=a.label.text;var c={"data-index":t},h=a.label.font,d={"data-notex":1},p=n.append("g").attr(c).classed("shape-label",!0),g=p.append("text").attr(d).classed("shape-label-text",!0).text(i),m,b,_,w;if(a.path){var x=qve(r,a),T=Dve(x,r);m=1/0,_=1/0,b=-1/0,w=-1/0;for(var S=0;S=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function Pve(e,r,t,a,n,i,o){var l=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,c=Math.PI/180*i,h=Math.sin(c),d=Math.cos(c),p=n.label.xanchor,g=n.label.yanchor,m,b,_,w;if(f==="line"){l==="start"?(m=e,b=r):l==="end"?(m=t,b=a):(m=(e+t)/2,b=(r+a)/2),p==="auto"&&(l==="start"?s==="auto"?t>e?p="left":te?p="right":te?p="right":te?p="left":t{"use strict";var Nve=fr(),Ive=Nve.strTranslate,kR=xl(),LR=tf(),Ove=LR.drawMode,DR=LR.selectMode,qR=Ct(),CR=Qt(),I2=E2(),zve=I2.i000,Bve=I2.i090,Uve=I2.i180,Gve=I2.i270,Hve=Wu(),FR=Hve.clearOutlineControllers,Qw=af(),N2=Qw.pointsOnRectangle,Kw=Qw.pointsOnEllipse,Vve=Qw.writePaths,Yve=R2().newShapes,Wve=R2().createShapeObj,jve=Zw(),Xve=$w();RR.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function o(){e(r,t,a,n++),(Kw(r[0])||a.hasText)&&l({redrawing:!0})}function l(H){var z={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,z=Yve(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,z=jve(t,a),i._fullLayout._reselect=!0),Object.keys(z).length&&qR.call((H||{}).redrawing?"relayout":"_guiRelayout",i,z)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,c=Ove(f),h=DR(f);(c||h)&&(i._fullLayout._outlining=!0),FR(i),t.attr("d",Vve(r));var d,p,g,m,b;if(!n&&(a.isActiveShape||a.isActiveSelection)){b=Zve([],r);var _=u.append("g").attr("class","outline-controllers");P(_),j()}if(c&&a.hasText){var w=u.select(".label-temp"),x=Wve(t,a,a.dragmode);Xve(i,"label-temp",x,w)}function T(H){g=+H.srcElement.getAttribute("data-i"),m=+H.srcElement.getAttribute("data-j"),d[g][m].moveFn=S}function S(H,z){if(r.length){var V=b[g][m][1],X=b[g][m][2],K=r[g],ve=K.length;if(N2(K)){var xe=H,se=z;if(a.isActiveSelection){var be=ER(K,m);be[1]===K[m][1]?se=0:xe=0}for(var re=0;re1&&!(H.length===2&&H[1][0]==="Z")&&(m===0&&(H[0][0]="M"),r[g]=H,o(),l())}}function D(H,z){if(H===2){g=+z.srcElement.getAttribute("data-i"),m=+z.srcElement.getAttribute("data-j");var V=r[g];!N2(V)&&!Kw(V)&&k()}}function P(H){d=[];for(var z=0;z{"use strict";var $ve=ta(),BR=Ct(),PR=fr(),H0=Va(),Kve=af().readPaths,Qve=O2(),B2=$w(),UR=Wu().clearOutlineControllers,e6=Qt(),t6=Ca(),e0e=Da().arrayEditor,NR=xl(),IR=ef(),zc=q1(),so=of(),r6=so.getPathString;VR.exports={draw:a6,drawOne:GR,eraseActiveShape:a0e,drawLabel:B2};function a6(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;no&&yr>l&&!Ke.shiftKey?NR.getCursor(ir/or,1-Xe/yr):"move";IR(r,Lr),ke=Lr.split("-")[0]}}function Ce(Ke){z2(e)||(s&&(b=K(t.xanchor)),u&&(_=ve(t.yanchor)),t.type==="path"?N=t.path:(d=s?t.x0:K(t.x0),p=u?t.y0:ve(t.y0),g=s?t.x1:K(t.x1),m=u?t.y1:ve(t.y1)),dm?(w=p,M="y0",x=m,k="y1"):(w=m,M="y1",x=p,k="y0"),De(Ke),Pe(n,t),lr(r,t,e),re.moveFn=ke==="move"?Z:Te,re.altKey=Ke.altKey)}function Y(){z2(e)||(IR(r),Ne(n),HR(r,e,t),BR.call("_guiRelayout",e,i.getUpdateObj()))}function ae(){z2(e)||Ne(n)}function Z(Ke,Je){if(t.type==="path"){var or=function(Xe){return Xe},yr=or,ir=or;s?h("xanchor",t.xanchor=xe(b+Ke)):(yr=function(Lr){return xe(K(Lr)+Ke)},O&&O.type==="date"&&(yr=so.encodeDate(yr))),u?h("yanchor",t.yanchor=se(_+Je)):(ir=function(Lr){return se(ve(Lr)+Je)},$&&$.type==="date"&&(ir=so.encodeDate(ir))),h("path",t.path=OR(N,yr,ir))}else s?h("xanchor",t.xanchor=xe(b+Ke)):(h("x0",t.x0=xe(d+Ke)),h("x1",t.x1=xe(g+Ke))),u?h("yanchor",t.yanchor=se(_+Je)):(h("y0",t.y0=se(p+Je)),h("y1",t.y1=se(m+Je)));r.attr("d",r6(e,t)),Pe(n,t),B2(e,a,t,q)}function Te(Ke,Je){if(c){var or=function(vr){return vr},yr=or,ir=or;s?h("xanchor",t.xanchor=xe(b+Ke)):(yr=function(Cr){return xe(K(Cr)+Ke)},O&&O.type==="date"&&(yr=so.encodeDate(yr))),u?h("yanchor",t.yanchor=se(_+Je)):(ir=function(Cr){return se(ve(Cr)+Je)},$&&$.type==="date"&&(ir=so.encodeDate(ir))),h("path",t.path=OR(N,yr,ir))}else if(f){if(ke==="resize-over-start-point"){var Xe=d+Ke,Lr=u?p-Je:p+Je;h("x0",t.x0=s?Xe:xe(Xe)),h("y0",t.y0=u?Lr:se(Lr))}else if(ke==="resize-over-end-point"){var Ar=g+Ke,de=u?m-Je:m+Je;h("x1",t.x1=s?Ar:xe(Ar)),h("y1",t.y1=u?de:se(de))}}else{var Oe=function(vr){return ke.indexOf(vr)!==-1},Ue=Oe("n"),rt=Oe("s"),Ur=Oe("w"),Ye=Oe("e"),Ve=Ue?w+Je:w,pr=rt?x+Je:x,Tr=Ur?T+Ke:T,mr=Ye?S+Ke:S;u&&(Ue&&(Ve=w-Je),rt&&(pr=x-Je)),(!u&&pr-Ve>l||u&&Ve-pr>l)&&(h(M,t[M]=u?Ve:se(Ve)),h(k,t[k]=u?pr:se(pr))),mr-Tr>o&&(h(D,t[D]=s?Tr:xe(Tr)),h(P,t[P]=s?mr:xe(mr)))}r.attr("d",r6(e,t)),Pe(n,t),B2(e,a,t,q)}function Pe(Ke,Je){(s||u)&&or();function or(){var yr=Je.type!=="path",ir=Ke.selectAll(".visual-cue").data([0]),Xe=1;ir.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Xe}).classed("visual-cue",!0);var Lr=K(s?Je.xanchor:PR.midRange(yr?[Je.x0,Je.x1]:so.extractPathCoords(Je.path,zc.paramIsX))),Ar=ve(u?Je.yanchor:PR.midRange(yr?[Je.y0,Je.y1]:so.extractPathCoords(Je.path,zc.paramIsY)));if(Lr=so.roundPositionForSharpStrokeRendering(Lr,Xe),Ar=so.roundPositionForSharpStrokeRendering(Ar,Xe),s&&u){var de="M"+(Lr-1-Xe)+","+(Ar-1-Xe)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ir.attr("d",de)}else if(s){var Oe="M"+(Lr-1-Xe)+","+(Ar-9-Xe)+"v18 h2 v-18 Z";ir.attr("d",Oe)}else{var Ue="M"+(Lr-9-Xe)+","+(Ar-1-Xe)+"h18 v2 h-18 Z";ir.attr("d",Ue)}}}function Ne(Ke){Ke.selectAll(".visual-cue").remove()}function lr(Ke,Je,or){var yr=Je.xref,ir=Je.yref,Xe=H0.getFromId(or,yr),Lr=H0.getFromId(or,ir),Ar="";yr!=="paper"&&!Xe.autorange&&(Ar+=yr),ir!=="paper"&&!Lr.autorange&&(Ar+=ir),t6.setClipUrl(Ke,Ar?"clip"+or._fullLayout._uid+Ar:null,or)}}function OR(e,r,t){return e.replace(zc.segmentRE,function(a){var n=0,i=a.charAt(0),o=zc.paramIsX[i],l=zc.paramIsY[i],s=zc.numParams[i],u=a.substr(1).replace(zc.paramRE,function(f){return n>=s||(o[n]?f=r(f):l[n]&&(f=t(f)),n++),f});return i+u})}function t0e(e,r){if(U2(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){zR(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=zR,a6(e)}}}function zR(e){if(U2(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(UR(e),delete e._fullLayout._activeShapeIndex,a6(e))}}function a0e(e){if(U2(e)){UR(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Vo=Ct(),YR=jn(),WR=an(),oa=k2(),n0e=G2().eraseActiveShape,H2=fr(),Zt=H2._,la=QR.exports={};la.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Zt(e,"Download plot as a png"):Zt(e,"Download plot")},icon:oa.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};H2.notifier(Zt(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),Vo.call("downloadImage",e,t).then(function(a){H2.notifier(Zt(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){H2.notifier(Zt(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};la.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Zt(e,"Edit in Chart Studio")},icon:oa.disk,click:function(e){YR.sendDataToCloud(e)}};la.editInChartStudio={name:"editInChartStudio",title:function(e){return Zt(e,"Edit in Chart Studio")},icon:oa.pencil,click:function(e){YR.sendDataToCloud(e)}};la.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Zt(e,"Zoom")},attr:"dragmode",val:"zoom",icon:oa.zoombox,click:Di};la.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Zt(e,"Pan")},attr:"dragmode",val:"pan",icon:oa.pan,click:Di};la.select2d={name:"select2d",_cat:"select",title:function(e){return Zt(e,"Box Select")},attr:"dragmode",val:"select",icon:oa.selectbox,click:Di};la.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Zt(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:oa.lasso,click:Di};la.drawclosedpath={name:"drawclosedpath",title:function(e){return Zt(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:oa.drawclosedpath,click:Di};la.drawopenpath={name:"drawopenpath",title:function(e){return Zt(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:oa.drawopenpath,click:Di};la.drawline={name:"drawline",title:function(e){return Zt(e,"Draw line")},attr:"dragmode",val:"drawline",icon:oa.drawline,click:Di};la.drawrect={name:"drawrect",title:function(e){return Zt(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:oa.drawrect,click:Di};la.drawcircle={name:"drawcircle",title:function(e){return Zt(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:oa.drawcircle,click:Di};la.eraseshape={name:"eraseshape",title:function(e){return Zt(e,"Erase active shape")},icon:oa.eraseshape,click:n0e};la.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Zt(e,"Zoom in")},attr:"zoom",val:"in",icon:oa.zoom_plus,click:Di};la.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Zt(e,"Zoom out")},attr:"zoom",val:"out",icon:oa.zoom_minus,click:Di};la.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Zt(e,"Autoscale")},attr:"zoom",val:"auto",icon:oa.autoscale,click:Di};la.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Zt(e,"Reset axes")},attr:"zoom",val:"reset",icon:oa.home,click:Di};la.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Zt(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:oa.tooltip_basic,gravity:"ne",click:Di};la.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Zt(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:oa.tooltip_compare,gravity:"ne",click:Di};function Di(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,o={},l=WR.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var c=n==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var eP=o6(),l0e=Object.keys(eP),rP=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],tP=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(rP),Y0=[],s0e=function(e){if(tP.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();Y0.indexOf(r)===-1&&Y0.push(r),Y0.indexOf(t)===-1&&Y0.push(t)}};l0e.forEach(function(e){s0e(eP[e])});Y0.sort();aP.exports={DRAW_MODES:rP,backButtons:tP,foreButtons:Y0}});var s6=R((sEe,nP)=>{"use strict";var lEe=l6();nP.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 oP=R((uEe,iP)=>{"use strict";var u0e=fr(),R1=Qt(),f0e=Da(),c0e=s6();iP.exports=function(r,t){var a=r.modebar||{},n=f0e.newContainer(t,"modebar");function i(l,s){return u0e.coerce(a,n,c0e,l,s)}i("orientation"),i("bgcolor",R1.addOpacity(t.paper_bgcolor,.5));var o=R1.contrast(R1.rgb(t.modebar.bgcolor));i("color",R1.addOpacity(o,.3)),i("activecolor",R1.addOpacity(o,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var fP=R((fEe,uP)=>{"use strict";var u6=ta(),v0e=ia(),Y2=fr(),lP=k2(),h0e=Ry().version,d0e=new DOMParser;function sP(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var ss=sP.prototype;ss.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(c){c.style.backgroundColor=i.bgcolor}),Y2.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var l=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(l||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};ss.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var o=r.createButton(n);r.buttonElements.push(o),a.appendChild(o)}),r.element.appendChild(a)})};ss.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};ss.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&u6.select(t).classed("active",!0);var o=e.icon;return typeof o=="function"?t.appendChild(o()):t.appendChild(this.createIcon(o||lP.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};ss.createIcon=function(e){var r=v0e(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=d0e.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};ss.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=u6.select(a),s=function(c,h){var d=r.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(i===t){var u=!l.classed("active");l.classed("active",u),s(a,u)}}else{var f=i===null?i:Y2.nestedProperty(r,i).get();l.classed("active",f===n),s(a,f===n)}})};ss.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var y0e=an(),cP=ni(),f6=Ct(),g0e=js().isUnifiedHover,b0e=fP(),W2=o6(),x0e=l6().DRAW_MODES,_0e=fr().extendDeep;vP.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,o;Array.isArray(i)&&i.length?o=k0e(i):!a.displayModeBar&&a.watermark?o=[]:o=w0e(r),n?n.update(r,o):t._modeBar=b0e(r,o)};function w0e(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(z,V){if(typeof V=="string"){if(V.toLowerCase()===z.toLowerCase())return!0}else{var X=V.name,K=V._cat||V.name;if(X===z||K===z.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var o=r.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(i.filter(function(z){for(var V=0;V1?(P=["toggleHover"],N=["resetViews"]):c?(D=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],N=["resetGeo"]):f?(P=["hoverClosest3d"],N=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(D=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],N=["resetViewMapbox"]):m?(D=["zoomInMap","zoomOutMap"],P=["toggleHover"],N=["resetViewMap"]):h?P=["hoverClosestPie"]:w?(P=["hoverClosestCartesian","hoverCompareCartesian"],N=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(M0e(t)||T)&&(P=[]),u&&!x&&(D=["zoomIn2d","zoomOut2d","autoScale2d"],N[0]!=="resetViews"&&(N=["resetScale2d"])),f?q=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!x||p?q=["zoom2d","pan2d"]:g||m||c?q=["pan2d"]:b&&(q=["zoom2d"]),T0e(t)&&q.push("select2d","lasso2d");var O=[],U=function(z){O.indexOf(z)===-1&&P.indexOf(z)!==-1&&O.push(z)};if(Array.isArray(l)){for(var $=[],j=0;j{"use strict";dP.exports={moduleType:"component",name:"modebar",layoutAttributes:s6(),supplyLayoutDefaults:oP(),manage:hP()}});var v6=R((hEe,pP)=>{"use strict";var C0e=ki().FROM_BL;pP.exports=function(r,t,a){a===void 0&&(a=C0e[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var N1=R(P1=>{"use strict";var Bc=fr(),h6=E0(),wl=an().id2name,E0e=Bo(),mP=v6(),L0e=Jg(),D0e=_n().ALMOST_EQUAL,q0e=ki().FROM_BL;P1.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],o=r._axisMatchGroups=[],l,s,u,f,c,h,d,p;for(l=0;li?t.substr(i):a.substr(n))+o}function R0e(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),o=0;oD0e*p&&!_)){for(i=0;iq&&XP&&(P=X);var ve=(P-D)/(2*N);c/=ve,D=s.l2r(D),P=s.l2r(P),s.range=s._input.range=S{"use strict";var X2=ta(),qi=Ct(),So=jn(),Yo=fr(),m6=Ci(),y6=S2(),I1=Qt(),W0=Ca(),xP=x1(),MP=c6(),O1=Va(),Ks=ki(),SP=N1(),P0e=SP.enforce,N0e=SP.clean,_P=E0().doAutoRange,kP="start",I0e="middle",CP="end",O0e=ai().zindexSeparator;Jn.layoutStyles=function(e){return Yo.syncOrAsync([So.doAutoMargin,B0e],e)};function z0e(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function B0e(e){var r=e._fullLayout,t=r._size,a=t.p,n=O1.list(e,"",!0),i,o,l,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(W0.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),Jn.drawMainTitle(e),MP.manage(e),!r._has("cartesian"))return So.previousPromises(e);function c(Ce,Y,ae){var Z=Ce._lw/2;if(Ce._id.charAt(0)==="x"){if(Y){if(ae==="top")return Y._offset-a-Z}else return t.t+t.h*(1-(Ce.position||0))+Z%1;return Y._offset+Y._length+a+Z}if(Y){if(ae==="right")return Y._offset+Y._length+a+Z}else return t.l+t.w*(Ce.position||0)+Z%1;return Y._offset-a-Z}for(i=0;i0){V0e(e,i,u,s),l.attr({x:o,y:i,"text-anchor":a,dy:TP(r.yanchor)}).call(m6.positionText,o,i);var f=(r.text.match(m6.BR_TAG_ALL)||[]).length;if(f){var c=Ks.LINE_SPACING*f+Ks.MID_SHIFT;r.y===0&&(c=-c),l.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",m)})}var h=X2.selectAll(".gtitle-subtitle");if(h.node()){var d=l.node().getBBox(),p=d.y+d.height,g=p+xP.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:o,y:g,"text-anchor":a,dy:TP(r.yanchor)}).call(m6.positionText,o,g)}}}};function U0e(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=Yo.isTopAnchor(r)?a:a-n,l=t==="b"?i-o:o;return Yo.isTopAnchor(r)&&t==="t"||Yo.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",o=e._fullLayout.margin[i],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=G0e(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>o?l:0}function V0e(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",l={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&U0e(e,i,o,r,a)?l[o]=t:i.yref==="container"&&(s[o]=t,e._fullLayout._reservedMargin[n]=s),So.allowAutoMargin(e,n),So.autoMargin(e,n,l)}function Y0e(e,r){var t=e.title,a=e._size,n=0;switch(r===kP?n=t.pad.l:r===CP&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function W0e(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===Ks.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function TP(e){return e==="top"?Ks.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Ks.MID_SHIFT+"em"}function j0e(e){var r=e.title,t=I0e;return Yo.isRightAnchor(r)?t=CP:Yo.isLeftAnchor(r)&&(t=kP),t}function X0e(e){var r=e.title,t="0em";return Yo.isTopAnchor(r)?t=Ks.CAP_SHIFT+"em":Yo.isMiddleAnchor(r)&&(t=Ks.MID_SHIFT+"em"),t}Jn.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var Z0e=af().readPaths,J0e=O2(),EP=Wu().clearOutlineControllers,g6=Qt(),LP=Ca(),$0e=Da().arrayEditor,DP=of(),K0e=DP.getPathString;FP.exports={draw:J2,drawOne:qP,activateLastSelection:rhe};function J2(e){var r=e._fullLayout;EP(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;m--){var b=o.append("path").attr(s).style("opacity",m?.1:u).call(g6.stroke,c).call(g6.fill,f).call(LP.dashLine,m?"solid":d,m?4+h:h);if(Q0e(b,e,a),p){var _=$0e(e.layout,"selections",a);b.style({cursor:"move"});var w={element:b.node(),plotinfo:n,gd:e,editHelpers:_,isActiveSelection:!0},x=Z0e(l,e);J0e(x,b,w)}else b.style("pointer-events",m?"all":"none");g[m]=b}var T=g[0],S=g[1];S.node().addEventListener("click",function(){return ehe(e,T)})}}function Q0e(e,r,t){var a=t.xref+t.yref;LP.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function ehe(e,r){if($2(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){b6(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=b6,J2(e)}}}function rhe(e){if($2(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=b6,J2(e)}}function b6(e){if($2(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(EP(e),delete e._fullLayout._activeSelectionIndex,J2(e))}}});var PP=R((yEe,RP)=>{function the(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,o){return a("temp_status",{seg:n,above:i,below:o})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,o){return a("status",{seg:n,above:i,below:o})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}RP.exports=the});var IP=R((gEe,NP)=>{function ahe(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],o=a[1],l=n[0],s=n[1],u=t[0],f=t[1];return(l-i)*(f-o)-(s-o)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],o=n[0]-a[0],l=t[0]-a[0],s=n[1]-a[1],u=l*o+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=l-i>e&&(o-f)*(i-c)/(l-c)+f-n>e&&(s=!s),o=f,l=c}return s}};return r}NP.exports=ahe});var zP=R((bEe,OP)=>{var nhe={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};OP.exports=nhe});var UP=R((xEe,BP)=>{var z1=zP();function ihe(e,r,t){function a(p,g){return{id:t?t.segmentId():-1,start:p,end:g,myFill:{above:null,below:null},otherFill:null}}function n(p,g,m){return{id:t?t.segmentId():-1,start:p,end:g,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var i=z1.create();function o(p,g,m,b,_,w){var x=r.pointsCompare(g,_);return x!==0?x:r.pointsSame(m,w)?0:p!==b?p?1:-1:r.pointAboveOrOnLine(m,b?_:w,b?w:_)?1:-1}function l(p,g){i.insertBefore(p,function(m){var b=o(p.isStart,p.pt,g,m.isStart,m.pt,m.other.pt);return b<0})}function s(p,g){var m=z1.node({isStart:!0,pt:p.start,seg:p,primary:g,other:null,status:null});return l(m,p.end),m}function u(p,g,m){var b=z1.node({isStart:!1,pt:g.end,seg:g,primary:m,other:p,status:null});p.other=b,l(b,p.pt)}function f(p,g){var m=s(p,g);return u(m,p,g),m}function c(p,g){t&&t.segmentChop(p.seg,g),p.other.remove(),p.seg.end=g,p.other.pt=g,l(p.other,p.pt)}function h(p,g){var m=n(g,p.seg.end,p.seg);return c(p,g),f(m,p.primary)}function d(p,g){var m=z1.create();function b($,j){var H=$.seg.start,z=$.seg.end,V=j.seg.start,X=j.seg.end;return r.pointsCollinear(H,V,X)?r.pointsCollinear(z,V,X)||r.pointAboveOrOnLine(z,V,X)?1:-1:r.pointAboveOrOnLine(H,V,X)?1:-1}function _($){return m.findTransition(function(j){var H=b($,j.ev);return H>0})}function w($,j){var H=$.seg,z=j.seg,V=H.start,X=H.end,K=z.start,ve=z.end;t&&t.checkIntersection(H,z);var xe=r.linesIntersect(V,X,K,ve);if(xe===!1){if(!r.pointsCollinear(V,X,K)||r.pointsSame(V,ve)||r.pointsSame(X,K))return!1;var se=r.pointsSame(V,K),be=r.pointsSame(X,ve);if(se&&be)return j;var re=!se&&r.pointBetween(V,K,ve),ke=!be&&r.pointBetween(X,K,ve);if(se)return ke?h(j,X):h($,ve),j;re&&(be||(ke?h(j,X):h($,ve)),h(j,V))}else xe.alongA===0&&(xe.alongB===-1?h($,K):xe.alongB===0?h($,xe.pt):xe.alongB===1&&h($,ve)),xe.alongB===0&&(xe.alongA===-1?h(j,V):xe.alongA===0?h(j,xe.pt):xe.alongA===1&&h(j,X));return!1}for(var x=[];!i.isEmpty();){var T=i.getHead();if(t&&t.vert(T.pt[0]),T.isStart){let $=function(){if(M){var j=w(T,M);if(j)return j}return k?w(T,k):!1};var U=$;t&&t.segmentNew(T.seg,T.primary);var S=_(T),M=S.before?S.before.ev:null,k=S.after?S.after.ev:null;t&&t.tempStatus(T.seg,M?M.seg:!1,k?k.seg:!1);var D=$();if(D){if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=T.seg.myFill;t&&t.segmentUpdate(D.seg),T.other.remove(),T.remove()}if(i.getHead()!==T){t&&t.rewind(T.seg);continue}if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,k?T.seg.myFill.below=k.seg.myFill.above:T.seg.myFill.below=p,P?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var N;k?T.primary===k.primary?N=k.seg.otherFill.above:N=k.seg.myFill.above:N=T.primary?g:p,T.seg.otherFill={above:N,below:N}}t&&t.status(T.seg,M?M.seg:!1,k?k.seg:!1),T.other.status=S.insert(z1.node({ev:T}))}else{var q=T.status;if(q===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(q.prev)&&m.exists(q.next)&&w(q.prev.ev,q.next.ev),t&&t.statusRemove(q.ev.seg),q.remove(),!T.primary){var O=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=O}x.push(T.seg)}i.getHead().remove()}return t&&t.done(),x}return e?{addRegion:function(p){for(var g,m=p[p.length-1],b=0;b{function ohe(e,r,t){var a=[],n=[];return e.forEach(function(i){var o=i.start,l=i.end;if(r.pointsSame(o,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function c(U,$,j){return f.index=U,f.matches_head=$,f.matches_pt1=j,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function B1(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var lhe={union:function(e,r){return B1(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return B1(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return B1(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return B1(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return B1(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};VP.exports=lhe});var jP=R((AEe,WP)=>{var she={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=o(i[0]),s=1;s{var uhe=PP(),fhe=IP(),XP=UP(),che=HP(),U1=YP(),ZP=jP(),Wo=!1,G1=fhe(),uo;uo={buildLog:function(e){return e===!0?Wo=uhe():e===!1&&(Wo=!1),Wo===!1?!1:Wo.list},epsilon:function(e){return G1.epsilon(e)},segments:function(e){var r=XP(!0,G1,Wo);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=XP(!1,G1,Wo);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:U1.union(e.combined,Wo),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:U1.intersect(e.combined,Wo),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:U1.difference(e.combined,Wo),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:U1.differenceRev(e.combined,Wo),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:U1.xor(e.combined,Wo),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:che(e.segments,G1,Wo),inverted:e.inverted}},polygonFromGeoJSON:function(e){return ZP.toPolygon(uo,e)},polygonToGeoJSON:function(e){return ZP.fromPolygon(uo,G1,e)},union:function(e,r){return H1(e,r,uo.selectUnion)},intersect:function(e,r){return H1(e,r,uo.selectIntersect)},difference:function(e,r){return H1(e,r,uo.selectDifference)},differenceRev:function(e,r){return H1(e,r,uo.selectDifferenceRev)},xor:function(e,r){return H1(e,r,uo.selectXor)}};function H1(e,r,t){var a=uo.segments(e),n=uo.segments(r),i=uo.combine(a,n),o=t(i);return uo.polygon(o)}typeof window=="object"&&(window.PolyBool=uo);JP.exports=uo});var QP=R((MEe,KP)=>{KP.exports=function(r,t,a,n){var i=r[0],o=r[1],l=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;uo!=p>o&&i<(d-c)*(o-h)/(p-h)+c;g&&(l=!l)}return l}});var w6=R((SEe,eN)=>{"use strict";var _6=Qy().dot,K2=_n().BADNUM,Q2=eN.exports={};Q2.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],o=i,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;ln||b===K2||bo||g&&u(p))}function c(p,g){var m=p[0],b=p[1];if(m===K2||mn||b===K2||bo)return!1;var _=t.length,w=t[0][0],x=t[0][1],T=0,S,M,k,D,P;for(S=1;S<_;S++)if(M=w,k=x,w=t[S][0],x=t[S][1],D=Math.min(M,w),!(mMath.max(M,w)||b>Math.max(k,x)))if(bl||Math.abs(_6(c,u))>n)return!0;return!1};Q2.filter=function(r,t){var a=[r[0]],n=0,i=0;function o(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var c=f+1;c1){var l=r.pop();o(l)}return{addPt:o,raw:r,filtered:a}}});var tN=R((kEe,rN)=>{"use strict";rN.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var TN=R((CEe,AN)=>{"use strict";var aN=$P(),vhe=QP(),W1=Ct(),hhe=Ca().dashStyle,V1=Qt(),dhe=rf(),phe=js().makeEventData,$1=tf(),mhe=$1.freeMode,yhe=$1.rectMode,j1=$1.drawMode,S6=$1.openMode,k6=$1.selectMode,nN=of(),iN=q1(),fN=O2(),cN=Wu().clearOutline,vN=af(),A6=vN.handleEllipse,ghe=vN.readPaths,bhe=R2().newShapes,xhe=Zw(),_he=x6().activateLastSelection,r3=fr(),whe=r3.sorterAsc,hN=w6(),Y1=dg(),jo=an().getFromId,Ahe=S2(),The=Z2().redrawReglTraces,t3=tN(),us=t3.MINSELECT,Mhe=hN.filter,C6=hN.tester,E6=L2(),oN=E6.p2r,She=E6.axValue,khe=E6.getTransform;function L6(e){return e.subplot!==void 0}function Che(e,r,t,a,n){var i=!L6(a),o=mhe(n),l=yhe(n),s=S6(n),u=j1(n),f=k6(n),c=n==="drawline",h=n==="drawcircle",d=c||h,p=a.gd,g=p._fullLayout,m=f&&g.newselection.mode==="immediate"&&i,b=g._zoomlayer,_=a.element.getBoundingClientRect(),w=a.plotinfo,x=khe(w),T=r-_.left,S=t-_.top;g._calcInverseTransform(p);var M=r3.apply3DTransform(g._invTransform)(T,S);T=M[0],S=M[1];var k=g._invScaleX,D=g._invScaleY,P=T,N=S,q="M"+T+","+S,O=a.xaxes[0],U=a.yaxes[0],$=O._length,j=U._length,H=e.altKey&&!(j1(n)&&s),z,V,X,K,ve,xe,se;pN(e,p,a),o&&(z=Mhe([[T,S]],t3.BENDPX));var be=b.selectAll("path.select-outline-"+w.id).data([1]),re=u?g.newshape:g.newselection;u&&(a.hasText=re.label.text||re.label.texttemplate);var ke=u&&!s?re.fillcolor:"rgba(0,0,0,0)",ge=re.line.color||(i?V1.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");be.enter().append("path").attr("class","select-outline select-outline-"+w.id).style({opacity:u?re.opacity/2:1,"stroke-dasharray":hhe(re.line.dash,re.line.width),"stroke-width":re.line.width+"px","shape-rendering":"crispEdges"}).call(V1.stroke,ge).call(V1.fill,ke).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",x).attr("d",q+"Z");var Ee=b.append("path").attr("class","zoombox-corners").style({fill:V1.background,stroke:V1.defaultLine,"stroke-width":1}).attr("transform",x).attr("d","M0,0Z");if(u&&a.hasText){var De=b.select(".label-temp");De.empty()&&(De=b.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ce=g._uid+t3.SELECTID,Y=[],ae=a3(p,a.xaxes,a.yaxes,a.subplot);m&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var Te=O._id,Pe=U._id;xN(p,Te,Pe,ae);for(var Ne=(p.layout||{}).selections||[],lr=[],Ke=!1,Je=0;Je=0){p._fullLayout._deactivateShape(p);return}if(!u){var Ne=g.clickmode;Y1.done(Ce).then(function(){if(Y1.clear(Ce),Te===2){for(be.remove(),ve=0;ve-1&&dN(Pe,p,a.xaxes,a.yaxes,a.subplot,a,be),Ne==="event"&&J1(p,void 0);dhe.click(p,Pe,w.id)}).catch(r3.error)}},a.doneFn=function(){Ee.remove(),Y1.done(Ce).then(function(){Y1.clear(Ce),!m&&K&&a.selectionDefs&&(K.subtract=H,a.selectionDefs.push(K),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,X)),(m||u)&&X1(a,m),a.doneFnCompleted&&a.doneFnCompleted(Y),f&&J1(p,se)}).catch(r3.error)}}function dN(e,r,t,a,n,i,o){var l=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,c=[],h,d,p,g,m,b,_,w,x,T;if(Fhe(l)){pN(e,r,i),h=a3(r,t,a,n);var S=Rhe(l,h),M=S.pointNumbers.length>0;if(M?Phe(h,S):Nhe(h)&&(_=sN(S))){for(o&&o.remove(),T=0;T=0}function qhe(e){return e._fullLayout._activeSelectionIndex>=0}function X1(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;Dhe(n)&&n._fullLayout._deactivateShape(n),qhe(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,o=i._zoomlayer,l=j1(t),s=k6(t);if(l||s){var u=o.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;l&&(f=bhe(u,e)),f&&W1.call("_guiRelayout",n,{shapes:f});var c;s&&!L6(e)&&(c=xhe(u,e)),c&&(n._fullLayout._noEmitSelectedAtStart=!0,W1.call("_guiRelayout",n,{selections:c}).then(function(){r&&_he(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function lN(e){return e._id}function a3(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(lN),o=t.map(lN),l,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Phe(e,r){var t=[],a,n,i,o;for(o=0;o0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(o=0;o1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function Z1(e,r,t){var a;for(a=0;a-1&&r;if(!o&&r){var Te=uN(e,!0);if(Te.length){var Pe=Te[0].xref,Ne=Te[0].yref;if(Pe&&Ne){var lr=_N(Te),Ke=wN([jo(e,Pe,"x"),jo(e,Ne,"y")]);Ke(Y,lr)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:Z&&J1(e,Y),h._reselect=!1}if(!o&&h._deselect){var Je=h._deselect;l=Je.xref,s=Je.yref,zhe(l,s,f)||xN(e,l,s,a),Z&&(Y.points.length?J1(e,Y):F6(e)),h._deselect=!1}return{eventData:Y,selectionTesters:t}}function Ohe(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";MN.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 K1=R((LEe,SN)=>{"use strict";SN.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var j0=R((qEe,EN)=>{"use strict";var kN=R6(),CN=ci(),n3=ai(),Vhe=Da().templatedArray,DEe=K1();EN.exports=Vhe("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:CN({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:kN.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:kN.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",n3.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",n3.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",n3.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",n3.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:CN({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Q1=R((FEe,LN)=>{"use strict";LN.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var P6=R((REe,DN)=>{"use strict";DN.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var sf=R((PEe,IN)=>{"use strict";var qN=m1().axisHoverFormat,Yhe=o0().texttemplateAttrs,Whe=o0().hovertemplateAttrs,FN=Ac(),jhe=ci(),Xhe=Iu().dash,Zhe=Iu().pattern,Jhe=Ca(),$he=Q1(),i3=hn().extendFlat,Khe=P6();function RN(e){return{valType:"any",dflt:0,editType:"calc"}}function PN(e){return{valType:"any",editType:"calc"}}function NN(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}IN.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:RN("x"),yperiod:RN("y"),xperiod0:PN("x0"),yperiod0:PN("y0"),xperiodalignment:NN("x"),yperiodalignment:NN("y"),xhoverformat:qN("x"),yhoverformat:qN("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:Yhe({},{}),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:Whe({},{keys:$he.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i3({},Xhe,{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:Khe(!0),fillgradient:i3({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:Zhe,marker:i3({symbol:{valType:"enumerated",values:Jhe.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:i3({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},FN("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"},FN("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:jhe({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var N6=R((IEe,BN)=>{"use strict";var ON=j0(),zN=sf().line,Qhe=Iu().dash,o3=hn().extendFlat,ede=dl().overrideAll,rde=Da().templatedArray,NEe=K1();BN.exports=ede(rde("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o3({},ON.xref,{}),yref:o3({},ON.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:zN.color,width:o3({},zN.width,{min:1,dflt:1}),dash:o3({},Qhe,{dflt:"dot"})}}),"arraydraw","from-root")});var VN=R((OEe,HN)=>{"use strict";var UN=fr(),l3=Va(),tde=wo(),ade=N6(),GN=of();HN.exports=function(r,t){tde(r,t,{name:"selections",handleItemDefaults:nde});for(var a=t.selections,n=0;n{"use strict";YN.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var ep=R((BEe,ZN)=>{"use strict";var ide=Ct(),jN=fr(),XN=an();ZN.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var o=ide.subplotsRegistry.cartesian,l=o.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,c=s.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var JN=x6(),rp=TN();$N.exports={moduleType:"component",name:"selections",layoutAttributes:N6(),supplyLayoutDefaults:VN(),supplyDrawNewSelectionDefaults:WN(),includeBasePlot:ep()("selections"),draw:JN.draw,drawOne:JN.drawOne,reselect:rp.reselect,prepSelect:rp.prepSelect,clearOutline:rp.clearOutline,clearSelectionsCache:rp.clearSelectionsCache,selectOnClick:rp.selectOnClick}});var gI=R((GEe,yI)=>{"use strict";var U6=ta(),Xo=fr(),KN=Xo.numberFormat,ode=vl(),lde=gw(),s3=Ct(),lI=Xo.strTranslate,sde=Ci(),QN=Qt(),uf=Ca(),ude=rf(),eI=Va(),fde=ef(),cde=xl(),sI=tf(),u3=sI.selectingOrDrawing,vde=sI.freeMode,hde=ki().FROM_TL,dde=S2(),pde=Z2().redrawReglTraces,mde=jn(),O6=an().getFromId,yde=X0().prepSelect,gde=X0().clearOutline,bde=X0().selectOnClick,I6=v6(),G6=ai(),rI=G6.MINDRAG,Bi=G6.MINZOOM,tI=!0;function xde(e,r,t,a,n,i,o,l){var s=e._fullLayout._zoomlayer,u=o+l==="nsew",f=(o+l).length===1,c,h,d,p,g,m,b,_,w,x,T,S,M,k,D,P,N,q,O,U,$,j,H;t+=r.yaxis._shift;function z(){if(c=r.xaxis,h=r.yaxis,w=c._length,x=h._length,b=c._offset,_=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,o&&l)for(var Ye=r.overlays,Ve=0;Ve=0){pr._fullLayout._deactivateShape(pr);return}var Tr=pr._fullLayout.clickmode;if(B6(pr),Ye===2&&!f&&Ar(),u)Tr.indexOf("select")>-1&&bde(Ve,pr,g,m,r.id,K),Tr.indexOf("event")>-1&&ude.click(pr,Ve,r.id);else if(Ye===1&&f){var mr=o?h:c,vr=o==="s"||l==="w"?0:1,Cr=mr._name+".range["+vr+"]",Ir=_de(mr,vr),Gr="left",Ze="middle";if(mr.fixedrange)return;o?(Ze=o==="n"?"top":"bottom",mr.side==="right"&&(Gr="right")):l==="e"&&(Gr="right"),pr._context.showAxisRangeEntryBoxes&&U6.select(X).call(sde.makeEditable,{gd:pr,immediate:!0,background:pr._fullLayout.paper_bgcolor,text:String(Ir),fill:mr.tickfont?mr.tickfont.color:"#444",horizontalAlign:Gr,verticalAlign:Ze}).on("edit",function(oe){var ye=mr.d2r(oe);ye!==void 0&&s3.call("_guiRelayout",pr,Cr,ye)})}}cde.init(K);var se,be,re,ke,ge,Ee,De,Ce,Y,ae;function Z(Ye,Ve,pr){var Tr=X.getBoundingClientRect();se=Ve-Tr.left,be=pr-Tr.top,e._fullLayout._calcInverseTransform(e);var mr=Xo.apply3DTransform(e._fullLayout._invTransform)(se,be);se=mr[0],be=mr[1],re={l:se,r:se,w:0,t:be,b:be,h:0},ke=e._hmpixcount?e._hmlumcount/e._hmpixcount:ode(e._fullLayout.plot_bgcolor).getLuminance(),ge="M0,0H"+w+"V"+x+"H0V0",Ee=!1,De="xy",ae=!1,Ce=cI(s,ke,b,_,ge),Y=vI(s,b,_)}function Te(Ye,Ve){if(e._transitioningWithDuration)return!1;var pr=Math.max(0,Math.min(w,j*Ye+se)),Tr=Math.max(0,Math.min(x,H*Ve+be)),mr=Math.abs(pr-se),vr=Math.abs(Tr-be);re.l=Math.min(se,pr),re.r=Math.max(se,pr),re.t=Math.min(be,Tr),re.b=Math.max(be,Tr);function Cr(){De="",re.r=re.l,re.t=re.b,Y.attr("d","M0,0Z")}if(T.isSubplotConstrained)mr>Bi||vr>Bi?(De="xy",mr/w>vr/x?(vr=mr*x/w,be>Tr?re.t=be-vr:re.b=be+vr):(mr=vr*w/x,se>pr?re.l=se-mr:re.r=se+mr),Y.attr("d",f3(re))):Cr();else if(S.isSubplotConstrained)if(mr>Bi||vr>Bi){De="xy";var Ir=Math.min(re.l/w,(x-re.b)/x),Gr=Math.max(re.r/w,(x-re.t)/x);re.l=Ir*w,re.r=Gr*w,re.b=(1-Ir)*x,re.t=(1-Gr)*x,Y.attr("d",f3(re))}else Cr();else!k||vr0){var oe;if(S.isSubplotConstrained||!M&&k.length===1){for(oe=0;oe1&&(Cr.maxallowed!==void 0&&P===(Cr.range[0]1&&(Ir.maxallowed!==void 0&&N===(Ir.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Ade(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function cI(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",lI(t,a)).attr("d",n+"Z")}function vI(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:QN.background,stroke:QN.defaultLine,"stroke-width":1,opacity:0}).attr("transform",lI(r,t)).attr("d","M0,0Z")}function hI(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),dI(e,r,n,i)}function dI(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function B6(e){U6.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function pI(e){tI&&e.data&&e._context.showTips&&(Xo.notifier(Xo._(e,"Double-click to zoom back out"),"long"),tI=!1)}function Tde(e,r){return"M"+(e.l-.5)+","+(r-Bi-.5)+"h-3v"+(2*Bi+1)+"h3ZM"+(e.r+.5)+","+(r-Bi-.5)+"h3v"+(2*Bi+1)+"h-3Z"}function Mde(e,r){return"M"+(r-Bi-.5)+","+(e.t-.5)+"v-3h"+(2*Bi+1)+"v3ZM"+(r-Bi-.5)+","+(e.b+.5)+"v3h"+(2*Bi+1)+"v-3Z"}function f3(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Bi)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function iI(e,r,t,a,n){for(var i=!1,o={},l={},s,u,f,c,h=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var Sde=ta(),c3=rf(),kde=xl(),Cde=ef(),Al=gI().makeDragBox,$n=ai().DRAGGERSIZE;v3.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){Sde.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,o){if((t._plots[i].mainplot&&!0)===(t._plots[o].mainplot&&!0)){var l=i.split("y"),s=o.split("y");return l[0]===s[0]?Number(l[1]||1)-Number(s[1]||1):Number(l[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var o=t._plots[i],l=o.xaxis,s=o.yaxis;if(!o.mainplot){var u=Al(r,o,l._offset,s._offset,l._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&c3.hover(r,h,i)},c3.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,kde.unhover(r,h))},r._context.showAxisDragHandles&&(Al(r,o,l._offset-$n,s._offset-$n,$n,$n,"n","w"),Al(r,o,l._offset+l._length,s._offset-$n,$n,$n,"n","e"),Al(r,o,l._offset-$n,s._offset+s._length,$n,$n,"s","w"),Al(r,o,l._offset+l._length,s._offset+s._length,$n,$n,"s","e"))}if(r._context.showAxisDragHandles){if(i===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=$n),Al(r,o,l._offset+l._length*.1,f,l._length*.8,$n,"","ew"),Al(r,o,l._offset,f,l._length*.1,$n,"","w"),Al(r,o,l._offset+l._length*.9,f,l._length*.1,$n,"","e")}if(i===s._mainSubplot){var c=s._mainLinePosition;s.side!=="right"&&(c-=$n),Al(r,o,c,s._offset+s._length*.1,$n,s._length*.8,"ns",""),Al(r,o,c,s._offset+s._length*.9,$n,s._length*.1,"s",""),Al(r,o,c,s._offset,$n,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,c3.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,c3.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},v3.updateFx(r)}};v3.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";Cde(r._draggers,t)}});var _I=R((VEe,xI)=>{"use strict";var bI=Ct();xI.exports=function(r){for(var t=bI.layoutArrayContainers,a=bI.layoutArrayRegexes,n=r.split("[")[0],i,o,l=0;l{"use strict";var Ede=Ru(),V6=Ky(),tp=hc(),Lde=I_().sorterAsc,Y6=Ct();ap.containerArrayMatch=_I();var Dde=ap.isAddVal=function(r){return r==="add"||Ede(r)},wI=ap.isRemoveVal=function(r){return r===null||r==="remove"};ap.applyContainerArrayChanges=function(r,t,a,n,i){var o=t.astr,l=Y6.getComponentMethod(o,"supplyLayoutDefaults"),s=Y6.getComponentMethod(o,"draw"),u=Y6.getComponentMethod(o,"drawOne"),f=n.replot||n.recalc||l===V6||s===V6,c=r.layout,h=r._fullLayout;if(a[""]){Object.keys(a).length>1&&tp.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(wI(d))t.set(null);else if(Array.isArray(d))t.set(d);else return tp.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(l(c,h),s(r),!0)}var p=Object.keys(a).map(Number).sort(Lde),g=t.get(),m=g||[],b=i(h,o).get(),_=[],w=-1,x=m.length,T,S,M,k,D,P,N,q;for(T=0;Tm.length-(N?0:1)){tp.warn("index out of range",o,M);continue}if(P!==void 0)D.length>1&&tp.warn("Insertion & removal are incompatible with edits to the same index.",o,M),wI(P)?_.push(M):N?(P==="add"&&(P={}),m.splice(M,0,P),b&&b.splice(M,0,{})):tp.warn("Unrecognized full object edit value",o,M,P),w===-1&&(w=M);else for(S=0;S=0;T--)m.splice(_[T],1),b&&b.splice(_[T],1);if(m.length?g||t.set(m):t.set(null),f)return!1;if(l(c,h),u!==V6){var O;if(w===-1)O=p;else{for(x=Math.max(m.length,x),O=[],T=0;T=w));T++)O.push(M);for(T=w;T{"use strict";var kI=ia(),WEe=C_(),CI=Ct(),fo=fr(),np=jn(),EI=an(),LI=Qt(),ip=EI.cleanId,qde=EI.getFromTrace,W6=CI.traceIs;Tl.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&fo.log("Clearing previous rejected promises from queue."),e._promises=[]};Tl.cleanLayout=function(e){var r,t;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 a=(np.subplotsRegistry.cartesian||{}).attrRegex,n=(np.subplotsRegistry.polar||{}).attrRegex,i=(np.subplotsRegistry.ternary||{}).attrRegex,o=(np.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),LI.clean(e),e.template&&e.template.layout&&Tl.cleanLayout(e.template.layout),e};function Z0(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=ip(t,a,!0))}Tl.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}Tl.hasParent=function(e,r){for(var t=SI(r);t;){if(t in e)return!0;t=SI(t)}return!1};var Pde=["x","y","z"];Tl.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var m3=ta(),Nde=ia(),Ide=J_(),Or=fr(),Fa=Or.nestedProperty,Z6=u1(),Ui=vE(),Zo=Ct(),A3=g0(),Lt=jn(),Fi=Va(),Ode=yw(),zde=Bo(),j6=Ca(),Bde=Qt(),Ude=H6().initInteractions,Gde=ju(),Hde=X0().clearOutline,NI=vc().dfltConfig,d3=AI(),Sn=DI(),Ta=Z2(),ff=dl(),Vde=ai().AX_NAME_PATTERN,X6=0,qI=5;function Yde(e,r,t,a){var n;if(e=Or.getGraphDiv(e),Z6.init(e),Or.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var o=Z6.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(o===!1)return Promise.reject();!r&&!t&&!Or.isPlotDiv(e)&&Or.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(n)return ca.addFrames(e,n)}OI(e,a),t||(t={}),m3.select(e).classed("js-plotly-plot",!0),j6.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(Sn.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=Sn.cleanLayout(t)),Lt.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(h1e(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),j6.initGradients(e),j6.initPatterns(e),s&&Fi.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&Lt.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function zI(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),g3(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&g3(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function Jde(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof k.parts[N]!="string";)N--;var q=k.parts[N],O=k.parts[N-1]+"."+q,U=k.parts.slice(0,N).join("."),$=Fa(e.layout,U).get(),j=Fa(a,U).get(),H=k.get();if(D!==void 0){b[M]=D,_[M]=q==="reverse"?D:Qs(H);var z=A3.getLayoutValObject(a,k.parts);if(z&&z.impliedEdits&&D!==null)for(var V in z.impliedEdits)w(Or.relativeAttr(M,V),z.impliedEdits[V]);if(["width","height"].indexOf(M)!==-1)if(D){w("autosize",null);var X=M==="height"?"width":"height";w(X,a[X])}else a[M]=e._initialAutoSize[M];else if(M==="autosize")w("width",D?null:a.width),w("height",D?null:a.height);else if(O.match(XI))S(O),Fa(a,U+"._inputRange").set(null);else if(O.match(ZI)){S(O),Fa(a,U+"._inputRange").set(null);var K=Fa(a,U).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else O.match(JI)&&Fa(a,U+"._inputDomain").set(null);if(q==="type"){T=$;var ve=j.type==="linear"&&D==="log",xe=j.type==="log"&&D==="linear";if(ve||xe){if(!T||!T.range)w(U+".autorange",!0);else if(j.autorange)ve&&(T.range=T.range[1]>T.range[0]?[1,2]:[2,1]);else{var se=T.range[0],be=T.range[1];ve?(se<=0&&be<=0&&w(U+".autorange",!0),se<=0?se=be/1e6:be<=0&&(be=se/1e6),w(U+".range[0]",Math.log(se)/Math.LN10),w(U+".range[1]",Math.log(be)/Math.LN10)):(w(U+".range[0]",Math.pow(10,se)),w(U+".range[1]",Math.pow(10,be)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[k.parts[0]]&&k.parts[1]==="radialaxis"&&delete a[k.parts[0]]._subplot.viewInitial["radialaxis.range"],Zo.getComponentMethod("annotations","convertCoords")(e,j,D,w),Zo.getComponentMethod("images","convertCoords")(e,j,D,w)}else w(U+".autorange",!0),w(U+".range",null);Fa(a,U+"._inputRange").set(null)}else if(q.match(Vde)){var re=Fa(a,M).get(),ke=(D||{}).type;(!ke||ke==="-")&&(ke="linear"),Zo.getComponentMethod("annotations","convertCoords")(e,re,ke,w),Zo.getComponentMethod("images","convertCoords")(e,re,ke,w)}var ge=d3.containerArrayMatch(M);if(ge){f=ge.array,c=ge.index;var Ee=ge.property,De=z||{editType:"calc"};c!==""&&Ee===""&&(d3.isAddVal(D)?_[M]=null:d3.isRemoveVal(D)?_[M]=(Fa(t,f).get()||[])[c]:Or.warn("unrecognized full object value",r)),ff.update(m,De),u[f]||(u[f]={});var Ce=u[f][c];Ce||(Ce=u[f][c]={}),Ce[Ee]=D,delete r[M]}else q==="reverse"?($.range?$.range.reverse():(w(U+".autorange",!0),$.range=[1,0]),j.autorange?m.calc=!0:m.plot=!0):(M==="dragmode"&&(D===!1&&H!==!1||D!==!1&&H===!1)||a._has("scatter-like")&&a._has("regl")&&M==="dragmode"&&(D==="lasso"||D==="select")&&!(H==="lasso"||H==="select")?m.plot=!0:z?ff.update(m,z):m.calc=!0,k.set(D))}}for(f in u){var Y=d3.applyContainerArrayChanges(e,i(t,f),u[f],m,i);Y||(m.plot=!0)}for(var ae in x){T=Fi.getFromId(e,ae);var Z=T&&T._constraintGroup;if(Z){m.calc=!0;for(var Te in Z)x[Te]||(Fi.getFromId(e,Te)._constraintShrinkable=!0)}}(KI(e)||r.height||r.width)&&(m.plot=!0);var Pe=a.shapes;for(c=0;c1;)if(a.pop(),t=Fa(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function t1e(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function l(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var c=0;return function(){if(u&&++c===f)return u()}}return new Promise(function(u,f){function c(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var q=a._frameQueue.pop();q.onInterrupt&&q.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(q){if(q.length!==0){for(var O=0;Oa._timeToNext&&p()};q()}var m=0;function b(q){return Array.isArray(n)?m>=n.length?q.transitionOpts=n[m]:q.transitionOpts=n[0]:q.transitionOpts=n,m++,q}var _,w,x=[],T=r==null,S=Array.isArray(r),M=!T&&!S&&Or.isPlainObject(r);if(M)x.push({type:"object",data:b(Or.extendFlat({},r))});else if(T||["string","number"].indexOf(typeof r)!==-1)for(_=0;_0&&PP)&&N.push(w);x=N}}x.length>0?h(x):(e.emit("plotly_animated"),u())})}function u1e(e,r,t){if(e=Or.getGraphDiv(e),r==null)return Promise.resolve();if(!Or.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 a,n,i,o,l=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=l.length+r.length*2,f=[],c={};for(a=r.length-1;a>=0;a--)if(Or.isPlainObject(r[a])){var h=r[a].name,d=(s[h]||c[h]||{}).name,p=r[a].name,g=s[d]||c[d];d&&p&&typeof p=="number"&&g&&X6k.index?-1:M.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&Or.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),o.unshift({type:"insert",index:a,value:n[a]});var l=Lt.modifyFrames,s=Lt.modifyFrames,u=[e,o],f=[e,i];return Ui&&Ui.add(e,l,u,s,f),Lt.modifyFrames(e,i)}function c1e(e){e=Or.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return Lt.cleanPlot([],{},t,r),Lt.purge(e),Z6.purge(e),r._container&&r._container.remove(),delete e._context,e}function v1e(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!Or.equalDomRects(t,r._lastBBox)){var a=r._invTransform=Or.inverseTransformMatrix(Or.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function h1e(e){var r=m3.select(e),t=e._fullLayout;if(t._calcInverseTransform=v1e,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};m3.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=Or.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(Gde.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}ca.animate=s1e;ca.addFrames=u1e;ca.deleteFrames=f1e;ca.addTraces=VI;ca.deleteTraces=YI;ca.extendTraces=GI;ca.moveTraces=J6;ca.prependTraces=HI;ca.newPlot=Zde;ca._doPlot=Yde;ca.purge=c1e;ca.react=i1e;ca.redraw=Xde;ca.relayout=op;ca.restyle=b3;ca.setPlotConfig=Wde;ca.update=_3;ca._guiRelayout=K6(op);ca._guiRestyle=K6(b3);ca._guiUpdate=K6(_3);ca._storeDirectGUIEdit=Qde});var Uc=R(fs=>{"use strict";var d1e=Ct();fs.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};fs.getRedrawFunc=function(e){return function(){d1e.getComponentMethod("colorbar","draw")(e)}};fs.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};fs.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var QI=window.URL||window.webkitURL;fs.createObjectURL=function(e){return QI.createObjectURL(e)};fs.revokeObjectURL=function(e){return QI.revokeObjectURL(e)};fs.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=p1e(window.atob(e));return new window.Blob([t],{type:"image/"+r})};fs.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function p1e(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var rA=ta(),JEe=fr(),m1e=Ca(),y1e=Qt(),$Ee=ju(),eA=/"/g,sp="TOBESTRIPPED",g1e=new RegExp('("'+sp+")|("+sp+'")',"g");function b1e(e){var r=rA.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function x1e(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}eO.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,o=n._toppaper,l=n.width,s=n.height,u;i.insert("rect",":first-child").call(m1e.setRect,0,0,l,s).call(y1e.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var _1e=fr(),w1e=_g().EventEmitter,up=Uc();function A1e(e){var r=e.emitter||new w1e,t=new Promise(function(a,n){var i=window.Image,o=e.svg,l=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,c=e.height||150,h=u*f,d=u*c,p=s.getContext("2d",{willReadFrequently:!0}),g=new i,m,b;l==="svg"||_1e.isSafari()?b=up.encodeSVG(o):(m=up.createBlob(o,"svg"),b=up.createObjectURL(m)),s.width=h,s.height=d,g.onload=function(){var _;switch(m=null,up.revokeObjectURL(b),l!=="svg"&&p.drawImage(g,0,0,h,d),l){case"jpeg":_=s.toDataURL("image/jpeg");break;case"png":_=s.toDataURL("image/png");break;case"webp":_=s.toDataURL("image/webp");break;case"svg":_=b;break;default:var w="Image format is not jpeg, png, svg or webp.";if(n(new Error(w)),!e.promise)return r.emit("error",w)}a(_),e.promise||r.emit("success",_)},g.onerror=function(_){if(m=null,up.revokeObjectURL(b),n(_),!e.promise)return r.emit("error",_)},g.src=b});return e.promise?t:r}rO.exports=A1e});var aA=R((eLe,nO)=>{"use strict";var tO=ia(),aO=Q6(),T1e=jn(),cs=fr(),fp=Uc(),M1e=M3(),S1e=S3(),k1e=Ry().version,tA={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 C1e(e,r){r=r||{};var t,a,n,i;cs.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=cs.getGraphDiv(e),t=cs.extendDeep([],e.data),a=cs.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function o(S){return!(S in r)||cs.validate(r[S],tA[S])}if(!o("width")&&r.width!==null||!o("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+cs.join2(tA.format.values,", "," or ")+".");var l={};function s(S,M){return cs.coerce(r,l,tA,S,M)}var u=s("format"),f=s("width"),c=s("height"),h=s("scale"),d=s("setBackground"),p=s("imageDataOnly"),g=document.createElement("div");g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);var m=cs.extendFlat({},a);f?m.width=f:r.width===null&&tO(i.width)&&(m.width=i.width),c?m.height=c:r.height===null&&tO(i.height)&&(m.height=i.height);var b=cs.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),_=fp.getRedrawFunc(g);function w(){return new Promise(function(S){setTimeout(S,fp.getDelay(g._fullLayout))})}function x(){return new Promise(function(S,M){var k=M1e(g,u,h),D=g._fullLayout.width,P=g._fullLayout.height;function N(){aO.purge(g),document.body.removeChild(g)}if(u==="full-json"){var q=T1e.graphJson(g,!1,"keepdata","object",!0,!0);return q.version=k1e,q=JSON.stringify(q),N(),S(p?q:fp.encodeJSON(q))}if(N(),u==="svg")return S(p?k:fp.encodeSVG(k));var O=document.createElement("canvas");O.id=cs.randstr(),S1e({format:u,width:D,height:P,scale:h,canvas:O,svg:k,promise:!0}).then(S).catch(M)})}function T(S){return p?S.replace(fp.IMAGE_URL_PREFIX,""):S}return new Promise(function(S,M){aO.newPlot(g,t,m,b).then(_).then(w).then(x).then(function(k){S(T(k))}).catch(function(k){M(k)})})}nO.exports=C1e});var sO=R((rLe,lO)=>{"use strict";var Jo=fr(),E1e=jn(),L1e=g0(),D1e=vc().dfltConfig,Ml=Jo.isPlainObject,Hc=Array.isArray,iO=Jo.isArrayOrTypedArray;lO.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=L1e.get(),n=[],i={_context:Jo.extendFlat({},D1e)},o,l;Hc(r)?(i.data=Jo.extendDeep([],r),o=r):(i.data=[],o=[],n.push(Kn("array","data"))),Ml(t)?(i.layout=Jo.extendDeep({},t),l=t):(i.layout={},l={},arguments.length>1&&n.push(Kn("object","layout"))),E1e.supplyDefaults(i);for(var s=i._fullData,u=o.length,f=0;fc.length&&a.push(Kn("unused",n,u.concat(c.length)));var b=c.length,_=Array.isArray(m);_&&(b=Math.min(b,m.length));var w,x,T,S,M;if(h.dimensions===2)for(x=0;xc[x].length&&a.push(Kn("unused",n,u.concat(x,c[x].length)));var k=c[x].length;for(w=0;w<(_?Math.min(k,m[x].length):k);w++)T=_?m[x][w]:m,S=f[x][w],M=c[x][w],Jo.validate(S,T)?M!==S&&M!==+S&&a.push(Kn("dynamic",n,u.concat(x,w),S,M)):a.push(Kn("value",n,u.concat(x,w),S))}else a.push(Kn("array",n,u.concat(x),f[x]));else for(x=0;x{"use strict";var O1e=fr(),C3=Uc();function z1e(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(o,l){var s,u;if(n)return s=C3.createBlob(e,t),u=C3.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),C3.revokeObjectURL(u),s=null,o(r);if(O1e.isSafari()){var f=t==="svg"?",":";base64,";return C3.octetStream(f+encodeURIComponent(e)),o(r)}l(new Error("download error"))});return i}uO.exports=z1e});var nA=R((nLe,vO)=>{"use strict";var cO=fr(),B1e=aA(),U1e=fO(),aLe=Uc();function G1e(e,r){var t;return cO.isPlainObject(e)||(t=cO.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=B1e(e,r),o=r.filename||e.fn||"newplot";o+="."+r.format.replace("-","."),i.then(function(l){return t&&(t._snapshotInProgress=!1),U1e(l,o,r.format)}).then(function(l){a(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),n(l)})})}vO.exports=G1e});var yO=R(iA=>{"use strict";var co=fr(),vo=co.isPlainObject,hO=g0(),dO=jn(),H1e=hl(),pO=Da(),mO=vc().dfltConfig;iA.makeTemplate=function(e){e=co.isPlainObject(e)?e:co.getGraphDiv(e),e=co.extendDeep({_context:mO},{data:e.data,layout:e.layout}),dO.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var p={};cp(d,p,Y1e.bind(null,d));var g=co.coerce(d,{},H1e,"type"),m=a.data[g];m||(m=a.data[g]=[]),m.push(p)}),cp(t,a.layout,V1e.bind(null,t)),delete a.layout.template;var n=t.template;if(vo(n)){var i=n.layout,o,l,s,u,f,c;vo(i)&&E3(i,a.layout);var h=n.data;if(vo(h)){for(l in a.data)if(s=h[l],Array.isArray(s)){for(f=a.data[l],c=f.length,u=s.length,o=0;ob?o.push({code:"unused",traceType:d,templateCount:m,dataCount:b}):b>m&&o.push({code:"reused",traceType:d,templateCount:m,dataCount:b})}}function _(w,x){for(var T in w)if(T.charAt(0)!=="_"){var S=w[T],M=$o(w,T,x);vo(S)?(Array.isArray(w)&&S._template===!1&&S.templateitemname&&o.push({code:"missing",path:M,templateitemname:S.templateitemname}),_(S,M)):Array.isArray(S)&&W1e(S)&&_(S,M)}}if(_({data:s,layout:l},""),o.length)return o.map(j1e)};function W1e(e){for(var r=0;r{"use strict";var On=Q6();Ya._doPlot=On._doPlot;Ya.newPlot=On.newPlot;Ya.restyle=On.restyle;Ya.relayout=On.relayout;Ya.redraw=On.redraw;Ya.update=On.update;Ya._guiRestyle=On._guiRestyle;Ya._guiRelayout=On._guiRelayout;Ya._guiUpdate=On._guiUpdate;Ya._storeDirectGUIEdit=On._storeDirectGUIEdit;Ya.react=On.react;Ya.extendTraces=On.extendTraces;Ya.prependTraces=On.prependTraces;Ya.addTraces=On.addTraces;Ya.deleteTraces=On.deleteTraces;Ya.moveTraces=On.moveTraces;Ya.purge=On.purge;Ya.addFrames=On.addFrames;Ya.deleteFrames=On.deleteFrames;Ya.animate=On.animate;Ya.setPlotConfig=On.setPlotConfig;var X1e=r1().getGraphDiv,Z1e=G2().eraseActiveShape;Ya.deleteActiveShape=function(e){return Z1e(X1e(e))};Ya.toImage=aA();Ya.validate=sO();Ya.downloadImage=nA();var gO=yO();Ya.makeTemplate=gO.makeTemplate;Ya.validateTemplate=gO.validateTemplate});var lA=R((lLe,xO)=>{"use strict";var oA=fr(),J1e=Ct();xO.exports=function(r,t,a,n){var i=n("x"),o=n("y"),l,s=J1e.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=oA.minRowLength(i);o?l=Math.min(u,oA.minRowLength(o)):(l=u,n("y0"),n("dy"))}else{if(!o)return 0;l=oA.minRowLength(o),n("x0"),n("dx")}return t._length=l,l}});var sA=R((sLe,AO)=>{"use strict";var _O=fr().dateTick0,$1e=_n(),K1e=$1e.ONEWEEK;function wO(e,r){return e%K1e===0?_O(r,1):_O(r,0)}AO.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",wO(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var l=n("yperiod");l&&(n("yperiod0",wO(l,t.ycalendar)),n("yperiodalignment"))}}});var SO=R((uLe,MO)=>{"use strict";var TO=["orientation","groupnorm","stackgaps"];MO.exports=function(r,t,a,n){var i=a._scatterStackOpts,o=n("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var u=s[o],f=!1;u?u.traces.push(t):(u=s[o]={traceIndices:[],traces:[t]},f=!0);for(var c={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var kO=Qt(),CO=gl().hasColorscale,EO=w0(),Q1e=ni();LO.exports=function(r,t,a,n,i,o){var l=Q1e.isBubble(r),s=(r.line||{}).color,u;if(o=o||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",l?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",a),CO(r,"marker")&&EO(r,t,n,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:l?u=kO.background:u=kO.defaultLine,i("marker.line.color",u),CO(r,"marker.line")&&EO(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",l?1:0)),l&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var uA=R((cLe,DO)=>{"use strict";var epe=fr().isArrayOrTypedArray,rpe=gl().hasColorscale,tpe=w0();DO.exports=function(r,t,a,n,i,o){o||(o={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),i("line.color",a),rpe(r,"line"))tpe(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(epe(l)?!1:l)||a;i("line.color",s)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var FO=R((vLe,qO)=>{"use strict";qO.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var fA=R((hLe,RO)=>{"use strict";var ape=fr();RO.exports=function(e,r,t,a,n){n=n||{},a("textposition"),ape.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var cA=R((dLe,NO)=>{"use strict";var q3=Qt(),PO=fr().isArrayOrTypedArray;function npe(e){for(var r=q3.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var IO=fr(),ipe=Ct(),ope=sf(),lpe=Q1(),J0=ni(),spe=lA(),upe=sA(),fpe=SO(),cpe=D3(),vpe=uA(),OO=FO(),hpe=fA(),dpe=cA(),ppe=fr().coercePattern;zO.exports=function(r,t,a,n){function i(d,p){return IO.coerce(r,t,ope,d,p)}var o=spe(r,t,n,i);if(o||(t.visible=!1),!!t.visible){upe(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var l=fpe(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!l&&o{"use strict";var mpe=N1().getAxisGroup;UO.exports=function(r,t,a,n,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=mpe(a,l)+o,u=a._alignmentOpts||{},f=n("alignmentgroup"),c=u[s];c||(c=u[s]={});var h=c[f];h?h.traces.push(t):h=c[f]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=h.offsetGroups,g=p[d];t._offsetIndex=0,(i!=="group"||d)&&(g||(g=p[d]={offsetIndex:Object.keys(p).length}),t._offsetIndex=g.offsetIndex)}});var vA=R((yLe,HO)=>{"use strict";var ype=fr(),gpe=GO(),bpe=sf();HO.exports=function(r,t){var a,n,i,o=t.scattermode;function l(h){return ype.coerce(n._input,n,bpe,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var c=r[f];if(c.type==="scatter"&&c.xaxis===s.xaxis&&c.yaxis===s.yaxis){c.opacity=void 0;break}}}}}});var YO=R((gLe,VO)=>{"use strict";var xpe=fr(),_pe=Sg();VO.exports=function(e,r){function t(n,i){return xpe.coerce(e,r,_pe,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var hA=R((bLe,jO)=>{"use strict";var wpe=ia(),WO=fr(),Ape=WO.dateTime2ms,F3=WO.incrementMonth,Tpe=_n(),Mpe=Tpe.ONEAVGMONTH;jO.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var o=r[a+"period"],l;if(wpe(o)){if(o=+o,o<=0)return{vals:n}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",c=i==="end",h=r[a+"period0"],d=Ape(h,u)||0,p=[],g=[],m=[],b=n.length,_=0;_w;)S=F3(S,-l,u);for(;S<=w;)S=F3(S,l,u);T=F3(S,-l,u)}else{for(x=Math.round((w-d)/o),S=d+x*o;S>w;)S-=o;for(;S<=w;)S+=o;T=S-o}p[_]=f?T:c?S:(T+S)/2,g[_]=T,m[_]=S}return{vals:p,starts:g,ends:m}}});var vp=R((xLe,ZO)=>{"use strict";var dA=gl().hasColorscale,pA=D4(),XO=ni();ZO.exports=function(r,t){XO.hasLines(t)&&dA(t,"line")&&pA(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),XO.hasMarkers(t)&&(dA(t,"marker")&&pA(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),dA(t,"marker.line")&&pA(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var mA=R((_Le,JO)=>{"use strict";var sn=fr();JO.exports=function(r,t){for(var a=0;a{"use strict";var $O=fr();KO.exports=function(r,t){$O.isArrayOrTypedArray(t.selectedpoints)&&$O.tagSelected(r,t)}});var $0=R((ALe,oz)=>{"use strict";var ez=ia(),gA=fr(),hp=Va(),rz=hA(),yA=_n().BADNUM,bA=ni(),Spe=vp(),kpe=mA(),Cpe=QO();function Epe(e,r){var t=e._fullLayout,a=r._xA=hp.getFromId(e,r.xaxis||"x","x"),n=r._yA=hp.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),l=rz(r,a,"x",i),s=rz(r,n,"y",o),u=l.vals,f=s.vals,c=r._length,h=new Array(c),d=r.ids,p=xA(r,t,a,n),g=!1,m,b,_,w,x,T;nz(t,r);var S="x",M="y",k;if(p)gA.pushUnique(p.traceIndices,r.index),m=p.orientation==="v",m?(M="s",k="x"):(S="s",k="y"),x=p.stackgaps==="interpolate";else{var D=az(r,c);tz(e,r,a,n,u,f,D)}var P=!!r.xperiodalignment,N=!!r.yperiodalignment;for(b=0;bb&&h[w].gap;)w--;for(T=h[w].s,_=h.length-1;_>w;_--)h[_].s=T;for(;b{"use strict";lz.exports=R3;var Lpe=fr().distinctVals;function R3(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var Ko=ia(),cf=fr().isArrayOrTypedArray,K0=_n().BADNUM,Dpe=Ct(),dp=Va(),qpe=N1().getAxisGroup,P3=sz();function Fpe(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;us+o||!Ko(l))}for(var f=0;f{"use strict";var dz=$0(),pz=hz().setGroupPositions;function Ype(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;uD[f]&&f{"use strict";var jpe=Ca(),_z=_n(),pp=_z.BADNUM,wz=_z.LOG_CLIP,gz=wz+.5,bz=wz-.5,N3=fr(),Xpe=N3.segmentsIntersect,xz=N3.constrain,SA=Q1();Az.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,o=n.type==="log",l=i.type==="log",s=n._length,u=i._length,f=t.backoff,c=a.marker,h=t.connectGaps,d=t.baseTolerance,p=t.shape,g=p==="linear",m=a.fill&&a.fill!=="none",b=[],_=SA.minTolerance,w=r.length,x=new Array(w),T=0,S,M,k,D,P,N,q,O,U,$,j,H,z,V,X,K;function ve(Ze){var oe=r[Ze];if(!oe)return!1;var ye=t.linearized?n.l2p(oe.x):n.c2p(oe.x),Ge=t.linearized?i.l2p(oe.y):i.c2p(oe.y);if(ye===pp){if(o&&(ye=n.c2p(oe.x,!0)),ye===pp)return!1;l&&Ge===pp&&(ye*=Math.abs(n._m*u*(n._m>0?gz:bz)/(i._m*s*(i._m>0?gz:bz)))),ye*=1e3}if(Ge===pp){if(l&&(Ge=i.c2p(oe.y,!0)),Ge===pp)return!1;Ge*=1e3}return[ye,Ge]}function xe(Ze,oe,ye,Ge){var Ie=ye-Ze,Wr=Ge-oe,tt=.5-Ze,$r=.5-oe,St=Ie*Ie+Wr*Wr,ea=Ie*tt+Wr*$r;if(ea>0&&ea1||Math.abs(tt.y-ye[0][1])>1)&&(tt=[tt.x,tt.y],Ge&&ke(tt,Ze)De||Ze[1]Y)return[xz(Ze[0],Ee,De),xz(Ze[1],Ce,Y)]}function yr(Ze,oe){if(Ze[0]===oe[0]&&(Ze[0]===Ee||Ze[0]===De)||Ze[1]===oe[1]&&(Ze[1]===Ce||Ze[1]===Y))return!0}function ir(Ze,oe){var ye=[],Ge=or(Ze),Ie=or(oe);return Ge&&Ie&&yr(Ge,Ie)||(Ge&&ye.push(Ge),Ie&&ye.push(Ie)),ye}function Xe(Ze,oe,ye){return function(Ge,Ie){var Wr=or(Ge),tt=or(Ie),$r=[];if(Wr&&tt&&yr(Wr,tt))return $r;Wr&&$r.push(Wr),tt&&$r.push(tt);var St=2*N3.constrain((Ge[Ze]+Ie[Ze])/2,oe,ye)-((Wr||Ge)[Ze]+(tt||Ie)[Ze]);if(St){var ea;Wr&&tt?ea=St>0==Wr[Ze]>tt[Ze]?Wr:tt:ea=Wr||tt,ea[Ze]+=St}return $r}}var Lr;p==="linear"||p==="spline"?Lr=Je:p==="hv"||p==="vh"?Lr=ir:p==="hvh"?Lr=Xe(0,Ee,De):p==="vhv"&&(Lr=Xe(1,Ce,Y));function Ar(Ze,oe){var ye=oe[0]-Ze[0],Ge=(oe[1]-Ze[1])/ye,Ie=(Ze[1]*oe[0]-oe[1]*Ze[0])/ye;return Ie>0?[Ge>0?Ee:De,Y]:[Ge>0?De:Ee,Ce]}function de(Ze){var oe=Ze[0],ye=Ze[1],Ge=oe===x[T-1][0],Ie=ye===x[T-1][1];if(!(Ge&&Ie))if(T>1){var Wr=oe===x[T-2][0],tt=ye===x[T-2][1];Ge&&(oe===Ee||oe===De)&&Wr?tt?T--:x[T-1]=Ze:Ie&&(ye===Ce||ye===Y)&&tt?Wr?T--:x[T-1]=Ze:x[T++]=Ze}else x[T++]=Ze}function Oe(Ze){x[T-1][0]!==Ze[0]&&x[T-1][1]!==Ze[1]&&de([Pe,Ne]),de(Ze),lr=null,Pe=Ne=0}var Ue=N3.isArrayOrTypedArray(c);function rt(Ze){if(Ze&&f&&(Ze.i=S,Ze.d=r,Ze.trace=a,Ze.marker=Ue?c[Ze.i]:c,Ze.backoff=f),se=Ze[0]/s,be=Ze[1]/u,Z=Ze[0]De?De:0,Te=Ze[1]Y?Y:0,Z||Te){if(!T)x[T++]=[Z||Ze[0],Te||Ze[1]];else if(lr){var oe=Lr(lr,Ze);oe.length>1&&(Oe(oe[0]),x[T++]=oe[1])}else Ke=Lr(x[T-1],Ze)[0],x[T++]=Ke;var ye=x[T-1];Z&&Te&&(ye[0]!==Z||ye[1]!==Te)?(lr&&(Pe!==Z&&Ne!==Te?de(Pe&&Ne?Ar(lr,Ze):[Pe||Z,Ne||Te]):Pe&&Ne&&de([Pe,Ne])),de([Z,Te])):Pe-Z&&Ne-Te&&de([Z||Pe,Te||Ne]),lr=Ze,Pe=Z,Ne=Te}else lr&&Oe(Lr(lr,Ze)[0]),x[T++]=Ze}for(S=0;Sre(N,Ur))break;k=N,z=U[0]*O[0]+U[1]*O[1],z>j?(j=z,D=N,q=!1):z=r.length||!N)break;rt(N),M=N}}lr&&de([Pe||lr[0],Ne||lr[1]]),b.push(x.slice(0,T))}var Ye=p.slice(p.length-1);if(f&&Ye!=="h"&&Ye!=="v"){for(var Ve=!1,pr=-1,Tr=[],mr=0;mr{"use strict";var Mz={tonextx:1,tonexty:1,tonext:1};Sz.exports=function(r,t,a){var n,i,o,l,s,u={},f=!1,c=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var Sl=ta(),Zpe=Ct(),mp=fr(),eh=mp.ensureSingle,Cz=mp.identity,un=Ca(),rh=ni(),Jpe=Tz(),$pe=kA(),I3=w6().tester;Ez.exports=function(r,t,a,n,i,o){var l,s,u=!i,f=!!i&&i.duration>0,c=$pe(r,t,a);if(l=n.selectAll("g.trace").data(c,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),Kpe(r,l,t),f){o&&(s=o());var h=Sl.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){n.selectAll("g.trace").each(function(d,p){kz(r,p,t,d,c,this,i)})})}else l.each(function(d,p){kz(r,p,t,d,c,this,i)});u&&l.exit().remove(),n.selectAll("path:not([d])").remove()};function Kpe(e,r,t){r.each(function(a){var n=eh(Sl.select(this),"g","fills");un.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var l=n.selectAll("g").data(o,Cz);l.enter().append("g"),l.exit().each(function(s){i[s]=null}).remove(),l.order().each(function(s){i[s]=eh(Sl.select(this),"path","js-fill")})})}function kz(e,r,t,a,n,i,o){var l=e._context.staticPlot,s;Qpe(e,r,t,a,n);var u=!!o&&o.duration>0;function f(Xe){return u?Xe.transition():Xe}var c=t.xaxis,h=t.yaxis,d=a[0].trace,p=d.line,g=Sl.select(i),m=eh(g,"g","errorbars"),b=eh(g,"g","lines"),_=eh(g,"g","points"),w=eh(g,"g","text");if(Zpe.getComponentMethod("errorbars","plot")(e,m,t,o),d.visible!==!0)return;f(g).style("opacity",d.opacity);var x,T,S=d.fill.charAt(d.fill.length-1);S!=="x"&&S!=="y"&&(S="");var M,k;S==="y"?(M=1,k=h.c2p(0,!0)):S==="x"&&(M=0,k=c.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=g;var D="",P=[],N=d._prevtrace,q=null,O=null;N&&(D=N._prevRevpath||"",T=N._nextFill,P=N._ownPolygons,q=N._fillsegments,O=N._fillElement);var U,$,j="",H="",z,V,X,K,ve,xe,se=[];d._polygons=[];var be=[],re=[],ke=mp.noop;if(x=d._ownFill,rh.hasLines(d)||d.fill!=="none"){T&&T.datum(a),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(z=un.steps(p.shape),V=un.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?z=V=function(Xe){var Lr=Xe[Xe.length-1];return Xe.length>1&&Xe[0][0]===Lr[0]&&Xe[0][1]===Lr[1]?un.smoothclosed(Xe.slice(1),p.smoothing):un.smoothopen(Xe,p.smoothing)}:z=V=function(Xe){return"M"+Xe.join("L")},X=function(Xe){return V(Xe.reverse())},re=Jpe(a,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),be=new Array(re.length);var ge=0;for(s=0;s=l[0]&&g.x<=l[1]&&g.y>=s[0]&&g.y<=s[1]}),h=Math.ceil(c.length/f),d=0;n.forEach(function(g,m){var b=g[0].trace;rh.hasMarkers(b)&&b.marker.maxdisplayed>0&&m{"use strict";Dz.exports={container:"marker",min:"cmin",max:"cmax"}});var CA=R((DLe,qz)=>{"use strict";var z3=Va();qz.exports=function(r,t,a){var n={},i={_fullLayout:a},o=z3.getFromTrace(i,t,"x"),l=z3.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=z3.tickText(o,o.c2l(s),!0).text,n.yLabel=z3.tickText(l,l.c2l(u),!0).text,n}});var qA=R((qLe,Fz)=>{"use strict";var EA=ta(),th=Ca(),eme=Ct();function rme(e){var r=EA.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=EA.select(this),n=t.trace||t[0].trace;LA(a,n,e)}),r.selectAll("g.text").each(function(t){var a=EA.select(this),n=t.trace||t[0].trace;DA(a,n,e)}),r.selectAll("g.trace path.js-line").call(th.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(th.fillGroupStyle,e,!1),eme.getComponentMethod("errorbars","style")(r)}function LA(e,r,t){th.pointStyle(e.selectAll("path.point"),r,t)}function DA(e,r,t){th.textPointStyle(e.selectAll("text"),r,t)}function tme(e,r,t){var a=r[0].trace;a.selectedpoints?(th.selectedPointStyle(t.selectAll("path.point"),a),th.selectedTextStyle(t.selectAll("text"),a)):(LA(t,a,e),DA(t,a,e))}Fz.exports={style:rme,stylePoints:LA,styleText:DA,styleOnSelect:tme}});var FA=R((FLe,Rz)=>{"use strict";var ah=Qt(),ame=ni();Rz.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&ah.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,o=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&ah.opacity(i)?i:o&&ah.opacity(o)&&(t.mlw||((r.marker||{}).line||{}).width)?o:"",n?ah.opacity(n)<.3?ah.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&ah.opacity(a)&&ame.hasLines(r)&&r.line.width?a:r.fillcolor)}});var Iz=R((RLe,Nz)=>{"use strict";var B3=fr(),Pz=rf(),nme=Ct(),ime=FA(),RA=Qt(),ome=B3.fillText;Nz.exports=function(r,t,a,n){var i=r.cd,o=i[0].trace,l=r.xa,s=r.ya,u=l.c2p(t),f=s.c2p(a),c=[u,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,g=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(H){if(p){var z=l.c2p(H.xStart),V=l.c2p(H.xEnd);return u>=Math.min(z,V)&&u<=Math.max(z,V)?0:1/0}var X=Math.max(3,H.mrc||0),K=1-1/X,ve=Math.abs(l.c2p(H.x)-u);return ve=Math.min(z,V)&&f<=Math.max(z,V)?0:1/0}var X=Math.max(3,H.mrc||0),K=1-1/X,ve=Math.abs(s.c2p(H.y)-f);return vese!=Y>=se&&(Ee=ke[re-1][0],De=ke[re][0],Y-Ce&&(ge=Ee+(De-Ee)*(se-Ce)/(Y-Ce),X=Math.min(X,ge),K=Math.max(K,ge)));return X=Math.max(X,0),K=Math.min(K,l._length),{x0:X,x1:K,y0:se,y1:se}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=q(o._fillElement)&&!q(o._fillExclusionElement);if(U){var $=O(o._polygons);$===null&&($={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var j=RA.defaultLine;return RA.opacity(o.fillcolor)?j=o.fillcolor:RA.opacity((o.line||{}).color)&&(j=o.line.color),B3.extendFlat(r,{distance:r.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:j,hovertemplate:!1}),delete r.index,o.text&&!B3.isArrayOrTypedArray(o.text)?r.text=String(o.text):r.text=o.name,[r]}}}});var Bz=R((PLe,zz)=>{"use strict";var Oz=ni();zz.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l=a[0].trace,s,u,f,c,h=!Oz.hasMarkers(l)&&!Oz.hasText(l);if(h)return[];if(t===!1)for(s=0;s{"use strict";Uz.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var Wz=R((ILe,Yz)=>{"use strict";var yp=Ct().traceIs,PA=$4();Yz.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(lme(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function lme(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=sme(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=a+"calendar",l=i[o],s={noMultiCategory:!yp(i,"cartesian")||yp(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,Vz(i,a)){var u=Hz(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(Vz(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function Hz(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Vz(e,r){var t=Hz(e),a=yp(e,"box-violin"),n=yp(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var Xz=R((OLe,jz)=>{"use strict";var ume=ro().isTypedArraySpec;function fme(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,o;if(r.axData)n=r.axData;else for(n=[],i=0;i0||ume(i),l;o&&(l="array");var s=a("categoryorder",l),u;s==="array"&&(u=a("categoryarray")),!o&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=fme(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var $z=R((zLe,Jz)=>{"use strict";var Zz=vl().mix,cme=Kl(),vme=fr();Jz.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function o(M,k){return vme.coerce2(r,t,n.attributes,M,k)}var l=o("linecolor",i),s=o("linewidth"),u=a("showline",n.showLine||!!l||!!s);u||(delete t.linecolor,delete t.linewidth);var f=Zz(i,n.bgColor,n.blend||cme.lightFraction).toRgbString(),c=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),p=a("showgrid",n.showGrid||!!c||!!h||!!d);if(p||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var g=Zz(t.gridcolor,n.bgColor,67).toRgbString(),m=o("minor.gridcolor",g),b=o("minor.gridwidth",t.gridwidth||1),_=o("minor.griddash",t.griddash||"solid"),w=a("minor.showgrid",!!m||!!b||!!_);w||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var x=o("zerolinecolor",i),T=o("zerolinewidth"),S=a("zeroline",n.showGrid||!!x||!!T);S||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var IA=R((BLe,aB)=>{"use strict";var Kz=ia(),hme=Ct(),gp=fr(),dme=Da(),pme=wo(),NA=Bo(),Qz=x4(),eB=w4(),mme=M4(),yme=S4(),gme=Xz(),bme=$z(),xme=yw(),rB=Jg(),U3=ai().WEEKDAY_PATTERN,_me=ai().HOUR_PATTERN;aB.exports=function(r,t,a,n,i){var o=n.letter,l=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},c=t.type||f.type||"-",h;if(c==="date"){var d=hme.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(h=a("ticklabelmode"))}!n.noTicklabelindex&&(c==="date"||c==="linear")&&a("ticklabelindex");var p="";(!n.noTicklabelposition||c==="multicategory")&&(p=gp.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),rB(t,i),xme(r,t,a,n),gme(r,t,a,n),c!=="category"&&!n.noHover&&a("hoverformat");var g=a("color"),m=g!==NA.color.dflt?g:l.color,b=s.label||i._dfltTitle[o];if(yme(r,t,a,c,n),!u)return t;a("title.text",b),gp.coerceFont(a,"title.font",l,{overrideDflt:{size:gp.bigFont(l.size),color:m}}),Qz(r,t,a,c);var _=n.hasMinor;if(_&&(dme.newContainer(t,"minor"),Qz(r,t,a,c,{isMinor:!0})),mme(r,t,a,c,n),eB(r,t,a,n),_){var w=n.isMinor;n.isMinor=!0,eB(r,t,a,n),n.isMinor=w}bme(r,t,a,{dfltColor:g,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:_,attributes:NA}),_&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var x=c==="multicategory";if(!n.noTickson&&(c==="category"||x)&&(t.ticks||t.showgrid)){var T;x&&(T="boundaries");var S=a("tickson",T);S==="boundaries"&&delete t.ticklabelposition}if(x){var M=a("showdividers");M&&(a("dividercolor"),a("dividerwidth"))}if(c==="date")if(pme(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:wme}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var k=0;k=2){var o="",l,s;if(i.length===2){for(l=0;l<2;l++)if(s=tB(i[l]),s){o=U3;break}}var u=a("pattern",o);if(u===U3)for(l=0;l<2;l++)s=tB(i[l]),s&&(r.bounds[l]=i[l]=s-1);if(u)for(l=0;l<2;l++)switch(s=i[l],u){case U3:if(!Kz(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[l]=i[l]=s;break;case _me:if(!Kz(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[l]=i[l]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var Tme=ia(),G3=fr();nB.exports=function(r,t,a,n){var i=n.counterAxes||[],o=n.overlayableAxes||[],l=n.letter,s=n.grid,u=n.overlayingDomain,f,c,h,d,p,g;s&&(c=s._domains[l][s._axisMap[t._id]],f=s._anchors[t._id],c&&(h=s[l+"side"].split(" ")[0],d=s.domain[l][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(Tme(r.position)?"free":i[0]||"free"),h=h||(l==="x"?"bottom":"left"),d=d||0,p=0,g=!1;var m=G3.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),b=G3.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(l==="y"){var _=a("autoshift");_&&(d=b==="left"?u[0]:u[1],g=t.automargin?t.automargin:!0,p=b==="left"?-3:3),a("shift",p)}a("position",d)}a("automargin",g);var w=!1;if(o.length&&(w=G3.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!w){var x=a("domain",c);x[0]>x[1]-1/4096&&(t.domain=c),G3.noneOrAll(r.domain,t.domain,c),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var hB=R((GLe,vB)=>{"use strict";var Vc=fr(),iB=Qt(),Mme=js().isUnifiedHover,Sme=Yw(),oB=Da(),kme=l0(),lB=Bo(),Cme=Wz(),sB=IA(),Eme=N1(),uB=OA(),BA=an(),vs=BA.id2name,fB=BA.name2id,Lme=ai().AX_ID_PATTERN,cB=Ct(),H3=cB.traceIs,zA=cB.getComponentMethod;function V3(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}vB.exports=function(r,t,a){var n=t.autotypenumbers,i={},o={},l={},s={},u={},f={},c={},h={},d={},p={},g,m;for(g=0;g{"use strict";var Dme=ta(),dB=Ct(),Y3=fr(),ko=Ca(),W3=Va();pB.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){W3.redrawComponents(r);return}function o(m){var b=m.xaxis,_=m.yaxis;i._defs.select("#"+m.clipId+"> rect").call(ko.setTranslate,0,0).call(ko.setScale,1,1),m.plot.call(ko.setTranslate,b._offset,_._offset).call(ko.setScale,1,1);var w=m.plot.selectAll(".scatterlayer .trace");w.selectAll(".point").call(ko.setPointGroupScale,1,1),w.selectAll(".textpoint").call(ko.setTextPointsScale,1,1),w.call(ko.hideOutsideRangePoints,m)}function l(m,b){var _=m.plotinfo,w=_.xaxis,x=_.yaxis,T=w._length,S=x._length,M=!!m.xr1,k=!!m.yr1,D=[];if(M){var P=Y3.simpleMap(m.xr0,w.r2l),N=Y3.simpleMap(m.xr1,w.r2l),q=P[1]-P[0],O=N[1]-N[0];D[0]=(P[0]*(1-b)+b*N[0]-P[0])/(P[1]-P[0])*T,D[2]=T*(1-b+b*O/q),w.range[0]=w.l2r(P[0]*(1-b)+b*N[0]),w.range[1]=w.l2r(P[1]*(1-b)+b*N[1])}else D[0]=0,D[2]=T;if(k){var U=Y3.simpleMap(m.yr0,x.r2l),$=Y3.simpleMap(m.yr1,x.r2l),j=U[1]-U[0],H=$[1]-$[0];D[1]=(U[1]*(1-b)+b*$[1]-U[1])/(U[0]-U[1])*S,D[3]=S*(1-b+b*H/j),x.range[0]=w.l2r(U[0]*(1-b)+b*$[0]),x.range[1]=x.l2r(U[1]*(1-b)+b*$[1])}else D[1]=0,D[3]=S;W3.drawOne(r,w,{skipTitle:!0}),W3.drawOne(r,x,{skipTitle:!0}),W3.redrawComponents(r,[w._id,x._id]);var z=M?T/D[2]:1,V=k?S/D[3]:1,X=M?D[0]:0,K=k?D[1]:0,ve=M?D[0]/D[2]*T:0,xe=k?D[1]/D[3]*S:0,se=w._offset-ve,be=x._offset-xe;_.clipRect.call(ko.setTranslate,X,K).call(ko.setScale,1/z,1/V),_.plot.call(ko.setTranslate,se,be).call(ko.setScale,z,V),ko.setPointGroupScale(_.zoomScalePts,1/z,1/V),ko.setTextPointsScale(_.zoomScaleTxt,1/z,1/V)}var s;n&&(s=n());function u(){for(var m={},b=0;ba.duration?(u(),d=window.cancelAnimationFrame(g)):d=window.requestAnimationFrame(g)}return c=Date.now(),d=window.requestAnimationFrame(g),Promise.resolve()}});var bp=R(_i=>{"use strict";var X3=ta(),yB=Ct(),Yc=fr(),qme=jn(),Fme=Ca(),gB=v1().getModuleCalcData,vf=an(),kl=ai(),Rme=ju(),ya=Yc.ensureSingle;function j3(e,r,t){return Yc.ensureSingle(e,r,t,function(a){a.datum(t)})}var Wc=kl.zindexSeparator;_i.name="cartesian";_i.attr=["xaxis","yaxis"];_i.idRoot=["x","y"];_i.idRegex=kl.idRegex;_i.attrRegex=kl.attrRegex;_i.attributes=Gz();_i.layoutAttributes=Bo();_i.supplyLayoutDefaults=hB();_i.transitionAxes=mB();_i.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,o=i,l={},s={},u,f,c;for(u=0;u0){var d=h.id;if(d.indexOf(Wc)!==-1)continue;d+=Wc+(u+1),h=Yc.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],g,m=0;m1&&(T+=Wc+x),w.push(l+T),o=0;o1,c=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=ya(a,"path","xlines-above"),r.ylines=ya(a,"path","ylines-above"),r.xaxislayer=ya(a,"g","xaxislayer-above"),r.yaxislayer=ya(a,"g","yaxislayer-above");else{if(!o){var h=ya(a,"g","layer-subplot");r.shapelayer=ya(h,"g","shapelayer"),r.imagelayer=ya(h,"g","imagelayer"),c&&f?(r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer):(r.minorGridlayer=ya(a,"g","minor-gridlayer"),r.gridlayer=ya(a,"g","gridlayer"),r.zerolinelayer=ya(a,"g","zerolinelayer"));var d=ya(a,"g","layer-between");r.shapelayerBetween=ya(d,"g","shapelayer"),r.imagelayerBetween=ya(d,"g","imagelayer"),ya(a,"path","xlines-below"),ya(a,"path","ylines-below"),r.overlinesBelow=ya(a,"g","overlines-below"),ya(a,"g","xaxislayer-below"),ya(a,"g","yaxislayer-below"),r.overaxesBelow=ya(a,"g","overaxes-below")}r.overplot=ya(a,"g","overplot"),r.plot=ya(r.overplot,"g",n),o||(r.xlines=ya(a,"path","xlines-above"),r.ylines=ya(a,"path","ylines-above"),r.overlinesAbove=ya(a,"g","overlines-above"),ya(a,"g","xaxislayer-above"),ya(a,"g","yaxislayer-above"),r.overaxesAbove=ya(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+l),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+l),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var p=c.plotgroup,g=n+"-x",m=n+"-y";r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer,ya(c.overlinesBelow,"path",g),ya(c.overlinesBelow,"path",m),ya(c.overaxesBelow,"g",g),ya(c.overaxesBelow,"g",m),r.plot=ya(c.overplot,"g",n),ya(c.overlinesAbove,"path",g),ya(c.overlinesAbove,"path",m),ya(c.overaxesAbove,"g",g),ya(c.overaxesAbove,"g",m),r.xlines=p.select(".overlines-"+l).select("."+g),r.ylines=p.select(".overlines-"+s).select("."+m),r.xaxislayer=p.select(".overaxes-"+l).select("."+g),r.yaxislayer=p.select(".overaxes-"+s).select("."+m)}o||(u||(j3(r.minorGridlayer,"g",r.xaxis._id),j3(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(b){return b[0]}).sort(vf.idSort),j3(r.gridlayer,"g",r.xaxis._id),j3(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(b){return b[0]}).sort(vf.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function _B(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=X3.select(this);f.remove(),wB(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],o=0;o{"use strict";var Z3=ni();AB.exports={hasLines:Z3.hasLines,hasMarkers:Z3.hasMarkers,hasText:Z3.hasText,isBubble:Z3.isBubble,attributes:sf(),layoutAttributes:Sg(),supplyDefaults:BO(),crossTraceDefaults:vA(),supplyLayoutDefaults:YO(),calc:$0().calc,crossTraceCalc:yz(),arraysToCalcdata:mA(),plot:Lz(),colorbar:O3(),formatLabels:CA(),style:qA().style,styleOnSelect:qA().styleOnSelect,hoverPoints:Iz(),selectPoints:Bz(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:bp(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var kB=R((WLe,SB)=>{"use strict";var Nme=ta(),Ime=Qt(),MB=R6(),UA=fr(),Ome=UA.strScale,zme=UA.strRotate,Bme=UA.strTranslate;SB.exports=function(r,t,a){var n=r.node(),i=MB[a.arrowhead||0],o=MB[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,c=i.backoff*l+a.standoff,h=o.backoff*s+a.startstandoff,d,p,g,m;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},p={x:+r.attr("x2"),y:+r.attr("y2")};var b=d.x-p.x,_=d.y-p.y;if(g=Math.atan2(_,b),m=g+Math.PI,c&&h&&c+h>Math.sqrt(b*b+_*_)){U();return}if(c){if(c*c>b*b+_*_){U();return}var w=c*Math.cos(g),x=c*Math.sin(g);p.x+=w,p.y+=x,r.attr({x2:p.x,y2:p.y})}if(h){if(h*h>b*b+_*_){U();return}var T=h*Math.cos(g),S=h*Math.sin(g);d.x-=T,d.y-=S,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var M=n.getTotalLength(),k="";if(M{"use strict";var CB=ta(),GA=Ct(),Ume=jn(),df=fr(),HA=df.strTranslate,_p=Va(),jc=Qt(),eu=Ca(),EB=rf(),VA=Ci(),YA=ef(),xp=xl(),Gme=Da().arrayEditor,Hme=kB();qB.exports={draw:Vme,drawOne:LB,drawRaw:DB};function Vme(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?Ie="right":Ie="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ie]}for(var Ce=!1,Y=["x","y"],ae=0;ae1)&&(Pe===Te?(Ur=Ne.r2fraction(r["a"+Z]),(Ur<0||Ur>1)&&(Ce=!0)):Ce=!0),Lr=Ne._offset+Ne.r2p(r[Z]),Oe=.5}else{var Ye=rt==="domain";Z==="x"?(de=r[Z],Lr=Ye?Ne._offset+Ne._length*de:Lr=l.l+l.w*de):(de=1-r[Z],Lr=Ye?Ne._offset+Ne._length*de:Lr=l.t+l.h*de),Oe=r.showarrow?.5:de}if(r.showarrow){Xe.head=Lr;var Ve=r["a"+Z];if(Ue=Ke*De(.5,r.xanchor)-Je*De(.5,r.yanchor),Pe===Te){var pr=_p.getRefType(Pe);pr==="domain"?(Z==="y"&&(Ve=1-Ve),Xe.tail=Ne._offset+Ne._length*Ve):pr==="paper"?Z==="y"?(Ve=1-Ve,Xe.tail=l.t+l.h*Ve):Xe.tail=l.l+l.w*Ve:Xe.tail=Ne._offset+Ne.r2p(Ve),Ar=Ue}else Xe.tail=Lr+Ve,Ar=Ue+Ve;Xe.text=Xe.tail+Ue;var Tr=o[Z==="x"?"width":"height"];if(Te==="paper"&&(Xe.head=df.constrain(Xe.head,1,Tr-1)),Pe==="pixel"){var mr=-Math.max(Xe.tail-3,Xe.text),vr=Math.min(Xe.tail+3,Xe.text)-Tr;mr>0?(Xe.tail+=mr,Xe.text+=mr):vr>0&&(Xe.tail-=vr,Xe.text-=vr)}Xe.tail+=ir,Xe.head+=ir}else Ue=or*De(Oe,yr),Ar=Ue,Xe.text=Lr+Ue;Xe.text+=ir,Ue+=ir,Ar+=ir,r["_"+Z+"padplus"]=or/2+Ar,r["_"+Z+"padminus"]=or/2-Ar,r["_"+Z+"size"]=or,r["_"+Z+"shift"]=Ue}if(Ce){M.remove();return}var Cr=0,Ir=0;if(r.align!=="left"&&(Cr=(re-se)*(r.align==="center"?.5:1)),r.valign!=="top"&&(Ir=(ke-be)*(r.valign==="middle"?.5:1)),ve)K.select("svg").attr({x:P+Cr-1,y:P+Ir}).call(eu.setClipUrl,q?g:null,e);else{var Gr=P+Ir-xe.top,Ze=P+Cr-xe.left;j.call(VA.positionText,Ze,Gr).call(eu.setClipUrl,q?g:null,e)}O.select("rect").call(eu.setRect,P,P,re,ke),N.call(eu.setRect,k/2,k/2,ge-k,Ee-k),M.call(eu.setTranslate,Math.round(m.x.text-ge/2),Math.round(m.y.text-Ee/2)),w.attr({transform:"rotate("+b+","+m.x.text+","+m.y.text+")"});var oe=function(Ge,Ie){_.selectAll(".annotation-arrow-g").remove();var Wr=m.x.head,tt=m.y.head,$r=m.x.tail+Ge,St=m.y.tail+Ie,ea=m.x.text+Ge,ma=m.y.text+Ie,aa=df.rotationXYMatrix(b,ea,ma),Qa=df.apply2DTransform(aa),Ln=df.apply2DTransform2(aa),si=+N.attr("width"),Dn=+N.attr("height"),Vi=ea-.5*si,Bn=Vi+si,qn=ma-.5*Dn,yi=qn+Dn,_t=[[Vi,qn,Vi,yi],[Vi,yi,Bn,yi],[Bn,yi,Bn,qn],[Bn,qn,Vi,qn]].map(Ln);if(!_t.reduce(function(Aa,Un){return Aa^!!df.segmentsIntersect(Wr,tt,Wr+1e6,tt+1e6,Un[0],Un[1],Un[2],Un[3])},!1)){_t.forEach(function(Aa){var Un=df.segmentsIntersect($r,St,Wr,tt,Aa[0],Aa[1],Aa[2],Aa[3]);Un&&($r=Un.x,St=Un.y)});var Ma=r.arrowwidth,ra=r.arrowcolor,Pa=r.arrowside,Xa=_.append("g").style({opacity:jc.opacity(ra)}).classed("annotation-arrow-g",!0),Sa=Xa.append("path").attr("d","M"+$r+","+St+"L"+Wr+","+tt).style("stroke-width",Ma+"px").call(jc.stroke,jc.rgb(ra));if(Hme(Sa,Pa,r),s.annotationPosition&&Sa.node().parentNode&&!a){var La=Wr,en=tt;if(r.standoff){var on=Math.sqrt(Math.pow(Wr-$r,2)+Math.pow(tt-St,2));La+=r.standoff*($r-Wr)/on,en+=r.standoff*(St-tt)/on}var Yi=Xa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+($r-La)+","+(St-en),transform:HA(La,en)}).style("stroke-width",Ma+6+"px").call(jc.stroke,"rgba(0,0,0,0)").call(jc.fill,"rgba(0,0,0,0)"),Wi,xn;xp.init({element:Yi.node(),gd:e,prepFn:function(){var Aa=eu.getTranslate(M);Wi=Aa.x,xn=Aa.y,n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(Aa,Un){var _s=Qa(Wi,xn),ws=_s[0]+Aa,Bl=_s[1]+Un;M.call(eu.setTranslate,ws,Bl),d("x",hf(n,Aa,"x",l,r)),d("y",hf(i,Un,"y",l,r)),r.axref===r.xref&&d("ax",hf(n,Aa,"ax",l,r)),r.ayref===r.yref&&d("ay",hf(i,Un,"ay",l,r)),Xa.attr("transform",HA(Aa,Un)),w.attr({transform:"rotate("+b+","+ws+","+Bl+")"})},doneFn:function(){GA.call("_guiRelayout",e,p());var Aa=document.querySelector(".js-notes-box-panel");Aa&&Aa.redraw(Aa.selectedObj)}})}}};if(r.showarrow&&oe(0,0),x){var ye;xp.init({element:M.node(),gd:e,prepFn:function(){ye=w.attr("transform")},moveFn:function(Ge,Ie){var Wr="pointer";if(r.showarrow)r.axref===r.xref?d("ax",hf(n,Ge,"ax",l,r)):d("ax",r.ax+Ge),r.ayref===r.yref?d("ay",hf(i,Ie,"ay",l.w,r)):d("ay",r.ay+Ie),oe(Ge,Ie);else{if(a)return;var tt,$r;if(n)tt=hf(n,Ge,"x",l,r);else{var St=r._xsize/l.w,ea=r.x+(r._xshift-r.xshift)/l.w-St/2;tt=xp.align(ea+Ge/l.w,St,0,1,r.xanchor)}if(i)$r=hf(i,Ie,"y",l,r);else{var ma=r._ysize/l.h,aa=r.y-(r._yshift+r.yshift)/l.h-ma/2;$r=xp.align(aa-Ie/l.h,ma,0,1,r.yanchor)}d("x",tt),d("y",$r),(!n||!i)&&(Wr=xp.getCursor(n?.5:tt,i?.5:$r,r.xanchor,r.yanchor))}w.attr({transform:HA(Ge,Ie)+ye}),YA(M,Wr)},clickFn:function(Ge,Ie){r.captureevents&&e.emit("plotly_clickannotation",S(Ie))},doneFn:function(){YA(M),GA.call("_guiRelayout",e,p());var Ge=document.querySelector(".js-notes-box-panel");Ge&&Ge.redraw(Ge.selectedObj)}})}}s.annotationText?j.call(VA.makeEditable,{delegate:M,gd:e}).call(H).on("edit",function(V){r.text=V,this.call(H),d("text",V),n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),GA.call("_guiRelayout",e,p())}):j.call(H)}});var OB=R((XLe,IB)=>{"use strict";var FB=fr(),Yme=Ct(),RB=Da().arrayEditor;IB.exports={hasClickToShow:Wme,onClick:jme};function Wme(e,r){var t=NB(e,r);return t.on.length>0||t.explicitOff.length>0}function jme(e,r){var t=NB(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},o=e._fullLayout.annotations,l,s;if(a.length||n.length){for(l=0;l{"use strict";var WA=fr(),nh=Qt();zB.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),o=n("bordercolor"),l=nh.opacity(o);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),WA.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var c=n("arrowside"),h,d;c.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),c.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",l?t.bordercolor:nh.defaultLine),n("arrowwidth",(l&&s||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),g=a.hoverlabel||{};if(p){var m=n("hoverlabel.bgcolor",g.bgcolor||(nh.opacity(i)?nh.rgb(i):nh.defaultLine)),b=n("hoverlabel.bordercolor",g.bordercolor||nh.contrast(m)),_=WA.extendFlat({},g.font);_.color||(_.color=b),WA.coerceFont(n,"hoverlabel.font",_)}n("captureevents",!!p)}});var UB=R((JLe,BB)=>{"use strict";var XA=fr(),Xc=Va(),Xme=wo(),Zme=jA(),Jme=j0();BB.exports=function(r,t){Xme(r,t,{name:"annotations",handleItemDefaults:$me})};function $me(e,r,t){function a(w,x){return XA.coerce(e,r,Jme,w,x)}var n=a("visible"),i=a("clicktoshow");if(n||i){Zme(e,r,t,a);for(var o=r.showarrow,l=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var c=l[f],h=Xc.coerceRef(e,r,u,c,"","paper");if(h!=="paper"){var d=Xc.getFromId(u,h);d._annIndices.push(r._index)}if(Xc.coercePosition(r,u,a,h,c,.5),o){var p="a"+c,g=Xc.coerceRef(e,r,u,p,"pixel",["pixel","paper"]);g!=="pixel"&&g!==h&&(g=r[p]="pixel");var m=g==="pixel"?s[f]:.4;Xc.coercePosition(r,u,a,g,p,m)}a(c+"anchor"),a(c+"shift")}if(XA.noneOrAll(e,r,["x","y"]),o&&XA.noneOrAll(e,r,["ax","ay"]),i){var b=a("xclick"),_=a("yclick");r._xclick=b===void 0?r.x:Xc.cleanPosition(b,u,r.xref),r._yclick=_===void 0?r.y:Xc.cleanPosition(_,u,r.yref)}}}});var VB=R(($Le,HB)=>{"use strict";var ZA=fr(),Zc=Va(),Kme=J3().draw;HB.exports=function(r){var t=r._fullLayout,a=ZA.filterVisible(t.annotations);if(a.length&&r._fullData.length)return ZA.syncOrAsync([Kme,Qme],r)};function Qme(e){var r=e._fullLayout;ZA.filterVisible(r.annotations).forEach(function(t){var a=Zc.getFromId(e,t.xref),n=Zc.getFromId(e,t.yref),i=Zc.getRefType(t.xref),o=Zc.getRefType(t.yref);t._extremes={},i==="range"&&GB(t,a),o==="range"&&GB(t,n)})}function GB(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],o=e[a+"ref"],l=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,g=p+f,m=p-f,b;if(l===o){var _=Zc.findExtremes(r,[r.r2c(n)],{ppadplus:h,ppadminus:d}),w=Zc.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,g),ppadminus:Math.max(u,m)});b={min:[_.min[0],w.min[0]],max:[_.max[0],w.max[0]]}}else g=i?g+i:g,m=i?m-i:m,b=Zc.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,h,g),ppadminus:Math.max(u,d,m)});e._extremes[t]=b}});var WB=R((KLe,YB)=>{"use strict";var eye=ia(),rye=Vy();YB.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(!(i||o))return;var l=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function c(d){var p=u[d],g=null;i?g=rye(p,t.range):g=Math.pow(10,p),eye(g)||(g=null),n(f+d,g)}for(var h=0;h{"use strict";var JA=J3(),jB=OB();XB.exports={moduleType:"component",name:"annotations",layoutAttributes:j0(),supplyLayoutDefaults:UB(),includeBasePlot:ep()("annotations"),calcAutorange:VB(),draw:JA.draw,drawOne:JA.drawOne,drawRaw:JA.drawRaw,hasClickToShow:jB.hasClickToShow,onClick:jB.onClick,convertCoords:WB()}});var $3=R((eDe,JB)=>{"use strict";var Na=j0(),tye=dl().overrideAll,aye=Da().templatedArray;JB.exports=tye(aye("annotation",{visible:Na.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Na.xanchor,xshift:Na.xshift,yanchor:Na.yanchor,yshift:Na.yshift,text:Na.text,textangle:Na.textangle,font:Na.font,width:Na.width,height:Na.height,opacity:Na.opacity,align:Na.align,valign:Na.valign,bgcolor:Na.bgcolor,bordercolor:Na.bordercolor,borderpad:Na.borderpad,borderwidth:Na.borderwidth,showarrow:Na.showarrow,arrowcolor:Na.arrowcolor,arrowhead:Na.arrowhead,startarrowhead:Na.startarrowhead,arrowside:Na.arrowside,arrowsize:Na.arrowsize,startarrowsize:Na.startarrowsize,arrowwidth:Na.arrowwidth,standoff:Na.standoff,startstandoff:Na.startstandoff,hovertext:Na.hovertext,hoverlabel:Na.hoverlabel,captureevents:Na.captureevents}),"calc","from-root")});var KB=R((rDe,$B)=>{"use strict";var $A=fr(),nye=Va(),iye=wo(),oye=jA(),lye=$3();$B.exports=function(r,t,a){iye(r,t,{name:"annotations",handleItemDefaults:sye,fullLayout:a.fullLayout})};function sye(e,r,t,a){function n(l,s){return $A.coerce(e,r,lye,l,s)}function i(l){var s=l+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],nye.coercePosition(r,u,n,l,l,.5)}var o=n("visible");o&&(oye(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),$A.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),$A.noneOrAll(e,r,["ax","ay"])))}});var tU=R((tDe,rU)=>{"use strict";var QB=fr(),eU=Va();rU.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function KA(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function fye(e,r){var t=KA(e.projection,KA(e.view,KA(e.model,[r[0],r[1],r[2],1])));return t}aU.exports=fye});var oU=R((nDe,iU)=>{"use strict";var cye=J3().drawRaw,vye=nU(),hye=["x","y","z"];iU.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(o._pdata=vye(r.glplot.cameraParams,[t.xaxis.r2l(o.x)*a[0],t.yaxis.r2l(o.y)*a[1],t.zaxis.r2l(o.z)*a[2]]),cye(r.graphDiv,o,i,r.id,o._xa,o._ya))}}});var uU=R((iDe,sU)=>{"use strict";var dye=Ct(),lU=fr();sU.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:$3()}}},layoutAttributes:$3(),handleDefaults:KB(),includeBasePlot:pye,convert:tU(),draw:oU()};function pye(e,r){var t=dye.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var fU=j0(),cU=ci(),vU=sf().line,mye=Iu().dash,Cl=hn().extendFlat,yye=Da().templatedArray,oDe=K1(),ih=hl(),gye=o0().shapeTexttemplateAttrs,bye=ag();hU.exports=yye("shape",{visible:Cl({},ih.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Cl({},ih.legend,{editType:"calc+arraydraw"}),legendgroup:Cl({},ih.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Cl({},ih.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:cU({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Cl({},ih.legendrank,{editType:"calc+arraydraw"}),legendwidth:Cl({},ih.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:Cl({},fU.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:Cl({},fU.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:Cl({},vU.color,{editType:"arraydraw"}),width:Cl({},vU.width,{editType:"calc+arraydraw"}),dash:Cl({},mye,{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:gye({},{keys:Object.keys(bye)}),font:cU({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 mU=R((sDe,pU)=>{"use strict";var wp=fr(),oh=Va(),xye=wo(),_ye=QA(),dU=of();pU.exports=function(r,t){xye(r,t,{name:"shapes",handleItemDefaults:Aye})};function wye(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Aye(e,r,t){function a(V,X){return wp.coerce(e,r,_ye,V,X)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),wp.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var o=a("path"),l=o?"path":"rect",s=a("type",l),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),h=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var g=d[p],m=g+"anchor",b=g==="x"?c:h,_={_fullLayout:t},w,x,T,S=oh.coerceRef(e,r,_,g,void 0,"paper"),M=oh.getRefType(S);if(M==="range"?(w=oh.getFromId(_,S),w._shapeIndices.push(r._index),T=dU.rangeToShapePosition(w),x=dU.shapePositionToRange(w),(w.type==="category"||w.type==="multicategory")&&(a(g+"0shift"),a(g+"1shift"))):x=T=wp.identity,u){var k=.25,D=.75,P=g+"0",N=g+"1",q=e[P],O=e[N];e[P]=x(e[P],!0),e[N]=x(e[N],!0),b==="pixel"?(a(P,0),a(N,10)):(oh.coercePosition(r,_,a,S,P,k),oh.coercePosition(r,_,a,S,N,D)),r[P]=T(r[P]),r[N]=T(r[N]),e[P]=q,e[N]=O}if(b==="pixel"){var U=e[m];e[m]=x(e[m],!0),oh.coercePosition(r,_,a,S,m,.25),r[m]=T(r[m]),e[m]=U}}u&&wp.noneOrAll(e,r,["x0","x1","y0","y1"]);var $=s==="line",j,H;if(u&&(j=a("label.texttemplate")),j||(H=a("label.text")),H||j){a("label.textangle");var z=a("label.textposition",$?"middle":"middle center");a("label.xanchor"),a("label.yanchor",wye($,z)),a("label.padding"),wp.coerceFont(a,"label.font",t.font)}}}});var bU=R((uDe,gU)=>{"use strict";var Tye=Qt(),yU=fr();function Mye(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}gU.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),yU.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Tye.contrast(i)),a("newshape.line.dash")}var o=r.dragmode==="drawline",l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(l||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Mye(o,u)),a("newshape.label.padding"),yU.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var TU=R((fDe,AU)=>{"use strict";var e8=fr(),lh=Va(),sh=q1(),_U=of();AU.exports=function(r){var t=r._fullLayout,a=e8.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+o:o;return{ppad:o,ppadplus:l?c:h,ppadminus:l?h:c}}else return{ppad:o}}function xU(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,o,l=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],o=r[a+"1"],n&&(l=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],o=r[a+"anchor"]),i!==void 0)return[u(i)+l,u(o)+s];if(r.path){var c=1/0,h=-1/0,d=r.path.match(sh.segmentRE),p,g,m,b,_;for(e.type==="date"&&(u=_U.decodeDate(u)),p=0;ph&&(h=_)));if(h>=c)return[c,h]}}});var kU=R((cDe,SU)=>{"use strict";var MU=G2();SU.exports={moduleType:"component",name:"shapes",layoutAttributes:QA(),supplyLayoutDefaults:mU(),supplyDrawNewShapeDefaults:bU(),includeBasePlot:ep()("shapes"),calcAutorange:TU(),draw:MU.draw,drawOne:MU.drawOne}});var r8=R((hDe,EU)=>{"use strict";var CU=ai(),Cye=Da().templatedArray,vDe=K1();EU.exports=Cye("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",CU.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",CU.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var DU=R((dDe,LU)=>{"use strict";var Eye=fr(),t8=Va(),Lye=wo(),Dye=r8(),qye="images";LU.exports=function(r,t){var a={name:qye,handleItemDefaults:Fye};Lye(r,t,a)};function Fye(e,r,t){function a(h,d){return Eye.coerce(e,r,Dye,h,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:t},l=["x","y"],s=0;s<2;s++){var u=l[s],f=t8.coerceRef(e,r,o,u,"paper",void 0);if(f!=="paper"){var c=t8.getFromId(o,f);c._imgIndices.push(r._index)}t8.coercePosition(r,o,a,f,u,0)}return r}});var PU=R((pDe,RU)=>{"use strict";var qU=ta(),Rye=Ca(),uh=Va(),FU=an(),Pye=ju();RU.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],o,l;for(l=0;l{"use strict";var NU=ia(),Nye=Vy();IU.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(i||o){for(var l=r._fullLayout.images,s=t._id.charAt(0),u,f,c=0;c{"use strict";zU.exports={moduleType:"component",name:"images",layoutAttributes:r8(),supplyLayoutDefaults:DU(),includeBasePlot:ep()("images"),draw:PU(),convertCoords:OU()}});var K3=R((gDe,UU)=>{"use strict";UU.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 a8=R((bDe,HU)=>{"use strict";var Iye=ci(),Oye=Kl(),zye=hn().extendFlat,Bye=dl().overrideAll,Uye=ng(),GU=Da().templatedArray,Gye=GU("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}});HU.exports=Bye(GU("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:Gye,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:zye(Uye({editType:"arraydraw"}),{}),font:Iye({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Oye.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var jU=R((xDe,WU)=>{"use strict";var Q3=fr(),VU=wo(),YU=a8(),Hye=K3(),Vye=Hye.name,Yye=YU.buttons;WU.exports=function(r,t){var a={name:Vye,handleItemDefaults:Wye};VU(r,t,a)};function Wye(e,r,t){function a(o,l){return Q3.coerce(e,r,YU,o,l)}var n=VU(e,r,{name:"buttons",handleItemDefaults:jye}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Q3.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Q3.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function jye(e,r){function t(n,i){return Q3.coerce(e,r,Yye,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var JU=R((_De,ZU)=>{"use strict";ZU.exports=$a;var El=ta(),XU=Qt(),fh=Ca(),eb=fr();function $a(e,r,t){this.gd=e,this.container=r,this.id=t,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})}$a.barWidth=2;$a.barLength=20;$a.barRadius=2;$a.barPad=1;$a.barColor="#808BA4";$a.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,o=n.height;this.position=r;var l=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",g=c==="up",m=s,b=f,_,w,x,T;!h&&!d&&!p&&!g&&(this.position.direction="down",h=!0);var S=h||g;S?(_=l,w=_+m,h?(x=u,T=Math.min(x+b,o),b=T-x):(T=u+b,x=Math.max(T-b,0),b=T-x)):(x=u,T=x+b,d?(w=l+m,_=Math.max(w-m,0),m=w-_):(_=l,w=Math.min(_+m,i),m=w-_)),this._box={l:_,t:x,w:m,h:b};var M=s>m,k=$a.barLength+2*$a.barPad,D=$a.barWidth+2*$a.barPad,P=l,N=u+f;N+D>o&&(N=o-D);var q=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-horizontal",!0).call(XU.fill,$a.barColor),M?(this.hbar=q.attr({rx:$a.barRadius,ry:$a.barRadius,x:P,y:N,width:k,height:D}),this._hbarXMin=P+k/2,this._hbarTranslateMax=m-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=f>b,U=$a.barWidth+2*$a.barPad,$=$a.barLength+2*$a.barPad,j=l+s,H=u;j+U>i&&(j=i-U);var z=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(XU.fill,$a.barColor),O?(this.vbar=z.attr({rx:$a.barRadius,ry:$a.barRadius,x:j,y:H,width:U,height:$}),this._vbarYMin=H+$/2,this._vbarTranslateMax=b-$):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,X=_-.5,K=O?w+U+.5:w+.5,ve=x-.5,xe=M?T+D+.5:T+.5,se=n._topdefs.selectAll("#"+V).data(M||O?[0]:[]);if(se.exit().remove(),se.enter().append("clipPath").attr("id",V).append("rect"),M||O?(this._clipRect=se.select("rect").attr({x:Math.floor(X),y:Math.floor(ve),width:Math.ceil(K)-Math.floor(X),height:Math.ceil(xe)-Math.floor(ve)}),this.container.call(fh.setClipUrl,V,this.gd),this.bg.attr({x:l,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(fh.setClipUrl,null),delete this._clipRect),M||O){var be=El.behavior.drag().on("dragstart",function(){El.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(be);var re=El.behavior.drag().on("dragstart",function(){El.event.sourceEvent.preventDefault(),El.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(re),O&&this.vbar.on(".drag",null).call(re)}this.setTranslate(t,a)};$a.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(fh.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)};$a.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=El.event.dx),this.vbar&&(t-=El.event.dy),this.setTranslate(r,t)};$a.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=El.event.deltaY),this.vbar&&(t+=El.event.deltaY),this.setTranslate(r,t)};$a.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=eb.constrain(El.event.x,a,n),o=(i-a)/(n-a),l=this.position.w-this._box.w;r=o*l}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=eb.constrain(El.event.y,s,u),c=(f-s)/(u-s),h=this.position.h-this._box.h;t=c*h}this.setTranslate(r,t)};$a.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=eb.constrain(r||0,0,a),t=eb.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(fh.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(fh.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var o=t/n;this.vbar.call(fh.setTranslate,r,t+o*this._vbarTranslateMax)}}});var oG=R((wDe,iG)=>{"use strict";var ch=ta(),Ap=jn(),Tp=Qt(),vh=Ca(),Co=fr(),rb=Ci(),Xye=Da().arrayEditor,KU=ki().LINE_SPACING,Dt=K3(),Zye=JU();iG.exports=function(r){var t=r._fullLayout,a=Co.filterVisible(t[Dt.name]);function n(h){Ap.autoMargin(r,aG(h))}var i=t._menulayer.selectAll("g."+Dt.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(Dt.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){ch.select(this).selectAll("g."+Dt.headerGroupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+Dt.headerGroupClassName).data(a,Jye);o.enter().append("g").classed(Dt.headerGroupClassName,!0);for(var l=Co.ensureSingle(i,"g",Dt.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var age=K3();lG.exports={moduleType:"component",name:age.name,layoutAttributes:a8(),supplyLayoutDefaults:jU(),draw:oG()}});var Sp=R((TDe,uG)=>{"use strict";uG.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 l8=R((MDe,vG)=>{"use strict";var fG=ci(),nge=ng(),ige=hn().extendDeepAll,oge=dl().overrideAll,lge=t1(),cG=Da().templatedArray,Jc=Sp(),sge=cG("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}});vG.exports=oge(cG("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:sge,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:ige(nge({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:lge.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:fG({})},font:fG({}),activebgcolor:{valType:"color",dflt:Jc.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jc.railBgColor},bordercolor:{valType:"color",dflt:Jc.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jc.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jc.tickLength},tickcolor:{valType:"color",dflt:Jc.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jc.minorTickLength}}),"arraydraw","from-root")});var mG=R((SDe,pG)=>{"use strict";var hh=fr(),hG=wo(),dG=l8(),uge=Sp(),fge=uge.name,cge=dG.steps;pG.exports=function(r,t){hG(r,t,{name:fge,handleItemDefaults:vge})};function vge(e,r,t){function a(c,h){return hh.coerce(e,r,dG,c,h)}for(var n=hG(e,r,{name:"steps",handleItemDefaults:hge}),i=0,o=0;o{"use strict";var Ll=ta(),tb=jn(),pf=Qt(),Dl=Ca(),Eo=fr(),dge=Eo.strTranslate,kp=Ci(),pge=Da().arrayEditor,Ht=Sp(),f8=ki(),bG=f8.LINE_SPACING,s8=f8.FROM_TL,u8=f8.FROM_BR;MG.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=mge(a,r),i=a._infolayer.selectAll("g."+Ht.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Ht.containerClassName,!0).style("cursor",t?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),tb.autoMargin(r,xG(f))}if(i.exit().each(function(){Ll.select(this).selectAll("g."+Ht.groupClassName).each(o)}).remove(),n.length!==0){var l=i.selectAll("g."+Ht.groupClassName).data(n,yge);l.enter().append("g").classed(Ht.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",dge(o-Ht.gripWidth*.5,r._dims.currentValueTotalHeight))}}function c8(e,r){var t=e._dims;return t.inputAreaStart+Ht.stepInset+(t.inputAreaLength-2*Ht.stepInset)*Math.min(1,Math.max(0,r))}function gG(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Ht.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Ht.stepInset-2*t.inputAreaStart)))}function Tge(e,r,t){var a=t._dims,n=Eo.ensureSingle(e,"rect",Ht.railTouchRectClass,function(i){i.call(AG,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Ht.tickOffset+t.ticklen+a.labelHeight)}).call(pf.fill,t.bgcolor).attr("opacity",0),Dl.setTranslate(n,0,a.currentValueTotalHeight)}function Mge(e,r){var t=r._dims,a=t.inputAreaLength-Ht.railInset*2,n=Eo.ensureSingle(e,"rect",Ht.railRectClass);n.attr({width:a,height:Ht.railWidth,rx:Ht.railRadius,ry:Ht.railRadius,"shape-rendering":"crispEdges"}).call(pf.stroke,r.bordercolor).call(pf.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),Dl.setTranslate(n,Ht.railInset,(t.inputAreaWidth-Ht.railWidth)*.5+t.currentValueTotalHeight)}});var CG=R((CDe,kG)=>{"use strict";var Sge=Sp();kG.exports={moduleType:"component",name:Sge.name,layoutAttributes:l8(),supplyLayoutDefaults:mG(),draw:SG()}});var nb=R((EDe,LG)=>{"use strict";var EG=Kl();LG.exports={bgcolor:{valType:"color",dflt:EG.background,editType:"plot"},bordercolor:{valType:"color",dflt:EG.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 v8=R((LDe,DG)=>{"use strict";DG.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 ib=R((DDe,qG)=>{"use strict";qG.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 PG=R(lb=>{"use strict";var kge=an(),Cge=Ci(),FG=ib(),Ege=ki().LINE_SPACING,ob=FG.name;function RG(e){var r=e&&e[ob];return r&&r.visible}lb.isVisible=RG;lb.makeData=function(e){for(var r=kge.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var sb=fr(),NG=Da(),IG=an(),Lge=nb(),Dge=v8();OG.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;sb.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,l=NG.newContainer(i,"rangeslider");function s(T,S){return sb.coerce(o,l,Lge,T,S)}var u,f;function c(T,S){return sb.coerce(u,f,Dge,T,S)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(o.range)),s("range");var d=t._subplots;if(d)for(var p=d.cartesian.filter(function(T){return T.substr(0,T.indexOf("y"))===IG.name2id(a)}).map(function(T){return T.substr(T.indexOf("y"),T.length)}),g=sb.simpleMap(p,IG.id2name),m=0;m{"use strict";var qge=an().list,Fge=E0().getAutoRange,Rge=ib();BG.exports=function(r){for(var t=qge(r,"x",!0),a=0;a{"use strict";var ub=ta(),Pge=Ct(),Nge=jn(),fn=fr(),fb=fn.strTranslate,HG=Ca(),mf=Qt(),Ige=x1(),Oge=bp(),h8=an(),zge=xl(),Bge=ef(),Jt=ib();VG.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=z.max)j=N[H+1];else if($=z.pmax)j=N[H+1];else if($0?e.touches[0].clientX:0}function Uge(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Jt.slideBoxClassName).node(),i=e.select("rect."+Jt.grabAreaMinClassName).node(),o=e.select("rect."+Jt.grabAreaMaxClassName).node();function l(){var s=ub.event,u=s.target,f=GG(s),c=f-e.node().getBoundingClientRect().left,h=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),p=zge.coverSlip();this.addEventListener("touchmove",g),this.addEventListener("touchend",m),p.addEventListener("mousemove",g),p.addEventListener("mouseup",m);function g(b){var _=GG(b),w=+_-f,x,T,S;switch(u){case n:if(S="ew-resize",h+w>t._length||d+w<0)return;x=h+w,T=d+w;break;case i:if(S="col-resize",h+w>t._length)return;x=h+w,T=d;break;case o:if(S="col-resize",d+w<0)return;x=h,T=d+w;break;default:S="ew-resize",x=c,T=c+w;break}if(T{"use strict";var $ge=fr(),Kge=nb(),Qge=v8(),d8=PG();WG.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:$ge.extendFlat({},Kge,{yaxis:Qge})}}},layoutAttributes:nb(),handleDefaults:zG(),calcAutorange:UG(),draw:YG(),isVisible:d8.isVisible,makeData:d8.makeData,autoMarginOpts:d8.autoMarginOpts}});var cb=R((IDe,ZG)=>{"use strict";var e2e=ci(),XG=Kl(),r2e=Da().templatedArray,t2e=r2e("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"});ZG.exports={visible:{valType:"boolean",editType:"plot"},buttons:t2e,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:e2e({editType:"plot"}),bgcolor:{valType:"color",dflt:XG.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:XG.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var p8=R((ODe,JG)=>{"use strict";JG.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var QG=R((zDe,KG)=>{"use strict";var vb=fr(),a2e=Qt(),n2e=Da(),i2e=wo(),$G=cb(),m8=p8();KG.exports=function(r,t,a,n,i){var o=r.rangeselector||{},l=n2e.newContainer(t,"rangeselector");function s(d,p){return vb.coerce(o,l,$G,d,p)}var u=i2e(o,l,{name:"buttons",handleItemDefaults:o2e,calendar:i}),f=s("visible",u.length>0);if(f){var c=l2e(t,a,n);s("x",c[0]),s("y",c[1]),vb.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),vb.coerceFont(s,"font",a.font);var h=s("bgcolor");s("activecolor",a2e.contrast(h,m8.lightAmount,m8.darkAmount)),s("bordercolor"),s("borderwidth")}};function o2e(e,r,t,a){var n=a.calendar;function i(s,u){return vb.coerce(e,r,$G.buttons,s,u)}var o=i("visible");if(o){var l=i("step");l!=="all"&&(n&&n!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function l2e(e,r,t){for(var a=t.filter(function(l){return r[l].anchor===e._id}),n=0,i=0;i{"use strict";var s2e=c_(),u2e=fr().titleCase;eH.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=f2e(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function f2e(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=s2e["utc"+u2e(n)],o=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+i.offset(a,-o));break;case"todate":var s=i.offset(a,-o);l=e.l2r(+i.ceil(s));break}var u=t[1];return[l,u]}});var uH=R((UDe,sH)=>{"use strict";var db=ta(),c2e=Ct(),v2e=jn(),tH=Qt(),lH=Ca(),ru=fr(),aH=ru.strTranslate,hb=Ci(),h2e=an(),b8=ki(),nH=b8.LINE_SPACING,iH=b8.FROM_TL,oH=b8.FROM_BR,g8=p8(),d2e=rH();sH.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(p2e(r),m2e);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=db.select(this),o=n,l=o.rangeselector,s=i.selectAll("g.button").data(ru.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=db.select(this),c=d2e(o,u);u._isActive=y2e(o,u,c),f.call(y8,l,u),f.call(b2e,l,u,r),f.on("click",function(){r._dragged||c2e.call("_guiRelayout",r,c)}),f.on("mouseover",function(){u._isHovered=!0,f.call(y8,l,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(y8,l,u)})}),_2e(r,s,l,o._name,i)})};function p2e(e){for(var r=h2e.list(e,"x",!0),t=[],a=0;a{"use strict";fH.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:cb()}}},layoutAttributes:cb(),handleDefaults:QG(),draw:uH()}});var pb=R(x8=>{"use strict";var vH=hn().extendFlat;x8.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",o={x:vH({},t,{}),y:vH({},t,{}),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};x8.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],o=r.grid;if(o){var l=t("domain.column");l!==void 0&&(l{"use strict";var w2e=fr(),A2e=a0().counter,T2e=pb().attributes,hH=ai().idRegex,M2e=Da(),_8={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:[A2e("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[hH.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[hH.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:T2e({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 mb(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function S2e(e,r){var t=e.grid||{},a=mb(r,t,"x"),n=mb(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),o=Array.isArray(a),l=Array.isArray(n),s=o&&a!==t.xaxes&&l&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(l&&(u=n.length),o&&(f=a.length));var c=M2e.newContainer(r,"grid");function h(S,M){return w2e.coerce(t,c,_8,S,M)}var d=h("rows",u),p=h("columns",f);if(!(d*p>1)){delete r.grid;return}if(!i&&!o&&!l){var g=h("pattern")==="independent";g&&(i=!0)}c._hasSubplotGrid=i;var m=h("roworder"),b=m==="top to bottom",_=i?.2:.1,w=i?.3:.1,x,T;s&&r._splomGridDflt&&(x=r._splomGridDflt.xside,T=r._splomGridDflt.yside),c._domains={x:dH("x",h,_,x,p),y:dH("y",h,w,T,d,b)}}function dH(e,r,t,a,n,i){var o=r(e+"gap",t),l=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=l[0],f=(l[1]-u)/(n-o),c=f*(1-o),h=0;h{"use strict";yH.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 xH=R((WDe,bH)=>{"use strict";var gH=ia(),C2e=Ct(),E2e=fr(),L2e=Da(),D2e=A8();bH.exports=function(e,r,t,a){var n="error_"+a.axis,i=L2e.newContainer(r,n),o=e[n]||{};function l(p,g){return E2e.coerce(o,i,D2e,p,g)}var s=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=l("visible",s);if(u!==!1){var f=l("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(l("array"),l("traceref"),c||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),c||l("valueminus"));var h="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&l(h,!(o.color||gH(o.thickness)||gH(o.width)))}(!a.inherit||!i[h])&&(l("color",t),l("thickness"),l("width",C2e.traceIs(r,"gl3d")?0:4))}}});var T8=R((jDe,wH)=>{"use strict";wH.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var c=+n[f];return[c,c]};var i=r.arrayminus||[];return function(u,f){var c=+n[f],h=+i[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var o=_H(t,r.value),l=_H(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=o(u);return[f,f]}:function(u){return[l(u),o(u)]}}};function _H(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var MH=R((XDe,TH)=>{"use strict";var M8=ia(),q2e=Ct(),S8=Va(),F2e=fr(),R2e=T8();TH.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var SH=ta(),yf=ia(),P2e=Ca(),N2e=ni();kH.exports=function(r,t,a,n){var i,o=a.xaxis,l=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(_){return _.id});var g=N2e.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var m=SH.select(this).selectAll("g.errorbar").data(f,p);if(m.exit().remove(),!!f.length){h.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var b=m.enter().append("g").classed("errorbar",!0);s&&b.style("opacity",0).transition().duration(n.duration).style("opacity",1),P2e.setClipUrl(m,a.layerClipId,r),m.each(function(_){var w=SH.select(this),x=I2e(_,o,l);if(!(g&&!_.vis)){var T,S=w.select("path.yerror");if(d.visible&&yf(x.x)&&yf(x.yh)&&yf(x.ys)){var M=d.width;T="M"+(x.x-M)+","+x.yh+"h"+2*M+"m-"+M+",0V"+x.ys,x.noYS||(T+="m-"+M+",0h"+2*M),i=!S.size(),i?S=w.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(S=S.transition().duration(n.duration).ease(n.easing)),S.attr("d",T)}else S.remove();var k=w.select("path.xerror");if(h.visible&&yf(x.y)&&yf(x.xh)&&yf(x.xs)){var D=(h.copy_ystyle?d:h).width;T="M"+x.xh+","+(x.y-D)+"v"+2*D+"m0,-"+D+"H"+x.xs,x.noXS||(T+="m0,-"+D+"v"+2*D),i=!k.size(),i?k=w.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",T)}else k.remove()}})}})};function I2e(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),yf(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),yf(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var DH=R((JDe,LH)=>{"use strict";var O2e=ta(),EH=Qt();LH.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},o=O2e.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(EH.stroke,n.color),i.copy_ystyle&&(i=n),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(EH.stroke,i.color)})}});var RH=R(($De,FH)=>{"use strict";var Cp=fr(),qH=dl().overrideAll,Ep=A8(),$c={error_x:Cp.extendFlat({},Ep),error_y:Cp.extendFlat({},Ep)};delete $c.error_x.copy_zstyle;delete $c.error_y.copy_zstyle;delete $c.error_y.copy_ystyle;var Lp={error_x:Cp.extendFlat({},Ep),error_y:Cp.extendFlat({},Ep),error_z:Cp.extendFlat({},Ep)};delete Lp.error_x.copy_ystyle;delete Lp.error_y.copy_ystyle;delete Lp.error_z.copy_ystyle;delete Lp.error_z.copy_zstyle;FH.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$c,bar:$c,histogram:$c,scatter3d:qH(Lp,"calc","nested"),scattergl:qH($c,"calc","nested")}},supplyDefaults:xH(),calc:MH(),makeComputeError:T8(),plot:CH(),style:DH(),hoverInfo:z2e};function z2e(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var NH=R((KDe,PH)=>{"use strict";PH.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 HH=R((QDe,GH)=>{"use strict";var gf=ta(),k8=vl(),gb=jn(),IH=Ct(),tu=Va(),yb=xl(),Qo=fr(),Fl=Qo.strTranslate,UH=hn().extendFlat,C8=ef(),ql=Ca(),E8=Qt(),B2e=x1(),U2e=Ci(),G2e=gl().flipScale,H2e=IA(),V2e=OA(),Y2e=Bo(),L8=ki(),OH=L8.LINE_SPACING,zH=L8.FROM_TL,BH=L8.FROM_BR,ja=NH().cn;function W2e(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+ja.colorbar).data(j2e(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(ja.colorbar,!0),t.each(function(a){var n=gf.select(this);Qo.ensureSingle(n,"rect",ja.cbbg),Qo.ensureSingle(n,"g",ja.cbfills),Qo.ensureSingle(n,"g",ja.cblines),Qo.ensureSingle(n,"g",ja.cbaxis,function(o){o.classed(ja.crisp,!0)}),Qo.ensureSingle(n,"g",ja.cbtitleunshift,function(o){o.append("g").classed(ja.cbtitle,!0)}),Qo.ensureSingle(n,"rect",ja.cboutline);var i=X2e(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&Z2e(n,a,e)}),t.exit().each(function(a){gb.autoMargin(e,a._id)}).remove(),t.order()}function j2e(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,o,l;function s(w){return UH(w,{_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 l.calc=="function"?l.calc(e,o,n):(n._fillgradient=i.reversescale?G2e(i.colorscale):i.colorscale,n._zrange=[i[l.min],i[l.max]])}for(var f=0;f1){var ae=Math.pow(10,Math.floor(Math.log(Y)/Math.LN10));De*=ae*Qo.roundUp(Y/ae,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(ge.tick0=0)}ge.dtick=De}ge.domain=a?[re+p/x.h,re+V-p/x.h]:[re+d/x.w,re+V-d/x.w],ge.setScale(),e.attr("transform",Fl(Math.round(x.l),Math.round(x.t)));var Z=e.select("."+ja.cbtitleunshift).attr("transform",Fl(-Math.round(x.l),-Math.round(x.t))),Te=ge.ticklabelposition,Pe=ge.title.font.size,Ne=e.select("."+ja.cbaxis),lr,Ke=0,Je=0;function or(Ar,de){var Oe={propContainer:ge,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:w._dfltTitle.colorbar,containerGroup:e.select("."+ja.cbtitle)},Ue=Ar.charAt(0)==="h"?Ar.substr(1):"h"+Ar;e.selectAll("."+Ue+",."+Ue+"-math-group").remove(),B2e.draw(t,Ar,UH(Oe,de||{}))}function yr(){if(a&&Ee||!a&&!Ee){var Ar,de;k==="top"&&(Ar=d+x.l+X*g,de=p+x.t+K*(1-re-V)+3+Pe*.75),k==="bottom"&&(Ar=d+x.l+X*g,de=p+x.t+K*(1-re)-3-Pe*.25),k==="right"&&(de=p+x.t+K*m+3+Pe*.75,Ar=d+x.l+X*re),or(ge._id+"title",{attributes:{x:Ar,y:de,"text-anchor":a?"start":"middle"}})}}function ir(){if(a&&!Ee||!a&&Ee){var Ar=ge.position||0,de=ge._offset+ge._length/2,Oe,Ue;if(k==="right")Ue=de,Oe=x.l+X*Ar+10+Pe*(ge.showticklabels?1:.5);else if(Oe=de,k==="bottom"&&(Ue=x.t+K*Ar+10+(Te.indexOf("inside")===-1?ge.tickfont.size:0)+(ge.ticks!=="intside"&&r.ticklen||0)),k==="top"){var rt=M.text.split("
").length;Ue=x.t+K*Ar+10-j-OH*Pe*rt}or((a?"h":"v")+ge._id+"title",{avoid:{selection:gf.select(t).selectAll("g."+ge._id+"tick"),side:k,offsetTop:a?0:x.t,offsetLeft:a?x.l:0,maxShift:a?w.width:w.height},attributes:{x:Oe,y:Ue,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Xe(){if(!a&&!Ee||a&&Ee){var Ar=e.select("."+ja.cbtitle),de=Ar.select("text"),Oe=[-s/2,s/2],Ue=Ar.select(".h"+ge._id+"title-math-group").node(),rt=15.6;de.node()&&(rt=parseInt(de.node().style.fontSize,10)*OH);var Ur;if(Ue?(Ur=ql.bBox(Ue),Je=Ur.width,Ke=Ur.height,Ke>rt&&(Oe[1]-=(Ke-rt)/2)):de.node()&&!de.classed(ja.jsPlaceholder)&&(Ur=ql.bBox(de.node()),Je=Ur.width,Ke=Ur.height),a){if(Ke){if(Ke+=5,k==="top")ge.domain[1]-=Ke/x.h,Oe[1]*=-1;else{ge.domain[0]+=Ke/x.h;var Ye=U2e.lineCount(de);Oe[1]+=(1-Ye)*rt}Ar.attr("transform",Fl(Oe[0],Oe[1])),ge.setScale()}}else Je&&(k==="right"&&(ge.domain[0]+=(Je+Pe/2)/x.w),Ar.attr("transform",Fl(Oe[0],Oe[1])),ge.setScale())}e.selectAll("."+ja.cbfills+",."+ja.cblines).attr("transform",a?Fl(0,Math.round(x.h*(1-ge.domain[1]))):Fl(Math.round(x.w*ge.domain[0]),0)),Ne.attr("transform",a?Fl(0,Math.round(-x.t)):Fl(Math.round(-x.l),0));var Ve=e.select("."+ja.cbfills).selectAll("rect."+ja.cbfill).attr("style","").data(U);Ve.enter().append("rect").classed(ja.cbfill,!0).attr("style",""),Ve.exit().remove();var pr=D.map(ge.c2p).map(Math.round).sort(function(Ir,Gr){return Ir-Gr});Ve.each(function(Ir,Gr){var Ze=[Gr===0?D[0]:(U[Gr]+U[Gr-1])/2,Gr===U.length-1?D[1]:(U[Gr]+U[Gr+1])/2].map(ge.c2p).map(Math.round);a&&(Ze[1]=Qo.constrain(Ze[1]+(Ze[1]>Ze[0])?1:-1,pr[0],pr[1]));var oe=gf.select(this).attr(a?"x":"y",ve).attr(a?"y":"x",gf.min(Ze)).attr(a?"width":"height",Math.max(j,2)).attr(a?"height":"width",Math.max(gf.max(Ze)-gf.min(Ze),2));if(r._fillgradient)ql.gradient(oe,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var ye=N(Ir).replace("e-","");oe.attr("fill",k8(ye).toHexString())}});var Tr=e.select("."+ja.cblines).selectAll("path."+ja.cbline).data(S.color&&S.width?$:[]);Tr.enter().append("path").classed(ja.cbline,!0),Tr.exit().remove(),Tr.each(function(Ir){var Gr=ve,Ze=Math.round(ge.c2p(Ir))+S.width/2%1;gf.select(this).attr("d","M"+(a?Gr+","+Ze:Ze+","+Gr)+(a?"h":"v")+j).call(ql.lineGroupStyle,S.width,P(Ir),S.dash)}),Ne.selectAll("g."+ge._id+"tick,path").remove();var mr=ve+j+(s||0)/2-(r.ticks==="outside"?1:0),vr=tu.calcTicks(ge),Cr=tu.getTickSigns(ge)[2];return tu.drawTicks(t,ge,{vals:ge.ticks==="inside"?tu.clipEnds(ge,vr):vr,layer:Ne,path:tu.makeTickPath(ge,mr,Cr),transFn:tu.makeTransTickFn(ge)}),tu.drawLabels(t,ge,{vals:vr,layer:Ne,transFn:tu.makeTransTickLabelFn(ge),labelFns:tu.makeLabelFns(ge,mr)})}function Lr(){var Ar,de=j+s/2;Te.indexOf("inside")===-1&&(Ar=ql.bBox(Ne.node()),de+=a?Ar.width:Ar.height),lr=Z.select("text");var Oe=0,Ue=a&&k==="top",rt=!a&&k==="right",Ur=0;if(lr.node()&&!lr.classed(ja.jsPlaceholder)){var Ye,Ve=Z.select(".h"+ge._id+"title-math-group").node();Ve&&(a&&Ee||!a&&!Ee)?(Ar=ql.bBox(Ve),Oe=Ar.width,Ye=Ar.height):(Ar=ql.bBox(Z.node()),Oe=Ar.right-x.l-(a?ve:ke),Ye=Ar.bottom-x.t-(a?ke:ve),!a&&k==="top"&&(de+=Ar.height,Ur=Ar.height)),rt&&(lr.attr("transform",Fl(Oe/2+Pe/2,0)),Oe*=2),de=Math.max(de,a?Oe:Ye)}var pr=(a?d:p)*2+de+u+s/2,Tr=0;!a&&M.text&&h==="bottom"&&m<=0&&(Tr=pr/2,pr+=Tr,Ur+=Tr),w._hColorbarMoveTitle=Tr,w._hColorbarMoveCBTitle=Ur;var mr=u+s,vr=(a?ve:ke)-mr/2-(a?d:0),Cr=(a?ke:ve)-(a?z:p+Ur-Tr);e.select("."+ja.cbbg).attr("x",vr).attr("y",Cr).attr(a?"width":"height",Math.max(pr-Tr,2)).attr(a?"height":"width",Math.max(z+mr,2)).call(E8.fill,f).call(E8.stroke,r.bordercolor).style("stroke-width",u);var Ir=rt?Math.max(Oe-10,0):0;e.selectAll("."+ja.cboutline).attr("x",(a?ve:ke+d)+Ir).attr("y",(a?ke+p-z:ve)+(Ue?Ke:0)).attr(a?"width":"height",Math.max(j,2)).attr(a?"height":"width",Math.max(z-(a?2*p+Ke:2*d+Ir),2)).call(E8.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var Gr=a?xe*pr:0,Ze=a?0:(1-se)*pr-Ur;if(Gr=_?x.l-Gr:-Gr,Ze=b?x.t-Ze:-Ze,e.attr("transform",Fl(Gr,Ze)),!a&&(u||k8(f).getAlpha()&&!k8.equals(w.paper_bgcolor,f))){var oe=Ne.selectAll("text"),ye=oe[0].length,Ge=e.select("."+ja.cbbg).node(),Ie=ql.bBox(Ge),Wr=ql.getTranslate(e),tt=2;oe.each(function(Vi,Bn){var qn=0,yi=ye-1;if(Bn===qn||Bn===yi){var _t=ql.bBox(this),Ma=ql.getTranslate(this),ra;if(Bn===yi){var Pa=_t.right+Ma.x,Xa=Ie.right+Wr.x+ke-u-tt+g;ra=Xa-Pa,ra>0&&(ra=0)}else if(Bn===qn){var Sa=_t.left+Ma.x,La=Ie.left+Wr.x+ke+u+tt;ra=La-Sa,ra<0&&(ra=0)}ra&&(ye<3?this.setAttribute("transform","translate("+ra+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var $r={},St=zH[c],ea=BH[c],ma=zH[h],aa=BH[h],Qa=pr-j;a?(i==="pixels"?($r.y=m,$r.t=z*ma,$r.b=z*aa):($r.t=$r.b=0,$r.yt=m+n*ma,$r.yb=m-n*aa),l==="pixels"?($r.x=g,$r.l=pr*St,$r.r=pr*ea):($r.l=Qa*St,$r.r=Qa*ea,$r.xl=g-o*St,$r.xr=g+o*ea)):(i==="pixels"?($r.x=g,$r.l=z*St,$r.r=z*ea):($r.l=$r.r=0,$r.xl=g+n*St,$r.xr=g-n*ea),l==="pixels"?($r.y=1-m,$r.t=pr*ma,$r.b=pr*aa):($r.t=Qa*ma,$r.b=Qa*aa,$r.yt=m-o*ma,$r.yb=m+o*aa));var Ln=r.y<.5?"b":"t",si=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var Dn={r:w.width-vr-Gr,l:vr+$r.r,b:w.height-Cr-Ze,t:Cr+$r.b};_&&b?gb.autoMargin(t,r._id,$r):_?t._fullLayout._reservedMargin[r._id][Ln]=Dn[Ln]:b||a?t._fullLayout._reservedMargin[r._id][si]=Dn[si]:t._fullLayout._reservedMargin[r._id][Ln]=Dn[Ln]}return Qo.syncOrAsync([gb.previousPromises,yr,Xe,ir,gb.previousPromises,Lr],t)}function Z2e(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,o,l,s;yb.init({element:e.node(),gd:t,prepFn:function(){o=e.attr("transform"),C8(e)},moveFn:function(u,f){e.attr("transform",o+Fl(u,f)),l=yb.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=yb.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var c=yb.getCursor(l,s,r.xanchor,r.yanchor);C8(e,c)},doneFn:function(){if(C8(e),l!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=l,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?IH.call("_guiRestyle",t,u,r._traceIndex):IH.call("_guiRelayout",t,u)}}})}function J2e(e,r,t){var a=r._levels,n=[],i=[],o,l,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],c=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(o=a.start+l*u,!(u>0?o>=s:o<=s));l++)o>f&&o0?o>=s:o<=s));l++)o>t[0]&&o{"use strict";VH.exports={moduleType:"component",name:"colorbar",attributes:Rg(),supplyDefaults:k4(),draw:HH().draw,hasColorbar:m4()}});var jH=R((rqe,WH)=>{"use strict";WH.exports={moduleType:"component",name:"legend",layoutAttributes:Tw(),supplyLayoutDefaults:kw(),draw:Bw(),style:Nw()}});var ZH=R((tqe,XH)=>{"use strict";XH.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 $H=R((aqe,JH)=>{"use strict";JH.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var q8=R((nqe,rV)=>{"use strict";var K2e=Ct(),eV=fr(),D8=eV.extendFlat,KH=eV.extendDeep;function QH(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function Q2e(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}rV.exports=function(r,t){var a,n=r.data,i=r.layout,o=KH([],n),l=KH({},i,QH(t.tileClass)),s=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var u=Object.keys(l);for(a=0;a{"use strict";var e3e=_g().EventEmitter,r3e=Ct(),t3e=fr(),tV=Uc(),a3e=q8(),n3e=M3(),i3e=S3();function o3e(e,r){var t=new e3e,a=a3e(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var l=tV.getDelay(n._fullLayout);setTimeout(function(){var s=n3e(n),u=document.createElement("canvas");u.id=t3e.randstr(),t=i3e({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},l)}var o=tV.getRedrawFunc(n);return r3e.call("_doPlot",n,a.data,a.layout,a.config).then(o).then(i).catch(function(l){t.emit("error",l)}),t}aV.exports=o3e});var lV=R((oqe,oV)=>{"use strict";var iV=Uc(),l3e={getDelay:iV.getDelay,getRedrawFunc:iV.getRedrawFunc,clone:q8(),toSVG:M3(),svgToImg:S3(),toImage:nV(),downloadImage:nA()};oV.exports=l3e});var uV=R(au=>{"use strict";au.version=Ry().version;oM();JC();var s3e=Ct(),Dp=au.register=s3e.register,R8=bO(),sV=Object.keys(R8);for(bb=0;bb{"use strict";fV.exports=uV()});var P8=R((uqe,hV)=>{"use strict";var u3e=Ct(),Lo=fr(),f3e=FA();function c3e(e,r,t,a){var n=e.cd,i=n[0].t,o=n[0].trace,l=e.xa,s=e.ya,u=i.x,f=i.y,c=l.c2p(r),h=s.c2p(t),d=e.distance,p;if(i.tree){var g=l.p2c(c-d),m=l.p2c(c+d),b=s.p2c(h-d),_=s.p2c(h+d);a==="x"?p=i.tree.range(Math.min(g,m),Math.min(s._rl[0],s._rl[1]),Math.max(g,m),Math.max(s._rl[0],s._rl[1])):p=i.tree.range(Math.min(g,m),Math.min(b,_),Math.max(g,m),Math.max(b,_))}else p=i.ids;var w,x,T,S,M,k,D,P,N,q=d;if(a==="x"){var O=!!o.xperiodalignment,U=!!o.yperiodalignment;for(M=0;M=Math.min($,j)&&c<=Math.max($,j)?0:1/0}if(k=Math.min(H,z)&&h<=Math.max(H,z)?0:1/0}N=Math.sqrt(k*k+D*D),x=p[M]}}}else for(M=p.length-1;M>-1;M--)w=p[M],T=u[w],S=f[w],k=l.c2p(T)-c,D=s.c2p(S)-h,P=Math.sqrt(k*k+D*D),P{"use strict";var dV=20;pV.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:dV,SYMBOL_STROKE:dV/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 _b=R((cqe,bV)=>{"use strict";var v3e=hl(),h3e=ci(),d3e=P6(),nn=sf(),mV=m1().axisHoverFormat,yV=Ac(),p3e=cg(),N8=hn().extendFlat,m3e=dl().overrideAll,y3e=ph().DASHES,gV=nn.line,nu=nn.marker,g3e=nu.line,mh=bV.exports=m3e({x:nn.x,x0:nn.x0,dx:nn.dx,y:nn.y,y0:nn.y0,dy:nn.dy,xperiod:nn.xperiod,yperiod:nn.yperiod,xperiod0:nn.xperiod0,yperiod0:nn.yperiod0,xperiodalignment:nn.xperiodalignment,yperiodalignment:nn.yperiodalignment,xhoverformat:mV("x"),yhoverformat:mV("y"),text:nn.text,hovertext:nn.hovertext,textposition:nn.textposition,textfont:h3e({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:gV.color,width:gV.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:p3e(y3e),dflt:"solid"}},marker:N8({},yV("marker"),{symbol:nu.symbol,angle:nu.angle,size:nu.size,sizeref:nu.sizeref,sizemin:nu.sizemin,sizemode:nu.sizemode,opacity:nu.opacity,colorbar:nu.colorbar,line:N8({},yV("marker.line"),{width:g3e.width})}),connectgaps:nn.connectgaps,fill:N8({},nn.fill,{dflt:"none"}),fillcolor:d3e(),selected:{marker:nn.selected.marker,textfont:nn.selected.textfont},unselected:{marker:nn.unselected.marker,textfont:nn.unselected.textfont},opacity:v3e.opacity},"calc","nested");mh.x.editType=mh.y.editType=mh.x0.editType=mh.y0.editType="calc+clearAxisTypes";mh.hovertemplate=nn.hovertemplate;mh.texttemplate=nn.texttemplate});var wb=R(I8=>{"use strict";var xV=ph();I8.isOpenSymbol=function(e){return typeof e=="string"?xV.OPEN_RE.test(e):e%200>100};I8.isDotSymbol=function(e){return typeof e=="string"?xV.DOT_RE.test(e):e>200}});var AV=R((hqe,wV)=>{"use strict";var _V=fr(),b3e=Ct(),x3e=wb(),_3e=_b(),w3e=Q1(),Ab=ni(),A3e=lA(),T3e=sA(),M3e=D3(),S3e=uA(),k3e=cA(),C3e=fA();wV.exports=function(r,t,a,n){function i(d,p){return _V.coerce(r,t,_3e,d,p)}var o=r.marker?x3e.isOpenSymbol(r.marker.symbol):!1,l=Ab.isBubble(r),s=A3e(r,t,n,i);if(!s){t.visible=!1;return}T3e(r,t,n,i),i("xhoverformat"),i("yhoverformat");var u=s{"use strict";var E3e=CA();TV.exports=function(r,t,a){var n=r.i;return"x"in r||(r.x=t._x[n]),"y"in r||(r.y=t._y[n]),E3e(r,t,a)}});var kV=R((pqe,SV)=>{"use strict";function L3e(e,r,t,a,n){for(var i=n+1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s>=0?(i=o,n=o-1):a=o+1}return i}function D3e(e,r,t,a,n){for(var i=n+1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s>0?(i=o,n=o-1):a=o+1}return i}function q3e(e,r,t,a,n){for(var i=a-1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s<0?(i=o,a=o+1):n=o-1}return i}function F3e(e,r,t,a,n){for(var i=a-1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s<=0?(i=o,a=o+1):n=o-1}return i}function R3e(e,r,t,a,n){for(;a<=n;){var i=a+n>>>1,o=e[i],l=t!==void 0?t(o,r):o-r;if(l===0)return i;l<=0?a=i+1:n=i-1}return-1}function qp(e,r,t,a,n,i){return typeof t=="function"?i(e,r,t,a===void 0?0:a|0,n===void 0?e.length-1:n|0):i(e,r,void 0,t===void 0?0:t|0,a===void 0?e.length-1:a|0)}SV.exports={ge:function(e,r,t,a,n){return qp(e,r,t,a,n,L3e)},gt:function(e,r,t,a,n){return qp(e,r,t,a,n,D3e)},lt:function(e,r,t,a,n){return qp(e,r,t,a,n,q3e)},le:function(e,r,t,a,n){return qp(e,r,t,a,n,F3e)},eq:function(e,r,t,a,n){return qp(e,r,t,a,n,R3e)}}});var yh=R((mqe,CV)=>{CV.exports=P3e;function P3e(e,r,t){return rt?t:e:er?r:e}});var hs=R((yqe,LV)=>{"use strict";LV.exports=function(r,t,a){var n={},i,o;if(typeof t=="string"&&(t=EV(t)),Array.isArray(t)){var l={};for(o=0;o{"use strict";var N3e=hs();DV.exports=I3e;function I3e(e){var r;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?r={width:e[0],height:e[0],x:0,y:0}:e.length===2?r={width:e[0],height:e[1],x:0,y:0}:r={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=N3e(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"}),r={x:e.left||0,y:e.top||0},e.width==null?e.right?r.width=e.right-r.x:r.width=0:r.width=e.width,e.height==null?e.bottom?r.height=e.bottom-r.y:r.height=0:r.height=e.height),r}});var Kc=R((bqe,qV)=>{"use strict";qV.exports=O3e;function O3e(e,r){if(!e||e.length==null)throw Error("Argument should be an array");r==null?r=1:r=Math.floor(r);for(var t=Array(r*2),a=0;an&&(n=e[o]),e[o]{FV.exports=function(){for(var e=0;e{PV.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 Qc=R((wqe,IV)=>{var NV=Tb();IV.exports=z3e;function z3e(e,r,t){if(!e)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var a=e[0].length,n=e.length*a,i,o,l,s;(!r||typeof r=="string")&&(r=new(NV(r||"float32"))(n+t));var u=r.length-t;if(n!==u)throw new Error("source length "+n+" ("+a+"x"+e.length+") does not match destination length "+u);for(i=0,l=t;i{"use strict";OV.exports=function(e){var r=typeof e;return e!==null&&(r==="object"||r==="function")}});var UV=R((Tqe,BV)=>{"use strict";BV.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var XV=R((Mqe,jV)=>{"use strict";var GV=kV(),HV=yh(),B3e=gh(),U3e=Kc(),VV=hs(),z8=RV(),G3e=Qc(),H3e=zV(),V3e=Tb(),YV=UV(),Y3e=1073741824;jV.exports=function(r,t){t||(t={}),r=G3e(r,"float64"),t=VV(t,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let a=z8(t.maxDepth,255),n=z8(t.bounds,U3e(r,2));n[0]===n[2]&&n[2]++,n[1]===n[3]&&n[3]++;let i=WV(r,n),o=r.length>>>1,l;t.dtype||(t.dtype="array"),typeof t.dtype=="string"?l=new(V3e(t.dtype))(o):t.dtype&&(l=t.dtype,Array.isArray(l)&&(l.length=o));for(let b=0;ba||S>Y3e){for(let z=0;zve||D>xe||P=q||X===K)return;let se=s[V];K===void 0&&(K=se.length);for(let ae=X;ae=x&&Te<=S&&Pe>=T&&Pe<=M&&O.push(Z)}let be=u[V],re=be[X*4+0],ke=be[X*4+1],ge=be[X*4+2],Ee=be[X*4+3],De=$(be,X+1),Ce=z*.5,Y=V+1;U(j,H,Ce,Y,re,ke||ge||Ee||De),U(j,H+Ce,Ce,Y,ke,ge||Ee||De),U(j+Ce,H,Ce,Y,ge,Ee||De),U(j+Ce,H+Ce,Ce,Y,Ee,De)}function $(j,H){let z=null,V=0;for(;z===null;)if(z=j[H*4+V],V++,V>j.length)return null;return z}return O}function g(b,_,w,x,T){let S=[];for(let M=0;M{"use strict";ZV.exports=XV()});var U8=R((kqe,JV)=>{JV.exports=W3e;function W3e(e){var r=0,t=0,a=0,n=0;return e.map(function(i){i=i.slice();var o=i[0],l=o.toUpperCase();if(o!=l)switch(i[0]=l,o){case"a":i[6]+=a,i[7]+=n;break;case"v":i[1]+=n;break;case"h":i[1]+=a;break;default:for(var s=1;s{"use strict";Object.defineProperty(Mb,"__esModule",{value:!0});var j3e=function(){function e(r,t){var a=[],n=!0,i=!1,o=void 0;try{for(var l=r[Symbol.iterator](),s;!(n=(s=l.next()).done)&&(a.push(s.value),!(t&&a.length===t));n=!0);}catch(u){i=!0,o=u}finally{try{!n&&l.return&&l.return()}finally{if(i)throw o}}return a}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Fp=Math.PI*2,G8=function(r,t,a,n,i,o,l){var s=r.x,u=r.y;s*=t,u*=a;var f=n*s-i*u,c=i*s+n*u;return{x:f+o,y:c+l}},X3e=function(r,t){var a=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),n=Math.cos(r),i=Math.sin(r),o=Math.cos(r+t),l=Math.sin(r+t);return[{x:n-i*a,y:i+n*a},{x:o+l*a,y:l-o*a},{x:o,y:l}]},$V=function(r,t,a,n){var i=r*n-t*a<0?-1:1,o=r*a+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},Z3e=function(r,t,a,n,i,o,l,s,u,f,c,h){var d=Math.pow(i,2),p=Math.pow(o,2),g=Math.pow(c,2),m=Math.pow(h,2),b=d*p-d*m-p*g;b<0&&(b=0),b/=d*m+p*g,b=Math.sqrt(b)*(l===s?-1:1);var _=b*i/o*h,w=b*-o/i*c,x=f*_-u*w+(r+a)/2,T=u*_+f*w+(t+n)/2,S=(c-_)/i,M=(h-w)/o,k=(-c-_)/i,D=(-h-w)/o,P=$V(1,0,S,M),N=$V(S,M,k,D);return s===0&&N>0&&(N-=Fp),s===1&&N<0&&(N+=Fp),[x,T,P,N]},J3e=function(r){var t=r.px,a=r.py,n=r.cx,i=r.cy,o=r.rx,l=r.ry,s=r.xAxisRotation,u=s===void 0?0:s,f=r.largeArcFlag,c=f===void 0?0:f,h=r.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||l===0)return[];var g=Math.sin(u*Fp/360),m=Math.cos(u*Fp/360),b=m*(t-n)/2+g*(a-i)/2,_=-g*(t-n)/2+m*(a-i)/2;if(b===0&&_===0)return[];o=Math.abs(o),l=Math.abs(l);var w=Math.pow(b,2)/Math.pow(o,2)+Math.pow(_,2)/Math.pow(l,2);w>1&&(o*=Math.sqrt(w),l*=Math.sqrt(w));var x=Z3e(t,a,n,i,o,l,c,d,g,m,b,_),T=j3e(x,4),S=T[0],M=T[1],k=T[2],D=T[3],P=Math.abs(D)/(Fp/4);Math.abs(1-P)<1e-7&&(P=1);var N=Math.max(Math.ceil(P),1);D/=N;for(var q=0;q{"use strict";rY.exports=K3e;var $3e=QV();function K3e(e){for(var r,t=[],a=0,n=0,i=0,o=0,l=null,s=null,u=0,f=0,c=0,h=e.length;c4?(a=d[d.length-4],n=d[d.length-3]):(a=u,n=f),t.push(d)}return t}function Sb(e,r,t,a){return["C",e,r,t,a,t,a]}function eY(e,r,t,a,n,i){return["C",e/3+2/3*t,r/3+2/3*a,n/3+2/3*t,i/3+2/3*a,n,i]}});var H8=R((Eqe,aY)=>{"use strict";aY.exports=function(r){return typeof r!="string"?!1:(r=r.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(r)&&/[\dz]$/i.test(r)&&r.length>4))}});var kb=R((Lqe,nY)=>{"use strict";nY.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),a=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var n=42;r[t]=n;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(r,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0}});var Rp=R((Dqe,iY)=>{"use strict";var Q3e=kb();iY.exports=function(){return Q3e()&&!!Symbol.toStringTag}});var lY=R((qqe,oY)=>{"use strict";oY.exports=Error});var uY=R((Fqe,sY)=>{"use strict";sY.exports=EvalError});var cY=R((Rqe,fY)=>{"use strict";fY.exports=RangeError});var hY=R((Pqe,vY)=>{"use strict";vY.exports=ReferenceError});var V8=R((Nqe,dY)=>{"use strict";dY.exports=SyntaxError});var Pp=R((Iqe,pY)=>{"use strict";pY.exports=TypeError});var yY=R((Oqe,mY)=>{"use strict";mY.exports=URIError});var xY=R((zqe,bY)=>{"use strict";var gY=typeof Symbol!="undefined"&&Symbol,ebe=kb();bY.exports=function(){return typeof gY!="function"||typeof Symbol!="function"||typeof gY("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ebe()}});var AY=R((Bqe,wY)=>{"use strict";var _Y={foo:{}},rbe=Object;wY.exports=function(){return{__proto__:_Y}.foo===_Y.foo&&!({__proto__:null}instanceof rbe)}});var SY=R((Uqe,MY)=>{"use strict";var tbe="Function.prototype.bind called on incompatible ",abe=Object.prototype.toString,nbe=Math.max,ibe="[object Function]",TY=function(r,t){for(var a=[],n=0;n{"use strict";var sbe=SY();kY.exports=Function.prototype.bind||sbe});var EY=R((Hqe,CY)=>{"use strict";var ube=Function.prototype.call,fbe=Object.prototype.hasOwnProperty,cbe=Cb();CY.exports=cbe.call(ube,fbe)});var Ah=R((Vqe,RY)=>{"use strict";var _a,vbe=lY(),hbe=uY(),dbe=cY(),pbe=hY(),wh=V8(),_h=Pp(),mbe=yY(),FY=Function,Y8=function(e){try{return FY('"use strict"; return ('+e+").constructor;")()}catch(r){}},ev=Object.getOwnPropertyDescriptor;if(ev)try{ev({},"")}catch(e){ev=null}var W8=function(){throw new _h},ybe=ev?function(){try{return arguments.callee,W8}catch(e){try{return ev(arguments,"callee").get}catch(r){return W8}}}():W8,bh=xY()(),gbe=AY()(),di=Object.getPrototypeOf||(gbe?function(e){return e.__proto__}:null),xh={},bbe=typeof Uint8Array=="undefined"||!di?_a:di(Uint8Array),rv={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?_a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?_a:ArrayBuffer,"%ArrayIteratorPrototype%":bh&&di?di([][Symbol.iterator]()):_a,"%AsyncFromSyncIteratorPrototype%":_a,"%AsyncFunction%":xh,"%AsyncGenerator%":xh,"%AsyncGeneratorFunction%":xh,"%AsyncIteratorPrototype%":xh,"%Atomics%":typeof Atomics=="undefined"?_a:Atomics,"%BigInt%":typeof BigInt=="undefined"?_a:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?_a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?_a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?_a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":vbe,"%eval%":eval,"%EvalError%":hbe,"%Float32Array%":typeof Float32Array=="undefined"?_a:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?_a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?_a:FinalizationRegistry,"%Function%":FY,"%GeneratorFunction%":xh,"%Int8Array%":typeof Int8Array=="undefined"?_a:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?_a:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?_a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":bh&&di?di(di([][Symbol.iterator]())):_a,"%JSON%":typeof JSON=="object"?JSON:_a,"%Map%":typeof Map=="undefined"?_a:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!bh||!di?_a:di(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?_a:Promise,"%Proxy%":typeof Proxy=="undefined"?_a:Proxy,"%RangeError%":dbe,"%ReferenceError%":pbe,"%Reflect%":typeof Reflect=="undefined"?_a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?_a:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!bh||!di?_a:di(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?_a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":bh&&di?di(""[Symbol.iterator]()):_a,"%Symbol%":bh?Symbol:_a,"%SyntaxError%":wh,"%ThrowTypeError%":ybe,"%TypedArray%":bbe,"%TypeError%":_h,"%Uint8Array%":typeof Uint8Array=="undefined"?_a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?_a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?_a:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?_a:Uint32Array,"%URIError%":mbe,"%WeakMap%":typeof WeakMap=="undefined"?_a:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?_a:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?_a:WeakSet};if(di)try{null.error}catch(e){LY=di(di(e)),rv["%Error.prototype%"]=LY}var LY,xbe=function e(r){var t;if(r==="%AsyncFunction%")t=Y8("async function () {}");else if(r==="%GeneratorFunction%")t=Y8("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=Y8("async function* () {}");else if(r==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&di&&(t=di(n.prototype))}return rv[r]=t,t},DY={__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"]},Np=Cb(),Eb=EY(),_be=Np.call(Function.call,Array.prototype.concat),wbe=Np.call(Function.apply,Array.prototype.splice),qY=Np.call(Function.call,String.prototype.replace),Lb=Np.call(Function.call,String.prototype.slice),Abe=Np.call(Function.call,RegExp.prototype.exec),Tbe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mbe=/\\(\\)?/g,Sbe=function(r){var t=Lb(r,0,1),a=Lb(r,-1);if(t==="%"&&a!=="%")throw new wh("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new wh("invalid intrinsic syntax, expected opening `%`");var n=[];return qY(r,Tbe,function(i,o,l,s){n[n.length]=l?qY(s,Mbe,"$1"):o||i}),n},kbe=function(r,t){var a=r,n;if(Eb(DY,a)&&(n=DY[a],a="%"+n[0]+"%"),Eb(rv,a)){var i=rv[a];if(i===xh&&(i=xbe(a)),typeof i=="undefined"&&!t)throw new _h("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:i}}throw new wh("intrinsic "+r+" does not exist!")};RY.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new _h("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new _h('"allowMissing" argument must be a boolean');if(Abe(/^%?[^%]*%?$/,r)===null)throw new wh("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Sbe(r),n=a.length>0?a[0]:"",i=kbe("%"+n+"%",t),o=i.name,l=i.value,s=!1,u=i.alias;u&&(n=u[0],wbe(a,_be([0,1],u)));for(var f=1,c=!0;f=a.length){var g=ev(l,h);c=!!g,c&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[h]}else c=Eb(l,h),l=l[h];c&&!s&&(rv[o]=l)}}return l}});var qb=R((Yqe,PY)=>{"use strict";var Cbe=Ah(),Db=Cbe("%Object.defineProperty%",!0)||!1;if(Db)try{Db({},"a",{value:1})}catch(e){Db=!1}PY.exports=Db});var Ip=R((Wqe,NY)=>{"use strict";var Ebe=Ah(),Fb=Ebe("%Object.getOwnPropertyDescriptor%",!0);if(Fb)try{Fb([],"length")}catch(e){Fb=null}NY.exports=Fb});var BY=R((jqe,zY)=>{"use strict";var IY=qb(),Lbe=V8(),Th=Pp(),OY=Ip();zY.exports=function(r,t,a){if(!r||typeof r!="object"&&typeof r!="function")throw new Th("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Th("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Th("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Th("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Th("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Th("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,s=!!OY&&OY(r,t);if(IY)IY(r,t,{configurable:o===null&&s?s.configurable:!o,enumerable:n===null&&s?s.enumerable:!n,value:a,writable:i===null&&s?s.writable:!i});else if(l||!n&&!i&&!o)r[t]=a;else throw new Lbe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var X8=R((Xqe,GY)=>{"use strict";var j8=qb(),UY=function(){return!!j8};UY.hasArrayLengthDefineBug=function(){if(!j8)return null;try{return j8([],"length",{value:1}).length!==1}catch(r){return!0}};GY.exports=UY});var jY=R((Zqe,WY)=>{"use strict";var Dbe=Ah(),HY=BY(),qbe=X8()(),VY=Ip(),YY=Pp(),Fbe=Dbe("%Math.floor%");WY.exports=function(r,t){if(typeof r!="function")throw new YY("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Fbe(t)!==t)throw new YY("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,i=!0;if("length"in r&&VY){var o=VY(r,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(i=!1)}return(n||i||!a)&&(qbe?HY(r,"length",t,!0,!0):HY(r,"length",t)),r}});var Op=R((Jqe,Rb)=>{"use strict";var Z8=Cb(),Pb=Ah(),Rbe=jY(),Pbe=Pp(),JY=Pb("%Function.prototype.apply%"),$Y=Pb("%Function.prototype.call%"),KY=Pb("%Reflect.apply%",!0)||Z8.call($Y,JY),XY=qb(),Nbe=Pb("%Math.max%");Rb.exports=function(r){if(typeof r!="function")throw new Pbe("a function is required");var t=KY(Z8,$Y,arguments);return Rbe(t,1+Nbe(0,r.length-(arguments.length-1)),!0)};var ZY=function(){return KY(Z8,JY,arguments)};XY?XY(Rb.exports,"apply",{value:ZY}):Rb.exports.apply=ZY});var Mh=R(($qe,rW)=>{"use strict";var QY=Ah(),eW=Op(),Ibe=eW(QY("String.prototype.indexOf"));rW.exports=function(r,t){var a=QY(r,!!t);return typeof a=="function"&&Ibe(r,".prototype.")>-1?eW(a):a}});var nW=R((Kqe,aW)=>{"use strict";var Obe=Rp()(),zbe=Mh(),J8=zbe("Object.prototype.toString"),Nb=function(r){return Obe&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:J8(r)==="[object Arguments]"},tW=function(r){return Nb(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&J8(r)!=="[object Array]"&&J8(r.callee)==="[object Function]"},Bbe=function(){return Nb(arguments)}();Nb.isLegacyArguments=tW;aW.exports=Bbe?Nb:tW});var lW=R((Qqe,oW)=>{"use strict";var Ube=Object.prototype.toString,Gbe=Function.prototype.toString,Hbe=/^\s*(?:function)?\*/,iW=Rp()(),$8=Object.getPrototypeOf,Vbe=function(){if(!iW)return!1;try{return Function("return function*() {}")()}catch(e){}},K8;oW.exports=function(r){if(typeof r!="function")return!1;if(Hbe.test(Gbe.call(r)))return!0;if(!iW){var t=Ube.call(r);return t==="[object GeneratorFunction]"}if(!$8)return!1;if(typeof K8=="undefined"){var a=Vbe();K8=a?$8(a):!1}return $8(r)===K8}});var cW=R((eFe,fW)=>{"use strict";var uW=Function.prototype.toString,Sh=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e7,Ib;if(typeof Sh=="function"&&typeof Object.defineProperty=="function")try{e7=Object.defineProperty({},"length",{get:function(){throw Ib}}),Ib={},Sh(function(){throw 42},null,e7)}catch(e){e!==Ib&&(Sh=null)}else Sh=null;var Ybe=/^\s*class\b/,r7=function(r){try{var t=uW.call(r);return Ybe.test(t)}catch(a){return!1}},Q8=function(r){try{return r7(r)?!1:(uW.call(r),!0)}catch(t){return!1}},Ob=Object.prototype.toString,Wbe="[object Object]",jbe="[object Function]",Xbe="[object GeneratorFunction]",Zbe="[object HTMLAllCollection]",Jbe="[object HTML document.all class]",$be="[object HTMLCollection]",Kbe=typeof Symbol=="function"&&!!Symbol.toStringTag,Qbe=!(0 in[,]),t7=function(){return!1};typeof document=="object"&&(sW=document.all,Ob.call(sW)===Ob.call(document.all)&&(t7=function(r){if((Qbe||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=Ob.call(r);return(t===Zbe||t===Jbe||t===$be||t===Wbe)&&r("")==null}catch(a){}return!1}));var sW;fW.exports=Sh?function(r){if(t7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{Sh(r,null,e7)}catch(t){if(t!==Ib)return!1}return!r7(r)&&Q8(r)}:function(r){if(t7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(Kbe)return Q8(r);if(r7(r))return!1;var t=Ob.call(r);return t!==jbe&&t!==Xbe&&!/^\[object HTML/.test(t)?!1:Q8(r)}});var a7=R((rFe,hW)=>{"use strict";var exe=cW(),rxe=Object.prototype.toString,vW=Object.prototype.hasOwnProperty,txe=function(r,t,a){for(var n=0,i=r.length;n=3&&(n=a),rxe.call(r)==="[object Array]"?txe(r,t,n):typeof r=="string"?axe(r,t,n):nxe(r,t,n)};hW.exports=ixe});var i7=R((tFe,dW)=>{"use strict";var n7=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],oxe=typeof globalThis=="undefined"?window:globalThis;dW.exports=function(){for(var r=[],t=0;t{"use strict";var Bb=a7(),lxe=i7(),pW=Op(),s7=Mh(),zb=Ip(),sxe=s7("Object.prototype.toString"),yW=Rp()(),mW=typeof globalThis=="undefined"?window:globalThis,l7=lxe(),u7=s7("String.prototype.slice"),o7=Object.getPrototypeOf,uxe=s7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1?t:t!=="Object"?!1:cxe(r)}return zb?fxe(r):null}});var MW=R((nFe,TW)=>{"use strict";var xW=a7(),vxe=i7(),c7=Mh(),hxe=c7("Object.prototype.toString"),_W=Rp()(),Gb=Ip(),dxe=typeof globalThis=="undefined"?window:globalThis,wW=vxe(),pxe=c7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1}return Gb?yxe(r):!1}});var zW=R(ga=>{"use strict";var gxe=nW(),bxe=lW(),Rl=bW(),SW=MW();function kh(e){return e.call.bind(e)}var kW=typeof BigInt!="undefined",CW=typeof Symbol!="undefined",el=kh(Object.prototype.toString),xxe=kh(Number.prototype.valueOf),_xe=kh(String.prototype.valueOf),wxe=kh(Boolean.prototype.valueOf);kW&&(EW=kh(BigInt.prototype.valueOf));var EW;CW&&(LW=kh(Symbol.prototype.valueOf));var LW;function Bp(e,r){if(typeof e!="object")return!1;try{return r(e),!0}catch(t){return!1}}ga.isArgumentsObject=gxe;ga.isGeneratorFunction=bxe;ga.isTypedArray=SW;function Axe(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ga.isPromise=Axe;function Txe(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):SW(e)||qW(e)}ga.isArrayBufferView=Txe;function Mxe(e){return Rl(e)==="Uint8Array"}ga.isUint8Array=Mxe;function Sxe(e){return Rl(e)==="Uint8ClampedArray"}ga.isUint8ClampedArray=Sxe;function kxe(e){return Rl(e)==="Uint16Array"}ga.isUint16Array=kxe;function Cxe(e){return Rl(e)==="Uint32Array"}ga.isUint32Array=Cxe;function Exe(e){return Rl(e)==="Int8Array"}ga.isInt8Array=Exe;function Lxe(e){return Rl(e)==="Int16Array"}ga.isInt16Array=Lxe;function Dxe(e){return Rl(e)==="Int32Array"}ga.isInt32Array=Dxe;function qxe(e){return Rl(e)==="Float32Array"}ga.isFloat32Array=qxe;function Fxe(e){return Rl(e)==="Float64Array"}ga.isFloat64Array=Fxe;function Rxe(e){return Rl(e)==="BigInt64Array"}ga.isBigInt64Array=Rxe;function Pxe(e){return Rl(e)==="BigUint64Array"}ga.isBigUint64Array=Pxe;function Hb(e){return el(e)==="[object Map]"}Hb.working=typeof Map!="undefined"&&Hb(new Map);function Nxe(e){return typeof Map=="undefined"?!1:Hb.working?Hb(e):e instanceof Map}ga.isMap=Nxe;function Vb(e){return el(e)==="[object Set]"}Vb.working=typeof Set!="undefined"&&Vb(new Set);function Ixe(e){return typeof Set=="undefined"?!1:Vb.working?Vb(e):e instanceof Set}ga.isSet=Ixe;function Yb(e){return el(e)==="[object WeakMap]"}Yb.working=typeof WeakMap!="undefined"&&Yb(new WeakMap);function Oxe(e){return typeof WeakMap=="undefined"?!1:Yb.working?Yb(e):e instanceof WeakMap}ga.isWeakMap=Oxe;function h7(e){return el(e)==="[object WeakSet]"}h7.working=typeof WeakSet!="undefined"&&h7(new WeakSet);function zxe(e){return h7(e)}ga.isWeakSet=zxe;function Wb(e){return el(e)==="[object ArrayBuffer]"}Wb.working=typeof ArrayBuffer!="undefined"&&Wb(new ArrayBuffer);function DW(e){return typeof ArrayBuffer=="undefined"?!1:Wb.working?Wb(e):e instanceof ArrayBuffer}ga.isArrayBuffer=DW;function jb(e){return el(e)==="[object DataView]"}jb.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&jb(new DataView(new ArrayBuffer(1),0,1));function qW(e){return typeof DataView=="undefined"?!1:jb.working?jb(e):e instanceof DataView}ga.isDataView=qW;var v7=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function zp(e){return el(e)==="[object SharedArrayBuffer]"}function FW(e){return typeof v7=="undefined"?!1:(typeof zp.working=="undefined"&&(zp.working=zp(new v7)),zp.working?zp(e):e instanceof v7)}ga.isSharedArrayBuffer=FW;function Bxe(e){return el(e)==="[object AsyncFunction]"}ga.isAsyncFunction=Bxe;function Uxe(e){return el(e)==="[object Map Iterator]"}ga.isMapIterator=Uxe;function Gxe(e){return el(e)==="[object Set Iterator]"}ga.isSetIterator=Gxe;function Hxe(e){return el(e)==="[object Generator]"}ga.isGeneratorObject=Hxe;function Vxe(e){return el(e)==="[object WebAssembly.Module]"}ga.isWebAssemblyCompiledModule=Vxe;function RW(e){return Bp(e,xxe)}ga.isNumberObject=RW;function PW(e){return Bp(e,_xe)}ga.isStringObject=PW;function NW(e){return Bp(e,wxe)}ga.isBooleanObject=NW;function IW(e){return kW&&Bp(e,EW)}ga.isBigIntObject=IW;function OW(e){return CW&&Bp(e,LW)}ga.isSymbolObject=OW;function Yxe(e){return RW(e)||PW(e)||NW(e)||IW(e)||OW(e)}ga.isBoxedPrimitive=Yxe;function Wxe(e){return typeof Uint8Array!="undefined"&&(DW(e)||FW(e))}ga.isAnyArrayBuffer=Wxe;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ga,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var UW=R((oFe,BW)=>{BW.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}});var GW=R((lFe,d7)=>{typeof Object.create=="function"?d7.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:d7.exports=function(r,t){if(t){r.super_=t;var a=function(){};a.prototype=t.prototype,r.prototype=new a,r.prototype.constructor=r}}});var Eh=R(ba=>{var HW=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),a={},n=0;n=n)return l;switch(l){case"%s":return String(a[t++]);case"%d":return Number(a[t++]);case"%j":try{return JSON.stringify(a[t++])}catch(s){return"[Circular]"}default:return l}}),o=a[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),g7(r)?t.showHidden=r:r&&ba._extend(t,r),av(t.showHidden)&&(t.showHidden=!1),av(t.depth)&&(t.depth=2),av(t.colors)&&(t.colors=!1),av(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Xxe),$b(t,e,t.depth)}ba.inspect=bf;bf.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]};bf.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Xxe(e,r){var t=bf.styles[r];return t?"\x1B["+bf.colors[t][0]+"m"+e+"\x1B["+bf.colors[t][1]+"m":e}function Zxe(e,r){return e}function Jxe(e){var r={};return e.forEach(function(t,a){r[t]=!0}),r}function $b(e,r,t){if(e.customInspect&&r&&Jb(r.inspect)&&r.inspect!==ba.inspect&&!(r.constructor&&r.constructor.prototype===r)){var a=r.inspect(t,e);return ex(a)||(a=$b(e,a,t)),a}var n=$xe(e,r);if(n)return n;var i=Object.keys(r),o=Jxe(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),Gp(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p7(r);if(i.length===0){if(Jb(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(Up(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(Kb(r))return e.stylize(Date.prototype.toString.call(r),"date");if(Gp(r))return p7(r)}var s="",u=!1,f=["{","}"];if(YW(r)&&(u=!0,f=["[","]"]),Jb(r)){var c=r.name?": "+r.name:"";s=" [Function"+c+"]"}if(Up(r)&&(s=" "+RegExp.prototype.toString.call(r)),Kb(r)&&(s=" "+Date.prototype.toUTCString.call(r)),Gp(r)&&(s=" "+p7(r)),i.length===0&&(!u||r.length==0))return f[0]+s+f[1];if(t<0)return Up(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var h;return u?h=Kxe(e,r,t,o,i):h=i.map(function(d){return y7(e,r,t,o,d,u)}),e.seen.pop(),Qxe(h,s,f)}function $xe(e,r){if(av(r))return e.stylize("undefined","undefined");if(ex(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(WW(r))return e.stylize(""+r,"number");if(g7(r))return e.stylize(""+r,"boolean");if(Qb(r))return e.stylize("null","null")}function p7(e){return"["+Error.prototype.toString.call(e)+"]"}function Kxe(e,r,t,a,n){for(var i=[],o=0,l=r.length;o{"use strict";iC.exports=function(r){return r}});var I_=R(Gs=>{"use strict";var Xie=ia(),Zie=hc(),Jie=fg(),$ie=_n().BADNUM,N_=1e-9;Gs.findBin=function(e,r,t){if(Xie(r.start))return t?Math.ceil((e-r.start)/r.size-N_)-1:Math.floor((e-r.start)/r.size+N_);var a=0,n=r.length,i=0,o=n>1?(r[n-1]-r[0])/(n-1):1,l,s;for(o>=0?s=t?Kie:Qie:s=t?roe:eoe,e+=o*N_*(t?-1:1)*(o>=0?1:-1);a90&&Zie.log("Long binary search..."),a-1};function Kie(e,r){return er}function roe(e,r){return e>=r}Gs.sorterAsc=function(e,r){return e-r};Gs.sorterDes=function(e,r){return r-e};Gs.distinctVals=function(e){var r=e.slice();r.sort(Gs.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===$ie;t--);for(var a=r[t]-r[0]||1,n=a/(t||1)/1e4,i=[],o,l=0;l<=t;l++){var s=r[l],u=s-o;o===void 0?(i.push(s),o=s):u>n&&(a=Math.min(a,u),i.push(s),o=s)}return{vals:i,minDiff:a}};Gs.roundUp=function(e,r,t){for(var a=0,n=r.length-1,i,o=0,l=t?0:1,s=t?1:0,u=t?Math.ceil:Math.floor;a0&&(a=1),t&&a)return e.sort(r)}return a?e:e.reverse()};Gs.findIndexOfMin=function(e,r){r=r||Jie;for(var t=1/0,a,n=0;n{"use strict";oC.exports=function(r){return Object.keys(r).sort()}});var lC=R(mn=>{"use strict";var i1=ia(),toe=ro().isArrayOrTypedArray;mn.aggNums=function(e,r,t,a){var n,i;if((!a||a>t.length)&&(a=t.length),i1(r)||(r=!1),toe(t[0])){for(i=new Array(a),n=0;ne.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var vC=R((ake,cC)=>{"use strict";var sC=e0(),O_=sC.mod,aoe=sC.modHalf,o1=Math.PI,Gu=2*o1;function noe(e){return e/180*o1}function ioe(e){return e/o1*180}function z_(e){return Math.abs(e[1]-e[0])>Gu-1e-14}function uC(e,r){return aoe(r-e,Gu)}function ooe(e,r){return Math.abs(uC(e,r))}function fC(e,r){if(z_(r))return!0;var t,a;r[0]a&&(a+=Gu);var n=O_(e,Gu),i=n+Gu;return n>=t&&n<=a||i>=t&&i<=a}function loe(e,r,t,a){if(!fC(r,a))return!1;var n,i;return t[0]=n&&e<=i}function B_(e,r,t,a,n,i,o){n=n||0,i=i||0;var l=z_([t,a]),s,u,f,c,h;l?(s=0,u=o1,f=Gu):t{"use strict";pc.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};pc.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};pc.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};pc.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};pc.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};pc.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var mC=R(mc=>{"use strict";var U_=e0().mod;mc.segmentsIntersect=pC;function pC(e,r,t,a,n,i,o,l){var s=t-e,u=n-e,f=o-n,c=a-r,h=i-r,d=l-i,p=s*d-f*c;if(p===0)return null;var g=(u*d-f*h)/p,m=(u*c-s*h)/p;return m<0||m>1||g<0||g>1?null:{x:e+s*g,y:r+c*g}}mc.segmentDistance=function(r,t,a,n,i,o,l,s){if(pC(r,t,a,n,i,o,l,s))return 0;var u=a-r,f=n-t,c=l-i,h=s-o,d=u*u+f*f,p=c*c+h*h,g=Math.min(vg(u,f,d,i-r,o-t),vg(u,f,d,l-r,s-t),vg(c,h,p,r-i,t-o),vg(c,h,p,a-i,n-o));return Math.sqrt(g)};function vg(e,r,t,a,n){var i=a*e+n*r;if(i<0)return a*a+n*n;if(i>t){var o=a-e,l=n-r;return o*o+l*l}else{var s=a*r-n*e;return s*s/t}}var hg,G_,dC;mc.getTextLocation=function(r,t,a,n){if((r!==G_||n!==dC)&&(hg={},G_=r,dC=n),hg[a])return hg[a];var i=r.getPointAtLength(U_(a-n/2,t)),o=r.getPointAtLength(U_(a+n/2,t)),l=Math.atan((o.y-i.y)/(o.x-i.x)),s=r.getPointAtLength(U_(a,t)),u=(s.x*4+i.x+o.x)/6,f=(s.y*4+i.y+o.y)/6,c={x:u,y:f,theta:l};return hg[a]=c,c};mc.clearLocationCache=function(){G_=null};mc.getVisibleSegment=function(r,t,a){var n=t.left,i=t.right,o=t.top,l=t.bottom,s=0,u=r.getTotalLength(),f=u,c,h;function d(g){var m=r.getPointAtLength(g);g===0?c=m:g===u&&(h=m);var x=m.xi?m.x-i:0,_=m.yl?m.y-l:0;return Math.sqrt(x*x+_*_)}for(var p=d(s);p;){if(s+=p+a,s>f)return;p=d(s)}for(p=d(f);p;){if(f-=p+a,s>f)return;p=d(f)}return{min:s,max:f,len:f-s,total:u,isClosed:s===0&&f===u&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};mc.findPointOnPath=function(r,t,a,n){n=n||{};for(var i=n.pathLength||r.getTotalLength(),o=n.tolerance||.001,l=n.iterationLimit||30,s=r.getPointAtLength(0)[a]>r.getPointAtLength(i)[a]?-1:1,u=0,f=0,c=i,h,d,p;u0?c=h:f=h,u++}return d}});var dg=R(l1=>{"use strict";var Hs={};l1.throttle=function(r,t,a){var n=Hs[r],i=Date.now();if(!n){for(var o in Hs)Hs[o].tsn.ts+t){l();return}n.timer=setTimeout(function(){l(),n.timer=null},t)};l1.done=function(e){var r=Hs[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var a=r.onDone;r.onDone=function(){a&&a(),t(),r.onDone=null}})};l1.clear=function(e){if(e)yC(Hs[e]),delete Hs[e];else for(var r in Hs)l1.clear(r)};function yC(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var bC=R((lke,gC)=>{"use strict";gC.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var xC=R((ske,pg)=>{"use strict";pg.exports=H_;pg.exports.isMobile=H_;pg.exports.default=H_;var coe=/(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,voe=/CrOS/,hoe=/android|ipad|playbook|silk/i;function H_(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=coe.test(r)&&!voe.test(r)||!!e.tablet&&hoe.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var wC=R((uke,_C)=>{"use strict";var doe=ia(),poe=xC();_C.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=moe(),typeof t!="string")return!0;var a=poe({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var n=t.split(" "),i=1;i-1;l--){var s=n[l];if(s.substr(0,8)==="Version/"){var u=s.substr(8).split(".")[0];if(doe(u)&&(u=+u),u>=13)return!0}}}return a};function moe(){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 TC=R((fke,AC)=>{"use strict";var yoe=ta();AC.exports=function(r,t,a){var n=r.selectAll("g."+a.replace(/\s/g,".")).data(t,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",a),n.order();var i=r.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][i]=yoe.select(this)}),n}});var SC=R((cke,MC)=>{"use strict";var goe=Ct();MC.exports=function(r,t){for(var a=r._context.locale,n=0;n<2;n++){for(var i=r._context.locales,o=0;o<2;o++){var l=(i[a]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=goe.localeRegistry}var u=a.split("-")[0];if(u===a)break;a=u}return t}});var CC=R((vke,kC)=>{"use strict";kC.exports=function(r){for(var t={},a=[],n=0,i=0;i{"use strict";EC.exports=function(r){for(var t=_oe(r)?xoe:boe,a=[],n=0;n{"use strict";DC.exports=function(r,t){if(!t)return r;var a=1/Math.abs(t),n=a>1?(a*r+a*t)/a:r+t,i=String(n).length;if(i>16){var o=String(t).length,l=String(r).length;if(i>=l+o){var s=parseFloat(n).toPrecision(12);s.indexOf("e+")===-1&&(n=+s)}}return n}});var RC=R((pke,FC)=>{"use strict";var woe=ia(),Aoe=_n().BADNUM,Toe=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;FC.exports=function(r){return typeof r=="string"&&(r=r.replace(Toe,"")),woe(r)?Number(r):Aoe}});var fr=R((mke,jC)=>{"use strict";var s1=ta(),Moe=Kv().utcFormat,Soe=v_().format,BC=ia(),UC=_n(),GC=UC.FP_SAFE,koe=-GC,PC=UC.BADNUM,Ae=jC.exports={};Ae.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var NC={};Ae.warnBadFormat=function(e){var r=String(e);NC[r]||(NC[r]=1,Ae.warn('encountered bad format: "'+r+'"'))};Ae.noFormat=function(e){return String(e)};Ae.numberFormat=function(e){var r;try{r=Soe(Ae.adjustFormat(e))}catch(t){return Ae.warnBadFormat(e),Ae.noFormat}return r};Ae.nestedProperty=Gy();Ae.keyedContainer=SM();Ae.relativeAttr=CM();Ae.isPlainObject=Ru();Ae.toLogRange=Vy();Ae.relinkPrivateKeys=qM();var Hu=ro();Ae.isArrayBuffer=Hu.isArrayBuffer;Ae.isTypedArray=Hu.isTypedArray;Ae.isArrayOrTypedArray=Hu.isArrayOrTypedArray;Ae.isArray1D=Hu.isArray1D;Ae.ensureArray=Hu.ensureArray;Ae.concat=Hu.concat;Ae.maxRowLength=Hu.maxRowLength;Ae.minRowLength=Hu.minRowLength;var HC=e0();Ae.mod=HC.mod;Ae.modHalf=HC.modHalf;var Vu=$M();Ae.valObjectMeta=Vu.valObjectMeta;Ae.coerce=Vu.coerce;Ae.coerce2=Vu.coerce2;Ae.coerceFont=Vu.coerceFont;Ae.coercePattern=Vu.coercePattern;Ae.coerceHoverinfo=Vu.coerceHoverinfo;Ae.coerceSelectionMarkerOpacity=Vu.coerceSelectionMarkerOpacity;Ae.validate=Vu.validate;var _o=nC();Ae.dateTime2ms=_o.dateTime2ms;Ae.isDateTime=_o.isDateTime;Ae.ms2DateTime=_o.ms2DateTime;Ae.ms2DateTimeLocal=_o.ms2DateTimeLocal;Ae.cleanDate=_o.cleanDate;Ae.isJSDate=_o.isJSDate;Ae.formatDate=_o.formatDate;Ae.incrementMonth=_o.incrementMonth;Ae.dateTick0=_o.dateTick0;Ae.dfltRange=_o.dfltRange;Ae.findExactDates=_o.findExactDates;Ae.MIN_MS=_o.MIN_MS;Ae.MAX_MS=_o.MAX_MS;var yc=I_();Ae.findBin=yc.findBin;Ae.sorterAsc=yc.sorterAsc;Ae.sorterDes=yc.sorterDes;Ae.distinctVals=yc.distinctVals;Ae.roundUp=yc.roundUp;Ae.sort=yc.sort;Ae.findIndexOfMin=yc.findIndexOfMin;Ae.sortObjectKeys=cg();var Vs=lC();Ae.aggNums=Vs.aggNums;Ae.len=Vs.len;Ae.mean=Vs.mean;Ae.geometricMean=Vs.geometricMean;Ae.median=Vs.median;Ae.midRange=Vs.midRange;Ae.variance=Vs.variance;Ae.stdev=Vs.stdev;Ae.interp=Vs.interp;var pl=Qy();Ae.init2dArray=pl.init2dArray;Ae.transposeRagged=pl.transposeRagged;Ae.dot=pl.dot;Ae.translationMatrix=pl.translationMatrix;Ae.rotationMatrix=pl.rotationMatrix;Ae.rotationXYMatrix=pl.rotationXYMatrix;Ae.apply3DTransform=pl.apply3DTransform;Ae.apply2DTransform=pl.apply2DTransform;Ae.apply2DTransform2=pl.apply2DTransform2;Ae.convertCssMatrix=pl.convertCssMatrix;Ae.inverseTransformMatrix=pl.inverseTransformMatrix;var es=vC();Ae.deg2rad=es.deg2rad;Ae.rad2deg=es.rad2deg;Ae.angleDelta=es.angleDelta;Ae.angleDist=es.angleDist;Ae.isFullCircle=es.isFullCircle;Ae.isAngleInsideSector=es.isAngleInsideSector;Ae.isPtInsideSector=es.isPtInsideSector;Ae.pathArc=es.pathArc;Ae.pathSector=es.pathSector;Ae.pathAnnulus=es.pathAnnulus;var h0=hC();Ae.isLeftAnchor=h0.isLeftAnchor;Ae.isCenterAnchor=h0.isCenterAnchor;Ae.isRightAnchor=h0.isRightAnchor;Ae.isTopAnchor=h0.isTopAnchor;Ae.isMiddleAnchor=h0.isMiddleAnchor;Ae.isBottomAnchor=h0.isBottomAnchor;var d0=mC();Ae.segmentsIntersect=d0.segmentsIntersect;Ae.segmentDistance=d0.segmentDistance;Ae.getTextLocation=d0.getTextLocation;Ae.clearLocationCache=d0.clearLocationCache;Ae.getVisibleSegment=d0.getVisibleSegment;Ae.findPointOnPath=d0.findPointOnPath;var gg=hn();Ae.extendFlat=gg.extendFlat;Ae.extendDeep=gg.extendDeep;Ae.extendDeepAll=gg.extendDeepAll;Ae.extendDeepNoArrays=gg.extendDeepNoArrays;var V_=hc();Ae.log=V_.log;Ae.warn=V_.warn;Ae.error=V_.error;var Coe=a0();Ae.counterRegex=Coe.counter;var Y_=dg();Ae.throttle=Y_.throttle;Ae.throttleDone=Y_.done;Ae.clearThrottle=Y_.clear;var ml=r1();Ae.getGraphDiv=ml.getGraphDiv;Ae.isPlotDiv=ml.isPlotDiv;Ae.removeElement=ml.removeElement;Ae.addStyleRule=ml.addStyleRule;Ae.addRelatedStyleRule=ml.addRelatedStyleRule;Ae.deleteRelatedStyleRule=ml.deleteRelatedStyleRule;Ae.setStyleOnHover=ml.setStyleOnHover;Ae.getFullTransformMatrix=ml.getFullTransformMatrix;Ae.getElementTransformMatrix=ml.getElementTransformMatrix;Ae.getElementAndAncestors=ml.getElementAndAncestors;Ae.equalDomRects=ml.equalDomRects;Ae.clearResponsive=bC();Ae.preserveDrawingBuffer=wC();Ae.makeTraceGroups=TC();Ae._=SC();Ae.notifier=A_();Ae.filterUnique=CC();Ae.filterVisible=LC();Ae.pushUnique=S_();Ae.increment=qC();Ae.cleanNumber=RC();Ae.ensureNumber=function(r){return BC(r)?(r=Number(r),r>GC||r=r?!1:BC(e)&&e>=0&&e%1===0};Ae.noop=Ky();Ae.identity=fg();Ae.repeat=function(e,r){for(var t=new Array(r),a=0;at?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};Ae.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};Ae.simpleMap=function(e,r,t,a,n){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,t)?n>10?(Ae.warn("randstr failed uniqueness"),o):e(r,t,a,(n||0)+1):o};Ae.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(a){a[r]=e,t[a.name]=a,t.optionList.push(a)},t["_"+r]=e,t};Ae.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,a=2*t,n=2*r-1,i=new Array(n),o=new Array(t),l,s,u,f;for(l=0;l=a&&(u-=a*Math.floor(u/a)),u<0?u=-1-u:u>=t&&(u=a-1-u),f+=e[u]*i[s];o[l]=f}return o};Ae.syncOrAsync=function(e,r,t){var a,n;function i(){return Ae.syncOrAsync(e,r,t)}for(;e.length;)if(n=e.splice(0,1)[0],a=n(r),a&&a.then)return a.then(i);return t&&t(r)};Ae.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};Ae.noneOrAll=function(e,r,t){if(e){var a=!1,n=!0,i,o;for(i=0;i0?n:0})};Ae.fillArray=function(e,r,t,a){if(a=a||Ae.identity,Ae.isArrayOrTypedArray(e))for(var n=0;n1?n+o[1]:"";if(i&&(o.length>1||l.length>4||t))for(;a.test(l);)l=l.replace(a,"$1"+i+"$2");return l+s};Ae.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var WC=/^\w*$/;Ae.templateString=function(e,r){var t={};return e.replace(Ae.TEMPLATE_STRING_REGEX,function(a,n){var i;return WC.test(n)?i=r[n]:(t[n]=t[n]||Ae.nestedProperty(r,n).get,i=t[n]()),Ae.isValidTextValue(i)?i:""})};var Roe={max:10,count:0,name:"hovertemplate"};Ae.hovertemplateString=function(){return W_.apply(Roe,arguments)};var Poe={max:10,count:0,name:"texttemplate"};Ae.texttemplateString=function(){return W_.apply(Poe,arguments)};var Noe=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Ioe(e){var r=e.match(Noe);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var Ooe={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ae.texttemplateStringForShapes=function(){return W_.apply(Ooe,arguments)};var IC=/^[:|\|]/;function W_(e,r,t){var a=this,n=arguments;r||(r={});var i={};return e.replace(Ae.TEMPLATE_STRING_REGEX,function(o,l,s){var u=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",c=l==="_xother_"||l==="_yother_",h=l==="xother_"||l==="yother_",d=u||f||h||c,p=l;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var g=null,m=null;if(a.parseMultDiv){var x=Ioe(p);p=x.key,g=x.op,m=x.number}var _;if(d){if(_=r[p],_===void 0)return""}else{var A,b;for(b=3;b=yg&&o<=OC,u=l>=yg&&l<=OC;if(s&&(a=10*a+o-yg),u&&(n=10*n+l-yg),!s||!u){if(a!==n)return a-n;if(o!==l)return o-l}}return n-a};var v0=2e9;Ae.seedPseudoRandom=function(){v0=2e9};Ae.pseudoRandom=function(){var e=v0;return v0=(69069*v0+1)%4294967296,Math.abs(v0-e)<429496729?Ae.pseudoRandom():v0/4294967296};Ae.fillText=function(e,r,t){var a=Array.isArray(t)?function(o){t.push(o)}:function(o){t.text=o},n=Ae.extractOption(e,r,"htx","hovertext");if(Ae.isValidTextValue(n))return a(n);var i=Ae.extractOption(e,r,"tx","text");if(Ae.isValidTextValue(i))return a(i)};Ae.isValidTextValue=function(e){return e||e===0};Ae.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",a=0;a1&&(u=1):u=0,Ae.strTranslate(n-u*(t+o),i-u*(a+l))+Ae.strScale(u)+(s?"rotate("+s+(r?"":" "+t+" "+a)+")":"")};Ae.setTransormAndDisplay=function(e,r){e.attr("transform",Ae.getTextTransform(r)),e.style("display",r.scale?null:"none")};Ae.ensureUniformFontSize=function(e,r){var t=Ae.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};Ae.join2=function(e,r,t){var a=e.length;return a>1?e.slice(0,-1).join(r)+t+e[a-1]:e.join(r)};Ae.bigFont=function(e){return Math.round(1.2*e)};var zC=Ae.getFirefoxVersion(),zoe=zC!==null&&zC<86;Ae.getPositionFromD3Event=function(){return zoe?[s1.event.layerX,s1.event.layerY]:[s1.event.offsetX,s1.event.offsetY]}});var JC=R(()=>{"use strict";var Boe=fr(),XC={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(j_ in XC)ZC=j_.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Boe.addStyleRule(ZC,XC[j_]);var ZC,j_});var X_=R((bke,$C)=>{$C.exports=!0});var J_=R((xke,KC)=>{"use strict";var Uoe=X_(),Z_;typeof window.matchMedia=="function"?Z_=!window.matchMedia("(hover: none)").matches:Z_=Uoe;KC.exports=Z_});var _g=R((_ke,$_)=>{"use strict";var p0=typeof Reflect=="object"?Reflect:null,QC=p0&&typeof p0.apply=="function"?p0.apply:function(r,t,a){return Function.prototype.apply.call(r,t,a)},bg;p0&&typeof p0.ownKeys=="function"?bg=p0.ownKeys:Object.getOwnPropertySymbols?bg=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:bg=function(r){return Object.getOwnPropertyNames(r)};function Goe(e){console&&console.warn&&console.warn(e)}var rE=Number.isNaN||function(r){return r!==r};function Ga(){Ga.init.call(this)}$_.exports=Ga;$_.exports.once=Woe;Ga.EventEmitter=Ga;Ga.prototype._events=void 0;Ga.prototype._eventsCount=0;Ga.prototype._maxListeners=void 0;var eE=10;function xg(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Ga,"defaultMaxListeners",{enumerable:!0,get:function(){return eE},set:function(e){if(typeof e!="number"||e<0||rE(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");eE=e}});Ga.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};Ga.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||rE(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function tE(e){return e._maxListeners===void 0?Ga.defaultMaxListeners:e._maxListeners}Ga.prototype.getMaxListeners=function(){return tE(this)};Ga.prototype.emit=function(r){for(var t=[],a=1;a0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[r];if(s===void 0)return!1;if(typeof s=="function")QC(s,this,t);else for(var u=s.length,f=lE(s,u),a=0;a0&&o.length>n&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=o.length,Goe(l)}return e}Ga.prototype.addListener=function(r,t){return aE(this,r,t,!1)};Ga.prototype.on=Ga.prototype.addListener;Ga.prototype.prependListener=function(r,t){return aE(this,r,t,!0)};function Hoe(){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 nE(e,r,t){var a={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},n=Hoe.bind(a);return n.listener=t,a.wrapFn=n,n}Ga.prototype.once=function(r,t){return xg(t),this.on(r,nE(this,r,t)),this};Ga.prototype.prependOnceListener=function(r,t){return xg(t),this.prependListener(r,nE(this,r,t)),this};Ga.prototype.removeListener=function(r,t){var a,n,i,o,l;if(xg(t),n=this._events,n===void 0)return this;if(a=n[r],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[r],n.removeListener&&this.emit("removeListener",r,a.listener||t));else if(typeof a!="function"){for(i=-1,o=a.length-1;o>=0;o--)if(a[o]===t||a[o].listener===t){l=a[o].listener,i=o;break}if(i<0)return this;i===0?a.shift():Voe(a,i),a.length===1&&(n[r]=a[0]),n.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};Ga.prototype.off=Ga.prototype.removeListener;Ga.prototype.removeAllListeners=function(r){var t,a,n;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[r]),this;if(arguments.length===0){var i=Object.keys(a),o;for(n=0;n=0;n--)this.removeListener(r,t[n]);return this};function iE(e,r,t){var a=e._events;if(a===void 0)return[];var n=a[r];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?Yoe(n):lE(n,n.length)}Ga.prototype.listeners=function(r){return iE(this,r,!0)};Ga.prototype.rawListeners=function(r){return iE(this,r,!1)};Ga.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):oE.call(e,r)};Ga.prototype.listenerCount=oE;function oE(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Ga.prototype.eventNames=function(){return this._eventsCount>0?bg(this._events):[]};function lE(e,r){for(var t=new Array(r),a=0;a{"use strict";var K_=_g().EventEmitter,Xoe={init:function(e){if(e._ev instanceof K_)return e;var r=new K_,t=new K_;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(a,n){r.emit(a,n),t.emit(a,n)},e},triggerHandler:function(e,r,t){var a,n=e._ev;if(!n)return;var i=n._events[r];if(!i)return;function o(s){if(s.listener){if(n.removeListener(r,s.listener),!s.fired)return s.fired=!0,s.listener.apply(n,[t])}else return s.apply(n,[t])}i=Array.isArray(i)?i:[i];var l;for(l=0;l{"use strict";var fE=fr(),Zoe=vc().dfltConfig;function Joe(e,r){for(var t=[],a,n=0;nZoe.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Ys.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Ys.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Ys.undo=function(r){var t,a;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,a=0;a{"use strict";hE.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var g0=R(Nn=>{"use strict";var Oo=Ct(),f1=fr(),Ag=hl(),e4=l0(),$oe=Q_(),Koe=t1(),Qoe=vc().configAttributes,dE=dl(),yl=f1.extendDeepAll,m0=f1.isPlainObject,ele=f1.isArrayOrTypedArray,Tg=f1.nestedProperty,rle=f1.valObjectMeta,r4="_isSubplotObj",Mg="_isLinkedToArray",tle="_arrayAttrRegexps",mE="_deprecated",t4=[r4,Mg,tle,mE];Nn.IS_SUBPLOT_OBJ=r4;Nn.IS_LINKED_TO_ARRAY=Mg;Nn.DEPRECATED=mE;Nn.UNDERSCORE_ATTRS=t4;Nn.get=function(){var e={};return Oo.allTypes.forEach(function(r){e[r]=nle(r)}),{defs:{valObjects:rle,metaKeys:t4.concat(["description","role","editType","impliedEdits"]),editType:{traces:dE.traces,layout:dE.layout},impliedEdits:{}},traces:e,layout:ile(),frames:ole(),animation:y0(Koe),config:y0(Qoe)}};Nn.crawl=function(e,r,t,a){var n=t||0;a=a||"",Object.keys(e).forEach(function(i){var o=e[i];if(t4.indexOf(i)===-1){var l=(a?a+".":"")+i;r(o,i,e,n,l),!Nn.isValObject(o)&&m0(o)&&i!=="impliedEdits"&&Nn.crawl(o,r,n+1,l)}})};Nn.isValObject=function(e){return e&&e.valType!==void 0};Nn.findArrayAttributes=function(e){var r=[],t=[],a=[],n,i;function o(s,u,f,c){t=t.slice(0,c).concat([u]),a=a.slice(0,c).concat([s&&s._isLinkedToArray]);var h=s&&(s.valType==="data_array"||s.arrayOk===!0)&&!(t[c-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&l(n,0,"")}function l(s,u,f){var c=s[t[u]],h=f+t[u];if(u===t.length-1)ele(c)&&r.push(i+h);else if(a[u]){if(Array.isArray(c))for(var d=0;d=i.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var o=r[t];if(!wg(o))return!1;e=i[n][o]}else e=i[n]}else e=i}}return e}function wg(e){return e===Math.round(e)&&e>=0}function nle(e){var r,t;r=Oo.modules[e]._module,t=r.basePlotModule;var a={};a.type=null;var n=yl({},Ag),i=yl({},r.attributes);Nn.crawl(i,function(s,u,f,c,h){Tg(n,h).set(void 0),s===void 0&&Tg(i,h).set(void 0)}),yl(a,n),Oo.traceIs(e,"noOpacity")&&delete a.opacity,Oo.traceIs(e,"showLegend")||(delete a.showlegend,delete a.legendgroup),Oo.traceIs(e,"noHover")&&(delete a.hoverinfo,delete a.hoverlabel),r.selectPoints||delete a.selectedpoints,yl(a,i),t.attributes&&yl(a,t.attributes),a.type=e;var o={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:y0(a)};if(r.layoutAttributes){var l={};yl(l,r.layoutAttributes),o.layoutAttributes=y0(l)}return r.animatable||Nn.crawl(o,function(s){Nn.isValObject(s)&&"anim"in s&&delete s.anim}),o}function ile(){var e={},r,t;yl(e,e4);for(r in Oo.subplotsRegistry)if(t=Oo.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a{"use strict";var b0=fr(),cle=hl(),Yu="templateitemname",a4={name:{valType:"string",editType:"none"}};a4[Yu]={valType:"string",editType:"calc"};gc.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=a4.name,r[Yu]=a4[Yu],r};gc.traceTemplater=function(e){var r={},t,a;for(t in e)a=e[t],Array.isArray(a)&&a.length&&(r[t]=0);function n(i){t=b0.coerce(i,{},cle,"type");var o={type:t,_template:null};if(t in r){a=e[t];var l=r[t]%a.length;r[t]++,o._template=a[l]}return o}return{newTrace:n}};gc.newContainer=function(e,r,t){var a=e._template,n=a&&(a[r]||t&&a[t]);b0.isPlainObject(n)||(n=null);var i=e[r]={_template:n};return i};gc.arrayTemplater=function(e,r,t){var a=e._template,n=a&&a[bE(r)],i=a&&a[r];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function l(u){var f={name:u.name,_input:u},c=f[Yu]=u[Yu];if(!gE(c))return f._template=n,f;for(var h=0;h=a&&(t._input||{})._templateitemname;i&&(n=a);var o=r+"["+n+"]",l;function s(){l={},i&&(l[o]={},l[o][Yu]=i)}s();function u(d,p){l[d]=p}function f(d,p){i?b0.nestedProperty(l[o],d).set(p):l[o+"."+d]=p}function c(){var d=l;return s(),d}function h(d,p){d&&f(d,p);var g=c();for(var m in g)b0.nestedProperty(e,m).set(g[m])}return{modifyBase:u,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var ai=R((kke,xE)=>{"use strict";var c1=a0().counter;xE.exports={idRegex:{x:c1("x","( domain)?"),y:c1("y","( domain)?")},attrRegex:c1("[xy]axis"),xAxisMatch:c1("xaxis"),yAxisMatch:c1("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 an=R(io=>{"use strict";var vle=Ct(),n4=ai();io.id2name=function(r){if(!(typeof r!="string"||!r.match(n4.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};io.name2id=function(r){if(r.match(n4.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};io.cleanId=function(r,t,a){var n=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(n4.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(n&&!a)){var i=r.split(" ")[0].substr(1).replace(/^0+/,"");return i==="1"&&(i=""),r.charAt(0)+i+(n&&a?" domain":"")}};io.list=function(e,r,t){var a=e._fullLayout;if(!a)return[];var n=io.listIds(e,r),i=new Array(n.length),o;for(o=0;oa?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};io.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function _E(e,r){if(r&&r.length){for(var t=0;t{"use strict";function hle(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function dle(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}wE.exports={clearOutlineControllers:hle,clearOutline:dle}});var Sg=R((Lke,AE)=>{"use strict";AE.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var v1=R(Cg=>{"use strict";var kg=Ct(),Dke=ai().SUBPLOT_PATTERN;Cg.getSubplotCalcData=function(e,r,t){var a=kg.subplotsRegistry[r];if(!a)return[];for(var n=a.attr,i=[],o=0;o{"use strict";var ple=Ct(),x0=fr();bc.manageCommandObserver=function(e,r,t,a){var n={},i=!0;r&&r._commandObserver&&(n=r._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=bc.hasSimpleAPICommandBindings(e,t,n.lookupTable);if(r&&r._commandObserver){if(o)return n;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,n}if(o){TE(e,o,n.cache),n.check=function(){if(i){var f=TE(e,o,n.cache);return f.changed&&a&&n.lookupTable[f.value]!==void 0&&(n.disable(),Promise.resolve(a({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],s=0;s0?".":"")+n;x0.isPlainObject(i)?i4(i,r,o,a+1):r(o,n,i)}})}});var jn=R((Rke,UE)=>{"use strict";var RE=ta(),yle=Kv().timeFormatLocale,gle=v_().formatLocale,h1=ia(),ble=h_(),pa=Ct(),PE=g0(),xle=Da(),Qr=fr(),NE=Qt(),CE=_n().BADNUM,oo=an(),_le=Wu().clearOutline,wle=Sg(),o4=t1(),Ale=Q_(),Tle=v1().getModuleCalcData,EE=Qr.relinkPrivateKeys,xc=Qr._,Br=UE.exports={};Qr.extendFlat(Br,pa);Br.attributes=hl();Br.attributes.type.values=Br.allTypes;Br.fontAttrs=ci();Br.layoutAttributes=l0();var Lg=kE();Br.executeAPICommand=Lg.executeAPICommand;Br.computeAPICommandBindings=Lg.computeAPICommandBindings;Br.manageCommandObserver=Lg.manageCommandObserver;Br.hasSimpleAPICommandBindings=Lg.hasSimpleAPICommandBindings;Br.redrawText=function(e){return e=Qr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(pa.getComponentMethod("annotations","draw")(e),pa.getComponentMethod("legend","draw")(e),pa.getComponentMethod("colorbar","draw")(e),r(Br.previousPromises(e)))},300)})};Br.resize=function(e){e=Qr.getGraphDiv(e);var r,t=new Promise(function(a,n){(!e||Qr.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=a,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Qr.isHidden(e)){a(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,pa.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===a&&(delete e._resolveResize,a(e))})},100)});return r&&r(t),t};Br.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};Br.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=Qr.ensureSingle(r._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:NE.defaultLine,"pointer-events":"all"}).each(function(){var u=RE.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)})}),a=t.node(),n={y:r._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=r.width-20?(n["text-anchor"]="start",n.x=5):(n["text-anchor"]="end",n.x=r._paper.attr("width")-7),t.attr(n);var i=t.select(".js-link-to-tool"),o=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&Mle(e,i),o.text(i.text()&&l.text()?" - ":"")}};function Mle(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){Br.sendDataToCloud(e)});else{var a=window.location.pathname.split("/"),n=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+n})}}Br.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=RE.select(e).append("div").attr("id","hiddenform").style("display","none"),a=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),n=a.append("input").attr({type:"text",name:"data"});return n.node().value=Br.graphJson(e,!1,"keepdata"),a.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var Sle=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],kle=["year","month","dayMonth","dayMonthYear"];Br.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var n=e._fullLayout={},i=e.layout||{},o=e._fullData||[],l=e._fullData=[],s=e.data||[],u=e.calcdata||[],f=e._context||{},c;e._transitionData||Br.createTransitionData(e),n._dfltTitle={plot:xc(e,"Click to enter Plot title"),subtitle:xc(e,"Click to enter Plot subtitle"),x:xc(e,"Click to enter X axis title"),y:xc(e,"Click to enter Y axis title"),colorbar:xc(e,"Click to enter Colorscale title"),annotation:xc(e,"new text")},n._traceWord=xc(e,"trace");var h=LE(e,Sle);if(n._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,p=a.height;Br.supplyLayoutGlobalDefaults(i,n,h),i.width||(n.width=d),i.height||(n.height=p),Br.sanitizeMargins(n)}else{Br.supplyLayoutGlobalDefaults(i,n,h);var g=!i.width||!i.height,m=n.autosize,x=f.autosizable,_=g&&(m||x);_?Br.plotAutoSize(e,i,n):g&&Br.sanitizeMargins(n),!m&&g&&(i.width=n.width,i.height=n.height)}n._d3locale=Lle(h,n.separators),n._extraFormat=LE(e,kle),n._initialAutoSizeIsDone=!0,n._dataLength=s.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var A=n._subplots=Ele(),b=n._splomAxes={x:{},y:{}},T=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=Cle(o,s),Br.supplyDataDefaults(s,l,i,n);var S=Object.keys(b.x),M=Object.keys(b.y);if(S.length>1&&M.length>1){for(pa.getComponentMethod("grid","sizeDefaults")(i,n),c=0;c15&&M.length>15&&n.shapes.length===0&&n.images.length===0,Br.linkSubplots(l,n,o,a),Br.cleanPlot(l,n,o,a);var q=!!(a._has&&a._has("cartesian")),O=!!(n._has&&n._has("cartesian")),U=q,$=O;U&&!$?a._bgLayer.remove():$&&!U&&(n._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&_le({_fullLayout:a}),Dle(l,n),EE(n,a),pa.getComponentMethod("colorscale","crossTraceDefaults")(l,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var W=n._tracePreGUI,H={},B;for(B in W)H[B]="old";for(c=0;c0){var f=1-2*i;o=Math.round(f*o),l=Math.round(f*l)}}var c=Br.layoutAttributes.width.min,h=Br.layoutAttributes.height.min;o1,p=!t.height&&Math.abs(a.height-l)>1;(p||d)&&(d&&(a.width=o),p&&(a.height=l)),r._initialAutoSize||(r._initialAutoSize={width:o,height:l}),Br.sanitizeMargins(a)};Br.supplyLayoutModuleDefaults=function(e,r,t,a){var n=pa.componentsRegistry,i=r._basePlotModules,o,l,s,u=pa.subplotsRegistry.cartesian;for(o in n)s=n[o],s.includeBasePlot&&s.includeBasePlot(e,r);i.length||i.push(u),r._has("cartesian")&&(pa.getComponentMethod("grid","contentDefaults")(e,r),u.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(Qr.subplotSort);for(l=0;l1&&(t.l/=m,t.r/=m)}if(h){var x=(t.t+t.b)/h;x>1&&(t.t/=x,t.b/=x)}var _=t.xl!==void 0?t.xl:t.x,A=t.xr!==void 0?t.xr:t.x,b=t.yt!==void 0?t.yt:t.y,T=t.yb!==void 0?t.yb:t.y;d[r]={l:{val:_,size:t.l+g},r:{val:A,size:t.r+g},b:{val:T,size:t.b+g},t:{val:b,size:t.t+g}},p[r]=1}if(!a._replotting)return Br.doAutoMargin(e)}};function Fle(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=oo.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}Br.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,a=r.height;r._size||(r._size={}),IE(r);var n=r._size,i=r.margin,o={t:0,b:0,l:0,r:0},l=Qr.extendFlat({},n),s=i.l,u=i.r,f=i.t,c=i.b,h=r._pushmargin,d=r._pushmarginIds,p=r.minreducedwidth,g=r.minreducedheight;if(i.autoexpand!==!1){for(var m in h)d[m]||delete h[m];var x=e._fullLayout._reservedMargin;for(var _ in x)for(var A in x[_]){var b=x[_][A];o[A]=Math.max(o[A],b)}h.base={l:{val:0,size:s},r:{val:1,size:u},t:{val:1,size:f},b:{val:0,size:c}};for(var T in o){var S=0;for(var M in h)M!=="base"&&h1(h[M][T].size)&&(S=h[M][T].size>S?h[M][T].size:S);var k=Math.max(0,i[T]-S);o[T]=Math.max(0,o[T]-k)}for(var D in h){var P=h[D].l||{},N=h[D].b||{},q=P.val,O=P.size,U=N.val,$=N.size,W=t-o.r-o.l,H=a-o.t-o.b;for(var B in h){if(h1(O)&&h[B].r){var V=h[B].r.val,j=h[B].r.size;if(V>q){var K=(O*V+(j-W)*q)/(V-q),ve=(j*(1-q)+(O-W)*(1-V))/(V-q);K+ve>s+u&&(s=K,u=ve)}}if(h1($)&&h[B].t){var xe=h[B].t.val,se=h[B].t.size;if(xe>U){var be=($*xe+(se-H)*U)/(xe-U),re=(se*(1-U)+($-H)*(1-xe))/(xe-U);be+re>c+f&&(c=be,f=re)}}}}}var ke=Qr.constrain(t-i.l-i.r,OE,p),ge=Qr.constrain(a-i.t-i.b,zE,g),Ee=Math.max(0,t-ke),De=Math.max(0,a-ge);if(Ee){var Ce=(s+u)/Ee;Ce>1&&(s/=Ce,u/=Ce)}if(De){var Y=(c+f)/De;Y>1&&(c/=Y,f/=Y)}if(n.l=Math.round(s)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(f)+o.t,n.b=Math.round(c)+o.b,n.p=Math.round(i.pad),n.w=Math.round(t)-n.l-n.r,n.h=Math.round(a)-n.t-n.b,!r._replotting&&(Br.didMarginChange(l,n)||Fle(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var ae=3*(1+Object.keys(d).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};Br.graphJson=function(e,r,t,a,n,i){(n&&r&&!e._fullData||n&&!r&&!e._fullLayout)&&Br.supplyDefaults(e);var o=n?e._fullData:e.data,l=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Qr.isPlainObject(h)){var p={},g;return Object.keys(h).sort().forEach(function(A){if(["_","["].indexOf(A.charAt(0))===-1){if(typeof h[A]=="function"){d&&(p[A]="_function");return}if(t==="keepdata"){if(A.substr(A.length-3)==="src")return}else if(t==="keepstream"){if(g=h[A+"src"],typeof g=="string"&&g.indexOf(":")>0&&!Qr.isPlainObject(h.stream))return}else if(t!=="keepall"&&(g=h[A+"src"],typeof g=="string"&&g.indexOf(":")>0))return;p[A]=u(h[A],d)}}),p}var m=Array.isArray(h),x=Qr.isTypedArray(h);if((m||x)&&h.dtype&&h.shape){var _=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Qr.isArrayBuffer(_)?ble.encode(_):_},d)}return m?h.map(function(A){return u(A,d)}):x?Qr.simpleMap(h,Qr.identity):Qr.isJSDate(h)?Qr.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=u(h);return r&&delete d.fit,d})};if(!r&&(f.layout=u(l),n)){var c=l._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(f.frames=u(s)),i&&(f.config=u(e._context,!0)),a==="object"?f:JSON.stringify(f)};Br.modifyFrames=function(e,r){var t,a,n,i=e._transitionData._frames,o=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){a=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return pa.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!a&&d===h&&l(c)}}t.runFn(p),setTimeout(p())})}function l(c){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return pa.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function s(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[Br.previousPromises,s,t.prepareFn,Br.rehover,Br.reselect,o],f=Qr.syncOrAsync(u,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}Br.doCalcdata=function(e,r){var t=oo.list(e),a=e._fullData,n=e._fullLayout,i,o,l,s,u=new Array(a.length),f=(e.calcdata||[]).slice();for(e.calcdata=u,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},l=0;l=0;s--)if(T[s].enabled){i._indexToPoints=T[s]._indexToPoints;break}o&&o.calc&&(b=o.calc(e,i))}(!Array.isArray(b)||!b[0])&&(b=[{x:CE,y:CE}]),b[0].t||(b[0].t={}),b[0].trace=i,u[_]=b}}for(qE(t,a,n),l=0;l{"use strict";_c.xmlns="http://www.w3.org/2000/xmlns/";_c.svg="http://www.w3.org/2000/svg";_c.xlink="http://www.w3.org/1999/xlink";_c.svgAttrs={xmlns:_c.svg,"xmlns:xlink":_c.xlink}});var ki=R((Nke,GE)=>{"use strict";GE.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 Ci=R(zo=>{"use strict";var wn=ta(),Ws=fr(),Ile=Ws.strTranslate,l4=ju(),Ole=ki().LINE_SPACING,zle=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;zo.convertToTspans=function(e,r,t){var a=e.text(),n=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&a.match(zle),i=wn.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":a,"data-math":"N"});function l(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var s=Kle(e.node(),a);s&&e.style("pointer-events","all"),zo.positionText(e),t&&t.call(e)}return n?(r&&r._promises||[]).push(new Promise(function(s){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),f={fontSize:u};Hle(n[2],f,function(c,h,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){l(),s();return}var g=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":a,"data-math":"Y"});g.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var m=d.width,x=d.height;p.attr({class:o,height:x,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _=e.node().style.fill||"black",A=p.select("g");A.attr({fill:_,stroke:_});var b=A.node().getBoundingClientRect(),T=b.width,S=b.height;(T>m||S>x)&&(p.style("overflow","hidden"),b=p.node().getBoundingClientRect(),T=b.width,S=b.height);var M=+e.attr("x"),k=+e.attr("y"),D=u||e.node().getBoundingClientRect().height,P=-D/4;if(o[0]==="y")g.attr({transform:"rotate("+[-90,M,k]+")"+Ile(-T/2,P-S/2)});else if(o[0]==="l")k=P-S/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)M=0,k=P;else{var N=e.attr("text-anchor");M=M-T*(N==="middle"?.5:N==="end"?1:0),k=k+P-S/2}p.attr({x:M,y:k}),t&&t.call(e,g),s(g)})})):l(),e};var Ble=/(<|<|<)/g,Ule=/(>|>|>)/g;function Gle(e){return e.replace(Ble,"\\lt ").replace(Ule,"\\gt ")}var HE=[["$","$"],["\\(","\\)"]];function Hle(e,r,t){var a=parseInt((MathJax.version||"").split(".")[0]);if(a!==2&&a!==3){Ws.warn("No MathJax version:",MathJax.version);return}var n,i,o,l,s=function(){return i=Ws.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:HE},displayAlign:"left"})},u=function(){i=Ws.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=HE},f=function(){if(n=MathJax.Hub.config.menuSettings.renderer,n!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){n=MathJax.config.startup.output,n!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var _="math-output-"+Ws.randstr({},64);l=wn.select("body").append("div").attr({id:_}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(Gle(e));var A=l.node();return a===2?MathJax.Hub.Typeset(A):MathJax.typeset([A])},d=function(){var _=l.select(a===2?".MathJax_SVG":".MathJax"),A=!_.empty()&&l.select("svg").node();if(!A)Ws.log("There was an error in the tex syntax.",e),t();else{var b=A.getBoundingClientRect(),T;a===2?T=wn.select("body").select("#MathJax_SVG_glyphs"):T=_.select("defs"),t(_,T,b)}l.remove()},p=function(){if(n!=="SVG")return MathJax.Hub.setRenderer(n)},g=function(){n!=="svg"&&(MathJax.config.startup.output=n)},m=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(i)},x=function(){MathJax.config=i};a===2?MathJax.Hub.Queue(s,f,h,d,p,m):a===3&&(u(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),g(),x()}))}var jE={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"},Vle={sub:"0.3em",sup:"-0.6em"},Yle={sub:"-0.21em",sup:"0.42em"},VE="\u200B",YE=["http:","https:","mailto:","",void 0,":"],XE=zo.NEWLINES=/(\r\n?|\n)/g,u4=/(<[^<>]*>)/,f4=/<(\/?)([^ >]*)(\s+(.*))?>/i,Wle=//i;zo.BR_TAG_ALL=//gi;var ZE=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,JE=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,$E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,jle=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function wc(e,r){if(!e)return null;var t=e.match(r),a=t&&(t[3]||t[4]);return a&&Dg(a)}var Xle=/(^|;)\s*color:/;zo.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,a=r.allowedTags!==void 0?r.allowedTags:["br"],n="...",i=n.length,o=e.split(u4),l=[],s="",u=0,f=0;fi?l.push(c.substr(0,g-i)+n):l.push(c.substr(0,g));break}s=""}}return l.join("")};var Zle={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Jle=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function Dg(e){return e.replace(Jle,function(r,t){var a;return t.charAt(0)==="#"?a=$le(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):a=Zle[t],a||r})}zo.convertEntities=Dg;function $le(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function Kle(e,r){r=r.replace(XE," ");var t=!1,a=[],n,i=-1;function o(){i++;var S=document.createElementNS(l4.svg,"tspan");wn.select(S).attr({class:"line",dy:i*Ole+"em"}),e.appendChild(S),n=S;var M=a;if(a=[{node:S}],M.length>1)for(var k=1;k.",r);return}var M=a.pop();S!==M.type&&Ws.log("Start tag <"+M.type+"> doesnt match end tag <"+S+">. Pretending it did match.",r),n=a[a.length-1].node}var f=Wle.test(r);f?o():(n=e,a=[{node:e}]);for(var c=r.split(u4),h=0;h{"use strict";var Qle=ta(),Fg=vl(),p1=ia(),qg=fr(),QE=Qt(),ese=fc().isValid;function rse(e,r,t){var a=r?qg.nestedProperty(e,r).get()||{}:e,n=a[t||"color"];n&&n._inputArray&&(n=n._inputArray);var i=!1;if(qg.isArrayOrTypedArray(n)){for(var o=0;o=0;a--,n++){var i=e[a];t[n]=[1-i[0],i[1]]}return t}function iL(e,r){r=r||{};for(var t=e.domain,a=e.range,n=a.length,i=new Array(n),o=0;o{"use strict";var lL=D_(),ase=lL.FORMAT_LINK,nse=lL.DATE_FORMAT_LINK;function ise(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?c4:sL)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function c4(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+ase+"."].join(" ")}function sL(e,r){return c4(e,r)+[" And for dates see: "+nse+".","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(" ")}uL.exports={axisHoverFormat:ise,descriptionOnlyNumbers:c4,descriptionWithDates:sL}});var Bo=R((Bke,SL)=>{"use strict";var fL=ci(),_0=Kl(),ML=Iu().dash,h4=hn().extendFlat,cL=Da().templatedArray,vL=m1().descriptionWithDates,ose=_n().ONEDAY,rs=ai(),lse=rs.HOUR_PATTERN,sse=rs.WEEKDAY_PATTERN,v4={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},use=h4({},v4,{values:v4.values.slice().concat(["sync"])});function hL(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var dL={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},pL={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},mL={valType:"data_array",editType:"ticks"},yL={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function gL(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function bL(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var xL={valType:"color",dflt:_0.defaultLine,editType:"ticks"},_L={valType:"color",dflt:_0.lightLine,editType:"ticks"};function wL(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var AL=h4({},ML,{editType:"ticks"}),TL={valType:"boolean",editType:"ticks"};SL.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:_0.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:fL({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[rs.idRegex.x.toString(),rs.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:[rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"calc"},rangebreaks:cL("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:[sse,lse,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:ose},editType:"calc"}),tickmode:use,nticks:hL(),tick0:dL,dtick:pL,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:mL,ticktext:{valType:"data_array",editType:"ticks"},ticks:yL,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:gL(),tickwidth:bL(),tickcolor:xL,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:h4({},ML,{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:fL({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:vL("tick label")},tickformatstops:cL("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:vL("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:_0.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:TL,gridcolor:_L,gridwidth:wL(),griddash:AL,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:_0.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:_0.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",rs.idRegex.x.toString(),rs.idRegex.y.toString()],editType:"plot"},minor:{tickmode:v4,nticks:hL("minor"),tick0:dL,dtick:pL,tickvals:mL,ticks:yL,ticklen:gL("minor"),tickwidth:bL("minor"),tickcolor:xL,gridcolor:_L,gridwidth:wL("minor"),griddash:AL,showgrid:TL,editType:"ticks"},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 Rg=R((Uke,EL)=>{"use strict";var Ha=Bo(),kL=ci(),CL=hn().extendFlat,fse=dl().overrideAll;EL.exports=fse({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:Ha.linecolor,outlinewidth:Ha.linewidth,bordercolor:Ha.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Ha.minor.tickmode,nticks:Ha.nticks,tick0:Ha.tick0,dtick:Ha.dtick,tickvals:Ha.tickvals,ticktext:Ha.ticktext,ticks:CL({},Ha.ticks,{dflt:""}),ticklabeloverflow:CL({},Ha.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:Ha.ticklen,tickwidth:Ha.tickwidth,tickcolor:Ha.tickcolor,ticklabelstep:Ha.ticklabelstep,showticklabels:Ha.showticklabels,labelalias:Ha.labelalias,tickfont:kL({}),tickangle:Ha.tickangle,tickformat:Ha.tickformat,tickformatstops:Ha.tickformatstops,tickprefix:Ha.tickprefix,showtickprefix:Ha.showtickprefix,ticksuffix:Ha.ticksuffix,showticksuffix:Ha.showticksuffix,separatethousands:Ha.separatethousands,exponentformat:Ha.exponentformat,minexponent:Ha.minexponent,showexponent:Ha.showexponent,title:{text:{valType:"string"},font:kL({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Ac=R((Hke,DL)=>{"use strict";var cse=Rg(),vse=a0().counter,hse=cg(),LL=fc().scales,Gke=hse(LL);function Pg(e){return"`"+e+"`"}DL.exports=function(r,t){r=r||"",t=t||{};var a=t.cLetter||"c",n="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,i="noScale"in t?t.noScale:r==="marker.line",o="showScaleDflt"in t?t.showScaleDflt:a==="z",l=typeof t.colorscaleDflt=="string"?LL[t.colorscaleDflt]:null,s=t.editTypeOverride||"",u=r?r+".":"",f,c;"colorAttr"in t?(f=t.colorAttr,c=t.colorAttr):(f={z:"z",c:"color"}[a],c="in "+Pg(u+f));var h=n?" Has an effect only if "+c+" is set to a numerical array.":"",d=a+"auto",p=a+"min",g=a+"max",m=a+"mid",x=Pg(u+d),_=Pg(u+p),A=Pg(u+g),b=_+" and "+A,T={};T[p]=T[g]=void 0;var S={};S[d]=!1;var M={};return f==="color"&&(M.color={valType:"color",arrayOk:!0,editType:s||"style"},t.anim&&(M.color.anim=!0)),M[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},M[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},M[g]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:S},M[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},M.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},M.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},M.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(M.showscale={valType:"boolean",dflt:o,editType:"calc"},M.colorbar=cse),t.noColorAxis||(M.coloraxis={valType:"subplotid",regex:vse("coloraxis"),dflt:null,editType:"calc"}),M}});var p4=R((Vke,qL)=>{"use strict";var dse=hn().extendFlat,pse=Ac(),d4=fc().scales;qL.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:d4.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:d4.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:d4.RdBu,editType:"calc"}},coloraxis:dse({_isSubplotObj:!0,editType:"calc"},pse("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var m4=R((Yke,FL)=>{"use strict";var mse=fr();FL.exports=function(r){return mse.isPlainObject(r.colorbar)}});var b4=R(g4=>{"use strict";var y4=ia(),RL=fr(),PL=_n(),yse=PL.ONEDAY,gse=PL.ONEWEEK;g4.dtick=function(e,r){var t=r==="log",a=r==="date",n=r==="category",i=a?yse:1;if(!e)return i;if(y4(e))return e=Number(e),e<=0?i:n?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if(typeof e!="string"||!(a||t))return i;var o=e.charAt(0),l=e.substr(1);return l=y4(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||t&&o==="L"||t&&o==="D"&&(l===1||l===2))?i:e};g4.tick0=function(e,r,t,a){if(r==="date")return RL.cleanDate(e,RL.dateTick0(t,a%gse===0?1:0));if(!(a==="D1"||a==="D2"))return y4(e)?Number(e):0}});var x4=R((jke,IL)=>{"use strict";var NL=b4(),bse=fr().isArrayOrTypedArray,xse=ro().isTypedArraySpec,_se=ro().decodeTypedArraySpec;IL.exports=function(r,t,a,n,i){i||(i={});var o=i.isMinor,l=o?r.minor||{}:r,s=o?t.minor:t,u=o?"minor.":"";function f(_){var A=l[_];return xse(A)&&(A=_se(A)),A!==void 0?A:(s._template||{})[_]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=bse(d)?"array":h?"linear":"auto",g=a(u+"tickmode",p);if(g==="auto"||g==="sync")a(u+"nticks");else if(g==="linear"){var m=s.dtick=NL.dtick(h,n);s.tick0=NL.tick0(c,n,t.calendar,m)}else if(n!=="multicategory"){var x=a(u+"tickvals");x===void 0?s.tickmode="auto":o||a("ticktext")}}});var w4=R((Xke,zL)=>{"use strict";var _4=fr(),OL=Bo();zL.exports=function(r,t,a,n){var i=n.isMinor,o=i?r.minor||{}:r,l=i?t.minor:t,s=i?OL.minor:OL,u=i?"minor.":"",f=_4.coerce2(o,l,s,"ticklen",i?(t.ticklen||5)*.6:void 0),c=_4.coerce2(o,l,s,"tickwidth",i?t.tickwidth||1:void 0),h=_4.coerce2(o,l,s,"tickcolor",(i?t.tickcolor:void 0)||l.color),d=a(u+"ticks",!i&&n.outerTicks||f||c||h?"outside":"");d||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var A4=R((Zke,BL)=>{"use strict";BL.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],a=t.filter(function(i){return r[i]!==void 0}),n=function(i){return r[i]===r[a[0]]};if(a.every(n)||a.length===1)return r[a[0]]}});var wo=R((Jke,UL)=>{"use strict";var Ng=fr(),wse=Da();UL.exports=function(r,t,a){var n=a.name,i=a.inclusionAttr||"visible",o=t[n],l=Ng.isArrayOrTypedArray(r[n])?r[n]:[],s=t[n]=[],u=wse.arrayTemplater(t,n,i),f,c;for(f=0;f{"use strict";var T4=fr(),Ase=Qt().contrast,GL=Bo(),Tse=A4(),Mse=wo();HL.exports=function(r,t,a,n,i){i||(i={});var o=a("labelalias");T4.isPlainObject(o)||delete t.labelalias;var l=Tse(r),s=a("showticklabels");if(s){i.noTicklabelshift||a("ticklabelshift"),i.noTicklabelstandoff||a("ticklabelstandoff");var u=i.font||{},f=t.color,c=t.ticklabelposition||"",h=c.indexOf("inside")!==-1?Ase(i.bgColor):f&&f!==GL.color.dflt?f:u.color;if(T4.coerceFont(a,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&a("ticklabelstep"),!i.noAng){var d=a("tickangle");!i.noAutotickangles&&d==="auto"&&a("autotickangles")}if(n!=="category"){var p=a("tickformat");Mse(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Sse}),t.tickformatstops.length||delete t.tickformatstops,!i.noExp&&!p&&n!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function Sse(e,r){function t(n,i){return T4.coerce(e,r,GL.tickformatstops,n,i)}var a=t("enabled");a&&(t("dtickrange"),t("value"))}});var S4=R((Kke,VL)=>{"use strict";var kse=A4();VL.exports=function(r,t,a,n,i){i||(i={});var o=i.tickSuffixDflt,l=kse(r),s=a("tickprefix");s&&a("showtickprefix",l);var u=a("ticksuffix",o);u&&a("showticksuffix",l)}});var k4=R((Qke,YL)=>{"use strict";var Xu=fr(),Cse=Da(),Ese=x4(),Lse=w4(),Dse=M4(),qse=S4(),Fse=Rg();YL.exports=function(r,t,a){var n=Cse.newContainer(t,"colorbar"),i=r.colorbar||{};function o(N,q){return Xu.coerce(i,n,Fse,N,q)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,u=a.height-l.t-l.b,f=o("orientation"),c=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(c?s:u):30);var d=o("lenmode");o("len",d==="fraction"?1:c?u:s);var p=o("yref"),g=o("xref"),m=p==="paper",x=g==="paper",_,A,b,T="left";c?(b="middle",T=x?"left":"right",_=x?1.02:1,A=.5):(b=m?"bottom":"top",T="center",_=.5,A=m?1.02:1),Xu.coerce(i,n,{x:{valType:"number",min:x?-2:0,max:x?3:1,dflt:_}},"x"),Xu.coerce(i,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:A}},"y"),o("xanchor",T),o("xpad"),o("yanchor",b),o("ypad"),Xu.noneOrAll(i,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var S=Xu.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",S.indexOf("inside")!==-1?"hide past domain":"hide past div"),Ese(i,n,o,"linear");var M=a.font,k={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};S.indexOf("inside")!==-1&&(k.bgColor="black"),qse(i,n,o,"linear",k),Dse(i,n,o,"linear",k),Lse(i,n,o,"linear",k),o("title.text",a._dfltTitle.colorbar);var D=n.showticklabels?n.tickfont:M,P=Xu.extendFlat({},M,{family:D.family,size:Xu.bigFont(D.size)});Xu.coerceFont(o,"title.font",P),o("title.side",c?"top":"right")}});var w0=R((eCe,XL)=>{"use strict";var WL=ia(),E4=fr(),Rse=m4(),Pse=k4(),jL=fc().isValid,Nse=Ct().traceIs;function C4(e,r){var t=r.slice(0,r.length-1);return r?E4.nestedProperty(e,t).get()||{}:e}XL.exports=function e(r,t,a,n,i){var o=i.prefix,l=i.cLetter,s="_module"in t,u=C4(r,o),f=C4(t,o),c=C4(t._template||{},o)||{},h=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,a,n,i)};if(s){var d=a._colorAxes||{},p=n(o+"coloraxis");if(p){var g=Nse(t,"contour")&&E4.nestedProperty(t,"contours.coloring").get()||"heatmap",m=d[p];m?(m[2].push(h),m[0]!==g&&(m[0]=!1,E4.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[g,t,[h]];return}}var x=u[l+"min"],_=u[l+"max"],A=WL(x)&&WL(_)&&x<_,b=n(o+l+"auto",!A);b?n(o+l+"mid"):(n(o+l+"min"),n(o+l+"max"));var T=u.colorscale,S=c.colorscale,M;if(T!==void 0&&(M=!jL(T)),S!==void 0&&(M=!jL(S)),n(o+"autocolorscale",M),n(o+"colorscale"),n(o+"reversescale"),o!=="marker.line."){var k;o&&s&&(k=Rse(u));var D=n(o+"showscale",k);D&&(o&&c&&(f._template=c),Pse(u,f,a))}}});var KL=R((rCe,$L)=>{"use strict";var ZL=fr(),Ise=Da(),JL=p4(),Ose=w0();$L.exports=function(r,t){function a(c,h){return ZL.coerce(r,t,JL,c,h)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var n=t._colorAxes,i,o;function l(c,h){return ZL.coerce(i,o,JL.coloraxis,c,h)}for(var s in n){var u=n[s];if(u[0])i=r[s]||{},o=Ise.newContainer(t,s,"coloraxis"),o._name=s,Ose(i,o,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var zse=fr(),Bse=gl().hasColorscale,Use=gl().extractOpts;QL.exports=function(r,t){function a(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function n(f,c){var h=c.container?zse.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=t[h.coloraxis];else{var d=Use(h),p=d.auto;(p||d.min===void 0)&&a(h,c.min),(p||d.max===void 0)&&a(h,c.max),d.autocolorscale&&a(h,"colorscale")}}for(var i=0;i{"use strict";var rD=ia(),L4=fr(),Gse=gl().extractOpts;tD.exports=function(r,t,a){var n=r._fullLayout,i=a.vals,o=a.containerStr,l=o?L4.nestedProperty(t,o).get():t,s=Gse(l),u=s.auto!==!1,f=s.min,c=s.max,h=s.mid,d=function(){return L4.aggNums(Math.min,null,i)},p=function(){return L4.aggNums(Math.max,null,i)};if(f===void 0?f=d():u&&(l._colorAx&&rD(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():u&&(l._colorAx&&rD(c)?c=Math.max(c,p()):c=p()),u&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h=0?g=n.colorscale.sequential:g=n.colorscale.sequentialminus,s._sync("colorscale",g)}}});var T0=R((nCe,aD)=>{"use strict";var Ig=fc(),A0=gl();aD.exports={moduleType:"component",name:"colorscale",attributes:Ac(),layoutAttributes:p4(),supplyLayoutDefaults:KL(),handleDefaults:w0(),crossTraceDefaults:eD(),calc:D4(),scales:Ig.scales,defaultScale:Ig.defaultScale,getScale:Ig.get,isValidScale:Ig.isValid,hasColorscale:A0.hasColorscale,extractOpts:A0.extractOpts,extractScale:A0.extractScale,flipScale:A0.flipScale,makeColorScaleFunc:A0.makeColorScaleFunc,makeColorScaleFuncFromTrace:A0.makeColorScaleFuncFromTrace}});var ni=R((iCe,iD)=>{"use strict";var nD=fr(),Hse=ro().isTypedArraySpec;iD.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 r=e.marker;return nD.isPlainObject(r)&&(nD.isArrayOrTypedArray(r.size)||Hse(r.size))}}});var q4=R((oCe,oD)=>{"use strict";var Vse=ia();oD.exports=function(r,t){t||(t=2);var a=r.marker,n=a.sizeref||1,i=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/n)}:function(l){return l/n};return function(l){var s=o(l/t);return Vse(s)&&s>0?Math.max(s,i):0}}});var js=R(bi=>{"use strict";var lD=fr();bi.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};bi.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],a=e.yaxes||[],n=0;n=0&&t.index{fD.exports=Zse;var F4={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Xse=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Zse(e){var r=[];return e.replace(Xse,function(t,a,n){var i=a.toLowerCase();for(n=$se(n),i=="m"&&n.length>2&&(r.push([a].concat(n.splice(0,2))),i="l",a=a=="m"?"l":"L");;){if(n.length==F4[i])return n.unshift(a),r.push(n);if(n.length{"use strict";var Kse=y1(),kr=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},Nt="M0,0Z",cD=Math.sqrt(2),Zu=Math.sqrt(3),R4=Math.PI,P4=Math.cos,N4=Math.sin;mD.exports={circle:{n:0,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n="M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z";return t?Ot(r,t,n):n}},square:{n:1,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")}},diamond:{n:2,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.3,2);return Ot(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"Z")}},cross:{n:3,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.4,2),n=kr(e*1.2,2);return Ot(r,t,"M"+n+","+a+"H"+a+"V"+n+"H-"+a+"V"+a+"H-"+n+"V-"+a+"H-"+a+"V-"+n+"H"+a+"V-"+a+"H"+n+"Z")}},x:{n:4,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.8/cD,2),n="l"+a+","+a,i="l"+a+",-"+a,o="l-"+a+",-"+a,l="l-"+a+","+a;return Ot(r,t,"M0,"+a+n+i+o+i+o+l+o+l+n+l+n+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M-"+a+","+n+"H"+a+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M-"+a+",-"+n+"H"+a+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M"+n+",-"+a+"V"+a+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2/Zu,2),n=kr(e/2,2),i=kr(e,2);return Ot(r,t,"M-"+n+",-"+a+"V"+a+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M-"+n+",-"+a+"H"+a+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M"+a+",-"+n+"V"+a+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M"+n+","+a+"H-"+a+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.6,2),n=kr(e*1.2,2);return Ot(r,t,"M-"+a+","+n+"V-"+a+"H"+n+"Z")}},pentagon:{n:13,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.951,2),n=kr(e*.588,2),i=kr(-e,2),o=kr(e*-.309,2),l=kr(e*.809,2);return Ot(r,t,"M"+a+","+o+"L"+n+","+l+"H-"+n+"L-"+a+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e/2,2),i=kr(e*Zu/2,2);return Ot(r,t,"M"+i+",-"+n+"V"+n+"L0,"+a+"L-"+i+","+n+"V-"+n+"L0,-"+a+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e/2,2),i=kr(e*Zu/2,2);return Ot(r,t,"M-"+n+","+i+"H"+n+"L"+a+",0L"+n+",-"+i+"H-"+n+"L-"+a+",0Z")}},octagon:{n:16,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.924,2),n=kr(e*.383,2);return Ot(r,t,"M-"+n+",-"+a+"H"+n+"L"+a+",-"+n+"V"+n+"L"+n+","+a+"H-"+n+"L-"+a+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,r,t){if(It(r))return Nt;var a=e*1.4,n=kr(a*.225,2),i=kr(a*.951,2),o=kr(a*.363,2),l=kr(a*.588,2),s=kr(-a,2),u=kr(a*-.309,2),f=kr(a*.118,2),c=kr(a*.809,2),h=kr(a*.382,2);return Ot(r,t,"M"+n+","+u+"H"+i+"L"+o+","+f+"L"+l+","+c+"L0,"+h+"L-"+l+","+c+"L-"+o+","+f+"L-"+i+","+u+"H-"+n+"L0,"+s+"Z")}},hexagram:{n:18,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.66,2),n=kr(e*.38,2),i=kr(e*.76,2);return Ot(r,t,"M-"+i+",0l-"+n+",-"+a+"h"+i+"l"+n+",-"+a+"l"+n+","+a+"h"+i+"l-"+n+","+a+"l"+n+","+a+"h-"+i+"l-"+n+","+a+"l-"+n+",-"+a+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*Zu*.8,2),n=kr(e*.8,2),i=kr(e*1.6,2),o=kr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Ot(r,t,"M-"+a+","+n+l+a+","+n+l+"0,-"+i+l+"-"+a+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*Zu*.8,2),n=kr(e*.8,2),i=kr(e*1.6,2),o=kr(e*4,2),l="A "+o+","+o+" 0 0 1 ";return Ot(r,t,"M"+a+",-"+n+l+"-"+a+",-"+n+l+"0,"+i+l+a+",-"+n+"Z")}},"star-square":{n:21,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.1,2),n=kr(e*2,2),i="A "+n+","+n+" 0 0 1 ";return Ot(r,t,"M-"+a+",-"+a+i+"-"+a+","+a+i+a+","+a+i+a+",-"+a+i+"-"+a+",-"+a+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2),n=kr(e*1.9,2),i="A "+n+","+n+" 0 0 1 ";return Ot(r,t,"M-"+a+",0"+i+"0,"+a+i+a+",0"+i+"0,-"+a+i+"-"+a+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*.7,2),n=kr(e*1.4,2);return Ot(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2),n=kr(e*.7,2);return Ot(r,t,"M0,"+n+"L"+a+",0L0,-"+n+"L-"+a+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"H-"+a+"L"+a+",-"+a+"H-"+a+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"V-"+a+"L-"+a+","+a+"V-"+a+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e/cD,2);return Ot(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+a+",0A"+a+","+a+" 0 1,1 0,-"+a+"A"+a+","+a+" 0 0,1 "+a+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+a+","+a+"H-"+a+"V-"+a+"H"+a+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.3,2);return Ot(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM0,-"+a+"V"+a+"M-"+a+",0H"+a)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.3,2),n=kr(e*.65,2);return Ot(r,t,"M"+a+",0L0,"+a+"L-"+a+",0L0,-"+a+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*.85,2);return Ot(r,t,"M0,"+a+"V-"+a+"M"+a+",0H-"+a+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(It(r))return Nt;var a=kr(e/2,2),n=kr(e,2);return Ot(r,t,"M"+a+","+n+"V-"+n+"M"+(a-n)+",-"+n+"V"+n+"M"+n+","+a+"H-"+n+"M-"+n+","+(a-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M-"+a+","+i+"L0,0M"+a+","+i+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M-"+a+",-"+i+"L0,0M"+a+",-"+i+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M"+i+","+a+"L0,0M"+i+",-"+a+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.2,2),n=kr(e*1.6,2),i=kr(e*.8,2);return Ot(r,t,"M-"+i+","+a+"L0,0M-"+i+",-"+a+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2);return Ot(r,t,"M"+a+",0H-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*1.4,2);return Ot(r,t,"M0,"+a+"V-"+a)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2);return Ot(r,t,"M"+a+","+a+"L-"+a+",-"+a)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M0,0L-"+a+",-"+n+"H"+a+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,0L"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,0L-"+a+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+","+n+"H"+a+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(It(r))return Nt;var a=kr(e,2),n=kr(e*2,2);return Ot(r,t,"M-"+a+",0H"+a+"M0,0L-"+a+",-"+n+"H"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,-"+n+"V"+n+"M0,0L"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(It(r))return Nt;var a=kr(e*2,2),n=kr(e,2);return Ot(r,t,"M0,-"+n+"V"+n+"M0,0L-"+a+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(It(r))return Nt;var a=R4/2.5,n=2*e*P4(a),i=2*e*N4(a);return Ot(r,t,"M0,0L"+-n+","+i+"L"+n+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(It(r))return Nt;var a=R4/4,n=2*e*P4(a),i=2*e*N4(a);return Ot(r,t,"M0,0L"+-n+","+i+"A "+2*e+","+2*e+" 0 0 1 "+n+","+i+"Z")},backoff:.4,noDot:!0}};function It(e){return e===null}var vD,hD,dD,pD;function Ot(e,r,t){if((!e||e%360===0)&&!r)return t;if(dD===e&&pD===r&&vD===t)return hD;dD=e,pD=r,vD=t;function a(m,x){var _=P4(m),A=N4(m),b=x[0],T=x[1]+(r||0);return[b*_-T*A,b*A+T*_]}for(var n=e/180*R4,i=0,o=0,l=Kse(t),s="",u=0;u{"use strict";var Xn=ta(),ka=fr(),Qse=ka.numberFormat,kc=ia(),G4=vl(),zg=Ct(),vi=Qt(),eue=T0(),b1=ka.strTranslate,Bg=Ci(),rue=ju(),tue=ki(),aue=tue.LINE_SPACING,kD=t0().DESELECTDIM,nue=ni(),iue=q4(),oue=js().appendArrayPointValue,Rr=ID.exports={};Rr.font=function(e,r){var t=r.variant,a=r.style,n=r.weight,i=r.color,o=r.size,l=r.family,s=r.shadow,u=r.lineposition,f=r.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(vi.fill,i),n&&e.style("font-weight",n),a&&e.style("font-style",a),t&&e.style("font-variant",t),f&&e.style("text-transform",I4(sue(f))),s&&e.style("text-shadow",s==="auto"?Bg.makeTextShadow(vi.contrast(i)):I4(s)),u&&e.style("text-decoration-line",I4(uue(u)))};function I4(e){return e==="none"?void 0:e}var lue={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function sue(e){return lue[e]}function uue(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Rr.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};Rr.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};Rr.setRect=function(e,r,t,a,n){e.call(Rr.setPosition,r,t).call(Rr.setSize,a,n)};Rr.translatePoint=function(e,r,t,a){var n=t.c2p(e.x),i=a.c2p(e.y);if(kc(n)&&kc(i)&&r.node())r.node().nodeName==="text"?r.attr("x",n).attr("y",i):r.attr("transform",b1(n,i));else return!1;return!0};Rr.translatePoints=function(e,r,t){e.each(function(a){var n=Xn.select(this);Rr.translatePoint(a,n,r,t)})};Rr.hideOutsideRangePoint=function(e,r,t,a,n,i){r.attr("display",t.isPtWithinRange(e,n)&&a.isPtWithinRange(e,i)?null:"none")};Rr.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,a=r.yaxis;e.each(function(n){var i=n[0].trace,o=i.xcalendar,l=i.ycalendar,s=zg.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(s).each(function(u){Rr.hideOutsideRangePoint(u,Xn.select(this),t,a,o,l)})})}};Rr.crispRound=function(e,r,t){return!r||!kc(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};Rr.singleLineStyle=function(e,r,t,a,n){r.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=n||i.dash||"";vi.stroke(r,a||i.color),Rr.dashLine(r,l,o)};Rr.lineGroupStyle=function(e,r,t,a){e.style("fill","none").each(function(n){var i=(((n||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";Xn.select(this).call(vi.stroke,t||i.color).call(Rr.dashLine,l,o)})};Rr.dashLine=function(e,r,t){t=+t||0,r=Rr.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};Rr.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function CD(e,r,t,a){var n=r.fillpattern,i=r.fillgradient,o=n&&Rr.getPatternAttr(n.shape,0,"");if(o){var l=Rr.getPatternAttr(n.bgcolor,0,null),s=Rr.getPatternAttr(n.fgcolor,0,null),u=n.fgopacity,f=Rr.getPatternAttr(n.size,0,8),c=Rr.getPatternAttr(n.solidity,0,.3),h=r.uid;Rr.pattern(e,"point",t,h,o,f,c,void 0,n.fillmode,l,s,u)}else if(i&&i.type!=="none"){var d=i.type,p="scatterfill-"+r.uid;if(a&&(p="legendfill-"+r.uid),!a&&(i.start!==void 0||i.stop!==void 0)){var g,m;d==="horizontal"?(g={x:i.start,y:0},m={x:i.stop,y:0}):d==="vertical"&&(g={x:0,y:i.start},m={x:0,y:i.stop}),g.x=r._xA.c2p(g.x===void 0?r._extremes.x.min[0].val:g.x,!0),g.y=r._yA.c2p(g.y===void 0?r._extremes.y.min[0].val:g.y,!0),m.x=r._xA.c2p(m.x===void 0?r._extremes.x.max[0].val:m.x,!0),m.y=r._yA.c2p(m.y===void 0?r._extremes.y.max[0].val:m.y,!0),e.call(DD,t,p,"linear",i.colorscale,"fill",g,m,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Rr.gradient,t,p,d,i.colorscale,"fill")}else r.fillcolor&&e.call(vi.fill,r.fillcolor)}Rr.singleFillStyle=function(e,r){var t=Xn.select(e.node()),a=t.data(),n=((a[0]||[])[0]||{}).trace||{};CD(e,n,r,!1)};Rr.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(a){var n=Xn.select(this);a[0].trace&&CD(n,a[0].trace,r,t)})};var gD=yD();Rr.symbolNames=[];Rr.symbolFuncs=[];Rr.symbolBackOffs=[];Rr.symbolNeedLines={};Rr.symbolNoDot={};Rr.symbolNoFill={};Rr.symbolList=[];Object.keys(gD).forEach(function(e){var r=gD[e],t=r.n;Rr.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),Rr.symbolNames[t]=e,Rr.symbolFuncs[t]=r.f,Rr.symbolBackOffs[t]=r.backoff||0,r.needLine&&(Rr.symbolNeedLines[t]=!0),r.noDot?Rr.symbolNoDot[t]=!0:Rr.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(Rr.symbolNoFill[t]=!0)});var fue=Rr.symbolNames.length,cue="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Rr.symbolNumber=function(e){if(kc(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=Rr.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=fue||e>=400?0:Math.floor(Math.max(e,0))};function ED(e,r,t,a){var n=e%100;return Rr.symbolFuncs[n](r,t,a)+(e>=200?cue:"")}var bD=Qse("~f"),LD={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}};Rr.gradient=function(e,r,t,a,n,i){var o=LD[a];return DD(e,r,t,o.type,n,i,o.start,o.stop,!1,o.reversed)};function DD(e,r,t,a,n,i,o,l,s,u){var f=n.length,c;a==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:a==="radial"&&(c={node:"radialGradient",reversed:u});for(var h=new Array(f),d=0;d=0&&e.i===void 0&&(e.i=i.i),r.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),a.ms2mrc){var s;e.ms==="various"||o.size==="various"?s=3:s=a.ms2mrc(e.ms),e.mrc=s,a.selectedSizeFn&&(s=e.mrc=a.selectedSizeFn(e));var u=Rr.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var f=Y4(e,t),c=V4(e,t);r.attr("d",ED(u,s,f,c))}var h=!1,d,p,g;if(e.so)g=l.outlierwidth,p=l.outliercolor,d=o.outliercolor;else{var m=(l||{}).width;g=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=a.lineScale(e.mlc):ka.isArrayOrTypedArray(l.color)?p=vi.defaultLine:p=l.color,ka.isArrayOrTypedArray(o.color)&&(d=vi.defaultLine,h=!0),"mc"in e?d=e.mcc=a.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(d=a.selectedColorFn(e))}if(e.om)r.call(vi.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:g)+"px");var x=o.gradient,_=e.mgt;_?h=!0:_=x&&x.type,ka.isArrayOrTypedArray(_)&&(_=_[0],LD[_]||(_=0));var A=o.pattern,b=A&&Rr.getPatternAttr(A.shape,e.i,"");if(_&&_!=="none"){var T=e.mgc;T?h=!0:T=x.color;var S=t.uid;h&&(S+="-"+e.i),Rr.gradient(r,n,S,_,[[0,T],[1,d]],"fill")}else if(b){var M=!1,k=A.fgcolor;!k&&i&&i.color&&(k=i.color,M=!0);var D=Rr.getPatternAttr(k,e.i,i&&i.color||null),P=Rr.getPatternAttr(A.bgcolor,e.i,null),N=A.fgopacity,q=Rr.getPatternAttr(A.size,e.i,8),O=Rr.getPatternAttr(A.solidity,e.i,.3);M=M||e.mcc||ka.isArrayOrTypedArray(A.shape)||ka.isArrayOrTypedArray(A.bgcolor)||ka.isArrayOrTypedArray(A.fgcolor)||ka.isArrayOrTypedArray(A.size)||ka.isArrayOrTypedArray(A.solidity);var U=t.uid;M&&(U+="-"+e.i),Rr.pattern(r,"point",n,U,b,q,O,e.mcc,A.fillmode,P,D,N)}else ka.isArrayOrTypedArray(d)?vi.fill(r,d[e.i]):vi.fill(r,d);g&&vi.stroke(r,p)}};Rr.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=Rr.tryColorscale(t,""),r.lineScale=Rr.tryColorscale(t,"line"),zg.traceIs(e,"symbols")&&(r.ms2mrc=nue.isBubble(e)?iue(e):function(){return(t.size||6)/2}),e.selectedpoints&&ka.extendFlat(r,Rr.makeSelectedPointStyleFns(e)),r};Rr.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.marker||{},i=t.marker||{},o=a.marker||{},l=n.opacity,s=i.opacity,u=o.opacity,f=s!==void 0,c=u!==void 0;(ka.isArrayOrTypedArray(l)||f||c)&&(r.selectedOpacityFn=function(b){var T=b.mo===void 0?n.opacity:b.mo;return b.selected?f?s:T:c?u:kD*T});var h=n.color,d=i.color,p=o.color;(d||p)&&(r.selectedColorFn=function(b){var T=b.mcc||h;return b.selected?d||T:p||T});var g=n.size,m=i.size,x=o.size,_=m!==void 0,A=x!==void 0;return zg.traceIs(e,"symbols")&&(_||A)&&(r.selectedSizeFn=function(b){var T=b.mrc||g/2;return b.selected?_?m/2:T:A?x/2:T}),r};Rr.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},a=e.unselected||{},n=e.textfont||{},i=t.textfont||{},o=a.textfont||{},l=n.color,s=i.color,u=o.color;return r.selectedTextColorFn=function(f){var c=f.tc||l;return f.selected?s||c:u||(s?c:vi.addOpacity(c,kD))},r};Rr.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Rr.makeSelectedPointStyleFns(r),a=r.marker||{},n=[];t.selectedOpacityFn&&n.push(function(i,o){i.style("opacity",t.selectedOpacityFn(o))}),t.selectedColorFn&&n.push(function(i,o){vi.fill(i,t.selectedColorFn(o))}),t.selectedSizeFn&&n.push(function(i,o){var l=o.mx||a.symbol||0,s=t.selectedSizeFn(o);i.attr("d",ED(Rr.symbolNumber(l),s,Y4(o,r),V4(o,r))),o.mrc2=s}),n.length&&e.each(function(i){for(var o=Xn.select(this),l=0;l0?t:0}Rr.textPointStyle=function(e,r,t){if(e.size()){var a;if(r.selectedpoints){var n=Rr.makeSelectedTextStyleFns(r);a=n.selectedTextColorFn}var i=r.texttemplate,o=t._fullLayout;e.each(function(l){var s=Xn.select(this),u=i?ka.extractOption(l,r,"txt","texttemplate"):ka.extractOption(l,r,"tx","text");if(!u&&u!==0){s.remove();return}if(i){var f=r._module.formatLabels,c=f?f(l,r,o):{},h={};oue(h,r,l.i);var d=r._meta||{};u=ka.texttemplateString(u,c,o._d3locale,h,l,d)}var p=l.tp||r.textposition,g=FD(l,r),m=a?a(l):l.tc||r.textfont.color;s.call(Rr.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:g,color:m}).text(u).call(Bg.convertToTspans,t).call(qD,p,g,l.mrc)})}};Rr.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=Rr.makeSelectedTextStyleFns(r);e.each(function(a){var n=Xn.select(this),i=t.selectedTextColorFn(a),o=a.tp||r.textposition,l=FD(a,r);vi.fill(n,i);var s=zg.traceIs(r,"bar-like");qD(n,o,l,a.mrc2||a.mrc,s)})}};var xD=.5;Rr.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],a=[],n;for(n=1;n=s||b>=f&&b<=s)&&(T<=c&&T>=u||T>=c&&T<=u)&&(e=[b,T])}return e}Rr.applyBackoff=ND;Rr.makeTester=function(){var e=ka.ensureSingleById(Xn.select("body"),"svg","js-plotly-tester",function(t){t.attr(rue.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=ka.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Rr.tester=e,Rr.testref=r};Rr.savedBBoxes={};var z4=0,due=1e4;Rr.bBox=function(e,r,t){t||(t=_D(e));var a;if(t){if(a=Rr.savedBBoxes[t],a)return ka.extendFlat({},a)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(t=_D(n),t){var i=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,l=n.getAttribute("transform");if(!l){var s=Rr.bBox(n,!1,t);return i&&(s.left+=i,s.right+=i),o&&(s.top+=o,s.bottom+=o),s}if(t+="~"+i+"~"+o+"~"+l,a=Rr.savedBBoxes[t],a)return ka.extendFlat({},a)}}var u,f;r?u=e:(f=Rr.tester.node(),u=e.cloneNode(!0),f.appendChild(u)),Xn.select(u).attr("transform",null).call(Bg.positionText,0,0);var c=u.getBoundingClientRect(),h=Rr.testref.node().getBoundingClientRect();r||f.removeChild(u);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return z4>=due&&(Rr.savedBBoxes={},z4=0),t&&(Rr.savedBBoxes[t]=d),z4++,ka.extendFlat({},d)};function _D(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Rr.setClipUrl=function(e,r,t){e.attr("clip-path",H4(r,t))};function H4(e,r){if(!e)return null;var t=r._context,a=t._exportedPlot?"":t._baseUrl||"";return a?"url('"+a+"#"+e+"')":"url(#"+e+")"}Rr.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};Rr.setTranslate=function(e,r,t){var a=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||0,t=t||0,o=o.replace(a,"").trim(),o+=b1(r,t),o=o.trim(),e[i]("transform",o),o};Rr.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",a=e[t]("transform")||"",n=a.replace(r,function(i,o,l){return[o,l].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};Rr.setScale=function(e,r,t){var a=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return r=r||1,t=t||1,o=o.replace(a,"").trim(),o+="scale("+r+","+t+")",o=o.trim(),e[i]("transform",o),o};var pue=/\s*sc.*/;Rr.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var a=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(pue,"");n+=a,n=n.trim(),this.setAttribute("transform",n)})}};var mue=/translate\([^)]*\)\s*$/;Rr.setTextPointsScale=function(e,r,t){e&&e.each(function(){var a,n=Xn.select(this),i=n.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(mue);r===1&&t===1?a=[]:a=[b1(o,l),"scale("+r+","+t+")",b1(-o,-l)],s&&a.push(s),n.attr("transform",a.join(""))}})};function V4(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}Rr.getMarkerStandoff=V4;var g1=Math.atan2,Tc=Math.cos,S0=Math.sin;function wD(e,r){var t=r[0],a=r[1];return[t*Tc(e)-a*S0(e),t*S0(e)+a*Tc(e)]}var AD,TD,MD,SD,B4,U4;function Y4(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||ka.isArrayOrTypedArray(t))&&(t=0));var a,n,i=r.marker.angleref;if(i==="previous"||i==="north"){if(r._geo){var o=r._geo.project(e.lonlat);a=o[0],n=o[1]}else{var l=r._xA,s=r._yA;if(l&&s)a=l.c2p(e.x),n=s.c2p(e.y);else return 90}if(r._geo){var u=e.lonlat[0],f=e.lonlat[1],c=r._geo.project([u,f+1e-5]),h=r._geo.project([u+1e-5,f]),d=g1(h[1]-n,h[0]-a),p=g1(c[1]-n,c[0]-a),g;if(i==="north")g=t/180*Math.PI;else if(i==="previous"){var m=u/180*Math.PI,x=f/180*Math.PI,_=AD/180*Math.PI,A=TD/180*Math.PI,b=_-m,T=Tc(A)*S0(b),S=S0(A)*Tc(x)-Tc(A)*S0(x)*Tc(b);g=-g1(T,S)-Math.PI,AD=u,TD=f}var M=wD(d,[Tc(g),0]),k=wD(p,[S0(g),0]);t=g1(M[1]+k[1],M[0]+k[0])/Math.PI*180,i==="previous"&&!(U4===r.uid&&e.i===B4+1)&&(t=null)}if(i==="previous"&&!r._geo)if(U4===r.uid&&e.i===B4+1&&kc(a)&&kc(n)){var D=a-MD,P=n-SD,N=r.line&&r.line.shape||"",q=N.slice(N.length-1);q==="h"&&(P=0),q==="v"&&(D=0),t+=g1(P,D)/Math.PI*180+90}else t=null}return MD=a,SD=n,B4=e.i,U4=r.uid,t}Rr.getMarkerAngle=Y4});var x1=R((cCe,UD)=>{"use strict";var k0=ta(),yue=ia(),gue=jn(),W4=Ct(),Cc=fr(),OD=Cc.strTranslate,Ug=Ca(),Gg=Qt(),C0=Ci(),zD=t0(),bue=ki().OPPOSITE_SIDE,BD=/ [XY][0-9]* /,j4=1.6,X4=1.6;function xue(e,r,t){var a=e._fullLayout,n=t.propContainer,i=t.propName,o=t.placeholder,l=t.traceIndex,s=t.avoid||{},u=t.attributes,f=t.transform,c=t.containerGroup,h=1,d=n.title,p=(d&&d.text?d.text:"").trim(),g=!1,m=d&&d.font?d.font:{},x=m.family,_=m.size,A=m.color,b=m.weight,T=m.style,S=m.variant,M=m.textcase,k=m.lineposition,D=m.shadow,P=t.subtitlePropName,N=!!P,q=t.subtitlePlaceholder,O=(n.title||{}).subtitle||{text:"",font:{}},U=O.text.trim(),$=!1,W=1,H=O.font,B=H.family,V=H.size,j=H.color,K=H.weight,ve=H.style,xe=H.variant,se=H.textcase,be=H.lineposition,re=H.shadow,ke;i==="title.text"?ke="titleText":i.indexOf("axis")!==-1?ke="axisTitleText":i.indexOf("colorbar"!==-1)&&(ke="colorbarTitleText");var ge=e._context.edits[ke];function Ee(yr,ir){return yr===void 0||ir===void 0?!1:yr.replace(BD," % ")===ir.replace(BD," % ")}p===""?h=0:Ee(p,o)&&(ge||(p=""),h=.2,g=!0),N&&(U===""?W=0:Ee(U,q)&&(ge||(U=""),W=.2,$=!0)),t._meta?p=Cc.templateString(p,t._meta):a._meta&&(p=Cc.templateString(p,a._meta));var De=p||U||ge,Ce;c||(c=Cc.ensureSingle(a._infolayer,"g","g-"+r),Ce=a._hColorbarMoveTitle);var Y=c.selectAll("text."+r).data(De?[0]:[]);Y.enter().append("text"),Y.text(p).attr("class",r),Y.exit().remove();var ae=null,Z=r+"-subtitle",Te=U||ge;if(N&&Te&&(ae=c.selectAll("text."+Z).data(Te?[0]:[]),ae.enter().append("text"),ae.text(U).attr("class",Z),ae.exit().remove()),!De)return c;function Pe(yr,ir){Cc.syncOrAsync([Ne,lr],{title:yr,subtitle:ir})}function Ne(yr){var ir=yr.title,Xe=yr.subtitle,Lr;!f&&Ce&&(f={}),f?(Lr="",f.rotate&&(Lr+="rotate("+[f.rotate,u.x,u.y]+")"),(f.offset||Ce)&&(Lr+=OD(0,(f.offset||0)-(Ce||0)))):Lr=null,ir.attr("transform",Lr);function Ar(Ye){if(Ye){var Ve=k0.select(Ye.node().parentNode).select("."+Z);if(!Ve.empty()){var pr=Ye.node().getBBox();if(pr.height){var Tr=pr.y+pr.height+j4*V;Ve.attr("y",Tr)}}}}if(ir.style("opacity",h*Gg.opacity(A)).call(Ug.font,{color:Gg.rgb(A),size:k0.round(_,2),family:x,weight:b,style:T,variant:S,textcase:M,shadow:D,lineposition:k}).attr(u).call(C0.convertToTspans,e,Ar),Xe){var de=c.select("."+r+"-math-group"),Oe=ir.node().getBBox(),Ue=de.node()?de.node().getBBox():void 0,rt=Ue?Ue.y+Ue.height+j4*V:Oe.y+Oe.height+X4*V,Ur=Cc.extendFlat({},u,{y:rt});Xe.attr("transform",Lr),Xe.style("opacity",W*Gg.opacity(j)).call(Ug.font,{color:Gg.rgb(j),size:k0.round(V,2),family:B,weight:K,style:ve,variant:xe,textcase:se,shadow:re,lineposition:be}).attr(Ur).call(C0.convertToTspans,e)}return gue.previousPromises(e)}function lr(yr){var ir=yr.title,Xe=k0.select(ir.node().parentNode);if(s&&s.selection&&s.side&&p){Xe.attr("transform",null);var Lr=bue[s.side],Ar=s.side==="left"||s.side==="top"?-1:1,de=yue(s.pad)?s.pad:2,Oe=Ug.bBox(Xe.node()),Ue={t:0,b:0,l:0,r:0},rt=e._fullLayout._reservedMargin;for(var Ur in rt)for(var Ye in rt[Ur]){var Ve=rt[Ur][Ye];Ue[Ye]=Math.max(Ue[Ye],Ve)}var pr={left:Ue.l,top:Ue.t,right:a.width-Ue.r,bottom:a.height-Ue.b},Tr=s.maxShift||Ar*(pr[s.side]-Oe[s.side]),mr=0;if(Tr<0)mr=Tr;else{var vr=s.offsetLeft||0,Cr=s.offsetTop||0;Oe.left-=vr,Oe.right-=vr,Oe.top-=Cr,Oe.bottom-=Cr,s.selection.each(function(){var Gr=Ug.bBox(this);Cc.bBoxIntersect(Oe,Gr,de)&&(mr=Math.max(mr,Ar*(Gr[s.side]-Oe[Lr])+de))}),mr=Math.min(Tr,mr),n._titleScoot=Math.abs(mr)}if(mr>0||Tr<0){var Ir={left:[-mr,0],right:[mr,0],top:[0,-mr],bottom:[0,mr]}[s.side];Xe.attr("transform",OD(Ir[0],Ir[1]))}}}Y.call(Pe,ae);function Ke(yr,ir){yr.text(ir).on("mouseover.opacity",function(){k0.select(this).transition().duration(zD.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k0.select(this).transition().duration(zD.HIDE_PLACEHOLDER).style("opacity",0)})}if(ge&&(p?Y.on(".opacity",null):(Ke(Y,o),g=!0),Y.call(C0.makeEditable,{gd:e}).on("edit",function(yr){l!==void 0?W4.call("_guiRestyle",e,i,yr,l):W4.call("_guiRelayout",e,i,yr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Pe)}).on("input",function(yr){this.text(yr||" ").call(C0.positionText,u.x,u.y)}),N)){if(N&&!p){var Je=Y.node().getBBox(),or=Je.y+Je.height+X4*V;ae.attr("y",or)}U?ae.on(".opacity",null):(Ke(ae,q),$=!0),ae.call(C0.makeEditable,{gd:e}).on("edit",function(yr){W4.call("_guiRelayout",e,"title.subtitle.text",yr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Pe)}).on("input",function(yr){this.text(yr||" ").call(C0.positionText,ae.attr("x"),ae.attr("y"))})}return Y.classed("js-placeholder",g),ae&&ae.classed("js-placeholder",$),c}UD.exports={draw:xue,SUBTITLE_PADDING_EM:X4,SUBTITLE_PADDING_MATHJAX_EM:j4}});var Jg=R((vCe,WD)=>{"use strict";var _ue=ta(),wue=Kv().utcFormat,qa=fr(),Aue=qa.numberFormat,ts=ia(),Ju=qa.cleanNumber,Tue=qa.ms2DateTime,GD=qa.dateTime2ms,as=qa.ensureNumber,HD=qa.isArrayOrTypedArray,$u=_n(),Hg=$u.FP_SAFE,bl=$u.BADNUM,Mue=$u.LOG_CLIP,Sue=$u.ONEWEEK,Vg=$u.ONEDAY,Yg=$u.ONEHOUR,VD=$u.ONEMIN,YD=$u.ONESEC,Wg=an(),Zg=ai(),jg=Zg.HOUR_PATTERN,Xg=Zg.WEEKDAY_PATTERN;function _1(e){return Math.pow(10,e)}function Z4(e){return e!=null}WD.exports=function(r,t){t=t||{};var a=r._id||"x",n=a.charAt(0);function i(b,T){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&T&&r.range&&r.range.length===2){var S=r.range[0],M=r.range[1];return .5*(S+M-2*Mue*Math.abs(S-M))}else return bl}function o(b,T,S,M){if((M||{}).msUTC&&ts(b))return+b;var k=GD(b,S||r.calendar);if(k===bl)if(ts(b)){b=+b;var D=Math.floor(qa.mod(b+.05,1)*10),P=Math.round(b-D/10);k=GD(new Date(P))+D/10}else return bl;return k}function l(b,T,S){return Tue(b,T,S||r.calendar)}function s(b){return r._categories[Math.round(b)]}function u(b){if(Z4(b)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[b]!==void 0)return r._categoriesMap[b];r._categories.push(typeof b=="number"?String(b):b);var T=r._categories.length-1;return r._categoriesMap[b]=T,T}return bl}function f(b,T){for(var S=new Array(T),M=0;Mr.range[1]&&(S=!S);for(var M=S?-1:1,k=M*b,D=0,P=0;Pq)D=P+1;else{D=k<(N+q)/2?P:P+1;break}}var O=r._B[D]||0;return isFinite(O)?p(b,r._m2,O):0},x=function(b){var T=r._rangebreaks.length;if(!T)return g(b,r._m,r._b);for(var S=0,M=0;Mr._rangebreaks[M].pmax&&(S=M+1);return g(b,r._m2,r._B[S])}}r.c2l=r.type==="log"?i:as,r.l2c=r.type==="log"?_1:as,r.l2p=m,r.p2l=x,r.c2p=r.type==="log"?function(b,T){return m(i(b,T))}:m,r.p2c=r.type==="log"?function(b){return _1(x(b))}:x,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Ju,r.c2d=r.c2r=r.l2d=r.l2r=as,r.d2p=r.r2p=function(b){return r.l2p(Ju(b))},r.p2d=r.p2r=x,r.cleanPos=as):r.type==="log"?(r.d2r=r.d2l=function(b,T){return i(Ju(b),T)},r.r2d=r.r2c=function(b){return _1(Ju(b))},r.d2c=r.r2l=Ju,r.c2d=r.l2r=as,r.c2r=i,r.l2d=_1,r.d2p=function(b,T){return r.l2p(r.d2r(b,T))},r.p2d=function(b){return _1(x(b))},r.r2p=function(b){return r.l2p(Ju(b))},r.p2r=x,r.cleanPos=as):r.type==="date"?(r.d2r=r.r2d=qa.identity,r.d2c=r.r2c=r.d2l=r.r2l=o,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(b,T,S){return r.l2p(o(b,0,S))},r.p2d=r.p2r=function(b,T,S){return l(x(b),T,S)},r.cleanPos=function(b){return qa.cleanDate(b,bl,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=u,r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var T=d(b);return T!==void 0?T:r.fraction2r(.5)},r.l2r=r.c2r=as,r.r2l=d,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(x(b))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(b){return typeof b=="string"&&b!==""?b:as(b)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=s,r.d2r=r.d2l_noadd=h,r.r2c=function(b){var T=h(b);return T!==void 0?T:r.fraction2r(.5)},r.r2c_just_indices=c,r.l2r=r.c2r=as,r.r2l=h,r.d2p=function(b){return r.l2p(r.r2c(b))},r.p2d=function(b){return s(x(b))},r.r2p=r.d2p,r.p2r=x,r.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:as(b)},r.setupMultiCategory=function(b){var T=r._traceIndices,S,M,k=r._matchGroup;if(k&&r._categories.length===0){for(var D in k)if(D!==a){var P=t[Wg.id2name(D)];T=T.concat(P._traceIndices)}}var N=[[0,{}],[0,{}]],q=[];for(S=0;SP[1]&&(M[D?0:1]=S),M[0]===M[1]){var N=r.l2r(T),q=r.l2r(S);if(T!==void 0){var O=N+1;S!==void 0&&(O=Math.min(O,q)),M[D?1:0]=O}if(S!==void 0){var U=q+1;T!==void 0&&(U=Math.max(U,N)),M[D?0:1]=U}}}},r.cleanRange=function(b,T){r._cleanRange(b,T),r.limitRange(b)},r._cleanRange=function(b,T){T||(T={}),b||(b="range");var S=qa.nestedProperty(r,b).get(),M,k;if(r.type==="date"?k=qa.dfltRange(r.calendar):n==="y"?k=Zg.DFLTRANGEY:r._name==="realaxis"?k=[0,1]:k=T.dfltRange||Zg.DFLTRANGEX,k=k.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(k[0]=0),!S||S.length!==2){qa.nestedProperty(r,b).set(k);return}var D=S[0]===null,P=S[1]===null;for(r.type==="date"&&!r.autorange&&(S[0]=qa.cleanDate(S[0],bl,r.calendar),S[1]=qa.cleanDate(S[1],bl,r.calendar)),M=0;M<2;M++)if(r.type==="date"){if(!qa.isDateTime(S[M],r.calendar)){r[b]=k;break}if(r.r2l(S[0])===r.r2l(S[1])){var N=qa.constrain(r.r2l(S[0]),qa.MIN_MS+1e3,qa.MAX_MS-1e3);S[0]=r.l2r(N-1e3),S[1]=r.l2r(N+1e3);break}}else{if(!ts(S[M]))if(!(D||P)&&ts(S[1-M]))S[M]=S[1-M]*(M?10:.1);else{r[b]=k;break}if(S[M]<-Hg?S[M]=-Hg:S[M]>Hg&&(S[M]=Hg),S[0]===S[1]){var q=Math.max(1,Math.abs(S[0]*1e-6));S[0]-=q,S[1]+=q}}},r.setScale=function(b){var T=t._size;if(r.overlaying){var S=Wg.getFromId({_fullLayout:t},r.overlaying);r.domain=S.domain}var M=b&&r._r?"_r":"range",k=r.calendar;r.cleanRange(M);var D=r.r2l(r[M][0],k),P=r.r2l(r[M][1],k),N=n==="y";if(N?(r._offset=T.t+(1-r.domain[1])*T.h,r._length=T.h*(r.domain[1]-r.domain[0]),r._m=r._length/(D-P),r._b=-r._m*P):(r._offset=T.l+r.domain[0]*T.w,r._length=T.w*(r.domain[1]-r.domain[0]),r._m=r._length/(P-D),r._b=-r._m*D),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var q,O;if(r._rangebreaks=r.locateBreaks(Math.min(D,P),Math.max(D,P)),r._rangebreaks.length){for(q=0;qP&&(U=!U),U&&r._rangebreaks.reverse();var $=U?-1:1;for(r._m2=$*r._length/(Math.abs(P-D)-r._lBreaks),r._B.push(-r._m2*(N?P:D)),q=0;qk&&(k+=7,Dk&&(k+=24,D=M&&D=M&&b=re.min&&(vere.max&&(re.max=xe),se=!1)}se&&P.push({min:ve,max:xe})}};for(S=0;S{"use strict";var jD=ia(),J4=fr(),kue=_n().BADNUM,$g=J4.isArrayOrTypedArray,Cue=J4.isDateTime,Eue=J4.cleanNumber,XD=Math.round;JD.exports=function(r,t,a){var n=r,i=a.noMultiCategory;if($g(n)&&!n.length)return"-";if(!i&&Rue(n))return"multicategory";if(i&&Array.isArray(n[0])){for(var o=[],l=0;li*2}function ZD(e){return Math.max(1,(e-1)/1e3)}function Fue(e,r){for(var t=e.length,a=ZD(t),n=0,i=0,o={},l=0;ln*2}function Rue(e){return $g(e[0])&&$g(e[1])}});var E0=R((dCe,nq)=>{"use strict";var Pue=ta(),eq=ia(),Ku=fr(),Kg=_n().FP_SAFE,Nue=Ct(),Iue=Ca(),rq=an(),Oue=rq.getFromId,zue=rq.isLinked;nq.exports={applyAutorangeOptions:aq,getAutoRange:K4,makePadFn:Q4,doAutoRange:Uue,findExtremes:Gue,concatExtremes:tw};function K4(e,r){var t,a,n=[],i=e._fullLayout,o=Q4(i,r,0),l=Q4(i,r,1),s=tw(e,r),u=s.min,f=s.max;if(u.length===0||f.length===0)return Ku.simpleMap(r.range,r.r2l);var c=u[0].val,h=f[0].val;for(t=1;t0&&(P=A-o(S)-l(M),P>b?N/P>T&&(k=S,D=M,T=N/P):N/A>T&&(k={val:S.val,nopad:1},D={val:M.val,nopad:1},T=N/A));function q(H,B){return Math.max(H,l(B))}if(c===h){var O=c-1,U=c+1;if(x)if(c===0)n=[0,1];else{var $=(c>0?f:u).reduce(q,0),W=c/(1-Math.min(.5,$/A));n=c>0?[0,W]:[W,0]}else _?n=[Math.max(0,O),Math.max(1,U)]:n=[O,U]}else x?(k.val>=0&&(k={val:0,nopad:1}),D.val<=0&&(D={val:0,nopad:1})):_&&(k.val-T*o(k)<0&&(k={val:0,nopad:1}),D.val<=0&&(D={val:1,nopad:1})),T=(D.val-k.val-$D(r,S.val,M.val))/(A-o(k)-l(D)),n=[k.val-T*o(k),D.val+T*l(D)];return n=aq(n,r),r.limitRange&&r.limitRange(),p&&n.reverse(),Ku.simpleMap(n,r.l2r||Number)}function $D(e,r,t){var a=0;if(e.rangebreaks)for(var n=e.locateBreaks(r,t),i=0;i0?t.ppadplus:t.ppadminus)||t.ppad||0),S=b((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),M=b(t.vpadplus||t.vpad),k=b(t.vpadminus||t.vpad);if(!u){if(_=1/0,A=-1/0,s)for(c=0;c0&&(_=h),h>A&&h-Kg&&(_=h),h>A&&h=N;c--)P(c);return{min:a,max:n,opts:t}}function ew(e,r,t,a){tq(e,r,t,a,Hue)}function rw(e,r,t,a){tq(e,r,t,a,Vue)}function tq(e,r,t,a,n){for(var i=a.tozero,o=a.extrapad,l=!0,s=0;s=t&&(u.extrapad||!o)){l=!1;break}else n(r,u.val)&&u.pad<=t&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var f=i&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:o})}}function QD(e){return eq(e)&&Math.abs(e)=r}function Yue(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&Qg(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&Qg(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function Wue(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&Qg(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&Qg(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function Qg(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=s&&(i=s,t=s),o<=s&&(o=s,a=s)}}return t=Yue(t,r),a=Wue(a,r),[t,a]}});var Va=R((pCe,Sq)=>{"use strict";var Uo=ta(),An=ia(),L0=jn(),A1=Ct(),Et=fr(),D0=Et.strTranslate,Ec=Ci(),jue=x1(),T1=Qt(),Ao=Ca(),Xue=Bo(),iq=b4(),hi=_n(),Zue=hi.ONEMAXYEAR,t2=hi.ONEAVGYEAR,a2=hi.ONEMINYEAR,Jue=hi.ONEMAXQUARTER,ow=hi.ONEAVGQUARTER,n2=hi.ONEMINQUARTER,$ue=hi.ONEMAXMONTH,q0=hi.ONEAVGMONTH,i2=hi.ONEMINMONTH,To=hi.ONEWEEK,Ei=hi.ONEDAY,Qu=Ei/2,is=hi.ONEHOUR,M1=hi.ONEMIN,o2=hi.ONESEC,Kue=hi.ONEMILLI,Que=hi.ONEMICROSEC,Lc=hi.MINUS_SIGN,u2=hi.BADNUM,lw={K:"zeroline"},sw={K:"gridline",L:"path"},uw={K:"minor-gridline",L:"path"},mq={K:"tick",L:"path"},oq={K:"tick",L:"text"},lq={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},f2=ki(),w1=f2.MID_SHIFT,Dc=f2.CAP_SHIFT,S1=f2.LINE_SPACING,efe=f2.OPPOSITE_SIDE,l2=3,gr=Sq.exports={};gr.setConvert=Jg();var rfe=$4(),Xs=an(),tfe=Xs.idSort,afe=Xs.isLinked;gr.id2name=Xs.id2name;gr.name2id=Xs.name2id;gr.cleanId=Xs.cleanId;gr.list=Xs.list;gr.listIds=Xs.listIds;gr.getFromId=Xs.getFromId;gr.getFromTrace=Xs.getFromTrace;var yq=E0();gr.getAutoRange=yq.getAutoRange;gr.findExtremes=yq.findExtremes;var nfe=1e-4;function hw(e){var r=(e[1]-e[0])*nfe;return[e[0]-r,e[1]+r]}gr.coerceRef=function(e,r,t,a,n,i){var o=a.charAt(a.length-1),l=t._fullLayout._subplots[o+"axis"],s=a+"ref",u={};return n||(n=l[0]||(typeof i=="string"?i:i[0])),i||(i=n),l=l.concat(l.map(function(f){return f+" domain"})),u[s]={valType:"enumerated",values:l.concat(i?typeof i=="string"?[i]:i:[]),dflt:n},Et.coerce(e,r,u,s)};gr.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};gr.coercePosition=function(e,r,t,a,n,i){var o,l,s=gr.getRefType(a);if(s!=="range")o=Et.ensureNumber,l=t(n,i);else{var u=gr.getFromId(r,a);i=u.fraction2r(i),l=t(n,i),o=u.cleanPos}e[n]=o(l)};gr.cleanPosition=function(e,r,t){var a=t==="paper"||t==="pixel"?Et.ensureNumber:gr.getFromId(r,t).cleanPos;return a(e)};gr.redrawComponents=function(e,r){r=r||gr.listIds(e);var t=e._fullLayout;function a(n,i,o,l){for(var s=A1.getComponentMethod(n,i),u={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};gr.saveRangeInitial=function(e,r){for(var t=gr.list(e,"",!0),a=!1,n=0;nc*.3||u(a)||u(n))){var h=t.dtick/2;e+=e+ho){var l=Number(t.substr(1));i.exactYears>o&&l%12===0?e=gr.tickIncrement(e,"M6","reverse")+Ei*1.5:i.exactMonths>o?e=gr.tickIncrement(e,"M1","reverse")+Ei*15.5:e-=Qu;var s=gr.tickIncrement(e,t);if(s<=a)return s}return e}gr.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var a=r.dtick&&An(r._tmin),n;if(a){var i=gr.tickIncrement(r._tmin,r.dtick,!0);n=[r._tmin,i*.99+r._tmin*.01]}else{var o=Et.simpleMap(r.range,r.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Et.simpleMap(n,r.l2r),e._isMinor=!0,gr.prepTicks(e,t),a){var l=An(r.dtick),s=An(e.dtick),u=l?r.dtick:+r.dtick.substring(1),f=s?e.dtick:+e.dtick.substring(1);l&&s?aw(u,f)?u===2*To&&f===2*Ei&&(e.dtick=To):u===2*To&&f===3*Ei?e.dtick=To:u===To&&!(r._input.minor||{}).nticks?e.dtick=Ei:fq(u/f,2.5)?e.dtick=u/2:e.dtick=u:String(r.dtick).charAt(0)==="M"?s?e.dtick="M1":aw(u,f)?u>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?aw(u,f)||(e.dtick=fq(u/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function aw(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function fq(e,r){return Math.abs(e/r-1)<.001}gr.prepTicks=function(e,r){var t=Et.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var a=e.nticks,n;a||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?Et.bigFont(e.tickfont.size||12):15,a=e._length/n):(n=e._id.charAt(0)==="y"?40:80,a=Et.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(a*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(a*=100),e._roughDTick=Math.abs(t[1]-t[0])/a,gr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=a-1,o=a):(i=a,o=a);var l=e[i].value,s=e[o].value,u=Math.abs(s-l),f=t||u,c=0;f>=a2?u>=a2&&u<=Zue?c=u:c=t2:t===ow&&f>=n2?u>=n2&&u<=Jue?c=u:c=ow:f>=i2?u>=i2&&u<=$ue?c=u:c=q0:t===To&&f>=To?c=To:f>=Ei?c=Ei:t===Qu&&f>=Qu?c=Qu:t===is&&f>=is&&(c=is);var h;c>=u&&(c=u,h=!0);var d=n+c;if(r.rangebreaks&&c>0){for(var p=84,g=0,m=0;mTo&&(c=u)}(c>0||a===0)&&(e[a].periodX=n+c/2)}}gr.calcTicks=function(r,t){for(var a=r.type,n=r.calendar,i=r.ticklabelstep,o=r.ticklabelmode==="period",l=r.range[0]>r.range[1],s=!r.ticklabelindex||Et.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],u=Et.simpleMap(r.range,r.r2l,void 0,void 0,t),f=u[1]=(A?0:1);b--){var T=!b;b?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var S=b?r:Et.extendFlat({},r,r.minor);if(T?gr.prepMinorTicks(S,r,t):gr.prepTicks(S,t),S.tickmode==="array"){b?(m=[],p=cq(r,!T)):(x=[],g=cq(r,!T));continue}if(S.tickmode==="sync"){m=[],p=ffe(r);continue}var M=hw(u),k=M[0],D=M[1],P=An(S.dtick),N=a==="log"&&!(P||S.dtick.charAt(0)==="L"),q=gr.tickFirst(S,t);if(b){if(r._tmin=q,q=D:U<=D;U=gr.tickIncrement(U,H,f,n)){if(b&&$++,S.rangebreaks&&!f){if(U=h)break}if(m.length>d||U===O)break;O=U;var B={value:U};b?(N&&U!==(U|0)&&(B.simpleLabel=!0),i>1&&$%i&&(B.skipLabel=!0),m.push(B)):(B.minor=!0,x.push(B))}}if(!x||x.length<2)s=!1;else{var V=(x[1].value-x[0].value)*(l?-1:1);Rfe(V,r.tickformat)||(s=!1)}if(!s)_=m;else{var j=m.concat(x);o&&m.length&&(j=j.slice(1)),j=j.sort(function(or,yr){return or.value-yr.value}).filter(function(or,yr,ir){return yr===0||or.value!==ir[yr-1].value});var K=j.map(function(or,yr){return or.minor===void 0&&!or.skipLabel?yr:null}).filter(function(or){return or!==null});K.forEach(function(or){s.map(function(yr){var ir=or+yr;ir>=0&&ir-1;De--){if(m[De].drop){m.splice(De,1);continue}m[De].value=iw(m[De].value,r);var Z=r.c2p(m[De].value);(Ce?ae>Z-Y:aeh||Xeh&&(ir.periodX=h),Xen&&ht2)r/=t2,a=n(10),e.dtick="M"+12*ns(r,a,e2);else if(i>q0)r/=q0,e.dtick="M"+ns(r,1,vq);else if(i>Ei){if(e.dtick=ns(r,Ei,e._hasDayOfWeekBreaks?[1,2,7,14]:cfe),!t){var o=gr.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Et.dateTick0(e.calendar,2):e.tick0=Et.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else i>is?e.dtick=ns(r,is,vq):i>M1?e.dtick=ns(r,M1,hq):i>o2?e.dtick=ns(r,o2,hq):(a=n(10),e.dtick=ns(r,a,e2))}else if(e.type==="log"){e.tick0=0;var s=Et.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(s[1]-s[0])<1){var u=1.5*Math.abs((s[1]-s[0])/r);r=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/u,a=n(10),e.dtick="L"+ns(r,a,e2)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):mw(e)?(e.tick0=0,a=1,e.dtick=ns(r,a,vfe)):(e.tick0=0,a=n(10),e.dtick=ns(r,a,e2));if(e.dtick===0&&(e.dtick=1),!An(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function _q(e){var r=e.dtick;if(e._tickexponent=0,!An(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),a=e.l2r(t).replace(/(^-|i)/g,""),n=a.length;if(String(r).charAt(0)==="M")n>10||a.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=Ei&&n<=10||r>=Ei*15)e._tickround="d";else if(r>=M1&&n<=16||r>=is)e._tickround="M";else if(r>=o2&&n<=19||r>=M1)e._tickround="S";else{var i=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(n,i)-20,e._tickround<0&&(e._tickround=4)}}else if(An(r)||r.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);An(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(s)>u&&(s2(e.exponentformat)&&!dw(s)?e._tickexponent=3*Math.round((s-1)/3):e._tickexponent=s)}else e._tickround=null}gr.tickIncrement=function(e,r,t,a){var n=t?-1:1;if(An(r))return Et.increment(e,n*r);var i=r.charAt(0),o=n*Number(r.substr(1));if(i==="M")return Et.incrementMonth(e,o,a);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var l=r==="D2"?xq:bq,s=e+n*.01,u=Et.roundUp(Et.mod(s,1),l,t);return Math.floor(s)+Math.log(Uo.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(r)};gr.tickFirst=function(e,r){var t=e.r2l||Number,a=Et.simpleMap(e.range,t,void 0,void 0,r),n=a[1]=0&&x<=e._length?m:null};if(i&&Et.isArrayOrTypedArray(e.ticktext)){var c=Et.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(u=0;u"+l;else{var u=C1(e),f=e._trueSide||e.side;(!u&&f==="top"||u&&f==="bottom")&&(o+="
")}r.text=o}function dfe(e,r,t,a,n){var i=e.dtick,o=r.x,l=e.tickformat,s=typeof i=="string"&&i.charAt(0);if(n==="never"&&(n=""),a&&s!=="L"&&(i="L3",s="L"),l||s==="L")r.text=k1(Math.pow(10,o),e,n,a);else if(An(i)||s==="D"&&Et.mod(o+.01,1)<.1){var u=Math.round(o),f=Math.abs(u),c=e.exponentformat;c==="power"||s2(c)&&dw(u)?(u===0?r.text=1:u===1?r.text="10":r.text="10"+(u>1?"":Lc)+f+"",r.fontSize*=1.25):(c==="e"||c==="E")&&f>2?r.text="1"+c+(u>0?"+":Lc)+f:(r.text=k1(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(s==="D")r.text=String(Math.round(Math.pow(10,Et.mod(o,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var h=String(r.text).charAt(0);(h==="0"||h==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(o<0?.5:.25)))}}function pfe(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function mfe(e,r,t){var a=Math.round(r.x),n=e._categories[a]||[],i=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);t?r.text=o+" - "+i:(r.text=i,r.text2=o)}function yfe(e,r,t,a,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(n="hide"),r.text=k1(r.x,e,n,a)}function gfe(e,r,t,a,n){if(e.thetaunit==="radians"&&!t){var i=r.x/180;if(i===0)r.text="0";else{var o=bfe(i);if(o[1]>=100)r.text=k1(Et.deg2rad(r.x),e,n,a);else{var l=r.x<0;o[1]===1?o[0]===1?r.text="\u03C0":r.text=o[0]+"\u03C0":r.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),l&&(r.text=Lc+r.text)}}}else r.text=k1(r.x,e,n,a)}function bfe(e){function r(l,s){return Math.abs(l-s)<=1e-6}function t(l,s){return r(s,0)?l:t(s,l%s)}function a(l){for(var s=1;!r(Math.round(l*s)/s,l);)s*=10;return s}var n=a(e),i=e*n,o=Math.abs(t(i,n));return[Math.round(i/o),Math.round(n/o)]}var xfe=["f","p","n","\u03BC","m","","k","M","G","T"];function s2(e){return e==="SI"||e==="B"}function dw(e){return e>14||e<-15}function k1(e,r,t,a){var n=e<0,i=r._tickround,o=t||r.exponentformat||"B",l=r._tickexponent,s=gr.getTickFormat(r),u=r.separatethousands;if(a){var f={exponentformat:o,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:An(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};_q(f),i=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(s=r.hoverformat)}if(s)return r._numFormat(s)(e).replace(/-/g,Lc);var c=Math.pow(10,-i)/2;if(o==="none"&&(l=0),e=Math.abs(e),e"+p+"":o==="B"&&l===9?e+="B":s2(o)&&(e+=xfe[l/3+5])}return n?Lc+e:e}gr.getTickFormat=function(e){var r;function t(s){return typeof s!="string"?s:Number(s.replace("M",""))*q0}function a(s,u){var f=["L","D"];if(typeof s==typeof u){if(typeof s=="number")return s-u;var c=f.indexOf(s.charAt(0)),h=f.indexOf(u.charAt(0));return c===h?Number(s.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):c-h}else return typeof s=="number"?1:-1}function n(s,u,f){var c=f||function(p){return p},h=u[0],d=u[1];return(!h&&typeof h!="number"||c(h)<=c(s))&&(!d&&typeof d!="number"||c(d)>=c(s))}function i(s,u){var f=u[0]===null,c=u[1]===null,h=a(s,u[0])>=0,d=a(s,u[1])<=0;return(f||h)&&(c||d)}var o,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&n.unshift(n.splice(f,1).shift())}});var l={false:{left:0,right:0}};return Et.syncOrAsync(n.map(function(s){return function(){if(s){var u=gr.getFromId(e,s);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=o;var f=gr.drawOne(e,u,t);return u._shiftPusher&&vw(u,u._fullDepth||0,l,!0),u._r=u.range.slice(),u._rl=Et.simpleMap(u._r,u.r2l),f}}}))};gr.drawOne=function(e,r,t){t=t||{};var a=t.axShifts||{},n=t.overlayingShiftedAx||[],i,o,l;r.setScale();var s=e._fullLayout,u=r._id,f=u.charAt(0),c=gr.counterLetter(u),h=s._plots[r._mainSubplot];if(!h)return;if(r._shiftPusher=r.autoshift||n.indexOf(r._id)!==-1||n.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var d=r.linewidth/2||0;r.ticks==="inside"&&(d+=r.ticklen),vw(r,d,a,!0),vw(r,r.shift||0,a,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=Ffe(r,a));var p=h[f+"axislayer"],g=r._mainLinePosition,m=g+=r._shift,x=r._mainMirrorPosition,_=r._vals=gr.calcTicks(r),A=[r.mirror,m,x].join("_");for(i=0;i<_.length;i++)_[i].axInfo=A;r._selections={},r._tickAngles&&(r._prevTickAngles=r._tickAngles),r._tickAngles={},r._depth=null;var b={};function T(Ke){var Je=u+(Ke||"tick");return b[Je]||(b[Je]=Tfe(r,Je,m)),b[Je]}if(r.visible){var S=gr.makeTransTickFn(r),M=gr.makeTransTickLabelFn(r),k,D,P=r.ticks==="inside",N=r.ticks==="outside";if(r.tickson==="boundaries"){var q=_fe(r,_);D=gr.clipEnds(r,q),k=P?D:q}else D=gr.clipEnds(r,_),k=P&&r.ticklabelmode!=="period"?D:_;var O=r._gridVals=D,U=Afe(r,_);if(!s._hasOnlyLargeSploms){var $=r._subplotsWith,W={};for(i=0;i<$.length;i++){o=$[i],l=s._plots[o];var H=l[c+"axis"],B=H._mainAxis._id;if(!W[B]){W[B]=1;var V=f==="x"?"M0,"+H._offset+"v"+H._length:"M"+H._offset+",0h"+H._length;gr.drawGrid(e,r,{vals:O,counterAxis:H,layer:l.gridlayer.select("."+u),minorLayer:l.minorGridlayer.select("."+u),path:V,transFn:S}),gr.drawZeroLine(e,r,{counterAxis:H,layer:l.zerolinelayer,path:V,transFn:S})}}}var j,K=gr.getTickSigns(r),ve=gr.getTickSigns(r,"minor");if(r.ticks||r.minor&&r.minor.ticks){var xe=gr.makeTickPath(r,m,K[2]),se=gr.makeTickPath(r,m,ve[2],{minor:!0}),be,re,ke,ge;if(r._anchorAxis&&r.mirror&&r.mirror!==!0?(be=gr.makeTickPath(r,x,K[3]),re=gr.makeTickPath(r,x,ve[3],{minor:!0}),ke=xe+be,ge=se+re):(be="",re="",ke=xe,ge=se),r.showdividers&&N&&r.tickson==="boundaries"){var Ee={};for(i=0;i0?ir.bottom-or:0,yr))));var de=0,Oe=0;if(r._shiftPusher&&(de=Math.max(yr,ir.height>0?Ke==="l"?or-ir.left:ir.right-or:0),r.title.text!==s._dfltTitle[f]&&(Oe=(r._titleStandoff||0)+(r._titleScoot||0),Ke==="l"&&(Oe+=pq(r))),r._fullDepth=Math.max(de,Oe)),r.automargin){Xe={x:0,y:0,r:0,l:0,t:0,b:0};var Ue=[0,1],rt=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Ke==="b"?Xe[Ke]=r._depth:(Xe[Ke]=r._depth=Math.max(ir.width>0?or-ir.top:0,yr),Ue.reverse()),ir.width>0){var Ur=ir.right-(r._offset+r._length);Ur>0&&(Xe.xr=1,Xe.r=Ur);var Ye=r._offset-ir.left;Ye>0&&(Xe.xl=0,Xe.l=Ye)}}else if(Ke==="l"?(r._depth=Math.max(ir.height>0?or-ir.left:0,yr),Xe[Ke]=r._depth-rt):(r._depth=Math.max(ir.height>0?ir.right-or:0,yr),Xe[Ke]=r._depth+rt,Ue.reverse()),ir.height>0){var Ve=ir.bottom-(r._offset+r._length);Ve>0&&(Xe.yb=0,Xe.b=Ve);var pr=r._offset-ir.top;pr>0&&(Xe.yt=1,Xe.t=pr)}Xe[c]=r.anchor==="free"?r.position:r._anchorAxis.domain[Ue[0]],r.title.text!==s._dfltTitle[f]&&(Xe[Ke]+=pq(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Lr={x:0,y:0,r:0,l:0,t:0,b:0},Lr[Je]=r.linewidth,r.mirror&&r.mirror!==!0&&(Lr[Je]+=yr),r.mirror===!0||r.mirror==="ticks"?Lr[c]=r._anchorAxis.domain[Ue[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Lr[c]=[r._counterDomainMin,r._counterDomainMax][Ue[1]]))}lr&&(Ar=A1.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(dq(Xe,r.automargin),dq(Lr,r.automargin)),L0.autoMargin(e,pw(r),Xe),L0.autoMargin(e,Tq(r),Lr),L0.autoMargin(e,Mq(r),Ar)}),Et.syncOrAsync(Pe)}};function dq(e,r){if(e){var t=Object.keys(lq).reduce(function(a,n){return r.indexOf(n)!==-1&&lq[n].forEach(function(i){a[i]=1}),a},{});Object.keys(e).forEach(function(a){t[a]||(a.length===1?e[a]=0:delete e[a])})}}function _fe(e,r){var t=[],a,n=function(i,o){var l=i.xbnd[o];l!==null&&t.push(Et.extendFlat({},i,{x:l}))};if(r.length){for(a=0;ae.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,s=!l;if(t){var u=o?-1:1;t=t*u}if(a){var f=e.side,c=l&&(f==="top"||f==="left")||s&&(f==="bottom"||f==="right")?1:-1;a=a*c}return e._id.charAt(0)==="x"?function(h){return D0(n+e._offset+e.l2p(fw(h))+t,i+a)}:function(h){return D0(i+a,n+e._offset+e.l2p(fw(h))+t)}};function fw(e){return e.periodX!==void 0?e.periodX:e.x}function Mfe(e){var r=e.ticklabelposition||"",t=function(d){return r.indexOf(d)!==-1},a=t("top"),n=t("left"),i=t("right"),o=t("bottom"),l=t("inside"),s=o||n||a||i;if(!s&&!l)return[0,0];var u=e.side,f=s?(e.tickwidth||0)/2:0,c=l2,h=e.tickfont?e.tickfont.size:12;return(o||a)&&(f+=h*Dc,c+=(e.linewidth||0)/2),(n||i)&&(f+=(e.linewidth||0)/2,c+=l2),l&&u==="top"&&(c-=h*(1-Dc)),(n||a)&&(f=-f),(u==="bottom"||u==="right")&&(c=-c),[s?f:0,l?c:0]}gr.makeTickPath=function(e,r,t,a){a||(a={});var n=a.minor;if(n&&!e.minor)return"";var i=a.len!==void 0?a.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return o==="x"?"M0,"+(r+l*t)+"v"+i*t:"M"+(r+l*t)+",0h"+i*t};gr.makeLabelFns=function(e,r,t){var a=e.ticklabelposition||"",n=function(q){return a.indexOf(q)!==-1},i=n("top"),o=n("left"),l=n("right"),s=n("bottom"),u=s||o||i||l,f=n("inside"),c=a==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:u&&(p=0),c&&(h+=p,t)){var g=Et.deg2rad(t);h=p*Math.cos(g)+1,d=p*Math.sin(g)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var m={labelStandoff:h,labelShift:d},x,_,A,b,T=0,S=e.side,M=e._id.charAt(0),k=e.tickangle,D;if(M==="x")D=!f&&S==="bottom"||f&&S==="top",b=D?1:-1,f&&(b*=-1),x=d*b,_=r+h*b,A=D?1:-.2,Math.abs(k)===90&&(f?A+=w1:k===-90&&S==="bottom"?A=Dc:k===90&&S==="top"?A=w1:A=.5,T=w1/2*(k/90)),m.xFn=function(q){return q.dx+x+T*q.fontSize},m.yFn=function(q){return q.dy+_+q.fontSize*A},m.anchorFn=function(q,O){if(u){if(o)return"end";if(l)return"start"}return!An(O)||O===0||O===180?"middle":O*b<0!==f?"end":"start"},m.heightFn=function(q,O,U){return O<-60||O>60?-.5*U:e.side==="top"!==f?-U:0};else if(M==="y"){if(D=!f&&S==="left"||f&&S==="right",b=D?1:-1,f&&(b*=-1),x=h,_=d*b,A=0,!f&&Math.abs(k)===90&&(k===-90&&S==="left"||k===90&&S==="right"?A=Dc:A=.5),f){var P=An(k)?+k:0;if(P!==0){var N=Et.deg2rad(P);T=Math.abs(Math.sin(N))*Dc*b,A=0}}m.xFn=function(q){return q.dx+r-(x+q.fontSize*A)*b+T*q.fontSize},m.yFn=function(q){return q.dy+_+q.fontSize*w1},m.anchorFn=function(q,O){return An(O)&&Math.abs(O)===90?"middle":D?"end":"start"},m.heightFn=function(q,O,U){return e.side==="right"&&(O*=-1),O<-30?-U:O<30?-.5*U:0}}return m};function c2(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}gr.drawTicks=function(e,r,t){t=t||{};var a=r._id+"tick",n=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(r.ticks?t.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=t.layer.selectAll("path."+a).data(n,c2);i.exit().remove(),i.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(o){return T1.stroke(Uo.select(this),o.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(o){return Ao.crispRound(e,o.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),v2(r,[mq]),i.attr("transform",t.transFn)};gr.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var a=r._id+"grid",n=r.minor&&r.minor.showgrid,i=n?t.vals.filter(function(x){return x.minor}):[],o=r.showgrid?t.vals.filter(function(x){return!x.minor}):[],l=t.counterAxis;if(l&&gr.shouldShowZeroLine(e,r,l))for(var s=r.tickmode==="array",u=0;u=0;p--){var g=p?h:d;if(g){var m=g.selectAll("path."+a).data(p?o:i,c2);m.exit().remove(),m.enter().append("path").classed(a,1).classed("crisp",t.crisp!==!1),m.attr("transform",t.transFn).attr("d",t.path).each(function(x){return T1.stroke(Uo.select(this),x.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(x){return Ao.dashStyle(x.minor?r.minor.griddash:r.griddash,x.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(x){return(x.minor?c:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&m.attr("d",t.path)}}v2(r,[sw,uw])}};gr.drawZeroLine=function(e,r,t){t=t||t;var a=r._id+"zl",n=gr.shouldShowZeroLine(e,r,t.counterAxis),i=t.layer.selectAll("path."+a).data(n?[{x:0,id:r._id}]:[]);i.exit().remove(),i.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(o,l){return tfe(o.id,l.id)})}),i.attr("transform",t.transFn).attr("d",t.path).call(T1.stroke,r.zerolinecolor||T1.defaultLine).style("stroke-width",Ao.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),v2(r,[lw])};gr.drawLabels=function(e,r,t){t=t||{};var a=e._fullLayout,n=r._id,i=t.cls||n+"tick",o=t.vals.filter(function(B){return B.text}),l=t.labelFns,s=t.secondary?0:r.tickangle,u=(r._prevTickAngles||{})[i],f=t.layer.selectAll("g."+i).data(r.showticklabels?o:[],c2),c=[];f.enter().append("g").classed(i,1).append("text").attr("text-anchor","middle").each(function(B){var V=Uo.select(this),j=e._promises.length;V.call(Ec.positionText,l.xFn(B),l.yFn(B)).call(Ao.font,{family:B.font,size:B.fontSize,color:B.fontColor,weight:B.fontWeight,style:B.fontStyle,variant:B.fontVariant,textcase:B.fontTextcase,lineposition:B.fontLineposition,shadow:B.fontShadow}).text(B.text).call(Ec.convertToTspans,e),e._promises[j]?c.push(e._promises.pop().then(function(){h(V,s)})):h(V,s)}),v2(r,[oq]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(B){Uo.select(this).select("text").call(Ec.positionText,l.xFn(B),l.yFn(B))});function h(B,V){B.each(function(j){var K=Uo.select(this),ve=K.select(".text-math-group"),xe=l.anchorFn(j,V),se=t.transFn.call(K.node(),j)+(An(V)&&+V!=0?" rotate("+V+","+l.xFn(j)+","+(l.yFn(j)-j.fontSize/2)+")":""),be=Ec.lineCount(K),re=S1*j.fontSize,ke=l.heightFn(j,An(V)?+V:0,(be-1)*re);if(ke&&(se+=D0(0,ke)),ve.empty()){var ge=K.select("text");ge.attr({transform:se,"text-anchor":xe}),ge.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var Ee=Ao.bBox(ve.node()).width,De=Ee*{end:-.5,start:.5}[xe];ve.attr("transform",se+D0(De,0))}})}r._adjustTickLabelsOverflow=function(){var B=r.ticklabeloverflow;if(!(!B||B==="allow")){var V=B.indexOf("hide")!==-1,j=r._id.charAt(0)==="x",K=0,ve=j?e._fullLayout.width:e._fullLayout.height;if(B.indexOf("domain")!==-1){var xe=Et.simpleMap(r.range,r.r2l);K=r.l2p(xe[0])+r._offset,ve=r.l2p(xe[1])+r._offset}var se=Math.min(K,ve),be=Math.max(K,ve),re=r.side,ke=1/0,ge=-1/0;f.each(function(Y){var ae=Uo.select(this),Z=ae.select(".text-math-group");if(Z.empty()){var Te=Ao.bBox(ae.node()),Pe=0;j?(Te.right>be||Te.leftbe||Te.top+(r.tickangle?0:Y.fontSize/4)r["_visibleLabelMin_"+xe._id]?Y.style("display","none"):be.K==="tick"&&!se&&Y.style("display",null)})})})})},h(f,u+1?u:s);function d(){return c.length&&Promise.all(c)}var p=null;function g(){if(h(f,s),o.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){p=r.autotickangles[0];var B=0,V=[],j,K=1;f.each(function(ir){B=Math.max(B,ir.fontSize);var Xe=r.l2p(ir.x),Lr=cw(this),Ar=Ao.bBox(Lr.node());K=Math.max(K,Ec.lineCount(Lr)),V.push({top:0,bottom:10,height:10,left:Xe-Ar.width/2,right:Xe+Ar.width/2+2,width:Ar.width+2})});var ve=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,xe=o.length,se=Math.abs((o[xe-1].x-o[0].x)*r._m)/(xe-1),be=ve?se/2:se,re=ve?r.ticklen:B*1.25*K,ke=Math.sqrt(Math.pow(be,2)+Math.pow(re,2)),ge=be/ke,Ee=r.autotickangles.map(function(ir){return ir*Math.PI/180}),De=Ee.find(function(ir){return Math.abs(Math.cos(ir))<=ge});De===void 0&&(De=Ee.reduce(function(ir,Xe){return Math.abs(Math.cos(ir))$*U&&(N=U,k[M]=D[M]=q[M])}var W=Math.abs(N-P);W-b>0?(W-=b,b*=1+b/W):b=0,r._id.charAt(0)!=="y"&&(b=-b),k[S]=_.p2r(_.r2p(D[S])+T*b),_.autorange==="min"||_.autorange==="max reversed"?(k[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(k[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[_._name+".range"]=k}var H=Et.syncOrAsync(m);return H&&H.then&&e._promises.push(H),H};function Sfe(e,r,t){var a=r._id+"divider",n=t.vals,i=t.layer.selectAll("path."+a).data(n,c2);i.exit().remove(),i.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(T1.stroke,r.dividercolor).style("stroke-width",Ao.crispRound(e,r.dividerwidth,1)+"px"),i.attr("transform",t.transFn).attr("d",t.path)}gr.getPxPosition=function(e,r){var t=e._fullLayout._size,a=r._id.charAt(0),n=r.side,i;if(r.anchor!=="free"?i=r._anchorAxis:a==="x"?i={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:a==="y"&&(i={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),n==="top"||n==="left")return i._offset;if(n==="bottom"||n==="right")return i._offset+i._length};function pq(e){var r=e.title.font.size,t=(e.title.text.match(Ec.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(Dc+t*S1):t?r*(t+1)*S1:r}function kfe(e,r){var t=e._fullLayout,a=r._id,n=a.charAt(0),i=r.title.font.size,o,l=(r.title.text.match(Ec.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?o=r._depth+r.title.standoff+i*Dc:(r.side==="top"||r.side==="left")&&(o=r._depth+r.title.standoff+i*(w1+l*S1));else{var s=C1(r);if(r.type==="multicategory")o=r._depth;else{var u=1.5*i;s&&(u=.5*i,r.ticks==="outside"&&(u+=r.ticklen)),o=10+u+(r.linewidth?r.linewidth-1:0)}s||(n==="x"?o+=r.side==="top"?i*(r.showticklabels?1:0):i*(r.showticklabels?1.5:.5):o+=r.side==="right"?i*(r.showticklabels?1:.5):i*(r.showticklabels?.5:0))}var f=gr.getPxPosition(e,r),c,h,d;n==="x"?(h=r._offset+r._length/2,d=r.side==="top"?f-o:f+o):(d=r._offset+r._length/2,h=r.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(r.type!=="multicategory"){var g=r._selections[r._id+"tick"];if(p={selection:g,side:r.side},g&&g.node()&&g.node().parentNode){var m=Ao.getTranslate(g.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}r.title.hasOwnProperty("standoff")&&(p.pad=0)}return r._titleStandoff=o,jue.draw(e,a+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[n],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}gr.shouldShowZeroLine=function(e,r,t){var a=Et.simpleMap(r.range,r.r2l);return a[0]*a[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===u2)&&(Aq(r,0)||!Cfe(e,r,t,a)||Efe(e,r))};gr.clipEnds=function(e,r){return r.filter(function(t){return Aq(e,t.x)})};function Aq(e,r){var t=e.l2p(r);return t>1&&t1)for(n=1;n=n.min&&e=Que:/%L/.test(r)?e>=Kue:/%[SX]/.test(r)?e>=o2:/%M/.test(r)?e>=M1:/%[HI]/.test(r)?e>=is:/%p/.test(r)?e>=Qu:/%[Aadejuwx]/.test(r)?e>=Ei:/%[UVW]/.test(r)?e>=To:/%[Bbm]/.test(r)?e>=i2:/%[q]/.test(r)?e>=n2:/%[Yy]/.test(r)?e>=a2:!0}});var Cq=R((mCe,kq)=>{"use strict";kq.exports=function(r,t,a){var n,i;if(a){var o=t==="reversed"||t==="min reversed"||t==="max reversed";n=a[o?1:0],i=a[o?0:1]}var l=r("autorangeoptions.minallowed",i===null?n:void 0),s=r("autorangeoptions.maxallowed",n===null?i:void 0);l===void 0&&r("autorangeoptions.clipmin"),s===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var yw=R((yCe,Eq)=>{"use strict";var Pfe=Cq();Eq.exports=function(r,t,a,n){var i=t._template||{},o=t.type||i.type||"-";a("minallowed"),a("maxallowed");var l=a("range");if(!l){var s;!n.noInsiderange&&o!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(t.insiderange=!1,s=void 0),s&&(l=a("range",s)))}var u=t.getAutorangeDflt(l,n),f=a("autorange",u),c;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,c=!0),c||(u=t.getAutorangeDflt(l,n),f=a("autorange",u)),f&&(Pfe(a,f,l),(o==="linear"||o==="-")&&a("rangemode")),t.cleanRange()}});var Dq=R((gCe,Lq)=>{var Nfe={left:0,top:0};Lq.exports=Ife;function Ife(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var a=e.clientX||0,n=e.clientY||0,i=Ofe(r);return t[0]=a-i.left,t[1]=n-i.top,t}function Ofe(e){return e===window||e===document||e===document.body?Nfe:e.getBoundingClientRect()}});var gw=R((bCe,qq)=>{"use strict";var zfe=X_();function Bfe(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}qq.exports=zfe&&Bfe()});var Rq=R((xCe,Fq)=>{"use strict";Fq.exports=function(r,t,a,n,i){var o=(r-a)/(n-a),l=o+t/(n-a),s=(o+l)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?s:i==="right"||i==="top"?l:o<2/3-s?o:l>4/3-s?l:s}});var Iq=R((_Ce,Nq)=>{"use strict";var Pq=fr(),Ufe=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Nq.exports=function(r,t,a,n){return a==="left"?r=0:a==="center"?r=1:a==="right"?r=2:r=Pq.constrain(Math.floor(r*3),0,2),n==="bottom"?t=0:n==="middle"?t=1:n==="top"?t=2:t=Pq.constrain(Math.floor(t*3),0,2),Ufe[t][r]}});var zq=R((wCe,Oq)=>{"use strict";var Gfe=u1(),Hfe=dg(),Vfe=r1().getGraphDiv,Yfe=Qd(),bw=Oq.exports={};bw.wrapped=function(e,r,t){e=Vfe(e),e._fullLayout&&Hfe.clear(e._fullLayout._uid+Yfe.HOVERID),bw.raw(e,r,t)};bw.raw=function(r,t){var a=r._fullLayout,n=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&Gfe.triggerHandler(r,"plotly_beforehover",t)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&n&&r.emit("plotly_unhover",{event:t,points:n}))}});var xl=R((ACe,Gq)=>{"use strict";var Wfe=Dq(),xw=J_(),jfe=gw(),Xfe=fr().removeElement,Zfe=ai(),qc=Gq.exports={};qc.align=Rq();qc.getCursor=Iq();var Bq=zq();qc.unhover=Bq.wrapped;qc.unhoverRaw=Bq.raw;qc.init=function(r){var t=r.gd,a=1,n=t._context.doubleClickDelay,i=r.element,o,l,s,u,f,c,h,d;t._mouseDownTime||(t._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=m,jfe?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=m,i.addEventListener("touchstart",m,{passive:!1})):i.ontouchstart=m;function p(A,b,T){return Math.abs(A)n&&(a=Math.max(a-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(a,c),!d){var b;try{b=new MouseEvent("click",A)}catch(S){var T=_w(A);b=document.createEvent("MouseEvents"),b.initMouseEvent("click",A.bubbles,A.cancelable,A.view,A.detail,A.screenX,A.screenY,T[0],T[1],A.ctrlKey,A.altKey,A.shiftKey,A.metaKey,A.button,A.relatedTarget)}h.dispatchEvent(b)}t._dragging=!1,t._dragged=!1}};function Uq(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}qc.coverSlip=Uq;function _w(e){return Wfe(e.changedTouches?e.changedTouches[0]:e,document.body)}});var ef=R((TCe,Hq)=>{"use strict";Hq.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&r.classed(a,!1)}),t&&r.classed("cursor-"+t,!0)}});var Wq=R((MCe,Yq)=>{"use strict";var ww=ef(),E1="data-savedcursor",Vq="!!";Yq.exports=function(r,t){var a=r.attr(E1);if(t){if(!a){for(var n=(r.attr("class")||"").split(" "),i=0;i{"use strict";var Aw=ci(),Jfe=Kl();jq.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Jfe.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:Aw({editType:"legend"}),grouptitlefont:Aw({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:Aw({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var d2=R(h2=>{"use strict";h2.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};h2.isVertical=function(r){return r.orientation!=="h"};h2.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var kw=R((CCe,Xq)=>{"use strict";var Mw=Ct(),Mo=fr(),$fe=Da(),Kfe=hl(),Qfe=Tw(),ece=l0(),Sw=d2();function rce(e,r,t,a){var n=r[e]||{},i=$fe.newContainer(t,e);function o(H,B){return Mo.coerce(n,i,Qfe,H,B)}var l=Mo.coerceFont(o,"font",t.font);o("bgcolor",t.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var u,f=function(H,B){var V=u._input,j=u;return Mo.coerce(V,j,Kfe,H,B)},c=t.font||{},h=Mo.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,g="normal",m=(t.shapes||[]).filter(function(H){return H.showlegend}),x=a.concat(m).filter(function(H){return e===(H.legend||"legend")}),_=0;_(e==="legend"?1:0));if(b===!1&&(t[e]=void 0),!(b===!1&&!n.uirevision)&&(o("uirevision",t.uirevision),b!==!1)){o("borderwidth");var T=o("orientation"),S=o("yref"),M=o("xref"),k=T==="h",D=S==="paper",P=M==="paper",N,q,O,U="left";k?(N=0,Mw.getComponentMethod("rangeslider","isVisible")(r.xaxis)?D?(q=1.1,O="bottom"):(q=1,O="top"):D?(q=-.1,O="top"):(q=0,O="bottom")):(q=1,O="auto",P?N=1.02:(N=1,U="right")),Mo.coerce(n,i,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:N}},"x"),Mo.coerce(n,i,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:q}},"y"),o("traceorder",g),Sw.isGrouped(t[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",U),o("yanchor",O),o("valign"),Mo.noneOrAll(n,i,["x","y"]);var $=o("title.text");if($){o("title.side",k?"left":"top");var W=Mo.extendFlat({},l,{size:Mo.bigFont(l.size)});Mo.coerceFont(o,"title.font",W)}}}}Xq.exports=function(r,t,a){var n,i=a.slice(),o=t.shapes;if(o)for(n=0;n{"use strict";var F0=Ct(),Ew=fr(),tce=Ew.pushUnique,Cw=!0;Zq.exports=function(r,t,a){var n=t._fullLayout;if(t._dragged||t._editing)return;var i=n.legend.itemclick,o=n.legend.itemdoubleclick,l=n.legend.groupclick;a===1&&i==="toggle"&&o==="toggleothers"&&Cw&&t.data&&t._context.showTips&&Ew.notifier(Ew._(t,"Double-click on legend to isolate one trace"),"long"),Cw=!1;var s;if(a===1?s=i:a===2&&(s=o),!s)return;var u=l==="togglegroup",f=n.hiddenlabels?n.hiddenlabels.slice():[],c=r.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=t._fullData,d=(n.shapes||[]).filter(function(or){return or.showlegend}),p=h.concat(d),g=c.trace;g._isShape&&(g=g._fullInput);var m=g.legendgroup,x,_,A,b,T,S,M={},k=[],D=[],P=[];function N(or,yr){var ir=k.indexOf(or),Xe=M.visible;return Xe||(Xe=M.visible=[]),k.indexOf(or)===-1&&(k.push(or),ir=k.length-1),Xe[ir]=yr,ir}var q=(n.shapes||[]).map(function(or){return or._input}),O=!1;function U(or,yr){q[or].visible=yr,O=!0}function $(or,yr){if(!(c.groupTitle&&!u)){var ir=or._fullInput||or,Xe=ir._isShape,Lr=ir.index;Lr===void 0&&(Lr=ir._index);var Ar=ir.visible===!1?!1:yr;Xe?U(Lr,Ar):N(Lr,Ar)}}var W=g.legend,H=g._fullInput,B=H&&H._isShape;if(!B&&F0.traceIs(g,"pie-like")){var V=c.label,j=f.indexOf(V);if(s==="toggle")j===-1?f.push(V):f.splice(j,1);else if(s==="toggleothers"){var K=j!==-1,ve=[];for(x=0;x{"use strict";$q.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var eF=R((DCe,Qq)=>{"use strict";var Kq=Ct(),Dw=d2();Qq.exports=function(r,t,a){var n=t._inHover,i=Dw.isGrouped(t),o=Dw.isReversed(t),l={},s=[],u=!1,f={},c=0,h=0,d,p;function g(H,B,V){if(t.visible!==!1&&!(a&&H!==t._id))if(B===""||!Dw.isGrouped(t)){var j="~~i"+c;s.push(j),l[j]=[V],c++}else s.indexOf(B)===-1?(s.push(B),u=!0,l[B]=[V]):l[B].push(V)}for(d=0;dP&&(D=P)}M[d][0]._groupMinRank=D,M[d][0]._preGroupSort=d}var N=function(H,B){return H[0]._groupMinRank-B[0]._groupMinRank||H[0]._preGroupSort-B[0]._preGroupSort},q=function(H,B){return H.trace.legendrank-B.trace.legendrank||H._preSort-B._preSort};for(M.forEach(function(H,B){H[0]._preGroupSort=B}),M.sort(N),d=0;d{"use strict";var p2=fr();function rF(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Fc.formatPiePercent=function(r,t){var a=rF((r*100).toPrecision(3));return p2.numSeparate(a,t)+"%"};Fc.formatPieValue=function(r,t){var a=rF(r.toPrecision(10));return p2.numSeparate(a,t)};Fc.getFirstFilled=function(r,t){if(p2.isArrayOrTypedArray(r))for(var a=0;a{"use strict";var ace=Ca(),nce=Qt();tF.exports=function(r,t,a,n){var i=a.marker.pattern;i&&i.shape?ace.pointStyle(r,a,n,t):nce.fill(r,t.color)}});var lF=R((RCe,oF)=>{"use strict";var nF=Qt(),iF=qw().castOption,ice=aF();oF.exports=function(r,t,a,n){var i=a.marker.line,o=iF(i.color,t.pts)||nF.defaultLine,l=iF(i.width,t.pts)||0;r.call(ice,t,a,n).style("stroke-width",l).call(nF.stroke,o)}});var Nw=R((PCe,hF)=>{"use strict";var Li=ta(),Fw=Ct(),xi=fr(),sF=xi.strTranslate,zi=Ca(),Go=Qt(),Rw=gl().extractOpts,m2=ni(),oce=lF(),lce=qw().castOption,sce=Lw(),uF=12,fF=5,Rc=2,uce=10,R0=5;hF.exports=function(r,t,a){var n=t._fullLayout;a||(a=n.legend);var i=a.itemsizing==="constant",o=a.itemwidth,l=(o+sce.itemGap*2)/2,s=sF(l,0),u=function(M,k,D,P){var N;if(M+1)N=M;else if(k&&k.width>0)N=k.width;else return 0;return i?P:Math.min(N,D)};r.each(function(M){var k=Li.select(this),D=xi.ensureSingle(k,"g","layers");D.style("opacity",M[0].trace.opacity);var P=a.indentation,N=a.valign,q=M[0].lineHeight,O=M[0].height;if(N==="middle"&&P===0||!q||!O)D.attr("transform",null);else{var U={top:1,bottom:-1}[N],$=U*(.5*(q-O+3))||0,W=a.indentation;D.attr("transform",sF(W,$))}var H=D.selectAll("g.legendfill").data([M]);H.enter().append("g").classed("legendfill",!0);var B=D.selectAll("g.legendlines").data([M]);B.enter().append("g").classed("legendlines",!0);var V=D.selectAll("g.legendsymbols").data([M]);V.enter().append("g").classed("legendsymbols",!0),V.selectAll("g.legendpoints").data([M]).enter().append("g").classed("legendpoints",!0)}).each(S).each(h).each(p).each(d).each(m).each(b).each(A).each(f).each(c).each(x).each(_);function f(M){var k=cF(M),D=k.showFill,P=k.showLine,N=k.showGradientLine,q=k.showGradientFill,O=k.anyFill,U=k.anyLine,$=M[0],W=$.trace,H,B,V=Rw(W),j=V.colorscale,K=V.reversescale,ve=function(Ee){if(Ee.size())if(D)zi.fillGroupStyle(Ee,t,!0);else{var De="legendfill-"+W.uid;zi.gradient(Ee,t,De,Pw(K),j,"fill")}},xe=function(Ee){if(Ee.size()){var De="legendline-"+W.uid;zi.lineGroupStyle(Ee),zi.gradient(Ee,t,De,Pw(K),j,"stroke")}},se=m2.hasMarkers(W)||!O?"M5,0":U?"M5,-2":"M5,-3",be=Li.select(this),re=be.select(".legendfill").selectAll("path").data(D||q?[M]:[]);if(re.enter().append("path").classed("js-fill",!0),re.exit().remove(),re.attr("d",se+"h"+o+"v6h-"+o+"z").call(ve),P||N){var ke=u(void 0,W.line,uce,fF);B=xi.minExtend(W,{line:{width:ke}}),H=[xi.minExtend($,{trace:B})]}var ge=be.select(".legendlines").selectAll("path").data(P||N?[H]:[]);ge.enter().append("path").classed("js-line",!0),ge.exit().remove(),ge.attr("d",se+(N?"l"+o+",0.0001":"h"+o)).call(P?zi.lineGroupStyle:xe)}function c(M){var k=cF(M),D=k.anyFill,P=k.anyLine,N=k.showLine,q=k.showMarker,O=M[0],U=O.trace,$=!q&&!P&&!D&&m2.hasText(U),W,H;function B(re,ke,ge,Ee){var De=xi.nestedProperty(U,re).get(),Ce=xi.isArrayOrTypedArray(De)&&ke?ke(De):De;if(i&&Ce&&Ee!==void 0&&(Ce=Ee),ge){if(Cege[1])return ge[1]}return Ce}function V(re){return O._distinct&&O.index&&re[O.index]?re[O.index]:re[0]}if(q||$||N){var j={},K={};if(q){j.mc=B("marker.color",V),j.mx=B("marker.symbol",V),j.mo=B("marker.opacity",xi.mean,[.2,1]),j.mlc=B("marker.line.color",V),j.mlw=B("marker.line.width",xi.mean,[0,5],Rc),K.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ve=B("marker.size",xi.mean,[2,16],uF);j.ms=ve,K.marker.size=ve}N&&(K.line={width:B("line.width",V,[0,10],fF)}),$&&(j.tx="Aa",j.tp=B("textposition",V),j.ts=10,j.tc=B("textfont.color",V),j.tf=B("textfont.family",V),j.tw=B("textfont.weight",V),j.ty=B("textfont.style",V),j.tv=B("textfont.variant",V),j.tC=B("textfont.textcase",V),j.tE=B("textfont.lineposition",V),j.tS=B("textfont.shadow",V)),W=[xi.minExtend(O,j)],H=xi.minExtend(U,K),H.selectedpoints=null,H.texttemplate=null}var xe=Li.select(this).select("g.legendpoints"),se=xe.selectAll("path.scatterpts").data(q?W:[]);se.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),se.exit().remove(),se.call(zi.pointStyle,H,t),q&&(W[0].mrc=3);var be=xe.selectAll("g.pointtext").data($?W:[]);be.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),be.exit().remove(),be.selectAll("text").call(zi.textPointStyle,H,t)}function h(M){var k=M[0].trace,D=k.type==="waterfall";if(M[0]._distinct&&D){var P=M[0].trace[M[0].dir].marker;return M[0].mc=P.color,M[0].mlw=P.line.width,M[0].mlc=P.line.color,g(M,this,"waterfall")}var N=[];k.visible&&D&&(N=M[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var q=Li.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(N);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(O){var U=Li.select(this),$=k[O[0]].marker,W=u(void 0,$.line,R0,Rc);U.attr("d",O[1]).style("stroke-width",W+"px").call(Go.fill,$.color),W&&U.call(Go.stroke,$.line.color)})}function d(M){g(M,this)}function p(M){g(M,this,"funnel")}function g(M,k,D){var P=M[0].trace,N=P.marker||{},q=N.line||{},O=N.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",U=D?P.visible&&P.type===D:Fw.traceIs(P,"bar"),$=Li.select(k).select("g.legendpoints").selectAll("path.legend"+D).data(U?[M]:[]);$.enter().append("path").classed("legend"+D,!0).attr("d",O).attr("transform",s),$.exit().remove(),$.each(function(W){var H=Li.select(this),B=W[0],V=u(B.mlw,N.line,R0,Rc);H.style("stroke-width",V+"px");var j=B.mcc;if(!a._inHover&&"mc"in B){var K=Rw(N),ve=K.mid;ve===void 0&&(ve=(K.max+K.min)/2),j=zi.tryColorscale(N,"")(ve)}var xe=j||B.mc||N.color,se=N.pattern,be=se&&zi.getPatternAttr(se.shape,0,"");if(be){var re=zi.getPatternAttr(se.bgcolor,0,null),ke=zi.getPatternAttr(se.fgcolor,0,null),ge=se.fgopacity,Ee=vF(se.size,8,10),De=vF(se.solidity,.5,1),Ce="legend-"+P.uid;H.call(zi.pattern,"legend",t,Ce,be,Ee,De,j,se.fillmode,re,ke,ge)}else H.call(Go.fill,xe);V&&Go.stroke(H,B.mlc||q.color)})}function m(M){var k=M[0].trace,D=Li.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&Fw.traceIs(k,"box-violin")?[M]:[]);D.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.each(function(){var P=Li.select(this);if((k.boxpoints==="all"||k.points==="all")&&Go.opacity(k.fillcolor)===0&&Go.opacity((k.line||{}).color)===0){var N=xi.minExtend(k,{marker:{size:i?uF:xi.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});D.call(zi.pointStyle,N,t)}else{var q=u(void 0,k.line,R0,Rc);P.style("stroke-width",q+"px").call(Go.fill,k.fillcolor),q&&Go.stroke(P,k.line.color)}})}function x(M){var k=M[0].trace,D=Li.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(k.visible&&k.type==="candlestick"?[M,M]:[]);D.enter().append("path").classed("legendcandle",!0).attr("d",function(P,N){return N?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(P,N){var q=Li.select(this),O=k[N?"increasing":"decreasing"],U=u(void 0,O.line,R0,Rc);q.style("stroke-width",U+"px").call(Go.fill,O.fillcolor),U&&Go.stroke(q,O.line.color)})}function _(M){var k=M[0].trace,D=Li.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(k.visible&&k.type==="ohlc"?[M,M]:[]);D.enter().append("path").classed("legendohlc",!0).attr("d",function(P,N){return N?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(P,N){var q=Li.select(this),O=k[N?"increasing":"decreasing"],U=u(void 0,O.line,R0,Rc);q.style("fill","none").call(zi.dashLine,O.line.dash,U),U&&Go.stroke(q,O.line.color)})}function A(M){T(M,this,"pie")}function b(M){T(M,this,"funnelarea")}function T(M,k,D){var P=M[0],N=P.trace,q=D?N.visible&&N.type===D:Fw.traceIs(N,D),O=Li.select(k).select("g.legendpoints").selectAll("path.legend"+D).data(q?[M]:[]);if(O.enter().append("path").classed("legend"+D,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),O.exit().remove(),O.size()){var U=N.marker||{},$=u(lce(U.line.width,P.pts),U.line,R0,Rc),W="pieLike",H=xi.minExtend(N,{marker:{line:{width:$}}},W),B=xi.minExtend(P,{trace:H},W);oce(O,B,H,t)}}function S(M){var k=M[0].trace,D,P=[];if(k.visible)switch(k.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],D=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],D=!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"]],D="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"]],D=!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"]],D=!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"]],D=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],D=!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"]],D=!1;break}var N=Li.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);N.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(q,O){var U=Li.select(this),$=Rw(k),W=$.colorscale,H=$.reversescale,B=function(ve){if(ve.size()){var xe="legendfill-"+k.uid;zi.gradient(ve,t,xe,Pw(H,D==="radial"),W,"fill")}},V;if(W){if(!D){var K=W.length;V=O===0?W[H?K-1:0][1]:O===1?W[H?0:K-1][1]:W[Math.floor((K-1)/2)][1]}}else{var j=k.vertexcolor||k.facecolor||k.color;V=xi.isArrayOrTypedArray(j)?j[O]||j[0]:j}U.attr("d",q[0]),V?U.call(Go.fill,V):U.call(B)})}};function Pw(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function cF(e){var r=e[0].trace,t=r.contours,a=m2.hasLines(r),n=m2.hasMarkers(r),i=r.visible&&r.fill&&r.fill!=="none",o=!1,l=!1;if(t){var s=t.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||t.showlines,t.type==="constraint"?i=t._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:n,showLine:a,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:i||l}}function vF(e,r,t){return e&&xi.isArrayOrTypedArray(e)?r:e>t?t:e}});var Bw=R((NCe,AF)=>{"use strict";var lo=ta(),Tn=fr(),Ow=jn(),I0=Ct(),dF=u1(),Iw=xl(),Mn=Ca(),g2=Qt(),Pc=Ci(),pF=Jq(),In=Lw(),zw=ki(),_F=zw.LINE_SPACING,N0=zw.FROM_TL,mF=zw.FROM_BR,yF=eF(),fce=Nw(),gF=d2(),P0=1,cce=/^legend[0-9]*$/;AF.exports=function(r,t){if(t)bF(r,t);else{var a=r._fullLayout,n=a._legends,i=a._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=lo.select(this),f=u.attr("class"),c=f.split(" ")[0];c.match(cce)&&n.indexOf(c)===-1&&u.remove()});for(var o=0;o1)}var p=a.hiddenlabels||[];if(!l&&(!a.showlegend||!s.length))return o.selectAll("."+n).remove(),a._topdefs.select("#"+i).remove(),Ow.autoMargin(e,n);var g=Tn.ensureSingle(o,"g",n,function(k){l||k.attr("pointer-events","all")}),m=Tn.ensureSingleById(a._topdefs,"clipPath",i,function(k){k.append("rect")}),x=Tn.ensureSingle(g,"rect","bg",function(k){k.attr("shape-rendering","crispEdges")});x.call(g2.stroke,t.bordercolor).call(g2.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var _=Tn.ensureSingle(g,"g","scrollbox"),A=t.title;t._titleWidth=0,t._titleHeight=0;var b;A.text?(b=Tn.ensureSingle(_,"text",n+"titletext"),b.attr("text-anchor","start").call(Mn.font,A.font).text(A.text),b2(b,_,e,t,P0)):_.selectAll("."+n+"titletext").remove();var T=Tn.ensureSingle(g,"rect","scrollbar",function(k){k.attr(In.scrollBarEnterAttrs).call(g2.fill,In.scrollBarColor)}),S=_.selectAll("g.groups").data(s);S.enter().append("g").attr("class","groups"),S.exit().remove();var M=S.selectAll("g.traces").data(Tn.identity);M.enter().append("g").attr("class","traces"),M.exit().remove(),M.style("opacity",function(k){var D=k[0].trace;return I0.traceIs(D,"pie-like")?p.indexOf(k[0].label)!==-1?.5:1:D.visible==="legendonly"?.5:1}).each(function(){lo.select(this).call(hce,e,t)}).call(fce,e,t).each(function(){l||lo.select(this).call(dce,e,n)}),Tn.syncOrAsync([Ow.previousPromises,function(){return yce(e,S,M,t)},function(){var k=a._size,D=t.borderwidth,P=t.xref==="paper",N=t.yref==="paper";if(A.text&&vce(b,t,D),!l){var q,O;P?q=k.l+k.w*t.x-N0[x2(t)]*t._width:q=a.width*t.x-N0[x2(t)]*t._width,N?O=k.t+k.h*(1-t.y)-N0[_2(t)]*t._effHeight:O=a.height*(1-t.y)-N0[_2(t)]*t._effHeight;var U=gce(e,n,q,O);if(U)return;if(a.margin.autoexpand){var $=q,W=O;q=P?Tn.constrain(q,0,a.width-t._width):$,O=N?Tn.constrain(O,0,a.height-t._effHeight):W,q!==$&&Tn.log("Constrain "+n+".x to make legend fit inside graph"),O!==W&&Tn.log("Constrain "+n+".y to make legend fit inside graph")}Mn.setTranslate(g,q,O)}if(T.on(".drag",null),g.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var H=t._effHeight;l&&(H=t._height),x.attr({width:t._width-D,height:H-D,x:D/2,y:D/2}),Mn.setTranslate(_,0,0),m.select("rect").attr({width:t._width-2*D,height:H-2*D,x:D,y:D}),Mn.setClipUrl(_,i,e),Mn.setRect(T,0,0,0,0),delete t._scrollY}else{var B=Math.max(In.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),V=t._effHeight-B-2*In.scrollBarMargin,j=t._height-t._effHeight,K=V/j,ve=Math.min(t._scrollY||0,j);x.attr({width:t._width-2*D+In.scrollBarWidth+In.scrollBarMargin,height:t._effHeight-D,x:D/2,y:D/2}),m.select("rect").attr({width:t._width-2*D+In.scrollBarWidth+In.scrollBarMargin,height:t._effHeight-2*D,x:D,y:D+ve}),Mn.setClipUrl(_,i,e),De(ve,B,K),g.on("wheel",function(){ve=Tn.constrain(t._scrollY+lo.event.deltaY/V*j,0,j),De(ve,B,K),ve!==0&&ve!==j&&lo.event.preventDefault()});var xe,se,be,re=function(Te,Pe,Ne){var lr=(Ne-Pe)/K+Te;return Tn.constrain(lr,0,j)},ke=function(Te,Pe,Ne){var lr=(Pe-Ne)/K+Te;return Tn.constrain(lr,0,j)},ge=lo.behavior.drag().on("dragstart",function(){var Te=lo.event.sourceEvent;Te.type==="touchstart"?xe=Te.changedTouches[0].clientY:xe=Te.clientY,be=ve}).on("drag",function(){var Te=lo.event.sourceEvent;Te.buttons===2||Te.ctrlKey||(Te.type==="touchmove"?se=Te.changedTouches[0].clientY:se=Te.clientY,ve=re(be,xe,se),De(ve,B,K))});T.call(ge);var Ee=lo.behavior.drag().on("dragstart",function(){var Te=lo.event.sourceEvent;Te.type==="touchstart"&&(xe=Te.changedTouches[0].clientY,be=ve)}).on("drag",function(){var Te=lo.event.sourceEvent;Te.type==="touchmove"&&(se=Te.changedTouches[0].clientY,ve=ke(be,xe,se),De(ve,B,K))});_.call(Ee)}function De(Te,Pe,Ne){t._scrollY=e._fullLayout[n]._scrollY=Te,Mn.setTranslate(_,0,-Te),Mn.setRect(T,t._width,In.scrollBarMargin+Te*Ne,In.scrollBarWidth,Pe),m.select("rect").attr("y",D+Te)}if(e._context.edits.legendPosition){var Ce,Y,ae,Z;g.classed("cursor-move",!0),Iw.init({element:g.node(),gd:e,prepFn:function(Te){if(Te.target!==T.node()){var Pe=Mn.getTranslate(g);ae=Pe.x,Z=Pe.y}},moveFn:function(Te,Pe){if(ae!==void 0&&Z!==void 0){var Ne=ae+Te,lr=Z+Pe;Mn.setTranslate(g,Ne,lr),Ce=Iw.align(Ne,t._width,k.l,k.l+k.w,t.xanchor),Y=Iw.align(lr+t._height,-t._height,k.t+k.h,k.t,t.yanchor)}},doneFn:function(){if(Ce!==void 0&&Y!==void 0){var Te={};Te[n+".x"]=Ce,Te[n+".y"]=Y,I0.call("_guiRelayout",e,Te)}},clickFn:function(Te,Pe){var Ne=o.selectAll("g.traces").filter(function(){var lr=this.getBoundingClientRect();return Pe.clientX>=lr.left&&Pe.clientX<=lr.right&&Pe.clientY>=lr.top&&Pe.clientY<=lr.bottom});Ne.size()>0&&wF(e,g,Ne,Te,Pe)}})}}],e)}}function y2(e,r,t){var a=e[0],n=a.width,i=r.entrywidthmode,o=a.trace.legendwidth||r.entrywidth;return i==="fraction"?r._maxWidth*o:t+(o||n)}function wF(e,r,t,a,n){var i=t.data()[0][0].trace,o={event:n,node:t.node(),curveNumber:i.index,expandedIndex:i.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(o.group=i._group),I0.traceIs(i,"pie-like")&&(o.label=t.datum()[0].label);var l=dF.triggerHandler(e,"plotly_legendclick",o);if(a===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&pF(t,e,a)},e._context.doubleClickDelay)}else if(a===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var s=dF.triggerHandler(e,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&pF(t,e,a)}}function hce(e,r,t){var a=w2(t),n=e.data()[0][0],i=n.trace,o=I0.traceIs(i,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!o,s=t._maxNameLength,u,f;n.groupTitle?(u=n.groupTitle.text,f=n.groupTitle.font):(f=t.font,t.entries?u=n.text:(u=o?n.label:i.name,i._meta&&(u=Tn.templateString(u,i._meta))));var c=Tn.ensureSingle(e,"text",a+"text");c.attr("text-anchor","start").call(Mn.font,f).text(l?xF(u,s):u);var h=t.indentation+t.itemwidth+In.itemGap*2;Pc.positionText(c,h,0),l?c.call(Pc.makeEditable,{gd:r,text:u}).call(b2,e,r,t).on("edit",function(d){this.text(xF(d,s)).call(b2,e,r,t);var p=n.trace._fullInput||{},g={};return g.name=d,p._isShape?I0.call("_guiRelayout",r,"shapes["+i.index+"].name",g.name):I0.call("_guiRestyle",r,g,i.index)}):b2(c,e,r,t)}function xF(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var a=t-e.length;a>0;a--)e+=" ";return e}function dce(e,r,t){var a=r._context.doubleClickDelay,n,i=1,o=Tn.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(g2.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-r._legendMouseDownTimea&&(i=Math.max(i-1,1)),wF(r,l,e,i,lo.event)}}))}function b2(e,r,t,a,n){a._inHover&&e.attr("data-notex",!0),Pc.convertToTspans(e,t,function(){pce(r,t,a,n)})}function pce(e,r,t,a){var n=e.data()[0][0];if(!t._inHover&&n&&!n.trace.showlegend){e.remove();return}var i=e.select("g[class*=math-group]"),o=i.node(),l=w2(t);t||(t=r._fullLayout[l]);var s=t.borderwidth,u;a===P0?u=t.title.font:n.groupTitle?u=n.groupTitle.font:u=t.font;var f=u.size*_F,c,h;if(o){var d=Mn.bBox(o);c=d.height,h=d.width,a===P0?Mn.setTranslate(i,s,s+c*.75):Mn.setTranslate(i,0,c*.25)}else{var p="."+l+(a===P0?"title":"")+"text",g=e.select(p),m=Pc.lineCount(g),x=g.node();if(c=f*m,h=x?Mn.bBox(x).width:0,a===P0)t.title.side==="left"&&(h+=In.itemGap*2),Pc.positionText(g,s+In.titlePad,s+f);else{var _=In.itemGap*2+t.indentation+t.itemwidth;n.groupTitle&&(_=In.itemGap,h-=t.indentation+t.itemwidth),Pc.positionText(g,_,-f*((m-1)/2-.3))}}a===P0?(t._titleWidth=h,t._titleHeight=c):(n.lineHeight=f,n.height=Math.max(c,16)+3,n.width=h)}function mce(e){var r=0,t=0,a=e.title.side;return a&&(a.indexOf("left")!==-1&&(r=e._titleWidth),a.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function yce(e,r,t,a){var n=e._fullLayout,i=w2(a);a||(a=n[i]);var o=n._size,l=gF.isVertical(a),s=gF.isGrouped(a),u=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,h=In.itemGap,d=a.indentation+a.itemwidth+h*2,p=2*(f+h),g=_2(a),m=a.y<0||a.y===0&&g==="top",x=a.y>1||a.y===1&&g==="bottom",_=a.tracegroupgap,A={};a._maxHeight=Math.max(m||x?n.height/2:o.h,30);var b=0;a._width=0,a._height=0;var T=mce(a);if(l)t.each(function(be){var re=be[0].height;Mn.setTranslate(this,f+T[0],f+T[1]+a._height+re/2+h),a._height+=re,a._width=Math.max(a._width,be[0].width)}),b=d+a._width,a._width+=h+d+c,a._height+=p,s&&(r.each(function(be,re){Mn.setTranslate(this,0,re*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var S=x2(a),M=a.x<0||a.x===0&&S==="right",k=a.x>1||a.x===1&&S==="left",D=x||m,P=n.width/2;a._maxWidth=Math.max(M?D&&S==="left"?o.l+o.w:P:k?D&&S==="right"?o.r+o.w:P:o.w,2*d);var N=0,q=0;t.each(function(be){var re=y2(be,a,d);N=Math.max(N,re),q+=re}),b=null;var O=0;if(s){var U=0,$=0,W=0;r.each(function(){var be=0,re=0;lo.select(this).selectAll("g.traces").each(function(ge){var Ee=y2(ge,a,d),De=ge[0].height;Mn.setTranslate(this,T[0],T[1]+f+h+De/2+re),re+=De,be=Math.max(be,Ee),A[ge[0].trace.legendgroup]=be});var ke=be+h;$>0&&ke+f+$>a._maxWidth?(O=Math.max(O,$),$=0,W+=U+_,U=re):U=Math.max(U,re),Mn.setTranslate(this,$,W),$+=ke}),a._width=Math.max(O,$)+f,a._height=W+U+p}else{var H=t.size(),B=q+c+(H-1)*h=a._maxWidth&&(O=Math.max(O,ve),j=0,K+=V,a._height+=V,V=0),Mn.setTranslate(this,T[0]+f+j,T[1]+f+K+re/2+h),ve=j+ke+h,j+=ge,V=Math.max(V,re)}),B?(a._width=j+c,a._height=V+p):(a._width=Math.max(O,ve)+c,a._height+=V+p)}}a._width=Math.ceil(Math.max(a._width+T[0],a._titleWidth+2*(f+In.titlePad))),a._height=Math.ceil(Math.max(a._height+T[1],a._titleHeight+2*(f+In.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var xe=e._context.edits,se=xe.legendText||xe.legendPosition;t.each(function(be){var re=lo.select(this).select("."+i+"toggle"),ke=be[0].height,ge=be[0].trace.legendgroup,Ee=y2(be,a,d);s&&ge!==""&&(Ee=A[ge]);var De=se?d:b||Ee;!l&&!u&&(De+=h/2),Mn.setRect(re,0,-ke/2,De,ke)})}function gce(e,r,t,a){var n=e._fullLayout,i=n[r],o=x2(i),l=_2(i),s=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=i.y<.5?"b":"t",c=i.x<.5?"l":"r",h={r:n.width-t,l:t+i._width,b:n.height-a,t:a+i._effHeight};if(s&&u)return Ow.autoMargin(e,r,{x:i.x,y:i.y,l:i._width*N0[o],r:i._width*mF[o],b:i._effHeight*mF[l],t:i._effHeight*N0[l]});s?e._fullLayout._reservedMargin[r][f]=h[f]:u||i.orientation==="v"?e._fullLayout._reservedMargin[r][c]=h[c]:e._fullLayout._reservedMargin[r][f]=h[f]}function x2(e){return Tn.isRightAnchor(e)?"right":Tn.isCenterAnchor(e)?"center":"left"}function _2(e){return Tn.isBottomAnchor(e)?"bottom":Tn.isMiddleAnchor(e)?"middle":"top"}function w2(e){return e._id||"legend"}});var Vw=R(Hw=>{"use strict";var Nc=ta(),Zs=ia(),TF=vl(),ln=fr(),bce=ln.pushUnique,Uw=ln.strTranslate,xce=ln.strRotate,_ce=u1(),Ho=Ci(),wce=Wq(),os=Ca(),Zn=Qt(),A2=xl(),ls=Va(),Ace=ai().zindexSeparator,z0=Ct(),_l=js(),Ic=Qd(),Tce=kw(),Mce=Bw(),qF=Ic.YANGLE,Gw=Math.PI*qF/180,Sce=1/Math.sin(Gw),kce=Math.cos(Gw),Cce=Math.sin(Gw),Wa=Ic.HOVERARROWSIZE,Kt=Ic.HOVERTEXTPAD,MF={box:!0,ohlc:!0,violin:!0,candlestick:!0},Ece={scatter:!0,scattergl:!0,splom:!0};function SF(e,r){return e.distance-r.distance}Hw.hover=function(r,t,a,n){r=ln.getGraphDiv(r);var i=t.target;ln.throttle(r._fullLayout._uid+Ic.HOVERID,Ic.HOVERMINTIME,function(){Lce(r,t,a,n,i)})};Hw.loneHover=function(r,t){var a=!0;Array.isArray(r)||(a=!1,r=[r]);var n=t.gd,i=IF(n),o=OF(n),l=r.map(function(m){var x=m._x0||m.x0||m.x||0,_=m._x1||m.x1||m.x||0,A=m._y0||m.y0||m.y||0,b=m._y1||m.y1||m.y||0,T=m.eventData;if(T){var S=Math.min(x,_),M=Math.max(x,_),k=Math.min(A,b),D=Math.max(A,b),P=m.trace;if(z0.traceIs(P,"gl3d")){var N=n._fullLayout[P.scene]._scene.container,q=N.offsetLeft,O=N.offsetTop;S+=q,M+=q,k+=O,D+=O}T.bbox={x0:S+o,x1:M+o,y0:k+i,y1:D+i},t.inOut_bbox&&t.inOut_bbox.push(T.bbox)}else T=!1;return{color:m.color||Zn.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:T}}),s=!1,u=RF(l,{gd:n,hovermode:"closest",rotateLabels:s,bgColor:t.bgColor||Zn.background,container:Nc.select(t.container),outerContainer:t.outerContainer||t.container}),f=u.hoverLabels,c=5,h=0,d=0;f.sort(function(m,x){return m.y0-x.y0}).each(function(m,x){var _=m.y0-m.by/2;_-cM[0]._length||Z<0||Z>k[0]._length)return A2.unhoverRaw(e,r)}if(r.pointerX=ae+M[0]._offset,r.pointerY=Z+k[0]._offset,"xval"in r?W=_l.flat(i,r.xval):W=_l.p2c(M,ae),"yval"in r?H=_l.flat(i,r.yval):H=_l.p2c(k,Z),!Zs(W[0])||!Zs(H[0]))return ln.warn("Fx.hover failed",r,e),A2.unhoverRaw(e,r)}var Ne=1/0;function lr(_t,Ma){for(V=0;V<$.length;V++)if(j=$[V],!(!j||!j[0]||!j[0].trace)&&(K=j[0].trace,!(K.visible!==!0||K._length===0)&&["carpet","contourcarpet"].indexOf(K._module.name)===-1)){if(se=h,_l.isUnifiedHover(se)&&(se=se.charAt(0)),K.type==="splom"?(xe=0,ve=i[xe]):(ve=_l.getSubplot(K),xe=i.indexOf(ve)),ke={cd:j,trace:K,xa:M[xe],ya:k[xe],maxHoverDistance:q,maxSpikeDistance:O,index:!1,distance:Math.min(Ne,q),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:Zn.defaultLine,name:K.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},l[ve]&&(ke.subplot=l[ve]._subplot),l._splomScenes&&l._splomScenes[K.uid]&&(ke.scene=l._splomScenes[K.uid]),se==="array"){var ra=r[V];"pointNumber"in ra?(ke.index=ra.pointNumber,se="closest"):(se="","xval"in ra&&(be=ra.xval,se="x"),"yval"in ra&&(re=ra.yval,se=se?"closest":"y"))}else _t!==void 0&&Ma!==void 0?(be=_t,re=Ma):(be=W[xe],re=H[xe]);if(ge=U.length,q!==0)if(K._module&&K._module.hoverPoints){var Pa=K._module.hoverPoints(ke,be,re,se,{finiteRange:!0,hoverLayer:l._hoverlayer,hoversubplots:s,gd:e});if(Pa)for(var Xa,Sa=0;Sage&&(U.splice(0,ge),Ne=U[0].distance),c&&O!==0&&U.length===0){ke.distance=O,ke.index=!1;var La=K._module.hoverPoints(ke,be,re,"closest",{hoverLayer:l._hoverlayer});if(La&&(La=La.filter(function(Aa){return Aa.spikeDistance<=O})),La&&La.length){var en,on=La.filter(function(Aa){return Aa.xa.showspikes&&Aa.xa.spikesnap!=="hovered data"});if(on.length){var Yi=on[0];Zs(Yi.x0)&&Zs(Yi.y0)&&(en=Je(Yi),(!Ee.vLinePoint||Ee.vLinePoint.spikeDistance>en.spikeDistance)&&(Ee.vLinePoint=en))}var Wi=La.filter(function(Aa){return Aa.ya.showspikes&&Aa.ya.spikesnap!=="hovered data"});if(Wi.length){var xn=Wi[0];Zs(xn.x0)&&Zs(xn.y0)&&(en=Je(xn),(!Ee.hLinePoint||Ee.hLinePoint.spikeDistance>en.spikeDistance)&&(Ee.hLinePoint=en))}}}}}lr();function Ke(_t,Ma,ra){for(var Pa=null,Xa=1/0,Sa,La=0;La<_t.length;La++)g&&g._id!==_t[La].xa._id||m&&m._id!==_t[La].ya._id||(Sa=_t[La].spikeDistance,ra&&La===0&&(Sa=-1/0),Sa<=Xa&&Sa<=Ma&&(Pa=_t[La],Xa=Sa));return Pa}function Je(_t){return _t?{xa:_t.xa,ya:_t.ya,x:_t.xSpike!==void 0?_t.xSpike:(_t.x0+_t.x1)/2,y:_t.ySpike!==void 0?_t.ySpike:(_t.y0+_t.y1)/2,distance:_t.distance,spikeDistance:_t.spikeDistance,curveNumber:_t.trace.index,color:_t.color,pointNumber:_t.index}:null}var or={fullLayout:l,container:l._hoverlayer,event:r},yr=e._spikepoints,ir={vLinePoint:Ee.vLinePoint,hLinePoint:Ee.hLinePoint};e._spikepoints=ir;var Xe=function(){var _t=U.filter(function(ra){return g&&g._id===ra.xa._id&&m&&m._id===ra.ya._id}),Ma=U.filter(function(ra){return!(g&&g._id===ra.xa._id&&m&&m._id===ra.ya._id)});_t.sort(SF),Ma.sort(SF),U=_t.concat(Ma),U=Nce(U,h)};Xe();var Lr=h.charAt(0),Ar=(Lr==="x"||Lr==="y")&&U[0]&&Ece[U[0].trace.type];if(c&&O!==0&&U.length!==0){var de=U.filter(function(_t){return _t.ya.showspikes}),Oe=Ke(de,O,Ar);Ee.hLinePoint=Je(Oe);var Ue=U.filter(function(_t){return _t.xa.showspikes}),rt=Ke(Ue,O,Ar);Ee.vLinePoint=Je(rt)}if(U.length===0){var Ur=A2.unhoverRaw(e,r);return c&&(Ee.hLinePoint!==null||Ee.vLinePoint!==null)&&EF(yr)&&CF(e,Ee,or),Ur}if(c&&EF(yr)&&CF(e,Ee,or),_l.isXYhover(se)&&U[0].length!==0&&U[0].trace.type!=="splom"){var Ye=U[0];MF[Ye.trace.type]?U=U.filter(function(_t){return _t.trace.index===Ye.trace.index}):U=[Ye];var Ve=U.length,pr=DF("x",Ye,l),Tr=DF("y",Ye,l);lr(pr,Tr);var mr=[],vr={},Cr=0,Ir=function(_t){var Ma=MF[_t.trace.type]?FF(_t):_t.trace.index;if(!vr[Ma])Cr++,vr[Ma]=Cr,mr.push(_t);else{var ra=vr[Ma]-1,Pa=mr[ra];ra>0&&Math.abs(_t.distance)Ve-1;Gr--)Ir(U[Gr]);U=mr,Xe()}var Ze=e._hoverdata,oe=[],ye=IF(e),Ge=OF(e);for(B=0;B1||U.length>1)||h==="closest"&&De&&U.length>1,Vi=Zn.combine(l.plot_bgcolor||Zn.background,l.paper_bgcolor),Bn=RF(U,{gd:e,hovermode:h,rotateLabels:Dn,bgColor:Vi,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),qn=Bn.hoverLabels;if(_l.isUnifiedHover(h)||(qce(qn,Dn,l,Bn.commonLabelBoundingBox),NF(qn,Dn,l._invScaleX,l._invScaleY)),n&&n.tagName){var yi=z0.getComponentMethod("annotations","hasClickToShow")(e,oe);wce(Nc.select(n),yi?"pointer":"")}!n||a||!Pce(e,r,Ze)||(Ze&&e.emit("plotly_unhover",{event:r,points:Ze}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:M,yaxes:k,xvals:W,yvals:H}))}function FF(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 Dce=/([\s\S]*)<\/extra>/;function RF(e,r){var t=r.gd,a=t._fullLayout,n=r.hovermode,i=r.rotateLabels,o=r.bgColor,l=r.container,s=r.outerContainer,u=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||Ic.HOVERFONT,c=r.fontSize||Ic.HOVERFONTSIZE,h=r.fontWeight||a.font.weight,d=r.fontStyle||a.font.style,p=r.fontVariant||a.font.variant,g=r.fontTextcase||a.font.textcase,m=r.fontLineposition||a.font.lineposition,x=r.fontShadow||a.font.shadow,_=e[0],A=_.xa,b=_.ya,T=n.charAt(0),S=T+"Label",M=_[S];if(M===void 0&&A.type==="multicategory")for(var k=0;ka.width-Ze&&(oe=a.width-Ze),rt.attr("d","M"+(Cr-oe)+",0L"+(Cr-oe+Wa)+","+Gr+Wa+"H"+Ze+"v"+Gr+(Kt*2+vr.height)+"H"+-Ze+"V"+Gr+Wa+"H"+(Cr-oe-Wa)+"Z"),Cr=oe,V.minX=Cr-Ze,V.maxX=Cr+Ze,A.side==="top"?(V.minY=Ir-(Kt*2+vr.height),V.maxY=Ir-Kt):(V.minY=Ir+Kt,V.maxY=Ir+(Kt*2+vr.height))}else{var ye,Ge,Ie;b.side==="right"?(ye="start",Ge=1,Ie="",Cr=A._offset+A._length):(ye="end",Ge=-1,Ie="-",Cr=A._offset),Ir=b._offset+(_.y0+_.y1)/2,Ur.attr("text-anchor",ye),rt.attr("d","M0,0L"+Ie+Wa+","+Wa+"V"+(Kt+vr.height/2)+"h"+Ie+(Kt*2+vr.width)+"V-"+(Kt+vr.height/2)+"H"+Ie+Wa+"V-"+Wa+"Z"),V.minY=Ir-(Kt+vr.height/2),V.maxY=Ir+(Kt+vr.height/2),b.side==="right"?(V.minX=Cr+Wa,V.maxX=Cr+Wa+(Kt*2+vr.width)):(V.minX=Cr-Wa-(Kt*2+vr.width),V.maxX=Cr-Wa);var Wr=vr.height/2,tt=P-vr.top-Wr,$r="clip"+a._uid+"commonlabel"+b._id,St;if(Cr=0?Ar=yr:ir+Z=0?Ar=ir:Xe+Z=0?de=Je:or+Te=0?de=or:Lr+Te=0,(Ue.idealAlign==="top"||!aa)&&Qa?(Ie-=tt/2,Ue.anchor="end"):aa?(Ie+=tt/2,Ue.anchor="start"):Ue.anchor="middle",Ue.crossPos=Ie;else{if(Ue.pos=Ie,aa=Ge+Wr/2+ma<=N,Qa=Ge-Wr/2-ma>=0,(Ue.idealAlign==="left"||!aa)&&Qa)Ge-=Wr/2,Ue.anchor="end";else if(aa)Ge+=Wr/2,Ue.anchor="start";else{Ue.anchor="middle";var Ln=ma/2,si=Ge+Ln-N,Dn=Ge-Ln;si>0&&(Ge-=si),Dn<0&&(Ge+=-Dn)}Ue.crossPos=Ge}Ir.attr("text-anchor",Ue.anchor),Ze&&Gr.attr("text-anchor",Ue.anchor),rt.attr("transform",Uw(Ge,Ie)+(i?xce(qF):""))}),{hoverLabels:Oe,commonLabelBoundingBox:V}}function kF(e,r,t,a,n,i){var o="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=ln.templateString(e.name,e.trace._meta)),o=LF(e.name,e.nameLength));var s=t.charAt(0),u=s==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[s+"Label"]===n?l=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),i&&l===""&&!e.hovertemplate&&(o===""&&i.remove(),l=o);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[s+"Label"]!==n&&(c[s+"other"]=c[s+"Val"],c[s+"otherLabel"]=c[s+"Label"]),l=ln.hovertemplateString(f,c,a._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(Dce,function(h,d){return o=LF(d,e.nameLength),""})}return[l,o]}function qce(e,r,t,a){var n=r?"xa":"ya",i=r?"ya":"xa",o=0,l=1,s=e.size(),u=new Array(s),f=0,c=a.minX,h=a.maxX,d=a.minY,p=a.maxY,g=function(W){return W*t._invScaleX},m=function(W){return W*t._invScaleY};e.each(function(W){var H=W[n],B=W[i],V=H._id.charAt(0)==="x",j=H.range;f===0&&j&&j[0]>j[1]!==V&&(l=-1);var K=0,ve=V?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var xe=PF(W,r),se=W.anchor,be=se==="end"?-1:1,re,ke;if(se==="middle")re=W.crossPos+(V?m(xe.y-W.by/2):g(W.bx/2+W.tx2width/2)),ke=re+(V?m(W.by):g(W.bx));else if(V)re=W.crossPos+m(Wa+xe.y)-m(W.by/2-Wa),ke=re+m(W.by);else{var ge=g(be*Wa+xe.x),Ee=ge+g(be*W.bx);re=W.crossPos+Math.min(ge,Ee),ke=W.crossPos+Math.max(ge,Ee)}V?d!==void 0&&p!==void 0&&Math.min(ke,p)-Math.max(re,d)>1&&(B.side==="left"?(K=B._mainLinePosition,ve=t.width):ve=B._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ke,h)-Math.max(re,c)>1&&(B.side==="top"?(K=B._mainLinePosition,ve=t.height):ve=B._mainLinePosition)}u[f++]=[{datum:W,traceIndex:W.trace.index,dp:0,pos:W.pos,posref:W.posref,size:W.by*(V?Sce:1)/2,pmin:K,pmax:ve}]}),u.sort(function(W,H){return W[0].posref-H[0].posref||l*(H[0].traceIndex-W[0].traceIndex)});var x,_,A,b,T,S,M;function k(W){var H=W[0],B=W[W.length-1];if(_=H.pmin-H.pos-H.dp+H.size,A=B.pos+B.dp+B.size-H.pmax,_>.01){for(T=W.length-1;T>=0;T--)W[T].dp+=_;x=!1}if(!(A<.01)){if(_<-.01){for(T=W.length-1;T>=0;T--)W[T].dp-=A;x=!1}if(x){var V=0;for(b=0;bH.pmax&&V++;for(b=W.length-1;b>=0&&!(V<=0);b--)S=W[b],S.pos>H.pmax-1&&(S.del=!0,V--);for(b=0;b=0;T--)W[T].dp-=A;for(b=W.length-1;b>=0&&!(V<=0);b--)S=W[b],S.pos+S.dp+S.size>H.pmax&&(S.del=!0,V--)}}}for(;!x&&o<=s;){for(o++,x=!0,b=0;b.01){for(T=P.length-1;T>=0;T--)P[T].dp+=_;for(D.push.apply(D,P),u.splice(b+1,1),M=0,T=D.length-1;T>=0;T--)M+=D[T].dp;for(A=M/D.length,T=D.length-1;T>=0;T--)D[T].dp-=A;x=!1}else b++}u.forEach(k)}for(b=u.length-1;b>=0;b--){var O=u[b];for(T=O.length-1;T>=0;T--){var U=O[T],$=U.datum;$.offset=U.dp,$.del=U.del}}}function PF(e,r){var t=0,a=e.offset;return r&&(a*=-Cce,t=e.offset*kce),{x:t,y:a}}function Fce(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Wa+Kt),a=t+r*(e.txwidth+Kt),n=e.anchor==="middle";return n&&(t-=e.tx2width/2,a+=e.txwidth/2+Kt),{alignShift:r,textShiftX:t,text2ShiftX:a}}function NF(e,r,t,a){var n=function(o){return o*t},i=function(o){return o*a};e.each(function(o){var l=Nc.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),u=o.anchor,f=u==="end"?-1:1,c=Fce(o),h=PF(o,r),d=h.x,p=h.y,g=u==="middle";l.select("path").attr("d",g?"M-"+n(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+n(o.bx)+"v"+i(o.by)+"h-"+n(o.bx)+"Z":"M0,0L"+n(f*Wa+d)+","+i(Wa+p)+"v"+i(o.by/2-Wa)+"h"+n(f*o.bx)+"v-"+i(o.by)+"H"+n(f*Wa+d)+"V"+i(p-Wa)+"Z");var m=d+c.textShiftX,x=p+o.ty0-o.by/2+Kt,_=o.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(s.attr("text-anchor","start"),m=g?-o.bx/2-o.tx2width/2+Kt:-o.bx-Kt):_==="right"&&u!=="end"&&(s.attr("text-anchor","end"),m=g?o.bx/2-o.tx2width/2-Kt:o.bx+Kt)),s.call(Ho.positionText,n(m),i(x)),o.tx2width&&(l.select("text.name").call(Ho.positionText,n(c.text2ShiftX+c.alignShift*Kt+d),i(p+o.ty0-o.by/2+Kt)),l.select("rect").call(os.setRect,n(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),i(p-o.by/2-1),n(o.tx2width),i(o.by+2)))})}function Rce(e,r){var t=e.index,a=e.trace||{},n=e.cd[0],i=e.cd[t]||{};function o(h){return h||Zs(h)&&h===0}var l=Array.isArray(t)?function(h,d){var p=ln.castOption(n,t,h);return o(p)?p:ln.extractOption({},a,"",d)}:function(h,d){return ln.extractOption(i,a,h,d)};function s(h,d,p){var g=l(d,p);o(g)&&(e[h]=g)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&a.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=ln.constrain(e.x0,0,e.xa._length),e.x1=ln.constrain(e.x1,0,e.xa._length),e.y0=ln.constrain(e.y0,0,e.ya._length),e.y1=ln.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:ls.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:ls.hoverLabelText(e.ya,e.yLabelVal,a.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=ls.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+ls.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=ls.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+ls.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function CF(e,r,t){var a=t.container,n=t.fullLayout,i=n._size,o=t.event,l=!!r.hLinePoint,s=!!r.vLinePoint,u,f;if(a.selectAll(".spikeline").remove(),!!(s||l)){var c=Zn.combine(n.plot_bgcolor,n.paper_bgcolor);if(l){var h=r.hLinePoint,d,p;u=h&&h.xa,f=h&&h.ya;var g=f.spikesnap;g==="cursor"?(d=o.pointerX,p=o.pointerY):(d=u._offset+h.x,p=f._offset+h.y);var m=TF.readability(h.color,c)<1.5?Zn.contrast(c):h.color,x=f.spikemode,_=f.spikethickness,A=f.spikecolor||m,b=ls.getPxPosition(e,f),T,S;if(x.indexOf("toaxis")!==-1||x.indexOf("across")!==-1){if(x.indexOf("toaxis")!==-1&&(T=b,S=d),x.indexOf("across")!==-1){var M=f._counterDomainMin,k=f._counterDomainMax;f.anchor==="free"&&(M=Math.min(M,f.position),k=Math.max(k,f.position)),T=i.l+M*i.w,S=i.l+k*i.w}a.insert("line",":first-child").attr({x1:T,x2:S,y1:p,y2:p,"stroke-width":_,stroke:A,"stroke-dasharray":os.dashStyle(f.spikedash,_)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:T,x2:S,y1:p,y2:p,"stroke-width":_+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}x.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:b+(f.side!=="right"?_:-_),cy:p,r:_,fill:A}).classed("spikeline",!0)}if(s){var D=r.vLinePoint,P,N;u=D&&D.xa,f=D&&D.ya;var q=u.spikesnap;q==="cursor"?(P=o.pointerX,N=o.pointerY):(P=u._offset+D.x,N=f._offset+D.y);var O=TF.readability(D.color,c)<1.5?Zn.contrast(c):D.color,U=u.spikemode,$=u.spikethickness,W=u.spikecolor||O,H=ls.getPxPosition(e,u),B,V;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(B=H,V=N),U.indexOf("across")!==-1){var j=u._counterDomainMin,K=u._counterDomainMax;u.anchor==="free"&&(j=Math.min(j,u.position),K=Math.max(K,u.position)),B=i.t+(1-K)*i.h,V=i.t+(1-j)*i.h}a.insert("line",":first-child").attr({x1:P,x2:P,y1:B,y2:V,"stroke-width":$,stroke:W,"stroke-dasharray":os.dashStyle(u.spikedash,$)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:P,x2:P,y1:B,y2:V,"stroke-width":$+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:P,cy:H-(u.side!=="top"?$:-$),r:$,fill:W}).classed("spikeline",!0)}}}function Pce(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var a=t.length-1;a>=0;a--){var n=t[a],i=e._hoverdata[a];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers))return!0}return!1}function EF(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function LF(e,r){return Ho.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Nce(e,r){for(var t=r.charAt(0),a=[],n=[],i=[],o=0;o{"use strict";var Ice=fr(),Oce=Qt(),zce=js().isUnifiedHover;zF.exports=function(r,t,a,n){n=n||{};var i=t.legend;function o(l){n.font[l]||(n.font[l]=i?t.legend.font[l]:t.font[l])}t&&zce(t.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(n.bgcolor||(n.bgcolor=Oce.combine(t.legend.bgcolor,t.paper_bgcolor)),n.bordercolor||(n.bordercolor=t.legend.bordercolor)):n.bgcolor||(n.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",n.bgcolor),a("hoverlabel.bordercolor",n.bordercolor),a("hoverlabel.namelength",n.namelength),Ice.coerceFont(a,"hoverlabel.font",n.font),a("hoverlabel.align",n.align)}});var UF=R((zCe,BF)=>{"use strict";var Bce=fr(),Uce=T2(),Gce=r0();BF.exports=function(r,t){function a(n,i){return Bce.coerce(r,t,Gce,n,i)}Uce(r,t,a)}});var VF=R((BCe,HF)=>{"use strict";var GF=fr(),Hce=Xy(),Vce=T2();HF.exports=function(r,t,a,n){function i(l,s){return GF.coerce(r,t,Hce,l,s)}var o=GF.extendFlat({},n.hoverlabel);t.hovertemplate&&(o.namelength=-1),Vce(r,t,i,o)}});var Yw=R((UCe,YF)=>{"use strict";var Yce=fr(),Wce=r0();YF.exports=function(r,t){function a(n,i){return t[n]!==void 0?t[n]:Yce.coerce(r,t,Wce,n,i)}return a("clickmode"),a("hoversubplots"),a("hovermode")}});var XF=R((GCe,jF)=>{"use strict";var WF=fr(),jce=r0(),Xce=Yw(),Zce=T2();jF.exports=function(r,t){function a(f,c){return WF.coerce(r,t,jce,f,c)}var n=Xce(r,t);n&&(a("hoverdistance"),a("spikedistance"));var i=a("dragmode");i==="select"&&a("selectdirection");var o=t._has("mapbox"),l=t._has("map"),s=t._has("geo"),u=t._basePlotModules.length;t.dragmode==="zoom"&&((o||l||s)&&u===1||(o||l)&&s&&u===2)&&(t.dragmode="pan"),Zce(r,t,a),WF.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var $F=R((HCe,JF)=>{"use strict";var Ww=fr(),ZF=Ct();JF.exports=function(r){var t=r.calcdata,a=r._fullLayout;function n(u){return function(f){return Ww.coerceHoverinfo({hoverinfo:f},{_module:u._module},a)}}for(var i=0;i{"use strict";var $ce=Ct(),Kce=Vw().hover;KF.exports=function(r,t,a){var n=$ce.getComponentMethod("annotations","onClick")(r,r._hoverdata);a!==void 0&&Kce(r,t,a,!0);function i(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(n&&n.then?n.then(i):i(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var rf=R((YCe,tR)=>{"use strict";var Qce=ta(),M2=fr(),eve=xl(),L1=js(),eR=r0(),rR=Vw();tR.exports={moduleType:"component",name:"fx",constants:Qd(),schema:{layout:eR},attributes:Xy(),layoutAttributes:eR,supplyLayoutGlobalDefaults:UF(),supplyDefaults:VF(),supplyLayoutDefaults:XF(),calc:$F(),getDistanceFunction:L1.getDistanceFunction,getClosest:L1.getClosest,inbox:L1.inbox,quadrature:L1.quadrature,appendArrayPointValue:L1.appendArrayPointValue,castHoverOption:tve,castHoverinfo:ave,hover:rR.hover,unhover:eve.unhover,loneHover:rR.loneHover,loneUnhover:rve,click:QF()};function rve(e){var r=M2.isD3Selection(e)?e:Qce.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function tve(e,r,t){return M2.castOption(e,r,"hoverlabel."+t)}function ave(e,r,t){function a(n){return M2.coerceHoverinfo({hoverinfo:n},{_module:e._module},r)}return M2.castOption(e,t,"hoverinfo",a)}});var tf=R(Js=>{"use strict";Js.selectMode=function(e){return e==="lasso"||e==="select"};Js.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Js.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Js.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Js.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Js.selectingOrDrawing=function(e){return Js.freeMode(e)||Js.rectMode(e)}});var S2=R((jCe,aR)=>{"use strict";aR.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})}});var k2=R((XCe,nR)=>{"use strict";nR.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 E2=R((ZCe,iR)=>{"use strict";var C2=32;iR.exports={CIRCLE_SIDES:C2,i000:0,i090:C2/4,i180:C2/2,i270:C2/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var L2=R((JCe,lR)=>{"use strict";var nve=fr().strTranslate;function oR(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function ive(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function ove(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return oR(e,t[r])}}function lve(e){return nve(e.xaxis._offset,e.yaxis._offset)}lR.exports={p2r:oR,r2p:ive,axValue:ove,getTransform:lve}});var af=R($s=>{"use strict";var sve=y1(),fR=E2(),B0=fR.CIRCLE_SIDES,jw=fR.SQRT2,cR=L2(),sR=cR.p2r,uR=cR.r2p,uve=[0,3,4,5,6,1,2],fve=[0,3,4,1,2];$s.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",a=0;a0&&s{"use strict";var mR=tf(),cve=mR.drawMode,vve=mR.openMode,U0=E2(),vR=U0.i000,hR=U0.i090,dR=U0.i180,pR=U0.i270,hve=U0.cos45,dve=U0.sin45,yR=L2(),q2=yR.p2r,nf=yR.r2p,pve=Wu(),mve=pve.clearOutline,F2=af(),yve=F2.readPaths,gve=F2.writePaths,bve=F2.ellipseOver,xve=F2.fixDatesForPaths;function _ve(e,r){if(e.length){var t=e[0][0];if(t){var a=r.gd,n=r.isActiveShape,i=r.dragmode,o=(a.layout||{}).shapes||[];if(!cve(i)&&n!==void 0){var l=a._fullLayout._activeShapeIndex;if(l{"use strict";var wve=tf(),Ave=wve.selectMode,Tve=Wu(),Mve=Tve.clearOutline,Xw=af(),Sve=Xw.readPaths,kve=Xw.writePaths,Cve=Xw.fixDatesForPaths;xR.exports=function(r,t){if(r.length){var a=r[0][0];if(a){var n=a.getAttribute("d"),i=t.gd,o=i._fullLayout.newselection,l=t.plotinfo,s=l.xaxis,u=l.yaxis,f=t.isActiveSelection,c=t.dragmode,h=(i.layout||{}).selections||[];if(!Ave(c)&&f!==void 0){var d=i._fullLayout._activeSelectionIndex;if(d{"use strict";_R.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 of=R(ii=>{"use strict";var Oc=q1(),wR=fr(),P2=Va();ii.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};ii.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};ii.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};ii.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};ii.extractPathCoords=function(e,r,t){var a=[],n=e.match(Oc.segmentRE);return n.forEach(function(i){var o=r[i.charAt(0)].drawn;if(o!==void 0){var l=i.substr(1).match(Oc.paramRE);if(!(!l||l.lengthd&&(g="X"),g});return u>d&&(p=p.replace(/[\s,]*X.*/,""),wR.log("Ignoring extra params in segment "+s)),f+p})}function F1(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var $w=R((tEe,SR)=>{"use strict";var Lve=fr(),G0=Va(),AR=Ci(),TR=Ca(),Dve=af().readPaths,Jw=of(),qve=Jw.getPathString,MR=ag(),Fve=ki().FROM_TL;SR.exports=function(r,t,a,n){if(n.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var i;if(a.label.texttemplate){var o={};if(a.type!=="path"){var l=G0.getFromId(r,a.xref),s=G0.getFromId(r,a.yref);for(var u in MR){var f=MR[u](a,l,s);f!==void 0&&(o[u]=f)}}i=Lve.texttemplateStringForShapes(a.label.texttemplate,{},r._fullLayout._d3locale,o)}else i=a.label.text;var c={"data-index":t},h=a.label.font,d={"data-notex":1},p=n.append("g").attr(c).classed("shape-label",!0),g=p.append("text").attr(d).classed("shape-label-text",!0).text(i),m,x,_,A;if(a.path){var b=qve(r,a),T=Dve(b,r);m=1/0,_=1/0,x=-1/0,A=-1/0;for(var S=0;S=e?n=r-a:n=a-r,-180/Math.PI*Math.atan2(n,i)}function Pve(e,r,t,a,n,i,o){var l=n.label.textposition,s=n.label.textangle,u=n.label.padding,f=n.type,c=Math.PI/180*i,h=Math.sin(c),d=Math.cos(c),p=n.label.xanchor,g=n.label.yanchor,m,x,_,A;if(f==="line"){l==="start"?(m=e,x=r):l==="end"?(m=t,x=a):(m=(e+t)/2,x=(r+a)/2),p==="auto"&&(l==="start"?s==="auto"?t>e?p="left":te?p="right":te?p="right":te?p="left":t{"use strict";var Nve=fr(),Ive=Nve.strTranslate,kR=xl(),LR=tf(),Ove=LR.drawMode,DR=LR.selectMode,qR=Ct(),CR=Qt(),I2=E2(),zve=I2.i000,Bve=I2.i090,Uve=I2.i180,Gve=I2.i270,Hve=Wu(),FR=Hve.clearOutlineControllers,Qw=af(),N2=Qw.pointsOnRectangle,Kw=Qw.pointsOnEllipse,Vve=Qw.writePaths,Yve=R2().newShapes,Wve=R2().createShapeObj,jve=Zw(),Xve=$w();RR.exports=function e(r,t,a,n){n||(n=0);var i=a.gd;function o(){e(r,t,a,n++),(Kw(r[0])||a.hasText)&&l({redrawing:!0})}function l(H){var B={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,B=Yve(t,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,B=jve(t,a),i._fullLayout._reselect=!0),Object.keys(B).length&&qR.call((H||{}).redrawing?"relayout":"_guiRelayout",i,B)}var s=i._fullLayout,u=s._zoomlayer,f=a.dragmode,c=Ove(f),h=DR(f);(c||h)&&(i._fullLayout._outlining=!0),FR(i),t.attr("d",Vve(r));var d,p,g,m,x;if(!n&&(a.isActiveShape||a.isActiveSelection)){x=Zve([],r);var _=u.append("g").attr("class","outline-controllers");P(_),W()}if(c&&a.hasText){var A=u.select(".label-temp"),b=Wve(t,a,a.dragmode);Xve(i,"label-temp",b,A)}function T(H){g=+H.srcElement.getAttribute("data-i"),m=+H.srcElement.getAttribute("data-j"),d[g][m].moveFn=S}function S(H,B){if(r.length){var V=x[g][m][1],j=x[g][m][2],K=r[g],ve=K.length;if(N2(K)){var xe=H,se=B;if(a.isActiveSelection){var be=ER(K,m);be[1]===K[m][1]?se=0:xe=0}for(var re=0;re1&&!(H.length===2&&H[1][0]==="Z")&&(m===0&&(H[0][0]="M"),r[g]=H,o(),l())}}function D(H,B){if(H===2){g=+B.srcElement.getAttribute("data-i"),m=+B.srcElement.getAttribute("data-j");var V=r[g];!N2(V)&&!Kw(V)&&k()}}function P(H){d=[];for(var B=0;B{"use strict";var $ve=ta(),BR=Ct(),PR=fr(),H0=Va(),Kve=af().readPaths,Qve=O2(),B2=$w(),UR=Wu().clearOutlineControllers,e6=Qt(),t6=Ca(),e0e=Da().arrayEditor,NR=xl(),IR=ef(),zc=q1(),so=of(),r6=so.getPathString;VR.exports={draw:a6,drawOne:GR,eraseActiveShape:a0e,drawLabel:B2};function a6(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var a=r._plots[t].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var n=0;no&&yr>l&&!Ke.shiftKey?NR.getCursor(ir/or,1-Xe/yr):"move";IR(r,Lr),ke=Lr.split("-")[0]}}function Ce(Ke){z2(e)||(s&&(x=K(t.xanchor)),u&&(_=ve(t.yanchor)),t.type==="path"?N=t.path:(d=s?t.x0:K(t.x0),p=u?t.y0:ve(t.y0),g=s?t.x1:K(t.x1),m=u?t.y1:ve(t.y1)),dm?(A=p,M="y0",b=m,k="y1"):(A=m,M="y1",b=p,k="y0"),De(Ke),Pe(n,t),lr(r,t,e),re.moveFn=ke==="move"?Z:Te,re.altKey=Ke.altKey)}function Y(){z2(e)||(IR(r),Ne(n),HR(r,e,t),BR.call("_guiRelayout",e,i.getUpdateObj()))}function ae(){z2(e)||Ne(n)}function Z(Ke,Je){if(t.type==="path"){var or=function(Xe){return Xe},yr=or,ir=or;s?h("xanchor",t.xanchor=xe(x+Ke)):(yr=function(Lr){return xe(K(Lr)+Ke)},O&&O.type==="date"&&(yr=so.encodeDate(yr))),u?h("yanchor",t.yanchor=se(_+Je)):(ir=function(Lr){return se(ve(Lr)+Je)},$&&$.type==="date"&&(ir=so.encodeDate(ir))),h("path",t.path=OR(N,yr,ir))}else s?h("xanchor",t.xanchor=xe(x+Ke)):(h("x0",t.x0=xe(d+Ke)),h("x1",t.x1=xe(g+Ke))),u?h("yanchor",t.yanchor=se(_+Je)):(h("y0",t.y0=se(p+Je)),h("y1",t.y1=se(m+Je)));r.attr("d",r6(e,t)),Pe(n,t),B2(e,a,t,q)}function Te(Ke,Je){if(c){var or=function(vr){return vr},yr=or,ir=or;s?h("xanchor",t.xanchor=xe(x+Ke)):(yr=function(Cr){return xe(K(Cr)+Ke)},O&&O.type==="date"&&(yr=so.encodeDate(yr))),u?h("yanchor",t.yanchor=se(_+Je)):(ir=function(Cr){return se(ve(Cr)+Je)},$&&$.type==="date"&&(ir=so.encodeDate(ir))),h("path",t.path=OR(N,yr,ir))}else if(f){if(ke==="resize-over-start-point"){var Xe=d+Ke,Lr=u?p-Je:p+Je;h("x0",t.x0=s?Xe:xe(Xe)),h("y0",t.y0=u?Lr:se(Lr))}else if(ke==="resize-over-end-point"){var Ar=g+Ke,de=u?m-Je:m+Je;h("x1",t.x1=s?Ar:xe(Ar)),h("y1",t.y1=u?de:se(de))}}else{var Oe=function(vr){return ke.indexOf(vr)!==-1},Ue=Oe("n"),rt=Oe("s"),Ur=Oe("w"),Ye=Oe("e"),Ve=Ue?A+Je:A,pr=rt?b+Je:b,Tr=Ur?T+Ke:T,mr=Ye?S+Ke:S;u&&(Ue&&(Ve=A-Je),rt&&(pr=b-Je)),(!u&&pr-Ve>l||u&&Ve-pr>l)&&(h(M,t[M]=u?Ve:se(Ve)),h(k,t[k]=u?pr:se(pr))),mr-Tr>o&&(h(D,t[D]=s?Tr:xe(Tr)),h(P,t[P]=s?mr:xe(mr)))}r.attr("d",r6(e,t)),Pe(n,t),B2(e,a,t,q)}function Pe(Ke,Je){(s||u)&&or();function or(){var yr=Je.type!=="path",ir=Ke.selectAll(".visual-cue").data([0]),Xe=1;ir.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Xe}).classed("visual-cue",!0);var Lr=K(s?Je.xanchor:PR.midRange(yr?[Je.x0,Je.x1]:so.extractPathCoords(Je.path,zc.paramIsX))),Ar=ve(u?Je.yanchor:PR.midRange(yr?[Je.y0,Je.y1]:so.extractPathCoords(Je.path,zc.paramIsY)));if(Lr=so.roundPositionForSharpStrokeRendering(Lr,Xe),Ar=so.roundPositionForSharpStrokeRendering(Ar,Xe),s&&u){var de="M"+(Lr-1-Xe)+","+(Ar-1-Xe)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ir.attr("d",de)}else if(s){var Oe="M"+(Lr-1-Xe)+","+(Ar-9-Xe)+"v18 h2 v-18 Z";ir.attr("d",Oe)}else{var Ue="M"+(Lr-9-Xe)+","+(Ar-1-Xe)+"h18 v2 h-18 Z";ir.attr("d",Ue)}}}function Ne(Ke){Ke.selectAll(".visual-cue").remove()}function lr(Ke,Je,or){var yr=Je.xref,ir=Je.yref,Xe=H0.getFromId(or,yr),Lr=H0.getFromId(or,ir),Ar="";yr!=="paper"&&!Xe.autorange&&(Ar+=yr),ir!=="paper"&&!Lr.autorange&&(Ar+=ir),t6.setClipUrl(Ke,Ar?"clip"+or._fullLayout._uid+Ar:null,or)}}function OR(e,r,t){return e.replace(zc.segmentRE,function(a){var n=0,i=a.charAt(0),o=zc.paramIsX[i],l=zc.paramIsY[i],s=zc.numParams[i],u=a.substr(1).replace(zc.paramRE,function(f){return n>=s||(o[n]?f=r(f):l[n]&&(f=t(f)),n++),f});return i+u})}function t0e(e,r){if(U2(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeShapeIndex){zR(e);return}e._fullLayout._activeShapeIndex=a,e._fullLayout._deactivateShape=zR,a6(e)}}}function zR(e){if(U2(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(UR(e),delete e._fullLayout._activeShapeIndex,a6(e))}}function a0e(e){if(U2(e)){UR(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Vo=Ct(),YR=jn(),WR=an(),oa=k2(),n0e=G2().eraseActiveShape,H2=fr(),Zt=H2._,la=QR.exports={};la.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Zt(e,"Download plot as a png"):Zt(e,"Download plot")},icon:oa.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};H2.notifier(Zt(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in r&&(t[a]=r[a])}),Vo.call("downloadImage",e,t).then(function(a){H2.notifier(Zt(e,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){H2.notifier(Zt(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};la.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Zt(e,"Edit in Chart Studio")},icon:oa.disk,click:function(e){YR.sendDataToCloud(e)}};la.editInChartStudio={name:"editInChartStudio",title:function(e){return Zt(e,"Edit in Chart Studio")},icon:oa.pencil,click:function(e){YR.sendDataToCloud(e)}};la.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Zt(e,"Zoom")},attr:"dragmode",val:"zoom",icon:oa.zoombox,click:Di};la.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Zt(e,"Pan")},attr:"dragmode",val:"pan",icon:oa.pan,click:Di};la.select2d={name:"select2d",_cat:"select",title:function(e){return Zt(e,"Box Select")},attr:"dragmode",val:"select",icon:oa.selectbox,click:Di};la.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Zt(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:oa.lasso,click:Di};la.drawclosedpath={name:"drawclosedpath",title:function(e){return Zt(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:oa.drawclosedpath,click:Di};la.drawopenpath={name:"drawopenpath",title:function(e){return Zt(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:oa.drawopenpath,click:Di};la.drawline={name:"drawline",title:function(e){return Zt(e,"Draw line")},attr:"dragmode",val:"drawline",icon:oa.drawline,click:Di};la.drawrect={name:"drawrect",title:function(e){return Zt(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:oa.drawrect,click:Di};la.drawcircle={name:"drawcircle",title:function(e){return Zt(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:oa.drawcircle,click:Di};la.eraseshape={name:"eraseshape",title:function(e){return Zt(e,"Erase active shape")},icon:oa.eraseshape,click:n0e};la.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Zt(e,"Zoom in")},attr:"zoom",val:"in",icon:oa.zoom_plus,click:Di};la.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Zt(e,"Zoom out")},attr:"zoom",val:"out",icon:oa.zoom_minus,click:Di};la.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Zt(e,"Autoscale")},attr:"zoom",val:"auto",icon:oa.autoscale,click:Di};la.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Zt(e,"Reset axes")},attr:"zoom",val:"reset",icon:oa.home,click:Di};la.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Zt(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:oa.tooltip_basic,gravity:"ne",click:Di};la.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Zt(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:oa.tooltip_compare,gravity:"ne",click:Di};function Di(e,r){var t=r.currentTarget,a=t.getAttribute("data-attr"),n=t.getAttribute("data-val")||!0,i=e._fullLayout,o={},l=WR.list(e,null,!0),s=i._cartesianSpikesEnabled,u,f;if(a==="zoom"){var c=n==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var eP=o6(),l0e=Object.keys(eP),rP=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],tP=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(rP),Y0=[],s0e=function(e){if(tP.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();Y0.indexOf(r)===-1&&Y0.push(r),Y0.indexOf(t)===-1&&Y0.push(t)}};l0e.forEach(function(e){s0e(eP[e])});Y0.sort();aP.exports={DRAW_MODES:rP,backButtons:tP,foreButtons:Y0}});var s6=R((sEe,nP)=>{"use strict";var lEe=l6();nP.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 oP=R((uEe,iP)=>{"use strict";var u0e=fr(),R1=Qt(),f0e=Da(),c0e=s6();iP.exports=function(r,t){var a=r.modebar||{},n=f0e.newContainer(t,"modebar");function i(l,s){return u0e.coerce(a,n,c0e,l,s)}i("orientation"),i("bgcolor",R1.addOpacity(t.paper_bgcolor,.5));var o=R1.contrast(R1.rgb(t.modebar.bgcolor));i("color",R1.addOpacity(o,.3)),i("activecolor",R1.addOpacity(o,.7)),i("uirevision",t.uirevision),i("add"),i("remove")}});var fP=R((fEe,uP)=>{"use strict";var u6=ta(),v0e=ia(),Y2=fr(),lP=k2(),h0e=Ry().version,d0e=new DOMParser;function sP(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var ss=sP.prototype;ss.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,a=this.graphInfo._fullLayout,n="modebar-"+a._uid;this.element.setAttribute("id",n),this._uid=n,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var i=a.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(c){c.style.backgroundColor=i.bgcolor}),Y2.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color);var l=!this.hasButtons(r),s=this.hasLogo!==t.displaylogo,u=this.locale!==t.locale;if(this.locale=t.locale,(l||s||u)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};ss.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var a=r.createGroup();t.forEach(function(n){var i=n.name;if(!i)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");r.buttonsNames.push(i);var o=r.createButton(n);r.buttonElements.push(o),a.appendChild(o)}),r.element.appendChild(a)})};ss.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};ss.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var a=e.title;a===void 0?a=e.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&t.setAttribute("data-title",a),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),t.setAttribute("data-val",n));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&u6.select(t).classed("active",!0);var o=e.icon;return typeof o=="function"?t.appendChild(o()):t.appendChild(this.createIcon(o||lP.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};ss.createIcon=function(e){var r=v0e(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",a;if(e.path){a=document.createElementNS(t,"svg"),a.setAttribute("viewBox",[0,0,e.width,r].join(" ")),a.setAttribute("class","icon");var n=document.createElementNS(t,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),a.appendChild(n)}if(e.svg){var i=d0e.parseFromString(e.svg,"application/xml");a=i.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};ss.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var n=a.getAttribute("data-val")||!0,i=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=u6.select(a),s=function(c,h){var d=r.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(i===t){var u=!l.classed("active");l.classed("active",u),s(a,u)}}else{var f=i===null?i:Y2.nestedProperty(r,i).get();l.classed("active",f===n),s(a,f===n)}})};ss.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var y0e=an(),cP=ni(),f6=Ct(),g0e=js().isUnifiedHover,b0e=fP(),W2=o6(),x0e=l6().DRAW_MODES,_0e=fr().extendDeep;vP.exports=function(r){var t=r._fullLayout,a=r._context,n=t._modeBar;if(!a.displayModeBar&&!a.watermark){n&&(n.destroy(),delete t._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=a.modeBarButtons,o;Array.isArray(i)&&i.length?o=k0e(i):!a.displayModeBar&&a.watermark?o=[]:o=w0e(r),n?n.update(r,o):t._modeBar=b0e(r,o)};function w0e(e){var r=e._fullLayout,t=e._fullData,a=e._context;function n(B,V){if(typeof V=="string"){if(V.toLowerCase()===B.toLowerCase())return!0}else{var j=V.name,K=V._cat||V.name;if(j===B||K===B.toLowerCase())return!0}return!1}var i=r.modebar.add;typeof i=="string"&&(i=[i]);var o=r.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(i.filter(function(B){for(var V=0;V1?(P=["toggleHover"],N=["resetViews"]):c?(D=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],N=["resetGeo"]):f?(P=["hoverClosest3d"],N=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(D=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],N=["resetViewMapbox"]):m?(D=["zoomInMap","zoomOutMap"],P=["toggleHover"],N=["resetViewMap"]):h?P=["hoverClosestPie"]:A?(P=["hoverClosestCartesian","hoverCompareCartesian"],N=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(M0e(t)||T)&&(P=[]),u&&!b&&(D=["zoomIn2d","zoomOut2d","autoScale2d"],N[0]!=="resetViews"&&(N=["resetScale2d"])),f?q=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||p?q=["zoom2d","pan2d"]:g||m||c?q=["pan2d"]:x&&(q=["zoom2d"]),T0e(t)&&q.push("select2d","lasso2d");var O=[],U=function(B){O.indexOf(B)===-1&&P.indexOf(B)!==-1&&O.push(B)};if(Array.isArray(l)){for(var $=[],W=0;W{"use strict";dP.exports={moduleType:"component",name:"modebar",layoutAttributes:s6(),supplyLayoutDefaults:oP(),manage:hP()}});var v6=R((hEe,pP)=>{"use strict";var C0e=ki().FROM_BL;pP.exports=function(r,t,a){a===void 0&&(a=C0e[r.constraintoward||"center"]);var n=[r.r2l(r.range[0]),r.r2l(r.range[1])],i=n[0]+(n[1]-n[0])*a;r.range=r._input.range=[r.l2r(i+(n[0]-i)*t),r.l2r(i+(n[1]-i)*t)],r.setScale()}});var N1=R(P1=>{"use strict";var Bc=fr(),h6=E0(),wl=an().id2name,E0e=Bo(),mP=v6(),L0e=Jg(),D0e=_n().ALMOST_EQUAL,q0e=ki().FROM_BL;P1.handleDefaults=function(e,r,t){var a=t.axIds,n=t.axHasImage,i=r._axisConstraintGroups=[],o=r._axisMatchGroups=[],l,s,u,f,c,h,d,p;for(l=0;li?t.substr(i):a.substr(n))+o}function R0e(e,r){for(var t=r._size,a=t.h/t.w,n={},i=Object.keys(e),o=0;oD0e*p&&!_)){for(i=0;iq&&jP&&(P=j);var ve=(P-D)/(2*N);c/=ve,D=s.l2r(D),P=s.l2r(P),s.range=s._input.range=S{"use strict";var X2=ta(),qi=Ct(),So=jn(),Yo=fr(),m6=Ci(),y6=S2(),I1=Qt(),W0=Ca(),xP=x1(),MP=c6(),O1=Va(),Ks=ki(),SP=N1(),P0e=SP.enforce,N0e=SP.clean,_P=E0().doAutoRange,kP="start",I0e="middle",CP="end",O0e=ai().zindexSeparator;Jn.layoutStyles=function(e){return Yo.syncOrAsync([So.doAutoMargin,B0e],e)};function z0e(e,r,t){for(var a=0;a=e[1]||n[1]<=e[0])&&i[0]r[0])return!0}return!1}function B0e(e){var r=e._fullLayout,t=r._size,a=t.p,n=O1.list(e,"",!0),i,o,l,s,u,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(W0.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),Jn.drawMainTitle(e),MP.manage(e),!r._has("cartesian"))return So.previousPromises(e);function c(Ce,Y,ae){var Z=Ce._lw/2;if(Ce._id.charAt(0)==="x"){if(Y){if(ae==="top")return Y._offset-a-Z}else return t.t+t.h*(1-(Ce.position||0))+Z%1;return Y._offset+Y._length+a+Z}if(Y){if(ae==="right")return Y._offset+Y._length+a+Z}else return t.l+t.w*(Ce.position||0)+Z%1;return Y._offset-a-Z}for(i=0;i0){V0e(e,i,u,s),l.attr({x:o,y:i,"text-anchor":a,dy:TP(r.yanchor)}).call(m6.positionText,o,i);var f=(r.text.match(m6.BR_TAG_ALL)||[]).length;if(f){var c=Ks.LINE_SPACING*f+Ks.MID_SHIFT;r.y===0&&(c=-c),l.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",m)})}var h=X2.selectAll(".gtitle-subtitle");if(h.node()){var d=l.node().getBBox(),p=d.y+d.height,g=p+xP.SUBTITLE_PADDING_EM*r.subtitle.font.size;h.attr({x:o,y:g,"text-anchor":a,dy:TP(r.yanchor)}).call(m6.positionText,o,g)}}}};function U0e(e,r,t,a,n){var i=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=Yo.isTopAnchor(r)?a:a-n,l=t==="b"?i-o:o;return Yo.isTopAnchor(r)&&t==="t"||Yo.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",o=e._fullLayout.margin[i],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=G0e(i,a,n,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>o?l:0}function V0e(e,r,t,a){var n="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",l={x:i.x,y:i.y,t:0,b:0},s={};i.yref==="paper"&&U0e(e,i,o,r,a)?l[o]=t:i.yref==="container"&&(s[o]=t,e._fullLayout._reservedMargin[n]=s),So.allowAutoMargin(e,n),So.autoMargin(e,n,l)}function Y0e(e,r){var t=e.title,a=e._size,n=0;switch(r===kP?n=t.pad.l:r===CP&&(n=-t.pad.r),t.xref){case"paper":return a.l+a.w*t.x+n;case"container":default:return e.width*t.x+n}}function W0e(e,r){var t=e.title,a=e._size,n=0;if(r==="0em"||!r?n=-t.pad.b:r===Ks.CAP_SHIFT+"em"&&(n=t.pad.t),t.y==="auto")return a.t/2;switch(t.yref){case"paper":return a.t+a.h-a.h*t.y+n;case"container":default:return e.height-e.height*t.y+n}}function TP(e){return e==="top"?Ks.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Ks.MID_SHIFT+"em"}function j0e(e){var r=e.title,t=I0e;return Yo.isRightAnchor(r)?t=CP:Yo.isLeftAnchor(r)&&(t=kP),t}function X0e(e){var r=e.title,t="0em";return Yo.isTopAnchor(r)?t=Ks.CAP_SHIFT+"em":Yo.isMiddleAnchor(r)&&(t=Ks.MID_SHIFT+"em"),t}Jn.doTraceStyle=function(e){var r=e.calcdata,t=[],a;for(a=0;a{"use strict";var Z0e=af().readPaths,J0e=O2(),EP=Wu().clearOutlineControllers,g6=Qt(),LP=Ca(),$0e=Da().arrayEditor,DP=of(),K0e=DP.getPathString;FP.exports={draw:J2,drawOne:qP,activateLastSelection:rhe};function J2(e){var r=e._fullLayout;EP(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var a=r._plots[t].selectionLayer;a&&a.selectAll("path").remove()}for(var n=0;n=0;m--){var x=o.append("path").attr(s).style("opacity",m?.1:u).call(g6.stroke,c).call(g6.fill,f).call(LP.dashLine,m?"solid":d,m?4+h:h);if(Q0e(x,e,a),p){var _=$0e(e.layout,"selections",a);x.style({cursor:"move"});var A={element:x.node(),plotinfo:n,gd:e,editHelpers:_,isActiveSelection:!0},b=Z0e(l,e);J0e(b,x,A)}else x.style("pointer-events",m?"all":"none");g[m]=x}var T=g[0],S=g[1];S.node().addEventListener("click",function(){return ehe(e,T)})}}function Q0e(e,r,t){var a=t.xref+t.yref;LP.setClipUrl(e,"clip"+r._fullLayout._uid+a,r)}function ehe(e,r){if($2(e)){var t=r.node(),a=+t.getAttribute("data-index");if(a>=0){if(a===e._fullLayout._activeSelectionIndex){b6(e);return}e._fullLayout._activeSelectionIndex=a,e._fullLayout._deactivateSelection=b6,J2(e)}}}function rhe(e){if($2(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=b6,J2(e)}}function b6(e){if($2(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(EP(e),delete e._fullLayout._activeSelectionIndex,J2(e))}}});var PP=R((yEe,RP)=>{function the(){var e,r=0,t=!1;function a(n,i){return e.list.push({type:n,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(n,i){return a("check",{seg1:n,seg2:i})},segmentChop:function(n,i){return a("div_seg",{seg:n,pt:i}),a("chop",{seg:n,pt:i})},statusRemove:function(n){return a("pop_seg",{seg:n})},segmentUpdate:function(n){return a("seg_update",{seg:n})},segmentNew:function(n,i){return a("new_seg",{seg:n,primary:i})},segmentRemove:function(n){return a("rem_seg",{seg:n})},tempStatus:function(n,i,o){return a("temp_status",{seg:n,above:i,below:o})},rewind:function(n){return a("rewind",{seg:n})},status:function(n,i,o){return a("status",{seg:n,above:i,below:o})},vert:function(n){return n===t?e:(t=n,a("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),a("log",{txt:n})},reset:function(){return a("reset")},selected:function(n){return a("selected",{segs:n})},chainStart:function(n){return a("chain_start",{seg:n})},chainRemoveHead:function(n,i){return a("chain_rem_head",{index:n,pt:i})},chainRemoveTail:function(n,i){return a("chain_rem_tail",{index:n,pt:i})},chainNew:function(n,i){return a("chain_new",{pt1:n,pt2:i})},chainMatch:function(n){return a("chain_match",{index:n})},chainClose:function(n){return a("chain_close",{index:n})},chainAddHead:function(n,i){return a("chain_add_head",{index:n,pt:i})},chainAddTail:function(n,i){return a("chain_add_tail",{index:n,pt:i})},chainConnect:function(n,i){return a("chain_con",{index1:n,index2:i})},chainReverse:function(n){return a("chain_rev",{index:n})},chainJoin:function(n,i){return a("chain_join",{index1:n,index2:i})},done:function(){return a("done")}},e}RP.exports=the});var IP=R((gEe,NP)=>{function ahe(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,a,n){var i=a[0],o=a[1],l=n[0],s=n[1],u=t[0],f=t[1];return(l-i)*(f-o)-(s-o)*(u-i)>=-e},pointBetween:function(t,a,n){var i=t[1]-a[1],o=n[0]-a[0],l=t[0]-a[0],s=n[1]-a[1],u=l*o+i*s;if(u-e)},pointsSameX:function(t,a){return Math.abs(t[0]-a[0])e!=l-i>e&&(o-f)*(i-c)/(l-c)+f-n>e&&(s=!s),o=f,l=c}return s}};return r}NP.exports=ahe});var zP=R((bEe,OP)=>{var nhe={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var a=e.root,n=e.root.next;n!==null;){if(t(n)){r.prev=n.prev,r.next=n,n.prev.next=r,n.prev=r;return}a=n,n=n.next}a.next=r,r.prev=a,r.next=null},findTransition:function(r){for(var t=e.root,a=e.root.next;a!==null&&!r(a);)t=a,a=a.next;return{before:t===e.root?null:t,after:a,insert:function(n){return n.prev=t,n.next=a,t.next=n,a!==null&&(a.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};OP.exports=nhe});var UP=R((xEe,BP)=>{var z1=zP();function ihe(e,r,t){function a(p,g){return{id:t?t.segmentId():-1,start:p,end:g,myFill:{above:null,below:null},otherFill:null}}function n(p,g,m){return{id:t?t.segmentId():-1,start:p,end:g,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var i=z1.create();function o(p,g,m,x,_,A){var b=r.pointsCompare(g,_);return b!==0?b:r.pointsSame(m,A)?0:p!==x?p?1:-1:r.pointAboveOrOnLine(m,x?_:A,x?A:_)?1:-1}function l(p,g){i.insertBefore(p,function(m){var x=o(p.isStart,p.pt,g,m.isStart,m.pt,m.other.pt);return x<0})}function s(p,g){var m=z1.node({isStart:!0,pt:p.start,seg:p,primary:g,other:null,status:null});return l(m,p.end),m}function u(p,g,m){var x=z1.node({isStart:!1,pt:g.end,seg:g,primary:m,other:p,status:null});p.other=x,l(x,p.pt)}function f(p,g){var m=s(p,g);return u(m,p,g),m}function c(p,g){t&&t.segmentChop(p.seg,g),p.other.remove(),p.seg.end=g,p.other.pt=g,l(p.other,p.pt)}function h(p,g){var m=n(g,p.seg.end,p.seg);return c(p,g),f(m,p.primary)}function d(p,g){var m=z1.create();function x($,W){var H=$.seg.start,B=$.seg.end,V=W.seg.start,j=W.seg.end;return r.pointsCollinear(H,V,j)?r.pointsCollinear(B,V,j)||r.pointAboveOrOnLine(B,V,j)?1:-1:r.pointAboveOrOnLine(H,V,j)?1:-1}function _($){return m.findTransition(function(W){var H=x($,W.ev);return H>0})}function A($,W){var H=$.seg,B=W.seg,V=H.start,j=H.end,K=B.start,ve=B.end;t&&t.checkIntersection(H,B);var xe=r.linesIntersect(V,j,K,ve);if(xe===!1){if(!r.pointsCollinear(V,j,K)||r.pointsSame(V,ve)||r.pointsSame(j,K))return!1;var se=r.pointsSame(V,K),be=r.pointsSame(j,ve);if(se&&be)return W;var re=!se&&r.pointBetween(V,K,ve),ke=!be&&r.pointBetween(j,K,ve);if(se)return ke?h(W,j):h($,ve),W;re&&(be||(ke?h(W,j):h($,ve)),h(W,V))}else xe.alongA===0&&(xe.alongB===-1?h($,K):xe.alongB===0?h($,xe.pt):xe.alongB===1&&h($,ve)),xe.alongB===0&&(xe.alongA===-1?h(W,V):xe.alongA===0?h(W,xe.pt):xe.alongA===1&&h(W,j));return!1}for(var b=[];!i.isEmpty();){var T=i.getHead();if(t&&t.vert(T.pt[0]),T.isStart){let $=function(){if(M){var W=A(T,M);if(W)return W}return k?A(T,k):!1};var U=$;t&&t.segmentNew(T.seg,T.primary);var S=_(T),M=S.before?S.before.ev:null,k=S.after?S.after.ev:null;t&&t.tempStatus(T.seg,M?M.seg:!1,k?k.seg:!1);var D=$();if(D){if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,P&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=T.seg.myFill;t&&t.segmentUpdate(D.seg),T.other.remove(),T.remove()}if(i.getHead()!==T){t&&t.rewind(T.seg);continue}if(e){var P;T.seg.myFill.below===null?P=!0:P=T.seg.myFill.above!==T.seg.myFill.below,k?T.seg.myFill.below=k.seg.myFill.above:T.seg.myFill.below=p,P?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var N;k?T.primary===k.primary?N=k.seg.otherFill.above:N=k.seg.myFill.above:N=T.primary?g:p,T.seg.otherFill={above:N,below:N}}t&&t.status(T.seg,M?M.seg:!1,k?k.seg:!1),T.other.status=S.insert(z1.node({ev:T}))}else{var q=T.status;if(q===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(q.prev)&&m.exists(q.next)&&A(q.prev.ev,q.next.ev),t&&t.statusRemove(q.ev.seg),q.remove(),!T.primary){var O=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=O}b.push(T.seg)}i.getHead().remove()}return t&&t.done(),b}return e?{addRegion:function(p){for(var g,m=p[p.length-1],x=0;x{function ohe(e,r,t){var a=[],n=[];return e.forEach(function(i){var o=i.start,l=i.end;if(r.pointsSame(o,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(i);var s={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},f=s;function c(U,$,W){return f.index=U,f.matches_head=$,f.matches_pt1=W,f===s?(f=u,!1):(f=null,!0)}for(var h=0;h{function B1(e,r,t){var a=[];return e.forEach(function(n){var i=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);r[i]!==0&&a.push({id:t?t.segmentId():-1,start:n.start,end:n.end,myFill:{above:r[i]===1,below:r[i]===2},otherFill:null})}),t&&t.selected(a),a}var lhe={union:function(e,r){return B1(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return B1(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return B1(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return B1(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return B1(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};VP.exports=lhe});var jP=R((AEe,WP)=>{var she={toPolygon:function(e,r){function t(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var f=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=o(i[0]),s=1;s{var uhe=PP(),fhe=IP(),XP=UP(),che=HP(),U1=YP(),ZP=jP(),Wo=!1,G1=fhe(),uo;uo={buildLog:function(e){return e===!0?Wo=uhe():e===!1&&(Wo=!1),Wo===!1?!1:Wo.list},epsilon:function(e){return G1.epsilon(e)},segments:function(e){var r=XP(!0,G1,Wo);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=XP(!1,G1,Wo);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:U1.union(e.combined,Wo),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:U1.intersect(e.combined,Wo),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:U1.difference(e.combined,Wo),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:U1.differenceRev(e.combined,Wo),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:U1.xor(e.combined,Wo),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:che(e.segments,G1,Wo),inverted:e.inverted}},polygonFromGeoJSON:function(e){return ZP.toPolygon(uo,e)},polygonToGeoJSON:function(e){return ZP.fromPolygon(uo,G1,e)},union:function(e,r){return H1(e,r,uo.selectUnion)},intersect:function(e,r){return H1(e,r,uo.selectIntersect)},difference:function(e,r){return H1(e,r,uo.selectDifference)},differenceRev:function(e,r){return H1(e,r,uo.selectDifferenceRev)},xor:function(e,r){return H1(e,r,uo.selectXor)}};function H1(e,r,t){var a=uo.segments(e),n=uo.segments(r),i=uo.combine(a,n),o=t(i);return uo.polygon(o)}typeof window=="object"&&(window.PolyBool=uo);JP.exports=uo});var QP=R((MEe,KP)=>{KP.exports=function(r,t,a,n){var i=r[0],o=r[1],l=!1;a===void 0&&(a=0),n===void 0&&(n=t.length);for(var s=n-a,u=0,f=s-1;uo!=p>o&&i<(d-c)*(o-h)/(p-h)+c;g&&(l=!l)}return l}});var w6=R((SEe,eN)=>{"use strict";var _6=Qy().dot,K2=_n().BADNUM,Q2=eN.exports={};Q2.tester=function(r){var t=r.slice(),a=t[0][0],n=a,i=t[0][1],o=i,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;ln||x===K2||xo||g&&u(p))}function c(p,g){var m=p[0],x=p[1];if(m===K2||mn||x===K2||xo)return!1;var _=t.length,A=t[0][0],b=t[0][1],T=0,S,M,k,D,P;for(S=1;S<_;S++)if(M=A,k=b,A=t[S][0],b=t[S][1],D=Math.min(M,A),!(mMath.max(M,A)||x>Math.max(k,b)))if(xl||Math.abs(_6(c,u))>n)return!0;return!1};Q2.filter=function(r,t){var a=[r[0]],n=0,i=0;function o(s){r.push(s);var u=a.length,f=n;a.splice(i+1);for(var c=f+1;c1){var l=r.pop();o(l)}return{addPt:o,raw:r,filtered:a}}});var tN=R((kEe,rN)=>{"use strict";rN.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var TN=R((CEe,AN)=>{"use strict";var aN=$P(),vhe=QP(),W1=Ct(),hhe=Ca().dashStyle,V1=Qt(),dhe=rf(),phe=js().makeEventData,$1=tf(),mhe=$1.freeMode,yhe=$1.rectMode,j1=$1.drawMode,S6=$1.openMode,k6=$1.selectMode,nN=of(),iN=q1(),fN=O2(),cN=Wu().clearOutline,vN=af(),A6=vN.handleEllipse,ghe=vN.readPaths,bhe=R2().newShapes,xhe=Zw(),_he=x6().activateLastSelection,r3=fr(),whe=r3.sorterAsc,hN=w6(),Y1=dg(),jo=an().getFromId,Ahe=S2(),The=Z2().redrawReglTraces,t3=tN(),us=t3.MINSELECT,Mhe=hN.filter,C6=hN.tester,E6=L2(),oN=E6.p2r,She=E6.axValue,khe=E6.getTransform;function L6(e){return e.subplot!==void 0}function Che(e,r,t,a,n){var i=!L6(a),o=mhe(n),l=yhe(n),s=S6(n),u=j1(n),f=k6(n),c=n==="drawline",h=n==="drawcircle",d=c||h,p=a.gd,g=p._fullLayout,m=f&&g.newselection.mode==="immediate"&&i,x=g._zoomlayer,_=a.element.getBoundingClientRect(),A=a.plotinfo,b=khe(A),T=r-_.left,S=t-_.top;g._calcInverseTransform(p);var M=r3.apply3DTransform(g._invTransform)(T,S);T=M[0],S=M[1];var k=g._invScaleX,D=g._invScaleY,P=T,N=S,q="M"+T+","+S,O=a.xaxes[0],U=a.yaxes[0],$=O._length,W=U._length,H=e.altKey&&!(j1(n)&&s),B,V,j,K,ve,xe,se;pN(e,p,a),o&&(B=Mhe([[T,S]],t3.BENDPX));var be=x.selectAll("path.select-outline-"+A.id).data([1]),re=u?g.newshape:g.newselection;u&&(a.hasText=re.label.text||re.label.texttemplate);var ke=u&&!s?re.fillcolor:"rgba(0,0,0,0)",ge=re.line.color||(i?V1.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");be.enter().append("path").attr("class","select-outline select-outline-"+A.id).style({opacity:u?re.opacity/2:1,"stroke-dasharray":hhe(re.line.dash,re.line.width),"stroke-width":re.line.width+"px","shape-rendering":"crispEdges"}).call(V1.stroke,ge).call(V1.fill,ke).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",b).attr("d",q+"Z");var Ee=x.append("path").attr("class","zoombox-corners").style({fill:V1.background,stroke:V1.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(u&&a.hasText){var De=x.select(".label-temp");De.empty()&&(De=x.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ce=g._uid+t3.SELECTID,Y=[],ae=a3(p,a.xaxes,a.yaxes,a.subplot);m&&!e.shiftKey&&(a._clearSubplotSelections=function(){if(i){var Te=O._id,Pe=U._id;xN(p,Te,Pe,ae);for(var Ne=(p.layout||{}).selections||[],lr=[],Ke=!1,Je=0;Je=0){p._fullLayout._deactivateShape(p);return}if(!u){var Ne=g.clickmode;Y1.done(Ce).then(function(){if(Y1.clear(Ce),Te===2){for(be.remove(),ve=0;ve-1&&dN(Pe,p,a.xaxes,a.yaxes,a.subplot,a,be),Ne==="event"&&J1(p,void 0);dhe.click(p,Pe,A.id)}).catch(r3.error)}},a.doneFn=function(){Ee.remove(),Y1.done(Ce).then(function(){Y1.clear(Ce),!m&&K&&a.selectionDefs&&(K.subtract=H,a.selectionDefs.push(K),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,j)),(m||u)&&X1(a,m),a.doneFnCompleted&&a.doneFnCompleted(Y),f&&J1(p,se)}).catch(r3.error)}}function dN(e,r,t,a,n,i,o){var l=r._hoverdata,s=r._fullLayout,u=s.clickmode,f=u.indexOf("event")>-1,c=[],h,d,p,g,m,x,_,A,b,T;if(Fhe(l)){pN(e,r,i),h=a3(r,t,a,n);var S=Rhe(l,h),M=S.pointNumbers.length>0;if(M?Phe(h,S):Nhe(h)&&(_=sN(S))){for(o&&o.remove(),T=0;T=0}function qhe(e){return e._fullLayout._activeSelectionIndex>=0}function X1(e,r){var t=e.dragmode,a=e.plotinfo,n=e.gd;Dhe(n)&&n._fullLayout._deactivateShape(n),qhe(n)&&n._fullLayout._deactivateSelection(n);var i=n._fullLayout,o=i._zoomlayer,l=j1(t),s=k6(t);if(l||s){var u=o.selectAll(".select-outline-"+a.id);if(u&&n._fullLayout._outlining){var f;l&&(f=bhe(u,e)),f&&W1.call("_guiRelayout",n,{shapes:f});var c;s&&!L6(e)&&(c=xhe(u,e)),c&&(n._fullLayout._noEmitSelectedAtStart=!0,W1.call("_guiRelayout",n,{selections:c}).then(function(){r&&_he(n)})),n._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=e.selectionDefs=[],a.selection.mergedPolygons=e.mergedPolygons=[]}function lN(e){return e._id}function a3(e,r,t,a){if(!e.calcdata)return[];var n=[],i=r.map(lN),o=t.map(lN),l,s,u;for(u=0;u0,i=n?a[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(i)>-1:!1}function Phe(e,r){var t=[],a,n,i,o;for(o=0;o0&&t.push(a);if(t.length===1&&(i=t[0]===r.searchInfo,i&&(n=r.searchInfo.cd[0].trace,n.selectedpoints.length===r.pointNumbers.length))){for(o=0;o1||(r+=a.selectedpoints.length,r>1)))return!1;return r===1}function Z1(e,r,t){var a;for(a=0;a-1&&r;if(!o&&r){var Te=uN(e,!0);if(Te.length){var Pe=Te[0].xref,Ne=Te[0].yref;if(Pe&&Ne){var lr=_N(Te),Ke=wN([jo(e,Pe,"x"),jo(e,Ne,"y")]);Ke(Y,lr)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:Z&&J1(e,Y),h._reselect=!1}if(!o&&h._deselect){var Je=h._deselect;l=Je.xref,s=Je.yref,zhe(l,s,f)||xN(e,l,s,a),Z&&(Y.points.length?J1(e,Y):F6(e)),h._deselect=!1}return{eventData:Y,selectionTesters:t}}function Ohe(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";MN.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 K1=R((LEe,SN)=>{"use strict";SN.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var j0=R((qEe,EN)=>{"use strict";var kN=R6(),CN=ci(),n3=ai(),Vhe=Da().templatedArray,DEe=K1();EN.exports=Vhe("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:CN({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:kN.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:kN.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",n3.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",n3.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",n3.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",n3.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:CN({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Q1=R((FEe,LN)=>{"use strict";LN.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var P6=R((REe,DN)=>{"use strict";DN.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var sf=R((PEe,IN)=>{"use strict";var qN=m1().axisHoverFormat,Yhe=o0().texttemplateAttrs,Whe=o0().hovertemplateAttrs,FN=Ac(),jhe=ci(),Xhe=Iu().dash,Zhe=Iu().pattern,Jhe=Ca(),$he=Q1(),i3=hn().extendFlat,Khe=P6();function RN(e){return{valType:"any",dflt:0,editType:"calc"}}function PN(e){return{valType:"any",editType:"calc"}}function NN(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}IN.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:RN("x"),yperiod:RN("y"),xperiod0:PN("x0"),yperiod0:PN("y0"),xperiodalignment:NN("x"),yperiodalignment:NN("y"),xhoverformat:qN("x"),yhoverformat:qN("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:Yhe({},{}),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:Whe({},{keys:$he.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:i3({},Xhe,{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:Khe(!0),fillgradient:i3({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:Zhe,marker:i3({symbol:{valType:"enumerated",values:Jhe.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:i3({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},FN("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"},FN("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:jhe({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var N6=R((IEe,BN)=>{"use strict";var ON=j0(),zN=sf().line,Qhe=Iu().dash,o3=hn().extendFlat,ede=dl().overrideAll,rde=Da().templatedArray,NEe=K1();BN.exports=ede(rde("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o3({},ON.xref,{}),yref:o3({},ON.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:zN.color,width:o3({},zN.width,{min:1,dflt:1}),dash:o3({},Qhe,{dflt:"dot"})}}),"arraydraw","from-root")});var VN=R((OEe,HN)=>{"use strict";var UN=fr(),l3=Va(),tde=wo(),ade=N6(),GN=of();HN.exports=function(r,t){tde(r,t,{name:"selections",handleItemDefaults:nde});for(var a=t.selections,n=0;n{"use strict";YN.exports=function(r,t,a){a("newselection.mode");var n=a("newselection.line.width");n&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")}});var ep=R((BEe,ZN)=>{"use strict";var ide=Ct(),jN=fr(),XN=an();ZN.exports=function(r){return function(a,n){var i=a[r];if(Array.isArray(i))for(var o=ide.subplotsRegistry.cartesian,l=o.idRegex,s=n._subplots,u=s.xaxis,f=s.yaxis,c=s.cartesian,h=n._has("cartesian"),d=0;d{"use strict";var JN=x6(),rp=TN();$N.exports={moduleType:"component",name:"selections",layoutAttributes:N6(),supplyLayoutDefaults:VN(),supplyDrawNewSelectionDefaults:WN(),includeBasePlot:ep()("selections"),draw:JN.draw,drawOne:JN.drawOne,reselect:rp.reselect,prepSelect:rp.prepSelect,clearOutline:rp.clearOutline,clearSelectionsCache:rp.clearSelectionsCache,selectOnClick:rp.selectOnClick}});var gI=R((GEe,yI)=>{"use strict";var U6=ta(),Xo=fr(),KN=Xo.numberFormat,ode=vl(),lde=gw(),s3=Ct(),lI=Xo.strTranslate,sde=Ci(),QN=Qt(),uf=Ca(),ude=rf(),eI=Va(),fde=ef(),cde=xl(),sI=tf(),u3=sI.selectingOrDrawing,vde=sI.freeMode,hde=ki().FROM_TL,dde=S2(),pde=Z2().redrawReglTraces,mde=jn(),O6=an().getFromId,yde=X0().prepSelect,gde=X0().clearOutline,bde=X0().selectOnClick,I6=v6(),G6=ai(),rI=G6.MINDRAG,Bi=G6.MINZOOM,tI=!0;function xde(e,r,t,a,n,i,o,l){var s=e._fullLayout._zoomlayer,u=o+l==="nsew",f=(o+l).length===1,c,h,d,p,g,m,x,_,A,b,T,S,M,k,D,P,N,q,O,U,$,W,H;t+=r.yaxis._shift;function B(){if(c=r.xaxis,h=r.yaxis,A=c._length,b=h._length,x=c._offset,_=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,o&&l)for(var Ye=r.overlays,Ve=0;Ve=0){pr._fullLayout._deactivateShape(pr);return}var Tr=pr._fullLayout.clickmode;if(B6(pr),Ye===2&&!f&&Ar(),u)Tr.indexOf("select")>-1&&bde(Ve,pr,g,m,r.id,K),Tr.indexOf("event")>-1&&ude.click(pr,Ve,r.id);else if(Ye===1&&f){var mr=o?h:c,vr=o==="s"||l==="w"?0:1,Cr=mr._name+".range["+vr+"]",Ir=_de(mr,vr),Gr="left",Ze="middle";if(mr.fixedrange)return;o?(Ze=o==="n"?"top":"bottom",mr.side==="right"&&(Gr="right")):l==="e"&&(Gr="right"),pr._context.showAxisRangeEntryBoxes&&U6.select(j).call(sde.makeEditable,{gd:pr,immediate:!0,background:pr._fullLayout.paper_bgcolor,text:String(Ir),fill:mr.tickfont?mr.tickfont.color:"#444",horizontalAlign:Gr,verticalAlign:Ze}).on("edit",function(oe){var ye=mr.d2r(oe);ye!==void 0&&s3.call("_guiRelayout",pr,Cr,ye)})}}cde.init(K);var se,be,re,ke,ge,Ee,De,Ce,Y,ae;function Z(Ye,Ve,pr){var Tr=j.getBoundingClientRect();se=Ve-Tr.left,be=pr-Tr.top,e._fullLayout._calcInverseTransform(e);var mr=Xo.apply3DTransform(e._fullLayout._invTransform)(se,be);se=mr[0],be=mr[1],re={l:se,r:se,w:0,t:be,b:be,h:0},ke=e._hmpixcount?e._hmlumcount/e._hmpixcount:ode(e._fullLayout.plot_bgcolor).getLuminance(),ge="M0,0H"+A+"V"+b+"H0V0",Ee=!1,De="xy",ae=!1,Ce=cI(s,ke,x,_,ge),Y=vI(s,x,_)}function Te(Ye,Ve){if(e._transitioningWithDuration)return!1;var pr=Math.max(0,Math.min(A,W*Ye+se)),Tr=Math.max(0,Math.min(b,H*Ve+be)),mr=Math.abs(pr-se),vr=Math.abs(Tr-be);re.l=Math.min(se,pr),re.r=Math.max(se,pr),re.t=Math.min(be,Tr),re.b=Math.max(be,Tr);function Cr(){De="",re.r=re.l,re.t=re.b,Y.attr("d","M0,0Z")}if(T.isSubplotConstrained)mr>Bi||vr>Bi?(De="xy",mr/A>vr/b?(vr=mr*b/A,be>Tr?re.t=be-vr:re.b=be+vr):(mr=vr*A/b,se>pr?re.l=se-mr:re.r=se+mr),Y.attr("d",f3(re))):Cr();else if(S.isSubplotConstrained)if(mr>Bi||vr>Bi){De="xy";var Ir=Math.min(re.l/A,(b-re.b)/b),Gr=Math.max(re.r/A,(b-re.t)/b);re.l=Ir*A,re.r=Gr*A,re.b=(1-Ir)*b,re.t=(1-Gr)*b,Y.attr("d",f3(re))}else Cr();else!k||vr0){var oe;if(S.isSubplotConstrained||!M&&k.length===1){for(oe=0;oe1&&(Cr.maxallowed!==void 0&&P===(Cr.range[0]1&&(Ir.maxallowed!==void 0&&N===(Ir.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Ade(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function cI(e,r,t,a,n){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",lI(t,a)).attr("d",n+"Z")}function vI(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:QN.background,stroke:QN.defaultLine,"stroke-width":1,opacity:0}).attr("transform",lI(r,t)).attr("d","M0,0Z")}function hI(e,r,t,a,n,i){e.attr("d",a+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),dI(e,r,n,i)}function dI(e,r,t,a){t||(e.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function B6(e){U6.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function pI(e){tI&&e.data&&e._context.showTips&&(Xo.notifier(Xo._(e,"Double-click to zoom back out"),"long"),tI=!1)}function Tde(e,r){return"M"+(e.l-.5)+","+(r-Bi-.5)+"h-3v"+(2*Bi+1)+"h3ZM"+(e.r+.5)+","+(r-Bi-.5)+"h3v"+(2*Bi+1)+"h-3Z"}function Mde(e,r){return"M"+(r-Bi-.5)+","+(e.t-.5)+"v-3h"+(2*Bi+1)+"v3ZM"+(r-Bi-.5)+","+(e.b+.5)+"v3h"+(2*Bi+1)+"v-3Z"}function f3(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Bi)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function iI(e,r,t,a,n){for(var i=!1,o={},l={},s,u,f,c,h=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p{"use strict";var Sde=ta(),c3=rf(),kde=xl(),Cde=ef(),Al=gI().makeDragBox,$n=ai().DRAGGERSIZE;v3.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){Sde.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var a=Object.keys(t._plots||{}).sort(function(i,o){if((t._plots[i].mainplot&&!0)===(t._plots[o].mainplot&&!0)){var l=i.split("y"),s=o.split("y");return l[0]===s[0]?Number(l[1]||1)-Number(s[1]||1):Number(l[0]||1)-Number(s[0]||1)}return t._plots[i].mainplot?1:-1});a.forEach(function(i){var o=t._plots[i],l=o.xaxis,s=o.yaxis;if(!o.mainplot){var u=Al(r,o,l._offset,s._offset,l._length,s._length,"ns","ew");u.onmousemove=function(h){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===i&&r._fullLayout._plots[i]&&c3.hover(r,h,i)},c3.hover(r,h,i),r._fullLayout._lasthover=u,r._fullLayout._hoversubplot=i},u.onmouseout=function(h){r._dragging||(r._fullLayout._hoversubplot=null,kde.unhover(r,h))},r._context.showAxisDragHandles&&(Al(r,o,l._offset-$n,s._offset-$n,$n,$n,"n","w"),Al(r,o,l._offset+l._length,s._offset-$n,$n,$n,"n","e"),Al(r,o,l._offset-$n,s._offset+s._length,$n,$n,"s","w"),Al(r,o,l._offset+l._length,s._offset+s._length,$n,$n,"s","e"))}if(r._context.showAxisDragHandles){if(i===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=$n),Al(r,o,l._offset+l._length*.1,f,l._length*.8,$n,"","ew"),Al(r,o,l._offset,f,l._length*.1,$n,"","w"),Al(r,o,l._offset+l._length*.9,f,l._length*.1,$n,"","e")}if(i===s._mainSubplot){var c=s._mainLinePosition;s.side!=="right"&&(c-=$n),Al(r,o,c,s._offset+s._length*.1,$n,s._length*.8,"ns",""),Al(r,o,c,s._offset+s._length*.9,$n,s._length*.1,"s",""),Al(r,o,c,s._offset,$n,s._length*.1,"n","")}}});var n=t._hoverlayer.node();n.onmousemove=function(i){i.target=r._fullLayout._lasthover,c3.hover(r,i,t._hoversubplot)},n.onclick=function(i){i.target=r._fullLayout._lasthover,c3.click(r,i)},n.onmousedown=function(i){r._fullLayout._lasthover.onmousedown(i)},v3.updateFx(r)}};v3.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";Cde(r._draggers,t)}});var _I=R((VEe,xI)=>{"use strict";var bI=Ct();xI.exports=function(r){for(var t=bI.layoutArrayContainers,a=bI.layoutArrayRegexes,n=r.split("[")[0],i,o,l=0;l{"use strict";var Ede=Ru(),V6=Ky(),tp=hc(),Lde=I_().sorterAsc,Y6=Ct();ap.containerArrayMatch=_I();var Dde=ap.isAddVal=function(r){return r==="add"||Ede(r)},wI=ap.isRemoveVal=function(r){return r===null||r==="remove"};ap.applyContainerArrayChanges=function(r,t,a,n,i){var o=t.astr,l=Y6.getComponentMethod(o,"supplyLayoutDefaults"),s=Y6.getComponentMethod(o,"draw"),u=Y6.getComponentMethod(o,"drawOne"),f=n.replot||n.recalc||l===V6||s===V6,c=r.layout,h=r._fullLayout;if(a[""]){Object.keys(a).length>1&&tp.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(wI(d))t.set(null);else if(Array.isArray(d))t.set(d);else return tp.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(l(c,h),s(r),!0)}var p=Object.keys(a).map(Number).sort(Lde),g=t.get(),m=g||[],x=i(h,o).get(),_=[],A=-1,b=m.length,T,S,M,k,D,P,N,q;for(T=0;Tm.length-(N?0:1)){tp.warn("index out of range",o,M);continue}if(P!==void 0)D.length>1&&tp.warn("Insertion & removal are incompatible with edits to the same index.",o,M),wI(P)?_.push(M):N?(P==="add"&&(P={}),m.splice(M,0,P),x&&x.splice(M,0,{})):tp.warn("Unrecognized full object edit value",o,M,P),A===-1&&(A=M);else for(S=0;S=0;T--)m.splice(_[T],1),x&&x.splice(_[T],1);if(m.length?g||t.set(m):t.set(null),f)return!1;if(l(c,h),u!==V6){var O;if(A===-1)O=p;else{for(b=Math.max(m.length,b),O=[],T=0;T=A));T++)O.push(M);for(T=A;T{"use strict";var kI=ia(),WEe=C_(),CI=Ct(),fo=fr(),np=jn(),EI=an(),LI=Qt(),ip=EI.cleanId,qde=EI.getFromTrace,W6=CI.traceIs;Tl.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&fo.log("Clearing previous rejected promises from queue."),e._promises=[]};Tl.cleanLayout=function(e){var r,t;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 a=(np.subplotsRegistry.cartesian||{}).attrRegex,n=(np.subplotsRegistry.polar||{}).attrRegex,i=(np.subplotsRegistry.ternary||{}).attrRegex,o=(np.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),LI.clean(e),e.template&&e.template.layout&&Tl.cleanLayout(e.template.layout),e};function Z0(e,r){var t=e[r],a=r.charAt(0);t&&t!=="paper"&&(e[r]=ip(t,a,!0))}Tl.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}Tl.hasParent=function(e,r){for(var t=SI(r);t;){if(t in e)return!0;t=SI(t)}return!1};var Pde=["x","y","z"];Tl.clearAxisTypes=function(e,r,t){for(var a=0;a{"use strict";var m3=ta(),Nde=ia(),Ide=J_(),Or=fr(),Fa=Or.nestedProperty,Z6=u1(),Ui=vE(),Zo=Ct(),A3=g0(),Lt=jn(),Fi=Va(),Ode=yw(),zde=Bo(),j6=Ca(),Bde=Qt(),Ude=H6().initInteractions,Gde=ju(),Hde=X0().clearOutline,NI=vc().dfltConfig,d3=AI(),Sn=DI(),Ta=Z2(),ff=dl(),Vde=ai().AX_NAME_PATTERN,X6=0,qI=5;function Yde(e,r,t,a){var n;if(e=Or.getGraphDiv(e),Z6.init(e),Or.isPlainObject(r)){var i=r;r=i.data,t=i.layout,a=i.config,n=i.frames}var o=Z6.triggerHandler(e,"plotly_beforeplot",[r,t,a]);if(o===!1)return Promise.reject();!r&&!t&&!Or.isPlotDiv(e)&&Or.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(n)return ca.addFrames(e,n)}OI(e,a),t||(t={}),m3.select(e).classed("js-plotly-plot",!0),j6.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var s=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(Sn.cleanData(r),s?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||s)&&(e.layout=Sn.cleanLayout(t)),Lt.supplyDefaults(e);var u=e._fullLayout,f=u._has("cartesian");u._replotting=!0,(s||u._shouldCreateBgLayer)&&(h1e(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),j6.initGradients(e),j6.initPatterns(e),s&&Fi.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&Lt.doCalcdata(e);for(var h=0;h=e.data.length||n<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(n,a+1)>-1||n>=0&&r.indexOf(-e.data.length+n)>-1||n<0&&r.indexOf(e.data.length+n)>-1)throw new Error("each index in "+t+" must be unique.")}}function zI(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),g3(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&g3(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function Jde(e,r,t){var a,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),a=0;a=0&&f=0&&f0&&typeof k.parts[N]!="string";)N--;var q=k.parts[N],O=k.parts[N-1]+"."+q,U=k.parts.slice(0,N).join("."),$=Fa(e.layout,U).get(),W=Fa(a,U).get(),H=k.get();if(D!==void 0){x[M]=D,_[M]=q==="reverse"?D:Qs(H);var B=A3.getLayoutValObject(a,k.parts);if(B&&B.impliedEdits&&D!==null)for(var V in B.impliedEdits)A(Or.relativeAttr(M,V),B.impliedEdits[V]);if(["width","height"].indexOf(M)!==-1)if(D){A("autosize",null);var j=M==="height"?"width":"height";A(j,a[j])}else a[M]=e._initialAutoSize[M];else if(M==="autosize")A("width",D?null:a.width),A("height",D?null:a.height);else if(O.match(XI))S(O),Fa(a,U+"._inputRange").set(null);else if(O.match(ZI)){S(O),Fa(a,U+"._inputRange").set(null);var K=Fa(a,U).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else O.match(JI)&&Fa(a,U+"._inputDomain").set(null);if(q==="type"){T=$;var ve=W.type==="linear"&&D==="log",xe=W.type==="log"&&D==="linear";if(ve||xe){if(!T||!T.range)A(U+".autorange",!0);else if(W.autorange)ve&&(T.range=T.range[1]>T.range[0]?[1,2]:[2,1]);else{var se=T.range[0],be=T.range[1];ve?(se<=0&&be<=0&&A(U+".autorange",!0),se<=0?se=be/1e6:be<=0&&(be=se/1e6),A(U+".range[0]",Math.log(se)/Math.LN10),A(U+".range[1]",Math.log(be)/Math.LN10)):(A(U+".range[0]",Math.pow(10,se)),A(U+".range[1]",Math.pow(10,be)))}Array.isArray(a._subplots.polar)&&a._subplots.polar.length&&a[k.parts[0]]&&k.parts[1]==="radialaxis"&&delete a[k.parts[0]]._subplot.viewInitial["radialaxis.range"],Zo.getComponentMethod("annotations","convertCoords")(e,W,D,A),Zo.getComponentMethod("images","convertCoords")(e,W,D,A)}else A(U+".autorange",!0),A(U+".range",null);Fa(a,U+"._inputRange").set(null)}else if(q.match(Vde)){var re=Fa(a,M).get(),ke=(D||{}).type;(!ke||ke==="-")&&(ke="linear"),Zo.getComponentMethod("annotations","convertCoords")(e,re,ke,A),Zo.getComponentMethod("images","convertCoords")(e,re,ke,A)}var ge=d3.containerArrayMatch(M);if(ge){f=ge.array,c=ge.index;var Ee=ge.property,De=B||{editType:"calc"};c!==""&&Ee===""&&(d3.isAddVal(D)?_[M]=null:d3.isRemoveVal(D)?_[M]=(Fa(t,f).get()||[])[c]:Or.warn("unrecognized full object value",r)),ff.update(m,De),u[f]||(u[f]={});var Ce=u[f][c];Ce||(Ce=u[f][c]={}),Ce[Ee]=D,delete r[M]}else q==="reverse"?($.range?$.range.reverse():(A(U+".autorange",!0),$.range=[1,0]),W.autorange?m.calc=!0:m.plot=!0):(M==="dragmode"&&(D===!1&&H!==!1||D!==!1&&H===!1)||a._has("scatter-like")&&a._has("regl")&&M==="dragmode"&&(D==="lasso"||D==="select")&&!(H==="lasso"||H==="select")?m.plot=!0:B?ff.update(m,B):m.calc=!0,k.set(D))}}for(f in u){var Y=d3.applyContainerArrayChanges(e,i(t,f),u[f],m,i);Y||(m.plot=!0)}for(var ae in b){T=Fi.getFromId(e,ae);var Z=T&&T._constraintGroup;if(Z){m.calc=!0;for(var Te in Z)b[Te]||(Fi.getFromId(e,Te)._constraintShrinkable=!0)}}(KI(e)||r.height||r.width)&&(m.plot=!0);var Pe=a.shapes;for(c=0;c1;)if(a.pop(),t=Fa(r,a.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function t1e(e,r){for(var t=0;t=n.length?n[0]:n[u]:n}function l(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function s(u,f){var c=0;return function(){if(u&&++c===f)return u()}}return new Promise(function(u,f){function c(){if(a._frameQueue.length!==0){for(;a._frameQueue.length;){var q=a._frameQueue.pop();q.onInterrupt&&q.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(q){if(q.length!==0){for(var O=0;Oa._timeToNext&&p()};q()}var m=0;function x(q){return Array.isArray(n)?m>=n.length?q.transitionOpts=n[m]:q.transitionOpts=n[0]:q.transitionOpts=n,m++,q}var _,A,b=[],T=r==null,S=Array.isArray(r),M=!T&&!S&&Or.isPlainObject(r);if(M)b.push({type:"object",data:x(Or.extendFlat({},r))});else if(T||["string","number"].indexOf(typeof r)!==-1)for(_=0;_0&&PP)&&N.push(A);b=N}}b.length>0?h(b):(e.emit("plotly_animated"),u())})}function u1e(e,r,t){if(e=Or.getGraphDiv(e),r==null)return Promise.resolve();if(!Or.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 a,n,i,o,l=e._transitionData._frames,s=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var u=l.length+r.length*2,f=[],c={};for(a=r.length-1;a>=0;a--)if(Or.isPlainObject(r[a])){var h=r[a].name,d=(s[h]||c[h]||{}).name,p=r[a].name,g=s[d]||c[d];d&&p&&typeof p=="number"&&g&&X6k.index?-1:M.index=0;a--){if(n=f[a].frame,typeof n.name=="number"&&Or.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;s[n.name="frame "+e._transitionData._counter++];);if(s[n.name]){for(i=0;i=0;t--)a=r[t],i.push({type:"delete",index:a}),o.unshift({type:"insert",index:a,value:n[a]});var l=Lt.modifyFrames,s=Lt.modifyFrames,u=[e,o],f=[e,i];return Ui&&Ui.add(e,l,u,s,f),Lt.modifyFrames(e,i)}function c1e(e){e=Or.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return Lt.cleanPlot([],{},t,r),Lt.purge(e),Z6.purge(e),r._container&&r._container.remove(),delete e._context,e}function v1e(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!Or.equalDomRects(t,r._lastBBox)){var a=r._invTransform=Or.inverseTransformMatrix(Or.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(a[0][0]*a[0][0]+a[0][1]*a[0][1]+a[0][2]*a[0][2]),r._invScaleY=Math.sqrt(a[1][0]*a[1][0]+a[1][1]*a[1][1]+a[1][2]*a[1][2]),r._lastBBox=t}}function h1e(e){var r=m3.select(e),t=e._fullLayout;if(t._calcInverseTransform=v1e,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var a={};m3.selectAll("defs").each(function(){this.id&&(a[this.id.split("-")[1]]=1)}),t._uid=Or.randstr(a)}t._paperdiv.selectAll(".main-svg").attr(Gde.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var n=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=n.append("g").classed("imagelayer",!0),t._shapeLowerLayer=n.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var i=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=i.append("g").classed("imagelayer",!0),t._shapeUpperLayer=i.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}ca.animate=s1e;ca.addFrames=u1e;ca.deleteFrames=f1e;ca.addTraces=VI;ca.deleteTraces=YI;ca.extendTraces=GI;ca.moveTraces=J6;ca.prependTraces=HI;ca.newPlot=Zde;ca._doPlot=Yde;ca.purge=c1e;ca.react=i1e;ca.redraw=Xde;ca.relayout=op;ca.restyle=b3;ca.setPlotConfig=Wde;ca.update=_3;ca._guiRelayout=K6(op);ca._guiRestyle=K6(b3);ca._guiUpdate=K6(_3);ca._storeDirectGUIEdit=Qde});var Uc=R(fs=>{"use strict";var d1e=Ct();fs.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};fs.getRedrawFunc=function(e){return function(){d1e.getComponentMethod("colorbar","draw")(e)}};fs.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};fs.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var QI=window.URL||window.webkitURL;fs.createObjectURL=function(e){return QI.createObjectURL(e)};fs.revokeObjectURL=function(e){return QI.revokeObjectURL(e)};fs.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=p1e(window.atob(e));return new window.Blob([t],{type:"image/"+r})};fs.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function p1e(e){for(var r=e.length,t=new ArrayBuffer(r),a=new Uint8Array(t),n=0;n{"use strict";var rA=ta(),JEe=fr(),m1e=Ca(),y1e=Qt(),$Ee=ju(),eA=/"/g,sp="TOBESTRIPPED",g1e=new RegExp('("'+sp+")|("+sp+'")',"g");function b1e(e){var r=rA.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":r.html(a).text()});return r.remove(),t}function x1e(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}eO.exports=function(r,t,a){var n=r._fullLayout,i=n._paper,o=n._toppaper,l=n.width,s=n.height,u;i.insert("rect",":first-child").call(m1e.setRect,0,0,l,s).call(y1e.fill,n.paper_bgcolor);var f=n._basePlotModules||[];for(u=0;u{"use strict";var _1e=fr(),w1e=_g().EventEmitter,up=Uc();function A1e(e){var r=e.emitter||new w1e,t=new Promise(function(a,n){var i=window.Image,o=e.svg,l=e.format||"png",s=e.canvas,u=e.scale||1,f=e.width||300,c=e.height||150,h=u*f,d=u*c,p=s.getContext("2d",{willReadFrequently:!0}),g=new i,m,x;l==="svg"||_1e.isSafari()?x=up.encodeSVG(o):(m=up.createBlob(o,"svg"),x=up.createObjectURL(m)),s.width=h,s.height=d,g.onload=function(){var _;switch(m=null,up.revokeObjectURL(x),l!=="svg"&&p.drawImage(g,0,0,h,d),l){case"jpeg":_=s.toDataURL("image/jpeg");break;case"png":_=s.toDataURL("image/png");break;case"webp":_=s.toDataURL("image/webp");break;case"svg":_=x;break;default:var A="Image format is not jpeg, png, svg or webp.";if(n(new Error(A)),!e.promise)return r.emit("error",A)}a(_),e.promise||r.emit("success",_)},g.onerror=function(_){if(m=null,up.revokeObjectURL(x),n(_),!e.promise)return r.emit("error",_)},g.src=x});return e.promise?t:r}rO.exports=A1e});var aA=R((eLe,nO)=>{"use strict";var tO=ia(),aO=Q6(),T1e=jn(),cs=fr(),fp=Uc(),M1e=M3(),S1e=S3(),k1e=Ry().version,tA={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 C1e(e,r){r=r||{};var t,a,n,i;cs.isPlainObject(e)?(t=e.data||[],a=e.layout||{},n=e.config||{},i={}):(e=cs.getGraphDiv(e),t=cs.extendDeep([],e.data),a=cs.extendDeep({},e.layout),n=e._context,i=e._fullLayout||{});function o(S){return!(S in r)||cs.validate(r[S],tA[S])}if(!o("width")&&r.width!==null||!o("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+cs.join2(tA.format.values,", "," or ")+".");var l={};function s(S,M){return cs.coerce(r,l,tA,S,M)}var u=s("format"),f=s("width"),c=s("height"),h=s("scale"),d=s("setBackground"),p=s("imageDataOnly"),g=document.createElement("div");g.style.position="absolute",g.style.left="-5000px",document.body.appendChild(g);var m=cs.extendFlat({},a);f?m.width=f:r.width===null&&tO(i.width)&&(m.width=i.width),c?m.height=c:r.height===null&&tO(i.height)&&(m.height=i.height);var x=cs.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),_=fp.getRedrawFunc(g);function A(){return new Promise(function(S){setTimeout(S,fp.getDelay(g._fullLayout))})}function b(){return new Promise(function(S,M){var k=M1e(g,u,h),D=g._fullLayout.width,P=g._fullLayout.height;function N(){aO.purge(g),document.body.removeChild(g)}if(u==="full-json"){var q=T1e.graphJson(g,!1,"keepdata","object",!0,!0);return q.version=k1e,q=JSON.stringify(q),N(),S(p?q:fp.encodeJSON(q))}if(N(),u==="svg")return S(p?k:fp.encodeSVG(k));var O=document.createElement("canvas");O.id=cs.randstr(),S1e({format:u,width:D,height:P,scale:h,canvas:O,svg:k,promise:!0}).then(S).catch(M)})}function T(S){return p?S.replace(fp.IMAGE_URL_PREFIX,""):S}return new Promise(function(S,M){aO.newPlot(g,t,m,x).then(_).then(A).then(b).then(function(k){S(T(k))}).catch(function(k){M(k)})})}nO.exports=C1e});var sO=R((rLe,lO)=>{"use strict";var Jo=fr(),E1e=jn(),L1e=g0(),D1e=vc().dfltConfig,Ml=Jo.isPlainObject,Hc=Array.isArray,iO=Jo.isArrayOrTypedArray;lO.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var a=L1e.get(),n=[],i={_context:Jo.extendFlat({},D1e)},o,l;Hc(r)?(i.data=Jo.extendDeep([],r),o=r):(i.data=[],o=[],n.push(Kn("array","data"))),Ml(t)?(i.layout=Jo.extendDeep({},t),l=t):(i.layout={},l={},arguments.length>1&&n.push(Kn("object","layout"))),E1e.supplyDefaults(i);for(var s=i._fullData,u=o.length,f=0;fc.length&&a.push(Kn("unused",n,u.concat(c.length)));var x=c.length,_=Array.isArray(m);_&&(x=Math.min(x,m.length));var A,b,T,S,M;if(h.dimensions===2)for(b=0;bc[b].length&&a.push(Kn("unused",n,u.concat(b,c[b].length)));var k=c[b].length;for(A=0;A<(_?Math.min(k,m[b].length):k);A++)T=_?m[b][A]:m,S=f[b][A],M=c[b][A],Jo.validate(S,T)?M!==S&&M!==+S&&a.push(Kn("dynamic",n,u.concat(b,A),S,M)):a.push(Kn("value",n,u.concat(b,A),S))}else a.push(Kn("array",n,u.concat(b),f[b]));else for(b=0;b{"use strict";var O1e=fr(),C3=Uc();function z1e(e,r,t){var a=document.createElement("a"),n="download"in a,i=new Promise(function(o,l){var s,u;if(n)return s=C3.createBlob(e,t),u=C3.createObjectURL(s),a.href=u,a.download=r,document.body.appendChild(a),a.click(),document.body.removeChild(a),C3.revokeObjectURL(u),s=null,o(r);if(O1e.isSafari()){var f=t==="svg"?",":";base64,";return C3.octetStream(f+encodeURIComponent(e)),o(r)}l(new Error("download error"))});return i}uO.exports=z1e});var nA=R((nLe,vO)=>{"use strict";var cO=fr(),B1e=aA(),U1e=fO(),aLe=Uc();function G1e(e,r){var t;return cO.isPlainObject(e)||(t=cO.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(a,n){t&&t._snapshotInProgress&&n(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var i=B1e(e,r),o=r.filename||e.fn||"newplot";o+="."+r.format.replace("-","."),i.then(function(l){return t&&(t._snapshotInProgress=!1),U1e(l,o,r.format)}).then(function(l){a(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),n(l)})})}vO.exports=G1e});var yO=R(iA=>{"use strict";var co=fr(),vo=co.isPlainObject,hO=g0(),dO=jn(),H1e=hl(),pO=Da(),mO=vc().dfltConfig;iA.makeTemplate=function(e){e=co.isPlainObject(e)?e:co.getGraphDiv(e),e=co.extendDeep({_context:mO},{data:e.data,layout:e.layout}),dO.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var a={data:{},layout:{}};r.forEach(function(d){var p={};cp(d,p,Y1e.bind(null,d));var g=co.coerce(d,{},H1e,"type"),m=a.data[g];m||(m=a.data[g]=[]),m.push(p)}),cp(t,a.layout,V1e.bind(null,t)),delete a.layout.template;var n=t.template;if(vo(n)){var i=n.layout,o,l,s,u,f,c;vo(i)&&E3(i,a.layout);var h=n.data;if(vo(h)){for(l in a.data)if(s=h[l],Array.isArray(s)){for(f=a.data[l],c=f.length,u=s.length,o=0;ox?o.push({code:"unused",traceType:d,templateCount:m,dataCount:x}):x>m&&o.push({code:"reused",traceType:d,templateCount:m,dataCount:x})}}function _(A,b){for(var T in A)if(T.charAt(0)!=="_"){var S=A[T],M=$o(A,T,b);vo(S)?(Array.isArray(A)&&S._template===!1&&S.templateitemname&&o.push({code:"missing",path:M,templateitemname:S.templateitemname}),_(S,M)):Array.isArray(S)&&W1e(S)&&_(S,M)}}if(_({data:s,layout:l},""),o.length)return o.map(j1e)};function W1e(e){for(var r=0;r{"use strict";var On=Q6();Ya._doPlot=On._doPlot;Ya.newPlot=On.newPlot;Ya.restyle=On.restyle;Ya.relayout=On.relayout;Ya.redraw=On.redraw;Ya.update=On.update;Ya._guiRestyle=On._guiRestyle;Ya._guiRelayout=On._guiRelayout;Ya._guiUpdate=On._guiUpdate;Ya._storeDirectGUIEdit=On._storeDirectGUIEdit;Ya.react=On.react;Ya.extendTraces=On.extendTraces;Ya.prependTraces=On.prependTraces;Ya.addTraces=On.addTraces;Ya.deleteTraces=On.deleteTraces;Ya.moveTraces=On.moveTraces;Ya.purge=On.purge;Ya.addFrames=On.addFrames;Ya.deleteFrames=On.deleteFrames;Ya.animate=On.animate;Ya.setPlotConfig=On.setPlotConfig;var X1e=r1().getGraphDiv,Z1e=G2().eraseActiveShape;Ya.deleteActiveShape=function(e){return Z1e(X1e(e))};Ya.toImage=aA();Ya.validate=sO();Ya.downloadImage=nA();var gO=yO();Ya.makeTemplate=gO.makeTemplate;Ya.validateTemplate=gO.validateTemplate});var lA=R((lLe,xO)=>{"use strict";var oA=fr(),J1e=Ct();xO.exports=function(r,t,a,n){var i=n("x"),o=n("y"),l,s=J1e.getComponentMethod("calendars","handleTraceDefaults");if(s(r,t,["x","y"],a),i){var u=oA.minRowLength(i);o?l=Math.min(u,oA.minRowLength(o)):(l=u,n("y0"),n("dy"))}else{if(!o)return 0;l=oA.minRowLength(o),n("x0"),n("dx")}return t._length=l,l}});var sA=R((sLe,AO)=>{"use strict";var _O=fr().dateTick0,$1e=_n(),K1e=$1e.ONEWEEK;function wO(e,r){return e%K1e===0?_O(r,1):_O(r,0)}AO.exports=function(r,t,a,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",wO(o,t.xcalendar)),n("xperiodalignment"))}if(i.y){var l=n("yperiod");l&&(n("yperiod0",wO(l,t.ycalendar)),n("yperiodalignment"))}}});var SO=R((uLe,MO)=>{"use strict";var TO=["orientation","groupnorm","stackgaps"];MO.exports=function(r,t,a,n){var i=a._scatterStackOpts,o=n("stackgroup");if(o){var l=t.xaxis+t.yaxis,s=i[l];s||(s=i[l]={});var u=s[o],f=!1;u?u.traces.push(t):(u=s[o]={traceIndices:[],traces:[t]},f=!0);for(var c={orientation:t.x&&!t.y?"h":"v"},h=0;h{"use strict";var kO=Qt(),CO=gl().hasColorscale,EO=w0(),Q1e=ni();LO.exports=function(r,t,a,n,i,o){var l=Q1e.isBubble(r),s=(r.line||{}).color,u;if(o=o||{},s&&(a=s),i("marker.symbol"),i("marker.opacity",l?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",a),CO(r,"marker")&&EO(r,t,n,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&t.marker.color!==s?u=s:l?u=kO.background:u=kO.defaultLine,i("marker.line.color",u),CO(r,"marker.line")&&EO(r,t,n,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",l?1:0)),l&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var f=i("marker.gradient.type");f!=="none"&&i("marker.gradient.color")}}});var uA=R((cLe,DO)=>{"use strict";var epe=fr().isArrayOrTypedArray,rpe=gl().hasColorscale,tpe=w0();DO.exports=function(r,t,a,n,i,o){o||(o={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),i("line.color",a),rpe(r,"line"))tpe(r,t,n,i,{prefix:"line.",cLetter:"c"});else{var s=(epe(l)?!1:l)||a;i("line.color",s)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var FO=R((vLe,qO)=>{"use strict";qO.exports=function(r,t,a){var n=a("line.shape");n==="spline"&&a("line.smoothing")}});var fA=R((hLe,RO)=>{"use strict";var ape=fr();RO.exports=function(e,r,t,a,n){n=n||{},a("textposition"),ape.coerceFont(a,"textfont",n.font||t.font,n),n.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}});var cA=R((dLe,NO)=>{"use strict";var q3=Qt(),PO=fr().isArrayOrTypedArray;function npe(e){for(var r=q3.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var IO=fr(),ipe=Ct(),ope=sf(),lpe=Q1(),J0=ni(),spe=lA(),upe=sA(),fpe=SO(),cpe=D3(),vpe=uA(),OO=FO(),hpe=fA(),dpe=cA(),ppe=fr().coercePattern;zO.exports=function(r,t,a,n){function i(d,p){return IO.coerce(r,t,ope,d,p)}var o=spe(r,t,n,i);if(o||(t.visible=!1),!!t.visible){upe(r,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var l=fpe(r,t,n,i);n.scattermode==="group"&&t.orientation===void 0&&i("orientation","v");var s=!l&&o{"use strict";var mpe=N1().getAxisGroup;UO.exports=function(r,t,a,n,i){var o=t.orientation,l=t[{v:"x",h:"y"}[o]+"axis"],s=mpe(a,l)+o,u=a._alignmentOpts||{},f=n("alignmentgroup"),c=u[s];c||(c=u[s]={});var h=c[f];h?h.traces.push(t):h=c[f]={traces:[t],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=h.offsetGroups,g=p[d];t._offsetIndex=0,(i!=="group"||d)&&(g||(g=p[d]={offsetIndex:Object.keys(p).length}),t._offsetIndex=g.offsetIndex)}});var vA=R((yLe,HO)=>{"use strict";var ype=fr(),gpe=GO(),bpe=sf();HO.exports=function(r,t){var a,n,i,o=t.scattermode;function l(h){return ype.coerce(n._input,n,bpe,h)}if(t.scattermode==="group")for(i=0;i=0;f--){var c=r[f];if(c.type==="scatter"&&c.xaxis===s.xaxis&&c.yaxis===s.yaxis){c.opacity=void 0;break}}}}}});var YO=R((gLe,VO)=>{"use strict";var xpe=fr(),_pe=Sg();VO.exports=function(e,r){function t(n,i){return xpe.coerce(e,r,_pe,n,i)}var a=r.barmode==="group";r.scattermode==="group"&&t("scattergap",a?r.bargap:.2)}});var hA=R((bLe,jO)=>{"use strict";var wpe=ia(),WO=fr(),Ape=WO.dateTime2ms,F3=WO.incrementMonth,Tpe=_n(),Mpe=Tpe.ONEAVGMONTH;jO.exports=function(r,t,a,n){if(t.type!=="date")return{vals:n};var i=r[a+"periodalignment"];if(!i)return{vals:n};var o=r[a+"period"],l;if(wpe(o)){if(o=+o,o<=0)return{vals:n}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:n}}for(var u=t.calendar,f=i==="start",c=i==="end",h=r[a+"period0"],d=Ape(h,u)||0,p=[],g=[],m=[],x=n.length,_=0;_A;)S=F3(S,-l,u);for(;S<=A;)S=F3(S,l,u);T=F3(S,-l,u)}else{for(b=Math.round((A-d)/o),S=d+b*o;S>A;)S-=o;for(;S<=A;)S+=o;T=S-o}p[_]=f?T:c?S:(T+S)/2,g[_]=T,m[_]=S}return{vals:p,starts:g,ends:m}}});var vp=R((xLe,ZO)=>{"use strict";var dA=gl().hasColorscale,pA=D4(),XO=ni();ZO.exports=function(r,t){XO.hasLines(t)&&dA(t,"line")&&pA(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),XO.hasMarkers(t)&&(dA(t,"marker")&&pA(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),dA(t,"marker.line")&&pA(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var mA=R((_Le,JO)=>{"use strict";var sn=fr();JO.exports=function(r,t){for(var a=0;a{"use strict";var $O=fr();KO.exports=function(r,t){$O.isArrayOrTypedArray(t.selectedpoints)&&$O.tagSelected(r,t)}});var $0=R((ALe,oz)=>{"use strict";var ez=ia(),gA=fr(),hp=Va(),rz=hA(),yA=_n().BADNUM,bA=ni(),Spe=vp(),kpe=mA(),Cpe=QO();function Epe(e,r){var t=e._fullLayout,a=r._xA=hp.getFromId(e,r.xaxis||"x","x"),n=r._yA=hp.getFromId(e,r.yaxis||"y","y"),i=a.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),l=rz(r,a,"x",i),s=rz(r,n,"y",o),u=l.vals,f=s.vals,c=r._length,h=new Array(c),d=r.ids,p=xA(r,t,a,n),g=!1,m,x,_,A,b,T;nz(t,r);var S="x",M="y",k;if(p)gA.pushUnique(p.traceIndices,r.index),m=p.orientation==="v",m?(M="s",k="x"):(S="s",k="y"),b=p.stackgaps==="interpolate";else{var D=az(r,c);tz(e,r,a,n,u,f,D)}var P=!!r.xperiodalignment,N=!!r.yperiodalignment;for(x=0;xx&&h[A].gap;)A--;for(T=h[A].s,_=h.length-1;_>A;_--)h[_].s=T;for(;x{"use strict";lz.exports=R3;var Lpe=fr().distinctVals;function R3(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,a=r.posAxis._id.charAt(0),n=[],i=0;i{"use strict";var Ko=ia(),cf=fr().isArrayOrTypedArray,K0=_n().BADNUM,Dpe=Ct(),dp=Va(),qpe=N1().getAxisGroup,P3=sz();function Fpe(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;us+o||!Ko(l))}for(var f=0;f{"use strict";var dz=$0(),pz=hz().setGroupPositions;function Ype(e,r){for(var t=r.xaxis,a=r.yaxis,n=e._fullLayout,i=e._fullData,o=e.calcdata,l=[],s=[],u=0;uD[f]&&f{"use strict";var jpe=Ca(),_z=_n(),pp=_z.BADNUM,wz=_z.LOG_CLIP,gz=wz+.5,bz=wz-.5,N3=fr(),Xpe=N3.segmentsIntersect,xz=N3.constrain,SA=Q1();Az.exports=function(r,t){var a=t.trace||{},n=t.xaxis,i=t.yaxis,o=n.type==="log",l=i.type==="log",s=n._length,u=i._length,f=t.backoff,c=a.marker,h=t.connectGaps,d=t.baseTolerance,p=t.shape,g=p==="linear",m=a.fill&&a.fill!=="none",x=[],_=SA.minTolerance,A=r.length,b=new Array(A),T=0,S,M,k,D,P,N,q,O,U,$,W,H,B,V,j,K;function ve(Ze){var oe=r[Ze];if(!oe)return!1;var ye=t.linearized?n.l2p(oe.x):n.c2p(oe.x),Ge=t.linearized?i.l2p(oe.y):i.c2p(oe.y);if(ye===pp){if(o&&(ye=n.c2p(oe.x,!0)),ye===pp)return!1;l&&Ge===pp&&(ye*=Math.abs(n._m*u*(n._m>0?gz:bz)/(i._m*s*(i._m>0?gz:bz)))),ye*=1e3}if(Ge===pp){if(l&&(Ge=i.c2p(oe.y,!0)),Ge===pp)return!1;Ge*=1e3}return[ye,Ge]}function xe(Ze,oe,ye,Ge){var Ie=ye-Ze,Wr=Ge-oe,tt=.5-Ze,$r=.5-oe,St=Ie*Ie+Wr*Wr,ea=Ie*tt+Wr*$r;if(ea>0&&ea1||Math.abs(tt.y-ye[0][1])>1)&&(tt=[tt.x,tt.y],Ge&&ke(tt,Ze)De||Ze[1]Y)return[xz(Ze[0],Ee,De),xz(Ze[1],Ce,Y)]}function yr(Ze,oe){if(Ze[0]===oe[0]&&(Ze[0]===Ee||Ze[0]===De)||Ze[1]===oe[1]&&(Ze[1]===Ce||Ze[1]===Y))return!0}function ir(Ze,oe){var ye=[],Ge=or(Ze),Ie=or(oe);return Ge&&Ie&&yr(Ge,Ie)||(Ge&&ye.push(Ge),Ie&&ye.push(Ie)),ye}function Xe(Ze,oe,ye){return function(Ge,Ie){var Wr=or(Ge),tt=or(Ie),$r=[];if(Wr&&tt&&yr(Wr,tt))return $r;Wr&&$r.push(Wr),tt&&$r.push(tt);var St=2*N3.constrain((Ge[Ze]+Ie[Ze])/2,oe,ye)-((Wr||Ge)[Ze]+(tt||Ie)[Ze]);if(St){var ea;Wr&&tt?ea=St>0==Wr[Ze]>tt[Ze]?Wr:tt:ea=Wr||tt,ea[Ze]+=St}return $r}}var Lr;p==="linear"||p==="spline"?Lr=Je:p==="hv"||p==="vh"?Lr=ir:p==="hvh"?Lr=Xe(0,Ee,De):p==="vhv"&&(Lr=Xe(1,Ce,Y));function Ar(Ze,oe){var ye=oe[0]-Ze[0],Ge=(oe[1]-Ze[1])/ye,Ie=(Ze[1]*oe[0]-oe[1]*Ze[0])/ye;return Ie>0?[Ge>0?Ee:De,Y]:[Ge>0?De:Ee,Ce]}function de(Ze){var oe=Ze[0],ye=Ze[1],Ge=oe===b[T-1][0],Ie=ye===b[T-1][1];if(!(Ge&&Ie))if(T>1){var Wr=oe===b[T-2][0],tt=ye===b[T-2][1];Ge&&(oe===Ee||oe===De)&&Wr?tt?T--:b[T-1]=Ze:Ie&&(ye===Ce||ye===Y)&&tt?Wr?T--:b[T-1]=Ze:b[T++]=Ze}else b[T++]=Ze}function Oe(Ze){b[T-1][0]!==Ze[0]&&b[T-1][1]!==Ze[1]&&de([Pe,Ne]),de(Ze),lr=null,Pe=Ne=0}var Ue=N3.isArrayOrTypedArray(c);function rt(Ze){if(Ze&&f&&(Ze.i=S,Ze.d=r,Ze.trace=a,Ze.marker=Ue?c[Ze.i]:c,Ze.backoff=f),se=Ze[0]/s,be=Ze[1]/u,Z=Ze[0]De?De:0,Te=Ze[1]Y?Y:0,Z||Te){if(!T)b[T++]=[Z||Ze[0],Te||Ze[1]];else if(lr){var oe=Lr(lr,Ze);oe.length>1&&(Oe(oe[0]),b[T++]=oe[1])}else Ke=Lr(b[T-1],Ze)[0],b[T++]=Ke;var ye=b[T-1];Z&&Te&&(ye[0]!==Z||ye[1]!==Te)?(lr&&(Pe!==Z&&Ne!==Te?de(Pe&&Ne?Ar(lr,Ze):[Pe||Z,Ne||Te]):Pe&&Ne&&de([Pe,Ne])),de([Z,Te])):Pe-Z&&Ne-Te&&de([Z||Pe,Te||Ne]),lr=Ze,Pe=Z,Ne=Te}else lr&&Oe(Lr(lr,Ze)[0]),b[T++]=Ze}for(S=0;Sre(N,Ur))break;k=N,B=U[0]*O[0]+U[1]*O[1],B>W?(W=B,D=N,q=!1):B=r.length||!N)break;rt(N),M=N}}lr&&de([Pe||lr[0],Ne||lr[1]]),x.push(b.slice(0,T))}var Ye=p.slice(p.length-1);if(f&&Ye!=="h"&&Ye!=="v"){for(var Ve=!1,pr=-1,Tr=[],mr=0;mr{"use strict";var Mz={tonextx:1,tonexty:1,tonext:1};Sz.exports=function(r,t,a){var n,i,o,l,s,u={},f=!1,c=-1,h=0,d=-1;for(i=0;i=0?s=d:(s=d=h,h++),s{"use strict";var Sl=ta(),Zpe=Ct(),mp=fr(),eh=mp.ensureSingle,Cz=mp.identity,un=Ca(),rh=ni(),Jpe=Tz(),$pe=kA(),I3=w6().tester;Ez.exports=function(r,t,a,n,i,o){var l,s,u=!i,f=!!i&&i.duration>0,c=$pe(r,t,a);if(l=n.selectAll("g.trace").data(c,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),Kpe(r,l,t),f){o&&(s=o());var h=Sl.transition().duration(i.duration).ease(i.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});h.each(function(){n.selectAll("g.trace").each(function(d,p){kz(r,p,t,d,c,this,i)})})}else l.each(function(d,p){kz(r,p,t,d,c,this,i)});u&&l.exit().remove(),n.selectAll("path:not([d])").remove()};function Kpe(e,r,t){r.each(function(a){var n=eh(Sl.select(this),"g","fills");un.setClipUrl(n,t.layerClipId,e);var i=a[0].trace,o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var l=n.selectAll("g").data(o,Cz);l.enter().append("g"),l.exit().each(function(s){i[s]=null}).remove(),l.order().each(function(s){i[s]=eh(Sl.select(this),"path","js-fill")})})}function kz(e,r,t,a,n,i,o){var l=e._context.staticPlot,s;Qpe(e,r,t,a,n);var u=!!o&&o.duration>0;function f(Xe){return u?Xe.transition():Xe}var c=t.xaxis,h=t.yaxis,d=a[0].trace,p=d.line,g=Sl.select(i),m=eh(g,"g","errorbars"),x=eh(g,"g","lines"),_=eh(g,"g","points"),A=eh(g,"g","text");if(Zpe.getComponentMethod("errorbars","plot")(e,m,t,o),d.visible!==!0)return;f(g).style("opacity",d.opacity);var b,T,S=d.fill.charAt(d.fill.length-1);S!=="x"&&S!=="y"&&(S="");var M,k;S==="y"?(M=1,k=h.c2p(0,!0)):S==="x"&&(M=0,k=c.c2p(0,!0)),a[0][t.isRangePlot?"nodeRangePlot3":"node3"]=g;var D="",P=[],N=d._prevtrace,q=null,O=null;N&&(D=N._prevRevpath||"",T=N._nextFill,P=N._ownPolygons,q=N._fillsegments,O=N._fillElement);var U,$,W="",H="",B,V,j,K,ve,xe,se=[];d._polygons=[];var be=[],re=[],ke=mp.noop;if(b=d._ownFill,rh.hasLines(d)||d.fill!=="none"){T&&T.datum(a),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(B=un.steps(p.shape),V=un.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?B=V=function(Xe){var Lr=Xe[Xe.length-1];return Xe.length>1&&Xe[0][0]===Lr[0]&&Xe[0][1]===Lr[1]?un.smoothclosed(Xe.slice(1),p.smoothing):un.smoothopen(Xe,p.smoothing)}:B=V=function(Xe){return"M"+Xe.join("L")},j=function(Xe){return V(Xe.reverse())},re=Jpe(a,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),be=new Array(re.length);var ge=0;for(s=0;s=l[0]&&g.x<=l[1]&&g.y>=s[0]&&g.y<=s[1]}),h=Math.ceil(c.length/f),d=0;n.forEach(function(g,m){var x=g[0].trace;rh.hasMarkers(x)&&x.marker.maxdisplayed>0&&m{"use strict";Dz.exports={container:"marker",min:"cmin",max:"cmax"}});var CA=R((DLe,qz)=>{"use strict";var z3=Va();qz.exports=function(r,t,a){var n={},i={_fullLayout:a},o=z3.getFromTrace(i,t,"x"),l=z3.getFromTrace(i,t,"y"),s=r.orig_x;s===void 0&&(s=r.x);var u=r.orig_y;return u===void 0&&(u=r.y),n.xLabel=z3.tickText(o,o.c2l(s),!0).text,n.yLabel=z3.tickText(l,l.c2l(u),!0).text,n}});var qA=R((qLe,Fz)=>{"use strict";var EA=ta(),th=Ca(),eme=Ct();function rme(e){var r=EA.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var a=EA.select(this),n=t.trace||t[0].trace;LA(a,n,e)}),r.selectAll("g.text").each(function(t){var a=EA.select(this),n=t.trace||t[0].trace;DA(a,n,e)}),r.selectAll("g.trace path.js-line").call(th.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(th.fillGroupStyle,e,!1),eme.getComponentMethod("errorbars","style")(r)}function LA(e,r,t){th.pointStyle(e.selectAll("path.point"),r,t)}function DA(e,r,t){th.textPointStyle(e.selectAll("text"),r,t)}function tme(e,r,t){var a=r[0].trace;a.selectedpoints?(th.selectedPointStyle(t.selectAll("path.point"),a),th.selectedTextStyle(t.selectAll("text"),a)):(LA(t,a,e),DA(t,a,e))}Fz.exports={style:rme,stylePoints:LA,styleText:DA,styleOnSelect:tme}});var FA=R((FLe,Rz)=>{"use strict";var ah=Qt(),ame=ni();Rz.exports=function(r,t){var a,n;if(r.mode==="lines")return a=r.line.color,a&&ah.opacity(a)?a:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var i=t.mcc||(r.marker||{}).color,o=t.mlcc||((r.marker||{}).line||{}).color;return n=i&&ah.opacity(i)?i:o&&ah.opacity(o)&&(t.mlw||((r.marker||{}).line||{}).width)?o:"",n?ah.opacity(n)<.3?ah.addOpacity(n,.3):n:(a=(r.line||{}).color,a&&ah.opacity(a)&&ame.hasLines(r)&&r.line.width?a:r.fillcolor)}});var Iz=R((RLe,Nz)=>{"use strict";var B3=fr(),Pz=rf(),nme=Ct(),ime=FA(),RA=Qt(),ome=B3.fillText;Nz.exports=function(r,t,a,n){var i=r.cd,o=i[0].trace,l=r.xa,s=r.ya,u=l.c2p(t),f=s.c2p(a),c=[u,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,g=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(H){if(p){var B=l.c2p(H.xStart),V=l.c2p(H.xEnd);return u>=Math.min(B,V)&&u<=Math.max(B,V)?0:1/0}var j=Math.max(3,H.mrc||0),K=1-1/j,ve=Math.abs(l.c2p(H.x)-u);return ve=Math.min(B,V)&&f<=Math.max(B,V)?0:1/0}var j=Math.max(3,H.mrc||0),K=1-1/j,ve=Math.abs(s.c2p(H.y)-f);return vese!=Y>=se&&(Ee=ke[re-1][0],De=ke[re][0],Y-Ce&&(ge=Ee+(De-Ee)*(se-Ce)/(Y-Ce),j=Math.min(j,ge),K=Math.max(K,ge)));return j=Math.max(j,0),K=Math.min(K,l._length),{x0:j,x1:K,y0:se,y1:se}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=q(o._fillElement)&&!q(o._fillExclusionElement);if(U){var $=O(o._polygons);$===null&&($={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var W=RA.defaultLine;return RA.opacity(o.fillcolor)?W=o.fillcolor:RA.opacity((o.line||{}).color)&&(W=o.line.color),B3.extendFlat(r,{distance:r.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:W,hovertemplate:!1}),delete r.index,o.text&&!B3.isArrayOrTypedArray(o.text)?r.text=String(o.text):r.text=o.name,[r]}}}});var Bz=R((PLe,zz)=>{"use strict";var Oz=ni();zz.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l=a[0].trace,s,u,f,c,h=!Oz.hasMarkers(l)&&!Oz.hasText(l);if(h)return[];if(t===!1)for(s=0;s{"use strict";Uz.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var Wz=R((ILe,Yz)=>{"use strict";var yp=Ct().traceIs,PA=$4();Yz.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var i=a("type",(n.splomStash||{}).type);i==="-"&&(lme(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function lme(e,r){if(e.type==="-"){var t=e._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var i=sme(r,t,a);if(i){if(i.type==="histogram"&&a==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=a+"calendar",l=i[o],s={noMultiCategory:!yp(i,"cartesian")||yp(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&a==={h:"x",v:"y"}[i.orientation||"v"]&&(s.noMultiCategory=!0),s.autotypenumbers=e.autotypenumbers,Vz(i,a)){var u=Hz(i),f=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(Vz(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function Hz(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Vz(e,r){var t=Hz(e),a=yp(e,"box-violin"),n=yp(e._fullInput||{},"candlestick");return a&&!n&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var Xz=R((OLe,jz)=>{"use strict";var ume=ro().isTypedArraySpec;function fme(e,r){var t=r.dataAttr||e._id.charAt(0),a={},n,i,o;if(r.axData)n=r.axData;else for(n=[],i=0;i0||ume(i),l;o&&(l="array");var s=a("categoryorder",l),u;s==="array"&&(u=a("categoryarray")),!o&&s==="array"&&(s=t.categoryorder="trace"),s==="trace"?t._initialCategories=[]:s==="array"?t._initialCategories=u.slice():(u=fme(t,n).sort(),s==="category ascending"?t._initialCategories=u:s==="category descending"&&(t._initialCategories=u.reverse()))}}});var $z=R((zLe,Jz)=>{"use strict";var Zz=vl().mix,cme=Kl(),vme=fr();Jz.exports=function(r,t,a,n){n=n||{};var i=n.dfltColor;function o(M,k){return vme.coerce2(r,t,n.attributes,M,k)}var l=o("linecolor",i),s=o("linewidth"),u=a("showline",n.showLine||!!l||!!s);u||(delete t.linecolor,delete t.linewidth);var f=Zz(i,n.bgColor,n.blend||cme.lightFraction).toRgbString(),c=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),p=a("showgrid",n.showGrid||!!c||!!h||!!d);if(p||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),n.hasMinor){var g=Zz(t.gridcolor,n.bgColor,67).toRgbString(),m=o("minor.gridcolor",g),x=o("minor.gridwidth",t.gridwidth||1),_=o("minor.griddash",t.griddash||"solid"),A=a("minor.showgrid",!!m||!!x||!!_);A||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!n.noZeroLine){var b=o("zerolinecolor",i),T=o("zerolinewidth"),S=a("zeroline",n.showGrid||!!b||!!T);S||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var IA=R((BLe,aB)=>{"use strict";var Kz=ia(),hme=Ct(),gp=fr(),dme=Da(),pme=wo(),NA=Bo(),Qz=x4(),eB=w4(),mme=M4(),yme=S4(),gme=Xz(),bme=$z(),xme=yw(),rB=Jg(),U3=ai().WEEKDAY_PATTERN,_me=ai().HOUR_PATTERN;aB.exports=function(r,t,a,n,i){var o=n.letter,l=n.font||{},s=n.splomStash||{},u=a("visible",!n.visibleDflt),f=t._template||{},c=t.type||f.type||"-",h;if(c==="date"){var d=hme.getComponentMethod("calendars","handleDefaults");d(r,t,"calendar",n.calendar),n.noTicklabelmode||(h=a("ticklabelmode"))}!n.noTicklabelindex&&(c==="date"||c==="linear")&&a("ticklabelindex");var p="";(!n.noTicklabelposition||c==="multicategory")&&(p=gp.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||a("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),rB(t,i),xme(r,t,a,n),gme(r,t,a,n),c!=="category"&&!n.noHover&&a("hoverformat");var g=a("color"),m=g!==NA.color.dflt?g:l.color,x=s.label||i._dfltTitle[o];if(yme(r,t,a,c,n),!u)return t;a("title.text",x),gp.coerceFont(a,"title.font",l,{overrideDflt:{size:gp.bigFont(l.size),color:m}}),Qz(r,t,a,c);var _=n.hasMinor;if(_&&(dme.newContainer(t,"minor"),Qz(r,t,a,c,{isMinor:!0})),mme(r,t,a,c,n),eB(r,t,a,n),_){var A=n.isMinor;n.isMinor=!0,eB(r,t,a,n),n.isMinor=A}bme(r,t,a,{dfltColor:g,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:_,attributes:NA}),_&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&a("mirror");var b=c==="multicategory";if(!n.noTickson&&(c==="category"||b)&&(t.ticks||t.showgrid)){var T;b&&(T="boundaries");var S=a("tickson",T);S==="boundaries"&&delete t.ticklabelposition}if(b){var M=a("showdividers");M&&(a("dividercolor"),a("dividerwidth"))}if(c==="date")if(pme(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:wme}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var k=0;k=2){var o="",l,s;if(i.length===2){for(l=0;l<2;l++)if(s=tB(i[l]),s){o=U3;break}}var u=a("pattern",o);if(u===U3)for(l=0;l<2;l++)s=tB(i[l]),s&&(r.bounds[l]=i[l]=s-1);if(u)for(l=0;l<2;l++)switch(s=i[l],u){case U3:if(!Kz(s)){r.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){r.enabled=!1;return}r.bounds[l]=i[l]=s;break;case _me:if(!Kz(s)){r.enabled=!1;return}if(s=+s,s<0||s>24){r.enabled=!1;return}r.bounds[l]=i[l]=s;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(i[0]>f[0]&&i[1]{"use strict";var Tme=ia(),G3=fr();nB.exports=function(r,t,a,n){var i=n.counterAxes||[],o=n.overlayableAxes||[],l=n.letter,s=n.grid,u=n.overlayingDomain,f,c,h,d,p,g;s&&(c=s._domains[l][s._axisMap[t._id]],f=s._anchors[t._id],c&&(h=s[l+"side"].split(" ")[0],d=s.domain[l][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(Tme(r.position)?"free":i[0]||"free"),h=h||(l==="x"?"bottom":"left"),d=d||0,p=0,g=!1;var m=G3.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:f}},"anchor"),x=G3.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(l==="y"){var _=a("autoshift");_&&(d=x==="left"?u[0]:u[1],g=t.automargin?t.automargin:!0,p=x==="left"?-3:3),a("shift",p)}a("position",d)}a("automargin",g);var A=!1;if(o.length&&(A=G3.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!A){var b=a("domain",c);b[0]>b[1]-1/4096&&(t.domain=c),G3.noneOrAll(r.domain,t.domain,c),t.tickmode==="sync"&&(t.tickmode="auto")}return a("layer"),t}});var hB=R((GLe,vB)=>{"use strict";var Vc=fr(),iB=Qt(),Mme=js().isUnifiedHover,Sme=Yw(),oB=Da(),kme=l0(),lB=Bo(),Cme=Wz(),sB=IA(),Eme=N1(),uB=OA(),BA=an(),vs=BA.id2name,fB=BA.name2id,Lme=ai().AX_ID_PATTERN,cB=Ct(),H3=cB.traceIs,zA=cB.getComponentMethod;function V3(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}vB.exports=function(r,t,a){var n=t.autotypenumbers,i={},o={},l={},s={},u={},f={},c={},h={},d={},p={},g,m;for(g=0;g{"use strict";var Dme=ta(),dB=Ct(),Y3=fr(),ko=Ca(),W3=Va();pB.exports=function(r,t,a,n){var i=r._fullLayout;if(t.length===0){W3.redrawComponents(r);return}function o(m){var x=m.xaxis,_=m.yaxis;i._defs.select("#"+m.clipId+"> rect").call(ko.setTranslate,0,0).call(ko.setScale,1,1),m.plot.call(ko.setTranslate,x._offset,_._offset).call(ko.setScale,1,1);var A=m.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(ko.setPointGroupScale,1,1),A.selectAll(".textpoint").call(ko.setTextPointsScale,1,1),A.call(ko.hideOutsideRangePoints,m)}function l(m,x){var _=m.plotinfo,A=_.xaxis,b=_.yaxis,T=A._length,S=b._length,M=!!m.xr1,k=!!m.yr1,D=[];if(M){var P=Y3.simpleMap(m.xr0,A.r2l),N=Y3.simpleMap(m.xr1,A.r2l),q=P[1]-P[0],O=N[1]-N[0];D[0]=(P[0]*(1-x)+x*N[0]-P[0])/(P[1]-P[0])*T,D[2]=T*(1-x+x*O/q),A.range[0]=A.l2r(P[0]*(1-x)+x*N[0]),A.range[1]=A.l2r(P[1]*(1-x)+x*N[1])}else D[0]=0,D[2]=T;if(k){var U=Y3.simpleMap(m.yr0,b.r2l),$=Y3.simpleMap(m.yr1,b.r2l),W=U[1]-U[0],H=$[1]-$[0];D[1]=(U[1]*(1-x)+x*$[1]-U[1])/(U[0]-U[1])*S,D[3]=S*(1-x+x*H/W),b.range[0]=A.l2r(U[0]*(1-x)+x*$[0]),b.range[1]=b.l2r(U[1]*(1-x)+x*$[1])}else D[1]=0,D[3]=S;W3.drawOne(r,A,{skipTitle:!0}),W3.drawOne(r,b,{skipTitle:!0}),W3.redrawComponents(r,[A._id,b._id]);var B=M?T/D[2]:1,V=k?S/D[3]:1,j=M?D[0]:0,K=k?D[1]:0,ve=M?D[0]/D[2]*T:0,xe=k?D[1]/D[3]*S:0,se=A._offset-ve,be=b._offset-xe;_.clipRect.call(ko.setTranslate,j,K).call(ko.setScale,1/B,1/V),_.plot.call(ko.setTranslate,se,be).call(ko.setScale,B,V),ko.setPointGroupScale(_.zoomScalePts,1/B,1/V),ko.setTextPointsScale(_.zoomScaleTxt,1/B,1/V)}var s;n&&(s=n());function u(){for(var m={},x=0;xa.duration?(u(),d=window.cancelAnimationFrame(g)):d=window.requestAnimationFrame(g)}return c=Date.now(),d=window.requestAnimationFrame(g),Promise.resolve()}});var bp=R(_i=>{"use strict";var X3=ta(),yB=Ct(),Yc=fr(),qme=jn(),Fme=Ca(),gB=v1().getModuleCalcData,vf=an(),kl=ai(),Rme=ju(),ya=Yc.ensureSingle;function j3(e,r,t){return Yc.ensureSingle(e,r,t,function(a){a.datum(t)})}var Wc=kl.zindexSeparator;_i.name="cartesian";_i.attr=["xaxis","yaxis"];_i.idRoot=["x","y"];_i.idRegex=kl.idRegex;_i.attrRegex=kl.attrRegex;_i.attributes=Gz();_i.layoutAttributes=Bo();_i.supplyLayoutDefaults=hB();_i.transitionAxes=mB();_i.finalizeSubplots=function(e,r){var t=r._subplots,a=t.xaxis,n=t.yaxis,i=t.cartesian,o=i,l={},s={},u,f,c;for(u=0;u0){var d=h.id;if(d.indexOf(Wc)!==-1)continue;d+=Wc+(u+1),h=Yc.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],g,m=0;m1&&(T+=Wc+b),A.push(l+T),o=0;o1,c=r.mainplotinfo;if(!r.mainplot||f)if(u)r.xlines=ya(a,"path","xlines-above"),r.ylines=ya(a,"path","ylines-above"),r.xaxislayer=ya(a,"g","xaxislayer-above"),r.yaxislayer=ya(a,"g","yaxislayer-above");else{if(!o){var h=ya(a,"g","layer-subplot");r.shapelayer=ya(h,"g","shapelayer"),r.imagelayer=ya(h,"g","imagelayer"),c&&f?(r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer):(r.minorGridlayer=ya(a,"g","minor-gridlayer"),r.gridlayer=ya(a,"g","gridlayer"),r.zerolinelayer=ya(a,"g","zerolinelayer"));var d=ya(a,"g","layer-between");r.shapelayerBetween=ya(d,"g","shapelayer"),r.imagelayerBetween=ya(d,"g","imagelayer"),ya(a,"path","xlines-below"),ya(a,"path","ylines-below"),r.overlinesBelow=ya(a,"g","overlines-below"),ya(a,"g","xaxislayer-below"),ya(a,"g","yaxislayer-below"),r.overaxesBelow=ya(a,"g","overaxes-below")}r.overplot=ya(a,"g","overplot"),r.plot=ya(r.overplot,"g",n),o||(r.xlines=ya(a,"path","xlines-above"),r.ylines=ya(a,"path","ylines-above"),r.overlinesAbove=ya(a,"g","overlines-above"),ya(a,"g","xaxislayer-above"),ya(a,"g","yaxislayer-above"),r.overaxesAbove=ya(a,"g","overaxes-above"),r.xlines=a.select(".xlines-"+l),r.ylines=a.select(".ylines-"+s),r.xaxislayer=a.select(".xaxislayer-"+l),r.yaxislayer=a.select(".yaxislayer-"+s))}else{var p=c.plotgroup,g=n+"-x",m=n+"-y";r.minorGridlayer=c.minorGridlayer,r.gridlayer=c.gridlayer,r.zerolinelayer=c.zerolinelayer,ya(c.overlinesBelow,"path",g),ya(c.overlinesBelow,"path",m),ya(c.overaxesBelow,"g",g),ya(c.overaxesBelow,"g",m),r.plot=ya(c.overplot,"g",n),ya(c.overlinesAbove,"path",g),ya(c.overlinesAbove,"path",m),ya(c.overaxesAbove,"g",g),ya(c.overaxesAbove,"g",m),r.xlines=p.select(".overlines-"+l).select("."+g),r.ylines=p.select(".overlines-"+s).select("."+m),r.xaxislayer=p.select(".overaxes-"+l).select("."+g),r.yaxislayer=p.select(".overaxes-"+s).select("."+m)}o||(u||(j3(r.minorGridlayer,"g",r.xaxis._id),j3(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(x){return x[0]}).sort(vf.idSort),j3(r.gridlayer,"g",r.xaxis._id),j3(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(x){return x[0]}).sort(vf.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function _B(e,r){if(e){var t={};e.each(function(s){var u=s[0],f=X3.select(this);f.remove(),wB(u,r),t[u]=!0});for(var a in r._plots)for(var n=r._plots[a],i=n.overlays||[],o=0;o{"use strict";var Z3=ni();AB.exports={hasLines:Z3.hasLines,hasMarkers:Z3.hasMarkers,hasText:Z3.hasText,isBubble:Z3.isBubble,attributes:sf(),layoutAttributes:Sg(),supplyDefaults:BO(),crossTraceDefaults:vA(),supplyLayoutDefaults:YO(),calc:$0().calc,crossTraceCalc:yz(),arraysToCalcdata:mA(),plot:Lz(),colorbar:O3(),formatLabels:CA(),style:qA().style,styleOnSelect:qA().styleOnSelect,hoverPoints:Iz(),selectPoints:Bz(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:bp(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var kB=R((WLe,SB)=>{"use strict";var Nme=ta(),Ime=Qt(),MB=R6(),UA=fr(),Ome=UA.strScale,zme=UA.strRotate,Bme=UA.strTranslate;SB.exports=function(r,t,a){var n=r.node(),i=MB[a.arrowhead||0],o=MB[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),u=t.indexOf("start")>=0,f=t.indexOf("end")>=0,c=i.backoff*l+a.standoff,h=o.backoff*s+a.startstandoff,d,p,g,m;if(n.nodeName==="line"){d={x:+r.attr("x1"),y:+r.attr("y1")},p={x:+r.attr("x2"),y:+r.attr("y2")};var x=d.x-p.x,_=d.y-p.y;if(g=Math.atan2(_,x),m=g+Math.PI,c&&h&&c+h>Math.sqrt(x*x+_*_)){U();return}if(c){if(c*c>x*x+_*_){U();return}var A=c*Math.cos(g),b=c*Math.sin(g);p.x+=A,p.y+=b,r.attr({x2:p.x,y2:p.y})}if(h){if(h*h>x*x+_*_){U();return}var T=h*Math.cos(g),S=h*Math.sin(g);d.x-=T,d.y-=S,r.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var M=n.getTotalLength(),k="";if(M{"use strict";var CB=ta(),GA=Ct(),Ume=jn(),df=fr(),HA=df.strTranslate,_p=Va(),jc=Qt(),eu=Ca(),EB=rf(),VA=Ci(),YA=ef(),xp=xl(),Gme=Da().arrayEditor,Hme=kB();qB.exports={draw:Vme,drawOne:LB,drawRaw:DB};function Vme(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?Ie="right":Ie="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ie]}for(var Ce=!1,Y=["x","y"],ae=0;ae1)&&(Pe===Te?(Ur=Ne.r2fraction(r["a"+Z]),(Ur<0||Ur>1)&&(Ce=!0)):Ce=!0),Lr=Ne._offset+Ne.r2p(r[Z]),Oe=.5}else{var Ye=rt==="domain";Z==="x"?(de=r[Z],Lr=Ye?Ne._offset+Ne._length*de:Lr=l.l+l.w*de):(de=1-r[Z],Lr=Ye?Ne._offset+Ne._length*de:Lr=l.t+l.h*de),Oe=r.showarrow?.5:de}if(r.showarrow){Xe.head=Lr;var Ve=r["a"+Z];if(Ue=Ke*De(.5,r.xanchor)-Je*De(.5,r.yanchor),Pe===Te){var pr=_p.getRefType(Pe);pr==="domain"?(Z==="y"&&(Ve=1-Ve),Xe.tail=Ne._offset+Ne._length*Ve):pr==="paper"?Z==="y"?(Ve=1-Ve,Xe.tail=l.t+l.h*Ve):Xe.tail=l.l+l.w*Ve:Xe.tail=Ne._offset+Ne.r2p(Ve),Ar=Ue}else Xe.tail=Lr+Ve,Ar=Ue+Ve;Xe.text=Xe.tail+Ue;var Tr=o[Z==="x"?"width":"height"];if(Te==="paper"&&(Xe.head=df.constrain(Xe.head,1,Tr-1)),Pe==="pixel"){var mr=-Math.max(Xe.tail-3,Xe.text),vr=Math.min(Xe.tail+3,Xe.text)-Tr;mr>0?(Xe.tail+=mr,Xe.text+=mr):vr>0&&(Xe.tail-=vr,Xe.text-=vr)}Xe.tail+=ir,Xe.head+=ir}else Ue=or*De(Oe,yr),Ar=Ue,Xe.text=Lr+Ue;Xe.text+=ir,Ue+=ir,Ar+=ir,r["_"+Z+"padplus"]=or/2+Ar,r["_"+Z+"padminus"]=or/2-Ar,r["_"+Z+"size"]=or,r["_"+Z+"shift"]=Ue}if(Ce){M.remove();return}var Cr=0,Ir=0;if(r.align!=="left"&&(Cr=(re-se)*(r.align==="center"?.5:1)),r.valign!=="top"&&(Ir=(ke-be)*(r.valign==="middle"?.5:1)),ve)K.select("svg").attr({x:P+Cr-1,y:P+Ir}).call(eu.setClipUrl,q?g:null,e);else{var Gr=P+Ir-xe.top,Ze=P+Cr-xe.left;W.call(VA.positionText,Ze,Gr).call(eu.setClipUrl,q?g:null,e)}O.select("rect").call(eu.setRect,P,P,re,ke),N.call(eu.setRect,k/2,k/2,ge-k,Ee-k),M.call(eu.setTranslate,Math.round(m.x.text-ge/2),Math.round(m.y.text-Ee/2)),A.attr({transform:"rotate("+x+","+m.x.text+","+m.y.text+")"});var oe=function(Ge,Ie){_.selectAll(".annotation-arrow-g").remove();var Wr=m.x.head,tt=m.y.head,$r=m.x.tail+Ge,St=m.y.tail+Ie,ea=m.x.text+Ge,ma=m.y.text+Ie,aa=df.rotationXYMatrix(x,ea,ma),Qa=df.apply2DTransform(aa),Ln=df.apply2DTransform2(aa),si=+N.attr("width"),Dn=+N.attr("height"),Vi=ea-.5*si,Bn=Vi+si,qn=ma-.5*Dn,yi=qn+Dn,_t=[[Vi,qn,Vi,yi],[Vi,yi,Bn,yi],[Bn,yi,Bn,qn],[Bn,qn,Vi,qn]].map(Ln);if(!_t.reduce(function(Aa,Un){return Aa^!!df.segmentsIntersect(Wr,tt,Wr+1e6,tt+1e6,Un[0],Un[1],Un[2],Un[3])},!1)){_t.forEach(function(Aa){var Un=df.segmentsIntersect($r,St,Wr,tt,Aa[0],Aa[1],Aa[2],Aa[3]);Un&&($r=Un.x,St=Un.y)});var Ma=r.arrowwidth,ra=r.arrowcolor,Pa=r.arrowside,Xa=_.append("g").style({opacity:jc.opacity(ra)}).classed("annotation-arrow-g",!0),Sa=Xa.append("path").attr("d","M"+$r+","+St+"L"+Wr+","+tt).style("stroke-width",Ma+"px").call(jc.stroke,jc.rgb(ra));if(Hme(Sa,Pa,r),s.annotationPosition&&Sa.node().parentNode&&!a){var La=Wr,en=tt;if(r.standoff){var on=Math.sqrt(Math.pow(Wr-$r,2)+Math.pow(tt-St,2));La+=r.standoff*($r-Wr)/on,en+=r.standoff*(St-tt)/on}var Yi=Xa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+($r-La)+","+(St-en),transform:HA(La,en)}).style("stroke-width",Ma+6+"px").call(jc.stroke,"rgba(0,0,0,0)").call(jc.fill,"rgba(0,0,0,0)"),Wi,xn;xp.init({element:Yi.node(),gd:e,prepFn:function(){var Aa=eu.getTranslate(M);Wi=Aa.x,xn=Aa.y,n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(Aa,Un){var _s=Qa(Wi,xn),ws=_s[0]+Aa,Bl=_s[1]+Un;M.call(eu.setTranslate,ws,Bl),d("x",hf(n,Aa,"x",l,r)),d("y",hf(i,Un,"y",l,r)),r.axref===r.xref&&d("ax",hf(n,Aa,"ax",l,r)),r.ayref===r.yref&&d("ay",hf(i,Un,"ay",l,r)),Xa.attr("transform",HA(Aa,Un)),A.attr({transform:"rotate("+x+","+ws+","+Bl+")"})},doneFn:function(){GA.call("_guiRelayout",e,p());var Aa=document.querySelector(".js-notes-box-panel");Aa&&Aa.redraw(Aa.selectedObj)}})}}};if(r.showarrow&&oe(0,0),b){var ye;xp.init({element:M.node(),gd:e,prepFn:function(){ye=A.attr("transform")},moveFn:function(Ge,Ie){var Wr="pointer";if(r.showarrow)r.axref===r.xref?d("ax",hf(n,Ge,"ax",l,r)):d("ax",r.ax+Ge),r.ayref===r.yref?d("ay",hf(i,Ie,"ay",l.w,r)):d("ay",r.ay+Ie),oe(Ge,Ie);else{if(a)return;var tt,$r;if(n)tt=hf(n,Ge,"x",l,r);else{var St=r._xsize/l.w,ea=r.x+(r._xshift-r.xshift)/l.w-St/2;tt=xp.align(ea+Ge/l.w,St,0,1,r.xanchor)}if(i)$r=hf(i,Ie,"y",l,r);else{var ma=r._ysize/l.h,aa=r.y-(r._yshift+r.yshift)/l.h-ma/2;$r=xp.align(aa-Ie/l.h,ma,0,1,r.yanchor)}d("x",tt),d("y",$r),(!n||!i)&&(Wr=xp.getCursor(n?.5:tt,i?.5:$r,r.xanchor,r.yanchor))}A.attr({transform:HA(Ge,Ie)+ye}),YA(M,Wr)},clickFn:function(Ge,Ie){r.captureevents&&e.emit("plotly_clickannotation",S(Ie))},doneFn:function(){YA(M),GA.call("_guiRelayout",e,p());var Ge=document.querySelector(".js-notes-box-panel");Ge&&Ge.redraw(Ge.selectedObj)}})}}s.annotationText?W.call(VA.makeEditable,{delegate:M,gd:e}).call(H).on("edit",function(V){r.text=V,this.call(H),d("text",V),n&&n.autorange&&h(n._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),GA.call("_guiRelayout",e,p())}):W.call(H)}});var OB=R((XLe,IB)=>{"use strict";var FB=fr(),Yme=Ct(),RB=Da().arrayEditor;IB.exports={hasClickToShow:Wme,onClick:jme};function Wme(e,r){var t=NB(e,r);return t.on.length>0||t.explicitOff.length>0}function jme(e,r){var t=NB(e,r),a=t.on,n=t.off.concat(t.explicitOff),i={},o=e._fullLayout.annotations,l,s;if(a.length||n.length){for(l=0;l{"use strict";var WA=fr(),nh=Qt();zB.exports=function(r,t,a,n){n("opacity");var i=n("bgcolor"),o=n("bordercolor"),l=nh.opacity(o);n("borderpad");var s=n("borderwidth"),u=n("showarrow");n("text",u?" ":a._dfltTitle.annotation),n("textangle"),WA.coerceFont(n,"font",a.font),n("width"),n("align");var f=n("height");if(f&&n("valign"),u){var c=n("arrowside"),h,d;c.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),c.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",l?t.bordercolor:nh.defaultLine),n("arrowwidth",(l&&s||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),g=a.hoverlabel||{};if(p){var m=n("hoverlabel.bgcolor",g.bgcolor||(nh.opacity(i)?nh.rgb(i):nh.defaultLine)),x=n("hoverlabel.bordercolor",g.bordercolor||nh.contrast(m)),_=WA.extendFlat({},g.font);_.color||(_.color=x),WA.coerceFont(n,"hoverlabel.font",_)}n("captureevents",!!p)}});var UB=R((JLe,BB)=>{"use strict";var XA=fr(),Xc=Va(),Xme=wo(),Zme=jA(),Jme=j0();BB.exports=function(r,t){Xme(r,t,{name:"annotations",handleItemDefaults:$me})};function $me(e,r,t){function a(A,b){return XA.coerce(e,r,Jme,A,b)}var n=a("visible"),i=a("clicktoshow");if(n||i){Zme(e,r,t,a);for(var o=r.showarrow,l=["x","y"],s=[-10,-30],u={_fullLayout:t},f=0;f<2;f++){var c=l[f],h=Xc.coerceRef(e,r,u,c,"","paper");if(h!=="paper"){var d=Xc.getFromId(u,h);d._annIndices.push(r._index)}if(Xc.coercePosition(r,u,a,h,c,.5),o){var p="a"+c,g=Xc.coerceRef(e,r,u,p,"pixel",["pixel","paper"]);g!=="pixel"&&g!==h&&(g=r[p]="pixel");var m=g==="pixel"?s[f]:.4;Xc.coercePosition(r,u,a,g,p,m)}a(c+"anchor"),a(c+"shift")}if(XA.noneOrAll(e,r,["x","y"]),o&&XA.noneOrAll(e,r,["ax","ay"]),i){var x=a("xclick"),_=a("yclick");r._xclick=x===void 0?r.x:Xc.cleanPosition(x,u,r.xref),r._yclick=_===void 0?r.y:Xc.cleanPosition(_,u,r.yref)}}}});var VB=R(($Le,HB)=>{"use strict";var ZA=fr(),Zc=Va(),Kme=J3().draw;HB.exports=function(r){var t=r._fullLayout,a=ZA.filterVisible(t.annotations);if(a.length&&r._fullData.length)return ZA.syncOrAsync([Kme,Qme],r)};function Qme(e){var r=e._fullLayout;ZA.filterVisible(r.annotations).forEach(function(t){var a=Zc.getFromId(e,t.xref),n=Zc.getFromId(e,t.yref),i=Zc.getRefType(t.xref),o=Zc.getRefType(t.yref);t._extremes={},i==="range"&&GB(t,a),o==="range"&&GB(t,n)})}function GB(e,r){var t=r._id,a=t.charAt(0),n=e[a],i=e["a"+a],o=e[a+"ref"],l=e["a"+a+"ref"],s=e["_"+a+"padplus"],u=e["_"+a+"padminus"],f={x:1,y:-1}[a]*e[a+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,g=p+f,m=p-f,x;if(l===o){var _=Zc.findExtremes(r,[r.r2c(n)],{ppadplus:h,ppadminus:d}),A=Zc.findExtremes(r,[r.r2c(i)],{ppadplus:Math.max(s,g),ppadminus:Math.max(u,m)});x={min:[_.min[0],A.min[0]],max:[_.max[0],A.max[0]]}}else g=i?g+i:g,m=i?m-i:m,x=Zc.findExtremes(r,[r.r2c(n)],{ppadplus:Math.max(s,h,g),ppadminus:Math.max(u,d,m)});e._extremes[t]=x}});var WB=R((KLe,YB)=>{"use strict";var eye=ia(),rye=Vy();YB.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(!(i||o))return;var l=r._fullLayout.annotations,s=t._id.charAt(0),u,f;function c(d){var p=u[d],g=null;i?g=rye(p,t.range):g=Math.pow(10,p),eye(g)||(g=null),n(f+d,g)}for(var h=0;h{"use strict";var JA=J3(),jB=OB();XB.exports={moduleType:"component",name:"annotations",layoutAttributes:j0(),supplyLayoutDefaults:UB(),includeBasePlot:ep()("annotations"),calcAutorange:VB(),draw:JA.draw,drawOne:JA.drawOne,drawRaw:JA.drawRaw,hasClickToShow:jB.hasClickToShow,onClick:jB.onClick,convertCoords:WB()}});var $3=R((eDe,JB)=>{"use strict";var Na=j0(),tye=dl().overrideAll,aye=Da().templatedArray;JB.exports=tye(aye("annotation",{visible:Na.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Na.xanchor,xshift:Na.xshift,yanchor:Na.yanchor,yshift:Na.yshift,text:Na.text,textangle:Na.textangle,font:Na.font,width:Na.width,height:Na.height,opacity:Na.opacity,align:Na.align,valign:Na.valign,bgcolor:Na.bgcolor,bordercolor:Na.bordercolor,borderpad:Na.borderpad,borderwidth:Na.borderwidth,showarrow:Na.showarrow,arrowcolor:Na.arrowcolor,arrowhead:Na.arrowhead,startarrowhead:Na.startarrowhead,arrowside:Na.arrowside,arrowsize:Na.arrowsize,startarrowsize:Na.startarrowsize,arrowwidth:Na.arrowwidth,standoff:Na.standoff,startstandoff:Na.startstandoff,hovertext:Na.hovertext,hoverlabel:Na.hoverlabel,captureevents:Na.captureevents}),"calc","from-root")});var KB=R((rDe,$B)=>{"use strict";var $A=fr(),nye=Va(),iye=wo(),oye=jA(),lye=$3();$B.exports=function(r,t,a){iye(r,t,{name:"annotations",handleItemDefaults:sye,fullLayout:a.fullLayout})};function sye(e,r,t,a){function n(l,s){return $A.coerce(e,r,lye,l,s)}function i(l){var s=l+"axis",u={_fullLayout:{}};return u._fullLayout[s]=t[s],nye.coercePosition(r,u,n,l,l,.5)}var o=n("visible");o&&(oye(e,r,a.fullLayout,n),i("x"),i("y"),i("z"),$A.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",n("ax",-10),n("ay",-30),$A.noneOrAll(e,r,["ax","ay"])))}});var tU=R((tDe,rU)=>{"use strict";var QB=fr(),eU=Va();rU.exports=function(r){for(var t=r.fullSceneLayout,a=t.annotations,n=0;n{"use strict";function KA(e,r){var t=[0,0,0,0],a,n;for(a=0;a<4;++a)for(n=0;n<4;++n)t[n]+=e[4*a+n]*r[a];return t}function fye(e,r){var t=KA(e.projection,KA(e.view,KA(e.model,[r[0],r[1],r[2],1])));return t}aU.exports=fye});var oU=R((nDe,iU)=>{"use strict";var cye=J3().drawRaw,vye=nU(),hye=["x","y","z"];iU.exports=function(r){for(var t=r.fullSceneLayout,a=r.dataScale,n=t.annotations,i=0;i1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+i+'"]').remove():(o._pdata=vye(r.glplot.cameraParams,[t.xaxis.r2l(o.x)*a[0],t.yaxis.r2l(o.y)*a[1],t.zaxis.r2l(o.z)*a[2]]),cye(r.graphDiv,o,i,r.id,o._xa,o._ya))}}});var uU=R((iDe,sU)=>{"use strict";var dye=Ct(),lU=fr();sU.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:$3()}}},layoutAttributes:$3(),handleDefaults:KB(),includeBasePlot:pye,convert:tU(),draw:oU()};function pye(e,r){var t=dye.subplotsRegistry.gl3d;if(t)for(var a=t.attrRegex,n=Object.keys(e),i=0;i{"use strict";var fU=j0(),cU=ci(),vU=sf().line,mye=Iu().dash,Cl=hn().extendFlat,yye=Da().templatedArray,oDe=K1(),ih=hl(),gye=o0().shapeTexttemplateAttrs,bye=ag();hU.exports=yye("shape",{visible:Cl({},ih.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Cl({},ih.legend,{editType:"calc+arraydraw"}),legendgroup:Cl({},ih.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Cl({},ih.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:cU({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Cl({},ih.legendrank,{editType:"calc+arraydraw"}),legendwidth:Cl({},ih.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:Cl({},fU.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:Cl({},fU.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:Cl({},vU.color,{editType:"arraydraw"}),width:Cl({},vU.width,{editType:"calc+arraydraw"}),dash:Cl({},mye,{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:gye({},{keys:Object.keys(bye)}),font:cU({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 mU=R((sDe,pU)=>{"use strict";var wp=fr(),oh=Va(),xye=wo(),_ye=QA(),dU=of();pU.exports=function(r,t){xye(r,t,{name:"shapes",handleItemDefaults:Aye})};function wye(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function Aye(e,r,t){function a(V,j){return wp.coerce(e,r,_ye,V,j)}r._isShape=!0;var n=a("visible");if(n){var i=a("showlegend");i&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),wp.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var o=a("path"),l=o?"path":"rect",s=a("type",l),u=s!=="path";u&&delete r.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),h=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var g=d[p],m=g+"anchor",x=g==="x"?c:h,_={_fullLayout:t},A,b,T,S=oh.coerceRef(e,r,_,g,void 0,"paper"),M=oh.getRefType(S);if(M==="range"?(A=oh.getFromId(_,S),A._shapeIndices.push(r._index),T=dU.rangeToShapePosition(A),b=dU.shapePositionToRange(A),(A.type==="category"||A.type==="multicategory")&&(a(g+"0shift"),a(g+"1shift"))):b=T=wp.identity,u){var k=.25,D=.75,P=g+"0",N=g+"1",q=e[P],O=e[N];e[P]=b(e[P],!0),e[N]=b(e[N],!0),x==="pixel"?(a(P,0),a(N,10)):(oh.coercePosition(r,_,a,S,P,k),oh.coercePosition(r,_,a,S,N,D)),r[P]=T(r[P]),r[N]=T(r[N]),e[P]=q,e[N]=O}if(x==="pixel"){var U=e[m];e[m]=b(e[m],!0),oh.coercePosition(r,_,a,S,m,.25),r[m]=T(r[m]),e[m]=U}}u&&wp.noneOrAll(e,r,["x0","x1","y0","y1"]);var $=s==="line",W,H;if(u&&(W=a("label.texttemplate")),W||(H=a("label.text")),H||W){a("label.textangle");var B=a("label.textposition",$?"middle":"middle center");a("label.xanchor"),a("label.yanchor",wye($,B)),a("label.padding"),wp.coerceFont(a,"label.font",t.font)}}}});var bU=R((uDe,gU)=>{"use strict";var Tye=Qt(),yU=fr();function Mye(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}gU.exports=function(r,t,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),yU.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var n=a("newshape.line.width");if(n){var i=(r||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Tye.contrast(i)),a("newshape.line.dash")}var o=r.dragmode==="drawline",l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(l||s){a("newshape.label.textangle");var u=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",Mye(o,u)),a("newshape.label.padding"),yU.coerceFont(a,"newshape.label.font",t.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}});var TU=R((fDe,AU)=>{"use strict";var e8=fr(),lh=Va(),sh=q1(),_U=of();AU.exports=function(r){var t=r._fullLayout,a=e8.filterVisible(t.shapes);if(!(!a.length||!r._fullData.length))for(var n=0;n0?u+o:o;return{ppad:o,ppadplus:l?c:h,ppadminus:l?h:c}}else return{ppad:o}}function xU(e,r,t){var a=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",i,o,l=0,s=0,u=n?e.r2c:e.d2c,f=r[a+"sizemode"]==="scaled";if(f?(i=r[a+"0"],o=r[a+"1"],n&&(l=r[a+"0shift"],s=r[a+"1shift"])):(i=r[a+"anchor"],o=r[a+"anchor"]),i!==void 0)return[u(i)+l,u(o)+s];if(r.path){var c=1/0,h=-1/0,d=r.path.match(sh.segmentRE),p,g,m,x,_;for(e.type==="date"&&(u=_U.decodeDate(u)),p=0;ph&&(h=_)));if(h>=c)return[c,h]}}});var kU=R((cDe,SU)=>{"use strict";var MU=G2();SU.exports={moduleType:"component",name:"shapes",layoutAttributes:QA(),supplyLayoutDefaults:mU(),supplyDrawNewShapeDefaults:bU(),includeBasePlot:ep()("shapes"),calcAutorange:TU(),draw:MU.draw,drawOne:MU.drawOne}});var r8=R((hDe,EU)=>{"use strict";var CU=ai(),Cye=Da().templatedArray,vDe=K1();EU.exports=Cye("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",CU.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",CU.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var DU=R((dDe,LU)=>{"use strict";var Eye=fr(),t8=Va(),Lye=wo(),Dye=r8(),qye="images";LU.exports=function(r,t){var a={name:qye,handleItemDefaults:Fye};Lye(r,t,a)};function Fye(e,r,t){function a(h,d){return Eye.coerce(e,r,Dye,h,d)}var n=a("source"),i=a("visible",!!n);if(!i)return r;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:t},l=["x","y"],s=0;s<2;s++){var u=l[s],f=t8.coerceRef(e,r,o,u,"paper",void 0);if(f!=="paper"){var c=t8.getFromId(o,f);c._imgIndices.push(r._index)}t8.coercePosition(r,o,a,f,u,0)}return r}});var PU=R((pDe,RU)=>{"use strict";var qU=ta(),Rye=Ca(),uh=Va(),FU=an(),Pye=ju();RU.exports=function(r){var t=r._fullLayout,a=[],n={},i=[],o,l;for(l=0;l{"use strict";var NU=ia(),Nye=Vy();IU.exports=function(r,t,a,n){t=t||{};var i=a==="log"&&t.type==="linear",o=a==="linear"&&t.type==="log";if(i||o){for(var l=r._fullLayout.images,s=t._id.charAt(0),u,f,c=0;c{"use strict";zU.exports={moduleType:"component",name:"images",layoutAttributes:r8(),supplyLayoutDefaults:DU(),includeBasePlot:ep()("images"),draw:PU(),convertCoords:OU()}});var K3=R((gDe,UU)=>{"use strict";UU.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 a8=R((bDe,HU)=>{"use strict";var Iye=ci(),Oye=Kl(),zye=hn().extendFlat,Bye=dl().overrideAll,Uye=ng(),GU=Da().templatedArray,Gye=GU("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}});HU.exports=Bye(GU("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:Gye,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:zye(Uye({editType:"arraydraw"}),{}),font:Iye({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Oye.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var jU=R((xDe,WU)=>{"use strict";var Q3=fr(),VU=wo(),YU=a8(),Hye=K3(),Vye=Hye.name,Yye=YU.buttons;WU.exports=function(r,t){var a={name:Vye,handleItemDefaults:Wye};VU(r,t,a)};function Wye(e,r,t){function a(o,l){return Q3.coerce(e,r,YU,o,l)}var n=VU(e,r,{name:"buttons",handleItemDefaults:jye}),i=a("visible",n.length>0);i&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Q3.noneOrAll(e,r,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Q3.coerceFont(a,"font",t.font),a("bgcolor",t.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function jye(e,r){function t(n,i){return Q3.coerce(e,r,Yye,n,i)}var a=t("visible",e.method==="skip"||Array.isArray(e.args));a&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var JU=R((_De,ZU)=>{"use strict";ZU.exports=$a;var El=ta(),XU=Qt(),fh=Ca(),eb=fr();function $a(e,r,t){this.gd=e,this.container=r,this.id=t,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})}$a.barWidth=2;$a.barLength=20;$a.barRadius=2;$a.barPad=1;$a.barColor="#808BA4";$a.prototype.enable=function(r,t,a){var n=this.gd._fullLayout,i=n.width,o=n.height;this.position=r;var l=this.position.l,s=this.position.w,u=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",g=c==="up",m=s,x=f,_,A,b,T;!h&&!d&&!p&&!g&&(this.position.direction="down",h=!0);var S=h||g;S?(_=l,A=_+m,h?(b=u,T=Math.min(b+x,o),x=T-b):(T=u+x,b=Math.max(T-x,0),x=T-b)):(b=u,T=b+x,d?(A=l+m,_=Math.max(A-m,0),m=A-_):(_=l,A=Math.min(_+m,i),m=A-_)),this._box={l:_,t:b,w:m,h:x};var M=s>m,k=$a.barLength+2*$a.barPad,D=$a.barWidth+2*$a.barPad,P=l,N=u+f;N+D>o&&(N=o-D);var q=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-horizontal",!0).call(XU.fill,$a.barColor),M?(this.hbar=q.attr({rx:$a.barRadius,ry:$a.barRadius,x:P,y:N,width:k,height:D}),this._hbarXMin=P+k/2,this._hbarTranslateMax=m-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=f>x,U=$a.barWidth+2*$a.barPad,$=$a.barLength+2*$a.barPad,W=l+s,H=u;W+U>i&&(W=i-U);var B=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-vertical",!0).call(XU.fill,$a.barColor),O?(this.vbar=B.attr({rx:$a.barRadius,ry:$a.barRadius,x:W,y:H,width:U,height:$}),this._vbarYMin=H+$/2,this._vbarTranslateMax=x-$):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,j=_-.5,K=O?A+U+.5:A+.5,ve=b-.5,xe=M?T+D+.5:T+.5,se=n._topdefs.selectAll("#"+V).data(M||O?[0]:[]);if(se.exit().remove(),se.enter().append("clipPath").attr("id",V).append("rect"),M||O?(this._clipRect=se.select("rect").attr({x:Math.floor(j),y:Math.floor(ve),width:Math.ceil(K)-Math.floor(j),height:Math.ceil(xe)-Math.floor(ve)}),this.container.call(fh.setClipUrl,V,this.gd),this.bg.attr({x:l,y:u,width:s,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(fh.setClipUrl,null),delete this._clipRect),M||O){var be=El.behavior.drag().on("dragstart",function(){El.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(be);var re=El.behavior.drag().on("dragstart",function(){El.event.sourceEvent.preventDefault(),El.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(re),O&&this.vbar.on(".drag",null).call(re)}this.setTranslate(t,a)};$a.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(fh.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)};$a.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=El.event.dx),this.vbar&&(t-=El.event.dy),this.setTranslate(r,t)};$a.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=El.event.deltaY),this.vbar&&(t+=El.event.deltaY),this.setTranslate(r,t)};$a.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var a=r+this._hbarXMin,n=a+this._hbarTranslateMax,i=eb.constrain(El.event.x,a,n),o=(i-a)/(n-a),l=this.position.w-this._box.w;r=o*l}if(this.vbar){var s=t+this._vbarYMin,u=s+this._vbarTranslateMax,f=eb.constrain(El.event.y,s,u),c=(f-s)/(u-s),h=this.position.h-this._box.h;t=c*h}this.setTranslate(r,t)};$a.prototype.setTranslate=function(r,t){var a=this.position.w-this._box.w,n=this.position.h-this._box.h;if(r=eb.constrain(r||0,0,a),t=eb.constrain(t||0,0,n),this.translateX=r,this.translateY=t,this.container.call(fh.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=r/a;this.hbar.call(fh.setTranslate,r+i*this._hbarTranslateMax,t)}if(this.vbar){var o=t/n;this.vbar.call(fh.setTranslate,r,t+o*this._vbarTranslateMax)}}});var oG=R((wDe,iG)=>{"use strict";var ch=ta(),Ap=jn(),Tp=Qt(),vh=Ca(),Co=fr(),rb=Ci(),Xye=Da().arrayEditor,KU=ki().LINE_SPACING,Dt=K3(),Zye=JU();iG.exports=function(r){var t=r._fullLayout,a=Co.filterVisible(t[Dt.name]);function n(h){Ap.autoMargin(r,aG(h))}var i=t._menulayer.selectAll("g."+Dt.containerClassName).data(a.length>0?[0]:[]);if(i.enter().append("g").classed(Dt.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){ch.select(this).selectAll("g."+Dt.headerGroupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+Dt.headerGroupClassName).data(a,Jye);o.enter().append("g").classed(Dt.headerGroupClassName,!0);for(var l=Co.ensureSingle(i,"g",Dt.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),s=0;s{"use strict";var age=K3();lG.exports={moduleType:"component",name:age.name,layoutAttributes:a8(),supplyLayoutDefaults:jU(),draw:oG()}});var Sp=R((TDe,uG)=>{"use strict";uG.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 l8=R((MDe,vG)=>{"use strict";var fG=ci(),nge=ng(),ige=hn().extendDeepAll,oge=dl().overrideAll,lge=t1(),cG=Da().templatedArray,Jc=Sp(),sge=cG("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}});vG.exports=oge(cG("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:sge,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:ige(nge({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:lge.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:fG({})},font:fG({}),activebgcolor:{valType:"color",dflt:Jc.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jc.railBgColor},bordercolor:{valType:"color",dflt:Jc.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jc.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jc.tickLength},tickcolor:{valType:"color",dflt:Jc.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jc.minorTickLength}}),"arraydraw","from-root")});var mG=R((SDe,pG)=>{"use strict";var hh=fr(),hG=wo(),dG=l8(),uge=Sp(),fge=uge.name,cge=dG.steps;pG.exports=function(r,t){hG(r,t,{name:fge,handleItemDefaults:vge})};function vge(e,r,t){function a(c,h){return hh.coerce(e,r,dG,c,h)}for(var n=hG(e,r,{name:"steps",handleItemDefaults:hge}),i=0,o=0;o{"use strict";var Ll=ta(),tb=jn(),pf=Qt(),Dl=Ca(),Eo=fr(),dge=Eo.strTranslate,kp=Ci(),pge=Da().arrayEditor,Ht=Sp(),f8=ki(),bG=f8.LINE_SPACING,s8=f8.FROM_TL,u8=f8.FROM_BR;MG.exports=function(r){var t=r._context.staticPlot,a=r._fullLayout,n=mge(a,r),i=a._infolayer.selectAll("g."+Ht.containerClassName).data(n.length>0?[0]:[]);i.enter().append("g").classed(Ht.containerClassName,!0).style("cursor",t?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),tb.autoMargin(r,xG(f))}if(i.exit().each(function(){Ll.select(this).selectAll("g."+Ht.groupClassName).each(o)}).remove(),n.length!==0){var l=i.selectAll("g."+Ht.groupClassName).data(n,yge);l.enter().append("g").classed(Ht.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",dge(o-Ht.gripWidth*.5,r._dims.currentValueTotalHeight))}}function c8(e,r){var t=e._dims;return t.inputAreaStart+Ht.stepInset+(t.inputAreaLength-2*Ht.stepInset)*Math.min(1,Math.max(0,r))}function gG(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Ht.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Ht.stepInset-2*t.inputAreaStart)))}function Tge(e,r,t){var a=t._dims,n=Eo.ensureSingle(e,"rect",Ht.railTouchRectClass,function(i){i.call(AG,r,e,t).style("pointer-events","all")});n.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,Ht.tickOffset+t.ticklen+a.labelHeight)}).call(pf.fill,t.bgcolor).attr("opacity",0),Dl.setTranslate(n,0,a.currentValueTotalHeight)}function Mge(e,r){var t=r._dims,a=t.inputAreaLength-Ht.railInset*2,n=Eo.ensureSingle(e,"rect",Ht.railRectClass);n.attr({width:a,height:Ht.railWidth,rx:Ht.railRadius,ry:Ht.railRadius,"shape-rendering":"crispEdges"}).call(pf.stroke,r.bordercolor).call(pf.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),Dl.setTranslate(n,Ht.railInset,(t.inputAreaWidth-Ht.railWidth)*.5+t.currentValueTotalHeight)}});var CG=R((CDe,kG)=>{"use strict";var Sge=Sp();kG.exports={moduleType:"component",name:Sge.name,layoutAttributes:l8(),supplyLayoutDefaults:mG(),draw:SG()}});var nb=R((EDe,LG)=>{"use strict";var EG=Kl();LG.exports={bgcolor:{valType:"color",dflt:EG.background,editType:"plot"},bordercolor:{valType:"color",dflt:EG.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 v8=R((LDe,DG)=>{"use strict";DG.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 ib=R((DDe,qG)=>{"use strict";qG.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 PG=R(lb=>{"use strict";var kge=an(),Cge=Ci(),FG=ib(),Ege=ki().LINE_SPACING,ob=FG.name;function RG(e){var r=e&&e[ob];return r&&r.visible}lb.isVisible=RG;lb.makeData=function(e){for(var r=kge.list({_fullLayout:e},"x",!0),t=e.margin,a=[],n=0;n{"use strict";var sb=fr(),NG=Da(),IG=an(),Lge=nb(),Dge=v8();OG.exports=function(r,t,a){var n=r[a],i=t[a];if(!(n.rangeslider||t._requestRangeslider[i._id]))return;sb.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,l=NG.newContainer(i,"rangeslider");function s(T,S){return sb.coerce(o,l,Lge,T,S)}var u,f;function c(T,S){return sb.coerce(u,f,Dge,T,S)}var h=s("visible");if(h){s("bgcolor",t.plot_bgcolor),s("bordercolor"),s("borderwidth"),s("thickness"),s("autorange",!i.isValidRange(o.range)),s("range");var d=t._subplots;if(d)for(var p=d.cartesian.filter(function(T){return T.substr(0,T.indexOf("y"))===IG.name2id(a)}).map(function(T){return T.substr(T.indexOf("y"),T.length)}),g=sb.simpleMap(p,IG.id2name),m=0;m{"use strict";var qge=an().list,Fge=E0().getAutoRange,Rge=ib();BG.exports=function(r){for(var t=qge(r,"x",!0),a=0;a{"use strict";var ub=ta(),Pge=Ct(),Nge=jn(),fn=fr(),fb=fn.strTranslate,HG=Ca(),mf=Qt(),Ige=x1(),Oge=bp(),h8=an(),zge=xl(),Bge=ef(),Jt=ib();VG.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,a=0;a=B.max)W=N[H+1];else if($=B.pmax)W=N[H+1];else if($0?e.touches[0].clientX:0}function Uge(e,r,t,a){if(r._context.staticPlot)return;var n=e.select("rect."+Jt.slideBoxClassName).node(),i=e.select("rect."+Jt.grabAreaMinClassName).node(),o=e.select("rect."+Jt.grabAreaMaxClassName).node();function l(){var s=ub.event,u=s.target,f=GG(s),c=f-e.node().getBoundingClientRect().left,h=a.d2p(t._rl[0]),d=a.d2p(t._rl[1]),p=zge.coverSlip();this.addEventListener("touchmove",g),this.addEventListener("touchend",m),p.addEventListener("mousemove",g),p.addEventListener("mouseup",m);function g(x){var _=GG(x),A=+_-f,b,T,S;switch(u){case n:if(S="ew-resize",h+A>t._length||d+A<0)return;b=h+A,T=d+A;break;case i:if(S="col-resize",h+A>t._length)return;b=h+A,T=d;break;case o:if(S="col-resize",d+A<0)return;b=h,T=d+A;break;default:S="ew-resize",b=c,T=c+A;break}if(T{"use strict";var $ge=fr(),Kge=nb(),Qge=v8(),d8=PG();WG.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:$ge.extendFlat({},Kge,{yaxis:Qge})}}},layoutAttributes:nb(),handleDefaults:zG(),calcAutorange:UG(),draw:YG(),isVisible:d8.isVisible,makeData:d8.makeData,autoMarginOpts:d8.autoMarginOpts}});var cb=R((IDe,ZG)=>{"use strict";var e2e=ci(),XG=Kl(),r2e=Da().templatedArray,t2e=r2e("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"});ZG.exports={visible:{valType:"boolean",editType:"plot"},buttons:t2e,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:e2e({editType:"plot"}),bgcolor:{valType:"color",dflt:XG.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:XG.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var p8=R((ODe,JG)=>{"use strict";JG.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var QG=R((zDe,KG)=>{"use strict";var vb=fr(),a2e=Qt(),n2e=Da(),i2e=wo(),$G=cb(),m8=p8();KG.exports=function(r,t,a,n,i){var o=r.rangeselector||{},l=n2e.newContainer(t,"rangeselector");function s(d,p){return vb.coerce(o,l,$G,d,p)}var u=i2e(o,l,{name:"buttons",handleItemDefaults:o2e,calendar:i}),f=s("visible",u.length>0);if(f){var c=l2e(t,a,n);s("x",c[0]),s("y",c[1]),vb.noneOrAll(r,t,["x","y"]),s("xanchor"),s("yanchor"),vb.coerceFont(s,"font",a.font);var h=s("bgcolor");s("activecolor",a2e.contrast(h,m8.lightAmount,m8.darkAmount)),s("bordercolor"),s("borderwidth")}};function o2e(e,r,t,a){var n=a.calendar;function i(s,u){return vb.coerce(e,r,$G.buttons,s,u)}var o=i("visible");if(o){var l=i("step");l!=="all"&&(n&&n!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":i("stepmode"),i("count")),i("label")}}function l2e(e,r,t){for(var a=t.filter(function(l){return r[l].anchor===e._id}),n=0,i=0;i{"use strict";var s2e=c_(),u2e=fr().titleCase;eH.exports=function(r,t){var a=r._name,n={};if(t.step==="all")n[a+".autorange"]=!0;else{var i=f2e(r,t);n[a+".range[0]"]=i[0],n[a+".range[1]"]=i[1]}return n};function f2e(e,r){var t=e.range,a=new Date(e.r2l(t[1])),n=r.step,i=s2e["utc"+u2e(n)],o=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+i.offset(a,-o));break;case"todate":var s=i.offset(a,-o);l=e.l2r(+i.ceil(s));break}var u=t[1];return[l,u]}});var uH=R((UDe,sH)=>{"use strict";var db=ta(),c2e=Ct(),v2e=jn(),tH=Qt(),lH=Ca(),ru=fr(),aH=ru.strTranslate,hb=Ci(),h2e=an(),b8=ki(),nH=b8.LINE_SPACING,iH=b8.FROM_TL,oH=b8.FROM_BR,g8=p8(),d2e=rH();sH.exports=function(r){var t=r._fullLayout,a=t._infolayer.selectAll(".rangeselector").data(p2e(r),m2e);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(n){var i=db.select(this),o=n,l=o.rangeselector,s=i.selectAll("g.button").data(ru.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(u){var f=db.select(this),c=d2e(o,u);u._isActive=y2e(o,u,c),f.call(y8,l,u),f.call(b2e,l,u,r),f.on("click",function(){r._dragged||c2e.call("_guiRelayout",r,c)}),f.on("mouseover",function(){u._isHovered=!0,f.call(y8,l,u)}),f.on("mouseout",function(){u._isHovered=!1,f.call(y8,l,u)})}),_2e(r,s,l,o._name,i)})};function p2e(e){for(var r=h2e.list(e,"x",!0),t=[],a=0;a{"use strict";fH.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:cb()}}},layoutAttributes:cb(),handleDefaults:QG(),draw:uH()}});var pb=R(x8=>{"use strict";var vH=hn().extendFlat;x8.attributes=function(e,r){e=e||{},r=r||{};var t={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]},a=e.name?e.name+" ":"",n=e.trace?"trace ":"subplot ",i=r.description?" "+r.description:"",o={x:vH({},t,{}),y:vH({},t,{}),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};x8.defaults=function(e,r,t,a){var n=a&&a.x||[0,1],i=a&&a.y||[0,1],o=r.grid;if(o){var l=t("domain.column");l!==void 0&&(l{"use strict";var w2e=fr(),A2e=a0().counter,T2e=pb().attributes,hH=ai().idRegex,M2e=Da(),_8={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:[A2e("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[hH.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[hH.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:T2e({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 mb(e,r,t){var a=r[t+"axes"],n=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(a))return a;if(n.length)return n}function S2e(e,r){var t=e.grid||{},a=mb(r,t,"x"),n=mb(r,t,"y");if(!e.grid&&!a&&!n)return;var i=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),o=Array.isArray(a),l=Array.isArray(n),s=o&&a!==t.xaxes&&l&&n!==t.yaxes,u,f;i?(u=t.subplots.length,f=t.subplots[0].length):(l&&(u=n.length),o&&(f=a.length));var c=M2e.newContainer(r,"grid");function h(S,M){return w2e.coerce(t,c,_8,S,M)}var d=h("rows",u),p=h("columns",f);if(!(d*p>1)){delete r.grid;return}if(!i&&!o&&!l){var g=h("pattern")==="independent";g&&(i=!0)}c._hasSubplotGrid=i;var m=h("roworder"),x=m==="top to bottom",_=i?.2:.1,A=i?.3:.1,b,T;s&&r._splomGridDflt&&(b=r._splomGridDflt.xside,T=r._splomGridDflt.yside),c._domains={x:dH("x",h,_,b,p),y:dH("y",h,A,T,d,x)}}function dH(e,r,t,a,n,i){var o=r(e+"gap",t),l=r("domain."+e);r(e+"side",a);for(var s=new Array(n),u=l[0],f=(l[1]-u)/(n-o),c=f*(1-o),h=0;h{"use strict";yH.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 xH=R((WDe,bH)=>{"use strict";var gH=ia(),C2e=Ct(),E2e=fr(),L2e=Da(),D2e=A8();bH.exports=function(e,r,t,a){var n="error_"+a.axis,i=L2e.newContainer(r,n),o=e[n]||{};function l(p,g){return E2e.coerce(o,i,D2e,p,g)}var s=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=l("visible",s);if(u!==!1){var f=l("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(l("array"),l("traceref"),c||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),c||l("valueminus"));var h="copy_"+a.inherit+"style";if(a.inherit){var d=r["error_"+a.inherit];(d||{}).visible&&l(h,!(o.color||gH(o.thickness)||gH(o.width)))}(!a.inherit||!i[h])&&(l("color",t),l("thickness"),l("width",C2e.traceIs(r,"gl3d")?0:4))}}});var T8=R((jDe,wH)=>{"use strict";wH.exports=function(r){var t=r.type,a=r.symmetric;if(t==="data"){var n=r.array||[];if(a)return function(u,f){var c=+n[f];return[c,c]};var i=r.arrayminus||[];return function(u,f){var c=+n[f],h=+i[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var o=_H(t,r.value),l=_H(t,r.valueminus);return a||r.valueminus===void 0?function(u){var f=o(u);return[f,f]}:function(u){return[l(u),o(u)]}}};function _H(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var MH=R((XDe,TH)=>{"use strict";var M8=ia(),q2e=Ct(),S8=Va(),F2e=fr(),R2e=T8();TH.exports=function(r){for(var t=r.calcdata,a=0;a{"use strict";var SH=ta(),yf=ia(),P2e=Ca(),N2e=ni();kH.exports=function(r,t,a,n){var i,o=a.xaxis,l=a.yaxis,s=n&&n.duration>0,u=r._context.staticPlot;t.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(_){return _.id});var g=N2e.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var m=SH.select(this).selectAll("g.errorbar").data(f,p);if(m.exit().remove(),!!f.length){h.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var x=m.enter().append("g").classed("errorbar",!0);s&&x.style("opacity",0).transition().duration(n.duration).style("opacity",1),P2e.setClipUrl(m,a.layerClipId,r),m.each(function(_){var A=SH.select(this),b=I2e(_,o,l);if(!(g&&!_.vis)){var T,S=A.select("path.yerror");if(d.visible&&yf(b.x)&&yf(b.yh)&&yf(b.ys)){var M=d.width;T="M"+(b.x-M)+","+b.yh+"h"+2*M+"m-"+M+",0V"+b.ys,b.noYS||(T+="m-"+M+",0h"+2*M),i=!S.size(),i?S=A.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):s&&(S=S.transition().duration(n.duration).ease(n.easing)),S.attr("d",T)}else S.remove();var k=A.select("path.xerror");if(h.visible&&yf(b.y)&&yf(b.xh)&&yf(b.xs)){var D=(h.copy_ystyle?d:h).width;T="M"+b.xh+","+(b.y-D)+"v"+2*D+"m0,-"+D+"H"+b.xs,b.noXS||(T+="m0,-"+D+"v"+2*D),i=!k.size(),i?k=A.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):s&&(k=k.transition().duration(n.duration).ease(n.easing)),k.attr("d",T)}else k.remove()}})}})};function I2e(e,r,t){var a={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(a.yh=t.c2p(e.yh),a.ys=t.c2p(e.ys),yf(a.ys)||(a.noYS=!0,a.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(a.xh=r.c2p(e.xh),a.xs=r.c2p(e.xs),yf(a.xs)||(a.noXS=!0,a.xs=r.c2p(e.xs,!0))),a}});var DH=R((JDe,LH)=>{"use strict";var O2e=ta(),EH=Qt();LH.exports=function(r){r.each(function(t){var a=t[0].trace,n=a.error_y||{},i=a.error_x||{},o=O2e.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(EH.stroke,n.color),i.copy_ystyle&&(i=n),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(EH.stroke,i.color)})}});var RH=R(($De,FH)=>{"use strict";var Cp=fr(),qH=dl().overrideAll,Ep=A8(),$c={error_x:Cp.extendFlat({},Ep),error_y:Cp.extendFlat({},Ep)};delete $c.error_x.copy_zstyle;delete $c.error_y.copy_zstyle;delete $c.error_y.copy_ystyle;var Lp={error_x:Cp.extendFlat({},Ep),error_y:Cp.extendFlat({},Ep),error_z:Cp.extendFlat({},Ep)};delete Lp.error_x.copy_ystyle;delete Lp.error_y.copy_ystyle;delete Lp.error_z.copy_ystyle;delete Lp.error_z.copy_zstyle;FH.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$c,bar:$c,histogram:$c,scatter3d:qH(Lp,"calc","nested"),scattergl:qH($c,"calc","nested")}},supplyDefaults:xH(),calc:MH(),makeComputeError:T8(),plot:CH(),style:DH(),hoverInfo:z2e};function z2e(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var NH=R((KDe,PH)=>{"use strict";PH.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 HH=R((QDe,GH)=>{"use strict";var gf=ta(),k8=vl(),gb=jn(),IH=Ct(),tu=Va(),yb=xl(),Qo=fr(),Fl=Qo.strTranslate,UH=hn().extendFlat,C8=ef(),ql=Ca(),E8=Qt(),B2e=x1(),U2e=Ci(),G2e=gl().flipScale,H2e=IA(),V2e=OA(),Y2e=Bo(),L8=ki(),OH=L8.LINE_SPACING,zH=L8.FROM_TL,BH=L8.FROM_BR,ja=NH().cn;function W2e(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+ja.colorbar).data(j2e(e),function(a){return a._id});t.enter().append("g").attr("class",function(a){return a._id}).classed(ja.colorbar,!0),t.each(function(a){var n=gf.select(this);Qo.ensureSingle(n,"rect",ja.cbbg),Qo.ensureSingle(n,"g",ja.cbfills),Qo.ensureSingle(n,"g",ja.cblines),Qo.ensureSingle(n,"g",ja.cbaxis,function(o){o.classed(ja.crisp,!0)}),Qo.ensureSingle(n,"g",ja.cbtitleunshift,function(o){o.append("g").classed(ja.cbtitle,!0)}),Qo.ensureSingle(n,"rect",ja.cboutline);var i=X2e(n,a,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&Z2e(n,a,e)}),t.exit().each(function(a){gb.autoMargin(e,a._id)}).remove(),t.order()}function j2e(e){var r=e._fullLayout,t=e.calcdata,a=[],n,i,o,l;function s(A){return UH(A,{_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 l.calc=="function"?l.calc(e,o,n):(n._fillgradient=i.reversescale?G2e(i.colorscale):i.colorscale,n._zrange=[i[l.min],i[l.max]])}for(var f=0;f1){var ae=Math.pow(10,Math.floor(Math.log(Y)/Math.LN10));De*=ae*Qo.roundUp(Y/ae,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(ge.tick0=0)}ge.dtick=De}ge.domain=a?[re+p/b.h,re+V-p/b.h]:[re+d/b.w,re+V-d/b.w],ge.setScale(),e.attr("transform",Fl(Math.round(b.l),Math.round(b.t)));var Z=e.select("."+ja.cbtitleunshift).attr("transform",Fl(-Math.round(b.l),-Math.round(b.t))),Te=ge.ticklabelposition,Pe=ge.title.font.size,Ne=e.select("."+ja.cbaxis),lr,Ke=0,Je=0;function or(Ar,de){var Oe={propContainer:ge,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:A._dfltTitle.colorbar,containerGroup:e.select("."+ja.cbtitle)},Ue=Ar.charAt(0)==="h"?Ar.substr(1):"h"+Ar;e.selectAll("."+Ue+",."+Ue+"-math-group").remove(),B2e.draw(t,Ar,UH(Oe,de||{}))}function yr(){if(a&&Ee||!a&&!Ee){var Ar,de;k==="top"&&(Ar=d+b.l+j*g,de=p+b.t+K*(1-re-V)+3+Pe*.75),k==="bottom"&&(Ar=d+b.l+j*g,de=p+b.t+K*(1-re)-3-Pe*.25),k==="right"&&(de=p+b.t+K*m+3+Pe*.75,Ar=d+b.l+j*re),or(ge._id+"title",{attributes:{x:Ar,y:de,"text-anchor":a?"start":"middle"}})}}function ir(){if(a&&!Ee||!a&&Ee){var Ar=ge.position||0,de=ge._offset+ge._length/2,Oe,Ue;if(k==="right")Ue=de,Oe=b.l+j*Ar+10+Pe*(ge.showticklabels?1:.5);else if(Oe=de,k==="bottom"&&(Ue=b.t+K*Ar+10+(Te.indexOf("inside")===-1?ge.tickfont.size:0)+(ge.ticks!=="intside"&&r.ticklen||0)),k==="top"){var rt=M.text.split("
").length;Ue=b.t+K*Ar+10-W-OH*Pe*rt}or((a?"h":"v")+ge._id+"title",{avoid:{selection:gf.select(t).selectAll("g."+ge._id+"tick"),side:k,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?A.width:A.height},attributes:{x:Oe,y:Ue,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Xe(){if(!a&&!Ee||a&&Ee){var Ar=e.select("."+ja.cbtitle),de=Ar.select("text"),Oe=[-s/2,s/2],Ue=Ar.select(".h"+ge._id+"title-math-group").node(),rt=15.6;de.node()&&(rt=parseInt(de.node().style.fontSize,10)*OH);var Ur;if(Ue?(Ur=ql.bBox(Ue),Je=Ur.width,Ke=Ur.height,Ke>rt&&(Oe[1]-=(Ke-rt)/2)):de.node()&&!de.classed(ja.jsPlaceholder)&&(Ur=ql.bBox(de.node()),Je=Ur.width,Ke=Ur.height),a){if(Ke){if(Ke+=5,k==="top")ge.domain[1]-=Ke/b.h,Oe[1]*=-1;else{ge.domain[0]+=Ke/b.h;var Ye=U2e.lineCount(de);Oe[1]+=(1-Ye)*rt}Ar.attr("transform",Fl(Oe[0],Oe[1])),ge.setScale()}}else Je&&(k==="right"&&(ge.domain[0]+=(Je+Pe/2)/b.w),Ar.attr("transform",Fl(Oe[0],Oe[1])),ge.setScale())}e.selectAll("."+ja.cbfills+",."+ja.cblines).attr("transform",a?Fl(0,Math.round(b.h*(1-ge.domain[1]))):Fl(Math.round(b.w*ge.domain[0]),0)),Ne.attr("transform",a?Fl(0,Math.round(-b.t)):Fl(Math.round(-b.l),0));var Ve=e.select("."+ja.cbfills).selectAll("rect."+ja.cbfill).attr("style","").data(U);Ve.enter().append("rect").classed(ja.cbfill,!0).attr("style",""),Ve.exit().remove();var pr=D.map(ge.c2p).map(Math.round).sort(function(Ir,Gr){return Ir-Gr});Ve.each(function(Ir,Gr){var Ze=[Gr===0?D[0]:(U[Gr]+U[Gr-1])/2,Gr===U.length-1?D[1]:(U[Gr]+U[Gr+1])/2].map(ge.c2p).map(Math.round);a&&(Ze[1]=Qo.constrain(Ze[1]+(Ze[1]>Ze[0])?1:-1,pr[0],pr[1]));var oe=gf.select(this).attr(a?"x":"y",ve).attr(a?"y":"x",gf.min(Ze)).attr(a?"width":"height",Math.max(W,2)).attr(a?"height":"width",Math.max(gf.max(Ze)-gf.min(Ze),2));if(r._fillgradient)ql.gradient(oe,t,r._id,a?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var ye=N(Ir).replace("e-","");oe.attr("fill",k8(ye).toHexString())}});var Tr=e.select("."+ja.cblines).selectAll("path."+ja.cbline).data(S.color&&S.width?$:[]);Tr.enter().append("path").classed(ja.cbline,!0),Tr.exit().remove(),Tr.each(function(Ir){var Gr=ve,Ze=Math.round(ge.c2p(Ir))+S.width/2%1;gf.select(this).attr("d","M"+(a?Gr+","+Ze:Ze+","+Gr)+(a?"h":"v")+W).call(ql.lineGroupStyle,S.width,P(Ir),S.dash)}),Ne.selectAll("g."+ge._id+"tick,path").remove();var mr=ve+W+(s||0)/2-(r.ticks==="outside"?1:0),vr=tu.calcTicks(ge),Cr=tu.getTickSigns(ge)[2];return tu.drawTicks(t,ge,{vals:ge.ticks==="inside"?tu.clipEnds(ge,vr):vr,layer:Ne,path:tu.makeTickPath(ge,mr,Cr),transFn:tu.makeTransTickFn(ge)}),tu.drawLabels(t,ge,{vals:vr,layer:Ne,transFn:tu.makeTransTickLabelFn(ge),labelFns:tu.makeLabelFns(ge,mr)})}function Lr(){var Ar,de=W+s/2;Te.indexOf("inside")===-1&&(Ar=ql.bBox(Ne.node()),de+=a?Ar.width:Ar.height),lr=Z.select("text");var Oe=0,Ue=a&&k==="top",rt=!a&&k==="right",Ur=0;if(lr.node()&&!lr.classed(ja.jsPlaceholder)){var Ye,Ve=Z.select(".h"+ge._id+"title-math-group").node();Ve&&(a&&Ee||!a&&!Ee)?(Ar=ql.bBox(Ve),Oe=Ar.width,Ye=Ar.height):(Ar=ql.bBox(Z.node()),Oe=Ar.right-b.l-(a?ve:ke),Ye=Ar.bottom-b.t-(a?ke:ve),!a&&k==="top"&&(de+=Ar.height,Ur=Ar.height)),rt&&(lr.attr("transform",Fl(Oe/2+Pe/2,0)),Oe*=2),de=Math.max(de,a?Oe:Ye)}var pr=(a?d:p)*2+de+u+s/2,Tr=0;!a&&M.text&&h==="bottom"&&m<=0&&(Tr=pr/2,pr+=Tr,Ur+=Tr),A._hColorbarMoveTitle=Tr,A._hColorbarMoveCBTitle=Ur;var mr=u+s,vr=(a?ve:ke)-mr/2-(a?d:0),Cr=(a?ke:ve)-(a?B:p+Ur-Tr);e.select("."+ja.cbbg).attr("x",vr).attr("y",Cr).attr(a?"width":"height",Math.max(pr-Tr,2)).attr(a?"height":"width",Math.max(B+mr,2)).call(E8.fill,f).call(E8.stroke,r.bordercolor).style("stroke-width",u);var Ir=rt?Math.max(Oe-10,0):0;e.selectAll("."+ja.cboutline).attr("x",(a?ve:ke+d)+Ir).attr("y",(a?ke+p-B:ve)+(Ue?Ke:0)).attr(a?"width":"height",Math.max(W,2)).attr(a?"height":"width",Math.max(B-(a?2*p+Ke:2*d+Ir),2)).call(E8.stroke,r.outlinecolor).style({fill:"none","stroke-width":s});var Gr=a?xe*pr:0,Ze=a?0:(1-se)*pr-Ur;if(Gr=_?b.l-Gr:-Gr,Ze=x?b.t-Ze:-Ze,e.attr("transform",Fl(Gr,Ze)),!a&&(u||k8(f).getAlpha()&&!k8.equals(A.paper_bgcolor,f))){var oe=Ne.selectAll("text"),ye=oe[0].length,Ge=e.select("."+ja.cbbg).node(),Ie=ql.bBox(Ge),Wr=ql.getTranslate(e),tt=2;oe.each(function(Vi,Bn){var qn=0,yi=ye-1;if(Bn===qn||Bn===yi){var _t=ql.bBox(this),Ma=ql.getTranslate(this),ra;if(Bn===yi){var Pa=_t.right+Ma.x,Xa=Ie.right+Wr.x+ke-u-tt+g;ra=Xa-Pa,ra>0&&(ra=0)}else if(Bn===qn){var Sa=_t.left+Ma.x,La=Ie.left+Wr.x+ke+u+tt;ra=La-Sa,ra<0&&(ra=0)}ra&&(ye<3?this.setAttribute("transform","translate("+ra+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var $r={},St=zH[c],ea=BH[c],ma=zH[h],aa=BH[h],Qa=pr-W;a?(i==="pixels"?($r.y=m,$r.t=B*ma,$r.b=B*aa):($r.t=$r.b=0,$r.yt=m+n*ma,$r.yb=m-n*aa),l==="pixels"?($r.x=g,$r.l=pr*St,$r.r=pr*ea):($r.l=Qa*St,$r.r=Qa*ea,$r.xl=g-o*St,$r.xr=g+o*ea)):(i==="pixels"?($r.x=g,$r.l=B*St,$r.r=B*ea):($r.l=$r.r=0,$r.xl=g+n*St,$r.xr=g-n*ea),l==="pixels"?($r.y=1-m,$r.t=pr*ma,$r.b=pr*aa):($r.t=Qa*ma,$r.b=Qa*aa,$r.yt=m-o*ma,$r.yb=m+o*aa));var Ln=r.y<.5?"b":"t",si=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var Dn={r:A.width-vr-Gr,l:vr+$r.r,b:A.height-Cr-Ze,t:Cr+$r.b};_&&x?gb.autoMargin(t,r._id,$r):_?t._fullLayout._reservedMargin[r._id][Ln]=Dn[Ln]:x||a?t._fullLayout._reservedMargin[r._id][si]=Dn[si]:t._fullLayout._reservedMargin[r._id][Ln]=Dn[Ln]}return Qo.syncOrAsync([gb.previousPromises,yr,Xe,ir,gb.previousPromises,Lr],t)}function Z2e(e,r,t){var a=r.orientation==="v",n=t._fullLayout,i=n._size,o,l,s;yb.init({element:e.node(),gd:t,prepFn:function(){o=e.attr("transform"),C8(e)},moveFn:function(u,f){e.attr("transform",o+Fl(u,f)),l=yb.align((a?r._uFrac:r._vFrac)+u/i.w,a?r._thickFrac:r._lenFrac,0,1,r.xanchor),s=yb.align((a?r._vFrac:1-r._uFrac)-f/i.h,a?r._lenFrac:r._thickFrac,0,1,r.yanchor);var c=yb.getCursor(l,s,r.xanchor,r.yanchor);C8(e,c)},doneFn:function(){if(C8(e),l!==void 0&&s!==void 0){var u={};u[r._propPrefix+"x"]=l,u[r._propPrefix+"y"]=s,r._traceIndex!==void 0?IH.call("_guiRestyle",t,u,r._traceIndex):IH.call("_guiRelayout",t,u)}}})}function J2e(e,r,t){var a=r._levels,n=[],i=[],o,l,s=a.end+a.size/100,u=a.size,f=1.001*t[0]-.001*t[1],c=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(o=a.start+l*u,!(u>0?o>=s:o<=s));l++)o>f&&o0?o>=s:o<=s));l++)o>t[0]&&o{"use strict";VH.exports={moduleType:"component",name:"colorbar",attributes:Rg(),supplyDefaults:k4(),draw:HH().draw,hasColorbar:m4()}});var jH=R((rqe,WH)=>{"use strict";WH.exports={moduleType:"component",name:"legend",layoutAttributes:Tw(),supplyLayoutDefaults:kw(),draw:Bw(),style:Nw()}});var ZH=R((tqe,XH)=>{"use strict";XH.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 $H=R((aqe,JH)=>{"use strict";JH.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var q8=R((nqe,rV)=>{"use strict";var K2e=Ct(),eV=fr(),D8=eV.extendFlat,KH=eV.extendDeep;function QH(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function Q2e(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}rV.exports=function(r,t){var a,n=r.data,i=r.layout,o=KH([],n),l=KH({},i,QH(t.tileClass)),s=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var u=Object.keys(l);for(a=0;a{"use strict";var e3e=_g().EventEmitter,r3e=Ct(),t3e=fr(),tV=Uc(),a3e=q8(),n3e=M3(),i3e=S3();function o3e(e,r){var t=new e3e,a=a3e(e,{format:"png"}),n=a.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function i(){var l=tV.getDelay(n._fullLayout);setTimeout(function(){var s=n3e(n),u=document.createElement("canvas");u.id=t3e.randstr(),t=i3e({format:r.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:t,svg:s}),t.clean=function(){n&&document.body.removeChild(n)}},l)}var o=tV.getRedrawFunc(n);return r3e.call("_doPlot",n,a.data,a.layout,a.config).then(o).then(i).catch(function(l){t.emit("error",l)}),t}aV.exports=o3e});var lV=R((oqe,oV)=>{"use strict";var iV=Uc(),l3e={getDelay:iV.getDelay,getRedrawFunc:iV.getRedrawFunc,clone:q8(),toSVG:M3(),svgToImg:S3(),toImage:nV(),downloadImage:nA()};oV.exports=l3e});var uV=R(au=>{"use strict";au.version=Ry().version;oM();JC();var s3e=Ct(),Dp=au.register=s3e.register,R8=bO(),sV=Object.keys(R8);for(bb=0;bb{"use strict";fV.exports=uV()});var P8=R((uqe,hV)=>{"use strict";var u3e=Ct(),Lo=fr(),f3e=FA();function c3e(e,r,t,a){var n=e.cd,i=n[0].t,o=n[0].trace,l=e.xa,s=e.ya,u=i.x,f=i.y,c=l.c2p(r),h=s.c2p(t),d=e.distance,p;if(i.tree){var g=l.p2c(c-d),m=l.p2c(c+d),x=s.p2c(h-d),_=s.p2c(h+d);a==="x"?p=i.tree.range(Math.min(g,m),Math.min(s._rl[0],s._rl[1]),Math.max(g,m),Math.max(s._rl[0],s._rl[1])):p=i.tree.range(Math.min(g,m),Math.min(x,_),Math.max(g,m),Math.max(x,_))}else p=i.ids;var A,b,T,S,M,k,D,P,N,q=d;if(a==="x"){var O=!!o.xperiodalignment,U=!!o.yperiodalignment;for(M=0;M=Math.min($,W)&&c<=Math.max($,W)?0:1/0}if(k=Math.min(H,B)&&h<=Math.max(H,B)?0:1/0}N=Math.sqrt(k*k+D*D),b=p[M]}}}else for(M=p.length-1;M>-1;M--)A=p[M],T=u[A],S=f[A],k=l.c2p(T)-c,D=s.c2p(S)-h,P=Math.sqrt(k*k+D*D),P{"use strict";var dV=20;pV.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:dV,SYMBOL_STROKE:dV/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 _b=R((cqe,bV)=>{"use strict";var v3e=hl(),h3e=ci(),d3e=P6(),nn=sf(),mV=m1().axisHoverFormat,yV=Ac(),p3e=cg(),N8=hn().extendFlat,m3e=dl().overrideAll,y3e=ph().DASHES,gV=nn.line,nu=nn.marker,g3e=nu.line,mh=bV.exports=m3e({x:nn.x,x0:nn.x0,dx:nn.dx,y:nn.y,y0:nn.y0,dy:nn.dy,xperiod:nn.xperiod,yperiod:nn.yperiod,xperiod0:nn.xperiod0,yperiod0:nn.yperiod0,xperiodalignment:nn.xperiodalignment,yperiodalignment:nn.yperiodalignment,xhoverformat:mV("x"),yhoverformat:mV("y"),text:nn.text,hovertext:nn.hovertext,textposition:nn.textposition,textfont:h3e({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:gV.color,width:gV.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:p3e(y3e),dflt:"solid"}},marker:N8({},yV("marker"),{symbol:nu.symbol,angle:nu.angle,size:nu.size,sizeref:nu.sizeref,sizemin:nu.sizemin,sizemode:nu.sizemode,opacity:nu.opacity,colorbar:nu.colorbar,line:N8({},yV("marker.line"),{width:g3e.width})}),connectgaps:nn.connectgaps,fill:N8({},nn.fill,{dflt:"none"}),fillcolor:d3e(),selected:{marker:nn.selected.marker,textfont:nn.selected.textfont},unselected:{marker:nn.unselected.marker,textfont:nn.unselected.textfont},opacity:v3e.opacity},"calc","nested");mh.x.editType=mh.y.editType=mh.x0.editType=mh.y0.editType="calc+clearAxisTypes";mh.hovertemplate=nn.hovertemplate;mh.texttemplate=nn.texttemplate});var wb=R(I8=>{"use strict";var xV=ph();I8.isOpenSymbol=function(e){return typeof e=="string"?xV.OPEN_RE.test(e):e%200>100};I8.isDotSymbol=function(e){return typeof e=="string"?xV.DOT_RE.test(e):e>200}});var AV=R((hqe,wV)=>{"use strict";var _V=fr(),b3e=Ct(),x3e=wb(),_3e=_b(),w3e=Q1(),Ab=ni(),A3e=lA(),T3e=sA(),M3e=D3(),S3e=uA(),k3e=cA(),C3e=fA();wV.exports=function(r,t,a,n){function i(d,p){return _V.coerce(r,t,_3e,d,p)}var o=r.marker?x3e.isOpenSymbol(r.marker.symbol):!1,l=Ab.isBubble(r),s=A3e(r,t,n,i);if(!s){t.visible=!1;return}T3e(r,t,n,i),i("xhoverformat"),i("yhoverformat");var u=s{"use strict";var E3e=CA();TV.exports=function(r,t,a){var n=r.i;return"x"in r||(r.x=t._x[n]),"y"in r||(r.y=t._y[n]),E3e(r,t,a)}});var kV=R((pqe,SV)=>{"use strict";function L3e(e,r,t,a,n){for(var i=n+1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s>=0?(i=o,n=o-1):a=o+1}return i}function D3e(e,r,t,a,n){for(var i=n+1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s>0?(i=o,n=o-1):a=o+1}return i}function q3e(e,r,t,a,n){for(var i=a-1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s<0?(i=o,a=o+1):n=o-1}return i}function F3e(e,r,t,a,n){for(var i=a-1;a<=n;){var o=a+n>>>1,l=e[o],s=t!==void 0?t(l,r):l-r;s<=0?(i=o,a=o+1):n=o-1}return i}function R3e(e,r,t,a,n){for(;a<=n;){var i=a+n>>>1,o=e[i],l=t!==void 0?t(o,r):o-r;if(l===0)return i;l<=0?a=i+1:n=i-1}return-1}function qp(e,r,t,a,n,i){return typeof t=="function"?i(e,r,t,a===void 0?0:a|0,n===void 0?e.length-1:n|0):i(e,r,void 0,t===void 0?0:t|0,a===void 0?e.length-1:a|0)}SV.exports={ge:function(e,r,t,a,n){return qp(e,r,t,a,n,L3e)},gt:function(e,r,t,a,n){return qp(e,r,t,a,n,D3e)},lt:function(e,r,t,a,n){return qp(e,r,t,a,n,q3e)},le:function(e,r,t,a,n){return qp(e,r,t,a,n,F3e)},eq:function(e,r,t,a,n){return qp(e,r,t,a,n,R3e)}}});var yh=R((mqe,CV)=>{CV.exports=P3e;function P3e(e,r,t){return rt?t:e:er?r:e}});var hs=R((yqe,LV)=>{"use strict";LV.exports=function(r,t,a){var n={},i,o;if(typeof t=="string"&&(t=EV(t)),Array.isArray(t)){var l={};for(o=0;o{"use strict";var N3e=hs();DV.exports=I3e;function I3e(e){var r;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?r={width:e[0],height:e[0],x:0,y:0}:e.length===2?r={width:e[0],height:e[1],x:0,y:0}:r={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=N3e(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"}),r={x:e.left||0,y:e.top||0},e.width==null?e.right?r.width=e.right-r.x:r.width=0:r.width=e.width,e.height==null?e.bottom?r.height=e.bottom-r.y:r.height=0:r.height=e.height),r}});var Kc=R((bqe,qV)=>{"use strict";qV.exports=O3e;function O3e(e,r){if(!e||e.length==null)throw Error("Argument should be an array");r==null?r=1:r=Math.floor(r);for(var t=Array(r*2),a=0;an&&(n=e[o]),e[o]{FV.exports=function(){for(var e=0;e{PV.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 Qc=R((wqe,IV)=>{var NV=Tb();IV.exports=z3e;function z3e(e,r,t){if(!e)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var a=e[0].length,n=e.length*a,i,o,l,s;(!r||typeof r=="string")&&(r=new(NV(r||"float32"))(n+t));var u=r.length-t;if(n!==u)throw new Error("source length "+n+" ("+a+"x"+e.length+") does not match destination length "+u);for(i=0,l=t;i{"use strict";OV.exports=function(e){var r=typeof e;return e!==null&&(r==="object"||r==="function")}});var UV=R((Tqe,BV)=>{"use strict";BV.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var XV=R((Mqe,jV)=>{"use strict";var GV=kV(),HV=yh(),B3e=gh(),U3e=Kc(),VV=hs(),z8=RV(),G3e=Qc(),H3e=zV(),V3e=Tb(),YV=UV(),Y3e=1073741824;jV.exports=function(r,t){t||(t={}),r=G3e(r,"float64"),t=VV(t,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let a=z8(t.maxDepth,255),n=z8(t.bounds,U3e(r,2));n[0]===n[2]&&n[2]++,n[1]===n[3]&&n[3]++;let i=WV(r,n),o=r.length>>>1,l;t.dtype||(t.dtype="array"),typeof t.dtype=="string"?l=new(V3e(t.dtype))(o):t.dtype&&(l=t.dtype,Array.isArray(l)&&(l.length=o));for(let x=0;xa||S>Y3e){for(let B=0;Bve||D>xe||P=q||j===K)return;let se=s[V];K===void 0&&(K=se.length);for(let ae=j;ae=b&&Te<=S&&Pe>=T&&Pe<=M&&O.push(Z)}let be=u[V],re=be[j*4+0],ke=be[j*4+1],ge=be[j*4+2],Ee=be[j*4+3],De=$(be,j+1),Ce=B*.5,Y=V+1;U(W,H,Ce,Y,re,ke||ge||Ee||De),U(W,H+Ce,Ce,Y,ke,ge||Ee||De),U(W+Ce,H,Ce,Y,ge,Ee||De),U(W+Ce,H+Ce,Ce,Y,Ee,De)}function $(W,H){let B=null,V=0;for(;B===null;)if(B=W[H*4+V],V++,V>W.length)return null;return B}return O}function g(x,_,A,b,T){let S=[];for(let M=0;M{"use strict";ZV.exports=XV()});var U8=R((kqe,JV)=>{JV.exports=W3e;function W3e(e){var r=0,t=0,a=0,n=0;return e.map(function(i){i=i.slice();var o=i[0],l=o.toUpperCase();if(o!=l)switch(i[0]=l,o){case"a":i[6]+=a,i[7]+=n;break;case"v":i[1]+=n;break;case"h":i[1]+=a;break;default:for(var s=1;s{"use strict";Object.defineProperty(Mb,"__esModule",{value:!0});var j3e=function(){function e(r,t){var a=[],n=!0,i=!1,o=void 0;try{for(var l=r[Symbol.iterator](),s;!(n=(s=l.next()).done)&&(a.push(s.value),!(t&&a.length===t));n=!0);}catch(u){i=!0,o=u}finally{try{!n&&l.return&&l.return()}finally{if(i)throw o}}return a}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Fp=Math.PI*2,G8=function(r,t,a,n,i,o,l){var s=r.x,u=r.y;s*=t,u*=a;var f=n*s-i*u,c=i*s+n*u;return{x:f+o,y:c+l}},X3e=function(r,t){var a=t===1.5707963267948966?.551915024494:t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),n=Math.cos(r),i=Math.sin(r),o=Math.cos(r+t),l=Math.sin(r+t);return[{x:n-i*a,y:i+n*a},{x:o+l*a,y:l-o*a},{x:o,y:l}]},$V=function(r,t,a,n){var i=r*n-t*a<0?-1:1,o=r*a+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},Z3e=function(r,t,a,n,i,o,l,s,u,f,c,h){var d=Math.pow(i,2),p=Math.pow(o,2),g=Math.pow(c,2),m=Math.pow(h,2),x=d*p-d*m-p*g;x<0&&(x=0),x/=d*m+p*g,x=Math.sqrt(x)*(l===s?-1:1);var _=x*i/o*h,A=x*-o/i*c,b=f*_-u*A+(r+a)/2,T=u*_+f*A+(t+n)/2,S=(c-_)/i,M=(h-A)/o,k=(-c-_)/i,D=(-h-A)/o,P=$V(1,0,S,M),N=$V(S,M,k,D);return s===0&&N>0&&(N-=Fp),s===1&&N<0&&(N+=Fp),[b,T,P,N]},J3e=function(r){var t=r.px,a=r.py,n=r.cx,i=r.cy,o=r.rx,l=r.ry,s=r.xAxisRotation,u=s===void 0?0:s,f=r.largeArcFlag,c=f===void 0?0:f,h=r.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||l===0)return[];var g=Math.sin(u*Fp/360),m=Math.cos(u*Fp/360),x=m*(t-n)/2+g*(a-i)/2,_=-g*(t-n)/2+m*(a-i)/2;if(x===0&&_===0)return[];o=Math.abs(o),l=Math.abs(l);var A=Math.pow(x,2)/Math.pow(o,2)+Math.pow(_,2)/Math.pow(l,2);A>1&&(o*=Math.sqrt(A),l*=Math.sqrt(A));var b=Z3e(t,a,n,i,o,l,c,d,g,m,x,_),T=j3e(b,4),S=T[0],M=T[1],k=T[2],D=T[3],P=Math.abs(D)/(Fp/4);Math.abs(1-P)<1e-7&&(P=1);var N=Math.max(Math.ceil(P),1);D/=N;for(var q=0;q{"use strict";rY.exports=K3e;var $3e=QV();function K3e(e){for(var r,t=[],a=0,n=0,i=0,o=0,l=null,s=null,u=0,f=0,c=0,h=e.length;c4?(a=d[d.length-4],n=d[d.length-3]):(a=u,n=f),t.push(d)}return t}function Sb(e,r,t,a){return["C",e,r,t,a,t,a]}function eY(e,r,t,a,n,i){return["C",e/3+2/3*t,r/3+2/3*a,n/3+2/3*t,i/3+2/3*a,n,i]}});var H8=R((Eqe,aY)=>{"use strict";aY.exports=function(r){return typeof r!="string"?!1:(r=r.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(r)&&/[\dz]$/i.test(r)&&r.length>4))}});var kb=R((Lqe,nY)=>{"use strict";nY.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),a=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var n=42;r[t]=n;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var i=Object.getOwnPropertySymbols(r);if(i.length!==1||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(r,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0}});var Rp=R((Dqe,iY)=>{"use strict";var Q3e=kb();iY.exports=function(){return Q3e()&&!!Symbol.toStringTag}});var lY=R((qqe,oY)=>{"use strict";oY.exports=Error});var uY=R((Fqe,sY)=>{"use strict";sY.exports=EvalError});var cY=R((Rqe,fY)=>{"use strict";fY.exports=RangeError});var hY=R((Pqe,vY)=>{"use strict";vY.exports=ReferenceError});var V8=R((Nqe,dY)=>{"use strict";dY.exports=SyntaxError});var Pp=R((Iqe,pY)=>{"use strict";pY.exports=TypeError});var yY=R((Oqe,mY)=>{"use strict";mY.exports=URIError});var xY=R((zqe,bY)=>{"use strict";var gY=typeof Symbol!="undefined"&&Symbol,ebe=kb();bY.exports=function(){return typeof gY!="function"||typeof Symbol!="function"||typeof gY("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ebe()}});var AY=R((Bqe,wY)=>{"use strict";var _Y={foo:{}},rbe=Object;wY.exports=function(){return{__proto__:_Y}.foo===_Y.foo&&!({__proto__:null}instanceof rbe)}});var SY=R((Uqe,MY)=>{"use strict";var tbe="Function.prototype.bind called on incompatible ",abe=Object.prototype.toString,nbe=Math.max,ibe="[object Function]",TY=function(r,t){for(var a=[],n=0;n{"use strict";var sbe=SY();kY.exports=Function.prototype.bind||sbe});var EY=R((Hqe,CY)=>{"use strict";var ube=Function.prototype.call,fbe=Object.prototype.hasOwnProperty,cbe=Cb();CY.exports=cbe.call(ube,fbe)});var Ah=R((Vqe,RY)=>{"use strict";var _a,vbe=lY(),hbe=uY(),dbe=cY(),pbe=hY(),wh=V8(),_h=Pp(),mbe=yY(),FY=Function,Y8=function(e){try{return FY('"use strict"; return ('+e+").constructor;")()}catch(r){}},ev=Object.getOwnPropertyDescriptor;if(ev)try{ev({},"")}catch(e){ev=null}var W8=function(){throw new _h},ybe=ev?function(){try{return arguments.callee,W8}catch(e){try{return ev(arguments,"callee").get}catch(r){return W8}}}():W8,bh=xY()(),gbe=AY()(),di=Object.getPrototypeOf||(gbe?function(e){return e.__proto__}:null),xh={},bbe=typeof Uint8Array=="undefined"||!di?_a:di(Uint8Array),rv={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?_a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?_a:ArrayBuffer,"%ArrayIteratorPrototype%":bh&&di?di([][Symbol.iterator]()):_a,"%AsyncFromSyncIteratorPrototype%":_a,"%AsyncFunction%":xh,"%AsyncGenerator%":xh,"%AsyncGeneratorFunction%":xh,"%AsyncIteratorPrototype%":xh,"%Atomics%":typeof Atomics=="undefined"?_a:Atomics,"%BigInt%":typeof BigInt=="undefined"?_a:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?_a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?_a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?_a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":vbe,"%eval%":eval,"%EvalError%":hbe,"%Float32Array%":typeof Float32Array=="undefined"?_a:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?_a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?_a:FinalizationRegistry,"%Function%":FY,"%GeneratorFunction%":xh,"%Int8Array%":typeof Int8Array=="undefined"?_a:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?_a:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?_a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":bh&&di?di(di([][Symbol.iterator]())):_a,"%JSON%":typeof JSON=="object"?JSON:_a,"%Map%":typeof Map=="undefined"?_a:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!bh||!di?_a:di(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?_a:Promise,"%Proxy%":typeof Proxy=="undefined"?_a:Proxy,"%RangeError%":dbe,"%ReferenceError%":pbe,"%Reflect%":typeof Reflect=="undefined"?_a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?_a:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!bh||!di?_a:di(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?_a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":bh&&di?di(""[Symbol.iterator]()):_a,"%Symbol%":bh?Symbol:_a,"%SyntaxError%":wh,"%ThrowTypeError%":ybe,"%TypedArray%":bbe,"%TypeError%":_h,"%Uint8Array%":typeof Uint8Array=="undefined"?_a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?_a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?_a:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?_a:Uint32Array,"%URIError%":mbe,"%WeakMap%":typeof WeakMap=="undefined"?_a:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?_a:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?_a:WeakSet};if(di)try{null.error}catch(e){LY=di(di(e)),rv["%Error.prototype%"]=LY}var LY,xbe=function e(r){var t;if(r==="%AsyncFunction%")t=Y8("async function () {}");else if(r==="%GeneratorFunction%")t=Y8("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=Y8("async function* () {}");else if(r==="%AsyncGenerator%"){var a=e("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(r==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&di&&(t=di(n.prototype))}return rv[r]=t,t},DY={__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"]},Np=Cb(),Eb=EY(),_be=Np.call(Function.call,Array.prototype.concat),wbe=Np.call(Function.apply,Array.prototype.splice),qY=Np.call(Function.call,String.prototype.replace),Lb=Np.call(Function.call,String.prototype.slice),Abe=Np.call(Function.call,RegExp.prototype.exec),Tbe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mbe=/\\(\\)?/g,Sbe=function(r){var t=Lb(r,0,1),a=Lb(r,-1);if(t==="%"&&a!=="%")throw new wh("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new wh("invalid intrinsic syntax, expected opening `%`");var n=[];return qY(r,Tbe,function(i,o,l,s){n[n.length]=l?qY(s,Mbe,"$1"):o||i}),n},kbe=function(r,t){var a=r,n;if(Eb(DY,a)&&(n=DY[a],a="%"+n[0]+"%"),Eb(rv,a)){var i=rv[a];if(i===xh&&(i=xbe(a)),typeof i=="undefined"&&!t)throw new _h("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:n,name:a,value:i}}throw new wh("intrinsic "+r+" does not exist!")};RY.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new _h("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new _h('"allowMissing" argument must be a boolean');if(Abe(/^%?[^%]*%?$/,r)===null)throw new wh("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Sbe(r),n=a.length>0?a[0]:"",i=kbe("%"+n+"%",t),o=i.name,l=i.value,s=!1,u=i.alias;u&&(n=u[0],wbe(a,_be([0,1],u)));for(var f=1,c=!0;f=a.length){var g=ev(l,h);c=!!g,c&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[h]}else c=Eb(l,h),l=l[h];c&&!s&&(rv[o]=l)}}return l}});var qb=R((Yqe,PY)=>{"use strict";var Cbe=Ah(),Db=Cbe("%Object.defineProperty%",!0)||!1;if(Db)try{Db({},"a",{value:1})}catch(e){Db=!1}PY.exports=Db});var Ip=R((Wqe,NY)=>{"use strict";var Ebe=Ah(),Fb=Ebe("%Object.getOwnPropertyDescriptor%",!0);if(Fb)try{Fb([],"length")}catch(e){Fb=null}NY.exports=Fb});var BY=R((jqe,zY)=>{"use strict";var IY=qb(),Lbe=V8(),Th=Pp(),OY=Ip();zY.exports=function(r,t,a){if(!r||typeof r!="object"&&typeof r!="function")throw new Th("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Th("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Th("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Th("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Th("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Th("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,s=!!OY&&OY(r,t);if(IY)IY(r,t,{configurable:o===null&&s?s.configurable:!o,enumerable:n===null&&s?s.enumerable:!n,value:a,writable:i===null&&s?s.writable:!i});else if(l||!n&&!i&&!o)r[t]=a;else throw new Lbe("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var X8=R((Xqe,GY)=>{"use strict";var j8=qb(),UY=function(){return!!j8};UY.hasArrayLengthDefineBug=function(){if(!j8)return null;try{return j8([],"length",{value:1}).length!==1}catch(r){return!0}};GY.exports=UY});var jY=R((Zqe,WY)=>{"use strict";var Dbe=Ah(),HY=BY(),qbe=X8()(),VY=Ip(),YY=Pp(),Fbe=Dbe("%Math.floor%");WY.exports=function(r,t){if(typeof r!="function")throw new YY("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Fbe(t)!==t)throw new YY("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,i=!0;if("length"in r&&VY){var o=VY(r,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(i=!1)}return(n||i||!a)&&(qbe?HY(r,"length",t,!0,!0):HY(r,"length",t)),r}});var Op=R((Jqe,Rb)=>{"use strict";var Z8=Cb(),Pb=Ah(),Rbe=jY(),Pbe=Pp(),JY=Pb("%Function.prototype.apply%"),$Y=Pb("%Function.prototype.call%"),KY=Pb("%Reflect.apply%",!0)||Z8.call($Y,JY),XY=qb(),Nbe=Pb("%Math.max%");Rb.exports=function(r){if(typeof r!="function")throw new Pbe("a function is required");var t=KY(Z8,$Y,arguments);return Rbe(t,1+Nbe(0,r.length-(arguments.length-1)),!0)};var ZY=function(){return KY(Z8,JY,arguments)};XY?XY(Rb.exports,"apply",{value:ZY}):Rb.exports.apply=ZY});var Mh=R(($qe,rW)=>{"use strict";var QY=Ah(),eW=Op(),Ibe=eW(QY("String.prototype.indexOf"));rW.exports=function(r,t){var a=QY(r,!!t);return typeof a=="function"&&Ibe(r,".prototype.")>-1?eW(a):a}});var nW=R((Kqe,aW)=>{"use strict";var Obe=Rp()(),zbe=Mh(),J8=zbe("Object.prototype.toString"),Nb=function(r){return Obe&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:J8(r)==="[object Arguments]"},tW=function(r){return Nb(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&J8(r)!=="[object Array]"&&J8(r.callee)==="[object Function]"},Bbe=function(){return Nb(arguments)}();Nb.isLegacyArguments=tW;aW.exports=Bbe?Nb:tW});var lW=R((Qqe,oW)=>{"use strict";var Ube=Object.prototype.toString,Gbe=Function.prototype.toString,Hbe=/^\s*(?:function)?\*/,iW=Rp()(),$8=Object.getPrototypeOf,Vbe=function(){if(!iW)return!1;try{return Function("return function*() {}")()}catch(e){}},K8;oW.exports=function(r){if(typeof r!="function")return!1;if(Hbe.test(Gbe.call(r)))return!0;if(!iW){var t=Ube.call(r);return t==="[object GeneratorFunction]"}if(!$8)return!1;if(typeof K8=="undefined"){var a=Vbe();K8=a?$8(a):!1}return $8(r)===K8}});var cW=R((eFe,fW)=>{"use strict";var uW=Function.prototype.toString,Sh=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e7,Ib;if(typeof Sh=="function"&&typeof Object.defineProperty=="function")try{e7=Object.defineProperty({},"length",{get:function(){throw Ib}}),Ib={},Sh(function(){throw 42},null,e7)}catch(e){e!==Ib&&(Sh=null)}else Sh=null;var Ybe=/^\s*class\b/,r7=function(r){try{var t=uW.call(r);return Ybe.test(t)}catch(a){return!1}},Q8=function(r){try{return r7(r)?!1:(uW.call(r),!0)}catch(t){return!1}},Ob=Object.prototype.toString,Wbe="[object Object]",jbe="[object Function]",Xbe="[object GeneratorFunction]",Zbe="[object HTMLAllCollection]",Jbe="[object HTML document.all class]",$be="[object HTMLCollection]",Kbe=typeof Symbol=="function"&&!!Symbol.toStringTag,Qbe=!(0 in[,]),t7=function(){return!1};typeof document=="object"&&(sW=document.all,Ob.call(sW)===Ob.call(document.all)&&(t7=function(r){if((Qbe||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=Ob.call(r);return(t===Zbe||t===Jbe||t===$be||t===Wbe)&&r("")==null}catch(a){}return!1}));var sW;fW.exports=Sh?function(r){if(t7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{Sh(r,null,e7)}catch(t){if(t!==Ib)return!1}return!r7(r)&&Q8(r)}:function(r){if(t7(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(Kbe)return Q8(r);if(r7(r))return!1;var t=Ob.call(r);return t!==jbe&&t!==Xbe&&!/^\[object HTML/.test(t)?!1:Q8(r)}});var a7=R((rFe,hW)=>{"use strict";var exe=cW(),rxe=Object.prototype.toString,vW=Object.prototype.hasOwnProperty,txe=function(r,t,a){for(var n=0,i=r.length;n=3&&(n=a),rxe.call(r)==="[object Array]"?txe(r,t,n):typeof r=="string"?axe(r,t,n):nxe(r,t,n)};hW.exports=ixe});var i7=R((tFe,dW)=>{"use strict";var n7=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],oxe=typeof globalThis=="undefined"?window:globalThis;dW.exports=function(){for(var r=[],t=0;t{"use strict";var Bb=a7(),lxe=i7(),pW=Op(),s7=Mh(),zb=Ip(),sxe=s7("Object.prototype.toString"),yW=Rp()(),mW=typeof globalThis=="undefined"?window:globalThis,l7=lxe(),u7=s7("String.prototype.slice"),o7=Object.getPrototypeOf,uxe=s7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1?t:t!=="Object"?!1:cxe(r)}return zb?fxe(r):null}});var MW=R((nFe,TW)=>{"use strict";var xW=a7(),vxe=i7(),c7=Mh(),hxe=c7("Object.prototype.toString"),_W=Rp()(),Gb=Ip(),dxe=typeof globalThis=="undefined"?window:globalThis,wW=vxe(),pxe=c7("Array.prototype.indexOf",!0)||function(r,t){for(var a=0;a-1}return Gb?yxe(r):!1}});var zW=R(ga=>{"use strict";var gxe=nW(),bxe=lW(),Rl=bW(),SW=MW();function kh(e){return e.call.bind(e)}var kW=typeof BigInt!="undefined",CW=typeof Symbol!="undefined",el=kh(Object.prototype.toString),xxe=kh(Number.prototype.valueOf),_xe=kh(String.prototype.valueOf),wxe=kh(Boolean.prototype.valueOf);kW&&(EW=kh(BigInt.prototype.valueOf));var EW;CW&&(LW=kh(Symbol.prototype.valueOf));var LW;function Bp(e,r){if(typeof e!="object")return!1;try{return r(e),!0}catch(t){return!1}}ga.isArgumentsObject=gxe;ga.isGeneratorFunction=bxe;ga.isTypedArray=SW;function Axe(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ga.isPromise=Axe;function Txe(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):SW(e)||qW(e)}ga.isArrayBufferView=Txe;function Mxe(e){return Rl(e)==="Uint8Array"}ga.isUint8Array=Mxe;function Sxe(e){return Rl(e)==="Uint8ClampedArray"}ga.isUint8ClampedArray=Sxe;function kxe(e){return Rl(e)==="Uint16Array"}ga.isUint16Array=kxe;function Cxe(e){return Rl(e)==="Uint32Array"}ga.isUint32Array=Cxe;function Exe(e){return Rl(e)==="Int8Array"}ga.isInt8Array=Exe;function Lxe(e){return Rl(e)==="Int16Array"}ga.isInt16Array=Lxe;function Dxe(e){return Rl(e)==="Int32Array"}ga.isInt32Array=Dxe;function qxe(e){return Rl(e)==="Float32Array"}ga.isFloat32Array=qxe;function Fxe(e){return Rl(e)==="Float64Array"}ga.isFloat64Array=Fxe;function Rxe(e){return Rl(e)==="BigInt64Array"}ga.isBigInt64Array=Rxe;function Pxe(e){return Rl(e)==="BigUint64Array"}ga.isBigUint64Array=Pxe;function Hb(e){return el(e)==="[object Map]"}Hb.working=typeof Map!="undefined"&&Hb(new Map);function Nxe(e){return typeof Map=="undefined"?!1:Hb.working?Hb(e):e instanceof Map}ga.isMap=Nxe;function Vb(e){return el(e)==="[object Set]"}Vb.working=typeof Set!="undefined"&&Vb(new Set);function Ixe(e){return typeof Set=="undefined"?!1:Vb.working?Vb(e):e instanceof Set}ga.isSet=Ixe;function Yb(e){return el(e)==="[object WeakMap]"}Yb.working=typeof WeakMap!="undefined"&&Yb(new WeakMap);function Oxe(e){return typeof WeakMap=="undefined"?!1:Yb.working?Yb(e):e instanceof WeakMap}ga.isWeakMap=Oxe;function h7(e){return el(e)==="[object WeakSet]"}h7.working=typeof WeakSet!="undefined"&&h7(new WeakSet);function zxe(e){return h7(e)}ga.isWeakSet=zxe;function Wb(e){return el(e)==="[object ArrayBuffer]"}Wb.working=typeof ArrayBuffer!="undefined"&&Wb(new ArrayBuffer);function DW(e){return typeof ArrayBuffer=="undefined"?!1:Wb.working?Wb(e):e instanceof ArrayBuffer}ga.isArrayBuffer=DW;function jb(e){return el(e)==="[object DataView]"}jb.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&jb(new DataView(new ArrayBuffer(1),0,1));function qW(e){return typeof DataView=="undefined"?!1:jb.working?jb(e):e instanceof DataView}ga.isDataView=qW;var v7=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function zp(e){return el(e)==="[object SharedArrayBuffer]"}function FW(e){return typeof v7=="undefined"?!1:(typeof zp.working=="undefined"&&(zp.working=zp(new v7)),zp.working?zp(e):e instanceof v7)}ga.isSharedArrayBuffer=FW;function Bxe(e){return el(e)==="[object AsyncFunction]"}ga.isAsyncFunction=Bxe;function Uxe(e){return el(e)==="[object Map Iterator]"}ga.isMapIterator=Uxe;function Gxe(e){return el(e)==="[object Set Iterator]"}ga.isSetIterator=Gxe;function Hxe(e){return el(e)==="[object Generator]"}ga.isGeneratorObject=Hxe;function Vxe(e){return el(e)==="[object WebAssembly.Module]"}ga.isWebAssemblyCompiledModule=Vxe;function RW(e){return Bp(e,xxe)}ga.isNumberObject=RW;function PW(e){return Bp(e,_xe)}ga.isStringObject=PW;function NW(e){return Bp(e,wxe)}ga.isBooleanObject=NW;function IW(e){return kW&&Bp(e,EW)}ga.isBigIntObject=IW;function OW(e){return CW&&Bp(e,LW)}ga.isSymbolObject=OW;function Yxe(e){return RW(e)||PW(e)||NW(e)||IW(e)||OW(e)}ga.isBoxedPrimitive=Yxe;function Wxe(e){return typeof Uint8Array!="undefined"&&(DW(e)||FW(e))}ga.isAnyArrayBuffer=Wxe;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ga,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var UW=R((oFe,BW)=>{BW.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}});var GW=R((lFe,d7)=>{typeof Object.create=="function"?d7.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:d7.exports=function(r,t){if(t){r.super_=t;var a=function(){};a.prototype=t.prototype,r.prototype=new a,r.prototype.constructor=r}}});var Eh=R(ba=>{var HW=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),a={},n=0;n=n)return l;switch(l){case"%s":return String(a[t++]);case"%d":return Number(a[t++]);case"%j":try{return JSON.stringify(a[t++])}catch(s){return"[Circular]"}default:return l}}),o=a[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),g7(r)?t.showHidden=r:r&&ba._extend(t,r),av(t.showHidden)&&(t.showHidden=!1),av(t.depth)&&(t.depth=2),av(t.colors)&&(t.colors=!1),av(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Xxe),$b(t,e,t.depth)}ba.inspect=bf;bf.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]};bf.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Xxe(e,r){var t=bf.styles[r];return t?"\x1B["+bf.colors[t][0]+"m"+e+"\x1B["+bf.colors[t][1]+"m":e}function Zxe(e,r){return e}function Jxe(e){var r={};return e.forEach(function(t,a){r[t]=!0}),r}function $b(e,r,t){if(e.customInspect&&r&&Jb(r.inspect)&&r.inspect!==ba.inspect&&!(r.constructor&&r.constructor.prototype===r)){var a=r.inspect(t,e);return ex(a)||(a=$b(e,a,t)),a}var n=$xe(e,r);if(n)return n;var i=Object.keys(r),o=Jxe(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(r)),Gp(r)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p7(r);if(i.length===0){if(Jb(r)){var l=r.name?": "+r.name:"";return e.stylize("[Function"+l+"]","special")}if(Up(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(Kb(r))return e.stylize(Date.prototype.toString.call(r),"date");if(Gp(r))return p7(r)}var s="",u=!1,f=["{","}"];if(YW(r)&&(u=!0,f=["[","]"]),Jb(r)){var c=r.name?": "+r.name:"";s=" [Function"+c+"]"}if(Up(r)&&(s=" "+RegExp.prototype.toString.call(r)),Kb(r)&&(s=" "+Date.prototype.toUTCString.call(r)),Gp(r)&&(s=" "+p7(r)),i.length===0&&(!u||r.length==0))return f[0]+s+f[1];if(t<0)return Up(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var h;return u?h=Kxe(e,r,t,o,i):h=i.map(function(d){return y7(e,r,t,o,d,u)}),e.seen.pop(),Qxe(h,s,f)}function $xe(e,r){if(av(r))return e.stylize("undefined","undefined");if(ex(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(WW(r))return e.stylize(""+r,"number");if(g7(r))return e.stylize(""+r,"boolean");if(Qb(r))return e.stylize("null","null")}function p7(e){return"["+Error.prototype.toString.call(e)+"]"}function Kxe(e,r,t,a,n){for(var i=[],o=0,l=r.length;o-1&&(i?l=l.split(` `).map(function(u){return" "+u}).join(` `).slice(2):l=` @@ -34,32 +34,32 @@ `)+"".concat(u[0]," !== ").concat(f[0],` `)}else if(t!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(h=` `.concat(E5e(" ",c),"^"),c=0)}}}for(var g=u[u.length-1],m=f[f.length-1];g===m&&(c++<2?o=` - `.concat(g).concat(o):a=g,u.pop(),f.pop(),!(u.length===0||f.length===0));)g=u[u.length-1],m=f[f.length-1];var b=Math.max(u.length,f.length);if(b===0){var _=s.split(` + `.concat(g).concat(o):a=g,u.pop(),f.pop(),!(u.length===0||f.length===0));)g=u[u.length-1],m=f[f.length-1];var x=Math.max(u.length,f.length);if(x===0){var _=s.split(` `);if(_.length>30)for(_[26]="".concat(Pl,"...").concat(wi);_.length>27;)_.pop();return"".concat(nv.notIdentical,` `).concat(_.join(` `),` `)}c>3&&(o=` `.concat(Pl,"...").concat(wi).concat(o),l=!0),a!==""&&(o=` - `.concat(a).concat(o),a="");var w=0,x=nv[t]+` -`.concat(Vp,"+ actual").concat(wi," ").concat(Yp,"- expected").concat(wi),T=" ".concat(Pl,"...").concat(wi," Lines skipped");for(c=0;c1&&c>2&&(S>4?(n+=` + `.concat(a).concat(o),a="");var A=0,b=nv[t]+` +`.concat(Vp,"+ actual").concat(wi," ").concat(Yp,"- expected").concat(wi),T=" ".concat(Pl,"...").concat(wi," Lines skipped");for(c=0;c1&&c>2&&(S>4?(n+=` `.concat(Pl,"...").concat(wi),l=!0):S>3&&(n+=` - `.concat(f[c-2]),w++),n+=` - `.concat(f[c-1]),w++),i=c,a+=` -`.concat(Yp,"-").concat(wi," ").concat(f[c]),w++;else if(f.length1&&c>2&&(S>4?(n+=` + `.concat(f[c-2]),A++),n+=` + `.concat(f[c-1]),A++),i=c,a+=` +`.concat(Yp,"-").concat(wi," ").concat(f[c]),A++;else if(f.length1&&c>2&&(S>4?(n+=` `.concat(Pl,"...").concat(wi),l=!0):S>3&&(n+=` - `.concat(u[c-2]),w++),n+=` - `.concat(u[c-1]),w++),i=c,n+=` -`.concat(Vp,"+").concat(wi," ").concat(u[c]),w++;else{var M=f[c],k=u[c],D=k!==M&&(!rj(k,",")||k.slice(0,-1)!==M);D&&rj(M,",")&&M.slice(0,-1)===k&&(D=!1,k+=","),D?(S>1&&c>2&&(S>4?(n+=` + `.concat(u[c-2]),A++),n+=` + `.concat(u[c-1]),A++),i=c,n+=` +`.concat(Vp,"+").concat(wi," ").concat(u[c]),A++;else{var M=f[c],k=u[c],D=k!==M&&(!rj(k,",")||k.slice(0,-1)!==M);D&&rj(M,",")&&M.slice(0,-1)===k&&(D=!1,k+=","),D?(S>1&&c>2&&(S>4?(n+=` `.concat(Pl,"...").concat(wi),l=!0):S>3&&(n+=` - `.concat(u[c-2]),w++),n+=` - `.concat(u[c-1]),w++),i=c,n+=` + `.concat(u[c-2]),A++),n+=` + `.concat(u[c-1]),A++),i=c,n+=` `.concat(Vp,"+").concat(wi," ").concat(k),a+=` -`.concat(Yp,"-").concat(wi," ").concat(M),w+=2):(n+=a,a="",(S===1||c===0)&&(n+=` - `.concat(k),w++))}if(w>20&&c20&&c30)for(d[26]="".concat(Pl,"...").concat(wi);d.length>27;)d.pop();d.length===1?i=t.call(this,"".concat(h," ").concat(d[0])):i=t.call(this,"".concat(h,` @@ -83,9 +83,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `))}throw a}};function qX(e,r,t,a,n){if(!px(r))throw new Dh("regexp","RegExp",r);var i=n==="match";if(typeof e!="string"||mx(r,e)!==i){if(t instanceof Error)throw t;var o=!t;t=t||(typeof e!="string"?'The "string" argument must be of type string. Received type '+"".concat(Nl(e)," (").concat(dx(e),")"):(i?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(dx(r),`. Input: `).concat(dx(e),` -`));var l=new Af({actual:e,expected:r,message:t,operator:n,stackStartFn:a});throw l.generatedMessage=o,l}}Ka.match=function e(r,t,a){qX(r,t,a,e,"match")};Ka.doesNotMatch=function e(r,t,a){qX(r,t,a,e,"doesNotMatch")};function FX(){for(var e=arguments.length,r=new Array(e),t=0;t{"use strict";var Y_e=y1(),W_e=U8(),j_e=tY(),X_e=H8(),PX=tx();NX.exports=Z_e;function Z_e(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(PX(X_e(e),"String is not an SVG path."),e=Y_e(e)),PX(Array.isArray(e),"Argument should be a string or an array of path segments."),e=W_e(e),e=j_e(e),!e.length)return[0,0,0,0];for(var r=[1/0,1/0,-1/0,-1/0],t=0,a=e.length;tr[2]&&(r[2]=n[i+0]),n[i+1]>r[3]&&(r[3]=n[i+1]);return r}});var HX=R((CFe,GX)=>{var iv=Math.PI,OX=UX(120);GX.exports=J_e;function J_e(e){for(var r,t=[],a=0,n=0,i=0,o=0,l=null,s=null,u=0,f=0,c=0,h=e.length;c7&&(t.push(d.splice(0,7)),d.unshift("C"));break;case"S":var g=u,m=f;(r=="C"||r=="S")&&(g+=g-a,m+=m-n),d=["C",g,m,d[1],d[2],d[3],d[4]];break;case"T":r=="Q"||r=="T"?(l=u*2-l,s=f*2-s):(l=u,s=f),d=zX(u,f,l,s,d[1],d[2]);break;case"Q":l=d[1],s=d[2],d=zX(u,f,d[1],d[2],d[3],d[4]);break;case"L":d=bx(u,f,d[1],d[2]);break;case"H":d=bx(u,f,d[1],f);break;case"V":d=bx(u,f,u,d[1]);break;case"Z":d=bx(u,f,i,o);break}r=p,u=d[d.length-2],f=d[d.length-1],d.length>4?(a=d[d.length-4],n=d[d.length-3]):(a=u,n=f),t.push(d)}return t}function bx(e,r,t,a){return["C",e,r,t,a,t,a]}function zX(e,r,t,a,n,i){return["C",e/3+2/3*t,r/3+2/3*a,n/3+2/3*t,i/3+2/3*a,n,i]}function BX(e,r,t,a,n,i,o,l,s,u){if(u)w=u[0],x=u[1],b=u[2],_=u[3];else{var f=z7(e,r,-n);e=f.x,r=f.y,f=z7(l,s,-n),l=f.x,s=f.y;var c=(e-l)/2,h=(r-s)/2,d=c*c/(t*t)+h*h/(a*a);d>1&&(d=Math.sqrt(d),t=d*t,a=d*a);var p=t*t,g=a*a,m=(i==o?-1:1)*Math.sqrt(Math.abs((p*g-p*h*h-g*c*c)/(p*h*h+g*c*c)));m==1/0&&(m=1);var b=m*t*h/a+(e+l)/2,_=m*-a*c/t+(r+s)/2,w=Math.asin(((r-_)/a).toFixed(9)),x=Math.asin(((s-_)/a).toFixed(9));w=ex&&(w=w-iv*2),!o&&x>w&&(x=x-iv*2)}if(Math.abs(x-w)>OX){var T=x,S=l,M=s;x=w+OX*(o&&x>w?1:-1),l=b+t*Math.cos(x),s=_+a*Math.sin(x);var k=BX(l,s,t,a,n,0,o,S,M,[x,T,b,_])}var D=Math.tan((x-w)/4),P=4/3*t*D,N=4/3*a*D,q=[2*e-(e+P*Math.sin(w)),2*r-(r-N*Math.cos(w)),l+P*Math.sin(x),s-N*Math.cos(x),l,s];if(u)return q;k&&(q=q.concat(k));for(var O=0;O{var $_e=U8(),K_e=HX(),Q_e={M:"moveTo",C:"bezierCurveTo"};VX.exports=function(e,r){e.beginPath(),K_e($_e(r)).forEach(function(t){var a=t[0],n=t.slice(1);e[Q_e[a]].apply(e,n)}),e.closePath()}});var ZX=R((LFe,XX)=>{"use strict";var e4e=yh();XX.exports=r4e;var tm=1e20;function r4e(e,r){r||(r={});var t=r.cutoff==null?.25:r.cutoff,a=r.radius==null?8:r.radius,n=r.channel||0,i,o,l,s,u,f,c,h,d,p,g;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,o=r.height,s=e,r.stride?f=r.stride:f=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,c=h.getContext("2d"),i=h.width,o=h.height,d=c.getImageData(0,0,i,o),s=d.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,c=e,i=h.width,o=h.height,d=c.getImageData(0,0,i,o),s=d.data,f=4):window.ImageData&&e instanceof window.ImageData&&(d=e,i=e.width,o=e.height,s=d.data,f=4);if(l=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(u=s,s=Array(i*o),p=0,g=u.length;p{"use strict";var t4e=IX(),a4e=y1(),n4e=YX(),i4e=H8(),o4e=ZX(),B7=document.createElement("canvas"),Hi=B7.getContext("2d");JX.exports=l4e;function l4e(e,r){if(!i4e(e))throw Error("Argument should be valid svg path string");r||(r={});var t,a;r.shape?(t=r.shape[0],a=r.shape[1]):(t=B7.width=r.w||r.width||200,a=B7.height=r.h||r.height||200);var n=Math.min(t,a),i=r.stroke||0,o=r.viewbox||r.viewBox||t4e(e),l=[t/(o[2]-o[0]),a/(o[3]-o[1])],s=Math.min(l[0]||0,l[1]||0)/2;if(Hi.fillStyle="black",Hi.fillRect(0,0,t,a),Hi.fillStyle="white",i&&(typeof i!="number"&&(i=1),i>0?Hi.strokeStyle="white":Hi.strokeStyle="black",Hi.lineWidth=Math.abs(i)),Hi.translate(t*.5,a*.5),Hi.scale(s,s),s4e()){var u=new Path2D(e);Hi.fill(u),i&&Hi.stroke(u)}else{var f=a4e(e);n4e(Hi,f),Hi.fill(),i&&Hi.stroke()}Hi.setTransform(1,0,0,1,0,0);var c=o4e(Hi,{cutoff:r.cutoff!=null?r.cutoff:.5,radius:r.radius!=null?r.radius:n*.5});return c}var xx;function s4e(){if(xx!=null)return xx;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return xx=!1;var r=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(r);var t=e.getImageData(0,0,1,1);return xx=t&&t.data&&t.data[3]===255}});var QX=R((qFe,KX)=>{"use strict";KX.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 aZ=R((FFe,tZ)=>{"use strict";var eZ=QX();tZ.exports=u4e;var rZ={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function u4e(e){var r,t=[],a=1,n;if(typeof e=="string")if(e=e.toLowerCase(),eZ[e])t=eZ[e].slice(),n="rgb";else if(e==="transparent")a=0,n="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,l=o<=4;a=1,l?(t=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(a=parseInt(i[3]+i[3],16)/255)):(t=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(a=parseInt(i[6]+i[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),n="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=r[1],u=s==="rgb",i=s.replace(/a$/,"");n=i;var o=i==="cmyk"?4:i==="gray"?1:3;t=r[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:i==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(i[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(rZ[h]!==void 0)return rZ[h]}return parseFloat(h)}),s===i&&t.push(1),a=u||t[o]===void 0?1:t[o],t=t.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(t=e.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(t=[e[0],e[1],e[2]],n="rgb",a=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(n="rgb",t=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",t=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(a/=100)):(n="rgb",t=[e>>>16,(e&65280)>>>8,e&255]);return{space:n,values:t,alpha:a}}});var iZ=R((RFe,nZ)=>{"use strict";nZ.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var lZ=R((PFe,oZ)=>{"use strict";var f4e=iZ();oZ.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var r=e[0]/360,t=e[1]/100,a=e[2]/100,n,i,o,l,s;if(t===0)return s=a*255,[s,s,s];a<.5?i=a*(1+t):i=a+t-a*t,n=2*a-i,l=[0,0,0];for(var u=0;u<3;u++)o=r+1/3*-(u-1),o<0?o++:o>1&&o--,6*o<1?s=n+(i-n)*6*o:2*o<1?s=i:3*o<2?s=n+(i-n)*(2/3-o)*6:s=n,l[u]=s*255;return l}};f4e.hsl=function(e){var r=e[0]/255,t=e[1]/255,a=e[2]/255,n=Math.min(r,t,a),i=Math.max(r,t,a),o=i-n,l,s,u;return i===n?l=0:r===i?l=(t-a)/o:t===i?l=2+(a-r)/o:a===i&&(l=4+(r-t)/o),l=Math.min(l*60,360),l<0&&(l+=360),u=(n+i)/2,i===n?s=0:u<=.5?s=o/(i+n):s=o/(2-i-n),[l,s*100,u*100]}});var U7=R((NFe,sZ)=>{"use strict";var c4e=aZ(),v4e=lZ(),_x=yh();sZ.exports=function(r){var t,a,n,i=c4e(r);return i.space?(t=Array(3),t[0]=_x(i.values[0],0,255),t[1]=_x(i.values[1],0,255),t[2]=_x(i.values[2],0,255),i.space[0]==="h"&&(t=v4e.rgb(t)),t.push(_x(i.alpha,0,1)),t):[]}});var ov=R((IFe,uZ)=>{"use strict";var h4e=U7(),wx=yh(),d4e=Tb();uZ.exports=function(r,t){(t==="float"||!t)&&(t="array"),t==="uint"&&(t="uint8"),t==="uint_clamped"&&(t="uint8_clamped");var a=d4e(t),n=new a(4),i=t!=="uint8"&&t!=="uint8_clamped";return(!r.length||typeof r=="string")&&(r=h4e(r),r[0]/=255,r[1]/=255,r[2]/=255),p4e(r)?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3]!=null?r[3]:255,i&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(i?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3]!=null?r[3]:1):(n[0]=wx(Math.floor(r[0]*255),0,255),n[1]=wx(Math.floor(r[1]*255),0,255),n[2]=wx(Math.floor(r[2]*255),0,255),n[3]=r[3]==null?255:wx(Math.floor(r[3]*255),0,255)),n)};function p4e(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 yZ=R((OFe,mZ)=>{"use strict";var dZ=ia(),m4e=vl(),Ax=ov(),Tx=T0(),y4e=Kl().defaultLine,fZ=ro().isArrayOrTypedArray,G7=Ax(y4e),pZ=1;function cZ(e,r){var t=e;return t[3]*=r,t}function vZ(e){if(dZ(e))return G7;var r=Ax(e);return r.length?r:G7}function hZ(e){return dZ(e)?e:pZ}function g4e(e,r,t){var a=e.color;a&&a._inputArray&&(a=a._inputArray);var n=fZ(a),i=fZ(r),o=Tx.extractOpts(e),l=[],s,u,f,c,h;if(o.colorscale!==void 0?s=Tx.makeColorScaleFuncFromTrace(e):s=vZ,n?u=function(p,g){return p[g]===void 0?G7:Ax(s(p[g]))}:u=vZ,i?f=function(p,g){return p[g]===void 0?pZ:hZ(p[g])}:f=hZ,n||i)for(var d=0;d{"use strict";var Sx=ia(),x4e=$X(),Mx=ov(),_4e=Ct(),Rh=fr(),yn=Rh.isArrayOrTypedArray,qh=Ca(),gZ=an(),bZ=yZ().formatColor,Fh=ni(),w4e=q4(),V7=wb(),am=ph(),A4e=t0().DESELECTDIM,xZ={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},T4e=js().appendArrayPointValue;function M4e(e,r){var t,a={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},n=e._context.plotGlPixelRatio;if(r.visible!==!0)return a;if(Fh.hasText(r)&&(a.text=kZ(e,r),a.textSel=wZ(e,r,r.selected),a.textUnsel=wZ(e,r,r.unselected)),Fh.hasMarkers(r)&&(a.marker=W7(e,r),a.markerSel=Y7(e,r,r.selected),a.markerUnsel=Y7(e,r,r.unselected),!r.unselected&&yn(r.marker.opacity))){var i=r.marker.opacity;for(a.markerUnsel.opacity=new Array(i.length),t=0;t500?"bold":"normal":e}function W7(e,r){var t=r._length,a=r.marker,n={},i,o=yn(a.symbol),l=yn(a.angle),s=yn(a.color),u=yn(a.line.color),f=yn(a.opacity),c=yn(a.size),h=yn(a.line.width),d;if(o||(d=V7.isOpenSymbol(a.symbol)),o||s||u||f||l){n.symbols=new Array(t),n.angles=new Array(t),n.colors=new Array(t),n.borderColors=new Array(t);var p=a.symbol,g=a.angle,m=bZ(a,a.opacity,t),b=bZ(a.line,a.opacity,t);if(!yn(b[0])){var _=b;for(b=Array(t),i=0;iam.TOO_MANY_POINTS||Fh.hasMarkers(r)?"rect":"round";if(u&&r.connectgaps){var c=i[0],h=i[1];for(o=0;o1?s[o]:s[0]:s,d=yn(u)?u.length>1?u[o]:u[0]:u,p=xZ[h],g=xZ[d],m=f?f/.8+1:0,b=-g*m-g*.5;i.offset[o]=[p*m/c,b/c]}}return i}CZ.exports={style:M4e,markerStyle:W7,markerSelection:Y7,linePositions:k4e,errorBarPositions:C4e,textPosition:E4e}});var LZ=R((BFe,EZ)=>{"use strict";var kx=fr();EZ.exports=function(r,t){var a=t._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||(a=t._scene={},a.init=function(){kx.extendFlat(a,i,n)},a.init(),a.update=function(l){var s=kx.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var u=0;u{"use strict";var L4e=B8(),Ph=fr(),DZ=an(),D4e=E0().findExtremes,qZ=hA(),j7=$0(),q4e=j7.calcMarkerSize,F4e=j7.calcAxisExpansion,R4e=j7.setFirstScatter,P4e=vp(),Nh=nm(),N4e=LZ(),FZ=_n().BADNUM,I4e=ph().TOO_MANY_POINTS;PZ.exports=function(r,t){var a=r._fullLayout,n=t._xA=DZ.getFromId(r,t.xaxis,"x"),i=t._yA=DZ.getFromId(r,t.yaxis,"y"),o=a._plots[t.xaxis+t.yaxis],l=t._length,s=l>=I4e,u=l*2,f={},c,h=n.makeCalcdata(t,"x"),d=i.makeCalcdata(t,"y"),p=qZ(t,n,"x",h),g=qZ(t,i,"y",d),m=p.vals,b=g.vals;t._x=m,t._y=b,t.xperiodalignment&&(t._origX=h,t._xStarts=p.starts,t._xEnds=p.ends),t.yperiodalignment&&(t._origY=d,t._yStarts=g.starts,t._yEnds=g.ends);var _=new Array(u),w=new Array(l);for(c=0;c1&&Ph.extendFlat(o.line,Nh.linePositions(e,t,a)),o.errorX||o.errorY){var l=Nh.errorBarPositions(e,t,a,n,i);o.errorX&&Ph.extendFlat(o.errorX,l.x),o.errorY&&Ph.extendFlat(o.errorY,l.y)}return o.text&&(Ph.extendFlat(o.text,{positions:a},Nh.textPosition(e,t,o.text,o.marker)),Ph.extendFlat(o.textSel,{positions:a},Nh.textPosition(e,t,o.text,o.markerSel)),Ph.extendFlat(o.textUnsel,{positions:a},Nh.textPosition(e,t,o.text,o.markerUnsel))),o}});var X7=R((GFe,OZ)=>{"use strict";var IZ=fr(),z4e=Qt(),B4e=t0().DESELECTDIM;function U4e(e){var r=e[0],t=r.trace,a=r.t,n=a._scene,i=a.index,o=n.selectBatch[i],l=n.unselectBatch[i],s=n.textOptions[i],u=n.textSelectedOptions[i]||{},f=n.textUnselectedOptions[i]||{},c=IZ.extendFlat({},s),h,d;if(o.length||l.length){var p=u.color,g=f.color,m=s.color,b=IZ.isArrayOrTypedArray(m);for(c.color=new Array(t._length),h=0;h{"use strict";var zZ=ni(),G4e=X7().styleTextSelection;BZ.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l=a[0].trace,s=a[0].t,u=l._length,f=s.x,c=s.y,h=s._scene,d=s.index;if(!h)return o;var p=zZ.hasText(l),g=zZ.hasMarkers(l),m=!g&&!p;if(l.visible!==!0||m)return o;var b=[],_=[];if(t!==!1&&!t.degenerate)for(var w=0;w{"use strict";var H4e=P8();GZ.exports={moduleType:"trace",name:"scattergl",basePlotModule:bp(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:_b(),supplyDefaults:AV(),crossTraceDefaults:vA(),colorbar:O3(),formatLabels:MV(),calc:NZ(),hoverPoints:H4e.hoverPoints,selectPoints:UZ(),meta:{}}});var YZ=R((YFe,Ex)=>{"use strict";var Cx=yh();Ex.exports=VZ;Ex.exports.to=VZ;Ex.exports.from=V4e;function VZ(e,r){r==null&&(r=!0);var t=e[0],a=e[1],n=e[2],i=e[3];i==null&&(i=r?1:255),r&&(t*=255,a*=255,n*=255,i*=255),t=Cx(t,0,255)&255,a=Cx(a,0,255)&255,n=Cx(n,0,255)&255,i=Cx(i,0,255)&255;var o=t*16777216+(a<<16)+(n<<8)+i;return o}function V4e(e,r){e=+e;var t=e>>>24,a=(e&16711680)>>>16,n=(e&65280)>>>8,i=e&255;return r===!1?[t,a,n,i]:[t/255,a/255,n/255,i/255]}});var kn=R((WFe,jZ)=>{"use strict";var WZ=Object.getOwnPropertySymbols,Y4e=Object.prototype.hasOwnProperty,W4e=Object.prototype.propertyIsEnumerable;function j4e(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function X4e(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}jZ.exports=X4e()?Object.assign:function(e,r){for(var t,a=j4e(e),n,i=1;i{XZ.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),t=[],a=0;a{"use strict";JZ.exports=function(r,t,a){Array.isArray(a)||(a=[].slice.call(arguments,2));for(var n=0,i=a.length;n{"use strict";$Z.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var Lx=R((JFe,Ih)=>{"use strict";Ih.exports=im;Ih.exports.float32=Ih.exports.float=im;Ih.exports.fract32=Ih.exports.fract=Z4e;var QZ=new Float32Array(1);function Z4e(e,r){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);r instanceof Float32Array||(r=im(e));for(var t=0,a=r.length;t{"use strict";function J4e(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a,n,i,o,l=[],s=!0,u=!1;try{if(i=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;s=!1}else for(;!(s=(a=i.call(t)).done)&&(l.push(a.value),l.length!==r);s=!0);}catch(f){u=!0,n=f}finally{try{if(!s&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(u)throw n}}return l}}function $4e(e,r){return ewe(e)||J4e(e,r)||rJ(e,r)||awe()}function K4e(e){return Q4e(e)||rwe(e)||rJ(e)||twe()}function Q4e(e){if(Array.isArray(e))return J7(e)}function ewe(e){if(Array.isArray(e))return e}function rwe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rJ(e,r){if(e){if(typeof e=="string")return J7(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return J7(e,r)}}function J7(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t{"use strict";var Y_e=y1(),W_e=U8(),j_e=tY(),X_e=H8(),PX=tx();NX.exports=Z_e;function Z_e(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(PX(X_e(e),"String is not an SVG path."),e=Y_e(e)),PX(Array.isArray(e),"Argument should be a string or an array of path segments."),e=W_e(e),e=j_e(e),!e.length)return[0,0,0,0];for(var r=[1/0,1/0,-1/0,-1/0],t=0,a=e.length;tr[2]&&(r[2]=n[i+0]),n[i+1]>r[3]&&(r[3]=n[i+1]);return r}});var HX=R((CFe,GX)=>{var iv=Math.PI,OX=UX(120);GX.exports=J_e;function J_e(e){for(var r,t=[],a=0,n=0,i=0,o=0,l=null,s=null,u=0,f=0,c=0,h=e.length;c7&&(t.push(d.splice(0,7)),d.unshift("C"));break;case"S":var g=u,m=f;(r=="C"||r=="S")&&(g+=g-a,m+=m-n),d=["C",g,m,d[1],d[2],d[3],d[4]];break;case"T":r=="Q"||r=="T"?(l=u*2-l,s=f*2-s):(l=u,s=f),d=zX(u,f,l,s,d[1],d[2]);break;case"Q":l=d[1],s=d[2],d=zX(u,f,d[1],d[2],d[3],d[4]);break;case"L":d=bx(u,f,d[1],d[2]);break;case"H":d=bx(u,f,d[1],f);break;case"V":d=bx(u,f,u,d[1]);break;case"Z":d=bx(u,f,i,o);break}r=p,u=d[d.length-2],f=d[d.length-1],d.length>4?(a=d[d.length-4],n=d[d.length-3]):(a=u,n=f),t.push(d)}return t}function bx(e,r,t,a){return["C",e,r,t,a,t,a]}function zX(e,r,t,a,n,i){return["C",e/3+2/3*t,r/3+2/3*a,n/3+2/3*t,i/3+2/3*a,n,i]}function BX(e,r,t,a,n,i,o,l,s,u){if(u)A=u[0],b=u[1],x=u[2],_=u[3];else{var f=z7(e,r,-n);e=f.x,r=f.y,f=z7(l,s,-n),l=f.x,s=f.y;var c=(e-l)/2,h=(r-s)/2,d=c*c/(t*t)+h*h/(a*a);d>1&&(d=Math.sqrt(d),t=d*t,a=d*a);var p=t*t,g=a*a,m=(i==o?-1:1)*Math.sqrt(Math.abs((p*g-p*h*h-g*c*c)/(p*h*h+g*c*c)));m==1/0&&(m=1);var x=m*t*h/a+(e+l)/2,_=m*-a*c/t+(r+s)/2,A=Math.asin(((r-_)/a).toFixed(9)),b=Math.asin(((s-_)/a).toFixed(9));A=eb&&(A=A-iv*2),!o&&b>A&&(b=b-iv*2)}if(Math.abs(b-A)>OX){var T=b,S=l,M=s;b=A+OX*(o&&b>A?1:-1),l=x+t*Math.cos(b),s=_+a*Math.sin(b);var k=BX(l,s,t,a,n,0,o,S,M,[b,T,x,_])}var D=Math.tan((b-A)/4),P=4/3*t*D,N=4/3*a*D,q=[2*e-(e+P*Math.sin(A)),2*r-(r-N*Math.cos(A)),l+P*Math.sin(b),s-N*Math.cos(b),l,s];if(u)return q;k&&(q=q.concat(k));for(var O=0;O{var $_e=U8(),K_e=HX(),Q_e={M:"moveTo",C:"bezierCurveTo"};VX.exports=function(e,r){e.beginPath(),K_e($_e(r)).forEach(function(t){var a=t[0],n=t.slice(1);e[Q_e[a]].apply(e,n)}),e.closePath()}});var ZX=R((LFe,XX)=>{"use strict";var e4e=yh();XX.exports=r4e;var tm=1e20;function r4e(e,r){r||(r={});var t=r.cutoff==null?.25:r.cutoff,a=r.radius==null?8:r.radius,n=r.channel||0,i,o,l,s,u,f,c,h,d,p,g;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!r.width||!r.height)throw Error("For raw data width and height should be provided by options");i=r.width,o=r.height,s=e,r.stride?f=r.stride:f=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,c=h.getContext("2d"),i=h.width,o=h.height,d=c.getImageData(0,0,i,o),s=d.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,c=e,i=h.width,o=h.height,d=c.getImageData(0,0,i,o),s=d.data,f=4):window.ImageData&&e instanceof window.ImageData&&(d=e,i=e.width,o=e.height,s=d.data,f=4);if(l=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(u=s,s=Array(i*o),p=0,g=u.length;p{"use strict";var t4e=IX(),a4e=y1(),n4e=YX(),i4e=H8(),o4e=ZX(),B7=document.createElement("canvas"),Hi=B7.getContext("2d");JX.exports=l4e;function l4e(e,r){if(!i4e(e))throw Error("Argument should be valid svg path string");r||(r={});var t,a;r.shape?(t=r.shape[0],a=r.shape[1]):(t=B7.width=r.w||r.width||200,a=B7.height=r.h||r.height||200);var n=Math.min(t,a),i=r.stroke||0,o=r.viewbox||r.viewBox||t4e(e),l=[t/(o[2]-o[0]),a/(o[3]-o[1])],s=Math.min(l[0]||0,l[1]||0)/2;if(Hi.fillStyle="black",Hi.fillRect(0,0,t,a),Hi.fillStyle="white",i&&(typeof i!="number"&&(i=1),i>0?Hi.strokeStyle="white":Hi.strokeStyle="black",Hi.lineWidth=Math.abs(i)),Hi.translate(t*.5,a*.5),Hi.scale(s,s),s4e()){var u=new Path2D(e);Hi.fill(u),i&&Hi.stroke(u)}else{var f=a4e(e);n4e(Hi,f),Hi.fill(),i&&Hi.stroke()}Hi.setTransform(1,0,0,1,0,0);var c=o4e(Hi,{cutoff:r.cutoff!=null?r.cutoff:.5,radius:r.radius!=null?r.radius:n*.5});return c}var xx;function s4e(){if(xx!=null)return xx;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return xx=!1;var r=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(r);var t=e.getImageData(0,0,1,1);return xx=t&&t.data&&t.data[3]===255}});var QX=R((qFe,KX)=>{"use strict";KX.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 aZ=R((FFe,tZ)=>{"use strict";var eZ=QX();tZ.exports=u4e;var rZ={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function u4e(e){var r,t=[],a=1,n;if(typeof e=="string")if(e=e.toLowerCase(),eZ[e])t=eZ[e].slice(),n="rgb";else if(e==="transparent")a=0,n="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,l=o<=4;a=1,l?(t=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(a=parseInt(i[3]+i[3],16)/255)):(t=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(a=parseInt(i[6]+i[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),n="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=r[1],u=s==="rgb",i=s.replace(/a$/,"");n=i;var o=i==="cmyk"?4:i==="gray"?1:3;t=r[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:i==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(i[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(rZ[h]!==void 0)return rZ[h]}return parseFloat(h)}),s===i&&t.push(1),a=u||t[o]===void 0?1:t[o],t=t.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(t=e.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(t=[e[0],e[1],e[2]],n="rgb",a=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(n="rgb",t=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",t=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(a/=100)):(n="rgb",t=[e>>>16,(e&65280)>>>8,e&255]);return{space:n,values:t,alpha:a}}});var iZ=R((RFe,nZ)=>{"use strict";nZ.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var lZ=R((PFe,oZ)=>{"use strict";var f4e=iZ();oZ.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var r=e[0]/360,t=e[1]/100,a=e[2]/100,n,i,o,l,s;if(t===0)return s=a*255,[s,s,s];a<.5?i=a*(1+t):i=a+t-a*t,n=2*a-i,l=[0,0,0];for(var u=0;u<3;u++)o=r+1/3*-(u-1),o<0?o++:o>1&&o--,6*o<1?s=n+(i-n)*6*o:2*o<1?s=i:3*o<2?s=n+(i-n)*(2/3-o)*6:s=n,l[u]=s*255;return l}};f4e.hsl=function(e){var r=e[0]/255,t=e[1]/255,a=e[2]/255,n=Math.min(r,t,a),i=Math.max(r,t,a),o=i-n,l,s,u;return i===n?l=0:r===i?l=(t-a)/o:t===i?l=2+(a-r)/o:a===i&&(l=4+(r-t)/o),l=Math.min(l*60,360),l<0&&(l+=360),u=(n+i)/2,i===n?s=0:u<=.5?s=o/(i+n):s=o/(2-i-n),[l,s*100,u*100]}});var U7=R((NFe,sZ)=>{"use strict";var c4e=aZ(),v4e=lZ(),_x=yh();sZ.exports=function(r){var t,a,n,i=c4e(r);return i.space?(t=Array(3),t[0]=_x(i.values[0],0,255),t[1]=_x(i.values[1],0,255),t[2]=_x(i.values[2],0,255),i.space[0]==="h"&&(t=v4e.rgb(t)),t.push(_x(i.alpha,0,1)),t):[]}});var ov=R((IFe,uZ)=>{"use strict";var h4e=U7(),wx=yh(),d4e=Tb();uZ.exports=function(r,t){(t==="float"||!t)&&(t="array"),t==="uint"&&(t="uint8"),t==="uint_clamped"&&(t="uint8_clamped");var a=d4e(t),n=new a(4),i=t!=="uint8"&&t!=="uint8_clamped";return(!r.length||typeof r=="string")&&(r=h4e(r),r[0]/=255,r[1]/=255,r[2]/=255),p4e(r)?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3]!=null?r[3]:255,i&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(i?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3]!=null?r[3]:1):(n[0]=wx(Math.floor(r[0]*255),0,255),n[1]=wx(Math.floor(r[1]*255),0,255),n[2]=wx(Math.floor(r[2]*255),0,255),n[3]=r[3]==null?255:wx(Math.floor(r[3]*255),0,255)),n)};function p4e(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 yZ=R((OFe,mZ)=>{"use strict";var dZ=ia(),m4e=vl(),Ax=ov(),Tx=T0(),y4e=Kl().defaultLine,fZ=ro().isArrayOrTypedArray,G7=Ax(y4e),pZ=1;function cZ(e,r){var t=e;return t[3]*=r,t}function vZ(e){if(dZ(e))return G7;var r=Ax(e);return r.length?r:G7}function hZ(e){return dZ(e)?e:pZ}function g4e(e,r,t){var a=e.color;a&&a._inputArray&&(a=a._inputArray);var n=fZ(a),i=fZ(r),o=Tx.extractOpts(e),l=[],s,u,f,c,h;if(o.colorscale!==void 0?s=Tx.makeColorScaleFuncFromTrace(e):s=vZ,n?u=function(p,g){return p[g]===void 0?G7:Ax(s(p[g]))}:u=vZ,i?f=function(p,g){return p[g]===void 0?pZ:hZ(p[g])}:f=hZ,n||i)for(var d=0;d{"use strict";var Sx=ia(),x4e=$X(),Mx=ov(),_4e=Ct(),Rh=fr(),yn=Rh.isArrayOrTypedArray,qh=Ca(),gZ=an(),bZ=yZ().formatColor,Fh=ni(),w4e=q4(),V7=wb(),am=ph(),A4e=t0().DESELECTDIM,xZ={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},T4e=js().appendArrayPointValue;function M4e(e,r){var t,a={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},n=e._context.plotGlPixelRatio;if(r.visible!==!0)return a;if(Fh.hasText(r)&&(a.text=kZ(e,r),a.textSel=wZ(e,r,r.selected),a.textUnsel=wZ(e,r,r.unselected)),Fh.hasMarkers(r)&&(a.marker=W7(e,r),a.markerSel=Y7(e,r,r.selected),a.markerUnsel=Y7(e,r,r.unselected),!r.unselected&&yn(r.marker.opacity))){var i=r.marker.opacity;for(a.markerUnsel.opacity=new Array(i.length),t=0;t500?"bold":"normal":e}function W7(e,r){var t=r._length,a=r.marker,n={},i,o=yn(a.symbol),l=yn(a.angle),s=yn(a.color),u=yn(a.line.color),f=yn(a.opacity),c=yn(a.size),h=yn(a.line.width),d;if(o||(d=V7.isOpenSymbol(a.symbol)),o||s||u||f||l){n.symbols=new Array(t),n.angles=new Array(t),n.colors=new Array(t),n.borderColors=new Array(t);var p=a.symbol,g=a.angle,m=bZ(a,a.opacity,t),x=bZ(a.line,a.opacity,t);if(!yn(x[0])){var _=x;for(x=Array(t),i=0;iam.TOO_MANY_POINTS||Fh.hasMarkers(r)?"rect":"round";if(u&&r.connectgaps){var c=i[0],h=i[1];for(o=0;o1?s[o]:s[0]:s,d=yn(u)?u.length>1?u[o]:u[0]:u,p=xZ[h],g=xZ[d],m=f?f/.8+1:0,x=-g*m-g*.5;i.offset[o]=[p*m/c,x/c]}}return i}CZ.exports={style:M4e,markerStyle:W7,markerSelection:Y7,linePositions:k4e,errorBarPositions:C4e,textPosition:E4e}});var LZ=R((BFe,EZ)=>{"use strict";var kx=fr();EZ.exports=function(r,t){var a=t._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||(a=t._scene={},a.init=function(){kx.extendFlat(a,i,n)},a.init(),a.update=function(l){var s=kx.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var u=0;u{"use strict";var L4e=B8(),Ph=fr(),DZ=an(),D4e=E0().findExtremes,qZ=hA(),j7=$0(),q4e=j7.calcMarkerSize,F4e=j7.calcAxisExpansion,R4e=j7.setFirstScatter,P4e=vp(),Nh=nm(),N4e=LZ(),FZ=_n().BADNUM,I4e=ph().TOO_MANY_POINTS;PZ.exports=function(r,t){var a=r._fullLayout,n=t._xA=DZ.getFromId(r,t.xaxis,"x"),i=t._yA=DZ.getFromId(r,t.yaxis,"y"),o=a._plots[t.xaxis+t.yaxis],l=t._length,s=l>=I4e,u=l*2,f={},c,h=n.makeCalcdata(t,"x"),d=i.makeCalcdata(t,"y"),p=qZ(t,n,"x",h),g=qZ(t,i,"y",d),m=p.vals,x=g.vals;t._x=m,t._y=x,t.xperiodalignment&&(t._origX=h,t._xStarts=p.starts,t._xEnds=p.ends),t.yperiodalignment&&(t._origY=d,t._yStarts=g.starts,t._yEnds=g.ends);var _=new Array(u),A=new Array(l);for(c=0;c1&&Ph.extendFlat(o.line,Nh.linePositions(e,t,a)),o.errorX||o.errorY){var l=Nh.errorBarPositions(e,t,a,n,i);o.errorX&&Ph.extendFlat(o.errorX,l.x),o.errorY&&Ph.extendFlat(o.errorY,l.y)}return o.text&&(Ph.extendFlat(o.text,{positions:a},Nh.textPosition(e,t,o.text,o.marker)),Ph.extendFlat(o.textSel,{positions:a},Nh.textPosition(e,t,o.text,o.markerSel)),Ph.extendFlat(o.textUnsel,{positions:a},Nh.textPosition(e,t,o.text,o.markerUnsel))),o}});var X7=R((GFe,OZ)=>{"use strict";var IZ=fr(),z4e=Qt(),B4e=t0().DESELECTDIM;function U4e(e){var r=e[0],t=r.trace,a=r.t,n=a._scene,i=a.index,o=n.selectBatch[i],l=n.unselectBatch[i],s=n.textOptions[i],u=n.textSelectedOptions[i]||{},f=n.textUnselectedOptions[i]||{},c=IZ.extendFlat({},s),h,d;if(o.length||l.length){var p=u.color,g=f.color,m=s.color,x=IZ.isArrayOrTypedArray(m);for(c.color=new Array(t._length),h=0;h{"use strict";var zZ=ni(),G4e=X7().styleTextSelection;BZ.exports=function(r,t){var a=r.cd,n=r.xaxis,i=r.yaxis,o=[],l=a[0].trace,s=a[0].t,u=l._length,f=s.x,c=s.y,h=s._scene,d=s.index;if(!h)return o;var p=zZ.hasText(l),g=zZ.hasMarkers(l),m=!g&&!p;if(l.visible!==!0||m)return o;var x=[],_=[];if(t!==!1&&!t.degenerate)for(var A=0;A{"use strict";var H4e=P8();GZ.exports={moduleType:"trace",name:"scattergl",basePlotModule:bp(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:_b(),supplyDefaults:AV(),crossTraceDefaults:vA(),colorbar:O3(),formatLabels:MV(),calc:NZ(),hoverPoints:H4e.hoverPoints,selectPoints:UZ(),meta:{}}});var YZ=R((YFe,Ex)=>{"use strict";var Cx=yh();Ex.exports=VZ;Ex.exports.to=VZ;Ex.exports.from=V4e;function VZ(e,r){r==null&&(r=!0);var t=e[0],a=e[1],n=e[2],i=e[3];i==null&&(i=r?1:255),r&&(t*=255,a*=255,n*=255,i*=255),t=Cx(t,0,255)&255,a=Cx(a,0,255)&255,n=Cx(n,0,255)&255,i=Cx(i,0,255)&255;var o=t*16777216+(a<<16)+(n<<8)+i;return o}function V4e(e,r){e=+e;var t=e>>>24,a=(e&16711680)>>>16,n=(e&65280)>>>8,i=e&255;return r===!1?[t,a,n,i]:[t/255,a/255,n/255,i/255]}});var kn=R((WFe,jZ)=>{"use strict";var WZ=Object.getOwnPropertySymbols,Y4e=Object.prototype.hasOwnProperty,W4e=Object.prototype.propertyIsEnumerable;function j4e(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function X4e(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var a=Object.getOwnPropertyNames(r).map(function(i){return r[i]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}jZ.exports=X4e()?Object.assign:function(e,r){for(var t,a=j4e(e),n,i=1;i{XZ.exports=function(e){typeof e=="string"&&(e=[e]);for(var r=[].slice.call(arguments,1),t=[],a=0;a{"use strict";JZ.exports=function(r,t,a){Array.isArray(a)||(a=[].slice.call(arguments,2));for(var n=0,i=a.length;n{"use strict";$Z.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var Lx=R((JFe,Ih)=>{"use strict";Ih.exports=im;Ih.exports.float32=Ih.exports.float=im;Ih.exports.fract32=Ih.exports.fract=Z4e;var QZ=new Float32Array(1);function Z4e(e,r){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);r instanceof Float32Array||(r=im(e));for(var t=0,a=r.length;t{"use strict";function J4e(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a,n,i,o,l=[],s=!0,u=!1;try{if(i=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;s=!1}else for(;!(s=(a=i.call(t)).done)&&(l.push(a.value),l.length!==r);s=!0);}catch(f){u=!0,n=f}finally{try{if(!s&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(u)throw n}}return l}}function $4e(e,r){return ewe(e)||J4e(e,r)||rJ(e,r)||awe()}function K4e(e){return Q4e(e)||rwe(e)||rJ(e)||twe()}function Q4e(e){if(Array.isArray(e))return J7(e)}function ewe(e){if(Array.isArray(e))return e}function rwe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rJ(e,r){if(e){if(typeof e=="string")return J7(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return J7(e,r)}}function J7(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);tX)?z.tree=lwe(H,{bounds:be}):X&&X.length&&(z.tree=X),z.tree){var re={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(re):z.elements=o.elements(re)}var ke=qx.float32(H);K({data:ke,usage:"dynamic"});var ge=qx.fract32(H,ke);return ve({data:ge,usage:"dynamic"}),xe({data:new Uint8Array(se),type:"uint8",usage:"stream"}),H}},{marker:function(H,z,V){var X=z.activation;if(X.forEach(function(ge){return ge&&ge.destroy&&ge.destroy()}),X.length=0,!H||typeof H[0]=="number"){var K=e.addMarker(H);X[K]=!0}else{for(var ve=[],xe=0,se=Math.min(H.length,z.count);xe=0)return n;var i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(var o=0,l=e.length;oa*4&&(this.tooManyColors=!0),this.updatePalette(t),n.length===1?n[0]:n};pi.prototype.updatePalette=function(e){if(!this.tooManyColors){var r=this.maxColors,t=this.paletteTexture,a=Math.ceil(e.length*.25/r);if(a>1){e=e.slice();for(var n=e.length*.25%r;n{"use strict";rT.exports=Px;rT.exports.default=Px;function Px(e,r,t){t=t||2;var a=r&&r.length,n=a?r[0]*t:e.length,i=nJ(e,0,n,t,!0),o=[];if(!i||i.next===i.prev)return o;var l,s,u,f,c,h,d;if(a&&(i=bwe(e,r,i,t)),e.length>80*t){l=u=e[0],s=f=e[1];for(var p=t;pu&&(u=c),h>f&&(f=h);d=Math.max(u-l,f-s),d=d!==0?32767/d:0}return om(i,o,t,l,s,d,0),o}function nJ(e,r,t,a,n){var i,o;if(n===eT(e,r,t,a)>0)for(i=r;i=r;i-=a)o=aJ(i,e[i],e[i+1],o);return o&&Nx(o,o.next)&&(sm(o),o=o.next),o}function uv(e,r){if(!e)return e;r||(r=e);var t=e,a;do if(a=!1,!t.steiner&&(Nx(t,t.next)||gn(t.prev,t,t.next)===0)){if(sm(t),t=r=t.prev,t===t.next)break;a=!0}else t=t.next;while(a||t!==r);return r}function om(e,r,t,a,n,i,o){if(e){!o&&i&&Twe(e,a,n,i);for(var l=e,s,u;e.prev!==e.next;){if(s=e.prev,u=e.next,i?mwe(e,a,n,i):pwe(e)){r.push(s.i/t|0),r.push(e.i/t|0),r.push(u.i/t|0),sm(e),e=u.next,l=u.next;continue}if(e=u,e===l){o?o===1?(e=ywe(uv(e),r,t),om(e,r,t,a,n,i,2)):o===2&&gwe(e,r,t,a,n,i):om(uv(e),r,t,a,n,i,1);break}}}}function pwe(e){var r=e.prev,t=e,a=e.next;if(gn(r,t,a)>=0)return!1;for(var n=r.x,i=t.x,o=a.x,l=r.y,s=t.y,u=a.y,f=ni?n>o?n:o:i>o?i:o,d=l>s?l>u?l:u:s>u?s:u,p=a.next;p!==r;){if(p.x>=f&&p.x<=h&&p.y>=c&&p.y<=d&&Oh(n,l,i,s,o,u,p.x,p.y)&&gn(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function mwe(e,r,t,a){var n=e.prev,i=e,o=e.next;if(gn(n,i,o)>=0)return!1;for(var l=n.x,s=i.x,u=o.x,f=n.y,c=i.y,h=o.y,d=ls?l>u?l:u:s>u?s:u,m=f>c?f>h?f:h:c>h?c:h,b=K7(d,p,r,t,a),_=K7(g,m,r,t,a),w=e.prevZ,x=e.nextZ;w&&w.z>=b&&x&&x.z<=_;){if(w.x>=d&&w.x<=g&&w.y>=p&&w.y<=m&&w!==n&&w!==o&&Oh(l,f,s,c,u,h,w.x,w.y)&&gn(w.prev,w,w.next)>=0||(w=w.prevZ,x.x>=d&&x.x<=g&&x.y>=p&&x.y<=m&&x!==n&&x!==o&&Oh(l,f,s,c,u,h,x.x,x.y)&&gn(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;w&&w.z>=b;){if(w.x>=d&&w.x<=g&&w.y>=p&&w.y<=m&&w!==n&&w!==o&&Oh(l,f,s,c,u,h,w.x,w.y)&&gn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;x&&x.z<=_;){if(x.x>=d&&x.x<=g&&x.y>=p&&x.y<=m&&x!==n&&x!==o&&Oh(l,f,s,c,u,h,x.x,x.y)&&gn(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function ywe(e,r,t){var a=e;do{var n=a.prev,i=a.next.next;!Nx(n,i)&&iJ(n,a,a.next,i)&&lm(n,i)&&lm(i,n)&&(r.push(n.i/t|0),r.push(a.i/t|0),r.push(i.i/t|0),sm(a),sm(a.next),a=e=i),a=a.next}while(a!==e);return uv(a)}function gwe(e,r,t,a,n,i){var o=e;do{for(var l=o.next.next;l!==o.prev;){if(o.i!==l.i&&kwe(o,l)){var s=oJ(o,l);o=uv(o,o.next),s=uv(s,s.next),om(o,r,t,a,n,i,0),om(s,r,t,a,n,i,0);return}l=l.next}o=o.next}while(o!==e)}function bwe(e,r,t,a){var n=[],i,o,l,s,u;for(i=0,o=r.length;i=t.next.y&&t.next.y!==t.y){var l=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(l<=a&&l>i&&(i=l,o=t.x=t.x&&t.x>=u&&a!==t.x&&Oh(no.x||t.x===o.x&&Awe(o,t)))&&(o=t,c=h)),t=t.next;while(t!==s);return o}function Awe(e,r){return gn(e.prev,e,r.prev)<0&&gn(r.next,e,e.next)<0}function Twe(e,r,t,a){var n=e;do n.z===0&&(n.z=K7(n.x,n.y,r,t,a)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,Mwe(n)}function Mwe(e){var r,t,a,n,i,o,l,s,u=1;do{for(t=e,e=null,i=null,o=0;t;){for(o++,a=t,l=0,r=0;r0||s>0&&a;)l!==0&&(s===0||!a||t.z<=a.z)?(n=t,t=t.nextZ,l--):(n=a,a=a.nextZ,s--),i?i.nextZ=n:e=n,n.prevZ=i,i=n;t=a}i.nextZ=null,u*=2}while(o>1);return e}function K7(e,r,t,a,n){return e=(e-t)*n|0,r=(r-a)*n|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e|r<<1}function Swe(e){var r=e,t=e;do(r.x=(e-o)*(i-l)&&(e-o)*(a-l)>=(t-o)*(r-l)&&(t-o)*(i-l)>=(n-o)*(a-l)}function kwe(e,r){return e.next.i!==r.i&&e.prev.i!==r.i&&!Cwe(e,r)&&(lm(e,r)&&lm(r,e)&&Ewe(e,r)&&(gn(e.prev,e,r.prev)||gn(e,r.prev,r))||Nx(e,r)&&gn(e.prev,e,e.next)>0&&gn(r.prev,r,r.next)>0)}function gn(e,r,t){return(r.y-e.y)*(t.x-r.x)-(r.x-e.x)*(t.y-r.y)}function Nx(e,r){return e.x===r.x&&e.y===r.y}function iJ(e,r,t,a){var n=Rx(gn(e,r,t)),i=Rx(gn(e,r,a)),o=Rx(gn(t,a,e)),l=Rx(gn(t,a,r));return!!(n!==i&&o!==l||n===0&&Fx(e,t,r)||i===0&&Fx(e,a,r)||o===0&&Fx(t,e,a)||l===0&&Fx(t,r,a))}function Fx(e,r,t){return r.x<=Math.max(e.x,t.x)&&r.x>=Math.min(e.x,t.x)&&r.y<=Math.max(e.y,t.y)&&r.y>=Math.min(e.y,t.y)}function Rx(e){return e>0?1:e<0?-1:0}function Cwe(e,r){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==r.i&&t.next.i!==r.i&&iJ(t,t.next,e,r))return!0;t=t.next}while(t!==e);return!1}function lm(e,r){return gn(e.prev,e,e.next)<0?gn(e,r,e.next)>=0&&gn(e,e.prev,r)>=0:gn(e,r,e.prev)<0||gn(e,e.next,r)<0}function Ewe(e,r){var t=e,a=!1,n=(e.x+r.x)/2,i=(e.y+r.y)/2;do t.y>i!=t.next.y>i&&t.next.y!==t.y&&n<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(a=!a),t=t.next;while(t!==e);return a}function oJ(e,r){var t=new Q7(e.i,e.x,e.y),a=new Q7(r.i,r.x,r.y),n=e.next,i=r.prev;return e.next=r,r.prev=e,t.next=n,n.prev=t,a.next=t,t.prev=a,i.next=a,a.prev=i,a}function aJ(e,r,t,a){var n=new Q7(e,r,t);return a?(n.next=a.next,n.prev=a,a.next.prev=n,a.next=n):(n.prev=n,n.next=n),n}function sm(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 Q7(e,r,t){this.i=e,this.x=r,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Px.deviation=function(e,r,t,a){var n=r&&r.length,i=n?r[0]*t:e.length,o=Math.abs(eT(e,0,i,t));if(n)for(var l=0,s=r.length;l0&&(a+=e[n-1].length,t.holes.push(a))}return t}});var uJ=R((QFe,sJ)=>{"use strict";var Lwe=Kc();sJ.exports=Dwe;function Dwe(e,r,t){if(!e||e.length==null)throw Error("Argument should be an array");r==null&&(r=1),t==null&&(t=Lwe(e,r));for(var a=0;a{"use strict";fJ.exports=function(){var e,r;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[r={},"one"],[{},"two"],[{},"three"]])}catch(t){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(r)!=="one")}});var hJ=R((rRe,vJ)=>{"use strict";vJ.exports=function(){}});var Tf=R((tRe,dJ)=>{"use strict";var qwe=hJ()();dJ.exports=function(e){return e!==qwe&&e!==null}});var tT=R((aRe,mJ)=>{"use strict";var Fwe=Object.create,Rwe=Object.getPrototypeOf,pJ={};mJ.exports=function(){var e=Object.setPrototypeOf,r=arguments[0]||Fwe;return typeof e!="function"?!1:Rwe(e(r(null),pJ))===pJ}});var aT=R((nRe,yJ)=>{"use strict";var Pwe=Tf(),Nwe={function:!0,object:!0};yJ.exports=function(e){return Pwe(e)&&Nwe[typeof e]||!1}});var iu=R((iRe,gJ)=>{"use strict";var Iwe=Tf();gJ.exports=function(e){if(!Iwe(e))throw new TypeError("Cannot use null or undefined");return e}});var xJ=R((oRe,bJ)=>{"use strict";var nT=Object.create,Ix;tT()()||(Ix=iT());bJ.exports=function(){var e,r,t;return!Ix||Ix.level!==1?nT:(e={},r={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(a){if(a==="__proto__"){r[a]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}r[a]=t}),Object.defineProperties(e,r),Object.defineProperty(Ix,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(a,n){return nT(a===null?e:a,n)})}()});var iT=R((lRe,_J)=>{"use strict";var Owe=aT(),zwe=iu(),Bwe=Object.prototype.isPrototypeOf,Uwe=Object.defineProperty,Gwe={configurable:!0,enumerable:!1,writable:!0,value:void 0},Ox;Ox=function(e,r){if(zwe(e),r===null||Owe(r))return e;throw new TypeError("Prototype must be null or an object")};_J.exports=function(e){var r,t;return e?(e.level===2?e.set?(t=e.set,r=function(a,n){return t.call(Ox(a,n),n),a}):r=function(a,n){return Ox(a,n).__proto__=n,a}:r=function a(n,i){var o;return Ox(n,i),o=Bwe.call(a.nullPolyfill,n),o&&delete a.nullPolyfill.__proto__,i===null&&(i=a.nullPolyfill),n.__proto__=i,o&&Uwe(a.nullPolyfill,"__proto__",Gwe),n},Object.defineProperty(r,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),r={},t,a=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(a){try{t=a.set,t.call(e,r)}catch(n){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:(e={},e.__proto__=r,Object.getPrototypeOf(e)===r?{level:1}:!1)}());xJ()});var zx=R((sRe,wJ)=>{"use strict";wJ.exports=tT()()?Object.setPrototypeOf:iT()});var TJ=R((uRe,AJ)=>{"use strict";var Hwe=aT();AJ.exports=function(e){if(!Hwe(e))throw new TypeError(e+" is not an Object");return e}});var SJ=R((fRe,MJ)=>{"use strict";var Vwe=Object.create(null),Ywe=Math.random;MJ.exports=function(){var e;do e=Ywe().toString(36).slice(2);while(Vwe[e]);return e}});var fv=R((cRe,kJ)=>{"use strict";var Wwe=void 0;kJ.exports=function(e){return e!==Wwe&&e!==null}});var Bx=R((vRe,CJ)=>{"use strict";var jwe=fv(),Xwe={object:!0,function:!0,undefined:!0};CJ.exports=function(e){return jwe(e)?hasOwnProperty.call(Xwe,typeof e):!1}});var LJ=R((hRe,EJ)=>{"use strict";var Zwe=Bx();EJ.exports=function(e){if(!Zwe(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(r){return!1}}});var qJ=R((dRe,DJ)=>{"use strict";var Jwe=LJ();DJ.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(r){return!1}return!Jwe(e)}});var oT=R((pRe,FJ)=>{"use strict";var $we=qJ(),Kwe=/^\s*class[\s{/}]/,Qwe=Function.prototype.toString;FJ.exports=function(e){return!(!$we(e)||Kwe.test(Qwe.call(e)))}});var PJ=R((mRe,RJ)=>{"use strict";RJ.exports=function(){var e=Object.assign,r;return typeof e!="function"?!1:(r={foo:"raz"},e(r,{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}});var IJ=R((yRe,NJ)=>{"use strict";NJ.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var zJ=R((gRe,OJ)=>{"use strict";var e6e=Tf(),r6e=Object.keys;OJ.exports=function(e){return r6e(e6e(e)?Object(e):e)}});var UJ=R((bRe,BJ)=>{"use strict";BJ.exports=IJ()()?Object.keys:zJ()});var HJ=R((xRe,GJ)=>{"use strict";var t6e=UJ(),a6e=iu(),n6e=Math.max;GJ.exports=function(e,r){var t,a,n=n6e(arguments.length,2),i;for(e=Object(a6e(e)),i=function(o){try{e[o]=r[o]}catch(l){t||(t=l)}},a=1;a{"use strict";VJ.exports=PJ()()?Object.assign:HJ()});var lT=R((wRe,YJ)=>{"use strict";var i6e=Tf(),o6e=Array.prototype.forEach,l6e=Object.create,s6e=function(e,r){var t;for(t in e)r[t]=e[t]};YJ.exports=function(e){var r=l6e(null);return o6e.call(arguments,function(t){i6e(t)&&s6e(Object(t),r)}),r}});var jJ=R((ARe,WJ)=>{"use strict";var sT="razdwatrzy";WJ.exports=function(){return typeof sT.contains!="function"?!1:sT.contains("dwa")===!0&&sT.contains("foo")===!1}});var ZJ=R((TRe,XJ)=>{"use strict";var u6e=String.prototype.indexOf;XJ.exports=function(e){return u6e.call(this,e,arguments[1])>-1}});var uT=R((MRe,JJ)=>{"use strict";JJ.exports=jJ()()?String.prototype.contains:ZJ()});var ou=R((SRe,e$)=>{"use strict";var Gx=fv(),$J=oT(),KJ=Ux(),QJ=lT(),um=uT(),f6e=e$.exports=function(e,r){var t,a,n,i,o;return arguments.length<2||typeof e!="string"?(i=r,r=e,e=null):i=arguments[2],Gx(e)?(t=um.call(e,"c"),a=um.call(e,"e"),n=um.call(e,"w")):(t=n=!0,a=!1),o={value:r,configurable:t,enumerable:a,writable:n},i?KJ(QJ(i),o):o};f6e.gs=function(e,r,t){var a,n,i,o;return typeof e!="string"?(i=t,t=r,r=e,e=null):i=arguments[3],Gx(r)?$J(r)?Gx(t)?$J(t)||(i=t,t=void 0):t=void 0:(i=r,r=t=void 0):r=void 0,Gx(e)?(a=um.call(e,"c"),n=um.call(e,"e")):(a=!0,n=!1),o={get:r,set:t,configurable:a,enumerable:n},i?KJ(QJ(i),o):o}});var fm=R((kRe,t$)=>{"use strict";var r$=Object.prototype.toString,c6e=r$.call(function(){return arguments}());t$.exports=function(e){return r$.call(e)===c6e}});var cm=R((CRe,n$)=>{"use strict";var a$=Object.prototype.toString,v6e=a$.call("");n$.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||a$.call(e)===v6e)||!1}});var o$=R((ERe,i$)=>{"use strict";i$.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var u$=R((LRe,s$)=>{var l$=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};s$.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return l$()}try{return __global__||l$()}finally{delete Object.prototype.__global__}}()});var vm=R((DRe,f$)=>{"use strict";f$.exports=o$()()?globalThis:u$()});var v$=R((qRe,c$)=>{"use strict";var h6e=vm(),fT={object:!0,symbol:!0};c$.exports=function(){var e=h6e.Symbol,r;if(typeof e!="function")return!1;r=e("test symbol");try{String(r)}catch(t){return!1}return!(!fT[typeof e.iterator]||!fT[typeof e.toPrimitive]||!fT[typeof e.toStringTag])}});var d$=R((FRe,h$)=>{"use strict";h$.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var cT=R((RRe,p$)=>{"use strict";var d6e=d$();p$.exports=function(e){if(!d6e(e))throw new TypeError(e+" is not a symbol");return e}});var x$=R((PRe,b$)=>{"use strict";var m$=ou(),p6e=Object.create,y$=Object.defineProperty,m6e=Object.prototype,g$=p6e(null);b$.exports=function(e){for(var r=0,t,a;g$[e+(r||"")];)++r;return e+=r||"",g$[e]=!0,t="@@"+e,y$(m6e,t,m$.gs(null,function(n){a||(a=!0,y$(this,t,m$(n)),a=!1)})),t}});var w$=R((NRe,_$)=>{"use strict";var Ol=ou(),Cn=vm().Symbol;_$.exports=function(e){return Object.defineProperties(e,{hasInstance:Ol("",Cn&&Cn.hasInstance||e("hasInstance")),isConcatSpreadable:Ol("",Cn&&Cn.isConcatSpreadable||e("isConcatSpreadable")),iterator:Ol("",Cn&&Cn.iterator||e("iterator")),match:Ol("",Cn&&Cn.match||e("match")),replace:Ol("",Cn&&Cn.replace||e("replace")),search:Ol("",Cn&&Cn.search||e("search")),species:Ol("",Cn&&Cn.species||e("species")),split:Ol("",Cn&&Cn.split||e("split")),toPrimitive:Ol("",Cn&&Cn.toPrimitive||e("toPrimitive")),toStringTag:Ol("",Cn&&Cn.toStringTag||e("toStringTag")),unscopables:Ol("",Cn&&Cn.unscopables||e("unscopables"))})}});var M$=R((IRe,T$)=>{"use strict";var A$=ou(),y6e=cT(),hm=Object.create(null);T$.exports=function(e){return Object.defineProperties(e,{for:A$(function(r){return hm[r]?hm[r]:hm[r]=e(String(r))}),keyFor:A$(function(r){var t;y6e(r);for(t in hm)if(hm[t]===r)return t})})}});var C$=R((ORe,k$)=>{"use strict";var ds=ou(),vT=cT(),Hx=vm().Symbol,g6e=x$(),b6e=w$(),x6e=M$(),_6e=Object.create,hT=Object.defineProperties,Vx=Object.defineProperty,Ri,zh,S$;if(typeof Hx=="function")try{String(Hx()),S$=!0}catch(e){}else Hx=null;zh=function(r){if(this instanceof zh)throw new TypeError("Symbol is not a constructor");return Ri(r)};k$.exports=Ri=function e(r){var t;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return S$?Hx(r):(t=_6e(zh.prototype),r=r===void 0?"":String(r),hT(t,{__description__:ds("",r),__name__:ds("",g6e(r))}))};b6e(Ri);x6e(Ri);hT(zh.prototype,{constructor:ds(Ri),toString:ds("",function(){return this.__name__})});hT(Ri.prototype,{toString:ds(function(){return"Symbol ("+vT(this).__description__+")"}),valueOf:ds(function(){return vT(this)})});Vx(Ri.prototype,Ri.toPrimitive,ds("",function(){var e=vT(this);return typeof e=="symbol"?e:e.toString()}));Vx(Ri.prototype,Ri.toStringTag,ds("c","Symbol"));Vx(zh.prototype,Ri.toStringTag,ds("c",Ri.prototype[Ri.toStringTag]));Vx(zh.prototype,Ri.toPrimitive,ds("c",Ri.prototype[Ri.toPrimitive]))});var Mf=R((zRe,E$)=>{"use strict";E$.exports=v$()()?vm().Symbol:C$()});var D$=R((BRe,L$)=>{"use strict";var w6e=iu();L$.exports=function(){return w6e(this).length=0,this}});var Bh=R((URe,q$)=>{"use strict";q$.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var R$=R((GRe,F$)=>{"use strict";var A6e=fv(),T6e=Bx(),M6e=Object.prototype.toString;F$.exports=function(e){if(!A6e(e))return null;if(T6e(e)){var r=e.toString;if(typeof r!="function"||r===M6e)return null}try{return""+e}catch(t){return null}}});var N$=R((HRe,P$)=>{"use strict";P$.exports=function(e){try{return e.toString()}catch(r){try{return String(e)}catch(t){return null}}}});var O$=R((VRe,I$)=>{"use strict";var S6e=N$(),k6e=/[\n\r\u2028\u2029]/g;I$.exports=function(e){var r=S6e(e);return r===null?"":(r.length>100&&(r=r.slice(0,99)+"\u2026"),r=r.replace(k6e,function(t){switch(t){case` +`]),eJ&&(p.frag=p.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(p)}pi.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};pi.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};pi.prototype.draw=function(){for(var e=this,r=arguments.length,t=new Array(r),a=0;aj)?B.tree=lwe(H,{bounds:be}):j&&j.length&&(B.tree=j),B.tree){var re={primitive:"points",usage:"static",data:B.tree,type:"uint32"};B.elements?B.elements(re):B.elements=o.elements(re)}var ke=qx.float32(H);K({data:ke,usage:"dynamic"});var ge=qx.fract32(H,ke);return ve({data:ge,usage:"dynamic"}),xe({data:new Uint8Array(se),type:"uint8",usage:"stream"}),H}},{marker:function(H,B,V){var j=B.activation;if(j.forEach(function(ge){return ge&&ge.destroy&&ge.destroy()}),j.length=0,!H||typeof H[0]=="number"){var K=e.addMarker(H);j[K]=!0}else{for(var ve=[],xe=0,se=Math.min(H.length,B.count);xe=0)return n;var i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(var o=0,l=e.length;oa*4&&(this.tooManyColors=!0),this.updatePalette(t),n.length===1?n[0]:n};pi.prototype.updatePalette=function(e){if(!this.tooManyColors){var r=this.maxColors,t=this.paletteTexture,a=Math.ceil(e.length*.25/r);if(a>1){e=e.slice();for(var n=e.length*.25%r;n{"use strict";rT.exports=Px;rT.exports.default=Px;function Px(e,r,t){t=t||2;var a=r&&r.length,n=a?r[0]*t:e.length,i=nJ(e,0,n,t,!0),o=[];if(!i||i.next===i.prev)return o;var l,s,u,f,c,h,d;if(a&&(i=bwe(e,r,i,t)),e.length>80*t){l=u=e[0],s=f=e[1];for(var p=t;pu&&(u=c),h>f&&(f=h);d=Math.max(u-l,f-s),d=d!==0?32767/d:0}return om(i,o,t,l,s,d,0),o}function nJ(e,r,t,a,n){var i,o;if(n===eT(e,r,t,a)>0)for(i=r;i=r;i-=a)o=aJ(i,e[i],e[i+1],o);return o&&Nx(o,o.next)&&(sm(o),o=o.next),o}function uv(e,r){if(!e)return e;r||(r=e);var t=e,a;do if(a=!1,!t.steiner&&(Nx(t,t.next)||gn(t.prev,t,t.next)===0)){if(sm(t),t=r=t.prev,t===t.next)break;a=!0}else t=t.next;while(a||t!==r);return r}function om(e,r,t,a,n,i,o){if(e){!o&&i&&Twe(e,a,n,i);for(var l=e,s,u;e.prev!==e.next;){if(s=e.prev,u=e.next,i?mwe(e,a,n,i):pwe(e)){r.push(s.i/t|0),r.push(e.i/t|0),r.push(u.i/t|0),sm(e),e=u.next,l=u.next;continue}if(e=u,e===l){o?o===1?(e=ywe(uv(e),r,t),om(e,r,t,a,n,i,2)):o===2&&gwe(e,r,t,a,n,i):om(uv(e),r,t,a,n,i,1);break}}}}function pwe(e){var r=e.prev,t=e,a=e.next;if(gn(r,t,a)>=0)return!1;for(var n=r.x,i=t.x,o=a.x,l=r.y,s=t.y,u=a.y,f=ni?n>o?n:o:i>o?i:o,d=l>s?l>u?l:u:s>u?s:u,p=a.next;p!==r;){if(p.x>=f&&p.x<=h&&p.y>=c&&p.y<=d&&Oh(n,l,i,s,o,u,p.x,p.y)&&gn(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function mwe(e,r,t,a){var n=e.prev,i=e,o=e.next;if(gn(n,i,o)>=0)return!1;for(var l=n.x,s=i.x,u=o.x,f=n.y,c=i.y,h=o.y,d=ls?l>u?l:u:s>u?s:u,m=f>c?f>h?f:h:c>h?c:h,x=K7(d,p,r,t,a),_=K7(g,m,r,t,a),A=e.prevZ,b=e.nextZ;A&&A.z>=x&&b&&b.z<=_;){if(A.x>=d&&A.x<=g&&A.y>=p&&A.y<=m&&A!==n&&A!==o&&Oh(l,f,s,c,u,h,A.x,A.y)&&gn(A.prev,A,A.next)>=0||(A=A.prevZ,b.x>=d&&b.x<=g&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&Oh(l,f,s,c,u,h,b.x,b.y)&&gn(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;A&&A.z>=x;){if(A.x>=d&&A.x<=g&&A.y>=p&&A.y<=m&&A!==n&&A!==o&&Oh(l,f,s,c,u,h,A.x,A.y)&&gn(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;b&&b.z<=_;){if(b.x>=d&&b.x<=g&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&Oh(l,f,s,c,u,h,b.x,b.y)&&gn(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function ywe(e,r,t){var a=e;do{var n=a.prev,i=a.next.next;!Nx(n,i)&&iJ(n,a,a.next,i)&&lm(n,i)&&lm(i,n)&&(r.push(n.i/t|0),r.push(a.i/t|0),r.push(i.i/t|0),sm(a),sm(a.next),a=e=i),a=a.next}while(a!==e);return uv(a)}function gwe(e,r,t,a,n,i){var o=e;do{for(var l=o.next.next;l!==o.prev;){if(o.i!==l.i&&kwe(o,l)){var s=oJ(o,l);o=uv(o,o.next),s=uv(s,s.next),om(o,r,t,a,n,i,0),om(s,r,t,a,n,i,0);return}l=l.next}o=o.next}while(o!==e)}function bwe(e,r,t,a){var n=[],i,o,l,s,u;for(i=0,o=r.length;i=t.next.y&&t.next.y!==t.y){var l=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(l<=a&&l>i&&(i=l,o=t.x=t.x&&t.x>=u&&a!==t.x&&Oh(no.x||t.x===o.x&&Awe(o,t)))&&(o=t,c=h)),t=t.next;while(t!==s);return o}function Awe(e,r){return gn(e.prev,e,r.prev)<0&&gn(r.next,e,e.next)<0}function Twe(e,r,t,a){var n=e;do n.z===0&&(n.z=K7(n.x,n.y,r,t,a)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,Mwe(n)}function Mwe(e){var r,t,a,n,i,o,l,s,u=1;do{for(t=e,e=null,i=null,o=0;t;){for(o++,a=t,l=0,r=0;r0||s>0&&a;)l!==0&&(s===0||!a||t.z<=a.z)?(n=t,t=t.nextZ,l--):(n=a,a=a.nextZ,s--),i?i.nextZ=n:e=n,n.prevZ=i,i=n;t=a}i.nextZ=null,u*=2}while(o>1);return e}function K7(e,r,t,a,n){return e=(e-t)*n|0,r=(r-a)*n|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e|r<<1}function Swe(e){var r=e,t=e;do(r.x=(e-o)*(i-l)&&(e-o)*(a-l)>=(t-o)*(r-l)&&(t-o)*(i-l)>=(n-o)*(a-l)}function kwe(e,r){return e.next.i!==r.i&&e.prev.i!==r.i&&!Cwe(e,r)&&(lm(e,r)&&lm(r,e)&&Ewe(e,r)&&(gn(e.prev,e,r.prev)||gn(e,r.prev,r))||Nx(e,r)&&gn(e.prev,e,e.next)>0&&gn(r.prev,r,r.next)>0)}function gn(e,r,t){return(r.y-e.y)*(t.x-r.x)-(r.x-e.x)*(t.y-r.y)}function Nx(e,r){return e.x===r.x&&e.y===r.y}function iJ(e,r,t,a){var n=Rx(gn(e,r,t)),i=Rx(gn(e,r,a)),o=Rx(gn(t,a,e)),l=Rx(gn(t,a,r));return!!(n!==i&&o!==l||n===0&&Fx(e,t,r)||i===0&&Fx(e,a,r)||o===0&&Fx(t,e,a)||l===0&&Fx(t,r,a))}function Fx(e,r,t){return r.x<=Math.max(e.x,t.x)&&r.x>=Math.min(e.x,t.x)&&r.y<=Math.max(e.y,t.y)&&r.y>=Math.min(e.y,t.y)}function Rx(e){return e>0?1:e<0?-1:0}function Cwe(e,r){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==r.i&&t.next.i!==r.i&&iJ(t,t.next,e,r))return!0;t=t.next}while(t!==e);return!1}function lm(e,r){return gn(e.prev,e,e.next)<0?gn(e,r,e.next)>=0&&gn(e,e.prev,r)>=0:gn(e,r,e.prev)<0||gn(e,e.next,r)<0}function Ewe(e,r){var t=e,a=!1,n=(e.x+r.x)/2,i=(e.y+r.y)/2;do t.y>i!=t.next.y>i&&t.next.y!==t.y&&n<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(a=!a),t=t.next;while(t!==e);return a}function oJ(e,r){var t=new Q7(e.i,e.x,e.y),a=new Q7(r.i,r.x,r.y),n=e.next,i=r.prev;return e.next=r,r.prev=e,t.next=n,n.prev=t,a.next=t,t.prev=a,i.next=a,a.prev=i,a}function aJ(e,r,t,a){var n=new Q7(e,r,t);return a?(n.next=a.next,n.prev=a,a.next.prev=n,a.next=n):(n.prev=n,n.next=n),n}function sm(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 Q7(e,r,t){this.i=e,this.x=r,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Px.deviation=function(e,r,t,a){var n=r&&r.length,i=n?r[0]*t:e.length,o=Math.abs(eT(e,0,i,t));if(n)for(var l=0,s=r.length;l0&&(a+=e[n-1].length,t.holes.push(a))}return t}});var uJ=R((QFe,sJ)=>{"use strict";var Lwe=Kc();sJ.exports=Dwe;function Dwe(e,r,t){if(!e||e.length==null)throw Error("Argument should be an array");r==null&&(r=1),t==null&&(t=Lwe(e,r));for(var a=0;a{"use strict";fJ.exports=function(){var e,r;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[r={},"one"],[{},"two"],[{},"three"]])}catch(t){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(r)!=="one")}});var hJ=R((rRe,vJ)=>{"use strict";vJ.exports=function(){}});var Tf=R((tRe,dJ)=>{"use strict";var qwe=hJ()();dJ.exports=function(e){return e!==qwe&&e!==null}});var tT=R((aRe,mJ)=>{"use strict";var Fwe=Object.create,Rwe=Object.getPrototypeOf,pJ={};mJ.exports=function(){var e=Object.setPrototypeOf,r=arguments[0]||Fwe;return typeof e!="function"?!1:Rwe(e(r(null),pJ))===pJ}});var aT=R((nRe,yJ)=>{"use strict";var Pwe=Tf(),Nwe={function:!0,object:!0};yJ.exports=function(e){return Pwe(e)&&Nwe[typeof e]||!1}});var iu=R((iRe,gJ)=>{"use strict";var Iwe=Tf();gJ.exports=function(e){if(!Iwe(e))throw new TypeError("Cannot use null or undefined");return e}});var xJ=R((oRe,bJ)=>{"use strict";var nT=Object.create,Ix;tT()()||(Ix=iT());bJ.exports=function(){var e,r,t;return!Ix||Ix.level!==1?nT:(e={},r={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(a){if(a==="__proto__"){r[a]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}r[a]=t}),Object.defineProperties(e,r),Object.defineProperty(Ix,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(a,n){return nT(a===null?e:a,n)})}()});var iT=R((lRe,_J)=>{"use strict";var Owe=aT(),zwe=iu(),Bwe=Object.prototype.isPrototypeOf,Uwe=Object.defineProperty,Gwe={configurable:!0,enumerable:!1,writable:!0,value:void 0},Ox;Ox=function(e,r){if(zwe(e),r===null||Owe(r))return e;throw new TypeError("Prototype must be null or an object")};_J.exports=function(e){var r,t;return e?(e.level===2?e.set?(t=e.set,r=function(a,n){return t.call(Ox(a,n),n),a}):r=function(a,n){return Ox(a,n).__proto__=n,a}:r=function a(n,i){var o;return Ox(n,i),o=Bwe.call(a.nullPolyfill,n),o&&delete a.nullPolyfill.__proto__,i===null&&(i=a.nullPolyfill),n.__proto__=i,o&&Uwe(a.nullPolyfill,"__proto__",Gwe),n},Object.defineProperty(r,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),r={},t,a=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(a){try{t=a.set,t.call(e,r)}catch(n){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:(e={},e.__proto__=r,Object.getPrototypeOf(e)===r?{level:1}:!1)}());xJ()});var zx=R((sRe,wJ)=>{"use strict";wJ.exports=tT()()?Object.setPrototypeOf:iT()});var TJ=R((uRe,AJ)=>{"use strict";var Hwe=aT();AJ.exports=function(e){if(!Hwe(e))throw new TypeError(e+" is not an Object");return e}});var SJ=R((fRe,MJ)=>{"use strict";var Vwe=Object.create(null),Ywe=Math.random;MJ.exports=function(){var e;do e=Ywe().toString(36).slice(2);while(Vwe[e]);return e}});var fv=R((cRe,kJ)=>{"use strict";var Wwe=void 0;kJ.exports=function(e){return e!==Wwe&&e!==null}});var Bx=R((vRe,CJ)=>{"use strict";var jwe=fv(),Xwe={object:!0,function:!0,undefined:!0};CJ.exports=function(e){return jwe(e)?hasOwnProperty.call(Xwe,typeof e):!1}});var LJ=R((hRe,EJ)=>{"use strict";var Zwe=Bx();EJ.exports=function(e){if(!Zwe(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(r){return!1}}});var qJ=R((dRe,DJ)=>{"use strict";var Jwe=LJ();DJ.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(r){return!1}return!Jwe(e)}});var oT=R((pRe,FJ)=>{"use strict";var $we=qJ(),Kwe=/^\s*class[\s{/}]/,Qwe=Function.prototype.toString;FJ.exports=function(e){return!(!$we(e)||Kwe.test(Qwe.call(e)))}});var PJ=R((mRe,RJ)=>{"use strict";RJ.exports=function(){var e=Object.assign,r;return typeof e!="function"?!1:(r={foo:"raz"},e(r,{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}});var IJ=R((yRe,NJ)=>{"use strict";NJ.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var zJ=R((gRe,OJ)=>{"use strict";var e6e=Tf(),r6e=Object.keys;OJ.exports=function(e){return r6e(e6e(e)?Object(e):e)}});var UJ=R((bRe,BJ)=>{"use strict";BJ.exports=IJ()()?Object.keys:zJ()});var HJ=R((xRe,GJ)=>{"use strict";var t6e=UJ(),a6e=iu(),n6e=Math.max;GJ.exports=function(e,r){var t,a,n=n6e(arguments.length,2),i;for(e=Object(a6e(e)),i=function(o){try{e[o]=r[o]}catch(l){t||(t=l)}},a=1;a{"use strict";VJ.exports=PJ()()?Object.assign:HJ()});var lT=R((wRe,YJ)=>{"use strict";var i6e=Tf(),o6e=Array.prototype.forEach,l6e=Object.create,s6e=function(e,r){var t;for(t in e)r[t]=e[t]};YJ.exports=function(e){var r=l6e(null);return o6e.call(arguments,function(t){i6e(t)&&s6e(Object(t),r)}),r}});var jJ=R((ARe,WJ)=>{"use strict";var sT="razdwatrzy";WJ.exports=function(){return typeof sT.contains!="function"?!1:sT.contains("dwa")===!0&&sT.contains("foo")===!1}});var ZJ=R((TRe,XJ)=>{"use strict";var u6e=String.prototype.indexOf;XJ.exports=function(e){return u6e.call(this,e,arguments[1])>-1}});var uT=R((MRe,JJ)=>{"use strict";JJ.exports=jJ()()?String.prototype.contains:ZJ()});var ou=R((SRe,e$)=>{"use strict";var Gx=fv(),$J=oT(),KJ=Ux(),QJ=lT(),um=uT(),f6e=e$.exports=function(e,r){var t,a,n,i,o;return arguments.length<2||typeof e!="string"?(i=r,r=e,e=null):i=arguments[2],Gx(e)?(t=um.call(e,"c"),a=um.call(e,"e"),n=um.call(e,"w")):(t=n=!0,a=!1),o={value:r,configurable:t,enumerable:a,writable:n},i?KJ(QJ(i),o):o};f6e.gs=function(e,r,t){var a,n,i,o;return typeof e!="string"?(i=t,t=r,r=e,e=null):i=arguments[3],Gx(r)?$J(r)?Gx(t)?$J(t)||(i=t,t=void 0):t=void 0:(i=r,r=t=void 0):r=void 0,Gx(e)?(a=um.call(e,"c"),n=um.call(e,"e")):(a=!0,n=!1),o={get:r,set:t,configurable:a,enumerable:n},i?KJ(QJ(i),o):o}});var fm=R((kRe,t$)=>{"use strict";var r$=Object.prototype.toString,c6e=r$.call(function(){return arguments}());t$.exports=function(e){return r$.call(e)===c6e}});var cm=R((CRe,n$)=>{"use strict";var a$=Object.prototype.toString,v6e=a$.call("");n$.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||a$.call(e)===v6e)||!1}});var o$=R((ERe,i$)=>{"use strict";i$.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var u$=R((LRe,s$)=>{var l$=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};s$.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return l$()}try{return __global__||l$()}finally{delete Object.prototype.__global__}}()});var vm=R((DRe,f$)=>{"use strict";f$.exports=o$()()?globalThis:u$()});var v$=R((qRe,c$)=>{"use strict";var h6e=vm(),fT={object:!0,symbol:!0};c$.exports=function(){var e=h6e.Symbol,r;if(typeof e!="function")return!1;r=e("test symbol");try{String(r)}catch(t){return!1}return!(!fT[typeof e.iterator]||!fT[typeof e.toPrimitive]||!fT[typeof e.toStringTag])}});var d$=R((FRe,h$)=>{"use strict";h$.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var cT=R((RRe,p$)=>{"use strict";var d6e=d$();p$.exports=function(e){if(!d6e(e))throw new TypeError(e+" is not a symbol");return e}});var x$=R((PRe,b$)=>{"use strict";var m$=ou(),p6e=Object.create,y$=Object.defineProperty,m6e=Object.prototype,g$=p6e(null);b$.exports=function(e){for(var r=0,t,a;g$[e+(r||"")];)++r;return e+=r||"",g$[e]=!0,t="@@"+e,y$(m6e,t,m$.gs(null,function(n){a||(a=!0,y$(this,t,m$(n)),a=!1)})),t}});var w$=R((NRe,_$)=>{"use strict";var Ol=ou(),Cn=vm().Symbol;_$.exports=function(e){return Object.defineProperties(e,{hasInstance:Ol("",Cn&&Cn.hasInstance||e("hasInstance")),isConcatSpreadable:Ol("",Cn&&Cn.isConcatSpreadable||e("isConcatSpreadable")),iterator:Ol("",Cn&&Cn.iterator||e("iterator")),match:Ol("",Cn&&Cn.match||e("match")),replace:Ol("",Cn&&Cn.replace||e("replace")),search:Ol("",Cn&&Cn.search||e("search")),species:Ol("",Cn&&Cn.species||e("species")),split:Ol("",Cn&&Cn.split||e("split")),toPrimitive:Ol("",Cn&&Cn.toPrimitive||e("toPrimitive")),toStringTag:Ol("",Cn&&Cn.toStringTag||e("toStringTag")),unscopables:Ol("",Cn&&Cn.unscopables||e("unscopables"))})}});var M$=R((IRe,T$)=>{"use strict";var A$=ou(),y6e=cT(),hm=Object.create(null);T$.exports=function(e){return Object.defineProperties(e,{for:A$(function(r){return hm[r]?hm[r]:hm[r]=e(String(r))}),keyFor:A$(function(r){var t;y6e(r);for(t in hm)if(hm[t]===r)return t})})}});var C$=R((ORe,k$)=>{"use strict";var ds=ou(),vT=cT(),Hx=vm().Symbol,g6e=x$(),b6e=w$(),x6e=M$(),_6e=Object.create,hT=Object.defineProperties,Vx=Object.defineProperty,Ri,zh,S$;if(typeof Hx=="function")try{String(Hx()),S$=!0}catch(e){}else Hx=null;zh=function(r){if(this instanceof zh)throw new TypeError("Symbol is not a constructor");return Ri(r)};k$.exports=Ri=function e(r){var t;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return S$?Hx(r):(t=_6e(zh.prototype),r=r===void 0?"":String(r),hT(t,{__description__:ds("",r),__name__:ds("",g6e(r))}))};b6e(Ri);x6e(Ri);hT(zh.prototype,{constructor:ds(Ri),toString:ds("",function(){return this.__name__})});hT(Ri.prototype,{toString:ds(function(){return"Symbol ("+vT(this).__description__+")"}),valueOf:ds(function(){return vT(this)})});Vx(Ri.prototype,Ri.toPrimitive,ds("",function(){var e=vT(this);return typeof e=="symbol"?e:e.toString()}));Vx(Ri.prototype,Ri.toStringTag,ds("c","Symbol"));Vx(zh.prototype,Ri.toStringTag,ds("c",Ri.prototype[Ri.toStringTag]));Vx(zh.prototype,Ri.toPrimitive,ds("c",Ri.prototype[Ri.toPrimitive]))});var Mf=R((zRe,E$)=>{"use strict";E$.exports=v$()()?vm().Symbol:C$()});var D$=R((BRe,L$)=>{"use strict";var w6e=iu();L$.exports=function(){return w6e(this).length=0,this}});var Bh=R((URe,q$)=>{"use strict";q$.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var R$=R((GRe,F$)=>{"use strict";var A6e=fv(),T6e=Bx(),M6e=Object.prototype.toString;F$.exports=function(e){if(!A6e(e))return null;if(T6e(e)){var r=e.toString;if(typeof r!="function"||r===M6e)return null}try{return""+e}catch(t){return null}}});var N$=R((HRe,P$)=>{"use strict";P$.exports=function(e){try{return e.toString()}catch(r){try{return String(e)}catch(t){return null}}}});var O$=R((VRe,I$)=>{"use strict";var S6e=N$(),k6e=/[\n\r\u2028\u2029]/g;I$.exports=function(e){var r=S6e(e);return r===null?"":(r.length>100&&(r=r.slice(0,99)+"\u2026"),r=r.replace(k6e,function(t){switch(t){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),r)}});var dT=R((YRe,U$)=>{"use strict";var z$=fv(),C6e=Bx(),E6e=R$(),L6e=O$(),B$=function(e,r){return e.replace("%v",L6e(r))};U$.exports=function(e,r,t){if(!C6e(t))throw new TypeError(B$(r,e));if(!z$(e)){if("default"in t)return t.default;if(t.isOptional)return null}var a=E6e(t.errorMessage);throw z$(a)||(a=r),new TypeError(B$(a,e))}});var H$=R((WRe,G$)=>{"use strict";var D6e=dT(),q6e=fv();G$.exports=function(e){return q6e(e)?e:D6e(e,"Cannot use %v",arguments[1])}});var Y$=R((jRe,V$)=>{"use strict";var F6e=dT(),R6e=oT();V$.exports=function(e){return R6e(e)?e:F6e(e,"%v is not a plain function",arguments[1])}});var j$=R((XRe,W$)=>{"use strict";W$.exports=function(){var e=Array.from,r,t;return typeof e!="function"?!1:(r=["raz","dwa"],t=e(r),!!(t&&t!==r&&t[1]==="dwa"))}});var Z$=R((ZRe,X$)=>{"use strict";var P6e=Object.prototype.toString,N6e=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);X$.exports=function(e){return typeof e=="function"&&N6e(P6e.call(e))}});var $$=R((JRe,J$)=>{"use strict";J$.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var Q$=R(($Re,K$)=>{"use strict";K$.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var rK=R((KRe,eK)=>{"use strict";eK.exports=$$()()?Math.sign:Q$()});var aK=R((QRe,tK)=>{"use strict";var I6e=rK(),O6e=Math.abs,z6e=Math.floor;tK.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:I6e(e)*z6e(O6e(e)))}});var iK=R((ePe,nK)=>{"use strict";var B6e=aK(),U6e=Math.max;nK.exports=function(e){return U6e(0,B6e(e))}});var uK=R((rPe,sK)=>{"use strict";var G6e=Mf().iterator,H6e=fm(),V6e=Z$(),Y6e=iK(),oK=Bh(),W6e=iu(),j6e=Tf(),X6e=cm(),lK=Array.isArray,pT=Function.prototype.call,cv={configurable:!0,enumerable:!0,writable:!0,value:null},mT=Object.defineProperty;sK.exports=function(e){var r=arguments[1],t=arguments[2],a,n,i,o,l,s,u,f,c,h;if(e=Object(W6e(e)),j6e(r)&&oK(r),!this||this===Array||!V6e(this)){if(!r){if(H6e(e))return l=e.length,l!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(lK(e)){for(o=new Array(l=e.length),n=0;n=55296&&s<=56319&&(h+=e[++n])),h=r?pT.call(r,t,h,i):h,a?(cv.value=h,mT(o,i,cv)):o[i]=h,++i;l=i}}if(l===void 0)for(l=Y6e(e.length),a&&(o=new a(l)),n=0;n{"use strict";fK.exports=j$()()?Array.from:uK()});var hK=R((aPe,vK)=>{"use strict";var Z6e=cK(),J6e=Ux(),$6e=iu();vK.exports=function(e){var r=Object($6e(e)),t=arguments[1],a=Object(arguments[2]);if(r!==e&&!t)return r;var n={};return t?Z6e(t,function(i){(a.ensure||i in e)&&(n[i]=e[i])}):J6e(n,e),n}});var mK=R((nPe,pK)=>{"use strict";var K6e=Bh(),Q6e=iu(),eAe=Function.prototype.bind,dK=Function.prototype.call,rAe=Object.keys,tAe=Object.prototype.propertyIsEnumerable;pK.exports=function(e,r){return function(t,a){var n,i=arguments[2],o=arguments[3];return t=Object(Q6e(t)),K6e(a),n=rAe(t),o&&n.sort(typeof o=="function"?eAe.call(o,t):void 0),typeof e!="function"&&(e=n[e]),dK.call(e,n,function(l,s){return tAe.call(t,l)?dK.call(a,i,t[l],l,t,s):r})}}});var gK=R((iPe,yK)=>{"use strict";yK.exports=mK()("forEach")});var xK=R((oPe,bK)=>{"use strict";var aAe=Bh(),nAe=gK(),iAe=Function.prototype.call;bK.exports=function(e,r){var t={},a=arguments[2];return aAe(r),nAe(e,function(n,i,o,l){t[i]=iAe.call(r,a,n,i,o,l)}),t}});var TK=R((lPe,AK)=>{"use strict";var oAe=fv(),lAe=H$(),_K=Y$(),sAe=hK(),uAe=lT(),fAe=xK(),cAe=Function.prototype.bind,vAe=Object.defineProperty,hAe=Object.prototype.hasOwnProperty,wK;wK=function(e,r,t){var a=lAe(r)&&_K(r.value),n;return n=sAe(r),delete n.writable,delete n.value,n.get=function(){return!t.overwriteDefinition&&hAe.call(this,e)?a:(r.value=cAe.call(a,t.resolveContext?t.resolveContext(this):this),vAe(this,e,r),this[e])},n};AK.exports=function(e){var r=uAe(arguments[1]);return oAe(r.resolveContext)&&_K(r.resolveContext),fAe(e,function(t,a){return wK(a,t,r)})}});var yT=R((sPe,CK)=>{"use strict";var dAe=D$(),pAe=Ux(),mAe=Bh(),yAe=iu(),po=ou(),gAe=TK(),MK=Mf(),SK=Object.defineProperty,kK=Object.defineProperties,dm;CK.exports=dm=function(e,r){if(!(this instanceof dm))throw new TypeError("Constructor requires 'new'");kK(this,{__list__:po("w",yAe(e)),__context__:po("w",r),__nextIndex__:po("w",0)}),r&&(mAe(r.on),r.on("_add",this._onAdd),r.on("_delete",this._onDelete),r.on("_clear",this._onClear))};delete dm.prototype.constructor;kK(dm.prototype,pAe({_next:po(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__){SK(this,"__redo__",po("c",[e]));return}this.__redo__.forEach(function(r,t){r>=e&&(this.__redo__[t]=++r)},this),this.__redo__.push(e)}}),_onDelete:po(function(e){var r;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(r=this.__redo__.indexOf(e),r!==-1&&this.__redo__.splice(r,1),this.__redo__.forEach(function(t,a){t>e&&(this.__redo__[a]=--t)},this)))}),_onClear:po(function(){this.__redo__&&dAe.call(this.__redo__),this.__nextIndex__=0})})));SK(dm.prototype,MK.iterator,po(function(){return this}))});var FK=R((uPe,qK)=>{"use strict";var EK=zx(),LK=uT(),gT=ou(),bAe=Mf(),bT=yT(),DK=Object.defineProperty,Uh;Uh=qK.exports=function(e,r){if(!(this instanceof Uh))throw new TypeError("Constructor requires 'new'");bT.call(this,e),r?LK.call(r,"key+value")?r="key+value":LK.call(r,"key")?r="key":r="value":r="value",DK(this,"__kind__",gT("",r))};EK&&EK(Uh,bT);delete Uh.prototype.constructor;Uh.prototype=Object.create(bT.prototype,{_resolve:gT(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});DK(Uh.prototype,bAe.toStringTag,gT("c","Array Iterator"))});var IK=R((fPe,NK)=>{"use strict";var RK=zx(),Yx=ou(),xAe=Mf(),xT=yT(),PK=Object.defineProperty,Gh;Gh=NK.exports=function(e){if(!(this instanceof Gh))throw new TypeError("Constructor requires 'new'");e=String(e),xT.call(this,e),PK(this,"__length__",Yx("",e.length))};RK&&RK(Gh,xT);delete Gh.prototype.constructor;Gh.prototype=Object.create(xT.prototype,{_next:Yx(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r)})});PK(Gh.prototype,xAe.toStringTag,Yx("c","String Iterator"))});var zK=R((cPe,OK)=>{"use strict";var _Ae=fm(),wAe=Tf(),AAe=cm(),TAe=Mf().iterator,MAe=Array.isArray;OK.exports=function(e){return wAe(e)?MAe(e)||AAe(e)||_Ae(e)?!0:typeof e[TAe]=="function":!1}});var UK=R((vPe,BK)=>{"use strict";var SAe=zK();BK.exports=function(e){if(!SAe(e))throw new TypeError(e+" is not iterable");return e}});var _T=R((hPe,VK)=>{"use strict";var kAe=fm(),CAe=cm(),GK=FK(),EAe=IK(),LAe=UK(),HK=Mf().iterator;VK.exports=function(e){return typeof LAe(e)[HK]=="function"?e[HK]():kAe(e)?new GK(e):CAe(e)?new EAe(e):new GK(e)}});var WK=R((dPe,YK)=>{"use strict";var DAe=fm(),qAe=Bh(),FAe=cm(),RAe=_T(),PAe=Array.isArray,wT=Function.prototype.call,NAe=Array.prototype.some;YK.exports=function(e,r){var t,a=arguments[2],n,i,o,l,s,u,f;if(PAe(e)||DAe(e)?t="array":FAe(e)?t="string":e=RAe(e),qAe(r),i=function(){o=!0},t==="array"){NAe.call(e,function(c){return wT.call(r,a,c,i),o});return}if(t==="string"){for(s=e.length,l=0;l=55296&&f<=56319&&(u+=e[++l])),wT.call(r,a,u,i),!o);++l);return}for(n=e.next();!n.done;){if(wT.call(r,a,n.value,i),o)return;n=e.next()}}});var XK=R((pPe,jK)=>{"use strict";jK.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var $K=R((mPe,JK)=>{"use strict";var IAe=Tf(),jx=zx(),Wx=TJ(),OAe=iu(),zAe=SJ(),lu=ou(),BAe=_T(),UAe=WK(),GAe=Mf().toStringTag,ZK=XK(),HAe=Array.isArray,TT=Object.defineProperty,AT=Object.prototype.hasOwnProperty,VAe=Object.getPrototypeOf,Sf;JK.exports=Sf=function(){var e=arguments[0],r;if(!(this instanceof Sf))throw new TypeError("Constructor requires 'new'");return r=ZK&&jx&&WeakMap!==Sf?jx(new WeakMap,VAe(this)):this,IAe(e)&&(HAe(e)||(e=BAe(e))),TT(r,"__weakMapData__",lu("c","$weakMap$"+zAe())),e&&UAe(e,function(t){OAe(t),r.set(t[0],t[1])}),r};ZK&&(jx&&jx(Sf,WeakMap),Sf.prototype=Object.create(WeakMap.prototype,{constructor:lu(Sf)}));Object.defineProperties(Sf.prototype,{delete:lu(function(e){return AT.call(Wx(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:lu(function(e){if(AT.call(Wx(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:lu(function(e){return AT.call(Wx(e),this.__weakMapData__)}),set:lu(function(e,r){return TT(Wx(e),this.__weakMapData__,lu("c",r)),this}),toString:lu(function(){return"[object WeakMap]"})});TT(Sf.prototype,GAe,lu("c","WeakMap"))});var MT=R((yPe,KK)=>{"use strict";KK.exports=cJ()()?WeakMap:$K()});var eQ=R((gPe,QK)=>{"use strict";QK.exports=function(e,r,t){if(typeof Array.prototype.findIndex=="function")return e.findIndex(r,t);if(typeof r!="function")throw new TypeError("predicate must be a function");var a=Object(e),n=a.length;if(n===0)return-1;for(var i=0;i{"use strict";var Xx=ov(),YAe=Kc(),kT=kn(),WAe=hs(),jAe=Qc(),rQ=lJ(),XAe=uJ(),{float32:ZAe,fract32:ST}=Lx(),JAe=MT(),tQ=gh(),$Ae=eQ(),KAe=` precision highp float; @@ -662,7 +662,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;aQ.exports=za;function za(e,r){if(!(this instanceof za))return new za(e,r);if(typeof e=="function"?(r||(r={}),r.regl=e):r=e,r.length&&(r.positions=r),e=r.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=za.shaders.has(e)?za.shaders.get(e):za.shaders.set(e,za.createShaders(e)).get(e),this.update(r)}za.dashMult=2;za.maxPatternLength=256;za.precisionThreshold=3e6;za.maxPoints=1e4;za.maxLines=2048;za.shaders=new JAe;za.createShaders=function(e){let r=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),t={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,l)=>l.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,l)=>[l.viewport.x,l.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,l)=>!l.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},a=e(kT({vert:KAe,frag:QAe,attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,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}}},t)),n;try{n=e(kT({cull:{enable:!0,face:"back"},vert:t8e,frag:a8e,attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,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}}},t))}catch(o){n=a}return{fill:e({primitive:"triangle",elements:(o,l)=>l.triangles,offset:0,vert:e8e,frag:r8e,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,l)=>[l.viewport.x,l.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:t.blend,depth:{enable:!1},scissor:t.scissor,stencil:t.stencil,viewport:t.viewport}),rect:a,miter:n}};za.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};za.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};za.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((r,t)=>{if(r&&Array.isArray(r))return this.draw(...r);typeof r=="number"&&(r=this.passes[r]),r&&r.count>1&&r.opacity&&(this.regl._refresh(),r.fill&&r.triangles&&r.triangles.length>2&&this.shaders.fill(r),r.thickness&&(r.scale[0]*r.viewport.width>za.precisionThreshold||r.scale[1]*r.viewport.height>za.precisionThreshold?this.shaders.rect(r):r.join==="rect"||!r.join&&(r.thickness<=2||r.count>=za.maxPoints)?this.shaders.rect(r):this.shaders.miter(r)))}),this};za.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:r,gl:t}=this;if(e.forEach((n,i)=>{let o=this.passes[i];if(n!==void 0){if(n===null){this.passes[i]=null;return}if(typeof n[0]=="number"&&(n={positions:n}),n=WAe(n,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},n=kT({},za.defaults,n)),n.thickness!=null&&(o.thickness=parseFloat(n.thickness)),n.opacity!=null&&(o.opacity=parseFloat(n.opacity)),n.miterLimit!=null&&(o.miterLimit=parseFloat(n.miterLimit)),n.overlay!=null&&(o.overlay=!!n.overlay,iT-S),_=[],w=0,x=o.hole!=null?o.hole[0]:null;if(x!=null){let T=$Ae(b,S=>S>=x);b=b.slice(0,T),b.push(x)}for(let T=0;TD-x+(b[T]-w)),k=rQ(S,M);k=k.map(D=>D+w+(D+w{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var sQ=R((xPe,lQ)=>{"use strict";var n8e=Kc(),i8e=ov(),o8e=Z7(),l8e=hs(),nQ=kn(),iQ=Qc(),{float32:s8e,fract32:ET}=Lx();lQ.exports=u8e;var oQ=[[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 u8e(e,r){if(typeof e=="function"?(r||(r={}),r.regl=e):r=e,r.length&&(r.positions=r),e=r.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let t=e._gl,a,n,i,o,l,s,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},f=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),n=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"static",type:"float",data:oQ}),p(r),a=e({vert:` +`;aQ.exports=za;function za(e,r){if(!(this instanceof za))return new za(e,r);if(typeof e=="function"?(r||(r={}),r.regl=e):r=e,r.length&&(r.positions=r),e=r.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=za.shaders.has(e)?za.shaders.get(e):za.shaders.set(e,za.createShaders(e)).get(e),this.update(r)}za.dashMult=2;za.maxPatternLength=256;za.precisionThreshold=3e6;za.maxPoints=1e4;za.maxLines=2048;za.shaders=new JAe;za.createShaders=function(e){let r=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),t={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,l)=>l.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,l)=>[l.viewport.x,l.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,l)=>!l.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},a=e(kT({vert:KAe,frag:QAe,attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,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}}},t)),n;try{n=e(kT({cull:{enable:!0,face:"back"},vert:t8e,frag:a8e,attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,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}}},t))}catch(o){n=a}return{fill:e({primitive:"triangle",elements:(o,l)=>l.triangles,offset:0,vert:e8e,frag:r8e,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,l)=>[l.viewport.x,l.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:t.blend,depth:{enable:!1},scissor:t.scissor,stencil:t.stencil,viewport:t.viewport}),rect:a,miter:n}};za.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};za.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};za.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((r,t)=>{if(r&&Array.isArray(r))return this.draw(...r);typeof r=="number"&&(r=this.passes[r]),r&&r.count>1&&r.opacity&&(this.regl._refresh(),r.fill&&r.triangles&&r.triangles.length>2&&this.shaders.fill(r),r.thickness&&(r.scale[0]*r.viewport.width>za.precisionThreshold||r.scale[1]*r.viewport.height>za.precisionThreshold?this.shaders.rect(r):r.join==="rect"||!r.join&&(r.thickness<=2||r.count>=za.maxPoints)?this.shaders.rect(r):this.shaders.miter(r)))}),this};za.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:r,gl:t}=this;if(e.forEach((n,i)=>{let o=this.passes[i];if(n!==void 0){if(n===null){this.passes[i]=null;return}if(typeof n[0]=="number"&&(n={positions:n}),n=WAe(n,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},n=kT({},za.defaults,n)),n.thickness!=null&&(o.thickness=parseFloat(n.thickness)),n.opacity!=null&&(o.opacity=parseFloat(n.opacity)),n.miterLimit!=null&&(o.miterLimit=parseFloat(n.miterLimit)),n.overlay!=null&&(o.overlay=!!n.overlay,iT-S),_=[],A=0,b=o.hole!=null?o.hole[0]:null;if(b!=null){let T=$Ae(x,S=>S>=b);x=x.slice(0,T),x.push(b)}for(let T=0;TD-b+(x[T]-A)),k=rQ(S,M);k=k.map(D=>D+A+(D+A{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var sQ=R((xPe,lQ)=>{"use strict";var n8e=Kc(),i8e=ov(),o8e=Z7(),l8e=hs(),nQ=kn(),iQ=Qc(),{float32:s8e,fract32:ET}=Lx();lQ.exports=u8e;var oQ=[[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 u8e(e,r){if(typeof e=="function"?(r||(r={}),r.regl=e):r=e,r.length&&(r.positions=r),e=r.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let t=e._gl,a,n,i,o,l,s,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},f=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),n=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"static",type:"float",data:oQ}),p(r),a=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -706,10 +706,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(m,b)=>[b.viewport.x,b.viewport.y,m.viewportWidth,m.viewportHeight]},attributes:{color:{buffer:o,offset:(m,b)=>b.offset*4,divisor:1},position:{buffer:n,offset:(m,b)=>b.offset*8,divisor:1},positionFract:{buffer:i,offset:(m,b)=>b.offset*8,divisor:1},error:{buffer:l,offset:(m,b)=>b.offset*16,divisor:1},direction:{buffer:s,stride:24,offset:0},lineOffset:{buffer:s,stride:24,offset:8},capOffset:{buffer:s,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:oQ.length}),nQ(c,{update:p,draw:h,destroy:g,regl:e,gl:t,canvas:t.canvas,groups:f}),c;function c(m){m?p(m):m===null&&g(),h()}function h(m){if(typeof m=="number")return d(m);m&&!Array.isArray(m)&&(m=[m]),e._refresh(),f.forEach((b,_)=>{if(b){if(m&&(m[_]?b.draw=!0:b.draw=!1),!b.draw){b.draw=!0;return}d(_)}})}function d(m){typeof m=="number"&&(m=f[m]),m!=null&&m&&m.count&&m.color&&m.opacity&&m.positions&&m.positions.length>1&&(m.scaleRatio=[m.scale[0]*m.viewport.width,m.scale[1]*m.viewport.height],a(m),m.after&&m.after(m))}function p(m){if(!m)return;m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);let b=0,_=0;if(c.groups=f=m.map((T,S)=>{let M=f[S];if(T)typeof T=="function"?T={after:T}:typeof T[0]=="number"&&(T={positions:T});else return M;return T=l8e(T,{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"}),M||(f[S]=M={id:S,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},T=nQ({},u,T)),o8e(M,T,[{lineWidth:k=>+k*.5,capSize:k=>+k*.5,opacity:parseFloat,errors:k=>(k=iQ(k),_+=k.length,k),positions:(k,D)=>(k=iQ(k,"float64"),D.count=Math.floor(k.length/2),D.bounds=n8e(k,2),D.offset=b,b+=D.count,k)},{color:(k,D)=>{let P=D.count;if(k||(k="transparent"),!Array.isArray(k)||typeof k[0]=="number"){let q=k;k=Array(P);for(let O=0;O{let N=D.bounds;return k||(k=N),D.scale=[1/(k[2]-k[0]),1/(k[3]-k[1])],D.translate=[-k[0],-k[1]],D.scaleFract=ET(D.scale),D.translateFract=ET(D.translate),k},viewport:k=>{let D;return Array.isArray(k)?D={x:k[0],y:k[1],width:k[2]-k[0],height:k[3]-k[1]}:k?(D={x:k.x||k.left||0,y:k.y||k.top||0},k.right?D.width=k.right-D.x:D.width=k.w||k.width||0,k.bottom?D.height=k.bottom-D.y:D.height=k.h||k.height||0):D={x:0,y:0,width:t.drawingBufferWidth,height:t.drawingBufferHeight},D}}]),M}),b||_){let T=f.reduce((D,P,N)=>D+(P?P.count:0),0),S=new Float64Array(T*2),M=new Uint8Array(T*4),k=new Float32Array(T*4);f.forEach((D,P)=>{if(!D)return;let{positions:N,count:q,offset:O,color:U,errors:$}=D;q&&(M.set(U,O*4),k.set($,O*4),S.set(N,O*2))});var w=s8e(S);n(w);var x=ET(S,w);i(x),o(M),l(k)}}function g(){n.destroy(),i.destroy(),o.destroy(),l.destroy(),s.destroy()}}});var cQ=R((_Pe,fQ)=>{var uQ=/[\'\"]/;fQ.exports=function(r){return r?(uQ.test(r.charAt(0))&&(r=r.substr(1)),uQ.test(r.charAt(r.length-1))&&(r=r.substr(0,r.length-1)),r):""}});var LT=R(()=>{});var DT=R(()=>{});var qT=R(()=>{});var FT=R(()=>{});var RT=R(()=>{});var pQ=R((qPe,dQ)=>{"use strict";function vQ(e,r){if(typeof e!="string")return[e];var t=[e];typeof r=="string"||Array.isArray(r)?r={brackets:r}:r||(r={});var a=r.brackets?Array.isArray(r.brackets)?r.brackets:[r.brackets]:["{}","[]","()"],n=r.escape||"___",i=!!r.flat;a.forEach(function(s){var u=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function c(h,d,p){var g=t.push(h.slice(s[0].length,-s[1].length))-1;return f.push(g),n+g+n}t.forEach(function(h,d){for(var p,g=0;h!=p;)if(p=h,h=h.replace(u,c),g++>1e4)throw Error("References have circular dependency. Please, check them.");t[d]=h}),f=f.reverse(),t=t.map(function(h){return f.forEach(function(d){h=h.replace(new RegExp("(\\"+n+d+"\\"+n+")","g"),s[0]+"$1"+s[1])}),h})});var o=new RegExp("\\"+n+"([0-9]+)\\"+n);function l(s,u,f){for(var c=[],h,d=0;h=o.exec(s);){if(d++>1e4)throw Error("Circular references in parenthesis");c.push(s.slice(0,h.index)),c.push(l(u[h[1]],u)),s=s.slice(h.index+h[0].length)}return c.push(s),c}return i?t:l(t[0],t)}function hQ(e,r){if(r&&r.flat){var t=r&&r.escape||"___",a=e[0],n;if(!a)return"";for(var i=new RegExp("\\"+t+"([0-9]+)\\"+t),o=0;a!=n;){if(o++>1e4)throw Error("Circular references in "+e);n=a,a=a.replace(i,l)}return a}return e.reduce(function s(u,f){return Array.isArray(f)&&(f=f.reduce(s,"")),u+f},"");function l(s,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function PT(e,r){return Array.isArray(e)?hQ(e,r):vQ(e,r)}PT.parse=vQ;PT.stringify=hQ;dQ.exports=PT});var gQ=R((FPe,yQ)=>{"use strict";var mQ=pQ();yQ.exports=function(r,t,a){if(r==null)throw Error("First argument should be a string");if(t==null)throw Error("Separator should be a string or a RegExp");a?(typeof a=="string"||Array.isArray(a))&&(a={ignore:a}):a={},a.escape==null&&(a.escape=!0),a.ignore==null?a.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof a.ignore=="string"&&(a.ignore=[a.ignore]),a.ignore=a.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var n=mQ.parse(r,{flat:!0,brackets:a.ignore}),i=n[0],o=i.split(t);if(a.escape){for(var l=[],s=0;s{});var NT=R((NPe,xQ)=>{"use strict";var f8e=bQ();xQ.exports={isSize:function(r){return/^[\d\.]/.test(r)||r.indexOf("/")!==-1||f8e.indexOf(r)!==-1}}});var TQ=R((IPe,AQ)=>{"use strict";var c8e=cQ(),v8e=LT(),h8e=DT(),d8e=qT(),p8e=FT(),m8e=RT(),IT=gQ(),y8e=NT().isSize;AQ.exports=wQ;var pm=wQ.cache={};function wQ(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(pm[e])return pm[e];if(e==="")throw new Error("Cannot parse an empty string.");if(h8e.indexOf(e)!==-1)return pm[e]={system:e};for(var r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},t=IT(e,/\s+/),a;a=t.shift();){if(v8e.indexOf(a)!==-1)return["style","variant","weight","stretch"].forEach(function(i){r[i]=a}),pm[e]=r;if(p8e.indexOf(a)!==-1){r.style=a;continue}if(a==="normal"||a==="small-caps"){r.variant=a;continue}if(m8e.indexOf(a)!==-1){r.stretch=a;continue}if(d8e.indexOf(a)!==-1){r.weight=a;continue}if(y8e(a)){var n=IT(a,"/");if(r.size=n[0],n[1]!=null?r.lineHeight=_Q(n[1]):t[0]==="/"&&(t.shift(),r.lineHeight=_Q(t.shift())),!t.length)throw new Error("Missing required font-family.");return r.family=IT(t.join(" "),/\s*,\s*/).map(c8e),pm[e]=r}throw new Error("Unknown or unsupported font token: "+a)}throw new Error("Missing required font-size.")}function _Q(e){var r=parseFloat(e);return r.toString()===e?r:e}});var zT=R((OPe,MQ)=>{"use strict";var g8e=hs(),b8e=NT().isSize,x8e=ym(LT()),_8e=ym(DT()),w8e=ym(qT()),A8e=ym(FT()),T8e=ym(RT()),M8e={normal:1,"small-caps":1},S8e={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},OT={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};MQ.exports=function(r){if(r=g8e(r,{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"}),r.system)return r.system&&mm(r.system,_8e),r.system;if(mm(r.style,A8e),mm(r.variant,M8e),mm(r.weight,w8e),mm(r.stretch,T8e),r.size==null&&(r.size=OT.size),typeof r.size=="number"&&(r.size+="px"),!b8e)throw Error("Bad size value `"+r.size+"`");r.family||(r.family=OT.family),Array.isArray(r.family)&&(r.family.length||(r.family=[OT.family]),r.family=r.family.map(function(a){return S8e[a]?a:'"'+a+'"'}).join(", "));var t=[];return t.push(r.style),r.variant!==r.style&&t.push(r.variant),r.weight!==r.variant&&r.weight!==r.style&&t.push(r.weight),r.stretch!==r.weight&&r.stretch!==r.variant&&r.stretch!==r.style&&t.push(r.stretch),t.push(r.size+(r.lineHeight==null||r.lineHeight==="normal"||r.lineHeight+""=="1"?"":"/"+r.lineHeight)),t.push(r.family),t.filter(Boolean).join(" ")};function mm(e,r){if(e&&!r[e]&&!x8e[e])throw Error("Unknown keyword `"+e+"`");return e}function ym(e){for(var r={},t=0;t{"use strict";SQ.exports={parse:TQ(),stringify:zT()}});var GT=R((BT,UT)=>{(function(e,r){typeof BT=="object"&&typeof UT!="undefined"?UT.exports=r():typeof define=="function"&&define.amd?define(r):e.createREGL=r()})(BT,function(){"use strict";var e=function(G,ie){for(var ue=Object.keys(ie),We=0;We1&&ie===ue&&(ie==='"'||ie==="'"))return['"'+o(G.substr(1,G.length-2))+'"'];var We=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(G);if(We)return l(G.substr(0,We.index)).concat(l(We[1])).concat(l(G.substr(We.index+We[0].length)));var Qe=G.split(".");if(Qe.length===1)return['"'+o(G)+'"'];for(var ar=[],$e=0;$e65535)<<4,G>>>=ie,ue=(G>255)<<3,G>>>=ue,ie|=ue,ue=(G>15)<<2,G>>>=ue,ie|=ue,ue=(G>3)<<1,G>>>=ue,ie|=ue,ie|G>>1}function z(){var G=k(8,function(){return[]});function ie(ar){var $e=j(ar),br=G[H($e)>>2];return br.length>0?br.pop():new ArrayBuffer($e)}function ue(ar){G[H(ar.byteLength)>>2].push(ar)}function We(ar,$e){var br=null;switch(ar){case D:br=new Int8Array(ie($e),0,$e);break;case P:br=new Uint8Array(ie($e),0,$e);break;case N:br=new Int16Array(ie(2*$e),0,$e);break;case q:br=new Uint16Array(ie(2*$e),0,$e);break;case O:br=new Int32Array(ie(4*$e),0,$e);break;case U:br=new Uint32Array(ie(4*$e),0,$e);break;case $:br=new Float32Array(ie(4*$e),0,$e);break;default:return null}return br.length!==$e?br.subarray(0,$e):br}function Qe(ar){ue(ar.buffer)}return{alloc:ie,free:ue,allocType:We,freeType:Qe}}var V=z();V.zero=z();var X=3408,K=3410,ve=3411,xe=3412,se=3413,be=3414,re=3415,ke=33901,ge=33902,Ee=3379,De=3386,Ce=34921,Y=36347,ae=36348,Z=35661,Te=35660,Pe=34930,Ne=36349,lr=34076,Ke=34024,Je=7936,or=7937,yr=7938,ir=35724,Xe=34047,Lr=36063,Ar=34852,de=3553,Oe=34067,Ue=34069,rt=33984,Ur=6408,Ye=5126,Ve=5121,pr=36160,Tr=36053,mr=36064,vr=16384,Cr=function(G,ie){var ue=1;ie.ext_texture_filter_anisotropic&&(ue=G.getParameter(Xe));var We=1,Qe=1;ie.webgl_draw_buffers&&(We=G.getParameter(Ar),Qe=G.getParameter(Lr));var ar=!!ie.oes_texture_float;if(ar){var $e=G.createTexture();G.bindTexture(de,$e),G.texImage2D(de,0,Ur,1,1,0,Ur,Ye,null);var br=G.createFramebuffer();if(G.bindFramebuffer(pr,br),G.framebufferTexture2D(pr,mr,de,$e,0),G.bindTexture(de,null),G.checkFramebufferStatus(pr)!==Tr)ar=!1;else{G.viewport(0,0,1,1),G.clearColor(1,0,0,1),G.clear(vr);var Dr=V.allocType(Ye,4);G.readPixels(0,0,1,1,Ur,Ye,Dr),G.getError()?ar=!1:(G.deleteFramebuffer(br),G.deleteTexture($e),ar=Dr[0]===1),V.freeType(Dr)}}var qr=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Fr=!0;if(!qr){var xt=G.createTexture(),ft=V.allocType(Ve,36);G.activeTexture(rt),G.bindTexture(Oe,xt),G.texImage2D(Ue,0,Ur,3,3,0,Ur,Ve,ft),V.freeType(ft),G.bindTexture(Oe,null),G.deleteTexture(xt),Fr=!G.getError()}return{colorBits:[G.getParameter(K),G.getParameter(ve),G.getParameter(xe),G.getParameter(se)],depthBits:G.getParameter(be),stencilBits:G.getParameter(re),subpixelBits:G.getParameter(X),extensions:Object.keys(ie).filter(function(Zr){return!!ie[Zr]}),maxAnisotropic:ue,maxDrawbuffers:We,maxColorAttachments:Qe,pointSizeDims:G.getParameter(ke),lineWidthDims:G.getParameter(ge),maxViewportDims:G.getParameter(De),maxCombinedTextureUnits:G.getParameter(Z),maxCubeMapSize:G.getParameter(lr),maxRenderbufferSize:G.getParameter(Ke),maxTextureUnits:G.getParameter(Pe),maxTextureSize:G.getParameter(Ee),maxAttributes:G.getParameter(Ce),maxVertexUniforms:G.getParameter(Y),maxVertexTextureUnits:G.getParameter(Te),maxVaryingVectors:G.getParameter(ae),maxFragmentUniforms:G.getParameter(Ne),glsl:G.getParameter(ir),renderer:G.getParameter(or),vendor:G.getParameter(Je),version:G.getParameter(yr),readFloat:ar,npotTextureCube:Fr}},Ir=function(G){return G instanceof Uint8Array||G instanceof Uint16Array||G instanceof Uint32Array||G instanceof Int8Array||G instanceof Int16Array||G instanceof Int32Array||G instanceof Float32Array||G instanceof Float64Array||G instanceof Uint8ClampedArray};function Gr(G){return!!G&&typeof G=="object"&&Array.isArray(G.shape)&&Array.isArray(G.stride)&&typeof G.offset=="number"&&G.shape.length===G.stride.length&&(Array.isArray(G.data)||Ir(G.data))}var Ze=function(G){return Object.keys(G).map(function(ie){return G[ie]})},oe={shape:$r,flatten:tt};function ye(G,ie,ue){for(var We=0;We0){var wt;if(Array.isArray(sr[0])){Jr=ra(sr);for(var xr=1,dr=1;dr0){if(typeof xr[0]=="number"){var Hr=V.allocType(wr.dtype,xr.length);Yi(Hr,xr),Jr(Hr,lt),V.freeType(Hr)}else if(Array.isArray(xr[0])||Ir(xr[0])){Xr=ra(xr);var Vr=Ma(xr,Xr,wr.dtype);Jr(Vr,lt),V.freeType(Vr)}}}else if(Gr(xr)){Xr=xr.shape;var st=xr.stride,At=0,zt=0,Kr=0,vt=0;Xr.length===1?(At=Xr[0],zt=1,Kr=st[0],vt=0):Xr.length===2&&(At=Xr[0],zt=Xr[1],Kr=st[0],vt=st[1]);var Rt=Array.isArray(xr.data)?wr.dtype:on(xr.data),Pt=V.allocType(Rt,At*zt);Wi(Pt,xr.data,At,zt,Kr,vt,xr.offset),Jr(Pt,lt),V.freeType(Pt)}return et}return Sr||et(ze),et._reglType="buffer",et._buffer=wr,et.subdata=wt,ue.profile&&(et.stats=wr.stats),et.destroy=function(){ft(wr)},et}function hr(){Ze(ar).forEach(function(ze){ze.buffer=G.createBuffer(),G.bindBuffer(ze.type,ze.buffer),G.bufferData(ze.type,ze.persistentData||ze.byteLength,ze.usage)})}return ue.profile&&(ie.getTotalBufferSize=function(){var ze=0;return Object.keys(ar).forEach(function(sr){ze+=ar[sr].stats.size}),ze}),{create:Zr,createStream:Dr,destroyStream:qr,clear:function(){Ze(ar).forEach(ft),br.forEach(ft)},getBuffer:function(ze){return ze&&ze._buffer instanceof $e?ze._buffer:null},restore:hr,_initBuffer:xt}}var Aa=0,Un=0,_s=1,ws=1,Bl=4,_v=4,As={points:Aa,point:Un,lines:_s,line:ws,triangles:Bl,triangle:_v,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Bf=0,Uf=1,ol=4,ui=5120,ll=5121,Ts=5122,go=5123,yt=5124,jt=5125,va=34963,jr=35040,Gn=35044;function Ea(G,ie,ue,We){var Qe={},ar=0,$e={uint8:ll,uint16:go};ie.oes_element_index_uint&&($e.uint32=jt);function br(hr){this.id=ar++,Qe[this.id]=this,this.buffer=hr,this.primType=ol,this.vertCount=0,this.type=0}br.prototype.bind=function(){this.buffer.bind()};var Dr=[];function qr(hr){var ze=Dr.pop();return ze||(ze=new br(ue.create(null,va,!0,!1)._buffer)),xt(ze,hr,jr,-1,-1,0,0),ze}function Fr(hr){Dr.push(hr)}function xt(hr,ze,sr,Sr,Nr,wr,et){hr.buffer.bind();var Jr;if(ze){var wt=et;!et&&(!Ir(ze)||Gr(ze)&&!Ir(ze.data))&&(wt=ie.oes_element_index_uint?jt:go),ue._initBuffer(hr.buffer,ze,sr,wt,3)}else G.bufferData(va,wr,sr),hr.buffer.dtype=Jr||ll,hr.buffer.usage=sr,hr.buffer.dimension=3,hr.buffer.byteLength=wr;if(Jr=et,!et){switch(hr.buffer.dtype){case ll:case ui:Jr=ll;break;case go:case Ts:Jr=go;break;case jt:case yt:Jr=jt;break;default:}hr.buffer.dtype=Jr}hr.type=Jr;var xr=Nr;xr<0&&(xr=hr.buffer.byteLength,Jr===go?xr>>=1:Jr===jt&&(xr>>=2)),hr.vertCount=xr;var dr=Sr;if(Sr<0){dr=ol;var lt=hr.buffer.dimension;lt===1&&(dr=Bf),lt===2&&(dr=Uf),lt===3&&(dr=ol)}hr.primType=dr}function ft(hr){We.elementsCount--,delete Qe[hr.id],hr.buffer.destroy(),hr.buffer=null}function Zr(hr,ze){var sr=ue.create(null,va,!0),Sr=new br(sr._buffer);We.elementsCount++;function Nr(wr){if(!wr)sr(),Sr.primType=ol,Sr.vertCount=0,Sr.type=ll;else if(typeof wr=="number")sr(wr),Sr.primType=ol,Sr.vertCount=wr|0,Sr.type=ll;else{var et=null,Jr=Gn,wt=-1,xr=-1,dr=0,lt=0;Array.isArray(wr)||Ir(wr)||Gr(wr)?et=wr:("data"in wr&&(et=wr.data),"usage"in wr&&(Jr=_t[wr.usage]),"primitive"in wr&&(wt=As[wr.primitive]),"count"in wr&&(xr=wr.count|0),"type"in wr&&(lt=$e[wr.type]),"length"in wr?dr=wr.length|0:(dr=xr,lt===go||lt===Ts?dr*=2:(lt===jt||lt===yt)&&(dr*=4))),xt(Sr,et,Jr,wt,xr,dr,lt)}return Nr}return Nr(hr),Nr._reglType="elements",Nr._elements=Sr,Nr.subdata=function(wr,et){return sr.subdata(wr,et),Nr},Nr.destroy=function(){ft(Sr)},Nr}return{create:Zr,createStream:qr,destroyStream:Fr,getElements:function(hr){return typeof hr=="function"&&hr._elements instanceof br?hr._elements:null},clear:function(){Ze(Qe).forEach(ft)}}}var Fn=new Float32Array(1),Vt=new Uint32Array(Fn.buffer),bo=5123;function Ul(G){for(var ie=V.allocType(bo,G.length),ue=0;ue>>31<<15,ar=(We<<1>>>24)-127,$e=We>>13&1023;if(ar<-24)ie[ue]=Qe;else if(ar<-14){var br=-14-ar;ie[ue]=Qe+($e+1024>>br)}else ar>15?ie[ue]=Qe+31744:ie[ue]=Qe+(ar+15<<10)+$e}return ie}function Gl(G){return Array.isArray(G)||Ir(G)}var E5=34467,Pi=3553,hu=34067,Ms=34069,Do=6408,wv=6406,Ss=6407,ks=6409,Gf=6410,td=32854,Hl=32855,du=36194,qm=32819,L5=32820,Av=33635,ad=34042,Hf=6402,Vf=34041,Vl=35904,sl=35906,xo=36193,Tv=33776,Yf=33777,Cs=33778,Mv=33779,Fm=35986,nd=35987,Sv=34798,Rm=35840,Pm=35841,id=35842,Nm=35843,od=36196,pu=5121,kv=5123,ld=5125,qo=5126,mu=10242,D5=10243,q5=10497,sd=33071,Im=33648,Wf=10240,F5=10241,yu=9728,Cv=9729,jf=9984,Xf=9985,gu=9986,Es=9987,Om=33170,bu=4352,R5=4353,Ev=4354,P5=34046,N5=3317,I5=37440,zm=37441,Zf=37443,Bm=37444,Ls=33984,Um=[jf,gu,Xf,Es],ji=[0,ks,Gf,Ss,Do],Xi={};Xi[ks]=Xi[wv]=Xi[Hf]=1,Xi[Vf]=Xi[Gf]=2,Xi[Ss]=Xi[Vl]=3,Xi[Do]=Xi[sl]=4;function Yl(G){return"[object "+G+"]"}var Lv=Yl("HTMLCanvasElement"),Wl=Yl("OffscreenCanvas"),Jf=Yl("CanvasRenderingContext2D"),ud=Yl("ImageBitmap"),Gm=Yl("HTMLImageElement"),Hm=Yl("HTMLVideoElement"),O5=Object.keys(St).concat([Lv,Wl,Jf,ud,Gm,Hm]),Ds=[];Ds[pu]=1,Ds[qo]=4,Ds[xo]=2,Ds[kv]=2,Ds[ld]=4;var Rn=[];Rn[td]=2,Rn[Hl]=2,Rn[du]=2,Rn[Vf]=4,Rn[Tv]=.5,Rn[Yf]=.5,Rn[Cs]=1,Rn[Mv]=1,Rn[Fm]=.5,Rn[nd]=1,Rn[Sv]=1,Rn[Rm]=.5,Rn[Pm]=.25,Rn[id]=.5,Rn[Nm]=.25,Rn[od]=.5;function Vm(G){return Array.isArray(G)&&(G.length===0||typeof G[0]=="number")}function Ym(G){if(!Array.isArray(G))return!1;var ie=G.length;return!(ie===0||!Gl(G[0]))}function qs(G){return Object.prototype.toString.call(G)}function Wm(G){return qs(G)===Lv}function jm(G){return qs(G)===Wl}function z5(G){return qs(G)===Jf}function B5(G){return qs(G)===ud}function U5(G){return qs(G)===Gm}function G5(G){return qs(G)===Hm}function fd(G){if(!G)return!1;var ie=qs(G);return O5.indexOf(ie)>=0?!0:Vm(G)||Ym(G)||Gr(G)}function Xm(G){return St[Object.prototype.toString.call(G)]|0}function H5(G,ie){var ue=ie.length;switch(G.type){case pu:case kv:case ld:case qo:var We=V.allocType(G.type,ue);We.set(ie),G.data=We;break;case xo:G.data=Ul(ie);break;default:}}function Zm(G,ie){return V.allocType(G.type===xo?qo:G.type,ie)}function cd(G,ie){G.type===xo?(G.data=Ul(ie),V.freeType(ie)):G.data=ie}function Jm(G,ie,ue,We,Qe,ar){for(var $e=G.width,br=G.height,Dr=G.channels,qr=$e*br*Dr,Fr=Zm(G,qr),xt=0,ft=0;ft=1;)br+=$e*Dr*Dr,Dr/=2;return br}else return $e*ue*We}function $m(G,ie,ue,We,Qe,ar,$e){var br={"don't care":bu,"dont care":bu,nice:Ev,fast:R5},Dr={repeat:q5,clamp:sd,mirror:Im},qr={nearest:yu,linear:Cv},Fr=e({mipmap:Es,"nearest mipmap nearest":jf,"linear mipmap nearest":Xf,"nearest mipmap linear":gu,"linear mipmap linear":Es},qr),xt={none:0,browser:Bm},ft={uint8:pu,rgba4:qm,rgb565:Av,"rgb5 a1":L5},Zr={alpha:wv,luminance:ks,"luminance alpha":Gf,rgb:Ss,rgba:Do,rgba4:td,"rgb5 a1":Hl,rgb565:du},hr={};ie.ext_srgb&&(Zr.srgb=Vl,Zr.srgba=sl),ie.oes_texture_float&&(ft.float32=ft.float=qo),ie.oes_texture_half_float&&(ft.float16=ft["half float"]=xo),ie.webgl_depth_texture&&(e(Zr,{depth:Hf,"depth stencil":Vf}),e(ft,{uint16:kv,uint32:ld,"depth stencil":ad})),ie.webgl_compressed_texture_s3tc&&e(hr,{"rgb s3tc dxt1":Tv,"rgba s3tc dxt1":Yf,"rgba s3tc dxt3":Cs,"rgba s3tc dxt5":Mv}),ie.webgl_compressed_texture_atc&&e(hr,{"rgb atc":Fm,"rgba atc explicit alpha":nd,"rgba atc interpolated alpha":Sv}),ie.webgl_compressed_texture_pvrtc&&e(hr,{"rgb pvrtc 4bppv1":Rm,"rgb pvrtc 2bppv1":Pm,"rgba pvrtc 4bppv1":id,"rgba pvrtc 2bppv1":Nm}),ie.webgl_compressed_texture_etc1&&(hr["rgb etc1"]=od);var ze=Array.prototype.slice.call(G.getParameter(E5));Object.keys(hr).forEach(function(le){var rr=hr[le];ze.indexOf(rr)>=0&&(Zr[le]=rr)});var sr=Object.keys(Zr);ue.textureFormats=sr;var Sr=[];Object.keys(Zr).forEach(function(le){var rr=Zr[le];Sr[rr]=le});var Nr=[];Object.keys(ft).forEach(function(le){var rr=ft[le];Nr[rr]=le});var wr=[];Object.keys(qr).forEach(function(le){var rr=qr[le];wr[rr]=le});var et=[];Object.keys(Fr).forEach(function(le){var rr=Fr[le];et[rr]=le});var Jr=[];Object.keys(Dr).forEach(function(le){var rr=Dr[le];Jr[rr]=le});var wt=sr.reduce(function(le,rr){var tr=Zr[rr];return tr===ks||tr===wv||tr===ks||tr===Gf||tr===Hf||tr===Vf||ie.ext_srgb&&(tr===Vl||tr===sl)?le[tr]=tr:tr===Hl||rr.indexOf("rgba")>=0?le[tr]=Do:le[tr]=Ss,le},{});function xr(){this.internalformat=Do,this.format=Do,this.type=pu,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Bm,this.width=0,this.height=0,this.channels=0}function dr(le,rr){le.internalformat=rr.internalformat,le.format=rr.format,le.type=rr.type,le.compressed=rr.compressed,le.premultiplyAlpha=rr.premultiplyAlpha,le.flipY=rr.flipY,le.unpackAlignment=rr.unpackAlignment,le.colorSpace=rr.colorSpace,le.width=rr.width,le.height=rr.height,le.channels=rr.channels}function lt(le,rr){if(!(typeof rr!="object"||!rr)){if("premultiplyAlpha"in rr&&(le.premultiplyAlpha=rr.premultiplyAlpha),"flipY"in rr&&(le.flipY=rr.flipY),"alignment"in rr&&(le.unpackAlignment=rr.alignment),"colorSpace"in rr&&(le.colorSpace=xt[rr.colorSpace]),"type"in rr){var tr=rr.type;le.type=ft[tr]}var pt=le.width,fa=le.height,Oa=le.channels,ht=!1;"shape"in rr?(pt=rr.shape[0],fa=rr.shape[1],rr.shape.length===3&&(Oa=rr.shape[2],ht=!0)):("radius"in rr&&(pt=fa=rr.radius),"width"in rr&&(pt=rr.width),"height"in rr&&(fa=rr.height),"channels"in rr&&(Oa=rr.channels,ht=!0)),le.width=pt|0,le.height=fa|0,le.channels=Oa|0;var te=!1;if("format"in rr){var fe=rr.format,_e=le.internalformat=Zr[fe];le.format=wt[_e],fe in ft&&("type"in rr||(le.type=ft[fe])),fe in hr&&(le.compressed=!0),te=!0}!ht&&te?le.channels=Xi[le.format]:ht&&!te&&le.channels!==ji[le.format]&&(le.format=le.internalformat=ji[le.channels])}}function Xr(le){G.pixelStorei(I5,le.flipY),G.pixelStorei(zm,le.premultiplyAlpha),G.pixelStorei(Zf,le.colorSpace),G.pixelStorei(N5,le.unpackAlignment)}function Hr(){xr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Vr(le,rr){var tr=null;if(fd(rr)?tr=rr:rr&&(lt(le,rr),"x"in rr&&(le.xOffset=rr.x|0),"y"in rr&&(le.yOffset=rr.y|0),fd(rr.data)&&(tr=rr.data)),rr.copy){var pt=Qe.viewportWidth,fa=Qe.viewportHeight;le.width=le.width||pt-le.xOffset,le.height=le.height||fa-le.yOffset,le.needsCopy=!0}else if(!tr)le.width=le.width||1,le.height=le.height||1,le.channels=le.channels||4;else if(Ir(tr))le.channels=le.channels||4,le.data=tr,!("type"in rr)&&le.type===pu&&(le.type=Xm(tr));else if(Vm(tr))le.channels=le.channels||4,H5(le,tr),le.alignment=1,le.needsFree=!0;else if(Gr(tr)){var Oa=tr.data;!Array.isArray(Oa)&&le.type===pu&&(le.type=Xm(Oa));var ht=tr.shape,te=tr.stride,fe,_e,er,nr,He,Be;ht.length===3?(er=ht[2],Be=te[2]):(er=1,Be=1),fe=ht[0],_e=ht[1],nr=te[0],He=te[1],le.alignment=1,le.width=fe,le.height=_e,le.channels=er,le.format=le.internalformat=ji[er],le.needsFree=!0,Jm(le,Oa,nr,He,Be,tr.offset)}else if(Wm(tr)||jm(tr)||z5(tr))Wm(tr)||jm(tr)?le.element=tr:le.element=tr.canvas,le.width=le.element.width,le.height=le.element.height,le.channels=4;else if(B5(tr))le.element=tr,le.width=tr.width,le.height=tr.height,le.channels=4;else if(U5(tr))le.element=tr,le.width=tr.naturalWidth,le.height=tr.naturalHeight,le.channels=4;else if(G5(tr))le.element=tr,le.width=tr.videoWidth,le.height=tr.videoHeight,le.channels=4;else if(Ym(tr)){var Le=le.width||tr[0].length,pe=le.height||tr.length,Se=le.channels;Gl(tr[0][0])?Se=Se||tr[0][0].length:Se=Se||1;for(var ce=oe.shape(tr),je=1,ur=0;ur>=fa,tr.height>>=fa,Vr(tr,pt[fa]),le.mipmask|=1<=0&&!("faces"in rr)&&(le.genMipmaps=!0)}if("mag"in rr){var pt=rr.mag;le.magFilter=qr[pt]}var fa=le.wrapS,Oa=le.wrapT;if("wrap"in rr){var ht=rr.wrap;typeof ht=="string"?fa=Oa=Dr[ht]:Array.isArray(ht)&&(fa=Dr[ht[0]],Oa=Dr[ht[1]])}else{if("wrapS"in rr){var te=rr.wrapS;fa=Dr[te]}if("wrapT"in rr){var fe=rr.wrapT;Oa=Dr[fe]}}if(le.wrapS=fa,le.wrapT=Oa,"anisotropic"in rr){var _e=rr.anisotropic;le.anisotropic=rr.anisotropic}if("mipmap"in rr){var er=!1;switch(typeof rr.mipmap){case"string":le.mipmapHint=br[rr.mipmap],le.genMipmaps=!0,er=!0;break;case"boolean":er=le.genMipmaps=rr.mipmap;break;case"object":le.genMipmaps=!1,er=!0;break;default:}er&&!("min"in rr)&&(le.minFilter=jf)}}function Ii(le,rr){G.texParameteri(rr,F5,le.minFilter),G.texParameteri(rr,Wf,le.magFilter),G.texParameteri(rr,mu,le.wrapS),G.texParameteri(rr,D5,le.wrapT),ie.ext_texture_filter_anisotropic&&G.texParameteri(rr,P5,le.anisotropic),le.genMipmaps&&(G.hint(Om,le.mipmapHint),G.generateMipmap(rr))}var $i=0,Vn={},Yn=ue.maxTextureUnits,ri=Array(Yn).map(function(){return null});function Yt(le){xr.call(this),this.mipmask=0,this.internalformat=Do,this.id=$i++,this.refCount=1,this.target=le,this.texture=G.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ia,$e.profile&&(this.stats={size:0})}function fi(le){G.activeTexture(Ls),G.bindTexture(le.target,le.texture)}function Ua(){var le=ri[0];le?G.bindTexture(le.target,le.texture):G.bindTexture(Pi,null)}function Oi(le){var rr=le.texture,tr=le.unit,pt=le.target;tr>=0&&(G.activeTexture(Ls+tr),G.bindTexture(pt,null),ri[tr]=null),G.deleteTexture(rr),le.texture=null,le.params=null,le.pixels=null,le.refCount=0,delete Vn[le.id],ar.textureCount--}e(Yt.prototype,{bind:function(){var le=this;le.bindCount+=1;var rr=le.unit;if(rr<0){for(var tr=0;tr0)continue;pt.unit=-1}ri[tr]=le,rr=tr;break}rr>=Yn,$e.profile&&ar.maxTextureUnits>He)-er,Be.height=Be.height||(tr.height>>He)-nr,fi(tr),At(Be,Pi,er,nr,He),Ua(),vt(Be),pt}function Oa(ht,te){var fe=ht|0,_e=te|0||fe;if(fe===tr.width&&_e===tr.height)return pt;pt.width=tr.width=fe,pt.height=tr.height=_e,fi(tr);for(var er=0;tr.mipmask>>er;++er){var nr=fe>>er,He=_e>>er;if(!nr||!He)break;G.texImage2D(Pi,er,tr.format,nr,He,0,tr.format,tr.type,null)}return Ua(),$e.profile&&(tr.stats.size=$f(tr.internalformat,tr.type,fe,_e,!1,!1)),pt}return pt(le,rr),pt.subimage=fa,pt.resize=Oa,pt._reglType="texture2d",pt._texture=tr,$e.profile&&(pt.stats=tr.stats),pt.destroy=function(){tr.decRef()},pt}function Qi(le,rr,tr,pt,fa,Oa){var ht=new Yt(hu);Vn[ht.id]=ht,ar.cubeCount++;var te=new Array(6);function fe(nr,He,Be,Le,pe,Se){var ce,je=ht.texInfo;for(Ia.call(je),ce=0;ce<6;++ce)te[ce]=na();if(typeof nr=="number"||!nr){var ur=nr|0||1;for(ce=0;ce<6;++ce)Pt(te[ce],ur,ur)}else if(typeof nr=="object")if(He)$t(te[0],nr),$t(te[1],He),$t(te[2],Be),$t(te[3],Le),$t(te[4],pe),$t(te[5],Se);else if(Si(je,nr),lt(ht,nr),"faces"in nr){var Er=nr.faces;for(ce=0;ce<6;++ce)dr(te[ce],ht),$t(te[ce],Er[ce])}else for(ce=0;ce<6;++ce)$t(te[ce],nr);for(dr(ht,te[0]),je.genMipmaps?ht.mipmask=(te[0].width<<1)-1:ht.mipmask=te[0].mipmask,ht.internalformat=te[0].internalformat,fe.width=te[0].width,fe.height=te[0].height,fi(ht),ce=0;ce<6;++ce)vn(te[ce],Ms+ce);for(Ii(je,hu),Ua(),$e.profile&&(ht.stats.size=$f(ht.internalformat,ht.type,fe.width,fe.height,je.genMipmaps,!0)),fe.format=Sr[ht.internalformat],fe.type=Nr[ht.type],fe.mag=wr[je.magFilter],fe.min=et[je.minFilter],fe.wrapS=Jr[je.wrapS],fe.wrapT=Jr[je.wrapT],ce=0;ce<6;++ce)Ji(te[ce]);return fe}function _e(nr,He,Be,Le,pe){var Se=Be|0,ce=Le|0,je=pe|0,ur=Kr();return dr(ur,ht),ur.width=0,ur.height=0,Vr(ur,He),ur.width=ur.width||(ht.width>>je)-Se,ur.height=ur.height||(ht.height>>je)-ce,fi(ht),At(ur,Ms+nr,Se,ce,je),Ua(),vt(ur),fe}function er(nr){var He=nr|0;if(He!==ht.width){fe.width=ht.width=He,fe.height=ht.height=He,fi(ht);for(var Be=0;Be<6;++Be)for(var Le=0;ht.mipmask>>Le;++Le)G.texImage2D(Ms+Be,Le,ht.format,He>>Le,He>>Le,0,ht.format,ht.type,null);return Ua(),$e.profile&&(ht.stats.size=$f(ht.internalformat,ht.type,fe.width,fe.height,!1,!0)),fe}}return fe(le,rr,tr,pt,fa,Oa),fe.subimage=_e,fe.resize=er,fe._reglType="textureCube",fe._texture=ht,$e.profile&&(fe.stats=ht.stats),fe.destroy=function(){ht.decRef()},fe}function Gt(){for(var le=0;le>pt,tr.height>>pt,0,tr.internalformat,tr.type,null);else for(var fa=0;fa<6;++fa)G.texImage2D(Ms+fa,pt,tr.internalformat,tr.width>>pt,tr.height>>pt,0,tr.internalformat,tr.type,null);Ii(tr.texInfo,tr.target)})}function Za(){for(var le=0;le=0?Ji=!0:Dr.indexOf(Ia)>=0&&(Ji=!1))),("depthTexture"in Yt||"depthStencilTexture"in Yt)&&(ri=!!(Yt.depthTexture||Yt.depthStencilTexture)),"depth"in Yt&&(typeof Yt.depth=="boolean"?vn=Yt.depth:($i=Yt.depth,ei=!1)),"stencil"in Yt&&(typeof Yt.stencil=="boolean"?ei=Yt.stencil:(Vn=Yt.stencil,vn=!1)),"depthStencil"in Yt&&(typeof Yt.depthStencil=="boolean"?vn=ei=Yt.depthStencil:(Yn=Yt.depthStencil,vn=!1,ei=!1))}var Ua=null,Oi=null,Ki=null,Qi=null;if(Array.isArray(na))Ua=na.map(hr);else if(na)Ua=[hr(na)];else for(Ua=new Array(Ii),Rt=0;Rt0&&(vt.depth=Vr[0].depth,vt.stencil=Vr[0].stencil,vt.depthStencil=Vr[0].depthStencil),Vr[Kr]?Vr[Kr](vt):Vr[Kr]=dr(vt)}return e(st,{width:Rt,height:Rt,color:Ia})}function At(zt){var Kr,vt=zt|0;if(vt===st.width)return st;var Rt=st.color;for(Kr=0;Kr=Rt.byteLength?Pt.subdata(Rt):(Pt.destroy(),dr.buffers[zt]=null)),dr.buffers[zt]||(Pt=dr.buffers[zt]=Qe.create(Kr,uy,!1,!0)),vt.buffer=Qe.getBuffer(Pt),vt.size=vt.buffer.dimension|0,vt.normalized=!1,vt.type=vt.buffer.dtype,vt.offset=0,vt.stride=0,vt.divisor=0,vt.state=1,st[zt]=1}else Qe.getBuffer(Kr)?(vt.buffer=Qe.getBuffer(Kr),vt.size=vt.buffer.dimension|0,vt.normalized=!1,vt.type=vt.buffer.dtype,vt.offset=0,vt.stride=0,vt.divisor=0,vt.state=1):Qe.getBuffer(Kr.buffer)?(vt.buffer=Qe.getBuffer(Kr.buffer),vt.size=(+Kr.size||vt.buffer.dimension)|0,vt.normalized=!!Kr.normalized||!1,"type"in Kr?vt.type=Bn[Kr.type]:vt.type=vt.buffer.dtype,vt.offset=(Kr.offset||0)|0,vt.stride=(Kr.stride||0)|0,vt.divisor=(Kr.divisor||0)|0,vt.state=1):"x"in Kr&&(vt.x=+Kr.x||0,vt.y=+Kr.y||0,vt.z=+Kr.z||0,vt.w=+Kr.w||0,vt.state=2)}for(var $t=0;$t1)for(var Xr=0;Xrze&&(ze=sr.stats.uniformsCount)}),ze},ue.getMaxAttributesCount=function(){var ze=0;return Fr.forEach(function(sr){sr.stats.attributesCount>ze&&(ze=sr.stats.attributesCount)}),ze});function hr(){Qe={},ar={};for(var ze=0;ze16&&(ue=wu(ue,G.length*8));for(var We=Array(16),Qe=Array(16),ar=0;ar<16;ar++)We[ar]=ue[ar]^909522486,Qe[ar]=ue[ar]^1549556828;var $e=wu(We.concat(bd(ie)),512+ie.length*8);return gy(wu(Qe.concat($e),768))}function py(G){for(var ie=hy?"0123456789ABCDEF":"0123456789abcdef",ue="",We,Qe=0;Qe>>4&15)+ie.charAt(We&15);return ue}function my(G){for(var ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue="",We=G.length,Qe=0;QeG.length*8?ue+=r_:ue+=ie.charAt(ar>>>6*(3-$e)&63);return ue}function yy(G,ie){var ue=ie.length,We=Array(),Qe,ar,$e,br,Dr=Array(Math.ceil(G.length/2));for(Qe=0;Qe0;){for(br=Array(),$e=0,Qe=0;Qe0||ar>0)&&(br[br.length]=ar);We[We.length]=$e,Dr=br}var qr="";for(Qe=We.length-1;Qe>=0;Qe--)qr+=ie.charAt(We[Qe]);var Fr=Math.ceil(G.length*8/(Math.log(ie.length)/Math.log(2)));for(Qe=qr.length;Qe>>6&31,128|We&63):We<=65535?ie+=String.fromCharCode(224|We>>>12&15,128|We>>>6&63,128|We&63):We<=2097151&&(ie+=String.fromCharCode(240|We>>>18&7,128|We>>>12&63,128|We>>>6&63,128|We&63));return ie}function bd(G){for(var ie=Array(G.length>>2),ue=0;ue>5]|=(G.charCodeAt(ue/8)&255)<<24-ue%32;return ie}function gy(G){for(var ie="",ue=0;ue>5]>>>24-ue%32&255);return ie}function Ro(G,ie){return G>>>ie|G<<32-ie}function by(G,ie){return G>>>ie}function xy(G,ie,ue){return G&ie^~G&ue}function _y(G,ie,ue){return G&ie^G&ue^ie&ue}function xd(G){return Ro(G,2)^Ro(G,13)^Ro(G,22)}function wy(G){return Ro(G,6)^Ro(G,11)^Ro(G,25)}function Pv(G){return Ro(G,7)^Ro(G,18)^by(G,3)}function Nv(G){return Ro(G,17)^Ro(G,19)^by(G,10)}var i_=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 wu(G,ie){var ue=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),We=new Array(64),Qe,ar,$e,br,Dr,qr,Fr,xt,ft,Zr,hr,ze;for(G[ie>>5]|=128<<24-ie%32,G[(ie+64>>9<<4)+15]=ie,ft=0;ft>16)+(ie>>16)+(ue>>16);return We<<16|ue&65535}function Au(G){return Array.prototype.slice.call(G)}function Tu(G){return Au(G).join("")}function Ay(G){var ie=G&&G.cache,ue=0,We=[],Qe=[],ar=[];function $e(hr,ze){var sr=ze&&ze.stable;if(!sr){for(var Sr=0;Sr0&&(hr.push(Nr,"="),hr.push.apply(hr,Au(arguments)),hr.push(";")),Nr}return e(ze,{def:Sr,toString:function(){return Tu([sr.length>0?"var "+sr.join(",")+";":"",Tu(hr)])}})}function Dr(){var hr=br(),ze=br(),sr=hr.toString,Sr=ze.toString;function Nr(wr,et){ze(wr,et,"=",hr.def(wr,et),";")}return e(function(){hr.apply(hr,Au(arguments))},{def:hr.def,entry:hr,exit:ze,save:Nr,set:function(wr,et,Jr){Nr(wr,et),hr(wr,et,"=",Jr,";")},toString:function(){return sr()+Sr()}})}function qr(){var hr=Tu(arguments),ze=Dr(),sr=Dr(),Sr=ze.toString,Nr=sr.toString;return e(ze,{then:function(){return ze.apply(ze,Au(arguments)),this},else:function(){return sr.apply(sr,Au(arguments)),this},toString:function(){var wr=Nr();return wr&&(wr="else{"+wr+"}"),Tu(["if(",hr,"){",Sr(),"}",wr])}})}var Fr=br(),xt={};function ft(hr,ze){var sr=[];function Sr(){var wt="a"+sr.length;return sr.push(wt),wt}ze=ze||0;for(var Nr=0;Nr[x.viewport.x,x.viewport.y,m.viewportWidth,m.viewportHeight]},attributes:{color:{buffer:o,offset:(m,x)=>x.offset*4,divisor:1},position:{buffer:n,offset:(m,x)=>x.offset*8,divisor:1},positionFract:{buffer:i,offset:(m,x)=>x.offset*8,divisor:1},error:{buffer:l,offset:(m,x)=>x.offset*16,divisor:1},direction:{buffer:s,stride:24,offset:0},lineOffset:{buffer:s,stride:24,offset:8},capOffset:{buffer:s,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:oQ.length}),nQ(c,{update:p,draw:h,destroy:g,regl:e,gl:t,canvas:t.canvas,groups:f}),c;function c(m){m?p(m):m===null&&g(),h()}function h(m){if(typeof m=="number")return d(m);m&&!Array.isArray(m)&&(m=[m]),e._refresh(),f.forEach((x,_)=>{if(x){if(m&&(m[_]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}d(_)}})}function d(m){typeof m=="number"&&(m=f[m]),m!=null&&m&&m.count&&m.color&&m.opacity&&m.positions&&m.positions.length>1&&(m.scaleRatio=[m.scale[0]*m.viewport.width,m.scale[1]*m.viewport.height],a(m),m.after&&m.after(m))}function p(m){if(!m)return;m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);let x=0,_=0;if(c.groups=f=m.map((T,S)=>{let M=f[S];if(T)typeof T=="function"?T={after:T}:typeof T[0]=="number"&&(T={positions:T});else return M;return T=l8e(T,{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"}),M||(f[S]=M={id:S,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},T=nQ({},u,T)),o8e(M,T,[{lineWidth:k=>+k*.5,capSize:k=>+k*.5,opacity:parseFloat,errors:k=>(k=iQ(k),_+=k.length,k),positions:(k,D)=>(k=iQ(k,"float64"),D.count=Math.floor(k.length/2),D.bounds=n8e(k,2),D.offset=x,x+=D.count,k)},{color:(k,D)=>{let P=D.count;if(k||(k="transparent"),!Array.isArray(k)||typeof k[0]=="number"){let q=k;k=Array(P);for(let O=0;O{let N=D.bounds;return k||(k=N),D.scale=[1/(k[2]-k[0]),1/(k[3]-k[1])],D.translate=[-k[0],-k[1]],D.scaleFract=ET(D.scale),D.translateFract=ET(D.translate),k},viewport:k=>{let D;return Array.isArray(k)?D={x:k[0],y:k[1],width:k[2]-k[0],height:k[3]-k[1]}:k?(D={x:k.x||k.left||0,y:k.y||k.top||0},k.right?D.width=k.right-D.x:D.width=k.w||k.width||0,k.bottom?D.height=k.bottom-D.y:D.height=k.h||k.height||0):D={x:0,y:0,width:t.drawingBufferWidth,height:t.drawingBufferHeight},D}}]),M}),x||_){let T=f.reduce((D,P,N)=>D+(P?P.count:0),0),S=new Float64Array(T*2),M=new Uint8Array(T*4),k=new Float32Array(T*4);f.forEach((D,P)=>{if(!D)return;let{positions:N,count:q,offset:O,color:U,errors:$}=D;q&&(M.set(U,O*4),k.set($,O*4),S.set(N,O*2))});var A=s8e(S);n(A);var b=ET(S,A);i(b),o(M),l(k)}}function g(){n.destroy(),i.destroy(),o.destroy(),l.destroy(),s.destroy()}}});var cQ=R((_Pe,fQ)=>{var uQ=/[\'\"]/;fQ.exports=function(r){return r?(uQ.test(r.charAt(0))&&(r=r.substr(1)),uQ.test(r.charAt(r.length-1))&&(r=r.substr(0,r.length-1)),r):""}});var LT=R(()=>{});var DT=R(()=>{});var qT=R(()=>{});var FT=R(()=>{});var RT=R(()=>{});var pQ=R((qPe,dQ)=>{"use strict";function vQ(e,r){if(typeof e!="string")return[e];var t=[e];typeof r=="string"||Array.isArray(r)?r={brackets:r}:r||(r={});var a=r.brackets?Array.isArray(r.brackets)?r.brackets:[r.brackets]:["{}","[]","()"],n=r.escape||"___",i=!!r.flat;a.forEach(function(s){var u=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),f=[];function c(h,d,p){var g=t.push(h.slice(s[0].length,-s[1].length))-1;return f.push(g),n+g+n}t.forEach(function(h,d){for(var p,g=0;h!=p;)if(p=h,h=h.replace(u,c),g++>1e4)throw Error("References have circular dependency. Please, check them.");t[d]=h}),f=f.reverse(),t=t.map(function(h){return f.forEach(function(d){h=h.replace(new RegExp("(\\"+n+d+"\\"+n+")","g"),s[0]+"$1"+s[1])}),h})});var o=new RegExp("\\"+n+"([0-9]+)\\"+n);function l(s,u,f){for(var c=[],h,d=0;h=o.exec(s);){if(d++>1e4)throw Error("Circular references in parenthesis");c.push(s.slice(0,h.index)),c.push(l(u[h[1]],u)),s=s.slice(h.index+h[0].length)}return c.push(s),c}return i?t:l(t[0],t)}function hQ(e,r){if(r&&r.flat){var t=r&&r.escape||"___",a=e[0],n;if(!a)return"";for(var i=new RegExp("\\"+t+"([0-9]+)\\"+t),o=0;a!=n;){if(o++>1e4)throw Error("Circular references in "+e);n=a,a=a.replace(i,l)}return a}return e.reduce(function s(u,f){return Array.isArray(f)&&(f=f.reduce(s,"")),u+f},"");function l(s,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function PT(e,r){return Array.isArray(e)?hQ(e,r):vQ(e,r)}PT.parse=vQ;PT.stringify=hQ;dQ.exports=PT});var gQ=R((FPe,yQ)=>{"use strict";var mQ=pQ();yQ.exports=function(r,t,a){if(r==null)throw Error("First argument should be a string");if(t==null)throw Error("Separator should be a string or a RegExp");a?(typeof a=="string"||Array.isArray(a))&&(a={ignore:a}):a={},a.escape==null&&(a.escape=!0),a.ignore==null?a.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof a.ignore=="string"&&(a.ignore=[a.ignore]),a.ignore=a.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var n=mQ.parse(r,{flat:!0,brackets:a.ignore}),i=n[0],o=i.split(t);if(a.escape){for(var l=[],s=0;s{});var NT=R((NPe,xQ)=>{"use strict";var f8e=bQ();xQ.exports={isSize:function(r){return/^[\d\.]/.test(r)||r.indexOf("/")!==-1||f8e.indexOf(r)!==-1}}});var TQ=R((IPe,AQ)=>{"use strict";var c8e=cQ(),v8e=LT(),h8e=DT(),d8e=qT(),p8e=FT(),m8e=RT(),IT=gQ(),y8e=NT().isSize;AQ.exports=wQ;var pm=wQ.cache={};function wQ(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(pm[e])return pm[e];if(e==="")throw new Error("Cannot parse an empty string.");if(h8e.indexOf(e)!==-1)return pm[e]={system:e};for(var r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},t=IT(e,/\s+/),a;a=t.shift();){if(v8e.indexOf(a)!==-1)return["style","variant","weight","stretch"].forEach(function(i){r[i]=a}),pm[e]=r;if(p8e.indexOf(a)!==-1){r.style=a;continue}if(a==="normal"||a==="small-caps"){r.variant=a;continue}if(m8e.indexOf(a)!==-1){r.stretch=a;continue}if(d8e.indexOf(a)!==-1){r.weight=a;continue}if(y8e(a)){var n=IT(a,"/");if(r.size=n[0],n[1]!=null?r.lineHeight=_Q(n[1]):t[0]==="/"&&(t.shift(),r.lineHeight=_Q(t.shift())),!t.length)throw new Error("Missing required font-family.");return r.family=IT(t.join(" "),/\s*,\s*/).map(c8e),pm[e]=r}throw new Error("Unknown or unsupported font token: "+a)}throw new Error("Missing required font-size.")}function _Q(e){var r=parseFloat(e);return r.toString()===e?r:e}});var zT=R((OPe,MQ)=>{"use strict";var g8e=hs(),b8e=NT().isSize,x8e=ym(LT()),_8e=ym(DT()),w8e=ym(qT()),A8e=ym(FT()),T8e=ym(RT()),M8e={normal:1,"small-caps":1},S8e={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},OT={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};MQ.exports=function(r){if(r=g8e(r,{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"}),r.system)return r.system&&mm(r.system,_8e),r.system;if(mm(r.style,A8e),mm(r.variant,M8e),mm(r.weight,w8e),mm(r.stretch,T8e),r.size==null&&(r.size=OT.size),typeof r.size=="number"&&(r.size+="px"),!b8e)throw Error("Bad size value `"+r.size+"`");r.family||(r.family=OT.family),Array.isArray(r.family)&&(r.family.length||(r.family=[OT.family]),r.family=r.family.map(function(a){return S8e[a]?a:'"'+a+'"'}).join(", "));var t=[];return t.push(r.style),r.variant!==r.style&&t.push(r.variant),r.weight!==r.variant&&r.weight!==r.style&&t.push(r.weight),r.stretch!==r.weight&&r.stretch!==r.variant&&r.stretch!==r.style&&t.push(r.stretch),t.push(r.size+(r.lineHeight==null||r.lineHeight==="normal"||r.lineHeight+""=="1"?"":"/"+r.lineHeight)),t.push(r.family),t.filter(Boolean).join(" ")};function mm(e,r){if(e&&!r[e]&&!x8e[e])throw Error("Unknown keyword `"+e+"`");return e}function ym(e){for(var r={},t=0;t{"use strict";SQ.exports={parse:TQ(),stringify:zT()}});var GT=R((BT,UT)=>{(function(e,r){typeof BT=="object"&&typeof UT!="undefined"?UT.exports=r():typeof define=="function"&&define.amd?define(r):e.createREGL=r()})(BT,function(){"use strict";var e=function(G,ie){for(var ue=Object.keys(ie),We=0;We1&&ie===ue&&(ie==='"'||ie==="'"))return['"'+o(G.substr(1,G.length-2))+'"'];var We=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(G);if(We)return l(G.substr(0,We.index)).concat(l(We[1])).concat(l(G.substr(We.index+We[0].length)));var Qe=G.split(".");if(Qe.length===1)return['"'+o(G)+'"'];for(var ar=[],$e=0;$e65535)<<4,G>>>=ie,ue=(G>255)<<3,G>>>=ue,ie|=ue,ue=(G>15)<<2,G>>>=ue,ie|=ue,ue=(G>3)<<1,G>>>=ue,ie|=ue,ie|G>>1}function B(){var G=k(8,function(){return[]});function ie(ar){var $e=W(ar),br=G[H($e)>>2];return br.length>0?br.pop():new ArrayBuffer($e)}function ue(ar){G[H(ar.byteLength)>>2].push(ar)}function We(ar,$e){var br=null;switch(ar){case D:br=new Int8Array(ie($e),0,$e);break;case P:br=new Uint8Array(ie($e),0,$e);break;case N:br=new Int16Array(ie(2*$e),0,$e);break;case q:br=new Uint16Array(ie(2*$e),0,$e);break;case O:br=new Int32Array(ie(4*$e),0,$e);break;case U:br=new Uint32Array(ie(4*$e),0,$e);break;case $:br=new Float32Array(ie(4*$e),0,$e);break;default:return null}return br.length!==$e?br.subarray(0,$e):br}function Qe(ar){ue(ar.buffer)}return{alloc:ie,free:ue,allocType:We,freeType:Qe}}var V=B();V.zero=B();var j=3408,K=3410,ve=3411,xe=3412,se=3413,be=3414,re=3415,ke=33901,ge=33902,Ee=3379,De=3386,Ce=34921,Y=36347,ae=36348,Z=35661,Te=35660,Pe=34930,Ne=36349,lr=34076,Ke=34024,Je=7936,or=7937,yr=7938,ir=35724,Xe=34047,Lr=36063,Ar=34852,de=3553,Oe=34067,Ue=34069,rt=33984,Ur=6408,Ye=5126,Ve=5121,pr=36160,Tr=36053,mr=36064,vr=16384,Cr=function(G,ie){var ue=1;ie.ext_texture_filter_anisotropic&&(ue=G.getParameter(Xe));var We=1,Qe=1;ie.webgl_draw_buffers&&(We=G.getParameter(Ar),Qe=G.getParameter(Lr));var ar=!!ie.oes_texture_float;if(ar){var $e=G.createTexture();G.bindTexture(de,$e),G.texImage2D(de,0,Ur,1,1,0,Ur,Ye,null);var br=G.createFramebuffer();if(G.bindFramebuffer(pr,br),G.framebufferTexture2D(pr,mr,de,$e,0),G.bindTexture(de,null),G.checkFramebufferStatus(pr)!==Tr)ar=!1;else{G.viewport(0,0,1,1),G.clearColor(1,0,0,1),G.clear(vr);var Dr=V.allocType(Ye,4);G.readPixels(0,0,1,1,Ur,Ye,Dr),G.getError()?ar=!1:(G.deleteFramebuffer(br),G.deleteTexture($e),ar=Dr[0]===1),V.freeType(Dr)}}var qr=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Fr=!0;if(!qr){var xt=G.createTexture(),ft=V.allocType(Ve,36);G.activeTexture(rt),G.bindTexture(Oe,xt),G.texImage2D(Ue,0,Ur,3,3,0,Ur,Ve,ft),V.freeType(ft),G.bindTexture(Oe,null),G.deleteTexture(xt),Fr=!G.getError()}return{colorBits:[G.getParameter(K),G.getParameter(ve),G.getParameter(xe),G.getParameter(se)],depthBits:G.getParameter(be),stencilBits:G.getParameter(re),subpixelBits:G.getParameter(j),extensions:Object.keys(ie).filter(function(Zr){return!!ie[Zr]}),maxAnisotropic:ue,maxDrawbuffers:We,maxColorAttachments:Qe,pointSizeDims:G.getParameter(ke),lineWidthDims:G.getParameter(ge),maxViewportDims:G.getParameter(De),maxCombinedTextureUnits:G.getParameter(Z),maxCubeMapSize:G.getParameter(lr),maxRenderbufferSize:G.getParameter(Ke),maxTextureUnits:G.getParameter(Pe),maxTextureSize:G.getParameter(Ee),maxAttributes:G.getParameter(Ce),maxVertexUniforms:G.getParameter(Y),maxVertexTextureUnits:G.getParameter(Te),maxVaryingVectors:G.getParameter(ae),maxFragmentUniforms:G.getParameter(Ne),glsl:G.getParameter(ir),renderer:G.getParameter(or),vendor:G.getParameter(Je),version:G.getParameter(yr),readFloat:ar,npotTextureCube:Fr}},Ir=function(G){return G instanceof Uint8Array||G instanceof Uint16Array||G instanceof Uint32Array||G instanceof Int8Array||G instanceof Int16Array||G instanceof Int32Array||G instanceof Float32Array||G instanceof Float64Array||G instanceof Uint8ClampedArray};function Gr(G){return!!G&&typeof G=="object"&&Array.isArray(G.shape)&&Array.isArray(G.stride)&&typeof G.offset=="number"&&G.shape.length===G.stride.length&&(Array.isArray(G.data)||Ir(G.data))}var Ze=function(G){return Object.keys(G).map(function(ie){return G[ie]})},oe={shape:$r,flatten:tt};function ye(G,ie,ue){for(var We=0;We0){var wt;if(Array.isArray(sr[0])){Jr=ra(sr);for(var xr=1,dr=1;dr0){if(typeof xr[0]=="number"){var Hr=V.allocType(wr.dtype,xr.length);Yi(Hr,xr),Jr(Hr,lt),V.freeType(Hr)}else if(Array.isArray(xr[0])||Ir(xr[0])){Xr=ra(xr);var Vr=Ma(xr,Xr,wr.dtype);Jr(Vr,lt),V.freeType(Vr)}}}else if(Gr(xr)){Xr=xr.shape;var st=xr.stride,At=0,zt=0,Kr=0,vt=0;Xr.length===1?(At=Xr[0],zt=1,Kr=st[0],vt=0):Xr.length===2&&(At=Xr[0],zt=Xr[1],Kr=st[0],vt=st[1]);var Rt=Array.isArray(xr.data)?wr.dtype:on(xr.data),Pt=V.allocType(Rt,At*zt);Wi(Pt,xr.data,At,zt,Kr,vt,xr.offset),Jr(Pt,lt),V.freeType(Pt)}return et}return Sr||et(ze),et._reglType="buffer",et._buffer=wr,et.subdata=wt,ue.profile&&(et.stats=wr.stats),et.destroy=function(){ft(wr)},et}function hr(){Ze(ar).forEach(function(ze){ze.buffer=G.createBuffer(),G.bindBuffer(ze.type,ze.buffer),G.bufferData(ze.type,ze.persistentData||ze.byteLength,ze.usage)})}return ue.profile&&(ie.getTotalBufferSize=function(){var ze=0;return Object.keys(ar).forEach(function(sr){ze+=ar[sr].stats.size}),ze}),{create:Zr,createStream:Dr,destroyStream:qr,clear:function(){Ze(ar).forEach(ft),br.forEach(ft)},getBuffer:function(ze){return ze&&ze._buffer instanceof $e?ze._buffer:null},restore:hr,_initBuffer:xt}}var Aa=0,Un=0,_s=1,ws=1,Bl=4,_v=4,As={points:Aa,point:Un,lines:_s,line:ws,triangles:Bl,triangle:_v,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Bf=0,Uf=1,ol=4,ui=5120,ll=5121,Ts=5122,go=5123,yt=5124,jt=5125,va=34963,jr=35040,Gn=35044;function Ea(G,ie,ue,We){var Qe={},ar=0,$e={uint8:ll,uint16:go};ie.oes_element_index_uint&&($e.uint32=jt);function br(hr){this.id=ar++,Qe[this.id]=this,this.buffer=hr,this.primType=ol,this.vertCount=0,this.type=0}br.prototype.bind=function(){this.buffer.bind()};var Dr=[];function qr(hr){var ze=Dr.pop();return ze||(ze=new br(ue.create(null,va,!0,!1)._buffer)),xt(ze,hr,jr,-1,-1,0,0),ze}function Fr(hr){Dr.push(hr)}function xt(hr,ze,sr,Sr,Nr,wr,et){hr.buffer.bind();var Jr;if(ze){var wt=et;!et&&(!Ir(ze)||Gr(ze)&&!Ir(ze.data))&&(wt=ie.oes_element_index_uint?jt:go),ue._initBuffer(hr.buffer,ze,sr,wt,3)}else G.bufferData(va,wr,sr),hr.buffer.dtype=Jr||ll,hr.buffer.usage=sr,hr.buffer.dimension=3,hr.buffer.byteLength=wr;if(Jr=et,!et){switch(hr.buffer.dtype){case ll:case ui:Jr=ll;break;case go:case Ts:Jr=go;break;case jt:case yt:Jr=jt;break;default:}hr.buffer.dtype=Jr}hr.type=Jr;var xr=Nr;xr<0&&(xr=hr.buffer.byteLength,Jr===go?xr>>=1:Jr===jt&&(xr>>=2)),hr.vertCount=xr;var dr=Sr;if(Sr<0){dr=ol;var lt=hr.buffer.dimension;lt===1&&(dr=Bf),lt===2&&(dr=Uf),lt===3&&(dr=ol)}hr.primType=dr}function ft(hr){We.elementsCount--,delete Qe[hr.id],hr.buffer.destroy(),hr.buffer=null}function Zr(hr,ze){var sr=ue.create(null,va,!0),Sr=new br(sr._buffer);We.elementsCount++;function Nr(wr){if(!wr)sr(),Sr.primType=ol,Sr.vertCount=0,Sr.type=ll;else if(typeof wr=="number")sr(wr),Sr.primType=ol,Sr.vertCount=wr|0,Sr.type=ll;else{var et=null,Jr=Gn,wt=-1,xr=-1,dr=0,lt=0;Array.isArray(wr)||Ir(wr)||Gr(wr)?et=wr:("data"in wr&&(et=wr.data),"usage"in wr&&(Jr=_t[wr.usage]),"primitive"in wr&&(wt=As[wr.primitive]),"count"in wr&&(xr=wr.count|0),"type"in wr&&(lt=$e[wr.type]),"length"in wr?dr=wr.length|0:(dr=xr,lt===go||lt===Ts?dr*=2:(lt===jt||lt===yt)&&(dr*=4))),xt(Sr,et,Jr,wt,xr,dr,lt)}return Nr}return Nr(hr),Nr._reglType="elements",Nr._elements=Sr,Nr.subdata=function(wr,et){return sr.subdata(wr,et),Nr},Nr.destroy=function(){ft(Sr)},Nr}return{create:Zr,createStream:qr,destroyStream:Fr,getElements:function(hr){return typeof hr=="function"&&hr._elements instanceof br?hr._elements:null},clear:function(){Ze(Qe).forEach(ft)}}}var Fn=new Float32Array(1),Vt=new Uint32Array(Fn.buffer),bo=5123;function Ul(G){for(var ie=V.allocType(bo,G.length),ue=0;ue>>31<<15,ar=(We<<1>>>24)-127,$e=We>>13&1023;if(ar<-24)ie[ue]=Qe;else if(ar<-14){var br=-14-ar;ie[ue]=Qe+($e+1024>>br)}else ar>15?ie[ue]=Qe+31744:ie[ue]=Qe+(ar+15<<10)+$e}return ie}function Gl(G){return Array.isArray(G)||Ir(G)}var E5=34467,Pi=3553,hu=34067,Ms=34069,Do=6408,wv=6406,Ss=6407,ks=6409,Gf=6410,td=32854,Hl=32855,du=36194,qm=32819,L5=32820,Av=33635,ad=34042,Hf=6402,Vf=34041,Vl=35904,sl=35906,xo=36193,Tv=33776,Yf=33777,Cs=33778,Mv=33779,Fm=35986,nd=35987,Sv=34798,Rm=35840,Pm=35841,id=35842,Nm=35843,od=36196,pu=5121,kv=5123,ld=5125,qo=5126,mu=10242,D5=10243,q5=10497,sd=33071,Im=33648,Wf=10240,F5=10241,yu=9728,Cv=9729,jf=9984,Xf=9985,gu=9986,Es=9987,Om=33170,bu=4352,R5=4353,Ev=4354,P5=34046,N5=3317,I5=37440,zm=37441,Zf=37443,Bm=37444,Ls=33984,Um=[jf,gu,Xf,Es],ji=[0,ks,Gf,Ss,Do],Xi={};Xi[ks]=Xi[wv]=Xi[Hf]=1,Xi[Vf]=Xi[Gf]=2,Xi[Ss]=Xi[Vl]=3,Xi[Do]=Xi[sl]=4;function Yl(G){return"[object "+G+"]"}var Lv=Yl("HTMLCanvasElement"),Wl=Yl("OffscreenCanvas"),Jf=Yl("CanvasRenderingContext2D"),ud=Yl("ImageBitmap"),Gm=Yl("HTMLImageElement"),Hm=Yl("HTMLVideoElement"),O5=Object.keys(St).concat([Lv,Wl,Jf,ud,Gm,Hm]),Ds=[];Ds[pu]=1,Ds[qo]=4,Ds[xo]=2,Ds[kv]=2,Ds[ld]=4;var Rn=[];Rn[td]=2,Rn[Hl]=2,Rn[du]=2,Rn[Vf]=4,Rn[Tv]=.5,Rn[Yf]=.5,Rn[Cs]=1,Rn[Mv]=1,Rn[Fm]=.5,Rn[nd]=1,Rn[Sv]=1,Rn[Rm]=.5,Rn[Pm]=.25,Rn[id]=.5,Rn[Nm]=.25,Rn[od]=.5;function Vm(G){return Array.isArray(G)&&(G.length===0||typeof G[0]=="number")}function Ym(G){if(!Array.isArray(G))return!1;var ie=G.length;return!(ie===0||!Gl(G[0]))}function qs(G){return Object.prototype.toString.call(G)}function Wm(G){return qs(G)===Lv}function jm(G){return qs(G)===Wl}function z5(G){return qs(G)===Jf}function B5(G){return qs(G)===ud}function U5(G){return qs(G)===Gm}function G5(G){return qs(G)===Hm}function fd(G){if(!G)return!1;var ie=qs(G);return O5.indexOf(ie)>=0?!0:Vm(G)||Ym(G)||Gr(G)}function Xm(G){return St[Object.prototype.toString.call(G)]|0}function H5(G,ie){var ue=ie.length;switch(G.type){case pu:case kv:case ld:case qo:var We=V.allocType(G.type,ue);We.set(ie),G.data=We;break;case xo:G.data=Ul(ie);break;default:}}function Zm(G,ie){return V.allocType(G.type===xo?qo:G.type,ie)}function cd(G,ie){G.type===xo?(G.data=Ul(ie),V.freeType(ie)):G.data=ie}function Jm(G,ie,ue,We,Qe,ar){for(var $e=G.width,br=G.height,Dr=G.channels,qr=$e*br*Dr,Fr=Zm(G,qr),xt=0,ft=0;ft=1;)br+=$e*Dr*Dr,Dr/=2;return br}else return $e*ue*We}function $m(G,ie,ue,We,Qe,ar,$e){var br={"don't care":bu,"dont care":bu,nice:Ev,fast:R5},Dr={repeat:q5,clamp:sd,mirror:Im},qr={nearest:yu,linear:Cv},Fr=e({mipmap:Es,"nearest mipmap nearest":jf,"linear mipmap nearest":Xf,"nearest mipmap linear":gu,"linear mipmap linear":Es},qr),xt={none:0,browser:Bm},ft={uint8:pu,rgba4:qm,rgb565:Av,"rgb5 a1":L5},Zr={alpha:wv,luminance:ks,"luminance alpha":Gf,rgb:Ss,rgba:Do,rgba4:td,"rgb5 a1":Hl,rgb565:du},hr={};ie.ext_srgb&&(Zr.srgb=Vl,Zr.srgba=sl),ie.oes_texture_float&&(ft.float32=ft.float=qo),ie.oes_texture_half_float&&(ft.float16=ft["half float"]=xo),ie.webgl_depth_texture&&(e(Zr,{depth:Hf,"depth stencil":Vf}),e(ft,{uint16:kv,uint32:ld,"depth stencil":ad})),ie.webgl_compressed_texture_s3tc&&e(hr,{"rgb s3tc dxt1":Tv,"rgba s3tc dxt1":Yf,"rgba s3tc dxt3":Cs,"rgba s3tc dxt5":Mv}),ie.webgl_compressed_texture_atc&&e(hr,{"rgb atc":Fm,"rgba atc explicit alpha":nd,"rgba atc interpolated alpha":Sv}),ie.webgl_compressed_texture_pvrtc&&e(hr,{"rgb pvrtc 4bppv1":Rm,"rgb pvrtc 2bppv1":Pm,"rgba pvrtc 4bppv1":id,"rgba pvrtc 2bppv1":Nm}),ie.webgl_compressed_texture_etc1&&(hr["rgb etc1"]=od);var ze=Array.prototype.slice.call(G.getParameter(E5));Object.keys(hr).forEach(function(le){var rr=hr[le];ze.indexOf(rr)>=0&&(Zr[le]=rr)});var sr=Object.keys(Zr);ue.textureFormats=sr;var Sr=[];Object.keys(Zr).forEach(function(le){var rr=Zr[le];Sr[rr]=le});var Nr=[];Object.keys(ft).forEach(function(le){var rr=ft[le];Nr[rr]=le});var wr=[];Object.keys(qr).forEach(function(le){var rr=qr[le];wr[rr]=le});var et=[];Object.keys(Fr).forEach(function(le){var rr=Fr[le];et[rr]=le});var Jr=[];Object.keys(Dr).forEach(function(le){var rr=Dr[le];Jr[rr]=le});var wt=sr.reduce(function(le,rr){var tr=Zr[rr];return tr===ks||tr===wv||tr===ks||tr===Gf||tr===Hf||tr===Vf||ie.ext_srgb&&(tr===Vl||tr===sl)?le[tr]=tr:tr===Hl||rr.indexOf("rgba")>=0?le[tr]=Do:le[tr]=Ss,le},{});function xr(){this.internalformat=Do,this.format=Do,this.type=pu,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Bm,this.width=0,this.height=0,this.channels=0}function dr(le,rr){le.internalformat=rr.internalformat,le.format=rr.format,le.type=rr.type,le.compressed=rr.compressed,le.premultiplyAlpha=rr.premultiplyAlpha,le.flipY=rr.flipY,le.unpackAlignment=rr.unpackAlignment,le.colorSpace=rr.colorSpace,le.width=rr.width,le.height=rr.height,le.channels=rr.channels}function lt(le,rr){if(!(typeof rr!="object"||!rr)){if("premultiplyAlpha"in rr&&(le.premultiplyAlpha=rr.premultiplyAlpha),"flipY"in rr&&(le.flipY=rr.flipY),"alignment"in rr&&(le.unpackAlignment=rr.alignment),"colorSpace"in rr&&(le.colorSpace=xt[rr.colorSpace]),"type"in rr){var tr=rr.type;le.type=ft[tr]}var pt=le.width,fa=le.height,Oa=le.channels,ht=!1;"shape"in rr?(pt=rr.shape[0],fa=rr.shape[1],rr.shape.length===3&&(Oa=rr.shape[2],ht=!0)):("radius"in rr&&(pt=fa=rr.radius),"width"in rr&&(pt=rr.width),"height"in rr&&(fa=rr.height),"channels"in rr&&(Oa=rr.channels,ht=!0)),le.width=pt|0,le.height=fa|0,le.channels=Oa|0;var te=!1;if("format"in rr){var fe=rr.format,_e=le.internalformat=Zr[fe];le.format=wt[_e],fe in ft&&("type"in rr||(le.type=ft[fe])),fe in hr&&(le.compressed=!0),te=!0}!ht&&te?le.channels=Xi[le.format]:ht&&!te&&le.channels!==ji[le.format]&&(le.format=le.internalformat=ji[le.channels])}}function Xr(le){G.pixelStorei(I5,le.flipY),G.pixelStorei(zm,le.premultiplyAlpha),G.pixelStorei(Zf,le.colorSpace),G.pixelStorei(N5,le.unpackAlignment)}function Hr(){xr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Vr(le,rr){var tr=null;if(fd(rr)?tr=rr:rr&&(lt(le,rr),"x"in rr&&(le.xOffset=rr.x|0),"y"in rr&&(le.yOffset=rr.y|0),fd(rr.data)&&(tr=rr.data)),rr.copy){var pt=Qe.viewportWidth,fa=Qe.viewportHeight;le.width=le.width||pt-le.xOffset,le.height=le.height||fa-le.yOffset,le.needsCopy=!0}else if(!tr)le.width=le.width||1,le.height=le.height||1,le.channels=le.channels||4;else if(Ir(tr))le.channels=le.channels||4,le.data=tr,!("type"in rr)&&le.type===pu&&(le.type=Xm(tr));else if(Vm(tr))le.channels=le.channels||4,H5(le,tr),le.alignment=1,le.needsFree=!0;else if(Gr(tr)){var Oa=tr.data;!Array.isArray(Oa)&&le.type===pu&&(le.type=Xm(Oa));var ht=tr.shape,te=tr.stride,fe,_e,er,nr,He,Be;ht.length===3?(er=ht[2],Be=te[2]):(er=1,Be=1),fe=ht[0],_e=ht[1],nr=te[0],He=te[1],le.alignment=1,le.width=fe,le.height=_e,le.channels=er,le.format=le.internalformat=ji[er],le.needsFree=!0,Jm(le,Oa,nr,He,Be,tr.offset)}else if(Wm(tr)||jm(tr)||z5(tr))Wm(tr)||jm(tr)?le.element=tr:le.element=tr.canvas,le.width=le.element.width,le.height=le.element.height,le.channels=4;else if(B5(tr))le.element=tr,le.width=tr.width,le.height=tr.height,le.channels=4;else if(U5(tr))le.element=tr,le.width=tr.naturalWidth,le.height=tr.naturalHeight,le.channels=4;else if(G5(tr))le.element=tr,le.width=tr.videoWidth,le.height=tr.videoHeight,le.channels=4;else if(Ym(tr)){var Le=le.width||tr[0].length,pe=le.height||tr.length,Se=le.channels;Gl(tr[0][0])?Se=Se||tr[0][0].length:Se=Se||1;for(var ce=oe.shape(tr),je=1,ur=0;ur>=fa,tr.height>>=fa,Vr(tr,pt[fa]),le.mipmask|=1<=0&&!("faces"in rr)&&(le.genMipmaps=!0)}if("mag"in rr){var pt=rr.mag;le.magFilter=qr[pt]}var fa=le.wrapS,Oa=le.wrapT;if("wrap"in rr){var ht=rr.wrap;typeof ht=="string"?fa=Oa=Dr[ht]:Array.isArray(ht)&&(fa=Dr[ht[0]],Oa=Dr[ht[1]])}else{if("wrapS"in rr){var te=rr.wrapS;fa=Dr[te]}if("wrapT"in rr){var fe=rr.wrapT;Oa=Dr[fe]}}if(le.wrapS=fa,le.wrapT=Oa,"anisotropic"in rr){var _e=rr.anisotropic;le.anisotropic=rr.anisotropic}if("mipmap"in rr){var er=!1;switch(typeof rr.mipmap){case"string":le.mipmapHint=br[rr.mipmap],le.genMipmaps=!0,er=!0;break;case"boolean":er=le.genMipmaps=rr.mipmap;break;case"object":le.genMipmaps=!1,er=!0;break;default:}er&&!("min"in rr)&&(le.minFilter=jf)}}function Ii(le,rr){G.texParameteri(rr,F5,le.minFilter),G.texParameteri(rr,Wf,le.magFilter),G.texParameteri(rr,mu,le.wrapS),G.texParameteri(rr,D5,le.wrapT),ie.ext_texture_filter_anisotropic&&G.texParameteri(rr,P5,le.anisotropic),le.genMipmaps&&(G.hint(Om,le.mipmapHint),G.generateMipmap(rr))}var $i=0,Vn={},Yn=ue.maxTextureUnits,ri=Array(Yn).map(function(){return null});function Yt(le){xr.call(this),this.mipmask=0,this.internalformat=Do,this.id=$i++,this.refCount=1,this.target=le,this.texture=G.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ia,$e.profile&&(this.stats={size:0})}function fi(le){G.activeTexture(Ls),G.bindTexture(le.target,le.texture)}function Ua(){var le=ri[0];le?G.bindTexture(le.target,le.texture):G.bindTexture(Pi,null)}function Oi(le){var rr=le.texture,tr=le.unit,pt=le.target;tr>=0&&(G.activeTexture(Ls+tr),G.bindTexture(pt,null),ri[tr]=null),G.deleteTexture(rr),le.texture=null,le.params=null,le.pixels=null,le.refCount=0,delete Vn[le.id],ar.textureCount--}e(Yt.prototype,{bind:function(){var le=this;le.bindCount+=1;var rr=le.unit;if(rr<0){for(var tr=0;tr0)continue;pt.unit=-1}ri[tr]=le,rr=tr;break}rr>=Yn,$e.profile&&ar.maxTextureUnits>He)-er,Be.height=Be.height||(tr.height>>He)-nr,fi(tr),At(Be,Pi,er,nr,He),Ua(),vt(Be),pt}function Oa(ht,te){var fe=ht|0,_e=te|0||fe;if(fe===tr.width&&_e===tr.height)return pt;pt.width=tr.width=fe,pt.height=tr.height=_e,fi(tr);for(var er=0;tr.mipmask>>er;++er){var nr=fe>>er,He=_e>>er;if(!nr||!He)break;G.texImage2D(Pi,er,tr.format,nr,He,0,tr.format,tr.type,null)}return Ua(),$e.profile&&(tr.stats.size=$f(tr.internalformat,tr.type,fe,_e,!1,!1)),pt}return pt(le,rr),pt.subimage=fa,pt.resize=Oa,pt._reglType="texture2d",pt._texture=tr,$e.profile&&(pt.stats=tr.stats),pt.destroy=function(){tr.decRef()},pt}function Qi(le,rr,tr,pt,fa,Oa){var ht=new Yt(hu);Vn[ht.id]=ht,ar.cubeCount++;var te=new Array(6);function fe(nr,He,Be,Le,pe,Se){var ce,je=ht.texInfo;for(Ia.call(je),ce=0;ce<6;++ce)te[ce]=na();if(typeof nr=="number"||!nr){var ur=nr|0||1;for(ce=0;ce<6;++ce)Pt(te[ce],ur,ur)}else if(typeof nr=="object")if(He)$t(te[0],nr),$t(te[1],He),$t(te[2],Be),$t(te[3],Le),$t(te[4],pe),$t(te[5],Se);else if(Si(je,nr),lt(ht,nr),"faces"in nr){var Er=nr.faces;for(ce=0;ce<6;++ce)dr(te[ce],ht),$t(te[ce],Er[ce])}else for(ce=0;ce<6;++ce)$t(te[ce],nr);for(dr(ht,te[0]),je.genMipmaps?ht.mipmask=(te[0].width<<1)-1:ht.mipmask=te[0].mipmask,ht.internalformat=te[0].internalformat,fe.width=te[0].width,fe.height=te[0].height,fi(ht),ce=0;ce<6;++ce)vn(te[ce],Ms+ce);for(Ii(je,hu),Ua(),$e.profile&&(ht.stats.size=$f(ht.internalformat,ht.type,fe.width,fe.height,je.genMipmaps,!0)),fe.format=Sr[ht.internalformat],fe.type=Nr[ht.type],fe.mag=wr[je.magFilter],fe.min=et[je.minFilter],fe.wrapS=Jr[je.wrapS],fe.wrapT=Jr[je.wrapT],ce=0;ce<6;++ce)Ji(te[ce]);return fe}function _e(nr,He,Be,Le,pe){var Se=Be|0,ce=Le|0,je=pe|0,ur=Kr();return dr(ur,ht),ur.width=0,ur.height=0,Vr(ur,He),ur.width=ur.width||(ht.width>>je)-Se,ur.height=ur.height||(ht.height>>je)-ce,fi(ht),At(ur,Ms+nr,Se,ce,je),Ua(),vt(ur),fe}function er(nr){var He=nr|0;if(He!==ht.width){fe.width=ht.width=He,fe.height=ht.height=He,fi(ht);for(var Be=0;Be<6;++Be)for(var Le=0;ht.mipmask>>Le;++Le)G.texImage2D(Ms+Be,Le,ht.format,He>>Le,He>>Le,0,ht.format,ht.type,null);return Ua(),$e.profile&&(ht.stats.size=$f(ht.internalformat,ht.type,fe.width,fe.height,!1,!0)),fe}}return fe(le,rr,tr,pt,fa,Oa),fe.subimage=_e,fe.resize=er,fe._reglType="textureCube",fe._texture=ht,$e.profile&&(fe.stats=ht.stats),fe.destroy=function(){ht.decRef()},fe}function Gt(){for(var le=0;le>pt,tr.height>>pt,0,tr.internalformat,tr.type,null);else for(var fa=0;fa<6;++fa)G.texImage2D(Ms+fa,pt,tr.internalformat,tr.width>>pt,tr.height>>pt,0,tr.internalformat,tr.type,null);Ii(tr.texInfo,tr.target)})}function Za(){for(var le=0;le=0?Ji=!0:Dr.indexOf(Ia)>=0&&(Ji=!1))),("depthTexture"in Yt||"depthStencilTexture"in Yt)&&(ri=!!(Yt.depthTexture||Yt.depthStencilTexture)),"depth"in Yt&&(typeof Yt.depth=="boolean"?vn=Yt.depth:($i=Yt.depth,ei=!1)),"stencil"in Yt&&(typeof Yt.stencil=="boolean"?ei=Yt.stencil:(Vn=Yt.stencil,vn=!1)),"depthStencil"in Yt&&(typeof Yt.depthStencil=="boolean"?vn=ei=Yt.depthStencil:(Yn=Yt.depthStencil,vn=!1,ei=!1))}var Ua=null,Oi=null,Ki=null,Qi=null;if(Array.isArray(na))Ua=na.map(hr);else if(na)Ua=[hr(na)];else for(Ua=new Array(Ii),Rt=0;Rt0&&(vt.depth=Vr[0].depth,vt.stencil=Vr[0].stencil,vt.depthStencil=Vr[0].depthStencil),Vr[Kr]?Vr[Kr](vt):Vr[Kr]=dr(vt)}return e(st,{width:Rt,height:Rt,color:Ia})}function At(zt){var Kr,vt=zt|0;if(vt===st.width)return st;var Rt=st.color;for(Kr=0;Kr=Rt.byteLength?Pt.subdata(Rt):(Pt.destroy(),dr.buffers[zt]=null)),dr.buffers[zt]||(Pt=dr.buffers[zt]=Qe.create(Kr,uy,!1,!0)),vt.buffer=Qe.getBuffer(Pt),vt.size=vt.buffer.dimension|0,vt.normalized=!1,vt.type=vt.buffer.dtype,vt.offset=0,vt.stride=0,vt.divisor=0,vt.state=1,st[zt]=1}else Qe.getBuffer(Kr)?(vt.buffer=Qe.getBuffer(Kr),vt.size=vt.buffer.dimension|0,vt.normalized=!1,vt.type=vt.buffer.dtype,vt.offset=0,vt.stride=0,vt.divisor=0,vt.state=1):Qe.getBuffer(Kr.buffer)?(vt.buffer=Qe.getBuffer(Kr.buffer),vt.size=(+Kr.size||vt.buffer.dimension)|0,vt.normalized=!!Kr.normalized||!1,"type"in Kr?vt.type=Bn[Kr.type]:vt.type=vt.buffer.dtype,vt.offset=(Kr.offset||0)|0,vt.stride=(Kr.stride||0)|0,vt.divisor=(Kr.divisor||0)|0,vt.state=1):"x"in Kr&&(vt.x=+Kr.x||0,vt.y=+Kr.y||0,vt.z=+Kr.z||0,vt.w=+Kr.w||0,vt.state=2)}for(var $t=0;$t1)for(var Xr=0;Xrze&&(ze=sr.stats.uniformsCount)}),ze},ue.getMaxAttributesCount=function(){var ze=0;return Fr.forEach(function(sr){sr.stats.attributesCount>ze&&(ze=sr.stats.attributesCount)}),ze});function hr(){Qe={},ar={};for(var ze=0;ze16&&(ue=wu(ue,G.length*8));for(var We=Array(16),Qe=Array(16),ar=0;ar<16;ar++)We[ar]=ue[ar]^909522486,Qe[ar]=ue[ar]^1549556828;var $e=wu(We.concat(bd(ie)),512+ie.length*8);return gy(wu(Qe.concat($e),768))}function py(G){for(var ie=hy?"0123456789ABCDEF":"0123456789abcdef",ue="",We,Qe=0;Qe>>4&15)+ie.charAt(We&15);return ue}function my(G){for(var ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue="",We=G.length,Qe=0;QeG.length*8?ue+=r_:ue+=ie.charAt(ar>>>6*(3-$e)&63);return ue}function yy(G,ie){var ue=ie.length,We=Array(),Qe,ar,$e,br,Dr=Array(Math.ceil(G.length/2));for(Qe=0;Qe0;){for(br=Array(),$e=0,Qe=0;Qe0||ar>0)&&(br[br.length]=ar);We[We.length]=$e,Dr=br}var qr="";for(Qe=We.length-1;Qe>=0;Qe--)qr+=ie.charAt(We[Qe]);var Fr=Math.ceil(G.length*8/(Math.log(ie.length)/Math.log(2)));for(Qe=qr.length;Qe>>6&31,128|We&63):We<=65535?ie+=String.fromCharCode(224|We>>>12&15,128|We>>>6&63,128|We&63):We<=2097151&&(ie+=String.fromCharCode(240|We>>>18&7,128|We>>>12&63,128|We>>>6&63,128|We&63));return ie}function bd(G){for(var ie=Array(G.length>>2),ue=0;ue>5]|=(G.charCodeAt(ue/8)&255)<<24-ue%32;return ie}function gy(G){for(var ie="",ue=0;ue>5]>>>24-ue%32&255);return ie}function Ro(G,ie){return G>>>ie|G<<32-ie}function by(G,ie){return G>>>ie}function xy(G,ie,ue){return G&ie^~G&ue}function _y(G,ie,ue){return G&ie^G&ue^ie&ue}function xd(G){return Ro(G,2)^Ro(G,13)^Ro(G,22)}function wy(G){return Ro(G,6)^Ro(G,11)^Ro(G,25)}function Pv(G){return Ro(G,7)^Ro(G,18)^by(G,3)}function Nv(G){return Ro(G,17)^Ro(G,19)^by(G,10)}var i_=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 wu(G,ie){var ue=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),We=new Array(64),Qe,ar,$e,br,Dr,qr,Fr,xt,ft,Zr,hr,ze;for(G[ie>>5]|=128<<24-ie%32,G[(ie+64>>9<<4)+15]=ie,ft=0;ft>16)+(ie>>16)+(ue>>16);return We<<16|ue&65535}function Au(G){return Array.prototype.slice.call(G)}function Tu(G){return Au(G).join("")}function Ay(G){var ie=G&&G.cache,ue=0,We=[],Qe=[],ar=[];function $e(hr,ze){var sr=ze&&ze.stable;if(!sr){for(var Sr=0;Sr0&&(hr.push(Nr,"="),hr.push.apply(hr,Au(arguments)),hr.push(";")),Nr}return e(ze,{def:Sr,toString:function(){return Tu([sr.length>0?"var "+sr.join(",")+";":"",Tu(hr)])}})}function Dr(){var hr=br(),ze=br(),sr=hr.toString,Sr=ze.toString;function Nr(wr,et){ze(wr,et,"=",hr.def(wr,et),";")}return e(function(){hr.apply(hr,Au(arguments))},{def:hr.def,entry:hr,exit:ze,save:Nr,set:function(wr,et,Jr){Nr(wr,et),hr(wr,et,"=",Jr,";")},toString:function(){return sr()+Sr()}})}function qr(){var hr=Tu(arguments),ze=Dr(),sr=Dr(),Sr=ze.toString,Nr=sr.toString;return e(ze,{then:function(){return ze.apply(ze,Au(arguments)),this},else:function(){return sr.apply(sr,Au(arguments)),this},toString:function(){var wr=Nr();return wr&&(wr="else{"+wr+"}"),Tu(["if(",hr,"){",Sr(),"}",wr])}})}var Fr=br(),xt={};function ft(hr,ze){var sr=[];function Sr(){var wt="a"+sr.length;return sr.push(wt),wt}ze=ze||0;for(var Nr=0;Nr":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},he={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},we={cw:A,ccw:C};function Fe(G){return Array.isArray(G)||Ir(G)||Gr(G)}function Re(G){return G.sort(function(ie,ue){return ie===fl?-1:ue===fl?1:ie=1,We>=2,ie)}else if(ue===zv){var Qe=G.data;return new me(Qe.thisDep,Qe.contextDep,Qe.propDep,ie)}else{if(ue===Ad)return new me(!1,!1,!1,ie);if(ue===rc){for(var ar=!1,$e=!1,br=!1,Dr=0;Dr=1&&($e=!0),Fr>=2&&(br=!0)}else qr.type===zv&&(ar=ar||qr.data.thisDep,$e=$e||qr.data.contextDep,br=br||qr.data.propDep)}return new me(ar,$e,br,ie)}else return new me(ue===Ov,ue===Ty,ue===Iv,ie)}}var Yr=new me(!1,!1,!1,function(){});function it(G,ie,ue,We,Qe,ar,$e,br,Dr,qr,Fr,xt,ft,Zr,hr,ze){var sr=qr.Record,Sr={add:32774,subtract:32778,"reverse subtract":32779};ue.ext_blend_minmax&&(Sr.min=E,Sr.max=L);var Nr=ue.angle_instanced_arrays,wr=ue.webgl_draw_buffers,et=ue.oes_vertex_array_object,Jr={dirty:!0,profile:ze.profile},wt={},xr=[],dr={},lt={};function Xr(te){return te.replace(".","_")}function Hr(te,fe,_e){var er=Xr(te);xr.push(te),wt[er]=Jr[er]=!!_e,dr[er]=fe}function Vr(te,fe,_e){var er=Xr(te);xr.push(te),Array.isArray(_e)?(Jr[er]=_e.slice(),wt[er]=_e.slice()):Jr[er]=wt[er]=_e,lt[er]=fe}function st(te){return!!isNaN(te)}Hr(Td,u_),Hr(My,s_),Vr(Sy,"blendColor",[0,0,0,0]),Vr(Md,"blendEquationSeparate",[J,J]),Vr(Sd,"blendFuncSeparate",[W,B,W,B]),Hr(kd,Dy,!0),Vr(Cd,"depthFunc",Q),Vr(Ed,"depthRange",[0,1]),Vr(Ld,"depthMask",!0),Vr(Dd,Dd,[!0,!0,!0,!0]),Hr(tc,Ly),Vr(ky,"cullFace",y),Vr(qd,qd,C),Vr(Bv,Bv,1),Hr(Fd,jv),Vr(Rd,"polygonOffset",[0,0]),Hr(ac,Fy),Hr(nc,Xv),Vr(Uv,"sampleCoverage",[1,!1]),Hr(Pd,f_),Vr(Gv,"stencilMask",-1),Vr(Ni,"stencilFunc",[I,0,-1]),Vr(Hv,"stencilOpSeparate",[v,F,F,F]),Vr(ic,"stencilOpSeparate",[y,F,F,F]),Hr(Vv,qy),Vr(Mu,"scissor",[0,0,G.drawingBufferWidth,G.drawingBufferHeight]),Vr(fl,fl,[0,0,G.drawingBufferWidth,G.drawingBufferHeight]);var At={gl:G,context:ft,strings:ie,next:wt,current:Jr,draw:xt,elements:ar,buffer:Qe,shader:Fr,attributes:qr.state,vao:qr,uniforms:Dr,framebuffer:br,extensions:ue,timer:Zr,isBufferArgs:Fe},zt={primTypes:As,compareFuncs:ne,blendFuncs:qe,blendEquations:Sr,stencilOps:he,glTypes:Bn,orientationType:we};wr&&(zt.backBuffer=[y],zt.drawBuffer=k(We.maxDrawbuffers,function(te){return te===0?[0]:k(te,function(fe){return Me+fe})}));var Kr=0;function vt(){var te=Ay({cache:hr}),fe=te.link,_e=te.global;te.id=Kr++,te.batchId="0";var er=fe(At),nr=te.shared={props:"a0"};Object.keys(At).forEach(function(Se){nr[Se]=_e.def(er,".",Se)});var He=te.next={},Be=te.current={};Object.keys(lt).forEach(function(Se){Array.isArray(Jr[Se])&&(He[Se]=_e.def(nr.next,".",Se),Be[Se]=_e.def(nr.current,".",Se))});var Le=te.constants={};Object.keys(zt).forEach(function(Se){Le[Se]=_e.def(JSON.stringify(zt[Se]))}),te.invoke=function(Se,ce){switch(ce.type){case wd:var je=["this",nr.context,nr.props,te.batchId];return Se.def(fe(ce.data),".call(",je.slice(0,Math.max(ce.data.length+1,4)),")");case Iv:return Se.def(nr.props,ce.data);case Ty:return Se.def(nr.context,ce.data);case Ov:return Se.def("this",ce.data);case zv:return ce.data.append(te,Se),ce.data.ref;case Ad:return ce.data.toString();case rc:return ce.data.map(function(ur){return te.invoke(Se,ur)})}},te.attribCache={};var pe={};return te.scopeAttrib=function(Se){var ce=ie.id(Se);if(ce in pe)return pe[ce];var je=qr.scope[ce];je||(je=qr.scope[ce]=new sr);var ur=pe[ce]=fe(je);return ur},te}function Rt(te){var fe=te.static,_e=te.dynamic,er;if(Yv in fe){var nr=!!fe[Yv];er=Mr(function(Be,Le){return nr}),er.enable=nr}else if(Yv in _e){var He=_e[Yv];er=Pr(He,function(Be,Le){return Be.invoke(Le,He)})}return er}function Pt(te,fe){var _e=te.static,er=te.dynamic;if(Su in _e){var nr=_e[Su];return nr?(nr=br.getFramebuffer(nr),Mr(function(Be,Le){var pe=Be.link(nr),Se=Be.shared;Le.set(Se.framebuffer,".next",pe);var ce=Se.context;return Le.set(ce,"."+Zl,pe+".width"),Le.set(ce,"."+Jl,pe+".height"),pe})):Mr(function(Be,Le){var pe=Be.shared;Le.set(pe.framebuffer,".next","null");var Se=pe.context;return Le.set(Se,"."+Zl,Se+"."+Id),Le.set(Se,"."+Jl,Se+"."+Od),"null"})}else if(Su in er){var He=er[Su];return Pr(He,function(Be,Le){var pe=Be.invoke(Le,He),Se=Be.shared,ce=Se.framebuffer,je=Le.def(ce,".getFramebuffer(",pe,")");Le.set(ce,".next",je);var ur=Se.context;return Le.set(ur,"."+Zl,je+"?"+je+".width:"+ur+"."+Id),Le.set(ur,"."+Jl,je+"?"+je+".height:"+ur+"."+Od),je})}else return null}function $t(te,fe,_e){var er=te.static,nr=te.dynamic;function He(pe){if(pe in er){var Se=er[pe],ce=!0,je=Se.x|0,ur=Se.y|0,Er,Mt;return"width"in Se?Er=Se.width|0:ce=!1,"height"in Se?Mt=Se.height|0:ce=!1,new me(!ce&&fe&&fe.thisDep,!ce&&fe&&fe.contextDep,!ce&&fe&&fe.propDep,function(Tt,bt){var gt=Tt.shared.context,nt=Er;"width"in Se||(nt=bt.def(gt,".",Zl,"-",je));var dt=Mt;return"height"in Se||(dt=bt.def(gt,".",Jl,"-",ur)),[je,ur,nt,dt]})}else if(pe in nr){var ut=nr[pe],at=Pr(ut,function(Tt,bt){var gt=Tt.invoke(bt,ut),nt=Tt.shared.context,dt=bt.def(gt,".x|0"),mt=bt.def(gt,".y|0"),Bt=bt.def('"width" in ',gt,"?",gt,".width|0:","(",nt,".",Zl,"-",dt,")"),Ja=bt.def('"height" in ',gt,"?",gt,".height|0:","(",nt,".",Jl,"-",mt,")");return[dt,mt,Bt,Ja]});return fe&&(at.thisDep=at.thisDep||fe.thisDep,at.contextDep=at.contextDep||fe.contextDep,at.propDep=at.propDep||fe.propDep),at}else return fe?new me(fe.thisDep,fe.contextDep,fe.propDep,function(Tt,bt){var gt=Tt.shared.context;return[0,0,bt.def(gt,".",Zl),bt.def(gt,".",Jl)]}):null}var Be=He(fl);if(Be){var Le=Be;Be=new me(Be.thisDep,Be.contextDep,Be.propDep,function(pe,Se){var ce=Le.append(pe,Se),je=pe.shared.context;return Se.set(je,"."+o_,ce[2]),Se.set(je,"."+l_,ce[3]),ce})}return{viewport:Be,scissor_box:He(Mu)}}function vn(te,fe){var _e=te.static,er=typeof _e[ku]=="string"&&typeof _e[Ps]=="string";if(er){if(Object.keys(fe.dynamic).length>0)return null;var nr=fe.static,He=Object.keys(nr);if(He.length>0&&typeof nr[He[0]]=="number"){for(var Be=[],Le=0;Le"+dt+"?"+ce+".constant["+dt+"]:0;"}).join(""),"}}else{","if(",Er,"(",ce,".buffer)){",Tt,"=",Mt,".createStream(",Is,",",ce,".buffer);","}else{",Tt,"=",Mt,".getBuffer(",ce,".buffer);","}",bt,'="type" in ',ce,"?",ur.glTypes,"[",ce,".type]:",Tt,".dtype;",ut.normalized,"=!!",ce,".normalized;");function gt(nt){Se(ut[nt],"=",ce,".",nt,"|0;")}return gt("size"),gt("offset"),gt("stride"),gt("divisor"),Se("}}"),Se.exit("if(",ut.isStream,"){",Mt,".destroyStream(",Tt,");","}"),ut}nr[He]=Pr(Be,Le)}),nr}function Ii(te){var fe=te.static,_e=te.dynamic,er={};return Object.keys(fe).forEach(function(nr){var He=fe[nr];er[nr]=Mr(function(Be,Le){return typeof He=="number"||typeof He=="boolean"?""+He:Be.link(He)})}),Object.keys(_e).forEach(function(nr){var He=_e[nr];er[nr]=Pr(He,function(Be,Le){return Be.invoke(Le,He)})}),er}function $i(te,fe,_e,er,nr){var He=te.static,Be=te.dynamic,Le=vn(te,fe),pe=Pt(te,nr),Se=$t(te,pe,nr),ce=na(te,nr),je=Ji(te,nr),ur=ei(te,nr,Le);function Er(gt){var nt=Se[gt];nt&&(je[gt]=nt)}Er(fl),Er(Xr(Mu));var Mt=Object.keys(je).length>0,ut={framebuffer:pe,draw:ce,shader:ur,state:je,dirty:Mt,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ut.profile=Rt(te,nr),ut.uniforms=Ia(_e,nr),ut.drawVAO=ut.scopeVAO=ce.vao,!ut.drawVAO&&ur.program&&!Le&&ue.angle_instanced_arrays&&ce.static.elements){var at=!0,Tt=ur.program.attributes.map(function(gt){var nt=fe.static[gt];return at=at&&!!nt,nt});if(at&&Tt.length>0){var bt=qr.getVAO(qr.createVAO({attributes:Tt,elements:ce.static.elements}));ut.drawVAO=new me(null,null,null,function(gt,nt){return gt.link(bt)}),ut.useVAO=!0}}return Le?ut.useVAO=!0:ut.attributes=Si(fe,nr),ut.context=Ii(er,nr),ut}function Vn(te,fe,_e){var er=te.shared,nr=er.context,He=te.scope();Object.keys(_e).forEach(function(Be){fe.save(nr,"."+Be);var Le=_e[Be],pe=Le.append(te,fe);Array.isArray(pe)?He(nr,".",Be,"=[",pe.join(),"];"):He(nr,".",Be,"=",pe,";")}),fe(He)}function Yn(te,fe,_e,er){var nr=te.shared,He=nr.gl,Be=nr.framebuffer,Le;wr&&(Le=fe.def(nr.extensions,".webgl_draw_buffers"));var pe=te.constants,Se=pe.drawBuffer,ce=pe.backBuffer,je;_e?je=_e.append(te,fe):je=fe.def(Be,".next"),er||fe("if(",je,"!==",Be,".cur){"),fe("if(",je,"){",He,".bindFramebuffer(",ee,",",je,".framebuffer);"),wr&&fe(Le,".drawBuffersWEBGL(",Se,"[",je,".colorAttachments.length]);"),fe("}else{",He,".bindFramebuffer(",ee,",null);"),wr&&fe(Le,".drawBuffersWEBGL(",ce,");"),fe("}",Be,".cur=",je,";"),er||fe("}")}function ri(te,fe,_e){var er=te.shared,nr=er.gl,He=te.current,Be=te.next,Le=er.current,pe=er.next,Se=te.cond(Le,".dirty");xr.forEach(function(ce){var je=Xr(ce);if(!(je in _e.state)){var ur,Er;if(je in Be){ur=Be[je],Er=He[je];var Mt=k(Jr[je].length,function(at){return Se.def(ur,"[",at,"]")});Se(te.cond(Mt.map(function(at,Tt){return at+"!=="+Er+"["+Tt+"]"}).join("||")).then(nr,".",lt[je],"(",Mt,");",Mt.map(function(at,Tt){return Er+"["+Tt+"]="+at}).join(";"),";"))}else{ur=Se.def(pe,".",je);var ut=te.cond(ur,"!==",Le,".",je);Se(ut),je in dr?ut(te.cond(ur).then(nr,".enable(",dr[je],");").else(nr,".disable(",dr[je],");"),Le,".",je,"=",ur,";"):ut(nr,".",lt[je],"(",ur,");",Le,".",je,"=",ur,";")}}}),Object.keys(_e.state).length===0&&Se(Le,".dirty=false;"),fe(Se)}function Yt(te,fe,_e,er){var nr=te.shared,He=te.current,Be=nr.current,Le=nr.gl,pe;Re(Object.keys(_e)).forEach(function(Se){var ce=_e[Se];if(!(er&&!er(ce))){var je=ce.append(te,fe);if(dr[Se]){var ur=dr[Se];cr(ce)?(pe=te.link(je,{stable:!0}),fe(te.cond(pe).then(Le,".enable(",ur,");").else(Le,".disable(",ur,");")),fe(Be,".",Se,"=",pe,";")):(fe(te.cond(je).then(Le,".enable(",ur,");").else(Le,".disable(",ur,");")),fe(Be,".",Se,"=",je,";"))}else if(Gl(je)){var Er=He[Se];fe(Le,".",lt[Se],"(",je,");",je.map(function(Mt,ut){return Er+"["+ut+"]="+Mt}).join(";"),";")}else cr(ce)?(pe=te.link(je,{stable:!0}),fe(Le,".",lt[Se],"(",pe,");",Be,".",Se,"=",pe,";")):fe(Le,".",lt[Se],"(",je,");",Be,".",Se,"=",je,";")}})}function fi(te,fe){Nr&&(te.instancing=fe.def(te.shared.extensions,".angle_instanced_arrays"))}function Ua(te,fe,_e,er,nr){var He=te.shared,Be=te.stats,Le=He.current,pe=He.timer,Se=_e.profile;function ce(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var je,ur;function Er(gt){je=fe.def(),gt(je,"=",ce(),";"),typeof nr=="string"?gt(Be,".count+=",nr,";"):gt(Be,".count++;"),Zr&&(er?(ur=fe.def(),gt(ur,"=",pe,".getNumPendingQueries();")):gt(pe,".beginQuery(",Be,");"))}function Mt(gt){gt(Be,".cpuTime+=",ce(),"-",je,";"),Zr&&(er?gt(pe,".pushScopeStats(",ur,",",pe,".getNumPendingQueries(),",Be,");"):gt(pe,".endQuery();"))}function ut(gt){var nt=fe.def(Le,".profile");fe(Le,".profile=",gt,";"),fe.exit(Le,".profile=",nt,";")}var at;if(Se){if(cr(Se)){Se.enable?(Er(fe),Mt(fe.exit),ut("true")):ut("false");return}at=Se.append(te,fe),ut(at)}else at=fe.def(Le,".profile");var Tt=te.block();Er(Tt),fe("if(",at,"){",Tt,"}");var bt=te.block();Mt(bt),fe.exit("if(",at,"){",bt,"}")}function Oi(te,fe,_e,er,nr){var He=te.shared;function Be(pe){switch(pe){case Os:case Lu:case Du:return 2;case rn:case lc:case $v:return 3;case Zv:case Ud:case Gd:return 4;default:return 1}}function Le(pe,Se,ce){var je=He.gl,ur=fe.def(pe,".location"),Er=fe.def(He.attributes,"[",ur,"]"),Mt=ce.state,ut=ce.buffer,at=[ce.x,ce.y,ce.z,ce.w],Tt=["buffer","normalized","offset","stride"];function bt(){fe("if(!",Er,".buffer){",je,".enableVertexAttribArray(",ur,");}");var nt=ce.type,dt;if(ce.size?dt=fe.def(ce.size,"||",Se):dt=Se,fe("if(",Er,".type!==",nt,"||",Er,".size!==",dt,"||",Tt.map(function(Bt){return Er+"."+Bt+"!=="+ce[Bt]}).join("||"),"){",je,".bindBuffer(",Is,",",ut,".buffer);",je,".vertexAttribPointer(",[ur,dt,nt,ce.normalized,ce.stride,ce.offset],");",Er,".type=",nt,";",Er,".size=",dt,";",Tt.map(function(Bt){return Er+"."+Bt+"="+ce[Bt]+";"}).join(""),"}"),Nr){var mt=ce.divisor;fe("if(",Er,".divisor!==",mt,"){",te.instancing,".vertexAttribDivisorANGLE(",[ur,mt],");",Er,".divisor=",mt,";}")}}function gt(){fe("if(",Er,".buffer){",je,".disableVertexAttribArray(",ur,");",Er,".buffer=null;","}if(",Rs.map(function(nt,dt){return Er+"."+nt+"!=="+at[dt]}).join("||"),"){",je,".vertexAttrib4f(",ur,",",at,");",Rs.map(function(nt,dt){return Er+"."+nt+"="+at[dt]+";"}).join(""),"}")}Mt===Xl?bt():Mt===ec?gt():(fe("if(",Mt,"===",Xl,"){"),bt(),fe("}else{"),gt(),fe("}"))}er.forEach(function(pe){var Se=pe.name,ce=_e.attributes[Se],je;if(ce){if(!nr(ce))return;je=ce.append(te,fe)}else{if(!nr(Yr))return;var ur=te.scopeAttrib(Se);je={},Object.keys(new sr).forEach(function(Er){je[Er]=fe.def(ur,".",Er)})}Le(te.link(pe),Be(pe.info.type),je)})}function Ki(te,fe,_e,er,nr,He){for(var Be=te.shared,Le=Be.gl,pe,Se=0;Se1){for(var eo=[],zs=[],qu=0;qu>1)",ut],");")}function mt(){_e(at,".drawArraysInstancedANGLE(",[ur,Er,Mt,ut],");")}ce&&ce!=="null"?bt?dt():(_e("if(",ce,"){"),dt(),_e("}else{"),mt(),_e("}")):mt()}function nt(){function dt(){_e(He+".drawElements("+[ur,Mt,Tt,Er+"<<(("+Tt+"-"+_d+")>>1)"]+");")}function mt(){_e(He+".drawArrays("+[ur,Er,Mt]+");")}ce&&ce!=="null"?bt?dt():(_e("if(",ce,"){"),dt(),_e("}else{"),mt(),_e("}")):mt()}Nr&&(typeof ut!="number"||ut>=0)?typeof ut=="string"?(_e("if(",ut,">0){"),gt(),_e("}else if(",ut,"<0){"),nt(),_e("}")):gt():nt()}function Gt(te,fe,_e,er,nr){var He=vt(),Be=He.proc("body",nr);return Nr&&(He.instancing=Be.def(He.shared.extensions,".angle_instanced_arrays")),te(He,Be,_e,er),He.compile().body}function da(te,fe,_e,er){fi(te,fe),_e.useVAO?_e.drawVAO?fe(te.shared.vao,".setVAO(",_e.drawVAO.append(te,fe),");"):fe(te.shared.vao,".setVAO(",te.shared.vao,".targetVAO);"):(fe(te.shared.vao,".setVAO(null);"),Oi(te,fe,_e,er.attributes,function(){return!0})),Ki(te,fe,_e,er.uniforms,function(){return!0},!1),Qi(te,fe,fe,_e)}function Za(te,fe){var _e=te.proc("draw",1);fi(te,_e),Vn(te,_e,fe.context),Yn(te,_e,fe.framebuffer),ri(te,_e,fe),Yt(te,_e,fe.state),Ua(te,_e,fe,!1,!0);var er=fe.shader.progVar.append(te,_e);if(_e(te.shared.gl,".useProgram(",er,".program);"),fe.shader.program)da(te,_e,fe,fe.shader.program);else{_e(te.shared.vao,".setVAO(null);");var nr=te.global.def("{}"),He=_e.def(er,".id"),Be=_e.def(nr,"[",He,"]");_e(te.cond(Be).then(Be,".call(this,a0);").else(Be,"=",nr,"[",He,"]=",te.link(function(Le){return Gt(da,te,fe,Le,1)}),"(",er,");",Be,".call(this,a0);"))}Object.keys(fe.state).length>0&&_e(te.shared.current,".dirty=true;"),te.shared.vao&&_e(te.shared.vao,".setVAO(null);")}function le(te,fe,_e,er){te.batchId="a1",fi(te,fe);function nr(){return!0}Oi(te,fe,_e,er.attributes,nr),Ki(te,fe,_e,er.uniforms,nr,!1),Qi(te,fe,fe,_e)}function rr(te,fe,_e,er){fi(te,fe);var nr=_e.contextDep,He=fe.def(),Be="a0",Le="a1",pe=fe.def();te.shared.props=pe,te.batchId=He;var Se=te.scope(),ce=te.scope();fe(Se.entry,"for(",He,"=0;",He,"<",Le,";++",He,"){",pe,"=",Be,"[",He,"];",ce,"}",Se.exit);function je(Tt){return Tt.contextDep&&nr||Tt.propDep}function ur(Tt){return!je(Tt)}if(_e.needsContext&&Vn(te,ce,_e.context),_e.needsFramebuffer&&Yn(te,ce,_e.framebuffer),Yt(te,ce,_e.state,je),_e.profile&&je(_e.profile)&&Ua(te,ce,_e,!1,!0),er)_e.useVAO?_e.drawVAO?je(_e.drawVAO)?ce(te.shared.vao,".setVAO(",_e.drawVAO.append(te,ce),");"):Se(te.shared.vao,".setVAO(",_e.drawVAO.append(te,Se),");"):Se(te.shared.vao,".setVAO(",te.shared.vao,".targetVAO);"):(Se(te.shared.vao,".setVAO(null);"),Oi(te,Se,_e,er.attributes,ur),Oi(te,ce,_e,er.attributes,je)),Ki(te,Se,_e,er.uniforms,ur,!1),Ki(te,ce,_e,er.uniforms,je,!0),Qi(te,Se,ce,_e);else{var Er=te.global.def("{}"),Mt=_e.shader.progVar.append(te,ce),ut=ce.def(Mt,".id"),at=ce.def(Er,"[",ut,"]");ce(te.shared.gl,".useProgram(",Mt,".program);","if(!",at,"){",at,"=",Er,"[",ut,"]=",te.link(function(Tt){return Gt(le,te,_e,Tt,2)}),"(",Mt,");}",at,".call(this,a0[",He,"],",He,");")}}function tr(te,fe){var _e=te.proc("batch",2);te.batchId="0",fi(te,_e);var er=!1,nr=!0;Object.keys(fe.context).forEach(function(Er){er=er||fe.context[Er].propDep}),er||(Vn(te,_e,fe.context),nr=!1);var He=fe.framebuffer,Be=!1;He?(He.propDep?er=Be=!0:He.contextDep&&er&&(Be=!0),Be||Yn(te,_e,He)):Yn(te,_e,null),fe.state.viewport&&fe.state.viewport.propDep&&(er=!0);function Le(Er){return Er.contextDep&&er||Er.propDep}ri(te,_e,fe),Yt(te,_e,fe.state,function(Er){return!Le(Er)}),(!fe.profile||!Le(fe.profile))&&Ua(te,_e,fe,!1,"a1"),fe.contextDep=er,fe.needsContext=nr,fe.needsFramebuffer=Be;var pe=fe.shader.progVar;if(pe.contextDep&&er||pe.propDep)rr(te,_e,fe,null);else{var Se=pe.append(te,_e);if(_e(te.shared.gl,".useProgram(",Se,".program);"),fe.shader.program)rr(te,_e,fe,fe.shader.program);else{_e(te.shared.vao,".setVAO(null);");var ce=te.global.def("{}"),je=_e.def(Se,".id"),ur=_e.def(ce,"[",je,"]");_e(te.cond(ur).then(ur,".call(this,a0,a1);").else(ur,"=",ce,"[",je,"]=",te.link(function(Er){return Gt(rr,te,fe,Er,2)}),"(",Se,");",ur,".call(this,a0,a1);"))}}Object.keys(fe.state).length>0&&_e(te.shared.current,".dirty=true;"),te.shared.vao&&_e(te.shared.vao,".setVAO(null);")}function pt(te,fe){var _e=te.proc("scope",3);te.batchId="a2";var er=te.shared,nr=er.current;if(Vn(te,_e,fe.context),fe.framebuffer&&fe.framebuffer.append(te,_e),Re(Object.keys(fe.state)).forEach(function(Le){var pe=fe.state[Le],Se=pe.append(te,_e);Gl(Se)?Se.forEach(function(ce,je){st(ce)?_e.set(te.next[Le],"["+je+"]",ce):_e.set(te.next[Le],"["+je+"]",te.link(ce,{stable:!0}))}):cr(pe)?_e.set(er.next,"."+Le,te.link(Se,{stable:!0})):_e.set(er.next,"."+Le,Se)}),Ua(te,_e,fe,!0,!0),[Ns,Nd,Eu,Mi,Cu].forEach(function(Le){var pe=fe.draw[Le];if(pe){var Se=pe.append(te,_e);st(Se)?_e.set(er.draw,"."+Le,Se):_e.set(er.draw,"."+Le,te.link(Se),{stable:!0})}}),Object.keys(fe.uniforms).forEach(function(Le){var pe=fe.uniforms[Le].append(te,_e);Array.isArray(pe)&&(pe="["+pe.map(function(Se){return st(Se)?Se:te.link(Se,{stable:!0})})+"]"),_e.set(er.uniforms,"["+te.link(ie.id(Le),{stable:!0})+"]",pe)}),Object.keys(fe.attributes).forEach(function(Le){var pe=fe.attributes[Le].append(te,_e),Se=te.scopeAttrib(Le);Object.keys(new sr).forEach(function(ce){_e.set(Se,"."+ce,pe[ce])})}),fe.scopeVAO){var He=fe.scopeVAO.append(te,_e);st(He)?_e.set(er.vao,".targetVAO",He):_e.set(er.vao,".targetVAO",te.link(He,{stable:!0}))}function Be(Le){var pe=fe.shader[Le];if(pe){var Se=pe.append(te,_e);st(Se)?_e.set(er.shader,"."+Le,Se):_e.set(er.shader,"."+Le,te.link(Se,{stable:!0}))}}Be(Ps),Be(ku),Object.keys(fe.state).length>0&&(_e(nr,".dirty=true;"),_e.exit(nr,".dirty=true;")),_e("a1(",te.shared.context,",a0,",te.batchId,");")}function fa(te){if(!(typeof te!="object"||Gl(te))){for(var fe=Object.keys(te),_e=0;_e=0;--Gt){var da=At[Gt];da&&da(hr,null,0)}ue.flush(),Fr&&Fr.update()}function $t(){!Rt&&At.length>0&&(Rt=d.next(Pt))}function vn(){Rt&&(d.cancel(Pt),Rt=null)}function ei(Gt){Gt.preventDefault(),Qe=!0,vn(),zt.forEach(function(da){da()})}function na(Gt){ue.getError(),Qe=!1,ar.restore(),wt.restore(),Nr.restore(),xr.restore(),dr.restore(),lt.restore(),et.restore(),Fr&&Fr.restore(),Xr.procs.refresh(),$t(),Kr.forEach(function(da){da()})}st&&(st.addEventListener(Ut,ei,!1),st.addEventListener(ua,na,!1));function Ji(){At.length=0,vn(),st&&(st.removeEventListener(Ut,ei),st.removeEventListener(ua,na)),wt.clear(),lt.clear(),dr.clear(),et.clear(),xr.clear(),wr.clear(),Nr.clear(),Fr&&Fr.clear(),vt.forEach(function(Gt){Gt()})}function Ia(Gt){function da(He){var Be=e({},He);delete Be.uniforms,delete Be.attributes,delete Be.context,delete Be.vao,"stencil"in Be&&Be.stencil.op&&(Be.stencil.opBack=Be.stencil.opFront=Be.stencil.op,delete Be.stencil.op);function Le(pe){if(pe in Be){var Se=Be[pe];delete Be[pe],Object.keys(Se).forEach(function(ce){Be[pe+"."+ce]=Se[ce]})}}return Le("blend"),Le("depth"),Le("cull"),Le("stencil"),Le("polygonOffset"),Le("scissor"),Le("sample"),"vao"in He&&(Be.vao=He.vao),Be}function Za(He,Be){var Le={},pe={};return Object.keys(He).forEach(function(Se){var ce=He[Se];if(h.isDynamic(ce)){pe[Se]=h.unbox(ce,Se);return}else if(Be&&Array.isArray(ce)){for(var je=0;je0)return te.call(this,er(He|0),He|0)}else if(Array.isArray(He)){if(He.length)return te.call(this,He,He.length)}else return ht.call(this,He)}return e(nr,{stats:fa,destroy:function(){Oa.destroy()}})}var Si=lt.setFBO=Ia({framebuffer:h.define.call(null,Ba,"framebuffer")});function Ii(Gt,da){var Za=0;Xr.procs.poll();var le=da.color;le&&(ue.clearColor(+le[0]||0,+le[1]||0,+le[2]||0,+le[3]||0),Za|=tn),"depth"in da&&(ue.clearDepth(+da.depth),Za|=xa),"stencil"in da&&(ue.clearStencil(da.stencil|0),Za|=zr),ue.clear(Za)}function $i(Gt){if("framebuffer"in Gt)if(Gt.framebuffer&&Gt.framebuffer_reglType==="framebufferCube")for(var da=0;da<6;++da)Si(e({framebuffer:Gt.framebuffer.faces[da]},Gt),Ii);else Si(Gt,Ii);else Ii(null,Gt)}function Vn(Gt){At.push(Gt);function da(){var Za=Qn(At,Gt);function le(){var rr=Qn(At,le);At[rr]=At[At.length-1],At.length-=1,At.length<=0&&vn()}At[Za]=le}return $t(),{cancel:da}}function Yn(){var Gt=Vr.viewport,da=Vr.scissor_box;Gt[0]=Gt[1]=da[0]=da[1]=0,hr.viewportWidth=hr.framebufferWidth=hr.drawingBufferWidth=Gt[2]=da[2]=ue.drawingBufferWidth,hr.viewportHeight=hr.framebufferHeight=hr.drawingBufferHeight=Gt[3]=da[3]=ue.drawingBufferHeight}function ri(){hr.tick+=1,hr.time=fi(),Yn(),Xr.procs.poll()}function Yt(){xr.refresh(),Yn(),Xr.procs.refresh(),Fr&&Fr.update()}function fi(){return(p()-xt)/1e3}Yt();function Ua(Gt,da){var Za;switch(Gt){case"frame":return Vn(da);case"lost":Za=zt;break;case"restore":Za=Kr;break;case"destroy":Za=vt;break;default:}return Za.push(da),{cancel:function(){for(var le=0;le=0},read:Hr,destroy:Ji,_gl:ue,_refresh:Yt,poll:function(){ri(),Fr&&Fr.update()},now:fi,stats:br,getCachedCode:Oi,preloadCachedCode:Ki});return ie.onDone(null,Qi),Qi}return gi})});var qQ=R((BPe,DQ)=>{"use strict";var k8e=hs();DQ.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},EQ(r)?r={container:r}:C8e(r)?r={container:r}:E8e(r)?r={gl:r}:r=k8e(r,{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),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var t=document.querySelector(r.container);if(!t)throw Error("Element "+r.container+" is not found");r.container=t}EQ(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=LQ(),r.container.appendChild(r.canvas),CQ(r))}else if(!r.canvas)if(typeof document!="undefined")r.container=document.body||document.documentElement,r.canvas=LQ(),r.container.appendChild(r.canvas),CQ(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{r.gl=r.canvas.getContext(a,r.attrs)}catch(n){}return r.gl}),r.gl};function CQ(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 r=e.container.getBoundingClientRect();e.canvas.width=e.width||r.right-r.left,e.canvas.height=e.height||r.bottom-r.top}}function EQ(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function C8e(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function E8e(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function LQ(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var RQ=R((UPe,FQ)=>{"use strict";var L8e=zT(),D8e=[32,126];FQ.exports=q8e;function q8e(e){e=e||{};var r=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],t=e.canvas||document.createElement("canvas"),a=e.font,n=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||D8e;if(a&&typeof a!="string"&&(a=L8e(a)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],l=i[0],s=0;l<=i[1];l++)o[s++]=String.fromCharCode(l);i=o}r=r.slice(),t.width=r[0],t.height=r[1];var u=t.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,t.width,t.height),u.font=a,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var f=n[0]/2,c=n[1]/2,l=0;lr[0]-n[0]/2&&(f=n[0]/2,c+=n[1]);return t}});var VT=R(En=>{"use strict";"use restrict";var HT=32;En.INT_BITS=HT;En.INT_MAX=2147483647;En.INT_MIN=-1<0)-(e<0)};En.abs=function(e){var r=e>>HT-1;return(e^r)-r};En.min=function(e,r){return r^(e^r)&-(e65535)<<4,e>>>=r,t=(e>255)<<3,e>>>=t,r|=t,t=(e>15)<<2,e>>>=t,r|=t,t=(e>3)<<1,e>>>=t,r|=t,r|e>>1};En.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};En.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function PQ(e){var r=32;return e&=-e,e&&r--,e&65535&&(r-=16),e&16711935&&(r-=8),e&252645135&&(r-=4),e&858993459&&(r-=2),e&1431655765&&(r-=1),r}En.countTrailingZeros=PQ;En.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};En.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};En.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var gm=new Array(256);(function(e){for(var r=0;r<256;++r){var t=r,a=r,n=7;for(t>>>=1;t;t>>>=1)a<<=1,a|=t&1,--n;e[r]=a<>>8&255]<<16|gm[e>>>16&255]<<8|gm[e>>>24&255]};En.interleave2=function(e,r){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r&=65535,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e|r<<1};En.deinterleave2=function(e,r){return e=e>>>r&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};En.interleave3=function(e,r,t){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|=r<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|t<<2};En.deinterleave3=function(e,r){return e=e>>>r&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};En.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>PQ(e)+1}});var OQ=R((HPe,IQ)=>{"use strict";function NQ(e,r,t){var a=e[t]|0;if(a<=0)return[];var n=new Array(a),i;if(t===e.length-1)for(i=0;i0)return F8e(e|0,r);break;case"object":if(typeof e.length=="number")return NQ(e,r,0);break}return[]}IQ.exports=R8e});var UQ=R(Zx=>{"use strict";Zx.byteLength=N8e;Zx.toByteArray=O8e;Zx.fromByteArray=U8e;var ps=[],al=[],P8e=typeof Uint8Array!="undefined"?Uint8Array:Array,YT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(vv=0,zQ=YT.length;vv0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var a=t===r?0:4-t%4;return[t,a]}function N8e(e){var r=BQ(e),t=r[0],a=r[1];return(t+a)*3/4-a}function I8e(e,r,t){return(r+t)*3/4-t}function O8e(e){var r,t=BQ(e),a=t[0],n=t[1],i=new P8e(I8e(e,a,n)),o=0,l=n>0?a-4:a,s;for(s=0;s>16&255,i[o++]=r>>8&255,i[o++]=r&255;return n===2&&(r=al[e.charCodeAt(s)]<<2|al[e.charCodeAt(s+1)]>>4,i[o++]=r&255),n===1&&(r=al[e.charCodeAt(s)]<<10|al[e.charCodeAt(s+1)]<<4|al[e.charCodeAt(s+2)]>>2,i[o++]=r>>8&255,i[o++]=r&255),i}function z8e(e){return ps[e>>18&63]+ps[e>>12&63]+ps[e>>6&63]+ps[e&63]}function B8e(e,r,t){for(var a,n=[],i=r;il?l:o+i));return a===1?(r=e[t-1],n.push(ps[r>>2]+ps[r<<4&63]+"==")):a===2&&(r=(e[t-2]<<8)+e[t-1],n.push(ps[r>>10]+ps[r>>4&63]+ps[r<<2&63]+"=")),n.join("")}});var GQ=R(WT=>{WT.read=function(e,r,t,a,n){var i,o,l=n*8-a-1,s=(1<>1,f=-7,c=t?n-1:0,h=t?-1:1,d=e[r+c];for(c+=h,i=d&(1<<-f)-1,d>>=-f,f+=l;f>0;i=i*256+e[r+c],c+=h,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=a;f>0;o=o*256+e[r+c],c+=h,f-=8);if(i===0)i=1-u;else{if(i===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,a),i=i-u}return(d?-1:1)*o*Math.pow(2,i-a)};WT.write=function(e,r,t,a,n,i){var o,l,s,u=i*8-n-1,f=(1<>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=a?0:i-1,p=a?1:-1,g=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,o=f):(o=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+c>=1?r+=h/s:r+=h*Math.pow(2,1-c),r*s>=2&&(o++,s/=2),o+c>=f?(l=0,o=f):o+c>=1?(l=(r*s-1)*Math.pow(2,n),o=o+c):(l=r*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[t+d]=l&255,d+=p,l/=256,n-=8);for(o=o<0;e[t+d]=o&255,d+=p,o/=256,u-=8);e[t+d-p]|=g*128}});var iee=R(Wh=>{"use strict";var jT=UQ(),Vh=GQ(),HQ=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Wh.Buffer=_r;Wh.SlowBuffer=j8e;Wh.INSPECT_MAX_BYTES=50;var Jx=2147483647;Wh.kMaxLength=Jx;_r.TYPED_ARRAY_SUPPORT=G8e();!_r.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 G8e(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(e){return!1}}Object.defineProperty(_r.prototype,"parent",{enumerable:!0,get:function(){if(_r.isBuffer(this))return this.buffer}});Object.defineProperty(_r.prototype,"offset",{enumerable:!0,get:function(){if(_r.isBuffer(this))return this.byteOffset}});function su(e){if(e>Jx)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,_r.prototype),r}function _r(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return $T(e)}return jQ(e,r,t)}_r.poolSize=8192;function jQ(e,r,t){if(typeof e=="string")return V8e(e,r);if(ArrayBuffer.isView(e))return Y8e(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(ms(e,ArrayBuffer)||e&&ms(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ms(e,SharedArrayBuffer)||e&&ms(e.buffer,SharedArrayBuffer)))return ZT(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return _r.from(a,r,t);let n=W8e(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return _r.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}_r.from=function(e,r,t){return jQ(e,r,t)};Object.setPrototypeOf(_r.prototype,Uint8Array.prototype);Object.setPrototypeOf(_r,Uint8Array);function XQ(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 H8e(e,r,t){return XQ(e),e<=0?su(e):r!==void 0?typeof t=="string"?su(e).fill(r,t):su(e).fill(r):su(e)}_r.alloc=function(e,r,t){return H8e(e,r,t)};function $T(e){return XQ(e),su(e<0?0:KT(e)|0)}_r.allocUnsafe=function(e){return $T(e)};_r.allocUnsafeSlow=function(e){return $T(e)};function V8e(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!_r.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=ZQ(e,r)|0,a=su(t),n=a.write(e,r);return n!==t&&(a=a.slice(0,n)),a}function XT(e){let r=e.length<0?0:KT(e.length)|0,t=su(r);for(let a=0;a=Jx)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Jx.toString(16)+" bytes");return e|0}function j8e(e){return+e!=e&&(e=0),_r.alloc(+e)}_r.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==_r.prototype};_r.compare=function(r,t){if(ms(r,Uint8Array)&&(r=_r.from(r,r.offset,r.byteLength)),ms(t,Uint8Array)&&(t=_r.from(t,t.offset,t.byteLength)),!_r.isBuffer(r)||!_r.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let a=r.length,n=t.length;for(let i=0,o=Math.min(a,n);in.length?(_r.isBuffer(o)||(o=_r.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(_r.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ZQ(e,r){if(_r.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ms(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 t=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return JT(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return nee(e).length;default:if(n)return a?-1:JT(e).length;r=(""+r).toLowerCase(),n=!0}}_r.byteLength=ZQ;function X8e(e,r,t){let a=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return n7e(this,r,t);case"utf8":case"utf-8":return $Q(this,r,t);case"ascii":return t7e(this,r,t);case"latin1":case"binary":return a7e(this,r,t);case"base64":return e7e(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i7e(this,r,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}_r.prototype._isBuffer=!0;function hv(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}_r.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(r+=" ... "),""};HQ&&(_r.prototype[HQ]=_r.prototype.inspect);_r.prototype.compare=function(r,t,a,n,i){if(ms(r,Uint8Array)&&(r=_r.from(r,r.offset,r.byteLength)),!_r.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),a===void 0&&(a=r?r.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||a>r.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=a)return 0;if(n>=i)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,n>>>=0,i>>>=0,this===r)return 0;let o=i-n,l=a-t,s=Math.min(o,l),u=this.slice(n,i),f=r.slice(t,a);for(let c=0;c2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,e9(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=_r.from(r,a)),_r.isBuffer(r))return r.length===0?-1:VQ(e,r,t,a,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):VQ(e,[r],t,a,n);throw new TypeError("val must be string, number or Buffer")}function VQ(e,r,t,a,n){let i=1,o=e.length,l=r.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||r.length<2)return-1;i=2,o/=2,l/=2,t/=2}function s(f,c){return i===1?f[c]:f.readUInt16BE(c*i)}let u;if(n){let f=-1;for(u=t;uo&&(t=o-l),u=t;u>=0;u--){let f=!0;for(let c=0;cn&&(a=n)):a=n;let i=r.length;a>i/2&&(a=i/2);let o;for(o=0;o>>0,isFinite(a)?(a=a>>>0,n===void 0&&(n="utf8")):(n=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((a===void 0||a>i)&&(a=i),r.length>0&&(a<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Z8e(this,r,t,a);case"utf8":case"utf-8":return J8e(this,r,t,a);case"ascii":case"latin1":case"binary":return $8e(this,r,t,a);case"base64":return K8e(this,r,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q8e(this,r,t,a);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};_r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function e7e(e,r,t){return r===0&&t===e.length?jT.fromByteArray(e):jT.fromByteArray(e.slice(r,t))}function $Q(e,r,t){t=Math.min(e.length,t);let a=[],n=r;for(;n239?4:i>223?3:i>191?2:1;if(n+l<=t){let s,u,f,c;switch(l){case 1:i<128&&(o=i);break;case 2:s=e[n+1],(s&192)===128&&(c=(i&31)<<6|s&63,c>127&&(o=c));break;case 3:s=e[n+1],u=e[n+2],(s&192)===128&&(u&192)===128&&(c=(i&15)<<12|(s&63)<<6|u&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:s=e[n+1],u=e[n+2],f=e[n+3],(s&192)===128&&(u&192)===128&&(f&192)===128&&(c=(i&15)<<18|(s&63)<<12|(u&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,a.push(o>>>10&1023|55296),o=56320|o&1023),a.push(o),n+=l}return r7e(a)}var YQ=4096;function r7e(e){let r=e.length;if(r<=YQ)return String.fromCharCode.apply(String,e);let t="",a=0;for(;aa)&&(t=a);let n="";for(let i=r;ia&&(r=a),t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),tt)throw new RangeError("Trying to access beyond buffer length")}_r.prototype.readUintLE=_r.prototype.readUIntLE=function(r,t,a){r=r>>>0,t=t>>>0,a||mi(r,t,this.length);let n=this[r],i=1,o=0;for(;++o>>0,t=t>>>0,a||mi(r,t,this.length);let n=this[r+--t],i=1;for(;t>0&&(i*=256);)n+=this[r+--t]*i;return n};_r.prototype.readUint8=_r.prototype.readUInt8=function(r,t){return r=r>>>0,t||mi(r,1,this.length),this[r]};_r.prototype.readUint16LE=_r.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||mi(r,2,this.length),this[r]|this[r+1]<<8};_r.prototype.readUint16BE=_r.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||mi(r,2,this.length),this[r]<<8|this[r+1]};_r.prototype.readUint32LE=_r.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};_r.prototype.readUint32BE=_r.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};_r.prototype.readBigUInt64LE=kf(function(r){r=r>>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,i=this[++r]+this[++r]*2**8+this[++r]*2**16+a*2**24;return BigInt(n)+(BigInt(i)<>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],i=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+a;return(BigInt(n)<>>0,t=t>>>0,a||mi(r,t,this.length);let n=this[r],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};_r.prototype.readIntBE=function(r,t,a){r=r>>>0,t=t>>>0,a||mi(r,t,this.length);let n=t,i=1,o=this[r+--n];for(;n>0&&(i*=256);)o+=this[r+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};_r.prototype.readInt8=function(r,t){return r=r>>>0,t||mi(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};_r.prototype.readInt16LE=function(r,t){r=r>>>0,t||mi(r,2,this.length);let a=this[r]|this[r+1]<<8;return a&32768?a|4294901760:a};_r.prototype.readInt16BE=function(r,t){r=r>>>0,t||mi(r,2,this.length);let a=this[r+1]|this[r]<<8;return a&32768?a|4294901760:a};_r.prototype.readInt32LE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};_r.prototype.readInt32BE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};_r.prototype.readBigInt64LE=kf(function(r){r=r>>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(a<<24);return(BigInt(n)<>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<>>0,t||mi(r,4,this.length),Vh.read(this,r,!0,23,4)};_r.prototype.readFloatBE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),Vh.read(this,r,!1,23,4)};_r.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||mi(r,8,this.length),Vh.read(this,r,!0,52,8)};_r.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||mi(r,8,this.length),Vh.read(this,r,!1,52,8)};function mo(e,r,t,a,n,i){if(!_r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||re.length)throw new RangeError("Index out of range")}_r.prototype.writeUintLE=_r.prototype.writeUIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;mo(this,r,t,a,l,0)}let i=1,o=0;for(this[t]=r&255;++o>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;mo(this,r,t,a,l,0)}let i=a-1,o=1;for(this[t+i]=r&255;--i>=0&&(o*=256);)this[t+i]=r/o&255;return t+a};_r.prototype.writeUint8=_r.prototype.writeUInt8=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,1,255,0),this[t]=r&255,t+1};_r.prototype.writeUint16LE=_r.prototype.writeUInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};_r.prototype.writeUint16BE=_r.prototype.writeUInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};_r.prototype.writeUint32LE=_r.prototype.writeUInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};_r.prototype.writeUint32BE=_r.prototype.writeUInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function KQ(e,r,t,a,n){aee(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,t}function QQ(e,r,t,a,n){aee(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t+7]=i,i=i>>8,e[t+6]=i,i=i>>8,e[t+5]=i,i=i>>8,e[t+4]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=o,o=o>>8,e[t+2]=o,o=o>>8,e[t+1]=o,o=o>>8,e[t]=o,t+8}_r.prototype.writeBigUInt64LE=kf(function(r,t=0){return KQ(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});_r.prototype.writeBigUInt64BE=kf(function(r,t=0){return QQ(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});_r.prototype.writeIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);mo(this,r,t,a,s-1,-s)}let i=0,o=1,l=0;for(this[t]=r&255;++i>0)-l&255;return t+a};_r.prototype.writeIntBE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);mo(this,r,t,a,s-1,-s)}let i=a-1,o=1,l=0;for(this[t+i]=r&255;--i>=0&&(o*=256);)r<0&&l===0&&this[t+i+1]!==0&&(l=1),this[t+i]=(r/o>>0)-l&255;return t+a};_r.prototype.writeInt8=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};_r.prototype.writeInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};_r.prototype.writeInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};_r.prototype.writeInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};_r.prototype.writeInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};_r.prototype.writeBigInt64LE=kf(function(r,t=0){return KQ(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});_r.prototype.writeBigInt64BE=kf(function(r,t=0){return QQ(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function eee(e,r,t,a,n,i){if(t+a>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ree(e,r,t,a,n){return r=+r,t=t>>>0,n||eee(e,r,t,4,34028234663852886e22,-34028234663852886e22),Vh.write(e,r,t,a,23,4),t+4}_r.prototype.writeFloatLE=function(r,t,a){return ree(this,r,t,!0,a)};_r.prototype.writeFloatBE=function(r,t,a){return ree(this,r,t,!1,a)};function tee(e,r,t,a,n){return r=+r,t=t>>>0,n||eee(e,r,t,8,17976931348623157e292,-17976931348623157e292),Vh.write(e,r,t,a,52,8),t+8}_r.prototype.writeDoubleLE=function(r,t,a){return tee(this,r,t,!0,a)};_r.prototype.writeDoubleBE=function(r,t,a){return tee(this,r,t,!1,a)};_r.prototype.copy=function(r,t,a,n){if(!_r.isBuffer(r))throw new TypeError("argument should be a Buffer");if(a||(a=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t>>0,a=a===void 0?this.length:a>>>0,r||(r=0);let i;if(typeof r=="number")for(i=t;i2**32?n=WQ(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=WQ(n)),n+="n"),a+=` It must be ${r}. Received ${n}`,a},RangeError);function WQ(e){let r="",t=e.length,a=e[0]==="-"?1:0;for(;t>=a+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function o7e(e,r,t){Yh(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&bm(r,e.length-(t+1))}function aee(e,r,t,a,n,i){if(e>t||e3?r===0||r===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:l=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:l=`>= ${r}${o} and <= ${t}${o}`,new Hh.ERR_OUT_OF_RANGE("value",l,e)}o7e(a,n,i)}function Yh(e,r){if(typeof e!="number")throw new Hh.ERR_INVALID_ARG_TYPE(r,"number",e)}function bm(e,r,t){throw Math.floor(e)!==e?(Yh(e,t),new Hh.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new Hh.ERR_BUFFER_OUT_OF_BOUNDS:new Hh.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var l7e=/[^+/0-9A-Za-z-_]/g;function s7e(e){if(e=e.split("=")[0],e=e.trim().replace(l7e,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function JT(e,r){r=r||1/0;let t,a=e.length,n=null,i=[];for(let o=0;o55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(o+1===a){(r-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&i.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function u7e(e){let r=[];for(let t=0;t>8,n=t%256,i.push(n),i.push(a);return i}function nee(e){return jT.toByteArray(s7e(e))}function $x(e,r,t,a){let n;for(n=0;n=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function ms(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function e9(e){return e!==e}var c7e=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let a=t*16;for(let n=0;n<16;++n)r[a+n]=e[t]+e[n]}return r}();function kf(e){return typeof BigInt=="undefined"?v7e:e}function v7e(){throw new Error("BigInt not supported")}});var xee=R(wa=>{"use strict";var Cf=VT(),Ai=OQ(),oee=iee().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ai([32,0]),UINT16:Ai([32,0]),UINT32:Ai([32,0]),BIGUINT64:Ai([32,0]),INT8:Ai([32,0]),INT16:Ai([32,0]),INT32:Ai([32,0]),BIGINT64:Ai([32,0]),FLOAT:Ai([32,0]),DOUBLE:Ai([32,0]),DATA:Ai([32,0]),UINT8C:Ai([32,0]),BUFFER:Ai([32,0])});var h7e=typeof Uint8ClampedArray!="undefined",d7e=typeof BigUint64Array!="undefined",p7e=typeof BigInt64Array!="undefined",zn=window.__TYPEDARRAY_POOL;zn.UINT8C||(zn.UINT8C=Ai([32,0]));zn.BIGUINT64||(zn.BIGUINT64=Ai([32,0]));zn.BIGINT64||(zn.BIGINT64=Ai([32,0]));zn.BUFFER||(zn.BUFFER=Ai([32,0]));var Kx=zn.DATA,Qx=zn.BUFFER;wa.free=function(r){if(oee.isBuffer(r))Qx[Cf.log2(r.length)].push(r);else{if(Object.prototype.toString.call(r)!=="[object ArrayBuffer]"&&(r=r.buffer),!r)return;var t=r.length||r.byteLength,a=Cf.log2(t)|0;Kx[a].push(r)}};function lee(e){if(e){var r=e.length||e.byteLength,t=Cf.log2(r);Kx[t].push(e)}}function m7e(e){lee(e.buffer)}wa.freeUint8=wa.freeUint16=wa.freeUint32=wa.freeBigUint64=wa.freeInt8=wa.freeInt16=wa.freeInt32=wa.freeBigInt64=wa.freeFloat32=wa.freeFloat=wa.freeFloat64=wa.freeDouble=wa.freeUint8Clamped=wa.freeDataView=m7e;wa.freeArrayBuffer=lee;wa.freeBuffer=function(r){Qx[Cf.log2(r.length)].push(r)};wa.malloc=function(r,t){if(t===void 0||t==="arraybuffer")return yo(r);switch(t){case"uint8":return r9(r);case"uint16":return see(r);case"uint32":return uee(r);case"int8":return fee(r);case"int16":return cee(r);case"int32":return vee(r);case"float":case"float32":return hee(r);case"double":case"float64":return dee(r);case"uint8_clamped":return pee(r);case"bigint64":return yee(r);case"biguint64":return mee(r);case"buffer":return bee(r);case"data":case"dataview":return gee(r);default:return null}return null};function yo(r){var r=Cf.nextPow2(r),t=Cf.log2(r),a=Kx[t];return a.length>0?a.pop():new ArrayBuffer(r)}wa.mallocArrayBuffer=yo;function r9(e){return new Uint8Array(yo(e),0,e)}wa.mallocUint8=r9;function see(e){return new Uint16Array(yo(2*e),0,e)}wa.mallocUint16=see;function uee(e){return new Uint32Array(yo(4*e),0,e)}wa.mallocUint32=uee;function fee(e){return new Int8Array(yo(e),0,e)}wa.mallocInt8=fee;function cee(e){return new Int16Array(yo(2*e),0,e)}wa.mallocInt16=cee;function vee(e){return new Int32Array(yo(4*e),0,e)}wa.mallocInt32=vee;function hee(e){return new Float32Array(yo(4*e),0,e)}wa.mallocFloat32=wa.mallocFloat=hee;function dee(e){return new Float64Array(yo(8*e),0,e)}wa.mallocFloat64=wa.mallocDouble=dee;function pee(e){return h7e?new Uint8ClampedArray(yo(e),0,e):r9(e)}wa.mallocUint8Clamped=pee;function mee(e){return d7e?new BigUint64Array(yo(8*e),0,e):null}wa.mallocBigUint64=mee;function yee(e){return p7e?new BigInt64Array(yo(8*e),0,e):null}wa.mallocBigInt64=yee;function gee(e){return new DataView(yo(e),0,e)}wa.mallocDataView=gee;function bee(e){e=Cf.nextPow2(e);var r=Cf.log2(e),t=Qx[r];return t.length>0?t.pop():new oee(e)}wa.mallocBuffer=bee;wa.clearCache=function(){for(var r=0;r<32;++r)zn.UINT8[r].length=0,zn.UINT16[r].length=0,zn.UINT32[r].length=0,zn.INT8[r].length=0,zn.INT16[r].length=0,zn.INT32[r].length=0,zn.FLOAT[r].length=0,zn.DOUBLE[r].length=0,zn.BIGUINT64[r].length=0,zn.BIGINT64[r].length=0,zn.UINT8C[r].length=0,Kx[r].length=0,Qx[r].length=0}});var wee=R((ZPe,_ee)=>{"use strict";var y7e=Object.prototype.toString;_ee.exports=function(e){var r;return y7e.call(e)==="[object Object]"&&(r=Object.getPrototypeOf(e),r===null||r===Object.getPrototypeOf({}))}});var t9=R((JPe,Aee)=>{Aee.exports=function(r,t){t||(t=[0,""]),r=String(r);var a=parseFloat(r,10);return t[0]=a,t[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}});var See=R(($Pe,Mee)=>{"use strict";var g7e=t9();Mee.exports=Tee;var xm=96;function a9(e,r){var t=g7e(getComputedStyle(e).getPropertyValue(r));return t[0]*Tee(t[1],e)}function b7e(e,r){var t=document.createElement("div");t.style["font-size"]="128"+e,r.appendChild(t);var a=a9(t,"font-size")/128;return r.removeChild(t),a}function Tee(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return b7e(e,r);case"em":return a9(r,"font-size");case"rem":return a9(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 xm;case"cm":return xm/2.54;case"mm":return xm/25.4;case"pt":return xm/72;case"pc":return xm/6}return 1}});var Eee=R((KPe,Cee)=>{"use strict";Cee.exports=t5;var x7e=t5.canvas=document.createElement("canvas"),e5=x7e.getContext("2d"),kee=r5([32,126]);t5.createPairs=r5;t5.ascii=kee;function t5(e,r){Array.isArray(e)&&(e=e.join(", "));var t={},a,n=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?a=r5(r):Array.isArray(r)?a=r:(r.o?a=r5(r.o):r.pairs&&(a=r.pairs),r.fontSize&&(n=r.fontSize),r.threshold!=null&&(i=r.threshold))),a||(a=kee),e5.font=n+"px "+e;for(var o=0;on*i){var f=(u-s)/n;t[l]=f*1e3}}return t}function r5(e){for(var r=[],t=e[0];t<=e[1];t++)for(var a=String.fromCharCode(t),n=e[0];n{"use strict";qee.exports=Ef;Ef.canvas=document.createElement("canvas");Ef.cache={};function Ef(o,r){r||(r={}),(typeof o=="string"||Array.isArray(o))&&(r.family=o);var t=Array.isArray(r.family)?r.family.join(", "):r.family;if(!t)throw Error("`family` must be defined");var a=r.size||r.fontSize||r.em||48,n=r.weight||r.fontWeight||"",i=r.style||r.fontStyle||"",o=[i,n,a].join(" ")+"px "+t,l=r.origin||"top";if(Ef.cache[t]&&a<=Ef.cache[t].em)return Lee(Ef.cache[t],l);var s=r.canvas||Ef.canvas,u=s.getContext("2d"),f={upper:r.upper!==void 0?r.upper:"H",lower:r.lower!==void 0?r.lower:"x",descent:r.descent!==void 0?r.descent:"p",ascent:r.ascent!==void 0?r.ascent:"h",tittle:r.tittle!==void 0?r.tittle:"i",overshoot:r.overshoot!==void 0?r.overshoot:"O"},c=Math.ceil(a*1.5);s.height=c,s.width=c*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,c,c),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var p=ys(u.getImageData(0,0,c,c));u.clearRect(0,0,c,c),u.textBaseline="bottom",u.fillText(h,0,c);var g=ys(u.getImageData(0,0,c,c));d.lineHeight=d.bottom=c-g+p,u.clearRect(0,0,c,c),u.textBaseline="alphabetic",u.fillText(h,0,c);var m=ys(u.getImageData(0,0,c,c)),b=c-m-1+p;d.baseline=d.alphabetic=b,u.clearRect(0,0,c,c),u.textBaseline="middle",u.fillText(h,0,c*.5);var _=ys(u.getImageData(0,0,c,c));d.median=d.middle=c-_-1+p-c*.5,u.clearRect(0,0,c,c),u.textBaseline="hanging",u.fillText(h,0,c*.5);var w=ys(u.getImageData(0,0,c,c));d.hanging=c-w-1+p-c*.5,u.clearRect(0,0,c,c),u.textBaseline="ideographic",u.fillText(h,0,c);var x=ys(u.getImageData(0,0,c,c));if(d.ideographic=c-x-1+p,f.upper&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.upper,0,0),d.upper=ys(u.getImageData(0,0,c,c)),d.capHeight=d.baseline-d.upper),f.lower&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.lower,0,0),d.lower=ys(u.getImageData(0,0,c,c)),d.xHeight=d.baseline-d.lower),f.tittle&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.tittle,0,0),d.tittle=ys(u.getImageData(0,0,c,c))),f.ascent&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.ascent,0,0),d.ascent=ys(u.getImageData(0,0,c,c))),f.descent&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.descent,0,0),d.descent=Dee(u.getImageData(0,0,c,c))),f.overshoot){u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.overshoot,0,0);var T=Dee(u.getImageData(0,0,c,c));d.overshoot=T-b}for(var S in d)d[S]/=a;return d.em=a,Ef.cache[t]=d,Lee(d,l)}function Lee(e,r){var t={};typeof r=="string"&&(r=e[r]);for(var a in e)a!=="em"&&(t[a]=e[a]-r);return t}function ys(e){for(var r=e.height,t=e.data,a=3;a0;a-=4)if(t[a]!==0)return Math.floor((a-3)*.25/r)}});var Iee=R((eNe,Nee)=>{"use strict";var jh=kQ(),_7e=hs(),w7e=GT(),A7e=qQ(),T7e=MT(),n9=ov(),M7e=RQ(),Lf=xee(),S7e=gh(),k7e=wee(),C7e=t9(),E7e=See(),L7e=Eee(),D7e=kn(),q7e=Fee(),F7e=Qc(),R7e=VT(),Ree=R7e.nextPow2,Pee=new T7e,n5=!1;document.body&&(a5=document.body.appendChild(document.createElement("div")),a5.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(a5).fontStretch&&(n5=!0),document.body.removeChild(a5));var a5,Ra=function(r){P7e(r)?(r={regl:r},this.gl=r.regl._gl):this.gl=A7e(r),this.shader=Pee.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=r.regl||w7e({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(),Pee.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(k7e(r)?r:{})};Ra.prototype.createShader=function(){var r=this.regl,t=r({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:r.prop("count"),offset:r.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:r.this("sizeBuffer")},width:{offset:0,stride:8,buffer:r.this("sizeBuffer")},char:r.this("charBuffer"),position:r.this("position")},uniforms:{atlasSize:function(n,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(n,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(n,i){return i.atlas.texture},charStep:function(n,i){return i.atlas.step},em:function(n,i){return i.atlas.em},color:r.prop("color"),opacity:r.prop("opacity"),viewport:r.this("viewportArray"),scale:r.this("scale"),align:r.prop("align"),baseline:r.prop("baseline"),translate:r.this("translate"),positionOffset:r.prop("positionOffset")},primitive:"points",viewport:r.this("viewport"),vert:` +`),sr;if(ie&&(sr=t_(ze),ie[sr]))return ie[sr].apply(null,Qe);var Sr=Function.apply(null,We.concat(ze));return ie&&(ie[sr]=Sr),Sr.apply(null,Qe)}return{global:Fr,link:$e,block:br,proc:ft,scope:Dr,cond:qr,compile:Zr}}var Rs="xyzw".split(""),_d=5121,Xl=1,ec=2,wd=0,Iv=1,Ty=2,Ov=3,zv=4,Ad=5,rc=6,Td="dither",My="blend.enable",Sy="blend.color",Md="blend.equation",Sd="blend.func",kd="depth.enable",Cd="depth.func",Ed="depth.range",Ld="depth.mask",Dd="colorMask",tc="cull.enable",ky="cull.face",qd="frontFace",Bv="lineWidth",Fd="polygonOffset.enable",Rd="polygonOffset.offset",ac="sample.alpha",nc="sample.enable",Uv="sample.coverage",Pd="stencil.enable",Gv="stencil.mask",Ni="stencil.func",Hv="stencil.opFront",ic="stencil.opBack",Vv="scissor.enable",Mu="scissor.box",fl="viewport",Yv="profile",Su="framebuffer",Ps="vert",ku="frag",Ns="elements",Cu="primitive",Eu="count",Nd="offset",Mi="instances",oc="vao",Wv="Width",Po="Height",Zl=Su+Wv,Jl=Su+Po,o_=fl+Wv,l_=fl+Po,Cy="drawingBuffer",Id=Cy+Wv,Od=Cy+Po,Ey=[Sd,Md,Ni,Hv,ic,Uv,fl,Mu,Rd],Is=34962,zd=34963,Ly=2884,s_=3042,u_=3024,f_=2960,Dy=2929,qy=3089,jv=32823,Fy=32926,Xv=32928,Bd=5126,Os=35664,rn=35665,Zv=35666,$l=5124,Lu=35667,lc=35668,Ud=35669,Jv=35670,Du=35671,$v=35672,Gd=35673,Hd=35674,Vd=35675,Yd=35676,sc=35678,Wd=35680,jd=4,v=1028,y=1029,w=2304,C=2305,E=32775,L=32776,I=519,F=7680,z=0,X=1,J=32774,Q=513,ee=36160,Me=36064,qe={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ne={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},he={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},we={cw:w,ccw:C};function Fe(G){return Array.isArray(G)||Ir(G)||Gr(G)}function Re(G){return G.sort(function(ie,ue){return ie===fl?-1:ue===fl?1:ie=1,We>=2,ie)}else if(ue===zv){var Qe=G.data;return new me(Qe.thisDep,Qe.contextDep,Qe.propDep,ie)}else{if(ue===Ad)return new me(!1,!1,!1,ie);if(ue===rc){for(var ar=!1,$e=!1,br=!1,Dr=0;Dr=1&&($e=!0),Fr>=2&&(br=!0)}else qr.type===zv&&(ar=ar||qr.data.thisDep,$e=$e||qr.data.contextDep,br=br||qr.data.propDep)}return new me(ar,$e,br,ie)}else return new me(ue===Ov,ue===Ty,ue===Iv,ie)}}var Yr=new me(!1,!1,!1,function(){});function it(G,ie,ue,We,Qe,ar,$e,br,Dr,qr,Fr,xt,ft,Zr,hr,ze){var sr=qr.Record,Sr={add:32774,subtract:32778,"reverse subtract":32779};ue.ext_blend_minmax&&(Sr.min=E,Sr.max=L);var Nr=ue.angle_instanced_arrays,wr=ue.webgl_draw_buffers,et=ue.oes_vertex_array_object,Jr={dirty:!0,profile:ze.profile},wt={},xr=[],dr={},lt={};function Xr(te){return te.replace(".","_")}function Hr(te,fe,_e){var er=Xr(te);xr.push(te),wt[er]=Jr[er]=!!_e,dr[er]=fe}function Vr(te,fe,_e){var er=Xr(te);xr.push(te),Array.isArray(_e)?(Jr[er]=_e.slice(),wt[er]=_e.slice()):Jr[er]=wt[er]=_e,lt[er]=fe}function st(te){return!!isNaN(te)}Hr(Td,u_),Hr(My,s_),Vr(Sy,"blendColor",[0,0,0,0]),Vr(Md,"blendEquationSeparate",[J,J]),Vr(Sd,"blendFuncSeparate",[X,z,X,z]),Hr(kd,Dy,!0),Vr(Cd,"depthFunc",Q),Vr(Ed,"depthRange",[0,1]),Vr(Ld,"depthMask",!0),Vr(Dd,Dd,[!0,!0,!0,!0]),Hr(tc,Ly),Vr(ky,"cullFace",y),Vr(qd,qd,C),Vr(Bv,Bv,1),Hr(Fd,jv),Vr(Rd,"polygonOffset",[0,0]),Hr(ac,Fy),Hr(nc,Xv),Vr(Uv,"sampleCoverage",[1,!1]),Hr(Pd,f_),Vr(Gv,"stencilMask",-1),Vr(Ni,"stencilFunc",[I,0,-1]),Vr(Hv,"stencilOpSeparate",[v,F,F,F]),Vr(ic,"stencilOpSeparate",[y,F,F,F]),Hr(Vv,qy),Vr(Mu,"scissor",[0,0,G.drawingBufferWidth,G.drawingBufferHeight]),Vr(fl,fl,[0,0,G.drawingBufferWidth,G.drawingBufferHeight]);var At={gl:G,context:ft,strings:ie,next:wt,current:Jr,draw:xt,elements:ar,buffer:Qe,shader:Fr,attributes:qr.state,vao:qr,uniforms:Dr,framebuffer:br,extensions:ue,timer:Zr,isBufferArgs:Fe},zt={primTypes:As,compareFuncs:ne,blendFuncs:qe,blendEquations:Sr,stencilOps:he,glTypes:Bn,orientationType:we};wr&&(zt.backBuffer=[y],zt.drawBuffer=k(We.maxDrawbuffers,function(te){return te===0?[0]:k(te,function(fe){return Me+fe})}));var Kr=0;function vt(){var te=Ay({cache:hr}),fe=te.link,_e=te.global;te.id=Kr++,te.batchId="0";var er=fe(At),nr=te.shared={props:"a0"};Object.keys(At).forEach(function(Se){nr[Se]=_e.def(er,".",Se)});var He=te.next={},Be=te.current={};Object.keys(lt).forEach(function(Se){Array.isArray(Jr[Se])&&(He[Se]=_e.def(nr.next,".",Se),Be[Se]=_e.def(nr.current,".",Se))});var Le=te.constants={};Object.keys(zt).forEach(function(Se){Le[Se]=_e.def(JSON.stringify(zt[Se]))}),te.invoke=function(Se,ce){switch(ce.type){case wd:var je=["this",nr.context,nr.props,te.batchId];return Se.def(fe(ce.data),".call(",je.slice(0,Math.max(ce.data.length+1,4)),")");case Iv:return Se.def(nr.props,ce.data);case Ty:return Se.def(nr.context,ce.data);case Ov:return Se.def("this",ce.data);case zv:return ce.data.append(te,Se),ce.data.ref;case Ad:return ce.data.toString();case rc:return ce.data.map(function(ur){return te.invoke(Se,ur)})}},te.attribCache={};var pe={};return te.scopeAttrib=function(Se){var ce=ie.id(Se);if(ce in pe)return pe[ce];var je=qr.scope[ce];je||(je=qr.scope[ce]=new sr);var ur=pe[ce]=fe(je);return ur},te}function Rt(te){var fe=te.static,_e=te.dynamic,er;if(Yv in fe){var nr=!!fe[Yv];er=Mr(function(Be,Le){return nr}),er.enable=nr}else if(Yv in _e){var He=_e[Yv];er=Pr(He,function(Be,Le){return Be.invoke(Le,He)})}return er}function Pt(te,fe){var _e=te.static,er=te.dynamic;if(Su in _e){var nr=_e[Su];return nr?(nr=br.getFramebuffer(nr),Mr(function(Be,Le){var pe=Be.link(nr),Se=Be.shared;Le.set(Se.framebuffer,".next",pe);var ce=Se.context;return Le.set(ce,"."+Zl,pe+".width"),Le.set(ce,"."+Jl,pe+".height"),pe})):Mr(function(Be,Le){var pe=Be.shared;Le.set(pe.framebuffer,".next","null");var Se=pe.context;return Le.set(Se,"."+Zl,Se+"."+Id),Le.set(Se,"."+Jl,Se+"."+Od),"null"})}else if(Su in er){var He=er[Su];return Pr(He,function(Be,Le){var pe=Be.invoke(Le,He),Se=Be.shared,ce=Se.framebuffer,je=Le.def(ce,".getFramebuffer(",pe,")");Le.set(ce,".next",je);var ur=Se.context;return Le.set(ur,"."+Zl,je+"?"+je+".width:"+ur+"."+Id),Le.set(ur,"."+Jl,je+"?"+je+".height:"+ur+"."+Od),je})}else return null}function $t(te,fe,_e){var er=te.static,nr=te.dynamic;function He(pe){if(pe in er){var Se=er[pe],ce=!0,je=Se.x|0,ur=Se.y|0,Er,Mt;return"width"in Se?Er=Se.width|0:ce=!1,"height"in Se?Mt=Se.height|0:ce=!1,new me(!ce&&fe&&fe.thisDep,!ce&&fe&&fe.contextDep,!ce&&fe&&fe.propDep,function(Tt,bt){var gt=Tt.shared.context,nt=Er;"width"in Se||(nt=bt.def(gt,".",Zl,"-",je));var dt=Mt;return"height"in Se||(dt=bt.def(gt,".",Jl,"-",ur)),[je,ur,nt,dt]})}else if(pe in nr){var ut=nr[pe],at=Pr(ut,function(Tt,bt){var gt=Tt.invoke(bt,ut),nt=Tt.shared.context,dt=bt.def(gt,".x|0"),mt=bt.def(gt,".y|0"),Bt=bt.def('"width" in ',gt,"?",gt,".width|0:","(",nt,".",Zl,"-",dt,")"),Ja=bt.def('"height" in ',gt,"?",gt,".height|0:","(",nt,".",Jl,"-",mt,")");return[dt,mt,Bt,Ja]});return fe&&(at.thisDep=at.thisDep||fe.thisDep,at.contextDep=at.contextDep||fe.contextDep,at.propDep=at.propDep||fe.propDep),at}else return fe?new me(fe.thisDep,fe.contextDep,fe.propDep,function(Tt,bt){var gt=Tt.shared.context;return[0,0,bt.def(gt,".",Zl),bt.def(gt,".",Jl)]}):null}var Be=He(fl);if(Be){var Le=Be;Be=new me(Be.thisDep,Be.contextDep,Be.propDep,function(pe,Se){var ce=Le.append(pe,Se),je=pe.shared.context;return Se.set(je,"."+o_,ce[2]),Se.set(je,"."+l_,ce[3]),ce})}return{viewport:Be,scissor_box:He(Mu)}}function vn(te,fe){var _e=te.static,er=typeof _e[ku]=="string"&&typeof _e[Ps]=="string";if(er){if(Object.keys(fe.dynamic).length>0)return null;var nr=fe.static,He=Object.keys(nr);if(He.length>0&&typeof nr[He[0]]=="number"){for(var Be=[],Le=0;Le"+dt+"?"+ce+".constant["+dt+"]:0;"}).join(""),"}}else{","if(",Er,"(",ce,".buffer)){",Tt,"=",Mt,".createStream(",Is,",",ce,".buffer);","}else{",Tt,"=",Mt,".getBuffer(",ce,".buffer);","}",bt,'="type" in ',ce,"?",ur.glTypes,"[",ce,".type]:",Tt,".dtype;",ut.normalized,"=!!",ce,".normalized;");function gt(nt){Se(ut[nt],"=",ce,".",nt,"|0;")}return gt("size"),gt("offset"),gt("stride"),gt("divisor"),Se("}}"),Se.exit("if(",ut.isStream,"){",Mt,".destroyStream(",Tt,");","}"),ut}nr[He]=Pr(Be,Le)}),nr}function Ii(te){var fe=te.static,_e=te.dynamic,er={};return Object.keys(fe).forEach(function(nr){var He=fe[nr];er[nr]=Mr(function(Be,Le){return typeof He=="number"||typeof He=="boolean"?""+He:Be.link(He)})}),Object.keys(_e).forEach(function(nr){var He=_e[nr];er[nr]=Pr(He,function(Be,Le){return Be.invoke(Le,He)})}),er}function $i(te,fe,_e,er,nr){var He=te.static,Be=te.dynamic,Le=vn(te,fe),pe=Pt(te,nr),Se=$t(te,pe,nr),ce=na(te,nr),je=Ji(te,nr),ur=ei(te,nr,Le);function Er(gt){var nt=Se[gt];nt&&(je[gt]=nt)}Er(fl),Er(Xr(Mu));var Mt=Object.keys(je).length>0,ut={framebuffer:pe,draw:ce,shader:ur,state:je,dirty:Mt,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ut.profile=Rt(te,nr),ut.uniforms=Ia(_e,nr),ut.drawVAO=ut.scopeVAO=ce.vao,!ut.drawVAO&&ur.program&&!Le&&ue.angle_instanced_arrays&&ce.static.elements){var at=!0,Tt=ur.program.attributes.map(function(gt){var nt=fe.static[gt];return at=at&&!!nt,nt});if(at&&Tt.length>0){var bt=qr.getVAO(qr.createVAO({attributes:Tt,elements:ce.static.elements}));ut.drawVAO=new me(null,null,null,function(gt,nt){return gt.link(bt)}),ut.useVAO=!0}}return Le?ut.useVAO=!0:ut.attributes=Si(fe,nr),ut.context=Ii(er,nr),ut}function Vn(te,fe,_e){var er=te.shared,nr=er.context,He=te.scope();Object.keys(_e).forEach(function(Be){fe.save(nr,"."+Be);var Le=_e[Be],pe=Le.append(te,fe);Array.isArray(pe)?He(nr,".",Be,"=[",pe.join(),"];"):He(nr,".",Be,"=",pe,";")}),fe(He)}function Yn(te,fe,_e,er){var nr=te.shared,He=nr.gl,Be=nr.framebuffer,Le;wr&&(Le=fe.def(nr.extensions,".webgl_draw_buffers"));var pe=te.constants,Se=pe.drawBuffer,ce=pe.backBuffer,je;_e?je=_e.append(te,fe):je=fe.def(Be,".next"),er||fe("if(",je,"!==",Be,".cur){"),fe("if(",je,"){",He,".bindFramebuffer(",ee,",",je,".framebuffer);"),wr&&fe(Le,".drawBuffersWEBGL(",Se,"[",je,".colorAttachments.length]);"),fe("}else{",He,".bindFramebuffer(",ee,",null);"),wr&&fe(Le,".drawBuffersWEBGL(",ce,");"),fe("}",Be,".cur=",je,";"),er||fe("}")}function ri(te,fe,_e){var er=te.shared,nr=er.gl,He=te.current,Be=te.next,Le=er.current,pe=er.next,Se=te.cond(Le,".dirty");xr.forEach(function(ce){var je=Xr(ce);if(!(je in _e.state)){var ur,Er;if(je in Be){ur=Be[je],Er=He[je];var Mt=k(Jr[je].length,function(at){return Se.def(ur,"[",at,"]")});Se(te.cond(Mt.map(function(at,Tt){return at+"!=="+Er+"["+Tt+"]"}).join("||")).then(nr,".",lt[je],"(",Mt,");",Mt.map(function(at,Tt){return Er+"["+Tt+"]="+at}).join(";"),";"))}else{ur=Se.def(pe,".",je);var ut=te.cond(ur,"!==",Le,".",je);Se(ut),je in dr?ut(te.cond(ur).then(nr,".enable(",dr[je],");").else(nr,".disable(",dr[je],");"),Le,".",je,"=",ur,";"):ut(nr,".",lt[je],"(",ur,");",Le,".",je,"=",ur,";")}}}),Object.keys(_e.state).length===0&&Se(Le,".dirty=false;"),fe(Se)}function Yt(te,fe,_e,er){var nr=te.shared,He=te.current,Be=nr.current,Le=nr.gl,pe;Re(Object.keys(_e)).forEach(function(Se){var ce=_e[Se];if(!(er&&!er(ce))){var je=ce.append(te,fe);if(dr[Se]){var ur=dr[Se];cr(ce)?(pe=te.link(je,{stable:!0}),fe(te.cond(pe).then(Le,".enable(",ur,");").else(Le,".disable(",ur,");")),fe(Be,".",Se,"=",pe,";")):(fe(te.cond(je).then(Le,".enable(",ur,");").else(Le,".disable(",ur,");")),fe(Be,".",Se,"=",je,";"))}else if(Gl(je)){var Er=He[Se];fe(Le,".",lt[Se],"(",je,");",je.map(function(Mt,ut){return Er+"["+ut+"]="+Mt}).join(";"),";")}else cr(ce)?(pe=te.link(je,{stable:!0}),fe(Le,".",lt[Se],"(",pe,");",Be,".",Se,"=",pe,";")):fe(Le,".",lt[Se],"(",je,");",Be,".",Se,"=",je,";")}})}function fi(te,fe){Nr&&(te.instancing=fe.def(te.shared.extensions,".angle_instanced_arrays"))}function Ua(te,fe,_e,er,nr){var He=te.shared,Be=te.stats,Le=He.current,pe=He.timer,Se=_e.profile;function ce(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var je,ur;function Er(gt){je=fe.def(),gt(je,"=",ce(),";"),typeof nr=="string"?gt(Be,".count+=",nr,";"):gt(Be,".count++;"),Zr&&(er?(ur=fe.def(),gt(ur,"=",pe,".getNumPendingQueries();")):gt(pe,".beginQuery(",Be,");"))}function Mt(gt){gt(Be,".cpuTime+=",ce(),"-",je,";"),Zr&&(er?gt(pe,".pushScopeStats(",ur,",",pe,".getNumPendingQueries(),",Be,");"):gt(pe,".endQuery();"))}function ut(gt){var nt=fe.def(Le,".profile");fe(Le,".profile=",gt,";"),fe.exit(Le,".profile=",nt,";")}var at;if(Se){if(cr(Se)){Se.enable?(Er(fe),Mt(fe.exit),ut("true")):ut("false");return}at=Se.append(te,fe),ut(at)}else at=fe.def(Le,".profile");var Tt=te.block();Er(Tt),fe("if(",at,"){",Tt,"}");var bt=te.block();Mt(bt),fe.exit("if(",at,"){",bt,"}")}function Oi(te,fe,_e,er,nr){var He=te.shared;function Be(pe){switch(pe){case Os:case Lu:case Du:return 2;case rn:case lc:case $v:return 3;case Zv:case Ud:case Gd:return 4;default:return 1}}function Le(pe,Se,ce){var je=He.gl,ur=fe.def(pe,".location"),Er=fe.def(He.attributes,"[",ur,"]"),Mt=ce.state,ut=ce.buffer,at=[ce.x,ce.y,ce.z,ce.w],Tt=["buffer","normalized","offset","stride"];function bt(){fe("if(!",Er,".buffer){",je,".enableVertexAttribArray(",ur,");}");var nt=ce.type,dt;if(ce.size?dt=fe.def(ce.size,"||",Se):dt=Se,fe("if(",Er,".type!==",nt,"||",Er,".size!==",dt,"||",Tt.map(function(Bt){return Er+"."+Bt+"!=="+ce[Bt]}).join("||"),"){",je,".bindBuffer(",Is,",",ut,".buffer);",je,".vertexAttribPointer(",[ur,dt,nt,ce.normalized,ce.stride,ce.offset],");",Er,".type=",nt,";",Er,".size=",dt,";",Tt.map(function(Bt){return Er+"."+Bt+"="+ce[Bt]+";"}).join(""),"}"),Nr){var mt=ce.divisor;fe("if(",Er,".divisor!==",mt,"){",te.instancing,".vertexAttribDivisorANGLE(",[ur,mt],");",Er,".divisor=",mt,";}")}}function gt(){fe("if(",Er,".buffer){",je,".disableVertexAttribArray(",ur,");",Er,".buffer=null;","}if(",Rs.map(function(nt,dt){return Er+"."+nt+"!=="+at[dt]}).join("||"),"){",je,".vertexAttrib4f(",ur,",",at,");",Rs.map(function(nt,dt){return Er+"."+nt+"="+at[dt]+";"}).join(""),"}")}Mt===Xl?bt():Mt===ec?gt():(fe("if(",Mt,"===",Xl,"){"),bt(),fe("}else{"),gt(),fe("}"))}er.forEach(function(pe){var Se=pe.name,ce=_e.attributes[Se],je;if(ce){if(!nr(ce))return;je=ce.append(te,fe)}else{if(!nr(Yr))return;var ur=te.scopeAttrib(Se);je={},Object.keys(new sr).forEach(function(Er){je[Er]=fe.def(ur,".",Er)})}Le(te.link(pe),Be(pe.info.type),je)})}function Ki(te,fe,_e,er,nr,He){for(var Be=te.shared,Le=Be.gl,pe,Se=0;Se1){for(var eo=[],zs=[],qu=0;qu>1)",ut],");")}function mt(){_e(at,".drawArraysInstancedANGLE(",[ur,Er,Mt,ut],");")}ce&&ce!=="null"?bt?dt():(_e("if(",ce,"){"),dt(),_e("}else{"),mt(),_e("}")):mt()}function nt(){function dt(){_e(He+".drawElements("+[ur,Mt,Tt,Er+"<<(("+Tt+"-"+_d+")>>1)"]+");")}function mt(){_e(He+".drawArrays("+[ur,Er,Mt]+");")}ce&&ce!=="null"?bt?dt():(_e("if(",ce,"){"),dt(),_e("}else{"),mt(),_e("}")):mt()}Nr&&(typeof ut!="number"||ut>=0)?typeof ut=="string"?(_e("if(",ut,">0){"),gt(),_e("}else if(",ut,"<0){"),nt(),_e("}")):gt():nt()}function Gt(te,fe,_e,er,nr){var He=vt(),Be=He.proc("body",nr);return Nr&&(He.instancing=Be.def(He.shared.extensions,".angle_instanced_arrays")),te(He,Be,_e,er),He.compile().body}function da(te,fe,_e,er){fi(te,fe),_e.useVAO?_e.drawVAO?fe(te.shared.vao,".setVAO(",_e.drawVAO.append(te,fe),");"):fe(te.shared.vao,".setVAO(",te.shared.vao,".targetVAO);"):(fe(te.shared.vao,".setVAO(null);"),Oi(te,fe,_e,er.attributes,function(){return!0})),Ki(te,fe,_e,er.uniforms,function(){return!0},!1),Qi(te,fe,fe,_e)}function Za(te,fe){var _e=te.proc("draw",1);fi(te,_e),Vn(te,_e,fe.context),Yn(te,_e,fe.framebuffer),ri(te,_e,fe),Yt(te,_e,fe.state),Ua(te,_e,fe,!1,!0);var er=fe.shader.progVar.append(te,_e);if(_e(te.shared.gl,".useProgram(",er,".program);"),fe.shader.program)da(te,_e,fe,fe.shader.program);else{_e(te.shared.vao,".setVAO(null);");var nr=te.global.def("{}"),He=_e.def(er,".id"),Be=_e.def(nr,"[",He,"]");_e(te.cond(Be).then(Be,".call(this,a0);").else(Be,"=",nr,"[",He,"]=",te.link(function(Le){return Gt(da,te,fe,Le,1)}),"(",er,");",Be,".call(this,a0);"))}Object.keys(fe.state).length>0&&_e(te.shared.current,".dirty=true;"),te.shared.vao&&_e(te.shared.vao,".setVAO(null);")}function le(te,fe,_e,er){te.batchId="a1",fi(te,fe);function nr(){return!0}Oi(te,fe,_e,er.attributes,nr),Ki(te,fe,_e,er.uniforms,nr,!1),Qi(te,fe,fe,_e)}function rr(te,fe,_e,er){fi(te,fe);var nr=_e.contextDep,He=fe.def(),Be="a0",Le="a1",pe=fe.def();te.shared.props=pe,te.batchId=He;var Se=te.scope(),ce=te.scope();fe(Se.entry,"for(",He,"=0;",He,"<",Le,";++",He,"){",pe,"=",Be,"[",He,"];",ce,"}",Se.exit);function je(Tt){return Tt.contextDep&&nr||Tt.propDep}function ur(Tt){return!je(Tt)}if(_e.needsContext&&Vn(te,ce,_e.context),_e.needsFramebuffer&&Yn(te,ce,_e.framebuffer),Yt(te,ce,_e.state,je),_e.profile&&je(_e.profile)&&Ua(te,ce,_e,!1,!0),er)_e.useVAO?_e.drawVAO?je(_e.drawVAO)?ce(te.shared.vao,".setVAO(",_e.drawVAO.append(te,ce),");"):Se(te.shared.vao,".setVAO(",_e.drawVAO.append(te,Se),");"):Se(te.shared.vao,".setVAO(",te.shared.vao,".targetVAO);"):(Se(te.shared.vao,".setVAO(null);"),Oi(te,Se,_e,er.attributes,ur),Oi(te,ce,_e,er.attributes,je)),Ki(te,Se,_e,er.uniforms,ur,!1),Ki(te,ce,_e,er.uniforms,je,!0),Qi(te,Se,ce,_e);else{var Er=te.global.def("{}"),Mt=_e.shader.progVar.append(te,ce),ut=ce.def(Mt,".id"),at=ce.def(Er,"[",ut,"]");ce(te.shared.gl,".useProgram(",Mt,".program);","if(!",at,"){",at,"=",Er,"[",ut,"]=",te.link(function(Tt){return Gt(le,te,_e,Tt,2)}),"(",Mt,");}",at,".call(this,a0[",He,"],",He,");")}}function tr(te,fe){var _e=te.proc("batch",2);te.batchId="0",fi(te,_e);var er=!1,nr=!0;Object.keys(fe.context).forEach(function(Er){er=er||fe.context[Er].propDep}),er||(Vn(te,_e,fe.context),nr=!1);var He=fe.framebuffer,Be=!1;He?(He.propDep?er=Be=!0:He.contextDep&&er&&(Be=!0),Be||Yn(te,_e,He)):Yn(te,_e,null),fe.state.viewport&&fe.state.viewport.propDep&&(er=!0);function Le(Er){return Er.contextDep&&er||Er.propDep}ri(te,_e,fe),Yt(te,_e,fe.state,function(Er){return!Le(Er)}),(!fe.profile||!Le(fe.profile))&&Ua(te,_e,fe,!1,"a1"),fe.contextDep=er,fe.needsContext=nr,fe.needsFramebuffer=Be;var pe=fe.shader.progVar;if(pe.contextDep&&er||pe.propDep)rr(te,_e,fe,null);else{var Se=pe.append(te,_e);if(_e(te.shared.gl,".useProgram(",Se,".program);"),fe.shader.program)rr(te,_e,fe,fe.shader.program);else{_e(te.shared.vao,".setVAO(null);");var ce=te.global.def("{}"),je=_e.def(Se,".id"),ur=_e.def(ce,"[",je,"]");_e(te.cond(ur).then(ur,".call(this,a0,a1);").else(ur,"=",ce,"[",je,"]=",te.link(function(Er){return Gt(rr,te,fe,Er,2)}),"(",Se,");",ur,".call(this,a0,a1);"))}}Object.keys(fe.state).length>0&&_e(te.shared.current,".dirty=true;"),te.shared.vao&&_e(te.shared.vao,".setVAO(null);")}function pt(te,fe){var _e=te.proc("scope",3);te.batchId="a2";var er=te.shared,nr=er.current;if(Vn(te,_e,fe.context),fe.framebuffer&&fe.framebuffer.append(te,_e),Re(Object.keys(fe.state)).forEach(function(Le){var pe=fe.state[Le],Se=pe.append(te,_e);Gl(Se)?Se.forEach(function(ce,je){st(ce)?_e.set(te.next[Le],"["+je+"]",ce):_e.set(te.next[Le],"["+je+"]",te.link(ce,{stable:!0}))}):cr(pe)?_e.set(er.next,"."+Le,te.link(Se,{stable:!0})):_e.set(er.next,"."+Le,Se)}),Ua(te,_e,fe,!0,!0),[Ns,Nd,Eu,Mi,Cu].forEach(function(Le){var pe=fe.draw[Le];if(pe){var Se=pe.append(te,_e);st(Se)?_e.set(er.draw,"."+Le,Se):_e.set(er.draw,"."+Le,te.link(Se),{stable:!0})}}),Object.keys(fe.uniforms).forEach(function(Le){var pe=fe.uniforms[Le].append(te,_e);Array.isArray(pe)&&(pe="["+pe.map(function(Se){return st(Se)?Se:te.link(Se,{stable:!0})})+"]"),_e.set(er.uniforms,"["+te.link(ie.id(Le),{stable:!0})+"]",pe)}),Object.keys(fe.attributes).forEach(function(Le){var pe=fe.attributes[Le].append(te,_e),Se=te.scopeAttrib(Le);Object.keys(new sr).forEach(function(ce){_e.set(Se,"."+ce,pe[ce])})}),fe.scopeVAO){var He=fe.scopeVAO.append(te,_e);st(He)?_e.set(er.vao,".targetVAO",He):_e.set(er.vao,".targetVAO",te.link(He,{stable:!0}))}function Be(Le){var pe=fe.shader[Le];if(pe){var Se=pe.append(te,_e);st(Se)?_e.set(er.shader,"."+Le,Se):_e.set(er.shader,"."+Le,te.link(Se,{stable:!0}))}}Be(Ps),Be(ku),Object.keys(fe.state).length>0&&(_e(nr,".dirty=true;"),_e.exit(nr,".dirty=true;")),_e("a1(",te.shared.context,",a0,",te.batchId,");")}function fa(te){if(!(typeof te!="object"||Gl(te))){for(var fe=Object.keys(te),_e=0;_e=0;--Gt){var da=At[Gt];da&&da(hr,null,0)}ue.flush(),Fr&&Fr.update()}function $t(){!Rt&&At.length>0&&(Rt=d.next(Pt))}function vn(){Rt&&(d.cancel(Pt),Rt=null)}function ei(Gt){Gt.preventDefault(),Qe=!0,vn(),zt.forEach(function(da){da()})}function na(Gt){ue.getError(),Qe=!1,ar.restore(),wt.restore(),Nr.restore(),xr.restore(),dr.restore(),lt.restore(),et.restore(),Fr&&Fr.restore(),Xr.procs.refresh(),$t(),Kr.forEach(function(da){da()})}st&&(st.addEventListener(Ut,ei,!1),st.addEventListener(ua,na,!1));function Ji(){At.length=0,vn(),st&&(st.removeEventListener(Ut,ei),st.removeEventListener(ua,na)),wt.clear(),lt.clear(),dr.clear(),et.clear(),xr.clear(),wr.clear(),Nr.clear(),Fr&&Fr.clear(),vt.forEach(function(Gt){Gt()})}function Ia(Gt){function da(He){var Be=e({},He);delete Be.uniforms,delete Be.attributes,delete Be.context,delete Be.vao,"stencil"in Be&&Be.stencil.op&&(Be.stencil.opBack=Be.stencil.opFront=Be.stencil.op,delete Be.stencil.op);function Le(pe){if(pe in Be){var Se=Be[pe];delete Be[pe],Object.keys(Se).forEach(function(ce){Be[pe+"."+ce]=Se[ce]})}}return Le("blend"),Le("depth"),Le("cull"),Le("stencil"),Le("polygonOffset"),Le("scissor"),Le("sample"),"vao"in He&&(Be.vao=He.vao),Be}function Za(He,Be){var Le={},pe={};return Object.keys(He).forEach(function(Se){var ce=He[Se];if(h.isDynamic(ce)){pe[Se]=h.unbox(ce,Se);return}else if(Be&&Array.isArray(ce)){for(var je=0;je0)return te.call(this,er(He|0),He|0)}else if(Array.isArray(He)){if(He.length)return te.call(this,He,He.length)}else return ht.call(this,He)}return e(nr,{stats:fa,destroy:function(){Oa.destroy()}})}var Si=lt.setFBO=Ia({framebuffer:h.define.call(null,Ba,"framebuffer")});function Ii(Gt,da){var Za=0;Xr.procs.poll();var le=da.color;le&&(ue.clearColor(+le[0]||0,+le[1]||0,+le[2]||0,+le[3]||0),Za|=tn),"depth"in da&&(ue.clearDepth(+da.depth),Za|=xa),"stencil"in da&&(ue.clearStencil(da.stencil|0),Za|=zr),ue.clear(Za)}function $i(Gt){if("framebuffer"in Gt)if(Gt.framebuffer&&Gt.framebuffer_reglType==="framebufferCube")for(var da=0;da<6;++da)Si(e({framebuffer:Gt.framebuffer.faces[da]},Gt),Ii);else Si(Gt,Ii);else Ii(null,Gt)}function Vn(Gt){At.push(Gt);function da(){var Za=Qn(At,Gt);function le(){var rr=Qn(At,le);At[rr]=At[At.length-1],At.length-=1,At.length<=0&&vn()}At[Za]=le}return $t(),{cancel:da}}function Yn(){var Gt=Vr.viewport,da=Vr.scissor_box;Gt[0]=Gt[1]=da[0]=da[1]=0,hr.viewportWidth=hr.framebufferWidth=hr.drawingBufferWidth=Gt[2]=da[2]=ue.drawingBufferWidth,hr.viewportHeight=hr.framebufferHeight=hr.drawingBufferHeight=Gt[3]=da[3]=ue.drawingBufferHeight}function ri(){hr.tick+=1,hr.time=fi(),Yn(),Xr.procs.poll()}function Yt(){xr.refresh(),Yn(),Xr.procs.refresh(),Fr&&Fr.update()}function fi(){return(p()-xt)/1e3}Yt();function Ua(Gt,da){var Za;switch(Gt){case"frame":return Vn(da);case"lost":Za=zt;break;case"restore":Za=Kr;break;case"destroy":Za=vt;break;default:}return Za.push(da),{cancel:function(){for(var le=0;le=0},read:Hr,destroy:Ji,_gl:ue,_refresh:Yt,poll:function(){ri(),Fr&&Fr.update()},now:fi,stats:br,getCachedCode:Oi,preloadCachedCode:Ki});return ie.onDone(null,Qi),Qi}return gi})});var qQ=R((BPe,DQ)=>{"use strict";var k8e=hs();DQ.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},EQ(r)?r={container:r}:C8e(r)?r={container:r}:E8e(r)?r={gl:r}:r=k8e(r,{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),r.pixelRatio||(r.pixelRatio=window.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var t=document.querySelector(r.container);if(!t)throw Error("Element "+r.container+" is not found");r.container=t}EQ(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=LQ(),r.container.appendChild(r.canvas),CQ(r))}else if(!r.canvas)if(typeof document!="undefined")r.container=document.body||document.documentElement,r.canvas=LQ(),r.container.appendChild(r.canvas),CQ(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{r.gl=r.canvas.getContext(a,r.attrs)}catch(n){}return r.gl}),r.gl};function CQ(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 r=e.container.getBoundingClientRect();e.canvas.width=e.width||r.right-r.left,e.canvas.height=e.height||r.bottom-r.top}}function EQ(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function C8e(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function E8e(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function LQ(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var RQ=R((UPe,FQ)=>{"use strict";var L8e=zT(),D8e=[32,126];FQ.exports=q8e;function q8e(e){e=e||{};var r=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],t=e.canvas||document.createElement("canvas"),a=e.font,n=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||D8e;if(a&&typeof a!="string"&&(a=L8e(a)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],l=i[0],s=0;l<=i[1];l++)o[s++]=String.fromCharCode(l);i=o}r=r.slice(),t.width=r[0],t.height=r[1];var u=t.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,t.width,t.height),u.font=a,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var f=n[0]/2,c=n[1]/2,l=0;lr[0]-n[0]/2&&(f=n[0]/2,c+=n[1]);return t}});var VT=R(En=>{"use strict";"use restrict";var HT=32;En.INT_BITS=HT;En.INT_MAX=2147483647;En.INT_MIN=-1<0)-(e<0)};En.abs=function(e){var r=e>>HT-1;return(e^r)-r};En.min=function(e,r){return r^(e^r)&-(e65535)<<4,e>>>=r,t=(e>255)<<3,e>>>=t,r|=t,t=(e>15)<<2,e>>>=t,r|=t,t=(e>3)<<1,e>>>=t,r|=t,r|e>>1};En.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};En.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function PQ(e){var r=32;return e&=-e,e&&r--,e&65535&&(r-=16),e&16711935&&(r-=8),e&252645135&&(r-=4),e&858993459&&(r-=2),e&1431655765&&(r-=1),r}En.countTrailingZeros=PQ;En.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};En.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};En.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var gm=new Array(256);(function(e){for(var r=0;r<256;++r){var t=r,a=r,n=7;for(t>>>=1;t;t>>>=1)a<<=1,a|=t&1,--n;e[r]=a<>>8&255]<<16|gm[e>>>16&255]<<8|gm[e>>>24&255]};En.interleave2=function(e,r){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r&=65535,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e|r<<1};En.deinterleave2=function(e,r){return e=e>>>r&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};En.interleave3=function(e,r,t){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|=r<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|t<<2};En.deinterleave3=function(e,r){return e=e>>>r&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};En.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>PQ(e)+1}});var OQ=R((HPe,IQ)=>{"use strict";function NQ(e,r,t){var a=e[t]|0;if(a<=0)return[];var n=new Array(a),i;if(t===e.length-1)for(i=0;i0)return F8e(e|0,r);break;case"object":if(typeof e.length=="number")return NQ(e,r,0);break}return[]}IQ.exports=R8e});var UQ=R(Zx=>{"use strict";Zx.byteLength=N8e;Zx.toByteArray=O8e;Zx.fromByteArray=U8e;var ps=[],al=[],P8e=typeof Uint8Array!="undefined"?Uint8Array:Array,YT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(vv=0,zQ=YT.length;vv0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var a=t===r?0:4-t%4;return[t,a]}function N8e(e){var r=BQ(e),t=r[0],a=r[1];return(t+a)*3/4-a}function I8e(e,r,t){return(r+t)*3/4-t}function O8e(e){var r,t=BQ(e),a=t[0],n=t[1],i=new P8e(I8e(e,a,n)),o=0,l=n>0?a-4:a,s;for(s=0;s>16&255,i[o++]=r>>8&255,i[o++]=r&255;return n===2&&(r=al[e.charCodeAt(s)]<<2|al[e.charCodeAt(s+1)]>>4,i[o++]=r&255),n===1&&(r=al[e.charCodeAt(s)]<<10|al[e.charCodeAt(s+1)]<<4|al[e.charCodeAt(s+2)]>>2,i[o++]=r>>8&255,i[o++]=r&255),i}function z8e(e){return ps[e>>18&63]+ps[e>>12&63]+ps[e>>6&63]+ps[e&63]}function B8e(e,r,t){for(var a,n=[],i=r;il?l:o+i));return a===1?(r=e[t-1],n.push(ps[r>>2]+ps[r<<4&63]+"==")):a===2&&(r=(e[t-2]<<8)+e[t-1],n.push(ps[r>>10]+ps[r>>4&63]+ps[r<<2&63]+"=")),n.join("")}});var GQ=R(WT=>{WT.read=function(e,r,t,a,n){var i,o,l=n*8-a-1,s=(1<>1,f=-7,c=t?n-1:0,h=t?-1:1,d=e[r+c];for(c+=h,i=d&(1<<-f)-1,d>>=-f,f+=l;f>0;i=i*256+e[r+c],c+=h,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=a;f>0;o=o*256+e[r+c],c+=h,f-=8);if(i===0)i=1-u;else{if(i===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,a),i=i-u}return(d?-1:1)*o*Math.pow(2,i-a)};WT.write=function(e,r,t,a,n,i){var o,l,s,u=i*8-n-1,f=(1<>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=a?0:i-1,p=a?1:-1,g=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,o=f):(o=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+c>=1?r+=h/s:r+=h*Math.pow(2,1-c),r*s>=2&&(o++,s/=2),o+c>=f?(l=0,o=f):o+c>=1?(l=(r*s-1)*Math.pow(2,n),o=o+c):(l=r*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[t+d]=l&255,d+=p,l/=256,n-=8);for(o=o<0;e[t+d]=o&255,d+=p,o/=256,u-=8);e[t+d-p]|=g*128}});var iee=R(Wh=>{"use strict";var jT=UQ(),Vh=GQ(),HQ=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Wh.Buffer=_r;Wh.SlowBuffer=j8e;Wh.INSPECT_MAX_BYTES=50;var Jx=2147483647;Wh.kMaxLength=Jx;_r.TYPED_ARRAY_SUPPORT=G8e();!_r.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 G8e(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(e){return!1}}Object.defineProperty(_r.prototype,"parent",{enumerable:!0,get:function(){if(_r.isBuffer(this))return this.buffer}});Object.defineProperty(_r.prototype,"offset",{enumerable:!0,get:function(){if(_r.isBuffer(this))return this.byteOffset}});function su(e){if(e>Jx)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,_r.prototype),r}function _r(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return $T(e)}return jQ(e,r,t)}_r.poolSize=8192;function jQ(e,r,t){if(typeof e=="string")return V8e(e,r);if(ArrayBuffer.isView(e))return Y8e(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(ms(e,ArrayBuffer)||e&&ms(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ms(e,SharedArrayBuffer)||e&&ms(e.buffer,SharedArrayBuffer)))return ZT(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let a=e.valueOf&&e.valueOf();if(a!=null&&a!==e)return _r.from(a,r,t);let n=W8e(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return _r.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}_r.from=function(e,r,t){return jQ(e,r,t)};Object.setPrototypeOf(_r.prototype,Uint8Array.prototype);Object.setPrototypeOf(_r,Uint8Array);function XQ(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 H8e(e,r,t){return XQ(e),e<=0?su(e):r!==void 0?typeof t=="string"?su(e).fill(r,t):su(e).fill(r):su(e)}_r.alloc=function(e,r,t){return H8e(e,r,t)};function $T(e){return XQ(e),su(e<0?0:KT(e)|0)}_r.allocUnsafe=function(e){return $T(e)};_r.allocUnsafeSlow=function(e){return $T(e)};function V8e(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!_r.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=ZQ(e,r)|0,a=su(t),n=a.write(e,r);return n!==t&&(a=a.slice(0,n)),a}function XT(e){let r=e.length<0?0:KT(e.length)|0,t=su(r);for(let a=0;a=Jx)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Jx.toString(16)+" bytes");return e|0}function j8e(e){return+e!=e&&(e=0),_r.alloc(+e)}_r.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==_r.prototype};_r.compare=function(r,t){if(ms(r,Uint8Array)&&(r=_r.from(r,r.offset,r.byteLength)),ms(t,Uint8Array)&&(t=_r.from(t,t.offset,t.byteLength)),!_r.isBuffer(r)||!_r.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let a=r.length,n=t.length;for(let i=0,o=Math.min(a,n);in.length?(_r.isBuffer(o)||(o=_r.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(_r.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ZQ(e,r){if(_r.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ms(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 t=e.length,a=arguments.length>2&&arguments[2]===!0;if(!a&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return JT(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return nee(e).length;default:if(n)return a?-1:JT(e).length;r=(""+r).toLowerCase(),n=!0}}_r.byteLength=ZQ;function X8e(e,r,t){let a=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return n7e(this,r,t);case"utf8":case"utf-8":return $Q(this,r,t);case"ascii":return t7e(this,r,t);case"latin1":case"binary":return a7e(this,r,t);case"base64":return e7e(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i7e(this,r,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}_r.prototype._isBuffer=!0;function hv(e,r,t){let a=e[r];e[r]=e[t],e[t]=a}_r.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(r+=" ... "),""};HQ&&(_r.prototype[HQ]=_r.prototype.inspect);_r.prototype.compare=function(r,t,a,n,i){if(ms(r,Uint8Array)&&(r=_r.from(r,r.offset,r.byteLength)),!_r.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),a===void 0&&(a=r?r.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||a>r.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=a)return 0;if(n>=i)return-1;if(t>=a)return 1;if(t>>>=0,a>>>=0,n>>>=0,i>>>=0,this===r)return 0;let o=i-n,l=a-t,s=Math.min(o,l),u=this.slice(n,i),f=r.slice(t,a);for(let c=0;c2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,e9(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=_r.from(r,a)),_r.isBuffer(r))return r.length===0?-1:VQ(e,r,t,a,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):VQ(e,[r],t,a,n);throw new TypeError("val must be string, number or Buffer")}function VQ(e,r,t,a,n){let i=1,o=e.length,l=r.length;if(a!==void 0&&(a=String(a).toLowerCase(),a==="ucs2"||a==="ucs-2"||a==="utf16le"||a==="utf-16le")){if(e.length<2||r.length<2)return-1;i=2,o/=2,l/=2,t/=2}function s(f,c){return i===1?f[c]:f.readUInt16BE(c*i)}let u;if(n){let f=-1;for(u=t;uo&&(t=o-l),u=t;u>=0;u--){let f=!0;for(let c=0;cn&&(a=n)):a=n;let i=r.length;a>i/2&&(a=i/2);let o;for(o=0;o>>0,isFinite(a)?(a=a>>>0,n===void 0&&(n="utf8")):(n=a,a=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((a===void 0||a>i)&&(a=i),r.length>0&&(a<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return Z8e(this,r,t,a);case"utf8":case"utf-8":return J8e(this,r,t,a);case"ascii":case"latin1":case"binary":return $8e(this,r,t,a);case"base64":return K8e(this,r,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q8e(this,r,t,a);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};_r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function e7e(e,r,t){return r===0&&t===e.length?jT.fromByteArray(e):jT.fromByteArray(e.slice(r,t))}function $Q(e,r,t){t=Math.min(e.length,t);let a=[],n=r;for(;n239?4:i>223?3:i>191?2:1;if(n+l<=t){let s,u,f,c;switch(l){case 1:i<128&&(o=i);break;case 2:s=e[n+1],(s&192)===128&&(c=(i&31)<<6|s&63,c>127&&(o=c));break;case 3:s=e[n+1],u=e[n+2],(s&192)===128&&(u&192)===128&&(c=(i&15)<<12|(s&63)<<6|u&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:s=e[n+1],u=e[n+2],f=e[n+3],(s&192)===128&&(u&192)===128&&(f&192)===128&&(c=(i&15)<<18|(s&63)<<12|(u&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}o===null?(o=65533,l=1):o>65535&&(o-=65536,a.push(o>>>10&1023|55296),o=56320|o&1023),a.push(o),n+=l}return r7e(a)}var YQ=4096;function r7e(e){let r=e.length;if(r<=YQ)return String.fromCharCode.apply(String,e);let t="",a=0;for(;aa)&&(t=a);let n="";for(let i=r;ia&&(r=a),t<0?(t+=a,t<0&&(t=0)):t>a&&(t=a),tt)throw new RangeError("Trying to access beyond buffer length")}_r.prototype.readUintLE=_r.prototype.readUIntLE=function(r,t,a){r=r>>>0,t=t>>>0,a||mi(r,t,this.length);let n=this[r],i=1,o=0;for(;++o>>0,t=t>>>0,a||mi(r,t,this.length);let n=this[r+--t],i=1;for(;t>0&&(i*=256);)n+=this[r+--t]*i;return n};_r.prototype.readUint8=_r.prototype.readUInt8=function(r,t){return r=r>>>0,t||mi(r,1,this.length),this[r]};_r.prototype.readUint16LE=_r.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||mi(r,2,this.length),this[r]|this[r+1]<<8};_r.prototype.readUint16BE=_r.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||mi(r,2,this.length),this[r]<<8|this[r+1]};_r.prototype.readUint32LE=_r.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};_r.prototype.readUint32BE=_r.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};_r.prototype.readBigUInt64LE=kf(function(r){r=r>>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,i=this[++r]+this[++r]*2**8+this[++r]*2**16+a*2**24;return BigInt(n)+(BigInt(i)<>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],i=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+a;return(BigInt(n)<>>0,t=t>>>0,a||mi(r,t,this.length);let n=this[r],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};_r.prototype.readIntBE=function(r,t,a){r=r>>>0,t=t>>>0,a||mi(r,t,this.length);let n=t,i=1,o=this[r+--n];for(;n>0&&(i*=256);)o+=this[r+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};_r.prototype.readInt8=function(r,t){return r=r>>>0,t||mi(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};_r.prototype.readInt16LE=function(r,t){r=r>>>0,t||mi(r,2,this.length);let a=this[r]|this[r+1]<<8;return a&32768?a|4294901760:a};_r.prototype.readInt16BE=function(r,t){r=r>>>0,t||mi(r,2,this.length);let a=this[r+1]|this[r]<<8;return a&32768?a|4294901760:a};_r.prototype.readInt32LE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};_r.prototype.readInt32BE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};_r.prototype.readBigInt64LE=kf(function(r){r=r>>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(a<<24);return(BigInt(n)<>>0,Yh(r,"offset");let t=this[r],a=this[r+7];(t===void 0||a===void 0)&&bm(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<>>0,t||mi(r,4,this.length),Vh.read(this,r,!0,23,4)};_r.prototype.readFloatBE=function(r,t){return r=r>>>0,t||mi(r,4,this.length),Vh.read(this,r,!1,23,4)};_r.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||mi(r,8,this.length),Vh.read(this,r,!0,52,8)};_r.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||mi(r,8,this.length),Vh.read(this,r,!1,52,8)};function mo(e,r,t,a,n,i){if(!_r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||re.length)throw new RangeError("Index out of range")}_r.prototype.writeUintLE=_r.prototype.writeUIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;mo(this,r,t,a,l,0)}let i=1,o=0;for(this[t]=r&255;++o>>0,a=a>>>0,!n){let l=Math.pow(2,8*a)-1;mo(this,r,t,a,l,0)}let i=a-1,o=1;for(this[t+i]=r&255;--i>=0&&(o*=256);)this[t+i]=r/o&255;return t+a};_r.prototype.writeUint8=_r.prototype.writeUInt8=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,1,255,0),this[t]=r&255,t+1};_r.prototype.writeUint16LE=_r.prototype.writeUInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};_r.prototype.writeUint16BE=_r.prototype.writeUInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};_r.prototype.writeUint32LE=_r.prototype.writeUInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};_r.prototype.writeUint32BE=_r.prototype.writeUInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function KQ(e,r,t,a,n){aee(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i,i=i>>8,e[t++]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,t}function QQ(e,r,t,a,n){aee(r,a,n,e,t,7);let i=Number(r&BigInt(4294967295));e[t+7]=i,i=i>>8,e[t+6]=i,i=i>>8,e[t+5]=i,i=i>>8,e[t+4]=i;let o=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=o,o=o>>8,e[t+2]=o,o=o>>8,e[t+1]=o,o=o>>8,e[t]=o,t+8}_r.prototype.writeBigUInt64LE=kf(function(r,t=0){return KQ(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});_r.prototype.writeBigUInt64BE=kf(function(r,t=0){return QQ(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});_r.prototype.writeIntLE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);mo(this,r,t,a,s-1,-s)}let i=0,o=1,l=0;for(this[t]=r&255;++i>0)-l&255;return t+a};_r.prototype.writeIntBE=function(r,t,a,n){if(r=+r,t=t>>>0,!n){let s=Math.pow(2,8*a-1);mo(this,r,t,a,s-1,-s)}let i=a-1,o=1,l=0;for(this[t+i]=r&255;--i>=0&&(o*=256);)r<0&&l===0&&this[t+i+1]!==0&&(l=1),this[t+i]=(r/o>>0)-l&255;return t+a};_r.prototype.writeInt8=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};_r.prototype.writeInt16LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};_r.prototype.writeInt16BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};_r.prototype.writeInt32LE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};_r.prototype.writeInt32BE=function(r,t,a){return r=+r,t=t>>>0,a||mo(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};_r.prototype.writeBigInt64LE=kf(function(r,t=0){return KQ(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});_r.prototype.writeBigInt64BE=kf(function(r,t=0){return QQ(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function eee(e,r,t,a,n,i){if(t+a>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ree(e,r,t,a,n){return r=+r,t=t>>>0,n||eee(e,r,t,4,34028234663852886e22,-34028234663852886e22),Vh.write(e,r,t,a,23,4),t+4}_r.prototype.writeFloatLE=function(r,t,a){return ree(this,r,t,!0,a)};_r.prototype.writeFloatBE=function(r,t,a){return ree(this,r,t,!1,a)};function tee(e,r,t,a,n){return r=+r,t=t>>>0,n||eee(e,r,t,8,17976931348623157e292,-17976931348623157e292),Vh.write(e,r,t,a,52,8),t+8}_r.prototype.writeDoubleLE=function(r,t,a){return tee(this,r,t,!0,a)};_r.prototype.writeDoubleBE=function(r,t,a){return tee(this,r,t,!1,a)};_r.prototype.copy=function(r,t,a,n){if(!_r.isBuffer(r))throw new TypeError("argument should be a Buffer");if(a||(a=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t>>0,a=a===void 0?this.length:a>>>0,r||(r=0);let i;if(typeof r=="number")for(i=t;i2**32?n=WQ(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=WQ(n)),n+="n"),a+=` It must be ${r}. Received ${n}`,a},RangeError);function WQ(e){let r="",t=e.length,a=e[0]==="-"?1:0;for(;t>=a+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function o7e(e,r,t){Yh(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&bm(r,e.length-(t+1))}function aee(e,r,t,a,n,i){if(e>t||e3?r===0||r===BigInt(0)?l=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:l=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:l=`>= ${r}${o} and <= ${t}${o}`,new Hh.ERR_OUT_OF_RANGE("value",l,e)}o7e(a,n,i)}function Yh(e,r){if(typeof e!="number")throw new Hh.ERR_INVALID_ARG_TYPE(r,"number",e)}function bm(e,r,t){throw Math.floor(e)!==e?(Yh(e,t),new Hh.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new Hh.ERR_BUFFER_OUT_OF_BOUNDS:new Hh.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var l7e=/[^+/0-9A-Za-z-_]/g;function s7e(e){if(e=e.split("=")[0],e=e.trim().replace(l7e,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function JT(e,r){r=r||1/0;let t,a=e.length,n=null,i=[];for(let o=0;o55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&i.push(239,191,189);continue}else if(o+1===a){(r-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&i.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return i}function u7e(e){let r=[];for(let t=0;t>8,n=t%256,i.push(n),i.push(a);return i}function nee(e){return jT.toByteArray(s7e(e))}function $x(e,r,t,a){let n;for(n=0;n=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function ms(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function e9(e){return e!==e}var c7e=function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let a=t*16;for(let n=0;n<16;++n)r[a+n]=e[t]+e[n]}return r}();function kf(e){return typeof BigInt=="undefined"?v7e:e}function v7e(){throw new Error("BigInt not supported")}});var xee=R(wa=>{"use strict";var Cf=VT(),Ai=OQ(),oee=iee().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ai([32,0]),UINT16:Ai([32,0]),UINT32:Ai([32,0]),BIGUINT64:Ai([32,0]),INT8:Ai([32,0]),INT16:Ai([32,0]),INT32:Ai([32,0]),BIGINT64:Ai([32,0]),FLOAT:Ai([32,0]),DOUBLE:Ai([32,0]),DATA:Ai([32,0]),UINT8C:Ai([32,0]),BUFFER:Ai([32,0])});var h7e=typeof Uint8ClampedArray!="undefined",d7e=typeof BigUint64Array!="undefined",p7e=typeof BigInt64Array!="undefined",zn=window.__TYPEDARRAY_POOL;zn.UINT8C||(zn.UINT8C=Ai([32,0]));zn.BIGUINT64||(zn.BIGUINT64=Ai([32,0]));zn.BIGINT64||(zn.BIGINT64=Ai([32,0]));zn.BUFFER||(zn.BUFFER=Ai([32,0]));var Kx=zn.DATA,Qx=zn.BUFFER;wa.free=function(r){if(oee.isBuffer(r))Qx[Cf.log2(r.length)].push(r);else{if(Object.prototype.toString.call(r)!=="[object ArrayBuffer]"&&(r=r.buffer),!r)return;var t=r.length||r.byteLength,a=Cf.log2(t)|0;Kx[a].push(r)}};function lee(e){if(e){var r=e.length||e.byteLength,t=Cf.log2(r);Kx[t].push(e)}}function m7e(e){lee(e.buffer)}wa.freeUint8=wa.freeUint16=wa.freeUint32=wa.freeBigUint64=wa.freeInt8=wa.freeInt16=wa.freeInt32=wa.freeBigInt64=wa.freeFloat32=wa.freeFloat=wa.freeFloat64=wa.freeDouble=wa.freeUint8Clamped=wa.freeDataView=m7e;wa.freeArrayBuffer=lee;wa.freeBuffer=function(r){Qx[Cf.log2(r.length)].push(r)};wa.malloc=function(r,t){if(t===void 0||t==="arraybuffer")return yo(r);switch(t){case"uint8":return r9(r);case"uint16":return see(r);case"uint32":return uee(r);case"int8":return fee(r);case"int16":return cee(r);case"int32":return vee(r);case"float":case"float32":return hee(r);case"double":case"float64":return dee(r);case"uint8_clamped":return pee(r);case"bigint64":return yee(r);case"biguint64":return mee(r);case"buffer":return bee(r);case"data":case"dataview":return gee(r);default:return null}return null};function yo(r){var r=Cf.nextPow2(r),t=Cf.log2(r),a=Kx[t];return a.length>0?a.pop():new ArrayBuffer(r)}wa.mallocArrayBuffer=yo;function r9(e){return new Uint8Array(yo(e),0,e)}wa.mallocUint8=r9;function see(e){return new Uint16Array(yo(2*e),0,e)}wa.mallocUint16=see;function uee(e){return new Uint32Array(yo(4*e),0,e)}wa.mallocUint32=uee;function fee(e){return new Int8Array(yo(e),0,e)}wa.mallocInt8=fee;function cee(e){return new Int16Array(yo(2*e),0,e)}wa.mallocInt16=cee;function vee(e){return new Int32Array(yo(4*e),0,e)}wa.mallocInt32=vee;function hee(e){return new Float32Array(yo(4*e),0,e)}wa.mallocFloat32=wa.mallocFloat=hee;function dee(e){return new Float64Array(yo(8*e),0,e)}wa.mallocFloat64=wa.mallocDouble=dee;function pee(e){return h7e?new Uint8ClampedArray(yo(e),0,e):r9(e)}wa.mallocUint8Clamped=pee;function mee(e){return d7e?new BigUint64Array(yo(8*e),0,e):null}wa.mallocBigUint64=mee;function yee(e){return p7e?new BigInt64Array(yo(8*e),0,e):null}wa.mallocBigInt64=yee;function gee(e){return new DataView(yo(e),0,e)}wa.mallocDataView=gee;function bee(e){e=Cf.nextPow2(e);var r=Cf.log2(e),t=Qx[r];return t.length>0?t.pop():new oee(e)}wa.mallocBuffer=bee;wa.clearCache=function(){for(var r=0;r<32;++r)zn.UINT8[r].length=0,zn.UINT16[r].length=0,zn.UINT32[r].length=0,zn.INT8[r].length=0,zn.INT16[r].length=0,zn.INT32[r].length=0,zn.FLOAT[r].length=0,zn.DOUBLE[r].length=0,zn.BIGUINT64[r].length=0,zn.BIGINT64[r].length=0,zn.UINT8C[r].length=0,Kx[r].length=0,Qx[r].length=0}});var wee=R((ZPe,_ee)=>{"use strict";var y7e=Object.prototype.toString;_ee.exports=function(e){var r;return y7e.call(e)==="[object Object]"&&(r=Object.getPrototypeOf(e),r===null||r===Object.getPrototypeOf({}))}});var t9=R((JPe,Aee)=>{Aee.exports=function(r,t){t||(t=[0,""]),r=String(r);var a=parseFloat(r,10);return t[0]=a,t[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}});var See=R(($Pe,Mee)=>{"use strict";var g7e=t9();Mee.exports=Tee;var xm=96;function a9(e,r){var t=g7e(getComputedStyle(e).getPropertyValue(r));return t[0]*Tee(t[1],e)}function b7e(e,r){var t=document.createElement("div");t.style["font-size"]="128"+e,r.appendChild(t);var a=a9(t,"font-size")/128;return r.removeChild(t),a}function Tee(e,r){switch(r=r||document.body,e=(e||"px").trim().toLowerCase(),(r===window||r===document)&&(r=document.body),e){case"%":return r.clientHeight/100;case"ch":case"ex":return b7e(e,r);case"em":return a9(r,"font-size");case"rem":return a9(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 xm;case"cm":return xm/2.54;case"mm":return xm/25.4;case"pt":return xm/72;case"pc":return xm/6}return 1}});var Eee=R((KPe,Cee)=>{"use strict";Cee.exports=t5;var x7e=t5.canvas=document.createElement("canvas"),e5=x7e.getContext("2d"),kee=r5([32,126]);t5.createPairs=r5;t5.ascii=kee;function t5(e,r){Array.isArray(e)&&(e=e.join(", "));var t={},a,n=16,i=.05;r&&(r.length===2&&typeof r[0]=="number"?a=r5(r):Array.isArray(r)?a=r:(r.o?a=r5(r.o):r.pairs&&(a=r.pairs),r.fontSize&&(n=r.fontSize),r.threshold!=null&&(i=r.threshold))),a||(a=kee),e5.font=n+"px "+e;for(var o=0;on*i){var f=(u-s)/n;t[l]=f*1e3}}return t}function r5(e){for(var r=[],t=e[0];t<=e[1];t++)for(var a=String.fromCharCode(t),n=e[0];n{"use strict";qee.exports=Ef;Ef.canvas=document.createElement("canvas");Ef.cache={};function Ef(o,r){r||(r={}),(typeof o=="string"||Array.isArray(o))&&(r.family=o);var t=Array.isArray(r.family)?r.family.join(", "):r.family;if(!t)throw Error("`family` must be defined");var a=r.size||r.fontSize||r.em||48,n=r.weight||r.fontWeight||"",i=r.style||r.fontStyle||"",o=[i,n,a].join(" ")+"px "+t,l=r.origin||"top";if(Ef.cache[t]&&a<=Ef.cache[t].em)return Lee(Ef.cache[t],l);var s=r.canvas||Ef.canvas,u=s.getContext("2d"),f={upper:r.upper!==void 0?r.upper:"H",lower:r.lower!==void 0?r.lower:"x",descent:r.descent!==void 0?r.descent:"p",ascent:r.ascent!==void 0?r.ascent:"h",tittle:r.tittle!==void 0?r.tittle:"i",overshoot:r.overshoot!==void 0?r.overshoot:"O"},c=Math.ceil(a*1.5);s.height=c,s.width=c*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,c,c),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var p=ys(u.getImageData(0,0,c,c));u.clearRect(0,0,c,c),u.textBaseline="bottom",u.fillText(h,0,c);var g=ys(u.getImageData(0,0,c,c));d.lineHeight=d.bottom=c-g+p,u.clearRect(0,0,c,c),u.textBaseline="alphabetic",u.fillText(h,0,c);var m=ys(u.getImageData(0,0,c,c)),x=c-m-1+p;d.baseline=d.alphabetic=x,u.clearRect(0,0,c,c),u.textBaseline="middle",u.fillText(h,0,c*.5);var _=ys(u.getImageData(0,0,c,c));d.median=d.middle=c-_-1+p-c*.5,u.clearRect(0,0,c,c),u.textBaseline="hanging",u.fillText(h,0,c*.5);var A=ys(u.getImageData(0,0,c,c));d.hanging=c-A-1+p-c*.5,u.clearRect(0,0,c,c),u.textBaseline="ideographic",u.fillText(h,0,c);var b=ys(u.getImageData(0,0,c,c));if(d.ideographic=c-b-1+p,f.upper&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.upper,0,0),d.upper=ys(u.getImageData(0,0,c,c)),d.capHeight=d.baseline-d.upper),f.lower&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.lower,0,0),d.lower=ys(u.getImageData(0,0,c,c)),d.xHeight=d.baseline-d.lower),f.tittle&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.tittle,0,0),d.tittle=ys(u.getImageData(0,0,c,c))),f.ascent&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.ascent,0,0),d.ascent=ys(u.getImageData(0,0,c,c))),f.descent&&(u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.descent,0,0),d.descent=Dee(u.getImageData(0,0,c,c))),f.overshoot){u.clearRect(0,0,c,c),u.textBaseline="top",u.fillText(f.overshoot,0,0);var T=Dee(u.getImageData(0,0,c,c));d.overshoot=T-x}for(var S in d)d[S]/=a;return d.em=a,Ef.cache[t]=d,Lee(d,l)}function Lee(e,r){var t={};typeof r=="string"&&(r=e[r]);for(var a in e)a!=="em"&&(t[a]=e[a]-r);return t}function ys(e){for(var r=e.height,t=e.data,a=3;a0;a-=4)if(t[a]!==0)return Math.floor((a-3)*.25/r)}});var Iee=R((eNe,Nee)=>{"use strict";var jh=kQ(),_7e=hs(),w7e=GT(),A7e=qQ(),T7e=MT(),n9=ov(),M7e=RQ(),Lf=xee(),S7e=gh(),k7e=wee(),C7e=t9(),E7e=See(),L7e=Eee(),D7e=kn(),q7e=Fee(),F7e=Qc(),R7e=VT(),Ree=R7e.nextPow2,Pee=new T7e,n5=!1;document.body&&(a5=document.body.appendChild(document.createElement("div")),a5.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(a5).fontStretch&&(n5=!0),document.body.removeChild(a5));var a5,Ra=function(r){P7e(r)?(r={regl:r},this.gl=r.regl._gl):this.gl=A7e(r),this.shader=Pee.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=r.regl||w7e({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(),Pee.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(k7e(r)?r:{})};Ra.prototype.createShader=function(){var r=this.regl,t=r({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:r.prop("count"),offset:r.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:r.this("sizeBuffer")},width:{offset:0,stride:8,buffer:r.this("sizeBuffer")},char:r.this("charBuffer"),position:r.this("position")},uniforms:{atlasSize:function(n,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(n,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(n,i){return i.atlas.texture},charStep:function(n,i){return i.atlas.step},em:function(n,i){return i.atlas.em},color:r.prop("color"),opacity:r.prop("opacity"),viewport:r.this("viewportArray"),scale:r.this("scale"),align:r.prop("align"),baseline:r.prop("baseline"),translate:r.this("translate"),positionOffset:r.prop("positionOffset")},primitive:"points",viewport:r.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -783,9 +783,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),a={};return{regl:r,draw:t,atlas:a}};Ra.prototype.update=function(r){var t=this;if(typeof r=="string")r={text:r};else if(!r)return;r=_7e(r,{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),r.opacity!=null&&(Array.isArray(r.opacity)?this.opacity=r.opacity.map(function(se){return parseFloat(se)}):this.opacity=parseFloat(r.opacity)),r.viewport!=null&&(this.viewport=S7e(r.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]),r.kerning!=null&&(this.kerning=r.kerning),r.offset!=null&&(typeof r.offset=="number"&&(r.offset=[r.offset,0]),this.positionOffset=F7e(r.offset)),r.direction&&(this.direction=r.direction),r.range&&(this.range=r.range,this.scale=[1/(r.range[2]-r.range[0]),1/(r.range[3]-r.range[1])],this.translate=[-r.range[0],-r.range[1]]),r.scale&&(this.scale=r.scale),r.translate&&(this.translate=r.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!r.font&&(r.font=Ra.baseFontSize+"px sans-serif");var a=!1,n=!1;if(r.font&&(Array.isArray(r.font)?r.font:[r.font]).forEach(function(se,be){if(typeof se=="string")try{se=jh.parse(se)}catch(Te){se=jh.parse(Ra.baseFontSize+"px "+se)}else{var re=se.style,ke=se.weight,ge=se.stretch,Ee=se.variant;se=jh.parse(jh.stringify(se)),re&&(se.style=re),ke&&(se.weight=ke),ge&&(se.stretch=ge),Ee&&(se.variant=Ee)}var De=jh.stringify({size:Ra.baseFontSize,family:se.family,stretch:n5?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style}),Ce=C7e(se.size),Y=Math.round(Ce[0]*E7e(Ce[1]));if(Y!==t.fontSize[be]&&(n=!0,t.fontSize[be]=Y),(!t.font[be]||De!=t.font[be].baseString)&&(a=!0,t.font[be]=Ra.fonts[De],!t.font[be])){var ae=se.family.join(", "),Z=[se.style];se.style!=se.variant&&Z.push(se.variant),se.variant!=se.weight&&Z.push(se.weight),n5&&se.weight!=se.stretch&&Z.push(se.stretch),t.font[be]={baseString:De,family:ae,weight:se.weight,stretch:se.stretch,style:se.style,variant:se.variant,width:{},kerning:{},metrics:q7e(ae,{origin:"top",fontSize:Ra.baseFontSize,fontStyle:Z.join(" ")})},Ra.fonts[De]=t.font[be]}}),(a||n)&&this.font.forEach(function(se,be){var re=jh.stringify({size:t.fontSize[be],family:se.family,stretch:n5?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style});if(t.fontAtlas[be]=t.shader.atlas[re],!t.fontAtlas[be]){var ke=se.metrics;t.shader.atlas[re]=t.fontAtlas[be]={fontString:re,step:Math.ceil(t.fontSize[be]*ke.bottom*.5)*2,em:t.fontSize[be],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}r.text==null&&(r.text=t.text)}),typeof r.text=="string"&&r.position&&r.position.length>2){for(var i=Array(r.position.length*.5),o=0;o2){for(var u=!r.position[0].length,f=Lf.mallocFloat(this.count*2),c=0,h=0;c1?t.align[be]:t.align[0]:t.align;if(typeof re=="number")return re;switch(re){case"right":case"end":return-se;case"center":case"centre":case"middle":return-se*.5}return 0})),this.baseline==null&&r.baseline==null&&(r.baseline=0),r.baseline!=null&&(this.baseline=r.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(se,be){var re=(t.font[be]||t.font[0]).metrics,ke=0;return ke+=re.bottom*.5,typeof se=="number"?ke+=se-re.baseline:ke+=-re[se],ke*=-1,ke})),r.color!=null)if(r.color||(r.color="transparent"),typeof r.color=="string"||!isNaN(r.color))this.color=n9(r.color,"uint8");else{var $;if(typeof r.color[0]=="number"&&r.color.length>this.counts.length){var j=r.color.length;$=Lf.mallocUint8(j);for(var H=(r.color.subarray||r.color.slice).bind(r.color),z=0;z4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(K){var ve=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(ve);for(var xe=0;xe1?this.counts[xe]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[xe]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(xe*4,xe*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[xe]:this.opacity,baseline:this.baselineOffset[xe]!=null?this.baselineOffset[xe]:this.baselineOffset[0],align:this.align?this.alignOffset[xe]!=null?this.alignOffset[xe]:this.alignOffset[0]:0,atlas:this.fontAtlas[xe]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(xe*2,xe*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=[]}};Ra.prototype.destroy=function(){};Ra.prototype.kerning=!0;Ra.prototype.position={constant:new Float32Array(2)};Ra.prototype.translate=null;Ra.prototype.scale=null;Ra.prototype.font=null;Ra.prototype.text="";Ra.prototype.positionOffset=[0,0];Ra.prototype.opacity=1;Ra.prototype.color=new Uint8Array([0,0,0,255]);Ra.prototype.alignOffset=[0,0];Ra.maxAtlasSize=1024;Ra.atlasCanvas=document.createElement("canvas");Ra.atlasContext=Ra.atlasCanvas.getContext("2d",{alpha:!1});Ra.baseFontSize=64;Ra.fonts={};function P7e(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}Nee.exports=Ra});var Bee=R((rNe,zee)=>{"use strict";var Oee=Qt(),N7e=function(){};zee.exports=function(r){for(var t in r)typeof r[t]=="function"&&(r[t]=N7e);r.destroy=function(){r.container.parentNode.removeChild(r.container)};var a=document.createElement("div");a.className="no-webgl",a.style.cursor="pointer",a.style.fontSize="24px",a.style.color=Oee.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=Oee.lightLine,a.style["z-index"]=30;var n=document.createElement("p");return n.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",n.style.position="relative",n.style.top="50%",n.style.left="50%",n.style.height="30%",n.style.width="50%",n.style.margin="-15% 0 0 -25%",a.appendChild(n),r.container.appendChild(a),r.container.style.background="#FFFFFF",r.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var i5=R((tNe,Uee)=>{"use strict";var I7e=Bee(),O7e=GT();Uee.exports=function(r,t,a){var n=r._fullLayout,i=!0;return n._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(a);return}if(!(o.pick&&!n._has("parcoords"))){try{o.regl=O7e({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:r._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:a||{}})}catch(l){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(l){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:l,layer:o.key})},!1)}}),i||I7e({container:n._glcontainer.node()}),i}});var jee=R((o9,Wee)=>{"use strict";var Gee=$7(),Hee=CT(),z7e=sQ(),Vee=Iee(),i9=fr(),B7e=tf().selectMode,U7e=i5(),G7e=ni(),H7e=kA(),V7e=X7().styleTextSelection,Yee={};function Y7e(e,r,t,a){var n=e._size,i=e.width*a,o=e.height*a,l=n.l*a,s=n.b*a,u=n.r*a,f=n.t*a,c=n.w*a,h=n.h*a;return[l+r.domain[0]*c,s+t.domain[0]*h,i-u-(1-r.domain[1])*c,o-f-(1-t.domain[1])*h]}var o9=Wee.exports=function(r,t,a){if(a.length){var n=r._fullLayout,i=t._scene,o=t.xaxis,l=t.yaxis,s,u;if(i){var f=U7e(r,["ANGLE_instanced_arrays","OES_element_index_uint"],Yee);if(!f){i.init();return}var c=i.count,h=n._glcanvas.data()[0].regl;if(H7e(r,t,a),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&h.clear({}),i.error2d===!0&&(i.error2d=z7e(h)),i.line2d===!0&&(i.line2d=Hee(h)),i.scatter2d===!0&&(i.scatter2d=Gee(h)),i.fill2d===!0&&(i.fill2d=Hee(h)),i.glText===!0)for(i.glText=new Array(c),s=0;si.glText.length){var d=c-i.glText.length;for(s=0;sK&&(isNaN(X[ve])||isNaN(X[ve+1]));)ve-=2;V.positions=X.slice(K,ve+2)}return V}),i.line2d.update(i.lineOptions)),i.error2d){var m=(i.errorXOptions||[]).concat(i.errorYOptions||[]);i.error2d.update(m)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=i9.repeat(null,c),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(V,X){var K=a[X];if(!(!V||!K||!K[0]||!K[0].trace)){var ve=K[0],xe=ve.trace,se=ve.t,be=i.lineOptions[X],re,ke,ge=[];xe._ownfill&&ge.push(X),xe._nexttrace&&ge.push(X+1),ge.length&&(i.fillOrder[X]=ge);var Ee=[],De=be&&be.positions||se.positions,Ce,Y;if(xe.fill==="tozeroy"){for(Ce=0;CeCe&&isNaN(De[Y+1]);)Y-=2;De[Ce+1]!==0&&(Ee=[De[Ce],0]),Ee=Ee.concat(De.slice(Ce,Y+2)),De[Y+1]!==0&&(Ee=Ee.concat([De[Y],0]))}else if(xe.fill==="tozerox"){for(Ce=0;CeCe&&isNaN(De[Y]);)Y-=2;De[Ce]!==0&&(Ee=[0,De[Ce+1]]),Ee=Ee.concat(De.slice(Ce,Y+2)),De[Y]!==0&&(Ee=Ee.concat([0,De[Y+1]]))}else if(xe.fill==="toself"||xe.fill==="tonext"){for(Ee=[],re=0,V.splitNull=!0,ke=0;ke-1;for(s=0;s{"use strict";var Xee=HZ();Xee.plot=jee();Zee.exports=Xee});var Kee=R((nNe,$ee)=>{"use strict";$ee.exports=Jee()});var l9=R((iNe,tre)=>{"use strict";var W7e=sf(),rre=Ac(),Qee=m1().axisHoverFormat,j7e=o0().hovertemplateAttrs,_m=_b(),X7e=ai().idRegex,Z7e=Da().templatedArray,Xh=hn().extendFlat,uu=W7e.marker,J7e=uu.line,$7e=Xh(rre("marker.line",{editTypeOverride:"calc"}),{width:Xh({},J7e.width,{editType:"calc"}),editType:"calc"}),o5=Xh(rre("marker"),{symbol:uu.symbol,angle:uu.angle,size:Xh({},uu.size,{editType:"markerSize"}),sizeref:uu.sizeref,sizemin:uu.sizemin,sizemode:uu.sizemode,opacity:uu.opacity,colorbar:uu.colorbar,line:$7e,editType:"calc"});o5.color.editType=o5.cmin.editType=o5.cmax.editType="style";function ere(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:X7e[e],editType:"plot"}}}tre.exports={dimensions:Z7e("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:Xh({},_m.text,{}),hovertext:Xh({},_m.hovertext,{}),hovertemplate:j7e(),xhoverformat:Qee("x"),yhoverformat:Qee("y"),marker:o5,xaxes:ere("x"),yaxes:ere("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:_m.selected.marker,editType:"calc"},unselected:{marker:_m.unselected.marker,editType:"calc"},opacity:_m.opacity}});var s9=R((oNe,are)=>{"use strict";are.exports=function(e,r,t,a){a||(a=1/0);var n,i;for(n=0;n{"use strict";var u9=fr(),K7e=wo(),nre=l9(),Q7e=ni(),eTe=D3(),rTe=s9(),tTe=wb().isOpenSymbol;ire.exports=function(r,t,a,n){function i(d,p){return u9.coerce(r,t,nre,d,p)}var o=K7e(r,t,{name:"dimensions",handleItemDefaults:aTe}),l=i("diagonal.visible"),s=i("showupperhalf"),u=i("showlowerhalf"),f=rTe(t,o,"values");if(!f||!l&&!s&&!u){t.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat"),eTe(r,t,a,n,i,{noAngleRef:!0,noStandOff:!0});var c=tTe(t.marker.symbol),h=Q7e.isBubble(t);i("marker.line.width",c||h?1:0),nTe(r,t,n,i),u9.coerceSelectionMarkerOpacity(t,i)};function aTe(e,r){function t(n,i){return u9.coerce(e,r,nre.dimensions,n,i)}t("label");var a=t("values");a&&a.length?t("visible"):r.visible=!1,t("axis.type"),t("axis.matches")}function nTe(e,r,t,a){var n=r.dimensions,i=n.length,o=r.showupperhalf,l=r.showlowerhalf,s=r.diagonal.visible,u,f,c=new Array(i),h=new Array(i);for(u=0;uf&&o||u{"use strict";var lre=fr();sre.exports=function(r,t){var a=r._fullLayout,n=t.uid,i=a._splomScenes;i||(i=a._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},l={matrix:!1,selectBatch:[],unselectBatch:[]},s=i[t.uid];return s||(s=i[n]=lre.extendFlat({},o,l),s.draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||lre.extendFlat(s,o),s}});var vre=R((uNe,cre)=>{"use strict";var f9=fr(),l5=an(),iTe=$0().calcMarkerSize,oTe=$0().calcAxisExpansion,lTe=vp(),fre=nm().markerSelection,sTe=nm().markerStyle,uTe=ure(),fTe=_n().BADNUM,cTe=ph().TOO_MANY_POINTS;cre.exports=function(r,t){var a=t.dimensions,n=t._length,i={},o=i.cdata=[],l=i.data=[],s=t._visibleDims=[],u,f,c,h,d;function p(w,x){for(var T=w.makeCalcdata({v:x.values,vcalendar:t.calendar},"v"),S=0;ScTe,b;for(m?b=i.sizeAvg||Math.max(i.size,3):b=iTe(t,n),f=0;f{(function(){var e,r,t,a,n,i;typeof performance!="undefined"&&performance!==null&&performance.now?wm.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(wm.exports=function(){return(e()-n)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},a=e(),i=process.uptime()*1e9,n=a-i):Date.now?(wm.exports=function(){return Date.now()-t},t=Date.now()):(wm.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(hre)});var mre=R((fNe,f5)=>{var vTe=dre(),fu=window,s5=["moz","webkit"],Jh="AnimationFrame",$h=fu["request"+Jh],Am=fu["cancel"+Jh]||fu["cancelRequest"+Jh];for(Zh=0;!$h&&Zh{yre.exports=function(r,t){var a=typeof r=="number",n=typeof t=="number";a&&!n?(t=r,r=0):!a&&!n&&(r=0,t=0),r=r|0,t=t|0;var i=t-r;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),l=0,s=r;l{"use strict";var hTe=$7(),dTe=hs(),pTe=Kc(),bre=mre(),mTe=gre(),v9=gh(),yTe=Qc();_re.exports=qf;function qf(e,r){if(!(this instanceof qf))return new qf(e,r);this.traces=[],this.passes={},this.regl=e,this.scatter=hTe(e),this.canvas=this.scatter.canvas}qf.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=bre(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,bre(()=>{this.dirty=!1})),this)};qf.prototype.update=function(...e){if(!e.length)return;for(let a=0;am||!n.lower&&g{r[i+l]=a})}this.scatter.draw(...r)}return this};qf.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 gTe(e,r,t){let a=e.id!=null?e.id:e,n=r,i=t;return a<<16|(n&255)<<8|i&255}function c5(e,r,t){let a,n,i,o,l,s,u,f,c=e[r],h=e[t];return c.length>2?(a=c[0],i=c[2],n=c[1],o=c[3]):c.length?(a=n=c[0],i=o=c[1]):(a=c.x,n=c.y,i=c.x+c.width,o=c.y+c.height),h.length>2?(l=h[0],u=h[2],s=h[1],f=h[3]):h.length?(l=s=h[0],u=f=h[1]):(l=h.x,s=h.y,u=h.x+h.width,f=h.y+h.height),[l,n,u,o]}function xre(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let r=v9(e);return[r.x,r.y,r.x+r.width,r.y+r.height]}}});var Tre=R((hNe,Are)=>{"use strict";var bTe=wre(),h9=fr(),v5=an(),xTe=tf().selectMode;Are.exports=function(r,t,a){if(a.length)for(var n=0;n-1,N=xTe(f)||!!n.selectedpoints||P,q=!0;if(N){var O=n._length;if(n.selectedpoints){o.selectBatch=n.selectedpoints;var U=n.selectedpoints,$={};for(d=0;d{"use strict";Mre.getDimIndex=function(r,t){for(var a=t._id,n=a.charAt(0),i={x:0,y:1}[n],o=r._visibleDims,l=0;l{"use strict";var Sre=d9(),wTe=P8().calcHover,kre=Va().getFromId,ATe=hn().extendFlat;function TTe(e,r,t,a,n){n||(n={});var i=(a||"").charAt(0)==="x",o=(a||"").charAt(0)==="y",l=Cre(e,r,t);if((i||o)&&n.hoversubplots==="axis"&&l[0])for(var s=(i?e.xa:e.ya)._subplotsWith,u=n.gd,f=ATe({},e),c=0;c{"use strict";var Rre=fr(),Dre=Rre.pushUnique,qre=ni(),Fre=d9();Pre.exports=function(r,t){var a=r.cd,n=a[0].trace,i=a[0].t,o=r.scene,l=o.matrixOptions.cdata,s=r.xaxis,u=r.yaxis,f=[];if(!o)return f;var c=!qre.hasMarkers(n)&&!qre.hasText(n);if(n.visible!==!0||c)return f;var h=Fre.getDimIndex(n,s),d=Fre.getDimIndex(n,u);if(h===!1||d===!1)return f;var p=i.xpx[h],g=i.ypx[d],m=l[h],b=l[d],_=(r.scene.selectBatch||[]).slice(),w=[];if(t!==!1&&!t.degenerate)for(var x=0;x{"use strict";var Ire=fr(),MTe=vp(),STe=nm().markerStyle;Ore.exports=function(r,t){var a=t.trace,n=r._fullLayout._splomScenes[a.uid];if(n){MTe(r,a),Ire.extendFlat(n.matrixOptions,STe(r,a));var i=Ire.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(i,null)}}});var Ure=R((gNe,Bre)=>{"use strict";var kTe=Ct(),CTe=w8();Bre.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:l9(),supplyDefaults:ore(),colorbar:O3(),calc:vre(),plot:Tre(),hoverPoints:Lre().hoverPoints,selectPoints:Nre(),editStyle:zre(),meta:{}};kTe.register(CTe)});var jre=R((bNe,Wre)=>{"use strict";var ETe=CT(),LTe=Ct(),DTe=i5(),qTe=v1().getModuleCalcData,Ff=bp(),Gre=an().getFromId,Hre=Va().shouldShowZeroLine,Vre="splom",Yre={};function FTe(e){var r=e._fullLayout,t=LTe.getModule(Vre),a=qTe(e.calcdata,t)[0],n=DTe(e,["ANGLE_instanced_arrays","OES_element_index_uint"],Yre);n&&(r._hasOnlyLargeSploms&&p9(e),t.plot(e,{},a))}function RTe(e){var r=e.calcdata,t=e._fullLayout;t._hasOnlyLargeSploms&&p9(e);for(var a=0;a{"use strict";var Xre=Ure();Xre.basePlotModule=jre(),Zre.exports=Xre});var Kre=R((_Ne,$re)=>{"use strict";$re.exports=Jre()});var g9=R((wNe,Qre)=>{"use strict";var OTe=Ac(),m9=Bo(),y9=ci(),zTe=pb().attributes,h5=hn().extendFlat,BTe=Da().templatedArray;Qre.exports={domain:zTe({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:y9({editType:"plot"}),tickfont:y9({autoShadowDflt:!0,editType:"plot"}),rangefont:y9({editType:"plot"}),dimensions:BTe("dimension",{label:{valType:"string",editType:"plot"},tickvals:h5({},m9.tickvals,{editType:"plot"}),ticktext:h5({},m9.ticktext,{editType:"plot"}),tickformat:h5({},m9.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:h5({editType:"calc"},OTe("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 Tm=R((ANe,ete)=>{"use strict";ete.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 Mm=R((TNe,tte)=>{"use strict";var UTe=fg();function rte(e){return[e]}tte.exports={keyFun:function(e){return e.key},repeat:rte,descend:UTe,wrap:rte,unwrap:function(e){return e[0]}}});var _9=R((MNe,hte)=>{"use strict";var bn=Tm(),zl=ta(),GTe=Mm().keyFun,d5=Mm().repeat,Kh=fr().sorterAsc,HTe=fr().strTranslate,ate=bn.bar.snapRatio;function nte(e,r){return e*(1-ate)+r*ate}var ite=bn.bar.snapClose;function VTe(e,r){return e*(1-ite)+r*ite}function m5(e,r,t,a){if(YTe(t,a))return t;var n=e?-1:1,i=0,o=r.length-1;if(n<0){var l=i;i=o,o=l}for(var s=r[i],u=s,f=i;n*f=r[t][0]&&e<=r[t][1])return!0;return!1}function WTe(e){e.attr("x",-bn.bar.captureWidth/2).attr("width",bn.bar.captureWidth)}function jTe(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function XTe(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var r=ote(e.brush.filter.getConsolidated(),e.height),t=[0],a,n,i,o=r.length?r[0][0]:null,l=0;le[1]+t||r=.9*e[1]+.1*e[0]?"n":r<=.9*e[0]+.1*e[1]?"s":"ns"}function lte(){zl.select(document.body).style("cursor",null)}function x9(e){e.attr("stroke-dasharray",XTe)}function p5(e,r){var t=zl.select(e).selectAll(".highlight, .highlight-shadow"),a=r?t.transition().duration(bn.bar.snapDuration).each("end",r):t;x9(a)}function ste(e,r){var t=e.brush,a=t.filterSpecified,n=NaN,i={},o;if(a){var l=e.height,s=t.filter.getConsolidated(),u=ote(s,l),f=NaN,c=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=r&&r<=d[1]){f=o;break}else if(c=o?o-1:NaN,d&&d[0]>r){h=o;break}}if(n=f,isNaN(n)&&(isNaN(c)||isNaN(h)?n=isNaN(c)?h:c:n=r-u[c][1]=_[0]&&b<=_[1]){i.clickableOrdinalRange=_;break}}}return i}function JTe(e,r){zl.event.sourceEvent.stopPropagation();var t=r.height-zl.mouse(e)[1]-2*bn.verticalPadding,a=r.unitToPaddedPx.invert(t),n=r.brush,i=ste(r,t),o=i.interval,l=n.svgBrush;if(l.wasDragged=!1,l.grabbingBar=i.region==="ns",l.grabbingBar){var s=o.map(r.unitToPaddedPx);l.grabPoint=t-s[0]-bn.verticalPadding,l.barLength=s[1]-s[0]}l.clickableOrdinalRange=i.clickableOrdinalRange,l.stayingIntervals=r.multiselect&&n.filterSpecified?n.filter.getConsolidated():[],o&&(l.stayingIntervals=l.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),l.startExtent=i.region?o[i.region==="s"?1:0]:a,r.parent.inBrushDrag=!0,l.brushStartCallback()}function ute(e,r){zl.event.sourceEvent.stopPropagation();var t=r.height-zl.mouse(e)[1]-2*bn.verticalPadding,a=r.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[t-a.grabPoint,t+a.barLength-a.grabPoint].map(r.unitToPaddedPx.invert):a.newExtent=[a.startExtent,r.unitToPaddedPx.invert(t)].sort(Kh),r.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(r),p5(e.parentNode)}function $Te(e,r){var t=r.brush,a=t.filter,n=t.svgBrush;n._dragging||(fte(e,r),ute(e,r),r.brush.svgBrush.wasDragged=!1),n._dragging=!1;var i=zl.event;i.sourceEvent.stopPropagation();var o=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,r.parent.inBrushDrag=!1,lte(),!n.wasDragged){n.wasDragged=void 0,n.clickableOrdinalRange?t.filterSpecified&&r.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],t.filterSpecified=!0):o?(n.extent=n.stayingIntervals,n.extent.length===0&&b9(t)):b9(t),n.brushCallback(r),p5(e.parentNode),n.brushEndCallback(t.filterSpecified?a.getConsolidated():[]);return}var l=function(){a.set(a.getConsolidated())};if(r.ordinal){var s=r.unitTickvals;s[s.length-1]n.newExtent[0];n.extent=n.stayingIntervals.concat(u?[n.newExtent]:[]),n.extent.length||b9(t),n.brushCallback(r),u?p5(e.parentNode,l):(l(),p5(e.parentNode))}else l();n.brushEndCallback(t.filterSpecified?a.getConsolidated():[])}function fte(e,r){var t=r.height-zl.mouse(e)[1]-2*bn.verticalPadding,a=ste(r,t),n="crosshair";a.clickableOrdinalRange?n="pointer":a.region&&(n=a.region+"-resize"),zl.select(document.body).style("cursor",n)}function KTe(e){e.on("mousemove",function(r){zl.event.preventDefault(),r.parent.inBrushDrag||fte(this,r)}).on("mouseleave",function(r){r.parent.inBrushDrag||lte()}).call(zl.behavior.drag().on("dragstart",function(r){JTe(this,r)}).on("drag",function(r){ute(this,r)}).on("dragend",function(r){$Te(this,r)}))}function cte(e,r){return e[0]-r[0]}function QTe(e,r,t){var a=t._context.staticPlot,n=e.selectAll(".background").data(d5);n.enter().append("rect").classed("background",!0).call(WTe).call(jTe).style("pointer-events",a?"none":"auto").attr("transform",HTe(0,bn.verticalPadding)),n.call(KTe).attr("height",function(l){return l.height-bn.verticalPadding});var i=e.selectAll(".highlight-shadow").data(d5);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-bn.bar.width/2).attr("stroke-width",bn.bar.width+bn.bar.strokeWidth).attr("stroke",r).attr("opacity",bn.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(l){return l.height}).call(x9);var o=e.selectAll(".highlight").data(d5);o.enter().append("line").classed("highlight",!0).attr("x",-bn.bar.width/2).attr("stroke-width",bn.bar.width-bn.bar.strokeWidth).attr("stroke",bn.bar.fillColor).attr("opacity",bn.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(l){return l.height}).call(x9)}function e9e(e,r,t){var a=e.selectAll("."+bn.cn.axisBrush).data(d5,GTe);a.enter().append("g").classed(bn.cn.axisBrush,!0),QTe(a,r,t)}function r9e(e){return e.svgBrush.extent.map(function(r){return r.slice()})}function b9(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function t9e(e){return function(t){var a=t.brush,n=r9e(a),i=n.slice();a.filter.set(i),e()}}function vte(e){for(var r=e.slice(),t=[],a,n=r.shift();n;){for(a=n.slice();(n=r.shift())&&n[0]<=a[1];)a[1]=Math.max(a[1],n[1]);t.push(a)}return t.length===1&&t[0][0]>t[0][1]&&(t=[]),t}function a9e(){var e=[],r,t;return{set:function(a){e=a.map(function(n){return n.slice().sort(Kh)}).sort(cte),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),r=vte(e),t=e.reduce(function(n,i){return[Math.min(n[0],i[0]),Math.max(n[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return r},getBounds:function(){return t}}}function n9e(e,r,t,a,n,i){var o=a9e();return o.set(t),{filter:o,filterSpecified:r,svgBrush:{extent:[],brushStartCallback:a,brushCallback:t9e(n),brushEndCallback:i}}}function i9e(e,r){if(Array.isArray(e[0])?(e=e.map(function(a){return a.sort(Kh)}),r.multiselect?e=vte(e.sort(cte)):e=[e[0]]):e=[e.sort(Kh)],r.tickvals){var t=r.tickvals.slice().sort(Kh);if(e=e.map(function(a){var n=[m5(0,t,a[0],[]),m5(1,t,a[1],[])];if(n[1]>n[0])return n}).filter(function(a){return a}),!e.length)return}return e.length>1?e:e[0]}hte.exports={makeBrush:n9e,ensureAxisBrush:e9e,cleanRanges:i9e}});var mte=R((SNe,pte)=>{"use strict";var Rf=fr(),o9e=gl().hasColorscale,l9e=w0(),s9e=pb().defaults,u9e=wo(),f9e=Va(),dte=g9(),c9e=_9(),w9=Tm().maxDimensionCount,v9e=s9();function h9e(e,r,t,a,n){var i=n("line.color",t);if(o9e(e,"line")&&Rf.isArrayOrTypedArray(i)){if(i.length)return n("line.colorscale"),l9e(e,r,a,n,{prefix:"line.",cLetter:"c"}),i.length;r.line.color=t}return 1/0}function d9e(e,r,t,a){function n(u,f){return Rf.coerce(e,r,dte.dimensions,u,f)}var i=n("values"),o=n("visible");if(i&&i.length||(o=r.visible=!1),o){n("label"),n("tickvals"),n("ticktext"),n("tickformat");var l=n("range");r._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:l},f9e.setConvert(r._ax,a.layout),n("multiselect");var s=n("constraintrange");s&&(r.constraintrange=c9e.cleanRanges(s,r))}}pte.exports=function(r,t,a,n){function i(f,c){return Rf.coerce(r,t,dte,f,c)}var o=r.dimensions;Array.isArray(o)&&o.length>w9&&(Rf.log("parcoords traces support up to "+w9+" dimensions at the moment"),o.splice(w9));var l=u9e(r,t,{name:"dimensions",layout:n,handleItemDefaults:d9e}),s=h9e(r,t,a,n,i);s9e(t,n,i),(!Array.isArray(l)||!l.length)&&(t.visible=!1),v9e(t,l,"values",s);var u=Rf.extendFlat({},n.font,{size:Math.round(n.font.size/1.2)});Rf.coerceFont(i,"labelfont",u),Rf.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),Rf.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var gte=R((kNe,yte)=>{"use strict";var p9e=fr().isArrayOrTypedArray,A9=T0(),m9e=Mm().wrap;yte.exports=function(r,t){var a,n;return A9.hasColorscale(t,"line")&&p9e(t.line.color)?(a=t.line.color,n=A9.extractOpts(t.line).colorscale,A9.calc(r,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=y9e(t._length),n=[[0,t.line.color],[1,t.line.color]]),m9e({lineColor:a,cscale:n})};function y9e(e){for(var r=new Array(e),t=0;t{"use strict";var g9e=fr().isTypedArray;y5.convertTypedArray=function(e){return g9e(e)?Array.prototype.slice.call(e):e};y5.isOrdinal=function(e){return!!e.tickvals};y5.isVisible=function(e){return e.visible||!("visible"in e)}});var Cte=R((ENe,kte)=>{"use strict";var b9e=["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(` + }`}),a={};return{regl:r,draw:t,atlas:a}};Ra.prototype.update=function(r){var t=this;if(typeof r=="string")r={text:r};else if(!r)return;r=_7e(r,{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),r.opacity!=null&&(Array.isArray(r.opacity)?this.opacity=r.opacity.map(function(se){return parseFloat(se)}):this.opacity=parseFloat(r.opacity)),r.viewport!=null&&(this.viewport=S7e(r.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]),r.kerning!=null&&(this.kerning=r.kerning),r.offset!=null&&(typeof r.offset=="number"&&(r.offset=[r.offset,0]),this.positionOffset=F7e(r.offset)),r.direction&&(this.direction=r.direction),r.range&&(this.range=r.range,this.scale=[1/(r.range[2]-r.range[0]),1/(r.range[3]-r.range[1])],this.translate=[-r.range[0],-r.range[1]]),r.scale&&(this.scale=r.scale),r.translate&&(this.translate=r.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!r.font&&(r.font=Ra.baseFontSize+"px sans-serif");var a=!1,n=!1;if(r.font&&(Array.isArray(r.font)?r.font:[r.font]).forEach(function(se,be){if(typeof se=="string")try{se=jh.parse(se)}catch(Te){se=jh.parse(Ra.baseFontSize+"px "+se)}else{var re=se.style,ke=se.weight,ge=se.stretch,Ee=se.variant;se=jh.parse(jh.stringify(se)),re&&(se.style=re),ke&&(se.weight=ke),ge&&(se.stretch=ge),Ee&&(se.variant=Ee)}var De=jh.stringify({size:Ra.baseFontSize,family:se.family,stretch:n5?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style}),Ce=C7e(se.size),Y=Math.round(Ce[0]*E7e(Ce[1]));if(Y!==t.fontSize[be]&&(n=!0,t.fontSize[be]=Y),(!t.font[be]||De!=t.font[be].baseString)&&(a=!0,t.font[be]=Ra.fonts[De],!t.font[be])){var ae=se.family.join(", "),Z=[se.style];se.style!=se.variant&&Z.push(se.variant),se.variant!=se.weight&&Z.push(se.weight),n5&&se.weight!=se.stretch&&Z.push(se.stretch),t.font[be]={baseString:De,family:ae,weight:se.weight,stretch:se.stretch,style:se.style,variant:se.variant,width:{},kerning:{},metrics:q7e(ae,{origin:"top",fontSize:Ra.baseFontSize,fontStyle:Z.join(" ")})},Ra.fonts[De]=t.font[be]}}),(a||n)&&this.font.forEach(function(se,be){var re=jh.stringify({size:t.fontSize[be],family:se.family,stretch:n5?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style});if(t.fontAtlas[be]=t.shader.atlas[re],!t.fontAtlas[be]){var ke=se.metrics;t.shader.atlas[re]=t.fontAtlas[be]={fontString:re,step:Math.ceil(t.fontSize[be]*ke.bottom*.5)*2,em:t.fontSize[be],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}r.text==null&&(r.text=t.text)}),typeof r.text=="string"&&r.position&&r.position.length>2){for(var i=Array(r.position.length*.5),o=0;o2){for(var u=!r.position[0].length,f=Lf.mallocFloat(this.count*2),c=0,h=0;c1?t.align[be]:t.align[0]:t.align;if(typeof re=="number")return re;switch(re){case"right":case"end":return-se;case"center":case"centre":case"middle":return-se*.5}return 0})),this.baseline==null&&r.baseline==null&&(r.baseline=0),r.baseline!=null&&(this.baseline=r.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(se,be){var re=(t.font[be]||t.font[0]).metrics,ke=0;return ke+=re.bottom*.5,typeof se=="number"?ke+=se-re.baseline:ke+=-re[se],ke*=-1,ke})),r.color!=null)if(r.color||(r.color="transparent"),typeof r.color=="string"||!isNaN(r.color))this.color=n9(r.color,"uint8");else{var $;if(typeof r.color[0]=="number"&&r.color.length>this.counts.length){var W=r.color.length;$=Lf.mallocUint8(W);for(var H=(r.color.subarray||r.color.slice).bind(r.color),B=0;B4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(K){var ve=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(ve);for(var xe=0;xe1?this.counts[xe]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[xe]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(xe*4,xe*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[xe]:this.opacity,baseline:this.baselineOffset[xe]!=null?this.baselineOffset[xe]:this.baselineOffset[0],align:this.align?this.alignOffset[xe]!=null?this.alignOffset[xe]:this.alignOffset[0]:0,atlas:this.fontAtlas[xe]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(xe*2,xe*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=[]}};Ra.prototype.destroy=function(){};Ra.prototype.kerning=!0;Ra.prototype.position={constant:new Float32Array(2)};Ra.prototype.translate=null;Ra.prototype.scale=null;Ra.prototype.font=null;Ra.prototype.text="";Ra.prototype.positionOffset=[0,0];Ra.prototype.opacity=1;Ra.prototype.color=new Uint8Array([0,0,0,255]);Ra.prototype.alignOffset=[0,0];Ra.maxAtlasSize=1024;Ra.atlasCanvas=document.createElement("canvas");Ra.atlasContext=Ra.atlasCanvas.getContext("2d",{alpha:!1});Ra.baseFontSize=64;Ra.fonts={};function P7e(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}Nee.exports=Ra});var Bee=R((rNe,zee)=>{"use strict";var Oee=Qt(),N7e=function(){};zee.exports=function(r){for(var t in r)typeof r[t]=="function"&&(r[t]=N7e);r.destroy=function(){r.container.parentNode.removeChild(r.container)};var a=document.createElement("div");a.className="no-webgl",a.style.cursor="pointer",a.style.fontSize="24px",a.style.color=Oee.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=Oee.lightLine,a.style["z-index"]=30;var n=document.createElement("p");return n.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",n.style.position="relative",n.style.top="50%",n.style.left="50%",n.style.height="30%",n.style.width="50%",n.style.margin="-15% 0 0 -25%",a.appendChild(n),r.container.appendChild(a),r.container.style.background="#FFFFFF",r.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var i5=R((tNe,Uee)=>{"use strict";var I7e=Bee(),O7e=GT();Uee.exports=function(r,t,a){var n=r._fullLayout,i=!0;return n._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(a);return}if(!(o.pick&&!n._has("parcoords"))){try{o.regl=O7e({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:r._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:a||{}})}catch(l){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(l){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:l,layer:o.key})},!1)}}),i||I7e({container:n._glcontainer.node()}),i}});var jee=R((o9,Wee)=>{"use strict";var Gee=$7(),Hee=CT(),z7e=sQ(),Vee=Iee(),i9=fr(),B7e=tf().selectMode,U7e=i5(),G7e=ni(),H7e=kA(),V7e=X7().styleTextSelection,Yee={};function Y7e(e,r,t,a){var n=e._size,i=e.width*a,o=e.height*a,l=n.l*a,s=n.b*a,u=n.r*a,f=n.t*a,c=n.w*a,h=n.h*a;return[l+r.domain[0]*c,s+t.domain[0]*h,i-u-(1-r.domain[1])*c,o-f-(1-t.domain[1])*h]}var o9=Wee.exports=function(r,t,a){if(a.length){var n=r._fullLayout,i=t._scene,o=t.xaxis,l=t.yaxis,s,u;if(i){var f=U7e(r,["ANGLE_instanced_arrays","OES_element_index_uint"],Yee);if(!f){i.init();return}var c=i.count,h=n._glcanvas.data()[0].regl;if(H7e(r,t,a),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&h.clear({}),i.error2d===!0&&(i.error2d=z7e(h)),i.line2d===!0&&(i.line2d=Hee(h)),i.scatter2d===!0&&(i.scatter2d=Gee(h)),i.fill2d===!0&&(i.fill2d=Hee(h)),i.glText===!0)for(i.glText=new Array(c),s=0;si.glText.length){var d=c-i.glText.length;for(s=0;sK&&(isNaN(j[ve])||isNaN(j[ve+1]));)ve-=2;V.positions=j.slice(K,ve+2)}return V}),i.line2d.update(i.lineOptions)),i.error2d){var m=(i.errorXOptions||[]).concat(i.errorYOptions||[]);i.error2d.update(m)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=i9.repeat(null,c),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(V,j){var K=a[j];if(!(!V||!K||!K[0]||!K[0].trace)){var ve=K[0],xe=ve.trace,se=ve.t,be=i.lineOptions[j],re,ke,ge=[];xe._ownfill&&ge.push(j),xe._nexttrace&&ge.push(j+1),ge.length&&(i.fillOrder[j]=ge);var Ee=[],De=be&&be.positions||se.positions,Ce,Y;if(xe.fill==="tozeroy"){for(Ce=0;CeCe&&isNaN(De[Y+1]);)Y-=2;De[Ce+1]!==0&&(Ee=[De[Ce],0]),Ee=Ee.concat(De.slice(Ce,Y+2)),De[Y+1]!==0&&(Ee=Ee.concat([De[Y],0]))}else if(xe.fill==="tozerox"){for(Ce=0;CeCe&&isNaN(De[Y]);)Y-=2;De[Ce]!==0&&(Ee=[0,De[Ce+1]]),Ee=Ee.concat(De.slice(Ce,Y+2)),De[Y]!==0&&(Ee=Ee.concat([0,De[Y+1]]))}else if(xe.fill==="toself"||xe.fill==="tonext"){for(Ee=[],re=0,V.splitNull=!0,ke=0;ke-1;for(s=0;s{"use strict";var Xee=HZ();Xee.plot=jee();Zee.exports=Xee});var Kee=R((nNe,$ee)=>{"use strict";$ee.exports=Jee()});var l9=R((iNe,tre)=>{"use strict";var W7e=sf(),rre=Ac(),Qee=m1().axisHoverFormat,j7e=o0().hovertemplateAttrs,_m=_b(),X7e=ai().idRegex,Z7e=Da().templatedArray,Xh=hn().extendFlat,uu=W7e.marker,J7e=uu.line,$7e=Xh(rre("marker.line",{editTypeOverride:"calc"}),{width:Xh({},J7e.width,{editType:"calc"}),editType:"calc"}),o5=Xh(rre("marker"),{symbol:uu.symbol,angle:uu.angle,size:Xh({},uu.size,{editType:"markerSize"}),sizeref:uu.sizeref,sizemin:uu.sizemin,sizemode:uu.sizemode,opacity:uu.opacity,colorbar:uu.colorbar,line:$7e,editType:"calc"});o5.color.editType=o5.cmin.editType=o5.cmax.editType="style";function ere(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:X7e[e],editType:"plot"}}}tre.exports={dimensions:Z7e("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:Xh({},_m.text,{}),hovertext:Xh({},_m.hovertext,{}),hovertemplate:j7e(),xhoverformat:Qee("x"),yhoverformat:Qee("y"),marker:o5,xaxes:ere("x"),yaxes:ere("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:_m.selected.marker,editType:"calc"},unselected:{marker:_m.unselected.marker,editType:"calc"},opacity:_m.opacity}});var s9=R((oNe,are)=>{"use strict";are.exports=function(e,r,t,a){a||(a=1/0);var n,i;for(n=0;n{"use strict";var u9=fr(),K7e=wo(),nre=l9(),Q7e=ni(),eTe=D3(),rTe=s9(),tTe=wb().isOpenSymbol;ire.exports=function(r,t,a,n){function i(d,p){return u9.coerce(r,t,nre,d,p)}var o=K7e(r,t,{name:"dimensions",handleItemDefaults:aTe}),l=i("diagonal.visible"),s=i("showupperhalf"),u=i("showlowerhalf"),f=rTe(t,o,"values");if(!f||!l&&!s&&!u){t.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat"),eTe(r,t,a,n,i,{noAngleRef:!0,noStandOff:!0});var c=tTe(t.marker.symbol),h=Q7e.isBubble(t);i("marker.line.width",c||h?1:0),nTe(r,t,n,i),u9.coerceSelectionMarkerOpacity(t,i)};function aTe(e,r){function t(n,i){return u9.coerce(e,r,nre.dimensions,n,i)}t("label");var a=t("values");a&&a.length?t("visible"):r.visible=!1,t("axis.type"),t("axis.matches")}function nTe(e,r,t,a){var n=r.dimensions,i=n.length,o=r.showupperhalf,l=r.showlowerhalf,s=r.diagonal.visible,u,f,c=new Array(i),h=new Array(i);for(u=0;uf&&o||u{"use strict";var lre=fr();sre.exports=function(r,t){var a=r._fullLayout,n=t.uid,i=a._splomScenes;i||(i=a._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},l={matrix:!1,selectBatch:[],unselectBatch:[]},s=i[t.uid];return s||(s=i[n]=lre.extendFlat({},o,l),s.draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||lre.extendFlat(s,o),s}});var vre=R((uNe,cre)=>{"use strict";var f9=fr(),l5=an(),iTe=$0().calcMarkerSize,oTe=$0().calcAxisExpansion,lTe=vp(),fre=nm().markerSelection,sTe=nm().markerStyle,uTe=ure(),fTe=_n().BADNUM,cTe=ph().TOO_MANY_POINTS;cre.exports=function(r,t){var a=t.dimensions,n=t._length,i={},o=i.cdata=[],l=i.data=[],s=t._visibleDims=[],u,f,c,h,d;function p(A,b){for(var T=A.makeCalcdata({v:b.values,vcalendar:t.calendar},"v"),S=0;ScTe,x;for(m?x=i.sizeAvg||Math.max(i.size,3):x=iTe(t,n),f=0;f{(function(){var e,r,t,a,n,i;typeof performance!="undefined"&&performance!==null&&performance.now?wm.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(wm.exports=function(){return(e()-n)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},a=e(),i=process.uptime()*1e9,n=a-i):Date.now?(wm.exports=function(){return Date.now()-t},t=Date.now()):(wm.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(hre)});var mre=R((fNe,f5)=>{var vTe=dre(),fu=window,s5=["moz","webkit"],Jh="AnimationFrame",$h=fu["request"+Jh],Am=fu["cancel"+Jh]||fu["cancelRequest"+Jh];for(Zh=0;!$h&&Zh{yre.exports=function(r,t){var a=typeof r=="number",n=typeof t=="number";a&&!n?(t=r,r=0):!a&&!n&&(r=0,t=0),r=r|0,t=t|0;var i=t-r;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),l=0,s=r;l{"use strict";var hTe=$7(),dTe=hs(),pTe=Kc(),bre=mre(),mTe=gre(),v9=gh(),yTe=Qc();_re.exports=qf;function qf(e,r){if(!(this instanceof qf))return new qf(e,r);this.traces=[],this.passes={},this.regl=e,this.scatter=hTe(e),this.canvas=this.scatter.canvas}qf.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=bre(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,bre(()=>{this.dirty=!1})),this)};qf.prototype.update=function(...e){if(!e.length)return;for(let a=0;am||!n.lower&&g{r[i+l]=a})}this.scatter.draw(...r)}return this};qf.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 gTe(e,r,t){let a=e.id!=null?e.id:e,n=r,i=t;return a<<16|(n&255)<<8|i&255}function c5(e,r,t){let a,n,i,o,l,s,u,f,c=e[r],h=e[t];return c.length>2?(a=c[0],i=c[2],n=c[1],o=c[3]):c.length?(a=n=c[0],i=o=c[1]):(a=c.x,n=c.y,i=c.x+c.width,o=c.y+c.height),h.length>2?(l=h[0],u=h[2],s=h[1],f=h[3]):h.length?(l=s=h[0],u=f=h[1]):(l=h.x,s=h.y,u=h.x+h.width,f=h.y+h.height),[l,n,u,o]}function xre(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let r=v9(e);return[r.x,r.y,r.x+r.width,r.y+r.height]}}});var Tre=R((hNe,Are)=>{"use strict";var bTe=wre(),h9=fr(),v5=an(),xTe=tf().selectMode;Are.exports=function(r,t,a){if(a.length)for(var n=0;n-1,N=xTe(f)||!!n.selectedpoints||P,q=!0;if(N){var O=n._length;if(n.selectedpoints){o.selectBatch=n.selectedpoints;var U=n.selectedpoints,$={};for(d=0;d{"use strict";Mre.getDimIndex=function(r,t){for(var a=t._id,n=a.charAt(0),i={x:0,y:1}[n],o=r._visibleDims,l=0;l{"use strict";var Sre=d9(),wTe=P8().calcHover,kre=Va().getFromId,ATe=hn().extendFlat;function TTe(e,r,t,a,n){n||(n={});var i=(a||"").charAt(0)==="x",o=(a||"").charAt(0)==="y",l=Cre(e,r,t);if((i||o)&&n.hoversubplots==="axis"&&l[0])for(var s=(i?e.xa:e.ya)._subplotsWith,u=n.gd,f=ATe({},e),c=0;c{"use strict";var Rre=fr(),Dre=Rre.pushUnique,qre=ni(),Fre=d9();Pre.exports=function(r,t){var a=r.cd,n=a[0].trace,i=a[0].t,o=r.scene,l=o.matrixOptions.cdata,s=r.xaxis,u=r.yaxis,f=[];if(!o)return f;var c=!qre.hasMarkers(n)&&!qre.hasText(n);if(n.visible!==!0||c)return f;var h=Fre.getDimIndex(n,s),d=Fre.getDimIndex(n,u);if(h===!1||d===!1)return f;var p=i.xpx[h],g=i.ypx[d],m=l[h],x=l[d],_=(r.scene.selectBatch||[]).slice(),A=[];if(t!==!1&&!t.degenerate)for(var b=0;b{"use strict";var Ire=fr(),MTe=vp(),STe=nm().markerStyle;Ore.exports=function(r,t){var a=t.trace,n=r._fullLayout._splomScenes[a.uid];if(n){MTe(r,a),Ire.extendFlat(n.matrixOptions,STe(r,a));var i=Ire.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(i,null)}}});var Ure=R((gNe,Bre)=>{"use strict";var kTe=Ct(),CTe=w8();Bre.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:l9(),supplyDefaults:ore(),colorbar:O3(),calc:vre(),plot:Tre(),hoverPoints:Lre().hoverPoints,selectPoints:Nre(),editStyle:zre(),meta:{}};kTe.register(CTe)});var jre=R((bNe,Wre)=>{"use strict";var ETe=CT(),LTe=Ct(),DTe=i5(),qTe=v1().getModuleCalcData,Ff=bp(),Gre=an().getFromId,Hre=Va().shouldShowZeroLine,Vre="splom",Yre={};function FTe(e){var r=e._fullLayout,t=LTe.getModule(Vre),a=qTe(e.calcdata,t)[0],n=DTe(e,["ANGLE_instanced_arrays","OES_element_index_uint"],Yre);n&&(r._hasOnlyLargeSploms&&p9(e),t.plot(e,{},a))}function RTe(e){var r=e.calcdata,t=e._fullLayout;t._hasOnlyLargeSploms&&p9(e);for(var a=0;a{"use strict";var Xre=Ure();Xre.basePlotModule=jre(),Zre.exports=Xre});var Kre=R((_Ne,$re)=>{"use strict";$re.exports=Jre()});var g9=R((wNe,Qre)=>{"use strict";var OTe=Ac(),m9=Bo(),y9=ci(),zTe=pb().attributes,h5=hn().extendFlat,BTe=Da().templatedArray;Qre.exports={domain:zTe({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:y9({editType:"plot"}),tickfont:y9({autoShadowDflt:!0,editType:"plot"}),rangefont:y9({editType:"plot"}),dimensions:BTe("dimension",{label:{valType:"string",editType:"plot"},tickvals:h5({},m9.tickvals,{editType:"plot"}),ticktext:h5({},m9.ticktext,{editType:"plot"}),tickformat:h5({},m9.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:h5({editType:"calc"},OTe("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 Tm=R((ANe,ete)=>{"use strict";ete.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 Mm=R((TNe,tte)=>{"use strict";var UTe=fg();function rte(e){return[e]}tte.exports={keyFun:function(e){return e.key},repeat:rte,descend:UTe,wrap:rte,unwrap:function(e){return e[0]}}});var _9=R((MNe,hte)=>{"use strict";var bn=Tm(),zl=ta(),GTe=Mm().keyFun,d5=Mm().repeat,Kh=fr().sorterAsc,HTe=fr().strTranslate,ate=bn.bar.snapRatio;function nte(e,r){return e*(1-ate)+r*ate}var ite=bn.bar.snapClose;function VTe(e,r){return e*(1-ite)+r*ite}function m5(e,r,t,a){if(YTe(t,a))return t;var n=e?-1:1,i=0,o=r.length-1;if(n<0){var l=i;i=o,o=l}for(var s=r[i],u=s,f=i;n*f=r[t][0]&&e<=r[t][1])return!0;return!1}function WTe(e){e.attr("x",-bn.bar.captureWidth/2).attr("width",bn.bar.captureWidth)}function jTe(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function XTe(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var r=ote(e.brush.filter.getConsolidated(),e.height),t=[0],a,n,i,o=r.length?r[0][0]:null,l=0;le[1]+t||r=.9*e[1]+.1*e[0]?"n":r<=.9*e[0]+.1*e[1]?"s":"ns"}function lte(){zl.select(document.body).style("cursor",null)}function x9(e){e.attr("stroke-dasharray",XTe)}function p5(e,r){var t=zl.select(e).selectAll(".highlight, .highlight-shadow"),a=r?t.transition().duration(bn.bar.snapDuration).each("end",r):t;x9(a)}function ste(e,r){var t=e.brush,a=t.filterSpecified,n=NaN,i={},o;if(a){var l=e.height,s=t.filter.getConsolidated(),u=ote(s,l),f=NaN,c=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=r&&r<=d[1]){f=o;break}else if(c=o?o-1:NaN,d&&d[0]>r){h=o;break}}if(n=f,isNaN(n)&&(isNaN(c)||isNaN(h)?n=isNaN(c)?h:c:n=r-u[c][1]=_[0]&&x<=_[1]){i.clickableOrdinalRange=_;break}}}return i}function JTe(e,r){zl.event.sourceEvent.stopPropagation();var t=r.height-zl.mouse(e)[1]-2*bn.verticalPadding,a=r.unitToPaddedPx.invert(t),n=r.brush,i=ste(r,t),o=i.interval,l=n.svgBrush;if(l.wasDragged=!1,l.grabbingBar=i.region==="ns",l.grabbingBar){var s=o.map(r.unitToPaddedPx);l.grabPoint=t-s[0]-bn.verticalPadding,l.barLength=s[1]-s[0]}l.clickableOrdinalRange=i.clickableOrdinalRange,l.stayingIntervals=r.multiselect&&n.filterSpecified?n.filter.getConsolidated():[],o&&(l.stayingIntervals=l.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),l.startExtent=i.region?o[i.region==="s"?1:0]:a,r.parent.inBrushDrag=!0,l.brushStartCallback()}function ute(e,r){zl.event.sourceEvent.stopPropagation();var t=r.height-zl.mouse(e)[1]-2*bn.verticalPadding,a=r.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[t-a.grabPoint,t+a.barLength-a.grabPoint].map(r.unitToPaddedPx.invert):a.newExtent=[a.startExtent,r.unitToPaddedPx.invert(t)].sort(Kh),r.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(r),p5(e.parentNode)}function $Te(e,r){var t=r.brush,a=t.filter,n=t.svgBrush;n._dragging||(fte(e,r),ute(e,r),r.brush.svgBrush.wasDragged=!1),n._dragging=!1;var i=zl.event;i.sourceEvent.stopPropagation();var o=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,r.parent.inBrushDrag=!1,lte(),!n.wasDragged){n.wasDragged=void 0,n.clickableOrdinalRange?t.filterSpecified&&r.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],t.filterSpecified=!0):o?(n.extent=n.stayingIntervals,n.extent.length===0&&b9(t)):b9(t),n.brushCallback(r),p5(e.parentNode),n.brushEndCallback(t.filterSpecified?a.getConsolidated():[]);return}var l=function(){a.set(a.getConsolidated())};if(r.ordinal){var s=r.unitTickvals;s[s.length-1]n.newExtent[0];n.extent=n.stayingIntervals.concat(u?[n.newExtent]:[]),n.extent.length||b9(t),n.brushCallback(r),u?p5(e.parentNode,l):(l(),p5(e.parentNode))}else l();n.brushEndCallback(t.filterSpecified?a.getConsolidated():[])}function fte(e,r){var t=r.height-zl.mouse(e)[1]-2*bn.verticalPadding,a=ste(r,t),n="crosshair";a.clickableOrdinalRange?n="pointer":a.region&&(n=a.region+"-resize"),zl.select(document.body).style("cursor",n)}function KTe(e){e.on("mousemove",function(r){zl.event.preventDefault(),r.parent.inBrushDrag||fte(this,r)}).on("mouseleave",function(r){r.parent.inBrushDrag||lte()}).call(zl.behavior.drag().on("dragstart",function(r){JTe(this,r)}).on("drag",function(r){ute(this,r)}).on("dragend",function(r){$Te(this,r)}))}function cte(e,r){return e[0]-r[0]}function QTe(e,r,t){var a=t._context.staticPlot,n=e.selectAll(".background").data(d5);n.enter().append("rect").classed("background",!0).call(WTe).call(jTe).style("pointer-events",a?"none":"auto").attr("transform",HTe(0,bn.verticalPadding)),n.call(KTe).attr("height",function(l){return l.height-bn.verticalPadding});var i=e.selectAll(".highlight-shadow").data(d5);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-bn.bar.width/2).attr("stroke-width",bn.bar.width+bn.bar.strokeWidth).attr("stroke",r).attr("opacity",bn.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(l){return l.height}).call(x9);var o=e.selectAll(".highlight").data(d5);o.enter().append("line").classed("highlight",!0).attr("x",-bn.bar.width/2).attr("stroke-width",bn.bar.width-bn.bar.strokeWidth).attr("stroke",bn.bar.fillColor).attr("opacity",bn.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(l){return l.height}).call(x9)}function e9e(e,r,t){var a=e.selectAll("."+bn.cn.axisBrush).data(d5,GTe);a.enter().append("g").classed(bn.cn.axisBrush,!0),QTe(a,r,t)}function r9e(e){return e.svgBrush.extent.map(function(r){return r.slice()})}function b9(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function t9e(e){return function(t){var a=t.brush,n=r9e(a),i=n.slice();a.filter.set(i),e()}}function vte(e){for(var r=e.slice(),t=[],a,n=r.shift();n;){for(a=n.slice();(n=r.shift())&&n[0]<=a[1];)a[1]=Math.max(a[1],n[1]);t.push(a)}return t.length===1&&t[0][0]>t[0][1]&&(t=[]),t}function a9e(){var e=[],r,t;return{set:function(a){e=a.map(function(n){return n.slice().sort(Kh)}).sort(cte),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),r=vte(e),t=e.reduce(function(n,i){return[Math.min(n[0],i[0]),Math.max(n[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return r},getBounds:function(){return t}}}function n9e(e,r,t,a,n,i){var o=a9e();return o.set(t),{filter:o,filterSpecified:r,svgBrush:{extent:[],brushStartCallback:a,brushCallback:t9e(n),brushEndCallback:i}}}function i9e(e,r){if(Array.isArray(e[0])?(e=e.map(function(a){return a.sort(Kh)}),r.multiselect?e=vte(e.sort(cte)):e=[e[0]]):e=[e.sort(Kh)],r.tickvals){var t=r.tickvals.slice().sort(Kh);if(e=e.map(function(a){var n=[m5(0,t,a[0],[]),m5(1,t,a[1],[])];if(n[1]>n[0])return n}).filter(function(a){return a}),!e.length)return}return e.length>1?e:e[0]}hte.exports={makeBrush:n9e,ensureAxisBrush:e9e,cleanRanges:i9e}});var mte=R((SNe,pte)=>{"use strict";var Rf=fr(),o9e=gl().hasColorscale,l9e=w0(),s9e=pb().defaults,u9e=wo(),f9e=Va(),dte=g9(),c9e=_9(),w9=Tm().maxDimensionCount,v9e=s9();function h9e(e,r,t,a,n){var i=n("line.color",t);if(o9e(e,"line")&&Rf.isArrayOrTypedArray(i)){if(i.length)return n("line.colorscale"),l9e(e,r,a,n,{prefix:"line.",cLetter:"c"}),i.length;r.line.color=t}return 1/0}function d9e(e,r,t,a){function n(u,f){return Rf.coerce(e,r,dte.dimensions,u,f)}var i=n("values"),o=n("visible");if(i&&i.length||(o=r.visible=!1),o){n("label"),n("tickvals"),n("ticktext"),n("tickformat");var l=n("range");r._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:l},f9e.setConvert(r._ax,a.layout),n("multiselect");var s=n("constraintrange");s&&(r.constraintrange=c9e.cleanRanges(s,r))}}pte.exports=function(r,t,a,n){function i(f,c){return Rf.coerce(r,t,dte,f,c)}var o=r.dimensions;Array.isArray(o)&&o.length>w9&&(Rf.log("parcoords traces support up to "+w9+" dimensions at the moment"),o.splice(w9));var l=u9e(r,t,{name:"dimensions",layout:n,handleItemDefaults:d9e}),s=h9e(r,t,a,n,i);s9e(t,n,i),(!Array.isArray(l)||!l.length)&&(t.visible=!1),v9e(t,l,"values",s);var u=Rf.extendFlat({},n.font,{size:Math.round(n.font.size/1.2)});Rf.coerceFont(i,"labelfont",u),Rf.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),Rf.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var gte=R((kNe,yte)=>{"use strict";var p9e=fr().isArrayOrTypedArray,A9=T0(),m9e=Mm().wrap;yte.exports=function(r,t){var a,n;return A9.hasColorscale(t,"line")&&p9e(t.line.color)?(a=t.line.color,n=A9.extractOpts(t.line).colorscale,A9.calc(r,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=y9e(t._length),n=[[0,t.line.color],[1,t.line.color]]),m9e({lineColor:a,cscale:n})};function y9e(e){for(var r=new Array(e),t=0;t{"use strict";var g9e=fr().isTypedArray;y5.convertTypedArray=function(e){return g9e(e)?Array.prototype.slice.call(e):e};y5.isOrdinal=function(e){return!!e.tickvals};y5.isVisible=function(e){return e.visible||!("visible"in e)}});var Cte=R((ENe,kte)=>{"use strict";var b9e=["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(` `),x9e=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),Sm=Tm().maxDimensionCount,Tte=fr(),bte=1e-6,g5=2048,_9e=new Uint8Array(4),xte=new Uint8Array(4),_te={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function w9e(e){e.read({x:0,y:0,width:1,height:1,data:_9e})}function Mte(e,r,t,a,n){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(r,t,a,n),e.clear({color:[0,0,0,0],depth:1})}function A9e(e,r,t,a,n,i){var o=i.key;function l(s){var u=Math.min(a,n-s*a);s===0&&(window.cancelAnimationFrame(t.currentRafs[o]),delete t.currentRafs[o],Mte(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!t.clearOnly&&(i.count=2*u,i.offset=2*s*a,r(i),s*a+u>>8*r)%256/255}function S9e(e,r,t){for(var a=new Array(e*(Sm+4)),n=0,i=0;ij&&(j=k[q].dim1.canvasX,U=q);N===0&&Mte(n,0,0,u.canvasWidth,u.canvasHeight);var H=w(t);for(q=0;q{"use strict";var oi=ta(),cu=fr(),S9=cu.isArrayOrTypedArray,Rte=cu.numberFormat,Pte=U7(),Nte=Va(),D9e=cu.strRotate,gs=cu.strTranslate,q9e=Ci(),b5=Ca(),Ete=T0(),E9=Mm(),nl=E9.keyFun,bs=E9.repeat,Ite=E9.unwrap,Qh=T9(),sa=Tm(),Ote=_9(),F9e=Cte();function Lte(e,r,t){return cu.aggNums(e,null,r,t)}function zte(e,r){return L9(Lte(Math.min,e,r),Lte(Math.max,e,r))}function x5(e){var r=e.range;return r?L9(r[0],r[1]):zte(e.values,e._length)}function L9(e,r){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(r)||!isFinite(r))&&(r=0),e===r&&(e===0?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function R9e(e,r){return r?function(t,a){var n=r[a];return n==null?e(t):n}:e}function P9e(e,r,t,a,n){var i=x5(t);return a?oi.scale.ordinal().domain(a.map(R9e(Rte(t.tickformat),n))).range(a.map(function(o){var l=(o-i[0])/(i[1]-i[0]);return e-r+l*(2*r-e)})):oi.scale.linear().domain(i).range([e-r,r])}function N9e(e,r){return oi.scale.linear().range([r,e-r])}function I9e(e,r){return oi.scale.linear().domain(x5(e)).range([r,1-r])}function O9e(e){if(e.tickvals){var r=x5(e);return oi.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(t){return(t-r[0])/(r[1]-r[0])}))}}function z9e(e){var r=e.map(function(i){return i[0]}),t=e.map(function(i){var o=Pte(i[1]);return oi.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),a=function(i){return function(o){return o[i]}},n="rgb".split("").map(function(i){return oi.scale.linear().clamp(!0).domain(r).range(t.map(a(i)))});return function(i){return n.map(function(o){return o(i)})}}function C9(e){return e.dimensions.some(function(r){return r.brush.filterSpecified})}function B9e(e,r,t){var a=Ite(r),n=a.trace,i=Qh.convertTypedArray(a.lineColor),o=n.line,l={color:Pte(n.unselected.line.color),opacity:n.unselected.line.opacity},s=Ete.extractOpts(o),u=s.reversescale?Ete.flipScale(a.cscale):a.cscale,f=n.domain,c=n.dimensions,h=e.width,d=n.labelangle,p=n.labelside,g=n.labelfont,m=n.tickfont,b=n.rangefont,_=cu.extendDeepNoArrays({},o,{color:i.map(oi.scale.linear().domain(x5({values:i,range:[s.min,s.max],_length:n._length}))),blockLineCount:sa.blockLineCount,canvasOverdrag:sa.overdrag*sa.canvasPixelRatio}),w=Math.floor(h*(f.x[1]-f.x[0])),x=Math.floor(e.height*(f.y[1]-f.y[0])),T=e.margin||{l:80,r:80,t:100,b:80},S=w,M=x;return{key:t,colCount:c.filter(Qh.isVisible).length,dimensions:c,tickDistance:sa.tickDistance,unitToColor:z9e(u),lines:_,deselectedLines:l,labelAngle:d,labelSide:p,labelFont:g,tickFont:m,rangeFont:b,layoutWidth:h,layoutHeight:e.height,domain:f,translateX:f.x[0]*h,translateY:e.height-f.y[1]*e.height,pad:T,canvasWidth:S*sa.canvasPixelRatio+2*_.canvasOverdrag,canvasHeight:M*sa.canvasPixelRatio,width:S,height:M,canvasPixelRatio:sa.canvasPixelRatio}}function U9e(e,r,t){var a=t.width,n=t.height,i=t.dimensions,o=t.canvasPixelRatio,l=function(h){return a*h/Math.max(1,t.colCount-1)},s=sa.verticalPadding/n,u=N9e(n,sa.verticalPadding),f={key:t.key,xScale:l,model:t,inBrushDrag:!1},c={};return f.dimensions=i.filter(Qh.isVisible).map(function(h,d){var p=I9e(h,s),g=c[h.label];c[h.label]=(g||0)+1;var m=h.label+(g?"__"+g:""),b=h.constraintrange,_=b&&b.length;_&&!S9(b[0])&&(b=[b]);var w=_?b.map(function(O){return O.map(p)}):[[-1/0,1/0]],x=function(){var O=f;O.focusLayer&&O.focusLayer.render(O.panels,!0);var U=C9(O);!e.contextShown()&&U?(O.contextLayer&&O.contextLayer.render(O.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(O.contextLayer&&O.contextLayer.render(O.panels,!0,!0),e.contextShown(!1))},T=h.values;T.length>h._length&&(T=T.slice(0,h._length));var S=h.tickvals,M;function k(O,U){return{val:O,text:M[U]}}function D(O,U){return O.val-U.val}if(S9(S)&&S.length){cu.isTypedArray(S)&&(S=Array.from(S)),M=h.ticktext,!S9(M)||!M.length?M=S.map(Rte(h.tickformat)):M.length>S.length?M=M.slice(0,S.length):S.length>M.length&&(S=S.slice(0,M.length));for(var P=1;P=U||z>=$)return;var V=q.lineLayer.readPixel(H,$-1-z),X=V[3]!==0,K=X?V[2]+256*(V[1]+256*V[0]):null,ve={x:H,y:z,clientX:O.clientX,clientY:O.clientY,dataIndex:q.model.key,curveNumber:K};K!==p&&(X?n.hover(ve):n.unhover&&n.unhover(ve),p=K)}}),d.style("opacity",function(q){return q.pick?0:1}),l.style("background","rgba(255, 255, 255, 0)");var m=l.selectAll("."+sa.cn.parcoords).data(h,nl);m.exit().remove(),m.enter().append("g").classed(sa.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),m.attr("transform",function(q){return gs(q.model.translateX,q.model.translateY)});var b=m.selectAll("."+sa.cn.parcoordsControlView).data(bs,nl);b.enter().append("g").classed(sa.cn.parcoordsControlView,!0),b.attr("transform",function(q){return gs(q.model.pad.l,q.model.pad.t)});var _=b.selectAll("."+sa.cn.yAxis).data(function(q){return q.dimensions},nl);_.enter().append("g").classed(sa.cn.yAxis,!0),b.each(function(q){k9(_,q,u)}),d.each(function(q){if(q.viewModel){!q.lineLayer||n?q.lineLayer=F9e(this,q):q.lineLayer.update(q),(q.key||q.key===0)&&(q.viewModel[q.key]=q.lineLayer);var O=!q.context||n;q.lineLayer.render(q.viewModel.panels,O)}}),_.attr("transform",function(q){return gs(q.xScale(q.xIndex),0)}),_.call(oi.behavior.drag().origin(function(q){return q}).on("drag",function(q){var O=q.parent;c.linePickActive(!1),q.x=Math.max(-sa.overdrag,Math.min(q.model.width+sa.overdrag,oi.event.x)),q.canvasX=q.x*q.model.canvasPixelRatio,_.sort(function(U,$){return U.x-$.x}).each(function(U,$){U.xIndex=$,U.x=q===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),k9(_,O,u),_.filter(function(U){return Math.abs(q.xIndex-U.xIndex)!==0}).attr("transform",function(U){return gs(U.xScale(U.xIndex),0)}),oi.select(this).attr("transform",gs(q.x,0)),_.each(function(U,$,j){j===q.parent.key&&(O.dimensions[$]=U)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!C9(O)),O.focusLayer.render&&O.focusLayer.render(O.panels)}).on("dragend",function(q){var O=q.parent;q.x=q.xScale(q.xIndex),q.canvasX=q.x*q.model.canvasPixelRatio,k9(_,O,u),oi.select(this).attr("transform",function(U){return gs(U.x,0)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!C9(O)),O.focusLayer&&O.focusLayer.render(O.panels),O.pickLayer&&O.pickLayer.render(O.panels,!0),c.linePickActive(!0),n&&n.axesMoved&&n.axesMoved(O.key,O.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),_.exit().remove();var w=_.selectAll("."+sa.cn.axisOverlays).data(bs,nl);w.enter().append("g").classed(sa.cn.axisOverlays,!0),w.selectAll("."+sa.cn.axis).remove();var x=w.selectAll("."+sa.cn.axis).data(bs,nl);x.enter().append("g").classed(sa.cn.axis,!0),x.each(function(q){var O=q.model.height/q.model.tickDistance,U=q.domainScale,$=U.domain();oi.select(this).call(oi.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(O,q.tickFormat).tickValues(q.ordinal?$:null).tickFormat(function(j){return Qh.isOrdinal(q)?j:Bte(q.model.dimensions[q.visibleIndex],j)}).scale(U)),b5.font(x.selectAll("text"),q.model.tickFont)}),x.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),x.selectAll("text").style("cursor","default");var T=w.selectAll("."+sa.cn.axisHeading).data(bs,nl);T.enter().append("g").classed(sa.cn.axisHeading,!0);var S=T.selectAll("."+sa.cn.axisTitle).data(bs,nl);S.enter().append("text").classed(sa.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),S.text(function(q){return q.label}).each(function(q){var O=oi.select(this);b5.font(O,q.model.labelFont),q9e.convertToTspans(O,r)}).attr("transform",function(q){var O=qte(q.model.labelAngle,q.model.labelSide),U=sa.axisTitleOffset;return(O.dir>0?"":gs(0,2*U+q.model.height))+D9e(O.degrees)+gs(-U*O.dx,-U*O.dy)}).attr("text-anchor",function(q){var O=qte(q.model.labelAngle,q.model.labelSide),U=Math.abs(O.dx),$=Math.abs(O.dy);return 2*U>$?O.dir*O.dx<0?"start":"end":"middle"});var M=w.selectAll("."+sa.cn.axisExtent).data(bs,nl);M.enter().append("g").classed(sa.cn.axisExtent,!0);var k=M.selectAll("."+sa.cn.axisExtentTop).data(bs,nl);k.enter().append("g").classed(sa.cn.axisExtentTop,!0),k.attr("transform",gs(0,-sa.axisExtentOffset));var D=k.selectAll("."+sa.cn.axisExtentTopText).data(bs,nl);D.enter().append("text").classed(sa.cn.axisExtentTopText,!0).call(Dte),D.text(function(q){return Fte(q,!0)}).each(function(q){b5.font(oi.select(this),q.model.rangeFont)});var P=M.selectAll("."+sa.cn.axisExtentBottom).data(bs,nl);P.enter().append("g").classed(sa.cn.axisExtentBottom,!0),P.attr("transform",function(q){return gs(0,q.model.height+sa.axisExtentOffset)});var N=P.selectAll("."+sa.cn.axisExtentBottomText).data(bs,nl);N.enter().append("text").classed(sa.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(Dte),N.text(function(q){return Fte(q,!1)}).each(function(q){b5.font(oi.select(this),q.model.rangeFont)}),Ote.ensureAxisBrush(w,f,r)}});var q9=R((D9,Wte)=>{"use strict";var V9e=Gte(),Y9e=i5(),Hte=T9().isVisible,Yte={};function Vte(e,r,t){var a=r.indexOf(t),n=e.indexOf(a);return n===-1&&(n+=r.length),n}function W9e(e,r){return function(a,n){return Vte(e,r,a)-Vte(e,r,n)}}var D9=Wte.exports=function(r,t){var a=r._fullLayout,n=Y9e(r,[],Yte);if(n){var i={},o={},l={},s={},u=a._size;t.forEach(function(p,g){var m=p[0].trace;l[g]=m.index;var b=s[g]=m.index;i[g]=r.data[b].dimensions,o[g]=r.data[b].dimensions.slice()});var f=function(p,g,m){var b=o[p][g],_=m.map(function(k){return k.slice()}),w="dimensions["+g+"].constraintrange",x=a._tracePreGUI[r._fullData[l[p]]._fullInput.uid];if(x[w]===void 0){var T=b.constraintrange;x[w]=T||null}var S=r._fullData[l[p]].dimensions[g];_.length?(_.length===1&&(_=_[0]),b.constraintrange=_,S.constraintrange=_.slice(),_=[_]):(delete b.constraintrange,delete S.constraintrange,_=null);var M={};M[w]=_,r.emit("plotly_restyle",[M,[s[p]]])},c=function(p){r.emit("plotly_hover",p)},h=function(p){r.emit("plotly_unhover",p)},d=function(p,g){var m=W9e(g,o[p].filter(Hte));i[p].sort(m),o[p].filter(function(b){return!Hte(b)}).sort(function(b){return o[p].indexOf(b)}).forEach(function(b){i[p].splice(i[p].indexOf(b),1),i[p].splice(o[p].indexOf(b),0,b)}),r.emit("plotly_restyle",[{dimensions:[i[p]]},[s[p]]])};V9e(r,t,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:f,hover:c,unhover:h,axesMoved:d})}};D9.reglPrecompiled=Yte});var Xte=R(km=>{"use strict";var jte=ta(),j9e=v1().getModuleCalcData,X9e=q9(),Z9e=ju();km.name="parcoords";km.plot=function(e){var r=j9e(e.calcdata,"parcoords")[0];r.length&&X9e(e,r)};km.clean=function(e,r,t,a){var n=a._has&&a._has("parcoords"),i=r._has&&r._has("parcoords");n&&!i&&(a._paperdiv.selectAll(".parcoords").remove(),a._glimages.selectAll("*").remove())};km.toSVG=function(e){var r=e._fullLayout._glimages,t=jte.select(e).selectAll(".svg-container"),a=t.filter(function(i,o){return o===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var i=this,o=i.toDataURL("image/png"),l=r.append("svg:image");l.attr({xmlns:Z9e.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}a.each(n),window.setTimeout(function(){jte.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var Jte=R((qNe,Zte)=>{"use strict";Zte.exports={attributes:g9(),supplyDefaults:mte(),calc:gte(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Xte(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var Qte=R((FNe,Kte)=>{"use strict";var $te=Jte();$te.plot=q9();Kte.exports=$te});var rae=R((RNe,eae)=>{"use strict";eae.exports=Qte()});var Ti=R((PNe,aae)=>{var w5=kn();function tae(){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={}}w5(tae.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function F9(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function _5(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}w5(F9.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Wt.local.differentCalendars||Wt.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+_5(Math.abs(this.year()),4)+"-"+_5(this.month(),2)+"-"+_5(this.day(),2)}});function R9(){this.shortYearCutoff="+10"}w5(R9.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new F9(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+_5(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Wt.local.invalidMonth||Wt.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Wt.local.invalidMonth||Wt.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),o=e.monthOfYear()+(t==="m"?r:0),n=e.day(),l=function(f){for(;oc-1+f.minMonth;)i++,o-=c,c=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):t==="m"&&(l(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Wt=aae.exports=new tae;Wt.cdate=F9;Wt.baseCalendar=R9;Wt.calendars.gregorian=P9});var nae=R(()=>{var N9=kn(),li=Ti();N9(li.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"});li.local=li.regionalOptions[""];N9(li.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});N9(li.baseCalendar.prototype,{UNIX_EPOCH:li.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:li.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw li.local.invalidFormat||li.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,o=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(x,T){for(var S=1;w+S1},f=function(x,T,S,M){var k=""+T;if(u(x,M))for(;k.length1},_=function(q,O){var U=b(q,O),$=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(q)+1],j=new RegExp("^-?\\d{1,"+$+"}"),H=r.substring(k).match(j);if(!H)throw(li.local.missingNumberAt||li.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=H[0].length,parseInt(H[0],10)},w=this,x=function(){if(typeof l=="function"){b("m");var q=l.call(w,r.substring(k));return k+=q.length,q}return _("m")},T=function(q,O,U,$){for(var j=b(q,$)?U:O,H=0;H-1){h=1,d=p;for(var N=this.daysInMonth(c,h);d>N;N=this.daysInMonth(c,h))h++,d-=N}return f>-1?this.fromJD(f):this.newDate(c,h,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,o=function(l){try{return i.parseDate(a,l,n)}catch(c){}l=l.toLowerCase();for(var s=(l.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(l);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(l);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var iae=R(()=>{var Pf=Ti(),J9e=kn(),I9=Pf.instance();function A5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}A5.prototype=new Pf.baseCalendar;J9e(A5.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(K9e);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(Q9e);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(eMe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw Pf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw Pf.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,Pf.local.invalidyear),n=If[a-If[0]],i=n>>9&4095,o=n>>5&15,l=n&31,s;s=I9.newDate(i,o,l),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=Nf[e-Nf[0]],a=t>>13,n=a?12:11;if(r>n)throw Pf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,Pf.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),o=tMe(e,i,t,n);return I9.toJD(o.year,o.month,o.day)},fromJD:function(e){var r=I9.fromJD(e),t=rMe(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match($9e),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),o=+r[4];return this.newDate(t,i,o)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),o=this.toChineseMonth(a,n),l=Object.getPrototypeOf(A5.prototype).add.call(this,e,r,t);if(t==="y"){var s=l.year(),u=l.month(),f=this.isIntercalaryMonth(s,o),c=i&&f?this.toMonthIndex(s,o,!0):this.toMonthIndex(s,o,!1);c!==u&&l.month(c)}return l}});var $9e=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,K9e=/^\d?\d[iI]?/m,Q9e=/^闰?十?[一二三四五六七八九]?月/m,eMe=/^闰?十?[一二三四五六七八九]?/m;Pf.calendars.chinese=A5;var Nf=[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],If=[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 rMe(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=If[n.year-If[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=If[i.year-If[0]];var c=u>>9&4095,h=u>>5&15,d=u&31,p,g=new Date(c,h-1,d),m=new Date(n.year,n.month-1,n.day);p=Math.round((m-g)/(24*3600*1e3));var b=Nf[i.year-Nf[0]],_;for(_=0;_<13;_++){var w=b&1<<12-_?30:29;if(p>13;return!x||_=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),o={year:e,month:r,day:t,isIntercalary:f}}var c;c=o.day-1;var h=Nf[o.year-Nf[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var g=0;g>9&4095,w=b>>5&15,x=b&31,T=new Date(_,w-1,x+c);return i.year=T.getFullYear(),i.month=1+T.getMonth(),i.day=T.getDate(),i}});var oae=R(()=>{var dv=Ti(),aMe=kn();function O9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}O9.prototype=new dv.baseCalendar;aMe(O9.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(t){var r=this._validate(t,this.minMonth,this.minDay,dv.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,dv.local.invalidYear||dv.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,dv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,dv.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});dv.calendars.coptic=O9});var lae=R(()=>{var vu=Ti(),nMe=kn();function z9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z9.prototype=new vu.baseCalendar;nMe(z9.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,vu.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,vu.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,vu.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,vu.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,vu.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,vu.local.invalidDate);return{century:iMe[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,vu.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var iMe={20:"Fruitbat",21:"Anchovy"};vu.calendars.discworld=z9});var sae=R(()=>{var pv=Ti(),oMe=kn();function B9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}B9.prototype=new pv.baseCalendar;oMe(B9.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(t){var r=this._validate(t,this.minMonth,this.minDay,pv.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,pv.local.invalidYear||pv.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,pv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,pv.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});pv.calendars.ethiopian=B9});var uae=R(()=>{var Of=Ti(),lMe=kn();function U9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}U9.prototype=new Of.baseCalendar;lMe(U9.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 r=this._validate(e,this.minMonth,this.minDay,Of.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,T5(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Of.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Of.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Of.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&T5(this.daysInYear(e),10)===5?30:r===9&&T5(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Of.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Of.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function T5(e,r){return e-r*Math.floor(e/r)}Of.calendars.hebrew=U9});var fae=R(()=>{var Cm=Ti(),sMe=kn();function G9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}G9.prototype=new Cm.baseCalendar;sMe(G9.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 r=this._validate(e,this.minMonth,this.minDay,Cm.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Cm.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Cm.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});Cm.calendars.islamic=G9});var cae=R(()=>{var Em=Ti(),uMe=kn();function H9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}H9.prototype=new Em.baseCalendar;uMe(H9.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(t){var r=this._validate(t,this.minMonth,this.minDay,Em.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Em.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Em.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),o=i-Math.floor(i<14?1:13),l=a-Math.floor(o>2?4716:4715),s=t-n-Math.floor(30.6001*i);return l<=0&&l--,this.newDate(l,o,s)}});Em.calendars.julian=H9});var hae=R(()=>{var il=Ti(),fMe=kn();function Y9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Y9.prototype=new il.baseCalendar;fMe(Y9.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,il.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,il.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,il.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,il.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,il.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,il.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,il.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,il.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,il.local.invalidDate),n=a.toJD(),i=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=V9(e+8+17*20,365);return[Math.floor(r/20)+1,V9(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[vae(e+20,20),vae(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,il.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function V9(e,r){return e-r*Math.floor(e/r)}function vae(e,r){return V9(e-1,r)+1}il.calendars.mayan=Y9});var pae=R(()=>{var mv=Ti(),cMe=kn();function W9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}W9.prototype=new mv.baseCalendar;var dae=mv.instance("gregorian");cMe(W9.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 r=this._validate(e,this.minMonth,this.minDay,mv.local.invalidYear||mv.regionalOptions[""].invalidYear);return dae.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,mv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,mv.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),o=1;o=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});mv.calendars.nanakshahi=W9});var mae=R(()=>{var yv=Ti(),vMe=kn();function j9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}j9.prototype=new yv.baseCalendar;vMe(j9.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,yv.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,yv.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,yv.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=yv.instance(),i=0,o=r,l=e;this._createMissingCalendarData(e);var s=e-(o>9||o===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(i=t,o--);o!==9;)o<=0&&(o=12,l--),i+=this.NEPALI_CALENDAR_DATA[l][o],o--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[l][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=yv.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;n>s;)o++,o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-n);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var ed=Ti(),hMe=kn();function M5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M5.prototype=new ed.baseCalendar;hMe(M5.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,ed.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ed.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,ed.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+X9(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=X9(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),o=X9(a,366);n=Math.floor((2134*i+2816*o+2815)/1028522)+i+1}var l=n+2820*t+474;l=l<=0?l-1:l;var s=e-this.toJD(l,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}});function X9(e,r){return e-r*Math.floor(e/r)}ed.calendars.persian=M5;ed.calendars.jalali=M5});var gae=R(()=>{var gv=Ti(),dMe=kn(),S5=gv.instance();function Z9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Z9.prototype=new gv.baseCalendar;dMe(Z9.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(t){var r=this._validate(t,this.minMonth,this.minDay,gv.local.invalidYear),t=this._t2gYear(r.year());return S5.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,gv.local.invalidYear),n=this._t2gYear(a.year());return S5.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,gv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,gv.local.invalidDate),n=this._t2gYear(a.year());return S5.toJD(n,a.month(),a.day())},fromJD:function(e){var r=S5.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});gv.calendars.taiwan=Z9});var bae=R(()=>{var bv=Ti(),pMe=kn(),k5=bv.instance();function J9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}J9.prototype=new bv.baseCalendar;pMe(J9.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(t){var r=this._validate(t,this.minMonth,this.minDay,bv.local.invalidYear),t=this._t2gYear(r.year());return k5.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,bv.local.invalidYear),n=this._t2gYear(a.year());return k5.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,bv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,bv.local.invalidDate),n=this._t2gYear(a.year());return k5.toJD(n,a.month(),a.day())},fromJD:function(e){var r=k5.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});bv.calendars.thai=J9});var xae=R(()=>{var xv=Ti(),mMe=kn();function $9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}$9.prototype=new xv.baseCalendar;mMe($9.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 r=this._validate(e,this.minMonth,this.minDay,xv.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,xv.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return zf[n]-zf[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,xv.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+zf[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),o=i+1,l=n-12*i,s=r-zf[t-1]+1;return this.newDate(o,l,s)},isValid:function(e,r,t){var a=xv.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=xv.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});xv.calendars.ummalqura=$9;var zf=[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 wae=R((vIe,_ae)=>{"use strict";_ae.exports=Ti();nae();iae();oae();lae();sae();uae();fae();cae();hae();pae();mae();yae();gae();bae();xae()});var Eae=R((hIe,Cae)=>{"use strict";var Tae=wae(),Lm=fr(),Mae=_n(),yMe=Mae.EPOCHJD,gMe=Mae.ONEDAY,eM={valType:"enumerated",values:Lm.sortObjectKeys(Tae.calendars),editType:"calc",dflt:"gregorian"},Sae=function(e,r,t,a){var n={};return n[t]=eM,Lm.coerce(e,r,n,t,a)},bMe=function(e,r,t,a){for(var n=0;n{"use strict";Lae.exports=Eae()});var MMe=R((pIe,Fae)=>{var qae=cV();qae.register([Kee(),Kre(),rae(),Dae()]);Fae.exports=qae});return MMe();})(); +`),Sm=Tm().maxDimensionCount,Tte=fr(),bte=1e-6,g5=2048,_9e=new Uint8Array(4),xte=new Uint8Array(4),_te={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function w9e(e){e.read({x:0,y:0,width:1,height:1,data:_9e})}function Mte(e,r,t,a,n){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(r,t,a,n),e.clear({color:[0,0,0,0],depth:1})}function A9e(e,r,t,a,n,i){var o=i.key;function l(s){var u=Math.min(a,n-s*a);s===0&&(window.cancelAnimationFrame(t.currentRafs[o]),delete t.currentRafs[o],Mte(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!t.clearOnly&&(i.count=2*u,i.offset=2*s*a,r(i),s*a+u>>8*r)%256/255}function S9e(e,r,t){for(var a=new Array(e*(Sm+4)),n=0,i=0;iW&&(W=k[q].dim1.canvasX,U=q);N===0&&Mte(n,0,0,u.canvasWidth,u.canvasHeight);var H=A(t);for(q=0;q{"use strict";var oi=ta(),cu=fr(),S9=cu.isArrayOrTypedArray,Rte=cu.numberFormat,Pte=U7(),Nte=Va(),D9e=cu.strRotate,gs=cu.strTranslate,q9e=Ci(),b5=Ca(),Ete=T0(),E9=Mm(),nl=E9.keyFun,bs=E9.repeat,Ite=E9.unwrap,Qh=T9(),sa=Tm(),Ote=_9(),F9e=Cte();function Lte(e,r,t){return cu.aggNums(e,null,r,t)}function zte(e,r){return L9(Lte(Math.min,e,r),Lte(Math.max,e,r))}function x5(e){var r=e.range;return r?L9(r[0],r[1]):zte(e.values,e._length)}function L9(e,r){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(r)||!isFinite(r))&&(r=0),e===r&&(e===0?(e-=1,r+=1):(e*=.9,r*=1.1)),[e,r]}function R9e(e,r){return r?function(t,a){var n=r[a];return n==null?e(t):n}:e}function P9e(e,r,t,a,n){var i=x5(t);return a?oi.scale.ordinal().domain(a.map(R9e(Rte(t.tickformat),n))).range(a.map(function(o){var l=(o-i[0])/(i[1]-i[0]);return e-r+l*(2*r-e)})):oi.scale.linear().domain(i).range([e-r,r])}function N9e(e,r){return oi.scale.linear().range([r,e-r])}function I9e(e,r){return oi.scale.linear().domain(x5(e)).range([r,1-r])}function O9e(e){if(e.tickvals){var r=x5(e);return oi.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(t){return(t-r[0])/(r[1]-r[0])}))}}function z9e(e){var r=e.map(function(i){return i[0]}),t=e.map(function(i){var o=Pte(i[1]);return oi.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),a=function(i){return function(o){return o[i]}},n="rgb".split("").map(function(i){return oi.scale.linear().clamp(!0).domain(r).range(t.map(a(i)))});return function(i){return n.map(function(o){return o(i)})}}function C9(e){return e.dimensions.some(function(r){return r.brush.filterSpecified})}function B9e(e,r,t){var a=Ite(r),n=a.trace,i=Qh.convertTypedArray(a.lineColor),o=n.line,l={color:Pte(n.unselected.line.color),opacity:n.unselected.line.opacity},s=Ete.extractOpts(o),u=s.reversescale?Ete.flipScale(a.cscale):a.cscale,f=n.domain,c=n.dimensions,h=e.width,d=n.labelangle,p=n.labelside,g=n.labelfont,m=n.tickfont,x=n.rangefont,_=cu.extendDeepNoArrays({},o,{color:i.map(oi.scale.linear().domain(x5({values:i,range:[s.min,s.max],_length:n._length}))),blockLineCount:sa.blockLineCount,canvasOverdrag:sa.overdrag*sa.canvasPixelRatio}),A=Math.floor(h*(f.x[1]-f.x[0])),b=Math.floor(e.height*(f.y[1]-f.y[0])),T=e.margin||{l:80,r:80,t:100,b:80},S=A,M=b;return{key:t,colCount:c.filter(Qh.isVisible).length,dimensions:c,tickDistance:sa.tickDistance,unitToColor:z9e(u),lines:_,deselectedLines:l,labelAngle:d,labelSide:p,labelFont:g,tickFont:m,rangeFont:x,layoutWidth:h,layoutHeight:e.height,domain:f,translateX:f.x[0]*h,translateY:e.height-f.y[1]*e.height,pad:T,canvasWidth:S*sa.canvasPixelRatio+2*_.canvasOverdrag,canvasHeight:M*sa.canvasPixelRatio,width:S,height:M,canvasPixelRatio:sa.canvasPixelRatio}}function U9e(e,r,t){var a=t.width,n=t.height,i=t.dimensions,o=t.canvasPixelRatio,l=function(h){return a*h/Math.max(1,t.colCount-1)},s=sa.verticalPadding/n,u=N9e(n,sa.verticalPadding),f={key:t.key,xScale:l,model:t,inBrushDrag:!1},c={};return f.dimensions=i.filter(Qh.isVisible).map(function(h,d){var p=I9e(h,s),g=c[h.label];c[h.label]=(g||0)+1;var m=h.label+(g?"__"+g:""),x=h.constraintrange,_=x&&x.length;_&&!S9(x[0])&&(x=[x]);var A=_?x.map(function(O){return O.map(p)}):[[-1/0,1/0]],b=function(){var O=f;O.focusLayer&&O.focusLayer.render(O.panels,!0);var U=C9(O);!e.contextShown()&&U?(O.contextLayer&&O.contextLayer.render(O.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(O.contextLayer&&O.contextLayer.render(O.panels,!0,!0),e.contextShown(!1))},T=h.values;T.length>h._length&&(T=T.slice(0,h._length));var S=h.tickvals,M;function k(O,U){return{val:O,text:M[U]}}function D(O,U){return O.val-U.val}if(S9(S)&&S.length){cu.isTypedArray(S)&&(S=Array.from(S)),M=h.ticktext,!S9(M)||!M.length?M=S.map(Rte(h.tickformat)):M.length>S.length?M=M.slice(0,S.length):S.length>M.length&&(S=S.slice(0,M.length));for(var P=1;P=U||B>=$)return;var V=q.lineLayer.readPixel(H,$-1-B),j=V[3]!==0,K=j?V[2]+256*(V[1]+256*V[0]):null,ve={x:H,y:B,clientX:O.clientX,clientY:O.clientY,dataIndex:q.model.key,curveNumber:K};K!==p&&(j?n.hover(ve):n.unhover&&n.unhover(ve),p=K)}}),d.style("opacity",function(q){return q.pick?0:1}),l.style("background","rgba(255, 255, 255, 0)");var m=l.selectAll("."+sa.cn.parcoords).data(h,nl);m.exit().remove(),m.enter().append("g").classed(sa.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),m.attr("transform",function(q){return gs(q.model.translateX,q.model.translateY)});var x=m.selectAll("."+sa.cn.parcoordsControlView).data(bs,nl);x.enter().append("g").classed(sa.cn.parcoordsControlView,!0),x.attr("transform",function(q){return gs(q.model.pad.l,q.model.pad.t)});var _=x.selectAll("."+sa.cn.yAxis).data(function(q){return q.dimensions},nl);_.enter().append("g").classed(sa.cn.yAxis,!0),x.each(function(q){k9(_,q,u)}),d.each(function(q){if(q.viewModel){!q.lineLayer||n?q.lineLayer=F9e(this,q):q.lineLayer.update(q),(q.key||q.key===0)&&(q.viewModel[q.key]=q.lineLayer);var O=!q.context||n;q.lineLayer.render(q.viewModel.panels,O)}}),_.attr("transform",function(q){return gs(q.xScale(q.xIndex),0)}),_.call(oi.behavior.drag().origin(function(q){return q}).on("drag",function(q){var O=q.parent;c.linePickActive(!1),q.x=Math.max(-sa.overdrag,Math.min(q.model.width+sa.overdrag,oi.event.x)),q.canvasX=q.x*q.model.canvasPixelRatio,_.sort(function(U,$){return U.x-$.x}).each(function(U,$){U.xIndex=$,U.x=q===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),k9(_,O,u),_.filter(function(U){return Math.abs(q.xIndex-U.xIndex)!==0}).attr("transform",function(U){return gs(U.xScale(U.xIndex),0)}),oi.select(this).attr("transform",gs(q.x,0)),_.each(function(U,$,W){W===q.parent.key&&(O.dimensions[$]=U)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!C9(O)),O.focusLayer.render&&O.focusLayer.render(O.panels)}).on("dragend",function(q){var O=q.parent;q.x=q.xScale(q.xIndex),q.canvasX=q.x*q.model.canvasPixelRatio,k9(_,O,u),oi.select(this).attr("transform",function(U){return gs(U.x,0)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!C9(O)),O.focusLayer&&O.focusLayer.render(O.panels),O.pickLayer&&O.pickLayer.render(O.panels,!0),c.linePickActive(!0),n&&n.axesMoved&&n.axesMoved(O.key,O.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),_.exit().remove();var A=_.selectAll("."+sa.cn.axisOverlays).data(bs,nl);A.enter().append("g").classed(sa.cn.axisOverlays,!0),A.selectAll("."+sa.cn.axis).remove();var b=A.selectAll("."+sa.cn.axis).data(bs,nl);b.enter().append("g").classed(sa.cn.axis,!0),b.each(function(q){var O=q.model.height/q.model.tickDistance,U=q.domainScale,$=U.domain();oi.select(this).call(oi.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(O,q.tickFormat).tickValues(q.ordinal?$:null).tickFormat(function(W){return Qh.isOrdinal(q)?W:Bte(q.model.dimensions[q.visibleIndex],W)}).scale(U)),b5.font(b.selectAll("text"),q.model.tickFont)}),b.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),b.selectAll("text").style("cursor","default");var T=A.selectAll("."+sa.cn.axisHeading).data(bs,nl);T.enter().append("g").classed(sa.cn.axisHeading,!0);var S=T.selectAll("."+sa.cn.axisTitle).data(bs,nl);S.enter().append("text").classed(sa.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),S.text(function(q){return q.label}).each(function(q){var O=oi.select(this);b5.font(O,q.model.labelFont),q9e.convertToTspans(O,r)}).attr("transform",function(q){var O=qte(q.model.labelAngle,q.model.labelSide),U=sa.axisTitleOffset;return(O.dir>0?"":gs(0,2*U+q.model.height))+D9e(O.degrees)+gs(-U*O.dx,-U*O.dy)}).attr("text-anchor",function(q){var O=qte(q.model.labelAngle,q.model.labelSide),U=Math.abs(O.dx),$=Math.abs(O.dy);return 2*U>$?O.dir*O.dx<0?"start":"end":"middle"});var M=A.selectAll("."+sa.cn.axisExtent).data(bs,nl);M.enter().append("g").classed(sa.cn.axisExtent,!0);var k=M.selectAll("."+sa.cn.axisExtentTop).data(bs,nl);k.enter().append("g").classed(sa.cn.axisExtentTop,!0),k.attr("transform",gs(0,-sa.axisExtentOffset));var D=k.selectAll("."+sa.cn.axisExtentTopText).data(bs,nl);D.enter().append("text").classed(sa.cn.axisExtentTopText,!0).call(Dte),D.text(function(q){return Fte(q,!0)}).each(function(q){b5.font(oi.select(this),q.model.rangeFont)});var P=M.selectAll("."+sa.cn.axisExtentBottom).data(bs,nl);P.enter().append("g").classed(sa.cn.axisExtentBottom,!0),P.attr("transform",function(q){return gs(0,q.model.height+sa.axisExtentOffset)});var N=P.selectAll("."+sa.cn.axisExtentBottomText).data(bs,nl);N.enter().append("text").classed(sa.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(Dte),N.text(function(q){return Fte(q,!1)}).each(function(q){b5.font(oi.select(this),q.model.rangeFont)}),Ote.ensureAxisBrush(A,f,r)}});var q9=R((D9,Wte)=>{"use strict";var V9e=Gte(),Y9e=i5(),Hte=T9().isVisible,Yte={};function Vte(e,r,t){var a=r.indexOf(t),n=e.indexOf(a);return n===-1&&(n+=r.length),n}function W9e(e,r){return function(a,n){return Vte(e,r,a)-Vte(e,r,n)}}var D9=Wte.exports=function(r,t){var a=r._fullLayout,n=Y9e(r,[],Yte);if(n){var i={},o={},l={},s={},u=a._size;t.forEach(function(p,g){var m=p[0].trace;l[g]=m.index;var x=s[g]=m.index;i[g]=r.data[x].dimensions,o[g]=r.data[x].dimensions.slice()});var f=function(p,g,m){var x=o[p][g],_=m.map(function(k){return k.slice()}),A="dimensions["+g+"].constraintrange",b=a._tracePreGUI[r._fullData[l[p]]._fullInput.uid];if(b[A]===void 0){var T=x.constraintrange;b[A]=T||null}var S=r._fullData[l[p]].dimensions[g];_.length?(_.length===1&&(_=_[0]),x.constraintrange=_,S.constraintrange=_.slice(),_=[_]):(delete x.constraintrange,delete S.constraintrange,_=null);var M={};M[A]=_,r.emit("plotly_restyle",[M,[s[p]]])},c=function(p){r.emit("plotly_hover",p)},h=function(p){r.emit("plotly_unhover",p)},d=function(p,g){var m=W9e(g,o[p].filter(Hte));i[p].sort(m),o[p].filter(function(x){return!Hte(x)}).sort(function(x){return o[p].indexOf(x)}).forEach(function(x){i[p].splice(i[p].indexOf(x),1),i[p].splice(o[p].indexOf(x),0,x)}),r.emit("plotly_restyle",[{dimensions:[i[p]]},[s[p]]])};V9e(r,t,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:f,hover:c,unhover:h,axesMoved:d})}};D9.reglPrecompiled=Yte});var Xte=R(km=>{"use strict";var jte=ta(),j9e=v1().getModuleCalcData,X9e=q9(),Z9e=ju();km.name="parcoords";km.plot=function(e){var r=j9e(e.calcdata,"parcoords")[0];r.length&&X9e(e,r)};km.clean=function(e,r,t,a){var n=a._has&&a._has("parcoords"),i=r._has&&r._has("parcoords");n&&!i&&(a._paperdiv.selectAll(".parcoords").remove(),a._glimages.selectAll("*").remove())};km.toSVG=function(e){var r=e._fullLayout._glimages,t=jte.select(e).selectAll(".svg-container"),a=t.filter(function(i,o){return o===t.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var i=this,o=i.toDataURL("image/png"),l=r.append("svg:image");l.attr({xmlns:Z9e.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}a.each(n),window.setTimeout(function(){jte.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var Jte=R((qNe,Zte)=>{"use strict";Zte.exports={attributes:g9(),supplyDefaults:mte(),calc:gte(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Xte(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var Qte=R((FNe,Kte)=>{"use strict";var $te=Jte();$te.plot=q9();Kte.exports=$te});var rae=R((RNe,eae)=>{"use strict";eae.exports=Qte()});var Ti=R((PNe,aae)=>{var w5=kn();function tae(){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={}}w5(tae.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,a,n){return a=(e!=null&&e.year?e.calendar():typeof a=="string"?this.instance(a,n):a)||this.instance(),a.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var a="",n=0;t>0;){var i=t%10;a=(i===0?"":e[i]+r[n])+a,n++,t=Math.floor(t/10)}return a.indexOf(e[1]+r[1])===0&&(a=a.substr(1)),a||e[0]}}});function F9(e,r,t,a){if(this._calendar=e,this._year=r,this._month=t,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function _5(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}w5(F9.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Wt.local.differentCalendars||Wt.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+_5(Math.abs(this.year()),4)+"-"+_5(this.month(),2)+"-"+_5(this.day(),2)}});function R9(){this.shortYearCutoff="+10"}w5(R9.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new F9(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+_5(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Wt.local.invalidMonth||Wt.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Wt.local.invalidMonth||Wt.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wt.local.invalidYear||Wt.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var a=this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var a=e.toJD()+r*(t==="w"?this.daysInWeek():1),n=e.calendar().fromJD(a);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var i=e.year()+(t==="y"?r:0),o=e.monthOfYear()+(t==="m"?r:0),n=e.day(),l=function(f){for(;oc-1+f.minMonth;)i++,o-=c,c=f.monthsInYear(i)};t==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):t==="m"&&(l(this),n=Math.min(n,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),n];return this._validateLevel--,s}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,r,t,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],i=t<0?-1:1;r=this._add(e,t*n[0]+i*n[1],n[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate);var a=t==="y"?r:e.year(),n=t==="m"?r:e.month(),i=t==="d"?r:e.day();return(t==="y"||t==="m")&&(i=Math.min(i,this.daysInMonth(a,n))),e.date(a,n,i)},isValid:function(e,r,t){this._validateLevel++;var a=this.hasYearZero||e!==0;if(a){var n=this.newDate(e,r,this.minDay);a=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),u=n-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,r,t){var a=this._validate(e,r,t,Wt.local.invalidDate||Wt.regionalOptions[""].invalidDate),n=new Date(a.year(),a.month()-1,a.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Wt=aae.exports=new tae;Wt.cdate=F9;Wt.baseCalendar=R9;Wt.calendars.gregorian=P9});var nae=R(()=>{var N9=kn(),li=Ti();N9(li.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"});li.local=li.regionalOptions[""];N9(li.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});N9(li.baseCalendar.prototype,{UNIX_EPOCH:li.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:li.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw li.local.invalidFormat||li.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var a=t.dayNamesShort||this.local.dayNamesShort,n=t.dayNames||this.local.dayNames,i=t.monthNumbers||this.local.monthNumbers,o=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,s=t.calculateWeek||this.local.calculateWeek,u=function(b,T){for(var S=1;A+S1},f=function(b,T,S,M){var k=""+T;if(u(b,M))for(;k.length1},_=function(q,O){var U=x(q,O),$=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(q)+1],W=new RegExp("^-?\\d{1,"+$+"}"),H=r.substring(k).match(W);if(!H)throw(li.local.missingNumberAt||li.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=H[0].length,parseInt(H[0],10)},A=this,b=function(){if(typeof l=="function"){x("m");var q=l.call(A,r.substring(k));return k+=q.length,q}return _("m")},T=function(q,O,U,$){for(var W=x(q,$)?U:O,H=0;H-1){h=1,d=p;for(var N=this.daysInMonth(c,h);d>N;N=this.daysInMonth(c,h))h++,d-=N}return f>-1?this.fromJD(f):this.newDate(c,h,d)},determineDate:function(e,r,t,a,n){t&&typeof t!="object"&&(n=a,a=t,t=null),typeof a!="string"&&(n=a,a="");var i=this,o=function(l){try{return i.parseDate(a,l,n)}catch(c){}l=l.toLowerCase();for(var s=(l.match(/^c/)&&t?t.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=u.exec(l);f;)s.add(parseInt(f[1],10),f[2]||"d"),f=u.exec(l);return s};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:i.today().add(e,"d"):i.newDate(e),e}})});var iae=R(()=>{var Pf=Ti(),J9e=kn(),I9=Pf.instance();function A5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}A5.prototype=new Pf.baseCalendar;J9e(A5.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(K9e);return t?t[0]:""}var a=this._validateYear(e),n=e.month(),i=""+this.toChineseMonth(a,n);return r&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(a,n)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var r=e.match(Q9e);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(eMe);return r?r[0]:""}var t=this._validateYear(e),a=e.month(),n=this.toChineseMonth(t,a),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(t,a)&&(i="\u95F0"+i),i},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),a;if(isNaN(t))r[0]==="\u95F0"&&(a=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var n=r[r.length-1];a=n==="i"||n==="I"}var i=this.toMonthIndex(e,t,a);return i},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var a=this.intercalaryMonth(e),n=t&&r!==a;if(n||r<1||r>12)throw Pf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return a?!t&&r<=a?i=r-1:i=r:i=r-1,i},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),a=t?12:11;if(r<0||r>a)throw Pf.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var a=this._validateYear(e,Pf.local.invalidyear),n=If[a-If[0]],i=n>>9&4095,o=n>>5&15,l=n&31,s;s=I9.newDate(i,o,l),s.add(4-(s.dayOfWeek()||7),"d");var u=this.toJD(e,r,t)-s.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=Nf[e-Nf[0]],a=t>>13,n=a?12:11;if(r>n)throw Pf.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=t&1<<12-r?30:29;return i},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,i,t,Pf.local.invalidDate);e=this._validateYear(a.year()),r=a.month(),t=a.day();var n=this.isIntercalaryMonth(e,r),i=this.toChineseMonth(e,r),o=tMe(e,i,t,n);return I9.toJD(o.year,o.month,o.day)},fromJD:function(e){var r=I9.fromJD(e),t=rMe(r.year(),r.month(),r.day()),a=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,a,t.day)},fromString:function(e){var r=e.match($9e),t=this._validateYear(+r[1]),a=+r[2],n=!!r[3],i=this.toMonthIndex(t,a,n),o=+r[4];return this.newDate(t,i,o)},add:function(e,r,t){var a=e.year(),n=e.month(),i=this.isIntercalaryMonth(a,n),o=this.toChineseMonth(a,n),l=Object.getPrototypeOf(A5.prototype).add.call(this,e,r,t);if(t==="y"){var s=l.year(),u=l.month(),f=this.isIntercalaryMonth(s,o),c=i&&f?this.toMonthIndex(s,o,!0):this.toMonthIndex(s,o,!1);c!==u&&l.month(c)}return l}});var $9e=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,K9e=/^\d?\d[iI]?/m,Q9e=/^闰?十?[一二三四五六七八九]?月/m,eMe=/^闰?十?[一二三四五六七八九]?/m;Pf.calendars.chinese=A5;var Nf=[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],If=[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 rMe(e,r,t,a){var n,i;if(typeof e=="object")n=e,i=r||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=31;if(!s)throw new Error("Solar day outside range 1 - 31");n={year:e,month:r,day:t},i=a||{}}var u=If[n.year-If[0]],f=n.year<<9|n.month<<5|n.day;i.year=f>=u?n.year:n.year-1,u=If[i.year-If[0]];var c=u>>9&4095,h=u>>5&15,d=u&31,p,g=new Date(c,h-1,d),m=new Date(n.year,n.month-1,n.day);p=Math.round((m-g)/(24*3600*1e3));var x=Nf[i.year-Nf[0]],_;for(_=0;_<13;_++){var A=x&1<<12-_?30:29;if(p>13;return!b||_=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var s=typeof r=="number"&&r>=1&&r<=12;if(!s)throw new Error("Lunar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var f;typeof a=="object"?(f=!1,i=a):(f=!!a,i=n||{}),o={year:e,month:r,day:t,isIntercalary:f}}var c;c=o.day-1;var h=Nf[o.year-Nf[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var g=0;g>9&4095,A=x>>5&15,b=x&31,T=new Date(_,A-1,b+c);return i.year=T.getFullYear(),i.month=1+T.getMonth(),i.day=T.getDate(),i}});var oae=R(()=>{var dv=Ti(),aMe=kn();function O9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}O9.prototype=new dv.baseCalendar;aMe(O9.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(t){var r=this._validate(t,this.minMonth,this.minDay,dv.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,dv.local.invalidYear||dv.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,dv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,dv.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});dv.calendars.coptic=O9});var lae=R(()=>{var vu=Ti(),nMe=kn();function z9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z9.prototype=new vu.baseCalendar;nMe(z9.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,vu.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,vu.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,vu.local.invalidYear),400},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,vu.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,vu.local.invalidDate);return(a.day()+1)%8},weekDay:function(e,r,t){var a=this.dayOfWeek(e,r,t);return a>=2&&a<=6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,vu.local.invalidDate);return{century:iMe[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,r,t){var a=this._validate(e,r,t,vu.local.invalidDate);return e=a.year()+(a.year()<0?1:0),r=a.month(),t=a.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,a=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,a)}});var iMe={20:"Fruitbat",21:"Anchovy"};vu.calendars.discworld=z9});var sae=R(()=>{var pv=Ti(),oMe=kn();function B9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}B9.prototype=new pv.baseCalendar;oMe(B9.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(t){var r=this._validate(t,this.minMonth,this.minDay,pv.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,pv.local.invalidYear||pv.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,pv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,pv.local.invalidDate);return e=a.year(),e<0&&e++,a.day()+(a.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var a=Math.floor(r/30)+1,n=r-(a-1)*30+1;return this.newDate(t,a,n)}});pv.calendars.ethiopian=B9});var uae=R(()=>{var Of=Ti(),lMe=kn();function U9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}U9.prototype=new Of.baseCalendar;lMe(U9.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 r=this._validate(e,this.minMonth,this.minDay,Of.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,T5(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Of.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Of.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,Of.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&T5(this.daysInYear(e),10)===5?30:r===9&&T5(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var a=this._validate(e,r,t,Of.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,r,t){var a=this._validate(e,r,t,Of.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e<=0?e+1:e,i=this.jdEpoch+this._delay1(n)+this._delay2(n)+t+1;if(r<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});function T5(e,r){return e-r*Math.floor(e/r)}Of.calendars.hebrew=U9});var fae=R(()=>{var Cm=Ti(),sMe=kn();function G9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}G9.prototype=new Cm.baseCalendar;sMe(G9.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 r=this._validate(e,this.minMonth,this.minDay,Cm.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Cm.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,Cm.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),a=e-this.toJD(r,t,1)+1;return this.newDate(r,t,a)}});Cm.calendars.islamic=G9});var cae=R(()=>{var Em=Ti(),uMe=kn();function H9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}H9.prototype=new Em.baseCalendar;uMe(H9.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(t){var r=this._validate(t,this.minMonth,this.minDay,Em.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(4-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Em.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var a=this._validate(e,r,t,Em.local.invalidDate);return e=a.year(),r=a.month(),t=a.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,a=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*a),i=Math.floor((t-n)/30.6001),o=i-Math.floor(i<14?1:13),l=a-Math.floor(o>2?4716:4715),s=t-n-Math.floor(30.6001*i);return l<=0&&l--,this.newDate(l,o,s)}});Em.calendars.julian=H9});var hae=R(()=>{var il=Ti(),fMe=kn();function Y9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Y9.prototype=new il.baseCalendar;fMe(Y9.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,il.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,il.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var a=Math.floor(e/20);return t+"."+a+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&a<0)throw"Invalid Mayan year";r=r*20+a}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,il.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,il.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,il.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,il.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var a=this._validate(e,r,t,il.local.invalidDate);return a.day()},weekDay:function(e,r,t){return this._validate(e,r,t,il.local.invalidDate),!0},extraInfo:function(e,r,t){var a=this._validate(e,r,t,il.local.invalidDate),n=a.toJD(),i=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=V9(e+8+17*20,365);return[Math.floor(r/20)+1,V9(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[vae(e+20,20),vae(e+4,13)]},toJD:function(e,r,t){var a=this._validate(e,r,t,il.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),a=e%20;return this.newDate(r,t,a)}});function V9(e,r){return e-r*Math.floor(e/r)}function vae(e,r){return V9(e-1,r)+1}il.calendars.mayan=Y9});var pae=R(()=>{var mv=Ti(),cMe=kn();function W9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}W9.prototype=new mv.baseCalendar;var dae=mv.instance("gregorian");cMe(W9.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 r=this._validate(e,this.minMonth,this.minDay,mv.local.invalidYear||mv.regionalOptions[""].invalidYear);return dae.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(1-(a.dayOfWeek()||7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,mv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,mv.local.invalidMonth),n=a.year();n<0&&n++;for(var i=a.day(),o=1;o=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,a=1;t>this.daysInMonth(r,a);)t-=this.daysInMonth(r,a),a++;return this.newDate(r,a,t)}});mv.calendars.nanakshahi=W9});var mae=R(()=>{var yv=Ti(),vMe=kn();function j9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}j9.prototype=new yv.baseCalendar;vMe(j9.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,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,yv.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,a=this.minMonth;a<=12;a++)t+=this.NEPALI_CALENDAR_DATA[e][a];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,yv.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var a=this._validate(e,r,t,yv.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=yv.instance(),i=0,o=r,l=e;this._createMissingCalendarData(e);var s=e-(o>9||o===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(i=t,o--);o!==9;)o<=0&&(o=12,l--),i+=this.NEPALI_CALENDAR_DATA[l][o],o--;return r===9?(i+=t-this.NEPALI_CALENDAR_DATA[l][0],i<0&&(i+=n.daysInYear(s))):i+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],n.newDate(s,1,1).add(i,"d").toJD()},fromJD:function(e){var r=yv.instance(),t=r.fromJD(e),a=t.year(),n=t.dayOfYear(),i=a+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;n>s;)o++,o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-n);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var ed=Ti(),hMe=kn();function M5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M5.prototype=new ed.baseCalendar;hMe(M5.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,ed.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-((a.dayOfWeek()+1)%7),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ed.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,ed.local.invalidDate);e=a.year(),r=a.month(),t=a.day();var n=e-(e>=0?474:473),i=474+X9(n,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(n/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),a=X9(r,1029983),n=2820;if(a!==1029982){var i=Math.floor(a/366),o=X9(a,366);n=Math.floor((2134*i+2816*o+2815)/1028522)+i+1}var l=n+2820*t+474;l=l<=0?l-1:l;var s=e-this.toJD(l,1,1)+1,u=s<=186?Math.ceil(s/31):Math.ceil((s-6)/30),f=e-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}});function X9(e,r){return e-r*Math.floor(e/r)}ed.calendars.persian=M5;ed.calendars.jalali=M5});var gae=R(()=>{var gv=Ti(),dMe=kn(),S5=gv.instance();function Z9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Z9.prototype=new gv.baseCalendar;dMe(Z9.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(t){var r=this._validate(t,this.minMonth,this.minDay,gv.local.invalidYear),t=this._t2gYear(r.year());return S5.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,gv.local.invalidYear),n=this._t2gYear(a.year());return S5.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,gv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,gv.local.invalidDate),n=this._t2gYear(a.year());return S5.toJD(n,a.month(),a.day())},fromJD:function(e){var r=S5.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});gv.calendars.taiwan=Z9});var bae=R(()=>{var bv=Ti(),pMe=kn(),k5=bv.instance();function J9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}J9.prototype=new bv.baseCalendar;pMe(J9.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(t){var r=this._validate(t,this.minMonth,this.minDay,bv.local.invalidYear),t=this._t2gYear(r.year());return k5.leapYear(t)},weekOfYear:function(n,r,t){var a=this._validate(n,this.minMonth,this.minDay,bv.local.invalidYear),n=this._t2gYear(a.year());return k5.weekOfYear(n,a.month(),a.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,bv.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(n,r,t){var a=this._validate(n,r,t,bv.local.invalidDate),n=this._t2gYear(a.year());return k5.toJD(n,a.month(),a.day())},fromJD:function(e){var r=k5.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});bv.calendars.thai=J9});var xae=R(()=>{var xv=Ti(),mMe=kn();function $9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}$9.prototype=new xv.baseCalendar;mMe($9.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 r=this._validate(e,this.minMonth,this.minDay,xv.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var a=this.newDate(e,r,t);return a.add(-a.dayOfWeek(),"d"),Math.floor((a.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,xv.local.invalidMonth),a=t.toJD()-24e5+.5,n=0,i=0;ia)return zf[n]-zf[n-1];n++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var a=this._validate(e,r,t,xv.local.invalidDate),n=12*(a.year()-1)+a.month()-15292,i=a.day()+zf[n-1]-1;return i+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,a=0;ar);a++)t++;var n=t+15292,i=Math.floor((n-1)/12),o=i+1,l=n-12*i,s=r-zf[t-1]+1;return this.newDate(o,l,s)},isValid:function(e,r,t){var a=xv.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(e=e.year!=null?e.year:e,a=e>=1276&&e<=1500),a},_validate:function(e,r,t,a){var n=xv.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw a.replace(/\{0\}/,this.local.name);return n}});xv.calendars.ummalqura=$9;var zf=[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 wae=R((vIe,_ae)=>{"use strict";_ae.exports=Ti();nae();iae();oae();lae();sae();uae();fae();cae();hae();pae();mae();yae();gae();bae();xae()});var Eae=R((hIe,Cae)=>{"use strict";var Tae=wae(),Lm=fr(),Mae=_n(),yMe=Mae.EPOCHJD,gMe=Mae.ONEDAY,eM={valType:"enumerated",values:Lm.sortObjectKeys(Tae.calendars),editType:"calc",dflt:"gregorian"},Sae=function(e,r,t,a){var n={};return n[t]=eM,Lm.coerce(e,r,n,t,a)},bMe=function(e,r,t,a){for(var n=0;n{"use strict";Lae.exports=Eae()});var MMe=R((pIe,Fae)=>{var qae=cV();qae.register([Kee(),Kre(),rae(),Dae()]);Fae.exports=qae});return MMe();})(); /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/dist/plotly-gl3d.js b/dist/plotly-gl3d.js index 441e97e3f8d..ad8791b8b66 100644 --- a/dist/plotly-gl3d.js +++ b/dist/plotly-gl3d.js @@ -13710,7 +13710,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13734,10 +13734,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54107,8 +54107,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54121,18 +54127,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-gl3d.min.js b/dist/plotly-gl3d.min.js index 13cde2bae1e..1b923617cdb 100644 --- a/dist/plotly-gl3d.min.js +++ b/dist/plotly-gl3d.min.js @@ -12,14 +12,14 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var lb=Object.defineProperty;var RB=Object.getOwnPropertyDescriptor;var DB=Object.getOwnPropertyNames;var PB=Object.prototype.hasOwnProperty;var sb=(e,r)=>()=>(e&&(r=e(e=0)),r);var pe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var FB=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of DB(r))!PB.call(e,a)&&a!==t&&lb(e,a,{get:()=>r[a],enumerable:!(n=RB(r,a))||n.enumerable});return e};var IB=e=>FB(lb({},"__esModule",{value:!0}),e);var pc=pe(ub=>{"use strict";ub.version="3.0.0-rc.0"});var cb=pe((fb,gc)=>{(function(r,t,n){t[r]=t[r]||n(),typeof gc!="undefined"&&gc.exports?gc.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:fb,function(){"use strict";var r,t,n,a=Object.prototype.toString,o=typeof setImmediate!="undefined"?function(A){return setImmediate(A)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(A,S,x,T){return Object.defineProperty(A,S,{value:x,writable:!0,configurable:T!==!1})}}catch(m){r=function(S,x,T){return S[x]=T,S}}n=function(){var A,S,x;function T(d,_){this.fn=d,this.self=_,this.next=void 0}return{add:function(_,p){x=new T(_,p),S?S.next=x:A=x,S=x,x=void 0},drain:function(){var _=A;for(A=S=t=void 0;_;)_.fn.call(_.self),_=_.next}}}();function i(m,A){n.add(m,A),t||(t=o(n.drain))}function l(m){var A,S=typeof m;return m!=null&&(S=="object"||S=="function")&&(A=m.then),typeof A=="function"?A:!1}function u(){for(var m=0;m0&&i(u,S))}catch(x){v.call(new b(S),x)}}}function v(m){var A=this;A.triggered||(A.triggered=!0,A.def&&(A=A.def),A.msg=m,A.state=2,A.chain.length>0&&i(u,A))}function g(m,A,S,x){for(var T=0;T{(function(){var e={version:"3.8.2"},r=[].slice,t=function(C){return r.call(C)},n=self.document;function a(C){return C&&(C.ownerDocument||C.document||C).documentElement}function o(C){return C&&(C.ownerDocument&&C.ownerDocument.defaultView||C.document&&C||C.defaultView)}if(n)try{t(n.documentElement.childNodes)[0].nodeType}catch(C){t=function(z){for(var B=z.length,V=new Array(B);B--;)V[B]=z[B];return V}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(C){var i=this.Element.prototype,l=i.setAttribute,u=i.setAttributeNS,s=this.CSSStyleDeclaration.prototype,f=s.setProperty;i.setAttribute=function(z,B){l.call(this,z,B+"")},i.setAttributeNS=function(z,B,V){u.call(this,z,B,V+"")},s.setProperty=function(z,B,V){f.call(this,z,B+"",V)}}e.ascending=v;function v(C,z){return Cz?1:C>=z?0:NaN}e.descending=function(C,z){return zC?1:z>=C?0:NaN},e.min=function(C,z){var B=-1,V=C.length,W,J;if(arguments.length===1){for(;++B=J){W=J;break}for(;++BJ&&(W=J)}else{for(;++B=J){W=J;break}for(;++BJ&&(W=J)}return W},e.max=function(C,z){var B=-1,V=C.length,W,J;if(arguments.length===1){for(;++B=J){W=J;break}for(;++BW&&(W=J)}else{for(;++B=J){W=J;break}for(;++BW&&(W=J)}return W},e.extent=function(C,z){var B=-1,V=C.length,W,J,le;if(arguments.length===1){for(;++B=J){W=le=J;break}for(;++BJ&&(W=J),le=J){W=le=J;break}for(;++BJ&&(W=J),le1)return le/(fe-1)},e.deviation=function(){var C=e.variance.apply(this,arguments);return C&&Math.sqrt(C)};function y(C){return{left:function(z,B,V,W){for(arguments.length<3&&(V=0),arguments.length<4&&(W=z.length);V>>1;C(z[J],B)<0?V=J+1:W=J}return V},right:function(z,B,V,W){for(arguments.length<3&&(V=0),arguments.length<4&&(W=z.length);V>>1;C(z[J],B)>0?W=J:V=J+1}return V}}}var w=y(v);e.bisectLeft=w.left,e.bisect=e.bisectRight=w.right,e.bisector=function(C){return y(C.length===1?function(z,B){return v(C(z),B)}:C)},e.shuffle=function(C,z,B){(V=arguments.length)<3&&(B=C.length,V<2&&(z=0));for(var V=B-z,W,J;V;)J=Math.random()*V--|0,W=C[V+z],C[V+z]=C[J+z],C[J+z]=W;return C},e.permute=function(C,z){for(var B=z.length,V=new Array(B);B--;)V[B]=C[z[B]];return V},e.pairs=function(C){for(var z=0,B=C.length-1,V,W=C[0],J=new Array(B<0?0:B);z=0;)for(le=C[z],B=le.length;--B>=0;)J[--W]=le[B];return J};var m=Math.abs;e.range=function(C,z,B){if(arguments.length<3&&(B=1,arguments.length<2&&(z=C,C=0)),(z-C)/B===1/0)throw new Error("infinite range");var V=[],W=A(m(B)),J=-1,le;if(C*=W,z*=W,B*=W,B<0)for(;(le=C+B*++J)>z;)V.push(le/W);else for(;(le=C+B*++J)=z.length)return W?W.call(C,fe):V?fe.sort(V):fe;for(var _e=-1,Ie=fe.length,Ne=z[xe++],$e,rr,qe,He=new x,Xe;++_e=z.length)return ie;var xe=[],_e=B[fe++];return ie.forEach(function(Ie,Ne){xe.push({key:Ie,values:le(Ne,fe)})}),_e?xe.sort(function(Ie,Ne){return _e(Ie.key,Ne.key)}):xe}return C.map=function(ie,fe){return J(fe,ie,0)},C.entries=function(ie){return le(J(e.map,ie,0),0)},C.key=function(ie){return z.push(ie),C},C.sortKeys=function(ie){return B[z.length-1]=ie,C},C.sortValues=function(ie){return V=ie,C},C.rollup=function(ie){return W=ie,C},C},e.set=function(C){var z=new D;if(C)for(var B=0,V=C.length;B=0&&(V=C.slice(B+1),C=C.slice(0,B)),C)return arguments.length<2?this[C].on(V):this[C].on(V,z);if(arguments.length===2){if(z==null)for(C in this)this.hasOwnProperty(C)&&this[C].on(V,null);return this}};function U(C){var z=[],B=new x;function V(){for(var W=z,J=-1,le=W.length,ie;++J=0&&(B=C.slice(0,z))!=="xmlns"&&(C=C.slice(z+1)),te.hasOwnProperty(B)?{space:te[B],local:C}:C}},ee.attr=function(C,z){if(arguments.length<2){if(typeof C=="string"){var B=this.node();return C=e.ns.qualify(C),C.local?B.getAttributeNS(C.space,C.local):B.getAttribute(C)}for(z in C)this.each(ue(z,C[z]));return this}return this.each(ue(C,z))};function ue(C,z){C=e.ns.qualify(C);function B(){this.removeAttribute(C)}function V(){this.removeAttributeNS(C.space,C.local)}function W(){this.setAttribute(C,z)}function J(){this.setAttributeNS(C.space,C.local,z)}function le(){var fe=z.apply(this,arguments);fe==null?this.removeAttribute(C):this.setAttribute(C,fe)}function ie(){var fe=z.apply(this,arguments);fe==null?this.removeAttributeNS(C.space,C.local):this.setAttributeNS(C.space,C.local,fe)}return z==null?C.local?V:B:typeof z=="function"?C.local?ie:le:C.local?J:W}function de(C){return C.trim().replace(/\s+/g," ")}ee.classed=function(C,z){if(arguments.length<2){if(typeof C=="string"){var B=this.node(),V=(C=Me(C)).length,W=-1;if(z=B.classList){for(;++W=0;)(J=B[V])&&(W&&W!==J.nextSibling&&W.parentNode.insertBefore(J,W),W=J);return this},ee.sort=function(C){C=Te.apply(this,arguments);for(var z=-1,B=this.length;++z=z&&(z=W+1);!(fe=le[z])&&++z0&&(C=C.slice(0,W));var le=be.get(C);le&&(C=le,J=ze);function ie(){var _e=this[V];_e&&(this.removeEventListener(C,_e,_e.$),delete this[V])}function fe(){var _e=J(z,t(arguments));ie.call(this),this.addEventListener(C,this[V]=_e,_e.$=B),_e._=z}function xe(){var _e=new RegExp("^__on([^.]+)"+e.requote(C)+"$"),Ie;for(var Ne in this)if(Ie=Ne.match(_e)){var $e=this[Ne];this.removeEventListener(Ie[1],$e,$e.$),delete this[Ne]}}return W?z?fe:ie:z?P:xe}var be=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&be.forEach(function(C){"on"+C in n&&be.remove(C)});function Se(C,z){return function(B){var V=e.event;e.event=B,z[0]=this.__data__;try{C.apply(this,z)}finally{e.event=V}}}function ze(C,z){var B=Se(C,z);return function(V){var W=this,J=V.relatedTarget;(!J||J!==W&&!(J.compareDocumentPosition(W)&8))&&B.call(W,V)}}var Fe,Je=0;function Ye(C){var z=".dragsuppress-"+ ++Je,B="click"+z,V=e.select(o(C)).on("touchmove"+z,X).on("dragstart"+z,X).on("selectstart"+z,X);if(Fe==null&&(Fe="onselectstart"in C?!1:F(C.style,"userSelect")),Fe){var W=a(C).style,J=W[Fe];W[Fe]="none"}return function(le){if(V.on(z,null),Fe&&(W[Fe]=J),le){var ie=function(){V.on(B,null)};V.on(B,function(){X(),ie()},!0),setTimeout(ie,0)}}}e.mouse=function(C){return We(C,j())};var Ge=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function We(C,z){z.changedTouches&&(z=z.changedTouches[0]);var B=C.ownerSVGElement||C;if(B.createSVGPoint){var V=B.createSVGPoint();if(Ge<0){var W=o(C);if(W.scrollX||W.scrollY){B=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var J=B[0][0].getScreenCTM();Ge=!(J.f||J.e),B.remove()}}return Ge?(V.x=z.pageX,V.y=z.pageY):(V.x=z.clientX,V.y=z.clientY),V=V.matrixTransform(C.getScreenCTM().inverse()),[V.x,V.y]}var le=C.getBoundingClientRect();return[z.clientX-le.left-C.clientLeft,z.clientY-le.top-C.clientTop]}e.touch=function(C,z,B){if(arguments.length<3&&(B=z,z=j().changedTouches),z){for(var V=0,W=z.length,J;V0?1:C<0?-1:0}function je(C,z,B){return(z[0]-C[0])*(B[1]-C[1])-(z[1]-C[1])*(B[0]-C[0])}function nr(C){return C>1?0:C<-1?Ve:Math.acos(C)}function hr(C){return C>1?K:C<-1?-K:Math.asin(C)}function wr(C){return((C=Math.exp(C))-1/C)/2}function Cr(C){return((C=Math.exp(C))+1/C)/2}function Tr(C){return((C=Math.exp(2*C))-1)/(C+1)}function Ar(C){return(C=Math.sin(C/2))*C}var ft=Math.SQRT2,Yr=2,mr=4;e.interpolateZoom=function(C,z){var B=C[0],V=C[1],W=C[2],J=z[0],le=z[1],ie=z[2],fe=J-B,xe=le-V,_e=fe*fe+xe*xe,Ie,Ne;if(_e0&&(vr=vr.transition().duration(le)),vr.call(tr.event)}function br(){He&&He.domain(qe.range().map(function(vr){return(vr-C.x)/C.k}).map(qe.invert)),er&&er.domain(Xe.range().map(function(vr){return(vr-C.y)/C.k}).map(Xe.invert))}function _r(vr){ie++||vr({type:"zoomstart"})}function qr(vr){br(),vr({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function Mr(vr){--ie||(vr({type:"zoomend"}),B=null)}function Pr(){var vr=this,Or=rr.of(vr,arguments),Vr=0,st=e.select(o(vr)).on(xe,bn).on(_e,In),Pt=Ke(e.mouse(vr)),$t=Ye(vr);cc.call(vr),_r(Or);function bn(){Vr=1,yr(e.mouse(vr),Pt),qr(Or)}function In(){st.on(xe,null).on(_e,null),$t(Vr),Mr(Or)}}function lt(){var vr=this,Or=rr.of(vr,arguments),Vr={},st=0,Pt,$t=".zoom-"+e.event.changedTouches[0].identifier,bn="touchmove"+$t,In="touchend"+$t,Gn=[],Nn=e.select(vr),$n=Ye(vr);jn(),_r(Or),Nn.on(fe,null).on(Ne,jn);function An(){var Za=e.touches(vr);return Pt=C.k,Za.forEach(function(_n){_n.identifier in Vr&&(Vr[_n.identifier]=Ke(_n))}),Za}function jn(){var Za=e.event.target;e.select(Za).on(bn,ml).on(In,LB),Gn.push(Za);for(var _n=e.event.changedTouches,Ta=0,Mi=_n.length;Ta1){var xl=Aa[0],_o=Aa[1],dc=xl[0]-_o[0],ob=xl[1]-_o[1];st=dc*dc+ob*ob}}function ml(){var Za=e.touches(vr),_n,Ta,Mi,Aa;cc.call(vr);for(var As=0,xl=Za.length;As1?1:z,B=B<0?0:B>1?1:B,W=B<=.5?B*(1+z):B+z-B*z,V=2*B-W;function J(ie){return ie>360?ie-=360:ie<0&&(ie+=360),ie<60?V+(W-V)*ie/60:ie<180?W:ie<240?V+(W-V)*(240-ie)/60:V}function le(ie){return Math.round(J(ie)*255)}return new tn(le(C+120),le(C),le(C-120))}e.hcl=Lt;function Lt(C,z,B){return this instanceof Lt?(this.h=+C,this.c=+z,void(this.l=+B)):arguments.length<2?C instanceof Lt?new Lt(C.h,C.c,C.l):C instanceof Rt?xi(C.l,C.a,C.b):xi((C=gr((C=e.rgb(C)).r,C.g,C.b)).l,C.a,C.b):new Lt(C,z,B)}var yn=Lt.prototype=new bt;yn.brighter=function(C){return new Lt(this.h,this.c,Math.min(100,this.l+nt*(arguments.length?C:1)))},yn.darker=function(C){return new Lt(this.h,this.c,Math.max(0,this.l-nt*(arguments.length?C:1)))},yn.rgb=function(){return Gt(this.h,this.c,this.l).rgb()};function Gt(C,z,B){return isNaN(C)&&(C=0),isNaN(z)&&(z=0),new Rt(B,Math.cos(C*=ae)*z,Math.sin(C)*z)}e.lab=Rt;function Rt(C,z,B){return this instanceof Rt?(this.l=+C,this.a=+z,void(this.b=+B)):arguments.length<2?C instanceof Rt?new Rt(C.l,C.a,C.b):C instanceof Lt?Gt(C.h,C.c,C.l):gr((C=tn(C)).r,C.g,C.b):new Rt(C,z,B)}var nt=18,Ft=.95047,ha=1,Qn=1.08883,Fn=Rt.prototype=new bt;Fn.brighter=function(C){return new Rt(Math.min(100,this.l+nt*(arguments.length?C:1)),this.a,this.b)},Fn.darker=function(C){return new Rt(Math.max(0,this.l-nt*(arguments.length?C:1)),this.a,this.b)},Fn.rgb=function(){return wa(this.l,this.a,this.b)};function wa(C,z,B){var V=(C+16)/116,W=V+z/500,J=V-B/200;return W=Gi(W)*Ft,V=Gi(V)*ha,J=Gi(J)*Qn,new tn(Wi(3.2404542*W-1.5371385*V-.4985314*J),Wi(-.969266*W+1.8760108*V+.041556*J),Wi(.0556434*W-.2040259*V+1.0572252*J))}function xi(C,z,B){return C>0?new Lt(Math.atan2(B,z)*Re,Math.sqrt(z*z+B*B),C):new Lt(NaN,NaN,C)}function Gi(C){return C>.206893034?C*C*C:(C-4/29)/7.787037}function Yi(C){return C>.008856?Math.pow(C,1/3):7.787037*C+4/29}function Wi(C){return Math.round(255*(C<=.00304?12.92*C:1.055*Math.pow(C,1/2.4)-.055))}e.rgb=tn;function tn(C,z,B){return this instanceof tn?(this.r=~~C,this.g=~~z,void(this.b=~~B)):arguments.length<2?C instanceof tn?new tn(C.r,C.g,C.b):at(""+C,tn,Ot):new tn(C,z,B)}function xo(C){return new tn(C>>16,C>>8&255,C&255)}function bi(C){return xo(C)+""}var _i=tn.prototype=new bt;_i.brighter=function(C){C=Math.pow(.7,arguments.length?C:1);var z=this.r,B=this.g,V=this.b,W=30;return!z&&!B&&!V?new tn(W,W,W):(z&&z>4,V=V>>4|V,W=fe&240,W=W>>4|W,J=fe&15,J=J<<4|J):C.length===7&&(V=(fe&16711680)>>16,W=(fe&65280)>>8,J=fe&255)),z(V,W,J))}function vt(C,z,B){var V=Math.min(C/=255,z/=255,B/=255),W=Math.max(C,z,B),J=W-V,le,ie,fe=(W+V)/2;return J?(ie=fe<.5?J/(W+V):J/(2-W-V),C==W?le=(z-B)/J+(z0&&fe<1?0:le),new zr(le,ie,fe)}function gr(C,z,B){C=mn(C),z=mn(z),B=mn(B);var V=Yi((.4124564*C+.3575761*z+.1804375*B)/Ft),W=Yi((.2126729*C+.7151522*z+.072175*B)/ha),J=Yi((.0193339*C+.119192*z+.9503041*B)/Qn);return Rt(116*W-16,500*(V-W),200*(W-J))}function mn(C){return(C/=255)<=.04045?C/12.92:Math.pow((C+.055)/1.055,2.4)}function _t(C){var z=parseFloat(C);return C.charAt(C.length-1)==="%"?Math.round(z*2.55):z}var xn=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});xn.forEach(function(C,z){xn.set(C,xo(z))});function Xr(C){return typeof C=="function"?C:function(){return C}}e.functor=Xr,e.xhr=Wa(N);function Wa(C){return function(z,B,V){return arguments.length===2&&typeof B=="function"&&(V=B,B=null),hl(z,B,C,V)}}function hl(C,z,B,V){var W={},J=e.dispatch("beforesend","progress","load","error"),le={},ie=new XMLHttpRequest,fe=null;self.XDomainRequest&&!("withCredentials"in ie)&&/^(http(s)?:)?\/\//.test(C)&&(ie=new XDomainRequest),"onload"in ie?ie.onload=ie.onerror=xe:ie.onreadystatechange=function(){ie.readyState>3&&xe()};function xe(){var _e=ie.status,Ie;if(!_e&&Dq(ie)||_e>=200&&_e<300||_e===304){try{Ie=B.call(W,ie)}catch(Ne){J.error.call(W,Ne);return}J.load.call(W,Ie)}else J.error.call(W,ie)}return ie.onprogress=function(_e){var Ie=e.event;e.event=_e;try{J.progress.call(W,ie)}finally{e.event=Ie}},W.header=function(_e,Ie){return _e=(_e+"").toLowerCase(),arguments.length<2?le[_e]:(Ie==null?delete le[_e]:le[_e]=Ie+"",W)},W.mimeType=function(_e){return arguments.length?(z=_e==null?null:_e+"",W):z},W.responseType=function(_e){return arguments.length?(fe=_e,W):fe},W.response=function(_e){return B=_e,W},["get","post"].forEach(function(_e){W[_e]=function(){return W.send.apply(W,[_e].concat(t(arguments)))}}),W.send=function(_e,Ie,Ne){if(arguments.length===2&&typeof Ie=="function"&&(Ne=Ie,Ie=null),ie.open(_e,C,!0),z!=null&&!("accept"in le)&&(le.accept=z+",*/*"),ie.setRequestHeader)for(var $e in le)ie.setRequestHeader($e,le[$e]);return z!=null&&ie.overrideMimeType&&ie.overrideMimeType(z),fe!=null&&(ie.responseType=fe),Ne!=null&&W.on("error",Ne).on("load",function(rr){Ne(null,rr)}),J.beforesend.call(W,ie),ie.send(Ie==null?null:Ie),W},W.abort=function(){return ie.abort(),W},e.rebind(W,J,"on"),V==null?W:W.get(Rq(V))}function Rq(C){return C.length===1?function(z,B){C(z==null?B:null)}:C}function Dq(C){var z=C.responseType;return z&&z!=="text"?C.response:C.responseText}e.dsv=function(C,z){var B=new RegExp('["'+C+` +"use strict";var Plotly=(()=>{var lb=Object.defineProperty;var RB=Object.getOwnPropertyDescriptor;var DB=Object.getOwnPropertyNames;var PB=Object.prototype.hasOwnProperty;var sb=(e,r)=>()=>(e&&(r=e(e=0)),r);var pe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var FB=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of DB(r))!PB.call(e,a)&&a!==t&&lb(e,a,{get:()=>r[a],enumerable:!(n=RB(r,a))||n.enumerable});return e};var IB=e=>FB(lb({},"__esModule",{value:!0}),e);var pc=pe(ub=>{"use strict";ub.version="3.0.0-rc.0"});var cb=pe((fb,gc)=>{(function(r,t,n){t[r]=t[r]||n(),typeof gc!="undefined"&&gc.exports?gc.exports=t[r]:typeof define=="function"&&define.amd&&define(function(){return t[r]})})("Promise",typeof window!="undefined"?window:fb,function(){"use strict";var r,t,n,a=Object.prototype.toString,o=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(k,S,x,T){return Object.defineProperty(k,S,{value:x,writable:!0,configurable:T!==!1})}}catch(m){r=function(S,x,T){return S[x]=T,S}}n=function(){var k,S,x;function T(d,b){this.fn=d,this.self=b,this.next=void 0}return{add:function(b,p){x=new T(b,p),S?S.next=x:k=x,S=x,x=void 0},drain:function(){var b=k;for(k=S=t=void 0;b;)b.fn.call(b.self),b=b.next}}}();function i(m,k){n.add(m,k),t||(t=o(n.drain))}function l(m){var k,S=typeof m;return m!=null&&(S=="object"||S=="function")&&(k=m.then),typeof k=="function"?k:!1}function u(){for(var m=0;m0&&i(u,S))}catch(x){v.call(new _(S),x)}}}function v(m){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=m,k.state=2,k.chain.length>0&&i(u,k))}function g(m,k,S,x){for(var T=0;T{(function(){var e={version:"3.8.2"},r=[].slice,t=function(C){return r.call(C)},n=self.document;function a(C){return C&&(C.ownerDocument||C.document||C).documentElement}function o(C){return C&&(C.ownerDocument&&C.ownerDocument.defaultView||C.document&&C||C.defaultView)}if(n)try{t(n.documentElement.childNodes)[0].nodeType}catch(C){t=function(z){for(var B=z.length,V=new Array(B);B--;)V[B]=z[B];return V}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(C){var i=this.Element.prototype,l=i.setAttribute,u=i.setAttributeNS,s=this.CSSStyleDeclaration.prototype,f=s.setProperty;i.setAttribute=function(z,B){l.call(this,z,B+"")},i.setAttributeNS=function(z,B,V){u.call(this,z,B,V+"")},s.setProperty=function(z,B,V){f.call(this,z,B+"",V)}}e.ascending=v;function v(C,z){return Cz?1:C>=z?0:NaN}e.descending=function(C,z){return zC?1:z>=C?0:NaN},e.min=function(C,z){var B=-1,V=C.length,W,J;if(arguments.length===1){for(;++B=J){W=J;break}for(;++BJ&&(W=J)}else{for(;++B=J){W=J;break}for(;++BJ&&(W=J)}return W},e.max=function(C,z){var B=-1,V=C.length,W,J;if(arguments.length===1){for(;++B=J){W=J;break}for(;++BW&&(W=J)}else{for(;++B=J){W=J;break}for(;++BW&&(W=J)}return W},e.extent=function(C,z){var B=-1,V=C.length,W,J,le;if(arguments.length===1){for(;++B=J){W=le=J;break}for(;++BJ&&(W=J),le=J){W=le=J;break}for(;++BJ&&(W=J),le1)return le/(fe-1)},e.deviation=function(){var C=e.variance.apply(this,arguments);return C&&Math.sqrt(C)};function y(C){return{left:function(z,B,V,W){for(arguments.length<3&&(V=0),arguments.length<4&&(W=z.length);V>>1;C(z[J],B)<0?V=J+1:W=J}return V},right:function(z,B,V,W){for(arguments.length<3&&(V=0),arguments.length<4&&(W=z.length);V>>1;C(z[J],B)>0?W=J:V=J+1}return V}}}var w=y(v);e.bisectLeft=w.left,e.bisect=e.bisectRight=w.right,e.bisector=function(C){return y(C.length===1?function(z,B){return v(C(z),B)}:C)},e.shuffle=function(C,z,B){(V=arguments.length)<3&&(B=C.length,V<2&&(z=0));for(var V=B-z,W,J;V;)J=Math.random()*V--|0,W=C[V+z],C[V+z]=C[J+z],C[J+z]=W;return C},e.permute=function(C,z){for(var B=z.length,V=new Array(B);B--;)V[B]=C[z[B]];return V},e.pairs=function(C){for(var z=0,B=C.length-1,V,W=C[0],J=new Array(B<0?0:B);z=0;)for(le=C[z],B=le.length;--B>=0;)J[--W]=le[B];return J};var m=Math.abs;e.range=function(C,z,B){if(arguments.length<3&&(B=1,arguments.length<2&&(z=C,C=0)),(z-C)/B===1/0)throw new Error("infinite range");var V=[],W=k(m(B)),J=-1,le;if(C*=W,z*=W,B*=W,B<0)for(;(le=C+B*++J)>z;)V.push(le/W);else for(;(le=C+B*++J)=z.length)return W?W.call(C,fe):V?fe.sort(V):fe;for(var _e=-1,Ie=fe.length,Ne=z[xe++],$e,rr,qe,He=new x,Xe;++_e=z.length)return ie;var xe=[],_e=B[fe++];return ie.forEach(function(Ie,Ne){xe.push({key:Ie,values:le(Ne,fe)})}),_e?xe.sort(function(Ie,Ne){return _e(Ie.key,Ne.key)}):xe}return C.map=function(ie,fe){return J(fe,ie,0)},C.entries=function(ie){return le(J(e.map,ie,0),0)},C.key=function(ie){return z.push(ie),C},C.sortKeys=function(ie){return B[z.length-1]=ie,C},C.sortValues=function(ie){return V=ie,C},C.rollup=function(ie){return W=ie,C},C},e.set=function(C){var z=new D;if(C)for(var B=0,V=C.length;B=0&&(V=C.slice(B+1),C=C.slice(0,B)),C)return arguments.length<2?this[C].on(V):this[C].on(V,z);if(arguments.length===2){if(z==null)for(C in this)this.hasOwnProperty(C)&&this[C].on(V,null);return this}};function U(C){var z=[],B=new x;function V(){for(var W=z,J=-1,le=W.length,ie;++J=0&&(B=C.slice(0,z))!=="xmlns"&&(C=C.slice(z+1)),te.hasOwnProperty(B)?{space:te[B],local:C}:C}},ee.attr=function(C,z){if(arguments.length<2){if(typeof C=="string"){var B=this.node();return C=e.ns.qualify(C),C.local?B.getAttributeNS(C.space,C.local):B.getAttribute(C)}for(z in C)this.each(ue(z,C[z]));return this}return this.each(ue(C,z))};function ue(C,z){C=e.ns.qualify(C);function B(){this.removeAttribute(C)}function V(){this.removeAttributeNS(C.space,C.local)}function W(){this.setAttribute(C,z)}function J(){this.setAttributeNS(C.space,C.local,z)}function le(){var fe=z.apply(this,arguments);fe==null?this.removeAttribute(C):this.setAttribute(C,fe)}function ie(){var fe=z.apply(this,arguments);fe==null?this.removeAttributeNS(C.space,C.local):this.setAttributeNS(C.space,C.local,fe)}return z==null?C.local?V:B:typeof z=="function"?C.local?ie:le:C.local?J:W}function de(C){return C.trim().replace(/\s+/g," ")}ee.classed=function(C,z){if(arguments.length<2){if(typeof C=="string"){var B=this.node(),V=(C=Me(C)).length,W=-1;if(z=B.classList){for(;++W=0;)(J=B[V])&&(W&&W!==J.nextSibling&&W.parentNode.insertBefore(J,W),W=J);return this},ee.sort=function(C){C=Te.apply(this,arguments);for(var z=-1,B=this.length;++z=z&&(z=W+1);!(fe=le[z])&&++z0&&(C=C.slice(0,W));var le=be.get(C);le&&(C=le,J=ze);function ie(){var _e=this[V];_e&&(this.removeEventListener(C,_e,_e.$),delete this[V])}function fe(){var _e=J(z,t(arguments));ie.call(this),this.addEventListener(C,this[V]=_e,_e.$=B),_e._=z}function xe(){var _e=new RegExp("^__on([^.]+)"+e.requote(C)+"$"),Ie;for(var Ne in this)if(Ie=Ne.match(_e)){var $e=this[Ne];this.removeEventListener(Ie[1],$e,$e.$),delete this[Ne]}}return W?z?fe:ie:z?P:xe}var be=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&be.forEach(function(C){"on"+C in n&&be.remove(C)});function Se(C,z){return function(B){var V=e.event;e.event=B,z[0]=this.__data__;try{C.apply(this,z)}finally{e.event=V}}}function ze(C,z){var B=Se(C,z);return function(V){var W=this,J=V.relatedTarget;(!J||J!==W&&!(J.compareDocumentPosition(W)&8))&&B.call(W,V)}}var Fe,Je=0;function Ye(C){var z=".dragsuppress-"+ ++Je,B="click"+z,V=e.select(o(C)).on("touchmove"+z,X).on("dragstart"+z,X).on("selectstart"+z,X);if(Fe==null&&(Fe="onselectstart"in C?!1:F(C.style,"userSelect")),Fe){var W=a(C).style,J=W[Fe];W[Fe]="none"}return function(le){if(V.on(z,null),Fe&&(W[Fe]=J),le){var ie=function(){V.on(B,null)};V.on(B,function(){X(),ie()},!0),setTimeout(ie,0)}}}e.mouse=function(C){return We(C,j())};var Ge=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function We(C,z){z.changedTouches&&(z=z.changedTouches[0]);var B=C.ownerSVGElement||C;if(B.createSVGPoint){var V=B.createSVGPoint();if(Ge<0){var W=o(C);if(W.scrollX||W.scrollY){B=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var J=B[0][0].getScreenCTM();Ge=!(J.f||J.e),B.remove()}}return Ge?(V.x=z.pageX,V.y=z.pageY):(V.x=z.clientX,V.y=z.clientY),V=V.matrixTransform(C.getScreenCTM().inverse()),[V.x,V.y]}var le=C.getBoundingClientRect();return[z.clientX-le.left-C.clientLeft,z.clientY-le.top-C.clientTop]}e.touch=function(C,z,B){if(arguments.length<3&&(B=z,z=j().changedTouches),z){for(var V=0,W=z.length,J;V0?1:C<0?-1:0}function je(C,z,B){return(z[0]-C[0])*(B[1]-C[1])-(z[1]-C[1])*(B[0]-C[0])}function nr(C){return C>1?0:C<-1?Ve:Math.acos(C)}function hr(C){return C>1?K:C<-1?-K:Math.asin(C)}function wr(C){return((C=Math.exp(C))-1/C)/2}function Cr(C){return((C=Math.exp(C))+1/C)/2}function Tr(C){return((C=Math.exp(2*C))-1)/(C+1)}function Ar(C){return(C=Math.sin(C/2))*C}var ft=Math.SQRT2,Yr=2,mr=4;e.interpolateZoom=function(C,z){var B=C[0],V=C[1],W=C[2],J=z[0],le=z[1],ie=z[2],fe=J-B,xe=le-V,_e=fe*fe+xe*xe,Ie,Ne;if(_e0&&(vr=vr.transition().duration(le)),vr.call(tr.event)}function br(){He&&He.domain(qe.range().map(function(vr){return(vr-C.x)/C.k}).map(qe.invert)),er&&er.domain(Xe.range().map(function(vr){return(vr-C.y)/C.k}).map(Xe.invert))}function _r(vr){ie++||vr({type:"zoomstart"})}function qr(vr){br(),vr({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function Mr(vr){--ie||(vr({type:"zoomend"}),B=null)}function Pr(){var vr=this,Or=rr.of(vr,arguments),Vr=0,st=e.select(o(vr)).on(xe,bn).on(_e,In),Pt=Ke(e.mouse(vr)),$t=Ye(vr);cc.call(vr),_r(Or);function bn(){Vr=1,yr(e.mouse(vr),Pt),qr(Or)}function In(){st.on(xe,null).on(_e,null),$t(Vr),Mr(Or)}}function lt(){var vr=this,Or=rr.of(vr,arguments),Vr={},st=0,Pt,$t=".zoom-"+e.event.changedTouches[0].identifier,bn="touchmove"+$t,In="touchend"+$t,Gn=[],Nn=e.select(vr),$n=Ye(vr);jn(),_r(Or),Nn.on(fe,null).on(Ne,jn);function An(){var Za=e.touches(vr);return Pt=C.k,Za.forEach(function(_n){_n.identifier in Vr&&(Vr[_n.identifier]=Ke(_n))}),Za}function jn(){var Za=e.event.target;e.select(Za).on(bn,ml).on(In,LB),Gn.push(Za);for(var _n=e.event.changedTouches,Ta=0,Mi=_n.length;Ta1){var xl=Aa[0],_o=Aa[1],dc=xl[0]-_o[0],ob=xl[1]-_o[1];st=dc*dc+ob*ob}}function ml(){var Za=e.touches(vr),_n,Ta,Mi,Aa;cc.call(vr);for(var As=0,xl=Za.length;As1?1:z,B=B<0?0:B>1?1:B,W=B<=.5?B*(1+z):B+z-B*z,V=2*B-W;function J(ie){return ie>360?ie-=360:ie<0&&(ie+=360),ie<60?V+(W-V)*ie/60:ie<180?W:ie<240?V+(W-V)*(240-ie)/60:V}function le(ie){return Math.round(J(ie)*255)}return new tn(le(C+120),le(C),le(C-120))}e.hcl=Lt;function Lt(C,z,B){return this instanceof Lt?(this.h=+C,this.c=+z,void(this.l=+B)):arguments.length<2?C instanceof Lt?new Lt(C.h,C.c,C.l):C instanceof Rt?xi(C.l,C.a,C.b):xi((C=gr((C=e.rgb(C)).r,C.g,C.b)).l,C.a,C.b):new Lt(C,z,B)}var yn=Lt.prototype=new bt;yn.brighter=function(C){return new Lt(this.h,this.c,Math.min(100,this.l+nt*(arguments.length?C:1)))},yn.darker=function(C){return new Lt(this.h,this.c,Math.max(0,this.l-nt*(arguments.length?C:1)))},yn.rgb=function(){return Gt(this.h,this.c,this.l).rgb()};function Gt(C,z,B){return isNaN(C)&&(C=0),isNaN(z)&&(z=0),new Rt(B,Math.cos(C*=ae)*z,Math.sin(C)*z)}e.lab=Rt;function Rt(C,z,B){return this instanceof Rt?(this.l=+C,this.a=+z,void(this.b=+B)):arguments.length<2?C instanceof Rt?new Rt(C.l,C.a,C.b):C instanceof Lt?Gt(C.h,C.c,C.l):gr((C=tn(C)).r,C.g,C.b):new Rt(C,z,B)}var nt=18,Ft=.95047,ha=1,Qn=1.08883,Fn=Rt.prototype=new bt;Fn.brighter=function(C){return new Rt(Math.min(100,this.l+nt*(arguments.length?C:1)),this.a,this.b)},Fn.darker=function(C){return new Rt(Math.max(0,this.l-nt*(arguments.length?C:1)),this.a,this.b)},Fn.rgb=function(){return wa(this.l,this.a,this.b)};function wa(C,z,B){var V=(C+16)/116,W=V+z/500,J=V-B/200;return W=Gi(W)*Ft,V=Gi(V)*ha,J=Gi(J)*Qn,new tn(Wi(3.2404542*W-1.5371385*V-.4985314*J),Wi(-.969266*W+1.8760108*V+.041556*J),Wi(.0556434*W-.2040259*V+1.0572252*J))}function xi(C,z,B){return C>0?new Lt(Math.atan2(B,z)*Re,Math.sqrt(z*z+B*B),C):new Lt(NaN,NaN,C)}function Gi(C){return C>.206893034?C*C*C:(C-4/29)/7.787037}function Yi(C){return C>.008856?Math.pow(C,1/3):7.787037*C+4/29}function Wi(C){return Math.round(255*(C<=.00304?12.92*C:1.055*Math.pow(C,1/2.4)-.055))}e.rgb=tn;function tn(C,z,B){return this instanceof tn?(this.r=~~C,this.g=~~z,void(this.b=~~B)):arguments.length<2?C instanceof tn?new tn(C.r,C.g,C.b):at(""+C,tn,Ot):new tn(C,z,B)}function xo(C){return new tn(C>>16,C>>8&255,C&255)}function bi(C){return xo(C)+""}var _i=tn.prototype=new bt;_i.brighter=function(C){C=Math.pow(.7,arguments.length?C:1);var z=this.r,B=this.g,V=this.b,W=30;return!z&&!B&&!V?new tn(W,W,W):(z&&z>4,V=V>>4|V,W=fe&240,W=W>>4|W,J=fe&15,J=J<<4|J):C.length===7&&(V=(fe&16711680)>>16,W=(fe&65280)>>8,J=fe&255)),z(V,W,J))}function vt(C,z,B){var V=Math.min(C/=255,z/=255,B/=255),W=Math.max(C,z,B),J=W-V,le,ie,fe=(W+V)/2;return J?(ie=fe<.5?J/(W+V):J/(2-W-V),C==W?le=(z-B)/J+(z0&&fe<1?0:le),new zr(le,ie,fe)}function gr(C,z,B){C=mn(C),z=mn(z),B=mn(B);var V=Yi((.4124564*C+.3575761*z+.1804375*B)/Ft),W=Yi((.2126729*C+.7151522*z+.072175*B)/ha),J=Yi((.0193339*C+.119192*z+.9503041*B)/Qn);return Rt(116*W-16,500*(V-W),200*(W-J))}function mn(C){return(C/=255)<=.04045?C/12.92:Math.pow((C+.055)/1.055,2.4)}function _t(C){var z=parseFloat(C);return C.charAt(C.length-1)==="%"?Math.round(z*2.55):z}var xn=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});xn.forEach(function(C,z){xn.set(C,xo(z))});function Xr(C){return typeof C=="function"?C:function(){return C}}e.functor=Xr,e.xhr=Wa(N);function Wa(C){return function(z,B,V){return arguments.length===2&&typeof B=="function"&&(V=B,B=null),hl(z,B,C,V)}}function hl(C,z,B,V){var W={},J=e.dispatch("beforesend","progress","load","error"),le={},ie=new XMLHttpRequest,fe=null;self.XDomainRequest&&!("withCredentials"in ie)&&/^(http(s)?:)?\/\//.test(C)&&(ie=new XDomainRequest),"onload"in ie?ie.onload=ie.onerror=xe:ie.onreadystatechange=function(){ie.readyState>3&&xe()};function xe(){var _e=ie.status,Ie;if(!_e&&Dq(ie)||_e>=200&&_e<300||_e===304){try{Ie=B.call(W,ie)}catch(Ne){J.error.call(W,Ne);return}J.load.call(W,Ie)}else J.error.call(W,ie)}return ie.onprogress=function(_e){var Ie=e.event;e.event=_e;try{J.progress.call(W,ie)}finally{e.event=Ie}},W.header=function(_e,Ie){return _e=(_e+"").toLowerCase(),arguments.length<2?le[_e]:(Ie==null?delete le[_e]:le[_e]=Ie+"",W)},W.mimeType=function(_e){return arguments.length?(z=_e==null?null:_e+"",W):z},W.responseType=function(_e){return arguments.length?(fe=_e,W):fe},W.response=function(_e){return B=_e,W},["get","post"].forEach(function(_e){W[_e]=function(){return W.send.apply(W,[_e].concat(t(arguments)))}}),W.send=function(_e,Ie,Ne){if(arguments.length===2&&typeof Ie=="function"&&(Ne=Ie,Ie=null),ie.open(_e,C,!0),z!=null&&!("accept"in le)&&(le.accept=z+",*/*"),ie.setRequestHeader)for(var $e in le)ie.setRequestHeader($e,le[$e]);return z!=null&&ie.overrideMimeType&&ie.overrideMimeType(z),fe!=null&&(ie.responseType=fe),Ne!=null&&W.on("error",Ne).on("load",function(rr){Ne(null,rr)}),J.beforesend.call(W,ie),ie.send(Ie==null?null:Ie),W},W.abort=function(){return ie.abort(),W},e.rebind(W,J,"on"),V==null?W:W.get(Rq(V))}function Rq(C){return C.length===1?function(z,B){C(z==null?B:null)}:C}function Dq(C){var z=C.responseType;return z&&z!=="text"?C.response:C.responseText}e.dsv=function(C,z){var B=new RegExp('["'+C+` ]`),V=C.charCodeAt(0);function W(xe,_e,Ie){arguments.length<3&&(Ie=_e,_e=null);var Ne=hl(xe,z,_e==null?J:le(_e),Ie);return Ne.row=function($e){return arguments.length?Ne.response((_e=$e)==null?J:le($e)):_e},Ne}function J(xe){return W.parse(xe.responseText)}function le(xe){return function(_e){return W.parse(_e.responseText,xe)}}W.parse=function(xe,_e){var Ie;return W.parseRows(xe,function(Ne,$e){if(Ie)return Ie(Ne,$e-1);var rr=function(qe){for(var He={},Xe=Ne.length,er=0;er=rr)return Ne;if(er)return er=!1,Ie;var or=qe;if(xe.charCodeAt(or)===34){for(var dr=or;dr++24?(isFinite(z)&&(clearTimeout(J0),J0=setTimeout(Rd,z)),Z0=0):(Z0=1,W5(Rd))}e.timer.flush=function(){X5(),Z5()};function X5(){for(var C=Date.now(),z=W0;z;)C>=z.t&&z.c(C-z.t)&&(z.c=null),z=z.n;return C}function Z5(){for(var C,z=W0,B=1/0;z;)z.c?(z.t=0;--ie)qe.push(W[xe[Ie[ie]][2]]);for(ie=+$e;ie1&&je(C[B[V-2]],C[B[V-1]],C[W])<=0;)--V;B[V++]=W}return B.slice(0,V)}function Pq(C,z){return C[0]-z[0]||C[1]-z[1]}e.geom.polygon=function(C){return q(C,Q0),C};var Q0=e.geom.polygon.prototype=[];Q0.area=function(){for(var C=-1,z=this.length,B,V=this[z-1],W=0;++CPe)ie=ie.L;else if(le=z-zq(ie,B),le>Pe){if(!ie.R){V=ie;break}ie=ie.R}else{J>-Pe?(V=ie.P,W=ie):le>-Pe?(V=ie,W=ie.N):V=W=ie;break}var fe=j5(C);if(_s.insert(V,fe),!(!V&&!W)){if(V===W){Ms(V),W=j5(V.site),_s.insert(fe,W),fe.edge=W.edge=Ku(V.site,fe.site),ws(V),ws(W);return}if(!W){fe.edge=Ku(V.site,fe.site);return}Ms(V),Ms(W);var xe=V.site,_e=xe.x,Ie=xe.y,Ne=C.x-_e,$e=C.y-Ie,rr=W.site,qe=rr.x-_e,He=rr.y-Ie,Xe=2*(Ne*He-$e*qe),er=Ne*Ne+$e*$e,tr=qe*qe+He*He,Ke={x:(He*er-$e*tr)/Xe+_e,y:(Ne*tr-qe*er)/Xe+Ie};$0(W.edge,xe,rr,Ke),fe.edge=Ku(xe,C,null,Ke),W.edge=Ku(C,rr,null,Ke),ws(V),ws(W)}}function ex(C,z){var B=C.site,V=B.x,W=B.y,J=W-z;if(!J)return V;var le=C.P;if(!le)return-1/0;B=le.site;var ie=B.x,fe=B.y,xe=fe-z;if(!xe)return ie;var _e=ie-V,Ie=1/J-1/xe,Ne=_e/xe;return Ie?(-Ne+Math.sqrt(Ne*Ne-2*Ie*(_e*_e/(-2*xe)-fe+xe/2+W-J/2)))/Ie+V:(V+ie)/2}function zq(C,z){var B=C.N;if(B)return ex(B,z);var V=C.site;return V.y===z?V.x:1/0}function rx(C){this.site=C,this.edges=[]}rx.prototype.prepare=function(){for(var C=this.edges,z=C.length,B;z--;)B=C[z].edge,(!B.b||!B.a)&&C.splice(z,1);return C.sort(tx),C.length};function qq(C){for(var z=C[0][0],B=C[1][0],V=C[0][1],W=C[1][1],J,le,ie,fe,xe=dl,_e=xe.length,Ie,Ne,$e,rr,qe,He;_e--;)if(Ie=xe[_e],!(!Ie||!Ie.prepare()))for($e=Ie.edges,rr=$e.length,Ne=0;NePe||m(fe-le)>Pe)&&($e.splice(Ne,0,new j0(Vq(Ie.site,He,m(ie-z)Pe?{x:z,y:m(J-z)Pe?{x:m(le-W)Pe?{x:B,y:m(J-B)Pe?{x:m(le-V)=-Qe)){var Ne=fe*fe+xe*xe,$e=_e*_e+He*He,rr=(He*Ne-xe*$e)/Ie,qe=(fe*$e-_e*Ne)/Ie,He=qe+ie,Xe=$5.pop()||new Oq;Xe.arc=C,Xe.site=W,Xe.x=rr+le,Xe.y=He+Math.sqrt(rr*rr+qe*qe),Xe.cy=He,C.circle=Xe;for(var er=null,tr=Ju._;tr;)if(Xe.y0)){if(qe/=$e,$e<0){if(qe0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}if(qe=B-ie,!(!$e&&qe<0)){if(qe/=$e,$e<0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}else if($e>0){if(qe0)){if(qe/=rr,rr<0){if(qe0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}if(qe=V-fe,!(!rr&&qe<0)){if(qe/=rr,rr<0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}else if(rr>0){if(qe0&&(W.a={x:ie+Ie*$e,y:fe+Ie*rr}),Ne<1&&(W.b={x:ie+Ne*$e,y:fe+Ne*rr}),W}}}}}}function Uq(C){for(var z=bs,B=Bq(C[0][0],C[0][1],C[1][0],C[1][1]),V=z.length,W;V--;)W=z[V],(!Hq(W,C)||!B(W)||m(W.a.x-W.b.x)=J)return;if(_e>Ne){if(!V)V={x:rr,y:le};else if(V.y>=ie)return;B={x:rr,y:ie}}else{if(!V)V={x:rr,y:ie};else if(V.y1)if(_e>Ne){if(!V)V={x:(le-Xe)/He,y:le};else if(V.y>=ie)return;B={x:(ie-Xe)/He,y:ie}}else{if(!V)V={x:(ie-Xe)/He,y:ie};else if(V.y=J)return;B={x:J,y:He*J+Xe}}else{if(!V)V={x:J,y:He*J+Xe};else if(V.x=_e&&Xe.x<=Ne&&Xe.y>=Ie&&Xe.y<=$e?[[_e,$e],[Ne,$e],[Ne,Ie],[_e,Ie]]:[];er.point=fe[qe]}),xe}function ie(fe){return fe.map(function(xe,_e){return{x:Math.round(V(xe,_e)/Pe)*Pe,y:Math.round(W(xe,_e)/Pe)*Pe,i:_e}})}return le.links=function(fe){return zd(ie(fe)).edges.filter(function(xe){return xe.l&&xe.r}).map(function(xe){return{source:fe[xe.l.i],target:fe[xe.r.i]}})},le.triangles=function(fe){var xe=[];return zd(ie(fe)).cells.forEach(function(_e,Ie){for(var Ne=_e.site,$e=_e.edges.sort(tx),rr=-1,qe=$e.length,He,Xe,er=$e[qe-1].edge,tr=er.l===Ne?er.r:er.l;++rrtr&&(tr=_e.x),_e.y>Ke&&(Ke=_e.y),$e.push(_e.x),rr.push(_e.y);else for(qe=0;qetr&&(tr=or),dr>Ke&&(Ke=dr),$e.push(or),rr.push(dr)}var yr=tr-Xe,pr=Ke-er;yr>pr?Ke=er+yr:tr=Xe+pr;function br(Mr,Pr,lt,Bt,dt,vr,Or,Vr){if(!(isNaN(lt)||isNaN(Bt)))if(Mr.leaf){var st=Mr.x,Pt=Mr.y;if(st!=null)if(m(st-lt)+m(Pt-Bt)<.01)_r(Mr,Pr,lt,Bt,dt,vr,Or,Vr);else{var $t=Mr.point;Mr.x=Mr.y=Mr.point=null,_r(Mr,$t,st,Pt,dt,vr,Or,Vr),_r(Mr,Pr,lt,Bt,dt,vr,Or,Vr)}else Mr.x=lt,Mr.y=Bt,Mr.point=Pr}else _r(Mr,Pr,lt,Bt,dt,vr,Or,Vr)}function _r(Mr,Pr,lt,Bt,dt,vr,Or,Vr){var st=(dt+Or)*.5,Pt=(vr+Vr)*.5,$t=lt>=st,bn=Bt>=Pt,In=bn<<1|$t;Mr.leaf=!1,Mr=Mr.nodes[In]||(Mr.nodes[In]=ix()),$t?dt=st:Or=st,bn?vr=Pt:Vr=Pt,br(Mr,Pr,lt,Bt,dt,vr,Or,Vr)}var qr=ix();if(qr.add=function(Mr){br(qr,Mr,+Ie(Mr,++qe),+Ne(Mr,qe),Xe,er,tr,Ke)},qr.visit=function(Mr){ju(Mr,qr,Xe,er,tr,Ke)},qr.find=function(Mr){return Zq(qr,Mr[0],Mr[1],Xe,er,tr,Ke)},qe=-1,z==null){for(;++qeJ||Ne>le||$e=or,pr=B>=dr,br=pr<<1|yr,_r=br+4;br<_r;++br)if(_e=Ke[br&3])switch(br&3){case 0:xe(_e,Ie,Ne,or,dr);break;case 1:xe(_e,or,Ne,$e,dr);break;case 2:xe(_e,Ie,dr,or,rr);break;case 3:xe(_e,or,dr,$e,rr);break}}}(C,V,W,J,le),fe}e.interpolateRgb=qd;function qd(C,z){C=e.rgb(C),z=e.rgb(z);var B=C.r,V=C.g,W=C.b,J=z.r-B,le=z.g-V,ie=z.b-W;return function(fe){return"#"+kr(Math.round(B+J*fe))+kr(Math.round(V+le*fe))+kr(Math.round(W+ie*fe))}}e.interpolateObject=ox;function ox(C,z){var B={},V={},W;for(W in C)W in z?B[W]=pl(C[W],z[W]):V[W]=C[W];for(W in z)W in C||(V[W]=z[W]);return function(J){for(W in B)V[W]=B[W](J);return V}}e.interpolateNumber=Xi;function Xi(C,z){return C=+C,z=+z,function(B){return C*(1-B)+z*B}}e.interpolateString=lx;function lx(C,z){var B=Od.lastIndex=Bd.lastIndex=0,V,W,J,le=-1,ie=[],fe=[];for(C=C+"",z=z+"";(V=Od.exec(C))&&(W=Bd.exec(z));)(J=W.index)>B&&(J=z.slice(B,J),ie[le]?ie[le]+=J:ie[++le]=J),(V=V[0])===(W=W[0])?ie[le]?ie[le]+=W:ie[++le]=W:(ie[++le]=null,fe.push({i:le,x:Xi(V,W)})),B=Bd.lastIndex;return B=0&&!(V=e.interpolators[B](C,z)););return V}e.interpolators=[function(C,z){var B=typeof z;return(B==="string"?xn.has(z.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(z)?qd:lx:z instanceof bt?qd:Array.isArray(z)?tc:B==="object"&&isNaN(z)?ox:Xi)(C,z)}],e.interpolateArray=tc;function tc(C,z){var B=[],V=[],W=C.length,J=z.length,le=Math.min(C.length,z.length),ie;for(ie=0;ie=0?C.slice(0,z):C,V=z>=0?C.slice(z+1):"in";return B=Jq.get(B)||sx,V=Kq.get(V)||N,Qq(V(B.apply(null,r.call(arguments,1))))};function Qq(C){return function(z){return z<=0?0:z>=1?1:C(z)}}function ux(C){return function(z){return 1-C(1-z)}}function fx(C){return function(z){return .5*(z<.5?C(2*z):2-C(2-2*z))}}function $q(C){return C*C}function jq(C){return C*C*C}function eO(C){if(C<=0)return 0;if(C>=1)return 1;var z=C*C,B=z*C;return 4*(C<.5?B:3*(C-z)+B-.75)}function rO(C){return function(z){return Math.pow(z,C)}}function tO(C){return 1-Math.cos(C*K)}function nO(C){return Math.pow(2,10*(C-1))}function aO(C){return 1-Math.sqrt(1-C*C)}function iO(C,z){var B;return arguments.length<2&&(z=.45),arguments.length?B=z/ar*Math.asin(1/C):(C=1,B=z/4),function(V){return 1+C*Math.pow(2,-10*V)*Math.sin((V-B)*ar/z)}}function oO(C){return C||(C=1.70158),function(z){return z*z*((C+1)*z-C)}}function lO(C){return C<1/2.75?7.5625*C*C:C<2/2.75?7.5625*(C-=1.5/2.75)*C+.75:C<2.5/2.75?7.5625*(C-=2.25/2.75)*C+.9375:7.5625*(C-=2.625/2.75)*C+.984375}e.interpolateHcl=sO;function sO(C,z){C=e.hcl(C),z=e.hcl(z);var B=C.h,V=C.c,W=C.l,J=z.h-B,le=z.c-V,ie=z.l-W;return isNaN(le)&&(le=0,V=isNaN(V)?z.c:V),isNaN(J)?(J=0,B=isNaN(B)?z.h:B):J>180?J-=360:J<-180&&(J+=360),function(fe){return Gt(B+J*fe,V+le*fe,W+ie*fe)+""}}e.interpolateHsl=uO;function uO(C,z){C=e.hsl(C),z=e.hsl(z);var B=C.h,V=C.s,W=C.l,J=z.h-B,le=z.s-V,ie=z.l-W;return isNaN(le)&&(le=0,V=isNaN(V)?z.s:V),isNaN(J)?(J=0,B=isNaN(B)?z.h:B):J>180?J-=360:J<-180&&(J+=360),function(fe){return Ot(B+J*fe,V+le*fe,W+ie*fe)+""}}e.interpolateLab=fO;function fO(C,z){C=e.lab(C),z=e.lab(z);var B=C.l,V=C.a,W=C.b,J=z.l-B,le=z.a-V,ie=z.b-W;return function(fe){return wa(B+J*fe,V+le*fe,W+ie*fe)+""}}e.interpolateRound=cx;function cx(C,z){return z-=C,function(B){return Math.round(C+z*B)}}e.transform=function(C){var z=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(B){if(B!=null){z.setAttribute("transform",B);var V=z.transform.baseVal.consolidate()}return new vx(V?V.matrix:vO)})(C)};function vx(C){var z=[C.a,C.b],B=[C.c,C.d],V=dx(z),W=hx(z,B),J=dx(cO(B,z,-W))||0;z[0]*B[1]180?z+=360:z-C>180&&(C+=360),V.push({i:B.push(Ts(B)+"rotate(",null,")")-2,x:Xi(C,z)})):z&&B.push(Ts(B)+"rotate("+z+")")}function pO(C,z,B,V){C!==z?V.push({i:B.push(Ts(B)+"skewX(",null,")")-2,x:Xi(C,z)}):z&&B.push(Ts(B)+"skewX("+z+")")}function gO(C,z,B,V){if(C[0]!==z[0]||C[1]!==z[1]){var W=B.push(Ts(B)+"scale(",null,",",null,")");V.push({i:W-4,x:Xi(C[0],z[0])},{i:W-2,x:Xi(C[1],z[1])})}else(z[0]!==1||z[1]!==1)&&B.push(Ts(B)+"scale("+z+")")}function px(C,z){var B=[],V=[];return C=e.transform(C),z=e.transform(z),hO(C.translate,z.translate,B,V),dO(C.rotate,z.rotate,B,V),pO(C.skew,z.skew,B,V),gO(C.scale,z.scale,B,V),C=z=null,function(W){for(var J=-1,le=V.length,ie;++J0?J=Ke:(B.c=null,B.t=NaN,B=null,z.end({type:"end",alpha:J=0})):Ke>0&&(z.start({type:"start",alpha:J=Ke}),B=K0(C.tick)),C):J},C.start=function(){var Ke,or=$e.length,dr=rr.length,yr=V[0],pr=V[1],br,_r;for(Ke=0;Ke=0;)J.push(_e=xe[fe]),_e.parent=ie,_e.depth=ie.depth+1;B&&(ie.value=0),ie.children=xe}else B&&(ie.value=+B.call(V,ie,ie.depth)||0),delete ie.children;return wi(W,function(Ie){var Ne,$e;C&&(Ne=Ie.children)&&Ne.sort(C),B&&($e=Ie.parent)&&($e.value+=Ie.value)}),le}return V.sort=function(W){return arguments.length?(C=W,V):C},V.children=function(W){return arguments.length?(z=W,V):z},V.value=function(W){return arguments.length?(B=W,V):B},V.revalue=function(W){return B&&(rf(W,function(J){J.children&&(J.value=0)}),wi(W,function(J){var le;J.children||(J.value=+B.call(V,J,J.depth)||0),(le=J.parent)&&(le.value+=J.value)})),W},V};function ef(C,z){return e.rebind(C,z,"sort","children","value"),C.nodes=C,C.links=RO,C}function rf(C,z){for(var B=[C];(C=B.pop())!=null;)if(z(C),(W=C.children)&&(V=W.length))for(var V,W;--V>=0;)B.push(W[V])}function wi(C,z){for(var B=[C],V=[];(C=B.pop())!=null;)if(V.push(C),(le=C.children)&&(J=le.length))for(var W=-1,J,le;++WW&&(W=ie),V.push(ie)}for(le=0;leV&&(B=z,V=W);return B}function qO(C){return C.reduce(OO,0)}function OO(C,z){return C+z[1]}e.layout.histogram=function(){var C=!0,z=Number,B=UO,V=BO;function W(J,Ne){for(var ie=[],fe=J.map(z,this),xe=B.call(this,fe,Ne),_e=V.call(this,xe,fe,Ne),Ie,Ne=-1,$e=fe.length,rr=_e.length-1,qe=C?1:1/$e,He;++Ne0)for(Ne=-1;++Ne<$e;)He=fe[Ne],He>=xe[0]&&He<=xe[1]&&(Ie=ie[e.bisect(_e,He,1,rr)-1],Ie.y+=qe,Ie.push(J[Ne]));return ie}return W.value=function(J){return arguments.length?(z=J,W):z},W.range=function(J){return arguments.length?(B=Xr(J),W):B},W.bins=function(J){return arguments.length?(V=typeof J=="number"?function(le){return xx(le,J)}:Xr(J),W):V},W.frequency=function(J){return arguments.length?(C=!!J,W):C},W};function BO(C,z){return xx(C,Math.ceil(Math.log(z.length)/Math.LN2+1))}function xx(C,z){for(var B=-1,V=+C[0],W=(C[1]-V)/z,J=[];++B<=z;)J[B]=W*B+V;return J}function UO(C){return[e.min(C),e.max(C)]}e.layout.pack=function(){var C=e.layout.hierarchy().sort(HO),z=0,B=[1,1],V;function W(J,le){var ie=C.call(this,J,le),fe=ie[0],xe=B[0],_e=B[1],Ie=V==null?Math.sqrt:typeof V=="function"?V:function(){return V};if(fe.x=fe.y=0,wi(fe,function($e){$e.r=+Ie($e.value)}),wi(fe,wx),z){var Ne=z*(V?1:Math.max(2*fe.r/xe,2*fe.r/_e))/2;wi(fe,function($e){$e.r+=Ne}),wi(fe,wx),wi(fe,function($e){$e.r-=Ne})}return Mx(fe,xe/2,_e/2,V?1:1/Math.max(2*fe.r/xe,2*fe.r/_e)),ie}return W.size=function(J){return arguments.length?(B=J,W):B},W.radius=function(J){return arguments.length?(V=J==null||typeof J=="function"?J:+J,W):V},W.padding=function(J){return arguments.length?(z=+J,W):z},ef(W,C)};function HO(C,z){return C.value-z.value}function Vd(C,z){var B=C._pack_next;C._pack_next=z,z._pack_prev=C,z._pack_next=B,B._pack_prev=z}function bx(C,z){C._pack_next=z,z._pack_prev=C}function _x(C,z){var B=z.x-C.x,V=z.y-C.y,W=C.r+z.r;return .999*W*W>B*B+V*V}function wx(C){if(!(z=C.children)||!(Ne=z.length))return;var z,B=1/0,V=-1/0,W=1/0,J=-1/0,le,ie,fe,xe,_e,Ie,Ne;function $e(Ke){B=Math.min(Ke.x-Ke.r,B),V=Math.max(Ke.x+Ke.r,V),W=Math.min(Ke.y-Ke.r,W),J=Math.max(Ke.y+Ke.r,J)}if(z.forEach(VO),le=z[0],le.x=-le.r,le.y=0,$e(le),Ne>1&&(ie=z[1],ie.x=ie.r,ie.y=0,$e(ie),Ne>2))for(fe=z[2],Tx(le,ie,fe),$e(fe),Vd(le,fe),le._pack_prev=fe,Vd(fe,ie),ie=le._pack_next,xe=3;xeHe.x&&(He=or),or.depth>Xe.depth&&(Xe=or)});var er=z(qe,He)/2-qe.x,tr=B[0]/(He.x+z(He,qe)/2+er),Ke=B[1]/(Xe.depth||1);rf($e,function(or){or.x=(or.x+er)*tr,or.y=or.depth*Ke})}return Ne}function J(_e){for(var Ie={A:null,children:[_e]},Ne=[Ie],$e;($e=Ne.pop())!=null;)for(var rr=$e.children,qe,He=0,Xe=rr.length;He0&&(YO(XO(qe,_e,Ne),_e,or),Xe+=or,er+=or),tr+=qe.m,Xe+=$e.m,Ke+=He.m,er+=rr.m;qe&&!Yd(rr)&&(rr.t=qe,rr.m+=tr-er),$e&&!Gd(He)&&(He.t=$e,He.m+=Xe-Ke,Ne=_e)}return Ne}function xe(_e){_e.x*=B[0],_e.y=_e.depth*B[1]}return W.separation=function(_e){return arguments.length?(z=_e,W):z},W.size=function(_e){return arguments.length?(V=(B=_e)==null?xe:null,W):V?null:B},W.nodeSize=function(_e){return arguments.length?(V=(B=_e)==null?null:xe,W):V?B:null},ef(W,C)};function Ax(C,z){return C.parent==z.parent?1:2}function Gd(C){var z=C.children;return z.length?z[0]:C.t}function Yd(C){var z=C.children,B;return(B=z.length)?z[B-1]:C.t}function YO(C,z,B){var V=B/(z.i-C.i);z.c-=V,z.s+=B,C.c+=V,z.z+=B,z.m+=B}function WO(C){for(var z=0,B=0,V=C.children,W=V.length,J;--W>=0;)J=V[W],J.z+=z,J.m+=z,z+=J.s+(B+=J.c)}function XO(C,z,B){return C.a.parent===z.parent?C.a:B}e.layout.cluster=function(){var C=e.layout.hierarchy().sort(null).value(null),z=Ax,B=[1,1],V=!1;function W(J,le){var ie=C.call(this,J,le),fe=ie[0],xe,_e=0;wi(fe,function(qe){var He=qe.children;He&&He.length?(qe.x=JO(He),qe.y=ZO(He)):(qe.x=xe?_e+=z(qe,xe):0,qe.y=0,xe=qe)});var Ie=kx(fe),Ne=Sx(fe),$e=Ie.x-z(Ie,Ne)/2,rr=Ne.x+z(Ne,Ie)/2;return wi(fe,V?function(qe){qe.x=(qe.x-fe.x)*B[0],qe.y=(fe.y-qe.y)*B[1]}:function(qe){qe.x=(qe.x-$e)/(rr-$e)*B[0],qe.y=(1-(fe.y?qe.y/fe.y:1))*B[1]}),ie}return W.separation=function(J){return arguments.length?(z=J,W):z},W.size=function(J){return arguments.length?(V=(B=J)==null,W):V?null:B},W.nodeSize=function(J){return arguments.length?(V=(B=J)!=null,W):V?B:null},ef(W,C)};function ZO(C){return 1+e.max(C,function(z){return z.y})}function JO(C){return C.reduce(function(z,B){return z+B.x},0)/C.length}function kx(C){var z=C.children;return z&&z.length?kx(z[0]):C}function Sx(C){var z=C.children,B;return z&&(B=z.length)?Sx(z[B-1]):C}e.layout.treemap=function(){var C=e.layout.hierarchy(),z=Math.round,B=[1,1],V=null,W=Wd,J=!1,le,ie="squarify",fe=.5*(1+Math.sqrt(5));function xe(qe,He){for(var Xe=-1,er=qe.length,tr,Ke;++Xe0;)er.push(Ke=tr[pr-1]),er.area+=Ke.area,ie!=="squarify"||(dr=Ne(er,yr))<=or?(tr.pop(),or=dr):(er.area-=er.pop().area,$e(er,yr,Xe,!1),yr=Math.min(Xe.dx,Xe.dy),er.length=er.area=0,or=1/0);er.length&&($e(er,yr,Xe,!0),er.length=er.area=0),He.forEach(_e)}}function Ie(qe){var He=qe.children;if(He&&He.length){var Xe=W(qe),er=He.slice(),tr,Ke=[];for(xe(er,Xe.dx*Xe.dy/qe.value),Ke.area=0;tr=er.pop();)Ke.push(tr),Ke.area+=tr.area,tr.z!=null&&($e(Ke,tr.z?Xe.dx:Xe.dy,Xe,!er.length),Ke.length=Ke.area=0);He.forEach(Ie)}}function Ne(qe,He){for(var Xe=qe.area,er,tr=0,Ke=1/0,or=-1,dr=qe.length;++ortr&&(tr=er));return Xe*=Xe,He*=He,Xe?Math.max(He*tr*fe/Xe,Xe/(He*Ke*fe)):1/0}function $e(qe,He,Xe,er){var tr=-1,Ke=qe.length,or=Xe.x,dr=Xe.y,yr=He?z(qe.area/He):0,pr;if(He==Xe.dx){for((er||yr>Xe.dy)&&(yr=Xe.dy);++trXe.dx)&&(yr=Xe.dx);++tr1);return C+z*V*Math.sqrt(-2*Math.log(J)/J)}},logNormal:function(){var C=e.random.normal.apply(e,arguments);return function(){return Math.exp(C())}},bates:function(C){var z=e.random.irwinHall(C);return function(){return z()/C}},irwinHall:function(C){return function(){for(var z=0,B=0;B2?$O:KO,xe=V?mO:yO;return W=fe(C,z,xe,B),J=fe(z,C,xe,pl),ie}function ie(fe){return W(fe)}return ie.invert=function(fe){return J(fe)},ie.domain=function(fe){return arguments.length?(C=fe.map(Number),le()):C},ie.range=function(fe){return arguments.length?(z=fe,le()):z},ie.rangeRound=function(fe){return ie.range(fe).interpolate(cx)},ie.clamp=function(fe){return arguments.length?(V=fe,le()):V},ie.interpolate=function(fe){return arguments.length?(B=fe,le()):B},ie.ticks=function(fe){return Jd(C,fe)},ie.tickFormat=function(fe,xe){return d3_scale_linearTickFormat(C,fe,xe)},ie.nice=function(fe){return Dx(C,fe),le()},ie.copy=function(){return Lx(C,z,B,V)},le()}function Rx(C,z){return e.rebind(C,z,"range","rangeRound","interpolate","clamp")}function Dx(C,z){return Xd(C,Ex(Zd(C,z)[2])),Xd(C,Ex(Zd(C,z)[2])),C}function Zd(C,z){z==null&&(z=10);var B=nc(C),V=B[1]-B[0],W=Math.pow(10,Math.floor(Math.log(V/z)/Math.LN10)),J=z/V*W;return J<=.15?W*=10:J<=.35?W*=5:J<=.75&&(W*=2),B[0]=Math.ceil(B[0]/W)*W,B[1]=Math.floor(B[1]/W)*W+W*.5,B[2]=W,B}function Jd(C,z){return e.range.apply(e,Zd(C,z))}var jO={s:1,g:1,p:1,r:1,e:1};function Px(C){return-Math.floor(Math.log(C)/Math.LN10+.01)}function Oue(C,z){var B=Px(z[2]);return C in jO?Math.abs(B-Px(Math.max(m(z[0]),m(z[1]))))+ +(C!=="e"):B-(C==="%")*2}e.scale.log=function(){return Fx(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Fx(C,z,B,V){function W(ie){return(B?Math.log(ie<0?0:ie):-Math.log(ie>0?0:-ie))/Math.log(z)}function J(ie){return B?Math.pow(z,ie):-Math.pow(z,-ie)}function le(ie){return C(W(ie))}return le.invert=function(ie){return J(C.invert(ie))},le.domain=function(ie){return arguments.length?(B=ie[0]>=0,C.domain((V=ie.map(Number)).map(W)),le):V},le.base=function(ie){return arguments.length?(z=+ie,C.domain(V.map(W)),le):z},le.nice=function(){var ie=Xd(V.map(W),B?Math:eB);return C.domain(ie),V=ie.map(J),le},le.ticks=function(){var ie=nc(V),fe=[],xe=ie[0],_e=ie[1],Ie=Math.floor(W(xe)),Ne=Math.ceil(W(_e)),$e=z%1?2:z;if(isFinite(Ne-Ie)){if(B){for(;Ie0;rr--)fe.push(J(Ie)*rr);for(Ie=0;fe[Ie]_e;Ne--);fe=fe.slice(Ie,Ne)}return fe},le.copy=function(){return Fx(C.copy(),z,B,V)},Rx(le,C)}var eB={floor:function(C){return-Math.ceil(-C)},ceil:function(C){return-Math.floor(-C)}};e.scale.pow=function(){return Ix(e.scale.linear(),1,[0,1])};function Ix(C,z,B){var V=ic(z),W=ic(1/z);function J(le){return C(V(le))}return J.invert=function(le){return W(C.invert(le))},J.domain=function(le){return arguments.length?(C.domain((B=le.map(Number)).map(V)),J):B},J.ticks=function(le){return Jd(B,le)},J.tickFormat=function(le,ie){return d3_scale_linearTickFormat(B,le,ie)},J.nice=function(le){return J.domain(Dx(B,le))},J.exponent=function(le){return arguments.length?(V=ic(z=le),W=ic(1/z),C.domain(B.map(V)),J):z},J.copy=function(){return Ix(C.copy(),z,B)},Rx(J,C)}function ic(C){return function(z){return z<0?-Math.pow(-z,C):Math.pow(z,C)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Nx([],{t:"range",a:[[]]})};function Nx(C,z){var B,V,W;function J(ie){return V[((B.get(ie)||(z.t==="range"?B.set(ie,C.push(ie)):NaN))-1)%V.length]}function le(ie,fe){return e.range(C.length).map(function(xe){return ie+fe*xe})}return J.domain=function(ie){if(!arguments.length)return C;C=[],B=new x;for(var fe=-1,xe=ie.length,_e;++fe0?B[J-1]:C[0],JNe?0:1;if(_e=se)return fe(_e,rr)+(xe?fe(xe,1-rr):"")+"Z";var qe,He,Xe,er,tr=0,Ke=0,or,dr,yr,pr,br,_r,qr,Mr,Pr=[];if((er=(+le.apply(this,arguments)||0)/2)&&(Xe=V===oc?Math.sqrt(xe*xe+_e*_e):+V.apply(this,arguments),rr||(Ke*=-1),_e&&(Ke=hr(Xe/_e*Math.sin(er))),xe&&(tr=hr(Xe/xe*Math.sin(er)))),_e){or=_e*Math.cos(Ie+Ke),dr=_e*Math.sin(Ie+Ke),yr=_e*Math.cos(Ne-Ke),pr=_e*Math.sin(Ne-Ke);var lt=Math.abs(Ne-Ie-2*Ke)<=Ve?0:1;if(Ke&&lc(or,dr,yr,pr)===rr^lt){var Bt=(Ie+Ne)/2;or=_e*Math.cos(Bt),dr=_e*Math.sin(Bt),yr=pr=null}}else or=dr=0;if(xe){br=xe*Math.cos(Ne-tr),_r=xe*Math.sin(Ne-tr),qr=xe*Math.cos(Ie+tr),Mr=xe*Math.sin(Ie+tr);var dt=Math.abs(Ie-Ne+2*tr)<=Ve?0:1;if(tr&&lc(br,_r,qr,Mr)===1-rr^dt){var vr=(Ie+Ne)/2;br=xe*Math.cos(vr),_r=xe*Math.sin(vr),qr=Mr=null}}else br=_r=0;if($e>Pe&&(qe=Math.min(Math.abs(_e-xe)/2,+B.apply(this,arguments)))>.001){He=xe<_e^rr?0:1;var Or=qe,Vr=qe;if($e0?0:1}function sc(C,z,B,V,W){var J=C[0]-z[0],le=C[1]-z[1],ie=(W?V:-V)/Math.sqrt(J*J+le*le),fe=ie*le,xe=-ie*J,_e=C[0]+fe,Ie=C[1]+xe,Ne=z[0]+fe,$e=z[1]+xe,rr=(_e+Ne)/2,qe=(Ie+$e)/2,He=Ne-_e,Xe=$e-Ie,er=He*He+Xe*Xe,tr=B-V,Ke=_e*$e-Ne*Ie,or=(Xe<0?-1:1)*Math.sqrt(Math.max(0,tr*tr*er-Ke*Ke)),dr=(Ke*Xe-He*or)/er,yr=(-Ke*He-Xe*or)/er,pr=(Ke*Xe+He*or)/er,br=(-Ke*He+Xe*or)/er,_r=dr-rr,qr=yr-qe,Mr=pr-rr,Pr=br-qe;return _r*_r+qr*qr>Mr*Mr+Pr*Pr&&(dr=pr,yr=br),[[dr-fe,yr-xe],[dr*B/tr,yr*B/tr]]}function Vx(){return!0}function Gx(C){var z=xs,B=Zu,V=Vx,W=Xa,J=W.key,le=.7;function ie(fe){var xe=[],_e=[],Ie=-1,Ne=fe.length,$e,rr=Xr(z),qe=Xr(B);function He(){xe.push("M",W(C(_e),le))}for(;++Ie1?C.join("L"):C+"Z"}function Yx(C){return C.join("L")+"Z"}function uB(C){for(var z=0,B=C.length,V=C[0],W=[V[0],",",V[1]];++z1&&W.push("H",V[0]),W.join("")}function Qd(C){for(var z=0,B=C.length,V=C[0],W=[V[0],",",V[1]];++z1){ie=z[1],J=C[fe],fe++,V+="C"+(W[0]+le[0])+","+(W[1]+le[1])+","+(J[0]-ie[0])+","+(J[1]-ie[1])+","+J[0]+","+J[1];for(var xe=2;xe9&&(J=B*3/Math.sqrt(J),le[ie]=J*V,le[ie+1]=J*W));for(ie=-1;++ie<=fe;)J=(C[Math.min(fe,ie+1)][0]-C[Math.max(0,ie-1)][0])/(6*(1+le[ie]*le[ie])),z.push([J||0,le[ie]*J||0]);return z}function mB(C){return C.length<3?Xa(C):C[0]+uc(C,yB(C))}e.svg.line.radial=function(){var C=Gx(Jx);return C.radius=C.x,delete C.x,C.angle=C.y,delete C.y,C};function Jx(C){for(var z,B=-1,V=C.length,W,J;++BVe)+",1 "+Ie}function xe(_e,Ie,Ne,$e){return"Q 0,0 "+$e}return J.radius=function(_e){return arguments.length?(B=Xr(_e),J):B},J.source=function(_e){return arguments.length?(C=Xr(_e),J):C},J.target=function(_e){return arguments.length?(z=Xr(_e),J):z},J.startAngle=function(_e){return arguments.length?(V=Xr(_e),J):V},J.endAngle=function(_e){return arguments.length?(W=Xr(_e),J):W},J};function xB(C){return C.radius}e.svg.diagonal=function(){var C=Qx,z=$x,B=jx;function V(W,J){var le=C.call(this,W,J),ie=z.call(this,W,J),fe=(le.y+ie.y)/2,xe=[le,{x:le.x,y:fe},{x:ie.x,y:fe},ie];return xe=xe.map(B),"M"+xe[0]+"C"+xe[1]+" "+xe[2]+" "+xe[3]}return V.source=function(W){return arguments.length?(C=Xr(W),V):C},V.target=function(W){return arguments.length?(z=Xr(W),V):z},V.projection=function(W){return arguments.length?(B=W,V):B},V};function jx(C){return[C.x,C.y]}e.svg.diagonal.radial=function(){var C=e.svg.diagonal(),z=jx,B=C.projection;return C.projection=function(V){return arguments.length?B(bB(z=V)):z},C};function bB(C){return function(){var z=C.apply(this,arguments),B=z[0],V=z[1]-K;return[B*Math.cos(V),B*Math.sin(V)]}}e.svg.symbol=function(){var C=wB,z=_B;function B(V,W){return(rb.get(C.call(this,V,W))||eb)(z.call(this,V,W))}return B.type=function(V){return arguments.length?(C=Xr(V),B):C},B.size=function(V){return arguments.length?(z=Xr(V),B):z},B};function _B(){return 64}function wB(){return"circle"}function eb(C){var z=Math.sqrt(C/Ve);return"M0,"+z+"A"+z+","+z+" 0 1,1 0,"+-z+"A"+z+","+z+" 0 1,1 0,"+z+"Z"}var rb=e.map({circle:eb,cross:function(C){var z=Math.sqrt(C/5)/2;return"M"+-3*z+","+-z+"H"+-z+"V"+-3*z+"H"+z+"V"+-z+"H"+3*z+"V"+z+"H"+z+"V"+3*z+"H"+-z+"V"+z+"H"+-3*z+"Z"},diamond:function(C){var z=Math.sqrt(C/(2*tb)),B=z*tb;return"M0,"+-z+"L"+B+",0 0,"+z+" "+-B+",0Z"},square:function(C){var z=Math.sqrt(C)/2;return"M"+-z+","+-z+"L"+z+","+-z+" "+z+","+z+" "+-z+","+z+"Z"},"triangle-down":function(C){var z=Math.sqrt(C/fc),B=z*fc/2;return"M0,"+B+"L"+z+","+-B+" "+-z+","+-B+"Z"},"triangle-up":function(C){var z=Math.sqrt(C/fc),B=z*fc/2;return"M0,"+-B+"L"+z+","+B+" "+-z+","+B+"Z"}});e.svg.symbolTypes=rb.keys();var fc=Math.sqrt(3),tb=Math.tan(30*ae);ee.transition=function(C){for(var z=yl||++ab,B=np(C),V=[],W,J,le=vc||{time:Date.now(),ease:eO,delay:0,duration:250},ie=-1,fe=this.length;++ie0;)Ie[--er].call(C,Xe);if(He>=1)return le.event&&le.event.end.call(C,C.__data__,z),--J.count?delete J[V]:delete C[B],1}le||(ie=W.time,fe=K0(Ne,0,ie),le=J[V]={tween:new x,time:ie,timer:fe,delay:W.delay,duration:W.duration,ease:W.ease,index:z},W=null,++J.count)}e.svg.axis=function(){var C=e.scale.linear(),z=ib,B=6,V=6,W=3,J=[10],le=null,ie;function fe(xe){xe.each(function(){var _e=e.select(this),Ie=this.__chart__||C,Ne=this.__chart__=C.copy(),$e=le==null?Ne.ticks?Ne.ticks.apply(Ne,J):Ne.domain():le,rr=ie==null?Ne.tickFormat?Ne.tickFormat.apply(Ne,J):N:ie,qe=_e.selectAll(".tick").data($e,Ne),He=qe.enter().insert("g",".domain").attr("class","tick").style("opacity",Pe),Xe=e.transition(qe.exit()).style("opacity",Pe).remove(),er=e.transition(qe.order()).style("opacity",1),tr=Math.max(B,0)+W,Ke,or=ac(Ne),dr=_e.selectAll(".domain").data([0]),yr=(dr.enter().append("path").attr("class","domain"),e.transition(dr));He.append("line"),He.append("text");var pr=He.select("line"),br=er.select("line"),_r=qe.select("text").text(rr),qr=He.select("text"),Mr=er.select("text"),Pr=z==="top"||z==="left"?-1:1,lt,Bt,dt,vr;if(z==="bottom"||z==="top"?(Ke=AB,lt="x",dt="y",Bt="x2",vr="y2",_r.attr("dy",Pr<0?"0em":".71em").style("text-anchor","middle"),yr.attr("d","M"+or[0]+","+Pr*V+"V0H"+or[1]+"V"+Pr*V)):(Ke=kB,lt="y",dt="x",Bt="y2",vr="x2",_r.attr("dy",".32em").style("text-anchor",Pr<0?"end":"start"),yr.attr("d","M"+Pr*V+","+or[0]+"H0V"+or[1]+"H"+Pr*V)),pr.attr(vr,Pr*B),qr.attr(dt,Pr*tr),br.attr(Bt,0).attr(vr,Pr*B),Mr.attr(lt,0).attr(dt,Pr*tr),Ne.rangeBand){var Or=Ne,Vr=Or.rangeBand()/2;Ie=Ne=function(st){return Or(st)+Vr}}else Ie.rangeBand?Ie=Ne:Xe.call(Ke,Ne,Ie);He.call(Ke,Ie,Ne),er.call(Ke,Ne,Ne)})}return fe.scale=function(xe){return arguments.length?(C=xe,fe):C},fe.orient=function(xe){return arguments.length?(z=xe in TB?xe+"":ib,fe):z},fe.ticks=function(){return arguments.length?(J=t(arguments),fe):J},fe.tickValues=function(xe){return arguments.length?(le=xe,fe):le},fe.tickFormat=function(xe){return arguments.length?(ie=xe,fe):ie},fe.tickSize=function(xe){var _e=arguments.length;return _e?(B=+xe,V=+arguments[_e-1],fe):B},fe.innerTickSize=function(xe){return arguments.length?(B=+xe,fe):B},fe.outerTickSize=function(xe){return arguments.length?(V=+xe,fe):V},fe.tickPadding=function(xe){return arguments.length?(W=+xe,fe):W},fe.tickSubdivide=function(){return arguments.length&&fe},fe};var ib="bottom",TB={top:1,right:1,bottom:1,left:1};function AB(C,z,B){C.attr("transform",function(V){var W=z(V);return"translate("+(isFinite(W)?W:B(V))+",0)"})}function kB(C,z,B){C.attr("transform",function(V){var W=z(V);return"translate(0,"+(isFinite(W)?W:B(V))+")"})}e.svg.brush=function(){var C=$(_e,"brushstart","brush","brushend"),z=null,B=null,V=[0,0],W=[0,0],J,le,ie=!0,fe=!0,xe=ap[0];function _e(qe){qe.each(function(){var He=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",rr).on("touchstart.brush",rr),Xe=He.selectAll(".background").data([0]);Xe.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),He.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var er=He.selectAll(".resize").data(xe,N);er.exit().remove(),er.enter().append("g").attr("class",function(dr){return"resize "+dr}).style("cursor",function(dr){return SB[dr]}).append("rect").attr("x",function(dr){return/[ew]$/.test(dr)?-3:null}).attr("y",function(dr){return/^[ns]/.test(dr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),er.style("display",_e.empty()?"none":null);var tr=e.transition(He),Ke=e.transition(Xe),or;z&&(or=ac(z),Ke.attr("x",or[0]).attr("width",or[1]-or[0]),Ne(tr)),B&&(or=ac(B),Ke.attr("y",or[0]).attr("height",or[1]-or[0]),$e(tr)),Ie(tr)})}_e.event=function(qe){qe.each(function(){var He=C.of(this,arguments),Xe={x:V,y:W,i:J,j:le},er=this.__chart__||Xe;this.__chart__=Xe,yl?e.select(this).transition().each("start.brush",function(){J=er.i,le=er.j,V=er.x,W=er.y,He({type:"brushstart"})}).tween("brush:brush",function(){var tr=tc(V,Xe.x),Ke=tc(W,Xe.y);return J=le=null,function(or){V=Xe.x=tr(or),W=Xe.y=Ke(or),He({type:"brush",mode:"resize"})}}).each("end.brush",function(){J=Xe.i,le=Xe.j,He({type:"brush",mode:"resize"}),He({type:"brushend"})}):(He({type:"brushstart"}),He({type:"brush",mode:"resize"}),He({type:"brushend"}))})};function Ie(qe){qe.selectAll(".resize").attr("transform",function(He){return"translate("+V[+/e$/.test(He)]+","+W[+/^s/.test(He)]+")"})}function Ne(qe){qe.select(".extent").attr("x",V[0]),qe.selectAll(".extent,.n>rect,.s>rect").attr("width",V[1]-V[0])}function $e(qe){qe.select(".extent").attr("y",W[0]),qe.selectAll(".extent,.e>rect,.w>rect").attr("height",W[1]-W[0])}function rr(){var qe=this,He=e.select(e.event.target),Xe=C.of(qe,arguments),er=e.select(qe),tr=He.datum(),Ke=!/^(n|s)$/.test(tr)&&z,or=!/^(e|w)$/.test(tr)&&B,dr=He.classed("extent"),yr=Ye(qe),pr,br=e.mouse(qe),_r,qr=e.select(o(qe)).on("keydown.brush",lt).on("keyup.brush",Bt);if(e.event.changedTouches?qr.on("touchmove.brush",dt).on("touchend.brush",Or):qr.on("mousemove.brush",dt).on("mouseup.brush",Or),er.interrupt().selectAll("*").interrupt(),dr)br[0]=V[0]-br[0],br[1]=W[0]-br[1];else if(tr){var Mr=+/w$/.test(tr),Pr=+/^n/.test(tr);_r=[V[1-Mr]-br[0],W[1-Pr]-br[1]],br[0]=V[Mr],br[1]=W[Pr]}else e.event.altKey&&(pr=br.slice());er.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",He.style("cursor")),Xe({type:"brushstart"}),dt();function lt(){e.event.keyCode==32&&(dr||(pr=null,br[0]-=V[1],br[1]-=W[1],dr=2),X())}function Bt(){e.event.keyCode==32&&dr==2&&(br[0]+=V[1],br[1]+=W[1],dr=0,X())}function dt(){var Vr=e.mouse(qe),st=!1;_r&&(Vr[0]+=_r[0],Vr[1]+=_r[1]),dr||(e.event.altKey?(pr||(pr=[(V[0]+V[1])/2,(W[0]+W[1])/2]),br[0]=V[+(Vr[0]{(function(e,r){typeof mc=="object"&&typeof vb!="undefined"?r(mc):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(mc,function(e){"use strict";var r=new Date,t=new Date;function n(ge,Te,ce,ye){function Le(me){return ge(me=arguments.length===0?new Date:new Date(+me)),me}return Le.floor=function(me){return ge(me=new Date(+me)),me},Le.ceil=function(me){return ge(me=new Date(me-1)),Te(me,1),ge(me),me},Le.round=function(me){var he=Le(me),be=Le.ceil(me);return me-he0))return Se;do Se.push(ze=new Date(+me)),Te(me,be),ge(me);while(ze=he)for(;ge(he),!me(he);)he.setTime(he-1)},function(he,be){if(he>=he)if(be<0)for(;++be<=0;)for(;Te(he,-1),!me(he););else for(;--be>=0;)for(;Te(he,1),!me(he););})},ce&&(Le.count=function(me,he){return r.setTime(+me),t.setTime(+he),ge(r),ge(t),Math.floor(ce(r,t))},Le.every=function(me){return me=Math.floor(me),!isFinite(me)||!(me>0)?null:me>1?Le.filter(ye?function(he){return ye(he)%me===0}:function(he){return Le.count(0,he)%me===0}):Le}),Le}var a=n(function(){},function(ge,Te){ge.setTime(+ge+Te)},function(ge,Te){return Te-ge});a.every=function(ge){return ge=Math.floor(ge),!isFinite(ge)||!(ge>0)?null:ge>1?n(function(Te){Te.setTime(Math.floor(Te/ge)*ge)},function(Te,ce){Te.setTime(+Te+ce*ge)},function(Te,ce){return(ce-Te)/ge}):a};var o=a.range,i=1e3,l=6e4,u=36e5,s=864e5,f=6048e5,v=n(function(ge){ge.setTime(ge-ge.getMilliseconds())},function(ge,Te){ge.setTime(+ge+Te*i)},function(ge,Te){return(Te-ge)/i},function(ge){return ge.getUTCSeconds()}),g=v.range,b=n(function(ge){ge.setTime(ge-ge.getMilliseconds()-ge.getSeconds()*i)},function(ge,Te){ge.setTime(+ge+Te*l)},function(ge,Te){return(Te-ge)/l},function(ge){return ge.getMinutes()}),y=b.range,w=n(function(ge){ge.setTime(ge-ge.getMilliseconds()-ge.getSeconds()*i-ge.getMinutes()*l)},function(ge,Te){ge.setTime(+ge+Te*u)},function(ge,Te){return(Te-ge)/u},function(ge){return ge.getHours()}),M=w.range,m=n(function(ge){ge.setHours(0,0,0,0)},function(ge,Te){ge.setDate(ge.getDate()+Te)},function(ge,Te){return(Te-ge-(Te.getTimezoneOffset()-ge.getTimezoneOffset())*l)/s},function(ge){return ge.getDate()-1}),A=m.range;function S(ge){return n(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-ge)%7),Te.setHours(0,0,0,0)},function(Te,ce){Te.setDate(Te.getDate()+ce*7)},function(Te,ce){return(ce-Te-(ce.getTimezoneOffset()-Te.getTimezoneOffset())*l)/f})}var x=S(0),T=S(1),d=S(2),_=S(3),p=S(4),c=S(5),k=S(6),h=x.range,R=T.range,E=d.range,D=_.range,N=p.range,I=c.range,F=k.range,L=n(function(ge){ge.setDate(1),ge.setHours(0,0,0,0)},function(ge,Te){ge.setMonth(ge.getMonth()+Te)},function(ge,Te){return Te.getMonth()-ge.getMonth()+(Te.getFullYear()-ge.getFullYear())*12},function(ge){return ge.getMonth()}),P=L.range,O=n(function(ge){ge.setMonth(0,1),ge.setHours(0,0,0,0)},function(ge,Te){ge.setFullYear(ge.getFullYear()+Te)},function(ge,Te){return Te.getFullYear()-ge.getFullYear()},function(ge){return ge.getFullYear()});O.every=function(ge){return!isFinite(ge=Math.floor(ge))||!(ge>0)?null:n(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/ge)*ge),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,ce){Te.setFullYear(Te.getFullYear()+ce*ge)})};var U=O.range,X=n(function(ge){ge.setUTCSeconds(0,0)},function(ge,Te){ge.setTime(+ge+Te*l)},function(ge,Te){return(Te-ge)/l},function(ge){return ge.getUTCMinutes()}),j=X.range,$=n(function(ge){ge.setUTCMinutes(0,0,0)},function(ge,Te){ge.setTime(+ge+Te*u)},function(ge,Te){return(Te-ge)/u},function(ge){return ge.getUTCHours()}),Y=$.range,q=n(function(ge){ge.setUTCHours(0,0,0,0)},function(ge,Te){ge.setUTCDate(ge.getUTCDate()+Te)},function(ge,Te){return(Te-ge)/s},function(ge){return ge.getUTCDate()-1}),Z=q.range;function ne(ge){return n(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-ge)%7),Te.setUTCHours(0,0,0,0)},function(Te,ce){Te.setUTCDate(Te.getUTCDate()+ce*7)},function(Te,ce){return(ce-Te)/f})}var Q=ne(0),oe=ne(1),ee=ne(2),G=ne(3),re=ne(4),H=ne(5),te=ne(6),ue=Q.range,de=oe.range,Ee=ee.range,Me=G.range,ve=re.range,Ae=H.range,ke=te.range,De=n(function(ge){ge.setUTCDate(1),ge.setUTCHours(0,0,0,0)},function(ge,Te){ge.setUTCMonth(ge.getUTCMonth()+Te)},function(ge,Te){return Te.getUTCMonth()-ge.getUTCMonth()+(Te.getUTCFullYear()-ge.getUTCFullYear())*12},function(ge){return ge.getUTCMonth()}),Ce=De.range,Oe=n(function(ge){ge.setUTCMonth(0,1),ge.setUTCHours(0,0,0,0)},function(ge,Te){ge.setUTCFullYear(ge.getUTCFullYear()+Te)},function(ge,Te){return Te.getUTCFullYear()-ge.getUTCFullYear()},function(ge){return ge.getUTCFullYear()});Oe.every=function(ge){return!isFinite(ge=Math.floor(ge))||!(ge>0)?null:n(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/ge)*ge),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,ce){Te.setUTCFullYear(Te.getUTCFullYear()+ce*ge)})};var Ue=Oe.range;e.timeDay=m,e.timeDays=A,e.timeFriday=c,e.timeFridays=I,e.timeHour=w,e.timeHours=M,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=o,e.timeMinute=b,e.timeMinutes=y,e.timeMonday=T,e.timeMondays=R,e.timeMonth=L,e.timeMonths=P,e.timeSaturday=k,e.timeSaturdays=F,e.timeSecond=v,e.timeSeconds=g,e.timeSunday=x,e.timeSundays=h,e.timeThursday=p,e.timeThursdays=N,e.timeTuesday=d,e.timeTuesdays=E,e.timeWednesday=_,e.timeWednesdays=D,e.timeWeek=x,e.timeWeeks=h,e.timeYear=O,e.timeYears=U,e.utcDay=q,e.utcDays=Z,e.utcFriday=H,e.utcFridays=Ae,e.utcHour=$,e.utcHours=Y,e.utcMillisecond=a,e.utcMilliseconds=o,e.utcMinute=X,e.utcMinutes=j,e.utcMonday=oe,e.utcMondays=de,e.utcMonth=De,e.utcMonths=Ce,e.utcSaturday=te,e.utcSaturdays=ke,e.utcSecond=v,e.utcSeconds=g,e.utcSunday=Q,e.utcSundays=ue,e.utcThursday=re,e.utcThursdays=ve,e.utcTuesday=ee,e.utcTuesdays=Ee,e.utcWednesday=G,e.utcWednesdays=Me,e.utcWeek=Q,e.utcWeeks=ue,e.utcYear=Oe,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var ks=pe((xc,hb)=>{(function(e,r){typeof xc=="object"&&typeof hb!="undefined"?r(xc,ip()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(xc,function(e,r){"use strict";function t(we){if(0<=we.y&&we.y<100){var Pe=new Date(-1,we.m,we.d,we.H,we.M,we.S,we.L);return Pe.setFullYear(we.y),Pe}return new Date(we.y,we.m,we.d,we.H,we.M,we.S,we.L)}function n(we){if(0<=we.y&&we.y<100){var Pe=new Date(Date.UTC(-1,we.m,we.d,we.H,we.M,we.S,we.L));return Pe.setUTCFullYear(we.y),Pe}return new Date(Date.UTC(we.y,we.m,we.d,we.H,we.M,we.S,we.L))}function a(we,Pe,Qe){return{y:we,m:Pe,d:Qe,H:0,M:0,S:0,L:0}}function o(we){var Pe=we.dateTime,Qe=we.date,Ve=we.time,ar=we.periods,se=we.days,K=we.shortDays,ae=we.months,Re=we.shortMonths,Be=g(ar),je=b(ar),nr=g(se),hr=b(se),wr=g(K),Cr=b(K),Tr=g(ae),Ar=b(ae),ft=g(Re),Yr=b(Re),mr={a:ha,A:Qn,b:Fn,B:wa,c:null,d:L,e:L,f:j,H:P,I:O,j:U,L:X,m:$,M:Y,p:xi,q:Gi,Q:he,s:be,S:q,u:Z,U:ne,V:Q,w:oe,W:ee,x:null,X:null,y:G,Y:re,Z:H,"%":me},ct={a:Yi,A:Wi,b:tn,B:xo,c:null,d:te,e:te,f:ve,H:ue,I:de,j:Ee,L:Me,m:Ae,M:ke,p:bi,q:_i,Q:he,s:be,S:De,u:Ce,U:Oe,V:Ue,w:ge,W:Te,x:null,X:null,y:ce,Y:ye,Z:Le,"%":me},Sr={a:Ot,A:Lt,b:yn,B:Gt,c:Rt,d:p,e:p,f:D,H:k,I:k,j:c,L:E,m:_,M:h,p:Hr,q:d,Q:I,s:F,S:R,u:w,U:M,V:m,w:y,W:A,x:nt,X:Ft,y:x,Y:S,Z:T,"%":N};mr.x=Ur(Qe,mr),mr.X=Ur(Ve,mr),mr.c=Ur(Pe,mr),ct.x=Ur(Qe,ct),ct.X=Ur(Ve,ct),ct.c=Ur(Pe,ct);function Ur(kr,at){return function(vt){var gr=[],mn=-1,_t=0,xn=kr.length,Xr,Wa,hl;for(vt instanceof Date||(vt=new Date(+vt));++mn53)return null;"w"in gr||(gr.w=1),"Z"in gr?(_t=n(a(gr.y,0,1)),xn=_t.getUTCDay(),_t=xn>4||xn===0?r.utcMonday.ceil(_t):r.utcMonday(_t),_t=r.utcDay.offset(_t,(gr.V-1)*7),gr.y=_t.getUTCFullYear(),gr.m=_t.getUTCMonth(),gr.d=_t.getUTCDate()+(gr.w+6)%7):(_t=t(a(gr.y,0,1)),xn=_t.getDay(),_t=xn>4||xn===0?r.timeMonday.ceil(_t):r.timeMonday(_t),_t=r.timeDay.offset(_t,(gr.V-1)*7),gr.y=_t.getFullYear(),gr.m=_t.getMonth(),gr.d=_t.getDate()+(gr.w+6)%7)}else("W"in gr||"U"in gr)&&("w"in gr||(gr.w="u"in gr?gr.u%7:"W"in gr?1:0),xn="Z"in gr?n(a(gr.y,0,1)).getUTCDay():t(a(gr.y,0,1)).getDay(),gr.m=0,gr.d="W"in gr?(gr.w+6)%7+gr.W*7-(xn+5)%7:gr.w+gr.U*7-(xn+6)%7);return"Z"in gr?(gr.H+=gr.Z/100|0,gr.M+=gr.Z%100,n(gr)):t(gr)}}function zr(kr,at,vt,gr){for(var mn=0,_t=at.length,xn=vt.length,Xr,Wa;mn<_t;){if(gr>=xn)return-1;if(Xr=at.charCodeAt(mn++),Xr===37){if(Xr=at.charAt(mn++),Wa=Sr[Xr in i?at.charAt(mn++):Xr],!Wa||(gr=Wa(kr,vt,gr))<0)return-1}else if(Xr!=vt.charCodeAt(gr++))return-1}return gr}function Hr(kr,at,vt){var gr=Be.exec(at.slice(vt));return gr?(kr.p=je[gr[0].toLowerCase()],vt+gr[0].length):-1}function Ot(kr,at,vt){var gr=wr.exec(at.slice(vt));return gr?(kr.w=Cr[gr[0].toLowerCase()],vt+gr[0].length):-1}function Lt(kr,at,vt){var gr=nr.exec(at.slice(vt));return gr?(kr.w=hr[gr[0].toLowerCase()],vt+gr[0].length):-1}function yn(kr,at,vt){var gr=ft.exec(at.slice(vt));return gr?(kr.m=Yr[gr[0].toLowerCase()],vt+gr[0].length):-1}function Gt(kr,at,vt){var gr=Tr.exec(at.slice(vt));return gr?(kr.m=Ar[gr[0].toLowerCase()],vt+gr[0].length):-1}function Rt(kr,at,vt){return zr(kr,Pe,at,vt)}function nt(kr,at,vt){return zr(kr,Qe,at,vt)}function Ft(kr,at,vt){return zr(kr,Ve,at,vt)}function ha(kr){return K[kr.getDay()]}function Qn(kr){return se[kr.getDay()]}function Fn(kr){return Re[kr.getMonth()]}function wa(kr){return ae[kr.getMonth()]}function xi(kr){return ar[+(kr.getHours()>=12)]}function Gi(kr){return 1+~~(kr.getMonth()/3)}function Yi(kr){return K[kr.getUTCDay()]}function Wi(kr){return se[kr.getUTCDay()]}function tn(kr){return Re[kr.getUTCMonth()]}function xo(kr){return ae[kr.getUTCMonth()]}function bi(kr){return ar[+(kr.getUTCHours()>=12)]}function _i(kr){return 1+~~(kr.getUTCMonth()/3)}return{format:function(kr){var at=Ur(kr+="",mr);return at.toString=function(){return kr},at},parse:function(kr){var at=bt(kr+="",!1);return at.toString=function(){return kr},at},utcFormat:function(kr){var at=Ur(kr+="",ct);return at.toString=function(){return kr},at},utcParse:function(kr){var at=bt(kr+="",!0);return at.toString=function(){return kr},at}}}var i={"-":"",_:" ",0:"0"},l=/^\s*\d+/,u=/^%/,s=/[\\^$*+?|[\]().{}]/g;function f(we,Pe,Qe){var Ve=we<0?"-":"",ar=(Ve?-we:we)+"",se=ar.length;return Ve+(se68?1900:2e3),Qe+Ve[0].length):-1}function T(we,Pe,Qe){var Ve=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Pe.slice(Qe,Qe+6));return Ve?(we.Z=Ve[1]?0:-(Ve[2]+(Ve[3]||"00")),Qe+Ve[0].length):-1}function d(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+1));return Ve?(we.q=Ve[0]*3-3,Qe+Ve[0].length):-1}function _(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.m=Ve[0]-1,Qe+Ve[0].length):-1}function p(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.d=+Ve[0],Qe+Ve[0].length):-1}function c(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+3));return Ve?(we.m=0,we.d=+Ve[0],Qe+Ve[0].length):-1}function k(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.H=+Ve[0],Qe+Ve[0].length):-1}function h(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.M=+Ve[0],Qe+Ve[0].length):-1}function R(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.S=+Ve[0],Qe+Ve[0].length):-1}function E(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+3));return Ve?(we.L=+Ve[0],Qe+Ve[0].length):-1}function D(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+6));return Ve?(we.L=Math.floor(Ve[0]/1e3),Qe+Ve[0].length):-1}function N(we,Pe,Qe){var Ve=u.exec(Pe.slice(Qe,Qe+1));return Ve?Qe+Ve[0].length:-1}function I(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe));return Ve?(we.Q=+Ve[0],Qe+Ve[0].length):-1}function F(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe));return Ve?(we.s=+Ve[0],Qe+Ve[0].length):-1}function L(we,Pe){return f(we.getDate(),Pe,2)}function P(we,Pe){return f(we.getHours(),Pe,2)}function O(we,Pe){return f(we.getHours()%12||12,Pe,2)}function U(we,Pe){return f(1+r.timeDay.count(r.timeYear(we),we),Pe,3)}function X(we,Pe){return f(we.getMilliseconds(),Pe,3)}function j(we,Pe){return X(we,Pe)+"000"}function $(we,Pe){return f(we.getMonth()+1,Pe,2)}function Y(we,Pe){return f(we.getMinutes(),Pe,2)}function q(we,Pe){return f(we.getSeconds(),Pe,2)}function Z(we){var Pe=we.getDay();return Pe===0?7:Pe}function ne(we,Pe){return f(r.timeSunday.count(r.timeYear(we)-1,we),Pe,2)}function Q(we,Pe){var Qe=we.getDay();return we=Qe>=4||Qe===0?r.timeThursday(we):r.timeThursday.ceil(we),f(r.timeThursday.count(r.timeYear(we),we)+(r.timeYear(we).getDay()===4),Pe,2)}function oe(we){return we.getDay()}function ee(we,Pe){return f(r.timeMonday.count(r.timeYear(we)-1,we),Pe,2)}function G(we,Pe){return f(we.getFullYear()%100,Pe,2)}function re(we,Pe){return f(we.getFullYear()%1e4,Pe,4)}function H(we){var Pe=we.getTimezoneOffset();return(Pe>0?"-":(Pe*=-1,"+"))+f(Pe/60|0,"0",2)+f(Pe%60,"0",2)}function te(we,Pe){return f(we.getUTCDate(),Pe,2)}function ue(we,Pe){return f(we.getUTCHours(),Pe,2)}function de(we,Pe){return f(we.getUTCHours()%12||12,Pe,2)}function Ee(we,Pe){return f(1+r.utcDay.count(r.utcYear(we),we),Pe,3)}function Me(we,Pe){return f(we.getUTCMilliseconds(),Pe,3)}function ve(we,Pe){return Me(we,Pe)+"000"}function Ae(we,Pe){return f(we.getUTCMonth()+1,Pe,2)}function ke(we,Pe){return f(we.getUTCMinutes(),Pe,2)}function De(we,Pe){return f(we.getUTCSeconds(),Pe,2)}function Ce(we){var Pe=we.getUTCDay();return Pe===0?7:Pe}function Oe(we,Pe){return f(r.utcSunday.count(r.utcYear(we)-1,we),Pe,2)}function Ue(we,Pe){var Qe=we.getUTCDay();return we=Qe>=4||Qe===0?r.utcThursday(we):r.utcThursday.ceil(we),f(r.utcThursday.count(r.utcYear(we),we)+(r.utcYear(we).getUTCDay()===4),Pe,2)}function ge(we){return we.getUTCDay()}function Te(we,Pe){return f(r.utcMonday.count(r.utcYear(we)-1,we),Pe,2)}function ce(we,Pe){return f(we.getUTCFullYear()%100,Pe,2)}function ye(we,Pe){return f(we.getUTCFullYear()%1e4,Pe,4)}function Le(){return"+0000"}function me(){return"%"}function he(we){return+we}function be(we){return Math.floor(+we/1e3)}var Se;ze({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 ze(we){return Se=o(we),e.timeFormat=Se.format,e.timeParse=Se.parse,e.utcFormat=Se.utcFormat,e.utcParse=Se.utcParse,Se}var Fe="%Y-%m-%dT%H:%M:%S.%LZ";function Je(we){return we.toISOString()}var Ye=Date.prototype.toISOString?Je:e.utcFormat(Fe);function Ge(we){var Pe=new Date(we);return isNaN(Pe)?null:Pe}var We=+new Date("2000-01-01T00:00:00.000Z")?Ge:e.utcParse(Fe);e.isoFormat=Ye,e.isoParse=We,e.timeFormatDefaultLocale=ze,e.timeFormatLocale=o,Object.defineProperty(e,"__esModule",{value:!0})})});var op=pe((bc,db)=>{(function(e,r){typeof bc=="object"&&typeof db!="undefined"?r(bc):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(bc,function(e){"use strict";function r(_){return Math.abs(_=Math.round(_))>=1e21?_.toLocaleString("en").replace(/,/g,""):_.toString(10)}function t(_,p){if((c=(_=p?_.toExponential(p-1):_.toExponential()).indexOf("e"))<0)return null;var c,k=_.slice(0,c);return[k.length>1?k[0]+k.slice(2):k,+_.slice(c+1)]}function n(_){return _=t(Math.abs(_)),_?_[1]:NaN}function a(_,p){return function(c,k){for(var h=c.length,R=[],E=0,D=_[0],N=0;h>0&&D>0&&(N+D+1>k&&(D=Math.max(1,k-N)),R.push(c.substring(h-=D,h+D)),!((N+=D+1)>k));)D=_[E=(E+1)%_.length];return R.reverse().join(p)}}function o(_){return function(p){return p.replace(/[0-9]/g,function(c){return _[+c]})}}var i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(_){if(!(p=i.exec(_)))throw new Error("invalid format: "+_);var p;return new u({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}l.prototype=u.prototype;function u(_){this.fill=_.fill===void 0?" ":_.fill+"",this.align=_.align===void 0?">":_.align+"",this.sign=_.sign===void 0?"-":_.sign+"",this.symbol=_.symbol===void 0?"":_.symbol+"",this.zero=!!_.zero,this.width=_.width===void 0?void 0:+_.width,this.comma=!!_.comma,this.precision=_.precision===void 0?void 0:+_.precision,this.trim=!!_.trim,this.type=_.type===void 0?"":_.type+""}u.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 s(_){e:for(var p=_.length,c=1,k=-1,h;c0&&(k=0);break}return k>0?_.slice(0,k)+_.slice(h+1):_}var f;function v(_,p){var c=t(_,p);if(!c)return _+"";var k=c[0],h=c[1],R=h-(f=Math.max(-8,Math.min(8,Math.floor(h/3)))*3)+1,E=k.length;return R===E?k:R>E?k+new Array(R-E+1).join("0"):R>0?k.slice(0,R)+"."+k.slice(R):"0."+new Array(1-R).join("0")+t(_,Math.max(0,p+R-1))[0]}function g(_,p){var c=t(_,p);if(!c)return _+"";var k=c[0],h=c[1];return h<0?"0."+new Array(-h).join("0")+k:k.length>h+1?k.slice(0,h+1)+"."+k.slice(h+1):k+new Array(h-k.length+2).join("0")}var b={"%":function(_,p){return(_*100).toFixed(p)},b:function(_){return Math.round(_).toString(2)},c:function(_){return _+""},d:r,e:function(_,p){return _.toExponential(p)},f:function(_,p){return _.toFixed(p)},g:function(_,p){return _.toPrecision(p)},o:function(_){return Math.round(_).toString(8)},p:function(_,p){return g(_*100,p)},r:g,s:v,X:function(_){return Math.round(_).toString(16).toUpperCase()},x:function(_){return Math.round(_).toString(16)}};function y(_){return _}var w=Array.prototype.map,M=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function m(_){var p=_.grouping===void 0||_.thousands===void 0?y:a(w.call(_.grouping,Number),_.thousands+""),c=_.currency===void 0?"":_.currency[0]+"",k=_.currency===void 0?"":_.currency[1]+"",h=_.decimal===void 0?".":_.decimal+"",R=_.numerals===void 0?y:o(w.call(_.numerals,String)),E=_.percent===void 0?"%":_.percent+"",D=_.minus===void 0?"-":_.minus+"",N=_.nan===void 0?"NaN":_.nan+"";function I(L){L=l(L);var P=L.fill,O=L.align,U=L.sign,X=L.symbol,j=L.zero,$=L.width,Y=L.comma,q=L.precision,Z=L.trim,ne=L.type;ne==="n"?(Y=!0,ne="g"):b[ne]||(q===void 0&&(q=12),Z=!0,ne="g"),(j||P==="0"&&O==="=")&&(j=!0,P="0",O="=");var Q=X==="$"?c:X==="#"&&/[boxX]/.test(ne)?"0"+ne.toLowerCase():"",oe=X==="$"?k:/[%p]/.test(ne)?E:"",ee=b[ne],G=/[defgprs%]/.test(ne);q=q===void 0?6:/[gprs]/.test(ne)?Math.max(1,Math.min(21,q)):Math.max(0,Math.min(20,q));function re(H){var te=Q,ue=oe,de,Ee,Me;if(ne==="c")ue=ee(H)+ue,H="";else{H=+H;var ve=H<0||1/H<0;if(H=isNaN(H)?N:ee(Math.abs(H),q),Z&&(H=s(H)),ve&&+H==0&&U!=="+"&&(ve=!1),te=(ve?U==="("?U:D:U==="-"||U==="("?"":U)+te,ue=(ne==="s"?M[8+f/3]:"")+ue+(ve&&U==="("?")":""),G){for(de=-1,Ee=H.length;++deMe||Me>57){ue=(Me===46?h+H.slice(de+1):H.slice(de))+ue,H=H.slice(0,de);break}}}Y&&!j&&(H=p(H,1/0));var Ae=te.length+H.length+ue.length,ke=Ae<$?new Array($-Ae+1).join(P):"";switch(Y&&j&&(H=p(ke+H,ke.length?$-ue.length:1/0),ke=""),O){case"<":H=te+H+ue+ke;break;case"=":H=te+ke+H+ue;break;case"^":H=ke.slice(0,Ae=ke.length>>1)+te+H+ue+ke.slice(Ae);break;default:H=ke+te+H+ue;break}return R(H)}return re.toString=function(){return L+""},re}function F(L,P){var O=I((L=l(L),L.type="f",L)),U=Math.max(-8,Math.min(8,Math.floor(n(P)/3)))*3,X=Math.pow(10,-U),j=M[8+U/3];return function($){return O(X*$)+j}}return{format:I,formatPrefix:F}}var A;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(_){return A=m(_),e.format=A.format,e.formatPrefix=A.formatPrefix,A}function x(_){return Math.max(0,-n(Math.abs(_)))}function T(_,p){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(p)/3)))*3-n(Math.abs(_)))}function d(_,p){return _=Math.abs(_),p=Math.abs(p)-_,Math.max(0,n(p)-n(_))+1}e.FormatSpecifier=u,e.formatDefaultLocale=S,e.formatLocale=m,e.formatSpecifier=l,e.precisionFixed=x,e.precisionPrefix=T,e.precisionRound=d,Object.defineProperty(e,"__esModule",{value:!0})})});var gb=pe((Vue,pb)=>{"use strict";pb.exports=function(e){for(var r=e.length,t,n=0;n13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var rt=pe((Gue,yb)=>{"use strict";var NB=gb();yb.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&NB(t))return!1}else if(r!=="number")return!1;return e-e<1}});var nn=pe((Yue,mb)=>{"use strict";mb.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 lp=pe((_c,xb)=>{(function(e,r){typeof _c=="object"&&typeof xb!="undefined"?r(_c):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(_c,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],f+=r[(l[u]&3)<<4|l[u+1]>>4],f+=r[(l[u+1]&15)<<2|l[u+2]>>6],f+=r[l[u+2]&63];return s%3===2?f=f.substring(0,f.length-1)+"=":s%3===1&&(f=f.substring(0,f.length-2)+"=="),f},o=function(i){var l=i.length*.75,u=i.length,s,f=0,v,g,b,y;i[i.length-1]==="="&&(l--,i[i.length-2]==="="&&l--);var w=new ArrayBuffer(l),M=new Uint8Array(w);for(s=0;s>4,M[f++]=(g&15)<<4|b>>2,M[f++]=(b&3)<<6|y&63;return w};e.decode=o,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})})});var wo=pe((Wue,bb)=>{"use strict";bb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var ea=pe(Ja=>{"use strict";var zB=lp().decode,qB=wo(),sp=Array.isArray,OB=ArrayBuffer,BB=DataView;function _b(e){return OB.isView(e)&&!(e instanceof BB)}Ja.isTypedArray=_b;function wc(e){return sp(e)||_b(e)}Ja.isArrayOrTypedArray=wc;function UB(e){return!wc(e[0])}Ja.isArray1D=UB;Ja.ensureArray=function(e,r){return sp(e)||(e=[]),e.length=r,e};var hn={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};hn.uint8c=hn.u1c;hn.uint8=hn.u1;hn.int8=hn.i1;hn.uint16=hn.u2;hn.int16=hn.i2;hn.uint32=hn.u4;hn.int32=hn.i4;hn.float32=hn.f4;hn.float64=hn.f8;function up(e){return e.constructor===ArrayBuffer}Ja.isArrayBuffer=up;Ja.decodeTypedArraySpec=function(e){var r=[],t=HB(e),n=t.dtype,a=hn[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var o=a.BYTES_PER_ELEMENT,i=t.bdata;up(i)||(i=zB(i));var l=t.shape===void 0?[i.byteLength/o]:(""+t.shape).split(",");l.reverse();var u=l.length,s,f,v=+l[0],g=o*v,b=0;if(u===1)r=new a(i);else if(u===2)for(s=+l[1],f=0;f{"use strict";var Mb=rt(),cp=ea().isArrayOrTypedArray;Sb.exports=function(r,t){if(Mb(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var n=t.split("."),a,o,i,l;for(l=0;l{"use strict";var Ss=Mc(),XB=/^\w*$/,ZB=0,Cb=1,Tc=2,Eb=3,bl=4;Lb.exports=function(r,t,n,a){n=n||"name",a=a||"value";var o,i,l,u={};t&&t.length?(l=Ss(r,t),i=l.get()):i=r,t=t||"";var s={};if(i)for(o=0;o2)return u[b]=u[b]|Tc,v.set(g,null);if(f){for(o=b;o{"use strict";var JB=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,KB=/^[^\.\[\]]+$/;Db.exports=function(e,r){for(;r;){var t=e.match(JB);if(t)e=t[1];else if(e.match(KB))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var Ac=pe((Que,Fb)=>{"use strict";var QB=rt();Fb.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return QB(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}});var zb=pe(($ue,Nb)=>{"use strict";var Ib=ea().isArrayOrTypedArray,nf=wo();Nb.exports=function e(r,t){for(var n in t){var a=t[n],o=r[n];if(o!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in r)continue;r[n]=a}else if(Ib(a)&&Ib(o)&&nf(a[0])){if(n==="customdata"||n==="ids")continue;for(var i=Math.min(a.length,o.length),l=0;l{"use strict";function $B(e,r){var t=e%r;return t<0?t+r:t}function jB(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}qb.exports={mod:$B,modHalf:jB}});var ka=pe((efe,kc)=>{(function(e){var r=/^\s+/,t=/\s+$/,n=0,a=e.round,o=e.min,i=e.max,l=e.random;function u(G,re){if(G=G||"",re=re||{},G instanceof u)return G;if(!(this instanceof u))return new u(G,re);var H=s(G);this._originalInput=G,this._r=H.r,this._g=H.g,this._b=H.b,this._a=H.a,this._roundA=a(100*this._a)/100,this._format=re.format||H.format,this._gradientType=re.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=H.ok,this._tc_id=n++}u.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 G=this.toRgb();return(G.r*299+G.g*587+G.b*114)/1e3},getLuminance:function(){var G=this.toRgb(),re,H,te,ue,de,Ee;return re=G.r/255,H=G.g/255,te=G.b/255,re<=.03928?ue=re/12.92:ue=e.pow((re+.055)/1.055,2.4),H<=.03928?de=H/12.92:de=e.pow((H+.055)/1.055,2.4),te<=.03928?Ee=te/12.92:Ee=e.pow((te+.055)/1.055,2.4),.2126*ue+.7152*de+.0722*Ee},setAlpha:function(G){return this._a=L(G),this._roundA=a(100*this._a)/100,this},toHsv:function(){var G=b(this._r,this._g,this._b);return{h:G.h*360,s:G.s,v:G.v,a:this._a}},toHsvString:function(){var G=b(this._r,this._g,this._b),re=a(G.h*360),H=a(G.s*100),te=a(G.v*100);return this._a==1?"hsv("+re+", "+H+"%, "+te+"%)":"hsva("+re+", "+H+"%, "+te+"%, "+this._roundA+")"},toHsl:function(){var G=v(this._r,this._g,this._b);return{h:G.h*360,s:G.s,l:G.l,a:this._a}},toHslString:function(){var G=v(this._r,this._g,this._b),re=a(G.h*360),H=a(G.s*100),te=a(G.l*100);return this._a==1?"hsl("+re+", "+H+"%, "+te+"%)":"hsla("+re+", "+H+"%, "+te+"%, "+this._roundA+")"},toHex:function(G){return w(this._r,this._g,this._b,G)},toHexString:function(G){return"#"+this.toHex(G)},toHex8:function(G){return M(this._r,this._g,this._b,this._a,G)},toHex8String:function(G){return"#"+this.toHex8(G)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(P(this._r,255)*100)+"%",g:a(P(this._g,255)*100)+"%",b:a(P(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+a(P(this._r,255)*100)+"%, "+a(P(this._g,255)*100)+"%, "+a(P(this._b,255)*100)+"%)":"rgba("+a(P(this._r,255)*100)+"%, "+a(P(this._g,255)*100)+"%, "+a(P(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:I[w(this._r,this._g,this._b,!0)]||!1},toFilter:function(G){var re="#"+m(this._r,this._g,this._b,this._a),H=re,te=this._gradientType?"GradientType = 1, ":"";if(G){var ue=u(G);H="#"+m(ue._r,ue._g,ue._b,ue._a)}return"progid:DXImageTransform.Microsoft.gradient("+te+"startColorstr="+re+",endColorstr="+H+")"},toString:function(G){var re=!!G;G=G||this._format;var H=!1,te=this._a<1&&this._a>=0,ue=!re&&te&&(G==="hex"||G==="hex6"||G==="hex3"||G==="hex4"||G==="hex8"||G==="name");return ue?G==="name"&&this._a===0?this.toName():this.toRgbString():(G==="rgb"&&(H=this.toRgbString()),G==="prgb"&&(H=this.toPercentageRgbString()),(G==="hex"||G==="hex6")&&(H=this.toHexString()),G==="hex3"&&(H=this.toHexString(!0)),G==="hex4"&&(H=this.toHex8String(!0)),G==="hex8"&&(H=this.toHex8String()),G==="name"&&(H=this.toName()),G==="hsl"&&(H=this.toHslString()),G==="hsv"&&(H=this.toHsvString()),H||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(G,re){var H=G.apply(null,[this].concat([].slice.call(re)));return this._r=H._r,this._g=H._g,this._b=H._b,this.setAlpha(H._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(A,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(G,re){return G.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(c,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},u.fromRatio=function(G,re){if(typeof G=="object"){var H={};for(var te in G)G.hasOwnProperty(te)&&(te==="a"?H[te]=G[te]:H[te]=Y(G[te]));G=H}return u(G,re)};function s(G){var re={r:0,g:0,b:0},H=1,te=null,ue=null,de=null,Ee=!1,Me=!1;return typeof G=="string"&&(G=oe(G)),typeof G=="object"&&(Q(G.r)&&Q(G.g)&&Q(G.b)?(re=f(G.r,G.g,G.b),Ee=!0,Me=String(G.r).substr(-1)==="%"?"prgb":"rgb"):Q(G.h)&&Q(G.s)&&Q(G.v)?(te=Y(G.s),ue=Y(G.v),re=y(G.h,te,ue),Ee=!0,Me="hsv"):Q(G.h)&&Q(G.s)&&Q(G.l)&&(te=Y(G.s),de=Y(G.l),re=g(G.h,te,de),Ee=!0,Me="hsl"),G.hasOwnProperty("a")&&(H=G.a)),H=L(H),{ok:Ee,format:G.format||Me,r:o(255,i(re.r,0)),g:o(255,i(re.g,0)),b:o(255,i(re.b,0)),a:H}}function f(G,re,H){return{r:P(G,255)*255,g:P(re,255)*255,b:P(H,255)*255}}function v(G,re,H){G=P(G,255),re=P(re,255),H=P(H,255);var te=i(G,re,H),ue=o(G,re,H),de,Ee,Me=(te+ue)/2;if(te==ue)de=Ee=0;else{var ve=te-ue;switch(Ee=Me>.5?ve/(2-te-ue):ve/(te+ue),te){case G:de=(re-H)/ve+(re1&&(De-=1),De<1/6?Ae+(ke-Ae)*6*De:De<1/2?ke:De<2/3?Ae+(ke-Ae)*(2/3-De)*6:Ae}if(re===0)te=ue=de=H;else{var Me=H<.5?H*(1+re):H+re-H*re,ve=2*H-Me;te=Ee(ve,Me,G+1/3),ue=Ee(ve,Me,G),de=Ee(ve,Me,G-1/3)}return{r:te*255,g:ue*255,b:de*255}}function b(G,re,H){G=P(G,255),re=P(re,255),H=P(H,255);var te=i(G,re,H),ue=o(G,re,H),de,Ee,Me=te,ve=te-ue;if(Ee=te===0?0:ve/te,te==ue)de=0;else{switch(te){case G:de=(re-H)/ve+(re>1)+720)%360;--re;)te.h=(te.h+ue)%360,de.push(u(te));return de}function D(G,re){re=re||6;for(var H=u(G).toHsv(),te=H.h,ue=H.s,de=H.v,Ee=[],Me=1/re;re--;)Ee.push(u({h:te,s:ue,v:de})),de=(de+Me)%1;return Ee}u.mix=function(G,re,H){H=H===0?0:H||50;var te=u(G).toRgb(),ue=u(re).toRgb(),de=H/100,Ee={r:(ue.r-te.r)*de+te.r,g:(ue.g-te.g)*de+te.g,b:(ue.b-te.b)*de+te.b,a:(ue.a-te.a)*de+te.a};return u(Ee)},u.readability=function(G,re){var H=u(G),te=u(re);return(e.max(H.getLuminance(),te.getLuminance())+.05)/(e.min(H.getLuminance(),te.getLuminance())+.05)},u.isReadable=function(G,re,H){var te=u.readability(G,re),ue,de;switch(de=!1,ue=ee(H),ue.level+ue.size){case"AAsmall":case"AAAlarge":de=te>=4.5;break;case"AAlarge":de=te>=3;break;case"AAAsmall":de=te>=7;break}return de},u.mostReadable=function(G,re,H){var te=null,ue=0,de,Ee,Me,ve;H=H||{},Ee=H.includeFallbackColors,Me=H.level,ve=H.size;for(var Ae=0;Aeue&&(ue=de,te=u(re[Ae]));return u.isReadable(G,te,{level:Me,size:ve})||!Ee?te:(H.includeFallbackColors=!1,u.mostReadable(G,["#fff","#000"],H))};var N=u.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"},I=u.hexNames=F(N);function F(G){var re={};for(var H in G)G.hasOwnProperty(H)&&(re[G[H]]=H);return re}function L(G){return G=parseFloat(G),(isNaN(G)||G<0||G>1)&&(G=1),G}function P(G,re){X(G)&&(G="100%");var H=j(G);return G=o(re,i(0,parseFloat(G))),H&&(G=parseInt(G*re,10)/100),e.abs(G-re)<1e-6?1:G%re/parseFloat(re)}function O(G){return o(1,i(0,G))}function U(G){return parseInt(G,16)}function X(G){return typeof G=="string"&&G.indexOf(".")!=-1&&parseFloat(G)===1}function j(G){return typeof G=="string"&&G.indexOf("%")!=-1}function $(G){return G.length==1?"0"+G:""+G}function Y(G){return G<=1&&(G=G*100+"%"),G}function q(G){return e.round(parseFloat(G)*255).toString(16)}function Z(G){return U(G)/255}var ne=function(){var G="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",H="(?:"+re+")|(?:"+G+")",te="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",ue="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?";return{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+te),rgba:new RegExp("rgba"+ue),hsl:new RegExp("hsl"+te),hsla:new RegExp("hsla"+ue),hsv:new RegExp("hsv"+te),hsva:new RegExp("hsva"+ue),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 Q(G){return!!ne.CSS_UNIT.exec(G)}function oe(G){G=G.replace(r,"").replace(t,"").toLowerCase();var re=!1;if(N[G])G=N[G],re=!0;else if(G=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var H;return(H=ne.rgb.exec(G))?{r:H[1],g:H[2],b:H[3]}:(H=ne.rgba.exec(G))?{r:H[1],g:H[2],b:H[3],a:H[4]}:(H=ne.hsl.exec(G))?{h:H[1],s:H[2],l:H[3]}:(H=ne.hsla.exec(G))?{h:H[1],s:H[2],l:H[3],a:H[4]}:(H=ne.hsv.exec(G))?{h:H[1],s:H[2],v:H[3]}:(H=ne.hsva.exec(G))?{h:H[1],s:H[2],v:H[3],a:H[4]}:(H=ne.hex8.exec(G))?{r:U(H[1]),g:U(H[2]),b:U(H[3]),a:Z(H[4]),format:re?"name":"hex8"}:(H=ne.hex6.exec(G))?{r:U(H[1]),g:U(H[2]),b:U(H[3]),format:re?"name":"hex"}:(H=ne.hex4.exec(G))?{r:U(H[1]+""+H[1]),g:U(H[2]+""+H[2]),b:U(H[3]+""+H[3]),a:Z(H[4]+""+H[4]),format:re?"name":"hex8"}:(H=ne.hex3.exec(G))?{r:U(H[1]+""+H[1]),g:U(H[2]+""+H[2]),b:U(H[3]+""+H[3]),format:re?"name":"hex"}:!1}function ee(G){var re,H;return G=G||{level:"AA",size:"small"},re=(G.level||"AA").toUpperCase(),H=(G.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),H!=="small"&&H!=="large"&&(H="small"),{level:re,size:H}}typeof kc!="undefined"&&kc.exports?kc.exports=u:typeof define=="function"&&define.amd?define(function(){return u}):window.tinycolor=u})(Math)});var Mt=pe(lf=>{"use strict";var Ob=wo(),af=Array.isArray;function eU(e,r){var t,n;for(t=0;t{"use strict";Bb.exports=function(e){var r=e.variantValues,t=e.editType,n=e.colorEditType;n===void 0&&(n=t);var a={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var o={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:n},weight:a,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(o.size.dflt="auto"),e.autoColor&&(o.color.dflt="auto"),e.arrayOk&&(o.family.arrayOk=!0,o.weight.arrayOk=!0,o.style.arrayOk=!0,e.noFontVariant||(o.variant.arrayOk=!0),e.noFontTextcase||(o.textcase.arrayOk=!0),e.noFontLineposition||(o.lineposition.arrayOk=!0),e.noFontShadow||(o.shadow.arrayOk=!0),o.size.arrayOk=!0,o.color.arrayOk=!0),o}});var sf=pe((nfe,Ub)=>{"use strict";Ub.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var _l=pe((afe,Gb)=>{"use strict";var Hb=sf(),Vb=kn(),vp=Vb({editType:"none"});vp.family.dflt=Hb.HOVERFONT;vp.size.dflt=Hb.HOVERFONTSIZE;Gb.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:vp,grouptitlefont:Vb({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var Ec=pe((ife,Yb)=>{"use strict";var rU=kn(),Sc=_l().hoverlabel,Cc=Mt().extendFlat;Yb.exports={hoverlabel:{bgcolor:Cc({},Sc.bgcolor,{arrayOk:!0}),bordercolor:Cc({},Sc.bordercolor,{arrayOk:!0}),font:rU({arrayOk:!0,editType:"none"}),align:Cc({},Sc.align,{arrayOk:!0}),namelength:Cc({},Sc.namelength,{arrayOk:!0}),editType:"none"}}});var Sn=pe((ofe,Wb)=>{"use strict";var tU=kn(),nU=Ec();Wb.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:tU({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:nU.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 wl=pe((lfe,Jb)=>{"use strict";var aU=ka(),Lc={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)"]]},Xb=Lc.RdBu;function iU(e,r){if(r||(r=Xb),!e)return r;function t(){try{e=Lc[e]||JSON.parse(e)}catch(n){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),Zb(e)?e:r}function Zb(e){var r=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 t=0;t{"use strict";Ml.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ml.defaultLine="#444";Ml.lightLine="#eee";Ml.background="#fff";Ml.borderLine="#BEC8D9";Ml.lightFraction=100*10/11});var Zr=pe((ufe,Kb)=>{"use strict";var ra=ka(),lU=rt(),sU=ea().isTypedArray,an=Kb.exports={},Rc=Ti();an.defaults=Rc.defaults;var uU=an.defaultLine=Rc.defaultLine;an.lightLine=Rc.lightLine;var dp=an.background=Rc.background;an.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};an.rgb=function(e){return an.tinyRGB(ra(e))};an.opacity=function(e){return e?ra(e).getAlpha():0};an.addOpacity=function(e,r){var t=ra(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};an.combine=function(e,r){var t=ra(e).toRgb();if(t.a===1)return ra(e).toRgbString();var n=ra(r||dp).toRgb(),a=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},o={r:a.r*(1-t.a)+t.r*t.a,g:a.g*(1-t.a)+t.g*t.a,b:a.b*(1-t.a)+t.b*t.a};return ra(o).toRgbString()};an.interpolate=function(e,r,t){var n=ra(e).toRgb(),a=ra(r).toRgb(),o={r:t*n.r+(1-t)*a.r,g:t*n.g+(1-t)*a.g,b:t*n.b+(1-t)*a.b};return ra(o).toRgbString()};an.contrast=function(e,r,t){var n=ra(e);n.getAlpha()!==1&&(n=ra(an.combine(e,dp)));var a=n.isDark()?r?n.lighten(r):dp:t?n.darken(t):uU;return a.toString()};an.stroke=function(e,r){var t=ra(r);e.style({stroke:an.tinyRGB(t),"stroke-opacity":t.getAlpha()})};an.fill=function(e,r){var t=ra(r);e.style({fill:an.tinyRGB(t),"fill-opacity":t.getAlpha()})};an.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,n,a,o;for(t=0;t=0)))return e;if(o===3)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var i=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return a?"rgba("+i+", "+n[3]+")":"rgb("+i+")"}});var Dc=pe((ffe,Qb)=>{"use strict";Qb.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var Es=pe($b=>{"use strict";$b.counter=function(e,r,t,n){var a=(r||"")+(t?"":"$"),o=n===!1?"":"^";return e==="xy"?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(o+e+"([2-9]|[1-9][0-9]+)?"+a)}});var t4=pe(ta=>{"use strict";var pp=rt(),jb=ka(),e4=Mt().extendFlat,fU=Sn(),cU=wl(),vU=Zr(),hU=Dc().DESELECTDIM,Ls=Mc(),r4=Es().counter,dU=Cs().modHalf,Ai=ea().isArrayOrTypedArray,Mo=ea().isTypedArraySpec,To=ea().decodeTypedArraySpec;ta.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(Ai(e)?e:Mo(e)?To(e):t)}},enumerated:{coerceFunction:function(e,r,t,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,n=0;nn.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}Mo(e)&&(e=To(e)),e%1||!pp(e)||n.min!==void 0&&en.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?r.set(t):r.set(String(e))}else n.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Mo(e)&&(e=To(e)),jb(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function n(a){return jb(a).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(n)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(cU.get(e,t))}},angle:{coerceFunction:function(e,r,t){Mo(e)&&(e=To(e)),e==="auto"?r.set("auto"):pp(e)?r.set(dU(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,n){var a=n.regex||r4(t);if(typeof e=="string"&&a.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!r4(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var a=e.split("+"),o=0;o{"use strict";var n4={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/"},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:{}}},a4={};function i4(e,r){for(var t in e){var n=e[t];n.valType?r[t]=n.dflt:(r[t]||(r[t]={}),i4(n,r[t]))}}i4(n4,a4);o4.exports={configAttributes:n4,dfltConfig:a4}});var yp=pe((dfe,l4)=>{"use strict";var gp=it(),pU=rt(),uf=[];l4.exports=function(e,r){if(uf.indexOf(e)!==-1)return;uf.push(e);var t=1e3;pU(r)?t=r:r==="long"&&(t=3e3);var n=gp.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(uf);function o(i){i.duration(700).style("opacity",0).each("end",function(l){var u=uf.indexOf(l);u!==-1&&uf.splice(u,1),gp.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(i){var l=gp.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(o)});for(var u=l.append("p"),s=i.split(//g),f=0;f{"use strict";var Rs=Tl().dfltConfig,mp=yp(),xp=s4.exports={};xp.log=function(){var e;if(Rs.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};xp.warn=function(){var e;if(Rs.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};xp.error=function(){var e;if(Rs.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var Fc=pe((gfe,u4)=>{"use strict";u4.exports=function(){}});var bp=pe((yfe,f4)=>{"use strict";f4.exports=function(r,t){if(t instanceof RegExp){for(var n=t.toString(),a=0;a{c4.exports=gU;function gU(){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 d4=pe((xfe,h4)=>{h4.exports=yU;function yU(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var g4=pe((bfe,p4)=>{p4.exports=mU;function mU(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var _p=pe((_fe,y4)=>{y4.exports=xU;function xU(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 x4=pe((wfe,m4)=>{m4.exports=bU;function bU(e,r){if(e===r){var t=r[1],n=r[2],a=r[3],o=r[6],i=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=n,e[9]=o,e[11]=r[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var _4=pe((Mfe,b4)=>{b4.exports=_U;function _U(e,r){var t=r[0],n=r[1],a=r[2],o=r[3],i=r[4],l=r[5],u=r[6],s=r[7],f=r[8],v=r[9],g=r[10],b=r[11],y=r[12],w=r[13],M=r[14],m=r[15],A=t*l-n*i,S=t*u-a*i,x=t*s-o*i,T=n*u-a*l,d=n*s-o*l,_=a*s-o*u,p=f*w-v*y,c=f*M-g*y,k=f*m-b*y,h=v*M-g*w,R=v*m-b*w,E=g*m-b*M,D=A*E-S*R+x*h+T*k-d*c+_*p;return D?(D=1/D,e[0]=(l*E-u*R+s*h)*D,e[1]=(a*R-n*E-o*h)*D,e[2]=(w*_-M*d+m*T)*D,e[3]=(g*d-v*_-b*T)*D,e[4]=(u*k-i*E-s*c)*D,e[5]=(t*E-a*k+o*c)*D,e[6]=(M*x-y*_-m*S)*D,e[7]=(f*_-g*x+b*S)*D,e[8]=(i*R-l*k+s*p)*D,e[9]=(n*k-t*R-o*p)*D,e[10]=(y*d-w*x+m*A)*D,e[11]=(v*x-f*d-b*A)*D,e[12]=(l*c-i*h-u*p)*D,e[13]=(t*h-n*c+a*p)*D,e[14]=(w*S-y*T-M*A)*D,e[15]=(f*T-v*S+g*A)*D,e):null}});var M4=pe((Tfe,w4)=>{w4.exports=wU;function wU(e,r){var t=r[0],n=r[1],a=r[2],o=r[3],i=r[4],l=r[5],u=r[6],s=r[7],f=r[8],v=r[9],g=r[10],b=r[11],y=r[12],w=r[13],M=r[14],m=r[15];return e[0]=l*(g*m-b*M)-v*(u*m-s*M)+w*(u*b-s*g),e[1]=-(n*(g*m-b*M)-v*(a*m-o*M)+w*(a*b-o*g)),e[2]=n*(u*m-s*M)-l*(a*m-o*M)+w*(a*s-o*u),e[3]=-(n*(u*b-s*g)-l*(a*b-o*g)+v*(a*s-o*u)),e[4]=-(i*(g*m-b*M)-f*(u*m-s*M)+y*(u*b-s*g)),e[5]=t*(g*m-b*M)-f*(a*m-o*M)+y*(a*b-o*g),e[6]=-(t*(u*m-s*M)-i*(a*m-o*M)+y*(a*s-o*u)),e[7]=t*(u*b-s*g)-i*(a*b-o*g)+f*(a*s-o*u),e[8]=i*(v*m-b*w)-f*(l*m-s*w)+y*(l*b-s*v),e[9]=-(t*(v*m-b*w)-f*(n*m-o*w)+y*(n*b-o*v)),e[10]=t*(l*m-s*w)-i*(n*m-o*w)+y*(n*s-o*l),e[11]=-(t*(l*b-s*v)-i*(n*b-o*v)+f*(n*s-o*l)),e[12]=-(i*(v*M-g*w)-f*(l*M-u*w)+y*(l*g-u*v)),e[13]=t*(v*M-g*w)-f*(n*M-a*w)+y*(n*g-a*v),e[14]=-(t*(l*M-u*w)-i*(n*M-a*w)+y*(n*u-a*l)),e[15]=t*(l*g-u*v)-i*(n*g-a*v)+f*(n*u-a*l),e}});var A4=pe((Afe,T4)=>{T4.exports=MU;function MU(e){var r=e[0],t=e[1],n=e[2],a=e[3],o=e[4],i=e[5],l=e[6],u=e[7],s=e[8],f=e[9],v=e[10],g=e[11],b=e[12],y=e[13],w=e[14],M=e[15],m=r*i-t*o,A=r*l-n*o,S=r*u-a*o,x=t*l-n*i,T=t*u-a*i,d=n*u-a*l,_=s*y-f*b,p=s*w-v*b,c=s*M-g*b,k=f*w-v*y,h=f*M-g*y,R=v*M-g*w;return m*R-A*h+S*k+x*c-T*p+d*_}});var S4=pe((kfe,k4)=>{k4.exports=TU;function TU(e,r,t){var n=r[0],a=r[1],o=r[2],i=r[3],l=r[4],u=r[5],s=r[6],f=r[7],v=r[8],g=r[9],b=r[10],y=r[11],w=r[12],M=r[13],m=r[14],A=r[15],S=t[0],x=t[1],T=t[2],d=t[3];return e[0]=S*n+x*l+T*v+d*w,e[1]=S*a+x*u+T*g+d*M,e[2]=S*o+x*s+T*b+d*m,e[3]=S*i+x*f+T*y+d*A,S=t[4],x=t[5],T=t[6],d=t[7],e[4]=S*n+x*l+T*v+d*w,e[5]=S*a+x*u+T*g+d*M,e[6]=S*o+x*s+T*b+d*m,e[7]=S*i+x*f+T*y+d*A,S=t[8],x=t[9],T=t[10],d=t[11],e[8]=S*n+x*l+T*v+d*w,e[9]=S*a+x*u+T*g+d*M,e[10]=S*o+x*s+T*b+d*m,e[11]=S*i+x*f+T*y+d*A,S=t[12],x=t[13],T=t[14],d=t[15],e[12]=S*n+x*l+T*v+d*w,e[13]=S*a+x*u+T*g+d*M,e[14]=S*o+x*s+T*b+d*m,e[15]=S*i+x*f+T*y+d*A,e}});var E4=pe((Sfe,C4)=>{C4.exports=AU;function AU(e,r,t){var n=t[0],a=t[1],o=t[2],i,l,u,s,f,v,g,b,y,w,M,m;return r===e?(e[12]=r[0]*n+r[4]*a+r[8]*o+r[12],e[13]=r[1]*n+r[5]*a+r[9]*o+r[13],e[14]=r[2]*n+r[6]*a+r[10]*o+r[14],e[15]=r[3]*n+r[7]*a+r[11]*o+r[15]):(i=r[0],l=r[1],u=r[2],s=r[3],f=r[4],v=r[5],g=r[6],b=r[7],y=r[8],w=r[9],M=r[10],m=r[11],e[0]=i,e[1]=l,e[2]=u,e[3]=s,e[4]=f,e[5]=v,e[6]=g,e[7]=b,e[8]=y,e[9]=w,e[10]=M,e[11]=m,e[12]=i*n+f*a+y*o+r[12],e[13]=l*n+v*a+w*o+r[13],e[14]=u*n+g*a+M*o+r[14],e[15]=s*n+b*a+m*o+r[15]),e}});var R4=pe((Cfe,L4)=>{L4.exports=kU;function kU(e,r,t){var n=t[0],a=t[1],o=t[2];return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[3]=r[3]*n,e[4]=r[4]*a,e[5]=r[5]*a,e[6]=r[6]*a,e[7]=r[7]*a,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=r[11]*o,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var P4=pe((Efe,D4)=>{D4.exports=SU;function SU(e,r,t,n){var a=n[0],o=n[1],i=n[2],l=Math.sqrt(a*a+o*o+i*i),u,s,f,v,g,b,y,w,M,m,A,S,x,T,d,_,p,c,k,h,R,E,D,N;return Math.abs(l)<1e-6?null:(l=1/l,a*=l,o*=l,i*=l,u=Math.sin(t),s=Math.cos(t),f=1-s,v=r[0],g=r[1],b=r[2],y=r[3],w=r[4],M=r[5],m=r[6],A=r[7],S=r[8],x=r[9],T=r[10],d=r[11],_=a*a*f+s,p=o*a*f+i*u,c=i*a*f-o*u,k=a*o*f-i*u,h=o*o*f+s,R=i*o*f+a*u,E=a*i*f+o*u,D=o*i*f-a*u,N=i*i*f+s,e[0]=v*_+w*p+S*c,e[1]=g*_+M*p+x*c,e[2]=b*_+m*p+T*c,e[3]=y*_+A*p+d*c,e[4]=v*k+w*h+S*R,e[5]=g*k+M*h+x*R,e[6]=b*k+m*h+T*R,e[7]=y*k+A*h+d*R,e[8]=v*E+w*D+S*N,e[9]=g*E+M*D+x*N,e[10]=b*E+m*D+T*N,e[11]=y*E+A*D+d*N,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var I4=pe((Lfe,F4)=>{F4.exports=CU;function CU(e,r,t){var n=Math.sin(t),a=Math.cos(t),o=r[4],i=r[5],l=r[6],u=r[7],s=r[8],f=r[9],v=r[10],g=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=o*a+s*n,e[5]=i*a+f*n,e[6]=l*a+v*n,e[7]=u*a+g*n,e[8]=s*a-o*n,e[9]=f*a-i*n,e[10]=v*a-l*n,e[11]=g*a-u*n,e}});var z4=pe((Rfe,N4)=>{N4.exports=EU;function EU(e,r,t){var n=Math.sin(t),a=Math.cos(t),o=r[0],i=r[1],l=r[2],u=r[3],s=r[8],f=r[9],v=r[10],g=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*a-s*n,e[1]=i*a-f*n,e[2]=l*a-v*n,e[3]=u*a-g*n,e[8]=o*n+s*a,e[9]=i*n+f*a,e[10]=l*n+v*a,e[11]=u*n+g*a,e}});var O4=pe((Dfe,q4)=>{q4.exports=LU;function LU(e,r,t){var n=Math.sin(t),a=Math.cos(t),o=r[0],i=r[1],l=r[2],u=r[3],s=r[4],f=r[5],v=r[6],g=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*a+s*n,e[1]=i*a+f*n,e[2]=l*a+v*n,e[3]=u*a+g*n,e[4]=s*a-o*n,e[5]=f*a-i*n,e[6]=v*a-l*n,e[7]=g*a-u*n,e}});var U4=pe((Pfe,B4)=>{B4.exports=RU;function RU(e,r,t){var n,a,o,i=t[0],l=t[1],u=t[2],s=Math.sqrt(i*i+l*l+u*u);return Math.abs(s)<1e-6?null:(s=1/s,i*=s,l*=s,u*=s,n=Math.sin(r),a=Math.cos(r),o=1-a,e[0]=i*i*o+a,e[1]=l*i*o+u*n,e[2]=u*i*o-l*n,e[3]=0,e[4]=i*l*o-u*n,e[5]=l*l*o+a,e[6]=u*l*o+i*n,e[7]=0,e[8]=i*u*o+l*n,e[9]=l*u*o-i*n,e[10]=u*u*o+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var V4=pe((Ffe,H4)=>{H4.exports=DU;function DU(e,r,t){var n=r[0],a=r[1],o=r[2],i=r[3],l=n+n,u=a+a,s=o+o,f=n*l,v=n*u,g=n*s,b=a*u,y=a*s,w=o*s,M=i*l,m=i*u,A=i*s;return e[0]=1-(b+w),e[1]=v+A,e[2]=g-m,e[3]=0,e[4]=v-A,e[5]=1-(f+w),e[6]=y+M,e[7]=0,e[8]=g+m,e[9]=y-M,e[10]=1-(f+b),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Y4=pe((Ife,G4)=>{G4.exports=PU;function PU(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var X4=pe((Nfe,W4)=>{W4.exports=FU;function FU(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var J4=pe((zfe,Z4)=>{Z4.exports=IU;function IU(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Q4=pe((qfe,K4)=>{K4.exports=NU;function NU(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var j4=pe((Ofe,$4)=>{$4.exports=zU;function zU(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,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 wp=pe((Bfe,e_)=>{e_.exports=qU;function qU(e,r){var t=r[0],n=r[1],a=r[2],o=r[3],i=t+t,l=n+n,u=a+a,s=t*i,f=n*i,v=n*l,g=a*i,b=a*l,y=a*u,w=o*i,M=o*l,m=o*u;return e[0]=1-v-y,e[1]=f+m,e[2]=g-M,e[3]=0,e[4]=f-m,e[5]=1-s-y,e[6]=b+w,e[7]=0,e[8]=g+M,e[9]=b-w,e[10]=1-s-v,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var t_=pe((Ufe,r_)=>{r_.exports=OU;function OU(e,r,t,n,a,o,i){var l=1/(t-r),u=1/(a-n),s=1/(o-i);return e[0]=o*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o*2*u,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(a+n)*u,e[10]=(i+o)*s,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*s,e[15]=0,e}});var a_=pe((Hfe,n_)=>{n_.exports=BU;function BU(e,r,t,n,a){var o=1/Math.tan(r/2),i=1/(n-a);return e[0]=o/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*i,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*i,e[15]=0,e}});var o_=pe((Vfe,i_)=>{i_.exports=UU;function UU(e,r,t,n){var a=Math.tan(r.upDegrees*Math.PI/180),o=Math.tan(r.downDegrees*Math.PI/180),i=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),u=2/(i+l),s=2/(a+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=-((i-l)*u*.5),e[9]=(a-o)*s*.5,e[10]=n/(t-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*t/(t-n),e[15]=0,e}});var s_=pe((Gfe,l_)=>{l_.exports=HU;function HU(e,r,t,n,a,o,i){var l=1/(r-t),u=1/(n-a),s=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*s,e[11]=0,e[12]=(r+t)*l,e[13]=(a+n)*u,e[14]=(i+o)*s,e[15]=1,e}});var f_=pe((Yfe,u_)=>{var VU=_p();u_.exports=GU;function GU(e,r,t,n){var a,o,i,l,u,s,f,v,g,b,y=r[0],w=r[1],M=r[2],m=n[0],A=n[1],S=n[2],x=t[0],T=t[1],d=t[2];return Math.abs(y-x)<1e-6&&Math.abs(w-T)<1e-6&&Math.abs(M-d)<1e-6?VU(e):(f=y-x,v=w-T,g=M-d,b=1/Math.sqrt(f*f+v*v+g*g),f*=b,v*=b,g*=b,a=A*g-S*v,o=S*f-m*g,i=m*v-A*f,b=Math.sqrt(a*a+o*o+i*i),b?(b=1/b,a*=b,o*=b,i*=b):(a=0,o=0,i=0),l=v*i-g*o,u=g*a-f*i,s=f*o-v*a,b=Math.sqrt(l*l+u*u+s*s),b?(b=1/b,l*=b,u*=b,s*=b):(l=0,u=0,s=0),e[0]=a,e[1]=l,e[2]=f,e[3]=0,e[4]=o,e[5]=u,e[6]=v,e[7]=0,e[8]=i,e[9]=s,e[10]=g,e[11]=0,e[12]=-(a*y+o*w+i*M),e[13]=-(l*y+u*w+s*M),e[14]=-(f*y+v*w+g*M),e[15]=1,e)}});var v_=pe((Wfe,c_)=>{c_.exports=YU;function YU(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 Mp=pe((Xfe,h_)=>{h_.exports={create:v4(),clone:d4(),copy:g4(),identity:_p(),transpose:x4(),invert:_4(),adjoint:M4(),determinant:A4(),multiply:S4(),translate:E4(),scale:R4(),rotate:P4(),rotateX:I4(),rotateY:z4(),rotateZ:O4(),fromRotation:U4(),fromRotationTranslation:V4(),fromScaling:Y4(),fromTranslation:X4(),fromXRotation:J4(),fromYRotation:Q4(),fromZRotation:j4(),fromQuat:wp(),frustum:t_(),perspective:a_(),perspectiveFromFieldOfView:o_(),ortho:s_(),lookAt:f_(),str:v_()}});var Ic=pe(Ut=>{"use strict";var WU=Mp();Ut.init2dArray=function(e,r){for(var t=new Array(e),n=0;n{"use strict";var XU=it(),d_=Al(),ZU=Ic(),JU=Mp();function KU(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function QU(e){var r=XU.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function p_(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function $U(e,r){g_("global",e,r)}function g_(e,r,t){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o?o.insertRule?o.insertRule(r+"{"+t+"}",0):o.addRule?o.addRule(r,t,0):d_.warn("addStyleRule failed"):d_.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function jU(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&p_(t)}function eH(e,r,t,n,a){var o=n.split(":"),i=a.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var s=this.querySelector(t);s&&(s.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var s=this.querySelector(t);s&&(r&&this.matches(r)?s.style[o[0]]=o[1]:s.style[i[0]]=i[1])}),u.setAttribute(l,!0))})}function rH(e){var r=m_(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(n){var a=y_(n);if(a){var o=ZU.convertCssMatrix(a);t=JU.multiply(t,t,o)}}),t}function y_(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function m_(e){for(var r=[];tH(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function tH(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function nH(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}x_.exports={getGraphDiv:KU,isPlotDiv:QU,removeElement:p_,addStyleRule:$U,addRelatedStyleRule:g_,deleteRelatedStyleRule:jU,setStyleOnHover:eH,getFullTransformMatrix:rH,getElementTransformMatrix:y_,getElementAndAncestors:m_,equalDomRects:nH}});var cf=pe((Kfe,b_)=>{"use strict";b_.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 zn=pe((Qfe,S_)=>{"use strict";var w_=Mt().extendFlat,aH=wo(),M_={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},T_={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},iH=M_.flags.slice().concat(["fullReplot"]),oH=T_.flags.slice().concat("layoutReplot");S_.exports={traces:M_,layout:T_,traceFlags:function(){return __(iH)},layoutFlags:function(){return __(oH)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var n=t.split("+"),a=0;a{"use strict";Tp.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Tp.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 Ap=pe((jfe,C_)=>{"use strict";C_.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 Sa=pe(Nc=>{"use strict";var E_=Ap(),e0e=E_.FORMAT_LINK,r0e=E_.DATE_FORMAT_LINK;function kp(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var n=[],a=0;a{"use strict";function ko(e,r){return r?r.d2l(e):e}function L_(e,r){return r?r.l2d(e):e}function lH(e){return e.x0}function sH(e){return e.x1}function uH(e){return e.y0}function fH(e){return e.y1}function R_(e){return e.x0shift||0}function D_(e){return e.x1shift||0}function P_(e){return e.y0shift||0}function F_(e){return e.y1shift||0}function zc(e,r){return ko(e.x1,r)+D_(e)-ko(e.x0,r)-R_(e)}function qc(e,r,t){return ko(e.y1,t)+F_(e)-ko(e.y0,t)-P_(e)}function cH(e,r){return Math.abs(zc(e,r))}function vH(e,r,t){return Math.abs(qc(e,r,t))}function hH(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(zc(e,r),2)+Math.pow(qc(e,r,t),2))}function dH(e,r){return L_((ko(e.x1,r)+D_(e)+ko(e.x0,r)+R_(e))/2,r)}function pH(e,r,t){return L_((ko(e.y1,t)+F_(e)+ko(e.y0,t)+P_(e))/2,t)}function gH(e,r,t){return e.type!=="line"?void 0:qc(e,r,t)/zc(e,r)}I_.exports={x0:lH,x1:sH,y0:uH,y1:fH,slope:gH,dx:zc,dy:qc,width:cH,height:vH,length:hH,xcenter:dH,ycenter:pH}});var q_=pe((a0e,z_)=>{"use strict";var yH=zn().overrideAll,kl=Sn(),N_=kn(),mH=Ao().dash,So=Mt().extendFlat,xH=Sa().shapeTexttemplateAttrs,bH=Oc();z_.exports=yH({newshape:{visible:So({},kl.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:So({},kl.legend,{}),legendgroup:So({},kl.legendgroup,{}),legendgrouptitle:{text:So({},kl.legendgrouptitle.text,{}),font:N_({})},legendrank:So({},kl.legendrank,{}),legendwidth:So({},kl.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:So({},mH,{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:So({},kl.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:xH({newshape:!0},{keys:Object.keys(bH)}),font:N_({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var B_=pe((i0e,O_)=>{"use strict";var _H=Ao().dash,wH=Mt().extendFlat;O_.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:wH({},_H,{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 Bc=pe((o0e,U_)=>{"use strict";U_.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var Ds=pe((l0e,Y_)=>{"use strict";var Sp=kn(),MH=cf(),Uc=Ti(),H_=q_(),V_=B_(),TH=Bc(),G_=Mt().extendFlat,Hc=Sp({editType:"calc"});Hc.family.dflt='"Open Sans", verdana, arial, sans-serif';Hc.size.dflt=12;Hc.color.dflt=Uc.defaultLine;Y_.exports={font:Hc,title:{text:{valType:"string",editType:"layoutstyle"},font:Sp({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Sp({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:G_(TH({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:Uc.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:Uc.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:Uc.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:H_.newshape,activeshape:H_.activeshape,newselection:V_.newselection,activeselection:V_.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:G_({},MH.transition,{editType:"none"})}});var W_=sb(()=>{});var AH={};var X_=sb(()=>{W_()});var Er=pe(Jr=>{"use strict";var Ps=Al(),Z_=Fc(),J_=bp(),kH=wo(),SH=ff().addStyleRule,K_=Mt(),CH=Sn(),EH=Ds(),LH=K_.extendFlat,Cp=K_.extendDeepAll;Jr.modules={};Jr.allCategories={};Jr.allTypes=[];Jr.subplotsRegistry={};Jr.componentsRegistry={};Jr.layoutArrayContainers=[];Jr.layoutArrayRegexes=[];Jr.traceLayoutAttributes={};Jr.localeRegistry={};Jr.apiMethodRegistry={};Jr.collectableSubplotTypes=null;Jr.register=function(r){if(Jr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var NH=ks().timeFormat,l6=rt(),Ep=Al(),Eo=Cs().mod,Ns=nn(),Ca=Ns.BADNUM,na=Ns.ONEDAY,vf=Ns.ONEHOUR,Co=Ns.ONEMIN,Is=Ns.ONESEC,hf=Ns.EPOCHJD,Zi=Er(),r6=ks().utcFormat,zH=/^\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,qH=/^\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,t6=new Date().getFullYear()-70;function Ji(e){return e&&Zi.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Ht.dateTick0=function(e,r){var t=OH(e,!!r);if(r<2)return t;var n=Ht.dateTime2ms(t,e);return n+=na*(r-1),Ht.ms2DateTime(n,0,e)};function OH(e,r){return Ji(e)?r?Zi.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Zi.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Ht.dfltRange=function(e){return Ji(e)?Zi.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Ht.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Gc,Yc;Ht.dateTime2ms=function(e,r){if(Ht.isJSDate(e)){var t=e.getTimezoneOffset()*Co,n=(e.getUTCMinutes()-e.getMinutes())*Co+(e.getUTCSeconds()-e.getSeconds())*Is+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*Co;t=t-a/2+Eo(n-t+a/2,a)}return e=Number(e)-t,e>=Gc&&e<=Yc?e:Ca}if(typeof e!="string"&&typeof e!="number")return Ca;e=String(e);var o=Ji(r),i=e.charAt(0);o&&(i==="G"||i==="g")&&(e=e.substr(1),r="");var l=o&&r.substr(0,7)==="chinese",u=e.match(l?qH:zH);if(!u)return Ca;var s=u[1],f=u[3]||"1",v=Number(u[5]||1),g=Number(u[7]||0),b=Number(u[9]||0),y=Number(u[11]||0);if(o){if(s.length===2)return Ca;s=Number(s);var w;try{var M=Zi.getComponentMethod("calendars","getCal")(r);if(l){var m=f.charAt(f.length-1)==="i";f=parseInt(f,10),w=M.newDate(s,M.toMonthIndex(s,f,m),v)}else w=M.newDate(s,Number(f),v)}catch(S){return Ca}return w?(w.toJD()-hf)*na+g*vf+b*Co+y*Is:Ca}s.length===2?s=(Number(s)+2e3-t6)%100+t6:s=Number(s),f-=1;var A=new Date(Date.UTC(2e3,f,v,g,b));return A.setUTCFullYear(s),A.getUTCMonth()!==f||A.getUTCDate()!==v?Ca:A.getTime()+y*Is};Gc=Ht.MIN_MS=Ht.dateTime2ms("-9999");Yc=Ht.MAX_MS=Ht.dateTime2ms("9999-12-31 23:59:59.9999");Ht.isDateTime=function(e,r){return Ht.dateTime2ms(e,r)!==Ca};function Fs(e,r){return String(e+Math.pow(10,r)).substr(1)}var Vc=90*na,n6=3*vf,a6=5*Co;Ht.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Gc&&e<=Yc))return Ca;r||(r=0);var n=Math.floor(Eo(e+.05,1)*10),a=Math.round(e-n/10),o,i,l,u,s,f;if(Ji(t)){var v=Math.floor(a/na)+hf,g=Math.floor(Eo(e,na));try{o=Zi.getComponentMethod("calendars","getCal")(t).fromJD(v).formatDate("yyyy-mm-dd")}catch(b){o=r6("G%Y-%m-%d")(new Date(a))}if(o.charAt(0)==="-")for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;i=r=Gc+na&&e<=Yc-na))return Ca;var r=Math.floor(Eo(e+.05,1)*10),t=new Date(Math.round(e-r/10)),n=NH("%Y-%m-%d")(t),a=t.getHours(),o=t.getMinutes(),i=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return s6(n,a,o,i,l)};function s6(e,r,t,n,a){if((r||t||n||a)&&(e+=" "+Fs(r,2)+":"+Fs(t,2),(n||a)&&(e+=":"+Fs(n,2),a))){for(var o=4;a%10===0;)o-=1,a/=10;e+="."+Fs(a,o)}return e}Ht.cleanDate=function(e,r,t){if(e===Ca)return r;if(Ht.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Ji(t))return Ep.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Ht.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Ht.isDateTime(e,t))return Ep.error("unrecognized date",e),r;return e};var BH=/%\d?f/g,UH=/%h/g,HH={1:"1",2:"1",3:"2",4:"2"};function i6(e,r,t,n){e=e.replace(BH,function(o){var i=Math.min(+o.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(i).substr(2).replace(/0+$/,"")||"0";return l});var a=new Date(Math.floor(r+.05));if(e=e.replace(UH,function(){return HH[t("%q")(a)]}),Ji(n))try{e=Zi.getComponentMethod("calendars","worldCalFmt")(e,r,n)}catch(o){return"Invalid"}return t(e)(a)}var VH=[59,59.9,59.99,59.999,59.9999];function GH(e,r){var t=Eo(e+.05,na),n=Fs(Math.floor(t/vf),2)+":"+Fs(Eo(Math.floor(t/Co),60),2);if(r!=="M"){l6(r)||(r=0);var a=Math.min(Eo(e/Is,60),VH[r]),o=(100+a).toFixed(r).substr(1);r>0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}Ht.formatDate=function(e,r,t,n,a,o){if(a=Ji(a)&&a,!r)if(t==="y")r=o.year;else if(t==="m")r=o.month;else if(t==="d")r=o.dayMonth+` +`)};function ie(xe){return xe.map(fe).join(C)}function fe(xe){return B.test(xe)?'"'+xe.replace(/\"/g,'""')+'"':xe}return W},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var W0,X0,Z0,J0,W5=this[F(this,"requestAnimationFrame")]||function(C){setTimeout(C,17)};e.timer=function(){K0.apply(this,arguments)};function K0(C,z,B){var V=arguments.length;V<2&&(z=0),V<3&&(B=Date.now());var W=B+z,J={c:C,t:W,n:null};return X0?X0.n=J:W0=J,X0=J,Z0||(J0=clearTimeout(J0),Z0=1,W5(Rd)),J}function Rd(){var C=X5(),z=Z5()-C;z>24?(isFinite(z)&&(clearTimeout(J0),J0=setTimeout(Rd,z)),Z0=0):(Z0=1,W5(Rd))}e.timer.flush=function(){X5(),Z5()};function X5(){for(var C=Date.now(),z=W0;z;)C>=z.t&&z.c(C-z.t)&&(z.c=null),z=z.n;return C}function Z5(){for(var C,z=W0,B=1/0;z;)z.c?(z.t=0;--ie)qe.push(W[xe[Ie[ie]][2]]);for(ie=+$e;ie1&&je(C[B[V-2]],C[B[V-1]],C[W])<=0;)--V;B[V++]=W}return B.slice(0,V)}function Pq(C,z){return C[0]-z[0]||C[1]-z[1]}e.geom.polygon=function(C){return q(C,Q0),C};var Q0=e.geom.polygon.prototype=[];Q0.area=function(){for(var C=-1,z=this.length,B,V=this[z-1],W=0;++CPe)ie=ie.L;else if(le=z-zq(ie,B),le>Pe){if(!ie.R){V=ie;break}ie=ie.R}else{J>-Pe?(V=ie.P,W=ie):le>-Pe?(V=ie,W=ie.N):V=W=ie;break}var fe=j5(C);if(_s.insert(V,fe),!(!V&&!W)){if(V===W){Ms(V),W=j5(V.site),_s.insert(fe,W),fe.edge=W.edge=Ku(V.site,fe.site),ws(V),ws(W);return}if(!W){fe.edge=Ku(V.site,fe.site);return}Ms(V),Ms(W);var xe=V.site,_e=xe.x,Ie=xe.y,Ne=C.x-_e,$e=C.y-Ie,rr=W.site,qe=rr.x-_e,He=rr.y-Ie,Xe=2*(Ne*He-$e*qe),er=Ne*Ne+$e*$e,tr=qe*qe+He*He,Ke={x:(He*er-$e*tr)/Xe+_e,y:(Ne*tr-qe*er)/Xe+Ie};$0(W.edge,xe,rr,Ke),fe.edge=Ku(xe,C,null,Ke),W.edge=Ku(C,rr,null,Ke),ws(V),ws(W)}}function ex(C,z){var B=C.site,V=B.x,W=B.y,J=W-z;if(!J)return V;var le=C.P;if(!le)return-1/0;B=le.site;var ie=B.x,fe=B.y,xe=fe-z;if(!xe)return ie;var _e=ie-V,Ie=1/J-1/xe,Ne=_e/xe;return Ie?(-Ne+Math.sqrt(Ne*Ne-2*Ie*(_e*_e/(-2*xe)-fe+xe/2+W-J/2)))/Ie+V:(V+ie)/2}function zq(C,z){var B=C.N;if(B)return ex(B,z);var V=C.site;return V.y===z?V.x:1/0}function rx(C){this.site=C,this.edges=[]}rx.prototype.prepare=function(){for(var C=this.edges,z=C.length,B;z--;)B=C[z].edge,(!B.b||!B.a)&&C.splice(z,1);return C.sort(tx),C.length};function qq(C){for(var z=C[0][0],B=C[1][0],V=C[0][1],W=C[1][1],J,le,ie,fe,xe=dl,_e=xe.length,Ie,Ne,$e,rr,qe,He;_e--;)if(Ie=xe[_e],!(!Ie||!Ie.prepare()))for($e=Ie.edges,rr=$e.length,Ne=0;NePe||m(fe-le)>Pe)&&($e.splice(Ne,0,new j0(Vq(Ie.site,He,m(ie-z)Pe?{x:z,y:m(J-z)Pe?{x:m(le-W)Pe?{x:B,y:m(J-B)Pe?{x:m(le-V)=-Qe)){var Ne=fe*fe+xe*xe,$e=_e*_e+He*He,rr=(He*Ne-xe*$e)/Ie,qe=(fe*$e-_e*Ne)/Ie,He=qe+ie,Xe=$5.pop()||new Oq;Xe.arc=C,Xe.site=W,Xe.x=rr+le,Xe.y=He+Math.sqrt(rr*rr+qe*qe),Xe.cy=He,C.circle=Xe;for(var er=null,tr=Ju._;tr;)if(Xe.y0)){if(qe/=$e,$e<0){if(qe0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}if(qe=B-ie,!(!$e&&qe<0)){if(qe/=$e,$e<0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}else if($e>0){if(qe0)){if(qe/=rr,rr<0){if(qe0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}if(qe=V-fe,!(!rr&&qe<0)){if(qe/=rr,rr<0){if(qe>Ne)return;qe>Ie&&(Ie=qe)}else if(rr>0){if(qe0&&(W.a={x:ie+Ie*$e,y:fe+Ie*rr}),Ne<1&&(W.b={x:ie+Ne*$e,y:fe+Ne*rr}),W}}}}}}function Uq(C){for(var z=bs,B=Bq(C[0][0],C[0][1],C[1][0],C[1][1]),V=z.length,W;V--;)W=z[V],(!Hq(W,C)||!B(W)||m(W.a.x-W.b.x)=J)return;if(_e>Ne){if(!V)V={x:rr,y:le};else if(V.y>=ie)return;B={x:rr,y:ie}}else{if(!V)V={x:rr,y:ie};else if(V.y1)if(_e>Ne){if(!V)V={x:(le-Xe)/He,y:le};else if(V.y>=ie)return;B={x:(ie-Xe)/He,y:ie}}else{if(!V)V={x:(ie-Xe)/He,y:ie};else if(V.y=J)return;B={x:J,y:He*J+Xe}}else{if(!V)V={x:J,y:He*J+Xe};else if(V.x=_e&&Xe.x<=Ne&&Xe.y>=Ie&&Xe.y<=$e?[[_e,$e],[Ne,$e],[Ne,Ie],[_e,Ie]]:[];er.point=fe[qe]}),xe}function ie(fe){return fe.map(function(xe,_e){return{x:Math.round(V(xe,_e)/Pe)*Pe,y:Math.round(W(xe,_e)/Pe)*Pe,i:_e}})}return le.links=function(fe){return zd(ie(fe)).edges.filter(function(xe){return xe.l&&xe.r}).map(function(xe){return{source:fe[xe.l.i],target:fe[xe.r.i]}})},le.triangles=function(fe){var xe=[];return zd(ie(fe)).cells.forEach(function(_e,Ie){for(var Ne=_e.site,$e=_e.edges.sort(tx),rr=-1,qe=$e.length,He,Xe,er=$e[qe-1].edge,tr=er.l===Ne?er.r:er.l;++rrtr&&(tr=_e.x),_e.y>Ke&&(Ke=_e.y),$e.push(_e.x),rr.push(_e.y);else for(qe=0;qetr&&(tr=or),dr>Ke&&(Ke=dr),$e.push(or),rr.push(dr)}var yr=tr-Xe,pr=Ke-er;yr>pr?Ke=er+yr:tr=Xe+pr;function br(Mr,Pr,lt,Bt,dt,vr,Or,Vr){if(!(isNaN(lt)||isNaN(Bt)))if(Mr.leaf){var st=Mr.x,Pt=Mr.y;if(st!=null)if(m(st-lt)+m(Pt-Bt)<.01)_r(Mr,Pr,lt,Bt,dt,vr,Or,Vr);else{var $t=Mr.point;Mr.x=Mr.y=Mr.point=null,_r(Mr,$t,st,Pt,dt,vr,Or,Vr),_r(Mr,Pr,lt,Bt,dt,vr,Or,Vr)}else Mr.x=lt,Mr.y=Bt,Mr.point=Pr}else _r(Mr,Pr,lt,Bt,dt,vr,Or,Vr)}function _r(Mr,Pr,lt,Bt,dt,vr,Or,Vr){var st=(dt+Or)*.5,Pt=(vr+Vr)*.5,$t=lt>=st,bn=Bt>=Pt,In=bn<<1|$t;Mr.leaf=!1,Mr=Mr.nodes[In]||(Mr.nodes[In]=ix()),$t?dt=st:Or=st,bn?vr=Pt:Vr=Pt,br(Mr,Pr,lt,Bt,dt,vr,Or,Vr)}var qr=ix();if(qr.add=function(Mr){br(qr,Mr,+Ie(Mr,++qe),+Ne(Mr,qe),Xe,er,tr,Ke)},qr.visit=function(Mr){ju(Mr,qr,Xe,er,tr,Ke)},qr.find=function(Mr){return Zq(qr,Mr[0],Mr[1],Xe,er,tr,Ke)},qe=-1,z==null){for(;++qeJ||Ne>le||$e=or,pr=B>=dr,br=pr<<1|yr,_r=br+4;br<_r;++br)if(_e=Ke[br&3])switch(br&3){case 0:xe(_e,Ie,Ne,or,dr);break;case 1:xe(_e,or,Ne,$e,dr);break;case 2:xe(_e,Ie,dr,or,rr);break;case 3:xe(_e,or,dr,$e,rr);break}}}(C,V,W,J,le),fe}e.interpolateRgb=qd;function qd(C,z){C=e.rgb(C),z=e.rgb(z);var B=C.r,V=C.g,W=C.b,J=z.r-B,le=z.g-V,ie=z.b-W;return function(fe){return"#"+kr(Math.round(B+J*fe))+kr(Math.round(V+le*fe))+kr(Math.round(W+ie*fe))}}e.interpolateObject=ox;function ox(C,z){var B={},V={},W;for(W in C)W in z?B[W]=pl(C[W],z[W]):V[W]=C[W];for(W in z)W in C||(V[W]=z[W]);return function(J){for(W in B)V[W]=B[W](J);return V}}e.interpolateNumber=Xi;function Xi(C,z){return C=+C,z=+z,function(B){return C*(1-B)+z*B}}e.interpolateString=lx;function lx(C,z){var B=Od.lastIndex=Bd.lastIndex=0,V,W,J,le=-1,ie=[],fe=[];for(C=C+"",z=z+"";(V=Od.exec(C))&&(W=Bd.exec(z));)(J=W.index)>B&&(J=z.slice(B,J),ie[le]?ie[le]+=J:ie[++le]=J),(V=V[0])===(W=W[0])?ie[le]?ie[le]+=W:ie[++le]=W:(ie[++le]=null,fe.push({i:le,x:Xi(V,W)})),B=Bd.lastIndex;return B=0&&!(V=e.interpolators[B](C,z)););return V}e.interpolators=[function(C,z){var B=typeof z;return(B==="string"?xn.has(z.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(z)?qd:lx:z instanceof bt?qd:Array.isArray(z)?tc:B==="object"&&isNaN(z)?ox:Xi)(C,z)}],e.interpolateArray=tc;function tc(C,z){var B=[],V=[],W=C.length,J=z.length,le=Math.min(C.length,z.length),ie;for(ie=0;ie=0?C.slice(0,z):C,V=z>=0?C.slice(z+1):"in";return B=Jq.get(B)||sx,V=Kq.get(V)||N,Qq(V(B.apply(null,r.call(arguments,1))))};function Qq(C){return function(z){return z<=0?0:z>=1?1:C(z)}}function ux(C){return function(z){return 1-C(1-z)}}function fx(C){return function(z){return .5*(z<.5?C(2*z):2-C(2-2*z))}}function $q(C){return C*C}function jq(C){return C*C*C}function eO(C){if(C<=0)return 0;if(C>=1)return 1;var z=C*C,B=z*C;return 4*(C<.5?B:3*(C-z)+B-.75)}function rO(C){return function(z){return Math.pow(z,C)}}function tO(C){return 1-Math.cos(C*K)}function nO(C){return Math.pow(2,10*(C-1))}function aO(C){return 1-Math.sqrt(1-C*C)}function iO(C,z){var B;return arguments.length<2&&(z=.45),arguments.length?B=z/ar*Math.asin(1/C):(C=1,B=z/4),function(V){return 1+C*Math.pow(2,-10*V)*Math.sin((V-B)*ar/z)}}function oO(C){return C||(C=1.70158),function(z){return z*z*((C+1)*z-C)}}function lO(C){return C<1/2.75?7.5625*C*C:C<2/2.75?7.5625*(C-=1.5/2.75)*C+.75:C<2.5/2.75?7.5625*(C-=2.25/2.75)*C+.9375:7.5625*(C-=2.625/2.75)*C+.984375}e.interpolateHcl=sO;function sO(C,z){C=e.hcl(C),z=e.hcl(z);var B=C.h,V=C.c,W=C.l,J=z.h-B,le=z.c-V,ie=z.l-W;return isNaN(le)&&(le=0,V=isNaN(V)?z.c:V),isNaN(J)?(J=0,B=isNaN(B)?z.h:B):J>180?J-=360:J<-180&&(J+=360),function(fe){return Gt(B+J*fe,V+le*fe,W+ie*fe)+""}}e.interpolateHsl=uO;function uO(C,z){C=e.hsl(C),z=e.hsl(z);var B=C.h,V=C.s,W=C.l,J=z.h-B,le=z.s-V,ie=z.l-W;return isNaN(le)&&(le=0,V=isNaN(V)?z.s:V),isNaN(J)?(J=0,B=isNaN(B)?z.h:B):J>180?J-=360:J<-180&&(J+=360),function(fe){return Ot(B+J*fe,V+le*fe,W+ie*fe)+""}}e.interpolateLab=fO;function fO(C,z){C=e.lab(C),z=e.lab(z);var B=C.l,V=C.a,W=C.b,J=z.l-B,le=z.a-V,ie=z.b-W;return function(fe){return wa(B+J*fe,V+le*fe,W+ie*fe)+""}}e.interpolateRound=cx;function cx(C,z){return z-=C,function(B){return Math.round(C+z*B)}}e.transform=function(C){var z=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(B){if(B!=null){z.setAttribute("transform",B);var V=z.transform.baseVal.consolidate()}return new vx(V?V.matrix:vO)})(C)};function vx(C){var z=[C.a,C.b],B=[C.c,C.d],V=dx(z),W=hx(z,B),J=dx(cO(B,z,-W))||0;z[0]*B[1]180?z+=360:z-C>180&&(C+=360),V.push({i:B.push(Ts(B)+"rotate(",null,")")-2,x:Xi(C,z)})):z&&B.push(Ts(B)+"rotate("+z+")")}function pO(C,z,B,V){C!==z?V.push({i:B.push(Ts(B)+"skewX(",null,")")-2,x:Xi(C,z)}):z&&B.push(Ts(B)+"skewX("+z+")")}function gO(C,z,B,V){if(C[0]!==z[0]||C[1]!==z[1]){var W=B.push(Ts(B)+"scale(",null,",",null,")");V.push({i:W-4,x:Xi(C[0],z[0])},{i:W-2,x:Xi(C[1],z[1])})}else(z[0]!==1||z[1]!==1)&&B.push(Ts(B)+"scale("+z+")")}function px(C,z){var B=[],V=[];return C=e.transform(C),z=e.transform(z),hO(C.translate,z.translate,B,V),dO(C.rotate,z.rotate,B,V),pO(C.skew,z.skew,B,V),gO(C.scale,z.scale,B,V),C=z=null,function(W){for(var J=-1,le=V.length,ie;++J0?J=Ke:(B.c=null,B.t=NaN,B=null,z.end({type:"end",alpha:J=0})):Ke>0&&(z.start({type:"start",alpha:J=Ke}),B=K0(C.tick)),C):J},C.start=function(){var Ke,or=$e.length,dr=rr.length,yr=V[0],pr=V[1],br,_r;for(Ke=0;Ke=0;)J.push(_e=xe[fe]),_e.parent=ie,_e.depth=ie.depth+1;B&&(ie.value=0),ie.children=xe}else B&&(ie.value=+B.call(V,ie,ie.depth)||0),delete ie.children;return wi(W,function(Ie){var Ne,$e;C&&(Ne=Ie.children)&&Ne.sort(C),B&&($e=Ie.parent)&&($e.value+=Ie.value)}),le}return V.sort=function(W){return arguments.length?(C=W,V):C},V.children=function(W){return arguments.length?(z=W,V):z},V.value=function(W){return arguments.length?(B=W,V):B},V.revalue=function(W){return B&&(rf(W,function(J){J.children&&(J.value=0)}),wi(W,function(J){var le;J.children||(J.value=+B.call(V,J,J.depth)||0),(le=J.parent)&&(le.value+=J.value)})),W},V};function ef(C,z){return e.rebind(C,z,"sort","children","value"),C.nodes=C,C.links=RO,C}function rf(C,z){for(var B=[C];(C=B.pop())!=null;)if(z(C),(W=C.children)&&(V=W.length))for(var V,W;--V>=0;)B.push(W[V])}function wi(C,z){for(var B=[C],V=[];(C=B.pop())!=null;)if(V.push(C),(le=C.children)&&(J=le.length))for(var W=-1,J,le;++WW&&(W=ie),V.push(ie)}for(le=0;leV&&(B=z,V=W);return B}function qO(C){return C.reduce(OO,0)}function OO(C,z){return C+z[1]}e.layout.histogram=function(){var C=!0,z=Number,B=UO,V=BO;function W(J,Ne){for(var ie=[],fe=J.map(z,this),xe=B.call(this,fe,Ne),_e=V.call(this,xe,fe,Ne),Ie,Ne=-1,$e=fe.length,rr=_e.length-1,qe=C?1:1/$e,He;++Ne0)for(Ne=-1;++Ne<$e;)He=fe[Ne],He>=xe[0]&&He<=xe[1]&&(Ie=ie[e.bisect(_e,He,1,rr)-1],Ie.y+=qe,Ie.push(J[Ne]));return ie}return W.value=function(J){return arguments.length?(z=J,W):z},W.range=function(J){return arguments.length?(B=Xr(J),W):B},W.bins=function(J){return arguments.length?(V=typeof J=="number"?function(le){return xx(le,J)}:Xr(J),W):V},W.frequency=function(J){return arguments.length?(C=!!J,W):C},W};function BO(C,z){return xx(C,Math.ceil(Math.log(z.length)/Math.LN2+1))}function xx(C,z){for(var B=-1,V=+C[0],W=(C[1]-V)/z,J=[];++B<=z;)J[B]=W*B+V;return J}function UO(C){return[e.min(C),e.max(C)]}e.layout.pack=function(){var C=e.layout.hierarchy().sort(HO),z=0,B=[1,1],V;function W(J,le){var ie=C.call(this,J,le),fe=ie[0],xe=B[0],_e=B[1],Ie=V==null?Math.sqrt:typeof V=="function"?V:function(){return V};if(fe.x=fe.y=0,wi(fe,function($e){$e.r=+Ie($e.value)}),wi(fe,wx),z){var Ne=z*(V?1:Math.max(2*fe.r/xe,2*fe.r/_e))/2;wi(fe,function($e){$e.r+=Ne}),wi(fe,wx),wi(fe,function($e){$e.r-=Ne})}return Mx(fe,xe/2,_e/2,V?1:1/Math.max(2*fe.r/xe,2*fe.r/_e)),ie}return W.size=function(J){return arguments.length?(B=J,W):B},W.radius=function(J){return arguments.length?(V=J==null||typeof J=="function"?J:+J,W):V},W.padding=function(J){return arguments.length?(z=+J,W):z},ef(W,C)};function HO(C,z){return C.value-z.value}function Vd(C,z){var B=C._pack_next;C._pack_next=z,z._pack_prev=C,z._pack_next=B,B._pack_prev=z}function bx(C,z){C._pack_next=z,z._pack_prev=C}function _x(C,z){var B=z.x-C.x,V=z.y-C.y,W=C.r+z.r;return .999*W*W>B*B+V*V}function wx(C){if(!(z=C.children)||!(Ne=z.length))return;var z,B=1/0,V=-1/0,W=1/0,J=-1/0,le,ie,fe,xe,_e,Ie,Ne;function $e(Ke){B=Math.min(Ke.x-Ke.r,B),V=Math.max(Ke.x+Ke.r,V),W=Math.min(Ke.y-Ke.r,W),J=Math.max(Ke.y+Ke.r,J)}if(z.forEach(VO),le=z[0],le.x=-le.r,le.y=0,$e(le),Ne>1&&(ie=z[1],ie.x=ie.r,ie.y=0,$e(ie),Ne>2))for(fe=z[2],Tx(le,ie,fe),$e(fe),Vd(le,fe),le._pack_prev=fe,Vd(fe,ie),ie=le._pack_next,xe=3;xeHe.x&&(He=or),or.depth>Xe.depth&&(Xe=or)});var er=z(qe,He)/2-qe.x,tr=B[0]/(He.x+z(He,qe)/2+er),Ke=B[1]/(Xe.depth||1);rf($e,function(or){or.x=(or.x+er)*tr,or.y=or.depth*Ke})}return Ne}function J(_e){for(var Ie={A:null,children:[_e]},Ne=[Ie],$e;($e=Ne.pop())!=null;)for(var rr=$e.children,qe,He=0,Xe=rr.length;He0&&(YO(XO(qe,_e,Ne),_e,or),Xe+=or,er+=or),tr+=qe.m,Xe+=$e.m,Ke+=He.m,er+=rr.m;qe&&!Yd(rr)&&(rr.t=qe,rr.m+=tr-er),$e&&!Gd(He)&&(He.t=$e,He.m+=Xe-Ke,Ne=_e)}return Ne}function xe(_e){_e.x*=B[0],_e.y=_e.depth*B[1]}return W.separation=function(_e){return arguments.length?(z=_e,W):z},W.size=function(_e){return arguments.length?(V=(B=_e)==null?xe:null,W):V?null:B},W.nodeSize=function(_e){return arguments.length?(V=(B=_e)==null?null:xe,W):V?B:null},ef(W,C)};function Ax(C,z){return C.parent==z.parent?1:2}function Gd(C){var z=C.children;return z.length?z[0]:C.t}function Yd(C){var z=C.children,B;return(B=z.length)?z[B-1]:C.t}function YO(C,z,B){var V=B/(z.i-C.i);z.c-=V,z.s+=B,C.c+=V,z.z+=B,z.m+=B}function WO(C){for(var z=0,B=0,V=C.children,W=V.length,J;--W>=0;)J=V[W],J.z+=z,J.m+=z,z+=J.s+(B+=J.c)}function XO(C,z,B){return C.a.parent===z.parent?C.a:B}e.layout.cluster=function(){var C=e.layout.hierarchy().sort(null).value(null),z=Ax,B=[1,1],V=!1;function W(J,le){var ie=C.call(this,J,le),fe=ie[0],xe,_e=0;wi(fe,function(qe){var He=qe.children;He&&He.length?(qe.x=JO(He),qe.y=ZO(He)):(qe.x=xe?_e+=z(qe,xe):0,qe.y=0,xe=qe)});var Ie=kx(fe),Ne=Sx(fe),$e=Ie.x-z(Ie,Ne)/2,rr=Ne.x+z(Ne,Ie)/2;return wi(fe,V?function(qe){qe.x=(qe.x-fe.x)*B[0],qe.y=(fe.y-qe.y)*B[1]}:function(qe){qe.x=(qe.x-$e)/(rr-$e)*B[0],qe.y=(1-(fe.y?qe.y/fe.y:1))*B[1]}),ie}return W.separation=function(J){return arguments.length?(z=J,W):z},W.size=function(J){return arguments.length?(V=(B=J)==null,W):V?null:B},W.nodeSize=function(J){return arguments.length?(V=(B=J)!=null,W):V?B:null},ef(W,C)};function ZO(C){return 1+e.max(C,function(z){return z.y})}function JO(C){return C.reduce(function(z,B){return z+B.x},0)/C.length}function kx(C){var z=C.children;return z&&z.length?kx(z[0]):C}function Sx(C){var z=C.children,B;return z&&(B=z.length)?Sx(z[B-1]):C}e.layout.treemap=function(){var C=e.layout.hierarchy(),z=Math.round,B=[1,1],V=null,W=Wd,J=!1,le,ie="squarify",fe=.5*(1+Math.sqrt(5));function xe(qe,He){for(var Xe=-1,er=qe.length,tr,Ke;++Xe0;)er.push(Ke=tr[pr-1]),er.area+=Ke.area,ie!=="squarify"||(dr=Ne(er,yr))<=or?(tr.pop(),or=dr):(er.area-=er.pop().area,$e(er,yr,Xe,!1),yr=Math.min(Xe.dx,Xe.dy),er.length=er.area=0,or=1/0);er.length&&($e(er,yr,Xe,!0),er.length=er.area=0),He.forEach(_e)}}function Ie(qe){var He=qe.children;if(He&&He.length){var Xe=W(qe),er=He.slice(),tr,Ke=[];for(xe(er,Xe.dx*Xe.dy/qe.value),Ke.area=0;tr=er.pop();)Ke.push(tr),Ke.area+=tr.area,tr.z!=null&&($e(Ke,tr.z?Xe.dx:Xe.dy,Xe,!er.length),Ke.length=Ke.area=0);He.forEach(Ie)}}function Ne(qe,He){for(var Xe=qe.area,er,tr=0,Ke=1/0,or=-1,dr=qe.length;++ortr&&(tr=er));return Xe*=Xe,He*=He,Xe?Math.max(He*tr*fe/Xe,Xe/(He*Ke*fe)):1/0}function $e(qe,He,Xe,er){var tr=-1,Ke=qe.length,or=Xe.x,dr=Xe.y,yr=He?z(qe.area/He):0,pr;if(He==Xe.dx){for((er||yr>Xe.dy)&&(yr=Xe.dy);++trXe.dx)&&(yr=Xe.dx);++tr1);return C+z*V*Math.sqrt(-2*Math.log(J)/J)}},logNormal:function(){var C=e.random.normal.apply(e,arguments);return function(){return Math.exp(C())}},bates:function(C){var z=e.random.irwinHall(C);return function(){return z()/C}},irwinHall:function(C){return function(){for(var z=0,B=0;B2?$O:KO,xe=V?mO:yO;return W=fe(C,z,xe,B),J=fe(z,C,xe,pl),ie}function ie(fe){return W(fe)}return ie.invert=function(fe){return J(fe)},ie.domain=function(fe){return arguments.length?(C=fe.map(Number),le()):C},ie.range=function(fe){return arguments.length?(z=fe,le()):z},ie.rangeRound=function(fe){return ie.range(fe).interpolate(cx)},ie.clamp=function(fe){return arguments.length?(V=fe,le()):V},ie.interpolate=function(fe){return arguments.length?(B=fe,le()):B},ie.ticks=function(fe){return Jd(C,fe)},ie.tickFormat=function(fe,xe){return d3_scale_linearTickFormat(C,fe,xe)},ie.nice=function(fe){return Dx(C,fe),le()},ie.copy=function(){return Lx(C,z,B,V)},le()}function Rx(C,z){return e.rebind(C,z,"range","rangeRound","interpolate","clamp")}function Dx(C,z){return Xd(C,Ex(Zd(C,z)[2])),Xd(C,Ex(Zd(C,z)[2])),C}function Zd(C,z){z==null&&(z=10);var B=nc(C),V=B[1]-B[0],W=Math.pow(10,Math.floor(Math.log(V/z)/Math.LN10)),J=z/V*W;return J<=.15?W*=10:J<=.35?W*=5:J<=.75&&(W*=2),B[0]=Math.ceil(B[0]/W)*W,B[1]=Math.floor(B[1]/W)*W+W*.5,B[2]=W,B}function Jd(C,z){return e.range.apply(e,Zd(C,z))}var jO={s:1,g:1,p:1,r:1,e:1};function Px(C){return-Math.floor(Math.log(C)/Math.LN10+.01)}function Oue(C,z){var B=Px(z[2]);return C in jO?Math.abs(B-Px(Math.max(m(z[0]),m(z[1]))))+ +(C!=="e"):B-(C==="%")*2}e.scale.log=function(){return Fx(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Fx(C,z,B,V){function W(ie){return(B?Math.log(ie<0?0:ie):-Math.log(ie>0?0:-ie))/Math.log(z)}function J(ie){return B?Math.pow(z,ie):-Math.pow(z,-ie)}function le(ie){return C(W(ie))}return le.invert=function(ie){return J(C.invert(ie))},le.domain=function(ie){return arguments.length?(B=ie[0]>=0,C.domain((V=ie.map(Number)).map(W)),le):V},le.base=function(ie){return arguments.length?(z=+ie,C.domain(V.map(W)),le):z},le.nice=function(){var ie=Xd(V.map(W),B?Math:eB);return C.domain(ie),V=ie.map(J),le},le.ticks=function(){var ie=nc(V),fe=[],xe=ie[0],_e=ie[1],Ie=Math.floor(W(xe)),Ne=Math.ceil(W(_e)),$e=z%1?2:z;if(isFinite(Ne-Ie)){if(B){for(;Ie0;rr--)fe.push(J(Ie)*rr);for(Ie=0;fe[Ie]_e;Ne--);fe=fe.slice(Ie,Ne)}return fe},le.copy=function(){return Fx(C.copy(),z,B,V)},Rx(le,C)}var eB={floor:function(C){return-Math.ceil(-C)},ceil:function(C){return-Math.floor(-C)}};e.scale.pow=function(){return Ix(e.scale.linear(),1,[0,1])};function Ix(C,z,B){var V=ic(z),W=ic(1/z);function J(le){return C(V(le))}return J.invert=function(le){return W(C.invert(le))},J.domain=function(le){return arguments.length?(C.domain((B=le.map(Number)).map(V)),J):B},J.ticks=function(le){return Jd(B,le)},J.tickFormat=function(le,ie){return d3_scale_linearTickFormat(B,le,ie)},J.nice=function(le){return J.domain(Dx(B,le))},J.exponent=function(le){return arguments.length?(V=ic(z=le),W=ic(1/z),C.domain(B.map(V)),J):z},J.copy=function(){return Ix(C.copy(),z,B)},Rx(J,C)}function ic(C){return function(z){return z<0?-Math.pow(-z,C):Math.pow(z,C)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Nx([],{t:"range",a:[[]]})};function Nx(C,z){var B,V,W;function J(ie){return V[((B.get(ie)||(z.t==="range"?B.set(ie,C.push(ie)):NaN))-1)%V.length]}function le(ie,fe){return e.range(C.length).map(function(xe){return ie+fe*xe})}return J.domain=function(ie){if(!arguments.length)return C;C=[],B=new x;for(var fe=-1,xe=ie.length,_e;++fe0?B[J-1]:C[0],JNe?0:1;if(_e=se)return fe(_e,rr)+(xe?fe(xe,1-rr):"")+"Z";var qe,He,Xe,er,tr=0,Ke=0,or,dr,yr,pr,br,_r,qr,Mr,Pr=[];if((er=(+le.apply(this,arguments)||0)/2)&&(Xe=V===oc?Math.sqrt(xe*xe+_e*_e):+V.apply(this,arguments),rr||(Ke*=-1),_e&&(Ke=hr(Xe/_e*Math.sin(er))),xe&&(tr=hr(Xe/xe*Math.sin(er)))),_e){or=_e*Math.cos(Ie+Ke),dr=_e*Math.sin(Ie+Ke),yr=_e*Math.cos(Ne-Ke),pr=_e*Math.sin(Ne-Ke);var lt=Math.abs(Ne-Ie-2*Ke)<=Ve?0:1;if(Ke&&lc(or,dr,yr,pr)===rr^lt){var Bt=(Ie+Ne)/2;or=_e*Math.cos(Bt),dr=_e*Math.sin(Bt),yr=pr=null}}else or=dr=0;if(xe){br=xe*Math.cos(Ne-tr),_r=xe*Math.sin(Ne-tr),qr=xe*Math.cos(Ie+tr),Mr=xe*Math.sin(Ie+tr);var dt=Math.abs(Ie-Ne+2*tr)<=Ve?0:1;if(tr&&lc(br,_r,qr,Mr)===1-rr^dt){var vr=(Ie+Ne)/2;br=xe*Math.cos(vr),_r=xe*Math.sin(vr),qr=Mr=null}}else br=_r=0;if($e>Pe&&(qe=Math.min(Math.abs(_e-xe)/2,+B.apply(this,arguments)))>.001){He=xe<_e^rr?0:1;var Or=qe,Vr=qe;if($e0?0:1}function sc(C,z,B,V,W){var J=C[0]-z[0],le=C[1]-z[1],ie=(W?V:-V)/Math.sqrt(J*J+le*le),fe=ie*le,xe=-ie*J,_e=C[0]+fe,Ie=C[1]+xe,Ne=z[0]+fe,$e=z[1]+xe,rr=(_e+Ne)/2,qe=(Ie+$e)/2,He=Ne-_e,Xe=$e-Ie,er=He*He+Xe*Xe,tr=B-V,Ke=_e*$e-Ne*Ie,or=(Xe<0?-1:1)*Math.sqrt(Math.max(0,tr*tr*er-Ke*Ke)),dr=(Ke*Xe-He*or)/er,yr=(-Ke*He-Xe*or)/er,pr=(Ke*Xe+He*or)/er,br=(-Ke*He+Xe*or)/er,_r=dr-rr,qr=yr-qe,Mr=pr-rr,Pr=br-qe;return _r*_r+qr*qr>Mr*Mr+Pr*Pr&&(dr=pr,yr=br),[[dr-fe,yr-xe],[dr*B/tr,yr*B/tr]]}function Vx(){return!0}function Gx(C){var z=xs,B=Zu,V=Vx,W=Xa,J=W.key,le=.7;function ie(fe){var xe=[],_e=[],Ie=-1,Ne=fe.length,$e,rr=Xr(z),qe=Xr(B);function He(){xe.push("M",W(C(_e),le))}for(;++Ie1?C.join("L"):C+"Z"}function Yx(C){return C.join("L")+"Z"}function uB(C){for(var z=0,B=C.length,V=C[0],W=[V[0],",",V[1]];++z1&&W.push("H",V[0]),W.join("")}function Qd(C){for(var z=0,B=C.length,V=C[0],W=[V[0],",",V[1]];++z1){ie=z[1],J=C[fe],fe++,V+="C"+(W[0]+le[0])+","+(W[1]+le[1])+","+(J[0]-ie[0])+","+(J[1]-ie[1])+","+J[0]+","+J[1];for(var xe=2;xe9&&(J=B*3/Math.sqrt(J),le[ie]=J*V,le[ie+1]=J*W));for(ie=-1;++ie<=fe;)J=(C[Math.min(fe,ie+1)][0]-C[Math.max(0,ie-1)][0])/(6*(1+le[ie]*le[ie])),z.push([J||0,le[ie]*J||0]);return z}function mB(C){return C.length<3?Xa(C):C[0]+uc(C,yB(C))}e.svg.line.radial=function(){var C=Gx(Jx);return C.radius=C.x,delete C.x,C.angle=C.y,delete C.y,C};function Jx(C){for(var z,B=-1,V=C.length,W,J;++BVe)+",1 "+Ie}function xe(_e,Ie,Ne,$e){return"Q 0,0 "+$e}return J.radius=function(_e){return arguments.length?(B=Xr(_e),J):B},J.source=function(_e){return arguments.length?(C=Xr(_e),J):C},J.target=function(_e){return arguments.length?(z=Xr(_e),J):z},J.startAngle=function(_e){return arguments.length?(V=Xr(_e),J):V},J.endAngle=function(_e){return arguments.length?(W=Xr(_e),J):W},J};function xB(C){return C.radius}e.svg.diagonal=function(){var C=Qx,z=$x,B=jx;function V(W,J){var le=C.call(this,W,J),ie=z.call(this,W,J),fe=(le.y+ie.y)/2,xe=[le,{x:le.x,y:fe},{x:ie.x,y:fe},ie];return xe=xe.map(B),"M"+xe[0]+"C"+xe[1]+" "+xe[2]+" "+xe[3]}return V.source=function(W){return arguments.length?(C=Xr(W),V):C},V.target=function(W){return arguments.length?(z=Xr(W),V):z},V.projection=function(W){return arguments.length?(B=W,V):B},V};function jx(C){return[C.x,C.y]}e.svg.diagonal.radial=function(){var C=e.svg.diagonal(),z=jx,B=C.projection;return C.projection=function(V){return arguments.length?B(bB(z=V)):z},C};function bB(C){return function(){var z=C.apply(this,arguments),B=z[0],V=z[1]-K;return[B*Math.cos(V),B*Math.sin(V)]}}e.svg.symbol=function(){var C=wB,z=_B;function B(V,W){return(rb.get(C.call(this,V,W))||eb)(z.call(this,V,W))}return B.type=function(V){return arguments.length?(C=Xr(V),B):C},B.size=function(V){return arguments.length?(z=Xr(V),B):z},B};function _B(){return 64}function wB(){return"circle"}function eb(C){var z=Math.sqrt(C/Ve);return"M0,"+z+"A"+z+","+z+" 0 1,1 0,"+-z+"A"+z+","+z+" 0 1,1 0,"+z+"Z"}var rb=e.map({circle:eb,cross:function(C){var z=Math.sqrt(C/5)/2;return"M"+-3*z+","+-z+"H"+-z+"V"+-3*z+"H"+z+"V"+-z+"H"+3*z+"V"+z+"H"+z+"V"+3*z+"H"+-z+"V"+z+"H"+-3*z+"Z"},diamond:function(C){var z=Math.sqrt(C/(2*tb)),B=z*tb;return"M0,"+-z+"L"+B+",0 0,"+z+" "+-B+",0Z"},square:function(C){var z=Math.sqrt(C)/2;return"M"+-z+","+-z+"L"+z+","+-z+" "+z+","+z+" "+-z+","+z+"Z"},"triangle-down":function(C){var z=Math.sqrt(C/fc),B=z*fc/2;return"M0,"+B+"L"+z+","+-B+" "+-z+","+-B+"Z"},"triangle-up":function(C){var z=Math.sqrt(C/fc),B=z*fc/2;return"M0,"+-B+"L"+z+","+B+" "+-z+","+B+"Z"}});e.svg.symbolTypes=rb.keys();var fc=Math.sqrt(3),tb=Math.tan(30*ae);ee.transition=function(C){for(var z=yl||++ab,B=np(C),V=[],W,J,le=vc||{time:Date.now(),ease:eO,delay:0,duration:250},ie=-1,fe=this.length;++ie0;)Ie[--er].call(C,Xe);if(He>=1)return le.event&&le.event.end.call(C,C.__data__,z),--J.count?delete J[V]:delete C[B],1}le||(ie=W.time,fe=K0(Ne,0,ie),le=J[V]={tween:new x,time:ie,timer:fe,delay:W.delay,duration:W.duration,ease:W.ease,index:z},W=null,++J.count)}e.svg.axis=function(){var C=e.scale.linear(),z=ib,B=6,V=6,W=3,J=[10],le=null,ie;function fe(xe){xe.each(function(){var _e=e.select(this),Ie=this.__chart__||C,Ne=this.__chart__=C.copy(),$e=le==null?Ne.ticks?Ne.ticks.apply(Ne,J):Ne.domain():le,rr=ie==null?Ne.tickFormat?Ne.tickFormat.apply(Ne,J):N:ie,qe=_e.selectAll(".tick").data($e,Ne),He=qe.enter().insert("g",".domain").attr("class","tick").style("opacity",Pe),Xe=e.transition(qe.exit()).style("opacity",Pe).remove(),er=e.transition(qe.order()).style("opacity",1),tr=Math.max(B,0)+W,Ke,or=ac(Ne),dr=_e.selectAll(".domain").data([0]),yr=(dr.enter().append("path").attr("class","domain"),e.transition(dr));He.append("line"),He.append("text");var pr=He.select("line"),br=er.select("line"),_r=qe.select("text").text(rr),qr=He.select("text"),Mr=er.select("text"),Pr=z==="top"||z==="left"?-1:1,lt,Bt,dt,vr;if(z==="bottom"||z==="top"?(Ke=AB,lt="x",dt="y",Bt="x2",vr="y2",_r.attr("dy",Pr<0?"0em":".71em").style("text-anchor","middle"),yr.attr("d","M"+or[0]+","+Pr*V+"V0H"+or[1]+"V"+Pr*V)):(Ke=kB,lt="y",dt="x",Bt="y2",vr="x2",_r.attr("dy",".32em").style("text-anchor",Pr<0?"end":"start"),yr.attr("d","M"+Pr*V+","+or[0]+"H0V"+or[1]+"H"+Pr*V)),pr.attr(vr,Pr*B),qr.attr(dt,Pr*tr),br.attr(Bt,0).attr(vr,Pr*B),Mr.attr(lt,0).attr(dt,Pr*tr),Ne.rangeBand){var Or=Ne,Vr=Or.rangeBand()/2;Ie=Ne=function(st){return Or(st)+Vr}}else Ie.rangeBand?Ie=Ne:Xe.call(Ke,Ne,Ie);He.call(Ke,Ie,Ne),er.call(Ke,Ne,Ne)})}return fe.scale=function(xe){return arguments.length?(C=xe,fe):C},fe.orient=function(xe){return arguments.length?(z=xe in TB?xe+"":ib,fe):z},fe.ticks=function(){return arguments.length?(J=t(arguments),fe):J},fe.tickValues=function(xe){return arguments.length?(le=xe,fe):le},fe.tickFormat=function(xe){return arguments.length?(ie=xe,fe):ie},fe.tickSize=function(xe){var _e=arguments.length;return _e?(B=+xe,V=+arguments[_e-1],fe):B},fe.innerTickSize=function(xe){return arguments.length?(B=+xe,fe):B},fe.outerTickSize=function(xe){return arguments.length?(V=+xe,fe):V},fe.tickPadding=function(xe){return arguments.length?(W=+xe,fe):W},fe.tickSubdivide=function(){return arguments.length&&fe},fe};var ib="bottom",TB={top:1,right:1,bottom:1,left:1};function AB(C,z,B){C.attr("transform",function(V){var W=z(V);return"translate("+(isFinite(W)?W:B(V))+",0)"})}function kB(C,z,B){C.attr("transform",function(V){var W=z(V);return"translate(0,"+(isFinite(W)?W:B(V))+")"})}e.svg.brush=function(){var C=$(_e,"brushstart","brush","brushend"),z=null,B=null,V=[0,0],W=[0,0],J,le,ie=!0,fe=!0,xe=ap[0];function _e(qe){qe.each(function(){var He=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",rr).on("touchstart.brush",rr),Xe=He.selectAll(".background").data([0]);Xe.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),He.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var er=He.selectAll(".resize").data(xe,N);er.exit().remove(),er.enter().append("g").attr("class",function(dr){return"resize "+dr}).style("cursor",function(dr){return SB[dr]}).append("rect").attr("x",function(dr){return/[ew]$/.test(dr)?-3:null}).attr("y",function(dr){return/^[ns]/.test(dr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),er.style("display",_e.empty()?"none":null);var tr=e.transition(He),Ke=e.transition(Xe),or;z&&(or=ac(z),Ke.attr("x",or[0]).attr("width",or[1]-or[0]),Ne(tr)),B&&(or=ac(B),Ke.attr("y",or[0]).attr("height",or[1]-or[0]),$e(tr)),Ie(tr)})}_e.event=function(qe){qe.each(function(){var He=C.of(this,arguments),Xe={x:V,y:W,i:J,j:le},er=this.__chart__||Xe;this.__chart__=Xe,yl?e.select(this).transition().each("start.brush",function(){J=er.i,le=er.j,V=er.x,W=er.y,He({type:"brushstart"})}).tween("brush:brush",function(){var tr=tc(V,Xe.x),Ke=tc(W,Xe.y);return J=le=null,function(or){V=Xe.x=tr(or),W=Xe.y=Ke(or),He({type:"brush",mode:"resize"})}}).each("end.brush",function(){J=Xe.i,le=Xe.j,He({type:"brush",mode:"resize"}),He({type:"brushend"})}):(He({type:"brushstart"}),He({type:"brush",mode:"resize"}),He({type:"brushend"}))})};function Ie(qe){qe.selectAll(".resize").attr("transform",function(He){return"translate("+V[+/e$/.test(He)]+","+W[+/^s/.test(He)]+")"})}function Ne(qe){qe.select(".extent").attr("x",V[0]),qe.selectAll(".extent,.n>rect,.s>rect").attr("width",V[1]-V[0])}function $e(qe){qe.select(".extent").attr("y",W[0]),qe.selectAll(".extent,.e>rect,.w>rect").attr("height",W[1]-W[0])}function rr(){var qe=this,He=e.select(e.event.target),Xe=C.of(qe,arguments),er=e.select(qe),tr=He.datum(),Ke=!/^(n|s)$/.test(tr)&&z,or=!/^(e|w)$/.test(tr)&&B,dr=He.classed("extent"),yr=Ye(qe),pr,br=e.mouse(qe),_r,qr=e.select(o(qe)).on("keydown.brush",lt).on("keyup.brush",Bt);if(e.event.changedTouches?qr.on("touchmove.brush",dt).on("touchend.brush",Or):qr.on("mousemove.brush",dt).on("mouseup.brush",Or),er.interrupt().selectAll("*").interrupt(),dr)br[0]=V[0]-br[0],br[1]=W[0]-br[1];else if(tr){var Mr=+/w$/.test(tr),Pr=+/^n/.test(tr);_r=[V[1-Mr]-br[0],W[1-Pr]-br[1]],br[0]=V[Mr],br[1]=W[Pr]}else e.event.altKey&&(pr=br.slice());er.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",He.style("cursor")),Xe({type:"brushstart"}),dt();function lt(){e.event.keyCode==32&&(dr||(pr=null,br[0]-=V[1],br[1]-=W[1],dr=2),X())}function Bt(){e.event.keyCode==32&&dr==2&&(br[0]+=V[1],br[1]+=W[1],dr=0,X())}function dt(){var Vr=e.mouse(qe),st=!1;_r&&(Vr[0]+=_r[0],Vr[1]+=_r[1]),dr||(e.event.altKey?(pr||(pr=[(V[0]+V[1])/2,(W[0]+W[1])/2]),br[0]=V[+(Vr[0]{(function(e,r){typeof mc=="object"&&typeof vb!="undefined"?r(mc):typeof define=="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.d3=e.d3||{}))})(mc,function(e){"use strict";var r=new Date,t=new Date;function n(ge,Te,ce,ye){function Le(me){return ge(me=arguments.length===0?new Date:new Date(+me)),me}return Le.floor=function(me){return ge(me=new Date(+me)),me},Le.ceil=function(me){return ge(me=new Date(me-1)),Te(me,1),ge(me),me},Le.round=function(me){var he=Le(me),be=Le.ceil(me);return me-he0))return Se;do Se.push(ze=new Date(+me)),Te(me,be),ge(me);while(ze=he)for(;ge(he),!me(he);)he.setTime(he-1)},function(he,be){if(he>=he)if(be<0)for(;++be<=0;)for(;Te(he,-1),!me(he););else for(;--be>=0;)for(;Te(he,1),!me(he););})},ce&&(Le.count=function(me,he){return r.setTime(+me),t.setTime(+he),ge(r),ge(t),Math.floor(ce(r,t))},Le.every=function(me){return me=Math.floor(me),!isFinite(me)||!(me>0)?null:me>1?Le.filter(ye?function(he){return ye(he)%me===0}:function(he){return Le.count(0,he)%me===0}):Le}),Le}var a=n(function(){},function(ge,Te){ge.setTime(+ge+Te)},function(ge,Te){return Te-ge});a.every=function(ge){return ge=Math.floor(ge),!isFinite(ge)||!(ge>0)?null:ge>1?n(function(Te){Te.setTime(Math.floor(Te/ge)*ge)},function(Te,ce){Te.setTime(+Te+ce*ge)},function(Te,ce){return(ce-Te)/ge}):a};var o=a.range,i=1e3,l=6e4,u=36e5,s=864e5,f=6048e5,v=n(function(ge){ge.setTime(ge-ge.getMilliseconds())},function(ge,Te){ge.setTime(+ge+Te*i)},function(ge,Te){return(Te-ge)/i},function(ge){return ge.getUTCSeconds()}),g=v.range,_=n(function(ge){ge.setTime(ge-ge.getMilliseconds()-ge.getSeconds()*i)},function(ge,Te){ge.setTime(+ge+Te*l)},function(ge,Te){return(Te-ge)/l},function(ge){return ge.getMinutes()}),y=_.range,w=n(function(ge){ge.setTime(ge-ge.getMilliseconds()-ge.getSeconds()*i-ge.getMinutes()*l)},function(ge,Te){ge.setTime(+ge+Te*u)},function(ge,Te){return(Te-ge)/u},function(ge){return ge.getHours()}),M=w.range,m=n(function(ge){ge.setHours(0,0,0,0)},function(ge,Te){ge.setDate(ge.getDate()+Te)},function(ge,Te){return(Te-ge-(Te.getTimezoneOffset()-ge.getTimezoneOffset())*l)/s},function(ge){return ge.getDate()-1}),k=m.range;function S(ge){return n(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-ge)%7),Te.setHours(0,0,0,0)},function(Te,ce){Te.setDate(Te.getDate()+ce*7)},function(Te,ce){return(ce-Te-(ce.getTimezoneOffset()-Te.getTimezoneOffset())*l)/f})}var x=S(0),T=S(1),d=S(2),b=S(3),p=S(4),c=S(5),A=S(6),h=x.range,R=T.range,E=d.range,D=b.range,N=p.range,I=c.range,F=A.range,L=n(function(ge){ge.setDate(1),ge.setHours(0,0,0,0)},function(ge,Te){ge.setMonth(ge.getMonth()+Te)},function(ge,Te){return Te.getMonth()-ge.getMonth()+(Te.getFullYear()-ge.getFullYear())*12},function(ge){return ge.getMonth()}),P=L.range,O=n(function(ge){ge.setMonth(0,1),ge.setHours(0,0,0,0)},function(ge,Te){ge.setFullYear(ge.getFullYear()+Te)},function(ge,Te){return Te.getFullYear()-ge.getFullYear()},function(ge){return ge.getFullYear()});O.every=function(ge){return!isFinite(ge=Math.floor(ge))||!(ge>0)?null:n(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/ge)*ge),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,ce){Te.setFullYear(Te.getFullYear()+ce*ge)})};var U=O.range,X=n(function(ge){ge.setUTCSeconds(0,0)},function(ge,Te){ge.setTime(+ge+Te*l)},function(ge,Te){return(Te-ge)/l},function(ge){return ge.getUTCMinutes()}),j=X.range,$=n(function(ge){ge.setUTCMinutes(0,0,0)},function(ge,Te){ge.setTime(+ge+Te*u)},function(ge,Te){return(Te-ge)/u},function(ge){return ge.getUTCHours()}),Y=$.range,q=n(function(ge){ge.setUTCHours(0,0,0,0)},function(ge,Te){ge.setUTCDate(ge.getUTCDate()+Te)},function(ge,Te){return(Te-ge)/s},function(ge){return ge.getUTCDate()-1}),Z=q.range;function ne(ge){return n(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-ge)%7),Te.setUTCHours(0,0,0,0)},function(Te,ce){Te.setUTCDate(Te.getUTCDate()+ce*7)},function(Te,ce){return(ce-Te)/f})}var Q=ne(0),oe=ne(1),ee=ne(2),G=ne(3),re=ne(4),H=ne(5),te=ne(6),ue=Q.range,de=oe.range,Ee=ee.range,Me=G.range,ve=re.range,Ae=H.range,ke=te.range,De=n(function(ge){ge.setUTCDate(1),ge.setUTCHours(0,0,0,0)},function(ge,Te){ge.setUTCMonth(ge.getUTCMonth()+Te)},function(ge,Te){return Te.getUTCMonth()-ge.getUTCMonth()+(Te.getUTCFullYear()-ge.getUTCFullYear())*12},function(ge){return ge.getUTCMonth()}),Ce=De.range,Oe=n(function(ge){ge.setUTCMonth(0,1),ge.setUTCHours(0,0,0,0)},function(ge,Te){ge.setUTCFullYear(ge.getUTCFullYear()+Te)},function(ge,Te){return Te.getUTCFullYear()-ge.getUTCFullYear()},function(ge){return ge.getUTCFullYear()});Oe.every=function(ge){return!isFinite(ge=Math.floor(ge))||!(ge>0)?null:n(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/ge)*ge),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,ce){Te.setUTCFullYear(Te.getUTCFullYear()+ce*ge)})};var Ue=Oe.range;e.timeDay=m,e.timeDays=k,e.timeFriday=c,e.timeFridays=I,e.timeHour=w,e.timeHours=M,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=o,e.timeMinute=_,e.timeMinutes=y,e.timeMonday=T,e.timeMondays=R,e.timeMonth=L,e.timeMonths=P,e.timeSaturday=A,e.timeSaturdays=F,e.timeSecond=v,e.timeSeconds=g,e.timeSunday=x,e.timeSundays=h,e.timeThursday=p,e.timeThursdays=N,e.timeTuesday=d,e.timeTuesdays=E,e.timeWednesday=b,e.timeWednesdays=D,e.timeWeek=x,e.timeWeeks=h,e.timeYear=O,e.timeYears=U,e.utcDay=q,e.utcDays=Z,e.utcFriday=H,e.utcFridays=Ae,e.utcHour=$,e.utcHours=Y,e.utcMillisecond=a,e.utcMilliseconds=o,e.utcMinute=X,e.utcMinutes=j,e.utcMonday=oe,e.utcMondays=de,e.utcMonth=De,e.utcMonths=Ce,e.utcSaturday=te,e.utcSaturdays=ke,e.utcSecond=v,e.utcSeconds=g,e.utcSunday=Q,e.utcSundays=ue,e.utcThursday=re,e.utcThursdays=ve,e.utcTuesday=ee,e.utcTuesdays=Ee,e.utcWednesday=G,e.utcWednesdays=Me,e.utcWeek=Q,e.utcWeeks=ue,e.utcYear=Oe,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var ks=pe((xc,hb)=>{(function(e,r){typeof xc=="object"&&typeof hb!="undefined"?r(xc,ip()):typeof define=="function"&&define.amd?define(["exports","d3-time"],r):(e=e||self,r(e.d3=e.d3||{},e.d3))})(xc,function(e,r){"use strict";function t(we){if(0<=we.y&&we.y<100){var Pe=new Date(-1,we.m,we.d,we.H,we.M,we.S,we.L);return Pe.setFullYear(we.y),Pe}return new Date(we.y,we.m,we.d,we.H,we.M,we.S,we.L)}function n(we){if(0<=we.y&&we.y<100){var Pe=new Date(Date.UTC(-1,we.m,we.d,we.H,we.M,we.S,we.L));return Pe.setUTCFullYear(we.y),Pe}return new Date(Date.UTC(we.y,we.m,we.d,we.H,we.M,we.S,we.L))}function a(we,Pe,Qe){return{y:we,m:Pe,d:Qe,H:0,M:0,S:0,L:0}}function o(we){var Pe=we.dateTime,Qe=we.date,Ve=we.time,ar=we.periods,se=we.days,K=we.shortDays,ae=we.months,Re=we.shortMonths,Be=g(ar),je=_(ar),nr=g(se),hr=_(se),wr=g(K),Cr=_(K),Tr=g(ae),Ar=_(ae),ft=g(Re),Yr=_(Re),mr={a:ha,A:Qn,b:Fn,B:wa,c:null,d:L,e:L,f:j,H:P,I:O,j:U,L:X,m:$,M:Y,p:xi,q:Gi,Q:he,s:be,S:q,u:Z,U:ne,V:Q,w:oe,W:ee,x:null,X:null,y:G,Y:re,Z:H,"%":me},ct={a:Yi,A:Wi,b:tn,B:xo,c:null,d:te,e:te,f:ve,H:ue,I:de,j:Ee,L:Me,m:Ae,M:ke,p:bi,q:_i,Q:he,s:be,S:De,u:Ce,U:Oe,V:Ue,w:ge,W:Te,x:null,X:null,y:ce,Y:ye,Z:Le,"%":me},Sr={a:Ot,A:Lt,b:yn,B:Gt,c:Rt,d:p,e:p,f:D,H:A,I:A,j:c,L:E,m:b,M:h,p:Hr,q:d,Q:I,s:F,S:R,u:w,U:M,V:m,w:y,W:k,x:nt,X:Ft,y:x,Y:S,Z:T,"%":N};mr.x=Ur(Qe,mr),mr.X=Ur(Ve,mr),mr.c=Ur(Pe,mr),ct.x=Ur(Qe,ct),ct.X=Ur(Ve,ct),ct.c=Ur(Pe,ct);function Ur(kr,at){return function(vt){var gr=[],mn=-1,_t=0,xn=kr.length,Xr,Wa,hl;for(vt instanceof Date||(vt=new Date(+vt));++mn53)return null;"w"in gr||(gr.w=1),"Z"in gr?(_t=n(a(gr.y,0,1)),xn=_t.getUTCDay(),_t=xn>4||xn===0?r.utcMonday.ceil(_t):r.utcMonday(_t),_t=r.utcDay.offset(_t,(gr.V-1)*7),gr.y=_t.getUTCFullYear(),gr.m=_t.getUTCMonth(),gr.d=_t.getUTCDate()+(gr.w+6)%7):(_t=t(a(gr.y,0,1)),xn=_t.getDay(),_t=xn>4||xn===0?r.timeMonday.ceil(_t):r.timeMonday(_t),_t=r.timeDay.offset(_t,(gr.V-1)*7),gr.y=_t.getFullYear(),gr.m=_t.getMonth(),gr.d=_t.getDate()+(gr.w+6)%7)}else("W"in gr||"U"in gr)&&("w"in gr||(gr.w="u"in gr?gr.u%7:"W"in gr?1:0),xn="Z"in gr?n(a(gr.y,0,1)).getUTCDay():t(a(gr.y,0,1)).getDay(),gr.m=0,gr.d="W"in gr?(gr.w+6)%7+gr.W*7-(xn+5)%7:gr.w+gr.U*7-(xn+6)%7);return"Z"in gr?(gr.H+=gr.Z/100|0,gr.M+=gr.Z%100,n(gr)):t(gr)}}function zr(kr,at,vt,gr){for(var mn=0,_t=at.length,xn=vt.length,Xr,Wa;mn<_t;){if(gr>=xn)return-1;if(Xr=at.charCodeAt(mn++),Xr===37){if(Xr=at.charAt(mn++),Wa=Sr[Xr in i?at.charAt(mn++):Xr],!Wa||(gr=Wa(kr,vt,gr))<0)return-1}else if(Xr!=vt.charCodeAt(gr++))return-1}return gr}function Hr(kr,at,vt){var gr=Be.exec(at.slice(vt));return gr?(kr.p=je[gr[0].toLowerCase()],vt+gr[0].length):-1}function Ot(kr,at,vt){var gr=wr.exec(at.slice(vt));return gr?(kr.w=Cr[gr[0].toLowerCase()],vt+gr[0].length):-1}function Lt(kr,at,vt){var gr=nr.exec(at.slice(vt));return gr?(kr.w=hr[gr[0].toLowerCase()],vt+gr[0].length):-1}function yn(kr,at,vt){var gr=ft.exec(at.slice(vt));return gr?(kr.m=Yr[gr[0].toLowerCase()],vt+gr[0].length):-1}function Gt(kr,at,vt){var gr=Tr.exec(at.slice(vt));return gr?(kr.m=Ar[gr[0].toLowerCase()],vt+gr[0].length):-1}function Rt(kr,at,vt){return zr(kr,Pe,at,vt)}function nt(kr,at,vt){return zr(kr,Qe,at,vt)}function Ft(kr,at,vt){return zr(kr,Ve,at,vt)}function ha(kr){return K[kr.getDay()]}function Qn(kr){return se[kr.getDay()]}function Fn(kr){return Re[kr.getMonth()]}function wa(kr){return ae[kr.getMonth()]}function xi(kr){return ar[+(kr.getHours()>=12)]}function Gi(kr){return 1+~~(kr.getMonth()/3)}function Yi(kr){return K[kr.getUTCDay()]}function Wi(kr){return se[kr.getUTCDay()]}function tn(kr){return Re[kr.getUTCMonth()]}function xo(kr){return ae[kr.getUTCMonth()]}function bi(kr){return ar[+(kr.getUTCHours()>=12)]}function _i(kr){return 1+~~(kr.getUTCMonth()/3)}return{format:function(kr){var at=Ur(kr+="",mr);return at.toString=function(){return kr},at},parse:function(kr){var at=bt(kr+="",!1);return at.toString=function(){return kr},at},utcFormat:function(kr){var at=Ur(kr+="",ct);return at.toString=function(){return kr},at},utcParse:function(kr){var at=bt(kr+="",!0);return at.toString=function(){return kr},at}}}var i={"-":"",_:" ",0:"0"},l=/^\s*\d+/,u=/^%/,s=/[\\^$*+?|[\]().{}]/g;function f(we,Pe,Qe){var Ve=we<0?"-":"",ar=(Ve?-we:we)+"",se=ar.length;return Ve+(se68?1900:2e3),Qe+Ve[0].length):-1}function T(we,Pe,Qe){var Ve=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Pe.slice(Qe,Qe+6));return Ve?(we.Z=Ve[1]?0:-(Ve[2]+(Ve[3]||"00")),Qe+Ve[0].length):-1}function d(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+1));return Ve?(we.q=Ve[0]*3-3,Qe+Ve[0].length):-1}function b(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.m=Ve[0]-1,Qe+Ve[0].length):-1}function p(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.d=+Ve[0],Qe+Ve[0].length):-1}function c(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+3));return Ve?(we.m=0,we.d=+Ve[0],Qe+Ve[0].length):-1}function A(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.H=+Ve[0],Qe+Ve[0].length):-1}function h(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.M=+Ve[0],Qe+Ve[0].length):-1}function R(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+2));return Ve?(we.S=+Ve[0],Qe+Ve[0].length):-1}function E(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+3));return Ve?(we.L=+Ve[0],Qe+Ve[0].length):-1}function D(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe,Qe+6));return Ve?(we.L=Math.floor(Ve[0]/1e3),Qe+Ve[0].length):-1}function N(we,Pe,Qe){var Ve=u.exec(Pe.slice(Qe,Qe+1));return Ve?Qe+Ve[0].length:-1}function I(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe));return Ve?(we.Q=+Ve[0],Qe+Ve[0].length):-1}function F(we,Pe,Qe){var Ve=l.exec(Pe.slice(Qe));return Ve?(we.s=+Ve[0],Qe+Ve[0].length):-1}function L(we,Pe){return f(we.getDate(),Pe,2)}function P(we,Pe){return f(we.getHours(),Pe,2)}function O(we,Pe){return f(we.getHours()%12||12,Pe,2)}function U(we,Pe){return f(1+r.timeDay.count(r.timeYear(we),we),Pe,3)}function X(we,Pe){return f(we.getMilliseconds(),Pe,3)}function j(we,Pe){return X(we,Pe)+"000"}function $(we,Pe){return f(we.getMonth()+1,Pe,2)}function Y(we,Pe){return f(we.getMinutes(),Pe,2)}function q(we,Pe){return f(we.getSeconds(),Pe,2)}function Z(we){var Pe=we.getDay();return Pe===0?7:Pe}function ne(we,Pe){return f(r.timeSunday.count(r.timeYear(we)-1,we),Pe,2)}function Q(we,Pe){var Qe=we.getDay();return we=Qe>=4||Qe===0?r.timeThursday(we):r.timeThursday.ceil(we),f(r.timeThursday.count(r.timeYear(we),we)+(r.timeYear(we).getDay()===4),Pe,2)}function oe(we){return we.getDay()}function ee(we,Pe){return f(r.timeMonday.count(r.timeYear(we)-1,we),Pe,2)}function G(we,Pe){return f(we.getFullYear()%100,Pe,2)}function re(we,Pe){return f(we.getFullYear()%1e4,Pe,4)}function H(we){var Pe=we.getTimezoneOffset();return(Pe>0?"-":(Pe*=-1,"+"))+f(Pe/60|0,"0",2)+f(Pe%60,"0",2)}function te(we,Pe){return f(we.getUTCDate(),Pe,2)}function ue(we,Pe){return f(we.getUTCHours(),Pe,2)}function de(we,Pe){return f(we.getUTCHours()%12||12,Pe,2)}function Ee(we,Pe){return f(1+r.utcDay.count(r.utcYear(we),we),Pe,3)}function Me(we,Pe){return f(we.getUTCMilliseconds(),Pe,3)}function ve(we,Pe){return Me(we,Pe)+"000"}function Ae(we,Pe){return f(we.getUTCMonth()+1,Pe,2)}function ke(we,Pe){return f(we.getUTCMinutes(),Pe,2)}function De(we,Pe){return f(we.getUTCSeconds(),Pe,2)}function Ce(we){var Pe=we.getUTCDay();return Pe===0?7:Pe}function Oe(we,Pe){return f(r.utcSunday.count(r.utcYear(we)-1,we),Pe,2)}function Ue(we,Pe){var Qe=we.getUTCDay();return we=Qe>=4||Qe===0?r.utcThursday(we):r.utcThursday.ceil(we),f(r.utcThursday.count(r.utcYear(we),we)+(r.utcYear(we).getUTCDay()===4),Pe,2)}function ge(we){return we.getUTCDay()}function Te(we,Pe){return f(r.utcMonday.count(r.utcYear(we)-1,we),Pe,2)}function ce(we,Pe){return f(we.getUTCFullYear()%100,Pe,2)}function ye(we,Pe){return f(we.getUTCFullYear()%1e4,Pe,4)}function Le(){return"+0000"}function me(){return"%"}function he(we){return+we}function be(we){return Math.floor(+we/1e3)}var Se;ze({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 ze(we){return Se=o(we),e.timeFormat=Se.format,e.timeParse=Se.parse,e.utcFormat=Se.utcFormat,e.utcParse=Se.utcParse,Se}var Fe="%Y-%m-%dT%H:%M:%S.%LZ";function Je(we){return we.toISOString()}var Ye=Date.prototype.toISOString?Je:e.utcFormat(Fe);function Ge(we){var Pe=new Date(we);return isNaN(Pe)?null:Pe}var We=+new Date("2000-01-01T00:00:00.000Z")?Ge:e.utcParse(Fe);e.isoFormat=Ye,e.isoParse=We,e.timeFormatDefaultLocale=ze,e.timeFormatLocale=o,Object.defineProperty(e,"__esModule",{value:!0})})});var op=pe((bc,db)=>{(function(e,r){typeof bc=="object"&&typeof db!="undefined"?r(bc):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e.d3=e.d3||{}))})(bc,function(e){"use strict";function r(b){return Math.abs(b=Math.round(b))>=1e21?b.toLocaleString("en").replace(/,/g,""):b.toString(10)}function t(b,p){if((c=(b=p?b.toExponential(p-1):b.toExponential()).indexOf("e"))<0)return null;var c,A=b.slice(0,c);return[A.length>1?A[0]+A.slice(2):A,+b.slice(c+1)]}function n(b){return b=t(Math.abs(b)),b?b[1]:NaN}function a(b,p){return function(c,A){for(var h=c.length,R=[],E=0,D=b[0],N=0;h>0&&D>0&&(N+D+1>A&&(D=Math.max(1,A-N)),R.push(c.substring(h-=D,h+D)),!((N+=D+1)>A));)D=b[E=(E+1)%b.length];return R.reverse().join(p)}}function o(b){return function(p){return p.replace(/[0-9]/g,function(c){return b[+c]})}}var i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(b){if(!(p=i.exec(b)))throw new Error("invalid format: "+b);var p;return new u({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}l.prototype=u.prototype;function u(b){this.fill=b.fill===void 0?" ":b.fill+"",this.align=b.align===void 0?">":b.align+"",this.sign=b.sign===void 0?"-":b.sign+"",this.symbol=b.symbol===void 0?"":b.symbol+"",this.zero=!!b.zero,this.width=b.width===void 0?void 0:+b.width,this.comma=!!b.comma,this.precision=b.precision===void 0?void 0:+b.precision,this.trim=!!b.trim,this.type=b.type===void 0?"":b.type+""}u.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 s(b){e:for(var p=b.length,c=1,A=-1,h;c0&&(A=0);break}return A>0?b.slice(0,A)+b.slice(h+1):b}var f;function v(b,p){var c=t(b,p);if(!c)return b+"";var A=c[0],h=c[1],R=h-(f=Math.max(-8,Math.min(8,Math.floor(h/3)))*3)+1,E=A.length;return R===E?A:R>E?A+new Array(R-E+1).join("0"):R>0?A.slice(0,R)+"."+A.slice(R):"0."+new Array(1-R).join("0")+t(b,Math.max(0,p+R-1))[0]}function g(b,p){var c=t(b,p);if(!c)return b+"";var A=c[0],h=c[1];return h<0?"0."+new Array(-h).join("0")+A:A.length>h+1?A.slice(0,h+1)+"."+A.slice(h+1):A+new Array(h-A.length+2).join("0")}var _={"%":function(b,p){return(b*100).toFixed(p)},b:function(b){return Math.round(b).toString(2)},c:function(b){return b+""},d:r,e:function(b,p){return b.toExponential(p)},f:function(b,p){return b.toFixed(p)},g:function(b,p){return b.toPrecision(p)},o:function(b){return Math.round(b).toString(8)},p:function(b,p){return g(b*100,p)},r:g,s:v,X:function(b){return Math.round(b).toString(16).toUpperCase()},x:function(b){return Math.round(b).toString(16)}};function y(b){return b}var w=Array.prototype.map,M=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function m(b){var p=b.grouping===void 0||b.thousands===void 0?y:a(w.call(b.grouping,Number),b.thousands+""),c=b.currency===void 0?"":b.currency[0]+"",A=b.currency===void 0?"":b.currency[1]+"",h=b.decimal===void 0?".":b.decimal+"",R=b.numerals===void 0?y:o(w.call(b.numerals,String)),E=b.percent===void 0?"%":b.percent+"",D=b.minus===void 0?"-":b.minus+"",N=b.nan===void 0?"NaN":b.nan+"";function I(L){L=l(L);var P=L.fill,O=L.align,U=L.sign,X=L.symbol,j=L.zero,$=L.width,Y=L.comma,q=L.precision,Z=L.trim,ne=L.type;ne==="n"?(Y=!0,ne="g"):_[ne]||(q===void 0&&(q=12),Z=!0,ne="g"),(j||P==="0"&&O==="=")&&(j=!0,P="0",O="=");var Q=X==="$"?c:X==="#"&&/[boxX]/.test(ne)?"0"+ne.toLowerCase():"",oe=X==="$"?A:/[%p]/.test(ne)?E:"",ee=_[ne],G=/[defgprs%]/.test(ne);q=q===void 0?6:/[gprs]/.test(ne)?Math.max(1,Math.min(21,q)):Math.max(0,Math.min(20,q));function re(H){var te=Q,ue=oe,de,Ee,Me;if(ne==="c")ue=ee(H)+ue,H="";else{H=+H;var ve=H<0||1/H<0;if(H=isNaN(H)?N:ee(Math.abs(H),q),Z&&(H=s(H)),ve&&+H==0&&U!=="+"&&(ve=!1),te=(ve?U==="("?U:D:U==="-"||U==="("?"":U)+te,ue=(ne==="s"?M[8+f/3]:"")+ue+(ve&&U==="("?")":""),G){for(de=-1,Ee=H.length;++deMe||Me>57){ue=(Me===46?h+H.slice(de+1):H.slice(de))+ue,H=H.slice(0,de);break}}}Y&&!j&&(H=p(H,1/0));var Ae=te.length+H.length+ue.length,ke=Ae<$?new Array($-Ae+1).join(P):"";switch(Y&&j&&(H=p(ke+H,ke.length?$-ue.length:1/0),ke=""),O){case"<":H=te+H+ue+ke;break;case"=":H=te+ke+H+ue;break;case"^":H=ke.slice(0,Ae=ke.length>>1)+te+H+ue+ke.slice(Ae);break;default:H=ke+te+H+ue;break}return R(H)}return re.toString=function(){return L+""},re}function F(L,P){var O=I((L=l(L),L.type="f",L)),U=Math.max(-8,Math.min(8,Math.floor(n(P)/3)))*3,X=Math.pow(10,-U),j=M[8+U/3];return function($){return O(X*$)+j}}return{format:I,formatPrefix:F}}var k;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(b){return k=m(b),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function x(b){return Math.max(0,-n(Math.abs(b)))}function T(b,p){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(p)/3)))*3-n(Math.abs(b)))}function d(b,p){return b=Math.abs(b),p=Math.abs(p)-b,Math.max(0,n(p)-n(b))+1}e.FormatSpecifier=u,e.formatDefaultLocale=S,e.formatLocale=m,e.formatSpecifier=l,e.precisionFixed=x,e.precisionPrefix=T,e.precisionRound=d,Object.defineProperty(e,"__esModule",{value:!0})})});var gb=pe((Vue,pb)=>{"use strict";pb.exports=function(e){for(var r=e.length,t,n=0;n13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}});var rt=pe((Gue,yb)=>{"use strict";var NB=gb();yb.exports=function(e){var r=typeof e;if(r==="string"){var t=e;if(e=+e,e===0&&NB(t))return!1}else if(r!=="number")return!1;return e-e<1}});var nn=pe((Yue,mb)=>{"use strict";mb.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 lp=pe((_c,xb)=>{(function(e,r){typeof _c=="object"&&typeof xb!="undefined"?r(_c):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis!="undefined"?globalThis:e||self,r(e["base64-arraybuffer"]={}))})(_c,function(e){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],f+=r[(l[u]&3)<<4|l[u+1]>>4],f+=r[(l[u+1]&15)<<2|l[u+2]>>6],f+=r[l[u+2]&63];return s%3===2?f=f.substring(0,f.length-1)+"=":s%3===1&&(f=f.substring(0,f.length-2)+"=="),f},o=function(i){var l=i.length*.75,u=i.length,s,f=0,v,g,_,y;i[i.length-1]==="="&&(l--,i[i.length-2]==="="&&l--);var w=new ArrayBuffer(l),M=new Uint8Array(w);for(s=0;s>4,M[f++]=(g&15)<<4|_>>2,M[f++]=(_&3)<<6|y&63;return w};e.decode=o,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})})});var wo=pe((Wue,bb)=>{"use strict";bb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var ea=pe(Ja=>{"use strict";var zB=lp().decode,qB=wo(),sp=Array.isArray,OB=ArrayBuffer,BB=DataView;function _b(e){return OB.isView(e)&&!(e instanceof BB)}Ja.isTypedArray=_b;function wc(e){return sp(e)||_b(e)}Ja.isArrayOrTypedArray=wc;function UB(e){return!wc(e[0])}Ja.isArray1D=UB;Ja.ensureArray=function(e,r){return sp(e)||(e=[]),e.length=r,e};var hn={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};hn.uint8c=hn.u1c;hn.uint8=hn.u1;hn.int8=hn.i1;hn.uint16=hn.u2;hn.int16=hn.i2;hn.uint32=hn.u4;hn.int32=hn.i4;hn.float32=hn.f4;hn.float64=hn.f8;function up(e){return e.constructor===ArrayBuffer}Ja.isArrayBuffer=up;Ja.decodeTypedArraySpec=function(e){var r=[],t=HB(e),n=t.dtype,a=hn[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var o=a.BYTES_PER_ELEMENT,i=t.bdata;up(i)||(i=zB(i));var l=t.shape===void 0?[i.byteLength/o]:(""+t.shape).split(",");l.reverse();var u=l.length,s,f,v=+l[0],g=o*v,_=0;if(u===1)r=new a(i);else if(u===2)for(s=+l[1],f=0;f{"use strict";var Mb=rt(),cp=ea().isArrayOrTypedArray;Sb.exports=function(r,t){if(Mb(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var n=t.split("."),a,o,i,l;for(l=0;l{"use strict";var Ss=Mc(),XB=/^\w*$/,ZB=0,Cb=1,Tc=2,Eb=3,bl=4;Lb.exports=function(r,t,n,a){n=n||"name",a=a||"value";var o,i,l,u={};t&&t.length?(l=Ss(r,t),i=l.get()):i=r,t=t||"";var s={};if(i)for(o=0;o2)return u[_]=u[_]|Tc,v.set(g,null);if(f){for(o=_;o{"use strict";var JB=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,KB=/^[^\.\[\]]+$/;Db.exports=function(e,r){for(;r;){var t=e.match(JB);if(t)e=t[1];else if(e.match(KB))e="";else throw new Error("bad relativeAttr call:"+[e,r]);if(r.charAt(0)==="^")r=r.slice(1);else break}return e&&r.charAt(0)!=="["?e+"."+r:e+r}});var Ac=pe((Que,Fb)=>{"use strict";var QB=rt();Fb.exports=function(r,t){if(r>0)return Math.log(r)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return QB(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}});var zb=pe(($ue,Nb)=>{"use strict";var Ib=ea().isArrayOrTypedArray,nf=wo();Nb.exports=function e(r,t){for(var n in t){var a=t[n],o=r[n];if(o!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in r)continue;r[n]=a}else if(Ib(a)&&Ib(o)&&nf(a[0])){if(n==="customdata"||n==="ids")continue;for(var i=Math.min(a.length,o.length),l=0;l{"use strict";function $B(e,r){var t=e%r;return t<0?t+r:t}function jB(e,r){return Math.abs(e)>r/2?e-Math.round(e/r)*r:e}qb.exports={mod:$B,modHalf:jB}});var ka=pe((efe,kc)=>{(function(e){var r=/^\s+/,t=/\s+$/,n=0,a=e.round,o=e.min,i=e.max,l=e.random;function u(G,re){if(G=G||"",re=re||{},G instanceof u)return G;if(!(this instanceof u))return new u(G,re);var H=s(G);this._originalInput=G,this._r=H.r,this._g=H.g,this._b=H.b,this._a=H.a,this._roundA=a(100*this._a)/100,this._format=re.format||H.format,this._gradientType=re.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=H.ok,this._tc_id=n++}u.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 G=this.toRgb();return(G.r*299+G.g*587+G.b*114)/1e3},getLuminance:function(){var G=this.toRgb(),re,H,te,ue,de,Ee;return re=G.r/255,H=G.g/255,te=G.b/255,re<=.03928?ue=re/12.92:ue=e.pow((re+.055)/1.055,2.4),H<=.03928?de=H/12.92:de=e.pow((H+.055)/1.055,2.4),te<=.03928?Ee=te/12.92:Ee=e.pow((te+.055)/1.055,2.4),.2126*ue+.7152*de+.0722*Ee},setAlpha:function(G){return this._a=L(G),this._roundA=a(100*this._a)/100,this},toHsv:function(){var G=_(this._r,this._g,this._b);return{h:G.h*360,s:G.s,v:G.v,a:this._a}},toHsvString:function(){var G=_(this._r,this._g,this._b),re=a(G.h*360),H=a(G.s*100),te=a(G.v*100);return this._a==1?"hsv("+re+", "+H+"%, "+te+"%)":"hsva("+re+", "+H+"%, "+te+"%, "+this._roundA+")"},toHsl:function(){var G=v(this._r,this._g,this._b);return{h:G.h*360,s:G.s,l:G.l,a:this._a}},toHslString:function(){var G=v(this._r,this._g,this._b),re=a(G.h*360),H=a(G.s*100),te=a(G.l*100);return this._a==1?"hsl("+re+", "+H+"%, "+te+"%)":"hsla("+re+", "+H+"%, "+te+"%, "+this._roundA+")"},toHex:function(G){return w(this._r,this._g,this._b,G)},toHexString:function(G){return"#"+this.toHex(G)},toHex8:function(G){return M(this._r,this._g,this._b,this._a,G)},toHex8String:function(G){return"#"+this.toHex8(G)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(P(this._r,255)*100)+"%",g:a(P(this._g,255)*100)+"%",b:a(P(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+a(P(this._r,255)*100)+"%, "+a(P(this._g,255)*100)+"%, "+a(P(this._b,255)*100)+"%)":"rgba("+a(P(this._r,255)*100)+"%, "+a(P(this._g,255)*100)+"%, "+a(P(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:I[w(this._r,this._g,this._b,!0)]||!1},toFilter:function(G){var re="#"+m(this._r,this._g,this._b,this._a),H=re,te=this._gradientType?"GradientType = 1, ":"";if(G){var ue=u(G);H="#"+m(ue._r,ue._g,ue._b,ue._a)}return"progid:DXImageTransform.Microsoft.gradient("+te+"startColorstr="+re+",endColorstr="+H+")"},toString:function(G){var re=!!G;G=G||this._format;var H=!1,te=this._a<1&&this._a>=0,ue=!re&&te&&(G==="hex"||G==="hex6"||G==="hex3"||G==="hex4"||G==="hex8"||G==="name");return ue?G==="name"&&this._a===0?this.toName():this.toRgbString():(G==="rgb"&&(H=this.toRgbString()),G==="prgb"&&(H=this.toPercentageRgbString()),(G==="hex"||G==="hex6")&&(H=this.toHexString()),G==="hex3"&&(H=this.toHexString(!0)),G==="hex4"&&(H=this.toHex8String(!0)),G==="hex8"&&(H=this.toHex8String()),G==="name"&&(H=this.toName()),G==="hsl"&&(H=this.toHslString()),G==="hsv"&&(H=this.toHsvString()),H||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(G,re){var H=G.apply(null,[this].concat([].slice.call(re)));return this._r=H._r,this._g=H._g,this._b=H._b,this.setAlpha(H._a),this},lighten:function(){return this._applyModification(T,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(G,re){return G.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(c,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},u.fromRatio=function(G,re){if(typeof G=="object"){var H={};for(var te in G)G.hasOwnProperty(te)&&(te==="a"?H[te]=G[te]:H[te]=Y(G[te]));G=H}return u(G,re)};function s(G){var re={r:0,g:0,b:0},H=1,te=null,ue=null,de=null,Ee=!1,Me=!1;return typeof G=="string"&&(G=oe(G)),typeof G=="object"&&(Q(G.r)&&Q(G.g)&&Q(G.b)?(re=f(G.r,G.g,G.b),Ee=!0,Me=String(G.r).substr(-1)==="%"?"prgb":"rgb"):Q(G.h)&&Q(G.s)&&Q(G.v)?(te=Y(G.s),ue=Y(G.v),re=y(G.h,te,ue),Ee=!0,Me="hsv"):Q(G.h)&&Q(G.s)&&Q(G.l)&&(te=Y(G.s),de=Y(G.l),re=g(G.h,te,de),Ee=!0,Me="hsl"),G.hasOwnProperty("a")&&(H=G.a)),H=L(H),{ok:Ee,format:G.format||Me,r:o(255,i(re.r,0)),g:o(255,i(re.g,0)),b:o(255,i(re.b,0)),a:H}}function f(G,re,H){return{r:P(G,255)*255,g:P(re,255)*255,b:P(H,255)*255}}function v(G,re,H){G=P(G,255),re=P(re,255),H=P(H,255);var te=i(G,re,H),ue=o(G,re,H),de,Ee,Me=(te+ue)/2;if(te==ue)de=Ee=0;else{var ve=te-ue;switch(Ee=Me>.5?ve/(2-te-ue):ve/(te+ue),te){case G:de=(re-H)/ve+(re1&&(De-=1),De<1/6?Ae+(ke-Ae)*6*De:De<1/2?ke:De<2/3?Ae+(ke-Ae)*(2/3-De)*6:Ae}if(re===0)te=ue=de=H;else{var Me=H<.5?H*(1+re):H+re-H*re,ve=2*H-Me;te=Ee(ve,Me,G+1/3),ue=Ee(ve,Me,G),de=Ee(ve,Me,G-1/3)}return{r:te*255,g:ue*255,b:de*255}}function _(G,re,H){G=P(G,255),re=P(re,255),H=P(H,255);var te=i(G,re,H),ue=o(G,re,H),de,Ee,Me=te,ve=te-ue;if(Ee=te===0?0:ve/te,te==ue)de=0;else{switch(te){case G:de=(re-H)/ve+(re>1)+720)%360;--re;)te.h=(te.h+ue)%360,de.push(u(te));return de}function D(G,re){re=re||6;for(var H=u(G).toHsv(),te=H.h,ue=H.s,de=H.v,Ee=[],Me=1/re;re--;)Ee.push(u({h:te,s:ue,v:de})),de=(de+Me)%1;return Ee}u.mix=function(G,re,H){H=H===0?0:H||50;var te=u(G).toRgb(),ue=u(re).toRgb(),de=H/100,Ee={r:(ue.r-te.r)*de+te.r,g:(ue.g-te.g)*de+te.g,b:(ue.b-te.b)*de+te.b,a:(ue.a-te.a)*de+te.a};return u(Ee)},u.readability=function(G,re){var H=u(G),te=u(re);return(e.max(H.getLuminance(),te.getLuminance())+.05)/(e.min(H.getLuminance(),te.getLuminance())+.05)},u.isReadable=function(G,re,H){var te=u.readability(G,re),ue,de;switch(de=!1,ue=ee(H),ue.level+ue.size){case"AAsmall":case"AAAlarge":de=te>=4.5;break;case"AAlarge":de=te>=3;break;case"AAAsmall":de=te>=7;break}return de},u.mostReadable=function(G,re,H){var te=null,ue=0,de,Ee,Me,ve;H=H||{},Ee=H.includeFallbackColors,Me=H.level,ve=H.size;for(var Ae=0;Aeue&&(ue=de,te=u(re[Ae]));return u.isReadable(G,te,{level:Me,size:ve})||!Ee?te:(H.includeFallbackColors=!1,u.mostReadable(G,["#fff","#000"],H))};var N=u.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"},I=u.hexNames=F(N);function F(G){var re={};for(var H in G)G.hasOwnProperty(H)&&(re[G[H]]=H);return re}function L(G){return G=parseFloat(G),(isNaN(G)||G<0||G>1)&&(G=1),G}function P(G,re){X(G)&&(G="100%");var H=j(G);return G=o(re,i(0,parseFloat(G))),H&&(G=parseInt(G*re,10)/100),e.abs(G-re)<1e-6?1:G%re/parseFloat(re)}function O(G){return o(1,i(0,G))}function U(G){return parseInt(G,16)}function X(G){return typeof G=="string"&&G.indexOf(".")!=-1&&parseFloat(G)===1}function j(G){return typeof G=="string"&&G.indexOf("%")!=-1}function $(G){return G.length==1?"0"+G:""+G}function Y(G){return G<=1&&(G=G*100+"%"),G}function q(G){return e.round(parseFloat(G)*255).toString(16)}function Z(G){return U(G)/255}var ne=function(){var G="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",H="(?:"+re+")|(?:"+G+")",te="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",ue="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?";return{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+te),rgba:new RegExp("rgba"+ue),hsl:new RegExp("hsl"+te),hsla:new RegExp("hsla"+ue),hsv:new RegExp("hsv"+te),hsva:new RegExp("hsva"+ue),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 Q(G){return!!ne.CSS_UNIT.exec(G)}function oe(G){G=G.replace(r,"").replace(t,"").toLowerCase();var re=!1;if(N[G])G=N[G],re=!0;else if(G=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var H;return(H=ne.rgb.exec(G))?{r:H[1],g:H[2],b:H[3]}:(H=ne.rgba.exec(G))?{r:H[1],g:H[2],b:H[3],a:H[4]}:(H=ne.hsl.exec(G))?{h:H[1],s:H[2],l:H[3]}:(H=ne.hsla.exec(G))?{h:H[1],s:H[2],l:H[3],a:H[4]}:(H=ne.hsv.exec(G))?{h:H[1],s:H[2],v:H[3]}:(H=ne.hsva.exec(G))?{h:H[1],s:H[2],v:H[3],a:H[4]}:(H=ne.hex8.exec(G))?{r:U(H[1]),g:U(H[2]),b:U(H[3]),a:Z(H[4]),format:re?"name":"hex8"}:(H=ne.hex6.exec(G))?{r:U(H[1]),g:U(H[2]),b:U(H[3]),format:re?"name":"hex"}:(H=ne.hex4.exec(G))?{r:U(H[1]+""+H[1]),g:U(H[2]+""+H[2]),b:U(H[3]+""+H[3]),a:Z(H[4]+""+H[4]),format:re?"name":"hex8"}:(H=ne.hex3.exec(G))?{r:U(H[1]+""+H[1]),g:U(H[2]+""+H[2]),b:U(H[3]+""+H[3]),format:re?"name":"hex"}:!1}function ee(G){var re,H;return G=G||{level:"AA",size:"small"},re=(G.level||"AA").toUpperCase(),H=(G.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),H!=="small"&&H!=="large"&&(H="small"),{level:re,size:H}}typeof kc!="undefined"&&kc.exports?kc.exports=u:typeof define=="function"&&define.amd?define(function(){return u}):window.tinycolor=u})(Math)});var Mt=pe(lf=>{"use strict";var Ob=wo(),af=Array.isArray;function eU(e,r){var t,n;for(t=0;t{"use strict";Bb.exports=function(e){var r=e.variantValues,t=e.editType,n=e.colorEditType;n===void 0&&(n=t);var a={editType:t,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var o={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:n},weight:a,style:{editType:t,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:t,valType:"enumerated",values:r||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:t,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:t,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:t,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:t};return e.autoSize&&(o.size.dflt="auto"),e.autoColor&&(o.color.dflt="auto"),e.arrayOk&&(o.family.arrayOk=!0,o.weight.arrayOk=!0,o.style.arrayOk=!0,e.noFontVariant||(o.variant.arrayOk=!0),e.noFontTextcase||(o.textcase.arrayOk=!0),e.noFontLineposition||(o.lineposition.arrayOk=!0),e.noFontShadow||(o.shadow.arrayOk=!0),o.size.arrayOk=!0,o.color.arrayOk=!0),o}});var sf=pe((nfe,Ub)=>{"use strict";Ub.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var _l=pe((afe,Gb)=>{"use strict";var Hb=sf(),Vb=kn(),vp=Vb({editType:"none"});vp.family.dflt=Hb.HOVERFONT;vp.size.dflt=Hb.HOVERFONTSIZE;Gb.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:vp,grouptitlefont:Vb({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var Ec=pe((ife,Yb)=>{"use strict";var rU=kn(),Sc=_l().hoverlabel,Cc=Mt().extendFlat;Yb.exports={hoverlabel:{bgcolor:Cc({},Sc.bgcolor,{arrayOk:!0}),bordercolor:Cc({},Sc.bordercolor,{arrayOk:!0}),font:rU({arrayOk:!0,editType:"none"}),align:Cc({},Sc.align,{arrayOk:!0}),namelength:Cc({},Sc.namelength,{arrayOk:!0}),editType:"none"}}});var Sn=pe((ofe,Wb)=>{"use strict";var tU=kn(),nU=Ec();Wb.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:tU({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:nU.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 wl=pe((lfe,Jb)=>{"use strict";var aU=ka(),Lc={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)"]]},Xb=Lc.RdBu;function iU(e,r){if(r||(r=Xb),!e)return r;function t(){try{e=Lc[e]||JSON.parse(e)}catch(n){e=r}}return typeof e=="string"&&(t(),typeof e=="string"&&t()),Zb(e)?e:r}function Zb(e){var r=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 t=0;t{"use strict";Ml.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ml.defaultLine="#444";Ml.lightLine="#eee";Ml.background="#fff";Ml.borderLine="#BEC8D9";Ml.lightFraction=100*10/11});var Zr=pe((ufe,Kb)=>{"use strict";var ra=ka(),lU=rt(),sU=ea().isTypedArray,an=Kb.exports={},Rc=Ti();an.defaults=Rc.defaults;var uU=an.defaultLine=Rc.defaultLine;an.lightLine=Rc.lightLine;var dp=an.background=Rc.background;an.tinyRGB=function(e){var r=e.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"};an.rgb=function(e){return an.tinyRGB(ra(e))};an.opacity=function(e){return e?ra(e).getAlpha():0};an.addOpacity=function(e,r){var t=ra(e).toRgb();return"rgba("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+", "+r+")"};an.combine=function(e,r){var t=ra(e).toRgb();if(t.a===1)return ra(e).toRgbString();var n=ra(r||dp).toRgb(),a=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},o={r:a.r*(1-t.a)+t.r*t.a,g:a.g*(1-t.a)+t.g*t.a,b:a.b*(1-t.a)+t.b*t.a};return ra(o).toRgbString()};an.interpolate=function(e,r,t){var n=ra(e).toRgb(),a=ra(r).toRgb(),o={r:t*n.r+(1-t)*a.r,g:t*n.g+(1-t)*a.g,b:t*n.b+(1-t)*a.b};return ra(o).toRgbString()};an.contrast=function(e,r,t){var n=ra(e);n.getAlpha()!==1&&(n=ra(an.combine(e,dp)));var a=n.isDark()?r?n.lighten(r):dp:t?n.darken(t):uU;return a.toString()};an.stroke=function(e,r){var t=ra(r);e.style({stroke:an.tinyRGB(t),"stroke-opacity":t.getAlpha()})};an.fill=function(e,r){var t=ra(r);e.style({fill:an.tinyRGB(t),"fill-opacity":t.getAlpha()})};an.clean=function(e){if(!(!e||typeof e!="object")){var r=Object.keys(e),t,n,a,o;for(t=0;t=0)))return e;if(o===3)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var i=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return a?"rgba("+i+", "+n[3]+")":"rgb("+i+")"}});var Dc=pe((ffe,Qb)=>{"use strict";Qb.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var Es=pe($b=>{"use strict";$b.counter=function(e,r,t,n){var a=(r||"")+(t?"":"$"),o=n===!1?"":"^";return e==="xy"?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(o+e+"([2-9]|[1-9][0-9]+)?"+a)}});var t4=pe(ta=>{"use strict";var pp=rt(),jb=ka(),e4=Mt().extendFlat,fU=Sn(),cU=wl(),vU=Zr(),hU=Dc().DESELECTDIM,Ls=Mc(),r4=Es().counter,dU=Cs().modHalf,Ai=ea().isArrayOrTypedArray,Mo=ea().isTypedArraySpec,To=ea().decodeTypedArraySpec;ta.valObjectMeta={data_array:{coerceFunction:function(e,r,t){r.set(Ai(e)?e:Mo(e)?To(e):t)}},enumerated:{coerceFunction:function(e,r,t,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?r.set(t):r.set(e)},validateFunction:function(e,r){r.coerceNumber&&(e=+e);for(var t=r.values,n=0;nn.max?r.set(t):r.set(+e)}},integer:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}Mo(e)&&(e=To(e)),e%1||!pp(e)||n.min!==void 0&&en.max?r.set(t):r.set(+e)}},string:{coerceFunction:function(e,r,t,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?r.set(t):r.set(String(e))}else n.noBlank&&!e?r.set(t):r.set(e)}},color:{coerceFunction:function(e,r,t){Mo(e)&&(e=To(e)),jb(e).isValid()?r.set(e):r.set(t)}},colorlist:{coerceFunction:function(e,r,t){function n(a){return jb(a).isValid()}!Array.isArray(e)||!e.length?r.set(t):e.every(n)?r.set(e):r.set(t)}},colorscale:{coerceFunction:function(e,r,t){r.set(cU.get(e,t))}},angle:{coerceFunction:function(e,r,t){Mo(e)&&(e=To(e)),e==="auto"?r.set("auto"):pp(e)?r.set(dU(+e,360)):r.set(t)}},subplotid:{coerceFunction:function(e,r,t,n){var a=n.regex||r4(t);if(typeof e=="string"&&a.test(e)){r.set(e);return}r.set(t)},validateFunction:function(e,r){var t=r.dflt;return e===t?!0:typeof e!="string"?!1:!!r4(t).test(e)}},flaglist:{coerceFunction:function(e,r,t,n){if((n.extras||[]).indexOf(e)!==-1){r.set(e);return}if(typeof e!="string"){r.set(t);return}for(var a=e.split("+"),o=0;o{"use strict";var n4={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/"},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:{}}},a4={};function i4(e,r){for(var t in e){var n=e[t];n.valType?r[t]=n.dflt:(r[t]||(r[t]={}),i4(n,r[t]))}}i4(n4,a4);o4.exports={configAttributes:n4,dfltConfig:a4}});var yp=pe((dfe,l4)=>{"use strict";var gp=it(),pU=rt(),uf=[];l4.exports=function(e,r){if(uf.indexOf(e)!==-1)return;uf.push(e);var t=1e3;pU(r)?t=r:r==="long"&&(t=3e3);var n=gp.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(uf);function o(i){i.duration(700).style("opacity",0).each("end",function(l){var u=uf.indexOf(l);u!==-1&&uf.splice(u,1),gp.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(i){var l=gp.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(o)});for(var u=l.append("p"),s=i.split(//g),f=0;f{"use strict";var Rs=Tl().dfltConfig,mp=yp(),xp=s4.exports={};xp.log=function(){var e;if(Rs.logging>1){var r=["LOG:"];for(e=0;e1){var t=[];for(e=0;e"),"long")}};xp.warn=function(){var e;if(Rs.logging>0){var r=["WARN:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}};xp.error=function(){var e;if(Rs.logging>0){var r=["ERROR:"];for(e=0;e0){var t=[];for(e=0;e"),"stick")}}});var Fc=pe((gfe,u4)=>{"use strict";u4.exports=function(){}});var bp=pe((yfe,f4)=>{"use strict";f4.exports=function(r,t){if(t instanceof RegExp){for(var n=t.toString(),a=0;a{c4.exports=gU;function gU(){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 d4=pe((xfe,h4)=>{h4.exports=yU;function yU(e){var r=new Float32Array(16);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}});var g4=pe((bfe,p4)=>{p4.exports=mU;function mU(e,r){return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var _p=pe((_fe,y4)=>{y4.exports=xU;function xU(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 x4=pe((wfe,m4)=>{m4.exports=bU;function bU(e,r){if(e===r){var t=r[1],n=r[2],a=r[3],o=r[6],i=r[7],l=r[11];e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=t,e[6]=r[9],e[7]=r[13],e[8]=n,e[9]=o,e[11]=r[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=r[0],e[1]=r[4],e[2]=r[8],e[3]=r[12],e[4]=r[1],e[5]=r[5],e[6]=r[9],e[7]=r[13],e[8]=r[2],e[9]=r[6],e[10]=r[10],e[11]=r[14],e[12]=r[3],e[13]=r[7],e[14]=r[11],e[15]=r[15];return e}});var _4=pe((Mfe,b4)=>{b4.exports=_U;function _U(e,r){var t=r[0],n=r[1],a=r[2],o=r[3],i=r[4],l=r[5],u=r[6],s=r[7],f=r[8],v=r[9],g=r[10],_=r[11],y=r[12],w=r[13],M=r[14],m=r[15],k=t*l-n*i,S=t*u-a*i,x=t*s-o*i,T=n*u-a*l,d=n*s-o*l,b=a*s-o*u,p=f*w-v*y,c=f*M-g*y,A=f*m-_*y,h=v*M-g*w,R=v*m-_*w,E=g*m-_*M,D=k*E-S*R+x*h+T*A-d*c+b*p;return D?(D=1/D,e[0]=(l*E-u*R+s*h)*D,e[1]=(a*R-n*E-o*h)*D,e[2]=(w*b-M*d+m*T)*D,e[3]=(g*d-v*b-_*T)*D,e[4]=(u*A-i*E-s*c)*D,e[5]=(t*E-a*A+o*c)*D,e[6]=(M*x-y*b-m*S)*D,e[7]=(f*b-g*x+_*S)*D,e[8]=(i*R-l*A+s*p)*D,e[9]=(n*A-t*R-o*p)*D,e[10]=(y*d-w*x+m*k)*D,e[11]=(v*x-f*d-_*k)*D,e[12]=(l*c-i*h-u*p)*D,e[13]=(t*h-n*c+a*p)*D,e[14]=(w*S-y*T-M*k)*D,e[15]=(f*T-v*S+g*k)*D,e):null}});var M4=pe((Tfe,w4)=>{w4.exports=wU;function wU(e,r){var t=r[0],n=r[1],a=r[2],o=r[3],i=r[4],l=r[5],u=r[6],s=r[7],f=r[8],v=r[9],g=r[10],_=r[11],y=r[12],w=r[13],M=r[14],m=r[15];return e[0]=l*(g*m-_*M)-v*(u*m-s*M)+w*(u*_-s*g),e[1]=-(n*(g*m-_*M)-v*(a*m-o*M)+w*(a*_-o*g)),e[2]=n*(u*m-s*M)-l*(a*m-o*M)+w*(a*s-o*u),e[3]=-(n*(u*_-s*g)-l*(a*_-o*g)+v*(a*s-o*u)),e[4]=-(i*(g*m-_*M)-f*(u*m-s*M)+y*(u*_-s*g)),e[5]=t*(g*m-_*M)-f*(a*m-o*M)+y*(a*_-o*g),e[6]=-(t*(u*m-s*M)-i*(a*m-o*M)+y*(a*s-o*u)),e[7]=t*(u*_-s*g)-i*(a*_-o*g)+f*(a*s-o*u),e[8]=i*(v*m-_*w)-f*(l*m-s*w)+y*(l*_-s*v),e[9]=-(t*(v*m-_*w)-f*(n*m-o*w)+y*(n*_-o*v)),e[10]=t*(l*m-s*w)-i*(n*m-o*w)+y*(n*s-o*l),e[11]=-(t*(l*_-s*v)-i*(n*_-o*v)+f*(n*s-o*l)),e[12]=-(i*(v*M-g*w)-f*(l*M-u*w)+y*(l*g-u*v)),e[13]=t*(v*M-g*w)-f*(n*M-a*w)+y*(n*g-a*v),e[14]=-(t*(l*M-u*w)-i*(n*M-a*w)+y*(n*u-a*l)),e[15]=t*(l*g-u*v)-i*(n*g-a*v)+f*(n*u-a*l),e}});var A4=pe((Afe,T4)=>{T4.exports=MU;function MU(e){var r=e[0],t=e[1],n=e[2],a=e[3],o=e[4],i=e[5],l=e[6],u=e[7],s=e[8],f=e[9],v=e[10],g=e[11],_=e[12],y=e[13],w=e[14],M=e[15],m=r*i-t*o,k=r*l-n*o,S=r*u-a*o,x=t*l-n*i,T=t*u-a*i,d=n*u-a*l,b=s*y-f*_,p=s*w-v*_,c=s*M-g*_,A=f*w-v*y,h=f*M-g*y,R=v*M-g*w;return m*R-k*h+S*A+x*c-T*p+d*b}});var S4=pe((kfe,k4)=>{k4.exports=TU;function TU(e,r,t){var n=r[0],a=r[1],o=r[2],i=r[3],l=r[4],u=r[5],s=r[6],f=r[7],v=r[8],g=r[9],_=r[10],y=r[11],w=r[12],M=r[13],m=r[14],k=r[15],S=t[0],x=t[1],T=t[2],d=t[3];return e[0]=S*n+x*l+T*v+d*w,e[1]=S*a+x*u+T*g+d*M,e[2]=S*o+x*s+T*_+d*m,e[3]=S*i+x*f+T*y+d*k,S=t[4],x=t[5],T=t[6],d=t[7],e[4]=S*n+x*l+T*v+d*w,e[5]=S*a+x*u+T*g+d*M,e[6]=S*o+x*s+T*_+d*m,e[7]=S*i+x*f+T*y+d*k,S=t[8],x=t[9],T=t[10],d=t[11],e[8]=S*n+x*l+T*v+d*w,e[9]=S*a+x*u+T*g+d*M,e[10]=S*o+x*s+T*_+d*m,e[11]=S*i+x*f+T*y+d*k,S=t[12],x=t[13],T=t[14],d=t[15],e[12]=S*n+x*l+T*v+d*w,e[13]=S*a+x*u+T*g+d*M,e[14]=S*o+x*s+T*_+d*m,e[15]=S*i+x*f+T*y+d*k,e}});var E4=pe((Sfe,C4)=>{C4.exports=AU;function AU(e,r,t){var n=t[0],a=t[1],o=t[2],i,l,u,s,f,v,g,_,y,w,M,m;return r===e?(e[12]=r[0]*n+r[4]*a+r[8]*o+r[12],e[13]=r[1]*n+r[5]*a+r[9]*o+r[13],e[14]=r[2]*n+r[6]*a+r[10]*o+r[14],e[15]=r[3]*n+r[7]*a+r[11]*o+r[15]):(i=r[0],l=r[1],u=r[2],s=r[3],f=r[4],v=r[5],g=r[6],_=r[7],y=r[8],w=r[9],M=r[10],m=r[11],e[0]=i,e[1]=l,e[2]=u,e[3]=s,e[4]=f,e[5]=v,e[6]=g,e[7]=_,e[8]=y,e[9]=w,e[10]=M,e[11]=m,e[12]=i*n+f*a+y*o+r[12],e[13]=l*n+v*a+w*o+r[13],e[14]=u*n+g*a+M*o+r[14],e[15]=s*n+_*a+m*o+r[15]),e}});var R4=pe((Cfe,L4)=>{L4.exports=kU;function kU(e,r,t){var n=t[0],a=t[1],o=t[2];return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[3]=r[3]*n,e[4]=r[4]*a,e[5]=r[5]*a,e[6]=r[6]*a,e[7]=r[7]*a,e[8]=r[8]*o,e[9]=r[9]*o,e[10]=r[10]*o,e[11]=r[11]*o,e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}});var P4=pe((Efe,D4)=>{D4.exports=SU;function SU(e,r,t,n){var a=n[0],o=n[1],i=n[2],l=Math.sqrt(a*a+o*o+i*i),u,s,f,v,g,_,y,w,M,m,k,S,x,T,d,b,p,c,A,h,R,E,D,N;return Math.abs(l)<1e-6?null:(l=1/l,a*=l,o*=l,i*=l,u=Math.sin(t),s=Math.cos(t),f=1-s,v=r[0],g=r[1],_=r[2],y=r[3],w=r[4],M=r[5],m=r[6],k=r[7],S=r[8],x=r[9],T=r[10],d=r[11],b=a*a*f+s,p=o*a*f+i*u,c=i*a*f-o*u,A=a*o*f-i*u,h=o*o*f+s,R=i*o*f+a*u,E=a*i*f+o*u,D=o*i*f-a*u,N=i*i*f+s,e[0]=v*b+w*p+S*c,e[1]=g*b+M*p+x*c,e[2]=_*b+m*p+T*c,e[3]=y*b+k*p+d*c,e[4]=v*A+w*h+S*R,e[5]=g*A+M*h+x*R,e[6]=_*A+m*h+T*R,e[7]=y*A+k*h+d*R,e[8]=v*E+w*D+S*N,e[9]=g*E+M*D+x*N,e[10]=_*E+m*D+T*N,e[11]=y*E+k*D+d*N,r!==e&&(e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e)}});var I4=pe((Lfe,F4)=>{F4.exports=CU;function CU(e,r,t){var n=Math.sin(t),a=Math.cos(t),o=r[4],i=r[5],l=r[6],u=r[7],s=r[8],f=r[9],v=r[10],g=r[11];return r!==e&&(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[4]=o*a+s*n,e[5]=i*a+f*n,e[6]=l*a+v*n,e[7]=u*a+g*n,e[8]=s*a-o*n,e[9]=f*a-i*n,e[10]=v*a-l*n,e[11]=g*a-u*n,e}});var z4=pe((Rfe,N4)=>{N4.exports=EU;function EU(e,r,t){var n=Math.sin(t),a=Math.cos(t),o=r[0],i=r[1],l=r[2],u=r[3],s=r[8],f=r[9],v=r[10],g=r[11];return r!==e&&(e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*a-s*n,e[1]=i*a-f*n,e[2]=l*a-v*n,e[3]=u*a-g*n,e[8]=o*n+s*a,e[9]=i*n+f*a,e[10]=l*n+v*a,e[11]=u*n+g*a,e}});var O4=pe((Dfe,q4)=>{q4.exports=LU;function LU(e,r,t){var n=Math.sin(t),a=Math.cos(t),o=r[0],i=r[1],l=r[2],u=r[3],s=r[4],f=r[5],v=r[6],g=r[7];return r!==e&&(e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15]),e[0]=o*a+s*n,e[1]=i*a+f*n,e[2]=l*a+v*n,e[3]=u*a+g*n,e[4]=s*a-o*n,e[5]=f*a-i*n,e[6]=v*a-l*n,e[7]=g*a-u*n,e}});var U4=pe((Pfe,B4)=>{B4.exports=RU;function RU(e,r,t){var n,a,o,i=t[0],l=t[1],u=t[2],s=Math.sqrt(i*i+l*l+u*u);return Math.abs(s)<1e-6?null:(s=1/s,i*=s,l*=s,u*=s,n=Math.sin(r),a=Math.cos(r),o=1-a,e[0]=i*i*o+a,e[1]=l*i*o+u*n,e[2]=u*i*o-l*n,e[3]=0,e[4]=i*l*o-u*n,e[5]=l*l*o+a,e[6]=u*l*o+i*n,e[7]=0,e[8]=i*u*o+l*n,e[9]=l*u*o-i*n,e[10]=u*u*o+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var V4=pe((Ffe,H4)=>{H4.exports=DU;function DU(e,r,t){var n=r[0],a=r[1],o=r[2],i=r[3],l=n+n,u=a+a,s=o+o,f=n*l,v=n*u,g=n*s,_=a*u,y=a*s,w=o*s,M=i*l,m=i*u,k=i*s;return e[0]=1-(_+w),e[1]=v+k,e[2]=g-m,e[3]=0,e[4]=v-k,e[5]=1-(f+w),e[6]=y+M,e[7]=0,e[8]=g+m,e[9]=y-M,e[10]=1-(f+_),e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Y4=pe((Ife,G4)=>{G4.exports=PU;function PU(e,r){return e[0]=r[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=r[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var X4=pe((Nfe,W4)=>{W4.exports=FU;function FU(e,r){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]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var J4=pe((zfe,Z4)=>{Z4.exports=IU;function IU(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=t,e[7]=0,e[8]=0,e[9]=-t,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Q4=pe((qfe,K4)=>{K4.exports=NU;function NU(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=0,e[2]=-t,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=t,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var j4=pe((Ofe,$4)=>{$4.exports=zU;function zU(e,r){var t=Math.sin(r),n=Math.cos(r);return e[0]=n,e[1]=t,e[2]=0,e[3]=0,e[4]=-t,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 wp=pe((Bfe,e_)=>{e_.exports=qU;function qU(e,r){var t=r[0],n=r[1],a=r[2],o=r[3],i=t+t,l=n+n,u=a+a,s=t*i,f=n*i,v=n*l,g=a*i,_=a*l,y=a*u,w=o*i,M=o*l,m=o*u;return e[0]=1-v-y,e[1]=f+m,e[2]=g-M,e[3]=0,e[4]=f-m,e[5]=1-s-y,e[6]=_+w,e[7]=0,e[8]=g+M,e[9]=_-w,e[10]=1-s-v,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var t_=pe((Ufe,r_)=>{r_.exports=OU;function OU(e,r,t,n,a,o,i){var l=1/(t-r),u=1/(a-n),s=1/(o-i);return e[0]=o*2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o*2*u,e[6]=0,e[7]=0,e[8]=(t+r)*l,e[9]=(a+n)*u,e[10]=(i+o)*s,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*s,e[15]=0,e}});var a_=pe((Hfe,n_)=>{n_.exports=BU;function BU(e,r,t,n,a){var o=1/Math.tan(r/2),i=1/(n-a);return e[0]=o/t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*i,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*i,e[15]=0,e}});var o_=pe((Vfe,i_)=>{i_.exports=UU;function UU(e,r,t,n){var a=Math.tan(r.upDegrees*Math.PI/180),o=Math.tan(r.downDegrees*Math.PI/180),i=Math.tan(r.leftDegrees*Math.PI/180),l=Math.tan(r.rightDegrees*Math.PI/180),u=2/(i+l),s=2/(a+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=-((i-l)*u*.5),e[9]=(a-o)*s*.5,e[10]=n/(t-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*t/(t-n),e[15]=0,e}});var s_=pe((Gfe,l_)=>{l_.exports=HU;function HU(e,r,t,n,a,o,i){var l=1/(r-t),u=1/(n-a),s=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*s,e[11]=0,e[12]=(r+t)*l,e[13]=(a+n)*u,e[14]=(i+o)*s,e[15]=1,e}});var f_=pe((Yfe,u_)=>{var VU=_p();u_.exports=GU;function GU(e,r,t,n){var a,o,i,l,u,s,f,v,g,_,y=r[0],w=r[1],M=r[2],m=n[0],k=n[1],S=n[2],x=t[0],T=t[1],d=t[2];return Math.abs(y-x)<1e-6&&Math.abs(w-T)<1e-6&&Math.abs(M-d)<1e-6?VU(e):(f=y-x,v=w-T,g=M-d,_=1/Math.sqrt(f*f+v*v+g*g),f*=_,v*=_,g*=_,a=k*g-S*v,o=S*f-m*g,i=m*v-k*f,_=Math.sqrt(a*a+o*o+i*i),_?(_=1/_,a*=_,o*=_,i*=_):(a=0,o=0,i=0),l=v*i-g*o,u=g*a-f*i,s=f*o-v*a,_=Math.sqrt(l*l+u*u+s*s),_?(_=1/_,l*=_,u*=_,s*=_):(l=0,u=0,s=0),e[0]=a,e[1]=l,e[2]=f,e[3]=0,e[4]=o,e[5]=u,e[6]=v,e[7]=0,e[8]=i,e[9]=s,e[10]=g,e[11]=0,e[12]=-(a*y+o*w+i*M),e[13]=-(l*y+u*w+s*M),e[14]=-(f*y+v*w+g*M),e[15]=1,e)}});var v_=pe((Wfe,c_)=>{c_.exports=YU;function YU(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 Mp=pe((Xfe,h_)=>{h_.exports={create:v4(),clone:d4(),copy:g4(),identity:_p(),transpose:x4(),invert:_4(),adjoint:M4(),determinant:A4(),multiply:S4(),translate:E4(),scale:R4(),rotate:P4(),rotateX:I4(),rotateY:z4(),rotateZ:O4(),fromRotation:U4(),fromRotationTranslation:V4(),fromScaling:Y4(),fromTranslation:X4(),fromXRotation:J4(),fromYRotation:Q4(),fromZRotation:j4(),fromQuat:wp(),frustum:t_(),perspective:a_(),perspectiveFromFieldOfView:o_(),ortho:s_(),lookAt:f_(),str:v_()}});var Ic=pe(Ut=>{"use strict";var WU=Mp();Ut.init2dArray=function(e,r){for(var t=new Array(e),n=0;n{"use strict";var XU=it(),d_=Al(),ZU=Ic(),JU=Mp();function KU(e){var r;if(typeof e=="string"){if(r=document.getElementById(e),r===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return r}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function QU(e){var r=XU.select(e);return r.node()instanceof HTMLElement&&r.size()&&r.classed("js-plotly-plot")}function p_(e){var r=e&&e.parentNode;r&&r.removeChild(e)}function $U(e,r){g_("global",e,r)}function g_(e,r,t){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o?o.insertRule?o.insertRule(r+"{"+t+"}",0):o.addRule?o.addRule(r,t,0):d_.warn("addStyleRule failed"):d_.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function jU(e){var r="plotly.js-style-"+e,t=document.getElementById(r);t&&p_(t)}function eH(e,r,t,n,a){var o=n.split(":"),i=a.split(":"),l="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var s=this.querySelector(t);s&&(s.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var s=this.querySelector(t);s&&(r&&this.matches(r)?s.style[o[0]]=o[1]:s.style[i[0]]=i[1])}),u.setAttribute(l,!0))})}function rH(e){var r=m_(e),t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return r.forEach(function(n){var a=y_(n);if(a){var o=ZU.convertCssMatrix(a);t=JU.multiply(t,t,o)}}),t}function y_(e){var r=window.getComputedStyle(e,null),t=r.getPropertyValue("-webkit-transform")||r.getPropertyValue("-moz-transform")||r.getPropertyValue("-ms-transform")||r.getPropertyValue("-o-transform")||r.getPropertyValue("transform");return t==="none"?null:t.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function m_(e){for(var r=[];tH(e);)r.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return r}function tH(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function nH(e,r){return e&&r&&e.top===r.top&&e.left===r.left&&e.right===r.right&&e.bottom===r.bottom}x_.exports={getGraphDiv:KU,isPlotDiv:QU,removeElement:p_,addStyleRule:$U,addRelatedStyleRule:g_,deleteRelatedStyleRule:jU,setStyleOnHover:eH,getFullTransformMatrix:rH,getElementTransformMatrix:y_,getElementAndAncestors:m_,equalDomRects:nH}});var cf=pe((Kfe,b_)=>{"use strict";b_.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 zn=pe((Qfe,S_)=>{"use strict";var w_=Mt().extendFlat,aH=wo(),M_={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},T_={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},iH=M_.flags.slice().concat(["fullReplot"]),oH=T_.flags.slice().concat("layoutReplot");S_.exports={traces:M_,layout:T_,traceFlags:function(){return __(iH)},layoutFlags:function(){return __(oH)},update:function(e,r){var t=r.editType;if(t&&t!=="none")for(var n=t.split("+"),a=0;a{"use strict";Tp.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Tp.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 Ap=pe((jfe,C_)=>{"use strict";C_.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 Sa=pe(Nc=>{"use strict";var E_=Ap(),e0e=E_.FORMAT_LINK,r0e=E_.DATE_FORMAT_LINK;function kp(e){var r=e.description?" "+e.description:"",t=e.keys||[];if(t.length>0){for(var n=[],a=0;a{"use strict";function ko(e,r){return r?r.d2l(e):e}function L_(e,r){return r?r.l2d(e):e}function lH(e){return e.x0}function sH(e){return e.x1}function uH(e){return e.y0}function fH(e){return e.y1}function R_(e){return e.x0shift||0}function D_(e){return e.x1shift||0}function P_(e){return e.y0shift||0}function F_(e){return e.y1shift||0}function zc(e,r){return ko(e.x1,r)+D_(e)-ko(e.x0,r)-R_(e)}function qc(e,r,t){return ko(e.y1,t)+F_(e)-ko(e.y0,t)-P_(e)}function cH(e,r){return Math.abs(zc(e,r))}function vH(e,r,t){return Math.abs(qc(e,r,t))}function hH(e,r,t){return e.type!=="line"?void 0:Math.sqrt(Math.pow(zc(e,r),2)+Math.pow(qc(e,r,t),2))}function dH(e,r){return L_((ko(e.x1,r)+D_(e)+ko(e.x0,r)+R_(e))/2,r)}function pH(e,r,t){return L_((ko(e.y1,t)+F_(e)+ko(e.y0,t)+P_(e))/2,t)}function gH(e,r,t){return e.type!=="line"?void 0:qc(e,r,t)/zc(e,r)}I_.exports={x0:lH,x1:sH,y0:uH,y1:fH,slope:gH,dx:zc,dy:qc,width:cH,height:vH,length:hH,xcenter:dH,ycenter:pH}});var q_=pe((a0e,z_)=>{"use strict";var yH=zn().overrideAll,kl=Sn(),N_=kn(),mH=Ao().dash,So=Mt().extendFlat,xH=Sa().shapeTexttemplateAttrs,bH=Oc();z_.exports=yH({newshape:{visible:So({},kl.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:So({},kl.legend,{}),legendgroup:So({},kl.legendgroup,{}),legendgrouptitle:{text:So({},kl.legendgrouptitle.text,{}),font:N_({})},legendrank:So({},kl.legendrank,{}),legendwidth:So({},kl.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:So({},mH,{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:So({},kl.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:xH({newshape:!0},{keys:Object.keys(bH)}),font:N_({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var B_=pe((i0e,O_)=>{"use strict";var _H=Ao().dash,wH=Mt().extendFlat;O_.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:wH({},_H,{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 Bc=pe((o0e,U_)=>{"use strict";U_.exports=function(e){var r=e.editType;return{t:{valType:"number",dflt:0,editType:r},r:{valType:"number",dflt:0,editType:r},b:{valType:"number",dflt:0,editType:r},l:{valType:"number",dflt:0,editType:r},editType:r}}});var Ds=pe((l0e,Y_)=>{"use strict";var Sp=kn(),MH=cf(),Uc=Ti(),H_=q_(),V_=B_(),TH=Bc(),G_=Mt().extendFlat,Hc=Sp({editType:"calc"});Hc.family.dflt='"Open Sans", verdana, arial, sans-serif';Hc.size.dflt=12;Hc.color.dflt=Uc.defaultLine;Y_.exports={font:Hc,title:{text:{valType:"string",editType:"layoutstyle"},font:Sp({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Sp({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:G_(TH({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:Uc.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:Uc.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:Uc.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:"plot"},newshape:H_.newshape,activeshape:H_.activeshape,newselection:V_.newselection,activeselection:V_.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:G_({},MH.transition,{editType:"none"})}});var W_=sb(()=>{});var AH={};var X_=sb(()=>{W_()});var Er=pe(Jr=>{"use strict";var Ps=Al(),Z_=Fc(),J_=bp(),kH=wo(),SH=ff().addStyleRule,K_=Mt(),CH=Sn(),EH=Ds(),LH=K_.extendFlat,Cp=K_.extendDeepAll;Jr.modules={};Jr.allCategories={};Jr.allTypes=[];Jr.subplotsRegistry={};Jr.componentsRegistry={};Jr.layoutArrayContainers=[];Jr.layoutArrayRegexes=[];Jr.traceLayoutAttributes={};Jr.localeRegistry={};Jr.apiMethodRegistry={};Jr.collectableSubplotTypes=null;Jr.register=function(r){if(Jr.collectableSubplotTypes=null,r)r&&!Array.isArray(r)&&(r=[r]);else throw new Error("No argument passed to Plotly.register.");for(var t=0;t{"use strict";var NH=ks().timeFormat,l6=rt(),Ep=Al(),Eo=Cs().mod,Ns=nn(),Ca=Ns.BADNUM,na=Ns.ONEDAY,vf=Ns.ONEHOUR,Co=Ns.ONEMIN,Is=Ns.ONESEC,hf=Ns.EPOCHJD,Zi=Er(),r6=ks().utcFormat,zH=/^\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,qH=/^\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,t6=new Date().getFullYear()-70;function Ji(e){return e&&Zi.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Ht.dateTick0=function(e,r){var t=OH(e,!!r);if(r<2)return t;var n=Ht.dateTime2ms(t,e);return n+=na*(r-1),Ht.ms2DateTime(n,0,e)};function OH(e,r){return Ji(e)?r?Zi.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Zi.getComponentMethod("calendars","CANONICAL_TICK")[e]:r?"2000-01-02":"2000-01-01"}Ht.dfltRange=function(e){return Ji(e)?Zi.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Ht.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var Gc,Yc;Ht.dateTime2ms=function(e,r){if(Ht.isJSDate(e)){var t=e.getTimezoneOffset()*Co,n=(e.getUTCMinutes()-e.getMinutes())*Co+(e.getUTCSeconds()-e.getSeconds())*Is+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*Co;t=t-a/2+Eo(n-t+a/2,a)}return e=Number(e)-t,e>=Gc&&e<=Yc?e:Ca}if(typeof e!="string"&&typeof e!="number")return Ca;e=String(e);var o=Ji(r),i=e.charAt(0);o&&(i==="G"||i==="g")&&(e=e.substr(1),r="");var l=o&&r.substr(0,7)==="chinese",u=e.match(l?qH:zH);if(!u)return Ca;var s=u[1],f=u[3]||"1",v=Number(u[5]||1),g=Number(u[7]||0),_=Number(u[9]||0),y=Number(u[11]||0);if(o){if(s.length===2)return Ca;s=Number(s);var w;try{var M=Zi.getComponentMethod("calendars","getCal")(r);if(l){var m=f.charAt(f.length-1)==="i";f=parseInt(f,10),w=M.newDate(s,M.toMonthIndex(s,f,m),v)}else w=M.newDate(s,Number(f),v)}catch(S){return Ca}return w?(w.toJD()-hf)*na+g*vf+_*Co+y*Is:Ca}s.length===2?s=(Number(s)+2e3-t6)%100+t6:s=Number(s),f-=1;var k=new Date(Date.UTC(2e3,f,v,g,_));return k.setUTCFullYear(s),k.getUTCMonth()!==f||k.getUTCDate()!==v?Ca:k.getTime()+y*Is};Gc=Ht.MIN_MS=Ht.dateTime2ms("-9999");Yc=Ht.MAX_MS=Ht.dateTime2ms("9999-12-31 23:59:59.9999");Ht.isDateTime=function(e,r){return Ht.dateTime2ms(e,r)!==Ca};function Fs(e,r){return String(e+Math.pow(10,r)).substr(1)}var Vc=90*na,n6=3*vf,a6=5*Co;Ht.ms2DateTime=function(e,r,t){if(typeof e!="number"||!(e>=Gc&&e<=Yc))return Ca;r||(r=0);var n=Math.floor(Eo(e+.05,1)*10),a=Math.round(e-n/10),o,i,l,u,s,f;if(Ji(t)){var v=Math.floor(a/na)+hf,g=Math.floor(Eo(e,na));try{o=Zi.getComponentMethod("calendars","getCal")(t).fromJD(v).formatDate("yyyy-mm-dd")}catch(_){o=r6("G%Y-%m-%d")(new Date(a))}if(o.charAt(0)==="-")for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;i=r=Gc+na&&e<=Yc-na))return Ca;var r=Math.floor(Eo(e+.05,1)*10),t=new Date(Math.round(e-r/10)),n=NH("%Y-%m-%d")(t),a=t.getHours(),o=t.getMinutes(),i=t.getSeconds(),l=t.getUTCMilliseconds()*10+r;return s6(n,a,o,i,l)};function s6(e,r,t,n,a){if((r||t||n||a)&&(e+=" "+Fs(r,2)+":"+Fs(t,2),(n||a)&&(e+=":"+Fs(n,2),a))){for(var o=4;a%10===0;)o-=1,a/=10;e+="."+Fs(a,o)}return e}Ht.cleanDate=function(e,r,t){if(e===Ca)return r;if(Ht.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Ji(t))return Ep.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(e=Ht.ms2DateTimeLocal(+e),!e&&r!==void 0)return r}else if(!Ht.isDateTime(e,t))return Ep.error("unrecognized date",e),r;return e};var BH=/%\d?f/g,UH=/%h/g,HH={1:"1",2:"1",3:"2",4:"2"};function i6(e,r,t,n){e=e.replace(BH,function(o){var i=Math.min(+o.charAt(1)||6,6),l=(r/1e3%1+2).toFixed(i).substr(2).replace(/0+$/,"")||"0";return l});var a=new Date(Math.floor(r+.05));if(e=e.replace(UH,function(){return HH[t("%q")(a)]}),Ji(n))try{e=Zi.getComponentMethod("calendars","worldCalFmt")(e,r,n)}catch(o){return"Invalid"}return t(e)(a)}var VH=[59,59.9,59.99,59.999,59.9999];function GH(e,r){var t=Eo(e+.05,na),n=Fs(Math.floor(t/vf),2)+":"+Fs(Eo(Math.floor(t/Co),60),2);if(r!=="M"){l6(r)||(r=0);var a=Math.min(Eo(e/Is,60),VH[r]),o=(100+a).toFixed(r).substr(1);r>0&&(o=o.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+o}return n}Ht.formatDate=function(e,r,t,n,a,o){if(a=Ji(a)&&a,!r)if(t==="y")r=o.year;else if(t==="m")r=o.month;else if(t==="d")r=o.dayMonth+` `+o.year;else return GH(e,t)+` -`+i6(o.dayMonthYear,e,n,a);return i6(r,e,n,a)};var o6=3*na;Ht.incrementMonth=function(e,r,t){t=Ji(t)&&t;var n=Eo(e,na);if(e=Math.round(e-n),t)try{var a=Math.round(e/na)+hf,o=Zi.getComponentMethod("calendars","getCal")(t),i=o.fromJD(a);return r%12?o.add(i,r,"m"):o.add(i,r/12,"y"),(i.toJD()-hf)*na+n}catch(u){Ep.error("invalid ms "+e+" in calendar "+t)}var l=new Date(e+o6);return l.setUTCMonth(l.getUTCMonth()+r)+n-o6};Ht.findExactDates=function(e,r){for(var t=0,n=0,a=0,o=0,i,l,u=Ji(r)&&Zi.getComponentMethod("calendars","getCal")(r),s=0;s{"use strict";f6.exports=function(r){return r}});var Dp=pe(Ki=>{"use strict";var YH=rt(),WH=Al(),XH=Lp(),ZH=nn().BADNUM,Rp=1e-9;Ki.findBin=function(e,r,t){if(YH(r.start))return t?Math.ceil((e-r.start)/r.size-Rp)-1:Math.floor((e-r.start)/r.size+Rp);var n=0,a=r.length,o=0,i=a>1?(r[a-1]-r[0])/(a-1):1,l,u;for(i>=0?u=t?JH:KH:u=t?$H:QH,e+=i*Rp*(t?-1:1)*(i>=0?1:-1);n90&&WH.log("Long binary search..."),n-1};function JH(e,r){return er}function $H(e,r){return e>=r}Ki.sorterAsc=function(e,r){return e-r};Ki.sorterDes=function(e,r){return r-e};Ki.distinctVals=function(e){var r=e.slice();r.sort(Ki.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===ZH;t--);for(var n=r[t]-r[0]||1,a=n/(t||1)/1e4,o=[],i,l=0;l<=t;l++){var u=r[l],s=u-i;i===void 0?(o.push(u),i=u):s>a&&(n=Math.min(n,s),o.push(u),i=u)}return{vals:o,minDiff:n}};Ki.roundUp=function(e,r,t){for(var n=0,a=r.length-1,o,i=0,l=t?0:1,u=t?1:0,s=t?Math.ceil:Math.floor;n0&&(n=1),t&&n)return e.sort(r)}return n?e:e.reverse()};Ki.findIndexOfMin=function(e,r){r=r||XH;for(var t=1/0,n,a=0;a{"use strict";c6.exports=function(r){return Object.keys(r).sort()}});var v6=pe(Vt=>{"use strict";var df=rt(),jH=ea().isArrayOrTypedArray;Vt.aggNums=function(e,r,t,n){var a,o;if((!n||n>t.length)&&(n=t.length),df(r)||(r=!1),jH(t[0])){for(o=new Array(n),a=0;ae.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var y6=pe((y0e,g6)=>{"use strict";var h6=Cs(),Pp=h6.mod,eV=h6.modHalf,pf=Math.PI,Lo=2*pf;function rV(e){return e/180*pf}function tV(e){return e/pf*180}function Fp(e){return Math.abs(e[1]-e[0])>Lo-1e-14}function d6(e,r){return eV(r-e,Lo)}function nV(e,r){return Math.abs(d6(e,r))}function p6(e,r){if(Fp(r))return!0;var t,n;r[0]n&&(n+=Lo);var a=Pp(e,Lo),o=a+Lo;return a>=t&&a<=n||o>=t&&o<=n}function aV(e,r,t,n){if(!p6(r,n))return!1;var a,o;return t[0]=a&&e<=o}function Ip(e,r,t,n,a,o,i){a=a||0,o=o||0;var l=Fp([t,n]),u,s,f,v,g;l?(u=0,s=pf,f=Lo):t{"use strict";Sl.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};Sl.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};Sl.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};Sl.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};Sl.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};Sl.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var _6=pe(Cl=>{"use strict";var Np=Cs().mod;Cl.segmentsIntersect=b6;function b6(e,r,t,n,a,o,i,l){var u=t-e,s=a-e,f=i-a,v=n-r,g=o-r,b=l-o,y=u*b-f*v;if(y===0)return null;var w=(s*b-f*g)/y,M=(s*v-u*g)/y;return M<0||M>1||w<0||w>1?null:{x:e+u*w,y:r+v*w}}Cl.segmentDistance=function(r,t,n,a,o,i,l,u){if(b6(r,t,n,a,o,i,l,u))return 0;var s=n-r,f=a-t,v=l-o,g=u-i,b=s*s+f*f,y=v*v+g*g,w=Math.min(Xc(s,f,b,o-r,i-t),Xc(s,f,b,l-r,u-t),Xc(v,g,y,r-o,t-i),Xc(v,g,y,n-o,a-i));return Math.sqrt(w)};function Xc(e,r,t,n,a){var o=n*e+a*r;if(o<0)return n*n+a*a;if(o>t){var i=n-e,l=a-r;return i*i+l*l}else{var u=n*r-a*e;return u*u/t}}var Zc,zp,x6;Cl.getTextLocation=function(r,t,n,a){if((r!==zp||a!==x6)&&(Zc={},zp=r,x6=a),Zc[n])return Zc[n];var o=r.getPointAtLength(Np(n-a/2,t)),i=r.getPointAtLength(Np(n+a/2,t)),l=Math.atan((i.y-o.y)/(i.x-o.x)),u=r.getPointAtLength(Np(n,t)),s=(u.x*4+o.x+i.x)/6,f=(u.y*4+o.y+i.y)/6,v={x:s,y:f,theta:l};return Zc[n]=v,v};Cl.clearLocationCache=function(){zp=null};Cl.getVisibleSegment=function(r,t,n){var a=t.left,o=t.right,i=t.top,l=t.bottom,u=0,s=r.getTotalLength(),f=s,v,g;function b(w){var M=r.getPointAtLength(w);w===0?v=M:w===s&&(g=M);var m=M.xo?M.x-o:0,A=M.yl?M.y-l:0;return Math.sqrt(m*m+A*A)}for(var y=b(u);y;){if(u+=y+n,u>f)return;y=b(u)}for(y=b(f);y;){if(f-=y+n,u>f)return;y=b(f)}return{min:u,max:f,len:f-u,total:s,isClosed:u===0&&f===s&&Math.abs(v.x-g.x)<.1&&Math.abs(v.y-g.y)<.1}};Cl.findPointOnPath=function(r,t,n,a){a=a||{};for(var o=a.pathLength||r.getTotalLength(),i=a.tolerance||.001,l=a.iterationLimit||30,u=r.getPointAtLength(0)[n]>r.getPointAtLength(o)[n]?-1:1,s=0,f=0,v=o,g,b,y;s0?v=g:f=g,s++}return b}});var Jc=pe(gf=>{"use strict";var Qi={};gf.throttle=function(r,t,n){var a=Qi[r],o=Date.now();if(!a){for(var i in Qi)Qi[i].tsa.ts+t){l();return}a.timer=setTimeout(function(){l(),a.timer=null},t)};gf.done=function(e){var r=Qi[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var n=r.onDone;r.onDone=function(){n&&n(),t(),r.onDone=null}})};gf.clear=function(e){if(e)w6(Qi[e]),delete Qi[e];else for(var r in Qi)gf.clear(r)};function w6(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var T6=pe((_0e,M6)=>{"use strict";M6.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var A6=pe((w0e,Kc)=>{"use strict";Kc.exports=qp;Kc.exports.isMobile=qp;Kc.exports.default=qp;var sV=/(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,uV=/CrOS/,fV=/android|ipad|playbook|silk/i;function qp(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=sV.test(r)&&!uV.test(r)||!!e.tablet&&fV.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var S6=pe((M0e,k6)=>{"use strict";var cV=rt(),vV=A6();k6.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=hV(),typeof t!="string")return!0;var n=vV({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var a=t.split(" "),o=1;o-1;l--){var u=a[l];if(u.substr(0,8)==="Version/"){var s=u.substr(8).split(".")[0];if(cV(s)&&(s=+s),s>=13)return!0}}}return n};function hV(){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 E6=pe((T0e,C6)=>{"use strict";var dV=it();C6.exports=function(r,t,n){var a=r.selectAll("g."+n.replace(/\s/g,".")).data(t,function(i){return i[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var o=r.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(i){i[0][o]=dV.select(this)}),a}});var R6=pe((A0e,L6)=>{"use strict";var pV=Er();L6.exports=function(r,t){for(var n=r._context.locale,a=0;a<2;a++){for(var o=r._context.locales,i=0;i<2;i++){var l=(o[n]||{}).dictionary;if(l){var u=l[t];if(u)return u}o=pV.localeRegistry}var s=n.split("-")[0];if(s===n)break;n=s}return t}});var P6=pe((k0e,D6)=>{"use strict";D6.exports=function(r){for(var t={},n=[],a=0,o=0;o{"use strict";F6.exports=function(r){for(var t=mV(r)?yV:gV,n=[],a=0;a{"use strict";N6.exports=function(r,t){if(!t)return r;var n=1/Math.abs(t),a=n>1?(n*r+n*t)/n:r+t,o=String(a).length;if(o>16){var i=String(t).length,l=String(r).length;if(o>=l+i){var u=parseFloat(a).toPrecision(12);u.indexOf("e+")===-1&&(a=+u)}}return a}});var O6=pe((E0e,q6)=>{"use strict";var xV=rt(),bV=nn().BADNUM,_V=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q6.exports=function(r){return typeof r=="string"&&(r=r.replace(_V,"")),xV(r)?Number(r):bV}});var ir=pe((L0e,$6)=>{"use strict";var yf=it(),wV=ks().utcFormat,MV=op().format,Y6=rt(),W6=nn(),X6=W6.FP_SAFE,TV=-X6,B6=W6.BADNUM,Ze=$6.exports={};Ze.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var U6={};Ze.warnBadFormat=function(e){var r=String(e);U6[r]||(U6[r]=1,Ze.warn('encountered bad format: "'+r+'"'))};Ze.noFormat=function(e){return String(e)};Ze.numberFormat=function(e){var r;try{r=MV(Ze.adjustFormat(e))}catch(t){return Ze.warnBadFormat(e),Ze.noFormat}return r};Ze.nestedProperty=Mc();Ze.keyedContainer=Rb();Ze.relativeAttr=Pb();Ze.isPlainObject=wo();Ze.toLogRange=Ac();Ze.relinkPrivateKeys=zb();var Ro=ea();Ze.isArrayBuffer=Ro.isArrayBuffer;Ze.isTypedArray=Ro.isTypedArray;Ze.isArrayOrTypedArray=Ro.isArrayOrTypedArray;Ze.isArray1D=Ro.isArray1D;Ze.ensureArray=Ro.ensureArray;Ze.concat=Ro.concat;Ze.maxRowLength=Ro.maxRowLength;Ze.minRowLength=Ro.minRowLength;var Z6=Cs();Ze.mod=Z6.mod;Ze.modHalf=Z6.modHalf;var Do=t4();Ze.valObjectMeta=Do.valObjectMeta;Ze.coerce=Do.coerce;Ze.coerce2=Do.coerce2;Ze.coerceFont=Do.coerceFont;Ze.coercePattern=Do.coercePattern;Ze.coerceHoverinfo=Do.coerceHoverinfo;Ze.coerceSelectionMarkerOpacity=Do.coerceSelectionMarkerOpacity;Ze.validate=Do.validate;var da=u6();Ze.dateTime2ms=da.dateTime2ms;Ze.isDateTime=da.isDateTime;Ze.ms2DateTime=da.ms2DateTime;Ze.ms2DateTimeLocal=da.ms2DateTimeLocal;Ze.cleanDate=da.cleanDate;Ze.isJSDate=da.isJSDate;Ze.formatDate=da.formatDate;Ze.incrementMonth=da.incrementMonth;Ze.dateTick0=da.dateTick0;Ze.dfltRange=da.dfltRange;Ze.findExactDates=da.findExactDates;Ze.MIN_MS=da.MIN_MS;Ze.MAX_MS=da.MAX_MS;var El=Dp();Ze.findBin=El.findBin;Ze.sorterAsc=El.sorterAsc;Ze.sorterDes=El.sorterDes;Ze.distinctVals=El.distinctVals;Ze.roundUp=El.roundUp;Ze.sort=El.sort;Ze.findIndexOfMin=El.findIndexOfMin;Ze.sortObjectKeys=Wc();var $i=v6();Ze.aggNums=$i.aggNums;Ze.len=$i.len;Ze.mean=$i.mean;Ze.geometricMean=$i.geometricMean;Ze.median=$i.median;Ze.midRange=$i.midRange;Ze.variance=$i.variance;Ze.stdev=$i.stdev;Ze.interp=$i.interp;var Ka=Ic();Ze.init2dArray=Ka.init2dArray;Ze.transposeRagged=Ka.transposeRagged;Ze.dot=Ka.dot;Ze.translationMatrix=Ka.translationMatrix;Ze.rotationMatrix=Ka.rotationMatrix;Ze.rotationXYMatrix=Ka.rotationXYMatrix;Ze.apply3DTransform=Ka.apply3DTransform;Ze.apply2DTransform=Ka.apply2DTransform;Ze.apply2DTransform2=Ka.apply2DTransform2;Ze.convertCssMatrix=Ka.convertCssMatrix;Ze.inverseTransformMatrix=Ka.inverseTransformMatrix;var ki=y6();Ze.deg2rad=ki.deg2rad;Ze.rad2deg=ki.rad2deg;Ze.angleDelta=ki.angleDelta;Ze.angleDist=ki.angleDist;Ze.isFullCircle=ki.isFullCircle;Ze.isAngleInsideSector=ki.isAngleInsideSector;Ze.isPtInsideSector=ki.isPtInsideSector;Ze.pathArc=ki.pathArc;Ze.pathSector=ki.pathSector;Ze.pathAnnulus=ki.pathAnnulus;var qs=m6();Ze.isLeftAnchor=qs.isLeftAnchor;Ze.isCenterAnchor=qs.isCenterAnchor;Ze.isRightAnchor=qs.isRightAnchor;Ze.isTopAnchor=qs.isTopAnchor;Ze.isMiddleAnchor=qs.isMiddleAnchor;Ze.isBottomAnchor=qs.isBottomAnchor;var Os=_6();Ze.segmentsIntersect=Os.segmentsIntersect;Ze.segmentDistance=Os.segmentDistance;Ze.getTextLocation=Os.getTextLocation;Ze.clearLocationCache=Os.clearLocationCache;Ze.getVisibleSegment=Os.getVisibleSegment;Ze.findPointOnPath=Os.findPointOnPath;var jc=Mt();Ze.extendFlat=jc.extendFlat;Ze.extendDeep=jc.extendDeep;Ze.extendDeepAll=jc.extendDeepAll;Ze.extendDeepNoArrays=jc.extendDeepNoArrays;var Op=Al();Ze.log=Op.log;Ze.warn=Op.warn;Ze.error=Op.error;var AV=Es();Ze.counterRegex=AV.counter;var Bp=Jc();Ze.throttle=Bp.throttle;Ze.throttleDone=Bp.done;Ze.clearThrottle=Bp.clear;var Qa=ff();Ze.getGraphDiv=Qa.getGraphDiv;Ze.isPlotDiv=Qa.isPlotDiv;Ze.removeElement=Qa.removeElement;Ze.addStyleRule=Qa.addStyleRule;Ze.addRelatedStyleRule=Qa.addRelatedStyleRule;Ze.deleteRelatedStyleRule=Qa.deleteRelatedStyleRule;Ze.setStyleOnHover=Qa.setStyleOnHover;Ze.getFullTransformMatrix=Qa.getFullTransformMatrix;Ze.getElementTransformMatrix=Qa.getElementTransformMatrix;Ze.getElementAndAncestors=Qa.getElementAndAncestors;Ze.equalDomRects=Qa.equalDomRects;Ze.clearResponsive=T6();Ze.preserveDrawingBuffer=S6();Ze.makeTraceGroups=E6();Ze._=R6();Ze.notifier=yp();Ze.filterUnique=P6();Ze.filterVisible=I6();Ze.pushUnique=bp();Ze.increment=z6();Ze.cleanNumber=O6();Ze.ensureNumber=function(r){return Y6(r)?(r=Number(r),r>X6||r=r?!1:Y6(e)&&e>=0&&e%1===0};Ze.noop=Fc();Ze.identity=Lp();Ze.repeat=function(e,r){for(var t=new Array(r),n=0;nt?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};Ze.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};Ze.simpleMap=function(e,r,t,n,a){for(var o=e.length,i=new Array(o),l=0;l=Math.pow(2,t)?a>10?(Ze.warn("randstr failed uniqueness"),i):e(r,t,n,(a||0)+1):i};Ze.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(n){n[r]=e,t[n.name]=n,t.optionList.push(n)},t["_"+r]=e,t};Ze.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,n=2*t,a=2*r-1,o=new Array(a),i=new Array(t),l,u,s,f;for(l=0;l=n&&(s-=n*Math.floor(s/n)),s<0?s=-1-s:s>=t&&(s=n-1-s),f+=e[s]*o[u];i[l]=f}return i};Ze.syncOrAsync=function(e,r,t){var n,a;function o(){return Ze.syncOrAsync(e,r,t)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(r),n&&n.then)return n.then(o);return t&&t(r)};Ze.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};Ze.noneOrAll=function(e,r,t){if(e){var n=!1,a=!0,o,i;for(o=0;o0?a:0})};Ze.fillArray=function(e,r,t,n){if(n=n||Ze.identity,Ze.isArrayOrTypedArray(e))for(var a=0;a1?a+i[1]:"";if(o&&(i.length>1||l.length>4||t))for(;n.test(l);)l=l.replace(n,"$1"+o+"$2");return l+u};Ze.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Q6=/^\w*$/;Ze.templateString=function(e,r){var t={};return e.replace(Ze.TEMPLATE_STRING_REGEX,function(n,a){var o;return Q6.test(a)?o=r[a]:(t[a]=t[a]||Ze.nestedProperty(r,a).get,o=t[a]()),Ze.isValidTextValue(o)?o:""})};var RV={max:10,count:0,name:"hovertemplate"};Ze.hovertemplateString=function(){return Up.apply(RV,arguments)};var DV={max:10,count:0,name:"texttemplate"};Ze.texttemplateString=function(){return Up.apply(DV,arguments)};var PV=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function FV(e){var r=e.match(PV);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var IV={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ze.texttemplateStringForShapes=function(){return Up.apply(IV,arguments)};var H6=/^[:|\|]/;function Up(e,r,t){var n=this,a=arguments;r||(r={});var o={};return e.replace(Ze.TEMPLATE_STRING_REGEX,function(i,l,u){var s=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",g=l==="xother_"||l==="yother_",b=s||f||g||v,y=l;(f||v)&&(y=y.substring(1)),(g||v)&&(y=y.substring(0,y.length-1));var w=null,M=null;if(n.parseMultDiv){var m=FV(y);y=m.key,w=m.op,M=m.number}var A;if(b){if(A=r[y],A===void 0)return""}else{var S,x;for(x=3;x=$c&&i<=V6,s=l>=$c&&l<=V6;if(u&&(n=10*n+i-$c),s&&(a=10*a+l-$c),!u||!s){if(n!==a)return n-a;if(i!==l)return i-l}}return a-n};var zs=2e9;Ze.seedPseudoRandom=function(){zs=2e9};Ze.pseudoRandom=function(){var e=zs;return zs=(69069*zs+1)%4294967296,Math.abs(zs-e)<429496729?Ze.pseudoRandom():zs/4294967296};Ze.fillText=function(e,r,t){var n=Array.isArray(t)?function(i){t.push(i)}:function(i){t.text=i},a=Ze.extractOption(e,r,"htx","hovertext");if(Ze.isValidTextValue(a))return n(a);var o=Ze.extractOption(e,r,"tx","text");if(Ze.isValidTextValue(o))return n(o)};Ze.isValidTextValue=function(e){return e||e===0};Ze.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",n=0;n1&&(s=1):s=0,Ze.strTranslate(a-s*(t+i),o-s*(n+l))+Ze.strScale(s)+(u?"rotate("+u+(r?"":" "+t+" "+n)+")":"")};Ze.setTransormAndDisplay=function(e,r){e.attr("transform",Ze.getTextTransform(r)),e.style("display",r.scale?null:"none")};Ze.ensureUniformFontSize=function(e,r){var t=Ze.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};Ze.join2=function(e,r,t){var n=e.length;return n>1?e.slice(0,-1).join(r)+t+e[n-1]:e.join(r)};Ze.bigFont=function(e){return Math.round(1.2*e)};var G6=Ze.getFirefoxVersion(),NV=G6!==null&&G6<86;Ze.getPositionFromD3Event=function(){return NV?[yf.event.layerX,yf.event.layerY]:[yf.event.offsetX,yf.event.offsetY]}});var rw=pe(()=>{"use strict";var zV=ir(),j6={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Hp in j6)ew=Hp.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),zV.addStyleRule(ew,j6[Hp]);var ew,Hp});var Vp=pe((P0e,tw)=>{tw.exports=!0});var Yp=pe((F0e,nw)=>{"use strict";var qV=Vp(),Gp;typeof window.matchMedia=="function"?Gp=!window.matchMedia("(hover: none)").matches:Gp=qV;nw.exports=Gp});var tv=pe((I0e,Wp)=>{"use strict";var Bs=typeof Reflect=="object"?Reflect:null,aw=Bs&&typeof Bs.apply=="function"?Bs.apply:function(r,t,n){return Function.prototype.apply.call(r,t,n)},ev;Bs&&typeof Bs.ownKeys=="function"?ev=Bs.ownKeys:Object.getOwnPropertySymbols?ev=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:ev=function(r){return Object.getOwnPropertyNames(r)};function OV(e){console&&console.warn&&console.warn(e)}var ow=Number.isNaN||function(r){return r!==r};function Tt(){Tt.init.call(this)}Wp.exports=Tt;Wp.exports.once=VV;Tt.EventEmitter=Tt;Tt.prototype._events=void 0;Tt.prototype._eventsCount=0;Tt.prototype._maxListeners=void 0;var iw=10;function rv(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Tt,"defaultMaxListeners",{enumerable:!0,get:function(){return iw},set:function(e){if(typeof e!="number"||e<0||ow(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");iw=e}});Tt.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};Tt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||ow(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function lw(e){return e._maxListeners===void 0?Tt.defaultMaxListeners:e._maxListeners}Tt.prototype.getMaxListeners=function(){return lw(this)};Tt.prototype.emit=function(r){for(var t=[],n=1;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var u=o[r];if(u===void 0)return!1;if(typeof u=="function")aw(u,this,t);else for(var s=u.length,f=vw(u,s),n=0;n0&&i.length>a&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=i.length,OV(l)}return e}Tt.prototype.addListener=function(r,t){return sw(this,r,t,!1)};Tt.prototype.on=Tt.prototype.addListener;Tt.prototype.prependListener=function(r,t){return sw(this,r,t,!0)};function BV(){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 uw(e,r,t){var n={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},a=BV.bind(n);return a.listener=t,n.wrapFn=a,a}Tt.prototype.once=function(r,t){return rv(t),this.on(r,uw(this,r,t)),this};Tt.prototype.prependOnceListener=function(r,t){return rv(t),this.prependListener(r,uw(this,r,t)),this};Tt.prototype.removeListener=function(r,t){var n,a,o,i,l;if(rv(t),a=this._events,a===void 0)return this;if(n=a[r],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete a[r],a.removeListener&&this.emit("removeListener",r,n.listener||t));else if(typeof n!="function"){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){l=n[i].listener,o=i;break}if(o<0)return this;o===0?n.shift():UV(n,o),n.length===1&&(a[r]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};Tt.prototype.off=Tt.prototype.removeListener;Tt.prototype.removeAllListeners=function(r){var t,n,a;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[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var o=Object.keys(n),i;for(a=0;a=0;a--)this.removeListener(r,t[a]);return this};function fw(e,r,t){var n=e._events;if(n===void 0)return[];var a=n[r];return a===void 0?[]:typeof a=="function"?t?[a.listener||a]:[a]:t?HV(a):vw(a,a.length)}Tt.prototype.listeners=function(r){return fw(this,r,!0)};Tt.prototype.rawListeners=function(r){return fw(this,r,!1)};Tt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):cw.call(e,r)};Tt.prototype.listenerCount=cw;function cw(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Tt.prototype.eventNames=function(){return this._eventsCount>0?ev(this._events):[]};function vw(e,r){for(var t=new Array(r),n=0;n{"use strict";var Xp=tv().EventEmitter,YV={init:function(e){if(e._ev instanceof Xp)return e;var r=new Xp,t=new Xp;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(n,a){r.emit(n,a),t.emit(n,a)},e},triggerHandler:function(e,r,t){var n,a=e._ev;if(!a)return;var o=a._events[r];if(!o)return;function i(u){if(u.listener){if(a.removeListener(r,u.listener),!u.fired)return u.fired=!0,u.listener.apply(a,[t])}else return u.apply(a,[t])}o=Array.isArray(o)?o:[o];var l;for(l=0;l{"use strict";var pw=ir(),WV=Tl().dfltConfig;function XV(e,r){for(var t=[],n,a=0;aWV.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};ji.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};ji.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};ji.undo=function(r){var t,n;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n{"use strict";mw.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var Vs=pe(jt=>{"use strict";var Ea=Er(),xf=ir(),av=Sn(),Jp=Ds(),ZV=Zp(),JV=cf(),KV=Tl().configAttributes,xw=zn(),$a=xf.extendDeepAll,Us=xf.isPlainObject,QV=xf.isArrayOrTypedArray,iv=xf.nestedProperty,$V=xf.valObjectMeta,Kp="_isSubplotObj",ov="_isLinkedToArray",jV="_arrayAttrRegexps",_w="_deprecated",Qp=[Kp,ov,jV,_w];jt.IS_SUBPLOT_OBJ=Kp;jt.IS_LINKED_TO_ARRAY=ov;jt.DEPRECATED=_w;jt.UNDERSCORE_ATTRS=Qp;jt.get=function(){var e={};return Ea.allTypes.forEach(function(r){e[r]=rG(r)}),{defs:{valObjects:$V,metaKeys:Qp.concat(["description","role","editType","impliedEdits"]),editType:{traces:xw.traces,layout:xw.layout},impliedEdits:{}},traces:e,layout:tG(),frames:nG(),animation:Hs(JV),config:Hs(KV)}};jt.crawl=function(e,r,t,n){var a=t||0;n=n||"",Object.keys(e).forEach(function(o){var i=e[o];if(Qp.indexOf(o)===-1){var l=(n?n+".":"")+o;r(i,o,e,a,l),!jt.isValObject(i)&&Us(i)&&o!=="impliedEdits"&&jt.crawl(i,r,a+1,l)}})};jt.isValObject=function(e){return e&&e.valType!==void 0};jt.findArrayAttributes=function(e){var r=[],t=[],n=[],a,o;function i(u,s,f,v){t=t.slice(0,v).concat([s]),n=n.slice(0,v).concat([u&&u._isLinkedToArray]);var g=u&&(u.valType==="data_array"||u.arrayOk===!0)&&!(t[v-1]==="colorbar"&&(s==="ticktext"||s==="tickvals"));g&&l(a,0,"")}function l(u,s,f){var v=u[t[s]],g=f+t[s];if(s===t.length-1)QV(v)&&r.push(o+g);else if(n[s]){if(Array.isArray(v))for(var b=0;b=o.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var i=r[t];if(!nv(i))return!1;e=o[a][i]}else e=o[a]}else e=o}}return e}function nv(e){return e===Math.round(e)&&e>=0}function rG(e){var r,t;r=Ea.modules[e]._module,t=r.basePlotModule;var n={};n.type=null;var a=$a({},av),o=$a({},r.attributes);jt.crawl(o,function(u,s,f,v,g){iv(a,g).set(void 0),u===void 0&&iv(o,g).set(void 0)}),$a(n,a),Ea.traceIs(e,"noOpacity")&&delete n.opacity,Ea.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),Ea.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),r.selectPoints||delete n.selectedpoints,$a(n,o),t.attributes&&$a(n,t.attributes),n.type=e;var i={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:Hs(n)};if(r.layoutAttributes){var l={};$a(l,r.layoutAttributes),i.layoutAttributes=Hs(l)}return r.animatable||jt.crawl(i,function(u){jt.isValObject(u)&&"anim"in u&&delete u.anim}),i}function tG(){var e={},r,t;$a(e,Jp);for(r in Ea.subplotsRegistry)if(t=Ea.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var n=0;n{"use strict";var Gs=ir(),sG=Sn(),Po="templateitemname",$p={name:{valType:"string",editType:"none"}};$p[Po]={valType:"string",editType:"calc"};Ll.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=$p.name,r[Po]=$p[Po],r};Ll.traceTemplater=function(e){var r={},t,n;for(t in e)n=e[t],Array.isArray(n)&&n.length&&(r[t]=0);function a(o){t=Gs.coerce(o,{},sG,"type");var i={type:t,_template:null};if(t in r){n=e[t];var l=r[t]%n.length;r[t]++,i._template=n[l]}return i}return{newTrace:a}};Ll.newContainer=function(e,r,t){var n=e._template,a=n&&(n[r]||t&&n[t]);Gs.isPlainObject(a)||(a=null);var o=e[r]={_template:a};return o};Ll.arrayTemplater=function(e,r,t){var n=e._template,a=n&&n[Tw(r)],o=n&&n[r];(!Array.isArray(o)||!o.length)&&(o=[]);var i={};function l(s){var f={name:s.name,_input:s},v=f[Po]=s[Po];if(!Mw(v))return f._template=a,f;for(var g=0;g=n&&(t._input||{})._templateitemname;o&&(a=n);var i=r+"["+a+"]",l;function u(){l={},o&&(l[i]={},l[i][Po]=o)}u();function s(b,y){l[b]=y}function f(b,y){o?Gs.nestedProperty(l[i],b).set(y):l[i+"."+b]=y}function v(){var b=l;return u(),b}function g(b,y){b&&f(b,y);var w=v();for(var M in w)Gs.nestedProperty(e,M).set(w[M])}return{modifyBase:s,modifyItem:f,getUpdateObj:v,applyUpdate:g}}});var wn=pe((U0e,Aw)=>{"use strict";var bf=Es().counter;Aw.exports={idRegex:{x:bf("x","( domain)?"),y:bf("y","( domain)?")},attrRegex:bf("[xy]axis"),xAxisMatch:bf("xaxis"),yAxisMatch:bf("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 on=pe(aa=>{"use strict";var uG=Er(),jp=wn();aa.id2name=function(r){if(!(typeof r!="string"||!r.match(jp.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};aa.name2id=function(r){if(r.match(jp.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};aa.cleanId=function(r,t,n){var a=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(jp.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(a&&!n)){var o=r.split(" ")[0].substr(1).replace(/^0+/,"");return o==="1"&&(o=""),r.charAt(0)+o+(a&&n?" domain":"")}};aa.list=function(e,r,t){var n=e._fullLayout;if(!n)return[];var a=aa.listIds(e,r),o=new Array(a.length),i;for(i=0;in?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};aa.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function kw(e,r){if(r&&r.length){for(var t=0;t{"use strict";function fG(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function cG(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Sw.exports={clearOutlineControllers:fG,clearOutline:cG}});var lv=pe((G0e,Cw)=>{"use strict";Cw.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var _f=pe(uv=>{"use strict";var sv=Er(),Y0e=wn().SUBPLOT_PATTERN;uv.getSubplotCalcData=function(e,r,t){var n=sv.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,o=[],i=0;i{"use strict";var vG=Er(),Ys=ir();Rl.manageCommandObserver=function(e,r,t,n){var a={},o=!0;r&&r._commandObserver&&(a=r._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var i=Rl.hasSimpleAPICommandBindings(e,t,a.lookupTable);if(r&&r._commandObserver){if(i)return a;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,a}if(i){Ew(e,i,a.cache),a.check=function(){if(o){var f=Ew(e,i,a.cache);return f.changed&&n&&a.lookupTable[f.value]!==void 0&&(a.disable(),Promise.resolve(n({value:f.value,type:i.type,prop:i.prop,traces:i.traces,index:a.lookupTable[f.value]})).then(a.enable,a.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u0?".":"")+a;Ys.isPlainObject(o)?eg(o,r,i,n+1):r(i,a,o)}})}});var ln=pe((Z0e,Ww)=>{"use strict";var Ow=it(),dG=ks().timeFormatLocale,pG=op().formatLocale,wf=rt(),gG=lp(),ot=Er(),Bw=Vs(),yG=gt(),xr=ir(),Uw=Zr(),Pw=nn().BADNUM,ia=on(),mG=Fo().clearOutline,xG=lv(),rg=cf(),bG=Zp(),_G=_f().getModuleCalcData,Fw=xr.relinkPrivateKeys,Dl=xr._,cr=Ww.exports={};xr.extendFlat(cr,ot);cr.attributes=Sn();cr.attributes.type.values=cr.allTypes;cr.fontAttrs=kn();cr.layoutAttributes=Ds();var cv=Dw();cr.executeAPICommand=cv.executeAPICommand;cr.computeAPICommandBindings=cv.computeAPICommandBindings;cr.manageCommandObserver=cv.manageCommandObserver;cr.hasSimpleAPICommandBindings=cv.hasSimpleAPICommandBindings;cr.redrawText=function(e){return e=xr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(ot.getComponentMethod("annotations","draw")(e),ot.getComponentMethod("legend","draw")(e),ot.getComponentMethod("colorbar","draw")(e),r(cr.previousPromises(e)))},300)})};cr.resize=function(e){e=xr.getGraphDiv(e);var r,t=new Promise(function(n,a){(!e||xr.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||xr.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var o=e.changed;e.autoplay=!0,ot.call("relayout",e,{autosize:!0}).then(function(){e.changed=o,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return r&&r(t),t};cr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};cr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=xr.ensureSingle(r._paper,"text","js-plot-link-container",function(u){u.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Uw.defaultLine,"pointer-events":"all"}).each(function(){var s=Ow.select(this);s.append("tspan").classed("js-link-to-tool",!0),s.append("tspan").classed("js-link-spacer",!0),s.append("tspan").classed("js-sourcelinks",!0)})}),n=t.node(),a={y:r._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=r.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=r._paper.attr("width")-7),t.attr(a);var o=t.select(".js-link-to-tool"),i=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&wG(e,o),i.text(o.text()&&l.text()?" - ":"")}};function wG(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){cr.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),a=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}cr.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=Ow.select(e).append("div").attr("id","hiddenform").style("display","none"),n=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),a=n.append("input").attr({type:"text",name:"data"});return a.node().value=cr.graphJson(e,!1,"keepdata"),n.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var MG=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],TG=["year","month","dayMonth","dayMonthYear"];cr.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},o=e.layout||{},i=e._fullData||[],l=e._fullData=[],u=e.data||[],s=e.calcdata||[],f=e._context||{},v;e._transitionData||cr.createTransitionData(e),a._dfltTitle={plot:Dl(e,"Click to enter Plot title"),subtitle:Dl(e,"Click to enter Plot subtitle"),x:Dl(e,"Click to enter X axis title"),y:Dl(e,"Click to enter Y axis title"),colorbar:Dl(e,"Click to enter Colorscale title"),annotation:Dl(e,"new text")},a._traceWord=Dl(e,"trace");var g=Iw(e,MG);if(a._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var b=n.width,y=n.height;cr.supplyLayoutGlobalDefaults(o,a,g),o.width||(a.width=b),o.height||(a.height=y),cr.sanitizeMargins(a)}else{cr.supplyLayoutGlobalDefaults(o,a,g);var w=!o.width||!o.height,M=a.autosize,m=f.autosizable,A=w&&(M||m);A?cr.plotAutoSize(e,o,a):w&&cr.sanitizeMargins(a),!M&&w&&(o.width=a.width,o.height=a.height)}a._d3locale=SG(g,a.separators),a._extraFormat=Iw(e,TG),a._initialAutoSizeIsDone=!0,a._dataLength=u.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var S=a._subplots=kG(),x=a._splomAxes={x:{},y:{}},T=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=AG(i,u),cr.supplyDataDefaults(u,l,o,a);var d=Object.keys(x.x),_=Object.keys(x.y);if(d.length>1&&_.length>1){for(ot.getComponentMethod("grid","sizeDefaults")(o,a),v=0;v15&&_.length>15&&a.shapes.length===0&&a.images.length===0,cr.linkSubplots(l,a,i,n),cr.cleanPlot(l,a,i,n);var R=!!(n._has&&n._has("cartesian")),E=!!(a._has&&a._has("cartesian")),D=R,N=E;D&&!N?n._bgLayer.remove():N&&!D&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&mG({_fullLayout:n}),CG(l,a),Fw(a,n),ot.getComponentMethod("colorscale","crossTraceDefaults")(l,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var I=a._tracePreGUI,F={},L;for(L in I)F[L]="old";for(v=0;v0){var f=1-2*o;i=Math.round(f*i),l=Math.round(f*l)}}var v=cr.layoutAttributes.width.min,g=cr.layoutAttributes.height.min;i1,y=!t.height&&Math.abs(n.height-l)>1;(y||b)&&(b&&(n.width=i),y&&(n.height=l)),r._initialAutoSize||(r._initialAutoSize={width:i,height:l}),cr.sanitizeMargins(n)};cr.supplyLayoutModuleDefaults=function(e,r,t,n){var a=ot.componentsRegistry,o=r._basePlotModules,i,l,u,s=ot.subplotsRegistry.cartesian;for(i in a)u=a[i],u.includeBasePlot&&u.includeBasePlot(e,r);o.length||o.push(s),r._has("cartesian")&&(ot.getComponentMethod("grid","contentDefaults")(e,r),s.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(xr.subplotSort);for(l=0;l1&&(t.l/=M,t.r/=M)}if(g){var m=(t.t+t.b)/g;m>1&&(t.t/=m,t.b/=m)}var A=t.xl!==void 0?t.xl:t.x,S=t.xr!==void 0?t.xr:t.x,x=t.yt!==void 0?t.yt:t.y,T=t.yb!==void 0?t.yb:t.y;b[r]={l:{val:A,size:t.l+w},r:{val:S,size:t.r+w},b:{val:T,size:t.b+w},t:{val:x,size:t.t+w}},y[r]=1}if(!n._replotting)return cr.doAutoMargin(e)}};function LG(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=ia.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}cr.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,n=r.height;r._size||(r._size={}),Hw(r);var a=r._size,o=r.margin,i={t:0,b:0,l:0,r:0},l=xr.extendFlat({},a),u=o.l,s=o.r,f=o.t,v=o.b,g=r._pushmargin,b=r._pushmarginIds,y=r.minreducedwidth,w=r.minreducedheight;if(o.autoexpand!==!1){for(var M in g)b[M]||delete g[M];var m=e._fullLayout._reservedMargin;for(var A in m)for(var S in m[A]){var x=m[A][S];i[S]=Math.max(i[S],x)}g.base={l:{val:0,size:u},r:{val:1,size:s},t:{val:1,size:f},b:{val:0,size:v}};for(var T in i){var d=0;for(var _ in g)_!=="base"&&wf(g[_][T].size)&&(d=g[_][T].size>d?g[_][T].size:d);var p=Math.max(0,o[T]-d);i[T]=Math.max(0,i[T]-p)}for(var c in g){var k=g[c].l||{},h=g[c].b||{},R=k.val,E=k.size,D=h.val,N=h.size,I=t-i.r-i.l,F=n-i.t-i.b;for(var L in g){if(wf(E)&&g[L].r){var P=g[L].r.val,O=g[L].r.size;if(P>R){var U=(E*P+(O-I)*R)/(P-R),X=(O*(1-R)+(E-I)*(1-P))/(P-R);U+X>u+s&&(u=U,s=X)}}if(wf(N)&&g[L].t){var j=g[L].t.val,$=g[L].t.size;if(j>D){var Y=(N*j+($-F)*D)/(j-D),q=($*(1-D)+(N-F)*(1-j))/(j-D);Y+q>v+f&&(v=Y,f=q)}}}}}var Z=xr.constrain(t-o.l-o.r,Vw,y),ne=xr.constrain(n-o.t-o.b,Gw,w),Q=Math.max(0,t-Z),oe=Math.max(0,n-ne);if(Q){var ee=(u+s)/Q;ee>1&&(u/=ee,s/=ee)}if(oe){var G=(v+f)/oe;G>1&&(v/=G,f/=G)}if(a.l=Math.round(u)+i.l,a.r=Math.round(s)+i.r,a.t=Math.round(f)+i.t,a.b=Math.round(v)+i.b,a.p=Math.round(o.pad),a.w=Math.round(t)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!r._replotting&&(cr.didMarginChange(l,a)||LG(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var re=3*(1+Object.keys(b).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};cr.graphJson=function(e,r,t,n,a,o){(a&&r&&!e._fullData||a&&!r&&!e._fullLayout)&&cr.supplyDefaults(e);var i=a?e._fullData:e.data,l=a?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function s(g,b){if(typeof g=="function")return b?"_function_":null;if(xr.isPlainObject(g)){var y={},w;return Object.keys(g).sort().forEach(function(S){if(["_","["].indexOf(S.charAt(0))===-1){if(typeof g[S]=="function"){b&&(y[S]="_function");return}if(t==="keepdata"){if(S.substr(S.length-3)==="src")return}else if(t==="keepstream"){if(w=g[S+"src"],typeof w=="string"&&w.indexOf(":")>0&&!xr.isPlainObject(g.stream))return}else if(t!=="keepall"&&(w=g[S+"src"],typeof w=="string"&&w.indexOf(":")>0))return;y[S]=s(g[S],b)}}),y}var M=Array.isArray(g),m=xr.isTypedArray(g);if((M||m)&&g.dtype&&g.shape){var A=g.bdata;return s({dtype:g.dtype,shape:g.shape,bdata:xr.isArrayBuffer(A)?gG.encode(A):A},b)}return M?g.map(function(S){return s(S,b)}):m?xr.simpleMap(g,xr.identity):xr.isJSDate(g)?xr.ms2DateTimeLocal(+g):g}var f={data:(i||[]).map(function(g){var b=s(g);return r&&delete b.fit,b})};if(!r&&(f.layout=s(l),a)){var v=l._size;f.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return u&&(f.frames=s(u)),o&&(f.config=s(e._context,!0)),n==="object"?f:JSON.stringify(f)};cr.modifyFrames=function(e,r){var t,n,a,o=e._transitionData._frames,i=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return ot.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var g=0,b=0;function y(){return g++,function(){b++,!n&&b===g&&l(v)}}t.runFn(y),setTimeout(y())})}function l(v){if(e._transitionData)return o(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return ot.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(v)}function u(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var s=[cr.previousPromises,u,t.prepareFn,cr.rehover,cr.reselect,i],f=xr.syncOrAsync(s,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}cr.doCalcdata=function(e,r){var t=ia.list(e),n=e._fullData,a=e._fullLayout,o,i,l,u,s=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=s,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},l=0;l=0;u--)if(T[u].enabled){o._indexToPoints=T[u]._indexToPoints;break}i&&i.calc&&(x=i.calc(e,o))}(!Array.isArray(x)||!x[0])&&(x=[{x:Pw,y:Pw}]),x[0].t||(x[0].t={}),x[0].trace=o,s[A]=x}}for(zw(t,n,a),l=0;l{"use strict";Pl.xmlns="http://www.w3.org/2000/xmlns/";Pl.svg="http://www.w3.org/2000/svg";Pl.xlink="http://www.w3.org/1999/xlink";Pl.svgAttrs={xmlns:Pl.svg,"xmlns:xlink":Pl.xlink}});var qn=pe((K0e,Xw)=>{"use strict";Xw.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 Yn=pe(La=>{"use strict";var Yt=it(),eo=ir(),FG=eo.strTranslate,tg=Io(),IG=qn().LINE_SPACING,NG=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;La.convertToTspans=function(e,r,t){var n=e.text(),a=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&n.match(NG),o=Yt.select(e.node().parentNode);if(o.empty())return;var i=e.attr("class")?e.attr("class").split(" ")[0]:"text";i+="-math",o.selectAll("svg."+i).remove(),o.selectAll("g."+i+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function l(){o.empty()||(i=e.attr("class")+"-math",o.select("svg."+i).remove()),e.text("").style("white-space","pre");var u=JG(e.node(),n);u&&e.style("pointer-events","all"),La.positionText(e),t&&t.call(e)}return a?(r&&r._promises||[]).push(new Promise(function(u){e.style("display","none");var s=parseInt(e.node().style.fontSize,10),f={fontSize:s};BG(a[2],f,function(v,g,b){o.selectAll("svg."+i).remove(),o.selectAll("g."+i+"-group").remove();var y=v&&v.select("svg");if(!y||!y.node()){l(),u();return}var w=o.append("g").classed(i+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});w.node().appendChild(y.node()),g&&g.node()&&y.node().insertBefore(g.node().cloneNode(!0),y.node().firstChild);var M=b.width,m=b.height;y.attr({class:i,height:m,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var A=e.node().style.fill||"black",S=y.select("g");S.attr({fill:A,stroke:A});var x=S.node().getBoundingClientRect(),T=x.width,d=x.height;(T>M||d>m)&&(y.style("overflow","hidden"),x=y.node().getBoundingClientRect(),T=x.width,d=x.height);var _=+e.attr("x"),p=+e.attr("y"),c=s||e.node().getBoundingClientRect().height,k=-c/4;if(i[0]==="y")w.attr({transform:"rotate("+[-90,_,p]+")"+FG(-T/2,k-d/2)});else if(i[0]==="l")p=k-d/2;else if(i[0]==="a"&&i.indexOf("atitle")!==0)_=0,p=k;else{var h=e.attr("text-anchor");_=_-T*(h==="middle"?.5:h==="end"?1:0),p=p+k-d/2}y.attr({x:_,y:p}),t&&t.call(e,w),u(w)})})):l(),e};var zG=/(<|<|<)/g,qG=/(>|>|>)/g;function OG(e){return e.replace(zG,"\\lt ").replace(qG,"\\gt ")}var Zw=[["$","$"],["\\(","\\)"]];function BG(e,r,t){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){eo.warn("No MathJax version:",MathJax.version);return}var a,o,i,l,u=function(){return o=eo.extendDeepAll({},MathJax.Hub.config),i=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:Zw},displayAlign:"left"})},s=function(){o=eo.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Zw},f=function(){if(a=MathJax.Hub.config.menuSettings.renderer,a!=="SVG")return MathJax.Hub.setRenderer("SVG")},v=function(){a=MathJax.config.startup.output,a!=="svg"&&(MathJax.config.startup.output="svg")},g=function(){var A="math-output-"+eo.randstr({},64);l=Yt.select("body").append("div").attr({id:A}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(OG(e));var S=l.node();return n===2?MathJax.Hub.Typeset(S):MathJax.typeset([S])},b=function(){var A=l.select(n===2?".MathJax_SVG":".MathJax"),S=!A.empty()&&l.select("svg").node();if(!S)eo.log("There was an error in the tex syntax.",e),t();else{var x=S.getBoundingClientRect(),T;n===2?T=Yt.select("body").select("#MathJax_SVG_glyphs"):T=A.select("defs"),t(A,T,x)}l.remove()},y=function(){if(a!=="SVG")return MathJax.Hub.setRenderer(a)},w=function(){a!=="svg"&&(MathJax.config.startup.output=a)},M=function(){return i!==void 0&&(MathJax.Hub.processSectionDelay=i),MathJax.Hub.Config(o)},m=function(){MathJax.config=o};n===2?MathJax.Hub.Queue(u,f,g,b,y,M):n===3&&(s(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){g(),b(),w(),m()}))}var $w={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"},UG={sub:"0.3em",sup:"-0.6em"},HG={sub:"-0.21em",sup:"0.42em"},Jw="\u200B",Kw=["http:","https:","mailto:","",void 0,":"],jw=La.NEWLINES=/(\r\n?|\n)/g,ag=/(<[^<>]*>)/,ig=/<(\/?)([^ >]*)(\s+(.*))?>/i,VG=//i;La.BR_TAG_ALL=//gi;var e7=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,r7=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,t7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,GG=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Fl(e,r){if(!e)return null;var t=e.match(r),n=t&&(t[3]||t[4]);return n&&vv(n)}var YG=/(^|;)\s*color:/;La.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,n=r.allowedTags!==void 0?r.allowedTags:["br"],a="...",o=a.length,i=e.split(ag),l=[],u="",s=0,f=0;fo?l.push(v.substr(0,w-o)+a):l.push(v.substr(0,w));break}u=""}}return l.join("")};var WG={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},XG=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function vv(e){return e.replace(XG,function(r,t){var n;return t.charAt(0)==="#"?n=ZG(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):n=WG[t],n||r})}La.convertEntities=vv;function ZG(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function JG(e,r){r=r.replace(jw," ");var t=!1,n=[],a,o=-1;function i(){o++;var d=document.createElementNS(tg.svg,"tspan");Yt.select(d).attr({class:"line",dy:o*IG+"em"}),e.appendChild(d),a=d;var _=n;if(n=[{node:d}],_.length>1)for(var p=1;p<_.length;p++)l(_[p])}function l(d){var _=d.type,p={},c;if(_==="a"){c="a";var k=d.target,h=d.href,R=d.popup;h&&(p={"xlink:xlink:show":k==="_blank"||k.charAt(0)!=="_"?"new":"replace",target:k,"xlink:xlink:href":h},R&&(p.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+R+'");return false;'))}else c="tspan";d.style&&(p.style=d.style);var E=document.createElementNS(tg.svg,c);if(_==="sup"||_==="sub"){u(a,Jw),a.appendChild(E);var D=document.createElementNS(tg.svg,"tspan");u(D,Jw),Yt.select(D).attr("dy",HG[_]),p.dy=UG[_],a.appendChild(E),a.appendChild(D)}else a.appendChild(E);Yt.select(E).attr(p),a=d.node=E,n.push(d)}function u(d,_){d.appendChild(document.createTextNode(_))}function s(d){if(n.length===1){eo.log("Ignoring unexpected end tag .",r);return}var _=n.pop();d!==_.type&&eo.log("Start tag <"+_.type+"> doesnt match end tag <"+d+">. Pretending it did match.",r),a=n[n.length-1].node}var f=VG.test(r);f?i():(a=e,n=[{node:e}]);for(var v=r.split(ag),g=0;g{"use strict";var KG=it(),dv=ka(),Tf=rt(),hv=ir(),a7=Zr(),QG=wl().isValid;function $G(e,r,t){var n=r?hv.nestedProperty(e,r).get()||{}:e,a=n[t||"color"];a&&a._inputArray&&(a=a._inputArray);var o=!1;if(hv.isArrayOrTypedArray(a)){for(var i=0;i=0;n--,a++){var o=e[n];t[a]=[1-o[0],o[1]]}return t}function f7(e,r){r=r||{};for(var t=e.domain,n=e.range,a=n.length,o=new Array(a),i=0;i{"use strict";var v7=Ap(),eY=v7.FORMAT_LINK,rY=v7.DATE_FORMAT_LINK;function tY(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?og:h7)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function og(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+eY+"."].join(" ")}function h7(e,r){return og(e,r)+[" And for dates see: "+rY+".","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(" ")}d7.exports={axisHoverFormat:tY,descriptionOnlyNumbers:og,descriptionWithDates:h7}});var Ra=pe((ece,R7)=>{"use strict";var p7=kn(),Ws=Ti(),L7=Ao().dash,sg=Mt().extendFlat,g7=gt().templatedArray,y7=ro().descriptionWithDates,nY=nn().ONEDAY,Ci=wn(),aY=Ci.HOUR_PATTERN,iY=Ci.WEEKDAY_PATTERN,lg={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},oY=sg({},lg,{values:lg.values.slice().concat(["sync"])});function m7(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var x7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},b7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},_7={valType:"data_array",editType:"ticks"},w7={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function M7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function T7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var A7={valType:"color",dflt:Ws.defaultLine,editType:"ticks"},k7={valType:"color",dflt:Ws.lightLine,editType:"ticks"};function S7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var C7=sg({},L7,{editType:"ticks"}),E7={valType:"boolean",editType:"ticks"};R7.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Ws.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:p7({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Ci.idRegex.x.toString(),Ci.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:[Ci.idRegex.x.toString(),Ci.idRegex.y.toString()],editType:"calc"},rangebreaks:g7("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:[iY,aY,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:nY},editType:"calc"}),tickmode:oY,nticks:m7(),tick0:x7,dtick:b7,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:_7,ticktext:{valType:"data_array",editType:"ticks"},ticks:w7,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:M7(),tickwidth:T7(),tickcolor:A7,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:sg({},L7,{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:p7({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:y7("tick label")},tickformatstops:g7("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:y7("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Ws.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:E7,gridcolor:k7,gridwidth:S7(),griddash:C7,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Ws.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Ws.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Ci.idRegex.x.toString(),Ci.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Ci.idRegex.x.toString(),Ci.idRegex.y.toString()],editType:"plot"},minor:{tickmode:lg,nticks:m7("minor"),tick0:x7,dtick:b7,tickvals:_7,ticks:w7,ticklen:M7("minor"),tickwidth:T7("minor"),tickcolor:A7,gridcolor:k7,gridwidth:S7("minor"),griddash:C7,showgrid:E7,editType:"ticks"},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 pv=pe((rce,F7)=>{"use strict";var At=Ra(),D7=kn(),P7=Mt().extendFlat,lY=zn().overrideAll;F7.exports=lY({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:At.linecolor,outlinewidth:At.linewidth,bordercolor:At.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:At.minor.tickmode,nticks:At.nticks,tick0:At.tick0,dtick:At.dtick,tickvals:At.tickvals,ticktext:At.ticktext,ticks:P7({},At.ticks,{dflt:""}),ticklabeloverflow:P7({},At.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:At.ticklen,tickwidth:At.tickwidth,tickcolor:At.tickcolor,ticklabelstep:At.ticklabelstep,showticklabels:At.showticklabels,labelalias:At.labelalias,tickfont:D7({}),tickangle:At.tickangle,tickformat:At.tickformat,tickformatstops:At.tickformatstops,tickprefix:At.tickprefix,showtickprefix:At.showtickprefix,ticksuffix:At.ticksuffix,showticksuffix:At.showticksuffix,separatethousands:At.separatethousands,exponentformat:At.exponentformat,minexponent:At.minexponent,showexponent:At.showexponent,title:{text:{valType:"string"},font:D7({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var ja=pe((nce,N7)=>{"use strict";var sY=pv(),uY=Es().counter,fY=Wc(),I7=wl().scales,tce=fY(I7);function gv(e){return"`"+e+"`"}N7.exports=function(r,t){r=r||"",t=t||{};var n=t.cLetter||"c",a="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,o="noScale"in t?t.noScale:r==="marker.line",i="showScaleDflt"in t?t.showScaleDflt:n==="z",l=typeof t.colorscaleDflt=="string"?I7[t.colorscaleDflt]:null,u=t.editTypeOverride||"",s=r?r+".":"",f,v;"colorAttr"in t?(f=t.colorAttr,v=t.colorAttr):(f={z:"z",c:"color"}[n],v="in "+gv(s+f));var g=a?" Has an effect only if "+v+" is set to a numerical array.":"",b=n+"auto",y=n+"min",w=n+"max",M=n+"mid",m=gv(s+b),A=gv(s+y),S=gv(s+w),x=A+" and "+S,T={};T[y]=T[w]=void 0;var d={};d[b]=!1;var _={};return f==="color"&&(_.color={valType:"color",arrayOk:!0,editType:u||"style"},t.anim&&(_.color.anim=!0)),_[b]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},_[y]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:d},_[w]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:d},_[M]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},_.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},_.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},_.reversescale={valType:"boolean",dflt:!1,editType:"plot"},o||(_.showscale={valType:"boolean",dflt:i,editType:"calc"},_.colorbar=sY),t.noColorAxis||(_.coloraxis={valType:"subplotid",regex:uY("coloraxis"),dflt:null,editType:"calc"}),_}});var fg=pe((ace,z7)=>{"use strict";var cY=Mt().extendFlat,vY=ja(),ug=wl().scales;z7.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:ug.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:ug.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:ug.RdBu,editType:"calc"}},coloraxis:cY({_isSubplotObj:!0,editType:"calc"},vY("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var cg=pe((ice,q7)=>{"use strict";var hY=ir();q7.exports=function(r){return hY.isPlainObject(r.colorbar)}});var dg=pe(hg=>{"use strict";var vg=rt(),O7=ir(),B7=nn(),dY=B7.ONEDAY,pY=B7.ONEWEEK;hg.dtick=function(e,r){var t=r==="log",n=r==="date",a=r==="category",o=n?dY:1;if(!e)return o;if(vg(e))return e=Number(e),e<=0?o:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||t))return o;var i=e.charAt(0),l=e.substr(1);return l=vg(l)?Number(l):0,l<=0||!(n&&i==="M"&&l===Math.round(l)||t&&i==="L"||t&&i==="D"&&(l===1||l===2))?o:e};hg.tick0=function(e,r,t,n){if(r==="date")return O7.cleanDate(e,O7.dateTick0(t,n%pY===0?1:0));if(!(n==="D1"||n==="D2"))return vg(e)?Number(e):0}});var pg=pe((lce,H7)=>{"use strict";var U7=dg(),gY=ir().isArrayOrTypedArray,yY=ea().isTypedArraySpec,mY=ea().decodeTypedArraySpec;H7.exports=function(r,t,n,a,o){o||(o={});var i=o.isMinor,l=i?r.minor||{}:r,u=i?t.minor:t,s=i?"minor.":"";function f(A){var S=l[A];return yY(S)&&(S=mY(S)),S!==void 0?S:(u._template||{})[A]}var v=f("tick0"),g=f("dtick"),b=f("tickvals"),y=gY(b)?"array":g?"linear":"auto",w=n(s+"tickmode",y);if(w==="auto"||w==="sync")n(s+"nticks");else if(w==="linear"){var M=u.dtick=U7.dtick(g,a);u.tick0=U7.tick0(v,a,t.calendar,M)}else if(a!=="multicategory"){var m=n(s+"tickvals");m===void 0?u.tickmode="auto":i||n("ticktext")}}});var yg=pe((sce,G7)=>{"use strict";var gg=ir(),V7=Ra();G7.exports=function(r,t,n,a){var o=a.isMinor,i=o?r.minor||{}:r,l=o?t.minor:t,u=o?V7.minor:V7,s=o?"minor.":"",f=gg.coerce2(i,l,u,"ticklen",o?(t.ticklen||5)*.6:void 0),v=gg.coerce2(i,l,u,"tickwidth",o?t.tickwidth||1:void 0),g=gg.coerce2(i,l,u,"tickcolor",(o?t.tickcolor:void 0)||l.color),b=n(s+"ticks",!o&&a.outerTicks||f||v||g?"outside":"");b||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var mg=pe((uce,Y7)=>{"use strict";Y7.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],n=t.filter(function(o){return r[o]!==void 0}),a=function(o){return r[o]===r[n[0]]};if(n.every(a)||n.length===1)return r[n[0]]}});var ei=pe((fce,W7)=>{"use strict";var yv=ir(),xY=gt();W7.exports=function(r,t,n){var a=n.name,o=n.inclusionAttr||"visible",i=t[a],l=yv.isArrayOrTypedArray(r[a])?r[a]:[],u=t[a]=[],s=xY.arrayTemplater(t,a,o),f,v;for(f=0;f{"use strict";var xg=ir(),bY=Zr().contrast,X7=Ra(),_Y=mg(),wY=ei();Z7.exports=function(r,t,n,a,o){o||(o={});var i=n("labelalias");xg.isPlainObject(i)||delete t.labelalias;var l=_Y(r),u=n("showticklabels");if(u){o.noTicklabelshift||n("ticklabelshift"),o.noTicklabelstandoff||n("ticklabelstandoff");var s=o.font||{},f=t.color,v=t.ticklabelposition||"",g=v.indexOf("inside")!==-1?bY(o.bgColor):f&&f!==X7.color.dflt?f:s.color;if(xg.coerceFont(n,"tickfont",s,{overrideDflt:{color:g}}),!o.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!o.noAng){var b=n("tickangle");!o.noAutotickangles&&b==="auto"&&n("autotickangles")}if(a!=="category"){var y=n("tickformat");wY(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:MY}),t.tickformatstops.length||delete t.tickformatstops,!o.noExp&&!y&&a!=="date"&&(n("showexponent",l),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function MY(e,r){function t(a,o){return xg.coerce(e,r,X7.tickformatstops,a,o)}var n=t("enabled");n&&(t("dtickrange"),t("value"))}});var _g=pe((vce,J7)=>{"use strict";var TY=mg();J7.exports=function(r,t,n,a,o){o||(o={});var i=o.tickSuffixDflt,l=TY(r),u=n("tickprefix");u&&n("showtickprefix",l);var s=n("ticksuffix",i);s&&n("showticksuffix",l)}});var wg=pe((hce,K7)=>{"use strict";var No=ir(),AY=gt(),kY=pg(),SY=yg(),CY=bg(),EY=_g(),LY=pv();K7.exports=function(r,t,n){var a=AY.newContainer(t,"colorbar"),o=r.colorbar||{};function i(h,R){return No.coerce(o,a,LY,h,R)}var l=n.margin||{t:0,b:0,l:0,r:0},u=n.width-l.l-l.r,s=n.height-l.t-l.b,f=i("orientation"),v=f==="v",g=i("thicknessmode");i("thickness",g==="fraction"?30/(v?u:s):30);var b=i("lenmode");i("len",b==="fraction"?1:v?s:u);var y=i("yref"),w=i("xref"),M=y==="paper",m=w==="paper",A,S,x,T="left";v?(x="middle",T=m?"left":"right",A=m?1.02:1,S=.5):(x=M?"bottom":"top",T="center",A=.5,S=M?1.02:1),No.coerce(o,a,{x:{valType:"number",min:m?-2:0,max:m?3:1,dflt:A}},"x"),No.coerce(o,a,{y:{valType:"number",min:M?-2:0,max:M?3:1,dflt:S}},"y"),i("xanchor",T),i("xpad"),i("yanchor",x),i("ypad"),No.noneOrAll(o,a,["x","y"]),i("outlinecolor"),i("outlinewidth"),i("bordercolor"),i("borderwidth"),i("bgcolor");var d=No.coerce(o,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");i("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":"hide past div"),kY(o,a,i,"linear");var _=n.font,p={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:_};d.indexOf("inside")!==-1&&(p.bgColor="black"),EY(o,a,i,"linear",p),CY(o,a,i,"linear",p),SY(o,a,i,"linear",p),i("title.text",n._dfltTitle.colorbar);var c=a.showticklabels?a.tickfont:_,k=No.extendFlat({},_,{family:c.family,size:No.bigFont(c.size)});No.coerceFont(i,"title.font",k),i("title.side",v?"top":"right")}});var Ei=pe((dce,j7)=>{"use strict";var Q7=rt(),Tg=ir(),RY=cg(),DY=wg(),$7=wl().isValid,PY=Er().traceIs;function Mg(e,r){var t=r.slice(0,r.length-1);return r?Tg.nestedProperty(e,t).get()||{}:e}j7.exports=function e(r,t,n,a,o){var i=o.prefix,l=o.cLetter,u="_module"in t,s=Mg(r,i),f=Mg(t,i),v=Mg(t._template||{},i)||{},g=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,n,a,o)};if(u){var b=n._colorAxes||{},y=a(i+"coloraxis");if(y){var w=PY(t,"contour")&&Tg.nestedProperty(t,"contours.coloring").get()||"heatmap",M=b[y];M?(M[2].push(g),M[0]!==w&&(M[0]=!1,Tg.warn(["Ignoring coloraxis:",y,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[y]=[w,t,[g]];return}}var m=s[l+"min"],A=s[l+"max"],S=Q7(m)&&Q7(A)&&m{"use strict";var e8=ir(),FY=gt(),r8=fg(),IY=Ei();t8.exports=function(r,t){function n(v,g){return e8.coerce(r,t,r8,v,g)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=t._colorAxes,o,i;function l(v,g){return e8.coerce(o,i,r8.coloraxis,v,g)}for(var u in a){var s=a[u];if(s[0])o=r[u]||{},i=FY.newContainer(t,u,"coloraxis"),i._name=u,IY(o,i,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var NY=ir(),zY=Si().hasColorscale,qY=Si().extractOpts;a8.exports=function(r,t){function n(f,v){var g=f["_"+v];g!==void 0&&(f[v]=g)}function a(f,v){var g=v.container?NY.nestedProperty(f,v.container).get():f;if(g)if(g.coloraxis)g._colorAx=t[g.coloraxis];else{var b=qY(g),y=b.auto;(y||b.min===void 0)&&n(g,v.min),(y||b.max===void 0)&&n(g,v.max),b.autocolorscale&&n(g,"colorscale")}}for(var o=0;o{"use strict";var o8=rt(),Ag=ir(),OY=Si().extractOpts;l8.exports=function(r,t,n){var a=r._fullLayout,o=n.vals,i=n.containerStr,l=i?Ag.nestedProperty(t,i).get():t,u=OY(l),s=u.auto!==!1,f=u.min,v=u.max,g=u.mid,b=function(){return Ag.aggNums(Math.min,null,o)},y=function(){return Ag.aggNums(Math.max,null,o)};if(f===void 0?f=b():s&&(l._colorAx&&o8(f)?f=Math.min(f,b()):f=b()),v===void 0?v=y():s&&(l._colorAx&&o8(v)?v=Math.max(v,y()):v=y()),s&&g!==void 0&&(v-g>g-f?f=g-(v-g):v-g=0?w=a.colorscale.sequential:w=a.colorscale.sequentialminus,u._sync("colorscale",w)}}});var Li=pe((mce,s8)=>{"use strict";var mv=wl(),Xs=Si();s8.exports={moduleType:"component",name:"colorscale",attributes:ja(),layoutAttributes:fg(),supplyLayoutDefaults:n8(),handleDefaults:Ei(),crossTraceDefaults:i8(),calc:zo(),scales:mv.scales,defaultScale:mv.defaultScale,getScale:mv.get,isValidScale:mv.isValid,hasColorscale:Xs.hasColorscale,extractOpts:Xs.extractOpts,extractScale:Xs.extractScale,flipScale:Xs.flipScale,makeColorScaleFunc:Xs.makeColorScaleFunc,makeColorScaleFuncFromTrace:Xs.makeColorScaleFuncFromTrace}});var oa=pe((xce,f8)=>{"use strict";var u8=ir(),BY=ea().isTypedArraySpec;f8.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 r=e.marker;return u8.isPlainObject(r)&&(u8.isArrayOrTypedArray(r.size)||BY(r.size))}}});var kg=pe((bce,c8)=>{"use strict";var UY=rt();c8.exports=function(r,t){t||(t=2);var n=r.marker,a=n.sizeref||1,o=n.sizemin||0,i=n.sizemode==="area"?function(l){return Math.sqrt(l/a)}:function(l){return l/a};return function(l){var u=i(l/t);return UY(u)&&u>0?Math.max(u,o):0}}});var to=pe(Cn=>{"use strict";var v8=ir();Cn.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Cn.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&t.index{p8.exports=WY;var Sg={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},YY=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function WY(e){var r=[];return e.replace(YY,function(t,n,a){var o=n.toLowerCase();for(a=ZY(a),o=="m"&&a.length>2&&(r.push([n].concat(a.splice(0,2))),o="l",n=n=="m"?"l":"L");;){if(a.length==Sg[o])return a.unshift(n),r.push(a);if(a.length{"use strict";var JY=Cg(),sr=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},Fr="M0,0Z",g8=Math.sqrt(2),qo=Math.sqrt(3),Eg=Math.PI,Lg=Math.cos,Rg=Math.sin;_8.exports={circle:{n:0,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return t?Nr(r,t,a):a}},square:{n:1,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.3,2);return Nr(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.4,2),a=sr(e*1.2,2);return Nr(r,t,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.8/g8,2),a="l"+n+","+n,o="l"+n+",-"+n,i="l-"+n+",-"+n,l="l-"+n+","+n;return Nr(r,t,"M0,"+n+a+o+i+o+i+l+i+l+a+l+a+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M-"+n+","+a+"H"+n+"L0,-"+o+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M-"+n+",-"+a+"H"+n+"L0,"+o+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M"+a+",-"+n+"V"+n+"L-"+o+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M-"+a+",-"+n+"V"+n+"L"+o+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.951,2),a=sr(e*.588,2),o=sr(-e,2),i=sr(e*-.309,2),l=sr(e*.809,2);return Nr(r,t,"M"+n+","+i+"L"+a+","+l+"H-"+a+"L-"+n+","+i+"L0,"+o+"Z")}},hexagon:{n:14,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e/2,2),o=sr(e*qo/2,2);return Nr(r,t,"M"+o+",-"+a+"V"+a+"L0,"+n+"L-"+o+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e/2,2),o=sr(e*qo/2,2);return Nr(r,t,"M-"+a+","+o+"H"+a+"L"+n+",0L"+a+",-"+o+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.924,2),a=sr(e*.383,2);return Nr(r,t,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,r,t){if(Ir(r))return Fr;var n=e*1.4,a=sr(n*.225,2),o=sr(n*.951,2),i=sr(n*.363,2),l=sr(n*.588,2),u=sr(-n,2),s=sr(n*-.309,2),f=sr(n*.118,2),v=sr(n*.809,2),g=sr(n*.382,2);return Nr(r,t,"M"+a+","+s+"H"+o+"L"+i+","+f+"L"+l+","+v+"L0,"+g+"L-"+l+","+v+"L-"+i+","+f+"L-"+o+","+s+"H-"+a+"L0,"+u+"Z")}},hexagram:{n:18,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.66,2),a=sr(e*.38,2),o=sr(e*.76,2);return Nr(r,t,"M-"+o+",0l-"+a+",-"+n+"h"+o+"l"+a+",-"+n+"l"+a+","+n+"h"+o+"l-"+a+","+n+"l"+a+","+n+"h-"+o+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+o+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*qo*.8,2),a=sr(e*.8,2),o=sr(e*1.6,2),i=sr(e*4,2),l="A "+i+","+i+" 0 0 1 ";return Nr(r,t,"M-"+n+","+a+l+n+","+a+l+"0,-"+o+l+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*qo*.8,2),a=sr(e*.8,2),o=sr(e*1.6,2),i=sr(e*4,2),l="A "+i+","+i+" 0 0 1 ";return Nr(r,t,"M"+n+",-"+a+l+"-"+n+",-"+a+l+"0,"+o+l+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.1,2),a=sr(e*2,2),o="A "+a+","+a+" 0 0 1 ";return Nr(r,t,"M-"+n+",-"+n+o+"-"+n+","+n+o+n+","+n+o+n+",-"+n+o+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2),a=sr(e*1.9,2),o="A "+a+","+a+" 0 0 1 ";return Nr(r,t,"M-"+n+",0"+o+"0,"+n+o+n+",0"+o+"0,-"+n+o+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.7,2),a=sr(e*1.4,2);return Nr(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2),a=sr(e*.7,2);return Nr(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e/g8,2);return Nr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"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,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e*1.3,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e*1.3,2),a=sr(e*.65,2);return Nr(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2);return Nr(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*.85,2);return Nr(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e/2,2),a=sr(e,2);return Nr(r,t,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M-"+n+","+o+"L0,0M"+n+","+o+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M-"+n+",-"+o+"L0,0M"+n+",-"+o+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M"+o+","+n+"L0,0M"+o+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M-"+o+","+n+"L0,0M-"+o+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2);return Nr(r,t,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2);return Nr(r,t,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(Ir(r))return Fr;var n=Eg/2.5,a=2*e*Lg(n),o=2*e*Rg(n);return Nr(r,t,"M0,0L"+-a+","+o+"L"+a+","+o+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(Ir(r))return Fr;var n=Eg/4,a=2*e*Lg(n),o=2*e*Rg(n);return Nr(r,t,"M0,0L"+-a+","+o+"A "+2*e+","+2*e+" 0 0 1 "+a+","+o+"Z")},backoff:.4,noDot:!0}};function Ir(e){return e===null}var y8,m8,x8,b8;function Nr(e,r,t){if((!e||e%360===0)&&!r)return t;if(x8===e&&b8===r&&y8===t)return m8;x8=e,b8=r,y8=t;function n(M,m){var A=Lg(M),S=Rg(M),x=m[0],T=m[1]+(r||0);return[x*A-T*S,x*S+T*A]}for(var a=e/180*Eg,o=0,i=0,l=JY(t),u="",s=0;s{"use strict";var sn=it(),pt=ir(),KY=pt.numberFormat,ql=rt(),zg=ka(),bv=Er(),Mn=Zr(),QY=Li(),kf=pt.strTranslate,_v=Yn(),$Y=Io(),jY=qn(),eW=jY.LINE_SPACING,D8=Dc().DESELECTDIM,rW=oa(),tW=kg(),nW=to().appendArrayPointValue,ur=H8.exports={};ur.font=function(e,r){var t=r.variant,n=r.style,a=r.weight,o=r.color,i=r.size,l=r.family,u=r.shadow,s=r.lineposition,f=r.textcase;l&&e.style("font-family",l),i+1&&e.style("font-size",i+"px"),o&&e.call(Mn.fill,o),a&&e.style("font-weight",a),n&&e.style("font-style",n),t&&e.style("font-variant",t),f&&e.style("text-transform",Dg(iW(f))),u&&e.style("text-shadow",u==="auto"?_v.makeTextShadow(Mn.contrast(o)):Dg(u)),s&&e.style("text-decoration-line",Dg(oW(s)))};function Dg(e){return e==="none"?void 0:e}var aW={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function iW(e){return aW[e]}function oW(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ur.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};ur.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};ur.setRect=function(e,r,t,n,a){e.call(ur.setPosition,r,t).call(ur.setSize,n,a)};ur.translatePoint=function(e,r,t,n){var a=t.c2p(e.x),o=n.c2p(e.y);if(ql(a)&&ql(o)&&r.node())r.node().nodeName==="text"?r.attr("x",a).attr("y",o):r.attr("transform",kf(a,o));else return!1;return!0};ur.translatePoints=function(e,r,t){e.each(function(n){var a=sn.select(this);ur.translatePoint(n,a,r,t)})};ur.hideOutsideRangePoint=function(e,r,t,n,a,o){r.attr("display",t.isPtWithinRange(e,a)&&n.isPtWithinRange(e,o)?null:"none")};ur.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,n=r.yaxis;e.each(function(a){var o=a[0].trace,i=o.xcalendar,l=o.ycalendar,u=bv.traceIs(o,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each(function(s){ur.hideOutsideRangePoint(s,sn.select(this),t,n,i,l)})})}};ur.crispRound=function(e,r,t){return!r||!ql(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};ur.singleLineStyle=function(e,r,t,n,a){r.style("fill","none");var o=(((e||[])[0]||{}).trace||{}).line||{},i=t||o.width||0,l=a||o.dash||"";Mn.stroke(r,n||o.color),ur.dashLine(r,l,i)};ur.lineGroupStyle=function(e,r,t,n){e.style("fill","none").each(function(a){var o=(((a||[])[0]||{}).trace||{}).line||{},i=r||o.width||0,l=n||o.dash||"";sn.select(this).call(Mn.stroke,t||o.color).call(ur.dashLine,l,i)})};ur.dashLine=function(e,r,t){t=+t||0,r=ur.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};ur.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function P8(e,r,t,n){var a=r.fillpattern,o=r.fillgradient,i=a&&ur.getPatternAttr(a.shape,0,"");if(i){var l=ur.getPatternAttr(a.bgcolor,0,null),u=ur.getPatternAttr(a.fgcolor,0,null),s=a.fgopacity,f=ur.getPatternAttr(a.size,0,8),v=ur.getPatternAttr(a.solidity,0,.3),g=r.uid;ur.pattern(e,"point",t,g,i,f,v,void 0,a.fillmode,l,u,s)}else if(o&&o.type!=="none"){var b=o.type,y="scatterfill-"+r.uid;if(n&&(y="legendfill-"+r.uid),!n&&(o.start!==void 0||o.stop!==void 0)){var w,M;b==="horizontal"?(w={x:o.start,y:0},M={x:o.stop,y:0}):b==="vertical"&&(w={x:0,y:o.start},M={x:0,y:o.stop}),w.x=r._xA.c2p(w.x===void 0?r._extremes.x.min[0].val:w.x,!0),w.y=r._yA.c2p(w.y===void 0?r._extremes.y.min[0].val:w.y,!0),M.x=r._xA.c2p(M.x===void 0?r._extremes.x.max[0].val:M.x,!0),M.y=r._yA.c2p(M.y===void 0?r._extremes.y.max[0].val:M.y,!0),e.call(N8,t,y,"linear",o.colorscale,"fill",w,M,!0,!1)}else b==="horizontal"&&(b=b+"reversed"),e.call(ur.gradient,t,y,b,o.colorscale,"fill")}else r.fillcolor&&e.call(Mn.fill,r.fillcolor)}ur.singleFillStyle=function(e,r){var t=sn.select(e.node()),n=t.data(),a=((n[0]||[])[0]||{}).trace||{};P8(e,a,r,!1)};ur.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(n){var a=sn.select(this);n[0].trace&&P8(a,n[0].trace,r,t)})};var M8=w8();ur.symbolNames=[];ur.symbolFuncs=[];ur.symbolBackOffs=[];ur.symbolNeedLines={};ur.symbolNoDot={};ur.symbolNoFill={};ur.symbolList=[];Object.keys(M8).forEach(function(e){var r=M8[e],t=r.n;ur.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),ur.symbolNames[t]=e,ur.symbolFuncs[t]=r.f,ur.symbolBackOffs[t]=r.backoff||0,r.needLine&&(ur.symbolNeedLines[t]=!0),r.noDot?ur.symbolNoDot[t]=!0:ur.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(ur.symbolNoFill[t]=!0)});var lW=ur.symbolNames.length,sW="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ur.symbolNumber=function(e){if(ql(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=ur.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=lW||e>=400?0:Math.floor(Math.max(e,0))};function F8(e,r,t,n){var a=e%100;return ur.symbolFuncs[a](r,t,n)+(e>=200?sW:"")}var T8=KY("~f"),I8={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}};ur.gradient=function(e,r,t,n,a,o){var i=I8[n];return N8(e,r,t,i.type,a,o,i.start,i.stop,!1,i.reversed)};function N8(e,r,t,n,a,o,i,l,u,s){var f=a.length,v;n==="linear"?v={node:"linearGradient",attrs:{x1:i.x,y1:i.y,x2:l.x,y2:l.y,gradientUnits:u?"userSpaceOnUse":"objectBoundingBox"},reversed:s}:n==="radial"&&(v={node:"radialGradient",reversed:s});for(var g=new Array(f),b=0;b=0&&e.i===void 0&&(e.i=o.i),r.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?i.opacity:e.mo),n.ms2mrc){var u;e.ms==="various"||i.size==="various"?u=3:u=n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var s=ur.symbolNumber(e.mx||i.symbol)||0;e.om=s%200>=100;var f=Bg(e,t),v=Og(e,t);r.attr("d",F8(s,u,f,v))}var g=!1,b,y,w;if(e.so)w=l.outlierwidth,y=l.outliercolor,b=i.outliercolor;else{var M=(l||{}).width;w=(e.mlw+1||M+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?y=e.mlcc=n.lineScale(e.mlc):pt.isArrayOrTypedArray(l.color)?y=Mn.defaultLine:y=l.color,pt.isArrayOrTypedArray(i.color)&&(b=Mn.defaultLine,g=!0),"mc"in e?b=e.mcc=n.markerScale(e.mc):b=i.color||i.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(b=n.selectedColorFn(e))}if(e.om)r.call(Mn.stroke,b).style({"stroke-width":(w||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:w)+"px");var m=i.gradient,A=e.mgt;A?g=!0:A=m&&m.type,pt.isArrayOrTypedArray(A)&&(A=A[0],I8[A]||(A=0));var S=i.pattern,x=S&&ur.getPatternAttr(S.shape,e.i,"");if(A&&A!=="none"){var T=e.mgc;T?g=!0:T=m.color;var d=t.uid;g&&(d+="-"+e.i),ur.gradient(r,a,d,A,[[0,T],[1,b]],"fill")}else if(x){var _=!1,p=S.fgcolor;!p&&o&&o.color&&(p=o.color,_=!0);var c=ur.getPatternAttr(p,e.i,o&&o.color||null),k=ur.getPatternAttr(S.bgcolor,e.i,null),h=S.fgopacity,R=ur.getPatternAttr(S.size,e.i,8),E=ur.getPatternAttr(S.solidity,e.i,.3);_=_||e.mcc||pt.isArrayOrTypedArray(S.shape)||pt.isArrayOrTypedArray(S.bgcolor)||pt.isArrayOrTypedArray(S.fgcolor)||pt.isArrayOrTypedArray(S.size)||pt.isArrayOrTypedArray(S.solidity);var D=t.uid;_&&(D+="-"+e.i),ur.pattern(r,"point",a,D,x,R,E,e.mcc,S.fillmode,k,c,h)}else pt.isArrayOrTypedArray(b)?Mn.fill(r,b[e.i]):Mn.fill(r,b);w&&Mn.stroke(r,y)}};ur.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=ur.tryColorscale(t,""),r.lineScale=ur.tryColorscale(t,"line"),bv.traceIs(e,"symbols")&&(r.ms2mrc=rW.isBubble(e)?tW(e):function(){return(t.size||6)/2}),e.selectedpoints&&pt.extendFlat(r,ur.makeSelectedPointStyleFns(e)),r};ur.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.marker||{},o=t.marker||{},i=n.marker||{},l=a.opacity,u=o.opacity,s=i.opacity,f=u!==void 0,v=s!==void 0;(pt.isArrayOrTypedArray(l)||f||v)&&(r.selectedOpacityFn=function(x){var T=x.mo===void 0?a.opacity:x.mo;return x.selected?f?u:T:v?s:D8*T});var g=a.color,b=o.color,y=i.color;(b||y)&&(r.selectedColorFn=function(x){var T=x.mcc||g;return x.selected?b||T:y||T});var w=a.size,M=o.size,m=i.size,A=M!==void 0,S=m!==void 0;return bv.traceIs(e,"symbols")&&(A||S)&&(r.selectedSizeFn=function(x){var T=x.mrc||w/2;return x.selected?A?M/2:T:S?m/2:T}),r};ur.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.textfont||{},o=t.textfont||{},i=n.textfont||{},l=a.color,u=o.color,s=i.color;return r.selectedTextColorFn=function(f){var v=f.tc||l;return f.selected?u||v:s||(u?v:Mn.addOpacity(v,D8))},r};ur.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=ur.makeSelectedPointStyleFns(r),n=r.marker||{},a=[];t.selectedOpacityFn&&a.push(function(o,i){o.style("opacity",t.selectedOpacityFn(i))}),t.selectedColorFn&&a.push(function(o,i){Mn.fill(o,t.selectedColorFn(i))}),t.selectedSizeFn&&a.push(function(o,i){var l=i.mx||n.symbol||0,u=t.selectedSizeFn(i);o.attr("d",F8(ur.symbolNumber(l),u,Bg(i,r),Og(i,r))),i.mrc2=u}),a.length&&e.each(function(o){for(var i=sn.select(this),l=0;l0?t:0}ur.textPointStyle=function(e,r,t){if(e.size()){var n;if(r.selectedpoints){var a=ur.makeSelectedTextStyleFns(r);n=a.selectedTextColorFn}var o=r.texttemplate,i=t._fullLayout;e.each(function(l){var u=sn.select(this),s=o?pt.extractOption(l,r,"txt","texttemplate"):pt.extractOption(l,r,"tx","text");if(!s&&s!==0){u.remove();return}if(o){var f=r._module.formatLabels,v=f?f(l,r,i):{},g={};nW(g,r,l.i);var b=r._meta||{};s=pt.texttemplateString(s,v,i._d3locale,g,l,b)}var y=l.tp||r.textposition,w=q8(l,r),M=n?n(l):l.tc||r.textfont.color;u.call(ur.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:w,color:M}).text(s).call(_v.convertToTspans,t).call(z8,y,w,l.mrc)})}};ur.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=ur.makeSelectedTextStyleFns(r);e.each(function(n){var a=sn.select(this),o=t.selectedTextColorFn(n),i=n.tp||r.textposition,l=q8(n,r);Mn.fill(a,o);var u=bv.traceIs(r,"bar-like");z8(a,i,l,n.mrc2||n.mrc,u)})}};var A8=.5;ur.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],n=[],a;for(a=1;a=u||x>=f&&x<=u)&&(T<=v&&T>=s||T>=v&&T<=s)&&(e=[x,T])}return e}ur.applyBackoff=U8;ur.makeTester=function(){var e=pt.ensureSingleById(sn.select("body"),"svg","js-plotly-tester",function(t){t.attr($Y.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=pt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ur.tester=e,ur.testref=r};ur.savedBBoxes={};var Fg=0,cW=1e4;ur.bBox=function(e,r,t){t||(t=k8(e));var n;if(t){if(n=ur.savedBBoxes[t],n)return pt.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(t=k8(a),t){var o=+a.getAttribute("x")||0,i=+a.getAttribute("y")||0,l=a.getAttribute("transform");if(!l){var u=ur.bBox(a,!1,t);return o&&(u.left+=o,u.right+=o),i&&(u.top+=i,u.bottom+=i),u}if(t+="~"+o+"~"+i+"~"+l,n=ur.savedBBoxes[t],n)return pt.extendFlat({},n)}}var s,f;r?s=e:(f=ur.tester.node(),s=e.cloneNode(!0),f.appendChild(s)),sn.select(s).attr("transform",null).call(_v.positionText,0,0);var v=s.getBoundingClientRect(),g=ur.testref.node().getBoundingClientRect();r||f.removeChild(s);var b={height:v.height,width:v.width,left:v.left-g.left,top:v.top-g.top,right:v.right-g.left,bottom:v.bottom-g.top};return Fg>=cW&&(ur.savedBBoxes={},Fg=0),t&&(ur.savedBBoxes[t]=b),Fg++,pt.extendFlat({},b)};function k8(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ur.setClipUrl=function(e,r,t){e.attr("clip-path",qg(r,t))};function qg(e,r){if(!e)return null;var t=r._context,n=t._exportedPlot?"":t._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}ur.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(o,i,l){return[i,l].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};ur.setTranslate=function(e,r,t){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",o=e.attr?"attr":"setAttribute",i=e[a]("transform")||"";return r=r||0,t=t||0,i=i.replace(n,"").trim(),i+=kf(r,t),i=i.trim(),e[o]("transform",i),i};ur.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(o,i,l){return[i,l].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};ur.setScale=function(e,r,t){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",o=e.attr?"attr":"setAttribute",i=e[a]("transform")||"";return r=r||1,t=t||1,i=i.replace(n,"").trim(),i+="scale("+r+","+t+")",i=i.trim(),e[o]("transform",i),i};var vW=/\s*sc.*/;ur.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var n=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(vW,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var hW=/translate\([^)]*\)\s*$/;ur.setTextPointsScale=function(e,r,t){e&&e.each(function(){var n,a=sn.select(this),o=a.select("text");if(o.node()){var i=parseFloat(o.attr("x")||0),l=parseFloat(o.attr("y")||0),u=(a.attr("transform")||"").match(hW);r===1&&t===1?n=[]:n=[kf(i,l),"scale("+r+","+t+")",kf(-i,-l)],u&&n.push(u),a.attr("transform",n.join(""))}})};function Og(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}ur.getMarkerStandoff=Og;var Af=Math.atan2,Il=Math.cos,Js=Math.sin;function S8(e,r){var t=r[0],n=r[1];return[t*Il(e)-n*Js(e),t*Js(e)+n*Il(e)]}var C8,E8,L8,R8,Ig,Ng;function Bg(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||pt.isArrayOrTypedArray(t))&&(t=0));var n,a,o=r.marker.angleref;if(o==="previous"||o==="north"){if(r._geo){var i=r._geo.project(e.lonlat);n=i[0],a=i[1]}else{var l=r._xA,u=r._yA;if(l&&u)n=l.c2p(e.x),a=u.c2p(e.y);else return 90}if(r._geo){var s=e.lonlat[0],f=e.lonlat[1],v=r._geo.project([s,f+1e-5]),g=r._geo.project([s+1e-5,f]),b=Af(g[1]-a,g[0]-n),y=Af(v[1]-a,v[0]-n),w;if(o==="north")w=t/180*Math.PI;else if(o==="previous"){var M=s/180*Math.PI,m=f/180*Math.PI,A=C8/180*Math.PI,S=E8/180*Math.PI,x=A-M,T=Il(S)*Js(x),d=Js(S)*Il(m)-Il(S)*Js(m)*Il(x);w=-Af(T,d)-Math.PI,C8=s,E8=f}var _=S8(b,[Il(w),0]),p=S8(y,[Js(w),0]);t=Af(_[1]+p[1],_[0]+p[0])/Math.PI*180,o==="previous"&&!(Ng===r.uid&&e.i===Ig+1)&&(t=null)}if(o==="previous"&&!r._geo)if(Ng===r.uid&&e.i===Ig+1&&ql(n)&&ql(a)){var c=n-L8,k=a-R8,h=r.line&&r.line.shape||"",R=h.slice(h.length-1);R==="h"&&(k=0),R==="v"&&(c=0),t+=Af(k,c)/Math.PI*180+90}else t=null}return L8=n,R8=a,Ig=e.i,Ng=r.uid,t}ur.getMarkerAngle=Bg});var Sf=pe((Ace,W8)=>{"use strict";var Ks=it(),dW=rt(),pW=ln(),Ug=Er(),Ol=ir(),V8=Ol.strTranslate,wv=yt(),Mv=Zr(),Qs=Yn(),G8=Dc(),gW=qn().OPPOSITE_SIDE,Y8=/ [XY][0-9]* /,Hg=1.6,Vg=1.6;function yW(e,r,t){var n=e._fullLayout,a=t.propContainer,o=t.propName,i=t.placeholder,l=t.traceIndex,u=t.avoid||{},s=t.attributes,f=t.transform,v=t.containerGroup,g=1,b=a.title,y=(b&&b.text?b.text:"").trim(),w=!1,M=b&&b.font?b.font:{},m=M.family,A=M.size,S=M.color,x=M.weight,T=M.style,d=M.variant,_=M.textcase,p=M.lineposition,c=M.shadow,k=t.subtitlePropName,h=!!k,R=t.subtitlePlaceholder,E=(a.title||{}).subtitle||{text:"",font:{}},D=E.text.trim(),N=!1,I=1,F=E.font,L=F.family,P=F.size,O=F.color,U=F.weight,X=F.style,j=F.variant,$=F.textcase,Y=F.lineposition,q=F.shadow,Z;o==="title.text"?Z="titleText":o.indexOf("axis")!==-1?Z="axisTitleText":o.indexOf("colorbar"!==-1)&&(Z="colorbarTitleText");var ne=e._context.edits[Z];function Q(ke,De){return ke===void 0||De===void 0?!1:ke.replace(Y8," % ")===De.replace(Y8," % ")}y===""?g=0:Q(y,i)&&(ne||(y=""),g=.2,w=!0),h&&(D===""?I=0:Q(D,R)&&(ne||(D=""),I=.2,N=!0)),t._meta?y=Ol.templateString(y,t._meta):n._meta&&(y=Ol.templateString(y,n._meta));var oe=y||D||ne,ee;v||(v=Ol.ensureSingle(n._infolayer,"g","g-"+r),ee=n._hColorbarMoveTitle);var G=v.selectAll("text."+r).data(oe?[0]:[]);G.enter().append("text"),G.text(y).attr("class",r),G.exit().remove();var re=null,H=r+"-subtitle",te=D||ne;if(h&&te&&(re=v.selectAll("text."+H).data(te?[0]:[]),re.enter().append("text"),re.text(D).attr("class",H),re.exit().remove()),!oe)return v;function ue(ke,De){Ol.syncOrAsync([de,Ee],{title:ke,subtitle:De})}function de(ke){var De=ke.title,Ce=ke.subtitle,Oe;!f&&ee&&(f={}),f?(Oe="",f.rotate&&(Oe+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||ee)&&(Oe+=V8(0,(f.offset||0)-(ee||0)))):Oe=null,De.attr("transform",Oe);function Ue(me){if(me){var he=Ks.select(me.node().parentNode).select("."+H);if(!he.empty()){var be=me.node().getBBox();if(be.height){var Se=be.y+be.height+Hg*P;he.attr("y",Se)}}}}if(De.style("opacity",g*Mv.opacity(S)).call(wv.font,{color:Mv.rgb(S),size:Ks.round(A,2),family:m,weight:x,style:T,variant:d,textcase:_,shadow:c,lineposition:p}).attr(s).call(Qs.convertToTspans,e,Ue),Ce){var ge=v.select("."+r+"-math-group"),Te=De.node().getBBox(),ce=ge.node()?ge.node().getBBox():void 0,ye=ce?ce.y+ce.height+Hg*P:Te.y+Te.height+Vg*P,Le=Ol.extendFlat({},s,{y:ye});Ce.attr("transform",Oe),Ce.style("opacity",I*Mv.opacity(O)).call(wv.font,{color:Mv.rgb(O),size:Ks.round(P,2),family:L,weight:U,style:X,variant:j,textcase:$,shadow:q,lineposition:Y}).attr(Le).call(Qs.convertToTspans,e)}return pW.previousPromises(e)}function Ee(ke){var De=ke.title,Ce=Ks.select(De.node().parentNode);if(u&&u.selection&&u.side&&y){Ce.attr("transform",null);var Oe=gW[u.side],Ue=u.side==="left"||u.side==="top"?-1:1,ge=dW(u.pad)?u.pad:2,Te=wv.bBox(Ce.node()),ce={t:0,b:0,l:0,r:0},ye=e._fullLayout._reservedMargin;for(var Le in ye)for(var me in ye[Le]){var he=ye[Le][me];ce[me]=Math.max(ce[me],he)}var be={left:ce.l,top:ce.t,right:n.width-ce.r,bottom:n.height-ce.b},Se=u.maxShift||Ue*(be[u.side]-Te[u.side]),ze=0;if(Se<0)ze=Se;else{var Fe=u.offsetLeft||0,Je=u.offsetTop||0;Te.left-=Fe,Te.right-=Fe,Te.top-=Je,Te.bottom-=Je,u.selection.each(function(){var Ge=wv.bBox(this);Ol.bBoxIntersect(Te,Ge,ge)&&(ze=Math.max(ze,Ue*(Ge[u.side]-Te[Oe])+ge))}),ze=Math.min(Se,ze),a._titleScoot=Math.abs(ze)}if(ze>0||Se<0){var Ye={left:[-ze,0],right:[ze,0],top:[0,-ze],bottom:[0,ze]}[u.side];Ce.attr("transform",V8(Ye[0],Ye[1]))}}}G.call(ue,re);function Me(ke,De){ke.text(De).on("mouseover.opacity",function(){Ks.select(this).transition().duration(G8.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Ks.select(this).transition().duration(G8.HIDE_PLACEHOLDER).style("opacity",0)})}if(ne&&(y?G.on(".opacity",null):(Me(G,i),w=!0),G.call(Qs.makeEditable,{gd:e}).on("edit",function(ke){l!==void 0?Ug.call("_guiRestyle",e,o,ke,l):Ug.call("_guiRelayout",e,o,ke)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ue)}).on("input",function(ke){this.text(ke||" ").call(Qs.positionText,s.x,s.y)}),h)){if(h&&!y){var ve=G.node().getBBox(),Ae=ve.y+ve.height+Vg*P;re.attr("y",Ae)}D?re.on(".opacity",null):(Me(re,R),N=!0),re.call(Qs.makeEditable,{gd:e}).on("edit",function(ke){Ug.call("_guiRelayout",e,"title.subtitle.text",ke)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ue)}).on("input",function(ke){this.text(ke||" ").call(Qs.positionText,re.attr("x"),re.attr("y"))})}return G.classed("js-placeholder",w),re&&re.classed("js-placeholder",N),v}W8.exports={draw:yW,SUBTITLE_PADDING_EM:Vg,SUBTITLE_PADDING_MATHJAX_EM:Hg}});var Rv=pe((kce,Q8)=>{"use strict";var mW=it(),xW=ks().utcFormat,mt=ir(),bW=mt.numberFormat,Ri=rt(),Oo=mt.cleanNumber,_W=mt.ms2DateTime,X8=mt.dateTime2ms,Di=mt.ensureNumber,Z8=mt.isArrayOrTypedArray,Bo=nn(),Tv=Bo.FP_SAFE,ri=Bo.BADNUM,wW=Bo.LOG_CLIP,MW=Bo.ONEWEEK,Av=Bo.ONEDAY,kv=Bo.ONEHOUR,J8=Bo.ONEMIN,K8=Bo.ONESEC,Sv=on(),Lv=wn(),Cv=Lv.HOUR_PATTERN,Ev=Lv.WEEKDAY_PATTERN;function Cf(e){return Math.pow(10,e)}function Gg(e){return e!=null}Q8.exports=function(r,t){t=t||{};var n=r._id||"x",a=n.charAt(0);function o(x,T){if(x>0)return Math.log(x)/Math.LN10;if(x<=0&&T&&r.range&&r.range.length===2){var d=r.range[0],_=r.range[1];return .5*(d+_-2*wW*Math.abs(d-_))}else return ri}function i(x,T,d,_){if((_||{}).msUTC&&Ri(x))return+x;var p=X8(x,d||r.calendar);if(p===ri)if(Ri(x)){x=+x;var c=Math.floor(mt.mod(x+.05,1)*10),k=Math.round(x-c/10);p=X8(new Date(k))+c/10}else return ri;return p}function l(x,T,d){return _W(x,T,d||r.calendar)}function u(x){return r._categories[Math.round(x)]}function s(x){if(Gg(x)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[x]!==void 0)return r._categoriesMap[x];r._categories.push(typeof x=="number"?String(x):x);var T=r._categories.length-1;return r._categoriesMap[x]=T,T}return ri}function f(x,T){for(var d=new Array(T),_=0;_r.range[1]&&(d=!d);for(var _=d?-1:1,p=_*x,c=0,k=0;kR)c=k+1;else{c=p<(h+R)/2?k:k+1;break}}var E=r._B[c]||0;return isFinite(E)?y(x,r._m2,E):0},m=function(x){var T=r._rangebreaks.length;if(!T)return w(x,r._m,r._b);for(var d=0,_=0;_r._rangebreaks[_].pmax&&(d=_+1);return w(x,r._m2,r._B[d])}}r.c2l=r.type==="log"?o:Di,r.l2c=r.type==="log"?Cf:Di,r.l2p=M,r.p2l=m,r.c2p=r.type==="log"?function(x,T){return M(o(x,T))}:M,r.p2c=r.type==="log"?function(x){return Cf(m(x))}:m,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Oo,r.c2d=r.c2r=r.l2d=r.l2r=Di,r.d2p=r.r2p=function(x){return r.l2p(Oo(x))},r.p2d=r.p2r=m,r.cleanPos=Di):r.type==="log"?(r.d2r=r.d2l=function(x,T){return o(Oo(x),T)},r.r2d=r.r2c=function(x){return Cf(Oo(x))},r.d2c=r.r2l=Oo,r.c2d=r.l2r=Di,r.c2r=o,r.l2d=Cf,r.d2p=function(x,T){return r.l2p(r.d2r(x,T))},r.p2d=function(x){return Cf(m(x))},r.r2p=function(x){return r.l2p(Oo(x))},r.p2r=m,r.cleanPos=Di):r.type==="date"?(r.d2r=r.r2d=mt.identity,r.d2c=r.r2c=r.d2l=r.r2l=i,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(x,T,d){return r.l2p(i(x,0,d))},r.p2d=r.p2r=function(x,T,d){return l(m(x),T,d)},r.cleanPos=function(x){return mt.cleanDate(x,ri,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=s,r.r2d=r.c2d=r.l2d=u,r.d2r=r.d2l_noadd=g,r.r2c=function(x){var T=b(x);return T!==void 0?T:r.fraction2r(.5)},r.l2r=r.c2r=Di,r.r2l=b,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return u(m(x))},r.r2p=r.d2p,r.p2r=m,r.cleanPos=function(x){return typeof x=="string"&&x!==""?x:Di(x)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=u,r.d2r=r.d2l_noadd=g,r.r2c=function(x){var T=g(x);return T!==void 0?T:r.fraction2r(.5)},r.r2c_just_indices=v,r.l2r=r.c2r=Di,r.r2l=g,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return u(m(x))},r.r2p=r.d2p,r.p2r=m,r.cleanPos=function(x){return Array.isArray(x)||typeof x=="string"&&x!==""?x:Di(x)},r.setupMultiCategory=function(x){var T=r._traceIndices,d,_,p=r._matchGroup;if(p&&r._categories.length===0){for(var c in p)if(c!==n){var k=t[Sv.id2name(c)];T=T.concat(k._traceIndices)}}var h=[[0,{}],[0,{}]],R=[];for(d=0;dk[1]&&(_[c?0:1]=d),_[0]===_[1]){var h=r.l2r(T),R=r.l2r(d);if(T!==void 0){var E=h+1;d!==void 0&&(E=Math.min(E,R)),_[c?1:0]=E}if(d!==void 0){var D=R+1;T!==void 0&&(D=Math.max(D,h)),_[c?0:1]=D}}}},r.cleanRange=function(x,T){r._cleanRange(x,T),r.limitRange(x)},r._cleanRange=function(x,T){T||(T={}),x||(x="range");var d=mt.nestedProperty(r,x).get(),_,p;if(r.type==="date"?p=mt.dfltRange(r.calendar):a==="y"?p=Lv.DFLTRANGEY:r._name==="realaxis"?p=[0,1]:p=T.dfltRange||Lv.DFLTRANGEX,p=p.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(p[0]=0),!d||d.length!==2){mt.nestedProperty(r,x).set(p);return}var c=d[0]===null,k=d[1]===null;for(r.type==="date"&&!r.autorange&&(d[0]=mt.cleanDate(d[0],ri,r.calendar),d[1]=mt.cleanDate(d[1],ri,r.calendar)),_=0;_<2;_++)if(r.type==="date"){if(!mt.isDateTime(d[_],r.calendar)){r[x]=p;break}if(r.r2l(d[0])===r.r2l(d[1])){var h=mt.constrain(r.r2l(d[0]),mt.MIN_MS+1e3,mt.MAX_MS-1e3);d[0]=r.l2r(h-1e3),d[1]=r.l2r(h+1e3);break}}else{if(!Ri(d[_]))if(!(c||k)&&Ri(d[1-_]))d[_]=d[1-_]*(_?10:.1);else{r[x]=p;break}if(d[_]<-Tv?d[_]=-Tv:d[_]>Tv&&(d[_]=Tv),d[0]===d[1]){var R=Math.max(1,Math.abs(d[0]*1e-6));d[0]-=R,d[1]+=R}}},r.setScale=function(x){var T=t._size;if(r.overlaying){var d=Sv.getFromId({_fullLayout:t},r.overlaying);r.domain=d.domain}var _=x&&r._r?"_r":"range",p=r.calendar;r.cleanRange(_);var c=r.r2l(r[_][0],p),k=r.r2l(r[_][1],p),h=a==="y";if(h?(r._offset=T.t+(1-r.domain[1])*T.h,r._length=T.h*(r.domain[1]-r.domain[0]),r._m=r._length/(c-k),r._b=-r._m*k):(r._offset=T.l+r.domain[0]*T.w,r._length=T.w*(r.domain[1]-r.domain[0]),r._m=r._length/(k-c),r._b=-r._m*c),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var R,E;if(r._rangebreaks=r.locateBreaks(Math.min(c,k),Math.max(c,k)),r._rangebreaks.length){for(R=0;Rk&&(D=!D),D&&r._rangebreaks.reverse();var N=D?-1:1;for(r._m2=N*r._length/(Math.abs(k-c)-r._lBreaks),r._B.push(-r._m2*(h?k:c)),R=0;Rp&&(p+=7,c<_&&(c+=7));break;case Cv:k=new Date(x);var D=k.getUTCHours(),N=k.getUTCMinutes(),I=k.getUTCSeconds(),F=k.getUTCMilliseconds();c=D+(N/60+I/3600+F/36e5),_>p&&(p+=24,c<_&&(c+=24));break;case"":c=x;break}if(c>=_&&c=_&&x=q.min&&(Xq.max&&(q.max=j),$=!1)}$&&k.push({min:X,max:j})}};for(d=0;d{"use strict";var $8=rt(),Yg=ir(),TW=nn().BADNUM,Dv=Yg.isArrayOrTypedArray,AW=Yg.isDateTime,kW=Yg.cleanNumber,j8=Math.round;rM.exports=function(r,t,n){var a=r,o=n.noMultiCategory;if(Dv(a)&&!a.length)return"-";if(!o&&RW(a))return"multicategory";if(o&&Array.isArray(a[0])){for(var i=[],l=0;lo*2}function eM(e){return Math.max(1,(e-1)/1e3)}function LW(e,r){for(var t=e.length,n=eM(t),a=0,o=0,i={},l=0;la*2}function RW(e){return Dv(e[0])&&Dv(e[1])}});var $s=pe((Cce,uM)=>{"use strict";var DW=it(),iM=rt(),Uo=ir(),Pv=nn().FP_SAFE,PW=Er(),FW=yt(),oM=on(),IW=oM.getFromId,NW=oM.isLinked;uM.exports={applyAutorangeOptions:sM,getAutoRange:Xg,makePadFn:Zg,doAutoRange:qW,findExtremes:OW,concatExtremes:Qg};function Xg(e,r){var t,n,a=[],o=e._fullLayout,i=Zg(o,r,0),l=Zg(o,r,1),u=Qg(e,r),s=u.min,f=u.max;if(s.length===0||f.length===0)return Uo.simpleMap(r.range,r.r2l);var v=s[0].val,g=f[0].val;for(t=1;t0&&(k=S-i(d)-l(_),k>x?h/k>T&&(p=d,c=_,T=h/k):h/S>T&&(p={val:d.val,nopad:1},c={val:_.val,nopad:1},T=h/S));function R(F,L){return Math.max(F,l(L))}if(v===g){var E=v-1,D=v+1;if(m)if(v===0)a=[0,1];else{var N=(v>0?f:s).reduce(R,0),I=v/(1-Math.min(.5,N/S));a=v>0?[0,I]:[I,0]}else A?a=[Math.max(0,E),Math.max(1,D)]:a=[E,D]}else m?(p.val>=0&&(p={val:0,nopad:1}),c.val<=0&&(c={val:0,nopad:1})):A&&(p.val-T*i(p)<0&&(p={val:0,nopad:1}),c.val<=0&&(c={val:1,nopad:1})),T=(c.val-p.val-tM(r,d.val,_.val))/(S-i(p)-l(c)),a=[p.val-T*i(p),c.val+T*l(c)];return a=sM(a,r),r.limitRange&&r.limitRange(),y&&a.reverse(),Uo.simpleMap(a,r.l2r||Number)}function tM(e,r,t){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(r,t),o=0;o0?t.ppadplus:t.ppadminus)||t.ppad||0),d=x((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),_=x(t.vpadplus||t.vpad),p=x(t.vpadminus||t.vpad);if(!s){if(A=1/0,S=-1/0,u)for(v=0;v0&&(A=g),g>S&&g-Pv&&(A=g),g>S&&g=h;v--)k(v);return{min:n,max:a,opts:t}}function Jg(e,r,t,n){lM(e,r,t,n,BW)}function Kg(e,r,t,n){lM(e,r,t,n,UW)}function lM(e,r,t,n,a){for(var o=n.tozero,i=n.extrapad,l=!0,u=0;u=t&&(s.extrapad||!i)){l=!1;break}else a(r,s.val)&&s.pad<=t&&(i||!s.extrapad)&&(e.splice(u,1),u--)}if(l){var f=o&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:i})}}function aM(e){return iM(e)&&Math.abs(e)=r}function HW(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&Fv(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&Fv(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function VW(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&Fv(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&Fv(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function Fv(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=u&&(o=u,t=u),i<=u&&(i=u,n=u)}}return t=HW(t,r),n=VW(n,r),[t,n]}});var St=pe((Ece,RM)=>{"use strict";var Da=it(),Wt=rt(),js=ln(),Lf=Er(),Lr=ir(),eu=Lr.strTranslate,Bl=Yn(),GW=Sf(),Rf=Zr(),pa=yt(),YW=Ra(),fM=dg(),Tn=nn(),WW=Tn.ONEMAXYEAR,zv=Tn.ONEAVGYEAR,qv=Tn.ONEMINYEAR,XW=Tn.ONEMAXQUARTER,r2=Tn.ONEAVGQUARTER,Ov=Tn.ONEMINQUARTER,ZW=Tn.ONEMAXMONTH,ru=Tn.ONEAVGMONTH,Bv=Tn.ONEMINMONTH,ga=Tn.ONEWEEK,On=Tn.ONEDAY,Ho=On/2,Fi=Tn.ONEHOUR,Df=Tn.ONEMIN,Uv=Tn.ONESEC,JW=Tn.ONEMILLI,KW=Tn.ONEMICROSEC,Ul=Tn.MINUS_SIGN,Gv=Tn.BADNUM,t2={K:"zeroline"},n2={K:"gridline",L:"path"},a2={K:"minor-gridline",L:"path"},_M={K:"tick",L:"path"},cM={K:"tick",L:"text"},vM={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Yv=qn(),Ef=Yv.MID_SHIFT,Hl=Yv.CAP_SHIFT,Pf=Yv.LINE_SPACING,QW=Yv.OPPOSITE_SIDE,Hv=3,lr=RM.exports={};lr.setConvert=Rv();var $W=Wg(),no=on(),jW=no.idSort,eX=no.isLinked;lr.id2name=no.id2name;lr.name2id=no.name2id;lr.cleanId=no.cleanId;lr.list=no.list;lr.listIds=no.listIds;lr.getFromId=no.getFromId;lr.getFromTrace=no.getFromTrace;var wM=$s();lr.getAutoRange=wM.getAutoRange;lr.findExtremes=wM.findExtremes;var rX=1e-4;function s2(e){var r=(e[1]-e[0])*rX;return[e[0]-r,e[1]+r]}lr.coerceRef=function(e,r,t,n,a,o){var i=n.charAt(n.length-1),l=t._fullLayout._subplots[i+"axis"],u=n+"ref",s={};return a||(a=l[0]||(typeof o=="string"?o:o[0])),o||(o=a),l=l.concat(l.map(function(f){return f+" domain"})),s[u]={valType:"enumerated",values:l.concat(o?typeof o=="string"?[o]:o:[]),dflt:a},Lr.coerce(e,r,s,u)};lr.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};lr.coercePosition=function(e,r,t,n,a,o){var i,l,u=lr.getRefType(n);if(u!=="range")i=Lr.ensureNumber,l=t(a,o);else{var s=lr.getFromId(r,n);o=s.fraction2r(o),l=t(a,o),i=s.cleanPos}e[a]=i(l)};lr.cleanPosition=function(e,r,t){var n=t==="paper"||t==="pixel"?Lr.ensureNumber:lr.getFromId(r,t).cleanPos;return n(e)};lr.redrawComponents=function(e,r){r=r||lr.listIds(e);var t=e._fullLayout;function n(a,o,i,l){for(var u=Lf.getComponentMethod(a,o),s={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};lr.saveRangeInitial=function(e,r){for(var t=lr.list(e,"",!0),n=!1,a=0;av*.3||s(n)||s(a))){var g=t.dtick/2;e+=e+gi){var l=Number(t.substr(1));o.exactYears>i&&l%12===0?e=lr.tickIncrement(e,"M6","reverse")+On*1.5:o.exactMonths>i?e=lr.tickIncrement(e,"M1","reverse")+On*15.5:e-=Ho;var u=lr.tickIncrement(e,t);if(u<=n)return u}return e}lr.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var n=r.dtick&&Wt(r._tmin),a;if(n){var o=lr.tickIncrement(r._tmin,r.dtick,!0);a=[r._tmin,o*.99+r._tmin*.01]}else{var i=Lr.simpleMap(r.range,r.r2l);a=[i[0],.8*i[0]+.2*i[1]]}if(e.range=Lr.simpleMap(a,r.l2r),e._isMinor=!0,lr.prepTicks(e,t),n){var l=Wt(r.dtick),u=Wt(e.dtick),s=l?r.dtick:+r.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);l&&u?$g(s,f)?s===2*ga&&f===2*On&&(e.dtick=ga):s===2*ga&&f===3*On?e.dtick=ga:s===ga&&!(r._input.minor||{}).nticks?e.dtick=On:pM(s/f,2.5)?e.dtick=s/2:e.dtick=s:String(r.dtick).charAt(0)==="M"?u?e.dtick="M1":$g(s,f)?s>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?$g(s,f)||(e.dtick=pM(s/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function $g(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function pM(e,r){return Math.abs(e/r-1)<.001}lr.prepTicks=function(e,r){var t=Lr.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?Lr.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=Lr.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(t[1]-t[0])/n,lr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(o=n-1,i=n):(o=n,i=n);var l=e[o].value,u=e[i].value,s=Math.abs(u-l),f=t||s,v=0;f>=qv?s>=qv&&s<=WW?v=s:v=zv:t===r2&&f>=Ov?s>=Ov&&s<=XW?v=s:v=r2:f>=Bv?s>=Bv&&s<=ZW?v=s:v=ru:t===ga&&f>=ga?v=ga:f>=On?v=On:t===Ho&&f>=Ho?v=Ho:t===Fi&&f>=Fi&&(v=Fi);var g;v>=s&&(v=s,g=!0);var b=a+v;if(r.rangebreaks&&v>0){for(var y=84,w=0,M=0;Mga&&(v=s)}(v>0||n===0)&&(e[n].periodX=a+v/2)}}lr.calcTicks=function(r,t){for(var n=r.type,a=r.calendar,o=r.ticklabelstep,i=r.ticklabelmode==="period",l=r.range[0]>r.range[1],u=!r.ticklabelindex||Lr.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],s=Lr.simpleMap(r.range,r.r2l,void 0,void 0,t),f=s[1]=(S?0:1);x--){var T=!x;x?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var d=x?r:Lr.extendFlat({},r,r.minor);if(T?lr.prepMinorTicks(d,r,t):lr.prepTicks(d,t),d.tickmode==="array"){x?(M=[],y=gM(r,!T)):(m=[],w=gM(r,!T));continue}if(d.tickmode==="sync"){M=[],y=lX(r);continue}var _=s2(s),p=_[0],c=_[1],k=Wt(d.dtick),h=n==="log"&&!(k||d.dtick.charAt(0)==="L"),R=lr.tickFirst(d,t);if(x){if(r._tmin=R,R=c:D<=c;D=lr.tickIncrement(D,F,f,a)){if(x&&N++,d.rangebreaks&&!f){if(D=g)break}if(M.length>b||D===E)break;E=D;var L={value:D};x?(h&&D!==(D|0)&&(L.simpleLabel=!0),o>1&&N%o&&(L.skipLabel=!0),M.push(L)):(L.minor=!0,m.push(L))}}if(!m||m.length<2)u=!1;else{var P=(m[1].value-m[0].value)*(l?-1:1);RX(P,r.tickformat)||(u=!1)}if(!u)A=M;else{var O=M.concat(m);i&&M.length&&(O=O.slice(1)),O=O.sort(function(Ae,ke){return Ae.value-ke.value}).filter(function(Ae,ke,De){return ke===0||Ae.value!==De[ke-1].value});var U=O.map(function(Ae,ke){return Ae.minor===void 0&&!Ae.skipLabel?ke:null}).filter(function(Ae){return Ae!==null});U.forEach(function(Ae){u.map(function(ke){var De=Ae+ke;De>=0&&De-1;oe--){if(M[oe].drop){M.splice(oe,1);continue}M[oe].value=e2(M[oe].value,r);var H=r.c2p(M[oe].value);(ee?re>H-G:reg||Ceg&&(De.periodX=g),Cea&&gzv)r/=zv,n=a(10),e.dtick="M"+12*Pi(r,n,Iv);else if(o>ru)r/=ru,e.dtick="M"+Pi(r,1,yM);else if(o>On){if(e.dtick=Pi(r,On,e._hasDayOfWeekBreaks?[1,2,7,14]:sX),!t){var i=lr.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(i)?e.tick0=Lr.dateTick0(e.calendar,2):e.tick0=Lr.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else o>Fi?e.dtick=Pi(r,Fi,yM):o>Df?e.dtick=Pi(r,Df,mM):o>Uv?e.dtick=Pi(r,Uv,mM):(n=a(10),e.dtick=Pi(r,n,Iv))}else if(e.type==="log"){e.tick0=0;var u=Lr.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(u[1]-u[0])<1){var s=1.5*Math.abs((u[1]-u[0])/r);r=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/s,n=a(10),e.dtick="L"+Pi(r,n,Iv)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):c2(e)?(e.tick0=0,n=1,e.dtick=Pi(r,n,uX)):(e.tick0=0,n=a(10),e.dtick=Pi(r,n,Iv));if(e.dtick===0&&(e.dtick=1),!Wt(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function kM(e){var r=e.dtick;if(e._tickexponent=0,!Wt(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),n=e.l2r(t).replace(/(^-|i)/g,""),a=n.length;if(String(r).charAt(0)==="M")a>10||n.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=On&&a<=10||r>=On*15)e._tickround="d";else if(r>=Df&&a<=16||r>=Fi)e._tickround="M";else if(r>=Uv&&a<=19||r>=Df)e._tickround="S";else{var o=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(Wt(r)||r.charAt(0)==="L"){var i=e.range.map(e.r2d||Number);Wt(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),s=e.minexponent===void 0?3:e.minexponent;Math.abs(u)>s&&(Vv(e.exponentformat)&&!u2(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}lr.tickIncrement=function(e,r,t,n){var a=t?-1:1;if(Wt(r))return Lr.increment(e,a*r);var o=r.charAt(0),i=a*Number(r.substr(1));if(o==="M")return Lr.incrementMonth(e,i,n);if(o==="L")return Math.log(Math.pow(10,e)+i)/Math.LN10;if(o==="D"){var l=r==="D2"?AM:TM,u=e+a*.01,s=Lr.roundUp(Lr.mod(u,1),l,t);return Math.floor(u)+Math.log(Da.round(Math.pow(10,s),1))/Math.LN10}throw"unrecognized dtick "+String(r)};lr.tickFirst=function(e,r){var t=e.r2l||Number,n=Lr.simpleMap(e.range,t,void 0,void 0,r),a=n[1]=0&&m<=e._length?M:null};if(o&&Lr.isArrayOrTypedArray(e.ticktext)){var v=Lr.simpleMap(e.range,e.r2l),g=(Math.abs(v[1]-v[0])-(e._lBreaks||0))/1e4;for(s=0;s"+l;else{var s=If(e),f=e._trueSide||e.side;(!s&&f==="top"||s&&f==="bottom")&&(i+="
")}r.text=i}function cX(e,r,t,n,a){var o=e.dtick,i=r.x,l=e.tickformat,u=typeof o=="string"&&o.charAt(0);if(a==="never"&&(a=""),n&&u!=="L"&&(o="L3",u="L"),l||u==="L")r.text=Ff(Math.pow(10,i),e,a,n);else if(Wt(o)||u==="D"&&Lr.mod(i+.01,1)<.1){var s=Math.round(i),f=Math.abs(s),v=e.exponentformat;v==="power"||Vv(v)&&u2(s)?(s===0?r.text=1:s===1?r.text="10":r.text="10"+(s>1?"":Ul)+f+"",r.fontSize*=1.25):(v==="e"||v==="E")&&f>2?r.text="1"+v+(s>0?"+":Ul)+f:(r.text=Ff(Math.pow(10,i),e,"","fakehover"),o==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(u==="D")r.text=String(Math.round(Math.pow(10,Lr.mod(i,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(o);if(e.dtick==="D1"){var g=String(r.text).charAt(0);(g==="0"||g==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(i<0?.5:.25)))}}function vX(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function hX(e,r,t){var n=Math.round(r.x),a=e._categories[n]||[],o=a[1]===void 0?"":String(a[1]),i=a[0]===void 0?"":String(a[0]);t?r.text=i+" - "+o:(r.text=o,r.text2=i)}function dX(e,r,t,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(a="hide"),r.text=Ff(r.x,e,a,n)}function pX(e,r,t,n,a){if(e.thetaunit==="radians"&&!t){var o=r.x/180;if(o===0)r.text="0";else{var i=gX(o);if(i[1]>=100)r.text=Ff(Lr.deg2rad(r.x),e,a,n);else{var l=r.x<0;i[1]===1?i[0]===1?r.text="\u03C0":r.text=i[0]+"\u03C0":r.text=["",i[0],"","\u2044","",i[1],"","\u03C0"].join(""),l&&(r.text=Ul+r.text)}}}else r.text=Ff(r.x,e,a,n)}function gX(e){function r(l,u){return Math.abs(l-u)<=1e-6}function t(l,u){return r(u,0)?l:t(u,l%u)}function n(l){for(var u=1;!r(Math.round(l*u)/u,l);)u*=10;return u}var a=n(e),o=e*a,i=Math.abs(t(o,a));return[Math.round(o/i),Math.round(a/i)]}var yX=["f","p","n","\u03BC","m","","k","M","G","T"];function Vv(e){return e==="SI"||e==="B"}function u2(e){return e>14||e<-15}function Ff(e,r,t,n){var a=e<0,o=r._tickround,i=t||r.exponentformat||"B",l=r._tickexponent,u=lr.getTickFormat(r),s=r.separatethousands;if(n){var f={exponentformat:i,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:Wt(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};kM(f),o=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(u=r.hoverformat)}if(u)return r._numFormat(u)(e).replace(/-/g,Ul);var v=Math.pow(10,-o)/2;if(i==="none"&&(l=0),e=Math.abs(e),e"+y+"":i==="B"&&l===9?e+="B":Vv(i)&&(e+=yX[l/3+5])}return a?Ul+e:e}lr.getTickFormat=function(e){var r;function t(u){return typeof u!="string"?u:Number(u.replace("M",""))*ru}function n(u,s){var f=["L","D"];if(typeof u==typeof s){if(typeof u=="number")return u-s;var v=f.indexOf(u.charAt(0)),g=f.indexOf(s.charAt(0));return v===g?Number(u.replace(/(L|D)/g,""))-Number(s.replace(/(L|D)/g,"")):v-g}else return typeof u=="number"?1:-1}function a(u,s,f){var v=f||function(y){return y},g=s[0],b=s[1];return(!g&&typeof g!="number"||v(g)<=v(u))&&(!b&&typeof b!="number"||v(b)>=v(u))}function o(u,s){var f=s[0]===null,v=s[1]===null,g=n(u,s[0])>=0,b=n(u,s[1])<=0;return(f||g)&&(v||b)}var i,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&a.unshift(a.splice(f,1).shift())}});var l={false:{left:0,right:0}};return Lr.syncOrAsync(a.map(function(u){return function(){if(u){var s=lr.getFromId(e,u);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=i;var f=lr.drawOne(e,s,t);return s._shiftPusher&&l2(s,s._fullDepth||0,l,!0),s._r=s.range.slice(),s._rl=Lr.simpleMap(s._r,s.r2l),f}}}))};lr.drawOne=function(e,r,t){t=t||{};var n=t.axShifts||{},a=t.overlayingShiftedAx||[],o,i,l;r.setScale();var u=e._fullLayout,s=r._id,f=s.charAt(0),v=lr.counterLetter(s),g=u._plots[r._mainSubplot];if(!g)return;if(r._shiftPusher=r.autoshift||a.indexOf(r._id)!==-1||a.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var b=r.linewidth/2||0;r.ticks==="inside"&&(b+=r.ticklen),l2(r,b,n,!0),l2(r,r.shift||0,n,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=LX(r,n));var y=g[f+"axislayer"],w=r._mainLinePosition,M=w+=r._shift,m=r._mainMirrorPosition,A=r._vals=lr.calcTicks(r),S=[r.mirror,M,m].join("_");for(o=0;o0?De.bottom-Ae:0,ke))));var ge=0,Te=0;if(r._shiftPusher&&(ge=Math.max(ke,De.height>0?Me==="l"?Ae-De.left:De.right-Ae:0),r.title.text!==u._dfltTitle[f]&&(Te=(r._titleStandoff||0)+(r._titleScoot||0),Me==="l"&&(Te+=bM(r))),r._fullDepth=Math.max(ge,Te)),r.automargin){Ce={x:0,y:0,r:0,l:0,t:0,b:0};var ce=[0,1],ye=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Me==="b"?Ce[Me]=r._depth:(Ce[Me]=r._depth=Math.max(De.width>0?Ae-De.top:0,ke),ce.reverse()),De.width>0){var Le=De.right-(r._offset+r._length);Le>0&&(Ce.xr=1,Ce.r=Le);var me=r._offset-De.left;me>0&&(Ce.xl=0,Ce.l=me)}}else if(Me==="l"?(r._depth=Math.max(De.height>0?Ae-De.left:0,ke),Ce[Me]=r._depth-ye):(r._depth=Math.max(De.height>0?De.right-Ae:0,ke),Ce[Me]=r._depth+ye,ce.reverse()),De.height>0){var he=De.bottom-(r._offset+r._length);he>0&&(Ce.yb=0,Ce.b=he);var be=r._offset-De.top;be>0&&(Ce.yt=1,Ce.t=be)}Ce[v]=r.anchor==="free"?r.position:r._anchorAxis.domain[ce[0]],r.title.text!==u._dfltTitle[f]&&(Ce[Me]+=bM(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Oe={x:0,y:0,r:0,l:0,t:0,b:0},Oe[ve]=r.linewidth,r.mirror&&r.mirror!==!0&&(Oe[ve]+=ke),r.mirror===!0||r.mirror==="ticks"?Oe[v]=r._anchorAxis.domain[ce[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Oe[v]=[r._counterDomainMin,r._counterDomainMax][ce[1]]))}Ee&&(Ue=Lf.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(xM(Ce,r.automargin),xM(Oe,r.automargin)),js.autoMargin(e,f2(r),Ce),js.autoMargin(e,EM(r),Oe),js.autoMargin(e,LM(r),Ue)}),Lr.syncOrAsync(ue)}};function xM(e,r){if(e){var t=Object.keys(vM).reduce(function(n,a){return r.indexOf(a)!==-1&&vM[a].forEach(function(o){n[o]=1}),n},{});Object.keys(e).forEach(function(n){t[n]||(n.length===1?e[n]=0:delete e[n])})}}function mX(e,r){var t=[],n,a=function(o,i){var l=o.xbnd[i];l!==null&&t.push(Lr.extendFlat({},o,{x:l}))};if(r.length){for(n=0;ne.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,u=!l;if(t){var s=i?-1:1;t=t*s}if(n){var f=e.side,v=l&&(f==="top"||f==="left")||u&&(f==="bottom"||f==="right")?1:-1;n=n*v}return e._id.charAt(0)==="x"?function(g){return eu(a+e._offset+e.l2p(i2(g))+t,o+n)}:function(g){return eu(o+n,a+e._offset+e.l2p(i2(g))+t)}};function i2(e){return e.periodX!==void 0?e.periodX:e.x}function wX(e){var r=e.ticklabelposition||"",t=function(b){return r.indexOf(b)!==-1},n=t("top"),a=t("left"),o=t("right"),i=t("bottom"),l=t("inside"),u=i||a||n||o;if(!u&&!l)return[0,0];var s=e.side,f=u?(e.tickwidth||0)/2:0,v=Hv,g=e.tickfont?e.tickfont.size:12;return(i||n)&&(f+=g*Hl,v+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,v+=Hv),l&&s==="top"&&(v-=g*(1-Hl)),(a||n)&&(f=-f),(s==="bottom"||s==="right")&&(v=-v),[u?f:0,l?v:0]}lr.makeTickPath=function(e,r,t,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var o=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,i=e._id.charAt(0),l=(e.linewidth||1)/2;return i==="x"?"M0,"+(r+l*t)+"v"+o*t:"M"+(r+l*t)+",0h"+o*t};lr.makeLabelFns=function(e,r,t){var n=e.ticklabelposition||"",a=function(R){return n.indexOf(R)!==-1},o=a("top"),i=a("left"),l=a("right"),u=a("bottom"),s=u||i||o||l,f=a("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",g=0,b=0,y=v?e.ticklen:0;if(f?y*=-1:s&&(y=0),v&&(g+=y,t)){var w=Lr.deg2rad(t);g=y*Math.cos(w)+1,b=y*Math.sin(w)}e.showticklabels&&(v||e.showline)&&(g+=.2*e.tickfont.size),g+=(e.linewidth||1)/2*(f?-1:1);var M={labelStandoff:g,labelShift:b},m,A,S,x,T=0,d=e.side,_=e._id.charAt(0),p=e.tickangle,c;if(_==="x")c=!f&&d==="bottom"||f&&d==="top",x=c?1:-1,f&&(x*=-1),m=b*x,A=r+g*x,S=c?1:-.2,Math.abs(p)===90&&(f?S+=Ef:p===-90&&d==="bottom"?S=Hl:p===90&&d==="top"?S=Ef:S=.5,T=Ef/2*(p/90)),M.xFn=function(R){return R.dx+m+T*R.fontSize},M.yFn=function(R){return R.dy+A+R.fontSize*S},M.anchorFn=function(R,E){if(s){if(i)return"end";if(l)return"start"}return!Wt(E)||E===0||E===180?"middle":E*x<0!==f?"end":"start"},M.heightFn=function(R,E,D){return E<-60||E>60?-.5*D:e.side==="top"!==f?-D:0};else if(_==="y"){if(c=!f&&d==="left"||f&&d==="right",x=c?1:-1,f&&(x*=-1),m=g,A=b*x,S=0,!f&&Math.abs(p)===90&&(p===-90&&d==="left"||p===90&&d==="right"?S=Hl:S=.5),f){var k=Wt(p)?+p:0;if(k!==0){var h=Lr.deg2rad(k);T=Math.abs(Math.sin(h))*Hl*x,S=0}}M.xFn=function(R){return R.dx+r-(m+R.fontSize*S)*x+T*R.fontSize},M.yFn=function(R){return R.dy+A+R.fontSize*Ef},M.anchorFn=function(R,E){return Wt(E)&&Math.abs(E)===90?"middle":c?"end":"start"},M.heightFn=function(R,E,D){return e.side==="right"&&(E*=-1),E<-30?-D:E<30?-.5*D:0}}return M};function Wv(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}lr.drawTicks=function(e,r,t){t=t||{};var n=r._id+"tick",a=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(i){return i.minor&&!i.noTick}):[]).concat(r.ticks?t.vals.filter(function(i){return!i.minor&&!i.noTick}):[]),o=t.layer.selectAll("path."+n).data(a,Wv);o.exit().remove(),o.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(i){return Rf.stroke(Da.select(this),i.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(i){return pa.crispRound(e,i.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),Xv(r,[_M]),o.attr("transform",t.transFn)};lr.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var n=r._id+"grid",a=r.minor&&r.minor.showgrid,o=a?t.vals.filter(function(m){return m.minor}):[],i=r.showgrid?t.vals.filter(function(m){return!m.minor}):[],l=t.counterAxis;if(l&&lr.shouldShowZeroLine(e,r,l))for(var u=r.tickmode==="array",s=0;s=0;y--){var w=y?g:b;if(w){var M=w.selectAll("path."+n).data(y?i:o,Wv);M.exit().remove(),M.enter().append("path").classed(n,1).classed("crisp",t.crisp!==!1),M.attr("transform",t.transFn).attr("d",t.path).each(function(m){return Rf.stroke(Da.select(this),m.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(m){return pa.dashStyle(m.minor?r.minor.griddash:r.griddash,m.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(m){return(m.minor?v:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&M.attr("d",t.path)}}Xv(r,[n2,a2])}};lr.drawZeroLine=function(e,r,t){t=t||t;var n=r._id+"zl",a=lr.shouldShowZeroLine(e,r,t.counterAxis),o=t.layer.selectAll("path."+n).data(a?[{x:0,id:r._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(i,l){return jW(i.id,l.id)})}),o.attr("transform",t.transFn).attr("d",t.path).call(Rf.stroke,r.zerolinecolor||Rf.defaultLine).style("stroke-width",pa.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),Xv(r,[t2])};lr.drawLabels=function(e,r,t){t=t||{};var n=e._fullLayout,a=r._id,o=t.cls||a+"tick",i=t.vals.filter(function(L){return L.text}),l=t.labelFns,u=t.secondary?0:r.tickangle,s=(r._prevTickAngles||{})[o],f=t.layer.selectAll("g."+o).data(r.showticklabels?i:[],Wv),v=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(L){var P=Da.select(this),O=e._promises.length;P.call(Bl.positionText,l.xFn(L),l.yFn(L)).call(pa.font,{family:L.font,size:L.fontSize,color:L.fontColor,weight:L.fontWeight,style:L.fontStyle,variant:L.fontVariant,textcase:L.fontTextcase,lineposition:L.fontLineposition,shadow:L.fontShadow}).text(L.text).call(Bl.convertToTspans,e),e._promises[O]?v.push(e._promises.pop().then(function(){g(P,u)})):g(P,u)}),Xv(r,[cM]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(L){Da.select(this).select("text").call(Bl.positionText,l.xFn(L),l.yFn(L))});function g(L,P){L.each(function(O){var U=Da.select(this),X=U.select(".text-math-group"),j=l.anchorFn(O,P),$=t.transFn.call(U.node(),O)+(Wt(P)&&+P!=0?" rotate("+P+","+l.xFn(O)+","+(l.yFn(O)-O.fontSize/2)+")":""),Y=Bl.lineCount(U),q=Pf*O.fontSize,Z=l.heightFn(O,Wt(P)?+P:0,(Y-1)*q);if(Z&&($+=eu(0,Z)),X.empty()){var ne=U.select("text");ne.attr({transform:$,"text-anchor":j}),ne.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var Q=pa.bBox(X.node()).width,oe=Q*{end:-.5,start:.5}[j];X.attr("transform",$+eu(oe,0))}})}r._adjustTickLabelsOverflow=function(){var L=r.ticklabeloverflow;if(!(!L||L==="allow")){var P=L.indexOf("hide")!==-1,O=r._id.charAt(0)==="x",U=0,X=O?e._fullLayout.width:e._fullLayout.height;if(L.indexOf("domain")!==-1){var j=Lr.simpleMap(r.range,r.r2l);U=r.l2p(j[0])+r._offset,X=r.l2p(j[1])+r._offset}var $=Math.min(U,X),Y=Math.max(U,X),q=r.side,Z=1/0,ne=-1/0;f.each(function(G){var re=Da.select(this),H=re.select(".text-math-group");if(H.empty()){var te=pa.bBox(re.node()),ue=0;O?(te.right>Y||te.left<$)&&(ue=1):(te.bottom>Y||te.top+(r.tickangle?0:G.fontSize/4)<$)&&(ue=1);var de=re.select("text");ue?P&&de.style("opacity",0):(de.style("opacity",1),q==="bottom"||q==="right"?Z=Math.min(Z,O?te.top:te.left):Z=-1/0,q==="top"||q==="left"?ne=Math.max(ne,O?te.bottom:te.right):ne=1/0)}});for(var Q in n._plots){var oe=n._plots[Q];if(!(r._id!==oe.xaxis._id&&r._id!==oe.yaxis._id)){var ee=O?oe.yaxis:oe.xaxis;ee&&(ee["_visibleLabelMin_"+r._id]=Z,ee["_visibleLabelMax_"+r._id]=ne)}}}},r._hideCounterAxisInsideTickLabels=function(L){var P=r._id.charAt(0)==="x",O=[];for(var U in n._plots){var X=n._plots[U];r._id!==X.xaxis._id&&r._id!==X.yaxis._id||O.push(P?X.yaxis:X.xaxis)}O.forEach(function(j,$){j&&If(j)&&(L||[t2,a2,n2,_M,cM]).forEach(function(Y){var q=Y.K==="tick"&&Y.L==="text"&&r.ticklabelmode==="period",Z=n._plots[r._mainSubplot],ne;Y.K===t2.K?ne=Z.zerolinelayer.selectAll("."+r._id+"zl"):Y.K===a2.K?ne=Z.minorGridlayer.selectAll("."+r._id):Y.K===n2.K?ne=Z.gridlayer.selectAll("."+r._id):ne=Z[r._id.charAt(0)+"axislayer"],ne.each(function(){var Q=Da.select(this);Y.L&&(Q=Q.selectAll(Y.L)),Q.each(function(oe){var ee=r.l2p(q?i2(oe):oe.x)+r._offset,G=Da.select(this);eer["_visibleLabelMin_"+j._id]?G.style("display","none"):Y.K==="tick"&&!$&&G.style("display",null)})})})})},g(f,s+1?s:u);function b(){return v.length&&Promise.all(v)}var y=null;function w(){if(g(f,u),i.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){y=r.autotickangles[0];var L=0,P=[],O,U=1;f.each(function(De){L=Math.max(L,De.fontSize);var Ce=r.l2p(De.x),Oe=o2(this),Ue=pa.bBox(Oe.node());U=Math.max(U,Bl.lineCount(Oe)),P.push({top:0,bottom:10,height:10,left:Ce-Ue.width/2,right:Ce+Ue.width/2+2,width:Ue.width+2})});var X=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,j=i.length,$=Math.abs((i[j-1].x-i[0].x)*r._m)/(j-1),Y=X?$/2:$,q=X?r.ticklen:L*1.25*U,Z=Math.sqrt(Math.pow(Y,2)+Math.pow(q,2)),ne=Y/Z,Q=r.autotickangles.map(function(De){return De*Math.PI/180}),oe=Q.find(function(De){return Math.abs(Math.cos(De))<=ne});oe===void 0&&(oe=Q.reduce(function(De,Ce){return Math.abs(Math.cos(De))N*D&&(h=D,p[_]=c[_]=R[_])}var I=Math.abs(h-k);I-x>0?(I-=x,x*=1+x/I):x=0,r._id.charAt(0)!=="y"&&(x=-x),p[d]=A.p2r(A.r2p(c[d])+T*x),A.autorange==="min"||A.autorange==="max reversed"?(p[0]=null,A._rangeInitial0=void 0,A._rangeInitial1=void 0):(A.autorange==="max"||A.autorange==="min reversed")&&(p[1]=null,A._rangeInitial0=void 0,A._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[A._name+".range"]=p}var F=Lr.syncOrAsync(M);return F&&F.then&&e._promises.push(F),F};function MX(e,r,t){var n=r._id+"divider",a=t.vals,o=t.layer.selectAll("path."+n).data(a,Wv);o.exit().remove(),o.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(Rf.stroke,r.dividercolor).style("stroke-width",pa.crispRound(e,r.dividerwidth,1)+"px"),o.attr("transform",t.transFn).attr("d",t.path)}lr.getPxPosition=function(e,r){var t=e._fullLayout._size,n=r._id.charAt(0),a=r.side,o;if(r.anchor!=="free"?o=r._anchorAxis:n==="x"?o={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:n==="y"&&(o={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),a==="top"||a==="left")return o._offset;if(a==="bottom"||a==="right")return o._offset+o._length};function bM(e){var r=e.title.font.size,t=(e.title.text.match(Bl.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(Hl+t*Pf):t?r*(t+1)*Pf:r}function TX(e,r){var t=e._fullLayout,n=r._id,a=n.charAt(0),o=r.title.font.size,i,l=(r.title.text.match(Bl.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?i=r._depth+r.title.standoff+o*Hl:(r.side==="top"||r.side==="left")&&(i=r._depth+r.title.standoff+o*(Ef+l*Pf));else{var u=If(r);if(r.type==="multicategory")i=r._depth;else{var s=1.5*o;u&&(s=.5*o,r.ticks==="outside"&&(s+=r.ticklen)),i=10+s+(r.linewidth?r.linewidth-1:0)}u||(a==="x"?i+=r.side==="top"?o*(r.showticklabels?1:0):o*(r.showticklabels?1.5:.5):i+=r.side==="right"?o*(r.showticklabels?1:.5):o*(r.showticklabels?.5:0))}var f=lr.getPxPosition(e,r),v,g,b;a==="x"?(g=r._offset+r._length/2,b=r.side==="top"?f-i:f+i):(b=r._offset+r._length/2,g=r.side==="right"?f+i:f-i,v={rotate:"-90",offset:0});var y;if(r.type!=="multicategory"){var w=r._selections[r._id+"tick"];if(y={selection:w,side:r.side},w&&w.node()&&w.node().parentNode){var M=pa.getTranslate(w.node().parentNode);y.offsetLeft=M.x,y.offsetTop=M.y}r.title.hasOwnProperty("standoff")&&(y.pad=0)}return r._titleStandoff=i,GW.draw(e,n+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[a],avoid:y,transform:v,attributes:{x:g,y:b,"text-anchor":"middle"}})}lr.shouldShowZeroLine=function(e,r,t){var n=Lr.simpleMap(r.range,r.r2l);return n[0]*n[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===Gv)&&(CM(r,0)||!AX(e,r,t,n)||kX(e,r))};lr.clipEnds=function(e,r){return r.filter(function(t){return CM(e,t.x)})};function CM(e,r){var t=e.l2p(r);return t>1&&t1)for(a=1;a=a.min&&e=KW:/%L/.test(r)?e>=JW:/%[SX]/.test(r)?e>=Uv:/%M/.test(r)?e>=Df:/%[HI]/.test(r)?e>=Fi:/%p/.test(r)?e>=Ho:/%[Aadejuwx]/.test(r)?e>=On:/%[UVW]/.test(r)?e>=ga:/%[Bbm]/.test(r)?e>=Bv:/%[q]/.test(r)?e>=Ov:/%[Yy]/.test(r)?e>=qv:!0}});var PM=pe((Lce,DM)=>{"use strict";DM.exports=function(r,t,n){var a,o;if(n){var i=t==="reversed"||t==="min reversed"||t==="max reversed";a=n[i?1:0],o=n[i?0:1]}var l=r("autorangeoptions.minallowed",o===null?a:void 0),u=r("autorangeoptions.maxallowed",a===null?o:void 0);l===void 0&&r("autorangeoptions.clipmin"),u===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var v2=pe((Rce,FM)=>{"use strict";var DX=PM();FM.exports=function(r,t,n,a){var o=t._template||{},i=t.type||o.type||"-";n("minallowed"),n("maxallowed");var l=n("range");if(!l){var u;!a.noInsiderange&&i!=="log"&&(u=n("insiderange"),u&&(u[0]===null||u[1]===null)&&(t.insiderange=!1,u=void 0),u&&(l=n("range",u)))}var s=t.getAutorangeDflt(l,a),f=n("autorange",s),v;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,v=!0),v||(s=t.getAutorangeDflt(l,a),f=n("autorange",s)),f&&(DX(n,f,l),(i==="linear"||i==="-")&&n("rangemode")),t.cleanRange()}});var NM=pe((Dce,IM)=>{var PX={left:0,top:0};IM.exports=FX;function FX(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var n=e.clientX||0,a=e.clientY||0,o=IX(r);return t[0]=n-o.left,t[1]=a-o.top,t}function IX(e){return e===window||e===document||e===document.body?PX:e.getBoundingClientRect()}});var Zv=pe((Pce,zM)=>{"use strict";var NX=Vp();function zX(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}zM.exports=NX&&zX()});var OM=pe((Fce,qM)=>{"use strict";qM.exports=function(r,t,n,a,o){var i=(r-n)/(a-n),l=i+t/(a-n),u=(i+l)/2;return o==="left"||o==="bottom"?i:o==="center"||o==="middle"?u:o==="right"||o==="top"?l:i<2/3-u?i:l>4/3-u?l:u}});var HM=pe((Ice,UM)=>{"use strict";var BM=ir(),qX=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];UM.exports=function(r,t,n,a){return n==="left"?r=0:n==="center"?r=1:n==="right"?r=2:r=BM.constrain(Math.floor(r*3),0,2),a==="bottom"?t=0:a==="middle"?t=1:a==="top"?t=2:t=BM.constrain(Math.floor(t*3),0,2),qX[t][r]}});var GM=pe((Nce,VM)=>{"use strict";var OX=mf(),BX=Jc(),UX=ff().getGraphDiv,HX=sf(),h2=VM.exports={};h2.wrapped=function(e,r,t){e=UX(e),e._fullLayout&&BX.clear(e._fullLayout._uid+HX.HOVERID),h2.raw(e,r,t)};h2.raw=function(r,t){var n=r._fullLayout,a=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&OX.triggerHandler(r,"plotly_beforehover",t)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&a&&r.emit("plotly_unhover",{event:t,points:a}))}});var ti=pe((zce,XM)=>{"use strict";var VX=NM(),d2=Yp(),GX=Zv(),YX=ir().removeElement,WX=wn(),Vl=XM.exports={};Vl.align=OM();Vl.getCursor=HM();var YM=GM();Vl.unhover=YM.wrapped;Vl.unhoverRaw=YM.raw;Vl.init=function(r){var t=r.gd,n=1,a=t._context.doubleClickDelay,o=r.element,i,l,u,s,f,v,g,b;t._mouseDownTime||(t._mouseDownTime=0),o.style.pointerEvents="all",o.onmousedown=M,GX?(o._ontouchstart&&o.removeEventListener("touchstart",o._ontouchstart),o._ontouchstart=M,o.addEventListener("touchstart",M,{passive:!1})):o.ontouchstart=M;function y(S,x,T){return Math.abs(S)a&&(n=Math.max(n-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(n,v),!b){var x;try{x=new MouseEvent("click",S)}catch(d){var T=p2(S);x=document.createEvent("MouseEvents"),x.initMouseEvent("click",S.bubbles,S.cancelable,S.view,S.detail,S.screenX,S.screenY,T[0],T[1],S.ctrlKey,S.altKey,S.shiftKey,S.metaKey,S.button,S.relatedTarget)}g.dispatchEvent(x)}t._dragging=!1,t._dragged=!1}};function WM(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}Vl.coverSlip=WM;function p2(e){return VX(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Vo=pe((qce,ZM)=>{"use strict";ZM.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&r.classed(n,!1)}),t&&r.classed("cursor-"+t,!0)}});var QM=pe((Oce,KM)=>{"use strict";var g2=Vo(),Nf="data-savedcursor",JM="!!";KM.exports=function(r,t){var n=r.attr(Nf);if(t){if(!n){for(var a=(r.attr("class")||"").split(" "),o=0;o{"use strict";var y2=kn(),XX=Ti();$M.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:XX.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:y2({editType:"legend"}),grouptitlefont:y2({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:y2({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Kv=pe(Jv=>{"use strict";Jv.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};Jv.isVertical=function(r){return r.orientation!=="h"};Jv.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var _2=pe((Hce,jM)=>{"use strict";var x2=Er(),ya=ir(),ZX=gt(),JX=Sn(),KX=m2(),QX=Ds(),b2=Kv();function $X(e,r,t,n){var a=r[e]||{},o=ZX.newContainer(t,e);function i(F,L){return ya.coerce(a,o,KX,F,L)}var l=ya.coerceFont(i,"font",t.font);i("bgcolor",t.paper_bgcolor),i("bordercolor");var u=i("visible");if(u){for(var s,f=function(F,L){var P=s._input,O=s;return ya.coerce(P,O,JX,F,L)},v=t.font||{},g=ya.coerceFont(i,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),b=0,y=!1,w="normal",M=(t.shapes||[]).filter(function(F){return F.showlegend}),m=n.concat(M).filter(function(F){return e===(F.legend||"legend")}),A=0;A(e==="legend"?1:0));if(x===!1&&(t[e]=void 0),!(x===!1&&!a.uirevision)&&(i("uirevision",t.uirevision),x!==!1)){i("borderwidth");var T=i("orientation"),d=i("yref"),_=i("xref"),p=T==="h",c=d==="paper",k=_==="paper",h,R,E,D="left";p?(h=0,x2.getComponentMethod("rangeslider","isVisible")(r.xaxis)?c?(R=1.1,E="bottom"):(R=1,E="top"):c?(R=-.1,E="top"):(R=0,E="bottom")):(R=1,E="auto",k?h=1.02:(h=1,D="right")),ya.coerce(a,o,{x:{valType:"number",editType:"legend",min:k?-2:0,max:k?3:1,dflt:h}},"x"),ya.coerce(a,o,{y:{valType:"number",editType:"legend",min:c?-2:0,max:c?3:1,dflt:R}},"y"),i("traceorder",w),b2.isGrouped(t[e])&&i("tracegroupgap"),i("entrywidth"),i("entrywidthmode"),i("indentation"),i("itemsizing"),i("itemwidth"),i("itemclick"),i("itemdoubleclick"),i("groupclick"),i("xanchor",D),i("yanchor",E),i("valign"),ya.noneOrAll(a,o,["x","y"]);var N=i("title.text");if(N){i("title.side",p?"left":"top");var I=ya.extendFlat({},l,{size:ya.bigFont(l.size)});ya.coerceFont(i,"title.font",I)}}}}jM.exports=function(r,t,n){var a,o=n.slice(),i=t.shapes;if(i)for(a=0;a{"use strict";var tu=Er(),M2=ir(),jX=M2.pushUnique,w2=!0;e9.exports=function(r,t,n){var a=t._fullLayout;if(t._dragged||t._editing)return;var o=a.legend.itemclick,i=a.legend.itemdoubleclick,l=a.legend.groupclick;n===1&&o==="toggle"&&i==="toggleothers"&&w2&&t.data&&t._context.showTips&&M2.notifier(M2._(t,"Double-click on legend to isolate one trace"),"long"),w2=!1;var u;if(n===1?u=o:n===2&&(u=i),!u)return;var s=l==="togglegroup",f=a.hiddenlabels?a.hiddenlabels.slice():[],v=r.data()[0][0];if(v.groupTitle&&v.noClick)return;var g=t._fullData,b=(a.shapes||[]).filter(function(Ae){return Ae.showlegend}),y=g.concat(b),w=v.trace;w._isShape&&(w=w._fullInput);var M=w.legendgroup,m,A,S,x,T,d,_={},p=[],c=[],k=[];function h(Ae,ke){var De=p.indexOf(Ae),Ce=_.visible;return Ce||(Ce=_.visible=[]),p.indexOf(Ae)===-1&&(p.push(Ae),De=p.length-1),Ce[De]=ke,De}var R=(a.shapes||[]).map(function(Ae){return Ae._input}),E=!1;function D(Ae,ke){R[Ae].visible=ke,E=!0}function N(Ae,ke){if(!(v.groupTitle&&!s)){var De=Ae._fullInput||Ae,Ce=De._isShape,Oe=De.index;Oe===void 0&&(Oe=De._index);var Ue=De.visible===!1?!1:ke;Ce?D(Oe,Ue):h(Oe,Ue)}}var I=w.legend,F=w._fullInput,L=F&&F._isShape;if(!L&&tu.traceIs(w,"pie-like")){var P=v.label,O=f.indexOf(P);if(u==="toggle")O===-1?f.push(P):f.splice(O,1);else if(u==="toggleothers"){var U=O!==-1,X=[];for(m=0;m{"use strict";t9.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var i9=pe((Yce,a9)=>{"use strict";var n9=Er(),A2=Kv();a9.exports=function(r,t,n){var a=t._inHover,o=A2.isGrouped(t),i=A2.isReversed(t),l={},u=[],s=!1,f={},v=0,g=0,b,y;function w(F,L,P){if(t.visible!==!1&&!(n&&F!==t._id))if(L===""||!A2.isGrouped(t)){var O="~~i"+v;u.push(O),l[O]=[P],v++}else u.indexOf(L)===-1?(u.push(L),s=!0,l[L]=[P]):l[L].push(P)}for(b=0;bk&&(c=k)}_[b][0]._groupMinRank=c,_[b][0]._preGroupSort=b}var h=function(F,L){return F[0]._groupMinRank-L[0]._groupMinRank||F[0]._preGroupSort-L[0]._preGroupSort},R=function(F,L){return F.trace.legendrank-L.trace.legendrank||F._preSort-L._preSort};for(_.forEach(function(F,L){F[0]._preGroupSort=L}),_.sort(h),b=0;b<_.length;b++){_[b].forEach(function(F,L){F._preSort=L}),_[b].sort(R);var E=_[b][0].trace,D=null;for(y=0;y<_[b].length;y++){var N=_[b][y].trace.legendgrouptitle;if(N&&N.text){D=N,a&&(N.font=t._groupTitleFont);break}}if(i&&_[b].reverse(),D){var I=!1;for(y=0;y<_[b].length;y++)if(n9.traceIs(_[b][y].trace,"pie-like")){I=!0;break}_[b].unshift({i:-1,groupTitle:D,noClick:I,trace:{showlegend:E.showlegend,legendgroup:E.legendgroup,visible:t.groupclick==="toggleitem"?!0:E.visible}})}for(y=0;y<_[b].length;y++)_[b][y]=[_[b][y]]}return t._lgroupsLength=_.length,t._maxNameLength=g,_}});var k2=pe(Gl=>{"use strict";var Qv=ir();function o9(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Gl.formatPiePercent=function(r,t){var n=o9((r*100).toPrecision(3));return Qv.numSeparate(n,t)+"%"};Gl.formatPieValue=function(r,t){var n=o9(r.toPrecision(10));return Qv.numSeparate(n,t)};Gl.getFirstFilled=function(r,t){if(Qv.isArrayOrTypedArray(r))for(var n=0;n{"use strict";var eZ=yt(),rZ=Zr();l9.exports=function(r,t,n,a){var o=n.marker.pattern;o&&o.shape?eZ.pointStyle(r,n,a,t):rZ.fill(r,t.color)}});var v9=pe((Zce,c9)=>{"use strict";var u9=Zr(),f9=k2().castOption,tZ=s9();c9.exports=function(r,t,n,a){var o=n.marker.line,i=f9(o.color,t.pts)||u9.defaultLine,l=f9(o.width,t.pts)||0;r.call(tZ,t,n,a).style("stroke-width",l).call(u9.stroke,i)}});var L2=pe((Jce,m9)=>{"use strict";var Bn=it(),S2=Er(),En=ir(),h9=En.strTranslate,Wn=yt(),Pa=Zr(),C2=Si().extractOpts,$v=oa(),nZ=v9(),aZ=k2().castOption,iZ=T2(),d9=12,p9=5,Yl=2,oZ=10,nu=5;m9.exports=function(r,t,n){var a=t._fullLayout;n||(n=a.legend);var o=n.itemsizing==="constant",i=n.itemwidth,l=(i+iZ.itemGap*2)/2,u=h9(l,0),s=function(_,p,c,k){var h;if(_+1)h=_;else if(p&&p.width>0)h=p.width;else return 0;return o?k:Math.min(h,c)};r.each(function(_){var p=Bn.select(this),c=En.ensureSingle(p,"g","layers");c.style("opacity",_[0].trace.opacity);var k=n.indentation,h=n.valign,R=_[0].lineHeight,E=_[0].height;if(h==="middle"&&k===0||!R||!E)c.attr("transform",null);else{var D={top:1,bottom:-1}[h],N=D*(.5*(R-E+3))||0,I=n.indentation;c.attr("transform",h9(I,N))}var F=c.selectAll("g.legendfill").data([_]);F.enter().append("g").classed("legendfill",!0);var L=c.selectAll("g.legendlines").data([_]);L.enter().append("g").classed("legendlines",!0);var P=c.selectAll("g.legendsymbols").data([_]);P.enter().append("g").classed("legendsymbols",!0),P.selectAll("g.legendpoints").data([_]).enter().append("g").classed("legendpoints",!0)}).each(d).each(g).each(y).each(b).each(M).each(x).each(S).each(f).each(v).each(m).each(A);function f(_){var p=g9(_),c=p.showFill,k=p.showLine,h=p.showGradientLine,R=p.showGradientFill,E=p.anyFill,D=p.anyLine,N=_[0],I=N.trace,F,L,P=C2(I),O=P.colorscale,U=P.reversescale,X=function(Q){if(Q.size())if(c)Wn.fillGroupStyle(Q,t,!0);else{var oe="legendfill-"+I.uid;Wn.gradient(Q,t,oe,E2(U),O,"fill")}},j=function(Q){if(Q.size()){var oe="legendline-"+I.uid;Wn.lineGroupStyle(Q),Wn.gradient(Q,t,oe,E2(U),O,"stroke")}},$=$v.hasMarkers(I)||!E?"M5,0":D?"M5,-2":"M5,-3",Y=Bn.select(this),q=Y.select(".legendfill").selectAll("path").data(c||R?[_]:[]);if(q.enter().append("path").classed("js-fill",!0),q.exit().remove(),q.attr("d",$+"h"+i+"v6h-"+i+"z").call(X),k||h){var Z=s(void 0,I.line,oZ,p9);L=En.minExtend(I,{line:{width:Z}}),F=[En.minExtend(N,{trace:L})]}var ne=Y.select(".legendlines").selectAll("path").data(k||h?[F]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",$+(h?"l"+i+",0.0001":"h"+i)).call(k?Wn.lineGroupStyle:j)}function v(_){var p=g9(_),c=p.anyFill,k=p.anyLine,h=p.showLine,R=p.showMarker,E=_[0],D=E.trace,N=!R&&!k&&!c&&$v.hasText(D),I,F;function L(q,Z,ne,Q){var oe=En.nestedProperty(D,q).get(),ee=En.isArrayOrTypedArray(oe)&&Z?Z(oe):oe;if(o&&ee&&Q!==void 0&&(ee=Q),ne){if(eene[1])return ne[1]}return ee}function P(q){return E._distinct&&E.index&&q[E.index]?q[E.index]:q[0]}if(R||N||h){var O={},U={};if(R){O.mc=L("marker.color",P),O.mx=L("marker.symbol",P),O.mo=L("marker.opacity",En.mean,[.2,1]),O.mlc=L("marker.line.color",P),O.mlw=L("marker.line.width",En.mean,[0,5],Yl),U.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var X=L("marker.size",En.mean,[2,16],d9);O.ms=X,U.marker.size=X}h&&(U.line={width:L("line.width",P,[0,10],p9)}),N&&(O.tx="Aa",O.tp=L("textposition",P),O.ts=10,O.tc=L("textfont.color",P),O.tf=L("textfont.family",P),O.tw=L("textfont.weight",P),O.ty=L("textfont.style",P),O.tv=L("textfont.variant",P),O.tC=L("textfont.textcase",P),O.tE=L("textfont.lineposition",P),O.tS=L("textfont.shadow",P)),I=[En.minExtend(E,O)],F=En.minExtend(D,U),F.selectedpoints=null,F.texttemplate=null}var j=Bn.select(this).select("g.legendpoints"),$=j.selectAll("path.scatterpts").data(R?I:[]);$.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",u),$.exit().remove(),$.call(Wn.pointStyle,F,t),R&&(I[0].mrc=3);var Y=j.selectAll("g.pointtext").data(N?I:[]);Y.enter().append("g").classed("pointtext",!0).append("text").attr("transform",u),Y.exit().remove(),Y.selectAll("text").call(Wn.textPointStyle,F,t)}function g(_){var p=_[0].trace,c=p.type==="waterfall";if(_[0]._distinct&&c){var k=_[0].trace[_[0].dir].marker;return _[0].mc=k.color,_[0].mlw=k.line.width,_[0].mlc=k.line.color,w(_,this,"waterfall")}var h=[];p.visible&&c&&(h=_[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 R=Bn.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(h);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",u).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(E){var D=Bn.select(this),N=p[E[0]].marker,I=s(void 0,N.line,nu,Yl);D.attr("d",E[1]).style("stroke-width",I+"px").call(Pa.fill,N.color),I&&D.call(Pa.stroke,N.line.color)})}function b(_){w(_,this)}function y(_){w(_,this,"funnel")}function w(_,p,c){var k=_[0].trace,h=k.marker||{},R=h.line||{},E=h.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",D=c?k.visible&&k.type===c:S2.traceIs(k,"bar"),N=Bn.select(p).select("g.legendpoints").selectAll("path.legend"+c).data(D?[_]:[]);N.enter().append("path").classed("legend"+c,!0).attr("d",E).attr("transform",u),N.exit().remove(),N.each(function(I){var F=Bn.select(this),L=I[0],P=s(L.mlw,h.line,nu,Yl);F.style("stroke-width",P+"px");var O=L.mcc;if(!n._inHover&&"mc"in L){var U=C2(h),X=U.mid;X===void 0&&(X=(U.max+U.min)/2),O=Wn.tryColorscale(h,"")(X)}var j=O||L.mc||h.color,$=h.pattern,Y=$&&Wn.getPatternAttr($.shape,0,"");if(Y){var q=Wn.getPatternAttr($.bgcolor,0,null),Z=Wn.getPatternAttr($.fgcolor,0,null),ne=$.fgopacity,Q=y9($.size,8,10),oe=y9($.solidity,.5,1),ee="legend-"+k.uid;F.call(Wn.pattern,"legend",t,ee,Y,Q,oe,O,$.fillmode,q,Z,ne)}else F.call(Pa.fill,j);P&&Pa.stroke(F,L.mlc||R.color)})}function M(_){var p=_[0].trace,c=Bn.select(this).select("g.legendpoints").selectAll("path.legendbox").data(p.visible&&S2.traceIs(p,"box-violin")?[_]:[]);c.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),c.exit().remove(),c.each(function(){var k=Bn.select(this);if((p.boxpoints==="all"||p.points==="all")&&Pa.opacity(p.fillcolor)===0&&Pa.opacity((p.line||{}).color)===0){var h=En.minExtend(p,{marker:{size:o?d9:En.constrain(p.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});c.call(Wn.pointStyle,h,t)}else{var R=s(void 0,p.line,nu,Yl);k.style("stroke-width",R+"px").call(Pa.fill,p.fillcolor),R&&Pa.stroke(k,p.line.color)}})}function m(_){var p=_[0].trace,c=Bn.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(p.visible&&p.type==="candlestick"?[_,_]:[]);c.enter().append("path").classed("legendcandle",!0).attr("d",function(k,h){return h?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",u).style("stroke-miterlimit",1),c.exit().remove(),c.each(function(k,h){var R=Bn.select(this),E=p[h?"increasing":"decreasing"],D=s(void 0,E.line,nu,Yl);R.style("stroke-width",D+"px").call(Pa.fill,E.fillcolor),D&&Pa.stroke(R,E.line.color)})}function A(_){var p=_[0].trace,c=Bn.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(p.visible&&p.type==="ohlc"?[_,_]:[]);c.enter().append("path").classed("legendohlc",!0).attr("d",function(k,h){return h?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",u).style("stroke-miterlimit",1),c.exit().remove(),c.each(function(k,h){var R=Bn.select(this),E=p[h?"increasing":"decreasing"],D=s(void 0,E.line,nu,Yl);R.style("fill","none").call(Wn.dashLine,E.line.dash,D),D&&Pa.stroke(R,E.line.color)})}function S(_){T(_,this,"pie")}function x(_){T(_,this,"funnelarea")}function T(_,p,c){var k=_[0],h=k.trace,R=c?h.visible&&h.type===c:S2.traceIs(h,c),E=Bn.select(p).select("g.legendpoints").selectAll("path.legend"+c).data(R?[_]:[]);if(E.enter().append("path").classed("legend"+c,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),E.exit().remove(),E.size()){var D=h.marker||{},N=s(aZ(D.line.width,k.pts),D.line,nu,Yl),I="pieLike",F=En.minExtend(h,{marker:{line:{width:N}}},I),L=En.minExtend(k,{trace:F},I);nZ(E,L,F,t)}}function d(_){var p=_[0].trace,c,k=[];if(p.visible)switch(p.type){case"histogram2d":case"heatmap":k=[["M-15,-2V4H15V-2Z"]],c=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":k=[["M-6,-6V6H6V-6Z"]],c=!0;break;case"densitymapbox":case"densitymap":k=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],c="radial";break;case"cone":k=[["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"]],c=!1;break;case"streamtube":k=[["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"]],c=!1;break;case"surface":k=[["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"]],c=!0;break;case"mesh3d":k=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],c=!1;break;case"volume":k=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],c=!0;break;case"isosurface":k=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],c=!1;break}var h=Bn.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(k);h.enter().append("path").classed("legend3dandfriends",!0).attr("transform",u).style("stroke-miterlimit",1),h.exit().remove(),h.each(function(R,E){var D=Bn.select(this),N=C2(p),I=N.colorscale,F=N.reversescale,L=function(X){if(X.size()){var j="legendfill-"+p.uid;Wn.gradient(X,t,j,E2(F,c==="radial"),I,"fill")}},P;if(I){if(!c){var U=I.length;P=E===0?I[F?U-1:0][1]:E===1?I[F?0:U-1][1]:I[Math.floor((U-1)/2)][1]}}else{var O=p.vertexcolor||p.facecolor||p.color;P=En.isArrayOrTypedArray(O)?O[E]||O[0]:O}D.attr("d",R[0]),P?D.call(Pa.fill,P):D.call(L)})}};function E2(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function g9(e){var r=e[0].trace,t=r.contours,n=$v.hasLines(r),a=$v.hasMarkers(r),o=r.visible&&r.fill&&r.fill!=="none",i=!1,l=!1;if(t){var u=t.coloring;u==="lines"?i=!0:n=u==="none"||u==="heatmap"||t.showlines,t.type==="constraint"?o=t._operation!=="=":(u==="fill"||u==="heatmap")&&(l=!0)}return{showMarker:a,showLine:n,showFill:o,showGradientLine:i,showGradientFill:l,anyLine:n||i,anyFill:o||l}}function y9(e,r,t){return e&&En.isArrayOrTypedArray(e)?r:e>t?t:e}});var F2=pe((Kce,C9)=>{"use strict";var la=it(),Xt=ir(),D2=ln(),ou=Er(),x9=mf(),R2=ti(),Zt=yt(),eh=Zr(),Wl=Yn(),b9=r9(),en=T2(),P2=qn(),k9=P2.LINE_SPACING,iu=P2.FROM_TL,_9=P2.FROM_BR,w9=i9(),lZ=L2(),M9=Kv(),au=1,sZ=/^legend[0-9]*$/;C9.exports=function(r,t){if(t)T9(r,t);else{var n=r._fullLayout,a=n._legends,o=n._infolayer.selectAll('[class^="legend"]');o.each(function(){var s=la.select(this),f=s.attr("class"),v=f.split(" ")[0];v.match(sZ)&&a.indexOf(v)===-1&&s.remove()});for(var i=0;i1)}var y=n.hiddenlabels||[];if(!l&&(!n.showlegend||!u.length))return i.selectAll("."+a).remove(),n._topdefs.select("#"+o).remove(),D2.autoMargin(e,a);var w=Xt.ensureSingle(i,"g",a,function(p){l||p.attr("pointer-events","all")}),M=Xt.ensureSingleById(n._topdefs,"clipPath",o,function(p){p.append("rect")}),m=Xt.ensureSingle(w,"rect","bg",function(p){p.attr("shape-rendering","crispEdges")});m.call(eh.stroke,t.bordercolor).call(eh.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var A=Xt.ensureSingle(w,"g","scrollbox"),S=t.title;t._titleWidth=0,t._titleHeight=0;var x;S.text?(x=Xt.ensureSingle(A,"text",a+"titletext"),x.attr("text-anchor","start").call(Zt.font,S.font).text(S.text),rh(x,A,e,t,au)):A.selectAll("."+a+"titletext").remove();var T=Xt.ensureSingle(w,"rect","scrollbar",function(p){p.attr(en.scrollBarEnterAttrs).call(eh.fill,en.scrollBarColor)}),d=A.selectAll("g.groups").data(u);d.enter().append("g").attr("class","groups"),d.exit().remove();var _=d.selectAll("g.traces").data(Xt.identity);_.enter().append("g").attr("class","traces"),_.exit().remove(),_.style("opacity",function(p){var c=p[0].trace;return ou.traceIs(c,"pie-like")?y.indexOf(p[0].label)!==-1?.5:1:c.visible==="legendonly"?.5:1}).each(function(){la.select(this).call(fZ,e,t)}).call(lZ,e,t).each(function(){l||la.select(this).call(cZ,e,a)}),Xt.syncOrAsync([D2.previousPromises,function(){return dZ(e,d,_,t)},function(){var p=n._size,c=t.borderwidth,k=t.xref==="paper",h=t.yref==="paper";if(S.text&&uZ(x,t,c),!l){var R,E;k?R=p.l+p.w*t.x-iu[th(t)]*t._width:R=n.width*t.x-iu[th(t)]*t._width,h?E=p.t+p.h*(1-t.y)-iu[nh(t)]*t._effHeight:E=n.height*(1-t.y)-iu[nh(t)]*t._effHeight;var D=pZ(e,a,R,E);if(D)return;if(n.margin.autoexpand){var N=R,I=E;R=k?Xt.constrain(R,0,n.width-t._width):N,E=h?Xt.constrain(E,0,n.height-t._effHeight):I,R!==N&&Xt.log("Constrain "+a+".x to make legend fit inside graph"),E!==I&&Xt.log("Constrain "+a+".y to make legend fit inside graph")}Zt.setTranslate(w,R,E)}if(T.on(".drag",null),w.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var F=t._effHeight;l&&(F=t._height),m.attr({width:t._width-c,height:F-c,x:c/2,y:c/2}),Zt.setTranslate(A,0,0),M.select("rect").attr({width:t._width-2*c,height:F-2*c,x:c,y:c}),Zt.setClipUrl(A,o,e),Zt.setRect(T,0,0,0,0),delete t._scrollY}else{var L=Math.max(en.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),P=t._effHeight-L-2*en.scrollBarMargin,O=t._height-t._effHeight,U=P/O,X=Math.min(t._scrollY||0,O);m.attr({width:t._width-2*c+en.scrollBarWidth+en.scrollBarMargin,height:t._effHeight-c,x:c/2,y:c/2}),M.select("rect").attr({width:t._width-2*c+en.scrollBarWidth+en.scrollBarMargin,height:t._effHeight-2*c,x:c,y:c+X}),Zt.setClipUrl(A,o,e),oe(X,L,U),w.on("wheel",function(){X=Xt.constrain(t._scrollY+la.event.deltaY/P*O,0,O),oe(X,L,U),X!==0&&X!==O&&la.event.preventDefault()});var j,$,Y,q=function(te,ue,de){var Ee=(de-ue)/U+te;return Xt.constrain(Ee,0,O)},Z=function(te,ue,de){var Ee=(ue-de)/U+te;return Xt.constrain(Ee,0,O)},ne=la.behavior.drag().on("dragstart",function(){var te=la.event.sourceEvent;te.type==="touchstart"?j=te.changedTouches[0].clientY:j=te.clientY,Y=X}).on("drag",function(){var te=la.event.sourceEvent;te.buttons===2||te.ctrlKey||(te.type==="touchmove"?$=te.changedTouches[0].clientY:$=te.clientY,X=q(Y,j,$),oe(X,L,U))});T.call(ne);var Q=la.behavior.drag().on("dragstart",function(){var te=la.event.sourceEvent;te.type==="touchstart"&&(j=te.changedTouches[0].clientY,Y=X)}).on("drag",function(){var te=la.event.sourceEvent;te.type==="touchmove"&&($=te.changedTouches[0].clientY,X=Z(Y,j,$),oe(X,L,U))});A.call(Q)}function oe(te,ue,de){t._scrollY=e._fullLayout[a]._scrollY=te,Zt.setTranslate(A,0,-te),Zt.setRect(T,t._width,en.scrollBarMargin+te*de,en.scrollBarWidth,ue),M.select("rect").attr("y",c+te)}if(e._context.edits.legendPosition){var ee,G,re,H;w.classed("cursor-move",!0),R2.init({element:w.node(),gd:e,prepFn:function(te){if(te.target!==T.node()){var ue=Zt.getTranslate(w);re=ue.x,H=ue.y}},moveFn:function(te,ue){if(re!==void 0&&H!==void 0){var de=re+te,Ee=H+ue;Zt.setTranslate(w,de,Ee),ee=R2.align(de,t._width,p.l,p.l+p.w,t.xanchor),G=R2.align(Ee+t._height,-t._height,p.t+p.h,p.t,t.yanchor)}},doneFn:function(){if(ee!==void 0&&G!==void 0){var te={};te[a+".x"]=ee,te[a+".y"]=G,ou.call("_guiRelayout",e,te)}},clickFn:function(te,ue){var de=i.selectAll("g.traces").filter(function(){var Ee=this.getBoundingClientRect();return ue.clientX>=Ee.left&&ue.clientX<=Ee.right&&ue.clientY>=Ee.top&&ue.clientY<=Ee.bottom});de.size()>0&&S9(e,w,de,te,ue)}})}}],e)}}function jv(e,r,t){var n=e[0],a=n.width,o=r.entrywidthmode,i=n.trace.legendwidth||r.entrywidth;return o==="fraction"?r._maxWidth*i:t+(i||a)}function S9(e,r,t,n,a){var o=t.data()[0][0].trace,i={event:a,node:t.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};o._group&&(i.group=o._group),ou.traceIs(o,"pie-like")&&(i.label=t.datum()[0].label);var l=x9.triggerHandler(e,"plotly_legendclick",i);if(n===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&b9(t,e,n)},e._context.doubleClickDelay)}else if(n===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var u=x9.triggerHandler(e,"plotly_legenddoubleclick",i);u!==!1&&l!==!1&&b9(t,e,n)}}function fZ(e,r,t){var n=ah(t),a=e.data()[0][0],o=a.trace,i=ou.traceIs(o,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!i,u=t._maxNameLength,s,f;a.groupTitle?(s=a.groupTitle.text,f=a.groupTitle.font):(f=t.font,t.entries?s=a.text:(s=i?a.label:o.name,o._meta&&(s=Xt.templateString(s,o._meta))));var v=Xt.ensureSingle(e,"text",n+"text");v.attr("text-anchor","start").call(Zt.font,f).text(l?A9(s,u):s);var g=t.indentation+t.itemwidth+en.itemGap*2;Wl.positionText(v,g,0),l?v.call(Wl.makeEditable,{gd:r,text:s}).call(rh,e,r,t).on("edit",function(b){this.text(A9(b,u)).call(rh,e,r,t);var y=a.trace._fullInput||{},w={};return w.name=b,y._isShape?ou.call("_guiRelayout",r,"shapes["+o.index+"].name",w.name):ou.call("_guiRestyle",r,w,o.index)}):rh(v,e,r,t)}function A9(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var n=t-e.length;n>0;n--)e+=" ";return e}function cZ(e,r,t){var n=r._context.doubleClickDelay,a,o=1,i=Xt.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(eh.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(i.on("mousedown",function(){a=new Date().getTime(),a-r._legendMouseDownTimen&&(o=Math.max(o-1,1)),S9(r,l,e,o,la.event)}}))}function rh(e,r,t,n,a){n._inHover&&e.attr("data-notex",!0),Wl.convertToTspans(e,t,function(){vZ(r,t,n,a)})}function vZ(e,r,t,n){var a=e.data()[0][0];if(!t._inHover&&a&&!a.trace.showlegend){e.remove();return}var o=e.select("g[class*=math-group]"),i=o.node(),l=ah(t);t||(t=r._fullLayout[l]);var u=t.borderwidth,s;n===au?s=t.title.font:a.groupTitle?s=a.groupTitle.font:s=t.font;var f=s.size*k9,v,g;if(i){var b=Zt.bBox(i);v=b.height,g=b.width,n===au?Zt.setTranslate(o,u,u+v*.75):Zt.setTranslate(o,0,v*.25)}else{var y="."+l+(n===au?"title":"")+"text",w=e.select(y),M=Wl.lineCount(w),m=w.node();if(v=f*M,g=m?Zt.bBox(m).width:0,n===au)t.title.side==="left"&&(g+=en.itemGap*2),Wl.positionText(w,u+en.titlePad,u+f);else{var A=en.itemGap*2+t.indentation+t.itemwidth;a.groupTitle&&(A=en.itemGap,g-=t.indentation+t.itemwidth),Wl.positionText(w,A,-f*((M-1)/2-.3))}}n===au?(t._titleWidth=g,t._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=g)}function hZ(e){var r=0,t=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(r=e._titleWidth),n.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function dZ(e,r,t,n){var a=e._fullLayout,o=ah(n);n||(n=a[o]);var i=a._size,l=M9.isVertical(n),u=M9.isGrouped(n),s=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,g=en.itemGap,b=n.indentation+n.itemwidth+g*2,y=2*(f+g),w=nh(n),M=n.y<0||n.y===0&&w==="top",m=n.y>1||n.y===1&&w==="bottom",A=n.tracegroupgap,S={};n._maxHeight=Math.max(M||m?a.height/2:i.h,30);var x=0;n._width=0,n._height=0;var T=hZ(n);if(l)t.each(function(Y){var q=Y[0].height;Zt.setTranslate(this,f+T[0],f+T[1]+n._height+q/2+g),n._height+=q,n._width=Math.max(n._width,Y[0].width)}),x=b+n._width,n._width+=g+b+v,n._height+=y,u&&(r.each(function(Y,q){Zt.setTranslate(this,0,q*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var d=th(n),_=n.x<0||n.x===0&&d==="right",p=n.x>1||n.x===1&&d==="left",c=m||M,k=a.width/2;n._maxWidth=Math.max(_?c&&d==="left"?i.l+i.w:k:p?c&&d==="right"?i.r+i.w:k:i.w,2*b);var h=0,R=0;t.each(function(Y){var q=jv(Y,n,b);h=Math.max(h,q),R+=q}),x=null;var E=0;if(u){var D=0,N=0,I=0;r.each(function(){var Y=0,q=0;la.select(this).selectAll("g.traces").each(function(ne){var Q=jv(ne,n,b),oe=ne[0].height;Zt.setTranslate(this,T[0],T[1]+f+g+oe/2+q),q+=oe,Y=Math.max(Y,Q),S[ne[0].trace.legendgroup]=Y});var Z=Y+g;N>0&&Z+f+N>n._maxWidth?(E=Math.max(E,N),N=0,I+=D+A,D=q):D=Math.max(D,q),Zt.setTranslate(this,N,I),N+=Z}),n._width=Math.max(E,N)+f,n._height=I+D+y}else{var F=t.size(),L=R+v+(F-1)*g=n._maxWidth&&(E=Math.max(E,X),O=0,U+=P,n._height+=P,P=0),Zt.setTranslate(this,T[0]+f+O,T[1]+f+U+q/2+g),X=O+Z+g,O+=ne,P=Math.max(P,q)}),L?(n._width=O+v,n._height=P+y):(n._width=Math.max(E,X)+v,n._height+=P+y)}}n._width=Math.ceil(Math.max(n._width+T[0],n._titleWidth+2*(f+en.titlePad))),n._height=Math.ceil(Math.max(n._height+T[1],n._titleHeight+2*(f+en.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var j=e._context.edits,$=j.legendText||j.legendPosition;t.each(function(Y){var q=la.select(this).select("."+o+"toggle"),Z=Y[0].height,ne=Y[0].trace.legendgroup,Q=jv(Y,n,b);u&&ne!==""&&(Q=S[ne]);var oe=$?b:x||Q;!l&&!s&&(oe+=g/2),Zt.setRect(q,0,-Z/2,oe,Z)})}function pZ(e,r,t,n){var a=e._fullLayout,o=a[r],i=th(o),l=nh(o),u=o.xref==="paper",s=o.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=o.y<.5?"b":"t",v=o.x<.5?"l":"r",g={r:a.width-t,l:t+o._width,b:a.height-n,t:n+o._effHeight};if(u&&s)return D2.autoMargin(e,r,{x:o.x,y:o.y,l:o._width*iu[i],r:o._width*_9[i],b:o._effHeight*_9[l],t:o._effHeight*iu[l]});u?e._fullLayout._reservedMargin[r][f]=g[f]:s||o.orientation==="v"?e._fullLayout._reservedMargin[r][v]=g[v]:e._fullLayout._reservedMargin[r][f]=g[f]}function th(e){return Xt.isRightAnchor(e)?"right":Xt.isCenterAnchor(e)?"center":"left"}function nh(e){return Xt.isBottomAnchor(e)?"bottom":Xt.isMiddleAnchor(e)?"middle":"top"}function ah(e){return e._id||"legend"}});var q2=pe(z2=>{"use strict";var Xl=it(),ao=rt(),E9=ka(),It=ir(),gZ=It.pushUnique,I2=It.strTranslate,yZ=It.strRotate,mZ=mf(),Fa=Yn(),xZ=QM(),Ii=yt(),un=Zr(),ih=ti(),Ni=St(),bZ=wn().zindexSeparator,su=Er(),ni=to(),Zl=sf(),_Z=_2(),wZ=F2(),z9=Zl.YANGLE,N2=Math.PI*z9/180,MZ=1/Math.sin(N2),TZ=Math.cos(N2),AZ=Math.sin(N2),Ct=Zl.HOVERARROWSIZE,$r=Zl.HOVERTEXTPAD,L9={box:!0,ohlc:!0,violin:!0,candlestick:!0},kZ={scatter:!0,scattergl:!0,splom:!0};function R9(e,r){return e.distance-r.distance}z2.hover=function(r,t,n,a){r=It.getGraphDiv(r);var o=t.target;It.throttle(r._fullLayout._uid+Zl.HOVERID,Zl.HOVERMINTIME,function(){SZ(r,t,n,a,o)})};z2.loneHover=function(r,t){var n=!0;Array.isArray(r)||(n=!1,r=[r]);var a=t.gd,o=H9(a),i=V9(a),l=r.map(function(M){var m=M._x0||M.x0||M.x||0,A=M._x1||M.x1||M.x||0,S=M._y0||M.y0||M.y||0,x=M._y1||M.y1||M.y||0,T=M.eventData;if(T){var d=Math.min(m,A),_=Math.max(m,A),p=Math.min(S,x),c=Math.max(S,x),k=M.trace;if(su.traceIs(k,"gl3d")){var h=a._fullLayout[k.scene]._scene.container,R=h.offsetLeft,E=h.offsetTop;d+=R,_+=R,p+=E,c+=E}T.bbox={x0:d+i,x1:_+i,y0:p+o,y1:c+o},t.inOut_bbox&&t.inOut_bbox.push(T.bbox)}else T=!1;return{color:M.color||un.defaultLine,x0:M.x0||M.x||0,x1:M.x1||M.x||0,y0:M.y0||M.y||0,y1:M.y1||M.y||0,xLabel:M.xLabel,yLabel:M.yLabel,zLabel:M.zLabel,text:M.text,name:M.name,idealAlign:M.idealAlign,borderColor:M.borderColor,fontFamily:M.fontFamily,fontSize:M.fontSize,fontColor:M.fontColor,fontWeight:M.fontWeight,fontStyle:M.fontStyle,fontVariant:M.fontVariant,nameLength:M.nameLength,textAlign:M.textAlign,trace:M.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:M.hovertemplate||!1,hovertemplateLabels:M.hovertemplateLabels||!1,eventData:T}}),u=!1,s=O9(l,{gd:a,hovermode:"closest",rotateLabels:u,bgColor:t.bgColor||un.background,container:Xl.select(t.container),outerContainer:t.outerContainer||t.container}),f=s.hoverLabels,v=5,g=0,b=0;f.sort(function(M,m){return M.y0-m.y0}).each(function(M,m){var A=M.y0-M.by/2;A-v_[0]._length||H<0||H>p[0]._length)return ih.unhoverRaw(e,r)}if(r.pointerX=re+_[0]._offset,r.pointerY=H+p[0]._offset,"xval"in r?I=ni.flat(o,r.xval):I=ni.p2c(_,re),"yval"in r?F=ni.flat(o,r.yval):F=ni.p2c(p,H),!ao(I[0])||!ao(F[0]))return It.warn("Fx.hover failed",r,e),ih.unhoverRaw(e,r)}var de=1/0;function Ee(mr,ct){for(P=0;Pne&&(D.splice(0,ne),de=D[0].distance),v&&E!==0&&D.length===0){Z.distance=E,Z.index=!1;var Hr=U._module.hoverPoints(Z,Y,q,"closest",{hoverLayer:l._hoverlayer});if(Hr&&(Hr=Hr.filter(function(nt){return nt.spikeDistance<=E})),Hr&&Hr.length){var Ot,Lt=Hr.filter(function(nt){return nt.xa.showspikes&&nt.xa.spikesnap!=="hovered data"});if(Lt.length){var yn=Lt[0];ao(yn.x0)&&ao(yn.y0)&&(Ot=ve(yn),(!Q.vLinePoint||Q.vLinePoint.spikeDistance>Ot.spikeDistance)&&(Q.vLinePoint=Ot))}var Gt=Hr.filter(function(nt){return nt.ya.showspikes&&nt.ya.spikesnap!=="hovered data"});if(Gt.length){var Rt=Gt[0];ao(Rt.x0)&&ao(Rt.y0)&&(Ot=ve(Rt),(!Q.hLinePoint||Q.hLinePoint.spikeDistance>Ot.spikeDistance)&&(Q.hLinePoint=Ot))}}}}}Ee();function Me(mr,ct,Sr){for(var Ur=null,bt=1/0,zr,Hr=0;Hr0&&Math.abs(mr.distance)he-1;Ge--)Ye(D[Ge]);D=ze,Ce()}var We=e._hoverdata,we=[],Pe=H9(e),Qe=V9(e);for(L=0;L1||D.length>1)||g==="closest"&&oe&&D.length>1,Tr=un.combine(l.plot_bgcolor||un.background,l.paper_bgcolor),Ar=O9(D,{gd:e,hovermode:g,rotateLabels:Cr,bgColor:Tr,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),ft=Ar.hoverLabels;if(ni.isUnifiedHover(g)||(EZ(ft,Cr,l,Ar.commonLabelBoundingBox),U9(ft,Cr,l._invScaleX,l._invScaleY)),a&&a.tagName){var Yr=su.getComponentMethod("annotations","hasClickToShow")(e,we);xZ(Xl.select(a),Yr?"pointer":"")}!a||n||!DZ(e,r,We)||(We&&e.emit("plotly_unhover",{event:r,points:We}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:_,yaxes:p,xvals:I,yvals:F}))}function q9(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 CZ=/([\s\S]*)<\/extra>/;function O9(e,r){var t=r.gd,n=t._fullLayout,a=r.hovermode,o=r.rotateLabels,i=r.bgColor,l=r.container,u=r.outerContainer,s=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||Zl.HOVERFONT,v=r.fontSize||Zl.HOVERFONTSIZE,g=r.fontWeight||n.font.weight,b=r.fontStyle||n.font.style,y=r.fontVariant||n.font.variant,w=r.fontTextcase||n.font.textcase,M=r.fontLineposition||n.font.lineposition,m=r.fontShadow||n.font.shadow,A=e[0],S=A.xa,x=A.ya,T=a.charAt(0),d=T+"Label",_=A[d];if(_===void 0&&S.type==="multicategory")for(var p=0;pn.width-We&&(we=n.width-We),ye.attr("d","M"+(Je-we)+",0L"+(Je-we+Ct)+","+Ge+Ct+"H"+We+"v"+Ge+($r*2+Fe.height)+"H"+-We+"V"+Ge+Ct+"H"+(Je-we-Ct)+"Z"),Je=we,P.minX=Je-We,P.maxX=Je+We,S.side==="top"?(P.minY=Ye-($r*2+Fe.height),P.maxY=Ye-$r):(P.minY=Ye+$r,P.maxY=Ye+($r*2+Fe.height))}else{var Pe,Qe,Ve;x.side==="right"?(Pe="start",Qe=1,Ve="",Je=S._offset+S._length):(Pe="end",Qe=-1,Ve="-",Je=S._offset),Ye=x._offset+(A.y0+A.y1)/2,Le.attr("text-anchor",Pe),ye.attr("d","M0,0L"+Ve+Ct+","+Ct+"V"+($r+Fe.height/2)+"h"+Ve+($r*2+Fe.width)+"V-"+($r+Fe.height/2)+"H"+Ve+Ct+"V-"+Ct+"Z"),P.minY=Ye-($r+Fe.height/2),P.maxY=Ye+($r+Fe.height/2),x.side==="right"?(P.minX=Je+Ct,P.maxX=Je+Ct+($r*2+Fe.width)):(P.minX=Je-Ct-($r*2+Fe.width),P.maxX=Je-Ct);var ar=Fe.height/2,se=k-Fe.top-ar,K="clip"+n._uid+"commonlabel"+x._id,ae;if(Je=0?Ue=ke:De+H=0?Ue=De:Ce+H=0?ge=ve:Ae+te=0?ge=Ae:Oe+te=0,(ce.idealAlign==="top"||!je)&&nr?(Ve-=se/2,ce.anchor="end"):je?(Ve+=se/2,ce.anchor="start"):ce.anchor="middle",ce.crossPos=Ve;else{if(ce.pos=Ve,je=Qe+ar/2+Be<=h,nr=Qe-ar/2-Be>=0,(ce.idealAlign==="left"||!je)&&nr)Qe-=ar/2,ce.anchor="end";else if(je)Qe+=ar/2,ce.anchor="start";else{ce.anchor="middle";var hr=Be/2,wr=Qe+hr-h,Cr=Qe-hr;wr>0&&(Qe-=wr),Cr<0&&(Qe+=-Cr)}ce.crossPos=Qe}Ye.attr("text-anchor",ce.anchor),We&&Ge.attr("text-anchor",ce.anchor),ye.attr("transform",I2(Qe,Ve)+(o?yZ(z9):""))}),{hoverLabels:Te,commonLabelBoundingBox:P}}function D9(e,r,t,n,a,o){var i="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=It.templateString(e.name,e.trace._meta)),i=I9(e.name,e.nameLength));var u=t.charAt(0),s=u==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[u+"Label"]===a?l=e[s+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),o&&l===""&&!e.hovertemplate&&(i===""&&o.remove(),l=i);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[u+"Label"]!==a&&(v[u+"other"]=v[u+"Val"],v[u+"otherLabel"]=v[u+"Label"]),l=It.hovertemplateString(f,v,n._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(CZ,function(g,b){return i=I9(b,e.nameLength),""})}return[l,i]}function EZ(e,r,t,n){var a=r?"xa":"ya",o=r?"ya":"xa",i=0,l=1,u=e.size(),s=new Array(u),f=0,v=n.minX,g=n.maxX,b=n.minY,y=n.maxY,w=function(I){return I*t._invScaleX},M=function(I){return I*t._invScaleY};e.each(function(I){var F=I[a],L=I[o],P=F._id.charAt(0)==="x",O=F.range;f===0&&O&&O[0]>O[1]!==P&&(l=-1);var U=0,X=P?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var j=B9(I,r),$=I.anchor,Y=$==="end"?-1:1,q,Z;if($==="middle")q=I.crossPos+(P?M(j.y-I.by/2):w(I.bx/2+I.tx2width/2)),Z=q+(P?M(I.by):w(I.bx));else if(P)q=I.crossPos+M(Ct+j.y)-M(I.by/2-Ct),Z=q+M(I.by);else{var ne=w(Y*Ct+j.x),Q=ne+w(Y*I.bx);q=I.crossPos+Math.min(ne,Q),Z=I.crossPos+Math.max(ne,Q)}P?b!==void 0&&y!==void 0&&Math.min(Z,y)-Math.max(q,b)>1&&(L.side==="left"?(U=L._mainLinePosition,X=t.width):X=L._mainLinePosition):v!==void 0&&g!==void 0&&Math.min(Z,g)-Math.max(q,v)>1&&(L.side==="top"?(U=L._mainLinePosition,X=t.height):X=L._mainLinePosition)}s[f++]=[{datum:I,traceIndex:I.trace.index,dp:0,pos:I.pos,posref:I.posref,size:I.by*(P?MZ:1)/2,pmin:U,pmax:X}]}),s.sort(function(I,F){return I[0].posref-F[0].posref||l*(F[0].traceIndex-I[0].traceIndex)});var m,A,S,x,T,d,_;function p(I){var F=I[0],L=I[I.length-1];if(A=F.pmin-F.pos-F.dp+F.size,S=L.pos+L.dp+L.size-F.pmax,A>.01){for(T=I.length-1;T>=0;T--)I[T].dp+=A;m=!1}if(!(S<.01)){if(A<-.01){for(T=I.length-1;T>=0;T--)I[T].dp-=S;m=!1}if(m){var P=0;for(x=0;xF.pmax&&P++;for(x=I.length-1;x>=0&&!(P<=0);x--)d=I[x],d.pos>F.pmax-1&&(d.del=!0,P--);for(x=0;x=0;T--)I[T].dp-=S;for(x=I.length-1;x>=0&&!(P<=0);x--)d=I[x],d.pos+d.dp+d.size>F.pmax&&(d.del=!0,P--)}}}for(;!m&&i<=u;){for(i++,m=!0,x=0;x.01){for(T=k.length-1;T>=0;T--)k[T].dp+=A;for(c.push.apply(c,k),s.splice(x+1,1),_=0,T=c.length-1;T>=0;T--)_+=c[T].dp;for(S=_/c.length,T=c.length-1;T>=0;T--)c[T].dp-=S;m=!1}else x++}s.forEach(p)}for(x=s.length-1;x>=0;x--){var E=s[x];for(T=E.length-1;T>=0;T--){var D=E[T],N=D.datum;N.offset=D.dp,N.del=D.del}}}function B9(e,r){var t=0,n=e.offset;return r&&(n*=-AZ,t=e.offset*TZ),{x:t,y:n}}function LZ(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Ct+$r),n=t+r*(e.txwidth+$r),a=e.anchor==="middle";return a&&(t-=e.tx2width/2,n+=e.txwidth/2+$r),{alignShift:r,textShiftX:t,text2ShiftX:n}}function U9(e,r,t,n){var a=function(i){return i*t},o=function(i){return i*n};e.each(function(i){var l=Xl.select(this);if(i.del)return l.remove();var u=l.select("text.nums"),s=i.anchor,f=s==="end"?-1:1,v=LZ(i),g=B9(i,r),b=g.x,y=g.y,w=s==="middle";l.select("path").attr("d",w?"M-"+a(i.bx/2+i.tx2width/2)+","+o(y-i.by/2)+"h"+a(i.bx)+"v"+o(i.by)+"h-"+a(i.bx)+"Z":"M0,0L"+a(f*Ct+b)+","+o(Ct+y)+"v"+o(i.by/2-Ct)+"h"+a(f*i.bx)+"v-"+o(i.by)+"H"+a(f*Ct+b)+"V"+o(y-Ct)+"Z");var M=b+v.textShiftX,m=y+i.ty0-i.by/2+$r,A=i.textAlign||"auto";A!=="auto"&&(A==="left"&&s!=="start"?(u.attr("text-anchor","start"),M=w?-i.bx/2-i.tx2width/2+$r:-i.bx-$r):A==="right"&&s!=="end"&&(u.attr("text-anchor","end"),M=w?i.bx/2-i.tx2width/2-$r:i.bx+$r)),u.call(Fa.positionText,a(M),o(m)),i.tx2width&&(l.select("text.name").call(Fa.positionText,a(v.text2ShiftX+v.alignShift*$r+b),o(y+i.ty0-i.by/2+$r)),l.select("rect").call(Ii.setRect,a(v.text2ShiftX+(v.alignShift-1)*i.tx2width/2+b),o(y-i.by/2-1),a(i.tx2width),o(i.by+2)))})}function RZ(e,r){var t=e.index,n=e.trace||{},a=e.cd[0],o=e.cd[t]||{};function i(g){return g||ao(g)&&g===0}var l=Array.isArray(t)?function(g,b){var y=It.castOption(a,t,g);return i(y)?y:It.extractOption({},n,"",b)}:function(g,b){return It.extractOption(o,n,g,b)};function u(g,b,y){var w=l(b,y);i(w)&&(e[g]=w)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=It.constrain(e.x0,0,e.xa._length),e.x1=It.constrain(e.x1,0,e.xa._length),e.y0=It.constrain(e.y0,0,e.ya._length),e.y1=It.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Ni.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:Ni.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 s=Ni.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+s+" / -"+Ni.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+s,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Ni.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Ni.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var v=e.hoverinfo||e.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(e.xLabel=void 0),v.indexOf("y")===-1&&(e.yLabel=void 0),v.indexOf("z")===-1&&(e.zLabel=void 0),v.indexOf("text")===-1&&(e.text=void 0),v.indexOf("name")===-1&&(e.name=void 0)),e}function P9(e,r,t){var n=t.container,a=t.fullLayout,o=a._size,i=t.event,l=!!r.hLinePoint,u=!!r.vLinePoint,s,f;if(n.selectAll(".spikeline").remove(),!!(u||l)){var v=un.combine(a.plot_bgcolor,a.paper_bgcolor);if(l){var g=r.hLinePoint,b,y;s=g&&g.xa,f=g&&g.ya;var w=f.spikesnap;w==="cursor"?(b=i.pointerX,y=i.pointerY):(b=s._offset+g.x,y=f._offset+g.y);var M=E9.readability(g.color,v)<1.5?un.contrast(v):g.color,m=f.spikemode,A=f.spikethickness,S=f.spikecolor||M,x=Ni.getPxPosition(e,f),T,d;if(m.indexOf("toaxis")!==-1||m.indexOf("across")!==-1){if(m.indexOf("toaxis")!==-1&&(T=x,d=b),m.indexOf("across")!==-1){var _=f._counterDomainMin,p=f._counterDomainMax;f.anchor==="free"&&(_=Math.min(_,f.position),p=Math.max(p,f.position)),T=o.l+_*o.w,d=o.l+p*o.w}n.insert("line",":first-child").attr({x1:T,x2:d,y1:y,y2:y,"stroke-width":A,stroke:S,"stroke-dasharray":Ii.dashStyle(f.spikedash,A)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:T,x2:d,y1:y,y2:y,"stroke-width":A+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}m.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:x+(f.side!=="right"?A:-A),cy:y,r:A,fill:S}).classed("spikeline",!0)}if(u){var c=r.vLinePoint,k,h;s=c&&c.xa,f=c&&c.ya;var R=s.spikesnap;R==="cursor"?(k=i.pointerX,h=i.pointerY):(k=s._offset+c.x,h=f._offset+c.y);var E=E9.readability(c.color,v)<1.5?un.contrast(v):c.color,D=s.spikemode,N=s.spikethickness,I=s.spikecolor||E,F=Ni.getPxPosition(e,s),L,P;if(D.indexOf("toaxis")!==-1||D.indexOf("across")!==-1){if(D.indexOf("toaxis")!==-1&&(L=F,P=h),D.indexOf("across")!==-1){var O=s._counterDomainMin,U=s._counterDomainMax;s.anchor==="free"&&(O=Math.min(O,s.position),U=Math.max(U,s.position)),L=o.t+(1-U)*o.h,P=o.t+(1-O)*o.h}n.insert("line",":first-child").attr({x1:k,x2:k,y1:L,y2:P,"stroke-width":N,stroke:I,"stroke-dasharray":Ii.dashStyle(s.spikedash,N)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:k,x2:k,y1:L,y2:P,"stroke-width":N+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}D.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:k,cy:F-(s.side!=="top"?N:-N),r:N,fill:I}).classed("spikeline",!0)}}}function DZ(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var n=t.length-1;n>=0;n--){var a=t[n],o=e._hoverdata[n];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber)||String(a.pointNumbers)!==String(o.pointNumbers))return!0}return!1}function F9(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function I9(e,r){return Fa.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function PZ(e,r){for(var t=r.charAt(0),n=[],a=[],o=[],i=0;i{"use strict";var FZ=ir(),IZ=Zr(),NZ=to().isUnifiedHover;G9.exports=function(r,t,n,a){a=a||{};var o=t.legend;function i(l){a.font[l]||(a.font[l]=o?t.legend.font[l]:t.font[l])}t&&NZ(t.hovermode)&&(a.font||(a.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),o?(a.bgcolor||(a.bgcolor=IZ.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),FZ.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var W9=pe((jce,Y9)=>{"use strict";var zZ=ir(),qZ=oh(),OZ=_l();Y9.exports=function(r,t){function n(a,o){return zZ.coerce(r,t,OZ,a,o)}qZ(r,t,n)}});var J9=pe((eve,Z9)=>{"use strict";var X9=ir(),BZ=Ec(),UZ=oh();Z9.exports=function(r,t,n,a){function o(l,u){return X9.coerce(r,t,BZ,l,u)}var i=X9.extendFlat({},a.hoverlabel);t.hovertemplate&&(i.namelength=-1),UZ(r,t,o,i)}});var O2=pe((rve,K9)=>{"use strict";var HZ=ir(),VZ=_l();K9.exports=function(r,t){function n(a,o){return t[a]!==void 0?t[a]:HZ.coerce(r,t,VZ,a,o)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var j9=pe((tve,$9)=>{"use strict";var Q9=ir(),GZ=_l(),YZ=O2(),WZ=oh();$9.exports=function(r,t){function n(f,v){return Q9.coerce(r,t,GZ,f,v)}var a=YZ(r,t);a&&(n("hoverdistance"),n("spikedistance"));var o=n("dragmode");o==="select"&&n("selectdirection");var i=t._has("mapbox"),l=t._has("map"),u=t._has("geo"),s=t._basePlotModules.length;t.dragmode==="zoom"&&((i||l||u)&&s===1||(i||l)&&u&&s===2)&&(t.dragmode="pan"),WZ(r,t,n),Q9.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var tT=pe((nve,rT)=>{"use strict";var B2=ir(),eT=Er();rT.exports=function(r){var t=r.calcdata,n=r._fullLayout;function a(s){return function(f){return B2.coerceHoverinfo({hoverinfo:f},{_module:s._module},n)}}for(var o=0;o{"use strict";var ZZ=Er(),JZ=q2().hover;nT.exports=function(r,t,n){var a=ZZ.getComponentMethod("annotations","onClick")(r,r._hoverdata);n!==void 0&&JZ(r,t,n,!0);function o(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(a&&a.then?a.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var io=pe((ive,lT)=>{"use strict";var KZ=it(),lh=ir(),QZ=ti(),zf=to(),iT=_l(),oT=q2();lT.exports={moduleType:"component",name:"fx",constants:sf(),schema:{layout:iT},attributes:Ec(),layoutAttributes:iT,supplyLayoutGlobalDefaults:W9(),supplyDefaults:J9(),supplyLayoutDefaults:j9(),calc:tT(),getDistanceFunction:zf.getDistanceFunction,getClosest:zf.getClosest,inbox:zf.inbox,quadrature:zf.quadrature,appendArrayPointValue:zf.appendArrayPointValue,castHoverOption:jZ,castHoverinfo:eJ,hover:oT.hover,unhover:QZ.unhover,loneHover:oT.loneHover,loneUnhover:$Z,click:aT()};function $Z(e){var r=lh.isD3Selection(e)?e:KZ.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function jZ(e,r,t){return lh.castOption(e,r,"hoverlabel."+t)}function eJ(e,r,t){function n(a){return lh.coerceHoverinfo({hoverinfo:a},{_module:e._module},r)}return lh.castOption(e,t,"hoverinfo",n)}});var uu=pe(oo=>{"use strict";oo.selectMode=function(e){return e==="lasso"||e==="select"};oo.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};oo.openMode=function(e){return e==="drawline"||e==="drawopenpath"};oo.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};oo.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};oo.selectingOrDrawing=function(e){return oo.freeMode(e)||oo.rectMode(e)}});var sh=pe((lve,sT)=>{"use strict";sT.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var uh=pe((sve,uT)=>{"use strict";uT.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 ch=pe((uve,fT)=>{"use strict";var fh=32;fT.exports={CIRCLE_SIDES:fh,i000:0,i090:fh/4,i180:fh/2,i270:fh/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var vh=pe((fve,vT)=>{"use strict";var rJ=ir().strTranslate;function cT(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function tJ(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function nJ(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return cT(e,t[r])}}function aJ(e){return rJ(e.xaxis._offset,e.yaxis._offset)}vT.exports={p2r:cT,r2p:tJ,axValue:nJ,getTransform:aJ}});var Go=pe(lo=>{"use strict";var iJ=Cg(),pT=ch(),fu=pT.CIRCLE_SIDES,U2=pT.SQRT2,gT=vh(),hT=gT.p2r,dT=gT.r2p,oJ=[0,3,4,5,6,1,2],lJ=[0,3,4,1,2];lo.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",n=0;n0&&u{"use strict";var _T=uu(),sJ=_T.drawMode,uJ=_T.openMode,cu=ch(),yT=cu.i000,mT=cu.i090,xT=cu.i180,bT=cu.i270,fJ=cu.cos45,cJ=cu.sin45,wT=vh(),dh=wT.p2r,Yo=wT.r2p,vJ=Fo(),hJ=vJ.clearOutline,ph=Go(),dJ=ph.readPaths,pJ=ph.writePaths,gJ=ph.ellipseOver,yJ=ph.fixDatesForPaths;function mJ(e,r){if(e.length){var t=e[0][0];if(t){var n=r.gd,a=r.isActiveShape,o=r.dragmode,i=(n.layout||{}).shapes||[];if(!sJ(o)&&a!==void 0){var l=n._fullLayout._activeShapeIndex;if(l{"use strict";var xJ=uu(),bJ=xJ.selectMode,_J=Fo(),wJ=_J.clearOutline,H2=Go(),MJ=H2.readPaths,TJ=H2.writePaths,AJ=H2.fixDatesForPaths;AT.exports=function(r,t){if(r.length){var n=r[0][0];if(n){var a=n.getAttribute("d"),o=t.gd,i=o._fullLayout.newselection,l=t.plotinfo,u=l.xaxis,s=l.yaxis,f=t.isActiveSelection,v=t.dragmode,g=(o.layout||{}).selections||[];if(!bJ(v)&&f!==void 0){var b=o._fullLayout._activeSelectionIndex;if(b{"use strict";kT.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 Wo=pe(dn=>{"use strict";var Jl=Of(),ST=ir(),yh=St();dn.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};dn.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};dn.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};dn.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};dn.extractPathCoords=function(e,r,t){var n=[],a=e.match(Jl.segmentRE);return a.forEach(function(o){var i=r[o.charAt(0)].drawn;if(i!==void 0){var l=o.substr(1).match(Jl.paramRE);if(!(!l||l.lengthb&&(w="X"),w});return s>b&&(y=y.replace(/[\s,]*X.*/,""),ST.log("Ignoring extra params in segment "+u)),f+y})}function Bf(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var Y2=pe((gve,RT)=>{"use strict";var SJ=ir(),vu=St(),CT=Yn(),ET=yt(),CJ=Go().readPaths,G2=Wo(),EJ=G2.getPathString,LT=Oc(),LJ=qn().FROM_TL;RT.exports=function(r,t,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var o;if(n.label.texttemplate){var i={};if(n.type!=="path"){var l=vu.getFromId(r,n.xref),u=vu.getFromId(r,n.yref);for(var s in LT){var f=LT[s](n,l,u);f!==void 0&&(i[s]=f)}}o=SJ.texttemplateStringForShapes(n.label.texttemplate,{},r._fullLayout._d3locale,i)}else o=n.label.text;var v={"data-index":t},g=n.label.font,b={"data-notex":1},y=a.append("g").attr(v).classed("shape-label",!0),w=y.append("text").attr(b).classed("shape-label-text",!0).text(o),M,m,A,S;if(n.path){var x=EJ(r,n),T=CJ(x,r);M=1/0,A=1/0,m=-1/0,S=-1/0;for(var d=0;d=e?a=r-n:a=n-r,-180/Math.PI*Math.atan2(a,o)}function DJ(e,r,t,n,a,o,i){var l=a.label.textposition,u=a.label.textangle,s=a.label.padding,f=a.type,v=Math.PI/180*o,g=Math.sin(v),b=Math.cos(v),y=a.label.xanchor,w=a.label.yanchor,M,m,A,S;if(f==="line"){l==="start"?(M=e,m=r):l==="end"?(M=t,m=n):(M=(e+t)/2,m=(r+n)/2),y==="auto"&&(l==="start"?u==="auto"?t>e?y="left":te?y="right":te?y="right":te?y="left":t{"use strict";var PJ=ir(),FJ=PJ.strTranslate,DT=ti(),IT=uu(),IJ=IT.drawMode,NT=IT.selectMode,zT=Er(),PT=Zr(),xh=ch(),NJ=xh.i000,zJ=xh.i090,qJ=xh.i180,OJ=xh.i270,BJ=Fo(),qT=BJ.clearOutlineControllers,X2=Go(),mh=X2.pointsOnRectangle,W2=X2.pointsOnEllipse,UJ=X2.writePaths,HJ=gh().newShapes,VJ=gh().createShapeObj,GJ=V2(),YJ=Y2();OT.exports=function e(r,t,n,a){a||(a=0);var o=n.gd;function i(){e(r,t,n,a++),(W2(r[0])||n.hasText)&&l({redrawing:!0})}function l(F){var L={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,L=HJ(t,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,L=GJ(t,n),o._fullLayout._reselect=!0),Object.keys(L).length&&zT.call((F||{}).redrawing?"relayout":"_guiRelayout",o,L)}var u=o._fullLayout,s=u._zoomlayer,f=n.dragmode,v=IJ(f),g=NT(f);(v||g)&&(o._fullLayout._outlining=!0),qT(o),t.attr("d",UJ(r));var b,y,w,M,m;if(!a&&(n.isActiveShape||n.isActiveSelection)){m=WJ([],r);var A=s.append("g").attr("class","outline-controllers");k(A),I()}if(v&&n.hasText){var S=s.select(".label-temp"),x=VJ(t,n,n.dragmode);YJ(o,"label-temp",x,S)}function T(F){w=+F.srcElement.getAttribute("data-i"),M=+F.srcElement.getAttribute("data-j"),b[w][M].moveFn=d}function d(F,L){if(r.length){var P=m[w][M][1],O=m[w][M][2],U=r[w],X=U.length;if(mh(U)){var j=F,$=L;if(n.isActiveSelection){var Y=FT(U,M);Y[1]===U[M][1]?$=0:j=0}for(var q=0;q1&&!(F.length===2&&F[1][0]==="Z")&&(M===0&&(F[0][0]="M"),r[w]=F,i(),l())}}function c(F,L){if(F===2){w=+L.srcElement.getAttribute("data-i"),M=+L.srcElement.getAttribute("data-j");var P=r[w];!mh(P)&&!W2(P)&&p()}}function k(F){b=[];for(var L=0;L{"use strict";var ZJ=it(),YT=Er(),BT=ir(),hu=St(),JJ=Go().readPaths,KJ=bh(),wh=Y2(),WT=Fo().clearOutlineControllers,Z2=Zr(),K2=yt(),QJ=gt().arrayEditor,UT=ti(),HT=Vo(),Kl=Of(),sa=Wo(),J2=sa.getPathString;JT.exports={draw:Q2,drawOne:XT,eraseActiveShape:eK,drawLabel:wh};function Q2(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var n=r._plots[t].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;ai&&ke>l&&!Me.shiftKey?UT.getCursor(De/Ae,1-Ce/ke):"move";HT(r,Oe),Z=Oe.split("-")[0]}}function ee(Me){_h(e)||(u&&(m=U(t.xanchor)),s&&(A=X(t.yanchor)),t.type==="path"?h=t.path:(b=u?t.x0:U(t.x0),y=s?t.y0:X(t.y0),w=u?t.x1:U(t.x1),M=s?t.y1:X(t.y1)),bM?(S=y,_="y0",x=M,p="y1"):(S=M,_="y1",x=y,p="y0"),oe(Me),ue(a,t),Ee(r,t,e),q.moveFn=Z==="move"?H:te,q.altKey=Me.altKey)}function G(){_h(e)||(HT(r),de(a),ZT(r,e,t),YT.call("_guiRelayout",e,o.getUpdateObj()))}function re(){_h(e)||de(a)}function H(Me,ve){if(t.type==="path"){var Ae=function(Ce){return Ce},ke=Ae,De=Ae;u?g("xanchor",t.xanchor=j(m+Me)):(ke=function(Oe){return j(U(Oe)+Me)},E&&E.type==="date"&&(ke=sa.encodeDate(ke))),s?g("yanchor",t.yanchor=$(A+ve)):(De=function(Oe){return $(X(Oe)+ve)},N&&N.type==="date"&&(De=sa.encodeDate(De))),g("path",t.path=VT(h,ke,De))}else u?g("xanchor",t.xanchor=j(m+Me)):(g("x0",t.x0=j(b+Me)),g("x1",t.x1=j(w+Me))),s?g("yanchor",t.yanchor=$(A+ve)):(g("y0",t.y0=$(y+ve)),g("y1",t.y1=$(M+ve)));r.attr("d",J2(e,t)),ue(a,t),wh(e,n,t,R)}function te(Me,ve){if(v){var Ae=function(Fe){return Fe},ke=Ae,De=Ae;u?g("xanchor",t.xanchor=j(m+Me)):(ke=function(Je){return j(U(Je)+Me)},E&&E.type==="date"&&(ke=sa.encodeDate(ke))),s?g("yanchor",t.yanchor=$(A+ve)):(De=function(Je){return $(X(Je)+ve)},N&&N.type==="date"&&(De=sa.encodeDate(De))),g("path",t.path=VT(h,ke,De))}else if(f){if(Z==="resize-over-start-point"){var Ce=b+Me,Oe=s?y-ve:y+ve;g("x0",t.x0=u?Ce:j(Ce)),g("y0",t.y0=s?Oe:$(Oe))}else if(Z==="resize-over-end-point"){var Ue=w+Me,ge=s?M-ve:M+ve;g("x1",t.x1=u?Ue:j(Ue)),g("y1",t.y1=s?ge:$(ge))}}else{var Te=function(Fe){return Z.indexOf(Fe)!==-1},ce=Te("n"),ye=Te("s"),Le=Te("w"),me=Te("e"),he=ce?S+ve:S,be=ye?x+ve:x,Se=Le?T+Me:T,ze=me?d+Me:d;s&&(ce&&(he=S-ve),ye&&(be=x-ve)),(!s&&be-he>l||s&&he-be>l)&&(g(_,t[_]=s?he:$(he)),g(p,t[p]=s?be:$(be))),ze-Se>i&&(g(c,t[c]=u?Se:j(Se)),g(k,t[k]=u?ze:j(ze)))}r.attr("d",J2(e,t)),ue(a,t),wh(e,n,t,R)}function ue(Me,ve){(u||s)&&Ae();function Ae(){var ke=ve.type!=="path",De=Me.selectAll(".visual-cue").data([0]),Ce=1;De.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ce}).classed("visual-cue",!0);var Oe=U(u?ve.xanchor:BT.midRange(ke?[ve.x0,ve.x1]:sa.extractPathCoords(ve.path,Kl.paramIsX))),Ue=X(s?ve.yanchor:BT.midRange(ke?[ve.y0,ve.y1]:sa.extractPathCoords(ve.path,Kl.paramIsY)));if(Oe=sa.roundPositionForSharpStrokeRendering(Oe,Ce),Ue=sa.roundPositionForSharpStrokeRendering(Ue,Ce),u&&s){var ge="M"+(Oe-1-Ce)+","+(Ue-1-Ce)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";De.attr("d",ge)}else if(u){var Te="M"+(Oe-1-Ce)+","+(Ue-9-Ce)+"v18 h2 v-18 Z";De.attr("d",Te)}else{var ce="M"+(Oe-9-Ce)+","+(Ue-1-Ce)+"h18 v2 h-18 Z";De.attr("d",ce)}}}function de(Me){Me.selectAll(".visual-cue").remove()}function Ee(Me,ve,Ae){var ke=ve.xref,De=ve.yref,Ce=hu.getFromId(Ae,ke),Oe=hu.getFromId(Ae,De),Ue="";ke!=="paper"&&!Ce.autorange&&(Ue+=ke),De!=="paper"&&!Oe.autorange&&(Ue+=De),K2.setClipUrl(Me,Ue?"clip"+Ae._fullLayout._uid+Ue:null,Ae)}}function VT(e,r,t){return e.replace(Kl.segmentRE,function(n){var a=0,o=n.charAt(0),i=Kl.paramIsX[o],l=Kl.paramIsY[o],u=Kl.numParams[o],s=n.substr(1).replace(Kl.paramRE,function(f){return a>=u||(i[a]?f=r(f):l[a]&&(f=t(f)),a++),f});return o+s})}function jJ(e,r){if(Mh(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){GT(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=GT,Q2(e)}}}function GT(e){if(Mh(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(WT(e),delete e._fullLayout._activeShapeIndex,Q2(e))}}function eK(e){if(Mh(e)){WT(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Ia=Er(),KT=ln(),QT=on(),jr=uh(),rK=Th().eraseActiveShape,Ah=ir(),Kr=Ah._,et=aA.exports={};et.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Kr(e,"Download plot as a png"):Kr(e,"Download plot")},icon:jr.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};Ah.notifier(Kr(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in r&&(t[n]=r[n])}),Ia.call("downloadImage",e,t).then(function(n){Ah.notifier(Kr(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){Ah.notifier(Kr(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};et.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Kr(e,"Edit in Chart Studio")},icon:jr.disk,click:function(e){KT.sendDataToCloud(e)}};et.editInChartStudio={name:"editInChartStudio",title:function(e){return Kr(e,"Edit in Chart Studio")},icon:jr.pencil,click:function(e){KT.sendDataToCloud(e)}};et.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Kr(e,"Zoom")},attr:"dragmode",val:"zoom",icon:jr.zoombox,click:Un};et.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Kr(e,"Pan")},attr:"dragmode",val:"pan",icon:jr.pan,click:Un};et.select2d={name:"select2d",_cat:"select",title:function(e){return Kr(e,"Box Select")},attr:"dragmode",val:"select",icon:jr.selectbox,click:Un};et.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Kr(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:jr.lasso,click:Un};et.drawclosedpath={name:"drawclosedpath",title:function(e){return Kr(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:jr.drawclosedpath,click:Un};et.drawopenpath={name:"drawopenpath",title:function(e){return Kr(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:jr.drawopenpath,click:Un};et.drawline={name:"drawline",title:function(e){return Kr(e,"Draw line")},attr:"dragmode",val:"drawline",icon:jr.drawline,click:Un};et.drawrect={name:"drawrect",title:function(e){return Kr(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:jr.drawrect,click:Un};et.drawcircle={name:"drawcircle",title:function(e){return Kr(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:jr.drawcircle,click:Un};et.eraseshape={name:"eraseshape",title:function(e){return Kr(e,"Erase active shape")},icon:jr.eraseshape,click:rK};et.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Kr(e,"Zoom in")},attr:"zoom",val:"in",icon:jr.zoom_plus,click:Un};et.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Kr(e,"Zoom out")},attr:"zoom",val:"out",icon:jr.zoom_minus,click:Un};et.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Kr(e,"Autoscale")},attr:"zoom",val:"auto",icon:jr.autoscale,click:Un};et.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Kr(e,"Reset axes")},attr:"zoom",val:"reset",icon:jr.home,click:Un};et.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Kr(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:jr.tooltip_basic,gravity:"ne",click:Un};et.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Kr(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:jr.tooltip_compare,gravity:"ne",click:Un};function Un(e,r){var t=r.currentTarget,n=t.getAttribute("data-attr"),a=t.getAttribute("data-val")||!0,o=e._fullLayout,i={},l=QT.list(e,null,!0),u=o._cartesianSpikesEnabled,s,f;if(n==="zoom"){var v=a==="in"?.5:2,g=(1+v)/2,b=(1-v)/2,y;for(f=0;f{"use strict";var iA=ey(),aK=Object.keys(iA),oA=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],lA=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(oA),pu=[],iK=function(e){if(lA.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();pu.indexOf(r)===-1&&pu.push(r),pu.indexOf(t)===-1&&pu.push(t)}};aK.forEach(function(e){iK(iA[e])});pu.sort();sA.exports={DRAW_MODES:oA,backButtons:lA,foreButtons:pu}});var ty=pe((wve,uA)=>{"use strict";var _ve=ry();uA.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 cA=pe((Mve,fA)=>{"use strict";var oK=ir(),Uf=Zr(),lK=gt(),sK=ty();fA.exports=function(r,t){var n=r.modebar||{},a=lK.newContainer(t,"modebar");function o(l,u){return oK.coerce(n,a,sK,l,u)}o("orientation"),o("bgcolor",Uf.addOpacity(t.paper_bgcolor,.5));var i=Uf.contrast(Uf.rgb(t.modebar.bgcolor));o("color",Uf.addOpacity(i,.3)),o("activecolor",Uf.addOpacity(i,.7)),o("uirevision",t.uirevision),o("add"),o("remove")}});var pA=pe((Tve,dA)=>{"use strict";var ny=it(),uK=rt(),Sh=ir(),vA=uh(),fK=pc().version,cK=new DOMParser;function hA(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var zi=hA.prototype;zi.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var o=n.modebar,i="#"+a+" .modebar-group";document.querySelectorAll(i).forEach(function(v){v.style.backgroundColor=o.bgcolor}),Sh.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color);var l=!this.hasButtons(r),u=this.hasLogo!==t.displaylogo,s=this.locale!==t.locale;if(this.locale=t.locale,(l||u||s)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};zi.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var n=r.createGroup();t.forEach(function(a){var o=a.name;if(!o)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(o)!==-1)throw new Error("button name '"+o+"' is taken");r.buttonsNames.push(o);var i=r.createButton(a);r.buttonElements.push(i),n.appendChild(i)}),r.element.appendChild(n)})};zi.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};zi.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&t.setAttribute("data-title",n),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),t.setAttribute("data-val",a));var o=e.click;if(typeof o!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&ny.select(t).classed("active",!0);var i=e.icon;return typeof i=="function"?t.appendChild(i()):t.appendChild(this.createIcon(i||vA.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};zi.createIcon=function(e){var r=uK(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(t,"svg"),n.setAttribute("viewBox",[0,0,e.width,r].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(t,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var o=cK.parseFromString(e.svg,"application/xml");n=o.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};zi.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,o=n.getAttribute("data-attr"),i=n.getAttribute("data-toggle")==="true",l=ny.select(n),u=function(v,g){var b=r.modebar,y=v.querySelector(".icon path");y&&(g||v.matches(":hover")?y.style.fill=b.activecolor:y.style.fill=b.color)};if(i){if(o===t){var s=!l.classed("active");l.classed("active",s),u(n,s)}}else{var f=o===null?o:Sh.nestedProperty(r,o).get();l.classed("active",f===a),u(n,f===a)}})};zi.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var dK=on(),gA=oa(),ay=Er(),pK=to().isUnifiedHover,gK=pA(),Ch=ey(),yK=ry().DRAW_MODES,mK=ir().extendDeep;yA.exports=function(r){var t=r._fullLayout,n=r._context,a=t._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete t._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 o=n.modeBarButtons,i;Array.isArray(o)&&o.length?i=TK(o):!n.displayModeBar&&n.watermark?i=[]:i=xK(r),a?a.update(r,i):t._modeBar=gK(r,i)};function xK(e){var r=e._fullLayout,t=e._fullData,n=e._context;function a(L,P){if(typeof P=="string"){if(P.toLowerCase()===L.toLowerCase())return!0}else{var O=P.name,U=P._cat||P.name;if(O===L||U===L.toLowerCase())return!0}return!1}var o=r.modebar.add;typeof o=="string"&&(o=[o]);var i=r.modebar.remove;typeof i=="string"&&(i=[i]);var l=n.modeBarButtonsToAdd.concat(o.filter(function(L){for(var P=0;P1?(k=["toggleHover"],h=["resetViews"]):v?(c=["zoomInGeo","zoomOutGeo"],k=["hoverClosestGeo"],h=["resetGeo"]):f?(k=["hoverClosest3d"],h=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(c=["zoomInMapbox","zoomOutMapbox"],k=["toggleHover"],h=["resetViewMapbox"]):M?(c=["zoomInMap","zoomOutMap"],k=["toggleHover"],h=["resetViewMap"]):g?k=["hoverClosestPie"]:S?(k=["hoverClosestCartesian","hoverCompareCartesian"],h=["resetViewSankey"]):k=["toggleHover"],s&&k.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(wK(t)||T)&&(k=[]),s&&!x&&(c=["zoomIn2d","zoomOut2d","autoScale2d"],h[0]!=="resetViews"&&(h=["resetScale2d"])),f?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:s&&!x||y?R=["zoom2d","pan2d"]:w||M||v?R=["pan2d"]:m&&(R=["zoom2d"]),_K(t)&&R.push("select2d","lasso2d");var E=[],D=function(L){E.indexOf(L)===-1&&k.indexOf(L)!==-1&&E.push(L)};if(Array.isArray(l)){for(var N=[],I=0;I{"use strict";xA.exports={moduleType:"component",name:"modebar",layoutAttributes:ty(),supplyLayoutDefaults:cA(),manage:mA()}});var oy=pe((Sve,bA)=>{"use strict";var AK=qn().FROM_BL;bA.exports=function(r,t,n){n===void 0&&(n=AK[r.constraintoward||"center"]);var a=[r.r2l(r.range[0]),r.r2l(r.range[1])],o=a[0]+(a[1]-a[0])*n;r.range=r._input.range=[r.l2r(o+(a[0]-o)*t),r.l2r(o+(a[1]-o)*t)],r.setScale()}});var Vf=pe(Hf=>{"use strict";var Ql=ir(),ly=$s(),ai=on().id2name,kK=Ra(),_A=oy(),SK=Rv(),CK=nn().ALMOST_EQUAL,EK=qn().FROM_BL;Hf.handleDefaults=function(e,r,t){var n=t.axIds,a=t.axHasImage,o=r._axisConstraintGroups=[],i=r._axisMatchGroups=[],l,u,s,f,v,g,b,y;for(l=0;lo?t.substr(o):n.substr(a))+i}function RK(e,r){for(var t=r._size,n=t.h/t.w,a={},o=Object.keys(e),i=0;iCK*y&&!A)){for(o=0;oR&&Ok&&(k=O);var X=(k-c)/(2*h);v/=X,c=u.l2r(c),k=u.l2r(k),u.range=u._input.range=d<_?[c,k]:[k,c]}MA(u,v)}}}};Hf.getAxisGroup=function(r,t){for(var n=r._axisMatchGroups,a=0;a{"use strict";var Lh=it(),Hn=Er(),ma=ln(),Na=ir(),fy=Yn(),cy=sh(),Gf=Zr(),gu=yt(),AA=Sf(),LA=iy(),Yf=St(),so=qn(),RA=Vf(),DK=RA.enforce,PK=RA.clean,kA=$s().doAutoRange,DA="start",FK="middle",PA="end",IK=wn().zindexSeparator;fn.layoutStyles=function(e){return Na.syncOrAsync([ma.doAutoMargin,zK],e)};function NK(e,r,t){for(var n=0;n=e[1]||a[1]<=e[0])&&o[0]r[0])return!0}return!1}function zK(e){var r=e._fullLayout,t=r._size,n=t.p,a=Yf.list(e,"",!0),o,i,l,u,s,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(gu.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),fn.drawMainTitle(e),LA.manage(e),!r._has("cartesian"))return ma.previousPromises(e);function v(ee,G,re){var H=ee._lw/2;if(ee._id.charAt(0)==="x"){if(G){if(re==="top")return G._offset-n-H}else return t.t+t.h*(1-(ee.position||0))+H%1;return G._offset+G._length+n+H}if(G){if(re==="right")return G._offset+G._length+n+H}else return t.l+t.w*(ee.position||0)+H%1;return G._offset-n-H}for(o=0;o0){UK(e,o,s,u),l.attr({x:i,y:o,"text-anchor":n,dy:EA(r.yanchor)}).call(fy.positionText,i,o);var f=(r.text.match(fy.BR_TAG_ALL)||[]).length;if(f){var v=so.LINE_SPACING*f+so.MID_SHIFT;r.y===0&&(v=-v),l.selectAll(".line").each(function(){var M=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",M)})}var g=Lh.selectAll(".gtitle-subtitle");if(g.node()){var b=l.node().getBBox(),y=b.y+b.height,w=y+AA.SUBTITLE_PADDING_EM*r.subtitle.font.size;g.attr({x:i,y:w,"text-anchor":n,dy:EA(r.yanchor)}).call(fy.positionText,i,w)}}}};function qK(e,r,t,n,a){var o=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,i=Na.isTopAnchor(r)?n:n-a,l=t==="b"?o-i:i;return Na.isTopAnchor(r)&&t==="t"||Na.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",i=e._fullLayout.margin[o],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=OK(o,n,a,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>i?l:0}function UK(e,r,t,n){var a="title.automargin",o=e._fullLayout.title,i=o.y>.5?"t":"b",l={x:o.x,y:o.y,t:0,b:0},u={};o.yref==="paper"&&qK(e,o,i,r,n)?l[i]=t:o.yref==="container"&&(u[i]=t,e._fullLayout._reservedMargin[a]=u),ma.allowAutoMargin(e,a),ma.autoMargin(e,a,l)}function HK(e,r){var t=e.title,n=e._size,a=0;switch(r===DA?a=t.pad.l:r===PA&&(a=-t.pad.r),t.xref){case"paper":return n.l+n.w*t.x+a;case"container":default:return e.width*t.x+a}}function VK(e,r){var t=e.title,n=e._size,a=0;if(r==="0em"||!r?a=-t.pad.b:r===so.CAP_SHIFT+"em"&&(a=t.pad.t),t.y==="auto")return n.t/2;switch(t.yref){case"paper":return n.t+n.h-n.h*t.y+a;case"container":default:return e.height-e.height*t.y+a}}function EA(e){return e==="top"?so.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":so.MID_SHIFT+"em"}function GK(e){var r=e.title,t=FK;return Na.isRightAnchor(r)?t=PA:Na.isLeftAnchor(r)&&(t=DA),t}function YK(e){var r=e.title,t="0em";return Na.isTopAnchor(r)?t=so.CAP_SHIFT+"em":Na.isMiddleAnchor(r)&&(t=so.MID_SHIFT+"em"),t}fn.doTraceStyle=function(e){var r=e.calcdata,t=[],n;for(n=0;n{"use strict";var WK=Go().readPaths,XK=bh(),FA=Fo().clearOutlineControllers,vy=Zr(),IA=yt(),ZK=gt().arrayEditor,NA=Wo(),JK=NA.getPathString;qA.exports={draw:Dh,drawOne:zA,activateLastSelection:$K};function Dh(e){var r=e._fullLayout;FA(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var n=r._plots[t].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;M--){var m=i.append("path").attr(u).style("opacity",M?.1:s).call(vy.stroke,v).call(vy.fill,f).call(IA.dashLine,M?"solid":b,M?4+g:g);if(KK(m,e,n),y){var A=ZK(e.layout,"selections",n);m.style({cursor:"move"});var S={element:m.node(),plotinfo:a,gd:e,editHelpers:A,isActiveSelection:!0},x=WK(l,e);XK(x,m,S)}else m.style("pointer-events",M?"all":"none");w[M]=m}var T=w[0],d=w[1];d.node().addEventListener("click",function(){return QK(e,T)})}}function KK(e,r,t){var n=t.xref+t.yref;IA.setClipUrl(e,"clip"+r._fullLayout._uid+n,r)}function QK(e,r){if(Ph(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){hy(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=hy,Dh(e)}}}function $K(e){if(Ph(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=hy,Dh(e)}}function hy(e){if(Ph(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(FA(e),delete e._fullLayout._activeSelectionIndex,Dh(e))}}});var BA=pe((Rve,OA)=>{function jK(){var e,r=0,t=!1;function n(a,o){return e.list.push({type:a,data:o?JSON.parse(JSON.stringify(o)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(a,o){return n("check",{seg1:a,seg2:o})},segmentChop:function(a,o){return n("div_seg",{seg:a,pt:o}),n("chop",{seg:a,pt:o})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,o){return n("new_seg",{seg:a,primary:o})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,o,i){return n("temp_status",{seg:a,above:o,below:i})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,o,i){return n("status",{seg:a,above:o,below:i})},vert:function(a){return a===t?e:(t=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,o){return n("chain_rem_head",{index:a,pt:o})},chainRemoveTail:function(a,o){return n("chain_rem_tail",{index:a,pt:o})},chainNew:function(a,o){return n("chain_new",{pt1:a,pt2:o})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,o){return n("chain_add_head",{index:a,pt:o})},chainAddTail:function(a,o){return n("chain_add_tail",{index:a,pt:o})},chainConnect:function(a,o){return n("chain_con",{index1:a,index2:o})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,o){return n("chain_join",{index1:a,index2:o})},done:function(){return n("done")}},e}OA.exports=jK});var HA=pe((Dve,UA)=>{function eQ(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,n,a){var o=n[0],i=n[1],l=a[0],u=a[1],s=t[0],f=t[1];return(l-o)*(f-i)-(u-i)*(s-o)>=-e},pointBetween:function(t,n,a){var o=t[1]-n[1],i=a[0]-n[0],l=t[0]-n[0],u=a[1]-n[1],s=l*i+o*u;if(s-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=l-o>e&&(i-f)*(o-v)/(l-v)+f-a>e&&(u=!u),i=f,l=v}return u}};return r}UA.exports=eQ});var GA=pe((Pve,VA)=>{var rQ={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var n=e.root,a=e.root.next;a!==null;){if(t(a)){r.prev=a.prev,r.next=a,a.prev.next=r,a.prev=r;return}n=a,a=a.next}n.next=r,r.prev=n,r.next=null},findTransition:function(r){for(var t=e.root,n=e.root.next;n!==null&&!r(n);)t=n,n=n.next;return{before:t===e.root?null:t,after:n,insert:function(a){return a.prev=t,a.next=n,t.next=a,n!==null&&(n.prev=a),a}}}};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}};VA.exports=rQ});var WA=pe((Fve,YA)=>{var Wf=GA();function tQ(e,r,t){function n(y,w){return{id:t?t.segmentId():-1,start:y,end:w,myFill:{above:null,below:null},otherFill:null}}function a(y,w,M){return{id:t?t.segmentId():-1,start:y,end:w,myFill:{above:M.myFill.above,below:M.myFill.below},otherFill:null}}var o=Wf.create();function i(y,w,M,m,A,S){var x=r.pointsCompare(w,A);return x!==0?x:r.pointsSame(M,S)?0:y!==m?y?1:-1:r.pointAboveOrOnLine(M,m?A:S,m?S:A)?1:-1}function l(y,w){o.insertBefore(y,function(M){var m=i(y.isStart,y.pt,w,M.isStart,M.pt,M.other.pt);return m<0})}function u(y,w){var M=Wf.node({isStart:!0,pt:y.start,seg:y,primary:w,other:null,status:null});return l(M,y.end),M}function s(y,w,M){var m=Wf.node({isStart:!1,pt:w.end,seg:w,primary:M,other:y,status:null});y.other=m,l(m,y.pt)}function f(y,w){var M=u(y,w);return s(M,y,w),M}function v(y,w){t&&t.segmentChop(y.seg,w),y.other.remove(),y.seg.end=w,y.other.pt=w,l(y.other,y.pt)}function g(y,w){var M=a(w,y.seg.end,y.seg);return v(y,w),f(M,y.primary)}function b(y,w){var M=Wf.create();function m(N,I){var F=N.seg.start,L=N.seg.end,P=I.seg.start,O=I.seg.end;return r.pointsCollinear(F,P,O)?r.pointsCollinear(L,P,O)||r.pointAboveOrOnLine(L,P,O)?1:-1:r.pointAboveOrOnLine(F,P,O)?1:-1}function A(N){return M.findTransition(function(I){var F=m(N,I.ev);return F>0})}function S(N,I){var F=N.seg,L=I.seg,P=F.start,O=F.end,U=L.start,X=L.end;t&&t.checkIntersection(F,L);var j=r.linesIntersect(P,O,U,X);if(j===!1){if(!r.pointsCollinear(P,O,U)||r.pointsSame(P,X)||r.pointsSame(O,U))return!1;var $=r.pointsSame(P,U),Y=r.pointsSame(O,X);if($&&Y)return I;var q=!$&&r.pointBetween(P,U,X),Z=!Y&&r.pointBetween(O,U,X);if($)return Z?g(I,O):g(N,X),I;q&&(Y||(Z?g(I,O):g(N,X)),g(I,P))}else j.alongA===0&&(j.alongB===-1?g(N,U):j.alongB===0?g(N,j.pt):j.alongB===1&&g(N,X)),j.alongB===0&&(j.alongA===-1?g(I,P):j.alongA===0?g(I,j.pt):j.alongA===1&&g(I,O));return!1}for(var x=[];!o.isEmpty();){var T=o.getHead();if(t&&t.vert(T.pt[0]),T.isStart){let N=function(){if(_){var I=S(T,_);if(I)return I}return p?S(T,p):!1};var D=N;t&&t.segmentNew(T.seg,T.primary);var d=A(T),_=d.before?d.before.ev:null,p=d.after?d.after.ev:null;t&&t.tempStatus(T.seg,_?_.seg:!1,p?p.seg:!1);var c=N();if(c){if(e){var k;T.seg.myFill.below===null?k=!0:k=T.seg.myFill.above!==T.seg.myFill.below,k&&(c.seg.myFill.above=!c.seg.myFill.above)}else c.seg.otherFill=T.seg.myFill;t&&t.segmentUpdate(c.seg),T.other.remove(),T.remove()}if(o.getHead()!==T){t&&t.rewind(T.seg);continue}if(e){var k;T.seg.myFill.below===null?k=!0:k=T.seg.myFill.above!==T.seg.myFill.below,p?T.seg.myFill.below=p.seg.myFill.above:T.seg.myFill.below=y,k?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var h;p?T.primary===p.primary?h=p.seg.otherFill.above:h=p.seg.myFill.above:h=T.primary?w:y,T.seg.otherFill={above:h,below:h}}t&&t.status(T.seg,_?_.seg:!1,p?p.seg:!1),T.other.status=d.insert(Wf.node({ev:T}))}else{var R=T.status;if(R===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(M.exists(R.prev)&&M.exists(R.next)&&S(R.prev.ev,R.next.ev),t&&t.statusRemove(R.ev.seg),R.remove(),!T.primary){var E=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=E}x.push(T.seg)}o.getHead().remove()}return t&&t.done(),x}return e?{addRegion:function(y){for(var w,M=y[y.length-1],m=0;m{function nQ(e,r,t){var n=[],a=[];return e.forEach(function(o){var i=o.start,l=o.end;if(r.pointsSame(i,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(o);var u={index:0,matches_head:!1,matches_pt1:!1},s={index:0,matches_head:!1,matches_pt1:!1},f=u;function v(D,N,I){return f.index=D,f.matches_head=N,f.matches_pt1=I,f===u?(f=s,!1):(f=null,!0)}for(var g=0;g{function Xf(e,r,t){var n=[];return e.forEach(function(a){var o=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);r[o]!==0&&n.push({id:t?t.segmentId():-1,start:a.start,end:a.end,myFill:{above:r[o]===1,below:r[o]===2},otherFill:null})}),t&&t.selected(n),n}var aQ={union:function(e,r){return Xf(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return Xf(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return Xf(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return Xf(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return Xf(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};JA.exports=aQ});var $A=pe((zve,QA)=>{var iQ={toPolygon:function(e,r){function t(o){if(o.length<=0)return e.segments({inverted:!1,regions:[]});function i(s){var f=s.slice(0,s.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=i(o[0]),u=1;u{var oQ=BA(),lQ=HA(),jA=WA(),sQ=ZA(),Zf=KA(),ek=$A(),za=!1,Jf=lQ(),ua;ua={buildLog:function(e){return e===!0?za=oQ():e===!1&&(za=!1),za===!1?!1:za.list},epsilon:function(e){return Jf.epsilon(e)},segments:function(e){var r=jA(!0,Jf,za);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=jA(!1,Jf,za);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:Zf.union(e.combined,za),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:Zf.intersect(e.combined,za),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:Zf.difference(e.combined,za),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:Zf.differenceRev(e.combined,za),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:Zf.xor(e.combined,za),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:sQ(e.segments,Jf,za),inverted:e.inverted}},polygonFromGeoJSON:function(e){return ek.toPolygon(ua,e)},polygonToGeoJSON:function(e){return ek.fromPolygon(ua,Jf,e)},union:function(e,r){return Kf(e,r,ua.selectUnion)},intersect:function(e,r){return Kf(e,r,ua.selectIntersect)},difference:function(e,r){return Kf(e,r,ua.selectDifference)},differenceRev:function(e,r){return Kf(e,r,ua.selectDifferenceRev)},xor:function(e,r){return Kf(e,r,ua.selectXor)}};function Kf(e,r,t){var n=ua.segments(e),a=ua.segments(r),o=ua.combine(n,a),i=t(o);return ua.polygon(i)}typeof window=="object"&&(window.PolyBool=ua);rk.exports=ua});var ak=pe((Ove,nk)=>{nk.exports=function(r,t,n,a){var o=r[0],i=r[1],l=!1;n===void 0&&(n=0),a===void 0&&(a=t.length);for(var u=a-n,s=0,f=u-1;si!=y>i&&o<(b-v)*(i-g)/(y-g)+v;w&&(l=!l)}return l}});var gy=pe((Bve,ik)=>{"use strict";var py=Ic().dot,Fh=nn().BADNUM,Ih=ik.exports={};Ih.tester=function(r){var t=r.slice(),n=t[0][0],a=n,o=t[0][1],i=o,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;la||m===Fh||mi||w&&s(y))}function v(y,w){var M=y[0],m=y[1];if(M===Fh||Ma||m===Fh||mi)return!1;var A=t.length,S=t[0][0],x=t[0][1],T=0,d,_,p,c,k;for(d=1;dMath.max(_,S)||m>Math.max(p,x)))if(ml||Math.abs(py(v,s))>a)return!0;return!1};Ih.filter=function(r,t){var n=[r[0]],a=0,o=0;function i(u){r.push(u);var s=n.length,f=a;n.splice(o+1);for(var v=f+1;v1){var l=r.pop();i(l)}return{addPt:i,raw:r,filtered:n}}});var lk=pe((Uve,ok)=>{"use strict";ok.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Ek=pe((Hve,Ck)=>{"use strict";var sk=tk(),uQ=ak(),jf=Er(),fQ=yt().dashStyle,Qf=Zr(),cQ=io(),vQ=to().makeEventData,a0=uu(),hQ=a0.freeMode,dQ=a0.rectMode,e0=a0.drawMode,by=a0.openMode,_y=a0.selectMode,uk=Wo(),fk=Of(),pk=bh(),gk=Fo().clearOutline,yk=Go(),yy=yk.handleEllipse,pQ=yk.readPaths,gQ=gh().newShapes,yQ=V2(),mQ=dy().activateLastSelection,zh=ir(),xQ=zh.sorterAsc,mk=gy(),$f=Jc(),qa=on().getFromId,bQ=sh(),_Q=Rh().redrawReglTraces,qh=lk(),qi=qh.MINSELECT,wQ=mk.filter,wy=mk.tester,My=vh(),ck=My.p2r,MQ=My.axValue,TQ=My.getTransform;function Ty(e){return e.subplot!==void 0}function AQ(e,r,t,n,a){var o=!Ty(n),i=hQ(a),l=dQ(a),u=by(a),s=e0(a),f=_y(a),v=a==="drawline",g=a==="drawcircle",b=v||g,y=n.gd,w=y._fullLayout,M=f&&w.newselection.mode==="immediate"&&o,m=w._zoomlayer,A=n.element.getBoundingClientRect(),S=n.plotinfo,x=TQ(S),T=r-A.left,d=t-A.top;w._calcInverseTransform(y);var _=zh.apply3DTransform(w._invTransform)(T,d);T=_[0],d=_[1];var p=w._invScaleX,c=w._invScaleY,k=T,h=d,R="M"+T+","+d,E=n.xaxes[0],D=n.yaxes[0],N=E._length,I=D._length,F=e.altKey&&!(e0(a)&&u),L,P,O,U,X,j,$;bk(e,y,n),i&&(L=wQ([[T,d]],qh.BENDPX));var Y=m.selectAll("path.select-outline-"+S.id).data([1]),q=s?w.newshape:w.newselection;s&&(n.hasText=q.label.text||q.label.texttemplate);var Z=s&&!u?q.fillcolor:"rgba(0,0,0,0)",ne=q.line.color||(o?Qf.contrast(y._fullLayout.plot_bgcolor):"#7f7f7f");Y.enter().append("path").attr("class","select-outline select-outline-"+S.id).style({opacity:s?q.opacity/2:1,"stroke-dasharray":fQ(q.line.dash,q.line.width),"stroke-width":q.line.width+"px","shape-rendering":"crispEdges"}).call(Qf.stroke,ne).call(Qf.fill,Z).attr("fill-rule","evenodd").classed("cursor-move",!!s).attr("transform",x).attr("d",R+"Z");var Q=m.append("path").attr("class","zoombox-corners").style({fill:Qf.background,stroke:Qf.defaultLine,"stroke-width":1}).attr("transform",x).attr("d","M0,0Z");if(s&&n.hasText){var oe=m.select(".label-temp");oe.empty()&&(oe=m.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var ee=w._uid+qh.SELECTID,G=[],re=Oh(y,n.xaxes,n.yaxes,n.subplot);M&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(o){var te=E._id,ue=D._id;Ak(y,te,ue,re);for(var de=(y.layout||{}).selections||[],Ee=[],Me=!1,ve=0;ve=0){y._fullLayout._deactivateShape(y);return}if(!s){var de=w.clickmode;$f.done(ee).then(function(){if($f.clear(ee),te===2){for(Y.remove(),X=0;X-1&&xk(ue,y,n.xaxes,n.yaxes,n.subplot,n,Y),de==="event"&&n0(y,void 0);cQ.click(y,ue,S.id)}).catch(zh.error)}},n.doneFn=function(){Q.remove(),$f.done(ee).then(function(){$f.clear(ee),!M&&U&&n.selectionDefs&&(U.subtract=F,n.selectionDefs.push(U),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,O)),(M||s)&&r0(n,M),n.doneFnCompleted&&n.doneFnCompleted(G),f&&n0(y,$)}).catch(zh.error)}}function xk(e,r,t,n,a,o,i){var l=r._hoverdata,u=r._fullLayout,s=u.clickmode,f=s.indexOf("event")>-1,v=[],g,b,y,w,M,m,A,S,x,T;if(LQ(l)){bk(e,r,o),g=Oh(r,t,n,a);var d=RQ(l,g),_=d.pointNumbers.length>0;if(_?DQ(g,d):PQ(g)&&(A=hk(d))){for(i&&i.remove(),T=0;T=0}function EQ(e){return e._fullLayout._activeSelectionIndex>=0}function r0(e,r){var t=e.dragmode,n=e.plotinfo,a=e.gd;CQ(a)&&a._fullLayout._deactivateShape(a),EQ(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout,i=o._zoomlayer,l=e0(t),u=_y(t);if(l||u){var s=i.selectAll(".select-outline-"+n.id);if(s&&a._fullLayout._outlining){var f;l&&(f=gQ(s,e)),f&&jf.call("_guiRelayout",a,{shapes:f});var v;u&&!Ty(e)&&(v=yQ(s,e)),v&&(a._fullLayout._noEmitSelectedAtStart=!0,jf.call("_guiRelayout",a,{selections:v}).then(function(){r&&mQ(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function vk(e){return e._id}function Oh(e,r,t,n){if(!e.calcdata)return[];var a=[],o=r.map(vk),i=t.map(vk),l,u,s;for(s=0;s0,o=a?n[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(o)>-1:!1}function DQ(e,r){var t=[],n,a,o,i;for(i=0;i0&&t.push(n);if(t.length===1&&(o=t[0]===r.searchInfo,o&&(a=r.searchInfo.cd[0].trace,a.selectedpoints.length===r.pointNumbers.length))){for(i=0;i1||(r+=n.selectedpoints.length,r>1)))return!1;return r===1}function t0(e,r,t){var n;for(n=0;n-1&&r;if(!i&&r){var te=dk(e,!0);if(te.length){var ue=te[0].xref,de=te[0].yref;if(ue&&de){var Ee=kk(te),Me=Sk([qa(e,ue,"x"),qa(e,de,"y")]);Me(G,Ee)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:H&&n0(e,G),g._reselect=!1}if(!i&&g._deselect){var ve=g._deselect;l=ve.xref,u=ve.yref,NQ(l,u,f)||Ak(e,l,u,n),H&&(G.points.length?n0(e,G):Sy(e)),g._deselect=!1}return{eventData:G,selectionTesters:t}}function IQ(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";Lk.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 i0=pe((Gve,Rk)=>{"use strict";Rk.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var yu=pe((Wve,Fk)=>{"use strict";var Dk=Cy(),Pk=kn(),Bh=wn(),UQ=gt().templatedArray,Yve=i0();Fk.exports=UQ("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Pk({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:Dk.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Dk.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",Bh.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Bh.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Bh.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",Bh.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:Pk({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Uh=pe((Xve,Ik)=>{"use strict";Ik.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var zk=pe((Zve,Nk)=>{"use strict";Nk.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var $l=pe((Jve,Vk)=>{"use strict";var qk=ro().axisHoverFormat,HQ=Sa().texttemplateAttrs,VQ=Sa().hovertemplateAttrs,Ok=ja(),GQ=kn(),YQ=Ao().dash,WQ=Ao().pattern,XQ=yt(),ZQ=Uh(),Hh=Mt().extendFlat,JQ=zk();function Bk(e){return{valType:"any",dflt:0,editType:"calc"}}function Uk(e){return{valType:"any",editType:"calc"}}function Hk(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Vk.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:Bk("x"),yperiod:Bk("y"),xperiod0:Uk("x0"),yperiod0:Uk("y0"),xperiodalignment:Hk("x"),yperiodalignment:Hk("y"),xhoverformat:qk("x"),yhoverformat:qk("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:HQ({},{}),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:VQ({},{keys:ZQ.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Hh({},YQ,{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:JQ(!0),fillgradient:Hh({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:WQ,marker:Hh({symbol:{valType:"enumerated",values:XQ.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:Hh({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Ok("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"},Ok("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:GQ({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var Ey=pe((Qve,Wk)=>{"use strict";var Gk=yu(),Yk=$l().line,KQ=Ao().dash,Vh=Mt().extendFlat,QQ=zn().overrideAll,$Q=gt().templatedArray,Kve=i0();Wk.exports=QQ($Q("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:Vh({},Gk.xref,{}),yref:Vh({},Gk.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:Yk.color,width:Vh({},Yk.width,{min:1,dflt:1}),dash:Vh({},KQ,{dflt:"dot"})}}),"arraydraw","from-root")});var Kk=pe(($ve,Jk)=>{"use strict";var Xk=ir(),Gh=St(),jQ=ei(),e$=Ey(),Zk=Wo();Jk.exports=function(r,t){jQ(r,t,{name:"selections",handleItemDefaults:r$});for(var n=t.selections,a=0;a{"use strict";Qk.exports=function(r,t,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var o0=pe((ehe,rS)=>{"use strict";var t$=Er(),jk=ir(),eS=on();rS.exports=function(r){return function(n,a){var o=n[r];if(Array.isArray(o))for(var i=t$.subplotsRegistry.cartesian,l=i.idRegex,u=a._subplots,s=u.xaxis,f=u.yaxis,v=u.cartesian,g=a._has("cartesian"),b=0;b{"use strict";var tS=dy(),l0=Ek();nS.exports={moduleType:"component",name:"selections",layoutAttributes:Ey(),supplyLayoutDefaults:Kk(),supplyDrawNewSelectionDefaults:$k(),includeBasePlot:o0()("selections"),draw:tS.draw,drawOne:tS.drawOne,reselect:l0.reselect,prepSelect:l0.prepSelect,clearOutline:l0.clearOutline,clearSelectionsCache:l0.clearSelectionsCache,selectOnClick:l0.selectOnClick}});var TS=pe((the,MS)=>{"use strict";var Fy=it(),Oa=ir(),aS=Oa.numberFormat,n$=ka(),a$=Zv(),Yh=Er(),hS=Oa.strTranslate,i$=Yn(),iS=Zr(),Zo=yt(),o$=io(),oS=St(),l$=Vo(),s$=ti(),dS=uu(),Wh=dS.selectingOrDrawing,u$=dS.freeMode,f$=qn().FROM_TL,c$=sh(),v$=Rh().redrawReglTraces,h$=ln(),Ry=on().getFromId,d$=mu().prepSelect,p$=mu().clearOutline,g$=mu().selectOnClick,Ly=oy(),Iy=wn(),lS=Iy.MINDRAG,Xn=Iy.MINZOOM,sS=!0;function y$(e,r,t,n,a,o,i,l){var u=e._fullLayout._zoomlayer,s=i+l==="nsew",f=(i+l).length===1,v,g,b,y,w,M,m,A,S,x,T,d,_,p,c,k,h,R,E,D,N,I,F;t+=r.yaxis._shift;function L(){if(v=r.xaxis,g=r.yaxis,S=v._length,x=g._length,m=v._offset,A=g._offset,b={},b[v._id]=v,y={},y[g._id]=g,i&&l)for(var me=r.overlays,he=0;he=0){be._fullLayout._deactivateShape(be);return}var Se=be._fullLayout.clickmode;if(Py(be),me===2&&!f&&Ue(),s)Se.indexOf("select")>-1&&g$(he,be,w,M,r.id,U),Se.indexOf("event")>-1&&o$.click(be,he,r.id);else if(me===1&&f){var ze=i?g:v,Fe=i==="s"||l==="w"?0:1,Je=ze._name+".range["+Fe+"]",Ye=m$(ze,Fe),Ge="left",We="middle";if(ze.fixedrange)return;i?(We=i==="n"?"top":"bottom",ze.side==="right"&&(Ge="right")):l==="e"&&(Ge="right"),be._context.showAxisRangeEntryBoxes&&Fy.select(O).call(i$.makeEditable,{gd:be,immediate:!0,background:be._fullLayout.paper_bgcolor,text:String(Ye),fill:ze.tickfont?ze.tickfont.color:"#444",horizontalAlign:Ge,verticalAlign:We}).on("edit",function(we){var Pe=ze.d2r(we);Pe!==void 0&&Yh.call("_guiRelayout",be,Je,Pe)})}}s$.init(U);var $,Y,q,Z,ne,Q,oe,ee,G,re;function H(me,he,be){var Se=O.getBoundingClientRect();$=he-Se.left,Y=be-Se.top,e._fullLayout._calcInverseTransform(e);var ze=Oa.apply3DTransform(e._fullLayout._invTransform)($,Y);$=ze[0],Y=ze[1],q={l:$,r:$,w:0,t:Y,b:Y,h:0},Z=e._hmpixcount?e._hmlumcount/e._hmpixcount:n$(e._fullLayout.plot_bgcolor).getLuminance(),ne="M0,0H"+S+"V"+x+"H0V0",Q=!1,oe="xy",re=!1,ee=yS(u,Z,m,A,ne),G=mS(u,m,A)}function te(me,he){if(e._transitioningWithDuration)return!1;var be=Math.max(0,Math.min(S,I*me+$)),Se=Math.max(0,Math.min(x,F*he+Y)),ze=Math.abs(be-$),Fe=Math.abs(Se-Y);q.l=Math.min($,be),q.r=Math.max($,be),q.t=Math.min(Y,Se),q.b=Math.max(Y,Se);function Je(){oe="",q.r=q.l,q.t=q.b,G.attr("d","M0,0Z")}if(T.isSubplotConstrained)ze>Xn||Fe>Xn?(oe="xy",ze/S>Fe/x?(Fe=ze*x/S,Y>Se?q.t=Y-Fe:q.b=Y+Fe):(ze=Fe*S/x,$>be?q.l=$-ze:q.r=$+ze),G.attr("d",Xh(q))):Je();else if(d.isSubplotConstrained)if(ze>Xn||Fe>Xn){oe="xy";var Ye=Math.min(q.l/S,(x-q.b)/x),Ge=Math.max(q.r/S,(x-q.t)/x);q.l=Ye*S,q.r=Ge*S,q.b=(1-Ye)*x,q.t=(1-Ge)*x,G.attr("d",Xh(q))}else Je();else!p||Fe0){var we;if(d.isSubplotConstrained||!_&&p.length===1){for(we=0;we1&&(Je.maxallowed!==void 0&&k===(Je.range[0]1&&(Ye.maxallowed!==void 0&&h===(Ye.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function b$(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function yS(e,r,t,n,a){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",hS(t,n)).attr("d",a+"Z")}function mS(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:iS.background,stroke:iS.defaultLine,"stroke-width":1,opacity:0}).attr("transform",hS(r,t)).attr("d","M0,0Z")}function xS(e,r,t,n,a,o){e.attr("d",n+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),bS(e,r,a,o)}function bS(e,r,t,n){t||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function Py(e){Fy.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function _S(e){sS&&e.data&&e._context.showTips&&(Oa.notifier(Oa._(e,"Double-click to zoom back out"),"long"),sS=!1)}function _$(e,r){return"M"+(e.l-.5)+","+(r-Xn-.5)+"h-3v"+(2*Xn+1)+"h3ZM"+(e.r+.5)+","+(r-Xn-.5)+"h3v"+(2*Xn+1)+"h-3Z"}function w$(e,r){return"M"+(r-Xn-.5)+","+(e.t-.5)+"v-3h"+(2*Xn+1)+"v3ZM"+(r-Xn-.5)+","+(e.b+.5)+"v3h"+(2*Xn+1)+"v-3Z"}function Xh(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Xn)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function cS(e,r,t,n,a){for(var o=!1,i={},l={},u,s,f,v,g=(a||{}).xaHash,b=(a||{}).yaHash,y=0;y{"use strict";var M$=it(),Zh=io(),T$=ti(),A$=Vo(),ii=TS().makeDragBox,cn=wn().DRAGGERSIZE;Jh.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){M$.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var n=Object.keys(t._plots||{}).sort(function(o,i){if((t._plots[o].mainplot&&!0)===(t._plots[i].mainplot&&!0)){var l=o.split("y"),u=i.split("y");return l[0]===u[0]?Number(l[1]||1)-Number(u[1]||1):Number(l[0]||1)-Number(u[0]||1)}return t._plots[o].mainplot?1:-1});n.forEach(function(o){var i=t._plots[o],l=i.xaxis,u=i.yaxis;if(!i.mainplot){var s=ii(r,i,l._offset,u._offset,l._length,u._length,"ns","ew");s.onmousemove=function(g){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===o&&r._fullLayout._plots[o]&&Zh.hover(r,g,o)},Zh.hover(r,g,o),r._fullLayout._lasthover=s,r._fullLayout._hoversubplot=o},s.onmouseout=function(g){r._dragging||(r._fullLayout._hoversubplot=null,T$.unhover(r,g))},r._context.showAxisDragHandles&&(ii(r,i,l._offset-cn,u._offset-cn,cn,cn,"n","w"),ii(r,i,l._offset+l._length,u._offset-cn,cn,cn,"n","e"),ii(r,i,l._offset-cn,u._offset+u._length,cn,cn,"s","w"),ii(r,i,l._offset+l._length,u._offset+u._length,cn,cn,"s","e"))}if(r._context.showAxisDragHandles){if(o===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=cn),ii(r,i,l._offset+l._length*.1,f,l._length*.8,cn,"","ew"),ii(r,i,l._offset,f,l._length*.1,cn,"","w"),ii(r,i,l._offset+l._length*.9,f,l._length*.1,cn,"","e")}if(o===u._mainSubplot){var v=u._mainLinePosition;u.side!=="right"&&(v-=cn),ii(r,i,v,u._offset+u._length*.1,cn,u._length*.8,"ns",""),ii(r,i,v,u._offset+u._length*.9,cn,u._length*.1,"s",""),ii(r,i,v,u._offset,cn,u._length*.1,"n","")}}});var a=t._hoverlayer.node();a.onmousemove=function(o){o.target=r._fullLayout._lasthover,Zh.hover(r,o,t._hoversubplot)},a.onclick=function(o){o.target=r._fullLayout._lasthover,Zh.click(r,o)},a.onmousedown=function(o){r._fullLayout._lasthover.onmousedown(o)},Jh.updateFx(r)}};Jh.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";A$(r._draggers,t)}});var SS=pe((ahe,kS)=>{"use strict";var AS=Er();kS.exports=function(r){for(var t=AS.layoutArrayContainers,n=AS.layoutArrayRegexes,a=r.split("[")[0],o,i,l=0;l{"use strict";var k$=wo(),zy=Fc(),s0=Al(),S$=Dp().sorterAsc,qy=Er();u0.containerArrayMatch=SS();var C$=u0.isAddVal=function(r){return r==="add"||k$(r)},CS=u0.isRemoveVal=function(r){return r===null||r==="remove"};u0.applyContainerArrayChanges=function(r,t,n,a,o){var i=t.astr,l=qy.getComponentMethod(i,"supplyLayoutDefaults"),u=qy.getComponentMethod(i,"draw"),s=qy.getComponentMethod(i,"drawOne"),f=a.replot||a.recalc||l===zy||u===zy,v=r.layout,g=r._fullLayout;if(n[""]){Object.keys(n).length>1&&s0.warn("Full array edits are incompatible with other edits",i);var b=n[""][""];if(CS(b))t.set(null);else if(Array.isArray(b))t.set(b);else return s0.warn("Unrecognized full array edit value",i,b),!0;return f?!1:(l(v,g),u(r),!0)}var y=Object.keys(n).map(Number).sort(S$),w=t.get(),M=w||[],m=o(g,i).get(),A=[],S=-1,x=M.length,T,d,_,p,c,k,h,R;for(T=0;TM.length-(h?0:1)){s0.warn("index out of range",i,_);continue}if(k!==void 0)c.length>1&&s0.warn("Insertion & removal are incompatible with edits to the same index.",i,_),CS(k)?A.push(_):h?(k==="add"&&(k={}),M.splice(_,0,k),m&&m.splice(_,0,{})):s0.warn("Unrecognized full object edit value",i,_,k),S===-1&&(S=_);else for(d=0;d=0;T--)M.splice(A[T],1),m&&m.splice(A[T],1);if(M.length?w||t.set(M):t.set(null),f)return!1;if(l(v,g),s!==zy){var E;if(S===-1)E=y;else{for(x=Math.max(M.length,x),E=[],T=0;T=S));T++)E.push(_);for(T=S;T{"use strict";var PS=rt(),ohe=wp(),FS=Er(),fa=ir(),f0=ln(),IS=on(),NS=Zr(),c0=IS.cleanId,E$=IS.getFromTrace,Oy=FS.traceIs;oi.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&fa.log("Clearing previous rejected promises from queue."),e._promises=[]};oi.cleanLayout=function(e){var r,t;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=(f0.subplotsRegistry.cartesian||{}).attrRegex,a=(f0.subplotsRegistry.polar||{}).attrRegex,o=(f0.subplotsRegistry.ternary||{}).attrRegex,i=(f0.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(M.x=1.02,M.xanchor="left"):M.x<-2&&(M.x=-.02,M.xanchor="right"),M.y>3?(M.y=1.02,M.yanchor="bottom"):M.y<-2&&(M.y=-.02,M.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),NS.clean(e),e.template&&e.template.layout&&oi.cleanLayout(e.template.layout),e};function xu(e,r){var t=e[r],n=r.charAt(0);t&&t!=="paper"&&(e[r]=c0(t,n,!0))}oi.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}oi.hasParent=function(e,r){for(var t=DS(r);t;){if(t in e)return!0;t=DS(t)}return!1};var D$=["x","y","z"];oi.clearAxisTypes=function(e,r,t){for(var n=0;n{"use strict";var jh=it(),P$=rt(),F$=Yp(),fr=ir(),xt=fr.nestedProperty,Hy=mf(),Zn=yw(),Ba=Er(),o1=Vs(),Rr=ln(),Vn=St(),I$=v2(),N$=Ra(),By=yt(),z$=Zr(),q$=Ny().initInteractions,O$=Io(),B$=mu().clearOutline,HS=Tl().dfltConfig,Qh=ES(),Jt=zS(),ht=Rh(),Jo=zn(),U$=wn().AX_NAME_PATTERN,Uy=0,qS=5;function H$(e,r,t,n){var a;if(e=fr.getGraphDiv(e),Hy.init(e),fr.isPlainObject(r)){var o=r;r=o.data,t=o.layout,n=o.config,a=o.frames}var i=Hy.triggerHandler(e,"plotly_beforeplot",[r,t,n]);if(i===!1)return Promise.reject();!r&&!t&&!fr.isPlotDiv(e)&&fr.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(a)return tt.addFrames(e,a)}GS(e,n),t||(t={}),jh.select(e).classed("js-plotly-plot",!0),By.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var u=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(Jt.cleanData(r),u?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||u)&&(e.layout=Jt.cleanLayout(t)),Rr.supplyDefaults(e);var s=e._fullLayout,f=s._has("cartesian");s._replotting=!0,(u||s._shouldCreateBgLayer)&&(fj(e),s._shouldCreateBgLayer&&delete s._shouldCreateBgLayer),By.initGradients(e),By.initPatterns(e),u&&Vn.saveShowSpikeInitial(e);var v=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;v&&Rr.doCalcdata(e);for(var g=0;g=e.data.length||a<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(a,n+1)>-1||a>=0&&r.indexOf(-e.data.length+a)>-1||a<0&&r.indexOf(e.data.length+a)>-1)throw new Error("each index in "+t+" must be unique.")}}function YS(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),r1(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&r1(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function X$(e,r,t){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),n=0;n=0&&f=0&&f0&&typeof p.parts[h]!="string";)h--;var R=p.parts[h],E=p.parts[h-1]+"."+R,D=p.parts.slice(0,h).join("."),N=xt(e.layout,D).get(),I=xt(n,D).get(),F=p.get();if(c!==void 0){m[_]=c,A[_]=R==="reverse"?c:uo(F);var L=o1.getLayoutValObject(n,p.parts);if(L&&L.impliedEdits&&c!==null)for(var P in L.impliedEdits)S(fr.relativeAttr(_,P),L.impliedEdits[P]);if(["width","height"].indexOf(_)!==-1)if(c){S("autosize",null);var O=_==="height"?"width":"height";S(O,n[O])}else n[_]=e._initialAutoSize[_];else if(_==="autosize")S("width",c?null:n.width),S("height",c?null:n.height);else if(E.match(eC))d(E),xt(n,D+"._inputRange").set(null);else if(E.match(rC)){d(E),xt(n,D+"._inputRange").set(null);var U=xt(n,D).get();U._inputDomain&&(U._input.domain=U._inputDomain.slice())}else E.match(tC)&&xt(n,D+"._inputDomain").set(null);if(R==="type"){T=N;var X=I.type==="linear"&&c==="log",j=I.type==="log"&&c==="linear";if(X||j){if(!T||!T.range)S(D+".autorange",!0);else if(I.autorange)X&&(T.range=T.range[1]>T.range[0]?[1,2]:[2,1]);else{var $=T.range[0],Y=T.range[1];X?($<=0&&Y<=0&&S(D+".autorange",!0),$<=0?$=Y/1e6:Y<=0&&(Y=$/1e6),S(D+".range[0]",Math.log($)/Math.LN10),S(D+".range[1]",Math.log(Y)/Math.LN10)):(S(D+".range[0]",Math.pow(10,$)),S(D+".range[1]",Math.pow(10,Y)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[p.parts[0]]&&p.parts[1]==="radialaxis"&&delete n[p.parts[0]]._subplot.viewInitial["radialaxis.range"],Ba.getComponentMethod("annotations","convertCoords")(e,I,c,S),Ba.getComponentMethod("images","convertCoords")(e,I,c,S)}else S(D+".autorange",!0),S(D+".range",null);xt(n,D+"._inputRange").set(null)}else if(R.match(U$)){var q=xt(n,_).get(),Z=(c||{}).type;(!Z||Z==="-")&&(Z="linear"),Ba.getComponentMethod("annotations","convertCoords")(e,q,Z,S),Ba.getComponentMethod("images","convertCoords")(e,q,Z,S)}var ne=Qh.containerArrayMatch(_);if(ne){f=ne.array,v=ne.index;var Q=ne.property,oe=L||{editType:"calc"};v!==""&&Q===""&&(Qh.isAddVal(c)?A[_]=null:Qh.isRemoveVal(c)?A[_]=(xt(t,f).get()||[])[v]:fr.warn("unrecognized full object value",r)),Jo.update(M,oe),s[f]||(s[f]={});var ee=s[f][v];ee||(ee=s[f][v]={}),ee[Q]=c,delete r[_]}else R==="reverse"?(N.range?N.range.reverse():(S(D+".autorange",!0),N.range=[1,0]),I.autorange?M.calc=!0:M.plot=!0):(_==="dragmode"&&(c===!1&&F!==!1||c!==!1&&F===!1)||n._has("scatter-like")&&n._has("regl")&&_==="dragmode"&&(c==="lasso"||c==="select")&&!(F==="lasso"||F==="select")?M.plot=!0:L?Jo.update(M,L):M.calc=!0,p.set(c))}}for(f in s){var G=Qh.applyContainerArrayChanges(e,o(t,f),s[f],M,o);G||(M.plot=!0)}for(var re in x){T=Vn.getFromId(e,re);var H=T&&T._constraintGroup;if(H){M.calc=!0;for(var te in H)x[te]||(Vn.getFromId(e,te)._constraintShrinkable=!0)}}(aC(e)||r.height||r.width)&&(M.plot=!0);var ue=n.shapes;for(v=0;v1;)if(n.pop(),t=xt(r,n.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function j$(e,r){for(var t=0;t=a.length?a[0]:a[s]:a}function l(s){return Array.isArray(o)?s>=o.length?o[0]:o[s]:o}function u(s,f){var v=0;return function(){if(s&&++v===f)return s()}}return new Promise(function(s,f){function v(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var R=n._frameQueue.pop();R.onInterrupt&&R.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function g(R){if(R.length!==0){for(var E=0;En._timeToNext&&y()};R()}var M=0;function m(R){return Array.isArray(a)?M>=a.length?R.transitionOpts=a[M]:R.transitionOpts=a[0]:R.transitionOpts=a,M++,R}var A,S,x=[],T=r==null,d=Array.isArray(r),_=!T&&!d&&fr.isPlainObject(r);if(_)x.push({type:"object",data:m(fr.extendFlat({},r))});else if(T||["string","number"].indexOf(typeof r)!==-1)for(A=0;A0&&kk)&&h.push(S);x=h}}x.length>0?g(x):(e.emit("plotly_animated"),s())})}function oj(e,r,t){if(e=fr.getGraphDiv(e),r==null)return Promise.resolve();if(!fr.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,a,o,i,l=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var s=l.length+r.length*2,f=[],v={};for(n=r.length-1;n>=0;n--)if(fr.isPlainObject(r[n])){var g=r[n].name,b=(u[g]||v[g]||{}).name,y=r[n].name,w=u[b]||v[b];b&&y&&typeof y=="number"&&w&&Uyp.index?-1:_.index=0;n--){if(a=f[n].frame,typeof a.name=="number"&&fr.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;t--)n=r[t],o.push({type:"delete",index:n}),i.unshift({type:"insert",index:n,value:a[n]});var l=Rr.modifyFrames,u=Rr.modifyFrames,s=[e,i],f=[e,o];return Zn&&Zn.add(e,l,s,u,f),Rr.modifyFrames(e,o)}function sj(e){e=fr.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return Rr.cleanPlot([],{},t,r),Rr.purge(e),Hy.purge(e),r._container&&r._container.remove(),delete e._context,e}function uj(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!fr.equalDomRects(t,r._lastBBox)){var n=r._invTransform=fr.inverseTransformMatrix(fr.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),r._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),r._lastBBox=t}}function fj(e){var r=jh.select(e),t=e._fullLayout;if(t._calcInverseTransform=uj,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var n={};jh.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),t._uid=fr.randstr(n)}t._paperdiv.selectAll(".main-svg").attr(O$.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var a=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=a.append("g").classed("imagelayer",!0),t._shapeLowerLayer=a.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var o=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=o.append("g").classed("imagelayer",!0),t._shapeUpperLayer=o.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}tt.animate=ij;tt.addFrames=oj;tt.deleteFrames=lj;tt.addTraces=KS;tt.deleteTraces=QS;tt.extendTraces=ZS;tt.moveTraces=Vy;tt.prependTraces=JS;tt.newPlot=W$;tt._doPlot=H$;tt.purge=sj;tt.react=tj;tt.redraw=Y$;tt.relayout=v0;tt.restyle=t1;tt.setPlotConfig=V$;tt.update=a1;tt._guiRelayout=Yy(v0);tt._guiRestyle=Yy(t1);tt._guiUpdate=Yy(a1);tt._storeDirectGUIEdit=K$});var jl=pe(Oi=>{"use strict";var cj=Er();Oi.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Oi.getRedrawFunc=function(e){return function(){cj.getComponentMethod("colorbar","draw")(e)}};Oi.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Oi.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var iC=window.URL||window.webkitURL;Oi.createObjectURL=function(e){return iC.createObjectURL(e)};Oi.revokeObjectURL=function(e){return iC.revokeObjectURL(e)};Oi.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=vj(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Oi.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function vj(e){for(var r=e.length,t=new ArrayBuffer(r),n=new Uint8Array(t),a=0;a{"use strict";var Zy=it(),fhe=ir(),hj=yt(),dj=Zr(),che=Io(),Xy=/"/g,d0="TOBESTRIPPED",pj=new RegExp('("'+d0+")|("+d0+'")',"g");function gj(e){var r=Zy.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":r.html(n).text()});return r.remove(),t}function yj(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}oC.exports=function(r,t,n){var a=r._fullLayout,o=a._paper,i=a._toppaper,l=a.width,u=a.height,s;o.insert("rect",":first-child").call(hj.setRect,0,0,l,u).call(dj.fill,a.paper_bgcolor);var f=a._basePlotModules||[];for(s=0;s{"use strict";var mj=ir(),xj=tv().EventEmitter,p0=jl();function bj(e){var r=e.emitter||new xj,t=new Promise(function(n,a){var o=window.Image,i=e.svg,l=e.format||"png",u=e.canvas,s=e.scale||1,f=e.width||300,v=e.height||150,g=s*f,b=s*v,y=u.getContext("2d",{willReadFrequently:!0}),w=new o,M,m;l==="svg"||mj.isSafari()?m=p0.encodeSVG(i):(M=p0.createBlob(i,"svg"),m=p0.createObjectURL(M)),u.width=g,u.height=b,w.onload=function(){var A;switch(M=null,p0.revokeObjectURL(m),l!=="svg"&&y.drawImage(w,0,0,g,b),l){case"jpeg":A=u.toDataURL("image/jpeg");break;case"png":A=u.toDataURL("image/png");break;case"webp":A=u.toDataURL("image/webp");break;case"svg":A=m;break;default:var S="Image format is not jpeg, png, svg or webp.";if(a(new Error(S)),!e.promise)return r.emit("error",S)}n(A),e.promise||r.emit("success",A)},w.onerror=function(A){if(M=null,p0.revokeObjectURL(m),a(A),!e.promise)return r.emit("error",A)},w.src=m});return e.promise?t:r}lC.exports=bj});var Ky=pe((dhe,fC)=>{"use strict";var sC=rt(),uC=Wy(),_j=ln(),Bi=ir(),g0=jl(),wj=s1(),Mj=u1(),Tj=pc().version,Jy={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 Aj(e,r){r=r||{};var t,n,a,o;Bi.isPlainObject(e)?(t=e.data||[],n=e.layout||{},a=e.config||{},o={}):(e=Bi.getGraphDiv(e),t=Bi.extendDeep([],e.data),n=Bi.extendDeep({},e.layout),a=e._context,o=e._fullLayout||{});function i(d){return!(d in r)||Bi.validate(r[d],Jy[d])}if(!i("width")&&r.width!==null||!i("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!i("format"))throw new Error("Export format is not "+Bi.join2(Jy.format.values,", "," or ")+".");var l={};function u(d,_){return Bi.coerce(r,l,Jy,d,_)}var s=u("format"),f=u("width"),v=u("height"),g=u("scale"),b=u("setBackground"),y=u("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var M=Bi.extendFlat({},n);f?M.width=f:r.width===null&&sC(o.width)&&(M.width=o.width),v?M.height=v:r.height===null&&sC(o.height)&&(M.height=o.height);var m=Bi.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:b}),A=g0.getRedrawFunc(w);function S(){return new Promise(function(d){setTimeout(d,g0.getDelay(w._fullLayout))})}function x(){return new Promise(function(d,_){var p=wj(w,s,g),c=w._fullLayout.width,k=w._fullLayout.height;function h(){uC.purge(w),document.body.removeChild(w)}if(s==="full-json"){var R=_j.graphJson(w,!1,"keepdata","object",!0,!0);return R.version=Tj,R=JSON.stringify(R),h(),d(y?R:g0.encodeJSON(R))}if(h(),s==="svg")return d(y?p:g0.encodeSVG(p));var E=document.createElement("canvas");E.id=Bi.randstr(),Mj({format:s,width:c,height:k,scale:g,canvas:E,svg:p,promise:!0}).then(d).catch(_)})}function T(d){return y?d.replace(g0.IMAGE_URL_PREFIX,""):d}return new Promise(function(d,_){uC.newPlot(w,t,M,m).then(A).then(S).then(x).then(function(p){d(T(p))}).catch(function(p){_(p)})})}fC.exports=Aj});var dC=pe((phe,hC)=>{"use strict";var Ua=ir(),kj=ln(),Sj=Vs(),Cj=Tl().dfltConfig,li=Ua.isPlainObject,rs=Array.isArray,cC=Ua.isArrayOrTypedArray;hC.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var n=Sj.get(),a=[],o={_context:Ua.extendFlat({},Cj)},i,l;rs(r)?(o.data=Ua.extendDeep([],r),i=r):(o.data=[],i=[],a.push(vn("array","data"))),li(t)?(o.layout=Ua.extendDeep({},t),l=t):(o.layout={},l={},arguments.length>1&&a.push(vn("object","layout"))),kj.supplyDefaults(o);for(var u=o._fullData,s=i.length,f=0;fv.length&&n.push(vn("unused",a,s.concat(v.length)));var m=v.length,A=Array.isArray(M);A&&(m=Math.min(m,M.length));var S,x,T,d,_;if(g.dimensions===2)for(x=0;xv[x].length&&n.push(vn("unused",a,s.concat(x,v[x].length)));var p=v[x].length;for(S=0;S<(A?Math.min(p,M[x].length):p);S++)T=A?M[x][S]:M,d=f[x][S],_=v[x][S],Ua.validate(d,T)?_!==d&&_!==+d&&n.push(vn("dynamic",a,s.concat(x,S),d,_)):n.push(vn("value",a,s.concat(x,S),d))}else n.push(vn("array",a,s.concat(x),f[x]));else for(x=0;x{"use strict";var Ij=ir(),c1=jl();function Nj(e,r,t){var n=document.createElement("a"),a="download"in n,o=new Promise(function(i,l){var u,s;if(a)return u=c1.createBlob(e,t),s=c1.createObjectURL(u),n.href=s,n.download=r,document.body.appendChild(n),n.click(),document.body.removeChild(n),c1.revokeObjectURL(s),u=null,i(r);if(Ij.isSafari()){var f=t==="svg"?",":";base64,";return c1.octetStream(f+encodeURIComponent(e)),i(r)}l(new Error("download error"))});return o}pC.exports=Nj});var Qy=pe((mhe,mC)=>{"use strict";var yC=ir(),zj=Ky(),qj=gC(),yhe=jl();function Oj(e,r){var t;return yC.isPlainObject(e)||(t=yC.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(n,a){t&&t._snapshotInProgress&&a(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var o=zj(e,r),i=r.filename||e.fn||"newplot";i+="."+r.format.replace("-","."),o.then(function(l){return t&&(t._snapshotInProgress=!1),qj(l,i,r.format)}).then(function(l){n(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),a(l)})})}mC.exports=Oj});var MC=pe($y=>{"use strict";var ca=ir(),va=ca.isPlainObject,xC=Vs(),bC=ln(),Bj=Sn(),_C=gt(),wC=Tl().dfltConfig;$y.makeTemplate=function(e){e=ca.isPlainObject(e)?e:ca.getGraphDiv(e),e=ca.extendDeep({_context:wC},{data:e.data,layout:e.layout}),bC.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var n={data:{},layout:{}};r.forEach(function(b){var y={};y0(b,y,Hj.bind(null,b));var w=ca.coerce(b,{},Bj,"type"),M=n.data[w];M||(M=n.data[w]=[]),M.push(y)}),y0(t,n.layout,Uj.bind(null,t)),delete n.layout.template;var a=t.template;if(va(a)){var o=a.layout,i,l,u,s,f,v;va(o)&&v1(o,n.layout);var g=a.data;if(va(g)){for(l in n.data)if(u=g[l],Array.isArray(u)){for(f=n.data[l],v=f.length,s=u.length,i=0;im?i.push({code:"unused",traceType:b,templateCount:M,dataCount:m}):m>M&&i.push({code:"reused",traceType:b,templateCount:M,dataCount:m})}}function A(S,x){for(var T in S)if(T.charAt(0)!=="_"){var d=S[T],_=Ha(S,T,x);va(d)?(Array.isArray(S)&&d._template===!1&&d.templateitemname&&i.push({code:"missing",path:_,templateitemname:d.templateitemname}),A(d,_)):Array.isArray(d)&&Vj(d)&&A(d,_)}}if(A({data:u,layout:l},""),i.length)return i.map(Gj)};function Vj(e){for(var r=0;r{"use strict";var rn=Wy();kt._doPlot=rn._doPlot;kt.newPlot=rn.newPlot;kt.restyle=rn.restyle;kt.relayout=rn.relayout;kt.redraw=rn.redraw;kt.update=rn.update;kt._guiRestyle=rn._guiRestyle;kt._guiRelayout=rn._guiRelayout;kt._guiUpdate=rn._guiUpdate;kt._storeDirectGUIEdit=rn._storeDirectGUIEdit;kt.react=rn.react;kt.extendTraces=rn.extendTraces;kt.prependTraces=rn.prependTraces;kt.addTraces=rn.addTraces;kt.deleteTraces=rn.deleteTraces;kt.moveTraces=rn.moveTraces;kt.purge=rn.purge;kt.addFrames=rn.addFrames;kt.deleteFrames=rn.deleteFrames;kt.animate=rn.animate;kt.setPlotConfig=rn.setPlotConfig;var Yj=ff().getGraphDiv,Wj=Th().eraseActiveShape;kt.deleteActiveShape=function(e){return Wj(Yj(e))};kt.toImage=Ky();kt.validate=dC();kt.downloadImage=Qy();var TC=MC();kt.makeTemplate=TC.makeTemplate;kt.validateTemplate=TC.validateTemplate});var SC=pe((_he,kC)=>{"use strict";var jy=ir(),Xj=Er();kC.exports=function(r,t,n,a){var o=a("x"),i=a("y"),l,u=Xj.getComponentMethod("calendars","handleTraceDefaults");if(u(r,t,["x","y"],n),o){var s=jy.minRowLength(o);i?l=Math.min(s,jy.minRowLength(i)):(l=s,a("y0"),a("dy"))}else{if(!i)return 0;l=jy.minRowLength(i),a("x0"),a("dx")}return t._length=l,l}});var RC=pe((whe,LC)=>{"use strict";var CC=ir().dateTick0,Zj=nn(),Jj=Zj.ONEWEEK;function EC(e,r){return e%Jj===0?CC(r,1):CC(r,0)}LC.exports=function(r,t,n,a,o){if(o||(o={x:!0,y:!0}),o.x){var i=a("xperiod");i&&(a("xperiod0",EC(i,t.xcalendar)),a("xperiodalignment"))}if(o.y){var l=a("yperiod");l&&(a("yperiod0",EC(l,t.ycalendar)),a("yperiodalignment"))}}});var FC=pe((Mhe,PC)=>{"use strict";var DC=["orientation","groupnorm","stackgaps"];PC.exports=function(r,t,n,a){var o=n._scatterStackOpts,i=a("stackgroup");if(i){var l=t.xaxis+t.yaxis,u=o[l];u||(u=o[l]={});var s=u[i],f=!1;s?s.traces.push(t):(s=u[i]={traceIndices:[],traces:[t]},f=!0);for(var v={orientation:t.x&&!t.y?"h":"v"},g=0;g{"use strict";var IC=Zr(),NC=Si().hasColorscale,zC=Ei(),Kj=oa();qC.exports=function(r,t,n,a,o,i){var l=Kj.isBubble(r),u=(r.line||{}).color,s;if(i=i||{},u&&(n=u),o("marker.symbol"),o("marker.opacity",l?.7:1),o("marker.size"),i.noAngle||(o("marker.angle"),i.noAngleRef||o("marker.angleref"),i.noStandOff||o("marker.standoff")),o("marker.color",n),NC(r,"marker")&&zC(r,t,a,o,{prefix:"marker.",cLetter:"c"}),i.noSelect||(o("selected.marker.color"),o("unselected.marker.color"),o("selected.marker.size"),o("unselected.marker.size")),i.noLine||(u&&!Array.isArray(u)&&t.marker.color!==u?s=u:l?s=IC.background:s=IC.defaultLine,o("marker.line.color",s),NC(r,"marker.line")&&zC(r,t,a,o,{prefix:"marker.line.",cLetter:"c"}),o("marker.line.width",l?1:0)),l&&(o("marker.sizeref"),o("marker.sizemin"),o("marker.sizemode")),i.gradient){var f=o("marker.gradient.type");f!=="none"&&o("marker.gradient.color")}}});var rm=pe((Ahe,OC)=>{"use strict";var Qj=ir().isArrayOrTypedArray,$j=Si().hasColorscale,jj=Ei();OC.exports=function(r,t,n,a,o,i){i||(i={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),o("line.color",n),$j(r,"line"))jj(r,t,a,o,{prefix:"line.",cLetter:"c"});else{var u=(Qj(l)?!1:l)||n;o("line.color",u)}o("line.width"),i.noDash||o("line.dash"),i.backoff&&o("line.backoff")}});var UC=pe((khe,BC)=>{"use strict";BC.exports=function(r,t,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var tm=pe((She,HC)=>{"use strict";var eee=ir();HC.exports=function(e,r,t,n,a){a=a||{},n("textposition"),eee.coerceFont(n,"textfont",a.font||t.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var YC=pe((Che,GC)=>{"use strict";var d1=Zr(),VC=ir().isArrayOrTypedArray;function ree(e){for(var r=d1.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var WC=ir(),tee=Er(),nee=$l(),aee=Uh(),bu=oa(),iee=SC(),oee=RC(),lee=FC(),see=em(),uee=rm(),XC=UC(),fee=tm(),cee=YC(),vee=ir().coercePattern;ZC.exports=function(r,t,n,a){function o(b,y){return WC.coerce(r,t,nee,b,y)}var i=iee(r,t,a,o);if(i||(t.visible=!1),!!t.visible){oee(r,t,a,o),o("xhoverformat"),o("yhoverformat"),o("zorder");var l=lee(r,t,a,o);a.scattermode==="group"&&t.orientation===void 0&&o("orientation","v");var u=!l&&i{"use strict";var hee=Vf().getAxisGroup;KC.exports=function(r,t,n,a,o){var i=t.orientation,l=t[{v:"x",h:"y"}[i]+"axis"],u=hee(n,l)+i,s=n._alignmentOpts||{},f=a("alignmentgroup"),v=s[u];v||(v=s[u]={});var g=v[f];g?g.traces.push(t):g=v[f]={traces:[t],alignmentIndex:Object.keys(v).length,offsetGroups:{}};var b=a("offsetgroup")||"",y=g.offsetGroups,w=y[b];t._offsetIndex=0,(o!=="group"||b)&&(w||(w=y[b]={offsetIndex:Object.keys(y).length}),t._offsetIndex=w.offsetIndex)}});var jC=pe((Rhe,$C)=>{"use strict";var dee=ir(),pee=QC(),gee=$l();$C.exports=function(r,t){var n,a,o,i=t.scattermode;function l(g){return dee.coerce(a._input,a,gee,g)}if(t.scattermode==="group")for(o=0;o=0;f--){var v=r[f];if(v.type==="scatter"&&v.xaxis===u.xaxis&&v.yaxis===u.yaxis){v.opacity=void 0;break}}}}}});var rE=pe((Dhe,eE)=>{"use strict";var yee=ir(),mee=lv();eE.exports=function(e,r){function t(a,o){return yee.coerce(e,r,mee,a,o)}var n=r.barmode==="group";r.scattermode==="group"&&t("scattergap",n?r.bargap:.2)}});var aE=pe((Phe,nE)=>{"use strict";var xee=rt(),tE=ir(),bee=tE.dateTime2ms,p1=tE.incrementMonth,_ee=nn(),wee=_ee.ONEAVGMONTH;nE.exports=function(r,t,n,a){if(t.type!=="date")return{vals:a};var o=r[n+"periodalignment"];if(!o)return{vals:a};var i=r[n+"period"],l;if(xee(i)){if(i=+i,i<=0)return{vals:a}}else if(typeof i=="string"&&i.charAt(0)==="M"){var u=+i.substring(1);if(u>0&&Math.round(u)===u)l=u;else return{vals:a}}for(var s=t.calendar,f=o==="start",v=o==="end",g=r[n+"period0"],b=bee(g,s)||0,y=[],w=[],M=[],m=a.length,A=0;AS;)d=p1(d,-l,s);for(;d<=S;)d=p1(d,l,s);T=p1(d,-l,s)}else{for(x=Math.round((S-b)/i),d=b+x*i;d>S;)d-=i;for(;d<=S;)d+=i;T=d-i}y[A]=f?T:v?d:(T+d)/2,w[A]=T,M[A]=d}return{vals:y,starts:w,ends:M}}});var im=pe((Fhe,oE)=>{"use strict";var nm=Si().hasColorscale,am=zo(),iE=oa();oE.exports=function(r,t){iE.hasLines(t)&&nm(t,"line")&&am(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),iE.hasMarkers(t)&&(nm(t,"marker")&&am(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),nm(t,"marker.line")&&am(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var g1=pe((Ihe,lE)=>{"use strict";var Nt=ir();lE.exports=function(r,t){for(var n=0;n{"use strict";var sE=ir();uE.exports=function(r,t){sE.isArrayOrTypedArray(t.selectedpoints)&&sE.tagSelected(r,t)}});var fm=pe((zhe,yE)=>{"use strict";var cE=rt(),lm=ir(),m0=St(),vE=aE(),om=nn().BADNUM,sm=oa(),Mee=im(),Tee=g1(),Aee=fE();function kee(e,r){var t=e._fullLayout,n=r._xA=m0.getFromId(e,r.xaxis||"x","x"),a=r._yA=m0.getFromId(e,r.yaxis||"y","y"),o=n.makeCalcdata(r,"x"),i=a.makeCalcdata(r,"y"),l=vE(r,n,"x",o),u=vE(r,a,"y",i),s=l.vals,f=u.vals,v=r._length,g=new Array(v),b=r.ids,y=um(r,t,n,a),w=!1,M,m,A,S,x,T;pE(t,r);var d="x",_="y",p;if(y)lm.pushUnique(y.traceIndices,r.index),M=y.orientation==="v",M?(_="s",p="x"):(d="s",p="y"),x=y.stackgaps==="interpolate";else{var c=dE(r,v);hE(e,r,n,a,s,f,c)}var k=!!r.xperiodalignment,h=!!r.yperiodalignment;for(m=0;mm&&g[S].gap;)S--;for(T=g[S].s,A=g.length-1;A>S;A--)g[A].s=T;for(;m{"use strict";mE.exports=y1;var See=ir().distinctVals;function y1(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,n=r.posAxis._id.charAt(0),a=[],o=0;o{"use strict";var Va=rt(),Ko=ir().isArrayOrTypedArray,_u=nn().BADNUM,Cee=Er(),x0=St(),Eee=Vf().getAxisGroup,m1=xE();function Lee(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,o=e._fullData,i=e.calcdata,l=[],u=[],s=0;su+i||!Va(l))}for(var f=0;f{"use strict";var AE=fm(),kE=TE().setGroupPositions;function Hee(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,o=e._fullData,i=e.calcdata,l=[],u=[],s=0;sc[f]&&f{"use strict";var Gee=yt(),DE=nn(),b0=DE.BADNUM,PE=DE.LOG_CLIP,EE=PE+.5,LE=PE-.5,x1=ir(),Yee=x1.segmentsIntersect,RE=x1.constrain,gm=Uh();FE.exports=function(r,t){var n=t.trace||{},a=t.xaxis,o=t.yaxis,i=a.type==="log",l=o.type==="log",u=a._length,s=o._length,f=t.backoff,v=n.marker,g=t.connectGaps,b=t.baseTolerance,y=t.shape,w=y==="linear",M=n.fill&&n.fill!=="none",m=[],A=gm.minTolerance,S=r.length,x=new Array(S),T=0,d,_,p,c,k,h,R,E,D,N,I,F,L,P,O,U;function X(We){var we=r[We];if(!we)return!1;var Pe=t.linearized?a.l2p(we.x):a.c2p(we.x),Qe=t.linearized?o.l2p(we.y):o.c2p(we.y);if(Pe===b0){if(i&&(Pe=a.c2p(we.x,!0)),Pe===b0)return!1;l&&Qe===b0&&(Pe*=Math.abs(a._m*s*(a._m>0?EE:LE)/(o._m*u*(o._m>0?EE:LE)))),Pe*=1e3}if(Qe===b0){if(l&&(Qe=o.c2p(we.y,!0)),Qe===b0)return!1;Qe*=1e3}return[Pe,Qe]}function j(We,we,Pe,Qe){var Ve=Pe-We,ar=Qe-we,se=.5-We,K=.5-we,ae=Ve*Ve+ar*ar,Re=Ve*se+ar*K;if(Re>0&&Re1||Math.abs(se.y-Pe[0][1])>1)&&(se=[se.x,se.y],Qe&&Z(se,We)oe||We[1]G)return[RE(We[0],Q,oe),RE(We[1],ee,G)]}function ke(We,we){if(We[0]===we[0]&&(We[0]===Q||We[0]===oe)||We[1]===we[1]&&(We[1]===ee||We[1]===G))return!0}function De(We,we){var Pe=[],Qe=Ae(We),Ve=Ae(we);return Qe&&Ve&&ke(Qe,Ve)||(Qe&&Pe.push(Qe),Ve&&Pe.push(Ve)),Pe}function Ce(We,we,Pe){return function(Qe,Ve){var ar=Ae(Qe),se=Ae(Ve),K=[];if(ar&&se&&ke(ar,se))return K;ar&&K.push(ar),se&&K.push(se);var ae=2*x1.constrain((Qe[We]+Ve[We])/2,we,Pe)-((ar||Qe)[We]+(se||Ve)[We]);if(ae){var Re;ar&&se?Re=ae>0==ar[We]>se[We]?ar:se:Re=ar||se,Re[We]+=ae}return K}}var Oe;y==="linear"||y==="spline"?Oe=ve:y==="hv"||y==="vh"?Oe=De:y==="hvh"?Oe=Ce(0,Q,oe):y==="vhv"&&(Oe=Ce(1,ee,G));function Ue(We,we){var Pe=we[0]-We[0],Qe=(we[1]-We[1])/Pe,Ve=(We[1]*we[0]-we[1]*We[0])/Pe;return Ve>0?[Qe>0?Q:oe,G]:[Qe>0?oe:Q,ee]}function ge(We){var we=We[0],Pe=We[1],Qe=we===x[T-1][0],Ve=Pe===x[T-1][1];if(!(Qe&&Ve))if(T>1){var ar=we===x[T-2][0],se=Pe===x[T-2][1];Qe&&(we===Q||we===oe)&&ar?se?T--:x[T-1]=We:Ve&&(Pe===ee||Pe===G)&&se?ar?T--:x[T-1]=We:x[T++]=We}else x[T++]=We}function Te(We){x[T-1][0]!==We[0]&&x[T-1][1]!==We[1]&&ge([ue,de]),ge(We),Ee=null,ue=de=0}var ce=x1.isArrayOrTypedArray(v);function ye(We){if(We&&f&&(We.i=d,We.d=r,We.trace=n,We.marker=ce?v[We.i]:v,We.backoff=f),$=We[0]/u,Y=We[1]/s,H=We[0]oe?oe:0,te=We[1]G?G:0,H||te){if(!T)x[T++]=[H||We[0],te||We[1]];else if(Ee){var we=Oe(Ee,We);we.length>1&&(Te(we[0]),x[T++]=we[1])}else Me=Oe(x[T-1],We)[0],x[T++]=Me;var Pe=x[T-1];H&&te&&(Pe[0]!==H||Pe[1]!==te)?(Ee&&(ue!==H&&de!==te?ge(ue&&de?Ue(Ee,We):[ue||H,de||te]):ue&&de&&ge([ue,de])),ge([H,te])):ue-H&&de-te&&ge([H||ue,te||de]),Ee=We,ue=H,de=te}else Ee&&Te(Oe(Ee,We)[0]),x[T++]=We}for(d=0;dq(h,Le))break;p=h,L=D[0]*E[0]+D[1]*E[1],L>I?(I=L,c=h,R=!1):L=r.length||!h)break;ye(h),_=h}}Ee&&ge([ue||Ee[0],de||Ee[1]]),m.push(x.slice(0,T))}var me=y.slice(y.length-1);if(f&&me!=="h"&&me!=="v"){for(var he=!1,be=-1,Se=[],ze=0;ze{"use strict";var NE={tonextx:1,tonexty:1,tonext:1};zE.exports=function(r,t,n){var a,o,i,l,u,s={},f=!1,v=-1,g=0,b=-1;for(o=0;o=0?u=b:(u=b=g,g++),u{"use strict";var si=it(),Wee=Er(),_0=ir(),Mu=_0.ensureSingle,BE=_0.identity,zt=yt(),Tu=oa(),Xee=IE(),Zee=qE(),b1=gy().tester;UE.exports=function(r,t,n,a,o,i){var l,u,s=!o,f=!!o&&o.duration>0,v=Zee(r,t,n);if(l=a.selectAll("g.trace").data(v,function(b){return b[0].trace.uid}),l.enter().append("g").attr("class",function(b){return"trace scatter trace"+b[0].trace.uid}).style("stroke-miterlimit",2),l.order(),Jee(r,l,t),f){i&&(u=i());var g=si.transition().duration(o.duration).ease(o.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});g.each(function(){a.selectAll("g.trace").each(function(b,y){OE(r,y,t,b,v,this,o)})})}else l.each(function(b,y){OE(r,y,t,b,v,this,o)});s&&l.exit().remove(),a.selectAll("path:not([d])").remove()};function Jee(e,r,t){r.each(function(n){var a=Mu(si.select(this),"g","fills");zt.setClipUrl(a,t.layerClipId,e);var o=n[0].trace,i=[];o._ownfill&&i.push("_ownFill"),o._nexttrace&&i.push("_nextFill");var l=a.selectAll("g").data(i,BE);l.enter().append("g"),l.exit().each(function(u){o[u]=null}).remove(),l.order().each(function(u){o[u]=Mu(si.select(this),"path","js-fill")})})}function OE(e,r,t,n,a,o,i){var l=e._context.staticPlot,u;Kee(e,r,t,n,a);var s=!!i&&i.duration>0;function f(Ce){return s?Ce.transition():Ce}var v=t.xaxis,g=t.yaxis,b=n[0].trace,y=b.line,w=si.select(o),M=Mu(w,"g","errorbars"),m=Mu(w,"g","lines"),A=Mu(w,"g","points"),S=Mu(w,"g","text");if(Wee.getComponentMethod("errorbars","plot")(e,M,t,i),b.visible!==!0)return;f(w).style("opacity",b.opacity);var x,T,d=b.fill.charAt(b.fill.length-1);d!=="x"&&d!=="y"&&(d="");var _,p;d==="y"?(_=1,p=g.c2p(0,!0)):d==="x"&&(_=0,p=v.c2p(0,!0)),n[0][t.isRangePlot?"nodeRangePlot3":"node3"]=w;var c="",k=[],h=b._prevtrace,R=null,E=null;h&&(c=h._prevRevpath||"",T=h._nextFill,k=h._ownPolygons,R=h._fillsegments,E=h._fillElement);var D,N,I="",F="",L,P,O,U,X,j,$=[];b._polygons=[];var Y=[],q=[],Z=_0.noop;if(x=b._ownFill,Tu.hasLines(b)||b.fill!=="none"){T&&T.datum(n),["hv","vh","hvh","vhv"].indexOf(y.shape)!==-1?(L=zt.steps(y.shape),P=zt.steps(y.shape.split("").reverse().join(""))):y.shape==="spline"?L=P=function(Ce){var Oe=Ce[Ce.length-1];return Ce.length>1&&Ce[0][0]===Oe[0]&&Ce[0][1]===Oe[1]?zt.smoothclosed(Ce.slice(1),y.smoothing):zt.smoothopen(Ce,y.smoothing)}:L=P=function(Ce){return"M"+Ce.join("L")},O=function(Ce){return P(Ce.reverse())},q=Xee(n,{xaxis:v,yaxis:g,trace:b,connectGaps:b.connectgaps,baseTolerance:Math.max(y.width||1,3)/4,shape:y.shape,backoff:y.backoff,simplify:y.simplify,fill:b.fill}),Y=new Array(q.length);var ne=0;for(u=0;u=l[0]&&w.x<=l[1]&&w.y>=u[0]&&w.y<=u[1]}),g=Math.ceil(v.length/f),b=0;a.forEach(function(w,M){var m=w[0].trace;Tu.hasMarkers(m)&&m.marker.maxdisplayed>0&&M{"use strict";VE.exports={container:"marker",min:"cmin",max:"cmax"}});var WE=pe((Yhe,YE)=>{"use strict";var _1=St();YE.exports=function(r,t,n){var a={},o={_fullLayout:n},i=_1.getFromTrace(o,t,"x"),l=_1.getFromTrace(o,t,"y"),u=r.orig_x;u===void 0&&(u=r.x);var s=r.orig_y;return s===void 0&&(s=r.y),a.xLabel=_1.tickText(i,i.c2l(u),!0).text,a.yLabel=_1.tickText(l,l.c2l(s),!0).text,a}});var bm=pe((Whe,XE)=>{"use strict";var ym=it(),Au=yt(),Qee=Er();function $ee(e){var r=ym.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var n=ym.select(this),a=t.trace||t[0].trace;mm(n,a,e)}),r.selectAll("g.text").each(function(t){var n=ym.select(this),a=t.trace||t[0].trace;xm(n,a,e)}),r.selectAll("g.trace path.js-line").call(Au.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(Au.fillGroupStyle,e,!1),Qee.getComponentMethod("errorbars","style")(r)}function mm(e,r,t){Au.pointStyle(e.selectAll("path.point"),r,t)}function xm(e,r,t){Au.textPointStyle(e.selectAll("text"),r,t)}function jee(e,r,t){var n=r[0].trace;n.selectedpoints?(Au.selectedPointStyle(t.selectAll("path.point"),n),Au.selectedTextStyle(t.selectAll("text"),n)):(mm(t,n,e),xm(t,n,e))}XE.exports={style:$ee,stylePoints:mm,styleText:xm,styleOnSelect:jee}});var JE=pe((Xhe,ZE)=>{"use strict";var ku=Zr(),ere=oa();ZE.exports=function(r,t){var n,a;if(r.mode==="lines")return n=r.line.color,n&&ku.opacity(n)?n:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var o=t.mcc||(r.marker||{}).color,i=t.mlcc||((r.marker||{}).line||{}).color;return a=o&&ku.opacity(o)?o:i&&ku.opacity(i)&&(t.mlw||((r.marker||{}).line||{}).width)?i:"",a?ku.opacity(a)<.3?ku.addOpacity(a,.3):a:(n=(r.line||{}).color,n&&ku.opacity(n)&&ere.hasLines(r)&&r.line.width?n:r.fillcolor)}});var $E=pe((Zhe,QE)=>{"use strict";var w1=ir(),KE=io(),rre=Er(),tre=JE(),_m=Zr(),nre=w1.fillText;QE.exports=function(r,t,n,a){var o=r.cd,i=o[0].trace,l=r.xa,u=r.ya,s=l.c2p(t),f=u.c2p(n),v=[s,f],g=i.hoveron||"",b=i.mode.indexOf("markers")!==-1?3:.5,y=!!i.xperiodalignment,w=!!i.yperiodalignment;if(g.indexOf("points")!==-1){var M=function(F){if(y){var L=l.c2p(F.xStart),P=l.c2p(F.xEnd);return s>=Math.min(L,P)&&s<=Math.max(L,P)?0:1/0}var O=Math.max(3,F.mrc||0),U=1-1/O,X=Math.abs(l.c2p(F.x)-s);return X=Math.min(L,P)&&f<=Math.max(L,P)?0:1/0}var O=Math.max(3,F.mrc||0),U=1-1/O,X=Math.abs(u.c2p(F.y)-f);return X$!=G>=$&&(Q=Z[q-1][0],oe=Z[q][0],G-ee&&(ne=Q+(oe-Q)*($-ee)/(G-ee),O=Math.min(O,ne),U=Math.max(U,ne)));return O=Math.max(O,0),U=Math.min(U,l._length),{x0:O,x1:U,y0:$,y1:$}}if(g.indexOf("fills")!==-1&&i._fillElement){var D=R(i._fillElement)&&!R(i._fillExclusionElement);if(D){var N=E(i._polygons);N===null&&(N={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var I=_m.defaultLine;return _m.opacity(i.fillcolor)?I=i.fillcolor:_m.opacity((i.line||{}).color)&&(I=i.line.color),w1.extendFlat(r,{distance:r.maxHoverDistance,x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1,color:I,hovertemplate:!1}),delete r.index,i.text&&!w1.isArrayOrTypedArray(i.text)?r.text=String(i.text):r.text=i.name,[r]}}}});var rL=pe((Jhe,eL)=>{"use strict";var jE=oa();eL.exports=function(r,t){var n=r.cd,a=r.xaxis,o=r.yaxis,i=[],l=n[0].trace,u,s,f,v,g=!jE.hasMarkers(l)&&!jE.hasText(l);if(g)return[];if(t===!1)for(u=0;u{"use strict";tL.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var Mm=pe((Qhe,oL)=>{"use strict";var w0=Er().traceIs,wm=Wg();oL.exports=function(r,t,n,a){n("autotypenumbers",a.autotypenumbersDflt);var o=n("type",(a.splomStash||{}).type);o==="-"&&(are(t,a.data),t.type==="-"?t.type="linear":r.type=t.type)};function are(e,r){if(e.type==="-"){var t=e._id,n=t.charAt(0),a;t.indexOf("scene")!==-1&&(t=n);var o=ire(r,t,n);if(o){if(o.type==="histogram"&&n==={v:"y",h:"x"}[o.orientation||"v"]){e.type="linear";return}var i=n+"calendar",l=o[i],u={noMultiCategory:!w0(o,"cartesian")||w0(o,"noMultiCategory")};if(o.type==="box"&&o._hasPreCompStats&&n==={h:"x",v:"y"}[o.orientation||"v"]&&(u.noMultiCategory=!0),u.autotypenumbers=e.autotypenumbers,iL(o,n)){var s=aL(o),f=[];for(a=0;a0&&(a["_"+t+"axes"]||{})[r])return a;if((a[t+"axis"]||t)===r){if(iL(a,t))return a;if((a[t]||[]).length||a[t+"0"])return a}}}function aL(e){return{v:"x",h:"y"}[e.orientation||"v"]}function iL(e,r){var t=aL(e),n=w0(e,"box-violin"),a=w0(e._fullInput||{},"candlestick");return n&&!a&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var sL=pe(($he,lL)=>{"use strict";var ore=ea().isTypedArraySpec;function lre(e,r){var t=r.dataAttr||e._id.charAt(0),n={},a,o,i;if(r.axData)a=r.axData;else for(a=[],o=0;o0||ore(o),l;i&&(l="array");var u=n("categoryorder",l),s;u==="array"&&(s=n("categoryarray")),!i&&u==="array"&&(u=t.categoryorder="trace"),u==="trace"?t._initialCategories=[]:u==="array"?t._initialCategories=s.slice():(s=lre(t,a).sort(),u==="category ascending"?t._initialCategories=s:u==="category descending"&&(t._initialCategories=s.reverse()))}}});var cL=pe((jhe,fL)=>{"use strict";var uL=ka().mix,sre=Ti(),ure=ir();fL.exports=function(r,t,n,a){a=a||{};var o=a.dfltColor;function i(_,p){return ure.coerce2(r,t,a.attributes,_,p)}var l=i("linecolor",o),u=i("linewidth"),s=n("showline",a.showLine||!!l||!!u);s||(delete t.linecolor,delete t.linewidth);var f=uL(o,a.bgColor,a.blend||sre.lightFraction).toRgbString(),v=i("gridcolor",f),g=i("gridwidth"),b=i("griddash"),y=n("showgrid",a.showGrid||!!v||!!g||!!b);if(y||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),a.hasMinor){var w=uL(t.gridcolor,a.bgColor,67).toRgbString(),M=i("minor.gridcolor",w),m=i("minor.gridwidth",t.gridwidth||1),A=i("minor.griddash",t.griddash||"solid"),S=n("minor.showgrid",!!M||!!m||!!A);S||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!a.noZeroLine){var x=i("zerolinecolor",o),T=i("zerolinewidth"),d=n("zeroline",a.showGrid||!!x||!!T);d||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var T1=pe((e1e,yL)=>{"use strict";var vL=rt(),fre=Er(),M0=ir(),cre=gt(),vre=ei(),Tm=Ra(),hL=pg(),dL=yg(),hre=bg(),dre=_g(),pre=sL(),gre=cL(),yre=v2(),pL=Rv(),M1=wn().WEEKDAY_PATTERN,mre=wn().HOUR_PATTERN;yL.exports=function(r,t,n,a,o){var i=a.letter,l=a.font||{},u=a.splomStash||{},s=n("visible",!a.visibleDflt),f=t._template||{},v=t.type||f.type||"-",g;if(v==="date"){var b=fre.getComponentMethod("calendars","handleDefaults");b(r,t,"calendar",a.calendar),a.noTicklabelmode||(g=n("ticklabelmode"))}!a.noTicklabelindex&&(v==="date"||v==="linear")&&n("ticklabelindex");var y="";(!a.noTicklabelposition||v==="multicategory")&&(y=M0.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g==="period"?["outside","inside"]:i==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",y.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),pL(t,o),yre(r,t,n,a),pre(r,t,n,a),v!=="category"&&!a.noHover&&n("hoverformat");var w=n("color"),M=w!==Tm.color.dflt?w:l.color,m=u.label||o._dfltTitle[i];if(dre(r,t,n,v,a),!s)return t;n("title.text",m),M0.coerceFont(n,"title.font",l,{overrideDflt:{size:M0.bigFont(l.size),color:M}}),hL(r,t,n,v);var A=a.hasMinor;if(A&&(cre.newContainer(t,"minor"),hL(r,t,n,v,{isMinor:!0})),hre(r,t,n,v,a),dL(r,t,n,a),A){var S=a.isMinor;a.isMinor=!0,dL(r,t,n,a),a.isMinor=S}gre(r,t,n,{dfltColor:w,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:A,attributes:Tm}),A&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&n("mirror");var x=v==="multicategory";if(!a.noTickson&&(v==="category"||x)&&(t.ticks||t.showgrid)){var T;x&&(T="boundaries");var d=n("tickson",T);d==="boundaries"&&delete t.ticklabelposition}if(x){var _=n("showdividers");_&&(n("dividercolor"),n("dividerwidth"))}if(v==="date")if(vre(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:xre}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var p=0;p=2){var i="",l,u;if(o.length===2){for(l=0;l<2;l++)if(u=gL(o[l]),u){i=M1;break}}var s=n("pattern",i);if(s===M1)for(l=0;l<2;l++)u=gL(o[l]),u&&(r.bounds[l]=o[l]=u-1);if(s)for(l=0;l<2;l++)switch(u=o[l],s){case M1:if(!vL(u)){r.enabled=!1;return}if(u=+u,u!==Math.floor(u)||u<0||u>=7){r.enabled=!1;return}r.bounds[l]=o[l]=u;break;case mre:if(!vL(u)){r.enabled=!1;return}if(u=+u,u<0||u>24){r.enabled=!1;return}r.bounds[l]=o[l]=u;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(o[0]>f[0]&&o[1]{"use strict";var _re=rt(),A1=ir();mL.exports=function(r,t,n,a){var o=a.counterAxes||[],i=a.overlayableAxes||[],l=a.letter,u=a.grid,s=a.overlayingDomain,f,v,g,b,y,w;u&&(v=u._domains[l][u._axisMap[t._id]],f=u._anchors[t._id],v&&(g=u[l+"side"].split(" ")[0],b=u.domain[l][g==="right"||g==="top"?1:0])),v=v||[0,1],f=f||(_re(r.position)?"free":o[0]||"free"),g=g||(l==="x"?"bottom":"left"),b=b||0,y=0,w=!1;var M=A1.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(o),dflt:f}},"anchor"),m=A1.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:g}},"side");if(M==="free"){if(l==="y"){var A=n("autoshift");A&&(b=m==="left"?s[0]:s[1],w=t.automargin?t.automargin:!0,y=m==="left"?-3:3),n("shift",y)}n("position",b)}n("automargin",w);var S=!1;if(i.length&&(S=A1.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(i),dflt:!1}},"overlaying")),!S){var x=n("domain",v);x[0]>x[1]-1/4096&&(t.domain=v),A1.noneOrAll(r.domain,t.domain,v),t.tickmode==="sync"&&(t.tickmode="auto")}return n("layer"),t}});var SL=pe((t1e,kL)=>{"use strict";var ts=ir(),xL=Zr(),wre=to().isUnifiedHover,Mre=O2(),bL=gt(),Tre=Ds(),_L=Ra(),Are=Mm(),wL=T1(),kre=Vf(),ML=Am(),Sm=on(),Ui=Sm.id2name,TL=Sm.name2id,Sre=wn().AX_ID_PATTERN,AL=Er(),k1=AL.traceIs,km=AL.getComponentMethod;function S1(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}kL.exports=function(r,t,n){var a=t.autotypenumbers,o={},i={},l={},u={},s={},f={},v={},g={},b={},y={},w,M;for(w=0;w{"use strict";var Cre=it(),CL=Er(),C1=ir(),xa=yt(),E1=St();EL.exports=function(r,t,n,a){var o=r._fullLayout;if(t.length===0){E1.redrawComponents(r);return}function i(M){var m=M.xaxis,A=M.yaxis;o._defs.select("#"+M.clipId+"> rect").call(xa.setTranslate,0,0).call(xa.setScale,1,1),M.plot.call(xa.setTranslate,m._offset,A._offset).call(xa.setScale,1,1);var S=M.plot.selectAll(".scatterlayer .trace");S.selectAll(".point").call(xa.setPointGroupScale,1,1),S.selectAll(".textpoint").call(xa.setTextPointsScale,1,1),S.call(xa.hideOutsideRangePoints,M)}function l(M,m){var A=M.plotinfo,S=A.xaxis,x=A.yaxis,T=S._length,d=x._length,_=!!M.xr1,p=!!M.yr1,c=[];if(_){var k=C1.simpleMap(M.xr0,S.r2l),h=C1.simpleMap(M.xr1,S.r2l),R=k[1]-k[0],E=h[1]-h[0];c[0]=(k[0]*(1-m)+m*h[0]-k[0])/(k[1]-k[0])*T,c[2]=T*(1-m+m*E/R),S.range[0]=S.l2r(k[0]*(1-m)+m*h[0]),S.range[1]=S.l2r(k[1]*(1-m)+m*h[1])}else c[0]=0,c[2]=T;if(p){var D=C1.simpleMap(M.yr0,x.r2l),N=C1.simpleMap(M.yr1,x.r2l),I=D[1]-D[0],F=N[1]-N[0];c[1]=(D[1]*(1-m)+m*N[1]-D[1])/(D[0]-D[1])*d,c[3]=d*(1-m+m*F/I),x.range[0]=S.l2r(D[0]*(1-m)+m*N[0]),x.range[1]=x.l2r(D[1]*(1-m)+m*N[1])}else c[1]=0,c[3]=d;E1.drawOne(r,S,{skipTitle:!0}),E1.drawOne(r,x,{skipTitle:!0}),E1.redrawComponents(r,[S._id,x._id]);var L=_?T/c[2]:1,P=p?d/c[3]:1,O=_?c[0]:0,U=p?c[1]:0,X=_?c[0]/c[2]*T:0,j=p?c[1]/c[3]*d:0,$=S._offset-X,Y=x._offset-j;A.clipRect.call(xa.setTranslate,O,U).call(xa.setScale,1/L,1/P),A.plot.call(xa.setTranslate,$,Y).call(xa.setScale,L,P),xa.setPointGroupScale(A.zoomScalePts,1/L,1/P),xa.setTextPointsScale(A.zoomScaleTxt,1/L,1/P)}var u;a&&(u=a());function s(){for(var M={},m=0;mn.duration?(s(),b=window.cancelAnimationFrame(w)):b=window.requestAnimationFrame(w)}return v=Date.now(),b=window.requestAnimationFrame(w),Promise.resolve()}});var Cm=pe(Ln=>{"use strict";var R1=it(),RL=Er(),ns=ir(),Ere=ln(),Lre=yt(),DL=_f().getModuleCalcData,Qo=on(),ui=wn(),Rre=Io(),ut=ns.ensureSingle;function L1(e,r,t){return ns.ensureSingle(e,r,t,function(n){n.datum(t)})}var as=ui.zindexSeparator;Ln.name="cartesian";Ln.attr=["xaxis","yaxis"];Ln.idRoot=["x","y"];Ln.idRegex=ui.idRegex;Ln.attrRegex=ui.attrRegex;Ln.attributes=nL();Ln.layoutAttributes=Ra();Ln.supplyLayoutDefaults=SL();Ln.transitionAxes=LL();Ln.finalizeSubplots=function(e,r){var t=r._subplots,n=t.xaxis,a=t.yaxis,o=t.cartesian,i=o,l={},u={},s,f,v;for(s=0;s0){var b=g.id;if(b.indexOf(as)!==-1)continue;b+=as+(s+1),g=ns.extendFlat({},g,{id:b,plot:a._cartesianlayer.selectAll(".subplot").select("."+b)})}for(var y=[],w,M=0;M1&&(T+=as+x),S.push(l+T),i=0;i1,v=r.mainplotinfo;if(!r.mainplot||f)if(s)r.xlines=ut(n,"path","xlines-above"),r.ylines=ut(n,"path","ylines-above"),r.xaxislayer=ut(n,"g","xaxislayer-above"),r.yaxislayer=ut(n,"g","yaxislayer-above");else{if(!i){var g=ut(n,"g","layer-subplot");r.shapelayer=ut(g,"g","shapelayer"),r.imagelayer=ut(g,"g","imagelayer"),v&&f?(r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer):(r.minorGridlayer=ut(n,"g","minor-gridlayer"),r.gridlayer=ut(n,"g","gridlayer"),r.zerolinelayer=ut(n,"g","zerolinelayer"));var b=ut(n,"g","layer-between");r.shapelayerBetween=ut(b,"g","shapelayer"),r.imagelayerBetween=ut(b,"g","imagelayer"),ut(n,"path","xlines-below"),ut(n,"path","ylines-below"),r.overlinesBelow=ut(n,"g","overlines-below"),ut(n,"g","xaxislayer-below"),ut(n,"g","yaxislayer-below"),r.overaxesBelow=ut(n,"g","overaxes-below")}r.overplot=ut(n,"g","overplot"),r.plot=ut(r.overplot,"g",a),i||(r.xlines=ut(n,"path","xlines-above"),r.ylines=ut(n,"path","ylines-above"),r.overlinesAbove=ut(n,"g","overlines-above"),ut(n,"g","xaxislayer-above"),ut(n,"g","yaxislayer-above"),r.overaxesAbove=ut(n,"g","overaxes-above"),r.xlines=n.select(".xlines-"+l),r.ylines=n.select(".ylines-"+u),r.xaxislayer=n.select(".xaxislayer-"+l),r.yaxislayer=n.select(".yaxislayer-"+u))}else{var y=v.plotgroup,w=a+"-x",M=a+"-y";r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer,ut(v.overlinesBelow,"path",w),ut(v.overlinesBelow,"path",M),ut(v.overaxesBelow,"g",w),ut(v.overaxesBelow,"g",M),r.plot=ut(v.overplot,"g",a),ut(v.overlinesAbove,"path",w),ut(v.overlinesAbove,"path",M),ut(v.overaxesAbove,"g",w),ut(v.overaxesAbove,"g",M),r.xlines=y.select(".overlines-"+l).select("."+w),r.ylines=y.select(".overlines-"+u).select("."+M),r.xaxislayer=y.select(".overaxes-"+l).select("."+w),r.yaxislayer=y.select(".overaxes-"+u).select("."+M)}i||(s||(L1(r.minorGridlayer,"g",r.xaxis._id),L1(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(m){return m[0]}).sort(Qo.idSort),L1(r.gridlayer,"g",r.xaxis._id),L1(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(m){return m[0]}).sort(Qo.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function IL(e,r){if(e){var t={};e.each(function(u){var s=u[0],f=R1.select(this);f.remove(),NL(s,r),t[s]=!0});for(var n in r._plots)for(var a=r._plots[n],o=a.overlays||[],i=0;i{"use strict";var D1=oa();zL.exports={hasLines:D1.hasLines,hasMarkers:D1.hasMarkers,hasText:D1.hasText,isBubble:D1.isBubble,attributes:$l(),layoutAttributes:lv(),supplyDefaults:JC(),crossTraceDefaults:jC(),supplyLayoutDefaults:rE(),calc:fm().calc,crossTraceCalc:CE(),arraysToCalcdata:g1(),plot:HE(),colorbar:GE(),formatLabels:WE(),style:bm().style,styleOnSelect:bm().styleOnSelect,hoverPoints:$E(),selectPoints:rL(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Cm(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var UL=pe((o1e,BL)=>{"use strict";var Pre=it(),Fre=Zr(),OL=Cy(),Em=ir(),Ire=Em.strScale,Nre=Em.strRotate,zre=Em.strTranslate;BL.exports=function(r,t,n){var a=r.node(),o=OL[n.arrowhead||0],i=OL[n.startarrowhead||0],l=(n.arrowwidth||1)*(n.arrowsize||1),u=(n.arrowwidth||1)*(n.startarrowsize||1),s=t.indexOf("start")>=0,f=t.indexOf("end")>=0,v=o.backoff*l+n.standoff,g=i.backoff*u+n.startstandoff,b,y,w,M;if(a.nodeName==="line"){b={x:+r.attr("x1"),y:+r.attr("y1")},y={x:+r.attr("x2"),y:+r.attr("y2")};var m=b.x-y.x,A=b.y-y.y;if(w=Math.atan2(A,m),M=w+Math.PI,v&&g&&v+g>Math.sqrt(m*m+A*A)){D();return}if(v){if(v*v>m*m+A*A){D();return}var S=v*Math.cos(w),x=v*Math.sin(w);y.x+=S,y.y+=x,r.attr({x2:y.x,y2:y.y})}if(g){if(g*g>m*m+A*A){D();return}var T=g*Math.cos(w),d=g*Math.sin(w);b.x-=T,b.y-=d,r.attr({x1:b.x,y1:b.y})}}else if(a.nodeName==="path"){var _=a.getTotalLength(),p="";if(_{"use strict";var HL=it(),Lm=Er(),qre=ln(),jo=ir(),Rm=jo.strTranslate,A0=St(),is=Zr(),fo=yt(),VL=io(),Dm=Yn(),Pm=Vo(),T0=ti(),Ore=gt().arrayEditor,Bre=UL();WL.exports={draw:Ure,drawOne:GL,drawRaw:YL};function Ure(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?Ve="right":Ve="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ve]}for(var ee=!1,G=["x","y"],re=0;re1)&&(ue===te?(Le=de.r2fraction(r["a"+H]),(Le<0||Le>1)&&(ee=!0)):ee=!0),Oe=de._offset+de.r2p(r[H]),Te=.5}else{var me=ye==="domain";H==="x"?(ge=r[H],Oe=me?de._offset+de._length*ge:Oe=l.l+l.w*ge):(ge=1-r[H],Oe=me?de._offset+de._length*ge:Oe=l.t+l.h*ge),Te=r.showarrow?.5:ge}if(r.showarrow){Ce.head=Oe;var he=r["a"+H];if(ce=Me*oe(.5,r.xanchor)-ve*oe(.5,r.yanchor),ue===te){var be=A0.getRefType(ue);be==="domain"?(H==="y"&&(he=1-he),Ce.tail=de._offset+de._length*he):be==="paper"?H==="y"?(he=1-he,Ce.tail=l.t+l.h*he):Ce.tail=l.l+l.w*he:Ce.tail=de._offset+de.r2p(he),Ue=ce}else Ce.tail=Oe+he,Ue=ce+he;Ce.text=Ce.tail+ce;var Se=i[H==="x"?"width":"height"];if(te==="paper"&&(Ce.head=jo.constrain(Ce.head,1,Se-1)),ue==="pixel"){var ze=-Math.max(Ce.tail-3,Ce.text),Fe=Math.min(Ce.tail+3,Ce.text)-Se;ze>0?(Ce.tail+=ze,Ce.text+=ze):Fe>0&&(Ce.tail-=Fe,Ce.text-=Fe)}Ce.tail+=De,Ce.head+=De}else ce=Ae*oe(Te,ke),Ue=ce,Ce.text=Oe+ce;Ce.text+=De,ce+=De,Ue+=De,r["_"+H+"padplus"]=Ae/2+Ue,r["_"+H+"padminus"]=Ae/2-Ue,r["_"+H+"size"]=Ae,r["_"+H+"shift"]=ce}if(ee){_.remove();return}var Je=0,Ye=0;if(r.align!=="left"&&(Je=(q-$)*(r.align==="center"?.5:1)),r.valign!=="top"&&(Ye=(Z-Y)*(r.valign==="middle"?.5:1)),X)U.select("svg").attr({x:k+Je-1,y:k+Ye}).call(fo.setClipUrl,R?w:null,e);else{var Ge=k+Ye-j.top,We=k+Je-j.left;I.call(Dm.positionText,We,Ge).call(fo.setClipUrl,R?w:null,e)}E.select("rect").call(fo.setRect,k,k,q,Z),h.call(fo.setRect,p/2,p/2,ne-p,Q-p),_.call(fo.setTranslate,Math.round(M.x.text-ne/2),Math.round(M.y.text-Q/2)),S.attr({transform:"rotate("+m+","+M.x.text+","+M.y.text+")"});var we=function(Qe,Ve){A.selectAll(".annotation-arrow-g").remove();var ar=M.x.head,se=M.y.head,K=M.x.tail+Qe,ae=M.y.tail+Ve,Re=M.x.text+Qe,Be=M.y.text+Ve,je=jo.rotationXYMatrix(m,Re,Be),nr=jo.apply2DTransform(je),hr=jo.apply2DTransform2(je),wr=+h.attr("width"),Cr=+h.attr("height"),Tr=Re-.5*wr,Ar=Tr+wr,ft=Be-.5*Cr,Yr=ft+Cr,mr=[[Tr,ft,Tr,Yr],[Tr,Yr,Ar,Yr],[Ar,Yr,Ar,ft],[Ar,ft,Tr,ft]].map(hr);if(!mr.reduce(function(nt,Ft){return nt^!!jo.segmentsIntersect(ar,se,ar+1e6,se+1e6,Ft[0],Ft[1],Ft[2],Ft[3])},!1)){mr.forEach(function(nt){var Ft=jo.segmentsIntersect(K,ae,ar,se,nt[0],nt[1],nt[2],nt[3]);Ft&&(K=Ft.x,ae=Ft.y)});var ct=r.arrowwidth,Sr=r.arrowcolor,Ur=r.arrowside,bt=A.append("g").style({opacity:is.opacity(Sr)}).classed("annotation-arrow-g",!0),zr=bt.append("path").attr("d","M"+K+","+ae+"L"+ar+","+se).style("stroke-width",ct+"px").call(is.stroke,is.rgb(Sr));if(Bre(zr,Ur,r),u.annotationPosition&&zr.node().parentNode&&!n){var Hr=ar,Ot=se;if(r.standoff){var Lt=Math.sqrt(Math.pow(ar-K,2)+Math.pow(se-ae,2));Hr+=r.standoff*(K-ar)/Lt,Ot+=r.standoff*(ae-se)/Lt}var yn=bt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(K-Hr)+","+(ae-Ot),transform:Rm(Hr,Ot)}).style("stroke-width",ct+6+"px").call(is.stroke,"rgba(0,0,0,0)").call(is.fill,"rgba(0,0,0,0)"),Gt,Rt;T0.init({element:yn.node(),gd:e,prepFn:function(){var nt=fo.getTranslate(_);Gt=nt.x,Rt=nt.y,a&&a.autorange&&g(a._name+".autorange",!0),o&&o.autorange&&g(o._name+".autorange",!0)},moveFn:function(nt,Ft){var ha=nr(Gt,Rt),Qn=ha[0]+nt,Fn=ha[1]+Ft;_.call(fo.setTranslate,Qn,Fn),b("x",$o(a,nt,"x",l,r)),b("y",$o(o,Ft,"y",l,r)),r.axref===r.xref&&b("ax",$o(a,nt,"ax",l,r)),r.ayref===r.yref&&b("ay",$o(o,Ft,"ay",l,r)),bt.attr("transform",Rm(nt,Ft)),S.attr({transform:"rotate("+m+","+Qn+","+Fn+")"})},doneFn:function(){Lm.call("_guiRelayout",e,y());var nt=document.querySelector(".js-notes-box-panel");nt&&nt.redraw(nt.selectedObj)}})}}};if(r.showarrow&&we(0,0),x){var Pe;T0.init({element:_.node(),gd:e,prepFn:function(){Pe=S.attr("transform")},moveFn:function(Qe,Ve){var ar="pointer";if(r.showarrow)r.axref===r.xref?b("ax",$o(a,Qe,"ax",l,r)):b("ax",r.ax+Qe),r.ayref===r.yref?b("ay",$o(o,Ve,"ay",l.w,r)):b("ay",r.ay+Ve),we(Qe,Ve);else{if(n)return;var se,K;if(a)se=$o(a,Qe,"x",l,r);else{var ae=r._xsize/l.w,Re=r.x+(r._xshift-r.xshift)/l.w-ae/2;se=T0.align(Re+Qe/l.w,ae,0,1,r.xanchor)}if(o)K=$o(o,Ve,"y",l,r);else{var Be=r._ysize/l.h,je=r.y-(r._yshift+r.yshift)/l.h-Be/2;K=T0.align(je-Ve/l.h,Be,0,1,r.yanchor)}b("x",se),b("y",K),(!a||!o)&&(ar=T0.getCursor(a?.5:se,o?.5:K,r.xanchor,r.yanchor))}S.attr({transform:Rm(Qe,Ve)+Pe}),Pm(_,ar)},clickFn:function(Qe,Ve){r.captureevents&&e.emit("plotly_clickannotation",d(Ve))},doneFn:function(){Pm(_),Lm.call("_guiRelayout",e,y());var Qe=document.querySelector(".js-notes-box-panel");Qe&&Qe.redraw(Qe.selectedObj)}})}}u.annotationText?I.call(Dm.makeEditable,{delegate:_,gd:e}).call(F).on("edit",function(P){r.text=P,this.call(F),b("text",P),a&&a.autorange&&g(a._name+".autorange",!0),o&&o.autorange&&g(o._name+".autorange",!0),Lm.call("_guiRelayout",e,y())}):I.call(F)}});var $L=pe((s1e,QL)=>{"use strict";var XL=ir(),Hre=Er(),ZL=gt().arrayEditor;QL.exports={hasClickToShow:Vre,onClick:Gre};function Vre(e,r){var t=KL(e,r);return t.on.length>0||t.explicitOff.length>0}function Gre(e,r){var t=KL(e,r),n=t.on,a=t.off.concat(t.explicitOff),o={},i=e._fullLayout.annotations,l,u;if(n.length||a.length){for(l=0;l{"use strict";var Fm=ir(),Su=Zr();jL.exports=function(r,t,n,a){a("opacity");var o=a("bgcolor"),i=a("bordercolor"),l=Su.opacity(i);a("borderpad");var u=a("borderwidth"),s=a("showarrow");a("text",s?" ":n._dfltTitle.annotation),a("textangle"),Fm.coerceFont(a,"font",n.font),a("width"),a("align");var f=a("height");if(f&&a("valign"),s){var v=a("arrowside"),g,b;v.indexOf("end")!==-1&&(g=a("arrowhead"),b=a("arrowsize")),v.indexOf("start")!==-1&&(a("startarrowhead",g),a("startarrowsize",b)),a("arrowcolor",l?t.bordercolor:Su.defaultLine),a("arrowwidth",(l&&u||1)*2),a("standoff"),a("startstandoff")}var y=a("hovertext"),w=n.hoverlabel||{};if(y){var M=a("hoverlabel.bgcolor",w.bgcolor||(Su.opacity(o)?Su.rgb(o):Su.defaultLine)),m=a("hoverlabel.bordercolor",w.bordercolor||Su.contrast(M)),A=Fm.extendFlat({},w.font);A.color||(A.color=m),Fm.coerceFont(a,"hoverlabel.font",A)}a("captureevents",!!y)}});var rR=pe((f1e,eR)=>{"use strict";var Nm=ir(),os=St(),Yre=ei(),Wre=Im(),Xre=yu();eR.exports=function(r,t){Yre(r,t,{name:"annotations",handleItemDefaults:Zre})};function Zre(e,r,t){function n(S,x){return Nm.coerce(e,r,Xre,S,x)}var a=n("visible"),o=n("clicktoshow");if(a||o){Wre(e,r,t,n);for(var i=r.showarrow,l=["x","y"],u=[-10,-30],s={_fullLayout:t},f=0;f<2;f++){var v=l[f],g=os.coerceRef(e,r,s,v,"","paper");if(g!=="paper"){var b=os.getFromId(s,g);b._annIndices.push(r._index)}if(os.coercePosition(r,s,n,g,v,.5),i){var y="a"+v,w=os.coerceRef(e,r,s,y,"pixel",["pixel","paper"]);w!=="pixel"&&w!==g&&(w=r[y]="pixel");var M=w==="pixel"?u[f]:.4;os.coercePosition(r,s,n,w,y,M)}n(v+"anchor"),n(v+"shift")}if(Nm.noneOrAll(e,r,["x","y"]),i&&Nm.noneOrAll(e,r,["ax","ay"]),o){var m=n("xclick"),A=n("yclick");r._xclick=m===void 0?r.x:os.cleanPosition(m,s,r.xref),r._yclick=A===void 0?r.y:os.cleanPosition(A,s,r.yref)}}}});var aR=pe((c1e,nR)=>{"use strict";var zm=ir(),ls=St(),Jre=P1().draw;nR.exports=function(r){var t=r._fullLayout,n=zm.filterVisible(t.annotations);if(n.length&&r._fullData.length)return zm.syncOrAsync([Jre,Kre],r)};function Kre(e){var r=e._fullLayout;zm.filterVisible(r.annotations).forEach(function(t){var n=ls.getFromId(e,t.xref),a=ls.getFromId(e,t.yref),o=ls.getRefType(t.xref),i=ls.getRefType(t.yref);t._extremes={},o==="range"&&tR(t,n),i==="range"&&tR(t,a)})}function tR(e,r){var t=r._id,n=t.charAt(0),a=e[n],o=e["a"+n],i=e[n+"ref"],l=e["a"+n+"ref"],u=e["_"+n+"padplus"],s=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],v=3*e.arrowsize*e.arrowwidth||0,g=v+f,b=v-f,y=3*e.startarrowsize*e.arrowwidth||0,w=y+f,M=y-f,m;if(l===i){var A=ls.findExtremes(r,[r.r2c(a)],{ppadplus:g,ppadminus:b}),S=ls.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(u,w),ppadminus:Math.max(s,M)});m={min:[A.min[0],S.min[0]],max:[A.max[0],S.max[0]]}}else w=o?w+o:w,M=o?M-o:M,m=ls.findExtremes(r,[r.r2c(a)],{ppadplus:Math.max(u,g,w),ppadminus:Math.max(s,b,M)});e._extremes[t]=m}});var oR=pe((v1e,iR)=>{"use strict";var Qre=rt(),$re=Ac();iR.exports=function(r,t,n,a){t=t||{};var o=n==="log"&&t.type==="linear",i=n==="linear"&&t.type==="log";if(!(o||i))return;var l=r._fullLayout.annotations,u=t._id.charAt(0),s,f;function v(b){var y=s[b],w=null;o?w=$re(y,t.range):w=Math.pow(10,y),Qre(w)||(w=null),a(f+b,w)}for(var g=0;g{"use strict";var qm=P1(),lR=$L();sR.exports={moduleType:"component",name:"annotations",layoutAttributes:yu(),supplyLayoutDefaults:rR(),includeBasePlot:o0()("annotations"),calcAutorange:aR(),draw:qm.draw,drawOne:qm.drawOne,drawRaw:qm.drawRaw,hasClickToShow:lR.hasClickToShow,onClick:lR.onClick,convertCoords:oR()}});var F1=pe((d1e,fR)=>{"use strict";var wt=yu(),jre=zn().overrideAll,ete=gt().templatedArray;fR.exports=jre(ete("annotation",{visible:wt.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:wt.xanchor,xshift:wt.xshift,yanchor:wt.yanchor,yshift:wt.yshift,text:wt.text,textangle:wt.textangle,font:wt.font,width:wt.width,height:wt.height,opacity:wt.opacity,align:wt.align,valign:wt.valign,bgcolor:wt.bgcolor,bordercolor:wt.bordercolor,borderpad:wt.borderpad,borderwidth:wt.borderwidth,showarrow:wt.showarrow,arrowcolor:wt.arrowcolor,arrowhead:wt.arrowhead,startarrowhead:wt.startarrowhead,arrowside:wt.arrowside,arrowsize:wt.arrowsize,startarrowsize:wt.startarrowsize,arrowwidth:wt.arrowwidth,standoff:wt.standoff,startstandoff:wt.startstandoff,hovertext:wt.hovertext,hoverlabel:wt.hoverlabel,captureevents:wt.captureevents}),"calc","from-root")});var vR=pe((p1e,cR)=>{"use strict";var Om=ir(),rte=St(),tte=ei(),nte=Im(),ate=F1();cR.exports=function(r,t,n){tte(r,t,{name:"annotations",handleItemDefaults:ite,fullLayout:n.fullLayout})};function ite(e,r,t,n){function a(l,u){return Om.coerce(e,r,ate,l,u)}function o(l){var u=l+"axis",s={_fullLayout:{}};return s._fullLayout[u]=t[u],rte.coercePosition(r,s,a,l,l,.5)}var i=a("visible");i&&(nte(e,r,n.fullLayout,a),o("x"),o("y"),o("z"),Om.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",a("ax",-10),a("ay",-30),Om.noneOrAll(e,r,["ax","ay"])))}});var gR=pe((g1e,pR)=>{"use strict";var hR=ir(),dR=St();pR.exports=function(r){for(var t=r.fullSceneLayout,n=t.annotations,a=0;a{"use strict";function Bm(e,r){var t=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)t[a]+=e[4*n+a]*r[n];return t}function lte(e,r){var t=Bm(e.projection,Bm(e.view,Bm(e.model,[r[0],r[1],r[2],1])));return t}yR.exports=lte});var xR=pe((m1e,mR)=>{"use strict";var ste=P1().drawRaw,ute=Um(),fte=["x","y","z"];mR.exports=function(r){for(var t=r.fullSceneLayout,n=r.dataScale,a=t.annotations,o=0;o1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+o+'"]').remove():(i._pdata=ute(r.glplot.cameraParams,[t.xaxis.r2l(i.x)*n[0],t.yaxis.r2l(i.y)*n[1],t.zaxis.r2l(i.z)*n[2]]),ste(r.graphDiv,i,o,r.id,i._xa,i._ya))}}});var wR=pe((x1e,_R)=>{"use strict";var cte=Er(),bR=ir();_R.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:F1()}}},layoutAttributes:F1(),handleDefaults:vR(),includeBasePlot:vte,convert:gR(),draw:xR()};function vte(e,r){var t=cte.subplotsRegistry.gl3d;if(t)for(var n=t.attrRegex,a=Object.keys(e),o=0;o{"use strict";var MR=yu(),TR=kn(),AR=$l().line,hte=Ao().dash,fi=Mt().extendFlat,dte=gt().templatedArray,b1e=i0(),Cu=Sn(),pte=Sa().shapeTexttemplateAttrs,gte=Oc();kR.exports=dte("shape",{visible:fi({},Cu.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:fi({},Cu.legend,{editType:"calc+arraydraw"}),legendgroup:fi({},Cu.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:fi({},Cu.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:TR({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:fi({},Cu.legendrank,{editType:"calc+arraydraw"}),legendwidth:fi({},Cu.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:fi({},MR.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:fi({},MR.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:fi({},AR.color,{editType:"arraydraw"}),width:fi({},AR.width,{editType:"calc+arraydraw"}),dash:fi({},hte,{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:pte({},{keys:Object.keys(gte)}),font:TR({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 ER=pe((w1e,CR)=>{"use strict";var k0=ir(),Eu=St(),yte=ei(),mte=Hm(),SR=Wo();CR.exports=function(r,t){yte(r,t,{name:"shapes",handleItemDefaults:bte})};function xte(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function bte(e,r,t){function n(P,O){return k0.coerce(e,r,mte,P,O)}r._isShape=!0;var a=n("visible");if(a){var o=n("showlegend");o&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),k0.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var i=n("path"),l=i?"path":"rect",u=n("type",l),s=u!=="path";s&&delete r.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var v=n("xsizemode"),g=n("ysizemode"),b=["x","y"],y=0;y<2;y++){var w=b[y],M=w+"anchor",m=w==="x"?v:g,A={_fullLayout:t},S,x,T,d=Eu.coerceRef(e,r,A,w,void 0,"paper"),_=Eu.getRefType(d);if(_==="range"?(S=Eu.getFromId(A,d),S._shapeIndices.push(r._index),T=SR.rangeToShapePosition(S),x=SR.shapePositionToRange(S),(S.type==="category"||S.type==="multicategory")&&(n(w+"0shift"),n(w+"1shift"))):x=T=k0.identity,s){var p=.25,c=.75,k=w+"0",h=w+"1",R=e[k],E=e[h];e[k]=x(e[k],!0),e[h]=x(e[h],!0),m==="pixel"?(n(k,0),n(h,10)):(Eu.coercePosition(r,A,n,d,k,p),Eu.coercePosition(r,A,n,d,h,c)),r[k]=T(r[k]),r[h]=T(r[h]),e[k]=R,e[h]=E}if(m==="pixel"){var D=e[M];e[M]=x(e[M],!0),Eu.coercePosition(r,A,n,d,M,.25),r[M]=T(r[M]),e[M]=D}}s&&k0.noneOrAll(e,r,["x0","x1","y0","y1"]);var N=u==="line",I,F;if(s&&(I=n("label.texttemplate")),I||(F=n("label.text")),F||I){n("label.textangle");var L=n("label.textposition",N?"middle":"middle center");n("label.xanchor"),n("label.yanchor",xte(N,L)),n("label.padding"),k0.coerceFont(n,"label.font",t.font)}}}});var DR=pe((M1e,RR)=>{"use strict";var _te=Zr(),LR=ir();function wte(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}RR.exports=function(r,t,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),LR.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var o=(r||{}).plot_bgcolor||"#FFF";n("newshape.line.color",_te.contrast(o)),n("newshape.line.dash")}var i=r.dragmode==="drawline",l=n("newshape.label.text"),u=n("newshape.label.texttemplate");if(l||u){n("newshape.label.textangle");var s=n("newshape.label.textposition",i?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",wte(i,s)),n("newshape.label.padding"),LR.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var zR=pe((T1e,NR)=>{"use strict";var Vm=ir(),Lu=St(),Ru=Of(),FR=Wo();NR.exports=function(r){var t=r._fullLayout,n=Vm.filterVisible(t.shapes);if(!(!n.length||!r._fullData.length))for(var a=0;a0?s+i:i;return{ppad:i,ppadplus:l?v:g,ppadminus:l?g:v}}else return{ppad:i}}function PR(e,r,t){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",o,i,l=0,u=0,s=a?e.r2c:e.d2c,f=r[n+"sizemode"]==="scaled";if(f?(o=r[n+"0"],i=r[n+"1"],a&&(l=r[n+"0shift"],u=r[n+"1shift"])):(o=r[n+"anchor"],i=r[n+"anchor"]),o!==void 0)return[s(o)+l,s(i)+u];if(r.path){var v=1/0,g=-1/0,b=r.path.match(Ru.segmentRE),y,w,M,m,A;for(e.type==="date"&&(s=FR.decodeDate(s)),y=0;yg&&(g=A)));if(g>=v)return[v,g]}}});var BR=pe((A1e,OR)=>{"use strict";var qR=Th();OR.exports={moduleType:"component",name:"shapes",layoutAttributes:Hm(),supplyLayoutDefaults:ER(),supplyDrawNewShapeDefaults:DR(),includeBasePlot:o0()("shapes"),calcAutorange:zR(),draw:qR.draw,drawOne:qR.drawOne}});var Gm=pe((S1e,HR)=>{"use strict";var UR=wn(),Ate=gt().templatedArray,k1e=i0();HR.exports=Ate("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",UR.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",UR.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var GR=pe((C1e,VR)=>{"use strict";var kte=ir(),Ym=St(),Ste=ei(),Cte=Gm(),Ete="images";VR.exports=function(r,t){var n={name:Ete,handleItemDefaults:Lte};Ste(r,t,n)};function Lte(e,r,t){function n(g,b){return kte.coerce(e,r,Cte,g,b)}var a=n("source"),o=n("visible",!!a);if(!o)return r;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var i={_fullLayout:t},l=["x","y"],u=0;u<2;u++){var s=l[u],f=Ym.coerceRef(e,r,i,s,"paper",void 0);if(f!=="paper"){var v=Ym.getFromId(i,f);v._imgIndices.push(r._index)}Ym.coercePosition(r,i,n,f,s,0)}return r}});var ZR=pe((E1e,XR)=>{"use strict";var YR=it(),Rte=yt(),Du=St(),WR=on(),Dte=Io();XR.exports=function(r){var t=r._fullLayout,n=[],a={},o=[],i,l;for(l=0;l{"use strict";var JR=rt(),Pte=Ac();KR.exports=function(r,t,n,a){t=t||{};var o=n==="log"&&t.type==="linear",i=n==="linear"&&t.type==="log";if(o||i){for(var l=r._fullLayout.images,u=t._id.charAt(0),s,f,v=0;v{"use strict";$R.exports={moduleType:"component",name:"images",layoutAttributes:Gm(),supplyLayoutDefaults:GR(),includeBasePlot:o0()("images"),draw:ZR(),convertCoords:QR()}});var I1=pe((D1e,eD)=>{"use strict";eD.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 Wm=pe((P1e,tD)=>{"use strict";var Fte=kn(),Ite=Ti(),Nte=Mt().extendFlat,zte=zn().overrideAll,qte=Bc(),rD=gt().templatedArray,Ote=rD("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}});tD.exports=zte(rD("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:Ote,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:Nte(qte({editType:"arraydraw"}),{}),font:Fte({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Ite.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var oD=pe((F1e,iD)=>{"use strict";var N1=ir(),nD=ei(),aD=Wm(),Bte=I1(),Ute=Bte.name,Hte=aD.buttons;iD.exports=function(r,t){var n={name:Ute,handleItemDefaults:Vte};nD(r,t,n)};function Vte(e,r,t){function n(i,l){return N1.coerce(e,r,aD,i,l)}var a=nD(e,r,{name:"buttons",handleItemDefaults:Gte}),o=n("visible",a.length>0);o&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),N1.noneOrAll(e,r,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),N1.coerceFont(n,"font",t.font),n("bgcolor",t.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Gte(e,r){function t(a,o){return N1.coerce(e,r,Hte,a,o)}var n=t("visible",e.method==="skip"||Array.isArray(e.args));n&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var uD=pe((I1e,sD)=>{"use strict";sD.exports=Dt;var ci=it(),lD=Zr(),Pu=yt(),z1=ir();function Dt(e,r,t){this.gd=e,this.container=r,this.id=t,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})}Dt.barWidth=2;Dt.barLength=20;Dt.barRadius=2;Dt.barPad=1;Dt.barColor="#808BA4";Dt.prototype.enable=function(r,t,n){var a=this.gd._fullLayout,o=a.width,i=a.height;this.position=r;var l=this.position.l,u=this.position.w,s=this.position.t,f=this.position.h,v=this.position.direction,g=v==="down",b=v==="left",y=v==="right",w=v==="up",M=u,m=f,A,S,x,T;!g&&!b&&!y&&!w&&(this.position.direction="down",g=!0);var d=g||w;d?(A=l,S=A+M,g?(x=s,T=Math.min(x+m,i),m=T-x):(T=s+m,x=Math.max(T-m,0),m=T-x)):(x=s,T=x+m,b?(S=l+M,A=Math.max(S-M,0),M=S-A):(A=l,S=Math.min(A+M,o),M=S-A)),this._box={l:A,t:x,w:M,h:m};var _=u>M,p=Dt.barLength+2*Dt.barPad,c=Dt.barWidth+2*Dt.barPad,k=l,h=s+f;h+c>i&&(h=i-c);var R=this.container.selectAll("rect.scrollbar-horizontal").data(_?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(lD.fill,Dt.barColor),_?(this.hbar=R.attr({rx:Dt.barRadius,ry:Dt.barRadius,x:k,y:h,width:p,height:c}),this._hbarXMin=k+p/2,this._hbarTranslateMax=M-p):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=f>m,D=Dt.barWidth+2*Dt.barPad,N=Dt.barLength+2*Dt.barPad,I=l+u,F=s;I+D>o&&(I=o-D);var L=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(lD.fill,Dt.barColor),E?(this.vbar=L.attr({rx:Dt.barRadius,ry:Dt.barRadius,x:I,y:F,width:D,height:N}),this._vbarYMin=F+N/2,this._vbarTranslateMax=m-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var P=this.id,O=A-.5,U=E?S+D+.5:S+.5,X=x-.5,j=_?T+c+.5:T+.5,$=a._topdefs.selectAll("#"+P).data(_||E?[0]:[]);if($.exit().remove(),$.enter().append("clipPath").attr("id",P).append("rect"),_||E?(this._clipRect=$.select("rect").attr({x:Math.floor(O),y:Math.floor(X),width:Math.ceil(U)-Math.floor(O),height:Math.ceil(j)-Math.floor(X)}),this.container.call(Pu.setClipUrl,P,this.gd),this.bg.attr({x:l,y:s,width:u,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Pu.setClipUrl,null),delete this._clipRect),_||E){var Y=ci.behavior.drag().on("dragstart",function(){ci.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=ci.behavior.drag().on("dragstart",function(){ci.event.sourceEvent.preventDefault(),ci.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));_&&this.hbar.on(".drag",null).call(q),E&&this.vbar.on(".drag",null).call(q)}this.setTranslate(t,n)};Dt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Pu.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)};Dt.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=ci.event.dx),this.vbar&&(t-=ci.event.dy),this.setTranslate(r,t)};Dt.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=ci.event.deltaY),this.vbar&&(t+=ci.event.deltaY),this.setTranslate(r,t)};Dt.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var n=r+this._hbarXMin,a=n+this._hbarTranslateMax,o=z1.constrain(ci.event.x,n,a),i=(o-n)/(a-n),l=this.position.w-this._box.w;r=i*l}if(this.vbar){var u=t+this._vbarYMin,s=u+this._vbarTranslateMax,f=z1.constrain(ci.event.y,u,s),v=(f-u)/(s-u),g=this.position.h-this._box.h;t=v*g}this.setTranslate(r,t)};Dt.prototype.setTranslate=function(r,t){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(r=z1.constrain(r||0,0,n),t=z1.constrain(t||0,0,a),this.translateX=r,this.translateY=t,this.container.call(Pu.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=r/n;this.hbar.call(Pu.setTranslate,r+o*this._hbarTranslateMax,t)}if(this.vbar){var i=t/a;this.vbar.call(Pu.setTranslate,r,t+i*this._vbarTranslateMax)}}});var xD=pe((N1e,mD)=>{"use strict";var Fu=it(),S0=ln(),C0=Zr(),Iu=yt(),ba=ir(),q1=Yn(),Yte=gt().arrayEditor,cD=qn().LINE_SPACING,Dr=I1(),Wte=uD();mD.exports=function(r){var t=r._fullLayout,n=ba.filterVisible(t[Dr.name]);function a(g){S0.autoMargin(r,gD(g))}var o=t._menulayer.selectAll("g."+Dr.containerClassName).data(n.length>0?[0]:[]);if(o.enter().append("g").classed(Dr.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){Fu.select(this).selectAll("g."+Dr.headerGroupClassName).each(a)}).remove(),n.length!==0){var i=o.selectAll("g."+Dr.headerGroupClassName).data(n,Xte);i.enter().append("g").classed(Dr.headerGroupClassName,!0);for(var l=ba.ensureSingle(o,"g",Dr.dropdownButtonGroupClassName,function(g){g.style("pointer-events","all")}),u=0;u{"use strict";var ene=I1();bD.exports={moduleType:"component",name:ene.name,layoutAttributes:Wm(),supplyLayoutDefaults:oD(),draw:xD()}});var L0=pe((q1e,wD)=>{"use strict";wD.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 Km=pe((O1e,AD)=>{"use strict";var MD=kn(),rne=Bc(),tne=Mt().extendDeepAll,nne=zn().overrideAll,ane=cf(),TD=gt().templatedArray,ss=L0(),ine=TD("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}});AD.exports=nne(TD("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:ine,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:tne(rne({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:ane.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:MD({})},font:MD({}),activebgcolor:{valType:"color",dflt:ss.gripBgActiveColor},bgcolor:{valType:"color",dflt:ss.railBgColor},bordercolor:{valType:"color",dflt:ss.railBorderColor},borderwidth:{valType:"number",min:0,dflt:ss.railBorderWidth},ticklen:{valType:"number",min:0,dflt:ss.tickLength},tickcolor:{valType:"color",dflt:ss.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:ss.minorTickLength}}),"arraydraw","from-root")});var ED=pe((B1e,CD)=>{"use strict";var Nu=ir(),kD=ei(),SD=Km(),one=L0(),lne=one.name,sne=SD.steps;CD.exports=function(r,t){kD(r,t,{name:lne,handleItemDefaults:une})};function une(e,r,t){function n(v,g){return Nu.coerce(e,r,SD,v,g)}for(var a=kD(e,r,{name:"steps",handleItemDefaults:fne}),o=0,i=0;i{"use strict";var vi=it(),O1=ln(),el=Zr(),hi=yt(),_a=ir(),cne=_a.strTranslate,R0=Yn(),vne=gt().arrayEditor,Gr=L0(),jm=qn(),DD=jm.LINE_SPACING,Qm=jm.FROM_TL,$m=jm.FROM_BR;qD.exports=function(r){var t=r._context.staticPlot,n=r._fullLayout,a=hne(n,r),o=n._infolayer.selectAll("g."+Gr.containerClassName).data(a.length>0?[0]:[]);o.enter().append("g").classed(Gr.containerClassName,!0).style("cursor",t?null:"ew-resize");function i(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),O1.autoMargin(r,PD(f))}if(o.exit().each(function(){vi.select(this).selectAll("g."+Gr.groupClassName).each(i)}).remove(),a.length!==0){var l=o.selectAll("g."+Gr.groupClassName).data(a,dne);l.enter().append("g").classed(Gr.groupClassName,!0),l.exit().each(i).remove();for(var u=0;u0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",cne(i-Gr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function e3(e,r){var t=e._dims;return t.inputAreaStart+Gr.stepInset+(t.inputAreaLength-2*Gr.stepInset)*Math.min(1,Math.max(0,r))}function RD(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Gr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Gr.stepInset-2*t.inputAreaStart)))}function _ne(e,r,t){var n=t._dims,a=_a.ensureSingle(e,"rect",Gr.railTouchRectClass,function(o){o.call(ND,r,e,t).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Gr.tickOffset+t.ticklen+n.labelHeight)}).call(el.fill,t.bgcolor).attr("opacity",0),hi.setTranslate(a,0,n.currentValueTotalHeight)}function wne(e,r){var t=r._dims,n=t.inputAreaLength-Gr.railInset*2,a=_a.ensureSingle(e,"rect",Gr.railRectClass);a.attr({width:n,height:Gr.railWidth,rx:Gr.railRadius,ry:Gr.railRadius,"shape-rendering":"crispEdges"}).call(el.stroke,r.bordercolor).call(el.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),hi.setTranslate(a,Gr.railInset,(t.inputAreaWidth-Gr.railWidth)*.5+t.currentValueTotalHeight)}});var UD=pe((H1e,BD)=>{"use strict";var Mne=L0();BD.exports={moduleType:"component",name:Mne.name,layoutAttributes:Km(),supplyLayoutDefaults:ED(),draw:OD()}});var U1=pe((V1e,VD)=>{"use strict";var HD=Ti();VD.exports={bgcolor:{valType:"color",dflt:HD.background,editType:"plot"},bordercolor:{valType:"color",dflt:HD.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 r3=pe((G1e,GD)=>{"use strict";GD.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 H1=pe((Y1e,YD)=>{"use strict";YD.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 ZD=pe(G1=>{"use strict";var Tne=on(),Ane=Yn(),WD=H1(),kne=qn().LINE_SPACING,V1=WD.name;function XD(e){var r=e&&e[V1];return r&&r.visible}G1.isVisible=XD;G1.makeData=function(e){for(var r=Tne.list({_fullLayout:e},"x",!0),t=e.margin,n=[],a=0;a{"use strict";var Y1=ir(),JD=gt(),KD=on(),Sne=U1(),Cne=r3();QD.exports=function(r,t,n){var a=r[n],o=t[n];if(!(a.rangeslider||t._requestRangeslider[o._id]))return;Y1.isPlainObject(a.rangeslider)||(a.rangeslider={});var i=a.rangeslider,l=JD.newContainer(o,"rangeslider");function u(T,d){return Y1.coerce(i,l,Sne,T,d)}var s,f;function v(T,d){return Y1.coerce(s,f,Cne,T,d)}var g=u("visible");if(g){u("bgcolor",t.plot_bgcolor),u("bordercolor"),u("borderwidth"),u("thickness"),u("autorange",!o.isValidRange(i.range)),u("range");var b=t._subplots;if(b)for(var y=b.cartesian.filter(function(T){return T.substr(0,T.indexOf("y"))===KD.name2id(n)}).map(function(T){return T.substr(T.indexOf("y"),T.length)}),w=Y1.simpleMap(y,KD.id2name),M=0;M{"use strict";var Ene=on().list,Lne=$s().getAutoRange,Rne=H1();jD.exports=function(r){for(var t=Ene(r,"x",!0),n=0;n{"use strict";var W1=it(),Dne=Er(),Pne=ln(),qt=ir(),X1=qt.strTranslate,tP=yt(),rl=Zr(),Fne=Sf(),Ine=Cm(),t3=on(),Nne=ti(),zne=Vo(),Qr=H1();nP.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,n=0;n=L.max)I=h[F+1];else if(N=L.pmax)I=h[F+1];else if(N0?e.touches[0].clientX:0}function qne(e,r,t,n){if(r._context.staticPlot)return;var a=e.select("rect."+Qr.slideBoxClassName).node(),o=e.select("rect."+Qr.grabAreaMinClassName).node(),i=e.select("rect."+Qr.grabAreaMaxClassName).node();function l(){var u=W1.event,s=u.target,f=rP(u),v=f-e.node().getBoundingClientRect().left,g=n.d2p(t._rl[0]),b=n.d2p(t._rl[1]),y=Nne.coverSlip();this.addEventListener("touchmove",w),this.addEventListener("touchend",M),y.addEventListener("mousemove",w),y.addEventListener("mouseup",M);function w(m){var A=rP(m),S=+A-f,x,T,d;switch(s){case a:if(d="ew-resize",g+S>t._length||b+S<0)return;x=g+S,T=b+S;break;case o:if(d="col-resize",g+S>t._length)return;x=g+S,T=b;break;case i:if(d="col-resize",b+S<0)return;x=g,T=b+S;break;default:d="ew-resize",x=v,T=v+S;break}if(T{"use strict";var Zne=ir(),Jne=U1(),Kne=r3(),n3=ZD();iP.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Zne.extendFlat({},Jne,{yaxis:Kne})}}},layoutAttributes:U1(),handleDefaults:$D(),calcAutorange:eP(),draw:aP(),isVisible:n3.isVisible,makeData:n3.makeData,autoMarginOpts:n3.autoMarginOpts}});var Z1=pe((Q1e,sP)=>{"use strict";var Qne=kn(),lP=Ti(),$ne=gt().templatedArray,jne=$ne("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"});sP.exports={visible:{valType:"boolean",editType:"plot"},buttons:jne,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:Qne({editType:"plot"}),bgcolor:{valType:"color",dflt:lP.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:lP.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var a3=pe(($1e,uP)=>{"use strict";uP.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var vP=pe((j1e,cP)=>{"use strict";var J1=ir(),eae=Zr(),rae=gt(),tae=ei(),fP=Z1(),i3=a3();cP.exports=function(r,t,n,a,o){var i=r.rangeselector||{},l=rae.newContainer(t,"rangeselector");function u(b,y){return J1.coerce(i,l,fP,b,y)}var s=tae(i,l,{name:"buttons",handleItemDefaults:nae,calendar:o}),f=u("visible",s.length>0);if(f){var v=aae(t,n,a);u("x",v[0]),u("y",v[1]),J1.noneOrAll(r,t,["x","y"]),u("xanchor"),u("yanchor"),J1.coerceFont(u,"font",n.font);var g=u("bgcolor");u("activecolor",eae.contrast(g,i3.lightAmount,i3.darkAmount)),u("bordercolor"),u("borderwidth")}};function nae(e,r,t,n){var a=n.calendar;function o(u,s){return J1.coerce(e,r,fP.buttons,u,s)}var i=o("visible");if(i){var l=o("step");l!=="all"&&(a&&a!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":o("stepmode"),o("count")),o("label")}}function aae(e,r,t){for(var n=t.filter(function(l){return r[l].anchor===e._id}),a=0,o=0;o{"use strict";var iae=ip(),oae=ir().titleCase;hP.exports=function(r,t){var n=r._name,a={};if(t.step==="all")a[n+".autorange"]=!0;else{var o=lae(r,t);a[n+".range[0]"]=o[0],a[n+".range[1]"]=o[1]}return a};function lae(e,r){var t=e.range,n=new Date(e.r2l(t[1])),a=r.step,o=iae["utc"+oae(a)],i=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+o.offset(n,-i));break;case"todate":var u=o.offset(n,-i);l=e.l2r(+o.ceil(u));break}var s=t[1];return[l,s]}});var wP=pe((rde,_P)=>{"use strict";var Q1=it(),sae=Er(),uae=ln(),pP=Zr(),bP=yt(),co=ir(),gP=co.strTranslate,K1=Yn(),fae=on(),s3=qn(),yP=s3.LINE_SPACING,mP=s3.FROM_TL,xP=s3.FROM_BR,l3=a3(),cae=dP();_P.exports=function(r){var t=r._fullLayout,n=t._infolayer.selectAll(".rangeselector").data(vae(r),hae);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var o=Q1.select(this),i=a,l=i.rangeselector,u=o.selectAll("g.button").data(co.filterVisible(l.buttons));u.enter().append("g").classed("button",!0),u.exit().remove(),u.each(function(s){var f=Q1.select(this),v=cae(i,s);s._isActive=dae(i,s,v),f.call(o3,l,s),f.call(gae,l,s,r),f.on("click",function(){r._dragged||sae.call("_guiRelayout",r,v)}),f.on("mouseover",function(){s._isHovered=!0,f.call(o3,l,s)}),f.on("mouseout",function(){s._isHovered=!1,f.call(o3,l,s)})}),mae(r,u,l,i._name,o)})};function vae(e){for(var r=fae.list(e,"x",!0),t=[],n=0;n{"use strict";MP.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Z1()}}},layoutAttributes:Z1(),handleDefaults:vP(),draw:wP()}});var $1=pe(u3=>{"use strict";var AP=Mt().extendFlat;u3.attributes=function(e,r){e=e||{},r=r||{};var t={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+" ":"",a=e.trace?"trace ":"subplot ",o=r.description?" "+r.description:"",i={x:AP({},t,{}),y:AP({},t,{}),editType:e.editType};return e.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:e.editType},i.column={valType:"integer",min:0,dflt:0,editType:e.editType}),i};u3.defaults=function(e,r,t,n){var a=n&&n.x||[0,1],o=n&&n.y||[0,1],i=r.grid;if(i){var l=t("domain.column");l!==void 0&&(l{"use strict";var xae=ir(),bae=Es().counter,_ae=$1().attributes,kP=wn().idRegex,wae=gt(),f3={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:[bae("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[kP.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[kP.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:_ae({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 j1(e,r,t){var n=r[t+"axes"],a=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(n))return n;if(a.length)return a}function Mae(e,r){var t=e.grid||{},n=j1(r,t,"x"),a=j1(r,t,"y");if(!e.grid&&!n&&!a)return;var o=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),i=Array.isArray(n),l=Array.isArray(a),u=i&&n!==t.xaxes&&l&&a!==t.yaxes,s,f;o?(s=t.subplots.length,f=t.subplots[0].length):(l&&(s=a.length),i&&(f=n.length));var v=wae.newContainer(r,"grid");function g(d,_){return xae.coerce(t,v,f3,d,_)}var b=g("rows",s),y=g("columns",f);if(!(b*y>1)){delete r.grid;return}if(!o&&!i&&!l){var w=g("pattern")==="independent";w&&(o=!0)}v._hasSubplotGrid=o;var M=g("roworder"),m=M==="top to bottom",A=o?.2:.1,S=o?.3:.1,x,T;u&&r._splomGridDflt&&(x=r._splomGridDflt.xside,T=r._splomGridDflt.yside),v._domains={x:SP("x",g,A,x,y),y:SP("y",g,S,T,b,m)}}function SP(e,r,t,n,a,o){var i=r(e+"gap",t),l=r("domain."+e);r(e+"side",n);for(var u=new Array(a),s=l[0],f=(l[1]-s)/(a-i),v=f*(1-i),g=0;g{"use strict";RP.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 FP=pe((ode,PP)=>{"use strict";var DP=rt(),Aae=Er(),kae=ir(),Sae=gt(),Cae=c3();PP.exports=function(e,r,t,n){var a="error_"+n.axis,o=Sae.newContainer(r,a),i=e[a]||{};function l(y,w){return kae.coerce(i,o,Cae,y,w)}var u=i.array!==void 0||i.value!==void 0||i.type==="sqrt",s=l("visible",u);if(s!==!1){var f=l("type","array"in i?"data":"percent"),v=!0;f!=="sqrt"&&(v=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in i))),f==="data"?(l("array"),l("traceref"),v||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),v||l("valueminus"));var g="copy_"+n.inherit+"style";if(n.inherit){var b=r["error_"+n.inherit];(b||{}).visible&&l(g,!(i.color||DP(i.thickness)||DP(i.width)))}(!n.inherit||!o[g])&&(l("color",t),l("thickness"),l("width",Aae.traceIs(r,"gl3d")?0:4))}}});var v3=pe((lde,NP)=>{"use strict";NP.exports=function(r){var t=r.type,n=r.symmetric;if(t==="data"){var a=r.array||[];if(n)return function(s,f){var v=+a[f];return[v,v]};var o=r.arrayminus||[];return function(s,f){var v=+a[f],g=+o[f];return!isNaN(v)||!isNaN(g)?[g||0,v||0]:[NaN,NaN]}}else{var i=IP(t,r.value),l=IP(t,r.valueminus);return n||r.valueminus===void 0?function(s){var f=i(s);return[f,f]}:function(s){return[l(s),i(s)]}}};function IP(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var OP=pe((sde,qP)=>{"use strict";var h3=rt(),Eae=Er(),d3=St(),Lae=ir(),Rae=v3();qP.exports=function(r){for(var t=r.calcdata,n=0;n{"use strict";var BP=it(),tl=rt(),Dae=yt(),Pae=oa();UP.exports=function(r,t,n,a){var o,i=n.xaxis,l=n.yaxis,u=a&&a.duration>0,s=r._context.staticPlot;t.each(function(f){var v=f[0].trace,g=v.error_x||{},b=v.error_y||{},y;v.ids&&(y=function(A){return A.id});var w=Pae.hasMarkers(v)&&v.marker.maxdisplayed>0;!b.visible&&!g.visible&&(f=[]);var M=BP.select(this).selectAll("g.errorbar").data(f,y);if(M.exit().remove(),!!f.length){g.visible||M.selectAll("path.xerror").remove(),b.visible||M.selectAll("path.yerror").remove(),M.style("opacity",1);var m=M.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(a.duration).style("opacity",1),Dae.setClipUrl(M,n.layerClipId,r),M.each(function(A){var S=BP.select(this),x=Fae(A,i,l);if(!(w&&!A.vis)){var T,d=S.select("path.yerror");if(b.visible&&tl(x.x)&&tl(x.yh)&&tl(x.ys)){var _=b.width;T="M"+(x.x-_)+","+x.yh+"h"+2*_+"m-"+_+",0V"+x.ys,x.noYS||(T+="m-"+_+",0h"+2*_),o=!d.size(),o?d=S.append("path").style("vector-effect",s?"none":"non-scaling-stroke").classed("yerror",!0):u&&(d=d.transition().duration(a.duration).ease(a.easing)),d.attr("d",T)}else d.remove();var p=S.select("path.xerror");if(g.visible&&tl(x.y)&&tl(x.xh)&&tl(x.xs)){var c=(g.copy_ystyle?b:g).width;T="M"+x.xh+","+(x.y-c)+"v"+2*c+"m0,-"+c+"H"+x.xs,x.noXS||(T+="m0,-"+c+"v"+2*c),o=!p.size(),o?p=S.append("path").style("vector-effect",s?"none":"non-scaling-stroke").classed("xerror",!0):u&&(p=p.transition().duration(a.duration).ease(a.easing)),p.attr("d",T)}else p.remove()}})}})};function Fae(e,r,t){var n={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(n.yh=t.c2p(e.yh),n.ys=t.c2p(e.ys),tl(n.ys)||(n.noYS=!0,n.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),tl(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}});var YP=pe((fde,GP)=>{"use strict";var Iae=it(),VP=Zr();GP.exports=function(r){r.each(function(t){var n=t[0].trace,a=n.error_y||{},o=n.error_x||{},i=Iae.select(this);i.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(VP.stroke,a.color),o.copy_ystyle&&(o=a),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(VP.stroke,o.color)})}});var ZP=pe((cde,XP)=>{"use strict";var D0=ir(),WP=zn().overrideAll,P0=c3(),us={error_x:D0.extendFlat({},P0),error_y:D0.extendFlat({},P0)};delete us.error_x.copy_zstyle;delete us.error_y.copy_zstyle;delete us.error_y.copy_ystyle;var F0={error_x:D0.extendFlat({},P0),error_y:D0.extendFlat({},P0),error_z:D0.extendFlat({},P0)};delete F0.error_x.copy_ystyle;delete F0.error_y.copy_ystyle;delete F0.error_z.copy_ystyle;delete F0.error_z.copy_zstyle;XP.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:us,bar:us,histogram:us,scatter3d:WP(F0,"calc","nested"),scattergl:WP(us,"calc","nested")}},supplyDefaults:FP(),calc:OP(),makeComputeError:v3(),plot:HP(),style:YP(),hoverInfo:Nae};function Nae(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var KP=pe((vde,JP)=>{"use strict";JP.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 nF=pe((hde,tF)=>{"use strict";var nl=it(),p3=ka(),rd=ln(),QP=Er(),vo=St(),ed=ti(),Ga=ir(),pi=Ga.strTranslate,rF=Mt().extendFlat,g3=Vo(),di=yt(),y3=Zr(),zae=Sf(),qae=Yn(),Oae=Si().flipScale,Bae=T1(),Uae=Am(),Hae=Ra(),m3=qn(),$P=m3.LINE_SPACING,jP=m3.FROM_TL,eF=m3.FROM_BR,Et=KP().cn;function Vae(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+Et.colorbar).data(Gae(e),function(n){return n._id});t.enter().append("g").attr("class",function(n){return n._id}).classed(Et.colorbar,!0),t.each(function(n){var a=nl.select(this);Ga.ensureSingle(a,"rect",Et.cbbg),Ga.ensureSingle(a,"g",Et.cbfills),Ga.ensureSingle(a,"g",Et.cblines),Ga.ensureSingle(a,"g",Et.cbaxis,function(i){i.classed(Et.crisp,!0)}),Ga.ensureSingle(a,"g",Et.cbtitleunshift,function(i){i.append("g").classed(Et.cbtitle,!0)}),Ga.ensureSingle(a,"rect",Et.cboutline);var o=Yae(a,n,e);o&&o.then&&(e._promises||[]).push(o),e._context.edits.colorbarPosition&&Wae(a,n,e)}),t.exit().each(function(n){rd.autoMargin(e,n._id)}).remove(),t.order()}function Gae(e){var r=e._fullLayout,t=e.calcdata,n=[],a,o,i,l;function u(S){return rF(S,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function s(){typeof l.calc=="function"?l.calc(e,i,a):(a._fillgradient=o.reversescale?Oae(o.colorscale):o.colorscale,a._zrange=[o[l.min],o[l.max]])}for(var f=0;f1){var re=Math.pow(10,Math.floor(Math.log(G)/Math.LN10));oe*=re*Ga.roundUp(G/re,[2,5,10]),(Math.abs(R.start)/R.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=oe}ne.domain=n?[q+y/x.h,q+P-y/x.h]:[q+b/x.w,q+P-b/x.w],ne.setScale(),e.attr("transform",pi(Math.round(x.l),Math.round(x.t)));var H=e.select("."+Et.cbtitleunshift).attr("transform",pi(-Math.round(x.l),-Math.round(x.t))),te=ne.ticklabelposition,ue=ne.title.font.size,de=e.select("."+Et.cbaxis),Ee,Me=0,ve=0;function Ae(Ue,ge){var Te={propContainer:ne,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:S._dfltTitle.colorbar,containerGroup:e.select("."+Et.cbtitle)},ce=Ue.charAt(0)==="h"?Ue.substr(1):"h"+Ue;e.selectAll("."+ce+",."+ce+"-math-group").remove(),zae.draw(t,Ue,rF(Te,ge||{}))}function ke(){if(n&&Q||!n&&!Q){var Ue,ge;p==="top"&&(Ue=b+x.l+O*w,ge=y+x.t+U*(1-q-P)+3+ue*.75),p==="bottom"&&(Ue=b+x.l+O*w,ge=y+x.t+U*(1-q)-3-ue*.25),p==="right"&&(ge=y+x.t+U*M+3+ue*.75,Ue=b+x.l+O*q),Ae(ne._id+"title",{attributes:{x:Ue,y:ge,"text-anchor":n?"start":"middle"}})}}function De(){if(n&&!Q||!n&&Q){var Ue=ne.position||0,ge=ne._offset+ne._length/2,Te,ce;if(p==="right")ce=ge,Te=x.l+O*Ue+10+ue*(ne.showticklabels?1:.5);else if(Te=ge,p==="bottom"&&(ce=x.t+U*Ue+10+(te.indexOf("inside")===-1?ne.tickfont.size:0)+(ne.ticks!=="intside"&&r.ticklen||0)),p==="top"){var ye=_.text.split("
").length;ce=x.t+U*Ue+10-I-$P*ue*ye}Ae((n?"h":"v")+ne._id+"title",{avoid:{selection:nl.select(t).selectAll("g."+ne._id+"tick"),side:p,offsetTop:n?0:x.t,offsetLeft:n?x.l:0,maxShift:n?S.width:S.height},attributes:{x:Te,y:ce,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Ce(){if(!n&&!Q||n&&Q){var Ue=e.select("."+Et.cbtitle),ge=Ue.select("text"),Te=[-u/2,u/2],ce=Ue.select(".h"+ne._id+"title-math-group").node(),ye=15.6;ge.node()&&(ye=parseInt(ge.node().style.fontSize,10)*$P);var Le;if(ce?(Le=di.bBox(ce),ve=Le.width,Me=Le.height,Me>ye&&(Te[1]-=(Me-ye)/2)):ge.node()&&!ge.classed(Et.jsPlaceholder)&&(Le=di.bBox(ge.node()),ve=Le.width,Me=Le.height),n){if(Me){if(Me+=5,p==="top")ne.domain[1]-=Me/x.h,Te[1]*=-1;else{ne.domain[0]+=Me/x.h;var me=qae.lineCount(ge);Te[1]+=(1-me)*ye}Ue.attr("transform",pi(Te[0],Te[1])),ne.setScale()}}else ve&&(p==="right"&&(ne.domain[0]+=(ve+ue/2)/x.w),Ue.attr("transform",pi(Te[0],Te[1])),ne.setScale())}e.selectAll("."+Et.cbfills+",."+Et.cblines).attr("transform",n?pi(0,Math.round(x.h*(1-ne.domain[1]))):pi(Math.round(x.w*ne.domain[0]),0)),de.attr("transform",n?pi(0,Math.round(-x.t)):pi(Math.round(-x.l),0));var he=e.select("."+Et.cbfills).selectAll("rect."+Et.cbfill).attr("style","").data(D);he.enter().append("rect").classed(Et.cbfill,!0).attr("style",""),he.exit().remove();var be=c.map(ne.c2p).map(Math.round).sort(function(Ye,Ge){return Ye-Ge});he.each(function(Ye,Ge){var We=[Ge===0?c[0]:(D[Ge]+D[Ge-1])/2,Ge===D.length-1?c[1]:(D[Ge]+D[Ge+1])/2].map(ne.c2p).map(Math.round);n&&(We[1]=Ga.constrain(We[1]+(We[1]>We[0])?1:-1,be[0],be[1]));var we=nl.select(this).attr(n?"x":"y",X).attr(n?"y":"x",nl.min(We)).attr(n?"width":"height",Math.max(I,2)).attr(n?"height":"width",Math.max(nl.max(We)-nl.min(We),2));if(r._fillgradient)di.gradient(we,t,r._id,n?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var Pe=h(Ye).replace("e-","");we.attr("fill",p3(Pe).toHexString())}});var Se=e.select("."+Et.cblines).selectAll("path."+Et.cbline).data(d.color&&d.width?N:[]);Se.enter().append("path").classed(Et.cbline,!0),Se.exit().remove(),Se.each(function(Ye){var Ge=X,We=Math.round(ne.c2p(Ye))+d.width/2%1;nl.select(this).attr("d","M"+(n?Ge+","+We:We+","+Ge)+(n?"h":"v")+I).call(di.lineGroupStyle,d.width,k(Ye),d.dash)}),de.selectAll("g."+ne._id+"tick,path").remove();var ze=X+I+(u||0)/2-(r.ticks==="outside"?1:0),Fe=vo.calcTicks(ne),Je=vo.getTickSigns(ne)[2];return vo.drawTicks(t,ne,{vals:ne.ticks==="inside"?vo.clipEnds(ne,Fe):Fe,layer:de,path:vo.makeTickPath(ne,ze,Je),transFn:vo.makeTransTickFn(ne)}),vo.drawLabels(t,ne,{vals:Fe,layer:de,transFn:vo.makeTransTickLabelFn(ne),labelFns:vo.makeLabelFns(ne,ze)})}function Oe(){var Ue,ge=I+u/2;te.indexOf("inside")===-1&&(Ue=di.bBox(de.node()),ge+=n?Ue.width:Ue.height),Ee=H.select("text");var Te=0,ce=n&&p==="top",ye=!n&&p==="right",Le=0;if(Ee.node()&&!Ee.classed(Et.jsPlaceholder)){var me,he=H.select(".h"+ne._id+"title-math-group").node();he&&(n&&Q||!n&&!Q)?(Ue=di.bBox(he),Te=Ue.width,me=Ue.height):(Ue=di.bBox(H.node()),Te=Ue.right-x.l-(n?X:Z),me=Ue.bottom-x.t-(n?Z:X),!n&&p==="top"&&(ge+=Ue.height,Le=Ue.height)),ye&&(Ee.attr("transform",pi(Te/2+ue/2,0)),Te*=2),ge=Math.max(ge,n?Te:me)}var be=(n?b:y)*2+ge+s+u/2,Se=0;!n&&_.text&&g==="bottom"&&M<=0&&(Se=be/2,be+=Se,Le+=Se),S._hColorbarMoveTitle=Se,S._hColorbarMoveCBTitle=Le;var ze=s+u,Fe=(n?X:Z)-ze/2-(n?b:0),Je=(n?Z:X)-(n?L:y+Le-Se);e.select("."+Et.cbbg).attr("x",Fe).attr("y",Je).attr(n?"width":"height",Math.max(be-Se,2)).attr(n?"height":"width",Math.max(L+ze,2)).call(y3.fill,f).call(y3.stroke,r.bordercolor).style("stroke-width",s);var Ye=ye?Math.max(Te-10,0):0;e.selectAll("."+Et.cboutline).attr("x",(n?X:Z+b)+Ye).attr("y",(n?Z+y-L:X)+(ce?Me:0)).attr(n?"width":"height",Math.max(I,2)).attr(n?"height":"width",Math.max(L-(n?2*y+Me:2*b+Ye),2)).call(y3.stroke,r.outlinecolor).style({fill:"none","stroke-width":u});var Ge=n?j*be:0,We=n?0:(1-$)*be-Le;if(Ge=A?x.l-Ge:-Ge,We=m?x.t-We:-We,e.attr("transform",pi(Ge,We)),!n&&(s||p3(f).getAlpha()&&!p3.equals(S.paper_bgcolor,f))){var we=de.selectAll("text"),Pe=we[0].length,Qe=e.select("."+Et.cbbg).node(),Ve=di.bBox(Qe),ar=di.getTranslate(e),se=2;we.each(function(Tr,Ar){var ft=0,Yr=Pe-1;if(Ar===ft||Ar===Yr){var mr=di.bBox(this),ct=di.getTranslate(this),Sr;if(Ar===Yr){var Ur=mr.right+ct.x,bt=Ve.right+ar.x+Z-s-se+w;Sr=bt-Ur,Sr>0&&(Sr=0)}else if(Ar===ft){var zr=mr.left+ct.x,Hr=Ve.left+ar.x+Z+s+se;Sr=Hr-zr,Sr<0&&(Sr=0)}Sr&&(Pe<3?this.setAttribute("transform","translate("+Sr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var K={},ae=jP[v],Re=eF[v],Be=jP[g],je=eF[g],nr=be-I;n?(o==="pixels"?(K.y=M,K.t=L*Be,K.b=L*je):(K.t=K.b=0,K.yt=M+a*Be,K.yb=M-a*je),l==="pixels"?(K.x=w,K.l=be*ae,K.r=be*Re):(K.l=nr*ae,K.r=nr*Re,K.xl=w-i*ae,K.xr=w+i*Re)):(o==="pixels"?(K.x=w,K.l=L*ae,K.r=L*Re):(K.l=K.r=0,K.xl=w+a*ae,K.xr=w-a*Re),l==="pixels"?(K.y=1-M,K.t=be*Be,K.b=be*je):(K.t=nr*Be,K.b=nr*je,K.yt=M-i*Be,K.yb=M+i*je));var hr=r.y<.5?"b":"t",wr=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var Cr={r:S.width-Fe-Ge,l:Fe+K.r,b:S.height-Je-We,t:Je+K.b};A&&m?rd.autoMargin(t,r._id,K):A?t._fullLayout._reservedMargin[r._id][hr]=Cr[hr]:m||n?t._fullLayout._reservedMargin[r._id][wr]=Cr[wr]:t._fullLayout._reservedMargin[r._id][hr]=Cr[hr]}return Ga.syncOrAsync([rd.previousPromises,ke,Ce,De,rd.previousPromises,Oe],t)}function Wae(e,r,t){var n=r.orientation==="v",a=t._fullLayout,o=a._size,i,l,u;ed.init({element:e.node(),gd:t,prepFn:function(){i=e.attr("transform"),g3(e)},moveFn:function(s,f){e.attr("transform",i+pi(s,f)),l=ed.align((n?r._uFrac:r._vFrac)+s/o.w,n?r._thickFrac:r._lenFrac,0,1,r.xanchor),u=ed.align((n?r._vFrac:1-r._uFrac)-f/o.h,n?r._lenFrac:r._thickFrac,0,1,r.yanchor);var v=ed.getCursor(l,u,r.xanchor,r.yanchor);g3(e,v)},doneFn:function(){if(g3(e),l!==void 0&&u!==void 0){var s={};s[r._propPrefix+"x"]=l,s[r._propPrefix+"y"]=u,r._traceIndex!==void 0?QP.call("_guiRestyle",t,s,r._traceIndex):QP.call("_guiRelayout",t,s)}}})}function Xae(e,r,t){var n=r._levels,a=[],o=[],i,l,u=n.end+n.size/100,s=n.size,f=1.001*t[0]-.001*t[1],v=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(i=n.start+l*s,!(s>0?i>=u:i<=u));l++)i>f&&i0?i>=u:i<=u));l++)i>t[0]&&i{"use strict";aF.exports={moduleType:"component",name:"colorbar",attributes:pv(),supplyDefaults:wg(),draw:nF().draw,hasColorbar:cg()}});var lF=pe((pde,oF)=>{"use strict";oF.exports={moduleType:"component",name:"legend",layoutAttributes:m2(),supplyLayoutDefaults:_2(),draw:F2(),style:L2()}});var uF=pe((gde,sF)=>{"use strict";sF.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 cF=pe((yde,fF)=>{"use strict";fF.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var b3=pe((mde,pF)=>{"use strict";var Jae=Er(),dF=ir(),x3=dF.extendFlat,vF=dF.extendDeep;function hF(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function Kae(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}pF.exports=function(r,t){var n,a=r.data,o=r.layout,i=vF([],a),l=vF({},o,hF(t.tileClass)),u=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var s=Object.keys(l);for(n=0;n{"use strict";var Qae=tv().EventEmitter,$ae=Er(),jae=ir(),gF=jl(),eie=b3(),rie=s1(),tie=u1();function nie(e,r){var t=new Qae,n=eie(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function o(){var l=gF.getDelay(a._fullLayout);setTimeout(function(){var u=rie(a),s=document.createElement("canvas");s.id=jae.randstr(),t=tie({format:r.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:s,emitter:t,svg:u}),t.clean=function(){a&&document.body.removeChild(a)}},l)}var i=gF.getRedrawFunc(a);return $ae.call("_doPlot",a,n.data,n.layout,n.config).then(i).then(o).catch(function(l){t.emit("error",l)}),t}yF.exports=nie});var _F=pe((bde,bF)=>{"use strict";var xF=jl(),aie={getDelay:xF.getDelay,getRedrawFunc:xF.getRedrawFunc,clone:b3(),toSVG:s1(),svgToImg:u1(),toImage:mF(),downloadImage:Qy()};bF.exports=aie});var MF=pe(ho=>{"use strict";ho.version=pc().version;cb();rw();var iie=Er(),I0=ho.register=iie.register,w3=AC(),wF=Object.keys(w3);for(td=0;td{"use strict";TF.exports=MF()});var pn=pe((Mde,kF)=>{(function(){var e={1964:function(a,o,i){a.exports={alpha_shape:i(3502),convex_hull:i(7352),delaunay_triangulate:i(7642),gl_cone3d:i(6405),gl_error3d:i(9165),gl_line3d:i(5714),gl_mesh3d:i(7201),gl_plot3d:i(4100),gl_scatter3d:i(8418),gl_streamtube3d:i(7815),gl_surface3d:i(9499),ndarray:i(9618),ndarray_linear_interpolate:i(4317)}},4793:function(a,o,i){"use strict";var l;function u(se,K){if(!(se instanceof K))throw new TypeError("Cannot call a class as a function")}function s(se,K){for(var ae=0;aep)throw new RangeError('The value "'+se+'" is invalid for option "size"');var K=new Uint8Array(se);return Object.setPrototypeOf(K,h.prototype),K}function h(se,K,ae){if(typeof se=="number"){if(typeof K=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(se)}return R(se,K,ae)}h.poolSize=8192;function R(se,K,ae){if(typeof se=="string")return I(se,K);if(ArrayBuffer.isView(se))return L(se);if(se==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+x(se));if(we(se,ArrayBuffer)||se&&we(se.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(we(se,SharedArrayBuffer)||se&&we(se.buffer,SharedArrayBuffer)))return P(se,K,ae);if(typeof se=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Re=se.valueOf&&se.valueOf();if(Re!=null&&Re!==se)return h.from(Re,K,ae);var Be=O(se);if(Be)return Be;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof se[Symbol.toPrimitive]=="function")return h.from(se[Symbol.toPrimitive]("string"),K,ae);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+x(se))}h.from=function(se,K,ae){return R(se,K,ae)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function E(se){if(typeof se!="number")throw new TypeError('"size" argument must be of type number');if(se<0)throw new RangeError('The value "'+se+'" is invalid for option "size"')}function D(se,K,ae){return E(se),se<=0?k(se):K!==void 0?typeof ae=="string"?k(se).fill(K,ae):k(se).fill(K):k(se)}h.alloc=function(se,K,ae){return D(se,K,ae)};function N(se){return E(se),k(se<0?0:U(se)|0)}h.allocUnsafe=function(se){return N(se)},h.allocUnsafeSlow=function(se){return N(se)};function I(se,K){if((typeof K!="string"||K==="")&&(K="utf8"),!h.isEncoding(K))throw new TypeError("Unknown encoding: "+K);var ae=j(se,K)|0,Re=k(ae),Be=Re.write(se,K);return Be!==ae&&(Re=Re.slice(0,Be)),Re}function F(se){for(var K=se.length<0?0:U(se.length)|0,ae=k(K),Re=0;Re=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return se|0}function X(se){return+se!=se&&(se=0),h.alloc(+se)}h.isBuffer=function(K){return K!=null&&K._isBuffer===!0&&K!==h.prototype},h.compare=function(K,ae){if(we(K,Uint8Array)&&(K=h.from(K,K.offset,K.byteLength)),we(ae,Uint8Array)&&(ae=h.from(ae,ae.offset,ae.byteLength)),!h.isBuffer(K)||!h.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(K===ae)return 0;for(var Re=K.length,Be=ae.length,je=0,nr=Math.min(Re,Be);jeBe.length?(h.isBuffer(nr)||(nr=h.from(nr)),nr.copy(Be,je)):Uint8Array.prototype.set.call(Be,nr,je);else if(h.isBuffer(nr))nr.copy(Be,je);else throw new TypeError('"list" argument must be an Array of Buffers');je+=nr.length}return Be};function j(se,K){if(h.isBuffer(se))return se.length;if(ArrayBuffer.isView(se)||we(se,ArrayBuffer))return se.byteLength;if(typeof se!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+x(se));var ae=se.length,Re=arguments.length>2&&arguments[2]===!0;if(!Re&&ae===0)return 0;for(var Be=!1;;)switch(K){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":return Fe(se).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>1;case"base64":return Ge(se).length;default:if(Be)return Re?-1:Fe(se).length;K=(""+K).toLowerCase(),Be=!0}}h.byteLength=j;function $(se,K,ae){var Re=!1;if((K===void 0||K<0)&&(K=0),K>this.length||((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)||(ae>>>=0,K>>>=0,ae<=K))return"";for(se||(se="utf8");;)switch(se){case"hex":return Me(this,K,ae);case"utf8":case"utf-8":return H(this,K,ae);case"ascii":return de(this,K,ae);case"latin1":case"binary":return Ee(this,K,ae);case"base64":return re(this,K,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,K,ae);default:if(Re)throw new TypeError("Unknown encoding: "+se);se=(se+"").toLowerCase(),Re=!0}}h.prototype._isBuffer=!0;function Y(se,K,ae){var Re=se[K];se[K]=se[ae],se[ae]=Re}h.prototype.swap16=function(){var K=this.length;if(K%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;aeae&&(K+=" ... "),""},_&&(h.prototype[_]=h.prototype.inspect),h.prototype.compare=function(K,ae,Re,Be,je){if(we(K,Uint8Array)&&(K=h.from(K,K.offset,K.byteLength)),!h.isBuffer(K))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+x(K));if(ae===void 0&&(ae=0),Re===void 0&&(Re=K?K.length:0),Be===void 0&&(Be=0),je===void 0&&(je=this.length),ae<0||Re>K.length||Be<0||je>this.length)throw new RangeError("out of range index");if(Be>=je&&ae>=Re)return 0;if(Be>=je)return-1;if(ae>=Re)return 1;if(ae>>>=0,Re>>>=0,Be>>>=0,je>>>=0,this===K)return 0;for(var nr=je-Be,hr=Re-ae,wr=Math.min(nr,hr),Cr=this.slice(Be,je),Tr=K.slice(ae,Re),Ar=0;Ar2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,Pe(ae)&&(ae=Be?0:se.length-1),ae<0&&(ae=se.length+ae),ae>=se.length){if(Be)return-1;ae=se.length-1}else if(ae<0)if(Be)ae=0;else return-1;if(typeof K=="string"&&(K=h.from(K,Re)),h.isBuffer(K))return K.length===0?-1:Z(se,K,ae,Re,Be);if(typeof K=="number")return K=K&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(se,K,ae):Uint8Array.prototype.lastIndexOf.call(se,K,ae):Z(se,[K],ae,Re,Be);throw new TypeError("val must be string, number or Buffer")}function Z(se,K,ae,Re,Be){var je=1,nr=se.length,hr=K.length;if(Re!==void 0&&(Re=String(Re).toLowerCase(),Re==="ucs2"||Re==="ucs-2"||Re==="utf16le"||Re==="utf-16le")){if(se.length<2||K.length<2)return-1;je=2,nr/=2,hr/=2,ae/=2}function wr(Yr,mr){return je===1?Yr[mr]:Yr.readUInt16BE(mr*je)}var Cr;if(Be){var Tr=-1;for(Cr=ae;Crnr&&(ae=nr-hr),Cr=ae;Cr>=0;Cr--){for(var Ar=!0,ft=0;ftBe&&(Re=Be)):Re=Be;var je=K.length;Re>je/2&&(Re=je/2);var nr;for(nr=0;nr>>0,isFinite(Re)?(Re=Re>>>0,Be===void 0&&(Be="utf8")):(Be=Re,Re=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var je=this.length-ae;if((Re===void 0||Re>je)&&(Re=je),K.length>0&&(Re<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");for(var nr=!1;;)switch(Be){case"hex":return ne(this,K,ae,Re);case"utf8":case"utf-8":return Q(this,K,ae,Re);case"ascii":case"latin1":case"binary":return oe(this,K,ae,Re);case"base64":return ee(this,K,ae,Re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,K,ae,Re);default:if(nr)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),nr=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(se,K,ae){return K===0&&ae===se.length?T.fromByteArray(se):T.fromByteArray(se.slice(K,ae))}function H(se,K,ae){ae=Math.min(se.length,ae);for(var Re=[],Be=K;Be239?4:je>223?3:je>191?2:1;if(Be+hr<=ae){var wr=void 0,Cr=void 0,Tr=void 0,Ar=void 0;switch(hr){case 1:je<128&&(nr=je);break;case 2:wr=se[Be+1],(wr&192)===128&&(Ar=(je&31)<<6|wr&63,Ar>127&&(nr=Ar));break;case 3:wr=se[Be+1],Cr=se[Be+2],(wr&192)===128&&(Cr&192)===128&&(Ar=(je&15)<<12|(wr&63)<<6|Cr&63,Ar>2047&&(Ar<55296||Ar>57343)&&(nr=Ar));break;case 4:wr=se[Be+1],Cr=se[Be+2],Tr=se[Be+3],(wr&192)===128&&(Cr&192)===128&&(Tr&192)===128&&(Ar=(je&15)<<18|(wr&63)<<12|(Cr&63)<<6|Tr&63,Ar>65535&&Ar<1114112&&(nr=Ar))}}nr===null?(nr=65533,hr=1):nr>65535&&(nr-=65536,Re.push(nr>>>10&1023|55296),nr=56320|nr&1023),Re.push(nr),Be+=hr}return ue(Re)}var te=4096;function ue(se){var K=se.length;if(K<=te)return String.fromCharCode.apply(String,se);for(var ae="",Re=0;ReRe)&&(ae=Re);for(var Be="",je=K;jeRe&&(K=Re),ae<0?(ae+=Re,ae<0&&(ae=0)):ae>Re&&(ae=Re),aeae)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(K,ae,Re){K=K>>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=this[K],je=1,nr=0;++nr>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=this[K+--ae],je=1;ae>0&&(je*=256);)Be+=this[K+--ae]*je;return Be},h.prototype.readUint8=h.prototype.readUInt8=function(K,ae){return K=K>>>0,ae||Ae(K,1,this.length),this[K]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(K,ae){return K=K>>>0,ae||Ae(K,2,this.length),this[K]|this[K+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(K,ae){return K=K>>>0,ae||Ae(K,2,this.length),this[K]<<8|this[K+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),(this[K]|this[K+1]<<8|this[K+2]<<16)+this[K+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),this[K]*16777216+(this[K+1]<<16|this[K+2]<<8|this[K+3])},h.prototype.readBigUInt64LE=Ve(function(K){K=K>>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=ae+this[++K]*Math.pow(2,8)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,24),je=this[++K]+this[++K]*Math.pow(2,8)+this[++K]*Math.pow(2,16)+Re*Math.pow(2,24);return BigInt(Be)+(BigInt(je)<>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=ae*Math.pow(2,24)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,8)+this[++K],je=this[++K]*Math.pow(2,24)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,8)+Re;return(BigInt(Be)<>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=this[K],je=1,nr=0;++nr=je&&(Be-=Math.pow(2,8*ae)),Be},h.prototype.readIntBE=function(K,ae,Re){K=K>>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=ae,je=1,nr=this[K+--Be];Be>0&&(je*=256);)nr+=this[K+--Be]*je;return je*=128,nr>=je&&(nr-=Math.pow(2,8*ae)),nr},h.prototype.readInt8=function(K,ae){return K=K>>>0,ae||Ae(K,1,this.length),this[K]&128?(255-this[K]+1)*-1:this[K]},h.prototype.readInt16LE=function(K,ae){K=K>>>0,ae||Ae(K,2,this.length);var Re=this[K]|this[K+1]<<8;return Re&32768?Re|4294901760:Re},h.prototype.readInt16BE=function(K,ae){K=K>>>0,ae||Ae(K,2,this.length);var Re=this[K+1]|this[K]<<8;return Re&32768?Re|4294901760:Re},h.prototype.readInt32LE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),this[K]|this[K+1]<<8|this[K+2]<<16|this[K+3]<<24},h.prototype.readInt32BE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),this[K]<<24|this[K+1]<<16|this[K+2]<<8|this[K+3]},h.prototype.readBigInt64LE=Ve(function(K){K=K>>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=this[K+4]+this[K+5]*Math.pow(2,8)+this[K+6]*Math.pow(2,16)+(Re<<24);return(BigInt(Be)<>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=(ae<<24)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,8)+this[++K];return(BigInt(Be)<>>0,ae||Ae(K,4,this.length),d.read(this,K,!0,23,4)},h.prototype.readFloatBE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),d.read(this,K,!1,23,4)},h.prototype.readDoubleLE=function(K,ae){return K=K>>>0,ae||Ae(K,8,this.length),d.read(this,K,!0,52,8)},h.prototype.readDoubleBE=function(K,ae){return K=K>>>0,ae||Ae(K,8,this.length),d.read(this,K,!1,52,8)};function ke(se,K,ae,Re,Be,je){if(!h.isBuffer(se))throw new TypeError('"buffer" argument must be a Buffer instance');if(K>Be||Kse.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(K,ae,Re,Be){if(K=+K,ae=ae>>>0,Re=Re>>>0,!Be){var je=Math.pow(2,8*Re)-1;ke(this,K,ae,Re,je,0)}var nr=1,hr=0;for(this[ae]=K&255;++hr>>0,Re=Re>>>0,!Be){var je=Math.pow(2,8*Re)-1;ke(this,K,ae,Re,je,0)}var nr=Re-1,hr=1;for(this[ae+nr]=K&255;--nr>=0&&(hr*=256);)this[ae+nr]=K/hr&255;return ae+Re},h.prototype.writeUint8=h.prototype.writeUInt8=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,1,255,0),this[ae]=K&255,ae+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,65535,0),this[ae]=K&255,this[ae+1]=K>>>8,ae+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,65535,0),this[ae]=K>>>8,this[ae+1]=K&255,ae+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,4294967295,0),this[ae+3]=K>>>24,this[ae+2]=K>>>16,this[ae+1]=K>>>8,this[ae]=K&255,ae+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,4294967295,0),this[ae]=K>>>24,this[ae+1]=K>>>16,this[ae+2]=K>>>8,this[ae+3]=K&255,ae+4};function De(se,K,ae,Re,Be){me(K,Re,Be,se,ae,7);var je=Number(K&BigInt(4294967295));se[ae++]=je,je=je>>8,se[ae++]=je,je=je>>8,se[ae++]=je,je=je>>8,se[ae++]=je;var nr=Number(K>>BigInt(32)&BigInt(4294967295));return se[ae++]=nr,nr=nr>>8,se[ae++]=nr,nr=nr>>8,se[ae++]=nr,nr=nr>>8,se[ae++]=nr,ae}function Ce(se,K,ae,Re,Be){me(K,Re,Be,se,ae,7);var je=Number(K&BigInt(4294967295));se[ae+7]=je,je=je>>8,se[ae+6]=je,je=je>>8,se[ae+5]=je,je=je>>8,se[ae+4]=je;var nr=Number(K>>BigInt(32)&BigInt(4294967295));return se[ae+3]=nr,nr=nr>>8,se[ae+2]=nr,nr=nr>>8,se[ae+1]=nr,nr=nr>>8,se[ae]=nr,ae+8}h.prototype.writeBigUInt64LE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return De(this,K,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ce(this,K,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(K,ae,Re,Be){if(K=+K,ae=ae>>>0,!Be){var je=Math.pow(2,8*Re-1);ke(this,K,ae,Re,je-1,-je)}var nr=0,hr=1,wr=0;for(this[ae]=K&255;++nr>0)-wr&255;return ae+Re},h.prototype.writeIntBE=function(K,ae,Re,Be){if(K=+K,ae=ae>>>0,!Be){var je=Math.pow(2,8*Re-1);ke(this,K,ae,Re,je-1,-je)}var nr=Re-1,hr=1,wr=0;for(this[ae+nr]=K&255;--nr>=0&&(hr*=256);)K<0&&wr===0&&this[ae+nr+1]!==0&&(wr=1),this[ae+nr]=(K/hr>>0)-wr&255;return ae+Re},h.prototype.writeInt8=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,1,127,-128),K<0&&(K=255+K+1),this[ae]=K&255,ae+1},h.prototype.writeInt16LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,32767,-32768),this[ae]=K&255,this[ae+1]=K>>>8,ae+2},h.prototype.writeInt16BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,32767,-32768),this[ae]=K>>>8,this[ae+1]=K&255,ae+2},h.prototype.writeInt32LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,2147483647,-2147483648),this[ae]=K&255,this[ae+1]=K>>>8,this[ae+2]=K>>>16,this[ae+3]=K>>>24,ae+4},h.prototype.writeInt32BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,2147483647,-2147483648),K<0&&(K=4294967295+K+1),this[ae]=K>>>24,this[ae+1]=K>>>16,this[ae+2]=K>>>8,this[ae+3]=K&255,ae+4},h.prototype.writeBigInt64LE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return De(this,K,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ce(this,K,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Oe(se,K,ae,Re,Be,je){if(ae+Re>se.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function Ue(se,K,ae,Re,Be){return K=+K,ae=ae>>>0,Be||Oe(se,K,ae,4,34028234663852886e22,-34028234663852886e22),d.write(se,K,ae,Re,23,4),ae+4}h.prototype.writeFloatLE=function(K,ae,Re){return Ue(this,K,ae,!0,Re)},h.prototype.writeFloatBE=function(K,ae,Re){return Ue(this,K,ae,!1,Re)};function ge(se,K,ae,Re,Be){return K=+K,ae=ae>>>0,Be||Oe(se,K,ae,8,17976931348623157e292,-17976931348623157e292),d.write(se,K,ae,Re,52,8),ae+8}h.prototype.writeDoubleLE=function(K,ae,Re){return ge(this,K,ae,!0,Re)},h.prototype.writeDoubleBE=function(K,ae,Re){return ge(this,K,ae,!1,Re)},h.prototype.copy=function(K,ae,Re,Be){if(!h.isBuffer(K))throw new TypeError("argument should be a Buffer");if(Re||(Re=0),!Be&&Be!==0&&(Be=this.length),ae>=K.length&&(ae=K.length),ae||(ae=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),K.length-ae>>0,Re=Re===void 0?this.length:Re>>>0,K||(K=0);var nr;if(typeof K=="number")for(nr=ae;nrMath.pow(2,32)?Be=ye(String(ae)):typeof ae=="bigint"&&(Be=String(ae),(ae>Math.pow(BigInt(2),BigInt(32))||ae<-Math.pow(BigInt(2),BigInt(32)))&&(Be=ye(Be)),Be+="n"),Re+=" It must be ".concat(K,". Received ").concat(Be),Re},RangeError);function ye(se){for(var K="",ae=se.length,Re=se[0]==="-"?1:0;ae>=Re+4;ae-=3)K="_".concat(se.slice(ae-3,ae)).concat(K);return"".concat(se.slice(0,ae)).concat(K)}function Le(se,K,ae){he(K,"offset"),(se[K]===void 0||se[K+ae]===void 0)&&be(K,se.length-(ae+1))}function me(se,K,ae,Re,Be,je){if(se>ae||se3?K===0||K===BigInt(0)?hr=">= 0".concat(nr," and < 2").concat(nr," ** ").concat((je+1)*8).concat(nr):hr=">= -(2".concat(nr," ** ").concat((je+1)*8-1).concat(nr,") and < 2 ** ")+"".concat((je+1)*8-1).concat(nr):hr=">= ".concat(K).concat(nr," and <= ").concat(ae).concat(nr),new Te.ERR_OUT_OF_RANGE("value",hr,se)}Le(Re,Be,je)}function he(se,K){if(typeof se!="number")throw new Te.ERR_INVALID_ARG_TYPE(K,"number",se)}function be(se,K,ae){throw Math.floor(se)!==se?(he(se,ae),new Te.ERR_OUT_OF_RANGE(ae||"offset","an integer",se)):K<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(ae||"offset",">= ".concat(ae?1:0," and <= ").concat(K),se)}var Se=/[^+/0-9A-Za-z-_]/g;function ze(se){if(se=se.split("=")[0],se=se.trim().replace(Se,""),se.length<2)return"";for(;se.length%4!==0;)se=se+"=";return se}function Fe(se,K){K=K||1/0;for(var ae,Re=se.length,Be=null,je=[],nr=0;nr55295&&ae<57344){if(!Be){if(ae>56319){(K-=3)>-1&&je.push(239,191,189);continue}else if(nr+1===Re){(K-=3)>-1&&je.push(239,191,189);continue}Be=ae;continue}if(ae<56320){(K-=3)>-1&&je.push(239,191,189),Be=ae;continue}ae=(Be-55296<<10|ae-56320)+65536}else Be&&(K-=3)>-1&&je.push(239,191,189);if(Be=null,ae<128){if((K-=1)<0)break;je.push(ae)}else if(ae<2048){if((K-=2)<0)break;je.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((K-=3)<0)break;je.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((K-=4)<0)break;je.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return je}function Je(se){for(var K=[],ae=0;ae>8,Be=ae%256,je.push(Be),je.push(Re);return je}function Ge(se){return T.toByteArray(ze(se))}function We(se,K,ae,Re){var Be;for(Be=0;Be=K.length||Be>=se.length);++Be)K[Be+ae]=se[Be];return Be}function we(se,K){return se instanceof K||se!=null&&se.constructor!=null&&se.constructor.name!=null&&se.constructor.name===K.name}function Pe(se){return se!==se}var Qe=function(){for(var se="0123456789abcdef",K=new Array(256),ae=0;ae<16;++ae)for(var Re=ae*16,Be=0;Be<16;++Be)K[Re+Be]=se[ae]+se[Be];return K}();function Ve(se){return typeof BigInt=="undefined"?ar:se}function ar(){throw new Error("BigInt not supported")}},9216:function(a){"use strict";a.exports=u,a.exports.isMobile=u,a.exports.default=u;var o=/(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,i=/CrOS/,l=/android|ipad|playbook|silk/i;function u(s){s||(s={});var f=s.ua;if(!f&&typeof navigator!="undefined"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var v=o.test(f)&&!i.test(f)||!!s.tablet&&l.test(f);return!v&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(v=!0),v}},6296:function(a,o,i){"use strict";a.exports=g;var l=i(7261),u=i(9977),s=i(1811);function f(b,y){this._controllerNames=Object.keys(b),this._controllerList=this._controllerNames.map(function(w){return b[w]}),this._mode=y,this._active=b[y],this._active||(this._mode="turntable",this._active=b.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var v=f.prototype;v.flush=function(b){for(var y=this._controllerList,w=0;w0)throw new Error("Invalid string. Length must be a multiple of 4");var T=S.indexOf("=");T===-1&&(T=x);var d=T===x?0:4-T%4;return[T,d]}function b(S){var x=g(S),T=x[0],d=x[1];return(T+d)*3/4-d}function y(S,x,T){return(x+T)*3/4-T}function w(S){var x,T=g(S),d=T[0],_=T[1],p=new u(y(S,d,_)),c=0,k=_>0?d-4:d,h;for(h=0;h>16&255,p[c++]=x>>8&255,p[c++]=x&255;return _===2&&(x=l[S.charCodeAt(h)]<<2|l[S.charCodeAt(h+1)]>>4,p[c++]=x&255),_===1&&(x=l[S.charCodeAt(h)]<<10|l[S.charCodeAt(h+1)]<<4|l[S.charCodeAt(h+2)]>>2,p[c++]=x>>8&255,p[c++]=x&255),p}function M(S){return i[S>>18&63]+i[S>>12&63]+i[S>>6&63]+i[S&63]}function m(S,x,T){for(var d,_=[],p=x;pk?k:c+p));return d===1?(x=S[T-1],_.push(i[x>>2]+i[x<<4&63]+"==")):d===2&&(x=(S[T-2]<<8)+S[T-1],_.push(i[x>>10]+i[x>>4&63]+i[x<<2&63]+"=")),_.join("")}},3865:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[1]).add(f[0].mul(s[1])),s[1].mul(f[1]))}},1318:function(a){"use strict";a.exports=o;function o(i,l){return i[0].mul(l[1]).cmp(l[0].mul(i[1]))}},8697:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[1]),s[1].mul(f[0]))}},7842:function(a,o,i){"use strict";var l=i(6330),u=i(1533),s=i(2651),f=i(6768),v=i(869),g=i(8697);a.exports=b;function b(y,w){if(l(y))return w?g(y,b(w)):[y[0].clone(),y[1].clone()];var M=0,m,A;if(u(y))m=y.clone();else if(typeof y=="string")m=f(y);else{if(y===0)return[s(0),s(1)];if(y===Math.floor(y))m=s(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),M-=256;m=s(y)}}if(l(w))m.mul(w[1]),A=w[0].clone();else if(u(w))A=w.clone();else if(typeof w=="string")A=f(w);else if(!w)A=s(1);else if(w===Math.floor(w))A=s(w);else{for(;w!==Math.floor(w);)w=w*Math.pow(2,256),M+=256;A=s(w)}return M>0?m=m.ushln(M):M<0&&(A=A.ushln(-M)),v(m,A)}},6330:function(a,o,i){"use strict";var l=i(1533);a.exports=u;function u(s){return Array.isArray(s)&&s.length===2&&l(s[0])&&l(s[1])}},5716:function(a,o,i){"use strict";var l=i(6859);a.exports=u;function u(s){return s.cmp(new l(0))}},1369:function(a,o,i){"use strict";var l=i(5716);a.exports=u;function u(s){var f=s.length,v=s.words,g=0;if(f===1)g=v[0];else if(f===2)g=v[0]+v[1]*67108864;else for(var b=0;b20?52:g+32}},1533:function(a,o,i){"use strict";var l=i(6859);a.exports=u;function u(s){return s&&typeof s=="object"&&!!s.words}},2651:function(a,o,i){"use strict";var l=i(6859),u=i(2361);a.exports=s;function s(f){var v=u.exponent(f);return v<52?new l(f):new l(f*Math.pow(2,52-v)).ushln(v-52)}},869:function(a,o,i){"use strict";var l=i(2651),u=i(5716);a.exports=s;function s(f,v){var g=u(f),b=u(v);if(g===0)return[l(0),l(1)];if(b===0)return[l(0),l(0)];b<0&&(f=f.neg(),v=v.neg());var y=f.gcd(v);return y.cmpn(1)?[f.div(y),v.div(y)]:[f,v]}},6768:function(a,o,i){"use strict";var l=i(6859);a.exports=u;function u(s){return new l(s)}},6504:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[0]),s[1].mul(f[1]))}},7721:function(a,o,i){"use strict";var l=i(5716);a.exports=u;function u(s){return l(s[0])*l(s[1])}},5572:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[1]).sub(s[1].mul(f[0])),s[1].mul(f[1]))}},946:function(a,o,i){"use strict";var l=i(1369),u=i(4025);a.exports=s;function s(f){var v=f[0],g=f[1];if(v.cmpn(0)===0)return 0;var b=v.abs().divmod(g.abs()),y=b.div,w=l(y),M=b.mod,m=v.negative!==g.negative?-1:1;if(M.cmpn(0)===0)return m*w;if(w){var A=u(w)+4,S=l(M.ushln(A).divRound(g));return m*(w+S*Math.pow(2,-A))}else{var x=g.bitLength()-M.bitLength()+53,S=l(M.ushln(x).divRound(g));return x<1023?m*S*Math.pow(2,-x):(S*=Math.pow(2,-1023),m*S*Math.pow(2,1023-x))}}},2478:function(a){"use strict";function o(v,g,b,y,w){for(var M=w+1;y<=w;){var m=y+w>>>1,A=v[m],S=b!==void 0?b(A,g):A-g;S>=0?(M=m,w=m-1):y=m+1}return M}function i(v,g,b,y,w){for(var M=w+1;y<=w;){var m=y+w>>>1,A=v[m],S=b!==void 0?b(A,g):A-g;S>0?(M=m,w=m-1):y=m+1}return M}function l(v,g,b,y,w){for(var M=y-1;y<=w;){var m=y+w>>>1,A=v[m],S=b!==void 0?b(A,g):A-g;S<0?(M=m,y=m+1):w=m-1}return M}function u(v,g,b,y,w){for(var M=y-1;y<=w;){var m=y+w>>>1,A=v[m],S=b!==void 0?b(A,g):A-g;S<=0?(M=m,y=m+1):w=m-1}return M}function s(v,g,b,y,w){for(;y<=w;){var M=y+w>>>1,m=v[M],A=b!==void 0?b(m,g):m-g;if(A===0)return M;A<=0?y=M+1:w=M-1}return-1}function f(v,g,b,y,w,M){return typeof b=="function"?M(v,g,b,y===void 0?0:y|0,w===void 0?v.length-1:w|0):M(v,g,void 0,b===void 0?0:b|0,y===void 0?v.length-1:y|0)}a.exports={ge:function(v,g,b,y,w){return f(v,g,b,y,w,o)},gt:function(v,g,b,y,w){return f(v,g,b,y,w,i)},lt:function(v,g,b,y,w){return f(v,g,b,y,w,l)},le:function(v,g,b,y,w){return f(v,g,b,y,w,u)},eq:function(v,g,b,y,w){return f(v,g,b,y,w,s)}}},8828:function(a,o){"use strict";"use restrict";var i=32;o.INT_BITS=i,o.INT_MAX=2147483647,o.INT_MIN=-1<0)-(s<0)},o.abs=function(s){var f=s>>i-1;return(s^f)-f},o.min=function(s,f){return f^(s^f)&-(s65535)<<4,s>>>=f,v=(s>255)<<3,s>>>=v,f|=v,v=(s>15)<<2,s>>>=v,f|=v,v=(s>3)<<1,s>>>=v,f|=v,f|s>>1},o.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},o.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var f=32;return s&=-s,s&&f--,s&65535&&(f-=16),s&16711935&&(f-=8),s&252645135&&(f-=4),s&858993459&&(f-=2),s&1431655765&&(f-=1),f}o.countTrailingZeros=l,o.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},o.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},o.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var u=new Array(256);(function(s){for(var f=0;f<256;++f){var v=f,g=f,b=7;for(v>>>=1;v;v>>>=1)g<<=1,g|=v&1,--b;s[f]=g<>>8&255]<<16|u[s>>>16&255]<<8|u[s>>>24&255]},o.interleave2=function(s,f){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,s|f<<1},o.deinterleave2=function(s,f){return s=s>>>f&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},o.interleave3=function(s,f,v){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,s|=f<<1,v&=1023,v=(v|v<<16)&4278190335,v=(v|v<<8)&251719695,v=(v|v<<4)&3272356035,v=(v|v<<2)&1227133513,s|v<<2},o.deinterleave3=function(s,f){return s=s>>>f&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},o.nextCombination=function(s){var f=s|s-1;return f+1|(~f&-~f)-1>>>l(s)+1}},6859:function(a,o,i){a=i.nmd(a),function(l,u){"use strict";function s(F,L){if(!F)throw new Error(L||"Assertion failed")}function f(F,L){F.super_=L;var P=function(){};P.prototype=L.prototype,F.prototype=new P,F.prototype.constructor=F}function v(F,L,P){if(v.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((L==="le"||L==="be")&&(P=L,L=10),this._init(F||0,L||10,P||"be"))}typeof l=="object"?l.exports=v:u.BN=v,v.BN=v,v.wordSize=26;var g;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?g=window.Buffer:g=i(7790).Buffer}catch(F){}v.isBN=function(L){return L instanceof v?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===v.wordSize&&Array.isArray(L.words)},v.max=function(L,P){return L.cmp(P)>0?L:P},v.min=function(L,P){return L.cmp(P)<0?L:P},v.prototype._init=function(L,P,O){if(typeof L=="number")return this._initNumber(L,P,O);if(typeof L=="object")return this._initArray(L,P,O);P==="hex"&&(P=16),s(P===(P|0)&&P>=2&&P<=36),L=L.toString().replace(/\s+/g,"");var U=0;L[0]==="-"&&(U++,this.negative=1),U=0;U-=3)j=L[U]|L[U-1]<<8|L[U-2]<<16,this.words[X]|=j<<$&67108863,this.words[X+1]=j>>>26-$&67108863,$+=24,$>=26&&($-=26,X++);else if(O==="le")for(U=0,X=0;U>>26-$&67108863,$+=24,$>=26&&($-=26,X++);return this.strip()};function b(F,L){var P=F.charCodeAt(L);return P>=65&&P<=70?P-55:P>=97&&P<=102?P-87:P-48&15}function y(F,L,P){var O=b(F,P);return P-1>=L&&(O|=b(F,P-1)<<4),O}v.prototype._parseHex=function(L,P,O){this.length=Math.ceil((L.length-P)/6),this.words=new Array(this.length);for(var U=0;U=P;U-=2)$=y(L,P,U)<=18?(X-=18,j+=1,this.words[j]|=$>>>26):X+=8;else{var Y=L.length-P;for(U=Y%2===0?P+1:P;U=18?(X-=18,j+=1,this.words[j]|=$>>>26):X+=8}this.strip()};function w(F,L,P,O){for(var U=0,X=Math.min(F.length,P),j=L;j=49?U+=$-49+10:$>=17?U+=$-17+10:U+=$}return U}v.prototype._parseBase=function(L,P,O){this.words=[0],this.length=1;for(var U=0,X=1;X<=67108863;X*=P)U++;U--,X=X/P|0;for(var j=L.length-O,$=j%U,Y=Math.min(j,j-$)+O,q=0,Z=O;Z1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},v.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},v.prototype.inspect=function(){return(this.red?""};var M=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],m=[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],A=[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];v.prototype.toString=function(L,P){L=L||10,P=P|0||1;var O;if(L===16||L==="hex"){O="";for(var U=0,X=0,j=0;j>>24-U&16777215,X!==0||j!==this.length-1?O=M[6-Y.length]+Y+O:O=Y+O,U+=2,U>=26&&(U-=26,j--)}for(X!==0&&(O=X.toString(16)+O);O.length%P!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(L===(L|0)&&L>=2&&L<=36){var q=m[L],Z=A[L];O="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var Q=ne.modn(Z).toString(L);ne=ne.idivn(Z),ne.isZero()?O=Q+O:O=M[q-Q.length]+Q+O}for(this.isZero()&&(O="0"+O);O.length%P!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}s(!1,"Base should be between 2 and 36")},v.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},v.prototype.toJSON=function(){return this.toString(16)},v.prototype.toBuffer=function(L,P){return s(typeof g!="undefined"),this.toArrayLike(g,L,P)},v.prototype.toArray=function(L,P){return this.toArrayLike(Array,L,P)},v.prototype.toArrayLike=function(L,P,O){var U=this.byteLength(),X=O||Math.max(1,U);s(U<=X,"byte array longer than desired length"),s(X>0,"Requested array length <= 0"),this.strip();var j=P==="le",$=new L(X),Y,q,Z=this.clone();if(j){for(q=0;!Z.isZero();q++)Y=Z.andln(255),Z.iushrn(8),$[q]=Y;for(;q=4096&&(O+=13,P>>>=13),P>=64&&(O+=7,P>>>=7),P>=8&&(O+=4,P>>>=4),P>=2&&(O+=2,P>>>=2),O+P},v.prototype._zeroBits=function(L){if(L===0)return 26;var P=L,O=0;return P&8191||(O+=13,P>>>=13),P&127||(O+=7,P>>>=7),P&15||(O+=4,P>>>=4),P&3||(O+=2,P>>>=2),P&1||O++,O},v.prototype.bitLength=function(){var L=this.words[this.length-1],P=this._countBits(L);return(this.length-1)*26+P};function S(F){for(var L=new Array(F.bitLength()),P=0;P>>U}return L}v.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,P=0;PL.length?this.clone().ior(L):L.clone().ior(this)},v.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},v.prototype.iuand=function(L){var P;this.length>L.length?P=L:P=this;for(var O=0;OL.length?this.clone().iand(L):L.clone().iand(this)},v.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},v.prototype.iuxor=function(L){var P,O;this.length>L.length?(P=this,O=L):(P=L,O=this);for(var U=0;UL.length?this.clone().ixor(L):L.clone().ixor(this)},v.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},v.prototype.inotn=function(L){s(typeof L=="number"&&L>=0);var P=Math.ceil(L/26)|0,O=L%26;this._expand(P),O>0&&P--;for(var U=0;U0&&(this.words[U]=~this.words[U]&67108863>>26-O),this.strip()},v.prototype.notn=function(L){return this.clone().inotn(L)},v.prototype.setn=function(L,P){s(typeof L=="number"&&L>=0);var O=L/26|0,U=L%26;return this._expand(O+1),P?this.words[O]=this.words[O]|1<L.length?(O=this,U=L):(O=L,U=this);for(var X=0,j=0;j>>26;for(;X!==0&&j>>26;if(this.length=O.length,X!==0)this.words[this.length]=X,this.length++;else if(O!==this)for(;jL.length?this.clone().iadd(L):L.clone().iadd(this)},v.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var P=this.iadd(L);return L.negative=1,P._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var O=this.cmp(L);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var U,X;O>0?(U=this,X=L):(U=L,X=this);for(var j=0,$=0;$>26,this.words[$]=P&67108863;for(;j!==0&&$>26,this.words[$]=P&67108863;if(j===0&&$>>26,ne=Y&67108863,Q=Math.min(q,L.length-1),oe=Math.max(0,q-F.length+1);oe<=Q;oe++){var ee=q-oe|0;U=F.words[ee]|0,X=L.words[oe]|0,j=U*X+ne,Z+=j/67108864|0,ne=j&67108863}P.words[q]=ne|0,Y=Z|0}return Y!==0?P.words[q]=Y|0:P.length--,P.strip()}var T=function(L,P,O){var U=L.words,X=P.words,j=O.words,$=0,Y,q,Z,ne=U[0]|0,Q=ne&8191,oe=ne>>>13,ee=U[1]|0,G=ee&8191,re=ee>>>13,H=U[2]|0,te=H&8191,ue=H>>>13,de=U[3]|0,Ee=de&8191,Me=de>>>13,ve=U[4]|0,Ae=ve&8191,ke=ve>>>13,De=U[5]|0,Ce=De&8191,Oe=De>>>13,Ue=U[6]|0,ge=Ue&8191,Te=Ue>>>13,ce=U[7]|0,ye=ce&8191,Le=ce>>>13,me=U[8]|0,he=me&8191,be=me>>>13,Se=U[9]|0,ze=Se&8191,Fe=Se>>>13,Je=X[0]|0,Ye=Je&8191,Ge=Je>>>13,We=X[1]|0,we=We&8191,Pe=We>>>13,Qe=X[2]|0,Ve=Qe&8191,ar=Qe>>>13,se=X[3]|0,K=se&8191,ae=se>>>13,Re=X[4]|0,Be=Re&8191,je=Re>>>13,nr=X[5]|0,hr=nr&8191,wr=nr>>>13,Cr=X[6]|0,Tr=Cr&8191,Ar=Cr>>>13,ft=X[7]|0,Yr=ft&8191,mr=ft>>>13,ct=X[8]|0,Sr=ct&8191,Ur=ct>>>13,bt=X[9]|0,zr=bt&8191,Hr=bt>>>13;O.negative=L.negative^P.negative,O.length=19,Y=Math.imul(Q,Ye),q=Math.imul(Q,Ge),q=q+Math.imul(oe,Ye)|0,Z=Math.imul(oe,Ge);var Ot=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,Y=Math.imul(G,Ye),q=Math.imul(G,Ge),q=q+Math.imul(re,Ye)|0,Z=Math.imul(re,Ge),Y=Y+Math.imul(Q,we)|0,q=q+Math.imul(Q,Pe)|0,q=q+Math.imul(oe,we)|0,Z=Z+Math.imul(oe,Pe)|0;var Lt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,Y=Math.imul(te,Ye),q=Math.imul(te,Ge),q=q+Math.imul(ue,Ye)|0,Z=Math.imul(ue,Ge),Y=Y+Math.imul(G,we)|0,q=q+Math.imul(G,Pe)|0,q=q+Math.imul(re,we)|0,Z=Z+Math.imul(re,Pe)|0,Y=Y+Math.imul(Q,Ve)|0,q=q+Math.imul(Q,ar)|0,q=q+Math.imul(oe,Ve)|0,Z=Z+Math.imul(oe,ar)|0;var yn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(yn>>>26)|0,yn&=67108863,Y=Math.imul(Ee,Ye),q=Math.imul(Ee,Ge),q=q+Math.imul(Me,Ye)|0,Z=Math.imul(Me,Ge),Y=Y+Math.imul(te,we)|0,q=q+Math.imul(te,Pe)|0,q=q+Math.imul(ue,we)|0,Z=Z+Math.imul(ue,Pe)|0,Y=Y+Math.imul(G,Ve)|0,q=q+Math.imul(G,ar)|0,q=q+Math.imul(re,Ve)|0,Z=Z+Math.imul(re,ar)|0,Y=Y+Math.imul(Q,K)|0,q=q+Math.imul(Q,ae)|0,q=q+Math.imul(oe,K)|0,Z=Z+Math.imul(oe,ae)|0;var Gt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,Y=Math.imul(Ae,Ye),q=Math.imul(Ae,Ge),q=q+Math.imul(ke,Ye)|0,Z=Math.imul(ke,Ge),Y=Y+Math.imul(Ee,we)|0,q=q+Math.imul(Ee,Pe)|0,q=q+Math.imul(Me,we)|0,Z=Z+Math.imul(Me,Pe)|0,Y=Y+Math.imul(te,Ve)|0,q=q+Math.imul(te,ar)|0,q=q+Math.imul(ue,Ve)|0,Z=Z+Math.imul(ue,ar)|0,Y=Y+Math.imul(G,K)|0,q=q+Math.imul(G,ae)|0,q=q+Math.imul(re,K)|0,Z=Z+Math.imul(re,ae)|0,Y=Y+Math.imul(Q,Be)|0,q=q+Math.imul(Q,je)|0,q=q+Math.imul(oe,Be)|0,Z=Z+Math.imul(oe,je)|0;var Rt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,Y=Math.imul(Ce,Ye),q=Math.imul(Ce,Ge),q=q+Math.imul(Oe,Ye)|0,Z=Math.imul(Oe,Ge),Y=Y+Math.imul(Ae,we)|0,q=q+Math.imul(Ae,Pe)|0,q=q+Math.imul(ke,we)|0,Z=Z+Math.imul(ke,Pe)|0,Y=Y+Math.imul(Ee,Ve)|0,q=q+Math.imul(Ee,ar)|0,q=q+Math.imul(Me,Ve)|0,Z=Z+Math.imul(Me,ar)|0,Y=Y+Math.imul(te,K)|0,q=q+Math.imul(te,ae)|0,q=q+Math.imul(ue,K)|0,Z=Z+Math.imul(ue,ae)|0,Y=Y+Math.imul(G,Be)|0,q=q+Math.imul(G,je)|0,q=q+Math.imul(re,Be)|0,Z=Z+Math.imul(re,je)|0,Y=Y+Math.imul(Q,hr)|0,q=q+Math.imul(Q,wr)|0,q=q+Math.imul(oe,hr)|0,Z=Z+Math.imul(oe,wr)|0;var nt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(nt>>>26)|0,nt&=67108863,Y=Math.imul(ge,Ye),q=Math.imul(ge,Ge),q=q+Math.imul(Te,Ye)|0,Z=Math.imul(Te,Ge),Y=Y+Math.imul(Ce,we)|0,q=q+Math.imul(Ce,Pe)|0,q=q+Math.imul(Oe,we)|0,Z=Z+Math.imul(Oe,Pe)|0,Y=Y+Math.imul(Ae,Ve)|0,q=q+Math.imul(Ae,ar)|0,q=q+Math.imul(ke,Ve)|0,Z=Z+Math.imul(ke,ar)|0,Y=Y+Math.imul(Ee,K)|0,q=q+Math.imul(Ee,ae)|0,q=q+Math.imul(Me,K)|0,Z=Z+Math.imul(Me,ae)|0,Y=Y+Math.imul(te,Be)|0,q=q+Math.imul(te,je)|0,q=q+Math.imul(ue,Be)|0,Z=Z+Math.imul(ue,je)|0,Y=Y+Math.imul(G,hr)|0,q=q+Math.imul(G,wr)|0,q=q+Math.imul(re,hr)|0,Z=Z+Math.imul(re,wr)|0,Y=Y+Math.imul(Q,Tr)|0,q=q+Math.imul(Q,Ar)|0,q=q+Math.imul(oe,Tr)|0,Z=Z+Math.imul(oe,Ar)|0;var Ft=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,Y=Math.imul(ye,Ye),q=Math.imul(ye,Ge),q=q+Math.imul(Le,Ye)|0,Z=Math.imul(Le,Ge),Y=Y+Math.imul(ge,we)|0,q=q+Math.imul(ge,Pe)|0,q=q+Math.imul(Te,we)|0,Z=Z+Math.imul(Te,Pe)|0,Y=Y+Math.imul(Ce,Ve)|0,q=q+Math.imul(Ce,ar)|0,q=q+Math.imul(Oe,Ve)|0,Z=Z+Math.imul(Oe,ar)|0,Y=Y+Math.imul(Ae,K)|0,q=q+Math.imul(Ae,ae)|0,q=q+Math.imul(ke,K)|0,Z=Z+Math.imul(ke,ae)|0,Y=Y+Math.imul(Ee,Be)|0,q=q+Math.imul(Ee,je)|0,q=q+Math.imul(Me,Be)|0,Z=Z+Math.imul(Me,je)|0,Y=Y+Math.imul(te,hr)|0,q=q+Math.imul(te,wr)|0,q=q+Math.imul(ue,hr)|0,Z=Z+Math.imul(ue,wr)|0,Y=Y+Math.imul(G,Tr)|0,q=q+Math.imul(G,Ar)|0,q=q+Math.imul(re,Tr)|0,Z=Z+Math.imul(re,Ar)|0,Y=Y+Math.imul(Q,Yr)|0,q=q+Math.imul(Q,mr)|0,q=q+Math.imul(oe,Yr)|0,Z=Z+Math.imul(oe,mr)|0;var ha=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(ha>>>26)|0,ha&=67108863,Y=Math.imul(he,Ye),q=Math.imul(he,Ge),q=q+Math.imul(be,Ye)|0,Z=Math.imul(be,Ge),Y=Y+Math.imul(ye,we)|0,q=q+Math.imul(ye,Pe)|0,q=q+Math.imul(Le,we)|0,Z=Z+Math.imul(Le,Pe)|0,Y=Y+Math.imul(ge,Ve)|0,q=q+Math.imul(ge,ar)|0,q=q+Math.imul(Te,Ve)|0,Z=Z+Math.imul(Te,ar)|0,Y=Y+Math.imul(Ce,K)|0,q=q+Math.imul(Ce,ae)|0,q=q+Math.imul(Oe,K)|0,Z=Z+Math.imul(Oe,ae)|0,Y=Y+Math.imul(Ae,Be)|0,q=q+Math.imul(Ae,je)|0,q=q+Math.imul(ke,Be)|0,Z=Z+Math.imul(ke,je)|0,Y=Y+Math.imul(Ee,hr)|0,q=q+Math.imul(Ee,wr)|0,q=q+Math.imul(Me,hr)|0,Z=Z+Math.imul(Me,wr)|0,Y=Y+Math.imul(te,Tr)|0,q=q+Math.imul(te,Ar)|0,q=q+Math.imul(ue,Tr)|0,Z=Z+Math.imul(ue,Ar)|0,Y=Y+Math.imul(G,Yr)|0,q=q+Math.imul(G,mr)|0,q=q+Math.imul(re,Yr)|0,Z=Z+Math.imul(re,mr)|0,Y=Y+Math.imul(Q,Sr)|0,q=q+Math.imul(Q,Ur)|0,q=q+Math.imul(oe,Sr)|0,Z=Z+Math.imul(oe,Ur)|0;var Qn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,Y=Math.imul(ze,Ye),q=Math.imul(ze,Ge),q=q+Math.imul(Fe,Ye)|0,Z=Math.imul(Fe,Ge),Y=Y+Math.imul(he,we)|0,q=q+Math.imul(he,Pe)|0,q=q+Math.imul(be,we)|0,Z=Z+Math.imul(be,Pe)|0,Y=Y+Math.imul(ye,Ve)|0,q=q+Math.imul(ye,ar)|0,q=q+Math.imul(Le,Ve)|0,Z=Z+Math.imul(Le,ar)|0,Y=Y+Math.imul(ge,K)|0,q=q+Math.imul(ge,ae)|0,q=q+Math.imul(Te,K)|0,Z=Z+Math.imul(Te,ae)|0,Y=Y+Math.imul(Ce,Be)|0,q=q+Math.imul(Ce,je)|0,q=q+Math.imul(Oe,Be)|0,Z=Z+Math.imul(Oe,je)|0,Y=Y+Math.imul(Ae,hr)|0,q=q+Math.imul(Ae,wr)|0,q=q+Math.imul(ke,hr)|0,Z=Z+Math.imul(ke,wr)|0,Y=Y+Math.imul(Ee,Tr)|0,q=q+Math.imul(Ee,Ar)|0,q=q+Math.imul(Me,Tr)|0,Z=Z+Math.imul(Me,Ar)|0,Y=Y+Math.imul(te,Yr)|0,q=q+Math.imul(te,mr)|0,q=q+Math.imul(ue,Yr)|0,Z=Z+Math.imul(ue,mr)|0,Y=Y+Math.imul(G,Sr)|0,q=q+Math.imul(G,Ur)|0,q=q+Math.imul(re,Sr)|0,Z=Z+Math.imul(re,Ur)|0,Y=Y+Math.imul(Q,zr)|0,q=q+Math.imul(Q,Hr)|0,q=q+Math.imul(oe,zr)|0,Z=Z+Math.imul(oe,Hr)|0;var Fn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,Y=Math.imul(ze,we),q=Math.imul(ze,Pe),q=q+Math.imul(Fe,we)|0,Z=Math.imul(Fe,Pe),Y=Y+Math.imul(he,Ve)|0,q=q+Math.imul(he,ar)|0,q=q+Math.imul(be,Ve)|0,Z=Z+Math.imul(be,ar)|0,Y=Y+Math.imul(ye,K)|0,q=q+Math.imul(ye,ae)|0,q=q+Math.imul(Le,K)|0,Z=Z+Math.imul(Le,ae)|0,Y=Y+Math.imul(ge,Be)|0,q=q+Math.imul(ge,je)|0,q=q+Math.imul(Te,Be)|0,Z=Z+Math.imul(Te,je)|0,Y=Y+Math.imul(Ce,hr)|0,q=q+Math.imul(Ce,wr)|0,q=q+Math.imul(Oe,hr)|0,Z=Z+Math.imul(Oe,wr)|0,Y=Y+Math.imul(Ae,Tr)|0,q=q+Math.imul(Ae,Ar)|0,q=q+Math.imul(ke,Tr)|0,Z=Z+Math.imul(ke,Ar)|0,Y=Y+Math.imul(Ee,Yr)|0,q=q+Math.imul(Ee,mr)|0,q=q+Math.imul(Me,Yr)|0,Z=Z+Math.imul(Me,mr)|0,Y=Y+Math.imul(te,Sr)|0,q=q+Math.imul(te,Ur)|0,q=q+Math.imul(ue,Sr)|0,Z=Z+Math.imul(ue,Ur)|0,Y=Y+Math.imul(G,zr)|0,q=q+Math.imul(G,Hr)|0,q=q+Math.imul(re,zr)|0,Z=Z+Math.imul(re,Hr)|0;var wa=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(wa>>>26)|0,wa&=67108863,Y=Math.imul(ze,Ve),q=Math.imul(ze,ar),q=q+Math.imul(Fe,Ve)|0,Z=Math.imul(Fe,ar),Y=Y+Math.imul(he,K)|0,q=q+Math.imul(he,ae)|0,q=q+Math.imul(be,K)|0,Z=Z+Math.imul(be,ae)|0,Y=Y+Math.imul(ye,Be)|0,q=q+Math.imul(ye,je)|0,q=q+Math.imul(Le,Be)|0,Z=Z+Math.imul(Le,je)|0,Y=Y+Math.imul(ge,hr)|0,q=q+Math.imul(ge,wr)|0,q=q+Math.imul(Te,hr)|0,Z=Z+Math.imul(Te,wr)|0,Y=Y+Math.imul(Ce,Tr)|0,q=q+Math.imul(Ce,Ar)|0,q=q+Math.imul(Oe,Tr)|0,Z=Z+Math.imul(Oe,Ar)|0,Y=Y+Math.imul(Ae,Yr)|0,q=q+Math.imul(Ae,mr)|0,q=q+Math.imul(ke,Yr)|0,Z=Z+Math.imul(ke,mr)|0,Y=Y+Math.imul(Ee,Sr)|0,q=q+Math.imul(Ee,Ur)|0,q=q+Math.imul(Me,Sr)|0,Z=Z+Math.imul(Me,Ur)|0,Y=Y+Math.imul(te,zr)|0,q=q+Math.imul(te,Hr)|0,q=q+Math.imul(ue,zr)|0,Z=Z+Math.imul(ue,Hr)|0;var xi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(xi>>>26)|0,xi&=67108863,Y=Math.imul(ze,K),q=Math.imul(ze,ae),q=q+Math.imul(Fe,K)|0,Z=Math.imul(Fe,ae),Y=Y+Math.imul(he,Be)|0,q=q+Math.imul(he,je)|0,q=q+Math.imul(be,Be)|0,Z=Z+Math.imul(be,je)|0,Y=Y+Math.imul(ye,hr)|0,q=q+Math.imul(ye,wr)|0,q=q+Math.imul(Le,hr)|0,Z=Z+Math.imul(Le,wr)|0,Y=Y+Math.imul(ge,Tr)|0,q=q+Math.imul(ge,Ar)|0,q=q+Math.imul(Te,Tr)|0,Z=Z+Math.imul(Te,Ar)|0,Y=Y+Math.imul(Ce,Yr)|0,q=q+Math.imul(Ce,mr)|0,q=q+Math.imul(Oe,Yr)|0,Z=Z+Math.imul(Oe,mr)|0,Y=Y+Math.imul(Ae,Sr)|0,q=q+Math.imul(Ae,Ur)|0,q=q+Math.imul(ke,Sr)|0,Z=Z+Math.imul(ke,Ur)|0,Y=Y+Math.imul(Ee,zr)|0,q=q+Math.imul(Ee,Hr)|0,q=q+Math.imul(Me,zr)|0,Z=Z+Math.imul(Me,Hr)|0;var Gi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,Y=Math.imul(ze,Be),q=Math.imul(ze,je),q=q+Math.imul(Fe,Be)|0,Z=Math.imul(Fe,je),Y=Y+Math.imul(he,hr)|0,q=q+Math.imul(he,wr)|0,q=q+Math.imul(be,hr)|0,Z=Z+Math.imul(be,wr)|0,Y=Y+Math.imul(ye,Tr)|0,q=q+Math.imul(ye,Ar)|0,q=q+Math.imul(Le,Tr)|0,Z=Z+Math.imul(Le,Ar)|0,Y=Y+Math.imul(ge,Yr)|0,q=q+Math.imul(ge,mr)|0,q=q+Math.imul(Te,Yr)|0,Z=Z+Math.imul(Te,mr)|0,Y=Y+Math.imul(Ce,Sr)|0,q=q+Math.imul(Ce,Ur)|0,q=q+Math.imul(Oe,Sr)|0,Z=Z+Math.imul(Oe,Ur)|0,Y=Y+Math.imul(Ae,zr)|0,q=q+Math.imul(Ae,Hr)|0,q=q+Math.imul(ke,zr)|0,Z=Z+Math.imul(ke,Hr)|0;var Yi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,Y=Math.imul(ze,hr),q=Math.imul(ze,wr),q=q+Math.imul(Fe,hr)|0,Z=Math.imul(Fe,wr),Y=Y+Math.imul(he,Tr)|0,q=q+Math.imul(he,Ar)|0,q=q+Math.imul(be,Tr)|0,Z=Z+Math.imul(be,Ar)|0,Y=Y+Math.imul(ye,Yr)|0,q=q+Math.imul(ye,mr)|0,q=q+Math.imul(Le,Yr)|0,Z=Z+Math.imul(Le,mr)|0,Y=Y+Math.imul(ge,Sr)|0,q=q+Math.imul(ge,Ur)|0,q=q+Math.imul(Te,Sr)|0,Z=Z+Math.imul(Te,Ur)|0,Y=Y+Math.imul(Ce,zr)|0,q=q+Math.imul(Ce,Hr)|0,q=q+Math.imul(Oe,zr)|0,Z=Z+Math.imul(Oe,Hr)|0;var Wi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,Y=Math.imul(ze,Tr),q=Math.imul(ze,Ar),q=q+Math.imul(Fe,Tr)|0,Z=Math.imul(Fe,Ar),Y=Y+Math.imul(he,Yr)|0,q=q+Math.imul(he,mr)|0,q=q+Math.imul(be,Yr)|0,Z=Z+Math.imul(be,mr)|0,Y=Y+Math.imul(ye,Sr)|0,q=q+Math.imul(ye,Ur)|0,q=q+Math.imul(Le,Sr)|0,Z=Z+Math.imul(Le,Ur)|0,Y=Y+Math.imul(ge,zr)|0,q=q+Math.imul(ge,Hr)|0,q=q+Math.imul(Te,zr)|0,Z=Z+Math.imul(Te,Hr)|0;var tn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(tn>>>26)|0,tn&=67108863,Y=Math.imul(ze,Yr),q=Math.imul(ze,mr),q=q+Math.imul(Fe,Yr)|0,Z=Math.imul(Fe,mr),Y=Y+Math.imul(he,Sr)|0,q=q+Math.imul(he,Ur)|0,q=q+Math.imul(be,Sr)|0,Z=Z+Math.imul(be,Ur)|0,Y=Y+Math.imul(ye,zr)|0,q=q+Math.imul(ye,Hr)|0,q=q+Math.imul(Le,zr)|0,Z=Z+Math.imul(Le,Hr)|0;var xo=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(xo>>>26)|0,xo&=67108863,Y=Math.imul(ze,Sr),q=Math.imul(ze,Ur),q=q+Math.imul(Fe,Sr)|0,Z=Math.imul(Fe,Ur),Y=Y+Math.imul(he,zr)|0,q=q+Math.imul(he,Hr)|0,q=q+Math.imul(be,zr)|0,Z=Z+Math.imul(be,Hr)|0;var bi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(bi>>>26)|0,bi&=67108863,Y=Math.imul(ze,zr),q=Math.imul(ze,Hr),q=q+Math.imul(Fe,zr)|0,Z=Math.imul(Fe,Hr);var _i=($+Y|0)+((q&8191)<<13)|0;return $=(Z+(q>>>13)|0)+(_i>>>26)|0,_i&=67108863,j[0]=Ot,j[1]=Lt,j[2]=yn,j[3]=Gt,j[4]=Rt,j[5]=nt,j[6]=Ft,j[7]=ha,j[8]=Qn,j[9]=Fn,j[10]=wa,j[11]=xi,j[12]=Gi,j[13]=Yi,j[14]=Wi,j[15]=tn,j[16]=xo,j[17]=bi,j[18]=_i,$!==0&&(j[19]=$,O.length++),O};Math.imul||(T=x);function d(F,L,P){P.negative=L.negative^F.negative,P.length=F.length+L.length;for(var O=0,U=0,X=0;X>>26)|0,U+=j>>>26,j&=67108863}P.words[X]=$,O=j,j=U}return O!==0?P.words[X]=O:P.length--,P.strip()}function _(F,L,P){var O=new p;return O.mulp(F,L,P)}v.prototype.mulTo=function(L,P){var O,U=this.length+L.length;return this.length===10&&L.length===10?O=T(this,L,P):U<63?O=x(this,L,P):U<1024?O=d(this,L,P):O=_(this,L,P),O};function p(F,L){this.x=F,this.y=L}p.prototype.makeRBT=function(L){for(var P=new Array(L),O=v.prototype._countBits(L)-1,U=0;U>=1;return U},p.prototype.permute=function(L,P,O,U,X,j){for(var $=0;$>>1)X++;return 1<>>13,O[2*j+1]=X&8191,X=X>>>13;for(j=2*P;j>=26,P+=U/67108864|0,P+=X>>>26,this.words[O]=X&67108863}return P!==0&&(this.words[O]=P,this.length++),this},v.prototype.muln=function(L){return this.clone().imuln(L)},v.prototype.sqr=function(){return this.mul(this)},v.prototype.isqr=function(){return this.imul(this.clone())},v.prototype.pow=function(L){var P=S(L);if(P.length===0)return new v(1);for(var O=this,U=0;U=0);var P=L%26,O=(L-P)/26,U=67108863>>>26-P<<26-P,X;if(P!==0){var j=0;for(X=0;X>>26-P}j&&(this.words[X]=j,this.length++)}if(O!==0){for(X=this.length-1;X>=0;X--)this.words[X+O]=this.words[X];for(X=0;X=0);var U;P?U=(P-P%26)/26:U=0;var X=L%26,j=Math.min((L-X)/26,this.length),$=67108863^67108863>>>X<j)for(this.length-=j,q=0;q=0&&(Z!==0||q>=U);q--){var ne=this.words[q]|0;this.words[q]=Z<<26-X|ne>>>X,Z=ne&$}return Y&&Z!==0&&(Y.words[Y.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},v.prototype.ishrn=function(L,P,O){return s(this.negative===0),this.iushrn(L,P,O)},v.prototype.shln=function(L){return this.clone().ishln(L)},v.prototype.ushln=function(L){return this.clone().iushln(L)},v.prototype.shrn=function(L){return this.clone().ishrn(L)},v.prototype.ushrn=function(L){return this.clone().iushrn(L)},v.prototype.testn=function(L){s(typeof L=="number"&&L>=0);var P=L%26,O=(L-P)/26,U=1<=0);var P=L%26,O=(L-P)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(P!==0&&O++,this.length=Math.min(O,this.length),P!==0){var U=67108863^67108863>>>P<=67108864;P++)this.words[P]-=67108864,P===this.length-1?this.words[P+1]=1:this.words[P+1]++;return this.length=Math.max(this.length,P+1),this},v.prototype.isubn=function(L){if(s(typeof L=="number"),s(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var P=0;P>26)-(Y/67108864|0),this.words[X+O]=j&67108863}for(;X>26,this.words[X+O]=j&67108863;if($===0)return this.strip();for(s($===-1),$=0,X=0;X>26,this.words[X]=j&67108863;return this.negative=1,this.strip()},v.prototype._wordDiv=function(L,P){var O=this.length-L.length,U=this.clone(),X=L,j=X.words[X.length-1]|0,$=this._countBits(j);O=26-$,O!==0&&(X=X.ushln(O),U.iushln(O),j=X.words[X.length-1]|0);var Y=U.length-X.length,q;if(P!=="mod"){q=new v(null),q.length=Y+1,q.words=new Array(q.length);for(var Z=0;Z=0;Q--){var oe=(U.words[X.length+Q]|0)*67108864+(U.words[X.length+Q-1]|0);for(oe=Math.min(oe/j|0,67108863),U._ishlnsubmul(X,oe,Q);U.negative!==0;)oe--,U.negative=0,U._ishlnsubmul(X,1,Q),U.isZero()||(U.negative^=1);q&&(q.words[Q]=oe)}return q&&q.strip(),U.strip(),P!=="div"&&O!==0&&U.iushrn(O),{div:q||null,mod:U}},v.prototype.divmod=function(L,P,O){if(s(!L.isZero()),this.isZero())return{div:new v(0),mod:new v(0)};var U,X,j;return this.negative!==0&&L.negative===0?(j=this.neg().divmod(L,P),P!=="mod"&&(U=j.div.neg()),P!=="div"&&(X=j.mod.neg(),O&&X.negative!==0&&X.iadd(L)),{div:U,mod:X}):this.negative===0&&L.negative!==0?(j=this.divmod(L.neg(),P),P!=="mod"&&(U=j.div.neg()),{div:U,mod:j.mod}):this.negative&L.negative?(j=this.neg().divmod(L.neg(),P),P!=="div"&&(X=j.mod.neg(),O&&X.negative!==0&&X.isub(L)),{div:j.div,mod:X}):L.length>this.length||this.cmp(L)<0?{div:new v(0),mod:this}:L.length===1?P==="div"?{div:this.divn(L.words[0]),mod:null}:P==="mod"?{div:null,mod:new v(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new v(this.modn(L.words[0]))}:this._wordDiv(L,P)},v.prototype.div=function(L){return this.divmod(L,"div",!1).div},v.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},v.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},v.prototype.divRound=function(L){var P=this.divmod(L);if(P.mod.isZero())return P.div;var O=P.div.negative!==0?P.mod.isub(L):P.mod,U=L.ushrn(1),X=L.andln(1),j=O.cmp(U);return j<0||X===1&&j===0?P.div:P.div.negative!==0?P.div.isubn(1):P.div.iaddn(1)},v.prototype.modn=function(L){s(L<=67108863);for(var P=(1<<26)%L,O=0,U=this.length-1;U>=0;U--)O=(P*O+(this.words[U]|0))%L;return O},v.prototype.idivn=function(L){s(L<=67108863);for(var P=0,O=this.length-1;O>=0;O--){var U=(this.words[O]|0)+P*67108864;this.words[O]=U/L|0,P=U%L}return this.strip()},v.prototype.divn=function(L){return this.clone().idivn(L)},v.prototype.egcd=function(L){s(L.negative===0),s(!L.isZero());var P=this,O=L.clone();P.negative!==0?P=P.umod(L):P=P.clone();for(var U=new v(1),X=new v(0),j=new v(0),$=new v(1),Y=0;P.isEven()&&O.isEven();)P.iushrn(1),O.iushrn(1),++Y;for(var q=O.clone(),Z=P.clone();!P.isZero();){for(var ne=0,Q=1;!(P.words[0]&Q)&&ne<26;++ne,Q<<=1);if(ne>0)for(P.iushrn(ne);ne-- >0;)(U.isOdd()||X.isOdd())&&(U.iadd(q),X.isub(Z)),U.iushrn(1),X.iushrn(1);for(var oe=0,ee=1;!(O.words[0]&ee)&&oe<26;++oe,ee<<=1);if(oe>0)for(O.iushrn(oe);oe-- >0;)(j.isOdd()||$.isOdd())&&(j.iadd(q),$.isub(Z)),j.iushrn(1),$.iushrn(1);P.cmp(O)>=0?(P.isub(O),U.isub(j),X.isub($)):(O.isub(P),j.isub(U),$.isub(X))}return{a:j,b:$,gcd:O.iushln(Y)}},v.prototype._invmp=function(L){s(L.negative===0),s(!L.isZero());var P=this,O=L.clone();P.negative!==0?P=P.umod(L):P=P.clone();for(var U=new v(1),X=new v(0),j=O.clone();P.cmpn(1)>0&&O.cmpn(1)>0;){for(var $=0,Y=1;!(P.words[0]&Y)&&$<26;++$,Y<<=1);if($>0)for(P.iushrn($);$-- >0;)U.isOdd()&&U.iadd(j),U.iushrn(1);for(var q=0,Z=1;!(O.words[0]&Z)&&q<26;++q,Z<<=1);if(q>0)for(O.iushrn(q);q-- >0;)X.isOdd()&&X.iadd(j),X.iushrn(1);P.cmp(O)>=0?(P.isub(O),U.isub(X)):(O.isub(P),X.isub(U))}var ne;return P.cmpn(1)===0?ne=U:ne=X,ne.cmpn(0)<0&&ne.iadd(L),ne},v.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var P=this.clone(),O=L.clone();P.negative=0,O.negative=0;for(var U=0;P.isEven()&&O.isEven();U++)P.iushrn(1),O.iushrn(1);do{for(;P.isEven();)P.iushrn(1);for(;O.isEven();)O.iushrn(1);var X=P.cmp(O);if(X<0){var j=P;P=O,O=j}else if(X===0||O.cmpn(1)===0)break;P.isub(O)}while(!0);return O.iushln(U)},v.prototype.invm=function(L){return this.egcd(L).a.umod(L)},v.prototype.isEven=function(){return(this.words[0]&1)===0},v.prototype.isOdd=function(){return(this.words[0]&1)===1},v.prototype.andln=function(L){return this.words[0]&L},v.prototype.bincn=function(L){s(typeof L=="number");var P=L%26,O=(L-P)/26,U=1<>>26,$&=67108863,this.words[j]=$}return X!==0&&(this.words[j]=X,this.length++),this},v.prototype.isZero=function(){return this.length===1&&this.words[0]===0},v.prototype.cmpn=function(L){var P=L<0;if(this.negative!==0&&!P)return-1;if(this.negative===0&&P)return 1;this.strip();var O;if(this.length>1)O=1;else{P&&(L=-L),s(L<=67108863,"Number is too big");var U=this.words[0]|0;O=U===L?0:UL.length)return 1;if(this.length=0;O--){var U=this.words[O]|0,X=L.words[O]|0;if(U!==X){UX&&(P=1);break}}return P},v.prototype.gtn=function(L){return this.cmpn(L)===1},v.prototype.gt=function(L){return this.cmp(L)===1},v.prototype.gten=function(L){return this.cmpn(L)>=0},v.prototype.gte=function(L){return this.cmp(L)>=0},v.prototype.ltn=function(L){return this.cmpn(L)===-1},v.prototype.lt=function(L){return this.cmp(L)===-1},v.prototype.lten=function(L){return this.cmpn(L)<=0},v.prototype.lte=function(L){return this.cmp(L)<=0},v.prototype.eqn=function(L){return this.cmpn(L)===0},v.prototype.eq=function(L){return this.cmp(L)===0},v.red=function(L){return new N(L)},v.prototype.toRed=function(L){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},v.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},v.prototype._forceRed=function(L){return this.red=L,this},v.prototype.forceRed=function(L){return s(!this.red,"Already a number in reduction context"),this._forceRed(L)},v.prototype.redAdd=function(L){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},v.prototype.redIAdd=function(L){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},v.prototype.redSub=function(L){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},v.prototype.redISub=function(L){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},v.prototype.redShl=function(L){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},v.prototype.redMul=function(L){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},v.prototype.redIMul=function(L){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},v.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},v.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},v.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},v.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},v.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},v.prototype.redPow=function(L){return s(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var c={k256:null,p224:null,p192:null,p25519:null};function k(F,L){this.name=F,this.p=new v(L,16),this.n=this.p.bitLength(),this.k=new v(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}k.prototype._tmp=function(){var L=new v(null);return L.words=new Array(Math.ceil(this.n/13)),L},k.prototype.ireduce=function(L){var P=L,O;do this.split(P,this.tmp),P=this.imulK(P),P=P.iadd(this.tmp),O=P.bitLength();while(O>this.n);var U=O0?P.isub(this.p):P.strip!==void 0?P.strip():P._strip(),P},k.prototype.split=function(L,P){L.iushrn(this.n,0,P)},k.prototype.imulK=function(L){return L.imul(this.k)};function h(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(h,k),h.prototype.split=function(L,P){for(var O=4194303,U=Math.min(L.length,9),X=0;X>>22,j=$}j>>>=22,L.words[X-10]=j,j===0&&L.length>10?L.length-=10:L.length-=9},h.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var P=0,O=0;O>>=26,L.words[O]=X,P=U}return P!==0&&(L.words[L.length++]=P),L},v._prime=function(L){if(c[L])return c[L];var P;if(L==="k256")P=new h;else if(L==="p224")P=new R;else if(L==="p192")P=new E;else if(L==="p25519")P=new D;else throw new Error("Unknown prime "+L);return c[L]=P,P};function N(F){if(typeof F=="string"){var L=v._prime(F);this.m=L.p,this.prime=L}else s(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}N.prototype._verify1=function(L){s(L.negative===0,"red works only with positives"),s(L.red,"red works only with red numbers")},N.prototype._verify2=function(L,P){s((L.negative|P.negative)===0,"red works only with positives"),s(L.red&&L.red===P.red,"red works only with red numbers")},N.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},N.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},N.prototype.add=function(L,P){this._verify2(L,P);var O=L.add(P);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},N.prototype.iadd=function(L,P){this._verify2(L,P);var O=L.iadd(P);return O.cmp(this.m)>=0&&O.isub(this.m),O},N.prototype.sub=function(L,P){this._verify2(L,P);var O=L.sub(P);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},N.prototype.isub=function(L,P){this._verify2(L,P);var O=L.isub(P);return O.cmpn(0)<0&&O.iadd(this.m),O},N.prototype.shl=function(L,P){return this._verify1(L),this.imod(L.ushln(P))},N.prototype.imul=function(L,P){return this._verify2(L,P),this.imod(L.imul(P))},N.prototype.mul=function(L,P){return this._verify2(L,P),this.imod(L.mul(P))},N.prototype.isqr=function(L){return this.imul(L,L.clone())},N.prototype.sqr=function(L){return this.mul(L,L)},N.prototype.sqrt=function(L){if(L.isZero())return L.clone();var P=this.m.andln(3);if(s(P%2===1),P===3){var O=this.m.add(new v(1)).iushrn(2);return this.pow(L,O)}for(var U=this.m.subn(1),X=0;!U.isZero()&&U.andln(1)===0;)X++,U.iushrn(1);s(!U.isZero());var j=new v(1).toRed(this),$=j.redNeg(),Y=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new v(2*q*q).toRed(this);this.pow(q,Y).cmp($)!==0;)q.redIAdd($);for(var Z=this.pow(q,U),ne=this.pow(L,U.addn(1).iushrn(1)),Q=this.pow(L,U),oe=X;Q.cmp(j)!==0;){for(var ee=Q,G=0;ee.cmp(j)!==0;G++)ee=ee.redSqr();s(G=0;X--){for(var Z=P.words[X],ne=q-1;ne>=0;ne--){var Q=Z>>ne&1;if(j!==U[0]&&(j=this.sqr(j)),Q===0&&$===0){Y=0;continue}$<<=1,$|=Q,Y++,!(Y!==O&&(X!==0||ne!==0))&&(j=this.mul(j,U[$]),Y=0,$=0)}q=26}return j},N.prototype.convertTo=function(L){var P=L.umod(this.m);return P===L?P.clone():P},N.prototype.convertFrom=function(L){var P=L.clone();return P.red=null,P},v.mont=function(L){return new I(L)};function I(F){N.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new v(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)}f(I,N),I.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},I.prototype.convertFrom=function(L){var P=this.imod(L.mul(this.rinv));return P.red=null,P},I.prototype.imul=function(L,P){if(L.isZero()||P.isZero())return L.words[0]=0,L.length=1,L;var O=L.imul(P),U=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=O.isub(U).iushrn(this.shift),j=X;return X.cmp(this.m)>=0?j=X.isub(this.m):X.cmpn(0)<0&&(j=X.iadd(this.m)),j._forceRed(this)},I.prototype.mul=function(L,P){if(L.isZero()||P.isZero())return new v(0)._forceRed(this);var O=L.mul(P),U=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=O.isub(U).iushrn(this.shift),j=X;return X.cmp(this.m)>=0?j=X.isub(this.m):X.cmpn(0)<0&&(j=X.iadd(this.m)),j._forceRed(this)},I.prototype.invm=function(L){var P=this.imod(L._invmp(this.m).mul(this.r2));return P._forceRed(this)}}(a,this)},6204:function(a){"use strict";a.exports=o;function o(i){var l,u,s,f=i.length,v=0;for(l=0;l>>1;if(!(p<=0)){var c,k=l.mallocDouble(2*p*d),h=l.mallocInt32(d);if(d=v(A,p,k,h),d>0){if(p===1&&T)u.init(d),c=u.sweepComplete(p,x,0,d,k,h,0,d,k,h);else{var R=l.mallocDouble(2*p*_),E=l.mallocInt32(_);_=v(S,p,R,E),_>0&&(u.init(d+_),p===1?c=u.sweepBipartite(p,x,0,d,k,h,0,_,R,E):c=s(p,x,T,d,k,h,_,R,E),l.free(R),l.free(E))}l.free(k),l.free(h)}return c}}}var b;function y(A,S){b.push([A,S])}function w(A){return b=[],g(A,A,y,!0),b}function M(A,S){return b=[],g(A,S,y,!1),b}function m(A,S,x){switch(arguments.length){case 1:return w(A);case 2:return typeof S=="function"?g(A,A,S,!0):M(A,S);case 3:return g(A,S,x,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(a,o){"use strict";function i(){function s(g,b,y,w,M,m,A,S,x,T,d){for(var _=2*g,p=w,c=_*w;px-S?s(g,b,y,w,M,m,A,S,x,T,d):f(g,b,y,w,M,m,A,S,x,T,d)}return v}function l(){function s(y,w,M,m,A,S,x,T,d,_,p){for(var c=2*y,k=m,h=c*m;k_-d?m?s(y,w,M,A,S,x,T,d,_,p,c):f(y,w,M,A,S,x,T,d,_,p,c):m?v(y,w,M,A,S,x,T,d,_,p,c):g(y,w,M,A,S,x,T,d,_,p,c)}return b}function u(s){return s?i():l()}o.partial=u(!1),o.full=u(!0)},7150:function(a,o,i){"use strict";a.exports=F;var l=i(1888),u=i(8828),s=i(2455),f=s.partial,v=s.full,g=i(855),b=i(3545),y=i(8105),w=128,M=1<<22,m=1<<22,A=y("!(lo>=p0)&&!(p1>=hi)"),S=y("lo===p0"),x=y("lo0;){Z-=1;var oe=Z*p,ee=h[oe],G=h[oe+1],re=h[oe+2],H=h[oe+3],te=h[oe+4],ue=h[oe+5],de=Z*c,Ee=R[de],Me=R[de+1],ve=ue&1,Ae=!!(ue&16),ke=X,De=j,Ce=Y,Oe=q;if(ve&&(ke=Y,De=q,Ce=X,Oe=j),!(ue&2&&(re=x(L,ee,G,re,ke,De,Me),G>=re))&&!(ue&4&&(G=T(L,ee,G,re,ke,De,Ee),G>=re))){var Ue=re-G,ge=te-H;if(Ae){if(L*Ue*(Ue+ge)y&&M[_+b]>T;--d,_-=A){for(var p=_,c=_+A,k=0;k>>1,T=2*g,d=x,_=M[T*x+b];A=R?(d=h,_=R):k>=D?(d=c,_=k):(d=E,_=D):R>=D?(d=h,_=R):D>=k?(d=c,_=k):(d=E,_=D);for(var F=T*(S-1),L=T*d,N=0;N=p0)&&!(p1>=hi)":b};function i(y){return o[y]}function l(y,w,M,m,A,S,x){for(var T=2*y,d=T*M,_=d,p=M,c=w,k=y+w,h=M;m>h;++h,d+=T){var R=A[d+c];if(R===x)if(p===h)p+=1,_+=T;else{for(var E=0;T>E;++E){var D=A[d+E];A[d+E]=A[_],A[_++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function u(y,w,M,m,A,S,x){for(var T=2*y,d=T*M,_=d,p=M,c=w,k=y+w,h=M;m>h;++h,d+=T){var R=A[d+c];if(RE;++E){var D=A[d+E];A[d+E]=A[_],A[_++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function s(y,w,M,m,A,S,x){for(var T=2*y,d=T*M,_=d,p=M,c=w,k=y+w,h=M;m>h;++h,d+=T){var R=A[d+k];if(R<=x)if(p===h)p+=1,_+=T;else{for(var E=0;T>E;++E){var D=A[d+E];A[d+E]=A[_],A[_++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function f(y,w,M,m,A,S,x){for(var T=2*y,d=T*M,_=d,p=M,c=w,k=y+w,h=M;m>h;++h,d+=T){var R=A[d+k];if(R<=x)if(p===h)p+=1,_+=T;else{for(var E=0;T>E;++E){var D=A[d+E];A[d+E]=A[_],A[_++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function v(y,w,M,m,A,S,x){for(var T=2*y,d=T*M,_=d,p=M,c=w,k=y+w,h=M;m>h;++h,d+=T){var R=A[d+c],E=A[d+k];if(R<=x&&x<=E)if(p===h)p+=1,_+=T;else{for(var D=0;T>D;++D){var N=A[d+D];A[d+D]=A[_],A[_++]=N}var I=S[h];S[h]=S[p],S[p++]=I}}return p}function g(y,w,M,m,A,S,x){for(var T=2*y,d=T*M,_=d,p=M,c=w,k=y+w,h=M;m>h;++h,d+=T){var R=A[d+c],E=A[d+k];if(RD;++D){var N=A[d+D];A[d+D]=A[_],A[_++]=N}var I=S[h];S[h]=S[p],S[p++]=I}}return p}function b(y,w,M,m,A,S,x,T){for(var d=2*y,_=d*M,p=_,c=M,k=w,h=y+w,R=M;m>R;++R,_+=d){var E=A[_+k],D=A[_+h];if(!(E>=x)&&!(T>=D))if(c===R)c+=1,p+=d;else{for(var N=0;d>N;++N){var I=A[_+N];A[_+N]=A[p],A[p++]=I}var F=S[R];S[R]=S[c],S[c++]=F}}return c}},4192:function(a){"use strict";a.exports=i;var o=32;function i(w,M){M<=4*o?l(0,M-1,w):y(0,M-1,w)}function l(w,M,m){for(var A=2*(w+1),S=w+1;S<=M;++S){for(var x=m[A++],T=m[A++],d=S,_=A-2;d-- >w;){var p=m[_-2],c=m[_-1];if(pm[M+1]:!0}function b(w,M,m,A){w*=2;var S=A[w];return S>1,d=T-A,_=T+A,p=S,c=d,k=T,h=_,R=x,E=w+1,D=M-1,N=0;g(p,c,m)&&(N=p,p=c,c=N),g(h,R,m)&&(N=h,h=R,R=N),g(p,k,m)&&(N=p,p=k,k=N),g(c,k,m)&&(N=c,c=k,k=N),g(p,h,m)&&(N=p,p=h,h=N),g(k,h,m)&&(N=k,k=h,h=N),g(c,R,m)&&(N=c,c=R,R=N),g(c,k,m)&&(N=c,c=k,k=N),g(h,R,m)&&(N=h,h=R,R=N);for(var I=m[2*c],F=m[2*c+1],L=m[2*h],P=m[2*h+1],O=2*p,U=2*k,X=2*R,j=2*S,$=2*T,Y=2*x,q=0;q<2;++q){var Z=m[O+q],ne=m[U+q],Q=m[X+q];m[j+q]=Z,m[$+q]=ne,m[Y+q]=Q}s(d,w,m),s(_,M,m);for(var oe=E;oe<=D;++oe)if(b(oe,I,F,m))oe!==E&&u(oe,E,m),++E;else if(!b(oe,L,P,m))for(;;)if(b(D,L,P,m)){b(D,I,F,m)?(f(oe,E,D,m),++E,--D):(u(oe,D,m),--D);break}else{if(--D>>1;s(A,ne);for(var Q=0,oe=0,$=0;$=f)ee=ee-f|0,x(y,w,oe--,ee);else if(ee>=0)x(g,b,Q--,ee);else if(ee<=-f){ee=-ee-f|0;for(var G=0;G>>1;s(A,ne);for(var Q=0,oe=0,ee=0,$=0;$>1===A[2*$+3]>>1&&(re=2,$+=1),G<0){for(var H=-(G>>1)-1,te=0;te>1)-1;re===0?x(g,b,Q--,H):re===1?x(y,w,oe--,H):re===2&&x(M,m,ee--,H)}}}function p(k,h,R,E,D,N,I,F,L,P,O,U){var X=0,j=2*k,$=h,Y=h+k,q=1,Z=1;E?Z=f:q=f;for(var ne=D;ne>>1;s(A,G);for(var re=0,ne=0;ne=f?(te=!E,Q-=f):(te=!!E,Q-=1),te)T(g,b,re++,Q);else{var ue=U[Q],de=j*Q,Ee=O[de+h+1],Me=O[de+h+1+k];e:for(var ve=0;ve>>1;s(A,Q);for(var oe=0,Y=0;Y=f)g[oe++]=q-f;else{q-=1;var G=O[q],re=X*q,H=P[re+h+1],te=P[re+h+1+k];e:for(var ue=0;ue=0;--ue)if(g[ue]===q){for(var ve=ue+1;ve0;){for(var S=b.pop(),M=b.pop(),x=-1,T=-1,m=w[M],_=1;_=0||(g.flip(M,S),s(v,g,b,x,M,T),s(v,g,b,M,T,x),s(v,g,b,T,S,x),s(v,g,b,S,x,T))}}},5023:function(a,o,i){"use strict";var l=i(2478);a.exports=b;function u(y,w,M,m,A,S,x){this.cells=y,this.neighbor=w,this.flags=m,this.constraint=M,this.active=A,this.next=S,this.boundary=x}var s=u.prototype;function f(y,w){return y[0]-w[0]||y[1]-w[1]||y[2]-w[2]}s.locate=function(){var y=[0,0,0];return function(w,M,m){var A=w,S=M,x=m;return M0||x.length>0;){for(;S.length>0;){var c=S.pop();if(T[c]!==-A){T[c]=A;for(var k=d[c],h=0;h<3;++h){var R=p[3*c+h];R>=0&&T[R]===0&&(_[3*c+h]?x.push(R):(S.push(R),T[R]=A))}}}var E=x;x=S,S=E,x.length=0,A=-A}var D=g(d,T,w);return M?D.concat(m.boundary):D}},8902:function(a,o,i){"use strict";var l=i(2478),u=i(3250)[3],s=0,f=1,v=2;a.exports=x;function g(T,d,_,p,c){this.a=T,this.b=d,this.idx=_,this.lowerIds=p,this.upperIds=c}function b(T,d,_,p){this.a=T,this.b=d,this.type=_,this.idx=p}function y(T,d){var _=T.a[0]-d.a[0]||T.a[1]-d.a[1]||T.type-d.type;return _||T.type!==s&&(_=u(T.a,T.b,d.b),_)?_:T.idx-d.idx}function w(T,d){return u(T.a,T.b,d)}function M(T,d,_,p,c){for(var k=l.lt(d,p,w),h=l.gt(d,p,w),R=k;R1&&u(_[D[I-2]],_[D[I-1]],p)>0;)T.push([D[I-1],D[I-2],c]),I-=1;D.length=I,D.push(c);for(var N=E.upperIds,I=N.length;I>1&&u(_[N[I-2]],_[N[I-1]],p)<0;)T.push([N[I-2],N[I-1],c]),I-=1;N.length=I,N.push(c)}}function m(T,d){var _;return T.a[0]E[0]&&c.push(new b(E,R,v,k),new b(R,E,f,k))}c.sort(y);for(var D=c[0].a[0]-(1+Math.abs(c[0].a[0]))*Math.pow(2,-52),N=[new g([D,1],[D,0],-1,[],[],[],[])],I=[],k=0,F=c.length;k=0}}(),s.removeTriangle=function(g,b,y){var w=this.stars;f(w[g],b,y),f(w[b],y,g),f(w[y],g,b)},s.addTriangle=function(g,b,y){var w=this.stars;w[g].push(b,y),w[b].push(y,g),w[y].push(g,b)},s.opposite=function(g,b){for(var y=this.stars[b],w=1,M=y.length;w=0;--L){var Z=I[L];P=Z[0];var ne=D[P],Q=ne[0],oe=ne[1],ee=E[Q],G=E[oe];if((ee[0]-G[0]||ee[1]-G[1])<0){var re=Q;Q=oe,oe=re}ne[0]=Q;var H=ne[1]=Z[1],te;for(F&&(te=ne[2]);L>0&&I[L-1][0]===P;){var Z=I[--L],ue=Z[1];F?D.push([H,ue,te]):D.push([H,ue]),H=ue}F?D.push([H,oe,te]):D.push([H,oe])}return O}function d(E,D,N){for(var I=D.length,F=new l(I),L=[],P=0;PD[2]?1:0)}function c(E,D,N){if(E.length!==0){if(D)for(var I=0;I0||P.length>0}function R(E,D,N){var I;if(N){I=D;for(var F=new Array(D.length),L=0;LT+1)throw new Error(S+" map requires nshades to be at least size "+A.length);Array.isArray(b.alpha)?b.alpha.length!==2?d=[1,1]:d=b.alpha.slice():typeof b.alpha=="number"?d=[b.alpha,b.alpha]:d=[1,1],y=A.map(function(R){return Math.round(R.index*T)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var p=A.map(function(R,E){var D=A[E].index,N=A[E].rgb.slice();return N.length===4&&N[3]>=0&&N[3]<=1||(N[3]=d[0]+(d[1]-d[0])*D),N}),c=[];for(_=0;_=0}function b(y,w,M,m){var A=l(w,M,m);if(A===0){var S=u(l(y,w,M)),x=u(l(y,w,m));if(S===x){if(S===0){var T=g(y,w,M),d=g(y,w,m);return T===d?0:T?1:-1}return 0}else{if(x===0)return S>0||g(y,w,m)?-1:1;if(S===0)return x>0||g(y,w,M)?1:-1}return u(x-S)}var _=l(y,w,M);if(_>0)return A>0&&l(y,w,m)>0?1:-1;if(_<0)return A>0||l(y,w,m)>0?1:-1;var p=l(y,w,m);return p>0||g(y,w,M)?1:-1}},8572:function(a){"use strict";a.exports=function(i){return i<0?-1:i>0?1:0}},8507:function(a){a.exports=l;var o=Math.min;function i(u,s){return u-s}function l(u,s){var f=u.length,v=u.length-s.length;if(v)return v;switch(f){case 0:return 0;case 1:return u[0]-s[0];case 2:return u[0]+u[1]-s[0]-s[1]||o(u[0],u[1])-o(s[0],s[1]);case 3:var g=u[0]+u[1],b=s[0]+s[1];if(v=g+u[2]-(b+s[2]),v)return v;var y=o(u[0],u[1]),w=o(s[0],s[1]);return o(y,u[2])-o(w,s[2])||o(y+u[2],g)-o(w+s[2],b);case 4:var M=u[0],m=u[1],A=u[2],S=u[3],x=s[0],T=s[1],d=s[2],_=s[3];return M+m+A+S-(x+T+d+_)||o(M,m,A,S)-o(x,T,d,_,x)||o(M+m,M+A,M+S,m+A,m+S,A+S)-o(x+T,x+d,x+_,T+d,T+_,d+_)||o(M+m+A,M+m+S,M+A+S,m+A+S)-o(x+T+d,x+T+_,x+d+_,T+d+_);default:for(var p=u.slice().sort(i),c=s.slice().sort(i),k=0;ki[u][0]&&(u=s);return lu?[[u],[l]]:[[l]]}},4750:function(a,o,i){"use strict";a.exports=u;var l=i(3090);function u(s){var f=l(s),v=f.length;if(v<=2)return[];for(var g=new Array(v),b=f[v-1],y=0;y=b[x]&&(S+=1);m[A]=S}}return g}function v(g,b){try{return l(g,!0)}catch(m){var y=u(g);if(y.length<=b)return[];var w=s(g,y),M=l(w,!0);return f(M,y)}}},4769:function(a){"use strict";function o(l,u,s,f,v,g){var b=6*v*v-6*v,y=3*v*v-4*v+1,w=-6*v*v+6*v,M=3*v*v-2*v;if(l.length){g||(g=new Array(l.length));for(var m=l.length-1;m>=0;--m)g[m]=b*l[m]+y*u[m]+w*s[m]+M*f[m];return g}return b*l+y*u+w*s[m]+M*f}function i(l,u,s,f,v,g){var b=v-1,y=v*v,w=b*b,M=(1+2*v)*w,m=v*w,A=y*(3-2*v),S=y*b;if(l.length){g||(g=new Array(l.length));for(var x=l.length-1;x>=0;--x)g[x]=M*l[x]+m*u[x]+A*s[x]+S*f[x];return g}return M*l+m*u+A*s+S*f}a.exports=i,a.exports.derivative=o},7642:function(a,o,i){"use strict";var l=i(8954),u=i(1682);a.exports=g;function s(b,y){this.point=b,this.index=y}function f(b,y){for(var w=b.point,M=y.point,m=w.length,A=0;A=2)return!1;N[F]=L}return!0}):D=D.filter(function(N){for(var I=0;I<=M;++I){var F=k[N[I]];if(F<0)return!1;N[I]=F}return!0}),M&1)for(var S=0;S>>31},a.exports.exponent=function(A){var S=a.exports.hi(A);return(S<<1>>>21)-1023},a.exports.fraction=function(A){var S=a.exports.lo(A),x=a.exports.hi(A),T=x&(1<<20)-1;return x&2146435072&&(T+=1048576),[S,T]},a.exports.denormalized=function(A){var S=a.exports.hi(A);return!(S&2146435072)}},1338:function(a){"use strict";function o(u,s,f){var v=u[f]|0;if(v<=0)return[];var g=new Array(v),b;if(f===u.length-1)for(b=0;b0)return i(u|0,s);break;case"object":if(typeof u.length=="number")return o(u,s,0);break}return[]}a.exports=l},3134:function(a,o,i){"use strict";a.exports=u;var l=i(1682);function u(s,f){var v=s.length;if(typeof f!="number"){f=0;for(var g=0;g=M-1)for(var _=S.length-1,c=y-w[M-1],p=0;p=M-1)for(var d=S.length-1,_=y-w[M-1],p=0;p=0;--M)if(y[--w])return!1;return!0},v.jump=function(y){var w=this.lastT(),M=this.dimension;if(!(y0;--p)m.push(s(T[p-1],d[p-1],arguments[p])),A.push(0)}},v.push=function(y){var w=this.lastT(),M=this.dimension;if(!(y1e-6?1/x:0;this._time.push(y);for(var c=M;c>0;--c){var k=s(d[c-1],_[c-1],arguments[c]);m.push(k),A.push((k-m[S++])*p)}}},v.set=function(y){var w=this.dimension;if(!(y0;--T)M.push(s(S[T-1],x[T-1],arguments[T])),m.push(0)}},v.move=function(y){var w=this.lastT(),M=this.dimension;if(!(y<=w||arguments.length!==M+1)){var m=this._state,A=this._velocity,S=m.length-this.dimension,x=this.bounds,T=x[0],d=x[1],_=y-w,p=_>1e-6?1/_:0;this._time.push(y);for(var c=M;c>0;--c){var k=arguments[c];m.push(s(T[c-1],d[c-1],m[S++]+k)),A.push(k*p)}}},v.idle=function(y){var w=this.lastT();if(!(y=0;--p)m.push(s(T[p],d[p],m[S]+_*A[S])),A.push(0),S+=1}};function g(y){for(var w=new Array(y),M=0;M=0;--E){var c=k[E];h[E]<=0?k[E]=new l(c._color,c.key,c.value,k[E+1],c.right,c._count+1):k[E]=new l(c._color,c.key,c.value,c.left,k[E+1],c._count+1)}for(var E=k.length-1;E>1;--E){var D=k[E-1],c=k[E];if(D._color===i||c._color===i)break;var N=k[E-2];if(N.left===D)if(D.left===c){var I=N.right;if(I&&I._color===o)D._color=i,N.right=s(i,I),N._color=o,E-=1;else{if(N._color=o,N.left=D.right,D._color=i,D.right=N,k[E-2]=D,k[E-1]=c,f(N),f(D),E>=3){var F=k[E-3];F.left===N?F.left=D:F.right=D}break}}else{var I=N.right;if(I&&I._color===o)D._color=i,N.right=s(i,I),N._color=o,E-=1;else{if(D.right=c.left,N._color=o,N.left=c.right,c._color=i,c.left=D,c.right=N,k[E-2]=c,k[E-1]=D,f(N),f(D),f(c),E>=3){var F=k[E-3];F.left===N?F.left=c:F.right=c}break}}else if(D.right===c){var I=N.left;if(I&&I._color===o)D._color=i,N.left=s(i,I),N._color=o,E-=1;else{if(N._color=o,N.right=D.left,D._color=i,D.left=N,k[E-2]=D,k[E-1]=c,f(N),f(D),E>=3){var F=k[E-3];F.right===N?F.right=D:F.left=D}break}}else{var I=N.left;if(I&&I._color===o)D._color=i,N.left=s(i,I),N._color=o,E-=1;else{if(D.left=c.right,N._color=o,N.right=c.left,c._color=i,c.right=D,c.left=N,k[E-2]=c,k[E-1]=D,f(N),f(D),f(c),E>=3){var F=k[E-3];F.right===N?F.right=c:F.left=c}break}}}return k[0]._color=i,new v(p,k[0])};function b(d,_){if(_.left){var p=b(d,_.left);if(p)return p}var p=d(_.key,_.value);if(p)return p;if(_.right)return b(d,_.right)}function y(d,_,p,c){var k=_(d,c.key);if(k<=0){if(c.left){var h=y(d,_,p,c.left);if(h)return h}var h=p(c.key,c.value);if(h)return h}if(c.right)return y(d,_,p,c.right)}function w(d,_,p,c,k){var h=p(d,k.key),R=p(_,k.key),E;if(h<=0&&(k.left&&(E=w(d,_,p,c,k.left),E)||R>0&&(E=c(k.key,k.value),E)))return E;if(R>0&&k.right)return w(d,_,p,c,k.right)}g.forEach=function(_,p,c){if(this.root)switch(arguments.length){case 1:return b(_,this.root);case 2:return y(p,this._compare,_,this.root);case 3:return this._compare(p,c)>=0?void 0:w(p,c,this._compare,_,this.root)}},Object.defineProperty(g,"begin",{get:function(){for(var d=[],_=this.root;_;)d.push(_),_=_.left;return new M(this,d)}}),Object.defineProperty(g,"end",{get:function(){for(var d=[],_=this.root;_;)d.push(_),_=_.right;return new M(this,d)}}),g.at=function(d){if(d<0)return new M(this,[]);for(var _=this.root,p=[];;){if(p.push(_),_.left){if(d<_.left._count){_=_.left;continue}d-=_.left._count}if(!d)return new M(this,p);if(d-=1,_.right){if(d>=_.right._count)break;_=_.right}else break}return new M(this,[])},g.ge=function(d){for(var _=this._compare,p=this.root,c=[],k=0;p;){var h=_(d,p.key);c.push(p),h<=0&&(k=c.length),h<=0?p=p.left:p=p.right}return c.length=k,new M(this,c)},g.gt=function(d){for(var _=this._compare,p=this.root,c=[],k=0;p;){var h=_(d,p.key);c.push(p),h<0&&(k=c.length),h<0?p=p.left:p=p.right}return c.length=k,new M(this,c)},g.lt=function(d){for(var _=this._compare,p=this.root,c=[],k=0;p;){var h=_(d,p.key);c.push(p),h>0&&(k=c.length),h<=0?p=p.left:p=p.right}return c.length=k,new M(this,c)},g.le=function(d){for(var _=this._compare,p=this.root,c=[],k=0;p;){var h=_(d,p.key);c.push(p),h>=0&&(k=c.length),h<0?p=p.left:p=p.right}return c.length=k,new M(this,c)},g.find=function(d){for(var _=this._compare,p=this.root,c=[];p;){var k=_(d,p.key);if(c.push(p),k===0)return new M(this,c);k<=0?p=p.left:p=p.right}return new M(this,[])},g.remove=function(d){var _=this.find(d);return _?_.remove():this},g.get=function(d){for(var _=this._compare,p=this.root;p;){var c=_(d,p.key);if(c===0)return p.value;c<=0?p=p.left:p=p.right}};function M(d,_){this.tree=d,this._stack=_}var m=M.prototype;Object.defineProperty(m,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(m,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),m.clone=function(){return new M(this.tree,this._stack.slice())};function A(d,_){d.key=_.key,d.value=_.value,d.left=_.left,d.right=_.right,d._color=_._color,d._count=_._count}function S(d){for(var _,p,c,k,h=d.length-1;h>=0;--h){if(_=d[h],h===0){_._color=i;return}if(p=d[h-1],p.left===_){if(c=p.right,c.right&&c.right._color===o){if(c=p.right=u(c),k=c.right=u(c.right),p.right=c.left,c.left=p,c.right=k,c._color=p._color,_._color=i,p._color=i,k._color=i,f(p),f(c),h>1){var R=d[h-2];R.left===p?R.left=c:R.right=c}d[h-1]=c;return}else if(c.left&&c.left._color===o){if(c=p.right=u(c),k=c.left=u(c.left),p.right=k.left,c.left=k.right,k.left=p,k.right=c,k._color=p._color,p._color=i,c._color=i,_._color=i,f(p),f(c),f(k),h>1){var R=d[h-2];R.left===p?R.left=k:R.right=k}d[h-1]=k;return}if(c._color===i)if(p._color===o){p._color=i,p.right=s(o,c);return}else{p.right=s(o,c);continue}else{if(c=u(c),p.right=c.left,c.left=p,c._color=p._color,p._color=o,f(p),f(c),h>1){var R=d[h-2];R.left===p?R.left=c:R.right=c}d[h-1]=c,d[h]=p,h+11){var R=d[h-2];R.right===p?R.right=c:R.left=c}d[h-1]=c;return}else if(c.right&&c.right._color===o){if(c=p.left=u(c),k=c.right=u(c.right),p.left=k.right,c.right=k.left,k.right=p,k.left=c,k._color=p._color,p._color=i,c._color=i,_._color=i,f(p),f(c),f(k),h>1){var R=d[h-2];R.right===p?R.right=k:R.left=k}d[h-1]=k;return}if(c._color===i)if(p._color===o){p._color=i,p.left=s(o,c);return}else{p.left=s(o,c);continue}else{if(c=u(c),p.left=c.right,c.right=p,c._color=p._color,p._color=o,f(p),f(c),h>1){var R=d[h-2];R.right===p?R.right=c:R.left=c}d[h-1]=c,d[h]=p,h+1=0;--c){var p=d[c];p.left===d[c+1]?_[c]=new l(p._color,p.key,p.value,_[c+1],p.right,p._count):_[c]=new l(p._color,p.key,p.value,p.left,_[c+1],p._count)}if(p=_[_.length-1],p.left&&p.right){var k=_.length;for(p=p.left;p.right;)_.push(p),p=p.right;var h=_[k-1];_.push(new l(p._color,h.key,h.value,p.left,p.right,p._count)),_[k-1].key=p.key,_[k-1].value=p.value;for(var c=_.length-2;c>=k;--c)p=_[c],_[c]=new l(p._color,p.key,p.value,p.left,_[c+1],p._count);_[k-1].left=_[k]}if(p=_[_.length-1],p._color===o){var R=_[_.length-2];R.left===p?R.left=null:R.right===p&&(R.right=null),_.pop();for(var c=0;c<_.length;++c)_[c]._count--;return new v(this.tree._compare,_[0])}else if(p.left||p.right){p.left?A(p,p.left):p.right&&A(p,p.right),p._color=i;for(var c=0;c<_.length-1;++c)_[c]._count--;return new v(this.tree._compare,_[0])}else{if(_.length===1)return new v(this.tree._compare,null);for(var c=0;c<_.length;++c)_[c]._count--;var E=_[_.length-2];S(_),E.left===p?E.left=null:E.right=null}return new v(this.tree._compare,_[0])},Object.defineProperty(m,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(m,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(m,"index",{get:function(){var d=0,_=this._stack;if(_.length===0){var p=this.tree.root;return p?p._count:0}else _[_.length-1].left&&(d=_[_.length-1].left._count);for(var c=_.length-2;c>=0;--c)_[c+1]===_[c].right&&(++d,_[c].left&&(d+=_[c].left._count));return d},enumerable:!0}),m.next=function(){var d=this._stack;if(d.length!==0){var _=d[d.length-1];if(_.right)for(_=_.right;_;)d.push(_),_=_.left;else for(d.pop();d.length>0&&d[d.length-1].right===_;)_=d[d.length-1],d.pop()}},Object.defineProperty(m,"hasNext",{get:function(){var d=this._stack;if(d.length===0)return!1;if(d[d.length-1].right)return!0;for(var _=d.length-1;_>0;--_)if(d[_-1].left===d[_])return!0;return!1}}),m.update=function(d){var _=this._stack;if(_.length===0)throw new Error("Can't update empty node!");var p=new Array(_.length),c=_[_.length-1];p[p.length-1]=new l(c._color,c.key,d,c.left,c.right,c._count);for(var k=_.length-2;k>=0;--k)c=_[k],c.left===_[k+1]?p[k]=new l(c._color,c.key,c.value,p[k+1],c.right,c._count):p[k]=new l(c._color,c.key,c.value,c.left,p[k+1],c._count);return new v(this.tree._compare,p[0])},m.prev=function(){var d=this._stack;if(d.length!==0){var _=d[d.length-1];if(_.left)for(_=_.left;_;)d.push(_),_=_.right;else for(d.pop();d.length>0&&d[d.length-1].left===_;)_=d[d.length-1],d.pop()}},Object.defineProperty(m,"hasPrev",{get:function(){var d=this._stack;if(d.length===0)return!1;if(d[d.length-1].left)return!0;for(var _=d.length-1;_>0;--_)if(d[_-1].right===d[_])return!0;return!1}});function x(d,_){return d<_?-1:d>_?1:0}function T(d){return new v(d||x,null)}},3837:function(a,o,i){"use strict";a.exports=E;var l=i(4935),u=i(501),s=i(5304),f=i(6429),v=i(6444),g=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),b=ArrayBuffer,y=DataView;function w(D){return b.isView(D)&&!(D instanceof y)}function M(D){return Array.isArray(D)||w(D)}function m(D,N){return D[0]=N[0],D[1]=N[1],D[2]=N[2],D}function A(D){this.gl=D,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=s(D)}var S=A.prototype;S.update=function(D){D=D||{};function N(Q,oe,ee){if(ee in D){var G=D[ee],re=this[ee],H;(Q?M(G)&&M(G[0]):M(G))?this[ee]=H=[oe(G[0]),oe(G[1]),oe(G[2])]:this[ee]=H=[oe(G),oe(G),oe(G)];for(var te=0;te<3;++te)if(H[te]!==re[te])return!0}return!1}var I=N.bind(this,!1,Number),F=N.bind(this,!1,Boolean),L=N.bind(this,!1,String),P=N.bind(this,!0,function(Q){if(M(Q)){if(Q.length===3)return[+Q[0],+Q[1],+Q[2],1];if(Q.length===4)return[+Q[0],+Q[1],+Q[2],+Q[3]]}return[0,0,0,1]}),O,U=!1,X=!1;if("bounds"in D)for(var j=D.bounds,$=0;$<2;++$)for(var Y=0;Y<3;++Y)j[$][Y]!==this.bounds[$][Y]&&(X=!0),this.bounds[$][Y]=j[$][Y];if("ticks"in D){O=D.ticks,U=!0,this.autoTicks=!1;for(var $=0;$<3;++$)this.tickSpacing[$]=0}else I("tickSpacing")&&(this.autoTicks=!0,X=!0);if(this._firstInit&&("ticks"in D||"tickSpacing"in D||(this.autoTicks=!0),X=!0,U=!0,this._firstInit=!1),X&&this.autoTicks&&(O=v.create(this.bounds,this.tickSpacing),U=!0),U){for(var $=0;$<3;++$)O[$].sort(function(oe,ee){return oe.x-ee.x});v.equal(O,this.ticks)?U=!1:this.ticks=O}F("tickEnable"),L("tickFont")&&(U=!0),L("tickFontStyle")&&(U=!0),L("tickFontWeight")&&(U=!0),L("tickFontVariant")&&(U=!0),I("tickSize"),I("tickAngle"),I("tickPad"),P("tickColor");var q=L("labels");L("labelFont")&&(q=!0),L("labelFontStyle")&&(q=!0),L("labelFontWeight")&&(q=!0),L("labelFontVariant")&&(q=!0),F("labelEnable"),I("labelSize"),I("labelPad"),P("labelColor"),F("lineEnable"),F("lineMirror"),I("lineWidth"),P("lineColor"),F("lineTickEnable"),F("lineTickMirror"),I("lineTickLength"),I("lineTickWidth"),P("lineTickColor"),F("gridEnable"),I("gridWidth"),P("gridColor"),F("zeroEnable"),P("zeroLineColor"),I("zeroLineWidth"),F("backgroundEnable"),P("backgroundColor");var Z=[{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]}],ne=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(q||U)&&this._text.update(this.bounds,this.labels,Z,this.ticks,ne):this._text=l(this.gl,this.bounds,this.labels,Z,this.ticks,ne),this._lines&&U&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function x(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var T=[new x,new x,new x];function d(D,N,I,F,L){for(var P=D.primalOffset,O=D.primalMinor,U=D.mirrorOffset,X=D.mirrorMinor,j=F[N],$=0;$<3;++$)if(N!==$){var Y=P,q=U,Z=O,ne=X;j&1<<$&&(Y=U,q=P,Z=X,ne=O),Y[$]=I[0][$],q[$]=I[1][$],L[$]>0?(Z[$]=-1,ne[$]=0):(Z[$]=0,ne[$]=1)}}var _=[0,0,0],p={model:g,view:g,projection:g,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(D){};var c=0,k=[0,0,0],h=[0,0,0],R=[0,0,0];S.draw=function(D){D=D||p;for(var ee=this.gl,N=D.model||g,I=D.view||g,F=D.projection||g,L=this.bounds,P=D._ortho||!1,O=f(N,I,F,L,P),U=O.cubeEdges,X=O.axis,j=I[12],$=I[13],Y=I[14],q=I[15],Z=P?2:1,ne=Z*this.pixelRatio*(F[3]*j+F[7]*$+F[11]*Y+F[15]*q)/ee.drawingBufferHeight,Q=0;Q<3;++Q)this.lastCubeProps.cubeEdges[Q]=U[Q],this.lastCubeProps.axis[Q]=X[Q];for(var oe=T,Q=0;Q<3;++Q)d(T[Q],Q,this.bounds,U,X);for(var ee=this.gl,G=_,Q=0;Q<3;++Q)this.backgroundEnable[Q]?G[Q]=X[Q]:G[Q]=0;this._background.draw(N,I,F,L,G,this.backgroundColor),this._lines.bind(N,I,F,this);for(var Q=0;Q<3;++Q){var re=[0,0,0];X[Q]>0?re[Q]=L[1][Q]:re[Q]=L[0][Q];for(var H=0;H<2;++H){var te=(Q+1+H)%3,ue=(Q+1+(H^1))%3;this.gridEnable[te]&&this._lines.drawGrid(te,ue,this.bounds,re,this.gridColor[te],this.gridWidth[te]*this.pixelRatio)}for(var H=0;H<2;++H){var te=(Q+1+H)%3,ue=(Q+1+(H^1))%3;this.zeroEnable[ue]&&Math.min(L[0][ue],L[1][ue])<=0&&Math.max(L[0][ue],L[1][ue])>=0&&this._lines.drawZero(te,ue,this.bounds,re,this.zeroLineColor[ue],this.zeroLineWidth[ue]*this.pixelRatio)}}for(var Q=0;Q<3;++Q){this.lineEnable[Q]&&this._lines.drawAxisLine(Q,this.bounds,oe[Q].primalOffset,this.lineColor[Q],this.lineWidth[Q]*this.pixelRatio),this.lineMirror[Q]&&this._lines.drawAxisLine(Q,this.bounds,oe[Q].mirrorOffset,this.lineColor[Q],this.lineWidth[Q]*this.pixelRatio);for(var de=m(k,oe[Q].primalMinor),Ee=m(h,oe[Q].mirrorMinor),Me=this.lineTickLength,H=0;H<3;++H){var ve=ne/N[5*H];de[H]*=Me[H]*ve,Ee[H]*=Me[H]*ve}this.lineTickEnable[Q]&&this._lines.drawAxisTicks(Q,oe[Q].primalOffset,de,this.lineTickColor[Q],this.lineTickWidth[Q]*this.pixelRatio),this.lineTickMirror[Q]&&this._lines.drawAxisTicks(Q,oe[Q].mirrorOffset,Ee,this.lineTickColor[Q],this.lineTickWidth[Q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(N,I,F,this.pixelRatio);var Ae,ke=.5,De,Ce;function Oe(Le){Ce=[0,0,0],Ce[Le]=1}function Ue(Le,me,he){var be=(Le+1)%3,Se=(Le+2)%3,ze=me[be],Fe=me[Se],Je=he[be],Ye=he[Se];if(ze>0&&Ye>0){Oe(be);return}else if(ze>0&&Ye<0){Oe(be);return}else if(ze<0&&Ye>0){Oe(be);return}else if(ze<0&&Ye<0){Oe(be);return}else if(Fe>0&&Je>0){Oe(Se);return}else if(Fe>0&&Je<0){Oe(Se);return}else if(Fe<0&&Je>0){Oe(Se);return}else if(Fe<0&&Je<0){Oe(Se);return}}for(var Q=0;Q<3;++Q){for(var ge=oe[Q].primalMinor,Te=oe[Q].mirrorMinor,ce=m(R,oe[Q].primalOffset),H=0;H<3;++H)this.lineTickEnable[Q]&&(ce[H]+=ne*ge[H]*Math.max(this.lineTickLength[H],0)/N[5*H]);var ye=[0,0,0];if(ye[Q]=1,this.tickEnable[Q]){this.tickAngle[Q]===-3600?(this.tickAngle[Q]=0,this.tickAlign[Q]="auto"):this.tickAlign[Q]=-1,De=1,Ae=[this.tickAlign[Q],ke,De],Ae[0]==="auto"?Ae[0]=c:Ae[0]=parseInt(""+Ae[0]),Ce=[0,0,0],Ue(Q,ge,Te);for(var H=0;H<3;++H)ce[H]+=ne*ge[H]*this.tickPad[H]/N[5*H];this._text.drawTicks(Q,this.tickSize[Q],this.tickAngle[Q],ce,this.tickColor[Q],ye,Ce,Ae)}if(this.labelEnable[Q]){De=0,Ce=[0,0,0],this.labels[Q].length>4&&(Oe(Q),De=1),Ae=[this.labelAlign[Q],ke,De],Ae[0]==="auto"?Ae[0]=c:Ae[0]=parseInt(""+Ae[0]);for(var H=0;H<3;++H)ce[H]+=ne*ge[H]*this.labelPad[H]/N[5*H];ce[Q]+=.5*(L[0][Q]+L[1][Q]),this._text.drawLabel(Q,this.labelSize[Q],this.labelAngle[Q],ce,this.labelColor[Q],[0,0,0],Ce,Ae)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function E(D,N){var I=new A(D);return I.update(N),I}},5304:function(a,o,i){"use strict";a.exports=g;var l=i(2762),u=i(8116),s=i(1879).bg;function f(b,y,w,M){this.gl=b,this.buffer=y,this.vao=w,this.shader=M}var v=f.prototype;v.draw=function(b,y,w,M,m,A){for(var S=!1,x=0;x<3;++x)S=S||m[x];if(S){var T=this.gl;T.enable(T.POLYGON_OFFSET_FILL),T.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:b,view:y,projection:w,bounds:M,enable:m,colors:A},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),T.disable(T.POLYGON_OFFSET_FILL)}},v.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function g(b){for(var y=[],w=[],M=0,m=0;m<3;++m)for(var A=(m+1)%3,S=(m+2)%3,x=[0,0,0],T=[0,0,0],d=-1;d<=1;d+=2){w.push(M,M+2,M+1,M+1,M+2,M+3),x[m]=d,T[m]=d;for(var _=-1;_<=1;_+=2){x[A]=_;for(var p=-1;p<=1;p+=2)x[S]=p,y.push(x[0],x[1],x[2],T[0],T[1],T[2]),M+=1}var c=A;A=S,S=c}var k=l(b,new Float32Array(y)),h=l(b,new Uint16Array(w),b.ELEMENT_ARRAY_BUFFER),R=u(b,[{buffer:k,type:b.FLOAT,size:3,offset:0,stride:24},{buffer:k,type:b.FLOAT,size:3,offset:12,stride:24}],h),E=s(b);return E.attributes.position.location=0,E.attributes.normal.location=1,new f(b,k,R,E)}},6429:function(a,o,i){"use strict";a.exports=d;var l=i(8828),u=i(6760),s=i(5202),f=i(3250),v=new Array(16),g=new Array(8),b=new Array(8),y=new Array(3),w=[0,0,0];(function(){for(var _=0;_<8;++_)g[_]=[1,1,1,1],b[_]=[1,1,1]})();function M(_,p,c){for(var k=0;k<4;++k){_[k]=c[12+k];for(var h=0;h<3;++h)_[k]+=p[h]*c[4*h+k]}}var m=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function A(_){for(var p=0;pX&&(I|=1<X){I|=1<b[E][1])&&(oe=E);for(var ee=-1,E=0;E<3;++E){var G=oe^1<b[re][0]&&(re=G)}}var H=S;H[0]=H[1]=H[2]=0,H[l.log2(ee^oe)]=oe&ee,H[l.log2(oe^re)]=oe&re;var te=re^7;te===I||te===Q?(te=ee^7,H[l.log2(re^te)]=te&re):H[l.log2(ee^te)]=teⅇfor(var ue=x,de=I,P=0;P<3;++P)de&1<{"use strict";f6.exports=function(r){return r}});var Dp=pe(Ki=>{"use strict";var YH=rt(),WH=Al(),XH=Lp(),ZH=nn().BADNUM,Rp=1e-9;Ki.findBin=function(e,r,t){if(YH(r.start))return t?Math.ceil((e-r.start)/r.size-Rp)-1:Math.floor((e-r.start)/r.size+Rp);var n=0,a=r.length,o=0,i=a>1?(r[a-1]-r[0])/(a-1):1,l,u;for(i>=0?u=t?JH:KH:u=t?$H:QH,e+=i*Rp*(t?-1:1)*(i>=0?1:-1);n90&&WH.log("Long binary search..."),n-1};function JH(e,r){return er}function $H(e,r){return e>=r}Ki.sorterAsc=function(e,r){return e-r};Ki.sorterDes=function(e,r){return r-e};Ki.distinctVals=function(e){var r=e.slice();r.sort(Ki.sorterAsc);var t;for(t=r.length-1;t>-1&&r[t]===ZH;t--);for(var n=r[t]-r[0]||1,a=n/(t||1)/1e4,o=[],i,l=0;l<=t;l++){var u=r[l],s=u-i;i===void 0?(o.push(u),i=u):s>a&&(n=Math.min(n,s),o.push(u),i=u)}return{vals:o,minDiff:n}};Ki.roundUp=function(e,r,t){for(var n=0,a=r.length-1,o,i=0,l=t?0:1,u=t?1:0,s=t?Math.ceil:Math.floor;n0&&(n=1),t&&n)return e.sort(r)}return n?e:e.reverse()};Ki.findIndexOfMin=function(e,r){r=r||XH;for(var t=1/0,n,a=0;a{"use strict";c6.exports=function(r){return Object.keys(r).sort()}});var v6=pe(Vt=>{"use strict";var df=rt(),jH=ea().isArrayOrTypedArray;Vt.aggNums=function(e,r,t,n){var a,o;if((!n||n>t.length)&&(n=t.length),df(r)||(r=!1),jH(t[0])){for(o=new Array(n),a=0;ae.length-1)return e[e.length-1];var t=r%1;return t*e[Math.ceil(r)]+(1-t)*e[Math.floor(r)]}});var y6=pe((y0e,g6)=>{"use strict";var h6=Cs(),Pp=h6.mod,eV=h6.modHalf,pf=Math.PI,Lo=2*pf;function rV(e){return e/180*pf}function tV(e){return e/pf*180}function Fp(e){return Math.abs(e[1]-e[0])>Lo-1e-14}function d6(e,r){return eV(r-e,Lo)}function nV(e,r){return Math.abs(d6(e,r))}function p6(e,r){if(Fp(r))return!0;var t,n;r[0]n&&(n+=Lo);var a=Pp(e,Lo),o=a+Lo;return a>=t&&a<=n||o>=t&&o<=n}function aV(e,r,t,n){if(!p6(r,n))return!1;var a,o;return t[0]=a&&e<=o}function Ip(e,r,t,n,a,o,i){a=a||0,o=o||0;var l=Fp([t,n]),u,s,f,v,g;l?(u=0,s=pf,f=Lo):t{"use strict";Sl.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3};Sl.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3};Sl.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3};Sl.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3};Sl.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3};Sl.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}});var _6=pe(Cl=>{"use strict";var Np=Cs().mod;Cl.segmentsIntersect=b6;function b6(e,r,t,n,a,o,i,l){var u=t-e,s=a-e,f=i-a,v=n-r,g=o-r,_=l-o,y=u*_-f*v;if(y===0)return null;var w=(s*_-f*g)/y,M=(s*v-u*g)/y;return M<0||M>1||w<0||w>1?null:{x:e+u*w,y:r+v*w}}Cl.segmentDistance=function(r,t,n,a,o,i,l,u){if(b6(r,t,n,a,o,i,l,u))return 0;var s=n-r,f=a-t,v=l-o,g=u-i,_=s*s+f*f,y=v*v+g*g,w=Math.min(Xc(s,f,_,o-r,i-t),Xc(s,f,_,l-r,u-t),Xc(v,g,y,r-o,t-i),Xc(v,g,y,n-o,a-i));return Math.sqrt(w)};function Xc(e,r,t,n,a){var o=n*e+a*r;if(o<0)return n*n+a*a;if(o>t){var i=n-e,l=a-r;return i*i+l*l}else{var u=n*r-a*e;return u*u/t}}var Zc,zp,x6;Cl.getTextLocation=function(r,t,n,a){if((r!==zp||a!==x6)&&(Zc={},zp=r,x6=a),Zc[n])return Zc[n];var o=r.getPointAtLength(Np(n-a/2,t)),i=r.getPointAtLength(Np(n+a/2,t)),l=Math.atan((i.y-o.y)/(i.x-o.x)),u=r.getPointAtLength(Np(n,t)),s=(u.x*4+o.x+i.x)/6,f=(u.y*4+o.y+i.y)/6,v={x:s,y:f,theta:l};return Zc[n]=v,v};Cl.clearLocationCache=function(){zp=null};Cl.getVisibleSegment=function(r,t,n){var a=t.left,o=t.right,i=t.top,l=t.bottom,u=0,s=r.getTotalLength(),f=s,v,g;function _(w){var M=r.getPointAtLength(w);w===0?v=M:w===s&&(g=M);var m=M.xo?M.x-o:0,k=M.yl?M.y-l:0;return Math.sqrt(m*m+k*k)}for(var y=_(u);y;){if(u+=y+n,u>f)return;y=_(u)}for(y=_(f);y;){if(f-=y+n,u>f)return;y=_(f)}return{min:u,max:f,len:f-u,total:s,isClosed:u===0&&f===s&&Math.abs(v.x-g.x)<.1&&Math.abs(v.y-g.y)<.1}};Cl.findPointOnPath=function(r,t,n,a){a=a||{};for(var o=a.pathLength||r.getTotalLength(),i=a.tolerance||.001,l=a.iterationLimit||30,u=r.getPointAtLength(0)[n]>r.getPointAtLength(o)[n]?-1:1,s=0,f=0,v=o,g,_,y;s0?v=g:f=g,s++}return _}});var Jc=pe(gf=>{"use strict";var Qi={};gf.throttle=function(r,t,n){var a=Qi[r],o=Date.now();if(!a){for(var i in Qi)Qi[i].tsa.ts+t){l();return}a.timer=setTimeout(function(){l(),a.timer=null},t)};gf.done=function(e){var r=Qi[e];return!r||!r.timer?Promise.resolve():new Promise(function(t){var n=r.onDone;r.onDone=function(){n&&n(),t(),r.onDone=null}})};gf.clear=function(e){if(e)w6(Qi[e]),delete Qi[e];else for(var r in Qi)gf.clear(r)};function w6(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var T6=pe((_0e,M6)=>{"use strict";M6.exports=function(r){r._responsiveChartHandler&&(window.removeEventListener("resize",r._responsiveChartHandler),delete r._responsiveChartHandler)}});var A6=pe((w0e,Kc)=>{"use strict";Kc.exports=qp;Kc.exports.isMobile=qp;Kc.exports.default=qp;var sV=/(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,uV=/CrOS/,fV=/android|ipad|playbook|silk/i;function qp(e){e||(e={});let r=e.ua;if(!r&&typeof navigator!="undefined"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let t=sV.test(r)&&!uV.test(r)||!!e.tablet&&fV.test(r);return!t&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(t=!0),t}});var S6=pe((M0e,k6)=>{"use strict";var cV=rt(),vV=A6();k6.exports=function(r){var t;if(r&&r.hasOwnProperty("userAgent")?t=r.userAgent:t=hV(),typeof t!="string")return!0;var n=vV({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var a=t.split(" "),o=1;o-1;l--){var u=a[l];if(u.substr(0,8)==="Version/"){var s=u.substr(8).split(".")[0];if(cV(s)&&(s=+s),s>=13)return!0}}}return n};function hV(){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 E6=pe((T0e,C6)=>{"use strict";var dV=it();C6.exports=function(r,t,n){var a=r.selectAll("g."+n.replace(/\s/g,".")).data(t,function(i){return i[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var o=r.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(i){i[0][o]=dV.select(this)}),a}});var R6=pe((A0e,L6)=>{"use strict";var pV=Er();L6.exports=function(r,t){for(var n=r._context.locale,a=0;a<2;a++){for(var o=r._context.locales,i=0;i<2;i++){var l=(o[n]||{}).dictionary;if(l){var u=l[t];if(u)return u}o=pV.localeRegistry}var s=n.split("-")[0];if(s===n)break;n=s}return t}});var P6=pe((k0e,D6)=>{"use strict";D6.exports=function(r){for(var t={},n=[],a=0,o=0;o{"use strict";F6.exports=function(r){for(var t=mV(r)?yV:gV,n=[],a=0;a{"use strict";N6.exports=function(r,t){if(!t)return r;var n=1/Math.abs(t),a=n>1?(n*r+n*t)/n:r+t,o=String(a).length;if(o>16){var i=String(t).length,l=String(r).length;if(o>=l+i){var u=parseFloat(a).toPrecision(12);u.indexOf("e+")===-1&&(a=+u)}}return a}});var O6=pe((E0e,q6)=>{"use strict";var xV=rt(),bV=nn().BADNUM,_V=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;q6.exports=function(r){return typeof r=="string"&&(r=r.replace(_V,"")),xV(r)?Number(r):bV}});var ir=pe((L0e,$6)=>{"use strict";var yf=it(),wV=ks().utcFormat,MV=op().format,Y6=rt(),W6=nn(),X6=W6.FP_SAFE,TV=-X6,B6=W6.BADNUM,Ze=$6.exports={};Ze.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:r==="0.f"?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var U6={};Ze.warnBadFormat=function(e){var r=String(e);U6[r]||(U6[r]=1,Ze.warn('encountered bad format: "'+r+'"'))};Ze.noFormat=function(e){return String(e)};Ze.numberFormat=function(e){var r;try{r=MV(Ze.adjustFormat(e))}catch(t){return Ze.warnBadFormat(e),Ze.noFormat}return r};Ze.nestedProperty=Mc();Ze.keyedContainer=Rb();Ze.relativeAttr=Pb();Ze.isPlainObject=wo();Ze.toLogRange=Ac();Ze.relinkPrivateKeys=zb();var Ro=ea();Ze.isArrayBuffer=Ro.isArrayBuffer;Ze.isTypedArray=Ro.isTypedArray;Ze.isArrayOrTypedArray=Ro.isArrayOrTypedArray;Ze.isArray1D=Ro.isArray1D;Ze.ensureArray=Ro.ensureArray;Ze.concat=Ro.concat;Ze.maxRowLength=Ro.maxRowLength;Ze.minRowLength=Ro.minRowLength;var Z6=Cs();Ze.mod=Z6.mod;Ze.modHalf=Z6.modHalf;var Do=t4();Ze.valObjectMeta=Do.valObjectMeta;Ze.coerce=Do.coerce;Ze.coerce2=Do.coerce2;Ze.coerceFont=Do.coerceFont;Ze.coercePattern=Do.coercePattern;Ze.coerceHoverinfo=Do.coerceHoverinfo;Ze.coerceSelectionMarkerOpacity=Do.coerceSelectionMarkerOpacity;Ze.validate=Do.validate;var da=u6();Ze.dateTime2ms=da.dateTime2ms;Ze.isDateTime=da.isDateTime;Ze.ms2DateTime=da.ms2DateTime;Ze.ms2DateTimeLocal=da.ms2DateTimeLocal;Ze.cleanDate=da.cleanDate;Ze.isJSDate=da.isJSDate;Ze.formatDate=da.formatDate;Ze.incrementMonth=da.incrementMonth;Ze.dateTick0=da.dateTick0;Ze.dfltRange=da.dfltRange;Ze.findExactDates=da.findExactDates;Ze.MIN_MS=da.MIN_MS;Ze.MAX_MS=da.MAX_MS;var El=Dp();Ze.findBin=El.findBin;Ze.sorterAsc=El.sorterAsc;Ze.sorterDes=El.sorterDes;Ze.distinctVals=El.distinctVals;Ze.roundUp=El.roundUp;Ze.sort=El.sort;Ze.findIndexOfMin=El.findIndexOfMin;Ze.sortObjectKeys=Wc();var $i=v6();Ze.aggNums=$i.aggNums;Ze.len=$i.len;Ze.mean=$i.mean;Ze.geometricMean=$i.geometricMean;Ze.median=$i.median;Ze.midRange=$i.midRange;Ze.variance=$i.variance;Ze.stdev=$i.stdev;Ze.interp=$i.interp;var Ka=Ic();Ze.init2dArray=Ka.init2dArray;Ze.transposeRagged=Ka.transposeRagged;Ze.dot=Ka.dot;Ze.translationMatrix=Ka.translationMatrix;Ze.rotationMatrix=Ka.rotationMatrix;Ze.rotationXYMatrix=Ka.rotationXYMatrix;Ze.apply3DTransform=Ka.apply3DTransform;Ze.apply2DTransform=Ka.apply2DTransform;Ze.apply2DTransform2=Ka.apply2DTransform2;Ze.convertCssMatrix=Ka.convertCssMatrix;Ze.inverseTransformMatrix=Ka.inverseTransformMatrix;var ki=y6();Ze.deg2rad=ki.deg2rad;Ze.rad2deg=ki.rad2deg;Ze.angleDelta=ki.angleDelta;Ze.angleDist=ki.angleDist;Ze.isFullCircle=ki.isFullCircle;Ze.isAngleInsideSector=ki.isAngleInsideSector;Ze.isPtInsideSector=ki.isPtInsideSector;Ze.pathArc=ki.pathArc;Ze.pathSector=ki.pathSector;Ze.pathAnnulus=ki.pathAnnulus;var qs=m6();Ze.isLeftAnchor=qs.isLeftAnchor;Ze.isCenterAnchor=qs.isCenterAnchor;Ze.isRightAnchor=qs.isRightAnchor;Ze.isTopAnchor=qs.isTopAnchor;Ze.isMiddleAnchor=qs.isMiddleAnchor;Ze.isBottomAnchor=qs.isBottomAnchor;var Os=_6();Ze.segmentsIntersect=Os.segmentsIntersect;Ze.segmentDistance=Os.segmentDistance;Ze.getTextLocation=Os.getTextLocation;Ze.clearLocationCache=Os.clearLocationCache;Ze.getVisibleSegment=Os.getVisibleSegment;Ze.findPointOnPath=Os.findPointOnPath;var jc=Mt();Ze.extendFlat=jc.extendFlat;Ze.extendDeep=jc.extendDeep;Ze.extendDeepAll=jc.extendDeepAll;Ze.extendDeepNoArrays=jc.extendDeepNoArrays;var Op=Al();Ze.log=Op.log;Ze.warn=Op.warn;Ze.error=Op.error;var AV=Es();Ze.counterRegex=AV.counter;var Bp=Jc();Ze.throttle=Bp.throttle;Ze.throttleDone=Bp.done;Ze.clearThrottle=Bp.clear;var Qa=ff();Ze.getGraphDiv=Qa.getGraphDiv;Ze.isPlotDiv=Qa.isPlotDiv;Ze.removeElement=Qa.removeElement;Ze.addStyleRule=Qa.addStyleRule;Ze.addRelatedStyleRule=Qa.addRelatedStyleRule;Ze.deleteRelatedStyleRule=Qa.deleteRelatedStyleRule;Ze.setStyleOnHover=Qa.setStyleOnHover;Ze.getFullTransformMatrix=Qa.getFullTransformMatrix;Ze.getElementTransformMatrix=Qa.getElementTransformMatrix;Ze.getElementAndAncestors=Qa.getElementAndAncestors;Ze.equalDomRects=Qa.equalDomRects;Ze.clearResponsive=T6();Ze.preserveDrawingBuffer=S6();Ze.makeTraceGroups=E6();Ze._=R6();Ze.notifier=yp();Ze.filterUnique=P6();Ze.filterVisible=I6();Ze.pushUnique=bp();Ze.increment=z6();Ze.cleanNumber=O6();Ze.ensureNumber=function(r){return Y6(r)?(r=Number(r),r>X6||r=r?!1:Y6(e)&&e>=0&&e%1===0};Ze.noop=Fc();Ze.identity=Lp();Ze.repeat=function(e,r){for(var t=new Array(r),n=0;nt?Math.max(t,Math.min(r,e)):Math.max(r,Math.min(t,e))};Ze.bBoxIntersect=function(e,r,t){return t=t||0,e.left<=r.right+t&&r.left<=e.right+t&&e.top<=r.bottom+t&&r.top<=e.bottom+t};Ze.simpleMap=function(e,r,t,n,a){for(var o=e.length,i=new Array(o),l=0;l=Math.pow(2,t)?a>10?(Ze.warn("randstr failed uniqueness"),i):e(r,t,n,(a||0)+1):i};Ze.OptionControl=function(e,r){e||(e={}),r||(r="opt");var t={};return t.optionList=[],t._newoption=function(n){n[r]=e,t[n.name]=n,t.optionList.push(n)},t["_"+r]=e,t};Ze.smooth=function(e,r){if(r=Math.round(r)||0,r<2)return e;var t=e.length,n=2*t,a=2*r-1,o=new Array(a),i=new Array(t),l,u,s,f;for(l=0;l=n&&(s-=n*Math.floor(s/n)),s<0?s=-1-s:s>=t&&(s=n-1-s),f+=e[s]*o[u];i[l]=f}return i};Ze.syncOrAsync=function(e,r,t){var n,a;function o(){return Ze.syncOrAsync(e,r,t)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(r),n&&n.then)return n.then(o);return t&&t(r)};Ze.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};Ze.noneOrAll=function(e,r,t){if(e){var n=!1,a=!0,o,i;for(o=0;o0?a:0})};Ze.fillArray=function(e,r,t,n){if(n=n||Ze.identity,Ze.isArrayOrTypedArray(e))for(var a=0;a1?a+i[1]:"";if(o&&(i.length>1||l.length>4||t))for(;n.test(l);)l=l.replace(n,"$1"+o+"$2");return l+u};Ze.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Q6=/^\w*$/;Ze.templateString=function(e,r){var t={};return e.replace(Ze.TEMPLATE_STRING_REGEX,function(n,a){var o;return Q6.test(a)?o=r[a]:(t[a]=t[a]||Ze.nestedProperty(r,a).get,o=t[a]()),Ze.isValidTextValue(o)?o:""})};var RV={max:10,count:0,name:"hovertemplate"};Ze.hovertemplateString=function(){return Up.apply(RV,arguments)};var DV={max:10,count:0,name:"texttemplate"};Ze.texttemplateString=function(){return Up.apply(DV,arguments)};var PV=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function FV(e){var r=e.match(PV);return r?{key:r[1],op:r[2],number:Number(r[3])}:{key:e,op:null,number:null}}var IV={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ze.texttemplateStringForShapes=function(){return Up.apply(IV,arguments)};var H6=/^[:|\|]/;function Up(e,r,t){var n=this,a=arguments;r||(r={});var o={};return e.replace(Ze.TEMPLATE_STRING_REGEX,function(i,l,u){var s=l==="xother"||l==="yother",f=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",g=l==="xother_"||l==="yother_",_=s||f||g||v,y=l;(f||v)&&(y=y.substring(1)),(g||v)&&(y=y.substring(0,y.length-1));var w=null,M=null;if(n.parseMultDiv){var m=FV(y);y=m.key,w=m.op,M=m.number}var k;if(_){if(k=r[y],k===void 0)return""}else{var S,x;for(x=3;x=$c&&i<=V6,s=l>=$c&&l<=V6;if(u&&(n=10*n+i-$c),s&&(a=10*a+l-$c),!u||!s){if(n!==a)return n-a;if(i!==l)return i-l}}return a-n};var zs=2e9;Ze.seedPseudoRandom=function(){zs=2e9};Ze.pseudoRandom=function(){var e=zs;return zs=(69069*zs+1)%4294967296,Math.abs(zs-e)<429496729?Ze.pseudoRandom():zs/4294967296};Ze.fillText=function(e,r,t){var n=Array.isArray(t)?function(i){t.push(i)}:function(i){t.text=i},a=Ze.extractOption(e,r,"htx","hovertext");if(Ze.isValidTextValue(a))return n(a);var o=Ze.extractOption(e,r,"tx","text");if(Ze.isValidTextValue(o))return n(o)};Ze.isValidTextValue=function(e){return e||e===0};Ze.formatPercent=function(e,r){r=r||0;for(var t=(Math.round(100*e*Math.pow(10,r))*Math.pow(.1,r)).toFixed(r)+"%",n=0;n1&&(s=1):s=0,Ze.strTranslate(a-s*(t+i),o-s*(n+l))+Ze.strScale(s)+(u?"rotate("+u+(r?"":" "+t+" "+n)+")":"")};Ze.setTransormAndDisplay=function(e,r){e.attr("transform",Ze.getTextTransform(r)),e.style("display",r.scale?null:"none")};Ze.ensureUniformFontSize=function(e,r){var t=Ze.extendFlat({},r);return t.size=Math.max(r.size,e._fullLayout.uniformtext.minsize||0),t};Ze.join2=function(e,r,t){var n=e.length;return n>1?e.slice(0,-1).join(r)+t+e[n-1]:e.join(r)};Ze.bigFont=function(e){return Math.round(1.2*e)};var G6=Ze.getFirefoxVersion(),NV=G6!==null&&G6<86;Ze.getPositionFromD3Event=function(){return NV?[yf.event.layerX,yf.event.layerY]:[yf.event.offsetX,yf.event.offsetY]}});var rw=pe(()=>{"use strict";var zV=ir(),j6={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Hp in j6)ew=Hp.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),zV.addStyleRule(ew,j6[Hp]);var ew,Hp});var Vp=pe((P0e,tw)=>{tw.exports=!0});var Yp=pe((F0e,nw)=>{"use strict";var qV=Vp(),Gp;typeof window.matchMedia=="function"?Gp=!window.matchMedia("(hover: none)").matches:Gp=qV;nw.exports=Gp});var tv=pe((I0e,Wp)=>{"use strict";var Bs=typeof Reflect=="object"?Reflect:null,aw=Bs&&typeof Bs.apply=="function"?Bs.apply:function(r,t,n){return Function.prototype.apply.call(r,t,n)},ev;Bs&&typeof Bs.ownKeys=="function"?ev=Bs.ownKeys:Object.getOwnPropertySymbols?ev=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:ev=function(r){return Object.getOwnPropertyNames(r)};function OV(e){console&&console.warn&&console.warn(e)}var ow=Number.isNaN||function(r){return r!==r};function Tt(){Tt.init.call(this)}Wp.exports=Tt;Wp.exports.once=VV;Tt.EventEmitter=Tt;Tt.prototype._events=void 0;Tt.prototype._eventsCount=0;Tt.prototype._maxListeners=void 0;var iw=10;function rv(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Tt,"defaultMaxListeners",{enumerable:!0,get:function(){return iw},set:function(e){if(typeof e!="number"||e<0||ow(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");iw=e}});Tt.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};Tt.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||ow(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function lw(e){return e._maxListeners===void 0?Tt.defaultMaxListeners:e._maxListeners}Tt.prototype.getMaxListeners=function(){return lw(this)};Tt.prototype.emit=function(r){for(var t=[],n=1;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var u=o[r];if(u===void 0)return!1;if(typeof u=="function")aw(u,this,t);else for(var s=u.length,f=vw(u,s),n=0;n0&&i.length>a&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=r,l.count=i.length,OV(l)}return e}Tt.prototype.addListener=function(r,t){return sw(this,r,t,!1)};Tt.prototype.on=Tt.prototype.addListener;Tt.prototype.prependListener=function(r,t){return sw(this,r,t,!0)};function BV(){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 uw(e,r,t){var n={fired:!1,wrapFn:void 0,target:e,type:r,listener:t},a=BV.bind(n);return a.listener=t,n.wrapFn=a,a}Tt.prototype.once=function(r,t){return rv(t),this.on(r,uw(this,r,t)),this};Tt.prototype.prependOnceListener=function(r,t){return rv(t),this.prependListener(r,uw(this,r,t)),this};Tt.prototype.removeListener=function(r,t){var n,a,o,i,l;if(rv(t),a=this._events,a===void 0)return this;if(n=a[r],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete a[r],a.removeListener&&this.emit("removeListener",r,n.listener||t));else if(typeof n!="function"){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){l=n[i].listener,o=i;break}if(o<0)return this;o===0?n.shift():UV(n,o),n.length===1&&(a[r]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",r,l||t)}return this};Tt.prototype.off=Tt.prototype.removeListener;Tt.prototype.removeAllListeners=function(r){var t,n,a;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[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var o=Object.keys(n),i;for(a=0;a=0;a--)this.removeListener(r,t[a]);return this};function fw(e,r,t){var n=e._events;if(n===void 0)return[];var a=n[r];return a===void 0?[]:typeof a=="function"?t?[a.listener||a]:[a]:t?HV(a):vw(a,a.length)}Tt.prototype.listeners=function(r){return fw(this,r,!0)};Tt.prototype.rawListeners=function(r){return fw(this,r,!1)};Tt.listenerCount=function(e,r){return typeof e.listenerCount=="function"?e.listenerCount(r):cw.call(e,r)};Tt.prototype.listenerCount=cw;function cw(e){var r=this._events;if(r!==void 0){var t=r[e];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}Tt.prototype.eventNames=function(){return this._eventsCount>0?ev(this._events):[]};function vw(e,r){for(var t=new Array(r),n=0;n{"use strict";var Xp=tv().EventEmitter,YV={init:function(e){if(e._ev instanceof Xp)return e;var r=new Xp,t=new Xp;return e._ev=r,e._internalEv=t,e.on=r.on.bind(r),e.once=r.once.bind(r),e.removeListener=r.removeListener.bind(r),e.removeAllListeners=r.removeAllListeners.bind(r),e._internalOn=t.on.bind(t),e._internalOnce=t.once.bind(t),e._removeInternalListener=t.removeListener.bind(t),e._removeAllInternalListeners=t.removeAllListeners.bind(t),e.emit=function(n,a){r.emit(n,a),t.emit(n,a)},e},triggerHandler:function(e,r,t){var n,a=e._ev;if(!a)return;var o=a._events[r];if(!o)return;function i(u){if(u.listener){if(a.removeListener(r,u.listener),!u.fired)return u.fired=!0,u.listener.apply(a,[t])}else return u.apply(a,[t])}o=Array.isArray(o)?o:[o];var l;for(l=0;l{"use strict";var pw=ir(),WV=Tl().dfltConfig;function XV(e,r){for(var t=[],n,a=0;aWV.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};ji.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};ji.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};ji.undo=function(r){var t,n;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n=r.undoQueue.queue.length)){for(t=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n{"use strict";mw.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var Vs=pe(jt=>{"use strict";var Ea=Er(),xf=ir(),av=Sn(),Jp=Ds(),ZV=Zp(),JV=cf(),KV=Tl().configAttributes,xw=zn(),$a=xf.extendDeepAll,Us=xf.isPlainObject,QV=xf.isArrayOrTypedArray,iv=xf.nestedProperty,$V=xf.valObjectMeta,Kp="_isSubplotObj",ov="_isLinkedToArray",jV="_arrayAttrRegexps",_w="_deprecated",Qp=[Kp,ov,jV,_w];jt.IS_SUBPLOT_OBJ=Kp;jt.IS_LINKED_TO_ARRAY=ov;jt.DEPRECATED=_w;jt.UNDERSCORE_ATTRS=Qp;jt.get=function(){var e={};return Ea.allTypes.forEach(function(r){e[r]=rG(r)}),{defs:{valObjects:$V,metaKeys:Qp.concat(["description","role","editType","impliedEdits"]),editType:{traces:xw.traces,layout:xw.layout},impliedEdits:{}},traces:e,layout:tG(),frames:nG(),animation:Hs(JV),config:Hs(KV)}};jt.crawl=function(e,r,t,n){var a=t||0;n=n||"",Object.keys(e).forEach(function(o){var i=e[o];if(Qp.indexOf(o)===-1){var l=(n?n+".":"")+o;r(i,o,e,a,l),!jt.isValObject(i)&&Us(i)&&o!=="impliedEdits"&&jt.crawl(i,r,a+1,l)}})};jt.isValObject=function(e){return e&&e.valType!==void 0};jt.findArrayAttributes=function(e){var r=[],t=[],n=[],a,o;function i(u,s,f,v){t=t.slice(0,v).concat([s]),n=n.slice(0,v).concat([u&&u._isLinkedToArray]);var g=u&&(u.valType==="data_array"||u.arrayOk===!0)&&!(t[v-1]==="colorbar"&&(s==="ticktext"||s==="tickvals"));g&&l(a,0,"")}function l(u,s,f){var v=u[t[s]],g=f+t[s];if(s===t.length-1)QV(v)&&r.push(o+g);else if(n[s]){if(Array.isArray(v))for(var _=0;_=o.length)return!1;if(e.dimensions===2){if(t++,r.length===t)return e;var i=r[t];if(!nv(i))return!1;e=o[a][i]}else e=o[a]}else e=o}}return e}function nv(e){return e===Math.round(e)&&e>=0}function rG(e){var r,t;r=Ea.modules[e]._module,t=r.basePlotModule;var n={};n.type=null;var a=$a({},av),o=$a({},r.attributes);jt.crawl(o,function(u,s,f,v,g){iv(a,g).set(void 0),u===void 0&&iv(o,g).set(void 0)}),$a(n,a),Ea.traceIs(e,"noOpacity")&&delete n.opacity,Ea.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),Ea.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),r.selectPoints||delete n.selectedpoints,$a(n,o),t.attributes&&$a(n,t.attributes),n.type=e;var i={meta:r.meta||{},categories:r.categories||{},animatable:!!r.animatable,type:e,attributes:Hs(n)};if(r.layoutAttributes){var l={};$a(l,r.layoutAttributes),i.layoutAttributes=Hs(l)}return r.animatable||jt.crawl(i,function(u){jt.isValObject(u)&&"anim"in u&&delete u.anim}),i}function tG(){var e={},r,t;$a(e,Jp);for(r in Ea.subplotsRegistry)if(t=Ea.subplotsRegistry[r],!!t.layoutAttributes)if(Array.isArray(t.attr))for(var n=0;n{"use strict";var Gs=ir(),sG=Sn(),Po="templateitemname",$p={name:{valType:"string",editType:"none"}};$p[Po]={valType:"string",editType:"calc"};Ll.templatedArray=function(e,r){return r._isLinkedToArray=e,r.name=$p.name,r[Po]=$p[Po],r};Ll.traceTemplater=function(e){var r={},t,n;for(t in e)n=e[t],Array.isArray(n)&&n.length&&(r[t]=0);function a(o){t=Gs.coerce(o,{},sG,"type");var i={type:t,_template:null};if(t in r){n=e[t];var l=r[t]%n.length;r[t]++,i._template=n[l]}return i}return{newTrace:a}};Ll.newContainer=function(e,r,t){var n=e._template,a=n&&(n[r]||t&&n[t]);Gs.isPlainObject(a)||(a=null);var o=e[r]={_template:a};return o};Ll.arrayTemplater=function(e,r,t){var n=e._template,a=n&&n[Tw(r)],o=n&&n[r];(!Array.isArray(o)||!o.length)&&(o=[]);var i={};function l(s){var f={name:s.name,_input:s},v=f[Po]=s[Po];if(!Mw(v))return f._template=a,f;for(var g=0;g=n&&(t._input||{})._templateitemname;o&&(a=n);var i=r+"["+a+"]",l;function u(){l={},o&&(l[i]={},l[i][Po]=o)}u();function s(_,y){l[_]=y}function f(_,y){o?Gs.nestedProperty(l[i],_).set(y):l[i+"."+_]=y}function v(){var _=l;return u(),_}function g(_,y){_&&f(_,y);var w=v();for(var M in w)Gs.nestedProperty(e,M).set(w[M])}return{modifyBase:s,modifyItem:f,getUpdateObj:v,applyUpdate:g}}});var wn=pe((U0e,Aw)=>{"use strict";var bf=Es().counter;Aw.exports={idRegex:{x:bf("x","( domain)?"),y:bf("y","( domain)?")},attrRegex:bf("[xy]axis"),xAxisMatch:bf("xaxis"),yAxisMatch:bf("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 on=pe(aa=>{"use strict";var uG=Er(),jp=wn();aa.id2name=function(r){if(!(typeof r!="string"||!r.match(jp.AX_ID_PATTERN))){var t=r.split(" ")[0].substr(1);return t==="1"&&(t=""),r.charAt(0)+"axis"+t}};aa.name2id=function(r){if(r.match(jp.AX_NAME_PATTERN)){var t=r.substr(5);return t==="1"&&(t=""),r.charAt(0)+t}};aa.cleanId=function(r,t,n){var a=/( domain)$/.test(r);if(!(typeof r!="string"||!r.match(jp.AX_ID_PATTERN))&&!(t&&r.charAt(0)!==t)&&!(a&&!n)){var o=r.split(" ")[0].substr(1).replace(/^0+/,"");return o==="1"&&(o=""),r.charAt(0)+o+(a&&n?" domain":"")}};aa.list=function(e,r,t){var n=e._fullLayout;if(!n)return[];var a=aa.listIds(e,r),o=new Array(a.length),i;for(i=0;in?1:-1:+(e.substr(1)||1)-+(r.substr(1)||1)};aa.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function kw(e,r){if(r&&r.length){for(var t=0;t{"use strict";function fG(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".outline-controllers").remove()}function cG(e){var r=e._fullLayout._zoomlayer;r&&r.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Sw.exports={clearOutlineControllers:fG,clearOutline:cG}});var lv=pe((G0e,Cw)=>{"use strict";Cw.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var _f=pe(uv=>{"use strict";var sv=Er(),Y0e=wn().SUBPLOT_PATTERN;uv.getSubplotCalcData=function(e,r,t){var n=sv.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,o=[],i=0;i{"use strict";var vG=Er(),Ys=ir();Rl.manageCommandObserver=function(e,r,t,n){var a={},o=!0;r&&r._commandObserver&&(a=r._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var i=Rl.hasSimpleAPICommandBindings(e,t,a.lookupTable);if(r&&r._commandObserver){if(i)return a;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,a}if(i){Ew(e,i,a.cache),a.check=function(){if(o){var f=Ew(e,i,a.cache);return f.changed&&n&&a.lookupTable[f.value]!==void 0&&(a.disable(),Promise.resolve(n({value:f.value,type:i.type,prop:i.prop,traces:i.traces,index:a.lookupTable[f.value]})).then(a.enable,a.enable)),f.changed}};for(var l=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u0?".":"")+a;Ys.isPlainObject(o)?eg(o,r,i,n+1):r(i,a,o)}})}});var ln=pe((Z0e,Ww)=>{"use strict";var Ow=it(),dG=ks().timeFormatLocale,pG=op().formatLocale,wf=rt(),gG=lp(),ot=Er(),Bw=Vs(),yG=gt(),xr=ir(),Uw=Zr(),Pw=nn().BADNUM,ia=on(),mG=Fo().clearOutline,xG=lv(),rg=cf(),bG=Zp(),_G=_f().getModuleCalcData,Fw=xr.relinkPrivateKeys,Dl=xr._,cr=Ww.exports={};xr.extendFlat(cr,ot);cr.attributes=Sn();cr.attributes.type.values=cr.allTypes;cr.fontAttrs=kn();cr.layoutAttributes=Ds();var cv=Dw();cr.executeAPICommand=cv.executeAPICommand;cr.computeAPICommandBindings=cv.computeAPICommandBindings;cr.manageCommandObserver=cv.manageCommandObserver;cr.hasSimpleAPICommandBindings=cv.hasSimpleAPICommandBindings;cr.redrawText=function(e){return e=xr.getGraphDiv(e),new Promise(function(r){setTimeout(function(){e._fullLayout&&(ot.getComponentMethod("annotations","draw")(e),ot.getComponentMethod("legend","draw")(e),ot.getComponentMethod("colorbar","draw")(e),r(cr.previousPromises(e)))},300)})};cr.resize=function(e){e=xr.getGraphDiv(e);var r,t=new Promise(function(n,a){(!e||xr.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(r=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||xr.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var o=e.changed;e.autoplay=!0,ot.call("relayout",e,{autosize:!0}).then(function(){e.changed=o,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return r&&r(t),t};cr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};cr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var r=e._fullLayout,t=xr.ensureSingle(r._paper,"text","js-plot-link-container",function(u){u.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Uw.defaultLine,"pointer-events":"all"}).each(function(){var s=Ow.select(this);s.append("tspan").classed("js-link-to-tool",!0),s.append("tspan").classed("js-link-spacer",!0),s.append("tspan").classed("js-sourcelinks",!0)})}),n=t.node(),a={y:r._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=r.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=r._paper.attr("width")-7),t.attr(a);var o=t.select(".js-link-to-tool"),i=t.select(".js-link-spacer"),l=t.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&wG(e,o),i.text(o.text()&&l.text()?" - ":"")}};function wG(e,r){r.text("");var t=r.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)t.on("click",function(){cr.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),a=window.location.search;t.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}cr.sendDataToCloud=function(e){var r=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(r){e.emit("plotly_beforeexport");var t=Ow.select(e).append("div").attr("id","hiddenform").style("display","none"),n=t.append("form").attr({action:r+"/external",method:"post",target:"_blank"}),a=n.append("input").attr({type:"text",name:"data"});return a.node().value=cr.graphJson(e,!1,"keepdata"),n.node().submit(),t.remove(),e.emit("plotly_afterexport"),!1}};var MG=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],TG=["year","month","dayMonth","dayMonthYear"];cr.supplyDefaults=function(e,r){var t=r&&r.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},o=e.layout||{},i=e._fullData||[],l=e._fullData=[],u=e.data||[],s=e.calcdata||[],f=e._context||{},v;e._transitionData||cr.createTransitionData(e),a._dfltTitle={plot:Dl(e,"Click to enter Plot title"),subtitle:Dl(e,"Click to enter Plot subtitle"),x:Dl(e,"Click to enter X axis title"),y:Dl(e,"Click to enter Y axis title"),colorbar:Dl(e,"Click to enter Colorscale title"),annotation:Dl(e,"new text")},a._traceWord=Dl(e,"trace");var g=Iw(e,MG);if(a._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var _=n.width,y=n.height;cr.supplyLayoutGlobalDefaults(o,a,g),o.width||(a.width=_),o.height||(a.height=y),cr.sanitizeMargins(a)}else{cr.supplyLayoutGlobalDefaults(o,a,g);var w=!o.width||!o.height,M=a.autosize,m=f.autosizable,k=w&&(M||m);k?cr.plotAutoSize(e,o,a):w&&cr.sanitizeMargins(a),!M&&w&&(o.width=a.width,o.height=a.height)}a._d3locale=SG(g,a.separators),a._extraFormat=Iw(e,TG),a._initialAutoSizeIsDone=!0,a._dataLength=u.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var S=a._subplots=kG(),x=a._splomAxes={x:{},y:{}},T=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=AG(i,u),cr.supplyDataDefaults(u,l,o,a);var d=Object.keys(x.x),b=Object.keys(x.y);if(d.length>1&&b.length>1){for(ot.getComponentMethod("grid","sizeDefaults")(o,a),v=0;v15&&b.length>15&&a.shapes.length===0&&a.images.length===0,cr.linkSubplots(l,a,i,n),cr.cleanPlot(l,a,i,n);var R=!!(n._has&&n._has("cartesian")),E=!!(a._has&&a._has("cartesian")),D=R,N=E;D&&!N?n._bgLayer.remove():N&&!D&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&mG({_fullLayout:n}),CG(l,a),Fw(a,n),ot.getComponentMethod("colorscale","crossTraceDefaults")(l,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var I=a._tracePreGUI,F={},L;for(L in I)F[L]="old";for(v=0;v0){var f=1-2*o;i=Math.round(f*i),l=Math.round(f*l)}}var v=cr.layoutAttributes.width.min,g=cr.layoutAttributes.height.min;i1,y=!t.height&&Math.abs(n.height-l)>1;(y||_)&&(_&&(n.width=i),y&&(n.height=l)),r._initialAutoSize||(r._initialAutoSize={width:i,height:l}),cr.sanitizeMargins(n)};cr.supplyLayoutModuleDefaults=function(e,r,t,n){var a=ot.componentsRegistry,o=r._basePlotModules,i,l,u,s=ot.subplotsRegistry.cartesian;for(i in a)u=a[i],u.includeBasePlot&&u.includeBasePlot(e,r);o.length||o.push(s),r._has("cartesian")&&(ot.getComponentMethod("grid","contentDefaults")(e,r),s.finalizeSubplots(e,r));for(var f in r._subplots)r._subplots[f].sort(xr.subplotSort);for(l=0;l1&&(t.l/=M,t.r/=M)}if(g){var m=(t.t+t.b)/g;m>1&&(t.t/=m,t.b/=m)}var k=t.xl!==void 0?t.xl:t.x,S=t.xr!==void 0?t.xr:t.x,x=t.yt!==void 0?t.yt:t.y,T=t.yb!==void 0?t.yb:t.y;_[r]={l:{val:k,size:t.l+w},r:{val:S,size:t.r+w},b:{val:T,size:t.b+w},t:{val:x,size:t.t+w}},y[r]=1}if(!n._replotting)return cr.doAutoMargin(e)}};function LG(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var r=ia.list(e,"",!0);for(var t in r)if(r[t].autoshift||r[t].shift)return!0;return!1}cr.doAutoMargin=function(e){var r=e._fullLayout,t=r.width,n=r.height;r._size||(r._size={}),Hw(r);var a=r._size,o=r.margin,i={t:0,b:0,l:0,r:0},l=xr.extendFlat({},a),u=o.l,s=o.r,f=o.t,v=o.b,g=r._pushmargin,_=r._pushmarginIds,y=r.minreducedwidth,w=r.minreducedheight;if(o.autoexpand!==!1){for(var M in g)_[M]||delete g[M];var m=e._fullLayout._reservedMargin;for(var k in m)for(var S in m[k]){var x=m[k][S];i[S]=Math.max(i[S],x)}g.base={l:{val:0,size:u},r:{val:1,size:s},t:{val:1,size:f},b:{val:0,size:v}};for(var T in i){var d=0;for(var b in g)b!=="base"&&wf(g[b][T].size)&&(d=g[b][T].size>d?g[b][T].size:d);var p=Math.max(0,o[T]-d);i[T]=Math.max(0,i[T]-p)}for(var c in g){var A=g[c].l||{},h=g[c].b||{},R=A.val,E=A.size,D=h.val,N=h.size,I=t-i.r-i.l,F=n-i.t-i.b;for(var L in g){if(wf(E)&&g[L].r){var P=g[L].r.val,O=g[L].r.size;if(P>R){var U=(E*P+(O-I)*R)/(P-R),X=(O*(1-R)+(E-I)*(1-P))/(P-R);U+X>u+s&&(u=U,s=X)}}if(wf(N)&&g[L].t){var j=g[L].t.val,$=g[L].t.size;if(j>D){var Y=(N*j+($-F)*D)/(j-D),q=($*(1-D)+(N-F)*(1-j))/(j-D);Y+q>v+f&&(v=Y,f=q)}}}}}var Z=xr.constrain(t-o.l-o.r,Vw,y),ne=xr.constrain(n-o.t-o.b,Gw,w),Q=Math.max(0,t-Z),oe=Math.max(0,n-ne);if(Q){var ee=(u+s)/Q;ee>1&&(u/=ee,s/=ee)}if(oe){var G=(v+f)/oe;G>1&&(v/=G,f/=G)}if(a.l=Math.round(u)+i.l,a.r=Math.round(s)+i.r,a.t=Math.round(f)+i.t,a.b=Math.round(v)+i.b,a.p=Math.round(o.pad),a.w=Math.round(t)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!r._replotting&&(cr.didMarginChange(l,a)||LG(e))){"_redrawFromAutoMarginCount"in r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var re=3*(1+Object.keys(_).length);if(r._redrawFromAutoMarginCount1)return!0}return!1};cr.graphJson=function(e,r,t,n,a,o){(a&&r&&!e._fullData||a&&!r&&!e._fullLayout)&&cr.supplyDefaults(e);var i=a?e._fullData:e.data,l=a?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function s(g,_){if(typeof g=="function")return _?"_function_":null;if(xr.isPlainObject(g)){var y={},w;return Object.keys(g).sort().forEach(function(S){if(["_","["].indexOf(S.charAt(0))===-1){if(typeof g[S]=="function"){_&&(y[S]="_function");return}if(t==="keepdata"){if(S.substr(S.length-3)==="src")return}else if(t==="keepstream"){if(w=g[S+"src"],typeof w=="string"&&w.indexOf(":")>0&&!xr.isPlainObject(g.stream))return}else if(t!=="keepall"&&(w=g[S+"src"],typeof w=="string"&&w.indexOf(":")>0))return;y[S]=s(g[S],_)}}),y}var M=Array.isArray(g),m=xr.isTypedArray(g);if((M||m)&&g.dtype&&g.shape){var k=g.bdata;return s({dtype:g.dtype,shape:g.shape,bdata:xr.isArrayBuffer(k)?gG.encode(k):k},_)}return M?g.map(function(S){return s(S,_)}):m?xr.simpleMap(g,xr.identity):xr.isJSDate(g)?xr.ms2DateTimeLocal(+g):g}var f={data:(i||[]).map(function(g){var _=s(g);return r&&delete _.fit,_})};if(!r&&(f.layout=s(l),a)){var v=l._size;f.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return u&&(f.frames=s(u)),o&&(f.config=s(e._context,!0)),n==="object"?f:JSON.stringify(f)};cr.modifyFrames=function(e,r){var t,n,a,o=e._transitionData._frames,i=e._transitionData._frameHash;for(t=0;t0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),t.redraw&&e._transitionData._interruptCallbacks.push(function(){return ot.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var g=0,_=0;function y(){return g++,function(){_++,!n&&_===g&&l(v)}}t.runFn(y),setTimeout(y())})}function l(v){if(e._transitionData)return o(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(t.redraw)return ot.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(v)}function u(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var s=[cr.previousPromises,u,t.prepareFn,cr.rehover,cr.reselect,i],f=xr.syncOrAsync(s,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}cr.doCalcdata=function(e,r){var t=ia.list(e),n=e._fullData,a=e._fullLayout,o,i,l,u,s=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=s,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},l=0;l=0;u--)if(T[u].enabled){o._indexToPoints=T[u]._indexToPoints;break}i&&i.calc&&(x=i.calc(e,o))}(!Array.isArray(x)||!x[0])&&(x=[{x:Pw,y:Pw}]),x[0].t||(x[0].t={}),x[0].trace=o,s[k]=x}}for(zw(t,n,a),l=0;l{"use strict";Pl.xmlns="http://www.w3.org/2000/xmlns/";Pl.svg="http://www.w3.org/2000/svg";Pl.xlink="http://www.w3.org/1999/xlink";Pl.svgAttrs={xmlns:Pl.svg,"xmlns:xlink":Pl.xlink}});var qn=pe((K0e,Xw)=>{"use strict";Xw.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 Yn=pe(La=>{"use strict";var Yt=it(),eo=ir(),FG=eo.strTranslate,tg=Io(),IG=qn().LINE_SPACING,NG=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;La.convertToTspans=function(e,r,t){var n=e.text(),a=!e.attr("data-notex")&&r&&r._context.typesetMath&&typeof MathJax!="undefined"&&n.match(NG),o=Yt.select(e.node().parentNode);if(o.empty())return;var i=e.attr("class")?e.attr("class").split(" ")[0]:"text";i+="-math",o.selectAll("svg."+i).remove(),o.selectAll("g."+i+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function l(){o.empty()||(i=e.attr("class")+"-math",o.select("svg."+i).remove()),e.text("").style("white-space","pre");var u=JG(e.node(),n);u&&e.style("pointer-events","all"),La.positionText(e),t&&t.call(e)}return a?(r&&r._promises||[]).push(new Promise(function(u){e.style("display","none");var s=parseInt(e.node().style.fontSize,10),f={fontSize:s};BG(a[2],f,function(v,g,_){o.selectAll("svg."+i).remove(),o.selectAll("g."+i+"-group").remove();var y=v&&v.select("svg");if(!y||!y.node()){l(),u();return}var w=o.append("g").classed(i+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});w.node().appendChild(y.node()),g&&g.node()&&y.node().insertBefore(g.node().cloneNode(!0),y.node().firstChild);var M=_.width,m=_.height;y.attr({class:i,height:m,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",S=y.select("g");S.attr({fill:k,stroke:k});var x=S.node().getBoundingClientRect(),T=x.width,d=x.height;(T>M||d>m)&&(y.style("overflow","hidden"),x=y.node().getBoundingClientRect(),T=x.width,d=x.height);var b=+e.attr("x"),p=+e.attr("y"),c=s||e.node().getBoundingClientRect().height,A=-c/4;if(i[0]==="y")w.attr({transform:"rotate("+[-90,b,p]+")"+FG(-T/2,A-d/2)});else if(i[0]==="l")p=A-d/2;else if(i[0]==="a"&&i.indexOf("atitle")!==0)b=0,p=A;else{var h=e.attr("text-anchor");b=b-T*(h==="middle"?.5:h==="end"?1:0),p=p+A-d/2}y.attr({x:b,y:p}),t&&t.call(e,w),u(w)})})):l(),e};var zG=/(<|<|<)/g,qG=/(>|>|>)/g;function OG(e){return e.replace(zG,"\\lt ").replace(qG,"\\gt ")}var Zw=[["$","$"],["\\(","\\)"]];function BG(e,r,t){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){eo.warn("No MathJax version:",MathJax.version);return}var a,o,i,l,u=function(){return o=eo.extendDeepAll({},MathJax.Hub.config),i=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:Zw},displayAlign:"left"})},s=function(){o=eo.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Zw},f=function(){if(a=MathJax.Hub.config.menuSettings.renderer,a!=="SVG")return MathJax.Hub.setRenderer("SVG")},v=function(){a=MathJax.config.startup.output,a!=="svg"&&(MathJax.config.startup.output="svg")},g=function(){var k="math-output-"+eo.randstr({},64);l=Yt.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":r.fontSize+"px"}).text(OG(e));var S=l.node();return n===2?MathJax.Hub.Typeset(S):MathJax.typeset([S])},_=function(){var k=l.select(n===2?".MathJax_SVG":".MathJax"),S=!k.empty()&&l.select("svg").node();if(!S)eo.log("There was an error in the tex syntax.",e),t();else{var x=S.getBoundingClientRect(),T;n===2?T=Yt.select("body").select("#MathJax_SVG_glyphs"):T=k.select("defs"),t(k,T,x)}l.remove()},y=function(){if(a!=="SVG")return MathJax.Hub.setRenderer(a)},w=function(){a!=="svg"&&(MathJax.config.startup.output=a)},M=function(){return i!==void 0&&(MathJax.Hub.processSectionDelay=i),MathJax.Hub.Config(o)},m=function(){MathJax.config=o};n===2?MathJax.Hub.Queue(u,f,g,_,y,M):n===3&&(s(),v(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){g(),_(),w(),m()}))}var $w={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"},UG={sub:"0.3em",sup:"-0.6em"},HG={sub:"-0.21em",sup:"0.42em"},Jw="\u200B",Kw=["http:","https:","mailto:","",void 0,":"],jw=La.NEWLINES=/(\r\n?|\n)/g,ag=/(<[^<>]*>)/,ig=/<(\/?)([^ >]*)(\s+(.*))?>/i,VG=//i;La.BR_TAG_ALL=//gi;var e7=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,r7=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,t7=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,GG=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Fl(e,r){if(!e)return null;var t=e.match(r),n=t&&(t[3]||t[4]);return n&&vv(n)}var YG=/(^|;)\s*color:/;La.plainText=function(e,r){r=r||{};for(var t=r.len!==void 0&&r.len!==-1?r.len:1/0,n=r.allowedTags!==void 0?r.allowedTags:["br"],a="...",o=a.length,i=e.split(ag),l=[],u="",s=0,f=0;fo?l.push(v.substr(0,w-o)+a):l.push(v.substr(0,w));break}u=""}}return l.join("")};var WG={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},XG=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function vv(e){return e.replace(XG,function(r,t){var n;return t.charAt(0)==="#"?n=ZG(t.charAt(1)==="x"?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):n=WG[t],n||r})}La.convertEntities=vv;function ZG(e){if(!(e>1114111)){var r=String.fromCodePoint;if(r)return r(e);var t=String.fromCharCode;return e<=65535?t(e):t((e>>10)+55232,e%1024+56320)}}function JG(e,r){r=r.replace(jw," ");var t=!1,n=[],a,o=-1;function i(){o++;var d=document.createElementNS(tg.svg,"tspan");Yt.select(d).attr({class:"line",dy:o*IG+"em"}),e.appendChild(d),a=d;var b=n;if(n=[{node:d}],b.length>1)for(var p=1;p.",r);return}var b=n.pop();d!==b.type&&eo.log("Start tag <"+b.type+"> doesnt match end tag <"+d+">. Pretending it did match.",r),a=n[n.length-1].node}var f=VG.test(r);f?i():(a=e,n=[{node:e}]);for(var v=r.split(ag),g=0;g{"use strict";var KG=it(),dv=ka(),Tf=rt(),hv=ir(),a7=Zr(),QG=wl().isValid;function $G(e,r,t){var n=r?hv.nestedProperty(e,r).get()||{}:e,a=n[t||"color"];a&&a._inputArray&&(a=a._inputArray);var o=!1;if(hv.isArrayOrTypedArray(a)){for(var i=0;i=0;n--,a++){var o=e[n];t[a]=[1-o[0],o[1]]}return t}function f7(e,r){r=r||{};for(var t=e.domain,n=e.range,a=n.length,o=new Array(a),i=0;i{"use strict";var v7=Ap(),eY=v7.FORMAT_LINK,rY=v7.DATE_FORMAT_LINK;function tY(e,r){return{valType:"string",dflt:"",editType:"none",description:(r?og:h7)("hover text",e)+["By default the values are formatted using "+(r?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function og(e,r){return["Sets the "+e+" formatting rule"+(r?"for `"+r+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+eY+"."].join(" ")}function h7(e,r){return og(e,r)+[" And for dates see: "+rY+".","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(" ")}d7.exports={axisHoverFormat:tY,descriptionOnlyNumbers:og,descriptionWithDates:h7}});var Ra=pe((ece,R7)=>{"use strict";var p7=kn(),Ws=Ti(),L7=Ao().dash,sg=Mt().extendFlat,g7=gt().templatedArray,y7=ro().descriptionWithDates,nY=nn().ONEDAY,Ci=wn(),aY=Ci.HOUR_PATTERN,iY=Ci.WEEKDAY_PATTERN,lg={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},oY=sg({},lg,{values:lg.values.slice().concat(["sync"])});function m7(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var x7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},b7={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},_7={valType:"data_array",editType:"ticks"},w7={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function M7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=5),r}function T7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var A7={valType:"color",dflt:Ws.defaultLine,editType:"ticks"},k7={valType:"color",dflt:Ws.lightLine,editType:"ticks"};function S7(e){var r={valType:"number",min:0,editType:"ticks"};return e||(r.dflt=1),r}var C7=sg({},L7,{editType:"ticks"}),E7={valType:"boolean",editType:"ticks"};R7.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Ws.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:p7({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Ci.idRegex.x.toString(),Ci.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:[Ci.idRegex.x.toString(),Ci.idRegex.y.toString()],editType:"calc"},rangebreaks:g7("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:[iY,aY,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:nY},editType:"calc"}),tickmode:oY,nticks:m7(),tick0:x7,dtick:b7,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:_7,ticktext:{valType:"data_array",editType:"ticks"},ticks:w7,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:M7(),tickwidth:T7(),tickcolor:A7,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:sg({},L7,{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:p7({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:y7("tick label")},tickformatstops:g7("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:y7("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Ws.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:E7,gridcolor:k7,gridwidth:S7(),griddash:C7,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Ws.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Ws.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Ci.idRegex.x.toString(),Ci.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Ci.idRegex.x.toString(),Ci.idRegex.y.toString()],editType:"plot"},minor:{tickmode:lg,nticks:m7("minor"),tick0:x7,dtick:b7,tickvals:_7,ticks:w7,ticklen:M7("minor"),tickwidth:T7("minor"),tickcolor:A7,gridcolor:k7,gridwidth:S7("minor"),griddash:C7,showgrid:E7,editType:"ticks"},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 pv=pe((rce,F7)=>{"use strict";var At=Ra(),D7=kn(),P7=Mt().extendFlat,lY=zn().overrideAll;F7.exports=lY({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:At.linecolor,outlinewidth:At.linewidth,bordercolor:At.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:At.minor.tickmode,nticks:At.nticks,tick0:At.tick0,dtick:At.dtick,tickvals:At.tickvals,ticktext:At.ticktext,ticks:P7({},At.ticks,{dflt:""}),ticklabeloverflow:P7({},At.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:At.ticklen,tickwidth:At.tickwidth,tickcolor:At.tickcolor,ticklabelstep:At.ticklabelstep,showticklabels:At.showticklabels,labelalias:At.labelalias,tickfont:D7({}),tickangle:At.tickangle,tickformat:At.tickformat,tickformatstops:At.tickformatstops,tickprefix:At.tickprefix,showtickprefix:At.showtickprefix,ticksuffix:At.ticksuffix,showticksuffix:At.showticksuffix,separatethousands:At.separatethousands,exponentformat:At.exponentformat,minexponent:At.minexponent,showexponent:At.showexponent,title:{text:{valType:"string"},font:D7({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var ja=pe((nce,N7)=>{"use strict";var sY=pv(),uY=Es().counter,fY=Wc(),I7=wl().scales,tce=fY(I7);function gv(e){return"`"+e+"`"}N7.exports=function(r,t){r=r||"",t=t||{};var n=t.cLetter||"c",a="onlyIfNumerical"in t?t.onlyIfNumerical:!!r,o="noScale"in t?t.noScale:r==="marker.line",i="showScaleDflt"in t?t.showScaleDflt:n==="z",l=typeof t.colorscaleDflt=="string"?I7[t.colorscaleDflt]:null,u=t.editTypeOverride||"",s=r?r+".":"",f,v;"colorAttr"in t?(f=t.colorAttr,v=t.colorAttr):(f={z:"z",c:"color"}[n],v="in "+gv(s+f));var g=a?" Has an effect only if "+v+" is set to a numerical array.":"",_=n+"auto",y=n+"min",w=n+"max",M=n+"mid",m=gv(s+_),k=gv(s+y),S=gv(s+w),x=k+" and "+S,T={};T[y]=T[w]=void 0;var d={};d[_]=!1;var b={};return f==="color"&&(b.color={valType:"color",arrayOk:!0,editType:u||"style"},t.anim&&(b.color.anim=!0)),b[_]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},b[y]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:d},b[w]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:d},b[M]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},b.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1}},b.autocolorscale={valType:"boolean",dflt:t.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},b.reversescale={valType:"boolean",dflt:!1,editType:"plot"},o||(b.showscale={valType:"boolean",dflt:i,editType:"calc"},b.colorbar=sY),t.noColorAxis||(b.coloraxis={valType:"subplotid",regex:uY("coloraxis"),dflt:null,editType:"calc"}),b}});var fg=pe((ace,z7)=>{"use strict";var cY=Mt().extendFlat,vY=ja(),ug=wl().scales;z7.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:ug.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:ug.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:ug.RdBu,editType:"calc"}},coloraxis:cY({_isSubplotObj:!0,editType:"calc"},vY("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var cg=pe((ice,q7)=>{"use strict";var hY=ir();q7.exports=function(r){return hY.isPlainObject(r.colorbar)}});var dg=pe(hg=>{"use strict";var vg=rt(),O7=ir(),B7=nn(),dY=B7.ONEDAY,pY=B7.ONEWEEK;hg.dtick=function(e,r){var t=r==="log",n=r==="date",a=r==="category",o=n?dY:1;if(!e)return o;if(vg(e))return e=Number(e),e<=0?o:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||t))return o;var i=e.charAt(0),l=e.substr(1);return l=vg(l)?Number(l):0,l<=0||!(n&&i==="M"&&l===Math.round(l)||t&&i==="L"||t&&i==="D"&&(l===1||l===2))?o:e};hg.tick0=function(e,r,t,n){if(r==="date")return O7.cleanDate(e,O7.dateTick0(t,n%pY===0?1:0));if(!(n==="D1"||n==="D2"))return vg(e)?Number(e):0}});var pg=pe((lce,H7)=>{"use strict";var U7=dg(),gY=ir().isArrayOrTypedArray,yY=ea().isTypedArraySpec,mY=ea().decodeTypedArraySpec;H7.exports=function(r,t,n,a,o){o||(o={});var i=o.isMinor,l=i?r.minor||{}:r,u=i?t.minor:t,s=i?"minor.":"";function f(k){var S=l[k];return yY(S)&&(S=mY(S)),S!==void 0?S:(u._template||{})[k]}var v=f("tick0"),g=f("dtick"),_=f("tickvals"),y=gY(_)?"array":g?"linear":"auto",w=n(s+"tickmode",y);if(w==="auto"||w==="sync")n(s+"nticks");else if(w==="linear"){var M=u.dtick=U7.dtick(g,a);u.tick0=U7.tick0(v,a,t.calendar,M)}else if(a!=="multicategory"){var m=n(s+"tickvals");m===void 0?u.tickmode="auto":i||n("ticktext")}}});var yg=pe((sce,G7)=>{"use strict";var gg=ir(),V7=Ra();G7.exports=function(r,t,n,a){var o=a.isMinor,i=o?r.minor||{}:r,l=o?t.minor:t,u=o?V7.minor:V7,s=o?"minor.":"",f=gg.coerce2(i,l,u,"ticklen",o?(t.ticklen||5)*.6:void 0),v=gg.coerce2(i,l,u,"tickwidth",o?t.tickwidth||1:void 0),g=gg.coerce2(i,l,u,"tickcolor",(o?t.tickcolor:void 0)||l.color),_=n(s+"ticks",!o&&a.outerTicks||f||v||g?"outside":"");_||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}});var mg=pe((uce,Y7)=>{"use strict";Y7.exports=function(r){var t=["showexponent","showtickprefix","showticksuffix"],n=t.filter(function(o){return r[o]!==void 0}),a=function(o){return r[o]===r[n[0]]};if(n.every(a)||n.length===1)return r[n[0]]}});var ei=pe((fce,W7)=>{"use strict";var yv=ir(),xY=gt();W7.exports=function(r,t,n){var a=n.name,o=n.inclusionAttr||"visible",i=t[a],l=yv.isArrayOrTypedArray(r[a])?r[a]:[],u=t[a]=[],s=xY.arrayTemplater(t,a,o),f,v;for(f=0;f{"use strict";var xg=ir(),bY=Zr().contrast,X7=Ra(),_Y=mg(),wY=ei();Z7.exports=function(r,t,n,a,o){o||(o={});var i=n("labelalias");xg.isPlainObject(i)||delete t.labelalias;var l=_Y(r),u=n("showticklabels");if(u){o.noTicklabelshift||n("ticklabelshift"),o.noTicklabelstandoff||n("ticklabelstandoff");var s=o.font||{},f=t.color,v=t.ticklabelposition||"",g=v.indexOf("inside")!==-1?bY(o.bgColor):f&&f!==X7.color.dflt?f:s.color;if(xg.coerceFont(n,"tickfont",s,{overrideDflt:{color:g}}),!o.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!o.noAng){var _=n("tickangle");!o.noAutotickangles&&_==="auto"&&n("autotickangles")}if(a!=="category"){var y=n("tickformat");wY(r,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:MY}),t.tickformatstops.length||delete t.tickformatstops,!o.noExp&&!y&&a!=="date"&&(n("showexponent",l),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function MY(e,r){function t(a,o){return xg.coerce(e,r,X7.tickformatstops,a,o)}var n=t("enabled");n&&(t("dtickrange"),t("value"))}});var _g=pe((vce,J7)=>{"use strict";var TY=mg();J7.exports=function(r,t,n,a,o){o||(o={});var i=o.tickSuffixDflt,l=TY(r),u=n("tickprefix");u&&n("showtickprefix",l);var s=n("ticksuffix",i);s&&n("showticksuffix",l)}});var wg=pe((hce,K7)=>{"use strict";var No=ir(),AY=gt(),kY=pg(),SY=yg(),CY=bg(),EY=_g(),LY=pv();K7.exports=function(r,t,n){var a=AY.newContainer(t,"colorbar"),o=r.colorbar||{};function i(h,R){return No.coerce(o,a,LY,h,R)}var l=n.margin||{t:0,b:0,l:0,r:0},u=n.width-l.l-l.r,s=n.height-l.t-l.b,f=i("orientation"),v=f==="v",g=i("thicknessmode");i("thickness",g==="fraction"?30/(v?u:s):30);var _=i("lenmode");i("len",_==="fraction"?1:v?s:u);var y=i("yref"),w=i("xref"),M=y==="paper",m=w==="paper",k,S,x,T="left";v?(x="middle",T=m?"left":"right",k=m?1.02:1,S=.5):(x=M?"bottom":"top",T="center",k=.5,S=M?1.02:1),No.coerce(o,a,{x:{valType:"number",min:m?-2:0,max:m?3:1,dflt:k}},"x"),No.coerce(o,a,{y:{valType:"number",min:M?-2:0,max:M?3:1,dflt:S}},"y"),i("xanchor",T),i("xpad"),i("yanchor",x),i("ypad"),No.noneOrAll(o,a,["x","y"]),i("outlinecolor"),i("outlinewidth"),i("bordercolor"),i("borderwidth"),i("bgcolor");var d=No.coerce(o,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");i("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":"hide past div"),kY(o,a,i,"linear");var b=n.font,p={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:b};d.indexOf("inside")!==-1&&(p.bgColor="black"),EY(o,a,i,"linear",p),CY(o,a,i,"linear",p),SY(o,a,i,"linear",p),i("title.text",n._dfltTitle.colorbar);var c=a.showticklabels?a.tickfont:b,A=No.extendFlat({},b,{family:c.family,size:No.bigFont(c.size)});No.coerceFont(i,"title.font",A),i("title.side",v?"top":"right")}});var Ei=pe((dce,j7)=>{"use strict";var Q7=rt(),Tg=ir(),RY=cg(),DY=wg(),$7=wl().isValid,PY=Er().traceIs;function Mg(e,r){var t=r.slice(0,r.length-1);return r?Tg.nestedProperty(e,t).get()||{}:e}j7.exports=function e(r,t,n,a,o){var i=o.prefix,l=o.cLetter,u="_module"in t,s=Mg(r,i),f=Mg(t,i),v=Mg(t._template||{},i)||{},g=function(){return delete r.coloraxis,delete t.coloraxis,e(r,t,n,a,o)};if(u){var _=n._colorAxes||{},y=a(i+"coloraxis");if(y){var w=PY(t,"contour")&&Tg.nestedProperty(t,"contours.coloring").get()||"heatmap",M=_[y];M?(M[2].push(g),M[0]!==w&&(M[0]=!1,Tg.warn(["Ignoring coloraxis:",y,"setting","as it is linked to incompatible colorscales."].join(" ")))):_[y]=[w,t,[g]];return}}var m=s[l+"min"],k=s[l+"max"],S=Q7(m)&&Q7(k)&&m{"use strict";var e8=ir(),FY=gt(),r8=fg(),IY=Ei();t8.exports=function(r,t){function n(v,g){return e8.coerce(r,t,r8,v,g)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=t._colorAxes,o,i;function l(v,g){return e8.coerce(o,i,r8.coloraxis,v,g)}for(var u in a){var s=a[u];if(s[0])o=r[u]||{},i=FY.newContainer(t,u,"coloraxis"),i._name=u,IY(o,i,t,l,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var NY=ir(),zY=Si().hasColorscale,qY=Si().extractOpts;a8.exports=function(r,t){function n(f,v){var g=f["_"+v];g!==void 0&&(f[v]=g)}function a(f,v){var g=v.container?NY.nestedProperty(f,v.container).get():f;if(g)if(g.coloraxis)g._colorAx=t[g.coloraxis];else{var _=qY(g),y=_.auto;(y||_.min===void 0)&&n(g,v.min),(y||_.max===void 0)&&n(g,v.max),_.autocolorscale&&n(g,"colorscale")}}for(var o=0;o{"use strict";var o8=rt(),Ag=ir(),OY=Si().extractOpts;l8.exports=function(r,t,n){var a=r._fullLayout,o=n.vals,i=n.containerStr,l=i?Ag.nestedProperty(t,i).get():t,u=OY(l),s=u.auto!==!1,f=u.min,v=u.max,g=u.mid,_=function(){return Ag.aggNums(Math.min,null,o)},y=function(){return Ag.aggNums(Math.max,null,o)};if(f===void 0?f=_():s&&(l._colorAx&&o8(f)?f=Math.min(f,_()):f=_()),v===void 0?v=y():s&&(l._colorAx&&o8(v)?v=Math.max(v,y()):v=y()),s&&g!==void 0&&(v-g>g-f?f=g-(v-g):v-g=0?w=a.colorscale.sequential:w=a.colorscale.sequentialminus,u._sync("colorscale",w)}}});var Li=pe((mce,s8)=>{"use strict";var mv=wl(),Xs=Si();s8.exports={moduleType:"component",name:"colorscale",attributes:ja(),layoutAttributes:fg(),supplyLayoutDefaults:n8(),handleDefaults:Ei(),crossTraceDefaults:i8(),calc:zo(),scales:mv.scales,defaultScale:mv.defaultScale,getScale:mv.get,isValidScale:mv.isValid,hasColorscale:Xs.hasColorscale,extractOpts:Xs.extractOpts,extractScale:Xs.extractScale,flipScale:Xs.flipScale,makeColorScaleFunc:Xs.makeColorScaleFunc,makeColorScaleFuncFromTrace:Xs.makeColorScaleFuncFromTrace}});var oa=pe((xce,f8)=>{"use strict";var u8=ir(),BY=ea().isTypedArraySpec;f8.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 r=e.marker;return u8.isPlainObject(r)&&(u8.isArrayOrTypedArray(r.size)||BY(r.size))}}});var kg=pe((bce,c8)=>{"use strict";var UY=rt();c8.exports=function(r,t){t||(t=2);var n=r.marker,a=n.sizeref||1,o=n.sizemin||0,i=n.sizemode==="area"?function(l){return Math.sqrt(l/a)}:function(l){return l/a};return function(l){var u=i(l/t);return UY(u)&&u>0?Math.max(u,o):0}}});var to=pe(Cn=>{"use strict";var v8=ir();Cn.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Cn.isTraceInSubplots=function(e,r){if(e.type==="splom"){for(var t=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&t.index{p8.exports=WY;var Sg={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},YY=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function WY(e){var r=[];return e.replace(YY,function(t,n,a){var o=n.toLowerCase();for(a=ZY(a),o=="m"&&a.length>2&&(r.push([n].concat(a.splice(0,2))),o="l",n=n=="m"?"l":"L");;){if(a.length==Sg[o])return a.unshift(n),r.push(a);if(a.length{"use strict";var JY=Cg(),sr=function(e,r){return r?Math.round(e*(r=Math.pow(10,r)))/r:Math.round(e)},Fr="M0,0Z",g8=Math.sqrt(2),qo=Math.sqrt(3),Eg=Math.PI,Lg=Math.cos,Rg=Math.sin;_8.exports={circle:{n:0,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return t?Nr(r,t,a):a}},square:{n:1,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.3,2);return Nr(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.4,2),a=sr(e*1.2,2);return Nr(r,t,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.8/g8,2),a="l"+n+","+n,o="l"+n+",-"+n,i="l-"+n+",-"+n,l="l-"+n+","+n;return Nr(r,t,"M0,"+n+a+o+i+o+i+l+i+l+a+l+a+"Z")}},"triangle-up":{n:5,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M-"+n+","+a+"H"+n+"L0,-"+o+"Z")}},"triangle-down":{n:6,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M-"+n+",-"+a+"H"+n+"L0,"+o+"Z")}},"triangle-left":{n:7,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M"+a+",-"+n+"V"+n+"L-"+o+",0Z")}},"triangle-right":{n:8,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2/qo,2),a=sr(e/2,2),o=sr(e,2);return Nr(r,t,"M-"+a+",-"+n+"V"+n+"L"+o+",0Z")}},"triangle-ne":{n:9,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.6,2),a=sr(e*1.2,2);return Nr(r,t,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.951,2),a=sr(e*.588,2),o=sr(-e,2),i=sr(e*-.309,2),l=sr(e*.809,2);return Nr(r,t,"M"+n+","+i+"L"+a+","+l+"H-"+a+"L-"+n+","+i+"L0,"+o+"Z")}},hexagon:{n:14,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e/2,2),o=sr(e*qo/2,2);return Nr(r,t,"M"+o+",-"+a+"V"+a+"L0,"+n+"L-"+o+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e/2,2),o=sr(e*qo/2,2);return Nr(r,t,"M-"+a+","+o+"H"+a+"L"+n+",0L"+a+",-"+o+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.924,2),a=sr(e*.383,2);return Nr(r,t,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,r,t){if(Ir(r))return Fr;var n=e*1.4,a=sr(n*.225,2),o=sr(n*.951,2),i=sr(n*.363,2),l=sr(n*.588,2),u=sr(-n,2),s=sr(n*-.309,2),f=sr(n*.118,2),v=sr(n*.809,2),g=sr(n*.382,2);return Nr(r,t,"M"+a+","+s+"H"+o+"L"+i+","+f+"L"+l+","+v+"L0,"+g+"L-"+l+","+v+"L-"+i+","+f+"L-"+o+","+s+"H-"+a+"L0,"+u+"Z")}},hexagram:{n:18,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.66,2),a=sr(e*.38,2),o=sr(e*.76,2);return Nr(r,t,"M-"+o+",0l-"+a+",-"+n+"h"+o+"l"+a+",-"+n+"l"+a+","+n+"h"+o+"l-"+a+","+n+"l"+a+","+n+"h-"+o+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+o+"Z")}},"star-triangle-up":{n:19,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*qo*.8,2),a=sr(e*.8,2),o=sr(e*1.6,2),i=sr(e*4,2),l="A "+i+","+i+" 0 0 1 ";return Nr(r,t,"M-"+n+","+a+l+n+","+a+l+"0,-"+o+l+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*qo*.8,2),a=sr(e*.8,2),o=sr(e*1.6,2),i=sr(e*4,2),l="A "+i+","+i+" 0 0 1 ";return Nr(r,t,"M"+n+",-"+a+l+"-"+n+",-"+a+l+"0,"+o+l+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.1,2),a=sr(e*2,2),o="A "+a+","+a+" 0 0 1 ";return Nr(r,t,"M-"+n+",-"+n+o+"-"+n+","+n+o+n+","+n+o+n+",-"+n+o+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2),a=sr(e*1.9,2),o="A "+a+","+a+" 0 0 1 ";return Nr(r,t,"M-"+n+",0"+o+"0,"+n+o+n+",0"+o+"0,-"+n+o+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*.7,2),a=sr(e*1.4,2);return Nr(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2),a=sr(e*.7,2);return Nr(r,t,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e/g8,2);return Nr(r,t,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"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,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e*1.3,2);return Nr(r,t,"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,r,t){if(Ir(r))return Fr;var n=sr(e*1.3,2),a=sr(e*.65,2);return Nr(r,t,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2);return Nr(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*.85,2);return Nr(r,t,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e/2,2),a=sr(e,2);return Nr(r,t,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M-"+n+","+o+"L0,0M"+n+","+o+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M-"+n+",-"+o+"L0,0M"+n+",-"+o+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M"+o+","+n+"L0,0M"+o+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.2,2),a=sr(e*1.6,2),o=sr(e*.8,2);return Nr(r,t,"M-"+o+","+n+"L0,0M-"+o+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2);return Nr(r,t,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*1.4,2);return Nr(r,t,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2);return Nr(r,t,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e,2),a=sr(e*2,2);return Nr(r,t,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,r,t){if(Ir(r))return Fr;var n=sr(e*2,2),a=sr(e,2);return Nr(r,t,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,r,t){if(Ir(r))return Fr;var n=Eg/2.5,a=2*e*Lg(n),o=2*e*Rg(n);return Nr(r,t,"M0,0L"+-a+","+o+"L"+a+","+o+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,r,t){if(Ir(r))return Fr;var n=Eg/4,a=2*e*Lg(n),o=2*e*Rg(n);return Nr(r,t,"M0,0L"+-a+","+o+"A "+2*e+","+2*e+" 0 0 1 "+a+","+o+"Z")},backoff:.4,noDot:!0}};function Ir(e){return e===null}var y8,m8,x8,b8;function Nr(e,r,t){if((!e||e%360===0)&&!r)return t;if(x8===e&&b8===r&&y8===t)return m8;x8=e,b8=r,y8=t;function n(M,m){var k=Lg(M),S=Rg(M),x=m[0],T=m[1]+(r||0);return[x*k-T*S,x*S+T*k]}for(var a=e/180*Eg,o=0,i=0,l=JY(t),u="",s=0;s{"use strict";var sn=it(),pt=ir(),KY=pt.numberFormat,ql=rt(),zg=ka(),bv=Er(),Mn=Zr(),QY=Li(),kf=pt.strTranslate,_v=Yn(),$Y=Io(),jY=qn(),eW=jY.LINE_SPACING,D8=Dc().DESELECTDIM,rW=oa(),tW=kg(),nW=to().appendArrayPointValue,ur=H8.exports={};ur.font=function(e,r){var t=r.variant,n=r.style,a=r.weight,o=r.color,i=r.size,l=r.family,u=r.shadow,s=r.lineposition,f=r.textcase;l&&e.style("font-family",l),i+1&&e.style("font-size",i+"px"),o&&e.call(Mn.fill,o),a&&e.style("font-weight",a),n&&e.style("font-style",n),t&&e.style("font-variant",t),f&&e.style("text-transform",Dg(iW(f))),u&&e.style("text-shadow",u==="auto"?_v.makeTextShadow(Mn.contrast(o)):Dg(u)),s&&e.style("text-decoration-line",Dg(oW(s)))};function Dg(e){return e==="none"?void 0:e}var aW={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function iW(e){return aW[e]}function oW(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ur.setPosition=function(e,r,t){e.attr("x",r).attr("y",t)};ur.setSize=function(e,r,t){e.attr("width",r).attr("height",t)};ur.setRect=function(e,r,t,n,a){e.call(ur.setPosition,r,t).call(ur.setSize,n,a)};ur.translatePoint=function(e,r,t,n){var a=t.c2p(e.x),o=n.c2p(e.y);if(ql(a)&&ql(o)&&r.node())r.node().nodeName==="text"?r.attr("x",a).attr("y",o):r.attr("transform",kf(a,o));else return!1;return!0};ur.translatePoints=function(e,r,t){e.each(function(n){var a=sn.select(this);ur.translatePoint(n,a,r,t)})};ur.hideOutsideRangePoint=function(e,r,t,n,a,o){r.attr("display",t.isPtWithinRange(e,a)&&n.isPtWithinRange(e,o)?null:"none")};ur.hideOutsideRangePoints=function(e,r){if(r._hasClipOnAxisFalse){var t=r.xaxis,n=r.yaxis;e.each(function(a){var o=a[0].trace,i=o.xcalendar,l=o.ycalendar,u=bv.traceIs(o,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each(function(s){ur.hideOutsideRangePoint(s,sn.select(this),t,n,i,l)})})}};ur.crispRound=function(e,r,t){return!r||!ql(r)?t||0:e._context.staticPlot?r:r<1?1:Math.round(r)};ur.singleLineStyle=function(e,r,t,n,a){r.style("fill","none");var o=(((e||[])[0]||{}).trace||{}).line||{},i=t||o.width||0,l=a||o.dash||"";Mn.stroke(r,n||o.color),ur.dashLine(r,l,i)};ur.lineGroupStyle=function(e,r,t,n){e.style("fill","none").each(function(a){var o=(((a||[])[0]||{}).trace||{}).line||{},i=r||o.width||0,l=n||o.dash||"";sn.select(this).call(Mn.stroke,t||o.color).call(ur.dashLine,l,i)})};ur.dashLine=function(e,r,t){t=+t||0,r=ur.dashStyle(r,t),e.style({"stroke-dasharray":r,"stroke-width":t+"px"})};ur.dashStyle=function(e,r){r=+r||1;var t=Math.max(r,3);return e==="solid"?e="":e==="dot"?e=t+"px,"+t+"px":e==="dash"?e=3*t+"px,"+3*t+"px":e==="longdash"?e=5*t+"px,"+5*t+"px":e==="dashdot"?e=3*t+"px,"+t+"px,"+t+"px,"+t+"px":e==="longdashdot"&&(e=5*t+"px,"+2*t+"px,"+t+"px,"+2*t+"px"),e};function P8(e,r,t,n){var a=r.fillpattern,o=r.fillgradient,i=a&&ur.getPatternAttr(a.shape,0,"");if(i){var l=ur.getPatternAttr(a.bgcolor,0,null),u=ur.getPatternAttr(a.fgcolor,0,null),s=a.fgopacity,f=ur.getPatternAttr(a.size,0,8),v=ur.getPatternAttr(a.solidity,0,.3),g=r.uid;ur.pattern(e,"point",t,g,i,f,v,void 0,a.fillmode,l,u,s)}else if(o&&o.type!=="none"){var _=o.type,y="scatterfill-"+r.uid;if(n&&(y="legendfill-"+r.uid),!n&&(o.start!==void 0||o.stop!==void 0)){var w,M;_==="horizontal"?(w={x:o.start,y:0},M={x:o.stop,y:0}):_==="vertical"&&(w={x:0,y:o.start},M={x:0,y:o.stop}),w.x=r._xA.c2p(w.x===void 0?r._extremes.x.min[0].val:w.x,!0),w.y=r._yA.c2p(w.y===void 0?r._extremes.y.min[0].val:w.y,!0),M.x=r._xA.c2p(M.x===void 0?r._extremes.x.max[0].val:M.x,!0),M.y=r._yA.c2p(M.y===void 0?r._extremes.y.max[0].val:M.y,!0),e.call(N8,t,y,"linear",o.colorscale,"fill",w,M,!0,!1)}else _==="horizontal"&&(_=_+"reversed"),e.call(ur.gradient,t,y,_,o.colorscale,"fill")}else r.fillcolor&&e.call(Mn.fill,r.fillcolor)}ur.singleFillStyle=function(e,r){var t=sn.select(e.node()),n=t.data(),a=((n[0]||[])[0]||{}).trace||{};P8(e,a,r,!1)};ur.fillGroupStyle=function(e,r,t){e.style("stroke-width",0).each(function(n){var a=sn.select(this);n[0].trace&&P8(a,n[0].trace,r,t)})};var M8=w8();ur.symbolNames=[];ur.symbolFuncs=[];ur.symbolBackOffs=[];ur.symbolNeedLines={};ur.symbolNoDot={};ur.symbolNoFill={};ur.symbolList=[];Object.keys(M8).forEach(function(e){var r=M8[e],t=r.n;ur.symbolList.push(t,String(t),e,t+100,String(t+100),e+"-open"),ur.symbolNames[t]=e,ur.symbolFuncs[t]=r.f,ur.symbolBackOffs[t]=r.backoff||0,r.needLine&&(ur.symbolNeedLines[t]=!0),r.noDot?ur.symbolNoDot[t]=!0:ur.symbolList.push(t+200,String(t+200),e+"-dot",t+300,String(t+300),e+"-open-dot"),r.noFill&&(ur.symbolNoFill[t]=!0)});var lW=ur.symbolNames.length,sW="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ur.symbolNumber=function(e){if(ql(e))e=+e;else if(typeof e=="string"){var r=0;e.indexOf("-open")>0&&(r=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(r+=200,e=e.replace("-dot","")),e=ur.symbolNames.indexOf(e),e>=0&&(e+=r)}return e%100>=lW||e>=400?0:Math.floor(Math.max(e,0))};function F8(e,r,t,n){var a=e%100;return ur.symbolFuncs[a](r,t,n)+(e>=200?sW:"")}var T8=KY("~f"),I8={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}};ur.gradient=function(e,r,t,n,a,o){var i=I8[n];return N8(e,r,t,i.type,a,o,i.start,i.stop,!1,i.reversed)};function N8(e,r,t,n,a,o,i,l,u,s){var f=a.length,v;n==="linear"?v={node:"linearGradient",attrs:{x1:i.x,y1:i.y,x2:l.x,y2:l.y,gradientUnits:u?"userSpaceOnUse":"objectBoundingBox"},reversed:s}:n==="radial"&&(v={node:"radialGradient",reversed:s});for(var g=new Array(f),_=0;_=0&&e.i===void 0&&(e.i=o.i),r.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?i.opacity:e.mo),n.ms2mrc){var u;e.ms==="various"||i.size==="various"?u=3:u=n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var s=ur.symbolNumber(e.mx||i.symbol)||0;e.om=s%200>=100;var f=Bg(e,t),v=Og(e,t);r.attr("d",F8(s,u,f,v))}var g=!1,_,y,w;if(e.so)w=l.outlierwidth,y=l.outliercolor,_=i.outliercolor;else{var M=(l||{}).width;w=(e.mlw+1||M+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?y=e.mlcc=n.lineScale(e.mlc):pt.isArrayOrTypedArray(l.color)?y=Mn.defaultLine:y=l.color,pt.isArrayOrTypedArray(i.color)&&(_=Mn.defaultLine,g=!0),"mc"in e?_=e.mcc=n.markerScale(e.mc):_=i.color||i.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(_=n.selectedColorFn(e))}if(e.om)r.call(Mn.stroke,_).style({"stroke-width":(w||1)+"px",fill:"none"});else{r.style("stroke-width",(e.isBlank?0:w)+"px");var m=i.gradient,k=e.mgt;k?g=!0:k=m&&m.type,pt.isArrayOrTypedArray(k)&&(k=k[0],I8[k]||(k=0));var S=i.pattern,x=S&&ur.getPatternAttr(S.shape,e.i,"");if(k&&k!=="none"){var T=e.mgc;T?g=!0:T=m.color;var d=t.uid;g&&(d+="-"+e.i),ur.gradient(r,a,d,k,[[0,T],[1,_]],"fill")}else if(x){var b=!1,p=S.fgcolor;!p&&o&&o.color&&(p=o.color,b=!0);var c=ur.getPatternAttr(p,e.i,o&&o.color||null),A=ur.getPatternAttr(S.bgcolor,e.i,null),h=S.fgopacity,R=ur.getPatternAttr(S.size,e.i,8),E=ur.getPatternAttr(S.solidity,e.i,.3);b=b||e.mcc||pt.isArrayOrTypedArray(S.shape)||pt.isArrayOrTypedArray(S.bgcolor)||pt.isArrayOrTypedArray(S.fgcolor)||pt.isArrayOrTypedArray(S.size)||pt.isArrayOrTypedArray(S.solidity);var D=t.uid;b&&(D+="-"+e.i),ur.pattern(r,"point",a,D,x,R,E,e.mcc,S.fillmode,A,c,h)}else pt.isArrayOrTypedArray(_)?Mn.fill(r,_[e.i]):Mn.fill(r,_);w&&Mn.stroke(r,y)}};ur.makePointStyleFns=function(e){var r={},t=e.marker;return r.markerScale=ur.tryColorscale(t,""),r.lineScale=ur.tryColorscale(t,"line"),bv.traceIs(e,"symbols")&&(r.ms2mrc=rW.isBubble(e)?tW(e):function(){return(t.size||6)/2}),e.selectedpoints&&pt.extendFlat(r,ur.makeSelectedPointStyleFns(e)),r};ur.makeSelectedPointStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.marker||{},o=t.marker||{},i=n.marker||{},l=a.opacity,u=o.opacity,s=i.opacity,f=u!==void 0,v=s!==void 0;(pt.isArrayOrTypedArray(l)||f||v)&&(r.selectedOpacityFn=function(x){var T=x.mo===void 0?a.opacity:x.mo;return x.selected?f?u:T:v?s:D8*T});var g=a.color,_=o.color,y=i.color;(_||y)&&(r.selectedColorFn=function(x){var T=x.mcc||g;return x.selected?_||T:y||T});var w=a.size,M=o.size,m=i.size,k=M!==void 0,S=m!==void 0;return bv.traceIs(e,"symbols")&&(k||S)&&(r.selectedSizeFn=function(x){var T=x.mrc||w/2;return x.selected?k?M/2:T:S?m/2:T}),r};ur.makeSelectedTextStyleFns=function(e){var r={},t=e.selected||{},n=e.unselected||{},a=e.textfont||{},o=t.textfont||{},i=n.textfont||{},l=a.color,u=o.color,s=i.color;return r.selectedTextColorFn=function(f){var v=f.tc||l;return f.selected?u||v:s||(u?v:Mn.addOpacity(v,D8))},r};ur.selectedPointStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=ur.makeSelectedPointStyleFns(r),n=r.marker||{},a=[];t.selectedOpacityFn&&a.push(function(o,i){o.style("opacity",t.selectedOpacityFn(i))}),t.selectedColorFn&&a.push(function(o,i){Mn.fill(o,t.selectedColorFn(i))}),t.selectedSizeFn&&a.push(function(o,i){var l=i.mx||n.symbol||0,u=t.selectedSizeFn(i);o.attr("d",F8(ur.symbolNumber(l),u,Bg(i,r),Og(i,r))),i.mrc2=u}),a.length&&e.each(function(o){for(var i=sn.select(this),l=0;l0?t:0}ur.textPointStyle=function(e,r,t){if(e.size()){var n;if(r.selectedpoints){var a=ur.makeSelectedTextStyleFns(r);n=a.selectedTextColorFn}var o=r.texttemplate,i=t._fullLayout;e.each(function(l){var u=sn.select(this),s=o?pt.extractOption(l,r,"txt","texttemplate"):pt.extractOption(l,r,"tx","text");if(!s&&s!==0){u.remove();return}if(o){var f=r._module.formatLabels,v=f?f(l,r,i):{},g={};nW(g,r,l.i);var _=r._meta||{};s=pt.texttemplateString(s,v,i._d3locale,g,l,_)}var y=l.tp||r.textposition,w=q8(l,r),M=n?n(l):l.tc||r.textfont.color;u.call(ur.font,{family:l.tf||r.textfont.family,weight:l.tw||r.textfont.weight,style:l.ty||r.textfont.style,variant:l.tv||r.textfont.variant,textcase:l.tC||r.textfont.textcase,lineposition:l.tE||r.textfont.lineposition,shadow:l.tS||r.textfont.shadow,size:w,color:M}).text(s).call(_v.convertToTspans,t).call(z8,y,w,l.mrc)})}};ur.selectedTextStyle=function(e,r){if(!(!e.size()||!r.selectedpoints)){var t=ur.makeSelectedTextStyleFns(r);e.each(function(n){var a=sn.select(this),o=t.selectedTextColorFn(n),i=n.tp||r.textposition,l=q8(n,r);Mn.fill(a,o);var u=bv.traceIs(r,"bar-like");z8(a,i,l,n.mrc2||n.mrc,u)})}};var A8=.5;ur.smoothopen=function(e,r){if(e.length<3)return"M"+e.join("L");var t="M"+e[0],n=[],a;for(a=1;a=u||x>=f&&x<=u)&&(T<=v&&T>=s||T>=v&&T<=s)&&(e=[x,T])}return e}ur.applyBackoff=U8;ur.makeTester=function(){var e=pt.ensureSingleById(sn.select("body"),"svg","js-plotly-tester",function(t){t.attr($Y.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),r=pt.ensureSingle(e,"path","js-reference-point",function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ur.tester=e,ur.testref=r};ur.savedBBoxes={};var Fg=0,cW=1e4;ur.bBox=function(e,r,t){t||(t=k8(e));var n;if(t){if(n=ur.savedBBoxes[t],n)return pt.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(t=k8(a),t){var o=+a.getAttribute("x")||0,i=+a.getAttribute("y")||0,l=a.getAttribute("transform");if(!l){var u=ur.bBox(a,!1,t);return o&&(u.left+=o,u.right+=o),i&&(u.top+=i,u.bottom+=i),u}if(t+="~"+o+"~"+i+"~"+l,n=ur.savedBBoxes[t],n)return pt.extendFlat({},n)}}var s,f;r?s=e:(f=ur.tester.node(),s=e.cloneNode(!0),f.appendChild(s)),sn.select(s).attr("transform",null).call(_v.positionText,0,0);var v=s.getBoundingClientRect(),g=ur.testref.node().getBoundingClientRect();r||f.removeChild(s);var _={height:v.height,width:v.width,left:v.left-g.left,top:v.top-g.top,right:v.right-g.left,bottom:v.bottom-g.top};return Fg>=cW&&(ur.savedBBoxes={},Fg=0),t&&(ur.savedBBoxes[t]=_),Fg++,pt.extendFlat({},_)};function k8(e){var r=e.getAttribute("data-unformatted");if(r!==null)return r+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ur.setClipUrl=function(e,r,t){e.attr("clip-path",qg(r,t))};function qg(e,r){if(!e)return null;var t=r._context,n=t._exportedPlot?"":t._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}ur.getTranslate=function(e){var r=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(o,i,l){return[i,l].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};ur.setTranslate=function(e,r,t){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",o=e.attr?"attr":"setAttribute",i=e[a]("transform")||"";return r=r||0,t=t||0,i=i.replace(n,"").trim(),i+=kf(r,t),i=i.trim(),e[o]("transform",i),i};ur.getScale=function(e){var r=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,t=e.attr?"attr":"getAttribute",n=e[t]("transform")||"",a=n.replace(r,function(o,i,l){return[i,l].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};ur.setScale=function(e,r,t){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",o=e.attr?"attr":"setAttribute",i=e[a]("transform")||"";return r=r||1,t=t||1,i=i.replace(n,"").trim(),i+="scale("+r+","+t+")",i=i.trim(),e[o]("transform",i),i};var vW=/\s*sc.*/;ur.setPointGroupScale=function(e,r,t){if(r=r||1,t=t||1,!!e){var n=r===1&&t===1?"":"scale("+r+","+t+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(vW,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var hW=/translate\([^)]*\)\s*$/;ur.setTextPointsScale=function(e,r,t){e&&e.each(function(){var n,a=sn.select(this),o=a.select("text");if(o.node()){var i=parseFloat(o.attr("x")||0),l=parseFloat(o.attr("y")||0),u=(a.attr("transform")||"").match(hW);r===1&&t===1?n=[]:n=[kf(i,l),"scale("+r+","+t+")",kf(-i,-l)],u&&n.push(u),a.attr("transform",n.join(""))}})};function Og(e,r){var t;return e&&(t=e.mf),t===void 0&&(t=r.marker&&r.marker.standoff||0),!r._geo&&!r._xA?-t:t}ur.getMarkerStandoff=Og;var Af=Math.atan2,Il=Math.cos,Js=Math.sin;function S8(e,r){var t=r[0],n=r[1];return[t*Il(e)-n*Js(e),t*Js(e)+n*Il(e)]}var C8,E8,L8,R8,Ig,Ng;function Bg(e,r){var t=e.ma;t===void 0&&(t=r.marker.angle,(!t||pt.isArrayOrTypedArray(t))&&(t=0));var n,a,o=r.marker.angleref;if(o==="previous"||o==="north"){if(r._geo){var i=r._geo.project(e.lonlat);n=i[0],a=i[1]}else{var l=r._xA,u=r._yA;if(l&&u)n=l.c2p(e.x),a=u.c2p(e.y);else return 90}if(r._geo){var s=e.lonlat[0],f=e.lonlat[1],v=r._geo.project([s,f+1e-5]),g=r._geo.project([s+1e-5,f]),_=Af(g[1]-a,g[0]-n),y=Af(v[1]-a,v[0]-n),w;if(o==="north")w=t/180*Math.PI;else if(o==="previous"){var M=s/180*Math.PI,m=f/180*Math.PI,k=C8/180*Math.PI,S=E8/180*Math.PI,x=k-M,T=Il(S)*Js(x),d=Js(S)*Il(m)-Il(S)*Js(m)*Il(x);w=-Af(T,d)-Math.PI,C8=s,E8=f}var b=S8(_,[Il(w),0]),p=S8(y,[Js(w),0]);t=Af(b[1]+p[1],b[0]+p[0])/Math.PI*180,o==="previous"&&!(Ng===r.uid&&e.i===Ig+1)&&(t=null)}if(o==="previous"&&!r._geo)if(Ng===r.uid&&e.i===Ig+1&&ql(n)&&ql(a)){var c=n-L8,A=a-R8,h=r.line&&r.line.shape||"",R=h.slice(h.length-1);R==="h"&&(A=0),R==="v"&&(c=0),t+=Af(A,c)/Math.PI*180+90}else t=null}return L8=n,R8=a,Ig=e.i,Ng=r.uid,t}ur.getMarkerAngle=Bg});var Sf=pe((Ace,W8)=>{"use strict";var Ks=it(),dW=rt(),pW=ln(),Ug=Er(),Ol=ir(),V8=Ol.strTranslate,wv=yt(),Mv=Zr(),Qs=Yn(),G8=Dc(),gW=qn().OPPOSITE_SIDE,Y8=/ [XY][0-9]* /,Hg=1.6,Vg=1.6;function yW(e,r,t){var n=e._fullLayout,a=t.propContainer,o=t.propName,i=t.placeholder,l=t.traceIndex,u=t.avoid||{},s=t.attributes,f=t.transform,v=t.containerGroup,g=1,_=a.title,y=(_&&_.text?_.text:"").trim(),w=!1,M=_&&_.font?_.font:{},m=M.family,k=M.size,S=M.color,x=M.weight,T=M.style,d=M.variant,b=M.textcase,p=M.lineposition,c=M.shadow,A=t.subtitlePropName,h=!!A,R=t.subtitlePlaceholder,E=(a.title||{}).subtitle||{text:"",font:{}},D=E.text.trim(),N=!1,I=1,F=E.font,L=F.family,P=F.size,O=F.color,U=F.weight,X=F.style,j=F.variant,$=F.textcase,Y=F.lineposition,q=F.shadow,Z;o==="title.text"?Z="titleText":o.indexOf("axis")!==-1?Z="axisTitleText":o.indexOf("colorbar"!==-1)&&(Z="colorbarTitleText");var ne=e._context.edits[Z];function Q(ke,De){return ke===void 0||De===void 0?!1:ke.replace(Y8," % ")===De.replace(Y8," % ")}y===""?g=0:Q(y,i)&&(ne||(y=""),g=.2,w=!0),h&&(D===""?I=0:Q(D,R)&&(ne||(D=""),I=.2,N=!0)),t._meta?y=Ol.templateString(y,t._meta):n._meta&&(y=Ol.templateString(y,n._meta));var oe=y||D||ne,ee;v||(v=Ol.ensureSingle(n._infolayer,"g","g-"+r),ee=n._hColorbarMoveTitle);var G=v.selectAll("text."+r).data(oe?[0]:[]);G.enter().append("text"),G.text(y).attr("class",r),G.exit().remove();var re=null,H=r+"-subtitle",te=D||ne;if(h&&te&&(re=v.selectAll("text."+H).data(te?[0]:[]),re.enter().append("text"),re.text(D).attr("class",H),re.exit().remove()),!oe)return v;function ue(ke,De){Ol.syncOrAsync([de,Ee],{title:ke,subtitle:De})}function de(ke){var De=ke.title,Ce=ke.subtitle,Oe;!f&&ee&&(f={}),f?(Oe="",f.rotate&&(Oe+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||ee)&&(Oe+=V8(0,(f.offset||0)-(ee||0)))):Oe=null,De.attr("transform",Oe);function Ue(me){if(me){var he=Ks.select(me.node().parentNode).select("."+H);if(!he.empty()){var be=me.node().getBBox();if(be.height){var Se=be.y+be.height+Hg*P;he.attr("y",Se)}}}}if(De.style("opacity",g*Mv.opacity(S)).call(wv.font,{color:Mv.rgb(S),size:Ks.round(k,2),family:m,weight:x,style:T,variant:d,textcase:b,shadow:c,lineposition:p}).attr(s).call(Qs.convertToTspans,e,Ue),Ce){var ge=v.select("."+r+"-math-group"),Te=De.node().getBBox(),ce=ge.node()?ge.node().getBBox():void 0,ye=ce?ce.y+ce.height+Hg*P:Te.y+Te.height+Vg*P,Le=Ol.extendFlat({},s,{y:ye});Ce.attr("transform",Oe),Ce.style("opacity",I*Mv.opacity(O)).call(wv.font,{color:Mv.rgb(O),size:Ks.round(P,2),family:L,weight:U,style:X,variant:j,textcase:$,shadow:q,lineposition:Y}).attr(Le).call(Qs.convertToTspans,e)}return pW.previousPromises(e)}function Ee(ke){var De=ke.title,Ce=Ks.select(De.node().parentNode);if(u&&u.selection&&u.side&&y){Ce.attr("transform",null);var Oe=gW[u.side],Ue=u.side==="left"||u.side==="top"?-1:1,ge=dW(u.pad)?u.pad:2,Te=wv.bBox(Ce.node()),ce={t:0,b:0,l:0,r:0},ye=e._fullLayout._reservedMargin;for(var Le in ye)for(var me in ye[Le]){var he=ye[Le][me];ce[me]=Math.max(ce[me],he)}var be={left:ce.l,top:ce.t,right:n.width-ce.r,bottom:n.height-ce.b},Se=u.maxShift||Ue*(be[u.side]-Te[u.side]),ze=0;if(Se<0)ze=Se;else{var Fe=u.offsetLeft||0,Je=u.offsetTop||0;Te.left-=Fe,Te.right-=Fe,Te.top-=Je,Te.bottom-=Je,u.selection.each(function(){var Ge=wv.bBox(this);Ol.bBoxIntersect(Te,Ge,ge)&&(ze=Math.max(ze,Ue*(Ge[u.side]-Te[Oe])+ge))}),ze=Math.min(Se,ze),a._titleScoot=Math.abs(ze)}if(ze>0||Se<0){var Ye={left:[-ze,0],right:[ze,0],top:[0,-ze],bottom:[0,ze]}[u.side];Ce.attr("transform",V8(Ye[0],Ye[1]))}}}G.call(ue,re);function Me(ke,De){ke.text(De).on("mouseover.opacity",function(){Ks.select(this).transition().duration(G8.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Ks.select(this).transition().duration(G8.HIDE_PLACEHOLDER).style("opacity",0)})}if(ne&&(y?G.on(".opacity",null):(Me(G,i),w=!0),G.call(Qs.makeEditable,{gd:e}).on("edit",function(ke){l!==void 0?Ug.call("_guiRestyle",e,o,ke,l):Ug.call("_guiRelayout",e,o,ke)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ue)}).on("input",function(ke){this.text(ke||" ").call(Qs.positionText,s.x,s.y)}),h)){if(h&&!y){var ve=G.node().getBBox(),Ae=ve.y+ve.height+Vg*P;re.attr("y",Ae)}D?re.on(".opacity",null):(Me(re,R),N=!0),re.call(Qs.makeEditable,{gd:e}).on("edit",function(ke){Ug.call("_guiRelayout",e,"title.subtitle.text",ke)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ue)}).on("input",function(ke){this.text(ke||" ").call(Qs.positionText,re.attr("x"),re.attr("y"))})}return G.classed("js-placeholder",w),re&&re.classed("js-placeholder",N),v}W8.exports={draw:yW,SUBTITLE_PADDING_EM:Vg,SUBTITLE_PADDING_MATHJAX_EM:Hg}});var Rv=pe((kce,Q8)=>{"use strict";var mW=it(),xW=ks().utcFormat,mt=ir(),bW=mt.numberFormat,Ri=rt(),Oo=mt.cleanNumber,_W=mt.ms2DateTime,X8=mt.dateTime2ms,Di=mt.ensureNumber,Z8=mt.isArrayOrTypedArray,Bo=nn(),Tv=Bo.FP_SAFE,ri=Bo.BADNUM,wW=Bo.LOG_CLIP,MW=Bo.ONEWEEK,Av=Bo.ONEDAY,kv=Bo.ONEHOUR,J8=Bo.ONEMIN,K8=Bo.ONESEC,Sv=on(),Lv=wn(),Cv=Lv.HOUR_PATTERN,Ev=Lv.WEEKDAY_PATTERN;function Cf(e){return Math.pow(10,e)}function Gg(e){return e!=null}Q8.exports=function(r,t){t=t||{};var n=r._id||"x",a=n.charAt(0);function o(x,T){if(x>0)return Math.log(x)/Math.LN10;if(x<=0&&T&&r.range&&r.range.length===2){var d=r.range[0],b=r.range[1];return .5*(d+b-2*wW*Math.abs(d-b))}else return ri}function i(x,T,d,b){if((b||{}).msUTC&&Ri(x))return+x;var p=X8(x,d||r.calendar);if(p===ri)if(Ri(x)){x=+x;var c=Math.floor(mt.mod(x+.05,1)*10),A=Math.round(x-c/10);p=X8(new Date(A))+c/10}else return ri;return p}function l(x,T,d){return _W(x,T,d||r.calendar)}function u(x){return r._categories[Math.round(x)]}function s(x){if(Gg(x)){if(r._categoriesMap===void 0&&(r._categoriesMap={}),r._categoriesMap[x]!==void 0)return r._categoriesMap[x];r._categories.push(typeof x=="number"?String(x):x);var T=r._categories.length-1;return r._categoriesMap[x]=T,T}return ri}function f(x,T){for(var d=new Array(T),b=0;br.range[1]&&(d=!d);for(var b=d?-1:1,p=b*x,c=0,A=0;AR)c=A+1;else{c=p<(h+R)/2?A:A+1;break}}var E=r._B[c]||0;return isFinite(E)?y(x,r._m2,E):0},m=function(x){var T=r._rangebreaks.length;if(!T)return w(x,r._m,r._b);for(var d=0,b=0;br._rangebreaks[b].pmax&&(d=b+1);return w(x,r._m2,r._B[d])}}r.c2l=r.type==="log"?o:Di,r.l2c=r.type==="log"?Cf:Di,r.l2p=M,r.p2l=m,r.c2p=r.type==="log"?function(x,T){return M(o(x,T))}:M,r.p2c=r.type==="log"?function(x){return Cf(m(x))}:m,["linear","-"].indexOf(r.type)!==-1?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=Oo,r.c2d=r.c2r=r.l2d=r.l2r=Di,r.d2p=r.r2p=function(x){return r.l2p(Oo(x))},r.p2d=r.p2r=m,r.cleanPos=Di):r.type==="log"?(r.d2r=r.d2l=function(x,T){return o(Oo(x),T)},r.r2d=r.r2c=function(x){return Cf(Oo(x))},r.d2c=r.r2l=Oo,r.c2d=r.l2r=Di,r.c2r=o,r.l2d=Cf,r.d2p=function(x,T){return r.l2p(r.d2r(x,T))},r.p2d=function(x){return Cf(m(x))},r.r2p=function(x){return r.l2p(Oo(x))},r.p2r=m,r.cleanPos=Di):r.type==="date"?(r.d2r=r.r2d=mt.identity,r.d2c=r.r2c=r.d2l=r.r2l=i,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(x,T,d){return r.l2p(i(x,0,d))},r.p2d=r.p2r=function(x,T,d){return l(m(x),T,d)},r.cleanPos=function(x){return mt.cleanDate(x,ri,r.calendar)}):r.type==="category"?(r.d2c=r.d2l=s,r.r2d=r.c2d=r.l2d=u,r.d2r=r.d2l_noadd=g,r.r2c=function(x){var T=_(x);return T!==void 0?T:r.fraction2r(.5)},r.l2r=r.c2r=Di,r.r2l=_,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return u(m(x))},r.r2p=r.d2p,r.p2r=m,r.cleanPos=function(x){return typeof x=="string"&&x!==""?x:Di(x)}):r.type==="multicategory"&&(r.r2d=r.c2d=r.l2d=u,r.d2r=r.d2l_noadd=g,r.r2c=function(x){var T=g(x);return T!==void 0?T:r.fraction2r(.5)},r.r2c_just_indices=v,r.l2r=r.c2r=Di,r.r2l=g,r.d2p=function(x){return r.l2p(r.r2c(x))},r.p2d=function(x){return u(m(x))},r.r2p=r.d2p,r.p2r=m,r.cleanPos=function(x){return Array.isArray(x)||typeof x=="string"&&x!==""?x:Di(x)},r.setupMultiCategory=function(x){var T=r._traceIndices,d,b,p=r._matchGroup;if(p&&r._categories.length===0){for(var c in p)if(c!==n){var A=t[Sv.id2name(c)];T=T.concat(A._traceIndices)}}var h=[[0,{}],[0,{}]],R=[];for(d=0;dA[1]&&(b[c?0:1]=d),b[0]===b[1]){var h=r.l2r(T),R=r.l2r(d);if(T!==void 0){var E=h+1;d!==void 0&&(E=Math.min(E,R)),b[c?1:0]=E}if(d!==void 0){var D=R+1;T!==void 0&&(D=Math.max(D,h)),b[c?0:1]=D}}}},r.cleanRange=function(x,T){r._cleanRange(x,T),r.limitRange(x)},r._cleanRange=function(x,T){T||(T={}),x||(x="range");var d=mt.nestedProperty(r,x).get(),b,p;if(r.type==="date"?p=mt.dfltRange(r.calendar):a==="y"?p=Lv.DFLTRANGEY:r._name==="realaxis"?p=[0,1]:p=T.dfltRange||Lv.DFLTRANGEX,p=p.slice(),(r.rangemode==="tozero"||r.rangemode==="nonnegative")&&(p[0]=0),!d||d.length!==2){mt.nestedProperty(r,x).set(p);return}var c=d[0]===null,A=d[1]===null;for(r.type==="date"&&!r.autorange&&(d[0]=mt.cleanDate(d[0],ri,r.calendar),d[1]=mt.cleanDate(d[1],ri,r.calendar)),b=0;b<2;b++)if(r.type==="date"){if(!mt.isDateTime(d[b],r.calendar)){r[x]=p;break}if(r.r2l(d[0])===r.r2l(d[1])){var h=mt.constrain(r.r2l(d[0]),mt.MIN_MS+1e3,mt.MAX_MS-1e3);d[0]=r.l2r(h-1e3),d[1]=r.l2r(h+1e3);break}}else{if(!Ri(d[b]))if(!(c||A)&&Ri(d[1-b]))d[b]=d[1-b]*(b?10:.1);else{r[x]=p;break}if(d[b]<-Tv?d[b]=-Tv:d[b]>Tv&&(d[b]=Tv),d[0]===d[1]){var R=Math.max(1,Math.abs(d[0]*1e-6));d[0]-=R,d[1]+=R}}},r.setScale=function(x){var T=t._size;if(r.overlaying){var d=Sv.getFromId({_fullLayout:t},r.overlaying);r.domain=d.domain}var b=x&&r._r?"_r":"range",p=r.calendar;r.cleanRange(b);var c=r.r2l(r[b][0],p),A=r.r2l(r[b][1],p),h=a==="y";if(h?(r._offset=T.t+(1-r.domain[1])*T.h,r._length=T.h*(r.domain[1]-r.domain[0]),r._m=r._length/(c-A),r._b=-r._m*A):(r._offset=T.l+r.domain[0]*T.w,r._length=T.w*(r.domain[1]-r.domain[0]),r._m=r._length/(A-c),r._b=-r._m*c),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks){var R,E;if(r._rangebreaks=r.locateBreaks(Math.min(c,A),Math.max(c,A)),r._rangebreaks.length){for(R=0;RA&&(D=!D),D&&r._rangebreaks.reverse();var N=D?-1:1;for(r._m2=N*r._length/(Math.abs(A-c)-r._lBreaks),r._B.push(-r._m2*(h?A:c)),R=0;Rp&&(p+=7,cp&&(p+=24,c=b&&c=b&&x=q.min&&(Xq.max&&(q.max=j),$=!1)}$&&A.push({min:X,max:j})}};for(d=0;d{"use strict";var $8=rt(),Yg=ir(),TW=nn().BADNUM,Dv=Yg.isArrayOrTypedArray,AW=Yg.isDateTime,kW=Yg.cleanNumber,j8=Math.round;rM.exports=function(r,t,n){var a=r,o=n.noMultiCategory;if(Dv(a)&&!a.length)return"-";if(!o&&RW(a))return"multicategory";if(o&&Array.isArray(a[0])){for(var i=[],l=0;lo*2}function eM(e){return Math.max(1,(e-1)/1e3)}function LW(e,r){for(var t=e.length,n=eM(t),a=0,o=0,i={},l=0;la*2}function RW(e){return Dv(e[0])&&Dv(e[1])}});var $s=pe((Cce,uM)=>{"use strict";var DW=it(),iM=rt(),Uo=ir(),Pv=nn().FP_SAFE,PW=Er(),FW=yt(),oM=on(),IW=oM.getFromId,NW=oM.isLinked;uM.exports={applyAutorangeOptions:sM,getAutoRange:Xg,makePadFn:Zg,doAutoRange:qW,findExtremes:OW,concatExtremes:Qg};function Xg(e,r){var t,n,a=[],o=e._fullLayout,i=Zg(o,r,0),l=Zg(o,r,1),u=Qg(e,r),s=u.min,f=u.max;if(s.length===0||f.length===0)return Uo.simpleMap(r.range,r.r2l);var v=s[0].val,g=f[0].val;for(t=1;t0&&(A=S-i(d)-l(b),A>x?h/A>T&&(p=d,c=b,T=h/A):h/S>T&&(p={val:d.val,nopad:1},c={val:b.val,nopad:1},T=h/S));function R(F,L){return Math.max(F,l(L))}if(v===g){var E=v-1,D=v+1;if(m)if(v===0)a=[0,1];else{var N=(v>0?f:s).reduce(R,0),I=v/(1-Math.min(.5,N/S));a=v>0?[0,I]:[I,0]}else k?a=[Math.max(0,E),Math.max(1,D)]:a=[E,D]}else m?(p.val>=0&&(p={val:0,nopad:1}),c.val<=0&&(c={val:0,nopad:1})):k&&(p.val-T*i(p)<0&&(p={val:0,nopad:1}),c.val<=0&&(c={val:1,nopad:1})),T=(c.val-p.val-tM(r,d.val,b.val))/(S-i(p)-l(c)),a=[p.val-T*i(p),c.val+T*l(c)];return a=sM(a,r),r.limitRange&&r.limitRange(),y&&a.reverse(),Uo.simpleMap(a,r.l2r||Number)}function tM(e,r,t){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(r,t),o=0;o0?t.ppadplus:t.ppadminus)||t.ppad||0),d=x((e._m>0?t.ppadminus:t.ppadplus)||t.ppad||0),b=x(t.vpadplus||t.vpad),p=x(t.vpadminus||t.vpad);if(!s){if(k=1/0,S=-1/0,u)for(v=0;v0&&(k=g),g>S&&g-Pv&&(k=g),g>S&&g=h;v--)A(v);return{min:n,max:a,opts:t}}function Jg(e,r,t,n){lM(e,r,t,n,BW)}function Kg(e,r,t,n){lM(e,r,t,n,UW)}function lM(e,r,t,n,a){for(var o=n.tozero,i=n.extrapad,l=!0,u=0;u=t&&(s.extrapad||!i)){l=!1;break}else a(r,s.val)&&s.pad<=t&&(i||!s.extrapad)&&(e.splice(u,1),u--)}if(l){var f=o&&r===0;e.push({val:r,pad:f?0:t,extrapad:f?!1:i})}}function aM(e){return iM(e)&&Math.abs(e)=r}function HW(e,r){var t=r.autorangeoptions;return t&&t.minallowed!==void 0&&Fv(r,t.minallowed,t.maxallowed)?t.minallowed:t&&t.clipmin!==void 0&&Fv(r,t.clipmin,t.clipmax)?Math.max(e,r.d2l(t.clipmin)):e}function VW(e,r){var t=r.autorangeoptions;return t&&t.maxallowed!==void 0&&Fv(r,t.minallowed,t.maxallowed)?t.maxallowed:t&&t.clipmax!==void 0&&Fv(r,t.clipmin,t.clipmax)?Math.min(e,r.d2l(t.clipmax)):e}function Fv(e,r,t){return r!==void 0&&t!==void 0?(r=e.d2l(r),t=e.d2l(t),r=u&&(o=u,t=u),i<=u&&(i=u,n=u)}}return t=HW(t,r),n=VW(n,r),[t,n]}});var St=pe((Ece,RM)=>{"use strict";var Da=it(),Wt=rt(),js=ln(),Lf=Er(),Lr=ir(),eu=Lr.strTranslate,Bl=Yn(),GW=Sf(),Rf=Zr(),pa=yt(),YW=Ra(),fM=dg(),Tn=nn(),WW=Tn.ONEMAXYEAR,zv=Tn.ONEAVGYEAR,qv=Tn.ONEMINYEAR,XW=Tn.ONEMAXQUARTER,r2=Tn.ONEAVGQUARTER,Ov=Tn.ONEMINQUARTER,ZW=Tn.ONEMAXMONTH,ru=Tn.ONEAVGMONTH,Bv=Tn.ONEMINMONTH,ga=Tn.ONEWEEK,On=Tn.ONEDAY,Ho=On/2,Fi=Tn.ONEHOUR,Df=Tn.ONEMIN,Uv=Tn.ONESEC,JW=Tn.ONEMILLI,KW=Tn.ONEMICROSEC,Ul=Tn.MINUS_SIGN,Gv=Tn.BADNUM,t2={K:"zeroline"},n2={K:"gridline",L:"path"},a2={K:"minor-gridline",L:"path"},_M={K:"tick",L:"path"},cM={K:"tick",L:"text"},vM={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Yv=qn(),Ef=Yv.MID_SHIFT,Hl=Yv.CAP_SHIFT,Pf=Yv.LINE_SPACING,QW=Yv.OPPOSITE_SIDE,Hv=3,lr=RM.exports={};lr.setConvert=Rv();var $W=Wg(),no=on(),jW=no.idSort,eX=no.isLinked;lr.id2name=no.id2name;lr.name2id=no.name2id;lr.cleanId=no.cleanId;lr.list=no.list;lr.listIds=no.listIds;lr.getFromId=no.getFromId;lr.getFromTrace=no.getFromTrace;var wM=$s();lr.getAutoRange=wM.getAutoRange;lr.findExtremes=wM.findExtremes;var rX=1e-4;function s2(e){var r=(e[1]-e[0])*rX;return[e[0]-r,e[1]+r]}lr.coerceRef=function(e,r,t,n,a,o){var i=n.charAt(n.length-1),l=t._fullLayout._subplots[i+"axis"],u=n+"ref",s={};return a||(a=l[0]||(typeof o=="string"?o:o[0])),o||(o=a),l=l.concat(l.map(function(f){return f+" domain"})),s[u]={valType:"enumerated",values:l.concat(o?typeof o=="string"?[o]:o:[]),dflt:a},Lr.coerce(e,r,s,u)};lr.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};lr.coercePosition=function(e,r,t,n,a,o){var i,l,u=lr.getRefType(n);if(u!=="range")i=Lr.ensureNumber,l=t(a,o);else{var s=lr.getFromId(r,n);o=s.fraction2r(o),l=t(a,o),i=s.cleanPos}e[a]=i(l)};lr.cleanPosition=function(e,r,t){var n=t==="paper"||t==="pixel"?Lr.ensureNumber:lr.getFromId(r,t).cleanPos;return n(e)};lr.redrawComponents=function(e,r){r=r||lr.listIds(e);var t=e._fullLayout;function n(a,o,i,l){for(var u=Lf.getComponentMethod(a,o),s={},f=0;f2e-6||((t-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};lr.saveRangeInitial=function(e,r){for(var t=lr.list(e,"",!0),n=!1,a=0;av*.3||s(n)||s(a))){var g=t.dtick/2;e+=e+gi){var l=Number(t.substr(1));o.exactYears>i&&l%12===0?e=lr.tickIncrement(e,"M6","reverse")+On*1.5:o.exactMonths>i?e=lr.tickIncrement(e,"M1","reverse")+On*15.5:e-=Ho;var u=lr.tickIncrement(e,t);if(u<=n)return u}return e}lr.prepMinorTicks=function(e,r,t){if(!r.minor.dtick){delete e.dtick;var n=r.dtick&&Wt(r._tmin),a;if(n){var o=lr.tickIncrement(r._tmin,r.dtick,!0);a=[r._tmin,o*.99+r._tmin*.01]}else{var i=Lr.simpleMap(r.range,r.r2l);a=[i[0],.8*i[0]+.2*i[1]]}if(e.range=Lr.simpleMap(a,r.l2r),e._isMinor=!0,lr.prepTicks(e,t),n){var l=Wt(r.dtick),u=Wt(e.dtick),s=l?r.dtick:+r.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);l&&u?$g(s,f)?s===2*ga&&f===2*On&&(e.dtick=ga):s===2*ga&&f===3*On?e.dtick=ga:s===ga&&!(r._input.minor||{}).nticks?e.dtick=On:pM(s/f,2.5)?e.dtick=s/2:e.dtick=s:String(r.dtick).charAt(0)==="M"?u?e.dtick="M1":$g(s,f)?s>=12&&f===2&&(e.dtick="M3"):e.dtick=r.dtick:String(e.dtick).charAt(0)==="L"?String(r.dtick).charAt(0)==="L"?$g(s,f)||(e.dtick=pM(s/f,2.5)?r.dtick/2:r.dtick):e.dtick="D1":e.dtick==="D2"&&+r.dtick>1&&(e.dtick=1)}e.range=r.range}r.minor._tick0Init===void 0&&(e.tick0=r.tick0)};function $g(e,r){return Math.abs((e/r+.5)%1-.5)<.001}function pM(e,r){return Math.abs(e/r-1)<.001}lr.prepTicks=function(e,r){var t=Lr.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?Lr.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=Lr.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(t[1]-t[0])/n,lr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(o=n-1,i=n):(o=n,i=n);var l=e[o].value,u=e[i].value,s=Math.abs(u-l),f=t||s,v=0;f>=qv?s>=qv&&s<=WW?v=s:v=zv:t===r2&&f>=Ov?s>=Ov&&s<=XW?v=s:v=r2:f>=Bv?s>=Bv&&s<=ZW?v=s:v=ru:t===ga&&f>=ga?v=ga:f>=On?v=On:t===Ho&&f>=Ho?v=Ho:t===Fi&&f>=Fi&&(v=Fi);var g;v>=s&&(v=s,g=!0);var _=a+v;if(r.rangebreaks&&v>0){for(var y=84,w=0,M=0;Mga&&(v=s)}(v>0||n===0)&&(e[n].periodX=a+v/2)}}lr.calcTicks=function(r,t){for(var n=r.type,a=r.calendar,o=r.ticklabelstep,i=r.ticklabelmode==="period",l=r.range[0]>r.range[1],u=!r.ticklabelindex||Lr.isArrayOrTypedArray(r.ticklabelindex)?r.ticklabelindex:[r.ticklabelindex],s=Lr.simpleMap(r.range,r.r2l,void 0,void 0,t),f=s[1]=(S?0:1);x--){var T=!x;x?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var d=x?r:Lr.extendFlat({},r,r.minor);if(T?lr.prepMinorTicks(d,r,t):lr.prepTicks(d,t),d.tickmode==="array"){x?(M=[],y=gM(r,!T)):(m=[],w=gM(r,!T));continue}if(d.tickmode==="sync"){M=[],y=lX(r);continue}var b=s2(s),p=b[0],c=b[1],A=Wt(d.dtick),h=n==="log"&&!(A||d.dtick.charAt(0)==="L"),R=lr.tickFirst(d,t);if(x){if(r._tmin=R,R=c:D<=c;D=lr.tickIncrement(D,F,f,a)){if(x&&N++,d.rangebreaks&&!f){if(D=g)break}if(M.length>_||D===E)break;E=D;var L={value:D};x?(h&&D!==(D|0)&&(L.simpleLabel=!0),o>1&&N%o&&(L.skipLabel=!0),M.push(L)):(L.minor=!0,m.push(L))}}if(!m||m.length<2)u=!1;else{var P=(m[1].value-m[0].value)*(l?-1:1);RX(P,r.tickformat)||(u=!1)}if(!u)k=M;else{var O=M.concat(m);i&&M.length&&(O=O.slice(1)),O=O.sort(function(Ae,ke){return Ae.value-ke.value}).filter(function(Ae,ke,De){return ke===0||Ae.value!==De[ke-1].value});var U=O.map(function(Ae,ke){return Ae.minor===void 0&&!Ae.skipLabel?ke:null}).filter(function(Ae){return Ae!==null});U.forEach(function(Ae){u.map(function(ke){var De=Ae+ke;De>=0&&De-1;oe--){if(M[oe].drop){M.splice(oe,1);continue}M[oe].value=e2(M[oe].value,r);var H=r.c2p(M[oe].value);(ee?re>H-G:reg||Ceg&&(De.periodX=g),Cea&&gzv)r/=zv,n=a(10),e.dtick="M"+12*Pi(r,n,Iv);else if(o>ru)r/=ru,e.dtick="M"+Pi(r,1,yM);else if(o>On){if(e.dtick=Pi(r,On,e._hasDayOfWeekBreaks?[1,2,7,14]:sX),!t){var i=lr.getTickFormat(e),l=e.ticklabelmode==="period";l&&(e._rawTick0=e.tick0),/%[uVW]/.test(i)?e.tick0=Lr.dateTick0(e.calendar,2):e.tick0=Lr.dateTick0(e.calendar,1),l&&(e._dowTick0=e.tick0)}}else o>Fi?e.dtick=Pi(r,Fi,yM):o>Df?e.dtick=Pi(r,Df,mM):o>Uv?e.dtick=Pi(r,Uv,mM):(n=a(10),e.dtick=Pi(r,n,Iv))}else if(e.type==="log"){e.tick0=0;var u=Lr.simpleMap(e.range,e.r2l);if(e._isMinor&&(r*=1.5),r>.7)e.dtick=Math.ceil(r);else if(Math.abs(u[1]-u[0])<1){var s=1.5*Math.abs((u[1]-u[0])/r);r=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/s,n=a(10),e.dtick="L"+Pi(r,n,Iv)}else e.dtick=r>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(r,1))):c2(e)?(e.tick0=0,n=1,e.dtick=Pi(r,n,uX)):(e.tick0=0,n=a(10),e.dtick=Pi(r,n,Iv));if(e.dtick===0&&(e.dtick=1),!Wt(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function kM(e){var r=e.dtick;if(e._tickexponent=0,!Wt(r)&&typeof r!="string"&&(r=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var t=e.r2l(e.tick0),n=e.l2r(t).replace(/(^-|i)/g,""),a=n.length;if(String(r).charAt(0)==="M")a>10||n.substr(5)!=="01-01"?e._tickround="d":e._tickround=+r.substr(1)%12===0?"y":"m";else if(r>=On&&a<=10||r>=On*15)e._tickround="d";else if(r>=Df&&a<=16||r>=Fi)e._tickround="M";else if(r>=Uv&&a<=19||r>=Df)e._tickround="S";else{var o=e.l2r(t+r).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(Wt(r)||r.charAt(0)==="L"){var i=e.range.map(e.r2d||Number);Wt(r)||(r=Number(r.substr(1))),e._tickround=2-Math.floor(Math.log(r)/Math.LN10+.01);var l=Math.max(Math.abs(i[0]),Math.abs(i[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),s=e.minexponent===void 0?3:e.minexponent;Math.abs(u)>s&&(Vv(e.exponentformat)&&!u2(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}lr.tickIncrement=function(e,r,t,n){var a=t?-1:1;if(Wt(r))return Lr.increment(e,a*r);var o=r.charAt(0),i=a*Number(r.substr(1));if(o==="M")return Lr.incrementMonth(e,i,n);if(o==="L")return Math.log(Math.pow(10,e)+i)/Math.LN10;if(o==="D"){var l=r==="D2"?AM:TM,u=e+a*.01,s=Lr.roundUp(Lr.mod(u,1),l,t);return Math.floor(u)+Math.log(Da.round(Math.pow(10,s),1))/Math.LN10}throw"unrecognized dtick "+String(r)};lr.tickFirst=function(e,r){var t=e.r2l||Number,n=Lr.simpleMap(e.range,t,void 0,void 0,r),a=n[1]=0&&m<=e._length?M:null};if(o&&Lr.isArrayOrTypedArray(e.ticktext)){var v=Lr.simpleMap(e.range,e.r2l),g=(Math.abs(v[1]-v[0])-(e._lBreaks||0))/1e4;for(s=0;s"+l;else{var s=If(e),f=e._trueSide||e.side;(!s&&f==="top"||s&&f==="bottom")&&(i+="
")}r.text=i}function cX(e,r,t,n,a){var o=e.dtick,i=r.x,l=e.tickformat,u=typeof o=="string"&&o.charAt(0);if(a==="never"&&(a=""),n&&u!=="L"&&(o="L3",u="L"),l||u==="L")r.text=Ff(Math.pow(10,i),e,a,n);else if(Wt(o)||u==="D"&&Lr.mod(i+.01,1)<.1){var s=Math.round(i),f=Math.abs(s),v=e.exponentformat;v==="power"||Vv(v)&&u2(s)?(s===0?r.text=1:s===1?r.text="10":r.text="10"+(s>1?"":Ul)+f+"",r.fontSize*=1.25):(v==="e"||v==="E")&&f>2?r.text="1"+v+(s>0?"+":Ul)+f:(r.text=Ff(Math.pow(10,i),e,"","fakehover"),o==="D1"&&e._id.charAt(0)==="y"&&(r.dy-=r.fontSize/6))}else if(u==="D")r.text=String(Math.round(Math.pow(10,Lr.mod(i,1)))),r.fontSize*=.75;else throw"unrecognized dtick "+String(o);if(e.dtick==="D1"){var g=String(r.text).charAt(0);(g==="0"||g==="1")&&(e._id.charAt(0)==="y"?r.dx-=r.fontSize/4:(r.dy+=r.fontSize/2,r.dx+=(e.range[1]>e.range[0]?1:-1)*r.fontSize*(i<0?.5:.25)))}}function vX(e,r){var t=e._categories[Math.round(r.x)];t===void 0&&(t=""),r.text=String(t)}function hX(e,r,t){var n=Math.round(r.x),a=e._categories[n]||[],o=a[1]===void 0?"":String(a[1]),i=a[0]===void 0?"":String(a[0]);t?r.text=i+" - "+o:(r.text=o,r.text2=i)}function dX(e,r,t,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(r.x/e.dtick)<1e-6&&(a="hide"),r.text=Ff(r.x,e,a,n)}function pX(e,r,t,n,a){if(e.thetaunit==="radians"&&!t){var o=r.x/180;if(o===0)r.text="0";else{var i=gX(o);if(i[1]>=100)r.text=Ff(Lr.deg2rad(r.x),e,a,n);else{var l=r.x<0;i[1]===1?i[0]===1?r.text="\u03C0":r.text=i[0]+"\u03C0":r.text=["",i[0],"","\u2044","",i[1],"","\u03C0"].join(""),l&&(r.text=Ul+r.text)}}}else r.text=Ff(r.x,e,a,n)}function gX(e){function r(l,u){return Math.abs(l-u)<=1e-6}function t(l,u){return r(u,0)?l:t(u,l%u)}function n(l){for(var u=1;!r(Math.round(l*u)/u,l);)u*=10;return u}var a=n(e),o=e*a,i=Math.abs(t(o,a));return[Math.round(o/i),Math.round(a/i)]}var yX=["f","p","n","\u03BC","m","","k","M","G","T"];function Vv(e){return e==="SI"||e==="B"}function u2(e){return e>14||e<-15}function Ff(e,r,t,n){var a=e<0,o=r._tickround,i=t||r.exponentformat||"B",l=r._tickexponent,u=lr.getTickFormat(r),s=r.separatethousands;if(n){var f={exponentformat:i,minexponent:r.minexponent,dtick:r.showexponent==="none"?r.dtick:Wt(e)&&Math.abs(e)||1,range:r.showexponent==="none"?r.range.map(r.r2d):[0,e||1]};kM(f),o=(Number(f._tickround)||0)+4,l=f._tickexponent,r.hoverformat&&(u=r.hoverformat)}if(u)return r._numFormat(u)(e).replace(/-/g,Ul);var v=Math.pow(10,-o)/2;if(i==="none"&&(l=0),e=Math.abs(e),e"+y+"":i==="B"&&l===9?e+="B":Vv(i)&&(e+=yX[l/3+5])}return a?Ul+e:e}lr.getTickFormat=function(e){var r;function t(u){return typeof u!="string"?u:Number(u.replace("M",""))*ru}function n(u,s){var f=["L","D"];if(typeof u==typeof s){if(typeof u=="number")return u-s;var v=f.indexOf(u.charAt(0)),g=f.indexOf(s.charAt(0));return v===g?Number(u.replace(/(L|D)/g,""))-Number(s.replace(/(L|D)/g,"")):v-g}else return typeof u=="number"?1:-1}function a(u,s,f){var v=f||function(y){return y},g=s[0],_=s[1];return(!g&&typeof g!="number"||v(g)<=v(u))&&(!_&&typeof _!="number"||v(_)>=v(u))}function o(u,s){var f=s[0]===null,v=s[1]===null,g=n(u,s[0])>=0,_=n(u,s[1])<=0;return(f||g)&&(v||_)}var i,l;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(r=0;r=0&&a.unshift(a.splice(f,1).shift())}});var l={false:{left:0,right:0}};return Lr.syncOrAsync(a.map(function(u){return function(){if(u){var s=lr.getFromId(e,u);t||(t={}),t.axShifts=l,t.overlayingShiftedAx=i;var f=lr.drawOne(e,s,t);return s._shiftPusher&&l2(s,s._fullDepth||0,l,!0),s._r=s.range.slice(),s._rl=Lr.simpleMap(s._r,s.r2l),f}}}))};lr.drawOne=function(e,r,t){t=t||{};var n=t.axShifts||{},a=t.overlayingShiftedAx||[],o,i,l;r.setScale();var u=e._fullLayout,s=r._id,f=s.charAt(0),v=lr.counterLetter(s),g=u._plots[r._mainSubplot];if(!g)return;if(r._shiftPusher=r.autoshift||a.indexOf(r._id)!==-1||a.indexOf(r.overlaying)!==-1,r._shiftPusher&r.anchor==="free"){var _=r.linewidth/2||0;r.ticks==="inside"&&(_+=r.ticklen),l2(r,_,n,!0),l2(r,r.shift||0,n,!1)}(t.skipTitle!==!0||r._shift===void 0)&&(r._shift=LX(r,n));var y=g[f+"axislayer"],w=r._mainLinePosition,M=w+=r._shift,m=r._mainMirrorPosition,k=r._vals=lr.calcTicks(r),S=[r.mirror,M,m].join("_");for(o=0;o0?De.bottom-Ae:0,ke))));var ge=0,Te=0;if(r._shiftPusher&&(ge=Math.max(ke,De.height>0?Me==="l"?Ae-De.left:De.right-Ae:0),r.title.text!==u._dfltTitle[f]&&(Te=(r._titleStandoff||0)+(r._titleScoot||0),Me==="l"&&(Te+=bM(r))),r._fullDepth=Math.max(ge,Te)),r.automargin){Ce={x:0,y:0,r:0,l:0,t:0,b:0};var ce=[0,1],ye=typeof r._shift=="number"?r._shift:0;if(f==="x"){if(Me==="b"?Ce[Me]=r._depth:(Ce[Me]=r._depth=Math.max(De.width>0?Ae-De.top:0,ke),ce.reverse()),De.width>0){var Le=De.right-(r._offset+r._length);Le>0&&(Ce.xr=1,Ce.r=Le);var me=r._offset-De.left;me>0&&(Ce.xl=0,Ce.l=me)}}else if(Me==="l"?(r._depth=Math.max(De.height>0?Ae-De.left:0,ke),Ce[Me]=r._depth-ye):(r._depth=Math.max(De.height>0?De.right-Ae:0,ke),Ce[Me]=r._depth+ye,ce.reverse()),De.height>0){var he=De.bottom-(r._offset+r._length);he>0&&(Ce.yb=0,Ce.b=he);var be=r._offset-De.top;be>0&&(Ce.yt=1,Ce.t=be)}Ce[v]=r.anchor==="free"?r.position:r._anchorAxis.domain[ce[0]],r.title.text!==u._dfltTitle[f]&&(Ce[Me]+=bM(r)+(r.title.standoff||0)),r.mirror&&r.anchor!=="free"&&(Oe={x:0,y:0,r:0,l:0,t:0,b:0},Oe[ve]=r.linewidth,r.mirror&&r.mirror!==!0&&(Oe[ve]+=ke),r.mirror===!0||r.mirror==="ticks"?Oe[v]=r._anchorAxis.domain[ce[1]]:(r.mirror==="all"||r.mirror==="allticks")&&(Oe[v]=[r._counterDomainMin,r._counterDomainMax][ce[1]]))}Ee&&(Ue=Lf.getComponentMethod("rangeslider","autoMarginOpts")(e,r)),typeof r.automargin=="string"&&(xM(Ce,r.automargin),xM(Oe,r.automargin)),js.autoMargin(e,f2(r),Ce),js.autoMargin(e,EM(r),Oe),js.autoMargin(e,LM(r),Ue)}),Lr.syncOrAsync(ue)}};function xM(e,r){if(e){var t=Object.keys(vM).reduce(function(n,a){return r.indexOf(a)!==-1&&vM[a].forEach(function(o){n[o]=1}),n},{});Object.keys(e).forEach(function(n){t[n]||(n.length===1?e[n]=0:delete e[n])})}}function mX(e,r){var t=[],n,a=function(o,i){var l=o.xbnd[i];l!==null&&t.push(Lr.extendFlat({},o,{x:l}))};if(r.length){for(n=0;ne.range[1],l=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,u=!l;if(t){var s=i?-1:1;t=t*s}if(n){var f=e.side,v=l&&(f==="top"||f==="left")||u&&(f==="bottom"||f==="right")?1:-1;n=n*v}return e._id.charAt(0)==="x"?function(g){return eu(a+e._offset+e.l2p(i2(g))+t,o+n)}:function(g){return eu(o+n,a+e._offset+e.l2p(i2(g))+t)}};function i2(e){return e.periodX!==void 0?e.periodX:e.x}function wX(e){var r=e.ticklabelposition||"",t=function(_){return r.indexOf(_)!==-1},n=t("top"),a=t("left"),o=t("right"),i=t("bottom"),l=t("inside"),u=i||a||n||o;if(!u&&!l)return[0,0];var s=e.side,f=u?(e.tickwidth||0)/2:0,v=Hv,g=e.tickfont?e.tickfont.size:12;return(i||n)&&(f+=g*Hl,v+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,v+=Hv),l&&s==="top"&&(v-=g*(1-Hl)),(a||n)&&(f=-f),(s==="bottom"||s==="right")&&(v=-v),[u?f:0,l?v:0]}lr.makeTickPath=function(e,r,t,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var o=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,i=e._id.charAt(0),l=(e.linewidth||1)/2;return i==="x"?"M0,"+(r+l*t)+"v"+o*t:"M"+(r+l*t)+",0h"+o*t};lr.makeLabelFns=function(e,r,t){var n=e.ticklabelposition||"",a=function(R){return n.indexOf(R)!==-1},o=a("top"),i=a("left"),l=a("right"),u=a("bottom"),s=u||i||o||l,f=a("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",g=0,_=0,y=v?e.ticklen:0;if(f?y*=-1:s&&(y=0),v&&(g+=y,t)){var w=Lr.deg2rad(t);g=y*Math.cos(w)+1,_=y*Math.sin(w)}e.showticklabels&&(v||e.showline)&&(g+=.2*e.tickfont.size),g+=(e.linewidth||1)/2*(f?-1:1);var M={labelStandoff:g,labelShift:_},m,k,S,x,T=0,d=e.side,b=e._id.charAt(0),p=e.tickangle,c;if(b==="x")c=!f&&d==="bottom"||f&&d==="top",x=c?1:-1,f&&(x*=-1),m=_*x,k=r+g*x,S=c?1:-.2,Math.abs(p)===90&&(f?S+=Ef:p===-90&&d==="bottom"?S=Hl:p===90&&d==="top"?S=Ef:S=.5,T=Ef/2*(p/90)),M.xFn=function(R){return R.dx+m+T*R.fontSize},M.yFn=function(R){return R.dy+k+R.fontSize*S},M.anchorFn=function(R,E){if(s){if(i)return"end";if(l)return"start"}return!Wt(E)||E===0||E===180?"middle":E*x<0!==f?"end":"start"},M.heightFn=function(R,E,D){return E<-60||E>60?-.5*D:e.side==="top"!==f?-D:0};else if(b==="y"){if(c=!f&&d==="left"||f&&d==="right",x=c?1:-1,f&&(x*=-1),m=g,k=_*x,S=0,!f&&Math.abs(p)===90&&(p===-90&&d==="left"||p===90&&d==="right"?S=Hl:S=.5),f){var A=Wt(p)?+p:0;if(A!==0){var h=Lr.deg2rad(A);T=Math.abs(Math.sin(h))*Hl*x,S=0}}M.xFn=function(R){return R.dx+r-(m+R.fontSize*S)*x+T*R.fontSize},M.yFn=function(R){return R.dy+k+R.fontSize*Ef},M.anchorFn=function(R,E){return Wt(E)&&Math.abs(E)===90?"middle":c?"end":"start"},M.heightFn=function(R,E,D){return e.side==="right"&&(E*=-1),E<-30?-D:E<30?-.5*D:0}}return M};function Wv(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}lr.drawTicks=function(e,r,t){t=t||{};var n=r._id+"tick",a=[].concat(r.minor&&r.minor.ticks?t.vals.filter(function(i){return i.minor&&!i.noTick}):[]).concat(r.ticks?t.vals.filter(function(i){return!i.minor&&!i.noTick}):[]),o=t.layer.selectAll("path."+n).data(a,Wv);o.exit().remove(),o.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",t.crisp!==!1).each(function(i){return Rf.stroke(Da.select(this),i.minor?r.minor.tickcolor:r.tickcolor)}).style("stroke-width",function(i){return pa.crispRound(e,i.minor?r.minor.tickwidth:r.tickwidth,1)+"px"}).attr("d",t.path).style("display",null),Xv(r,[_M]),o.attr("transform",t.transFn)};lr.drawGrid=function(e,r,t){if(t=t||{},r.tickmode!=="sync"){var n=r._id+"grid",a=r.minor&&r.minor.showgrid,o=a?t.vals.filter(function(m){return m.minor}):[],i=r.showgrid?t.vals.filter(function(m){return!m.minor}):[],l=t.counterAxis;if(l&&lr.shouldShowZeroLine(e,r,l))for(var u=r.tickmode==="array",s=0;s=0;y--){var w=y?g:_;if(w){var M=w.selectAll("path."+n).data(y?i:o,Wv);M.exit().remove(),M.enter().append("path").classed(n,1).classed("crisp",t.crisp!==!1),M.attr("transform",t.transFn).attr("d",t.path).each(function(m){return Rf.stroke(Da.select(this),m.minor?r.minor.gridcolor:r.gridcolor||"#ddd")}).style("stroke-dasharray",function(m){return pa.dashStyle(m.minor?r.minor.griddash:r.griddash,m.minor?r.minor.gridwidth:r.gridwidth)}).style("stroke-width",function(m){return(m.minor?v:r._gw)+"px"}).style("display",null),typeof t.path=="function"&&M.attr("d",t.path)}}Xv(r,[n2,a2])}};lr.drawZeroLine=function(e,r,t){t=t||t;var n=r._id+"zl",a=lr.shouldShowZeroLine(e,r,t.counterAxis),o=t.layer.selectAll("path."+n).data(a?[{x:0,id:r._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",t.crisp!==!1).each(function(){t.layer.selectAll("path").sort(function(i,l){return jW(i.id,l.id)})}),o.attr("transform",t.transFn).attr("d",t.path).call(Rf.stroke,r.zerolinecolor||Rf.defaultLine).style("stroke-width",pa.crispRound(e,r.zerolinewidth,r._gw||1)+"px").style("display",null),Xv(r,[t2])};lr.drawLabels=function(e,r,t){t=t||{};var n=e._fullLayout,a=r._id,o=t.cls||a+"tick",i=t.vals.filter(function(L){return L.text}),l=t.labelFns,u=t.secondary?0:r.tickangle,s=(r._prevTickAngles||{})[o],f=t.layer.selectAll("g."+o).data(r.showticklabels?i:[],Wv),v=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(L){var P=Da.select(this),O=e._promises.length;P.call(Bl.positionText,l.xFn(L),l.yFn(L)).call(pa.font,{family:L.font,size:L.fontSize,color:L.fontColor,weight:L.fontWeight,style:L.fontStyle,variant:L.fontVariant,textcase:L.fontTextcase,lineposition:L.fontLineposition,shadow:L.fontShadow}).text(L.text).call(Bl.convertToTspans,e),e._promises[O]?v.push(e._promises.pop().then(function(){g(P,u)})):g(P,u)}),Xv(r,[cM]),f.exit().remove(),t.repositionOnUpdate&&f.each(function(L){Da.select(this).select("text").call(Bl.positionText,l.xFn(L),l.yFn(L))});function g(L,P){L.each(function(O){var U=Da.select(this),X=U.select(".text-math-group"),j=l.anchorFn(O,P),$=t.transFn.call(U.node(),O)+(Wt(P)&&+P!=0?" rotate("+P+","+l.xFn(O)+","+(l.yFn(O)-O.fontSize/2)+")":""),Y=Bl.lineCount(U),q=Pf*O.fontSize,Z=l.heightFn(O,Wt(P)?+P:0,(Y-1)*q);if(Z&&($+=eu(0,Z)),X.empty()){var ne=U.select("text");ne.attr({transform:$,"text-anchor":j}),ne.style("opacity",1),r._adjustTickLabelsOverflow&&r._adjustTickLabelsOverflow()}else{var Q=pa.bBox(X.node()).width,oe=Q*{end:-.5,start:.5}[j];X.attr("transform",$+eu(oe,0))}})}r._adjustTickLabelsOverflow=function(){var L=r.ticklabeloverflow;if(!(!L||L==="allow")){var P=L.indexOf("hide")!==-1,O=r._id.charAt(0)==="x",U=0,X=O?e._fullLayout.width:e._fullLayout.height;if(L.indexOf("domain")!==-1){var j=Lr.simpleMap(r.range,r.r2l);U=r.l2p(j[0])+r._offset,X=r.l2p(j[1])+r._offset}var $=Math.min(U,X),Y=Math.max(U,X),q=r.side,Z=1/0,ne=-1/0;f.each(function(G){var re=Da.select(this),H=re.select(".text-math-group");if(H.empty()){var te=pa.bBox(re.node()),ue=0;O?(te.right>Y||te.left<$)&&(ue=1):(te.bottom>Y||te.top+(r.tickangle?0:G.fontSize/4)<$)&&(ue=1);var de=re.select("text");ue?P&&de.style("opacity",0):(de.style("opacity",1),q==="bottom"||q==="right"?Z=Math.min(Z,O?te.top:te.left):Z=-1/0,q==="top"||q==="left"?ne=Math.max(ne,O?te.bottom:te.right):ne=1/0)}});for(var Q in n._plots){var oe=n._plots[Q];if(!(r._id!==oe.xaxis._id&&r._id!==oe.yaxis._id)){var ee=O?oe.yaxis:oe.xaxis;ee&&(ee["_visibleLabelMin_"+r._id]=Z,ee["_visibleLabelMax_"+r._id]=ne)}}}},r._hideCounterAxisInsideTickLabels=function(L){var P=r._id.charAt(0)==="x",O=[];for(var U in n._plots){var X=n._plots[U];r._id!==X.xaxis._id&&r._id!==X.yaxis._id||O.push(P?X.yaxis:X.xaxis)}O.forEach(function(j,$){j&&If(j)&&(L||[t2,a2,n2,_M,cM]).forEach(function(Y){var q=Y.K==="tick"&&Y.L==="text"&&r.ticklabelmode==="period",Z=n._plots[r._mainSubplot],ne;Y.K===t2.K?ne=Z.zerolinelayer.selectAll("."+r._id+"zl"):Y.K===a2.K?ne=Z.minorGridlayer.selectAll("."+r._id):Y.K===n2.K?ne=Z.gridlayer.selectAll("."+r._id):ne=Z[r._id.charAt(0)+"axislayer"],ne.each(function(){var Q=Da.select(this);Y.L&&(Q=Q.selectAll(Y.L)),Q.each(function(oe){var ee=r.l2p(q?i2(oe):oe.x)+r._offset,G=Da.select(this);eer["_visibleLabelMin_"+j._id]?G.style("display","none"):Y.K==="tick"&&!$&&G.style("display",null)})})})})},g(f,s+1?s:u);function _(){return v.length&&Promise.all(v)}var y=null;function w(){if(g(f,u),i.length&&r.autotickangles&&(r.type!=="log"||String(r.dtick).charAt(0)!=="D")){y=r.autotickangles[0];var L=0,P=[],O,U=1;f.each(function(De){L=Math.max(L,De.fontSize);var Ce=r.l2p(De.x),Oe=o2(this),Ue=pa.bBox(Oe.node());U=Math.max(U,Bl.lineCount(Oe)),P.push({top:0,bottom:10,height:10,left:Ce-Ue.width/2,right:Ce+Ue.width/2+2,width:Ue.width+2})});var X=(r.tickson==="boundaries"||r.showdividers)&&!t.secondary,j=i.length,$=Math.abs((i[j-1].x-i[0].x)*r._m)/(j-1),Y=X?$/2:$,q=X?r.ticklen:L*1.25*U,Z=Math.sqrt(Math.pow(Y,2)+Math.pow(q,2)),ne=Y/Z,Q=r.autotickangles.map(function(De){return De*Math.PI/180}),oe=Q.find(function(De){return Math.abs(Math.cos(De))<=ne});oe===void 0&&(oe=Q.reduce(function(De,Ce){return Math.abs(Math.cos(De))N*D&&(h=D,p[b]=c[b]=R[b])}var I=Math.abs(h-A);I-x>0?(I-=x,x*=1+x/I):x=0,r._id.charAt(0)!=="y"&&(x=-x),p[d]=k.p2r(k.r2p(c[d])+T*x),k.autorange==="min"||k.autorange==="max reversed"?(p[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(p[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=p}var F=Lr.syncOrAsync(M);return F&&F.then&&e._promises.push(F),F};function MX(e,r,t){var n=r._id+"divider",a=t.vals,o=t.layer.selectAll("path."+n).data(a,Wv);o.exit().remove(),o.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(Rf.stroke,r.dividercolor).style("stroke-width",pa.crispRound(e,r.dividerwidth,1)+"px"),o.attr("transform",t.transFn).attr("d",t.path)}lr.getPxPosition=function(e,r){var t=e._fullLayout._size,n=r._id.charAt(0),a=r.side,o;if(r.anchor!=="free"?o=r._anchorAxis:n==="x"?o={_offset:t.t+(1-(r.position||0))*t.h,_length:0}:n==="y"&&(o={_offset:t.l+(r.position||0)*t.w+r._shift,_length:0}),a==="top"||a==="left")return o._offset;if(a==="bottom"||a==="right")return o._offset+o._length};function bM(e){var r=e.title.font.size,t=(e.title.text.match(Bl.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r*(Hl+t*Pf):t?r*(t+1)*Pf:r}function TX(e,r){var t=e._fullLayout,n=r._id,a=n.charAt(0),o=r.title.font.size,i,l=(r.title.text.match(Bl.BR_TAG_ALL)||[]).length;if(r.title.hasOwnProperty("standoff"))r.side==="bottom"||r.side==="right"?i=r._depth+r.title.standoff+o*Hl:(r.side==="top"||r.side==="left")&&(i=r._depth+r.title.standoff+o*(Ef+l*Pf));else{var u=If(r);if(r.type==="multicategory")i=r._depth;else{var s=1.5*o;u&&(s=.5*o,r.ticks==="outside"&&(s+=r.ticklen)),i=10+s+(r.linewidth?r.linewidth-1:0)}u||(a==="x"?i+=r.side==="top"?o*(r.showticklabels?1:0):o*(r.showticklabels?1.5:.5):i+=r.side==="right"?o*(r.showticklabels?1:.5):o*(r.showticklabels?.5:0))}var f=lr.getPxPosition(e,r),v,g,_;a==="x"?(g=r._offset+r._length/2,_=r.side==="top"?f-i:f+i):(_=r._offset+r._length/2,g=r.side==="right"?f+i:f-i,v={rotate:"-90",offset:0});var y;if(r.type!=="multicategory"){var w=r._selections[r._id+"tick"];if(y={selection:w,side:r.side},w&&w.node()&&w.node().parentNode){var M=pa.getTranslate(w.node().parentNode);y.offsetLeft=M.x,y.offsetTop=M.y}r.title.hasOwnProperty("standoff")&&(y.pad=0)}return r._titleStandoff=i,GW.draw(e,n+"title",{propContainer:r,propName:r._name+".title.text",placeholder:t._dfltTitle[a],avoid:y,transform:v,attributes:{x:g,y:_,"text-anchor":"middle"}})}lr.shouldShowZeroLine=function(e,r,t){var n=Lr.simpleMap(r.range,r.r2l);return n[0]*n[1]<=0&&r.zeroline&&(r.type==="linear"||r.type==="-")&&!(r.rangebreaks&&r.maskBreaks(0)===Gv)&&(CM(r,0)||!AX(e,r,t,n)||kX(e,r))};lr.clipEnds=function(e,r){return r.filter(function(t){return CM(e,t.x)})};function CM(e,r){var t=e.l2p(r);return t>1&&t1)for(a=1;a=a.min&&e=KW:/%L/.test(r)?e>=JW:/%[SX]/.test(r)?e>=Uv:/%M/.test(r)?e>=Df:/%[HI]/.test(r)?e>=Fi:/%p/.test(r)?e>=Ho:/%[Aadejuwx]/.test(r)?e>=On:/%[UVW]/.test(r)?e>=ga:/%[Bbm]/.test(r)?e>=Bv:/%[q]/.test(r)?e>=Ov:/%[Yy]/.test(r)?e>=qv:!0}});var PM=pe((Lce,DM)=>{"use strict";DM.exports=function(r,t,n){var a,o;if(n){var i=t==="reversed"||t==="min reversed"||t==="max reversed";a=n[i?1:0],o=n[i?0:1]}var l=r("autorangeoptions.minallowed",o===null?a:void 0),u=r("autorangeoptions.maxallowed",a===null?o:void 0);l===void 0&&r("autorangeoptions.clipmin"),u===void 0&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}});var v2=pe((Rce,FM)=>{"use strict";var DX=PM();FM.exports=function(r,t,n,a){var o=t._template||{},i=t.type||o.type||"-";n("minallowed"),n("maxallowed");var l=n("range");if(!l){var u;!a.noInsiderange&&i!=="log"&&(u=n("insiderange"),u&&(u[0]===null||u[1]===null)&&(t.insiderange=!1,u=void 0),u&&(l=n("range",u)))}var s=t.getAutorangeDflt(l,a),f=n("autorange",s),v;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(f==="reversed"||f===!0)||l[0]!==null&&(f==="min"||f==="max reversed")||l[1]!==null&&(f==="max"||f==="min reversed"))&&(l=void 0,delete t.range,t.autorange=!0,v=!0),v||(s=t.getAutorangeDflt(l,a),f=n("autorange",s)),f&&(DX(n,f,l),(i==="linear"||i==="-")&&n("rangemode")),t.cleanRange()}});var NM=pe((Dce,IM)=>{var PX={left:0,top:0};IM.exports=FX;function FX(e,r,t){r=r||e.currentTarget||e.srcElement,Array.isArray(t)||(t=[0,0]);var n=e.clientX||0,a=e.clientY||0,o=IX(r);return t[0]=n-o.left,t[1]=a-o.top,t}function IX(e){return e===window||e===document||e===document.body?PX:e.getBoundingClientRect()}});var Zv=pe((Pce,zM)=>{"use strict";var NX=Vp();function zX(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){e=!1}return e}zM.exports=NX&&zX()});var OM=pe((Fce,qM)=>{"use strict";qM.exports=function(r,t,n,a,o){var i=(r-n)/(a-n),l=i+t/(a-n),u=(i+l)/2;return o==="left"||o==="bottom"?i:o==="center"||o==="middle"?u:o==="right"||o==="top"?l:i<2/3-u?i:l>4/3-u?l:u}});var HM=pe((Ice,UM)=>{"use strict";var BM=ir(),qX=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];UM.exports=function(r,t,n,a){return n==="left"?r=0:n==="center"?r=1:n==="right"?r=2:r=BM.constrain(Math.floor(r*3),0,2),a==="bottom"?t=0:a==="middle"?t=1:a==="top"?t=2:t=BM.constrain(Math.floor(t*3),0,2),qX[t][r]}});var GM=pe((Nce,VM)=>{"use strict";var OX=mf(),BX=Jc(),UX=ff().getGraphDiv,HX=sf(),h2=VM.exports={};h2.wrapped=function(e,r,t){e=UX(e),e._fullLayout&&BX.clear(e._fullLayout._uid+HX.HOVERID),h2.raw(e,r,t)};h2.raw=function(r,t){var n=r._fullLayout,a=r._hoverdata;t||(t={}),!(t.target&&!r._dragged&&OX.triggerHandler(r,"plotly_beforehover",t)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,t.target&&a&&r.emit("plotly_unhover",{event:t,points:a}))}});var ti=pe((zce,XM)=>{"use strict";var VX=NM(),d2=Yp(),GX=Zv(),YX=ir().removeElement,WX=wn(),Vl=XM.exports={};Vl.align=OM();Vl.getCursor=HM();var YM=GM();Vl.unhover=YM.wrapped;Vl.unhoverRaw=YM.raw;Vl.init=function(r){var t=r.gd,n=1,a=t._context.doubleClickDelay,o=r.element,i,l,u,s,f,v,g,_;t._mouseDownTime||(t._mouseDownTime=0),o.style.pointerEvents="all",o.onmousedown=M,GX?(o._ontouchstart&&o.removeEventListener("touchstart",o._ontouchstart),o._ontouchstart=M,o.addEventListener("touchstart",M,{passive:!1})):o.ontouchstart=M;function y(S,x,T){return Math.abs(S)a&&(n=Math.max(n-1,1)),t._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(n,v),!_){var x;try{x=new MouseEvent("click",S)}catch(d){var T=p2(S);x=document.createEvent("MouseEvents"),x.initMouseEvent("click",S.bubbles,S.cancelable,S.view,S.detail,S.screenX,S.screenY,T[0],T[1],S.ctrlKey,S.altKey,S.shiftKey,S.metaKey,S.button,S.relatedTarget)}g.dispatchEvent(x)}t._dragging=!1,t._dragged=!1}};function WM(){var e=document.createElement("div");e.className="dragcover";var r=e.style;return r.position="fixed",r.left=0,r.right=0,r.top=0,r.bottom=0,r.zIndex=999999999,r.background="none",document.body.appendChild(e),e}Vl.coverSlip=WM;function p2(e){return VX(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Vo=pe((qce,ZM)=>{"use strict";ZM.exports=function(r,t){(r.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&r.classed(n,!1)}),t&&r.classed("cursor-"+t,!0)}});var QM=pe((Oce,KM)=>{"use strict";var g2=Vo(),Nf="data-savedcursor",JM="!!";KM.exports=function(r,t){var n=r.attr(Nf);if(t){if(!n){for(var a=(r.attr("class")||"").split(" "),o=0;o{"use strict";var y2=kn(),XX=Ti();$M.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:XX.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:y2({editType:"legend"}),grouptitlefont:y2({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:y2({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Kv=pe(Jv=>{"use strict";Jv.isGrouped=function(r){return(r.traceorder||"").indexOf("grouped")!==-1};Jv.isVertical=function(r){return r.orientation!=="h"};Jv.isReversed=function(r){return(r.traceorder||"").indexOf("reversed")!==-1}});var _2=pe((Hce,jM)=>{"use strict";var x2=Er(),ya=ir(),ZX=gt(),JX=Sn(),KX=m2(),QX=Ds(),b2=Kv();function $X(e,r,t,n){var a=r[e]||{},o=ZX.newContainer(t,e);function i(F,L){return ya.coerce(a,o,KX,F,L)}var l=ya.coerceFont(i,"font",t.font);i("bgcolor",t.paper_bgcolor),i("bordercolor");var u=i("visible");if(u){for(var s,f=function(F,L){var P=s._input,O=s;return ya.coerce(P,O,JX,F,L)},v=t.font||{},g=ya.coerceFont(i,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),_=0,y=!1,w="normal",M=(t.shapes||[]).filter(function(F){return F.showlegend}),m=n.concat(M).filter(function(F){return e===(F.legend||"legend")}),k=0;k(e==="legend"?1:0));if(x===!1&&(t[e]=void 0),!(x===!1&&!a.uirevision)&&(i("uirevision",t.uirevision),x!==!1)){i("borderwidth");var T=i("orientation"),d=i("yref"),b=i("xref"),p=T==="h",c=d==="paper",A=b==="paper",h,R,E,D="left";p?(h=0,x2.getComponentMethod("rangeslider","isVisible")(r.xaxis)?c?(R=1.1,E="bottom"):(R=1,E="top"):c?(R=-.1,E="top"):(R=0,E="bottom")):(R=1,E="auto",A?h=1.02:(h=1,D="right")),ya.coerce(a,o,{x:{valType:"number",editType:"legend",min:A?-2:0,max:A?3:1,dflt:h}},"x"),ya.coerce(a,o,{y:{valType:"number",editType:"legend",min:c?-2:0,max:c?3:1,dflt:R}},"y"),i("traceorder",w),b2.isGrouped(t[e])&&i("tracegroupgap"),i("entrywidth"),i("entrywidthmode"),i("indentation"),i("itemsizing"),i("itemwidth"),i("itemclick"),i("itemdoubleclick"),i("groupclick"),i("xanchor",D),i("yanchor",E),i("valign"),ya.noneOrAll(a,o,["x","y"]);var N=i("title.text");if(N){i("title.side",p?"left":"top");var I=ya.extendFlat({},l,{size:ya.bigFont(l.size)});ya.coerceFont(i,"title.font",I)}}}}jM.exports=function(r,t,n){var a,o=n.slice(),i=t.shapes;if(i)for(a=0;a{"use strict";var tu=Er(),M2=ir(),jX=M2.pushUnique,w2=!0;e9.exports=function(r,t,n){var a=t._fullLayout;if(t._dragged||t._editing)return;var o=a.legend.itemclick,i=a.legend.itemdoubleclick,l=a.legend.groupclick;n===1&&o==="toggle"&&i==="toggleothers"&&w2&&t.data&&t._context.showTips&&M2.notifier(M2._(t,"Double-click on legend to isolate one trace"),"long"),w2=!1;var u;if(n===1?u=o:n===2&&(u=i),!u)return;var s=l==="togglegroup",f=a.hiddenlabels?a.hiddenlabels.slice():[],v=r.data()[0][0];if(v.groupTitle&&v.noClick)return;var g=t._fullData,_=(a.shapes||[]).filter(function(Ae){return Ae.showlegend}),y=g.concat(_),w=v.trace;w._isShape&&(w=w._fullInput);var M=w.legendgroup,m,k,S,x,T,d,b={},p=[],c=[],A=[];function h(Ae,ke){var De=p.indexOf(Ae),Ce=b.visible;return Ce||(Ce=b.visible=[]),p.indexOf(Ae)===-1&&(p.push(Ae),De=p.length-1),Ce[De]=ke,De}var R=(a.shapes||[]).map(function(Ae){return Ae._input}),E=!1;function D(Ae,ke){R[Ae].visible=ke,E=!0}function N(Ae,ke){if(!(v.groupTitle&&!s)){var De=Ae._fullInput||Ae,Ce=De._isShape,Oe=De.index;Oe===void 0&&(Oe=De._index);var Ue=De.visible===!1?!1:ke;Ce?D(Oe,Ue):h(Oe,Ue)}}var I=w.legend,F=w._fullInput,L=F&&F._isShape;if(!L&&tu.traceIs(w,"pie-like")){var P=v.label,O=f.indexOf(P);if(u==="toggle")O===-1?f.push(P):f.splice(O,1);else if(u==="toggleothers"){var U=O!==-1,X=[];for(m=0;m{"use strict";t9.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var i9=pe((Yce,a9)=>{"use strict";var n9=Er(),A2=Kv();a9.exports=function(r,t,n){var a=t._inHover,o=A2.isGrouped(t),i=A2.isReversed(t),l={},u=[],s=!1,f={},v=0,g=0,_,y;function w(F,L,P){if(t.visible!==!1&&!(n&&F!==t._id))if(L===""||!A2.isGrouped(t)){var O="~~i"+v;u.push(O),l[O]=[P],v++}else u.indexOf(L)===-1?(u.push(L),s=!0,l[L]=[P]):l[L].push(P)}for(_=0;_A&&(c=A)}b[_][0]._groupMinRank=c,b[_][0]._preGroupSort=_}var h=function(F,L){return F[0]._groupMinRank-L[0]._groupMinRank||F[0]._preGroupSort-L[0]._preGroupSort},R=function(F,L){return F.trace.legendrank-L.trace.legendrank||F._preSort-L._preSort};for(b.forEach(function(F,L){F[0]._preGroupSort=L}),b.sort(h),_=0;_{"use strict";var Qv=ir();function o9(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Gl.formatPiePercent=function(r,t){var n=o9((r*100).toPrecision(3));return Qv.numSeparate(n,t)+"%"};Gl.formatPieValue=function(r,t){var n=o9(r.toPrecision(10));return Qv.numSeparate(n,t)};Gl.getFirstFilled=function(r,t){if(Qv.isArrayOrTypedArray(r))for(var n=0;n{"use strict";var eZ=yt(),rZ=Zr();l9.exports=function(r,t,n,a){var o=n.marker.pattern;o&&o.shape?eZ.pointStyle(r,n,a,t):rZ.fill(r,t.color)}});var v9=pe((Zce,c9)=>{"use strict";var u9=Zr(),f9=k2().castOption,tZ=s9();c9.exports=function(r,t,n,a){var o=n.marker.line,i=f9(o.color,t.pts)||u9.defaultLine,l=f9(o.width,t.pts)||0;r.call(tZ,t,n,a).style("stroke-width",l).call(u9.stroke,i)}});var L2=pe((Jce,m9)=>{"use strict";var Bn=it(),S2=Er(),En=ir(),h9=En.strTranslate,Wn=yt(),Pa=Zr(),C2=Si().extractOpts,$v=oa(),nZ=v9(),aZ=k2().castOption,iZ=T2(),d9=12,p9=5,Yl=2,oZ=10,nu=5;m9.exports=function(r,t,n){var a=t._fullLayout;n||(n=a.legend);var o=n.itemsizing==="constant",i=n.itemwidth,l=(i+iZ.itemGap*2)/2,u=h9(l,0),s=function(b,p,c,A){var h;if(b+1)h=b;else if(p&&p.width>0)h=p.width;else return 0;return o?A:Math.min(h,c)};r.each(function(b){var p=Bn.select(this),c=En.ensureSingle(p,"g","layers");c.style("opacity",b[0].trace.opacity);var A=n.indentation,h=n.valign,R=b[0].lineHeight,E=b[0].height;if(h==="middle"&&A===0||!R||!E)c.attr("transform",null);else{var D={top:1,bottom:-1}[h],N=D*(.5*(R-E+3))||0,I=n.indentation;c.attr("transform",h9(I,N))}var F=c.selectAll("g.legendfill").data([b]);F.enter().append("g").classed("legendfill",!0);var L=c.selectAll("g.legendlines").data([b]);L.enter().append("g").classed("legendlines",!0);var P=c.selectAll("g.legendsymbols").data([b]);P.enter().append("g").classed("legendsymbols",!0),P.selectAll("g.legendpoints").data([b]).enter().append("g").classed("legendpoints",!0)}).each(d).each(g).each(y).each(_).each(M).each(x).each(S).each(f).each(v).each(m).each(k);function f(b){var p=g9(b),c=p.showFill,A=p.showLine,h=p.showGradientLine,R=p.showGradientFill,E=p.anyFill,D=p.anyLine,N=b[0],I=N.trace,F,L,P=C2(I),O=P.colorscale,U=P.reversescale,X=function(Q){if(Q.size())if(c)Wn.fillGroupStyle(Q,t,!0);else{var oe="legendfill-"+I.uid;Wn.gradient(Q,t,oe,E2(U),O,"fill")}},j=function(Q){if(Q.size()){var oe="legendline-"+I.uid;Wn.lineGroupStyle(Q),Wn.gradient(Q,t,oe,E2(U),O,"stroke")}},$=$v.hasMarkers(I)||!E?"M5,0":D?"M5,-2":"M5,-3",Y=Bn.select(this),q=Y.select(".legendfill").selectAll("path").data(c||R?[b]:[]);if(q.enter().append("path").classed("js-fill",!0),q.exit().remove(),q.attr("d",$+"h"+i+"v6h-"+i+"z").call(X),A||h){var Z=s(void 0,I.line,oZ,p9);L=En.minExtend(I,{line:{width:Z}}),F=[En.minExtend(N,{trace:L})]}var ne=Y.select(".legendlines").selectAll("path").data(A||h?[F]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",$+(h?"l"+i+",0.0001":"h"+i)).call(A?Wn.lineGroupStyle:j)}function v(b){var p=g9(b),c=p.anyFill,A=p.anyLine,h=p.showLine,R=p.showMarker,E=b[0],D=E.trace,N=!R&&!A&&!c&&$v.hasText(D),I,F;function L(q,Z,ne,Q){var oe=En.nestedProperty(D,q).get(),ee=En.isArrayOrTypedArray(oe)&&Z?Z(oe):oe;if(o&&ee&&Q!==void 0&&(ee=Q),ne){if(eene[1])return ne[1]}return ee}function P(q){return E._distinct&&E.index&&q[E.index]?q[E.index]:q[0]}if(R||N||h){var O={},U={};if(R){O.mc=L("marker.color",P),O.mx=L("marker.symbol",P),O.mo=L("marker.opacity",En.mean,[.2,1]),O.mlc=L("marker.line.color",P),O.mlw=L("marker.line.width",En.mean,[0,5],Yl),U.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var X=L("marker.size",En.mean,[2,16],d9);O.ms=X,U.marker.size=X}h&&(U.line={width:L("line.width",P,[0,10],p9)}),N&&(O.tx="Aa",O.tp=L("textposition",P),O.ts=10,O.tc=L("textfont.color",P),O.tf=L("textfont.family",P),O.tw=L("textfont.weight",P),O.ty=L("textfont.style",P),O.tv=L("textfont.variant",P),O.tC=L("textfont.textcase",P),O.tE=L("textfont.lineposition",P),O.tS=L("textfont.shadow",P)),I=[En.minExtend(E,O)],F=En.minExtend(D,U),F.selectedpoints=null,F.texttemplate=null}var j=Bn.select(this).select("g.legendpoints"),$=j.selectAll("path.scatterpts").data(R?I:[]);$.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",u),$.exit().remove(),$.call(Wn.pointStyle,F,t),R&&(I[0].mrc=3);var Y=j.selectAll("g.pointtext").data(N?I:[]);Y.enter().append("g").classed("pointtext",!0).append("text").attr("transform",u),Y.exit().remove(),Y.selectAll("text").call(Wn.textPointStyle,F,t)}function g(b){var p=b[0].trace,c=p.type==="waterfall";if(b[0]._distinct&&c){var A=b[0].trace[b[0].dir].marker;return b[0].mc=A.color,b[0].mlw=A.line.width,b[0].mlc=A.line.color,w(b,this,"waterfall")}var h=[];p.visible&&c&&(h=b[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 R=Bn.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(h);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",u).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(E){var D=Bn.select(this),N=p[E[0]].marker,I=s(void 0,N.line,nu,Yl);D.attr("d",E[1]).style("stroke-width",I+"px").call(Pa.fill,N.color),I&&D.call(Pa.stroke,N.line.color)})}function _(b){w(b,this)}function y(b){w(b,this,"funnel")}function w(b,p,c){var A=b[0].trace,h=A.marker||{},R=h.line||{},E=h.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",D=c?A.visible&&A.type===c:S2.traceIs(A,"bar"),N=Bn.select(p).select("g.legendpoints").selectAll("path.legend"+c).data(D?[b]:[]);N.enter().append("path").classed("legend"+c,!0).attr("d",E).attr("transform",u),N.exit().remove(),N.each(function(I){var F=Bn.select(this),L=I[0],P=s(L.mlw,h.line,nu,Yl);F.style("stroke-width",P+"px");var O=L.mcc;if(!n._inHover&&"mc"in L){var U=C2(h),X=U.mid;X===void 0&&(X=(U.max+U.min)/2),O=Wn.tryColorscale(h,"")(X)}var j=O||L.mc||h.color,$=h.pattern,Y=$&&Wn.getPatternAttr($.shape,0,"");if(Y){var q=Wn.getPatternAttr($.bgcolor,0,null),Z=Wn.getPatternAttr($.fgcolor,0,null),ne=$.fgopacity,Q=y9($.size,8,10),oe=y9($.solidity,.5,1),ee="legend-"+A.uid;F.call(Wn.pattern,"legend",t,ee,Y,Q,oe,O,$.fillmode,q,Z,ne)}else F.call(Pa.fill,j);P&&Pa.stroke(F,L.mlc||R.color)})}function M(b){var p=b[0].trace,c=Bn.select(this).select("g.legendpoints").selectAll("path.legendbox").data(p.visible&&S2.traceIs(p,"box-violin")?[b]:[]);c.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),c.exit().remove(),c.each(function(){var A=Bn.select(this);if((p.boxpoints==="all"||p.points==="all")&&Pa.opacity(p.fillcolor)===0&&Pa.opacity((p.line||{}).color)===0){var h=En.minExtend(p,{marker:{size:o?d9:En.constrain(p.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});c.call(Wn.pointStyle,h,t)}else{var R=s(void 0,p.line,nu,Yl);A.style("stroke-width",R+"px").call(Pa.fill,p.fillcolor),R&&Pa.stroke(A,p.line.color)}})}function m(b){var p=b[0].trace,c=Bn.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(p.visible&&p.type==="candlestick"?[b,b]:[]);c.enter().append("path").classed("legendcandle",!0).attr("d",function(A,h){return h?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",u).style("stroke-miterlimit",1),c.exit().remove(),c.each(function(A,h){var R=Bn.select(this),E=p[h?"increasing":"decreasing"],D=s(void 0,E.line,nu,Yl);R.style("stroke-width",D+"px").call(Pa.fill,E.fillcolor),D&&Pa.stroke(R,E.line.color)})}function k(b){var p=b[0].trace,c=Bn.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(p.visible&&p.type==="ohlc"?[b,b]:[]);c.enter().append("path").classed("legendohlc",!0).attr("d",function(A,h){return h?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",u).style("stroke-miterlimit",1),c.exit().remove(),c.each(function(A,h){var R=Bn.select(this),E=p[h?"increasing":"decreasing"],D=s(void 0,E.line,nu,Yl);R.style("fill","none").call(Wn.dashLine,E.line.dash,D),D&&Pa.stroke(R,E.line.color)})}function S(b){T(b,this,"pie")}function x(b){T(b,this,"funnelarea")}function T(b,p,c){var A=b[0],h=A.trace,R=c?h.visible&&h.type===c:S2.traceIs(h,c),E=Bn.select(p).select("g.legendpoints").selectAll("path.legend"+c).data(R?[b]:[]);if(E.enter().append("path").classed("legend"+c,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),E.exit().remove(),E.size()){var D=h.marker||{},N=s(aZ(D.line.width,A.pts),D.line,nu,Yl),I="pieLike",F=En.minExtend(h,{marker:{line:{width:N}}},I),L=En.minExtend(A,{trace:F},I);nZ(E,L,F,t)}}function d(b){var p=b[0].trace,c,A=[];if(p.visible)switch(p.type){case"histogram2d":case"heatmap":A=[["M-15,-2V4H15V-2Z"]],c=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":A=[["M-6,-6V6H6V-6Z"]],c=!0;break;case"densitymapbox":case"densitymap":A=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],c="radial";break;case"cone":A=[["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"]],c=!1;break;case"streamtube":A=[["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"]],c=!1;break;case"surface":A=[["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"]],c=!0;break;case"mesh3d":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],c=!1;break;case"volume":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],c=!0;break;case"isosurface":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],c=!1;break}var h=Bn.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(A);h.enter().append("path").classed("legend3dandfriends",!0).attr("transform",u).style("stroke-miterlimit",1),h.exit().remove(),h.each(function(R,E){var D=Bn.select(this),N=C2(p),I=N.colorscale,F=N.reversescale,L=function(X){if(X.size()){var j="legendfill-"+p.uid;Wn.gradient(X,t,j,E2(F,c==="radial"),I,"fill")}},P;if(I){if(!c){var U=I.length;P=E===0?I[F?U-1:0][1]:E===1?I[F?0:U-1][1]:I[Math.floor((U-1)/2)][1]}}else{var O=p.vertexcolor||p.facecolor||p.color;P=En.isArrayOrTypedArray(O)?O[E]||O[0]:O}D.attr("d",R[0]),P?D.call(Pa.fill,P):D.call(L)})}};function E2(e,r){var t=r?"radial":"horizontal";return t+(e?"":"reversed")}function g9(e){var r=e[0].trace,t=r.contours,n=$v.hasLines(r),a=$v.hasMarkers(r),o=r.visible&&r.fill&&r.fill!=="none",i=!1,l=!1;if(t){var u=t.coloring;u==="lines"?i=!0:n=u==="none"||u==="heatmap"||t.showlines,t.type==="constraint"?o=t._operation!=="=":(u==="fill"||u==="heatmap")&&(l=!0)}return{showMarker:a,showLine:n,showFill:o,showGradientLine:i,showGradientFill:l,anyLine:n||i,anyFill:o||l}}function y9(e,r,t){return e&&En.isArrayOrTypedArray(e)?r:e>t?t:e}});var F2=pe((Kce,C9)=>{"use strict";var la=it(),Xt=ir(),D2=ln(),ou=Er(),x9=mf(),R2=ti(),Zt=yt(),eh=Zr(),Wl=Yn(),b9=r9(),en=T2(),P2=qn(),k9=P2.LINE_SPACING,iu=P2.FROM_TL,_9=P2.FROM_BR,w9=i9(),lZ=L2(),M9=Kv(),au=1,sZ=/^legend[0-9]*$/;C9.exports=function(r,t){if(t)T9(r,t);else{var n=r._fullLayout,a=n._legends,o=n._infolayer.selectAll('[class^="legend"]');o.each(function(){var s=la.select(this),f=s.attr("class"),v=f.split(" ")[0];v.match(sZ)&&a.indexOf(v)===-1&&s.remove()});for(var i=0;i1)}var y=n.hiddenlabels||[];if(!l&&(!n.showlegend||!u.length))return i.selectAll("."+a).remove(),n._topdefs.select("#"+o).remove(),D2.autoMargin(e,a);var w=Xt.ensureSingle(i,"g",a,function(p){l||p.attr("pointer-events","all")}),M=Xt.ensureSingleById(n._topdefs,"clipPath",o,function(p){p.append("rect")}),m=Xt.ensureSingle(w,"rect","bg",function(p){p.attr("shape-rendering","crispEdges")});m.call(eh.stroke,t.bordercolor).call(eh.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var k=Xt.ensureSingle(w,"g","scrollbox"),S=t.title;t._titleWidth=0,t._titleHeight=0;var x;S.text?(x=Xt.ensureSingle(k,"text",a+"titletext"),x.attr("text-anchor","start").call(Zt.font,S.font).text(S.text),rh(x,k,e,t,au)):k.selectAll("."+a+"titletext").remove();var T=Xt.ensureSingle(w,"rect","scrollbar",function(p){p.attr(en.scrollBarEnterAttrs).call(eh.fill,en.scrollBarColor)}),d=k.selectAll("g.groups").data(u);d.enter().append("g").attr("class","groups"),d.exit().remove();var b=d.selectAll("g.traces").data(Xt.identity);b.enter().append("g").attr("class","traces"),b.exit().remove(),b.style("opacity",function(p){var c=p[0].trace;return ou.traceIs(c,"pie-like")?y.indexOf(p[0].label)!==-1?.5:1:c.visible==="legendonly"?.5:1}).each(function(){la.select(this).call(fZ,e,t)}).call(lZ,e,t).each(function(){l||la.select(this).call(cZ,e,a)}),Xt.syncOrAsync([D2.previousPromises,function(){return dZ(e,d,b,t)},function(){var p=n._size,c=t.borderwidth,A=t.xref==="paper",h=t.yref==="paper";if(S.text&&uZ(x,t,c),!l){var R,E;A?R=p.l+p.w*t.x-iu[th(t)]*t._width:R=n.width*t.x-iu[th(t)]*t._width,h?E=p.t+p.h*(1-t.y)-iu[nh(t)]*t._effHeight:E=n.height*(1-t.y)-iu[nh(t)]*t._effHeight;var D=pZ(e,a,R,E);if(D)return;if(n.margin.autoexpand){var N=R,I=E;R=A?Xt.constrain(R,0,n.width-t._width):N,E=h?Xt.constrain(E,0,n.height-t._effHeight):I,R!==N&&Xt.log("Constrain "+a+".x to make legend fit inside graph"),E!==I&&Xt.log("Constrain "+a+".y to make legend fit inside graph")}Zt.setTranslate(w,R,E)}if(T.on(".drag",null),w.on("wheel",null),l||t._height<=t._maxHeight||e._context.staticPlot){var F=t._effHeight;l&&(F=t._height),m.attr({width:t._width-c,height:F-c,x:c/2,y:c/2}),Zt.setTranslate(k,0,0),M.select("rect").attr({width:t._width-2*c,height:F-2*c,x:c,y:c}),Zt.setClipUrl(k,o,e),Zt.setRect(T,0,0,0,0),delete t._scrollY}else{var L=Math.max(en.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),P=t._effHeight-L-2*en.scrollBarMargin,O=t._height-t._effHeight,U=P/O,X=Math.min(t._scrollY||0,O);m.attr({width:t._width-2*c+en.scrollBarWidth+en.scrollBarMargin,height:t._effHeight-c,x:c/2,y:c/2}),M.select("rect").attr({width:t._width-2*c+en.scrollBarWidth+en.scrollBarMargin,height:t._effHeight-2*c,x:c,y:c+X}),Zt.setClipUrl(k,o,e),oe(X,L,U),w.on("wheel",function(){X=Xt.constrain(t._scrollY+la.event.deltaY/P*O,0,O),oe(X,L,U),X!==0&&X!==O&&la.event.preventDefault()});var j,$,Y,q=function(te,ue,de){var Ee=(de-ue)/U+te;return Xt.constrain(Ee,0,O)},Z=function(te,ue,de){var Ee=(ue-de)/U+te;return Xt.constrain(Ee,0,O)},ne=la.behavior.drag().on("dragstart",function(){var te=la.event.sourceEvent;te.type==="touchstart"?j=te.changedTouches[0].clientY:j=te.clientY,Y=X}).on("drag",function(){var te=la.event.sourceEvent;te.buttons===2||te.ctrlKey||(te.type==="touchmove"?$=te.changedTouches[0].clientY:$=te.clientY,X=q(Y,j,$),oe(X,L,U))});T.call(ne);var Q=la.behavior.drag().on("dragstart",function(){var te=la.event.sourceEvent;te.type==="touchstart"&&(j=te.changedTouches[0].clientY,Y=X)}).on("drag",function(){var te=la.event.sourceEvent;te.type==="touchmove"&&($=te.changedTouches[0].clientY,X=Z(Y,j,$),oe(X,L,U))});k.call(Q)}function oe(te,ue,de){t._scrollY=e._fullLayout[a]._scrollY=te,Zt.setTranslate(k,0,-te),Zt.setRect(T,t._width,en.scrollBarMargin+te*de,en.scrollBarWidth,ue),M.select("rect").attr("y",c+te)}if(e._context.edits.legendPosition){var ee,G,re,H;w.classed("cursor-move",!0),R2.init({element:w.node(),gd:e,prepFn:function(te){if(te.target!==T.node()){var ue=Zt.getTranslate(w);re=ue.x,H=ue.y}},moveFn:function(te,ue){if(re!==void 0&&H!==void 0){var de=re+te,Ee=H+ue;Zt.setTranslate(w,de,Ee),ee=R2.align(de,t._width,p.l,p.l+p.w,t.xanchor),G=R2.align(Ee+t._height,-t._height,p.t+p.h,p.t,t.yanchor)}},doneFn:function(){if(ee!==void 0&&G!==void 0){var te={};te[a+".x"]=ee,te[a+".y"]=G,ou.call("_guiRelayout",e,te)}},clickFn:function(te,ue){var de=i.selectAll("g.traces").filter(function(){var Ee=this.getBoundingClientRect();return ue.clientX>=Ee.left&&ue.clientX<=Ee.right&&ue.clientY>=Ee.top&&ue.clientY<=Ee.bottom});de.size()>0&&S9(e,w,de,te,ue)}})}}],e)}}function jv(e,r,t){var n=e[0],a=n.width,o=r.entrywidthmode,i=n.trace.legendwidth||r.entrywidth;return o==="fraction"?r._maxWidth*i:t+(i||a)}function S9(e,r,t,n,a){var o=t.data()[0][0].trace,i={event:a,node:t.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};o._group&&(i.group=o._group),ou.traceIs(o,"pie-like")&&(i.label=t.datum()[0].label);var l=x9.triggerHandler(e,"plotly_legendclick",i);if(n===1){if(l===!1)return;r._clickTimeout=setTimeout(function(){e._fullLayout&&b9(t,e,n)},e._context.doubleClickDelay)}else if(n===2){r._clickTimeout&&clearTimeout(r._clickTimeout),e._legendMouseDownTime=0;var u=x9.triggerHandler(e,"plotly_legenddoubleclick",i);u!==!1&&l!==!1&&b9(t,e,n)}}function fZ(e,r,t){var n=ah(t),a=e.data()[0][0],o=a.trace,i=ou.traceIs(o,"pie-like"),l=!t._inHover&&r._context.edits.legendText&&!i,u=t._maxNameLength,s,f;a.groupTitle?(s=a.groupTitle.text,f=a.groupTitle.font):(f=t.font,t.entries?s=a.text:(s=i?a.label:o.name,o._meta&&(s=Xt.templateString(s,o._meta))));var v=Xt.ensureSingle(e,"text",n+"text");v.attr("text-anchor","start").call(Zt.font,f).text(l?A9(s,u):s);var g=t.indentation+t.itemwidth+en.itemGap*2;Wl.positionText(v,g,0),l?v.call(Wl.makeEditable,{gd:r,text:s}).call(rh,e,r,t).on("edit",function(_){this.text(A9(_,u)).call(rh,e,r,t);var y=a.trace._fullInput||{},w={};return w.name=_,y._isShape?ou.call("_guiRelayout",r,"shapes["+o.index+"].name",w.name):ou.call("_guiRestyle",r,w,o.index)}):rh(v,e,r,t)}function A9(e,r){var t=Math.max(4,r);if(e&&e.trim().length>=t/2)return e;e=e||"";for(var n=t-e.length;n>0;n--)e+=" ";return e}function cZ(e,r,t){var n=r._context.doubleClickDelay,a,o=1,i=Xt.ensureSingle(e,"rect",t+"toggle",function(l){r._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(eh.fill,"rgba(0,0,0,0)")});r._context.staticPlot||(i.on("mousedown",function(){a=new Date().getTime(),a-r._legendMouseDownTimen&&(o=Math.max(o-1,1)),S9(r,l,e,o,la.event)}}))}function rh(e,r,t,n,a){n._inHover&&e.attr("data-notex",!0),Wl.convertToTspans(e,t,function(){vZ(r,t,n,a)})}function vZ(e,r,t,n){var a=e.data()[0][0];if(!t._inHover&&a&&!a.trace.showlegend){e.remove();return}var o=e.select("g[class*=math-group]"),i=o.node(),l=ah(t);t||(t=r._fullLayout[l]);var u=t.borderwidth,s;n===au?s=t.title.font:a.groupTitle?s=a.groupTitle.font:s=t.font;var f=s.size*k9,v,g;if(i){var _=Zt.bBox(i);v=_.height,g=_.width,n===au?Zt.setTranslate(o,u,u+v*.75):Zt.setTranslate(o,0,v*.25)}else{var y="."+l+(n===au?"title":"")+"text",w=e.select(y),M=Wl.lineCount(w),m=w.node();if(v=f*M,g=m?Zt.bBox(m).width:0,n===au)t.title.side==="left"&&(g+=en.itemGap*2),Wl.positionText(w,u+en.titlePad,u+f);else{var k=en.itemGap*2+t.indentation+t.itemwidth;a.groupTitle&&(k=en.itemGap,g-=t.indentation+t.itemwidth),Wl.positionText(w,k,-f*((M-1)/2-.3))}}n===au?(t._titleWidth=g,t._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=g)}function hZ(e){var r=0,t=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(r=e._titleWidth),n.indexOf("top")!==-1&&(t=e._titleHeight)),[r,t]}function dZ(e,r,t,n){var a=e._fullLayout,o=ah(n);n||(n=a[o]);var i=a._size,l=M9.isVertical(n),u=M9.isGrouped(n),s=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,g=en.itemGap,_=n.indentation+n.itemwidth+g*2,y=2*(f+g),w=nh(n),M=n.y<0||n.y===0&&w==="top",m=n.y>1||n.y===1&&w==="bottom",k=n.tracegroupgap,S={};n._maxHeight=Math.max(M||m?a.height/2:i.h,30);var x=0;n._width=0,n._height=0;var T=hZ(n);if(l)t.each(function(Y){var q=Y[0].height;Zt.setTranslate(this,f+T[0],f+T[1]+n._height+q/2+g),n._height+=q,n._width=Math.max(n._width,Y[0].width)}),x=_+n._width,n._width+=g+_+v,n._height+=y,u&&(r.each(function(Y,q){Zt.setTranslate(this,0,q*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var d=th(n),b=n.x<0||n.x===0&&d==="right",p=n.x>1||n.x===1&&d==="left",c=m||M,A=a.width/2;n._maxWidth=Math.max(b?c&&d==="left"?i.l+i.w:A:p?c&&d==="right"?i.r+i.w:A:i.w,2*_);var h=0,R=0;t.each(function(Y){var q=jv(Y,n,_);h=Math.max(h,q),R+=q}),x=null;var E=0;if(u){var D=0,N=0,I=0;r.each(function(){var Y=0,q=0;la.select(this).selectAll("g.traces").each(function(ne){var Q=jv(ne,n,_),oe=ne[0].height;Zt.setTranslate(this,T[0],T[1]+f+g+oe/2+q),q+=oe,Y=Math.max(Y,Q),S[ne[0].trace.legendgroup]=Y});var Z=Y+g;N>0&&Z+f+N>n._maxWidth?(E=Math.max(E,N),N=0,I+=D+k,D=q):D=Math.max(D,q),Zt.setTranslate(this,N,I),N+=Z}),n._width=Math.max(E,N)+f,n._height=I+D+y}else{var F=t.size(),L=R+v+(F-1)*g=n._maxWidth&&(E=Math.max(E,X),O=0,U+=P,n._height+=P,P=0),Zt.setTranslate(this,T[0]+f+O,T[1]+f+U+q/2+g),X=O+Z+g,O+=ne,P=Math.max(P,q)}),L?(n._width=O+v,n._height=P+y):(n._width=Math.max(E,X)+v,n._height+=P+y)}}n._width=Math.ceil(Math.max(n._width+T[0],n._titleWidth+2*(f+en.titlePad))),n._height=Math.ceil(Math.max(n._height+T[1],n._titleHeight+2*(f+en.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var j=e._context.edits,$=j.legendText||j.legendPosition;t.each(function(Y){var q=la.select(this).select("."+o+"toggle"),Z=Y[0].height,ne=Y[0].trace.legendgroup,Q=jv(Y,n,_);u&&ne!==""&&(Q=S[ne]);var oe=$?_:x||Q;!l&&!s&&(oe+=g/2),Zt.setRect(q,0,-Z/2,oe,Z)})}function pZ(e,r,t,n){var a=e._fullLayout,o=a[r],i=th(o),l=nh(o),u=o.xref==="paper",s=o.yref==="paper";e._fullLayout._reservedMargin[r]={};var f=o.y<.5?"b":"t",v=o.x<.5?"l":"r",g={r:a.width-t,l:t+o._width,b:a.height-n,t:n+o._effHeight};if(u&&s)return D2.autoMargin(e,r,{x:o.x,y:o.y,l:o._width*iu[i],r:o._width*_9[i],b:o._effHeight*_9[l],t:o._effHeight*iu[l]});u?e._fullLayout._reservedMargin[r][f]=g[f]:s||o.orientation==="v"?e._fullLayout._reservedMargin[r][v]=g[v]:e._fullLayout._reservedMargin[r][f]=g[f]}function th(e){return Xt.isRightAnchor(e)?"right":Xt.isCenterAnchor(e)?"center":"left"}function nh(e){return Xt.isBottomAnchor(e)?"bottom":Xt.isMiddleAnchor(e)?"middle":"top"}function ah(e){return e._id||"legend"}});var q2=pe(z2=>{"use strict";var Xl=it(),ao=rt(),E9=ka(),It=ir(),gZ=It.pushUnique,I2=It.strTranslate,yZ=It.strRotate,mZ=mf(),Fa=Yn(),xZ=QM(),Ii=yt(),un=Zr(),ih=ti(),Ni=St(),bZ=wn().zindexSeparator,su=Er(),ni=to(),Zl=sf(),_Z=_2(),wZ=F2(),z9=Zl.YANGLE,N2=Math.PI*z9/180,MZ=1/Math.sin(N2),TZ=Math.cos(N2),AZ=Math.sin(N2),Ct=Zl.HOVERARROWSIZE,$r=Zl.HOVERTEXTPAD,L9={box:!0,ohlc:!0,violin:!0,candlestick:!0},kZ={scatter:!0,scattergl:!0,splom:!0};function R9(e,r){return e.distance-r.distance}z2.hover=function(r,t,n,a){r=It.getGraphDiv(r);var o=t.target;It.throttle(r._fullLayout._uid+Zl.HOVERID,Zl.HOVERMINTIME,function(){SZ(r,t,n,a,o)})};z2.loneHover=function(r,t){var n=!0;Array.isArray(r)||(n=!1,r=[r]);var a=t.gd,o=H9(a),i=V9(a),l=r.map(function(M){var m=M._x0||M.x0||M.x||0,k=M._x1||M.x1||M.x||0,S=M._y0||M.y0||M.y||0,x=M._y1||M.y1||M.y||0,T=M.eventData;if(T){var d=Math.min(m,k),b=Math.max(m,k),p=Math.min(S,x),c=Math.max(S,x),A=M.trace;if(su.traceIs(A,"gl3d")){var h=a._fullLayout[A.scene]._scene.container,R=h.offsetLeft,E=h.offsetTop;d+=R,b+=R,p+=E,c+=E}T.bbox={x0:d+i,x1:b+i,y0:p+o,y1:c+o},t.inOut_bbox&&t.inOut_bbox.push(T.bbox)}else T=!1;return{color:M.color||un.defaultLine,x0:M.x0||M.x||0,x1:M.x1||M.x||0,y0:M.y0||M.y||0,y1:M.y1||M.y||0,xLabel:M.xLabel,yLabel:M.yLabel,zLabel:M.zLabel,text:M.text,name:M.name,idealAlign:M.idealAlign,borderColor:M.borderColor,fontFamily:M.fontFamily,fontSize:M.fontSize,fontColor:M.fontColor,fontWeight:M.fontWeight,fontStyle:M.fontStyle,fontVariant:M.fontVariant,nameLength:M.nameLength,textAlign:M.textAlign,trace:M.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:M.hovertemplate||!1,hovertemplateLabels:M.hovertemplateLabels||!1,eventData:T}}),u=!1,s=O9(l,{gd:a,hovermode:"closest",rotateLabels:u,bgColor:t.bgColor||un.background,container:Xl.select(t.container),outerContainer:t.outerContainer||t.container}),f=s.hoverLabels,v=5,g=0,_=0;f.sort(function(M,m){return M.y0-m.y0}).each(function(M,m){var k=M.y0-M.by/2;k-vb[0]._length||H<0||H>p[0]._length)return ih.unhoverRaw(e,r)}if(r.pointerX=re+b[0]._offset,r.pointerY=H+p[0]._offset,"xval"in r?I=ni.flat(o,r.xval):I=ni.p2c(b,re),"yval"in r?F=ni.flat(o,r.yval):F=ni.p2c(p,H),!ao(I[0])||!ao(F[0]))return It.warn("Fx.hover failed",r,e),ih.unhoverRaw(e,r)}var de=1/0;function Ee(mr,ct){for(P=0;Pne&&(D.splice(0,ne),de=D[0].distance),v&&E!==0&&D.length===0){Z.distance=E,Z.index=!1;var Hr=U._module.hoverPoints(Z,Y,q,"closest",{hoverLayer:l._hoverlayer});if(Hr&&(Hr=Hr.filter(function(nt){return nt.spikeDistance<=E})),Hr&&Hr.length){var Ot,Lt=Hr.filter(function(nt){return nt.xa.showspikes&&nt.xa.spikesnap!=="hovered data"});if(Lt.length){var yn=Lt[0];ao(yn.x0)&&ao(yn.y0)&&(Ot=ve(yn),(!Q.vLinePoint||Q.vLinePoint.spikeDistance>Ot.spikeDistance)&&(Q.vLinePoint=Ot))}var Gt=Hr.filter(function(nt){return nt.ya.showspikes&&nt.ya.spikesnap!=="hovered data"});if(Gt.length){var Rt=Gt[0];ao(Rt.x0)&&ao(Rt.y0)&&(Ot=ve(Rt),(!Q.hLinePoint||Q.hLinePoint.spikeDistance>Ot.spikeDistance)&&(Q.hLinePoint=Ot))}}}}}Ee();function Me(mr,ct,Sr){for(var Ur=null,bt=1/0,zr,Hr=0;Hr0&&Math.abs(mr.distance)he-1;Ge--)Ye(D[Ge]);D=ze,Ce()}var We=e._hoverdata,we=[],Pe=H9(e),Qe=V9(e);for(L=0;L1||D.length>1)||g==="closest"&&oe&&D.length>1,Tr=un.combine(l.plot_bgcolor||un.background,l.paper_bgcolor),Ar=O9(D,{gd:e,hovermode:g,rotateLabels:Cr,bgColor:Tr,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),ft=Ar.hoverLabels;if(ni.isUnifiedHover(g)||(EZ(ft,Cr,l,Ar.commonLabelBoundingBox),U9(ft,Cr,l._invScaleX,l._invScaleY)),a&&a.tagName){var Yr=su.getComponentMethod("annotations","hasClickToShow")(e,we);xZ(Xl.select(a),Yr?"pointer":"")}!a||n||!DZ(e,r,We)||(We&&e.emit("plotly_unhover",{event:r,points:We}),e.emit("plotly_hover",{event:r,points:e._hoverdata,xaxes:b,yaxes:p,xvals:I,yvals:F}))}function q9(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 CZ=/([\s\S]*)<\/extra>/;function O9(e,r){var t=r.gd,n=t._fullLayout,a=r.hovermode,o=r.rotateLabels,i=r.bgColor,l=r.container,u=r.outerContainer,s=r.commonLabelOpts||{};if(e.length===0)return[[]];var f=r.fontFamily||Zl.HOVERFONT,v=r.fontSize||Zl.HOVERFONTSIZE,g=r.fontWeight||n.font.weight,_=r.fontStyle||n.font.style,y=r.fontVariant||n.font.variant,w=r.fontTextcase||n.font.textcase,M=r.fontLineposition||n.font.lineposition,m=r.fontShadow||n.font.shadow,k=e[0],S=k.xa,x=k.ya,T=a.charAt(0),d=T+"Label",b=k[d];if(b===void 0&&S.type==="multicategory")for(var p=0;pn.width-We&&(we=n.width-We),ye.attr("d","M"+(Je-we)+",0L"+(Je-we+Ct)+","+Ge+Ct+"H"+We+"v"+Ge+($r*2+Fe.height)+"H"+-We+"V"+Ge+Ct+"H"+(Je-we-Ct)+"Z"),Je=we,P.minX=Je-We,P.maxX=Je+We,S.side==="top"?(P.minY=Ye-($r*2+Fe.height),P.maxY=Ye-$r):(P.minY=Ye+$r,P.maxY=Ye+($r*2+Fe.height))}else{var Pe,Qe,Ve;x.side==="right"?(Pe="start",Qe=1,Ve="",Je=S._offset+S._length):(Pe="end",Qe=-1,Ve="-",Je=S._offset),Ye=x._offset+(k.y0+k.y1)/2,Le.attr("text-anchor",Pe),ye.attr("d","M0,0L"+Ve+Ct+","+Ct+"V"+($r+Fe.height/2)+"h"+Ve+($r*2+Fe.width)+"V-"+($r+Fe.height/2)+"H"+Ve+Ct+"V-"+Ct+"Z"),P.minY=Ye-($r+Fe.height/2),P.maxY=Ye+($r+Fe.height/2),x.side==="right"?(P.minX=Je+Ct,P.maxX=Je+Ct+($r*2+Fe.width)):(P.minX=Je-Ct-($r*2+Fe.width),P.maxX=Je-Ct);var ar=Fe.height/2,se=A-Fe.top-ar,K="clip"+n._uid+"commonlabel"+x._id,ae;if(Je=0?Ue=ke:De+H=0?Ue=De:Ce+H=0?ge=ve:Ae+te=0?ge=Ae:Oe+te=0,(ce.idealAlign==="top"||!je)&&nr?(Ve-=se/2,ce.anchor="end"):je?(Ve+=se/2,ce.anchor="start"):ce.anchor="middle",ce.crossPos=Ve;else{if(ce.pos=Ve,je=Qe+ar/2+Be<=h,nr=Qe-ar/2-Be>=0,(ce.idealAlign==="left"||!je)&&nr)Qe-=ar/2,ce.anchor="end";else if(je)Qe+=ar/2,ce.anchor="start";else{ce.anchor="middle";var hr=Be/2,wr=Qe+hr-h,Cr=Qe-hr;wr>0&&(Qe-=wr),Cr<0&&(Qe+=-Cr)}ce.crossPos=Qe}Ye.attr("text-anchor",ce.anchor),We&&Ge.attr("text-anchor",ce.anchor),ye.attr("transform",I2(Qe,Ve)+(o?yZ(z9):""))}),{hoverLabels:Te,commonLabelBoundingBox:P}}function D9(e,r,t,n,a,o){var i="",l="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=It.templateString(e.name,e.trace._meta)),i=I9(e.name,e.nameLength));var u=t.charAt(0),s=u==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(l+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(l+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(l+=(l?"z: ":"")+e.zLabel)):r&&e[u+"Label"]===a?l=e[s+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(l=e.yLabel):e.yLabel===void 0?l=e.xLabel:l="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(l+=(l?"
":"")+e.text),e.extraText!==void 0&&(l+=(l?"
":"")+e.extraText),o&&l===""&&!e.hovertemplate&&(i===""&&o.remove(),l=i);var f=e.hovertemplate||!1;if(f){var v=e.hovertemplateLabels||e;e[u+"Label"]!==a&&(v[u+"other"]=v[u+"Val"],v[u+"otherLabel"]=v[u+"Label"]),l=It.hovertemplateString(f,v,n._d3locale,e.eventData[0]||{},e.trace._meta),l=l.replace(CZ,function(g,_){return i=I9(_,e.nameLength),""})}return[l,i]}function EZ(e,r,t,n){var a=r?"xa":"ya",o=r?"ya":"xa",i=0,l=1,u=e.size(),s=new Array(u),f=0,v=n.minX,g=n.maxX,_=n.minY,y=n.maxY,w=function(I){return I*t._invScaleX},M=function(I){return I*t._invScaleY};e.each(function(I){var F=I[a],L=I[o],P=F._id.charAt(0)==="x",O=F.range;f===0&&O&&O[0]>O[1]!==P&&(l=-1);var U=0,X=P?t.width:t.height;if(t.hovermode==="x"||t.hovermode==="y"){var j=B9(I,r),$=I.anchor,Y=$==="end"?-1:1,q,Z;if($==="middle")q=I.crossPos+(P?M(j.y-I.by/2):w(I.bx/2+I.tx2width/2)),Z=q+(P?M(I.by):w(I.bx));else if(P)q=I.crossPos+M(Ct+j.y)-M(I.by/2-Ct),Z=q+M(I.by);else{var ne=w(Y*Ct+j.x),Q=ne+w(Y*I.bx);q=I.crossPos+Math.min(ne,Q),Z=I.crossPos+Math.max(ne,Q)}P?_!==void 0&&y!==void 0&&Math.min(Z,y)-Math.max(q,_)>1&&(L.side==="left"?(U=L._mainLinePosition,X=t.width):X=L._mainLinePosition):v!==void 0&&g!==void 0&&Math.min(Z,g)-Math.max(q,v)>1&&(L.side==="top"?(U=L._mainLinePosition,X=t.height):X=L._mainLinePosition)}s[f++]=[{datum:I,traceIndex:I.trace.index,dp:0,pos:I.pos,posref:I.posref,size:I.by*(P?MZ:1)/2,pmin:U,pmax:X}]}),s.sort(function(I,F){return I[0].posref-F[0].posref||l*(F[0].traceIndex-I[0].traceIndex)});var m,k,S,x,T,d,b;function p(I){var F=I[0],L=I[I.length-1];if(k=F.pmin-F.pos-F.dp+F.size,S=L.pos+L.dp+L.size-F.pmax,k>.01){for(T=I.length-1;T>=0;T--)I[T].dp+=k;m=!1}if(!(S<.01)){if(k<-.01){for(T=I.length-1;T>=0;T--)I[T].dp-=S;m=!1}if(m){var P=0;for(x=0;xF.pmax&&P++;for(x=I.length-1;x>=0&&!(P<=0);x--)d=I[x],d.pos>F.pmax-1&&(d.del=!0,P--);for(x=0;x=0;T--)I[T].dp-=S;for(x=I.length-1;x>=0&&!(P<=0);x--)d=I[x],d.pos+d.dp+d.size>F.pmax&&(d.del=!0,P--)}}}for(;!m&&i<=u;){for(i++,m=!0,x=0;x.01){for(T=A.length-1;T>=0;T--)A[T].dp+=k;for(c.push.apply(c,A),s.splice(x+1,1),b=0,T=c.length-1;T>=0;T--)b+=c[T].dp;for(S=b/c.length,T=c.length-1;T>=0;T--)c[T].dp-=S;m=!1}else x++}s.forEach(p)}for(x=s.length-1;x>=0;x--){var E=s[x];for(T=E.length-1;T>=0;T--){var D=E[T],N=D.datum;N.offset=D.dp,N.del=D.del}}}function B9(e,r){var t=0,n=e.offset;return r&&(n*=-AZ,t=e.offset*TZ),{x:t,y:n}}function LZ(e){var r={start:1,end:-1,middle:0}[e.anchor],t=r*(Ct+$r),n=t+r*(e.txwidth+$r),a=e.anchor==="middle";return a&&(t-=e.tx2width/2,n+=e.txwidth/2+$r),{alignShift:r,textShiftX:t,text2ShiftX:n}}function U9(e,r,t,n){var a=function(i){return i*t},o=function(i){return i*n};e.each(function(i){var l=Xl.select(this);if(i.del)return l.remove();var u=l.select("text.nums"),s=i.anchor,f=s==="end"?-1:1,v=LZ(i),g=B9(i,r),_=g.x,y=g.y,w=s==="middle";l.select("path").attr("d",w?"M-"+a(i.bx/2+i.tx2width/2)+","+o(y-i.by/2)+"h"+a(i.bx)+"v"+o(i.by)+"h-"+a(i.bx)+"Z":"M0,0L"+a(f*Ct+_)+","+o(Ct+y)+"v"+o(i.by/2-Ct)+"h"+a(f*i.bx)+"v-"+o(i.by)+"H"+a(f*Ct+_)+"V"+o(y-Ct)+"Z");var M=_+v.textShiftX,m=y+i.ty0-i.by/2+$r,k=i.textAlign||"auto";k!=="auto"&&(k==="left"&&s!=="start"?(u.attr("text-anchor","start"),M=w?-i.bx/2-i.tx2width/2+$r:-i.bx-$r):k==="right"&&s!=="end"&&(u.attr("text-anchor","end"),M=w?i.bx/2-i.tx2width/2-$r:i.bx+$r)),u.call(Fa.positionText,a(M),o(m)),i.tx2width&&(l.select("text.name").call(Fa.positionText,a(v.text2ShiftX+v.alignShift*$r+_),o(y+i.ty0-i.by/2+$r)),l.select("rect").call(Ii.setRect,a(v.text2ShiftX+(v.alignShift-1)*i.tx2width/2+_),o(y-i.by/2-1),a(i.tx2width),o(i.by+2)))})}function RZ(e,r){var t=e.index,n=e.trace||{},a=e.cd[0],o=e.cd[t]||{};function i(g){return g||ao(g)&&g===0}var l=Array.isArray(t)?function(g,_){var y=It.castOption(a,t,g);return i(y)?y:It.extractOption({},n,"",_)}:function(g,_){return It.extractOption(o,n,g,_)};function u(g,_,y){var w=l(_,y);i(w)&&(e[g]=w)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref=r==="y"||r==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=It.constrain(e.x0,0,e.xa._length),e.x1=It.constrain(e.x1,0,e.xa._length),e.y0=It.constrain(e.y0,0,e.ya._length),e.y1=It.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Ni.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:Ni.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 s=Ni.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+s+" / -"+Ni.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+s,r==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=Ni.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+Ni.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,r==="y"&&(e.distance+=1)}var v=e.hoverinfo||e.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(e.xLabel=void 0),v.indexOf("y")===-1&&(e.yLabel=void 0),v.indexOf("z")===-1&&(e.zLabel=void 0),v.indexOf("text")===-1&&(e.text=void 0),v.indexOf("name")===-1&&(e.name=void 0)),e}function P9(e,r,t){var n=t.container,a=t.fullLayout,o=a._size,i=t.event,l=!!r.hLinePoint,u=!!r.vLinePoint,s,f;if(n.selectAll(".spikeline").remove(),!!(u||l)){var v=un.combine(a.plot_bgcolor,a.paper_bgcolor);if(l){var g=r.hLinePoint,_,y;s=g&&g.xa,f=g&&g.ya;var w=f.spikesnap;w==="cursor"?(_=i.pointerX,y=i.pointerY):(_=s._offset+g.x,y=f._offset+g.y);var M=E9.readability(g.color,v)<1.5?un.contrast(v):g.color,m=f.spikemode,k=f.spikethickness,S=f.spikecolor||M,x=Ni.getPxPosition(e,f),T,d;if(m.indexOf("toaxis")!==-1||m.indexOf("across")!==-1){if(m.indexOf("toaxis")!==-1&&(T=x,d=_),m.indexOf("across")!==-1){var b=f._counterDomainMin,p=f._counterDomainMax;f.anchor==="free"&&(b=Math.min(b,f.position),p=Math.max(p,f.position)),T=o.l+b*o.w,d=o.l+p*o.w}n.insert("line",":first-child").attr({x1:T,x2:d,y1:y,y2:y,"stroke-width":k,stroke:S,"stroke-dasharray":Ii.dashStyle(f.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:T,x2:d,y1:y,y2:y,"stroke-width":k+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}m.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:x+(f.side!=="right"?k:-k),cy:y,r:k,fill:S}).classed("spikeline",!0)}if(u){var c=r.vLinePoint,A,h;s=c&&c.xa,f=c&&c.ya;var R=s.spikesnap;R==="cursor"?(A=i.pointerX,h=i.pointerY):(A=s._offset+c.x,h=f._offset+c.y);var E=E9.readability(c.color,v)<1.5?un.contrast(v):c.color,D=s.spikemode,N=s.spikethickness,I=s.spikecolor||E,F=Ni.getPxPosition(e,s),L,P;if(D.indexOf("toaxis")!==-1||D.indexOf("across")!==-1){if(D.indexOf("toaxis")!==-1&&(L=F,P=h),D.indexOf("across")!==-1){var O=s._counterDomainMin,U=s._counterDomainMax;s.anchor==="free"&&(O=Math.min(O,s.position),U=Math.max(U,s.position)),L=o.t+(1-U)*o.h,P=o.t+(1-O)*o.h}n.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:P,"stroke-width":N,stroke:I,"stroke-dasharray":Ii.dashStyle(s.spikedash,N)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:P,"stroke-width":N+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}D.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:A,cy:F-(s.side!=="top"?N:-N),r:N,fill:I}).classed("spikeline",!0)}}}function DZ(e,r,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var n=t.length-1;n>=0;n--){var a=t[n],o=e._hoverdata[n];if(a.curveNumber!==o.curveNumber||String(a.pointNumber)!==String(o.pointNumber)||String(a.pointNumbers)!==String(o.pointNumbers))return!0}return!1}function F9(e,r){return!r||r.vLinePoint!==e._spikepoints.vLinePoint||r.hLinePoint!==e._spikepoints.hLinePoint}function I9(e,r){return Fa.plainText(e||"",{len:r,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function PZ(e,r){for(var t=r.charAt(0),n=[],a=[],o=[],i=0;i{"use strict";var FZ=ir(),IZ=Zr(),NZ=to().isUnifiedHover;G9.exports=function(r,t,n,a){a=a||{};var o=t.legend;function i(l){a.font[l]||(a.font[l]=o?t.legend.font[l]:t.font[l])}t&&NZ(t.hovermode)&&(a.font||(a.font={}),i("size"),i("family"),i("color"),i("weight"),i("style"),i("variant"),o?(a.bgcolor||(a.bgcolor=IZ.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),FZ.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var W9=pe((jce,Y9)=>{"use strict";var zZ=ir(),qZ=oh(),OZ=_l();Y9.exports=function(r,t){function n(a,o){return zZ.coerce(r,t,OZ,a,o)}qZ(r,t,n)}});var J9=pe((eve,Z9)=>{"use strict";var X9=ir(),BZ=Ec(),UZ=oh();Z9.exports=function(r,t,n,a){function o(l,u){return X9.coerce(r,t,BZ,l,u)}var i=X9.extendFlat({},a.hoverlabel);t.hovertemplate&&(i.namelength=-1),UZ(r,t,o,i)}});var O2=pe((rve,K9)=>{"use strict";var HZ=ir(),VZ=_l();K9.exports=function(r,t){function n(a,o){return t[a]!==void 0?t[a]:HZ.coerce(r,t,VZ,a,o)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var j9=pe((tve,$9)=>{"use strict";var Q9=ir(),GZ=_l(),YZ=O2(),WZ=oh();$9.exports=function(r,t){function n(f,v){return Q9.coerce(r,t,GZ,f,v)}var a=YZ(r,t);a&&(n("hoverdistance"),n("spikedistance"));var o=n("dragmode");o==="select"&&n("selectdirection");var i=t._has("mapbox"),l=t._has("map"),u=t._has("geo"),s=t._basePlotModules.length;t.dragmode==="zoom"&&((i||l||u)&&s===1||(i||l)&&u&&s===2)&&(t.dragmode="pan"),WZ(r,t,n),Q9.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}});var tT=pe((nve,rT)=>{"use strict";var B2=ir(),eT=Er();rT.exports=function(r){var t=r.calcdata,n=r._fullLayout;function a(s){return function(f){return B2.coerceHoverinfo({hoverinfo:f},{_module:s._module},n)}}for(var o=0;o{"use strict";var ZZ=Er(),JZ=q2().hover;nT.exports=function(r,t,n){var a=ZZ.getComponentMethod("annotations","onClick")(r,r._hoverdata);n!==void 0&&JZ(r,t,n,!0);function o(){r.emit("plotly_click",{points:r._hoverdata,event:t})}r._hoverdata&&t&&t.target&&(a&&a.then?a.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}});var io=pe((ive,lT)=>{"use strict";var KZ=it(),lh=ir(),QZ=ti(),zf=to(),iT=_l(),oT=q2();lT.exports={moduleType:"component",name:"fx",constants:sf(),schema:{layout:iT},attributes:Ec(),layoutAttributes:iT,supplyLayoutGlobalDefaults:W9(),supplyDefaults:J9(),supplyLayoutDefaults:j9(),calc:tT(),getDistanceFunction:zf.getDistanceFunction,getClosest:zf.getClosest,inbox:zf.inbox,quadrature:zf.quadrature,appendArrayPointValue:zf.appendArrayPointValue,castHoverOption:jZ,castHoverinfo:eJ,hover:oT.hover,unhover:QZ.unhover,loneHover:oT.loneHover,loneUnhover:$Z,click:aT()};function $Z(e){var r=lh.isD3Selection(e)?e:KZ.select(e);r.selectAll("g.hovertext").remove(),r.selectAll(".spikeline").remove()}function jZ(e,r,t){return lh.castOption(e,r,"hoverlabel."+t)}function eJ(e,r,t){function n(a){return lh.coerceHoverinfo({hoverinfo:a},{_module:e._module},r)}return lh.castOption(e,t,"hoverinfo",n)}});var uu=pe(oo=>{"use strict";oo.selectMode=function(e){return e==="lasso"||e==="select"};oo.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};oo.openMode=function(e){return e==="drawline"||e==="drawopenpath"};oo.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};oo.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};oo.selectingOrDrawing=function(e){return oo.freeMode(e)||oo.rectMode(e)}});var sh=pe((lve,sT)=>{"use strict";sT.exports=function(r){var t=r._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var uh=pe((sve,uT)=>{"use strict";uT.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 ch=pe((uve,fT)=>{"use strict";var fh=32;fT.exports={CIRCLE_SIDES:fh,i000:0,i090:fh/4,i180:fh/2,i270:fh/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var vh=pe((fve,vT)=>{"use strict";var rJ=ir().strTranslate;function cT(e,r){switch(e.type){case"log":return e.p2d(r);case"date":return e.p2r(r,0,e.calendar);default:return e.p2r(r)}}function tJ(e,r){switch(e.type){case"log":return e.d2p(r);case"date":return e.r2p(r,0,e.calendar);default:return e.r2p(r)}}function nJ(e){var r=e._id.charAt(0)==="y"?1:0;return function(t){return cT(e,t[r])}}function aJ(e){return rJ(e.xaxis._offset,e.yaxis._offset)}vT.exports={p2r:cT,r2p:tJ,axValue:nJ,getTransform:aJ}});var Go=pe(lo=>{"use strict";var iJ=Cg(),pT=ch(),fu=pT.CIRCLE_SIDES,U2=pT.SQRT2,gT=vh(),hT=gT.p2r,dT=gT.r2p,oJ=[0,3,4,5,6,1,2],lJ=[0,3,4,1,2];lo.writePaths=function(e){var r=e.length;if(!r)return"M0,0Z";for(var t="",n=0;n0&&u{"use strict";var _T=uu(),sJ=_T.drawMode,uJ=_T.openMode,cu=ch(),yT=cu.i000,mT=cu.i090,xT=cu.i180,bT=cu.i270,fJ=cu.cos45,cJ=cu.sin45,wT=vh(),dh=wT.p2r,Yo=wT.r2p,vJ=Fo(),hJ=vJ.clearOutline,ph=Go(),dJ=ph.readPaths,pJ=ph.writePaths,gJ=ph.ellipseOver,yJ=ph.fixDatesForPaths;function mJ(e,r){if(e.length){var t=e[0][0];if(t){var n=r.gd,a=r.isActiveShape,o=r.dragmode,i=(n.layout||{}).shapes||[];if(!sJ(o)&&a!==void 0){var l=n._fullLayout._activeShapeIndex;if(l{"use strict";var xJ=uu(),bJ=xJ.selectMode,_J=Fo(),wJ=_J.clearOutline,H2=Go(),MJ=H2.readPaths,TJ=H2.writePaths,AJ=H2.fixDatesForPaths;AT.exports=function(r,t){if(r.length){var n=r[0][0];if(n){var a=n.getAttribute("d"),o=t.gd,i=o._fullLayout.newselection,l=t.plotinfo,u=l.xaxis,s=l.yaxis,f=t.isActiveSelection,v=t.dragmode,g=(o.layout||{}).selections||[];if(!bJ(v)&&f!==void 0){var _=o._fullLayout._activeSelectionIndex;if(_{"use strict";kT.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 Wo=pe(dn=>{"use strict";var Jl=Of(),ST=ir(),yh=St();dn.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(r){return r}};dn.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(r){return r}};dn.decodeDate=function(e){return function(r){return r.replace&&(r=r.replace("_"," ")),e(r)}};dn.encodeDate=function(e){return function(r){return e(r).replace(" ","_")}};dn.extractPathCoords=function(e,r,t){var n=[],a=e.match(Jl.segmentRE);return a.forEach(function(o){var i=r[o.charAt(0)].drawn;if(i!==void 0){var l=o.substr(1).match(Jl.paramRE);if(!(!l||l.length_&&(w="X"),w});return s>_&&(y=y.replace(/[\s,]*X.*/,""),ST.log("Ignoring extra params in segment "+u)),f+y})}function Bf(e,r){r=r||0;var t=0;return r&&e&&(e.type==="category"||e.type==="multicategory")&&(t=(e.r2p(1)-e.r2p(0))*r),t}});var Y2=pe((gve,RT)=>{"use strict";var SJ=ir(),vu=St(),CT=Yn(),ET=yt(),CJ=Go().readPaths,G2=Wo(),EJ=G2.getPathString,LT=Oc(),LJ=qn().FROM_TL;RT.exports=function(r,t,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var o;if(n.label.texttemplate){var i={};if(n.type!=="path"){var l=vu.getFromId(r,n.xref),u=vu.getFromId(r,n.yref);for(var s in LT){var f=LT[s](n,l,u);f!==void 0&&(i[s]=f)}}o=SJ.texttemplateStringForShapes(n.label.texttemplate,{},r._fullLayout._d3locale,i)}else o=n.label.text;var v={"data-index":t},g=n.label.font,_={"data-notex":1},y=a.append("g").attr(v).classed("shape-label",!0),w=y.append("text").attr(_).classed("shape-label-text",!0).text(o),M,m,k,S;if(n.path){var x=EJ(r,n),T=CJ(x,r);M=1/0,k=1/0,m=-1/0,S=-1/0;for(var d=0;d=e?a=r-n:a=n-r,-180/Math.PI*Math.atan2(a,o)}function DJ(e,r,t,n,a,o,i){var l=a.label.textposition,u=a.label.textangle,s=a.label.padding,f=a.type,v=Math.PI/180*o,g=Math.sin(v),_=Math.cos(v),y=a.label.xanchor,w=a.label.yanchor,M,m,k,S;if(f==="line"){l==="start"?(M=e,m=r):l==="end"?(M=t,m=n):(M=(e+t)/2,m=(r+n)/2),y==="auto"&&(l==="start"?u==="auto"?t>e?y="left":te?y="right":te?y="right":te?y="left":t{"use strict";var PJ=ir(),FJ=PJ.strTranslate,DT=ti(),IT=uu(),IJ=IT.drawMode,NT=IT.selectMode,zT=Er(),PT=Zr(),xh=ch(),NJ=xh.i000,zJ=xh.i090,qJ=xh.i180,OJ=xh.i270,BJ=Fo(),qT=BJ.clearOutlineControllers,X2=Go(),mh=X2.pointsOnRectangle,W2=X2.pointsOnEllipse,UJ=X2.writePaths,HJ=gh().newShapes,VJ=gh().createShapeObj,GJ=V2(),YJ=Y2();OT.exports=function e(r,t,n,a){a||(a=0);var o=n.gd;function i(){e(r,t,n,a++),(W2(r[0])||n.hasText)&&l({redrawing:!0})}function l(F){var L={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,L=HJ(t,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,L=GJ(t,n),o._fullLayout._reselect=!0),Object.keys(L).length&&zT.call((F||{}).redrawing?"relayout":"_guiRelayout",o,L)}var u=o._fullLayout,s=u._zoomlayer,f=n.dragmode,v=IJ(f),g=NT(f);(v||g)&&(o._fullLayout._outlining=!0),qT(o),t.attr("d",UJ(r));var _,y,w,M,m;if(!a&&(n.isActiveShape||n.isActiveSelection)){m=WJ([],r);var k=s.append("g").attr("class","outline-controllers");A(k),I()}if(v&&n.hasText){var S=s.select(".label-temp"),x=VJ(t,n,n.dragmode);YJ(o,"label-temp",x,S)}function T(F){w=+F.srcElement.getAttribute("data-i"),M=+F.srcElement.getAttribute("data-j"),_[w][M].moveFn=d}function d(F,L){if(r.length){var P=m[w][M][1],O=m[w][M][2],U=r[w],X=U.length;if(mh(U)){var j=F,$=L;if(n.isActiveSelection){var Y=FT(U,M);Y[1]===U[M][1]?$=0:j=0}for(var q=0;q1&&!(F.length===2&&F[1][0]==="Z")&&(M===0&&(F[0][0]="M"),r[w]=F,i(),l())}}function c(F,L){if(F===2){w=+L.srcElement.getAttribute("data-i"),M=+L.srcElement.getAttribute("data-j");var P=r[w];!mh(P)&&!W2(P)&&p()}}function A(F){_=[];for(var L=0;L{"use strict";var ZJ=it(),YT=Er(),BT=ir(),hu=St(),JJ=Go().readPaths,KJ=bh(),wh=Y2(),WT=Fo().clearOutlineControllers,Z2=Zr(),K2=yt(),QJ=gt().arrayEditor,UT=ti(),HT=Vo(),Kl=Of(),sa=Wo(),J2=sa.getPathString;JT.exports={draw:Q2,drawOne:XT,eraseActiveShape:eK,drawLabel:wh};function Q2(e){var r=e._fullLayout;r._shapeUpperLayer.selectAll("path").remove(),r._shapeLowerLayer.selectAll("path").remove(),r._shapeUpperLayer.selectAll("text").remove(),r._shapeLowerLayer.selectAll("text").remove();for(var t in r._plots){var n=r._plots[t].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;ai&&ke>l&&!Me.shiftKey?UT.getCursor(De/Ae,1-Ce/ke):"move";HT(r,Oe),Z=Oe.split("-")[0]}}function ee(Me){_h(e)||(u&&(m=U(t.xanchor)),s&&(k=X(t.yanchor)),t.type==="path"?h=t.path:(_=u?t.x0:U(t.x0),y=s?t.y0:X(t.y0),w=u?t.x1:U(t.x1),M=s?t.y1:X(t.y1)),_M?(S=y,b="y0",x=M,p="y1"):(S=M,b="y1",x=y,p="y0"),oe(Me),ue(a,t),Ee(r,t,e),q.moveFn=Z==="move"?H:te,q.altKey=Me.altKey)}function G(){_h(e)||(HT(r),de(a),ZT(r,e,t),YT.call("_guiRelayout",e,o.getUpdateObj()))}function re(){_h(e)||de(a)}function H(Me,ve){if(t.type==="path"){var Ae=function(Ce){return Ce},ke=Ae,De=Ae;u?g("xanchor",t.xanchor=j(m+Me)):(ke=function(Oe){return j(U(Oe)+Me)},E&&E.type==="date"&&(ke=sa.encodeDate(ke))),s?g("yanchor",t.yanchor=$(k+ve)):(De=function(Oe){return $(X(Oe)+ve)},N&&N.type==="date"&&(De=sa.encodeDate(De))),g("path",t.path=VT(h,ke,De))}else u?g("xanchor",t.xanchor=j(m+Me)):(g("x0",t.x0=j(_+Me)),g("x1",t.x1=j(w+Me))),s?g("yanchor",t.yanchor=$(k+ve)):(g("y0",t.y0=$(y+ve)),g("y1",t.y1=$(M+ve)));r.attr("d",J2(e,t)),ue(a,t),wh(e,n,t,R)}function te(Me,ve){if(v){var Ae=function(Fe){return Fe},ke=Ae,De=Ae;u?g("xanchor",t.xanchor=j(m+Me)):(ke=function(Je){return j(U(Je)+Me)},E&&E.type==="date"&&(ke=sa.encodeDate(ke))),s?g("yanchor",t.yanchor=$(k+ve)):(De=function(Je){return $(X(Je)+ve)},N&&N.type==="date"&&(De=sa.encodeDate(De))),g("path",t.path=VT(h,ke,De))}else if(f){if(Z==="resize-over-start-point"){var Ce=_+Me,Oe=s?y-ve:y+ve;g("x0",t.x0=u?Ce:j(Ce)),g("y0",t.y0=s?Oe:$(Oe))}else if(Z==="resize-over-end-point"){var Ue=w+Me,ge=s?M-ve:M+ve;g("x1",t.x1=u?Ue:j(Ue)),g("y1",t.y1=s?ge:$(ge))}}else{var Te=function(Fe){return Z.indexOf(Fe)!==-1},ce=Te("n"),ye=Te("s"),Le=Te("w"),me=Te("e"),he=ce?S+ve:S,be=ye?x+ve:x,Se=Le?T+Me:T,ze=me?d+Me:d;s&&(ce&&(he=S-ve),ye&&(be=x-ve)),(!s&&be-he>l||s&&he-be>l)&&(g(b,t[b]=s?he:$(he)),g(p,t[p]=s?be:$(be))),ze-Se>i&&(g(c,t[c]=u?Se:j(Se)),g(A,t[A]=u?ze:j(ze)))}r.attr("d",J2(e,t)),ue(a,t),wh(e,n,t,R)}function ue(Me,ve){(u||s)&&Ae();function Ae(){var ke=ve.type!=="path",De=Me.selectAll(".visual-cue").data([0]),Ce=1;De.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ce}).classed("visual-cue",!0);var Oe=U(u?ve.xanchor:BT.midRange(ke?[ve.x0,ve.x1]:sa.extractPathCoords(ve.path,Kl.paramIsX))),Ue=X(s?ve.yanchor:BT.midRange(ke?[ve.y0,ve.y1]:sa.extractPathCoords(ve.path,Kl.paramIsY)));if(Oe=sa.roundPositionForSharpStrokeRendering(Oe,Ce),Ue=sa.roundPositionForSharpStrokeRendering(Ue,Ce),u&&s){var ge="M"+(Oe-1-Ce)+","+(Ue-1-Ce)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";De.attr("d",ge)}else if(u){var Te="M"+(Oe-1-Ce)+","+(Ue-9-Ce)+"v18 h2 v-18 Z";De.attr("d",Te)}else{var ce="M"+(Oe-9-Ce)+","+(Ue-1-Ce)+"h18 v2 h-18 Z";De.attr("d",ce)}}}function de(Me){Me.selectAll(".visual-cue").remove()}function Ee(Me,ve,Ae){var ke=ve.xref,De=ve.yref,Ce=hu.getFromId(Ae,ke),Oe=hu.getFromId(Ae,De),Ue="";ke!=="paper"&&!Ce.autorange&&(Ue+=ke),De!=="paper"&&!Oe.autorange&&(Ue+=De),K2.setClipUrl(Me,Ue?"clip"+Ae._fullLayout._uid+Ue:null,Ae)}}function VT(e,r,t){return e.replace(Kl.segmentRE,function(n){var a=0,o=n.charAt(0),i=Kl.paramIsX[o],l=Kl.paramIsY[o],u=Kl.numParams[o],s=n.substr(1).replace(Kl.paramRE,function(f){return a>=u||(i[a]?f=r(f):l[a]&&(f=t(f)),a++),f});return o+s})}function jJ(e,r){if(Mh(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){GT(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=GT,Q2(e)}}}function GT(e){if(Mh(e)){var r=e._fullLayout._activeShapeIndex;r>=0&&(WT(e),delete e._fullLayout._activeShapeIndex,Q2(e))}}function eK(e){if(Mh(e)){WT(e);var r=e._fullLayout._activeShapeIndex,t=(e.layout||{}).shapes||[];if(r{"use strict";var Ia=Er(),KT=ln(),QT=on(),jr=uh(),rK=Th().eraseActiveShape,Ah=ir(),Kr=Ah._,et=aA.exports={};et.toImage={name:"toImage",title:function(e){var r=e._context.toImageButtonOptions||{},t=r.format||"png";return t==="png"?Kr(e,"Download plot as a png"):Kr(e,"Download plot")},icon:jr.camera,click:function(e){var r=e._context.toImageButtonOptions,t={format:r.format||"png"};Ah.notifier(Kr(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in r&&(t[n]=r[n])}),Ia.call("downloadImage",e,t).then(function(n){Ah.notifier(Kr(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){Ah.notifier(Kr(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};et.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Kr(e,"Edit in Chart Studio")},icon:jr.disk,click:function(e){KT.sendDataToCloud(e)}};et.editInChartStudio={name:"editInChartStudio",title:function(e){return Kr(e,"Edit in Chart Studio")},icon:jr.pencil,click:function(e){KT.sendDataToCloud(e)}};et.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Kr(e,"Zoom")},attr:"dragmode",val:"zoom",icon:jr.zoombox,click:Un};et.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Kr(e,"Pan")},attr:"dragmode",val:"pan",icon:jr.pan,click:Un};et.select2d={name:"select2d",_cat:"select",title:function(e){return Kr(e,"Box Select")},attr:"dragmode",val:"select",icon:jr.selectbox,click:Un};et.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Kr(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:jr.lasso,click:Un};et.drawclosedpath={name:"drawclosedpath",title:function(e){return Kr(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:jr.drawclosedpath,click:Un};et.drawopenpath={name:"drawopenpath",title:function(e){return Kr(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:jr.drawopenpath,click:Un};et.drawline={name:"drawline",title:function(e){return Kr(e,"Draw line")},attr:"dragmode",val:"drawline",icon:jr.drawline,click:Un};et.drawrect={name:"drawrect",title:function(e){return Kr(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:jr.drawrect,click:Un};et.drawcircle={name:"drawcircle",title:function(e){return Kr(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:jr.drawcircle,click:Un};et.eraseshape={name:"eraseshape",title:function(e){return Kr(e,"Erase active shape")},icon:jr.eraseshape,click:rK};et.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Kr(e,"Zoom in")},attr:"zoom",val:"in",icon:jr.zoom_plus,click:Un};et.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Kr(e,"Zoom out")},attr:"zoom",val:"out",icon:jr.zoom_minus,click:Un};et.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Kr(e,"Autoscale")},attr:"zoom",val:"auto",icon:jr.autoscale,click:Un};et.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Kr(e,"Reset axes")},attr:"zoom",val:"reset",icon:jr.home,click:Un};et.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Kr(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:jr.tooltip_basic,gravity:"ne",click:Un};et.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Kr(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:jr.tooltip_compare,gravity:"ne",click:Un};function Un(e,r){var t=r.currentTarget,n=t.getAttribute("data-attr"),a=t.getAttribute("data-val")||!0,o=e._fullLayout,i={},l=QT.list(e,null,!0),u=o._cartesianSpikesEnabled,s,f;if(n==="zoom"){var v=a==="in"?.5:2,g=(1+v)/2,_=(1-v)/2,y;for(f=0;f{"use strict";var iA=ey(),aK=Object.keys(iA),oA=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],lA=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(oA),pu=[],iK=function(e){if(lA.indexOf(e._cat||e.name)===-1){var r=e.name,t=(e._cat||e.name).toLowerCase();pu.indexOf(r)===-1&&pu.push(r),pu.indexOf(t)===-1&&pu.push(t)}};aK.forEach(function(e){iK(iA[e])});pu.sort();sA.exports={DRAW_MODES:oA,backButtons:lA,foreButtons:pu}});var ty=pe((wve,uA)=>{"use strict";var _ve=ry();uA.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 cA=pe((Mve,fA)=>{"use strict";var oK=ir(),Uf=Zr(),lK=gt(),sK=ty();fA.exports=function(r,t){var n=r.modebar||{},a=lK.newContainer(t,"modebar");function o(l,u){return oK.coerce(n,a,sK,l,u)}o("orientation"),o("bgcolor",Uf.addOpacity(t.paper_bgcolor,.5));var i=Uf.contrast(Uf.rgb(t.modebar.bgcolor));o("color",Uf.addOpacity(i,.3)),o("activecolor",Uf.addOpacity(i,.7)),o("uirevision",t.uirevision),o("add"),o("remove")}});var pA=pe((Tve,dA)=>{"use strict";var ny=it(),uK=rt(),Sh=ir(),vA=uh(),fK=pc().version,cK=new DOMParser;function hA(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var zi=hA.prototype;zi.update=function(e,r){this.graphInfo=e;var t=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar",t.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",r=r.reverse());var o=n.modebar,i="#"+a+" .modebar-group";document.querySelectorAll(i).forEach(function(v){v.style.backgroundColor=o.bgcolor}),Sh.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color);var l=!this.hasButtons(r),u=this.hasLogo!==t.displaylogo,s=this.locale!==t.locale;if(this.locale=t.locale,(l||u||s)&&(this.removeAllButtons(),this.updateButtons(r),t.watermark||t.displaylogo)){var f=this.getLogo();t.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};zi.updateButtons=function(e){var r=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(t){var n=r.createGroup();t.forEach(function(a){var o=a.name;if(!o)throw new Error("must provide button 'name' in button config");if(r.buttonsNames.indexOf(o)!==-1)throw new Error("button name '"+o+"' is taken");r.buttonsNames.push(o);var i=r.createButton(a);r.buttonElements.push(i),n.appendChild(i)}),r.element.appendChild(n)})};zi.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var r=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=r.bgcolor,e};zi.createButton=function(e){var r=this,t=document.createElement("a");t.setAttribute("rel","tooltip"),t.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&t.setAttribute("data-title",n),e.attr!==void 0&&t.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),t.setAttribute("data-val",a));var o=e.click;if(typeof o!="function")throw new Error("must provide button 'click' function in button config");t.addEventListener("click",function(l){e.click(r.graphInfo,l),r.updateActiveButton(l.currentTarget)}),t.setAttribute("data-toggle",e.toggle||!1),e.toggle&&ny.select(t).classed("active",!0);var i=e.icon;return typeof i=="function"?t.appendChild(i()):t.appendChild(this.createIcon(i||vA.question)),t.setAttribute("data-gravity",e.gravity||"n"),t};zi.createIcon=function(e){var r=uK(e.height)?Number(e.height):e.ascent-e.descent,t="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(t,"svg"),n.setAttribute("viewBox",[0,0,e.width,r].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(t,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var o=cK.parseFromString(e.svg,"application/xml");n=o.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};zi.updateActiveButton=function(e){var r=this.graphInfo._fullLayout,t=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,o=n.getAttribute("data-attr"),i=n.getAttribute("data-toggle")==="true",l=ny.select(n),u=function(v,g){var _=r.modebar,y=v.querySelector(".icon path");y&&(g||v.matches(":hover")?y.style.fill=_.activecolor:y.style.fill=_.color)};if(i){if(o===t){var s=!l.classed("active");l.classed("active",s),u(n,s)}}else{var f=o===null?o:Sh.nestedProperty(r,o).get();l.classed("active",f===a),u(n,f===a)}})};zi.hasButtons=function(e){var r=this.buttons;if(!r||e.length!==r.length)return!1;for(var t=0;t{"use strict";var dK=on(),gA=oa(),ay=Er(),pK=to().isUnifiedHover,gK=pA(),Ch=ey(),yK=ry().DRAW_MODES,mK=ir().extendDeep;yA.exports=function(r){var t=r._fullLayout,n=r._context,a=t._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete t._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 o=n.modeBarButtons,i;Array.isArray(o)&&o.length?i=TK(o):!n.displayModeBar&&n.watermark?i=[]:i=xK(r),a?a.update(r,i):t._modeBar=gK(r,i)};function xK(e){var r=e._fullLayout,t=e._fullData,n=e._context;function a(L,P){if(typeof P=="string"){if(P.toLowerCase()===L.toLowerCase())return!0}else{var O=P.name,U=P._cat||P.name;if(O===L||U===L.toLowerCase())return!0}return!1}var o=r.modebar.add;typeof o=="string"&&(o=[o]);var i=r.modebar.remove;typeof i=="string"&&(i=[i]);var l=n.modeBarButtonsToAdd.concat(o.filter(function(L){for(var P=0;P1?(A=["toggleHover"],h=["resetViews"]):v?(c=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],h=["resetGeo"]):f?(A=["hoverClosest3d"],h=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(c=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],h=["resetViewMapbox"]):M?(c=["zoomInMap","zoomOutMap"],A=["toggleHover"],h=["resetViewMap"]):g?A=["hoverClosestPie"]:S?(A=["hoverClosestCartesian","hoverCompareCartesian"],h=["resetViewSankey"]):A=["toggleHover"],s&&A.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(wK(t)||T)&&(A=[]),s&&!x&&(c=["zoomIn2d","zoomOut2d","autoScale2d"],h[0]!=="resetViews"&&(h=["resetScale2d"])),f?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:s&&!x||y?R=["zoom2d","pan2d"]:w||M||v?R=["pan2d"]:m&&(R=["zoom2d"]),_K(t)&&R.push("select2d","lasso2d");var E=[],D=function(L){E.indexOf(L)===-1&&A.indexOf(L)!==-1&&E.push(L)};if(Array.isArray(l)){for(var N=[],I=0;I{"use strict";xA.exports={moduleType:"component",name:"modebar",layoutAttributes:ty(),supplyLayoutDefaults:cA(),manage:mA()}});var oy=pe((Sve,bA)=>{"use strict";var AK=qn().FROM_BL;bA.exports=function(r,t,n){n===void 0&&(n=AK[r.constraintoward||"center"]);var a=[r.r2l(r.range[0]),r.r2l(r.range[1])],o=a[0]+(a[1]-a[0])*n;r.range=r._input.range=[r.l2r(o+(a[0]-o)*t),r.l2r(o+(a[1]-o)*t)],r.setScale()}});var Vf=pe(Hf=>{"use strict";var Ql=ir(),ly=$s(),ai=on().id2name,kK=Ra(),_A=oy(),SK=Rv(),CK=nn().ALMOST_EQUAL,EK=qn().FROM_BL;Hf.handleDefaults=function(e,r,t){var n=t.axIds,a=t.axHasImage,o=r._axisConstraintGroups=[],i=r._axisMatchGroups=[],l,u,s,f,v,g,_,y;for(l=0;lo?t.substr(o):n.substr(a))+i}function RK(e,r){for(var t=r._size,n=t.h/t.w,a={},o=Object.keys(e),i=0;iCK*y&&!k)){for(o=0;oR&&OA&&(A=O);var X=(A-c)/(2*h);v/=X,c=u.l2r(c),A=u.l2r(A),u.range=u._input.range=d{"use strict";var Lh=it(),Hn=Er(),ma=ln(),Na=ir(),fy=Yn(),cy=sh(),Gf=Zr(),gu=yt(),AA=Sf(),LA=iy(),Yf=St(),so=qn(),RA=Vf(),DK=RA.enforce,PK=RA.clean,kA=$s().doAutoRange,DA="start",FK="middle",PA="end",IK=wn().zindexSeparator;fn.layoutStyles=function(e){return Na.syncOrAsync([ma.doAutoMargin,zK],e)};function NK(e,r,t){for(var n=0;n=e[1]||a[1]<=e[0])&&o[0]r[0])return!0}return!1}function zK(e){var r=e._fullLayout,t=r._size,n=t.p,a=Yf.list(e,"",!0),o,i,l,u,s,f;if(r._paperdiv.style({width:e._context.responsive&&r.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":r.width+"px",height:e._context.responsive&&r.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":r.height+"px"}).selectAll(".main-svg").call(gu.setSize,r.width,r.height),e._context.setBackground(e,r.paper_bgcolor),fn.drawMainTitle(e),LA.manage(e),!r._has("cartesian"))return ma.previousPromises(e);function v(ee,G,re){var H=ee._lw/2;if(ee._id.charAt(0)==="x"){if(G){if(re==="top")return G._offset-n-H}else return t.t+t.h*(1-(ee.position||0))+H%1;return G._offset+G._length+n+H}if(G){if(re==="right")return G._offset+G._length+n+H}else return t.l+t.w*(ee.position||0)+H%1;return G._offset-n-H}for(o=0;o0){UK(e,o,s,u),l.attr({x:i,y:o,"text-anchor":n,dy:EA(r.yanchor)}).call(fy.positionText,i,o);var f=(r.text.match(fy.BR_TAG_ALL)||[]).length;if(f){var v=so.LINE_SPACING*f+so.MID_SHIFT;r.y===0&&(v=-v),l.selectAll(".line").each(function(){var M=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",M)})}var g=Lh.selectAll(".gtitle-subtitle");if(g.node()){var _=l.node().getBBox(),y=_.y+_.height,w=y+AA.SUBTITLE_PADDING_EM*r.subtitle.font.size;g.attr({x:i,y:w,"text-anchor":n,dy:EA(r.yanchor)}).call(fy.positionText,i,w)}}}};function qK(e,r,t,n,a){var o=r.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,i=Na.isTopAnchor(r)?n:n-a,l=t==="b"?o-i:i;return Na.isTopAnchor(r)&&t==="t"||Na.isBottomAnchor(r)&&t==="b"?!1:l.5?"t":"b",i=e._fullLayout.margin[o],l=0;return r.yref==="paper"?l=t+r.pad.t+r.pad.b:r.yref==="container"&&(l=OK(o,n,a,e._fullLayout.height,t)+r.pad.t+r.pad.b),l>i?l:0}function UK(e,r,t,n){var a="title.automargin",o=e._fullLayout.title,i=o.y>.5?"t":"b",l={x:o.x,y:o.y,t:0,b:0},u={};o.yref==="paper"&&qK(e,o,i,r,n)?l[i]=t:o.yref==="container"&&(u[i]=t,e._fullLayout._reservedMargin[a]=u),ma.allowAutoMargin(e,a),ma.autoMargin(e,a,l)}function HK(e,r){var t=e.title,n=e._size,a=0;switch(r===DA?a=t.pad.l:r===PA&&(a=-t.pad.r),t.xref){case"paper":return n.l+n.w*t.x+a;case"container":default:return e.width*t.x+a}}function VK(e,r){var t=e.title,n=e._size,a=0;if(r==="0em"||!r?a=-t.pad.b:r===so.CAP_SHIFT+"em"&&(a=t.pad.t),t.y==="auto")return n.t/2;switch(t.yref){case"paper":return n.t+n.h-n.h*t.y+a;case"container":default:return e.height-e.height*t.y+a}}function EA(e){return e==="top"?so.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":so.MID_SHIFT+"em"}function GK(e){var r=e.title,t=FK;return Na.isRightAnchor(r)?t=PA:Na.isLeftAnchor(r)&&(t=DA),t}function YK(e){var r=e.title,t="0em";return Na.isTopAnchor(r)?t=so.CAP_SHIFT+"em":Na.isMiddleAnchor(r)&&(t=so.MID_SHIFT+"em"),t}fn.doTraceStyle=function(e){var r=e.calcdata,t=[],n;for(n=0;n{"use strict";var WK=Go().readPaths,XK=bh(),FA=Fo().clearOutlineControllers,vy=Zr(),IA=yt(),ZK=gt().arrayEditor,NA=Wo(),JK=NA.getPathString;qA.exports={draw:Dh,drawOne:zA,activateLastSelection:$K};function Dh(e){var r=e._fullLayout;FA(e),r._selectionLayer.selectAll("path").remove();for(var t in r._plots){var n=r._plots[t].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;M--){var m=i.append("path").attr(u).style("opacity",M?.1:s).call(vy.stroke,v).call(vy.fill,f).call(IA.dashLine,M?"solid":_,M?4+g:g);if(KK(m,e,n),y){var k=ZK(e.layout,"selections",n);m.style({cursor:"move"});var S={element:m.node(),plotinfo:a,gd:e,editHelpers:k,isActiveSelection:!0},x=WK(l,e);XK(x,m,S)}else m.style("pointer-events",M?"all":"none");w[M]=m}var T=w[0],d=w[1];d.node().addEventListener("click",function(){return QK(e,T)})}}function KK(e,r,t){var n=t.xref+t.yref;IA.setClipUrl(e,"clip"+r._fullLayout._uid+n,r)}function QK(e,r){if(Ph(e)){var t=r.node(),n=+t.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){hy(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=hy,Dh(e)}}}function $K(e){if(Ph(e)){var r=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=hy,Dh(e)}}function hy(e){if(Ph(e)){var r=e._fullLayout._activeSelectionIndex;r>=0&&(FA(e),delete e._fullLayout._activeSelectionIndex,Dh(e))}}});var BA=pe((Rve,OA)=>{function jK(){var e,r=0,t=!1;function n(a,o){return e.list.push({type:a,data:o?JSON.parse(JSON.stringify(o)):void 0}),e}return e={list:[],segmentId:function(){return r++},checkIntersection:function(a,o){return n("check",{seg1:a,seg2:o})},segmentChop:function(a,o){return n("div_seg",{seg:a,pt:o}),n("chop",{seg:a,pt:o})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,o){return n("new_seg",{seg:a,primary:o})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,o,i){return n("temp_status",{seg:a,above:o,below:i})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,o,i){return n("status",{seg:a,above:o,below:i})},vert:function(a){return a===t?e:(t=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,o){return n("chain_rem_head",{index:a,pt:o})},chainRemoveTail:function(a,o){return n("chain_rem_tail",{index:a,pt:o})},chainNew:function(a,o){return n("chain_new",{pt1:a,pt2:o})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,o){return n("chain_add_head",{index:a,pt:o})},chainAddTail:function(a,o){return n("chain_add_tail",{index:a,pt:o})},chainConnect:function(a,o){return n("chain_con",{index1:a,index2:o})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,o){return n("chain_join",{index1:a,index2:o})},done:function(){return n("done")}},e}OA.exports=jK});var HA=pe((Dve,UA)=>{function eQ(e){typeof e!="number"&&(e=1e-10);var r={epsilon:function(t){return typeof t=="number"&&(e=t),e},pointAboveOrOnLine:function(t,n,a){var o=n[0],i=n[1],l=a[0],u=a[1],s=t[0],f=t[1];return(l-o)*(f-i)-(u-i)*(s-o)>=-e},pointBetween:function(t,n,a){var o=t[1]-n[1],i=a[0]-n[0],l=t[0]-n[0],u=a[1]-n[1],s=l*i+o*u;if(s-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=l-o>e&&(i-f)*(o-v)/(l-v)+f-a>e&&(u=!u),i=f,l=v}return u}};return r}UA.exports=eQ});var GA=pe((Pve,VA)=>{var rQ={create:function(){var e={root:{root:!0,next:null},exists:function(r){return!(r===null||r===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(r,t){for(var n=e.root,a=e.root.next;a!==null;){if(t(a)){r.prev=a.prev,r.next=a,a.prev.next=r,a.prev=r;return}n=a,a=a.next}n.next=r,r.prev=n,r.next=null},findTransition:function(r){for(var t=e.root,n=e.root.next;n!==null&&!r(n);)t=n,n=n.next;return{before:t===e.root?null:t,after:n,insert:function(a){return a.prev=t,a.next=n,t.next=a,n!==null&&(n.prev=a),a}}}};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}};VA.exports=rQ});var WA=pe((Fve,YA)=>{var Wf=GA();function tQ(e,r,t){function n(y,w){return{id:t?t.segmentId():-1,start:y,end:w,myFill:{above:null,below:null},otherFill:null}}function a(y,w,M){return{id:t?t.segmentId():-1,start:y,end:w,myFill:{above:M.myFill.above,below:M.myFill.below},otherFill:null}}var o=Wf.create();function i(y,w,M,m,k,S){var x=r.pointsCompare(w,k);return x!==0?x:r.pointsSame(M,S)?0:y!==m?y?1:-1:r.pointAboveOrOnLine(M,m?k:S,m?S:k)?1:-1}function l(y,w){o.insertBefore(y,function(M){var m=i(y.isStart,y.pt,w,M.isStart,M.pt,M.other.pt);return m<0})}function u(y,w){var M=Wf.node({isStart:!0,pt:y.start,seg:y,primary:w,other:null,status:null});return l(M,y.end),M}function s(y,w,M){var m=Wf.node({isStart:!1,pt:w.end,seg:w,primary:M,other:y,status:null});y.other=m,l(m,y.pt)}function f(y,w){var M=u(y,w);return s(M,y,w),M}function v(y,w){t&&t.segmentChop(y.seg,w),y.other.remove(),y.seg.end=w,y.other.pt=w,l(y.other,y.pt)}function g(y,w){var M=a(w,y.seg.end,y.seg);return v(y,w),f(M,y.primary)}function _(y,w){var M=Wf.create();function m(N,I){var F=N.seg.start,L=N.seg.end,P=I.seg.start,O=I.seg.end;return r.pointsCollinear(F,P,O)?r.pointsCollinear(L,P,O)||r.pointAboveOrOnLine(L,P,O)?1:-1:r.pointAboveOrOnLine(F,P,O)?1:-1}function k(N){return M.findTransition(function(I){var F=m(N,I.ev);return F>0})}function S(N,I){var F=N.seg,L=I.seg,P=F.start,O=F.end,U=L.start,X=L.end;t&&t.checkIntersection(F,L);var j=r.linesIntersect(P,O,U,X);if(j===!1){if(!r.pointsCollinear(P,O,U)||r.pointsSame(P,X)||r.pointsSame(O,U))return!1;var $=r.pointsSame(P,U),Y=r.pointsSame(O,X);if($&&Y)return I;var q=!$&&r.pointBetween(P,U,X),Z=!Y&&r.pointBetween(O,U,X);if($)return Z?g(I,O):g(N,X),I;q&&(Y||(Z?g(I,O):g(N,X)),g(I,P))}else j.alongA===0&&(j.alongB===-1?g(N,U):j.alongB===0?g(N,j.pt):j.alongB===1&&g(N,X)),j.alongB===0&&(j.alongA===-1?g(I,P):j.alongA===0?g(I,j.pt):j.alongA===1&&g(I,O));return!1}for(var x=[];!o.isEmpty();){var T=o.getHead();if(t&&t.vert(T.pt[0]),T.isStart){let N=function(){if(b){var I=S(T,b);if(I)return I}return p?S(T,p):!1};var D=N;t&&t.segmentNew(T.seg,T.primary);var d=k(T),b=d.before?d.before.ev:null,p=d.after?d.after.ev:null;t&&t.tempStatus(T.seg,b?b.seg:!1,p?p.seg:!1);var c=N();if(c){if(e){var A;T.seg.myFill.below===null?A=!0:A=T.seg.myFill.above!==T.seg.myFill.below,A&&(c.seg.myFill.above=!c.seg.myFill.above)}else c.seg.otherFill=T.seg.myFill;t&&t.segmentUpdate(c.seg),T.other.remove(),T.remove()}if(o.getHead()!==T){t&&t.rewind(T.seg);continue}if(e){var A;T.seg.myFill.below===null?A=!0:A=T.seg.myFill.above!==T.seg.myFill.below,p?T.seg.myFill.below=p.seg.myFill.above:T.seg.myFill.below=y,A?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var h;p?T.primary===p.primary?h=p.seg.otherFill.above:h=p.seg.myFill.above:h=T.primary?w:y,T.seg.otherFill={above:h,below:h}}t&&t.status(T.seg,b?b.seg:!1,p?p.seg:!1),T.other.status=d.insert(Wf.node({ev:T}))}else{var R=T.status;if(R===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(M.exists(R.prev)&&M.exists(R.next)&&S(R.prev.ev,R.next.ev),t&&t.statusRemove(R.ev.seg),R.remove(),!T.primary){var E=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=E}x.push(T.seg)}o.getHead().remove()}return t&&t.done(),x}return e?{addRegion:function(y){for(var w,M=y[y.length-1],m=0;m{function nQ(e,r,t){var n=[],a=[];return e.forEach(function(o){var i=o.start,l=o.end;if(r.pointsSame(i,l)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}t&&t.chainStart(o);var u={index:0,matches_head:!1,matches_pt1:!1},s={index:0,matches_head:!1,matches_pt1:!1},f=u;function v(D,N,I){return f.index=D,f.matches_head=N,f.matches_pt1=I,f===u?(f=s,!1):(f=null,!0)}for(var g=0;g{function Xf(e,r,t){var n=[];return e.forEach(function(a){var o=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);r[o]!==0&&n.push({id:t?t.segmentId():-1,start:a.start,end:a.end,myFill:{above:r[o]===1,below:r[o]===2},otherFill:null})}),t&&t.selected(n),n}var aQ={union:function(e,r){return Xf(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return Xf(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return Xf(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return Xf(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return Xf(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};JA.exports=aQ});var $A=pe((zve,QA)=>{var iQ={toPolygon:function(e,r){function t(o){if(o.length<=0)return e.segments({inverted:!1,regions:[]});function i(s){var f=s.slice(0,s.length-1);return e.segments({inverted:!1,regions:[f]})}for(var l=i(o[0]),u=1;u{var oQ=BA(),lQ=HA(),jA=WA(),sQ=ZA(),Zf=KA(),ek=$A(),za=!1,Jf=lQ(),ua;ua={buildLog:function(e){return e===!0?za=oQ():e===!1&&(za=!1),za===!1?!1:za.list},epsilon:function(e){return Jf.epsilon(e)},segments:function(e){var r=jA(!0,Jf,za);return e.regions.forEach(r.addRegion),{segments:r.calculate(e.inverted),inverted:e.inverted}},combine:function(e,r){var t=jA(!1,Jf,za);return{combined:t.calculate(e.segments,e.inverted,r.segments,r.inverted),inverted1:e.inverted,inverted2:r.inverted}},selectUnion:function(e){return{segments:Zf.union(e.combined,za),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:Zf.intersect(e.combined,za),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:Zf.difference(e.combined,za),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:Zf.differenceRev(e.combined,za),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:Zf.xor(e.combined,za),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:sQ(e.segments,Jf,za),inverted:e.inverted}},polygonFromGeoJSON:function(e){return ek.toPolygon(ua,e)},polygonToGeoJSON:function(e){return ek.fromPolygon(ua,Jf,e)},union:function(e,r){return Kf(e,r,ua.selectUnion)},intersect:function(e,r){return Kf(e,r,ua.selectIntersect)},difference:function(e,r){return Kf(e,r,ua.selectDifference)},differenceRev:function(e,r){return Kf(e,r,ua.selectDifferenceRev)},xor:function(e,r){return Kf(e,r,ua.selectXor)}};function Kf(e,r,t){var n=ua.segments(e),a=ua.segments(r),o=ua.combine(n,a),i=t(o);return ua.polygon(i)}typeof window=="object"&&(window.PolyBool=ua);rk.exports=ua});var ak=pe((Ove,nk)=>{nk.exports=function(r,t,n,a){var o=r[0],i=r[1],l=!1;n===void 0&&(n=0),a===void 0&&(a=t.length);for(var u=a-n,s=0,f=u-1;si!=y>i&&o<(_-v)*(i-g)/(y-g)+v;w&&(l=!l)}return l}});var gy=pe((Bve,ik)=>{"use strict";var py=Ic().dot,Fh=nn().BADNUM,Ih=ik.exports={};Ih.tester=function(r){var t=r.slice(),n=t[0][0],a=n,o=t[0][1],i=o,l;for((t[t.length-1][0]!==t[0][0]||t[t.length-1][1]!==t[0][1])&&t.push(t[0]),l=1;la||m===Fh||mi||w&&s(y))}function v(y,w){var M=y[0],m=y[1];if(M===Fh||Ma||m===Fh||mi)return!1;var k=t.length,S=t[0][0],x=t[0][1],T=0,d,b,p,c,A;for(d=1;dMath.max(b,S)||m>Math.max(p,x)))if(ml||Math.abs(py(v,s))>a)return!0;return!1};Ih.filter=function(r,t){var n=[r[0]],a=0,o=0;function i(u){r.push(u);var s=n.length,f=a;n.splice(o+1);for(var v=f+1;v1){var l=r.pop();i(l)}return{addPt:i,raw:r,filtered:n}}});var lk=pe((Uve,ok)=>{"use strict";ok.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Ek=pe((Hve,Ck)=>{"use strict";var sk=tk(),uQ=ak(),jf=Er(),fQ=yt().dashStyle,Qf=Zr(),cQ=io(),vQ=to().makeEventData,a0=uu(),hQ=a0.freeMode,dQ=a0.rectMode,e0=a0.drawMode,by=a0.openMode,_y=a0.selectMode,uk=Wo(),fk=Of(),pk=bh(),gk=Fo().clearOutline,yk=Go(),yy=yk.handleEllipse,pQ=yk.readPaths,gQ=gh().newShapes,yQ=V2(),mQ=dy().activateLastSelection,zh=ir(),xQ=zh.sorterAsc,mk=gy(),$f=Jc(),qa=on().getFromId,bQ=sh(),_Q=Rh().redrawReglTraces,qh=lk(),qi=qh.MINSELECT,wQ=mk.filter,wy=mk.tester,My=vh(),ck=My.p2r,MQ=My.axValue,TQ=My.getTransform;function Ty(e){return e.subplot!==void 0}function AQ(e,r,t,n,a){var o=!Ty(n),i=hQ(a),l=dQ(a),u=by(a),s=e0(a),f=_y(a),v=a==="drawline",g=a==="drawcircle",_=v||g,y=n.gd,w=y._fullLayout,M=f&&w.newselection.mode==="immediate"&&o,m=w._zoomlayer,k=n.element.getBoundingClientRect(),S=n.plotinfo,x=TQ(S),T=r-k.left,d=t-k.top;w._calcInverseTransform(y);var b=zh.apply3DTransform(w._invTransform)(T,d);T=b[0],d=b[1];var p=w._invScaleX,c=w._invScaleY,A=T,h=d,R="M"+T+","+d,E=n.xaxes[0],D=n.yaxes[0],N=E._length,I=D._length,F=e.altKey&&!(e0(a)&&u),L,P,O,U,X,j,$;bk(e,y,n),i&&(L=wQ([[T,d]],qh.BENDPX));var Y=m.selectAll("path.select-outline-"+S.id).data([1]),q=s?w.newshape:w.newselection;s&&(n.hasText=q.label.text||q.label.texttemplate);var Z=s&&!u?q.fillcolor:"rgba(0,0,0,0)",ne=q.line.color||(o?Qf.contrast(y._fullLayout.plot_bgcolor):"#7f7f7f");Y.enter().append("path").attr("class","select-outline select-outline-"+S.id).style({opacity:s?q.opacity/2:1,"stroke-dasharray":fQ(q.line.dash,q.line.width),"stroke-width":q.line.width+"px","shape-rendering":"crispEdges"}).call(Qf.stroke,ne).call(Qf.fill,Z).attr("fill-rule","evenodd").classed("cursor-move",!!s).attr("transform",x).attr("d",R+"Z");var Q=m.append("path").attr("class","zoombox-corners").style({fill:Qf.background,stroke:Qf.defaultLine,"stroke-width":1}).attr("transform",x).attr("d","M0,0Z");if(s&&n.hasText){var oe=m.select(".label-temp");oe.empty()&&(oe=m.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var ee=w._uid+qh.SELECTID,G=[],re=Oh(y,n.xaxes,n.yaxes,n.subplot);M&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(o){var te=E._id,ue=D._id;Ak(y,te,ue,re);for(var de=(y.layout||{}).selections||[],Ee=[],Me=!1,ve=0;ve=0){y._fullLayout._deactivateShape(y);return}if(!s){var de=w.clickmode;$f.done(ee).then(function(){if($f.clear(ee),te===2){for(Y.remove(),X=0;X-1&&xk(ue,y,n.xaxes,n.yaxes,n.subplot,n,Y),de==="event"&&n0(y,void 0);cQ.click(y,ue,S.id)}).catch(zh.error)}},n.doneFn=function(){Q.remove(),$f.done(ee).then(function(){$f.clear(ee),!M&&U&&n.selectionDefs&&(U.subtract=F,n.selectionDefs.push(U),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,O)),(M||s)&&r0(n,M),n.doneFnCompleted&&n.doneFnCompleted(G),f&&n0(y,$)}).catch(zh.error)}}function xk(e,r,t,n,a,o,i){var l=r._hoverdata,u=r._fullLayout,s=u.clickmode,f=s.indexOf("event")>-1,v=[],g,_,y,w,M,m,k,S,x,T;if(LQ(l)){bk(e,r,o),g=Oh(r,t,n,a);var d=RQ(l,g),b=d.pointNumbers.length>0;if(b?DQ(g,d):PQ(g)&&(k=hk(d))){for(i&&i.remove(),T=0;T=0}function EQ(e){return e._fullLayout._activeSelectionIndex>=0}function r0(e,r){var t=e.dragmode,n=e.plotinfo,a=e.gd;CQ(a)&&a._fullLayout._deactivateShape(a),EQ(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout,i=o._zoomlayer,l=e0(t),u=_y(t);if(l||u){var s=i.selectAll(".select-outline-"+n.id);if(s&&a._fullLayout._outlining){var f;l&&(f=gQ(s,e)),f&&jf.call("_guiRelayout",a,{shapes:f});var v;u&&!Ty(e)&&(v=yQ(s,e)),v&&(a._fullLayout._noEmitSelectedAtStart=!0,jf.call("_guiRelayout",a,{selections:v}).then(function(){r&&mQ(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function vk(e){return e._id}function Oh(e,r,t,n){if(!e.calcdata)return[];var a=[],o=r.map(vk),i=t.map(vk),l,u,s;for(s=0;s0,o=a?n[0]:t;return r.selectedpoints?r.selectedpoints.indexOf(o)>-1:!1}function DQ(e,r){var t=[],n,a,o,i;for(i=0;i0&&t.push(n);if(t.length===1&&(o=t[0]===r.searchInfo,o&&(a=r.searchInfo.cd[0].trace,a.selectedpoints.length===r.pointNumbers.length))){for(i=0;i1||(r+=n.selectedpoints.length,r>1)))return!1;return r===1}function t0(e,r,t){var n;for(n=0;n-1&&r;if(!i&&r){var te=dk(e,!0);if(te.length){var ue=te[0].xref,de=te[0].yref;if(ue&&de){var Ee=kk(te),Me=Sk([qa(e,ue,"x"),qa(e,de,"y")]);Me(G,Ee)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:H&&n0(e,G),g._reselect=!1}if(!i&&g._deselect){var ve=g._deselect;l=ve.xref,u=ve.yref,NQ(l,u,f)||Ak(e,l,u,n),H&&(G.points.length?n0(e,G):Sy(e)),g._deselect=!1}return{eventData:G,selectionTesters:t}}function IQ(e){var r=e.calcdata;if(r)for(var t=0;t{"use strict";Lk.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 i0=pe((Gve,Rk)=>{"use strict";Rk.exports={axisRefDescription:function(e,r,t){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",r,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",r,"("+t+"). 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",r,"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",r,"and the",t,"of the domain of the","second",e,"axis."].join(" ")}}});var yu=pe((Wve,Fk)=>{"use strict";var Dk=Cy(),Pk=kn(),Bh=wn(),UQ=gt().templatedArray,Yve=i0();Fk.exports=UQ("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Pk({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:Dk.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Dk.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",Bh.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Bh.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",Bh.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",Bh.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:Pk({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Uh=pe((Xve,Ik)=>{"use strict";Ik.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var zk=pe((Zve,Nk)=>{"use strict";Nk.exports=function(r){return{valType:"color",editType:"style",anim:!0}}});var $l=pe((Jve,Vk)=>{"use strict";var qk=ro().axisHoverFormat,HQ=Sa().texttemplateAttrs,VQ=Sa().hovertemplateAttrs,Ok=ja(),GQ=kn(),YQ=Ao().dash,WQ=Ao().pattern,XQ=yt(),ZQ=Uh(),Hh=Mt().extendFlat,JQ=zk();function Bk(e){return{valType:"any",dflt:0,editType:"calc"}}function Uk(e){return{valType:"any",editType:"calc"}}function Hk(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Vk.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:Bk("x"),yperiod:Bk("y"),xperiod0:Uk("x0"),yperiod0:Uk("y0"),xperiodalignment:Hk("x"),yperiodalignment:Hk("y"),xhoverformat:qk("x"),yhoverformat:qk("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:HQ({},{}),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:VQ({},{keys:ZQ.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:Hh({},YQ,{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:JQ(!0),fillgradient:Hh({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:WQ,marker:Hh({symbol:{valType:"enumerated",values:XQ.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:Hh({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Ok("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"},Ok("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:GQ({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var Ey=pe((Qve,Wk)=>{"use strict";var Gk=yu(),Yk=$l().line,KQ=Ao().dash,Vh=Mt().extendFlat,QQ=zn().overrideAll,$Q=gt().templatedArray,Kve=i0();Wk.exports=QQ($Q("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:Vh({},Gk.xref,{}),yref:Vh({},Gk.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:Yk.color,width:Vh({},Yk.width,{min:1,dflt:1}),dash:Vh({},KQ,{dflt:"dot"})}}),"arraydraw","from-root")});var Kk=pe(($ve,Jk)=>{"use strict";var Xk=ir(),Gh=St(),jQ=ei(),e$=Ey(),Zk=Wo();Jk.exports=function(r,t){jQ(r,t,{name:"selections",handleItemDefaults:r$});for(var n=t.selections,a=0;a{"use strict";Qk.exports=function(r,t,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var o0=pe((ehe,rS)=>{"use strict";var t$=Er(),jk=ir(),eS=on();rS.exports=function(r){return function(n,a){var o=n[r];if(Array.isArray(o))for(var i=t$.subplotsRegistry.cartesian,l=i.idRegex,u=a._subplots,s=u.xaxis,f=u.yaxis,v=u.cartesian,g=a._has("cartesian"),_=0;_{"use strict";var tS=dy(),l0=Ek();nS.exports={moduleType:"component",name:"selections",layoutAttributes:Ey(),supplyLayoutDefaults:Kk(),supplyDrawNewSelectionDefaults:$k(),includeBasePlot:o0()("selections"),draw:tS.draw,drawOne:tS.drawOne,reselect:l0.reselect,prepSelect:l0.prepSelect,clearOutline:l0.clearOutline,clearSelectionsCache:l0.clearSelectionsCache,selectOnClick:l0.selectOnClick}});var TS=pe((the,MS)=>{"use strict";var Fy=it(),Oa=ir(),aS=Oa.numberFormat,n$=ka(),a$=Zv(),Yh=Er(),hS=Oa.strTranslate,i$=Yn(),iS=Zr(),Zo=yt(),o$=io(),oS=St(),l$=Vo(),s$=ti(),dS=uu(),Wh=dS.selectingOrDrawing,u$=dS.freeMode,f$=qn().FROM_TL,c$=sh(),v$=Rh().redrawReglTraces,h$=ln(),Ry=on().getFromId,d$=mu().prepSelect,p$=mu().clearOutline,g$=mu().selectOnClick,Ly=oy(),Iy=wn(),lS=Iy.MINDRAG,Xn=Iy.MINZOOM,sS=!0;function y$(e,r,t,n,a,o,i,l){var u=e._fullLayout._zoomlayer,s=i+l==="nsew",f=(i+l).length===1,v,g,_,y,w,M,m,k,S,x,T,d,b,p,c,A,h,R,E,D,N,I,F;t+=r.yaxis._shift;function L(){if(v=r.xaxis,g=r.yaxis,S=v._length,x=g._length,m=v._offset,k=g._offset,_={},_[v._id]=v,y={},y[g._id]=g,i&&l)for(var me=r.overlays,he=0;he=0){be._fullLayout._deactivateShape(be);return}var Se=be._fullLayout.clickmode;if(Py(be),me===2&&!f&&Ue(),s)Se.indexOf("select")>-1&&g$(he,be,w,M,r.id,U),Se.indexOf("event")>-1&&o$.click(be,he,r.id);else if(me===1&&f){var ze=i?g:v,Fe=i==="s"||l==="w"?0:1,Je=ze._name+".range["+Fe+"]",Ye=m$(ze,Fe),Ge="left",We="middle";if(ze.fixedrange)return;i?(We=i==="n"?"top":"bottom",ze.side==="right"&&(Ge="right")):l==="e"&&(Ge="right"),be._context.showAxisRangeEntryBoxes&&Fy.select(O).call(i$.makeEditable,{gd:be,immediate:!0,background:be._fullLayout.paper_bgcolor,text:String(Ye),fill:ze.tickfont?ze.tickfont.color:"#444",horizontalAlign:Ge,verticalAlign:We}).on("edit",function(we){var Pe=ze.d2r(we);Pe!==void 0&&Yh.call("_guiRelayout",be,Je,Pe)})}}s$.init(U);var $,Y,q,Z,ne,Q,oe,ee,G,re;function H(me,he,be){var Se=O.getBoundingClientRect();$=he-Se.left,Y=be-Se.top,e._fullLayout._calcInverseTransform(e);var ze=Oa.apply3DTransform(e._fullLayout._invTransform)($,Y);$=ze[0],Y=ze[1],q={l:$,r:$,w:0,t:Y,b:Y,h:0},Z=e._hmpixcount?e._hmlumcount/e._hmpixcount:n$(e._fullLayout.plot_bgcolor).getLuminance(),ne="M0,0H"+S+"V"+x+"H0V0",Q=!1,oe="xy",re=!1,ee=yS(u,Z,m,k,ne),G=mS(u,m,k)}function te(me,he){if(e._transitioningWithDuration)return!1;var be=Math.max(0,Math.min(S,I*me+$)),Se=Math.max(0,Math.min(x,F*he+Y)),ze=Math.abs(be-$),Fe=Math.abs(Se-Y);q.l=Math.min($,be),q.r=Math.max($,be),q.t=Math.min(Y,Se),q.b=Math.max(Y,Se);function Je(){oe="",q.r=q.l,q.t=q.b,G.attr("d","M0,0Z")}if(T.isSubplotConstrained)ze>Xn||Fe>Xn?(oe="xy",ze/S>Fe/x?(Fe=ze*x/S,Y>Se?q.t=Y-Fe:q.b=Y+Fe):(ze=Fe*S/x,$>be?q.l=$-ze:q.r=$+ze),G.attr("d",Xh(q))):Je();else if(d.isSubplotConstrained)if(ze>Xn||Fe>Xn){oe="xy";var Ye=Math.min(q.l/S,(x-q.b)/x),Ge=Math.max(q.r/S,(x-q.t)/x);q.l=Ye*S,q.r=Ge*S,q.b=(1-Ye)*x,q.t=(1-Ge)*x,G.attr("d",Xh(q))}else Je();else!p||Fe0){var we;if(d.isSubplotConstrained||!b&&p.length===1){for(we=0;we1&&(Je.maxallowed!==void 0&&A===(Je.range[0]1&&(Ye.maxallowed!==void 0&&h===(Ye.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function b$(e,r,t){return e?e==="nsew"?t?"":r==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function yS(e,r,t,n,a){return e.append("path").attr("class","zoombox").style({fill:r>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",hS(t,n)).attr("d",a+"Z")}function mS(e,r,t){return e.append("path").attr("class","zoombox-corners").style({fill:iS.background,stroke:iS.defaultLine,"stroke-width":1,opacity:0}).attr("transform",hS(r,t)).attr("d","M0,0Z")}function xS(e,r,t,n,a,o){e.attr("d",n+"M"+t.l+","+t.t+"v"+t.h+"h"+t.w+"v-"+t.h+"h-"+t.w+"Z"),bS(e,r,a,o)}function bS(e,r,t,n){t||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),r.transition().style("opacity",1).duration(200))}function Py(e){Fy.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function _S(e){sS&&e.data&&e._context.showTips&&(Oa.notifier(Oa._(e,"Double-click to zoom back out"),"long"),sS=!1)}function _$(e,r){return"M"+(e.l-.5)+","+(r-Xn-.5)+"h-3v"+(2*Xn+1)+"h3ZM"+(e.r+.5)+","+(r-Xn-.5)+"h3v"+(2*Xn+1)+"h-3Z"}function w$(e,r){return"M"+(r-Xn-.5)+","+(e.t-.5)+"v-3h"+(2*Xn+1)+"v3ZM"+(r-Xn-.5)+","+(e.b+.5)+"v3h"+(2*Xn+1)+"v-3Z"}function Xh(e){var r=Math.floor(Math.min(e.b-e.t,e.r-e.l,Xn)/2);return"M"+(e.l-3.5)+","+(e.t-.5+r)+"h3v"+-r+"h"+r+"v-3h-"+(r+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+r)+"h-3v"+-r+"h"+-r+"v-3h"+(r+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-r)+"h-3v"+r+"h"+-r+"v3h"+(r+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-r)+"h3v"+r+"h"+r+"v3h-"+(r+3)+"Z"}function cS(e,r,t,n,a){for(var o=!1,i={},l={},u,s,f,v,g=(a||{}).xaHash,_=(a||{}).yaHash,y=0;y{"use strict";var M$=it(),Zh=io(),T$=ti(),A$=Vo(),ii=TS().makeDragBox,cn=wn().DRAGGERSIZE;Jh.initInteractions=function(r){var t=r._fullLayout;if(r._context.staticPlot){M$.select(r).selectAll(".drag").remove();return}if(!(!t._has("cartesian")&&!t._has("splom"))){var n=Object.keys(t._plots||{}).sort(function(o,i){if((t._plots[o].mainplot&&!0)===(t._plots[i].mainplot&&!0)){var l=o.split("y"),u=i.split("y");return l[0]===u[0]?Number(l[1]||1)-Number(u[1]||1):Number(l[0]||1)-Number(u[0]||1)}return t._plots[o].mainplot?1:-1});n.forEach(function(o){var i=t._plots[o],l=i.xaxis,u=i.yaxis;if(!i.mainplot){var s=ii(r,i,l._offset,u._offset,l._length,u._length,"ns","ew");s.onmousemove=function(g){r._fullLayout._rehover=function(){r._fullLayout._hoversubplot===o&&r._fullLayout._plots[o]&&Zh.hover(r,g,o)},Zh.hover(r,g,o),r._fullLayout._lasthover=s,r._fullLayout._hoversubplot=o},s.onmouseout=function(g){r._dragging||(r._fullLayout._hoversubplot=null,T$.unhover(r,g))},r._context.showAxisDragHandles&&(ii(r,i,l._offset-cn,u._offset-cn,cn,cn,"n","w"),ii(r,i,l._offset+l._length,u._offset-cn,cn,cn,"n","e"),ii(r,i,l._offset-cn,u._offset+u._length,cn,cn,"s","w"),ii(r,i,l._offset+l._length,u._offset+u._length,cn,cn,"s","e"))}if(r._context.showAxisDragHandles){if(o===l._mainSubplot){var f=l._mainLinePosition;l.side==="top"&&(f-=cn),ii(r,i,l._offset+l._length*.1,f,l._length*.8,cn,"","ew"),ii(r,i,l._offset,f,l._length*.1,cn,"","w"),ii(r,i,l._offset+l._length*.9,f,l._length*.1,cn,"","e")}if(o===u._mainSubplot){var v=u._mainLinePosition;u.side!=="right"&&(v-=cn),ii(r,i,v,u._offset+u._length*.1,cn,u._length*.8,"ns",""),ii(r,i,v,u._offset+u._length*.9,cn,u._length*.1,"s",""),ii(r,i,v,u._offset,cn,u._length*.1,"n","")}}});var a=t._hoverlayer.node();a.onmousemove=function(o){o.target=r._fullLayout._lasthover,Zh.hover(r,o,t._hoversubplot)},a.onclick=function(o){o.target=r._fullLayout._lasthover,Zh.click(r,o)},a.onmousedown=function(o){r._fullLayout._lasthover.onmousedown(o)},Jh.updateFx(r)}};Jh.updateFx=function(e){var r=e._fullLayout,t=r.dragmode==="pan"?"move":"crosshair";A$(r._draggers,t)}});var SS=pe((ahe,kS)=>{"use strict";var AS=Er();kS.exports=function(r){for(var t=AS.layoutArrayContainers,n=AS.layoutArrayRegexes,a=r.split("[")[0],o,i,l=0;l{"use strict";var k$=wo(),zy=Fc(),s0=Al(),S$=Dp().sorterAsc,qy=Er();u0.containerArrayMatch=SS();var C$=u0.isAddVal=function(r){return r==="add"||k$(r)},CS=u0.isRemoveVal=function(r){return r===null||r==="remove"};u0.applyContainerArrayChanges=function(r,t,n,a,o){var i=t.astr,l=qy.getComponentMethod(i,"supplyLayoutDefaults"),u=qy.getComponentMethod(i,"draw"),s=qy.getComponentMethod(i,"drawOne"),f=a.replot||a.recalc||l===zy||u===zy,v=r.layout,g=r._fullLayout;if(n[""]){Object.keys(n).length>1&&s0.warn("Full array edits are incompatible with other edits",i);var _=n[""][""];if(CS(_))t.set(null);else if(Array.isArray(_))t.set(_);else return s0.warn("Unrecognized full array edit value",i,_),!0;return f?!1:(l(v,g),u(r),!0)}var y=Object.keys(n).map(Number).sort(S$),w=t.get(),M=w||[],m=o(g,i).get(),k=[],S=-1,x=M.length,T,d,b,p,c,A,h,R;for(T=0;TM.length-(h?0:1)){s0.warn("index out of range",i,b);continue}if(A!==void 0)c.length>1&&s0.warn("Insertion & removal are incompatible with edits to the same index.",i,b),CS(A)?k.push(b):h?(A==="add"&&(A={}),M.splice(b,0,A),m&&m.splice(b,0,{})):s0.warn("Unrecognized full object edit value",i,b,A),S===-1&&(S=b);else for(d=0;d=0;T--)M.splice(k[T],1),m&&m.splice(k[T],1);if(M.length?w||t.set(M):t.set(null),f)return!1;if(l(v,g),s!==zy){var E;if(S===-1)E=y;else{for(x=Math.max(M.length,x),E=[],T=0;T=S));T++)E.push(b);for(T=S;T{"use strict";var PS=rt(),ohe=wp(),FS=Er(),fa=ir(),f0=ln(),IS=on(),NS=Zr(),c0=IS.cleanId,E$=IS.getFromTrace,Oy=FS.traceIs;oi.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&fa.log("Clearing previous rejected promises from queue."),e._promises=[]};oi.cleanLayout=function(e){var r,t;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=(f0.subplotsRegistry.cartesian||{}).attrRegex,a=(f0.subplotsRegistry.polar||{}).attrRegex,o=(f0.subplotsRegistry.ternary||{}).attrRegex,i=(f0.subplotsRegistry.gl3d||{}).attrRegex,l=Object.keys(e);for(r=0;r3?(M.x=1.02,M.xanchor="left"):M.x<-2&&(M.x=-.02,M.xanchor="right"),M.y>3?(M.y=1.02,M.yanchor="bottom"):M.y<-2&&(M.y=-.02,M.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),NS.clean(e),e.template&&e.template.layout&&oi.cleanLayout(e.template.layout),e};function xu(e,r){var t=e[r],n=r.charAt(0);t&&t!=="paper"&&(e[r]=c0(t,n,!0))}oi.cleanData=function(e){for(var r=0;r0)return e.substr(0,r)}oi.hasParent=function(e,r){for(var t=DS(r);t;){if(t in e)return!0;t=DS(t)}return!1};var D$=["x","y","z"];oi.clearAxisTypes=function(e,r,t){for(var n=0;n{"use strict";var jh=it(),P$=rt(),F$=Yp(),fr=ir(),xt=fr.nestedProperty,Hy=mf(),Zn=yw(),Ba=Er(),o1=Vs(),Rr=ln(),Vn=St(),I$=v2(),N$=Ra(),By=yt(),z$=Zr(),q$=Ny().initInteractions,O$=Io(),B$=mu().clearOutline,HS=Tl().dfltConfig,Qh=ES(),Jt=zS(),ht=Rh(),Jo=zn(),U$=wn().AX_NAME_PATTERN,Uy=0,qS=5;function H$(e,r,t,n){var a;if(e=fr.getGraphDiv(e),Hy.init(e),fr.isPlainObject(r)){var o=r;r=o.data,t=o.layout,n=o.config,a=o.frames}var i=Hy.triggerHandler(e,"plotly_beforeplot",[r,t,n]);if(i===!1)return Promise.reject();!r&&!t&&!fr.isPlotDiv(e)&&fr.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function l(){if(a)return tt.addFrames(e,a)}GS(e,n),t||(t={}),jh.select(e).classed("js-plotly-plot",!0),By.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var u=(e.data||[]).length===0&&Array.isArray(r);Array.isArray(r)&&(Jt.cleanData(r),u?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),(!e.layout||u)&&(e.layout=Jt.cleanLayout(t)),Rr.supplyDefaults(e);var s=e._fullLayout,f=s._has("cartesian");s._replotting=!0,(u||s._shouldCreateBgLayer)&&(fj(e),s._shouldCreateBgLayer&&delete s._shouldCreateBgLayer),By.initGradients(e),By.initPatterns(e),u&&Vn.saveShowSpikeInitial(e);var v=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;v&&Rr.doCalcdata(e);for(var g=0;g=e.data.length||a<-e.data.length)throw new Error(t+" must be valid indices for gd.data.");if(r.indexOf(a,n+1)>-1||a>=0&&r.indexOf(-e.data.length+a)>-1||a<0&&r.indexOf(e.data.length+a)>-1)throw new Error("each index in "+t+" must be unique.")}}function YS(e,r,t){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(r)||(r=[r]),r1(e,r,"currentIndices"),typeof t!="undefined"&&!Array.isArray(t)&&(t=[t]),typeof t!="undefined"&&r1(e,t,"newIndices"),typeof t!="undefined"&&r.length!==t.length)throw new Error("current and new indices must be of equal length.")}function X$(e,r,t){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof r=="undefined")throw new Error("traces must be defined.");for(Array.isArray(r)||(r=[r]),n=0;n=0&&f=0&&f0&&typeof p.parts[h]!="string";)h--;var R=p.parts[h],E=p.parts[h-1]+"."+R,D=p.parts.slice(0,h).join("."),N=xt(e.layout,D).get(),I=xt(n,D).get(),F=p.get();if(c!==void 0){m[b]=c,k[b]=R==="reverse"?c:uo(F);var L=o1.getLayoutValObject(n,p.parts);if(L&&L.impliedEdits&&c!==null)for(var P in L.impliedEdits)S(fr.relativeAttr(b,P),L.impliedEdits[P]);if(["width","height"].indexOf(b)!==-1)if(c){S("autosize",null);var O=b==="height"?"width":"height";S(O,n[O])}else n[b]=e._initialAutoSize[b];else if(b==="autosize")S("width",c?null:n.width),S("height",c?null:n.height);else if(E.match(eC))d(E),xt(n,D+"._inputRange").set(null);else if(E.match(rC)){d(E),xt(n,D+"._inputRange").set(null);var U=xt(n,D).get();U._inputDomain&&(U._input.domain=U._inputDomain.slice())}else E.match(tC)&&xt(n,D+"._inputDomain").set(null);if(R==="type"){T=N;var X=I.type==="linear"&&c==="log",j=I.type==="log"&&c==="linear";if(X||j){if(!T||!T.range)S(D+".autorange",!0);else if(I.autorange)X&&(T.range=T.range[1]>T.range[0]?[1,2]:[2,1]);else{var $=T.range[0],Y=T.range[1];X?($<=0&&Y<=0&&S(D+".autorange",!0),$<=0?$=Y/1e6:Y<=0&&(Y=$/1e6),S(D+".range[0]",Math.log($)/Math.LN10),S(D+".range[1]",Math.log(Y)/Math.LN10)):(S(D+".range[0]",Math.pow(10,$)),S(D+".range[1]",Math.pow(10,Y)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[p.parts[0]]&&p.parts[1]==="radialaxis"&&delete n[p.parts[0]]._subplot.viewInitial["radialaxis.range"],Ba.getComponentMethod("annotations","convertCoords")(e,I,c,S),Ba.getComponentMethod("images","convertCoords")(e,I,c,S)}else S(D+".autorange",!0),S(D+".range",null);xt(n,D+"._inputRange").set(null)}else if(R.match(U$)){var q=xt(n,b).get(),Z=(c||{}).type;(!Z||Z==="-")&&(Z="linear"),Ba.getComponentMethod("annotations","convertCoords")(e,q,Z,S),Ba.getComponentMethod("images","convertCoords")(e,q,Z,S)}var ne=Qh.containerArrayMatch(b);if(ne){f=ne.array,v=ne.index;var Q=ne.property,oe=L||{editType:"calc"};v!==""&&Q===""&&(Qh.isAddVal(c)?k[b]=null:Qh.isRemoveVal(c)?k[b]=(xt(t,f).get()||[])[v]:fr.warn("unrecognized full object value",r)),Jo.update(M,oe),s[f]||(s[f]={});var ee=s[f][v];ee||(ee=s[f][v]={}),ee[Q]=c,delete r[b]}else R==="reverse"?(N.range?N.range.reverse():(S(D+".autorange",!0),N.range=[1,0]),I.autorange?M.calc=!0:M.plot=!0):(b==="dragmode"&&(c===!1&&F!==!1||c!==!1&&F===!1)||n._has("scatter-like")&&n._has("regl")&&b==="dragmode"&&(c==="lasso"||c==="select")&&!(F==="lasso"||F==="select")?M.plot=!0:L?Jo.update(M,L):M.calc=!0,p.set(c))}}for(f in s){var G=Qh.applyContainerArrayChanges(e,o(t,f),s[f],M,o);G||(M.plot=!0)}for(var re in x){T=Vn.getFromId(e,re);var H=T&&T._constraintGroup;if(H){M.calc=!0;for(var te in H)x[te]||(Vn.getFromId(e,te)._constraintShrinkable=!0)}}(aC(e)||r.height||r.width)&&(M.plot=!0);var ue=n.shapes;for(v=0;v1;)if(n.pop(),t=xt(r,n.join(".")+".uirevision").get(),t!==void 0)return t;return r.uirevision}function j$(e,r){for(var t=0;t=a.length?a[0]:a[s]:a}function l(s){return Array.isArray(o)?s>=o.length?o[0]:o[s]:o}function u(s,f){var v=0;return function(){if(s&&++v===f)return s()}}return new Promise(function(s,f){function v(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var R=n._frameQueue.pop();R.onInterrupt&&R.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function g(R){if(R.length!==0){for(var E=0;En._timeToNext&&y()};R()}var M=0;function m(R){return Array.isArray(a)?M>=a.length?R.transitionOpts=a[M]:R.transitionOpts=a[0]:R.transitionOpts=a,M++,R}var k,S,x=[],T=r==null,d=Array.isArray(r),b=!T&&!d&&fr.isPlainObject(r);if(b)x.push({type:"object",data:m(fr.extendFlat({},r))});else if(T||["string","number"].indexOf(typeof r)!==-1)for(k=0;k0&&AA)&&h.push(S);x=h}}x.length>0?g(x):(e.emit("plotly_animated"),s())})}function oj(e,r,t){if(e=fr.getGraphDiv(e),r==null)return Promise.resolve();if(!fr.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,a,o,i,l=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(r))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+r);var s=l.length+r.length*2,f=[],v={};for(n=r.length-1;n>=0;n--)if(fr.isPlainObject(r[n])){var g=r[n].name,_=(u[g]||v[g]||{}).name,y=r[n].name,w=u[_]||v[_];_&&y&&typeof y=="number"&&w&&Uyp.index?-1:b.index=0;n--){if(a=f[n].frame,typeof a.name=="number"&&fr.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(o=0;o=0;t--)n=r[t],o.push({type:"delete",index:n}),i.unshift({type:"insert",index:n,value:a[n]});var l=Rr.modifyFrames,u=Rr.modifyFrames,s=[e,i],f=[e,o];return Zn&&Zn.add(e,l,s,u,f),Rr.modifyFrames(e,o)}function sj(e){e=fr.getGraphDiv(e);var r=e._fullLayout||{},t=e._fullData||[];return Rr.cleanPlot([],{},t,r),Rr.purge(e),Hy.purge(e),r._container&&r._container.remove(),delete e._context,e}function uj(e){var r=e._fullLayout,t=e.getBoundingClientRect();if(!fr.equalDomRects(t,r._lastBBox)){var n=r._invTransform=fr.inverseTransformMatrix(fr.getFullTransformMatrix(e));r._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),r._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),r._lastBBox=t}}function fj(e){var r=jh.select(e),t=e._fullLayout;if(t._calcInverseTransform=uj,t._calcInverseTransform(e),t._container=r.selectAll(".plot-container").data([0]),t._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),t._paperdiv=t._container.selectAll(".svg-container").data([0]),t._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),t._glcontainer=t._paperdiv.selectAll(".gl-container").data([{}]),t._glcontainer.enter().append("div").classed("gl-container",!0),t._paperdiv.selectAll(".main-svg").remove(),t._paperdiv.select(".modebar-container").remove(),t._paper=t._paperdiv.insert("svg",":first-child").classed("main-svg",!0),t._toppaper=t._paperdiv.append("svg").classed("main-svg",!0),t._modebardiv=t._paperdiv.append("div"),delete t._modeBar,t._hoverpaper=t._paperdiv.append("svg").classed("main-svg",!0),!t._uid){var n={};jh.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),t._uid=fr.randstr(n)}t._paperdiv.selectAll(".main-svg").attr(O$.svgAttrs),t._defs=t._paper.append("defs").attr("id","defs-"+t._uid),t._clips=t._defs.append("g").classed("clips",!0),t._topdefs=t._toppaper.append("defs").attr("id","topdefs-"+t._uid),t._topclips=t._topdefs.append("g").classed("clips",!0),t._bgLayer=t._paper.append("g").classed("bglayer",!0),t._draggers=t._paper.append("g").classed("draglayer",!0);var a=t._paper.append("g").classed("layer-below",!0);t._imageLowerLayer=a.append("g").classed("imagelayer",!0),t._shapeLowerLayer=a.append("g").classed("shapelayer",!0),t._cartesianlayer=t._paper.append("g").classed("cartesianlayer",!0),t._polarlayer=t._paper.append("g").classed("polarlayer",!0),t._smithlayer=t._paper.append("g").classed("smithlayer",!0),t._ternarylayer=t._paper.append("g").classed("ternarylayer",!0),t._geolayer=t._paper.append("g").classed("geolayer",!0),t._funnelarealayer=t._paper.append("g").classed("funnelarealayer",!0),t._pielayer=t._paper.append("g").classed("pielayer",!0),t._iciclelayer=t._paper.append("g").classed("iciclelayer",!0),t._treemaplayer=t._paper.append("g").classed("treemaplayer",!0),t._sunburstlayer=t._paper.append("g").classed("sunburstlayer",!0),t._indicatorlayer=t._toppaper.append("g").classed("indicatorlayer",!0),t._glimages=t._paper.append("g").classed("glimages",!0);var o=t._toppaper.append("g").classed("layer-above",!0);t._imageUpperLayer=o.append("g").classed("imagelayer",!0),t._shapeUpperLayer=o.append("g").classed("shapelayer",!0),t._selectionLayer=t._toppaper.append("g").classed("selectionlayer",!0),t._infolayer=t._toppaper.append("g").classed("infolayer",!0),t._menulayer=t._toppaper.append("g").classed("menulayer",!0),t._zoomlayer=t._toppaper.append("g").classed("zoomlayer",!0),t._hoverlayer=t._hoverpaper.append("g").classed("hoverlayer",!0),t._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}tt.animate=ij;tt.addFrames=oj;tt.deleteFrames=lj;tt.addTraces=KS;tt.deleteTraces=QS;tt.extendTraces=ZS;tt.moveTraces=Vy;tt.prependTraces=JS;tt.newPlot=W$;tt._doPlot=H$;tt.purge=sj;tt.react=tj;tt.redraw=Y$;tt.relayout=v0;tt.restyle=t1;tt.setPlotConfig=V$;tt.update=a1;tt._guiRelayout=Yy(v0);tt._guiRestyle=Yy(t1);tt._guiUpdate=Yy(a1);tt._storeDirectGUIEdit=K$});var jl=pe(Oi=>{"use strict";var cj=Er();Oi.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Oi.getRedrawFunc=function(e){return function(){cj.getComponentMethod("colorbar","draw")(e)}};Oi.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Oi.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var iC=window.URL||window.webkitURL;Oi.createObjectURL=function(e){return iC.createObjectURL(e)};Oi.revokeObjectURL=function(e){return iC.revokeObjectURL(e)};Oi.createBlob=function(e,r){if(r==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(r==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var t=vj(window.atob(e));return new window.Blob([t],{type:"image/"+r})};Oi.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function vj(e){for(var r=e.length,t=new ArrayBuffer(r),n=new Uint8Array(t),a=0;a{"use strict";var Zy=it(),fhe=ir(),hj=yt(),dj=Zr(),che=Io(),Xy=/"/g,d0="TOBESTRIPPED",pj=new RegExp('("'+d0+")|("+d0+'")',"g");function gj(e){var r=Zy.select("body").append("div").style({display:"none"}).html(""),t=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":r.html(n).text()});return r.remove(),t}function yj(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}oC.exports=function(r,t,n){var a=r._fullLayout,o=a._paper,i=a._toppaper,l=a.width,u=a.height,s;o.insert("rect",":first-child").call(hj.setRect,0,0,l,u).call(dj.fill,a.paper_bgcolor);var f=a._basePlotModules||[];for(s=0;s{"use strict";var mj=ir(),xj=tv().EventEmitter,p0=jl();function bj(e){var r=e.emitter||new xj,t=new Promise(function(n,a){var o=window.Image,i=e.svg,l=e.format||"png",u=e.canvas,s=e.scale||1,f=e.width||300,v=e.height||150,g=s*f,_=s*v,y=u.getContext("2d",{willReadFrequently:!0}),w=new o,M,m;l==="svg"||mj.isSafari()?m=p0.encodeSVG(i):(M=p0.createBlob(i,"svg"),m=p0.createObjectURL(M)),u.width=g,u.height=_,w.onload=function(){var k;switch(M=null,p0.revokeObjectURL(m),l!=="svg"&&y.drawImage(w,0,0,g,_),l){case"jpeg":k=u.toDataURL("image/jpeg");break;case"png":k=u.toDataURL("image/png");break;case"webp":k=u.toDataURL("image/webp");break;case"svg":k=m;break;default:var S="Image format is not jpeg, png, svg or webp.";if(a(new Error(S)),!e.promise)return r.emit("error",S)}n(k),e.promise||r.emit("success",k)},w.onerror=function(k){if(M=null,p0.revokeObjectURL(m),a(k),!e.promise)return r.emit("error",k)},w.src=m});return e.promise?t:r}lC.exports=bj});var Ky=pe((dhe,fC)=>{"use strict";var sC=rt(),uC=Wy(),_j=ln(),Bi=ir(),g0=jl(),wj=s1(),Mj=u1(),Tj=pc().version,Jy={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 Aj(e,r){r=r||{};var t,n,a,o;Bi.isPlainObject(e)?(t=e.data||[],n=e.layout||{},a=e.config||{},o={}):(e=Bi.getGraphDiv(e),t=Bi.extendDeep([],e.data),n=Bi.extendDeep({},e.layout),a=e._context,o=e._fullLayout||{});function i(d){return!(d in r)||Bi.validate(r[d],Jy[d])}if(!i("width")&&r.width!==null||!i("height")&&r.height!==null)throw new Error("Height and width should be pixel values.");if(!i("format"))throw new Error("Export format is not "+Bi.join2(Jy.format.values,", "," or ")+".");var l={};function u(d,b){return Bi.coerce(r,l,Jy,d,b)}var s=u("format"),f=u("width"),v=u("height"),g=u("scale"),_=u("setBackground"),y=u("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var M=Bi.extendFlat({},n);f?M.width=f:r.width===null&&sC(o.width)&&(M.width=o.width),v?M.height=v:r.height===null&&sC(o.height)&&(M.height=o.height);var m=Bi.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:_}),k=g0.getRedrawFunc(w);function S(){return new Promise(function(d){setTimeout(d,g0.getDelay(w._fullLayout))})}function x(){return new Promise(function(d,b){var p=wj(w,s,g),c=w._fullLayout.width,A=w._fullLayout.height;function h(){uC.purge(w),document.body.removeChild(w)}if(s==="full-json"){var R=_j.graphJson(w,!1,"keepdata","object",!0,!0);return R.version=Tj,R=JSON.stringify(R),h(),d(y?R:g0.encodeJSON(R))}if(h(),s==="svg")return d(y?p:g0.encodeSVG(p));var E=document.createElement("canvas");E.id=Bi.randstr(),Mj({format:s,width:c,height:A,scale:g,canvas:E,svg:p,promise:!0}).then(d).catch(b)})}function T(d){return y?d.replace(g0.IMAGE_URL_PREFIX,""):d}return new Promise(function(d,b){uC.newPlot(w,t,M,m).then(k).then(S).then(x).then(function(p){d(T(p))}).catch(function(p){b(p)})})}fC.exports=Aj});var dC=pe((phe,hC)=>{"use strict";var Ua=ir(),kj=ln(),Sj=Vs(),Cj=Tl().dfltConfig,li=Ua.isPlainObject,rs=Array.isArray,cC=Ua.isArrayOrTypedArray;hC.exports=function(r,t){r===void 0&&(r=[]),t===void 0&&(t={});var n=Sj.get(),a=[],o={_context:Ua.extendFlat({},Cj)},i,l;rs(r)?(o.data=Ua.extendDeep([],r),i=r):(o.data=[],i=[],a.push(vn("array","data"))),li(t)?(o.layout=Ua.extendDeep({},t),l=t):(o.layout={},l={},arguments.length>1&&a.push(vn("object","layout"))),kj.supplyDefaults(o);for(var u=o._fullData,s=i.length,f=0;fv.length&&n.push(vn("unused",a,s.concat(v.length)));var m=v.length,k=Array.isArray(M);k&&(m=Math.min(m,M.length));var S,x,T,d,b;if(g.dimensions===2)for(x=0;xv[x].length&&n.push(vn("unused",a,s.concat(x,v[x].length)));var p=v[x].length;for(S=0;S<(k?Math.min(p,M[x].length):p);S++)T=k?M[x][S]:M,d=f[x][S],b=v[x][S],Ua.validate(d,T)?b!==d&&b!==+d&&n.push(vn("dynamic",a,s.concat(x,S),d,b)):n.push(vn("value",a,s.concat(x,S),d))}else n.push(vn("array",a,s.concat(x),f[x]));else for(x=0;x{"use strict";var Ij=ir(),c1=jl();function Nj(e,r,t){var n=document.createElement("a"),a="download"in n,o=new Promise(function(i,l){var u,s;if(a)return u=c1.createBlob(e,t),s=c1.createObjectURL(u),n.href=s,n.download=r,document.body.appendChild(n),n.click(),document.body.removeChild(n),c1.revokeObjectURL(s),u=null,i(r);if(Ij.isSafari()){var f=t==="svg"?",":";base64,";return c1.octetStream(f+encodeURIComponent(e)),i(r)}l(new Error("download error"))});return o}pC.exports=Nj});var Qy=pe((mhe,mC)=>{"use strict";var yC=ir(),zj=Ky(),qj=gC(),yhe=jl();function Oj(e,r){var t;return yC.isPlainObject(e)||(t=yC.getGraphDiv(e)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(n,a){t&&t._snapshotInProgress&&a(new Error("Snapshotting already in progress.")),t&&(t._snapshotInProgress=!0);var o=zj(e,r),i=r.filename||e.fn||"newplot";i+="."+r.format.replace("-","."),o.then(function(l){return t&&(t._snapshotInProgress=!1),qj(l,i,r.format)}).then(function(l){n(l)}).catch(function(l){t&&(t._snapshotInProgress=!1),a(l)})})}mC.exports=Oj});var MC=pe($y=>{"use strict";var ca=ir(),va=ca.isPlainObject,xC=Vs(),bC=ln(),Bj=Sn(),_C=gt(),wC=Tl().dfltConfig;$y.makeTemplate=function(e){e=ca.isPlainObject(e)?e:ca.getGraphDiv(e),e=ca.extendDeep({_context:wC},{data:e.data,layout:e.layout}),bC.supplyDefaults(e);var r=e.data||[],t=e.layout||{};t._basePlotModules=e._fullLayout._basePlotModules,t._modules=e._fullLayout._modules;var n={data:{},layout:{}};r.forEach(function(_){var y={};y0(_,y,Hj.bind(null,_));var w=ca.coerce(_,{},Bj,"type"),M=n.data[w];M||(M=n.data[w]=[]),M.push(y)}),y0(t,n.layout,Uj.bind(null,t)),delete n.layout.template;var a=t.template;if(va(a)){var o=a.layout,i,l,u,s,f,v;va(o)&&v1(o,n.layout);var g=a.data;if(va(g)){for(l in n.data)if(u=g[l],Array.isArray(u)){for(f=n.data[l],v=f.length,s=u.length,i=0;im?i.push({code:"unused",traceType:_,templateCount:M,dataCount:m}):m>M&&i.push({code:"reused",traceType:_,templateCount:M,dataCount:m})}}function k(S,x){for(var T in S)if(T.charAt(0)!=="_"){var d=S[T],b=Ha(S,T,x);va(d)?(Array.isArray(S)&&d._template===!1&&d.templateitemname&&i.push({code:"missing",path:b,templateitemname:d.templateitemname}),k(d,b)):Array.isArray(d)&&Vj(d)&&k(d,b)}}if(k({data:u,layout:l},""),i.length)return i.map(Gj)};function Vj(e){for(var r=0;r{"use strict";var rn=Wy();kt._doPlot=rn._doPlot;kt.newPlot=rn.newPlot;kt.restyle=rn.restyle;kt.relayout=rn.relayout;kt.redraw=rn.redraw;kt.update=rn.update;kt._guiRestyle=rn._guiRestyle;kt._guiRelayout=rn._guiRelayout;kt._guiUpdate=rn._guiUpdate;kt._storeDirectGUIEdit=rn._storeDirectGUIEdit;kt.react=rn.react;kt.extendTraces=rn.extendTraces;kt.prependTraces=rn.prependTraces;kt.addTraces=rn.addTraces;kt.deleteTraces=rn.deleteTraces;kt.moveTraces=rn.moveTraces;kt.purge=rn.purge;kt.addFrames=rn.addFrames;kt.deleteFrames=rn.deleteFrames;kt.animate=rn.animate;kt.setPlotConfig=rn.setPlotConfig;var Yj=ff().getGraphDiv,Wj=Th().eraseActiveShape;kt.deleteActiveShape=function(e){return Wj(Yj(e))};kt.toImage=Ky();kt.validate=dC();kt.downloadImage=Qy();var TC=MC();kt.makeTemplate=TC.makeTemplate;kt.validateTemplate=TC.validateTemplate});var SC=pe((_he,kC)=>{"use strict";var jy=ir(),Xj=Er();kC.exports=function(r,t,n,a){var o=a("x"),i=a("y"),l,u=Xj.getComponentMethod("calendars","handleTraceDefaults");if(u(r,t,["x","y"],n),o){var s=jy.minRowLength(o);i?l=Math.min(s,jy.minRowLength(i)):(l=s,a("y0"),a("dy"))}else{if(!i)return 0;l=jy.minRowLength(i),a("x0"),a("dx")}return t._length=l,l}});var RC=pe((whe,LC)=>{"use strict";var CC=ir().dateTick0,Zj=nn(),Jj=Zj.ONEWEEK;function EC(e,r){return e%Jj===0?CC(r,1):CC(r,0)}LC.exports=function(r,t,n,a,o){if(o||(o={x:!0,y:!0}),o.x){var i=a("xperiod");i&&(a("xperiod0",EC(i,t.xcalendar)),a("xperiodalignment"))}if(o.y){var l=a("yperiod");l&&(a("yperiod0",EC(l,t.ycalendar)),a("yperiodalignment"))}}});var FC=pe((Mhe,PC)=>{"use strict";var DC=["orientation","groupnorm","stackgaps"];PC.exports=function(r,t,n,a){var o=n._scatterStackOpts,i=a("stackgroup");if(i){var l=t.xaxis+t.yaxis,u=o[l];u||(u=o[l]={});var s=u[i],f=!1;s?s.traces.push(t):(s=u[i]={traceIndices:[],traces:[t]},f=!0);for(var v={orientation:t.x&&!t.y?"h":"v"},g=0;g{"use strict";var IC=Zr(),NC=Si().hasColorscale,zC=Ei(),Kj=oa();qC.exports=function(r,t,n,a,o,i){var l=Kj.isBubble(r),u=(r.line||{}).color,s;if(i=i||{},u&&(n=u),o("marker.symbol"),o("marker.opacity",l?.7:1),o("marker.size"),i.noAngle||(o("marker.angle"),i.noAngleRef||o("marker.angleref"),i.noStandOff||o("marker.standoff")),o("marker.color",n),NC(r,"marker")&&zC(r,t,a,o,{prefix:"marker.",cLetter:"c"}),i.noSelect||(o("selected.marker.color"),o("unselected.marker.color"),o("selected.marker.size"),o("unselected.marker.size")),i.noLine||(u&&!Array.isArray(u)&&t.marker.color!==u?s=u:l?s=IC.background:s=IC.defaultLine,o("marker.line.color",s),NC(r,"marker.line")&&zC(r,t,a,o,{prefix:"marker.line.",cLetter:"c"}),o("marker.line.width",l?1:0)),l&&(o("marker.sizeref"),o("marker.sizemin"),o("marker.sizemode")),i.gradient){var f=o("marker.gradient.type");f!=="none"&&o("marker.gradient.color")}}});var rm=pe((Ahe,OC)=>{"use strict";var Qj=ir().isArrayOrTypedArray,$j=Si().hasColorscale,jj=Ei();OC.exports=function(r,t,n,a,o,i){i||(i={});var l=(r.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),o("line.color",n),$j(r,"line"))jj(r,t,a,o,{prefix:"line.",cLetter:"c"});else{var u=(Qj(l)?!1:l)||n;o("line.color",u)}o("line.width"),i.noDash||o("line.dash"),i.backoff&&o("line.backoff")}});var UC=pe((khe,BC)=>{"use strict";BC.exports=function(r,t,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var tm=pe((She,HC)=>{"use strict";var eee=ir();HC.exports=function(e,r,t,n,a){a=a||{},n("textposition"),eee.coerceFont(n,"textfont",a.font||t.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var YC=pe((Che,GC)=>{"use strict";var d1=Zr(),VC=ir().isArrayOrTypedArray;function ree(e){for(var r=d1.interpolate(e[0][1],e[1][1],.5),t=2;t{"use strict";var WC=ir(),tee=Er(),nee=$l(),aee=Uh(),bu=oa(),iee=SC(),oee=RC(),lee=FC(),see=em(),uee=rm(),XC=UC(),fee=tm(),cee=YC(),vee=ir().coercePattern;ZC.exports=function(r,t,n,a){function o(_,y){return WC.coerce(r,t,nee,_,y)}var i=iee(r,t,a,o);if(i||(t.visible=!1),!!t.visible){oee(r,t,a,o),o("xhoverformat"),o("yhoverformat"),o("zorder");var l=lee(r,t,a,o);a.scattermode==="group"&&t.orientation===void 0&&o("orientation","v");var u=!l&&i{"use strict";var hee=Vf().getAxisGroup;KC.exports=function(r,t,n,a,o){var i=t.orientation,l=t[{v:"x",h:"y"}[i]+"axis"],u=hee(n,l)+i,s=n._alignmentOpts||{},f=a("alignmentgroup"),v=s[u];v||(v=s[u]={});var g=v[f];g?g.traces.push(t):g=v[f]={traces:[t],alignmentIndex:Object.keys(v).length,offsetGroups:{}};var _=a("offsetgroup")||"",y=g.offsetGroups,w=y[_];t._offsetIndex=0,(o!=="group"||_)&&(w||(w=y[_]={offsetIndex:Object.keys(y).length}),t._offsetIndex=w.offsetIndex)}});var jC=pe((Rhe,$C)=>{"use strict";var dee=ir(),pee=QC(),gee=$l();$C.exports=function(r,t){var n,a,o,i=t.scattermode;function l(g){return dee.coerce(a._input,a,gee,g)}if(t.scattermode==="group")for(o=0;o=0;f--){var v=r[f];if(v.type==="scatter"&&v.xaxis===u.xaxis&&v.yaxis===u.yaxis){v.opacity=void 0;break}}}}}});var rE=pe((Dhe,eE)=>{"use strict";var yee=ir(),mee=lv();eE.exports=function(e,r){function t(a,o){return yee.coerce(e,r,mee,a,o)}var n=r.barmode==="group";r.scattermode==="group"&&t("scattergap",n?r.bargap:.2)}});var aE=pe((Phe,nE)=>{"use strict";var xee=rt(),tE=ir(),bee=tE.dateTime2ms,p1=tE.incrementMonth,_ee=nn(),wee=_ee.ONEAVGMONTH;nE.exports=function(r,t,n,a){if(t.type!=="date")return{vals:a};var o=r[n+"periodalignment"];if(!o)return{vals:a};var i=r[n+"period"],l;if(xee(i)){if(i=+i,i<=0)return{vals:a}}else if(typeof i=="string"&&i.charAt(0)==="M"){var u=+i.substring(1);if(u>0&&Math.round(u)===u)l=u;else return{vals:a}}for(var s=t.calendar,f=o==="start",v=o==="end",g=r[n+"period0"],_=bee(g,s)||0,y=[],w=[],M=[],m=a.length,k=0;kS;)d=p1(d,-l,s);for(;d<=S;)d=p1(d,l,s);T=p1(d,-l,s)}else{for(x=Math.round((S-_)/i),d=_+x*i;d>S;)d-=i;for(;d<=S;)d+=i;T=d-i}y[k]=f?T:v?d:(T+d)/2,w[k]=T,M[k]=d}return{vals:y,starts:w,ends:M}}});var im=pe((Fhe,oE)=>{"use strict";var nm=Si().hasColorscale,am=zo(),iE=oa();oE.exports=function(r,t){iE.hasLines(t)&&nm(t,"line")&&am(r,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),iE.hasMarkers(t)&&(nm(t,"marker")&&am(r,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),nm(t,"marker.line")&&am(r,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var g1=pe((Ihe,lE)=>{"use strict";var Nt=ir();lE.exports=function(r,t){for(var n=0;n{"use strict";var sE=ir();uE.exports=function(r,t){sE.isArrayOrTypedArray(t.selectedpoints)&&sE.tagSelected(r,t)}});var fm=pe((zhe,yE)=>{"use strict";var cE=rt(),lm=ir(),m0=St(),vE=aE(),om=nn().BADNUM,sm=oa(),Mee=im(),Tee=g1(),Aee=fE();function kee(e,r){var t=e._fullLayout,n=r._xA=m0.getFromId(e,r.xaxis||"x","x"),a=r._yA=m0.getFromId(e,r.yaxis||"y","y"),o=n.makeCalcdata(r,"x"),i=a.makeCalcdata(r,"y"),l=vE(r,n,"x",o),u=vE(r,a,"y",i),s=l.vals,f=u.vals,v=r._length,g=new Array(v),_=r.ids,y=um(r,t,n,a),w=!1,M,m,k,S,x,T;pE(t,r);var d="x",b="y",p;if(y)lm.pushUnique(y.traceIndices,r.index),M=y.orientation==="v",M?(b="s",p="x"):(d="s",p="y"),x=y.stackgaps==="interpolate";else{var c=dE(r,v);hE(e,r,n,a,s,f,c)}var A=!!r.xperiodalignment,h=!!r.yperiodalignment;for(m=0;mm&&g[S].gap;)S--;for(T=g[S].s,k=g.length-1;k>S;k--)g[k].s=T;for(;m{"use strict";mE.exports=y1;var See=ir().distinctVals;function y1(e,r){this.traces=e,this.sepNegVal=r.sepNegVal,this.overlapNoMerge=r.overlapNoMerge;for(var t=1/0,n=r.posAxis._id.charAt(0),a=[],o=0;o{"use strict";var Va=rt(),Ko=ir().isArrayOrTypedArray,_u=nn().BADNUM,Cee=Er(),x0=St(),Eee=Vf().getAxisGroup,m1=xE();function Lee(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,o=e._fullData,i=e.calcdata,l=[],u=[],s=0;su+i||!Va(l))}for(var f=0;f{"use strict";var AE=fm(),kE=TE().setGroupPositions;function Hee(e,r){for(var t=r.xaxis,n=r.yaxis,a=e._fullLayout,o=e._fullData,i=e.calcdata,l=[],u=[],s=0;sc[f]&&f{"use strict";var Gee=yt(),DE=nn(),b0=DE.BADNUM,PE=DE.LOG_CLIP,EE=PE+.5,LE=PE-.5,x1=ir(),Yee=x1.segmentsIntersect,RE=x1.constrain,gm=Uh();FE.exports=function(r,t){var n=t.trace||{},a=t.xaxis,o=t.yaxis,i=a.type==="log",l=o.type==="log",u=a._length,s=o._length,f=t.backoff,v=n.marker,g=t.connectGaps,_=t.baseTolerance,y=t.shape,w=y==="linear",M=n.fill&&n.fill!=="none",m=[],k=gm.minTolerance,S=r.length,x=new Array(S),T=0,d,b,p,c,A,h,R,E,D,N,I,F,L,P,O,U;function X(We){var we=r[We];if(!we)return!1;var Pe=t.linearized?a.l2p(we.x):a.c2p(we.x),Qe=t.linearized?o.l2p(we.y):o.c2p(we.y);if(Pe===b0){if(i&&(Pe=a.c2p(we.x,!0)),Pe===b0)return!1;l&&Qe===b0&&(Pe*=Math.abs(a._m*s*(a._m>0?EE:LE)/(o._m*u*(o._m>0?EE:LE)))),Pe*=1e3}if(Qe===b0){if(l&&(Qe=o.c2p(we.y,!0)),Qe===b0)return!1;Qe*=1e3}return[Pe,Qe]}function j(We,we,Pe,Qe){var Ve=Pe-We,ar=Qe-we,se=.5-We,K=.5-we,ae=Ve*Ve+ar*ar,Re=Ve*se+ar*K;if(Re>0&&Re1||Math.abs(se.y-Pe[0][1])>1)&&(se=[se.x,se.y],Qe&&Z(se,We)oe||We[1]G)return[RE(We[0],Q,oe),RE(We[1],ee,G)]}function ke(We,we){if(We[0]===we[0]&&(We[0]===Q||We[0]===oe)||We[1]===we[1]&&(We[1]===ee||We[1]===G))return!0}function De(We,we){var Pe=[],Qe=Ae(We),Ve=Ae(we);return Qe&&Ve&&ke(Qe,Ve)||(Qe&&Pe.push(Qe),Ve&&Pe.push(Ve)),Pe}function Ce(We,we,Pe){return function(Qe,Ve){var ar=Ae(Qe),se=Ae(Ve),K=[];if(ar&&se&&ke(ar,se))return K;ar&&K.push(ar),se&&K.push(se);var ae=2*x1.constrain((Qe[We]+Ve[We])/2,we,Pe)-((ar||Qe)[We]+(se||Ve)[We]);if(ae){var Re;ar&&se?Re=ae>0==ar[We]>se[We]?ar:se:Re=ar||se,Re[We]+=ae}return K}}var Oe;y==="linear"||y==="spline"?Oe=ve:y==="hv"||y==="vh"?Oe=De:y==="hvh"?Oe=Ce(0,Q,oe):y==="vhv"&&(Oe=Ce(1,ee,G));function Ue(We,we){var Pe=we[0]-We[0],Qe=(we[1]-We[1])/Pe,Ve=(We[1]*we[0]-we[1]*We[0])/Pe;return Ve>0?[Qe>0?Q:oe,G]:[Qe>0?oe:Q,ee]}function ge(We){var we=We[0],Pe=We[1],Qe=we===x[T-1][0],Ve=Pe===x[T-1][1];if(!(Qe&&Ve))if(T>1){var ar=we===x[T-2][0],se=Pe===x[T-2][1];Qe&&(we===Q||we===oe)&&ar?se?T--:x[T-1]=We:Ve&&(Pe===ee||Pe===G)&&se?ar?T--:x[T-1]=We:x[T++]=We}else x[T++]=We}function Te(We){x[T-1][0]!==We[0]&&x[T-1][1]!==We[1]&&ge([ue,de]),ge(We),Ee=null,ue=de=0}var ce=x1.isArrayOrTypedArray(v);function ye(We){if(We&&f&&(We.i=d,We.d=r,We.trace=n,We.marker=ce?v[We.i]:v,We.backoff=f),$=We[0]/u,Y=We[1]/s,H=We[0]oe?oe:0,te=We[1]G?G:0,H||te){if(!T)x[T++]=[H||We[0],te||We[1]];else if(Ee){var we=Oe(Ee,We);we.length>1&&(Te(we[0]),x[T++]=we[1])}else Me=Oe(x[T-1],We)[0],x[T++]=Me;var Pe=x[T-1];H&&te&&(Pe[0]!==H||Pe[1]!==te)?(Ee&&(ue!==H&&de!==te?ge(ue&&de?Ue(Ee,We):[ue||H,de||te]):ue&&de&&ge([ue,de])),ge([H,te])):ue-H&&de-te&&ge([H||ue,te||de]),Ee=We,ue=H,de=te}else Ee&&Te(Oe(Ee,We)[0]),x[T++]=We}for(d=0;dq(h,Le))break;p=h,L=D[0]*E[0]+D[1]*E[1],L>I?(I=L,c=h,R=!1):L=r.length||!h)break;ye(h),b=h}}Ee&&ge([ue||Ee[0],de||Ee[1]]),m.push(x.slice(0,T))}var me=y.slice(y.length-1);if(f&&me!=="h"&&me!=="v"){for(var he=!1,be=-1,Se=[],ze=0;ze{"use strict";var NE={tonextx:1,tonexty:1,tonext:1};zE.exports=function(r,t,n){var a,o,i,l,u,s={},f=!1,v=-1,g=0,_=-1;for(o=0;o=0?u=_:(u=_=g,g++),u{"use strict";var si=it(),Wee=Er(),_0=ir(),Mu=_0.ensureSingle,BE=_0.identity,zt=yt(),Tu=oa(),Xee=IE(),Zee=qE(),b1=gy().tester;UE.exports=function(r,t,n,a,o,i){var l,u,s=!o,f=!!o&&o.duration>0,v=Zee(r,t,n);if(l=a.selectAll("g.trace").data(v,function(_){return _[0].trace.uid}),l.enter().append("g").attr("class",function(_){return"trace scatter trace"+_[0].trace.uid}).style("stroke-miterlimit",2),l.order(),Jee(r,l,t),f){i&&(u=i());var g=si.transition().duration(o.duration).ease(o.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});g.each(function(){a.selectAll("g.trace").each(function(_,y){OE(r,y,t,_,v,this,o)})})}else l.each(function(_,y){OE(r,y,t,_,v,this,o)});s&&l.exit().remove(),a.selectAll("path:not([d])").remove()};function Jee(e,r,t){r.each(function(n){var a=Mu(si.select(this),"g","fills");zt.setClipUrl(a,t.layerClipId,e);var o=n[0].trace,i=[];o._ownfill&&i.push("_ownFill"),o._nexttrace&&i.push("_nextFill");var l=a.selectAll("g").data(i,BE);l.enter().append("g"),l.exit().each(function(u){o[u]=null}).remove(),l.order().each(function(u){o[u]=Mu(si.select(this),"path","js-fill")})})}function OE(e,r,t,n,a,o,i){var l=e._context.staticPlot,u;Kee(e,r,t,n,a);var s=!!i&&i.duration>0;function f(Ce){return s?Ce.transition():Ce}var v=t.xaxis,g=t.yaxis,_=n[0].trace,y=_.line,w=si.select(o),M=Mu(w,"g","errorbars"),m=Mu(w,"g","lines"),k=Mu(w,"g","points"),S=Mu(w,"g","text");if(Wee.getComponentMethod("errorbars","plot")(e,M,t,i),_.visible!==!0)return;f(w).style("opacity",_.opacity);var x,T,d=_.fill.charAt(_.fill.length-1);d!=="x"&&d!=="y"&&(d="");var b,p;d==="y"?(b=1,p=g.c2p(0,!0)):d==="x"&&(b=0,p=v.c2p(0,!0)),n[0][t.isRangePlot?"nodeRangePlot3":"node3"]=w;var c="",A=[],h=_._prevtrace,R=null,E=null;h&&(c=h._prevRevpath||"",T=h._nextFill,A=h._ownPolygons,R=h._fillsegments,E=h._fillElement);var D,N,I="",F="",L,P,O,U,X,j,$=[];_._polygons=[];var Y=[],q=[],Z=_0.noop;if(x=_._ownFill,Tu.hasLines(_)||_.fill!=="none"){T&&T.datum(n),["hv","vh","hvh","vhv"].indexOf(y.shape)!==-1?(L=zt.steps(y.shape),P=zt.steps(y.shape.split("").reverse().join(""))):y.shape==="spline"?L=P=function(Ce){var Oe=Ce[Ce.length-1];return Ce.length>1&&Ce[0][0]===Oe[0]&&Ce[0][1]===Oe[1]?zt.smoothclosed(Ce.slice(1),y.smoothing):zt.smoothopen(Ce,y.smoothing)}:L=P=function(Ce){return"M"+Ce.join("L")},O=function(Ce){return P(Ce.reverse())},q=Xee(n,{xaxis:v,yaxis:g,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(y.width||1,3)/4,shape:y.shape,backoff:y.backoff,simplify:y.simplify,fill:_.fill}),Y=new Array(q.length);var ne=0;for(u=0;u=l[0]&&w.x<=l[1]&&w.y>=u[0]&&w.y<=u[1]}),g=Math.ceil(v.length/f),_=0;a.forEach(function(w,M){var m=w[0].trace;Tu.hasMarkers(m)&&m.marker.maxdisplayed>0&&M{"use strict";VE.exports={container:"marker",min:"cmin",max:"cmax"}});var WE=pe((Yhe,YE)=>{"use strict";var _1=St();YE.exports=function(r,t,n){var a={},o={_fullLayout:n},i=_1.getFromTrace(o,t,"x"),l=_1.getFromTrace(o,t,"y"),u=r.orig_x;u===void 0&&(u=r.x);var s=r.orig_y;return s===void 0&&(s=r.y),a.xLabel=_1.tickText(i,i.c2l(u),!0).text,a.yLabel=_1.tickText(l,l.c2l(s),!0).text,a}});var bm=pe((Whe,XE)=>{"use strict";var ym=it(),Au=yt(),Qee=Er();function $ee(e){var r=ym.select(e).selectAll("g.trace.scatter");r.style("opacity",function(t){return t[0].trace.opacity}),r.selectAll("g.points").each(function(t){var n=ym.select(this),a=t.trace||t[0].trace;mm(n,a,e)}),r.selectAll("g.text").each(function(t){var n=ym.select(this),a=t.trace||t[0].trace;xm(n,a,e)}),r.selectAll("g.trace path.js-line").call(Au.lineGroupStyle),r.selectAll("g.trace path.js-fill").call(Au.fillGroupStyle,e,!1),Qee.getComponentMethod("errorbars","style")(r)}function mm(e,r,t){Au.pointStyle(e.selectAll("path.point"),r,t)}function xm(e,r,t){Au.textPointStyle(e.selectAll("text"),r,t)}function jee(e,r,t){var n=r[0].trace;n.selectedpoints?(Au.selectedPointStyle(t.selectAll("path.point"),n),Au.selectedTextStyle(t.selectAll("text"),n)):(mm(t,n,e),xm(t,n,e))}XE.exports={style:$ee,stylePoints:mm,styleText:xm,styleOnSelect:jee}});var JE=pe((Xhe,ZE)=>{"use strict";var ku=Zr(),ere=oa();ZE.exports=function(r,t){var n,a;if(r.mode==="lines")return n=r.line.color,n&&ku.opacity(n)?n:r.fillcolor;if(r.mode==="none")return r.fill?r.fillcolor:"";var o=t.mcc||(r.marker||{}).color,i=t.mlcc||((r.marker||{}).line||{}).color;return a=o&&ku.opacity(o)?o:i&&ku.opacity(i)&&(t.mlw||((r.marker||{}).line||{}).width)?i:"",a?ku.opacity(a)<.3?ku.addOpacity(a,.3):a:(n=(r.line||{}).color,n&&ku.opacity(n)&&ere.hasLines(r)&&r.line.width?n:r.fillcolor)}});var $E=pe((Zhe,QE)=>{"use strict";var w1=ir(),KE=io(),rre=Er(),tre=JE(),_m=Zr(),nre=w1.fillText;QE.exports=function(r,t,n,a){var o=r.cd,i=o[0].trace,l=r.xa,u=r.ya,s=l.c2p(t),f=u.c2p(n),v=[s,f],g=i.hoveron||"",_=i.mode.indexOf("markers")!==-1?3:.5,y=!!i.xperiodalignment,w=!!i.yperiodalignment;if(g.indexOf("points")!==-1){var M=function(F){if(y){var L=l.c2p(F.xStart),P=l.c2p(F.xEnd);return s>=Math.min(L,P)&&s<=Math.max(L,P)?0:1/0}var O=Math.max(3,F.mrc||0),U=1-1/O,X=Math.abs(l.c2p(F.x)-s);return X=Math.min(L,P)&&f<=Math.max(L,P)?0:1/0}var O=Math.max(3,F.mrc||0),U=1-1/O,X=Math.abs(u.c2p(F.y)-f);return X$!=G>=$&&(Q=Z[q-1][0],oe=Z[q][0],G-ee&&(ne=Q+(oe-Q)*($-ee)/(G-ee),O=Math.min(O,ne),U=Math.max(U,ne)));return O=Math.max(O,0),U=Math.min(U,l._length),{x0:O,x1:U,y0:$,y1:$}}if(g.indexOf("fills")!==-1&&i._fillElement){var D=R(i._fillElement)&&!R(i._fillExclusionElement);if(D){var N=E(i._polygons);N===null&&(N={x0:v[0],x1:v[0],y0:v[1],y1:v[1]});var I=_m.defaultLine;return _m.opacity(i.fillcolor)?I=i.fillcolor:_m.opacity((i.line||{}).color)&&(I=i.line.color),w1.extendFlat(r,{distance:r.maxHoverDistance,x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1,color:I,hovertemplate:!1}),delete r.index,i.text&&!w1.isArrayOrTypedArray(i.text)?r.text=String(i.text):r.text=i.name,[r]}}}});var rL=pe((Jhe,eL)=>{"use strict";var jE=oa();eL.exports=function(r,t){var n=r.cd,a=r.xaxis,o=r.yaxis,i=[],l=n[0].trace,u,s,f,v,g=!jE.hasMarkers(l)&&!jE.hasText(l);if(g)return[];if(t===!1)for(u=0;u{"use strict";tL.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var Mm=pe((Qhe,oL)=>{"use strict";var w0=Er().traceIs,wm=Wg();oL.exports=function(r,t,n,a){n("autotypenumbers",a.autotypenumbersDflt);var o=n("type",(a.splomStash||{}).type);o==="-"&&(are(t,a.data),t.type==="-"?t.type="linear":r.type=t.type)};function are(e,r){if(e.type==="-"){var t=e._id,n=t.charAt(0),a;t.indexOf("scene")!==-1&&(t=n);var o=ire(r,t,n);if(o){if(o.type==="histogram"&&n==={v:"y",h:"x"}[o.orientation||"v"]){e.type="linear";return}var i=n+"calendar",l=o[i],u={noMultiCategory:!w0(o,"cartesian")||w0(o,"noMultiCategory")};if(o.type==="box"&&o._hasPreCompStats&&n==={h:"x",v:"y"}[o.orientation||"v"]&&(u.noMultiCategory=!0),u.autotypenumbers=e.autotypenumbers,iL(o,n)){var s=aL(o),f=[];for(a=0;a0&&(a["_"+t+"axes"]||{})[r])return a;if((a[t+"axis"]||t)===r){if(iL(a,t))return a;if((a[t]||[]).length||a[t+"0"])return a}}}function aL(e){return{v:"x",h:"y"}[e.orientation||"v"]}function iL(e,r){var t=aL(e),n=w0(e,"box-violin"),a=w0(e._fullInput||{},"candlestick");return n&&!a&&r===t&&e[t]===void 0&&e[t+"0"]===void 0}});var sL=pe(($he,lL)=>{"use strict";var ore=ea().isTypedArraySpec;function lre(e,r){var t=r.dataAttr||e._id.charAt(0),n={},a,o,i;if(r.axData)a=r.axData;else for(a=[],o=0;o0||ore(o),l;i&&(l="array");var u=n("categoryorder",l),s;u==="array"&&(s=n("categoryarray")),!i&&u==="array"&&(u=t.categoryorder="trace"),u==="trace"?t._initialCategories=[]:u==="array"?t._initialCategories=s.slice():(s=lre(t,a).sort(),u==="category ascending"?t._initialCategories=s:u==="category descending"&&(t._initialCategories=s.reverse()))}}});var cL=pe((jhe,fL)=>{"use strict";var uL=ka().mix,sre=Ti(),ure=ir();fL.exports=function(r,t,n,a){a=a||{};var o=a.dfltColor;function i(b,p){return ure.coerce2(r,t,a.attributes,b,p)}var l=i("linecolor",o),u=i("linewidth"),s=n("showline",a.showLine||!!l||!!u);s||(delete t.linecolor,delete t.linewidth);var f=uL(o,a.bgColor,a.blend||sre.lightFraction).toRgbString(),v=i("gridcolor",f),g=i("gridwidth"),_=i("griddash"),y=n("showgrid",a.showGrid||!!v||!!g||!!_);if(y||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),a.hasMinor){var w=uL(t.gridcolor,a.bgColor,67).toRgbString(),M=i("minor.gridcolor",w),m=i("minor.gridwidth",t.gridwidth||1),k=i("minor.griddash",t.griddash||"solid"),S=n("minor.showgrid",!!M||!!m||!!k);S||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!a.noZeroLine){var x=i("zerolinecolor",o),T=i("zerolinewidth"),d=n("zeroline",a.showGrid||!!x||!!T);d||(delete t.zerolinecolor,delete t.zerolinewidth)}}});var T1=pe((e1e,yL)=>{"use strict";var vL=rt(),fre=Er(),M0=ir(),cre=gt(),vre=ei(),Tm=Ra(),hL=pg(),dL=yg(),hre=bg(),dre=_g(),pre=sL(),gre=cL(),yre=v2(),pL=Rv(),M1=wn().WEEKDAY_PATTERN,mre=wn().HOUR_PATTERN;yL.exports=function(r,t,n,a,o){var i=a.letter,l=a.font||{},u=a.splomStash||{},s=n("visible",!a.visibleDflt),f=t._template||{},v=t.type||f.type||"-",g;if(v==="date"){var _=fre.getComponentMethod("calendars","handleDefaults");_(r,t,"calendar",a.calendar),a.noTicklabelmode||(g=n("ticklabelmode"))}!a.noTicklabelindex&&(v==="date"||v==="linear")&&n("ticklabelindex");var y="";(!a.noTicklabelposition||v==="multicategory")&&(y=M0.coerce(r,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g==="period"?["outside","inside"]:i==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",y.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),pL(t,o),yre(r,t,n,a),pre(r,t,n,a),v!=="category"&&!a.noHover&&n("hoverformat");var w=n("color"),M=w!==Tm.color.dflt?w:l.color,m=u.label||o._dfltTitle[i];if(dre(r,t,n,v,a),!s)return t;n("title.text",m),M0.coerceFont(n,"title.font",l,{overrideDflt:{size:M0.bigFont(l.size),color:M}}),hL(r,t,n,v);var k=a.hasMinor;if(k&&(cre.newContainer(t,"minor"),hL(r,t,n,v,{isMinor:!0})),hre(r,t,n,v,a),dL(r,t,n,a),k){var S=a.isMinor;a.isMinor=!0,dL(r,t,n,a),a.isMinor=S}gre(r,t,n,{dfltColor:w,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:k,attributes:Tm}),k&&!t.minor.ticks&&!t.minor.showgrid&&delete t.minor,(t.showline||t.ticks)&&n("mirror");var x=v==="multicategory";if(!a.noTickson&&(v==="category"||x)&&(t.ticks||t.showgrid)){var T;x&&(T="boundaries");var d=n("tickson",T);d==="boundaries"&&delete t.ticklabelposition}if(x){var b=n("showdividers");b&&(n("dividercolor"),n("dividerwidth"))}if(v==="date")if(vre(r,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:xre}),!t.rangebreaks.length)delete t.rangebreaks;else{for(var p=0;p=2){var i="",l,u;if(o.length===2){for(l=0;l<2;l++)if(u=gL(o[l]),u){i=M1;break}}var s=n("pattern",i);if(s===M1)for(l=0;l<2;l++)u=gL(o[l]),u&&(r.bounds[l]=o[l]=u-1);if(s)for(l=0;l<2;l++)switch(u=o[l],s){case M1:if(!vL(u)){r.enabled=!1;return}if(u=+u,u!==Math.floor(u)||u<0||u>=7){r.enabled=!1;return}r.bounds[l]=o[l]=u;break;case mre:if(!vL(u)){r.enabled=!1;return}if(u=+u,u<0||u>24){r.enabled=!1;return}r.bounds[l]=o[l]=u;break}if(t.autorange===!1){var f=t.range;if(f[0]f[1]){r.enabled=!1;return}}else if(o[0]>f[0]&&o[1]{"use strict";var _re=rt(),A1=ir();mL.exports=function(r,t,n,a){var o=a.counterAxes||[],i=a.overlayableAxes||[],l=a.letter,u=a.grid,s=a.overlayingDomain,f,v,g,_,y,w;u&&(v=u._domains[l][u._axisMap[t._id]],f=u._anchors[t._id],v&&(g=u[l+"side"].split(" ")[0],_=u.domain[l][g==="right"||g==="top"?1:0])),v=v||[0,1],f=f||(_re(r.position)?"free":o[0]||"free"),g=g||(l==="x"?"bottom":"left"),_=_||0,y=0,w=!1;var M=A1.coerce(r,t,{anchor:{valType:"enumerated",values:["free"].concat(o),dflt:f}},"anchor"),m=A1.coerce(r,t,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:g}},"side");if(M==="free"){if(l==="y"){var k=n("autoshift");k&&(_=m==="left"?s[0]:s[1],w=t.automargin?t.automargin:!0,y=m==="left"?-3:3),n("shift",y)}n("position",_)}n("automargin",w);var S=!1;if(i.length&&(S=A1.coerce(r,t,{overlaying:{valType:"enumerated",values:[!1].concat(i),dflt:!1}},"overlaying")),!S){var x=n("domain",v);x[0]>x[1]-1/4096&&(t.domain=v),A1.noneOrAll(r.domain,t.domain,v),t.tickmode==="sync"&&(t.tickmode="auto")}return n("layer"),t}});var SL=pe((t1e,kL)=>{"use strict";var ts=ir(),xL=Zr(),wre=to().isUnifiedHover,Mre=O2(),bL=gt(),Tre=Ds(),_L=Ra(),Are=Mm(),wL=T1(),kre=Vf(),ML=Am(),Sm=on(),Ui=Sm.id2name,TL=Sm.name2id,Sre=wn().AX_ID_PATTERN,AL=Er(),k1=AL.traceIs,km=AL.getComponentMethod;function S1(e,r,t){Array.isArray(e[r])?e[r].push(t):e[r]=[t]}kL.exports=function(r,t,n){var a=t.autotypenumbers,o={},i={},l={},u={},s={},f={},v={},g={},_={},y={},w,M;for(w=0;w{"use strict";var Cre=it(),CL=Er(),C1=ir(),xa=yt(),E1=St();EL.exports=function(r,t,n,a){var o=r._fullLayout;if(t.length===0){E1.redrawComponents(r);return}function i(M){var m=M.xaxis,k=M.yaxis;o._defs.select("#"+M.clipId+"> rect").call(xa.setTranslate,0,0).call(xa.setScale,1,1),M.plot.call(xa.setTranslate,m._offset,k._offset).call(xa.setScale,1,1);var S=M.plot.selectAll(".scatterlayer .trace");S.selectAll(".point").call(xa.setPointGroupScale,1,1),S.selectAll(".textpoint").call(xa.setTextPointsScale,1,1),S.call(xa.hideOutsideRangePoints,M)}function l(M,m){var k=M.plotinfo,S=k.xaxis,x=k.yaxis,T=S._length,d=x._length,b=!!M.xr1,p=!!M.yr1,c=[];if(b){var A=C1.simpleMap(M.xr0,S.r2l),h=C1.simpleMap(M.xr1,S.r2l),R=A[1]-A[0],E=h[1]-h[0];c[0]=(A[0]*(1-m)+m*h[0]-A[0])/(A[1]-A[0])*T,c[2]=T*(1-m+m*E/R),S.range[0]=S.l2r(A[0]*(1-m)+m*h[0]),S.range[1]=S.l2r(A[1]*(1-m)+m*h[1])}else c[0]=0,c[2]=T;if(p){var D=C1.simpleMap(M.yr0,x.r2l),N=C1.simpleMap(M.yr1,x.r2l),I=D[1]-D[0],F=N[1]-N[0];c[1]=(D[1]*(1-m)+m*N[1]-D[1])/(D[0]-D[1])*d,c[3]=d*(1-m+m*F/I),x.range[0]=S.l2r(D[0]*(1-m)+m*N[0]),x.range[1]=x.l2r(D[1]*(1-m)+m*N[1])}else c[1]=0,c[3]=d;E1.drawOne(r,S,{skipTitle:!0}),E1.drawOne(r,x,{skipTitle:!0}),E1.redrawComponents(r,[S._id,x._id]);var L=b?T/c[2]:1,P=p?d/c[3]:1,O=b?c[0]:0,U=p?c[1]:0,X=b?c[0]/c[2]*T:0,j=p?c[1]/c[3]*d:0,$=S._offset-X,Y=x._offset-j;k.clipRect.call(xa.setTranslate,O,U).call(xa.setScale,1/L,1/P),k.plot.call(xa.setTranslate,$,Y).call(xa.setScale,L,P),xa.setPointGroupScale(k.zoomScalePts,1/L,1/P),xa.setTextPointsScale(k.zoomScaleTxt,1/L,1/P)}var u;a&&(u=a());function s(){for(var M={},m=0;mn.duration?(s(),_=window.cancelAnimationFrame(w)):_=window.requestAnimationFrame(w)}return v=Date.now(),_=window.requestAnimationFrame(w),Promise.resolve()}});var Cm=pe(Ln=>{"use strict";var R1=it(),RL=Er(),ns=ir(),Ere=ln(),Lre=yt(),DL=_f().getModuleCalcData,Qo=on(),ui=wn(),Rre=Io(),ut=ns.ensureSingle;function L1(e,r,t){return ns.ensureSingle(e,r,t,function(n){n.datum(t)})}var as=ui.zindexSeparator;Ln.name="cartesian";Ln.attr=["xaxis","yaxis"];Ln.idRoot=["x","y"];Ln.idRegex=ui.idRegex;Ln.attrRegex=ui.attrRegex;Ln.attributes=nL();Ln.layoutAttributes=Ra();Ln.supplyLayoutDefaults=SL();Ln.transitionAxes=LL();Ln.finalizeSubplots=function(e,r){var t=r._subplots,n=t.xaxis,a=t.yaxis,o=t.cartesian,i=o,l={},u={},s,f,v;for(s=0;s0){var _=g.id;if(_.indexOf(as)!==-1)continue;_+=as+(s+1),g=ns.extendFlat({},g,{id:_,plot:a._cartesianlayer.selectAll(".subplot").select("."+_)})}for(var y=[],w,M=0;M1&&(T+=as+x),S.push(l+T),i=0;i1,v=r.mainplotinfo;if(!r.mainplot||f)if(s)r.xlines=ut(n,"path","xlines-above"),r.ylines=ut(n,"path","ylines-above"),r.xaxislayer=ut(n,"g","xaxislayer-above"),r.yaxislayer=ut(n,"g","yaxislayer-above");else{if(!i){var g=ut(n,"g","layer-subplot");r.shapelayer=ut(g,"g","shapelayer"),r.imagelayer=ut(g,"g","imagelayer"),v&&f?(r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer):(r.minorGridlayer=ut(n,"g","minor-gridlayer"),r.gridlayer=ut(n,"g","gridlayer"),r.zerolinelayer=ut(n,"g","zerolinelayer"));var _=ut(n,"g","layer-between");r.shapelayerBetween=ut(_,"g","shapelayer"),r.imagelayerBetween=ut(_,"g","imagelayer"),ut(n,"path","xlines-below"),ut(n,"path","ylines-below"),r.overlinesBelow=ut(n,"g","overlines-below"),ut(n,"g","xaxislayer-below"),ut(n,"g","yaxislayer-below"),r.overaxesBelow=ut(n,"g","overaxes-below")}r.overplot=ut(n,"g","overplot"),r.plot=ut(r.overplot,"g",a),i||(r.xlines=ut(n,"path","xlines-above"),r.ylines=ut(n,"path","ylines-above"),r.overlinesAbove=ut(n,"g","overlines-above"),ut(n,"g","xaxislayer-above"),ut(n,"g","yaxislayer-above"),r.overaxesAbove=ut(n,"g","overaxes-above"),r.xlines=n.select(".xlines-"+l),r.ylines=n.select(".ylines-"+u),r.xaxislayer=n.select(".xaxislayer-"+l),r.yaxislayer=n.select(".yaxislayer-"+u))}else{var y=v.plotgroup,w=a+"-x",M=a+"-y";r.minorGridlayer=v.minorGridlayer,r.gridlayer=v.gridlayer,r.zerolinelayer=v.zerolinelayer,ut(v.overlinesBelow,"path",w),ut(v.overlinesBelow,"path",M),ut(v.overaxesBelow,"g",w),ut(v.overaxesBelow,"g",M),r.plot=ut(v.overplot,"g",a),ut(v.overlinesAbove,"path",w),ut(v.overlinesAbove,"path",M),ut(v.overaxesAbove,"g",w),ut(v.overaxesAbove,"g",M),r.xlines=y.select(".overlines-"+l).select("."+w),r.ylines=y.select(".overlines-"+u).select("."+M),r.xaxislayer=y.select(".overaxes-"+l).select("."+w),r.yaxislayer=y.select(".overaxes-"+u).select("."+M)}i||(s||(L1(r.minorGridlayer,"g",r.xaxis._id),L1(r.minorGridlayer,"g",r.yaxis._id),r.minorGridlayer.selectAll("g").map(function(m){return m[0]}).sort(Qo.idSort),L1(r.gridlayer,"g",r.xaxis._id),L1(r.gridlayer,"g",r.yaxis._id),r.gridlayer.selectAll("g").map(function(m){return m[0]}).sort(Qo.idSort)),r.xlines.style("fill","none").classed("crisp",!0),r.ylines.style("fill","none").classed("crisp",!0))}function IL(e,r){if(e){var t={};e.each(function(u){var s=u[0],f=R1.select(this);f.remove(),NL(s,r),t[s]=!0});for(var n in r._plots)for(var a=r._plots[n],o=a.overlays||[],i=0;i{"use strict";var D1=oa();zL.exports={hasLines:D1.hasLines,hasMarkers:D1.hasMarkers,hasText:D1.hasText,isBubble:D1.isBubble,attributes:$l(),layoutAttributes:lv(),supplyDefaults:JC(),crossTraceDefaults:jC(),supplyLayoutDefaults:rE(),calc:fm().calc,crossTraceCalc:CE(),arraysToCalcdata:g1(),plot:HE(),colorbar:GE(),formatLabels:WE(),style:bm().style,styleOnSelect:bm().styleOnSelect,hoverPoints:$E(),selectPoints:rL(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Cm(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var UL=pe((o1e,BL)=>{"use strict";var Pre=it(),Fre=Zr(),OL=Cy(),Em=ir(),Ire=Em.strScale,Nre=Em.strRotate,zre=Em.strTranslate;BL.exports=function(r,t,n){var a=r.node(),o=OL[n.arrowhead||0],i=OL[n.startarrowhead||0],l=(n.arrowwidth||1)*(n.arrowsize||1),u=(n.arrowwidth||1)*(n.startarrowsize||1),s=t.indexOf("start")>=0,f=t.indexOf("end")>=0,v=o.backoff*l+n.standoff,g=i.backoff*u+n.startstandoff,_,y,w,M;if(a.nodeName==="line"){_={x:+r.attr("x1"),y:+r.attr("y1")},y={x:+r.attr("x2"),y:+r.attr("y2")};var m=_.x-y.x,k=_.y-y.y;if(w=Math.atan2(k,m),M=w+Math.PI,v&&g&&v+g>Math.sqrt(m*m+k*k)){D();return}if(v){if(v*v>m*m+k*k){D();return}var S=v*Math.cos(w),x=v*Math.sin(w);y.x+=S,y.y+=x,r.attr({x2:y.x,y2:y.y})}if(g){if(g*g>m*m+k*k){D();return}var T=g*Math.cos(w),d=g*Math.sin(w);_.x-=T,_.y-=d,r.attr({x1:_.x,y1:_.y})}}else if(a.nodeName==="path"){var b=a.getTotalLength(),p="";if(b{"use strict";var HL=it(),Lm=Er(),qre=ln(),jo=ir(),Rm=jo.strTranslate,A0=St(),is=Zr(),fo=yt(),VL=io(),Dm=Yn(),Pm=Vo(),T0=ti(),Ore=gt().arrayEditor,Bre=UL();WL.exports={draw:Ure,drawOne:GL,drawRaw:YL};function Ure(e){var r=e._fullLayout;r._infolayer.selectAll(".annotation").remove();for(var t=0;t2/3?Ve="right":Ve="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ve]}for(var ee=!1,G=["x","y"],re=0;re1)&&(ue===te?(Le=de.r2fraction(r["a"+H]),(Le<0||Le>1)&&(ee=!0)):ee=!0),Oe=de._offset+de.r2p(r[H]),Te=.5}else{var me=ye==="domain";H==="x"?(ge=r[H],Oe=me?de._offset+de._length*ge:Oe=l.l+l.w*ge):(ge=1-r[H],Oe=me?de._offset+de._length*ge:Oe=l.t+l.h*ge),Te=r.showarrow?.5:ge}if(r.showarrow){Ce.head=Oe;var he=r["a"+H];if(ce=Me*oe(.5,r.xanchor)-ve*oe(.5,r.yanchor),ue===te){var be=A0.getRefType(ue);be==="domain"?(H==="y"&&(he=1-he),Ce.tail=de._offset+de._length*he):be==="paper"?H==="y"?(he=1-he,Ce.tail=l.t+l.h*he):Ce.tail=l.l+l.w*he:Ce.tail=de._offset+de.r2p(he),Ue=ce}else Ce.tail=Oe+he,Ue=ce+he;Ce.text=Ce.tail+ce;var Se=i[H==="x"?"width":"height"];if(te==="paper"&&(Ce.head=jo.constrain(Ce.head,1,Se-1)),ue==="pixel"){var ze=-Math.max(Ce.tail-3,Ce.text),Fe=Math.min(Ce.tail+3,Ce.text)-Se;ze>0?(Ce.tail+=ze,Ce.text+=ze):Fe>0&&(Ce.tail-=Fe,Ce.text-=Fe)}Ce.tail+=De,Ce.head+=De}else ce=Ae*oe(Te,ke),Ue=ce,Ce.text=Oe+ce;Ce.text+=De,ce+=De,Ue+=De,r["_"+H+"padplus"]=Ae/2+Ue,r["_"+H+"padminus"]=Ae/2-Ue,r["_"+H+"size"]=Ae,r["_"+H+"shift"]=ce}if(ee){b.remove();return}var Je=0,Ye=0;if(r.align!=="left"&&(Je=(q-$)*(r.align==="center"?.5:1)),r.valign!=="top"&&(Ye=(Z-Y)*(r.valign==="middle"?.5:1)),X)U.select("svg").attr({x:A+Je-1,y:A+Ye}).call(fo.setClipUrl,R?w:null,e);else{var Ge=A+Ye-j.top,We=A+Je-j.left;I.call(Dm.positionText,We,Ge).call(fo.setClipUrl,R?w:null,e)}E.select("rect").call(fo.setRect,A,A,q,Z),h.call(fo.setRect,p/2,p/2,ne-p,Q-p),b.call(fo.setTranslate,Math.round(M.x.text-ne/2),Math.round(M.y.text-Q/2)),S.attr({transform:"rotate("+m+","+M.x.text+","+M.y.text+")"});var we=function(Qe,Ve){k.selectAll(".annotation-arrow-g").remove();var ar=M.x.head,se=M.y.head,K=M.x.tail+Qe,ae=M.y.tail+Ve,Re=M.x.text+Qe,Be=M.y.text+Ve,je=jo.rotationXYMatrix(m,Re,Be),nr=jo.apply2DTransform(je),hr=jo.apply2DTransform2(je),wr=+h.attr("width"),Cr=+h.attr("height"),Tr=Re-.5*wr,Ar=Tr+wr,ft=Be-.5*Cr,Yr=ft+Cr,mr=[[Tr,ft,Tr,Yr],[Tr,Yr,Ar,Yr],[Ar,Yr,Ar,ft],[Ar,ft,Tr,ft]].map(hr);if(!mr.reduce(function(nt,Ft){return nt^!!jo.segmentsIntersect(ar,se,ar+1e6,se+1e6,Ft[0],Ft[1],Ft[2],Ft[3])},!1)){mr.forEach(function(nt){var Ft=jo.segmentsIntersect(K,ae,ar,se,nt[0],nt[1],nt[2],nt[3]);Ft&&(K=Ft.x,ae=Ft.y)});var ct=r.arrowwidth,Sr=r.arrowcolor,Ur=r.arrowside,bt=k.append("g").style({opacity:is.opacity(Sr)}).classed("annotation-arrow-g",!0),zr=bt.append("path").attr("d","M"+K+","+ae+"L"+ar+","+se).style("stroke-width",ct+"px").call(is.stroke,is.rgb(Sr));if(Bre(zr,Ur,r),u.annotationPosition&&zr.node().parentNode&&!n){var Hr=ar,Ot=se;if(r.standoff){var Lt=Math.sqrt(Math.pow(ar-K,2)+Math.pow(se-ae,2));Hr+=r.standoff*(K-ar)/Lt,Ot+=r.standoff*(ae-se)/Lt}var yn=bt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(K-Hr)+","+(ae-Ot),transform:Rm(Hr,Ot)}).style("stroke-width",ct+6+"px").call(is.stroke,"rgba(0,0,0,0)").call(is.fill,"rgba(0,0,0,0)"),Gt,Rt;T0.init({element:yn.node(),gd:e,prepFn:function(){var nt=fo.getTranslate(b);Gt=nt.x,Rt=nt.y,a&&a.autorange&&g(a._name+".autorange",!0),o&&o.autorange&&g(o._name+".autorange",!0)},moveFn:function(nt,Ft){var ha=nr(Gt,Rt),Qn=ha[0]+nt,Fn=ha[1]+Ft;b.call(fo.setTranslate,Qn,Fn),_("x",$o(a,nt,"x",l,r)),_("y",$o(o,Ft,"y",l,r)),r.axref===r.xref&&_("ax",$o(a,nt,"ax",l,r)),r.ayref===r.yref&&_("ay",$o(o,Ft,"ay",l,r)),bt.attr("transform",Rm(nt,Ft)),S.attr({transform:"rotate("+m+","+Qn+","+Fn+")"})},doneFn:function(){Lm.call("_guiRelayout",e,y());var nt=document.querySelector(".js-notes-box-panel");nt&&nt.redraw(nt.selectedObj)}})}}};if(r.showarrow&&we(0,0),x){var Pe;T0.init({element:b.node(),gd:e,prepFn:function(){Pe=S.attr("transform")},moveFn:function(Qe,Ve){var ar="pointer";if(r.showarrow)r.axref===r.xref?_("ax",$o(a,Qe,"ax",l,r)):_("ax",r.ax+Qe),r.ayref===r.yref?_("ay",$o(o,Ve,"ay",l.w,r)):_("ay",r.ay+Ve),we(Qe,Ve);else{if(n)return;var se,K;if(a)se=$o(a,Qe,"x",l,r);else{var ae=r._xsize/l.w,Re=r.x+(r._xshift-r.xshift)/l.w-ae/2;se=T0.align(Re+Qe/l.w,ae,0,1,r.xanchor)}if(o)K=$o(o,Ve,"y",l,r);else{var Be=r._ysize/l.h,je=r.y-(r._yshift+r.yshift)/l.h-Be/2;K=T0.align(je-Ve/l.h,Be,0,1,r.yanchor)}_("x",se),_("y",K),(!a||!o)&&(ar=T0.getCursor(a?.5:se,o?.5:K,r.xanchor,r.yanchor))}S.attr({transform:Rm(Qe,Ve)+Pe}),Pm(b,ar)},clickFn:function(Qe,Ve){r.captureevents&&e.emit("plotly_clickannotation",d(Ve))},doneFn:function(){Pm(b),Lm.call("_guiRelayout",e,y());var Qe=document.querySelector(".js-notes-box-panel");Qe&&Qe.redraw(Qe.selectedObj)}})}}u.annotationText?I.call(Dm.makeEditable,{delegate:b,gd:e}).call(F).on("edit",function(P){r.text=P,this.call(F),_("text",P),a&&a.autorange&&g(a._name+".autorange",!0),o&&o.autorange&&g(o._name+".autorange",!0),Lm.call("_guiRelayout",e,y())}):I.call(F)}});var $L=pe((s1e,QL)=>{"use strict";var XL=ir(),Hre=Er(),ZL=gt().arrayEditor;QL.exports={hasClickToShow:Vre,onClick:Gre};function Vre(e,r){var t=KL(e,r);return t.on.length>0||t.explicitOff.length>0}function Gre(e,r){var t=KL(e,r),n=t.on,a=t.off.concat(t.explicitOff),o={},i=e._fullLayout.annotations,l,u;if(n.length||a.length){for(l=0;l{"use strict";var Fm=ir(),Su=Zr();jL.exports=function(r,t,n,a){a("opacity");var o=a("bgcolor"),i=a("bordercolor"),l=Su.opacity(i);a("borderpad");var u=a("borderwidth"),s=a("showarrow");a("text",s?" ":n._dfltTitle.annotation),a("textangle"),Fm.coerceFont(a,"font",n.font),a("width"),a("align");var f=a("height");if(f&&a("valign"),s){var v=a("arrowside"),g,_;v.indexOf("end")!==-1&&(g=a("arrowhead"),_=a("arrowsize")),v.indexOf("start")!==-1&&(a("startarrowhead",g),a("startarrowsize",_)),a("arrowcolor",l?t.bordercolor:Su.defaultLine),a("arrowwidth",(l&&u||1)*2),a("standoff"),a("startstandoff")}var y=a("hovertext"),w=n.hoverlabel||{};if(y){var M=a("hoverlabel.bgcolor",w.bgcolor||(Su.opacity(o)?Su.rgb(o):Su.defaultLine)),m=a("hoverlabel.bordercolor",w.bordercolor||Su.contrast(M)),k=Fm.extendFlat({},w.font);k.color||(k.color=m),Fm.coerceFont(a,"hoverlabel.font",k)}a("captureevents",!!y)}});var rR=pe((f1e,eR)=>{"use strict";var Nm=ir(),os=St(),Yre=ei(),Wre=Im(),Xre=yu();eR.exports=function(r,t){Yre(r,t,{name:"annotations",handleItemDefaults:Zre})};function Zre(e,r,t){function n(S,x){return Nm.coerce(e,r,Xre,S,x)}var a=n("visible"),o=n("clicktoshow");if(a||o){Wre(e,r,t,n);for(var i=r.showarrow,l=["x","y"],u=[-10,-30],s={_fullLayout:t},f=0;f<2;f++){var v=l[f],g=os.coerceRef(e,r,s,v,"","paper");if(g!=="paper"){var _=os.getFromId(s,g);_._annIndices.push(r._index)}if(os.coercePosition(r,s,n,g,v,.5),i){var y="a"+v,w=os.coerceRef(e,r,s,y,"pixel",["pixel","paper"]);w!=="pixel"&&w!==g&&(w=r[y]="pixel");var M=w==="pixel"?u[f]:.4;os.coercePosition(r,s,n,w,y,M)}n(v+"anchor"),n(v+"shift")}if(Nm.noneOrAll(e,r,["x","y"]),i&&Nm.noneOrAll(e,r,["ax","ay"]),o){var m=n("xclick"),k=n("yclick");r._xclick=m===void 0?r.x:os.cleanPosition(m,s,r.xref),r._yclick=k===void 0?r.y:os.cleanPosition(k,s,r.yref)}}}});var aR=pe((c1e,nR)=>{"use strict";var zm=ir(),ls=St(),Jre=P1().draw;nR.exports=function(r){var t=r._fullLayout,n=zm.filterVisible(t.annotations);if(n.length&&r._fullData.length)return zm.syncOrAsync([Jre,Kre],r)};function Kre(e){var r=e._fullLayout;zm.filterVisible(r.annotations).forEach(function(t){var n=ls.getFromId(e,t.xref),a=ls.getFromId(e,t.yref),o=ls.getRefType(t.xref),i=ls.getRefType(t.yref);t._extremes={},o==="range"&&tR(t,n),i==="range"&&tR(t,a)})}function tR(e,r){var t=r._id,n=t.charAt(0),a=e[n],o=e["a"+n],i=e[n+"ref"],l=e["a"+n+"ref"],u=e["_"+n+"padplus"],s=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],v=3*e.arrowsize*e.arrowwidth||0,g=v+f,_=v-f,y=3*e.startarrowsize*e.arrowwidth||0,w=y+f,M=y-f,m;if(l===i){var k=ls.findExtremes(r,[r.r2c(a)],{ppadplus:g,ppadminus:_}),S=ls.findExtremes(r,[r.r2c(o)],{ppadplus:Math.max(u,w),ppadminus:Math.max(s,M)});m={min:[k.min[0],S.min[0]],max:[k.max[0],S.max[0]]}}else w=o?w+o:w,M=o?M-o:M,m=ls.findExtremes(r,[r.r2c(a)],{ppadplus:Math.max(u,g,w),ppadminus:Math.max(s,_,M)});e._extremes[t]=m}});var oR=pe((v1e,iR)=>{"use strict";var Qre=rt(),$re=Ac();iR.exports=function(r,t,n,a){t=t||{};var o=n==="log"&&t.type==="linear",i=n==="linear"&&t.type==="log";if(!(o||i))return;var l=r._fullLayout.annotations,u=t._id.charAt(0),s,f;function v(_){var y=s[_],w=null;o?w=$re(y,t.range):w=Math.pow(10,y),Qre(w)||(w=null),a(f+_,w)}for(var g=0;g{"use strict";var qm=P1(),lR=$L();sR.exports={moduleType:"component",name:"annotations",layoutAttributes:yu(),supplyLayoutDefaults:rR(),includeBasePlot:o0()("annotations"),calcAutorange:aR(),draw:qm.draw,drawOne:qm.drawOne,drawRaw:qm.drawRaw,hasClickToShow:lR.hasClickToShow,onClick:lR.onClick,convertCoords:oR()}});var F1=pe((d1e,fR)=>{"use strict";var wt=yu(),jre=zn().overrideAll,ete=gt().templatedArray;fR.exports=jre(ete("annotation",{visible:wt.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:wt.xanchor,xshift:wt.xshift,yanchor:wt.yanchor,yshift:wt.yshift,text:wt.text,textangle:wt.textangle,font:wt.font,width:wt.width,height:wt.height,opacity:wt.opacity,align:wt.align,valign:wt.valign,bgcolor:wt.bgcolor,bordercolor:wt.bordercolor,borderpad:wt.borderpad,borderwidth:wt.borderwidth,showarrow:wt.showarrow,arrowcolor:wt.arrowcolor,arrowhead:wt.arrowhead,startarrowhead:wt.startarrowhead,arrowside:wt.arrowside,arrowsize:wt.arrowsize,startarrowsize:wt.startarrowsize,arrowwidth:wt.arrowwidth,standoff:wt.standoff,startstandoff:wt.startstandoff,hovertext:wt.hovertext,hoverlabel:wt.hoverlabel,captureevents:wt.captureevents}),"calc","from-root")});var vR=pe((p1e,cR)=>{"use strict";var Om=ir(),rte=St(),tte=ei(),nte=Im(),ate=F1();cR.exports=function(r,t,n){tte(r,t,{name:"annotations",handleItemDefaults:ite,fullLayout:n.fullLayout})};function ite(e,r,t,n){function a(l,u){return Om.coerce(e,r,ate,l,u)}function o(l){var u=l+"axis",s={_fullLayout:{}};return s._fullLayout[u]=t[u],rte.coercePosition(r,s,a,l,l,.5)}var i=a("visible");i&&(nte(e,r,n.fullLayout,a),o("x"),o("y"),o("z"),Om.noneOrAll(e,r,["x","y","z"]),r.xref="x",r.yref="y",r.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),r.showarrow&&(r.axref="pixel",r.ayref="pixel",a("ax",-10),a("ay",-30),Om.noneOrAll(e,r,["ax","ay"])))}});var gR=pe((g1e,pR)=>{"use strict";var hR=ir(),dR=St();pR.exports=function(r){for(var t=r.fullSceneLayout,n=t.annotations,a=0;a{"use strict";function Bm(e,r){var t=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)t[a]+=e[4*n+a]*r[n];return t}function lte(e,r){var t=Bm(e.projection,Bm(e.view,Bm(e.model,[r[0],r[1],r[2],1])));return t}yR.exports=lte});var xR=pe((m1e,mR)=>{"use strict";var ste=P1().drawRaw,ute=Um(),fte=["x","y","z"];mR.exports=function(r){for(var t=r.fullSceneLayout,n=r.dataScale,a=t.annotations,o=0;o1){l=!0;break}}l?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+o+'"]').remove():(i._pdata=ute(r.glplot.cameraParams,[t.xaxis.r2l(i.x)*n[0],t.yaxis.r2l(i.y)*n[1],t.zaxis.r2l(i.z)*n[2]]),ste(r.graphDiv,i,o,r.id,i._xa,i._ya))}}});var wR=pe((x1e,_R)=>{"use strict";var cte=Er(),bR=ir();_R.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:F1()}}},layoutAttributes:F1(),handleDefaults:vR(),includeBasePlot:vte,convert:gR(),draw:xR()};function vte(e,r){var t=cte.subplotsRegistry.gl3d;if(t)for(var n=t.attrRegex,a=Object.keys(e),o=0;o{"use strict";var MR=yu(),TR=kn(),AR=$l().line,hte=Ao().dash,fi=Mt().extendFlat,dte=gt().templatedArray,b1e=i0(),Cu=Sn(),pte=Sa().shapeTexttemplateAttrs,gte=Oc();kR.exports=dte("shape",{visible:fi({},Cu.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:fi({},Cu.legend,{editType:"calc+arraydraw"}),legendgroup:fi({},Cu.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:fi({},Cu.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:TR({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:fi({},Cu.legendrank,{editType:"calc+arraydraw"}),legendwidth:fi({},Cu.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:fi({},MR.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:fi({},MR.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:fi({},AR.color,{editType:"arraydraw"}),width:fi({},AR.width,{editType:"calc+arraydraw"}),dash:fi({},hte,{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:pte({},{keys:Object.keys(gte)}),font:TR({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 ER=pe((w1e,CR)=>{"use strict";var k0=ir(),Eu=St(),yte=ei(),mte=Hm(),SR=Wo();CR.exports=function(r,t){yte(r,t,{name:"shapes",handleItemDefaults:bte})};function xte(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function bte(e,r,t){function n(P,O){return k0.coerce(e,r,mte,P,O)}r._isShape=!0;var a=n("visible");if(a){var o=n("showlegend");o&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),k0.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var i=n("path"),l=i?"path":"rect",u=n("type",l),s=u!=="path";s&&delete r.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var v=n("xsizemode"),g=n("ysizemode"),_=["x","y"],y=0;y<2;y++){var w=_[y],M=w+"anchor",m=w==="x"?v:g,k={_fullLayout:t},S,x,T,d=Eu.coerceRef(e,r,k,w,void 0,"paper"),b=Eu.getRefType(d);if(b==="range"?(S=Eu.getFromId(k,d),S._shapeIndices.push(r._index),T=SR.rangeToShapePosition(S),x=SR.shapePositionToRange(S),(S.type==="category"||S.type==="multicategory")&&(n(w+"0shift"),n(w+"1shift"))):x=T=k0.identity,s){var p=.25,c=.75,A=w+"0",h=w+"1",R=e[A],E=e[h];e[A]=x(e[A],!0),e[h]=x(e[h],!0),m==="pixel"?(n(A,0),n(h,10)):(Eu.coercePosition(r,k,n,d,A,p),Eu.coercePosition(r,k,n,d,h,c)),r[A]=T(r[A]),r[h]=T(r[h]),e[A]=R,e[h]=E}if(m==="pixel"){var D=e[M];e[M]=x(e[M],!0),Eu.coercePosition(r,k,n,d,M,.25),r[M]=T(r[M]),e[M]=D}}s&&k0.noneOrAll(e,r,["x0","x1","y0","y1"]);var N=u==="line",I,F;if(s&&(I=n("label.texttemplate")),I||(F=n("label.text")),F||I){n("label.textangle");var L=n("label.textposition",N?"middle":"middle center");n("label.xanchor"),n("label.yanchor",xte(N,L)),n("label.padding"),k0.coerceFont(n,"label.font",t.font)}}}});var DR=pe((M1e,RR)=>{"use strict";var _te=Zr(),LR=ir();function wte(e,r){return e?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}RR.exports=function(r,t,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),LR.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var o=(r||{}).plot_bgcolor||"#FFF";n("newshape.line.color",_te.contrast(o)),n("newshape.line.dash")}var i=r.dragmode==="drawline",l=n("newshape.label.text"),u=n("newshape.label.texttemplate");if(l||u){n("newshape.label.textangle");var s=n("newshape.label.textposition",i?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",wte(i,s)),n("newshape.label.padding"),LR.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var zR=pe((T1e,NR)=>{"use strict";var Vm=ir(),Lu=St(),Ru=Of(),FR=Wo();NR.exports=function(r){var t=r._fullLayout,n=Vm.filterVisible(t.shapes);if(!(!n.length||!r._fullData.length))for(var a=0;a0?s+i:i;return{ppad:i,ppadplus:l?v:g,ppadminus:l?g:v}}else return{ppad:i}}function PR(e,r,t){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",o,i,l=0,u=0,s=a?e.r2c:e.d2c,f=r[n+"sizemode"]==="scaled";if(f?(o=r[n+"0"],i=r[n+"1"],a&&(l=r[n+"0shift"],u=r[n+"1shift"])):(o=r[n+"anchor"],i=r[n+"anchor"]),o!==void 0)return[s(o)+l,s(i)+u];if(r.path){var v=1/0,g=-1/0,_=r.path.match(Ru.segmentRE),y,w,M,m,k;for(e.type==="date"&&(s=FR.decodeDate(s)),y=0;y<_.length;y++)w=_[y],M=t[w.charAt(0)].drawn,M!==void 0&&(m=_[y].substr(1).match(Ru.paramRE),!(!m||m.lengthg&&(g=k)));if(g>=v)return[v,g]}}});var BR=pe((A1e,OR)=>{"use strict";var qR=Th();OR.exports={moduleType:"component",name:"shapes",layoutAttributes:Hm(),supplyLayoutDefaults:ER(),supplyDrawNewShapeDefaults:DR(),includeBasePlot:o0()("shapes"),calcAutorange:zR(),draw:qR.draw,drawOne:qR.drawOne}});var Gm=pe((S1e,HR)=>{"use strict";var UR=wn(),Ate=gt().templatedArray,k1e=i0();HR.exports=Ate("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",UR.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",UR.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var GR=pe((C1e,VR)=>{"use strict";var kte=ir(),Ym=St(),Ste=ei(),Cte=Gm(),Ete="images";VR.exports=function(r,t){var n={name:Ete,handleItemDefaults:Lte};Ste(r,t,n)};function Lte(e,r,t){function n(g,_){return kte.coerce(e,r,Cte,g,_)}var a=n("source"),o=n("visible",!!a);if(!o)return r;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var i={_fullLayout:t},l=["x","y"],u=0;u<2;u++){var s=l[u],f=Ym.coerceRef(e,r,i,s,"paper",void 0);if(f!=="paper"){var v=Ym.getFromId(i,f);v._imgIndices.push(r._index)}Ym.coercePosition(r,i,n,f,s,0)}return r}});var ZR=pe((E1e,XR)=>{"use strict";var YR=it(),Rte=yt(),Du=St(),WR=on(),Dte=Io();XR.exports=function(r){var t=r._fullLayout,n=[],a={},o=[],i,l;for(l=0;l{"use strict";var JR=rt(),Pte=Ac();KR.exports=function(r,t,n,a){t=t||{};var o=n==="log"&&t.type==="linear",i=n==="linear"&&t.type==="log";if(o||i){for(var l=r._fullLayout.images,u=t._id.charAt(0),s,f,v=0;v{"use strict";$R.exports={moduleType:"component",name:"images",layoutAttributes:Gm(),supplyLayoutDefaults:GR(),includeBasePlot:o0()("images"),draw:ZR(),convertCoords:QR()}});var I1=pe((D1e,eD)=>{"use strict";eD.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 Wm=pe((P1e,tD)=>{"use strict";var Fte=kn(),Ite=Ti(),Nte=Mt().extendFlat,zte=zn().overrideAll,qte=Bc(),rD=gt().templatedArray,Ote=rD("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}});tD.exports=zte(rD("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:Ote,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:Nte(qte({editType:"arraydraw"}),{}),font:Fte({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Ite.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var oD=pe((F1e,iD)=>{"use strict";var N1=ir(),nD=ei(),aD=Wm(),Bte=I1(),Ute=Bte.name,Hte=aD.buttons;iD.exports=function(r,t){var n={name:Ute,handleItemDefaults:Vte};nD(r,t,n)};function Vte(e,r,t){function n(i,l){return N1.coerce(e,r,aD,i,l)}var a=nD(e,r,{name:"buttons",handleItemDefaults:Gte}),o=n("visible",a.length>0);o&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),N1.noneOrAll(e,r,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),N1.coerceFont(n,"font",t.font),n("bgcolor",t.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Gte(e,r){function t(a,o){return N1.coerce(e,r,Hte,a,o)}var n=t("visible",e.method==="skip"||Array.isArray(e.args));n&&(t("method"),t("args"),t("args2"),t("label"),t("execute"))}});var uD=pe((I1e,sD)=>{"use strict";sD.exports=Dt;var ci=it(),lD=Zr(),Pu=yt(),z1=ir();function Dt(e,r,t){this.gd=e,this.container=r,this.id=t,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})}Dt.barWidth=2;Dt.barLength=20;Dt.barRadius=2;Dt.barPad=1;Dt.barColor="#808BA4";Dt.prototype.enable=function(r,t,n){var a=this.gd._fullLayout,o=a.width,i=a.height;this.position=r;var l=this.position.l,u=this.position.w,s=this.position.t,f=this.position.h,v=this.position.direction,g=v==="down",_=v==="left",y=v==="right",w=v==="up",M=u,m=f,k,S,x,T;!g&&!_&&!y&&!w&&(this.position.direction="down",g=!0);var d=g||w;d?(k=l,S=k+M,g?(x=s,T=Math.min(x+m,i),m=T-x):(T=s+m,x=Math.max(T-m,0),m=T-x)):(x=s,T=x+m,_?(S=l+M,k=Math.max(S-M,0),M=S-k):(k=l,S=Math.min(k+M,o),M=S-k)),this._box={l:k,t:x,w:M,h:m};var b=u>M,p=Dt.barLength+2*Dt.barPad,c=Dt.barWidth+2*Dt.barPad,A=l,h=s+f;h+c>i&&(h=i-c);var R=this.container.selectAll("rect.scrollbar-horizontal").data(b?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(lD.fill,Dt.barColor),b?(this.hbar=R.attr({rx:Dt.barRadius,ry:Dt.barRadius,x:A,y:h,width:p,height:c}),this._hbarXMin=A+p/2,this._hbarTranslateMax=M-p):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=f>m,D=Dt.barWidth+2*Dt.barPad,N=Dt.barLength+2*Dt.barPad,I=l+u,F=s;I+D>o&&(I=o-D);var L=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(lD.fill,Dt.barColor),E?(this.vbar=L.attr({rx:Dt.barRadius,ry:Dt.barRadius,x:I,y:F,width:D,height:N}),this._vbarYMin=F+N/2,this._vbarTranslateMax=m-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var P=this.id,O=k-.5,U=E?S+D+.5:S+.5,X=x-.5,j=b?T+c+.5:T+.5,$=a._topdefs.selectAll("#"+P).data(b||E?[0]:[]);if($.exit().remove(),$.enter().append("clipPath").attr("id",P).append("rect"),b||E?(this._clipRect=$.select("rect").attr({x:Math.floor(O),y:Math.floor(X),width:Math.ceil(U)-Math.floor(O),height:Math.ceil(j)-Math.floor(X)}),this.container.call(Pu.setClipUrl,P,this.gd),this.bg.attr({x:l,y:s,width:u,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Pu.setClipUrl,null),delete this._clipRect),b||E){var Y=ci.behavior.drag().on("dragstart",function(){ci.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=ci.behavior.drag().on("dragstart",function(){ci.event.sourceEvent.preventDefault(),ci.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));b&&this.hbar.on(".drag",null).call(q),E&&this.vbar.on(".drag",null).call(q)}this.setTranslate(t,n)};Dt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Pu.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)};Dt.prototype._onBoxDrag=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r-=ci.event.dx),this.vbar&&(t-=ci.event.dy),this.setTranslate(r,t)};Dt.prototype._onBoxWheel=function(){var r=this.translateX,t=this.translateY;this.hbar&&(r+=ci.event.deltaY),this.vbar&&(t+=ci.event.deltaY),this.setTranslate(r,t)};Dt.prototype._onBarDrag=function(){var r=this.translateX,t=this.translateY;if(this.hbar){var n=r+this._hbarXMin,a=n+this._hbarTranslateMax,o=z1.constrain(ci.event.x,n,a),i=(o-n)/(a-n),l=this.position.w-this._box.w;r=i*l}if(this.vbar){var u=t+this._vbarYMin,s=u+this._vbarTranslateMax,f=z1.constrain(ci.event.y,u,s),v=(f-u)/(s-u),g=this.position.h-this._box.h;t=v*g}this.setTranslate(r,t)};Dt.prototype.setTranslate=function(r,t){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(r=z1.constrain(r||0,0,n),t=z1.constrain(t||0,0,a),this.translateX=r,this.translateY=t,this.container.call(Pu.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=r/n;this.hbar.call(Pu.setTranslate,r+o*this._hbarTranslateMax,t)}if(this.vbar){var i=t/a;this.vbar.call(Pu.setTranslate,r,t+i*this._vbarTranslateMax)}}});var xD=pe((N1e,mD)=>{"use strict";var Fu=it(),S0=ln(),C0=Zr(),Iu=yt(),ba=ir(),q1=Yn(),Yte=gt().arrayEditor,cD=qn().LINE_SPACING,Dr=I1(),Wte=uD();mD.exports=function(r){var t=r._fullLayout,n=ba.filterVisible(t[Dr.name]);function a(g){S0.autoMargin(r,gD(g))}var o=t._menulayer.selectAll("g."+Dr.containerClassName).data(n.length>0?[0]:[]);if(o.enter().append("g").classed(Dr.containerClassName,!0).style("cursor","pointer"),o.exit().each(function(){Fu.select(this).selectAll("g."+Dr.headerGroupClassName).each(a)}).remove(),n.length!==0){var i=o.selectAll("g."+Dr.headerGroupClassName).data(n,Xte);i.enter().append("g").classed(Dr.headerGroupClassName,!0);for(var l=ba.ensureSingle(o,"g",Dr.dropdownButtonGroupClassName,function(g){g.style("pointer-events","all")}),u=0;u{"use strict";var ene=I1();bD.exports={moduleType:"component",name:ene.name,layoutAttributes:Wm(),supplyLayoutDefaults:oD(),draw:xD()}});var L0=pe((q1e,wD)=>{"use strict";wD.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 Km=pe((O1e,AD)=>{"use strict";var MD=kn(),rne=Bc(),tne=Mt().extendDeepAll,nne=zn().overrideAll,ane=cf(),TD=gt().templatedArray,ss=L0(),ine=TD("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}});AD.exports=nne(TD("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:ine,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:tne(rne({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:ane.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:MD({})},font:MD({}),activebgcolor:{valType:"color",dflt:ss.gripBgActiveColor},bgcolor:{valType:"color",dflt:ss.railBgColor},bordercolor:{valType:"color",dflt:ss.railBorderColor},borderwidth:{valType:"number",min:0,dflt:ss.railBorderWidth},ticklen:{valType:"number",min:0,dflt:ss.tickLength},tickcolor:{valType:"color",dflt:ss.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:ss.minorTickLength}}),"arraydraw","from-root")});var ED=pe((B1e,CD)=>{"use strict";var Nu=ir(),kD=ei(),SD=Km(),one=L0(),lne=one.name,sne=SD.steps;CD.exports=function(r,t){kD(r,t,{name:lne,handleItemDefaults:une})};function une(e,r,t){function n(v,g){return Nu.coerce(e,r,SD,v,g)}for(var a=kD(e,r,{name:"steps",handleItemDefaults:fne}),o=0,i=0;i{"use strict";var vi=it(),O1=ln(),el=Zr(),hi=yt(),_a=ir(),cne=_a.strTranslate,R0=Yn(),vne=gt().arrayEditor,Gr=L0(),jm=qn(),DD=jm.LINE_SPACING,Qm=jm.FROM_TL,$m=jm.FROM_BR;qD.exports=function(r){var t=r._context.staticPlot,n=r._fullLayout,a=hne(n,r),o=n._infolayer.selectAll("g."+Gr.containerClassName).data(a.length>0?[0]:[]);o.enter().append("g").classed(Gr.containerClassName,!0).style("cursor",t?null:"ew-resize");function i(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),O1.autoMargin(r,PD(f))}if(o.exit().each(function(){vi.select(this).selectAll("g."+Gr.groupClassName).each(i)}).remove(),a.length!==0){var l=o.selectAll("g."+Gr.groupClassName).data(a,dne);l.enter().append("g").classed(Gr.groupClassName,!0),l.exit().each(i).remove();for(var u=0;u0&&(l=l.transition().duration(r.transition.duration).ease(r.transition.easing)),l.attr("transform",cne(i-Gr.gripWidth*.5,r._dims.currentValueTotalHeight))}}function e3(e,r){var t=e._dims;return t.inputAreaStart+Gr.stepInset+(t.inputAreaLength-2*Gr.stepInset)*Math.min(1,Math.max(0,r))}function RD(e,r){var t=e._dims;return Math.min(1,Math.max(0,(r-Gr.stepInset-t.inputAreaStart)/(t.inputAreaLength-2*Gr.stepInset-2*t.inputAreaStart)))}function _ne(e,r,t){var n=t._dims,a=_a.ensureSingle(e,"rect",Gr.railTouchRectClass,function(o){o.call(ND,r,e,t).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Gr.tickOffset+t.ticklen+n.labelHeight)}).call(el.fill,t.bgcolor).attr("opacity",0),hi.setTranslate(a,0,n.currentValueTotalHeight)}function wne(e,r){var t=r._dims,n=t.inputAreaLength-Gr.railInset*2,a=_a.ensureSingle(e,"rect",Gr.railRectClass);a.attr({width:n,height:Gr.railWidth,rx:Gr.railRadius,ry:Gr.railRadius,"shape-rendering":"crispEdges"}).call(el.stroke,r.bordercolor).call(el.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px"),hi.setTranslate(a,Gr.railInset,(t.inputAreaWidth-Gr.railWidth)*.5+t.currentValueTotalHeight)}});var UD=pe((H1e,BD)=>{"use strict";var Mne=L0();BD.exports={moduleType:"component",name:Mne.name,layoutAttributes:Km(),supplyLayoutDefaults:ED(),draw:OD()}});var U1=pe((V1e,VD)=>{"use strict";var HD=Ti();VD.exports={bgcolor:{valType:"color",dflt:HD.background,editType:"plot"},bordercolor:{valType:"color",dflt:HD.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 r3=pe((G1e,GD)=>{"use strict";GD.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 H1=pe((Y1e,YD)=>{"use strict";YD.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 ZD=pe(G1=>{"use strict";var Tne=on(),Ane=Yn(),WD=H1(),kne=qn().LINE_SPACING,V1=WD.name;function XD(e){var r=e&&e[V1];return r&&r.visible}G1.isVisible=XD;G1.makeData=function(e){for(var r=Tne.list({_fullLayout:e},"x",!0),t=e.margin,n=[],a=0;a{"use strict";var Y1=ir(),JD=gt(),KD=on(),Sne=U1(),Cne=r3();QD.exports=function(r,t,n){var a=r[n],o=t[n];if(!(a.rangeslider||t._requestRangeslider[o._id]))return;Y1.isPlainObject(a.rangeslider)||(a.rangeslider={});var i=a.rangeslider,l=JD.newContainer(o,"rangeslider");function u(T,d){return Y1.coerce(i,l,Sne,T,d)}var s,f;function v(T,d){return Y1.coerce(s,f,Cne,T,d)}var g=u("visible");if(g){u("bgcolor",t.plot_bgcolor),u("bordercolor"),u("borderwidth"),u("thickness"),u("autorange",!o.isValidRange(i.range)),u("range");var _=t._subplots;if(_)for(var y=_.cartesian.filter(function(T){return T.substr(0,T.indexOf("y"))===KD.name2id(n)}).map(function(T){return T.substr(T.indexOf("y"),T.length)}),w=Y1.simpleMap(y,KD.id2name),M=0;M{"use strict";var Ene=on().list,Lne=$s().getAutoRange,Rne=H1();jD.exports=function(r){for(var t=Ene(r,"x",!0),n=0;n{"use strict";var W1=it(),Dne=Er(),Pne=ln(),qt=ir(),X1=qt.strTranslate,tP=yt(),rl=Zr(),Fne=Sf(),Ine=Cm(),t3=on(),Nne=ti(),zne=Vo(),Qr=H1();nP.exports=function(e){for(var r=e._fullLayout,t=r._rangeSliderData,n=0;n=L.max)I=h[F+1];else if(N=L.pmax)I=h[F+1];else if(N0?e.touches[0].clientX:0}function qne(e,r,t,n){if(r._context.staticPlot)return;var a=e.select("rect."+Qr.slideBoxClassName).node(),o=e.select("rect."+Qr.grabAreaMinClassName).node(),i=e.select("rect."+Qr.grabAreaMaxClassName).node();function l(){var u=W1.event,s=u.target,f=rP(u),v=f-e.node().getBoundingClientRect().left,g=n.d2p(t._rl[0]),_=n.d2p(t._rl[1]),y=Nne.coverSlip();this.addEventListener("touchmove",w),this.addEventListener("touchend",M),y.addEventListener("mousemove",w),y.addEventListener("mouseup",M);function w(m){var k=rP(m),S=+k-f,x,T,d;switch(s){case a:if(d="ew-resize",g+S>t._length||_+S<0)return;x=g+S,T=_+S;break;case o:if(d="col-resize",g+S>t._length)return;x=g+S,T=_;break;case i:if(d="col-resize",_+S<0)return;x=g,T=_+S;break;default:d="ew-resize",x=v,T=v+S;break}if(T{"use strict";var Zne=ir(),Jne=U1(),Kne=r3(),n3=ZD();iP.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Zne.extendFlat({},Jne,{yaxis:Kne})}}},layoutAttributes:U1(),handleDefaults:$D(),calcAutorange:eP(),draw:aP(),isVisible:n3.isVisible,makeData:n3.makeData,autoMarginOpts:n3.autoMarginOpts}});var Z1=pe((Q1e,sP)=>{"use strict";var Qne=kn(),lP=Ti(),$ne=gt().templatedArray,jne=$ne("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"});sP.exports={visible:{valType:"boolean",editType:"plot"},buttons:jne,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:Qne({editType:"plot"}),bgcolor:{valType:"color",dflt:lP.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:lP.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var a3=pe(($1e,uP)=>{"use strict";uP.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var vP=pe((j1e,cP)=>{"use strict";var J1=ir(),eae=Zr(),rae=gt(),tae=ei(),fP=Z1(),i3=a3();cP.exports=function(r,t,n,a,o){var i=r.rangeselector||{},l=rae.newContainer(t,"rangeselector");function u(_,y){return J1.coerce(i,l,fP,_,y)}var s=tae(i,l,{name:"buttons",handleItemDefaults:nae,calendar:o}),f=u("visible",s.length>0);if(f){var v=aae(t,n,a);u("x",v[0]),u("y",v[1]),J1.noneOrAll(r,t,["x","y"]),u("xanchor"),u("yanchor"),J1.coerceFont(u,"font",n.font);var g=u("bgcolor");u("activecolor",eae.contrast(g,i3.lightAmount,i3.darkAmount)),u("bordercolor"),u("borderwidth")}};function nae(e,r,t,n){var a=n.calendar;function o(u,s){return J1.coerce(e,r,fP.buttons,u,s)}var i=o("visible");if(i){var l=o("step");l!=="all"&&(a&&a!=="gregorian"&&(l==="month"||l==="year")?r.stepmode="backward":o("stepmode"),o("count")),o("label")}}function aae(e,r,t){for(var n=t.filter(function(l){return r[l].anchor===e._id}),a=0,o=0;o{"use strict";var iae=ip(),oae=ir().titleCase;hP.exports=function(r,t){var n=r._name,a={};if(t.step==="all")a[n+".autorange"]=!0;else{var o=lae(r,t);a[n+".range[0]"]=o[0],a[n+".range[1]"]=o[1]}return a};function lae(e,r){var t=e.range,n=new Date(e.r2l(t[1])),a=r.step,o=iae["utc"+oae(a)],i=r.count,l;switch(r.stepmode){case"backward":l=e.l2r(+o.offset(n,-i));break;case"todate":var u=o.offset(n,-i);l=e.l2r(+o.ceil(u));break}var s=t[1];return[l,s]}});var wP=pe((rde,_P)=>{"use strict";var Q1=it(),sae=Er(),uae=ln(),pP=Zr(),bP=yt(),co=ir(),gP=co.strTranslate,K1=Yn(),fae=on(),s3=qn(),yP=s3.LINE_SPACING,mP=s3.FROM_TL,xP=s3.FROM_BR,l3=a3(),cae=dP();_P.exports=function(r){var t=r._fullLayout,n=t._infolayer.selectAll(".rangeselector").data(vae(r),hae);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var o=Q1.select(this),i=a,l=i.rangeselector,u=o.selectAll("g.button").data(co.filterVisible(l.buttons));u.enter().append("g").classed("button",!0),u.exit().remove(),u.each(function(s){var f=Q1.select(this),v=cae(i,s);s._isActive=dae(i,s,v),f.call(o3,l,s),f.call(gae,l,s,r),f.on("click",function(){r._dragged||sae.call("_guiRelayout",r,v)}),f.on("mouseover",function(){s._isHovered=!0,f.call(o3,l,s)}),f.on("mouseout",function(){s._isHovered=!1,f.call(o3,l,s)})}),mae(r,u,l,i._name,o)})};function vae(e){for(var r=fae.list(e,"x",!0),t=[],n=0;n{"use strict";MP.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Z1()}}},layoutAttributes:Z1(),handleDefaults:vP(),draw:wP()}});var $1=pe(u3=>{"use strict";var AP=Mt().extendFlat;u3.attributes=function(e,r){e=e||{},r=r||{};var t={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+" ":"",a=e.trace?"trace ":"subplot ",o=r.description?" "+r.description:"",i={x:AP({},t,{}),y:AP({},t,{}),editType:e.editType};return e.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:e.editType},i.column={valType:"integer",min:0,dflt:0,editType:e.editType}),i};u3.defaults=function(e,r,t,n){var a=n&&n.x||[0,1],o=n&&n.y||[0,1],i=r.grid;if(i){var l=t("domain.column");l!==void 0&&(l{"use strict";var xae=ir(),bae=Es().counter,_ae=$1().attributes,kP=wn().idRegex,wae=gt(),f3={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:[bae("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[kP.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[kP.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:_ae({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 j1(e,r,t){var n=r[t+"axes"],a=Object.keys((e._splomAxes||{})[t]||{});if(Array.isArray(n))return n;if(a.length)return a}function Mae(e,r){var t=e.grid||{},n=j1(r,t,"x"),a=j1(r,t,"y");if(!e.grid&&!n&&!a)return;var o=Array.isArray(t.subplots)&&Array.isArray(t.subplots[0]),i=Array.isArray(n),l=Array.isArray(a),u=i&&n!==t.xaxes&&l&&a!==t.yaxes,s,f;o?(s=t.subplots.length,f=t.subplots[0].length):(l&&(s=a.length),i&&(f=n.length));var v=wae.newContainer(r,"grid");function g(d,b){return xae.coerce(t,v,f3,d,b)}var _=g("rows",s),y=g("columns",f);if(!(_*y>1)){delete r.grid;return}if(!o&&!i&&!l){var w=g("pattern")==="independent";w&&(o=!0)}v._hasSubplotGrid=o;var M=g("roworder"),m=M==="top to bottom",k=o?.2:.1,S=o?.3:.1,x,T;u&&r._splomGridDflt&&(x=r._splomGridDflt.xside,T=r._splomGridDflt.yside),v._domains={x:SP("x",g,k,x,y),y:SP("y",g,S,T,_,m)}}function SP(e,r,t,n,a,o){var i=r(e+"gap",t),l=r("domain."+e);r(e+"side",n);for(var u=new Array(a),s=l[0],f=(l[1]-s)/(a-i),v=f*(1-i),g=0;g{"use strict";RP.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 FP=pe((ode,PP)=>{"use strict";var DP=rt(),Aae=Er(),kae=ir(),Sae=gt(),Cae=c3();PP.exports=function(e,r,t,n){var a="error_"+n.axis,o=Sae.newContainer(r,a),i=e[a]||{};function l(y,w){return kae.coerce(i,o,Cae,y,w)}var u=i.array!==void 0||i.value!==void 0||i.type==="sqrt",s=l("visible",u);if(s!==!1){var f=l("type","array"in i?"data":"percent"),v=!0;f!=="sqrt"&&(v=l("symmetric",!((f==="data"?"arrayminus":"valueminus")in i))),f==="data"?(l("array"),l("traceref"),v||(l("arrayminus"),l("tracerefminus"))):(f==="percent"||f==="constant")&&(l("value"),v||l("valueminus"));var g="copy_"+n.inherit+"style";if(n.inherit){var _=r["error_"+n.inherit];(_||{}).visible&&l(g,!(i.color||DP(i.thickness)||DP(i.width)))}(!n.inherit||!o[g])&&(l("color",t),l("thickness"),l("width",Aae.traceIs(r,"gl3d")?0:4))}}});var v3=pe((lde,NP)=>{"use strict";NP.exports=function(r){var t=r.type,n=r.symmetric;if(t==="data"){var a=r.array||[];if(n)return function(s,f){var v=+a[f];return[v,v]};var o=r.arrayminus||[];return function(s,f){var v=+a[f],g=+o[f];return!isNaN(v)||!isNaN(g)?[g||0,v||0]:[NaN,NaN]}}else{var i=IP(t,r.value),l=IP(t,r.valueminus);return n||r.valueminus===void 0?function(s){var f=i(s);return[f,f]}:function(s){return[l(s),i(s)]}}};function IP(e,r){if(e==="percent")return function(t){return Math.abs(t*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(t){return Math.sqrt(Math.abs(t))}}});var OP=pe((sde,qP)=>{"use strict";var h3=rt(),Eae=Er(),d3=St(),Lae=ir(),Rae=v3();qP.exports=function(r){for(var t=r.calcdata,n=0;n{"use strict";var BP=it(),tl=rt(),Dae=yt(),Pae=oa();UP.exports=function(r,t,n,a){var o,i=n.xaxis,l=n.yaxis,u=a&&a.duration>0,s=r._context.staticPlot;t.each(function(f){var v=f[0].trace,g=v.error_x||{},_=v.error_y||{},y;v.ids&&(y=function(k){return k.id});var w=Pae.hasMarkers(v)&&v.marker.maxdisplayed>0;!_.visible&&!g.visible&&(f=[]);var M=BP.select(this).selectAll("g.errorbar").data(f,y);if(M.exit().remove(),!!f.length){g.visible||M.selectAll("path.xerror").remove(),_.visible||M.selectAll("path.yerror").remove(),M.style("opacity",1);var m=M.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(a.duration).style("opacity",1),Dae.setClipUrl(M,n.layerClipId,r),M.each(function(k){var S=BP.select(this),x=Fae(k,i,l);if(!(w&&!k.vis)){var T,d=S.select("path.yerror");if(_.visible&&tl(x.x)&&tl(x.yh)&&tl(x.ys)){var b=_.width;T="M"+(x.x-b)+","+x.yh+"h"+2*b+"m-"+b+",0V"+x.ys,x.noYS||(T+="m-"+b+",0h"+2*b),o=!d.size(),o?d=S.append("path").style("vector-effect",s?"none":"non-scaling-stroke").classed("yerror",!0):u&&(d=d.transition().duration(a.duration).ease(a.easing)),d.attr("d",T)}else d.remove();var p=S.select("path.xerror");if(g.visible&&tl(x.y)&&tl(x.xh)&&tl(x.xs)){var c=(g.copy_ystyle?_:g).width;T="M"+x.xh+","+(x.y-c)+"v"+2*c+"m0,-"+c+"H"+x.xs,x.noXS||(T+="m0,-"+c+"v"+2*c),o=!p.size(),o?p=S.append("path").style("vector-effect",s?"none":"non-scaling-stroke").classed("xerror",!0):u&&(p=p.transition().duration(a.duration).ease(a.easing)),p.attr("d",T)}else p.remove()}})}})};function Fae(e,r,t){var n={x:r.c2p(e.x),y:t.c2p(e.y)};return e.yh!==void 0&&(n.yh=t.c2p(e.yh),n.ys=t.c2p(e.ys),tl(n.ys)||(n.noYS=!0,n.ys=t.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=r.c2p(e.xh),n.xs=r.c2p(e.xs),tl(n.xs)||(n.noXS=!0,n.xs=r.c2p(e.xs,!0))),n}});var YP=pe((fde,GP)=>{"use strict";var Iae=it(),VP=Zr();GP.exports=function(r){r.each(function(t){var n=t[0].trace,a=n.error_y||{},o=n.error_x||{},i=Iae.select(this);i.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(VP.stroke,a.color),o.copy_ystyle&&(o=a),i.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(VP.stroke,o.color)})}});var ZP=pe((cde,XP)=>{"use strict";var D0=ir(),WP=zn().overrideAll,P0=c3(),us={error_x:D0.extendFlat({},P0),error_y:D0.extendFlat({},P0)};delete us.error_x.copy_zstyle;delete us.error_y.copy_zstyle;delete us.error_y.copy_ystyle;var F0={error_x:D0.extendFlat({},P0),error_y:D0.extendFlat({},P0),error_z:D0.extendFlat({},P0)};delete F0.error_x.copy_ystyle;delete F0.error_y.copy_ystyle;delete F0.error_z.copy_ystyle;delete F0.error_z.copy_zstyle;XP.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:us,bar:us,histogram:us,scatter3d:WP(F0,"calc","nested"),scattergl:WP(us,"calc","nested")}},supplyDefaults:FP(),calc:OP(),makeComputeError:v3(),plot:HP(),style:YP(),hoverInfo:Nae};function Nae(e,r,t){(r.error_y||{}).visible&&(t.yerr=e.yh-e.y,r.error_y.symmetric||(t.yerrneg=e.y-e.ys)),(r.error_x||{}).visible&&(t.xerr=e.xh-e.x,r.error_x.symmetric||(t.xerrneg=e.x-e.xs))}});var KP=pe((vde,JP)=>{"use strict";JP.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 nF=pe((hde,tF)=>{"use strict";var nl=it(),p3=ka(),rd=ln(),QP=Er(),vo=St(),ed=ti(),Ga=ir(),pi=Ga.strTranslate,rF=Mt().extendFlat,g3=Vo(),di=yt(),y3=Zr(),zae=Sf(),qae=Yn(),Oae=Si().flipScale,Bae=T1(),Uae=Am(),Hae=Ra(),m3=qn(),$P=m3.LINE_SPACING,jP=m3.FROM_TL,eF=m3.FROM_BR,Et=KP().cn;function Vae(e){var r=e._fullLayout,t=r._infolayer.selectAll("g."+Et.colorbar).data(Gae(e),function(n){return n._id});t.enter().append("g").attr("class",function(n){return n._id}).classed(Et.colorbar,!0),t.each(function(n){var a=nl.select(this);Ga.ensureSingle(a,"rect",Et.cbbg),Ga.ensureSingle(a,"g",Et.cbfills),Ga.ensureSingle(a,"g",Et.cblines),Ga.ensureSingle(a,"g",Et.cbaxis,function(i){i.classed(Et.crisp,!0)}),Ga.ensureSingle(a,"g",Et.cbtitleunshift,function(i){i.append("g").classed(Et.cbtitle,!0)}),Ga.ensureSingle(a,"rect",Et.cboutline);var o=Yae(a,n,e);o&&o.then&&(e._promises||[]).push(o),e._context.edits.colorbarPosition&&Wae(a,n,e)}),t.exit().each(function(n){rd.autoMargin(e,n._id)}).remove(),t.order()}function Gae(e){var r=e._fullLayout,t=e.calcdata,n=[],a,o,i,l;function u(S){return rF(S,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function s(){typeof l.calc=="function"?l.calc(e,i,a):(a._fillgradient=o.reversescale?Oae(o.colorscale):o.colorscale,a._zrange=[o[l.min],o[l.max]])}for(var f=0;f1){var re=Math.pow(10,Math.floor(Math.log(G)/Math.LN10));oe*=re*Ga.roundUp(G/re,[2,5,10]),(Math.abs(R.start)/R.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=oe}ne.domain=n?[q+y/x.h,q+P-y/x.h]:[q+_/x.w,q+P-_/x.w],ne.setScale(),e.attr("transform",pi(Math.round(x.l),Math.round(x.t)));var H=e.select("."+Et.cbtitleunshift).attr("transform",pi(-Math.round(x.l),-Math.round(x.t))),te=ne.ticklabelposition,ue=ne.title.font.size,de=e.select("."+Et.cbaxis),Ee,Me=0,ve=0;function Ae(Ue,ge){var Te={propContainer:ne,propName:r._propPrefix+"title",traceIndex:r._traceIndex,_meta:r._meta,placeholder:S._dfltTitle.colorbar,containerGroup:e.select("."+Et.cbtitle)},ce=Ue.charAt(0)==="h"?Ue.substr(1):"h"+Ue;e.selectAll("."+ce+",."+ce+"-math-group").remove(),zae.draw(t,Ue,rF(Te,ge||{}))}function ke(){if(n&&Q||!n&&!Q){var Ue,ge;p==="top"&&(Ue=_+x.l+O*w,ge=y+x.t+U*(1-q-P)+3+ue*.75),p==="bottom"&&(Ue=_+x.l+O*w,ge=y+x.t+U*(1-q)-3-ue*.25),p==="right"&&(ge=y+x.t+U*M+3+ue*.75,Ue=_+x.l+O*q),Ae(ne._id+"title",{attributes:{x:Ue,y:ge,"text-anchor":n?"start":"middle"}})}}function De(){if(n&&!Q||!n&&Q){var Ue=ne.position||0,ge=ne._offset+ne._length/2,Te,ce;if(p==="right")ce=ge,Te=x.l+O*Ue+10+ue*(ne.showticklabels?1:.5);else if(Te=ge,p==="bottom"&&(ce=x.t+U*Ue+10+(te.indexOf("inside")===-1?ne.tickfont.size:0)+(ne.ticks!=="intside"&&r.ticklen||0)),p==="top"){var ye=b.text.split("
").length;ce=x.t+U*Ue+10-I-$P*ue*ye}Ae((n?"h":"v")+ne._id+"title",{avoid:{selection:nl.select(t).selectAll("g."+ne._id+"tick"),side:p,offsetTop:n?0:x.t,offsetLeft:n?x.l:0,maxShift:n?S.width:S.height},attributes:{x:Te,y:ce,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Ce(){if(!n&&!Q||n&&Q){var Ue=e.select("."+Et.cbtitle),ge=Ue.select("text"),Te=[-u/2,u/2],ce=Ue.select(".h"+ne._id+"title-math-group").node(),ye=15.6;ge.node()&&(ye=parseInt(ge.node().style.fontSize,10)*$P);var Le;if(ce?(Le=di.bBox(ce),ve=Le.width,Me=Le.height,Me>ye&&(Te[1]-=(Me-ye)/2)):ge.node()&&!ge.classed(Et.jsPlaceholder)&&(Le=di.bBox(ge.node()),ve=Le.width,Me=Le.height),n){if(Me){if(Me+=5,p==="top")ne.domain[1]-=Me/x.h,Te[1]*=-1;else{ne.domain[0]+=Me/x.h;var me=qae.lineCount(ge);Te[1]+=(1-me)*ye}Ue.attr("transform",pi(Te[0],Te[1])),ne.setScale()}}else ve&&(p==="right"&&(ne.domain[0]+=(ve+ue/2)/x.w),Ue.attr("transform",pi(Te[0],Te[1])),ne.setScale())}e.selectAll("."+Et.cbfills+",."+Et.cblines).attr("transform",n?pi(0,Math.round(x.h*(1-ne.domain[1]))):pi(Math.round(x.w*ne.domain[0]),0)),de.attr("transform",n?pi(0,Math.round(-x.t)):pi(Math.round(-x.l),0));var he=e.select("."+Et.cbfills).selectAll("rect."+Et.cbfill).attr("style","").data(D);he.enter().append("rect").classed(Et.cbfill,!0).attr("style",""),he.exit().remove();var be=c.map(ne.c2p).map(Math.round).sort(function(Ye,Ge){return Ye-Ge});he.each(function(Ye,Ge){var We=[Ge===0?c[0]:(D[Ge]+D[Ge-1])/2,Ge===D.length-1?c[1]:(D[Ge]+D[Ge+1])/2].map(ne.c2p).map(Math.round);n&&(We[1]=Ga.constrain(We[1]+(We[1]>We[0])?1:-1,be[0],be[1]));var we=nl.select(this).attr(n?"x":"y",X).attr(n?"y":"x",nl.min(We)).attr(n?"width":"height",Math.max(I,2)).attr(n?"height":"width",Math.max(nl.max(We)-nl.min(We),2));if(r._fillgradient)di.gradient(we,t,r._id,n?"vertical":"horizontalreversed",r._fillgradient,"fill");else{var Pe=h(Ye).replace("e-","");we.attr("fill",p3(Pe).toHexString())}});var Se=e.select("."+Et.cblines).selectAll("path."+Et.cbline).data(d.color&&d.width?N:[]);Se.enter().append("path").classed(Et.cbline,!0),Se.exit().remove(),Se.each(function(Ye){var Ge=X,We=Math.round(ne.c2p(Ye))+d.width/2%1;nl.select(this).attr("d","M"+(n?Ge+","+We:We+","+Ge)+(n?"h":"v")+I).call(di.lineGroupStyle,d.width,A(Ye),d.dash)}),de.selectAll("g."+ne._id+"tick,path").remove();var ze=X+I+(u||0)/2-(r.ticks==="outside"?1:0),Fe=vo.calcTicks(ne),Je=vo.getTickSigns(ne)[2];return vo.drawTicks(t,ne,{vals:ne.ticks==="inside"?vo.clipEnds(ne,Fe):Fe,layer:de,path:vo.makeTickPath(ne,ze,Je),transFn:vo.makeTransTickFn(ne)}),vo.drawLabels(t,ne,{vals:Fe,layer:de,transFn:vo.makeTransTickLabelFn(ne),labelFns:vo.makeLabelFns(ne,ze)})}function Oe(){var Ue,ge=I+u/2;te.indexOf("inside")===-1&&(Ue=di.bBox(de.node()),ge+=n?Ue.width:Ue.height),Ee=H.select("text");var Te=0,ce=n&&p==="top",ye=!n&&p==="right",Le=0;if(Ee.node()&&!Ee.classed(Et.jsPlaceholder)){var me,he=H.select(".h"+ne._id+"title-math-group").node();he&&(n&&Q||!n&&!Q)?(Ue=di.bBox(he),Te=Ue.width,me=Ue.height):(Ue=di.bBox(H.node()),Te=Ue.right-x.l-(n?X:Z),me=Ue.bottom-x.t-(n?Z:X),!n&&p==="top"&&(ge+=Ue.height,Le=Ue.height)),ye&&(Ee.attr("transform",pi(Te/2+ue/2,0)),Te*=2),ge=Math.max(ge,n?Te:me)}var be=(n?_:y)*2+ge+s+u/2,Se=0;!n&&b.text&&g==="bottom"&&M<=0&&(Se=be/2,be+=Se,Le+=Se),S._hColorbarMoveTitle=Se,S._hColorbarMoveCBTitle=Le;var ze=s+u,Fe=(n?X:Z)-ze/2-(n?_:0),Je=(n?Z:X)-(n?L:y+Le-Se);e.select("."+Et.cbbg).attr("x",Fe).attr("y",Je).attr(n?"width":"height",Math.max(be-Se,2)).attr(n?"height":"width",Math.max(L+ze,2)).call(y3.fill,f).call(y3.stroke,r.bordercolor).style("stroke-width",s);var Ye=ye?Math.max(Te-10,0):0;e.selectAll("."+Et.cboutline).attr("x",(n?X:Z+_)+Ye).attr("y",(n?Z+y-L:X)+(ce?Me:0)).attr(n?"width":"height",Math.max(I,2)).attr(n?"height":"width",Math.max(L-(n?2*y+Me:2*_+Ye),2)).call(y3.stroke,r.outlinecolor).style({fill:"none","stroke-width":u});var Ge=n?j*be:0,We=n?0:(1-$)*be-Le;if(Ge=k?x.l-Ge:-Ge,We=m?x.t-We:-We,e.attr("transform",pi(Ge,We)),!n&&(s||p3(f).getAlpha()&&!p3.equals(S.paper_bgcolor,f))){var we=de.selectAll("text"),Pe=we[0].length,Qe=e.select("."+Et.cbbg).node(),Ve=di.bBox(Qe),ar=di.getTranslate(e),se=2;we.each(function(Tr,Ar){var ft=0,Yr=Pe-1;if(Ar===ft||Ar===Yr){var mr=di.bBox(this),ct=di.getTranslate(this),Sr;if(Ar===Yr){var Ur=mr.right+ct.x,bt=Ve.right+ar.x+Z-s-se+w;Sr=bt-Ur,Sr>0&&(Sr=0)}else if(Ar===ft){var zr=mr.left+ct.x,Hr=Ve.left+ar.x+Z+s+se;Sr=Hr-zr,Sr<0&&(Sr=0)}Sr&&(Pe<3?this.setAttribute("transform","translate("+Sr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var K={},ae=jP[v],Re=eF[v],Be=jP[g],je=eF[g],nr=be-I;n?(o==="pixels"?(K.y=M,K.t=L*Be,K.b=L*je):(K.t=K.b=0,K.yt=M+a*Be,K.yb=M-a*je),l==="pixels"?(K.x=w,K.l=be*ae,K.r=be*Re):(K.l=nr*ae,K.r=nr*Re,K.xl=w-i*ae,K.xr=w+i*Re)):(o==="pixels"?(K.x=w,K.l=L*ae,K.r=L*Re):(K.l=K.r=0,K.xl=w+a*ae,K.xr=w-a*Re),l==="pixels"?(K.y=1-M,K.t=be*Be,K.b=be*je):(K.t=nr*Be,K.b=nr*je,K.yt=M-i*Be,K.yb=M+i*je));var hr=r.y<.5?"b":"t",wr=r.x<.5?"l":"r";t._fullLayout._reservedMargin[r._id]={};var Cr={r:S.width-Fe-Ge,l:Fe+K.r,b:S.height-Je-We,t:Je+K.b};k&&m?rd.autoMargin(t,r._id,K):k?t._fullLayout._reservedMargin[r._id][hr]=Cr[hr]:m||n?t._fullLayout._reservedMargin[r._id][wr]=Cr[wr]:t._fullLayout._reservedMargin[r._id][hr]=Cr[hr]}return Ga.syncOrAsync([rd.previousPromises,ke,Ce,De,rd.previousPromises,Oe],t)}function Wae(e,r,t){var n=r.orientation==="v",a=t._fullLayout,o=a._size,i,l,u;ed.init({element:e.node(),gd:t,prepFn:function(){i=e.attr("transform"),g3(e)},moveFn:function(s,f){e.attr("transform",i+pi(s,f)),l=ed.align((n?r._uFrac:r._vFrac)+s/o.w,n?r._thickFrac:r._lenFrac,0,1,r.xanchor),u=ed.align((n?r._vFrac:1-r._uFrac)-f/o.h,n?r._lenFrac:r._thickFrac,0,1,r.yanchor);var v=ed.getCursor(l,u,r.xanchor,r.yanchor);g3(e,v)},doneFn:function(){if(g3(e),l!==void 0&&u!==void 0){var s={};s[r._propPrefix+"x"]=l,s[r._propPrefix+"y"]=u,r._traceIndex!==void 0?QP.call("_guiRestyle",t,s,r._traceIndex):QP.call("_guiRelayout",t,s)}}})}function Xae(e,r,t){var n=r._levels,a=[],o=[],i,l,u=n.end+n.size/100,s=n.size,f=1.001*t[0]-.001*t[1],v=1.001*t[1]-.001*t[0];for(l=0;l<1e5&&(i=n.start+l*s,!(s>0?i>=u:i<=u));l++)i>f&&i0?i>=u:i<=u));l++)i>t[0]&&i{"use strict";aF.exports={moduleType:"component",name:"colorbar",attributes:pv(),supplyDefaults:wg(),draw:nF().draw,hasColorbar:cg()}});var lF=pe((pde,oF)=>{"use strict";oF.exports={moduleType:"component",name:"legend",layoutAttributes:m2(),supplyLayoutDefaults:_2(),draw:F2(),style:L2()}});var uF=pe((gde,sF)=>{"use strict";sF.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 cF=pe((yde,fF)=>{"use strict";fF.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var b3=pe((mde,pF)=>{"use strict";var Jae=Er(),dF=ir(),x3=dF.extendFlat,vF=dF.extendDeep;function hF(e){var r;switch(e){case"themes__thumb":r={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":r={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:r={}}return r}function Kae(e){var r=["xaxis","yaxis","zaxis"];return r.indexOf(e.slice(0,5))>-1}pF.exports=function(r,t){var n,a=r.data,o=r.layout,i=vF([],a),l=vF({},o,hF(t.tileClass)),u=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var s=Object.keys(l);for(n=0;n{"use strict";var Qae=tv().EventEmitter,$ae=Er(),jae=ir(),gF=jl(),eie=b3(),rie=s1(),tie=u1();function nie(e,r){var t=new Qae,n=eie(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function o(){var l=gF.getDelay(a._fullLayout);setTimeout(function(){var u=rie(a),s=document.createElement("canvas");s.id=jae.randstr(),t=tie({format:r.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:s,emitter:t,svg:u}),t.clean=function(){a&&document.body.removeChild(a)}},l)}var i=gF.getRedrawFunc(a);return $ae.call("_doPlot",a,n.data,n.layout,n.config).then(i).then(o).catch(function(l){t.emit("error",l)}),t}yF.exports=nie});var _F=pe((bde,bF)=>{"use strict";var xF=jl(),aie={getDelay:xF.getDelay,getRedrawFunc:xF.getRedrawFunc,clone:b3(),toSVG:s1(),svgToImg:u1(),toImage:mF(),downloadImage:Qy()};bF.exports=aie});var MF=pe(ho=>{"use strict";ho.version=pc().version;cb();rw();var iie=Er(),I0=ho.register=iie.register,w3=AC(),wF=Object.keys(w3);for(td=0;td{"use strict";TF.exports=MF()});var pn=pe((Mde,kF)=>{(function(){var e={1964:function(a,o,i){a.exports={alpha_shape:i(3502),convex_hull:i(7352),delaunay_triangulate:i(7642),gl_cone3d:i(6405),gl_error3d:i(9165),gl_line3d:i(5714),gl_mesh3d:i(7201),gl_plot3d:i(4100),gl_scatter3d:i(8418),gl_streamtube3d:i(7815),gl_surface3d:i(9499),ndarray:i(9618),ndarray_linear_interpolate:i(4317)}},4793:function(a,o,i){"use strict";var l;function u(se,K){if(!(se instanceof K))throw new TypeError("Cannot call a class as a function")}function s(se,K){for(var ae=0;aep)throw new RangeError('The value "'+se+'" is invalid for option "size"');var K=new Uint8Array(se);return Object.setPrototypeOf(K,h.prototype),K}function h(se,K,ae){if(typeof se=="number"){if(typeof K=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(se)}return R(se,K,ae)}h.poolSize=8192;function R(se,K,ae){if(typeof se=="string")return I(se,K);if(ArrayBuffer.isView(se))return L(se);if(se==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+x(se));if(we(se,ArrayBuffer)||se&&we(se.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(we(se,SharedArrayBuffer)||se&&we(se.buffer,SharedArrayBuffer)))return P(se,K,ae);if(typeof se=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Re=se.valueOf&&se.valueOf();if(Re!=null&&Re!==se)return h.from(Re,K,ae);var Be=O(se);if(Be)return Be;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof se[Symbol.toPrimitive]=="function")return h.from(se[Symbol.toPrimitive]("string"),K,ae);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+x(se))}h.from=function(se,K,ae){return R(se,K,ae)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function E(se){if(typeof se!="number")throw new TypeError('"size" argument must be of type number');if(se<0)throw new RangeError('The value "'+se+'" is invalid for option "size"')}function D(se,K,ae){return E(se),se<=0?A(se):K!==void 0?typeof ae=="string"?A(se).fill(K,ae):A(se).fill(K):A(se)}h.alloc=function(se,K,ae){return D(se,K,ae)};function N(se){return E(se),A(se<0?0:U(se)|0)}h.allocUnsafe=function(se){return N(se)},h.allocUnsafeSlow=function(se){return N(se)};function I(se,K){if((typeof K!="string"||K==="")&&(K="utf8"),!h.isEncoding(K))throw new TypeError("Unknown encoding: "+K);var ae=j(se,K)|0,Re=A(ae),Be=Re.write(se,K);return Be!==ae&&(Re=Re.slice(0,Be)),Re}function F(se){for(var K=se.length<0?0:U(se.length)|0,ae=A(K),Re=0;Re=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return se|0}function X(se){return+se!=se&&(se=0),h.alloc(+se)}h.isBuffer=function(K){return K!=null&&K._isBuffer===!0&&K!==h.prototype},h.compare=function(K,ae){if(we(K,Uint8Array)&&(K=h.from(K,K.offset,K.byteLength)),we(ae,Uint8Array)&&(ae=h.from(ae,ae.offset,ae.byteLength)),!h.isBuffer(K)||!h.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(K===ae)return 0;for(var Re=K.length,Be=ae.length,je=0,nr=Math.min(Re,Be);jeBe.length?(h.isBuffer(nr)||(nr=h.from(nr)),nr.copy(Be,je)):Uint8Array.prototype.set.call(Be,nr,je);else if(h.isBuffer(nr))nr.copy(Be,je);else throw new TypeError('"list" argument must be an Array of Buffers');je+=nr.length}return Be};function j(se,K){if(h.isBuffer(se))return se.length;if(ArrayBuffer.isView(se)||we(se,ArrayBuffer))return se.byteLength;if(typeof se!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+x(se));var ae=se.length,Re=arguments.length>2&&arguments[2]===!0;if(!Re&&ae===0)return 0;for(var Be=!1;;)switch(K){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":return Fe(se).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>1;case"base64":return Ge(se).length;default:if(Be)return Re?-1:Fe(se).length;K=(""+K).toLowerCase(),Be=!0}}h.byteLength=j;function $(se,K,ae){var Re=!1;if((K===void 0||K<0)&&(K=0),K>this.length||((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)||(ae>>>=0,K>>>=0,ae<=K))return"";for(se||(se="utf8");;)switch(se){case"hex":return Me(this,K,ae);case"utf8":case"utf-8":return H(this,K,ae);case"ascii":return de(this,K,ae);case"latin1":case"binary":return Ee(this,K,ae);case"base64":return re(this,K,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,K,ae);default:if(Re)throw new TypeError("Unknown encoding: "+se);se=(se+"").toLowerCase(),Re=!0}}h.prototype._isBuffer=!0;function Y(se,K,ae){var Re=se[K];se[K]=se[ae],se[ae]=Re}h.prototype.swap16=function(){var K=this.length;if(K%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ae=0;aeae&&(K+=" ... "),""},b&&(h.prototype[b]=h.prototype.inspect),h.prototype.compare=function(K,ae,Re,Be,je){if(we(K,Uint8Array)&&(K=h.from(K,K.offset,K.byteLength)),!h.isBuffer(K))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+x(K));if(ae===void 0&&(ae=0),Re===void 0&&(Re=K?K.length:0),Be===void 0&&(Be=0),je===void 0&&(je=this.length),ae<0||Re>K.length||Be<0||je>this.length)throw new RangeError("out of range index");if(Be>=je&&ae>=Re)return 0;if(Be>=je)return-1;if(ae>=Re)return 1;if(ae>>>=0,Re>>>=0,Be>>>=0,je>>>=0,this===K)return 0;for(var nr=je-Be,hr=Re-ae,wr=Math.min(nr,hr),Cr=this.slice(Be,je),Tr=K.slice(ae,Re),Ar=0;Ar2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,Pe(ae)&&(ae=Be?0:se.length-1),ae<0&&(ae=se.length+ae),ae>=se.length){if(Be)return-1;ae=se.length-1}else if(ae<0)if(Be)ae=0;else return-1;if(typeof K=="string"&&(K=h.from(K,Re)),h.isBuffer(K))return K.length===0?-1:Z(se,K,ae,Re,Be);if(typeof K=="number")return K=K&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(se,K,ae):Uint8Array.prototype.lastIndexOf.call(se,K,ae):Z(se,[K],ae,Re,Be);throw new TypeError("val must be string, number or Buffer")}function Z(se,K,ae,Re,Be){var je=1,nr=se.length,hr=K.length;if(Re!==void 0&&(Re=String(Re).toLowerCase(),Re==="ucs2"||Re==="ucs-2"||Re==="utf16le"||Re==="utf-16le")){if(se.length<2||K.length<2)return-1;je=2,nr/=2,hr/=2,ae/=2}function wr(Yr,mr){return je===1?Yr[mr]:Yr.readUInt16BE(mr*je)}var Cr;if(Be){var Tr=-1;for(Cr=ae;Crnr&&(ae=nr-hr),Cr=ae;Cr>=0;Cr--){for(var Ar=!0,ft=0;ftBe&&(Re=Be)):Re=Be;var je=K.length;Re>je/2&&(Re=je/2);var nr;for(nr=0;nr>>0,isFinite(Re)?(Re=Re>>>0,Be===void 0&&(Be="utf8")):(Be=Re,Re=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var je=this.length-ae;if((Re===void 0||Re>je)&&(Re=je),K.length>0&&(Re<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");for(var nr=!1;;)switch(Be){case"hex":return ne(this,K,ae,Re);case"utf8":case"utf-8":return Q(this,K,ae,Re);case"ascii":case"latin1":case"binary":return oe(this,K,ae,Re);case"base64":return ee(this,K,ae,Re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,K,ae,Re);default:if(nr)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),nr=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(se,K,ae){return K===0&&ae===se.length?T.fromByteArray(se):T.fromByteArray(se.slice(K,ae))}function H(se,K,ae){ae=Math.min(se.length,ae);for(var Re=[],Be=K;Be239?4:je>223?3:je>191?2:1;if(Be+hr<=ae){var wr=void 0,Cr=void 0,Tr=void 0,Ar=void 0;switch(hr){case 1:je<128&&(nr=je);break;case 2:wr=se[Be+1],(wr&192)===128&&(Ar=(je&31)<<6|wr&63,Ar>127&&(nr=Ar));break;case 3:wr=se[Be+1],Cr=se[Be+2],(wr&192)===128&&(Cr&192)===128&&(Ar=(je&15)<<12|(wr&63)<<6|Cr&63,Ar>2047&&(Ar<55296||Ar>57343)&&(nr=Ar));break;case 4:wr=se[Be+1],Cr=se[Be+2],Tr=se[Be+3],(wr&192)===128&&(Cr&192)===128&&(Tr&192)===128&&(Ar=(je&15)<<18|(wr&63)<<12|(Cr&63)<<6|Tr&63,Ar>65535&&Ar<1114112&&(nr=Ar))}}nr===null?(nr=65533,hr=1):nr>65535&&(nr-=65536,Re.push(nr>>>10&1023|55296),nr=56320|nr&1023),Re.push(nr),Be+=hr}return ue(Re)}var te=4096;function ue(se){var K=se.length;if(K<=te)return String.fromCharCode.apply(String,se);for(var ae="",Re=0;ReRe)&&(ae=Re);for(var Be="",je=K;jeRe&&(K=Re),ae<0?(ae+=Re,ae<0&&(ae=0)):ae>Re&&(ae=Re),aeae)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(K,ae,Re){K=K>>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=this[K],je=1,nr=0;++nr>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=this[K+--ae],je=1;ae>0&&(je*=256);)Be+=this[K+--ae]*je;return Be},h.prototype.readUint8=h.prototype.readUInt8=function(K,ae){return K=K>>>0,ae||Ae(K,1,this.length),this[K]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(K,ae){return K=K>>>0,ae||Ae(K,2,this.length),this[K]|this[K+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(K,ae){return K=K>>>0,ae||Ae(K,2,this.length),this[K]<<8|this[K+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),(this[K]|this[K+1]<<8|this[K+2]<<16)+this[K+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),this[K]*16777216+(this[K+1]<<16|this[K+2]<<8|this[K+3])},h.prototype.readBigUInt64LE=Ve(function(K){K=K>>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=ae+this[++K]*Math.pow(2,8)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,24),je=this[++K]+this[++K]*Math.pow(2,8)+this[++K]*Math.pow(2,16)+Re*Math.pow(2,24);return BigInt(Be)+(BigInt(je)<>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=ae*Math.pow(2,24)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,8)+this[++K],je=this[++K]*Math.pow(2,24)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,8)+Re;return(BigInt(Be)<>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=this[K],je=1,nr=0;++nr=je&&(Be-=Math.pow(2,8*ae)),Be},h.prototype.readIntBE=function(K,ae,Re){K=K>>>0,ae=ae>>>0,Re||Ae(K,ae,this.length);for(var Be=ae,je=1,nr=this[K+--Be];Be>0&&(je*=256);)nr+=this[K+--Be]*je;return je*=128,nr>=je&&(nr-=Math.pow(2,8*ae)),nr},h.prototype.readInt8=function(K,ae){return K=K>>>0,ae||Ae(K,1,this.length),this[K]&128?(255-this[K]+1)*-1:this[K]},h.prototype.readInt16LE=function(K,ae){K=K>>>0,ae||Ae(K,2,this.length);var Re=this[K]|this[K+1]<<8;return Re&32768?Re|4294901760:Re},h.prototype.readInt16BE=function(K,ae){K=K>>>0,ae||Ae(K,2,this.length);var Re=this[K+1]|this[K]<<8;return Re&32768?Re|4294901760:Re},h.prototype.readInt32LE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),this[K]|this[K+1]<<8|this[K+2]<<16|this[K+3]<<24},h.prototype.readInt32BE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),this[K]<<24|this[K+1]<<16|this[K+2]<<8|this[K+3]},h.prototype.readBigInt64LE=Ve(function(K){K=K>>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=this[K+4]+this[K+5]*Math.pow(2,8)+this[K+6]*Math.pow(2,16)+(Re<<24);return(BigInt(Be)<>>0,he(K,"offset");var ae=this[K],Re=this[K+7];(ae===void 0||Re===void 0)&&be(K,this.length-8);var Be=(ae<<24)+this[++K]*Math.pow(2,16)+this[++K]*Math.pow(2,8)+this[++K];return(BigInt(Be)<>>0,ae||Ae(K,4,this.length),d.read(this,K,!0,23,4)},h.prototype.readFloatBE=function(K,ae){return K=K>>>0,ae||Ae(K,4,this.length),d.read(this,K,!1,23,4)},h.prototype.readDoubleLE=function(K,ae){return K=K>>>0,ae||Ae(K,8,this.length),d.read(this,K,!0,52,8)},h.prototype.readDoubleBE=function(K,ae){return K=K>>>0,ae||Ae(K,8,this.length),d.read(this,K,!1,52,8)};function ke(se,K,ae,Re,Be,je){if(!h.isBuffer(se))throw new TypeError('"buffer" argument must be a Buffer instance');if(K>Be||Kse.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(K,ae,Re,Be){if(K=+K,ae=ae>>>0,Re=Re>>>0,!Be){var je=Math.pow(2,8*Re)-1;ke(this,K,ae,Re,je,0)}var nr=1,hr=0;for(this[ae]=K&255;++hr>>0,Re=Re>>>0,!Be){var je=Math.pow(2,8*Re)-1;ke(this,K,ae,Re,je,0)}var nr=Re-1,hr=1;for(this[ae+nr]=K&255;--nr>=0&&(hr*=256);)this[ae+nr]=K/hr&255;return ae+Re},h.prototype.writeUint8=h.prototype.writeUInt8=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,1,255,0),this[ae]=K&255,ae+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,65535,0),this[ae]=K&255,this[ae+1]=K>>>8,ae+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,65535,0),this[ae]=K>>>8,this[ae+1]=K&255,ae+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,4294967295,0),this[ae+3]=K>>>24,this[ae+2]=K>>>16,this[ae+1]=K>>>8,this[ae]=K&255,ae+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,4294967295,0),this[ae]=K>>>24,this[ae+1]=K>>>16,this[ae+2]=K>>>8,this[ae+3]=K&255,ae+4};function De(se,K,ae,Re,Be){me(K,Re,Be,se,ae,7);var je=Number(K&BigInt(4294967295));se[ae++]=je,je=je>>8,se[ae++]=je,je=je>>8,se[ae++]=je,je=je>>8,se[ae++]=je;var nr=Number(K>>BigInt(32)&BigInt(4294967295));return se[ae++]=nr,nr=nr>>8,se[ae++]=nr,nr=nr>>8,se[ae++]=nr,nr=nr>>8,se[ae++]=nr,ae}function Ce(se,K,ae,Re,Be){me(K,Re,Be,se,ae,7);var je=Number(K&BigInt(4294967295));se[ae+7]=je,je=je>>8,se[ae+6]=je,je=je>>8,se[ae+5]=je,je=je>>8,se[ae+4]=je;var nr=Number(K>>BigInt(32)&BigInt(4294967295));return se[ae+3]=nr,nr=nr>>8,se[ae+2]=nr,nr=nr>>8,se[ae+1]=nr,nr=nr>>8,se[ae]=nr,ae+8}h.prototype.writeBigUInt64LE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return De(this,K,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ce(this,K,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(K,ae,Re,Be){if(K=+K,ae=ae>>>0,!Be){var je=Math.pow(2,8*Re-1);ke(this,K,ae,Re,je-1,-je)}var nr=0,hr=1,wr=0;for(this[ae]=K&255;++nr>0)-wr&255;return ae+Re},h.prototype.writeIntBE=function(K,ae,Re,Be){if(K=+K,ae=ae>>>0,!Be){var je=Math.pow(2,8*Re-1);ke(this,K,ae,Re,je-1,-je)}var nr=Re-1,hr=1,wr=0;for(this[ae+nr]=K&255;--nr>=0&&(hr*=256);)K<0&&wr===0&&this[ae+nr+1]!==0&&(wr=1),this[ae+nr]=(K/hr>>0)-wr&255;return ae+Re},h.prototype.writeInt8=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,1,127,-128),K<0&&(K=255+K+1),this[ae]=K&255,ae+1},h.prototype.writeInt16LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,32767,-32768),this[ae]=K&255,this[ae+1]=K>>>8,ae+2},h.prototype.writeInt16BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,2,32767,-32768),this[ae]=K>>>8,this[ae+1]=K&255,ae+2},h.prototype.writeInt32LE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,2147483647,-2147483648),this[ae]=K&255,this[ae+1]=K>>>8,this[ae+2]=K>>>16,this[ae+3]=K>>>24,ae+4},h.prototype.writeInt32BE=function(K,ae,Re){return K=+K,ae=ae>>>0,Re||ke(this,K,ae,4,2147483647,-2147483648),K<0&&(K=4294967295+K+1),this[ae]=K>>>24,this[ae+1]=K>>>16,this[ae+2]=K>>>8,this[ae+3]=K&255,ae+4},h.prototype.writeBigInt64LE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return De(this,K,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ve(function(K){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ce(this,K,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Oe(se,K,ae,Re,Be,je){if(ae+Re>se.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function Ue(se,K,ae,Re,Be){return K=+K,ae=ae>>>0,Be||Oe(se,K,ae,4,34028234663852886e22,-34028234663852886e22),d.write(se,K,ae,Re,23,4),ae+4}h.prototype.writeFloatLE=function(K,ae,Re){return Ue(this,K,ae,!0,Re)},h.prototype.writeFloatBE=function(K,ae,Re){return Ue(this,K,ae,!1,Re)};function ge(se,K,ae,Re,Be){return K=+K,ae=ae>>>0,Be||Oe(se,K,ae,8,17976931348623157e292,-17976931348623157e292),d.write(se,K,ae,Re,52,8),ae+8}h.prototype.writeDoubleLE=function(K,ae,Re){return ge(this,K,ae,!0,Re)},h.prototype.writeDoubleBE=function(K,ae,Re){return ge(this,K,ae,!1,Re)},h.prototype.copy=function(K,ae,Re,Be){if(!h.isBuffer(K))throw new TypeError("argument should be a Buffer");if(Re||(Re=0),!Be&&Be!==0&&(Be=this.length),ae>=K.length&&(ae=K.length),ae||(ae=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),K.length-ae>>0,Re=Re===void 0?this.length:Re>>>0,K||(K=0);var nr;if(typeof K=="number")for(nr=ae;nrMath.pow(2,32)?Be=ye(String(ae)):typeof ae=="bigint"&&(Be=String(ae),(ae>Math.pow(BigInt(2),BigInt(32))||ae<-Math.pow(BigInt(2),BigInt(32)))&&(Be=ye(Be)),Be+="n"),Re+=" It must be ".concat(K,". Received ").concat(Be),Re},RangeError);function ye(se){for(var K="",ae=se.length,Re=se[0]==="-"?1:0;ae>=Re+4;ae-=3)K="_".concat(se.slice(ae-3,ae)).concat(K);return"".concat(se.slice(0,ae)).concat(K)}function Le(se,K,ae){he(K,"offset"),(se[K]===void 0||se[K+ae]===void 0)&&be(K,se.length-(ae+1))}function me(se,K,ae,Re,Be,je){if(se>ae||se3?K===0||K===BigInt(0)?hr=">= 0".concat(nr," and < 2").concat(nr," ** ").concat((je+1)*8).concat(nr):hr=">= -(2".concat(nr," ** ").concat((je+1)*8-1).concat(nr,") and < 2 ** ")+"".concat((je+1)*8-1).concat(nr):hr=">= ".concat(K).concat(nr," and <= ").concat(ae).concat(nr),new Te.ERR_OUT_OF_RANGE("value",hr,se)}Le(Re,Be,je)}function he(se,K){if(typeof se!="number")throw new Te.ERR_INVALID_ARG_TYPE(K,"number",se)}function be(se,K,ae){throw Math.floor(se)!==se?(he(se,ae),new Te.ERR_OUT_OF_RANGE(ae||"offset","an integer",se)):K<0?new Te.ERR_BUFFER_OUT_OF_BOUNDS:new Te.ERR_OUT_OF_RANGE(ae||"offset",">= ".concat(ae?1:0," and <= ").concat(K),se)}var Se=/[^+/0-9A-Za-z-_]/g;function ze(se){if(se=se.split("=")[0],se=se.trim().replace(Se,""),se.length<2)return"";for(;se.length%4!==0;)se=se+"=";return se}function Fe(se,K){K=K||1/0;for(var ae,Re=se.length,Be=null,je=[],nr=0;nr55295&&ae<57344){if(!Be){if(ae>56319){(K-=3)>-1&&je.push(239,191,189);continue}else if(nr+1===Re){(K-=3)>-1&&je.push(239,191,189);continue}Be=ae;continue}if(ae<56320){(K-=3)>-1&&je.push(239,191,189),Be=ae;continue}ae=(Be-55296<<10|ae-56320)+65536}else Be&&(K-=3)>-1&&je.push(239,191,189);if(Be=null,ae<128){if((K-=1)<0)break;je.push(ae)}else if(ae<2048){if((K-=2)<0)break;je.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((K-=3)<0)break;je.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((K-=4)<0)break;je.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return je}function Je(se){for(var K=[],ae=0;ae>8,Be=ae%256,je.push(Be),je.push(Re);return je}function Ge(se){return T.toByteArray(ze(se))}function We(se,K,ae,Re){var Be;for(Be=0;Be=K.length||Be>=se.length);++Be)K[Be+ae]=se[Be];return Be}function we(se,K){return se instanceof K||se!=null&&se.constructor!=null&&se.constructor.name!=null&&se.constructor.name===K.name}function Pe(se){return se!==se}var Qe=function(){for(var se="0123456789abcdef",K=new Array(256),ae=0;ae<16;++ae)for(var Re=ae*16,Be=0;Be<16;++Be)K[Re+Be]=se[ae]+se[Be];return K}();function Ve(se){return typeof BigInt=="undefined"?ar:se}function ar(){throw new Error("BigInt not supported")}},9216:function(a){"use strict";a.exports=u,a.exports.isMobile=u,a.exports.default=u;var o=/(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,i=/CrOS/,l=/android|ipad|playbook|silk/i;function u(s){s||(s={});var f=s.ua;if(!f&&typeof navigator!="undefined"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var v=o.test(f)&&!i.test(f)||!!s.tablet&&l.test(f);return!v&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(v=!0),v}},6296:function(a,o,i){"use strict";a.exports=g;var l=i(7261),u=i(9977),s=i(1811);function f(_,y){this._controllerNames=Object.keys(_),this._controllerList=this._controllerNames.map(function(w){return _[w]}),this._mode=y,this._active=_[y],this._active||(this._mode="turntable",this._active=_.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var v=f.prototype;v.flush=function(_){for(var y=this._controllerList,w=0;w0)throw new Error("Invalid string. Length must be a multiple of 4");var T=S.indexOf("=");T===-1&&(T=x);var d=T===x?0:4-T%4;return[T,d]}function _(S){var x=g(S),T=x[0],d=x[1];return(T+d)*3/4-d}function y(S,x,T){return(x+T)*3/4-T}function w(S){var x,T=g(S),d=T[0],b=T[1],p=new u(y(S,d,b)),c=0,A=b>0?d-4:d,h;for(h=0;h>16&255,p[c++]=x>>8&255,p[c++]=x&255;return b===2&&(x=l[S.charCodeAt(h)]<<2|l[S.charCodeAt(h+1)]>>4,p[c++]=x&255),b===1&&(x=l[S.charCodeAt(h)]<<10|l[S.charCodeAt(h+1)]<<4|l[S.charCodeAt(h+2)]>>2,p[c++]=x>>8&255,p[c++]=x&255),p}function M(S){return i[S>>18&63]+i[S>>12&63]+i[S>>6&63]+i[S&63]}function m(S,x,T){for(var d,b=[],p=x;pA?A:c+p));return d===1?(x=S[T-1],b.push(i[x>>2]+i[x<<4&63]+"==")):d===2&&(x=(S[T-2]<<8)+S[T-1],b.push(i[x>>10]+i[x>>4&63]+i[x<<2&63]+"=")),b.join("")}},3865:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[1]).add(f[0].mul(s[1])),s[1].mul(f[1]))}},1318:function(a){"use strict";a.exports=o;function o(i,l){return i[0].mul(l[1]).cmp(l[0].mul(i[1]))}},8697:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[1]),s[1].mul(f[0]))}},7842:function(a,o,i){"use strict";var l=i(6330),u=i(1533),s=i(2651),f=i(6768),v=i(869),g=i(8697);a.exports=_;function _(y,w){if(l(y))return w?g(y,_(w)):[y[0].clone(),y[1].clone()];var M=0,m,k;if(u(y))m=y.clone();else if(typeof y=="string")m=f(y);else{if(y===0)return[s(0),s(1)];if(y===Math.floor(y))m=s(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),M-=256;m=s(y)}}if(l(w))m.mul(w[1]),k=w[0].clone();else if(u(w))k=w.clone();else if(typeof w=="string")k=f(w);else if(!w)k=s(1);else if(w===Math.floor(w))k=s(w);else{for(;w!==Math.floor(w);)w=w*Math.pow(2,256),M+=256;k=s(w)}return M>0?m=m.ushln(M):M<0&&(k=k.ushln(-M)),v(m,k)}},6330:function(a,o,i){"use strict";var l=i(1533);a.exports=u;function u(s){return Array.isArray(s)&&s.length===2&&l(s[0])&&l(s[1])}},5716:function(a,o,i){"use strict";var l=i(6859);a.exports=u;function u(s){return s.cmp(new l(0))}},1369:function(a,o,i){"use strict";var l=i(5716);a.exports=u;function u(s){var f=s.length,v=s.words,g=0;if(f===1)g=v[0];else if(f===2)g=v[0]+v[1]*67108864;else for(var _=0;_20?52:g+32}},1533:function(a,o,i){"use strict";var l=i(6859);a.exports=u;function u(s){return s&&typeof s=="object"&&!!s.words}},2651:function(a,o,i){"use strict";var l=i(6859),u=i(2361);a.exports=s;function s(f){var v=u.exponent(f);return v<52?new l(f):new l(f*Math.pow(2,52-v)).ushln(v-52)}},869:function(a,o,i){"use strict";var l=i(2651),u=i(5716);a.exports=s;function s(f,v){var g=u(f),_=u(v);if(g===0)return[l(0),l(1)];if(_===0)return[l(0),l(0)];_<0&&(f=f.neg(),v=v.neg());var y=f.gcd(v);return y.cmpn(1)?[f.div(y),v.div(y)]:[f,v]}},6768:function(a,o,i){"use strict";var l=i(6859);a.exports=u;function u(s){return new l(s)}},6504:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[0]),s[1].mul(f[1]))}},7721:function(a,o,i){"use strict";var l=i(5716);a.exports=u;function u(s){return l(s[0])*l(s[1])}},5572:function(a,o,i){"use strict";var l=i(869);a.exports=u;function u(s,f){return l(s[0].mul(f[1]).sub(s[1].mul(f[0])),s[1].mul(f[1]))}},946:function(a,o,i){"use strict";var l=i(1369),u=i(4025);a.exports=s;function s(f){var v=f[0],g=f[1];if(v.cmpn(0)===0)return 0;var _=v.abs().divmod(g.abs()),y=_.div,w=l(y),M=_.mod,m=v.negative!==g.negative?-1:1;if(M.cmpn(0)===0)return m*w;if(w){var k=u(w)+4,S=l(M.ushln(k).divRound(g));return m*(w+S*Math.pow(2,-k))}else{var x=g.bitLength()-M.bitLength()+53,S=l(M.ushln(x).divRound(g));return x<1023?m*S*Math.pow(2,-x):(S*=Math.pow(2,-1023),m*S*Math.pow(2,1023-x))}}},2478:function(a){"use strict";function o(v,g,_,y,w){for(var M=w+1;y<=w;){var m=y+w>>>1,k=v[m],S=_!==void 0?_(k,g):k-g;S>=0?(M=m,w=m-1):y=m+1}return M}function i(v,g,_,y,w){for(var M=w+1;y<=w;){var m=y+w>>>1,k=v[m],S=_!==void 0?_(k,g):k-g;S>0?(M=m,w=m-1):y=m+1}return M}function l(v,g,_,y,w){for(var M=y-1;y<=w;){var m=y+w>>>1,k=v[m],S=_!==void 0?_(k,g):k-g;S<0?(M=m,y=m+1):w=m-1}return M}function u(v,g,_,y,w){for(var M=y-1;y<=w;){var m=y+w>>>1,k=v[m],S=_!==void 0?_(k,g):k-g;S<=0?(M=m,y=m+1):w=m-1}return M}function s(v,g,_,y,w){for(;y<=w;){var M=y+w>>>1,m=v[M],k=_!==void 0?_(m,g):m-g;if(k===0)return M;k<=0?y=M+1:w=M-1}return-1}function f(v,g,_,y,w,M){return typeof _=="function"?M(v,g,_,y===void 0?0:y|0,w===void 0?v.length-1:w|0):M(v,g,void 0,_===void 0?0:_|0,y===void 0?v.length-1:y|0)}a.exports={ge:function(v,g,_,y,w){return f(v,g,_,y,w,o)},gt:function(v,g,_,y,w){return f(v,g,_,y,w,i)},lt:function(v,g,_,y,w){return f(v,g,_,y,w,l)},le:function(v,g,_,y,w){return f(v,g,_,y,w,u)},eq:function(v,g,_,y,w){return f(v,g,_,y,w,s)}}},8828:function(a,o){"use strict";"use restrict";var i=32;o.INT_BITS=i,o.INT_MAX=2147483647,o.INT_MIN=-1<0)-(s<0)},o.abs=function(s){var f=s>>i-1;return(s^f)-f},o.min=function(s,f){return f^(s^f)&-(s65535)<<4,s>>>=f,v=(s>255)<<3,s>>>=v,f|=v,v=(s>15)<<2,s>>>=v,f|=v,v=(s>3)<<1,s>>>=v,f|=v,f|s>>1},o.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},o.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var f=32;return s&=-s,s&&f--,s&65535&&(f-=16),s&16711935&&(f-=8),s&252645135&&(f-=4),s&858993459&&(f-=2),s&1431655765&&(f-=1),f}o.countTrailingZeros=l,o.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},o.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},o.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var u=new Array(256);(function(s){for(var f=0;f<256;++f){var v=f,g=f,_=7;for(v>>>=1;v;v>>>=1)g<<=1,g|=v&1,--_;s[f]=g<<_&255}})(u),o.reverse=function(s){return u[s&255]<<24|u[s>>>8&255]<<16|u[s>>>16&255]<<8|u[s>>>24&255]},o.interleave2=function(s,f){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,s|f<<1},o.deinterleave2=function(s,f){return s=s>>>f&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},o.interleave3=function(s,f,v){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,s|=f<<1,v&=1023,v=(v|v<<16)&4278190335,v=(v|v<<8)&251719695,v=(v|v<<4)&3272356035,v=(v|v<<2)&1227133513,s|v<<2},o.deinterleave3=function(s,f){return s=s>>>f&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},o.nextCombination=function(s){var f=s|s-1;return f+1|(~f&-~f)-1>>>l(s)+1}},6859:function(a,o,i){a=i.nmd(a),function(l,u){"use strict";function s(F,L){if(!F)throw new Error(L||"Assertion failed")}function f(F,L){F.super_=L;var P=function(){};P.prototype=L.prototype,F.prototype=new P,F.prototype.constructor=F}function v(F,L,P){if(v.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((L==="le"||L==="be")&&(P=L,L=10),this._init(F||0,L||10,P||"be"))}typeof l=="object"?l.exports=v:u.BN=v,v.BN=v,v.wordSize=26;var g;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?g=window.Buffer:g=i(7790).Buffer}catch(F){}v.isBN=function(L){return L instanceof v?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===v.wordSize&&Array.isArray(L.words)},v.max=function(L,P){return L.cmp(P)>0?L:P},v.min=function(L,P){return L.cmp(P)<0?L:P},v.prototype._init=function(L,P,O){if(typeof L=="number")return this._initNumber(L,P,O);if(typeof L=="object")return this._initArray(L,P,O);P==="hex"&&(P=16),s(P===(P|0)&&P>=2&&P<=36),L=L.toString().replace(/\s+/g,"");var U=0;L[0]==="-"&&(U++,this.negative=1),U=0;U-=3)j=L[U]|L[U-1]<<8|L[U-2]<<16,this.words[X]|=j<<$&67108863,this.words[X+1]=j>>>26-$&67108863,$+=24,$>=26&&($-=26,X++);else if(O==="le")for(U=0,X=0;U>>26-$&67108863,$+=24,$>=26&&($-=26,X++);return this.strip()};function _(F,L){var P=F.charCodeAt(L);return P>=65&&P<=70?P-55:P>=97&&P<=102?P-87:P-48&15}function y(F,L,P){var O=_(F,P);return P-1>=L&&(O|=_(F,P-1)<<4),O}v.prototype._parseHex=function(L,P,O){this.length=Math.ceil((L.length-P)/6),this.words=new Array(this.length);for(var U=0;U=P;U-=2)$=y(L,P,U)<=18?(X-=18,j+=1,this.words[j]|=$>>>26):X+=8;else{var Y=L.length-P;for(U=Y%2===0?P+1:P;U=18?(X-=18,j+=1,this.words[j]|=$>>>26):X+=8}this.strip()};function w(F,L,P,O){for(var U=0,X=Math.min(F.length,P),j=L;j=49?U+=$-49+10:$>=17?U+=$-17+10:U+=$}return U}v.prototype._parseBase=function(L,P,O){this.words=[0],this.length=1;for(var U=0,X=1;X<=67108863;X*=P)U++;U--,X=X/P|0;for(var j=L.length-O,$=j%U,Y=Math.min(j,j-$)+O,q=0,Z=O;Z1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},v.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},v.prototype.inspect=function(){return(this.red?""};var M=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],m=[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];v.prototype.toString=function(L,P){L=L||10,P=P|0||1;var O;if(L===16||L==="hex"){O="";for(var U=0,X=0,j=0;j>>24-U&16777215,X!==0||j!==this.length-1?O=M[6-Y.length]+Y+O:O=Y+O,U+=2,U>=26&&(U-=26,j--)}for(X!==0&&(O=X.toString(16)+O);O.length%P!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(L===(L|0)&&L>=2&&L<=36){var q=m[L],Z=k[L];O="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var Q=ne.modn(Z).toString(L);ne=ne.idivn(Z),ne.isZero()?O=Q+O:O=M[q-Q.length]+Q+O}for(this.isZero()&&(O="0"+O);O.length%P!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}s(!1,"Base should be between 2 and 36")},v.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},v.prototype.toJSON=function(){return this.toString(16)},v.prototype.toBuffer=function(L,P){return s(typeof g!="undefined"),this.toArrayLike(g,L,P)},v.prototype.toArray=function(L,P){return this.toArrayLike(Array,L,P)},v.prototype.toArrayLike=function(L,P,O){var U=this.byteLength(),X=O||Math.max(1,U);s(U<=X,"byte array longer than desired length"),s(X>0,"Requested array length <= 0"),this.strip();var j=P==="le",$=new L(X),Y,q,Z=this.clone();if(j){for(q=0;!Z.isZero();q++)Y=Z.andln(255),Z.iushrn(8),$[q]=Y;for(;q=4096&&(O+=13,P>>>=13),P>=64&&(O+=7,P>>>=7),P>=8&&(O+=4,P>>>=4),P>=2&&(O+=2,P>>>=2),O+P},v.prototype._zeroBits=function(L){if(L===0)return 26;var P=L,O=0;return P&8191||(O+=13,P>>>=13),P&127||(O+=7,P>>>=7),P&15||(O+=4,P>>>=4),P&3||(O+=2,P>>>=2),P&1||O++,O},v.prototype.bitLength=function(){var L=this.words[this.length-1],P=this._countBits(L);return(this.length-1)*26+P};function S(F){for(var L=new Array(F.bitLength()),P=0;P>>U}return L}v.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,P=0;PL.length?this.clone().ior(L):L.clone().ior(this)},v.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},v.prototype.iuand=function(L){var P;this.length>L.length?P=L:P=this;for(var O=0;OL.length?this.clone().iand(L):L.clone().iand(this)},v.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},v.prototype.iuxor=function(L){var P,O;this.length>L.length?(P=this,O=L):(P=L,O=this);for(var U=0;UL.length?this.clone().ixor(L):L.clone().ixor(this)},v.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},v.prototype.inotn=function(L){s(typeof L=="number"&&L>=0);var P=Math.ceil(L/26)|0,O=L%26;this._expand(P),O>0&&P--;for(var U=0;U0&&(this.words[U]=~this.words[U]&67108863>>26-O),this.strip()},v.prototype.notn=function(L){return this.clone().inotn(L)},v.prototype.setn=function(L,P){s(typeof L=="number"&&L>=0);var O=L/26|0,U=L%26;return this._expand(O+1),P?this.words[O]=this.words[O]|1<L.length?(O=this,U=L):(O=L,U=this);for(var X=0,j=0;j>>26;for(;X!==0&&j>>26;if(this.length=O.length,X!==0)this.words[this.length]=X,this.length++;else if(O!==this)for(;jL.length?this.clone().iadd(L):L.clone().iadd(this)},v.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var P=this.iadd(L);return L.negative=1,P._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var O=this.cmp(L);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var U,X;O>0?(U=this,X=L):(U=L,X=this);for(var j=0,$=0;$>26,this.words[$]=P&67108863;for(;j!==0&&$>26,this.words[$]=P&67108863;if(j===0&&$>>26,ne=Y&67108863,Q=Math.min(q,L.length-1),oe=Math.max(0,q-F.length+1);oe<=Q;oe++){var ee=q-oe|0;U=F.words[ee]|0,X=L.words[oe]|0,j=U*X+ne,Z+=j/67108864|0,ne=j&67108863}P.words[q]=ne|0,Y=Z|0}return Y!==0?P.words[q]=Y|0:P.length--,P.strip()}var T=function(L,P,O){var U=L.words,X=P.words,j=O.words,$=0,Y,q,Z,ne=U[0]|0,Q=ne&8191,oe=ne>>>13,ee=U[1]|0,G=ee&8191,re=ee>>>13,H=U[2]|0,te=H&8191,ue=H>>>13,de=U[3]|0,Ee=de&8191,Me=de>>>13,ve=U[4]|0,Ae=ve&8191,ke=ve>>>13,De=U[5]|0,Ce=De&8191,Oe=De>>>13,Ue=U[6]|0,ge=Ue&8191,Te=Ue>>>13,ce=U[7]|0,ye=ce&8191,Le=ce>>>13,me=U[8]|0,he=me&8191,be=me>>>13,Se=U[9]|0,ze=Se&8191,Fe=Se>>>13,Je=X[0]|0,Ye=Je&8191,Ge=Je>>>13,We=X[1]|0,we=We&8191,Pe=We>>>13,Qe=X[2]|0,Ve=Qe&8191,ar=Qe>>>13,se=X[3]|0,K=se&8191,ae=se>>>13,Re=X[4]|0,Be=Re&8191,je=Re>>>13,nr=X[5]|0,hr=nr&8191,wr=nr>>>13,Cr=X[6]|0,Tr=Cr&8191,Ar=Cr>>>13,ft=X[7]|0,Yr=ft&8191,mr=ft>>>13,ct=X[8]|0,Sr=ct&8191,Ur=ct>>>13,bt=X[9]|0,zr=bt&8191,Hr=bt>>>13;O.negative=L.negative^P.negative,O.length=19,Y=Math.imul(Q,Ye),q=Math.imul(Q,Ge),q=q+Math.imul(oe,Ye)|0,Z=Math.imul(oe,Ge);var Ot=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,Y=Math.imul(G,Ye),q=Math.imul(G,Ge),q=q+Math.imul(re,Ye)|0,Z=Math.imul(re,Ge),Y=Y+Math.imul(Q,we)|0,q=q+Math.imul(Q,Pe)|0,q=q+Math.imul(oe,we)|0,Z=Z+Math.imul(oe,Pe)|0;var Lt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,Y=Math.imul(te,Ye),q=Math.imul(te,Ge),q=q+Math.imul(ue,Ye)|0,Z=Math.imul(ue,Ge),Y=Y+Math.imul(G,we)|0,q=q+Math.imul(G,Pe)|0,q=q+Math.imul(re,we)|0,Z=Z+Math.imul(re,Pe)|0,Y=Y+Math.imul(Q,Ve)|0,q=q+Math.imul(Q,ar)|0,q=q+Math.imul(oe,Ve)|0,Z=Z+Math.imul(oe,ar)|0;var yn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(yn>>>26)|0,yn&=67108863,Y=Math.imul(Ee,Ye),q=Math.imul(Ee,Ge),q=q+Math.imul(Me,Ye)|0,Z=Math.imul(Me,Ge),Y=Y+Math.imul(te,we)|0,q=q+Math.imul(te,Pe)|0,q=q+Math.imul(ue,we)|0,Z=Z+Math.imul(ue,Pe)|0,Y=Y+Math.imul(G,Ve)|0,q=q+Math.imul(G,ar)|0,q=q+Math.imul(re,Ve)|0,Z=Z+Math.imul(re,ar)|0,Y=Y+Math.imul(Q,K)|0,q=q+Math.imul(Q,ae)|0,q=q+Math.imul(oe,K)|0,Z=Z+Math.imul(oe,ae)|0;var Gt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,Y=Math.imul(Ae,Ye),q=Math.imul(Ae,Ge),q=q+Math.imul(ke,Ye)|0,Z=Math.imul(ke,Ge),Y=Y+Math.imul(Ee,we)|0,q=q+Math.imul(Ee,Pe)|0,q=q+Math.imul(Me,we)|0,Z=Z+Math.imul(Me,Pe)|0,Y=Y+Math.imul(te,Ve)|0,q=q+Math.imul(te,ar)|0,q=q+Math.imul(ue,Ve)|0,Z=Z+Math.imul(ue,ar)|0,Y=Y+Math.imul(G,K)|0,q=q+Math.imul(G,ae)|0,q=q+Math.imul(re,K)|0,Z=Z+Math.imul(re,ae)|0,Y=Y+Math.imul(Q,Be)|0,q=q+Math.imul(Q,je)|0,q=q+Math.imul(oe,Be)|0,Z=Z+Math.imul(oe,je)|0;var Rt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,Y=Math.imul(Ce,Ye),q=Math.imul(Ce,Ge),q=q+Math.imul(Oe,Ye)|0,Z=Math.imul(Oe,Ge),Y=Y+Math.imul(Ae,we)|0,q=q+Math.imul(Ae,Pe)|0,q=q+Math.imul(ke,we)|0,Z=Z+Math.imul(ke,Pe)|0,Y=Y+Math.imul(Ee,Ve)|0,q=q+Math.imul(Ee,ar)|0,q=q+Math.imul(Me,Ve)|0,Z=Z+Math.imul(Me,ar)|0,Y=Y+Math.imul(te,K)|0,q=q+Math.imul(te,ae)|0,q=q+Math.imul(ue,K)|0,Z=Z+Math.imul(ue,ae)|0,Y=Y+Math.imul(G,Be)|0,q=q+Math.imul(G,je)|0,q=q+Math.imul(re,Be)|0,Z=Z+Math.imul(re,je)|0,Y=Y+Math.imul(Q,hr)|0,q=q+Math.imul(Q,wr)|0,q=q+Math.imul(oe,hr)|0,Z=Z+Math.imul(oe,wr)|0;var nt=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(nt>>>26)|0,nt&=67108863,Y=Math.imul(ge,Ye),q=Math.imul(ge,Ge),q=q+Math.imul(Te,Ye)|0,Z=Math.imul(Te,Ge),Y=Y+Math.imul(Ce,we)|0,q=q+Math.imul(Ce,Pe)|0,q=q+Math.imul(Oe,we)|0,Z=Z+Math.imul(Oe,Pe)|0,Y=Y+Math.imul(Ae,Ve)|0,q=q+Math.imul(Ae,ar)|0,q=q+Math.imul(ke,Ve)|0,Z=Z+Math.imul(ke,ar)|0,Y=Y+Math.imul(Ee,K)|0,q=q+Math.imul(Ee,ae)|0,q=q+Math.imul(Me,K)|0,Z=Z+Math.imul(Me,ae)|0,Y=Y+Math.imul(te,Be)|0,q=q+Math.imul(te,je)|0,q=q+Math.imul(ue,Be)|0,Z=Z+Math.imul(ue,je)|0,Y=Y+Math.imul(G,hr)|0,q=q+Math.imul(G,wr)|0,q=q+Math.imul(re,hr)|0,Z=Z+Math.imul(re,wr)|0,Y=Y+Math.imul(Q,Tr)|0,q=q+Math.imul(Q,Ar)|0,q=q+Math.imul(oe,Tr)|0,Z=Z+Math.imul(oe,Ar)|0;var Ft=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,Y=Math.imul(ye,Ye),q=Math.imul(ye,Ge),q=q+Math.imul(Le,Ye)|0,Z=Math.imul(Le,Ge),Y=Y+Math.imul(ge,we)|0,q=q+Math.imul(ge,Pe)|0,q=q+Math.imul(Te,we)|0,Z=Z+Math.imul(Te,Pe)|0,Y=Y+Math.imul(Ce,Ve)|0,q=q+Math.imul(Ce,ar)|0,q=q+Math.imul(Oe,Ve)|0,Z=Z+Math.imul(Oe,ar)|0,Y=Y+Math.imul(Ae,K)|0,q=q+Math.imul(Ae,ae)|0,q=q+Math.imul(ke,K)|0,Z=Z+Math.imul(ke,ae)|0,Y=Y+Math.imul(Ee,Be)|0,q=q+Math.imul(Ee,je)|0,q=q+Math.imul(Me,Be)|0,Z=Z+Math.imul(Me,je)|0,Y=Y+Math.imul(te,hr)|0,q=q+Math.imul(te,wr)|0,q=q+Math.imul(ue,hr)|0,Z=Z+Math.imul(ue,wr)|0,Y=Y+Math.imul(G,Tr)|0,q=q+Math.imul(G,Ar)|0,q=q+Math.imul(re,Tr)|0,Z=Z+Math.imul(re,Ar)|0,Y=Y+Math.imul(Q,Yr)|0,q=q+Math.imul(Q,mr)|0,q=q+Math.imul(oe,Yr)|0,Z=Z+Math.imul(oe,mr)|0;var ha=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(ha>>>26)|0,ha&=67108863,Y=Math.imul(he,Ye),q=Math.imul(he,Ge),q=q+Math.imul(be,Ye)|0,Z=Math.imul(be,Ge),Y=Y+Math.imul(ye,we)|0,q=q+Math.imul(ye,Pe)|0,q=q+Math.imul(Le,we)|0,Z=Z+Math.imul(Le,Pe)|0,Y=Y+Math.imul(ge,Ve)|0,q=q+Math.imul(ge,ar)|0,q=q+Math.imul(Te,Ve)|0,Z=Z+Math.imul(Te,ar)|0,Y=Y+Math.imul(Ce,K)|0,q=q+Math.imul(Ce,ae)|0,q=q+Math.imul(Oe,K)|0,Z=Z+Math.imul(Oe,ae)|0,Y=Y+Math.imul(Ae,Be)|0,q=q+Math.imul(Ae,je)|0,q=q+Math.imul(ke,Be)|0,Z=Z+Math.imul(ke,je)|0,Y=Y+Math.imul(Ee,hr)|0,q=q+Math.imul(Ee,wr)|0,q=q+Math.imul(Me,hr)|0,Z=Z+Math.imul(Me,wr)|0,Y=Y+Math.imul(te,Tr)|0,q=q+Math.imul(te,Ar)|0,q=q+Math.imul(ue,Tr)|0,Z=Z+Math.imul(ue,Ar)|0,Y=Y+Math.imul(G,Yr)|0,q=q+Math.imul(G,mr)|0,q=q+Math.imul(re,Yr)|0,Z=Z+Math.imul(re,mr)|0,Y=Y+Math.imul(Q,Sr)|0,q=q+Math.imul(Q,Ur)|0,q=q+Math.imul(oe,Sr)|0,Z=Z+Math.imul(oe,Ur)|0;var Qn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,Y=Math.imul(ze,Ye),q=Math.imul(ze,Ge),q=q+Math.imul(Fe,Ye)|0,Z=Math.imul(Fe,Ge),Y=Y+Math.imul(he,we)|0,q=q+Math.imul(he,Pe)|0,q=q+Math.imul(be,we)|0,Z=Z+Math.imul(be,Pe)|0,Y=Y+Math.imul(ye,Ve)|0,q=q+Math.imul(ye,ar)|0,q=q+Math.imul(Le,Ve)|0,Z=Z+Math.imul(Le,ar)|0,Y=Y+Math.imul(ge,K)|0,q=q+Math.imul(ge,ae)|0,q=q+Math.imul(Te,K)|0,Z=Z+Math.imul(Te,ae)|0,Y=Y+Math.imul(Ce,Be)|0,q=q+Math.imul(Ce,je)|0,q=q+Math.imul(Oe,Be)|0,Z=Z+Math.imul(Oe,je)|0,Y=Y+Math.imul(Ae,hr)|0,q=q+Math.imul(Ae,wr)|0,q=q+Math.imul(ke,hr)|0,Z=Z+Math.imul(ke,wr)|0,Y=Y+Math.imul(Ee,Tr)|0,q=q+Math.imul(Ee,Ar)|0,q=q+Math.imul(Me,Tr)|0,Z=Z+Math.imul(Me,Ar)|0,Y=Y+Math.imul(te,Yr)|0,q=q+Math.imul(te,mr)|0,q=q+Math.imul(ue,Yr)|0,Z=Z+Math.imul(ue,mr)|0,Y=Y+Math.imul(G,Sr)|0,q=q+Math.imul(G,Ur)|0,q=q+Math.imul(re,Sr)|0,Z=Z+Math.imul(re,Ur)|0,Y=Y+Math.imul(Q,zr)|0,q=q+Math.imul(Q,Hr)|0,q=q+Math.imul(oe,zr)|0,Z=Z+Math.imul(oe,Hr)|0;var Fn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,Y=Math.imul(ze,we),q=Math.imul(ze,Pe),q=q+Math.imul(Fe,we)|0,Z=Math.imul(Fe,Pe),Y=Y+Math.imul(he,Ve)|0,q=q+Math.imul(he,ar)|0,q=q+Math.imul(be,Ve)|0,Z=Z+Math.imul(be,ar)|0,Y=Y+Math.imul(ye,K)|0,q=q+Math.imul(ye,ae)|0,q=q+Math.imul(Le,K)|0,Z=Z+Math.imul(Le,ae)|0,Y=Y+Math.imul(ge,Be)|0,q=q+Math.imul(ge,je)|0,q=q+Math.imul(Te,Be)|0,Z=Z+Math.imul(Te,je)|0,Y=Y+Math.imul(Ce,hr)|0,q=q+Math.imul(Ce,wr)|0,q=q+Math.imul(Oe,hr)|0,Z=Z+Math.imul(Oe,wr)|0,Y=Y+Math.imul(Ae,Tr)|0,q=q+Math.imul(Ae,Ar)|0,q=q+Math.imul(ke,Tr)|0,Z=Z+Math.imul(ke,Ar)|0,Y=Y+Math.imul(Ee,Yr)|0,q=q+Math.imul(Ee,mr)|0,q=q+Math.imul(Me,Yr)|0,Z=Z+Math.imul(Me,mr)|0,Y=Y+Math.imul(te,Sr)|0,q=q+Math.imul(te,Ur)|0,q=q+Math.imul(ue,Sr)|0,Z=Z+Math.imul(ue,Ur)|0,Y=Y+Math.imul(G,zr)|0,q=q+Math.imul(G,Hr)|0,q=q+Math.imul(re,zr)|0,Z=Z+Math.imul(re,Hr)|0;var wa=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(wa>>>26)|0,wa&=67108863,Y=Math.imul(ze,Ve),q=Math.imul(ze,ar),q=q+Math.imul(Fe,Ve)|0,Z=Math.imul(Fe,ar),Y=Y+Math.imul(he,K)|0,q=q+Math.imul(he,ae)|0,q=q+Math.imul(be,K)|0,Z=Z+Math.imul(be,ae)|0,Y=Y+Math.imul(ye,Be)|0,q=q+Math.imul(ye,je)|0,q=q+Math.imul(Le,Be)|0,Z=Z+Math.imul(Le,je)|0,Y=Y+Math.imul(ge,hr)|0,q=q+Math.imul(ge,wr)|0,q=q+Math.imul(Te,hr)|0,Z=Z+Math.imul(Te,wr)|0,Y=Y+Math.imul(Ce,Tr)|0,q=q+Math.imul(Ce,Ar)|0,q=q+Math.imul(Oe,Tr)|0,Z=Z+Math.imul(Oe,Ar)|0,Y=Y+Math.imul(Ae,Yr)|0,q=q+Math.imul(Ae,mr)|0,q=q+Math.imul(ke,Yr)|0,Z=Z+Math.imul(ke,mr)|0,Y=Y+Math.imul(Ee,Sr)|0,q=q+Math.imul(Ee,Ur)|0,q=q+Math.imul(Me,Sr)|0,Z=Z+Math.imul(Me,Ur)|0,Y=Y+Math.imul(te,zr)|0,q=q+Math.imul(te,Hr)|0,q=q+Math.imul(ue,zr)|0,Z=Z+Math.imul(ue,Hr)|0;var xi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(xi>>>26)|0,xi&=67108863,Y=Math.imul(ze,K),q=Math.imul(ze,ae),q=q+Math.imul(Fe,K)|0,Z=Math.imul(Fe,ae),Y=Y+Math.imul(he,Be)|0,q=q+Math.imul(he,je)|0,q=q+Math.imul(be,Be)|0,Z=Z+Math.imul(be,je)|0,Y=Y+Math.imul(ye,hr)|0,q=q+Math.imul(ye,wr)|0,q=q+Math.imul(Le,hr)|0,Z=Z+Math.imul(Le,wr)|0,Y=Y+Math.imul(ge,Tr)|0,q=q+Math.imul(ge,Ar)|0,q=q+Math.imul(Te,Tr)|0,Z=Z+Math.imul(Te,Ar)|0,Y=Y+Math.imul(Ce,Yr)|0,q=q+Math.imul(Ce,mr)|0,q=q+Math.imul(Oe,Yr)|0,Z=Z+Math.imul(Oe,mr)|0,Y=Y+Math.imul(Ae,Sr)|0,q=q+Math.imul(Ae,Ur)|0,q=q+Math.imul(ke,Sr)|0,Z=Z+Math.imul(ke,Ur)|0,Y=Y+Math.imul(Ee,zr)|0,q=q+Math.imul(Ee,Hr)|0,q=q+Math.imul(Me,zr)|0,Z=Z+Math.imul(Me,Hr)|0;var Gi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,Y=Math.imul(ze,Be),q=Math.imul(ze,je),q=q+Math.imul(Fe,Be)|0,Z=Math.imul(Fe,je),Y=Y+Math.imul(he,hr)|0,q=q+Math.imul(he,wr)|0,q=q+Math.imul(be,hr)|0,Z=Z+Math.imul(be,wr)|0,Y=Y+Math.imul(ye,Tr)|0,q=q+Math.imul(ye,Ar)|0,q=q+Math.imul(Le,Tr)|0,Z=Z+Math.imul(Le,Ar)|0,Y=Y+Math.imul(ge,Yr)|0,q=q+Math.imul(ge,mr)|0,q=q+Math.imul(Te,Yr)|0,Z=Z+Math.imul(Te,mr)|0,Y=Y+Math.imul(Ce,Sr)|0,q=q+Math.imul(Ce,Ur)|0,q=q+Math.imul(Oe,Sr)|0,Z=Z+Math.imul(Oe,Ur)|0,Y=Y+Math.imul(Ae,zr)|0,q=q+Math.imul(Ae,Hr)|0,q=q+Math.imul(ke,zr)|0,Z=Z+Math.imul(ke,Hr)|0;var Yi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,Y=Math.imul(ze,hr),q=Math.imul(ze,wr),q=q+Math.imul(Fe,hr)|0,Z=Math.imul(Fe,wr),Y=Y+Math.imul(he,Tr)|0,q=q+Math.imul(he,Ar)|0,q=q+Math.imul(be,Tr)|0,Z=Z+Math.imul(be,Ar)|0,Y=Y+Math.imul(ye,Yr)|0,q=q+Math.imul(ye,mr)|0,q=q+Math.imul(Le,Yr)|0,Z=Z+Math.imul(Le,mr)|0,Y=Y+Math.imul(ge,Sr)|0,q=q+Math.imul(ge,Ur)|0,q=q+Math.imul(Te,Sr)|0,Z=Z+Math.imul(Te,Ur)|0,Y=Y+Math.imul(Ce,zr)|0,q=q+Math.imul(Ce,Hr)|0,q=q+Math.imul(Oe,zr)|0,Z=Z+Math.imul(Oe,Hr)|0;var Wi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,Y=Math.imul(ze,Tr),q=Math.imul(ze,Ar),q=q+Math.imul(Fe,Tr)|0,Z=Math.imul(Fe,Ar),Y=Y+Math.imul(he,Yr)|0,q=q+Math.imul(he,mr)|0,q=q+Math.imul(be,Yr)|0,Z=Z+Math.imul(be,mr)|0,Y=Y+Math.imul(ye,Sr)|0,q=q+Math.imul(ye,Ur)|0,q=q+Math.imul(Le,Sr)|0,Z=Z+Math.imul(Le,Ur)|0,Y=Y+Math.imul(ge,zr)|0,q=q+Math.imul(ge,Hr)|0,q=q+Math.imul(Te,zr)|0,Z=Z+Math.imul(Te,Hr)|0;var tn=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(tn>>>26)|0,tn&=67108863,Y=Math.imul(ze,Yr),q=Math.imul(ze,mr),q=q+Math.imul(Fe,Yr)|0,Z=Math.imul(Fe,mr),Y=Y+Math.imul(he,Sr)|0,q=q+Math.imul(he,Ur)|0,q=q+Math.imul(be,Sr)|0,Z=Z+Math.imul(be,Ur)|0,Y=Y+Math.imul(ye,zr)|0,q=q+Math.imul(ye,Hr)|0,q=q+Math.imul(Le,zr)|0,Z=Z+Math.imul(Le,Hr)|0;var xo=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(xo>>>26)|0,xo&=67108863,Y=Math.imul(ze,Sr),q=Math.imul(ze,Ur),q=q+Math.imul(Fe,Sr)|0,Z=Math.imul(Fe,Ur),Y=Y+Math.imul(he,zr)|0,q=q+Math.imul(he,Hr)|0,q=q+Math.imul(be,zr)|0,Z=Z+Math.imul(be,Hr)|0;var bi=($+Y|0)+((q&8191)<<13)|0;$=(Z+(q>>>13)|0)+(bi>>>26)|0,bi&=67108863,Y=Math.imul(ze,zr),q=Math.imul(ze,Hr),q=q+Math.imul(Fe,zr)|0,Z=Math.imul(Fe,Hr);var _i=($+Y|0)+((q&8191)<<13)|0;return $=(Z+(q>>>13)|0)+(_i>>>26)|0,_i&=67108863,j[0]=Ot,j[1]=Lt,j[2]=yn,j[3]=Gt,j[4]=Rt,j[5]=nt,j[6]=Ft,j[7]=ha,j[8]=Qn,j[9]=Fn,j[10]=wa,j[11]=xi,j[12]=Gi,j[13]=Yi,j[14]=Wi,j[15]=tn,j[16]=xo,j[17]=bi,j[18]=_i,$!==0&&(j[19]=$,O.length++),O};Math.imul||(T=x);function d(F,L,P){P.negative=L.negative^F.negative,P.length=F.length+L.length;for(var O=0,U=0,X=0;X>>26)|0,U+=j>>>26,j&=67108863}P.words[X]=$,O=j,j=U}return O!==0?P.words[X]=O:P.length--,P.strip()}function b(F,L,P){var O=new p;return O.mulp(F,L,P)}v.prototype.mulTo=function(L,P){var O,U=this.length+L.length;return this.length===10&&L.length===10?O=T(this,L,P):U<63?O=x(this,L,P):U<1024?O=d(this,L,P):O=b(this,L,P),O};function p(F,L){this.x=F,this.y=L}p.prototype.makeRBT=function(L){for(var P=new Array(L),O=v.prototype._countBits(L)-1,U=0;U>=1;return U},p.prototype.permute=function(L,P,O,U,X,j){for(var $=0;$>>1)X++;return 1<>>13,O[2*j+1]=X&8191,X=X>>>13;for(j=2*P;j>=26,P+=U/67108864|0,P+=X>>>26,this.words[O]=X&67108863}return P!==0&&(this.words[O]=P,this.length++),this},v.prototype.muln=function(L){return this.clone().imuln(L)},v.prototype.sqr=function(){return this.mul(this)},v.prototype.isqr=function(){return this.imul(this.clone())},v.prototype.pow=function(L){var P=S(L);if(P.length===0)return new v(1);for(var O=this,U=0;U=0);var P=L%26,O=(L-P)/26,U=67108863>>>26-P<<26-P,X;if(P!==0){var j=0;for(X=0;X>>26-P}j&&(this.words[X]=j,this.length++)}if(O!==0){for(X=this.length-1;X>=0;X--)this.words[X+O]=this.words[X];for(X=0;X=0);var U;P?U=(P-P%26)/26:U=0;var X=L%26,j=Math.min((L-X)/26,this.length),$=67108863^67108863>>>X<j)for(this.length-=j,q=0;q=0&&(Z!==0||q>=U);q--){var ne=this.words[q]|0;this.words[q]=Z<<26-X|ne>>>X,Z=ne&$}return Y&&Z!==0&&(Y.words[Y.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},v.prototype.ishrn=function(L,P,O){return s(this.negative===0),this.iushrn(L,P,O)},v.prototype.shln=function(L){return this.clone().ishln(L)},v.prototype.ushln=function(L){return this.clone().iushln(L)},v.prototype.shrn=function(L){return this.clone().ishrn(L)},v.prototype.ushrn=function(L){return this.clone().iushrn(L)},v.prototype.testn=function(L){s(typeof L=="number"&&L>=0);var P=L%26,O=(L-P)/26,U=1<=0);var P=L%26,O=(L-P)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(P!==0&&O++,this.length=Math.min(O,this.length),P!==0){var U=67108863^67108863>>>P<=67108864;P++)this.words[P]-=67108864,P===this.length-1?this.words[P+1]=1:this.words[P+1]++;return this.length=Math.max(this.length,P+1),this},v.prototype.isubn=function(L){if(s(typeof L=="number"),s(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var P=0;P>26)-(Y/67108864|0),this.words[X+O]=j&67108863}for(;X>26,this.words[X+O]=j&67108863;if($===0)return this.strip();for(s($===-1),$=0,X=0;X>26,this.words[X]=j&67108863;return this.negative=1,this.strip()},v.prototype._wordDiv=function(L,P){var O=this.length-L.length,U=this.clone(),X=L,j=X.words[X.length-1]|0,$=this._countBits(j);O=26-$,O!==0&&(X=X.ushln(O),U.iushln(O),j=X.words[X.length-1]|0);var Y=U.length-X.length,q;if(P!=="mod"){q=new v(null),q.length=Y+1,q.words=new Array(q.length);for(var Z=0;Z=0;Q--){var oe=(U.words[X.length+Q]|0)*67108864+(U.words[X.length+Q-1]|0);for(oe=Math.min(oe/j|0,67108863),U._ishlnsubmul(X,oe,Q);U.negative!==0;)oe--,U.negative=0,U._ishlnsubmul(X,1,Q),U.isZero()||(U.negative^=1);q&&(q.words[Q]=oe)}return q&&q.strip(),U.strip(),P!=="div"&&O!==0&&U.iushrn(O),{div:q||null,mod:U}},v.prototype.divmod=function(L,P,O){if(s(!L.isZero()),this.isZero())return{div:new v(0),mod:new v(0)};var U,X,j;return this.negative!==0&&L.negative===0?(j=this.neg().divmod(L,P),P!=="mod"&&(U=j.div.neg()),P!=="div"&&(X=j.mod.neg(),O&&X.negative!==0&&X.iadd(L)),{div:U,mod:X}):this.negative===0&&L.negative!==0?(j=this.divmod(L.neg(),P),P!=="mod"&&(U=j.div.neg()),{div:U,mod:j.mod}):this.negative&L.negative?(j=this.neg().divmod(L.neg(),P),P!=="div"&&(X=j.mod.neg(),O&&X.negative!==0&&X.isub(L)),{div:j.div,mod:X}):L.length>this.length||this.cmp(L)<0?{div:new v(0),mod:this}:L.length===1?P==="div"?{div:this.divn(L.words[0]),mod:null}:P==="mod"?{div:null,mod:new v(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new v(this.modn(L.words[0]))}:this._wordDiv(L,P)},v.prototype.div=function(L){return this.divmod(L,"div",!1).div},v.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},v.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},v.prototype.divRound=function(L){var P=this.divmod(L);if(P.mod.isZero())return P.div;var O=P.div.negative!==0?P.mod.isub(L):P.mod,U=L.ushrn(1),X=L.andln(1),j=O.cmp(U);return j<0||X===1&&j===0?P.div:P.div.negative!==0?P.div.isubn(1):P.div.iaddn(1)},v.prototype.modn=function(L){s(L<=67108863);for(var P=(1<<26)%L,O=0,U=this.length-1;U>=0;U--)O=(P*O+(this.words[U]|0))%L;return O},v.prototype.idivn=function(L){s(L<=67108863);for(var P=0,O=this.length-1;O>=0;O--){var U=(this.words[O]|0)+P*67108864;this.words[O]=U/L|0,P=U%L}return this.strip()},v.prototype.divn=function(L){return this.clone().idivn(L)},v.prototype.egcd=function(L){s(L.negative===0),s(!L.isZero());var P=this,O=L.clone();P.negative!==0?P=P.umod(L):P=P.clone();for(var U=new v(1),X=new v(0),j=new v(0),$=new v(1),Y=0;P.isEven()&&O.isEven();)P.iushrn(1),O.iushrn(1),++Y;for(var q=O.clone(),Z=P.clone();!P.isZero();){for(var ne=0,Q=1;!(P.words[0]&Q)&&ne<26;++ne,Q<<=1);if(ne>0)for(P.iushrn(ne);ne-- >0;)(U.isOdd()||X.isOdd())&&(U.iadd(q),X.isub(Z)),U.iushrn(1),X.iushrn(1);for(var oe=0,ee=1;!(O.words[0]&ee)&&oe<26;++oe,ee<<=1);if(oe>0)for(O.iushrn(oe);oe-- >0;)(j.isOdd()||$.isOdd())&&(j.iadd(q),$.isub(Z)),j.iushrn(1),$.iushrn(1);P.cmp(O)>=0?(P.isub(O),U.isub(j),X.isub($)):(O.isub(P),j.isub(U),$.isub(X))}return{a:j,b:$,gcd:O.iushln(Y)}},v.prototype._invmp=function(L){s(L.negative===0),s(!L.isZero());var P=this,O=L.clone();P.negative!==0?P=P.umod(L):P=P.clone();for(var U=new v(1),X=new v(0),j=O.clone();P.cmpn(1)>0&&O.cmpn(1)>0;){for(var $=0,Y=1;!(P.words[0]&Y)&&$<26;++$,Y<<=1);if($>0)for(P.iushrn($);$-- >0;)U.isOdd()&&U.iadd(j),U.iushrn(1);for(var q=0,Z=1;!(O.words[0]&Z)&&q<26;++q,Z<<=1);if(q>0)for(O.iushrn(q);q-- >0;)X.isOdd()&&X.iadd(j),X.iushrn(1);P.cmp(O)>=0?(P.isub(O),U.isub(X)):(O.isub(P),X.isub(U))}var ne;return P.cmpn(1)===0?ne=U:ne=X,ne.cmpn(0)<0&&ne.iadd(L),ne},v.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var P=this.clone(),O=L.clone();P.negative=0,O.negative=0;for(var U=0;P.isEven()&&O.isEven();U++)P.iushrn(1),O.iushrn(1);do{for(;P.isEven();)P.iushrn(1);for(;O.isEven();)O.iushrn(1);var X=P.cmp(O);if(X<0){var j=P;P=O,O=j}else if(X===0||O.cmpn(1)===0)break;P.isub(O)}while(!0);return O.iushln(U)},v.prototype.invm=function(L){return this.egcd(L).a.umod(L)},v.prototype.isEven=function(){return(this.words[0]&1)===0},v.prototype.isOdd=function(){return(this.words[0]&1)===1},v.prototype.andln=function(L){return this.words[0]&L},v.prototype.bincn=function(L){s(typeof L=="number");var P=L%26,O=(L-P)/26,U=1<>>26,$&=67108863,this.words[j]=$}return X!==0&&(this.words[j]=X,this.length++),this},v.prototype.isZero=function(){return this.length===1&&this.words[0]===0},v.prototype.cmpn=function(L){var P=L<0;if(this.negative!==0&&!P)return-1;if(this.negative===0&&P)return 1;this.strip();var O;if(this.length>1)O=1;else{P&&(L=-L),s(L<=67108863,"Number is too big");var U=this.words[0]|0;O=U===L?0:UL.length)return 1;if(this.length=0;O--){var U=this.words[O]|0,X=L.words[O]|0;if(U!==X){UX&&(P=1);break}}return P},v.prototype.gtn=function(L){return this.cmpn(L)===1},v.prototype.gt=function(L){return this.cmp(L)===1},v.prototype.gten=function(L){return this.cmpn(L)>=0},v.prototype.gte=function(L){return this.cmp(L)>=0},v.prototype.ltn=function(L){return this.cmpn(L)===-1},v.prototype.lt=function(L){return this.cmp(L)===-1},v.prototype.lten=function(L){return this.cmpn(L)<=0},v.prototype.lte=function(L){return this.cmp(L)<=0},v.prototype.eqn=function(L){return this.cmpn(L)===0},v.prototype.eq=function(L){return this.cmp(L)===0},v.red=function(L){return new N(L)},v.prototype.toRed=function(L){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},v.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},v.prototype._forceRed=function(L){return this.red=L,this},v.prototype.forceRed=function(L){return s(!this.red,"Already a number in reduction context"),this._forceRed(L)},v.prototype.redAdd=function(L){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},v.prototype.redIAdd=function(L){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},v.prototype.redSub=function(L){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},v.prototype.redISub=function(L){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},v.prototype.redShl=function(L){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},v.prototype.redMul=function(L){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},v.prototype.redIMul=function(L){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},v.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},v.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},v.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},v.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},v.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},v.prototype.redPow=function(L){return s(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var c={k256:null,p224:null,p192:null,p25519:null};function A(F,L){this.name=F,this.p=new v(L,16),this.n=this.p.bitLength(),this.k=new v(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var L=new v(null);return L.words=new Array(Math.ceil(this.n/13)),L},A.prototype.ireduce=function(L){var P=L,O;do this.split(P,this.tmp),P=this.imulK(P),P=P.iadd(this.tmp),O=P.bitLength();while(O>this.n);var U=O0?P.isub(this.p):P.strip!==void 0?P.strip():P._strip(),P},A.prototype.split=function(L,P){L.iushrn(this.n,0,P)},A.prototype.imulK=function(L){return L.imul(this.k)};function h(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(h,A),h.prototype.split=function(L,P){for(var O=4194303,U=Math.min(L.length,9),X=0;X>>22,j=$}j>>>=22,L.words[X-10]=j,j===0&&L.length>10?L.length-=10:L.length-=9},h.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var P=0,O=0;O>>=26,L.words[O]=X,P=U}return P!==0&&(L.words[L.length++]=P),L},v._prime=function(L){if(c[L])return c[L];var P;if(L==="k256")P=new h;else if(L==="p224")P=new R;else if(L==="p192")P=new E;else if(L==="p25519")P=new D;else throw new Error("Unknown prime "+L);return c[L]=P,P};function N(F){if(typeof F=="string"){var L=v._prime(F);this.m=L.p,this.prime=L}else s(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}N.prototype._verify1=function(L){s(L.negative===0,"red works only with positives"),s(L.red,"red works only with red numbers")},N.prototype._verify2=function(L,P){s((L.negative|P.negative)===0,"red works only with positives"),s(L.red&&L.red===P.red,"red works only with red numbers")},N.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},N.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},N.prototype.add=function(L,P){this._verify2(L,P);var O=L.add(P);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},N.prototype.iadd=function(L,P){this._verify2(L,P);var O=L.iadd(P);return O.cmp(this.m)>=0&&O.isub(this.m),O},N.prototype.sub=function(L,P){this._verify2(L,P);var O=L.sub(P);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},N.prototype.isub=function(L,P){this._verify2(L,P);var O=L.isub(P);return O.cmpn(0)<0&&O.iadd(this.m),O},N.prototype.shl=function(L,P){return this._verify1(L),this.imod(L.ushln(P))},N.prototype.imul=function(L,P){return this._verify2(L,P),this.imod(L.imul(P))},N.prototype.mul=function(L,P){return this._verify2(L,P),this.imod(L.mul(P))},N.prototype.isqr=function(L){return this.imul(L,L.clone())},N.prototype.sqr=function(L){return this.mul(L,L)},N.prototype.sqrt=function(L){if(L.isZero())return L.clone();var P=this.m.andln(3);if(s(P%2===1),P===3){var O=this.m.add(new v(1)).iushrn(2);return this.pow(L,O)}for(var U=this.m.subn(1),X=0;!U.isZero()&&U.andln(1)===0;)X++,U.iushrn(1);s(!U.isZero());var j=new v(1).toRed(this),$=j.redNeg(),Y=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new v(2*q*q).toRed(this);this.pow(q,Y).cmp($)!==0;)q.redIAdd($);for(var Z=this.pow(q,U),ne=this.pow(L,U.addn(1).iushrn(1)),Q=this.pow(L,U),oe=X;Q.cmp(j)!==0;){for(var ee=Q,G=0;ee.cmp(j)!==0;G++)ee=ee.redSqr();s(G=0;X--){for(var Z=P.words[X],ne=q-1;ne>=0;ne--){var Q=Z>>ne&1;if(j!==U[0]&&(j=this.sqr(j)),Q===0&&$===0){Y=0;continue}$<<=1,$|=Q,Y++,!(Y!==O&&(X!==0||ne!==0))&&(j=this.mul(j,U[$]),Y=0,$=0)}q=26}return j},N.prototype.convertTo=function(L){var P=L.umod(this.m);return P===L?P.clone():P},N.prototype.convertFrom=function(L){var P=L.clone();return P.red=null,P},v.mont=function(L){return new I(L)};function I(F){N.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new v(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)}f(I,N),I.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},I.prototype.convertFrom=function(L){var P=this.imod(L.mul(this.rinv));return P.red=null,P},I.prototype.imul=function(L,P){if(L.isZero()||P.isZero())return L.words[0]=0,L.length=1,L;var O=L.imul(P),U=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=O.isub(U).iushrn(this.shift),j=X;return X.cmp(this.m)>=0?j=X.isub(this.m):X.cmpn(0)<0&&(j=X.iadd(this.m)),j._forceRed(this)},I.prototype.mul=function(L,P){if(L.isZero()||P.isZero())return new v(0)._forceRed(this);var O=L.mul(P),U=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=O.isub(U).iushrn(this.shift),j=X;return X.cmp(this.m)>=0?j=X.isub(this.m):X.cmpn(0)<0&&(j=X.iadd(this.m)),j._forceRed(this)},I.prototype.invm=function(L){var P=this.imod(L._invmp(this.m).mul(this.r2));return P._forceRed(this)}}(a,this)},6204:function(a){"use strict";a.exports=o;function o(i){var l,u,s,f=i.length,v=0;for(l=0;l>>1;if(!(p<=0)){var c,A=l.mallocDouble(2*p*d),h=l.mallocInt32(d);if(d=v(k,p,A,h),d>0){if(p===1&&T)u.init(d),c=u.sweepComplete(p,x,0,d,A,h,0,d,A,h);else{var R=l.mallocDouble(2*p*b),E=l.mallocInt32(b);b=v(S,p,R,E),b>0&&(u.init(d+b),p===1?c=u.sweepBipartite(p,x,0,d,A,h,0,b,R,E):c=s(p,x,T,d,A,h,b,R,E),l.free(R),l.free(E))}l.free(A),l.free(h)}return c}}}var _;function y(k,S){_.push([k,S])}function w(k){return _=[],g(k,k,y,!0),_}function M(k,S){return _=[],g(k,S,y,!1),_}function m(k,S,x){switch(arguments.length){case 1:return w(k);case 2:return typeof S=="function"?g(k,k,S,!0):M(k,S);case 3:return g(k,S,x,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(a,o){"use strict";function i(){function s(g,_,y,w,M,m,k,S,x,T,d){for(var b=2*g,p=w,c=b*w;px-S?s(g,_,y,w,M,m,k,S,x,T,d):f(g,_,y,w,M,m,k,S,x,T,d)}return v}function l(){function s(y,w,M,m,k,S,x,T,d,b,p){for(var c=2*y,A=m,h=c*m;Ab-d?m?s(y,w,M,k,S,x,T,d,b,p,c):f(y,w,M,k,S,x,T,d,b,p,c):m?v(y,w,M,k,S,x,T,d,b,p,c):g(y,w,M,k,S,x,T,d,b,p,c)}return _}function u(s){return s?i():l()}o.partial=u(!1),o.full=u(!0)},7150:function(a,o,i){"use strict";a.exports=F;var l=i(1888),u=i(8828),s=i(2455),f=s.partial,v=s.full,g=i(855),_=i(3545),y=i(8105),w=128,M=1<<22,m=1<<22,k=y("!(lo>=p0)&&!(p1>=hi)"),S=y("lo===p0"),x=y("lo0;){Z-=1;var oe=Z*p,ee=h[oe],G=h[oe+1],re=h[oe+2],H=h[oe+3],te=h[oe+4],ue=h[oe+5],de=Z*c,Ee=R[de],Me=R[de+1],ve=ue&1,Ae=!!(ue&16),ke=X,De=j,Ce=Y,Oe=q;if(ve&&(ke=Y,De=q,Ce=X,Oe=j),!(ue&2&&(re=x(L,ee,G,re,ke,De,Me),G>=re))&&!(ue&4&&(G=T(L,ee,G,re,ke,De,Ee),G>=re))){var Ue=re-G,ge=te-H;if(Ae){if(L*Ue*(Ue+ge)y&&M[b+_]>T;--d,b-=k){for(var p=b,c=b+k,A=0;A>>1,T=2*g,d=x,b=M[T*x+_];k=R?(d=h,b=R):A>=D?(d=c,b=A):(d=E,b=D):R>=D?(d=h,b=R):D>=A?(d=c,b=A):(d=E,b=D);for(var F=T*(S-1),L=T*d,N=0;N=p0)&&!(p1>=hi)":_};function i(y){return o[y]}function l(y,w,M,m,k,S,x){for(var T=2*y,d=T*M,b=d,p=M,c=w,A=y+w,h=M;m>h;++h,d+=T){var R=k[d+c];if(R===x)if(p===h)p+=1,b+=T;else{for(var E=0;T>E;++E){var D=k[d+E];k[d+E]=k[b],k[b++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function u(y,w,M,m,k,S,x){for(var T=2*y,d=T*M,b=d,p=M,c=w,A=y+w,h=M;m>h;++h,d+=T){var R=k[d+c];if(RE;++E){var D=k[d+E];k[d+E]=k[b],k[b++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function s(y,w,M,m,k,S,x){for(var T=2*y,d=T*M,b=d,p=M,c=w,A=y+w,h=M;m>h;++h,d+=T){var R=k[d+A];if(R<=x)if(p===h)p+=1,b+=T;else{for(var E=0;T>E;++E){var D=k[d+E];k[d+E]=k[b],k[b++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function f(y,w,M,m,k,S,x){for(var T=2*y,d=T*M,b=d,p=M,c=w,A=y+w,h=M;m>h;++h,d+=T){var R=k[d+A];if(R<=x)if(p===h)p+=1,b+=T;else{for(var E=0;T>E;++E){var D=k[d+E];k[d+E]=k[b],k[b++]=D}var N=S[h];S[h]=S[p],S[p++]=N}}return p}function v(y,w,M,m,k,S,x){for(var T=2*y,d=T*M,b=d,p=M,c=w,A=y+w,h=M;m>h;++h,d+=T){var R=k[d+c],E=k[d+A];if(R<=x&&x<=E)if(p===h)p+=1,b+=T;else{for(var D=0;T>D;++D){var N=k[d+D];k[d+D]=k[b],k[b++]=N}var I=S[h];S[h]=S[p],S[p++]=I}}return p}function g(y,w,M,m,k,S,x){for(var T=2*y,d=T*M,b=d,p=M,c=w,A=y+w,h=M;m>h;++h,d+=T){var R=k[d+c],E=k[d+A];if(RD;++D){var N=k[d+D];k[d+D]=k[b],k[b++]=N}var I=S[h];S[h]=S[p],S[p++]=I}}return p}function _(y,w,M,m,k,S,x,T){for(var d=2*y,b=d*M,p=b,c=M,A=w,h=y+w,R=M;m>R;++R,b+=d){var E=k[b+A],D=k[b+h];if(!(E>=x)&&!(T>=D))if(c===R)c+=1,p+=d;else{for(var N=0;d>N;++N){var I=k[b+N];k[b+N]=k[p],k[p++]=I}var F=S[R];S[R]=S[c],S[c++]=F}}return c}},4192:function(a){"use strict";a.exports=i;var o=32;function i(w,M){M<=4*o?l(0,M-1,w):y(0,M-1,w)}function l(w,M,m){for(var k=2*(w+1),S=w+1;S<=M;++S){for(var x=m[k++],T=m[k++],d=S,b=k-2;d-- >w;){var p=m[b-2],c=m[b-1];if(pm[M+1]:!0}function _(w,M,m,k){w*=2;var S=k[w];return S>1,d=T-k,b=T+k,p=S,c=d,A=T,h=b,R=x,E=w+1,D=M-1,N=0;g(p,c,m)&&(N=p,p=c,c=N),g(h,R,m)&&(N=h,h=R,R=N),g(p,A,m)&&(N=p,p=A,A=N),g(c,A,m)&&(N=c,c=A,A=N),g(p,h,m)&&(N=p,p=h,h=N),g(A,h,m)&&(N=A,A=h,h=N),g(c,R,m)&&(N=c,c=R,R=N),g(c,A,m)&&(N=c,c=A,A=N),g(h,R,m)&&(N=h,h=R,R=N);for(var I=m[2*c],F=m[2*c+1],L=m[2*h],P=m[2*h+1],O=2*p,U=2*A,X=2*R,j=2*S,$=2*T,Y=2*x,q=0;q<2;++q){var Z=m[O+q],ne=m[U+q],Q=m[X+q];m[j+q]=Z,m[$+q]=ne,m[Y+q]=Q}s(d,w,m),s(b,M,m);for(var oe=E;oe<=D;++oe)if(_(oe,I,F,m))oe!==E&&u(oe,E,m),++E;else if(!_(oe,L,P,m))for(;;)if(_(D,L,P,m)){_(D,I,F,m)?(f(oe,E,D,m),++E,--D):(u(oe,D,m),--D);break}else{if(--D>>1;s(k,ne);for(var Q=0,oe=0,$=0;$=f)ee=ee-f|0,x(y,w,oe--,ee);else if(ee>=0)x(g,_,Q--,ee);else if(ee<=-f){ee=-ee-f|0;for(var G=0;G>>1;s(k,ne);for(var Q=0,oe=0,ee=0,$=0;$>1===k[2*$+3]>>1&&(re=2,$+=1),G<0){for(var H=-(G>>1)-1,te=0;te>1)-1;re===0?x(g,_,Q--,H):re===1?x(y,w,oe--,H):re===2&&x(M,m,ee--,H)}}}function p(A,h,R,E,D,N,I,F,L,P,O,U){var X=0,j=2*A,$=h,Y=h+A,q=1,Z=1;E?Z=f:q=f;for(var ne=D;ne>>1;s(k,G);for(var re=0,ne=0;ne=f?(te=!E,Q-=f):(te=!!E,Q-=1),te)T(g,_,re++,Q);else{var ue=U[Q],de=j*Q,Ee=O[de+h+1],Me=O[de+h+1+A];e:for(var ve=0;ve>>1;s(k,Q);for(var oe=0,Y=0;Y=f)g[oe++]=q-f;else{q-=1;var G=O[q],re=X*q,H=P[re+h+1],te=P[re+h+1+A];e:for(var ue=0;ue=0;--ue)if(g[ue]===q){for(var ve=ue+1;ve0;){for(var S=_.pop(),M=_.pop(),x=-1,T=-1,m=w[M],b=1;b=0||(g.flip(M,S),s(v,g,_,x,M,T),s(v,g,_,M,T,x),s(v,g,_,T,S,x),s(v,g,_,S,x,T))}}},5023:function(a,o,i){"use strict";var l=i(2478);a.exports=_;function u(y,w,M,m,k,S,x){this.cells=y,this.neighbor=w,this.flags=m,this.constraint=M,this.active=k,this.next=S,this.boundary=x}var s=u.prototype;function f(y,w){return y[0]-w[0]||y[1]-w[1]||y[2]-w[2]}s.locate=function(){var y=[0,0,0];return function(w,M,m){var k=w,S=M,x=m;return M0||x.length>0;){for(;S.length>0;){var c=S.pop();if(T[c]!==-k){T[c]=k;for(var A=d[c],h=0;h<3;++h){var R=p[3*c+h];R>=0&&T[R]===0&&(b[3*c+h]?x.push(R):(S.push(R),T[R]=k))}}}var E=x;x=S,S=E,x.length=0,k=-k}var D=g(d,T,w);return M?D.concat(m.boundary):D}},8902:function(a,o,i){"use strict";var l=i(2478),u=i(3250)[3],s=0,f=1,v=2;a.exports=x;function g(T,d,b,p,c){this.a=T,this.b=d,this.idx=b,this.lowerIds=p,this.upperIds=c}function _(T,d,b,p){this.a=T,this.b=d,this.type=b,this.idx=p}function y(T,d){var b=T.a[0]-d.a[0]||T.a[1]-d.a[1]||T.type-d.type;return b||T.type!==s&&(b=u(T.a,T.b,d.b),b)?b:T.idx-d.idx}function w(T,d){return u(T.a,T.b,d)}function M(T,d,b,p,c){for(var A=l.lt(d,p,w),h=l.gt(d,p,w),R=A;R1&&u(b[D[I-2]],b[D[I-1]],p)>0;)T.push([D[I-1],D[I-2],c]),I-=1;D.length=I,D.push(c);for(var N=E.upperIds,I=N.length;I>1&&u(b[N[I-2]],b[N[I-1]],p)<0;)T.push([N[I-2],N[I-1],c]),I-=1;N.length=I,N.push(c)}}function m(T,d){var b;return T.a[0]E[0]&&c.push(new _(E,R,v,A),new _(R,E,f,A))}c.sort(y);for(var D=c[0].a[0]-(1+Math.abs(c[0].a[0]))*Math.pow(2,-52),N=[new g([D,1],[D,0],-1,[],[],[],[])],I=[],A=0,F=c.length;A=0}}(),s.removeTriangle=function(g,_,y){var w=this.stars;f(w[g],_,y),f(w[_],y,g),f(w[y],g,_)},s.addTriangle=function(g,_,y){var w=this.stars;w[g].push(_,y),w[_].push(y,g),w[y].push(g,_)},s.opposite=function(g,_){for(var y=this.stars[_],w=1,M=y.length;w=0;--L){var Z=I[L];P=Z[0];var ne=D[P],Q=ne[0],oe=ne[1],ee=E[Q],G=E[oe];if((ee[0]-G[0]||ee[1]-G[1])<0){var re=Q;Q=oe,oe=re}ne[0]=Q;var H=ne[1]=Z[1],te;for(F&&(te=ne[2]);L>0&&I[L-1][0]===P;){var Z=I[--L],ue=Z[1];F?D.push([H,ue,te]):D.push([H,ue]),H=ue}F?D.push([H,oe,te]):D.push([H,oe])}return O}function d(E,D,N){for(var I=D.length,F=new l(I),L=[],P=0;PD[2]?1:0)}function c(E,D,N){if(E.length!==0){if(D)for(var I=0;I0||P.length>0}function R(E,D,N){var I;if(N){I=D;for(var F=new Array(D.length),L=0;LT+1)throw new Error(S+" map requires nshades to be at least size "+k.length);Array.isArray(_.alpha)?_.alpha.length!==2?d=[1,1]:d=_.alpha.slice():typeof _.alpha=="number"?d=[_.alpha,_.alpha]:d=[1,1],y=k.map(function(R){return Math.round(R.index*T)}),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var p=k.map(function(R,E){var D=k[E].index,N=k[E].rgb.slice();return N.length===4&&N[3]>=0&&N[3]<=1||(N[3]=d[0]+(d[1]-d[0])*D),N}),c=[];for(b=0;b=0}function _(y,w,M,m){var k=l(w,M,m);if(k===0){var S=u(l(y,w,M)),x=u(l(y,w,m));if(S===x){if(S===0){var T=g(y,w,M),d=g(y,w,m);return T===d?0:T?1:-1}return 0}else{if(x===0)return S>0||g(y,w,m)?-1:1;if(S===0)return x>0||g(y,w,M)?1:-1}return u(x-S)}var b=l(y,w,M);if(b>0)return k>0&&l(y,w,m)>0?1:-1;if(b<0)return k>0||l(y,w,m)>0?1:-1;var p=l(y,w,m);return p>0||g(y,w,M)?1:-1}},8572:function(a){"use strict";a.exports=function(i){return i<0?-1:i>0?1:0}},8507:function(a){a.exports=l;var o=Math.min;function i(u,s){return u-s}function l(u,s){var f=u.length,v=u.length-s.length;if(v)return v;switch(f){case 0:return 0;case 1:return u[0]-s[0];case 2:return u[0]+u[1]-s[0]-s[1]||o(u[0],u[1])-o(s[0],s[1]);case 3:var g=u[0]+u[1],_=s[0]+s[1];if(v=g+u[2]-(_+s[2]),v)return v;var y=o(u[0],u[1]),w=o(s[0],s[1]);return o(y,u[2])-o(w,s[2])||o(y+u[2],g)-o(w+s[2],_);case 4:var M=u[0],m=u[1],k=u[2],S=u[3],x=s[0],T=s[1],d=s[2],b=s[3];return M+m+k+S-(x+T+d+b)||o(M,m,k,S)-o(x,T,d,b,x)||o(M+m,M+k,M+S,m+k,m+S,k+S)-o(x+T,x+d,x+b,T+d,T+b,d+b)||o(M+m+k,M+m+S,M+k+S,m+k+S)-o(x+T+d,x+T+b,x+d+b,T+d+b);default:for(var p=u.slice().sort(i),c=s.slice().sort(i),A=0;Ai[u][0]&&(u=s);return lu?[[u],[l]]:[[l]]}},4750:function(a,o,i){"use strict";a.exports=u;var l=i(3090);function u(s){var f=l(s),v=f.length;if(v<=2)return[];for(var g=new Array(v),_=f[v-1],y=0;y=_[x]&&(S+=1);m[k]=S}}return g}function v(g,_){try{return l(g,!0)}catch(m){var y=u(g);if(y.length<=_)return[];var w=s(g,y),M=l(w,!0);return f(M,y)}}},4769:function(a){"use strict";function o(l,u,s,f,v,g){var _=6*v*v-6*v,y=3*v*v-4*v+1,w=-6*v*v+6*v,M=3*v*v-2*v;if(l.length){g||(g=new Array(l.length));for(var m=l.length-1;m>=0;--m)g[m]=_*l[m]+y*u[m]+w*s[m]+M*f[m];return g}return _*l+y*u+w*s[m]+M*f}function i(l,u,s,f,v,g){var _=v-1,y=v*v,w=_*_,M=(1+2*v)*w,m=v*w,k=y*(3-2*v),S=y*_;if(l.length){g||(g=new Array(l.length));for(var x=l.length-1;x>=0;--x)g[x]=M*l[x]+m*u[x]+k*s[x]+S*f[x];return g}return M*l+m*u+k*s+S*f}a.exports=i,a.exports.derivative=o},7642:function(a,o,i){"use strict";var l=i(8954),u=i(1682);a.exports=g;function s(_,y){this.point=_,this.index=y}function f(_,y){for(var w=_.point,M=y.point,m=w.length,k=0;k=2)return!1;N[F]=L}return!0}):D=D.filter(function(N){for(var I=0;I<=M;++I){var F=A[N[I]];if(F<0)return!1;N[I]=F}return!0}),M&1)for(var S=0;S>>31},a.exports.exponent=function(k){var S=a.exports.hi(k);return(S<<1>>>21)-1023},a.exports.fraction=function(k){var S=a.exports.lo(k),x=a.exports.hi(k),T=x&(1<<20)-1;return x&2146435072&&(T+=1048576),[S,T]},a.exports.denormalized=function(k){var S=a.exports.hi(k);return!(S&2146435072)}},1338:function(a){"use strict";function o(u,s,f){var v=u[f]|0;if(v<=0)return[];var g=new Array(v),_;if(f===u.length-1)for(_=0;_0)return i(u|0,s);break;case"object":if(typeof u.length=="number")return o(u,s,0);break}return[]}a.exports=l},3134:function(a,o,i){"use strict";a.exports=u;var l=i(1682);function u(s,f){var v=s.length;if(typeof f!="number"){f=0;for(var g=0;g=M-1)for(var b=S.length-1,c=y-w[M-1],p=0;p=M-1)for(var d=S.length-1,b=y-w[M-1],p=0;p=0;--M)if(y[--w])return!1;return!0},v.jump=function(y){var w=this.lastT(),M=this.dimension;if(!(y0;--p)m.push(s(T[p-1],d[p-1],arguments[p])),k.push(0)}},v.push=function(y){var w=this.lastT(),M=this.dimension;if(!(y1e-6?1/x:0;this._time.push(y);for(var c=M;c>0;--c){var A=s(d[c-1],b[c-1],arguments[c]);m.push(A),k.push((A-m[S++])*p)}}},v.set=function(y){var w=this.dimension;if(!(y0;--T)M.push(s(S[T-1],x[T-1],arguments[T])),m.push(0)}},v.move=function(y){var w=this.lastT(),M=this.dimension;if(!(y<=w||arguments.length!==M+1)){var m=this._state,k=this._velocity,S=m.length-this.dimension,x=this.bounds,T=x[0],d=x[1],b=y-w,p=b>1e-6?1/b:0;this._time.push(y);for(var c=M;c>0;--c){var A=arguments[c];m.push(s(T[c-1],d[c-1],m[S++]+A)),k.push(A*p)}}},v.idle=function(y){var w=this.lastT();if(!(y=0;--p)m.push(s(T[p],d[p],m[S]+b*k[S])),k.push(0),S+=1}};function g(y){for(var w=new Array(y),M=0;M=0;--E){var c=A[E];h[E]<=0?A[E]=new l(c._color,c.key,c.value,A[E+1],c.right,c._count+1):A[E]=new l(c._color,c.key,c.value,c.left,A[E+1],c._count+1)}for(var E=A.length-1;E>1;--E){var D=A[E-1],c=A[E];if(D._color===i||c._color===i)break;var N=A[E-2];if(N.left===D)if(D.left===c){var I=N.right;if(I&&I._color===o)D._color=i,N.right=s(i,I),N._color=o,E-=1;else{if(N._color=o,N.left=D.right,D._color=i,D.right=N,A[E-2]=D,A[E-1]=c,f(N),f(D),E>=3){var F=A[E-3];F.left===N?F.left=D:F.right=D}break}}else{var I=N.right;if(I&&I._color===o)D._color=i,N.right=s(i,I),N._color=o,E-=1;else{if(D.right=c.left,N._color=o,N.left=c.right,c._color=i,c.left=D,c.right=N,A[E-2]=c,A[E-1]=D,f(N),f(D),f(c),E>=3){var F=A[E-3];F.left===N?F.left=c:F.right=c}break}}else if(D.right===c){var I=N.left;if(I&&I._color===o)D._color=i,N.left=s(i,I),N._color=o,E-=1;else{if(N._color=o,N.right=D.left,D._color=i,D.left=N,A[E-2]=D,A[E-1]=c,f(N),f(D),E>=3){var F=A[E-3];F.right===N?F.right=D:F.left=D}break}}else{var I=N.left;if(I&&I._color===o)D._color=i,N.left=s(i,I),N._color=o,E-=1;else{if(D.left=c.right,N._color=o,N.right=c.left,c._color=i,c.right=D,c.left=N,A[E-2]=c,A[E-1]=D,f(N),f(D),f(c),E>=3){var F=A[E-3];F.right===N?F.right=c:F.left=c}break}}}return A[0]._color=i,new v(p,A[0])};function _(d,b){if(b.left){var p=_(d,b.left);if(p)return p}var p=d(b.key,b.value);if(p)return p;if(b.right)return _(d,b.right)}function y(d,b,p,c){var A=b(d,c.key);if(A<=0){if(c.left){var h=y(d,b,p,c.left);if(h)return h}var h=p(c.key,c.value);if(h)return h}if(c.right)return y(d,b,p,c.right)}function w(d,b,p,c,A){var h=p(d,A.key),R=p(b,A.key),E;if(h<=0&&(A.left&&(E=w(d,b,p,c,A.left),E)||R>0&&(E=c(A.key,A.value),E)))return E;if(R>0&&A.right)return w(d,b,p,c,A.right)}g.forEach=function(b,p,c){if(this.root)switch(arguments.length){case 1:return _(b,this.root);case 2:return y(p,this._compare,b,this.root);case 3:return this._compare(p,c)>=0?void 0:w(p,c,this._compare,b,this.root)}},Object.defineProperty(g,"begin",{get:function(){for(var d=[],b=this.root;b;)d.push(b),b=b.left;return new M(this,d)}}),Object.defineProperty(g,"end",{get:function(){for(var d=[],b=this.root;b;)d.push(b),b=b.right;return new M(this,d)}}),g.at=function(d){if(d<0)return new M(this,[]);for(var b=this.root,p=[];;){if(p.push(b),b.left){if(d=b.right._count)break;b=b.right}else break}return new M(this,[])},g.ge=function(d){for(var b=this._compare,p=this.root,c=[],A=0;p;){var h=b(d,p.key);c.push(p),h<=0&&(A=c.length),h<=0?p=p.left:p=p.right}return c.length=A,new M(this,c)},g.gt=function(d){for(var b=this._compare,p=this.root,c=[],A=0;p;){var h=b(d,p.key);c.push(p),h<0&&(A=c.length),h<0?p=p.left:p=p.right}return c.length=A,new M(this,c)},g.lt=function(d){for(var b=this._compare,p=this.root,c=[],A=0;p;){var h=b(d,p.key);c.push(p),h>0&&(A=c.length),h<=0?p=p.left:p=p.right}return c.length=A,new M(this,c)},g.le=function(d){for(var b=this._compare,p=this.root,c=[],A=0;p;){var h=b(d,p.key);c.push(p),h>=0&&(A=c.length),h<0?p=p.left:p=p.right}return c.length=A,new M(this,c)},g.find=function(d){for(var b=this._compare,p=this.root,c=[];p;){var A=b(d,p.key);if(c.push(p),A===0)return new M(this,c);A<=0?p=p.left:p=p.right}return new M(this,[])},g.remove=function(d){var b=this.find(d);return b?b.remove():this},g.get=function(d){for(var b=this._compare,p=this.root;p;){var c=b(d,p.key);if(c===0)return p.value;c<=0?p=p.left:p=p.right}};function M(d,b){this.tree=d,this._stack=b}var m=M.prototype;Object.defineProperty(m,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(m,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),m.clone=function(){return new M(this.tree,this._stack.slice())};function k(d,b){d.key=b.key,d.value=b.value,d.left=b.left,d.right=b.right,d._color=b._color,d._count=b._count}function S(d){for(var b,p,c,A,h=d.length-1;h>=0;--h){if(b=d[h],h===0){b._color=i;return}if(p=d[h-1],p.left===b){if(c=p.right,c.right&&c.right._color===o){if(c=p.right=u(c),A=c.right=u(c.right),p.right=c.left,c.left=p,c.right=A,c._color=p._color,b._color=i,p._color=i,A._color=i,f(p),f(c),h>1){var R=d[h-2];R.left===p?R.left=c:R.right=c}d[h-1]=c;return}else if(c.left&&c.left._color===o){if(c=p.right=u(c),A=c.left=u(c.left),p.right=A.left,c.left=A.right,A.left=p,A.right=c,A._color=p._color,p._color=i,c._color=i,b._color=i,f(p),f(c),f(A),h>1){var R=d[h-2];R.left===p?R.left=A:R.right=A}d[h-1]=A;return}if(c._color===i)if(p._color===o){p._color=i,p.right=s(o,c);return}else{p.right=s(o,c);continue}else{if(c=u(c),p.right=c.left,c.left=p,c._color=p._color,p._color=o,f(p),f(c),h>1){var R=d[h-2];R.left===p?R.left=c:R.right=c}d[h-1]=c,d[h]=p,h+11){var R=d[h-2];R.right===p?R.right=c:R.left=c}d[h-1]=c;return}else if(c.right&&c.right._color===o){if(c=p.left=u(c),A=c.right=u(c.right),p.left=A.right,c.right=A.left,A.right=p,A.left=c,A._color=p._color,p._color=i,c._color=i,b._color=i,f(p),f(c),f(A),h>1){var R=d[h-2];R.right===p?R.right=A:R.left=A}d[h-1]=A;return}if(c._color===i)if(p._color===o){p._color=i,p.left=s(o,c);return}else{p.left=s(o,c);continue}else{if(c=u(c),p.left=c.right,c.right=p,c._color=p._color,p._color=o,f(p),f(c),h>1){var R=d[h-2];R.right===p?R.right=c:R.left=c}d[h-1]=c,d[h]=p,h+1=0;--c){var p=d[c];p.left===d[c+1]?b[c]=new l(p._color,p.key,p.value,b[c+1],p.right,p._count):b[c]=new l(p._color,p.key,p.value,p.left,b[c+1],p._count)}if(p=b[b.length-1],p.left&&p.right){var A=b.length;for(p=p.left;p.right;)b.push(p),p=p.right;var h=b[A-1];b.push(new l(p._color,h.key,h.value,p.left,p.right,p._count)),b[A-1].key=p.key,b[A-1].value=p.value;for(var c=b.length-2;c>=A;--c)p=b[c],b[c]=new l(p._color,p.key,p.value,p.left,b[c+1],p._count);b[A-1].left=b[A]}if(p=b[b.length-1],p._color===o){var R=b[b.length-2];R.left===p?R.left=null:R.right===p&&(R.right=null),b.pop();for(var c=0;c0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(m,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(m,"index",{get:function(){var d=0,b=this._stack;if(b.length===0){var p=this.tree.root;return p?p._count:0}else b[b.length-1].left&&(d=b[b.length-1].left._count);for(var c=b.length-2;c>=0;--c)b[c+1]===b[c].right&&(++d,b[c].left&&(d+=b[c].left._count));return d},enumerable:!0}),m.next=function(){var d=this._stack;if(d.length!==0){var b=d[d.length-1];if(b.right)for(b=b.right;b;)d.push(b),b=b.left;else for(d.pop();d.length>0&&d[d.length-1].right===b;)b=d[d.length-1],d.pop()}},Object.defineProperty(m,"hasNext",{get:function(){var d=this._stack;if(d.length===0)return!1;if(d[d.length-1].right)return!0;for(var b=d.length-1;b>0;--b)if(d[b-1].left===d[b])return!0;return!1}}),m.update=function(d){var b=this._stack;if(b.length===0)throw new Error("Can't update empty node!");var p=new Array(b.length),c=b[b.length-1];p[p.length-1]=new l(c._color,c.key,d,c.left,c.right,c._count);for(var A=b.length-2;A>=0;--A)c=b[A],c.left===b[A+1]?p[A]=new l(c._color,c.key,c.value,p[A+1],c.right,c._count):p[A]=new l(c._color,c.key,c.value,c.left,p[A+1],c._count);return new v(this.tree._compare,p[0])},m.prev=function(){var d=this._stack;if(d.length!==0){var b=d[d.length-1];if(b.left)for(b=b.left;b;)d.push(b),b=b.right;else for(d.pop();d.length>0&&d[d.length-1].left===b;)b=d[d.length-1],d.pop()}},Object.defineProperty(m,"hasPrev",{get:function(){var d=this._stack;if(d.length===0)return!1;if(d[d.length-1].left)return!0;for(var b=d.length-1;b>0;--b)if(d[b-1].right===d[b])return!0;return!1}});function x(d,b){return db?1:0}function T(d){return new v(d||x,null)}},3837:function(a,o,i){"use strict";a.exports=E;var l=i(4935),u=i(501),s=i(5304),f=i(6429),v=i(6444),g=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),_=ArrayBuffer,y=DataView;function w(D){return _.isView(D)&&!(D instanceof y)}function M(D){return Array.isArray(D)||w(D)}function m(D,N){return D[0]=N[0],D[1]=N[1],D[2]=N[2],D}function k(D){this.gl=D,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=s(D)}var S=k.prototype;S.update=function(D){D=D||{};function N(Q,oe,ee){if(ee in D){var G=D[ee],re=this[ee],H;(Q?M(G)&&M(G[0]):M(G))?this[ee]=H=[oe(G[0]),oe(G[1]),oe(G[2])]:this[ee]=H=[oe(G),oe(G),oe(G)];for(var te=0;te<3;++te)if(H[te]!==re[te])return!0}return!1}var I=N.bind(this,!1,Number),F=N.bind(this,!1,Boolean),L=N.bind(this,!1,String),P=N.bind(this,!0,function(Q){if(M(Q)){if(Q.length===3)return[+Q[0],+Q[1],+Q[2],1];if(Q.length===4)return[+Q[0],+Q[1],+Q[2],+Q[3]]}return[0,0,0,1]}),O,U=!1,X=!1;if("bounds"in D)for(var j=D.bounds,$=0;$<2;++$)for(var Y=0;Y<3;++Y)j[$][Y]!==this.bounds[$][Y]&&(X=!0),this.bounds[$][Y]=j[$][Y];if("ticks"in D){O=D.ticks,U=!0,this.autoTicks=!1;for(var $=0;$<3;++$)this.tickSpacing[$]=0}else I("tickSpacing")&&(this.autoTicks=!0,X=!0);if(this._firstInit&&("ticks"in D||"tickSpacing"in D||(this.autoTicks=!0),X=!0,U=!0,this._firstInit=!1),X&&this.autoTicks&&(O=v.create(this.bounds,this.tickSpacing),U=!0),U){for(var $=0;$<3;++$)O[$].sort(function(oe,ee){return oe.x-ee.x});v.equal(O,this.ticks)?U=!1:this.ticks=O}F("tickEnable"),L("tickFont")&&(U=!0),L("tickFontStyle")&&(U=!0),L("tickFontWeight")&&(U=!0),L("tickFontVariant")&&(U=!0),I("tickSize"),I("tickAngle"),I("tickPad"),P("tickColor");var q=L("labels");L("labelFont")&&(q=!0),L("labelFontStyle")&&(q=!0),L("labelFontWeight")&&(q=!0),L("labelFontVariant")&&(q=!0),F("labelEnable"),I("labelSize"),I("labelPad"),P("labelColor"),F("lineEnable"),F("lineMirror"),I("lineWidth"),P("lineColor"),F("lineTickEnable"),F("lineTickMirror"),I("lineTickLength"),I("lineTickWidth"),P("lineTickColor"),F("gridEnable"),I("gridWidth"),P("gridColor"),F("zeroEnable"),P("zeroLineColor"),I("zeroLineWidth"),F("backgroundEnable"),P("backgroundColor");var Z=[{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]}],ne=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(q||U)&&this._text.update(this.bounds,this.labels,Z,this.ticks,ne):this._text=l(this.gl,this.bounds,this.labels,Z,this.ticks,ne),this._lines&&U&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function x(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var T=[new x,new x,new x];function d(D,N,I,F,L){for(var P=D.primalOffset,O=D.primalMinor,U=D.mirrorOffset,X=D.mirrorMinor,j=F[N],$=0;$<3;++$)if(N!==$){var Y=P,q=U,Z=O,ne=X;j&1<<$&&(Y=U,q=P,Z=X,ne=O),Y[$]=I[0][$],q[$]=I[1][$],L[$]>0?(Z[$]=-1,ne[$]=0):(Z[$]=0,ne[$]=1)}}var b=[0,0,0],p={model:g,view:g,projection:g,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(D){};var c=0,A=[0,0,0],h=[0,0,0],R=[0,0,0];S.draw=function(D){D=D||p;for(var ee=this.gl,N=D.model||g,I=D.view||g,F=D.projection||g,L=this.bounds,P=D._ortho||!1,O=f(N,I,F,L,P),U=O.cubeEdges,X=O.axis,j=I[12],$=I[13],Y=I[14],q=I[15],Z=P?2:1,ne=Z*this.pixelRatio*(F[3]*j+F[7]*$+F[11]*Y+F[15]*q)/ee.drawingBufferHeight,Q=0;Q<3;++Q)this.lastCubeProps.cubeEdges[Q]=U[Q],this.lastCubeProps.axis[Q]=X[Q];for(var oe=T,Q=0;Q<3;++Q)d(T[Q],Q,this.bounds,U,X);for(var ee=this.gl,G=b,Q=0;Q<3;++Q)this.backgroundEnable[Q]?G[Q]=X[Q]:G[Q]=0;this._background.draw(N,I,F,L,G,this.backgroundColor),this._lines.bind(N,I,F,this);for(var Q=0;Q<3;++Q){var re=[0,0,0];X[Q]>0?re[Q]=L[1][Q]:re[Q]=L[0][Q];for(var H=0;H<2;++H){var te=(Q+1+H)%3,ue=(Q+1+(H^1))%3;this.gridEnable[te]&&this._lines.drawGrid(te,ue,this.bounds,re,this.gridColor[te],this.gridWidth[te]*this.pixelRatio)}for(var H=0;H<2;++H){var te=(Q+1+H)%3,ue=(Q+1+(H^1))%3;this.zeroEnable[ue]&&Math.min(L[0][ue],L[1][ue])<=0&&Math.max(L[0][ue],L[1][ue])>=0&&this._lines.drawZero(te,ue,this.bounds,re,this.zeroLineColor[ue],this.zeroLineWidth[ue]*this.pixelRatio)}}for(var Q=0;Q<3;++Q){this.lineEnable[Q]&&this._lines.drawAxisLine(Q,this.bounds,oe[Q].primalOffset,this.lineColor[Q],this.lineWidth[Q]*this.pixelRatio),this.lineMirror[Q]&&this._lines.drawAxisLine(Q,this.bounds,oe[Q].mirrorOffset,this.lineColor[Q],this.lineWidth[Q]*this.pixelRatio);for(var de=m(A,oe[Q].primalMinor),Ee=m(h,oe[Q].mirrorMinor),Me=this.lineTickLength,H=0;H<3;++H){var ve=ne/N[5*H];de[H]*=Me[H]*ve,Ee[H]*=Me[H]*ve}this.lineTickEnable[Q]&&this._lines.drawAxisTicks(Q,oe[Q].primalOffset,de,this.lineTickColor[Q],this.lineTickWidth[Q]*this.pixelRatio),this.lineTickMirror[Q]&&this._lines.drawAxisTicks(Q,oe[Q].mirrorOffset,Ee,this.lineTickColor[Q],this.lineTickWidth[Q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(N,I,F,this.pixelRatio);var Ae,ke=.5,De,Ce;function Oe(Le){Ce=[0,0,0],Ce[Le]=1}function Ue(Le,me,he){var be=(Le+1)%3,Se=(Le+2)%3,ze=me[be],Fe=me[Se],Je=he[be],Ye=he[Se];if(ze>0&&Ye>0){Oe(be);return}else if(ze>0&&Ye<0){Oe(be);return}else if(ze<0&&Ye>0){Oe(be);return}else if(ze<0&&Ye<0){Oe(be);return}else if(Fe>0&&Je>0){Oe(Se);return}else if(Fe>0&&Je<0){Oe(Se);return}else if(Fe<0&&Je>0){Oe(Se);return}else if(Fe<0&&Je<0){Oe(Se);return}}for(var Q=0;Q<3;++Q){for(var ge=oe[Q].primalMinor,Te=oe[Q].mirrorMinor,ce=m(R,oe[Q].primalOffset),H=0;H<3;++H)this.lineTickEnable[Q]&&(ce[H]+=ne*ge[H]*Math.max(this.lineTickLength[H],0)/N[5*H]);var ye=[0,0,0];if(ye[Q]=1,this.tickEnable[Q]){this.tickAngle[Q]===-3600?(this.tickAngle[Q]=0,this.tickAlign[Q]="auto"):this.tickAlign[Q]=-1,De=1,Ae=[this.tickAlign[Q],ke,De],Ae[0]==="auto"?Ae[0]=c:Ae[0]=parseInt(""+Ae[0]),Ce=[0,0,0],Ue(Q,ge,Te);for(var H=0;H<3;++H)ce[H]+=ne*ge[H]*this.tickPad[H]/N[5*H];this._text.drawTicks(Q,this.tickSize[Q],this.tickAngle[Q],ce,this.tickColor[Q],ye,Ce,Ae)}if(this.labelEnable[Q]){De=0,Ce=[0,0,0],this.labels[Q].length>4&&(Oe(Q),De=1),Ae=[this.labelAlign[Q],ke,De],Ae[0]==="auto"?Ae[0]=c:Ae[0]=parseInt(""+Ae[0]);for(var H=0;H<3;++H)ce[H]+=ne*ge[H]*this.labelPad[H]/N[5*H];ce[Q]+=.5*(L[0][Q]+L[1][Q]),this._text.drawLabel(Q,this.labelSize[Q],this.labelAngle[Q],ce,this.labelColor[Q],[0,0,0],Ce,Ae)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function E(D,N){var I=new k(D);return I.update(N),I}},5304:function(a,o,i){"use strict";a.exports=g;var l=i(2762),u=i(8116),s=i(1879).bg;function f(_,y,w,M){this.gl=_,this.buffer=y,this.vao=w,this.shader=M}var v=f.prototype;v.draw=function(_,y,w,M,m,k){for(var S=!1,x=0;x<3;++x)S=S||m[x];if(S){var T=this.gl;T.enable(T.POLYGON_OFFSET_FILL),T.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:_,view:y,projection:w,bounds:M,enable:m,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),T.disable(T.POLYGON_OFFSET_FILL)}},v.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function g(_){for(var y=[],w=[],M=0,m=0;m<3;++m)for(var k=(m+1)%3,S=(m+2)%3,x=[0,0,0],T=[0,0,0],d=-1;d<=1;d+=2){w.push(M,M+2,M+1,M+1,M+2,M+3),x[m]=d,T[m]=d;for(var b=-1;b<=1;b+=2){x[k]=b;for(var p=-1;p<=1;p+=2)x[S]=p,y.push(x[0],x[1],x[2],T[0],T[1],T[2]),M+=1}var c=k;k=S,S=c}var A=l(_,new Float32Array(y)),h=l(_,new Uint16Array(w),_.ELEMENT_ARRAY_BUFFER),R=u(_,[{buffer:A,type:_.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:_.FLOAT,size:3,offset:12,stride:24}],h),E=s(_);return E.attributes.position.location=0,E.attributes.normal.location=1,new f(_,A,R,E)}},6429:function(a,o,i){"use strict";a.exports=d;var l=i(8828),u=i(6760),s=i(5202),f=i(3250),v=new Array(16),g=new Array(8),_=new Array(8),y=new Array(3),w=[0,0,0];(function(){for(var b=0;b<8;++b)g[b]=[1,1,1,1],_[b]=[1,1,1]})();function M(b,p,c){for(var A=0;A<4;++A){b[A]=c[12+A];for(var h=0;h<3;++h)b[A]+=p[h]*c[4*h+A]}}var m=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function k(b){for(var p=0;pX&&(I|=1<X){I|=1<_[E][1])&&(oe=E);for(var ee=-1,E=0;E<3;++E){var G=oe^1<_[re][0]&&(re=G)}}var H=S;H[0]=H[1]=H[2]=0,H[l.log2(ee^oe)]=oe&ee,H[l.log2(oe^re)]=oe&re;var te=re^7;te===I||te===Q?(te=ee^7,H[l.log2(re^te)]=te&re):H[l.log2(ee^te)]=teⅇfor(var ue=x,de=I,P=0;P<3;++P)de&1<=0;--H){var te=Q[re[H]];p.push(ne*te[0],-ne*te[1],P)}}for(var k=[0,0,0],h=[0,0,0],R=[0,0,0],E=[0,0,0],D=1.25,N={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){R[I]=p.length/b|0,c(.5*(S[0][I]+S[1][I]),x[I],T[I],12,D,N),E[I]=(p.length/b|0)-R[I],k[I]=p.length/b|0;for(var F=0;F=0&&(b=v.length-g-1);var y=Math.pow(10,b),w=Math.round(s*f*y),M=w+"";if(M.indexOf("e")>=0)return M;var m=w/y,A=w%y;w<0?(m=-Math.ceil(m)|0,A=-A|0):(m=Math.floor(m)|0,A=A|0);var S=""+m;if(w<0&&(S="-"+S),b){for(var x=""+A;x.length=s[0][g];--w)b.push({x:w*f[g],text:i(f[g],w)});v.push(b)}return v}function u(s,f){for(var v=0;v<3;++v){if(s[v].length!==f[v].length)return!1;for(var g=0;gS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return m.bufferSubData(A,d,T),S}function y(m,A){for(var S=l.malloc(m.length,A),x=m.length,T=0;T=0;--x){if(A[x]!==S)return!1;S*=m[x]}return!0}g.update=function(m,A){if(typeof A!="number"&&(A=-1),this.bind(),typeof m=="object"&&typeof m.shape!="undefined"){var S=m.dtype;if(f.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var x=gl.getExtension("OES_element_index_uint");x&&S!=="uint16"?S="uint32":S="uint16"}if(S===m.dtype&&w(m.shape,m.stride))m.offset===0&&m.data.length===m.shape[0]?this.length=b(this.gl,this.type,this.length,this.usage,m.data,A):this.length=b(this.gl,this.type,this.length,this.usage,m.data.subarray(m.offset,m.shape[0]),A);else{var T=l.malloc(m.size,S),d=s(T,m.shape);u.assign(d,m),A<0?this.length=b(this.gl,this.type,this.length,this.usage,T,A):this.length=b(this.gl,this.type,this.length,this.usage,T.subarray(0,m.size),A),l.free(T)}}else if(Array.isArray(m)){var _;this.type===this.gl.ELEMENT_ARRAY_BUFFER?_=y(m,"uint16"):_=y(m,"float32"),A<0?this.length=b(this.gl,this.type,this.length,this.usage,_,A):this.length=b(this.gl,this.type,this.length,this.usage,_.subarray(0,m.length),A),l.free(_)}else if(typeof m=="object"&&typeof m.length=="number")this.length=b(this.gl,this.type,this.length,this.usage,m,A);else if(typeof m=="number"||m===void 0){if(A>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");m=m|0,m<=0&&(m=1),this.gl.bufferData(this.type,m|0,this.usage),this.length=m}else throw new Error("gl-buffer: Invalid data type")};function M(m,A,S,x){if(S=S||m.ARRAY_BUFFER,x=x||m.DYNAMIC_DRAW,S!==m.ARRAY_BUFFER&&S!==m.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(x!==m.DYNAMIC_DRAW&&x!==m.STATIC_DRAW&&x!==m.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 T=m.createBuffer(),d=new v(m,S,T,0,x);return d.update(A),d}a.exports=M},6405:function(a,o,i){"use strict";var l=i(2931);a.exports=function(s,f){var v=s.positions,g=s.vectors,b={positions:[],vertexIntensity:[],vertexIntensityBounds:s.vertexIntensityBounds,vectors:[],cells:[],coneOffset:s.coneOffset,colormap:s.colormap};if(s.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),b;for(var y=0,w=1/0,M=-1/0,m=1/0,A=-1/0,S=1/0,x=-1/0,T=null,d=null,_=[],p=1/0,c=!1,k=s.coneSizemode==="raw",h=0;hy&&(y=l.length(E)),h&&!k){var D=2*l.distance(T,R)/(l.length(d)+l.length(E));D?(p=Math.min(p,D),c=!1):c=!0}c||(T=R,d=E),_.push(E)}var N=[w,m,S],I=[M,A,x];f&&(f[0]=N,f[1]=I),y===0&&(y=1);var F=1/y;isFinite(p)||(p=1),b.vectorScale=p;var L=s.coneSize||(k?1:.5);s.absoluteConeSize&&(L=s.absoluteConeSize*F),b.coneScale=L;for(var h=0,P=0;h=1},m.isTransparent=function(){return this.opacity<1},m.pickSlots=1,m.setPickBase=function(_){this.pickId=_};function A(_){for(var p=y({colormap:_,nshades:256,format:"rgba"}),c=new Uint8Array(256*4),k=0;k<256;++k){for(var h=p[k],R=0;R<3;++R)c[4*k+R]=h[R];c[4*k+3]=h[3]*255}return b(c,[256,256,4],[4,0,1])}function S(_){for(var p=_.length,c=new Array(p),k=0;k0){var P=this.triShader;P.bind(),P.uniforms=D,this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},m.drawPick=function(_){_=_||{};for(var p=this.gl,c=_.model||w,k=_.view||w,h=_.projection||w,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)R[0][E]=Math.max(R[0][E],this.clipBounds[0][E]),R[1][E]=Math.min(R[1][E],this.clipBounds[1][E]);this._model=[].slice.call(c),this._view=[].slice.call(k),this._projection=[].slice.call(h),this._resolution=[p.drawingBufferWidth,p.drawingBufferHeight];var D={model:c,view:k,projection:h,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},N=this.pickShader;N.bind(),N.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},m.pick=function(_){if(!_||_.id!==this.pickId)return null;var p=_.value[0]+256*_.value[1]+65536*_.value[2],c=this.cells[p],k=this.positions[c[1]].slice(0,3),h={position:k,dataCoordinate:k,index:Math.floor(c[1]/48)};return this.traceType==="cone"?h.index=Math.floor(c[1]/48):this.traceType==="streamtube"&&(h.intensity=this.intensity[c[1]],h.velocity=this.vectors[c[1]].slice(0,3),h.divergence=this.vectors[c[1]][3],h.index=p),h},m.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 x(_,p){var c=l(_,p.meshShader.vertex,p.meshShader.fragment,null,p.meshShader.attributes);return c.attributes.position.location=0,c.attributes.color.location=2,c.attributes.uv.location=3,c.attributes.vector.location=4,c}function T(_,p){var c=l(_,p.pickShader.vertex,p.pickShader.fragment,null,p.pickShader.attributes);return c.attributes.position.location=0,c.attributes.id.location=1,c.attributes.vector.location=4,c}function d(_,p,c){var k=c.shaders;arguments.length===1&&(p=_,_=p.gl);var h=x(_,k),R=T(_,k),E=f(_,b(new Uint8Array([255,255,255,255]),[1,1,4]));E.generateMipmap(),E.minFilter=_.LINEAR_MIPMAP_LINEAR,E.magFilter=_.LINEAR;var D=u(_),N=u(_),I=u(_),F=u(_),L=u(_),P=s(_,[{buffer:D,type:_.FLOAT,size:4},{buffer:L,type:_.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:_.FLOAT,size:4},{buffer:F,type:_.FLOAT,size:2},{buffer:N,type:_.FLOAT,size:4}]),O=new M(_,E,h,R,D,N,L,I,F,P,c.traceType||"cone");return O.update(p),O}a.exports=d},614:function(a,o,i){var l=i(3236),u=l([`precision highp float; +}`]);o.bg=function(w){return u(w,_,y,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(a,o,i){"use strict";a.exports=k;var l=i(2762),u=i(8116),s=i(4359),f=i(1879).Q,v=window||process.global||{},g=v.__TEXT_CACHE||{};v.__TEXT_CACHE={};var _=3;function y(S,x,T,d){this.gl=S,this.shader=x,this.buffer=T,this.vao=d,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var w=y.prototype,M=[0,0];w.bind=function(S,x,T,d){this.vao.bind(),this.shader.bind();var b=this.shader.uniforms;b.model=S,b.view=x,b.projection=T,b.pixelScale=d,M[0]=this.gl.drawingBufferWidth,M[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=M},w.unbind=function(){this.vao.unbind()},w.update=function(S,x,T,d,b){var p=[];function c(P,O,U,X,j,$){var Y=[U.style,U.weight,U.variant,U.family].join("_"),q=g[Y];q||(q=g[Y]={});var Z=q[O];Z||(Z=q[O]=m(O,{triangles:!0,font:U.family,fontStyle:U.style,fontWeight:U.weight,fontVariant:U.variant,textAlign:"center",textBaseline:"middle",lineSpacing:j,styletags:$}));for(var ne=(X||12)/12,Q=Z.positions,oe=Z.cells,ee=0,G=oe.length;ee=0;--H){var te=Q[re[H]];p.push(ne*te[0],-ne*te[1],P)}}for(var A=[0,0,0],h=[0,0,0],R=[0,0,0],E=[0,0,0],D=1.25,N={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){R[I]=p.length/_|0,c(.5*(S[0][I]+S[1][I]),x[I],T[I],12,D,N),E[I]=(p.length/_|0)-R[I],A[I]=p.length/_|0;for(var F=0;F=0&&(_=v.length-g-1);var y=Math.pow(10,_),w=Math.round(s*f*y),M=w+"";if(M.indexOf("e")>=0)return M;var m=w/y,k=w%y;w<0?(m=-Math.ceil(m)|0,k=-k|0):(m=Math.floor(m)|0,k=k|0);var S=""+m;if(w<0&&(S="-"+S),_){for(var x=""+k;x.length<_;)x="0"+x;return S+"."+x}else return S}function l(s,f){for(var v=[],g=0;g<3;++g){for(var _=[],y=.5*(s[0][g]+s[1][g]),w=0;w*f[g]<=s[1][g];++w)_.push({x:w*f[g],text:i(f[g],w)});for(var w=-1;w*f[g]>=s[0][g];--w)_.push({x:w*f[g],text:i(f[g],w)});v.push(_)}return v}function u(s,f){for(var v=0;v<3;++v){if(s[v].length!==f[v].length)return!1;for(var g=0;gS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return m.bufferSubData(k,d,T),S}function y(m,k){for(var S=l.malloc(m.length,k),x=m.length,T=0;T=0;--x){if(k[x]!==S)return!1;S*=m[x]}return!0}g.update=function(m,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof m=="object"&&typeof m.shape!="undefined"){var S=m.dtype;if(f.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var x=gl.getExtension("OES_element_index_uint");x&&S!=="uint16"?S="uint32":S="uint16"}if(S===m.dtype&&w(m.shape,m.stride))m.offset===0&&m.data.length===m.shape[0]?this.length=_(this.gl,this.type,this.length,this.usage,m.data,k):this.length=_(this.gl,this.type,this.length,this.usage,m.data.subarray(m.offset,m.shape[0]),k);else{var T=l.malloc(m.size,S),d=s(T,m.shape);u.assign(d,m),k<0?this.length=_(this.gl,this.type,this.length,this.usage,T,k):this.length=_(this.gl,this.type,this.length,this.usage,T.subarray(0,m.size),k),l.free(T)}}else if(Array.isArray(m)){var b;this.type===this.gl.ELEMENT_ARRAY_BUFFER?b=y(m,"uint16"):b=y(m,"float32"),k<0?this.length=_(this.gl,this.type,this.length,this.usage,b,k):this.length=_(this.gl,this.type,this.length,this.usage,b.subarray(0,m.length),k),l.free(b)}else if(typeof m=="object"&&typeof m.length=="number")this.length=_(this.gl,this.type,this.length,this.usage,m,k);else if(typeof m=="number"||m===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");m=m|0,m<=0&&(m=1),this.gl.bufferData(this.type,m|0,this.usage),this.length=m}else throw new Error("gl-buffer: Invalid data type")};function M(m,k,S,x){if(S=S||m.ARRAY_BUFFER,x=x||m.DYNAMIC_DRAW,S!==m.ARRAY_BUFFER&&S!==m.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(x!==m.DYNAMIC_DRAW&&x!==m.STATIC_DRAW&&x!==m.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 T=m.createBuffer(),d=new v(m,S,T,0,x);return d.update(k),d}a.exports=M},6405:function(a,o,i){"use strict";var l=i(2931);a.exports=function(s,f){var v=s.positions,g=s.vectors,_={positions:[],vertexIntensity:[],vertexIntensityBounds:s.vertexIntensityBounds,vectors:[],cells:[],coneOffset:s.coneOffset,colormap:s.colormap};if(s.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),_;for(var y=0,w=1/0,M=-1/0,m=1/0,k=-1/0,S=1/0,x=-1/0,T=null,d=null,b=[],p=1/0,c=!1,A=s.coneSizemode==="raw",h=0;hy&&(y=l.length(E)),h&&!A){var D=2*l.distance(T,R)/(l.length(d)+l.length(E));D?(p=Math.min(p,D),c=!1):c=!0}c||(T=R,d=E),b.push(E)}var N=[w,m,S],I=[M,k,x];f&&(f[0]=N,f[1]=I),y===0&&(y=1);var F=1/y;isFinite(p)||(p=1),_.vectorScale=p;var L=s.coneSize||(A?1:.5);s.absoluteConeSize&&(L=s.absoluteConeSize*F),_.coneScale=L;for(var h=0,P=0;h=1},m.isTransparent=function(){return this.opacity<1},m.pickSlots=1,m.setPickBase=function(b){this.pickId=b};function k(b){for(var p=y({colormap:b,nshades:256,format:"rgba"}),c=new Uint8Array(256*4),A=0;A<256;++A){for(var h=p[A],R=0;R<3;++R)c[4*A+R]=h[R];c[4*A+3]=h[3]*255}return _(c,[256,256,4],[4,0,1])}function S(b){for(var p=b.length,c=new Array(p),A=0;A0){var P=this.triShader;P.bind(),P.uniforms=D,this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},m.drawPick=function(b){b=b||{};for(var p=this.gl,c=b.model||w,A=b.view||w,h=b.projection||w,R=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)R[0][E]=Math.max(R[0][E],this.clipBounds[0][E]),R[1][E]=Math.min(R[1][E],this.clipBounds[1][E]);this._model=[].slice.call(c),this._view=[].slice.call(A),this._projection=[].slice.call(h),this._resolution=[p.drawingBufferWidth,p.drawingBufferHeight];var D={model:c,view:A,projection:h,clipBounds:R,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},N=this.pickShader;N.bind(),N.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),p.drawArrays(p.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},m.pick=function(b){if(!b||b.id!==this.pickId)return null;var p=b.value[0]+256*b.value[1]+65536*b.value[2],c=this.cells[p],A=this.positions[c[1]].slice(0,3),h={position:A,dataCoordinate:A,index:Math.floor(c[1]/48)};return this.traceType==="cone"?h.index=Math.floor(c[1]/48):this.traceType==="streamtube"&&(h.intensity=this.intensity[c[1]],h.velocity=this.vectors[c[1]].slice(0,3),h.divergence=this.vectors[c[1]][3],h.index=p),h},m.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 x(b,p){var c=l(b,p.meshShader.vertex,p.meshShader.fragment,null,p.meshShader.attributes);return c.attributes.position.location=0,c.attributes.color.location=2,c.attributes.uv.location=3,c.attributes.vector.location=4,c}function T(b,p){var c=l(b,p.pickShader.vertex,p.pickShader.fragment,null,p.pickShader.attributes);return c.attributes.position.location=0,c.attributes.id.location=1,c.attributes.vector.location=4,c}function d(b,p,c){var A=c.shaders;arguments.length===1&&(p=b,b=p.gl);var h=x(b,A),R=T(b,A),E=f(b,_(new Uint8Array([255,255,255,255]),[1,1,4]));E.generateMipmap(),E.minFilter=b.LINEAR_MIPMAP_LINEAR,E.magFilter=b.LINEAR;var D=u(b),N=u(b),I=u(b),F=u(b),L=u(b),P=s(b,[{buffer:D,type:b.FLOAT,size:4},{buffer:L,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:b.FLOAT,size:4},{buffer:F,type:b.FLOAT,size:2},{buffer:N,type:b.FLOAT,size:4}]),O=new M(b,E,h,R,D,N,L,I,F,P,c.traceType||"cone");return O.update(p),O}a.exports=d},614:function(a,o,i){var l=i(3236),u=l([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -574,7 +574,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);o.meshShader={vertex:u,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},o.pickShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(a){a.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(a,o,i){var l=i(737);a.exports=function(s){return l[s]}},9165:function(a,o,i){"use strict";a.exports=M;var l=i(2762),u=i(8116),s=i(3436),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function v(m,A,S,x){this.gl=m,this.shader=x,this.buffer=A,this.vao=S,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 g=v.prototype;g.isOpaque=function(){return!this.hasAlpha},g.isTransparent=function(){return this.hasAlpha},g.drawTransparent=g.draw=function(m){var A=this.gl,S=this.shader.uniforms;this.shader.bind();var x=S.view=m.view||f,T=S.projection=m.projection||f;S.model=m.model||f,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var d=x[12],_=x[13],p=x[14],c=x[15],k=m._ortho||!1,h=k?2:1,R=h*this.pixelRatio*(T[3]*d+T[7]*_+T[11]*p+T[15]*c)/A.drawingBufferHeight;this.vao.bind();for(var E=0;E<3;++E)A.lineWidth(this.lineWidth[E]*this.pixelRatio),S.capSize=this.capSize[E]*R,this.lineCount[E]&&A.drawArrays(A.LINES,this.lineOffset[E],this.lineCount[E]);this.vao.unbind()};function b(m,A){for(var S=0;S<3;++S)m[0][S]=Math.min(m[0][S],A[S]),m[1][S]=Math.max(m[1][S],A[S])}var y=function(){for(var m=new Array(3),A=0;A<3;++A){for(var S=[],x=1;x<=2;++x)for(var T=-1;T<=1;T+=2){var d=(x+A)%3,_=[0,0,0];_[d]=T,S.push(_)}m[A]=S}return m}();function w(m,A,S,x){for(var T=y[x],d=0;d0){var D=k.slice();D[p]+=R[1][p],T.push(k[0],k[1],k[2],E[0],E[1],E[2],E[3],0,0,0,D[0],D[1],D[2],E[0],E[1],E[2],E[3],0,0,0),b(this.bounds,D),_+=2+w(T,D,E,p)}}}this.lineCount[p]=_-this.lineOffset[p]}this.buffer.update(T)}},g.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function M(m){var A=m.gl,S=l(A),x=u(A,[{buffer:S,type:A.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:A.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:A.FLOAT,size:3,offset:28,stride:40}]),T=s(A);T.attributes.position.location=0,T.attributes.color.location=1,T.attributes.offset.location=2;var d=new v(A,S,x,T);return d.update(m),d}},3436:function(a,o,i){"use strict";var l=i(3236),u=i(9405),s=l([`precision highp float; +}`]);o.meshShader={vertex:u,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},o.pickShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(a){a.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(a,o,i){var l=i(737);a.exports=function(s){return l[s]}},9165:function(a,o,i){"use strict";a.exports=M;var l=i(2762),u=i(8116),s=i(3436),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function v(m,k,S,x){this.gl=m,this.shader=x,this.buffer=k,this.vao=S,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 g=v.prototype;g.isOpaque=function(){return!this.hasAlpha},g.isTransparent=function(){return this.hasAlpha},g.drawTransparent=g.draw=function(m){var k=this.gl,S=this.shader.uniforms;this.shader.bind();var x=S.view=m.view||f,T=S.projection=m.projection||f;S.model=m.model||f,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var d=x[12],b=x[13],p=x[14],c=x[15],A=m._ortho||!1,h=A?2:1,R=h*this.pixelRatio*(T[3]*d+T[7]*b+T[11]*p+T[15]*c)/k.drawingBufferHeight;this.vao.bind();for(var E=0;E<3;++E)k.lineWidth(this.lineWidth[E]*this.pixelRatio),S.capSize=this.capSize[E]*R,this.lineCount[E]&&k.drawArrays(k.LINES,this.lineOffset[E],this.lineCount[E]);this.vao.unbind()};function _(m,k){for(var S=0;S<3;++S)m[0][S]=Math.min(m[0][S],k[S]),m[1][S]=Math.max(m[1][S],k[S])}var y=function(){for(var m=new Array(3),k=0;k<3;++k){for(var S=[],x=1;x<=2;++x)for(var T=-1;T<=1;T+=2){var d=(x+k)%3,b=[0,0,0];b[d]=T,S.push(b)}m[k]=S}return m}();function w(m,k,S,x){for(var T=y[x],d=0;d0){var D=A.slice();D[p]+=R[1][p],T.push(A[0],A[1],A[2],E[0],E[1],E[2],E[3],0,0,0,D[0],D[1],D[2],E[0],E[1],E[2],E[3],0,0,0),_(this.bounds,D),b+=2+w(T,D,E,p)}}}this.lineCount[p]=b-this.lineOffset[p]}this.buffer.update(T)}},g.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function M(m){var k=m.gl,S=l(k),x=u(k,[{buffer:S,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:k.FLOAT,size:3,offset:28,stride:40}]),T=s(k);T.attributes.position.location=0,T.attributes.color.location=1,T.attributes.offset.location=2;var d=new v(k,S,x,T);return d.update(m),d}},3436:function(a,o,i){"use strict";var l=i(3236),u=i(9405),s=l([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -625,13 +625,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);a.exports=function(v){return u(v,s,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(a,o,i){"use strict";var l=i(7766);a.exports=_;var u=null,s,f,v,g;function b(p){var c=p.getParameter(p.FRAMEBUFFER_BINDING),k=p.getParameter(p.RENDERBUFFER_BINDING),h=p.getParameter(p.TEXTURE_BINDING_2D);return[c,k,h]}function y(p,c){p.bindFramebuffer(p.FRAMEBUFFER,c[0]),p.bindRenderbuffer(p.RENDERBUFFER,c[1]),p.bindTexture(p.TEXTURE_2D,c[2])}function w(p,c){var k=p.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(k+1);for(var h=0;h<=k;++h){for(var R=new Array(k),E=0;E1&&N.drawBuffersWEBGL(u[D]);var O=k.getExtension("WEBGL_depth_texture");O?I?p.depth=m(k,R,E,O.UNSIGNED_INT_24_8_WEBGL,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F&&(p.depth=m(k,R,E,k.UNSIGNED_SHORT,k.DEPTH_COMPONENT,k.DEPTH_ATTACHMENT)):F&&I?p._depth_rb=A(k,R,E,k.DEPTH_STENCIL,k.DEPTH_STENCIL_ATTACHMENT):F?p._depth_rb=A(k,R,E,k.DEPTH_COMPONENT16,k.DEPTH_ATTACHMENT):I&&(p._depth_rb=A(k,R,E,k.STENCIL_INDEX,k.STENCIL_ATTACHMENT));var U=k.checkFramebufferStatus(k.FRAMEBUFFER);if(U!==k.FRAMEBUFFER_COMPLETE){p._destroyed=!0,k.bindFramebuffer(k.FRAMEBUFFER,null),k.deleteFramebuffer(p.handle),p.handle=null,p.depth&&(p.depth.dispose(),p.depth=null),p._depth_rb&&(k.deleteRenderbuffer(p._depth_rb),p._depth_rb=null);for(var P=0;PR||k<0||k>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");p._shape[0]=c,p._shape[1]=k;for(var E=b(h),D=0;DE||k<0||k>E)throw new Error("gl-fbo: Parameters are too large for FBO");h=h||{};var D=1;if("color"in h){if(D=Math.max(h.color|0,0),D<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1)if(R){if(D>p.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var N=p.UNSIGNED_BYTE,I=p.getExtension("OES_texture_float");if(h.float&&D>0){if(!I)throw new Error("gl-fbo: Context does not support floating point textures");N=p.FLOAT}else h.preferFloat&&D>0&&I&&(N=p.FLOAT);var F=!0;"depth"in h&&(F=!!h.depth);var L=!1;return"stencil"in h&&(L=!!h.stencil),new x(p,c,k,N,D,F,L,R)}},2992:function(a,o,i){var l=i(3387).sprintf,u=i(5171),s=i(1848),f=i(1085);a.exports=v;function v(g,b,y){"use strict";var w=s(b)||"of unknown name (see npm glsl-shader-name)",M="unknown type";y!==void 0&&(M=y===u.FRAGMENT_SHADER?"fragment":"vertex");for(var m=l(`Error compiling %s shader %s: -`,M,w),A=l("%s%s",m,g),S=g.split(` -`),x={},T=0;T1&&N.drawBuffersWEBGL(u[D]);var O=A.getExtension("WEBGL_depth_texture");O?I?p.depth=m(A,R,E,O.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(p.depth=m(A,R,E,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&I?p._depth_rb=k(A,R,E,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?p._depth_rb=k(A,R,E,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):I&&(p._depth_rb=k(A,R,E,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var U=A.checkFramebufferStatus(A.FRAMEBUFFER);if(U!==A.FRAMEBUFFER_COMPLETE){p._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(p.handle),p.handle=null,p.depth&&(p.depth.dispose(),p.depth=null),p._depth_rb&&(A.deleteRenderbuffer(p._depth_rb),p._depth_rb=null);for(var P=0;PR||A<0||A>R)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");p._shape[0]=c,p._shape[1]=A;for(var E=_(h),D=0;DE||A<0||A>E)throw new Error("gl-fbo: Parameters are too large for FBO");h=h||{};var D=1;if("color"in h){if(D=Math.max(h.color|0,0),D<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1)if(R){if(D>p.getParameter(R.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var N=p.UNSIGNED_BYTE,I=p.getExtension("OES_texture_float");if(h.float&&D>0){if(!I)throw new Error("gl-fbo: Context does not support floating point textures");N=p.FLOAT}else h.preferFloat&&D>0&&I&&(N=p.FLOAT);var F=!0;"depth"in h&&(F=!!h.depth);var L=!1;return"stencil"in h&&(L=!!h.stencil),new x(p,c,A,N,D,F,L,R)}},2992:function(a,o,i){var l=i(3387).sprintf,u=i(5171),s=i(1848),f=i(1085);a.exports=v;function v(g,_,y){"use strict";var w=s(_)||"of unknown name (see npm glsl-shader-name)",M="unknown type";y!==void 0&&(M=y===u.FRAGMENT_SHADER?"fragment":"vertex");for(var m=l(`Error compiling %s shader %s: +`,M,w),k=l("%s%s",m,g),S=g.split(` +`),x={},T=0;T0){for(var Y=0;Y<24;++Y)E.push(E[E.length-12]);F+=2,X=!0}continue e}L[0][h]=Math.min(L[0][h],j[h],$[h]),L[1][h]=Math.max(L[1][h],j[h],$[h])}var q,Z;Array.isArray(O[0])?(q=O.length>k-1?O[k-1]:O.length>0?O[O.length-1]:[0,0,0,1],Z=O.length>k?O[k]:O.length>0?O[O.length-1]:[0,0,0,1]):q=Z=O,q.length===3&&(q=[q[0],q[1],q[2],1]),Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),!this.hasAlpha&&q[3]<1&&(this.hasAlpha=!0);var ne;Array.isArray(U)?ne=U.length>k-1?U[k-1]:U.length>0?U[U.length-1]:[0,0,0,1]:ne=U;var Q=I;if(I+=S(j,$),X){for(h=0;h<2;++h)E.push(j[0],j[1],j[2],$[0],$[1],$[2],Q,ne,q[0],q[1],q[2],q[3]);F+=2,X=!1}E.push(j[0],j[1],j[2],$[0],$[1],$[2],Q,ne,q[0],q[1],q[2],q[3],j[0],j[1],j[2],$[0],$[1],$[2],Q,-ne,q[0],q[1],q[2],q[3],$[0],$[1],$[2],j[0],j[1],j[2],I,-ne,Z[0],Z[1],Z[2],Z[3],$[0],$[1],$[2],j[0],j[1],j[2],I,ne,Z[0],Z[1],Z[2],Z[3]),F+=4}}if(this.buffer.update(E),D.push(I),N.push(P[P.length-1].slice()),this.bounds=L,this.vertexCount=F,this.points=N,this.arcLength=D,"dashes"in c){var oe=c.dashes,ee=oe.slice();for(ee.unshift(0),k=1;k1.0001)return null;h+=k[T]}return Math.abs(h-1)>.001?null:[d,g(y,k),k]}},840:function(a,o,i){var l=i(3236),u=l([`precision highp float; +}`]),g=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];o.createShader=function(_){return u(_,s,f,null,g)},o.createPickShader=function(_){return u(_,s,v,null,g)}},5714:function(a,o,i){"use strict";a.exports=p;var l=i(2762),u=i(8116),s=i(7766),f=new Uint8Array(4),v=new Float32Array(f.buffer);function g(c,A,h,R){return f[0]=R,f[1]=h,f[2]=A,f[3]=c,v[0]}var _=i(2478),y=i(9618),w=i(7319),M=w.createShader,m=w.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(c,A){for(var h=0,R=0;R<3;++R){var E=c[R]-A[R];h+=E*E}return Math.sqrt(h)}function x(c){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],h=0;h<3;++h)A[0][h]=Math.max(c[0][h],A[0][h]),A[1][h]=Math.min(c[1][h],A[1][h]);return A}function T(c,A,h,R){this.arcLength=c,this.position=A,this.index=h,this.dataCoordinate=R}function d(c,A,h,R,E,D){this.gl=c,this.shader=A,this.pickShader=h,this.buffer=R,this.vao=E,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=D,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var b=d.prototype;b.isTransparent=function(){return this.hasAlpha},b.isOpaque=function(){return!this.hasAlpha},b.pickSlots=1,b.setPickBase=function(c){this.pickId=c},b.drawTransparent=b.draw=function(c){if(this.vertexCount){var A=this.gl,h=this.shader,R=this.vao;h.bind(),h.uniforms={model:c.model||k,view:c.view||k,projection:c.projection||k,clipBounds:x(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},R.bind(),R.draw(A.TRIANGLE_STRIP,this.vertexCount),R.unbind()}},b.drawPick=function(c){if(this.vertexCount){var A=this.gl,h=this.pickShader,R=this.vao;h.bind(),h.uniforms={model:c.model||k,view:c.view||k,projection:c.projection||k,pickId:this.pickId,clipBounds:x(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},R.bind(),R.draw(A.TRIANGLE_STRIP,this.vertexCount),R.unbind()}},b.update=function(c){var A,h;this.dirty=!0;var R=!!c.connectGaps;"dashScale"in c&&(this.dashScale=c.dashScale),this.hasAlpha=!1,"opacity"in c&&(this.opacity=+c.opacity,this.opacity<1&&(this.hasAlpha=!0));var E=[],D=[],N=[],I=0,F=0,L=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],P=c.position||c.positions;if(P){var O=c.color||c.colors||[0,0,0,1],U=c.lineWidth||1,X=!1;e:for(A=1;A0){for(var Y=0;Y<24;++Y)E.push(E[E.length-12]);F+=2,X=!0}continue e}L[0][h]=Math.min(L[0][h],j[h],$[h]),L[1][h]=Math.max(L[1][h],j[h],$[h])}var q,Z;Array.isArray(O[0])?(q=O.length>A-1?O[A-1]:O.length>0?O[O.length-1]:[0,0,0,1],Z=O.length>A?O[A]:O.length>0?O[O.length-1]:[0,0,0,1]):q=Z=O,q.length===3&&(q=[q[0],q[1],q[2],1]),Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),!this.hasAlpha&&q[3]<1&&(this.hasAlpha=!0);var ne;Array.isArray(U)?ne=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1]:ne=U;var Q=I;if(I+=S(j,$),X){for(h=0;h<2;++h)E.push(j[0],j[1],j[2],$[0],$[1],$[2],Q,ne,q[0],q[1],q[2],q[3]);F+=2,X=!1}E.push(j[0],j[1],j[2],$[0],$[1],$[2],Q,ne,q[0],q[1],q[2],q[3],j[0],j[1],j[2],$[0],$[1],$[2],Q,-ne,q[0],q[1],q[2],q[3],$[0],$[1],$[2],j[0],j[1],j[2],I,-ne,Z[0],Z[1],Z[2],Z[3],$[0],$[1],$[2],j[0],j[1],j[2],I,ne,Z[0],Z[1],Z[2],Z[3]),F+=4}}if(this.buffer.update(E),D.push(I),N.push(P[P.length-1].slice()),this.bounds=L,this.vertexCount=F,this.points=N,this.arcLength=D,"dashes"in c){var oe=c.dashes,ee=oe.slice();for(ee.unshift(0),A=1;A1.0001)return null;h+=A[T]}return Math.abs(h-1)>.001?null:[d,g(y,A),A]}},840:function(a,o,i){var l=i(3236),u=l([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1034,7 +1034,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),b=l([`precision highp float; +}`]),_=l([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1149,7 +1149,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),A=l([`precision highp float; +}`]),k=l([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1157,7 +1157,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);o.meshShader={vertex:u,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},o.wireShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},o.pointShader={vertex:g,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},o.pickShader={vertex:y,fragment:w,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},o.pointPickShader={vertex:M,fragment:w,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},o.contourShader={vertex:m,fragment:A,attributes:[{name:"position",type:"vec3"}]}},7201:function(a,o,i){"use strict";var l=1e-6,u=1e-6,s=i(9405),f=i(2762),v=i(8116),g=i(7766),b=i(8406),y=i(6760),w=i(7608),M=i(9618),m=i(6729),A=i(7765),S=i(1888),x=i(840),T=i(7626),d=x.meshShader,_=x.wireShader,p=x.pointShader,c=x.pickShader,k=x.pointPickShader,h=x.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(Y,q,Z,ne,Q,oe,ee,G,re,H,te,ue,de,Ee,Me,ve,Ae,ke,De,Ce,Oe,Ue,ge,Te,ce,ye,Le){this.gl=Y,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=q,this.dirty=!0,this.triShader=Z,this.lineShader=ne,this.pointShader=Q,this.pickShader=oe,this.pointPickShader=ee,this.contourShader=G,this.trianglePositions=re,this.triangleColors=te,this.triangleNormals=de,this.triangleUVs=ue,this.triangleIds=H,this.triangleVAO=Ee,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Me,this.edgeColors=Ae,this.edgeUVs=ke,this.edgeIds=ve,this.edgeVAO=De,this.edgeCount=0,this.pointPositions=Ce,this.pointColors=Ue,this.pointUVs=ge,this.pointSizes=Te,this.pointIds=Oe,this.pointVAO=ce,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ye,this.contourVAO=Le,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var D=E.prototype;D.isOpaque=function(){return!this.hasAlpha},D.isTransparent=function(){return this.hasAlpha},D.pickSlots=1,D.setPickBase=function(Y){this.pickId=Y};function N(Y,q){if(!q||!q.length)return 1;for(var Z=0;ZY&&Z>0){var ne=(q[Z][0]-Y)/(q[Z][0]-q[Z-1][0]);return q[Z][1]*(1-ne)+ne*q[Z-1][1]}}return 1}function I(Y,q){for(var Z=m({colormap:Y,nshades:256,format:"rgba"}),ne=new Uint8Array(256*4),Q=0;Q<256;++Q){for(var oe=Z[Q],ee=0;ee<3;++ee)ne[4*Q+ee]=oe[ee];q?ne[4*Q+3]=255*N(Q/255,q):ne[4*Q+3]=255*oe[3]}return M(ne,[256,256,4],[4,0,1])}function F(Y){for(var q=Y.length,Z=new Array(q),ne=0;ne0){var de=this.triShader;de.bind(),de.uniforms=G,this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var de=this.lineShader;de.bind(),de.uniforms=G,this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var de=this.pointShader;de.bind(),de.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var de=this.contourShader;de.bind(),de.uniforms=G,this.contourVAO.bind(),q.drawArrays(q.LINES,0,this.contourCount),this.contourVAO.unbind()}},D.drawPick=function(Y){Y=Y||{};for(var q=this.gl,Z=Y.model||R,ne=Y.view||R,Q=Y.projection||R,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ee=0;ee<3;++ee)oe[0][ee]=Math.max(oe[0][ee],this.clipBounds[0][ee]),oe[1][ee]=Math.min(oe[1][ee],this.clipBounds[1][ee]);this._model=[].slice.call(Z),this._view=[].slice.call(ne),this._projection=[].slice.call(Q),this._resolution=[q.drawingBufferWidth,q.drawingBufferHeight];var G={model:Z,view:ne,projection:Q,clipBounds:oe,pickId:this.pickId/255},re=this.pickShader;if(re.bind(),re.uniforms=G,this.triangleCount>0&&(this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var re=this.pointPickShader;re.bind(),re.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}},D.pick=function(Y){if(!Y||Y.id!==this.pickId)return null;for(var q=Y.value[0]+256*Y.value[1]+65536*Y.value[2],Z=this.cells[q],ne=this.positions,Q=new Array(Z.length),oe=0;oeMath.abs(c))m.rotate(R,0,0,-p*k*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var E=-d.zoomSpeed*h*c/window.innerHeight*(R-m.lastT())/20;m.pan(R,0,0,S*(Math.exp(E)-1))}}},!0)},d.enableMouseListeners(),d}},799:function(a,o,i){var l=i(3236),u=i(9405),s=l([`precision mediump float; +`]);o.meshShader={vertex:u,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},o.wireShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},o.pointShader={vertex:g,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},o.pickShader={vertex:y,fragment:w,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},o.pointPickShader={vertex:M,fragment:w,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},o.contourShader={vertex:m,fragment:k,attributes:[{name:"position",type:"vec3"}]}},7201:function(a,o,i){"use strict";var l=1e-6,u=1e-6,s=i(9405),f=i(2762),v=i(8116),g=i(7766),_=i(8406),y=i(6760),w=i(7608),M=i(9618),m=i(6729),k=i(7765),S=i(1888),x=i(840),T=i(7626),d=x.meshShader,b=x.wireShader,p=x.pointShader,c=x.pickShader,A=x.pointPickShader,h=x.contourShader,R=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(Y,q,Z,ne,Q,oe,ee,G,re,H,te,ue,de,Ee,Me,ve,Ae,ke,De,Ce,Oe,Ue,ge,Te,ce,ye,Le){this.gl=Y,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=q,this.dirty=!0,this.triShader=Z,this.lineShader=ne,this.pointShader=Q,this.pickShader=oe,this.pointPickShader=ee,this.contourShader=G,this.trianglePositions=re,this.triangleColors=te,this.triangleNormals=de,this.triangleUVs=ue,this.triangleIds=H,this.triangleVAO=Ee,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Me,this.edgeColors=Ae,this.edgeUVs=ke,this.edgeIds=ve,this.edgeVAO=De,this.edgeCount=0,this.pointPositions=Ce,this.pointColors=Ue,this.pointUVs=ge,this.pointSizes=Te,this.pointIds=Oe,this.pointVAO=ce,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ye,this.contourVAO=Le,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=R,this._view=R,this._projection=R,this._resolution=[1,1]}var D=E.prototype;D.isOpaque=function(){return!this.hasAlpha},D.isTransparent=function(){return this.hasAlpha},D.pickSlots=1,D.setPickBase=function(Y){this.pickId=Y};function N(Y,q){if(!q||!q.length)return 1;for(var Z=0;ZY&&Z>0){var ne=(q[Z][0]-Y)/(q[Z][0]-q[Z-1][0]);return q[Z][1]*(1-ne)+ne*q[Z-1][1]}}return 1}function I(Y,q){for(var Z=m({colormap:Y,nshades:256,format:"rgba"}),ne=new Uint8Array(256*4),Q=0;Q<256;++Q){for(var oe=Z[Q],ee=0;ee<3;++ee)ne[4*Q+ee]=oe[ee];q?ne[4*Q+3]=255*N(Q/255,q):ne[4*Q+3]=255*oe[3]}return M(ne,[256,256,4],[4,0,1])}function F(Y){for(var q=Y.length,Z=new Array(q),ne=0;ne0){var de=this.triShader;de.bind(),de.uniforms=G,this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var de=this.lineShader;de.bind(),de.uniforms=G,this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var de=this.pointShader;de.bind(),de.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var de=this.contourShader;de.bind(),de.uniforms=G,this.contourVAO.bind(),q.drawArrays(q.LINES,0,this.contourCount),this.contourVAO.unbind()}},D.drawPick=function(Y){Y=Y||{};for(var q=this.gl,Z=Y.model||R,ne=Y.view||R,Q=Y.projection||R,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ee=0;ee<3;++ee)oe[0][ee]=Math.max(oe[0][ee],this.clipBounds[0][ee]),oe[1][ee]=Math.min(oe[1][ee],this.clipBounds[1][ee]);this._model=[].slice.call(Z),this._view=[].slice.call(ne),this._projection=[].slice.call(Q),this._resolution=[q.drawingBufferWidth,q.drawingBufferHeight];var G={model:Z,view:ne,projection:Q,clipBounds:oe,pickId:this.pickId/255},re=this.pickShader;if(re.bind(),re.uniforms=G,this.triangleCount>0&&(this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var re=this.pointPickShader;re.bind(),re.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}},D.pick=function(Y){if(!Y||Y.id!==this.pickId)return null;for(var q=Y.value[0]+256*Y.value[1]+65536*Y.value[2],Z=this.cells[q],ne=this.positions,Q=new Array(Z.length),oe=0;oeMath.abs(c))m.rotate(R,0,0,-p*A*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var E=-d.zoomSpeed*h*c/window.innerHeight*(R-m.lastT())/20;m.pan(R,0,0,S*(Math.exp(E)-1))}}},!0)},d.enableMouseListeners(),d}},799:function(a,o,i){var l=i(3236),u=i(9405),s=l([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -1173,7 +1173,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);a.exports=function(v){return u(v,s,f,null,[{name:"position",type:"vec2"}])}},4100:function(a,o,i){"use strict";var l=i(4437),u=i(3837),s=i(5445),f=i(4449),v=i(3589),g=i(2260),b=i(7169),y=i(351),w=i(4772),M=i(4040),m=i(799),A=i(9216)({tablet:!0,featureDetect:!0});a.exports={createScene:_,createCamera:l};function S(){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 x(c,k){var h=null;try{h=c.getContext("webgl",k),h||(h=c.getContext("experimental-webgl",k))}catch(R){return null}return h}function T(c){var k=Math.round(Math.log(Math.abs(c))/Math.log(10));if(k<0){var h=Math.round(Math.pow(10,-k));return Math.ceil(c*h)/h}else if(k>0){var h=Math.round(Math.pow(10,k));return Math.ceil(c/h)*h}return Math.ceil(c)}function d(c){return typeof c=="boolean"?c:!0}function _(c){c=c||{},c.camera=c.camera||{};var k=c.canvas;if(!k)if(k=document.createElement("canvas"),c.container){var h=c.container;h.appendChild(k)}else document.body.appendChild(k);var R=c.gl;if(R||(c.glOptions&&(A=!!c.glOptions.preserveDrawingBuffer),R=x(k,c.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:A})),!R)throw new Error("webgl not supported");var E=c.bounds||[[-10,-10,-10],[10,10,10]],D=new S,N=g(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!A}),I=m(R),F=c.cameraObject&&c.cameraObject._ortho===!0||c.camera.projection&&c.camera.projection.type==="orthographic"||!1,L={eye:c.camera.eye||[2,0,0],center:c.camera.center||[0,0,0],up:c.camera.up||[0,1,0],zoomMin:c.camera.zoomMax||.1,zoomMax:c.camera.zoomMin||100,mode:c.camera.mode||"turntable",_ortho:F},P=c.axes||{},O=u(R,P);O.enable=!P.disable;var U=c.spikes||{},X=f(R,U),j=[],$=[],Y=[],q=[],Z=!0,ee=!0,ne=new Array(16),Q=new Array(16),oe={view:null,projection:ne,model:Q,_ortho:!1},ee=!0,G=[R.drawingBufferWidth,R.drawingBufferHeight],re=c.cameraObject||l(k,L),H={gl:R,contextLost:!1,pixelRatio:c.pixelRatio||1,canvas:k,selection:D,camera:re,axes:O,axesPixels:null,spikes:X,bounds:E,objects:j,shape:G,aspect:c.aspectRatio||[1,1,1],pickRadius:c.pickRadius||10,zNear:c.zNear||.01,zFar:c.zFar||1e3,fovy:c.fovy||Math.PI/4,clearColor:c.clearColor||[0,0,0,0],autoResize:d(c.autoResize),autoBounds:d(c.autoBounds),autoScale:!!c.autoScale,autoCenter:d(c.autoCenter),clipToBounds:d(c.clipToBounds),snapToData:!!c.snapToData,onselect:c.onselect||null,onrender:c.onrender||null,onclick:c.onclick||null,cameraParams:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ce){this.aspect[0]=Ce.x,this.aspect[1]=Ce.y,this.aspect[2]=Ce.z,ee=!0},setBounds:function(Ce,Oe){this.bounds[0][Ce]=Oe.min,this.bounds[1][Ce]=Oe.max},setClearColor:function(Ce){this.clearColor=Ce},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)}},te=[R.drawingBufferWidth/H.pixelRatio|0,R.drawingBufferHeight/H.pixelRatio|0];function ue(){if(!H._stopped&&H.autoResize){var Ce=k.parentNode,Oe=1,Ue=1;Ce&&Ce!==document.body?(Oe=Ce.clientWidth,Ue=Ce.clientHeight):(Oe=window.innerWidth,Ue=window.innerHeight);var ge=Math.ceil(Oe*H.pixelRatio)|0,Te=Math.ceil(Ue*H.pixelRatio)|0;if(ge!==k.width||Te!==k.height){k.width=ge,k.height=Te;var ce=k.style;ce.position=ce.position||"absolute",ce.left="0px",ce.top="0px",ce.width=Oe+"px",ce.height=Ue+"px",Z=!0}}}H.autoResize&&ue(),window.addEventListener("resize",ue);function de(){for(var Ce=j.length,Oe=q.length,Ue=0;Ue0&&Y[Oe-1]===0;)Y.pop(),q.pop().dispose()}H.update=function(Ce){H._stopped||(Ce=Ce||{},Z=!0,ee=!0)},H.add=function(Ce){H._stopped||(Ce.axes=O,j.push(Ce),$.push(-1),Z=!0,ee=!0,de())},H.remove=function(Ce){if(!H._stopped){var Oe=j.indexOf(Ce);Oe<0||(j.splice(Oe,1),$.pop(),Z=!0,ee=!0,de())}},H.dispose=function(){if(!H._stopped&&(H._stopped=!0,window.removeEventListener("resize",ue),k.removeEventListener("webglcontextlost",Ee),H.mouseListener.enabled=!1,!H.contextLost)){O.dispose(),X.dispose();for(var Ce=0;CeD.distance)continue;for(var he=0;he1e-6?(A=Math.acos(S),x=Math.sin(A),T=Math.sin((1-s)*A)/x,d=Math.sin(s*A)/x):(T=1-s,d=s),i[0]=T*f+d*y,i[1]=T*v+d*w,i[2]=T*g+d*M,i[3]=T*b+d*m,i}},5964:function(a){"use strict";a.exports=function(o){return!o&&o!==0?"":o.toString()}},9366:function(a,o,i){"use strict";var l=i(4359);a.exports=s;var u={};function s(f,v,g){var b=[v.style,v.weight,v.variant,v.family].join("_"),y=u[b];if(y||(y=u[b]={}),f in y)return y[f];var w={textAlign:"center",textBaseline:"middle",lineHeight:1,font:v.family,fontStyle:v.style,fontWeight:v.weight,fontVariant:v.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};w.triangles=!0;var M=l(f,w);w.triangles=!1;var m=l(f,w),A,S;if(g&&g!==1){for(A=0;A0){var h=Math.round(Math.pow(10,A));return Math.ceil(c/h)*h}return Math.ceil(c)}function d(c){return typeof c=="boolean"?c:!0}function b(c){c=c||{},c.camera=c.camera||{};var A=c.canvas;if(!A)if(A=document.createElement("canvas"),c.container){var h=c.container;h.appendChild(A)}else document.body.appendChild(A);var R=c.gl;if(R||(c.glOptions&&(k=!!c.glOptions.preserveDrawingBuffer),R=x(A,c.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!R)throw new Error("webgl not supported");var E=c.bounds||[[-10,-10,-10],[10,10,10]],D=new S,N=g(R,R.drawingBufferWidth,R.drawingBufferHeight,{preferFloat:!k}),I=m(R),F=c.cameraObject&&c.cameraObject._ortho===!0||c.camera.projection&&c.camera.projection.type==="orthographic"||!1,L={eye:c.camera.eye||[2,0,0],center:c.camera.center||[0,0,0],up:c.camera.up||[0,1,0],zoomMin:c.camera.zoomMax||.1,zoomMax:c.camera.zoomMin||100,mode:c.camera.mode||"turntable",_ortho:F},P=c.axes||{},O=u(R,P);O.enable=!P.disable;var U=c.spikes||{},X=f(R,U),j=[],$=[],Y=[],q=[],Z=!0,ee=!0,ne=new Array(16),Q=new Array(16),oe={view:null,projection:ne,model:Q,_ortho:!1},ee=!0,G=[R.drawingBufferWidth,R.drawingBufferHeight],re=c.cameraObject||l(A,L),H={gl:R,contextLost:!1,pixelRatio:c.pixelRatio||1,canvas:A,selection:D,camera:re,axes:O,axesPixels:null,spikes:X,bounds:E,objects:j,shape:G,aspect:c.aspectRatio||[1,1,1],pickRadius:c.pickRadius||10,zNear:c.zNear||.01,zFar:c.zFar||1e3,fovy:c.fovy||Math.PI/4,clearColor:c.clearColor||[0,0,0,0],autoResize:d(c.autoResize),autoBounds:d(c.autoBounds),autoScale:!!c.autoScale,autoCenter:d(c.autoCenter),clipToBounds:d(c.clipToBounds),snapToData:!!c.snapToData,onselect:c.onselect||null,onrender:c.onrender||null,onclick:c.onclick||null,cameraParams:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ce){this.aspect[0]=Ce.x,this.aspect[1]=Ce.y,this.aspect[2]=Ce.z,ee=!0},setBounds:function(Ce,Oe){this.bounds[0][Ce]=Oe.min,this.bounds[1][Ce]=Oe.max},setClearColor:function(Ce){this.clearColor=Ce},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)}},te=[R.drawingBufferWidth/H.pixelRatio|0,R.drawingBufferHeight/H.pixelRatio|0];function ue(){if(!H._stopped&&H.autoResize){var Ce=A.parentNode,Oe=1,Ue=1;Ce&&Ce!==document.body?(Oe=Ce.clientWidth,Ue=Ce.clientHeight):(Oe=window.innerWidth,Ue=window.innerHeight);var ge=Math.ceil(Oe*H.pixelRatio)|0,Te=Math.ceil(Ue*H.pixelRatio)|0;if(ge!==A.width||Te!==A.height){A.width=ge,A.height=Te;var ce=A.style;ce.position=ce.position||"absolute",ce.left="0px",ce.top="0px",ce.width=Oe+"px",ce.height=Ue+"px",Z=!0}}}H.autoResize&&ue(),window.addEventListener("resize",ue);function de(){for(var Ce=j.length,Oe=q.length,Ue=0;Ue0&&Y[Oe-1]===0;)Y.pop(),q.pop().dispose()}H.update=function(Ce){H._stopped||(Ce=Ce||{},Z=!0,ee=!0)},H.add=function(Ce){H._stopped||(Ce.axes=O,j.push(Ce),$.push(-1),Z=!0,ee=!0,de())},H.remove=function(Ce){if(!H._stopped){var Oe=j.indexOf(Ce);Oe<0||(j.splice(Oe,1),$.pop(),Z=!0,ee=!0,de())}},H.dispose=function(){if(!H._stopped&&(H._stopped=!0,window.removeEventListener("resize",ue),A.removeEventListener("webglcontextlost",Ee),H.mouseListener.enabled=!1,!H.contextLost)){O.dispose(),X.dispose();for(var Ce=0;CeD.distance)continue;for(var he=0;he1e-6?(k=Math.acos(S),x=Math.sin(k),T=Math.sin((1-s)*k)/x,d=Math.sin(s*k)/x):(T=1-s,d=s),i[0]=T*f+d*y,i[1]=T*v+d*w,i[2]=T*g+d*M,i[3]=T*_+d*m,i}},5964:function(a){"use strict";a.exports=function(o){return!o&&o!==0?"":o.toString()}},9366:function(a,o,i){"use strict";var l=i(4359);a.exports=s;var u={};function s(f,v,g){var _=[v.style,v.weight,v.variant,v.family].join("_"),y=u[_];if(y||(y=u[_]={}),f in y)return y[f];var w={textAlign:"center",textBaseline:"middle",lineHeight:1,font:v.family,fontStyle:v.style,fontWeight:v.weight,fontVariant:v.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};w.triangles=!0;var M=l(f,w);w.triangles=!1;var m=l(f,w),k,S;if(g&&g!==1){for(k=0;k1?1:Q}function p(Q,oe,ee,G,re,H,te,ue,de,Ee,Me,ve){this.gl=Q,this.pixelRatio=1,this.shader=oe,this.orthoShader=ee,this.projectShader=G,this.pointBuffer=re,this.colorBuffer=H,this.glyphBuffer=te,this.idBuffer=ue,this.vao=de,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=Ee,this.pickOrthoShader=Me,this.pickProjectShader=ve,this.points=[],this._selectResult=new d(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 c=p.prototype;c.pickSlots=1,c.setPickBase=function(Q){this.pickId=Q},c.isTransparent=function(){if(this.hasAlpha)return!0;for(var Q=0;Q<3;++Q)if(this.axesProject[Q]&&this.projectHasAlpha)return!0;return!1},c.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Q=0;Q<3;++Q)if(this.axesProject[Q]&&!this.projectHasAlpha)return!0;return!1};var k=[0,0],h=[0,0,0],R=[0,0,0],E=[0,0,0,1],D=[0,0,0,1],N=w.slice(),I=[0,0,0],F=[[0,0,0],[0,0,0]];function L(Q){return Q[0]=Q[1]=Q[2]=0,Q}function P(Q,oe){return Q[0]=oe[0],Q[1]=oe[1],Q[2]=oe[2],Q[3]=1,Q}function O(Q,oe,ee,G){return Q[0]=oe[0],Q[1]=oe[1],Q[2]=oe[2],Q[ee]=G,Q}function U(Q){for(var oe=F,ee=0;ee<2;++ee)for(var G=0;G<3;++G)oe[ee][G]=Math.max(Math.min(Q[ee][G],1e8),-1e8);return oe}function X(Q,oe,ee,G){var re=oe.axesProject,H=oe.gl,te=Q.uniforms,ue=ee.model||w,de=ee.view||w,Ee=ee.projection||w,Me=oe.axesBounds,ve=U(oe.clipBounds),Ae;oe.axes&&oe.axes.lastCubeProps?Ae=oe.axes.lastCubeProps.axis:Ae=[1,1,1],k[0]=2/H.drawingBufferWidth,k[1]=2/H.drawingBufferHeight,Q.bind(),te.view=de,te.projection=Ee,te.screenSize=k,te.highlightId=oe.highlightId,te.highlightScale=oe.highlightScale,te.clipBounds=ve,te.pickGroup=oe.pickId/255,te.pixelRatio=G;for(var ke=0;ke<3;++ke)if(re[ke]){te.scale=oe.projectScale[ke],te.opacity=oe.projectOpacity[ke];for(var De=N,Ce=0;Ce<16;++Ce)De[Ce]=0;for(var Ce=0;Ce<4;++Ce)De[5*Ce]=1;De[5*ke]=0,Ae[ke]<0?De[12+ke]=Me[0][ke]:De[12+ke]=Me[1][ke],v(De,ue,De),te.model=De;var Oe=(ke+1)%3,Ue=(ke+2)%3,ge=L(h),Te=L(R);ge[Oe]=1,Te[Ue]=1;var ce=T(Ee,de,ue,P(E,ge)),ye=T(Ee,de,ue,P(D,Te));if(Math.abs(ce[1])>Math.abs(ye[1])){var Le=ce;ce=ye,ye=Le,Le=ge,ge=Te,Te=Le;var me=Oe;Oe=Ue,Ue=me}ce[0]<0&&(ge[Oe]=-1),ye[1]>0&&(Te[Ue]=-1);for(var he=0,be=0,Ce=0;Ce<4;++Ce)he+=Math.pow(ue[4*Oe+Ce],2),be+=Math.pow(ue[4*Ue+Ce],2);ge[Oe]/=Math.sqrt(he),Te[Ue]/=Math.sqrt(be),te.axes[0]=ge,te.axes[1]=Te,te.fragClipBounds[0]=O(I,ve[0],ke,-1e8),te.fragClipBounds[1]=O(I,ve[1],ke,1e8),oe.vao.bind(),oe.vao.draw(H.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(H.lineWidth(oe.lineWidth*G),oe.vao.draw(H.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}var j=[-1e8,-1e8,-1e8],$=[1e8,1e8,1e8],Y=[j,$];function q(Q,oe,ee,G,re,H,te){var ue=ee.gl;if((H===ee.projectHasAlpha||te)&&X(oe,ee,G,re),H===ee.hasAlpha||te){Q.bind();var de=Q.uniforms;de.model=G.model||w,de.view=G.view||w,de.projection=G.projection||w,k[0]=2/ue.drawingBufferWidth,k[1]=2/ue.drawingBufferHeight,de.screenSize=k,de.highlightId=ee.highlightId,de.highlightScale=ee.highlightScale,de.fragClipBounds=Y,de.clipBounds=ee.axes.bounds,de.opacity=ee.opacity,de.pickGroup=ee.pickId/255,de.pixelRatio=re,ee.vao.bind(),ee.vao.draw(ue.TRIANGLES,ee.vertexCount),ee.lineWidth>0&&(ue.lineWidth(ee.lineWidth*re),ee.vao.draw(ue.LINES,ee.lineVertexCount,ee.vertexCount)),ee.vao.unbind()}}c.draw=function(Q){var oe=this.useOrtho?this.orthoShader:this.shader;q(oe,this.projectShader,this,Q,this.pixelRatio,!1,!1)},c.drawTransparent=function(Q){var oe=this.useOrtho?this.orthoShader:this.shader;q(oe,this.projectShader,this,Q,this.pixelRatio,!0,!1)},c.drawPick=function(Q){var oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;q(oe,this.pickProjectShader,this,Q,1,!0,!0)},c.pick=function(Q){if(!Q||Q.id!==this.pickId)return null;var oe=Q.value[2]+(Q.value[1]<<8)+(Q.value[0]<<16);if(oe>=this.pointCount||oe<0)return null;var ee=this.points[oe],G=this._selectResult;G.index=oe;for(var re=0;re<3;++re)G.position[re]=G.dataCoordinate[re]=ee[re];return G},c.highlight=function(Q){if(!Q)this.highlightId=[1,1,1,1];else{var oe=Q.index,ee=oe&255,G=oe>>8&255,re=oe>>16&255;this.highlightId=[ee/255,G/255,re/255,0]}};function Z(Q,oe,ee,G){var re;S(Q)?oe0){var Ge=0,We=Ue,we=[0,0,0,1],Pe=[0,0,0,1],Qe=S(Ae)&&S(Ae[0]),Ve=S(Ce)&&S(Ce[0]);e:for(var G=0;G0?1-be[0][0]:je<0?1+be[1][0]:1,nr*=nr>0?1-be[0][1]:nr<0?1+be[1][1]:1;for(var hr=[je,nr],ft=me.cells||[],Yr=me.positions||[],ye=0;yethis.buffer.length){u.free(this.buffer);for(var S=this.buffer=u.mallocUint8(f(A*m*4)),x=0;xS)for(m=S;mA)for(m=A;m=0){for(var F=I.type.charAt(I.type.length-1)|0,L=new Array(F),P=0;P=0;)O+=1;D[N]=O}var U=new Array(S.length);function X(){d.program=f.program(_,d._vref,d._fref,E,D);for(var j=0;j=0){var c=_.charCodeAt(_.length-1)-48;if(c<2||c>4)throw new l("","Invalid data type for attribute "+d+": "+_);v(y,w,p[0],m,c,A,d)}else if(_.indexOf("mat")>=0){var c=_.charCodeAt(_.length-1)-48;if(c<2||c>4)throw new l("","Invalid data type for attribute "+d+": "+_);g(y,w,p,m,c,A,d)}else throw new l("","Unknown data type for attribute "+d+": "+_);break}}return A}},3327:function(a,o,i){"use strict";var l=i(216),u=i(8866);a.exports=v;function s(g){return function(){return g}}function f(g,b){for(var y=new Array(g),w=0;w4)throw new u("","Invalid data type");switch(O.charAt(0)){case"b":case"i":g["uniform"+U+"iv"](w[D],N);break;case"v":g["uniform"+U+"fv"](w[D],N);break;default:throw new u("","Unrecognized data type for vector "+name+": "+O)}}else if(O.indexOf("mat")===0&&O.length===4){if(U=O.charCodeAt(O.length-1)-48,U<2||U>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+O);g["uniformMatrix"+U+"fv"](w[D],!1,N);break}else throw new u("","Unknown uniform data type for "+name+": "+O)}}}}}function A(_,p){if(typeof p!="object")return[[_,p]];var c=[];for(var k in p){var h=p[k],R=_;parseInt(k)+""===k?R+="["+k+"]":R+="."+k,typeof h=="object"?c.push.apply(c,A(R,h)):c.push([R,h])}return c}function S(_){switch(_){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var p=_.indexOf("vec");if(0<=p&&p<=1&&_.length===4+p){var c=_.charCodeAt(_.length-1)-48;if(c<2||c>4)throw new u("","Invalid data type");return _.charAt(0)==="b"?f(c,!1):f(c,0)}else if(_.indexOf("mat")===0&&_.length===4){var c=_.charCodeAt(_.length-1)-48;if(c<2||c>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+_);return f(c*c,0)}else throw new u("","Unknown uniform data type for "+name+": "+_)}}function x(_,p,c){if(typeof c=="object"){var k=T(c);Object.defineProperty(_,p,{get:s(k),set:m(c),enumerable:!0,configurable:!1})}else w[c]?Object.defineProperty(_,p,{get:M(c),set:m(c),enumerable:!0,configurable:!1}):_[p]=S(y[c].type)}function T(_){var p;if(Array.isArray(_)){p=new Array(_.length);for(var c=0;c<_.length;++c)x(p,c,_[c])}else{p={};for(var k in _)x(p,k,_[k])}return p}var d=l(y,!0);return{get:s(T(d)),set:m(d),enumerable:!0,configurable:!0}}},216:function(a){"use strict";a.exports=o;function o(i,l){for(var u={},s=0;s1){y[0]in g||(g[y[0]]=[]),g=g[y[0]];for(var w=1;w1)for(var A=0;A1?1:Q}function p(Q,oe,ee,G,re,H,te,ue,de,Ee,Me,ve){this.gl=Q,this.pixelRatio=1,this.shader=oe,this.orthoShader=ee,this.projectShader=G,this.pointBuffer=re,this.colorBuffer=H,this.glyphBuffer=te,this.idBuffer=ue,this.vao=de,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=Ee,this.pickOrthoShader=Me,this.pickProjectShader=ve,this.points=[],this._selectResult=new d(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 c=p.prototype;c.pickSlots=1,c.setPickBase=function(Q){this.pickId=Q},c.isTransparent=function(){if(this.hasAlpha)return!0;for(var Q=0;Q<3;++Q)if(this.axesProject[Q]&&this.projectHasAlpha)return!0;return!1},c.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Q=0;Q<3;++Q)if(this.axesProject[Q]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],h=[0,0,0],R=[0,0,0],E=[0,0,0,1],D=[0,0,0,1],N=w.slice(),I=[0,0,0],F=[[0,0,0],[0,0,0]];function L(Q){return Q[0]=Q[1]=Q[2]=0,Q}function P(Q,oe){return Q[0]=oe[0],Q[1]=oe[1],Q[2]=oe[2],Q[3]=1,Q}function O(Q,oe,ee,G){return Q[0]=oe[0],Q[1]=oe[1],Q[2]=oe[2],Q[ee]=G,Q}function U(Q){for(var oe=F,ee=0;ee<2;++ee)for(var G=0;G<3;++G)oe[ee][G]=Math.max(Math.min(Q[ee][G],1e8),-1e8);return oe}function X(Q,oe,ee,G){var re=oe.axesProject,H=oe.gl,te=Q.uniforms,ue=ee.model||w,de=ee.view||w,Ee=ee.projection||w,Me=oe.axesBounds,ve=U(oe.clipBounds),Ae;oe.axes&&oe.axes.lastCubeProps?Ae=oe.axes.lastCubeProps.axis:Ae=[1,1,1],A[0]=2/H.drawingBufferWidth,A[1]=2/H.drawingBufferHeight,Q.bind(),te.view=de,te.projection=Ee,te.screenSize=A,te.highlightId=oe.highlightId,te.highlightScale=oe.highlightScale,te.clipBounds=ve,te.pickGroup=oe.pickId/255,te.pixelRatio=G;for(var ke=0;ke<3;++ke)if(re[ke]){te.scale=oe.projectScale[ke],te.opacity=oe.projectOpacity[ke];for(var De=N,Ce=0;Ce<16;++Ce)De[Ce]=0;for(var Ce=0;Ce<4;++Ce)De[5*Ce]=1;De[5*ke]=0,Ae[ke]<0?De[12+ke]=Me[0][ke]:De[12+ke]=Me[1][ke],v(De,ue,De),te.model=De;var Oe=(ke+1)%3,Ue=(ke+2)%3,ge=L(h),Te=L(R);ge[Oe]=1,Te[Ue]=1;var ce=T(Ee,de,ue,P(E,ge)),ye=T(Ee,de,ue,P(D,Te));if(Math.abs(ce[1])>Math.abs(ye[1])){var Le=ce;ce=ye,ye=Le,Le=ge,ge=Te,Te=Le;var me=Oe;Oe=Ue,Ue=me}ce[0]<0&&(ge[Oe]=-1),ye[1]>0&&(Te[Ue]=-1);for(var he=0,be=0,Ce=0;Ce<4;++Ce)he+=Math.pow(ue[4*Oe+Ce],2),be+=Math.pow(ue[4*Ue+Ce],2);ge[Oe]/=Math.sqrt(he),Te[Ue]/=Math.sqrt(be),te.axes[0]=ge,te.axes[1]=Te,te.fragClipBounds[0]=O(I,ve[0],ke,-1e8),te.fragClipBounds[1]=O(I,ve[1],ke,1e8),oe.vao.bind(),oe.vao.draw(H.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(H.lineWidth(oe.lineWidth*G),oe.vao.draw(H.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}var j=[-1e8,-1e8,-1e8],$=[1e8,1e8,1e8],Y=[j,$];function q(Q,oe,ee,G,re,H,te){var ue=ee.gl;if((H===ee.projectHasAlpha||te)&&X(oe,ee,G,re),H===ee.hasAlpha||te){Q.bind();var de=Q.uniforms;de.model=G.model||w,de.view=G.view||w,de.projection=G.projection||w,A[0]=2/ue.drawingBufferWidth,A[1]=2/ue.drawingBufferHeight,de.screenSize=A,de.highlightId=ee.highlightId,de.highlightScale=ee.highlightScale,de.fragClipBounds=Y,de.clipBounds=ee.axes.bounds,de.opacity=ee.opacity,de.pickGroup=ee.pickId/255,de.pixelRatio=re,ee.vao.bind(),ee.vao.draw(ue.TRIANGLES,ee.vertexCount),ee.lineWidth>0&&(ue.lineWidth(ee.lineWidth*re),ee.vao.draw(ue.LINES,ee.lineVertexCount,ee.vertexCount)),ee.vao.unbind()}}c.draw=function(Q){var oe=this.useOrtho?this.orthoShader:this.shader;q(oe,this.projectShader,this,Q,this.pixelRatio,!1,!1)},c.drawTransparent=function(Q){var oe=this.useOrtho?this.orthoShader:this.shader;q(oe,this.projectShader,this,Q,this.pixelRatio,!0,!1)},c.drawPick=function(Q){var oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;q(oe,this.pickProjectShader,this,Q,1,!0,!0)},c.pick=function(Q){if(!Q||Q.id!==this.pickId)return null;var oe=Q.value[2]+(Q.value[1]<<8)+(Q.value[0]<<16);if(oe>=this.pointCount||oe<0)return null;var ee=this.points[oe],G=this._selectResult;G.index=oe;for(var re=0;re<3;++re)G.position[re]=G.dataCoordinate[re]=ee[re];return G},c.highlight=function(Q){if(!Q)this.highlightId=[1,1,1,1];else{var oe=Q.index,ee=oe&255,G=oe>>8&255,re=oe>>16&255;this.highlightId=[ee/255,G/255,re/255,0]}};function Z(Q,oe,ee,G){var re;S(Q)?oe0){var Ge=0,We=Ue,we=[0,0,0,1],Pe=[0,0,0,1],Qe=S(Ae)&&S(Ae[0]),Ve=S(Ce)&&S(Ce[0]);e:for(var G=0;G0?1-be[0][0]:je<0?1+be[1][0]:1,nr*=nr>0?1-be[0][1]:nr<0?1+be[1][1]:1;for(var hr=[je,nr],ft=me.cells||[],Yr=me.positions||[],ye=0;yethis.buffer.length){u.free(this.buffer);for(var S=this.buffer=u.mallocUint8(f(k*m*4)),x=0;xS)for(m=S;mk)for(m=k;m=0){for(var F=I.type.charAt(I.type.length-1)|0,L=new Array(F),P=0;P=0;)O+=1;D[N]=O}var U=new Array(S.length);function X(){d.program=f.program(b,d._vref,d._fref,E,D);for(var j=0;j=0){var c=b.charCodeAt(b.length-1)-48;if(c<2||c>4)throw new l("","Invalid data type for attribute "+d+": "+b);v(y,w,p[0],m,c,k,d)}else if(b.indexOf("mat")>=0){var c=b.charCodeAt(b.length-1)-48;if(c<2||c>4)throw new l("","Invalid data type for attribute "+d+": "+b);g(y,w,p,m,c,k,d)}else throw new l("","Unknown data type for attribute "+d+": "+b);break}}return k}},3327:function(a,o,i){"use strict";var l=i(216),u=i(8866);a.exports=v;function s(g){return function(){return g}}function f(g,_){for(var y=new Array(g),w=0;w4)throw new u("","Invalid data type");switch(O.charAt(0)){case"b":case"i":g["uniform"+U+"iv"](w[D],N);break;case"v":g["uniform"+U+"fv"](w[D],N);break;default:throw new u("","Unrecognized data type for vector "+name+": "+O)}}else if(O.indexOf("mat")===0&&O.length===4){if(U=O.charCodeAt(O.length-1)-48,U<2||U>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+O);g["uniformMatrix"+U+"fv"](w[D],!1,N);break}else throw new u("","Unknown uniform data type for "+name+": "+O)}}}}}function k(b,p){if(typeof p!="object")return[[b,p]];var c=[];for(var A in p){var h=p[A],R=b;parseInt(A)+""===A?R+="["+A+"]":R+="."+A,typeof h=="object"?c.push.apply(c,k(R,h)):c.push([R,h])}return c}function S(b){switch(b){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var p=b.indexOf("vec");if(0<=p&&p<=1&&b.length===4+p){var c=b.charCodeAt(b.length-1)-48;if(c<2||c>4)throw new u("","Invalid data type");return b.charAt(0)==="b"?f(c,!1):f(c,0)}else if(b.indexOf("mat")===0&&b.length===4){var c=b.charCodeAt(b.length-1)-48;if(c<2||c>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+b);return f(c*c,0)}else throw new u("","Unknown uniform data type for "+name+": "+b)}}function x(b,p,c){if(typeof c=="object"){var A=T(c);Object.defineProperty(b,p,{get:s(A),set:m(c),enumerable:!0,configurable:!1})}else w[c]?Object.defineProperty(b,p,{get:M(c),set:m(c),enumerable:!0,configurable:!1}):b[p]=S(y[c].type)}function T(b){var p;if(Array.isArray(b)){p=new Array(b.length);for(var c=0;c1){y[0]in g||(g[y[0]]=[]),g=g[y[0]];for(var w=1;w1)for(var k=0;k0)for(var q=0;qT)return _-1}return _},b=function(x,T,d){return xd?d:x},y=function(x,T,d){var _=T.vectors,p=T.meshgrid,c=x[0],k=x[1],h=x[2],R=p[0].length,E=p[1].length,D=p[2].length,N=g(p[0],c),I=g(p[1],k),F=g(p[2],h),L=N+1,P=I+1,O=F+1;if(N=b(N,0,R-1),L=b(L,0,R-1),I=b(I,0,E-1),P=b(P,0,E-1),F=b(F,0,D-1),O=b(O,0,D-1),N<0||I<0||F<0||L>R-1||P>E-1||O>D-1)return l.create();var U=p[0][N],X=p[0][L],j=p[1][I],$=p[1][P],Y=p[2][F],q=p[2][O],Z=(c-U)/(X-U),ne=(k-j)/($-j),Q=(h-Y)/(q-Y);isFinite(Z)||(Z=.5),isFinite(ne)||(ne=.5),isFinite(Q)||(Q=.5);var oe,ee,G,re,H,te;switch(d.reversedX&&(N=R-1-N,L=R-1-L),d.reversedY&&(I=E-1-I,P=E-1-P),d.reversedZ&&(F=D-1-F,O=D-1-O),d.filled){case 5:H=F,te=O,G=I*D,re=P*D,oe=N*D*E,ee=L*D*E;break;case 4:H=F,te=O,oe=N*D,ee=L*D,G=I*D*R,re=P*D*R;break;case 3:G=I,re=P,H=F*E,te=O*E,oe=N*E*D,ee=L*E*D;break;case 2:G=I,re=P,oe=N*E,ee=L*E,H=F*E*R,te=O*E*R;break;case 1:oe=N,ee=L,H=F*R,te=O*R,G=I*R*D,re=P*R*D;break;default:oe=N,ee=L,G=I*R,re=P*R,H=F*R*E,te=O*R*E;break}var ue=_[oe+G+H],de=_[oe+G+te],Ee=_[oe+re+H],Me=_[oe+re+te],ve=_[ee+G+H],Ae=_[ee+G+te],ke=_[ee+re+H],De=_[ee+re+te],Ce=l.create(),Oe=l.create(),Ue=l.create(),ge=l.create();l.lerp(Ce,ue,ve,Z),l.lerp(Oe,de,Ae,Z),l.lerp(Ue,Ee,ke,Z),l.lerp(ge,Me,De,Z);var Te=l.create(),ce=l.create();l.lerp(Te,Ce,Ue,ne),l.lerp(ce,Oe,ge,ne);var ye=l.create();return l.lerp(ye,Te,ce,Q),ye},w=function(x,T){var d=T[0],_=T[1],p=T[2];return x[0]=d<0?-d:d,x[1]=_<0?-_:_,x[2]=p<0?-p:p,x},M=function(x){var T=1/0;x.sort(function(c,k){return c-k});for(var d=x.length,_=1;_L||DeP||CeO)},X=l.distance(T[0],T[1]),j=10*X/_,$=j*j,Y=1,q=0,Z=d.length;Z>1&&(Y=m(d));for(var ne=0;neq&&(q=ue),H.push(ue),D.push({points:oe,velocities:ee,divergences:H});for(var de=0;de<_*100&&oe.length<_&&U(Q);){de++;var Ee=l.clone(G),Me=l.squaredLength(Ee);if(Me===0)break;if(Me>$&&l.scale(Ee,Ee,j/Math.sqrt(Me)),l.add(Ee,Ee,Q),G=R(Ee),l.squaredDistance(re,Ee)-$>-1e-4*$){oe.push(Ee),re=Ee,ee.push(G);var te=E(Ee,G),ue=l.length(te);isFinite(ue)&&ue>q&&(q=ue),H.push(ue)}Q=Ee}}var ve=v(D,x.colormap,q,Y);return c?ve.tubeScale=c:(q===0&&(q=1),ve.tubeScale=p*.5*Y/q),ve};var A=i(6740),S=i(6405).createMesh;a.exports.createTubeMesh=function(x,T){return S(x,T,{shaders:A,traceType:"streamtube"})}},990:function(a,o,i){var l=i(9405),u=i(3236),s=u([`precision highp float; +}`]);o.meshShader={vertex:u,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},o.pickShader={vertex:f,fragment:v,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(a,o,i){"use strict";var l=i(2931),u=i(9970),s=["xyz","xzy","yxz","yzx","zxy","zyx"],f=function(x,T,d,b){for(var p=x.points,c=x.velocities,A=x.divergences,h=[],R=[],E=[],D=[],N=[],I=[],F=0,L=0,P=u.create(),O=u.create(),U=8,X=0;X0)for(var q=0;qT)return b-1}return b},_=function(x,T,d){return xd?d:x},y=function(x,T,d){var b=T.vectors,p=T.meshgrid,c=x[0],A=x[1],h=x[2],R=p[0].length,E=p[1].length,D=p[2].length,N=g(p[0],c),I=g(p[1],A),F=g(p[2],h),L=N+1,P=I+1,O=F+1;if(N=_(N,0,R-1),L=_(L,0,R-1),I=_(I,0,E-1),P=_(P,0,E-1),F=_(F,0,D-1),O=_(O,0,D-1),N<0||I<0||F<0||L>R-1||P>E-1||O>D-1)return l.create();var U=p[0][N],X=p[0][L],j=p[1][I],$=p[1][P],Y=p[2][F],q=p[2][O],Z=(c-U)/(X-U),ne=(A-j)/($-j),Q=(h-Y)/(q-Y);isFinite(Z)||(Z=.5),isFinite(ne)||(ne=.5),isFinite(Q)||(Q=.5);var oe,ee,G,re,H,te;switch(d.reversedX&&(N=R-1-N,L=R-1-L),d.reversedY&&(I=E-1-I,P=E-1-P),d.reversedZ&&(F=D-1-F,O=D-1-O),d.filled){case 5:H=F,te=O,G=I*D,re=P*D,oe=N*D*E,ee=L*D*E;break;case 4:H=F,te=O,oe=N*D,ee=L*D,G=I*D*R,re=P*D*R;break;case 3:G=I,re=P,H=F*E,te=O*E,oe=N*E*D,ee=L*E*D;break;case 2:G=I,re=P,oe=N*E,ee=L*E,H=F*E*R,te=O*E*R;break;case 1:oe=N,ee=L,H=F*R,te=O*R,G=I*R*D,re=P*R*D;break;default:oe=N,ee=L,G=I*R,re=P*R,H=F*R*E,te=O*R*E;break}var ue=b[oe+G+H],de=b[oe+G+te],Ee=b[oe+re+H],Me=b[oe+re+te],ve=b[ee+G+H],Ae=b[ee+G+te],ke=b[ee+re+H],De=b[ee+re+te],Ce=l.create(),Oe=l.create(),Ue=l.create(),ge=l.create();l.lerp(Ce,ue,ve,Z),l.lerp(Oe,de,Ae,Z),l.lerp(Ue,Ee,ke,Z),l.lerp(ge,Me,De,Z);var Te=l.create(),ce=l.create();l.lerp(Te,Ce,Ue,ne),l.lerp(ce,Oe,ge,ne);var ye=l.create();return l.lerp(ye,Te,ce,Q),ye},w=function(x,T){var d=T[0],b=T[1],p=T[2];return x[0]=d<0?-d:d,x[1]=b<0?-b:b,x[2]=p<0?-p:p,x},M=function(x){var T=1/0;x.sort(function(c,A){return c-A});for(var d=x.length,b=1;bL||DeP||CeO)},X=l.distance(T[0],T[1]),j=10*X/b,$=j*j,Y=1,q=0,Z=d.length;Z>1&&(Y=m(d));for(var ne=0;neq&&(q=ue),H.push(ue),D.push({points:oe,velocities:ee,divergences:H});for(var de=0;de$&&l.scale(Ee,Ee,j/Math.sqrt(Me)),l.add(Ee,Ee,Q),G=R(Ee),l.squaredDistance(re,Ee)-$>-1e-4*$){oe.push(Ee),re=Ee,ee.push(G);var te=E(Ee,G),ue=l.length(te);isFinite(ue)&&ue>q&&(q=ue),H.push(ue)}Q=Ee}}var ve=v(D,x.colormap,q,Y);return c?ve.tubeScale=c:(q===0&&(q=1),ve.tubeScale=p*.5*Y/q),ve};var k=i(6740),S=i(6405).createMesh;a.exports.createTubeMesh=function(x,T){return S(x,T,{shaders:k,traceType:"streamtube"})}},990:function(a,o,i){var l=i(9405),u=i(3236),s=u([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1920,13 +1920,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);o.createShader=function(b){var y=l(b,s,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},o.createPickShader=function(b){var y=l(b,s,g,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},o.createContourShader=function(b){var y=l(b,v,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y},o.createPickContourShader=function(b){var y=l(b,v,g,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y}},9499:function(a,o,i){"use strict";a.exports=oe;var l=i(8828),u=i(2762),s=i(8116),f=i(7766),v=i(1888),g=i(6729),b=i(5298),y=i(9994),w=i(9618),M=i(3711),m=i(6760),A=i(7608),S=i(2478),x=i(6199),T=i(990),d=T.createShader,_=T.createContourShader,p=T.createPickShader,c=T.createPickContourShader,k=4*10,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],E=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var ee=0;ee<3;++ee){var G=E[ee],re=(ee+1)%3,H=(ee+2)%3;G[re+0]=1,G[H+3]=1,G[ee+6]=1}})();function D(ee,G,re,H,te){this.position=ee,this.index=G,this.uv=re,this.level=H,this.dataCoordinate=te}var N=256;function I(ee,G,re,H,te,ue,de,Ee,Me,ve,Ae,ke,De,Ce,Oe){this.gl=ee,this.shape=G,this.bounds=re,this.objectOffset=Oe,this.intensityBounds=[],this._shader=H,this._pickShader=te,this._coordinateBuffer=ue,this._vao=de,this._colorMap=Ee,this._contourShader=Me,this._contourPickShader=ve,this._contourBuffer=Ae,this._contourVAO=ke,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new D([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=De,this._dynamicVAO=Ce,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[w(v.mallocFloat(1024),[0,0]),w(v.mallocFloat(1024),[0,0]),w(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=I.prototype;F.genColormap=function(ee,G){var re=!1,H=y([g({colormap:ee,nshades:N,format:"rgba"}).map(function(te,ue){var de=G?L(ue/255,G):te[3];return de<1&&(re=!0),[te[0],te[1],te[2],255*de]})]);return b.divseq(H,255),this.hasAlphaScale=re,H},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(ee){this.pickId=ee};function L(ee,G){if(!G||!G.length)return 1;for(var re=0;reee&&re>0){var H=(G[re][0]-ee)/(G[re][0]-G[re-1][0]);return G[re][1]*(1-H)+H*G[re-1][1]}}return 1}var P=[0,0,0],O={showSurface:!1,showContour:!1,projections:[h.slice(),h.slice(),h.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function U(ee,G){var re,H,te,ue=G.axes&&G.axes.lastCubeProps.axis||P,de=G.showSurface,Ee=G.showContour;for(re=0;re<3;++re)for(de=de||G.surfaceProject[re],H=0;H<3;++H)Ee=Ee||G.contourProject[re][H];for(re=0;re<3;++re){var Me=O.projections[re];for(H=0;H<16;++H)Me[H]=0;for(H=0;H<4;++H)Me[5*H]=1;Me[5*re]=0,Me[12+re]=G.axesBounds[+(ue[re]>0)][re],m(Me,ee.model,Me);var ve=O.clipBounds[re];for(te=0;te<2;++te)for(H=0;H<3;++H)ve[te][H]=ee.clipBounds[te][H];ve[0][re]=-1e8,ve[1][re]=1e8}return O.showSurface=de,O.showContour=Ee,O}var X={model:h,view:h,projection:h,inverseModel:h.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},j=h.slice(),$=[1,0,0,0,1,0,0,0,1];function Y(ee,G){ee=ee||{};var re=this.gl;re.disable(re.CULL_FACE),this._colorMap.bind(0);var H=X;H.model=ee.model||h,H.view=ee.view||h,H.projection=ee.projection||h,H.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],H.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],H.objectOffset=this.objectOffset,H.contourColor=this.contourColor[0],H.inverseModel=A(H.inverseModel,H.model);for(var te=0;te<2;++te)for(var ue=H.clipBounds[te],de=0;de<3;++de)ue[de]=Math.min(Math.max(this.clipBounds[te][de],-1e8),1e8);H.kambient=this.ambientLight,H.kdiffuse=this.diffuseLight,H.kspecular=this.specularLight,H.roughness=this.roughness,H.fresnel=this.fresnel,H.opacity=this.opacity,H.height=0,H.permutation=$,H.vertexColor=this.vertexColor;var Ee=j;for(m(Ee,H.view,H.model),m(Ee,H.projection,Ee),A(Ee,Ee),te=0;te<3;++te)H.eyePosition[te]=Ee[12+te]/Ee[15];var Me=Ee[15];for(te=0;te<3;++te)Me+=this.lightPosition[te]*Ee[4*te+3];for(te=0;te<3;++te){var ve=Ee[12+te];for(de=0;de<3;++de)ve+=Ee[4*de+te]*this.lightPosition[de];H.lightPosition[te]=ve/Me}var Ae=U(H,this);if(Ae.showSurface){for(this._shader.bind(),this._shader.uniforms=H,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(re.TRIANGLES,this._vertexCount),te=0;te<3;++te)!this.surfaceProject[te]||!this.vertexCount||(this._shader.uniforms.model=Ae.projections[te],this._shader.uniforms.clipBounds=Ae.clipBounds[te],this._vao.draw(re.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var ke=this._contourShader;H.kambient=1,H.kdiffuse=0,H.kspecular=0,H.opacity=1,ke.bind(),ke.uniforms=H;var De=this._contourVAO;for(De.bind(),te=0;te<3;++te)for(ke.uniforms.permutation=E[te],re.lineWidth(this.contourWidth[te]*this.pixelRatio),de=0;de>4)/16)/255,te=Math.floor(H),ue=H-te,de=G[1]*(ee.value[1]+(ee.value[2]&15)/16)/255,Ee=Math.floor(de),Me=de-Ee;te+=1,Ee+=1;var ve=re.position;ve[0]=ve[1]=ve[2]=0;for(var Ae=0;Ae<2;++Ae)for(var ke=Ae?ue:1-ue,De=0;De<2;++De)for(var Ce=De?Me:1-Me,Oe=te+Ae,Ue=Ee+De,ge=ke*Ce,Te=0;Te<3;++Te)ve[Te]+=this._field[Te].get(Oe,Ue)*ge;for(var ce=this._pickResult.level,ye=0;ye<3;++ye)if(ce[ye]=S.le(this.contourLevels[ye],ve[ye]),ce[ye]<0)this.contourLevels[ye].length>0&&(ce[ye]=0);else if(ce[ye]Math.abs(me-ve[ye])&&(ce[ye]+=1)}for(re.index[0]=ue<.5?te:te+1,re.index[1]=Me<.5?Ee:Ee+1,re.uv[0]=H/G[0],re.uv[1]=de/G[1],Te=0;Te<3;++Te)re.dataCoordinate[Te]=this._field[Te].get(re.index[0],re.index[1]);return re},F.padField=function(ee,G){var re=G.shape.slice(),H=ee.shape.slice();b.assign(ee.lo(1,1).hi(re[0],re[1]),G),b.assign(ee.lo(1).hi(re[0],1),G.hi(re[0],1)),b.assign(ee.lo(1,H[1]-1).hi(re[0],1),G.lo(0,re[1]-1).hi(re[0],1)),b.assign(ee.lo(0,1).hi(1,re[1]),G.hi(1)),b.assign(ee.lo(H[0]-1,1).hi(1,re[1]),G.lo(re[0]-1)),ee.set(0,0,G.get(0,0)),ee.set(0,H[1]-1,G.get(0,re[1]-1)),ee.set(H[0]-1,0,G.get(re[0]-1,0)),ee.set(H[0]-1,H[1]-1,G.get(re[0]-1,re[1]-1))};function Z(ee,G){return Array.isArray(ee)?[G(ee[0]),G(ee[1]),G(ee[2])]:[G(ee),G(ee),G(ee)]}function ne(ee){return Array.isArray(ee)?ee.length===3?[ee[0],ee[1],ee[2],1]:[ee[0],ee[1],ee[2],ee[3]]:[0,0,0,1]}function Q(ee){if(Array.isArray(ee)){if(Array.isArray(ee))return[ne(ee[0]),ne(ee[1]),ne(ee[2])];var G=ne(ee);return[G.slice(),G.slice(),G.slice()]}}F.update=function(ee){ee=ee||{},this.objectOffset=ee.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ee&&(this.contourWidth=Z(ee.contourWidth,Number)),"showContour"in ee&&(this.showContour=Z(ee.showContour,Boolean)),"showSurface"in ee&&(this.showSurface=!!ee.showSurface),"contourTint"in ee&&(this.contourTint=Z(ee.contourTint,Boolean)),"contourColor"in ee&&(this.contourColor=Q(ee.contourColor)),"contourProject"in ee&&(this.contourProject=Z(ee.contourProject,function(wa){return Z(wa,Boolean)})),"surfaceProject"in ee&&(this.surfaceProject=ee.surfaceProject),"dynamicColor"in ee&&(this.dynamicColor=Q(ee.dynamicColor)),"dynamicTint"in ee&&(this.dynamicTint=Z(ee.dynamicTint,Number)),"dynamicWidth"in ee&&(this.dynamicWidth=Z(ee.dynamicWidth,Number)),"opacity"in ee&&(this.opacity=ee.opacity),"opacityscale"in ee&&(this.opacityscale=ee.opacityscale),"colorBounds"in ee&&(this.colorBounds=ee.colorBounds),"vertexColor"in ee&&(this.vertexColor=ee.vertexColor?1:0),"colormap"in ee&&this._colorMap.setPixels(this.genColormap(ee.colormap,this.opacityscale));var G=ee.field||ee.coords&&ee.coords[2]||null,re=!1;if(G||(this._field[2].shape[0]||this._field[2].shape[2]?G=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):G=this._field[2].hi(0,0)),"field"in ee||"coords"in ee){var H=(G.shape[0]+2)*(G.shape[1]+2);H>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(l.nextPow2(H))),this._field[2]=w(this._field[2].data,[G.shape[0]+2,G.shape[1]+2]),this.padField(this._field[2],G),this.shape=G.shape.slice();for(var te=this.shape,ue=0;ue<2;++ue)this._field[2].size>this._field[ue].data.length&&(v.freeFloat(this._field[ue].data),this._field[ue].data=v.mallocFloat(this._field[2].size)),this._field[ue]=w(this._field[ue].data,[te[0]+2,te[1]+2]);if(ee.coords){var de=ee.coords;if(!Array.isArray(de)||de.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ue=0;ue<2;++ue){var Ee=de[ue];for(De=0;De<2;++De)if(Ee.shape[De]!==te[De])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ue],Ee)}}else if(ee.ticks){var Me=ee.ticks;if(!Array.isArray(Me)||Me.length!==2)throw new Error("gl-surface: invalid ticks");for(ue=0;ue<2;++ue){var ve=Me[ue];if((Array.isArray(ve)||ve.length)&&(ve=w(ve)),ve.shape[0]!==te[ue])throw new Error("gl-surface: invalid tick length");var Ae=w(ve.data,te);Ae.stride[ue]=ve.stride[0],Ae.stride[ue^1]=0,this.padField(this._field[ue],Ae)}}else{for(ue=0;ue<2;++ue){var ke=[0,0];ke[ue]=1,this._field[ue]=w(this._field[ue].data,[te[0]+2,te[1]+2],ke,0)}this._field[0].set(0,0,0);for(var De=0;De0){for(var Qn=0;Qn<5;++Qn)wr.pop();Qe-=1}continue e}}}ft.push(Qe)}this._contourOffsets[Cr]=Ar,this._contourCounts[Cr]=ft}var Fn=v.mallocFloat(wr.length);for(ue=0;ueD||R<0||R>D)throw new Error("gl-texture2d: Invalid texture size");return k._shape=[h,R],k.bind(),E.texImage2D(E.TEXTURE_2D,0,k.format,h,R,0,k.format,k.type,null),k._mipLevels=[0],k}function m(k,h,R,E,D,N){this.gl=k,this.handle=h,this.format=D,this.type=N,this._shape=[R,E],this._mipLevels=[0],this._magFilter=k.NEAREST,this._minFilter=k.NEAREST,this._wrapS=k.CLAMP_TO_EDGE,this._wrapT=k.CLAMP_TO_EDGE,this._anisoSamples=1;var I=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return I._wrapS},set:function(P){return I.wrapS=P}},{get:function(){return I._wrapT},set:function(P){return I.wrapT=P}}]),this._wrapVector=F;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return I._shape[0]},set:function(P){return I.width=P}},{get:function(){return I._shape[1]},set:function(P){return I.height=P}}]),this._shapeVector=L}var A=m.prototype;Object.defineProperties(A,{minFilter:{get:function(){return this._minFilter},set:function(k){this.bind();var h=this.gl;if(this.type===h.FLOAT&&f.indexOf(k)>=0&&(h.getExtension("OES_texture_float_linear")||(k=h.NEAREST)),v.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,k),this._minFilter=k}},magFilter:{get:function(){return this._magFilter},set:function(k){this.bind();var h=this.gl;if(this.type===h.FLOAT&&f.indexOf(k)>=0&&(h.getExtension("OES_texture_float_linear")||(k=h.NEAREST)),v.indexOf(k)<0)throw new Error("gl-texture2d: Unknown filter mode "+k);return h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,k),this._magFilter=k}},mipSamples:{get:function(){return this._anisoSamples},set:function(k){var h=this._anisoSamples;if(this._anisoSamples=Math.max(k,1)|0,h!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(k){if(this.bind(),g.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,k),this._wrapS=k}},wrapT:{get:function(){return this._wrapT},set:function(k){if(this.bind(),g.indexOf(k)<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,k),this._wrapT=k}},wrap:{get:function(){return this._wrapVector},set:function(k){if(Array.isArray(k)||(k=[k,k]),k.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var h=0;h<2;++h)if(g.indexOf(k[h])<0)throw new Error("gl-texture2d: Unknown wrap mode "+k);this._wrapS=k[0],this._wrapT=k[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),k}},shape:{get:function(){return this._shapeVector},set:function(k){if(!Array.isArray(k))k=[k|0,k|0];else if(k.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return M(this,k[0]|0,k[1]|0),[k[0]|0,k[1]|0]}},width:{get:function(){return this._shape[0]},set:function(k){return k=k|0,M(this,k,this._shape[1]),k}},height:{get:function(){return this._shape[1]},set:function(k){return k=k|0,M(this,this._shape[0],k),k}}}),A.bind=function(k){var h=this.gl;return k!==void 0&&h.activeTexture(h.TEXTURE0+(k|0)),h.bindTexture(h.TEXTURE_2D,this.handle),k!==void 0?k|0:h.getParameter(h.ACTIVE_TEXTURE)-h.TEXTURE0},A.dispose=function(){this.gl.deleteTexture(this.handle)},A.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var k=Math.min(this._shape[0],this._shape[1]),h=0;k>0;++h,k>>>=1)this._mipLevels.indexOf(h)<0&&this._mipLevels.push(h)},A.setPixels=function(k,h,R,E){var D=this.gl;this.bind(),Array.isArray(h)?(E=R,R=h[1]|0,h=h[0]|0):(h=h||0,R=R||0),E=E||0;var N=y(k)?k:k.raw;if(N){var I=this._mipLevels.indexOf(E)<0;I?(D.texImage2D(D.TEXTURE_2D,0,this.format,this.format,this.type,N),this._mipLevels.push(E)):D.texSubImage2D(D.TEXTURE_2D,E,h,R,this.format,this.type,N)}else if(k.shape&&k.stride&&k.data){if(k.shape.length<2||h+k.shape[1]>this._shape[1]>>>E||R+k.shape[0]>this._shape[0]>>>E||h<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");x(D,h,R,E,this.format,this.type,this._mipLevels,k)}else throw new Error("gl-texture2d: Unsupported data type")};function S(k,h){return k.length===3?h[2]===1&&h[1]===k[0]*k[2]&&h[0]===k[2]:h[0]===1&&h[1]===k[0]}function x(k,h,R,E,D,N,I,F){var L=F.dtype,P=F.shape.slice();if(P.length<2||P.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var O=0,U=0,X=S(P,F.stride.slice());L==="float32"?O=k.FLOAT:L==="float64"?(O=k.FLOAT,X=!1,L="float32"):L==="uint8"?O=k.UNSIGNED_BYTE:(O=k.UNSIGNED_BYTE,X=!1,L="uint8");var j=1;if(P.length===2)U=k.LUMINANCE,P=[P[0],P[1],1],F=l(F.data,P,[F.stride[0],F.stride[1],1],F.offset);else if(P.length===3){if(P[2]===1)U=k.ALPHA;else if(P[2]===2)U=k.LUMINANCE_ALPHA;else if(P[2]===3)U=k.RGB;else if(P[2]===4)U=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");j=P[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((U===k.LUMINANCE||U===k.ALPHA)&&(D===k.LUMINANCE||D===k.ALPHA)&&(U=D),U!==D)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var $=F.size,Y=I.indexOf(E)<0;if(Y&&I.push(E),O===N&&X)F.offset===0&&F.data.length===$?Y?k.texImage2D(k.TEXTURE_2D,E,D,P[0],P[1],0,D,N,F.data):k.texSubImage2D(k.TEXTURE_2D,E,h,R,P[0],P[1],D,N,F.data):Y?k.texImage2D(k.TEXTURE_2D,E,D,P[0],P[1],0,D,N,F.data.subarray(F.offset,F.offset+$)):k.texSubImage2D(k.TEXTURE_2D,E,h,R,P[0],P[1],D,N,F.data.subarray(F.offset,F.offset+$));else{var q;N===k.FLOAT?q=s.mallocFloat32($):q=s.mallocUint8($);var Z=l(q,P,[P[2],P[2]*P[0],1]);O===k.FLOAT&&N===k.UNSIGNED_BYTE?w(Z,F):u.assign(Z,F),Y?k.texImage2D(k.TEXTURE_2D,E,D,P[0],P[1],0,D,N,q.subarray(0,$)):k.texSubImage2D(k.TEXTURE_2D,E,h,R,P[0],P[1],D,N,q.subarray(0,$)),N===k.FLOAT?s.freeFloat32(q):s.freeUint8(q)}}function T(k){var h=k.createTexture();return k.bindTexture(k.TEXTURE_2D,h),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),h}function d(k,h,R,E,D){var N=k.getParameter(k.MAX_TEXTURE_SIZE);if(h<0||h>N||R<0||R>N)throw new Error("gl-texture2d: Invalid texture shape");if(D===k.FLOAT&&!k.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var I=T(k);return k.texImage2D(k.TEXTURE_2D,0,E,h,R,0,E,D,null),new m(k,I,h,R,E,D)}function _(k,h,R,E,D,N){var I=T(k);return k.texImage2D(k.TEXTURE_2D,0,D,D,N,h),new m(k,I,R,E,D,N)}function p(k,h){var R=h.dtype,E=h.shape.slice(),D=k.getParameter(k.MAX_TEXTURE_SIZE);if(E[0]<0||E[0]>D||E[1]<0||E[1]>D)throw new Error("gl-texture2d: Invalid texture size");var N=S(E,h.stride.slice()),I=0;R==="float32"?I=k.FLOAT:R==="float64"?(I=k.FLOAT,N=!1,R="float32"):R==="uint8"?I=k.UNSIGNED_BYTE:(I=k.UNSIGNED_BYTE,N=!1,R="uint8");var F=0;if(E.length===2)F=k.LUMINANCE,E=[E[0],E[1],1],h=l(h.data,E,[h.stride[0],h.stride[1],1],h.offset);else if(E.length===3)if(E[2]===1)F=k.ALPHA;else if(E[2]===2)F=k.LUMINANCE_ALPHA;else if(E[2]===3)F=k.RGB;else if(E[2]===4)F=k.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");I===k.FLOAT&&!k.getExtension("OES_texture_float")&&(I=k.UNSIGNED_BYTE,N=!1);var L,P,O=h.size;if(N)h.offset===0&&h.data.length===O?L=h.data:L=h.data.subarray(h.offset,h.offset+O);else{var U=[E[2],E[2]*E[0],1];P=s.malloc(O,R);var X=l(P,E,U,0);(R==="float32"||R==="float64")&&I===k.UNSIGNED_BYTE?w(X,h):u.assign(X,h),L=P.subarray(0,O)}var j=T(k);return k.texImage2D(k.TEXTURE_2D,0,F,E[0],E[1],0,F,I,L),N||s.free(P),new m(k,j,E[0],E[1],F,I)}function c(k){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||b(k),typeof arguments[1]=="number")return d(k,arguments[1],arguments[2],arguments[3]||k.RGBA,arguments[4]||k.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return d(k,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var h=arguments[1],R=y(h)?h:h.raw;if(R)return _(k,R,h.width|0,h.height|0,arguments[2]||k.RGBA,arguments[3]||k.UNSIGNED_BYTE);if(h.shape&&h.data&&h.stride)return p(k,h)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(a){"use strict";function o(i,l,u){l?l.bind():i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null);var s=i.getParameter(i.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>s)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(w)}},9226:function(a){a.exports=o;function o(i,l){return i[0]=Math.ceil(l[0]),i[1]=Math.ceil(l[1]),i[2]=Math.ceil(l[2]),i}},3126:function(a){a.exports=o;function o(i){var l=new Float32Array(3);return l[0]=i[0],l[1]=i[1],l[2]=i[2],l}},3990:function(a){a.exports=o;function o(i,l){return i[0]=l[0],i[1]=l[1],i[2]=l[2],i}},1091:function(a){a.exports=o;function o(){var i=new Float32Array(3);return i[0]=0,i[1]=0,i[2]=0,i}},5911:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[0],b=u[1],y=u[2];return i[0]=f*y-v*b,i[1]=v*g-s*y,i[2]=s*b-f*g,i}},5455:function(a,o,i){a.exports=i(7056)},7056:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2];return Math.sqrt(u*u+s*s+f*f)}},4008:function(a,o,i){a.exports=i(6690)},6690:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]/u[0],i[1]=l[1]/u[1],i[2]=l[2]/u[2],i}},244:function(a){a.exports=o;function o(i,l){return i[0]*l[0]+i[1]*l[1]+i[2]*l[2]}},2613:function(a){a.exports=1e-6},9922:function(a,o,i){a.exports=u;var l=i(2613);function u(s,f){var v=s[0],g=s[1],b=s[2],y=f[0],w=f[1],M=f[2];return Math.abs(v-y)<=l*Math.max(1,Math.abs(v),Math.abs(y))&&Math.abs(g-w)<=l*Math.max(1,Math.abs(g),Math.abs(w))&&Math.abs(b-M)<=l*Math.max(1,Math.abs(b),Math.abs(M))}},9265:function(a){a.exports=o;function o(i,l){return i[0]===l[0]&&i[1]===l[1]&&i[2]===l[2]}},2681:function(a){a.exports=o;function o(i,l){return i[0]=Math.floor(l[0]),i[1]=Math.floor(l[1]),i[2]=Math.floor(l[2]),i}},5137:function(a,o,i){a.exports=u;var l=i(1091)();function u(s,f,v,g,b,y){var w,M;for(f||(f=3),v||(v=0),g?M=Math.min(g*f+v,s.length):M=s.length,w=v;w0&&(v=1/Math.sqrt(v),i[0]=l[0]*v,i[1]=l[1]*v,i[2]=l[2]*v),i}},7636:function(a){a.exports=o;function o(i,l){l=l||1;var u=Math.random()*2*Math.PI,s=Math.random()*2-1,f=Math.sqrt(1-s*s)*l;return i[0]=Math.cos(u)*f,i[1]=Math.sin(u)*f,i[2]=s*l,i}},6894:function(a){a.exports=o;function o(i,l,u,s){var f=u[1],v=u[2],g=l[1]-f,b=l[2]-v,y=Math.sin(s),w=Math.cos(s);return i[0]=l[0],i[1]=f+g*w-b*y,i[2]=v+g*y+b*w,i}},109:function(a){a.exports=o;function o(i,l,u,s){var f=u[0],v=u[2],g=l[0]-f,b=l[2]-v,y=Math.sin(s),w=Math.cos(s);return i[0]=f+b*y+g*w,i[1]=l[1],i[2]=v+b*w-g*y,i}},8692:function(a){a.exports=o;function o(i,l,u,s){var f=u[0],v=u[1],g=l[0]-f,b=l[1]-v,y=Math.sin(s),w=Math.cos(s);return i[0]=f+g*w-b*y,i[1]=v+g*y+b*w,i[2]=l[2],i}},2447:function(a){a.exports=o;function o(i,l){return i[0]=Math.round(l[0]),i[1]=Math.round(l[1]),i[2]=Math.round(l[2]),i}},6621:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]*u,i[1]=l[1]*u,i[2]=l[2]*u,i}},8489:function(a){a.exports=o;function o(i,l,u,s){return i[0]=l[0]+u[0]*s,i[1]=l[1]+u[1]*s,i[2]=l[2]+u[2]*s,i}},1463:function(a){a.exports=o;function o(i,l,u,s){return i[0]=l,i[1]=u,i[2]=s,i}},6141:function(a,o,i){a.exports=i(2953)},5486:function(a,o,i){a.exports=i(3066)},2953:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2];return u*u+s*s+f*f}},3066:function(a){a.exports=o;function o(i){var l=i[0],u=i[1],s=i[2];return l*l+u*u+s*s}},2229:function(a,o,i){a.exports=i(6843)},6843:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]-u[0],i[1]=l[1]-u[1],i[2]=l[2]-u[2],i}},492:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2];return i[0]=s*u[0]+f*u[3]+v*u[6],i[1]=s*u[1]+f*u[4]+v*u[7],i[2]=s*u[2]+f*u[5]+v*u[8],i}},5673:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[3]*s+u[7]*f+u[11]*v+u[15];return g=g||1,i[0]=(u[0]*s+u[4]*f+u[8]*v+u[12])/g,i[1]=(u[1]*s+u[5]*f+u[9]*v+u[13])/g,i[2]=(u[2]*s+u[6]*f+u[10]*v+u[14])/g,i}},264:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[0],b=u[1],y=u[2],w=u[3],M=w*s+b*v-y*f,m=w*f+y*s-g*v,A=w*v+g*f-b*s,S=-g*s-b*f-y*v;return i[0]=M*w+S*-g+m*-y-A*-b,i[1]=m*w+S*-b+A*-g-M*-y,i[2]=A*w+S*-y+M*-b-m*-g,i}},4361:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]+u[0],i[1]=l[1]+u[1],i[2]=l[2]+u[2],i[3]=l[3]+u[3],i}},2335:function(a){a.exports=o;function o(i){var l=new Float32Array(4);return l[0]=i[0],l[1]=i[1],l[2]=i[2],l[3]=i[3],l}},2933:function(a){a.exports=o;function o(i,l){return i[0]=l[0],i[1]=l[1],i[2]=l[2],i[3]=l[3],i}},7536:function(a){a.exports=o;function o(){var i=new Float32Array(4);return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i}},4691:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2],v=l[3]-i[3];return Math.sqrt(u*u+s*s+f*f+v*v)}},1373:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]/u[0],i[1]=l[1]/u[1],i[2]=l[2]/u[2],i[3]=l[3]/u[3],i}},3750:function(a){a.exports=o;function o(i,l){return i[0]*l[0]+i[1]*l[1]+i[2]*l[2]+i[3]*l[3]}},3390:function(a){a.exports=o;function o(i,l,u,s){var f=new Float32Array(4);return f[0]=i,f[1]=l,f[2]=u,f[3]=s,f}},9970:function(a,o,i){a.exports={create:i(7536),clone:i(2335),fromValues:i(3390),copy:i(2933),set:i(4578),add:i(4361),subtract:i(6860),multiply:i(3576),divide:i(1373),min:i(2334),max:i(160),scale:i(9288),scaleAndAdd:i(4844),distance:i(4691),squaredDistance:i(7960),length:i(6808),squaredLength:i(483),negate:i(1498),inverse:i(4494),normalize:i(5177),dot:i(3750),lerp:i(2573),random:i(9131),transformMat4:i(5352),transformQuat:i(4041)}},4494:function(a){a.exports=o;function o(i,l){return i[0]=1/l[0],i[1]=1/l[1],i[2]=1/l[2],i[3]=1/l[3],i}},6808:function(a){a.exports=o;function o(i){var l=i[0],u=i[1],s=i[2],f=i[3];return Math.sqrt(l*l+u*u+s*s+f*f)}},2573:function(a){a.exports=o;function o(i,l,u,s){var f=l[0],v=l[1],g=l[2],b=l[3];return i[0]=f+s*(u[0]-f),i[1]=v+s*(u[1]-v),i[2]=g+s*(u[2]-g),i[3]=b+s*(u[3]-b),i}},160:function(a){a.exports=o;function o(i,l,u){return i[0]=Math.max(l[0],u[0]),i[1]=Math.max(l[1],u[1]),i[2]=Math.max(l[2],u[2]),i[3]=Math.max(l[3],u[3]),i}},2334:function(a){a.exports=o;function o(i,l,u){return i[0]=Math.min(l[0],u[0]),i[1]=Math.min(l[1],u[1]),i[2]=Math.min(l[2],u[2]),i[3]=Math.min(l[3],u[3]),i}},3576:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]*u[0],i[1]=l[1]*u[1],i[2]=l[2]*u[2],i[3]=l[3]*u[3],i}},1498:function(a){a.exports=o;function o(i,l){return i[0]=-l[0],i[1]=-l[1],i[2]=-l[2],i[3]=-l[3],i}},5177:function(a){a.exports=o;function o(i,l){var u=l[0],s=l[1],f=l[2],v=l[3],g=u*u+s*s+f*f+v*v;return g>0&&(g=1/Math.sqrt(g),i[0]=u*g,i[1]=s*g,i[2]=f*g,i[3]=v*g),i}},9131:function(a,o,i){var l=i(5177),u=i(9288);a.exports=s;function s(f,v){return v=v||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),l(f,f),u(f,f,v),f}},9288:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]*u,i[1]=l[1]*u,i[2]=l[2]*u,i[3]=l[3]*u,i}},4844:function(a){a.exports=o;function o(i,l,u,s){return i[0]=l[0]+u[0]*s,i[1]=l[1]+u[1]*s,i[2]=l[2]+u[2]*s,i[3]=l[3]+u[3]*s,i}},4578:function(a){a.exports=o;function o(i,l,u,s,f){return i[0]=l,i[1]=u,i[2]=s,i[3]=f,i}},7960:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2],v=l[3]-i[3];return u*u+s*s+f*f+v*v}},483:function(a){a.exports=o;function o(i){var l=i[0],u=i[1],s=i[2],f=i[3];return l*l+u*u+s*s+f*f}},6860:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]-u[0],i[1]=l[1]-u[1],i[2]=l[2]-u[2],i[3]=l[3]-u[3],i}},5352:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=l[3];return i[0]=u[0]*s+u[4]*f+u[8]*v+u[12]*g,i[1]=u[1]*s+u[5]*f+u[9]*v+u[13]*g,i[2]=u[2]*s+u[6]*f+u[10]*v+u[14]*g,i[3]=u[3]*s+u[7]*f+u[11]*v+u[15]*g,i}},4041:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[0],b=u[1],y=u[2],w=u[3],M=w*s+b*v-y*f,m=w*f+y*s-g*v,A=w*v+g*f-b*s,S=-g*s-b*f-y*v;return i[0]=M*w+S*-g+m*-y-A*-b,i[1]=m*w+S*-b+A*-g-M*-y,i[2]=A*w+S*-y+M*-b-m*-g,i[3]=l[3],i}},1848:function(a,o,i){var l=i(4905),u=i(6468);a.exports=s;function s(f){for(var v=Array.isArray(f)?f:l(f),g=0;g0)continue;ye=ge.slice(0,1).join("")}return re(ye),$+=ye.length,L=L.slice(ye.length),L.length}while(!0)}function De(){return/[^a-fA-F0-9]/.test(I)?(re(L.join("")),N=g,E):(L.push(I),F=I,E+1)}function Ce(){return I==="."||/[eE]/.test(I)?(L.push(I),N=S,F=I,E+1):I==="x"&&L.length===1&&L[0]==="0"?(N=c,L.push(I),F=I,E+1):/[^\d]/.test(I)?(re(L.join("")),N=g,E):(L.push(I),F=I,E+1)}function Oe(){return I==="f"&&(L.push(I),F=I,E+=1),/[eE]/.test(I)||(I==="-"||I==="+")&&/[eE]/.test(F)?(L.push(I),F=I,E+1):/[^\d]/.test(I)?(re(L.join("")),N=g,E):(L.push(I),F=I,E+1)}function Ue(){if(/[^\d\w_]/.test(I)){var ge=L.join("");return G[ge]?N=d:ee[ge]?N=T:N=x,re(L.join("")),N=g,E}return L.push(I),F=I,E+1}}},3508:function(a,o,i){var l=i(6852);l=l.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),a.exports=l.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(a){a.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(a,o,i){var l=i(620);a.exports=l.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(a,o,i){var l=i(5874);a.exports=u;function u(s,f){var v=l(f),g=[];return g=g.concat(v(s)),g=g.concat(v(null)),g}},3236:function(a){a.exports=function(o){typeof o=="string"&&(o=[o]);for(var i=[].slice.call(arguments,1),l=[],u=0;u>1,M=-7,m=u?f-1:0,A=u?-1:1,S=i[l+m];for(m+=A,v=S&(1<<-M)-1,S>>=-M,M+=b;M>0;v=v*256+i[l+m],m+=A,M-=8);for(g=v&(1<<-M)-1,v>>=-M,M+=s;M>0;g=g*256+i[l+m],m+=A,M-=8);if(v===0)v=1-w;else{if(v===y)return g?NaN:(S?-1:1)*(1/0);g=g+Math.pow(2,s),v=v-w}return(S?-1:1)*g*Math.pow(2,v-s)},o.write=function(i,l,u,s,f,v){var g,b,y,w=v*8-f-1,M=(1<>1,A=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=s?0:v-1,x=s?1:-1,T=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(b=isNaN(l)?1:0,g=M):(g=Math.floor(Math.log(l)/Math.LN2),l*(y=Math.pow(2,-g))<1&&(g--,y*=2),g+m>=1?l+=A/y:l+=A*Math.pow(2,1-m),l*y>=2&&(g++,y/=2),g+m>=M?(b=0,g=M):g+m>=1?(b=(l*y-1)*Math.pow(2,f),g=g+m):(b=l*Math.pow(2,m-1)*Math.pow(2,f),g=0));f>=8;i[u+S]=b&255,S+=x,b/=256,f-=8);for(g=g<0;i[u+S]=g&255,S+=x,g/=256,w-=8);i[u+S-x]|=T*128}},8954:function(a,o,i){"use strict";a.exports=m;var l=i(3250),u=i(6803).Fw;function s(A,S,x){this.vertices=A,this.adjacent=S,this.boundary=x,this.lastVisited=-1}s.prototype.flip=function(){var A=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=A;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function f(A,S,x){this.vertices=A,this.cell=S,this.index=x}function v(A,S){return u(A.vertices,S.vertices)}function g(A){return function(){var S=this.tuple;return A.apply(this,S)}}function b(A){var S=l[A+1];return S||(S=l),g(S)}var y=[];function w(A,S,x){this.dimension=A,this.vertices=S,this.simplices=x,this.interior=x.filter(function(_){return!_.boundary}),this.tuple=new Array(A+1);for(var T=0;T<=A;++T)this.tuple[T]=this.vertices[T];var d=y[A];d||(d=y[A]=b(A)),this.orient=d}var M=w.prototype;M.handleBoundaryDegeneracy=function(A,S){var x=this.dimension,T=this.vertices.length-1,d=this.tuple,_=this.vertices,p=[A];for(A.lastVisited=-T;p.length>0;){A=p.pop();for(var c=A.adjacent,k=0;k<=x;++k){var h=c[k];if(!(!h.boundary||h.lastVisited<=-T)){for(var R=h.vertices,E=0;E<=x;++E){var D=R[E];D<0?d[E]=S:d[E]=_[D]}var N=this.orient();if(N>0)return h;h.lastVisited=-T,N===0&&p.push(h)}}}return null},M.walk=function(A,S){var x=this.vertices.length-1,T=this.dimension,d=this.vertices,_=this.tuple,p=S?this.interior.length*Math.random()|0:this.interior.length-1,c=this.interior[p];e:for(;!c.boundary;){for(var k=c.vertices,h=c.adjacent,R=0;R<=T;++R)_[R]=d[k[R]];c.lastVisited=x;for(var R=0;R<=T;++R){var E=h[R];if(!(E.lastVisited>=x)){var D=_[R];_[R]=A;var N=this.orient();if(_[R]=D,N<0){c=E;continue e}else E.boundary?E.lastVisited=-x:E.lastVisited=x}}return}return c},M.addPeaks=function(A,S){var x=this.vertices.length-1,T=this.dimension,d=this.vertices,_=this.tuple,p=this.interior,c=this.simplices,k=[S];S.lastVisited=x,S.vertices[S.vertices.indexOf(-1)]=x,S.boundary=!1,p.push(S);for(var h=[];k.length>0;){var S=k.pop(),R=S.vertices,E=S.adjacent,D=R.indexOf(x);if(!(D<0)){for(var N=0;N<=T;++N)if(N!==D){var I=E[N];if(!(!I.boundary||I.lastVisited>=x)){var F=I.vertices;if(I.lastVisited!==-x){for(var L=0,P=0;P<=T;++P)F[P]<0?(L=P,_[P]=A):_[P]=d[F[P]];var O=this.orient();if(O>0){F[L]=x,I.boundary=!1,p.push(I),k.push(I),I.lastVisited=x;continue}else I.lastVisited=-x}var U=I.adjacent,X=R.slice(),j=E.slice(),$=new s(X,j,!0);c.push($);var Y=U.indexOf(S);if(!(Y<0)){U[Y]=$,j[D]=I,X[N]=-1,j[N]=S,E[N]=$,$.flip();for(var P=0;P<=T;++P){var q=X[P];if(!(q<0||q===x)){for(var Z=new Array(T-1),ne=0,Q=0;Q<=T;++Q){var oe=X[Q];oe<0||Q===P||(Z[ne++]=oe)}h.push(new f(Z,$,P))}}}}}}}h.sort(v);for(var N=0;N+1=0?p[k++]=c[R]:h=R&1;if(h===(A&1)){var E=p[0];p[0]=p[1],p[1]=E}S.push(p)}}return S};function m(A,S){var x=A.length;if(x===0)throw new Error("Must have at least d+1 points");var T=A[0].length;if(x<=T)throw new Error("Must input at least d+1 points");var d=A.slice(0,T+1),_=l.apply(void 0,d);if(_===0)throw new Error("Input not in general position");for(var p=new Array(T+1),c=0;c<=T;++c)p[c]=c;_<0&&(p[0]=1,p[1]=0);for(var k=new s(p,new Array(T+1),!1),h=k.adjacent,R=new Array(T+2),c=0;c<=T;++c){for(var E=p.slice(),D=0;D<=T;++D)D===c&&(E[D]=-1);var N=E[0];E[0]=E[1],E[1]=N;var I=new s(E,new Array(T+1),!0);h[c]=I,R[c]=I}R[T+1]=k;for(var c=0;c<=T;++c)for(var E=h[c].vertices,F=h[c].adjacent,D=0;D<=T;++D){var L=E[D];if(L<0){F[D]=k;continue}for(var P=0;P<=T;++P)h[P].vertices.indexOf(L)<0&&(F[D]=h[P])}for(var O=new w(T,d,R),U=!!S,c=T+1;c3*(R+1)?w(this,h):this.left.insert(h):this.left=_([h]);else if(h[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?w(this,h):this.right.insert(h):this.right=_([h]);else{var E=l.ge(this.leftPoints,h,T),D=l.ge(this.rightPoints,h,d);this.leftPoints.splice(E,0,h),this.rightPoints.splice(D,0,h)}},g.remove=function(h){var R=this.count-this.leftPoints;if(h[1]3*(R-1))return M(this,h);var D=this.left.remove(h);return D===f?(this.left=null,this.count-=1,s):(D===s&&(this.count-=1),D)}else if(h[0]>this.mid){if(!this.right)return u;var N=this.left?this.left.count:0;if(4*N>3*(R-1))return M(this,h);var D=this.right.remove(h);return D===f?(this.right=null,this.count-=1,s):(D===s&&(this.count-=1),D)}else{if(this.count===1)return this.leftPoints[0]===h?f:u;if(this.leftPoints.length===1&&this.leftPoints[0]===h){if(this.left&&this.right){for(var I=this,F=this.left;F.right;)I=F,F=F.right;if(I===this)F.right=this.right;else{var L=this.left,D=this.right;I.count-=F.count,I.right=F.left,F.left=L,F.right=D}b(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?b(this,this.left):b(this,this.right);return s}for(var L=l.ge(this.leftPoints,h,T);L=0&&h[D][1]>=R;--D){var N=E(h[D]);if(N)return N}}function S(h,R){for(var E=0;Ethis.mid){if(this.right){var E=this.right.queryPoint(h,R);if(E)return E}return A(this.rightPoints,h,R)}else return S(this.leftPoints,R)},g.queryInterval=function(h,R,E){if(hthis.mid&&this.right){var D=this.right.queryInterval(h,R,E);if(D)return D}return Rthis.mid?A(this.rightPoints,h,E):S(this.leftPoints,E)};function x(h,R){return h-R}function T(h,R){var E=h[0]-R[0];return E||h[1]-R[1]}function d(h,R){var E=h[1]-R[1];return E||h[0]-R[0]}function _(h){if(h.length===0)return null;for(var R=[],E=0;E>1],N=[],I=[],F=[],E=0;E13)&&l!==32&&l!==133&&l!==160&&l!==5760&&l!==6158&&(l<8192||l>8205)&&l!==8232&&l!==8233&&l!==8239&&l!==8287&&l!==8288&&l!==12288&&l!==65279)return!1;return!0}},395:function(a){function o(i,l,u){return i*(1-u)+l*u}a.exports=o},2652:function(a,o,i){var l=i(4335),u=i(6864),s=i(1903),f=i(9921),v=i(7608),g=i(5665),b={length:i(1387),normalize:i(3536),dot:i(244),cross:i(5911)},y=u(),w=u(),M=[0,0,0,0],m=[[0,0,0],[0,0,0],[0,0,0]],A=[0,0,0];a.exports=function(_,p,c,k,h,R){if(p||(p=[0,0,0]),c||(c=[0,0,0]),k||(k=[0,0,0]),h||(h=[0,0,0,1]),R||(R=[0,0,0,1]),!l(y,_)||(s(w,y),w[3]=0,w[7]=0,w[11]=0,w[15]=1,Math.abs(f(w)<1e-8)))return!1;var E=y[3],D=y[7],N=y[11],I=y[12],F=y[13],L=y[14],P=y[15];if(E!==0||D!==0||N!==0){M[0]=E,M[1]=D,M[2]=N,M[3]=P;var O=v(w,w);if(!O)return!1;g(w,w),S(h,M,w)}else h[0]=h[1]=h[2]=0,h[3]=1;if(p[0]=I,p[1]=F,p[2]=L,x(m,y),c[0]=b.length(m[0]),b.normalize(m[0],m[0]),k[0]=b.dot(m[0],m[1]),T(m[1],m[1],m[0],1,-k[0]),c[1]=b.length(m[1]),b.normalize(m[1],m[1]),k[0]/=c[1],k[1]=b.dot(m[0],m[2]),T(m[2],m[2],m[0],1,-k[1]),k[2]=b.dot(m[1],m[2]),T(m[2],m[2],m[1],1,-k[2]),c[2]=b.length(m[2]),b.normalize(m[2],m[2]),k[1]/=c[2],k[2]/=c[2],b.cross(A,m[1],m[2]),b.dot(m[0],A)<0)for(var U=0;U<3;U++)c[U]*=-1,m[U][0]*=-1,m[U][1]*=-1,m[U][2]*=-1;return R[0]=.5*Math.sqrt(Math.max(1+m[0][0]-m[1][1]-m[2][2],0)),R[1]=.5*Math.sqrt(Math.max(1-m[0][0]+m[1][1]-m[2][2],0)),R[2]=.5*Math.sqrt(Math.max(1-m[0][0]-m[1][1]+m[2][2],0)),R[3]=.5*Math.sqrt(Math.max(1+m[0][0]+m[1][1]+m[2][2],0)),m[2][1]>m[1][2]&&(R[0]=-R[0]),m[0][2]>m[2][0]&&(R[1]=-R[1]),m[1][0]>m[0][1]&&(R[2]=-R[2]),!0};function S(d,_,p){var c=_[0],k=_[1],h=_[2],R=_[3];return d[0]=p[0]*c+p[4]*k+p[8]*h+p[12]*R,d[1]=p[1]*c+p[5]*k+p[9]*h+p[13]*R,d[2]=p[2]*c+p[6]*k+p[10]*h+p[14]*R,d[3]=p[3]*c+p[7]*k+p[11]*h+p[15]*R,d}function x(d,_){d[0][0]=_[0],d[0][1]=_[1],d[0][2]=_[2],d[1][0]=_[4],d[1][1]=_[5],d[1][2]=_[6],d[2][0]=_[8],d[2][1]=_[9],d[2][2]=_[10]}function T(d,_,p,c,k){d[0]=_[0]*c+p[0]*k,d[1]=_[1]*c+p[1]*k,d[2]=_[2]*c+p[2]*k}},4335:function(a){a.exports=function(i,l){var u=l[15];if(u===0)return!1;for(var s=1/u,f=0;f<16;f++)i[f]=l[f]*s;return!0}},7442:function(a,o,i){var l=i(6658),u=i(7182),s=i(2652),f=i(9921),v=i(8648),g=M(),b=M(),y=M();a.exports=w;function w(S,x,T,d){if(f(x)===0||f(T)===0)return!1;var _=s(x,g.translate,g.scale,g.skew,g.perspective,g.quaternion),p=s(T,b.translate,b.scale,b.skew,b.perspective,b.quaternion);return!_||!p?!1:(l(y.translate,g.translate,b.translate,d),l(y.skew,g.skew,b.skew,d),l(y.scale,g.scale,b.scale,d),l(y.perspective,g.perspective,b.perspective,d),v(y.quaternion,g.quaternion,b.quaternion,d),u(S,y.translate,y.scale,y.skew,y.perspective,y.quaternion),!0)}function M(){return{translate:m(),scale:m(1),skew:m(),perspective:A(),quaternion:A()}}function m(S){return[S||0,S||0,S||0]}function A(){return[0,0,0,1]}},7182:function(a,o,i){var l={identity:i(7894),translate:i(7656),multiply:i(6760),create:i(6864),scale:i(2504),fromRotationTranslation:i(6743)},u=l.create(),s=l.create();a.exports=function(v,g,b,y,w,M){return l.identity(v),l.fromRotationTranslation(v,M,g),v[3]=w[0],v[7]=w[1],v[11]=w[2],v[15]=w[3],l.identity(s),y[2]!==0&&(s[9]=y[2],l.multiply(v,v,s)),y[1]!==0&&(s[9]=0,s[8]=y[1],l.multiply(v,v,s)),y[0]!==0&&(s[8]=0,s[4]=y[0],l.multiply(v,v,s)),l.scale(v,v,b),v}},1811:function(a,o,i){"use strict";var l=i(2478),u=i(7442),s=i(7608),f=i(5567),v=i(2408),g=i(7089),b=i(6582),y=i(7656),w=i(2504),M=i(3536),m=[0,0,0];a.exports=T;function A(d){this._components=d.slice(),this._time=[0],this.prevMatrix=d.slice(),this.nextMatrix=d.slice(),this.computedMatrix=d.slice(),this.computedInverse=d.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=A.prototype;S.recalcMatrix=function(d){var _=this._time,p=l.le(_,d),c=this.computedMatrix;if(!(p<0)){var k=this._components;if(p===_.length-1)for(var h=16*p,R=0;R<16;++R)c[R]=k[h++];else{for(var E=_[p+1]-_[p],h=16*p,D=this.prevMatrix,N=!0,R=0;R<16;++R)D[R]=k[h++];for(var I=this.nextMatrix,R=0;R<16;++R)I[R]=k[h++],N=N&&D[R]===I[R];if(E<1e-6||N)for(var R=0;R<16;++R)c[R]=D[R];else u(c,D,I,(d-_[p])/E)}var F=this.computedUp;F[0]=c[1],F[1]=c[5],F[2]=c[9],M(F,F);var L=this.computedInverse;s(L,c);var P=this.computedEye,O=L[15];P[0]=L[12]/O,P[1]=L[13]/O,P[2]=L[14]/O;for(var U=this.computedCenter,X=Math.exp(this.computedRadius[0]),R=0;R<3;++R)U[R]=P[R]-c[2+4*R]*X}},S.idle=function(d){if(!(d1&&l(s[b[m-2]],s[b[m-1]],M)<=0;)m-=1,b.pop();for(b.push(w),m=y.length;m>1&&l(s[y[m-2]],s[y[m-1]],M)>=0;)m-=1,y.pop();y.push(w)}for(var A=new Array(y.length+b.length-2),S=0,v=0,x=b.length;v0;--T)A[S++]=y[T];return A}},351:function(a,o,i){"use strict";a.exports=u;var l=i(4687);function u(s,f){f||(f=s,s=window);var v=0,g=0,b=0,y={shift:!1,alt:!1,control:!1,meta:!1},w=!1;function M(h){var R=!1;return"altKey"in h&&(R=R||h.altKey!==y.alt,y.alt=!!h.altKey),"shiftKey"in h&&(R=R||h.shiftKey!==y.shift,y.shift=!!h.shiftKey),"ctrlKey"in h&&(R=R||h.ctrlKey!==y.control,y.control=!!h.ctrlKey),"metaKey"in h&&(R=R||h.metaKey!==y.meta,y.meta=!!h.metaKey),R}function m(h,R){var E=l.x(R),D=l.y(R);"buttons"in R&&(h=R.buttons|0),(h!==v||E!==g||D!==b||M(R))&&(v=h|0,g=E||0,b=D||0,f&&f(v,g,b,y))}function A(h){m(0,h)}function S(){(v||g||b||y.shift||y.alt||y.meta||y.control)&&(g=b=0,v=0,y.shift=y.alt=y.control=y.meta=!1,f&&f(0,0,0,y))}function x(h){M(h)&&f&&f(v,g,b,y)}function T(h){l.buttons(h)===0?m(0,h):m(v,h)}function d(h){m(v|l.buttons(h),h)}function _(h){m(v&~l.buttons(h),h)}function p(){w||(w=!0,s.addEventListener("mousemove",T),s.addEventListener("mousedown",d),s.addEventListener("mouseup",_),s.addEventListener("mouseleave",A),s.addEventListener("mouseenter",A),s.addEventListener("mouseout",A),s.addEventListener("mouseover",A),s.addEventListener("blur",S),s.addEventListener("keyup",x),s.addEventListener("keydown",x),s.addEventListener("keypress",x),s!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",x),window.addEventListener("keydown",x),window.addEventListener("keypress",x)))}function c(){w&&(w=!1,s.removeEventListener("mousemove",T),s.removeEventListener("mousedown",d),s.removeEventListener("mouseup",_),s.removeEventListener("mouseleave",A),s.removeEventListener("mouseenter",A),s.removeEventListener("mouseout",A),s.removeEventListener("mouseover",A),s.removeEventListener("blur",S),s.removeEventListener("keyup",x),s.removeEventListener("keydown",x),s.removeEventListener("keypress",x),s!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",x),window.removeEventListener("keydown",x),window.removeEventListener("keypress",x)))}p();var k={element:s};return Object.defineProperties(k,{enabled:{get:function(){return w},set:function(h){h?p():c()},enumerable:!0},buttons:{get:function(){return v},enumerable:!0},x:{get:function(){return g},enumerable:!0},y:{get:function(){return b},enumerable:!0},mods:{get:function(){return y},enumerable:!0}}),k}},24:function(a){var o={left:0,top:0};a.exports=i;function i(u,s,f){s=s||u.currentTarget||u.srcElement,Array.isArray(f)||(f=[0,0]);var v=u.clientX||0,g=u.clientY||0,b=l(s);return f[0]=v-b.left,f[1]=g-b.top,f}function l(u){return u===window||u===document||u===document.body?o:u.getBoundingClientRect()}},4687:function(a,o){"use strict";function i(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var v=f.which;if(v===2)return 4;if(v===3)return 2;if(v>0)return 1<=0)return 1<0){if(j=1,q[ne++]=y(p[R],S,x,T),R+=O,d>0)for(X=1,E=p[R],Q=q[ne]=y(E,S,x,T),G=q[ne+oe],te=q[ne+re],Ee=q[ne+ue],(Q!==G||Q!==te||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,G,te,Ee,S,x,T),Me=Z[ne]=$++),ne+=1,R+=O,X=2;X0)for(X=1,E=p[R],Q=q[ne]=y(E,S,x,T),G=q[ne+oe],te=q[ne+re],Ee=q[ne+ue],(Q!==G||Q!==te||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,G,te,Ee,S,x,T),Me=Z[ne]=$++,Ee!==te&&b(Z[ne+re],Me,F,P,te,Ee,S,x,T)),ne+=1,R+=O,X=2;X0){if(X=1,q[ne++]=y(p[R],S,x,T),R+=O,_>0)for(j=1,E=p[R],Q=q[ne]=y(E,S,x,T),te=q[ne+re],G=q[ne+oe],Ee=q[ne+ue],(Q!==te||Q!==G||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,te,G,Ee,S,x,T),Me=Z[ne]=$++),ne+=1,R+=O,j=2;j<_;++j)E=p[R],Q=q[ne]=y(E,S,x,T),te=q[ne+re],G=q[ne+oe],Ee=q[ne+ue],(Q!==te||Q!==G||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,te,G,Ee,S,x,T),Me=Z[ne]=$++,Ee!==G&&b(Z[ne+oe],Me,F,P,G,Ee,S,x,T)),ne+=1,R+=O;for(R+=U,ne=0,ve=re,re=H,H=ve,ve=oe,oe=ee,ee=ve,ve=ue,ue=de,de=ve,X=2;X0)for(j=1,E=p[R],Q=q[ne]=y(E,S,x,T),te=q[ne+re],G=q[ne+oe],Ee=q[ne+ue],(Q!==te||Q!==G||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,te,G,Ee,S,x,T),Me=Z[ne]=$++,Ee!==te&&b(Z[ne+re],Me,P,N,Ee,te,S,x,T)),ne+=1,R+=O,j=2;j<_;++j)E=p[R],Q=q[ne]=y(E,S,x,T),te=q[ne+re],G=q[ne+oe],Ee=q[ne+ue],(Q!==te||Q!==G||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,te,G,Ee,S,x,T),Me=Z[ne]=$++,Ee!==G&&b(Z[ne+oe],Me,F,P,G,Ee,S,x,T),Ee!==te&&b(Z[ne+re],Me,P,N,Ee,te,S,x,T)),ne+=1,R+=O;X&1&&(ne=0),ve=re,re=H,H=ve,ve=oe,oe=ee,ee=ve,ve=ue,ue=de,de=ve,R+=U}}M(Z),M(q)}}};function s(v,g,b,y,w,M){var m=[M,w].join(","),A=u[m];return A(v,g,b,l.mallocUint32,l.freeUint32)}function f(v){function g(S){throw new Error("ndarray-extract-contour: "+S)}typeof v!="object"&&g("Must specify arguments");var b=v.order;Array.isArray(b)||g("Must specify order");var y=v.arrayArguments||1;y<1&&g("Must have at least one array argument");var w=v.scalarArguments||0;w<0&&g("Scalar arg count must be > 0"),typeof v.vertex!="function"&&g("Must specify vertex creation function"),typeof v.cell!="function"&&g("Must specify cell creation function"),typeof v.phase!="function"&&g("Must specify phase function");for(var M=v.getters||[],m=new Array(y),A=0;A=0?m[A]=!0:m[A]=!1;return s(v.vertex,v.cell,v.phase,w,b,m)}},6199:function(a,o,i){"use strict";var l=i(1338),u={zero:function(T,d,_,p){var c=T[0],k=_[0];p|=0;var h=0,R=k;for(h=0;h2&&h[1]>2&&p(k.pick(-1,-1).lo(1,1).hi(h[0]-2,h[1]-2),c.pick(-1,-1,0).lo(1,1).hi(h[0]-2,h[1]-2),c.pick(-1,-1,1).lo(1,1).hi(h[0]-2,h[1]-2)),h[1]>2&&(_(k.pick(0,-1).lo(1).hi(h[1]-2),c.pick(0,-1,1).lo(1).hi(h[1]-2)),d(c.pick(0,-1,0).lo(1).hi(h[1]-2))),h[1]>2&&(_(k.pick(h[0]-1,-1).lo(1).hi(h[1]-2),c.pick(h[0]-1,-1,1).lo(1).hi(h[1]-2)),d(c.pick(h[0]-1,-1,0).lo(1).hi(h[1]-2))),h[0]>2&&(_(k.pick(-1,0).lo(1).hi(h[0]-2),c.pick(-1,0,0).lo(1).hi(h[0]-2)),d(c.pick(-1,0,1).lo(1).hi(h[0]-2))),h[0]>2&&(_(k.pick(-1,h[1]-1).lo(1).hi(h[0]-2),c.pick(-1,h[1]-1,0).lo(1).hi(h[0]-2)),d(c.pick(-1,h[1]-1,1).lo(1).hi(h[0]-2))),c.set(0,0,0,0),c.set(0,0,1,0),c.set(h[0]-1,0,0,0),c.set(h[0]-1,0,1,0),c.set(0,h[1]-1,0,0),c.set(0,h[1]-1,1,0),c.set(h[0]-1,h[1]-1,0,0),c.set(h[0]-1,h[1]-1,1,0),c}}function x(T){var d=T.join(),h=y[d];if(h)return h;for(var _=T.length,p=[M,m],c=1;c<=_;++c)p.push(A(c));var k=S,h=k.apply(void 0,p);return y[d]=h,h}a.exports=function(d,_,p){if(Array.isArray(p)||(typeof p=="string"?p=l(_.dimension,p):p=l(_.dimension,"clamp")),_.size===0)return d;if(_.dimension===0)return d.set(0),d;var c=x(p);return c(d,_)}},4317:function(a){"use strict";function o(f,v){var g=Math.floor(v),b=v-g,y=0<=g&&g0;){F<64?(d=F,F=0):(d=64,F-=64);for(var L=y[1]|0;L>0;){L<64?(_=L,L=0):(_=64,L-=64),m=N+F*c+L*k,x=I+F*R+L*E;var P=0,O=0,U=0,X=h,j=c-p*h,$=k-d*c,Y=D,q=R-p*D,Z=E-d*R;for(U=0;U<_;++U){for(O=0;O0;){E<64?(d=E,E=0):(d=64,E-=64);for(var D=y[0]|0;D>0;){D<64?(T=D,D=0):(T=64,D-=64),m=h+E*p+D*_,x=R+E*k+D*c;var N=0,I=0,F=p,L=_-d*p,P=k,O=c-d*k;for(I=0;I0;){I<64?(_=I,I=0):(_=64,I-=64);for(var F=y[0]|0;F>0;){F<64?(T=F,F=0):(T=64,F-=64);for(var L=y[1]|0;L>0;){L<64?(d=L,L=0):(d=64,L-=64),m=D+I*k+F*p+L*c,x=N+I*E+F*h+L*R;var P=0,O=0,U=0,X=k,j=p-_*k,$=c-T*p,Y=E,q=h-_*E,Z=R-T*h;for(U=0;UA;){P=0,O=N-d;r:for(F=0;FX)break r;O+=h,P+=R}for(P=N,O=N-d,F=0;F>1,L=F-D,P=F+D,O=N,U=L,X=F,j=P,$=I,Y=S+1,q=x-1,Z=!0,ne,Q,oe,ee,G,re,H,te,ue,de=0,Ee=0,Me=0,ve,Ae,ke,De,Ce,Oe,Ue,ge,Te,ce,ye,Le,me,he,be,Se,ze=k,Fe=M(ze),Je=M(ze);Ae=_*O,ke=_*U,Se=d;e:for(ve=0;ve0){Q=O,O=U,U=Q;break e}if(Me<0)break e;Se+=R}Ae=_*j,ke=_*$,Se=d;e:for(ve=0;ve0){Q=j,j=$,$=Q;break e}if(Me<0)break e;Se+=R}Ae=_*O,ke=_*X,Se=d;e:for(ve=0;ve0){Q=O,O=X,X=Q;break e}if(Me<0)break e;Se+=R}Ae=_*U,ke=_*X,Se=d;e:for(ve=0;ve0){Q=U,U=X,X=Q;break e}if(Me<0)break e;Se+=R}Ae=_*O,ke=_*j,Se=d;e:for(ve=0;ve0){Q=O,O=j,j=Q;break e}if(Me<0)break e;Se+=R}Ae=_*X,ke=_*j,Se=d;e:for(ve=0;ve0){Q=X,X=j,j=Q;break e}if(Me<0)break e;Se+=R}Ae=_*U,ke=_*$,Se=d;e:for(ve=0;ve0){Q=U,U=$,$=Q;break e}if(Me<0)break e;Se+=R}Ae=_*U,ke=_*X,Se=d;e:for(ve=0;ve0){Q=U,U=X,X=Q;break e}if(Me<0)break e;Se+=R}Ae=_*j,ke=_*$,Se=d;e:for(ve=0;ve0){Q=j,j=$,$=Q;break e}if(Me<0)break e;Se+=R}for(Ae=_*O,ke=_*U,De=_*X,Ce=_*j,Oe=_*$,Ue=_*N,ge=_*F,Te=_*I,be=0,Se=d,ve=0;ve0)q--;else if(Me<0){for(Ae=_*re,ke=_*Y,De=_*q,Se=d,ve=0;ve0)for(;;){H=d+q*_,be=0;e:for(ve=0;ve0){if(--qI){e:for(;;){for(H=d+Y*_,be=0,Se=d,ve=0;ve1&&A?x(m,A[0],A[1]):x(m)}var b={"uint32,1,0":function(w,M){return function(m){var A=m.data,S=m.offset|0,x=m.shape,T=m.stride,d=T[0]|0,_=x[0]|0,p=T[1]|0,c=x[1]|0,k=p,h=p,R=1;_<=32?w(0,_-1,A,S,d,p,_,c,k,h,R):M(0,_-1,A,S,d,p,_,c,k,h,R)}}};function y(w,M){var m=[M,w].join(","),A=b[m],S=f(w,M),x=g(w,M,S);return A(S,x)}a.exports=y},446:function(a,o,i){"use strict";var l=i(7640),u={};function s(f){var v=f.order,g=f.dtype,b=[v,g],y=b.join(":"),w=u[y];return w||(u[y]=w=l(v,g)),w(f),f}a.exports=s},9618:function(a,o,i){var l=i(7163),u=typeof Float64Array!="undefined";function s(M,m){return M[0]-m[0]}function f(){var M=this.stride,m=new Array(M.length),A;for(A=0;A=0&&(p=d|0,_+=k*p,c-=p),new S(this.data,c,k,_)},x.step=function(d){var _=this.shape[0],p=this.stride[0],c=this.offset,k=0,h=Math.ceil;return typeof d=="number"&&(k=d|0,k<0?(c+=p*(_-1),_=h(-_/k)):_=h(_/k),p*=k),new S(this.data,_,p,c)},x.transpose=function(d){d=d===void 0?0:d|0;var _=this.shape,p=this.stride;return new S(this.data,_[d],p[d],this.offset)},x.pick=function(d){var _=[],p=[],c=this.offset;typeof d=="number"&&d>=0?c=c+this.stride[0]*d|0:(_.push(this.shape[0]),p.push(this.stride[0]));var k=m[_.length+1];return k(this.data,_,p,c)},function(d,_,p,c){return new S(d,_[0],p[0],c)}},2:function(M,m,A){function S(T,d,_,p,c,k){this.data=T,this.shape=[d,_],this.stride=[p,c],this.offset=k|0}var x=S.prototype;return x.dtype=M,x.dimension=2,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(x,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),x.set=function(d,_,p){return M==="generic"?this.data.set(this.offset+this.stride[0]*d+this.stride[1]*_,p):this.data[this.offset+this.stride[0]*d+this.stride[1]*_]=p},x.get=function(d,_){return M==="generic"?this.data.get(this.offset+this.stride[0]*d+this.stride[1]*_):this.data[this.offset+this.stride[0]*d+this.stride[1]*_]},x.index=function(d,_){return this.offset+this.stride[0]*d+this.stride[1]*_},x.hi=function(d,_){return new S(this.data,typeof d!="number"||d<0?this.shape[0]:d|0,typeof _!="number"||_<0?this.shape[1]:_|0,this.stride[0],this.stride[1],this.offset)},x.lo=function(d,_){var p=this.offset,c=0,k=this.shape[0],h=this.shape[1],R=this.stride[0],E=this.stride[1];return typeof d=="number"&&d>=0&&(c=d|0,p+=R*c,k-=c),typeof _=="number"&&_>=0&&(c=_|0,p+=E*c,h-=c),new S(this.data,k,h,R,E,p)},x.step=function(d,_){var p=this.shape[0],c=this.shape[1],k=this.stride[0],h=this.stride[1],R=this.offset,E=0,D=Math.ceil;return typeof d=="number"&&(E=d|0,E<0?(R+=k*(p-1),p=D(-p/E)):p=D(p/E),k*=E),typeof _=="number"&&(E=_|0,E<0?(R+=h*(c-1),c=D(-c/E)):c=D(c/E),h*=E),new S(this.data,p,c,k,h,R)},x.transpose=function(d,_){d=d===void 0?0:d|0,_=_===void 0?1:_|0;var p=this.shape,c=this.stride;return new S(this.data,p[d],p[_],c[d],c[_],this.offset)},x.pick=function(d,_){var p=[],c=[],k=this.offset;typeof d=="number"&&d>=0?k=k+this.stride[0]*d|0:(p.push(this.shape[0]),c.push(this.stride[0])),typeof _=="number"&&_>=0?k=k+this.stride[1]*_|0:(p.push(this.shape[1]),c.push(this.stride[1]));var h=m[p.length+1];return h(this.data,p,c,k)},function(d,_,p,c){return new S(d,_[0],_[1],p[0],p[1],c)}},3:function(M,m,A){function S(T,d,_,p,c,k,h,R){this.data=T,this.shape=[d,_,p],this.stride=[c,k,h],this.offset=R|0}var x=S.prototype;return x.dtype=M,x.dimension=3,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(x,"order",{get:function(){var d=Math.abs(this.stride[0]),_=Math.abs(this.stride[1]),p=Math.abs(this.stride[2]);return d>_?_>p?[2,1,0]:d>p?[1,2,0]:[1,0,2]:d>p?[2,0,1]:p>_?[0,1,2]:[0,2,1]}}),x.set=function(d,_,p,c){return M==="generic"?this.data.set(this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p,c):this.data[this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p]=c},x.get=function(d,_,p){return M==="generic"?this.data.get(this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p):this.data[this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p]},x.index=function(d,_,p){return this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p},x.hi=function(d,_,p){return new S(this.data,typeof d!="number"||d<0?this.shape[0]:d|0,typeof _!="number"||_<0?this.shape[1]:_|0,typeof p!="number"||p<0?this.shape[2]:p|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},x.lo=function(d,_,p){var c=this.offset,k=0,h=this.shape[0],R=this.shape[1],E=this.shape[2],D=this.stride[0],N=this.stride[1],I=this.stride[2];return typeof d=="number"&&d>=0&&(k=d|0,c+=D*k,h-=k),typeof _=="number"&&_>=0&&(k=_|0,c+=N*k,R-=k),typeof p=="number"&&p>=0&&(k=p|0,c+=I*k,E-=k),new S(this.data,h,R,E,D,N,I,c)},x.step=function(d,_,p){var c=this.shape[0],k=this.shape[1],h=this.shape[2],R=this.stride[0],E=this.stride[1],D=this.stride[2],N=this.offset,I=0,F=Math.ceil;return typeof d=="number"&&(I=d|0,I<0?(N+=R*(c-1),c=F(-c/I)):c=F(c/I),R*=I),typeof _=="number"&&(I=_|0,I<0?(N+=E*(k-1),k=F(-k/I)):k=F(k/I),E*=I),typeof p=="number"&&(I=p|0,I<0?(N+=D*(h-1),h=F(-h/I)):h=F(h/I),D*=I),new S(this.data,c,k,h,R,E,D,N)},x.transpose=function(d,_,p){d=d===void 0?0:d|0,_=_===void 0?1:_|0,p=p===void 0?2:p|0;var c=this.shape,k=this.stride;return new S(this.data,c[d],c[_],c[p],k[d],k[_],k[p],this.offset)},x.pick=function(d,_,p){var c=[],k=[],h=this.offset;typeof d=="number"&&d>=0?h=h+this.stride[0]*d|0:(c.push(this.shape[0]),k.push(this.stride[0])),typeof _=="number"&&_>=0?h=h+this.stride[1]*_|0:(c.push(this.shape[1]),k.push(this.stride[1])),typeof p=="number"&&p>=0?h=h+this.stride[2]*p|0:(c.push(this.shape[2]),k.push(this.stride[2]));var R=m[c.length+1];return R(this.data,c,k,h)},function(d,_,p,c){return new S(d,_[0],_[1],_[2],p[0],p[1],p[2],c)}},4:function(M,m,A){function S(T,d,_,p,c,k,h,R,E,D){this.data=T,this.shape=[d,_,p,c],this.stride=[k,h,R,E],this.offset=D|0}var x=S.prototype;return x.dtype=M,x.dimension=4,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(x,"order",{get:A}),x.set=function(d,_,p,c,k){return M==="generic"?this.data.set(this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p+this.stride[3]*c,k):this.data[this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p+this.stride[3]*c]=k},x.get=function(d,_,p,c){return M==="generic"?this.data.get(this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p+this.stride[3]*c):this.data[this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p+this.stride[3]*c]},x.index=function(d,_,p,c){return this.offset+this.stride[0]*d+this.stride[1]*_+this.stride[2]*p+this.stride[3]*c},x.hi=function(d,_,p,c){return new S(this.data,typeof d!="number"||d<0?this.shape[0]:d|0,typeof _!="number"||_<0?this.shape[1]:_|0,typeof p!="number"||p<0?this.shape[2]:p|0,typeof c!="number"||c<0?this.shape[3]:c|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},x.lo=function(d,_,p,c){var k=this.offset,h=0,R=this.shape[0],E=this.shape[1],D=this.shape[2],N=this.shape[3],I=this.stride[0],F=this.stride[1],L=this.stride[2],P=this.stride[3];return typeof d=="number"&&d>=0&&(h=d|0,k+=I*h,R-=h),typeof _=="number"&&_>=0&&(h=_|0,k+=F*h,E-=h),typeof p=="number"&&p>=0&&(h=p|0,k+=L*h,D-=h),typeof c=="number"&&c>=0&&(h=c|0,k+=P*h,N-=h),new S(this.data,R,E,D,N,I,F,L,P,k)},x.step=function(d,_,p,c){var k=this.shape[0],h=this.shape[1],R=this.shape[2],E=this.shape[3],D=this.stride[0],N=this.stride[1],I=this.stride[2],F=this.stride[3],L=this.offset,P=0,O=Math.ceil;return typeof d=="number"&&(P=d|0,P<0?(L+=D*(k-1),k=O(-k/P)):k=O(k/P),D*=P),typeof _=="number"&&(P=_|0,P<0?(L+=N*(h-1),h=O(-h/P)):h=O(h/P),N*=P),typeof p=="number"&&(P=p|0,P<0?(L+=I*(R-1),R=O(-R/P)):R=O(R/P),I*=P),typeof c=="number"&&(P=c|0,P<0?(L+=F*(E-1),E=O(-E/P)):E=O(E/P),F*=P),new S(this.data,k,h,R,E,D,N,I,F,L)},x.transpose=function(d,_,p,c){d=d===void 0?0:d|0,_=_===void 0?1:_|0,p=p===void 0?2:p|0,c=c===void 0?3:c|0;var k=this.shape,h=this.stride;return new S(this.data,k[d],k[_],k[p],k[c],h[d],h[_],h[p],h[c],this.offset)},x.pick=function(d,_,p,c){var k=[],h=[],R=this.offset;typeof d=="number"&&d>=0?R=R+this.stride[0]*d|0:(k.push(this.shape[0]),h.push(this.stride[0])),typeof _=="number"&&_>=0?R=R+this.stride[1]*_|0:(k.push(this.shape[1]),h.push(this.stride[1])),typeof p=="number"&&p>=0?R=R+this.stride[2]*p|0:(k.push(this.shape[2]),h.push(this.stride[2])),typeof c=="number"&&c>=0?R=R+this.stride[3]*c|0:(k.push(this.shape[3]),h.push(this.stride[3]));var E=m[k.length+1];return E(this.data,k,h,R)},function(d,_,p,c){return new S(d,_[0],_[1],_[2],_[3],p[0],p[1],p[2],p[3],c)}},5:function(m,A,S){function x(d,_,p,c,k,h,R,E,D,N,I,F){this.data=d,this.shape=[_,p,c,k,h],this.stride=[R,E,D,N,I],this.offset=F|0}var T=x.prototype;return T.dtype=m,T.dimension=5,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(T,"order",{get:S}),T.set=function(_,p,c,k,h,R){return m==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*p+this.stride[2]*c+this.stride[3]*k+this.stride[4]*h,R):this.data[this.offset+this.stride[0]*_+this.stride[1]*p+this.stride[2]*c+this.stride[3]*k+this.stride[4]*h]=R},T.get=function(_,p,c,k,h){return m==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*p+this.stride[2]*c+this.stride[3]*k+this.stride[4]*h):this.data[this.offset+this.stride[0]*_+this.stride[1]*p+this.stride[2]*c+this.stride[3]*k+this.stride[4]*h]},T.index=function(_,p,c,k,h){return this.offset+this.stride[0]*_+this.stride[1]*p+this.stride[2]*c+this.stride[3]*k+this.stride[4]*h},T.hi=function(_,p,c,k,h){return new x(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof p!="number"||p<0?this.shape[1]:p|0,typeof c!="number"||c<0?this.shape[2]:c|0,typeof k!="number"||k<0?this.shape[3]:k|0,typeof h!="number"||h<0?this.shape[4]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},T.lo=function(_,p,c,k,h){var R=this.offset,E=0,D=this.shape[0],N=this.shape[1],I=this.shape[2],F=this.shape[3],L=this.shape[4],P=this.stride[0],O=this.stride[1],U=this.stride[2],X=this.stride[3],j=this.stride[4];return typeof _=="number"&&_>=0&&(E=_|0,R+=P*E,D-=E),typeof p=="number"&&p>=0&&(E=p|0,R+=O*E,N-=E),typeof c=="number"&&c>=0&&(E=c|0,R+=U*E,I-=E),typeof k=="number"&&k>=0&&(E=k|0,R+=X*E,F-=E),typeof h=="number"&&h>=0&&(E=h|0,R+=j*E,L-=E),new x(this.data,D,N,I,F,L,P,O,U,X,j,R)},T.step=function(_,p,c,k,h){var R=this.shape[0],E=this.shape[1],D=this.shape[2],N=this.shape[3],I=this.shape[4],F=this.stride[0],L=this.stride[1],P=this.stride[2],O=this.stride[3],U=this.stride[4],X=this.offset,j=0,$=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(X+=F*(R-1),R=$(-R/j)):R=$(R/j),F*=j),typeof p=="number"&&(j=p|0,j<0?(X+=L*(E-1),E=$(-E/j)):E=$(E/j),L*=j),typeof c=="number"&&(j=c|0,j<0?(X+=P*(D-1),D=$(-D/j)):D=$(D/j),P*=j),typeof k=="number"&&(j=k|0,j<0?(X+=O*(N-1),N=$(-N/j)):N=$(N/j),O*=j),typeof h=="number"&&(j=h|0,j<0?(X+=U*(I-1),I=$(-I/j)):I=$(I/j),U*=j),new x(this.data,R,E,D,N,I,F,L,P,O,U,X)},T.transpose=function(_,p,c,k,h){_=_===void 0?0:_|0,p=p===void 0?1:p|0,c=c===void 0?2:c|0,k=k===void 0?3:k|0,h=h===void 0?4:h|0;var R=this.shape,E=this.stride;return new x(this.data,R[_],R[p],R[c],R[k],R[h],E[_],E[p],E[c],E[k],E[h],this.offset)},T.pick=function(_,p,c,k,h){var R=[],E=[],D=this.offset;typeof _=="number"&&_>=0?D=D+this.stride[0]*_|0:(R.push(this.shape[0]),E.push(this.stride[0])),typeof p=="number"&&p>=0?D=D+this.stride[1]*p|0:(R.push(this.shape[1]),E.push(this.stride[1])),typeof c=="number"&&c>=0?D=D+this.stride[2]*c|0:(R.push(this.shape[2]),E.push(this.stride[2])),typeof k=="number"&&k>=0?D=D+this.stride[3]*k|0:(R.push(this.shape[3]),E.push(this.stride[3])),typeof h=="number"&&h>=0?D=D+this.stride[4]*h|0:(R.push(this.shape[4]),E.push(this.stride[4]));var N=A[R.length+1];return N(this.data,R,E,D)},function(_,p,c,k){return new x(_,p[0],p[1],p[2],p[3],p[4],c[0],c[1],c[2],c[3],c[4],k)}}};function g(M,m){var A=m===-1?"T":String(m),S=v[A];return m===-1?S(M):m===0?S(M,y[M][0]):S(M,y[M],f)}function b(M){if(l(M))return"buffer";if(u)switch(Object.prototype.toString.call(M)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(M)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function w(M,m,A,S){if(M===void 0){var c=y.array[0];return c([])}else typeof M=="number"&&(M=[M]);m===void 0&&(m=[M.length]);var x=m.length;if(A===void 0){A=new Array(x);for(var T=x-1,d=1;T>=0;--T)A[T]=d,d*=m[T]}if(S===void 0){S=0;for(var T=0;T>>0;a.exports=f;function f(v,g){if(isNaN(v)||isNaN(g))return NaN;if(v===g)return v;if(v===0)return g<0?-u:u;var b=l.hi(v),y=l.lo(v);return g>v==v>0?y===s?(b+=1,y=0):y+=1:y===0?(y=s,b-=1):y-=1,l.pack(y,b)}},8406:function(a,o){var i=1e-6,l=1e-6;o.vertexNormals=function(u,s,f){for(var v=s.length,g=new Array(v),b=f===void 0?i:f,y=0;yb)for(var R=g[m],E=1/Math.sqrt(p*k),h=0;h<3;++h){var D=(h+1)%3,N=(h+2)%3;R[h]+=E*(c[D]*_[N]-c[N]*_[D])}}for(var y=0;yb)for(var E=1/Math.sqrt(I),h=0;h<3;++h)R[h]*=E;else for(var h=0;h<3;++h)R[h]=0}return g},o.faceNormals=function(u,s,f){for(var v=u.length,g=new Array(v),b=f===void 0?l:f,y=0;yb?T=1/Math.sqrt(T):T=0;for(var m=0;m<3;++m)x[m]*=T;g[y]=x}return g}},4081:function(a){"use strict";a.exports=o;function o(i,l,u,s,f,v,g,b,y,w){var M=l+v+w;if(m>0){var m=Math.sqrt(M+1);i[0]=.5*(g-y)/m,i[1]=.5*(b-s)/m,i[2]=.5*(u-v)/m,i[3]=.5*m}else{var A=Math.max(l,v,w),m=Math.sqrt(2*A-M+1);l>=A?(i[0]=.5*m,i[1]=.5*(f+u)/m,i[2]=.5*(b+s)/m,i[3]=.5*(g-y)/m):v>=A?(i[0]=.5*(u+f)/m,i[1]=.5*m,i[2]=.5*(y+g)/m,i[3]=.5*(b-s)/m):(i[0]=.5*(s+b)/m,i[1]=.5*(g+y)/m,i[2]=.5*m,i[3]=.5*(u-f)/m)}return i}},9977:function(a,o,i){"use strict";a.exports=m;var l=i(9215),u=i(6582),s=i(7399),f=i(7608),v=i(4081);function g(A,S,x){return Math.sqrt(Math.pow(A,2)+Math.pow(S,2)+Math.pow(x,2))}function b(A,S,x,T){return Math.sqrt(Math.pow(A,2)+Math.pow(S,2)+Math.pow(x,2)+Math.pow(T,2))}function y(A,S){var x=S[0],T=S[1],d=S[2],_=S[3],p=b(x,T,d,_);p>1e-6?(A[0]=x/p,A[1]=T/p,A[2]=d/p,A[3]=_/p):(A[0]=A[1]=A[2]=0,A[3]=1)}function w(A,S,x){this.radius=l([x]),this.center=l(S),this.rotation=l(A),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var M=w.prototype;M.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},M.recalcMatrix=function(A){this.radius.curve(A),this.center.curve(A),this.rotation.curve(A);var S=this.computedRotation;y(S,S);var x=this.computedMatrix;s(x,S);var T=this.computedCenter,d=this.computedEye,_=this.computedUp,p=Math.exp(this.computedRadius[0]);d[0]=T[0]+p*x[2],d[1]=T[1]+p*x[6],d[2]=T[2]+p*x[10],_[0]=x[1],_[1]=x[5],_[2]=x[9];for(var c=0;c<3;++c){for(var k=0,h=0;h<3;++h)k+=x[c+4*h]*d[h];x[12+c]=-k}},M.getMatrix=function(A,S){this.recalcMatrix(A);var x=this.computedMatrix;if(S){for(var T=0;T<16;++T)S[T]=x[T];return S}return x},M.idle=function(A){this.center.idle(A),this.radius.idle(A),this.rotation.idle(A)},M.flush=function(A){this.center.flush(A),this.radius.flush(A),this.rotation.flush(A)},M.pan=function(A,S,x,T){S=S||0,x=x||0,T=T||0,this.recalcMatrix(A);var d=this.computedMatrix,_=d[1],p=d[5],c=d[9],k=g(_,p,c);_/=k,p/=k,c/=k;var h=d[0],R=d[4],E=d[8],D=h*_+R*p+E*c;h-=_*D,R-=p*D,E-=c*D;var N=g(h,R,E);h/=N,R/=N,E/=N;var I=d[2],F=d[6],L=d[10],P=I*_+F*p+L*c,O=I*h+F*R+L*E;I-=P*_+O*h,F-=P*p+O*R,L-=P*c+O*E;var U=g(I,F,L);I/=U,F/=U,L/=U;var X=h*S+_*x,j=R*S+p*x,$=E*S+c*x;this.center.move(A,X,j,$);var Y=Math.exp(this.computedRadius[0]);Y=Math.max(1e-4,Y+T),this.radius.set(A,Math.log(Y))},M.rotate=function(A,S,x,T){this.recalcMatrix(A),S=S||0,x=x||0;var d=this.computedMatrix,_=d[0],p=d[4],c=d[8],k=d[1],h=d[5],R=d[9],E=d[2],D=d[6],N=d[10],I=S*_+x*k,F=S*p+x*h,L=S*c+x*R,P=-(D*L-N*F),O=-(N*I-E*L),U=-(E*F-D*I),X=Math.sqrt(Math.max(0,1-Math.pow(P,2)-Math.pow(O,2)-Math.pow(U,2))),j=b(P,O,U,X);j>1e-6?(P/=j,O/=j,U/=j,X/=j):(P=O=U=0,X=1);var $=this.computedRotation,Y=$[0],q=$[1],Z=$[2],ne=$[3],Q=Y*X+ne*P+q*U-Z*O,oe=q*X+ne*O+Z*P-Y*U,ee=Z*X+ne*U+Y*O-q*P,G=ne*X-Y*P-q*O-Z*U;if(T){P=E,O=D,U=N;var re=Math.sin(T)/g(P,O,U);P*=re,O*=re,U*=re,X=Math.cos(S),Q=Q*X+G*P+oe*U-ee*O,oe=oe*X+G*O+ee*P-Q*U,ee=ee*X+G*U+Q*O-oe*P,G=G*X-Q*P-oe*O-ee*U}var H=b(Q,oe,ee,G);H>1e-6?(Q/=H,oe/=H,ee/=H,G/=H):(Q=oe=ee=0,G=1),this.rotation.set(A,Q,oe,ee,G)},M.lookAt=function(A,S,x,T){this.recalcMatrix(A),x=x||this.computedCenter,S=S||this.computedEye,T=T||this.computedUp;var d=this.computedMatrix;u(d,S,x,T);var _=this.computedRotation;v(_,d[0],d[1],d[2],d[4],d[5],d[6],d[8],d[9],d[10]),y(_,_),this.rotation.set(A,_[0],_[1],_[2],_[3]);for(var p=0,c=0;c<3;++c)p+=Math.pow(x[c]-S[c],2);this.radius.set(A,.5*Math.log(Math.max(p,1e-6))),this.center.set(A,x[0],x[1],x[2])},M.translate=function(A,S,x,T){this.center.move(A,S||0,x||0,T||0)},M.setMatrix=function(A,S){var x=this.computedRotation;v(x,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),y(x,x),this.rotation.set(A,x[0],x[1],x[2],x[3]);var T=this.computedMatrix;f(T,S);var d=T[15];if(Math.abs(d)>1e-6){var _=T[12]/d,p=T[13]/d,c=T[14]/d;this.recalcMatrix(A);var k=Math.exp(this.computedRadius[0]);this.center.set(A,_-T[2]*k,p-T[6]*k,c-T[10]*k),this.radius.idle(A)}else this.center.idle(A),this.radius.idle(A)},M.setDistance=function(A,S){S>0&&this.radius.set(A,Math.log(S))},M.setDistanceLimits=function(A,S){A>0?A=Math.log(A):A=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=S},M.getDistanceLimits=function(A){var S=this.radius.bounds;return A?(A[0]=Math.exp(S[0][0]),A[1]=Math.exp(S[1][0]),A):[Math.exp(S[0][0]),Math.exp(S[1][0])]},M.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},M.fromJSON=function(A){var S=this.lastT(),x=A.center;x&&this.center.set(S,x[0],x[1],x[2]);var T=A.rotation;T&&this.rotation.set(S,T[0],T[1],T[2],T[3]);var d=A.distance;d&&d>0&&this.radius.set(S,Math.log(d)),this.setDistanceLimits(A.zoomMin,A.zoomMax)};function m(A){A=A||{};var S=A.center||[0,0,0],x=A.rotation||[0,0,0,1],T=A.radius||1;S=[].slice.call(S,0,3),x=[].slice.call(x,0,4),y(x,x);var d=new w(x,S,Math.log(T));return d.setDistanceLimits(A.zoomMin,A.zoomMax),("eye"in A||"up"in A)&&d.lookAt(0,A.eye,A.center,A.up),d}},1371:function(a,o,i){"use strict";var l=i(3233);a.exports=function(s,f,v){return v=typeof v!="undefined"?v+"":" ",l(v,f)+s}},3202:function(a){a.exports=function(i,l){l||(l=[0,""]),i=String(i);var u=parseFloat(i,10);return l[0]=u,l[1]=i.match(/[\d.\-\+]*\s*(.*)/)[1]||"",l}},3088:function(a,o,i){"use strict";a.exports=u;var l=i(3140);function u(s,f){for(var v=f.length|0,g=s.length,b=[new Array(v),new Array(v)],y=0;y0){R=b[N][k][0],D=N;break}E=R[D^1];for(var I=0;I<2;++I)for(var F=b[I][k],L=0;L0&&(R=P,E=O,D=I)}return h||R&&m(R,D),E}function S(c,k){var h=b[k][c][0],R=[c];m(h,k);for(var E=h[k^1],D=k;;){for(;E!==c;)R.push(E),E=A(R[R.length-2],E,!1);if(b[0][c].length+b[1][c].length===0)break;var N=R[R.length-1],I=c,F=R[1],L=A(N,I,!0);if(l(f[N],f[I],f[F],f[L])<0)break;R.push(c),E=A(N,I)}return R}function x(c,k){return k[1]===k[k.length-1]}for(var y=0;y0;){var _=b[0][y].length,p=S(y,T);x(d,p)?d.push.apply(d,p):(d.length>0&&M.push(d),d=p)}d.length>0&&M.push(d)}return M}},5609:function(a,o,i){"use strict";a.exports=u;var l=i(3134);function u(s,f){for(var v=l(s,f.length),g=new Array(f.length),b=new Array(f.length),y=[],w=0;w0;){var m=y.pop();g[m]=!1;for(var A=v[m],w=0;w0}_=_.filter(p);for(var c=_.length,k=new Array(c),h=new Array(c),d=0;d0;){var H=ee.pop(),te=j[H];g(te,function(ve,Ae){return ve-Ae});var ue=te.length,de=G[H],Ee;if(de===0){var F=_[H];Ee=[F]}for(var d=0;d=0)&&(G[Me]=de^1,ee.push(Me),de===0)){var F=_[Me];oe(F)||(F.reverse(),Ee.push(F))}}de===0&&re.push(Ee)}return re}},5085:function(a,o,i){a.exports=A;var l=i(3250)[3],u=i(4209),s=i(3352),f=i(2478);function v(){return!0}function g(S){return function(x,T){var d=S[x];return d?!!d.queryPoint(T,v):!1}}function b(S){for(var x={},T=0;T0&&x[d]===T[0])_=S[d-1];else return 1;for(var p=1;_;){var c=_.key,k=l(T,c[0],c[1]);if(c[0][0]0)p=-1,_=_.right;else return 0;else if(k>0)_=_.left;else if(k<0)p=1,_=_.right;else return 0}return p}}function w(S){return 1}function M(S){return function(T){return S(T[0],T[1])?0:1}}function m(S,x){return function(d){return S(d[0],d[1])?0:x(d)}}function A(S){for(var x=S.length,T=[],d=[],_=0,p=0;p=w?(c=1,h=w+2*A+x):(c=-A/w,h=A*c+x)):(c=0,S>=0?(k=0,h=x):-S>=m?(k=1,h=m+2*S+x):(k=-S/m,h=S*k+x));else if(k<0)k=0,A>=0?(c=0,h=x):-A>=w?(c=1,h=w+2*A+x):(c=-A/w,h=A*c+x);else{var R=1/p;c*=R,k*=R,h=c*(w*c+M*k+2*A)+k*(M*c+m*k+2*S)+x}else{var E,D,N,I;c<0?(E=M+A,D=m+S,D>E?(N=D-E,I=w-2*M+m,N>=I?(c=1,k=0,h=w+2*A+x):(c=N/I,k=1-c,h=c*(w*c+M*k+2*A)+k*(M*c+m*k+2*S)+x)):(c=0,D<=0?(k=1,h=m+2*S+x):S>=0?(k=0,h=x):(k=-S/m,h=S*k+x))):k<0?(E=M+S,D=w+A,D>E?(N=D-E,I=w-2*M+m,N>=I?(k=1,c=0,h=m+2*S+x):(k=N/I,c=1-k,h=c*(w*c+M*k+2*A)+k*(M*c+m*k+2*S)+x)):(k=0,D<=0?(c=1,h=w+2*A+x):A>=0?(c=0,h=x):(c=-A/w,h=A*c+x))):(N=m+S-M-A,N<=0?(c=0,k=1,h=m+2*S+x):(I=w-2*M+m,N>=I?(c=1,k=0,h=w+2*A+x):(c=N/I,k=1-c,h=c*(w*c+M*k+2*A)+k*(M*c+m*k+2*S)+x)))}for(var F=1-c-k,y=0;y0){var m=v[b-1];if(l(w,m)===0&&s(m)!==M){b-=1;continue}}v[b++]=w}}return v.length=b,v}},3233:function(a){"use strict";var o="",i;a.exports=l;function l(u,s){if(typeof u!="string")throw new TypeError("expected a string");if(s===1)return u;if(s===2)return u+u;var f=u.length*s;if(i!==u||typeof i=="undefined")i=u,o="";else if(o.length>=f)return o.substr(0,f);for(;f>o.length&&s>1;)s&1&&(o+=u),s>>=1,u+=u;return o+=u,o=o.substr(0,f),o}},3025:function(a,o,i){a.exports=i.g.performance&&i.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(a){"use strict";a.exports=o;function o(i){for(var l=i.length,u=i[i.length-1],s=l,f=l-2;f>=0;--f){var v=u,g=i[f];u=v+g;var b=u-v,y=g-b;y&&(i[--s]=u,u=y)}for(var w=0,f=s;f0){if(D<=0)return N;I=E+D}else if(E<0){if(D>=0)return N;I=-(E+D)}else return N;var F=b*I;return N>=F||N<=-F?N:S(k,h,R)},function(k,h,R,E){var D=k[0]-E[0],N=h[0]-E[0],I=R[0]-E[0],F=k[1]-E[1],L=h[1]-E[1],P=R[1]-E[1],O=k[2]-E[2],U=h[2]-E[2],X=R[2]-E[2],j=N*P,$=I*L,Y=I*F,q=D*P,Z=D*L,ne=N*F,Q=O*(j-$)+U*(Y-q)+X*(Z-ne),oe=(Math.abs(j)+Math.abs($))*Math.abs(O)+(Math.abs(Y)+Math.abs(q))*Math.abs(U)+(Math.abs(Z)+Math.abs(ne))*Math.abs(X),ee=y*oe;return Q>ee||-Q>ee?Q:x(k,h,R,E)}];function d(c){var k=T[c.length];return k||(k=T[c.length]=A(c.length)),k.apply(void 0,c)}function _(c,k,h,R,E,D,N){return function(F,L,P,O,U){switch(arguments.length){case 0:case 1:return 0;case 2:return R(F,L);case 3:return E(F,L,P);case 4:return D(F,L,P,O);case 5:return N(F,L,P,O,U)}for(var X=new Array(arguments.length),j=0;j0&&w>0||y<0&&w<0)return!1;var M=l(g,f,v),m=l(b,f,v);return M>0&&m>0||M<0&&m<0?!1:y===0&&w===0&&M===0&&m===0?u(f,v,g,b):!0}},8545:function(a){"use strict";a.exports=i;function o(l,u){var s=l+u,f=s-l,v=s-f,g=u-f,b=l-v,y=b+g;return y?[y,s]:[s]}function i(l,u){var s=l.length|0,f=u.length|0;if(s===1&&f===1)return o(l[0],-u[0]);var v=s+f,g=new Array(v),b=0,y=0,w=0,M=Math.abs,m=l[y],A=M(m),S=-u[w],x=M(S),T,d;A=f?(T=m,y+=1,y=f?(T=m,y+=1,y>1,S=v[2*A+1];if(S===w)return A;w>1,S=v[2*A+1];if(S===w)return A;w>1,S=v[2*A+1];if(S===w)return A;w>1,S=v[2*A+1];if(S===w)return A;w>1,I=b(k[N],h);I<=0?(I===0&&(D=N),R=N+1):I>0&&(E=N-1)}return D}l=m;function A(k,h){for(var R=new Array(k.length),E=0,D=R.length;E=k.length||b(k[j],N)!==0););}return R}l=A;function S(k,h){if(!h)return A(M(T(k,0)),k,0);for(var R=new Array(h),E=0;E>>P&1&&L.push(D[P]);h.push(L)}return w(h)}l=x;function T(k,h){if(h<0)return[];for(var R=[],E=(1<0)-(s<0)},o.abs=function(s){var f=s>>i-1;return(s^f)-f},o.min=function(s,f){return f^(s^f)&-(s65535)<<4,s>>>=f,v=(s>255)<<3,s>>>=v,f|=v,v=(s>15)<<2,s>>>=v,f|=v,v=(s>3)<<1,s>>>=v,f|=v,f|s>>1},o.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},o.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var f=32;return s&=-s,s&&f--,s&65535&&(f-=16),s&16711935&&(f-=8),s&252645135&&(f-=4),s&858993459&&(f-=2),s&1431655765&&(f-=1),f}o.countTrailingZeros=l,o.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},o.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},o.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var u=new Array(256);(function(s){for(var f=0;f<256;++f){var v=f,g=f,b=7;for(v>>>=1;v;v>>>=1)g<<=1,g|=v&1,--b;s[f]=g<>>8&255]<<16|u[s>>>16&255]<<8|u[s>>>24&255]},o.interleave2=function(s,f){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,s|f<<1},o.deinterleave2=function(s,f){return s=s>>>f&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},o.interleave3=function(s,f,v){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,s|=f<<1,v&=1023,v=(v|v<<16)&4278190335,v=(v|v<<8)&251719695,v=(v|v<<4)&3272356035,v=(v|v<<2)&1227133513,s|v<<2},o.deinterleave3=function(s,f){return s=s>>>f&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},o.nextCombination=function(s){var f=s|s-1;return f+1|(~f&-~f)-1>>>l(s)+1}},2014:function(a,o,i){"use strict";"use restrict";var l=i(3105),u=i(4623);function s(c){for(var k=0,h=Math.max,R=0,E=c.length;R>1,N=g(c[D],k);N<=0?(N===0&&(E=D),h=D+1):N>0&&(R=D-1)}return E}o.findCell=M;function m(c,k){for(var h=new Array(c.length),R=0,E=h.length;R=c.length||g(c[X],D)!==0););}return h}o.incidence=m;function A(c,k){if(!k)return m(w(x(c,0)),c,0);for(var h=new Array(k),R=0;R>>L&1&&F.push(E[L]);k.push(F)}return y(k)}o.explode=S;function x(c,k){if(k<0)return[];for(var h=[],R=(1<>1:(q>>1)-1}function R(q){for(var Z=k(q);;){var ne=Z,Q=2*q+1,oe=2*(q+1),ee=q;if(Q0;){var ne=h(q);if(ne>=0){var Q=k(ne);if(Z0){var q=F[0];return c(0,O-1),O-=1,R(0),q}return-1}function N(q,Z){var ne=F[q];return A[ne]===Z?q:(A[ne]=-1/0,E(q),D(),A[ne]=Z,O+=1,E(O-1))}function I(q){if(!S[q]){S[q]=!0;var Z=M[q],ne=m[q];M[ne]>=0&&(M[ne]=Z),m[Z]>=0&&(m[Z]=ne),L[Z]>=0&&N(L[Z],p(Z)),L[ne]>=0&&N(L[ne],p(ne))}}for(var F=[],L=new Array(y),x=0;x>1;x>=0;--x)R(x);for(;;){var U=D();if(U<0||A[U]>b)break;I(U)}for(var X=[],x=0;x=0&&ne>=0&&Z!==ne){var Q=L[Z],oe=L[ne];Q!==oe&&Y.push([Q,oe])}}),u.unique(u.normalize(Y)),{positions:X,edges:Y}}},1303:function(a,o,i){"use strict";a.exports=s;var l=i(3250);function u(f,v){var g,b;if(v[0][0]v[1][0])g=v[1],b=v[0];else{var y=Math.min(f[0][1],f[1][1]),w=Math.max(f[0][1],f[1][1]),M=Math.min(v[0][1],v[1][1]),m=Math.max(v[0][1],v[1][1]);return wm?y-m:w-m}var A,S;f[0][1]v[1][0])g=v[1],b=v[0];else return u(v,f);var y,w;if(f[0][0]f[1][0])y=f[1],w=f[0];else return-u(f,v);var M=l(g,b,w),m=l(g,b,y);if(M<0){if(m<=0)return M}else if(M>0){if(m>=0)return M}else if(m)return m;if(M=l(w,y,b),m=l(w,y,g),M<0){if(m<=0)return M}else if(M>0){if(m>=0)return M}else if(m)return m;return b[0]-w[0]}},4209:function(a,o,i){"use strict";a.exports=m;var l=i(2478),u=i(3840),s=i(3250),f=i(1303);function v(A,S,x){this.slabs=A,this.coordinates=S,this.horizontal=x}var g=v.prototype;function b(A,S){return A.y-S}function y(A,S){for(var x=null;A;){var T=A.key,d,_;T[0][0]0)if(S[0]!==T[1][0])x=A,A=A.right;else{var c=y(A.right,S);if(c)return c;A=A.left}else{if(S[0]!==T[1][0])return A;var c=y(A.right,S);if(c)return c;A=A.left}}return x}g.castUp=function(A){var S=l.le(this.coordinates,A[0]);if(S<0)return-1;var x=this.slabs[S],T=y(this.slabs[S],A),d=-1;if(T&&(d=T.value),this.coordinates[S]===A[0]){var _=null;if(T&&(_=T.key),S>0){var p=y(this.slabs[S-1],A);p&&(_?f(p.key,_)>0&&(_=p.key,d=p.value):(d=p.value,_=p.key))}var c=this.horizontal[S];if(c.length>0){var k=l.ge(c,A[1],b);if(k=c.length)return d;h=c[k]}}if(h.start)if(_){var R=s(_[0],_[1],[A[0],h.y]);_[0][0]>_[1][0]&&(R=-R),R>0&&(d=h.index)}else d=h.index;else h.y!==A[1]&&(d=h.index)}}}return d};function w(A,S,x,T){this.y=A,this.index=S,this.start=x,this.closed=T}function M(A,S,x,T){this.x=A,this.segment=S,this.create=x,this.index=T}function m(A){for(var S=A.length,x=2*S,T=new Array(x),d=0;d1&&(S=1);for(var x=1-S,T=y.length,d=new Array(T),_=0;_0||A>0&&d<0){var _=f(S,d,x,A);M.push(_),m.push(_.slice())}d<0?m.push(x.slice()):d>0?M.push(x.slice()):(M.push(x.slice()),m.push(x.slice())),A=d}return{positive:M,negative:m}}function g(y,w){for(var M=[],m=s(y[y.length-1],w),A=y[y.length-1],S=y[0],x=0;x0||m>0&&T<0)&&M.push(f(A,T,S,m)),T>=0&&M.push(S.slice()),m=T}return M}function b(y,w){for(var M=[],m=s(y[y.length-1],w),A=y[y.length-1],S=y[0],x=0;x0||m>0&&T<0)&&M.push(f(A,T,S,m)),T<=0&&M.push(S.slice()),m=T}return M}},3387:function(a,o,i){var l;(function(){"use strict";var u={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function s(y){return v(b(y),arguments)}function f(y,w){return s.apply(null,[y].concat(w||[]))}function v(y,w){var M=1,m=y.length,A,S="",x,T,d,_,p,c,k,h;for(x=0;x=0),d.type){case"b":A=parseInt(A,10).toString(2);break;case"c":A=String.fromCharCode(parseInt(A,10));break;case"d":case"i":A=parseInt(A,10);break;case"j":A=JSON.stringify(A,null,d.width?parseInt(d.width):0);break;case"e":A=d.precision?parseFloat(A).toExponential(d.precision):parseFloat(A).toExponential();break;case"f":A=d.precision?parseFloat(A).toFixed(d.precision):parseFloat(A);break;case"g":A=d.precision?String(Number(A.toPrecision(d.precision))):parseFloat(A);break;case"o":A=(parseInt(A,10)>>>0).toString(8);break;case"s":A=String(A),A=d.precision?A.substring(0,d.precision):A;break;case"t":A=String(!!A),A=d.precision?A.substring(0,d.precision):A;break;case"T":A=Object.prototype.toString.call(A).slice(8,-1).toLowerCase(),A=d.precision?A.substring(0,d.precision):A;break;case"u":A=parseInt(A,10)>>>0;break;case"v":A=A.valueOf(),A=d.precision?A.substring(0,d.precision):A;break;case"x":A=(parseInt(A,10)>>>0).toString(16);break;case"X":A=(parseInt(A,10)>>>0).toString(16).toUpperCase();break}u.json.test(d.type)?S+=A:(u.number.test(d.type)&&(!k||d.sign)?(h=k?"+":"-",A=A.toString().replace(u.sign,"")):h="",p=d.pad_char?d.pad_char==="0"?"0":d.pad_char.charAt(1):" ",c=d.width-(h+A).length,_=d.width&&c>0?p.repeat(c):"",S+=d.align?h+A+_:p==="0"?h+_+A:_+h+A)}return S}var g=Object.create(null);function b(y){if(g[y])return g[y];for(var w=y,M,m=[],A=0;w;){if((M=u.text.exec(w))!==null)m.push(M[0]);else if((M=u.modulo.exec(w))!==null)m.push("%");else if((M=u.placeholder.exec(w))!==null){if(M[2]){A|=1;var S=[],x=M[2],T=[];if((T=u.key.exec(x))!==null)for(S.push(T[1]);(x=x.substring(T[0].length))!=="";)if((T=u.key_access.exec(x))!==null)S.push(T[1]);else if((T=u.index_access.exec(x))!==null)S.push(T[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");M[2]=S}else A|=2;if(A===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");m.push({placeholder:M[0],param_no:M[1],keys:M[2],sign:M[3],pad_char:M[4],align:M[5],width:M[6],precision:M[7],type:M[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");w=w.substring(M[0].length)}return g[y]=m}o.sprintf=s,o.vsprintf=f,typeof window!="undefined"&&(window.sprintf=s,window.vsprintf=f,l=function(){return{sprintf:s,vsprintf:f}}.call(o,i,o,a),l!==void 0&&(a.exports=l))})()},3711:function(a,o,i){"use strict";a.exports=b;var l=i(2640),u=i(781),s={"2d":function(y,w,M){var m=y({order:w,scalarArguments:3,getters:M==="generic"?[0]:void 0,phase:function(S,x,T,d){return S>d|0},vertex:function(S,x,T,d,_,p,c,k,h,R,E,D,N){var I=(c<<0)+(k<<1)+(h<<2)+(R<<3)|0;if(!(I===0||I===15))switch(I){case 0:E.push([S-.5,x-.5]);break;case 1:E.push([S-.25-.25*(d+T-2*N)/(T-d),x-.25-.25*(_+T-2*N)/(T-_)]);break;case 2:E.push([S-.75-.25*(-d-T+2*N)/(d-T),x-.25-.25*(p+d-2*N)/(d-p)]);break;case 3:E.push([S-.5,x-.5-.5*(_+T+p+d-4*N)/(T-_+d-p)]);break;case 4:E.push([S-.25-.25*(p+_-2*N)/(_-p),x-.75-.25*(-_-T+2*N)/(_-T)]);break;case 5:E.push([S-.5-.5*(d+T+p+_-4*N)/(T-d+_-p),x-.5]);break;case 6:E.push([S-.5-.25*(-d-T+p+_)/(d-T+_-p),x-.5-.25*(-_-T+p+d)/(_-T+d-p)]);break;case 7:E.push([S-.75-.25*(p+_-2*N)/(_-p),x-.75-.25*(p+d-2*N)/(d-p)]);break;case 8:E.push([S-.75-.25*(-p-_+2*N)/(p-_),x-.75-.25*(-p-d+2*N)/(p-d)]);break;case 9:E.push([S-.5-.25*(d+T+-p-_)/(T-d+p-_),x-.5-.25*(_+T+-p-d)/(T-_+p-d)]);break;case 10:E.push([S-.5-.5*(-d-T+-p-_+4*N)/(d-T+p-_),x-.5]);break;case 11:E.push([S-.25-.25*(-p-_+2*N)/(p-_),x-.75-.25*(_+T-2*N)/(T-_)]);break;case 12:E.push([S-.5,x-.5-.5*(-_-T+-p-d+4*N)/(_-T+p-d)]);break;case 13:E.push([S-.75-.25*(d+T-2*N)/(T-d),x-.25-.25*(-p-d+2*N)/(p-d)]);break;case 14:E.push([S-.25-.25*(-d-T+2*N)/(d-T),x-.25-.25*(-_-T+2*N)/(_-T)]);break;case 15:E.push([S-.5,x-.5]);break}},cell:function(S,x,T,d,_,p,c,k,h){_?k.push([S,x]):k.push([x,S])}});return function(A,S){var x=[],T=[];return m(A,x,T,S),{positions:x,cells:T}}}};function f(y,w){var M=y.length+"d",m=s[M];if(m)return m(l,y,w)}function v(y,w){for(var M=u(y,w),m=M.length,A=new Array(m),S=new Array(m),x=0;xMath.max(d,_)?p[2]=1:d>Math.max(T,_)?p[0]=1:p[1]=1;for(var c=0,k=0,h=0;h<3;++h)c+=x[h]*x[h],k+=p[h]*x[h];for(var h=0;h<3;++h)p[h]-=k/c*x[h];return v(p,p),p}function M(x,T,d,_,p,c,k,h){this.center=l(d),this.up=l(_),this.right=l(p),this.radius=l([c]),this.angle=l([k,h]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(x,T),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 R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var m=M.prototype;m.setDistanceLimits=function(x,T){x>0?x=Math.log(x):x=-1/0,T>0?T=Math.log(T):T=1/0,T=Math.max(T,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=T},m.getDistanceLimits=function(x){var T=this.radius.bounds[0];return x?(x[0]=Math.exp(T[0][0]),x[1]=Math.exp(T[1][0]),x):[Math.exp(T[0][0]),Math.exp(T[1][0])]},m.recalcMatrix=function(x){this.center.curve(x),this.up.curve(x),this.right.curve(x),this.radius.curve(x),this.angle.curve(x);for(var T=this.computedUp,d=this.computedRight,_=0,p=0,c=0;c<3;++c)p+=T[c]*d[c],_+=T[c]*T[c];for(var k=Math.sqrt(_),h=0,c=0;c<3;++c)d[c]-=T[c]*p/_,h+=d[c]*d[c],T[c]/=k;for(var R=Math.sqrt(h),c=0;c<3;++c)d[c]/=R;var E=this.computedToward;f(E,T,d),v(E,E);for(var D=Math.exp(this.computedRadius[0]),N=this.computedAngle[0],I=this.computedAngle[1],F=Math.cos(N),L=Math.sin(N),P=Math.cos(I),O=Math.sin(I),U=this.computedCenter,X=F*P,j=L*P,$=O,Y=-F*O,q=-L*O,Z=P,ne=this.computedEye,Q=this.computedMatrix,c=0;c<3;++c){var oe=X*d[c]+j*E[c]+$*T[c];Q[4*c+1]=Y*d[c]+q*E[c]+Z*T[c],Q[4*c+2]=oe,Q[4*c+3]=0}var ee=Q[1],G=Q[5],re=Q[9],H=Q[2],te=Q[6],ue=Q[10],de=G*ue-re*te,Ee=re*H-ee*ue,Me=ee*te-G*H,ve=b(de,Ee,Me);de/=ve,Ee/=ve,Me/=ve,Q[0]=de,Q[4]=Ee,Q[8]=Me;for(var c=0;c<3;++c)ne[c]=U[c]+Q[2+4*c]*D;for(var c=0;c<3;++c){for(var h=0,Ae=0;Ae<3;++Ae)h+=Q[c+4*Ae]*ne[Ae];Q[12+c]=-h}Q[15]=1},m.getMatrix=function(x,T){this.recalcMatrix(x);var d=this.computedMatrix;if(T){for(var _=0;_<16;++_)T[_]=d[_];return T}return d};var A=[0,0,0];m.rotate=function(x,T,d,_){if(this.angle.move(x,T,d),_){this.recalcMatrix(x);var p=this.computedMatrix;A[0]=p[2],A[1]=p[6],A[2]=p[10];for(var c=this.computedUp,k=this.computedRight,h=this.computedToward,R=0;R<3;++R)p[4*R]=c[R],p[4*R+1]=k[R],p[4*R+2]=h[R];s(p,p,_,A);for(var R=0;R<3;++R)c[R]=p[4*R],k[R]=p[4*R+1];this.up.set(x,c[0],c[1],c[2]),this.right.set(x,k[0],k[1],k[2])}},m.pan=function(x,T,d,_){T=T||0,d=d||0,_=_||0,this.recalcMatrix(x);var p=this.computedMatrix,c=Math.exp(this.computedRadius[0]),k=p[1],h=p[5],R=p[9],E=b(k,h,R);k/=E,h/=E,R/=E;var D=p[0],N=p[4],I=p[8],F=D*k+N*h+I*R;D-=k*F,N-=h*F,I-=R*F;var L=b(D,N,I);D/=L,N/=L,I/=L;var P=D*T+k*d,O=N*T+h*d,U=I*T+R*d;this.center.move(x,P,O,U);var X=Math.exp(this.computedRadius[0]);X=Math.max(1e-4,X+_),this.radius.set(x,Math.log(X))},m.translate=function(x,T,d,_){this.center.move(x,T||0,d||0,_||0)},m.setMatrix=function(x,T,d,_){var p=1;typeof d=="number"&&(p=d|0),(p<0||p>3)&&(p=1);var c=(p+2)%3,k=(p+1)%3;T||(this.recalcMatrix(x),T=this.computedMatrix);var h=T[p],R=T[p+4],E=T[p+8];if(_){var N=Math.abs(h),I=Math.abs(R),F=Math.abs(E),L=Math.max(N,I,F);N===L?(h=h<0?-1:1,R=E=0):F===L?(E=E<0?-1:1,h=R=0):(R=R<0?-1:1,h=E=0)}else{var D=b(h,R,E);h/=D,R/=D,E/=D}var P=T[c],O=T[c+4],U=T[c+8],X=P*h+O*R+U*E;P-=h*X,O-=R*X,U-=E*X;var j=b(P,O,U);P/=j,O/=j,U/=j;var $=R*U-E*O,Y=E*P-h*U,q=h*O-R*P,Z=b($,Y,q);$/=Z,Y/=Z,q/=Z,this.center.jump(x,Ue,ge,Te),this.radius.idle(x),this.up.jump(x,h,R,E),this.right.jump(x,P,O,U);var ne,Q;if(p===2){var oe=T[1],ee=T[5],G=T[9],re=oe*P+ee*O+G*U,H=oe*$+ee*Y+G*q;Ee<0?ne=-Math.PI/2:ne=Math.PI/2,Q=Math.atan2(H,re)}else{var te=T[2],ue=T[6],de=T[10],Ee=te*h+ue*R+de*E,Me=te*P+ue*O+de*U,ve=te*$+ue*Y+de*q;ne=Math.asin(y(Ee)),Q=Math.atan2(ve,Me)}this.angle.jump(x,Q,ne),this.recalcMatrix(x);var Ae=T[2],ke=T[6],De=T[10],Ce=this.computedMatrix;u(Ce,T);var Oe=Ce[15],Ue=Ce[12]/Oe,ge=Ce[13]/Oe,Te=Ce[14]/Oe,ce=Math.exp(this.computedRadius[0]);this.center.jump(x,Ue-Ae*ce,ge-ke*ce,Te-De*ce)},m.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},m.idle=function(x){this.center.idle(x),this.up.idle(x),this.right.idle(x),this.radius.idle(x),this.angle.idle(x)},m.flush=function(x){this.center.flush(x),this.up.flush(x),this.right.flush(x),this.radius.flush(x),this.angle.flush(x)},m.setDistance=function(x,T){T>0&&this.radius.set(x,Math.log(T))},m.lookAt=function(x,T,d,_){this.recalcMatrix(x),T=T||this.computedEye,d=d||this.computedCenter,_=_||this.computedUp;var p=_[0],c=_[1],k=_[2],h=b(p,c,k);if(!(h<1e-6)){p/=h,c/=h,k/=h;var R=T[0]-d[0],E=T[1]-d[1],D=T[2]-d[2],N=b(R,E,D);if(!(N<1e-6)){R/=N,E/=N,D/=N;var I=this.computedRight,F=I[0],L=I[1],P=I[2],O=p*F+c*L+k*P;F-=O*p,L-=O*c,P-=O*k;var U=b(F,L,P);if(!(U<.01&&(F=c*D-k*E,L=k*R-p*D,P=p*E-c*R,U=b(F,L,P),U<1e-6))){F/=U,L/=U,P/=U,this.up.set(x,p,c,k),this.right.set(x,F,L,P),this.center.set(x,d[0],d[1],d[2]),this.radius.set(x,Math.log(N));var X=c*P-k*L,j=k*F-p*P,$=p*L-c*F,Y=b(X,j,$);X/=Y,j/=Y,$/=Y;var q=p*R+c*E+k*D,Z=F*R+L*E+P*D,ne=X*R+j*E+$*D,Q=Math.asin(y(q)),oe=Math.atan2(ne,Z),ee=this.angle._state,G=ee[ee.length-1],re=ee[ee.length-2];G=G%(2*Math.PI);var H=Math.abs(G+2*Math.PI-oe),te=Math.abs(G-oe),ue=Math.abs(G-2*Math.PI-oe);H0?P.pop():new ArrayBuffer(F)}o.mallocArrayBuffer=A;function S(I){return new Uint8Array(A(I),0,I)}o.mallocUint8=S;function x(I){return new Uint16Array(A(2*I),0,I)}o.mallocUint16=x;function T(I){return new Uint32Array(A(4*I),0,I)}o.mallocUint32=T;function d(I){return new Int8Array(A(I),0,I)}o.mallocInt8=d;function _(I){return new Int16Array(A(2*I),0,I)}o.mallocInt16=_;function p(I){return new Int32Array(A(4*I),0,I)}o.mallocInt32=p;function c(I){return new Float32Array(A(4*I),0,I)}o.mallocFloat32=o.mallocFloat=c;function k(I){return new Float64Array(A(8*I),0,I)}o.mallocFloat64=o.mallocDouble=k;function h(I){return f?new Uint8ClampedArray(A(I),0,I):S(I)}o.mallocUint8Clamped=h;function R(I){return v?new BigUint64Array(A(8*I),0,I):null}o.mallocBigUint64=R;function E(I){return g?new BigInt64Array(A(8*I),0,I):null}o.mallocBigInt64=E;function D(I){return new DataView(A(I),0,I)}o.mallocDataView=D;function N(I){I=l.nextPow2(I);var F=l.log2(I),L=w[F];return L.length>0?L.pop():new s(I)}o.mallocBuffer=N,o.clearCache=function(){for(var F=0;F<32;++F)b.UINT8[F].length=0,b.UINT16[F].length=0,b.UINT32[F].length=0,b.INT8[F].length=0,b.INT16[F].length=0,b.INT32[F].length=0,b.FLOAT[F].length=0,b.DOUBLE[F].length=0,b.BIGUINT64[F].length=0,b.BIGINT64[F].length=0,b.UINT8C[F].length=0,y[F].length=0,w[F].length=0}},1755:function(a){"use strict";"use restrict";a.exports=o;function o(l){this.roots=new Array(l),this.ranks=new Array(l);for(var u=0;u",P="",O=L.length,U=P.length,X=N[0]===A||N[0]===T,j=0,$=-U;j>-1&&(j=I.indexOf(L,j),!(j===-1||($=I.indexOf(P,j+O),$===-1)||$<=j));){for(var Y=j;Y<$+U;++Y)if(Y=$)F[Y]=null,I=I.substr(0,Y)+" "+I.substr(Y+1);else if(F[Y]!==null){var q=F[Y].indexOf(N[0]);q===-1?F[Y]+=N:X&&(F[Y]=F[Y].substr(0,q+1)+(1+parseInt(F[Y][q+1]))+F[Y].substr(q+2))}var Z=j+O,ne=I.substr(Z,$-Z),Q=ne.indexOf(L);Q!==-1?j=Q:j=$+U}return F}function p(D,N,I){for(var F=N.textAlign||"start",L=N.textBaseline||"alphabetic",P=[1<<30,1<<30],O=[0,0],U=D.length,X=0;X/g,` -`):I=I.replace(/\/g," ");var O="",U=[];for(G=0;G-1?parseInt(ge[1+ye]):0,he=Le>-1?parseInt(Te[1+Le]):0;me!==he&&(ce=ce.replace(Me(),"?px "),te*=Math.pow(.75,he-me),ce=ce.replace("?px ",Me())),H+=.25*q*(he-me)}if(P.superscripts===!0){var be=ge.indexOf(A),Se=Te.indexOf(A),ze=be>-1?parseInt(ge[1+be]):0,Fe=Se>-1?parseInt(Te[1+Se]):0;ze!==Fe&&(ce=ce.replace(Me(),"?px "),te*=Math.pow(.75,Fe-ze),ce=ce.replace("?px ",Me())),H-=.25*q*(Fe-ze)}if(P.bolds===!0){var Je=ge.indexOf(y)>-1,Ye=Te.indexOf(y)>-1;!Je&&Ye&&(Ge?ce=ce.replace("italic ","italic bold "):ce="bold "+ce),Je&&!Ye&&(ce=ce.replace("bold ",""))}if(P.italics===!0){var Ge=ge.indexOf(M)>-1,We=Te.indexOf(M)>-1;!Ge&&We&&(ce="italic "+ce),Ge&&!We&&(ce=ce.replace("italic ",""))}N.font=ce}for(ee=0;ee0&&(L=F.size),F.lineSpacing&&F.lineSpacing>0&&(P=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(O.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(O.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(O.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(O.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(O.superscripts=!!F.styletags.superscripts)),I.font=[F.fontStyle,F.fontVariant,F.fontWeight,L+"px",F.font].filter(function(X){return X}).join(" "),I.textAlign="start",I.textBaseline="alphabetic",I.direction="ltr";var U=c(N,I,D,L,P,O);return R(U,F,L)}},1538:function(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function i(h){h.permitHostObjects___&&h.permitHostObjects___(i)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=i);var l=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var s=new u,f=Object.freeze({});if(s.set(f,1),s.get(f)!==1)l=!0;else{a.exports=WeakMap;return}}}var v=Object.prototype.hasOwnProperty,g=Object.getOwnPropertyNames,b=Object.defineProperty,y=Object.isExtensible,w="weakmap:",M=w+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var m=new ArrayBuffer(25),A=new Uint8Array(m);crypto.getRandomValues(A),M=w+"rand:"+Array.prototype.map.call(A,function(h){return(h%36).toString(36)}).join("")+"___"}function S(h){return!(h.substr(0,w.length)==w&&h.substr(h.length-3)==="___")}if(b(Object,"getOwnPropertyNames",{value:function(R){return g(R).filter(S)}}),"getPropertyNames"in Object){var x=Object.getPropertyNames;b(Object,"getPropertyNames",{value:function(R){return x(R).filter(S)}})}function T(h){if(h!==Object(h))throw new TypeError("Not an object: "+h);var R=h[M];if(R&&R.key===h)return R;if(y(h)){R={key:h};try{return b(h,M,{value:R,writable:!1,enumerable:!1,configurable:!1}),R}catch(E){return}}}(function(){var h=Object.freeze;b(Object,"freeze",{value:function(N){return T(N),h(N)}});var R=Object.seal;b(Object,"seal",{value:function(N){return T(N),R(N)}});var E=Object.preventExtensions;b(Object,"preventExtensions",{value:function(N){return T(N),E(N)}})})();function d(h){return h.prototype=null,Object.freeze(h)}var _=!1;function p(){!_&&typeof console!="undefined"&&(_=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var c=0,k=function(){this instanceof k||p();var h=[],R=[],E=c++;function D(L,P){var O,U=T(L);return U?E in U?U[E]:P:(O=h.indexOf(L),O>=0?R[O]:P)}function N(L){var P=T(L);return P?E in P:h.indexOf(L)>=0}function I(L,P){var O,U=T(L);return U?U[E]=P:(O=h.indexOf(L),O>=0?R[O]=P:(O=h.length,R[O]=P,h[O]=L)),this}function F(L){var P=T(L),O,U;return P?E in P&&delete P[E]:(O=h.indexOf(L),O<0?!1:(U=h.length-1,h[O]=void 0,R[O]=R[U],h[O]=h[U],h.length=U,R.length=U,!0))}return Object.create(k.prototype,{get___:{value:d(D)},has___:{value:d(N)},set___:{value:d(I)},delete___:{value:d(F)}})};k.prototype=Object.create(Object.prototype,{get:{value:function(R,E){return this.get___(R,E)},writable:!0,configurable:!0},has:{value:function(R){return this.has___(R)},writable:!0,configurable:!0},set:{value:function(R,E){return this.set___(R,E)},writable:!0,configurable:!0},delete:{value:function(R){return this.delete___(R)},writable:!0,configurable:!0}}),typeof u=="function"?function(){l&&typeof Proxy!="undefined"&&(Proxy=void 0);function h(){this instanceof k||p();var R=new u,E=void 0,D=!1;function N(P,O){return E?R.has(P)?R.get(P):E.get___(P,O):R.get(P,O)}function I(P){return R.has(P)||(E?E.has___(P):!1)}var F;l?F=function(P,O){return R.set(P,O),R.has(P)||(E||(E=new k),E.set(P,O)),this}:F=function(P,O){if(D)try{R.set(P,O)}catch(U){E||(E=new k),E.set___(P,O)}else R.set(P,O);return this};function L(P){var O=!!R.delete(P);return E&&E.delete___(P)||O}return Object.create(k.prototype,{get___:{value:d(N)},has___:{value:d(I)},set___:{value:d(F)},delete___:{value:d(L)},permitHostObjects___:{value:d(function(P){if(P===i)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}h.prototype=k.prototype,a.exports=h,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=k)})()},236:function(a,o,i){var l=i(8284);a.exports=u;function u(){var s={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var v=f.valueOf(s);return v&&v.identity===s?v:l(f,s)}}},8284:function(a){a.exports=o;function o(i,l){var u={identity:l},s=i.valueOf;return Object.defineProperty(i,"valueOf",{value:function(f){return f!==l?s.apply(this,arguments):u},writable:!0}),u}},606:function(a,o,i){var l=i(236);a.exports=u;function u(){var s=l();return{get:function(f,v){var g=s(f);return g.hasOwnProperty("value")?g.value:v},set:function(f,v){return s(f).value=v,this},has:function(f){return"value"in s(f)},delete:function(f){return delete s(f).value}}}},3349:function(a){"use strict";function o(){return function(v,g,b,y,w,M){var m=v[0],A=b[0],S=[0],x=A;y|=0;var T=0,d=A;for(T=0;T=0!=p>=0&&w.push(S[0]+.5+.5*(_+p)/(_-p))}y+=d,++S[0]}}}function i(){return o()}var l=i;function u(v){var g={};return function(y,w,M){var m=y.dtype,A=y.order,S=[m,A.join()].join(),x=g[S];return x||(g[S]=x=v([m,A])),x(y.shape.slice(0),y.data,y.stride,y.offset|0,w,M)}}function s(v){return u(l.bind(void 0,v))}function f(v){return s({funcName:v.funcName})}a.exports=f({funcName:"zeroCrossings"})},781:function(a,o,i){"use strict";a.exports=u;var l=i(3349);function u(s,f){var v=[];return f=+f||0,l(s.hi(s.shape[0]-1),v,f),v}},7790:function(){}},r={};function t(a){var o=r[a];if(o!==void 0)return o.exports;var i=r[a]={id:a,loaded:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}(function(){t.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}}()})(),function(){t.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}}();var n=t(1964);kF.exports=n})()});var CF=pe((Tde,SF)=>{"use strict";SF.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 DF=pe((Ade,RF)=>{"use strict";var EF=CF();RF.exports=oie;var LF={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function oie(e){var r,t=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),EF[e])t=EF[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1),i=o.length,l=i<=4;n=1,l?(t=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],i===4&&(n=parseInt(o[3]+o[3],16)/255)):(t=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],i===8&&(n=parseInt(o[6]+o[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),a="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var u=r[1],s=u==="rgb",o=u.replace(/a$/,"");a=o;var i=o==="cmyk"?4:o==="gray"?1:3;t=r[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(g,b){if(/%$/.test(g))return b===i?parseFloat(g)/100:o==="rgb"?parseFloat(g)*255/100:parseFloat(g);if(o[b]==="h"){if(/deg$/.test(g))return parseFloat(g);if(LF[g]!==void 0)return LF[g]}return parseFloat(g)}),u===o&&t.push(1),n=s||t[i]===void 0?1:t[i],t=t.slice(0,i)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(t=e.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(t=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",t=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",t=[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)):(a="rgb",t=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:t,alpha:n}}});var FF=pe((kde,PF)=>{"use strict";PF.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var NF=pe((Sde,IF)=>{"use strict";var lie=FF();IF.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var r=e[0]/360,t=e[1]/100,n=e[2]/100,a,o,i,l,u;if(t===0)return u=n*255,[u,u,u];n<.5?o=n*(1+t):o=n+t-n*t,a=2*n-o,l=[0,0,0];for(var s=0;s<3;s++)i=r+1/3*-(s-1),i<0?i++:i>1&&i--,6*i<1?u=a+(o-a)*6*i:2*i<1?u=o:3*i<2?u=a+(o-a)*(2/3-i)*6:u=a,l[s]=u*255;return l}};lie.hsl=function(e){var r=e[0]/255,t=e[1]/255,n=e[2]/255,a=Math.min(r,t,n),o=Math.max(r,t,n),i=o-a,l,u,s;return o===a?l=0:r===o?l=(t-n)/i:t===o?l=2+(n-r)/i:n===o&&(l=4+(r-t)/i),l=Math.min(l*60,360),l<0&&(l+=360),s=(a+o)/2,o===a?u=0:s<=.5?u=i/(o+a):u=i/(2-o-a),[l,u*100,s*100]}});var M3=pe((Cde,zF)=>{zF.exports=sie;function sie(e,r,t){return rt?t:e:er?r:e}});var OF=pe((Ede,qF)=>{"use strict";var uie=DF(),fie=NF(),ad=M3();qF.exports=function(r){var t,n,a,o=uie(r);return o.space?(t=Array(3),t[0]=ad(o.values[0],0,255),t[1]=ad(o.values[1],0,255),t[2]=ad(o.values[2],0,255),o.space[0]==="h"&&(t=fie.rgb(t)),t.push(ad(o.alpha,0,1)),t):[]}});var UF=pe((Lde,BF)=>{BF.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 T3=pe((Rde,HF)=>{"use strict";var cie=OF(),id=M3(),vie=UF();HF.exports=function(r,t){(t==="float"||!t)&&(t="array"),t==="uint"&&(t="uint8"),t==="uint_clamped"&&(t="uint8_clamped");var n=vie(t),a=new n(4),o=t!=="uint8"&&t!=="uint8_clamped";return(!r.length||typeof r=="string")&&(r=cie(r),r[0]/=255,r[1]/=255,r[2]/=255),hie(r)?(a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3]!=null?r[3]:255,o&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(o?(a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3]!=null?r[3]:1):(a[0]=id(Math.floor(r[0]*255),0,255),a[1]=id(Math.floor(r[1]*255),0,255),a[2]=id(Math.floor(r[2]*255),0,255),a[3]=r[3]==null?255:id(Math.floor(r[3]*255),0,255)),a)};function hie(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 po=pe((Dde,VF)=>{"use strict";var die=T3();function pie(e){return e?die(e):[0,0,0,1]}VF.exports=pie});var al=pe((Pde,KF)=>{"use strict";var ZF=rt(),gie=ka(),od=T3(),ld=Li(),yie=Ti().defaultLine,GF=ea().isArrayOrTypedArray,A3=od(yie),JF=1;function YF(e,r){var t=e;return t[3]*=r,t}function WF(e){if(ZF(e))return A3;var r=od(e);return r.length?r:A3}function XF(e){return ZF(e)?e:JF}function mie(e,r,t){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=GF(n),o=GF(r),i=ld.extractOpts(e),l=[],u,s,f,v,g;if(i.colorscale!==void 0?u=ld.makeColorScaleFuncFromTrace(e):u=WF,a?s=function(y,w){return y[w]===void 0?A3:od(u(y[w]))}:s=WF,o?f=function(y,w){return y[w]===void 0?JF:XF(y[w])}:f=XF,a||o)for(var b=0;b{"use strict";QF.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 sd=pe((Ide,$F)=>{"use strict";$F.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var eI=pe((Nde,jF)=>{"use strict";var bie=Er();function S3(e,r,t,n){if(!r||!r.visible)return null;for(var a=bie.getComponentMethod("errorbars","makeComputeError")(r),o=new Array(e.length),i=0;i0){var v=n.c2l(s);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else o[i]=[-l[0]*t,l[1]*t]}return o}function _ie(e){for(var r=0;r{"use strict";var Mie=pn().gl_line3d,rI=pn().gl_scatter3d,Tie=pn().gl_error3d,Aie=pn().gl_mesh3d,kie=pn().delaunay_triangulate,go=ir(),oI=po(),ud=al().formatColor,Sie=kg(),C3=k3(),Cie=sd(),Eie=St(),Lie=to().appendArrayPointValue,Rie=eI();function lI(e,r){this.scene=e,this.uid=r,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 L3=lI.prototype;L3.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var r=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&&(go.isArrayOrTypedArray(this.textLabels)?(this.textLabels[r]||this.textLabels[r]===0)&&(e.textLabel=this.textLabels[r]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[r],this.data.y[r],this.data.z[r]],!0}};function Die(e,r,t){var n=(t+1)%3,a=(t+2)%3,o=[],i=[],l;for(l=0;l-1?-1:e.indexOf("right")>-1?1:0}function nI(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function Fie(e){var r=0,t=0,n=[r,t];if(Array.isArray(e))for(var a=0;a=0){var s=Die(l.position,l.delaunayColor,l.delaunayAxis);s.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(s):(s.gl=r,this.delaunayMesh=Aie(s),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)};L3.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 qie(e,r){var t=new lI(e,r.uid);return t.update(r),t}sI.exports=qie});var I3=pe((qde,vI)=>{"use strict";var yo=$l(),Oie=kn(),F3=ja(),R3=ro().axisHoverFormat,Bie=Sa().hovertemplateAttrs,Uie=Sa().texttemplateAttrs,fI=Sn(),Hie=k3(),Vie=sd(),gi=Mt().extendFlat,Gie=zn().overrideAll,cI=Wc(),Yie=yo.line,fs=yo.marker,Wie=fs.line,Xie=gi({width:Yie.width,dash:{valType:"enumerated",values:cI(Hie),dflt:"solid"}},F3("line"));function D3(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 P3=vI.exports=Gie({x:yo.x,y:yo.y,z:{valType:"data_array"},text:gi({},yo.text,{}),texttemplate:Uie({},{}),hovertext:gi({},yo.hovertext,{}),hovertemplate:Bie(),xhoverformat:R3("x"),yhoverformat:R3("y"),zhoverformat:R3("z"),mode:gi({},yo.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:D3("x"),y:D3("y"),z:D3("z")},connectgaps:yo.connectgaps,line:Xie,marker:gi({symbol:{valType:"enumerated",values:cI(Vie),dflt:"circle",arrayOk:!0},size:gi({},fs.size,{dflt:8}),sizeref:fs.sizeref,sizemin:fs.sizemin,sizemode:fs.sizemode,opacity:gi({},fs.opacity,{arrayOk:!1}),colorbar:fs.colorbar,line:gi({width:gi({},Wie.width,{arrayOk:!1})},F3("marker.line"))},F3("marker")),textposition:gi({},yo.textposition,{dflt:"top center"}),textfont:Oie({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:fI.opacity,hoverinfo:gi({},fI.hoverinfo)},"calc","nested");P3.x.editType=P3.y.editType=P3.z.editType="calc+clearAxisTypes"});var pI=pe((Ode,dI)=>{"use strict";var hI=Er(),Zie=ir(),N3=oa(),Jie=em(),Kie=rm(),Qie=tm(),$ie=I3();dI.exports=function(r,t,n,a){function o(b,y){return Zie.coerce(r,t,$ie,b,y)}var i=jie(r,t,o,a);if(!i){t.visible=!1;return}o("text"),o("hovertext"),o("hovertemplate"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),o("mode"),N3.hasMarkers(t)&&Jie(r,t,n,a,o,{noSelect:!0,noAngle:!0}),N3.hasLines(t)&&(o("connectgaps"),Kie(r,t,n,a,o)),N3.hasText(t)&&(o("texttemplate"),Qie(r,t,a,o,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var l=(t.line||{}).color,u=(t.marker||{}).color;o("surfaceaxis")>=0&&o("surfacecolor",l||u);for(var s=["x","y","z"],f=0;f<3;++f){var v="projection."+s[f];o(v+".show")&&(o(v+".opacity"),o(v+".scale"))}var g=hI.getComponentMethod("errorbars","supplyDefaults");g(r,t,l||u||n,{axis:"z"}),g(r,t,l||u||n,{axis:"y",inherit:"z"}),g(r,t,l||u||n,{axis:"x",inherit:"z"})};function jie(e,r,t,n){var a=0,o=t("x"),i=t("y"),l=t("z"),u=hI.getComponentMethod("calendars","handleTraceDefaults");return u(e,r,["x","y","z"],n),o&&i&&l&&(a=Math.min(o.length,i.length,l.length),r._length=r._xlength=r._ylength=r._zlength=a),a}});var yI=pe((Bde,gI)=>{"use strict";var eoe=g1(),roe=im();gI.exports=function(r,t){var n=[{x:!1,y:!1,trace:t,t:{}}];return eoe(n,t),roe(r,t),n}});var xI=pe((Ude,mI)=>{mI.exports=toe;function toe(e,r){if(typeof e!="string")throw new TypeError("must specify type string");if(r=r||{},typeof document=="undefined"&&!r.canvas)return null;var t=r.canvas||document.createElement("canvas");typeof r.width=="number"&&(t.width=r.width),typeof r.height=="number"&&(t.height=r.height);var n=r,a;try{var o=[e];e.indexOf("webgl")===0&&o.push("experimental-"+e);for(var i=0;i{var noe=xI();bI.exports=function(r){return noe("webgl",r)}});var TI=pe((Vde,MI)=>{"use strict";var wI=Zr(),aoe=function(){};MI.exports=function(r){for(var t in r)typeof r[t]=="function"&&(r[t]=aoe);r.destroy=function(){r.container.parentNode.removeChild(r.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=wI.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=wI.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),r.container.appendChild(n),r.container.style.background="#FFFFFF",r.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var SI=pe((Gde,kI)=>{"use strict";var cs=po(),ioe=ir(),ooe=["xaxis","yaxis","zaxis"];function AI(){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 loe=AI.prototype;loe.merge=function(e,r){for(var t=this,n=0;n<3;++n){var a=r[ooe[n]];if(!a.visible){t.tickEnable[n]=!1,t.labelEnable[n]=!1,t.lineEnable[n]=!1,t.lineTickEnable[n]=!1,t.gridEnable[n]=!1,t.zeroEnable[n]=!1,t.backgroundEnable[n]=!1;continue}t.labels[n]=e._meta?ioe.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(t.labelColor[n]=cs(a.title.font.color)),a.title.font.family&&(t.labelFont[n]=a.title.font.family),a.title.font.size&&(t.labelSize[n]=a.title.font.size),a.title.font.weight&&(t.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(t.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(t.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(t.lineEnable[n]=a.showline),"linecolor"in a&&(t.lineColor[n]=cs(a.linecolor)),"linewidth"in a&&(t.lineWidth[n]=a.linewidth),"showgrid"in a&&(t.gridEnable[n]=a.showgrid),"gridcolor"in a&&(t.gridColor[n]=cs(a.gridcolor)),"gridwidth"in a&&(t.gridWidth[n]=a.gridwidth),a.type==="log"?t.zeroEnable[n]=!1:"zeroline"in a&&(t.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(t.zeroLineColor[n]=cs(a.zerolinecolor)),"zerolinewidth"in a&&(t.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?t.lineTickEnable[n]=!0:t.lineTickEnable[n]=!1,"ticklen"in a&&(t.lineTickLength[n]=t._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(t.lineTickColor[n]=cs(a.tickcolor)),"tickwidth"in a&&(t.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(t.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(t.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(t.tickColor[n]=cs(a.tickfont.color)),a.tickfont.family&&(t.tickFont[n]=a.tickfont.family),a.tickfont.size&&(t.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(t.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(t.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(t.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(t.lineTickMirror[n]=!0,t.lineMirror[n]=!0):a.mirror===!0?(t.lineTickMirror[n]=!1,t.lineMirror[n]=!0):(t.lineTickMirror[n]=!1,t.lineMirror[n]=!1):t.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(t.backgroundEnable[n]=!0,t.backgroundColor[n]=cs(a.backgroundcolor)):t.backgroundEnable[n]=!1}};function soe(e,r){var t=new AI;return t.merge(e,r),t}kI.exports=soe});var LI=pe((Yde,EI)=>{"use strict";var uoe=po(),foe=["xaxis","yaxis","zaxis"];function CI(){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 coe=CI.prototype;coe.merge=function(e){for(var r=0;r<3;++r){var t=e[foe[r]];if(!t.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=t.showspikes,this.colors[r]=uoe(t.spikecolor),this.drawSides[r]=t.spikesides,this.lineWidth[r]=t.spikethickness}};function voe(e){var r=new CI;return r.merge(e),r}EI.exports=voe});var PI=pe((Wde,DI)=>{"use strict";DI.exports=yoe;var RI=St(),hoe=ir(),doe=["xaxis","yaxis","zaxis"],poe=[0,0,0];function goe(e){for(var r=new Array(3),t=0;t<3;++t){for(var n=e[t],a=new Array(n.length),o=0;o/g," "));a[o]=s,i.tickmode=l}}r.ticks=a;for(var o=0;o<3;++o){poe[o]=.5*(e.glplot.bounds[0][o]+e.glplot.bounds[1][o]);for(var f=0;f<2;++f)r.bounds[f][o]=e.glplot.bounds[f][o]}e.contourLevels=goe(a)}});var BI=pe((Xde,OI)=>{"use strict";var NI=pn().gl_plot3d,moe=NI.createCamera,FI=NI.createScene,xoe=_I(),boe=Zv(),vd=Er(),Jn=ir(),cd=Jn.preserveDrawingBuffer(),hd=St(),yi=io(),_oe=po(),woe=TI(),Moe=Um(),Toe=SI(),Aoe=LI(),koe=PI(),Soe=$s().applyAutorangeOptions,N0,fd,zI=!1;function qI(e,r){var t=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",t.appendChild(a),this.svgContainer=a,t.id=e.id,t.style.position="absolute",t.style.top=t.style.left="0px",t.style.width=t.style.height="100%",n.appendChild(t),this.fullLayout=r,this.id=e.id||"scene",this.fullSceneLayout=r[this.id],this.plotArgs=[[],{},{}],this.axesOptions=Toe(r,r[this.id]),this.spikeOptions=Aoe(r[this.id]),this.container=t,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=vd.getComponentMethod("annotations3d","convert"),this.drawAnnotations=vd.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Rn=qI.prototype;Rn.prepareOptions=function(){var e=this,r={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:cd,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(!fd&&(N0=document.createElement("canvas"),fd=xoe({canvas:N0,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!fd))throw new Error("error creating static canvas/context for image server");r.gl=fd,r.canvas=N0}return r};var II=!0;Rn.tryCreatePlot=function(){var e=this,r=e.prepareOptions(),t=!0;try{e.glplot=FI(r)}catch(n){if(e.staticMode||!II||cd)t=!1;else{Jn.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{cd=r.glOptions.preserveDrawingBuffer=!0,e.glplot=FI(r)}catch(a){cd=r.glOptions.preserveDrawingBuffer=!1,t=!1}}}return II=!1,t};Rn.initializeGLCamera=function(){var e=this,r=e.fullSceneLayout.camera,t=r.projection.type==="orthographic";e.camera=moe(e.container,{center:[r.center.x,r.center.y,r.center.z],eye:[r.eye.x,r.eye.y,r.eye.z],up:[r.up.x,r.up.y,r.up.z],_ortho:t,zoomMin:.01,zoomMax:100,mode:"orbit"})};Rn.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var r=e.tryCreatePlot();if(!r)return woe(e);e.traces={},e.make4thDimension();var t=e.graphDiv,n=t.layout,a=function(){var i={};return e.isCameraChanged(n)&&(i[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(i[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=i[e.id+".aspectmode"]="manual")),i},o=function(i){if(i.fullSceneLayout.dragmode!==!1){var l=a();i.saveLayout(n),i.graphDiv.emit("plotly_relayout",l)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){o(e)}),e.glplot.canvas.addEventListener("touchstart",function(){zI=!0}),e.glplot.canvas.addEventListener("wheel",function(i){if(t._context._scrollZoom.gl3d){if(e.camera._ortho){var l=i.deltaX>i.deltaY?1.1:.9090909090909091,u=e.glplot.getAspectratio();e.glplot.setAspectratio({x:l*u.x,y:l*u.y,z:l*u.z})}o(e)}},boe?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var i=a();e.graphDiv.emit("plotly_relayouting",i)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(i){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:i,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Rn.render=function(){var e=this,r=e.graphDiv,t,n=e.svgContainer,a=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY,l=a.width*o,u=a.height*i;n.setAttributeNS(null,"viewBox","0 0 "+l+" "+u),n.setAttributeNS(null,"width",l),n.setAttributeNS(null,"height",u),koe(e),e.glplot.axes.update(e.axesOptions);for(var s=Object.keys(e.traces),f=null,v=e.glplot.selection,g=0;g")):t.type==="isosurface"||t.type==="volume"?(m.valueLabel=hd.hoverLabelText(e._mockAxis,e._mockAxis.d2l(v.traceCoordinate[3]),t.valuehoverformat),d.push("value: "+m.valueLabel),v.textLabel&&d.push(v.textLabel),T=d.join("
")):T=v.textLabel;var _={x:v.traceCoordinate[0],y:v.traceCoordinate[1],z:v.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:M};yi.appendArrayPointValue(_,w,M),t._module.eventData&&(_=w._module.eventData(_,v,w,{},M));var p={points:[_]};if(e.fullSceneLayout.hovermode){var c=[];yi.loneHover({trace:w,x:(.5+.5*y[0]/y[3])*l,y:(.5-.5*y[1]/y[3])*u,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:T,name:f.name,color:yi.castHoverOption(w,M,"bgcolor")||f.color,borderColor:yi.castHoverOption(w,M,"bordercolor"),fontFamily:yi.castHoverOption(w,M,"font.family"),fontSize:yi.castHoverOption(w,M,"font.size"),fontColor:yi.castHoverOption(w,M,"font.color"),nameLength:yi.castHoverOption(w,M,"namelength"),textAlign:yi.castHoverOption(w,M,"align"),hovertemplate:Jn.castOption(w,M,"hovertemplate"),hovertemplateLabels:Jn.extendFlat({},_,m),eventData:[_]},{container:n,gd:r,inOut_bbox:c}),_.bbox=c[0]}v.distance<5&&(v.buttons||zI)?r.emit("plotly_click",p):r.emit("plotly_hover",p),this.oldEventData=p}else yi.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Rn.recoverContext=function(){var e=this;e.glplot.dispose();var r=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(r);return}if(!e.initializeGLPlot()){Jn.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(r)};var z0=["xaxis","yaxis","zaxis"];function Coe(e,r,t){for(var n=e.fullSceneLayout,a=0;a<3;a++){var o=z0[a],i=o.charAt(0),l=n[o],u=r[i],s=r[i+"calendar"],f=r["_"+i+"length"];if(!Jn.isArrayOrTypedArray(u))t[0][a]=Math.min(t[0][a],0),t[1][a]=Math.max(t[1][a],f-1);else for(var v,g=0;g<(f||u.length);g++)if(Jn.isArrayOrTypedArray(u[g]))for(var b=0;bw[1][i])w[0][i]=-1,w[1][i]=1;else{var h=w[1][i]-w[0][i];w[0][i]-=h/32,w[1][i]+=h/32}if(A=[w[0][i],w[1][i]],A=Soe(A,u),w[0][i]=A[0],w[1][i]=A[1],u.isReversed()){var R=w[0][i];w[0][i]=w[1][i],w[1][i]=R}}else A=u.range,w[0][i]=u.r2l(A[0]),w[1][i]=u.r2l(A[1]);w[0][i]===w[1][i]&&(w[0][i]-=1,w[1][i]+=1),M[i]=w[1][i]-w[0][i],u.range=[w[0][i],w[1][i]],u.limitRange(),n.glplot.setBounds(i,{min:u.range[0]*b[i],max:u.range[1]*b[i]})}var E,D=f.aspectmode;if(D==="cube")E=[1,1,1];else if(D==="manual"){var N=f.aspectratio;E=[N.x,N.y,N.z]}else if(D==="auto"||D==="data"){var I=[1,1,1];for(i=0;i<3;++i){u=f[z0[i]],s=u.type;var F=m[s];I[i]=Math.pow(F.acc,1/F.count)/b[i]}D==="data"||Math.max.apply(null,I)/Math.min.apply(null,I)<=4?E=I:E=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");f.aspectratio.x=v.aspectratio.x=E[0],f.aspectratio.y=v.aspectratio.y=E[1],f.aspectratio.z=v.aspectratio.z=E[2],n.glplot.setAspectratio(f.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:f.aspectratio.x,y:f.aspectratio.y,z:f.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=f.aspectmode);var L=f.domain||null,P=r._size||null;if(L&&P){var O=n.container.style;O.position="absolute",O.left=P.l+L.x[0]*P.w+"px",O.top=P.t+(1-L.y[1])*P.h+"px",O.width=P.w*(L.x[1]-L.x[0])+"px",O.height=P.h*(L.y[1]-L.y[0])+"px"}n.glplot.redraw()}};Rn.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 Loe(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 Roe(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"}}}Rn.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),Roe(e.camera)};Rn.setViewport=function(e){var r=this,t=e.camera;r.camera.lookAt.apply(this,Loe(t)),r.glplot.setAspectratio(e.aspectratio);var n=t.projection.type==="orthographic",a=r.camera._ortho;n!==a&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())};Rn.isCameraChanged=function(e){var r=this,t=r.getCamera(),n=Jn.nestedProperty(e,r.id+".camera"),a=n.get();function o(s,f,v,g){var b=["up","center","eye"],y=["x","y","z"];return f[b[v]]&&s[b[v]][y[g]]===f[b[v]][y[g]]}var i=!1;if(a===void 0)i=!0;else{for(var l=0;l<3;l++)for(var u=0;u<3;u++)if(!o(t,a,l,u)){i=!0;break}(!a.projection||t.projection&&t.projection.type!==a.projection.type)&&(i=!0)}return i};Rn.isAspectChanged=function(e){var r=this,t=r.glplot.getAspectratio(),n=Jn.nestedProperty(e,r.id+".aspectratio"),a=n.get();return a===void 0||a.x!==t.x||a.y!==t.y||a.z!==t.z};Rn.saveLayout=function(e){var r=this,t=r.fullLayout,n,a,o,i,l,u,s=r.isCameraChanged(e),f=r.isAspectChanged(e),v=s||f;if(v){var g={};if(s&&(n=r.getCamera(),a=Jn.nestedProperty(e,r.id+".camera"),o=a.get(),g[r.id+".camera"]=o),f&&(i=r.glplot.getAspectratio(),l=Jn.nestedProperty(e,r.id+".aspectratio"),u=l.get(),g[r.id+".aspectratio"]=u),vd.call("_storeDirectGUIEdit",e,t._preGUI,g),s){a.set(n);var b=Jn.nestedProperty(t,r.id+".camera");b.set(n)}if(f){l.set(i);var y=Jn.nestedProperty(t,r.id+".aspectratio");y.set(i),r.glplot.redraw()}}return v};Rn.updateFx=function(e,r){var t=this,n=t.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 a=t.graphDiv,o=a._fullLayout,i=t.fullSceneLayout.camera,l=i.up.x,u=i.up.y,s=i.up.z;if(s/Math.sqrt(l*l+u*u+s*s)<.999){var f=t.id+".camera.up",v={x:0,y:0,z:1},g={};g[f]=v;var b=a.layout;vd.call("_storeDirectGUIEdit",b,o._preGUI,g),i.up=v,Jn.nestedProperty(b,f).set(v)}}else n.keyBindingMode=e;t.fullSceneLayout.hovermode=r};function Doe(e,r,t){for(var n=0,a=t-1;n0)for(var l=255/i,u=0;u<3;++u)e[o+u]=Math.min(l*e[o+u],255)}}Rn.toImage=function(e){var r=this;e||(e="png"),r.staticMode&&r.container.appendChild(N0),r.glplot.redraw();var t=r.glplot.gl,n=t.drawingBufferWidth,a=t.drawingBufferHeight;t.bindFramebuffer(t.FRAMEBUFFER,null);var o=new Uint8Array(n*a*4);t.readPixels(0,0,n,a,t.RGBA,t.UNSIGNED_BYTE,o),Doe(o,n,a),Poe(o,n,a);var i=document.createElement("canvas");i.width=n,i.height=a;var l=i.getContext("2d",{willReadFrequently:!0}),u=l.createImageData(n,a);u.data.set(o),l.putImageData(u,0,0);var s;switch(e){case"jpeg":s=i.toDataURL("image/jpeg");break;case"webp":s=i.toDataURL("image/webp");break;default:s=i.toDataURL("image/png")}return r.staticMode&&r.container.removeChild(N0),s};Rn.setConvert=function(){for(var e=this,r=0;r<3;r++){var t=e.fullSceneLayout[z0[r]];hd.setConvert(t,e.fullLayout),t.setScale=Jn.noop}};Rn.make4thDimension=function(){var e=this,r=e.graphDiv,t=r._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},hd.setConvert(e._mockAxis,t)};OI.exports=qI});var HI=pe((Zde,UI)=>{"use strict";UI.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var q3=pe((Jde,VI)=>{"use strict";var Foe=Zr(),Br=Ra(),z3=Mt().extendFlat,Ioe=zn().overrideAll;VI.exports=Ioe({visible:Br.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:Foe.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Br.color,categoryorder:Br.categoryorder,categoryarray:Br.categoryarray,title:{text:Br.title.text,font:Br.title.font},type:z3({},Br.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Br.autotypenumbers,autorange:Br.autorange,autorangeoptions:{minallowed:Br.autorangeoptions.minallowed,maxallowed:Br.autorangeoptions.maxallowed,clipmin:Br.autorangeoptions.clipmin,clipmax:Br.autorangeoptions.clipmax,include:Br.autorangeoptions.include,editType:"plot"},rangemode:Br.rangemode,minallowed:Br.minallowed,maxallowed:Br.maxallowed,range:z3({},Br.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Br.minor.tickmode,nticks:Br.nticks,tick0:Br.tick0,dtick:Br.dtick,tickvals:Br.tickvals,ticktext:Br.ticktext,ticks:Br.ticks,mirror:Br.mirror,ticklen:Br.ticklen,tickwidth:Br.tickwidth,tickcolor:Br.tickcolor,showticklabels:Br.showticklabels,labelalias:Br.labelalias,tickfont:Br.tickfont,tickangle:Br.tickangle,tickprefix:Br.tickprefix,showtickprefix:Br.showtickprefix,ticksuffix:Br.ticksuffix,showticksuffix:Br.showticksuffix,showexponent:Br.showexponent,exponentformat:Br.exponentformat,minexponent:Br.minexponent,separatethousands:Br.separatethousands,tickformat:Br.tickformat,tickformatstops:Br.tickformatstops,hoverformat:Br.hoverformat,showline:Br.showline,linecolor:Br.linecolor,linewidth:Br.linewidth,showgrid:Br.showgrid,gridcolor:z3({},Br.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Br.gridwidth,zeroline:Br.zeroline,zerolinecolor:Br.zerolinecolor,zerolinewidth:Br.zerolinewidth},"plot","from-root")});var H3=pe((Kde,GI)=>{"use strict";var O3=q3(),Noe=$1().attributes,B3=Mt().extendFlat,zoe=ir().counterRegex;function U3(e,r,t){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}GI.exports={_arrayAttrRegexps:[zoe("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:B3(U3(0,0,1),{}),center:B3(U3(0,0,0),{}),eye:B3(U3(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:Noe({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:O3,yaxis:O3,zaxis:O3,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 WI=pe((Qde,YI)=>{"use strict";var qoe=ir(),Ooe=gt(),Boe=$1().defaults;YI.exports=function(r,t,n,a){var o=a.type,i=a.attributes,l=a.handleDefaults,u=a.partition||"x",s=t._subplots[o],f=s.length,v=f&&s[0].replace(/\d+$/,""),g,b;function y(A,S){return qoe.coerce(g,b,i,A,S)}for(var w=0;w{"use strict";var Uoe=ka().mix,XI=ir(),Hoe=gt(),Voe=q3(),Goe=Mm(),Yoe=T1(),ZI=["xaxis","yaxis","zaxis"],Woe=100*136/187;JI.exports=function(r,t,n){var a,o;function i(s,f){return XI.coerce(a,o,Voe,s,f)}for(var l=0;l{"use strict";var Xoe=ir(),Zoe=Zr(),Joe=Er(),Koe=WI(),Qoe=KI(),QI=H3(),$oe=_f().getSubplotData,$I="gl3d";jI.exports=function(r,t,n){var a=t._basePlotModules.length>1;function o(i){if(!a){var l=Xoe.validate(r[i],QI[i]);if(l)return r[i]}}Koe(r,t,n,{type:$I,attributes:QI,handleDefaults:joe,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:o,autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})};function joe(e,r,t,n){for(var a=t("bgcolor"),o=Zoe.combine(a,n.paper_bgcolor),i=["up","center","eye"],l=0;l.999)&&(g="turntable")}else g="turntable";t("dragmode",g),t("hovermode",n.getDfltFromLayout("hovermode"))}});var il=pe(Kn=>{"use strict";var ele=zn().overrideAll,rle=_l(),tle=BI(),nle=_f().getSubplotData,ale=ir(),ile=Io(),qu="gl3d",V3="scene";Kn.name=qu;Kn.attr=V3;Kn.idRoot=V3;Kn.idRegex=Kn.attrRegex=ale.counterRegex("scene");Kn.attributes=HI();Kn.layoutAttributes=H3();Kn.baseLayoutAttrOverrides=ele({hoverlabel:rle.hoverlabel},"plot","nested");Kn.supplyLayoutDefaults=eN();Kn.plot=function(r){for(var t=r._fullLayout,n=r._fullData,a=t._subplots[qu],o=0;o{"use strict";rN.exports={plot:uI(),attributes:I3(),markerSymbols:sd(),supplyDefaults:pI(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:yI(),moduleType:"trace",name:"scatter3d",basePlotModule:il(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var aN=pe((tpe,nN)=>{"use strict";nN.exports=tN()});var q0=pe((npe,lN)=>{"use strict";var iN=Zr(),ole=ja(),G3=ro().axisHoverFormat,lle=Sa().hovertemplateAttrs,oN=Sn(),Y3=Mt().extendFlat,sle=zn().overrideAll;function W3(e){return{valType:"boolean",dflt:!1}}function X3(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:W3("x"),y:W3("y"),z:W3("z")},color:{valType:"color",dflt:iN.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:iN.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var Z3=lN.exports=sle(Y3({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:lle(),xhoverformat:G3("x"),yhoverformat:G3("y"),zhoverformat:G3("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},ole("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:X3("x"),y:X3("y"),z:X3("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:Y3({},oN.hoverinfo),showlegend:Y3({},oN.showlegend,{dflt:!1})}),"calc","nested");Z3.x.editType=Z3.y.editType=Z3.z.editType="calc+clearAxisTypes"});var K3=pe((ape,fN)=>{"use strict";var ule=Er(),sN=ir(),fle=Ei(),cle=q0(),J3=.1;function vle(e,r){for(var t=[],n=32,a=0;a{"use strict";var cN=zo();vN.exports=function(r,t){t.surfacecolor?cN(r,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):cN(r,t,{vals:t.z,containerStr:"",cLetter:"c"})}});var yN=pe((ope,gN)=>{"use strict";var ple=ir(),dN=.01,gle=[[-1,0],[1,0],[0,-1],[0,1]];function yle(e){return .5-.25*Math.min(1,e*.5)}gN.exports=function(r,t){var n=1,a;for(pN(r,t),a=0;adN;a++)n=pN(r,t,yle(n));return n>dN&&ple.log("interp2d didn't converge quickly",n),r};function pN(e,r,t){var n=0,a,o,i,l,u,s,f,v,g,b,y,w,M;for(l=0;lw&&(n=Math.max(n,Math.abs(e[o][i]-y)/(M-w))))}return n}});var xN=pe((lpe,mN)=>{"use strict";var mle=ir().maxRowLength;mN.exports=function(r){var t=[],n={},a=[],o=r[0],i=[],l=[0,0,0],u=mle(r),s,f,v,g,b,y,w,M;for(f=0;f=0;b--)g=a[b],f=g[0],v=g[1],y=((n[[f-1,v]]||l)[2]+(n[[f+1,v]]||l)[2]+(n[[f,v-1]]||l)[2]+(n[[f,v+1]]||l)[2])/20,y&&(w[g]=[f,v,y],a.splice(b,1),M=!0);if(!M)throw"findEmpties iterated with no new neighbors";for(g in w)n[g]=w[g],t.push(w[g])}return t.sort(function(m,A){return A[2]-m[2]})}});var AN=pe((spe,TN)=>{"use strict";var xle=pn().gl_surface3d,Ou=pn().ndarray,ble=pn().ndarray_linear_interpolate.d2,_le=yN(),wle=xN(),O0=ir().isArrayOrTypedArray,Mle=al().parseColorScale,bN=po(),Tle=Li().extractOpts;function wN(e,r,t){this.scene=e,this.uid=t,this.surface=r,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 mi=wN.prototype;mi.getXat=function(e,r,t,n){var a=O0(this.data.x)?O0(this.data.x[0])?this.data.x[r][e]:this.data.x[e]:e;return t===void 0?a:n.d2l(a,0,t)};mi.getYat=function(e,r,t,n){var a=O0(this.data.y)?O0(this.data.y[0])?this.data.y[r][e]:this.data.y[r]:r;return t===void 0?a:n.d2l(a,0,t)};mi.getZat=function(e,r,t,n){var a=this.data.z[r][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[r][e]),t===void 0?a:n.d2l(a,0,t)};mi.handlePick=function(e){if(e.object===this.surface){var r=(e.data.index[0]-1)/this.dataScaleX-1,t=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(r),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(t),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var o=0;o<3;o++){var i=e.dataCoordinate[o];i!=null&&(e.dataCoordinate[o]*=this.scene.dataScale[o])}var l=this.data.hovertext||this.data.text;return O0(l)&&l[a]&&l[a][n]!==void 0?e.textLabel=l[a][n]:l?e.textLabel=l:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function Ale(e){var r=e[0].rgb,t=e[e.length-1].rgb;return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]}var Bu=[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 kle(e,r){if(e0){t=Bu[n];break}return t}function Cle(e,r){if(!(e<1||r<1)){for(var t=Q3(e),n=Q3(r),a=1,o=0;odd;)n--,n/=Sle(n),n++,n<_N&&(n=dd);var a=Math.round(n/e);return a>1?a:1};function Lle(e,r,t){var n=t[8]+t[2]*r[0]+t[5]*r[1];return e[0]=(t[6]+t[0]*r[0]+t[3]*r[1])/n,e[1]=(t[7]+t[1]*r[0]+t[4]*r[1])/n,e}function Rle(e,r,t){return Dle(e,r,Lle,t),e}function Dle(e,r,t,n){for(var a=[0,0],o=e.shape[0],i=e.shape[1],l=0;l0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(r[n]=!0,a=this.contourStart[n];ag&&(this.minValues[s]=g),this.maxValues[s]{"use strict";kN.exports={attributes:q0(),supplyDefaults:K3().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:hN(),plot:AN(),moduleType:"trace",name:"surface",basePlotModule:il(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var EN=pe((fpe,CN)=>{"use strict";CN.exports=SN()});var Uu=pe((cpe,RN)=>{"use strict";var Ile=ja(),$3=ro().axisHoverFormat,Nle=Sa().hovertemplateAttrs,ol=q0(),LN=Sn(),ll=Mt().extendFlat;RN.exports=ll({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:Nle({editType:"calc"}),xhoverformat:$3("x"),yhoverformat:$3("y"),zhoverformat:$3("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"}},Ile("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:ol.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ll({},ol.contours.x.show,{}),color:ol.contours.x.color,width:ol.contours.x.width,editType:"calc"},lightposition:{x:ll({},ol.lightposition.x,{dflt:1e5}),y:ll({},ol.lightposition.y,{dflt:1e5}),z:ll({},ol.lightposition.z,{dflt:0}),editType:"calc"},lighting:ll({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},ol.lighting),hoverinfo:ll({},LN.hoverinfo,{editType:"calc"}),showlegend:ll({},LN.showlegend,{dflt:!1})})});var gd=pe((vpe,PN)=>{"use strict";var zle=ja(),pd=ro().axisHoverFormat,qle=Sa().hovertemplateAttrs,B0=Uu(),DN=Sn(),j3=Mt().extendFlat,Ole=zn().overrideAll;function e5(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function r5(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var Hu=PN.exports=Ole(j3({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:e5("x"),y:e5("y"),z:e5("z")},caps:{x:r5("x"),y:r5("y"),z:r5("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:qle(),xhoverformat:pd("x"),yhoverformat:pd("y"),zhoverformat:pd("z"),valuehoverformat:pd("value",1),showlegend:j3({},DN.showlegend,{dflt:!1})},zle("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:B0.opacity,lightposition:B0.lightposition,lighting:B0.lighting,flatshading:B0.flatshading,contour:B0.contour,hoverinfo:j3({},DN.hoverinfo)}),"calc","nested");Hu.flatshading.dflt=!0;Hu.lighting.facenormalsepsilon.dflt=0;Hu.x.editType=Hu.y.editType=Hu.z.editType=Hu.value.editType="calc+clearAxisTypes"});var t5=pe((hpe,IN)=>{"use strict";var Ble=ir(),Ule=Er(),Hle=gd(),Vle=Ei();function Gle(e,r,t,n){function a(o,i){return Ble.coerce(e,r,Hle,o,i)}FN(e,r,t,n,a)}function FN(e,r,t,n,a){var o=a("isomin"),i=a("isomax");i!=null&&o!==void 0&&o!==null&&o>i&&(r.isomin=null,r.isomax=null);var l=a("x"),u=a("y"),s=a("z"),f=a("value");if(!l||!l.length||!u||!u.length||!s||!s.length||!f||!f.length){r.visible=!1;return}var v=Ule.getComponentMethod("calendars","handleTraceDefaults");v(e,r,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(w){a(w+"hoverformat");var M="caps."+w,m=a(M+".show");m&&a(M+".fill");var A="slices."+w,S=a(A+".show");S&&(a(A+".fill"),a(A+".locations"))});var g=a("spaceframe.show");g&&a("spaceframe.fill");var b=a("surface.show");b&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var y=a("contour.show");y&&(a("contour.color"),a("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(w){a(w)}),Vle(e,r,n,a,{prefix:"",cLetter:"c"}),r._length=null}IN.exports={supplyDefaults:Gle,supplyIsoDefaults:FN}});var yd=pe((dpe,zN)=>{"use strict";var a5=ir(),Yle=zo();function Wle(e,r){r._len=Math.min(r.u.length,r.v.length,r.w.length,r.x.length,r.y.length,r.z.length),r._u=Hi(r.u,r._len),r._v=Hi(r.v,r._len),r._w=Hi(r.w,r._len),r._x=Hi(r.x,r._len),r._y=Hi(r.y,r._len),r._z=Hi(r.z,r._len);var t=NN(r);r._gridFill=t.fill,r._Xs=t.Xs,r._Ys=t.Ys,r._Zs=t.Zs,r._len=t.len;var n=0,a,o,i;r.starts&&(a=Hi(r.starts.x||[]),o=Hi(r.starts.y||[]),i=Hi(r.starts.z||[]),n=Math.min(a.length,o.length,i.length)),r._startsX=a||[],r._startsY=o||[],r._startsZ=i||[];var l=0,u=1/0,s;for(s=0;s1&&(S=r[a-1],T=t[a-1],_=n[a-1]),o=0;oS?"-":"+")+"x"),y=y.replace("y",(x>T?"-":"+")+"y"),y=y.replace("z",(d>_?"-":"+")+"z");var h=function(){a=0,p=[],c=[],k=[]};(!a||a{"use strict";var Xle=zo(),Zle=yd().processGrid,md=yd().filter;qN.exports=function(r,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=md(t.x,t._len),t._y=md(t.y,t._len),t._z=md(t.z,t._len),t._value=md(t.value,t._len);var n=Zle(t);t._gridFill=n.fill,t._Xs=n.Xs,t._Ys=n.Ys,t._Zs=n.Zs,t._len=n.len;for(var a=1/0,o=-1/0,i=0;i{"use strict";ON.exports=function(r,t,n,a){a=a||r.length;for(var o=new Array(a),i=0;i{"use strict";var Jle=pn().gl_mesh3d,Kle=al().parseColorScale,Qle=ir().isArrayOrTypedArray,$le=po(),jle=Li().extractOpts,BN=Vu(),U0=function(e,r){for(var t=r.length-1;t>0;t--){var n=Math.min(r[t],r[t-1]),a=Math.max(r[t],r[t-1]);if(a>n&&n-1}function U(ce,ye){return ce===null?ye:ce}function X(ce,ye,Le){h();var me=[ye],he=[Le];if(F>=1)me=[ye],he=[Le];else if(F>0){var be=P(ye,Le);me=be.xyzv,he=be.abc}for(var Se=0;Se-1?Le[Fe]:k(Je,Ye,Ge);we>-1?ze[Fe]=we:ze[Fe]=E(Je,Ye,Ge,U(ce,We))}D(ze[0],ze[1],ze[2])}}function j(ce,ye,Le){var me=function(he,be,Se){X(ce,[ye[he],ye[be],ye[Se]],[Le[he],Le[be],Le[Se]])};me(0,1,2),me(2,3,0)}function $(ce,ye,Le){var me=function(he,be,Se){X(ce,[ye[he],ye[be],ye[Se]],[Le[he],Le[be],Le[Se]])};me(0,1,2),me(3,0,1),me(2,3,0),me(1,2,3)}function Y(ce,ye,Le,me){var he=ce[3];heme&&(he=me);for(var be=(ce[3]-he)/(ce[3]-ye[3]+1e-9),Se=[],ze=0;ze<4;ze++)Se[ze]=(1-be)*ce[ze]+be*ye[ze];return Se}function q(ce,ye,Le){return ce>=ye&&ce<=Le}function Z(ce){var ye=.001*(T-x);return ce>=x-ye&&ce<=T+ye}function ne(ce){for(var ye=[],Le=0;Le<4;Le++){var me=ce[Le];ye.push([e._x[me],e._y[me],e._z[me],e._value[me]])}return ye}var Q=3;function oe(ce,ye,Le,me,he,be){be||(be=1),Le=[-1,-1,-1];var Se=!1,ze=[q(ye[0][3],me,he),q(ye[1][3],me,he),q(ye[2][3],me,he)];if(!ze[0]&&!ze[1]&&!ze[2])return!1;var Fe=function(Ye,Ge,We){return Z(Ge[0][3])&&Z(Ge[1][3])&&Z(Ge[2][3])?(X(Ye,Ge,We),!0):beze?[A,be]:[be,S];ke(ye,Fe[0],Fe[1])}}var Je=[[Math.min(x,S),Math.max(x,S)],[Math.min(A,T),Math.max(A,T)]];["x","y","z"].forEach(function(Ye){for(var Ge=[],We=0;We0&&(se.push(Re.id),Ye==="x"?K.push([Re.distRatio,0,0]):Ye==="y"?K.push([0,Re.distRatio,0]):K.push([0,0,Re.distRatio]))}else Ye==="x"?ar=Ue(1,b-1):Ye==="y"?ar=Ue(1,y-1):ar=Ue(1,w-1);se.length>0&&(Ye==="x"?Ge[we]=De(ce,se,Pe,Qe,K,Ge[we]):Ye==="y"?Ge[we]=Ce(ce,se,Pe,Qe,K,Ge[we]):Ge[we]=Oe(ce,se,Pe,Qe,K,Ge[we]),we++),ar.length>0&&(Ye==="x"?Ge[we]=de(ce,ar,Pe,Qe,Ge[we]):Ye==="y"?Ge[we]=Ee(ce,ar,Pe,Qe,Ge[we]):Ge[we]=Me(ce,ar,Pe,Qe,Ge[we]),we++)}var Be=e.caps[Ye];Be.show&&Be.fill&&(L(Be.fill),Ye==="x"?Ge[we]=de(ce,[0,b-1],Pe,Qe,Ge[we]):Ye==="y"?Ge[we]=Ee(ce,[0,y-1],Pe,Qe,Ge[we]):Ge[we]=Me(ce,[0,w-1],Pe,Qe,Ge[we]),we++)}}),l===0&&R(),e._meshX=d,e._meshY=_,e._meshZ=p,e._meshIntensity=c,e._Xs=f,e._Ys=v,e._Zs=g}return Te(),e}function rse(e,r){var t=e.glplot.gl,n=Jle({gl:t}),a=new UN(e,n,r.uid);return n._trace=a,a.update(r),e.glplot.add(n),a}VN.exports={findNearestOnAxis:U0,generateIsoMeshes:HN,createIsosurfaceTrace:rse}});var YN=pe((mpe,GN)=>{"use strict";GN.exports={attributes:gd(),supplyDefaults:t5().supplyDefaults,calc:i5(),colorbar:{min:"cmin",max:"cmax"},plot:xd().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:il(),categories:["gl3d","showLegend"],meta:{}}});var XN=pe((xpe,WN)=>{"use strict";WN.exports=YN()});var s5=pe((bpe,JN)=>{"use strict";var tse=ja(),Kt=gd(),nse=q0(),ZN=Sn(),l5=Mt().extendFlat,ase=zn().overrideAll,bd=JN.exports=ase(l5({x:Kt.x,y:Kt.y,z:Kt.z,value:Kt.value,isomin:Kt.isomin,isomax:Kt.isomax,surface:Kt.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Kt.slices,caps:Kt.caps,text:Kt.text,hovertext:Kt.hovertext,xhoverformat:Kt.xhoverformat,yhoverformat:Kt.yhoverformat,zhoverformat:Kt.zhoverformat,valuehoverformat:Kt.valuehoverformat,hovertemplate:Kt.hovertemplate},tse("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Kt.colorbar,opacity:Kt.opacity,opacityscale:nse.opacityscale,lightposition:Kt.lightposition,lighting:Kt.lighting,flatshading:Kt.flatshading,contour:Kt.contour,hoverinfo:l5({},ZN.hoverinfo),showlegend:l5({},ZN.showlegend,{dflt:!1})}),"calc","nested");bd.x.editType=bd.y.editType=bd.z.editType=bd.value.editType="calc+clearAxisTypes"});var QN=pe((_pe,KN)=>{"use strict";var ise=ir(),ose=s5(),lse=t5().supplyIsoDefaults,sse=K3().opacityscaleDefaults;KN.exports=function(r,t,n,a){function o(i,l){return ise.coerce(r,t,ose,i,l)}lse(r,t,n,a,o),sse(r,t,a,o)}});var rz=pe((wpe,ez)=>{"use strict";var use=pn().gl_mesh3d,fse=al().parseColorScale,cse=ir().isArrayOrTypedArray,vse=po(),hse=Li().extractOpts,$N=Vu(),u5=xd().findNearestOnAxis,dse=xd().generateIsoMeshes;function jN(e,r,t){this.scene=e,this.uid=t,this.mesh=r,this.name="",this.data=null,this.showContour=!1}var f5=jN.prototype;f5.handlePick=function(e){if(e.object===this.mesh){var r=e.data.index,t=this.data._meshX[r],n=this.data._meshY[r],a=this.data._meshZ[r],o=this.data._Ys.length,i=this.data._Zs.length,l=u5(t,this.data._Xs).id,u=u5(n,this.data._Ys).id,s=u5(a,this.data._Zs).id,f=e.index=s+i*u+i*o*l;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var v=this.data.hovertext||this.data.text;return cse(v)&&v[f]!==void 0?e.textLabel=v[f]:v&&(e.textLabel=v),!0}};f5.update=function(e){var r=this.scene,t=r.fullSceneLayout;this.data=dse(e);function n(u,s,f,v){return s.map(function(g){return u.d2l(g,0,v)*f})}var a=$N(n(t.xaxis,e._meshX,r.dataScale[0],e.xcalendar),n(t.yaxis,e._meshY,r.dataScale[1],e.ycalendar),n(t.zaxis,e._meshZ,r.dataScale[2],e.zcalendar)),o=$N(e._meshI,e._meshJ,e._meshK),i={positions:a,cells:o,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:vse(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},l=hse(e);i.vertexIntensity=e._meshIntensity,i.vertexIntensityBounds=[l.min,l.max],i.colormap=fse(e),this.mesh.update(i)};f5.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function pse(e,r){var t=e.glplot.gl,n=use({gl:t}),a=new jN(e,n,r.uid);return n._trace=a,a.update(r),e.glplot.add(n),a}ez.exports=pse});var nz=pe((Mpe,tz)=>{"use strict";tz.exports={attributes:s5(),supplyDefaults:QN(),calc:i5(),colorbar:{min:"cmin",max:"cmax"},plot:rz(),moduleType:"trace",name:"volume",basePlotModule:il(),categories:["gl3d","showLegend"],meta:{}}});var iz=pe((Tpe,az)=>{"use strict";az.exports=nz()});var sz=pe((Ape,lz)=>{"use strict";var gse=Er(),oz=ir(),yse=Ei(),mse=Uu();lz.exports=function(r,t,n,a){function o(f,v){return oz.coerce(r,t,mse,f,v)}function i(f){var v=f.map(function(g){var b=o(g);return b&&oz.isArrayOrTypedArray(b)?b:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var l=i(["x","y","z"]);if(!l){t.visible=!1;return}if(i(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var u=gse.getComponentMethod("calendars","handleTraceDefaults");u(r,t,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(f){o(f)});var s=o("contour.show");s&&(o("contour.color"),o("contour.width")),"intensity"in r?(o("intensity"),o("intensitymode"),yse(r,t,a,o,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in r?o("facecolor"):"vertexcolor"in r?o("vertexcolor"):o("color",n)),o("text"),o("hovertext"),o("hovertemplate"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),t._length=null}});var fz=pe((kpe,uz)=>{"use strict";var xse=zo();uz.exports=function(r,t){t.intensity&&xse(r,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}});var pz=pe((Spe,dz)=>{"use strict";var bse=pn().gl_mesh3d,_se=pn().delaunay_triangulate,wse=pn().alpha_shape,Mse=pn().convex_hull,Tse=al().parseColorScale,Ase=ir().isArrayOrTypedArray,d5=po(),kse=Li().extractOpts,cz=Vu();function hz(e,r,t){this.scene=e,this.uid=t,this.mesh=r,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p5=hz.prototype;p5.handlePick=function(e){if(e.object===this.mesh){var r=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[r],this.data.y[r],this.data.z[r]];var t=this.data.hovertext||this.data.text;return Ase(t)&&t[r]!==void 0?e.textLabel=t[r]:t&&(e.textLabel=t),!0}};function vz(e){for(var r=[],t=e.length,n=0;n=r-.5)return!1;return!0}p5.update=function(e){var r=this.scene,t=r.fullSceneLayout;this.data=e;var n=e.x.length,a=cz(c5(t.xaxis,e.x,r.dataScale[0],e.xcalendar),c5(t.yaxis,e.y,r.dataScale[1],e.ycalendar),c5(t.zaxis,e.z,r.dataScale[2],e.zcalendar)),o;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!h5(e.i,n)||!h5(e.j,n)||!h5(e.k,n))return;o=cz(v5(e.i),v5(e.j),v5(e.k))}else e.alphahull===0?o=Mse(a):e.alphahull>0?o=wse(e.alphahull,a):o=Sse(e.delaunayaxis,a);var i={positions:a,cells:o,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:d5(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var l=kse(e);this.color="#fff";var u=e.intensitymode;i[u+"Intensity"]=e.intensity,i[u+"IntensityBounds"]=[l.min,l.max],i.colormap=Tse(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],i.vertexColors=vz(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],i.cellColors=vz(e.facecolor)):(this.color=e.color,i.meshColor=d5(e.color));this.mesh.update(i)};p5.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Cse(e,r){var t=e.glplot.gl,n=bse({gl:t}),a=new hz(e,n,r.uid);return n._trace=a,a.update(r),e.glplot.add(n),a}dz.exports=Cse});var yz=pe((Cpe,gz)=>{"use strict";gz.exports={attributes:Uu(),supplyDefaults:sz(),calc:fz(),colorbar:{min:"cmin",max:"cmax"},plot:pz(),moduleType:"trace",name:"mesh3d",basePlotModule:il(),categories:["gl3d","showLegend"],meta:{}}});var xz=pe((Epe,mz)=>{"use strict";mz.exports=yz()});var y5=pe((Lpe,_z)=>{"use strict";var Ese=ja(),Gu=ro().axisHoverFormat,Lse=Sa().hovertemplateAttrs,Rse=Uu(),bz=Sn(),g5=Mt().extendFlat,_d={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:Lse({editType:"calc"},{keys:["norm"]}),uhoverformat:Gu("u",1),vhoverformat:Gu("v",1),whoverformat:Gu("w",1),xhoverformat:Gu("x"),yhoverformat:Gu("y"),zhoverformat:Gu("z"),showlegend:g5({},bz.showlegend,{dflt:!1})};g5(_d,Ese("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Dse=["opacity","lightposition","lighting"];Dse.forEach(function(e){_d[e]=Rse[e]});_d.hoverinfo=g5({},bz.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});_z.exports=_d});var Mz=pe((Rpe,wz)=>{"use strict";var Pse=ir(),Fse=Ei(),Ise=y5();wz.exports=function(r,t,n,a){function o(b,y){return Pse.coerce(r,t,Ise,b,y)}var i=o("u"),l=o("v"),u=o("w"),s=o("x"),f=o("y"),v=o("z");if(!i||!i.length||!l||!l.length||!u||!u.length||!s||!s.length||!f||!f.length||!v||!v.length){t.visible=!1;return}var g=o("sizemode");o("sizeref",g==="raw"?1:.5),o("anchor"),o("lighting.ambient"),o("lighting.diffuse"),o("lighting.specular"),o("lighting.roughness"),o("lighting.fresnel"),o("lightposition.x"),o("lightposition.y"),o("lightposition.z"),Fse(r,t,a,o,{prefix:"",cLetter:"c"}),o("text"),o("hovertext"),o("hovertemplate"),o("uhoverformat"),o("vhoverformat"),o("whoverformat"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),t._length=null}});var Az=pe((Dpe,Tz)=>{"use strict";var Nse=zo();Tz.exports=function(r,t){for(var n=t.u,a=t.v,o=t.w,i=Math.min(t.x.length,t.y.length,t.z.length,n.length,a.length,o.length),l=-1/0,u=1/0,s=0;s{"use strict";var zse=pn().gl_cone3d,qse=pn().gl_cone3d.createConeMesh,Ose=ir().simpleMap,Bse=al().parseColorScale,Use=Li().extractOpts,Hse=ir().isArrayOrTypedArray,kz=Vu();function Sz(e,r){this.scene=e,this.uid=r,this.mesh=null,this.data=null}var m5=Sz.prototype;m5.handlePick=function(e){if(e.object===this.mesh){var r=e.index=e.data.index,t=this.data.x[r],n=this.data.y[r],a=this.data.z[r],o=this.data.u[r],i=this.data.v[r],l=this.data.w[r];e.traceCoordinate=[t,n,a,o,i,l,Math.sqrt(o*o+i*i+l*l)];var u=this.data.hovertext||this.data.text;return Hse(u)&&u[r]!==void 0?e.textLabel=u[r]:u&&(e.textLabel=u),!0}};var Vse={xaxis:0,yaxis:1,zaxis:2},Gse={tip:1,tail:0,cm:.25,center:.5},Yse={tip:1,tail:1,cm:.75,center:.5};function Cz(e,r){var t=e.fullSceneLayout,n=e.dataScale,a={};function o(f,v){var g=t[v],b=n[Vse[v]];return Ose(f,function(y){return g.d2l(y)*b})}a.vectors=kz(o(r.u,"xaxis"),o(r.v,"yaxis"),o(r.w,"zaxis"),r._len),a.positions=kz(o(r.x,"xaxis"),o(r.y,"yaxis"),o(r.z,"zaxis"),r._len);var i=Use(r);a.colormap=Bse(r),a.vertexIntensityBounds=[i.min/r._normMax,i.max/r._normMax],a.coneOffset=Gse[r.anchor];var l=r.sizemode;l==="scaled"?a.coneSize=r.sizeref||.5:l==="absolute"?a.coneSize=r.sizeref&&r._normMax?r.sizeref/r._normMax:.5:l==="raw"&&(a.coneSize=r.sizeref),a.coneSizemode=l;var u=zse(a),s=r.lightposition;return u.lightPosition=[s.x,s.y,s.z],u.ambient=r.lighting.ambient,u.diffuse=r.lighting.diffuse,u.specular=r.lighting.specular,u.roughness=r.lighting.roughness,u.fresnel=r.lighting.fresnel,u.opacity=r.opacity,r._pad=Yse[r.anchor]*u.vectorScale*u.coneScale*r._normMax,u}m5.update=function(e){this.data=e;var r=Cz(this.scene,e);this.mesh.update(r)};m5.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Wse(e,r){var t=e.glplot.gl,n=Cz(e,r),a=qse(t,n),o=new Sz(e,r.uid);return o.mesh=a,o.data=r,a._trace=o,e.glplot.add(a),o}Ez.exports=Wse});var Dz=pe((Fpe,Rz)=>{"use strict";Rz.exports={moduleType:"trace",name:"cone",basePlotModule:il(),categories:["gl3d","showLegend"],attributes:y5(),supplyDefaults:Mz(),colorbar:{min:"cmin",max:"cmax"},calc:Az(),plot:Lz(),eventData:function(e,r){return e.norm=r.traceCoordinate[6],e},meta:{}}});var Fz=pe((Ipe,Pz)=>{"use strict";Pz.exports=Dz()});var b5=pe((Npe,Nz)=>{"use strict";var Xse=ja(),Yu=ro().axisHoverFormat,Zse=Sa().hovertemplateAttrs,Jse=Uu(),Iz=Sn(),x5=Mt().extendFlat,wd={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:Zse({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:Yu("u",1),vhoverformat:Yu("v",1),whoverformat:Yu("w",1),xhoverformat:Yu("x"),yhoverformat:Yu("y"),zhoverformat:Yu("z"),showlegend:x5({},Iz.showlegend,{dflt:!1})};x5(wd,Xse("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Kse=["opacity","lightposition","lighting"];Kse.forEach(function(e){wd[e]=Jse[e]});wd.hoverinfo=x5({},Iz.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});Nz.exports=wd});var qz=pe((zpe,zz)=>{"use strict";var Qse=ir(),$se=Ei(),jse=b5();zz.exports=function(r,t,n,a){function o(g,b){return Qse.coerce(r,t,jse,g,b)}var i=o("u"),l=o("v"),u=o("w"),s=o("x"),f=o("y"),v=o("z");if(!i||!i.length||!l||!l.length||!u||!u.length||!s||!s.length||!f||!f.length||!v||!v.length){t.visible=!1;return}o("starts.x"),o("starts.y"),o("starts.z"),o("maxdisplayed"),o("sizeref"),o("lighting.ambient"),o("lighting.diffuse"),o("lighting.specular"),o("lighting.roughness"),o("lighting.fresnel"),o("lightposition.x"),o("lightposition.y"),o("lightposition.z"),$se(r,t,a,o,{prefix:"",cLetter:"c"}),o("text"),o("hovertext"),o("hovertemplate"),o("uhoverformat"),o("vhoverformat"),o("whoverformat"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),t._length=null}});var Wz=pe((qpe,Yz)=>{"use strict";var Uz=pn().gl_streamtube3d,eue=Uz.createTubeMesh,rue=ir(),tue=al().parseColorScale,nue=Li().extractOpts,Oz=Vu(),Hz={xaxis:0,yaxis:1,zaxis:2};function Vz(e,r){this.scene=e,this.uid=r,this.mesh=null,this.data=null}var w5=Vz.prototype;w5.handlePick=function(e){var r=this.scene.fullSceneLayout,t=this.scene.dataScale;function n(i,l){var u=r[l],s=t[Hz[l]];return u.l2c(i)/s}if(e.object===this.mesh){var a=e.data.position,o=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(o[0],"xaxis"),n(o[1],"yaxis"),n(o[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function Bz(e){var r=e.length,t;return r>2?t=e.slice(1,r-1):r===2?t=[(e[0]+e[1])/2]:t=e,t}function _5(e){var r=e.length;return r===1?[.5,.5]:[e[1]-e[0],e[r-1]-e[r-2]]}function Gz(e,r){var t=e.fullSceneLayout,n=e.dataScale,a=r._len,o={};function i(R,E){var D=t[E],N=n[Hz[E]];return rue.simpleMap(R,function(I){return D.d2l(I)*N})}if(o.vectors=Oz(i(r._u,"xaxis"),i(r._v,"yaxis"),i(r._w,"zaxis"),a),!a)return{positions:[],cells:[]};var l=i(r._Xs,"xaxis"),u=i(r._Ys,"yaxis"),s=i(r._Zs,"zaxis");o.meshgrid=[l,u,s],o.gridFill=r._gridFill;var f=r._slen;if(f)o.startingPositions=Oz(i(r._startsX,"xaxis"),i(r._startsY,"yaxis"),i(r._startsZ,"zaxis"));else{for(var v=u[0],g=Bz(l),b=Bz(s),y=new Array(g.length*b.length),w=0,M=0;M{"use strict";Xz.exports={moduleType:"trace",name:"streamtube",basePlotModule:il(),categories:["gl3d","showLegend"],attributes:b5(),supplyDefaults:qz(),colorbar:{min:"cmin",max:"cmax"},calc:yd().calc,plot:Wz(),eventData:function(e,r){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=r.traceCoordinate[3],e.tubev=r.traceCoordinate[4],e.tubew=r.traceCoordinate[5],e.norm=r.traceCoordinate[6],e.divergence=r.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var Kz=pe((Bpe,Jz)=>{"use strict";Jz.exports=Zz()});var Dn=pe((Upe,$z)=>{"use strict";var Qz=Object.getOwnPropertySymbols,iue=Object.prototype.hasOwnProperty,oue=Object.prototype.propertyIsEnumerable;function lue(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function sue(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var n=Object.getOwnPropertyNames(r).map(function(o){return r[o]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(o){return!1}}$z.exports=sue()?Object.assign:function(e,r){for(var t,n=lue(e),a,o=1;o{var Td=Dn();function jz(){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={}}Td(jz.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var n="",a=0;t>0;){var o=t%10;n=(o===0?"":e[o]+r[a])+n,a++,t=Math.floor(t/10)}return n.indexOf(e[1]+r[1])===0&&(n=n.substr(1)),n||e[0]}}});function M5(e,r,t,n){if(this._calendar=e,this._year=r,this._month=t,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function Md(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}Td(M5.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Wr.local.differentCalendars||Wr.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+Md(Math.abs(this.year()),4)+"-"+Md(this.month(),2)+"-"+Md(this.day(),2)}});function T5(){this.shortYearCutoff="+10"}Td(T5.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new M5(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+Md(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Wr.local.invalidMonth||Wr.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Wr.local.invalidMonth||Wr.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var n=this._validate(e,r,t,Wr.local.invalidDate||Wr.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,r,t){var n=this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var n=e.toJD()+r*(t==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var o=e.year()+(t==="y"?r:0),i=e.monthOfYear()+(t==="m"?r:0),a=e.day(),l=function(f){for(;iv-1+f.minMonth;)o++,i-=v,v=f.monthsInYear(o)};t==="y"?(e.month()!==this.fromMonthOfYear(o,i)&&(i=this.newDate(o,e.month(),this.minDay).monthOfYear()),i=Math.min(i,this.monthsInYear(o)),a=Math.min(a,this.daysInMonth(o,this.fromMonthOfYear(o,i)))):t==="m"&&(l(this),a=Math.min(a,this.daysInMonth(o,this.fromMonthOfYear(o,i))));var u=[o,this.fromMonthOfYear(o,i),a];return this._validateLevel--,u}catch(s){throw this._validateLevel--,s}},_correctAdd:function(e,r,t,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],o=t<0?-1:1;r=this._add(e,t*a[0]+o*a[1],a[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate);var n=t==="y"?r:e.year(),a=t==="m"?r:e.month(),o=t==="d"?r:e.day();return(t==="y"||t==="m")&&(o=Math.min(o,this.daysInMonth(n,a))),e.date(n,a,o)},isValid:function(e,r,t){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,r,this.minDay);n=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),s=a-(u>2.5?4716:4715);return s<=0&&s--,this.newDate(s,u,l)},toJSDate:function(e,r,t){var n=this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Wr=eq.exports=new jz;Wr.cdate=M5;Wr.baseCalendar=T5;Wr.calendars.gregorian=A5});var rq=pe(()=>{var k5=Dn(),gn=Pn();k5(gn.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"});gn.local=gn.regionalOptions[""];k5(gn.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});k5(gn.baseCalendar.prototype,{UNIX_EPOCH:gn.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:gn.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw gn.local.invalidFormat||gn.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var n=t.dayNamesShort||this.local.dayNamesShort,a=t.dayNames||this.local.dayNames,o=t.monthNumbers||this.local.monthNumbers,i=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,u=t.calculateWeek||this.local.calculateWeek,s=function(x,T){for(var d=1;S+d1},f=function(x,T,d,_){var p=""+T;if(s(x,_))for(;p.length1},A=function(R,E){var D=m(R,E),N=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],I=new RegExp("^-?\\d{1,"+N+"}"),F=r.substring(p).match(I);if(!F)throw(gn.local.missingNumberAt||gn.regionalOptions[""].missingNumberAt).replace(/\{0\}/,p);return p+=F[0].length,parseInt(F[0],10)},S=this,x=function(){if(typeof l=="function"){m("m");var R=l.call(S,r.substring(p));return p+=R.length,R}return A("m")},T=function(R,E,D,N){for(var I=m(R,N)?D:E,F=0;F-1){g=1,b=y;for(var h=this.daysInMonth(v,g);b>h;h=this.daysInMonth(v,g))g++,b-=h}return f>-1?this.fromJD(f):this.newDate(v,g,b)},determineDate:function(e,r,t,n,a){t&&typeof t!="object"&&(a=n,n=t,t=null),typeof n!="string"&&(a=n,n="");var o=this,i=function(l){try{return o.parseDate(n,l,a)}catch(v){}l=l.toLowerCase();for(var u=(l.match(/^c/)&&t?t.newDate():null)||o.today(),s=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=s.exec(l);f;)u.add(parseInt(f[1],10),f[2]||"d"),f=s.exec(l);return u};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?i(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:o.today().add(e,"d"):o.newDate(e),e}})});var tq=pe(()=>{var sl=Pn(),uue=Dn(),S5=sl.instance();function Ad(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ad.prototype=new sl.baseCalendar;uue(Ad.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(cue);return t?t[0]:""}var n=this._validateYear(e),a=e.month(),o=""+this.toChineseMonth(n,a);return r&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(n,a)&&(o+="i"),o},monthNames:function(e){if(typeof e=="string"){var r=e.match(vue);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),o=["\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"][a-1];return this.isIntercalaryMonth(t,n)&&(o="\u95F0"+o),o},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(hue);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),o=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(t,n)&&(o="\u95F0"+o),o},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),n;if(isNaN(t))r[0]==="\u95F0"&&(n=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var a=r[r.length-1];n=a==="i"||a==="I"}var o=this.toMonthIndex(e,t,n);return o},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var n=this.intercalaryMonth(e),a=t&&r!==n;if(a||r<1||r>12)throw sl.local.invalidMonth.replace(/\{0\}/,this.local.name);var o;return n?!t&&r<=n?o=r-1:o=r:o=r-1,o},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),n=t?12:11;if(r<0||r>n)throw sl.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var n=this._validateYear(e,sl.local.invalidyear),a=fl[n-fl[0]],o=a>>9&4095,i=a>>5&15,l=a&31,u;u=S5.newDate(o,i,l),u.add(4-(u.dayOfWeek()||7),"d");var s=this.toJD(e,r,t)-u.toJD();return 1+Math.floor(s/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=ul[e-ul[0]],n=t>>13,a=n?12:11;if(r>a)throw sl.local.invalidMonth.replace(/\{0\}/,this.local.name);var o=t&1<<12-r?30:29;return o},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,o,t,sl.local.invalidDate);e=this._validateYear(n.year()),r=n.month(),t=n.day();var a=this.isIntercalaryMonth(e,r),o=this.toChineseMonth(e,r),i=pue(e,o,t,a);return S5.toJD(i.year,i.month,i.day)},fromJD:function(e){var r=S5.fromJD(e),t=due(r.year(),r.month(),r.day()),n=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,n,t.day)},fromString:function(e){var r=e.match(fue),t=this._validateYear(+r[1]),n=+r[2],a=!!r[3],o=this.toMonthIndex(t,n,a),i=+r[4];return this.newDate(t,o,i)},add:function(e,r,t){var n=e.year(),a=e.month(),o=this.isIntercalaryMonth(n,a),i=this.toChineseMonth(n,a),l=Object.getPrototypeOf(Ad.prototype).add.call(this,e,r,t);if(t==="y"){var u=l.year(),s=l.month(),f=this.isIntercalaryMonth(u,i),v=o&&f?this.toMonthIndex(u,i,!0):this.toMonthIndex(u,i,!1);v!==s&&l.month(v)}return l}});var fue=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,cue=/^\d?\d[iI]?/m,vue=/^闰?十?[一二三四五六七八九]?月/m,hue=/^闰?十?[一二三四五六七八九]?/m;sl.calendars.chinese=Ad;var ul=[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],fl=[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 due(e,r,t,n){var a,o;if(typeof e=="object")a=e,o=r||{};else{var i=typeof e=="number"&&e>=1888&&e<=2111;if(!i)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=31;if(!u)throw new Error("Solar day outside range 1 - 31");a={year:e,month:r,day:t},o=n||{}}var s=fl[a.year-fl[0]],f=a.year<<9|a.month<<5|a.day;o.year=f>=s?a.year:a.year-1,s=fl[o.year-fl[0]];var v=s>>9&4095,g=s>>5&15,b=s&31,y,w=new Date(v,g-1,b),M=new Date(a.year,a.month-1,a.day);y=Math.round((M-w)/(24*3600*1e3));var m=ul[o.year-ul[0]],A;for(A=0;A<13;A++){var S=m&1<<12-A?30:29;if(y>13;return!x||A=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var u=typeof r=="number"&&r>=1&&r<=12;if(!u)throw new Error("Lunar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=30;if(!s)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,o=n):(f=!!n,o=a||{}),i={year:e,month:r,day:t,isIntercalary:f}}var v;v=i.day-1;var g=ul[i.year-ul[0]],b=g>>13,y;b&&(i.month>b||i.isIntercalary)?y=i.month:y=i.month-1;for(var w=0;w>9&4095,S=m>>5&15,x=m&31,T=new Date(A,S-1,x+v);return o.year=T.getFullYear(),o.month=1+T.getMonth(),o.day=T.getDate(),o}});var nq=pe(()=>{var vs=Pn(),gue=Dn();function C5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}C5.prototype=new vs.baseCalendar;gue(C5.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(t){var r=this._validate(t,this.minMonth,this.minDay,vs.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,vs.local.invalidYear||vs.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,vs.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,vs.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});vs.calendars.coptic=C5});var aq=pe(()=>{var mo=Pn(),yue=Dn();function E5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}E5.prototype=new mo.baseCalendar;yue(E5.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,mo.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,mo.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,mo.local.invalidYear),400},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,mo.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,mo.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,r,t){var n=this.dayOfWeek(e,r,t);return n>=2&&n<=6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,mo.local.invalidDate);return{century:mue[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,r,t){var n=this._validate(e,r,t,mo.local.invalidDate);return e=n.year()+(n.year()<0?1:0),r=n.month(),t=n.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,n=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,n)}});var mue={20:"Fruitbat",21:"Anchovy"};mo.calendars.discworld=E5});var iq=pe(()=>{var hs=Pn(),xue=Dn();function L5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}L5.prototype=new hs.baseCalendar;xue(L5.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(t){var r=this._validate(t,this.minMonth,this.minDay,hs.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,hs.local.invalidYear||hs.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,hs.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,hs.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});hs.calendars.ethiopian=L5});var oq=pe(()=>{var cl=Pn(),bue=Dn();function R5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}R5.prototype=new cl.baseCalendar;bue(R5.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 r=this._validate(e,this.minMonth,this.minDay,cl.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,kd(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cl.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,cl.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,cl.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&kd(this.daysInYear(e),10)===5?30:r===9&&kd(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,cl.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,r,t){var n=this._validate(e,r,t,cl.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e<=0?e+1:e,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+t+1;if(r<7){for(var i=7;i<=this.monthsInYear(e);i++)o+=this.daysInMonth(e,i);for(var i=1;i=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});function kd(e,r){return e-r*Math.floor(e/r)}cl.calendars.hebrew=R5});var lq=pe(()=>{var H0=Pn(),_ue=Dn();function D5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D5.prototype=new H0.baseCalendar;_ue(D5.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 r=this._validate(e,this.minMonth,this.minDay,H0.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);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,r){var t=this._validate(e,r,this.minDay,H0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,H0.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});H0.calendars.islamic=D5});var sq=pe(()=>{var V0=Pn(),wue=Dn();function P5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P5.prototype=new V0.baseCalendar;wue(P5.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(t){var r=this._validate(t,this.minMonth,this.minDay,V0.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,V0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,V0.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,n=Math.floor((t-122.1)/365.25),a=Math.floor(365.25*n),o=Math.floor((t-a)/30.6001),i=o-Math.floor(o<14?1:13),l=n-Math.floor(i>2?4716:4715),u=t-a-Math.floor(30.6001*o);return l<=0&&l--,this.newDate(l,i,u)}});V0.calendars.julian=P5});var fq=pe(()=>{var Ya=Pn(),Mue=Dn();function I5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}I5.prototype=new Ya.baseCalendar;Mue(I5.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,Ya.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ya.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return t+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&n<0)throw"Invalid Mayan year";r=r*20+n}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ya.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Ya.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ya.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Ya.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,Ya.local.invalidDate);return n.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Ya.local.invalidDate),!0},extraInfo:function(e,r,t){var n=this._validate(e,r,t,Ya.local.invalidDate),a=n.toJD(),o=this._toHaab(a),i=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[o[0]-1],haabMonth:o[0],haabDay:o[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=F5(e+8+17*20,365);return[Math.floor(r/20)+1,F5(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[uq(e+20,20),uq(e+4,13)]},toJD:function(e,r,t){var n=this._validate(e,r,t,Ya.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),n=e%20;return this.newDate(r,t,n)}});function F5(e,r){return e-r*Math.floor(e/r)}function uq(e,r){return F5(e-1,r)+1}Ya.calendars.mayan=I5});var vq=pe(()=>{var ds=Pn(),Tue=Dn();function N5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}N5.prototype=new ds.baseCalendar;var cq=ds.instance("gregorian");Tue(N5.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 r=this._validate(e,this.minMonth,this.minDay,ds.local.invalidYear||ds.regionalOptions[""].invalidYear);return cq.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ds.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,ds.local.invalidMonth),a=n.year();a<0&&a++;for(var o=n.day(),i=1;i=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,n=1;t>this.daysInMonth(r,n);)t-=this.daysInMonth(r,n),n++;return this.newDate(r,n,t)}});ds.calendars.nanakshahi=N5});var hq=pe(()=>{var ps=Pn(),Aue=Dn();function z5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z5.prototype=new ps.baseCalendar;Aue(z5.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,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,ps.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,ps.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var n=this._validate(e,r,t,ps.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=ps.instance(),o=0,i=r,l=e;this._createMissingCalendarData(e);var u=e-(i>9||i===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(o=t,i--);i!==9;)i<=0&&(i=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][i],i--;return r===9?(o+=t-this.NEPALI_CALENDAR_DATA[l][0],o<0&&(o+=a.daysInYear(u))):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(e){var r=ps.instance(),t=r.fromJD(e),n=t.year(),a=t.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var i=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][i]-l+1;a>u;)i++,i>12&&(i=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][i];var s=this.NEPALI_CALENDAR_DATA[o][i]-(u-a);return this.newDate(o,i,s)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var Wu=Pn(),kue=Dn();function Sd(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Sd.prototype=new Wu.baseCalendar;kue(Sd.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,Wu.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Wu.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,Wu.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e-(e>=0?474:473),o=474+q5(a,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((o*682-110)/2816)+(o-1)*365+Math.floor(a/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),n=q5(r,1029983),a=2820;if(n!==1029982){var o=Math.floor(n/366),i=q5(n,366);a=Math.floor((2134*o+2816*i+2815)/1028522)+o+1}var l=a+2820*t+474;l=l<=0?l-1:l;var u=e-this.toJD(l,1,1)+1,s=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(l,s,1)+1;return this.newDate(l,s,f)}});function q5(e,r){return e-r*Math.floor(e/r)}Wu.calendars.persian=Sd;Wu.calendars.jalali=Sd});var pq=pe(()=>{var gs=Pn(),Sue=Dn(),Cd=gs.instance();function O5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}O5.prototype=new gs.baseCalendar;Sue(O5.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(t){var r=this._validate(t,this.minMonth,this.minDay,gs.local.invalidYear),t=this._t2gYear(r.year());return Cd.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,gs.local.invalidYear),a=this._t2gYear(n.year());return Cd.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,gs.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,gs.local.invalidDate),a=this._t2gYear(n.year());return Cd.toJD(a,n.month(),n.day())},fromJD:function(e){var r=Cd.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});gs.calendars.taiwan=O5});var gq=pe(()=>{var ys=Pn(),Cue=Dn(),Ed=ys.instance();function B5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}B5.prototype=new ys.baseCalendar;Cue(B5.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(t){var r=this._validate(t,this.minMonth,this.minDay,ys.local.invalidYear),t=this._t2gYear(r.year());return Ed.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,ys.local.invalidYear),a=this._t2gYear(n.year());return Ed.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ys.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,ys.local.invalidDate),a=this._t2gYear(n.year());return Ed.toJD(a,n.month(),n.day())},fromJD:function(e){var r=Ed.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});ys.calendars.thai=B5});var yq=pe(()=>{var ms=Pn(),Eue=Dn();function U5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}U5.prototype=new ms.baseCalendar;Eue(U5.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 r=this._validate(e,this.minMonth,this.minDay,ms.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,ms.local.invalidMonth),n=t.toJD()-24e5+.5,a=0,o=0;on)return vl[a]-vl[a-1];a++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,ms.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,o=n.day()+vl[a-1]-1;return o+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,n=0;nr);n++)t++;var a=t+15292,o=Math.floor((a-1)/12),i=o+1,l=a-12*o,u=r-vl[t-1]+1;return this.newDate(i,l,u)},isValid:function(e,r,t){var n=ms.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,r,t,n){var a=ms.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});ms.calendars.ummalqura=U5;var vl=[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 xq=pe((xge,mq)=>{"use strict";mq.exports=Pn();rq();tq();nq();aq();iq();oq();lq();sq();fq();vq();hq();dq();pq();gq();yq()});var kq=pe((bge,Aq)=>{"use strict";var _q=xq(),G0=ir(),wq=nn(),Lue=wq.EPOCHJD,Rue=wq.ONEDAY,G5={valType:"enumerated",values:G0.sortObjectKeys(_q.calendars),editType:"calc",dflt:"gregorian"},Mq=function(e,r,t,n){var a={};return a[t]=G5,G0.coerce(e,r,a,t,n)},Due=function(e,r,t,n){for(var a=0;a{"use strict";Sq.exports=kq()});var que=pe((wge,Lq)=>{var Eq=AF();Eq.register([aN(),EN(),XN(),iz(),xz(),Fz(),Kz(),Cq()]);Lq.exports=Eq});return que();})(); +`]);o.createShader=function(_){var y=l(_,s,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},o.createPickShader=function(_){var y=l(_,s,g,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},o.createContourShader=function(_){var y=l(_,v,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y},o.createPickContourShader=function(_){var y=l(_,v,g,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y}},9499:function(a,o,i){"use strict";a.exports=oe;var l=i(8828),u=i(2762),s=i(8116),f=i(7766),v=i(1888),g=i(6729),_=i(5298),y=i(9994),w=i(9618),M=i(3711),m=i(6760),k=i(7608),S=i(2478),x=i(6199),T=i(990),d=T.createShader,b=T.createContourShader,p=T.createPickShader,c=T.createPickContourShader,A=4*10,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],R=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],E=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var ee=0;ee<3;++ee){var G=E[ee],re=(ee+1)%3,H=(ee+2)%3;G[re+0]=1,G[H+3]=1,G[ee+6]=1}})();function D(ee,G,re,H,te){this.position=ee,this.index=G,this.uv=re,this.level=H,this.dataCoordinate=te}var N=256;function I(ee,G,re,H,te,ue,de,Ee,Me,ve,Ae,ke,De,Ce,Oe){this.gl=ee,this.shape=G,this.bounds=re,this.objectOffset=Oe,this.intensityBounds=[],this._shader=H,this._pickShader=te,this._coordinateBuffer=ue,this._vao=de,this._colorMap=Ee,this._contourShader=Me,this._contourPickShader=ve,this._contourBuffer=Ae,this._contourVAO=ke,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new D([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=De,this._dynamicVAO=Ce,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[w(v.mallocFloat(1024),[0,0]),w(v.mallocFloat(1024),[0,0]),w(v.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var F=I.prototype;F.genColormap=function(ee,G){var re=!1,H=y([g({colormap:ee,nshades:N,format:"rgba"}).map(function(te,ue){var de=G?L(ue/255,G):te[3];return de<1&&(re=!0),[te[0],te[1],te[2],255*de]})]);return _.divseq(H,255),this.hasAlphaScale=re,H},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(ee){this.pickId=ee};function L(ee,G){if(!G||!G.length)return 1;for(var re=0;reee&&re>0){var H=(G[re][0]-ee)/(G[re][0]-G[re-1][0]);return G[re][1]*(1-H)+H*G[re-1][1]}}return 1}var P=[0,0,0],O={showSurface:!1,showContour:!1,projections:[h.slice(),h.slice(),h.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function U(ee,G){var re,H,te,ue=G.axes&&G.axes.lastCubeProps.axis||P,de=G.showSurface,Ee=G.showContour;for(re=0;re<3;++re)for(de=de||G.surfaceProject[re],H=0;H<3;++H)Ee=Ee||G.contourProject[re][H];for(re=0;re<3;++re){var Me=O.projections[re];for(H=0;H<16;++H)Me[H]=0;for(H=0;H<4;++H)Me[5*H]=1;Me[5*re]=0,Me[12+re]=G.axesBounds[+(ue[re]>0)][re],m(Me,ee.model,Me);var ve=O.clipBounds[re];for(te=0;te<2;++te)for(H=0;H<3;++H)ve[te][H]=ee.clipBounds[te][H];ve[0][re]=-1e8,ve[1][re]=1e8}return O.showSurface=de,O.showContour=Ee,O}var X={model:h,view:h,projection:h,inverseModel:h.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},j=h.slice(),$=[1,0,0,0,1,0,0,0,1];function Y(ee,G){ee=ee||{};var re=this.gl;re.disable(re.CULL_FACE),this._colorMap.bind(0);var H=X;H.model=ee.model||h,H.view=ee.view||h,H.projection=ee.projection||h,H.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],H.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],H.objectOffset=this.objectOffset,H.contourColor=this.contourColor[0],H.inverseModel=k(H.inverseModel,H.model);for(var te=0;te<2;++te)for(var ue=H.clipBounds[te],de=0;de<3;++de)ue[de]=Math.min(Math.max(this.clipBounds[te][de],-1e8),1e8);H.kambient=this.ambientLight,H.kdiffuse=this.diffuseLight,H.kspecular=this.specularLight,H.roughness=this.roughness,H.fresnel=this.fresnel,H.opacity=this.opacity,H.height=0,H.permutation=$,H.vertexColor=this.vertexColor;var Ee=j;for(m(Ee,H.view,H.model),m(Ee,H.projection,Ee),k(Ee,Ee),te=0;te<3;++te)H.eyePosition[te]=Ee[12+te]/Ee[15];var Me=Ee[15];for(te=0;te<3;++te)Me+=this.lightPosition[te]*Ee[4*te+3];for(te=0;te<3;++te){var ve=Ee[12+te];for(de=0;de<3;++de)ve+=Ee[4*de+te]*this.lightPosition[de];H.lightPosition[te]=ve/Me}var Ae=U(H,this);if(Ae.showSurface){for(this._shader.bind(),this._shader.uniforms=H,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(re.TRIANGLES,this._vertexCount),te=0;te<3;++te)!this.surfaceProject[te]||!this.vertexCount||(this._shader.uniforms.model=Ae.projections[te],this._shader.uniforms.clipBounds=Ae.clipBounds[te],this._vao.draw(re.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var ke=this._contourShader;H.kambient=1,H.kdiffuse=0,H.kspecular=0,H.opacity=1,ke.bind(),ke.uniforms=H;var De=this._contourVAO;for(De.bind(),te=0;te<3;++te)for(ke.uniforms.permutation=E[te],re.lineWidth(this.contourWidth[te]*this.pixelRatio),de=0;de>4)/16)/255,te=Math.floor(H),ue=H-te,de=G[1]*(ee.value[1]+(ee.value[2]&15)/16)/255,Ee=Math.floor(de),Me=de-Ee;te+=1,Ee+=1;var ve=re.position;ve[0]=ve[1]=ve[2]=0;for(var Ae=0;Ae<2;++Ae)for(var ke=Ae?ue:1-ue,De=0;De<2;++De)for(var Ce=De?Me:1-Me,Oe=te+Ae,Ue=Ee+De,ge=ke*Ce,Te=0;Te<3;++Te)ve[Te]+=this._field[Te].get(Oe,Ue)*ge;for(var ce=this._pickResult.level,ye=0;ye<3;++ye)if(ce[ye]=S.le(this.contourLevels[ye],ve[ye]),ce[ye]<0)this.contourLevels[ye].length>0&&(ce[ye]=0);else if(ce[ye]Math.abs(me-ve[ye])&&(ce[ye]+=1)}for(re.index[0]=ue<.5?te:te+1,re.index[1]=Me<.5?Ee:Ee+1,re.uv[0]=H/G[0],re.uv[1]=de/G[1],Te=0;Te<3;++Te)re.dataCoordinate[Te]=this._field[Te].get(re.index[0],re.index[1]);return re},F.padField=function(ee,G){var re=G.shape.slice(),H=ee.shape.slice();_.assign(ee.lo(1,1).hi(re[0],re[1]),G),_.assign(ee.lo(1).hi(re[0],1),G.hi(re[0],1)),_.assign(ee.lo(1,H[1]-1).hi(re[0],1),G.lo(0,re[1]-1).hi(re[0],1)),_.assign(ee.lo(0,1).hi(1,re[1]),G.hi(1)),_.assign(ee.lo(H[0]-1,1).hi(1,re[1]),G.lo(re[0]-1)),ee.set(0,0,G.get(0,0)),ee.set(0,H[1]-1,G.get(0,re[1]-1)),ee.set(H[0]-1,0,G.get(re[0]-1,0)),ee.set(H[0]-1,H[1]-1,G.get(re[0]-1,re[1]-1))};function Z(ee,G){return Array.isArray(ee)?[G(ee[0]),G(ee[1]),G(ee[2])]:[G(ee),G(ee),G(ee)]}function ne(ee){return Array.isArray(ee)?ee.length===3?[ee[0],ee[1],ee[2],1]:[ee[0],ee[1],ee[2],ee[3]]:[0,0,0,1]}function Q(ee){if(Array.isArray(ee)){if(Array.isArray(ee))return[ne(ee[0]),ne(ee[1]),ne(ee[2])];var G=ne(ee);return[G.slice(),G.slice(),G.slice()]}}F.update=function(ee){ee=ee||{},this.objectOffset=ee.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ee&&(this.contourWidth=Z(ee.contourWidth,Number)),"showContour"in ee&&(this.showContour=Z(ee.showContour,Boolean)),"showSurface"in ee&&(this.showSurface=!!ee.showSurface),"contourTint"in ee&&(this.contourTint=Z(ee.contourTint,Boolean)),"contourColor"in ee&&(this.contourColor=Q(ee.contourColor)),"contourProject"in ee&&(this.contourProject=Z(ee.contourProject,function(wa){return Z(wa,Boolean)})),"surfaceProject"in ee&&(this.surfaceProject=ee.surfaceProject),"dynamicColor"in ee&&(this.dynamicColor=Q(ee.dynamicColor)),"dynamicTint"in ee&&(this.dynamicTint=Z(ee.dynamicTint,Number)),"dynamicWidth"in ee&&(this.dynamicWidth=Z(ee.dynamicWidth,Number)),"opacity"in ee&&(this.opacity=ee.opacity),"opacityscale"in ee&&(this.opacityscale=ee.opacityscale),"colorBounds"in ee&&(this.colorBounds=ee.colorBounds),"vertexColor"in ee&&(this.vertexColor=ee.vertexColor?1:0),"colormap"in ee&&this._colorMap.setPixels(this.genColormap(ee.colormap,this.opacityscale));var G=ee.field||ee.coords&&ee.coords[2]||null,re=!1;if(G||(this._field[2].shape[0]||this._field[2].shape[2]?G=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):G=this._field[2].hi(0,0)),"field"in ee||"coords"in ee){var H=(G.shape[0]+2)*(G.shape[1]+2);H>this._field[2].data.length&&(v.freeFloat(this._field[2].data),this._field[2].data=v.mallocFloat(l.nextPow2(H))),this._field[2]=w(this._field[2].data,[G.shape[0]+2,G.shape[1]+2]),this.padField(this._field[2],G),this.shape=G.shape.slice();for(var te=this.shape,ue=0;ue<2;++ue)this._field[2].size>this._field[ue].data.length&&(v.freeFloat(this._field[ue].data),this._field[ue].data=v.mallocFloat(this._field[2].size)),this._field[ue]=w(this._field[ue].data,[te[0]+2,te[1]+2]);if(ee.coords){var de=ee.coords;if(!Array.isArray(de)||de.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ue=0;ue<2;++ue){var Ee=de[ue];for(De=0;De<2;++De)if(Ee.shape[De]!==te[De])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ue],Ee)}}else if(ee.ticks){var Me=ee.ticks;if(!Array.isArray(Me)||Me.length!==2)throw new Error("gl-surface: invalid ticks");for(ue=0;ue<2;++ue){var ve=Me[ue];if((Array.isArray(ve)||ve.length)&&(ve=w(ve)),ve.shape[0]!==te[ue])throw new Error("gl-surface: invalid tick length");var Ae=w(ve.data,te);Ae.stride[ue]=ve.stride[0],Ae.stride[ue^1]=0,this.padField(this._field[ue],Ae)}}else{for(ue=0;ue<2;++ue){var ke=[0,0];ke[ue]=1,this._field[ue]=w(this._field[ue].data,[te[0]+2,te[1]+2],ke,0)}this._field[0].set(0,0,0);for(var De=0;De0){for(var Qn=0;Qn<5;++Qn)wr.pop();Qe-=1}continue e}}}ft.push(Qe)}this._contourOffsets[Cr]=Ar,this._contourCounts[Cr]=ft}var Fn=v.mallocFloat(wr.length);for(ue=0;ueD||R<0||R>D)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[h,R],A.bind(),E.texImage2D(E.TEXTURE_2D,0,A.format,h,R,0,A.format,A.type,null),A._mipLevels=[0],A}function m(A,h,R,E,D,N){this.gl=A,this.handle=h,this.format=D,this.type=N,this._shape=[R,E],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var I=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return I._wrapS},set:function(P){return I.wrapS=P}},{get:function(){return I._wrapT},set:function(P){return I.wrapT=P}}]),this._wrapVector=F;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return I._shape[0]},set:function(P){return I.width=P}},{get:function(){return I._shape[1]},set:function(P){return I.height=P}}]),this._shapeVector=L}var k=m.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var h=this.gl;if(this.type===h.FLOAT&&f.indexOf(A)>=0&&(h.getExtension("OES_texture_float_linear")||(A=h.NEAREST)),v.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var h=this.gl;if(this.type===h.FLOAT&&f.indexOf(A)>=0&&(h.getExtension("OES_texture_float_linear")||(A=h.NEAREST)),v.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var h=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,h!==this._anisoSamples){var R=this.gl.getExtension("EXT_texture_filter_anisotropic");R&&this.gl.texParameterf(this.gl.TEXTURE_2D,R.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),g.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),g.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var h=0;h<2;++h)if(g.indexOf(A[h])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var R=this.gl;return this.bind(),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,this._wrapS),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return M(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,M(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,M(this,this._shape[0],A),A}}}),k.bind=function(A){var h=this.gl;return A!==void 0&&h.activeTexture(h.TEXTURE0+(A|0)),h.bindTexture(h.TEXTURE_2D,this.handle),A!==void 0?A|0:h.getParameter(h.ACTIVE_TEXTURE)-h.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),h=0;A>0;++h,A>>>=1)this._mipLevels.indexOf(h)<0&&this._mipLevels.push(h)},k.setPixels=function(A,h,R,E){var D=this.gl;this.bind(),Array.isArray(h)?(E=R,R=h[1]|0,h=h[0]|0):(h=h||0,R=R||0),E=E||0;var N=y(A)?A:A.raw;if(N){var I=this._mipLevels.indexOf(E)<0;I?(D.texImage2D(D.TEXTURE_2D,0,this.format,this.format,this.type,N),this._mipLevels.push(E)):D.texSubImage2D(D.TEXTURE_2D,E,h,R,this.format,this.type,N)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||h+A.shape[1]>this._shape[1]>>>E||R+A.shape[0]>this._shape[0]>>>E||h<0||R<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");x(D,h,R,E,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,h){return A.length===3?h[2]===1&&h[1]===A[0]*A[2]&&h[0]===A[2]:h[0]===1&&h[1]===A[0]}function x(A,h,R,E,D,N,I,F){var L=F.dtype,P=F.shape.slice();if(P.length<2||P.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var O=0,U=0,X=S(P,F.stride.slice());L==="float32"?O=A.FLOAT:L==="float64"?(O=A.FLOAT,X=!1,L="float32"):L==="uint8"?O=A.UNSIGNED_BYTE:(O=A.UNSIGNED_BYTE,X=!1,L="uint8");var j=1;if(P.length===2)U=A.LUMINANCE,P=[P[0],P[1],1],F=l(F.data,P,[F.stride[0],F.stride[1],1],F.offset);else if(P.length===3){if(P[2]===1)U=A.ALPHA;else if(P[2]===2)U=A.LUMINANCE_ALPHA;else if(P[2]===3)U=A.RGB;else if(P[2]===4)U=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");j=P[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((U===A.LUMINANCE||U===A.ALPHA)&&(D===A.LUMINANCE||D===A.ALPHA)&&(U=D),U!==D)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var $=F.size,Y=I.indexOf(E)<0;if(Y&&I.push(E),O===N&&X)F.offset===0&&F.data.length===$?Y?A.texImage2D(A.TEXTURE_2D,E,D,P[0],P[1],0,D,N,F.data):A.texSubImage2D(A.TEXTURE_2D,E,h,R,P[0],P[1],D,N,F.data):Y?A.texImage2D(A.TEXTURE_2D,E,D,P[0],P[1],0,D,N,F.data.subarray(F.offset,F.offset+$)):A.texSubImage2D(A.TEXTURE_2D,E,h,R,P[0],P[1],D,N,F.data.subarray(F.offset,F.offset+$));else{var q;N===A.FLOAT?q=s.mallocFloat32($):q=s.mallocUint8($);var Z=l(q,P,[P[2],P[2]*P[0],1]);O===A.FLOAT&&N===A.UNSIGNED_BYTE?w(Z,F):u.assign(Z,F),Y?A.texImage2D(A.TEXTURE_2D,E,D,P[0],P[1],0,D,N,q.subarray(0,$)):A.texSubImage2D(A.TEXTURE_2D,E,h,R,P[0],P[1],D,N,q.subarray(0,$)),N===A.FLOAT?s.freeFloat32(q):s.freeUint8(q)}}function T(A){var h=A.createTexture();return A.bindTexture(A.TEXTURE_2D,h),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),h}function d(A,h,R,E,D){var N=A.getParameter(A.MAX_TEXTURE_SIZE);if(h<0||h>N||R<0||R>N)throw new Error("gl-texture2d: Invalid texture shape");if(D===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var I=T(A);return A.texImage2D(A.TEXTURE_2D,0,E,h,R,0,E,D,null),new m(A,I,h,R,E,D)}function b(A,h,R,E,D,N){var I=T(A);return A.texImage2D(A.TEXTURE_2D,0,D,D,N,h),new m(A,I,R,E,D,N)}function p(A,h){var R=h.dtype,E=h.shape.slice(),D=A.getParameter(A.MAX_TEXTURE_SIZE);if(E[0]<0||E[0]>D||E[1]<0||E[1]>D)throw new Error("gl-texture2d: Invalid texture size");var N=S(E,h.stride.slice()),I=0;R==="float32"?I=A.FLOAT:R==="float64"?(I=A.FLOAT,N=!1,R="float32"):R==="uint8"?I=A.UNSIGNED_BYTE:(I=A.UNSIGNED_BYTE,N=!1,R="uint8");var F=0;if(E.length===2)F=A.LUMINANCE,E=[E[0],E[1],1],h=l(h.data,E,[h.stride[0],h.stride[1],1],h.offset);else if(E.length===3)if(E[2]===1)F=A.ALPHA;else if(E[2]===2)F=A.LUMINANCE_ALPHA;else if(E[2]===3)F=A.RGB;else if(E[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");I===A.FLOAT&&!A.getExtension("OES_texture_float")&&(I=A.UNSIGNED_BYTE,N=!1);var L,P,O=h.size;if(N)h.offset===0&&h.data.length===O?L=h.data:L=h.data.subarray(h.offset,h.offset+O);else{var U=[E[2],E[2]*E[0],1];P=s.malloc(O,R);var X=l(P,E,U,0);(R==="float32"||R==="float64")&&I===A.UNSIGNED_BYTE?w(X,h):u.assign(X,h),L=P.subarray(0,O)}var j=T(A);return A.texImage2D(A.TEXTURE_2D,0,F,E[0],E[1],0,F,I,L),N||s.free(P),new m(A,j,E[0],E[1],F,I)}function c(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||_(A),typeof arguments[1]=="number")return d(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return d(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var h=arguments[1],R=y(h)?h:h.raw;if(R)return b(A,R,h.width|0,h.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(h.shape&&h.data&&h.stride)return p(A,h)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(a){"use strict";function o(i,l,u){l?l.bind():i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null);var s=i.getParameter(i.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>s)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(w)}},9226:function(a){a.exports=o;function o(i,l){return i[0]=Math.ceil(l[0]),i[1]=Math.ceil(l[1]),i[2]=Math.ceil(l[2]),i}},3126:function(a){a.exports=o;function o(i){var l=new Float32Array(3);return l[0]=i[0],l[1]=i[1],l[2]=i[2],l}},3990:function(a){a.exports=o;function o(i,l){return i[0]=l[0],i[1]=l[1],i[2]=l[2],i}},1091:function(a){a.exports=o;function o(){var i=new Float32Array(3);return i[0]=0,i[1]=0,i[2]=0,i}},5911:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[0],_=u[1],y=u[2];return i[0]=f*y-v*_,i[1]=v*g-s*y,i[2]=s*_-f*g,i}},5455:function(a,o,i){a.exports=i(7056)},7056:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2];return Math.sqrt(u*u+s*s+f*f)}},4008:function(a,o,i){a.exports=i(6690)},6690:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]/u[0],i[1]=l[1]/u[1],i[2]=l[2]/u[2],i}},244:function(a){a.exports=o;function o(i,l){return i[0]*l[0]+i[1]*l[1]+i[2]*l[2]}},2613:function(a){a.exports=1e-6},9922:function(a,o,i){a.exports=u;var l=i(2613);function u(s,f){var v=s[0],g=s[1],_=s[2],y=f[0],w=f[1],M=f[2];return Math.abs(v-y)<=l*Math.max(1,Math.abs(v),Math.abs(y))&&Math.abs(g-w)<=l*Math.max(1,Math.abs(g),Math.abs(w))&&Math.abs(_-M)<=l*Math.max(1,Math.abs(_),Math.abs(M))}},9265:function(a){a.exports=o;function o(i,l){return i[0]===l[0]&&i[1]===l[1]&&i[2]===l[2]}},2681:function(a){a.exports=o;function o(i,l){return i[0]=Math.floor(l[0]),i[1]=Math.floor(l[1]),i[2]=Math.floor(l[2]),i}},5137:function(a,o,i){a.exports=u;var l=i(1091)();function u(s,f,v,g,_,y){var w,M;for(f||(f=3),v||(v=0),g?M=Math.min(g*f+v,s.length):M=s.length,w=v;w0&&(v=1/Math.sqrt(v),i[0]=l[0]*v,i[1]=l[1]*v,i[2]=l[2]*v),i}},7636:function(a){a.exports=o;function o(i,l){l=l||1;var u=Math.random()*2*Math.PI,s=Math.random()*2-1,f=Math.sqrt(1-s*s)*l;return i[0]=Math.cos(u)*f,i[1]=Math.sin(u)*f,i[2]=s*l,i}},6894:function(a){a.exports=o;function o(i,l,u,s){var f=u[1],v=u[2],g=l[1]-f,_=l[2]-v,y=Math.sin(s),w=Math.cos(s);return i[0]=l[0],i[1]=f+g*w-_*y,i[2]=v+g*y+_*w,i}},109:function(a){a.exports=o;function o(i,l,u,s){var f=u[0],v=u[2],g=l[0]-f,_=l[2]-v,y=Math.sin(s),w=Math.cos(s);return i[0]=f+_*y+g*w,i[1]=l[1],i[2]=v+_*w-g*y,i}},8692:function(a){a.exports=o;function o(i,l,u,s){var f=u[0],v=u[1],g=l[0]-f,_=l[1]-v,y=Math.sin(s),w=Math.cos(s);return i[0]=f+g*w-_*y,i[1]=v+g*y+_*w,i[2]=l[2],i}},2447:function(a){a.exports=o;function o(i,l){return i[0]=Math.round(l[0]),i[1]=Math.round(l[1]),i[2]=Math.round(l[2]),i}},6621:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]*u,i[1]=l[1]*u,i[2]=l[2]*u,i}},8489:function(a){a.exports=o;function o(i,l,u,s){return i[0]=l[0]+u[0]*s,i[1]=l[1]+u[1]*s,i[2]=l[2]+u[2]*s,i}},1463:function(a){a.exports=o;function o(i,l,u,s){return i[0]=l,i[1]=u,i[2]=s,i}},6141:function(a,o,i){a.exports=i(2953)},5486:function(a,o,i){a.exports=i(3066)},2953:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2];return u*u+s*s+f*f}},3066:function(a){a.exports=o;function o(i){var l=i[0],u=i[1],s=i[2];return l*l+u*u+s*s}},2229:function(a,o,i){a.exports=i(6843)},6843:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]-u[0],i[1]=l[1]-u[1],i[2]=l[2]-u[2],i}},492:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2];return i[0]=s*u[0]+f*u[3]+v*u[6],i[1]=s*u[1]+f*u[4]+v*u[7],i[2]=s*u[2]+f*u[5]+v*u[8],i}},5673:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[3]*s+u[7]*f+u[11]*v+u[15];return g=g||1,i[0]=(u[0]*s+u[4]*f+u[8]*v+u[12])/g,i[1]=(u[1]*s+u[5]*f+u[9]*v+u[13])/g,i[2]=(u[2]*s+u[6]*f+u[10]*v+u[14])/g,i}},264:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[0],_=u[1],y=u[2],w=u[3],M=w*s+_*v-y*f,m=w*f+y*s-g*v,k=w*v+g*f-_*s,S=-g*s-_*f-y*v;return i[0]=M*w+S*-g+m*-y-k*-_,i[1]=m*w+S*-_+k*-g-M*-y,i[2]=k*w+S*-y+M*-_-m*-g,i}},4361:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]+u[0],i[1]=l[1]+u[1],i[2]=l[2]+u[2],i[3]=l[3]+u[3],i}},2335:function(a){a.exports=o;function o(i){var l=new Float32Array(4);return l[0]=i[0],l[1]=i[1],l[2]=i[2],l[3]=i[3],l}},2933:function(a){a.exports=o;function o(i,l){return i[0]=l[0],i[1]=l[1],i[2]=l[2],i[3]=l[3],i}},7536:function(a){a.exports=o;function o(){var i=new Float32Array(4);return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i}},4691:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2],v=l[3]-i[3];return Math.sqrt(u*u+s*s+f*f+v*v)}},1373:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]/u[0],i[1]=l[1]/u[1],i[2]=l[2]/u[2],i[3]=l[3]/u[3],i}},3750:function(a){a.exports=o;function o(i,l){return i[0]*l[0]+i[1]*l[1]+i[2]*l[2]+i[3]*l[3]}},3390:function(a){a.exports=o;function o(i,l,u,s){var f=new Float32Array(4);return f[0]=i,f[1]=l,f[2]=u,f[3]=s,f}},9970:function(a,o,i){a.exports={create:i(7536),clone:i(2335),fromValues:i(3390),copy:i(2933),set:i(4578),add:i(4361),subtract:i(6860),multiply:i(3576),divide:i(1373),min:i(2334),max:i(160),scale:i(9288),scaleAndAdd:i(4844),distance:i(4691),squaredDistance:i(7960),length:i(6808),squaredLength:i(483),negate:i(1498),inverse:i(4494),normalize:i(5177),dot:i(3750),lerp:i(2573),random:i(9131),transformMat4:i(5352),transformQuat:i(4041)}},4494:function(a){a.exports=o;function o(i,l){return i[0]=1/l[0],i[1]=1/l[1],i[2]=1/l[2],i[3]=1/l[3],i}},6808:function(a){a.exports=o;function o(i){var l=i[0],u=i[1],s=i[2],f=i[3];return Math.sqrt(l*l+u*u+s*s+f*f)}},2573:function(a){a.exports=o;function o(i,l,u,s){var f=l[0],v=l[1],g=l[2],_=l[3];return i[0]=f+s*(u[0]-f),i[1]=v+s*(u[1]-v),i[2]=g+s*(u[2]-g),i[3]=_+s*(u[3]-_),i}},160:function(a){a.exports=o;function o(i,l,u){return i[0]=Math.max(l[0],u[0]),i[1]=Math.max(l[1],u[1]),i[2]=Math.max(l[2],u[2]),i[3]=Math.max(l[3],u[3]),i}},2334:function(a){a.exports=o;function o(i,l,u){return i[0]=Math.min(l[0],u[0]),i[1]=Math.min(l[1],u[1]),i[2]=Math.min(l[2],u[2]),i[3]=Math.min(l[3],u[3]),i}},3576:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]*u[0],i[1]=l[1]*u[1],i[2]=l[2]*u[2],i[3]=l[3]*u[3],i}},1498:function(a){a.exports=o;function o(i,l){return i[0]=-l[0],i[1]=-l[1],i[2]=-l[2],i[3]=-l[3],i}},5177:function(a){a.exports=o;function o(i,l){var u=l[0],s=l[1],f=l[2],v=l[3],g=u*u+s*s+f*f+v*v;return g>0&&(g=1/Math.sqrt(g),i[0]=u*g,i[1]=s*g,i[2]=f*g,i[3]=v*g),i}},9131:function(a,o,i){var l=i(5177),u=i(9288);a.exports=s;function s(f,v){return v=v||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),l(f,f),u(f,f,v),f}},9288:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]*u,i[1]=l[1]*u,i[2]=l[2]*u,i[3]=l[3]*u,i}},4844:function(a){a.exports=o;function o(i,l,u,s){return i[0]=l[0]+u[0]*s,i[1]=l[1]+u[1]*s,i[2]=l[2]+u[2]*s,i[3]=l[3]+u[3]*s,i}},4578:function(a){a.exports=o;function o(i,l,u,s,f){return i[0]=l,i[1]=u,i[2]=s,i[3]=f,i}},7960:function(a){a.exports=o;function o(i,l){var u=l[0]-i[0],s=l[1]-i[1],f=l[2]-i[2],v=l[3]-i[3];return u*u+s*s+f*f+v*v}},483:function(a){a.exports=o;function o(i){var l=i[0],u=i[1],s=i[2],f=i[3];return l*l+u*u+s*s+f*f}},6860:function(a){a.exports=o;function o(i,l,u){return i[0]=l[0]-u[0],i[1]=l[1]-u[1],i[2]=l[2]-u[2],i[3]=l[3]-u[3],i}},5352:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=l[3];return i[0]=u[0]*s+u[4]*f+u[8]*v+u[12]*g,i[1]=u[1]*s+u[5]*f+u[9]*v+u[13]*g,i[2]=u[2]*s+u[6]*f+u[10]*v+u[14]*g,i[3]=u[3]*s+u[7]*f+u[11]*v+u[15]*g,i}},4041:function(a){a.exports=o;function o(i,l,u){var s=l[0],f=l[1],v=l[2],g=u[0],_=u[1],y=u[2],w=u[3],M=w*s+_*v-y*f,m=w*f+y*s-g*v,k=w*v+g*f-_*s,S=-g*s-_*f-y*v;return i[0]=M*w+S*-g+m*-y-k*-_,i[1]=m*w+S*-_+k*-g-M*-y,i[2]=k*w+S*-y+M*-_-m*-g,i[3]=l[3],i}},1848:function(a,o,i){var l=i(4905),u=i(6468);a.exports=s;function s(f){for(var v=Array.isArray(f)?f:l(f),g=0;g0)continue;ye=ge.slice(0,1).join("")}return re(ye),$+=ye.length,L=L.slice(ye.length),L.length}while(!0)}function De(){return/[^a-fA-F0-9]/.test(I)?(re(L.join("")),N=g,E):(L.push(I),F=I,E+1)}function Ce(){return I==="."||/[eE]/.test(I)?(L.push(I),N=S,F=I,E+1):I==="x"&&L.length===1&&L[0]==="0"?(N=c,L.push(I),F=I,E+1):/[^\d]/.test(I)?(re(L.join("")),N=g,E):(L.push(I),F=I,E+1)}function Oe(){return I==="f"&&(L.push(I),F=I,E+=1),/[eE]/.test(I)||(I==="-"||I==="+")&&/[eE]/.test(F)?(L.push(I),F=I,E+1):/[^\d]/.test(I)?(re(L.join("")),N=g,E):(L.push(I),F=I,E+1)}function Ue(){if(/[^\d\w_]/.test(I)){var ge=L.join("");return G[ge]?N=d:ee[ge]?N=T:N=x,re(L.join("")),N=g,E}return L.push(I),F=I,E+1}}},3508:function(a,o,i){var l=i(6852);l=l.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),a.exports=l.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(a){a.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(a,o,i){var l=i(620);a.exports=l.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(a,o,i){var l=i(5874);a.exports=u;function u(s,f){var v=l(f),g=[];return g=g.concat(v(s)),g=g.concat(v(null)),g}},3236:function(a){a.exports=function(o){typeof o=="string"&&(o=[o]);for(var i=[].slice.call(arguments,1),l=[],u=0;u>1,M=-7,m=u?f-1:0,k=u?-1:1,S=i[l+m];for(m+=k,v=S&(1<<-M)-1,S>>=-M,M+=_;M>0;v=v*256+i[l+m],m+=k,M-=8);for(g=v&(1<<-M)-1,v>>=-M,M+=s;M>0;g=g*256+i[l+m],m+=k,M-=8);if(v===0)v=1-w;else{if(v===y)return g?NaN:(S?-1:1)*(1/0);g=g+Math.pow(2,s),v=v-w}return(S?-1:1)*g*Math.pow(2,v-s)},o.write=function(i,l,u,s,f,v){var g,_,y,w=v*8-f-1,M=(1<>1,k=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=s?0:v-1,x=s?1:-1,T=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(_=isNaN(l)?1:0,g=M):(g=Math.floor(Math.log(l)/Math.LN2),l*(y=Math.pow(2,-g))<1&&(g--,y*=2),g+m>=1?l+=k/y:l+=k*Math.pow(2,1-m),l*y>=2&&(g++,y/=2),g+m>=M?(_=0,g=M):g+m>=1?(_=(l*y-1)*Math.pow(2,f),g=g+m):(_=l*Math.pow(2,m-1)*Math.pow(2,f),g=0));f>=8;i[u+S]=_&255,S+=x,_/=256,f-=8);for(g=g<0;i[u+S]=g&255,S+=x,g/=256,w-=8);i[u+S-x]|=T*128}},8954:function(a,o,i){"use strict";a.exports=m;var l=i(3250),u=i(6803).Fw;function s(k,S,x){this.vertices=k,this.adjacent=S,this.boundary=x,this.lastVisited=-1}s.prototype.flip=function(){var k=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=k;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function f(k,S,x){this.vertices=k,this.cell=S,this.index=x}function v(k,S){return u(k.vertices,S.vertices)}function g(k){return function(){var S=this.tuple;return k.apply(this,S)}}function _(k){var S=l[k+1];return S||(S=l),g(S)}var y=[];function w(k,S,x){this.dimension=k,this.vertices=S,this.simplices=x,this.interior=x.filter(function(b){return!b.boundary}),this.tuple=new Array(k+1);for(var T=0;T<=k;++T)this.tuple[T]=this.vertices[T];var d=y[k];d||(d=y[k]=_(k)),this.orient=d}var M=w.prototype;M.handleBoundaryDegeneracy=function(k,S){var x=this.dimension,T=this.vertices.length-1,d=this.tuple,b=this.vertices,p=[k];for(k.lastVisited=-T;p.length>0;){k=p.pop();for(var c=k.adjacent,A=0;A<=x;++A){var h=c[A];if(!(!h.boundary||h.lastVisited<=-T)){for(var R=h.vertices,E=0;E<=x;++E){var D=R[E];D<0?d[E]=S:d[E]=b[D]}var N=this.orient();if(N>0)return h;h.lastVisited=-T,N===0&&p.push(h)}}}return null},M.walk=function(k,S){var x=this.vertices.length-1,T=this.dimension,d=this.vertices,b=this.tuple,p=S?this.interior.length*Math.random()|0:this.interior.length-1,c=this.interior[p];e:for(;!c.boundary;){for(var A=c.vertices,h=c.adjacent,R=0;R<=T;++R)b[R]=d[A[R]];c.lastVisited=x;for(var R=0;R<=T;++R){var E=h[R];if(!(E.lastVisited>=x)){var D=b[R];b[R]=k;var N=this.orient();if(b[R]=D,N<0){c=E;continue e}else E.boundary?E.lastVisited=-x:E.lastVisited=x}}return}return c},M.addPeaks=function(k,S){var x=this.vertices.length-1,T=this.dimension,d=this.vertices,b=this.tuple,p=this.interior,c=this.simplices,A=[S];S.lastVisited=x,S.vertices[S.vertices.indexOf(-1)]=x,S.boundary=!1,p.push(S);for(var h=[];A.length>0;){var S=A.pop(),R=S.vertices,E=S.adjacent,D=R.indexOf(x);if(!(D<0)){for(var N=0;N<=T;++N)if(N!==D){var I=E[N];if(!(!I.boundary||I.lastVisited>=x)){var F=I.vertices;if(I.lastVisited!==-x){for(var L=0,P=0;P<=T;++P)F[P]<0?(L=P,b[P]=k):b[P]=d[F[P]];var O=this.orient();if(O>0){F[L]=x,I.boundary=!1,p.push(I),A.push(I),I.lastVisited=x;continue}else I.lastVisited=-x}var U=I.adjacent,X=R.slice(),j=E.slice(),$=new s(X,j,!0);c.push($);var Y=U.indexOf(S);if(!(Y<0)){U[Y]=$,j[D]=I,X[N]=-1,j[N]=S,E[N]=$,$.flip();for(var P=0;P<=T;++P){var q=X[P];if(!(q<0||q===x)){for(var Z=new Array(T-1),ne=0,Q=0;Q<=T;++Q){var oe=X[Q];oe<0||Q===P||(Z[ne++]=oe)}h.push(new f(Z,$,P))}}}}}}}h.sort(v);for(var N=0;N+1=0?p[A++]=c[R]:h=R&1;if(h===(k&1)){var E=p[0];p[0]=p[1],p[1]=E}S.push(p)}}return S};function m(k,S){var x=k.length;if(x===0)throw new Error("Must have at least d+1 points");var T=k[0].length;if(x<=T)throw new Error("Must input at least d+1 points");var d=k.slice(0,T+1),b=l.apply(void 0,d);if(b===0)throw new Error("Input not in general position");for(var p=new Array(T+1),c=0;c<=T;++c)p[c]=c;b<0&&(p[0]=1,p[1]=0);for(var A=new s(p,new Array(T+1),!1),h=A.adjacent,R=new Array(T+2),c=0;c<=T;++c){for(var E=p.slice(),D=0;D<=T;++D)D===c&&(E[D]=-1);var N=E[0];E[0]=E[1],E[1]=N;var I=new s(E,new Array(T+1),!0);h[c]=I,R[c]=I}R[T+1]=A;for(var c=0;c<=T;++c)for(var E=h[c].vertices,F=h[c].adjacent,D=0;D<=T;++D){var L=E[D];if(L<0){F[D]=A;continue}for(var P=0;P<=T;++P)h[P].vertices.indexOf(L)<0&&(F[D]=h[P])}for(var O=new w(T,d,R),U=!!S,c=T+1;c3*(R+1)?w(this,h):this.left.insert(h):this.left=b([h]);else if(h[0]>this.mid)this.right?4*(this.right.count+1)>3*(R+1)?w(this,h):this.right.insert(h):this.right=b([h]);else{var E=l.ge(this.leftPoints,h,T),D=l.ge(this.rightPoints,h,d);this.leftPoints.splice(E,0,h),this.rightPoints.splice(D,0,h)}},g.remove=function(h){var R=this.count-this.leftPoints;if(h[1]3*(R-1))return M(this,h);var D=this.left.remove(h);return D===f?(this.left=null,this.count-=1,s):(D===s&&(this.count-=1),D)}else if(h[0]>this.mid){if(!this.right)return u;var N=this.left?this.left.count:0;if(4*N>3*(R-1))return M(this,h);var D=this.right.remove(h);return D===f?(this.right=null,this.count-=1,s):(D===s&&(this.count-=1),D)}else{if(this.count===1)return this.leftPoints[0]===h?f:u;if(this.leftPoints.length===1&&this.leftPoints[0]===h){if(this.left&&this.right){for(var I=this,F=this.left;F.right;)I=F,F=F.right;if(I===this)F.right=this.right;else{var L=this.left,D=this.right;I.count-=F.count,I.right=F.left,F.left=L,F.right=D}_(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?_(this,this.left):_(this,this.right);return s}for(var L=l.ge(this.leftPoints,h,T);L=0&&h[D][1]>=R;--D){var N=E(h[D]);if(N)return N}}function S(h,R){for(var E=0;Ethis.mid){if(this.right){var E=this.right.queryPoint(h,R);if(E)return E}return k(this.rightPoints,h,R)}else return S(this.leftPoints,R)},g.queryInterval=function(h,R,E){if(hthis.mid&&this.right){var D=this.right.queryInterval(h,R,E);if(D)return D}return Rthis.mid?k(this.rightPoints,h,E):S(this.leftPoints,E)};function x(h,R){return h-R}function T(h,R){var E=h[0]-R[0];return E||h[1]-R[1]}function d(h,R){var E=h[1]-R[1];return E||h[0]-R[0]}function b(h){if(h.length===0)return null;for(var R=[],E=0;E>1],N=[],I=[],F=[],E=0;E13)&&l!==32&&l!==133&&l!==160&&l!==5760&&l!==6158&&(l<8192||l>8205)&&l!==8232&&l!==8233&&l!==8239&&l!==8287&&l!==8288&&l!==12288&&l!==65279)return!1;return!0}},395:function(a){function o(i,l,u){return i*(1-u)+l*u}a.exports=o},2652:function(a,o,i){var l=i(4335),u=i(6864),s=i(1903),f=i(9921),v=i(7608),g=i(5665),_={length:i(1387),normalize:i(3536),dot:i(244),cross:i(5911)},y=u(),w=u(),M=[0,0,0,0],m=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];a.exports=function(b,p,c,A,h,R){if(p||(p=[0,0,0]),c||(c=[0,0,0]),A||(A=[0,0,0]),h||(h=[0,0,0,1]),R||(R=[0,0,0,1]),!l(y,b)||(s(w,y),w[3]=0,w[7]=0,w[11]=0,w[15]=1,Math.abs(f(w)<1e-8)))return!1;var E=y[3],D=y[7],N=y[11],I=y[12],F=y[13],L=y[14],P=y[15];if(E!==0||D!==0||N!==0){M[0]=E,M[1]=D,M[2]=N,M[3]=P;var O=v(w,w);if(!O)return!1;g(w,w),S(h,M,w)}else h[0]=h[1]=h[2]=0,h[3]=1;if(p[0]=I,p[1]=F,p[2]=L,x(m,y),c[0]=_.length(m[0]),_.normalize(m[0],m[0]),A[0]=_.dot(m[0],m[1]),T(m[1],m[1],m[0],1,-A[0]),c[1]=_.length(m[1]),_.normalize(m[1],m[1]),A[0]/=c[1],A[1]=_.dot(m[0],m[2]),T(m[2],m[2],m[0],1,-A[1]),A[2]=_.dot(m[1],m[2]),T(m[2],m[2],m[1],1,-A[2]),c[2]=_.length(m[2]),_.normalize(m[2],m[2]),A[1]/=c[2],A[2]/=c[2],_.cross(k,m[1],m[2]),_.dot(m[0],k)<0)for(var U=0;U<3;U++)c[U]*=-1,m[U][0]*=-1,m[U][1]*=-1,m[U][2]*=-1;return R[0]=.5*Math.sqrt(Math.max(1+m[0][0]-m[1][1]-m[2][2],0)),R[1]=.5*Math.sqrt(Math.max(1-m[0][0]+m[1][1]-m[2][2],0)),R[2]=.5*Math.sqrt(Math.max(1-m[0][0]-m[1][1]+m[2][2],0)),R[3]=.5*Math.sqrt(Math.max(1+m[0][0]+m[1][1]+m[2][2],0)),m[2][1]>m[1][2]&&(R[0]=-R[0]),m[0][2]>m[2][0]&&(R[1]=-R[1]),m[1][0]>m[0][1]&&(R[2]=-R[2]),!0};function S(d,b,p){var c=b[0],A=b[1],h=b[2],R=b[3];return d[0]=p[0]*c+p[4]*A+p[8]*h+p[12]*R,d[1]=p[1]*c+p[5]*A+p[9]*h+p[13]*R,d[2]=p[2]*c+p[6]*A+p[10]*h+p[14]*R,d[3]=p[3]*c+p[7]*A+p[11]*h+p[15]*R,d}function x(d,b){d[0][0]=b[0],d[0][1]=b[1],d[0][2]=b[2],d[1][0]=b[4],d[1][1]=b[5],d[1][2]=b[6],d[2][0]=b[8],d[2][1]=b[9],d[2][2]=b[10]}function T(d,b,p,c,A){d[0]=b[0]*c+p[0]*A,d[1]=b[1]*c+p[1]*A,d[2]=b[2]*c+p[2]*A}},4335:function(a){a.exports=function(i,l){var u=l[15];if(u===0)return!1;for(var s=1/u,f=0;f<16;f++)i[f]=l[f]*s;return!0}},7442:function(a,o,i){var l=i(6658),u=i(7182),s=i(2652),f=i(9921),v=i(8648),g=M(),_=M(),y=M();a.exports=w;function w(S,x,T,d){if(f(x)===0||f(T)===0)return!1;var b=s(x,g.translate,g.scale,g.skew,g.perspective,g.quaternion),p=s(T,_.translate,_.scale,_.skew,_.perspective,_.quaternion);return!b||!p?!1:(l(y.translate,g.translate,_.translate,d),l(y.skew,g.skew,_.skew,d),l(y.scale,g.scale,_.scale,d),l(y.perspective,g.perspective,_.perspective,d),v(y.quaternion,g.quaternion,_.quaternion,d),u(S,y.translate,y.scale,y.skew,y.perspective,y.quaternion),!0)}function M(){return{translate:m(),scale:m(1),skew:m(),perspective:k(),quaternion:k()}}function m(S){return[S||0,S||0,S||0]}function k(){return[0,0,0,1]}},7182:function(a,o,i){var l={identity:i(7894),translate:i(7656),multiply:i(6760),create:i(6864),scale:i(2504),fromRotationTranslation:i(6743)},u=l.create(),s=l.create();a.exports=function(v,g,_,y,w,M){return l.identity(v),l.fromRotationTranslation(v,M,g),v[3]=w[0],v[7]=w[1],v[11]=w[2],v[15]=w[3],l.identity(s),y[2]!==0&&(s[9]=y[2],l.multiply(v,v,s)),y[1]!==0&&(s[9]=0,s[8]=y[1],l.multiply(v,v,s)),y[0]!==0&&(s[8]=0,s[4]=y[0],l.multiply(v,v,s)),l.scale(v,v,_),v}},1811:function(a,o,i){"use strict";var l=i(2478),u=i(7442),s=i(7608),f=i(5567),v=i(2408),g=i(7089),_=i(6582),y=i(7656),w=i(2504),M=i(3536),m=[0,0,0];a.exports=T;function k(d){this._components=d.slice(),this._time=[0],this.prevMatrix=d.slice(),this.nextMatrix=d.slice(),this.computedMatrix=d.slice(),this.computedInverse=d.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var S=k.prototype;S.recalcMatrix=function(d){var b=this._time,p=l.le(b,d),c=this.computedMatrix;if(!(p<0)){var A=this._components;if(p===b.length-1)for(var h=16*p,R=0;R<16;++R)c[R]=A[h++];else{for(var E=b[p+1]-b[p],h=16*p,D=this.prevMatrix,N=!0,R=0;R<16;++R)D[R]=A[h++];for(var I=this.nextMatrix,R=0;R<16;++R)I[R]=A[h++],N=N&&D[R]===I[R];if(E<1e-6||N)for(var R=0;R<16;++R)c[R]=D[R];else u(c,D,I,(d-b[p])/E)}var F=this.computedUp;F[0]=c[1],F[1]=c[5],F[2]=c[9],M(F,F);var L=this.computedInverse;s(L,c);var P=this.computedEye,O=L[15];P[0]=L[12]/O,P[1]=L[13]/O,P[2]=L[14]/O;for(var U=this.computedCenter,X=Math.exp(this.computedRadius[0]),R=0;R<3;++R)U[R]=P[R]-c[2+4*R]*X}},S.idle=function(d){if(!(d1&&l(s[_[m-2]],s[_[m-1]],M)<=0;)m-=1,_.pop();for(_.push(w),m=y.length;m>1&&l(s[y[m-2]],s[y[m-1]],M)>=0;)m-=1,y.pop();y.push(w)}for(var k=new Array(y.length+_.length-2),S=0,v=0,x=_.length;v0;--T)k[S++]=y[T];return k}},351:function(a,o,i){"use strict";a.exports=u;var l=i(4687);function u(s,f){f||(f=s,s=window);var v=0,g=0,_=0,y={shift:!1,alt:!1,control:!1,meta:!1},w=!1;function M(h){var R=!1;return"altKey"in h&&(R=R||h.altKey!==y.alt,y.alt=!!h.altKey),"shiftKey"in h&&(R=R||h.shiftKey!==y.shift,y.shift=!!h.shiftKey),"ctrlKey"in h&&(R=R||h.ctrlKey!==y.control,y.control=!!h.ctrlKey),"metaKey"in h&&(R=R||h.metaKey!==y.meta,y.meta=!!h.metaKey),R}function m(h,R){var E=l.x(R),D=l.y(R);"buttons"in R&&(h=R.buttons|0),(h!==v||E!==g||D!==_||M(R))&&(v=h|0,g=E||0,_=D||0,f&&f(v,g,_,y))}function k(h){m(0,h)}function S(){(v||g||_||y.shift||y.alt||y.meta||y.control)&&(g=_=0,v=0,y.shift=y.alt=y.control=y.meta=!1,f&&f(0,0,0,y))}function x(h){M(h)&&f&&f(v,g,_,y)}function T(h){l.buttons(h)===0?m(0,h):m(v,h)}function d(h){m(v|l.buttons(h),h)}function b(h){m(v&~l.buttons(h),h)}function p(){w||(w=!0,s.addEventListener("mousemove",T),s.addEventListener("mousedown",d),s.addEventListener("mouseup",b),s.addEventListener("mouseleave",k),s.addEventListener("mouseenter",k),s.addEventListener("mouseout",k),s.addEventListener("mouseover",k),s.addEventListener("blur",S),s.addEventListener("keyup",x),s.addEventListener("keydown",x),s.addEventListener("keypress",x),s!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",x),window.addEventListener("keydown",x),window.addEventListener("keypress",x)))}function c(){w&&(w=!1,s.removeEventListener("mousemove",T),s.removeEventListener("mousedown",d),s.removeEventListener("mouseup",b),s.removeEventListener("mouseleave",k),s.removeEventListener("mouseenter",k),s.removeEventListener("mouseout",k),s.removeEventListener("mouseover",k),s.removeEventListener("blur",S),s.removeEventListener("keyup",x),s.removeEventListener("keydown",x),s.removeEventListener("keypress",x),s!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",x),window.removeEventListener("keydown",x),window.removeEventListener("keypress",x)))}p();var A={element:s};return Object.defineProperties(A,{enabled:{get:function(){return w},set:function(h){h?p():c()},enumerable:!0},buttons:{get:function(){return v},enumerable:!0},x:{get:function(){return g},enumerable:!0},y:{get:function(){return _},enumerable:!0},mods:{get:function(){return y},enumerable:!0}}),A}},24:function(a){var o={left:0,top:0};a.exports=i;function i(u,s,f){s=s||u.currentTarget||u.srcElement,Array.isArray(f)||(f=[0,0]);var v=u.clientX||0,g=u.clientY||0,_=l(s);return f[0]=v-_.left,f[1]=g-_.top,f}function l(u){return u===window||u===document||u===document.body?o:u.getBoundingClientRect()}},4687:function(a,o){"use strict";function i(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var v=f.which;if(v===2)return 4;if(v===3)return 2;if(v>0)return 1<=0)return 1<0){if(j=1,q[ne++]=y(p[R],S,x,T),R+=O,d>0)for(X=1,E=p[R],Q=q[ne]=y(E,S,x,T),G=q[ne+oe],te=q[ne+re],Ee=q[ne+ue],(Q!==G||Q!==te||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,G,te,Ee,S,x,T),Me=Z[ne]=$++),ne+=1,R+=O,X=2;X0)for(X=1,E=p[R],Q=q[ne]=y(E,S,x,T),G=q[ne+oe],te=q[ne+re],Ee=q[ne+ue],(Q!==G||Q!==te||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,G,te,Ee,S,x,T),Me=Z[ne]=$++,Ee!==te&&_(Z[ne+re],Me,F,P,te,Ee,S,x,T)),ne+=1,R+=O,X=2;X0){if(X=1,q[ne++]=y(p[R],S,x,T),R+=O,b>0)for(j=1,E=p[R],Q=q[ne]=y(E,S,x,T),te=q[ne+re],G=q[ne+oe],Ee=q[ne+ue],(Q!==te||Q!==G||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,te,G,Ee,S,x,T),Me=Z[ne]=$++),ne+=1,R+=O,j=2;j0)for(j=1,E=p[R],Q=q[ne]=y(E,S,x,T),te=q[ne+re],G=q[ne+oe],Ee=q[ne+ue],(Q!==te||Q!==G||Q!==Ee)&&(N=p[R+D],F=p[R+I],P=p[R+L],g(X,j,E,N,F,P,Q,te,G,Ee,S,x,T),Me=Z[ne]=$++,Ee!==te&&_(Z[ne+re],Me,P,N,Ee,te,S,x,T)),ne+=1,R+=O,j=2;j 0"),typeof v.vertex!="function"&&g("Must specify vertex creation function"),typeof v.cell!="function"&&g("Must specify cell creation function"),typeof v.phase!="function"&&g("Must specify phase function");for(var M=v.getters||[],m=new Array(y),k=0;k=0?m[k]=!0:m[k]=!1;return s(v.vertex,v.cell,v.phase,w,_,m)}},6199:function(a,o,i){"use strict";var l=i(1338),u={zero:function(T,d,b,p){var c=T[0],A=b[0];p|=0;var h=0,R=A;for(h=0;h2&&h[1]>2&&p(A.pick(-1,-1).lo(1,1).hi(h[0]-2,h[1]-2),c.pick(-1,-1,0).lo(1,1).hi(h[0]-2,h[1]-2),c.pick(-1,-1,1).lo(1,1).hi(h[0]-2,h[1]-2)),h[1]>2&&(b(A.pick(0,-1).lo(1).hi(h[1]-2),c.pick(0,-1,1).lo(1).hi(h[1]-2)),d(c.pick(0,-1,0).lo(1).hi(h[1]-2))),h[1]>2&&(b(A.pick(h[0]-1,-1).lo(1).hi(h[1]-2),c.pick(h[0]-1,-1,1).lo(1).hi(h[1]-2)),d(c.pick(h[0]-1,-1,0).lo(1).hi(h[1]-2))),h[0]>2&&(b(A.pick(-1,0).lo(1).hi(h[0]-2),c.pick(-1,0,0).lo(1).hi(h[0]-2)),d(c.pick(-1,0,1).lo(1).hi(h[0]-2))),h[0]>2&&(b(A.pick(-1,h[1]-1).lo(1).hi(h[0]-2),c.pick(-1,h[1]-1,0).lo(1).hi(h[0]-2)),d(c.pick(-1,h[1]-1,1).lo(1).hi(h[0]-2))),c.set(0,0,0,0),c.set(0,0,1,0),c.set(h[0]-1,0,0,0),c.set(h[0]-1,0,1,0),c.set(0,h[1]-1,0,0),c.set(0,h[1]-1,1,0),c.set(h[0]-1,h[1]-1,0,0),c.set(h[0]-1,h[1]-1,1,0),c}}function x(T){var d=T.join(),h=y[d];if(h)return h;for(var b=T.length,p=[M,m],c=1;c<=b;++c)p.push(k(c));var A=S,h=A.apply(void 0,p);return y[d]=h,h}a.exports=function(d,b,p){if(Array.isArray(p)||(typeof p=="string"?p=l(b.dimension,p):p=l(b.dimension,"clamp")),b.size===0)return d;if(b.dimension===0)return d.set(0),d;var c=x(p);return c(d,b)}},4317:function(a){"use strict";function o(f,v){var g=Math.floor(v),_=v-g,y=0<=g&&g0;){F<64?(d=F,F=0):(d=64,F-=64);for(var L=y[1]|0;L>0;){L<64?(b=L,L=0):(b=64,L-=64),m=N+F*c+L*A,x=I+F*R+L*E;var P=0,O=0,U=0,X=h,j=c-p*h,$=A-d*c,Y=D,q=R-p*D,Z=E-d*R;for(U=0;U0;){E<64?(d=E,E=0):(d=64,E-=64);for(var D=y[0]|0;D>0;){D<64?(T=D,D=0):(T=64,D-=64),m=h+E*p+D*b,x=R+E*A+D*c;var N=0,I=0,F=p,L=b-d*p,P=A,O=c-d*A;for(I=0;I0;){I<64?(b=I,I=0):(b=64,I-=64);for(var F=y[0]|0;F>0;){F<64?(T=F,F=0):(T=64,F-=64);for(var L=y[1]|0;L>0;){L<64?(d=L,L=0):(d=64,L-=64),m=D+I*A+F*p+L*c,x=N+I*E+F*h+L*R;var P=0,O=0,U=0,X=A,j=p-b*A,$=c-T*p,Y=E,q=h-b*E,Z=R-T*h;for(U=0;Uk;){P=0,O=N-d;r:for(F=0;FX)break r;O+=h,P+=R}for(P=N,O=N-d,F=0;F>1,L=F-D,P=F+D,O=N,U=L,X=F,j=P,$=I,Y=S+1,q=x-1,Z=!0,ne,Q,oe,ee,G,re,H,te,ue,de=0,Ee=0,Me=0,ve,Ae,ke,De,Ce,Oe,Ue,ge,Te,ce,ye,Le,me,he,be,Se,ze=A,Fe=M(ze),Je=M(ze);Ae=b*O,ke=b*U,Se=d;e:for(ve=0;ve0){Q=O,O=U,U=Q;break e}if(Me<0)break e;Se+=R}Ae=b*j,ke=b*$,Se=d;e:for(ve=0;ve0){Q=j,j=$,$=Q;break e}if(Me<0)break e;Se+=R}Ae=b*O,ke=b*X,Se=d;e:for(ve=0;ve0){Q=O,O=X,X=Q;break e}if(Me<0)break e;Se+=R}Ae=b*U,ke=b*X,Se=d;e:for(ve=0;ve0){Q=U,U=X,X=Q;break e}if(Me<0)break e;Se+=R}Ae=b*O,ke=b*j,Se=d;e:for(ve=0;ve0){Q=O,O=j,j=Q;break e}if(Me<0)break e;Se+=R}Ae=b*X,ke=b*j,Se=d;e:for(ve=0;ve0){Q=X,X=j,j=Q;break e}if(Me<0)break e;Se+=R}Ae=b*U,ke=b*$,Se=d;e:for(ve=0;ve0){Q=U,U=$,$=Q;break e}if(Me<0)break e;Se+=R}Ae=b*U,ke=b*X,Se=d;e:for(ve=0;ve0){Q=U,U=X,X=Q;break e}if(Me<0)break e;Se+=R}Ae=b*j,ke=b*$,Se=d;e:for(ve=0;ve0){Q=j,j=$,$=Q;break e}if(Me<0)break e;Se+=R}for(Ae=b*O,ke=b*U,De=b*X,Ce=b*j,Oe=b*$,Ue=b*N,ge=b*F,Te=b*I,be=0,Se=d,ve=0;ve0)q--;else if(Me<0){for(Ae=b*re,ke=b*Y,De=b*q,Se=d,ve=0;ve0)for(;;){H=d+q*b,be=0;e:for(ve=0;ve0){if(--qI){e:for(;;){for(H=d+Y*b,be=0,Se=d,ve=0;ve1&&k?x(m,k[0],k[1]):x(m)}var _={"uint32,1,0":function(w,M){return function(m){var k=m.data,S=m.offset|0,x=m.shape,T=m.stride,d=T[0]|0,b=x[0]|0,p=T[1]|0,c=x[1]|0,A=p,h=p,R=1;b<=32?w(0,b-1,k,S,d,p,b,c,A,h,R):M(0,b-1,k,S,d,p,b,c,A,h,R)}}};function y(w,M){var m=[M,w].join(","),k=_[m],S=f(w,M),x=g(w,M,S);return k(S,x)}a.exports=y},446:function(a,o,i){"use strict";var l=i(7640),u={};function s(f){var v=f.order,g=f.dtype,_=[v,g],y=_.join(":"),w=u[y];return w||(u[y]=w=l(v,g)),w(f),f}a.exports=s},9618:function(a,o,i){var l=i(7163),u=typeof Float64Array!="undefined";function s(M,m){return M[0]-m[0]}function f(){var M=this.stride,m=new Array(M.length),k;for(k=0;k=0&&(p=d|0,b+=A*p,c-=p),new S(this.data,c,A,b)},x.step=function(d){var b=this.shape[0],p=this.stride[0],c=this.offset,A=0,h=Math.ceil;return typeof d=="number"&&(A=d|0,A<0?(c+=p*(b-1),b=h(-b/A)):b=h(b/A),p*=A),new S(this.data,b,p,c)},x.transpose=function(d){d=d===void 0?0:d|0;var b=this.shape,p=this.stride;return new S(this.data,b[d],p[d],this.offset)},x.pick=function(d){var b=[],p=[],c=this.offset;typeof d=="number"&&d>=0?c=c+this.stride[0]*d|0:(b.push(this.shape[0]),p.push(this.stride[0]));var A=m[b.length+1];return A(this.data,b,p,c)},function(d,b,p,c){return new S(d,b[0],p[0],c)}},2:function(M,m,k){function S(T,d,b,p,c,A){this.data=T,this.shape=[d,b],this.stride=[p,c],this.offset=A|0}var x=S.prototype;return x.dtype=M,x.dimension=2,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(x,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),x.set=function(d,b,p){return M==="generic"?this.data.set(this.offset+this.stride[0]*d+this.stride[1]*b,p):this.data[this.offset+this.stride[0]*d+this.stride[1]*b]=p},x.get=function(d,b){return M==="generic"?this.data.get(this.offset+this.stride[0]*d+this.stride[1]*b):this.data[this.offset+this.stride[0]*d+this.stride[1]*b]},x.index=function(d,b){return this.offset+this.stride[0]*d+this.stride[1]*b},x.hi=function(d,b){return new S(this.data,typeof d!="number"||d<0?this.shape[0]:d|0,typeof b!="number"||b<0?this.shape[1]:b|0,this.stride[0],this.stride[1],this.offset)},x.lo=function(d,b){var p=this.offset,c=0,A=this.shape[0],h=this.shape[1],R=this.stride[0],E=this.stride[1];return typeof d=="number"&&d>=0&&(c=d|0,p+=R*c,A-=c),typeof b=="number"&&b>=0&&(c=b|0,p+=E*c,h-=c),new S(this.data,A,h,R,E,p)},x.step=function(d,b){var p=this.shape[0],c=this.shape[1],A=this.stride[0],h=this.stride[1],R=this.offset,E=0,D=Math.ceil;return typeof d=="number"&&(E=d|0,E<0?(R+=A*(p-1),p=D(-p/E)):p=D(p/E),A*=E),typeof b=="number"&&(E=b|0,E<0?(R+=h*(c-1),c=D(-c/E)):c=D(c/E),h*=E),new S(this.data,p,c,A,h,R)},x.transpose=function(d,b){d=d===void 0?0:d|0,b=b===void 0?1:b|0;var p=this.shape,c=this.stride;return new S(this.data,p[d],p[b],c[d],c[b],this.offset)},x.pick=function(d,b){var p=[],c=[],A=this.offset;typeof d=="number"&&d>=0?A=A+this.stride[0]*d|0:(p.push(this.shape[0]),c.push(this.stride[0])),typeof b=="number"&&b>=0?A=A+this.stride[1]*b|0:(p.push(this.shape[1]),c.push(this.stride[1]));var h=m[p.length+1];return h(this.data,p,c,A)},function(d,b,p,c){return new S(d,b[0],b[1],p[0],p[1],c)}},3:function(M,m,k){function S(T,d,b,p,c,A,h,R){this.data=T,this.shape=[d,b,p],this.stride=[c,A,h],this.offset=R|0}var x=S.prototype;return x.dtype=M,x.dimension=3,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(x,"order",{get:function(){var d=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),p=Math.abs(this.stride[2]);return d>b?b>p?[2,1,0]:d>p?[1,2,0]:[1,0,2]:d>p?[2,0,1]:p>b?[0,1,2]:[0,2,1]}}),x.set=function(d,b,p,c){return M==="generic"?this.data.set(this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p,c):this.data[this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p]=c},x.get=function(d,b,p){return M==="generic"?this.data.get(this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p):this.data[this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p]},x.index=function(d,b,p){return this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p},x.hi=function(d,b,p){return new S(this.data,typeof d!="number"||d<0?this.shape[0]:d|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},x.lo=function(d,b,p){var c=this.offset,A=0,h=this.shape[0],R=this.shape[1],E=this.shape[2],D=this.stride[0],N=this.stride[1],I=this.stride[2];return typeof d=="number"&&d>=0&&(A=d|0,c+=D*A,h-=A),typeof b=="number"&&b>=0&&(A=b|0,c+=N*A,R-=A),typeof p=="number"&&p>=0&&(A=p|0,c+=I*A,E-=A),new S(this.data,h,R,E,D,N,I,c)},x.step=function(d,b,p){var c=this.shape[0],A=this.shape[1],h=this.shape[2],R=this.stride[0],E=this.stride[1],D=this.stride[2],N=this.offset,I=0,F=Math.ceil;return typeof d=="number"&&(I=d|0,I<0?(N+=R*(c-1),c=F(-c/I)):c=F(c/I),R*=I),typeof b=="number"&&(I=b|0,I<0?(N+=E*(A-1),A=F(-A/I)):A=F(A/I),E*=I),typeof p=="number"&&(I=p|0,I<0?(N+=D*(h-1),h=F(-h/I)):h=F(h/I),D*=I),new S(this.data,c,A,h,R,E,D,N)},x.transpose=function(d,b,p){d=d===void 0?0:d|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0;var c=this.shape,A=this.stride;return new S(this.data,c[d],c[b],c[p],A[d],A[b],A[p],this.offset)},x.pick=function(d,b,p){var c=[],A=[],h=this.offset;typeof d=="number"&&d>=0?h=h+this.stride[0]*d|0:(c.push(this.shape[0]),A.push(this.stride[0])),typeof b=="number"&&b>=0?h=h+this.stride[1]*b|0:(c.push(this.shape[1]),A.push(this.stride[1])),typeof p=="number"&&p>=0?h=h+this.stride[2]*p|0:(c.push(this.shape[2]),A.push(this.stride[2]));var R=m[c.length+1];return R(this.data,c,A,h)},function(d,b,p,c){return new S(d,b[0],b[1],b[2],p[0],p[1],p[2],c)}},4:function(M,m,k){function S(T,d,b,p,c,A,h,R,E,D){this.data=T,this.shape=[d,b,p,c],this.stride=[A,h,R,E],this.offset=D|0}var x=S.prototype;return x.dtype=M,x.dimension=4,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(x,"order",{get:k}),x.set=function(d,b,p,c,A){return M==="generic"?this.data.set(this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p+this.stride[3]*c,A):this.data[this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p+this.stride[3]*c]=A},x.get=function(d,b,p,c){return M==="generic"?this.data.get(this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p+this.stride[3]*c):this.data[this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p+this.stride[3]*c]},x.index=function(d,b,p,c){return this.offset+this.stride[0]*d+this.stride[1]*b+this.stride[2]*p+this.stride[3]*c},x.hi=function(d,b,p,c){return new S(this.data,typeof d!="number"||d<0?this.shape[0]:d|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof p!="number"||p<0?this.shape[2]:p|0,typeof c!="number"||c<0?this.shape[3]:c|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},x.lo=function(d,b,p,c){var A=this.offset,h=0,R=this.shape[0],E=this.shape[1],D=this.shape[2],N=this.shape[3],I=this.stride[0],F=this.stride[1],L=this.stride[2],P=this.stride[3];return typeof d=="number"&&d>=0&&(h=d|0,A+=I*h,R-=h),typeof b=="number"&&b>=0&&(h=b|0,A+=F*h,E-=h),typeof p=="number"&&p>=0&&(h=p|0,A+=L*h,D-=h),typeof c=="number"&&c>=0&&(h=c|0,A+=P*h,N-=h),new S(this.data,R,E,D,N,I,F,L,P,A)},x.step=function(d,b,p,c){var A=this.shape[0],h=this.shape[1],R=this.shape[2],E=this.shape[3],D=this.stride[0],N=this.stride[1],I=this.stride[2],F=this.stride[3],L=this.offset,P=0,O=Math.ceil;return typeof d=="number"&&(P=d|0,P<0?(L+=D*(A-1),A=O(-A/P)):A=O(A/P),D*=P),typeof b=="number"&&(P=b|0,P<0?(L+=N*(h-1),h=O(-h/P)):h=O(h/P),N*=P),typeof p=="number"&&(P=p|0,P<0?(L+=I*(R-1),R=O(-R/P)):R=O(R/P),I*=P),typeof c=="number"&&(P=c|0,P<0?(L+=F*(E-1),E=O(-E/P)):E=O(E/P),F*=P),new S(this.data,A,h,R,E,D,N,I,F,L)},x.transpose=function(d,b,p,c){d=d===void 0?0:d|0,b=b===void 0?1:b|0,p=p===void 0?2:p|0,c=c===void 0?3:c|0;var A=this.shape,h=this.stride;return new S(this.data,A[d],A[b],A[p],A[c],h[d],h[b],h[p],h[c],this.offset)},x.pick=function(d,b,p,c){var A=[],h=[],R=this.offset;typeof d=="number"&&d>=0?R=R+this.stride[0]*d|0:(A.push(this.shape[0]),h.push(this.stride[0])),typeof b=="number"&&b>=0?R=R+this.stride[1]*b|0:(A.push(this.shape[1]),h.push(this.stride[1])),typeof p=="number"&&p>=0?R=R+this.stride[2]*p|0:(A.push(this.shape[2]),h.push(this.stride[2])),typeof c=="number"&&c>=0?R=R+this.stride[3]*c|0:(A.push(this.shape[3]),h.push(this.stride[3]));var E=m[A.length+1];return E(this.data,A,h,R)},function(d,b,p,c){return new S(d,b[0],b[1],b[2],b[3],p[0],p[1],p[2],p[3],c)}},5:function(m,k,S){function x(d,b,p,c,A,h,R,E,D,N,I,F){this.data=d,this.shape=[b,p,c,A,h],this.stride=[R,E,D,N,I],this.offset=F|0}var T=x.prototype;return T.dtype=m,T.dimension=5,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(T,"order",{get:S}),T.set=function(b,p,c,A,h,R){return m==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*c+this.stride[3]*A+this.stride[4]*h,R):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*c+this.stride[3]*A+this.stride[4]*h]=R},T.get=function(b,p,c,A,h){return m==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*c+this.stride[3]*A+this.stride[4]*h):this.data[this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*c+this.stride[3]*A+this.stride[4]*h]},T.index=function(b,p,c,A,h){return this.offset+this.stride[0]*b+this.stride[1]*p+this.stride[2]*c+this.stride[3]*A+this.stride[4]*h},T.hi=function(b,p,c,A,h){return new x(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof p!="number"||p<0?this.shape[1]:p|0,typeof c!="number"||c<0?this.shape[2]:c|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof h!="number"||h<0?this.shape[4]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},T.lo=function(b,p,c,A,h){var R=this.offset,E=0,D=this.shape[0],N=this.shape[1],I=this.shape[2],F=this.shape[3],L=this.shape[4],P=this.stride[0],O=this.stride[1],U=this.stride[2],X=this.stride[3],j=this.stride[4];return typeof b=="number"&&b>=0&&(E=b|0,R+=P*E,D-=E),typeof p=="number"&&p>=0&&(E=p|0,R+=O*E,N-=E),typeof c=="number"&&c>=0&&(E=c|0,R+=U*E,I-=E),typeof A=="number"&&A>=0&&(E=A|0,R+=X*E,F-=E),typeof h=="number"&&h>=0&&(E=h|0,R+=j*E,L-=E),new x(this.data,D,N,I,F,L,P,O,U,X,j,R)},T.step=function(b,p,c,A,h){var R=this.shape[0],E=this.shape[1],D=this.shape[2],N=this.shape[3],I=this.shape[4],F=this.stride[0],L=this.stride[1],P=this.stride[2],O=this.stride[3],U=this.stride[4],X=this.offset,j=0,$=Math.ceil;return typeof b=="number"&&(j=b|0,j<0?(X+=F*(R-1),R=$(-R/j)):R=$(R/j),F*=j),typeof p=="number"&&(j=p|0,j<0?(X+=L*(E-1),E=$(-E/j)):E=$(E/j),L*=j),typeof c=="number"&&(j=c|0,j<0?(X+=P*(D-1),D=$(-D/j)):D=$(D/j),P*=j),typeof A=="number"&&(j=A|0,j<0?(X+=O*(N-1),N=$(-N/j)):N=$(N/j),O*=j),typeof h=="number"&&(j=h|0,j<0?(X+=U*(I-1),I=$(-I/j)):I=$(I/j),U*=j),new x(this.data,R,E,D,N,I,F,L,P,O,U,X)},T.transpose=function(b,p,c,A,h){b=b===void 0?0:b|0,p=p===void 0?1:p|0,c=c===void 0?2:c|0,A=A===void 0?3:A|0,h=h===void 0?4:h|0;var R=this.shape,E=this.stride;return new x(this.data,R[b],R[p],R[c],R[A],R[h],E[b],E[p],E[c],E[A],E[h],this.offset)},T.pick=function(b,p,c,A,h){var R=[],E=[],D=this.offset;typeof b=="number"&&b>=0?D=D+this.stride[0]*b|0:(R.push(this.shape[0]),E.push(this.stride[0])),typeof p=="number"&&p>=0?D=D+this.stride[1]*p|0:(R.push(this.shape[1]),E.push(this.stride[1])),typeof c=="number"&&c>=0?D=D+this.stride[2]*c|0:(R.push(this.shape[2]),E.push(this.stride[2])),typeof A=="number"&&A>=0?D=D+this.stride[3]*A|0:(R.push(this.shape[3]),E.push(this.stride[3])),typeof h=="number"&&h>=0?D=D+this.stride[4]*h|0:(R.push(this.shape[4]),E.push(this.stride[4]));var N=k[R.length+1];return N(this.data,R,E,D)},function(b,p,c,A){return new x(b,p[0],p[1],p[2],p[3],p[4],c[0],c[1],c[2],c[3],c[4],A)}}};function g(M,m){var k=m===-1?"T":String(m),S=v[k];return m===-1?S(M):m===0?S(M,y[M][0]):S(M,y[M],f)}function _(M){if(l(M))return"buffer";if(u)switch(Object.prototype.toString.call(M)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(M)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function w(M,m,k,S){if(M===void 0){var c=y.array[0];return c([])}else typeof M=="number"&&(M=[M]);m===void 0&&(m=[M.length]);var x=m.length;if(k===void 0){k=new Array(x);for(var T=x-1,d=1;T>=0;--T)k[T]=d,d*=m[T]}if(S===void 0){S=0;for(var T=0;T>>0;a.exports=f;function f(v,g){if(isNaN(v)||isNaN(g))return NaN;if(v===g)return v;if(v===0)return g<0?-u:u;var _=l.hi(v),y=l.lo(v);return g>v==v>0?y===s?(_+=1,y=0):y+=1:y===0?(y=s,_-=1):y-=1,l.pack(y,_)}},8406:function(a,o){var i=1e-6,l=1e-6;o.vertexNormals=function(u,s,f){for(var v=s.length,g=new Array(v),_=f===void 0?i:f,y=0;y_)for(var R=g[m],E=1/Math.sqrt(p*A),h=0;h<3;++h){var D=(h+1)%3,N=(h+2)%3;R[h]+=E*(c[D]*b[N]-c[N]*b[D])}}for(var y=0;y_)for(var E=1/Math.sqrt(I),h=0;h<3;++h)R[h]*=E;else for(var h=0;h<3;++h)R[h]=0}return g},o.faceNormals=function(u,s,f){for(var v=u.length,g=new Array(v),_=f===void 0?l:f,y=0;y_?T=1/Math.sqrt(T):T=0;for(var m=0;m<3;++m)x[m]*=T;g[y]=x}return g}},4081:function(a){"use strict";a.exports=o;function o(i,l,u,s,f,v,g,_,y,w){var M=l+v+w;if(m>0){var m=Math.sqrt(M+1);i[0]=.5*(g-y)/m,i[1]=.5*(_-s)/m,i[2]=.5*(u-v)/m,i[3]=.5*m}else{var k=Math.max(l,v,w),m=Math.sqrt(2*k-M+1);l>=k?(i[0]=.5*m,i[1]=.5*(f+u)/m,i[2]=.5*(_+s)/m,i[3]=.5*(g-y)/m):v>=k?(i[0]=.5*(u+f)/m,i[1]=.5*m,i[2]=.5*(y+g)/m,i[3]=.5*(_-s)/m):(i[0]=.5*(s+_)/m,i[1]=.5*(g+y)/m,i[2]=.5*m,i[3]=.5*(u-f)/m)}return i}},9977:function(a,o,i){"use strict";a.exports=m;var l=i(9215),u=i(6582),s=i(7399),f=i(7608),v=i(4081);function g(k,S,x){return Math.sqrt(Math.pow(k,2)+Math.pow(S,2)+Math.pow(x,2))}function _(k,S,x,T){return Math.sqrt(Math.pow(k,2)+Math.pow(S,2)+Math.pow(x,2)+Math.pow(T,2))}function y(k,S){var x=S[0],T=S[1],d=S[2],b=S[3],p=_(x,T,d,b);p>1e-6?(k[0]=x/p,k[1]=T/p,k[2]=d/p,k[3]=b/p):(k[0]=k[1]=k[2]=0,k[3]=1)}function w(k,S,x){this.radius=l([x]),this.center=l(S),this.rotation=l(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 M=w.prototype;M.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},M.recalcMatrix=function(k){this.radius.curve(k),this.center.curve(k),this.rotation.curve(k);var S=this.computedRotation;y(S,S);var x=this.computedMatrix;s(x,S);var T=this.computedCenter,d=this.computedEye,b=this.computedUp,p=Math.exp(this.computedRadius[0]);d[0]=T[0]+p*x[2],d[1]=T[1]+p*x[6],d[2]=T[2]+p*x[10],b[0]=x[1],b[1]=x[5],b[2]=x[9];for(var c=0;c<3;++c){for(var A=0,h=0;h<3;++h)A+=x[c+4*h]*d[h];x[12+c]=-A}},M.getMatrix=function(k,S){this.recalcMatrix(k);var x=this.computedMatrix;if(S){for(var T=0;T<16;++T)S[T]=x[T];return S}return x},M.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},M.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},M.pan=function(k,S,x,T){S=S||0,x=x||0,T=T||0,this.recalcMatrix(k);var d=this.computedMatrix,b=d[1],p=d[5],c=d[9],A=g(b,p,c);b/=A,p/=A,c/=A;var h=d[0],R=d[4],E=d[8],D=h*b+R*p+E*c;h-=b*D,R-=p*D,E-=c*D;var N=g(h,R,E);h/=N,R/=N,E/=N;var I=d[2],F=d[6],L=d[10],P=I*b+F*p+L*c,O=I*h+F*R+L*E;I-=P*b+O*h,F-=P*p+O*R,L-=P*c+O*E;var U=g(I,F,L);I/=U,F/=U,L/=U;var X=h*S+b*x,j=R*S+p*x,$=E*S+c*x;this.center.move(k,X,j,$);var Y=Math.exp(this.computedRadius[0]);Y=Math.max(1e-4,Y+T),this.radius.set(k,Math.log(Y))},M.rotate=function(k,S,x,T){this.recalcMatrix(k),S=S||0,x=x||0;var d=this.computedMatrix,b=d[0],p=d[4],c=d[8],A=d[1],h=d[5],R=d[9],E=d[2],D=d[6],N=d[10],I=S*b+x*A,F=S*p+x*h,L=S*c+x*R,P=-(D*L-N*F),O=-(N*I-E*L),U=-(E*F-D*I),X=Math.sqrt(Math.max(0,1-Math.pow(P,2)-Math.pow(O,2)-Math.pow(U,2))),j=_(P,O,U,X);j>1e-6?(P/=j,O/=j,U/=j,X/=j):(P=O=U=0,X=1);var $=this.computedRotation,Y=$[0],q=$[1],Z=$[2],ne=$[3],Q=Y*X+ne*P+q*U-Z*O,oe=q*X+ne*O+Z*P-Y*U,ee=Z*X+ne*U+Y*O-q*P,G=ne*X-Y*P-q*O-Z*U;if(T){P=E,O=D,U=N;var re=Math.sin(T)/g(P,O,U);P*=re,O*=re,U*=re,X=Math.cos(S),Q=Q*X+G*P+oe*U-ee*O,oe=oe*X+G*O+ee*P-Q*U,ee=ee*X+G*U+Q*O-oe*P,G=G*X-Q*P-oe*O-ee*U}var H=_(Q,oe,ee,G);H>1e-6?(Q/=H,oe/=H,ee/=H,G/=H):(Q=oe=ee=0,G=1),this.rotation.set(k,Q,oe,ee,G)},M.lookAt=function(k,S,x,T){this.recalcMatrix(k),x=x||this.computedCenter,S=S||this.computedEye,T=T||this.computedUp;var d=this.computedMatrix;u(d,S,x,T);var b=this.computedRotation;v(b,d[0],d[1],d[2],d[4],d[5],d[6],d[8],d[9],d[10]),y(b,b),this.rotation.set(k,b[0],b[1],b[2],b[3]);for(var p=0,c=0;c<3;++c)p+=Math.pow(x[c]-S[c],2);this.radius.set(k,.5*Math.log(Math.max(p,1e-6))),this.center.set(k,x[0],x[1],x[2])},M.translate=function(k,S,x,T){this.center.move(k,S||0,x||0,T||0)},M.setMatrix=function(k,S){var x=this.computedRotation;v(x,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),y(x,x),this.rotation.set(k,x[0],x[1],x[2],x[3]);var T=this.computedMatrix;f(T,S);var d=T[15];if(Math.abs(d)>1e-6){var b=T[12]/d,p=T[13]/d,c=T[14]/d;this.recalcMatrix(k);var A=Math.exp(this.computedRadius[0]);this.center.set(k,b-T[2]*A,p-T[6]*A,c-T[10]*A),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},M.setDistance=function(k,S){S>0&&this.radius.set(k,Math.log(S))},M.setDistanceLimits=function(k,S){k>0?k=Math.log(k):k=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=S},M.getDistanceLimits=function(k){var S=this.radius.bounds;return k?(k[0]=Math.exp(S[0][0]),k[1]=Math.exp(S[1][0]),k):[Math.exp(S[0][0]),Math.exp(S[1][0])]},M.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},M.fromJSON=function(k){var S=this.lastT(),x=k.center;x&&this.center.set(S,x[0],x[1],x[2]);var T=k.rotation;T&&this.rotation.set(S,T[0],T[1],T[2],T[3]);var d=k.distance;d&&d>0&&this.radius.set(S,Math.log(d)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function m(k){k=k||{};var S=k.center||[0,0,0],x=k.rotation||[0,0,0,1],T=k.radius||1;S=[].slice.call(S,0,3),x=[].slice.call(x,0,4),y(x,x);var d=new w(x,S,Math.log(T));return d.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&d.lookAt(0,k.eye,k.center,k.up),d}},1371:function(a,o,i){"use strict";var l=i(3233);a.exports=function(s,f,v){return v=typeof v!="undefined"?v+"":" ",l(v,f)+s}},3202:function(a){a.exports=function(i,l){l||(l=[0,""]),i=String(i);var u=parseFloat(i,10);return l[0]=u,l[1]=i.match(/[\d.\-\+]*\s*(.*)/)[1]||"",l}},3088:function(a,o,i){"use strict";a.exports=u;var l=i(3140);function u(s,f){for(var v=f.length|0,g=s.length,_=[new Array(v),new Array(v)],y=0;y0){R=_[N][A][0],D=N;break}E=R[D^1];for(var I=0;I<2;++I)for(var F=_[I][A],L=0;L0&&(R=P,E=O,D=I)}return h||R&&m(R,D),E}function S(c,A){var h=_[A][c][0],R=[c];m(h,A);for(var E=h[A^1],D=A;;){for(;E!==c;)R.push(E),E=k(R[R.length-2],E,!1);if(_[0][c].length+_[1][c].length===0)break;var N=R[R.length-1],I=c,F=R[1],L=k(N,I,!0);if(l(f[N],f[I],f[F],f[L])<0)break;R.push(c),E=k(N,I)}return R}function x(c,A){return A[1]===A[A.length-1]}for(var y=0;y0;){var b=_[0][y].length,p=S(y,T);x(d,p)?d.push.apply(d,p):(d.length>0&&M.push(d),d=p)}d.length>0&&M.push(d)}return M}},5609:function(a,o,i){"use strict";a.exports=u;var l=i(3134);function u(s,f){for(var v=l(s,f.length),g=new Array(f.length),_=new Array(f.length),y=[],w=0;w0;){var m=y.pop();g[m]=!1;for(var k=v[m],w=0;w0}b=b.filter(p);for(var c=b.length,A=new Array(c),h=new Array(c),d=0;d0;){var H=ee.pop(),te=j[H];g(te,function(ve,Ae){return ve-Ae});var ue=te.length,de=G[H],Ee;if(de===0){var F=b[H];Ee=[F]}for(var d=0;d=0)&&(G[Me]=de^1,ee.push(Me),de===0)){var F=b[Me];oe(F)||(F.reverse(),Ee.push(F))}}de===0&&re.push(Ee)}return re}},5085:function(a,o,i){a.exports=k;var l=i(3250)[3],u=i(4209),s=i(3352),f=i(2478);function v(){return!0}function g(S){return function(x,T){var d=S[x];return d?!!d.queryPoint(T,v):!1}}function _(S){for(var x={},T=0;T0&&x[d]===T[0])b=S[d-1];else return 1;for(var p=1;b;){var c=b.key,A=l(T,c[0],c[1]);if(c[0][0]0)p=-1,b=b.right;else return 0;else if(A>0)b=b.left;else if(A<0)p=1,b=b.right;else return 0}return p}}function w(S){return 1}function M(S){return function(T){return S(T[0],T[1])?0:1}}function m(S,x){return function(d){return S(d[0],d[1])?0:x(d)}}function k(S){for(var x=S.length,T=[],d=[],b=0,p=0;p=w?(c=1,h=w+2*k+x):(c=-k/w,h=k*c+x)):(c=0,S>=0?(A=0,h=x):-S>=m?(A=1,h=m+2*S+x):(A=-S/m,h=S*A+x));else if(A<0)A=0,k>=0?(c=0,h=x):-k>=w?(c=1,h=w+2*k+x):(c=-k/w,h=k*c+x);else{var R=1/p;c*=R,A*=R,h=c*(w*c+M*A+2*k)+A*(M*c+m*A+2*S)+x}else{var E,D,N,I;c<0?(E=M+k,D=m+S,D>E?(N=D-E,I=w-2*M+m,N>=I?(c=1,A=0,h=w+2*k+x):(c=N/I,A=1-c,h=c*(w*c+M*A+2*k)+A*(M*c+m*A+2*S)+x)):(c=0,D<=0?(A=1,h=m+2*S+x):S>=0?(A=0,h=x):(A=-S/m,h=S*A+x))):A<0?(E=M+S,D=w+k,D>E?(N=D-E,I=w-2*M+m,N>=I?(A=1,c=0,h=m+2*S+x):(A=N/I,c=1-A,h=c*(w*c+M*A+2*k)+A*(M*c+m*A+2*S)+x)):(A=0,D<=0?(c=1,h=w+2*k+x):k>=0?(c=0,h=x):(c=-k/w,h=k*c+x))):(N=m+S-M-k,N<=0?(c=0,A=1,h=m+2*S+x):(I=w-2*M+m,N>=I?(c=1,A=0,h=w+2*k+x):(c=N/I,A=1-c,h=c*(w*c+M*A+2*k)+A*(M*c+m*A+2*S)+x)))}for(var F=1-c-A,y=0;y0){var m=v[_-1];if(l(w,m)===0&&s(m)!==M){_-=1;continue}}v[_++]=w}}return v.length=_,v}},3233:function(a){"use strict";var o="",i;a.exports=l;function l(u,s){if(typeof u!="string")throw new TypeError("expected a string");if(s===1)return u;if(s===2)return u+u;var f=u.length*s;if(i!==u||typeof i=="undefined")i=u,o="";else if(o.length>=f)return o.substr(0,f);for(;f>o.length&&s>1;)s&1&&(o+=u),s>>=1,u+=u;return o+=u,o=o.substr(0,f),o}},3025:function(a,o,i){a.exports=i.g.performance&&i.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(a){"use strict";a.exports=o;function o(i){for(var l=i.length,u=i[i.length-1],s=l,f=l-2;f>=0;--f){var v=u,g=i[f];u=v+g;var _=u-v,y=g-_;y&&(i[--s]=u,u=y)}for(var w=0,f=s;f0){if(D<=0)return N;I=E+D}else if(E<0){if(D>=0)return N;I=-(E+D)}else return N;var F=_*I;return N>=F||N<=-F?N:S(A,h,R)},function(A,h,R,E){var D=A[0]-E[0],N=h[0]-E[0],I=R[0]-E[0],F=A[1]-E[1],L=h[1]-E[1],P=R[1]-E[1],O=A[2]-E[2],U=h[2]-E[2],X=R[2]-E[2],j=N*P,$=I*L,Y=I*F,q=D*P,Z=D*L,ne=N*F,Q=O*(j-$)+U*(Y-q)+X*(Z-ne),oe=(Math.abs(j)+Math.abs($))*Math.abs(O)+(Math.abs(Y)+Math.abs(q))*Math.abs(U)+(Math.abs(Z)+Math.abs(ne))*Math.abs(X),ee=y*oe;return Q>ee||-Q>ee?Q:x(A,h,R,E)}];function d(c){var A=T[c.length];return A||(A=T[c.length]=k(c.length)),A.apply(void 0,c)}function b(c,A,h,R,E,D,N){return function(F,L,P,O,U){switch(arguments.length){case 0:case 1:return 0;case 2:return R(F,L);case 3:return E(F,L,P);case 4:return D(F,L,P,O);case 5:return N(F,L,P,O,U)}for(var X=new Array(arguments.length),j=0;j0&&w>0||y<0&&w<0)return!1;var M=l(g,f,v),m=l(_,f,v);return M>0&&m>0||M<0&&m<0?!1:y===0&&w===0&&M===0&&m===0?u(f,v,g,_):!0}},8545:function(a){"use strict";a.exports=i;function o(l,u){var s=l+u,f=s-l,v=s-f,g=u-f,_=l-v,y=_+g;return y?[y,s]:[s]}function i(l,u){var s=l.length|0,f=u.length|0;if(s===1&&f===1)return o(l[0],-u[0]);var v=s+f,g=new Array(v),_=0,y=0,w=0,M=Math.abs,m=l[y],k=M(m),S=-u[w],x=M(S),T,d;k=f?(T=m,y+=1,y=f?(T=m,y+=1,y>1,S=v[2*k+1];if(S===w)return k;w>1,S=v[2*k+1];if(S===w)return k;w>1,S=v[2*k+1];if(S===w)return k;w>1,S=v[2*k+1];if(S===w)return k;w>1,I=_(A[N],h);I<=0?(I===0&&(D=N),R=N+1):I>0&&(E=N-1)}return D}l=m;function k(A,h){for(var R=new Array(A.length),E=0,D=R.length;E=A.length||_(A[j],N)!==0););}return R}l=k;function S(A,h){if(!h)return k(M(T(A,0)),A,0);for(var R=new Array(h),E=0;E>>P&1&&L.push(D[P]);h.push(L)}return w(h)}l=x;function T(A,h){if(h<0)return[];for(var R=[],E=(1<0)-(s<0)},o.abs=function(s){var f=s>>i-1;return(s^f)-f},o.min=function(s,f){return f^(s^f)&-(s65535)<<4,s>>>=f,v=(s>255)<<3,s>>>=v,f|=v,v=(s>15)<<2,s>>>=v,f|=v,v=(s>3)<<1,s>>>=v,f|=v,f|s>>1},o.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},o.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var f=32;return s&=-s,s&&f--,s&65535&&(f-=16),s&16711935&&(f-=8),s&252645135&&(f-=4),s&858993459&&(f-=2),s&1431655765&&(f-=1),f}o.countTrailingZeros=l,o.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},o.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},o.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var u=new Array(256);(function(s){for(var f=0;f<256;++f){var v=f,g=f,_=7;for(v>>>=1;v;v>>>=1)g<<=1,g|=v&1,--_;s[f]=g<<_&255}})(u),o.reverse=function(s){return u[s&255]<<24|u[s>>>8&255]<<16|u[s>>>16&255]<<8|u[s>>>24&255]},o.interleave2=function(s,f){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,s|f<<1},o.deinterleave2=function(s,f){return s=s>>>f&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},o.interleave3=function(s,f,v){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,s|=f<<1,v&=1023,v=(v|v<<16)&4278190335,v=(v|v<<8)&251719695,v=(v|v<<4)&3272356035,v=(v|v<<2)&1227133513,s|v<<2},o.deinterleave3=function(s,f){return s=s>>>f&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},o.nextCombination=function(s){var f=s|s-1;return f+1|(~f&-~f)-1>>>l(s)+1}},2014:function(a,o,i){"use strict";"use restrict";var l=i(3105),u=i(4623);function s(c){for(var A=0,h=Math.max,R=0,E=c.length;R>1,N=g(c[D],A);N<=0?(N===0&&(E=D),h=D+1):N>0&&(R=D-1)}return E}o.findCell=M;function m(c,A){for(var h=new Array(c.length),R=0,E=h.length;R=c.length||g(c[X],D)!==0););}return h}o.incidence=m;function k(c,A){if(!A)return m(w(x(c,0)),c,0);for(var h=new Array(A),R=0;R>>L&1&&F.push(E[L]);A.push(F)}return y(A)}o.explode=S;function x(c,A){if(A<0)return[];for(var h=[],R=(1<>1:(q>>1)-1}function R(q){for(var Z=A(q);;){var ne=Z,Q=2*q+1,oe=2*(q+1),ee=q;if(Q0;){var ne=h(q);if(ne>=0){var Q=A(ne);if(Z0){var q=F[0];return c(0,O-1),O-=1,R(0),q}return-1}function N(q,Z){var ne=F[q];return k[ne]===Z?q:(k[ne]=-1/0,E(q),D(),k[ne]=Z,O+=1,E(O-1))}function I(q){if(!S[q]){S[q]=!0;var Z=M[q],ne=m[q];M[ne]>=0&&(M[ne]=Z),m[Z]>=0&&(m[Z]=ne),L[Z]>=0&&N(L[Z],p(Z)),L[ne]>=0&&N(L[ne],p(ne))}}for(var F=[],L=new Array(y),x=0;x>1;x>=0;--x)R(x);for(;;){var U=D();if(U<0||k[U]>_)break;I(U)}for(var X=[],x=0;x=0&&ne>=0&&Z!==ne){var Q=L[Z],oe=L[ne];Q!==oe&&Y.push([Q,oe])}}),u.unique(u.normalize(Y)),{positions:X,edges:Y}}},1303:function(a,o,i){"use strict";a.exports=s;var l=i(3250);function u(f,v){var g,_;if(v[0][0]v[1][0])g=v[1],_=v[0];else{var y=Math.min(f[0][1],f[1][1]),w=Math.max(f[0][1],f[1][1]),M=Math.min(v[0][1],v[1][1]),m=Math.max(v[0][1],v[1][1]);return wm?y-m:w-m}var k,S;f[0][1]v[1][0])g=v[1],_=v[0];else return u(v,f);var y,w;if(f[0][0]f[1][0])y=f[1],w=f[0];else return-u(f,v);var M=l(g,_,w),m=l(g,_,y);if(M<0){if(m<=0)return M}else if(M>0){if(m>=0)return M}else if(m)return m;if(M=l(w,y,_),m=l(w,y,g),M<0){if(m<=0)return M}else if(M>0){if(m>=0)return M}else if(m)return m;return _[0]-w[0]}},4209:function(a,o,i){"use strict";a.exports=m;var l=i(2478),u=i(3840),s=i(3250),f=i(1303);function v(k,S,x){this.slabs=k,this.coordinates=S,this.horizontal=x}var g=v.prototype;function _(k,S){return k.y-S}function y(k,S){for(var x=null;k;){var T=k.key,d,b;T[0][0]0)if(S[0]!==T[1][0])x=k,k=k.right;else{var c=y(k.right,S);if(c)return c;k=k.left}else{if(S[0]!==T[1][0])return k;var c=y(k.right,S);if(c)return c;k=k.left}}return x}g.castUp=function(k){var S=l.le(this.coordinates,k[0]);if(S<0)return-1;var x=this.slabs[S],T=y(this.slabs[S],k),d=-1;if(T&&(d=T.value),this.coordinates[S]===k[0]){var b=null;if(T&&(b=T.key),S>0){var p=y(this.slabs[S-1],k);p&&(b?f(p.key,b)>0&&(b=p.key,d=p.value):(d=p.value,b=p.key))}var c=this.horizontal[S];if(c.length>0){var A=l.ge(c,k[1],_);if(A=c.length)return d;h=c[A]}}if(h.start)if(b){var R=s(b[0],b[1],[k[0],h.y]);b[0][0]>b[1][0]&&(R=-R),R>0&&(d=h.index)}else d=h.index;else h.y!==k[1]&&(d=h.index)}}}return d};function w(k,S,x,T){this.y=k,this.index=S,this.start=x,this.closed=T}function M(k,S,x,T){this.x=k,this.segment=S,this.create=x,this.index=T}function m(k){for(var S=k.length,x=2*S,T=new Array(x),d=0;d1&&(S=1);for(var x=1-S,T=y.length,d=new Array(T),b=0;b0||k>0&&d<0){var b=f(S,d,x,k);M.push(b),m.push(b.slice())}d<0?m.push(x.slice()):d>0?M.push(x.slice()):(M.push(x.slice()),m.push(x.slice())),k=d}return{positive:M,negative:m}}function g(y,w){for(var M=[],m=s(y[y.length-1],w),k=y[y.length-1],S=y[0],x=0;x0||m>0&&T<0)&&M.push(f(k,T,S,m)),T>=0&&M.push(S.slice()),m=T}return M}function _(y,w){for(var M=[],m=s(y[y.length-1],w),k=y[y.length-1],S=y[0],x=0;x0||m>0&&T<0)&&M.push(f(k,T,S,m)),T<=0&&M.push(S.slice()),m=T}return M}},3387:function(a,o,i){var l;(function(){"use strict";var u={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function s(y){return v(_(y),arguments)}function f(y,w){return s.apply(null,[y].concat(w||[]))}function v(y,w){var M=1,m=y.length,k,S="",x,T,d,b,p,c,A,h;for(x=0;x=0),d.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,d.width?parseInt(d.width):0);break;case"e":k=d.precision?parseFloat(k).toExponential(d.precision):parseFloat(k).toExponential();break;case"f":k=d.precision?parseFloat(k).toFixed(d.precision):parseFloat(k);break;case"g":k=d.precision?String(Number(k.toPrecision(d.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=d.precision?k.substring(0,d.precision):k;break;case"t":k=String(!!k),k=d.precision?k.substring(0,d.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=d.precision?k.substring(0,d.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=d.precision?k.substring(0,d.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}u.json.test(d.type)?S+=k:(u.number.test(d.type)&&(!A||d.sign)?(h=A?"+":"-",k=k.toString().replace(u.sign,"")):h="",p=d.pad_char?d.pad_char==="0"?"0":d.pad_char.charAt(1):" ",c=d.width-(h+k).length,b=d.width&&c>0?p.repeat(c):"",S+=d.align?h+k+b:p==="0"?h+b+k:b+h+k)}return S}var g=Object.create(null);function _(y){if(g[y])return g[y];for(var w=y,M,m=[],k=0;w;){if((M=u.text.exec(w))!==null)m.push(M[0]);else if((M=u.modulo.exec(w))!==null)m.push("%");else if((M=u.placeholder.exec(w))!==null){if(M[2]){k|=1;var S=[],x=M[2],T=[];if((T=u.key.exec(x))!==null)for(S.push(T[1]);(x=x.substring(T[0].length))!=="";)if((T=u.key_access.exec(x))!==null)S.push(T[1]);else if((T=u.index_access.exec(x))!==null)S.push(T[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");M[2]=S}else k|=2;if(k===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");m.push({placeholder:M[0],param_no:M[1],keys:M[2],sign:M[3],pad_char:M[4],align:M[5],width:M[6],precision:M[7],type:M[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");w=w.substring(M[0].length)}return g[y]=m}o.sprintf=s,o.vsprintf=f,typeof window!="undefined"&&(window.sprintf=s,window.vsprintf=f,l=function(){return{sprintf:s,vsprintf:f}}.call(o,i,o,a),l!==void 0&&(a.exports=l))})()},3711:function(a,o,i){"use strict";a.exports=_;var l=i(2640),u=i(781),s={"2d":function(y,w,M){var m=y({order:w,scalarArguments:3,getters:M==="generic"?[0]:void 0,phase:function(S,x,T,d){return S>d|0},vertex:function(S,x,T,d,b,p,c,A,h,R,E,D,N){var I=(c<<0)+(A<<1)+(h<<2)+(R<<3)|0;if(!(I===0||I===15))switch(I){case 0:E.push([S-.5,x-.5]);break;case 1:E.push([S-.25-.25*(d+T-2*N)/(T-d),x-.25-.25*(b+T-2*N)/(T-b)]);break;case 2:E.push([S-.75-.25*(-d-T+2*N)/(d-T),x-.25-.25*(p+d-2*N)/(d-p)]);break;case 3:E.push([S-.5,x-.5-.5*(b+T+p+d-4*N)/(T-b+d-p)]);break;case 4:E.push([S-.25-.25*(p+b-2*N)/(b-p),x-.75-.25*(-b-T+2*N)/(b-T)]);break;case 5:E.push([S-.5-.5*(d+T+p+b-4*N)/(T-d+b-p),x-.5]);break;case 6:E.push([S-.5-.25*(-d-T+p+b)/(d-T+b-p),x-.5-.25*(-b-T+p+d)/(b-T+d-p)]);break;case 7:E.push([S-.75-.25*(p+b-2*N)/(b-p),x-.75-.25*(p+d-2*N)/(d-p)]);break;case 8:E.push([S-.75-.25*(-p-b+2*N)/(p-b),x-.75-.25*(-p-d+2*N)/(p-d)]);break;case 9:E.push([S-.5-.25*(d+T+-p-b)/(T-d+p-b),x-.5-.25*(b+T+-p-d)/(T-b+p-d)]);break;case 10:E.push([S-.5-.5*(-d-T+-p-b+4*N)/(d-T+p-b),x-.5]);break;case 11:E.push([S-.25-.25*(-p-b+2*N)/(p-b),x-.75-.25*(b+T-2*N)/(T-b)]);break;case 12:E.push([S-.5,x-.5-.5*(-b-T+-p-d+4*N)/(b-T+p-d)]);break;case 13:E.push([S-.75-.25*(d+T-2*N)/(T-d),x-.25-.25*(-p-d+2*N)/(p-d)]);break;case 14:E.push([S-.25-.25*(-d-T+2*N)/(d-T),x-.25-.25*(-b-T+2*N)/(b-T)]);break;case 15:E.push([S-.5,x-.5]);break}},cell:function(S,x,T,d,b,p,c,A,h){b?A.push([S,x]):A.push([x,S])}});return function(k,S){var x=[],T=[];return m(k,x,T,S),{positions:x,cells:T}}}};function f(y,w){var M=y.length+"d",m=s[M];if(m)return m(l,y,w)}function v(y,w){for(var M=u(y,w),m=M.length,k=new Array(m),S=new Array(m),x=0;xMath.max(d,b)?p[2]=1:d>Math.max(T,b)?p[0]=1:p[1]=1;for(var c=0,A=0,h=0;h<3;++h)c+=x[h]*x[h],A+=p[h]*x[h];for(var h=0;h<3;++h)p[h]-=A/c*x[h];return v(p,p),p}function M(x,T,d,b,p,c,A,h){this.center=l(d),this.up=l(b),this.right=l(p),this.radius=l([c]),this.angle=l([A,h]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(x,T),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 R=0;R<16;++R)this.computedMatrix[R]=.5;this.recalcMatrix(0)}var m=M.prototype;m.setDistanceLimits=function(x,T){x>0?x=Math.log(x):x=-1/0,T>0?T=Math.log(T):T=1/0,T=Math.max(T,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=T},m.getDistanceLimits=function(x){var T=this.radius.bounds[0];return x?(x[0]=Math.exp(T[0][0]),x[1]=Math.exp(T[1][0]),x):[Math.exp(T[0][0]),Math.exp(T[1][0])]},m.recalcMatrix=function(x){this.center.curve(x),this.up.curve(x),this.right.curve(x),this.radius.curve(x),this.angle.curve(x);for(var T=this.computedUp,d=this.computedRight,b=0,p=0,c=0;c<3;++c)p+=T[c]*d[c],b+=T[c]*T[c];for(var A=Math.sqrt(b),h=0,c=0;c<3;++c)d[c]-=T[c]*p/b,h+=d[c]*d[c],T[c]/=A;for(var R=Math.sqrt(h),c=0;c<3;++c)d[c]/=R;var E=this.computedToward;f(E,T,d),v(E,E);for(var D=Math.exp(this.computedRadius[0]),N=this.computedAngle[0],I=this.computedAngle[1],F=Math.cos(N),L=Math.sin(N),P=Math.cos(I),O=Math.sin(I),U=this.computedCenter,X=F*P,j=L*P,$=O,Y=-F*O,q=-L*O,Z=P,ne=this.computedEye,Q=this.computedMatrix,c=0;c<3;++c){var oe=X*d[c]+j*E[c]+$*T[c];Q[4*c+1]=Y*d[c]+q*E[c]+Z*T[c],Q[4*c+2]=oe,Q[4*c+3]=0}var ee=Q[1],G=Q[5],re=Q[9],H=Q[2],te=Q[6],ue=Q[10],de=G*ue-re*te,Ee=re*H-ee*ue,Me=ee*te-G*H,ve=_(de,Ee,Me);de/=ve,Ee/=ve,Me/=ve,Q[0]=de,Q[4]=Ee,Q[8]=Me;for(var c=0;c<3;++c)ne[c]=U[c]+Q[2+4*c]*D;for(var c=0;c<3;++c){for(var h=0,Ae=0;Ae<3;++Ae)h+=Q[c+4*Ae]*ne[Ae];Q[12+c]=-h}Q[15]=1},m.getMatrix=function(x,T){this.recalcMatrix(x);var d=this.computedMatrix;if(T){for(var b=0;b<16;++b)T[b]=d[b];return T}return d};var k=[0,0,0];m.rotate=function(x,T,d,b){if(this.angle.move(x,T,d),b){this.recalcMatrix(x);var p=this.computedMatrix;k[0]=p[2],k[1]=p[6],k[2]=p[10];for(var c=this.computedUp,A=this.computedRight,h=this.computedToward,R=0;R<3;++R)p[4*R]=c[R],p[4*R+1]=A[R],p[4*R+2]=h[R];s(p,p,b,k);for(var R=0;R<3;++R)c[R]=p[4*R],A[R]=p[4*R+1];this.up.set(x,c[0],c[1],c[2]),this.right.set(x,A[0],A[1],A[2])}},m.pan=function(x,T,d,b){T=T||0,d=d||0,b=b||0,this.recalcMatrix(x);var p=this.computedMatrix,c=Math.exp(this.computedRadius[0]),A=p[1],h=p[5],R=p[9],E=_(A,h,R);A/=E,h/=E,R/=E;var D=p[0],N=p[4],I=p[8],F=D*A+N*h+I*R;D-=A*F,N-=h*F,I-=R*F;var L=_(D,N,I);D/=L,N/=L,I/=L;var P=D*T+A*d,O=N*T+h*d,U=I*T+R*d;this.center.move(x,P,O,U);var X=Math.exp(this.computedRadius[0]);X=Math.max(1e-4,X+b),this.radius.set(x,Math.log(X))},m.translate=function(x,T,d,b){this.center.move(x,T||0,d||0,b||0)},m.setMatrix=function(x,T,d,b){var p=1;typeof d=="number"&&(p=d|0),(p<0||p>3)&&(p=1);var c=(p+2)%3,A=(p+1)%3;T||(this.recalcMatrix(x),T=this.computedMatrix);var h=T[p],R=T[p+4],E=T[p+8];if(b){var N=Math.abs(h),I=Math.abs(R),F=Math.abs(E),L=Math.max(N,I,F);N===L?(h=h<0?-1:1,R=E=0):F===L?(E=E<0?-1:1,h=R=0):(R=R<0?-1:1,h=E=0)}else{var D=_(h,R,E);h/=D,R/=D,E/=D}var P=T[c],O=T[c+4],U=T[c+8],X=P*h+O*R+U*E;P-=h*X,O-=R*X,U-=E*X;var j=_(P,O,U);P/=j,O/=j,U/=j;var $=R*U-E*O,Y=E*P-h*U,q=h*O-R*P,Z=_($,Y,q);$/=Z,Y/=Z,q/=Z,this.center.jump(x,Ue,ge,Te),this.radius.idle(x),this.up.jump(x,h,R,E),this.right.jump(x,P,O,U);var ne,Q;if(p===2){var oe=T[1],ee=T[5],G=T[9],re=oe*P+ee*O+G*U,H=oe*$+ee*Y+G*q;Ee<0?ne=-Math.PI/2:ne=Math.PI/2,Q=Math.atan2(H,re)}else{var te=T[2],ue=T[6],de=T[10],Ee=te*h+ue*R+de*E,Me=te*P+ue*O+de*U,ve=te*$+ue*Y+de*q;ne=Math.asin(y(Ee)),Q=Math.atan2(ve,Me)}this.angle.jump(x,Q,ne),this.recalcMatrix(x);var Ae=T[2],ke=T[6],De=T[10],Ce=this.computedMatrix;u(Ce,T);var Oe=Ce[15],Ue=Ce[12]/Oe,ge=Ce[13]/Oe,Te=Ce[14]/Oe,ce=Math.exp(this.computedRadius[0]);this.center.jump(x,Ue-Ae*ce,ge-ke*ce,Te-De*ce)},m.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},m.idle=function(x){this.center.idle(x),this.up.idle(x),this.right.idle(x),this.radius.idle(x),this.angle.idle(x)},m.flush=function(x){this.center.flush(x),this.up.flush(x),this.right.flush(x),this.radius.flush(x),this.angle.flush(x)},m.setDistance=function(x,T){T>0&&this.radius.set(x,Math.log(T))},m.lookAt=function(x,T,d,b){this.recalcMatrix(x),T=T||this.computedEye,d=d||this.computedCenter,b=b||this.computedUp;var p=b[0],c=b[1],A=b[2],h=_(p,c,A);if(!(h<1e-6)){p/=h,c/=h,A/=h;var R=T[0]-d[0],E=T[1]-d[1],D=T[2]-d[2],N=_(R,E,D);if(!(N<1e-6)){R/=N,E/=N,D/=N;var I=this.computedRight,F=I[0],L=I[1],P=I[2],O=p*F+c*L+A*P;F-=O*p,L-=O*c,P-=O*A;var U=_(F,L,P);if(!(U<.01&&(F=c*D-A*E,L=A*R-p*D,P=p*E-c*R,U=_(F,L,P),U<1e-6))){F/=U,L/=U,P/=U,this.up.set(x,p,c,A),this.right.set(x,F,L,P),this.center.set(x,d[0],d[1],d[2]),this.radius.set(x,Math.log(N));var X=c*P-A*L,j=A*F-p*P,$=p*L-c*F,Y=_(X,j,$);X/=Y,j/=Y,$/=Y;var q=p*R+c*E+A*D,Z=F*R+L*E+P*D,ne=X*R+j*E+$*D,Q=Math.asin(y(q)),oe=Math.atan2(ne,Z),ee=this.angle._state,G=ee[ee.length-1],re=ee[ee.length-2];G=G%(2*Math.PI);var H=Math.abs(G+2*Math.PI-oe),te=Math.abs(G-oe),ue=Math.abs(G-2*Math.PI-oe);H0?P.pop():new ArrayBuffer(F)}o.mallocArrayBuffer=k;function S(I){return new Uint8Array(k(I),0,I)}o.mallocUint8=S;function x(I){return new Uint16Array(k(2*I),0,I)}o.mallocUint16=x;function T(I){return new Uint32Array(k(4*I),0,I)}o.mallocUint32=T;function d(I){return new Int8Array(k(I),0,I)}o.mallocInt8=d;function b(I){return new Int16Array(k(2*I),0,I)}o.mallocInt16=b;function p(I){return new Int32Array(k(4*I),0,I)}o.mallocInt32=p;function c(I){return new Float32Array(k(4*I),0,I)}o.mallocFloat32=o.mallocFloat=c;function A(I){return new Float64Array(k(8*I),0,I)}o.mallocFloat64=o.mallocDouble=A;function h(I){return f?new Uint8ClampedArray(k(I),0,I):S(I)}o.mallocUint8Clamped=h;function R(I){return v?new BigUint64Array(k(8*I),0,I):null}o.mallocBigUint64=R;function E(I){return g?new BigInt64Array(k(8*I),0,I):null}o.mallocBigInt64=E;function D(I){return new DataView(k(I),0,I)}o.mallocDataView=D;function N(I){I=l.nextPow2(I);var F=l.log2(I),L=w[F];return L.length>0?L.pop():new s(I)}o.mallocBuffer=N,o.clearCache=function(){for(var F=0;F<32;++F)_.UINT8[F].length=0,_.UINT16[F].length=0,_.UINT32[F].length=0,_.INT8[F].length=0,_.INT16[F].length=0,_.INT32[F].length=0,_.FLOAT[F].length=0,_.DOUBLE[F].length=0,_.BIGUINT64[F].length=0,_.BIGINT64[F].length=0,_.UINT8C[F].length=0,y[F].length=0,w[F].length=0}},1755:function(a){"use strict";"use restrict";a.exports=o;function o(l){this.roots=new Array(l),this.ranks=new Array(l);for(var u=0;u",P="",O=L.length,U=P.length,X=N[0]===k||N[0]===T,j=0,$=-U;j>-1&&(j=I.indexOf(L,j),!(j===-1||($=I.indexOf(P,j+O),$===-1)||$<=j));){for(var Y=j;Y<$+U;++Y)if(Y=$)F[Y]=null,I=I.substr(0,Y)+" "+I.substr(Y+1);else if(F[Y]!==null){var q=F[Y].indexOf(N[0]);q===-1?F[Y]+=N:X&&(F[Y]=F[Y].substr(0,q+1)+(1+parseInt(F[Y][q+1]))+F[Y].substr(q+2))}var Z=j+O,ne=I.substr(Z,$-Z),Q=ne.indexOf(L);Q!==-1?j=Q:j=$+U}return F}function p(D,N,I){for(var F=N.textAlign||"start",L=N.textBaseline||"alphabetic",P=[1<<30,1<<30],O=[0,0],U=D.length,X=0;X/g,` +`):I=I.replace(/\/g," ");var O="",U=[];for(G=0;G-1?parseInt(ge[1+ye]):0,he=Le>-1?parseInt(Te[1+Le]):0;me!==he&&(ce=ce.replace(Me(),"?px "),te*=Math.pow(.75,he-me),ce=ce.replace("?px ",Me())),H+=.25*q*(he-me)}if(P.superscripts===!0){var be=ge.indexOf(k),Se=Te.indexOf(k),ze=be>-1?parseInt(ge[1+be]):0,Fe=Se>-1?parseInt(Te[1+Se]):0;ze!==Fe&&(ce=ce.replace(Me(),"?px "),te*=Math.pow(.75,Fe-ze),ce=ce.replace("?px ",Me())),H-=.25*q*(Fe-ze)}if(P.bolds===!0){var Je=ge.indexOf(y)>-1,Ye=Te.indexOf(y)>-1;!Je&&Ye&&(Ge?ce=ce.replace("italic ","italic bold "):ce="bold "+ce),Je&&!Ye&&(ce=ce.replace("bold ",""))}if(P.italics===!0){var Ge=ge.indexOf(M)>-1,We=Te.indexOf(M)>-1;!Ge&&We&&(ce="italic "+ce),Ge&&!We&&(ce=ce.replace("italic ",""))}N.font=ce}for(ee=0;ee0&&(L=F.size),F.lineSpacing&&F.lineSpacing>0&&(P=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(O.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(O.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(O.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(O.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(O.superscripts=!!F.styletags.superscripts)),I.font=[F.fontStyle,F.fontVariant,F.fontWeight,L+"px",F.font].filter(function(X){return X}).join(" "),I.textAlign="start",I.textBaseline="alphabetic",I.direction="ltr";var U=c(N,I,D,L,P,O);return R(U,F,L)}},1538:function(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function i(h){h.permitHostObjects___&&h.permitHostObjects___(i)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=i);var l=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var s=new u,f=Object.freeze({});if(s.set(f,1),s.get(f)!==1)l=!0;else{a.exports=WeakMap;return}}}var v=Object.prototype.hasOwnProperty,g=Object.getOwnPropertyNames,_=Object.defineProperty,y=Object.isExtensible,w="weakmap:",M=w+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var m=new ArrayBuffer(25),k=new Uint8Array(m);crypto.getRandomValues(k),M=w+"rand:"+Array.prototype.map.call(k,function(h){return(h%36).toString(36)}).join("")+"___"}function S(h){return!(h.substr(0,w.length)==w&&h.substr(h.length-3)==="___")}if(_(Object,"getOwnPropertyNames",{value:function(R){return g(R).filter(S)}}),"getPropertyNames"in Object){var x=Object.getPropertyNames;_(Object,"getPropertyNames",{value:function(R){return x(R).filter(S)}})}function T(h){if(h!==Object(h))throw new TypeError("Not an object: "+h);var R=h[M];if(R&&R.key===h)return R;if(y(h)){R={key:h};try{return _(h,M,{value:R,writable:!1,enumerable:!1,configurable:!1}),R}catch(E){return}}}(function(){var h=Object.freeze;_(Object,"freeze",{value:function(N){return T(N),h(N)}});var R=Object.seal;_(Object,"seal",{value:function(N){return T(N),R(N)}});var E=Object.preventExtensions;_(Object,"preventExtensions",{value:function(N){return T(N),E(N)}})})();function d(h){return h.prototype=null,Object.freeze(h)}var b=!1;function p(){!b&&typeof console!="undefined"&&(b=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var c=0,A=function(){this instanceof A||p();var h=[],R=[],E=c++;function D(L,P){var O,U=T(L);return U?E in U?U[E]:P:(O=h.indexOf(L),O>=0?R[O]:P)}function N(L){var P=T(L);return P?E in P:h.indexOf(L)>=0}function I(L,P){var O,U=T(L);return U?U[E]=P:(O=h.indexOf(L),O>=0?R[O]=P:(O=h.length,R[O]=P,h[O]=L)),this}function F(L){var P=T(L),O,U;return P?E in P&&delete P[E]:(O=h.indexOf(L),O<0?!1:(U=h.length-1,h[O]=void 0,R[O]=R[U],h[O]=h[U],h.length=U,R.length=U,!0))}return Object.create(A.prototype,{get___:{value:d(D)},has___:{value:d(N)},set___:{value:d(I)},delete___:{value:d(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(R,E){return this.get___(R,E)},writable:!0,configurable:!0},has:{value:function(R){return this.has___(R)},writable:!0,configurable:!0},set:{value:function(R,E){return this.set___(R,E)},writable:!0,configurable:!0},delete:{value:function(R){return this.delete___(R)},writable:!0,configurable:!0}}),typeof u=="function"?function(){l&&typeof Proxy!="undefined"&&(Proxy=void 0);function h(){this instanceof A||p();var R=new u,E=void 0,D=!1;function N(P,O){return E?R.has(P)?R.get(P):E.get___(P,O):R.get(P,O)}function I(P){return R.has(P)||(E?E.has___(P):!1)}var F;l?F=function(P,O){return R.set(P,O),R.has(P)||(E||(E=new A),E.set(P,O)),this}:F=function(P,O){if(D)try{R.set(P,O)}catch(U){E||(E=new A),E.set___(P,O)}else R.set(P,O);return this};function L(P){var O=!!R.delete(P);return E&&E.delete___(P)||O}return Object.create(A.prototype,{get___:{value:d(N)},has___:{value:d(I)},set___:{value:d(F)},delete___:{value:d(L)},permitHostObjects___:{value:d(function(P){if(P===i)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}h.prototype=A.prototype,a.exports=h,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=A)})()},236:function(a,o,i){var l=i(8284);a.exports=u;function u(){var s={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var v=f.valueOf(s);return v&&v.identity===s?v:l(f,s)}}},8284:function(a){a.exports=o;function o(i,l){var u={identity:l},s=i.valueOf;return Object.defineProperty(i,"valueOf",{value:function(f){return f!==l?s.apply(this,arguments):u},writable:!0}),u}},606:function(a,o,i){var l=i(236);a.exports=u;function u(){var s=l();return{get:function(f,v){var g=s(f);return g.hasOwnProperty("value")?g.value:v},set:function(f,v){return s(f).value=v,this},has:function(f){return"value"in s(f)},delete:function(f){return delete s(f).value}}}},3349:function(a){"use strict";function o(){return function(v,g,_,y,w,M){var m=v[0],k=_[0],S=[0],x=k;y|=0;var T=0,d=k;for(T=0;T=0!=p>=0&&w.push(S[0]+.5+.5*(b+p)/(b-p))}y+=d,++S[0]}}}function i(){return o()}var l=i;function u(v){var g={};return function(y,w,M){var m=y.dtype,k=y.order,S=[m,k.join()].join(),x=g[S];return x||(g[S]=x=v([m,k])),x(y.shape.slice(0),y.data,y.stride,y.offset|0,w,M)}}function s(v){return u(l.bind(void 0,v))}function f(v){return s({funcName:v.funcName})}a.exports=f({funcName:"zeroCrossings"})},781:function(a,o,i){"use strict";a.exports=u;var l=i(3349);function u(s,f){var v=[];return f=+f||0,l(s.hi(s.shape[0]-1),v,f),v}},7790:function(){}},r={};function t(a){var o=r[a];if(o!==void 0)return o.exports;var i=r[a]={id:a,loaded:!1,exports:{}};return e[a].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}(function(){t.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}}()})(),function(){t.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}}();var n=t(1964);kF.exports=n})()});var CF=pe((Tde,SF)=>{"use strict";SF.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 DF=pe((Ade,RF)=>{"use strict";var EF=CF();RF.exports=oie;var LF={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function oie(e){var r,t=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),EF[e])t=EF[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1),i=o.length,l=i<=4;n=1,l?(t=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],i===4&&(n=parseInt(o[3]+o[3],16)/255)):(t=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],i===8&&(n=parseInt(o[6]+o[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),a="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var u=r[1],s=u==="rgb",o=u.replace(/a$/,"");a=o;var i=o==="cmyk"?4:o==="gray"?1:3;t=r[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(g,_){if(/%$/.test(g))return _===i?parseFloat(g)/100:o==="rgb"?parseFloat(g)*255/100:parseFloat(g);if(o[_]==="h"){if(/deg$/.test(g))return parseFloat(g);if(LF[g]!==void 0)return LF[g]}return parseFloat(g)}),u===o&&t.push(1),n=s||t[i]===void 0?1:t[i],t=t.slice(0,i)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(t=e.match(/([0-9]+)/g).map(function(f){return parseFloat(f)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(t=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",t=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",t=[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)):(a="rgb",t=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:t,alpha:n}}});var FF=pe((kde,PF)=>{"use strict";PF.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var NF=pe((Sde,IF)=>{"use strict";var lie=FF();IF.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var r=e[0]/360,t=e[1]/100,n=e[2]/100,a,o,i,l,u;if(t===0)return u=n*255,[u,u,u];n<.5?o=n*(1+t):o=n+t-n*t,a=2*n-o,l=[0,0,0];for(var s=0;s<3;s++)i=r+1/3*-(s-1),i<0?i++:i>1&&i--,6*i<1?u=a+(o-a)*6*i:2*i<1?u=o:3*i<2?u=a+(o-a)*(2/3-i)*6:u=a,l[s]=u*255;return l}};lie.hsl=function(e){var r=e[0]/255,t=e[1]/255,n=e[2]/255,a=Math.min(r,t,n),o=Math.max(r,t,n),i=o-a,l,u,s;return o===a?l=0:r===o?l=(t-n)/i:t===o?l=2+(n-r)/i:n===o&&(l=4+(r-t)/i),l=Math.min(l*60,360),l<0&&(l+=360),s=(a+o)/2,o===a?u=0:s<=.5?u=i/(o+a):u=i/(2-o-a),[l,u*100,s*100]}});var M3=pe((Cde,zF)=>{zF.exports=sie;function sie(e,r,t){return rt?t:e:er?r:e}});var OF=pe((Ede,qF)=>{"use strict";var uie=DF(),fie=NF(),ad=M3();qF.exports=function(r){var t,n,a,o=uie(r);return o.space?(t=Array(3),t[0]=ad(o.values[0],0,255),t[1]=ad(o.values[1],0,255),t[2]=ad(o.values[2],0,255),o.space[0]==="h"&&(t=fie.rgb(t)),t.push(ad(o.alpha,0,1)),t):[]}});var UF=pe((Lde,BF)=>{BF.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 T3=pe((Rde,HF)=>{"use strict";var cie=OF(),id=M3(),vie=UF();HF.exports=function(r,t){(t==="float"||!t)&&(t="array"),t==="uint"&&(t="uint8"),t==="uint_clamped"&&(t="uint8_clamped");var n=vie(t),a=new n(4),o=t!=="uint8"&&t!=="uint8_clamped";return(!r.length||typeof r=="string")&&(r=cie(r),r[0]/=255,r[1]/=255,r[2]/=255),hie(r)?(a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3]!=null?r[3]:255,o&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(o?(a[0]=r[0],a[1]=r[1],a[2]=r[2],a[3]=r[3]!=null?r[3]:1):(a[0]=id(Math.floor(r[0]*255),0,255),a[1]=id(Math.floor(r[1]*255),0,255),a[2]=id(Math.floor(r[2]*255),0,255),a[3]=r[3]==null?255:id(Math.floor(r[3]*255),0,255)),a)};function hie(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 po=pe((Dde,VF)=>{"use strict";var die=T3();function pie(e){return e?die(e):[0,0,0,1]}VF.exports=pie});var al=pe((Pde,KF)=>{"use strict";var ZF=rt(),gie=ka(),od=T3(),ld=Li(),yie=Ti().defaultLine,GF=ea().isArrayOrTypedArray,A3=od(yie),JF=1;function YF(e,r){var t=e;return t[3]*=r,t}function WF(e){if(ZF(e))return A3;var r=od(e);return r.length?r:A3}function XF(e){return ZF(e)?e:JF}function mie(e,r,t){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=GF(n),o=GF(r),i=ld.extractOpts(e),l=[],u,s,f,v,g;if(i.colorscale!==void 0?u=ld.makeColorScaleFuncFromTrace(e):u=WF,a?s=function(y,w){return y[w]===void 0?A3:od(u(y[w]))}:s=WF,o?f=function(y,w){return y[w]===void 0?JF:XF(y[w])}:f=XF,a||o)for(var _=0;_{"use strict";QF.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 sd=pe((Ide,$F)=>{"use strict";$F.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var eI=pe((Nde,jF)=>{"use strict";var bie=Er();function S3(e,r,t,n){if(!r||!r.visible)return null;for(var a=bie.getComponentMethod("errorbars","makeComputeError")(r),o=new Array(e.length),i=0;i0){var v=n.c2l(s);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else o[i]=[-l[0]*t,l[1]*t]}return o}function _ie(e){for(var r=0;r{"use strict";var Mie=pn().gl_line3d,rI=pn().gl_scatter3d,Tie=pn().gl_error3d,Aie=pn().gl_mesh3d,kie=pn().delaunay_triangulate,go=ir(),oI=po(),ud=al().formatColor,Sie=kg(),C3=k3(),Cie=sd(),Eie=St(),Lie=to().appendArrayPointValue,Rie=eI();function lI(e,r){this.scene=e,this.uid=r,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 L3=lI.prototype;L3.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var r=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&&(go.isArrayOrTypedArray(this.textLabels)?(this.textLabels[r]||this.textLabels[r]===0)&&(e.textLabel=this.textLabels[r]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[r],this.data.y[r],this.data.z[r]],!0}};function Die(e,r,t){var n=(t+1)%3,a=(t+2)%3,o=[],i=[],l;for(l=0;l-1?-1:e.indexOf("right")>-1?1:0}function nI(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function Fie(e){var r=0,t=0,n=[r,t];if(Array.isArray(e))for(var a=0;a=0){var s=Die(l.position,l.delaunayColor,l.delaunayAxis);s.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(s):(s.gl=r,this.delaunayMesh=Aie(s),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)};L3.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 qie(e,r){var t=new lI(e,r.uid);return t.update(r),t}sI.exports=qie});var I3=pe((qde,vI)=>{"use strict";var yo=$l(),Oie=kn(),F3=ja(),R3=ro().axisHoverFormat,Bie=Sa().hovertemplateAttrs,Uie=Sa().texttemplateAttrs,fI=Sn(),Hie=k3(),Vie=sd(),gi=Mt().extendFlat,Gie=zn().overrideAll,cI=Wc(),Yie=yo.line,fs=yo.marker,Wie=fs.line,Xie=gi({width:Yie.width,dash:{valType:"enumerated",values:cI(Hie),dflt:"solid"}},F3("line"));function D3(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 P3=vI.exports=Gie({x:yo.x,y:yo.y,z:{valType:"data_array"},text:gi({},yo.text,{}),texttemplate:Uie({},{}),hovertext:gi({},yo.hovertext,{}),hovertemplate:Bie(),xhoverformat:R3("x"),yhoverformat:R3("y"),zhoverformat:R3("z"),mode:gi({},yo.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:D3("x"),y:D3("y"),z:D3("z")},connectgaps:yo.connectgaps,line:Xie,marker:gi({symbol:{valType:"enumerated",values:cI(Vie),dflt:"circle",arrayOk:!0},size:gi({},fs.size,{dflt:8}),sizeref:fs.sizeref,sizemin:fs.sizemin,sizemode:fs.sizemode,opacity:gi({},fs.opacity,{arrayOk:!1}),colorbar:fs.colorbar,line:gi({width:gi({},Wie.width,{arrayOk:!1})},F3("marker.line"))},F3("marker")),textposition:gi({},yo.textposition,{dflt:"top center"}),textfont:Oie({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:fI.opacity,hoverinfo:gi({},fI.hoverinfo)},"calc","nested");P3.x.editType=P3.y.editType=P3.z.editType="calc+clearAxisTypes"});var pI=pe((Ode,dI)=>{"use strict";var hI=Er(),Zie=ir(),N3=oa(),Jie=em(),Kie=rm(),Qie=tm(),$ie=I3();dI.exports=function(r,t,n,a){function o(_,y){return Zie.coerce(r,t,$ie,_,y)}var i=jie(r,t,o,a);if(!i){t.visible=!1;return}o("text"),o("hovertext"),o("hovertemplate"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),o("mode"),N3.hasMarkers(t)&&Jie(r,t,n,a,o,{noSelect:!0,noAngle:!0}),N3.hasLines(t)&&(o("connectgaps"),Kie(r,t,n,a,o)),N3.hasText(t)&&(o("texttemplate"),Qie(r,t,a,o,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var l=(t.line||{}).color,u=(t.marker||{}).color;o("surfaceaxis")>=0&&o("surfacecolor",l||u);for(var s=["x","y","z"],f=0;f<3;++f){var v="projection."+s[f];o(v+".show")&&(o(v+".opacity"),o(v+".scale"))}var g=hI.getComponentMethod("errorbars","supplyDefaults");g(r,t,l||u||n,{axis:"z"}),g(r,t,l||u||n,{axis:"y",inherit:"z"}),g(r,t,l||u||n,{axis:"x",inherit:"z"})};function jie(e,r,t,n){var a=0,o=t("x"),i=t("y"),l=t("z"),u=hI.getComponentMethod("calendars","handleTraceDefaults");return u(e,r,["x","y","z"],n),o&&i&&l&&(a=Math.min(o.length,i.length,l.length),r._length=r._xlength=r._ylength=r._zlength=a),a}});var yI=pe((Bde,gI)=>{"use strict";var eoe=g1(),roe=im();gI.exports=function(r,t){var n=[{x:!1,y:!1,trace:t,t:{}}];return eoe(n,t),roe(r,t),n}});var xI=pe((Ude,mI)=>{mI.exports=toe;function toe(e,r){if(typeof e!="string")throw new TypeError("must specify type string");if(r=r||{},typeof document=="undefined"&&!r.canvas)return null;var t=r.canvas||document.createElement("canvas");typeof r.width=="number"&&(t.width=r.width),typeof r.height=="number"&&(t.height=r.height);var n=r,a;try{var o=[e];e.indexOf("webgl")===0&&o.push("experimental-"+e);for(var i=0;i{var noe=xI();bI.exports=function(r){return noe("webgl",r)}});var TI=pe((Vde,MI)=>{"use strict";var wI=Zr(),aoe=function(){};MI.exports=function(r){for(var t in r)typeof r[t]=="function"&&(r[t]=aoe);r.destroy=function(){r.container.parentNode.removeChild(r.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=wI.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=wI.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),r.container.appendChild(n),r.container.style.background="#FFFFFF",r.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var SI=pe((Gde,kI)=>{"use strict";var cs=po(),ioe=ir(),ooe=["xaxis","yaxis","zaxis"];function AI(){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 loe=AI.prototype;loe.merge=function(e,r){for(var t=this,n=0;n<3;++n){var a=r[ooe[n]];if(!a.visible){t.tickEnable[n]=!1,t.labelEnable[n]=!1,t.lineEnable[n]=!1,t.lineTickEnable[n]=!1,t.gridEnable[n]=!1,t.zeroEnable[n]=!1,t.backgroundEnable[n]=!1;continue}t.labels[n]=e._meta?ioe.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(t.labelColor[n]=cs(a.title.font.color)),a.title.font.family&&(t.labelFont[n]=a.title.font.family),a.title.font.size&&(t.labelSize[n]=a.title.font.size),a.title.font.weight&&(t.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(t.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(t.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(t.lineEnable[n]=a.showline),"linecolor"in a&&(t.lineColor[n]=cs(a.linecolor)),"linewidth"in a&&(t.lineWidth[n]=a.linewidth),"showgrid"in a&&(t.gridEnable[n]=a.showgrid),"gridcolor"in a&&(t.gridColor[n]=cs(a.gridcolor)),"gridwidth"in a&&(t.gridWidth[n]=a.gridwidth),a.type==="log"?t.zeroEnable[n]=!1:"zeroline"in a&&(t.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(t.zeroLineColor[n]=cs(a.zerolinecolor)),"zerolinewidth"in a&&(t.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?t.lineTickEnable[n]=!0:t.lineTickEnable[n]=!1,"ticklen"in a&&(t.lineTickLength[n]=t._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(t.lineTickColor[n]=cs(a.tickcolor)),"tickwidth"in a&&(t.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(t.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(t.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(t.tickColor[n]=cs(a.tickfont.color)),a.tickfont.family&&(t.tickFont[n]=a.tickfont.family),a.tickfont.size&&(t.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(t.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(t.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(t.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(t.lineTickMirror[n]=!0,t.lineMirror[n]=!0):a.mirror===!0?(t.lineTickMirror[n]=!1,t.lineMirror[n]=!0):(t.lineTickMirror[n]=!1,t.lineMirror[n]=!1):t.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(t.backgroundEnable[n]=!0,t.backgroundColor[n]=cs(a.backgroundcolor)):t.backgroundEnable[n]=!1}};function soe(e,r){var t=new AI;return t.merge(e,r),t}kI.exports=soe});var LI=pe((Yde,EI)=>{"use strict";var uoe=po(),foe=["xaxis","yaxis","zaxis"];function CI(){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 coe=CI.prototype;coe.merge=function(e){for(var r=0;r<3;++r){var t=e[foe[r]];if(!t.visible){this.enabled[r]=!1,this.drawSides[r]=!1;continue}this.enabled[r]=t.showspikes,this.colors[r]=uoe(t.spikecolor),this.drawSides[r]=t.spikesides,this.lineWidth[r]=t.spikethickness}};function voe(e){var r=new CI;return r.merge(e),r}EI.exports=voe});var PI=pe((Wde,DI)=>{"use strict";DI.exports=yoe;var RI=St(),hoe=ir(),doe=["xaxis","yaxis","zaxis"],poe=[0,0,0];function goe(e){for(var r=new Array(3),t=0;t<3;++t){for(var n=e[t],a=new Array(n.length),o=0;o/g," "));a[o]=s,i.tickmode=l}}r.ticks=a;for(var o=0;o<3;++o){poe[o]=.5*(e.glplot.bounds[0][o]+e.glplot.bounds[1][o]);for(var f=0;f<2;++f)r.bounds[f][o]=e.glplot.bounds[f][o]}e.contourLevels=goe(a)}});var BI=pe((Xde,OI)=>{"use strict";var NI=pn().gl_plot3d,moe=NI.createCamera,FI=NI.createScene,xoe=_I(),boe=Zv(),vd=Er(),Jn=ir(),cd=Jn.preserveDrawingBuffer(),hd=St(),yi=io(),_oe=po(),woe=TI(),Moe=Um(),Toe=SI(),Aoe=LI(),koe=PI(),Soe=$s().applyAutorangeOptions,N0,fd,zI=!1;function qI(e,r){var t=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",t.appendChild(a),this.svgContainer=a,t.id=e.id,t.style.position="absolute",t.style.top=t.style.left="0px",t.style.width=t.style.height="100%",n.appendChild(t),this.fullLayout=r,this.id=e.id||"scene",this.fullSceneLayout=r[this.id],this.plotArgs=[[],{},{}],this.axesOptions=Toe(r,r[this.id]),this.spikeOptions=Aoe(r[this.id]),this.container=t,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=vd.getComponentMethod("annotations3d","convert"),this.drawAnnotations=vd.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Rn=qI.prototype;Rn.prepareOptions=function(){var e=this,r={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:cd,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(!fd&&(N0=document.createElement("canvas"),fd=xoe({canvas:N0,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!fd))throw new Error("error creating static canvas/context for image server");r.gl=fd,r.canvas=N0}return r};var II=!0;Rn.tryCreatePlot=function(){var e=this,r=e.prepareOptions(),t=!0;try{e.glplot=FI(r)}catch(n){if(e.staticMode||!II||cd)t=!1;else{Jn.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{cd=r.glOptions.preserveDrawingBuffer=!0,e.glplot=FI(r)}catch(a){cd=r.glOptions.preserveDrawingBuffer=!1,t=!1}}}return II=!1,t};Rn.initializeGLCamera=function(){var e=this,r=e.fullSceneLayout.camera,t=r.projection.type==="orthographic";e.camera=moe(e.container,{center:[r.center.x,r.center.y,r.center.z],eye:[r.eye.x,r.eye.y,r.eye.z],up:[r.up.x,r.up.y,r.up.z],_ortho:t,zoomMin:.01,zoomMax:100,mode:"orbit"})};Rn.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var r=e.tryCreatePlot();if(!r)return woe(e);e.traces={},e.make4thDimension();var t=e.graphDiv,n=t.layout,a=function(){var i={};return e.isCameraChanged(n)&&(i[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(i[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=i[e.id+".aspectmode"]="manual")),i},o=function(i){if(i.fullSceneLayout.dragmode!==!1){var l=a();i.saveLayout(n),i.graphDiv.emit("plotly_relayout",l)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){o(e)}),e.glplot.canvas.addEventListener("touchstart",function(){zI=!0}),e.glplot.canvas.addEventListener("wheel",function(i){if(t._context._scrollZoom.gl3d){if(e.camera._ortho){var l=i.deltaX>i.deltaY?1.1:.9090909090909091,u=e.glplot.getAspectratio();e.glplot.setAspectratio({x:l*u.x,y:l*u.y,z:l*u.z})}o(e)}},boe?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var i=a();e.graphDiv.emit("plotly_relayouting",i)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(i){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:i,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Rn.render=function(){var e=this,r=e.graphDiv,t,n=e.svgContainer,a=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY,l=a.width*o,u=a.height*i;n.setAttributeNS(null,"viewBox","0 0 "+l+" "+u),n.setAttributeNS(null,"width",l),n.setAttributeNS(null,"height",u),koe(e),e.glplot.axes.update(e.axesOptions);for(var s=Object.keys(e.traces),f=null,v=e.glplot.selection,g=0;g")):t.type==="isosurface"||t.type==="volume"?(m.valueLabel=hd.hoverLabelText(e._mockAxis,e._mockAxis.d2l(v.traceCoordinate[3]),t.valuehoverformat),d.push("value: "+m.valueLabel),v.textLabel&&d.push(v.textLabel),T=d.join("
")):T=v.textLabel;var b={x:v.traceCoordinate[0],y:v.traceCoordinate[1],z:v.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:M};yi.appendArrayPointValue(b,w,M),t._module.eventData&&(b=w._module.eventData(b,v,w,{},M));var p={points:[b]};if(e.fullSceneLayout.hovermode){var c=[];yi.loneHover({trace:w,x:(.5+.5*y[0]/y[3])*l,y:(.5-.5*y[1]/y[3])*u,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:T,name:f.name,color:yi.castHoverOption(w,M,"bgcolor")||f.color,borderColor:yi.castHoverOption(w,M,"bordercolor"),fontFamily:yi.castHoverOption(w,M,"font.family"),fontSize:yi.castHoverOption(w,M,"font.size"),fontColor:yi.castHoverOption(w,M,"font.color"),nameLength:yi.castHoverOption(w,M,"namelength"),textAlign:yi.castHoverOption(w,M,"align"),hovertemplate:Jn.castOption(w,M,"hovertemplate"),hovertemplateLabels:Jn.extendFlat({},b,m),eventData:[b]},{container:n,gd:r,inOut_bbox:c}),b.bbox=c[0]}v.distance<5&&(v.buttons||zI)?r.emit("plotly_click",p):r.emit("plotly_hover",p),this.oldEventData=p}else yi.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Rn.recoverContext=function(){var e=this;e.glplot.dispose();var r=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(r);return}if(!e.initializeGLPlot()){Jn.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(r)};var z0=["xaxis","yaxis","zaxis"];function Coe(e,r,t){for(var n=e.fullSceneLayout,a=0;a<3;a++){var o=z0[a],i=o.charAt(0),l=n[o],u=r[i],s=r[i+"calendar"],f=r["_"+i+"length"];if(!Jn.isArrayOrTypedArray(u))t[0][a]=Math.min(t[0][a],0),t[1][a]=Math.max(t[1][a],f-1);else for(var v,g=0;g<(f||u.length);g++)if(Jn.isArrayOrTypedArray(u[g]))for(var _=0;_w[1][i])w[0][i]=-1,w[1][i]=1;else{var h=w[1][i]-w[0][i];w[0][i]-=h/32,w[1][i]+=h/32}if(k=[w[0][i],w[1][i]],k=Soe(k,u),w[0][i]=k[0],w[1][i]=k[1],u.isReversed()){var R=w[0][i];w[0][i]=w[1][i],w[1][i]=R}}else k=u.range,w[0][i]=u.r2l(k[0]),w[1][i]=u.r2l(k[1]);w[0][i]===w[1][i]&&(w[0][i]-=1,w[1][i]+=1),M[i]=w[1][i]-w[0][i],u.range=[w[0][i],w[1][i]],u.limitRange(),n.glplot.setBounds(i,{min:u.range[0]*_[i],max:u.range[1]*_[i]})}var E,D=f.aspectmode;if(D==="cube")E=[1,1,1];else if(D==="manual"){var N=f.aspectratio;E=[N.x,N.y,N.z]}else if(D==="auto"||D==="data"){var I=[1,1,1];for(i=0;i<3;++i){u=f[z0[i]],s=u.type;var F=m[s];I[i]=Math.pow(F.acc,1/F.count)/_[i]}D==="data"||Math.max.apply(null,I)/Math.min.apply(null,I)<=4?E=I:E=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");f.aspectratio.x=v.aspectratio.x=E[0],f.aspectratio.y=v.aspectratio.y=E[1],f.aspectratio.z=v.aspectratio.z=E[2],n.glplot.setAspectratio(f.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:f.aspectratio.x,y:f.aspectratio.y,z:f.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=f.aspectmode);var L=f.domain||null,P=r._size||null;if(L&&P){var O=n.container.style;O.position="absolute",O.left=P.l+L.x[0]*P.w+"px",O.top=P.t+(1-L.y[1])*P.h+"px",O.width=P.w*(L.x[1]-L.x[0])+"px",O.height=P.h*(L.y[1]-L.y[0])+"px"}n.glplot.redraw()}};Rn.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 Loe(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 Roe(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"}}}Rn.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),Roe(e.camera)};Rn.setViewport=function(e){var r=this,t=e.camera;r.camera.lookAt.apply(this,Loe(t)),r.glplot.setAspectratio(e.aspectratio);var n=t.projection.type==="orthographic",a=r.camera._ortho;n!==a&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())};Rn.isCameraChanged=function(e){var r=this,t=r.getCamera(),n=Jn.nestedProperty(e,r.id+".camera"),a=n.get();function o(s,f,v,g){var _=["up","center","eye"],y=["x","y","z"];return f[_[v]]&&s[_[v]][y[g]]===f[_[v]][y[g]]}var i=!1;if(a===void 0)i=!0;else{for(var l=0;l<3;l++)for(var u=0;u<3;u++)if(!o(t,a,l,u)){i=!0;break}(!a.projection||t.projection&&t.projection.type!==a.projection.type)&&(i=!0)}return i};Rn.isAspectChanged=function(e){var r=this,t=r.glplot.getAspectratio(),n=Jn.nestedProperty(e,r.id+".aspectratio"),a=n.get();return a===void 0||a.x!==t.x||a.y!==t.y||a.z!==t.z};Rn.saveLayout=function(e){var r=this,t=r.fullLayout,n,a,o,i,l,u,s=r.isCameraChanged(e),f=r.isAspectChanged(e),v=s||f;if(v){var g={};if(s&&(n=r.getCamera(),a=Jn.nestedProperty(e,r.id+".camera"),o=a.get(),g[r.id+".camera"]=o),f&&(i=r.glplot.getAspectratio(),l=Jn.nestedProperty(e,r.id+".aspectratio"),u=l.get(),g[r.id+".aspectratio"]=u),vd.call("_storeDirectGUIEdit",e,t._preGUI,g),s){a.set(n);var _=Jn.nestedProperty(t,r.id+".camera");_.set(n)}if(f){l.set(i);var y=Jn.nestedProperty(t,r.id+".aspectratio");y.set(i),r.glplot.redraw()}}return v};Rn.updateFx=function(e,r){var t=this,n=t.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 a=t.graphDiv,o=a._fullLayout,i=t.fullSceneLayout.camera,l=i.up.x,u=i.up.y,s=i.up.z;if(s/Math.sqrt(l*l+u*u+s*s)<.999){var f=t.id+".camera.up",v={x:0,y:0,z:1},g={};g[f]=v;var _=a.layout;vd.call("_storeDirectGUIEdit",_,o._preGUI,g),i.up=v,Jn.nestedProperty(_,f).set(v)}}else n.keyBindingMode=e;t.fullSceneLayout.hovermode=r};function Doe(e,r,t){for(var n=0,a=t-1;n0)for(var l=255/i,u=0;u<3;++u)e[o+u]=Math.min(l*e[o+u],255)}}Rn.toImage=function(e){var r=this;e||(e="png"),r.staticMode&&r.container.appendChild(N0),r.glplot.redraw();var t=r.glplot.gl,n=t.drawingBufferWidth,a=t.drawingBufferHeight;t.bindFramebuffer(t.FRAMEBUFFER,null);var o=new Uint8Array(n*a*4);t.readPixels(0,0,n,a,t.RGBA,t.UNSIGNED_BYTE,o),Doe(o,n,a),Poe(o,n,a);var i=document.createElement("canvas");i.width=n,i.height=a;var l=i.getContext("2d",{willReadFrequently:!0}),u=l.createImageData(n,a);u.data.set(o),l.putImageData(u,0,0);var s;switch(e){case"jpeg":s=i.toDataURL("image/jpeg");break;case"webp":s=i.toDataURL("image/webp");break;default:s=i.toDataURL("image/png")}return r.staticMode&&r.container.removeChild(N0),s};Rn.setConvert=function(){for(var e=this,r=0;r<3;r++){var t=e.fullSceneLayout[z0[r]];hd.setConvert(t,e.fullLayout),t.setScale=Jn.noop}};Rn.make4thDimension=function(){var e=this,r=e.graphDiv,t=r._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},hd.setConvert(e._mockAxis,t)};OI.exports=qI});var HI=pe((Zde,UI)=>{"use strict";UI.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var q3=pe((Jde,VI)=>{"use strict";var Foe=Zr(),Br=Ra(),z3=Mt().extendFlat,Ioe=zn().overrideAll;VI.exports=Ioe({visible:Br.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:Foe.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Br.color,categoryorder:Br.categoryorder,categoryarray:Br.categoryarray,title:{text:Br.title.text,font:Br.title.font},type:z3({},Br.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Br.autotypenumbers,autorange:Br.autorange,autorangeoptions:{minallowed:Br.autorangeoptions.minallowed,maxallowed:Br.autorangeoptions.maxallowed,clipmin:Br.autorangeoptions.clipmin,clipmax:Br.autorangeoptions.clipmax,include:Br.autorangeoptions.include,editType:"plot"},rangemode:Br.rangemode,minallowed:Br.minallowed,maxallowed:Br.maxallowed,range:z3({},Br.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Br.minor.tickmode,nticks:Br.nticks,tick0:Br.tick0,dtick:Br.dtick,tickvals:Br.tickvals,ticktext:Br.ticktext,ticks:Br.ticks,mirror:Br.mirror,ticklen:Br.ticklen,tickwidth:Br.tickwidth,tickcolor:Br.tickcolor,showticklabels:Br.showticklabels,labelalias:Br.labelalias,tickfont:Br.tickfont,tickangle:Br.tickangle,tickprefix:Br.tickprefix,showtickprefix:Br.showtickprefix,ticksuffix:Br.ticksuffix,showticksuffix:Br.showticksuffix,showexponent:Br.showexponent,exponentformat:Br.exponentformat,minexponent:Br.minexponent,separatethousands:Br.separatethousands,tickformat:Br.tickformat,tickformatstops:Br.tickformatstops,hoverformat:Br.hoverformat,showline:Br.showline,linecolor:Br.linecolor,linewidth:Br.linewidth,showgrid:Br.showgrid,gridcolor:z3({},Br.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Br.gridwidth,zeroline:Br.zeroline,zerolinecolor:Br.zerolinecolor,zerolinewidth:Br.zerolinewidth},"plot","from-root")});var H3=pe((Kde,GI)=>{"use strict";var O3=q3(),Noe=$1().attributes,B3=Mt().extendFlat,zoe=ir().counterRegex;function U3(e,r,t){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:r,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}GI.exports={_arrayAttrRegexps:[zoe("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:B3(U3(0,0,1),{}),center:B3(U3(0,0,0),{}),eye:B3(U3(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:Noe({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:O3,yaxis:O3,zaxis:O3,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 WI=pe((Qde,YI)=>{"use strict";var qoe=ir(),Ooe=gt(),Boe=$1().defaults;YI.exports=function(r,t,n,a){var o=a.type,i=a.attributes,l=a.handleDefaults,u=a.partition||"x",s=t._subplots[o],f=s.length,v=f&&s[0].replace(/\d+$/,""),g,_;function y(k,S){return qoe.coerce(g,_,i,k,S)}for(var w=0;w{"use strict";var Uoe=ka().mix,XI=ir(),Hoe=gt(),Voe=q3(),Goe=Mm(),Yoe=T1(),ZI=["xaxis","yaxis","zaxis"],Woe=100*136/187;JI.exports=function(r,t,n){var a,o;function i(s,f){return XI.coerce(a,o,Voe,s,f)}for(var l=0;l{"use strict";var Xoe=ir(),Zoe=Zr(),Joe=Er(),Koe=WI(),Qoe=KI(),QI=H3(),$oe=_f().getSubplotData,$I="gl3d";jI.exports=function(r,t,n){var a=t._basePlotModules.length>1;function o(i){if(!a){var l=Xoe.validate(r[i],QI[i]);if(l)return r[i]}}Koe(r,t,n,{type:$I,attributes:QI,handleDefaults:joe,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:o,autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})};function joe(e,r,t,n){for(var a=t("bgcolor"),o=Zoe.combine(a,n.paper_bgcolor),i=["up","center","eye"],l=0;l.999)&&(g="turntable")}else g="turntable";t("dragmode",g),t("hovermode",n.getDfltFromLayout("hovermode"))}});var il=pe(Kn=>{"use strict";var ele=zn().overrideAll,rle=_l(),tle=BI(),nle=_f().getSubplotData,ale=ir(),ile=Io(),qu="gl3d",V3="scene";Kn.name=qu;Kn.attr=V3;Kn.idRoot=V3;Kn.idRegex=Kn.attrRegex=ale.counterRegex("scene");Kn.attributes=HI();Kn.layoutAttributes=H3();Kn.baseLayoutAttrOverrides=ele({hoverlabel:rle.hoverlabel},"plot","nested");Kn.supplyLayoutDefaults=eN();Kn.plot=function(r){for(var t=r._fullLayout,n=r._fullData,a=t._subplots[qu],o=0;o{"use strict";rN.exports={plot:uI(),attributes:I3(),markerSymbols:sd(),supplyDefaults:pI(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:yI(),moduleType:"trace",name:"scatter3d",basePlotModule:il(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var aN=pe((tpe,nN)=>{"use strict";nN.exports=tN()});var q0=pe((npe,lN)=>{"use strict";var iN=Zr(),ole=ja(),G3=ro().axisHoverFormat,lle=Sa().hovertemplateAttrs,oN=Sn(),Y3=Mt().extendFlat,sle=zn().overrideAll;function W3(e){return{valType:"boolean",dflt:!1}}function X3(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:W3("x"),y:W3("y"),z:W3("z")},color:{valType:"color",dflt:iN.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:iN.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var Z3=lN.exports=sle(Y3({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:lle(),xhoverformat:G3("x"),yhoverformat:G3("y"),zhoverformat:G3("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},ole("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:X3("x"),y:X3("y"),z:X3("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:Y3({},oN.hoverinfo),showlegend:Y3({},oN.showlegend,{dflt:!1})}),"calc","nested");Z3.x.editType=Z3.y.editType=Z3.z.editType="calc+clearAxisTypes"});var K3=pe((ape,fN)=>{"use strict";var ule=Er(),sN=ir(),fle=Ei(),cle=q0(),J3=.1;function vle(e,r){for(var t=[],n=32,a=0;a{"use strict";var cN=zo();vN.exports=function(r,t){t.surfacecolor?cN(r,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):cN(r,t,{vals:t.z,containerStr:"",cLetter:"c"})}});var yN=pe((ope,gN)=>{"use strict";var ple=ir(),dN=.01,gle=[[-1,0],[1,0],[0,-1],[0,1]];function yle(e){return .5-.25*Math.min(1,e*.5)}gN.exports=function(r,t){var n=1,a;for(pN(r,t),a=0;adN;a++)n=pN(r,t,yle(n));return n>dN&&ple.log("interp2d didn't converge quickly",n),r};function pN(e,r,t){var n=0,a,o,i,l,u,s,f,v,g,_,y,w,M;for(l=0;lw&&(n=Math.max(n,Math.abs(e[o][i]-y)/(M-w))))}return n}});var xN=pe((lpe,mN)=>{"use strict";var mle=ir().maxRowLength;mN.exports=function(r){var t=[],n={},a=[],o=r[0],i=[],l=[0,0,0],u=mle(r),s,f,v,g,_,y,w,M;for(f=0;f=0;_--)g=a[_],f=g[0],v=g[1],y=((n[[f-1,v]]||l)[2]+(n[[f+1,v]]||l)[2]+(n[[f,v-1]]||l)[2]+(n[[f,v+1]]||l)[2])/20,y&&(w[g]=[f,v,y],a.splice(_,1),M=!0);if(!M)throw"findEmpties iterated with no new neighbors";for(g in w)n[g]=w[g],t.push(w[g])}return t.sort(function(m,k){return k[2]-m[2]})}});var AN=pe((spe,TN)=>{"use strict";var xle=pn().gl_surface3d,Ou=pn().ndarray,ble=pn().ndarray_linear_interpolate.d2,_le=yN(),wle=xN(),O0=ir().isArrayOrTypedArray,Mle=al().parseColorScale,bN=po(),Tle=Li().extractOpts;function wN(e,r,t){this.scene=e,this.uid=t,this.surface=r,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 mi=wN.prototype;mi.getXat=function(e,r,t,n){var a=O0(this.data.x)?O0(this.data.x[0])?this.data.x[r][e]:this.data.x[e]:e;return t===void 0?a:n.d2l(a,0,t)};mi.getYat=function(e,r,t,n){var a=O0(this.data.y)?O0(this.data.y[0])?this.data.y[r][e]:this.data.y[r]:r;return t===void 0?a:n.d2l(a,0,t)};mi.getZat=function(e,r,t,n){var a=this.data.z[r][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[r][e]),t===void 0?a:n.d2l(a,0,t)};mi.handlePick=function(e){if(e.object===this.surface){var r=(e.data.index[0]-1)/this.dataScaleX-1,t=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(r),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(t),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var o=0;o<3;o++){var i=e.dataCoordinate[o];i!=null&&(e.dataCoordinate[o]*=this.scene.dataScale[o])}var l=this.data.hovertext||this.data.text;return O0(l)&&l[a]&&l[a][n]!==void 0?e.textLabel=l[a][n]:l?e.textLabel=l:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function Ale(e){var r=e[0].rgb,t=e[e.length-1].rgb;return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]}var Bu=[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 kle(e,r){if(e0){t=Bu[n];break}return t}function Cle(e,r){if(!(e<1||r<1)){for(var t=Q3(e),n=Q3(r),a=1,o=0;odd;)n--,n/=Sle(n),n++,n<_N&&(n=dd);var a=Math.round(n/e);return a>1?a:1};function Lle(e,r,t){var n=t[8]+t[2]*r[0]+t[5]*r[1];return e[0]=(t[6]+t[0]*r[0]+t[3]*r[1])/n,e[1]=(t[7]+t[1]*r[0]+t[4]*r[1])/n,e}function Rle(e,r,t){return Dle(e,r,Lle,t),e}function Dle(e,r,t,n){for(var a=[0,0],o=e.shape[0],i=e.shape[1],l=0;l0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(r[n]=!0,a=this.contourStart[n];ag&&(this.minValues[s]=g),this.maxValues[s]{"use strict";kN.exports={attributes:q0(),supplyDefaults:K3().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:hN(),plot:AN(),moduleType:"trace",name:"surface",basePlotModule:il(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var EN=pe((fpe,CN)=>{"use strict";CN.exports=SN()});var Uu=pe((cpe,RN)=>{"use strict";var Ile=ja(),$3=ro().axisHoverFormat,Nle=Sa().hovertemplateAttrs,ol=q0(),LN=Sn(),ll=Mt().extendFlat;RN.exports=ll({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:Nle({editType:"calc"}),xhoverformat:$3("x"),yhoverformat:$3("y"),zhoverformat:$3("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"}},Ile("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:ol.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ll({},ol.contours.x.show,{}),color:ol.contours.x.color,width:ol.contours.x.width,editType:"calc"},lightposition:{x:ll({},ol.lightposition.x,{dflt:1e5}),y:ll({},ol.lightposition.y,{dflt:1e5}),z:ll({},ol.lightposition.z,{dflt:0}),editType:"calc"},lighting:ll({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},ol.lighting),hoverinfo:ll({},LN.hoverinfo,{editType:"calc"}),showlegend:ll({},LN.showlegend,{dflt:!1})})});var gd=pe((vpe,PN)=>{"use strict";var zle=ja(),pd=ro().axisHoverFormat,qle=Sa().hovertemplateAttrs,B0=Uu(),DN=Sn(),j3=Mt().extendFlat,Ole=zn().overrideAll;function e5(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function r5(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var Hu=PN.exports=Ole(j3({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:e5("x"),y:e5("y"),z:e5("z")},caps:{x:r5("x"),y:r5("y"),z:r5("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:qle(),xhoverformat:pd("x"),yhoverformat:pd("y"),zhoverformat:pd("z"),valuehoverformat:pd("value",1),showlegend:j3({},DN.showlegend,{dflt:!1})},zle("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:B0.opacity,lightposition:B0.lightposition,lighting:B0.lighting,flatshading:B0.flatshading,contour:B0.contour,hoverinfo:j3({},DN.hoverinfo)}),"calc","nested");Hu.flatshading.dflt=!0;Hu.lighting.facenormalsepsilon.dflt=0;Hu.x.editType=Hu.y.editType=Hu.z.editType=Hu.value.editType="calc+clearAxisTypes"});var t5=pe((hpe,IN)=>{"use strict";var Ble=ir(),Ule=Er(),Hle=gd(),Vle=Ei();function Gle(e,r,t,n){function a(o,i){return Ble.coerce(e,r,Hle,o,i)}FN(e,r,t,n,a)}function FN(e,r,t,n,a){var o=a("isomin"),i=a("isomax");i!=null&&o!==void 0&&o!==null&&o>i&&(r.isomin=null,r.isomax=null);var l=a("x"),u=a("y"),s=a("z"),f=a("value");if(!l||!l.length||!u||!u.length||!s||!s.length||!f||!f.length){r.visible=!1;return}var v=Ule.getComponentMethod("calendars","handleTraceDefaults");v(e,r,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(w){a(w+"hoverformat");var M="caps."+w,m=a(M+".show");m&&a(M+".fill");var k="slices."+w,S=a(k+".show");S&&(a(k+".fill"),a(k+".locations"))});var g=a("spaceframe.show");g&&a("spaceframe.fill");var _=a("surface.show");_&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var y=a("contour.show");y&&(a("contour.color"),a("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(w){a(w)}),Vle(e,r,n,a,{prefix:"",cLetter:"c"}),r._length=null}IN.exports={supplyDefaults:Gle,supplyIsoDefaults:FN}});var yd=pe((dpe,zN)=>{"use strict";var a5=ir(),Yle=zo();function Wle(e,r){r._len=Math.min(r.u.length,r.v.length,r.w.length,r.x.length,r.y.length,r.z.length),r._u=Hi(r.u,r._len),r._v=Hi(r.v,r._len),r._w=Hi(r.w,r._len),r._x=Hi(r.x,r._len),r._y=Hi(r.y,r._len),r._z=Hi(r.z,r._len);var t=NN(r);r._gridFill=t.fill,r._Xs=t.Xs,r._Ys=t.Ys,r._Zs=t.Zs,r._len=t.len;var n=0,a,o,i;r.starts&&(a=Hi(r.starts.x||[]),o=Hi(r.starts.y||[]),i=Hi(r.starts.z||[]),n=Math.min(a.length,o.length,i.length)),r._startsX=a||[],r._startsY=o||[],r._startsZ=i||[];var l=0,u=1/0,s;for(s=0;s1&&(S=r[a-1],T=t[a-1],b=n[a-1]),o=0;oS?"-":"+")+"x"),y=y.replace("y",(x>T?"-":"+")+"y"),y=y.replace("z",(d>b?"-":"+")+"z");var h=function(){a=0,p=[],c=[],A=[]};(!a||a{"use strict";var Xle=zo(),Zle=yd().processGrid,md=yd().filter;qN.exports=function(r,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=md(t.x,t._len),t._y=md(t.y,t._len),t._z=md(t.z,t._len),t._value=md(t.value,t._len);var n=Zle(t);t._gridFill=n.fill,t._Xs=n.Xs,t._Ys=n.Ys,t._Zs=n.Zs,t._len=n.len;for(var a=1/0,o=-1/0,i=0;i{"use strict";ON.exports=function(r,t,n,a){a=a||r.length;for(var o=new Array(a),i=0;i{"use strict";var Jle=pn().gl_mesh3d,Kle=al().parseColorScale,Qle=ir().isArrayOrTypedArray,$le=po(),jle=Li().extractOpts,BN=Vu(),U0=function(e,r){for(var t=r.length-1;t>0;t--){var n=Math.min(r[t],r[t-1]),a=Math.max(r[t],r[t-1]);if(a>n&&n-1}function U(ce,ye){return ce===null?ye:ce}function X(ce,ye,Le){h();var me=[ye],he=[Le];if(F>=1)me=[ye],he=[Le];else if(F>0){var be=P(ye,Le);me=be.xyzv,he=be.abc}for(var Se=0;Se-1?Le[Fe]:A(Je,Ye,Ge);we>-1?ze[Fe]=we:ze[Fe]=E(Je,Ye,Ge,U(ce,We))}D(ze[0],ze[1],ze[2])}}function j(ce,ye,Le){var me=function(he,be,Se){X(ce,[ye[he],ye[be],ye[Se]],[Le[he],Le[be],Le[Se]])};me(0,1,2),me(2,3,0)}function $(ce,ye,Le){var me=function(he,be,Se){X(ce,[ye[he],ye[be],ye[Se]],[Le[he],Le[be],Le[Se]])};me(0,1,2),me(3,0,1),me(2,3,0),me(1,2,3)}function Y(ce,ye,Le,me){var he=ce[3];heme&&(he=me);for(var be=(ce[3]-he)/(ce[3]-ye[3]+1e-9),Se=[],ze=0;ze<4;ze++)Se[ze]=(1-be)*ce[ze]+be*ye[ze];return Se}function q(ce,ye,Le){return ce>=ye&&ce<=Le}function Z(ce){var ye=.001*(T-x);return ce>=x-ye&&ce<=T+ye}function ne(ce){for(var ye=[],Le=0;Le<4;Le++){var me=ce[Le];ye.push([e._x[me],e._y[me],e._z[me],e._value[me]])}return ye}var Q=3;function oe(ce,ye,Le,me,he,be){be||(be=1),Le=[-1,-1,-1];var Se=!1,ze=[q(ye[0][3],me,he),q(ye[1][3],me,he),q(ye[2][3],me,he)];if(!ze[0]&&!ze[1]&&!ze[2])return!1;var Fe=function(Ye,Ge,We){return Z(Ge[0][3])&&Z(Ge[1][3])&&Z(Ge[2][3])?(X(Ye,Ge,We),!0):beze?[k,be]:[be,S];ke(ye,Fe[0],Fe[1])}}var Je=[[Math.min(x,S),Math.max(x,S)],[Math.min(k,T),Math.max(k,T)]];["x","y","z"].forEach(function(Ye){for(var Ge=[],We=0;We0&&(se.push(Re.id),Ye==="x"?K.push([Re.distRatio,0,0]):Ye==="y"?K.push([0,Re.distRatio,0]):K.push([0,0,Re.distRatio]))}else Ye==="x"?ar=Ue(1,_-1):Ye==="y"?ar=Ue(1,y-1):ar=Ue(1,w-1);se.length>0&&(Ye==="x"?Ge[we]=De(ce,se,Pe,Qe,K,Ge[we]):Ye==="y"?Ge[we]=Ce(ce,se,Pe,Qe,K,Ge[we]):Ge[we]=Oe(ce,se,Pe,Qe,K,Ge[we]),we++),ar.length>0&&(Ye==="x"?Ge[we]=de(ce,ar,Pe,Qe,Ge[we]):Ye==="y"?Ge[we]=Ee(ce,ar,Pe,Qe,Ge[we]):Ge[we]=Me(ce,ar,Pe,Qe,Ge[we]),we++)}var Be=e.caps[Ye];Be.show&&Be.fill&&(L(Be.fill),Ye==="x"?Ge[we]=de(ce,[0,_-1],Pe,Qe,Ge[we]):Ye==="y"?Ge[we]=Ee(ce,[0,y-1],Pe,Qe,Ge[we]):Ge[we]=Me(ce,[0,w-1],Pe,Qe,Ge[we]),we++)}}),l===0&&R(),e._meshX=d,e._meshY=b,e._meshZ=p,e._meshIntensity=c,e._Xs=f,e._Ys=v,e._Zs=g}return Te(),e}function rse(e,r){var t=e.glplot.gl,n=Jle({gl:t}),a=new UN(e,n,r.uid);return n._trace=a,a.update(r),e.glplot.add(n),a}VN.exports={findNearestOnAxis:U0,generateIsoMeshes:HN,createIsosurfaceTrace:rse}});var YN=pe((mpe,GN)=>{"use strict";GN.exports={attributes:gd(),supplyDefaults:t5().supplyDefaults,calc:i5(),colorbar:{min:"cmin",max:"cmax"},plot:xd().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:il(),categories:["gl3d","showLegend"],meta:{}}});var XN=pe((xpe,WN)=>{"use strict";WN.exports=YN()});var s5=pe((bpe,JN)=>{"use strict";var tse=ja(),Kt=gd(),nse=q0(),ZN=Sn(),l5=Mt().extendFlat,ase=zn().overrideAll,bd=JN.exports=ase(l5({x:Kt.x,y:Kt.y,z:Kt.z,value:Kt.value,isomin:Kt.isomin,isomax:Kt.isomax,surface:Kt.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Kt.slices,caps:Kt.caps,text:Kt.text,hovertext:Kt.hovertext,xhoverformat:Kt.xhoverformat,yhoverformat:Kt.yhoverformat,zhoverformat:Kt.zhoverformat,valuehoverformat:Kt.valuehoverformat,hovertemplate:Kt.hovertemplate},tse("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Kt.colorbar,opacity:Kt.opacity,opacityscale:nse.opacityscale,lightposition:Kt.lightposition,lighting:Kt.lighting,flatshading:Kt.flatshading,contour:Kt.contour,hoverinfo:l5({},ZN.hoverinfo),showlegend:l5({},ZN.showlegend,{dflt:!1})}),"calc","nested");bd.x.editType=bd.y.editType=bd.z.editType=bd.value.editType="calc+clearAxisTypes"});var QN=pe((_pe,KN)=>{"use strict";var ise=ir(),ose=s5(),lse=t5().supplyIsoDefaults,sse=K3().opacityscaleDefaults;KN.exports=function(r,t,n,a){function o(i,l){return ise.coerce(r,t,ose,i,l)}lse(r,t,n,a,o),sse(r,t,a,o)}});var rz=pe((wpe,ez)=>{"use strict";var use=pn().gl_mesh3d,fse=al().parseColorScale,cse=ir().isArrayOrTypedArray,vse=po(),hse=Li().extractOpts,$N=Vu(),u5=xd().findNearestOnAxis,dse=xd().generateIsoMeshes;function jN(e,r,t){this.scene=e,this.uid=t,this.mesh=r,this.name="",this.data=null,this.showContour=!1}var f5=jN.prototype;f5.handlePick=function(e){if(e.object===this.mesh){var r=e.data.index,t=this.data._meshX[r],n=this.data._meshY[r],a=this.data._meshZ[r],o=this.data._Ys.length,i=this.data._Zs.length,l=u5(t,this.data._Xs).id,u=u5(n,this.data._Ys).id,s=u5(a,this.data._Zs).id,f=e.index=s+i*u+i*o*l;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var v=this.data.hovertext||this.data.text;return cse(v)&&v[f]!==void 0?e.textLabel=v[f]:v&&(e.textLabel=v),!0}};f5.update=function(e){var r=this.scene,t=r.fullSceneLayout;this.data=dse(e);function n(u,s,f,v){return s.map(function(g){return u.d2l(g,0,v)*f})}var a=$N(n(t.xaxis,e._meshX,r.dataScale[0],e.xcalendar),n(t.yaxis,e._meshY,r.dataScale[1],e.ycalendar),n(t.zaxis,e._meshZ,r.dataScale[2],e.zcalendar)),o=$N(e._meshI,e._meshJ,e._meshK),i={positions:a,cells:o,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:vse(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},l=hse(e);i.vertexIntensity=e._meshIntensity,i.vertexIntensityBounds=[l.min,l.max],i.colormap=fse(e),this.mesh.update(i)};f5.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function pse(e,r){var t=e.glplot.gl,n=use({gl:t}),a=new jN(e,n,r.uid);return n._trace=a,a.update(r),e.glplot.add(n),a}ez.exports=pse});var nz=pe((Mpe,tz)=>{"use strict";tz.exports={attributes:s5(),supplyDefaults:QN(),calc:i5(),colorbar:{min:"cmin",max:"cmax"},plot:rz(),moduleType:"trace",name:"volume",basePlotModule:il(),categories:["gl3d","showLegend"],meta:{}}});var iz=pe((Tpe,az)=>{"use strict";az.exports=nz()});var sz=pe((Ape,lz)=>{"use strict";var gse=Er(),oz=ir(),yse=Ei(),mse=Uu();lz.exports=function(r,t,n,a){function o(f,v){return oz.coerce(r,t,mse,f,v)}function i(f){var v=f.map(function(g){var _=o(g);return _&&oz.isArrayOrTypedArray(_)?_:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var l=i(["x","y","z"]);if(!l){t.visible=!1;return}if(i(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var u=gse.getComponentMethod("calendars","handleTraceDefaults");u(r,t,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(f){o(f)});var s=o("contour.show");s&&(o("contour.color"),o("contour.width")),"intensity"in r?(o("intensity"),o("intensitymode"),yse(r,t,a,o,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in r?o("facecolor"):"vertexcolor"in r?o("vertexcolor"):o("color",n)),o("text"),o("hovertext"),o("hovertemplate"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),t._length=null}});var fz=pe((kpe,uz)=>{"use strict";var xse=zo();uz.exports=function(r,t){t.intensity&&xse(r,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}});var pz=pe((Spe,dz)=>{"use strict";var bse=pn().gl_mesh3d,_se=pn().delaunay_triangulate,wse=pn().alpha_shape,Mse=pn().convex_hull,Tse=al().parseColorScale,Ase=ir().isArrayOrTypedArray,d5=po(),kse=Li().extractOpts,cz=Vu();function hz(e,r,t){this.scene=e,this.uid=t,this.mesh=r,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p5=hz.prototype;p5.handlePick=function(e){if(e.object===this.mesh){var r=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[r],this.data.y[r],this.data.z[r]];var t=this.data.hovertext||this.data.text;return Ase(t)&&t[r]!==void 0?e.textLabel=t[r]:t&&(e.textLabel=t),!0}};function vz(e){for(var r=[],t=e.length,n=0;n=r-.5)return!1;return!0}p5.update=function(e){var r=this.scene,t=r.fullSceneLayout;this.data=e;var n=e.x.length,a=cz(c5(t.xaxis,e.x,r.dataScale[0],e.xcalendar),c5(t.yaxis,e.y,r.dataScale[1],e.ycalendar),c5(t.zaxis,e.z,r.dataScale[2],e.zcalendar)),o;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!h5(e.i,n)||!h5(e.j,n)||!h5(e.k,n))return;o=cz(v5(e.i),v5(e.j),v5(e.k))}else e.alphahull===0?o=Mse(a):e.alphahull>0?o=wse(e.alphahull,a):o=Sse(e.delaunayaxis,a);var i={positions:a,cells:o,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:d5(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var l=kse(e);this.color="#fff";var u=e.intensitymode;i[u+"Intensity"]=e.intensity,i[u+"IntensityBounds"]=[l.min,l.max],i.colormap=Tse(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],i.vertexColors=vz(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],i.cellColors=vz(e.facecolor)):(this.color=e.color,i.meshColor=d5(e.color));this.mesh.update(i)};p5.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Cse(e,r){var t=e.glplot.gl,n=bse({gl:t}),a=new hz(e,n,r.uid);return n._trace=a,a.update(r),e.glplot.add(n),a}dz.exports=Cse});var yz=pe((Cpe,gz)=>{"use strict";gz.exports={attributes:Uu(),supplyDefaults:sz(),calc:fz(),colorbar:{min:"cmin",max:"cmax"},plot:pz(),moduleType:"trace",name:"mesh3d",basePlotModule:il(),categories:["gl3d","showLegend"],meta:{}}});var xz=pe((Epe,mz)=>{"use strict";mz.exports=yz()});var y5=pe((Lpe,_z)=>{"use strict";var Ese=ja(),Gu=ro().axisHoverFormat,Lse=Sa().hovertemplateAttrs,Rse=Uu(),bz=Sn(),g5=Mt().extendFlat,_d={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:Lse({editType:"calc"},{keys:["norm"]}),uhoverformat:Gu("u",1),vhoverformat:Gu("v",1),whoverformat:Gu("w",1),xhoverformat:Gu("x"),yhoverformat:Gu("y"),zhoverformat:Gu("z"),showlegend:g5({},bz.showlegend,{dflt:!1})};g5(_d,Ese("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Dse=["opacity","lightposition","lighting"];Dse.forEach(function(e){_d[e]=Rse[e]});_d.hoverinfo=g5({},bz.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});_z.exports=_d});var Mz=pe((Rpe,wz)=>{"use strict";var Pse=ir(),Fse=Ei(),Ise=y5();wz.exports=function(r,t,n,a){function o(_,y){return Pse.coerce(r,t,Ise,_,y)}var i=o("u"),l=o("v"),u=o("w"),s=o("x"),f=o("y"),v=o("z");if(!i||!i.length||!l||!l.length||!u||!u.length||!s||!s.length||!f||!f.length||!v||!v.length){t.visible=!1;return}var g=o("sizemode");o("sizeref",g==="raw"?1:.5),o("anchor"),o("lighting.ambient"),o("lighting.diffuse"),o("lighting.specular"),o("lighting.roughness"),o("lighting.fresnel"),o("lightposition.x"),o("lightposition.y"),o("lightposition.z"),Fse(r,t,a,o,{prefix:"",cLetter:"c"}),o("text"),o("hovertext"),o("hovertemplate"),o("uhoverformat"),o("vhoverformat"),o("whoverformat"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),t._length=null}});var Az=pe((Dpe,Tz)=>{"use strict";var Nse=zo();Tz.exports=function(r,t){for(var n=t.u,a=t.v,o=t.w,i=Math.min(t.x.length,t.y.length,t.z.length,n.length,a.length,o.length),l=-1/0,u=1/0,s=0;s{"use strict";var zse=pn().gl_cone3d,qse=pn().gl_cone3d.createConeMesh,Ose=ir().simpleMap,Bse=al().parseColorScale,Use=Li().extractOpts,Hse=ir().isArrayOrTypedArray,kz=Vu();function Sz(e,r){this.scene=e,this.uid=r,this.mesh=null,this.data=null}var m5=Sz.prototype;m5.handlePick=function(e){if(e.object===this.mesh){var r=e.index=e.data.index,t=this.data.x[r],n=this.data.y[r],a=this.data.z[r],o=this.data.u[r],i=this.data.v[r],l=this.data.w[r];e.traceCoordinate=[t,n,a,o,i,l,Math.sqrt(o*o+i*i+l*l)];var u=this.data.hovertext||this.data.text;return Hse(u)&&u[r]!==void 0?e.textLabel=u[r]:u&&(e.textLabel=u),!0}};var Vse={xaxis:0,yaxis:1,zaxis:2},Gse={tip:1,tail:0,cm:.25,center:.5},Yse={tip:1,tail:1,cm:.75,center:.5};function Cz(e,r){var t=e.fullSceneLayout,n=e.dataScale,a={};function o(f,v){var g=t[v],_=n[Vse[v]];return Ose(f,function(y){return g.d2l(y)*_})}a.vectors=kz(o(r.u,"xaxis"),o(r.v,"yaxis"),o(r.w,"zaxis"),r._len),a.positions=kz(o(r.x,"xaxis"),o(r.y,"yaxis"),o(r.z,"zaxis"),r._len);var i=Use(r);a.colormap=Bse(r),a.vertexIntensityBounds=[i.min/r._normMax,i.max/r._normMax],a.coneOffset=Gse[r.anchor];var l=r.sizemode;l==="scaled"?a.coneSize=r.sizeref||.5:l==="absolute"?a.coneSize=r.sizeref&&r._normMax?r.sizeref/r._normMax:.5:l==="raw"&&(a.coneSize=r.sizeref),a.coneSizemode=l;var u=zse(a),s=r.lightposition;return u.lightPosition=[s.x,s.y,s.z],u.ambient=r.lighting.ambient,u.diffuse=r.lighting.diffuse,u.specular=r.lighting.specular,u.roughness=r.lighting.roughness,u.fresnel=r.lighting.fresnel,u.opacity=r.opacity,r._pad=Yse[r.anchor]*u.vectorScale*u.coneScale*r._normMax,u}m5.update=function(e){this.data=e;var r=Cz(this.scene,e);this.mesh.update(r)};m5.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Wse(e,r){var t=e.glplot.gl,n=Cz(e,r),a=qse(t,n),o=new Sz(e,r.uid);return o.mesh=a,o.data=r,a._trace=o,e.glplot.add(a),o}Ez.exports=Wse});var Dz=pe((Fpe,Rz)=>{"use strict";Rz.exports={moduleType:"trace",name:"cone",basePlotModule:il(),categories:["gl3d","showLegend"],attributes:y5(),supplyDefaults:Mz(),colorbar:{min:"cmin",max:"cmax"},calc:Az(),plot:Lz(),eventData:function(e,r){return e.norm=r.traceCoordinate[6],e},meta:{}}});var Fz=pe((Ipe,Pz)=>{"use strict";Pz.exports=Dz()});var b5=pe((Npe,Nz)=>{"use strict";var Xse=ja(),Yu=ro().axisHoverFormat,Zse=Sa().hovertemplateAttrs,Jse=Uu(),Iz=Sn(),x5=Mt().extendFlat,wd={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:Zse({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:Yu("u",1),vhoverformat:Yu("v",1),whoverformat:Yu("w",1),xhoverformat:Yu("x"),yhoverformat:Yu("y"),zhoverformat:Yu("z"),showlegend:x5({},Iz.showlegend,{dflt:!1})};x5(wd,Xse("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Kse=["opacity","lightposition","lighting"];Kse.forEach(function(e){wd[e]=Jse[e]});wd.hoverinfo=x5({},Iz.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});Nz.exports=wd});var qz=pe((zpe,zz)=>{"use strict";var Qse=ir(),$se=Ei(),jse=b5();zz.exports=function(r,t,n,a){function o(g,_){return Qse.coerce(r,t,jse,g,_)}var i=o("u"),l=o("v"),u=o("w"),s=o("x"),f=o("y"),v=o("z");if(!i||!i.length||!l||!l.length||!u||!u.length||!s||!s.length||!f||!f.length||!v||!v.length){t.visible=!1;return}o("starts.x"),o("starts.y"),o("starts.z"),o("maxdisplayed"),o("sizeref"),o("lighting.ambient"),o("lighting.diffuse"),o("lighting.specular"),o("lighting.roughness"),o("lighting.fresnel"),o("lightposition.x"),o("lightposition.y"),o("lightposition.z"),$se(r,t,a,o,{prefix:"",cLetter:"c"}),o("text"),o("hovertext"),o("hovertemplate"),o("uhoverformat"),o("vhoverformat"),o("whoverformat"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),t._length=null}});var Wz=pe((qpe,Yz)=>{"use strict";var Uz=pn().gl_streamtube3d,eue=Uz.createTubeMesh,rue=ir(),tue=al().parseColorScale,nue=Li().extractOpts,Oz=Vu(),Hz={xaxis:0,yaxis:1,zaxis:2};function Vz(e,r){this.scene=e,this.uid=r,this.mesh=null,this.data=null}var w5=Vz.prototype;w5.handlePick=function(e){var r=this.scene.fullSceneLayout,t=this.scene.dataScale;function n(i,l){var u=r[l],s=t[Hz[l]];return u.l2c(i)/s}if(e.object===this.mesh){var a=e.data.position,o=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(o[0],"xaxis"),n(o[1],"yaxis"),n(o[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function Bz(e){var r=e.length,t;return r>2?t=e.slice(1,r-1):r===2?t=[(e[0]+e[1])/2]:t=e,t}function _5(e){var r=e.length;return r===1?[.5,.5]:[e[1]-e[0],e[r-1]-e[r-2]]}function Gz(e,r){var t=e.fullSceneLayout,n=e.dataScale,a=r._len,o={};function i(R,E){var D=t[E],N=n[Hz[E]];return rue.simpleMap(R,function(I){return D.d2l(I)*N})}if(o.vectors=Oz(i(r._u,"xaxis"),i(r._v,"yaxis"),i(r._w,"zaxis"),a),!a)return{positions:[],cells:[]};var l=i(r._Xs,"xaxis"),u=i(r._Ys,"yaxis"),s=i(r._Zs,"zaxis");o.meshgrid=[l,u,s],o.gridFill=r._gridFill;var f=r._slen;if(f)o.startingPositions=Oz(i(r._startsX,"xaxis"),i(r._startsY,"yaxis"),i(r._startsZ,"zaxis"));else{for(var v=u[0],g=Bz(l),_=Bz(s),y=new Array(g.length*_.length),w=0,M=0;M{"use strict";Xz.exports={moduleType:"trace",name:"streamtube",basePlotModule:il(),categories:["gl3d","showLegend"],attributes:b5(),supplyDefaults:qz(),colorbar:{min:"cmin",max:"cmax"},calc:yd().calc,plot:Wz(),eventData:function(e,r){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=r.traceCoordinate[3],e.tubev=r.traceCoordinate[4],e.tubew=r.traceCoordinate[5],e.norm=r.traceCoordinate[6],e.divergence=r.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var Kz=pe((Bpe,Jz)=>{"use strict";Jz.exports=Zz()});var Dn=pe((Upe,$z)=>{"use strict";var Qz=Object.getOwnPropertySymbols,iue=Object.prototype.hasOwnProperty,oue=Object.prototype.propertyIsEnumerable;function lue(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function sue(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var n=Object.getOwnPropertyNames(r).map(function(o){return r[o]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(o){return!1}}$z.exports=sue()?Object.assign:function(e,r){for(var t,n=lue(e),a,o=1;o{var Td=Dn();function jz(){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={}}Td(jz.prototype,{instance:function(e,r){e=(e||"gregorian").toLowerCase(),r=r||"";var t=this._localCals[e+"-"+r];if(!t&&this.calendars[e]&&(t=new this.calendars[e](r),this._localCals[e+"-"+r]=t),!t)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return t},newDate:function(e,r,t,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,r,t)},substituteDigits:function(e){return function(r){return(r+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,r){return function(t){for(var n="",a=0;t>0;){var o=t%10;n=(o===0?"":e[o]+r[a])+n,a++,t=Math.floor(t/10)}return n.indexOf(e[1]+r[1])===0&&(n=n.substr(1)),n||e[0]}}});function M5(e,r,t,n){if(this._calendar=e,this._year=r,this._month=t,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function Md(e,r){return e=""+e,"000000".substring(0,r-e.length)+e}Td(M5.prototype,{newDate:function(e,r,t){return this._calendar.newDate(e==null?this:e,r,t)},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,r,t){if(!this._calendar.isValid(e,r,t))throw(Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=r,this._day=t,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,r){return this._calendar.add(this,e,r)},set:function(e,r){return this._calendar.set(this,e,r)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Wr.local.differentCalendars||Wr.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var r=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return r===0?0:r<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?"-":"")+Md(Math.abs(this.year()),4)+"-"+Md(this.month(),2)+"-"+Md(this.day(),2)}});function T5(){this.shortYearCutoff="+10"}Td(T5.prototype,{_validateLevel:0,newDate:function(e,r,t){return e==null?this.today():(e.year&&(this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),t=e.day(),r=e.month(),e=e.year()),new M5(this,e,r,t))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+Md(Math.abs(r.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear),12},monthOfYear:function(e,r){var t=this._validate(e,r,this.minDay,Wr.local.invalidMonth||Wr.regionalOptions[""].invalidMonth);return(t.month()+this.monthsInYear(t)-this.firstMonth)%this.monthsInYear(t)+this.minMonth},fromMonthOfYear:function(e,r){var t=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,t,this.minDay,Wr.local.invalidMonth||Wr.regionalOptions[""].invalidMonth),t},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Wr.local.invalidYear||Wr.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(e,r,t){var n=this._validate(e,r,t,Wr.local.invalidDate||Wr.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,r,t){var n=this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,r,t){return this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),{}},add:function(e,r,t){return this._validate(e,this.minMonth,this.minDay,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,r,t),r,t)},_add:function(e,r,t){if(this._validateLevel++,t==="d"||t==="w"){var n=e.toJD()+r*(t==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var o=e.year()+(t==="y"?r:0),i=e.monthOfYear()+(t==="m"?r:0),a=e.day(),l=function(f){for(;iv-1+f.minMonth;)o++,i-=v,v=f.monthsInYear(o)};t==="y"?(e.month()!==this.fromMonthOfYear(o,i)&&(i=this.newDate(o,e.month(),this.minDay).monthOfYear()),i=Math.min(i,this.monthsInYear(o)),a=Math.min(a,this.daysInMonth(o,this.fromMonthOfYear(o,i)))):t==="m"&&(l(this),a=Math.min(a,this.daysInMonth(o,this.fromMonthOfYear(o,i))));var u=[o,this.fromMonthOfYear(o,i),a];return this._validateLevel--,u}catch(s){throw this._validateLevel--,s}},_correctAdd:function(e,r,t,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(r[0]===0||e.year()>0!=r[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],o=t<0?-1:1;r=this._add(e,t*a[0]+o*a[1],a[2])}return e.date(r[0],r[1],r[2])},set:function(e,r,t){this._validate(e,this.minMonth,this.minDay,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate);var n=t==="y"?r:e.year(),a=t==="m"?r:e.month(),o=t==="d"?r:e.day();return(t==="y"||t==="m")&&(o=Math.min(o,this.daysInMonth(n,a))),e.date(n,a,o)},isValid:function(e,r,t){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,r,this.minDay);n=r>=this.minMonth&&r-this.minMonth=this.minDay&&t-this.minDay13.5?13:1),s=a-(u>2.5?4716:4715);return s<=0&&s--,this.newDate(s,u,l)},toJSDate:function(e,r,t){var n=this._validate(e,r,t,Wr.local.invalidDate||Wr.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Wr=eq.exports=new jz;Wr.cdate=M5;Wr.baseCalendar=T5;Wr.calendars.gregorian=A5});var rq=pe(()=>{var k5=Dn(),gn=Pn();k5(gn.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"});gn.local=gn.regionalOptions[""];k5(gn.cdate.prototype,{formatDate:function(e,r){return typeof e!="string"&&(r=e,e=""),this._calendar.formatDate(e||"",this,r)}});k5(gn.baseCalendar.prototype,{UNIX_EPOCH:gn.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:gn.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,r,t){if(typeof e!="string"&&(t=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw gn.local.invalidFormat||gn.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,t=t||{};for(var n=t.dayNamesShort||this.local.dayNamesShort,a=t.dayNames||this.local.dayNames,o=t.monthNumbers||this.local.monthNumbers,i=t.monthNamesShort||this.local.monthNamesShort,l=t.monthNames||this.local.monthNames,u=t.calculateWeek||this.local.calculateWeek,s=function(x,T){for(var d=1;S+d1},f=function(x,T,d,b){var p=""+T;if(s(x,b))for(;p.length1},k=function(R,E){var D=m(R,E),N=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],I=new RegExp("^-?\\d{1,"+N+"}"),F=r.substring(p).match(I);if(!F)throw(gn.local.missingNumberAt||gn.regionalOptions[""].missingNumberAt).replace(/\{0\}/,p);return p+=F[0].length,parseInt(F[0],10)},S=this,x=function(){if(typeof l=="function"){m("m");var R=l.call(S,r.substring(p));return p+=R.length,R}return k("m")},T=function(R,E,D,N){for(var I=m(R,N)?D:E,F=0;F-1){g=1,_=y;for(var h=this.daysInMonth(v,g);_>h;h=this.daysInMonth(v,g))g++,_-=h}return f>-1?this.fromJD(f):this.newDate(v,g,_)},determineDate:function(e,r,t,n,a){t&&typeof t!="object"&&(a=n,n=t,t=null),typeof n!="string"&&(a=n,n="");var o=this,i=function(l){try{return o.parseDate(n,l,a)}catch(v){}l=l.toLowerCase();for(var u=(l.match(/^c/)&&t?t.newDate():null)||o.today(),s=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=s.exec(l);f;)u.add(parseInt(f[1],10),f[2]||"d"),f=s.exec(l);return u};return r=r?r.newDate():null,e=e==null?r:typeof e=="string"?i(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?r:o.today().add(e,"d"):o.newDate(e),e}})});var tq=pe(()=>{var sl=Pn(),uue=Dn(),S5=sl.instance();function Ad(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ad.prototype=new sl.baseCalendar;uue(Ad.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,r){if(typeof e=="string"){var t=e.match(cue);return t?t[0]:""}var n=this._validateYear(e),a=e.month(),o=""+this.toChineseMonth(n,a);return r&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(n,a)&&(o+="i"),o},monthNames:function(e){if(typeof e=="string"){var r=e.match(vue);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),o=["\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"][a-1];return this.isIntercalaryMonth(t,n)&&(o="\u95F0"+o),o},monthNamesShort:function(e){if(typeof e=="string"){var r=e.match(hue);return r?r[0]:""}var t=this._validateYear(e),n=e.month(),a=this.toChineseMonth(t,n),o=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(t,n)&&(o="\u95F0"+o),o},parseMonth:function(e,r){e=this._validateYear(e);var t=parseInt(r),n;if(isNaN(t))r[0]==="\u95F0"&&(n=!0,r=r.substring(1)),r[r.length-1]==="\u6708"&&(r=r.substring(0,r.length-1)),t=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(r);else{var a=r[r.length-1];n=a==="i"||a==="I"}var o=this.toMonthIndex(e,t,n);return o},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,r){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw r.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,r,t){var n=this.intercalaryMonth(e),a=t&&r!==n;if(a||r<1||r>12)throw sl.local.invalidMonth.replace(/\{0\}/,this.local.name);var o;return n?!t&&r<=n?o=r-1:o=r:o=r-1,o},toChineseMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e),n=t?12:11;if(r<0||r>n)throw sl.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return t?r>13;return t},isIntercalaryMonth:function(e,r){e.year&&(e=e.year(),r=e.month());var t=this.intercalaryMonth(e);return!!t&&t===r},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,r,t){var n=this._validateYear(e,sl.local.invalidyear),a=fl[n-fl[0]],o=a>>9&4095,i=a>>5&15,l=a&31,u;u=S5.newDate(o,i,l),u.add(4-(u.dayOfWeek()||7),"d");var s=this.toJD(e,r,t)-u.toJD();return 1+Math.floor(s/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,r){e.year&&(r=e.month(),e=e.year()),e=this._validateYear(e);var t=ul[e-ul[0]],n=t>>13,a=n?12:11;if(r>a)throw sl.local.invalidMonth.replace(/\{0\}/,this.local.name);var o=t&1<<12-r?30:29;return o},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,o,t,sl.local.invalidDate);e=this._validateYear(n.year()),r=n.month(),t=n.day();var a=this.isIntercalaryMonth(e,r),o=this.toChineseMonth(e,r),i=pue(e,o,t,a);return S5.toJD(i.year,i.month,i.day)},fromJD:function(e){var r=S5.fromJD(e),t=due(r.year(),r.month(),r.day()),n=this.toMonthIndex(t.year,t.month,t.isIntercalary);return this.newDate(t.year,n,t.day)},fromString:function(e){var r=e.match(fue),t=this._validateYear(+r[1]),n=+r[2],a=!!r[3],o=this.toMonthIndex(t,n,a),i=+r[4];return this.newDate(t,o,i)},add:function(e,r,t){var n=e.year(),a=e.month(),o=this.isIntercalaryMonth(n,a),i=this.toChineseMonth(n,a),l=Object.getPrototypeOf(Ad.prototype).add.call(this,e,r,t);if(t==="y"){var u=l.year(),s=l.month(),f=this.isIntercalaryMonth(u,i),v=o&&f?this.toMonthIndex(u,i,!0):this.toMonthIndex(u,i,!1);v!==s&&l.month(v)}return l}});var fue=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,cue=/^\d?\d[iI]?/m,vue=/^闰?十?[一二三四五六七八九]?月/m,hue=/^闰?十?[一二三四五六七八九]?/m;sl.calendars.chinese=Ad;var ul=[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],fl=[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 due(e,r,t,n){var a,o;if(typeof e=="object")a=e,o=r||{};else{var i=typeof e=="number"&&e>=1888&&e<=2111;if(!i)throw new Error("Solar year outside range 1888-2111");var l=typeof r=="number"&&r>=1&&r<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var u=typeof t=="number"&&t>=1&&t<=31;if(!u)throw new Error("Solar day outside range 1 - 31");a={year:e,month:r,day:t},o=n||{}}var s=fl[a.year-fl[0]],f=a.year<<9|a.month<<5|a.day;o.year=f>=s?a.year:a.year-1,s=fl[o.year-fl[0]];var v=s>>9&4095,g=s>>5&15,_=s&31,y,w=new Date(v,g-1,_),M=new Date(a.year,a.month-1,a.day);y=Math.round((M-w)/(24*3600*1e3));var m=ul[o.year-ul[0]],k;for(k=0;k<13;k++){var S=m&1<<12-k?30:29;if(y>13;return!x||k=1888&&e<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var u=typeof r=="number"&&r>=1&&r<=12;if(!u)throw new Error("Lunar month outside range 1 - 12");var s=typeof t=="number"&&t>=1&&t<=30;if(!s)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,o=n):(f=!!n,o=a||{}),i={year:e,month:r,day:t,isIntercalary:f}}var v;v=i.day-1;var g=ul[i.year-ul[0]],_=g>>13,y;_&&(i.month>_||i.isIntercalary)?y=i.month:y=i.month-1;for(var w=0;w>9&4095,S=m>>5&15,x=m&31,T=new Date(k,S-1,x+v);return o.year=T.getFullYear(),o.month=1+T.getMonth(),o.day=T.getDate(),o}});var nq=pe(()=>{var vs=Pn(),gue=Dn();function C5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}C5.prototype=new vs.baseCalendar;gue(C5.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(t){var r=this._validate(t,this.minMonth,this.minDay,vs.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,vs.local.invalidYear||vs.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,vs.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,vs.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});vs.calendars.coptic=C5});var aq=pe(()=>{var mo=Pn(),yue=Dn();function E5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}E5.prototype=new mo.baseCalendar;yue(E5.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,mo.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,mo.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,mo.local.invalidYear),400},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,mo.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,mo.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,r,t){var n=this.dayOfWeek(e,r,t);return n>=2&&n<=6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,mo.local.invalidDate);return{century:mue[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,r,t){var n=this._validate(e,r,t,mo.local.invalidDate);return e=n.year()+(n.year()<0?1:0),r=n.month(),t=n.day(),t+(r>1?16:0)+(r>2?(r-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var r=Math.floor(e/400)+1;e-=(r-1)*400,e+=e>15?16:0;var t=Math.floor(e/32)+1,n=e-(t-1)*32+1;return this.newDate(r<=0?r-1:r,t,n)}});var mue={20:"Fruitbat",21:"Anchovy"};mo.calendars.discworld=E5});var iq=pe(()=>{var hs=Pn(),xue=Dn();function L5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}L5.prototype=new hs.baseCalendar;xue(L5.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(t){var r=this._validate(t,this.minMonth,this.minDay,hs.local.invalidYear),t=r.year()+(r.year()<0?1:0);return t%4===3||t%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,hs.local.invalidYear||hs.regionalOptions[""].invalidYear),13},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,hs.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===13&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,hs.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 r=Math.floor(e)+.5-this.jdEpoch,t=Math.floor((r-Math.floor((r+366)/1461))/365)+1;t<=0&&t--,r=Math.floor(e)+.5-this.newDate(t,1,1).toJD();var n=Math.floor(r/30)+1,a=r-(n-1)*30+1;return this.newDate(t,n,a)}});hs.calendars.ethiopian=L5});var oq=pe(()=>{var cl=Pn(),bue=Dn();function R5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}R5.prototype=new cl.baseCalendar;bue(R5.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 r=this._validate(e,this.minMonth,this.minDay,cl.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return e=e<0?e+1:e,kd(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cl.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,cl.local.invalidYear);return e=r.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,cl.local.invalidMonth),r===12&&this.leapYear(e)||r===8&&kd(this.daysInYear(e),10)===5?30:r===9&&kd(this.daysInYear(e),10)===3?29:this.daysPerMonth[r-1]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},extraInfo:function(e,r,t){var n=this._validate(e,r,t,cl.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,r,t){var n=this._validate(e,r,t,cl.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e<=0?e+1:e,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+t+1;if(r<7){for(var i=7;i<=this.monthsInYear(e);i++)o+=this.daysInMonth(e,i);for(var i=1;i=this.toJD(r===-1?1:r+1,7,1);)r++;for(var t=ethis.toJD(r,t,this.daysInMonth(r,t));)t++;var n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});function kd(e,r){return e-r*Math.floor(e/r)}cl.calendars.hebrew=R5});var lq=pe(()=>{var H0=Pn(),_ue=Dn();function D5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D5.prototype=new H0.baseCalendar;_ue(D5.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 r=this._validate(e,this.minMonth,this.minDay,H0.local.invalidYear);return(r.year()*11+14)%30<11},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);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,r){var t=this._validate(e,r,this.minDay,H0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,H0.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e=e<=0?e+1:e,t+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=Math.floor((30*(e-this.jdEpoch)+10646)/10631);r=r<=0?r-1:r;var t=Math.min(12,Math.ceil((e-29-this.toJD(r,1,1))/29.5)+1),n=e-this.toJD(r,t,1)+1;return this.newDate(r,t,n)}});H0.calendars.islamic=D5});var sq=pe(()=>{var V0=Pn(),wue=Dn();function P5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}P5.prototype=new V0.baseCalendar;wue(P5.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(t){var r=this._validate(t,this.minMonth,this.minDay,V0.local.invalidYear),t=r.year()<0?r.year()+1:r.year();return t%4===0},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,V0.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(e,r,t){var n=this._validate(e,r,t,V0.local.invalidDate);return e=n.year(),r=n.month(),t=n.day(),e<0&&e++,r<=2&&(e--,r+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(r+1))+t-1524.5},fromJD:function(e){var r=Math.floor(e+.5),t=r+1524,n=Math.floor((t-122.1)/365.25),a=Math.floor(365.25*n),o=Math.floor((t-a)/30.6001),i=o-Math.floor(o<14?1:13),l=n-Math.floor(i>2?4716:4715),u=t-a-Math.floor(30.6001*o);return l<=0&&l--,this.newDate(l,i,u)}});V0.calendars.julian=P5});var fq=pe(()=>{var Ya=Pn(),Mue=Dn();function I5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}I5.prototype=new Ya.baseCalendar;Mue(I5.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,Ya.local.invalidYear),!1},formatYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,Ya.local.invalidYear);e=r.year();var t=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return t+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var r=0,t=0;t19||t>0&&n<0)throw"Invalid Mayan year";r=r*20+n}return r},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ya.local.invalidYear),18},weekOfYear:function(e,r,t){return this._validate(e,r,t,Ya.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ya.local.invalidYear),360},daysInMonth:function(e,r){return this._validate(e,r,this.minDay,Ya.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,r,t){var n=this._validate(e,r,t,Ya.local.invalidDate);return n.day()},weekDay:function(e,r,t){return this._validate(e,r,t,Ya.local.invalidDate),!0},extraInfo:function(e,r,t){var n=this._validate(e,r,t,Ya.local.invalidDate),a=n.toJD(),o=this._toHaab(a),i=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[o[0]-1],haabMonth:o[0],haabDay:o[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(e){e-=this.jdEpoch;var r=F5(e+8+17*20,365);return[Math.floor(r/20)+1,F5(r,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[uq(e+20,20),uq(e+4,13)]},toJD:function(e,r,t){var n=this._validate(e,r,t,Ya.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var r=Math.floor(e/360);e=e%360,e+=e<0?360:0;var t=Math.floor(e/20),n=e%20;return this.newDate(r,t,n)}});function F5(e,r){return e-r*Math.floor(e/r)}function uq(e,r){return F5(e-1,r)+1}Ya.calendars.mayan=I5});var vq=pe(()=>{var ds=Pn(),Tue=Dn();function N5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}N5.prototype=new ds.baseCalendar;var cq=ds.instance("gregorian");Tue(N5.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 r=this._validate(e,this.minMonth,this.minDay,ds.local.invalidYear||ds.regionalOptions[""].invalidYear);return cq.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ds.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,ds.local.invalidMonth),a=n.year();a<0&&a++;for(var o=n.day(),i=1;i=this.toJD(r+1,1,1);)r++;for(var t=e-Math.floor(this.toJD(r,1,1)+.5)+1,n=1;t>this.daysInMonth(r,n);)t-=this.daysInMonth(r,n),n++;return this.newDate(r,n,t)}});ds.calendars.nanakshahi=N5});var hq=pe(()=>{var ps=Pn(),Aue=Dn();function z5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}z5.prototype=new ps.baseCalendar;Aue(z5.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,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var r=this._validate(e,this.minMonth,this.minDay,ps.local.invalidYear);if(e=r.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,r){return e.year&&(r=e.month(),e=e.year()),this._validate(e,r,this.minDay,ps.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[e][r]},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==6},toJD:function(e,r,t){var n=this._validate(e,r,t,ps.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=ps.instance(),o=0,i=r,l=e;this._createMissingCalendarData(e);var u=e-(i>9||i===9&&t>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(r!==9&&(o=t,i--);i!==9;)i<=0&&(i=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][i],i--;return r===9?(o+=t-this.NEPALI_CALENDAR_DATA[l][0],o<0&&(o+=a.daysInYear(u))):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(e){var r=ps.instance(),t=r.fromJD(e),n=t.year(),a=t.dayOfYear(),o=n+56;this._createMissingCalendarData(o);for(var i=9,l=this.NEPALI_CALENDAR_DATA[o][0],u=this.NEPALI_CALENDAR_DATA[o][i]-l+1;a>u;)i++,i>12&&(i=1,o++),u+=this.NEPALI_CALENDAR_DATA[o][i];var s=this.NEPALI_CALENDAR_DATA[o][i]-(u-a);return this.newDate(o,i,s)},_createMissingCalendarData:function(e){var r=this.daysPerMonth.slice(0);r.unshift(17);for(var t=e-1;t{var Wu=Pn(),kue=Dn();function Sd(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Sd.prototype=new Wu.baseCalendar;kue(Sd.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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 r=this._validate(e,this.minMonth,this.minDay,Wu.local.invalidYear);return((r.year()-(r.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,Wu.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,Wu.local.invalidDate);e=n.year(),r=n.month(),t=n.day();var a=e-(e>=0?474:473),o=474+q5(a,2820);return t+(r<=7?(r-1)*31:(r-1)*30+6)+Math.floor((o*682-110)/2816)+(o-1)*365+Math.floor(a/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var r=e-this.toJD(475,1,1),t=Math.floor(r/1029983),n=q5(r,1029983),a=2820;if(n!==1029982){var o=Math.floor(n/366),i=q5(n,366);a=Math.floor((2134*o+2816*i+2815)/1028522)+o+1}var l=a+2820*t+474;l=l<=0?l-1:l;var u=e-this.toJD(l,1,1)+1,s=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(l,s,1)+1;return this.newDate(l,s,f)}});function q5(e,r){return e-r*Math.floor(e/r)}Wu.calendars.persian=Sd;Wu.calendars.jalali=Sd});var pq=pe(()=>{var gs=Pn(),Sue=Dn(),Cd=gs.instance();function O5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}O5.prototype=new gs.baseCalendar;Sue(O5.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(t){var r=this._validate(t,this.minMonth,this.minDay,gs.local.invalidYear),t=this._t2gYear(r.year());return Cd.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,gs.local.invalidYear),a=this._t2gYear(n.year());return Cd.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,gs.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,gs.local.invalidDate),a=this._t2gYear(n.year());return Cd.toJD(a,n.month(),n.day())},fromJD:function(e){var r=Cd.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});gs.calendars.taiwan=O5});var gq=pe(()=>{var ys=Pn(),Cue=Dn(),Ed=ys.instance();function B5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}B5.prototype=new ys.baseCalendar;Cue(B5.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(t){var r=this._validate(t,this.minMonth,this.minDay,ys.local.invalidYear),t=this._t2gYear(r.year());return Ed.leapYear(t)},weekOfYear:function(a,r,t){var n=this._validate(a,this.minMonth,this.minDay,ys.local.invalidYear),a=this._t2gYear(n.year());return Ed.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,r){var t=this._validate(e,r,this.minDay,ys.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(e,r,t){return(this.dayOfWeek(e,r,t)||7)<6},toJD:function(a,r,t){var n=this._validate(a,r,t,ys.local.invalidDate),a=this._t2gYear(n.year());return Ed.toJD(a,n.month(),n.day())},fromJD:function(e){var r=Ed.fromJD(e),t=this._g2tYear(r.year());return this.newDate(t,r.month(),r.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)}});ys.calendars.thai=B5});var yq=pe(()=>{var ms=Pn(),Eue=Dn();function U5(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}U5.prototype=new ms.baseCalendar;Eue(U5.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 r=this._validate(e,this.minMonth,this.minDay,ms.local.invalidYear);return this.daysInYear(r.year())===355},weekOfYear:function(e,r,t){var n=this.newDate(e,r,t);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var r=0,t=1;t<=12;t++)r+=this.daysInMonth(e,t);return r},daysInMonth:function(e,r){for(var t=this._validate(e,r,this.minDay,ms.local.invalidMonth),n=t.toJD()-24e5+.5,a=0,o=0;on)return vl[a]-vl[a-1];a++}return 30},weekDay:function(e,r,t){return this.dayOfWeek(e,r,t)!==5},toJD:function(e,r,t){var n=this._validate(e,r,t,ms.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,o=n.day()+vl[a-1]-1;return o+24e5-.5},fromJD:function(e){for(var r=e-24e5+.5,t=0,n=0;nr);n++)t++;var a=t+15292,o=Math.floor((a-1)/12),i=o+1,l=a-12*o,u=r-vl[t-1]+1;return this.newDate(i,l,u)},isValid:function(e,r,t){var n=ms.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,r,t,n){var a=ms.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});ms.calendars.ummalqura=U5;var vl=[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 xq=pe((xge,mq)=>{"use strict";mq.exports=Pn();rq();tq();nq();aq();iq();oq();lq();sq();fq();vq();hq();dq();pq();gq();yq()});var kq=pe((bge,Aq)=>{"use strict";var _q=xq(),G0=ir(),wq=nn(),Lue=wq.EPOCHJD,Rue=wq.ONEDAY,G5={valType:"enumerated",values:G0.sortObjectKeys(_q.calendars),editType:"calc",dflt:"gregorian"},Mq=function(e,r,t,n){var a={};return a[t]=G5,G0.coerce(e,r,a,t,n)},Due=function(e,r,t,n){for(var a=0;a{"use strict";Sq.exports=kq()});var que=pe((wge,Lq)=>{var Eq=AF();Eq.register([aN(),EN(),XN(),iz(),xz(),Fz(),Kz(),Cq()]);Lq.exports=Eq});return que();})(); /*! * The buffer module from node.js, for the browser. * diff --git a/dist/plotly-mapbox.js b/dist/plotly-mapbox.js index 9f82c8bd738..377b370bdaf 100644 --- a/dist/plotly-mapbox.js +++ b/dist/plotly-mapbox.js @@ -13710,7 +13710,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13734,10 +13734,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54107,8 +54107,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54121,18 +54127,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-mapbox.min.js b/dist/plotly-mapbox.min.js index 79a4a181c31..a223d2f803f 100644 --- a/dist/plotly-mapbox.min.js +++ b/dist/plotly-mapbox.min.js @@ -12,18 +12,18 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var p7=Object.defineProperty;var QX=Object.getOwnPropertyDescriptor;var $X=Object.getOwnPropertyNames;var ej=Object.prototype.hasOwnProperty;var m7=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var tj=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $X(t))!ej.call(e,a)&&a!==r&&p7(e,a,{get:()=>t[a],enumerable:!(i=QX(t,a))||i.enumerable});return e};var rj=e=>tj(p7({},"__esModule",{value:!0}),e);var U1=de(y7=>{"use strict";y7.version="3.0.0-rc.0"});var _7=de((g7,V1)=>{(function(t,r,i){r[t]=r[t]||i(),typeof V1!="undefined"&&V1.exports?V1.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:g7,function(){"use strict";var t,r,i,a=Object.prototype.toString,s=typeof setImmediate!="undefined"?function(R){return setImmediate(R)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(R,N,z,O){return Object.defineProperty(R,N,{value:z,writable:!0,configurable:O!==!1})}}catch(I){t=function(N,z,O){return N[z]=O,N}}i=function(){var R,N,z;function O(H,V){this.fn=H,this.self=V,this.next=void 0}return{add:function(V,W){z=new O(V,W),N?N.next=z:R=z,N=z,z=void 0},drain:function(){var V=R;for(R=N=r=void 0;V;)V.fn.call(V.self),V=V.next}}}();function l(I,R){i.add(I,R),r||(r=s(i.drain))}function f(I){var R,N=typeof I;return I!=null&&(N=="object"||N=="function")&&(R=I.then),typeof R=="function"?R:!1}function h(){for(var I=0;I0&&l(h,N))}catch(z){b.call(new S(N),z)}}}function b(I){var R=this;R.triggered||(R.triggered=!0,R.def&&(R=R.def),R.msg=I,R.state=2,R.chain.length>0&&l(h,R))}function T(I,R,N,z){for(var O=0;O{(function(){var e={version:"3.8.2"},t=[].slice,r=function(y){return t.call(y)},i=self.document;function a(y){return y&&(y.ownerDocument||y.document||y).documentElement}function s(y){return y&&(y.ownerDocument&&y.ownerDocument.defaultView||y.document&&y||y.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(y){r=function(M){for(var D=M.length,B=new Array(D);D--;)B[D]=M[D];return B}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(y){var l=this.Element.prototype,f=l.setAttribute,h=l.setAttributeNS,v=this.CSSStyleDeclaration.prototype,m=v.setProperty;l.setAttribute=function(M,D){f.call(this,M,D+"")},l.setAttributeNS=function(M,D,B){h.call(this,M,D,B+"")},v.setProperty=function(M,D,B){m.call(this,M,D+"",B)}}e.ascending=b;function b(y,M){return yM?1:y>=M?0:NaN}e.descending=function(y,M){return My?1:M>=y?0:NaN},e.min=function(y,M){var D=-1,B=y.length,U,Z;if(arguments.length===1){for(;++D=Z){U=Z;break}for(;++DZ&&(U=Z)}else{for(;++D=Z){U=Z;break}for(;++DZ&&(U=Z)}return U},e.max=function(y,M){var D=-1,B=y.length,U,Z;if(arguments.length===1){for(;++D=Z){U=Z;break}for(;++DU&&(U=Z)}else{for(;++D=Z){U=Z;break}for(;++DU&&(U=Z)}return U},e.extent=function(y,M){var D=-1,B=y.length,U,Z,$;if(arguments.length===1){for(;++D=Z){U=$=Z;break}for(;++DZ&&(U=Z),$=Z){U=$=Z;break}for(;++DZ&&(U=Z),$1)return $/(ae-1)},e.deviation=function(){var y=e.variance.apply(this,arguments);return y&&Math.sqrt(y)};function C(y){return{left:function(M,D,B,U){for(arguments.length<3&&(B=0),arguments.length<4&&(U=M.length);B>>1;y(M[Z],D)<0?B=Z+1:U=Z}return B},right:function(M,D,B,U){for(arguments.length<3&&(B=0),arguments.length<4&&(U=M.length);B>>1;y(M[Z],D)>0?U=Z:B=Z+1}return B}}}var P=C(b);e.bisectLeft=P.left,e.bisect=e.bisectRight=P.right,e.bisector=function(y){return C(y.length===1?function(M,D){return b(y(M),D)}:y)},e.shuffle=function(y,M,D){(B=arguments.length)<3&&(D=y.length,B<2&&(M=0));for(var B=D-M,U,Z;B;)Z=Math.random()*B--|0,U=y[B+M],y[B+M]=y[Z+M],y[Z+M]=U;return y},e.permute=function(y,M){for(var D=M.length,B=new Array(D);D--;)B[D]=y[M[D]];return B},e.pairs=function(y){for(var M=0,D=y.length-1,B,U=y[0],Z=new Array(D<0?0:D);M=0;)for($=y[M],D=$.length;--D>=0;)Z[--U]=$[D];return Z};var I=Math.abs;e.range=function(y,M,D){if(arguments.length<3&&(D=1,arguments.length<2&&(M=y,y=0)),(M-y)/D===1/0)throw new Error("infinite range");var B=[],U=R(I(D)),Z=-1,$;if(y*=U,M*=U,D*=U,D<0)for(;($=y+D*++Z)>M;)B.push($/U);else for(;($=y+D*++Z)=M.length)return U?U.call(y,ae):B?ae.sort(B):ae;for(var _e=-1,De=ae.length,Pe=M[me++],Je,ot,ze,Ue=new z,je;++_e=M.length)return X;var me=[],_e=D[ae++];return X.forEach(function(De,Pe){me.push({key:De,values:$(Pe,ae)})}),_e?me.sort(function(De,Pe){return _e(De.key,Pe.key)}):me}return y.map=function(X,ae){return Z(ae,X,0)},y.entries=function(X){return $(Z(e.map,X,0),0)},y.key=function(X){return M.push(X),y},y.sortKeys=function(X){return D[M.length-1]=X,y},y.sortValues=function(X){return B=X,y},y.rollup=function(X){return U=X,y},y},e.set=function(y){var M=new ve;if(y)for(var D=0,B=y.length;D=0&&(B=y.slice(D+1),y=y.slice(0,D)),y)return arguments.length<2?this[y].on(B):this[y].on(B,M);if(arguments.length===2){if(M==null)for(y in this)this.hasOwnProperty(y)&&this[y].on(B,null);return this}};function Le(y){var M=[],D=new z;function B(){for(var U=M,Z=-1,$=U.length,X;++Z<$;)(X=U[Z].on)&&X.apply(this,arguments);return y}return B.on=function(U,Z){var $=D.get(U),X;return arguments.length<2?$&&$.on:($&&($.on=null,M=M.slice(0,X=M.indexOf($)).concat(M.slice(X+1)),D.remove(U)),Z&&M.push(D.set(U,{on:Z})),y)},B}e.event=null;function Ke(){e.event.preventDefault()}function ht(){for(var y=e.event,M;M=y.sourceEvent;)y=M;return y}function it(y){for(var M=new Se,D=0,B=arguments.length;++D=0&&(D=y.slice(0,M))!=="xmlns"&&(y=y.slice(M+1)),et.hasOwnProperty(D)?{space:et[D],local:y}:y}},pt.attr=function(y,M){if(arguments.length<2){if(typeof y=="string"){var D=this.node();return y=e.ns.qualify(y),y.local?D.getAttributeNS(y.space,y.local):D.getAttribute(y)}for(M in y)this.each(vt(M,y[M]));return this}return this.each(vt(y,M))};function vt(y,M){y=e.ns.qualify(y);function D(){this.removeAttribute(y)}function B(){this.removeAttributeNS(y.space,y.local)}function U(){this.setAttribute(y,M)}function Z(){this.setAttributeNS(y.space,y.local,M)}function $(){var ae=M.apply(this,arguments);ae==null?this.removeAttribute(y):this.setAttribute(y,ae)}function X(){var ae=M.apply(this,arguments);ae==null?this.removeAttributeNS(y.space,y.local):this.setAttributeNS(y.space,y.local,ae)}return M==null?y.local?B:D:typeof M=="function"?y.local?X:$:y.local?Z:U}function tt(y){return y.trim().replace(/\s+/g," ")}pt.classed=function(y,M){if(arguments.length<2){if(typeof y=="string"){var D=this.node(),B=(y=Mt(y)).length,U=-1;if(M=D.classList){for(;++U=0;)(Z=D[B])&&(U&&U!==Z.nextSibling&&U.parentNode.insertBefore(Z,U),U=Z);return this},pt.sort=function(y){y=ft.apply(this,arguments);for(var M=-1,D=this.length;++M=M&&(M=U+1);!(ae=$[M])&&++M0&&(y=y.slice(0,U));var $=Vt.get(y);$&&(y=$,Z=Ht);function X(){var _e=this[B];_e&&(this.removeEventListener(y,_e,_e.$),delete this[B])}function ae(){var _e=Z(M,r(arguments));X.call(this),this.addEventListener(y,this[B]=_e,_e.$=D),_e._=M}function me(){var _e=new RegExp("^__on([^.]+)"+e.requote(y)+"$"),De;for(var Pe in this)if(De=Pe.match(_e)){var Je=this[Pe];this.removeEventListener(De[1],Je,Je.$),delete this[Pe]}}return U?M?ae:X:M?Ae:me}var Vt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});i&&Vt.forEach(function(y){"on"+y in i&&Vt.remove(y)});function Kt(y,M){return function(D){var B=e.event;e.event=D,M[0]=this.__data__;try{y.apply(this,M)}finally{e.event=B}}}function Ht(y,M){var D=Kt(y,M);return function(B){var U=this,Z=B.relatedTarget;(!Z||Z!==U&&!(Z.compareDocumentPosition(U)&8))&&D.call(U,B)}}var Ot,er=0;function Mr(y){var M=".dragsuppress-"+ ++er,D="click"+M,B=e.select(s(y)).on("touchmove"+M,Ke).on("dragstart"+M,Ke).on("selectstart"+M,Ke);if(Ot==null&&(Ot="onselectstart"in y?!1:Te(y.style,"userSelect")),Ot){var U=a(y).style,Z=U[Ot];U[Ot]="none"}return function($){if(B.on(M,null),Ot&&(U[Ot]=Z),$){var X=function(){B.on(D,null)};B.on(D,function(){Ke(),X()},!0),setTimeout(X,0)}}}e.mouse=function(y){return Pt(y,ht())};var xr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Pt(y,M){M.changedTouches&&(M=M.changedTouches[0]);var D=y.ownerSVGElement||y;if(D.createSVGPoint){var B=D.createSVGPoint();if(xr<0){var U=s(y);if(U.scrollX||U.scrollY){D=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Z=D[0][0].getScreenCTM();xr=!(Z.f||Z.e),D.remove()}}return xr?(B.x=M.pageX,B.y=M.pageY):(B.x=M.clientX,B.y=M.clientY),B=B.matrixTransform(y.getScreenCTM().inverse()),[B.x,B.y]}var $=y.getBoundingClientRect();return[M.clientX-$.left-y.clientLeft,M.clientY-$.top-y.clientTop]}e.touch=function(y,M,D){if(arguments.length<3&&(D=M,M=ht().changedTouches),M){for(var B=0,U=M.length,Z;B0?1:y<0?-1:0}function Ea(y,M,D){return(M[0]-y[0])*(D[1]-y[1])-(M[1]-y[1])*(D[0]-y[0])}function Ri(y){return y>1?0:y<-1?dt:Math.acos(y)}function Ki(y){return y>1?Tr:y<-1?-Tr:Math.asin(y)}function yn(y){return((y=Math.exp(y))-1/y)/2}function Xi(y){return((y=Math.exp(y))+1/y)/2}function jn(y){return((y=Math.exp(2*y))-1)/(y+1)}function En(y){return(y=Math.sin(y/2))*y}var Vi=Math.SQRT2,pa=2,Gr=4;e.interpolateZoom=function(y,M){var D=y[0],B=y[1],U=y[2],Z=M[0],$=M[1],X=M[2],ae=Z-D,me=$-B,_e=ae*ae+me*me,De,Pe;if(_e0&&(jt=jt.transition().duration($)),jt.call(nt.event)}function Dr(){Ue&&Ue.domain(ze.range().map(function(jt){return(jt-y.x)/y.k}).map(ze.invert)),ut&&ut.domain(je.range().map(function(jt){return(jt-y.y)/y.k}).map(je.invert))}function Ir(jt){X++||jt({type:"zoomstart"})}function ea(jt){Dr(),jt({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function Ur(jt){--X||(jt({type:"zoomend"}),D=null)}function Kr(){var jt=this,Jr=ot.of(jt,arguments),oa=0,sa=e.select(s(jt)).on(me,$i).on(_e,xi),Ei=We(e.mouse(jt)),Oi=Mr(jt);ah.call(jt),Ir(Jr);function $i(){oa=1,fr(e.mouse(jt),Ei),ea(Jr)}function xi(){sa.on(me,null).on(_e,null),Oi(oa),Ur(Jr)}}function Ba(){var jt=this,Jr=ot.of(jt,arguments),oa={},sa=0,Ei,Oi=".zoom-"+e.event.changedTouches[0].identifier,$i="touchmove"+Oi,xi="touchend"+Oi,xn=[],br=e.select(jt),Vr=Mr(jt);Ti(),Ir(Jr),br.on(ae,null).on(Pe,Ti);function qi(){var cn=e.touches(jt);return Ei=y.k,cn.forEach(function(pi){pi.identifier in oa&&(oa[pi.identifier]=We(pi))}),cn}function Ti(){var cn=e.event.target;e.select(cn).on($i,lo).on(xi,zn),xn.push(cn);for(var pi=e.event.changedTouches,jo=0,uo=pi.length;jo1){var Aa=ci[0],ui=ci[1],Nl=Aa[0]-ui[0],Hv=Aa[1]-ui[1];sa=Nl*Nl+Hv*Hv}}function lo(){var cn=e.touches(jt),pi,jo,uo,ci;ah.call(jt);for(var gf=0,Aa=cn.length;gf1?1:M,D=D<0?0:D>1?1:D,U=D<=.5?D*(1+M):D+M-D*M,B=2*D-U;function Z(X){return X>360?X-=360:X<0&&(X+=360),X<60?B+(U-B)*X/60:X<180?U:X<240?B+(U-B)*(240-X)/60:B}function $(X){return Math.round(Z(X)*255)}return new ua($(y+120),$(y),$(y-120))}e.hcl=ce;function ce(y,M,D){return this instanceof ce?(this.h=+y,this.c=+M,void(this.l=+D)):arguments.length<2?y instanceof ce?new ce(y.h,y.c,y.l):y instanceof rt?wr(y.l,y.a,y.b):wr((y=nr((y=e.rgb(y)).r,y.g,y.b)).l,y.a,y.b):new ce(y,M,D)}var Ee=ce.prototype=new ya;Ee.brighter=function(y){return new ce(this.h,this.c,Math.min(100,this.l+Ve*(arguments.length?y:1)))},Ee.darker=function(y){return new ce(this.h,this.c,Math.max(0,this.l-Ve*(arguments.length?y:1)))},Ee.rgb=function(){return Ne(this.h,this.c,this.l).rgb()};function Ne(y,M,D){return isNaN(y)&&(y=0),isNaN(M)&&(M=0),new rt(D,Math.cos(y*=Hr)*M,Math.sin(y)*M)}e.lab=rt;function rt(y,M,D){return this instanceof rt?(this.l=+y,this.a=+M,void(this.b=+D)):arguments.length<2?y instanceof rt?new rt(y.l,y.a,y.b):y instanceof ce?Ne(y.h,y.c,y.l):nr((y=ua(y)).r,y.g,y.b):new rt(y,M,D)}var Ve=18,yt=.95047,Dt=1,Ft=1.08883,tr=rt.prototype=new ya;tr.brighter=function(y){return new rt(Math.min(100,this.l+Ve*(arguments.length?y:1)),this.a,this.b)},tr.darker=function(y){return new rt(Math.max(0,this.l-Ve*(arguments.length?y:1)),this.a,this.b)},tr.rgb=function(){return Yt(this.l,this.a,this.b)};function Yt(y,M,D){var B=(y+16)/116,U=B+M/500,Z=B-D/200;return U=Yr(U)*yt,B=Yr(B)*Dt,Z=Yr(Z)*Ft,new ua(ca(3.2404542*U-1.5371385*B-.4985314*Z),ca(-.969266*U+1.8760108*B+.041556*Z),ca(.0556434*U-.2040259*B+1.0572252*Z))}function wr(y,M,D){return y>0?new ce(Math.atan2(D,M)*_a,Math.sqrt(M*M+D*D),y):new ce(NaN,NaN,y)}function Yr(y){return y>.206893034?y*y*y:(y-4/29)/7.787037}function Br(y){return y>.008856?Math.pow(y,1/3):7.787037*y+4/29}function ca(y){return Math.round(255*(y<=.00304?12.92*y:1.055*Math.pow(y,1/2.4)-.055))}e.rgb=ua;function ua(y,M,D){return this instanceof ua?(this.r=~~y,this.g=~~M,void(this.b=~~D)):arguments.length<2?y instanceof ua?new ua(y.r,y.g,y.b):$r(""+y,ua,se):new ua(y,M,D)}function Na(y){return new ua(y>>16,y>>8&255,y&255)}function ii(y){return Na(y)+""}var Wr=ua.prototype=new ya;Wr.brighter=function(y){y=Math.pow(.7,arguments.length?y:1);var M=this.r,D=this.g,B=this.b,U=30;return!M&&!D&&!B?new ua(U,U,U):(M&&M>4,B=B>>4|B,U=ae&240,U=U>>4|U,Z=ae&15,Z=Z<<4|Z):y.length===7&&(B=(ae&16711680)>>16,U=(ae&65280)>>8,Z=ae&255)),M(B,U,Z))}function ga(y,M,D){var B=Math.min(y/=255,M/=255,D/=255),U=Math.max(y,M,D),Z=U-B,$,X,ae=(U+B)/2;return Z?(X=ae<.5?Z/(U+B):Z/(2-U-B),y==U?$=(M-D)/Z+(M0&&ae<1?0:$),new le($,X,ae)}function nr(y,M,D){y=wi(y),M=wi(M),D=wi(D);var B=Br((.4124564*y+.3575761*M+.1804375*D)/yt),U=Br((.2126729*y+.7151522*M+.072175*D)/Dt),Z=Br((.0193339*y+.119192*M+.9503041*D)/Ft);return rt(116*U-16,500*(B-U),200*(U-Z))}function wi(y){return(y/=255)<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function La(y){var M=parseFloat(y);return y.charAt(y.length-1)==="%"?Math.round(M*2.55):M}var si=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});si.forEach(function(y,M){si.set(y,Na(M))});function fa(y){return typeof y=="function"?y:function(){return y}}e.functor=fa,e.xhr=Ln(ke);function Ln(y){return function(M,D,B){return arguments.length===2&&typeof D=="function"&&(B=D,D=null),Co(M,D,y,B)}}function Co(y,M,D,B){var U={},Z=e.dispatch("beforesend","progress","load","error"),$={},X=new XMLHttpRequest,ae=null;self.XDomainRequest&&!("withCredentials"in X)&&/^(http(s)?:)?\/\//.test(y)&&(X=new XDomainRequest),"onload"in X?X.onload=X.onerror=me:X.onreadystatechange=function(){X.readyState>3&&me()};function me(){var _e=X.status,De;if(!_e&&Ga(X)||_e>=200&&_e<300||_e===304){try{De=D.call(U,X)}catch(Pe){Z.error.call(U,Pe);return}Z.load.call(U,De)}else Z.error.call(U,X)}return X.onprogress=function(_e){var De=e.event;e.event=_e;try{Z.progress.call(U,X)}finally{e.event=De}},U.header=function(_e,De){return _e=(_e+"").toLowerCase(),arguments.length<2?$[_e]:(De==null?delete $[_e]:$[_e]=De+"",U)},U.mimeType=function(_e){return arguments.length?(M=_e==null?null:_e+"",U):M},U.responseType=function(_e){return arguments.length?(ae=_e,U):ae},U.response=function(_e){return D=_e,U},["get","post"].forEach(function(_e){U[_e]=function(){return U.send.apply(U,[_e].concat(r(arguments)))}}),U.send=function(_e,De,Pe){if(arguments.length===2&&typeof De=="function"&&(Pe=De,De=null),X.open(_e,y,!0),M!=null&&!("accept"in $)&&($.accept=M+",*/*"),X.setRequestHeader)for(var Je in $)X.setRequestHeader(Je,$[Je]);return M!=null&&X.overrideMimeType&&X.overrideMimeType(M),ae!=null&&(X.responseType=ae),Pe!=null&&U.on("error",Pe).on("load",function(ot){Pe(null,ot)}),Z.beforesend.call(U,X),X.send(De==null?null:De),U},U.abort=function(){return X.abort(),U},e.rebind(U,Z,"on"),B==null?U:U.get(xs(B))}function xs(y){return y.length===1?function(M,D){y(M==null?D:null)}:y}function Ga(y){var M=y.responseType;return M&&M!=="text"?y.response:y.responseText}e.dsv=function(y,M){var D=new RegExp('["'+y+` +"use strict";var Plotly=(()=>{var p7=Object.defineProperty;var QX=Object.getOwnPropertyDescriptor;var $X=Object.getOwnPropertyNames;var ej=Object.prototype.hasOwnProperty;var m7=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var tj=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $X(t))!ej.call(e,a)&&a!==r&&p7(e,a,{get:()=>t[a],enumerable:!(i=QX(t,a))||i.enumerable});return e};var rj=e=>tj(p7({},"__esModule",{value:!0}),e);var U1=de(y7=>{"use strict";y7.version="3.0.0-rc.0"});var _7=de((g7,V1)=>{(function(t,r,i){r[t]=r[t]||i(),typeof V1!="undefined"&&V1.exports?V1.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:g7,function(){"use strict";var t,r,i,a=Object.prototype.toString,s=typeof setImmediate!="undefined"?function(F){return setImmediate(F)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(F,N,z,O){return Object.defineProperty(F,N,{value:z,writable:!0,configurable:O!==!1})}}catch(I){t=function(N,z,O){return N[z]=O,N}}i=function(){var F,N,z;function O(H,V){this.fn=H,this.self=V,this.next=void 0}return{add:function(V,W){z=new O(V,W),N?N.next=z:F=z,N=z,z=void 0},drain:function(){var V=F;for(F=N=r=void 0;V;)V.fn.call(V.self),V=V.next}}}();function l(I,F){i.add(I,F),r||(r=s(i.drain))}function f(I){var F,N=typeof I;return I!=null&&(N=="object"||N=="function")&&(F=I.then),typeof F=="function"?F:!1}function h(){for(var I=0;I0&&l(h,N))}catch(z){b.call(new S(N),z)}}}function b(I){var F=this;F.triggered||(F.triggered=!0,F.def&&(F=F.def),F.msg=I,F.state=2,F.chain.length>0&&l(h,F))}function T(I,F,N,z){for(var O=0;O{(function(){var e={version:"3.8.2"},t=[].slice,r=function(y){return t.call(y)},i=self.document;function a(y){return y&&(y.ownerDocument||y.document||y).documentElement}function s(y){return y&&(y.ownerDocument&&y.ownerDocument.defaultView||y.document&&y||y.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(y){r=function(M){for(var D=M.length,B=new Array(D);D--;)B[D]=M[D];return B}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(y){var l=this.Element.prototype,f=l.setAttribute,h=l.setAttributeNS,v=this.CSSStyleDeclaration.prototype,m=v.setProperty;l.setAttribute=function(M,D){f.call(this,M,D+"")},l.setAttributeNS=function(M,D,B){h.call(this,M,D,B+"")},v.setProperty=function(M,D,B){m.call(this,M,D+"",B)}}e.ascending=b;function b(y,M){return yM?1:y>=M?0:NaN}e.descending=function(y,M){return My?1:M>=y?0:NaN},e.min=function(y,M){var D=-1,B=y.length,U,Z;if(arguments.length===1){for(;++D=Z){U=Z;break}for(;++DZ&&(U=Z)}else{for(;++D=Z){U=Z;break}for(;++DZ&&(U=Z)}return U},e.max=function(y,M){var D=-1,B=y.length,U,Z;if(arguments.length===1){for(;++D=Z){U=Z;break}for(;++DU&&(U=Z)}else{for(;++D=Z){U=Z;break}for(;++DU&&(U=Z)}return U},e.extent=function(y,M){var D=-1,B=y.length,U,Z,$;if(arguments.length===1){for(;++D=Z){U=$=Z;break}for(;++DZ&&(U=Z),$=Z){U=$=Z;break}for(;++DZ&&(U=Z),$1)return $/(ae-1)},e.deviation=function(){var y=e.variance.apply(this,arguments);return y&&Math.sqrt(y)};function C(y){return{left:function(M,D,B,U){for(arguments.length<3&&(B=0),arguments.length<4&&(U=M.length);B>>1;y(M[Z],D)<0?B=Z+1:U=Z}return B},right:function(M,D,B,U){for(arguments.length<3&&(B=0),arguments.length<4&&(U=M.length);B>>1;y(M[Z],D)>0?U=Z:B=Z+1}return B}}}var P=C(b);e.bisectLeft=P.left,e.bisect=e.bisectRight=P.right,e.bisector=function(y){return C(y.length===1?function(M,D){return b(y(M),D)}:y)},e.shuffle=function(y,M,D){(B=arguments.length)<3&&(D=y.length,B<2&&(M=0));for(var B=D-M,U,Z;B;)Z=Math.random()*B--|0,U=y[B+M],y[B+M]=y[Z+M],y[Z+M]=U;return y},e.permute=function(y,M){for(var D=M.length,B=new Array(D);D--;)B[D]=y[M[D]];return B},e.pairs=function(y){for(var M=0,D=y.length-1,B,U=y[0],Z=new Array(D<0?0:D);M=0;)for($=y[M],D=$.length;--D>=0;)Z[--U]=$[D];return Z};var I=Math.abs;e.range=function(y,M,D){if(arguments.length<3&&(D=1,arguments.length<2&&(M=y,y=0)),(M-y)/D===1/0)throw new Error("infinite range");var B=[],U=F(I(D)),Z=-1,$;if(y*=U,M*=U,D*=U,D<0)for(;($=y+D*++Z)>M;)B.push($/U);else for(;($=y+D*++Z)=M.length)return U?U.call(y,ae):B?ae.sort(B):ae;for(var _e=-1,De=ae.length,Pe=M[me++],Je,ot,ze,Ue=new z,je;++_e=M.length)return X;var me=[],_e=D[ae++];return X.forEach(function(De,Pe){me.push({key:De,values:$(Pe,ae)})}),_e?me.sort(function(De,Pe){return _e(De.key,Pe.key)}):me}return y.map=function(X,ae){return Z(ae,X,0)},y.entries=function(X){return $(Z(e.map,X,0),0)},y.key=function(X){return M.push(X),y},y.sortKeys=function(X){return D[M.length-1]=X,y},y.sortValues=function(X){return B=X,y},y.rollup=function(X){return U=X,y},y},e.set=function(y){var M=new ve;if(y)for(var D=0,B=y.length;D=0&&(B=y.slice(D+1),y=y.slice(0,D)),y)return arguments.length<2?this[y].on(B):this[y].on(B,M);if(arguments.length===2){if(M==null)for(y in this)this.hasOwnProperty(y)&&this[y].on(B,null);return this}};function Le(y){var M=[],D=new z;function B(){for(var U=M,Z=-1,$=U.length,X;++Z<$;)(X=U[Z].on)&&X.apply(this,arguments);return y}return B.on=function(U,Z){var $=D.get(U),X;return arguments.length<2?$&&$.on:($&&($.on=null,M=M.slice(0,X=M.indexOf($)).concat(M.slice(X+1)),D.remove(U)),Z&&M.push(D.set(U,{on:Z})),y)},B}e.event=null;function Ke(){e.event.preventDefault()}function ht(){for(var y=e.event,M;M=y.sourceEvent;)y=M;return y}function it(y){for(var M=new Me,D=0,B=arguments.length;++D=0&&(D=y.slice(0,M))!=="xmlns"&&(y=y.slice(M+1)),et.hasOwnProperty(D)?{space:et[D],local:y}:y}},pt.attr=function(y,M){if(arguments.length<2){if(typeof y=="string"){var D=this.node();return y=e.ns.qualify(y),y.local?D.getAttributeNS(y.space,y.local):D.getAttribute(y)}for(M in y)this.each(vt(M,y[M]));return this}return this.each(vt(y,M))};function vt(y,M){y=e.ns.qualify(y);function D(){this.removeAttribute(y)}function B(){this.removeAttributeNS(y.space,y.local)}function U(){this.setAttribute(y,M)}function Z(){this.setAttributeNS(y.space,y.local,M)}function $(){var ae=M.apply(this,arguments);ae==null?this.removeAttribute(y):this.setAttribute(y,ae)}function X(){var ae=M.apply(this,arguments);ae==null?this.removeAttributeNS(y.space,y.local):this.setAttributeNS(y.space,y.local,ae)}return M==null?y.local?B:D:typeof M=="function"?y.local?X:$:y.local?Z:U}function tt(y){return y.trim().replace(/\s+/g," ")}pt.classed=function(y,M){if(arguments.length<2){if(typeof y=="string"){var D=this.node(),B=(y=Mt(y)).length,U=-1;if(M=D.classList){for(;++U=0;)(Z=D[B])&&(U&&U!==Z.nextSibling&&U.parentNode.insertBefore(Z,U),U=Z);return this},pt.sort=function(y){y=ft.apply(this,arguments);for(var M=-1,D=this.length;++M=M&&(M=U+1);!(ae=$[M])&&++M0&&(y=y.slice(0,U));var $=Vt.get(y);$&&(y=$,Z=Ht);function X(){var _e=this[B];_e&&(this.removeEventListener(y,_e,_e.$),delete this[B])}function ae(){var _e=Z(M,r(arguments));X.call(this),this.addEventListener(y,this[B]=_e,_e.$=D),_e._=M}function me(){var _e=new RegExp("^__on([^.]+)"+e.requote(y)+"$"),De;for(var Pe in this)if(De=Pe.match(_e)){var Je=this[Pe];this.removeEventListener(De[1],Je,Je.$),delete this[Pe]}}return U?M?ae:X:M?Ae:me}var Vt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});i&&Vt.forEach(function(y){"on"+y in i&&Vt.remove(y)});function Kt(y,M){return function(D){var B=e.event;e.event=D,M[0]=this.__data__;try{y.apply(this,M)}finally{e.event=B}}}function Ht(y,M){var D=Kt(y,M);return function(B){var U=this,Z=B.relatedTarget;(!Z||Z!==U&&!(Z.compareDocumentPosition(U)&8))&&D.call(U,B)}}var Ot,er=0;function Mr(y){var M=".dragsuppress-"+ ++er,D="click"+M,B=e.select(s(y)).on("touchmove"+M,Ke).on("dragstart"+M,Ke).on("selectstart"+M,Ke);if(Ot==null&&(Ot="onselectstart"in y?!1:Te(y.style,"userSelect")),Ot){var U=a(y).style,Z=U[Ot];U[Ot]="none"}return function($){if(B.on(M,null),Ot&&(U[Ot]=Z),$){var X=function(){B.on(D,null)};B.on(D,function(){Ke(),X()},!0),setTimeout(X,0)}}}e.mouse=function(y){return Pt(y,ht())};var xr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Pt(y,M){M.changedTouches&&(M=M.changedTouches[0]);var D=y.ownerSVGElement||y;if(D.createSVGPoint){var B=D.createSVGPoint();if(xr<0){var U=s(y);if(U.scrollX||U.scrollY){D=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Z=D[0][0].getScreenCTM();xr=!(Z.f||Z.e),D.remove()}}return xr?(B.x=M.pageX,B.y=M.pageY):(B.x=M.clientX,B.y=M.clientY),B=B.matrixTransform(y.getScreenCTM().inverse()),[B.x,B.y]}var $=y.getBoundingClientRect();return[M.clientX-$.left-y.clientLeft,M.clientY-$.top-y.clientTop]}e.touch=function(y,M,D){if(arguments.length<3&&(D=M,M=ht().changedTouches),M){for(var B=0,U=M.length,Z;B0?1:y<0?-1:0}function Ea(y,M,D){return(M[0]-y[0])*(D[1]-y[1])-(M[1]-y[1])*(D[0]-y[0])}function Ri(y){return y>1?0:y<-1?dt:Math.acos(y)}function Ki(y){return y>1?Tr:y<-1?-Tr:Math.asin(y)}function yn(y){return((y=Math.exp(y))-1/y)/2}function Xi(y){return((y=Math.exp(y))+1/y)/2}function jn(y){return((y=Math.exp(2*y))-1)/(y+1)}function En(y){return(y=Math.sin(y/2))*y}var Vi=Math.SQRT2,pa=2,Gr=4;e.interpolateZoom=function(y,M){var D=y[0],B=y[1],U=y[2],Z=M[0],$=M[1],X=M[2],ae=Z-D,me=$-B,_e=ae*ae+me*me,De,Pe;if(_e0&&(jt=jt.transition().duration($)),jt.call(nt.event)}function Dr(){Ue&&Ue.domain(ze.range().map(function(jt){return(jt-y.x)/y.k}).map(ze.invert)),ut&&ut.domain(je.range().map(function(jt){return(jt-y.y)/y.k}).map(je.invert))}function Ir(jt){X++||jt({type:"zoomstart"})}function ea(jt){Dr(),jt({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function Ur(jt){--X||(jt({type:"zoomend"}),D=null)}function Kr(){var jt=this,Jr=ot.of(jt,arguments),oa=0,sa=e.select(s(jt)).on(me,$i).on(_e,xi),Ei=We(e.mouse(jt)),Oi=Mr(jt);ah.call(jt),Ir(Jr);function $i(){oa=1,fr(e.mouse(jt),Ei),ea(Jr)}function xi(){sa.on(me,null).on(_e,null),Oi(oa),Ur(Jr)}}function Ba(){var jt=this,Jr=ot.of(jt,arguments),oa={},sa=0,Ei,Oi=".zoom-"+e.event.changedTouches[0].identifier,$i="touchmove"+Oi,xi="touchend"+Oi,xn=[],br=e.select(jt),Vr=Mr(jt);Ti(),Ir(Jr),br.on(ae,null).on(Pe,Ti);function qi(){var cn=e.touches(jt);return Ei=y.k,cn.forEach(function(pi){pi.identifier in oa&&(oa[pi.identifier]=We(pi))}),cn}function Ti(){var cn=e.event.target;e.select(cn).on($i,lo).on(xi,zn),xn.push(cn);for(var pi=e.event.changedTouches,jo=0,uo=pi.length;jo1){var Aa=ci[0],ui=ci[1],Nl=Aa[0]-ui[0],Hv=Aa[1]-ui[1];sa=Nl*Nl+Hv*Hv}}function lo(){var cn=e.touches(jt),pi,jo,uo,ci;ah.call(jt);for(var gf=0,Aa=cn.length;gf1?1:M,D=D<0?0:D>1?1:D,U=D<=.5?D*(1+M):D+M-D*M,B=2*D-U;function Z(X){return X>360?X-=360:X<0&&(X+=360),X<60?B+(U-B)*X/60:X<180?U:X<240?B+(U-B)*(240-X)/60:B}function $(X){return Math.round(Z(X)*255)}return new ua($(y+120),$(y),$(y-120))}e.hcl=ce;function ce(y,M,D){return this instanceof ce?(this.h=+y,this.c=+M,void(this.l=+D)):arguments.length<2?y instanceof ce?new ce(y.h,y.c,y.l):y instanceof rt?wr(y.l,y.a,y.b):wr((y=nr((y=e.rgb(y)).r,y.g,y.b)).l,y.a,y.b):new ce(y,M,D)}var Ee=ce.prototype=new ya;Ee.brighter=function(y){return new ce(this.h,this.c,Math.min(100,this.l+Ve*(arguments.length?y:1)))},Ee.darker=function(y){return new ce(this.h,this.c,Math.max(0,this.l-Ve*(arguments.length?y:1)))},Ee.rgb=function(){return Ne(this.h,this.c,this.l).rgb()};function Ne(y,M,D){return isNaN(y)&&(y=0),isNaN(M)&&(M=0),new rt(D,Math.cos(y*=Hr)*M,Math.sin(y)*M)}e.lab=rt;function rt(y,M,D){return this instanceof rt?(this.l=+y,this.a=+M,void(this.b=+D)):arguments.length<2?y instanceof rt?new rt(y.l,y.a,y.b):y instanceof ce?Ne(y.h,y.c,y.l):nr((y=ua(y)).r,y.g,y.b):new rt(y,M,D)}var Ve=18,yt=.95047,Dt=1,Ft=1.08883,tr=rt.prototype=new ya;tr.brighter=function(y){return new rt(Math.min(100,this.l+Ve*(arguments.length?y:1)),this.a,this.b)},tr.darker=function(y){return new rt(Math.max(0,this.l-Ve*(arguments.length?y:1)),this.a,this.b)},tr.rgb=function(){return Yt(this.l,this.a,this.b)};function Yt(y,M,D){var B=(y+16)/116,U=B+M/500,Z=B-D/200;return U=Yr(U)*yt,B=Yr(B)*Dt,Z=Yr(Z)*Ft,new ua(ca(3.2404542*U-1.5371385*B-.4985314*Z),ca(-.969266*U+1.8760108*B+.041556*Z),ca(.0556434*U-.2040259*B+1.0572252*Z))}function wr(y,M,D){return y>0?new ce(Math.atan2(D,M)*_a,Math.sqrt(M*M+D*D),y):new ce(NaN,NaN,y)}function Yr(y){return y>.206893034?y*y*y:(y-4/29)/7.787037}function Br(y){return y>.008856?Math.pow(y,1/3):7.787037*y+4/29}function ca(y){return Math.round(255*(y<=.00304?12.92*y:1.055*Math.pow(y,1/2.4)-.055))}e.rgb=ua;function ua(y,M,D){return this instanceof ua?(this.r=~~y,this.g=~~M,void(this.b=~~D)):arguments.length<2?y instanceof ua?new ua(y.r,y.g,y.b):$r(""+y,ua,se):new ua(y,M,D)}function Na(y){return new ua(y>>16,y>>8&255,y&255)}function ii(y){return Na(y)+""}var Wr=ua.prototype=new ya;Wr.brighter=function(y){y=Math.pow(.7,arguments.length?y:1);var M=this.r,D=this.g,B=this.b,U=30;return!M&&!D&&!B?new ua(U,U,U):(M&&M>4,B=B>>4|B,U=ae&240,U=U>>4|U,Z=ae&15,Z=Z<<4|Z):y.length===7&&(B=(ae&16711680)>>16,U=(ae&65280)>>8,Z=ae&255)),M(B,U,Z))}function ga(y,M,D){var B=Math.min(y/=255,M/=255,D/=255),U=Math.max(y,M,D),Z=U-B,$,X,ae=(U+B)/2;return Z?(X=ae<.5?Z/(U+B):Z/(2-U-B),y==U?$=(M-D)/Z+(M0&&ae<1?0:$),new le($,X,ae)}function nr(y,M,D){y=wi(y),M=wi(M),D=wi(D);var B=Br((.4124564*y+.3575761*M+.1804375*D)/yt),U=Br((.2126729*y+.7151522*M+.072175*D)/Dt),Z=Br((.0193339*y+.119192*M+.9503041*D)/Ft);return rt(116*U-16,500*(B-U),200*(U-Z))}function wi(y){return(y/=255)<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function La(y){var M=parseFloat(y);return y.charAt(y.length-1)==="%"?Math.round(M*2.55):M}var si=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});si.forEach(function(y,M){si.set(y,Na(M))});function fa(y){return typeof y=="function"?y:function(){return y}}e.functor=fa,e.xhr=Ln(Ce);function Ln(y){return function(M,D,B){return arguments.length===2&&typeof D=="function"&&(B=D,D=null),Co(M,D,y,B)}}function Co(y,M,D,B){var U={},Z=e.dispatch("beforesend","progress","load","error"),$={},X=new XMLHttpRequest,ae=null;self.XDomainRequest&&!("withCredentials"in X)&&/^(http(s)?:)?\/\//.test(y)&&(X=new XDomainRequest),"onload"in X?X.onload=X.onerror=me:X.onreadystatechange=function(){X.readyState>3&&me()};function me(){var _e=X.status,De;if(!_e&&Ga(X)||_e>=200&&_e<300||_e===304){try{De=D.call(U,X)}catch(Pe){Z.error.call(U,Pe);return}Z.load.call(U,De)}else Z.error.call(U,X)}return X.onprogress=function(_e){var De=e.event;e.event=_e;try{Z.progress.call(U,X)}finally{e.event=De}},U.header=function(_e,De){return _e=(_e+"").toLowerCase(),arguments.length<2?$[_e]:(De==null?delete $[_e]:$[_e]=De+"",U)},U.mimeType=function(_e){return arguments.length?(M=_e==null?null:_e+"",U):M},U.responseType=function(_e){return arguments.length?(ae=_e,U):ae},U.response=function(_e){return D=_e,U},["get","post"].forEach(function(_e){U[_e]=function(){return U.send.apply(U,[_e].concat(r(arguments)))}}),U.send=function(_e,De,Pe){if(arguments.length===2&&typeof De=="function"&&(Pe=De,De=null),X.open(_e,y,!0),M!=null&&!("accept"in $)&&($.accept=M+",*/*"),X.setRequestHeader)for(var Je in $)X.setRequestHeader(Je,$[Je]);return M!=null&&X.overrideMimeType&&X.overrideMimeType(M),ae!=null&&(X.responseType=ae),Pe!=null&&U.on("error",Pe).on("load",function(ot){Pe(null,ot)}),Z.beforesend.call(U,X),X.send(De==null?null:De),U},U.abort=function(){return X.abort(),U},e.rebind(U,Z,"on"),B==null?U:U.get(xs(B))}function xs(y){return y.length===1?function(M,D){y(M==null?D:null)}:y}function Ga(y){var M=y.responseType;return M&&M!=="text"?y.response:y.responseText}e.dsv=function(y,M){var D=new RegExp('["'+y+` ]`),B=y.charCodeAt(0);function U(me,_e,De){arguments.length<3&&(De=_e,_e=null);var Pe=Co(me,M,_e==null?Z:$(_e),De);return Pe.row=function(Je){return arguments.length?Pe.response((_e=Je)==null?Z:$(Je)):_e},Pe}function Z(me){return U.parse(me.responseText)}function $(me){return function(_e){return U.parse(_e.responseText,me)}}U.parse=function(me,_e){var De;return U.parseRows(me,function(Pe,Je){if(De)return De(Pe,Je-1);var ot=function(ze){for(var Ue={},je=Pe.length,ut=0;ut=ot)return Pe;if(ut)return ut=!1,De;var Gt=ze;if(me.charCodeAt(Gt)===34){for(var or=Gt;or++24?(isFinite(M)&&(clearTimeout(dl),dl=setTimeout(Nc,M)),Bi=0):(Bi=1,Qd(Nc))}e.timer.flush=function(){hv(),vv()};function hv(){for(var y=Date.now(),M=Jn;M;)y>=M.t&&M.c(y-M.t)&&(M.c=null),M=M.n;return y}function vv(){for(var y,M=Jn,D=1/0;M;)M.c?(M.t=0;--X)ze.push(U[me[De[X]][2]]);for(X=+Je;X1&&Ea(y[D[B-2]],y[D[B-1]],y[U])<=0;)--B;D[B++]=U}return D.slice(0,B)}function Ku(y,M){return y[0]-M[0]||y[1]-M[1]}e.geom.polygon=function(y){return He(y,Zf),y};var Zf=e.geom.polygon.prototype=[];Zf.area=function(){for(var y=-1,M=this.length,D,B=this[M-1],U=0;++yGe)X=X.L;else if($=M-an(X,D),$>Ge){if(!X.R){B=X;break}X=X.R}else{Z>-Ge?(B=X.P,U=X):$>-Ge?(B=X,U=X.N):B=U=X;break}var ae=oo(y);if(du.insert(B,ae),!(!B&&!U)){if(B===U){wa(B),U=oo(B.site),du.insert(ae,U),ae.edge=U.edge=Xs(B.site,ae.site),Cr(B),Cr(U);return}if(!U){ae.edge=Xs(B.site,ae.site);return}wa(B),wa(U);var me=B.site,_e=me.x,De=me.y,Pe=y.x-_e,Je=y.y-De,ot=U.site,ze=ot.x-_e,Ue=ot.y-De,je=2*(Pe*Ue-Je*ze),ut=Pe*Pe+Je*Je,nt=ze*ze+Ue*Ue,We={x:(Ue*ut-Je*nt)/je+_e,y:(Pe*nt-ze*ut)/je+De};us(U.edge,me,ot,We),ae.edge=Xs(me,y,null,We),U.edge=Xs(y,ot,null,We),Cr(B),Cr(U)}}function pu(y,M){var D=y.site,B=D.x,U=D.y,Z=U-M;if(!Z)return B;var $=y.P;if(!$)return-1/0;D=$.site;var X=D.x,ae=D.y,me=ae-M;if(!me)return X;var _e=X-B,De=1/Z-1/me,Pe=_e/me;return De?(-Pe+Math.sqrt(Pe*Pe-2*De*(_e*_e/(-2*me)-ae+me/2+U-Z/2)))/De+B:(B+X)/2}function an(y,M){var D=y.N;if(D)return pu(D,M);var B=y.site;return B.y===M?B.x:1/0}function yl(y){this.site=y,this.edges=[]}yl.prototype.prepare=function(){for(var y=this.edges,M=y.length,D;M--;)D=y[M].edge,(!D.b||!D.a)&&y.splice(M,1);return y.sort($u),y.length};function bs(y){for(var M=y[0][0],D=y[1][0],B=y[0][1],U=y[1][1],Z,$,X,ae,me=Go,_e=me.length,De,Pe,Je,ot,ze,Ue;_e--;)if(De=me[_e],!(!De||!De.prepare()))for(Je=De.edges,ot=Je.length,Pe=0;PeGe||I(ae-$)>Ge)&&(Je.splice(Pe,0,new _l(mu(De.site,Ue,I(X-M)Ge?{x:M,y:I(Z-M)Ge?{x:I($-U)Ge?{x:D,y:I(Z-D)Ge?{x:I($-B)=-bt)){var Pe=ae*ae+me*me,Je=_e*_e+Ue*Ue,ot=(Ue*Pe-me*Je)/De,ze=(ae*Je-_e*Pe)/De,Ue=ze+X,je=pv.pop()||new ef;je.arc=y,je.site=U,je.x=ot+$,je.y=Ue+Math.sqrt(ot*ot+ze*ze),je.cy=Ue,y.circle=je;for(var ut=null,nt=Qu._;nt;)if(je.y0)){if(ze/=Je,Je<0){if(ze0){if(ze>Pe)return;ze>De&&(De=ze)}if(ze=D-X,!(!Je&&ze<0)){if(ze/=Je,Je<0){if(ze>Pe)return;ze>De&&(De=ze)}else if(Je>0){if(ze0)){if(ze/=ot,ot<0){if(ze0){if(ze>Pe)return;ze>De&&(De=ze)}if(ze=B-ae,!(!ot&&ze<0)){if(ze/=ot,ot<0){if(ze>Pe)return;ze>De&&(De=ze)}else if(ot>0){if(ze0&&(U.a={x:X+De*Je,y:ae+De*ot}),Pe<1&&(U.b={x:X+Pe*Je,y:ae+Pe*ot}),U}}}}}}function ws(y){for(var M=ml,D=Ta(y[0][0],y[0][1],y[1][0],y[1][1]),B=M.length,U;B--;)U=M[B],(!gl(U,y)||!D(U)||I(U.a.x-U.b.x)=Z)return;if(_e>Pe){if(!B)B={x:ot,y:$};else if(B.y>=X)return;D={x:ot,y:X}}else{if(!B)B={x:ot,y:X};else if(B.y<$)return;D={x:ot,y:$}}}else if(Ue=(_e-Pe)/(Je-De),je=ze-Ue*ot,Ue<-1||Ue>1)if(_e>Pe){if(!B)B={x:($-je)/Ue,y:$};else if(B.y>=X)return;D={x:(X-je)/Ue,y:X}}else{if(!B)B={x:(X-je)/Ue,y:X};else if(B.y<$)return;D={x:($-je)/Ue,y:$}}else if(De=Z)return;D={x:Z,y:Ue*Z+je}}else{if(!B)B={x:Z,y:Ue*Z+je};else if(B.x=_e&&je.x<=Pe&&je.y>=De&&je.y<=Je?[[_e,Je],[Pe,Je],[Pe,De],[_e,De]]:[];ut.point=ae[ze]}),me}function X(ae){return ae.map(function(me,_e){return{x:Math.round(B(me,_e)/Ge)*Ge,y:Math.round(U(me,_e)/Ge)*Ge,i:_e}})}return $.links=function(ae){return yu(X(ae)).edges.filter(function(me){return me.l&&me.r}).map(function(me){return{source:ae[me.l.i],target:ae[me.r.i]}})},$.triangles=function(ae){var me=[];return yu(X(ae)).cells.forEach(function(_e,De){for(var Pe=_e.site,Je=_e.edges.sort($u),ot=-1,ze=Je.length,Ue,je,ut=Je[ze-1].edge,nt=ut.l===Pe?ut.r:ut.l;++otnt&&(nt=_e.x),_e.y>We&&(We=_e.y),Je.push(_e.x),ot.push(_e.y);else for(ze=0;zent&&(nt=Gt),or>We&&(We=or),Je.push(Gt),ot.push(or)}var fr=nt-je,lr=We-ut;fr>lr?We=ut+fr:nt=je+lr;function Dr(Ur,Kr,Ba,ri,$a,jt,Jr,oa){if(!(isNaN(Ba)||isNaN(ri)))if(Ur.leaf){var sa=Ur.x,Ei=Ur.y;if(sa!=null)if(I(sa-Ba)+I(Ei-ri)<.01)Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa);else{var Oi=Ur.point;Ur.x=Ur.y=Ur.point=null,Ir(Ur,Oi,sa,Ei,$a,jt,Jr,oa),Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa)}else Ur.x=Ba,Ur.y=ri,Ur.point=Kr}else Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa)}function Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa){var sa=($a+Jr)*.5,Ei=(jt+oa)*.5,Oi=Ba>=sa,$i=ri>=Ei,xi=$i<<1|Oi;Ur.leaf=!1,Ur=Ur.nodes[xi]||(Ur.nodes[xi]=gn()),Oi?$a=sa:Jr=sa,$i?jt=Ei:oa=Ei,Dr(Ur,Kr,Ba,ri,$a,jt,Jr,oa)}var ea=gn();if(ea.add=function(Ur){Dr(ea,Ur,+De(Ur,++ze),+Pe(Ur,ze),je,ut,nt,We)},ea.visit=function(Ur){Pn(Ur,ea,je,ut,nt,We)},ea.find=function(Ur){return rp(ea,Ur[0],Ur[1],je,ut,nt,We)},ze=-1,M==null){for(;++zeZ||Pe>$||Je=Gt,lr=D>=or,Dr=lr<<1|fr,Ir=Dr+4;DrD&&(Z=M.slice(D,Z),X[$]?X[$]+=Z:X[++$]=Z),(B=B[0])===(U=U[0])?X[$]?X[$]+=U:X[++$]=U:(X[++$]=null,ae.push({i:$,x:Eo(B,U)})),D=Xf.lastIndex;return D=0&&!(B=e.interpolators[D](y,M)););return B}e.interpolators=[function(y,M){var D=typeof M;return(D==="string"?si.has(M.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(M)?tf:Zo:M instanceof ya?tf:Array.isArray(M)?Yo:D==="object"&&isNaN(M)?nn:Eo)(y,M)}],e.interpolateArray=Yo;function Yo(y,M){var D=[],B=[],U=y.length,Z=M.length,$=Math.min(y.length,M.length),X;for(X=0;X<$;++X)D.push(on(y[X],M[X]));for(;X=0?y.slice(0,M):y,B=M>=0?y.slice(M+1):"in";return D=Sm.get(D)||js,B=Wo.get(B)||ke,km(B(D.apply(null,t.call(arguments,1))))};function km(y){return function(M){return M<=0?0:M>=1?1:y(M)}}function Js(y){return function(M){return 1-y(1-M)}}function Dn(y){return function(M){return .5*(M<.5?y(2*M):2-y(2-2*M))}}function Cm(y){return y*y}function xl(y){return y*y*y}function bl(y){if(y<=0)return 0;if(y>=1)return 1;var M=y*y,D=M*y;return 4*(y<.5?D:3*(y-M)+D-.75)}function gv(y){return function(M){return Math.pow(M,y)}}function Em(y){return 1-Math.cos(y*Tr)}function Lm(y){return Math.pow(2,10*(y-1))}function Oc(y){return 1-Math.sqrt(1-y*y)}function Pm(y,M){var D;return arguments.length<2&&(M=.45),arguments.length?D=M/gr*Math.asin(1/y):(y=1,D=M/4),function(B){return 1+y*Math.pow(2,-10*B)*Math.sin((B-D)*gr/M)}}function Dm(y){return y||(y=1.70158),function(M){return M*M*((y+1)*M-y)}}function zm(y){return y<1/2.75?7.5625*y*y:y<2/2.75?7.5625*(y-=1.5/2.75)*y+.75:y<2.5/2.75?7.5625*(y-=2.25/2.75)*y+.9375:7.5625*(y-=2.625/2.75)*y+.984375}e.interpolateHcl=_v;function _v(y,M){y=e.hcl(y),M=e.hcl(M);var D=y.h,B=y.c,U=y.l,Z=M.h-D,$=M.c-B,X=M.l-U;return isNaN($)&&($=0,B=isNaN(B)?M.c:B),isNaN(Z)?(Z=0,D=isNaN(D)?M.h:D):Z>180?Z-=360:Z<-180&&(Z+=360),function(ae){return Ne(D+Z*ae,B+$*ae,U+X*ae)+""}}e.interpolateHsl=Im;function Im(y,M){y=e.hsl(y),M=e.hsl(M);var D=y.h,B=y.s,U=y.l,Z=M.h-D,$=M.s-B,X=M.l-U;return isNaN($)&&($=0,B=isNaN(B)?M.s:B),isNaN(Z)?(Z=0,D=isNaN(D)?M.h:D):Z>180?Z-=360:Z<-180&&(Z+=360),function(ae){return se(D+Z*ae,B+$*ae,U+X*ae)+""}}e.interpolateLab=Rm;function Rm(y,M){y=e.lab(y),M=e.lab(M);var D=y.l,B=y.a,U=y.b,Z=M.l-D,$=M.a-B,X=M.b-U;return function(ae){return Yt(D+Z*ae,B+$*ae,U+X*ae)+""}}e.interpolateRound=xv;function xv(y,M){return M-=y,function(D){return Math.round(y+M*D)}}e.transform=function(y){var M=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(D){if(D!=null){M.setAttribute("transform",D);var B=M.transform.baseVal.consolidate()}return new ap(B?B.matrix:wv)})(y)};function ap(y){var M=[y.a,y.b],D=[y.c,y.d],B=bv(M),U=ip(M,D),Z=bv(Fm(D,M,-U))||0;M[0]*D[1]180?M+=360:M-y>180&&(y+=360),B.push({i:D.push(gu(D)+"rotate(",null,")")-2,x:Eo(y,M)})):M&&D.push(gu(D)+"rotate("+M+")")}function op(y,M,D,B){y!==M?B.push({i:D.push(gu(D)+"skewX(",null,")")-2,x:Eo(y,M)}):M&&D.push(gu(D)+"skewX("+M+")")}function sp(y,M,D,B){if(y[0]!==M[0]||y[1]!==M[1]){var U=D.push(gu(D)+"scale(",null,",",null,")");B.push({i:U-4,x:Eo(y[0],M[0])},{i:U-2,x:Eo(y[1],M[1])})}else(M[0]!==1||M[1]!==1)&&D.push(gu(D)+"scale("+M+")")}function lp(y,M){var D=[],B=[];return y=e.transform(y),M=e.transform(M),np(y.translate,M.translate,D,B),qm(y.rotate,M.rotate,D,B),op(y.skew,M.skew,D,B),sp(y.scale,M.scale,D,B),y=M=null,function(U){for(var Z=-1,$=B.length,X;++Z<$;)D[(X=B[Z]).i]=X.x(U);return D.join("")}}function Nm(y,M){return M=(M-=y=+y)||1/M,function(D){return(D-y)/M}}function cs(y,M){return M=(M-=y=+y)||1/M,function(D){return Math.max(0,Math.min(1,(D-y)/M))}}e.layout={},e.layout.bundle=function(){return function(y){for(var M=[],D=-1,B=y.length;++D0?Z=We:(D.c=null,D.t=NaN,D=null,M.end({type:"end",alpha:Z=0})):We>0&&(M.start({type:"start",alpha:Z=We}),D=qc(y.tick)),y):Z},y.start=function(){var We,Gt=Je.length,or=ot.length,fr=B[0],lr=B[1],Dr,Ir;for(We=0;We=0;)Z.push(_e=me[ae]),_e.parent=X,_e.depth=X.depth+1;D&&(X.value=0),X.children=me}else D&&(X.value=+D.call(B,X,X.depth)||0),delete X.children;return hs(U,function(De){var Pe,Je;y&&(Pe=De.children)&&Pe.sort(y),D&&(Je=De.parent)&&(Je.value+=De.value)}),$}return B.sort=function(U){return arguments.length?(y=U,B):y},B.children=function(U){return arguments.length?(M=U,B):M},B.value=function(U){return arguments.length?(D=U,B):D},B.revalue=function(U){return D&&(rf(U,function(Z){Z.children&&(Z.value=0)}),hs(U,function(Z){var $;Z.children||(Z.value=+D.call(B,Z,Z.depth)||0),($=Z.parent)&&($.value+=Z.value)})),U},B};function Ml(y,M){return e.rebind(y,M,"sort","children","value"),y.nodes=y,y.links=cp,y}function rf(y,M){for(var D=[y];(y=D.pop())!=null;)if(M(y),(U=y.children)&&(B=U.length))for(var B,U;--B>=0;)D.push(U[B])}function hs(y,M){for(var D=[y],B=[];(y=D.pop())!=null;)if(B.push(y),($=y.children)&&(Z=$.length))for(var U=-1,Z,$;++UU&&(U=X),B.push(X)}for($=0;$B&&(D=M,B=U);return D}function Fi(y){return y.reduce(Hm,0)}function Hm(y,M){return y+M[1]}e.layout.histogram=function(){var y=!0,M=Number,D=dp,B=Zc;function U(Z,Pe){for(var X=[],ae=Z.map(M,this),me=D.call(this,ae,Pe),_e=B.call(this,me,ae,Pe),De,Pe=-1,Je=ae.length,ot=_e.length-1,ze=y?1:1/Je,Ue;++Pe0)for(Pe=-1;++Pe=me[0]&&Ue<=me[1]&&(De=X[e.bisect(_e,Ue,1,ot)-1],De.y+=ze,De.push(Z[Pe]));return X}return U.value=function(Z){return arguments.length?(M=Z,U):M},U.range=function(Z){return arguments.length?(D=fa(Z),U):D},U.bins=function(Z){return arguments.length?(B=typeof Z=="number"?function($){return kv($,Z)}:fa(Z),U):B},U.frequency=function(Z){return arguments.length?(y=!!Z,U):y},U};function Zc(y,M){return kv(y,Math.ceil(Math.log(M.length)/Math.LN2+1))}function kv(y,M){for(var D=-1,B=+y[0],U=(y[1]-B)/M,Z=[];++D<=M;)Z[D]=U*D+B;return Z}function dp(y){return[e.min(y),e.max(y)]}e.layout.pack=function(){var y=e.layout.hierarchy().sort(nf),M=0,D=[1,1],B;function U(Z,$){var X=y.call(this,Z,$),ae=X[0],me=D[0],_e=D[1],De=B==null?Math.sqrt:typeof B=="function"?B:function(){return B};if(ae.x=ae.y=0,hs(ae,function(Je){Je.r=+De(Je.value)}),hs(ae,Jf),M){var Pe=M*(B?1:Math.max(2*ae.r/me,2*ae.r/_e))/2;hs(ae,function(Je){Je.r+=Pe}),hs(ae,Jf),hs(ae,function(Je){Je.r-=Pe})}return kl(ae,me/2,_e/2,B?1:1/Math.max(2*ae.r/me,2*ae.r/_e)),X}return U.size=function(Z){return arguments.length?(D=Z,U):D},U.radius=function(Z){return arguments.length?(B=Z==null||typeof Z=="function"?Z:+Z,U):B},U.padding=function(Z){return arguments.length?(M=+Z,U):M},Ml(U,y)};function nf(y,M){return y.value-M.value}function _u(y,M){var D=y._pack_next;y._pack_next=M,M._pack_prev=y,M._pack_next=D,D._pack_prev=M}function Cv(y,M){y._pack_next=M,M._pack_prev=y}function _n(y,M){var D=M.x-y.x,B=M.y-y.y,U=y.r+M.r;return .999*U*U>D*D+B*B}function Jf(y){if(!(M=y.children)||!(Pe=M.length))return;var M,D=1/0,B=-1/0,U=1/0,Z=-1/0,$,X,ae,me,_e,De,Pe;function Je(We){D=Math.min(We.x-We.r,D),B=Math.max(We.x+We.r,B),U=Math.min(We.y-We.r,U),Z=Math.max(We.y+We.r,Z)}if(M.forEach(Ks),$=M[0],$.x=-$.r,$.y=0,Je($),Pe>1&&(X=M[1],X.x=X.r,X.y=0,Je(X),Pe>2))for(ae=M[2],Cl($,X,ae),Je(ae),_u($,ae),$._pack_prev=ae,_u(ae,X),X=$._pack_next,me=3;meUe.x&&(Ue=Gt),Gt.depth>je.depth&&(je=Gt)});var ut=M(ze,Ue)/2-ze.x,nt=D[0]/(Ue.x+M(Ue,ze)/2+ut),We=D[1]/(je.depth||1);rf(Je,function(Gt){Gt.x=(Gt.x+ut)*nt,Gt.y=Gt.depth*We})}return Pe}function Z(_e){for(var De={A:null,children:[_e]},Pe=[De],Je;(Je=Pe.pop())!=null;)for(var ot=Je.children,ze,Ue=0,je=ot.length;Ue0&&(El(Gm(ze,_e,Pe),_e,Gt),je+=Gt,ut+=Gt),nt+=ze.m,je+=Je.m,We+=Ue.m,ut+=ot.m;ze&&!Ss(ot)&&(ot.t=ze,ot.m+=nt-ut),Je&&!Ms(Ue)&&(Ue.t=Je,Ue.m+=je-We,Pe=_e)}return Pe}function me(_e){_e.x*=D[0],_e.y=_e.depth*D[1]}return U.separation=function(_e){return arguments.length?(M=_e,U):M},U.size=function(_e){return arguments.length?(B=(D=_e)==null?me:null,U):B?null:D},U.nodeSize=function(_e){return arguments.length?(B=(D=_e)==null?null:me,U):B?D:null},Ml(U,y)};function Qs(y,M){return y.parent==M.parent?1:2}function Ms(y){var M=y.children;return M.length?M[0]:y.t}function Ss(y){var M=y.children,D;return(D=M.length)?M[D-1]:y.t}function El(y,M,D){var B=D/(M.i-y.i);M.c-=B,M.s+=D,y.c+=B,M.z+=D,M.m+=D}function pp(y){for(var M=0,D=0,B=y.children,U=B.length,Z;--U>=0;)Z=B[U],Z.z+=M,Z.m+=M,M+=Z.s+(D+=Z.c)}function Gm(y,M,D){return y.a.parent===M.parent?y.a:D}e.layout.cluster=function(){var y=e.layout.hierarchy().sort(null).value(null),M=Qs,D=[1,1],B=!1;function U(Z,$){var X=y.call(this,Z,$),ae=X[0],me,_e=0;hs(ae,function(ze){var Ue=ze.children;Ue&&Ue.length?(ze.x=Ym(Ue),ze.y=Zm(Ue)):(ze.x=me?_e+=M(ze,me):0,ze.y=0,me=ze)});var De=mp(ae),Pe=yp(ae),Je=De.x-M(De,Pe)/2,ot=Pe.x+M(Pe,De)/2;return hs(ae,B?function(ze){ze.x=(ze.x-ae.x)*D[0],ze.y=(ae.y-ze.y)*D[1]}:function(ze){ze.x=(ze.x-Je)/(ot-Je)*D[0],ze.y=(1-(ae.y?ze.y/ae.y:1))*D[1]}),X}return U.separation=function(Z){return arguments.length?(M=Z,U):M},U.size=function(Z){return arguments.length?(B=(D=Z)==null,U):B?null:D},U.nodeSize=function(Z){return arguments.length?(B=(D=Z)!=null,U):B?D:null},Ml(U,y)};function Zm(y){return 1+e.max(y,function(M){return M.y})}function Ym(y){return y.reduce(function(M,D){return M+D.x},0)/y.length}function mp(y){var M=y.children;return M&&M.length?mp(M[0]):y}function yp(y){var M=y.children,D;return M&&(D=M.length)?yp(M[D-1]):y}e.layout.treemap=function(){var y=e.layout.hierarchy(),M=Math.round,D=[1,1],B=null,U=Ev,Z=!1,$,X="squarify",ae=.5*(1+Math.sqrt(5));function me(ze,Ue){for(var je=-1,ut=ze.length,nt,We;++je0;)ut.push(We=nt[lr-1]),ut.area+=We.area,X!=="squarify"||(or=Pe(ut,fr))<=Gt?(nt.pop(),Gt=or):(ut.area-=ut.pop().area,Je(ut,fr,je,!1),fr=Math.min(je.dx,je.dy),ut.length=ut.area=0,Gt=1/0);ut.length&&(Je(ut,fr,je,!0),ut.length=ut.area=0),Ue.forEach(_e)}}function De(ze){var Ue=ze.children;if(Ue&&Ue.length){var je=U(ze),ut=Ue.slice(),nt,We=[];for(me(ut,je.dx*je.dy/ze.value),We.area=0;nt=ut.pop();)We.push(nt),We.area+=nt.area,nt.z!=null&&(Je(We,nt.z?je.dx:je.dy,je,!ut.length),We.length=We.area=0);Ue.forEach(De)}}function Pe(ze,Ue){for(var je=ze.area,ut,nt=0,We=1/0,Gt=-1,or=ze.length;++Gtnt&&(nt=ut));return je*=je,Ue*=Ue,je?Math.max(Ue*nt*ae/je,je/(Ue*We*ae)):1/0}function Je(ze,Ue,je,ut){var nt=-1,We=ze.length,Gt=je.x,or=je.y,fr=Ue?M(ze.area/Ue):0,lr;if(Ue==je.dx){for((ut||fr>je.dy)&&(fr=je.dy);++ntje.dx)&&(fr=je.dx);++nt1);return y+M*B*Math.sqrt(-2*Math.log(Z)/Z)}},logNormal:function(){var y=e.random.normal.apply(e,arguments);return function(){return Math.exp(y())}},bates:function(y){var M=e.random.irwinHall(y);return function(){return M()/y}},irwinHall:function(y){return function(){for(var M=0,D=0;D2?Wm:gp,me=B?cs:Nm;return U=ae(y,M,me,D),Z=ae(M,y,me,on),X}function X(ae){return U(ae)}return X.invert=function(ae){return Z(ae)},X.domain=function(ae){return arguments.length?(y=ae.map(Number),$()):y},X.range=function(ae){return arguments.length?(M=ae,$()):M},X.rangeRound=function(ae){return X.range(ae).interpolate(xv)},X.clamp=function(ae){return arguments.length?(B=ae,$()):B},X.interpolate=function(ae){return arguments.length?(D=ae,$()):D},X.ticks=function(ae){return zv(y,ae)},X.tickFormat=function(ae,me){return d3_scale_linearTickFormat(y,ae,me)},X.nice=function(ae){return wp(y,ae),$()},X.copy=function(){return xp(y,M,D,B)},$()}function bp(y,M){return e.rebind(y,M,"range","rangeRound","interpolate","clamp")}function wp(y,M){return Pv(y,_p(Dv(y,M)[2])),Pv(y,_p(Dv(y,M)[2])),y}function Dv(y,M){M==null&&(M=10);var D=Kf(y),B=D[1]-D[0],U=Math.pow(10,Math.floor(Math.log(B/M)/Math.LN10)),Z=M/B*U;return Z<=.15?U*=10:Z<=.35?U*=5:Z<=.75&&(U*=2),D[0]=Math.ceil(D[0]/U)*U,D[1]=Math.floor(D[1]/U)*U+U*.5,D[2]=U,D}function zv(y,M){return e.range.apply(e,Dv(y,M))}var xu={s:1,g:1,p:1,r:1,e:1};function Ll(y){return-Math.floor(Math.log(y)/Math.LN10+.01)}function Qf(y,M){var D=Ll(M[2]);return y in xu?Math.abs(D-Ll(Math.max(I(M[0]),I(M[1]))))+ +(y!=="e"):D-(y==="%")*2}e.scale.log=function(){return Iv(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Iv(y,M,D,B){function U(X){return(D?Math.log(X<0?0:X):-Math.log(X>0?0:-X))/Math.log(M)}function Z(X){return D?Math.pow(M,X):-Math.pow(M,-X)}function $(X){return y(U(X))}return $.invert=function(X){return Z(y.invert(X))},$.domain=function(X){return arguments.length?(D=X[0]>=0,y.domain((B=X.map(Number)).map(U)),$):B},$.base=function(X){return arguments.length?(M=+X,y.domain(B.map(U)),$):M},$.nice=function(){var X=Pv(B.map(U),D?Math:Wc);return y.domain(X),B=X.map(Z),$},$.ticks=function(){var X=Kf(B),ae=[],me=X[0],_e=X[1],De=Math.floor(U(me)),Pe=Math.ceil(U(_e)),Je=M%1?2:M;if(isFinite(Pe-De)){if(D){for(;De0;ot--)ae.push(Z(De)*ot);for(De=0;ae[De]_e;Pe--);ae=ae.slice(De,Pe)}return ae},$.copy=function(){return Iv(y.copy(),M,D,B)},bp($,y)}var Wc={floor:function(y){return-Math.ceil(-y)},ceil:function(y){return-Math.floor(-y)}};e.scale.pow=function(){return Xc(e.scale.linear(),1,[0,1])};function Xc(y,M,D){var B=jc(M),U=jc(1/M);function Z($){return y(B($))}return Z.invert=function($){return U(y.invert($))},Z.domain=function($){return arguments.length?(y.domain((D=$.map(Number)).map(B)),Z):D},Z.ticks=function($){return zv(D,$)},Z.tickFormat=function($,X){return d3_scale_linearTickFormat(D,$,X)},Z.nice=function($){return Z.domain(wp(D,$))},Z.exponent=function($){return arguments.length?(B=jc(M=$),U=jc(1/M),y.domain(D.map(B)),Z):M},Z.copy=function(){return Xc(y.copy(),M,D)},bp(Z,y)}function jc(y){return function(M){return M<0?-Math.pow(-M,y):Math.pow(M,y)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Pl([],{t:"range",a:[[]]})};function Pl(y,M){var D,B,U;function Z(X){return B[((D.get(X)||(M.t==="range"?D.set(X,y.push(X)):NaN))-1)%B.length]}function $(X,ae){return e.range(y.length).map(function(me){return X+ae*me})}return Z.domain=function(X){if(!arguments.length)return y;y=[],D=new z;for(var ae=-1,me=X.length,_e;++ae0?D[Z-1]:y[0],ZPe?0:1;if(_e=Er)return ae(_e,ot)+(me?ae(me,1-ot):"")+"Z";var ze,Ue,je,ut,nt=0,We=0,Gt,or,fr,lr,Dr,Ir,ea,Ur,Kr=[];if((ut=(+$.apply(this,arguments)||0)/2)&&(je=B===Dl?Math.sqrt(me*me+_e*_e):+B.apply(this,arguments),ot||(We*=-1),_e&&(We=Ki(je/_e*Math.sin(ut))),me&&(nt=Ki(je/me*Math.sin(ut)))),_e){Gt=_e*Math.cos(De+We),or=_e*Math.sin(De+We),fr=_e*Math.cos(Pe-We),lr=_e*Math.sin(Pe-We);var Ba=Math.abs(Pe-De-2*We)<=dt?0:1;if(We&&zl(Gt,or,fr,lr)===ot^Ba){var ri=(De+Pe)/2;Gt=_e*Math.cos(ri),or=_e*Math.sin(ri),fr=lr=null}}else Gt=or=0;if(me){Dr=me*Math.cos(Pe-nt),Ir=me*Math.sin(Pe-nt),ea=me*Math.cos(De+nt),Ur=me*Math.sin(De+nt);var $a=Math.abs(De-Pe+2*nt)<=dt?0:1;if(nt&&zl(Dr,Ir,ea,Ur)===1-ot^$a){var jt=(De+Pe)/2;Dr=me*Math.cos(jt),Ir=me*Math.sin(jt),ea=Ur=null}}else Dr=Ir=0;if(Je>Ge&&(ze=Math.min(Math.abs(_e-me)/2,+D.apply(this,arguments)))>.001){Ue=me<_e^ot?0:1;var Jr=ze,oa=ze;if(Je0?0:1}function wu(y,M,D,B,U){var Z=y[0]-M[0],$=y[1]-M[1],X=(U?B:-B)/Math.sqrt(Z*Z+$*$),ae=X*$,me=-X*Z,_e=y[0]+ae,De=y[1]+me,Pe=M[0]+ae,Je=M[1]+me,ot=(_e+Pe)/2,ze=(De+Je)/2,Ue=Pe-_e,je=Je-De,ut=Ue*Ue+je*je,nt=D-B,We=_e*Je-Pe*De,Gt=(je<0?-1:1)*Math.sqrt(Math.max(0,nt*nt*ut-We*We)),or=(We*je-Ue*Gt)/ut,fr=(-We*Ue-je*Gt)/ut,lr=(We*je+Ue*Gt)/ut,Dr=(-We*Ue+je*Gt)/ut,Ir=or-ot,ea=fr-ze,Ur=lr-ot,Kr=Dr-ze;return Ir*Ir+ea*ea>Ur*Ur+Kr*Kr&&(or=lr,fr=Dr),[[or-ae,fr-me],[or*D/nt,fr*D/nt]]}function ec(){return!0}function ks(y){var M=vu,D=pl,B=ec,U=Xo,Z=U.key,$=.7;function X(ae){var me=[],_e=[],De=-1,Pe=ae.length,Je,ot=fa(M),ze=fa(D);function Ue(){me.push("M",U(y(_e),$))}for(;++De1?y.join("L"):y+"Z"}function lf(y){return y.join("L")+"Z"}function jm(y){for(var M=0,D=y.length,B=y[0],U=[B[0],",",B[1]];++M1&&U.push("H",B[0]),U.join("")}function uf(y){for(var M=0,D=y.length,B=y[0],U=[B[0],",",B[1]];++M1){X=M[1],Z=y[ae],ae++,B+="C"+(U[0]+$[0])+","+(U[1]+$[1])+","+(Z[0]-X[0])+","+(Z[1]-X[1])+","+Z[0]+","+Z[1];for(var me=2;me9&&(Z=D*3/Math.sqrt(Z),$[X]=Z*B,$[X+1]=Z*U));for(X=-1;++X<=ae;)Z=(y[Math.min(ae,X+1)][0]-y[Math.max(0,X-1)][0])/(6*(1+$[X]*$[X])),M.push([Z||0,$[X]*Z||0]);return M}function Lp(y){return y.length<3?Xo(y):y[0]+ff(y,$m(y))}e.svg.line.radial=function(){var y=ks(Bv);return y.radius=y.x,delete y.x,y.angle=y.y,delete y.y,y};function Bv(y){for(var M,D=-1,B=y.length,U,Z;++Ddt)+",1 "+De}function me(_e,De,Pe,Je){return"Q 0,0 "+Je}return Z.radius=function(_e){return arguments.length?(D=fa(_e),Z):D},Z.source=function(_e){return arguments.length?(y=fa(_e),Z):y},Z.target=function(_e){return arguments.length?(M=fa(_e),Z):M},Z.startAngle=function(_e){return arguments.length?(B=fa(_e),Z):B},Z.endAngle=function(_e){return arguments.length?(U=fa(_e),Z):U},Z};function Pp(y){return y.radius}e.svg.diagonal=function(){var y=eh,M=Ov,D=Uv;function B(U,Z){var $=y.call(this,U,Z),X=M.call(this,U,Z),ae=($.y+X.y)/2,me=[$,{x:$.x,y:ae},{x:X.x,y:ae},X];return me=me.map(D),"M"+me[0]+"C"+me[1]+" "+me[2]+" "+me[3]}return B.source=function(U){return arguments.length?(y=fa(U),B):y},B.target=function(U){return arguments.length?(M=fa(U),B):M},B.projection=function(U){return arguments.length?(D=U,B):D},B};function Uv(y){return[y.x,y.y]}e.svg.diagonal.radial=function(){var y=e.svg.diagonal(),M=Uv,D=y.projection;return y.projection=function(B){return arguments.length?D(Dp(M=B)):M},y};function Dp(y){return function(){var M=y.apply(this,arguments),D=M[0],B=M[1]-Tr;return[D*Math.cos(B),D*Math.sin(B)]}}e.svg.symbol=function(){var y=df,M=zp;function D(B,U){return(rh.get(y.call(this,B,U))||th)(M.call(this,B,U))}return D.type=function(B){return arguments.length?(y=fa(B),D):y},D.size=function(B){return arguments.length?(M=fa(B),D):M},D};function zp(){return 64}function df(){return"circle"}function th(y){var M=Math.sqrt(y/dt);return"M0,"+M+"A"+M+","+M+" 0 1,1 0,"+-M+"A"+M+","+M+" 0 1,1 0,"+M+"Z"}var rh=e.map({circle:th,cross:function(y){var M=Math.sqrt(y/5)/2;return"M"+-3*M+","+-M+"H"+-M+"V"+-3*M+"H"+M+"V"+-M+"H"+3*M+"V"+M+"H"+M+"V"+3*M+"H"+-M+"V"+M+"H"+-3*M+"Z"},diamond:function(y){var M=Math.sqrt(y/(2*Vv)),D=M*Vv;return"M0,"+-M+"L"+D+",0 0,"+M+" "+-D+",0Z"},square:function(y){var M=Math.sqrt(y)/2;return"M"+-M+","+-M+"L"+M+","+-M+" "+M+","+M+" "+-M+","+M+"Z"},"triangle-down":function(y){var M=Math.sqrt(y/Au),D=M*Au/2;return"M0,"+D+"L"+M+","+-D+" "+-M+","+-D+"Z"},"triangle-up":function(y){var M=Math.sqrt(y/Au),D=M*Au/2;return"M0,"+-D+"L"+M+","+D+" "+-M+","+D+"Z"}});e.svg.symbolTypes=rh.keys();var Au=Math.sqrt(3),Vv=Math.tan(30*Hr);pt.transition=function(y){for(var M=so||++Ci,D=fi(y),B=[],U,Z,$=Es||{time:Date.now(),ease:bl,delay:0,duration:250},X=-1,ae=this.length;++X0;)De[--ut].call(y,je);if(Ue>=1)return $.event&&$.event.end.call(y,y.__data__,M),--Z.count?delete Z[B]:delete y[D],1}$||(X=U.time,ae=qc(Pe,0,X),$=Z[B]={tween:new z,time:X,timer:ae,delay:U.delay,duration:U.duration,ease:U.ease,index:M},U=null,++Z.count)}e.svg.axis=function(){var y=e.scale.linear(),M=Rl,D=6,B=6,U=3,Z=[10],$=null,X;function ae(me){me.each(function(){var _e=e.select(this),De=this.__chart__||y,Pe=this.__chart__=y.copy(),Je=$==null?Pe.ticks?Pe.ticks.apply(Pe,Z):Pe.domain():$,ot=X==null?Pe.tickFormat?Pe.tickFormat.apply(Pe,Z):ke:X,ze=_e.selectAll(".tick").data(Je,Pe),Ue=ze.enter().insert("g",".domain").attr("class","tick").style("opacity",Ge),je=e.transition(ze.exit()).style("opacity",Ge).remove(),ut=e.transition(ze.order()).style("opacity",1),nt=Math.max(D,0)+U,We,Gt=Yc(Pe),or=_e.selectAll(".domain").data([0]),fr=(or.enter().append("path").attr("class","domain"),e.transition(or));Ue.append("line"),Ue.append("text");var lr=Ue.select("line"),Dr=ut.select("line"),Ir=ze.select("text").text(ot),ea=Ue.select("text"),Ur=ut.select("text"),Kr=M==="top"||M==="left"?-1:1,Ba,ri,$a,jt;if(M==="bottom"||M==="top"?(We=mf,Ba="x",$a="y",ri="x2",jt="y2",Ir.attr("dy",Kr<0?"0em":".71em").style("text-anchor","middle"),fr.attr("d","M"+Gt[0]+","+Kr*B+"V0H"+Gt[1]+"V"+Kr*B)):(We=Fl,Ba="y",$a="x",ri="y2",jt="x2",Ir.attr("dy",".32em").style("text-anchor",Kr<0?"end":"start"),fr.attr("d","M"+Kr*B+","+Gt[0]+"H0V"+Gt[1]+"H"+Kr*B)),lr.attr(jt,Kr*D),ea.attr($a,Kr*nt),Dr.attr(ri,0).attr(jt,Kr*D),Ur.attr(Ba,0).attr($a,Kr*nt),Pe.rangeBand){var Jr=Pe,oa=Jr.rangeBand()/2;De=Pe=function(sa){return Jr(sa)+oa}}else De.rangeBand?De=Pe:je.call(We,Pe,De);Ue.call(We,De,Pe),ut.call(We,Pe,Pe)})}return ae.scale=function(me){return arguments.length?(y=me,ae):y},ae.orient=function(me){return arguments.length?(M=me in rc?me+"":Rl,ae):M},ae.ticks=function(){return arguments.length?(Z=r(arguments),ae):Z},ae.tickValues=function(me){return arguments.length?($=me,ae):$},ae.tickFormat=function(me){return arguments.length?(X=me,ae):X},ae.tickSize=function(me){var _e=arguments.length;return _e?(D=+me,B=+arguments[_e-1],ae):D},ae.innerTickSize=function(me){return arguments.length?(D=+me,ae):D},ae.outerTickSize=function(me){return arguments.length?(B=+me,ae):B},ae.tickPadding=function(me){return arguments.length?(U=+me,ae):U},ae.tickSubdivide=function(){return arguments.length&&ae},ae};var Rl="bottom",rc={top:1,right:1,bottom:1,left:1};function mf(y,M,D){y.attr("transform",function(B){var U=M(B);return"translate("+(isFinite(U)?U:D(B))+",0)"})}function Fl(y,M,D){y.attr("transform",function(B){var U=M(B);return"translate(0,"+(isFinite(U)?U:D(B))+")"})}e.svg.brush=function(){var y=it(_e,"brushstart","brush","brushend"),M=null,D=null,B=[0,0],U=[0,0],Z,$,X=!0,ae=!0,me=nh[0];function _e(ze){ze.each(function(){var Ue=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ot).on("touchstart.brush",ot),je=Ue.selectAll(".background").data([0]);je.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ue.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var ut=Ue.selectAll(".resize").data(me,ke);ut.exit().remove(),ut.enter().append("g").attr("class",function(or){return"resize "+or}).style("cursor",function(or){return Ls[or]}).append("rect").attr("x",function(or){return/[ew]$/.test(or)?-3:null}).attr("y",function(or){return/^[ns]/.test(or)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),ut.style("display",_e.empty()?"none":null);var nt=e.transition(Ue),We=e.transition(je),Gt;M&&(Gt=Yc(M),We.attr("x",Gt[0]).attr("width",Gt[1]-Gt[0]),Pe(nt)),D&&(Gt=Yc(D),We.attr("y",Gt[0]).attr("height",Gt[1]-Gt[0]),Je(nt)),De(nt)})}_e.event=function(ze){ze.each(function(){var Ue=y.of(this,arguments),je={x:B,y:U,i:Z,j:$},ut=this.__chart__||je;this.__chart__=je,so?e.select(this).transition().each("start.brush",function(){Z=ut.i,$=ut.j,B=ut.x,U=ut.y,Ue({type:"brushstart"})}).tween("brush:brush",function(){var nt=Yo(B,je.x),We=Yo(U,je.y);return Z=$=null,function(Gt){B=je.x=nt(Gt),U=je.y=We(Gt),Ue({type:"brush",mode:"resize"})}}).each("end.brush",function(){Z=je.i,$=je.j,Ue({type:"brush",mode:"resize"}),Ue({type:"brushend"})}):(Ue({type:"brushstart"}),Ue({type:"brush",mode:"resize"}),Ue({type:"brushend"}))})};function De(ze){ze.selectAll(".resize").attr("transform",function(Ue){return"translate("+B[+/e$/.test(Ue)]+","+U[+/^s/.test(Ue)]+")"})}function Pe(ze){ze.select(".extent").attr("x",B[0]),ze.selectAll(".extent,.n>rect,.s>rect").attr("width",B[1]-B[0])}function Je(ze){ze.select(".extent").attr("y",U[0]),ze.selectAll(".extent,.e>rect,.w>rect").attr("height",U[1]-U[0])}function ot(){var ze=this,Ue=e.select(e.event.target),je=y.of(ze,arguments),ut=e.select(ze),nt=Ue.datum(),We=!/^(n|s)$/.test(nt)&&M,Gt=!/^(e|w)$/.test(nt)&&D,or=Ue.classed("extent"),fr=Mr(ze),lr,Dr=e.mouse(ze),Ir,ea=e.select(s(ze)).on("keydown.brush",Ba).on("keyup.brush",ri);if(e.event.changedTouches?ea.on("touchmove.brush",$a).on("touchend.brush",Jr):ea.on("mousemove.brush",$a).on("mouseup.brush",Jr),ut.interrupt().selectAll("*").interrupt(),or)Dr[0]=B[0]-Dr[0],Dr[1]=U[0]-Dr[1];else if(nt){var Ur=+/w$/.test(nt),Kr=+/^n/.test(nt);Ir=[B[1-Ur]-Dr[0],U[1-Kr]-Dr[1]],Dr[0]=B[Ur],Dr[1]=U[Kr]}else e.event.altKey&&(lr=Dr.slice());ut.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ue.style("cursor")),je({type:"brushstart"}),$a();function Ba(){e.event.keyCode==32&&(or||(lr=null,Dr[0]-=B[1],Dr[1]-=U[1],or=2),Ke())}function ri(){e.event.keyCode==32&&or==2&&(Dr[0]+=B[1],Dr[1]+=U[1],or=0,Ke())}function $a(){var oa=e.mouse(ze),sa=!1;Ir&&(oa[0]+=Ir[0],oa[1]+=Ir[1]),or||(e.event.altKey?(lr||(lr=[(B[0]+B[1])/2,(U[0]+U[1])/2]),Dr[0]=B[+(oa[0]{(function(e,t){typeof G1=="object"&&typeof x7!="undefined"?t(G1):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(G1,function(e){"use strict";var t=new Date,r=new Date;function i(Be,ft,mt,Ar){function dr(Tt){return Be(Tt=arguments.length===0?new Date:new Date(+Tt)),Tt}return dr.floor=function(Tt){return Be(Tt=new Date(+Tt)),Tt},dr.ceil=function(Tt){return Be(Tt=new Date(Tt-1)),ft(Tt,1),Be(Tt),Tt},dr.round=function(Tt){var wt=dr(Tt),Vt=dr.ceil(Tt);return Tt-wt0))return Kt;do Kt.push(Ht=new Date(+Tt)),ft(Tt,Vt),Be(Tt);while(Ht=wt)for(;Be(wt),!Tt(wt);)wt.setTime(wt-1)},function(wt,Vt){if(wt>=wt)if(Vt<0)for(;++Vt<=0;)for(;ft(wt,-1),!Tt(wt););else for(;--Vt>=0;)for(;ft(wt,1),!Tt(wt););})},mt&&(dr.count=function(Tt,wt){return t.setTime(+Tt),r.setTime(+wt),Be(t),Be(r),Math.floor(mt(t,r))},dr.every=function(Tt){return Tt=Math.floor(Tt),!isFinite(Tt)||!(Tt>0)?null:Tt>1?dr.filter(Ar?function(wt){return Ar(wt)%Tt===0}:function(wt){return dr.count(0,wt)%Tt===0}):dr}),dr}var a=i(function(){},function(Be,ft){Be.setTime(+Be+ft)},function(Be,ft){return ft-Be});a.every=function(Be){return Be=Math.floor(Be),!isFinite(Be)||!(Be>0)?null:Be>1?i(function(ft){ft.setTime(Math.floor(ft/Be)*Be)},function(ft,mt){ft.setTime(+ft+mt*Be)},function(ft,mt){return(mt-ft)/Be}):a};var s=a.range,l=1e3,f=6e4,h=36e5,v=864e5,m=6048e5,b=i(function(Be){Be.setTime(Be-Be.getMilliseconds())},function(Be,ft){Be.setTime(+Be+ft*l)},function(Be,ft){return(ft-Be)/l},function(Be){return Be.getUTCSeconds()}),T=b.range,S=i(function(Be){Be.setTime(Be-Be.getMilliseconds()-Be.getSeconds()*l)},function(Be,ft){Be.setTime(+Be+ft*f)},function(Be,ft){return(ft-Be)/f},function(Be){return Be.getMinutes()}),C=S.range,P=i(function(Be){Be.setTime(Be-Be.getMilliseconds()-Be.getSeconds()*l-Be.getMinutes()*f)},function(Be,ft){Be.setTime(+Be+ft*h)},function(Be,ft){return(ft-Be)/h},function(Be){return Be.getHours()}),E=P.range,I=i(function(Be){Be.setHours(0,0,0,0)},function(Be,ft){Be.setDate(Be.getDate()+ft)},function(Be,ft){return(ft-Be-(ft.getTimezoneOffset()-Be.getTimezoneOffset())*f)/v},function(Be){return Be.getDate()-1}),R=I.range;function N(Be){return i(function(ft){ft.setDate(ft.getDate()-(ft.getDay()+7-Be)%7),ft.setHours(0,0,0,0)},function(ft,mt){ft.setDate(ft.getDate()+mt*7)},function(ft,mt){return(mt-ft-(mt.getTimezoneOffset()-ft.getTimezoneOffset())*f)/m})}var z=N(0),O=N(1),H=N(2),V=N(3),W=N(4),J=N(5),re=N(6),oe=z.range,ne=O.range,fe=H.range,ve=V.range,ke=W.range,Ce=J.range,Te=re.range,pe=i(function(Be){Be.setDate(1),Be.setHours(0,0,0,0)},function(Be,ft){Be.setMonth(Be.getMonth()+ft)},function(Be,ft){return ft.getMonth()-Be.getMonth()+(ft.getFullYear()-Be.getFullYear())*12},function(Be){return Be.getMonth()}),Ae=pe.range,Se=i(function(Be){Be.setMonth(0,1),Be.setHours(0,0,0,0)},function(Be,ft){Be.setFullYear(Be.getFullYear()+ft)},function(Be,ft){return ft.getFullYear()-Be.getFullYear()},function(Be){return Be.getFullYear()});Se.every=function(Be){return!isFinite(Be=Math.floor(Be))||!(Be>0)?null:i(function(ft){ft.setFullYear(Math.floor(ft.getFullYear()/Be)*Be),ft.setMonth(0,1),ft.setHours(0,0,0,0)},function(ft,mt){ft.setFullYear(ft.getFullYear()+mt*Be)})};var Le=Se.range,Ke=i(function(Be){Be.setUTCSeconds(0,0)},function(Be,ft){Be.setTime(+Be+ft*f)},function(Be,ft){return(ft-Be)/f},function(Be){return Be.getUTCMinutes()}),ht=Ke.range,it=i(function(Be){Be.setUTCMinutes(0,0,0)},function(Be,ft){Be.setTime(+Be+ft*h)},function(Be,ft){return(ft-Be)/h},function(Be){return Be.getUTCHours()}),lt=it.range,He=i(function(Be){Be.setUTCHours(0,0,0,0)},function(Be,ft){Be.setUTCDate(Be.getUTCDate()+ft)},function(Be,ft){return(ft-Be)/v},function(Be){return Be.getUTCDate()-1}),_t=He.range;function at(Be){return i(function(ft){ft.setUTCDate(ft.getUTCDate()-(ft.getUTCDay()+7-Be)%7),ft.setUTCHours(0,0,0,0)},function(ft,mt){ft.setUTCDate(ft.getUTCDate()+mt*7)},function(ft,mt){return(mt-ft)/m})}var At=at(0),kt=at(1),pt=at(2),ge=at(3),Re=at(4),xe=at(5),et=at(6),vt=At.range,tt=kt.range,Nt=pt.range,Mt=ge.range,Ct=Re.range,Rt=xe.range,Ut=et.range,xt=i(function(Be){Be.setUTCDate(1),Be.setUTCHours(0,0,0,0)},function(Be,ft){Be.setUTCMonth(Be.getUTCMonth()+ft)},function(Be,ft){return ft.getUTCMonth()-Be.getUTCMonth()+(ft.getUTCFullYear()-Be.getUTCFullYear())*12},function(Be){return Be.getUTCMonth()}),Et=xt.range,ir=i(function(Be){Be.setUTCMonth(0,1),Be.setUTCHours(0,0,0,0)},function(Be,ft){Be.setUTCFullYear(Be.getUTCFullYear()+ft)},function(Be,ft){return ft.getUTCFullYear()-Be.getUTCFullYear()},function(Be){return Be.getUTCFullYear()});ir.every=function(Be){return!isFinite(Be=Math.floor(Be))||!(Be>0)?null:i(function(ft){ft.setUTCFullYear(Math.floor(ft.getUTCFullYear()/Be)*Be),ft.setUTCMonth(0,1),ft.setUTCHours(0,0,0,0)},function(ft,mt){ft.setUTCFullYear(ft.getUTCFullYear()+mt*Be)})};var Wt=ir.range;e.timeDay=I,e.timeDays=R,e.timeFriday=J,e.timeFridays=Ce,e.timeHour=P,e.timeHours=E,e.timeInterval=i,e.timeMillisecond=a,e.timeMilliseconds=s,e.timeMinute=S,e.timeMinutes=C,e.timeMonday=O,e.timeMondays=ne,e.timeMonth=pe,e.timeMonths=Ae,e.timeSaturday=re,e.timeSaturdays=Te,e.timeSecond=b,e.timeSeconds=T,e.timeSunday=z,e.timeSundays=oe,e.timeThursday=W,e.timeThursdays=ke,e.timeTuesday=H,e.timeTuesdays=fe,e.timeWednesday=V,e.timeWednesdays=ve,e.timeWeek=z,e.timeWeeks=oe,e.timeYear=Se,e.timeYears=Le,e.utcDay=He,e.utcDays=_t,e.utcFriday=xe,e.utcFridays=Rt,e.utcHour=it,e.utcHours=lt,e.utcMillisecond=a,e.utcMilliseconds=s,e.utcMinute=Ke,e.utcMinutes=ht,e.utcMonday=kt,e.utcMondays=tt,e.utcMonth=xt,e.utcMonths=Et,e.utcSaturday=et,e.utcSaturdays=Ut,e.utcSecond=b,e.utcSeconds=T,e.utcSunday=At,e.utcSundays=vt,e.utcThursday=Re,e.utcThursdays=Ct,e.utcTuesday=pt,e.utcTuesdays=Nt,e.utcWednesday=ge,e.utcWednesdays=Mt,e.utcWeek=At,e.utcWeeks=vt,e.utcYear=ir,e.utcYears=Wt,Object.defineProperty(e,"__esModule",{value:!0})})});var s0=de((Z1,b7)=>{(function(e,t){typeof Z1=="object"&&typeof b7!="undefined"?t(Z1,F3()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Z1,function(e,t){"use strict";function r(Fe){if(0<=Fe.y&&Fe.y<100){var Ge=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ge.setFullYear(Fe.y),Ge}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function i(Fe){if(0<=Fe.y&&Fe.y<100){var Ge=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ge.setUTCFullYear(Fe.y),Ge}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function a(Fe,Ge,bt){return{y:Fe,m:Ge,d:bt,H:0,M:0,S:0,L:0}}function s(Fe){var Ge=Fe.dateTime,bt=Fe.date,dt=Fe.time,gr=Fe.periods,Er=Fe.days,Tr=Fe.shortDays,Hr=Fe.months,_a=Fe.shortMonths,ka=T(gr),Ea=S(gr),Ri=T(Er),Ki=S(Er),yn=T(Tr),Xi=S(Tr),jn=T(Hr),En=S(Hr),Vi=T(_a),pa=S(_a),Gr={a:Dt,A:Ft,b:tr,B:Yt,c:null,d:pe,e:pe,f:ht,H:Ae,I:Se,j:Le,L:Ke,m:it,M:lt,p:wr,q:Yr,Q:wt,s:Vt,S:He,u:_t,U:at,V:At,w:kt,W:pt,x:null,X:null,y:ge,Y:Re,Z:xe,"%":Tt},Qa={a:Br,A:ca,b:ua,B:Na,c:null,d:et,e:et,f:Ct,H:vt,I:tt,j:Nt,L:Mt,m:Rt,M:Ut,p:ii,q:Wr,Q:wt,s:Vt,S:xt,u:Et,U:ir,V:Wt,w:Be,W:ft,x:null,X:null,y:mt,Y:Ar,Z:dr,"%":Tt},Zr={a:se,A:ce,b:Ee,B:Ne,c:rt,d:W,e:W,f:ve,H:re,I:re,j:J,L:fe,m:V,M:oe,p:ee,q:H,Q:Ce,s:Te,S:ne,u:P,U:E,V:I,w:C,W:R,x:Ve,X:yt,y:z,Y:N,Z:O,"%":ke};Gr.x=vi(bt,Gr),Gr.X=vi(dt,Gr),Gr.c=vi(Ge,Gr),Qa.x=vi(bt,Qa),Qa.X=vi(dt,Qa),Qa.c=vi(Ge,Qa);function vi(pr,$r){return function(ga){var nr=[],wi=-1,La=0,si=pr.length,fa,Ln,Co;for(ga instanceof Date||(ga=new Date(+ga));++wi53)return null;"w"in nr||(nr.w=1),"Z"in nr?(La=i(a(nr.y,0,1)),si=La.getUTCDay(),La=si>4||si===0?t.utcMonday.ceil(La):t.utcMonday(La),La=t.utcDay.offset(La,(nr.V-1)*7),nr.y=La.getUTCFullYear(),nr.m=La.getUTCMonth(),nr.d=La.getUTCDate()+(nr.w+6)%7):(La=r(a(nr.y,0,1)),si=La.getDay(),La=si>4||si===0?t.timeMonday.ceil(La):t.timeMonday(La),La=t.timeDay.offset(La,(nr.V-1)*7),nr.y=La.getFullYear(),nr.m=La.getMonth(),nr.d=La.getDate()+(nr.w+6)%7)}else("W"in nr||"U"in nr)&&("w"in nr||(nr.w="u"in nr?nr.u%7:"W"in nr?1:0),si="Z"in nr?i(a(nr.y,0,1)).getUTCDay():r(a(nr.y,0,1)).getDay(),nr.m=0,nr.d="W"in nr?(nr.w+6)%7+nr.W*7-(si+5)%7:nr.w+nr.U*7-(si+6)%7);return"Z"in nr?(nr.H+=nr.Z/100|0,nr.M+=nr.Z%100,i(nr)):r(nr)}}function le(pr,$r,ga,nr){for(var wi=0,La=$r.length,si=ga.length,fa,Ln;wi=si)return-1;if(fa=$r.charCodeAt(wi++),fa===37){if(fa=$r.charAt(wi++),Ln=Zr[fa in l?$r.charAt(wi++):fa],!Ln||(nr=Ln(pr,ga,nr))<0)return-1}else if(fa!=ga.charCodeAt(nr++))return-1}return nr}function ee(pr,$r,ga){var nr=ka.exec($r.slice(ga));return nr?(pr.p=Ea[nr[0].toLowerCase()],ga+nr[0].length):-1}function se(pr,$r,ga){var nr=yn.exec($r.slice(ga));return nr?(pr.w=Xi[nr[0].toLowerCase()],ga+nr[0].length):-1}function ce(pr,$r,ga){var nr=Ri.exec($r.slice(ga));return nr?(pr.w=Ki[nr[0].toLowerCase()],ga+nr[0].length):-1}function Ee(pr,$r,ga){var nr=Vi.exec($r.slice(ga));return nr?(pr.m=pa[nr[0].toLowerCase()],ga+nr[0].length):-1}function Ne(pr,$r,ga){var nr=jn.exec($r.slice(ga));return nr?(pr.m=En[nr[0].toLowerCase()],ga+nr[0].length):-1}function rt(pr,$r,ga){return le(pr,Ge,$r,ga)}function Ve(pr,$r,ga){return le(pr,bt,$r,ga)}function yt(pr,$r,ga){return le(pr,dt,$r,ga)}function Dt(pr){return Tr[pr.getDay()]}function Ft(pr){return Er[pr.getDay()]}function tr(pr){return _a[pr.getMonth()]}function Yt(pr){return Hr[pr.getMonth()]}function wr(pr){return gr[+(pr.getHours()>=12)]}function Yr(pr){return 1+~~(pr.getMonth()/3)}function Br(pr){return Tr[pr.getUTCDay()]}function ca(pr){return Er[pr.getUTCDay()]}function ua(pr){return _a[pr.getUTCMonth()]}function Na(pr){return Hr[pr.getUTCMonth()]}function ii(pr){return gr[+(pr.getUTCHours()>=12)]}function Wr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var $r=vi(pr+="",Gr);return $r.toString=function(){return pr},$r},parse:function(pr){var $r=ya(pr+="",!1);return $r.toString=function(){return pr},$r},utcFormat:function(pr){var $r=vi(pr+="",Qa);return $r.toString=function(){return pr},$r},utcParse:function(pr){var $r=ya(pr+="",!0);return $r.toString=function(){return pr},$r}}}var l={"-":"",_:" ",0:"0"},f=/^\s*\d+/,h=/^%/,v=/[\\^$*+?|[\]().{}]/g;function m(Fe,Ge,bt){var dt=Fe<0?"-":"",gr=(dt?-Fe:Fe)+"",Er=gr.length;return dt+(Er68?1900:2e3),bt+dt[0].length):-1}function O(Fe,Ge,bt){var dt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ge.slice(bt,bt+6));return dt?(Fe.Z=dt[1]?0:-(dt[2]+(dt[3]||"00")),bt+dt[0].length):-1}function H(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+1));return dt?(Fe.q=dt[0]*3-3,bt+dt[0].length):-1}function V(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.m=dt[0]-1,bt+dt[0].length):-1}function W(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.d=+dt[0],bt+dt[0].length):-1}function J(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+3));return dt?(Fe.m=0,Fe.d=+dt[0],bt+dt[0].length):-1}function re(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.H=+dt[0],bt+dt[0].length):-1}function oe(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.M=+dt[0],bt+dt[0].length):-1}function ne(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.S=+dt[0],bt+dt[0].length):-1}function fe(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+3));return dt?(Fe.L=+dt[0],bt+dt[0].length):-1}function ve(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+6));return dt?(Fe.L=Math.floor(dt[0]/1e3),bt+dt[0].length):-1}function ke(Fe,Ge,bt){var dt=h.exec(Ge.slice(bt,bt+1));return dt?bt+dt[0].length:-1}function Ce(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt));return dt?(Fe.Q=+dt[0],bt+dt[0].length):-1}function Te(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt));return dt?(Fe.s=+dt[0],bt+dt[0].length):-1}function pe(Fe,Ge){return m(Fe.getDate(),Ge,2)}function Ae(Fe,Ge){return m(Fe.getHours(),Ge,2)}function Se(Fe,Ge){return m(Fe.getHours()%12||12,Ge,2)}function Le(Fe,Ge){return m(1+t.timeDay.count(t.timeYear(Fe),Fe),Ge,3)}function Ke(Fe,Ge){return m(Fe.getMilliseconds(),Ge,3)}function ht(Fe,Ge){return Ke(Fe,Ge)+"000"}function it(Fe,Ge){return m(Fe.getMonth()+1,Ge,2)}function lt(Fe,Ge){return m(Fe.getMinutes(),Ge,2)}function He(Fe,Ge){return m(Fe.getSeconds(),Ge,2)}function _t(Fe){var Ge=Fe.getDay();return Ge===0?7:Ge}function at(Fe,Ge){return m(t.timeSunday.count(t.timeYear(Fe)-1,Fe),Ge,2)}function At(Fe,Ge){var bt=Fe.getDay();return Fe=bt>=4||bt===0?t.timeThursday(Fe):t.timeThursday.ceil(Fe),m(t.timeThursday.count(t.timeYear(Fe),Fe)+(t.timeYear(Fe).getDay()===4),Ge,2)}function kt(Fe){return Fe.getDay()}function pt(Fe,Ge){return m(t.timeMonday.count(t.timeYear(Fe)-1,Fe),Ge,2)}function ge(Fe,Ge){return m(Fe.getFullYear()%100,Ge,2)}function Re(Fe,Ge){return m(Fe.getFullYear()%1e4,Ge,4)}function xe(Fe){var Ge=Fe.getTimezoneOffset();return(Ge>0?"-":(Ge*=-1,"+"))+m(Ge/60|0,"0",2)+m(Ge%60,"0",2)}function et(Fe,Ge){return m(Fe.getUTCDate(),Ge,2)}function vt(Fe,Ge){return m(Fe.getUTCHours(),Ge,2)}function tt(Fe,Ge){return m(Fe.getUTCHours()%12||12,Ge,2)}function Nt(Fe,Ge){return m(1+t.utcDay.count(t.utcYear(Fe),Fe),Ge,3)}function Mt(Fe,Ge){return m(Fe.getUTCMilliseconds(),Ge,3)}function Ct(Fe,Ge){return Mt(Fe,Ge)+"000"}function Rt(Fe,Ge){return m(Fe.getUTCMonth()+1,Ge,2)}function Ut(Fe,Ge){return m(Fe.getUTCMinutes(),Ge,2)}function xt(Fe,Ge){return m(Fe.getUTCSeconds(),Ge,2)}function Et(Fe){var Ge=Fe.getUTCDay();return Ge===0?7:Ge}function ir(Fe,Ge){return m(t.utcSunday.count(t.utcYear(Fe)-1,Fe),Ge,2)}function Wt(Fe,Ge){var bt=Fe.getUTCDay();return Fe=bt>=4||bt===0?t.utcThursday(Fe):t.utcThursday.ceil(Fe),m(t.utcThursday.count(t.utcYear(Fe),Fe)+(t.utcYear(Fe).getUTCDay()===4),Ge,2)}function Be(Fe){return Fe.getUTCDay()}function ft(Fe,Ge){return m(t.utcMonday.count(t.utcYear(Fe)-1,Fe),Ge,2)}function mt(Fe,Ge){return m(Fe.getUTCFullYear()%100,Ge,2)}function Ar(Fe,Ge){return m(Fe.getUTCFullYear()%1e4,Ge,4)}function dr(){return"+0000"}function Tt(){return"%"}function wt(Fe){return+Fe}function Vt(Fe){return Math.floor(+Fe/1e3)}var Kt;Ht({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 Ht(Fe){return Kt=s(Fe),e.timeFormat=Kt.format,e.timeParse=Kt.parse,e.utcFormat=Kt.utcFormat,e.utcParse=Kt.utcParse,Kt}var Ot="%Y-%m-%dT%H:%M:%S.%LZ";function er(Fe){return Fe.toISOString()}var Mr=Date.prototype.toISOString?er:e.utcFormat(Ot);function xr(Fe){var Ge=new Date(Fe);return isNaN(Ge)?null:Ge}var Pt=+new Date("2000-01-01T00:00:00.000Z")?xr:e.utcParse(Ot);e.isoFormat=Mr,e.isoParse=Pt,e.timeFormatDefaultLocale=Ht,e.timeFormatLocale=s,Object.defineProperty(e,"__esModule",{value:!0})})});var q3=de((Y1,w7)=>{(function(e,t){typeof Y1=="object"&&typeof w7!="undefined"?t(Y1):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(Y1,function(e){"use strict";function t(V){return Math.abs(V=Math.round(V))>=1e21?V.toLocaleString("en").replace(/,/g,""):V.toString(10)}function r(V,W){if((J=(V=W?V.toExponential(W-1):V.toExponential()).indexOf("e"))<0)return null;var J,re=V.slice(0,J);return[re.length>1?re[0]+re.slice(2):re,+V.slice(J+1)]}function i(V){return V=r(Math.abs(V)),V?V[1]:NaN}function a(V,W){return function(J,re){for(var oe=J.length,ne=[],fe=0,ve=V[0],ke=0;oe>0&&ve>0&&(ke+ve+1>re&&(ve=Math.max(1,re-ke)),ne.push(J.substring(oe-=ve,oe+ve)),!((ke+=ve+1)>re));)ve=V[fe=(fe+1)%V.length];return ne.reverse().join(W)}}function s(V){return function(W){return W.replace(/[0-9]/g,function(J){return V[+J]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function f(V){if(!(W=l.exec(V)))throw new Error("invalid format: "+V);var W;return new h({fill:W[1],align:W[2],sign:W[3],symbol:W[4],zero:W[5],width:W[6],comma:W[7],precision:W[8]&&W[8].slice(1),trim:W[9],type:W[10]})}f.prototype=h.prototype;function h(V){this.fill=V.fill===void 0?" ":V.fill+"",this.align=V.align===void 0?">":V.align+"",this.sign=V.sign===void 0?"-":V.sign+"",this.symbol=V.symbol===void 0?"":V.symbol+"",this.zero=!!V.zero,this.width=V.width===void 0?void 0:+V.width,this.comma=!!V.comma,this.precision=V.precision===void 0?void 0:+V.precision,this.trim=!!V.trim,this.type=V.type===void 0?"":V.type+""}h.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 v(V){e:for(var W=V.length,J=1,re=-1,oe;J0&&(re=0);break}return re>0?V.slice(0,re)+V.slice(oe+1):V}var m;function b(V,W){var J=r(V,W);if(!J)return V+"";var re=J[0],oe=J[1],ne=oe-(m=Math.max(-8,Math.min(8,Math.floor(oe/3)))*3)+1,fe=re.length;return ne===fe?re:ne>fe?re+new Array(ne-fe+1).join("0"):ne>0?re.slice(0,ne)+"."+re.slice(ne):"0."+new Array(1-ne).join("0")+r(V,Math.max(0,W+ne-1))[0]}function T(V,W){var J=r(V,W);if(!J)return V+"";var re=J[0],oe=J[1];return oe<0?"0."+new Array(-oe).join("0")+re:re.length>oe+1?re.slice(0,oe+1)+"."+re.slice(oe+1):re+new Array(oe-re.length+2).join("0")}var S={"%":function(V,W){return(V*100).toFixed(W)},b:function(V){return Math.round(V).toString(2)},c:function(V){return V+""},d:t,e:function(V,W){return V.toExponential(W)},f:function(V,W){return V.toFixed(W)},g:function(V,W){return V.toPrecision(W)},o:function(V){return Math.round(V).toString(8)},p:function(V,W){return T(V*100,W)},r:T,s:b,X:function(V){return Math.round(V).toString(16).toUpperCase()},x:function(V){return Math.round(V).toString(16)}};function C(V){return V}var P=Array.prototype.map,E=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function I(V){var W=V.grouping===void 0||V.thousands===void 0?C:a(P.call(V.grouping,Number),V.thousands+""),J=V.currency===void 0?"":V.currency[0]+"",re=V.currency===void 0?"":V.currency[1]+"",oe=V.decimal===void 0?".":V.decimal+"",ne=V.numerals===void 0?C:s(P.call(V.numerals,String)),fe=V.percent===void 0?"%":V.percent+"",ve=V.minus===void 0?"-":V.minus+"",ke=V.nan===void 0?"NaN":V.nan+"";function Ce(pe){pe=f(pe);var Ae=pe.fill,Se=pe.align,Le=pe.sign,Ke=pe.symbol,ht=pe.zero,it=pe.width,lt=pe.comma,He=pe.precision,_t=pe.trim,at=pe.type;at==="n"?(lt=!0,at="g"):S[at]||(He===void 0&&(He=12),_t=!0,at="g"),(ht||Ae==="0"&&Se==="=")&&(ht=!0,Ae="0",Se="=");var At=Ke==="$"?J:Ke==="#"&&/[boxX]/.test(at)?"0"+at.toLowerCase():"",kt=Ke==="$"?re:/[%p]/.test(at)?fe:"",pt=S[at],ge=/[defgprs%]/.test(at);He=He===void 0?6:/[gprs]/.test(at)?Math.max(1,Math.min(21,He)):Math.max(0,Math.min(20,He));function Re(xe){var et=At,vt=kt,tt,Nt,Mt;if(at==="c")vt=pt(xe)+vt,xe="";else{xe=+xe;var Ct=xe<0||1/xe<0;if(xe=isNaN(xe)?ke:pt(Math.abs(xe),He),_t&&(xe=v(xe)),Ct&&+xe==0&&Le!=="+"&&(Ct=!1),et=(Ct?Le==="("?Le:ve:Le==="-"||Le==="("?"":Le)+et,vt=(at==="s"?E[8+m/3]:"")+vt+(Ct&&Le==="("?")":""),ge){for(tt=-1,Nt=xe.length;++ttMt||Mt>57){vt=(Mt===46?oe+xe.slice(tt+1):xe.slice(tt))+vt,xe=xe.slice(0,tt);break}}}lt&&!ht&&(xe=W(xe,1/0));var Rt=et.length+xe.length+vt.length,Ut=Rt>1)+et+xe+vt+Ut.slice(Rt);break;default:xe=Ut+et+xe+vt;break}return ne(xe)}return Re.toString=function(){return pe+""},Re}function Te(pe,Ae){var Se=Ce((pe=f(pe),pe.type="f",pe)),Le=Math.max(-8,Math.min(8,Math.floor(i(Ae)/3)))*3,Ke=Math.pow(10,-Le),ht=E[8+Le/3];return function(it){return Se(Ke*it)+ht}}return{format:Ce,formatPrefix:Te}}var R;N({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function N(V){return R=I(V),e.format=R.format,e.formatPrefix=R.formatPrefix,R}function z(V){return Math.max(0,-i(Math.abs(V)))}function O(V,W){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(i(W)/3)))*3-i(Math.abs(V)))}function H(V,W){return V=Math.abs(V),W=Math.abs(W)-V,Math.max(0,i(W)-i(V))+1}e.FormatSpecifier=h,e.formatDefaultLocale=N,e.formatLocale=I,e.formatSpecifier=f,e.precisionFixed=z,e.precisionPrefix=O,e.precisionRound=H,Object.defineProperty(e,"__esModule",{value:!0})})});var A7=de((wme,T7)=>{"use strict";T7.exports=function(e){for(var t=e.length,r,i=0;i13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Da=de((Tme,M7)=>{"use strict";var aj=A7();M7.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&aj(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Hi=de((Ame,S7)=>{"use strict";S7.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 N3=de((W1,k7)=>{(function(e,t){typeof W1=="object"&&typeof k7!="undefined"?t(W1):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(W1,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),i=0;i>2],m+=t[(f[h]&3)<<4|f[h+1]>>4],m+=t[(f[h+1]&15)<<2|f[h+2]>>6],m+=t[f[h+2]&63];return v%3===2?m=m.substring(0,m.length-1)+"=":v%3===1&&(m=m.substring(0,m.length-2)+"=="),m},s=function(l){var f=l.length*.75,h=l.length,v,m=0,b,T,S,C;l[l.length-1]==="="&&(f--,l[l.length-2]==="="&&f--);var P=new ArrayBuffer(f),E=new Uint8Array(P);for(v=0;v>4,E[m++]=(T&15)<<4|S>>2,E[m++]=(S&3)<<6|C&63;return P};e.decode=s,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})})});var cc=de((Mme,C7)=>{"use strict";C7.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 il=de(Pu=>{"use strict";var ij=N3().decode,nj=cc(),B3=Array.isArray,oj=ArrayBuffer,sj=DataView;function E7(e){return oj.isView(e)&&!(e instanceof sj)}Pu.isTypedArray=E7;function X1(e){return B3(e)||E7(e)}Pu.isArrayOrTypedArray=X1;function lj(e){return!X1(e[0])}Pu.isArray1D=lj;Pu.ensureArray=function(e,t){return B3(e)||(e=[]),e.length=t,e};var fo={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};fo.uint8c=fo.u1c;fo.uint8=fo.u1;fo.int8=fo.i1;fo.uint16=fo.u2;fo.int16=fo.i2;fo.uint32=fo.u4;fo.int32=fo.i4;fo.float32=fo.f4;fo.float64=fo.f8;function O3(e){return e.constructor===ArrayBuffer}Pu.isArrayBuffer=O3;Pu.decodeTypedArraySpec=function(e){var t=[],r=uj(e),i=r.dtype,a=fo[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var s=a.BYTES_PER_ELEMENT,l=r.bdata;O3(l)||(l=ij(l));var f=r.shape===void 0?[l.byteLength/s]:(""+r.shape).split(",");f.reverse();var h=f.length,v,m,b=+f[0],T=s*b,S=0;if(h===1)t=new a(l);else if(h===2)for(v=+f[1],m=0;m{"use strict";var P7=Da(),V3=il().isArrayOrTypedArray;R7.exports=function(t,r){if(P7(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var i=r.split("."),a,s,l,f;for(f=0;f{"use strict";var l0=wy(),dj=/^\w*$/,pj=0,F7=1,j1=2,q7=3,$v=4;N7.exports=function(t,r,i,a){i=i||"name",a=a||"value";var s,l,f,h={};r&&r.length?(f=l0(t,r),l=f.get()):l=t,r=r||"";var v={};if(l)for(s=0;s2)return h[S]=h[S]|j1,b.set(T,null);if(m){for(s=S;s{"use strict";var mj=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,yj=/^[^\.\[\]]+$/;O7.exports=function(e,t){for(;t;){var r=e.match(mj);if(r)e=r[1];else if(e.match(yj))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 J1=de((Lme,V7)=>{"use strict";var gj=Da();V7.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var i=Math.log(Math.min(r[0],r[1]))/Math.LN10;return gj(i)||(i=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),i}});var Z7=de((Pme,G7)=>{"use strict";var H7=il().isArrayOrTypedArray,Ty=cc();G7.exports=function e(t,r){for(var i in r){var a=r[i],s=t[i];if(s!==a)if(i.charAt(0)==="_"||typeof a=="function"){if(i in t)continue;t[i]=a}else if(H7(a)&&H7(s)&&Ty(a[0])){if(i==="customdata"||i==="ids")continue;for(var l=Math.min(a.length,s.length),f=0;f{"use strict";function _j(e,t){var r=e%t;return r<0?r+t:r}function xj(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Y7.exports={mod:_j,modHalf:xj}});var Tf=de((zme,K1)=>{(function(e){var t=/^\s+/,r=/\s+$/,i=0,a=e.round,s=e.min,l=e.max,f=e.random;function h(ge,Re){if(ge=ge||"",Re=Re||{},ge instanceof h)return ge;if(!(this instanceof h))return new h(ge,Re);var xe=v(ge);this._originalInput=ge,this._r=xe.r,this._g=xe.g,this._b=xe.b,this._a=xe.a,this._roundA=a(100*this._a)/100,this._format=Re.format||xe.format,this._gradientType=Re.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=xe.ok,this._tc_id=i++}h.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,xe,et,vt,tt,Nt;return Re=ge.r/255,xe=ge.g/255,et=ge.b/255,Re<=.03928?vt=Re/12.92:vt=e.pow((Re+.055)/1.055,2.4),xe<=.03928?tt=xe/12.92:tt=e.pow((xe+.055)/1.055,2.4),et<=.03928?Nt=et/12.92:Nt=e.pow((et+.055)/1.055,2.4),.2126*vt+.7152*tt+.0722*Nt},setAlpha:function(ge){return this._a=pe(ge),this._roundA=a(100*this._a)/100,this},toHsv:function(){var ge=S(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,v:ge.v,a:this._a}},toHsvString:function(){var ge=S(this._r,this._g,this._b),Re=a(ge.h*360),xe=a(ge.s*100),et=a(ge.v*100);return this._a==1?"hsv("+Re+", "+xe+"%, "+et+"%)":"hsva("+Re+", "+xe+"%, "+et+"%, "+this._roundA+")"},toHsl:function(){var ge=b(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,l:ge.l,a:this._a}},toHslString:function(){var ge=b(this._r,this._g,this._b),Re=a(ge.h*360),xe=a(ge.s*100),et=a(ge.l*100);return this._a==1?"hsl("+Re+", "+xe+"%, "+et+"%)":"hsla("+Re+", "+xe+"%, "+et+"%, "+this._roundA+")"},toHex:function(ge){return P(this._r,this._g,this._b,ge)},toHexString:function(ge){return"#"+this.toHex(ge)},toHex8:function(ge){return E(this._r,this._g,this._b,this._a,ge)},toHex8String:function(ge){return"#"+this.toHex8(ge)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(Ae(this._r,255)*100)+"%",g:a(Ae(this._g,255)*100)+"%",b:a(Ae(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+a(Ae(this._r,255)*100)+"%, "+a(Ae(this._g,255)*100)+"%, "+a(Ae(this._b,255)*100)+"%)":"rgba("+a(Ae(this._r,255)*100)+"%, "+a(Ae(this._g,255)*100)+"%, "+a(Ae(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Ce[P(this._r,this._g,this._b,!0)]||!1},toFilter:function(ge){var Re="#"+I(this._r,this._g,this._b,this._a),xe=Re,et=this._gradientType?"GradientType = 1, ":"";if(ge){var vt=h(ge);xe="#"+I(vt._r,vt._g,vt._b,vt._a)}return"progid:DXImageTransform.Microsoft.gradient("+et+"startColorstr="+Re+",endColorstr="+xe+")"},toString:function(ge){var Re=!!ge;ge=ge||this._format;var xe=!1,et=this._a<1&&this._a>=0,vt=!Re&&et&&(ge==="hex"||ge==="hex6"||ge==="hex3"||ge==="hex4"||ge==="hex8"||ge==="name");return vt?ge==="name"&&this._a===0?this.toName():this.toRgbString():(ge==="rgb"&&(xe=this.toRgbString()),ge==="prgb"&&(xe=this.toPercentageRgbString()),(ge==="hex"||ge==="hex6")&&(xe=this.toHexString()),ge==="hex3"&&(xe=this.toHexString(!0)),ge==="hex4"&&(xe=this.toHex8String(!0)),ge==="hex8"&&(xe=this.toHex8String()),ge==="name"&&(xe=this.toName()),ge==="hsl"&&(xe=this.toHslString()),ge==="hsv"&&(xe=this.toHsvString()),xe||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(ge,Re){var xe=ge.apply(null,[this].concat([].slice.call(Re)));return this._r=xe._r,this._g=xe._g,this._b=xe._b,this.setAlpha(xe._a),this},lighten:function(){return this._applyModification(O,arguments)},brighten:function(){return this._applyModification(H,arguments)},darken:function(){return this._applyModification(V,arguments)},desaturate:function(){return this._applyModification(R,arguments)},saturate:function(){return this._applyModification(N,arguments)},greyscale:function(){return this._applyModification(z,arguments)},spin:function(){return this._applyModification(W,arguments)},_applyCombination:function(ge,Re){return ge.apply(null,[this].concat([].slice.call(Re)))},analogous:function(){return this._applyCombination(fe,arguments)},complement:function(){return this._applyCombination(J,arguments)},monochromatic:function(){return this._applyCombination(ve,arguments)},splitcomplement:function(){return this._applyCombination(ne,arguments)},triad:function(){return this._applyCombination(re,arguments)},tetrad:function(){return this._applyCombination(oe,arguments)}},h.fromRatio=function(ge,Re){if(typeof ge=="object"){var xe={};for(var et in ge)ge.hasOwnProperty(et)&&(et==="a"?xe[et]=ge[et]:xe[et]=lt(ge[et]));ge=xe}return h(ge,Re)};function v(ge){var Re={r:0,g:0,b:0},xe=1,et=null,vt=null,tt=null,Nt=!1,Mt=!1;return typeof ge=="string"&&(ge=kt(ge)),typeof ge=="object"&&(At(ge.r)&&At(ge.g)&&At(ge.b)?(Re=m(ge.r,ge.g,ge.b),Nt=!0,Mt=String(ge.r).substr(-1)==="%"?"prgb":"rgb"):At(ge.h)&&At(ge.s)&&At(ge.v)?(et=lt(ge.s),vt=lt(ge.v),Re=C(ge.h,et,vt),Nt=!0,Mt="hsv"):At(ge.h)&&At(ge.s)&&At(ge.l)&&(et=lt(ge.s),tt=lt(ge.l),Re=T(ge.h,et,tt),Nt=!0,Mt="hsl"),ge.hasOwnProperty("a")&&(xe=ge.a)),xe=pe(xe),{ok:Nt,format:ge.format||Mt,r:s(255,l(Re.r,0)),g:s(255,l(Re.g,0)),b:s(255,l(Re.b,0)),a:xe}}function m(ge,Re,xe){return{r:Ae(ge,255)*255,g:Ae(Re,255)*255,b:Ae(xe,255)*255}}function b(ge,Re,xe){ge=Ae(ge,255),Re=Ae(Re,255),xe=Ae(xe,255);var et=l(ge,Re,xe),vt=s(ge,Re,xe),tt,Nt,Mt=(et+vt)/2;if(et==vt)tt=Nt=0;else{var Ct=et-vt;switch(Nt=Mt>.5?Ct/(2-et-vt):Ct/(et+vt),et){case ge:tt=(Re-xe)/Ct+(Re1&&(xt-=1),xt<1/6?Rt+(Ut-Rt)*6*xt:xt<1/2?Ut:xt<2/3?Rt+(Ut-Rt)*(2/3-xt)*6:Rt}if(Re===0)et=vt=tt=xe;else{var Mt=xe<.5?xe*(1+Re):xe+Re-xe*Re,Ct=2*xe-Mt;et=Nt(Ct,Mt,ge+1/3),vt=Nt(Ct,Mt,ge),tt=Nt(Ct,Mt,ge-1/3)}return{r:et*255,g:vt*255,b:tt*255}}function S(ge,Re,xe){ge=Ae(ge,255),Re=Ae(Re,255),xe=Ae(xe,255);var et=l(ge,Re,xe),vt=s(ge,Re,xe),tt,Nt,Mt=et,Ct=et-vt;if(Nt=et===0?0:Ct/et,et==vt)tt=0;else{switch(et){case ge:tt=(Re-xe)/Ct+(Re>1)+720)%360;--Re;)et.h=(et.h+vt)%360,tt.push(h(et));return tt}function ve(ge,Re){Re=Re||6;for(var xe=h(ge).toHsv(),et=xe.h,vt=xe.s,tt=xe.v,Nt=[],Mt=1/Re;Re--;)Nt.push(h({h:et,s:vt,v:tt})),tt=(tt+Mt)%1;return Nt}h.mix=function(ge,Re,xe){xe=xe===0?0:xe||50;var et=h(ge).toRgb(),vt=h(Re).toRgb(),tt=xe/100,Nt={r:(vt.r-et.r)*tt+et.r,g:(vt.g-et.g)*tt+et.g,b:(vt.b-et.b)*tt+et.b,a:(vt.a-et.a)*tt+et.a};return h(Nt)},h.readability=function(ge,Re){var xe=h(ge),et=h(Re);return(e.max(xe.getLuminance(),et.getLuminance())+.05)/(e.min(xe.getLuminance(),et.getLuminance())+.05)},h.isReadable=function(ge,Re,xe){var et=h.readability(ge,Re),vt,tt;switch(tt=!1,vt=pt(xe),vt.level+vt.size){case"AAsmall":case"AAAlarge":tt=et>=4.5;break;case"AAlarge":tt=et>=3;break;case"AAAsmall":tt=et>=7;break}return tt},h.mostReadable=function(ge,Re,xe){var et=null,vt=0,tt,Nt,Mt,Ct;xe=xe||{},Nt=xe.includeFallbackColors,Mt=xe.level,Ct=xe.size;for(var Rt=0;Rtvt&&(vt=tt,et=h(Re[Rt]));return h.isReadable(ge,et,{level:Mt,size:Ct})||!Nt?et:(xe.includeFallbackColors=!1,h.mostReadable(ge,["#fff","#000"],xe))};var ke=h.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"},Ce=h.hexNames=Te(ke);function Te(ge){var Re={};for(var xe in ge)ge.hasOwnProperty(xe)&&(Re[ge[xe]]=xe);return Re}function pe(ge){return ge=parseFloat(ge),(isNaN(ge)||ge<0||ge>1)&&(ge=1),ge}function Ae(ge,Re){Ke(ge)&&(ge="100%");var xe=ht(ge);return ge=s(Re,l(0,parseFloat(ge))),xe&&(ge=parseInt(ge*Re,10)/100),e.abs(ge-Re)<1e-6?1:ge%Re/parseFloat(Re)}function Se(ge){return s(1,l(0,ge))}function Le(ge){return parseInt(ge,16)}function Ke(ge){return typeof ge=="string"&&ge.indexOf(".")!=-1&&parseFloat(ge)===1}function ht(ge){return typeof ge=="string"&&ge.indexOf("%")!=-1}function it(ge){return ge.length==1?"0"+ge:""+ge}function lt(ge){return ge<=1&&(ge=ge*100+"%"),ge}function He(ge){return e.round(parseFloat(ge)*255).toString(16)}function _t(ge){return Le(ge)/255}var at=function(){var ge="[-\\+]?\\d+%?",Re="[-\\+]?\\d*\\.\\d+%?",xe="(?:"+Re+")|(?:"+ge+")",et="[\\s|\\(]+("+xe+")[,|\\s]+("+xe+")[,|\\s]+("+xe+")\\s*\\)?",vt="[\\s|\\(]+("+xe+")[,|\\s]+("+xe+")[,|\\s]+("+xe+")[,|\\s]+("+xe+")\\s*\\)?";return{CSS_UNIT:new RegExp(xe),rgb:new RegExp("rgb"+et),rgba:new RegExp("rgba"+vt),hsl:new RegExp("hsl"+et),hsla:new RegExp("hsla"+vt),hsv:new RegExp("hsv"+et),hsva:new RegExp("hsva"+vt),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 At(ge){return!!at.CSS_UNIT.exec(ge)}function kt(ge){ge=ge.replace(t,"").replace(r,"").toLowerCase();var Re=!1;if(ke[ge])ge=ke[ge],Re=!0;else if(ge=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var xe;return(xe=at.rgb.exec(ge))?{r:xe[1],g:xe[2],b:xe[3]}:(xe=at.rgba.exec(ge))?{r:xe[1],g:xe[2],b:xe[3],a:xe[4]}:(xe=at.hsl.exec(ge))?{h:xe[1],s:xe[2],l:xe[3]}:(xe=at.hsla.exec(ge))?{h:xe[1],s:xe[2],l:xe[3],a:xe[4]}:(xe=at.hsv.exec(ge))?{h:xe[1],s:xe[2],v:xe[3]}:(xe=at.hsva.exec(ge))?{h:xe[1],s:xe[2],v:xe[3],a:xe[4]}:(xe=at.hex8.exec(ge))?{r:Le(xe[1]),g:Le(xe[2]),b:Le(xe[3]),a:_t(xe[4]),format:Re?"name":"hex8"}:(xe=at.hex6.exec(ge))?{r:Le(xe[1]),g:Le(xe[2]),b:Le(xe[3]),format:Re?"name":"hex"}:(xe=at.hex4.exec(ge))?{r:Le(xe[1]+""+xe[1]),g:Le(xe[2]+""+xe[2]),b:Le(xe[3]+""+xe[3]),a:_t(xe[4]+""+xe[4]),format:Re?"name":"hex8"}:(xe=at.hex3.exec(ge))?{r:Le(xe[1]+""+xe[1]),g:Le(xe[2]+""+xe[2]),b:Le(xe[3]+""+xe[3]),format:Re?"name":"hex"}:!1}function pt(ge){var Re,xe;return ge=ge||{level:"AA",size:"small"},Re=(ge.level||"AA").toUpperCase(),xe=(ge.size||"small").toLowerCase(),Re!=="AA"&&Re!=="AAA"&&(Re="AA"),xe!=="small"&&xe!=="large"&&(xe="small"),{level:Re,size:xe}}typeof K1!="undefined"&&K1.exports?K1.exports=h:typeof define=="function"&&define.amd?define(function(){return h}):window.tinycolor=h})(Math)});var hn=de(Sy=>{"use strict";var W7=cc(),Ay=Array.isArray;function bj(e,t){var r,i;for(r=0;r{"use strict";X7.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;i===void 0&&(i=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var s={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:a,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&&(s.size.dflt="auto"),e.autoColor&&(s.color.dflt="auto"),e.arrayOk&&(s.family.arrayOk=!0,s.weight.arrayOk=!0,s.style.arrayOk=!0,e.noFontVariant||(s.variant.arrayOk=!0),e.noFontTextcase||(s.textcase.arrayOk=!0),e.noFontLineposition||(s.lineposition.arrayOk=!0),e.noFontShadow||(s.shadow.arrayOk=!0),s.size.arrayOk=!0,s.color.arrayOk=!0),s}});var ky=de((Fme,j7)=>{"use strict";j7.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var f0=de((qme,Q7)=>{"use strict";var J7=ky(),K7=qo(),H3=K7({editType:"none"});H3.family.dflt=J7.HOVERFONT;H3.size.dflt=J7.HOVERFONTSIZE;Q7.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:H3,grouptitlefont:K7({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var e_=de((Nme,$7)=>{"use strict";var wj=qo(),Q1=f0().hoverlabel,$1=hn().extendFlat;$7.exports={hoverlabel:{bgcolor:$1({},Q1.bgcolor,{arrayOk:!0}),bordercolor:$1({},Q1.bordercolor,{arrayOk:!0}),font:wj({arrayOk:!0,editType:"none"}),align:$1({},Q1.align,{arrayOk:!0}),namelength:$1({},Q1.namelength,{arrayOk:!0}),editType:"none"}}});var ms=de((Bme,e8)=>{"use strict";var Tj=qo(),Aj=e_();e8.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:Tj({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:Aj.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 ed=de((Ome,a8)=>{"use strict";var Mj=Tf(),t_={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)"]]},t8=t_.RdBu;function Sj(e,t){if(t||(t=t8),!e)return t;function r(){try{e=t_[e]||JSON.parse(e)}catch(i){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),r8(e)?e:t}function r8(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";td.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];td.defaultLine="#444";td.lightLine="#eee";td.background="#fff";td.borderLine="#BEC8D9";td.lightFraction=100*10/11});var Ua=de((Vme,i8)=>{"use strict";var Rs=Tf(),Cj=Da(),Ej=il().isTypedArray,Qn=i8.exports={},r_=Af();Qn.defaults=r_.defaults;var Lj=Qn.defaultLine=r_.defaultLine;Qn.lightLine=r_.lightLine;var Z3=Qn.background=r_.background;Qn.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};Qn.rgb=function(e){return Qn.tinyRGB(Rs(e))};Qn.opacity=function(e){return e?Rs(e).getAlpha():0};Qn.addOpacity=function(e,t){var r=Rs(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};Qn.combine=function(e,t){var r=Rs(e).toRgb();if(r.a===1)return Rs(e).toRgbString();var i=Rs(t||Z3).toRgb(),a=i.a===1?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},s={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return Rs(s).toRgbString()};Qn.interpolate=function(e,t,r){var i=Rs(e).toRgb(),a=Rs(t).toRgb(),s={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return Rs(s).toRgbString()};Qn.contrast=function(e,t,r){var i=Rs(e);i.getAlpha()!==1&&(i=Rs(Qn.combine(e,Z3)));var a=i.isDark()?t?i.lighten(t):Z3:r?i.darken(r):Lj;return a.toString()};Qn.stroke=function(e,t){var r=Rs(t);e.style({stroke:Qn.tinyRGB(r),"stroke-opacity":r.getAlpha()})};Qn.fill=function(e,t){var r=Rs(t);e.style({fill:Qn.tinyRGB(r),"fill-opacity":r.getAlpha()})};Qn.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,i,a,s;for(r=0;r=0)))return e;if(s===3)i[s]>1&&(i[s]=1);else if(i[s]>=1)return e}var l=Math.round(i[0]*255)+", "+Math.round(i[1]*255)+", "+Math.round(i[2]*255);return a?"rgba("+l+", "+i[3]+")":"rgb("+l+")"}});var a_=de((Hme,n8)=>{"use strict";n8.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var c0=de(o8=>{"use strict";o8.counter=function(e,t,r,i){var a=(t||"")+(r?"":"$"),s=i===!1?"":"^";return e==="xy"?new RegExp(s+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(s+e+"([2-9]|[1-9][0-9]+)?"+a)}});var f8=de(Fs=>{"use strict";var Y3=Da(),s8=Tf(),l8=hn().extendFlat,Pj=ms(),Dj=ed(),zj=Ua(),Ij=a_().DESELECTDIM,h0=wy(),u8=c0().counter,Rj=u0().modHalf,Mf=il().isArrayOrTypedArray,bh=il().isTypedArraySpec,wh=il().decodeTypedArraySpec;Fs.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Mf(e)?e:bh(e)?wh(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e=+e),i.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,i=0;ii.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}bh(e)&&(e=wh(e)),e%1||!Y3(e)||i.min!==void 0&&ei.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,i){if(typeof e!="string"){var a=typeof e=="number";i.strict===!0||!a?t.set(r):t.set(String(e))}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){bh(e)&&(e=wh(e)),s8(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function i(a){return s8(a).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(i)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(Dj.get(e,r))}},angle:{coerceFunction:function(e,t,r){bh(e)&&(e=wh(e)),e==="auto"?t.set("auto"):Y3(e)?t.set(Rj(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,i){var a=i.regex||u8(r);if(typeof e=="string"&&a.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!u8(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),s=0;s{"use strict";var c8={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/"},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:{}}},h8={};function v8(e,t){for(var r in e){var i=e[r];i.valType?t[r]=i.dflt:(t[r]||(t[r]={}),v8(i,t[r]))}}v8(c8,h8);d8.exports={configAttributes:c8,dfltConfig:h8}});var X3=de((Wme,p8)=>{"use strict";var W3=ja(),Fj=Da(),Cy=[];p8.exports=function(e,t){if(Cy.indexOf(e)!==-1)return;Cy.push(e);var r=1e3;Fj(t)?r=t:t==="long"&&(r=3e3);var i=W3.select("body").selectAll(".plotly-notifier").data([0]);i.enter().append("div").classed("plotly-notifier",!0);var a=i.selectAll(".notifier-note").data(Cy);function s(l){l.duration(700).style("opacity",0).each("end",function(f){var h=Cy.indexOf(f);h!==-1&&Cy.splice(h,1),W3.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var f=W3.select(this);f.append("button").classed("notifier-close",!0).html("×").on("click",function(){f.transition().call(s)});for(var h=f.append("p"),v=l.split(//g),m=0;m{"use strict";var v0=rd().dfltConfig,j3=X3(),J3=m8.exports={};J3.log=function(){var e;if(v0.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};J3.warn=function(){var e;if(v0.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};J3.error=function(){var e;if(v0.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var n_=de((jme,y8)=>{"use strict";y8.exports=function(){}});var K3=de((Jme,g8)=>{"use strict";g8.exports=function(t,r){if(r instanceof RegExp){for(var i=r.toString(),a=0;a{_8.exports=qj;function qj(){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 w8=de((Qme,b8)=>{b8.exports=Nj;function Nj(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 A8=de(($me,T8)=>{T8.exports=Bj;function Bj(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 Q3=de((eye,M8)=>{M8.exports=Oj;function Oj(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 k8=de((tye,S8)=>{S8.exports=Uj;function Uj(e,t){if(e===t){var r=t[1],i=t[2],a=t[3],s=t[6],l=t[7],f=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=s,e[11]=t[14],e[12]=a,e[13]=l,e[14]=f}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 E8=de((rye,C8)=>{C8.exports=Vj;function Vj(e,t){var r=t[0],i=t[1],a=t[2],s=t[3],l=t[4],f=t[5],h=t[6],v=t[7],m=t[8],b=t[9],T=t[10],S=t[11],C=t[12],P=t[13],E=t[14],I=t[15],R=r*f-i*l,N=r*h-a*l,z=r*v-s*l,O=i*h-a*f,H=i*v-s*f,V=a*v-s*h,W=m*P-b*C,J=m*E-T*C,re=m*I-S*C,oe=b*E-T*P,ne=b*I-S*P,fe=T*I-S*E,ve=R*fe-N*ne+z*oe+O*re-H*J+V*W;return ve?(ve=1/ve,e[0]=(f*fe-h*ne+v*oe)*ve,e[1]=(a*ne-i*fe-s*oe)*ve,e[2]=(P*V-E*H+I*O)*ve,e[3]=(T*H-b*V-S*O)*ve,e[4]=(h*re-l*fe-v*J)*ve,e[5]=(r*fe-a*re+s*J)*ve,e[6]=(E*z-C*V-I*N)*ve,e[7]=(m*V-T*z+S*N)*ve,e[8]=(l*ne-f*re+v*W)*ve,e[9]=(i*re-r*ne-s*W)*ve,e[10]=(C*H-P*z+I*R)*ve,e[11]=(b*z-m*H-S*R)*ve,e[12]=(f*J-l*oe-h*W)*ve,e[13]=(r*oe-i*J+a*W)*ve,e[14]=(P*N-C*O-E*R)*ve,e[15]=(m*O-b*N+T*R)*ve,e):null}});var P8=de((aye,L8)=>{L8.exports=Hj;function Hj(e,t){var r=t[0],i=t[1],a=t[2],s=t[3],l=t[4],f=t[5],h=t[6],v=t[7],m=t[8],b=t[9],T=t[10],S=t[11],C=t[12],P=t[13],E=t[14],I=t[15];return e[0]=f*(T*I-S*E)-b*(h*I-v*E)+P*(h*S-v*T),e[1]=-(i*(T*I-S*E)-b*(a*I-s*E)+P*(a*S-s*T)),e[2]=i*(h*I-v*E)-f*(a*I-s*E)+P*(a*v-s*h),e[3]=-(i*(h*S-v*T)-f*(a*S-s*T)+b*(a*v-s*h)),e[4]=-(l*(T*I-S*E)-m*(h*I-v*E)+C*(h*S-v*T)),e[5]=r*(T*I-S*E)-m*(a*I-s*E)+C*(a*S-s*T),e[6]=-(r*(h*I-v*E)-l*(a*I-s*E)+C*(a*v-s*h)),e[7]=r*(h*S-v*T)-l*(a*S-s*T)+m*(a*v-s*h),e[8]=l*(b*I-S*P)-m*(f*I-v*P)+C*(f*S-v*b),e[9]=-(r*(b*I-S*P)-m*(i*I-s*P)+C*(i*S-s*b)),e[10]=r*(f*I-v*P)-l*(i*I-s*P)+C*(i*v-s*f),e[11]=-(r*(f*S-v*b)-l*(i*S-s*b)+m*(i*v-s*f)),e[12]=-(l*(b*E-T*P)-m*(f*E-h*P)+C*(f*T-h*b)),e[13]=r*(b*E-T*P)-m*(i*E-a*P)+C*(i*T-a*b),e[14]=-(r*(f*E-h*P)-l*(i*E-a*P)+C*(i*h-a*f)),e[15]=r*(f*T-h*b)-l*(i*T-a*b)+m*(i*h-a*f),e}});var z8=de((iye,D8)=>{D8.exports=Gj;function Gj(e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],l=e[5],f=e[6],h=e[7],v=e[8],m=e[9],b=e[10],T=e[11],S=e[12],C=e[13],P=e[14],E=e[15],I=t*l-r*s,R=t*f-i*s,N=t*h-a*s,z=r*f-i*l,O=r*h-a*l,H=i*h-a*f,V=v*C-m*S,W=v*P-b*S,J=v*E-T*S,re=m*P-b*C,oe=m*E-T*C,ne=b*E-T*P;return I*ne-R*oe+N*re+z*J-O*W+H*V}});var R8=de((nye,I8)=>{I8.exports=Zj;function Zj(e,t,r){var i=t[0],a=t[1],s=t[2],l=t[3],f=t[4],h=t[5],v=t[6],m=t[7],b=t[8],T=t[9],S=t[10],C=t[11],P=t[12],E=t[13],I=t[14],R=t[15],N=r[0],z=r[1],O=r[2],H=r[3];return e[0]=N*i+z*f+O*b+H*P,e[1]=N*a+z*h+O*T+H*E,e[2]=N*s+z*v+O*S+H*I,e[3]=N*l+z*m+O*C+H*R,N=r[4],z=r[5],O=r[6],H=r[7],e[4]=N*i+z*f+O*b+H*P,e[5]=N*a+z*h+O*T+H*E,e[6]=N*s+z*v+O*S+H*I,e[7]=N*l+z*m+O*C+H*R,N=r[8],z=r[9],O=r[10],H=r[11],e[8]=N*i+z*f+O*b+H*P,e[9]=N*a+z*h+O*T+H*E,e[10]=N*s+z*v+O*S+H*I,e[11]=N*l+z*m+O*C+H*R,N=r[12],z=r[13],O=r[14],H=r[15],e[12]=N*i+z*f+O*b+H*P,e[13]=N*a+z*h+O*T+H*E,e[14]=N*s+z*v+O*S+H*I,e[15]=N*l+z*m+O*C+H*R,e}});var q8=de((oye,F8)=>{F8.exports=Yj;function Yj(e,t,r){var i=r[0],a=r[1],s=r[2],l,f,h,v,m,b,T,S,C,P,E,I;return t===e?(e[12]=t[0]*i+t[4]*a+t[8]*s+t[12],e[13]=t[1]*i+t[5]*a+t[9]*s+t[13],e[14]=t[2]*i+t[6]*a+t[10]*s+t[14],e[15]=t[3]*i+t[7]*a+t[11]*s+t[15]):(l=t[0],f=t[1],h=t[2],v=t[3],m=t[4],b=t[5],T=t[6],S=t[7],C=t[8],P=t[9],E=t[10],I=t[11],e[0]=l,e[1]=f,e[2]=h,e[3]=v,e[4]=m,e[5]=b,e[6]=T,e[7]=S,e[8]=C,e[9]=P,e[10]=E,e[11]=I,e[12]=l*i+m*a+C*s+t[12],e[13]=f*i+b*a+P*s+t[13],e[14]=h*i+T*a+E*s+t[14],e[15]=v*i+S*a+I*s+t[15]),e}});var B8=de((sye,N8)=>{N8.exports=Wj;function Wj(e,t,r){var i=r[0],a=r[1],s=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var U8=de((lye,O8)=>{O8.exports=Xj;function Xj(e,t,r,i){var a=i[0],s=i[1],l=i[2],f=Math.sqrt(a*a+s*s+l*l),h,v,m,b,T,S,C,P,E,I,R,N,z,O,H,V,W,J,re,oe,ne,fe,ve,ke;return Math.abs(f)<1e-6?null:(f=1/f,a*=f,s*=f,l*=f,h=Math.sin(r),v=Math.cos(r),m=1-v,b=t[0],T=t[1],S=t[2],C=t[3],P=t[4],E=t[5],I=t[6],R=t[7],N=t[8],z=t[9],O=t[10],H=t[11],V=a*a*m+v,W=s*a*m+l*h,J=l*a*m-s*h,re=a*s*m-l*h,oe=s*s*m+v,ne=l*s*m+a*h,fe=a*l*m+s*h,ve=s*l*m-a*h,ke=l*l*m+v,e[0]=b*V+P*W+N*J,e[1]=T*V+E*W+z*J,e[2]=S*V+I*W+O*J,e[3]=C*V+R*W+H*J,e[4]=b*re+P*oe+N*ne,e[5]=T*re+E*oe+z*ne,e[6]=S*re+I*oe+O*ne,e[7]=C*re+R*oe+H*ne,e[8]=b*fe+P*ve+N*ke,e[9]=T*fe+E*ve+z*ke,e[10]=S*fe+I*ve+O*ke,e[11]=C*fe+R*ve+H*ke,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var H8=de((uye,V8)=>{V8.exports=jj;function jj(e,t,r){var i=Math.sin(r),a=Math.cos(r),s=t[4],l=t[5],f=t[6],h=t[7],v=t[8],m=t[9],b=t[10],T=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]=s*a+v*i,e[5]=l*a+m*i,e[6]=f*a+b*i,e[7]=h*a+T*i,e[8]=v*a-s*i,e[9]=m*a-l*i,e[10]=b*a-f*i,e[11]=T*a-h*i,e}});var Z8=de((fye,G8)=>{G8.exports=Jj;function Jj(e,t,r){var i=Math.sin(r),a=Math.cos(r),s=t[0],l=t[1],f=t[2],h=t[3],v=t[8],m=t[9],b=t[10],T=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]=s*a-v*i,e[1]=l*a-m*i,e[2]=f*a-b*i,e[3]=h*a-T*i,e[8]=s*i+v*a,e[9]=l*i+m*a,e[10]=f*i+b*a,e[11]=h*i+T*a,e}});var W8=de((cye,Y8)=>{Y8.exports=Kj;function Kj(e,t,r){var i=Math.sin(r),a=Math.cos(r),s=t[0],l=t[1],f=t[2],h=t[3],v=t[4],m=t[5],b=t[6],T=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]=s*a+v*i,e[1]=l*a+m*i,e[2]=f*a+b*i,e[3]=h*a+T*i,e[4]=v*a-s*i,e[5]=m*a-l*i,e[6]=b*a-f*i,e[7]=T*a-h*i,e}});var j8=de((hye,X8)=>{X8.exports=Qj;function Qj(e,t,r){var i,a,s,l=r[0],f=r[1],h=r[2],v=Math.sqrt(l*l+f*f+h*h);return Math.abs(v)<1e-6?null:(v=1/v,l*=v,f*=v,h*=v,i=Math.sin(t),a=Math.cos(t),s=1-a,e[0]=l*l*s+a,e[1]=f*l*s+h*i,e[2]=h*l*s-f*i,e[3]=0,e[4]=l*f*s-h*i,e[5]=f*f*s+a,e[6]=h*f*s+l*i,e[7]=0,e[8]=l*h*s+f*i,e[9]=f*h*s-l*i,e[10]=h*h*s+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var K8=de((vye,J8)=>{J8.exports=$j;function $j(e,t,r){var i=t[0],a=t[1],s=t[2],l=t[3],f=i+i,h=a+a,v=s+s,m=i*f,b=i*h,T=i*v,S=a*h,C=a*v,P=s*v,E=l*f,I=l*h,R=l*v;return e[0]=1-(S+P),e[1]=b+R,e[2]=T-I,e[3]=0,e[4]=b-R,e[5]=1-(m+P),e[6]=C+E,e[7]=0,e[8]=T+I,e[9]=C-E,e[10]=1-(m+S),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var $8=de((dye,Q8)=>{Q8.exports=eJ;function eJ(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 tS=de((pye,eS)=>{eS.exports=tJ;function tJ(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 aS=de((mye,rS)=>{rS.exports=rJ;function rJ(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var nS=de((yye,iS)=>{iS.exports=aJ;function aJ(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var sS=de((gye,oS)=>{oS.exports=iJ;function iJ(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var $3=de((_ye,lS)=>{lS.exports=nJ;function nJ(e,t){var r=t[0],i=t[1],a=t[2],s=t[3],l=r+r,f=i+i,h=a+a,v=r*l,m=i*l,b=i*f,T=a*l,S=a*f,C=a*h,P=s*l,E=s*f,I=s*h;return e[0]=1-b-C,e[1]=m+I,e[2]=T-E,e[3]=0,e[4]=m-I,e[5]=1-v-C,e[6]=S+P,e[7]=0,e[8]=T+E,e[9]=S-P,e[10]=1-v-b,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fS=de((xye,uS)=>{uS.exports=oJ;function oJ(e,t,r,i,a,s,l){var f=1/(r-t),h=1/(a-i),v=1/(s-l);return e[0]=s*2*f,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s*2*h,e[6]=0,e[7]=0,e[8]=(r+t)*f,e[9]=(a+i)*h,e[10]=(l+s)*v,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*s*2*v,e[15]=0,e}});var hS=de((bye,cS)=>{cS.exports=sJ;function sJ(e,t,r,i,a){var s=1/Math.tan(t/2),l=1/(i-a);return e[0]=s/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+i)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*i*l,e[15]=0,e}});var dS=de((wye,vS)=>{vS.exports=lJ;function lJ(e,t,r,i){var a=Math.tan(t.upDegrees*Math.PI/180),s=Math.tan(t.downDegrees*Math.PI/180),l=Math.tan(t.leftDegrees*Math.PI/180),f=Math.tan(t.rightDegrees*Math.PI/180),h=2/(l+f),v=2/(a+s);return e[0]=h,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=v,e[6]=0,e[7]=0,e[8]=-((l-f)*h*.5),e[9]=(a-s)*v*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}});var mS=de((Tye,pS)=>{pS.exports=uJ;function uJ(e,t,r,i,a,s,l){var f=1/(t-r),h=1/(i-a),v=1/(s-l);return e[0]=-2*f,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*h,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*v,e[11]=0,e[12]=(t+r)*f,e[13]=(a+i)*h,e[14]=(l+s)*v,e[15]=1,e}});var gS=de((Aye,yS)=>{var fJ=Q3();yS.exports=cJ;function cJ(e,t,r,i){var a,s,l,f,h,v,m,b,T,S,C=t[0],P=t[1],E=t[2],I=i[0],R=i[1],N=i[2],z=r[0],O=r[1],H=r[2];return Math.abs(C-z)<1e-6&&Math.abs(P-O)<1e-6&&Math.abs(E-H)<1e-6?fJ(e):(m=C-z,b=P-O,T=E-H,S=1/Math.sqrt(m*m+b*b+T*T),m*=S,b*=S,T*=S,a=R*T-N*b,s=N*m-I*T,l=I*b-R*m,S=Math.sqrt(a*a+s*s+l*l),S?(S=1/S,a*=S,s*=S,l*=S):(a=0,s=0,l=0),f=b*l-T*s,h=T*a-m*l,v=m*s-b*a,S=Math.sqrt(f*f+h*h+v*v),S?(S=1/S,f*=S,h*=S,v*=S):(f=0,h=0,v=0),e[0]=a,e[1]=f,e[2]=m,e[3]=0,e[4]=s,e[5]=h,e[6]=b,e[7]=0,e[8]=l,e[9]=v,e[10]=T,e[11]=0,e[12]=-(a*C+s*P+l*E),e[13]=-(f*C+h*P+v*E),e[14]=-(m*C+b*P+T*E),e[15]=1,e)}});var xS=de((Mye,_S)=>{_S.exports=hJ;function hJ(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 ew=de((Sye,bS)=>{bS.exports={create:x8(),clone:w8(),copy:A8(),identity:Q3(),transpose:k8(),invert:E8(),adjoint:P8(),determinant:z8(),multiply:R8(),translate:q8(),scale:B8(),rotate:U8(),rotateX:H8(),rotateY:Z8(),rotateZ:W8(),fromRotation:j8(),fromRotationTranslation:K8(),fromScaling:$8(),fromTranslation:tS(),fromXRotation:aS(),fromYRotation:nS(),fromZRotation:sS(),fromQuat:$3(),frustum:fS(),perspective:hS(),perspectiveFromFieldOfView:dS(),ortho:mS(),lookAt:gS(),str:xS()}});var o_=de(Sn=>{"use strict";var vJ=ew();Sn.init2dArray=function(e,t){for(var r=new Array(e),i=0;i{"use strict";var dJ=ja(),wS=Th(),pJ=o_(),mJ=ew();function yJ(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 gJ(e){var t=dJ.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function TS(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function _J(e,t){AS("global",e,t)}function AS(e,t,r){var i="plotly.js-style-"+e,a=document.getElementById(i);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",i),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var s=a.sheet;s?s.insertRule?s.insertRule(t+"{"+r+"}",0):s.addRule?s.addRule(t,r,0):wS.warn("addStyleRule failed"):wS.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function xJ(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&TS(r)}function bJ(e,t,r,i,a){var s=i.split(":"),l=a.split(":"),f="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(h){h.getAttribute(f)||(h.addEventListener("mouseenter",function(){var v=this.querySelector(r);v&&(v.style[s[0]]=s[1])}),h.addEventListener("mouseleave",function(){var v=this.querySelector(r);v&&(t&&this.matches(t)?v.style[s[0]]=s[1]:v.style[l[0]]=l[1])}),h.setAttribute(f,!0))})}function wJ(e){var t=SS(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(i){var a=MS(i);if(a){var s=pJ.convertCssMatrix(a);r=mJ.multiply(r,r,s)}}),r}function MS(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(i){return+i})}function SS(e){for(var t=[];TJ(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function TJ(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function AJ(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}kS.exports={getGraphDiv:yJ,isPlotDiv:gJ,removeElement:TS,addStyleRule:_J,addRelatedStyleRule:AS,deleteRelatedStyleRule:xJ,setStyleOnHover:bJ,getFullTransformMatrix:wJ,getElementTransformMatrix:MS,getElementAndAncestors:SS,equalDomRects:AJ}});var Ly=de((Eye,CS)=>{"use strict";CS.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 nl=de((Lye,RS)=>{"use strict";var LS=hn().extendFlat,MJ=cc(),PS={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},DS={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},SJ=PS.flags.slice().concat(["fullReplot"]),kJ=DS.flags.slice().concat("layoutReplot");RS.exports={traces:PS,layout:DS,traceFlags:function(){return ES(SJ)},layoutFlags:function(){return ES(kJ)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var i=r.split("+"),a=0;a{"use strict";tw.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};tw.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 rw=de((Dye,FS)=>{"use strict";FS.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 Hl=de(s_=>{"use strict";var qS=rw(),zye=qS.FORMAT_LINK,Iye=qS.DATE_FORMAT_LINK;function aw(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var i=[],a=0;a{"use strict";function Ah(e,t){return t?t.d2l(e):e}function NS(e,t){return t?t.l2d(e):e}function CJ(e){return e.x0}function EJ(e){return e.x1}function LJ(e){return e.y0}function PJ(e){return e.y1}function BS(e){return e.x0shift||0}function OS(e){return e.x1shift||0}function US(e){return e.y0shift||0}function VS(e){return e.y1shift||0}function l_(e,t){return Ah(e.x1,t)+OS(e)-Ah(e.x0,t)-BS(e)}function u_(e,t,r){return Ah(e.y1,r)+VS(e)-Ah(e.y0,r)-US(e)}function DJ(e,t){return Math.abs(l_(e,t))}function zJ(e,t,r){return Math.abs(u_(e,t,r))}function IJ(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(l_(e,t),2)+Math.pow(u_(e,t,r),2))}function RJ(e,t){return NS((Ah(e.x1,t)+OS(e)+Ah(e.x0,t)+BS(e))/2,t)}function FJ(e,t,r){return NS((Ah(e.y1,r)+VS(e)+Ah(e.y0,r)+US(e))/2,r)}function qJ(e,t,r){return e.type!=="line"?void 0:u_(e,t,r)/l_(e,t)}HS.exports={x0:CJ,x1:EJ,y0:LJ,y1:PJ,slope:qJ,dx:l_,dy:u_,width:DJ,height:zJ,length:IJ,xcenter:RJ,ycenter:FJ}});var YS=de((qye,ZS)=>{"use strict";var NJ=nl().overrideAll,ad=ms(),GS=qo(),BJ=hc().dash,Mh=hn().extendFlat,OJ=Hl().shapeTexttemplateAttrs,UJ=f_();ZS.exports=NJ({newshape:{visible:Mh({},ad.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Mh({},ad.legend,{}),legendgroup:Mh({},ad.legendgroup,{}),legendgrouptitle:{text:Mh({},ad.legendgrouptitle.text,{}),font:GS({})},legendrank:Mh({},ad.legendrank,{}),legendwidth:Mh({},ad.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Mh({},BJ,{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:Mh({},ad.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:OJ({newshape:!0},{keys:Object.keys(UJ)}),font:GS({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var XS=de((Nye,WS)=>{"use strict";var VJ=hc().dash,HJ=hn().extendFlat;WS.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:HJ({},VJ,{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 c_=de((Bye,jS)=>{"use strict";jS.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 d0=de((Oye,$S)=>{"use strict";var iw=qo(),GJ=Ly(),h_=Af(),JS=YS(),KS=XS(),ZJ=c_(),QS=hn().extendFlat,v_=iw({editType:"calc"});v_.family.dflt='"Open Sans", verdana, arial, sans-serif';v_.size.dflt=12;v_.color.dflt=h_.defaultLine;$S.exports={font:v_,title:{text:{valType:"string",editType:"layoutstyle"},font:iw({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:iw({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:QS(ZJ({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:h_.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:h_.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:h_.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:JS.newshape,activeshape:JS.activeshape,newselection:KS.newselection,activeselection:KS.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:QS({},GJ.transition,{editType:"none"})}});var e9=m7(()=>{});var YJ={};var t9=m7(()=>{e9()});var la=de(za=>{"use strict";var p0=Th(),r9=n_(),a9=K3(),WJ=cc(),XJ=Ey().addStyleRule,i9=hn(),jJ=ms(),JJ=d0(),KJ=i9.extendFlat,nw=i9.extendDeepAll;za.modules={};za.allCategories={};za.allTypes=[];za.subplotsRegistry={};za.componentsRegistry={};za.layoutArrayContainers=[];za.layoutArrayRegexes=[];za.traceLayoutAttributes={};za.localeRegistry={};za.apiMethodRegistry={};za.collectableSubplotTypes=null;za.register=function(t){if(za.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 aK=s0().timeFormat,p9=Da(),ow=Th(),kh=u0().mod,g0=Hi(),Gl=g0.BADNUM,qs=g0.ONEDAY,Py=g0.ONEHOUR,Sh=g0.ONEMIN,y0=g0.ONESEC,Dy=g0.EPOCHJD,vc=la(),u9=s0().utcFormat,iK=/^\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,nK=/^\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,f9=new Date().getFullYear()-70;function dc(e){return e&&vc.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}kn.dateTick0=function(e,t){var r=oK(e,!!t);if(t<2)return r;var i=kn.dateTime2ms(r,e);return i+=qs*(t-1),kn.ms2DateTime(i,0,e)};function oK(e,t){return dc(e)?t?vc.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:vc.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}kn.dfltRange=function(e){return dc(e)?vc.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};kn.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var p_,m_;kn.dateTime2ms=function(e,t){if(kn.isJSDate(e)){var r=e.getTimezoneOffset()*Sh,i=(e.getUTCMinutes()-e.getMinutes())*Sh+(e.getUTCSeconds()-e.getSeconds())*y0+(e.getUTCMilliseconds()-e.getMilliseconds());if(i){var a=3*Sh;r=r-a/2+kh(i-r+a/2,a)}return e=Number(e)-r,e>=p_&&e<=m_?e:Gl}if(typeof e!="string"&&typeof e!="number")return Gl;e=String(e);var s=dc(t),l=e.charAt(0);s&&(l==="G"||l==="g")&&(e=e.substr(1),t="");var f=s&&t.substr(0,7)==="chinese",h=e.match(f?nK:iK);if(!h)return Gl;var v=h[1],m=h[3]||"1",b=Number(h[5]||1),T=Number(h[7]||0),S=Number(h[9]||0),C=Number(h[11]||0);if(s){if(v.length===2)return Gl;v=Number(v);var P;try{var E=vc.getComponentMethod("calendars","getCal")(t);if(f){var I=m.charAt(m.length-1)==="i";m=parseInt(m,10),P=E.newDate(v,E.toMonthIndex(v,m,I),b)}else P=E.newDate(v,Number(m),b)}catch(N){return Gl}return P?(P.toJD()-Dy)*qs+T*Py+S*Sh+C*y0:Gl}v.length===2?v=(Number(v)+2e3-f9)%100+f9:v=Number(v),m-=1;var R=new Date(Date.UTC(2e3,m,b,T,S));return R.setUTCFullYear(v),R.getUTCMonth()!==m||R.getUTCDate()!==b?Gl:R.getTime()+C*y0};p_=kn.MIN_MS=kn.dateTime2ms("-9999");m_=kn.MAX_MS=kn.dateTime2ms("9999-12-31 23:59:59.9999");kn.isDateTime=function(e,t){return kn.dateTime2ms(e,t)!==Gl};function m0(e,t){return String(e+Math.pow(10,t)).substr(1)}var d_=90*qs,c9=3*Py,h9=5*Sh;kn.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=p_&&e<=m_))return Gl;t||(t=0);var i=Math.floor(kh(e+.05,1)*10),a=Math.round(e-i/10),s,l,f,h,v,m;if(dc(r)){var b=Math.floor(a/qs)+Dy,T=Math.floor(kh(e,qs));try{s=vc.getComponentMethod("calendars","getCal")(r).fromJD(b).formatDate("yyyy-mm-dd")}catch(S){s=u9("G%Y-%m-%d")(new Date(a))}if(s.charAt(0)==="-")for(;s.length<11;)s="-0"+s.substr(1);else for(;s.length<10;)s="0"+s;l=t=p_+qs&&e<=m_-qs))return Gl;var t=Math.floor(kh(e+.05,1)*10),r=new Date(Math.round(e-t/10)),i=aK("%Y-%m-%d")(r),a=r.getHours(),s=r.getMinutes(),l=r.getSeconds(),f=r.getUTCMilliseconds()*10+t;return m9(i,a,s,l,f)};function m9(e,t,r,i,a){if((t||r||i||a)&&(e+=" "+m0(t,2)+":"+m0(r,2),(i||a)&&(e+=":"+m0(i,2),a))){for(var s=4;a%10===0;)s-=1,a/=10;e+="."+m0(a,s)}return e}kn.cleanDate=function(e,t,r){if(e===Gl)return t;if(kn.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(dc(r))return ow.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=kn.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!kn.isDateTime(e,r))return ow.error("unrecognized date",e),t;return e};var sK=/%\d?f/g,lK=/%h/g,uK={1:"1",2:"1",3:"2",4:"2"};function v9(e,t,r,i){e=e.replace(sK,function(s){var l=Math.min(+s.charAt(1)||6,6),f=(t/1e3%1+2).toFixed(l).substr(2).replace(/0+$/,"")||"0";return f});var a=new Date(Math.floor(t+.05));if(e=e.replace(lK,function(){return uK[r("%q")(a)]}),dc(i))try{e=vc.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch(s){return"Invalid"}return r(e)(a)}var fK=[59,59.9,59.99,59.999,59.9999];function cK(e,t){var r=kh(e+.05,qs),i=m0(Math.floor(r/Py),2)+":"+m0(kh(Math.floor(r/Sh),60),2);if(t!=="M"){p9(t)||(t=0);var a=Math.min(kh(e/y0,60),fK[t]),s=(100+a).toFixed(t).substr(1);t>0&&(s=s.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+s}return i}kn.formatDate=function(e,t,r,i,a,s){if(a=dc(a)&&a,!t)if(r==="y")t=s.year;else if(r==="m")t=s.month;else if(r==="d")t=s.dayMonth+` +`)};function X(me){return me.map(ae).join(y)}function ae(me){return D.test(me)?'"'+me.replace(/\"/g,'""')+'"':me}return U},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Jn,hu,Bi,dl,Qd=this[Te(this,"requestAnimationFrame")]||function(y){setTimeout(y,17)};e.timer=function(){qc.apply(this,arguments)};function qc(y,M,D){var B=arguments.length;B<2&&(M=0),B<3&&(D=Date.now());var U=D+M,Z={c:y,t:U,n:null};return hu?hu.n=Z:Jn=Z,hu=Z,Bi||(dl=clearTimeout(dl),Bi=1,Qd(Nc)),Z}function Nc(){var y=hv(),M=vv()-y;M>24?(isFinite(M)&&(clearTimeout(dl),dl=setTimeout(Nc,M)),Bi=0):(Bi=1,Qd(Nc))}e.timer.flush=function(){hv(),vv()};function hv(){for(var y=Date.now(),M=Jn;M;)y>=M.t&&M.c(y-M.t)&&(M.c=null),M=M.n;return y}function vv(){for(var y,M=Jn,D=1/0;M;)M.c?(M.t=0;--X)ze.push(U[me[De[X]][2]]);for(X=+Je;X1&&Ea(y[D[B-2]],y[D[B-1]],y[U])<=0;)--B;D[B++]=U}return D.slice(0,B)}function Ku(y,M){return y[0]-M[0]||y[1]-M[1]}e.geom.polygon=function(y){return He(y,Zf),y};var Zf=e.geom.polygon.prototype=[];Zf.area=function(){for(var y=-1,M=this.length,D,B=this[M-1],U=0;++yGe)X=X.L;else if($=M-an(X,D),$>Ge){if(!X.R){B=X;break}X=X.R}else{Z>-Ge?(B=X.P,U=X):$>-Ge?(B=X,U=X.N):B=U=X;break}var ae=oo(y);if(du.insert(B,ae),!(!B&&!U)){if(B===U){wa(B),U=oo(B.site),du.insert(ae,U),ae.edge=U.edge=Xs(B.site,ae.site),Cr(B),Cr(U);return}if(!U){ae.edge=Xs(B.site,ae.site);return}wa(B),wa(U);var me=B.site,_e=me.x,De=me.y,Pe=y.x-_e,Je=y.y-De,ot=U.site,ze=ot.x-_e,Ue=ot.y-De,je=2*(Pe*Ue-Je*ze),ut=Pe*Pe+Je*Je,nt=ze*ze+Ue*Ue,We={x:(Ue*ut-Je*nt)/je+_e,y:(Pe*nt-ze*ut)/je+De};us(U.edge,me,ot,We),ae.edge=Xs(me,y,null,We),U.edge=Xs(y,ot,null,We),Cr(B),Cr(U)}}function pu(y,M){var D=y.site,B=D.x,U=D.y,Z=U-M;if(!Z)return B;var $=y.P;if(!$)return-1/0;D=$.site;var X=D.x,ae=D.y,me=ae-M;if(!me)return X;var _e=X-B,De=1/Z-1/me,Pe=_e/me;return De?(-Pe+Math.sqrt(Pe*Pe-2*De*(_e*_e/(-2*me)-ae+me/2+U-Z/2)))/De+B:(B+X)/2}function an(y,M){var D=y.N;if(D)return pu(D,M);var B=y.site;return B.y===M?B.x:1/0}function yl(y){this.site=y,this.edges=[]}yl.prototype.prepare=function(){for(var y=this.edges,M=y.length,D;M--;)D=y[M].edge,(!D.b||!D.a)&&y.splice(M,1);return y.sort($u),y.length};function bs(y){for(var M=y[0][0],D=y[1][0],B=y[0][1],U=y[1][1],Z,$,X,ae,me=Go,_e=me.length,De,Pe,Je,ot,ze,Ue;_e--;)if(De=me[_e],!(!De||!De.prepare()))for(Je=De.edges,ot=Je.length,Pe=0;PeGe||I(ae-$)>Ge)&&(Je.splice(Pe,0,new _l(mu(De.site,Ue,I(X-M)Ge?{x:M,y:I(Z-M)Ge?{x:I($-U)Ge?{x:D,y:I(Z-D)Ge?{x:I($-B)=-bt)){var Pe=ae*ae+me*me,Je=_e*_e+Ue*Ue,ot=(Ue*Pe-me*Je)/De,ze=(ae*Je-_e*Pe)/De,Ue=ze+X,je=pv.pop()||new ef;je.arc=y,je.site=U,je.x=ot+$,je.y=Ue+Math.sqrt(ot*ot+ze*ze),je.cy=Ue,y.circle=je;for(var ut=null,nt=Qu._;nt;)if(je.y0)){if(ze/=Je,Je<0){if(ze0){if(ze>Pe)return;ze>De&&(De=ze)}if(ze=D-X,!(!Je&&ze<0)){if(ze/=Je,Je<0){if(ze>Pe)return;ze>De&&(De=ze)}else if(Je>0){if(ze0)){if(ze/=ot,ot<0){if(ze0){if(ze>Pe)return;ze>De&&(De=ze)}if(ze=B-ae,!(!ot&&ze<0)){if(ze/=ot,ot<0){if(ze>Pe)return;ze>De&&(De=ze)}else if(ot>0){if(ze0&&(U.a={x:X+De*Je,y:ae+De*ot}),Pe<1&&(U.b={x:X+Pe*Je,y:ae+Pe*ot}),U}}}}}}function ws(y){for(var M=ml,D=Ta(y[0][0],y[0][1],y[1][0],y[1][1]),B=M.length,U;B--;)U=M[B],(!gl(U,y)||!D(U)||I(U.a.x-U.b.x)=Z)return;if(_e>Pe){if(!B)B={x:ot,y:$};else if(B.y>=X)return;D={x:ot,y:X}}else{if(!B)B={x:ot,y:X};else if(B.y<$)return;D={x:ot,y:$}}}else if(Ue=(_e-Pe)/(Je-De),je=ze-Ue*ot,Ue<-1||Ue>1)if(_e>Pe){if(!B)B={x:($-je)/Ue,y:$};else if(B.y>=X)return;D={x:(X-je)/Ue,y:X}}else{if(!B)B={x:(X-je)/Ue,y:X};else if(B.y<$)return;D={x:($-je)/Ue,y:$}}else if(De=Z)return;D={x:Z,y:Ue*Z+je}}else{if(!B)B={x:Z,y:Ue*Z+je};else if(B.x=_e&&je.x<=Pe&&je.y>=De&&je.y<=Je?[[_e,Je],[Pe,Je],[Pe,De],[_e,De]]:[];ut.point=ae[ze]}),me}function X(ae){return ae.map(function(me,_e){return{x:Math.round(B(me,_e)/Ge)*Ge,y:Math.round(U(me,_e)/Ge)*Ge,i:_e}})}return $.links=function(ae){return yu(X(ae)).edges.filter(function(me){return me.l&&me.r}).map(function(me){return{source:ae[me.l.i],target:ae[me.r.i]}})},$.triangles=function(ae){var me=[];return yu(X(ae)).cells.forEach(function(_e,De){for(var Pe=_e.site,Je=_e.edges.sort($u),ot=-1,ze=Je.length,Ue,je,ut=Je[ze-1].edge,nt=ut.l===Pe?ut.r:ut.l;++otnt&&(nt=_e.x),_e.y>We&&(We=_e.y),Je.push(_e.x),ot.push(_e.y);else for(ze=0;zent&&(nt=Gt),or>We&&(We=or),Je.push(Gt),ot.push(or)}var fr=nt-je,lr=We-ut;fr>lr?We=ut+fr:nt=je+lr;function Dr(Ur,Kr,Ba,ri,$a,jt,Jr,oa){if(!(isNaN(Ba)||isNaN(ri)))if(Ur.leaf){var sa=Ur.x,Ei=Ur.y;if(sa!=null)if(I(sa-Ba)+I(Ei-ri)<.01)Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa);else{var Oi=Ur.point;Ur.x=Ur.y=Ur.point=null,Ir(Ur,Oi,sa,Ei,$a,jt,Jr,oa),Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa)}else Ur.x=Ba,Ur.y=ri,Ur.point=Kr}else Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa)}function Ir(Ur,Kr,Ba,ri,$a,jt,Jr,oa){var sa=($a+Jr)*.5,Ei=(jt+oa)*.5,Oi=Ba>=sa,$i=ri>=Ei,xi=$i<<1|Oi;Ur.leaf=!1,Ur=Ur.nodes[xi]||(Ur.nodes[xi]=gn()),Oi?$a=sa:Jr=sa,$i?jt=Ei:oa=Ei,Dr(Ur,Kr,Ba,ri,$a,jt,Jr,oa)}var ea=gn();if(ea.add=function(Ur){Dr(ea,Ur,+De(Ur,++ze),+Pe(Ur,ze),je,ut,nt,We)},ea.visit=function(Ur){Pn(Ur,ea,je,ut,nt,We)},ea.find=function(Ur){return rp(ea,Ur[0],Ur[1],je,ut,nt,We)},ze=-1,M==null){for(;++zeZ||Pe>$||Je=Gt,lr=D>=or,Dr=lr<<1|fr,Ir=Dr+4;DrD&&(Z=M.slice(D,Z),X[$]?X[$]+=Z:X[++$]=Z),(B=B[0])===(U=U[0])?X[$]?X[$]+=U:X[++$]=U:(X[++$]=null,ae.push({i:$,x:Eo(B,U)})),D=Xf.lastIndex;return D=0&&!(B=e.interpolators[D](y,M)););return B}e.interpolators=[function(y,M){var D=typeof M;return(D==="string"?si.has(M.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(M)?tf:Zo:M instanceof ya?tf:Array.isArray(M)?Yo:D==="object"&&isNaN(M)?nn:Eo)(y,M)}],e.interpolateArray=Yo;function Yo(y,M){var D=[],B=[],U=y.length,Z=M.length,$=Math.min(y.length,M.length),X;for(X=0;X<$;++X)D.push(on(y[X],M[X]));for(;X=0?y.slice(0,M):y,B=M>=0?y.slice(M+1):"in";return D=Sm.get(D)||js,B=Wo.get(B)||Ce,km(B(D.apply(null,t.call(arguments,1))))};function km(y){return function(M){return M<=0?0:M>=1?1:y(M)}}function Js(y){return function(M){return 1-y(1-M)}}function Dn(y){return function(M){return .5*(M<.5?y(2*M):2-y(2-2*M))}}function Cm(y){return y*y}function xl(y){return y*y*y}function bl(y){if(y<=0)return 0;if(y>=1)return 1;var M=y*y,D=M*y;return 4*(y<.5?D:3*(y-M)+D-.75)}function gv(y){return function(M){return Math.pow(M,y)}}function Em(y){return 1-Math.cos(y*Tr)}function Lm(y){return Math.pow(2,10*(y-1))}function Oc(y){return 1-Math.sqrt(1-y*y)}function Pm(y,M){var D;return arguments.length<2&&(M=.45),arguments.length?D=M/gr*Math.asin(1/y):(y=1,D=M/4),function(B){return 1+y*Math.pow(2,-10*B)*Math.sin((B-D)*gr/M)}}function Dm(y){return y||(y=1.70158),function(M){return M*M*((y+1)*M-y)}}function zm(y){return y<1/2.75?7.5625*y*y:y<2/2.75?7.5625*(y-=1.5/2.75)*y+.75:y<2.5/2.75?7.5625*(y-=2.25/2.75)*y+.9375:7.5625*(y-=2.625/2.75)*y+.984375}e.interpolateHcl=_v;function _v(y,M){y=e.hcl(y),M=e.hcl(M);var D=y.h,B=y.c,U=y.l,Z=M.h-D,$=M.c-B,X=M.l-U;return isNaN($)&&($=0,B=isNaN(B)?M.c:B),isNaN(Z)?(Z=0,D=isNaN(D)?M.h:D):Z>180?Z-=360:Z<-180&&(Z+=360),function(ae){return Ne(D+Z*ae,B+$*ae,U+X*ae)+""}}e.interpolateHsl=Im;function Im(y,M){y=e.hsl(y),M=e.hsl(M);var D=y.h,B=y.s,U=y.l,Z=M.h-D,$=M.s-B,X=M.l-U;return isNaN($)&&($=0,B=isNaN(B)?M.s:B),isNaN(Z)?(Z=0,D=isNaN(D)?M.h:D):Z>180?Z-=360:Z<-180&&(Z+=360),function(ae){return se(D+Z*ae,B+$*ae,U+X*ae)+""}}e.interpolateLab=Rm;function Rm(y,M){y=e.lab(y),M=e.lab(M);var D=y.l,B=y.a,U=y.b,Z=M.l-D,$=M.a-B,X=M.b-U;return function(ae){return Yt(D+Z*ae,B+$*ae,U+X*ae)+""}}e.interpolateRound=xv;function xv(y,M){return M-=y,function(D){return Math.round(y+M*D)}}e.transform=function(y){var M=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(D){if(D!=null){M.setAttribute("transform",D);var B=M.transform.baseVal.consolidate()}return new ap(B?B.matrix:wv)})(y)};function ap(y){var M=[y.a,y.b],D=[y.c,y.d],B=bv(M),U=ip(M,D),Z=bv(Fm(D,M,-U))||0;M[0]*D[1]180?M+=360:M-y>180&&(y+=360),B.push({i:D.push(gu(D)+"rotate(",null,")")-2,x:Eo(y,M)})):M&&D.push(gu(D)+"rotate("+M+")")}function op(y,M,D,B){y!==M?B.push({i:D.push(gu(D)+"skewX(",null,")")-2,x:Eo(y,M)}):M&&D.push(gu(D)+"skewX("+M+")")}function sp(y,M,D,B){if(y[0]!==M[0]||y[1]!==M[1]){var U=D.push(gu(D)+"scale(",null,",",null,")");B.push({i:U-4,x:Eo(y[0],M[0])},{i:U-2,x:Eo(y[1],M[1])})}else(M[0]!==1||M[1]!==1)&&D.push(gu(D)+"scale("+M+")")}function lp(y,M){var D=[],B=[];return y=e.transform(y),M=e.transform(M),np(y.translate,M.translate,D,B),qm(y.rotate,M.rotate,D,B),op(y.skew,M.skew,D,B),sp(y.scale,M.scale,D,B),y=M=null,function(U){for(var Z=-1,$=B.length,X;++Z<$;)D[(X=B[Z]).i]=X.x(U);return D.join("")}}function Nm(y,M){return M=(M-=y=+y)||1/M,function(D){return(D-y)/M}}function cs(y,M){return M=(M-=y=+y)||1/M,function(D){return Math.max(0,Math.min(1,(D-y)/M))}}e.layout={},e.layout.bundle=function(){return function(y){for(var M=[],D=-1,B=y.length;++D0?Z=We:(D.c=null,D.t=NaN,D=null,M.end({type:"end",alpha:Z=0})):We>0&&(M.start({type:"start",alpha:Z=We}),D=qc(y.tick)),y):Z},y.start=function(){var We,Gt=Je.length,or=ot.length,fr=B[0],lr=B[1],Dr,Ir;for(We=0;We=0;)Z.push(_e=me[ae]),_e.parent=X,_e.depth=X.depth+1;D&&(X.value=0),X.children=me}else D&&(X.value=+D.call(B,X,X.depth)||0),delete X.children;return hs(U,function(De){var Pe,Je;y&&(Pe=De.children)&&Pe.sort(y),D&&(Je=De.parent)&&(Je.value+=De.value)}),$}return B.sort=function(U){return arguments.length?(y=U,B):y},B.children=function(U){return arguments.length?(M=U,B):M},B.value=function(U){return arguments.length?(D=U,B):D},B.revalue=function(U){return D&&(rf(U,function(Z){Z.children&&(Z.value=0)}),hs(U,function(Z){var $;Z.children||(Z.value=+D.call(B,Z,Z.depth)||0),($=Z.parent)&&($.value+=Z.value)})),U},B};function Ml(y,M){return e.rebind(y,M,"sort","children","value"),y.nodes=y,y.links=cp,y}function rf(y,M){for(var D=[y];(y=D.pop())!=null;)if(M(y),(U=y.children)&&(B=U.length))for(var B,U;--B>=0;)D.push(U[B])}function hs(y,M){for(var D=[y],B=[];(y=D.pop())!=null;)if(B.push(y),($=y.children)&&(Z=$.length))for(var U=-1,Z,$;++UU&&(U=X),B.push(X)}for($=0;$B&&(D=M,B=U);return D}function Fi(y){return y.reduce(Hm,0)}function Hm(y,M){return y+M[1]}e.layout.histogram=function(){var y=!0,M=Number,D=dp,B=Zc;function U(Z,Pe){for(var X=[],ae=Z.map(M,this),me=D.call(this,ae,Pe),_e=B.call(this,me,ae,Pe),De,Pe=-1,Je=ae.length,ot=_e.length-1,ze=y?1:1/Je,Ue;++Pe0)for(Pe=-1;++Pe=me[0]&&Ue<=me[1]&&(De=X[e.bisect(_e,Ue,1,ot)-1],De.y+=ze,De.push(Z[Pe]));return X}return U.value=function(Z){return arguments.length?(M=Z,U):M},U.range=function(Z){return arguments.length?(D=fa(Z),U):D},U.bins=function(Z){return arguments.length?(B=typeof Z=="number"?function($){return kv($,Z)}:fa(Z),U):B},U.frequency=function(Z){return arguments.length?(y=!!Z,U):y},U};function Zc(y,M){return kv(y,Math.ceil(Math.log(M.length)/Math.LN2+1))}function kv(y,M){for(var D=-1,B=+y[0],U=(y[1]-B)/M,Z=[];++D<=M;)Z[D]=U*D+B;return Z}function dp(y){return[e.min(y),e.max(y)]}e.layout.pack=function(){var y=e.layout.hierarchy().sort(nf),M=0,D=[1,1],B;function U(Z,$){var X=y.call(this,Z,$),ae=X[0],me=D[0],_e=D[1],De=B==null?Math.sqrt:typeof B=="function"?B:function(){return B};if(ae.x=ae.y=0,hs(ae,function(Je){Je.r=+De(Je.value)}),hs(ae,Jf),M){var Pe=M*(B?1:Math.max(2*ae.r/me,2*ae.r/_e))/2;hs(ae,function(Je){Je.r+=Pe}),hs(ae,Jf),hs(ae,function(Je){Je.r-=Pe})}return kl(ae,me/2,_e/2,B?1:1/Math.max(2*ae.r/me,2*ae.r/_e)),X}return U.size=function(Z){return arguments.length?(D=Z,U):D},U.radius=function(Z){return arguments.length?(B=Z==null||typeof Z=="function"?Z:+Z,U):B},U.padding=function(Z){return arguments.length?(M=+Z,U):M},Ml(U,y)};function nf(y,M){return y.value-M.value}function _u(y,M){var D=y._pack_next;y._pack_next=M,M._pack_prev=y,M._pack_next=D,D._pack_prev=M}function Cv(y,M){y._pack_next=M,M._pack_prev=y}function _n(y,M){var D=M.x-y.x,B=M.y-y.y,U=y.r+M.r;return .999*U*U>D*D+B*B}function Jf(y){if(!(M=y.children)||!(Pe=M.length))return;var M,D=1/0,B=-1/0,U=1/0,Z=-1/0,$,X,ae,me,_e,De,Pe;function Je(We){D=Math.min(We.x-We.r,D),B=Math.max(We.x+We.r,B),U=Math.min(We.y-We.r,U),Z=Math.max(We.y+We.r,Z)}if(M.forEach(Ks),$=M[0],$.x=-$.r,$.y=0,Je($),Pe>1&&(X=M[1],X.x=X.r,X.y=0,Je(X),Pe>2))for(ae=M[2],Cl($,X,ae),Je(ae),_u($,ae),$._pack_prev=ae,_u(ae,X),X=$._pack_next,me=3;meUe.x&&(Ue=Gt),Gt.depth>je.depth&&(je=Gt)});var ut=M(ze,Ue)/2-ze.x,nt=D[0]/(Ue.x+M(Ue,ze)/2+ut),We=D[1]/(je.depth||1);rf(Je,function(Gt){Gt.x=(Gt.x+ut)*nt,Gt.y=Gt.depth*We})}return Pe}function Z(_e){for(var De={A:null,children:[_e]},Pe=[De],Je;(Je=Pe.pop())!=null;)for(var ot=Je.children,ze,Ue=0,je=ot.length;Ue0&&(El(Gm(ze,_e,Pe),_e,Gt),je+=Gt,ut+=Gt),nt+=ze.m,je+=Je.m,We+=Ue.m,ut+=ot.m;ze&&!Ss(ot)&&(ot.t=ze,ot.m+=nt-ut),Je&&!Ms(Ue)&&(Ue.t=Je,Ue.m+=je-We,Pe=_e)}return Pe}function me(_e){_e.x*=D[0],_e.y=_e.depth*D[1]}return U.separation=function(_e){return arguments.length?(M=_e,U):M},U.size=function(_e){return arguments.length?(B=(D=_e)==null?me:null,U):B?null:D},U.nodeSize=function(_e){return arguments.length?(B=(D=_e)==null?null:me,U):B?D:null},Ml(U,y)};function Qs(y,M){return y.parent==M.parent?1:2}function Ms(y){var M=y.children;return M.length?M[0]:y.t}function Ss(y){var M=y.children,D;return(D=M.length)?M[D-1]:y.t}function El(y,M,D){var B=D/(M.i-y.i);M.c-=B,M.s+=D,y.c+=B,M.z+=D,M.m+=D}function pp(y){for(var M=0,D=0,B=y.children,U=B.length,Z;--U>=0;)Z=B[U],Z.z+=M,Z.m+=M,M+=Z.s+(D+=Z.c)}function Gm(y,M,D){return y.a.parent===M.parent?y.a:D}e.layout.cluster=function(){var y=e.layout.hierarchy().sort(null).value(null),M=Qs,D=[1,1],B=!1;function U(Z,$){var X=y.call(this,Z,$),ae=X[0],me,_e=0;hs(ae,function(ze){var Ue=ze.children;Ue&&Ue.length?(ze.x=Ym(Ue),ze.y=Zm(Ue)):(ze.x=me?_e+=M(ze,me):0,ze.y=0,me=ze)});var De=mp(ae),Pe=yp(ae),Je=De.x-M(De,Pe)/2,ot=Pe.x+M(Pe,De)/2;return hs(ae,B?function(ze){ze.x=(ze.x-ae.x)*D[0],ze.y=(ae.y-ze.y)*D[1]}:function(ze){ze.x=(ze.x-Je)/(ot-Je)*D[0],ze.y=(1-(ae.y?ze.y/ae.y:1))*D[1]}),X}return U.separation=function(Z){return arguments.length?(M=Z,U):M},U.size=function(Z){return arguments.length?(B=(D=Z)==null,U):B?null:D},U.nodeSize=function(Z){return arguments.length?(B=(D=Z)!=null,U):B?D:null},Ml(U,y)};function Zm(y){return 1+e.max(y,function(M){return M.y})}function Ym(y){return y.reduce(function(M,D){return M+D.x},0)/y.length}function mp(y){var M=y.children;return M&&M.length?mp(M[0]):y}function yp(y){var M=y.children,D;return M&&(D=M.length)?yp(M[D-1]):y}e.layout.treemap=function(){var y=e.layout.hierarchy(),M=Math.round,D=[1,1],B=null,U=Ev,Z=!1,$,X="squarify",ae=.5*(1+Math.sqrt(5));function me(ze,Ue){for(var je=-1,ut=ze.length,nt,We;++je0;)ut.push(We=nt[lr-1]),ut.area+=We.area,X!=="squarify"||(or=Pe(ut,fr))<=Gt?(nt.pop(),Gt=or):(ut.area-=ut.pop().area,Je(ut,fr,je,!1),fr=Math.min(je.dx,je.dy),ut.length=ut.area=0,Gt=1/0);ut.length&&(Je(ut,fr,je,!0),ut.length=ut.area=0),Ue.forEach(_e)}}function De(ze){var Ue=ze.children;if(Ue&&Ue.length){var je=U(ze),ut=Ue.slice(),nt,We=[];for(me(ut,je.dx*je.dy/ze.value),We.area=0;nt=ut.pop();)We.push(nt),We.area+=nt.area,nt.z!=null&&(Je(We,nt.z?je.dx:je.dy,je,!ut.length),We.length=We.area=0);Ue.forEach(De)}}function Pe(ze,Ue){for(var je=ze.area,ut,nt=0,We=1/0,Gt=-1,or=ze.length;++Gtnt&&(nt=ut));return je*=je,Ue*=Ue,je?Math.max(Ue*nt*ae/je,je/(Ue*We*ae)):1/0}function Je(ze,Ue,je,ut){var nt=-1,We=ze.length,Gt=je.x,or=je.y,fr=Ue?M(ze.area/Ue):0,lr;if(Ue==je.dx){for((ut||fr>je.dy)&&(fr=je.dy);++ntje.dx)&&(fr=je.dx);++nt1);return y+M*B*Math.sqrt(-2*Math.log(Z)/Z)}},logNormal:function(){var y=e.random.normal.apply(e,arguments);return function(){return Math.exp(y())}},bates:function(y){var M=e.random.irwinHall(y);return function(){return M()/y}},irwinHall:function(y){return function(){for(var M=0,D=0;D2?Wm:gp,me=B?cs:Nm;return U=ae(y,M,me,D),Z=ae(M,y,me,on),X}function X(ae){return U(ae)}return X.invert=function(ae){return Z(ae)},X.domain=function(ae){return arguments.length?(y=ae.map(Number),$()):y},X.range=function(ae){return arguments.length?(M=ae,$()):M},X.rangeRound=function(ae){return X.range(ae).interpolate(xv)},X.clamp=function(ae){return arguments.length?(B=ae,$()):B},X.interpolate=function(ae){return arguments.length?(D=ae,$()):D},X.ticks=function(ae){return zv(y,ae)},X.tickFormat=function(ae,me){return d3_scale_linearTickFormat(y,ae,me)},X.nice=function(ae){return wp(y,ae),$()},X.copy=function(){return xp(y,M,D,B)},$()}function bp(y,M){return e.rebind(y,M,"range","rangeRound","interpolate","clamp")}function wp(y,M){return Pv(y,_p(Dv(y,M)[2])),Pv(y,_p(Dv(y,M)[2])),y}function Dv(y,M){M==null&&(M=10);var D=Kf(y),B=D[1]-D[0],U=Math.pow(10,Math.floor(Math.log(B/M)/Math.LN10)),Z=M/B*U;return Z<=.15?U*=10:Z<=.35?U*=5:Z<=.75&&(U*=2),D[0]=Math.ceil(D[0]/U)*U,D[1]=Math.floor(D[1]/U)*U+U*.5,D[2]=U,D}function zv(y,M){return e.range.apply(e,Dv(y,M))}var xu={s:1,g:1,p:1,r:1,e:1};function Ll(y){return-Math.floor(Math.log(y)/Math.LN10+.01)}function Qf(y,M){var D=Ll(M[2]);return y in xu?Math.abs(D-Ll(Math.max(I(M[0]),I(M[1]))))+ +(y!=="e"):D-(y==="%")*2}e.scale.log=function(){return Iv(e.scale.linear().domain([0,1]),10,!0,[1,10])};function Iv(y,M,D,B){function U(X){return(D?Math.log(X<0?0:X):-Math.log(X>0?0:-X))/Math.log(M)}function Z(X){return D?Math.pow(M,X):-Math.pow(M,-X)}function $(X){return y(U(X))}return $.invert=function(X){return Z(y.invert(X))},$.domain=function(X){return arguments.length?(D=X[0]>=0,y.domain((B=X.map(Number)).map(U)),$):B},$.base=function(X){return arguments.length?(M=+X,y.domain(B.map(U)),$):M},$.nice=function(){var X=Pv(B.map(U),D?Math:Wc);return y.domain(X),B=X.map(Z),$},$.ticks=function(){var X=Kf(B),ae=[],me=X[0],_e=X[1],De=Math.floor(U(me)),Pe=Math.ceil(U(_e)),Je=M%1?2:M;if(isFinite(Pe-De)){if(D){for(;De0;ot--)ae.push(Z(De)*ot);for(De=0;ae[De]_e;Pe--);ae=ae.slice(De,Pe)}return ae},$.copy=function(){return Iv(y.copy(),M,D,B)},bp($,y)}var Wc={floor:function(y){return-Math.ceil(-y)},ceil:function(y){return-Math.floor(-y)}};e.scale.pow=function(){return Xc(e.scale.linear(),1,[0,1])};function Xc(y,M,D){var B=jc(M),U=jc(1/M);function Z($){return y(B($))}return Z.invert=function($){return U(y.invert($))},Z.domain=function($){return arguments.length?(y.domain((D=$.map(Number)).map(B)),Z):D},Z.ticks=function($){return zv(D,$)},Z.tickFormat=function($,X){return d3_scale_linearTickFormat(D,$,X)},Z.nice=function($){return Z.domain(wp(D,$))},Z.exponent=function($){return arguments.length?(B=jc(M=$),U=jc(1/M),y.domain(D.map(B)),Z):M},Z.copy=function(){return Xc(y.copy(),M,D)},bp(Z,y)}function jc(y){return function(M){return M<0?-Math.pow(-M,y):Math.pow(M,y)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return Pl([],{t:"range",a:[[]]})};function Pl(y,M){var D,B,U;function Z(X){return B[((D.get(X)||(M.t==="range"?D.set(X,y.push(X)):NaN))-1)%B.length]}function $(X,ae){return e.range(y.length).map(function(me){return X+ae*me})}return Z.domain=function(X){if(!arguments.length)return y;y=[],D=new z;for(var ae=-1,me=X.length,_e;++ae0?D[Z-1]:y[0],ZPe?0:1;if(_e=Er)return ae(_e,ot)+(me?ae(me,1-ot):"")+"Z";var ze,Ue,je,ut,nt=0,We=0,Gt,or,fr,lr,Dr,Ir,ea,Ur,Kr=[];if((ut=(+$.apply(this,arguments)||0)/2)&&(je=B===Dl?Math.sqrt(me*me+_e*_e):+B.apply(this,arguments),ot||(We*=-1),_e&&(We=Ki(je/_e*Math.sin(ut))),me&&(nt=Ki(je/me*Math.sin(ut)))),_e){Gt=_e*Math.cos(De+We),or=_e*Math.sin(De+We),fr=_e*Math.cos(Pe-We),lr=_e*Math.sin(Pe-We);var Ba=Math.abs(Pe-De-2*We)<=dt?0:1;if(We&&zl(Gt,or,fr,lr)===ot^Ba){var ri=(De+Pe)/2;Gt=_e*Math.cos(ri),or=_e*Math.sin(ri),fr=lr=null}}else Gt=or=0;if(me){Dr=me*Math.cos(Pe-nt),Ir=me*Math.sin(Pe-nt),ea=me*Math.cos(De+nt),Ur=me*Math.sin(De+nt);var $a=Math.abs(De-Pe+2*nt)<=dt?0:1;if(nt&&zl(Dr,Ir,ea,Ur)===1-ot^$a){var jt=(De+Pe)/2;Dr=me*Math.cos(jt),Ir=me*Math.sin(jt),ea=Ur=null}}else Dr=Ir=0;if(Je>Ge&&(ze=Math.min(Math.abs(_e-me)/2,+D.apply(this,arguments)))>.001){Ue=me<_e^ot?0:1;var Jr=ze,oa=ze;if(Je0?0:1}function wu(y,M,D,B,U){var Z=y[0]-M[0],$=y[1]-M[1],X=(U?B:-B)/Math.sqrt(Z*Z+$*$),ae=X*$,me=-X*Z,_e=y[0]+ae,De=y[1]+me,Pe=M[0]+ae,Je=M[1]+me,ot=(_e+Pe)/2,ze=(De+Je)/2,Ue=Pe-_e,je=Je-De,ut=Ue*Ue+je*je,nt=D-B,We=_e*Je-Pe*De,Gt=(je<0?-1:1)*Math.sqrt(Math.max(0,nt*nt*ut-We*We)),or=(We*je-Ue*Gt)/ut,fr=(-We*Ue-je*Gt)/ut,lr=(We*je+Ue*Gt)/ut,Dr=(-We*Ue+je*Gt)/ut,Ir=or-ot,ea=fr-ze,Ur=lr-ot,Kr=Dr-ze;return Ir*Ir+ea*ea>Ur*Ur+Kr*Kr&&(or=lr,fr=Dr),[[or-ae,fr-me],[or*D/nt,fr*D/nt]]}function ec(){return!0}function ks(y){var M=vu,D=pl,B=ec,U=Xo,Z=U.key,$=.7;function X(ae){var me=[],_e=[],De=-1,Pe=ae.length,Je,ot=fa(M),ze=fa(D);function Ue(){me.push("M",U(y(_e),$))}for(;++De1?y.join("L"):y+"Z"}function lf(y){return y.join("L")+"Z"}function jm(y){for(var M=0,D=y.length,B=y[0],U=[B[0],",",B[1]];++M1&&U.push("H",B[0]),U.join("")}function uf(y){for(var M=0,D=y.length,B=y[0],U=[B[0],",",B[1]];++M1){X=M[1],Z=y[ae],ae++,B+="C"+(U[0]+$[0])+","+(U[1]+$[1])+","+(Z[0]-X[0])+","+(Z[1]-X[1])+","+Z[0]+","+Z[1];for(var me=2;me9&&(Z=D*3/Math.sqrt(Z),$[X]=Z*B,$[X+1]=Z*U));for(X=-1;++X<=ae;)Z=(y[Math.min(ae,X+1)][0]-y[Math.max(0,X-1)][0])/(6*(1+$[X]*$[X])),M.push([Z||0,$[X]*Z||0]);return M}function Lp(y){return y.length<3?Xo(y):y[0]+ff(y,$m(y))}e.svg.line.radial=function(){var y=ks(Bv);return y.radius=y.x,delete y.x,y.angle=y.y,delete y.y,y};function Bv(y){for(var M,D=-1,B=y.length,U,Z;++Ddt)+",1 "+De}function me(_e,De,Pe,Je){return"Q 0,0 "+Je}return Z.radius=function(_e){return arguments.length?(D=fa(_e),Z):D},Z.source=function(_e){return arguments.length?(y=fa(_e),Z):y},Z.target=function(_e){return arguments.length?(M=fa(_e),Z):M},Z.startAngle=function(_e){return arguments.length?(B=fa(_e),Z):B},Z.endAngle=function(_e){return arguments.length?(U=fa(_e),Z):U},Z};function Pp(y){return y.radius}e.svg.diagonal=function(){var y=eh,M=Ov,D=Uv;function B(U,Z){var $=y.call(this,U,Z),X=M.call(this,U,Z),ae=($.y+X.y)/2,me=[$,{x:$.x,y:ae},{x:X.x,y:ae},X];return me=me.map(D),"M"+me[0]+"C"+me[1]+" "+me[2]+" "+me[3]}return B.source=function(U){return arguments.length?(y=fa(U),B):y},B.target=function(U){return arguments.length?(M=fa(U),B):M},B.projection=function(U){return arguments.length?(D=U,B):D},B};function Uv(y){return[y.x,y.y]}e.svg.diagonal.radial=function(){var y=e.svg.diagonal(),M=Uv,D=y.projection;return y.projection=function(B){return arguments.length?D(Dp(M=B)):M},y};function Dp(y){return function(){var M=y.apply(this,arguments),D=M[0],B=M[1]-Tr;return[D*Math.cos(B),D*Math.sin(B)]}}e.svg.symbol=function(){var y=df,M=zp;function D(B,U){return(rh.get(y.call(this,B,U))||th)(M.call(this,B,U))}return D.type=function(B){return arguments.length?(y=fa(B),D):y},D.size=function(B){return arguments.length?(M=fa(B),D):M},D};function zp(){return 64}function df(){return"circle"}function th(y){var M=Math.sqrt(y/dt);return"M0,"+M+"A"+M+","+M+" 0 1,1 0,"+-M+"A"+M+","+M+" 0 1,1 0,"+M+"Z"}var rh=e.map({circle:th,cross:function(y){var M=Math.sqrt(y/5)/2;return"M"+-3*M+","+-M+"H"+-M+"V"+-3*M+"H"+M+"V"+-M+"H"+3*M+"V"+M+"H"+M+"V"+3*M+"H"+-M+"V"+M+"H"+-3*M+"Z"},diamond:function(y){var M=Math.sqrt(y/(2*Vv)),D=M*Vv;return"M0,"+-M+"L"+D+",0 0,"+M+" "+-D+",0Z"},square:function(y){var M=Math.sqrt(y)/2;return"M"+-M+","+-M+"L"+M+","+-M+" "+M+","+M+" "+-M+","+M+"Z"},"triangle-down":function(y){var M=Math.sqrt(y/Au),D=M*Au/2;return"M0,"+D+"L"+M+","+-D+" "+-M+","+-D+"Z"},"triangle-up":function(y){var M=Math.sqrt(y/Au),D=M*Au/2;return"M0,"+-D+"L"+M+","+D+" "+-M+","+D+"Z"}});e.svg.symbolTypes=rh.keys();var Au=Math.sqrt(3),Vv=Math.tan(30*Hr);pt.transition=function(y){for(var M=so||++Ci,D=fi(y),B=[],U,Z,$=Es||{time:Date.now(),ease:bl,delay:0,duration:250},X=-1,ae=this.length;++X0;)De[--ut].call(y,je);if(Ue>=1)return $.event&&$.event.end.call(y,y.__data__,M),--Z.count?delete Z[B]:delete y[D],1}$||(X=U.time,ae=qc(Pe,0,X),$=Z[B]={tween:new z,time:X,timer:ae,delay:U.delay,duration:U.duration,ease:U.ease,index:M},U=null,++Z.count)}e.svg.axis=function(){var y=e.scale.linear(),M=Rl,D=6,B=6,U=3,Z=[10],$=null,X;function ae(me){me.each(function(){var _e=e.select(this),De=this.__chart__||y,Pe=this.__chart__=y.copy(),Je=$==null?Pe.ticks?Pe.ticks.apply(Pe,Z):Pe.domain():$,ot=X==null?Pe.tickFormat?Pe.tickFormat.apply(Pe,Z):Ce:X,ze=_e.selectAll(".tick").data(Je,Pe),Ue=ze.enter().insert("g",".domain").attr("class","tick").style("opacity",Ge),je=e.transition(ze.exit()).style("opacity",Ge).remove(),ut=e.transition(ze.order()).style("opacity",1),nt=Math.max(D,0)+U,We,Gt=Yc(Pe),or=_e.selectAll(".domain").data([0]),fr=(or.enter().append("path").attr("class","domain"),e.transition(or));Ue.append("line"),Ue.append("text");var lr=Ue.select("line"),Dr=ut.select("line"),Ir=ze.select("text").text(ot),ea=Ue.select("text"),Ur=ut.select("text"),Kr=M==="top"||M==="left"?-1:1,Ba,ri,$a,jt;if(M==="bottom"||M==="top"?(We=mf,Ba="x",$a="y",ri="x2",jt="y2",Ir.attr("dy",Kr<0?"0em":".71em").style("text-anchor","middle"),fr.attr("d","M"+Gt[0]+","+Kr*B+"V0H"+Gt[1]+"V"+Kr*B)):(We=Fl,Ba="y",$a="x",ri="y2",jt="x2",Ir.attr("dy",".32em").style("text-anchor",Kr<0?"end":"start"),fr.attr("d","M"+Kr*B+","+Gt[0]+"H0V"+Gt[1]+"H"+Kr*B)),lr.attr(jt,Kr*D),ea.attr($a,Kr*nt),Dr.attr(ri,0).attr(jt,Kr*D),Ur.attr(Ba,0).attr($a,Kr*nt),Pe.rangeBand){var Jr=Pe,oa=Jr.rangeBand()/2;De=Pe=function(sa){return Jr(sa)+oa}}else De.rangeBand?De=Pe:je.call(We,Pe,De);Ue.call(We,De,Pe),ut.call(We,Pe,Pe)})}return ae.scale=function(me){return arguments.length?(y=me,ae):y},ae.orient=function(me){return arguments.length?(M=me in rc?me+"":Rl,ae):M},ae.ticks=function(){return arguments.length?(Z=r(arguments),ae):Z},ae.tickValues=function(me){return arguments.length?($=me,ae):$},ae.tickFormat=function(me){return arguments.length?(X=me,ae):X},ae.tickSize=function(me){var _e=arguments.length;return _e?(D=+me,B=+arguments[_e-1],ae):D},ae.innerTickSize=function(me){return arguments.length?(D=+me,ae):D},ae.outerTickSize=function(me){return arguments.length?(B=+me,ae):B},ae.tickPadding=function(me){return arguments.length?(U=+me,ae):U},ae.tickSubdivide=function(){return arguments.length&&ae},ae};var Rl="bottom",rc={top:1,right:1,bottom:1,left:1};function mf(y,M,D){y.attr("transform",function(B){var U=M(B);return"translate("+(isFinite(U)?U:D(B))+",0)"})}function Fl(y,M,D){y.attr("transform",function(B){var U=M(B);return"translate(0,"+(isFinite(U)?U:D(B))+")"})}e.svg.brush=function(){var y=it(_e,"brushstart","brush","brushend"),M=null,D=null,B=[0,0],U=[0,0],Z,$,X=!0,ae=!0,me=nh[0];function _e(ze){ze.each(function(){var Ue=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ot).on("touchstart.brush",ot),je=Ue.selectAll(".background").data([0]);je.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ue.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var ut=Ue.selectAll(".resize").data(me,Ce);ut.exit().remove(),ut.enter().append("g").attr("class",function(or){return"resize "+or}).style("cursor",function(or){return Ls[or]}).append("rect").attr("x",function(or){return/[ew]$/.test(or)?-3:null}).attr("y",function(or){return/^[ns]/.test(or)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),ut.style("display",_e.empty()?"none":null);var nt=e.transition(Ue),We=e.transition(je),Gt;M&&(Gt=Yc(M),We.attr("x",Gt[0]).attr("width",Gt[1]-Gt[0]),Pe(nt)),D&&(Gt=Yc(D),We.attr("y",Gt[0]).attr("height",Gt[1]-Gt[0]),Je(nt)),De(nt)})}_e.event=function(ze){ze.each(function(){var Ue=y.of(this,arguments),je={x:B,y:U,i:Z,j:$},ut=this.__chart__||je;this.__chart__=je,so?e.select(this).transition().each("start.brush",function(){Z=ut.i,$=ut.j,B=ut.x,U=ut.y,Ue({type:"brushstart"})}).tween("brush:brush",function(){var nt=Yo(B,je.x),We=Yo(U,je.y);return Z=$=null,function(Gt){B=je.x=nt(Gt),U=je.y=We(Gt),Ue({type:"brush",mode:"resize"})}}).each("end.brush",function(){Z=je.i,$=je.j,Ue({type:"brush",mode:"resize"}),Ue({type:"brushend"})}):(Ue({type:"brushstart"}),Ue({type:"brush",mode:"resize"}),Ue({type:"brushend"}))})};function De(ze){ze.selectAll(".resize").attr("transform",function(Ue){return"translate("+B[+/e$/.test(Ue)]+","+U[+/^s/.test(Ue)]+")"})}function Pe(ze){ze.select(".extent").attr("x",B[0]),ze.selectAll(".extent,.n>rect,.s>rect").attr("width",B[1]-B[0])}function Je(ze){ze.select(".extent").attr("y",U[0]),ze.selectAll(".extent,.e>rect,.w>rect").attr("height",U[1]-U[0])}function ot(){var ze=this,Ue=e.select(e.event.target),je=y.of(ze,arguments),ut=e.select(ze),nt=Ue.datum(),We=!/^(n|s)$/.test(nt)&&M,Gt=!/^(e|w)$/.test(nt)&&D,or=Ue.classed("extent"),fr=Mr(ze),lr,Dr=e.mouse(ze),Ir,ea=e.select(s(ze)).on("keydown.brush",Ba).on("keyup.brush",ri);if(e.event.changedTouches?ea.on("touchmove.brush",$a).on("touchend.brush",Jr):ea.on("mousemove.brush",$a).on("mouseup.brush",Jr),ut.interrupt().selectAll("*").interrupt(),or)Dr[0]=B[0]-Dr[0],Dr[1]=U[0]-Dr[1];else if(nt){var Ur=+/w$/.test(nt),Kr=+/^n/.test(nt);Ir=[B[1-Ur]-Dr[0],U[1-Kr]-Dr[1]],Dr[0]=B[Ur],Dr[1]=U[Kr]}else e.event.altKey&&(lr=Dr.slice());ut.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ue.style("cursor")),je({type:"brushstart"}),$a();function Ba(){e.event.keyCode==32&&(or||(lr=null,Dr[0]-=B[1],Dr[1]-=U[1],or=2),Ke())}function ri(){e.event.keyCode==32&&or==2&&(Dr[0]+=B[1],Dr[1]+=U[1],or=0,Ke())}function $a(){var oa=e.mouse(ze),sa=!1;Ir&&(oa[0]+=Ir[0],oa[1]+=Ir[1]),or||(e.event.altKey?(lr||(lr=[(B[0]+B[1])/2,(U[0]+U[1])/2]),Dr[0]=B[+(oa[0]{(function(e,t){typeof G1=="object"&&typeof x7!="undefined"?t(G1):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(G1,function(e){"use strict";var t=new Date,r=new Date;function i(Be,ft,mt,Ar){function dr(Tt){return Be(Tt=arguments.length===0?new Date:new Date(+Tt)),Tt}return dr.floor=function(Tt){return Be(Tt=new Date(+Tt)),Tt},dr.ceil=function(Tt){return Be(Tt=new Date(Tt-1)),ft(Tt,1),Be(Tt),Tt},dr.round=function(Tt){var wt=dr(Tt),Vt=dr.ceil(Tt);return Tt-wt0))return Kt;do Kt.push(Ht=new Date(+Tt)),ft(Tt,Vt),Be(Tt);while(Ht=wt)for(;Be(wt),!Tt(wt);)wt.setTime(wt-1)},function(wt,Vt){if(wt>=wt)if(Vt<0)for(;++Vt<=0;)for(;ft(wt,-1),!Tt(wt););else for(;--Vt>=0;)for(;ft(wt,1),!Tt(wt););})},mt&&(dr.count=function(Tt,wt){return t.setTime(+Tt),r.setTime(+wt),Be(t),Be(r),Math.floor(mt(t,r))},dr.every=function(Tt){return Tt=Math.floor(Tt),!isFinite(Tt)||!(Tt>0)?null:Tt>1?dr.filter(Ar?function(wt){return Ar(wt)%Tt===0}:function(wt){return dr.count(0,wt)%Tt===0}):dr}),dr}var a=i(function(){},function(Be,ft){Be.setTime(+Be+ft)},function(Be,ft){return ft-Be});a.every=function(Be){return Be=Math.floor(Be),!isFinite(Be)||!(Be>0)?null:Be>1?i(function(ft){ft.setTime(Math.floor(ft/Be)*Be)},function(ft,mt){ft.setTime(+ft+mt*Be)},function(ft,mt){return(mt-ft)/Be}):a};var s=a.range,l=1e3,f=6e4,h=36e5,v=864e5,m=6048e5,b=i(function(Be){Be.setTime(Be-Be.getMilliseconds())},function(Be,ft){Be.setTime(+Be+ft*l)},function(Be,ft){return(ft-Be)/l},function(Be){return Be.getUTCSeconds()}),T=b.range,S=i(function(Be){Be.setTime(Be-Be.getMilliseconds()-Be.getSeconds()*l)},function(Be,ft){Be.setTime(+Be+ft*f)},function(Be,ft){return(ft-Be)/f},function(Be){return Be.getMinutes()}),C=S.range,P=i(function(Be){Be.setTime(Be-Be.getMilliseconds()-Be.getSeconds()*l-Be.getMinutes()*f)},function(Be,ft){Be.setTime(+Be+ft*h)},function(Be,ft){return(ft-Be)/h},function(Be){return Be.getHours()}),E=P.range,I=i(function(Be){Be.setHours(0,0,0,0)},function(Be,ft){Be.setDate(Be.getDate()+ft)},function(Be,ft){return(ft-Be-(ft.getTimezoneOffset()-Be.getTimezoneOffset())*f)/v},function(Be){return Be.getDate()-1}),F=I.range;function N(Be){return i(function(ft){ft.setDate(ft.getDate()-(ft.getDay()+7-Be)%7),ft.setHours(0,0,0,0)},function(ft,mt){ft.setDate(ft.getDate()+mt*7)},function(ft,mt){return(mt-ft-(mt.getTimezoneOffset()-ft.getTimezoneOffset())*f)/m})}var z=N(0),O=N(1),H=N(2),V=N(3),W=N(4),J=N(5),re=N(6),oe=z.range,ne=O.range,fe=H.range,ve=V.range,Ce=W.range,Se=J.range,Te=re.range,pe=i(function(Be){Be.setDate(1),Be.setHours(0,0,0,0)},function(Be,ft){Be.setMonth(Be.getMonth()+ft)},function(Be,ft){return ft.getMonth()-Be.getMonth()+(ft.getFullYear()-Be.getFullYear())*12},function(Be){return Be.getMonth()}),Ae=pe.range,Me=i(function(Be){Be.setMonth(0,1),Be.setHours(0,0,0,0)},function(Be,ft){Be.setFullYear(Be.getFullYear()+ft)},function(Be,ft){return ft.getFullYear()-Be.getFullYear()},function(Be){return Be.getFullYear()});Me.every=function(Be){return!isFinite(Be=Math.floor(Be))||!(Be>0)?null:i(function(ft){ft.setFullYear(Math.floor(ft.getFullYear()/Be)*Be),ft.setMonth(0,1),ft.setHours(0,0,0,0)},function(ft,mt){ft.setFullYear(ft.getFullYear()+mt*Be)})};var Le=Me.range,Ke=i(function(Be){Be.setUTCSeconds(0,0)},function(Be,ft){Be.setTime(+Be+ft*f)},function(Be,ft){return(ft-Be)/f},function(Be){return Be.getUTCMinutes()}),ht=Ke.range,it=i(function(Be){Be.setUTCMinutes(0,0,0)},function(Be,ft){Be.setTime(+Be+ft*h)},function(Be,ft){return(ft-Be)/h},function(Be){return Be.getUTCHours()}),lt=it.range,He=i(function(Be){Be.setUTCHours(0,0,0,0)},function(Be,ft){Be.setUTCDate(Be.getUTCDate()+ft)},function(Be,ft){return(ft-Be)/v},function(Be){return Be.getUTCDate()-1}),_t=He.range;function at(Be){return i(function(ft){ft.setUTCDate(ft.getUTCDate()-(ft.getUTCDay()+7-Be)%7),ft.setUTCHours(0,0,0,0)},function(ft,mt){ft.setUTCDate(ft.getUTCDate()+mt*7)},function(ft,mt){return(mt-ft)/m})}var At=at(0),kt=at(1),pt=at(2),ge=at(3),Re=at(4),xe=at(5),et=at(6),vt=At.range,tt=kt.range,Nt=pt.range,Mt=ge.range,Ct=Re.range,Rt=xe.range,Ut=et.range,xt=i(function(Be){Be.setUTCDate(1),Be.setUTCHours(0,0,0,0)},function(Be,ft){Be.setUTCMonth(Be.getUTCMonth()+ft)},function(Be,ft){return ft.getUTCMonth()-Be.getUTCMonth()+(ft.getUTCFullYear()-Be.getUTCFullYear())*12},function(Be){return Be.getUTCMonth()}),Et=xt.range,ir=i(function(Be){Be.setUTCMonth(0,1),Be.setUTCHours(0,0,0,0)},function(Be,ft){Be.setUTCFullYear(Be.getUTCFullYear()+ft)},function(Be,ft){return ft.getUTCFullYear()-Be.getUTCFullYear()},function(Be){return Be.getUTCFullYear()});ir.every=function(Be){return!isFinite(Be=Math.floor(Be))||!(Be>0)?null:i(function(ft){ft.setUTCFullYear(Math.floor(ft.getUTCFullYear()/Be)*Be),ft.setUTCMonth(0,1),ft.setUTCHours(0,0,0,0)},function(ft,mt){ft.setUTCFullYear(ft.getUTCFullYear()+mt*Be)})};var Wt=ir.range;e.timeDay=I,e.timeDays=F,e.timeFriday=J,e.timeFridays=Se,e.timeHour=P,e.timeHours=E,e.timeInterval=i,e.timeMillisecond=a,e.timeMilliseconds=s,e.timeMinute=S,e.timeMinutes=C,e.timeMonday=O,e.timeMondays=ne,e.timeMonth=pe,e.timeMonths=Ae,e.timeSaturday=re,e.timeSaturdays=Te,e.timeSecond=b,e.timeSeconds=T,e.timeSunday=z,e.timeSundays=oe,e.timeThursday=W,e.timeThursdays=Ce,e.timeTuesday=H,e.timeTuesdays=fe,e.timeWednesday=V,e.timeWednesdays=ve,e.timeWeek=z,e.timeWeeks=oe,e.timeYear=Me,e.timeYears=Le,e.utcDay=He,e.utcDays=_t,e.utcFriday=xe,e.utcFridays=Rt,e.utcHour=it,e.utcHours=lt,e.utcMillisecond=a,e.utcMilliseconds=s,e.utcMinute=Ke,e.utcMinutes=ht,e.utcMonday=kt,e.utcMondays=tt,e.utcMonth=xt,e.utcMonths=Et,e.utcSaturday=et,e.utcSaturdays=Ut,e.utcSecond=b,e.utcSeconds=T,e.utcSunday=At,e.utcSundays=vt,e.utcThursday=Re,e.utcThursdays=Ct,e.utcTuesday=pt,e.utcTuesdays=Nt,e.utcWednesday=ge,e.utcWednesdays=Mt,e.utcWeek=At,e.utcWeeks=vt,e.utcYear=ir,e.utcYears=Wt,Object.defineProperty(e,"__esModule",{value:!0})})});var s0=de((Z1,b7)=>{(function(e,t){typeof Z1=="object"&&typeof b7!="undefined"?t(Z1,F3()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Z1,function(e,t){"use strict";function r(Fe){if(0<=Fe.y&&Fe.y<100){var Ge=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return Ge.setFullYear(Fe.y),Ge}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function i(Fe){if(0<=Fe.y&&Fe.y<100){var Ge=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return Ge.setUTCFullYear(Fe.y),Ge}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function a(Fe,Ge,bt){return{y:Fe,m:Ge,d:bt,H:0,M:0,S:0,L:0}}function s(Fe){var Ge=Fe.dateTime,bt=Fe.date,dt=Fe.time,gr=Fe.periods,Er=Fe.days,Tr=Fe.shortDays,Hr=Fe.months,_a=Fe.shortMonths,ka=T(gr),Ea=S(gr),Ri=T(Er),Ki=S(Er),yn=T(Tr),Xi=S(Tr),jn=T(Hr),En=S(Hr),Vi=T(_a),pa=S(_a),Gr={a:Dt,A:Ft,b:tr,B:Yt,c:null,d:pe,e:pe,f:ht,H:Ae,I:Me,j:Le,L:Ke,m:it,M:lt,p:wr,q:Yr,Q:wt,s:Vt,S:He,u:_t,U:at,V:At,w:kt,W:pt,x:null,X:null,y:ge,Y:Re,Z:xe,"%":Tt},Qa={a:Br,A:ca,b:ua,B:Na,c:null,d:et,e:et,f:Ct,H:vt,I:tt,j:Nt,L:Mt,m:Rt,M:Ut,p:ii,q:Wr,Q:wt,s:Vt,S:xt,u:Et,U:ir,V:Wt,w:Be,W:ft,x:null,X:null,y:mt,Y:Ar,Z:dr,"%":Tt},Zr={a:se,A:ce,b:Ee,B:Ne,c:rt,d:W,e:W,f:ve,H:re,I:re,j:J,L:fe,m:V,M:oe,p:ee,q:H,Q:Se,s:Te,S:ne,u:P,U:E,V:I,w:C,W:F,x:Ve,X:yt,y:z,Y:N,Z:O,"%":Ce};Gr.x=vi(bt,Gr),Gr.X=vi(dt,Gr),Gr.c=vi(Ge,Gr),Qa.x=vi(bt,Qa),Qa.X=vi(dt,Qa),Qa.c=vi(Ge,Qa);function vi(pr,$r){return function(ga){var nr=[],wi=-1,La=0,si=pr.length,fa,Ln,Co;for(ga instanceof Date||(ga=new Date(+ga));++wi53)return null;"w"in nr||(nr.w=1),"Z"in nr?(La=i(a(nr.y,0,1)),si=La.getUTCDay(),La=si>4||si===0?t.utcMonday.ceil(La):t.utcMonday(La),La=t.utcDay.offset(La,(nr.V-1)*7),nr.y=La.getUTCFullYear(),nr.m=La.getUTCMonth(),nr.d=La.getUTCDate()+(nr.w+6)%7):(La=r(a(nr.y,0,1)),si=La.getDay(),La=si>4||si===0?t.timeMonday.ceil(La):t.timeMonday(La),La=t.timeDay.offset(La,(nr.V-1)*7),nr.y=La.getFullYear(),nr.m=La.getMonth(),nr.d=La.getDate()+(nr.w+6)%7)}else("W"in nr||"U"in nr)&&("w"in nr||(nr.w="u"in nr?nr.u%7:"W"in nr?1:0),si="Z"in nr?i(a(nr.y,0,1)).getUTCDay():r(a(nr.y,0,1)).getDay(),nr.m=0,nr.d="W"in nr?(nr.w+6)%7+nr.W*7-(si+5)%7:nr.w+nr.U*7-(si+6)%7);return"Z"in nr?(nr.H+=nr.Z/100|0,nr.M+=nr.Z%100,i(nr)):r(nr)}}function le(pr,$r,ga,nr){for(var wi=0,La=$r.length,si=ga.length,fa,Ln;wi=si)return-1;if(fa=$r.charCodeAt(wi++),fa===37){if(fa=$r.charAt(wi++),Ln=Zr[fa in l?$r.charAt(wi++):fa],!Ln||(nr=Ln(pr,ga,nr))<0)return-1}else if(fa!=ga.charCodeAt(nr++))return-1}return nr}function ee(pr,$r,ga){var nr=ka.exec($r.slice(ga));return nr?(pr.p=Ea[nr[0].toLowerCase()],ga+nr[0].length):-1}function se(pr,$r,ga){var nr=yn.exec($r.slice(ga));return nr?(pr.w=Xi[nr[0].toLowerCase()],ga+nr[0].length):-1}function ce(pr,$r,ga){var nr=Ri.exec($r.slice(ga));return nr?(pr.w=Ki[nr[0].toLowerCase()],ga+nr[0].length):-1}function Ee(pr,$r,ga){var nr=Vi.exec($r.slice(ga));return nr?(pr.m=pa[nr[0].toLowerCase()],ga+nr[0].length):-1}function Ne(pr,$r,ga){var nr=jn.exec($r.slice(ga));return nr?(pr.m=En[nr[0].toLowerCase()],ga+nr[0].length):-1}function rt(pr,$r,ga){return le(pr,Ge,$r,ga)}function Ve(pr,$r,ga){return le(pr,bt,$r,ga)}function yt(pr,$r,ga){return le(pr,dt,$r,ga)}function Dt(pr){return Tr[pr.getDay()]}function Ft(pr){return Er[pr.getDay()]}function tr(pr){return _a[pr.getMonth()]}function Yt(pr){return Hr[pr.getMonth()]}function wr(pr){return gr[+(pr.getHours()>=12)]}function Yr(pr){return 1+~~(pr.getMonth()/3)}function Br(pr){return Tr[pr.getUTCDay()]}function ca(pr){return Er[pr.getUTCDay()]}function ua(pr){return _a[pr.getUTCMonth()]}function Na(pr){return Hr[pr.getUTCMonth()]}function ii(pr){return gr[+(pr.getUTCHours()>=12)]}function Wr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var $r=vi(pr+="",Gr);return $r.toString=function(){return pr},$r},parse:function(pr){var $r=ya(pr+="",!1);return $r.toString=function(){return pr},$r},utcFormat:function(pr){var $r=vi(pr+="",Qa);return $r.toString=function(){return pr},$r},utcParse:function(pr){var $r=ya(pr+="",!0);return $r.toString=function(){return pr},$r}}}var l={"-":"",_:" ",0:"0"},f=/^\s*\d+/,h=/^%/,v=/[\\^$*+?|[\]().{}]/g;function m(Fe,Ge,bt){var dt=Fe<0?"-":"",gr=(dt?-Fe:Fe)+"",Er=gr.length;return dt+(Er68?1900:2e3),bt+dt[0].length):-1}function O(Fe,Ge,bt){var dt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ge.slice(bt,bt+6));return dt?(Fe.Z=dt[1]?0:-(dt[2]+(dt[3]||"00")),bt+dt[0].length):-1}function H(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+1));return dt?(Fe.q=dt[0]*3-3,bt+dt[0].length):-1}function V(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.m=dt[0]-1,bt+dt[0].length):-1}function W(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.d=+dt[0],bt+dt[0].length):-1}function J(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+3));return dt?(Fe.m=0,Fe.d=+dt[0],bt+dt[0].length):-1}function re(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.H=+dt[0],bt+dt[0].length):-1}function oe(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.M=+dt[0],bt+dt[0].length):-1}function ne(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+2));return dt?(Fe.S=+dt[0],bt+dt[0].length):-1}function fe(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+3));return dt?(Fe.L=+dt[0],bt+dt[0].length):-1}function ve(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt,bt+6));return dt?(Fe.L=Math.floor(dt[0]/1e3),bt+dt[0].length):-1}function Ce(Fe,Ge,bt){var dt=h.exec(Ge.slice(bt,bt+1));return dt?bt+dt[0].length:-1}function Se(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt));return dt?(Fe.Q=+dt[0],bt+dt[0].length):-1}function Te(Fe,Ge,bt){var dt=f.exec(Ge.slice(bt));return dt?(Fe.s=+dt[0],bt+dt[0].length):-1}function pe(Fe,Ge){return m(Fe.getDate(),Ge,2)}function Ae(Fe,Ge){return m(Fe.getHours(),Ge,2)}function Me(Fe,Ge){return m(Fe.getHours()%12||12,Ge,2)}function Le(Fe,Ge){return m(1+t.timeDay.count(t.timeYear(Fe),Fe),Ge,3)}function Ke(Fe,Ge){return m(Fe.getMilliseconds(),Ge,3)}function ht(Fe,Ge){return Ke(Fe,Ge)+"000"}function it(Fe,Ge){return m(Fe.getMonth()+1,Ge,2)}function lt(Fe,Ge){return m(Fe.getMinutes(),Ge,2)}function He(Fe,Ge){return m(Fe.getSeconds(),Ge,2)}function _t(Fe){var Ge=Fe.getDay();return Ge===0?7:Ge}function at(Fe,Ge){return m(t.timeSunday.count(t.timeYear(Fe)-1,Fe),Ge,2)}function At(Fe,Ge){var bt=Fe.getDay();return Fe=bt>=4||bt===0?t.timeThursday(Fe):t.timeThursday.ceil(Fe),m(t.timeThursday.count(t.timeYear(Fe),Fe)+(t.timeYear(Fe).getDay()===4),Ge,2)}function kt(Fe){return Fe.getDay()}function pt(Fe,Ge){return m(t.timeMonday.count(t.timeYear(Fe)-1,Fe),Ge,2)}function ge(Fe,Ge){return m(Fe.getFullYear()%100,Ge,2)}function Re(Fe,Ge){return m(Fe.getFullYear()%1e4,Ge,4)}function xe(Fe){var Ge=Fe.getTimezoneOffset();return(Ge>0?"-":(Ge*=-1,"+"))+m(Ge/60|0,"0",2)+m(Ge%60,"0",2)}function et(Fe,Ge){return m(Fe.getUTCDate(),Ge,2)}function vt(Fe,Ge){return m(Fe.getUTCHours(),Ge,2)}function tt(Fe,Ge){return m(Fe.getUTCHours()%12||12,Ge,2)}function Nt(Fe,Ge){return m(1+t.utcDay.count(t.utcYear(Fe),Fe),Ge,3)}function Mt(Fe,Ge){return m(Fe.getUTCMilliseconds(),Ge,3)}function Ct(Fe,Ge){return Mt(Fe,Ge)+"000"}function Rt(Fe,Ge){return m(Fe.getUTCMonth()+1,Ge,2)}function Ut(Fe,Ge){return m(Fe.getUTCMinutes(),Ge,2)}function xt(Fe,Ge){return m(Fe.getUTCSeconds(),Ge,2)}function Et(Fe){var Ge=Fe.getUTCDay();return Ge===0?7:Ge}function ir(Fe,Ge){return m(t.utcSunday.count(t.utcYear(Fe)-1,Fe),Ge,2)}function Wt(Fe,Ge){var bt=Fe.getUTCDay();return Fe=bt>=4||bt===0?t.utcThursday(Fe):t.utcThursday.ceil(Fe),m(t.utcThursday.count(t.utcYear(Fe),Fe)+(t.utcYear(Fe).getUTCDay()===4),Ge,2)}function Be(Fe){return Fe.getUTCDay()}function ft(Fe,Ge){return m(t.utcMonday.count(t.utcYear(Fe)-1,Fe),Ge,2)}function mt(Fe,Ge){return m(Fe.getUTCFullYear()%100,Ge,2)}function Ar(Fe,Ge){return m(Fe.getUTCFullYear()%1e4,Ge,4)}function dr(){return"+0000"}function Tt(){return"%"}function wt(Fe){return+Fe}function Vt(Fe){return Math.floor(+Fe/1e3)}var Kt;Ht({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 Ht(Fe){return Kt=s(Fe),e.timeFormat=Kt.format,e.timeParse=Kt.parse,e.utcFormat=Kt.utcFormat,e.utcParse=Kt.utcParse,Kt}var Ot="%Y-%m-%dT%H:%M:%S.%LZ";function er(Fe){return Fe.toISOString()}var Mr=Date.prototype.toISOString?er:e.utcFormat(Ot);function xr(Fe){var Ge=new Date(Fe);return isNaN(Ge)?null:Ge}var Pt=+new Date("2000-01-01T00:00:00.000Z")?xr:e.utcParse(Ot);e.isoFormat=Mr,e.isoParse=Pt,e.timeFormatDefaultLocale=Ht,e.timeFormatLocale=s,Object.defineProperty(e,"__esModule",{value:!0})})});var q3=de((Y1,w7)=>{(function(e,t){typeof Y1=="object"&&typeof w7!="undefined"?t(Y1):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(Y1,function(e){"use strict";function t(V){return Math.abs(V=Math.round(V))>=1e21?V.toLocaleString("en").replace(/,/g,""):V.toString(10)}function r(V,W){if((J=(V=W?V.toExponential(W-1):V.toExponential()).indexOf("e"))<0)return null;var J,re=V.slice(0,J);return[re.length>1?re[0]+re.slice(2):re,+V.slice(J+1)]}function i(V){return V=r(Math.abs(V)),V?V[1]:NaN}function a(V,W){return function(J,re){for(var oe=J.length,ne=[],fe=0,ve=V[0],Ce=0;oe>0&&ve>0&&(Ce+ve+1>re&&(ve=Math.max(1,re-Ce)),ne.push(J.substring(oe-=ve,oe+ve)),!((Ce+=ve+1)>re));)ve=V[fe=(fe+1)%V.length];return ne.reverse().join(W)}}function s(V){return function(W){return W.replace(/[0-9]/g,function(J){return V[+J]})}}var l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function f(V){if(!(W=l.exec(V)))throw new Error("invalid format: "+V);var W;return new h({fill:W[1],align:W[2],sign:W[3],symbol:W[4],zero:W[5],width:W[6],comma:W[7],precision:W[8]&&W[8].slice(1),trim:W[9],type:W[10]})}f.prototype=h.prototype;function h(V){this.fill=V.fill===void 0?" ":V.fill+"",this.align=V.align===void 0?">":V.align+"",this.sign=V.sign===void 0?"-":V.sign+"",this.symbol=V.symbol===void 0?"":V.symbol+"",this.zero=!!V.zero,this.width=V.width===void 0?void 0:+V.width,this.comma=!!V.comma,this.precision=V.precision===void 0?void 0:+V.precision,this.trim=!!V.trim,this.type=V.type===void 0?"":V.type+""}h.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 v(V){e:for(var W=V.length,J=1,re=-1,oe;J0&&(re=0);break}return re>0?V.slice(0,re)+V.slice(oe+1):V}var m;function b(V,W){var J=r(V,W);if(!J)return V+"";var re=J[0],oe=J[1],ne=oe-(m=Math.max(-8,Math.min(8,Math.floor(oe/3)))*3)+1,fe=re.length;return ne===fe?re:ne>fe?re+new Array(ne-fe+1).join("0"):ne>0?re.slice(0,ne)+"."+re.slice(ne):"0."+new Array(1-ne).join("0")+r(V,Math.max(0,W+ne-1))[0]}function T(V,W){var J=r(V,W);if(!J)return V+"";var re=J[0],oe=J[1];return oe<0?"0."+new Array(-oe).join("0")+re:re.length>oe+1?re.slice(0,oe+1)+"."+re.slice(oe+1):re+new Array(oe-re.length+2).join("0")}var S={"%":function(V,W){return(V*100).toFixed(W)},b:function(V){return Math.round(V).toString(2)},c:function(V){return V+""},d:t,e:function(V,W){return V.toExponential(W)},f:function(V,W){return V.toFixed(W)},g:function(V,W){return V.toPrecision(W)},o:function(V){return Math.round(V).toString(8)},p:function(V,W){return T(V*100,W)},r:T,s:b,X:function(V){return Math.round(V).toString(16).toUpperCase()},x:function(V){return Math.round(V).toString(16)}};function C(V){return V}var P=Array.prototype.map,E=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function I(V){var W=V.grouping===void 0||V.thousands===void 0?C:a(P.call(V.grouping,Number),V.thousands+""),J=V.currency===void 0?"":V.currency[0]+"",re=V.currency===void 0?"":V.currency[1]+"",oe=V.decimal===void 0?".":V.decimal+"",ne=V.numerals===void 0?C:s(P.call(V.numerals,String)),fe=V.percent===void 0?"%":V.percent+"",ve=V.minus===void 0?"-":V.minus+"",Ce=V.nan===void 0?"NaN":V.nan+"";function Se(pe){pe=f(pe);var Ae=pe.fill,Me=pe.align,Le=pe.sign,Ke=pe.symbol,ht=pe.zero,it=pe.width,lt=pe.comma,He=pe.precision,_t=pe.trim,at=pe.type;at==="n"?(lt=!0,at="g"):S[at]||(He===void 0&&(He=12),_t=!0,at="g"),(ht||Ae==="0"&&Me==="=")&&(ht=!0,Ae="0",Me="=");var At=Ke==="$"?J:Ke==="#"&&/[boxX]/.test(at)?"0"+at.toLowerCase():"",kt=Ke==="$"?re:/[%p]/.test(at)?fe:"",pt=S[at],ge=/[defgprs%]/.test(at);He=He===void 0?6:/[gprs]/.test(at)?Math.max(1,Math.min(21,He)):Math.max(0,Math.min(20,He));function Re(xe){var et=At,vt=kt,tt,Nt,Mt;if(at==="c")vt=pt(xe)+vt,xe="";else{xe=+xe;var Ct=xe<0||1/xe<0;if(xe=isNaN(xe)?Ce:pt(Math.abs(xe),He),_t&&(xe=v(xe)),Ct&&+xe==0&&Le!=="+"&&(Ct=!1),et=(Ct?Le==="("?Le:ve:Le==="-"||Le==="("?"":Le)+et,vt=(at==="s"?E[8+m/3]:"")+vt+(Ct&&Le==="("?")":""),ge){for(tt=-1,Nt=xe.length;++ttMt||Mt>57){vt=(Mt===46?oe+xe.slice(tt+1):xe.slice(tt))+vt,xe=xe.slice(0,tt);break}}}lt&&!ht&&(xe=W(xe,1/0));var Rt=et.length+xe.length+vt.length,Ut=Rt>1)+et+xe+vt+Ut.slice(Rt);break;default:xe=Ut+et+xe+vt;break}return ne(xe)}return Re.toString=function(){return pe+""},Re}function Te(pe,Ae){var Me=Se((pe=f(pe),pe.type="f",pe)),Le=Math.max(-8,Math.min(8,Math.floor(i(Ae)/3)))*3,Ke=Math.pow(10,-Le),ht=E[8+Le/3];return function(it){return Me(Ke*it)+ht}}return{format:Se,formatPrefix:Te}}var F;N({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function N(V){return F=I(V),e.format=F.format,e.formatPrefix=F.formatPrefix,F}function z(V){return Math.max(0,-i(Math.abs(V)))}function O(V,W){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(i(W)/3)))*3-i(Math.abs(V)))}function H(V,W){return V=Math.abs(V),W=Math.abs(W)-V,Math.max(0,i(W)-i(V))+1}e.FormatSpecifier=h,e.formatDefaultLocale=N,e.formatLocale=I,e.formatSpecifier=f,e.precisionFixed=z,e.precisionPrefix=O,e.precisionRound=H,Object.defineProperty(e,"__esModule",{value:!0})})});var A7=de((wme,T7)=>{"use strict";T7.exports=function(e){for(var t=e.length,r,i=0;i13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Da=de((Tme,M7)=>{"use strict";var aj=A7();M7.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&aj(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Hi=de((Ame,S7)=>{"use strict";S7.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 N3=de((W1,k7)=>{(function(e,t){typeof W1=="object"&&typeof k7!="undefined"?t(W1):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(W1,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),i=0;i>2],m+=t[(f[h]&3)<<4|f[h+1]>>4],m+=t[(f[h+1]&15)<<2|f[h+2]>>6],m+=t[f[h+2]&63];return v%3===2?m=m.substring(0,m.length-1)+"=":v%3===1&&(m=m.substring(0,m.length-2)+"=="),m},s=function(l){var f=l.length*.75,h=l.length,v,m=0,b,T,S,C;l[l.length-1]==="="&&(f--,l[l.length-2]==="="&&f--);var P=new ArrayBuffer(f),E=new Uint8Array(P);for(v=0;v>4,E[m++]=(T&15)<<4|S>>2,E[m++]=(S&3)<<6|C&63;return P};e.decode=s,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})})});var cc=de((Mme,C7)=>{"use strict";C7.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 il=de(Pu=>{"use strict";var ij=N3().decode,nj=cc(),B3=Array.isArray,oj=ArrayBuffer,sj=DataView;function E7(e){return oj.isView(e)&&!(e instanceof sj)}Pu.isTypedArray=E7;function X1(e){return B3(e)||E7(e)}Pu.isArrayOrTypedArray=X1;function lj(e){return!X1(e[0])}Pu.isArray1D=lj;Pu.ensureArray=function(e,t){return B3(e)||(e=[]),e.length=t,e};var fo={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};fo.uint8c=fo.u1c;fo.uint8=fo.u1;fo.int8=fo.i1;fo.uint16=fo.u2;fo.int16=fo.i2;fo.uint32=fo.u4;fo.int32=fo.i4;fo.float32=fo.f4;fo.float64=fo.f8;function O3(e){return e.constructor===ArrayBuffer}Pu.isArrayBuffer=O3;Pu.decodeTypedArraySpec=function(e){var t=[],r=uj(e),i=r.dtype,a=fo[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var s=a.BYTES_PER_ELEMENT,l=r.bdata;O3(l)||(l=ij(l));var f=r.shape===void 0?[l.byteLength/s]:(""+r.shape).split(",");f.reverse();var h=f.length,v,m,b=+f[0],T=s*b,S=0;if(h===1)t=new a(l);else if(h===2)for(v=+f[1],m=0;m{"use strict";var P7=Da(),V3=il().isArrayOrTypedArray;R7.exports=function(t,r){if(P7(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var i=r.split("."),a,s,l,f;for(f=0;f{"use strict";var l0=wy(),dj=/^\w*$/,pj=0,F7=1,j1=2,q7=3,$v=4;N7.exports=function(t,r,i,a){i=i||"name",a=a||"value";var s,l,f,h={};r&&r.length?(f=l0(t,r),l=f.get()):l=t,r=r||"";var v={};if(l)for(s=0;s2)return h[S]=h[S]|j1,b.set(T,null);if(m){for(s=S;s{"use strict";var mj=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,yj=/^[^\.\[\]]+$/;O7.exports=function(e,t){for(;t;){var r=e.match(mj);if(r)e=r[1];else if(e.match(yj))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 J1=de((Lme,V7)=>{"use strict";var gj=Da();V7.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var i=Math.log(Math.min(r[0],r[1]))/Math.LN10;return gj(i)||(i=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),i}});var Z7=de((Pme,G7)=>{"use strict";var H7=il().isArrayOrTypedArray,Ty=cc();G7.exports=function e(t,r){for(var i in r){var a=r[i],s=t[i];if(s!==a)if(i.charAt(0)==="_"||typeof a=="function"){if(i in t)continue;t[i]=a}else if(H7(a)&&H7(s)&&Ty(a[0])){if(i==="customdata"||i==="ids")continue;for(var l=Math.min(a.length,s.length),f=0;f{"use strict";function _j(e,t){var r=e%t;return r<0?r+t:r}function xj(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Y7.exports={mod:_j,modHalf:xj}});var Tf=de((zme,K1)=>{(function(e){var t=/^\s+/,r=/\s+$/,i=0,a=e.round,s=e.min,l=e.max,f=e.random;function h(ge,Re){if(ge=ge||"",Re=Re||{},ge instanceof h)return ge;if(!(this instanceof h))return new h(ge,Re);var xe=v(ge);this._originalInput=ge,this._r=xe.r,this._g=xe.g,this._b=xe.b,this._a=xe.a,this._roundA=a(100*this._a)/100,this._format=Re.format||xe.format,this._gradientType=Re.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=xe.ok,this._tc_id=i++}h.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,xe,et,vt,tt,Nt;return Re=ge.r/255,xe=ge.g/255,et=ge.b/255,Re<=.03928?vt=Re/12.92:vt=e.pow((Re+.055)/1.055,2.4),xe<=.03928?tt=xe/12.92:tt=e.pow((xe+.055)/1.055,2.4),et<=.03928?Nt=et/12.92:Nt=e.pow((et+.055)/1.055,2.4),.2126*vt+.7152*tt+.0722*Nt},setAlpha:function(ge){return this._a=pe(ge),this._roundA=a(100*this._a)/100,this},toHsv:function(){var ge=S(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,v:ge.v,a:this._a}},toHsvString:function(){var ge=S(this._r,this._g,this._b),Re=a(ge.h*360),xe=a(ge.s*100),et=a(ge.v*100);return this._a==1?"hsv("+Re+", "+xe+"%, "+et+"%)":"hsva("+Re+", "+xe+"%, "+et+"%, "+this._roundA+")"},toHsl:function(){var ge=b(this._r,this._g,this._b);return{h:ge.h*360,s:ge.s,l:ge.l,a:this._a}},toHslString:function(){var ge=b(this._r,this._g,this._b),Re=a(ge.h*360),xe=a(ge.s*100),et=a(ge.l*100);return this._a==1?"hsl("+Re+", "+xe+"%, "+et+"%)":"hsla("+Re+", "+xe+"%, "+et+"%, "+this._roundA+")"},toHex:function(ge){return P(this._r,this._g,this._b,ge)},toHexString:function(ge){return"#"+this.toHex(ge)},toHex8:function(ge){return E(this._r,this._g,this._b,this._a,ge)},toHex8String:function(ge){return"#"+this.toHex8(ge)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(Ae(this._r,255)*100)+"%",g:a(Ae(this._g,255)*100)+"%",b:a(Ae(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+a(Ae(this._r,255)*100)+"%, "+a(Ae(this._g,255)*100)+"%, "+a(Ae(this._b,255)*100)+"%)":"rgba("+a(Ae(this._r,255)*100)+"%, "+a(Ae(this._g,255)*100)+"%, "+a(Ae(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Se[P(this._r,this._g,this._b,!0)]||!1},toFilter:function(ge){var Re="#"+I(this._r,this._g,this._b,this._a),xe=Re,et=this._gradientType?"GradientType = 1, ":"";if(ge){var vt=h(ge);xe="#"+I(vt._r,vt._g,vt._b,vt._a)}return"progid:DXImageTransform.Microsoft.gradient("+et+"startColorstr="+Re+",endColorstr="+xe+")"},toString:function(ge){var Re=!!ge;ge=ge||this._format;var xe=!1,et=this._a<1&&this._a>=0,vt=!Re&&et&&(ge==="hex"||ge==="hex6"||ge==="hex3"||ge==="hex4"||ge==="hex8"||ge==="name");return vt?ge==="name"&&this._a===0?this.toName():this.toRgbString():(ge==="rgb"&&(xe=this.toRgbString()),ge==="prgb"&&(xe=this.toPercentageRgbString()),(ge==="hex"||ge==="hex6")&&(xe=this.toHexString()),ge==="hex3"&&(xe=this.toHexString(!0)),ge==="hex4"&&(xe=this.toHex8String(!0)),ge==="hex8"&&(xe=this.toHex8String()),ge==="name"&&(xe=this.toName()),ge==="hsl"&&(xe=this.toHslString()),ge==="hsv"&&(xe=this.toHsvString()),xe||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(ge,Re){var xe=ge.apply(null,[this].concat([].slice.call(Re)));return this._r=xe._r,this._g=xe._g,this._b=xe._b,this.setAlpha(xe._a),this},lighten:function(){return this._applyModification(O,arguments)},brighten:function(){return this._applyModification(H,arguments)},darken:function(){return this._applyModification(V,arguments)},desaturate:function(){return this._applyModification(F,arguments)},saturate:function(){return this._applyModification(N,arguments)},greyscale:function(){return this._applyModification(z,arguments)},spin:function(){return this._applyModification(W,arguments)},_applyCombination:function(ge,Re){return ge.apply(null,[this].concat([].slice.call(Re)))},analogous:function(){return this._applyCombination(fe,arguments)},complement:function(){return this._applyCombination(J,arguments)},monochromatic:function(){return this._applyCombination(ve,arguments)},splitcomplement:function(){return this._applyCombination(ne,arguments)},triad:function(){return this._applyCombination(re,arguments)},tetrad:function(){return this._applyCombination(oe,arguments)}},h.fromRatio=function(ge,Re){if(typeof ge=="object"){var xe={};for(var et in ge)ge.hasOwnProperty(et)&&(et==="a"?xe[et]=ge[et]:xe[et]=lt(ge[et]));ge=xe}return h(ge,Re)};function v(ge){var Re={r:0,g:0,b:0},xe=1,et=null,vt=null,tt=null,Nt=!1,Mt=!1;return typeof ge=="string"&&(ge=kt(ge)),typeof ge=="object"&&(At(ge.r)&&At(ge.g)&&At(ge.b)?(Re=m(ge.r,ge.g,ge.b),Nt=!0,Mt=String(ge.r).substr(-1)==="%"?"prgb":"rgb"):At(ge.h)&&At(ge.s)&&At(ge.v)?(et=lt(ge.s),vt=lt(ge.v),Re=C(ge.h,et,vt),Nt=!0,Mt="hsv"):At(ge.h)&&At(ge.s)&&At(ge.l)&&(et=lt(ge.s),tt=lt(ge.l),Re=T(ge.h,et,tt),Nt=!0,Mt="hsl"),ge.hasOwnProperty("a")&&(xe=ge.a)),xe=pe(xe),{ok:Nt,format:ge.format||Mt,r:s(255,l(Re.r,0)),g:s(255,l(Re.g,0)),b:s(255,l(Re.b,0)),a:xe}}function m(ge,Re,xe){return{r:Ae(ge,255)*255,g:Ae(Re,255)*255,b:Ae(xe,255)*255}}function b(ge,Re,xe){ge=Ae(ge,255),Re=Ae(Re,255),xe=Ae(xe,255);var et=l(ge,Re,xe),vt=s(ge,Re,xe),tt,Nt,Mt=(et+vt)/2;if(et==vt)tt=Nt=0;else{var Ct=et-vt;switch(Nt=Mt>.5?Ct/(2-et-vt):Ct/(et+vt),et){case ge:tt=(Re-xe)/Ct+(Re1&&(xt-=1),xt<1/6?Rt+(Ut-Rt)*6*xt:xt<1/2?Ut:xt<2/3?Rt+(Ut-Rt)*(2/3-xt)*6:Rt}if(Re===0)et=vt=tt=xe;else{var Mt=xe<.5?xe*(1+Re):xe+Re-xe*Re,Ct=2*xe-Mt;et=Nt(Ct,Mt,ge+1/3),vt=Nt(Ct,Mt,ge),tt=Nt(Ct,Mt,ge-1/3)}return{r:et*255,g:vt*255,b:tt*255}}function S(ge,Re,xe){ge=Ae(ge,255),Re=Ae(Re,255),xe=Ae(xe,255);var et=l(ge,Re,xe),vt=s(ge,Re,xe),tt,Nt,Mt=et,Ct=et-vt;if(Nt=et===0?0:Ct/et,et==vt)tt=0;else{switch(et){case ge:tt=(Re-xe)/Ct+(Re>1)+720)%360;--Re;)et.h=(et.h+vt)%360,tt.push(h(et));return tt}function ve(ge,Re){Re=Re||6;for(var xe=h(ge).toHsv(),et=xe.h,vt=xe.s,tt=xe.v,Nt=[],Mt=1/Re;Re--;)Nt.push(h({h:et,s:vt,v:tt})),tt=(tt+Mt)%1;return Nt}h.mix=function(ge,Re,xe){xe=xe===0?0:xe||50;var et=h(ge).toRgb(),vt=h(Re).toRgb(),tt=xe/100,Nt={r:(vt.r-et.r)*tt+et.r,g:(vt.g-et.g)*tt+et.g,b:(vt.b-et.b)*tt+et.b,a:(vt.a-et.a)*tt+et.a};return h(Nt)},h.readability=function(ge,Re){var xe=h(ge),et=h(Re);return(e.max(xe.getLuminance(),et.getLuminance())+.05)/(e.min(xe.getLuminance(),et.getLuminance())+.05)},h.isReadable=function(ge,Re,xe){var et=h.readability(ge,Re),vt,tt;switch(tt=!1,vt=pt(xe),vt.level+vt.size){case"AAsmall":case"AAAlarge":tt=et>=4.5;break;case"AAlarge":tt=et>=3;break;case"AAAsmall":tt=et>=7;break}return tt},h.mostReadable=function(ge,Re,xe){var et=null,vt=0,tt,Nt,Mt,Ct;xe=xe||{},Nt=xe.includeFallbackColors,Mt=xe.level,Ct=xe.size;for(var Rt=0;Rtvt&&(vt=tt,et=h(Re[Rt]));return h.isReadable(ge,et,{level:Mt,size:Ct})||!Nt?et:(xe.includeFallbackColors=!1,h.mostReadable(ge,["#fff","#000"],xe))};var Ce=h.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"},Se=h.hexNames=Te(Ce);function Te(ge){var Re={};for(var xe in ge)ge.hasOwnProperty(xe)&&(Re[ge[xe]]=xe);return Re}function pe(ge){return ge=parseFloat(ge),(isNaN(ge)||ge<0||ge>1)&&(ge=1),ge}function Ae(ge,Re){Ke(ge)&&(ge="100%");var xe=ht(ge);return ge=s(Re,l(0,parseFloat(ge))),xe&&(ge=parseInt(ge*Re,10)/100),e.abs(ge-Re)<1e-6?1:ge%Re/parseFloat(Re)}function Me(ge){return s(1,l(0,ge))}function Le(ge){return parseInt(ge,16)}function Ke(ge){return typeof ge=="string"&&ge.indexOf(".")!=-1&&parseFloat(ge)===1}function ht(ge){return typeof ge=="string"&&ge.indexOf("%")!=-1}function it(ge){return ge.length==1?"0"+ge:""+ge}function lt(ge){return ge<=1&&(ge=ge*100+"%"),ge}function He(ge){return e.round(parseFloat(ge)*255).toString(16)}function _t(ge){return Le(ge)/255}var at=function(){var ge="[-\\+]?\\d+%?",Re="[-\\+]?\\d*\\.\\d+%?",xe="(?:"+Re+")|(?:"+ge+")",et="[\\s|\\(]+("+xe+")[,|\\s]+("+xe+")[,|\\s]+("+xe+")\\s*\\)?",vt="[\\s|\\(]+("+xe+")[,|\\s]+("+xe+")[,|\\s]+("+xe+")[,|\\s]+("+xe+")\\s*\\)?";return{CSS_UNIT:new RegExp(xe),rgb:new RegExp("rgb"+et),rgba:new RegExp("rgba"+vt),hsl:new RegExp("hsl"+et),hsla:new RegExp("hsla"+vt),hsv:new RegExp("hsv"+et),hsva:new RegExp("hsva"+vt),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 At(ge){return!!at.CSS_UNIT.exec(ge)}function kt(ge){ge=ge.replace(t,"").replace(r,"").toLowerCase();var Re=!1;if(Ce[ge])ge=Ce[ge],Re=!0;else if(ge=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var xe;return(xe=at.rgb.exec(ge))?{r:xe[1],g:xe[2],b:xe[3]}:(xe=at.rgba.exec(ge))?{r:xe[1],g:xe[2],b:xe[3],a:xe[4]}:(xe=at.hsl.exec(ge))?{h:xe[1],s:xe[2],l:xe[3]}:(xe=at.hsla.exec(ge))?{h:xe[1],s:xe[2],l:xe[3],a:xe[4]}:(xe=at.hsv.exec(ge))?{h:xe[1],s:xe[2],v:xe[3]}:(xe=at.hsva.exec(ge))?{h:xe[1],s:xe[2],v:xe[3],a:xe[4]}:(xe=at.hex8.exec(ge))?{r:Le(xe[1]),g:Le(xe[2]),b:Le(xe[3]),a:_t(xe[4]),format:Re?"name":"hex8"}:(xe=at.hex6.exec(ge))?{r:Le(xe[1]),g:Le(xe[2]),b:Le(xe[3]),format:Re?"name":"hex"}:(xe=at.hex4.exec(ge))?{r:Le(xe[1]+""+xe[1]),g:Le(xe[2]+""+xe[2]),b:Le(xe[3]+""+xe[3]),a:_t(xe[4]+""+xe[4]),format:Re?"name":"hex8"}:(xe=at.hex3.exec(ge))?{r:Le(xe[1]+""+xe[1]),g:Le(xe[2]+""+xe[2]),b:Le(xe[3]+""+xe[3]),format:Re?"name":"hex"}:!1}function pt(ge){var Re,xe;return ge=ge||{level:"AA",size:"small"},Re=(ge.level||"AA").toUpperCase(),xe=(ge.size||"small").toLowerCase(),Re!=="AA"&&Re!=="AAA"&&(Re="AA"),xe!=="small"&&xe!=="large"&&(xe="small"),{level:Re,size:xe}}typeof K1!="undefined"&&K1.exports?K1.exports=h:typeof define=="function"&&define.amd?define(function(){return h}):window.tinycolor=h})(Math)});var hn=de(Sy=>{"use strict";var W7=cc(),Ay=Array.isArray;function bj(e,t){var r,i;for(r=0;r{"use strict";X7.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;i===void 0&&(i=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var s={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:a,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&&(s.size.dflt="auto"),e.autoColor&&(s.color.dflt="auto"),e.arrayOk&&(s.family.arrayOk=!0,s.weight.arrayOk=!0,s.style.arrayOk=!0,e.noFontVariant||(s.variant.arrayOk=!0),e.noFontTextcase||(s.textcase.arrayOk=!0),e.noFontLineposition||(s.lineposition.arrayOk=!0),e.noFontShadow||(s.shadow.arrayOk=!0),s.size.arrayOk=!0,s.color.arrayOk=!0),s}});var ky=de((Fme,j7)=>{"use strict";j7.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var f0=de((qme,Q7)=>{"use strict";var J7=ky(),K7=qo(),H3=K7({editType:"none"});H3.family.dflt=J7.HOVERFONT;H3.size.dflt=J7.HOVERFONTSIZE;Q7.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:H3,grouptitlefont:K7({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var e_=de((Nme,$7)=>{"use strict";var wj=qo(),Q1=f0().hoverlabel,$1=hn().extendFlat;$7.exports={hoverlabel:{bgcolor:$1({},Q1.bgcolor,{arrayOk:!0}),bordercolor:$1({},Q1.bordercolor,{arrayOk:!0}),font:wj({arrayOk:!0,editType:"none"}),align:$1({},Q1.align,{arrayOk:!0}),namelength:$1({},Q1.namelength,{arrayOk:!0}),editType:"none"}}});var ms=de((Bme,e8)=>{"use strict";var Tj=qo(),Aj=e_();e8.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:Tj({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:Aj.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 ed=de((Ome,a8)=>{"use strict";var Mj=Tf(),t_={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)"]]},t8=t_.RdBu;function Sj(e,t){if(t||(t=t8),!e)return t;function r(){try{e=t_[e]||JSON.parse(e)}catch(i){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),r8(e)?e:t}function r8(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";td.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];td.defaultLine="#444";td.lightLine="#eee";td.background="#fff";td.borderLine="#BEC8D9";td.lightFraction=100*10/11});var Ua=de((Vme,i8)=>{"use strict";var Rs=Tf(),Cj=Da(),Ej=il().isTypedArray,Qn=i8.exports={},r_=Af();Qn.defaults=r_.defaults;var Lj=Qn.defaultLine=r_.defaultLine;Qn.lightLine=r_.lightLine;var Z3=Qn.background=r_.background;Qn.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};Qn.rgb=function(e){return Qn.tinyRGB(Rs(e))};Qn.opacity=function(e){return e?Rs(e).getAlpha():0};Qn.addOpacity=function(e,t){var r=Rs(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};Qn.combine=function(e,t){var r=Rs(e).toRgb();if(r.a===1)return Rs(e).toRgbString();var i=Rs(t||Z3).toRgb(),a=i.a===1?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},s={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return Rs(s).toRgbString()};Qn.interpolate=function(e,t,r){var i=Rs(e).toRgb(),a=Rs(t).toRgb(),s={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return Rs(s).toRgbString()};Qn.contrast=function(e,t,r){var i=Rs(e);i.getAlpha()!==1&&(i=Rs(Qn.combine(e,Z3)));var a=i.isDark()?t?i.lighten(t):Z3:r?i.darken(r):Lj;return a.toString()};Qn.stroke=function(e,t){var r=Rs(t);e.style({stroke:Qn.tinyRGB(r),"stroke-opacity":r.getAlpha()})};Qn.fill=function(e,t){var r=Rs(t);e.style({fill:Qn.tinyRGB(r),"fill-opacity":r.getAlpha()})};Qn.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,i,a,s;for(r=0;r=0)))return e;if(s===3)i[s]>1&&(i[s]=1);else if(i[s]>=1)return e}var l=Math.round(i[0]*255)+", "+Math.round(i[1]*255)+", "+Math.round(i[2]*255);return a?"rgba("+l+", "+i[3]+")":"rgb("+l+")"}});var a_=de((Hme,n8)=>{"use strict";n8.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var c0=de(o8=>{"use strict";o8.counter=function(e,t,r,i){var a=(t||"")+(r?"":"$"),s=i===!1?"":"^";return e==="xy"?new RegExp(s+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(s+e+"([2-9]|[1-9][0-9]+)?"+a)}});var f8=de(Fs=>{"use strict";var Y3=Da(),s8=Tf(),l8=hn().extendFlat,Pj=ms(),Dj=ed(),zj=Ua(),Ij=a_().DESELECTDIM,h0=wy(),u8=c0().counter,Rj=u0().modHalf,Mf=il().isArrayOrTypedArray,bh=il().isTypedArraySpec,wh=il().decodeTypedArraySpec;Fs.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Mf(e)?e:bh(e)?wh(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e=+e),i.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,i=0;ii.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}bh(e)&&(e=wh(e)),e%1||!Y3(e)||i.min!==void 0&&ei.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,i){if(typeof e!="string"){var a=typeof e=="number";i.strict===!0||!a?t.set(r):t.set(String(e))}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){bh(e)&&(e=wh(e)),s8(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function i(a){return s8(a).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(i)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(Dj.get(e,r))}},angle:{coerceFunction:function(e,t,r){bh(e)&&(e=wh(e)),e==="auto"?t.set("auto"):Y3(e)?t.set(Rj(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,i){var a=i.regex||u8(r);if(typeof e=="string"&&a.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!u8(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),s=0;s{"use strict";var c8={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/"},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:{}}},h8={};function v8(e,t){for(var r in e){var i=e[r];i.valType?t[r]=i.dflt:(t[r]||(t[r]={}),v8(i,t[r]))}}v8(c8,h8);d8.exports={configAttributes:c8,dfltConfig:h8}});var X3=de((Wme,p8)=>{"use strict";var W3=ja(),Fj=Da(),Cy=[];p8.exports=function(e,t){if(Cy.indexOf(e)!==-1)return;Cy.push(e);var r=1e3;Fj(t)?r=t:t==="long"&&(r=3e3);var i=W3.select("body").selectAll(".plotly-notifier").data([0]);i.enter().append("div").classed("plotly-notifier",!0);var a=i.selectAll(".notifier-note").data(Cy);function s(l){l.duration(700).style("opacity",0).each("end",function(f){var h=Cy.indexOf(f);h!==-1&&Cy.splice(h,1),W3.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var f=W3.select(this);f.append("button").classed("notifier-close",!0).html("×").on("click",function(){f.transition().call(s)});for(var h=f.append("p"),v=l.split(//g),m=0;m{"use strict";var v0=rd().dfltConfig,j3=X3(),J3=m8.exports={};J3.log=function(){var e;if(v0.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};J3.warn=function(){var e;if(v0.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};J3.error=function(){var e;if(v0.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var n_=de((jme,y8)=>{"use strict";y8.exports=function(){}});var K3=de((Jme,g8)=>{"use strict";g8.exports=function(t,r){if(r instanceof RegExp){for(var i=r.toString(),a=0;a{_8.exports=qj;function qj(){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 w8=de((Qme,b8)=>{b8.exports=Nj;function Nj(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 A8=de(($me,T8)=>{T8.exports=Bj;function Bj(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 Q3=de((eye,M8)=>{M8.exports=Oj;function Oj(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 k8=de((tye,S8)=>{S8.exports=Uj;function Uj(e,t){if(e===t){var r=t[1],i=t[2],a=t[3],s=t[6],l=t[7],f=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=s,e[11]=t[14],e[12]=a,e[13]=l,e[14]=f}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 E8=de((rye,C8)=>{C8.exports=Vj;function Vj(e,t){var r=t[0],i=t[1],a=t[2],s=t[3],l=t[4],f=t[5],h=t[6],v=t[7],m=t[8],b=t[9],T=t[10],S=t[11],C=t[12],P=t[13],E=t[14],I=t[15],F=r*f-i*l,N=r*h-a*l,z=r*v-s*l,O=i*h-a*f,H=i*v-s*f,V=a*v-s*h,W=m*P-b*C,J=m*E-T*C,re=m*I-S*C,oe=b*E-T*P,ne=b*I-S*P,fe=T*I-S*E,ve=F*fe-N*ne+z*oe+O*re-H*J+V*W;return ve?(ve=1/ve,e[0]=(f*fe-h*ne+v*oe)*ve,e[1]=(a*ne-i*fe-s*oe)*ve,e[2]=(P*V-E*H+I*O)*ve,e[3]=(T*H-b*V-S*O)*ve,e[4]=(h*re-l*fe-v*J)*ve,e[5]=(r*fe-a*re+s*J)*ve,e[6]=(E*z-C*V-I*N)*ve,e[7]=(m*V-T*z+S*N)*ve,e[8]=(l*ne-f*re+v*W)*ve,e[9]=(i*re-r*ne-s*W)*ve,e[10]=(C*H-P*z+I*F)*ve,e[11]=(b*z-m*H-S*F)*ve,e[12]=(f*J-l*oe-h*W)*ve,e[13]=(r*oe-i*J+a*W)*ve,e[14]=(P*N-C*O-E*F)*ve,e[15]=(m*O-b*N+T*F)*ve,e):null}});var P8=de((aye,L8)=>{L8.exports=Hj;function Hj(e,t){var r=t[0],i=t[1],a=t[2],s=t[3],l=t[4],f=t[5],h=t[6],v=t[7],m=t[8],b=t[9],T=t[10],S=t[11],C=t[12],P=t[13],E=t[14],I=t[15];return e[0]=f*(T*I-S*E)-b*(h*I-v*E)+P*(h*S-v*T),e[1]=-(i*(T*I-S*E)-b*(a*I-s*E)+P*(a*S-s*T)),e[2]=i*(h*I-v*E)-f*(a*I-s*E)+P*(a*v-s*h),e[3]=-(i*(h*S-v*T)-f*(a*S-s*T)+b*(a*v-s*h)),e[4]=-(l*(T*I-S*E)-m*(h*I-v*E)+C*(h*S-v*T)),e[5]=r*(T*I-S*E)-m*(a*I-s*E)+C*(a*S-s*T),e[6]=-(r*(h*I-v*E)-l*(a*I-s*E)+C*(a*v-s*h)),e[7]=r*(h*S-v*T)-l*(a*S-s*T)+m*(a*v-s*h),e[8]=l*(b*I-S*P)-m*(f*I-v*P)+C*(f*S-v*b),e[9]=-(r*(b*I-S*P)-m*(i*I-s*P)+C*(i*S-s*b)),e[10]=r*(f*I-v*P)-l*(i*I-s*P)+C*(i*v-s*f),e[11]=-(r*(f*S-v*b)-l*(i*S-s*b)+m*(i*v-s*f)),e[12]=-(l*(b*E-T*P)-m*(f*E-h*P)+C*(f*T-h*b)),e[13]=r*(b*E-T*P)-m*(i*E-a*P)+C*(i*T-a*b),e[14]=-(r*(f*E-h*P)-l*(i*E-a*P)+C*(i*h-a*f)),e[15]=r*(f*T-h*b)-l*(i*T-a*b)+m*(i*h-a*f),e}});var z8=de((iye,D8)=>{D8.exports=Gj;function Gj(e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],l=e[5],f=e[6],h=e[7],v=e[8],m=e[9],b=e[10],T=e[11],S=e[12],C=e[13],P=e[14],E=e[15],I=t*l-r*s,F=t*f-i*s,N=t*h-a*s,z=r*f-i*l,O=r*h-a*l,H=i*h-a*f,V=v*C-m*S,W=v*P-b*S,J=v*E-T*S,re=m*P-b*C,oe=m*E-T*C,ne=b*E-T*P;return I*ne-F*oe+N*re+z*J-O*W+H*V}});var R8=de((nye,I8)=>{I8.exports=Zj;function Zj(e,t,r){var i=t[0],a=t[1],s=t[2],l=t[3],f=t[4],h=t[5],v=t[6],m=t[7],b=t[8],T=t[9],S=t[10],C=t[11],P=t[12],E=t[13],I=t[14],F=t[15],N=r[0],z=r[1],O=r[2],H=r[3];return e[0]=N*i+z*f+O*b+H*P,e[1]=N*a+z*h+O*T+H*E,e[2]=N*s+z*v+O*S+H*I,e[3]=N*l+z*m+O*C+H*F,N=r[4],z=r[5],O=r[6],H=r[7],e[4]=N*i+z*f+O*b+H*P,e[5]=N*a+z*h+O*T+H*E,e[6]=N*s+z*v+O*S+H*I,e[7]=N*l+z*m+O*C+H*F,N=r[8],z=r[9],O=r[10],H=r[11],e[8]=N*i+z*f+O*b+H*P,e[9]=N*a+z*h+O*T+H*E,e[10]=N*s+z*v+O*S+H*I,e[11]=N*l+z*m+O*C+H*F,N=r[12],z=r[13],O=r[14],H=r[15],e[12]=N*i+z*f+O*b+H*P,e[13]=N*a+z*h+O*T+H*E,e[14]=N*s+z*v+O*S+H*I,e[15]=N*l+z*m+O*C+H*F,e}});var q8=de((oye,F8)=>{F8.exports=Yj;function Yj(e,t,r){var i=r[0],a=r[1],s=r[2],l,f,h,v,m,b,T,S,C,P,E,I;return t===e?(e[12]=t[0]*i+t[4]*a+t[8]*s+t[12],e[13]=t[1]*i+t[5]*a+t[9]*s+t[13],e[14]=t[2]*i+t[6]*a+t[10]*s+t[14],e[15]=t[3]*i+t[7]*a+t[11]*s+t[15]):(l=t[0],f=t[1],h=t[2],v=t[3],m=t[4],b=t[5],T=t[6],S=t[7],C=t[8],P=t[9],E=t[10],I=t[11],e[0]=l,e[1]=f,e[2]=h,e[3]=v,e[4]=m,e[5]=b,e[6]=T,e[7]=S,e[8]=C,e[9]=P,e[10]=E,e[11]=I,e[12]=l*i+m*a+C*s+t[12],e[13]=f*i+b*a+P*s+t[13],e[14]=h*i+T*a+E*s+t[14],e[15]=v*i+S*a+I*s+t[15]),e}});var B8=de((sye,N8)=>{N8.exports=Wj;function Wj(e,t,r){var i=r[0],a=r[1],s=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var U8=de((lye,O8)=>{O8.exports=Xj;function Xj(e,t,r,i){var a=i[0],s=i[1],l=i[2],f=Math.sqrt(a*a+s*s+l*l),h,v,m,b,T,S,C,P,E,I,F,N,z,O,H,V,W,J,re,oe,ne,fe,ve,Ce;return Math.abs(f)<1e-6?null:(f=1/f,a*=f,s*=f,l*=f,h=Math.sin(r),v=Math.cos(r),m=1-v,b=t[0],T=t[1],S=t[2],C=t[3],P=t[4],E=t[5],I=t[6],F=t[7],N=t[8],z=t[9],O=t[10],H=t[11],V=a*a*m+v,W=s*a*m+l*h,J=l*a*m-s*h,re=a*s*m-l*h,oe=s*s*m+v,ne=l*s*m+a*h,fe=a*l*m+s*h,ve=s*l*m-a*h,Ce=l*l*m+v,e[0]=b*V+P*W+N*J,e[1]=T*V+E*W+z*J,e[2]=S*V+I*W+O*J,e[3]=C*V+F*W+H*J,e[4]=b*re+P*oe+N*ne,e[5]=T*re+E*oe+z*ne,e[6]=S*re+I*oe+O*ne,e[7]=C*re+F*oe+H*ne,e[8]=b*fe+P*ve+N*Ce,e[9]=T*fe+E*ve+z*Ce,e[10]=S*fe+I*ve+O*Ce,e[11]=C*fe+F*ve+H*Ce,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var H8=de((uye,V8)=>{V8.exports=jj;function jj(e,t,r){var i=Math.sin(r),a=Math.cos(r),s=t[4],l=t[5],f=t[6],h=t[7],v=t[8],m=t[9],b=t[10],T=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]=s*a+v*i,e[5]=l*a+m*i,e[6]=f*a+b*i,e[7]=h*a+T*i,e[8]=v*a-s*i,e[9]=m*a-l*i,e[10]=b*a-f*i,e[11]=T*a-h*i,e}});var Z8=de((fye,G8)=>{G8.exports=Jj;function Jj(e,t,r){var i=Math.sin(r),a=Math.cos(r),s=t[0],l=t[1],f=t[2],h=t[3],v=t[8],m=t[9],b=t[10],T=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]=s*a-v*i,e[1]=l*a-m*i,e[2]=f*a-b*i,e[3]=h*a-T*i,e[8]=s*i+v*a,e[9]=l*i+m*a,e[10]=f*i+b*a,e[11]=h*i+T*a,e}});var W8=de((cye,Y8)=>{Y8.exports=Kj;function Kj(e,t,r){var i=Math.sin(r),a=Math.cos(r),s=t[0],l=t[1],f=t[2],h=t[3],v=t[4],m=t[5],b=t[6],T=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]=s*a+v*i,e[1]=l*a+m*i,e[2]=f*a+b*i,e[3]=h*a+T*i,e[4]=v*a-s*i,e[5]=m*a-l*i,e[6]=b*a-f*i,e[7]=T*a-h*i,e}});var j8=de((hye,X8)=>{X8.exports=Qj;function Qj(e,t,r){var i,a,s,l=r[0],f=r[1],h=r[2],v=Math.sqrt(l*l+f*f+h*h);return Math.abs(v)<1e-6?null:(v=1/v,l*=v,f*=v,h*=v,i=Math.sin(t),a=Math.cos(t),s=1-a,e[0]=l*l*s+a,e[1]=f*l*s+h*i,e[2]=h*l*s-f*i,e[3]=0,e[4]=l*f*s-h*i,e[5]=f*f*s+a,e[6]=h*f*s+l*i,e[7]=0,e[8]=l*h*s+f*i,e[9]=f*h*s-l*i,e[10]=h*h*s+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var K8=de((vye,J8)=>{J8.exports=$j;function $j(e,t,r){var i=t[0],a=t[1],s=t[2],l=t[3],f=i+i,h=a+a,v=s+s,m=i*f,b=i*h,T=i*v,S=a*h,C=a*v,P=s*v,E=l*f,I=l*h,F=l*v;return e[0]=1-(S+P),e[1]=b+F,e[2]=T-I,e[3]=0,e[4]=b-F,e[5]=1-(m+P),e[6]=C+E,e[7]=0,e[8]=T+I,e[9]=C-E,e[10]=1-(m+S),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var $8=de((dye,Q8)=>{Q8.exports=eJ;function eJ(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 tS=de((pye,eS)=>{eS.exports=tJ;function tJ(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 aS=de((mye,rS)=>{rS.exports=rJ;function rJ(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var nS=de((yye,iS)=>{iS.exports=aJ;function aJ(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var sS=de((gye,oS)=>{oS.exports=iJ;function iJ(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var $3=de((_ye,lS)=>{lS.exports=nJ;function nJ(e,t){var r=t[0],i=t[1],a=t[2],s=t[3],l=r+r,f=i+i,h=a+a,v=r*l,m=i*l,b=i*f,T=a*l,S=a*f,C=a*h,P=s*l,E=s*f,I=s*h;return e[0]=1-b-C,e[1]=m+I,e[2]=T-E,e[3]=0,e[4]=m-I,e[5]=1-v-C,e[6]=S+P,e[7]=0,e[8]=T+E,e[9]=S-P,e[10]=1-v-b,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fS=de((xye,uS)=>{uS.exports=oJ;function oJ(e,t,r,i,a,s,l){var f=1/(r-t),h=1/(a-i),v=1/(s-l);return e[0]=s*2*f,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s*2*h,e[6]=0,e[7]=0,e[8]=(r+t)*f,e[9]=(a+i)*h,e[10]=(l+s)*v,e[11]=-1,e[12]=0,e[13]=0,e[14]=l*s*2*v,e[15]=0,e}});var hS=de((bye,cS)=>{cS.exports=sJ;function sJ(e,t,r,i,a){var s=1/Math.tan(t/2),l=1/(i-a);return e[0]=s/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+i)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*i*l,e[15]=0,e}});var dS=de((wye,vS)=>{vS.exports=lJ;function lJ(e,t,r,i){var a=Math.tan(t.upDegrees*Math.PI/180),s=Math.tan(t.downDegrees*Math.PI/180),l=Math.tan(t.leftDegrees*Math.PI/180),f=Math.tan(t.rightDegrees*Math.PI/180),h=2/(l+f),v=2/(a+s);return e[0]=h,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=v,e[6]=0,e[7]=0,e[8]=-((l-f)*h*.5),e[9]=(a-s)*v*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}});var mS=de((Tye,pS)=>{pS.exports=uJ;function uJ(e,t,r,i,a,s,l){var f=1/(t-r),h=1/(i-a),v=1/(s-l);return e[0]=-2*f,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*h,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*v,e[11]=0,e[12]=(t+r)*f,e[13]=(a+i)*h,e[14]=(l+s)*v,e[15]=1,e}});var gS=de((Aye,yS)=>{var fJ=Q3();yS.exports=cJ;function cJ(e,t,r,i){var a,s,l,f,h,v,m,b,T,S,C=t[0],P=t[1],E=t[2],I=i[0],F=i[1],N=i[2],z=r[0],O=r[1],H=r[2];return Math.abs(C-z)<1e-6&&Math.abs(P-O)<1e-6&&Math.abs(E-H)<1e-6?fJ(e):(m=C-z,b=P-O,T=E-H,S=1/Math.sqrt(m*m+b*b+T*T),m*=S,b*=S,T*=S,a=F*T-N*b,s=N*m-I*T,l=I*b-F*m,S=Math.sqrt(a*a+s*s+l*l),S?(S=1/S,a*=S,s*=S,l*=S):(a=0,s=0,l=0),f=b*l-T*s,h=T*a-m*l,v=m*s-b*a,S=Math.sqrt(f*f+h*h+v*v),S?(S=1/S,f*=S,h*=S,v*=S):(f=0,h=0,v=0),e[0]=a,e[1]=f,e[2]=m,e[3]=0,e[4]=s,e[5]=h,e[6]=b,e[7]=0,e[8]=l,e[9]=v,e[10]=T,e[11]=0,e[12]=-(a*C+s*P+l*E),e[13]=-(f*C+h*P+v*E),e[14]=-(m*C+b*P+T*E),e[15]=1,e)}});var xS=de((Mye,_S)=>{_S.exports=hJ;function hJ(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 ew=de((Sye,bS)=>{bS.exports={create:x8(),clone:w8(),copy:A8(),identity:Q3(),transpose:k8(),invert:E8(),adjoint:P8(),determinant:z8(),multiply:R8(),translate:q8(),scale:B8(),rotate:U8(),rotateX:H8(),rotateY:Z8(),rotateZ:W8(),fromRotation:j8(),fromRotationTranslation:K8(),fromScaling:$8(),fromTranslation:tS(),fromXRotation:aS(),fromYRotation:nS(),fromZRotation:sS(),fromQuat:$3(),frustum:fS(),perspective:hS(),perspectiveFromFieldOfView:dS(),ortho:mS(),lookAt:gS(),str:xS()}});var o_=de(Sn=>{"use strict";var vJ=ew();Sn.init2dArray=function(e,t){for(var r=new Array(e),i=0;i{"use strict";var dJ=ja(),wS=Th(),pJ=o_(),mJ=ew();function yJ(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 gJ(e){var t=dJ.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function TS(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function _J(e,t){AS("global",e,t)}function AS(e,t,r){var i="plotly.js-style-"+e,a=document.getElementById(i);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",i),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var s=a.sheet;s?s.insertRule?s.insertRule(t+"{"+r+"}",0):s.addRule?s.addRule(t,r,0):wS.warn("addStyleRule failed"):wS.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function xJ(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&TS(r)}function bJ(e,t,r,i,a){var s=i.split(":"),l=a.split(":"),f="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(h){h.getAttribute(f)||(h.addEventListener("mouseenter",function(){var v=this.querySelector(r);v&&(v.style[s[0]]=s[1])}),h.addEventListener("mouseleave",function(){var v=this.querySelector(r);v&&(t&&this.matches(t)?v.style[s[0]]=s[1]:v.style[l[0]]=l[1])}),h.setAttribute(f,!0))})}function wJ(e){var t=SS(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(i){var a=MS(i);if(a){var s=pJ.convertCssMatrix(a);r=mJ.multiply(r,r,s)}}),r}function MS(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(i){return+i})}function SS(e){for(var t=[];TJ(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function TJ(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function AJ(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}kS.exports={getGraphDiv:yJ,isPlotDiv:gJ,removeElement:TS,addStyleRule:_J,addRelatedStyleRule:AS,deleteRelatedStyleRule:xJ,setStyleOnHover:bJ,getFullTransformMatrix:wJ,getElementTransformMatrix:MS,getElementAndAncestors:SS,equalDomRects:AJ}});var Ly=de((Eye,CS)=>{"use strict";CS.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 nl=de((Lye,RS)=>{"use strict";var LS=hn().extendFlat,MJ=cc(),PS={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},DS={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},SJ=PS.flags.slice().concat(["fullReplot"]),kJ=DS.flags.slice().concat("layoutReplot");RS.exports={traces:PS,layout:DS,traceFlags:function(){return ES(SJ)},layoutFlags:function(){return ES(kJ)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var i=r.split("+"),a=0;a{"use strict";tw.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};tw.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 rw=de((Dye,FS)=>{"use strict";FS.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 Hl=de(s_=>{"use strict";var qS=rw(),zye=qS.FORMAT_LINK,Iye=qS.DATE_FORMAT_LINK;function aw(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var i=[],a=0;a{"use strict";function Ah(e,t){return t?t.d2l(e):e}function NS(e,t){return t?t.l2d(e):e}function CJ(e){return e.x0}function EJ(e){return e.x1}function LJ(e){return e.y0}function PJ(e){return e.y1}function BS(e){return e.x0shift||0}function OS(e){return e.x1shift||0}function US(e){return e.y0shift||0}function VS(e){return e.y1shift||0}function l_(e,t){return Ah(e.x1,t)+OS(e)-Ah(e.x0,t)-BS(e)}function u_(e,t,r){return Ah(e.y1,r)+VS(e)-Ah(e.y0,r)-US(e)}function DJ(e,t){return Math.abs(l_(e,t))}function zJ(e,t,r){return Math.abs(u_(e,t,r))}function IJ(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(l_(e,t),2)+Math.pow(u_(e,t,r),2))}function RJ(e,t){return NS((Ah(e.x1,t)+OS(e)+Ah(e.x0,t)+BS(e))/2,t)}function FJ(e,t,r){return NS((Ah(e.y1,r)+VS(e)+Ah(e.y0,r)+US(e))/2,r)}function qJ(e,t,r){return e.type!=="line"?void 0:u_(e,t,r)/l_(e,t)}HS.exports={x0:CJ,x1:EJ,y0:LJ,y1:PJ,slope:qJ,dx:l_,dy:u_,width:DJ,height:zJ,length:IJ,xcenter:RJ,ycenter:FJ}});var YS=de((qye,ZS)=>{"use strict";var NJ=nl().overrideAll,ad=ms(),GS=qo(),BJ=hc().dash,Mh=hn().extendFlat,OJ=Hl().shapeTexttemplateAttrs,UJ=f_();ZS.exports=NJ({newshape:{visible:Mh({},ad.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:Mh({},ad.legend,{}),legendgroup:Mh({},ad.legendgroup,{}),legendgrouptitle:{text:Mh({},ad.legendgrouptitle.text,{}),font:GS({})},legendrank:Mh({},ad.legendrank,{}),legendwidth:Mh({},ad.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:Mh({},BJ,{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:Mh({},ad.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:OJ({newshape:!0},{keys:Object.keys(UJ)}),font:GS({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var XS=de((Nye,WS)=>{"use strict";var VJ=hc().dash,HJ=hn().extendFlat;WS.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:HJ({},VJ,{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 c_=de((Bye,jS)=>{"use strict";jS.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 d0=de((Oye,$S)=>{"use strict";var iw=qo(),GJ=Ly(),h_=Af(),JS=YS(),KS=XS(),ZJ=c_(),QS=hn().extendFlat,v_=iw({editType:"calc"});v_.family.dflt='"Open Sans", verdana, arial, sans-serif';v_.size.dflt=12;v_.color.dflt=h_.defaultLine;$S.exports={font:v_,title:{text:{valType:"string",editType:"layoutstyle"},font:iw({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:iw({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:QS(ZJ({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:h_.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:h_.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:h_.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:"plot"},newshape:JS.newshape,activeshape:JS.activeshape,newselection:KS.newselection,activeselection:KS.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:QS({},GJ.transition,{editType:"none"})}});var e9=m7(()=>{});var YJ={};var t9=m7(()=>{e9()});var la=de(za=>{"use strict";var p0=Th(),r9=n_(),a9=K3(),WJ=cc(),XJ=Ey().addStyleRule,i9=hn(),jJ=ms(),JJ=d0(),KJ=i9.extendFlat,nw=i9.extendDeepAll;za.modules={};za.allCategories={};za.allTypes=[];za.subplotsRegistry={};za.componentsRegistry={};za.layoutArrayContainers=[];za.layoutArrayRegexes=[];za.traceLayoutAttributes={};za.localeRegistry={};za.apiMethodRegistry={};za.collectableSubplotTypes=null;za.register=function(t){if(za.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 aK=s0().timeFormat,p9=Da(),ow=Th(),kh=u0().mod,g0=Hi(),Gl=g0.BADNUM,qs=g0.ONEDAY,Py=g0.ONEHOUR,Sh=g0.ONEMIN,y0=g0.ONESEC,Dy=g0.EPOCHJD,vc=la(),u9=s0().utcFormat,iK=/^\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,nK=/^\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,f9=new Date().getFullYear()-70;function dc(e){return e&&vc.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}kn.dateTick0=function(e,t){var r=oK(e,!!t);if(t<2)return r;var i=kn.dateTime2ms(r,e);return i+=qs*(t-1),kn.ms2DateTime(i,0,e)};function oK(e,t){return dc(e)?t?vc.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:vc.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}kn.dfltRange=function(e){return dc(e)?vc.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};kn.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var p_,m_;kn.dateTime2ms=function(e,t){if(kn.isJSDate(e)){var r=e.getTimezoneOffset()*Sh,i=(e.getUTCMinutes()-e.getMinutes())*Sh+(e.getUTCSeconds()-e.getSeconds())*y0+(e.getUTCMilliseconds()-e.getMilliseconds());if(i){var a=3*Sh;r=r-a/2+kh(i-r+a/2,a)}return e=Number(e)-r,e>=p_&&e<=m_?e:Gl}if(typeof e!="string"&&typeof e!="number")return Gl;e=String(e);var s=dc(t),l=e.charAt(0);s&&(l==="G"||l==="g")&&(e=e.substr(1),t="");var f=s&&t.substr(0,7)==="chinese",h=e.match(f?nK:iK);if(!h)return Gl;var v=h[1],m=h[3]||"1",b=Number(h[5]||1),T=Number(h[7]||0),S=Number(h[9]||0),C=Number(h[11]||0);if(s){if(v.length===2)return Gl;v=Number(v);var P;try{var E=vc.getComponentMethod("calendars","getCal")(t);if(f){var I=m.charAt(m.length-1)==="i";m=parseInt(m,10),P=E.newDate(v,E.toMonthIndex(v,m,I),b)}else P=E.newDate(v,Number(m),b)}catch(N){return Gl}return P?(P.toJD()-Dy)*qs+T*Py+S*Sh+C*y0:Gl}v.length===2?v=(Number(v)+2e3-f9)%100+f9:v=Number(v),m-=1;var F=new Date(Date.UTC(2e3,m,b,T,S));return F.setUTCFullYear(v),F.getUTCMonth()!==m||F.getUTCDate()!==b?Gl:F.getTime()+C*y0};p_=kn.MIN_MS=kn.dateTime2ms("-9999");m_=kn.MAX_MS=kn.dateTime2ms("9999-12-31 23:59:59.9999");kn.isDateTime=function(e,t){return kn.dateTime2ms(e,t)!==Gl};function m0(e,t){return String(e+Math.pow(10,t)).substr(1)}var d_=90*qs,c9=3*Py,h9=5*Sh;kn.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=p_&&e<=m_))return Gl;t||(t=0);var i=Math.floor(kh(e+.05,1)*10),a=Math.round(e-i/10),s,l,f,h,v,m;if(dc(r)){var b=Math.floor(a/qs)+Dy,T=Math.floor(kh(e,qs));try{s=vc.getComponentMethod("calendars","getCal")(r).fromJD(b).formatDate("yyyy-mm-dd")}catch(S){s=u9("G%Y-%m-%d")(new Date(a))}if(s.charAt(0)==="-")for(;s.length<11;)s="-0"+s.substr(1);else for(;s.length<10;)s="0"+s;l=t=p_+qs&&e<=m_-qs))return Gl;var t=Math.floor(kh(e+.05,1)*10),r=new Date(Math.round(e-t/10)),i=aK("%Y-%m-%d")(r),a=r.getHours(),s=r.getMinutes(),l=r.getSeconds(),f=r.getUTCMilliseconds()*10+t;return m9(i,a,s,l,f)};function m9(e,t,r,i,a){if((t||r||i||a)&&(e+=" "+m0(t,2)+":"+m0(r,2),(i||a)&&(e+=":"+m0(i,2),a))){for(var s=4;a%10===0;)s-=1,a/=10;e+="."+m0(a,s)}return e}kn.cleanDate=function(e,t,r){if(e===Gl)return t;if(kn.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(dc(r))return ow.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=kn.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!kn.isDateTime(e,r))return ow.error("unrecognized date",e),t;return e};var sK=/%\d?f/g,lK=/%h/g,uK={1:"1",2:"1",3:"2",4:"2"};function v9(e,t,r,i){e=e.replace(sK,function(s){var l=Math.min(+s.charAt(1)||6,6),f=(t/1e3%1+2).toFixed(l).substr(2).replace(/0+$/,"")||"0";return f});var a=new Date(Math.floor(t+.05));if(e=e.replace(lK,function(){return uK[r("%q")(a)]}),dc(i))try{e=vc.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch(s){return"Invalid"}return r(e)(a)}var fK=[59,59.9,59.99,59.999,59.9999];function cK(e,t){var r=kh(e+.05,qs),i=m0(Math.floor(r/Py),2)+":"+m0(kh(Math.floor(r/Sh),60),2);if(t!=="M"){p9(t)||(t=0);var a=Math.min(kh(e/y0,60),fK[t]),s=(100+a).toFixed(t).substr(1);t>0&&(s=s.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+s}return i}kn.formatDate=function(e,t,r,i,a,s){if(a=dc(a)&&a,!t)if(r==="y")t=s.year;else if(r==="m")t=s.month;else if(r==="d")t=s.dayMonth+` `+s.year;else return cK(e,r)+` -`+v9(s.dayMonthYear,e,i,a);return v9(t,e,i,a)};var d9=3*qs;kn.incrementMonth=function(e,t,r){r=dc(r)&&r;var i=kh(e,qs);if(e=Math.round(e-i),r)try{var a=Math.round(e/qs)+Dy,s=vc.getComponentMethod("calendars","getCal")(r),l=s.fromJD(a);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-Dy)*qs+i}catch(h){ow.error("invalid ms "+e+" in calendar "+r)}var f=new Date(e+d9);return f.setUTCMonth(f.getUTCMonth()+t)+i-d9};kn.findExactDates=function(e,t){for(var r=0,i=0,a=0,s=0,l,f,h=dc(t)&&vc.getComponentMethod("calendars","getCal")(t),v=0;v{"use strict";g9.exports=function(t){return t}});var lw=de(pc=>{"use strict";var hK=Da(),vK=Th(),dK=y_(),pK=Hi().BADNUM,sw=1e-9;pc.findBin=function(e,t,r){if(hK(t.start))return r?Math.ceil((e-t.start)/t.size-sw)-1:Math.floor((e-t.start)/t.size+sw);var i=0,a=t.length,s=0,l=a>1?(t[a-1]-t[0])/(a-1):1,f,h;for(l>=0?h=r?mK:yK:h=r?_K:gK,e+=l*sw*(r?-1:1)*(l>=0?1:-1);i90&&vK.log("Long binary search..."),i-1};function mK(e,t){return et}function _K(e,t){return e>=t}pc.sorterAsc=function(e,t){return e-t};pc.sorterDes=function(e,t){return t-e};pc.distinctVals=function(e){var t=e.slice();t.sort(pc.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===pK;r--);for(var i=t[r]-t[0]||1,a=i/(r||1)/1e4,s=[],l,f=0;f<=r;f++){var h=t[f],v=h-l;l===void 0?(s.push(h),l=h):v>a&&(i=Math.min(i,v),s.push(h),l=h)}return{vals:s,minDiff:i}};pc.roundUp=function(e,t,r){for(var i=0,a=t.length-1,s,l=0,f=r?0:1,h=r?1:0,v=r?Math.ceil:Math.floor;i0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()};pc.findIndexOfMin=function(e,t){t=t||dK;for(var r=1/0,i,a=0;a{"use strict";_9.exports=function(t){return Object.keys(t).sort()}});var x9=de(Cn=>{"use strict";var zy=Da(),xK=il().isArrayOrTypedArray;Cn.aggNums=function(e,t,r,i){var a,s;if((!i||i>r.length)&&(i=r.length),zy(t)||(t=!1),xK(r[0])){for(s=new Array(i),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var M9=de((Jye,A9)=>{"use strict";var b9=u0(),uw=b9.mod,bK=b9.modHalf,Iy=Math.PI,Ch=2*Iy;function wK(e){return e/180*Iy}function TK(e){return e/Iy*180}function fw(e){return Math.abs(e[1]-e[0])>Ch-1e-14}function w9(e,t){return bK(t-e,Ch)}function AK(e,t){return Math.abs(w9(e,t))}function T9(e,t){if(fw(t))return!0;var r,i;t[0]i&&(i+=Ch);var a=uw(e,Ch),s=a+Ch;return a>=r&&a<=i||s>=r&&s<=i}function MK(e,t,r,i){if(!T9(t,i))return!1;var a,s;return r[0]=a&&e<=s}function cw(e,t,r,i,a,s,l){a=a||0,s=s||0;var f=fw([r,i]),h,v,m,b,T;f?(h=0,v=Iy,m=Ch):r{"use strict";id.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};id.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};id.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};id.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};id.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};id.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var E9=de(nd=>{"use strict";var hw=u0().mod;nd.segmentsIntersect=C9;function C9(e,t,r,i,a,s,l,f){var h=r-e,v=a-e,m=l-a,b=i-t,T=s-t,S=f-s,C=h*S-m*b;if(C===0)return null;var P=(v*S-m*T)/C,E=(v*b-h*T)/C;return E<0||E>1||P<0||P>1?null:{x:e+h*P,y:t+b*P}}nd.segmentDistance=function(t,r,i,a,s,l,f,h){if(C9(t,r,i,a,s,l,f,h))return 0;var v=i-t,m=a-r,b=f-s,T=h-l,S=v*v+m*m,C=b*b+T*T,P=Math.min(__(v,m,S,s-t,l-r),__(v,m,S,f-t,h-r),__(b,T,C,t-s,r-l),__(b,T,C,i-s,a-l));return Math.sqrt(P)};function __(e,t,r,i,a){var s=i*e+a*t;if(s<0)return i*i+a*a;if(s>r){var l=i-e,f=a-t;return l*l+f*f}else{var h=i*t-a*e;return h*h/r}}var x_,vw,k9;nd.getTextLocation=function(t,r,i,a){if((t!==vw||a!==k9)&&(x_={},vw=t,k9=a),x_[i])return x_[i];var s=t.getPointAtLength(hw(i-a/2,r)),l=t.getPointAtLength(hw(i+a/2,r)),f=Math.atan((l.y-s.y)/(l.x-s.x)),h=t.getPointAtLength(hw(i,r)),v=(h.x*4+s.x+l.x)/6,m=(h.y*4+s.y+l.y)/6,b={x:v,y:m,theta:f};return x_[i]=b,b};nd.clearLocationCache=function(){vw=null};nd.getVisibleSegment=function(t,r,i){var a=r.left,s=r.right,l=r.top,f=r.bottom,h=0,v=t.getTotalLength(),m=v,b,T;function S(P){var E=t.getPointAtLength(P);P===0?b=E:P===v&&(T=E);var I=E.xs?E.x-s:0,R=E.yf?E.y-f:0;return Math.sqrt(I*I+R*R)}for(var C=S(h);C;){if(h+=C+i,h>m)return;C=S(h)}for(C=S(m);C;){if(m-=C+i,h>m)return;C=S(m)}return{min:h,max:m,len:m-h,total:v,isClosed:h===0&&m===v&&Math.abs(b.x-T.x)<.1&&Math.abs(b.y-T.y)<.1}};nd.findPointOnPath=function(t,r,i,a){a=a||{};for(var s=a.pathLength||t.getTotalLength(),l=a.tolerance||.001,f=a.iterationLimit||30,h=t.getPointAtLength(0)[i]>t.getPointAtLength(s)[i]?-1:1,v=0,m=0,b=s,T,S,C;v0?b=T:m=T,v++}return S}});var b_=de(Ry=>{"use strict";var mc={};Ry.throttle=function(t,r,i){var a=mc[t],s=Date.now();if(!a){for(var l in mc)mc[l].tsa.ts+r){f();return}a.timer=setTimeout(function(){f(),a.timer=null},r)};Ry.done=function(e){var t=mc[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var i=t.onDone;t.onDone=function(){i&&i(),r(),t.onDone=null}})};Ry.clear=function(e){if(e)L9(mc[e]),delete mc[e];else for(var t in mc)Ry.clear(t)};function L9(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var D9=de((ege,P9)=>{"use strict";P9.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var z9=de((tge,w_)=>{"use strict";w_.exports=dw;w_.exports.isMobile=dw;w_.exports.default=dw;var EK=/(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,LK=/CrOS/,PK=/android|ipad|playbook|silk/i;function dw(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=EK.test(t)&&!LK.test(t)||!!e.tablet&&PK.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var R9=de((rge,I9)=>{"use strict";var DK=Da(),zK=z9();I9.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=IK(),typeof r!="string")return!0;var i=zK({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!i)for(var a=r.split(" "),s=1;s-1;f--){var h=a[f];if(h.substr(0,8)==="Version/"){var v=h.substr(8).split(".")[0];if(DK(v)&&(v=+v),v>=13)return!0}}}return i};function IK(){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 q9=de((age,F9)=>{"use strict";var RK=ja();F9.exports=function(t,r,i){var a=t.selectAll("g."+i.replace(/\s/g,".")).data(r,function(l){return l[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",i),a.order();var s=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(l){l[0][s]=RK.select(this)}),a}});var B9=de((ige,N9)=>{"use strict";var FK=la();N9.exports=function(t,r){for(var i=t._context.locale,a=0;a<2;a++){for(var s=t._context.locales,l=0;l<2;l++){var f=(s[i]||{}).dictionary;if(f){var h=f[r];if(h)return h}s=FK.localeRegistry}var v=i.split("-")[0];if(v===i)break;i=v}return r}});var U9=de((nge,O9)=>{"use strict";O9.exports=function(t){for(var r={},i=[],a=0,s=0;s{"use strict";V9.exports=function(t){for(var r=BK(t)?NK:qK,i=[],a=0;a{"use strict";G9.exports=function(t,r){if(!r)return t;var i=1/Math.abs(r),a=i>1?(i*t+i*r)/i:t+r,s=String(a).length;if(s>16){var l=String(r).length,f=String(t).length;if(s>=f+l){var h=parseFloat(a).toPrecision(12);h.indexOf("e+")===-1&&(a=+h)}}return a}});var W9=de((lge,Y9)=>{"use strict";var OK=Da(),UK=Hi().BADNUM,VK=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Y9.exports=function(t){return typeof t=="string"&&(t=t.replace(VK,"")),OK(t)?Number(t):UK}});var Bt=de((uge,ok)=>{"use strict";var Fy=ja(),HK=s0().utcFormat,GK=q3().format,$9=Da(),ek=Hi(),tk=ek.FP_SAFE,ZK=-tk,X9=ek.BADNUM,$e=ok.exports={};$e.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 j9={};$e.warnBadFormat=function(e){var t=String(e);j9[t]||(j9[t]=1,$e.warn('encountered bad format: "'+t+'"'))};$e.noFormat=function(e){return String(e)};$e.numberFormat=function(e){var t;try{t=GK($e.adjustFormat(e))}catch(r){return $e.warnBadFormat(e),$e.noFormat}return t};$e.nestedProperty=wy();$e.keyedContainer=B7();$e.relativeAttr=U7();$e.isPlainObject=cc();$e.toLogRange=J1();$e.relinkPrivateKeys=Z7();var Eh=il();$e.isArrayBuffer=Eh.isArrayBuffer;$e.isTypedArray=Eh.isTypedArray;$e.isArrayOrTypedArray=Eh.isArrayOrTypedArray;$e.isArray1D=Eh.isArray1D;$e.ensureArray=Eh.ensureArray;$e.concat=Eh.concat;$e.maxRowLength=Eh.maxRowLength;$e.minRowLength=Eh.minRowLength;var rk=u0();$e.mod=rk.mod;$e.modHalf=rk.modHalf;var Lh=f8();$e.valObjectMeta=Lh.valObjectMeta;$e.coerce=Lh.coerce;$e.coerce2=Lh.coerce2;$e.coerceFont=Lh.coerceFont;$e.coercePattern=Lh.coercePattern;$e.coerceHoverinfo=Lh.coerceHoverinfo;$e.coerceSelectionMarkerOpacity=Lh.coerceSelectionMarkerOpacity;$e.validate=Lh.validate;var ol=y9();$e.dateTime2ms=ol.dateTime2ms;$e.isDateTime=ol.isDateTime;$e.ms2DateTime=ol.ms2DateTime;$e.ms2DateTimeLocal=ol.ms2DateTimeLocal;$e.cleanDate=ol.cleanDate;$e.isJSDate=ol.isJSDate;$e.formatDate=ol.formatDate;$e.incrementMonth=ol.incrementMonth;$e.dateTick0=ol.dateTick0;$e.dfltRange=ol.dfltRange;$e.findExactDates=ol.findExactDates;$e.MIN_MS=ol.MIN_MS;$e.MAX_MS=ol.MAX_MS;var od=lw();$e.findBin=od.findBin;$e.sorterAsc=od.sorterAsc;$e.sorterDes=od.sorterDes;$e.distinctVals=od.distinctVals;$e.roundUp=od.roundUp;$e.sort=od.sort;$e.findIndexOfMin=od.findIndexOfMin;$e.sortObjectKeys=g_();var yc=x9();$e.aggNums=yc.aggNums;$e.len=yc.len;$e.mean=yc.mean;$e.geometricMean=yc.geometricMean;$e.median=yc.median;$e.midRange=yc.midRange;$e.variance=yc.variance;$e.stdev=yc.stdev;$e.interp=yc.interp;var Du=o_();$e.init2dArray=Du.init2dArray;$e.transposeRagged=Du.transposeRagged;$e.dot=Du.dot;$e.translationMatrix=Du.translationMatrix;$e.rotationMatrix=Du.rotationMatrix;$e.rotationXYMatrix=Du.rotationXYMatrix;$e.apply3DTransform=Du.apply3DTransform;$e.apply2DTransform=Du.apply2DTransform;$e.apply2DTransform2=Du.apply2DTransform2;$e.convertCssMatrix=Du.convertCssMatrix;$e.inverseTransformMatrix=Du.inverseTransformMatrix;var Sf=M9();$e.deg2rad=Sf.deg2rad;$e.rad2deg=Sf.rad2deg;$e.angleDelta=Sf.angleDelta;$e.angleDist=Sf.angleDist;$e.isFullCircle=Sf.isFullCircle;$e.isAngleInsideSector=Sf.isAngleInsideSector;$e.isPtInsideSector=Sf.isPtInsideSector;$e.pathArc=Sf.pathArc;$e.pathSector=Sf.pathSector;$e.pathAnnulus=Sf.pathAnnulus;var x0=S9();$e.isLeftAnchor=x0.isLeftAnchor;$e.isCenterAnchor=x0.isCenterAnchor;$e.isRightAnchor=x0.isRightAnchor;$e.isTopAnchor=x0.isTopAnchor;$e.isMiddleAnchor=x0.isMiddleAnchor;$e.isBottomAnchor=x0.isBottomAnchor;var b0=E9();$e.segmentsIntersect=b0.segmentsIntersect;$e.segmentDistance=b0.segmentDistance;$e.getTextLocation=b0.getTextLocation;$e.clearLocationCache=b0.clearLocationCache;$e.getVisibleSegment=b0.getVisibleSegment;$e.findPointOnPath=b0.findPointOnPath;var M_=hn();$e.extendFlat=M_.extendFlat;$e.extendDeep=M_.extendDeep;$e.extendDeepAll=M_.extendDeepAll;$e.extendDeepNoArrays=M_.extendDeepNoArrays;var pw=Th();$e.log=pw.log;$e.warn=pw.warn;$e.error=pw.error;var YK=c0();$e.counterRegex=YK.counter;var mw=b_();$e.throttle=mw.throttle;$e.throttleDone=mw.done;$e.clearThrottle=mw.clear;var zu=Ey();$e.getGraphDiv=zu.getGraphDiv;$e.isPlotDiv=zu.isPlotDiv;$e.removeElement=zu.removeElement;$e.addStyleRule=zu.addStyleRule;$e.addRelatedStyleRule=zu.addRelatedStyleRule;$e.deleteRelatedStyleRule=zu.deleteRelatedStyleRule;$e.setStyleOnHover=zu.setStyleOnHover;$e.getFullTransformMatrix=zu.getFullTransformMatrix;$e.getElementTransformMatrix=zu.getElementTransformMatrix;$e.getElementAndAncestors=zu.getElementAndAncestors;$e.equalDomRects=zu.equalDomRects;$e.clearResponsive=D9();$e.preserveDrawingBuffer=R9();$e.makeTraceGroups=q9();$e._=B9();$e.notifier=X3();$e.filterUnique=U9();$e.filterVisible=H9();$e.pushUnique=K3();$e.increment=Z9();$e.cleanNumber=W9();$e.ensureNumber=function(t){return $9(t)?(t=Number(t),t>tk||t=t?!1:$9(e)&&e>=0&&e%1===0};$e.noop=n_();$e.identity=y_();$e.repeat=function(e,t){for(var r=new Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};$e.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};$e.simpleMap=function(e,t,r,i,a){for(var s=e.length,l=new Array(s),f=0;f=Math.pow(2,r)?a>10?($e.warn("randstr failed uniqueness"),l):e(t,r,i,(a||0)+1):l};$e.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r};$e.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,i=2*r,a=2*t-1,s=new Array(a),l=new Array(r),f,h,v,m;for(f=0;f=i&&(v-=i*Math.floor(v/i)),v<0?v=-1-v:v>=r&&(v=i-1-v),m+=e[v]*s[h];l[f]=m}return l};$e.syncOrAsync=function(e,t,r){var i,a;function s(){return $e.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],i=a(t),i&&i.then)return i.then(s);return r&&r(t)};$e.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};$e.noneOrAll=function(e,t,r){if(e){var i=!1,a=!0,s,l;for(s=0;s0?a:0})};$e.fillArray=function(e,t,r,i){if(i=i||$e.identity,$e.isArrayOrTypedArray(e))for(var a=0;a1?a+l[1]:"";if(s&&(l.length>1||f.length>4||r))for(;i.test(f);)f=f.replace(i,"$1"+s+"$2");return f+h};$e.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var nk=/^\w*$/;$e.templateString=function(e,t){var r={};return e.replace($e.TEMPLATE_STRING_REGEX,function(i,a){var s;return nk.test(a)?s=t[a]:(r[a]=r[a]||$e.nestedProperty(t,a).get,s=r[a]()),$e.isValidTextValue(s)?s:""})};var QK={max:10,count:0,name:"hovertemplate"};$e.hovertemplateString=function(){return yw.apply(QK,arguments)};var $K={max:10,count:0,name:"texttemplate"};$e.texttemplateString=function(){return yw.apply($K,arguments)};var eQ=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function tQ(e){var t=e.match(eQ);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var rQ={max:10,count:0,name:"texttemplate",parseMultDiv:!0};$e.texttemplateStringForShapes=function(){return yw.apply(rQ,arguments)};var J9=/^[:|\|]/;function yw(e,t,r){var i=this,a=arguments;t||(t={});var s={};return e.replace($e.TEMPLATE_STRING_REGEX,function(l,f,h){var v=f==="xother"||f==="yother",m=f==="_xother"||f==="_yother",b=f==="_xother_"||f==="_yother_",T=f==="xother_"||f==="yother_",S=v||m||T||b,C=f;(m||b)&&(C=C.substring(1)),(T||b)&&(C=C.substring(0,C.length-1));var P=null,E=null;if(i.parseMultDiv){var I=tQ(C);C=I.key,P=I.op,E=I.number}var R;if(S){if(R=t[C],R===void 0)return""}else{var N,z;for(z=3;z=A_&&l<=K9,v=f>=A_&&f<=K9;if(h&&(i=10*i+l-A_),v&&(a=10*a+f-A_),!h||!v){if(i!==a)return i-a;if(l!==f)return l-f}}return a-i};var _0=2e9;$e.seedPseudoRandom=function(){_0=2e9};$e.pseudoRandom=function(){var e=_0;return _0=(69069*_0+1)%4294967296,Math.abs(_0-e)<429496729?$e.pseudoRandom():_0/4294967296};$e.fillText=function(e,t,r){var i=Array.isArray(r)?function(l){r.push(l)}:function(l){r.text=l},a=$e.extractOption(e,t,"htx","hovertext");if($e.isValidTextValue(a))return i(a);var s=$e.extractOption(e,t,"tx","text");if($e.isValidTextValue(s))return i(s)};$e.isValidTextValue=function(e){return e||e===0};$e.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i1&&(v=1):v=0,$e.strTranslate(a-v*(r+l),s-v*(i+f))+$e.strScale(v)+(h?"rotate("+h+(t?"":" "+r+" "+i)+")":"")};$e.setTransormAndDisplay=function(e,t){e.attr("transform",$e.getTextTransform(t)),e.style("display",t.scale?null:"none")};$e.ensureUniformFontSize=function(e,t){var r=$e.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};$e.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)};$e.bigFont=function(e){return Math.round(1.2*e)};var Q9=$e.getFirefoxVersion(),aQ=Q9!==null&&Q9<86;$e.getPositionFromD3Event=function(){return aQ?[Fy.event.layerX,Fy.event.layerY]:[Fy.event.offsetX,Fy.event.offsetY]}});var uk=de(()=>{"use strict";var iQ=Bt(),sk={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(gw in sk)lk=gw.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),iQ.addStyleRule(lk,sk[gw]);var lk,gw});var _w=de((hge,fk)=>{fk.exports=!0});var bw=de((vge,ck)=>{"use strict";var nQ=_w(),xw;typeof window.matchMedia=="function"?xw=!window.matchMedia("(hover: none)").matches:xw=nQ;ck.exports=xw});var C_=de((dge,ww)=>{"use strict";var w0=typeof Reflect=="object"?Reflect:null,hk=w0&&typeof w0.apply=="function"?w0.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},S_;w0&&typeof w0.ownKeys=="function"?S_=w0.ownKeys:Object.getOwnPropertySymbols?S_=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:S_=function(t){return Object.getOwnPropertyNames(t)};function oQ(e){console&&console.warn&&console.warn(e)}var dk=Number.isNaN||function(t){return t!==t};function Gi(){Gi.init.call(this)}ww.exports=Gi;ww.exports.once=fQ;Gi.EventEmitter=Gi;Gi.prototype._events=void 0;Gi.prototype._eventsCount=0;Gi.prototype._maxListeners=void 0;var vk=10;function k_(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Gi,"defaultMaxListeners",{enumerable:!0,get:function(){return vk},set:function(e){if(typeof e!="number"||e<0||dk(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");vk=e}});Gi.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};Gi.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||dk(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 pk(e){return e._maxListeners===void 0?Gi.defaultMaxListeners:e._maxListeners}Gi.prototype.getMaxListeners=function(){return pk(this)};Gi.prototype.emit=function(t){for(var r=[],i=1;i0&&(l=r[0]),l instanceof Error)throw l;var f=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw f.context=l,f}var h=s[t];if(h===void 0)return!1;if(typeof h=="function")hk(h,this,r);else for(var v=h.length,m=xk(h,v),i=0;i0&&l.length>a&&!l.warned){l.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=l.length,oQ(f)}return e}Gi.prototype.addListener=function(t,r){return mk(this,t,r,!1)};Gi.prototype.on=Gi.prototype.addListener;Gi.prototype.prependListener=function(t,r){return mk(this,t,r,!0)};function sQ(){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 yk(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=sQ.bind(i);return a.listener=r,i.wrapFn=a,a}Gi.prototype.once=function(t,r){return k_(r),this.on(t,yk(this,t,r)),this};Gi.prototype.prependOnceListener=function(t,r){return k_(r),this.prependListener(t,yk(this,t,r)),this};Gi.prototype.removeListener=function(t,r){var i,a,s,l,f;if(k_(r),a=this._events,a===void 0)return this;if(i=a[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(s=-1,l=i.length-1;l>=0;l--)if(i[l]===r||i[l].listener===r){f=i[l].listener,s=l;break}if(s<0)return this;s===0?i.shift():lQ(i,s),i.length===1&&(a[t]=i[0]),a.removeListener!==void 0&&this.emit("removeListener",t,f||r)}return this};Gi.prototype.off=Gi.prototype.removeListener;Gi.prototype.removeAllListeners=function(t){var r,i,a;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var s=Object.keys(i),l;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function gk(e,t,r){var i=e._events;if(i===void 0)return[];var a=i[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?uQ(a):xk(a,a.length)}Gi.prototype.listeners=function(t){return gk(this,t,!0)};Gi.prototype.rawListeners=function(t){return gk(this,t,!1)};Gi.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):_k.call(e,t)};Gi.prototype.listenerCount=_k;function _k(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}Gi.prototype.eventNames=function(){return this._eventsCount>0?S_(this._events):[]};function xk(e,t){for(var r=new Array(t),i=0;i{"use strict";var Tw=C_().EventEmitter,hQ={init:function(e){if(e._ev instanceof Tw)return e;var t=new Tw,r=new Tw;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(i,a){t.emit(i,a),r.emit(i,a)},e},triggerHandler:function(e,t,r){var i,a=e._ev;if(!a)return;var s=a._events[t];if(!s)return;function l(h){if(h.listener){if(a.removeListener(t,h.listener),!h.fired)return h.fired=!0,h.listener.apply(a,[r])}else return h.apply(a,[r])}s=Array.isArray(s)?s:[s];var f;for(f=0;f{"use strict";var Tk=Bt(),vQ=rd().dfltConfig;function dQ(e,t){for(var r=[],i,a=0;avQ.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};gc.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};gc.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};gc.undo=function(t){var r,i;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,i=0;i=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,i=0;i{"use strict";Sk.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var M0=de(Yn=>{"use strict";var Zl=la(),Ny=Bt(),L_=ms(),Mw=d0(),pQ=Aw(),mQ=Ly(),yQ=rd().configAttributes,kk=nl(),Iu=Ny.extendDeepAll,T0=Ny.isPlainObject,gQ=Ny.isArrayOrTypedArray,P_=Ny.nestedProperty,_Q=Ny.valObjectMeta,Sw="_isSubplotObj",D_="_isLinkedToArray",xQ="_arrayAttrRegexps",Ek="_deprecated",kw=[Sw,D_,xQ,Ek];Yn.IS_SUBPLOT_OBJ=Sw;Yn.IS_LINKED_TO_ARRAY=D_;Yn.DEPRECATED=Ek;Yn.UNDERSCORE_ATTRS=kw;Yn.get=function(){var e={};return Zl.allTypes.forEach(function(t){e[t]=wQ(t)}),{defs:{valObjects:_Q,metaKeys:kw.concat(["description","role","editType","impliedEdits"]),editType:{traces:kk.traces,layout:kk.layout},impliedEdits:{}},traces:e,layout:TQ(),frames:AQ(),animation:A0(mQ),config:A0(yQ)}};Yn.crawl=function(e,t,r,i){var a=r||0;i=i||"",Object.keys(e).forEach(function(s){var l=e[s];if(kw.indexOf(s)===-1){var f=(i?i+".":"")+s;t(l,s,e,a,f),!Yn.isValObject(l)&&T0(l)&&s!=="impliedEdits"&&Yn.crawl(l,t,a+1,f)}})};Yn.isValObject=function(e){return e&&e.valType!==void 0};Yn.findArrayAttributes=function(e){var t=[],r=[],i=[],a,s;function l(h,v,m,b){r=r.slice(0,b).concat([v]),i=i.slice(0,b).concat([h&&h._isLinkedToArray]);var T=h&&(h.valType==="data_array"||h.arrayOk===!0)&&!(r[b-1]==="colorbar"&&(v==="ticktext"||v==="tickvals"));T&&f(a,0,"")}function f(h,v,m){var b=h[r[v]],T=m+r[v];if(v===r.length-1)gQ(b)&&t.push(s+T);else if(i[v]){if(Array.isArray(b))for(var S=0;S=s.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var l=t[r];if(!E_(l))return!1;e=s[a][l]}else e=s[a]}else e=s}}return e}function E_(e){return e===Math.round(e)&&e>=0}function wQ(e){var t,r;t=Zl.modules[e]._module,r=t.basePlotModule;var i={};i.type=null;var a=Iu({},L_),s=Iu({},t.attributes);Yn.crawl(s,function(h,v,m,b,T){P_(a,T).set(void 0),h===void 0&&P_(s,T).set(void 0)}),Iu(i,a),Zl.traceIs(e,"noOpacity")&&delete i.opacity,Zl.traceIs(e,"showLegend")||(delete i.showlegend,delete i.legendgroup),Zl.traceIs(e,"noHover")&&(delete i.hoverinfo,delete i.hoverlabel),t.selectPoints||delete i.selectedpoints,Iu(i,s),r.attributes&&Iu(i,r.attributes),i.type=e;var l={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:A0(i)};if(t.layoutAttributes){var f={};Iu(f,t.layoutAttributes),l.layoutAttributes=A0(f)}return t.animatable||Yn.crawl(l,function(h){Yn.isValObject(h)&&"anim"in h&&delete h.anim}),l}function TQ(){var e={},t,r;Iu(e,Mw);for(t in Zl.subplotsRegistry)if(r=Zl.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var i=0;i{"use strict";var S0=Bt(),EQ=ms(),Ph="templateitemname",Cw={name:{valType:"string",editType:"none"}};Cw[Ph]={valType:"string",editType:"calc"};sd.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=Cw.name,t[Ph]=Cw[Ph],t};sd.traceTemplater=function(e){var t={},r,i;for(r in e)i=e[r],Array.isArray(i)&&i.length&&(t[r]=0);function a(s){r=S0.coerce(s,{},EQ,"type");var l={type:r,_template:null};if(r in t){i=e[r];var f=t[r]%i.length;t[r]++,l._template=i[f]}return l}return{newTrace:a}};sd.newContainer=function(e,t,r){var i=e._template,a=i&&(i[t]||r&&i[r]);S0.isPlainObject(a)||(a=null);var s=e[t]={_template:a};return s};sd.arrayTemplater=function(e,t,r){var i=e._template,a=i&&i[Dk(t)],s=i&&i[t];(!Array.isArray(s)||!s.length)&&(s=[]);var l={};function f(v){var m={name:v.name,_input:v},b=m[Ph]=v[Ph];if(!Pk(b))return m._template=a,m;for(var T=0;T=i&&(r._input||{})._templateitemname;s&&(a=i);var l=t+"["+a+"]",f;function h(){f={},s&&(f[l]={},f[l][Ph]=s)}h();function v(S,C){f[S]=C}function m(S,C){s?S0.nestedProperty(f[l],S).set(C):f[l+"."+S]=C}function b(){var S=f;return h(),S}function T(S,C){S&&m(S,C);var P=b();for(var E in P)S0.nestedProperty(e,E).set(P[E])}return{modifyBase:v,modifyItem:m,getUpdateObj:b,applyUpdate:T}}});var Ao=de((xge,zk)=>{"use strict";var By=c0().counter;zk.exports={idRegex:{x:By("x","( domain)?"),y:By("y","( domain)?")},attrRegex:By("[xy]axis"),xAxisMatch:By("xaxis"),yAxisMatch:By("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 $n=de(Ns=>{"use strict";var LQ=la(),Ew=Ao();Ns.id2name=function(t){if(!(typeof t!="string"||!t.match(Ew.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Ns.name2id=function(t){if(t.match(Ew.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Ns.cleanId=function(t,r,i){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(Ew.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!i)){var s=t.split(" ")[0].substr(1).replace(/^0+/,"");return s==="1"&&(s=""),t.charAt(0)+s+(a&&i?" domain":"")}};Ns.list=function(e,t,r){var i=e._fullLayout;if(!i)return[];var a=Ns.listIds(e,t),s=new Array(a.length),l;for(l=0;li?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Ns.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Ik(e,t){if(t&&t.length){for(var r=0;r{"use strict";function PQ(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function DQ(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Rk.exports={clearOutlineControllers:PQ,clearOutline:DQ}});var z_=de((Tge,Fk)=>{"use strict";Fk.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var F_=de(R_=>{"use strict";var I_=la(),Age=Ao().SUBPLOT_PATTERN;R_.getSubplotCalcData=function(e,t,r){var i=I_.subplotsRegistry[t];if(!i)return[];for(var a=i.attr,s=[],l=0;l{"use strict";var zQ=la(),k0=Bt();ld.manageCommandObserver=function(e,t,r,i){var a={},s=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var l=ld.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(l)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(l){qk(e,l,a.cache),a.check=function(){if(s){var m=qk(e,l,a.cache);return m.changed&&i&&a.lookupTable[m.value]!==void 0&&(a.disable(),Promise.resolve(i({value:m.value,type:l.type,prop:l.prop,traces:l.traces,index:a.lookupTable[m.value]})).then(a.enable,a.enable)),m.changed}};for(var f=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h0?".":"")+a;k0.isPlainObject(s)?Lw(s,t,l,i+1):t(l,a,s)}})}});var eo=de((kge,eC)=>{"use strict";var Wk=ja(),RQ=s0().timeFormatLocale,FQ=q3().formatLocale,Oy=Da(),qQ=N3(),ai=la(),Xk=M0(),NQ=Di(),Pr=Bt(),jk=Ua(),Uk=Hi().BADNUM,Bs=$n(),BQ=Dh().clearOutline,OQ=z_(),Pw=Ly(),UQ=Aw(),VQ=F_().getModuleCalcData,Vk=Pr.relinkPrivateKeys,ud=Pr._,yr=eC.exports={};Pr.extendFlat(yr,ai);yr.attributes=ms();yr.attributes.type.values=yr.allTypes;yr.fontAttrs=qo();yr.layoutAttributes=d0();var N_=Ok();yr.executeAPICommand=N_.executeAPICommand;yr.computeAPICommandBindings=N_.computeAPICommandBindings;yr.manageCommandObserver=N_.manageCommandObserver;yr.hasSimpleAPICommandBindings=N_.hasSimpleAPICommandBindings;yr.redrawText=function(e){return e=Pr.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(ai.getComponentMethod("annotations","draw")(e),ai.getComponentMethod("legend","draw")(e),ai.getComponentMethod("colorbar","draw")(e),t(yr.previousPromises(e)))},300)})};yr.resize=function(e){e=Pr.getGraphDiv(e);var t,r=new Promise(function(i,a){(!e||Pr.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=i,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Pr.isHidden(e)){i(e);return}delete e.layout.width,delete e.layout.height;var s=e.changed;e.autoplay=!0,ai.call("relayout",e,{autosize:!0}).then(function(){e.changed=s,e._resolveResize===i&&(delete e._resolveResize,i(e))})},100)});return t&&t(r),r};yr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};yr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Pr.ensureSingle(t._paper,"text","js-plot-link-container",function(h){h.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:jk.defaultLine,"pointer-events":"all"}).each(function(){var v=Wk.select(this);v.append("tspan").classed("js-link-to-tool",!0),v.append("tspan").classed("js-link-spacer",!0),v.append("tspan").classed("js-sourcelinks",!0)})}),i=r.node(),a={y:t._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),r.attr(a);var s=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),f=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&HQ(e,s),l.text(s.text()&&f.text()?" - ":"")}};function HQ(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(){yr.sendDataToCloud(e)});else{var i=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+i[2].split(".")[0]+"/"+i[1]+a})}}yr.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Wk.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),a=i.append("input").attr({type:"text",name:"data"});return a.node().value=yr.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var GQ=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],ZQ=["year","month","dayMonth","dayMonthYear"];yr.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,i=e._fullLayout||{};if(i._skipDefaults){delete i._skipDefaults;return}var a=e._fullLayout={},s=e.layout||{},l=e._fullData||[],f=e._fullData=[],h=e.data||[],v=e.calcdata||[],m=e._context||{},b;e._transitionData||yr.createTransitionData(e),a._dfltTitle={plot:ud(e,"Click to enter Plot title"),subtitle:ud(e,"Click to enter Plot subtitle"),x:ud(e,"Click to enter X axis title"),y:ud(e,"Click to enter Y axis title"),colorbar:ud(e,"Click to enter Colorscale title"),annotation:ud(e,"new text")},a._traceWord=ud(e,"trace");var T=Hk(e,GQ);if(a._mapboxAccessToken=m.mapboxAccessToken,i._initialAutoSizeIsDone){var S=i.width,C=i.height;yr.supplyLayoutGlobalDefaults(s,a,T),s.width||(a.width=S),s.height||(a.height=C),yr.sanitizeMargins(a)}else{yr.supplyLayoutGlobalDefaults(s,a,T);var P=!s.width||!s.height,E=a.autosize,I=m.autosizable,R=P&&(E||I);R?yr.plotAutoSize(e,s,a):P&&yr.sanitizeMargins(a),!E&&P&&(s.width=a.width,s.height=a.height)}a._d3locale=XQ(T,a.separators),a._extraFormat=Hk(e,ZQ),a._initialAutoSizeIsDone=!0,a._dataLength=h.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var N=a._subplots=WQ(),z=a._splomAxes={x:{},y:{}},O=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=YQ(l,h),yr.supplyDataDefaults(h,f,s,a);var H=Object.keys(z.x),V=Object.keys(z.y);if(H.length>1&&V.length>1){for(ai.getComponentMethod("grid","sizeDefaults")(s,a),b=0;b15&&V.length>15&&a.shapes.length===0&&a.images.length===0,yr.linkSubplots(f,a,l,i),yr.cleanPlot(f,a,l,i);var ne=!!(i._has&&i._has("cartesian")),fe=!!(a._has&&a._has("cartesian")),ve=ne,ke=fe;ve&&!ke?i._bgLayer.remove():ke&&!ve&&(a._shouldCreateBgLayer=!0),i._zoomlayer&&!e._dragging&&BQ({_fullLayout:i}),jQ(f,a),Vk(a,i),ai.getComponentMethod("colorscale","crossTraceDefaults")(f,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var Ce=a._tracePreGUI,Te={},pe;for(pe in Ce)Te[pe]="old";for(b=0;b0){var m=1-2*s;l=Math.round(m*l),f=Math.round(m*f)}}var b=yr.layoutAttributes.width.min,T=yr.layoutAttributes.height.min;l1,C=!r.height&&Math.abs(i.height-f)>1;(C||S)&&(S&&(i.width=l),C&&(i.height=f)),t._initialAutoSize||(t._initialAutoSize={width:l,height:f}),yr.sanitizeMargins(i)};yr.supplyLayoutModuleDefaults=function(e,t,r,i){var a=ai.componentsRegistry,s=t._basePlotModules,l,f,h,v=ai.subplotsRegistry.cartesian;for(l in a)h=a[l],h.includeBasePlot&&h.includeBasePlot(e,t);s.length||s.push(v),t._has("cartesian")&&(ai.getComponentMethod("grid","contentDefaults")(e,t),v.finalizeSubplots(e,t));for(var m in t._subplots)t._subplots[m].sort(Pr.subplotSort);for(f=0;f1&&(r.l/=E,r.r/=E)}if(T){var I=(r.t+r.b)/T;I>1&&(r.t/=I,r.b/=I)}var R=r.xl!==void 0?r.xl:r.x,N=r.xr!==void 0?r.xr:r.x,z=r.yt!==void 0?r.yt:r.y,O=r.yb!==void 0?r.yb:r.y;S[t]={l:{val:R,size:r.l+P},r:{val:N,size:r.r+P},b:{val:O,size:r.b+P},t:{val:z,size:r.t+P}},C[t]=1}if(!i._replotting)return yr.doAutoMargin(e)}};function KQ(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Bs.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}yr.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,i=t.height;t._size||(t._size={}),Jk(t);var a=t._size,s=t.margin,l={t:0,b:0,l:0,r:0},f=Pr.extendFlat({},a),h=s.l,v=s.r,m=s.t,b=s.b,T=t._pushmargin,S=t._pushmarginIds,C=t.minreducedwidth,P=t.minreducedheight;if(s.autoexpand!==!1){for(var E in T)S[E]||delete T[E];var I=e._fullLayout._reservedMargin;for(var R in I)for(var N in I[R]){var z=I[R][N];l[N]=Math.max(l[N],z)}T.base={l:{val:0,size:h},r:{val:1,size:v},t:{val:1,size:m},b:{val:0,size:b}};for(var O in l){var H=0;for(var V in T)V!=="base"&&Oy(T[V][O].size)&&(H=T[V][O].size>H?T[V][O].size:H);var W=Math.max(0,s[O]-H);l[O]=Math.max(0,l[O]-W)}for(var J in T){var re=T[J].l||{},oe=T[J].b||{},ne=re.val,fe=re.size,ve=oe.val,ke=oe.size,Ce=r-l.r-l.l,Te=i-l.t-l.b;for(var pe in T){if(Oy(fe)&&T[pe].r){var Ae=T[pe].r.val,Se=T[pe].r.size;if(Ae>ne){var Le=(fe*Ae+(Se-Ce)*ne)/(Ae-ne),Ke=(Se*(1-ne)+(fe-Ce)*(1-Ae))/(Ae-ne);Le+Ke>h+v&&(h=Le,v=Ke)}}if(Oy(ke)&&T[pe].t){var ht=T[pe].t.val,it=T[pe].t.size;if(ht>ve){var lt=(ke*ht+(it-Te)*ve)/(ht-ve),He=(it*(1-ve)+(ke-Te)*(1-ht))/(ht-ve);lt+He>b+m&&(b=lt,m=He)}}}}}var _t=Pr.constrain(r-s.l-s.r,Kk,C),at=Pr.constrain(i-s.t-s.b,Qk,P),At=Math.max(0,r-_t),kt=Math.max(0,i-at);if(At){var pt=(h+v)/At;pt>1&&(h/=pt,v/=pt)}if(kt){var ge=(b+m)/kt;ge>1&&(b/=ge,m/=ge)}if(a.l=Math.round(h)+l.l,a.r=Math.round(v)+l.r,a.t=Math.round(m)+l.t,a.b=Math.round(b)+l.b,a.p=Math.round(s.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(i)-a.t-a.b,!t._replotting&&(yr.didMarginChange(f,a)||KQ(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Re=3*(1+Object.keys(S).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};yr.graphJson=function(e,t,r,i,a,s){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&yr.supplyDefaults(e);var l=a?e._fullData:e.data,f=a?e._fullLayout:e.layout,h=(e._transitionData||{})._frames;function v(T,S){if(typeof T=="function")return S?"_function_":null;if(Pr.isPlainObject(T)){var C={},P;return Object.keys(T).sort().forEach(function(N){if(["_","["].indexOf(N.charAt(0))===-1){if(typeof T[N]=="function"){S&&(C[N]="_function");return}if(r==="keepdata"){if(N.substr(N.length-3)==="src")return}else if(r==="keepstream"){if(P=T[N+"src"],typeof P=="string"&&P.indexOf(":")>0&&!Pr.isPlainObject(T.stream))return}else if(r!=="keepall"&&(P=T[N+"src"],typeof P=="string"&&P.indexOf(":")>0))return;C[N]=v(T[N],S)}}),C}var E=Array.isArray(T),I=Pr.isTypedArray(T);if((E||I)&&T.dtype&&T.shape){var R=T.bdata;return v({dtype:T.dtype,shape:T.shape,bdata:Pr.isArrayBuffer(R)?qQ.encode(R):R},S)}return E?T.map(function(N){return v(N,S)}):I?Pr.simpleMap(T,Pr.identity):Pr.isJSDate(T)?Pr.ms2DateTimeLocal(+T):T}var m={data:(l||[]).map(function(T){var S=v(T);return t&&delete S.fit,S})};if(!t&&(m.layout=v(f),a)){var b=f._size;m.layout.computed={margin:{b:b.b,l:b.l,r:b.r,t:b.t}}}return h&&(m.frames=v(h)),s&&(m.config=v(e._context,!0)),i==="object"?m:JSON.stringify(m)};yr.modifyFrames=function(e,t){var r,i,a,s=e._transitionData._frames,l=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return ai.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var T=0,S=0;function C(){return T++,function(){S++,!i&&S===T&&f(b)}}r.runFn(C),setTimeout(C())})}function f(b){if(e._transitionData)return s(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return ai.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(b)}function h(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var v=[yr.previousPromises,h,r.prepareFn,yr.rehover,yr.reselect,l],m=Pr.syncOrAsync(v,e);return(!m||!m.then)&&(m=Promise.resolve()),m.then(function(){return e})}yr.doCalcdata=function(e,t){var r=Bs.list(e),i=e._fullData,a=e._fullLayout,s,l,f,h,v=new Array(i.length),m=(e.calcdata||[]).slice();for(e.calcdata=v,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},f=0;f=0;h--)if(O[h].enabled){s._indexToPoints=O[h]._indexToPoints;break}l&&l.calc&&(z=l.calc(e,s))}(!Array.isArray(z)||!z[0])&&(z=[{x:Uk,y:Uk}]),z[0].t||(z[0].t={}),z[0].trace=s,v[R]=z}}for(Zk(r,i,a),f=0;f{"use strict";fd.xmlns="http://www.w3.org/2000/xmlns/";fd.svg="http://www.w3.org/2000/svg";fd.xlink="http://www.w3.org/1999/xlink";fd.svgAttrs={xmlns:fd.svg,"xmlns:xlink":fd.xlink}});var ts=de((Ege,tC)=>{"use strict";tC.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 co=de(Yl=>{"use strict";var Fn=ja(),_c=Bt(),t$=_c.strTranslate,Dw=zh(),r$=ts().LINE_SPACING,a$=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Yl.convertToTspans=function(e,t,r){var i=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&i.match(a$),s=Fn.select(e.node().parentNode);if(s.empty())return;var l=e.attr("class")?e.attr("class").split(" ")[0]:"text";l+="-math",s.selectAll("svg."+l).remove(),s.selectAll("g."+l+"-group").remove(),e.style("display",null).attr({"data-unformatted":i,"data-math":"N"});function f(){s.empty()||(l=e.attr("class")+"-math",s.select("svg."+l).remove()),e.text("").style("white-space","pre");var h=m$(e.node(),i);h&&e.style("pointer-events","all"),Yl.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(h){e.style("display","none");var v=parseInt(e.node().style.fontSize,10),m={fontSize:v};s$(a[2],m,function(b,T,S){s.selectAll("svg."+l).remove(),s.selectAll("g."+l+"-group").remove();var C=b&&b.select("svg");if(!C||!C.node()){f(),h();return}var P=s.append("g").classed(l+"-group",!0).attr({"pointer-events":"none","data-unformatted":i,"data-math":"Y"});P.node().appendChild(C.node()),T&&T.node()&&C.node().insertBefore(T.node().cloneNode(!0),C.node().firstChild);var E=S.width,I=S.height;C.attr({class:l,height:I,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var R=e.node().style.fill||"black",N=C.select("g");N.attr({fill:R,stroke:R});var z=N.node().getBoundingClientRect(),O=z.width,H=z.height;(O>E||H>I)&&(C.style("overflow","hidden"),z=C.node().getBoundingClientRect(),O=z.width,H=z.height);var V=+e.attr("x"),W=+e.attr("y"),J=v||e.node().getBoundingClientRect().height,re=-J/4;if(l[0]==="y")P.attr({transform:"rotate("+[-90,V,W]+")"+t$(-O/2,re-H/2)});else if(l[0]==="l")W=re-H/2;else if(l[0]==="a"&&l.indexOf("atitle")!==0)V=0,W=re;else{var oe=e.attr("text-anchor");V=V-O*(oe==="middle"?.5:oe==="end"?1:0),W=W+re-H/2}C.attr({x:V,y:W}),r&&r.call(e,P),h(P)})})):f(),e};var i$=/(<|<|<)/g,n$=/(>|>|>)/g;function o$(e){return e.replace(i$,"\\lt ").replace(n$,"\\gt ")}var rC=[["$","$"],["\\(","\\)"]];function s$(e,t,r){var i=parseInt((MathJax.version||"").split(".")[0]);if(i!==2&&i!==3){_c.warn("No MathJax version:",MathJax.version);return}var a,s,l,f,h=function(){return s=_c.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:rC},displayAlign:"left"})},v=function(){s=_c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=rC},m=function(){if(a=MathJax.Hub.config.menuSettings.renderer,a!=="SVG")return MathJax.Hub.setRenderer("SVG")},b=function(){a=MathJax.config.startup.output,a!=="svg"&&(MathJax.config.startup.output="svg")},T=function(){var R="math-output-"+_c.randstr({},64);f=Fn.select("body").append("div").attr({id:R}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(o$(e));var N=f.node();return i===2?MathJax.Hub.Typeset(N):MathJax.typeset([N])},S=function(){var R=f.select(i===2?".MathJax_SVG":".MathJax"),N=!R.empty()&&f.select("svg").node();if(!N)_c.log("There was an error in the tex syntax.",e),r();else{var z=N.getBoundingClientRect(),O;i===2?O=Fn.select("body").select("#MathJax_SVG_glyphs"):O=R.select("defs"),r(R,O,z)}f.remove()},C=function(){if(a!=="SVG")return MathJax.Hub.setRenderer(a)},P=function(){a!=="svg"&&(MathJax.config.startup.output=a)},E=function(){return l!==void 0&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(s)},I=function(){MathJax.config=s};i===2?MathJax.Hub.Queue(h,m,T,S,C,E):i===3&&(v(),b(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){T(),S(),P(),I()}))}var oC={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"},l$={sub:"0.3em",sup:"-0.6em"},u$={sub:"-0.21em",sup:"0.42em"},aC="\u200B",iC=["http:","https:","mailto:","",void 0,":"],sC=Yl.NEWLINES=/(\r\n?|\n)/g,Iw=/(<[^<>]*>)/,Rw=/<(\/?)([^ >]*)(\s+(.*))?>/i,f$=//i;Yl.BR_TAG_ALL=//gi;var lC=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,uC=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,fC=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,c$=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function cd(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&B_(i)}var h$=/(^|;)\s*color:/;Yl.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,i=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",s=a.length,l=e.split(Iw),f=[],h="",v=0,m=0;ms?f.push(b.substr(0,P-s)+a):f.push(b.substr(0,P));break}h=""}}return f.join("")};var v$={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},d$=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B_(e){return e.replace(d$,function(t,r){var i;return r.charAt(0)==="#"?i=p$(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):i=v$[r],i||t})}Yl.convertEntities=B_;function p$(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 m$(e,t){t=t.replace(sC," ");var r=!1,i=[],a,s=-1;function l(){s++;var H=document.createElementNS(Dw.svg,"tspan");Fn.select(H).attr({class:"line",dy:s*r$+"em"}),e.appendChild(H),a=H;var V=i;if(i=[{node:H}],V.length>1)for(var W=1;W.",t);return}var V=i.pop();H!==V.type&&_c.log("Start tag <"+V.type+"> doesnt match end tag <"+H+">. Pretending it did match.",t),a=i[i.length-1].node}var m=f$.test(t);m?l():(a=e,i=[{node:e}]);for(var b=t.split(Iw),T=0;T{"use strict";var y$=ja(),U_=Tf(),Vy=Da(),O_=Bt(),hC=Ua(),g$=ed().isValid;function _$(e,t,r){var i=t?O_.nestedProperty(e,t).get()||{}:e,a=i[r||"color"];a&&a._inputArray&&(a=a._inputArray);var s=!1;if(O_.isArrayOrTypedArray(a)){for(var l=0;l=0;i--,a++){var s=e[i];r[a]=[1-s[0],s[1]]}return r}function gC(e,t){t=t||{};for(var r=e.domain,i=e.range,a=i.length,s=new Array(a),l=0;l{"use strict";var xC=rw(),b$=xC.FORMAT_LINK,w$=xC.DATE_FORMAT_LINK;function T$(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?Fw:bC)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function Fw(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: "+b$+"."].join(" ")}function bC(e,t){return Fw(e,t)+[" And for dates see: "+w$+".","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(" ")}wC.exports={axisHoverFormat:T$,descriptionOnlyNumbers:Fw,descriptionWithDates:bC}});var Ru=de((zge,BC)=>{"use strict";var TC=qo(),C0=Af(),NC=hc().dash,Bw=hn().extendFlat,AC=Di().templatedArray,MC=qw().descriptionWithDates,A$=Hi().ONEDAY,Cf=Ao(),M$=Cf.HOUR_PATTERN,S$=Cf.WEEKDAY_PATTERN,Nw={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},k$=Bw({},Nw,{values:Nw.values.slice().concat(["sync"])});function SC(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var kC={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},CC={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},EC={valType:"data_array",editType:"ticks"},LC={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function PC(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function DC(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var zC={valType:"color",dflt:C0.defaultLine,editType:"ticks"},IC={valType:"color",dflt:C0.lightLine,editType:"ticks"};function RC(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var FC=Bw({},NC,{editType:"ticks"}),qC={valType:"boolean",editType:"ticks"};BC.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:C0.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:TC({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Cf.idRegex.x.toString(),Cf.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:[Cf.idRegex.x.toString(),Cf.idRegex.y.toString()],editType:"calc"},rangebreaks:AC("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:[S$,M$,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:A$},editType:"calc"}),tickmode:k$,nticks:SC(),tick0:kC,dtick:CC,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:EC,ticktext:{valType:"data_array",editType:"ticks"},ticks:LC,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:PC(),tickwidth:DC(),tickcolor:zC,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:Bw({},NC,{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:TC({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:MC("tick label")},tickformatstops:AC("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:MC("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:C0.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:qC,gridcolor:IC,gridwidth:RC(),griddash:FC,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:C0.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:C0.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Cf.idRegex.x.toString(),Cf.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Cf.idRegex.x.toString(),Cf.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Nw,nticks:SC("minor"),tick0:kC,dtick:CC,tickvals:EC,ticks:LC,ticklen:PC("minor"),tickwidth:DC("minor"),tickcolor:zC,gridcolor:IC,gridwidth:RC("minor"),griddash:FC,showgrid:qC,editType:"ticks"},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 V_=de((Ige,VC)=>{"use strict";var Zi=Ru(),OC=qo(),UC=hn().extendFlat,C$=nl().overrideAll;VC.exports=C$({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:Zi.linecolor,outlinewidth:Zi.linewidth,bordercolor:Zi.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Zi.minor.tickmode,nticks:Zi.nticks,tick0:Zi.tick0,dtick:Zi.dtick,tickvals:Zi.tickvals,ticktext:Zi.ticktext,ticks:UC({},Zi.ticks,{dflt:""}),ticklabeloverflow:UC({},Zi.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:Zi.ticklen,tickwidth:Zi.tickwidth,tickcolor:Zi.tickcolor,ticklabelstep:Zi.ticklabelstep,showticklabels:Zi.showticklabels,labelalias:Zi.labelalias,tickfont:OC({}),tickangle:Zi.tickangle,tickformat:Zi.tickformat,tickformatstops:Zi.tickformatstops,tickprefix:Zi.tickprefix,showtickprefix:Zi.showtickprefix,ticksuffix:Zi.ticksuffix,showticksuffix:Zi.showticksuffix,separatethousands:Zi.separatethousands,exponentformat:Zi.exponentformat,minexponent:Zi.minexponent,showexponent:Zi.showexponent,title:{text:{valType:"string"},font:OC({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var xc=de((Fge,GC)=>{"use strict";var E$=V_(),L$=c0().counter,P$=g_(),HC=ed().scales,Rge=P$(HC);function H_(e){return"`"+e+"`"}GC.exports=function(t,r){t=t||"",r=r||{};var i=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,s="noScale"in r?r.noScale:t==="marker.line",l="showScaleDflt"in r?r.showScaleDflt:i==="z",f=typeof r.colorscaleDflt=="string"?HC[r.colorscaleDflt]:null,h=r.editTypeOverride||"",v=t?t+".":"",m,b;"colorAttr"in r?(m=r.colorAttr,b=r.colorAttr):(m={z:"z",c:"color"}[i],b="in "+H_(v+m));var T=a?" Has an effect only if "+b+" is set to a numerical array.":"",S=i+"auto",C=i+"min",P=i+"max",E=i+"mid",I=H_(v+S),R=H_(v+C),N=H_(v+P),z=R+" and "+N,O={};O[C]=O[P]=void 0;var H={};H[S]=!1;var V={};return m==="color"&&(V.color={valType:"color",arrayOk:!0,editType:h||"style"},r.anim&&(V.color.anim=!0)),V[S]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:O},V[C]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:H},V[P]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:H},V[E]={valType:"number",dflt:null,editType:"calc",impliedEdits:O},V.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1}},V.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},V.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(V.showscale={valType:"boolean",dflt:l,editType:"calc"},V.colorbar=E$),r.noColorAxis||(V.coloraxis={valType:"subplotid",regex:L$("coloraxis"),dflt:null,editType:"calc"}),V}});var Uw=de((qge,ZC)=>{"use strict";var D$=hn().extendFlat,z$=xc(),Ow=ed().scales;ZC.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Ow.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Ow.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Ow.RdBu,editType:"calc"}},coloraxis:D$({_isSubplotObj:!0,editType:"calc"},z$("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Vw=de((Nge,YC)=>{"use strict";var I$=Bt();YC.exports=function(t){return I$.isPlainObject(t.colorbar)}});var Zw=de(Gw=>{"use strict";var Hw=Da(),WC=Bt(),XC=Hi(),R$=XC.ONEDAY,F$=XC.ONEWEEK;Gw.dtick=function(e,t){var r=t==="log",i=t==="date",a=t==="category",s=i?R$:1;if(!e)return s;if(Hw(e))return e=Number(e),e<=0?s:a?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if(typeof e!="string"||!(i||r))return s;var l=e.charAt(0),f=e.substr(1);return f=Hw(f)?Number(f):0,f<=0||!(i&&l==="M"&&f===Math.round(f)||r&&l==="L"||r&&l==="D"&&(f===1||f===2))?s:e};Gw.tick0=function(e,t,r,i){if(t==="date")return WC.cleanDate(e,WC.dateTick0(r,i%F$===0?1:0));if(!(i==="D1"||i==="D2"))return Hw(e)?Number(e):0}});var Yw=de((Oge,JC)=>{"use strict";var jC=Zw(),q$=Bt().isArrayOrTypedArray,N$=il().isTypedArraySpec,B$=il().decodeTypedArraySpec;JC.exports=function(t,r,i,a,s){s||(s={});var l=s.isMinor,f=l?t.minor||{}:t,h=l?r.minor:r,v=l?"minor.":"";function m(R){var N=f[R];return N$(N)&&(N=B$(N)),N!==void 0?N:(h._template||{})[R]}var b=m("tick0"),T=m("dtick"),S=m("tickvals"),C=q$(S)?"array":T?"linear":"auto",P=i(v+"tickmode",C);if(P==="auto"||P==="sync")i(v+"nticks");else if(P==="linear"){var E=h.dtick=jC.dtick(T,a);h.tick0=jC.tick0(b,a,r.calendar,E)}else if(a!=="multicategory"){var I=i(v+"tickvals");I===void 0?h.tickmode="auto":l||i("ticktext")}}});var Xw=de((Uge,QC)=>{"use strict";var Ww=Bt(),KC=Ru();QC.exports=function(t,r,i,a){var s=a.isMinor,l=s?t.minor||{}:t,f=s?r.minor:r,h=s?KC.minor:KC,v=s?"minor.":"",m=Ww.coerce2(l,f,h,"ticklen",s?(r.ticklen||5)*.6:void 0),b=Ww.coerce2(l,f,h,"tickwidth",s?r.tickwidth||1:void 0),T=Ww.coerce2(l,f,h,"tickcolor",(s?r.tickcolor:void 0)||f.color),S=i(v+"ticks",!s&&a.outerTicks||m||b||T?"outside":"");S||(delete f.ticklen,delete f.tickwidth,delete f.tickcolor)}});var jw=de((Vge,$C)=>{"use strict";$C.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],i=r.filter(function(s){return t[s]!==void 0}),a=function(s){return t[s]===t[i[0]]};if(i.every(a)||i.length===1)return t[i[0]]}});var Wl=de((Hge,eE)=>{"use strict";var G_=Bt(),O$=Di();eE.exports=function(t,r,i){var a=i.name,s=i.inclusionAttr||"visible",l=r[a],f=G_.isArrayOrTypedArray(t[a])?t[a]:[],h=r[a]=[],v=O$.arrayTemplater(r,a,s),m,b;for(m=0;m{"use strict";var Jw=Bt(),U$=Ua().contrast,tE=Ru(),V$=jw(),H$=Wl();rE.exports=function(t,r,i,a,s){s||(s={});var l=i("labelalias");Jw.isPlainObject(l)||delete r.labelalias;var f=V$(t),h=i("showticklabels");if(h){s.noTicklabelshift||i("ticklabelshift"),s.noTicklabelstandoff||i("ticklabelstandoff");var v=s.font||{},m=r.color,b=r.ticklabelposition||"",T=b.indexOf("inside")!==-1?U$(s.bgColor):m&&m!==tE.color.dflt?m:v.color;if(Jw.coerceFont(i,"tickfont",v,{overrideDflt:{color:T}}),!s.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&i("ticklabelstep"),!s.noAng){var S=i("tickangle");!s.noAutotickangles&&S==="auto"&&i("autotickangles")}if(a!=="category"){var C=i("tickformat");H$(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:G$}),r.tickformatstops.length||delete r.tickformatstops,!s.noExp&&!C&&a!=="date"&&(i("showexponent",f),i("exponentformat"),i("minexponent"),i("separatethousands"))}}};function G$(e,t){function r(a,s){return Jw.coerce(e,t,tE.tickformatstops,a,s)}var i=r("enabled");i&&(r("dtickrange"),r("value"))}});var Qw=de((Zge,aE)=>{"use strict";var Z$=jw();aE.exports=function(t,r,i,a,s){s||(s={});var l=s.tickSuffixDflt,f=Z$(t),h=i("tickprefix");h&&i("showtickprefix",f);var v=i("ticksuffix",l);v&&i("showticksuffix",f)}});var $w=de((Yge,iE)=>{"use strict";var Ih=Bt(),Y$=Di(),W$=Yw(),X$=Xw(),j$=Kw(),J$=Qw(),K$=V_();iE.exports=function(t,r,i){var a=Y$.newContainer(r,"colorbar"),s=t.colorbar||{};function l(oe,ne){return Ih.coerce(s,a,K$,oe,ne)}var f=i.margin||{t:0,b:0,l:0,r:0},h=i.width-f.l-f.r,v=i.height-f.t-f.b,m=l("orientation"),b=m==="v",T=l("thicknessmode");l("thickness",T==="fraction"?30/(b?h:v):30);var S=l("lenmode");l("len",S==="fraction"?1:b?v:h);var C=l("yref"),P=l("xref"),E=C==="paper",I=P==="paper",R,N,z,O="left";b?(z="middle",O=I?"left":"right",R=I?1.02:1,N=.5):(z=E?"bottom":"top",O="center",R=.5,N=E?1.02:1),Ih.coerce(s,a,{x:{valType:"number",min:I?-2:0,max:I?3:1,dflt:R}},"x"),Ih.coerce(s,a,{y:{valType:"number",min:E?-2:0,max:E?3:1,dflt:N}},"y"),l("xanchor",O),l("xpad"),l("yanchor",z),l("ypad"),Ih.noneOrAll(s,a,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var H=Ih.coerce(s,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:b?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":"hide past div"),W$(s,a,l,"linear");var V=i.font,W={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:V};H.indexOf("inside")!==-1&&(W.bgColor="black"),J$(s,a,l,"linear",W),j$(s,a,l,"linear",W),X$(s,a,l,"linear",W),l("title.text",i._dfltTitle.colorbar);var J=a.showticklabels?a.tickfont:V,re=Ih.extendFlat({},V,{family:J.family,size:Ih.bigFont(J.size)});Ih.coerceFont(l,"title.font",re),l("title.side",b?"top":"right")}});var hd=de((Wge,sE)=>{"use strict";var nE=Da(),t5=Bt(),Q$=Vw(),$$=$w(),oE=ed().isValid,eee=la().traceIs;function e5(e,t){var r=t.slice(0,t.length-1);return t?t5.nestedProperty(e,r).get()||{}:e}sE.exports=function e(t,r,i,a,s){var l=s.prefix,f=s.cLetter,h="_module"in r,v=e5(t,l),m=e5(r,l),b=e5(r._template||{},l)||{},T=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,i,a,s)};if(h){var S=i._colorAxes||{},C=a(l+"coloraxis");if(C){var P=eee(r,"contour")&&t5.nestedProperty(r,"contours.coloring").get()||"heatmap",E=S[C];E?(E[2].push(T),E[0]!==P&&(E[0]=!1,t5.warn(["Ignoring coloraxis:",C,"setting","as it is linked to incompatible colorscales."].join(" ")))):S[C]=[P,r,[T]];return}}var I=v[f+"min"],R=v[f+"max"],N=nE(I)&&nE(R)&&I{"use strict";var lE=Bt(),tee=Di(),uE=Uw(),ree=hd();fE.exports=function(t,r){function i(b,T){return lE.coerce(t,r,uE,b,T)}i("colorscale.sequential"),i("colorscale.sequentialminus"),i("colorscale.diverging");var a=r._colorAxes,s,l;function f(b,T){return lE.coerce(s,l,uE.coloraxis,b,T)}for(var h in a){var v=a[h];if(v[0])s=t[h]||{},l=tee.newContainer(r,h,"coloraxis"),l._name=h,ree(s,l,r,f,{prefix:"",cLetter:"c"});else{for(var m=0;m{"use strict";var aee=Bt(),iee=kf().hasColorscale,nee=kf().extractOpts;hE.exports=function(t,r){function i(m,b){var T=m["_"+b];T!==void 0&&(m[b]=T)}function a(m,b){var T=b.container?aee.nestedProperty(m,b.container).get():m;if(T)if(T.coloraxis)T._colorAx=r[T.coloraxis];else{var S=nee(T),C=S.auto;(C||S.min===void 0)&&i(T,b.min),(C||S.max===void 0)&&i(T,b.max),S.autocolorscale&&i(T,"colorscale")}}for(var s=0;s{"use strict";var dE=Da(),r5=Bt(),oee=kf().extractOpts;pE.exports=function(t,r,i){var a=t._fullLayout,s=i.vals,l=i.containerStr,f=l?r5.nestedProperty(r,l).get():r,h=oee(f),v=h.auto!==!1,m=h.min,b=h.max,T=h.mid,S=function(){return r5.aggNums(Math.min,null,s)},C=function(){return r5.aggNums(Math.max,null,s)};if(m===void 0?m=S():v&&(f._colorAx&&dE(m)?m=Math.min(m,S()):m=S()),b===void 0?b=C():v&&(f._colorAx&&dE(b)?b=Math.max(b,C()):b=C()),v&&T!==void 0&&(b-T>T-m?m=T-(b-T):b-T=0?P=a.colorscale.sequential:P=a.colorscale.sequentialminus,h._sync("colorscale",P)}}});var L0=de((Kge,mE)=>{"use strict";var Z_=ed(),E0=kf();mE.exports={moduleType:"component",name:"colorscale",attributes:xc(),layoutAttributes:Uw(),supplyLayoutDefaults:cE(),handleDefaults:hd(),crossTraceDefaults:vE(),calc:Hy(),scales:Z_.scales,defaultScale:Z_.defaultScale,getScale:Z_.get,isValidScale:Z_.isValid,hasColorscale:E0.hasColorscale,extractOpts:E0.extractOpts,extractScale:E0.extractScale,flipScale:E0.flipScale,makeColorScaleFunc:E0.makeColorScaleFunc,makeColorScaleFuncFromTrace:E0.makeColorScaleFuncFromTrace}});var rs=de((Qge,gE)=>{"use strict";var yE=Bt(),see=il().isTypedArraySpec;gE.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 yE.isPlainObject(t)&&(yE.isArrayOrTypedArray(t.size)||see(t.size))}}});var a5=de(($ge,_E)=>{"use strict";var lee=Da();_E.exports=function(t,r){r||(r=2);var i=t.marker,a=i.sizeref||1,s=i.sizemin||0,l=i.sizemode==="area"?function(f){return Math.sqrt(f/a)}:function(f){return f/a};return function(f){var h=l(f/r);return lee(h)&&h>0?Math.max(h,s):0}}});var bc=de(No=>{"use strict";var xE=Bt();No.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};No.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],i=e.yaxes||[],a=0;a=0&&r.index{TE.exports=vee;var i5={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},hee=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function vee(e){var t=[];return e.replace(hee,function(r,i,a){var s=i.toLowerCase();for(a=pee(a),s=="m"&&a.length>2&&(t.push([i].concat(a.splice(0,2))),s="l",i=i=="m"?"l":"L");;){if(a.length==i5[s])return a.unshift(i),t.push(a);if(a.length{"use strict";var mee=n5(),sr=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},ha="M0,0Z",AE=Math.sqrt(2),Rh=Math.sqrt(3),o5=Math.PI,s5=Math.cos,l5=Math.sin;EE.exports={circle:{n:0,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a="M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z";return r?da(t,r,a):a}},square:{n:1,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")}},diamond:{n:2,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.3,2);return da(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"Z")}},cross:{n:3,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.4,2),a=sr(e*1.2,2);return da(t,r,"M"+a+","+i+"H"+i+"V"+a+"H-"+i+"V"+i+"H-"+a+"V-"+i+"H-"+i+"V-"+a+"H"+i+"V-"+i+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.8/AE,2),a="l"+i+","+i,s="l"+i+",-"+i,l="l-"+i+",-"+i,f="l-"+i+","+i;return da(t,r,"M0,"+i+a+s+l+s+l+f+l+f+a+f+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M-"+i+","+a+"H"+i+"L0,-"+s+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M-"+i+",-"+a+"H"+i+"L0,"+s+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M"+a+",-"+i+"V"+i+"L-"+s+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M-"+a+",-"+i+"V"+i+"L"+s+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M-"+a+",-"+i+"H"+i+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M"+i+",-"+a+"V"+i+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M"+a+","+i+"H-"+i+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M-"+i+","+a+"V-"+i+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.951,2),a=sr(e*.588,2),s=sr(-e,2),l=sr(e*-.309,2),f=sr(e*.809,2);return da(t,r,"M"+i+","+l+"L"+a+","+f+"H-"+a+"L-"+i+","+l+"L0,"+s+"Z")}},hexagon:{n:14,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e/2,2),s=sr(e*Rh/2,2);return da(t,r,"M"+s+",-"+a+"V"+a+"L0,"+i+"L-"+s+","+a+"V-"+a+"L0,-"+i+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e/2,2),s=sr(e*Rh/2,2);return da(t,r,"M-"+a+","+s+"H"+a+"L"+i+",0L"+a+",-"+s+"H-"+a+"L-"+i+",0Z")}},octagon:{n:16,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.924,2),a=sr(e*.383,2);return da(t,r,"M-"+a+",-"+i+"H"+a+"L"+i+",-"+a+"V"+a+"L"+a+","+i+"H-"+a+"L-"+i+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(va(t))return ha;var i=e*1.4,a=sr(i*.225,2),s=sr(i*.951,2),l=sr(i*.363,2),f=sr(i*.588,2),h=sr(-i,2),v=sr(i*-.309,2),m=sr(i*.118,2),b=sr(i*.809,2),T=sr(i*.382,2);return da(t,r,"M"+a+","+v+"H"+s+"L"+l+","+m+"L"+f+","+b+"L0,"+T+"L-"+f+","+b+"L-"+l+","+m+"L-"+s+","+v+"H-"+a+"L0,"+h+"Z")}},hexagram:{n:18,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.66,2),a=sr(e*.38,2),s=sr(e*.76,2);return da(t,r,"M-"+s+",0l-"+a+",-"+i+"h"+s+"l"+a+",-"+i+"l"+a+","+i+"h"+s+"l-"+a+","+i+"l"+a+","+i+"h-"+s+"l-"+a+","+i+"l-"+a+",-"+i+"h-"+s+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(va(t))return ha;var i=sr(e*Rh*.8,2),a=sr(e*.8,2),s=sr(e*1.6,2),l=sr(e*4,2),f="A "+l+","+l+" 0 0 1 ";return da(t,r,"M-"+i+","+a+f+i+","+a+f+"0,-"+s+f+"-"+i+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(va(t))return ha;var i=sr(e*Rh*.8,2),a=sr(e*.8,2),s=sr(e*1.6,2),l=sr(e*4,2),f="A "+l+","+l+" 0 0 1 ";return da(t,r,"M"+i+",-"+a+f+"-"+i+",-"+a+f+"0,"+s+f+i+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.1,2),a=sr(e*2,2),s="A "+a+","+a+" 0 0 1 ";return da(t,r,"M-"+i+",-"+i+s+"-"+i+","+i+s+i+","+i+s+i+",-"+i+s+"-"+i+",-"+i+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2),a=sr(e*1.9,2),s="A "+a+","+a+" 0 0 1 ";return da(t,r,"M-"+i+",0"+s+"0,"+i+s+i+",0"+s+"0,-"+i+s+"-"+i+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.7,2),a=sr(e*1.4,2);return da(t,r,"M0,"+a+"L"+i+",0L0,-"+a+"L-"+i+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2),a=sr(e*.7,2);return da(t,r,"M0,"+a+"L"+i+",0L0,-"+a+"L-"+i+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"H-"+i+"L"+i+",-"+i+"H-"+i+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"V-"+i+"L-"+i+","+i+"V-"+i+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e/AE,2);return da(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.3,2);return da(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM0,-"+i+"V"+i+"M-"+i+",0H"+i)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.3,2),a=sr(e*.65,2);return da(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*.85,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(va(t))return ha;var i=sr(e/2,2),a=sr(e,2);return da(t,r,"M"+i+","+a+"V-"+a+"M"+(i-a)+",-"+a+"V"+a+"M"+a+","+i+"H-"+a+"M-"+a+","+(i-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M-"+i+","+s+"L0,0M"+i+","+s+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M-"+i+",-"+s+"L0,0M"+i+",-"+s+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M"+s+","+i+"L0,0M"+s+",-"+i+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M-"+s+","+i+"L0,0M-"+s+",-"+i+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2);return da(t,r,"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2);return da(t,r,"M0,"+i+"V-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"L-"+i+",-"+i)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M0,0L-"+i+","+a+"H"+i+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M0,0L-"+i+",-"+a+"H"+i+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,0L"+i+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,0L-"+i+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+","+a+"H"+i+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+",-"+a+"H"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,-"+a+"V"+a+"M0,0L"+i+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,-"+a+"V"+a+"M0,0L-"+i+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(va(t))return ha;var i=o5/2.5,a=2*e*s5(i),s=2*e*l5(i);return da(t,r,"M0,0L"+-a+","+s+"L"+a+","+s+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(va(t))return ha;var i=o5/4,a=2*e*s5(i),s=2*e*l5(i);return da(t,r,"M0,0L"+-a+","+s+"A "+2*e+","+2*e+" 0 0 1 "+a+","+s+"Z")},backoff:.4,noDot:!0}};function va(e){return e===null}var ME,SE,kE,CE;function da(e,t,r){if((!e||e%360===0)&&!t)return r;if(kE===e&&CE===t&&ME===r)return SE;kE=e,CE=t,ME=r;function i(E,I){var R=s5(E),N=l5(E),z=I[0],O=I[1]+(t||0);return[z*R-O*N,z*N+O*R]}for(var a=e/180*o5,s=0,l=0,f=mee(r),h="",v=0;v{"use strict";var to=ja(),bi=Bt(),yee=bi.numberFormat,md=Da(),d5=Tf(),W_=la(),Mo=Ua(),gee=L0(),Zy=bi.strTranslate,X_=co(),_ee=zh(),xee=ts(),bee=xee.LINE_SPACING,OE=a_().DESELECTDIM,wee=rs(),Tee=a5(),Aee=bc().appendArrayPointValue,vr=JE.exports={};vr.font=function(e,t){var r=t.variant,i=t.style,a=t.weight,s=t.color,l=t.size,f=t.family,h=t.shadow,v=t.lineposition,m=t.textcase;f&&e.style("font-family",f),l+1&&e.style("font-size",l+"px"),s&&e.call(Mo.fill,s),a&&e.style("font-weight",a),i&&e.style("font-style",i),r&&e.style("font-variant",r),m&&e.style("text-transform",u5(See(m))),h&&e.style("text-shadow",h==="auto"?X_.makeTextShadow(Mo.contrast(s)):u5(h)),v&&e.style("text-decoration-line",u5(kee(v)))};function u5(e){return e==="none"?void 0:e}var Mee={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function See(e){return Mee[e]}function kee(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}vr.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};vr.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};vr.setRect=function(e,t,r,i,a){e.call(vr.setPosition,t,r).call(vr.setSize,i,a)};vr.translatePoint=function(e,t,r,i){var a=r.c2p(e.x),s=i.c2p(e.y);if(md(a)&&md(s)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",s):t.attr("transform",Zy(a,s));else return!1;return!0};vr.translatePoints=function(e,t,r){e.each(function(i){var a=to.select(this);vr.translatePoint(i,a,t,r)})};vr.hideOutsideRangePoint=function(e,t,r,i,a,s){t.attr("display",r.isPtWithinRange(e,a)&&i.isPtWithinRange(e,s)?null:"none")};vr.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each(function(a){var s=a[0].trace,l=s.xcalendar,f=s.ycalendar,h=W_.traceIs(s,"bar-like")?".bartext":".point,.textpoint";e.selectAll(h).each(function(v){vr.hideOutsideRangePoint(v,to.select(this),r,i,l,f)})})}};vr.crispRound=function(e,t,r){return!t||!md(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};vr.singleLineStyle=function(e,t,r,i,a){t.style("fill","none");var s=(((e||[])[0]||{}).trace||{}).line||{},l=r||s.width||0,f=a||s.dash||"";Mo.stroke(t,i||s.color),vr.dashLine(t,f,l)};vr.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each(function(a){var s=(((a||[])[0]||{}).trace||{}).line||{},l=t||s.width||0,f=i||s.dash||"";to.select(this).call(Mo.stroke,r||s.color).call(vr.dashLine,f,l)})};vr.dashLine=function(e,t,r){r=+r||0,t=vr.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};vr.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 UE(e,t,r,i){var a=t.fillpattern,s=t.fillgradient,l=a&&vr.getPatternAttr(a.shape,0,"");if(l){var f=vr.getPatternAttr(a.bgcolor,0,null),h=vr.getPatternAttr(a.fgcolor,0,null),v=a.fgopacity,m=vr.getPatternAttr(a.size,0,8),b=vr.getPatternAttr(a.solidity,0,.3),T=t.uid;vr.pattern(e,"point",r,T,l,m,b,void 0,a.fillmode,f,h,v)}else if(s&&s.type!=="none"){var S=s.type,C="scatterfill-"+t.uid;if(i&&(C="legendfill-"+t.uid),!i&&(s.start!==void 0||s.stop!==void 0)){var P,E;S==="horizontal"?(P={x:s.start,y:0},E={x:s.stop,y:0}):S==="vertical"&&(P={x:0,y:s.start},E={x:0,y:s.stop}),P.x=t._xA.c2p(P.x===void 0?t._extremes.x.min[0].val:P.x,!0),P.y=t._yA.c2p(P.y===void 0?t._extremes.y.min[0].val:P.y,!0),E.x=t._xA.c2p(E.x===void 0?t._extremes.x.max[0].val:E.x,!0),E.y=t._yA.c2p(E.y===void 0?t._extremes.y.max[0].val:E.y,!0),e.call(GE,r,C,"linear",s.colorscale,"fill",P,E,!0,!1)}else S==="horizontal"&&(S=S+"reversed"),e.call(vr.gradient,r,C,S,s.colorscale,"fill")}else t.fillcolor&&e.call(Mo.fill,t.fillcolor)}vr.singleFillStyle=function(e,t){var r=to.select(e.node()),i=r.data(),a=((i[0]||[])[0]||{}).trace||{};UE(e,a,t,!1)};vr.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(i){var a=to.select(this);i[0].trace&&UE(a,i[0].trace,t,r)})};var PE=LE();vr.symbolNames=[];vr.symbolFuncs=[];vr.symbolBackOffs=[];vr.symbolNeedLines={};vr.symbolNoDot={};vr.symbolNoFill={};vr.symbolList=[];Object.keys(PE).forEach(function(e){var t=PE[e],r=t.n;vr.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),vr.symbolNames[r]=e,vr.symbolFuncs[r]=t.f,vr.symbolBackOffs[r]=t.backoff||0,t.needLine&&(vr.symbolNeedLines[r]=!0),t.noDot?vr.symbolNoDot[r]=!0:vr.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(vr.symbolNoFill[r]=!0)});var Cee=vr.symbolNames.length,Eee="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";vr.symbolNumber=function(e){if(md(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=vr.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=Cee||e>=400?0:Math.floor(Math.max(e,0))};function VE(e,t,r,i){var a=e%100;return vr.symbolFuncs[a](t,r,i)+(e>=200?Eee:"")}var DE=yee("~f"),HE={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}};vr.gradient=function(e,t,r,i,a,s){var l=HE[i];return GE(e,t,r,l.type,a,s,l.start,l.stop,!1,l.reversed)};function GE(e,t,r,i,a,s,l,f,h,v){var m=a.length,b;i==="linear"?b={node:"linearGradient",attrs:{x1:l.x,y1:l.y,x2:f.x,y2:f.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:v}:i==="radial"&&(b={node:"radialGradient",reversed:v});for(var T=new Array(m),S=0;S=0&&e.i===void 0&&(e.i=s.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):e.mo===void 0?l.opacity:e.mo),i.ms2mrc){var h;e.ms==="various"||l.size==="various"?h=3:h=i.ms2mrc(e.ms),e.mrc=h,i.selectedSizeFn&&(h=e.mrc=i.selectedSizeFn(e));var v=vr.symbolNumber(e.mx||l.symbol)||0;e.om=v%200>=100;var m=y5(e,r),b=m5(e,r);t.attr("d",VE(v,h,m,b))}var T=!1,S,C,P;if(e.so)P=f.outlierwidth,C=f.outliercolor,S=l.outliercolor;else{var E=(f||{}).width;P=(e.mlw+1||E+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?C=e.mlcc=i.lineScale(e.mlc):bi.isArrayOrTypedArray(f.color)?C=Mo.defaultLine:C=f.color,bi.isArrayOrTypedArray(l.color)&&(S=Mo.defaultLine,T=!0),"mc"in e?S=e.mcc=i.markerScale(e.mc):S=l.color||l.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(S=i.selectedColorFn(e))}if(e.om)t.call(Mo.stroke,S).style({"stroke-width":(P||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:P)+"px");var I=l.gradient,R=e.mgt;R?T=!0:R=I&&I.type,bi.isArrayOrTypedArray(R)&&(R=R[0],HE[R]||(R=0));var N=l.pattern,z=N&&vr.getPatternAttr(N.shape,e.i,"");if(R&&R!=="none"){var O=e.mgc;O?T=!0:O=I.color;var H=r.uid;T&&(H+="-"+e.i),vr.gradient(t,a,H,R,[[0,O],[1,S]],"fill")}else if(z){var V=!1,W=N.fgcolor;!W&&s&&s.color&&(W=s.color,V=!0);var J=vr.getPatternAttr(W,e.i,s&&s.color||null),re=vr.getPatternAttr(N.bgcolor,e.i,null),oe=N.fgopacity,ne=vr.getPatternAttr(N.size,e.i,8),fe=vr.getPatternAttr(N.solidity,e.i,.3);V=V||e.mcc||bi.isArrayOrTypedArray(N.shape)||bi.isArrayOrTypedArray(N.bgcolor)||bi.isArrayOrTypedArray(N.fgcolor)||bi.isArrayOrTypedArray(N.size)||bi.isArrayOrTypedArray(N.solidity);var ve=r.uid;V&&(ve+="-"+e.i),vr.pattern(t,"point",a,ve,z,ne,fe,e.mcc,N.fillmode,re,J,oe)}else bi.isArrayOrTypedArray(S)?Mo.fill(t,S[e.i]):Mo.fill(t,S);P&&Mo.stroke(t,C)}};vr.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=vr.tryColorscale(r,""),t.lineScale=vr.tryColorscale(r,"line"),W_.traceIs(e,"symbols")&&(t.ms2mrc=wee.isBubble(e)?Tee(e):function(){return(r.size||6)/2}),e.selectedpoints&&bi.extendFlat(t,vr.makeSelectedPointStyleFns(e)),t};vr.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},a=e.marker||{},s=r.marker||{},l=i.marker||{},f=a.opacity,h=s.opacity,v=l.opacity,m=h!==void 0,b=v!==void 0;(bi.isArrayOrTypedArray(f)||m||b)&&(t.selectedOpacityFn=function(z){var O=z.mo===void 0?a.opacity:z.mo;return z.selected?m?h:O:b?v:OE*O});var T=a.color,S=s.color,C=l.color;(S||C)&&(t.selectedColorFn=function(z){var O=z.mcc||T;return z.selected?S||O:C||O});var P=a.size,E=s.size,I=l.size,R=E!==void 0,N=I!==void 0;return W_.traceIs(e,"symbols")&&(R||N)&&(t.selectedSizeFn=function(z){var O=z.mrc||P/2;return z.selected?R?E/2:O:N?I/2:O}),t};vr.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},a=e.textfont||{},s=r.textfont||{},l=i.textfont||{},f=a.color,h=s.color,v=l.color;return t.selectedTextColorFn=function(m){var b=m.tc||f;return m.selected?h||b:v||(h?b:Mo.addOpacity(b,OE))},t};vr.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=vr.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(s,l){s.style("opacity",r.selectedOpacityFn(l))}),r.selectedColorFn&&a.push(function(s,l){Mo.fill(s,r.selectedColorFn(l))}),r.selectedSizeFn&&a.push(function(s,l){var f=l.mx||i.symbol||0,h=r.selectedSizeFn(l);s.attr("d",VE(vr.symbolNumber(f),h,y5(l,t),m5(l,t))),l.mrc2=h}),a.length&&e.each(function(s){for(var l=to.select(this),f=0;f0?r:0}vr.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var a=vr.makeSelectedTextStyleFns(t);i=a.selectedTextColorFn}var s=t.texttemplate,l=r._fullLayout;e.each(function(f){var h=to.select(this),v=s?bi.extractOption(f,t,"txt","texttemplate"):bi.extractOption(f,t,"tx","text");if(!v&&v!==0){h.remove();return}if(s){var m=t._module.formatLabels,b=m?m(f,t,l):{},T={};Aee(T,t,f.i);var S=t._meta||{};v=bi.texttemplateString(v,b,l._d3locale,T,f,S)}var C=f.tp||t.textposition,P=YE(f,t),E=i?i(f):f.tc||t.textfont.color;h.call(vr.font,{family:f.tf||t.textfont.family,weight:f.tw||t.textfont.weight,style:f.ty||t.textfont.style,variant:f.tv||t.textfont.variant,textcase:f.tC||t.textfont.textcase,lineposition:f.tE||t.textfont.lineposition,shadow:f.tS||t.textfont.shadow,size:P,color:E}).text(v).call(X_.convertToTspans,r).call(ZE,C,P,f.mrc)})}};vr.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=vr.makeSelectedTextStyleFns(t);e.each(function(i){var a=to.select(this),s=r.selectedTextColorFn(i),l=i.tp||t.textposition,f=YE(i,t);Mo.fill(a,s);var h=W_.traceIs(t,"bar-like");ZE(a,l,f,i.mrc2||i.mrc,h)})}};var zE=.5;vr.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],i=[],a;for(a=1;a=h||z>=m&&z<=h)&&(O<=b&&O>=v||O>=b&&O<=v)&&(e=[z,O])}return e}vr.applyBackoff=jE;vr.makeTester=function(){var e=bi.ensureSingleById(to.select("body"),"svg","js-plotly-tester",function(r){r.attr(_ee.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=bi.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});vr.tester=e,vr.testref=t};vr.savedBBoxes={};var c5=0,Dee=1e4;vr.bBox=function(e,t,r){r||(r=IE(e));var i;if(r){if(i=vr.savedBBoxes[r],i)return bi.extendFlat({},i)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=IE(a),r){var s=+a.getAttribute("x")||0,l=+a.getAttribute("y")||0,f=a.getAttribute("transform");if(!f){var h=vr.bBox(a,!1,r);return s&&(h.left+=s,h.right+=s),l&&(h.top+=l,h.bottom+=l),h}if(r+="~"+s+"~"+l+"~"+f,i=vr.savedBBoxes[r],i)return bi.extendFlat({},i)}}var v,m;t?v=e:(m=vr.tester.node(),v=e.cloneNode(!0),m.appendChild(v)),to.select(v).attr("transform",null).call(X_.positionText,0,0);var b=v.getBoundingClientRect(),T=vr.testref.node().getBoundingClientRect();t||m.removeChild(v);var S={height:b.height,width:b.width,left:b.left-T.left,top:b.top-T.top,right:b.right-T.left,bottom:b.bottom-T.top};return c5>=Dee&&(vr.savedBBoxes={},c5=0),r&&(vr.savedBBoxes[r]=S),c5++,bi.extendFlat({},S)};function IE(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}vr.setClipUrl=function(e,t,r){e.attr("clip-path",p5(t,r))};function p5(e,t){if(!e)return null;var r=t._context,i=r._exportedPlot?"":r._baseUrl||"";return i?"url('"+i+"#"+e+"')":"url(#"+e+")"}vr.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",a=i.replace(t,function(s,l,f){return[l,f].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};vr.setTranslate=function(e,t,r){var i=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",s=e.attr?"attr":"setAttribute",l=e[a]("transform")||"";return t=t||0,r=r||0,l=l.replace(i,"").trim(),l+=Zy(t,r),l=l.trim(),e[s]("transform",l),l};vr.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",a=i.replace(t,function(s,l,f){return[l,f].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};vr.setScale=function(e,t,r){var i=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",s=e.attr?"attr":"setAttribute",l=e[a]("transform")||"";return t=t||1,r=r||1,l=l.replace(i,"").trim(),l+="scale("+t+","+r+")",l=l.trim(),e[s]("transform",l),l};var zee=/\s*sc.*/;vr.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var i=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(zee,"");a+=i,a=a.trim(),this.setAttribute("transform",a)})}};var Iee=/translate\([^)]*\)\s*$/;vr.setTextPointsScale=function(e,t,r){e&&e.each(function(){var i,a=to.select(this),s=a.select("text");if(s.node()){var l=parseFloat(s.attr("x")||0),f=parseFloat(s.attr("y")||0),h=(a.attr("transform")||"").match(Iee);t===1&&r===1?i=[]:i=[Zy(l,f),"scale("+t+","+r+")",Zy(-l,-f)],h&&i.push(h),a.attr("transform",i.join(""))}})};function m5(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}vr.getMarkerStandoff=m5;var Gy=Math.atan2,vd=Math.cos,D0=Math.sin;function RE(e,t){var r=t[0],i=t[1];return[r*vd(e)-i*D0(e),r*D0(e)+i*vd(e)]}var FE,qE,NE,BE,h5,v5;function y5(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||bi.isArrayOrTypedArray(r))&&(r=0));var i,a,s=t.marker.angleref;if(s==="previous"||s==="north"){if(t._geo){var l=t._geo.project(e.lonlat);i=l[0],a=l[1]}else{var f=t._xA,h=t._yA;if(f&&h)i=f.c2p(e.x),a=h.c2p(e.y);else return 90}if(t._geo){var v=e.lonlat[0],m=e.lonlat[1],b=t._geo.project([v,m+1e-5]),T=t._geo.project([v+1e-5,m]),S=Gy(T[1]-a,T[0]-i),C=Gy(b[1]-a,b[0]-i),P;if(s==="north")P=r/180*Math.PI;else if(s==="previous"){var E=v/180*Math.PI,I=m/180*Math.PI,R=FE/180*Math.PI,N=qE/180*Math.PI,z=R-E,O=vd(N)*D0(z),H=D0(N)*vd(I)-vd(N)*D0(I)*vd(z);P=-Gy(O,H)-Math.PI,FE=v,qE=m}var V=RE(S,[vd(P),0]),W=RE(C,[D0(P),0]);r=Gy(V[1]+W[1],V[0]+W[0])/Math.PI*180,s==="previous"&&!(v5===t.uid&&e.i===h5+1)&&(r=null)}if(s==="previous"&&!t._geo)if(v5===t.uid&&e.i===h5+1&&md(i)&&md(a)){var J=i-NE,re=a-BE,oe=t.line&&t.line.shape||"",ne=oe.slice(oe.length-1);ne==="h"&&(re=0),ne==="v"&&(J=0),r+=Gy(re,J)/Math.PI*180+90}else r=null}return NE=i,BE=a,h5=e.i,v5=t.uid,r}vr.getMarkerAngle=y5});var Yy=de((i1e,eL)=>{"use strict";var z0=ja(),Ree=Da(),Fee=eo(),g5=la(),yd=Bt(),KE=yd.strTranslate,j_=_i(),J_=Ua(),I0=co(),QE=a_(),qee=ts().OPPOSITE_SIDE,$E=/ [XY][0-9]* /,_5=1.6,x5=1.6;function Nee(e,t,r){var i=e._fullLayout,a=r.propContainer,s=r.propName,l=r.placeholder,f=r.traceIndex,h=r.avoid||{},v=r.attributes,m=r.transform,b=r.containerGroup,T=1,S=a.title,C=(S&&S.text?S.text:"").trim(),P=!1,E=S&&S.font?S.font:{},I=E.family,R=E.size,N=E.color,z=E.weight,O=E.style,H=E.variant,V=E.textcase,W=E.lineposition,J=E.shadow,re=r.subtitlePropName,oe=!!re,ne=r.subtitlePlaceholder,fe=(a.title||{}).subtitle||{text:"",font:{}},ve=fe.text.trim(),ke=!1,Ce=1,Te=fe.font,pe=Te.family,Ae=Te.size,Se=Te.color,Le=Te.weight,Ke=Te.style,ht=Te.variant,it=Te.textcase,lt=Te.lineposition,He=Te.shadow,_t;s==="title.text"?_t="titleText":s.indexOf("axis")!==-1?_t="axisTitleText":s.indexOf("colorbar"!==-1)&&(_t="colorbarTitleText");var at=e._context.edits[_t];function At(Ut,xt){return Ut===void 0||xt===void 0?!1:Ut.replace($E," % ")===xt.replace($E," % ")}C===""?T=0:At(C,l)&&(at||(C=""),T=.2,P=!0),oe&&(ve===""?Ce=0:At(ve,ne)&&(at||(ve=""),Ce=.2,ke=!0)),r._meta?C=yd.templateString(C,r._meta):i._meta&&(C=yd.templateString(C,i._meta));var kt=C||ve||at,pt;b||(b=yd.ensureSingle(i._infolayer,"g","g-"+t),pt=i._hColorbarMoveTitle);var ge=b.selectAll("text."+t).data(kt?[0]:[]);ge.enter().append("text"),ge.text(C).attr("class",t),ge.exit().remove();var Re=null,xe=t+"-subtitle",et=ve||at;if(oe&&et&&(Re=b.selectAll("text."+xe).data(et?[0]:[]),Re.enter().append("text"),Re.text(ve).attr("class",xe),Re.exit().remove()),!kt)return b;function vt(Ut,xt){yd.syncOrAsync([tt,Nt],{title:Ut,subtitle:xt})}function tt(Ut){var xt=Ut.title,Et=Ut.subtitle,ir;!m&&pt&&(m={}),m?(ir="",m.rotate&&(ir+="rotate("+[m.rotate,v.x,v.y]+")"),(m.offset||pt)&&(ir+=KE(0,(m.offset||0)-(pt||0)))):ir=null,xt.attr("transform",ir);function Wt(Tt){if(Tt){var wt=z0.select(Tt.node().parentNode).select("."+xe);if(!wt.empty()){var Vt=Tt.node().getBBox();if(Vt.height){var Kt=Vt.y+Vt.height+_5*Ae;wt.attr("y",Kt)}}}}if(xt.style("opacity",T*J_.opacity(N)).call(j_.font,{color:J_.rgb(N),size:z0.round(R,2),family:I,weight:z,style:O,variant:H,textcase:V,shadow:J,lineposition:W}).attr(v).call(I0.convertToTspans,e,Wt),Et){var Be=b.select("."+t+"-math-group"),ft=xt.node().getBBox(),mt=Be.node()?Be.node().getBBox():void 0,Ar=mt?mt.y+mt.height+_5*Ae:ft.y+ft.height+x5*Ae,dr=yd.extendFlat({},v,{y:Ar});Et.attr("transform",ir),Et.style("opacity",Ce*J_.opacity(Se)).call(j_.font,{color:J_.rgb(Se),size:z0.round(Ae,2),family:pe,weight:Le,style:Ke,variant:ht,textcase:it,shadow:He,lineposition:lt}).attr(dr).call(I0.convertToTspans,e)}return Fee.previousPromises(e)}function Nt(Ut){var xt=Ut.title,Et=z0.select(xt.node().parentNode);if(h&&h.selection&&h.side&&C){Et.attr("transform",null);var ir=qee[h.side],Wt=h.side==="left"||h.side==="top"?-1:1,Be=Ree(h.pad)?h.pad:2,ft=j_.bBox(Et.node()),mt={t:0,b:0,l:0,r:0},Ar=e._fullLayout._reservedMargin;for(var dr in Ar)for(var Tt in Ar[dr]){var wt=Ar[dr][Tt];mt[Tt]=Math.max(mt[Tt],wt)}var Vt={left:mt.l,top:mt.t,right:i.width-mt.r,bottom:i.height-mt.b},Kt=h.maxShift||Wt*(Vt[h.side]-ft[h.side]),Ht=0;if(Kt<0)Ht=Kt;else{var Ot=h.offsetLeft||0,er=h.offsetTop||0;ft.left-=Ot,ft.right-=Ot,ft.top-=er,ft.bottom-=er,h.selection.each(function(){var xr=j_.bBox(this);yd.bBoxIntersect(ft,xr,Be)&&(Ht=Math.max(Ht,Wt*(xr[h.side]-ft[ir])+Be))}),Ht=Math.min(Kt,Ht),a._titleScoot=Math.abs(Ht)}if(Ht>0||Kt<0){var Mr={left:[-Ht,0],right:[Ht,0],top:[0,-Ht],bottom:[0,Ht]}[h.side];Et.attr("transform",KE(Mr[0],Mr[1]))}}}ge.call(vt,Re);function Mt(Ut,xt){Ut.text(xt).on("mouseover.opacity",function(){z0.select(this).transition().duration(QE.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){z0.select(this).transition().duration(QE.HIDE_PLACEHOLDER).style("opacity",0)})}if(at&&(C?ge.on(".opacity",null):(Mt(ge,l),P=!0),ge.call(I0.makeEditable,{gd:e}).on("edit",function(Ut){f!==void 0?g5.call("_guiRestyle",e,s,Ut,f):g5.call("_guiRelayout",e,s,Ut)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(vt)}).on("input",function(Ut){this.text(Ut||" ").call(I0.positionText,v.x,v.y)}),oe)){if(oe&&!C){var Ct=ge.node().getBBox(),Rt=Ct.y+Ct.height+x5*Ae;Re.attr("y",Rt)}ve?Re.on(".opacity",null):(Mt(Re,ne),ke=!0),Re.call(I0.makeEditable,{gd:e}).on("edit",function(Ut){g5.call("_guiRelayout",e,"title.subtitle.text",Ut)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(vt)}).on("input",function(Ut){this.text(Ut||" ").call(I0.positionText,Re.attr("x"),Re.attr("y"))})}return ge.classed("js-placeholder",P),Re&&Re.classed("js-placeholder",ke),b}eL.exports={draw:Nee,SUBTITLE_PADDING_EM:x5,SUBTITLE_PADDING_MATHJAX_EM:_5}});var i2=de((n1e,nL)=>{"use strict";var Bee=ja(),Oee=s0().utcFormat,zi=Bt(),Uee=zi.numberFormat,Ef=Da(),Fh=zi.cleanNumber,Vee=zi.ms2DateTime,tL=zi.dateTime2ms,Lf=zi.ensureNumber,rL=zi.isArrayOrTypedArray,qh=Hi(),K_=qh.FP_SAFE,Fu=qh.BADNUM,Hee=qh.LOG_CLIP,Gee=qh.ONEWEEK,Q_=qh.ONEDAY,$_=qh.ONEHOUR,aL=qh.ONEMIN,iL=qh.ONESEC,e2=$n(),a2=Ao(),t2=a2.HOUR_PATTERN,r2=a2.WEEKDAY_PATTERN;function Wy(e){return Math.pow(10,e)}function b5(e){return e!=null}nL.exports=function(t,r){r=r||{};var i=t._id||"x",a=i.charAt(0);function s(z,O){if(z>0)return Math.log(z)/Math.LN10;if(z<=0&&O&&t.range&&t.range.length===2){var H=t.range[0],V=t.range[1];return .5*(H+V-2*Hee*Math.abs(H-V))}else return Fu}function l(z,O,H,V){if((V||{}).msUTC&&Ef(z))return+z;var W=tL(z,H||t.calendar);if(W===Fu)if(Ef(z)){z=+z;var J=Math.floor(zi.mod(z+.05,1)*10),re=Math.round(z-J/10);W=tL(new Date(re))+J/10}else return Fu;return W}function f(z,O,H){return Vee(z,O,H||t.calendar)}function h(z){return t._categories[Math.round(z)]}function v(z){if(b5(z)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[z]!==void 0)return t._categoriesMap[z];t._categories.push(typeof z=="number"?String(z):z);var O=t._categories.length-1;return t._categoriesMap[z]=O,O}return Fu}function m(z,O){for(var H=new Array(O),V=0;Vt.range[1]&&(H=!H);for(var V=H?-1:1,W=V*z,J=0,re=0;rene)J=re+1;else{J=W<(oe+ne)/2?re:re+1;break}}var fe=t._B[J]||0;return isFinite(fe)?C(z,t._m2,fe):0},I=function(z){var O=t._rangebreaks.length;if(!O)return P(z,t._m,t._b);for(var H=0,V=0;Vt._rangebreaks[V].pmax&&(H=V+1);return P(z,t._m2,t._B[H])}}t.c2l=t.type==="log"?s:Lf,t.l2c=t.type==="log"?Wy:Lf,t.l2p=E,t.p2l=I,t.c2p=t.type==="log"?function(z,O){return E(s(z,O))}:E,t.p2c=t.type==="log"?function(z){return Wy(I(z))}:I,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=Fh,t.c2d=t.c2r=t.l2d=t.l2r=Lf,t.d2p=t.r2p=function(z){return t.l2p(Fh(z))},t.p2d=t.p2r=I,t.cleanPos=Lf):t.type==="log"?(t.d2r=t.d2l=function(z,O){return s(Fh(z),O)},t.r2d=t.r2c=function(z){return Wy(Fh(z))},t.d2c=t.r2l=Fh,t.c2d=t.l2r=Lf,t.c2r=s,t.l2d=Wy,t.d2p=function(z,O){return t.l2p(t.d2r(z,O))},t.p2d=function(z){return Wy(I(z))},t.r2p=function(z){return t.l2p(Fh(z))},t.p2r=I,t.cleanPos=Lf):t.type==="date"?(t.d2r=t.r2d=zi.identity,t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(z,O,H){return t.l2p(l(z,0,H))},t.p2d=t.p2r=function(z,O,H){return f(I(z),O,H)},t.cleanPos=function(z){return zi.cleanDate(z,Fu,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=v,t.r2d=t.c2d=t.l2d=h,t.d2r=t.d2l_noadd=T,t.r2c=function(z){var O=S(z);return O!==void 0?O:t.fraction2r(.5)},t.l2r=t.c2r=Lf,t.r2l=S,t.d2p=function(z){return t.l2p(t.r2c(z))},t.p2d=function(z){return h(I(z))},t.r2p=t.d2p,t.p2r=I,t.cleanPos=function(z){return typeof z=="string"&&z!==""?z:Lf(z)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=h,t.d2r=t.d2l_noadd=T,t.r2c=function(z){var O=T(z);return O!==void 0?O:t.fraction2r(.5)},t.r2c_just_indices=b,t.l2r=t.c2r=Lf,t.r2l=T,t.d2p=function(z){return t.l2p(t.r2c(z))},t.p2d=function(z){return h(I(z))},t.r2p=t.d2p,t.p2r=I,t.cleanPos=function(z){return Array.isArray(z)||typeof z=="string"&&z!==""?z:Lf(z)},t.setupMultiCategory=function(z){var O=t._traceIndices,H,V,W=t._matchGroup;if(W&&t._categories.length===0){for(var J in W)if(J!==i){var re=r[e2.id2name(J)];O=O.concat(re._traceIndices)}}var oe=[[0,{}],[0,{}]],ne=[];for(H=0;Hre[1]&&(V[J?0:1]=H),V[0]===V[1]){var oe=t.l2r(O),ne=t.l2r(H);if(O!==void 0){var fe=oe+1;H!==void 0&&(fe=Math.min(fe,ne)),V[J?1:0]=fe}if(H!==void 0){var ve=ne+1;O!==void 0&&(ve=Math.max(ve,oe)),V[J?0:1]=ve}}}},t.cleanRange=function(z,O){t._cleanRange(z,O),t.limitRange(z)},t._cleanRange=function(z,O){O||(O={}),z||(z="range");var H=zi.nestedProperty(t,z).get(),V,W;if(t.type==="date"?W=zi.dfltRange(t.calendar):a==="y"?W=a2.DFLTRANGEY:t._name==="realaxis"?W=[0,1]:W=O.dfltRange||a2.DFLTRANGEX,W=W.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(W[0]=0),!H||H.length!==2){zi.nestedProperty(t,z).set(W);return}var J=H[0]===null,re=H[1]===null;for(t.type==="date"&&!t.autorange&&(H[0]=zi.cleanDate(H[0],Fu,t.calendar),H[1]=zi.cleanDate(H[1],Fu,t.calendar)),V=0;V<2;V++)if(t.type==="date"){if(!zi.isDateTime(H[V],t.calendar)){t[z]=W;break}if(t.r2l(H[0])===t.r2l(H[1])){var oe=zi.constrain(t.r2l(H[0]),zi.MIN_MS+1e3,zi.MAX_MS-1e3);H[0]=t.l2r(oe-1e3),H[1]=t.l2r(oe+1e3);break}}else{if(!Ef(H[V]))if(!(J||re)&&Ef(H[1-V]))H[V]=H[1-V]*(V?10:.1);else{t[z]=W;break}if(H[V]<-K_?H[V]=-K_:H[V]>K_&&(H[V]=K_),H[0]===H[1]){var ne=Math.max(1,Math.abs(H[0]*1e-6));H[0]-=ne,H[1]+=ne}}},t.setScale=function(z){var O=r._size;if(t.overlaying){var H=e2.getFromId({_fullLayout:r},t.overlaying);t.domain=H.domain}var V=z&&t._r?"_r":"range",W=t.calendar;t.cleanRange(V);var J=t.r2l(t[V][0],W),re=t.r2l(t[V][1],W),oe=a==="y";if(oe?(t._offset=O.t+(1-t.domain[1])*O.h,t._length=O.h*(t.domain[1]-t.domain[0]),t._m=t._length/(J-re),t._b=-t._m*re):(t._offset=O.l+t.domain[0]*O.w,t._length=O.w*(t.domain[1]-t.domain[0]),t._m=t._length/(re-J),t._b=-t._m*J),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var ne,fe;if(t._rangebreaks=t.locateBreaks(Math.min(J,re),Math.max(J,re)),t._rangebreaks.length){for(ne=0;nere&&(ve=!ve),ve&&t._rangebreaks.reverse();var ke=ve?-1:1;for(t._m2=ke*t._length/(Math.abs(re-J)-t._lBreaks),t._B.push(-t._m2*(oe?re:J)),ne=0;neW&&(W+=7,JW&&(W+=24,J=V&&J=V&&z=He.min&&(KeHe.max&&(He.max=ht),it=!1)}it&&re.push({min:Ke,max:ht})}};for(H=0;H{"use strict";var oL=Da(),w5=Bt(),Zee=Hi().BADNUM,n2=w5.isArrayOrTypedArray,Yee=w5.isDateTime,Wee=w5.cleanNumber,sL=Math.round;uL.exports=function(t,r,i){var a=t,s=i.noMultiCategory;if(n2(a)&&!a.length)return"-";if(!s&&Qee(a))return"multicategory";if(s&&Array.isArray(a[0])){for(var l=[],f=0;fs*2}function lL(e){return Math.max(1,(e-1)/1e3)}function Kee(e,t){for(var r=e.length,i=lL(r),a=0,s=0,l={},f=0;fa*2}function Qee(e){return n2(e[0])&&n2(e[1])}});var Xy=de((s1e,yL)=>{"use strict";var $ee=ja(),vL=Da(),Nh=Bt(),o2=Hi().FP_SAFE,ete=la(),tte=_i(),dL=$n(),rte=dL.getFromId,ate=dL.isLinked;yL.exports={applyAutorangeOptions:mL,getAutoRange:A5,makePadFn:M5,doAutoRange:nte,findExtremes:ote,concatExtremes:C5};function A5(e,t){var r,i,a=[],s=e._fullLayout,l=M5(s,t,0),f=M5(s,t,1),h=C5(e,t),v=h.min,m=h.max;if(v.length===0||m.length===0)return Nh.simpleMap(t.range,t.r2l);var b=v[0].val,T=m[0].val;for(r=1;r0&&(re=N-l(H)-f(V),re>z?oe/re>O&&(W=H,J=V,O=oe/re):oe/N>O&&(W={val:H.val,nopad:1},J={val:V.val,nopad:1},O=oe/N));function ne(Te,pe){return Math.max(Te,f(pe))}if(b===T){var fe=b-1,ve=b+1;if(I)if(b===0)a=[0,1];else{var ke=(b>0?m:v).reduce(ne,0),Ce=b/(1-Math.min(.5,ke/N));a=b>0?[0,Ce]:[Ce,0]}else R?a=[Math.max(0,fe),Math.max(1,ve)]:a=[fe,ve]}else I?(W.val>=0&&(W={val:0,nopad:1}),J.val<=0&&(J={val:0,nopad:1})):R&&(W.val-O*l(W)<0&&(W={val:0,nopad:1}),J.val<=0&&(J={val:1,nopad:1})),O=(J.val-W.val-fL(t,H.val,V.val))/(N-l(W)-f(J)),a=[W.val-O*l(W),J.val+O*f(J)];return a=mL(a,t),t.limitRange&&t.limitRange(),C&&a.reverse(),Nh.simpleMap(a,t.l2r||Number)}function fL(e,t,r){var i=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),s=0;s0?r.ppadplus:r.ppadminus)||r.ppad||0),H=z((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),V=z(r.vpadplus||r.vpad),W=z(r.vpadminus||r.vpad);if(!v){if(R=1/0,N=-1/0,h)for(b=0;b0&&(R=T),T>N&&T-o2&&(R=T),T>N&&T=oe;b--)re(b);return{min:i,max:a,opts:r}}function S5(e,t,r,i){pL(e,t,r,i,ste)}function k5(e,t,r,i){pL(e,t,r,i,lte)}function pL(e,t,r,i,a){for(var s=i.tozero,l=i.extrapad,f=!0,h=0;h=r&&(v.extrapad||!l)){f=!1;break}else a(t,v.val)&&v.pad<=r&&(l||!v.extrapad)&&(e.splice(h,1),h--)}if(f){var m=s&&t===0;e.push({val:t,pad:m?0:r,extrapad:m?!1:l})}}function hL(e){return vL(e)&&Math.abs(e)=t}function ute(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&s2(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&s2(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function fte(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&s2(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&s2(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function s2(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=h&&(s=h,r=h),l<=h&&(l=h,i=h)}}return r=ute(r,t),i=fte(i,t),[r,i]}});var Yi=de((l1e,BL)=>{"use strict";var Xl=ja(),qn=Da(),R0=eo(),Jy=la(),ta=Bt(),F0=ta.strTranslate,gd=co(),cte=Yy(),Ky=Ua(),sl=_i(),hte=Ru(),gL=Zw(),So=Hi(),vte=So.ONEMAXYEAR,f2=So.ONEAVGYEAR,c2=So.ONEMINYEAR,dte=So.ONEMAXQUARTER,D5=So.ONEAVGQUARTER,h2=So.ONEMINQUARTER,pte=So.ONEMAXMONTH,q0=So.ONEAVGMONTH,v2=So.ONEMINMONTH,ll=So.ONEWEEK,as=So.ONEDAY,Bh=as/2,Df=So.ONEHOUR,Qy=So.ONEMIN,d2=So.ONESEC,mte=So.ONEMILLI,yte=So.ONEMICROSEC,_d=So.MINUS_SIGN,y2=So.BADNUM,z5={K:"zeroline"},I5={K:"gridline",L:"path"},R5={K:"minor-gridline",L:"path"},EL={K:"tick",L:"path"},_L={K:"tick",L:"text"},xL={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},g2=ts(),jy=g2.MID_SHIFT,xd=g2.CAP_SHIFT,$y=g2.LINE_SPACING,gte=g2.OPPOSITE_SIDE,p2=3,$t=BL.exports={};$t.setConvert=i2();var _te=T5(),wc=$n(),xte=wc.idSort,bte=wc.isLinked;$t.id2name=wc.id2name;$t.name2id=wc.name2id;$t.cleanId=wc.cleanId;$t.list=wc.list;$t.listIds=wc.listIds;$t.getFromId=wc.getFromId;$t.getFromTrace=wc.getFromTrace;var LL=Xy();$t.getAutoRange=LL.getAutoRange;$t.findExtremes=LL.findExtremes;var wte=1e-4;function B5(e){var t=(e[1]-e[0])*wte;return[e[0]-t,e[1]+t]}$t.coerceRef=function(e,t,r,i,a,s){var l=i.charAt(i.length-1),f=r._fullLayout._subplots[l+"axis"],h=i+"ref",v={};return a||(a=f[0]||(typeof s=="string"?s:s[0])),s||(s=a),f=f.concat(f.map(function(m){return m+" domain"})),v[h]={valType:"enumerated",values:f.concat(s?typeof s=="string"?[s]:s:[]),dflt:a},ta.coerce(e,t,v,h)};$t.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};$t.coercePosition=function(e,t,r,i,a,s){var l,f,h=$t.getRefType(i);if(h!=="range")l=ta.ensureNumber,f=r(a,s);else{var v=$t.getFromId(t,i);s=v.fraction2r(s),f=r(a,s),l=v.cleanPos}e[a]=l(f)};$t.cleanPosition=function(e,t,r){var i=r==="paper"||r==="pixel"?ta.ensureNumber:$t.getFromId(t,r).cleanPos;return i(e)};$t.redrawComponents=function(e,t){t=t||$t.listIds(e);var r=e._fullLayout;function i(a,s,l,f){for(var h=Jy.getComponentMethod(a,s),v={},m=0;m2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};$t.saveRangeInitial=function(e,t){for(var r=$t.list(e,"",!0),i=!1,a=0;ab*.3||v(i)||v(a))){var T=r.dtick/2;e+=e+Tl){var f=Number(r.substr(1));s.exactYears>l&&f%12===0?e=$t.tickIncrement(e,"M6","reverse")+as*1.5:s.exactMonths>l?e=$t.tickIncrement(e,"M1","reverse")+as*15.5:e-=Bh;var h=$t.tickIncrement(e,r);if(h<=i)return h}return e}$t.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var i=t.dtick&&qn(t._tmin),a;if(i){var s=$t.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,s*.99+t._tmin*.01]}else{var l=ta.simpleMap(t.range,t.r2l);a=[l[0],.8*l[0]+.2*l[1]]}if(e.range=ta.simpleMap(a,t.l2r),e._isMinor=!0,$t.prepTicks(e,r),i){var f=qn(t.dtick),h=qn(e.dtick),v=f?t.dtick:+t.dtick.substring(1),m=h?e.dtick:+e.dtick.substring(1);f&&h?E5(v,m)?v===2*ll&&m===2*as&&(e.dtick=ll):v===2*ll&&m===3*as?e.dtick=ll:v===ll&&!(t._input.minor||{}).nticks?e.dtick=as:TL(v/m,2.5)?e.dtick=v/2:e.dtick=v:String(t.dtick).charAt(0)==="M"?h?e.dtick="M1":E5(v,m)?v>=12&&m===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?E5(v,m)||(e.dtick=TL(v/m,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 E5(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function TL(e,t){return Math.abs(e/t-1)<.001}$t.prepTicks=function(e,t){var r=ta.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var i=e.nticks,a;i||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ta.bigFont(e.tickfont.size||12):15,i=e._length/a):(a=e._id.charAt(0)==="y"?40:80,i=ta.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(i*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,$t.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(s=i-1,l=i):(s=i,l=i);var f=e[s].value,h=e[l].value,v=Math.abs(h-f),m=r||v,b=0;m>=c2?v>=c2&&v<=vte?b=v:b=f2:r===D5&&m>=h2?v>=h2&&v<=dte?b=v:b=D5:m>=v2?v>=v2&&v<=pte?b=v:b=q0:r===ll&&m>=ll?b=ll:m>=as?b=as:r===Bh&&m>=Bh?b=Bh:r===Df&&m>=Df&&(b=Df);var T;b>=v&&(b=v,T=!0);var S=a+b;if(t.rangebreaks&&b>0){for(var C=84,P=0,E=0;Ell&&(b=v)}(b>0||i===0)&&(e[i].periodX=a+b/2)}}$t.calcTicks=function(t,r){for(var i=t.type,a=t.calendar,s=t.ticklabelstep,l=t.ticklabelmode==="period",f=t.range[0]>t.range[1],h=!t.ticklabelindex||ta.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],v=ta.simpleMap(t.range,t.r2l,void 0,void 0,r),m=v[1]=(N?0:1);z--){var O=!z;z?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var H=z?t:ta.extendFlat({},t,t.minor);if(O?$t.prepMinorTicks(H,t,r):$t.prepTicks(H,r),H.tickmode==="array"){z?(E=[],C=AL(t,!O)):(I=[],P=AL(t,!O));continue}if(H.tickmode==="sync"){E=[],C=Cte(t);continue}var V=B5(v),W=V[0],J=V[1],re=qn(H.dtick),oe=i==="log"&&!(re||H.dtick.charAt(0)==="L"),ne=$t.tickFirst(H,r);if(z){if(t._tmin=ne,ne=J:ve<=J;ve=$t.tickIncrement(ve,Te,m,a)){if(z&&ke++,H.rangebreaks&&!m){if(ve=T)break}if(E.length>S||ve===fe)break;fe=ve;var pe={value:ve};z?(oe&&ve!==(ve|0)&&(pe.simpleLabel=!0),s>1&&ke%s&&(pe.skipLabel=!0),E.push(pe)):(pe.minor=!0,I.push(pe))}}if(!I||I.length<2)h=!1;else{var Ae=(I[1].value-I[0].value)*(f?-1:1);Qte(Ae,t.tickformat)||(h=!1)}if(!h)R=E;else{var Se=E.concat(I);l&&E.length&&(Se=Se.slice(1)),Se=Se.sort(function(Rt,Ut){return Rt.value-Ut.value}).filter(function(Rt,Ut,xt){return Ut===0||Rt.value!==xt[Ut-1].value});var Le=Se.map(function(Rt,Ut){return Rt.minor===void 0&&!Rt.skipLabel?Ut:null}).filter(function(Rt){return Rt!==null});Le.forEach(function(Rt){h.map(function(Ut){var xt=Rt+Ut;xt>=0&&xt-1;kt--){if(E[kt].drop){E.splice(kt,1);continue}E[kt].value=P5(E[kt].value,t);var xe=t.c2p(E[kt].value);(pt?Re>xe-ge:ReT||EtT&&(xt.periodX=T),Eta&&Tf2)t/=f2,i=a(10),e.dtick="M"+12*Pf(t,i,l2);else if(s>q0)t/=q0,e.dtick="M"+Pf(t,1,ML);else if(s>as){if(e.dtick=Pf(t,as,e._hasDayOfWeekBreaks?[1,2,7,14]:Ete),!r){var l=$t.getTickFormat(e),f=e.ticklabelmode==="period";f&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=ta.dateTick0(e.calendar,2):e.tick0=ta.dateTick0(e.calendar,1),f&&(e._dowTick0=e.tick0)}}else s>Df?e.dtick=Pf(t,Df,ML):s>Qy?e.dtick=Pf(t,Qy,SL):s>d2?e.dtick=Pf(t,d2,SL):(i=a(10),e.dtick=Pf(t,i,l2))}else if(e.type==="log"){e.tick0=0;var h=ta.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(h[1]-h[0])<1){var v=1.5*Math.abs((h[1]-h[0])/t);t=Math.abs(Math.pow(10,h[1])-Math.pow(10,h[0]))/v,i=a(10),e.dtick="L"+Pf(t,i,l2)}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))):V5(e)?(e.tick0=0,i=1,e.dtick=Pf(t,i,Lte)):(e.tick0=0,i=a(10),e.dtick=Pf(t,i,l2));if(e.dtick===0&&(e.dtick=1),!qn(e.dtick)&&typeof e.dtick!="string"){var m=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(m)}};function IL(e){var t=e.dtick;if(e._tickexponent=0,!qn(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),i=e.l2r(r).replace(/(^-|i)/g,""),a=i.length;if(String(t).charAt(0)==="M")a>10||i.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=as&&a<=10||t>=as*15)e._tickround="d";else if(t>=Qy&&a<=16||t>=Df)e._tickround="M";else if(t>=d2&&a<=19||t>=Qy)e._tickround="S";else{var s=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,s)-20,e._tickround<0&&(e._tickround=4)}}else if(qn(t)||t.charAt(0)==="L"){var l=e.range.map(e.r2d||Number);qn(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var f=Math.max(Math.abs(l[0]),Math.abs(l[1])),h=Math.floor(Math.log(f)/Math.LN10+.01),v=e.minexponent===void 0?3:e.minexponent;Math.abs(h)>v&&(m2(e.exponentformat)&&!O5(h)?e._tickexponent=3*Math.round((h-1)/3):e._tickexponent=h)}else e._tickround=null}$t.tickIncrement=function(e,t,r,i){var a=r?-1:1;if(qn(t))return ta.increment(e,a*t);var s=t.charAt(0),l=a*Number(t.substr(1));if(s==="M")return ta.incrementMonth(e,l,i);if(s==="L")return Math.log(Math.pow(10,e)+l)/Math.LN10;if(s==="D"){var f=t==="D2"?zL:DL,h=e+a*.01,v=ta.roundUp(ta.mod(h,1),f,r);return Math.floor(h)+Math.log(Xl.round(Math.pow(10,v),1))/Math.LN10}throw"unrecognized dtick "+String(t)};$t.tickFirst=function(e,t){var r=e.r2l||Number,i=ta.simpleMap(e.range,r,void 0,void 0,t),a=i[1]=0&&I<=e._length?E:null};if(s&&ta.isArrayOrTypedArray(e.ticktext)){var b=ta.simpleMap(e.range,e.r2l),T=(Math.abs(b[1]-b[0])-(e._lBreaks||0))/1e4;for(v=0;v"+f;else{var v=tg(e),m=e._trueSide||e.side;(!v&&m==="top"||v&&m==="bottom")&&(l+="
")}t.text=l}function Dte(e,t,r,i,a){var s=e.dtick,l=t.x,f=e.tickformat,h=typeof s=="string"&&s.charAt(0);if(a==="never"&&(a=""),i&&h!=="L"&&(s="L3",h="L"),f||h==="L")t.text=eg(Math.pow(10,l),e,a,i);else if(qn(s)||h==="D"&&ta.mod(l+.01,1)<.1){var v=Math.round(l),m=Math.abs(v),b=e.exponentformat;b==="power"||m2(b)&&O5(v)?(v===0?t.text=1:v===1?t.text="10":t.text="10"+(v>1?"":_d)+m+"",t.fontSize*=1.25):(b==="e"||b==="E")&&m>2?t.text="1"+b+(v>0?"+":_d)+m:(t.text=eg(Math.pow(10,l),e,"","fakehover"),s==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(h==="D")t.text=String(Math.round(Math.pow(10,ta.mod(l,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(s);if(e.dtick==="D1"){var T=String(t.text).charAt(0);(T==="0"||T==="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*(l<0?.5:.25)))}}function zte(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function Ite(e,t,r){var i=Math.round(t.x),a=e._categories[i]||[],s=a[1]===void 0?"":String(a[1]),l=a[0]===void 0?"":String(a[0]);r?t.text=l+" - "+s:(t.text=s,t.text2=l)}function Rte(e,t,r,i,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=eg(t.x,e,a,i)}function Fte(e,t,r,i,a){if(e.thetaunit==="radians"&&!r){var s=t.x/180;if(s===0)t.text="0";else{var l=qte(s);if(l[1]>=100)t.text=eg(ta.deg2rad(t.x),e,a,i);else{var f=t.x<0;l[1]===1?l[0]===1?t.text="\u03C0":t.text=l[0]+"\u03C0":t.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),f&&(t.text=_d+t.text)}}}else t.text=eg(t.x,e,a,i)}function qte(e){function t(f,h){return Math.abs(f-h)<=1e-6}function r(f,h){return t(h,0)?f:r(h,f%h)}function i(f){for(var h=1;!t(Math.round(f*h)/h,f);)h*=10;return h}var a=i(e),s=e*a,l=Math.abs(r(s,a));return[Math.round(s/l),Math.round(a/l)]}var Nte=["f","p","n","\u03BC","m","","k","M","G","T"];function m2(e){return e==="SI"||e==="B"}function O5(e){return e>14||e<-15}function eg(e,t,r,i){var a=e<0,s=t._tickround,l=r||t.exponentformat||"B",f=t._tickexponent,h=$t.getTickFormat(t),v=t.separatethousands;if(i){var m={exponentformat:l,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:qn(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};IL(m),s=(Number(m._tickround)||0)+4,f=m._tickexponent,t.hoverformat&&(h=t.hoverformat)}if(h)return t._numFormat(h)(e).replace(/-/g,_d);var b=Math.pow(10,-s)/2;if(l==="none"&&(f=0),e=Math.abs(e),e"+C+"":l==="B"&&f===9?e+="B":m2(l)&&(e+=Nte[f/3+5])}return a?_d+e:e}$t.getTickFormat=function(e){var t;function r(h){return typeof h!="string"?h:Number(h.replace("M",""))*q0}function i(h,v){var m=["L","D"];if(typeof h==typeof v){if(typeof h=="number")return h-v;var b=m.indexOf(h.charAt(0)),T=m.indexOf(v.charAt(0));return b===T?Number(h.replace(/(L|D)/g,""))-Number(v.replace(/(L|D)/g,"")):b-T}else return typeof h=="number"?1:-1}function a(h,v,m){var b=m||function(C){return C},T=v[0],S=v[1];return(!T&&typeof T!="number"||b(T)<=b(h))&&(!S&&typeof S!="number"||b(S)>=b(h))}function s(h,v){var m=v[0]===null,b=v[1]===null,T=i(h,v[0])>=0,S=i(h,v[1])<=0;return(m||T)&&(b||S)}var l,f;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(m,1).shift())}});var f={false:{left:0,right:0}};return ta.syncOrAsync(a.map(function(h){return function(){if(h){var v=$t.getFromId(e,h);r||(r={}),r.axShifts=f,r.overlayingShiftedAx=l;var m=$t.drawOne(e,v,r);return v._shiftPusher&&N5(v,v._fullDepth||0,f,!0),v._r=v.range.slice(),v._rl=ta.simpleMap(v._r,v.r2l),m}}}))};$t.drawOne=function(e,t,r){r=r||{};var i=r.axShifts||{},a=r.overlayingShiftedAx||[],s,l,f;t.setScale();var h=e._fullLayout,v=t._id,m=v.charAt(0),b=$t.counterLetter(v),T=h._plots[t._mainSubplot];if(!T)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var S=t.linewidth/2||0;t.ticks==="inside"&&(S+=t.ticklen),N5(t,S,i,!0),N5(t,t.shift||0,i,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Kte(t,i));var C=T[m+"axislayer"],P=t._mainLinePosition,E=P+=t._shift,I=t._mainMirrorPosition,R=t._vals=$t.calcTicks(t),N=[t.mirror,E,I].join("_");for(s=0;s0?xt.bottom-Rt:0,Ut))));var Be=0,ft=0;if(t._shiftPusher&&(Be=Math.max(Ut,xt.height>0?Mt==="l"?Rt-xt.left:xt.right-Rt:0),t.title.text!==h._dfltTitle[m]&&(ft=(t._titleStandoff||0)+(t._titleScoot||0),Mt==="l"&&(ft+=CL(t))),t._fullDepth=Math.max(Be,ft)),t.automargin){Et={x:0,y:0,r:0,l:0,t:0,b:0};var mt=[0,1],Ar=typeof t._shift=="number"?t._shift:0;if(m==="x"){if(Mt==="b"?Et[Mt]=t._depth:(Et[Mt]=t._depth=Math.max(xt.width>0?Rt-xt.top:0,Ut),mt.reverse()),xt.width>0){var dr=xt.right-(t._offset+t._length);dr>0&&(Et.xr=1,Et.r=dr);var Tt=t._offset-xt.left;Tt>0&&(Et.xl=0,Et.l=Tt)}}else if(Mt==="l"?(t._depth=Math.max(xt.height>0?Rt-xt.left:0,Ut),Et[Mt]=t._depth-Ar):(t._depth=Math.max(xt.height>0?xt.right-Rt:0,Ut),Et[Mt]=t._depth+Ar,mt.reverse()),xt.height>0){var wt=xt.bottom-(t._offset+t._length);wt>0&&(Et.yb=0,Et.b=wt);var Vt=t._offset-xt.top;Vt>0&&(Et.yt=1,Et.t=Vt)}Et[b]=t.anchor==="free"?t.position:t._anchorAxis.domain[mt[0]],t.title.text!==h._dfltTitle[m]&&(Et[Mt]+=CL(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(ir={x:0,y:0,r:0,l:0,t:0,b:0},ir[Ct]=t.linewidth,t.mirror&&t.mirror!==!0&&(ir[Ct]+=Ut),t.mirror===!0||t.mirror==="ticks"?ir[b]=t._anchorAxis.domain[mt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(ir[b]=[t._counterDomainMin,t._counterDomainMax][mt[1]]))}Nt&&(Wt=Jy.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(kL(Et,t.automargin),kL(ir,t.automargin)),R0.autoMargin(e,U5(t),Et),R0.autoMargin(e,qL(t),ir),R0.autoMargin(e,NL(t),Wt)}),ta.syncOrAsync(vt)}};function kL(e,t){if(e){var r=Object.keys(xL).reduce(function(i,a){return t.indexOf(a)!==-1&&xL[a].forEach(function(s){i[s]=1}),i},{});Object.keys(e).forEach(function(i){r[i]||(i.length===1?e[i]=0:delete e[i])})}}function Bte(e,t){var r=[],i,a=function(s,l){var f=s.xbnd[l];f!==null&&r.push(ta.extendFlat({},s,{x:f}))};if(t.length){for(i=0;ie.range[1],f=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,h=!f;if(r){var v=l?-1:1;r=r*v}if(i){var m=e.side,b=f&&(m==="top"||m==="left")||h&&(m==="bottom"||m==="right")?1:-1;i=i*b}return e._id.charAt(0)==="x"?function(T){return F0(a+e._offset+e.l2p(F5(T))+r,s+i)}:function(T){return F0(s+i,a+e._offset+e.l2p(F5(T))+r)}};function F5(e){return e.periodX!==void 0?e.periodX:e.x}function Hte(e){var t=e.ticklabelposition||"",r=function(S){return t.indexOf(S)!==-1},i=r("top"),a=r("left"),s=r("right"),l=r("bottom"),f=r("inside"),h=l||a||i||s;if(!h&&!f)return[0,0];var v=e.side,m=h?(e.tickwidth||0)/2:0,b=p2,T=e.tickfont?e.tickfont.size:12;return(l||i)&&(m+=T*xd,b+=(e.linewidth||0)/2),(a||s)&&(m+=(e.linewidth||0)/2,b+=p2),f&&v==="top"&&(b-=T*(1-xd)),(a||i)&&(m=-m),(v==="bottom"||v==="right")&&(b=-b),[h?m:0,f?b:0]}$t.makeTickPath=function(e,t,r,i){i||(i={});var a=i.minor;if(a&&!e.minor)return"";var s=i.len!==void 0?i.len:a?e.minor.ticklen:e.ticklen,l=e._id.charAt(0),f=(e.linewidth||1)/2;return l==="x"?"M0,"+(t+f*r)+"v"+s*r:"M"+(t+f*r)+",0h"+s*r};$t.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",a=function(ne){return i.indexOf(ne)!==-1},s=a("top"),l=a("left"),f=a("right"),h=a("bottom"),v=h||l||s||f,m=a("inside"),b=i==="inside"&&e.ticks==="inside"||!m&&e.ticks==="outside"&&e.tickson!=="boundaries",T=0,S=0,C=b?e.ticklen:0;if(m?C*=-1:v&&(C=0),b&&(T+=C,r)){var P=ta.deg2rad(r);T=C*Math.cos(P)+1,S=C*Math.sin(P)}e.showticklabels&&(b||e.showline)&&(T+=.2*e.tickfont.size),T+=(e.linewidth||1)/2*(m?-1:1);var E={labelStandoff:T,labelShift:S},I,R,N,z,O=0,H=e.side,V=e._id.charAt(0),W=e.tickangle,J;if(V==="x")J=!m&&H==="bottom"||m&&H==="top",z=J?1:-1,m&&(z*=-1),I=S*z,R=t+T*z,N=J?1:-.2,Math.abs(W)===90&&(m?N+=jy:W===-90&&H==="bottom"?N=xd:W===90&&H==="top"?N=jy:N=.5,O=jy/2*(W/90)),E.xFn=function(ne){return ne.dx+I+O*ne.fontSize},E.yFn=function(ne){return ne.dy+R+ne.fontSize*N},E.anchorFn=function(ne,fe){if(v){if(l)return"end";if(f)return"start"}return!qn(fe)||fe===0||fe===180?"middle":fe*z<0!==m?"end":"start"},E.heightFn=function(ne,fe,ve){return fe<-60||fe>60?-.5*ve:e.side==="top"!==m?-ve:0};else if(V==="y"){if(J=!m&&H==="left"||m&&H==="right",z=J?1:-1,m&&(z*=-1),I=T,R=S*z,N=0,!m&&Math.abs(W)===90&&(W===-90&&H==="left"||W===90&&H==="right"?N=xd:N=.5),m){var re=qn(W)?+W:0;if(re!==0){var oe=ta.deg2rad(re);O=Math.abs(Math.sin(oe))*xd*z,N=0}}E.xFn=function(ne){return ne.dx+t-(I+ne.fontSize*N)*z+O*ne.fontSize},E.yFn=function(ne){return ne.dy+R+ne.fontSize*jy},E.anchorFn=function(ne,fe){return qn(fe)&&Math.abs(fe)===90?"middle":J?"end":"start"},E.heightFn=function(ne,fe,ve){return e.side==="right"&&(fe*=-1),fe<-30?-ve:fe<30?-.5*ve:0}}return E};function _2(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}$t.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(l){return l.minor&&!l.noTick}):[]).concat(t.ticks?r.vals.filter(function(l){return!l.minor&&!l.noTick}):[]),s=r.layer.selectAll("path."+i).data(a,_2);s.exit().remove(),s.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(l){return Ky.stroke(Xl.select(this),l.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(l){return sl.crispRound(e,l.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),x2(t,[EL]),s.attr("transform",r.transFn)};$t.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,s=a?r.vals.filter(function(I){return I.minor}):[],l=t.showgrid?r.vals.filter(function(I){return!I.minor}):[],f=r.counterAxis;if(f&&$t.shouldShowZeroLine(e,t,f))for(var h=t.tickmode==="array",v=0;v=0;C--){var P=C?T:S;if(P){var E=P.selectAll("path."+i).data(C?l:s,_2);E.exit().remove(),E.enter().append("path").classed(i,1).classed("crisp",r.crisp!==!1),E.attr("transform",r.transFn).attr("d",r.path).each(function(I){return Ky.stroke(Xl.select(this),I.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(I){return sl.dashStyle(I.minor?t.minor.griddash:t.griddash,I.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(I){return(I.minor?b:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&E.attr("d",r.path)}}x2(t,[I5,R5])}};$t.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",a=$t.shouldShowZeroLine(e,t,r.counterAxis),s=r.layer.selectAll("path."+i).data(a?[{x:0,id:t._id}]:[]);s.exit().remove(),s.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(l,f){return xte(l.id,f.id)})}),s.attr("transform",r.transFn).attr("d",r.path).call(Ky.stroke,t.zerolinecolor||Ky.defaultLine).style("stroke-width",sl.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),x2(t,[z5])};$t.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,a=t._id,s=r.cls||a+"tick",l=r.vals.filter(function(pe){return pe.text}),f=r.labelFns,h=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[s],m=r.layer.selectAll("g."+s).data(t.showticklabels?l:[],_2),b=[];m.enter().append("g").classed(s,1).append("text").attr("text-anchor","middle").each(function(pe){var Ae=Xl.select(this),Se=e._promises.length;Ae.call(gd.positionText,f.xFn(pe),f.yFn(pe)).call(sl.font,{family:pe.font,size:pe.fontSize,color:pe.fontColor,weight:pe.fontWeight,style:pe.fontStyle,variant:pe.fontVariant,textcase:pe.fontTextcase,lineposition:pe.fontLineposition,shadow:pe.fontShadow}).text(pe.text).call(gd.convertToTspans,e),e._promises[Se]?b.push(e._promises.pop().then(function(){T(Ae,h)})):T(Ae,h)}),x2(t,[_L]),m.exit().remove(),r.repositionOnUpdate&&m.each(function(pe){Xl.select(this).select("text").call(gd.positionText,f.xFn(pe),f.yFn(pe))});function T(pe,Ae){pe.each(function(Se){var Le=Xl.select(this),Ke=Le.select(".text-math-group"),ht=f.anchorFn(Se,Ae),it=r.transFn.call(Le.node(),Se)+(qn(Ae)&&+Ae!=0?" rotate("+Ae+","+f.xFn(Se)+","+(f.yFn(Se)-Se.fontSize/2)+")":""),lt=gd.lineCount(Le),He=$y*Se.fontSize,_t=f.heightFn(Se,qn(Ae)?+Ae:0,(lt-1)*He);if(_t&&(it+=F0(0,_t)),Ke.empty()){var at=Le.select("text");at.attr({transform:it,"text-anchor":ht}),at.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var At=sl.bBox(Ke.node()).width,kt=At*{end:-.5,start:.5}[ht];Ke.attr("transform",it+F0(kt,0))}})}t._adjustTickLabelsOverflow=function(){var pe=t.ticklabeloverflow;if(!(!pe||pe==="allow")){var Ae=pe.indexOf("hide")!==-1,Se=t._id.charAt(0)==="x",Le=0,Ke=Se?e._fullLayout.width:e._fullLayout.height;if(pe.indexOf("domain")!==-1){var ht=ta.simpleMap(t.range,t.r2l);Le=t.l2p(ht[0])+t._offset,Ke=t.l2p(ht[1])+t._offset}var it=Math.min(Le,Ke),lt=Math.max(Le,Ke),He=t.side,_t=1/0,at=-1/0;m.each(function(ge){var Re=Xl.select(this),xe=Re.select(".text-math-group");if(xe.empty()){var et=sl.bBox(Re.node()),vt=0;Se?(et.right>lt||et.leftlt||et.top+(t.tickangle?0:ge.fontSize/4)t["_visibleLabelMin_"+ht._id]?ge.style("display","none"):lt.K==="tick"&&!it&&ge.style("display",null)})})})})},T(m,v+1?v:h);function S(){return b.length&&Promise.all(b)}var C=null;function P(){if(T(m,h),l.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){C=t.autotickangles[0];var pe=0,Ae=[],Se,Le=1;m.each(function(xt){pe=Math.max(pe,xt.fontSize);var Et=t.l2p(xt.x),ir=q5(this),Wt=sl.bBox(ir.node());Le=Math.max(Le,gd.lineCount(ir)),Ae.push({top:0,bottom:10,height:10,left:Et-Wt.width/2,right:Et+Wt.width/2+2,width:Wt.width+2})});var Ke=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ht=l.length,it=Math.abs((l[ht-1].x-l[0].x)*t._m)/(ht-1),lt=Ke?it/2:it,He=Ke?t.ticklen:pe*1.25*Le,_t=Math.sqrt(Math.pow(lt,2)+Math.pow(He,2)),at=lt/_t,At=t.autotickangles.map(function(xt){return xt*Math.PI/180}),kt=At.find(function(xt){return Math.abs(Math.cos(xt))<=at});kt===void 0&&(kt=At.reduce(function(xt,Et){return Math.abs(Math.cos(xt))ke*ve&&(oe=ve,W[V]=J[V]=ne[V])}var Ce=Math.abs(oe-re);Ce-z>0?(Ce-=z,z*=1+z/Ce):z=0,t._id.charAt(0)!=="y"&&(z=-z),W[H]=R.p2r(R.r2p(J[H])+O*z),R.autorange==="min"||R.autorange==="max reversed"?(W[0]=null,R._rangeInitial0=void 0,R._rangeInitial1=void 0):(R.autorange==="max"||R.autorange==="min reversed")&&(W[1]=null,R._rangeInitial0=void 0,R._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[R._name+".range"]=W}var Te=ta.syncOrAsync(E);return Te&&Te.then&&e._promises.push(Te),Te};function Gte(e,t,r){var i=t._id+"divider",a=r.vals,s=r.layer.selectAll("path."+i).data(a,_2);s.exit().remove(),s.enter().insert("path",":first-child").classed(i,1).classed("crisp",1).call(Ky.stroke,t.dividercolor).style("stroke-width",sl.crispRound(e,t.dividerwidth,1)+"px"),s.attr("transform",r.transFn).attr("d",r.path)}$t.getPxPosition=function(e,t){var r=e._fullLayout._size,i=t._id.charAt(0),a=t.side,s;if(t.anchor!=="free"?s=t._anchorAxis:i==="x"?s={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:i==="y"&&(s={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return s._offset;if(a==="bottom"||a==="right")return s._offset+s._length};function CL(e){var t=e.title.font.size,r=(e.title.text.match(gd.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(xd+r*$y):r?t*(r+1)*$y:t}function Zte(e,t){var r=e._fullLayout,i=t._id,a=i.charAt(0),s=t.title.font.size,l,f=(t.title.text.match(gd.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?l=t._depth+t.title.standoff+s*xd:(t.side==="top"||t.side==="left")&&(l=t._depth+t.title.standoff+s*(jy+f*$y));else{var h=tg(t);if(t.type==="multicategory")l=t._depth;else{var v=1.5*s;h&&(v=.5*s,t.ticks==="outside"&&(v+=t.ticklen)),l=10+v+(t.linewidth?t.linewidth-1:0)}h||(a==="x"?l+=t.side==="top"?s*(t.showticklabels?1:0):s*(t.showticklabels?1.5:.5):l+=t.side==="right"?s*(t.showticklabels?1:.5):s*(t.showticklabels?.5:0))}var m=$t.getPxPosition(e,t),b,T,S;a==="x"?(T=t._offset+t._length/2,S=t.side==="top"?m-l:m+l):(S=t._offset+t._length/2,T=t.side==="right"?m+l:m-l,b={rotate:"-90",offset:0});var C;if(t.type!=="multicategory"){var P=t._selections[t._id+"tick"];if(C={selection:P,side:t.side},P&&P.node()&&P.node().parentNode){var E=sl.getTranslate(P.node().parentNode);C.offsetLeft=E.x,C.offsetTop=E.y}t.title.hasOwnProperty("standoff")&&(C.pad=0)}return t._titleStandoff=l,cte.draw(e,i+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:C,transform:b,attributes:{x:T,y:S,"text-anchor":"middle"}})}$t.shouldShowZeroLine=function(e,t,r){var i=ta.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===y2)&&(FL(t,0)||!Yte(e,t,r,i)||Wte(e,t))};$t.clipEnds=function(e,t){return t.filter(function(r){return FL(e,r.x)})};function FL(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=yte:/%L/.test(t)?e>=mte:/%[SX]/.test(t)?e>=d2:/%M/.test(t)?e>=Qy:/%[HI]/.test(t)?e>=Df:/%p/.test(t)?e>=Bh:/%[Aadejuwx]/.test(t)?e>=as:/%[UVW]/.test(t)?e>=ll:/%[Bbm]/.test(t)?e>=v2:/%[q]/.test(t)?e>=h2:/%[Yy]/.test(t)?e>=c2:!0}});var UL=de((u1e,OL)=>{"use strict";OL.exports=function(t,r,i){var a,s;if(i){var l=r==="reversed"||r==="min reversed"||r==="max reversed";a=i[l?1:0],s=i[l?0:1]}var f=t("autorangeoptions.minallowed",s===null?a:void 0),h=t("autorangeoptions.maxallowed",a===null?s:void 0);f===void 0&&t("autorangeoptions.clipmin"),h===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var H5=de((f1e,VL)=>{"use strict";var $te=UL();VL.exports=function(t,r,i,a){var s=r._template||{},l=r.type||s.type||"-";i("minallowed"),i("maxallowed");var f=i("range");if(!f){var h;!a.noInsiderange&&l!=="log"&&(h=i("insiderange"),h&&(h[0]===null||h[1]===null)&&(r.insiderange=!1,h=void 0),h&&(f=i("range",h)))}var v=r.getAutorangeDflt(f,a),m=i("autorange",v),b;f&&(f[0]===null&&f[1]===null||(f[0]===null||f[1]===null)&&(m==="reversed"||m===!0)||f[0]!==null&&(m==="min"||m==="max reversed")||f[1]!==null&&(m==="max"||m==="min reversed"))&&(f=void 0,delete r.range,r.autorange=!0,b=!0),b||(v=r.getAutorangeDflt(f,a),m=i("autorange",v)),m&&($te(i,m,f),(l==="linear"||l==="-")&&i("rangemode")),r.cleanRange()}});var GL=de((c1e,HL)=>{var ere={left:0,top:0};HL.exports=tre;function tre(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,a=e.clientY||0,s=rre(t);return r[0]=i-s.left,r[1]=a-s.top,r}function rre(e){return e===window||e===document||e===document.body?ere:e.getBoundingClientRect()}});var G5=de((h1e,ZL)=>{"use strict";var are=_w();function ire(){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}ZL.exports=are&&ire()});var WL=de((v1e,YL)=>{"use strict";YL.exports=function(t,r,i,a,s){var l=(t-i)/(a-i),f=l+r/(a-i),h=(l+f)/2;return s==="left"||s==="bottom"?l:s==="center"||s==="middle"?h:s==="right"||s==="top"?f:l<2/3-h?l:f>4/3-h?f:h}});var JL=de((d1e,jL)=>{"use strict";var XL=Bt(),nre=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];jL.exports=function(t,r,i,a){return i==="left"?t=0:i==="center"?t=1:i==="right"?t=2:t=XL.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=XL.constrain(Math.floor(r*3),0,2),nre[r][t]}});var QL=de((p1e,KL)=>{"use strict";var ore=qy(),sre=b_(),lre=Ey().getGraphDiv,ure=ky(),Z5=KL.exports={};Z5.wrapped=function(e,t,r){e=lre(e),e._fullLayout&&sre.clear(e._fullLayout._uid+ure.HOVERID),Z5.raw(e,t,r)};Z5.raw=function(t,r){var i=t._fullLayout,a=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&ore.triggerHandler(t,"plotly_beforehover",r)===!1)&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}))}});var jl=de((m1e,tP)=>{"use strict";var fre=GL(),Y5=bw(),cre=G5(),hre=Bt().removeElement,vre=Ao(),bd=tP.exports={};bd.align=WL();bd.getCursor=JL();var $L=QL();bd.unhover=$L.wrapped;bd.unhoverRaw=$L.raw;bd.init=function(t){var r=t.gd,i=1,a=r._context.doubleClickDelay,s=t.element,l,f,h,v,m,b,T,S;r._mouseDownTime||(r._mouseDownTime=0),s.style.pointerEvents="all",s.onmousedown=E,cre?(s._ontouchstart&&s.removeEventListener("touchstart",s._ontouchstart),s._ontouchstart=E,s.addEventListener("touchstart",E,{passive:!1})):s.ontouchstart=E;function C(N,z,O){return Math.abs(N)a&&(i=Math.max(i-1,1)),r._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(i,b),!S){var z;try{z=new MouseEvent("click",N)}catch(H){var O=W5(N);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",N.bubbles,N.cancelable,N.view,N.detail,N.screenX,N.screenY,O[0],O[1],N.ctrlKey,N.altKey,N.shiftKey,N.metaKey,N.button,N.relatedTarget)}T.dispatchEvent(z)}r._dragging=!1,r._dragged=!1}};function eP(){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}bd.coverSlip=eP;function W5(e){return fre(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Oh=de((y1e,rP)=>{"use strict";rP.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(i){i.indexOf("cursor-")===0&&t.classed(i,!1)}),r&&t.classed("cursor-"+r,!0)}});var nP=de((g1e,iP)=>{"use strict";var X5=Oh(),rg="data-savedcursor",aP="!!";iP.exports=function(t,r){var i=t.attr(rg);if(r){if(!i){for(var a=(t.attr("class")||"").split(" "),s=0;s{"use strict";var j5=qo(),dre=Af();oP.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:dre.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:j5({editType:"legend"}),grouptitlefont:j5({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:j5({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var w2=de(b2=>{"use strict";b2.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};b2.isVertical=function(t){return t.orientation!=="h"};b2.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var $5=de((b1e,sP)=>{"use strict";var K5=la(),ul=Bt(),pre=Di(),mre=ms(),yre=J5(),gre=d0(),Q5=w2();function _re(e,t,r,i){var a=t[e]||{},s=pre.newContainer(r,e);function l(Te,pe){return ul.coerce(a,s,yre,Te,pe)}var f=ul.coerceFont(l,"font",r.font);l("bgcolor",r.paper_bgcolor),l("bordercolor");var h=l("visible");if(h){for(var v,m=function(Te,pe){var Ae=v._input,Se=v;return ul.coerce(Ae,Se,mre,Te,pe)},b=r.font||{},T=ul.coerceFont(l,"grouptitlefont",b,{overrideDflt:{size:Math.round(b.size*1.1)}}),S=0,C=!1,P="normal",E=(r.shapes||[]).filter(function(Te){return Te.showlegend}),I=i.concat(E).filter(function(Te){return e===(Te.legend||"legend")}),R=0;R(e==="legend"?1:0));if(z===!1&&(r[e]=void 0),!(z===!1&&!a.uirevision)&&(l("uirevision",r.uirevision),z!==!1)){l("borderwidth");var O=l("orientation"),H=l("yref"),V=l("xref"),W=O==="h",J=H==="paper",re=V==="paper",oe,ne,fe,ve="left";W?(oe=0,K5.getComponentMethod("rangeslider","isVisible")(t.xaxis)?J?(ne=1.1,fe="bottom"):(ne=1,fe="top"):J?(ne=-.1,fe="top"):(ne=0,fe="bottom")):(ne=1,fe="auto",re?oe=1.02:(oe=1,ve="right")),ul.coerce(a,s,{x:{valType:"number",editType:"legend",min:re?-2:0,max:re?3:1,dflt:oe}},"x"),ul.coerce(a,s,{y:{valType:"number",editType:"legend",min:J?-2:0,max:J?3:1,dflt:ne}},"y"),l("traceorder",P),Q5.isGrouped(r[e])&&l("tracegroupgap"),l("entrywidth"),l("entrywidthmode"),l("indentation"),l("itemsizing"),l("itemwidth"),l("itemclick"),l("itemdoubleclick"),l("groupclick"),l("xanchor",ve),l("yanchor",fe),l("valign"),ul.noneOrAll(a,s,["x","y"]);var ke=l("title.text");if(ke){l("title.side",W?"left":"top");var Ce=ul.extendFlat({},f,{size:ul.bigFont(f.size)});ul.coerceFont(l,"title.font",Ce)}}}}sP.exports=function(t,r,i){var a,s=i.slice(),l=r.shapes;if(l)for(a=0;a{"use strict";var N0=la(),t4=Bt(),xre=t4.pushUnique,e4=!0;lP.exports=function(t,r,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var s=a.legend.itemclick,l=a.legend.itemdoubleclick,f=a.legend.groupclick;i===1&&s==="toggle"&&l==="toggleothers"&&e4&&r.data&&r._context.showTips&&t4.notifier(t4._(r,"Double-click on legend to isolate one trace"),"long"),e4=!1;var h;if(i===1?h=s:i===2&&(h=l),!h)return;var v=f==="togglegroup",m=a.hiddenlabels?a.hiddenlabels.slice():[],b=t.data()[0][0];if(b.groupTitle&&b.noClick)return;var T=r._fullData,S=(a.shapes||[]).filter(function(Rt){return Rt.showlegend}),C=T.concat(S),P=b.trace;P._isShape&&(P=P._fullInput);var E=P.legendgroup,I,R,N,z,O,H,V={},W=[],J=[],re=[];function oe(Rt,Ut){var xt=W.indexOf(Rt),Et=V.visible;return Et||(Et=V.visible=[]),W.indexOf(Rt)===-1&&(W.push(Rt),xt=W.length-1),Et[xt]=Ut,xt}var ne=(a.shapes||[]).map(function(Rt){return Rt._input}),fe=!1;function ve(Rt,Ut){ne[Rt].visible=Ut,fe=!0}function ke(Rt,Ut){if(!(b.groupTitle&&!v)){var xt=Rt._fullInput||Rt,Et=xt._isShape,ir=xt.index;ir===void 0&&(ir=xt._index);var Wt=xt.visible===!1?!1:Ut;Et?ve(ir,Wt):oe(ir,Wt)}}var Ce=P.legend,Te=P._fullInput,pe=Te&&Te._isShape;if(!pe&&N0.traceIs(P,"pie-like")){var Ae=b.label,Se=m.indexOf(Ae);if(h==="toggle")Se===-1?m.push(Ae):m.splice(Se,1);else if(h==="toggleothers"){var Le=Se!==-1,Ke=[];for(I=0;I{"use strict";fP.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var vP=de((A1e,hP)=>{"use strict";var cP=la(),a4=w2();hP.exports=function(t,r,i){var a=r._inHover,s=a4.isGrouped(r),l=a4.isReversed(r),f={},h=[],v=!1,m={},b=0,T=0,S,C;function P(Te,pe,Ae){if(r.visible!==!1&&!(i&&Te!==r._id))if(pe===""||!a4.isGrouped(r)){var Se="~~i"+b;h.push(Se),f[Se]=[Ae],b++}else h.indexOf(pe)===-1?(h.push(pe),v=!0,f[pe]=[Ae]):f[pe].push(Ae)}for(S=0;Sre&&(J=re)}V[S][0]._groupMinRank=J,V[S][0]._preGroupSort=S}var oe=function(Te,pe){return Te[0]._groupMinRank-pe[0]._groupMinRank||Te[0]._preGroupSort-pe[0]._preGroupSort},ne=function(Te,pe){return Te.trace.legendrank-pe.trace.legendrank||Te._preSort-pe._preSort};for(V.forEach(function(Te,pe){Te[0]._preGroupSort=pe}),V.sort(oe),S=0;S{"use strict";var T2=Bt();function dP(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}wd.formatPiePercent=function(t,r){var i=dP((t*100).toPrecision(3));return T2.numSeparate(i,r)+"%"};wd.formatPieValue=function(t,r){var i=dP(t.toPrecision(10));return T2.numSeparate(i,r)};wd.getFirstFilled=function(t,r){if(T2.isArrayOrTypedArray(t))for(var i=0;i{"use strict";var bre=_i(),wre=Ua();pP.exports=function(t,r,i,a){var s=i.marker.pattern;s&&s.shape?bre.pointStyle(t,i,a,r):wre.fill(t,r.color)}});var xP=de((k1e,_P)=>{"use strict";var yP=Ua(),gP=i4().castOption,Tre=mP();_P.exports=function(t,r,i,a){var s=i.marker.line,l=gP(s.color,r.pts)||yP.defaultLine,f=gP(s.width,r.pts)||0;t.call(Tre,r,i,a).style("stroke-width",f).call(yP.stroke,l)}});var l4=de((C1e,SP)=>{"use strict";var is=ja(),n4=la(),Bo=Bt(),bP=Bo.strTranslate,ys=_i(),Jl=Ua(),o4=kf().extractOpts,A2=rs(),Are=xP(),Mre=i4().castOption,Sre=r4(),wP=12,TP=5,Td=2,kre=10,B0=5;SP.exports=function(t,r,i){var a=r._fullLayout;i||(i=a.legend);var s=i.itemsizing==="constant",l=i.itemwidth,f=(l+Sre.itemGap*2)/2,h=bP(f,0),v=function(V,W,J,re){var oe;if(V+1)oe=V;else if(W&&W.width>0)oe=W.width;else return 0;return s?re:Math.min(oe,J)};t.each(function(V){var W=is.select(this),J=Bo.ensureSingle(W,"g","layers");J.style("opacity",V[0].trace.opacity);var re=i.indentation,oe=i.valign,ne=V[0].lineHeight,fe=V[0].height;if(oe==="middle"&&re===0||!ne||!fe)J.attr("transform",null);else{var ve={top:1,bottom:-1}[oe],ke=ve*(.5*(ne-fe+3))||0,Ce=i.indentation;J.attr("transform",bP(Ce,ke))}var Te=J.selectAll("g.legendfill").data([V]);Te.enter().append("g").classed("legendfill",!0);var pe=J.selectAll("g.legendlines").data([V]);pe.enter().append("g").classed("legendlines",!0);var Ae=J.selectAll("g.legendsymbols").data([V]);Ae.enter().append("g").classed("legendsymbols",!0),Ae.selectAll("g.legendpoints").data([V]).enter().append("g").classed("legendpoints",!0)}).each(H).each(T).each(C).each(S).each(E).each(z).each(N).each(m).each(b).each(I).each(R);function m(V){var W=AP(V),J=W.showFill,re=W.showLine,oe=W.showGradientLine,ne=W.showGradientFill,fe=W.anyFill,ve=W.anyLine,ke=V[0],Ce=ke.trace,Te,pe,Ae=o4(Ce),Se=Ae.colorscale,Le=Ae.reversescale,Ke=function(At){if(At.size())if(J)ys.fillGroupStyle(At,r,!0);else{var kt="legendfill-"+Ce.uid;ys.gradient(At,r,kt,s4(Le),Se,"fill")}},ht=function(At){if(At.size()){var kt="legendline-"+Ce.uid;ys.lineGroupStyle(At),ys.gradient(At,r,kt,s4(Le),Se,"stroke")}},it=A2.hasMarkers(Ce)||!fe?"M5,0":ve?"M5,-2":"M5,-3",lt=is.select(this),He=lt.select(".legendfill").selectAll("path").data(J||ne?[V]:[]);if(He.enter().append("path").classed("js-fill",!0),He.exit().remove(),He.attr("d",it+"h"+l+"v6h-"+l+"z").call(Ke),re||oe){var _t=v(void 0,Ce.line,kre,TP);pe=Bo.minExtend(Ce,{line:{width:_t}}),Te=[Bo.minExtend(ke,{trace:pe})]}var at=lt.select(".legendlines").selectAll("path").data(re||oe?[Te]:[]);at.enter().append("path").classed("js-line",!0),at.exit().remove(),at.attr("d",it+(oe?"l"+l+",0.0001":"h"+l)).call(re?ys.lineGroupStyle:ht)}function b(V){var W=AP(V),J=W.anyFill,re=W.anyLine,oe=W.showLine,ne=W.showMarker,fe=V[0],ve=fe.trace,ke=!ne&&!re&&!J&&A2.hasText(ve),Ce,Te;function pe(He,_t,at,At){var kt=Bo.nestedProperty(ve,He).get(),pt=Bo.isArrayOrTypedArray(kt)&&_t?_t(kt):kt;if(s&&pt&&At!==void 0&&(pt=At),at){if(ptat[1])return at[1]}return pt}function Ae(He){return fe._distinct&&fe.index&&He[fe.index]?He[fe.index]:He[0]}if(ne||ke||oe){var Se={},Le={};if(ne){Se.mc=pe("marker.color",Ae),Se.mx=pe("marker.symbol",Ae),Se.mo=pe("marker.opacity",Bo.mean,[.2,1]),Se.mlc=pe("marker.line.color",Ae),Se.mlw=pe("marker.line.width",Bo.mean,[0,5],Td),Le.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ke=pe("marker.size",Bo.mean,[2,16],wP);Se.ms=Ke,Le.marker.size=Ke}oe&&(Le.line={width:pe("line.width",Ae,[0,10],TP)}),ke&&(Se.tx="Aa",Se.tp=pe("textposition",Ae),Se.ts=10,Se.tc=pe("textfont.color",Ae),Se.tf=pe("textfont.family",Ae),Se.tw=pe("textfont.weight",Ae),Se.ty=pe("textfont.style",Ae),Se.tv=pe("textfont.variant",Ae),Se.tC=pe("textfont.textcase",Ae),Se.tE=pe("textfont.lineposition",Ae),Se.tS=pe("textfont.shadow",Ae)),Ce=[Bo.minExtend(fe,Se)],Te=Bo.minExtend(ve,Le),Te.selectedpoints=null,Te.texttemplate=null}var ht=is.select(this).select("g.legendpoints"),it=ht.selectAll("path.scatterpts").data(ne?Ce:[]);it.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",h),it.exit().remove(),it.call(ys.pointStyle,Te,r),ne&&(Ce[0].mrc=3);var lt=ht.selectAll("g.pointtext").data(ke?Ce:[]);lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",h),lt.exit().remove(),lt.selectAll("text").call(ys.textPointStyle,Te,r)}function T(V){var W=V[0].trace,J=W.type==="waterfall";if(V[0]._distinct&&J){var re=V[0].trace[V[0].dir].marker;return V[0].mc=re.color,V[0].mlw=re.line.width,V[0].mlc=re.line.color,P(V,this,"waterfall")}var oe=[];W.visible&&J&&(oe=V[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 ne=is.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(oe);ne.enter().append("path").classed("legendwaterfall",!0).attr("transform",h).style("stroke-miterlimit",1),ne.exit().remove(),ne.each(function(fe){var ve=is.select(this),ke=W[fe[0]].marker,Ce=v(void 0,ke.line,B0,Td);ve.attr("d",fe[1]).style("stroke-width",Ce+"px").call(Jl.fill,ke.color),Ce&&ve.call(Jl.stroke,ke.line.color)})}function S(V){P(V,this)}function C(V){P(V,this,"funnel")}function P(V,W,J){var re=V[0].trace,oe=re.marker||{},ne=oe.line||{},fe=oe.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ve=J?re.visible&&re.type===J:n4.traceIs(re,"bar"),ke=is.select(W).select("g.legendpoints").selectAll("path.legend"+J).data(ve?[V]:[]);ke.enter().append("path").classed("legend"+J,!0).attr("d",fe).attr("transform",h),ke.exit().remove(),ke.each(function(Ce){var Te=is.select(this),pe=Ce[0],Ae=v(pe.mlw,oe.line,B0,Td);Te.style("stroke-width",Ae+"px");var Se=pe.mcc;if(!i._inHover&&"mc"in pe){var Le=o4(oe),Ke=Le.mid;Ke===void 0&&(Ke=(Le.max+Le.min)/2),Se=ys.tryColorscale(oe,"")(Ke)}var ht=Se||pe.mc||oe.color,it=oe.pattern,lt=it&&ys.getPatternAttr(it.shape,0,"");if(lt){var He=ys.getPatternAttr(it.bgcolor,0,null),_t=ys.getPatternAttr(it.fgcolor,0,null),at=it.fgopacity,At=MP(it.size,8,10),kt=MP(it.solidity,.5,1),pt="legend-"+re.uid;Te.call(ys.pattern,"legend",r,pt,lt,At,kt,Se,it.fillmode,He,_t,at)}else Te.call(Jl.fill,ht);Ae&&Jl.stroke(Te,pe.mlc||ne.color)})}function E(V){var W=V[0].trace,J=is.select(this).select("g.legendpoints").selectAll("path.legendbox").data(W.visible&&n4.traceIs(W,"box-violin")?[V]:[]);J.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",h),J.exit().remove(),J.each(function(){var re=is.select(this);if((W.boxpoints==="all"||W.points==="all")&&Jl.opacity(W.fillcolor)===0&&Jl.opacity((W.line||{}).color)===0){var oe=Bo.minExtend(W,{marker:{size:s?wP:Bo.constrain(W.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});J.call(ys.pointStyle,oe,r)}else{var ne=v(void 0,W.line,B0,Td);re.style("stroke-width",ne+"px").call(Jl.fill,W.fillcolor),ne&&Jl.stroke(re,W.line.color)}})}function I(V){var W=V[0].trace,J=is.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(W.visible&&W.type==="candlestick"?[V,V]:[]);J.enter().append("path").classed("legendcandle",!0).attr("d",function(re,oe){return oe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",h).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(re,oe){var ne=is.select(this),fe=W[oe?"increasing":"decreasing"],ve=v(void 0,fe.line,B0,Td);ne.style("stroke-width",ve+"px").call(Jl.fill,fe.fillcolor),ve&&Jl.stroke(ne,fe.line.color)})}function R(V){var W=V[0].trace,J=is.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(W.visible&&W.type==="ohlc"?[V,V]:[]);J.enter().append("path").classed("legendohlc",!0).attr("d",function(re,oe){return oe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",h).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(re,oe){var ne=is.select(this),fe=W[oe?"increasing":"decreasing"],ve=v(void 0,fe.line,B0,Td);ne.style("fill","none").call(ys.dashLine,fe.line.dash,ve),ve&&Jl.stroke(ne,fe.line.color)})}function N(V){O(V,this,"pie")}function z(V){O(V,this,"funnelarea")}function O(V,W,J){var re=V[0],oe=re.trace,ne=J?oe.visible&&oe.type===J:n4.traceIs(oe,J),fe=is.select(W).select("g.legendpoints").selectAll("path.legend"+J).data(ne?[V]:[]);if(fe.enter().append("path").classed("legend"+J,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",h),fe.exit().remove(),fe.size()){var ve=oe.marker||{},ke=v(Mre(ve.line.width,re.pts),ve.line,B0,Td),Ce="pieLike",Te=Bo.minExtend(oe,{marker:{line:{width:ke}}},Ce),pe=Bo.minExtend(re,{trace:Te},Ce);Are(fe,pe,Te,r)}}function H(V){var W=V[0].trace,J,re=[];if(W.visible)switch(W.type){case"histogram2d":case"heatmap":re=[["M-15,-2V4H15V-2Z"]],J=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":re=[["M-6,-6V6H6V-6Z"]],J=!0;break;case"densitymapbox":case"densitymap":re=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],J="radial";break;case"cone":re=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],J=!1;break;case"streamtube":re=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],J=!1;break;case"surface":re=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],J=!0;break;case"mesh3d":re=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],J=!1;break;case"volume":re=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],J=!0;break;case"isosurface":re=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],J=!1;break}var oe=is.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(re);oe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",h).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(ne,fe){var ve=is.select(this),ke=o4(W),Ce=ke.colorscale,Te=ke.reversescale,pe=function(Ke){if(Ke.size()){var ht="legendfill-"+W.uid;ys.gradient(Ke,r,ht,s4(Te,J==="radial"),Ce,"fill")}},Ae;if(Ce){if(!J){var Le=Ce.length;Ae=fe===0?Ce[Te?Le-1:0][1]:fe===1?Ce[Te?0:Le-1][1]:Ce[Math.floor((Le-1)/2)][1]}}else{var Se=W.vertexcolor||W.facecolor||W.color;Ae=Bo.isArrayOrTypedArray(Se)?Se[fe]||Se[0]:Se}ve.attr("d",ne[0]),Ae?ve.call(Jl.fill,Ae):ve.call(pe)})}};function s4(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function AP(e){var t=e[0].trace,r=t.contours,i=A2.hasLines(t),a=A2.hasMarkers(t),s=t.visible&&t.fill&&t.fill!=="none",l=!1,f=!1;if(r){var h=r.coloring;h==="lines"?l=!0:i=h==="none"||h==="heatmap"||r.showlines,r.type==="constraint"?s=r._operation!=="=":(h==="fill"||h==="heatmap")&&(f=!0)}return{showMarker:a,showLine:i,showFill:s,showGradientLine:l,showGradientFill:f,anyLine:i||l,anyFill:s||f}}function MP(e,t,r){return e&&Bo.isArrayOrTypedArray(e)?t:e>r?r:e}});var h4=de((E1e,FP)=>{"use strict";var Os=ja(),Nn=Bt(),f4=eo(),V0=la(),kP=qy(),u4=jl(),Bn=_i(),S2=Ua(),Ad=co(),CP=uP(),Wn=r4(),c4=ts(),IP=c4.LINE_SPACING,U0=c4.FROM_TL,EP=c4.FROM_BR,LP=vP(),Cre=l4(),PP=w2(),O0=1,Ere=/^legend[0-9]*$/;FP.exports=function(t,r){if(r)DP(t,r);else{var i=t._fullLayout,a=i._legends,s=i._infolayer.selectAll('[class^="legend"]');s.each(function(){var v=Os.select(this),m=v.attr("class"),b=m.split(" ")[0];b.match(Ere)&&a.indexOf(b)===-1&&v.remove()});for(var l=0;l1)}var C=i.hiddenlabels||[];if(!f&&(!i.showlegend||!h.length))return l.selectAll("."+a).remove(),i._topdefs.select("#"+s).remove(),f4.autoMargin(e,a);var P=Nn.ensureSingle(l,"g",a,function(W){f||W.attr("pointer-events","all")}),E=Nn.ensureSingleById(i._topdefs,"clipPath",s,function(W){W.append("rect")}),I=Nn.ensureSingle(P,"rect","bg",function(W){W.attr("shape-rendering","crispEdges")});I.call(S2.stroke,r.bordercolor).call(S2.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var R=Nn.ensureSingle(P,"g","scrollbox"),N=r.title;r._titleWidth=0,r._titleHeight=0;var z;N.text?(z=Nn.ensureSingle(R,"text",a+"titletext"),z.attr("text-anchor","start").call(Bn.font,N.font).text(N.text),k2(z,R,e,r,O0)):R.selectAll("."+a+"titletext").remove();var O=Nn.ensureSingle(P,"rect","scrollbar",function(W){W.attr(Wn.scrollBarEnterAttrs).call(S2.fill,Wn.scrollBarColor)}),H=R.selectAll("g.groups").data(h);H.enter().append("g").attr("class","groups"),H.exit().remove();var V=H.selectAll("g.traces").data(Nn.identity);V.enter().append("g").attr("class","traces"),V.exit().remove(),V.style("opacity",function(W){var J=W[0].trace;return V0.traceIs(J,"pie-like")?C.indexOf(W[0].label)!==-1?.5:1:J.visible==="legendonly"?.5:1}).each(function(){Os.select(this).call(Pre,e,r)}).call(Cre,e,r).each(function(){f||Os.select(this).call(Dre,e,a)}),Nn.syncOrAsync([f4.previousPromises,function(){return Rre(e,H,V,r)},function(){var W=i._size,J=r.borderwidth,re=r.xref==="paper",oe=r.yref==="paper";if(N.text&&Lre(z,r,J),!f){var ne,fe;re?ne=W.l+W.w*r.x-U0[C2(r)]*r._width:ne=i.width*r.x-U0[C2(r)]*r._width,oe?fe=W.t+W.h*(1-r.y)-U0[E2(r)]*r._effHeight:fe=i.height*(1-r.y)-U0[E2(r)]*r._effHeight;var ve=Fre(e,a,ne,fe);if(ve)return;if(i.margin.autoexpand){var ke=ne,Ce=fe;ne=re?Nn.constrain(ne,0,i.width-r._width):ke,fe=oe?Nn.constrain(fe,0,i.height-r._effHeight):Ce,ne!==ke&&Nn.log("Constrain "+a+".x to make legend fit inside graph"),fe!==Ce&&Nn.log("Constrain "+a+".y to make legend fit inside graph")}Bn.setTranslate(P,ne,fe)}if(O.on(".drag",null),P.on("wheel",null),f||r._height<=r._maxHeight||e._context.staticPlot){var Te=r._effHeight;f&&(Te=r._height),I.attr({width:r._width-J,height:Te-J,x:J/2,y:J/2}),Bn.setTranslate(R,0,0),E.select("rect").attr({width:r._width-2*J,height:Te-2*J,x:J,y:J}),Bn.setClipUrl(R,s,e),Bn.setRect(O,0,0,0,0),delete r._scrollY}else{var pe=Math.max(Wn.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),Ae=r._effHeight-pe-2*Wn.scrollBarMargin,Se=r._height-r._effHeight,Le=Ae/Se,Ke=Math.min(r._scrollY||0,Se);I.attr({width:r._width-2*J+Wn.scrollBarWidth+Wn.scrollBarMargin,height:r._effHeight-J,x:J/2,y:J/2}),E.select("rect").attr({width:r._width-2*J+Wn.scrollBarWidth+Wn.scrollBarMargin,height:r._effHeight-2*J,x:J,y:J+Ke}),Bn.setClipUrl(R,s,e),kt(Ke,pe,Le),P.on("wheel",function(){Ke=Nn.constrain(r._scrollY+Os.event.deltaY/Ae*Se,0,Se),kt(Ke,pe,Le),Ke!==0&&Ke!==Se&&Os.event.preventDefault()});var ht,it,lt,He=function(et,vt,tt){var Nt=(tt-vt)/Le+et;return Nn.constrain(Nt,0,Se)},_t=function(et,vt,tt){var Nt=(vt-tt)/Le+et;return Nn.constrain(Nt,0,Se)},at=Os.behavior.drag().on("dragstart",function(){var et=Os.event.sourceEvent;et.type==="touchstart"?ht=et.changedTouches[0].clientY:ht=et.clientY,lt=Ke}).on("drag",function(){var et=Os.event.sourceEvent;et.buttons===2||et.ctrlKey||(et.type==="touchmove"?it=et.changedTouches[0].clientY:it=et.clientY,Ke=He(lt,ht,it),kt(Ke,pe,Le))});O.call(at);var At=Os.behavior.drag().on("dragstart",function(){var et=Os.event.sourceEvent;et.type==="touchstart"&&(ht=et.changedTouches[0].clientY,lt=Ke)}).on("drag",function(){var et=Os.event.sourceEvent;et.type==="touchmove"&&(it=et.changedTouches[0].clientY,Ke=_t(lt,ht,it),kt(Ke,pe,Le))});R.call(At)}function kt(et,vt,tt){r._scrollY=e._fullLayout[a]._scrollY=et,Bn.setTranslate(R,0,-et),Bn.setRect(O,r._width,Wn.scrollBarMargin+et*tt,Wn.scrollBarWidth,vt),E.select("rect").attr("y",J+et)}if(e._context.edits.legendPosition){var pt,ge,Re,xe;P.classed("cursor-move",!0),u4.init({element:P.node(),gd:e,prepFn:function(et){if(et.target!==O.node()){var vt=Bn.getTranslate(P);Re=vt.x,xe=vt.y}},moveFn:function(et,vt){if(Re!==void 0&&xe!==void 0){var tt=Re+et,Nt=xe+vt;Bn.setTranslate(P,tt,Nt),pt=u4.align(tt,r._width,W.l,W.l+W.w,r.xanchor),ge=u4.align(Nt+r._height,-r._height,W.t+W.h,W.t,r.yanchor)}},doneFn:function(){if(pt!==void 0&&ge!==void 0){var et={};et[a+".x"]=pt,et[a+".y"]=ge,V0.call("_guiRelayout",e,et)}},clickFn:function(et,vt){var tt=l.selectAll("g.traces").filter(function(){var Nt=this.getBoundingClientRect();return vt.clientX>=Nt.left&&vt.clientX<=Nt.right&&vt.clientY>=Nt.top&&vt.clientY<=Nt.bottom});tt.size()>0&&RP(e,P,tt,et,vt)}})}}],e)}}function M2(e,t,r){var i=e[0],a=i.width,s=t.entrywidthmode,l=i.trace.legendwidth||t.entrywidth;return s==="fraction"?t._maxWidth*l:r+(l||a)}function RP(e,t,r,i,a){var s=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:s.index,expandedIndex:s.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};s._group&&(l.group=s._group),V0.traceIs(s,"pie-like")&&(l.label=r.datum()[0].label);var f=kP.triggerHandler(e,"plotly_legendclick",l);if(i===1){if(f===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&CP(r,e,i)},e._context.doubleClickDelay)}else if(i===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var h=kP.triggerHandler(e,"plotly_legenddoubleclick",l);h!==!1&&f!==!1&&CP(r,e,i)}}function Pre(e,t,r){var i=L2(r),a=e.data()[0][0],s=a.trace,l=V0.traceIs(s,"pie-like"),f=!r._inHover&&t._context.edits.legendText&&!l,h=r._maxNameLength,v,m;a.groupTitle?(v=a.groupTitle.text,m=a.groupTitle.font):(m=r.font,r.entries?v=a.text:(v=l?a.label:s.name,s._meta&&(v=Nn.templateString(v,s._meta))));var b=Nn.ensureSingle(e,"text",i+"text");b.attr("text-anchor","start").call(Bn.font,m).text(f?zP(v,h):v);var T=r.indentation+r.itemwidth+Wn.itemGap*2;Ad.positionText(b,T,0),f?b.call(Ad.makeEditable,{gd:t,text:v}).call(k2,e,t,r).on("edit",function(S){this.text(zP(S,h)).call(k2,e,t,r);var C=a.trace._fullInput||{},P={};return P.name=S,C._isShape?V0.call("_guiRelayout",t,"shapes["+s.index+"].name",P.name):V0.call("_guiRestyle",t,P,s.index)}):k2(b,e,t,r)}function zP(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function Dre(e,t,r){var i=t._context.doubleClickDelay,a,s=1,l=Nn.ensureSingle(e,"rect",r+"toggle",function(f){t._context.staticPlot||f.style("cursor","pointer").attr("pointer-events","all"),f.call(S2.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimei&&(s=Math.max(s-1,1)),RP(t,f,e,s,Os.event)}}))}function k2(e,t,r,i,a){i._inHover&&e.attr("data-notex",!0),Ad.convertToTspans(e,r,function(){zre(t,r,i,a)})}function zre(e,t,r,i){var a=e.data()[0][0];if(!r._inHover&&a&&!a.trace.showlegend){e.remove();return}var s=e.select("g[class*=math-group]"),l=s.node(),f=L2(r);r||(r=t._fullLayout[f]);var h=r.borderwidth,v;i===O0?v=r.title.font:a.groupTitle?v=a.groupTitle.font:v=r.font;var m=v.size*IP,b,T;if(l){var S=Bn.bBox(l);b=S.height,T=S.width,i===O0?Bn.setTranslate(s,h,h+b*.75):Bn.setTranslate(s,0,b*.25)}else{var C="."+f+(i===O0?"title":"")+"text",P=e.select(C),E=Ad.lineCount(P),I=P.node();if(b=m*E,T=I?Bn.bBox(I).width:0,i===O0)r.title.side==="left"&&(T+=Wn.itemGap*2),Ad.positionText(P,h+Wn.titlePad,h+m);else{var R=Wn.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(R=Wn.itemGap,T-=r.indentation+r.itemwidth),Ad.positionText(P,R,-m*((E-1)/2-.3))}}i===O0?(r._titleWidth=T,r._titleHeight=b):(a.lineHeight=m,a.height=Math.max(b,16)+3,a.width=T)}function Ire(e){var t=0,r=0,i=e.title.side;return i&&(i.indexOf("left")!==-1&&(t=e._titleWidth),i.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Rre(e,t,r,i){var a=e._fullLayout,s=L2(i);i||(i=a[s]);var l=a._size,f=PP.isVertical(i),h=PP.isGrouped(i),v=i.entrywidthmode==="fraction",m=i.borderwidth,b=2*m,T=Wn.itemGap,S=i.indentation+i.itemwidth+T*2,C=2*(m+T),P=E2(i),E=i.y<0||i.y===0&&P==="top",I=i.y>1||i.y===1&&P==="bottom",R=i.tracegroupgap,N={};i._maxHeight=Math.max(E||I?a.height/2:l.h,30);var z=0;i._width=0,i._height=0;var O=Ire(i);if(f)r.each(function(lt){var He=lt[0].height;Bn.setTranslate(this,m+O[0],m+O[1]+i._height+He/2+T),i._height+=He,i._width=Math.max(i._width,lt[0].width)}),z=S+i._width,i._width+=T+S+b,i._height+=C,h&&(t.each(function(lt,He){Bn.setTranslate(this,0,He*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var H=C2(i),V=i.x<0||i.x===0&&H==="right",W=i.x>1||i.x===1&&H==="left",J=I||E,re=a.width/2;i._maxWidth=Math.max(V?J&&H==="left"?l.l+l.w:re:W?J&&H==="right"?l.r+l.w:re:l.w,2*S);var oe=0,ne=0;r.each(function(lt){var He=M2(lt,i,S);oe=Math.max(oe,He),ne+=He}),z=null;var fe=0;if(h){var ve=0,ke=0,Ce=0;t.each(function(){var lt=0,He=0;Os.select(this).selectAll("g.traces").each(function(at){var At=M2(at,i,S),kt=at[0].height;Bn.setTranslate(this,O[0],O[1]+m+T+kt/2+He),He+=kt,lt=Math.max(lt,At),N[at[0].trace.legendgroup]=lt});var _t=lt+T;ke>0&&_t+m+ke>i._maxWidth?(fe=Math.max(fe,ke),ke=0,Ce+=ve+R,ve=He):ve=Math.max(ve,He),Bn.setTranslate(this,ke,Ce),ke+=_t}),i._width=Math.max(fe,ke)+m,i._height=Ce+ve+C}else{var Te=r.size(),pe=ne+b+(Te-1)*T=i._maxWidth&&(fe=Math.max(fe,Ke),Se=0,Le+=Ae,i._height+=Ae,Ae=0),Bn.setTranslate(this,O[0]+m+Se,O[1]+m+Le+He/2+T),Ke=Se+_t+T,Se+=at,Ae=Math.max(Ae,He)}),pe?(i._width=Se+b,i._height=Ae+C):(i._width=Math.max(fe,Ke)+b,i._height+=Ae+C)}}i._width=Math.ceil(Math.max(i._width+O[0],i._titleWidth+2*(m+Wn.titlePad))),i._height=Math.ceil(Math.max(i._height+O[1],i._titleHeight+2*(m+Wn.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var ht=e._context.edits,it=ht.legendText||ht.legendPosition;r.each(function(lt){var He=Os.select(this).select("."+s+"toggle"),_t=lt[0].height,at=lt[0].trace.legendgroup,At=M2(lt,i,S);h&&at!==""&&(At=N[at]);var kt=it?S:z||At;!f&&!v&&(kt+=T/2),Bn.setRect(He,0,-_t/2,kt,_t)})}function Fre(e,t,r,i){var a=e._fullLayout,s=a[t],l=C2(s),f=E2(s),h=s.xref==="paper",v=s.yref==="paper";e._fullLayout._reservedMargin[t]={};var m=s.y<.5?"b":"t",b=s.x<.5?"l":"r",T={r:a.width-r,l:r+s._width,b:a.height-i,t:i+s._effHeight};if(h&&v)return f4.autoMargin(e,t,{x:s.x,y:s.y,l:s._width*U0[l],r:s._width*EP[l],b:s._effHeight*EP[f],t:s._effHeight*U0[f]});h?e._fullLayout._reservedMargin[t][m]=T[m]:v||s.orientation==="v"?e._fullLayout._reservedMargin[t][b]=T[b]:e._fullLayout._reservedMargin[t][m]=T[m]}function C2(e){return Nn.isRightAnchor(e)?"right":Nn.isCenterAnchor(e)?"center":"left"}function E2(e){return Nn.isBottomAnchor(e)?"bottom":Nn.isMiddleAnchor(e)?"middle":"top"}function L2(e){return e._id||"legend"}});var m4=de(p4=>{"use strict";var Md=ja(),Tc=Da(),qP=Tf(),vn=Bt(),qre=vn.pushUnique,v4=vn.strTranslate,Nre=vn.strRotate,Bre=qy(),Kl=co(),Ore=nP(),zf=_i(),ro=Ua(),P2=jl(),If=Yi(),Ure=Ao().zindexSeparator,G0=la(),qu=bc(),Sd=ky(),Vre=$5(),Hre=h4(),ZP=Sd.YANGLE,d4=Math.PI*ZP/180,Gre=1/Math.sin(d4),Zre=Math.cos(d4),Yre=Math.sin(d4),ji=Sd.HOVERARROWSIZE,qa=Sd.HOVERTEXTPAD,NP={box:!0,ohlc:!0,violin:!0,candlestick:!0},Wre={scatter:!0,scattergl:!0,splom:!0};function BP(e,t){return e.distance-t.distance}p4.hover=function(t,r,i,a){t=vn.getGraphDiv(t);var s=r.target;vn.throttle(t._fullLayout._uid+Sd.HOVERID,Sd.HOVERMINTIME,function(){Xre(t,r,i,a,s)})};p4.loneHover=function(t,r){var i=!0;Array.isArray(t)||(i=!1,t=[t]);var a=r.gd,s=JP(a),l=KP(a),f=t.map(function(E){var I=E._x0||E.x0||E.x||0,R=E._x1||E.x1||E.x||0,N=E._y0||E.y0||E.y||0,z=E._y1||E.y1||E.y||0,O=E.eventData;if(O){var H=Math.min(I,R),V=Math.max(I,R),W=Math.min(N,z),J=Math.max(N,z),re=E.trace;if(G0.traceIs(re,"gl3d")){var oe=a._fullLayout[re.scene]._scene.container,ne=oe.offsetLeft,fe=oe.offsetTop;H+=ne,V+=ne,W+=fe,J+=fe}O.bbox={x0:H+l,x1:V+l,y0:W+s,y1:J+s},r.inOut_bbox&&r.inOut_bbox.push(O.bbox)}else O=!1;return{color:E.color||ro.defaultLine,x0:E.x0||E.x||0,x1:E.x1||E.x||0,y0:E.y0||E.y||0,y1:E.y1||E.y||0,xLabel:E.xLabel,yLabel:E.yLabel,zLabel:E.zLabel,text:E.text,name:E.name,idealAlign:E.idealAlign,borderColor:E.borderColor,fontFamily:E.fontFamily,fontSize:E.fontSize,fontColor:E.fontColor,fontWeight:E.fontWeight,fontStyle:E.fontStyle,fontVariant:E.fontVariant,nameLength:E.nameLength,textAlign:E.textAlign,trace:E.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:E.hovertemplate||!1,hovertemplateLabels:E.hovertemplateLabels||!1,eventData:O}}),h=!1,v=WP(f,{gd:a,hovermode:"closest",rotateLabels:h,bgColor:r.bgColor||ro.background,container:Md.select(r.container),outerContainer:r.outerContainer||r.container}),m=v.hoverLabels,b=5,T=0,S=0;m.sort(function(E,I){return E.y0-I.y0}).each(function(E,I){var R=E.y0-E.by/2;R-bV[0]._length||xe<0||xe>W[0]._length)return P2.unhoverRaw(e,t)}if(t.pointerX=Re+V[0]._offset,t.pointerY=xe+W[0]._offset,"xval"in t?Ce=qu.flat(s,t.xval):Ce=qu.p2c(V,Re),"yval"in t?Te=qu.flat(s,t.yval):Te=qu.p2c(W,xe),!Tc(Ce[0])||!Tc(Te[0]))return vn.warn("Fx.hover failed",t,e),P2.unhoverRaw(e,t)}var tt=1/0;function Nt(Gr,Qa){for(Ae=0;Aeat&&(ve.splice(0,at),tt=ve[0].distance),b&&fe!==0&&ve.length===0){_t.distance=fe,_t.index=!1;var ee=Le._module.hoverPoints(_t,lt,He,"closest",{hoverLayer:f._hoverlayer});if(ee&&(ee=ee.filter(function(Ve){return Ve.spikeDistance<=fe})),ee&&ee.length){var se,ce=ee.filter(function(Ve){return Ve.xa.showspikes&&Ve.xa.spikesnap!=="hovered data"});if(ce.length){var Ee=ce[0];Tc(Ee.x0)&&Tc(Ee.y0)&&(se=Ct(Ee),(!At.vLinePoint||At.vLinePoint.spikeDistance>se.spikeDistance)&&(At.vLinePoint=se))}var Ne=ee.filter(function(Ve){return Ve.ya.showspikes&&Ve.ya.spikesnap!=="hovered data"});if(Ne.length){var rt=Ne[0];Tc(rt.x0)&&Tc(rt.y0)&&(se=Ct(rt),(!At.hLinePoint||At.hLinePoint.spikeDistance>se.spikeDistance)&&(At.hLinePoint=se))}}}}}Nt();function Mt(Gr,Qa,Zr){for(var vi=null,ya=1/0,le,ee=0;ee0&&Math.abs(Gr.distance)wt-1;xr--)Mr(ve[xr]);ve=Ht,Et()}var Pt=e._hoverdata,Fe=[],Ge=JP(e),bt=KP(e);for(pe=0;pe1||ve.length>1)||T==="closest"&&kt&&ve.length>1,jn=ro.combine(f.plot_bgcolor||ro.background,f.paper_bgcolor),En=WP(ve,{gd:e,hovermode:T,rotateLabels:Xi,bgColor:jn,container:f._hoverlayer,outerContainer:f._paper.node(),commonLabelOpts:f.hoverlabel,hoverdistance:f.hoverdistance}),Vi=En.hoverLabels;if(qu.isUnifiedHover(T)||(Jre(Vi,Xi,f,En.commonLabelBoundingBox),jP(Vi,Xi,f._invScaleX,f._invScaleY)),a&&a.tagName){var pa=G0.getComponentMethod("annotations","hasClickToShow")(e,Fe);Ore(Md.select(a),pa?"pointer":"")}!a||i||!$re(e,t,Pt)||(Pt&&e.emit("plotly_unhover",{event:t,points:Pt}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:V,yaxes:W,xvals:Ce,yvals:Te}))}function YP(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 jre=/([\s\S]*)<\/extra>/;function WP(e,t){var r=t.gd,i=r._fullLayout,a=t.hovermode,s=t.rotateLabels,l=t.bgColor,f=t.container,h=t.outerContainer,v=t.commonLabelOpts||{};if(e.length===0)return[[]];var m=t.fontFamily||Sd.HOVERFONT,b=t.fontSize||Sd.HOVERFONTSIZE,T=t.fontWeight||i.font.weight,S=t.fontStyle||i.font.style,C=t.fontVariant||i.font.variant,P=t.fontTextcase||i.font.textcase,E=t.fontLineposition||i.font.lineposition,I=t.fontShadow||i.font.shadow,R=e[0],N=R.xa,z=R.ya,O=a.charAt(0),H=O+"Label",V=R[H];if(V===void 0&&N.type==="multicategory")for(var W=0;Wi.width-Pt&&(Fe=i.width-Pt),Ar.attr("d","M"+(er-Fe)+",0L"+(er-Fe+ji)+","+xr+ji+"H"+Pt+"v"+xr+(qa*2+Ot.height)+"H"+-Pt+"V"+xr+ji+"H"+(er-Fe-ji)+"Z"),er=Fe,Ae.minX=er-Pt,Ae.maxX=er+Pt,N.side==="top"?(Ae.minY=Mr-(qa*2+Ot.height),Ae.maxY=Mr-qa):(Ae.minY=Mr+qa,Ae.maxY=Mr+(qa*2+Ot.height))}else{var Ge,bt,dt;z.side==="right"?(Ge="start",bt=1,dt="",er=N._offset+N._length):(Ge="end",bt=-1,dt="-",er=N._offset),Mr=z._offset+(R.y0+R.y1)/2,dr.attr("text-anchor",Ge),Ar.attr("d","M0,0L"+dt+ji+","+ji+"V"+(qa+Ot.height/2)+"h"+dt+(qa*2+Ot.width)+"V-"+(qa+Ot.height/2)+"H"+dt+ji+"V-"+ji+"Z"),Ae.minY=Mr-(qa+Ot.height/2),Ae.maxY=Mr+(qa+Ot.height/2),z.side==="right"?(Ae.minX=er+ji,Ae.maxX=er+ji+(qa*2+Ot.width)):(Ae.minX=er-ji-(qa*2+Ot.width),Ae.maxX=er-ji);var gr=Ot.height/2,Er=re-Ot.top-gr,Tr="clip"+i._uid+"commonlabel"+z._id,Hr;if(er=0?Wt=Ut:xt+xe=0?Wt=xt:Et+xe=0?Be=Ct:Rt+et=0?Be=Rt:ir+et=0,(mt.idealAlign==="top"||!Ea)&&Ri?(dt-=Er/2,mt.anchor="end"):Ea?(dt+=Er/2,mt.anchor="start"):mt.anchor="middle",mt.crossPos=dt;else{if(mt.pos=dt,Ea=bt+gr/2+ka<=oe,Ri=bt-gr/2-ka>=0,(mt.idealAlign==="left"||!Ea)&&Ri)bt-=gr/2,mt.anchor="end";else if(Ea)bt+=gr/2,mt.anchor="start";else{mt.anchor="middle";var Ki=ka/2,yn=bt+Ki-oe,Xi=bt-Ki;yn>0&&(bt-=yn),Xi<0&&(bt+=-Xi)}mt.crossPos=bt}Mr.attr("text-anchor",mt.anchor),Pt&&xr.attr("text-anchor",mt.anchor),Ar.attr("transform",v4(bt,dt)+(s?Nre(ZP):""))}),{hoverLabels:ft,commonLabelBoundingBox:Ae}}function OP(e,t,r,i,a,s){var l="",f="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=vn.templateString(e.name,e.trace._meta)),l=HP(e.name,e.nameLength));var h=r.charAt(0),v=h==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(f+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(f+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(f+=(f?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?f=e[v+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(f=e.yLabel):e.yLabel===void 0?f=e.xLabel:f="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(f+=(f?"
":"")+e.text),e.extraText!==void 0&&(f+=(f?"
":"")+e.extraText),s&&f===""&&!e.hovertemplate&&(l===""&&s.remove(),f=l);var m=e.hovertemplate||!1;if(m){var b=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(b[h+"other"]=b[h+"Val"],b[h+"otherLabel"]=b[h+"Label"]),f=vn.hovertemplateString(m,b,i._d3locale,e.eventData[0]||{},e.trace._meta),f=f.replace(jre,function(T,S){return l=HP(S,e.nameLength),""})}return[f,l]}function Jre(e,t,r,i){var a=t?"xa":"ya",s=t?"ya":"xa",l=0,f=1,h=e.size(),v=new Array(h),m=0,b=i.minX,T=i.maxX,S=i.minY,C=i.maxY,P=function(Ce){return Ce*r._invScaleX},E=function(Ce){return Ce*r._invScaleY};e.each(function(Ce){var Te=Ce[a],pe=Ce[s],Ae=Te._id.charAt(0)==="x",Se=Te.range;m===0&&Se&&Se[0]>Se[1]!==Ae&&(f=-1);var Le=0,Ke=Ae?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ht=XP(Ce,t),it=Ce.anchor,lt=it==="end"?-1:1,He,_t;if(it==="middle")He=Ce.crossPos+(Ae?E(ht.y-Ce.by/2):P(Ce.bx/2+Ce.tx2width/2)),_t=He+(Ae?E(Ce.by):P(Ce.bx));else if(Ae)He=Ce.crossPos+E(ji+ht.y)-E(Ce.by/2-ji),_t=He+E(Ce.by);else{var at=P(lt*ji+ht.x),At=at+P(lt*Ce.bx);He=Ce.crossPos+Math.min(at,At),_t=Ce.crossPos+Math.max(at,At)}Ae?S!==void 0&&C!==void 0&&Math.min(_t,C)-Math.max(He,S)>1&&(pe.side==="left"?(Le=pe._mainLinePosition,Ke=r.width):Ke=pe._mainLinePosition):b!==void 0&&T!==void 0&&Math.min(_t,T)-Math.max(He,b)>1&&(pe.side==="top"?(Le=pe._mainLinePosition,Ke=r.height):Ke=pe._mainLinePosition)}v[m++]=[{datum:Ce,traceIndex:Ce.trace.index,dp:0,pos:Ce.pos,posref:Ce.posref,size:Ce.by*(Ae?Gre:1)/2,pmin:Le,pmax:Ke}]}),v.sort(function(Ce,Te){return Ce[0].posref-Te[0].posref||f*(Te[0].traceIndex-Ce[0].traceIndex)});var I,R,N,z,O,H,V;function W(Ce){var Te=Ce[0],pe=Ce[Ce.length-1];if(R=Te.pmin-Te.pos-Te.dp+Te.size,N=pe.pos+pe.dp+pe.size-Te.pmax,R>.01){for(O=Ce.length-1;O>=0;O--)Ce[O].dp+=R;I=!1}if(!(N<.01)){if(R<-.01){for(O=Ce.length-1;O>=0;O--)Ce[O].dp-=N;I=!1}if(I){var Ae=0;for(z=0;zTe.pmax&&Ae++;for(z=Ce.length-1;z>=0&&!(Ae<=0);z--)H=Ce[z],H.pos>Te.pmax-1&&(H.del=!0,Ae--);for(z=0;z=0;O--)Ce[O].dp-=N;for(z=Ce.length-1;z>=0&&!(Ae<=0);z--)H=Ce[z],H.pos+H.dp+H.size>Te.pmax&&(H.del=!0,Ae--)}}}for(;!I&&l<=h;){for(l++,I=!0,z=0;z.01){for(O=re.length-1;O>=0;O--)re[O].dp+=R;for(J.push.apply(J,re),v.splice(z+1,1),V=0,O=J.length-1;O>=0;O--)V+=J[O].dp;for(N=V/J.length,O=J.length-1;O>=0;O--)J[O].dp-=N;I=!1}else z++}v.forEach(W)}for(z=v.length-1;z>=0;z--){var fe=v[z];for(O=fe.length-1;O>=0;O--){var ve=fe[O],ke=ve.datum;ke.offset=ve.dp,ke.del=ve.del}}}function XP(e,t){var r=0,i=e.offset;return t&&(i*=-Yre,r=e.offset*Zre),{x:r,y:i}}function Kre(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(ji+qa),i=r+t*(e.txwidth+qa),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,i+=e.txwidth/2+qa),{alignShift:t,textShiftX:r,text2ShiftX:i}}function jP(e,t,r,i){var a=function(l){return l*r},s=function(l){return l*i};e.each(function(l){var f=Md.select(this);if(l.del)return f.remove();var h=f.select("text.nums"),v=l.anchor,m=v==="end"?-1:1,b=Kre(l),T=XP(l,t),S=T.x,C=T.y,P=v==="middle";f.select("path").attr("d",P?"M-"+a(l.bx/2+l.tx2width/2)+","+s(C-l.by/2)+"h"+a(l.bx)+"v"+s(l.by)+"h-"+a(l.bx)+"Z":"M0,0L"+a(m*ji+S)+","+s(ji+C)+"v"+s(l.by/2-ji)+"h"+a(m*l.bx)+"v-"+s(l.by)+"H"+a(m*ji+S)+"V"+s(C-ji)+"Z");var E=S+b.textShiftX,I=C+l.ty0-l.by/2+qa,R=l.textAlign||"auto";R!=="auto"&&(R==="left"&&v!=="start"?(h.attr("text-anchor","start"),E=P?-l.bx/2-l.tx2width/2+qa:-l.bx-qa):R==="right"&&v!=="end"&&(h.attr("text-anchor","end"),E=P?l.bx/2-l.tx2width/2-qa:l.bx+qa)),h.call(Kl.positionText,a(E),s(I)),l.tx2width&&(f.select("text.name").call(Kl.positionText,a(b.text2ShiftX+b.alignShift*qa+S),s(C+l.ty0-l.by/2+qa)),f.select("rect").call(zf.setRect,a(b.text2ShiftX+(b.alignShift-1)*l.tx2width/2+S),s(C-l.by/2-1),a(l.tx2width),s(l.by+2)))})}function Qre(e,t){var r=e.index,i=e.trace||{},a=e.cd[0],s=e.cd[r]||{};function l(T){return T||Tc(T)&&T===0}var f=Array.isArray(r)?function(T,S){var C=vn.castOption(a,r,T);return l(C)?C:vn.extractOption({},i,"",S)}:function(T,S){return vn.extractOption(s,i,T,S)};function h(T,S,C){var P=f(S,C);l(P)&&(e[T]=P)}if(h("hoverinfo","hi","hoverinfo"),h("bgcolor","hbg","hoverlabel.bgcolor"),h("borderColor","hbc","hoverlabel.bordercolor"),h("fontFamily","htf","hoverlabel.font.family"),h("fontSize","hts","hoverlabel.font.size"),h("fontColor","htc","hoverlabel.font.color"),h("fontWeight","htw","hoverlabel.font.weight"),h("fontStyle","hty","hoverlabel.font.style"),h("fontVariant","htv","hoverlabel.font.variant"),h("nameLength","hnl","hoverlabel.namelength"),h("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&i.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=vn.constrain(e.x0,0,e.xa._length),e.x1=vn.constrain(e.x1,0,e.xa._length),e.y0=vn.constrain(e.y0,0,e.ya._length),e.y1=vn.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:If.hoverLabelText(e.xa,e.xLabelVal,i.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:If.hoverLabelText(e.ya,e.yLabelVal,i.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var v=If.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+v+" / -"+If.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+v,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var m=If.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+m+" / -"+If.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+m,t==="y"&&(e.distance+=1)}var b=e.hoverinfo||e.trace.hoverinfo;return b&&b!=="all"&&(b=Array.isArray(b)?b:b.split("+"),b.indexOf("x")===-1&&(e.xLabel=void 0),b.indexOf("y")===-1&&(e.yLabel=void 0),b.indexOf("z")===-1&&(e.zLabel=void 0),b.indexOf("text")===-1&&(e.text=void 0),b.indexOf("name")===-1&&(e.name=void 0)),e}function UP(e,t,r){var i=r.container,a=r.fullLayout,s=a._size,l=r.event,f=!!t.hLinePoint,h=!!t.vLinePoint,v,m;if(i.selectAll(".spikeline").remove(),!!(h||f)){var b=ro.combine(a.plot_bgcolor,a.paper_bgcolor);if(f){var T=t.hLinePoint,S,C;v=T&&T.xa,m=T&&T.ya;var P=m.spikesnap;P==="cursor"?(S=l.pointerX,C=l.pointerY):(S=v._offset+T.x,C=m._offset+T.y);var E=qP.readability(T.color,b)<1.5?ro.contrast(b):T.color,I=m.spikemode,R=m.spikethickness,N=m.spikecolor||E,z=If.getPxPosition(e,m),O,H;if(I.indexOf("toaxis")!==-1||I.indexOf("across")!==-1){if(I.indexOf("toaxis")!==-1&&(O=z,H=S),I.indexOf("across")!==-1){var V=m._counterDomainMin,W=m._counterDomainMax;m.anchor==="free"&&(V=Math.min(V,m.position),W=Math.max(W,m.position)),O=s.l+V*s.w,H=s.l+W*s.w}i.insert("line",":first-child").attr({x1:O,x2:H,y1:C,y2:C,"stroke-width":R,stroke:N,"stroke-dasharray":zf.dashStyle(m.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:O,x2:H,y1:C,y2:C,"stroke-width":R+2,stroke:b}).classed("spikeline",!0).classed("crisp",!0)}I.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:z+(m.side!=="right"?R:-R),cy:C,r:R,fill:N}).classed("spikeline",!0)}if(h){var J=t.vLinePoint,re,oe;v=J&&J.xa,m=J&&J.ya;var ne=v.spikesnap;ne==="cursor"?(re=l.pointerX,oe=l.pointerY):(re=v._offset+J.x,oe=m._offset+J.y);var fe=qP.readability(J.color,b)<1.5?ro.contrast(b):J.color,ve=v.spikemode,ke=v.spikethickness,Ce=v.spikecolor||fe,Te=If.getPxPosition(e,v),pe,Ae;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(pe=Te,Ae=oe),ve.indexOf("across")!==-1){var Se=v._counterDomainMin,Le=v._counterDomainMax;v.anchor==="free"&&(Se=Math.min(Se,v.position),Le=Math.max(Le,v.position)),pe=s.t+(1-Le)*s.h,Ae=s.t+(1-Se)*s.h}i.insert("line",":first-child").attr({x1:re,x2:re,y1:pe,y2:Ae,"stroke-width":ke,stroke:Ce,"stroke-dasharray":zf.dashStyle(v.spikedash,ke)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:re,x2:re,y1:pe,y2:Ae,"stroke-width":ke+2,stroke:b}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:re,cy:Te-(v.side!=="top"?ke:-ke),r:ke,fill:Ce}).classed("spikeline",!0)}}}function $re(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var i=r.length-1;i>=0;i--){var a=r[i],s=e._hoverdata[i];if(a.curveNumber!==s.curveNumber||String(a.pointNumber)!==String(s.pointNumber)||String(a.pointNumbers)!==String(s.pointNumbers))return!0}return!1}function VP(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function HP(e,t){return Kl.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function eae(e,t){for(var r=t.charAt(0),i=[],a=[],s=[],l=0;l{"use strict";var tae=Bt(),rae=Ua(),aae=bc().isUnifiedHover;QP.exports=function(t,r,i,a){a=a||{};var s=r.legend;function l(f){a.font[f]||(a.font[f]=s?r.legend.font[f]:r.font[f])}r&&aae(r.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(a.bgcolor||(a.bgcolor=rae.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),i("hoverlabel.bgcolor",a.bgcolor),i("hoverlabel.bordercolor",a.bordercolor),i("hoverlabel.namelength",a.namelength),tae.coerceFont(i,"hoverlabel.font",a.font),i("hoverlabel.align",a.align)}});var eD=de((D1e,$P)=>{"use strict";var iae=Bt(),nae=D2(),oae=f0();$P.exports=function(t,r){function i(a,s){return iae.coerce(t,r,oae,a,s)}nae(t,r,i)}});var aD=de((z1e,rD)=>{"use strict";var tD=Bt(),sae=e_(),lae=D2();rD.exports=function(t,r,i,a){function s(f,h){return tD.coerce(t,r,sae,f,h)}var l=tD.extendFlat({},a.hoverlabel);r.hovertemplate&&(l.namelength=-1),lae(t,r,s,l)}});var y4=de((I1e,iD)=>{"use strict";var uae=Bt(),fae=f0();iD.exports=function(t,r){function i(a,s){return r[a]!==void 0?r[a]:uae.coerce(t,r,fae,a,s)}return i("clickmode"),i("hoversubplots"),i("hovermode")}});var sD=de((R1e,oD)=>{"use strict";var nD=Bt(),cae=f0(),hae=y4(),vae=D2();oD.exports=function(t,r){function i(m,b){return nD.coerce(t,r,cae,m,b)}var a=hae(t,r);a&&(i("hoverdistance"),i("spikedistance"));var s=i("dragmode");s==="select"&&i("selectdirection");var l=r._has("mapbox"),f=r._has("map"),h=r._has("geo"),v=r._basePlotModules.length;r.dragmode==="zoom"&&((l||f||h)&&v===1||(l||f)&&h&&v===2)&&(r.dragmode="pan"),vae(t,r,i),nD.coerceFont(i,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var fD=de((F1e,uD)=>{"use strict";var g4=Bt(),lD=la();uD.exports=function(t){var r=t.calcdata,i=t._fullLayout;function a(v){return function(m){return g4.coerceHoverinfo({hoverinfo:m},{_module:v._module},i)}}for(var s=0;s{"use strict";var pae=la(),mae=m4().hover;cD.exports=function(t,r,i){var a=pae.getComponentMethod("annotations","onClick")(t,t._hoverdata);i!==void 0&&mae(t,r,i,!0);function s(){t.emit("plotly_click",{points:t._hoverdata,event:r})}t._hoverdata&&r&&r.target&&(a&&a.then?a.then(s):s(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var Rf=de((N1e,pD)=>{"use strict";var yae=ja(),z2=Bt(),gae=jl(),ag=bc(),vD=f0(),dD=m4();pD.exports={moduleType:"component",name:"fx",constants:ky(),schema:{layout:vD},attributes:e_(),layoutAttributes:vD,supplyLayoutGlobalDefaults:eD(),supplyDefaults:aD(),supplyLayoutDefaults:sD(),calc:fD(),getDistanceFunction:ag.getDistanceFunction,getClosest:ag.getClosest,inbox:ag.inbox,quadrature:ag.quadrature,appendArrayPointValue:ag.appendArrayPointValue,castHoverOption:xae,castHoverinfo:bae,hover:dD.hover,unhover:gae.unhover,loneHover:dD.loneHover,loneUnhover:_ae,click:hD()};function _ae(e){var t=z2.isD3Selection(e)?e:yae.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function xae(e,t,r){return z2.castOption(e,t,"hoverlabel."+r)}function bae(e,t,r){function i(a){return z2.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return z2.castOption(e,r,"hoverinfo",i)}});var kd=de(Ac=>{"use strict";Ac.selectMode=function(e){return e==="lasso"||e==="select"};Ac.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ac.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Ac.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ac.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Ac.selectingOrDrawing=function(e){return Ac.freeMode(e)||Ac.rectMode(e)}});var I2=de((O1e,mD)=>{"use strict";mD.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(i){i.regl&&i.regl.clear({color:!0,depth:!0})})}});var R2=de((U1e,yD)=>{"use strict";yD.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 q2=de((V1e,gD)=>{"use strict";var F2=32;gD.exports={CIRCLE_SIDES:F2,i000:0,i090:F2/4,i180:F2/2,i270:F2/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var N2=de((H1e,xD)=>{"use strict";var wae=Bt().strTranslate;function _D(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 Tae(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 Aae(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return _D(e,r[t])}}function Mae(e){return wae(e.xaxis._offset,e.yaxis._offset)}xD.exports={p2r:_D,r2p:Tae,axValue:Aae,getTransform:Mae}});var Uh=de(Mc=>{"use strict";var Sae=n5(),TD=q2(),Z0=TD.CIRCLE_SIDES,_4=TD.SQRT2,AD=N2(),bD=AD.p2r,wD=AD.r2p,kae=[0,3,4,5,6,1,2],Cae=[0,3,4,1,2];Mc.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&h{"use strict";var ED=kd(),Eae=ED.drawMode,Lae=ED.openMode,Y0=q2(),MD=Y0.i000,SD=Y0.i090,kD=Y0.i180,CD=Y0.i270,Pae=Y0.cos45,Dae=Y0.sin45,LD=N2(),O2=LD.p2r,Vh=LD.r2p,zae=Dh(),Iae=zae.clearOutline,U2=Uh(),Rae=U2.readPaths,Fae=U2.writePaths,qae=U2.ellipseOver,Nae=U2.fixDatesForPaths;function Bae(e,t){if(e.length){var r=e[0][0];if(r){var i=t.gd,a=t.isActiveShape,s=t.dragmode,l=(i.layout||{}).shapes||[];if(!Eae(s)&&a!==void 0){var f=i._fullLayout._activeShapeIndex;if(f{"use strict";var Oae=kd(),Uae=Oae.selectMode,Vae=Dh(),Hae=Vae.clearOutline,x4=Uh(),Gae=x4.readPaths,Zae=x4.writePaths,Yae=x4.fixDatesForPaths;zD.exports=function(t,r){if(t.length){var i=t[0][0];if(i){var a=i.getAttribute("d"),s=r.gd,l=s._fullLayout.newselection,f=r.plotinfo,h=f.xaxis,v=f.yaxis,m=r.isActiveSelection,b=r.dragmode,T=(s.layout||{}).selections||[];if(!Uae(b)&&m!==void 0){var S=s._fullLayout._activeSelectionIndex;if(S{"use strict";ID.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 Hh=de(ho=>{"use strict";var Cd=ng(),RD=Bt(),H2=Yi();ho.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};ho.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};ho.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};ho.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};ho.extractPathCoords=function(e,t,r){var i=[],a=e.match(Cd.segmentRE);return a.forEach(function(s){var l=t[s.charAt(0)].drawn;if(l!==void 0){var f=s.substr(1).match(Cd.paramRE);if(!(!f||f.lengthS&&(P="X"),P});return v>S&&(C=C.replace(/[\s,]*X.*/,""),RD.log("Ignoring extra params in segment "+h)),m+C})}function og(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 T4=de((j1e,BD)=>{"use strict";var Xae=Bt(),W0=Yi(),FD=co(),qD=_i(),jae=Uh().readPaths,w4=Hh(),Jae=w4.getPathString,ND=f_(),Kae=ts().FROM_TL;BD.exports=function(t,r,i,a){if(a.selectAll(".shape-label").remove(),!!(i.label.text||i.label.texttemplate)){var s;if(i.label.texttemplate){var l={};if(i.type!=="path"){var f=W0.getFromId(t,i.xref),h=W0.getFromId(t,i.yref);for(var v in ND){var m=ND[v](i,f,h);m!==void 0&&(l[v]=m)}}s=Xae.texttemplateStringForShapes(i.label.texttemplate,{},t._fullLayout._d3locale,l)}else s=i.label.text;var b={"data-index":r},T=i.label.font,S={"data-notex":1},C=a.append("g").attr(b).classed("shape-label",!0),P=C.append("text").attr(S).classed("shape-label-text",!0).text(s),E,I,R,N;if(i.path){var z=Jae(t,i),O=jae(z,t);E=1/0,R=1/0,I=-1/0,N=-1/0;for(var H=0;H=e?a=t-i:a=i-t,-180/Math.PI*Math.atan2(a,s)}function $ae(e,t,r,i,a,s,l){var f=a.label.textposition,h=a.label.textangle,v=a.label.padding,m=a.type,b=Math.PI/180*s,T=Math.sin(b),S=Math.cos(b),C=a.label.xanchor,P=a.label.yanchor,E,I,R,N;if(m==="line"){f==="start"?(E=e,I=t):f==="end"?(E=r,I=i):(E=(e+r)/2,I=(t+i)/2),C==="auto"&&(f==="start"?h==="auto"?r>e?C="left":re?C="right":re?C="right":re?C="left":r{"use strict";var eie=Bt(),tie=eie.strTranslate,OD=jl(),HD=kd(),rie=HD.drawMode,GD=HD.selectMode,ZD=la(),UD=Ua(),Z2=q2(),aie=Z2.i000,iie=Z2.i090,nie=Z2.i180,oie=Z2.i270,sie=Dh(),YD=sie.clearOutlineControllers,M4=Uh(),G2=M4.pointsOnRectangle,A4=M4.pointsOnEllipse,lie=M4.writePaths,uie=V2().newShapes,fie=V2().createShapeObj,cie=b4(),hie=T4();WD.exports=function e(t,r,i,a){a||(a=0);var s=i.gd;function l(){e(t,r,i,a++),(A4(t[0])||i.hasText)&&f({redrawing:!0})}function f(Te){var pe={};i.isActiveShape!==void 0&&(i.isActiveShape=!1,pe=uie(r,i)),i.isActiveSelection!==void 0&&(i.isActiveSelection=!1,pe=cie(r,i),s._fullLayout._reselect=!0),Object.keys(pe).length&&ZD.call((Te||{}).redrawing?"relayout":"_guiRelayout",s,pe)}var h=s._fullLayout,v=h._zoomlayer,m=i.dragmode,b=rie(m),T=GD(m);(b||T)&&(s._fullLayout._outlining=!0),YD(s),r.attr("d",lie(t));var S,C,P,E,I;if(!a&&(i.isActiveShape||i.isActiveSelection)){I=vie([],t);var R=v.append("g").attr("class","outline-controllers");re(R),Ce()}if(b&&i.hasText){var N=v.select(".label-temp"),z=fie(r,i,i.dragmode);hie(s,"label-temp",z,N)}function O(Te){P=+Te.srcElement.getAttribute("data-i"),E=+Te.srcElement.getAttribute("data-j"),S[P][E].moveFn=H}function H(Te,pe){if(t.length){var Ae=I[P][E][1],Se=I[P][E][2],Le=t[P],Ke=Le.length;if(G2(Le)){var ht=Te,it=pe;if(i.isActiveSelection){var lt=VD(Le,E);lt[1]===Le[E][1]?it=0:ht=0}for(var He=0;He1&&!(Te.length===2&&Te[1][0]==="Z")&&(E===0&&(Te[0][0]="M"),t[P]=Te,l(),f())}}function J(Te,pe){if(Te===2){P=+pe.srcElement.getAttribute("data-i"),E=+pe.srcElement.getAttribute("data-j");var Ae=t[P];!G2(Ae)&&!A4(Ae)&&W()}}function re(Te){S=[];for(var pe=0;pe{"use strict";var pie=ja(),$D=la(),XD=Bt(),X0=Yi(),mie=Uh().readPaths,yie=Y2(),X2=T4(),ez=Dh().clearOutlineControllers,S4=Ua(),C4=_i(),gie=Di().arrayEditor,jD=jl(),JD=Oh(),Ed=ng(),Us=Hh(),k4=Us.getPathString;az.exports={draw:E4,drawOne:tz,eraseActiveShape:bie,drawLabel:X2};function E4(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var i=t._plots[r].shapelayer;i&&(i.selectAll("path").remove(),i.selectAll("text").remove())}for(var a=0;al&&Ut>f&&!Mt.shiftKey?jD.getCursor(xt/Rt,1-Et/Ut):"move";JD(t,ir),_t=ir.split("-")[0]}}function pt(Mt){W2(e)||(h&&(I=Le(r.xanchor)),v&&(R=Ke(r.yanchor)),r.type==="path"?oe=r.path:(S=h?r.x0:Le(r.x0),C=v?r.y0:Ke(r.y0),P=h?r.x1:Le(r.x1),E=v?r.y1:Ke(r.y1)),SE?(N=C,V="y0",z=E,W="y1"):(N=E,V="y1",z=C,W="y0"),kt(Mt),vt(a,r),Nt(t,r,e),He.moveFn=_t==="move"?xe:et,He.altKey=Mt.altKey)}function ge(){W2(e)||(JD(t),tt(a),rz(t,e,r),$D.call("_guiRelayout",e,s.getUpdateObj()))}function Re(){W2(e)||tt(a)}function xe(Mt,Ct){if(r.type==="path"){var Rt=function(Et){return Et},Ut=Rt,xt=Rt;h?T("xanchor",r.xanchor=ht(I+Mt)):(Ut=function(ir){return ht(Le(ir)+Mt)},fe&&fe.type==="date"&&(Ut=Us.encodeDate(Ut))),v?T("yanchor",r.yanchor=it(R+Ct)):(xt=function(ir){return it(Ke(ir)+Ct)},ke&&ke.type==="date"&&(xt=Us.encodeDate(xt))),T("path",r.path=KD(oe,Ut,xt))}else h?T("xanchor",r.xanchor=ht(I+Mt)):(T("x0",r.x0=ht(S+Mt)),T("x1",r.x1=ht(P+Mt))),v?T("yanchor",r.yanchor=it(R+Ct)):(T("y0",r.y0=it(C+Ct)),T("y1",r.y1=it(E+Ct)));t.attr("d",k4(e,r)),vt(a,r),X2(e,i,r,ne)}function et(Mt,Ct){if(b){var Rt=function(Ot){return Ot},Ut=Rt,xt=Rt;h?T("xanchor",r.xanchor=ht(I+Mt)):(Ut=function(er){return ht(Le(er)+Mt)},fe&&fe.type==="date"&&(Ut=Us.encodeDate(Ut))),v?T("yanchor",r.yanchor=it(R+Ct)):(xt=function(er){return it(Ke(er)+Ct)},ke&&ke.type==="date"&&(xt=Us.encodeDate(xt))),T("path",r.path=KD(oe,Ut,xt))}else if(m){if(_t==="resize-over-start-point"){var Et=S+Mt,ir=v?C-Ct:C+Ct;T("x0",r.x0=h?Et:ht(Et)),T("y0",r.y0=v?ir:it(ir))}else if(_t==="resize-over-end-point"){var Wt=P+Mt,Be=v?E-Ct:E+Ct;T("x1",r.x1=h?Wt:ht(Wt)),T("y1",r.y1=v?Be:it(Be))}}else{var ft=function(Ot){return _t.indexOf(Ot)!==-1},mt=ft("n"),Ar=ft("s"),dr=ft("w"),Tt=ft("e"),wt=mt?N+Ct:N,Vt=Ar?z+Ct:z,Kt=dr?O+Mt:O,Ht=Tt?H+Mt:H;v&&(mt&&(wt=N-Ct),Ar&&(Vt=z-Ct)),(!v&&Vt-wt>f||v&&wt-Vt>f)&&(T(V,r[V]=v?wt:it(wt)),T(W,r[W]=v?Vt:it(Vt))),Ht-Kt>l&&(T(J,r[J]=h?Kt:ht(Kt)),T(re,r[re]=h?Ht:ht(Ht)))}t.attr("d",k4(e,r)),vt(a,r),X2(e,i,r,ne)}function vt(Mt,Ct){(h||v)&&Rt();function Rt(){var Ut=Ct.type!=="path",xt=Mt.selectAll(".visual-cue").data([0]),Et=1;xt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Et}).classed("visual-cue",!0);var ir=Le(h?Ct.xanchor:XD.midRange(Ut?[Ct.x0,Ct.x1]:Us.extractPathCoords(Ct.path,Ed.paramIsX))),Wt=Ke(v?Ct.yanchor:XD.midRange(Ut?[Ct.y0,Ct.y1]:Us.extractPathCoords(Ct.path,Ed.paramIsY)));if(ir=Us.roundPositionForSharpStrokeRendering(ir,Et),Wt=Us.roundPositionForSharpStrokeRendering(Wt,Et),h&&v){var Be="M"+(ir-1-Et)+","+(Wt-1-Et)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";xt.attr("d",Be)}else if(h){var ft="M"+(ir-1-Et)+","+(Wt-9-Et)+"v18 h2 v-18 Z";xt.attr("d",ft)}else{var mt="M"+(ir-9-Et)+","+(Wt-1-Et)+"h18 v2 h-18 Z";xt.attr("d",mt)}}}function tt(Mt){Mt.selectAll(".visual-cue").remove()}function Nt(Mt,Ct,Rt){var Ut=Ct.xref,xt=Ct.yref,Et=X0.getFromId(Rt,Ut),ir=X0.getFromId(Rt,xt),Wt="";Ut!=="paper"&&!Et.autorange&&(Wt+=Ut),xt!=="paper"&&!ir.autorange&&(Wt+=xt),C4.setClipUrl(Mt,Wt?"clip"+Rt._fullLayout._uid+Wt:null,Rt)}}function KD(e,t,r){return e.replace(Ed.segmentRE,function(i){var a=0,s=i.charAt(0),l=Ed.paramIsX[s],f=Ed.paramIsY[s],h=Ed.numParams[s],v=i.substr(1).replace(Ed.paramRE,function(m){return a>=h||(l[a]?m=t(m):f[a]&&(m=r(m)),a++),m});return s+v})}function xie(e,t){if(j2(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeShapeIndex){QD(e);return}e._fullLayout._activeShapeIndex=i,e._fullLayout._deactivateShape=QD,E4(e)}}}function QD(e){if(j2(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(ez(e),delete e._fullLayout._activeShapeIndex,E4(e))}}function bie(e){if(j2(e)){ez(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var Ql=la(),iz=eo(),nz=$n(),Ja=R2(),wie=J2().eraseActiveShape,K2=Bt(),Ia=K2._,Ka=hz.exports={};Ka.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Ia(e,"Download plot as a png"):Ia(e,"Download plot")},icon:Ja.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};K2.notifier(Ia(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(i){i in t&&(r[i]=t[i])}),Ql.call("downloadImage",e,r).then(function(i){K2.notifier(Ia(e,"Snapshot succeeded")+" - "+i,"long")}).catch(function(){K2.notifier(Ia(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ka.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Ia(e,"Edit in Chart Studio")},icon:Ja.disk,click:function(e){iz.sendDataToCloud(e)}};Ka.editInChartStudio={name:"editInChartStudio",title:function(e){return Ia(e,"Edit in Chart Studio")},icon:Ja.pencil,click:function(e){iz.sendDataToCloud(e)}};Ka.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ia(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Ja.zoombox,click:ns};Ka.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ia(e,"Pan")},attr:"dragmode",val:"pan",icon:Ja.pan,click:ns};Ka.select2d={name:"select2d",_cat:"select",title:function(e){return Ia(e,"Box Select")},attr:"dragmode",val:"select",icon:Ja.selectbox,click:ns};Ka.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ia(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Ja.lasso,click:ns};Ka.drawclosedpath={name:"drawclosedpath",title:function(e){return Ia(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Ja.drawclosedpath,click:ns};Ka.drawopenpath={name:"drawopenpath",title:function(e){return Ia(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Ja.drawopenpath,click:ns};Ka.drawline={name:"drawline",title:function(e){return Ia(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Ja.drawline,click:ns};Ka.drawrect={name:"drawrect",title:function(e){return Ia(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Ja.drawrect,click:ns};Ka.drawcircle={name:"drawcircle",title:function(e){return Ia(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Ja.drawcircle,click:ns};Ka.eraseshape={name:"eraseshape",title:function(e){return Ia(e,"Erase active shape")},icon:Ja.eraseshape,click:wie};Ka.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ia(e,"Zoom in")},attr:"zoom",val:"in",icon:Ja.zoom_plus,click:ns};Ka.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ia(e,"Zoom out")},attr:"zoom",val:"out",icon:Ja.zoom_minus,click:ns};Ka.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ia(e,"Autoscale")},attr:"zoom",val:"auto",icon:Ja.autoscale,click:ns};Ka.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ia(e,"Reset axes")},attr:"zoom",val:"reset",icon:Ja.home,click:ns};Ka.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ia(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Ja.tooltip_basic,gravity:"ne",click:ns};Ka.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ia(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Ja.tooltip_compare,gravity:"ne",click:ns};function ns(e,t){var r=t.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,s=e._fullLayout,l={},f=nz.list(e,null,!0),h=s._cartesianSpikesEnabled,v,m;if(i==="zoom"){var b=a==="in"?.5:2,T=(1+b)/2,S=(1-b)/2,C;for(m=0;m{"use strict";var vz=D4(),Mie=Object.keys(vz),dz=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],pz=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(dz),J0=[],Sie=function(e){if(pz.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();J0.indexOf(t)===-1&&J0.push(t),J0.indexOf(r)===-1&&J0.push(r)}};Mie.forEach(function(e){Sie(vz[e])});J0.sort();mz.exports={DRAW_MODES:dz,backButtons:pz,foreButtons:J0}});var I4=de((t_e,yz)=>{"use strict";var e_e=z4();yz.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 _z=de((r_e,gz)=>{"use strict";var kie=Bt(),sg=Ua(),Cie=Di(),Eie=I4();gz.exports=function(t,r){var i=t.modebar||{},a=Cie.newContainer(r,"modebar");function s(f,h){return kie.coerce(i,a,Eie,f,h)}s("orientation"),s("bgcolor",sg.addOpacity(r.paper_bgcolor,.5));var l=sg.contrast(sg.rgb(r.modebar.bgcolor));s("color",sg.addOpacity(l,.3)),s("activecolor",sg.addOpacity(l,.7)),s("uirevision",r.uirevision),s("add"),s("remove")}});var Tz=de((a_e,wz)=>{"use strict";var R4=ja(),Lie=Da(),$2=Bt(),xz=R2(),Pie=U1().version,Die=new DOMParser;function bz(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Ff=bz.prototype;Ff.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,a="modebar-"+i._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),i.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var s=i.modebar,l="#"+a+" .modebar-group";document.querySelectorAll(l).forEach(function(b){b.style.backgroundColor=s.bgcolor}),$2.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+s.activecolor,"fill: "+s.color);var f=!this.hasButtons(t),h=this.hasLogo!==r.displaylogo,v=this.locale!==r.locale;if(this.locale=r.locale,(f||h||v)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var m=this.getLogo();r.watermark&&(m.className=m.className+" watermark"),i.modebar.orientation==="v"?this.element.insertBefore(m,this.element.childNodes[0]):this.element.appendChild(m),this.hasLogo=!0}this.updateActiveButton()};Ff.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var i=t.createGroup();r.forEach(function(a){var s=a.name;if(!s)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(s)!==-1)throw new Error("button name '"+s+"' is taken");t.buttonsNames.push(s);var l=t.createButton(a);t.buttonElements.push(l),i.appendChild(l)}),t.element.appendChild(i)})};Ff.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Ff.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;i===void 0?i=e.name:typeof i=="function"&&(i=i(this.graphInfo)),(i||i===0)&&r.setAttribute("data-title",i),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var s=e.click;if(typeof s!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(f){e.click(t.graphInfo,f),t.updateActiveButton(f.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&R4.select(r).classed("active",!0);var l=e.icon;return typeof l=="function"?r.appendChild(l()):r.appendChild(this.createIcon(l||xz.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Ff.createIcon=function(e){var t=Lie(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",i;if(e.path){i=document.createElementNS(r,"svg"),i.setAttribute("viewBox",[0,0,e.width,t].join(" ")),i.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),i.appendChild(a)}if(e.svg){var s=Die.parseFromString(e.svg,"application/xml");i=s.childNodes[0]}return i.setAttribute("height","1em"),i.setAttribute("width","1em"),i};Ff.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var a=i.getAttribute("data-val")||!0,s=i.getAttribute("data-attr"),l=i.getAttribute("data-toggle")==="true",f=R4.select(i),h=function(b,T){var S=t.modebar,C=b.querySelector(".icon path");C&&(T||b.matches(":hover")?C.style.fill=S.activecolor:C.style.fill=S.color)};if(l){if(s===r){var v=!f.classed("active");f.classed("active",v),h(i,v)}}else{var m=s===null?s:$2.nestedProperty(t,s).get();f.classed("active",m===a),h(i,m===a)}})};Ff.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Rie=$n(),Az=rs(),F4=la(),Fie=bc().isUnifiedHover,qie=Tz(),ex=D4(),Nie=z4().DRAW_MODES,Bie=Bt().extendDeep;Mz.exports=function(t){var r=t._fullLayout,i=t._context,a=r._modeBar;if(!i.displayModeBar&&!i.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(i.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(i.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var s=i.modeBarButtons,l;Array.isArray(s)&&s.length?l=Zie(s):!i.displayModeBar&&i.watermark?l=[]:l=Oie(t),a?a.update(t,l):r._modeBar=qie(t,l)};function Oie(e){var t=e._fullLayout,r=e._fullData,i=e._context;function a(pe,Ae){if(typeof Ae=="string"){if(Ae.toLowerCase()===pe.toLowerCase())return!0}else{var Se=Ae.name,Le=Ae._cat||Ae.name;if(Se===pe||Le===pe.toLowerCase())return!0}return!1}var s=t.modebar.add;typeof s=="string"&&(s=[s]);var l=t.modebar.remove;typeof l=="string"&&(l=[l]);var f=i.modeBarButtonsToAdd.concat(s.filter(function(pe){for(var Ae=0;Ae1?(re=["toggleHover"],oe=["resetViews"]):b?(J=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],oe=["resetGeo"]):m?(re=["hoverClosest3d"],oe=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(J=["zoomInMapbox","zoomOutMapbox"],re=["toggleHover"],oe=["resetViewMapbox"]):E?(J=["zoomInMap","zoomOutMap"],re=["toggleHover"],oe=["resetViewMap"]):T?re=["hoverClosestPie"]:N?(re=["hoverClosestCartesian","hoverCompareCartesian"],oe=["resetViewSankey"]):re=["toggleHover"],v&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Hie(r)||O)&&(re=[]),v&&!z&&(J=["zoomIn2d","zoomOut2d","autoScale2d"],oe[0]!=="resetViews"&&(oe=["resetScale2d"])),m?ne=["zoom3d","pan3d","orbitRotation","tableRotation"]:v&&!z||C?ne=["zoom2d","pan2d"]:P||E||b?ne=["pan2d"]:I&&(ne=["zoom2d"]),Vie(r)&&ne.push("select2d","lasso2d");var fe=[],ve=function(pe){fe.indexOf(pe)===-1&&re.indexOf(pe)!==-1&&fe.push(pe)};if(Array.isArray(f)){for(var ke=[],Ce=0;Ce{"use strict";kz.exports={moduleType:"component",name:"modebar",layoutAttributes:I4(),supplyLayoutDefaults:_z(),manage:Sz()}});var N4=de((o_e,Cz)=>{"use strict";var Yie=ts().FROM_BL;Cz.exports=function(t,r,i){i===void 0&&(i=Yie[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],s=a[0]+(a[1]-a[0])*i;t.range=t._input.range=[t.l2r(s+(a[0]-s)*r),t.l2r(s+(a[1]-s)*r)],t.setScale()}});var ug=de(lg=>{"use strict";var Ld=Bt(),B4=Xy(),Nu=$n().id2name,Wie=Ru(),Ez=N4(),Xie=i2(),jie=Hi().ALMOST_EQUAL,Jie=ts().FROM_BL;lg.handleDefaults=function(e,t,r){var i=r.axIds,a=r.axHasImage,s=t._axisConstraintGroups=[],l=t._axisMatchGroups=[],f,h,v,m,b,T,S,C;for(f=0;fs?r.substr(s):i.substr(a))+l}function Qie(e,t){for(var r=t._size,i=r.h/r.w,a={},s=Object.keys(e),l=0;ljie*C&&!R)){for(s=0;sne&&Sere&&(re=Se);var Ke=(re-J)/(2*oe);b/=Ke,J=h.l2r(J),re=h.l2r(re),h.range=h._input.range=H{"use strict";var rx=ja(),os=la(),fl=eo(),$l=Bt(),V4=co(),H4=I2(),fg=Ua(),K0=_i(),zz=Yy(),Nz=q4(),cg=Yi(),Sc=ts(),Bz=ug(),$ie=Bz.enforce,ene=Bz.clean,Iz=Xy().doAutoRange,Oz="start",tne="middle",Uz="end",rne=Ao().zindexSeparator;ao.layoutStyles=function(e){return $l.syncOrAsync([fl.doAutoMargin,ine],e)};function ane(e,t,r){for(var i=0;i=e[1]||a[1]<=e[0])&&s[0]t[0])return!0}return!1}function ine(e){var t=e._fullLayout,r=t._size,i=r.p,a=cg.list(e,"",!0),s,l,f,h,v,m;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(K0.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),ao.drawMainTitle(e),Nz.manage(e),!t._has("cartesian"))return fl.previousPromises(e);function b(pt,ge,Re){var xe=pt._lw/2;if(pt._id.charAt(0)==="x"){if(ge){if(Re==="top")return ge._offset-i-xe}else return r.t+r.h*(1-(pt.position||0))+xe%1;return ge._offset+ge._length+i+xe}if(ge){if(Re==="right")return ge._offset+ge._length+i+xe}else return r.l+r.w*(pt.position||0)+xe%1;return ge._offset-i-xe}for(s=0;s0){lne(e,s,v,h),f.attr({x:l,y:s,"text-anchor":i,dy:qz(t.yanchor)}).call(V4.positionText,l,s);var m=(t.text.match(V4.BR_TAG_ALL)||[]).length;if(m){var b=Sc.LINE_SPACING*m+Sc.MID_SHIFT;t.y===0&&(b=-b),f.selectAll(".line").each(function(){var E=+this.getAttribute("dy").slice(0,-2)-b+"em";this.setAttribute("dy",E)})}var T=rx.selectAll(".gtitle-subtitle");if(T.node()){var S=f.node().getBBox(),C=S.y+S.height,P=C+zz.SUBTITLE_PADDING_EM*t.subtitle.font.size;T.attr({x:l,y:P,"text-anchor":i,dy:qz(t.yanchor)}).call(V4.positionText,l,P)}}}};function nne(e,t,r,i,a){var s=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,l=$l.isTopAnchor(t)?i:i-a,f=r==="b"?s-l:l;return $l.isTopAnchor(t)&&r==="t"||$l.isBottomAnchor(t)&&r==="b"?!1:f.5?"t":"b",l=e._fullLayout.margin[s],f=0;return t.yref==="paper"?f=r+t.pad.t+t.pad.b:t.yref==="container"&&(f=one(s,i,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),f>l?f:0}function lne(e,t,r,i){var a="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",f={x:s.x,y:s.y,t:0,b:0},h={};s.yref==="paper"&&nne(e,s,l,t,i)?f[l]=r:s.yref==="container"&&(h[l]=r,e._fullLayout._reservedMargin[a]=h),fl.allowAutoMargin(e,a),fl.autoMargin(e,a,f)}function une(e,t){var r=e.title,i=e._size,a=0;switch(t===Oz?a=r.pad.l:t===Uz&&(a=-r.pad.r),r.xref){case"paper":return i.l+i.w*r.x+a;case"container":default:return e.width*r.x+a}}function fne(e,t){var r=e.title,i=e._size,a=0;if(t==="0em"||!t?a=-r.pad.b:t===Sc.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto")return i.t/2;switch(r.yref){case"paper":return i.t+i.h-i.h*r.y+a;case"container":default:return e.height-e.height*r.y+a}}function qz(e){return e==="top"?Sc.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Sc.MID_SHIFT+"em"}function cne(e){var t=e.title,r=tne;return $l.isRightAnchor(t)?r=Uz:$l.isLeftAnchor(t)&&(r=Oz),r}function hne(e){var t=e.title,r="0em";return $l.isTopAnchor(t)?r=Sc.CAP_SHIFT+"em":$l.isMiddleAnchor(t)&&(r=Sc.MID_SHIFT+"em"),r}ao.doTraceStyle=function(e){var t=e.calcdata,r=[],i;for(i=0;i{"use strict";var vne=Uh().readPaths,dne=Y2(),Vz=Dh().clearOutlineControllers,G4=Ua(),Hz=_i(),pne=Di().arrayEditor,Gz=Hh(),mne=Gz.getPathString;Yz.exports={draw:ix,drawOne:Zz,activateLastSelection:_ne};function ix(e){var t=e._fullLayout;Vz(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var i=t._plots[r].selectionLayer;i&&i.selectAll("path").remove()}for(var a=0;a=0;E--){var I=l.append("path").attr(h).style("opacity",E?.1:v).call(G4.stroke,b).call(G4.fill,m).call(Hz.dashLine,E?"solid":S,E?4+T:T);if(yne(I,e,i),C){var R=pne(e.layout,"selections",i);I.style({cursor:"move"});var N={element:I.node(),plotinfo:a,gd:e,editHelpers:R,isActiveSelection:!0},z=vne(f,e);dne(z,I,N)}else I.style("pointer-events",E?"all":"none");P[E]=I}var O=P[0],H=P[1];H.node().addEventListener("click",function(){return gne(e,O)})}}function yne(e,t,r){var i=r.xref+r.yref;Hz.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}function gne(e,t){if(nx(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeSelectionIndex){Z4(e);return}e._fullLayout._activeSelectionIndex=i,e._fullLayout._deactivateSelection=Z4,ix(e)}}}function _ne(e){if(nx(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=Z4,ix(e)}}function Z4(e){if(nx(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Vz(e),delete e._fullLayout._activeSelectionIndex,ix(e))}}});var Xz=de((f_e,Wz)=>{function xne(){var e,t=0,r=!1;function i(a,s){return e.list.push({type:a,data:s?JSON.parse(JSON.stringify(s)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,s){return i("check",{seg1:a,seg2:s})},segmentChop:function(a,s){return i("div_seg",{seg:a,pt:s}),i("chop",{seg:a,pt:s})},statusRemove:function(a){return i("pop_seg",{seg:a})},segmentUpdate:function(a){return i("seg_update",{seg:a})},segmentNew:function(a,s){return i("new_seg",{seg:a,primary:s})},segmentRemove:function(a){return i("rem_seg",{seg:a})},tempStatus:function(a,s,l){return i("temp_status",{seg:a,above:s,below:l})},rewind:function(a){return i("rewind",{seg:a})},status:function(a,s,l){return i("status",{seg:a,above:s,below:l})},vert:function(a){return a===r?e:(r=a,i("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),i("log",{txt:a})},reset:function(){return i("reset")},selected:function(a){return i("selected",{segs:a})},chainStart:function(a){return i("chain_start",{seg:a})},chainRemoveHead:function(a,s){return i("chain_rem_head",{index:a,pt:s})},chainRemoveTail:function(a,s){return i("chain_rem_tail",{index:a,pt:s})},chainNew:function(a,s){return i("chain_new",{pt1:a,pt2:s})},chainMatch:function(a){return i("chain_match",{index:a})},chainClose:function(a){return i("chain_close",{index:a})},chainAddHead:function(a,s){return i("chain_add_head",{index:a,pt:s})},chainAddTail:function(a,s){return i("chain_add_tail",{index:a,pt:s})},chainConnect:function(a,s){return i("chain_con",{index1:a,index2:s})},chainReverse:function(a){return i("chain_rev",{index:a})},chainJoin:function(a,s){return i("chain_join",{index1:a,index2:s})},done:function(){return i("done")}},e}Wz.exports=xne});var Jz=de((c_e,jz)=>{function bne(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,i,a){var s=i[0],l=i[1],f=a[0],h=a[1],v=r[0],m=r[1];return(f-s)*(m-l)-(h-l)*(v-s)>=-e},pointBetween:function(r,i,a){var s=r[1]-i[1],l=a[0]-i[0],f=r[0]-i[0],h=a[1]-i[1],v=f*l+s*h;if(v-e)},pointsSameX:function(r,i){return Math.abs(r[0]-i[0])e!=f-s>e&&(l-m)*(s-b)/(f-b)+m-a>e&&(h=!h),l=m,f=b}return h}};return t}jz.exports=bne});var Qz=de((h_e,Kz)=>{var wne={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}i=a,a=a.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;i!==null&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(a){return a.prev=r,a.next=i,r.next=a,i!==null&&(i.prev=a),a}}}};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}};Kz.exports=wne});var eI=de((v_e,$z)=>{var hg=Qz();function Tne(e,t,r){function i(C,P){return{id:r?r.segmentId():-1,start:C,end:P,myFill:{above:null,below:null},otherFill:null}}function a(C,P,E){return{id:r?r.segmentId():-1,start:C,end:P,myFill:{above:E.myFill.above,below:E.myFill.below},otherFill:null}}var s=hg.create();function l(C,P,E,I,R,N){var z=t.pointsCompare(P,R);return z!==0?z:t.pointsSame(E,N)?0:C!==I?C?1:-1:t.pointAboveOrOnLine(E,I?R:N,I?N:R)?1:-1}function f(C,P){s.insertBefore(C,function(E){var I=l(C.isStart,C.pt,P,E.isStart,E.pt,E.other.pt);return I<0})}function h(C,P){var E=hg.node({isStart:!0,pt:C.start,seg:C,primary:P,other:null,status:null});return f(E,C.end),E}function v(C,P,E){var I=hg.node({isStart:!1,pt:P.end,seg:P,primary:E,other:C,status:null});C.other=I,f(I,C.pt)}function m(C,P){var E=h(C,P);return v(E,C,P),E}function b(C,P){r&&r.segmentChop(C.seg,P),C.other.remove(),C.seg.end=P,C.other.pt=P,f(C.other,C.pt)}function T(C,P){var E=a(P,C.seg.end,C.seg);return b(C,P),m(E,C.primary)}function S(C,P){var E=hg.create();function I(ke,Ce){var Te=ke.seg.start,pe=ke.seg.end,Ae=Ce.seg.start,Se=Ce.seg.end;return t.pointsCollinear(Te,Ae,Se)?t.pointsCollinear(pe,Ae,Se)||t.pointAboveOrOnLine(pe,Ae,Se)?1:-1:t.pointAboveOrOnLine(Te,Ae,Se)?1:-1}function R(ke){return E.findTransition(function(Ce){var Te=I(ke,Ce.ev);return Te>0})}function N(ke,Ce){var Te=ke.seg,pe=Ce.seg,Ae=Te.start,Se=Te.end,Le=pe.start,Ke=pe.end;r&&r.checkIntersection(Te,pe);var ht=t.linesIntersect(Ae,Se,Le,Ke);if(ht===!1){if(!t.pointsCollinear(Ae,Se,Le)||t.pointsSame(Ae,Ke)||t.pointsSame(Se,Le))return!1;var it=t.pointsSame(Ae,Le),lt=t.pointsSame(Se,Ke);if(it&<)return Ce;var He=!it&&t.pointBetween(Ae,Le,Ke),_t=!lt&&t.pointBetween(Se,Le,Ke);if(it)return _t?T(Ce,Se):T(ke,Ke),Ce;He&&(lt||(_t?T(Ce,Se):T(ke,Ke)),T(Ce,Ae))}else ht.alongA===0&&(ht.alongB===-1?T(ke,Le):ht.alongB===0?T(ke,ht.pt):ht.alongB===1&&T(ke,Ke)),ht.alongB===0&&(ht.alongA===-1?T(Ce,Ae):ht.alongA===0?T(Ce,ht.pt):ht.alongA===1&&T(Ce,Se));return!1}for(var z=[];!s.isEmpty();){var O=s.getHead();if(r&&r.vert(O.pt[0]),O.isStart){let ke=function(){if(V){var Ce=N(O,V);if(Ce)return Ce}return W?N(O,W):!1};var ve=ke;r&&r.segmentNew(O.seg,O.primary);var H=R(O),V=H.before?H.before.ev:null,W=H.after?H.after.ev:null;r&&r.tempStatus(O.seg,V?V.seg:!1,W?W.seg:!1);var J=ke();if(J){if(e){var re;O.seg.myFill.below===null?re=!0:re=O.seg.myFill.above!==O.seg.myFill.below,re&&(J.seg.myFill.above=!J.seg.myFill.above)}else J.seg.otherFill=O.seg.myFill;r&&r.segmentUpdate(J.seg),O.other.remove(),O.remove()}if(s.getHead()!==O){r&&r.rewind(O.seg);continue}if(e){var re;O.seg.myFill.below===null?re=!0:re=O.seg.myFill.above!==O.seg.myFill.below,W?O.seg.myFill.below=W.seg.myFill.above:O.seg.myFill.below=C,re?O.seg.myFill.above=!O.seg.myFill.below:O.seg.myFill.above=O.seg.myFill.below}else if(O.seg.otherFill===null){var oe;W?O.primary===W.primary?oe=W.seg.otherFill.above:oe=W.seg.myFill.above:oe=O.primary?P:C,O.seg.otherFill={above:oe,below:oe}}r&&r.status(O.seg,V?V.seg:!1,W?W.seg:!1),O.other.status=H.insert(hg.node({ev:O}))}else{var ne=O.status;if(ne===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(E.exists(ne.prev)&&E.exists(ne.next)&&N(ne.prev.ev,ne.next.ev),r&&r.statusRemove(ne.ev.seg),ne.remove(),!O.primary){var fe=O.seg.myFill;O.seg.myFill=O.seg.otherFill,O.seg.otherFill=fe}z.push(O.seg)}s.getHead().remove()}return r&&r.done(),z}return e?{addRegion:function(C){for(var P,E=C[C.length-1],I=0;I{function Ane(e,t,r){var i=[],a=[];return e.forEach(function(s){var l=s.start,f=s.end;if(t.pointsSame(l,f)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(s);var h={index:0,matches_head:!1,matches_pt1:!1},v={index:0,matches_head:!1,matches_pt1:!1},m=h;function b(ve,ke,Ce){return m.index=ve,m.matches_head=ke,m.matches_pt1=Ce,m===h?(m=v,!1):(m=null,!0)}for(var T=0;T{function vg(e,t,r){var i=[];return e.forEach(function(a){var s=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[s]!==0&&i.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[s]===1,below:t[s]===2},otherFill:null})}),r&&r.selected(i),i}var Mne={union:function(e,t){return vg(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return vg(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return vg(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return vg(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return vg(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};aI.exports=Mne});var oI=de((m_e,nI)=>{var Sne={toPolygon:function(e,t){function r(s){if(s.length<=0)return e.segments({inverted:!1,regions:[]});function l(v){var m=v.slice(0,v.length-1);return e.segments({inverted:!1,regions:[m]})}for(var f=l(s[0]),h=1;h{var kne=Xz(),Cne=Jz(),sI=eI(),Ene=rI(),dg=iI(),lI=oI(),eu=!1,pg=Cne(),Vs;Vs={buildLog:function(e){return e===!0?eu=kne():e===!1&&(eu=!1),eu===!1?!1:eu.list},epsilon:function(e){return pg.epsilon(e)},segments:function(e){var t=sI(!0,pg,eu);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=sI(!1,pg,eu);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:dg.union(e.combined,eu),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:dg.intersect(e.combined,eu),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:dg.difference(e.combined,eu),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:dg.differenceRev(e.combined,eu),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:dg.xor(e.combined,eu),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Ene(e.segments,pg,eu),inverted:e.inverted}},polygonFromGeoJSON:function(e){return lI.toPolygon(Vs,e)},polygonToGeoJSON:function(e){return lI.fromPolygon(Vs,pg,e)},union:function(e,t){return mg(e,t,Vs.selectUnion)},intersect:function(e,t){return mg(e,t,Vs.selectIntersect)},difference:function(e,t){return mg(e,t,Vs.selectDifference)},differenceRev:function(e,t){return mg(e,t,Vs.selectDifferenceRev)},xor:function(e,t){return mg(e,t,Vs.selectXor)}};function mg(e,t,r){var i=Vs.segments(e),a=Vs.segments(t),s=Vs.combine(i,a),l=r(s);return Vs.polygon(l)}typeof window=="object"&&(window.PolyBool=Vs);uI.exports=Vs});var hI=de((g_e,cI)=>{cI.exports=function(t,r,i,a){var s=t[0],l=t[1],f=!1;i===void 0&&(i=0),a===void 0&&(a=r.length);for(var h=a-i,v=0,m=h-1;vl!=C>l&&s<(S-b)*(l-T)/(C-T)+b;P&&(f=!f)}return f}});var lx=de((__e,vI)=>{"use strict";var W4=o_().dot,ox=Hi().BADNUM,sx=vI.exports={};sx.tester=function(t){var r=t.slice(),i=r[0][0],a=i,s=r[0][1],l=s,f;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),f=1;fa||I===ox||Il||P&&v(C))}function b(C,P){var E=C[0],I=C[1];if(E===ox||Ea||I===ox||Il)return!1;var R=r.length,N=r[0][0],z=r[0][1],O=0,H,V,W,J,re;for(H=1;HMath.max(V,N)||I>Math.max(W,z)))if(If||Math.abs(W4(b,v))>a)return!0;return!1};sx.filter=function(t,r){var i=[t[0]],a=0,s=0;function l(h){t.push(h);var v=i.length,m=a;i.splice(s+1);for(var b=m+1;b1){var f=t.pop();l(f)}return{addPt:l,raw:t,filtered:i}}});var pI=de((x_e,dI)=>{"use strict";dI.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var qI=de((b_e,FI)=>{"use strict";var mI=fI(),Lne=hI(),_g=la(),Pne=_i().dashStyle,yg=Ua(),Dne=Rf(),zne=bc().makeEventData,Ag=kd(),Ine=Ag.freeMode,Rne=Ag.rectMode,xg=Ag.drawMode,K4=Ag.openMode,Q4=Ag.selectMode,yI=Hh(),gI=ng(),TI=Y2(),AI=Dh().clearOutline,MI=Uh(),X4=MI.handleEllipse,Fne=MI.readPaths,qne=V2().newShapes,Nne=b4(),Bne=Y4().activateLastSelection,fx=Bt(),One=fx.sorterAsc,SI=lx(),gg=b_(),tu=$n().getFromId,Une=I2(),Vne=ax().redrawReglTraces,cx=pI(),qf=cx.MINSELECT,Hne=SI.filter,$4=SI.tester,e6=N2(),_I=e6.p2r,Gne=e6.axValue,Zne=e6.getTransform;function t6(e){return e.subplot!==void 0}function Yne(e,t,r,i,a){var s=!t6(i),l=Ine(a),f=Rne(a),h=K4(a),v=xg(a),m=Q4(a),b=a==="drawline",T=a==="drawcircle",S=b||T,C=i.gd,P=C._fullLayout,E=m&&P.newselection.mode==="immediate"&&s,I=P._zoomlayer,R=i.element.getBoundingClientRect(),N=i.plotinfo,z=Zne(N),O=t-R.left,H=r-R.top;P._calcInverseTransform(C);var V=fx.apply3DTransform(P._invTransform)(O,H);O=V[0],H=V[1];var W=P._invScaleX,J=P._invScaleY,re=O,oe=H,ne="M"+O+","+H,fe=i.xaxes[0],ve=i.yaxes[0],ke=fe._length,Ce=ve._length,Te=e.altKey&&!(xg(a)&&h),pe,Ae,Se,Le,Ke,ht,it;CI(e,C,i),l&&(pe=Hne([[O,H]],cx.BENDPX));var lt=I.selectAll("path.select-outline-"+N.id).data([1]),He=v?P.newshape:P.newselection;v&&(i.hasText=He.label.text||He.label.texttemplate);var _t=v&&!h?He.fillcolor:"rgba(0,0,0,0)",at=He.line.color||(s?yg.contrast(C._fullLayout.plot_bgcolor):"#7f7f7f");lt.enter().append("path").attr("class","select-outline select-outline-"+N.id).style({opacity:v?He.opacity/2:1,"stroke-dasharray":Pne(He.line.dash,He.line.width),"stroke-width":He.line.width+"px","shape-rendering":"crispEdges"}).call(yg.stroke,at).call(yg.fill,_t).attr("fill-rule","evenodd").classed("cursor-move",!!v).attr("transform",z).attr("d",ne+"Z");var At=I.append("path").attr("class","zoombox-corners").style({fill:yg.background,stroke:yg.defaultLine,"stroke-width":1}).attr("transform",z).attr("d","M0,0Z");if(v&&i.hasText){var kt=I.select(".label-temp");kt.empty()&&(kt=I.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var pt=P._uid+cx.SELECTID,ge=[],Re=hx(C,i.xaxes,i.yaxes,i.subplot);E&&!e.shiftKey&&(i._clearSubplotSelections=function(){if(s){var et=fe._id,vt=ve._id;zI(C,et,vt,Re);for(var tt=(C.layout||{}).selections||[],Nt=[],Mt=!1,Ct=0;Ct=0){C._fullLayout._deactivateShape(C);return}if(!v){var tt=P.clickmode;gg.done(pt).then(function(){if(gg.clear(pt),et===2){for(lt.remove(),Ke=0;Ke-1&&kI(vt,C,i.xaxes,i.yaxes,i.subplot,i,lt),tt==="event"&&Tg(C,void 0);Dne.click(C,vt,N.id)}).catch(fx.error)}},i.doneFn=function(){At.remove(),gg.done(pt).then(function(){gg.clear(pt),!E&&Le&&i.selectionDefs&&(Le.subtract=Te,i.selectionDefs.push(Le),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,Se)),(E||v)&&bg(i,E),i.doneFnCompleted&&i.doneFnCompleted(ge),m&&Tg(C,it)}).catch(fx.error)}}function kI(e,t,r,i,a,s,l){var f=t._hoverdata,h=t._fullLayout,v=h.clickmode,m=v.indexOf("event")>-1,b=[],T,S,C,P,E,I,R,N,z,O;if(Kne(f)){CI(e,t,s),T=hx(t,r,i,a);var H=Qne(f,T),V=H.pointNumbers.length>0;if(V?$ne(T,H):eoe(T)&&(R=bI(H))){for(l&&l.remove(),O=0;O=0}function Jne(e){return e._fullLayout._activeSelectionIndex>=0}function bg(e,t){var r=e.dragmode,i=e.plotinfo,a=e.gd;jne(a)&&a._fullLayout._deactivateShape(a),Jne(a)&&a._fullLayout._deactivateSelection(a);var s=a._fullLayout,l=s._zoomlayer,f=xg(r),h=Q4(r);if(f||h){var v=l.selectAll(".select-outline-"+i.id);if(v&&a._fullLayout._outlining){var m;f&&(m=qne(v,e)),m&&_g.call("_guiRelayout",a,{shapes:m});var b;h&&!t6(e)&&(b=Nne(v,e)),b&&(a._fullLayout._noEmitSelectedAtStart=!0,_g.call("_guiRelayout",a,{selections:b}).then(function(){t&&Bne(a)})),a._fullLayout._outlining=!1}}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function xI(e){return e._id}function hx(e,t,r,i){if(!e.calcdata)return[];var a=[],s=t.map(xI),l=r.map(xI),f,h,v;for(v=0;v0,s=a?i[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(s)>-1:!1}function $ne(e,t){var r=[],i,a,s,l;for(l=0;l0&&r.push(i);if(r.length===1&&(s=r[0]===t.searchInfo,s&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(l=0;l1||(t+=i.selectedpoints.length,t>1)))return!1;return t===1}function wg(e,t,r){var i;for(i=0;i-1&&t;if(!l&&t){var et=wI(e,!0);if(et.length){var vt=et[0].xref,tt=et[0].yref;if(vt&&tt){var Nt=II(et),Mt=RI([tu(e,vt,"x"),tu(e,tt,"y")]);Mt(ge,Nt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:xe&&Tg(e,ge),T._reselect=!1}if(!l&&T._deselect){var Ct=T._deselect;f=Ct.xref,h=Ct.yref,aoe(f,h,m)||zI(e,f,h,i),xe&&(ge.points.length?Tg(e,ge):i6(e)),T._deselect=!1}return{eventData:ge,selectionTesters:r}}function roe(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";NI.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 Mg=de((T_e,BI)=>{"use strict";BI.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 Q0=de((M_e,VI)=>{"use strict";var OI=n6(),UI=qo(),vx=Ao(),loe=Di().templatedArray,A_e=Mg();VI.exports=loe("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:UI({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:OI.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:OI.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",vx.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",vx.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",vx.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",vx.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:UI({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var dx=de((S_e,HI)=>{"use strict";HI.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var px=de((k_e,GI)=>{"use strict";GI.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var kc=de((C_e,JI)=>{"use strict";var ZI=qw().axisHoverFormat,uoe=Hl().texttemplateAttrs,foe=Hl().hovertemplateAttrs,YI=xc(),coe=qo(),hoe=hc().dash,voe=hc().pattern,doe=_i(),poe=dx(),mx=hn().extendFlat,moe=px();function WI(e){return{valType:"any",dflt:0,editType:"calc"}}function XI(e){return{valType:"any",editType:"calc"}}function jI(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}JI.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:WI("x"),yperiod:WI("y"),xperiod0:XI("x0"),yperiod0:XI("y0"),xperiodalignment:jI("x"),yperiodalignment:jI("y"),xhoverformat:ZI("x"),yhoverformat:ZI("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:uoe({},{}),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:foe({},{keys:poe.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:mx({},hoe,{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:moe(!0),fillgradient:mx({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:voe,marker:mx({symbol:{valType:"enumerated",values:doe.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:mx({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},YI("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"},YI("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:coe({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var o6=de((L_e,$I)=>{"use strict";var KI=Q0(),QI=kc().line,yoe=hc().dash,yx=hn().extendFlat,goe=nl().overrideAll,_oe=Di().templatedArray,E_e=Mg();$I.exports=goe(_oe("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:yx({},KI.xref,{}),yref:yx({},KI.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:QI.color,width:yx({},QI.width,{min:1,dflt:1}),dash:yx({},yoe,{dflt:"dot"})}}),"arraydraw","from-root")});var aR=de((P_e,rR)=>{"use strict";var eR=Bt(),gx=Yi(),xoe=Wl(),boe=o6(),tR=Hh();rR.exports=function(t,r){xoe(t,r,{name:"selections",handleItemDefaults:woe});for(var i=r.selections,a=0;a{"use strict";iR.exports=function(t,r,i){i("newselection.mode");var a=i("newselection.line.width");a&&(i("newselection.line.color"),i("newselection.line.dash")),i("activeselection.fillcolor"),i("activeselection.opacity")}});var Sg=de((z_e,lR)=>{"use strict";var Toe=la(),oR=Bt(),sR=$n();lR.exports=function(t){return function(i,a){var s=i[t];if(Array.isArray(s))for(var l=Toe.subplotsRegistry.cartesian,f=l.idRegex,h=a._subplots,v=h.xaxis,m=h.yaxis,b=h.cartesian,T=a._has("cartesian"),S=0;S{"use strict";var uR=Y4(),kg=qI();fR.exports={moduleType:"component",name:"selections",layoutAttributes:o6(),supplyLayoutDefaults:aR(),supplyDrawNewSelectionDefaults:nR(),includeBasePlot:Sg()("selections"),draw:uR.draw,drawOne:uR.drawOne,reselect:kg.reselect,prepSelect:kg.prepSelect,clearOutline:kg.clearOutline,clearSelectionsCache:kg.clearSelectionsCache,selectOnClick:kg.selectOnClick}});var PR=de((R_e,LR)=>{"use strict";var c6=ja(),ru=Bt(),cR=ru.numberFormat,Aoe=Tf(),Moe=G5(),_x=la(),xR=ru.strTranslate,Soe=co(),hR=Ua(),Zh=_i(),koe=Rf(),vR=Yi(),Coe=Oh(),Eoe=jl(),bR=kd(),xx=bR.selectingOrDrawing,Loe=bR.freeMode,Poe=ts().FROM_TL,Doe=I2(),zoe=ax().redrawReglTraces,Ioe=eo(),l6=$n().getFromId,Roe=Nf().prepSelect,Foe=Nf().clearOutline,qoe=Nf().selectOnClick,s6=N4(),h6=Ao(),dR=h6.MINDRAG,gs=h6.MINZOOM,pR=!0;function Noe(e,t,r,i,a,s,l,f){var h=e._fullLayout._zoomlayer,v=l+f==="nsew",m=(l+f).length===1,b,T,S,C,P,E,I,R,N,z,O,H,V,W,J,re,oe,ne,fe,ve,ke,Ce,Te;r+=t.yaxis._shift;function pe(){if(b=t.xaxis,T=t.yaxis,N=b._length,z=T._length,I=b._offset,R=T._offset,S={},S[b._id]=b,C={},C[T._id]=T,l&&f)for(var Tt=t.overlays,wt=0;wt=0){Vt._fullLayout._deactivateShape(Vt);return}var Kt=Vt._fullLayout.clickmode;if(f6(Vt),Tt===2&&!m&&Wt(),v)Kt.indexOf("select")>-1&&qoe(wt,Vt,P,E,t.id,Le),Kt.indexOf("event")>-1&&koe.click(Vt,wt,t.id);else if(Tt===1&&m){var Ht=l?T:b,Ot=l==="s"||f==="w"?0:1,er=Ht._name+".range["+Ot+"]",Mr=Boe(Ht,Ot),xr="left",Pt="middle";if(Ht.fixedrange)return;l?(Pt=l==="n"?"top":"bottom",Ht.side==="right"&&(xr="right")):f==="e"&&(xr="right"),Vt._context.showAxisRangeEntryBoxes&&c6.select(Se).call(Soe.makeEditable,{gd:Vt,immediate:!0,background:Vt._fullLayout.paper_bgcolor,text:String(Mr),fill:Ht.tickfont?Ht.tickfont.color:"#444",horizontalAlign:xr,verticalAlign:Pt}).on("edit",function(Fe){var Ge=Ht.d2r(Fe);Ge!==void 0&&_x.call("_guiRelayout",Vt,er,Ge)})}}Eoe.init(Le);var it,lt,He,_t,at,At,kt,pt,ge,Re;function xe(Tt,wt,Vt){var Kt=Se.getBoundingClientRect();it=wt-Kt.left,lt=Vt-Kt.top,e._fullLayout._calcInverseTransform(e);var Ht=ru.apply3DTransform(e._fullLayout._invTransform)(it,lt);it=Ht[0],lt=Ht[1],He={l:it,r:it,w:0,t:lt,b:lt,h:0},_t=e._hmpixcount?e._hmlumcount/e._hmpixcount:Aoe(e._fullLayout.plot_bgcolor).getLuminance(),at="M0,0H"+N+"V"+z+"H0V0",At=!1,kt="xy",Re=!1,pt=AR(h,_t,I,R,at),ge=MR(h,I,R)}function et(Tt,wt){if(e._transitioningWithDuration)return!1;var Vt=Math.max(0,Math.min(N,Ce*Tt+it)),Kt=Math.max(0,Math.min(z,Te*wt+lt)),Ht=Math.abs(Vt-it),Ot=Math.abs(Kt-lt);He.l=Math.min(it,Vt),He.r=Math.max(it,Vt),He.t=Math.min(lt,Kt),He.b=Math.max(lt,Kt);function er(){kt="",He.r=He.l,He.t=He.b,ge.attr("d","M0,0Z")}if(O.isSubplotConstrained)Ht>gs||Ot>gs?(kt="xy",Ht/N>Ot/z?(Ot=Ht*z/N,lt>Kt?He.t=lt-Ot:He.b=lt+Ot):(Ht=Ot*N/z,it>Vt?He.l=it-Ht:He.r=it+Ht),ge.attr("d",bx(He))):er();else if(H.isSubplotConstrained)if(Ht>gs||Ot>gs){kt="xy";var Mr=Math.min(He.l/N,(z-He.b)/z),xr=Math.max(He.r/N,(z-He.t)/z);He.l=Mr*N,He.r=xr*N,He.b=(1-Mr)*z,He.t=(1-xr)*z,ge.attr("d",bx(He))}else er();else!W||Ot0){var Fe;if(H.isSubplotConstrained||!V&&W.length===1){for(Fe=0;Fe1&&(er.maxallowed!==void 0&&re===(er.range[0]1&&(Mr.maxallowed!==void 0&&oe===(Mr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Uoe(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function AR(e,t,r,i,a){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",xR(r,i)).attr("d",a+"Z")}function MR(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:hR.background,stroke:hR.defaultLine,"stroke-width":1,opacity:0}).attr("transform",xR(t,r)).attr("d","M0,0Z")}function SR(e,t,r,i,a,s){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),kR(e,t,a,s)}function kR(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function f6(e){c6.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function CR(e){pR&&e.data&&e._context.showTips&&(ru.notifier(ru._(e,"Double-click to zoom back out"),"long"),pR=!1)}function Voe(e,t){return"M"+(e.l-.5)+","+(t-gs-.5)+"h-3v"+(2*gs+1)+"h3ZM"+(e.r+.5)+","+(t-gs-.5)+"h3v"+(2*gs+1)+"h-3Z"}function Hoe(e,t){return"M"+(t-gs-.5)+","+(e.t-.5)+"v-3h"+(2*gs+1)+"v3ZM"+(t-gs-.5)+","+(e.b+.5)+"v3h"+(2*gs+1)+"v-3Z"}function bx(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,gs)/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 gR(e,t,r,i,a){for(var s=!1,l={},f={},h,v,m,b,T=(a||{}).xaHash,S=(a||{}).yaHash,C=0;C{"use strict";var Goe=ja(),wx=Rf(),Zoe=jl(),Yoe=Oh(),Bu=PR().makeDragBox,io=Ao().DRAGGERSIZE;Tx.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Goe.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var i=Object.keys(r._plots||{}).sort(function(s,l){if((r._plots[s].mainplot&&!0)===(r._plots[l].mainplot&&!0)){var f=s.split("y"),h=l.split("y");return f[0]===h[0]?Number(f[1]||1)-Number(h[1]||1):Number(f[0]||1)-Number(h[0]||1)}return r._plots[s].mainplot?1:-1});i.forEach(function(s){var l=r._plots[s],f=l.xaxis,h=l.yaxis;if(!l.mainplot){var v=Bu(t,l,f._offset,h._offset,f._length,h._length,"ns","ew");v.onmousemove=function(T){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===s&&t._fullLayout._plots[s]&&wx.hover(t,T,s)},wx.hover(t,T,s),t._fullLayout._lasthover=v,t._fullLayout._hoversubplot=s},v.onmouseout=function(T){t._dragging||(t._fullLayout._hoversubplot=null,Zoe.unhover(t,T))},t._context.showAxisDragHandles&&(Bu(t,l,f._offset-io,h._offset-io,io,io,"n","w"),Bu(t,l,f._offset+f._length,h._offset-io,io,io,"n","e"),Bu(t,l,f._offset-io,h._offset+h._length,io,io,"s","w"),Bu(t,l,f._offset+f._length,h._offset+h._length,io,io,"s","e"))}if(t._context.showAxisDragHandles){if(s===f._mainSubplot){var m=f._mainLinePosition;f.side==="top"&&(m-=io),Bu(t,l,f._offset+f._length*.1,m,f._length*.8,io,"","ew"),Bu(t,l,f._offset,m,f._length*.1,io,"","w"),Bu(t,l,f._offset+f._length*.9,m,f._length*.1,io,"","e")}if(s===h._mainSubplot){var b=h._mainLinePosition;h.side!=="right"&&(b-=io),Bu(t,l,b,h._offset+h._length*.1,io,h._length*.8,"ns",""),Bu(t,l,b,h._offset+h._length*.9,io,h._length*.1,"s",""),Bu(t,l,b,h._offset,io,h._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(s){s.target=t._fullLayout._lasthover,wx.hover(t,s,r._hoversubplot)},a.onclick=function(s){s.target=t._fullLayout._lasthover,wx.click(t,s)},a.onmousedown=function(s){t._fullLayout._lasthover.onmousedown(s)},Tx.updateFx(t)}};Tx.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Yoe(t._draggers,r)}});var IR=de((q_e,zR)=>{"use strict";var DR=la();zR.exports=function(t){for(var r=DR.layoutArrayContainers,i=DR.layoutArrayRegexes,a=t.split("[")[0],s,l,f=0;f{"use strict";var Woe=cc(),d6=n_(),Cg=Th(),Xoe=lw().sorterAsc,p6=la();Eg.containerArrayMatch=IR();var joe=Eg.isAddVal=function(t){return t==="add"||Woe(t)},RR=Eg.isRemoveVal=function(t){return t===null||t==="remove"};Eg.applyContainerArrayChanges=function(t,r,i,a,s){var l=r.astr,f=p6.getComponentMethod(l,"supplyLayoutDefaults"),h=p6.getComponentMethod(l,"draw"),v=p6.getComponentMethod(l,"drawOne"),m=a.replot||a.recalc||f===d6||h===d6,b=t.layout,T=t._fullLayout;if(i[""]){Object.keys(i).length>1&&Cg.warn("Full array edits are incompatible with other edits",l);var S=i[""][""];if(RR(S))r.set(null);else if(Array.isArray(S))r.set(S);else return Cg.warn("Unrecognized full array edit value",l,S),!0;return m?!1:(f(b,T),h(t),!0)}var C=Object.keys(i).map(Number).sort(Xoe),P=r.get(),E=P||[],I=s(T,l).get(),R=[],N=-1,z=E.length,O,H,V,W,J,re,oe,ne;for(O=0;OE.length-(oe?0:1)){Cg.warn("index out of range",l,V);continue}if(re!==void 0)J.length>1&&Cg.warn("Insertion & removal are incompatible with edits to the same index.",l,V),RR(re)?R.push(V):oe?(re==="add"&&(re={}),E.splice(V,0,re),I&&I.splice(V,0,{})):Cg.warn("Unrecognized full object edit value",l,V,re),N===-1&&(N=V);else for(H=0;H=0;O--)E.splice(R[O],1),I&&I.splice(R[O],1);if(E.length?P||r.set(E):r.set(null),m)return!1;if(f(b,T),v!==d6){var fe;if(N===-1)fe=C;else{for(z=Math.max(E.length,z),fe=[],O=0;O=N));O++)fe.push(V);for(O=N;O{"use strict";var OR=Da(),B_e=$3(),UR=la(),Hs=Bt(),Lg=eo(),VR=$n(),HR=Ua(),Pg=VR.cleanId,Joe=VR.getFromTrace,m6=UR.traceIs;Ou.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Hs.log("Clearing previous rejected promises from queue."),e._promises=[]};Ou.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(Lg.subplotsRegistry.cartesian||{}).attrRegex,a=(Lg.subplotsRegistry.polar||{}).attrRegex,s=(Lg.subplotsRegistry.ternary||{}).attrRegex,l=(Lg.subplotsRegistry.gl3d||{}).attrRegex,f=Object.keys(e);for(t=0;t3?(E.x=1.02,E.xanchor="left"):E.x<-2&&(E.x=-.02,E.xanchor="right"),E.y>3?(E.y=1.02,E.yanchor="bottom"):E.y<-2&&(E.y=-.02,E.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),HR.clean(e),e.template&&e.template.layout&&Ou.cleanLayout(e.template.layout),e};function $0(e,t){var r=e[t],i=t.charAt(0);r&&r!=="paper"&&(e[t]=Pg(r,i,!0))}Ou.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}Ou.hasParent=function(e,t){for(var r=BR(t);r;){if(r in e)return!0;r=BR(r)}return!1};var $oe=["x","y","z"];Ou.clearAxisTypes=function(e,t,r){for(var i=0;i{"use strict";var kx=ja(),ese=Da(),tse=bw(),mr=Bt(),Ii=mr.nestedProperty,_6=qy(),_s=Mk(),au=la(),Ix=M0(),ra=eo(),ss=Yi(),rse=H5(),ase=Ru(),y6=_i(),ise=Ua(),nse=v6().initInteractions,ose=zh(),sse=Nf().clearOutline,jR=rd().dfltConfig,Mx=FR(),On=GR(),hi=ax(),Yh=nl(),lse=Ao().AX_NAME_PATTERN,g6=0,ZR=5;function use(e,t,r,i){var a;if(e=mr.getGraphDiv(e),_6.init(e),mr.isPlainObject(t)){var s=t;t=s.data,r=s.layout,i=s.config,a=s.frames}var l=_6.triggerHandler(e,"plotly_beforeplot",[t,r,i]);if(l===!1)return Promise.reject();!t&&!r&&!mr.isPlotDiv(e)&&mr.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function f(){if(a)return ei.addFrames(e,a)}KR(e,i),r||(r={}),kx.select(e).classed("js-plotly-plot",!0),y6.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var h=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(On.cleanData(t),h?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||h)&&(e.layout=On.cleanLayout(r)),ra.supplyDefaults(e);var v=e._fullLayout,m=v._has("cartesian");v._replotting=!0,(h||v._shouldCreateBgLayer)&&(Pse(e),v._shouldCreateBgLayer&&delete v._shouldCreateBgLayer),y6.initGradients(e),y6.initPatterns(e),h&&ss.saveShowSpikeInitial(e);var b=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;b&&ra.doCalcdata(e);for(var T=0;T=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,i+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function QR(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]),Ex(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&Ex(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function dse(e,t,r){var i,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;i=0&&m=0&&m0&&typeof W.parts[oe]!="string";)oe--;var ne=W.parts[oe],fe=W.parts[oe-1]+"."+ne,ve=W.parts.slice(0,oe).join("."),ke=Ii(e.layout,ve).get(),Ce=Ii(i,ve).get(),Te=W.get();if(J!==void 0){I[V]=J,R[V]=ne==="reverse"?J:Cc(Te);var pe=Ix.getLayoutValObject(i,W.parts);if(pe&&pe.impliedEdits&&J!==null)for(var Ae in pe.impliedEdits)N(mr.relativeAttr(V,Ae),pe.impliedEdits[Ae]);if(["width","height"].indexOf(V)!==-1)if(J){N("autosize",null);var Se=V==="height"?"width":"height";N(Se,i[Se])}else i[V]=e._initialAutoSize[V];else if(V==="autosize")N("width",J?null:i.width),N("height",J?null:i.height);else if(fe.match(sF))H(fe),Ii(i,ve+"._inputRange").set(null);else if(fe.match(lF)){H(fe),Ii(i,ve+"._inputRange").set(null);var Le=Ii(i,ve).get();Le._inputDomain&&(Le._input.domain=Le._inputDomain.slice())}else fe.match(uF)&&Ii(i,ve+"._inputDomain").set(null);if(ne==="type"){O=ke;var Ke=Ce.type==="linear"&&J==="log",ht=Ce.type==="log"&&J==="linear";if(Ke||ht){if(!O||!O.range)N(ve+".autorange",!0);else if(Ce.autorange)Ke&&(O.range=O.range[1]>O.range[0]?[1,2]:[2,1]);else{var it=O.range[0],lt=O.range[1];Ke?(it<=0&<<=0&&N(ve+".autorange",!0),it<=0?it=lt/1e6:lt<=0&&(lt=it/1e6),N(ve+".range[0]",Math.log(it)/Math.LN10),N(ve+".range[1]",Math.log(lt)/Math.LN10)):(N(ve+".range[0]",Math.pow(10,it)),N(ve+".range[1]",Math.pow(10,lt)))}Array.isArray(i._subplots.polar)&&i._subplots.polar.length&&i[W.parts[0]]&&W.parts[1]==="radialaxis"&&delete i[W.parts[0]]._subplot.viewInitial["radialaxis.range"],au.getComponentMethod("annotations","convertCoords")(e,Ce,J,N),au.getComponentMethod("images","convertCoords")(e,Ce,J,N)}else N(ve+".autorange",!0),N(ve+".range",null);Ii(i,ve+"._inputRange").set(null)}else if(ne.match(lse)){var He=Ii(i,V).get(),_t=(J||{}).type;(!_t||_t==="-")&&(_t="linear"),au.getComponentMethod("annotations","convertCoords")(e,He,_t,N),au.getComponentMethod("images","convertCoords")(e,He,_t,N)}var at=Mx.containerArrayMatch(V);if(at){m=at.array,b=at.index;var At=at.property,kt=pe||{editType:"calc"};b!==""&&At===""&&(Mx.isAddVal(J)?R[V]=null:Mx.isRemoveVal(J)?R[V]=(Ii(r,m).get()||[])[b]:mr.warn("unrecognized full object value",t)),Yh.update(E,kt),v[m]||(v[m]={});var pt=v[m][b];pt||(pt=v[m][b]={}),pt[At]=J,delete t[V]}else ne==="reverse"?(ke.range?ke.range.reverse():(N(ve+".autorange",!0),ke.range=[1,0]),Ce.autorange?E.calc=!0:E.plot=!0):(V==="dragmode"&&(J===!1&&Te!==!1||J!==!1&&Te===!1)||i._has("scatter-like")&&i._has("regl")&&V==="dragmode"&&(J==="lasso"||J==="select")&&!(Te==="lasso"||Te==="select")?E.plot=!0:pe?Yh.update(E,pe):E.calc=!0,W.set(J))}}for(m in v){var ge=Mx.applyContainerArrayChanges(e,s(r,m),v[m],E,s);ge||(E.plot=!0)}for(var Re in z){O=ss.getFromId(e,Re);var xe=O&&O._constraintGroup;if(xe){E.calc=!0;for(var et in xe)z[et]||(ss.getFromId(e,et)._constraintShrinkable=!0)}}(cF(e)||t.height||t.width)&&(E.plot=!0);var vt=i.shapes;for(b=0;b1;)if(i.pop(),r=Ii(t,i.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function xse(e,t){for(var r=0;r=a.length?a[0]:a[v]:a}function f(v){return Array.isArray(s)?v>=s.length?s[0]:s[v]:s}function h(v,m){var b=0;return function(){if(v&&++b===m)return v()}}return new Promise(function(v,m){function b(){if(i._frameQueue.length!==0){for(;i._frameQueue.length;){var ne=i._frameQueue.pop();ne.onInterrupt&&ne.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function T(ne){if(ne.length!==0){for(var fe=0;fei._timeToNext&&C()};ne()}var E=0;function I(ne){return Array.isArray(a)?E>=a.length?ne.transitionOpts=a[E]:ne.transitionOpts=a[0]:ne.transitionOpts=a,E++,ne}var R,N,z=[],O=t==null,H=Array.isArray(t),V=!O&&!H&&mr.isPlainObject(t);if(V)z.push({type:"object",data:I(mr.extendFlat({},t))});else if(O||["string","number"].indexOf(typeof t)!==-1)for(R=0;R0&&rere)&&oe.push(N);z=oe}}z.length>0?T(z):(e.emit("plotly_animated"),v())})}function kse(e,t,r){if(e=mr.getGraphDiv(e),t==null)return Promise.resolve();if(!mr.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,a,s,l,f=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var v=f.length+t.length*2,m=[],b={};for(i=t.length-1;i>=0;i--)if(mr.isPlainObject(t[i])){var T=t[i].name,S=(h[T]||b[T]||{}).name,C=t[i].name,P=h[S]||b[S];S&&C&&typeof C=="number"&&P&&g6W.index?-1:V.index=0;i--){if(a=m[i].frame,typeof a.name=="number"&&mr.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(s=0;s=0;r--)i=t[r],s.push({type:"delete",index:i}),l.unshift({type:"insert",index:i,value:a[i]});var f=ra.modifyFrames,h=ra.modifyFrames,v=[e,l],m=[e,s];return _s&&_s.add(e,f,v,h,m),ra.modifyFrames(e,s)}function Ese(e){e=mr.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return ra.cleanPlot([],{},r,t),ra.purge(e),_6.purge(e),t._container&&t._container.remove(),delete e._context,e}function Lse(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!mr.equalDomRects(r,t._lastBBox)){var i=t._invTransform=mr.inverseTransformMatrix(mr.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(i[0][0]*i[0][0]+i[0][1]*i[0][1]+i[0][2]*i[0][2]),t._invScaleY=Math.sqrt(i[1][0]*i[1][0]+i[1][1]*i[1][1]+i[1][2]*i[1][2]),t._lastBBox=r}}function Pse(e){var t=kx.select(e),r=e._fullLayout;if(r._calcInverseTransform=Lse,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),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};kx.selectAll("defs").each(function(){this.id&&(i[this.id.split("-")[1]]=1)}),r._uid=mr.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(ose.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 a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.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 s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.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")}ei.animate=Sse;ei.addFrames=kse;ei.deleteFrames=Cse;ei.addTraces=aF;ei.deleteTraces=iF;ei.extendTraces=tF;ei.moveTraces=x6;ei.prependTraces=rF;ei.newPlot=vse;ei._doPlot=use;ei.purge=Ese;ei.react=Tse;ei.redraw=hse;ei.relayout=Dg;ei.restyle=Lx;ei.setPlotConfig=fse;ei.update=Dx;ei._guiRelayout=w6(Dg);ei._guiRestyle=w6(Lx);ei._guiUpdate=w6(Dx);ei._storeDirectGUIEdit=yse});var Pd=de(Bf=>{"use strict";var Dse=la();Bf.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Bf.getRedrawFunc=function(e){return function(){Dse.getComponentMethod("colorbar","draw")(e)}};Bf.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Bf.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var hF=window.URL||window.webkitURL;Bf.createObjectURL=function(e){return hF.createObjectURL(e)};Bf.revokeObjectURL=function(e){return hF.revokeObjectURL(e)};Bf.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=zse(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Bf.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function zse(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),a=0;a{"use strict";var M6=ja(),H_e=Bt(),Ise=_i(),Rse=Ua(),G_e=zh(),A6=/"/g,Ig="TOBESTRIPPED",Fse=new RegExp('("'+Ig+")|("+Ig+'")',"g");function qse(e){var t=M6.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(i){return i==="<"?"<":i==="&rt;"?">":i.indexOf("<")!==-1||i.indexOf(">")!==-1?"":t.html(i).text()});return t.remove(),r}function Nse(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}vF.exports=function(t,r,i){var a=t._fullLayout,s=a._paper,l=a._toppaper,f=a.width,h=a.height,v;s.insert("rect",":first-child").call(Ise.setRect,0,0,f,h).call(Rse.fill,a.paper_bgcolor);var m=a._basePlotModules||[];for(v=0;v{"use strict";var Bse=Bt(),Ose=C_().EventEmitter,Rg=Pd();function Use(e){var t=e.emitter||new Ose,r=new Promise(function(i,a){var s=window.Image,l=e.svg,f=e.format||"png",h=e.canvas,v=e.scale||1,m=e.width||300,b=e.height||150,T=v*m,S=v*b,C=h.getContext("2d",{willReadFrequently:!0}),P=new s,E,I;f==="svg"||Bse.isSafari()?I=Rg.encodeSVG(l):(E=Rg.createBlob(l,"svg"),I=Rg.createObjectURL(E)),h.width=T,h.height=S,P.onload=function(){var R;switch(E=null,Rg.revokeObjectURL(I),f!=="svg"&&C.drawImage(P,0,0,T,S),f){case"jpeg":R=h.toDataURL("image/jpeg");break;case"png":R=h.toDataURL("image/png");break;case"webp":R=h.toDataURL("image/webp");break;case"svg":R=I;break;default:var N="Image format is not jpeg, png, svg or webp.";if(a(new Error(N)),!e.promise)return t.emit("error",N)}i(R),e.promise||t.emit("success",R)},P.onerror=function(R){if(E=null,Rg.revokeObjectURL(I),a(R),!e.promise)return t.emit("error",R)},P.src=I});return e.promise?r:t}dF.exports=Use});var k6=de((W_e,yF)=>{"use strict";var pF=Da(),mF=T6(),Vse=eo(),Of=Bt(),Fg=Pd(),Hse=Fx(),Gse=qx(),Zse=U1().version,S6={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 Yse(e,t){t=t||{};var r,i,a,s;Of.isPlainObject(e)?(r=e.data||[],i=e.layout||{},a=e.config||{},s={}):(e=Of.getGraphDiv(e),r=Of.extendDeep([],e.data),i=Of.extendDeep({},e.layout),a=e._context,s=e._fullLayout||{});function l(H){return!(H in t)||Of.validate(t[H],S6[H])}if(!l("width")&&t.width!==null||!l("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!l("format"))throw new Error("Export format is not "+Of.join2(S6.format.values,", "," or ")+".");var f={};function h(H,V){return Of.coerce(t,f,S6,H,V)}var v=h("format"),m=h("width"),b=h("height"),T=h("scale"),S=h("setBackground"),C=h("imageDataOnly"),P=document.createElement("div");P.style.position="absolute",P.style.left="-5000px",document.body.appendChild(P);var E=Of.extendFlat({},i);m?E.width=m:t.width===null&&pF(s.width)&&(E.width=s.width),b?E.height=b:t.height===null&&pF(s.height)&&(E.height=s.height);var I=Of.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:S}),R=Fg.getRedrawFunc(P);function N(){return new Promise(function(H){setTimeout(H,Fg.getDelay(P._fullLayout))})}function z(){return new Promise(function(H,V){var W=Hse(P,v,T),J=P._fullLayout.width,re=P._fullLayout.height;function oe(){mF.purge(P),document.body.removeChild(P)}if(v==="full-json"){var ne=Vse.graphJson(P,!1,"keepdata","object",!0,!0);return ne.version=Zse,ne=JSON.stringify(ne),oe(),H(C?ne:Fg.encodeJSON(ne))}if(oe(),v==="svg")return H(C?W:Fg.encodeSVG(W));var fe=document.createElement("canvas");fe.id=Of.randstr(),Gse({format:v,width:J,height:re,scale:T,canvas:fe,svg:W,promise:!0}).then(H).catch(V)})}function O(H){return C?H.replace(Fg.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,V){mF.newPlot(P,r,E,I).then(R).then(N).then(z).then(function(W){H(O(W))}).catch(function(W){V(W)})})}yF.exports=Yse});var bF=de((X_e,xF)=>{"use strict";var iu=Bt(),Wse=eo(),Xse=M0(),jse=rd().dfltConfig,Uu=iu.isPlainObject,zd=Array.isArray,gF=iu.isArrayOrTypedArray;xF.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var i=Xse.get(),a=[],s={_context:iu.extendFlat({},jse)},l,f;zd(t)?(s.data=iu.extendDeep([],t),l=t):(s.data=[],l=[],a.push(no("array","data"))),Uu(r)?(s.layout=iu.extendDeep({},r),f=r):(s.layout={},f={},arguments.length>1&&a.push(no("object","layout"))),Wse.supplyDefaults(s);for(var h=s._fullData,v=l.length,m=0;mb.length&&i.push(no("unused",a,v.concat(b.length)));var I=b.length,R=Array.isArray(E);R&&(I=Math.min(I,E.length));var N,z,O,H,V;if(T.dimensions===2)for(z=0;zb[z].length&&i.push(no("unused",a,v.concat(z,b[z].length)));var W=b[z].length;for(N=0;N<(R?Math.min(W,E[z].length):W);N++)O=R?E[z][N]:E,H=m[z][N],V=b[z][N],iu.validate(H,O)?V!==H&&V!==+H&&i.push(no("dynamic",a,v.concat(z,N),H,V)):i.push(no("value",a,v.concat(z,N),H))}else i.push(no("array",a,v.concat(z),m[z]));else for(z=0;z{"use strict";var rle=Bt(),Bx=Pd();function ale(e,t,r){var i=document.createElement("a"),a="download"in i,s=new Promise(function(l,f){var h,v;if(a)return h=Bx.createBlob(e,r),v=Bx.createObjectURL(h),i.href=v,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),Bx.revokeObjectURL(v),h=null,l(t);if(rle.isSafari()){var m=r==="svg"?",":";base64,";return Bx.octetStream(m+encodeURIComponent(e)),l(t)}f(new Error("download error"))});return s}wF.exports=ale});var C6=de((K_e,MF)=>{"use strict";var AF=Bt(),ile=k6(),nle=TF(),J_e=Pd();function ole(e,t){var r;return AF.isPlainObject(e)||(r=AF.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(i,a){r&&r._snapshotInProgress&&a(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var s=ile(e,t),l=t.filename||e.fn||"newplot";l+="."+t.format.replace("-","."),s.then(function(f){return r&&(r._snapshotInProgress=!1),nle(f,l,t.format)}).then(function(f){i(f)}).catch(function(f){r&&(r._snapshotInProgress=!1),a(f)})})}MF.exports=ole});var LF=de(E6=>{"use strict";var Gs=Bt(),Zs=Gs.isPlainObject,SF=M0(),kF=eo(),sle=ms(),CF=Di(),EF=rd().dfltConfig;E6.makeTemplate=function(e){e=Gs.isPlainObject(e)?e:Gs.getGraphDiv(e),e=Gs.extendDeep({_context:EF},{data:e.data,layout:e.layout}),kF.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach(function(S){var C={};qg(S,C,ule.bind(null,S));var P=Gs.coerce(S,{},sle,"type"),E=i.data[P];E||(E=i.data[P]=[]),E.push(C)}),qg(r,i.layout,lle.bind(null,r)),delete i.layout.template;var a=r.template;if(Zs(a)){var s=a.layout,l,f,h,v,m,b;Zs(s)&&Ox(s,i.layout);var T=a.data;if(Zs(T)){for(f in i.data)if(h=T[f],Array.isArray(h)){for(m=i.data[f],b=m.length,v=h.length,l=0;lI?l.push({code:"unused",traceType:S,templateCount:E,dataCount:I}):I>E&&l.push({code:"reused",traceType:S,templateCount:E,dataCount:I})}}function R(N,z){for(var O in N)if(O.charAt(0)!=="_"){var H=N[O],V=nu(N,O,z);Zs(H)?(Array.isArray(N)&&H._template===!1&&H.templateitemname&&l.push({code:"missing",path:V,templateitemname:H.templateitemname}),R(H,V)):Array.isArray(H)&&fle(H)&&R(H,V)}}if(R({data:h,layout:f},""),l.length)return l.map(cle)};function fle(e){for(var t=0;t{"use strict";var Xn=T6();Wi._doPlot=Xn._doPlot;Wi.newPlot=Xn.newPlot;Wi.restyle=Xn.restyle;Wi.relayout=Xn.relayout;Wi.redraw=Xn.redraw;Wi.update=Xn.update;Wi._guiRestyle=Xn._guiRestyle;Wi._guiRelayout=Xn._guiRelayout;Wi._guiUpdate=Xn._guiUpdate;Wi._storeDirectGUIEdit=Xn._storeDirectGUIEdit;Wi.react=Xn.react;Wi.extendTraces=Xn.extendTraces;Wi.prependTraces=Xn.prependTraces;Wi.addTraces=Xn.addTraces;Wi.deleteTraces=Xn.deleteTraces;Wi.moveTraces=Xn.moveTraces;Wi.purge=Xn.purge;Wi.addFrames=Xn.addFrames;Wi.deleteFrames=Xn.deleteFrames;Wi.animate=Xn.animate;Wi.setPlotConfig=Xn.setPlotConfig;var hle=Ey().getGraphDiv,vle=J2().eraseActiveShape;Wi.deleteActiveShape=function(e){return vle(hle(e))};Wi.toImage=k6();Wi.validate=bF();Wi.downloadImage=C6();var PF=LF();Wi.makeTemplate=PF.makeTemplate;Wi.validateTemplate=PF.validateTemplate});var IF=de((e2e,zF)=>{"use strict";var L6=Bt(),dle=la();zF.exports=function(t,r,i,a){var s=a("x"),l=a("y"),f,h=dle.getComponentMethod("calendars","handleTraceDefaults");if(h(t,r,["x","y"],i),s){var v=L6.minRowLength(s);l?f=Math.min(v,L6.minRowLength(l)):(f=v,a("y0"),a("dy"))}else{if(!l)return 0;f=L6.minRowLength(l),a("x0"),a("dx")}return r._length=f,f}});var NF=de((t2e,qF)=>{"use strict";var RF=Bt().dateTick0,ple=Hi(),mle=ple.ONEWEEK;function FF(e,t){return e%mle===0?RF(t,1):RF(t,0)}qF.exports=function(t,r,i,a,s){if(s||(s={x:!0,y:!0}),s.x){var l=a("xperiod");l&&(a("xperiod0",FF(l,r.xcalendar)),a("xperiodalignment"))}if(s.y){var f=a("yperiod");f&&(a("yperiod0",FF(f,r.ycalendar)),a("yperiodalignment"))}}});var UF=de((r2e,OF)=>{"use strict";var BF=["orientation","groupnorm","stackgaps"];OF.exports=function(t,r,i,a){var s=i._scatterStackOpts,l=a("stackgroup");if(l){var f=r.xaxis+r.yaxis,h=s[f];h||(h=s[f]={});var v=h[l],m=!1;v?v.traces.push(r):(v=h[l]={traceIndices:[],traces:[r]},m=!0);for(var b={orientation:r.x&&!r.y?"h":"v"},T=0;T{"use strict";var VF=Ua(),HF=kf().hasColorscale,GF=hd(),yle=rs();ZF.exports=function(t,r,i,a,s,l){var f=yle.isBubble(t),h=(t.line||{}).color,v;if(l=l||{},h&&(i=h),s("marker.symbol"),s("marker.opacity",f?.7:1),s("marker.size"),l.noAngle||(s("marker.angle"),l.noAngleRef||s("marker.angleref"),l.noStandOff||s("marker.standoff")),s("marker.color",i),HF(t,"marker")&&GF(t,r,a,s,{prefix:"marker.",cLetter:"c"}),l.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),l.noLine||(h&&!Array.isArray(h)&&r.marker.color!==h?v=h:f?v=VF.background:v=VF.defaultLine,s("marker.line.color",v),HF(t,"marker.line")&&GF(t,r,a,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",f?1:0)),f&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),l.gradient){var m=s("marker.gradient.type");m!=="none"&&s("marker.gradient.color")}}});var D6=de((i2e,YF)=>{"use strict";var gle=Bt().isArrayOrTypedArray,_le=kf().hasColorscale,xle=hd();YF.exports=function(t,r,i,a,s,l){l||(l={});var f=(t.marker||{}).color;if(f&&f._inputArray&&(f=f._inputArray),s("line.color",i),_le(t,"line"))xle(t,r,a,s,{prefix:"line.",cLetter:"c"});else{var h=(gle(f)?!1:f)||i;s("line.color",h)}s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}});var XF=de((n2e,WF)=>{"use strict";WF.exports=function(t,r,i){var a=i("line.shape");a==="spline"&&i("line.smoothing")}});var z6=de((o2e,jF)=>{"use strict";var ble=Bt();jF.exports=function(e,t,r,i,a){a=a||{},i("textposition"),ble.coerceFont(i,"textfont",a.font||r.font,a),a.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}});var I6=de((s2e,KF)=>{"use strict";var Vx=Ua(),JF=Bt().isArrayOrTypedArray;function wle(e){for(var t=Vx.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var QF=Bt(),Tle=la(),Ale=kc(),Mle=dx(),em=rs(),Sle=IF(),kle=NF(),Cle=UF(),Ele=P6(),Lle=D6(),$F=XF(),Ple=z6(),Dle=I6(),zle=Bt().coercePattern;eq.exports=function(t,r,i,a){function s(S,C){return QF.coerce(t,r,Ale,S,C)}var l=Sle(t,r,a,s);if(l||(r.visible=!1),!!r.visible){kle(t,r,a,s),s("xhoverformat"),s("yhoverformat"),s("zorder");var f=Cle(t,r,a,s);a.scattermode==="group"&&r.orientation===void 0&&s("orientation","v");var h=!f&&l{"use strict";var Ile=ug().getAxisGroup;rq.exports=function(t,r,i,a,s){var l=r.orientation,f=r[{v:"x",h:"y"}[l]+"axis"],h=Ile(i,f)+l,v=i._alignmentOpts||{},m=a("alignmentgroup"),b=v[h];b||(b=v[h]={});var T=b[m];T?T.traces.push(r):T=b[m]={traces:[r],alignmentIndex:Object.keys(b).length,offsetGroups:{}};var S=a("offsetgroup")||"",C=T.offsetGroups,P=C[S];r._offsetIndex=0,(s!=="group"||S)&&(P||(P=C[S]={offsetIndex:Object.keys(C).length}),r._offsetIndex=P.offsetIndex)}});var nq=de((f2e,iq)=>{"use strict";var Rle=Bt(),Fle=aq(),qle=kc();iq.exports=function(t,r){var i,a,s,l=r.scattermode;function f(T){return Rle.coerce(a._input,a,qle,T)}if(r.scattermode==="group")for(s=0;s=0;m--){var b=t[m];if(b.type==="scatter"&&b.xaxis===h.xaxis&&b.yaxis===h.yaxis){b.opacity=void 0;break}}}}}});var sq=de((c2e,oq)=>{"use strict";var Nle=Bt(),Ble=z_();oq.exports=function(e,t){function r(a,s){return Nle.coerce(e,t,Ble,a,s)}var i=t.barmode==="group";t.scattermode==="group"&&r("scattergap",i?t.bargap:.2)}});var fq=de((h2e,uq)=>{"use strict";var Ole=Da(),lq=Bt(),Ule=lq.dateTime2ms,Hx=lq.incrementMonth,Vle=Hi(),Hle=Vle.ONEAVGMONTH;uq.exports=function(t,r,i,a){if(r.type!=="date")return{vals:a};var s=t[i+"periodalignment"];if(!s)return{vals:a};var l=t[i+"period"],f;if(Ole(l)){if(l=+l,l<=0)return{vals:a}}else if(typeof l=="string"&&l.charAt(0)==="M"){var h=+l.substring(1);if(h>0&&Math.round(h)===h)f=h;else return{vals:a}}for(var v=r.calendar,m=s==="start",b=s==="end",T=t[i+"period0"],S=Ule(T,v)||0,C=[],P=[],E=[],I=a.length,R=0;RN;)H=Hx(H,-f,v);for(;H<=N;)H=Hx(H,f,v);O=Hx(H,-f,v)}else{for(z=Math.round((N-S)/l),H=S+z*l;H>N;)H-=l;for(;H<=N;)H+=l;O=H-l}C[R]=m?O:b?H:(O+H)/2,P[R]=O,E[R]=H}return{vals:C,starts:P,ends:E}}});var q6=de((v2e,hq)=>{"use strict";var R6=kf().hasColorscale,F6=Hy(),cq=rs();hq.exports=function(t,r){cq.hasLines(r)&&R6(r,"line")&&F6(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),cq.hasMarkers(r)&&(R6(r,"marker")&&F6(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),R6(r,"marker.line")&&F6(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Ng=de((d2e,vq)=>{"use strict";var dn=Bt();vq.exports=function(t,r){for(var i=0;i{"use strict";var dq=Bt();pq.exports=function(t,r){dq.isArrayOrTypedArray(r.selectedpoints)&&dq.tagSelected(t,r)}});var V6=de((m2e,wq)=>{"use strict";var mq=Da(),B6=Bt(),Bg=Yi(),yq=fq(),N6=Hi().BADNUM,O6=rs(),Gle=q6(),Zle=Ng(),Yle=Gx();function Wle(e,t){var r=e._fullLayout,i=t._xA=Bg.getFromId(e,t.xaxis||"x","x"),a=t._yA=Bg.getFromId(e,t.yaxis||"y","y"),s=i.makeCalcdata(t,"x"),l=a.makeCalcdata(t,"y"),f=yq(t,i,"x",s),h=yq(t,a,"y",l),v=f.vals,m=h.vals,b=t._length,T=new Array(b),S=t.ids,C=U6(t,r,i,a),P=!1,E,I,R,N,z,O;xq(r,t);var H="x",V="y",W;if(C)B6.pushUnique(C.traceIndices,t.index),E=C.orientation==="v",E?(V="s",W="x"):(H="s",W="y"),z=C.stackgaps==="interpolate";else{var J=_q(t,b);gq(e,t,i,a,v,m,J)}var re=!!t.xperiodalignment,oe=!!t.yperiodalignment;for(I=0;II&&T[N].gap;)N--;for(O=T[N].s,R=T.length-1;R>N;R--)T[R].s=O;for(;I{"use strict";Tq.exports=Zx;var Xle=Bt().distinctVals;function Zx(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),a=[],s=0;s{"use strict";var ou=Da(),Wh=Bt().isArrayOrTypedArray,tm=Hi().BADNUM,jle=la(),Og=Yi(),Jle=ug().getAxisGroup,Yx=Aq();function Kle(e,t){for(var r=t.xaxis,i=t.yaxis,a=e._fullLayout,s=e._fullData,l=e.calcdata,f=[],h=[],v=0;vh+l||!ou(f))}for(var m=0;m{"use strict";var Lq=V6(),Pq=Eq().setGroupPositions;function uue(e,t){for(var r=t.xaxis,i=t.yaxis,a=e._fullLayout,s=e._fullData,l=e.calcdata,f=[],h=[],v=0;vJ[m]&&m{"use strict";var cue=_i(),qq=Hi(),Ug=qq.BADNUM,Nq=qq.LOG_CLIP,Iq=Nq+.5,Rq=Nq-.5,Wx=Bt(),hue=Wx.segmentsIntersect,Fq=Wx.constrain,X6=dx();Bq.exports=function(t,r){var i=r.trace||{},a=r.xaxis,s=r.yaxis,l=a.type==="log",f=s.type==="log",h=a._length,v=s._length,m=r.backoff,b=i.marker,T=r.connectGaps,S=r.baseTolerance,C=r.shape,P=C==="linear",E=i.fill&&i.fill!=="none",I=[],R=X6.minTolerance,N=t.length,z=new Array(N),O=0,H,V,W,J,re,oe,ne,fe,ve,ke,Ce,Te,pe,Ae,Se,Le;function Ke(Pt){var Fe=t[Pt];if(!Fe)return!1;var Ge=r.linearized?a.l2p(Fe.x):a.c2p(Fe.x),bt=r.linearized?s.l2p(Fe.y):s.c2p(Fe.y);if(Ge===Ug){if(l&&(Ge=a.c2p(Fe.x,!0)),Ge===Ug)return!1;f&&bt===Ug&&(Ge*=Math.abs(a._m*v*(a._m>0?Iq:Rq)/(s._m*h*(s._m>0?Iq:Rq)))),Ge*=1e3}if(bt===Ug){if(f&&(bt=s.c2p(Fe.y,!0)),bt===Ug)return!1;bt*=1e3}return[Ge,bt]}function ht(Pt,Fe,Ge,bt){var dt=Ge-Pt,gr=bt-Fe,Er=.5-Pt,Tr=.5-Fe,Hr=dt*dt+gr*gr,_a=dt*Er+gr*Tr;if(_a>0&&_a1||Math.abs(Er.y-Ge[0][1])>1)&&(Er=[Er.x,Er.y],bt&&_t(Er,Pt)<_t(Ge[0],Pt)?Ge.unshift(Er):Ge.push(Er),bt++)}return Ge}function Rt(Pt){if(Pt[0]kt||Pt[1]ge)return[Fq(Pt[0],At,kt),Fq(Pt[1],pt,ge)]}function Ut(Pt,Fe){if(Pt[0]===Fe[0]&&(Pt[0]===At||Pt[0]===kt)||Pt[1]===Fe[1]&&(Pt[1]===pt||Pt[1]===ge))return!0}function xt(Pt,Fe){var Ge=[],bt=Rt(Pt),dt=Rt(Fe);return bt&&dt&&Ut(bt,dt)||(bt&&Ge.push(bt),dt&&Ge.push(dt)),Ge}function Et(Pt,Fe,Ge){return function(bt,dt){var gr=Rt(bt),Er=Rt(dt),Tr=[];if(gr&&Er&&Ut(gr,Er))return Tr;gr&&Tr.push(gr),Er&&Tr.push(Er);var Hr=2*Wx.constrain((bt[Pt]+dt[Pt])/2,Fe,Ge)-((gr||bt)[Pt]+(Er||dt)[Pt]);if(Hr){var _a;gr&&Er?_a=Hr>0==gr[Pt]>Er[Pt]?gr:Er:_a=gr||Er,_a[Pt]+=Hr}return Tr}}var ir;C==="linear"||C==="spline"?ir=Ct:C==="hv"||C==="vh"?ir=xt:C==="hvh"?ir=Et(0,At,kt):C==="vhv"&&(ir=Et(1,pt,ge));function Wt(Pt,Fe){var Ge=Fe[0]-Pt[0],bt=(Fe[1]-Pt[1])/Ge,dt=(Pt[1]*Fe[0]-Fe[1]*Pt[0])/Ge;return dt>0?[bt>0?At:kt,ge]:[bt>0?kt:At,pt]}function Be(Pt){var Fe=Pt[0],Ge=Pt[1],bt=Fe===z[O-1][0],dt=Ge===z[O-1][1];if(!(bt&&dt))if(O>1){var gr=Fe===z[O-2][0],Er=Ge===z[O-2][1];bt&&(Fe===At||Fe===kt)&&gr?Er?O--:z[O-1]=Pt:dt&&(Ge===pt||Ge===ge)&&Er?gr?O--:z[O-1]=Pt:z[O++]=Pt}else z[O++]=Pt}function ft(Pt){z[O-1][0]!==Pt[0]&&z[O-1][1]!==Pt[1]&&Be([vt,tt]),Be(Pt),Nt=null,vt=tt=0}var mt=Wx.isArrayOrTypedArray(b);function Ar(Pt){if(Pt&&m&&(Pt.i=H,Pt.d=t,Pt.trace=i,Pt.marker=mt?b[Pt.i]:b,Pt.backoff=m),it=Pt[0]/h,lt=Pt[1]/v,xe=Pt[0]kt?kt:0,et=Pt[1]ge?ge:0,xe||et){if(!O)z[O++]=[xe||Pt[0],et||Pt[1]];else if(Nt){var Fe=ir(Nt,Pt);Fe.length>1&&(ft(Fe[0]),z[O++]=Fe[1])}else Mt=ir(z[O-1],Pt)[0],z[O++]=Mt;var Ge=z[O-1];xe&&et&&(Ge[0]!==xe||Ge[1]!==et)?(Nt&&(vt!==xe&&tt!==et?Be(vt&&tt?Wt(Nt,Pt):[vt||xe,tt||et]):vt&&tt&&Be([vt,tt])),Be([xe,et])):vt-xe&&tt-et&&Be([xe||vt,et||tt]),Nt=Pt,vt=xe,tt=et}else Nt&&ft(ir(Nt,Pt)[0]),z[O++]=Pt}for(H=0;HHe(oe,dr))break;W=oe,pe=ve[0]*fe[0]+ve[1]*fe[1],pe>Ce?(Ce=pe,J=oe,ne=!1):pe=t.length||!oe)break;Ar(oe),V=oe}}Nt&&Be([vt||Nt[0],tt||Nt[1]]),I.push(z.slice(0,O))}var Tt=C.slice(C.length-1);if(m&&Tt!=="h"&&Tt!=="v"){for(var wt=!1,Vt=-1,Kt=[],Ht=0;Ht{"use strict";var Uq={tonextx:1,tonexty:1,tonext:1};Vq.exports=function(t,r,i){var a,s,l,f,h,v={},m=!1,b=-1,T=0,S=-1;for(s=0;s=0?h=S:(h=S=T,T++),h{"use strict";var Vu=ja(),vue=la(),Vg=Bt(),am=Vg.ensureSingle,Zq=Vg.identity,pn=_i(),im=rs(),due=Oq(),pue=Hq(),Xx=lx().tester;Yq.exports=function(t,r,i,a,s,l){var f,h,v=!s,m=!!s&&s.duration>0,b=pue(t,r,i);if(f=a.selectAll("g.trace").data(b,function(S){return S[0].trace.uid}),f.enter().append("g").attr("class",function(S){return"trace scatter trace"+S[0].trace.uid}).style("stroke-miterlimit",2),f.order(),mue(t,f,r),m){l&&(h=l());var T=Vu.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()});T.each(function(){a.selectAll("g.trace").each(function(S,C){Gq(t,C,r,S,b,this,s)})})}else f.each(function(S,C){Gq(t,C,r,S,b,this,s)});v&&f.exit().remove(),a.selectAll("path:not([d])").remove()};function mue(e,t,r){t.each(function(i){var a=am(Vu.select(this),"g","fills");pn.setClipUrl(a,r.layerClipId,e);var s=i[0].trace,l=[];s._ownfill&&l.push("_ownFill"),s._nexttrace&&l.push("_nextFill");var f=a.selectAll("g").data(l,Zq);f.enter().append("g"),f.exit().each(function(h){s[h]=null}).remove(),f.order().each(function(h){s[h]=am(Vu.select(this),"path","js-fill")})})}function Gq(e,t,r,i,a,s,l){var f=e._context.staticPlot,h;yue(e,t,r,i,a);var v=!!l&&l.duration>0;function m(Et){return v?Et.transition():Et}var b=r.xaxis,T=r.yaxis,S=i[0].trace,C=S.line,P=Vu.select(s),E=am(P,"g","errorbars"),I=am(P,"g","lines"),R=am(P,"g","points"),N=am(P,"g","text");if(vue.getComponentMethod("errorbars","plot")(e,E,r,l),S.visible!==!0)return;m(P).style("opacity",S.opacity);var z,O,H=S.fill.charAt(S.fill.length-1);H!=="x"&&H!=="y"&&(H="");var V,W;H==="y"?(V=1,W=T.c2p(0,!0)):H==="x"&&(V=0,W=b.c2p(0,!0)),i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=P;var J="",re=[],oe=S._prevtrace,ne=null,fe=null;oe&&(J=oe._prevRevpath||"",O=oe._nextFill,re=oe._ownPolygons,ne=oe._fillsegments,fe=oe._fillElement);var ve,ke,Ce="",Te="",pe,Ae,Se,Le,Ke,ht,it=[];S._polygons=[];var lt=[],He=[],_t=Vg.noop;if(z=S._ownFill,im.hasLines(S)||S.fill!=="none"){O&&O.datum(i),["hv","vh","hvh","vhv"].indexOf(C.shape)!==-1?(pe=pn.steps(C.shape),Ae=pn.steps(C.shape.split("").reverse().join(""))):C.shape==="spline"?pe=Ae=function(Et){var ir=Et[Et.length-1];return Et.length>1&&Et[0][0]===ir[0]&&Et[0][1]===ir[1]?pn.smoothclosed(Et.slice(1),C.smoothing):pn.smoothopen(Et,C.smoothing)}:pe=Ae=function(Et){return"M"+Et.join("L")},Se=function(Et){return Ae(Et.reverse())},He=due(i,{xaxis:b,yaxis:T,trace:S,connectGaps:S.connectgaps,baseTolerance:Math.max(C.width||1,3)/4,shape:C.shape,backoff:C.backoff,simplify:C.simplify,fill:S.fill}),lt=new Array(He.length);var at=0;for(h=0;h=f[0]&&P.x<=f[1]&&P.y>=h[0]&&P.y<=h[1]}),T=Math.ceil(b.length/m),S=0;a.forEach(function(P,E){var I=P[0].trace;im.hasMarkers(I)&&I.marker.maxdisplayed>0&&E{"use strict";Xq.exports={container:"marker",min:"cmin",max:"cmax"}});var Jq=de((A2e,jq)=>{"use strict";var jx=Yi();jq.exports=function(t,r,i){var a={},s={_fullLayout:i},l=jx.getFromTrace(s,r,"x"),f=jx.getFromTrace(s,r,"y"),h=t.orig_x;h===void 0&&(h=t.x);var v=t.orig_y;return v===void 0&&(v=t.y),a.xLabel=jx.tickText(l,l.c2l(h),!0).text,a.yLabel=jx.tickText(f,f.c2l(v),!0).text,a}});var $6=de((M2e,Kq)=>{"use strict";var J6=ja(),nm=_i(),gue=la();function _ue(e){var t=J6.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var i=J6.select(this),a=r.trace||r[0].trace;K6(i,a,e)}),t.selectAll("g.text").each(function(r){var i=J6.select(this),a=r.trace||r[0].trace;Q6(i,a,e)}),t.selectAll("g.trace path.js-line").call(nm.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nm.fillGroupStyle,e,!1),gue.getComponentMethod("errorbars","style")(t)}function K6(e,t,r){nm.pointStyle(e.selectAll("path.point"),t,r)}function Q6(e,t,r){nm.textPointStyle(e.selectAll("text"),t,r)}function xue(e,t,r){var i=t[0].trace;i.selectedpoints?(nm.selectedPointStyle(r.selectAll("path.point"),i),nm.selectedTextStyle(r.selectAll("text"),i)):(K6(r,i,e),Q6(r,i,e))}Kq.exports={style:_ue,stylePoints:K6,styleText:Q6,styleOnSelect:xue}});var eT=de((S2e,Qq)=>{"use strict";var om=Ua(),bue=rs();Qq.exports=function(t,r){var i,a;if(t.mode==="lines")return i=t.line.color,i&&om.opacity(i)?i:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var s=r.mcc||(t.marker||{}).color,l=r.mlcc||((t.marker||{}).line||{}).color;return a=s&&om.opacity(s)?s:l&&om.opacity(l)&&(r.mlw||((t.marker||{}).line||{}).width)?l:"",a?om.opacity(a)<.3?om.addOpacity(a,.3):a:(i=(t.line||{}).color,i&&om.opacity(i)&&bue.hasLines(t)&&t.line.width?i:t.fillcolor)}});var tN=de((k2e,eN)=>{"use strict";var Jx=Bt(),$q=Rf(),wue=la(),Tue=eT(),tT=Ua(),Aue=Jx.fillText;eN.exports=function(t,r,i,a){var s=t.cd,l=s[0].trace,f=t.xa,h=t.ya,v=f.c2p(r),m=h.c2p(i),b=[v,m],T=l.hoveron||"",S=l.mode.indexOf("markers")!==-1?3:.5,C=!!l.xperiodalignment,P=!!l.yperiodalignment;if(T.indexOf("points")!==-1){var E=function(Te){if(C){var pe=f.c2p(Te.xStart),Ae=f.c2p(Te.xEnd);return v>=Math.min(pe,Ae)&&v<=Math.max(pe,Ae)?0:1/0}var Se=Math.max(3,Te.mrc||0),Le=1-1/Se,Ke=Math.abs(f.c2p(Te.x)-v);return Ke=Math.min(pe,Ae)&&m<=Math.max(pe,Ae)?0:1/0}var Se=Math.max(3,Te.mrc||0),Le=1-1/Se,Ke=Math.abs(h.c2p(Te.y)-m);return Keit!=ge>=it&&(At=_t[He-1][0],kt=_t[He][0],ge-pt&&(at=At+(kt-At)*(it-pt)/(ge-pt),Se=Math.min(Se,at),Le=Math.max(Le,at)));return Se=Math.max(Se,0),Le=Math.min(Le,f._length),{x0:Se,x1:Le,y0:it,y1:it}}if(T.indexOf("fills")!==-1&&l._fillElement){var ve=ne(l._fillElement)&&!ne(l._fillExclusionElement);if(ve){var ke=fe(l._polygons);ke===null&&(ke={x0:b[0],x1:b[0],y0:b[1],y1:b[1]});var Ce=tT.defaultLine;return tT.opacity(l.fillcolor)?Ce=l.fillcolor:tT.opacity((l.line||{}).color)&&(Ce=l.line.color),Jx.extendFlat(t,{distance:t.maxHoverDistance,x0:ke.x0,x1:ke.x1,y0:ke.y0,y1:ke.y1,color:Ce,hovertemplate:!1}),delete t.index,l.text&&!Jx.isArrayOrTypedArray(l.text)?t.text=String(l.text):t.text=l.name,[t]}}}});var iN=de((C2e,aN)=>{"use strict";var rN=rs();aN.exports=function(t,r){var i=t.cd,a=t.xaxis,s=t.yaxis,l=[],f=i[0].trace,h,v,m,b,T=!rN.hasMarkers(f)&&!rN.hasText(f);if(T)return[];if(r===!1)for(h=0;h{"use strict";nN.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var fN=de((L2e,uN)=>{"use strict";var Hg=la().traceIs,rT=T5();uN.exports=function(t,r,i,a){i("autotypenumbers",a.autotypenumbersDflt);var s=i("type",(a.splomStash||{}).type);s==="-"&&(Mue(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function Mue(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=i);var s=Sue(t,r,i);if(s){if(s.type==="histogram"&&i==={v:"y",h:"x"}[s.orientation||"v"]){e.type="linear";return}var l=i+"calendar",f=s[l],h={noMultiCategory:!Hg(s,"cartesian")||Hg(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&i==={h:"x",v:"y"}[s.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=e.autotypenumbers,lN(s,i)){var v=sN(s),m=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(lN(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function sN(e){return{v:"x",h:"y"}[e.orientation||"v"]}function lN(e,t){var r=sN(e),i=Hg(e,"box-violin"),a=Hg(e._fullInput||{},"candlestick");return i&&!a&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var hN=de((P2e,cN)=>{"use strict";var kue=il().isTypedArraySpec;function Cue(e,t){var r=t.dataAttr||e._id.charAt(0),i={},a,s,l;if(t.axData)a=t.axData;else for(a=[],s=0;s0||kue(s),f;l&&(f="array");var h=i("categoryorder",f),v;h==="array"&&(v=i("categoryarray")),!l&&h==="array"&&(h=r.categoryorder="trace"),h==="trace"?r._initialCategories=[]:h==="array"?r._initialCategories=v.slice():(v=Cue(r,a).sort(),h==="category ascending"?r._initialCategories=v:h==="category descending"&&(r._initialCategories=v.reverse()))}}});var pN=de((D2e,dN)=>{"use strict";var vN=Tf().mix,Eue=Af(),Lue=Bt();dN.exports=function(t,r,i,a){a=a||{};var s=a.dfltColor;function l(V,W){return Lue.coerce2(t,r,a.attributes,V,W)}var f=l("linecolor",s),h=l("linewidth"),v=i("showline",a.showLine||!!f||!!h);v||(delete r.linecolor,delete r.linewidth);var m=vN(s,a.bgColor,a.blend||Eue.lightFraction).toRgbString(),b=l("gridcolor",m),T=l("gridwidth"),S=l("griddash"),C=i("showgrid",a.showGrid||!!b||!!T||!!S);if(C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var P=vN(r.gridcolor,a.bgColor,67).toRgbString(),E=l("minor.gridcolor",P),I=l("minor.gridwidth",r.gridwidth||1),R=l("minor.griddash",r.griddash||"solid"),N=i("minor.showgrid",!!E||!!I||!!R);N||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var z=l("zerolinecolor",s),O=l("zerolinewidth"),H=i("zeroline",a.showGrid||!!z||!!O);H||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var iT=de((z2e,bN)=>{"use strict";var mN=Da(),Pue=la(),Gg=Bt(),Due=Di(),zue=Wl(),aT=Ru(),yN=Yw(),gN=Xw(),Iue=Kw(),Rue=Qw(),Fue=hN(),que=pN(),Nue=H5(),_N=i2(),Kx=Ao().WEEKDAY_PATTERN,Bue=Ao().HOUR_PATTERN;bN.exports=function(t,r,i,a,s){var l=a.letter,f=a.font||{},h=a.splomStash||{},v=i("visible",!a.visibleDflt),m=r._template||{},b=r.type||m.type||"-",T;if(b==="date"){var S=Pue.getComponentMethod("calendars","handleDefaults");S(t,r,"calendar",a.calendar),a.noTicklabelmode||(T=i("ticklabelmode"))}!a.noTicklabelindex&&(b==="date"||b==="linear")&&i("ticklabelindex");var C="";(!a.noTicklabelposition||b==="multicategory")&&(C=Gg.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:T==="period"?["outside","inside"]:l==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||i("ticklabeloverflow",C.indexOf("inside")!==-1?"hide past domain":b==="category"||b==="multicategory"?"allow":"hide past div"),_N(r,s),Nue(t,r,i,a),Fue(t,r,i,a),b!=="category"&&!a.noHover&&i("hoverformat");var P=i("color"),E=P!==aT.color.dflt?P:f.color,I=h.label||s._dfltTitle[l];if(Rue(t,r,i,b,a),!v)return r;i("title.text",I),Gg.coerceFont(i,"title.font",f,{overrideDflt:{size:Gg.bigFont(f.size),color:E}}),yN(t,r,i,b);var R=a.hasMinor;if(R&&(Due.newContainer(r,"minor"),yN(t,r,i,b,{isMinor:!0})),Iue(t,r,i,b,a),gN(t,r,i,a),R){var N=a.isMinor;a.isMinor=!0,gN(t,r,i,a),a.isMinor=N}que(t,r,i,{dfltColor:P,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:R,attributes:aT}),R&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&i("mirror");var z=b==="multicategory";if(!a.noTickson&&(b==="category"||z)&&(r.ticks||r.showgrid)){var O;z&&(O="boundaries");var H=i("tickson",O);H==="boundaries"&&delete r.ticklabelposition}if(z){var V=i("showdividers");V&&(i("dividercolor"),i("dividerwidth"))}if(b==="date")if(zue(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Oue}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var W=0;W=2){var l="",f,h;if(s.length===2){for(f=0;f<2;f++)if(h=xN(s[f]),h){l=Kx;break}}var v=i("pattern",l);if(v===Kx)for(f=0;f<2;f++)h=xN(s[f]),h&&(t.bounds[f]=s[f]=h-1);if(v)for(f=0;f<2;f++)switch(h=s[f],v){case Kx:if(!mN(h)){t.enabled=!1;return}if(h=+h,h!==Math.floor(h)||h<0||h>=7){t.enabled=!1;return}t.bounds[f]=s[f]=h;break;case Bue:if(!mN(h)){t.enabled=!1;return}if(h=+h,h<0||h>24){t.enabled=!1;return}t.bounds[f]=s[f]=h;break}if(r.autorange===!1){var m=r.range;if(m[0]m[1]){t.enabled=!1;return}}else if(s[0]>m[0]&&s[1]{"use strict";var Vue=Da(),Qx=Bt();wN.exports=function(t,r,i,a){var s=a.counterAxes||[],l=a.overlayableAxes||[],f=a.letter,h=a.grid,v=a.overlayingDomain,m,b,T,S,C,P;h&&(b=h._domains[f][h._axisMap[r._id]],m=h._anchors[r._id],b&&(T=h[f+"side"].split(" ")[0],S=h.domain[f][T==="right"||T==="top"?1:0])),b=b||[0,1],m=m||(Vue(t.position)?"free":s[0]||"free"),T=T||(f==="x"?"bottom":"left"),S=S||0,C=0,P=!1;var E=Qx.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(s),dflt:m}},"anchor"),I=Qx.coerce(t,r,{side:{valType:"enumerated",values:f==="x"?["bottom","top"]:["left","right"],dflt:T}},"side");if(E==="free"){if(f==="y"){var R=i("autoshift");R&&(S=I==="left"?v[0]:v[1],P=r.automargin?r.automargin:!0,C=I==="left"?-3:3),i("shift",C)}i("position",S)}i("automargin",P);var N=!1;if(l.length&&(N=Qx.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(l),dflt:!1}},"overlaying")),!N){var z=i("domain",b);z[0]>z[1]-1/4096&&(r.domain=b),Qx.noneOrAll(t.domain,r.domain,b),r.tickmode==="sync"&&(r.tickmode="auto")}return i("layer"),r}});var PN=de((R2e,LN)=>{"use strict";var Id=Bt(),TN=Ua(),Hue=bc().isUnifiedHover,Gue=y4(),AN=Di(),Zue=d0(),MN=Ru(),Yue=fN(),SN=iT(),Wue=ug(),kN=nT(),sT=$n(),Uf=sT.id2name,CN=sT.name2id,Xue=Ao().AX_ID_PATTERN,EN=la(),$x=EN.traceIs,oT=EN.getComponentMethod;function eb(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}LN.exports=function(t,r,i){var a=r.autotypenumbers,s={},l={},f={},h={},v={},m={},b={},T={},S={},C={},P,E;for(P=0;P{"use strict";var jue=ja(),DN=la(),tb=Bt(),cl=_i(),rb=Yi();zN.exports=function(t,r,i,a){var s=t._fullLayout;if(r.length===0){rb.redrawComponents(t);return}function l(E){var I=E.xaxis,R=E.yaxis;s._defs.select("#"+E.clipId+"> rect").call(cl.setTranslate,0,0).call(cl.setScale,1,1),E.plot.call(cl.setTranslate,I._offset,R._offset).call(cl.setScale,1,1);var N=E.plot.selectAll(".scatterlayer .trace");N.selectAll(".point").call(cl.setPointGroupScale,1,1),N.selectAll(".textpoint").call(cl.setTextPointsScale,1,1),N.call(cl.hideOutsideRangePoints,E)}function f(E,I){var R=E.plotinfo,N=R.xaxis,z=R.yaxis,O=N._length,H=z._length,V=!!E.xr1,W=!!E.yr1,J=[];if(V){var re=tb.simpleMap(E.xr0,N.r2l),oe=tb.simpleMap(E.xr1,N.r2l),ne=re[1]-re[0],fe=oe[1]-oe[0];J[0]=(re[0]*(1-I)+I*oe[0]-re[0])/(re[1]-re[0])*O,J[2]=O*(1-I+I*fe/ne),N.range[0]=N.l2r(re[0]*(1-I)+I*oe[0]),N.range[1]=N.l2r(re[1]*(1-I)+I*oe[1])}else J[0]=0,J[2]=O;if(W){var ve=tb.simpleMap(E.yr0,z.r2l),ke=tb.simpleMap(E.yr1,z.r2l),Ce=ve[1]-ve[0],Te=ke[1]-ke[0];J[1]=(ve[1]*(1-I)+I*ke[1]-ve[1])/(ve[0]-ve[1])*H,J[3]=H*(1-I+I*Te/Ce),z.range[0]=N.l2r(ve[0]*(1-I)+I*ke[0]),z.range[1]=z.l2r(ve[1]*(1-I)+I*ke[1])}else J[1]=0,J[3]=H;rb.drawOne(t,N,{skipTitle:!0}),rb.drawOne(t,z,{skipTitle:!0}),rb.redrawComponents(t,[N._id,z._id]);var pe=V?O/J[2]:1,Ae=W?H/J[3]:1,Se=V?J[0]:0,Le=W?J[1]:0,Ke=V?J[0]/J[2]*O:0,ht=W?J[1]/J[3]*H:0,it=N._offset-Ke,lt=z._offset-ht;R.clipRect.call(cl.setTranslate,Se,Le).call(cl.setScale,1/pe,1/Ae),R.plot.call(cl.setTranslate,it,lt).call(cl.setScale,pe,Ae),cl.setPointGroupScale(R.zoomScalePts,1/pe,1/Ae),cl.setTextPointsScale(R.zoomScaleTxt,1/pe,1/Ae)}var h;a&&(h=a());function v(){for(var E={},I=0;Ii.duration?(v(),S=window.cancelAnimationFrame(P)):S=window.requestAnimationFrame(P)}return b=Date.now(),S=window.requestAnimationFrame(P),Promise.resolve()}});var lT=de(Oo=>{"use strict";var ib=ja(),RN=la(),Rd=Bt(),Jue=eo(),Kue=_i(),FN=F_().getModuleCalcData,Xh=$n(),Hu=Ao(),Que=zh(),oi=Rd.ensureSingle;function ab(e,t,r){return Rd.ensureSingle(e,t,r,function(i){i.datum(r)})}var Fd=Hu.zindexSeparator;Oo.name="cartesian";Oo.attr=["xaxis","yaxis"];Oo.idRoot=["x","y"];Oo.idRegex=Hu.idRegex;Oo.attrRegex=Hu.attrRegex;Oo.attributes=oN();Oo.layoutAttributes=Ru();Oo.supplyLayoutDefaults=PN();Oo.transitionAxes=IN();Oo.finalizeSubplots=function(e,t){var r=t._subplots,i=r.xaxis,a=r.yaxis,s=r.cartesian,l=s,f={},h={},v,m,b;for(v=0;v0){var S=T.id;if(S.indexOf(Fd)!==-1)continue;S+=Fd+(v+1),T=Rd.extendFlat({},T,{id:S,plot:a._cartesianlayer.selectAll(".subplot").select("."+S)})}for(var C=[],P,E=0;E1&&(O+=Fd+z),N.push(f+O),l=0;l1,b=t.mainplotinfo;if(!t.mainplot||m)if(v)t.xlines=oi(i,"path","xlines-above"),t.ylines=oi(i,"path","ylines-above"),t.xaxislayer=oi(i,"g","xaxislayer-above"),t.yaxislayer=oi(i,"g","yaxislayer-above");else{if(!l){var T=oi(i,"g","layer-subplot");t.shapelayer=oi(T,"g","shapelayer"),t.imagelayer=oi(T,"g","imagelayer"),b&&m?(t.minorGridlayer=b.minorGridlayer,t.gridlayer=b.gridlayer,t.zerolinelayer=b.zerolinelayer):(t.minorGridlayer=oi(i,"g","minor-gridlayer"),t.gridlayer=oi(i,"g","gridlayer"),t.zerolinelayer=oi(i,"g","zerolinelayer"));var S=oi(i,"g","layer-between");t.shapelayerBetween=oi(S,"g","shapelayer"),t.imagelayerBetween=oi(S,"g","imagelayer"),oi(i,"path","xlines-below"),oi(i,"path","ylines-below"),t.overlinesBelow=oi(i,"g","overlines-below"),oi(i,"g","xaxislayer-below"),oi(i,"g","yaxislayer-below"),t.overaxesBelow=oi(i,"g","overaxes-below")}t.overplot=oi(i,"g","overplot"),t.plot=oi(t.overplot,"g",a),l||(t.xlines=oi(i,"path","xlines-above"),t.ylines=oi(i,"path","ylines-above"),t.overlinesAbove=oi(i,"g","overlines-above"),oi(i,"g","xaxislayer-above"),oi(i,"g","yaxislayer-above"),t.overaxesAbove=oi(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+f),t.ylines=i.select(".ylines-"+h),t.xaxislayer=i.select(".xaxislayer-"+f),t.yaxislayer=i.select(".yaxislayer-"+h))}else{var C=b.plotgroup,P=a+"-x",E=a+"-y";t.minorGridlayer=b.minorGridlayer,t.gridlayer=b.gridlayer,t.zerolinelayer=b.zerolinelayer,oi(b.overlinesBelow,"path",P),oi(b.overlinesBelow,"path",E),oi(b.overaxesBelow,"g",P),oi(b.overaxesBelow,"g",E),t.plot=oi(b.overplot,"g",a),oi(b.overlinesAbove,"path",P),oi(b.overlinesAbove,"path",E),oi(b.overaxesAbove,"g",P),oi(b.overaxesAbove,"g",E),t.xlines=C.select(".overlines-"+f).select("."+P),t.ylines=C.select(".overlines-"+h).select("."+E),t.xaxislayer=C.select(".overaxes-"+f).select("."+P),t.yaxislayer=C.select(".overaxes-"+h).select("."+E)}l||(v||(ab(t.minorGridlayer,"g",t.xaxis._id),ab(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(I){return I[0]}).sort(Xh.idSort),ab(t.gridlayer,"g",t.xaxis._id),ab(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(I){return I[0]}).sort(Xh.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function BN(e,t){if(e){var r={};e.each(function(h){var v=h[0],m=ib.select(this);m.remove(),ON(v,t),r[v]=!0});for(var i in t._plots)for(var a=t._plots[i],s=a.overlays||[],l=0;l{"use strict";var nb=rs();UN.exports={hasLines:nb.hasLines,hasMarkers:nb.hasMarkers,hasText:nb.hasText,isBubble:nb.isBubble,attributes:kc(),layoutAttributes:z_(),supplyDefaults:tq(),crossTraceDefaults:nq(),supplyLayoutDefaults:sq(),calc:V6().calc,crossTraceCalc:zq(),arraysToCalcdata:Ng(),plot:Wq(),colorbar:j6(),formatLabels:Jq(),style:$6().style,styleOnSelect:$6().styleOnSelect,hoverPoints:tN(),selectPoints:iN(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:lT(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var ZN=de((B2e,GN)=>{"use strict";var efe=ja(),tfe=Ua(),HN=n6(),uT=Bt(),rfe=uT.strScale,afe=uT.strRotate,ife=uT.strTranslate;GN.exports=function(t,r,i){var a=t.node(),s=HN[i.arrowhead||0],l=HN[i.startarrowhead||0],f=(i.arrowwidth||1)*(i.arrowsize||1),h=(i.arrowwidth||1)*(i.startarrowsize||1),v=r.indexOf("start")>=0,m=r.indexOf("end")>=0,b=s.backoff*f+i.standoff,T=l.backoff*h+i.startstandoff,S,C,P,E;if(a.nodeName==="line"){S={x:+t.attr("x1"),y:+t.attr("y1")},C={x:+t.attr("x2"),y:+t.attr("y2")};var I=S.x-C.x,R=S.y-C.y;if(P=Math.atan2(R,I),E=P+Math.PI,b&&T&&b+T>Math.sqrt(I*I+R*R)){ve();return}if(b){if(b*b>I*I+R*R){ve();return}var N=b*Math.cos(P),z=b*Math.sin(P);C.x+=N,C.y+=z,t.attr({x2:C.x,y2:C.y})}if(T){if(T*T>I*I+R*R){ve();return}var O=T*Math.cos(P),H=T*Math.sin(P);S.x-=O,S.y-=H,t.attr({x1:S.x,y1:S.y})}}else if(a.nodeName==="path"){var V=a.getTotalLength(),W="";if(V{"use strict";var YN=ja(),fT=la(),nfe=eo(),Jh=Bt(),cT=Jh.strTranslate,Yg=Yi(),qd=Ua(),Ec=_i(),WN=Rf(),hT=co(),vT=Oh(),Zg=jl(),ofe=Di().arrayEditor,sfe=ZN();JN.exports={draw:lfe,drawOne:XN,drawRaw:jN};function lfe(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?dt="right":dt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[dt]}for(var pt=!1,ge=["x","y"],Re=0;Re1)&&(vt===et?(dr=tt.r2fraction(t["a"+xe]),(dr<0||dr>1)&&(pt=!0)):pt=!0),ir=tt._offset+tt.r2p(t[xe]),ft=.5}else{var Tt=Ar==="domain";xe==="x"?(Be=t[xe],ir=Tt?tt._offset+tt._length*Be:ir=f.l+f.w*Be):(Be=1-t[xe],ir=Tt?tt._offset+tt._length*Be:ir=f.t+f.h*Be),ft=t.showarrow?.5:Be}if(t.showarrow){Et.head=ir;var wt=t["a"+xe];if(mt=Mt*kt(.5,t.xanchor)-Ct*kt(.5,t.yanchor),vt===et){var Vt=Yg.getRefType(vt);Vt==="domain"?(xe==="y"&&(wt=1-wt),Et.tail=tt._offset+tt._length*wt):Vt==="paper"?xe==="y"?(wt=1-wt,Et.tail=f.t+f.h*wt):Et.tail=f.l+f.w*wt:Et.tail=tt._offset+tt.r2p(wt),Wt=mt}else Et.tail=ir+wt,Wt=mt+wt;Et.text=Et.tail+mt;var Kt=l[xe==="x"?"width":"height"];if(et==="paper"&&(Et.head=Jh.constrain(Et.head,1,Kt-1)),vt==="pixel"){var Ht=-Math.max(Et.tail-3,Et.text),Ot=Math.min(Et.tail+3,Et.text)-Kt;Ht>0?(Et.tail+=Ht,Et.text+=Ht):Ot>0&&(Et.tail-=Ot,Et.text-=Ot)}Et.tail+=xt,Et.head+=xt}else mt=Rt*kt(ft,Ut),Wt=mt,Et.text=ir+mt;Et.text+=xt,mt+=xt,Wt+=xt,t["_"+xe+"padplus"]=Rt/2+Wt,t["_"+xe+"padminus"]=Rt/2-Wt,t["_"+xe+"size"]=Rt,t["_"+xe+"shift"]=mt}if(pt){V.remove();return}var er=0,Mr=0;if(t.align!=="left"&&(er=(He-it)*(t.align==="center"?.5:1)),t.valign!=="top"&&(Mr=(_t-lt)*(t.valign==="middle"?.5:1)),Ke)Le.select("svg").attr({x:re+er-1,y:re+Mr}).call(Ec.setClipUrl,ne?P:null,e);else{var xr=re+Mr-ht.top,Pt=re+er-ht.left;Ce.call(hT.positionText,Pt,xr).call(Ec.setClipUrl,ne?P:null,e)}fe.select("rect").call(Ec.setRect,re,re,He,_t),oe.call(Ec.setRect,W/2,W/2,at-W,At-W),V.call(Ec.setTranslate,Math.round(E.x.text-at/2),Math.round(E.y.text-At/2)),N.attr({transform:"rotate("+I+","+E.x.text+","+E.y.text+")"});var Fe=function(bt,dt){R.selectAll(".annotation-arrow-g").remove();var gr=E.x.head,Er=E.y.head,Tr=E.x.tail+bt,Hr=E.y.tail+dt,_a=E.x.text+bt,ka=E.y.text+dt,Ea=Jh.rotationXYMatrix(I,_a,ka),Ri=Jh.apply2DTransform(Ea),Ki=Jh.apply2DTransform2(Ea),yn=+oe.attr("width"),Xi=+oe.attr("height"),jn=_a-.5*yn,En=jn+yn,Vi=ka-.5*Xi,pa=Vi+Xi,Gr=[[jn,Vi,jn,pa],[jn,pa,En,pa],[En,pa,En,Vi],[En,Vi,jn,Vi]].map(Ki);if(!Gr.reduce(function(Ve,yt){return Ve^!!Jh.segmentsIntersect(gr,Er,gr+1e6,Er+1e6,yt[0],yt[1],yt[2],yt[3])},!1)){Gr.forEach(function(Ve){var yt=Jh.segmentsIntersect(Tr,Hr,gr,Er,Ve[0],Ve[1],Ve[2],Ve[3]);yt&&(Tr=yt.x,Hr=yt.y)});var Qa=t.arrowwidth,Zr=t.arrowcolor,vi=t.arrowside,ya=R.append("g").style({opacity:qd.opacity(Zr)}).classed("annotation-arrow-g",!0),le=ya.append("path").attr("d","M"+Tr+","+Hr+"L"+gr+","+Er).style("stroke-width",Qa+"px").call(qd.stroke,qd.rgb(Zr));if(sfe(le,vi,t),h.annotationPosition&&le.node().parentNode&&!i){var ee=gr,se=Er;if(t.standoff){var ce=Math.sqrt(Math.pow(gr-Tr,2)+Math.pow(Er-Hr,2));ee+=t.standoff*(Tr-gr)/ce,se+=t.standoff*(Hr-Er)/ce}var Ee=ya.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Tr-ee)+","+(Hr-se),transform:cT(ee,se)}).style("stroke-width",Qa+6+"px").call(qd.stroke,"rgba(0,0,0,0)").call(qd.fill,"rgba(0,0,0,0)"),Ne,rt;Zg.init({element:Ee.node(),gd:e,prepFn:function(){var Ve=Ec.getTranslate(V);Ne=Ve.x,rt=Ve.y,a&&a.autorange&&T(a._name+".autorange",!0),s&&s.autorange&&T(s._name+".autorange",!0)},moveFn:function(Ve,yt){var Dt=Ri(Ne,rt),Ft=Dt[0]+Ve,tr=Dt[1]+yt;V.call(Ec.setTranslate,Ft,tr),S("x",jh(a,Ve,"x",f,t)),S("y",jh(s,yt,"y",f,t)),t.axref===t.xref&&S("ax",jh(a,Ve,"ax",f,t)),t.ayref===t.yref&&S("ay",jh(s,yt,"ay",f,t)),ya.attr("transform",cT(Ve,yt)),N.attr({transform:"rotate("+I+","+Ft+","+tr+")"})},doneFn:function(){fT.call("_guiRelayout",e,C());var Ve=document.querySelector(".js-notes-box-panel");Ve&&Ve.redraw(Ve.selectedObj)}})}}};if(t.showarrow&&Fe(0,0),z){var Ge;Zg.init({element:V.node(),gd:e,prepFn:function(){Ge=N.attr("transform")},moveFn:function(bt,dt){var gr="pointer";if(t.showarrow)t.axref===t.xref?S("ax",jh(a,bt,"ax",f,t)):S("ax",t.ax+bt),t.ayref===t.yref?S("ay",jh(s,dt,"ay",f.w,t)):S("ay",t.ay+dt),Fe(bt,dt);else{if(i)return;var Er,Tr;if(a)Er=jh(a,bt,"x",f,t);else{var Hr=t._xsize/f.w,_a=t.x+(t._xshift-t.xshift)/f.w-Hr/2;Er=Zg.align(_a+bt/f.w,Hr,0,1,t.xanchor)}if(s)Tr=jh(s,dt,"y",f,t);else{var ka=t._ysize/f.h,Ea=t.y-(t._yshift+t.yshift)/f.h-ka/2;Tr=Zg.align(Ea-dt/f.h,ka,0,1,t.yanchor)}S("x",Er),S("y",Tr),(!a||!s)&&(gr=Zg.getCursor(a?.5:Er,s?.5:Tr,t.xanchor,t.yanchor))}N.attr({transform:cT(bt,dt)+Ge}),vT(V,gr)},clickFn:function(bt,dt){t.captureevents&&e.emit("plotly_clickannotation",H(dt))},doneFn:function(){vT(V),fT.call("_guiRelayout",e,C());var bt=document.querySelector(".js-notes-box-panel");bt&&bt.redraw(bt.selectedObj)}})}}h.annotationText?Ce.call(hT.makeEditable,{delegate:V,gd:e}).call(Te).on("edit",function(Ae){t.text=Ae,this.call(Te),S("text",Ae),a&&a.autorange&&T(a._name+".autorange",!0),s&&s.autorange&&T(s._name+".autorange",!0),fT.call("_guiRelayout",e,C())}):Ce.call(Te)}});var rB=de((U2e,tB)=>{"use strict";var KN=Bt(),ufe=la(),QN=Di().arrayEditor;tB.exports={hasClickToShow:ffe,onClick:cfe};function ffe(e,t){var r=eB(e,t);return r.on.length>0||r.explicitOff.length>0}function cfe(e,t){var r=eB(e,t),i=r.on,a=r.off.concat(r.explicitOff),s={},l=e._fullLayout.annotations,f,h;if(i.length||a.length){for(f=0;f{"use strict";var dT=Bt(),sm=Ua();aB.exports=function(t,r,i,a){a("opacity");var s=a("bgcolor"),l=a("bordercolor"),f=sm.opacity(l);a("borderpad");var h=a("borderwidth"),v=a("showarrow");a("text",v?" ":i._dfltTitle.annotation),a("textangle"),dT.coerceFont(a,"font",i.font),a("width"),a("align");var m=a("height");if(m&&a("valign"),v){var b=a("arrowside"),T,S;b.indexOf("end")!==-1&&(T=a("arrowhead"),S=a("arrowsize")),b.indexOf("start")!==-1&&(a("startarrowhead",T),a("startarrowsize",S)),a("arrowcolor",f?r.bordercolor:sm.defaultLine),a("arrowwidth",(f&&h||1)*2),a("standoff"),a("startstandoff")}var C=a("hovertext"),P=i.hoverlabel||{};if(C){var E=a("hoverlabel.bgcolor",P.bgcolor||(sm.opacity(s)?sm.rgb(s):sm.defaultLine)),I=a("hoverlabel.bordercolor",P.bordercolor||sm.contrast(E)),R=dT.extendFlat({},P.font);R.color||(R.color=I),dT.coerceFont(a,"hoverlabel.font",R)}a("captureevents",!!C)}});var nB=de((H2e,iB)=>{"use strict";var mT=Bt(),Nd=Yi(),hfe=Wl(),vfe=pT(),dfe=Q0();iB.exports=function(t,r){hfe(t,r,{name:"annotations",handleItemDefaults:pfe})};function pfe(e,t,r){function i(N,z){return mT.coerce(e,t,dfe,N,z)}var a=i("visible"),s=i("clicktoshow");if(a||s){vfe(e,t,r,i);for(var l=t.showarrow,f=["x","y"],h=[-10,-30],v={_fullLayout:r},m=0;m<2;m++){var b=f[m],T=Nd.coerceRef(e,t,v,b,"","paper");if(T!=="paper"){var S=Nd.getFromId(v,T);S._annIndices.push(t._index)}if(Nd.coercePosition(t,v,i,T,b,.5),l){var C="a"+b,P=Nd.coerceRef(e,t,v,C,"pixel",["pixel","paper"]);P!=="pixel"&&P!==T&&(P=t[C]="pixel");var E=P==="pixel"?h[m]:.4;Nd.coercePosition(t,v,i,P,C,E)}i(b+"anchor"),i(b+"shift")}if(mT.noneOrAll(e,t,["x","y"]),l&&mT.noneOrAll(e,t,["ax","ay"]),s){var I=i("xclick"),R=i("yclick");t._xclick=I===void 0?t.x:Nd.cleanPosition(I,v,t.xref),t._yclick=R===void 0?t.y:Nd.cleanPosition(R,v,t.yref)}}}});var lB=de((G2e,sB)=>{"use strict";var yT=Bt(),Bd=Yi(),mfe=ob().draw;sB.exports=function(t){var r=t._fullLayout,i=yT.filterVisible(r.annotations);if(i.length&&t._fullData.length)return yT.syncOrAsync([mfe,yfe],t)};function yfe(e){var t=e._fullLayout;yT.filterVisible(t.annotations).forEach(function(r){var i=Bd.getFromId(e,r.xref),a=Bd.getFromId(e,r.yref),s=Bd.getRefType(r.xref),l=Bd.getRefType(r.yref);r._extremes={},s==="range"&&oB(r,i),l==="range"&&oB(r,a)})}function oB(e,t){var r=t._id,i=r.charAt(0),a=e[i],s=e["a"+i],l=e[i+"ref"],f=e["a"+i+"ref"],h=e["_"+i+"padplus"],v=e["_"+i+"padminus"],m={x:1,y:-1}[i]*e[i+"shift"],b=3*e.arrowsize*e.arrowwidth||0,T=b+m,S=b-m,C=3*e.startarrowsize*e.arrowwidth||0,P=C+m,E=C-m,I;if(f===l){var R=Bd.findExtremes(t,[t.r2c(a)],{ppadplus:T,ppadminus:S}),N=Bd.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(h,P),ppadminus:Math.max(v,E)});I={min:[R.min[0],N.min[0]],max:[R.max[0],N.max[0]]}}else P=s?P+s:P,E=s?E-s:E,I=Bd.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(h,T,P),ppadminus:Math.max(v,S,E)});e._extremes[r]=I}});var fB=de((Z2e,uB)=>{"use strict";var gfe=Da(),_fe=J1();uB.exports=function(t,r,i,a){r=r||{};var s=i==="log"&&r.type==="linear",l=i==="linear"&&r.type==="log";if(!(s||l))return;var f=t._fullLayout.annotations,h=r._id.charAt(0),v,m;function b(S){var C=v[S],P=null;s?P=_fe(C,r.range):P=Math.pow(10,C),gfe(P)||(P=null),a(m+S,P)}for(var T=0;T{"use strict";var gT=ob(),cB=rB();hB.exports={moduleType:"component",name:"annotations",layoutAttributes:Q0(),supplyLayoutDefaults:nB(),includeBasePlot:Sg()("annotations"),calcAutorange:lB(),draw:gT.draw,drawOne:gT.drawOne,drawRaw:gT.drawRaw,hasClickToShow:cB.hasClickToShow,onClick:cB.onClick,convertCoords:fB()}});var sb=de((W2e,dB)=>{"use strict";var Ni=Q0(),xfe=nl().overrideAll,bfe=Di().templatedArray;dB.exports=xfe(bfe("annotation",{visible:Ni.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ni.xanchor,xshift:Ni.xshift,yanchor:Ni.yanchor,yshift:Ni.yshift,text:Ni.text,textangle:Ni.textangle,font:Ni.font,width:Ni.width,height:Ni.height,opacity:Ni.opacity,align:Ni.align,valign:Ni.valign,bgcolor:Ni.bgcolor,bordercolor:Ni.bordercolor,borderpad:Ni.borderpad,borderwidth:Ni.borderwidth,showarrow:Ni.showarrow,arrowcolor:Ni.arrowcolor,arrowhead:Ni.arrowhead,startarrowhead:Ni.startarrowhead,arrowside:Ni.arrowside,arrowsize:Ni.arrowsize,startarrowsize:Ni.startarrowsize,arrowwidth:Ni.arrowwidth,standoff:Ni.standoff,startstandoff:Ni.startstandoff,hovertext:Ni.hovertext,hoverlabel:Ni.hoverlabel,captureevents:Ni.captureevents}),"calc","from-root")});var mB=de((X2e,pB)=>{"use strict";var _T=Bt(),wfe=Yi(),Tfe=Wl(),Afe=pT(),Mfe=sb();pB.exports=function(t,r,i){Tfe(t,r,{name:"annotations",handleItemDefaults:Sfe,fullLayout:i.fullLayout})};function Sfe(e,t,r,i){function a(f,h){return _T.coerce(e,t,Mfe,f,h)}function s(f){var h=f+"axis",v={_fullLayout:{}};return v._fullLayout[h]=r[h],wfe.coercePosition(t,v,a,f,f,.5)}var l=a("visible");l&&(Afe(e,t,i.fullLayout,a),s("x"),s("y"),s("z"),_T.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),_T.noneOrAll(e,t,["ax","ay"])))}});var xB=de((j2e,_B)=>{"use strict";var yB=Bt(),gB=Yi();_B.exports=function(t){for(var r=t.fullSceneLayout,i=r.annotations,a=0;a{"use strict";function xT(e,t){var r=[0,0,0,0],i,a;for(i=0;i<4;++i)for(a=0;a<4;++a)r[a]+=e[4*i+a]*t[i];return r}function Cfe(e,t){var r=xT(e.projection,xT(e.view,xT(e.model,[t[0],t[1],t[2],1])));return r}bB.exports=Cfe});var AB=de((K2e,TB)=>{"use strict";var Efe=ob().drawRaw,Lfe=wB(),Pfe=["x","y","z"];TB.exports=function(t){for(var r=t.fullSceneLayout,i=t.dataScale,a=r.annotations,s=0;s1){f=!0;break}}f?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=Lfe(t.glplot.cameraParams,[r.xaxis.r2l(l.x)*i[0],r.yaxis.r2l(l.y)*i[1],r.zaxis.r2l(l.z)*i[2]]),Efe(t.graphDiv,l,s,t.id,l._xa,l._ya))}}});var kB=de((Q2e,SB)=>{"use strict";var Dfe=la(),MB=Bt();SB.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:sb()}}},layoutAttributes:sb(),handleDefaults:mB(),includeBasePlot:zfe,convert:xB(),draw:AB()};function zfe(e,t){var r=Dfe.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,a=Object.keys(e),s=0;s{"use strict";var CB=Q0(),EB=qo(),LB=kc().line,Ife=hc().dash,Gu=hn().extendFlat,Rfe=Di().templatedArray,$2e=Mg(),lm=ms(),Ffe=Hl().shapeTexttemplateAttrs,qfe=f_();PB.exports=Rfe("shape",{visible:Gu({},lm.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Gu({},lm.legend,{editType:"calc+arraydraw"}),legendgroup:Gu({},lm.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Gu({},lm.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:EB({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Gu({},lm.legendrank,{editType:"calc+arraydraw"}),legendwidth:Gu({},lm.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:Gu({},CB.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:Gu({},CB.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:Gu({},LB.color,{editType:"arraydraw"}),width:Gu({},LB.width,{editType:"calc+arraydraw"}),dash:Gu({},Ife,{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:Ffe({},{keys:Object.keys(qfe)}),font:EB({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 IB=de((txe,zB)=>{"use strict";var Wg=Bt(),um=Yi(),Nfe=Wl(),Bfe=bT(),DB=Hh();zB.exports=function(t,r){Nfe(t,r,{name:"shapes",handleItemDefaults:Ufe})};function Ofe(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Ufe(e,t,r){function i(Ae,Se){return Wg.coerce(e,t,Bfe,Ae,Se)}t._isShape=!0;var a=i("visible");if(a){var s=i("showlegend");s&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),Wg.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var l=i("path"),f=l?"path":"rect",h=i("type",f),v=h!=="path";v&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var m=i("line.width");m&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),T=i("ysizemode"),S=["x","y"],C=0;C<2;C++){var P=S[C],E=P+"anchor",I=P==="x"?b:T,R={_fullLayout:r},N,z,O,H=um.coerceRef(e,t,R,P,void 0,"paper"),V=um.getRefType(H);if(V==="range"?(N=um.getFromId(R,H),N._shapeIndices.push(t._index),O=DB.rangeToShapePosition(N),z=DB.shapePositionToRange(N),(N.type==="category"||N.type==="multicategory")&&(i(P+"0shift"),i(P+"1shift"))):z=O=Wg.identity,v){var W=.25,J=.75,re=P+"0",oe=P+"1",ne=e[re],fe=e[oe];e[re]=z(e[re],!0),e[oe]=z(e[oe],!0),I==="pixel"?(i(re,0),i(oe,10)):(um.coercePosition(t,R,i,H,re,W),um.coercePosition(t,R,i,H,oe,J)),t[re]=O(t[re]),t[oe]=O(t[oe]),e[re]=ne,e[oe]=fe}if(I==="pixel"){var ve=e[E];e[E]=z(e[E],!0),um.coercePosition(t,R,i,H,E,.25),t[E]=O(t[E]),e[E]=ve}}v&&Wg.noneOrAll(e,t,["x0","x1","y0","y1"]);var ke=h==="line",Ce,Te;if(v&&(Ce=i("label.texttemplate")),Ce||(Te=i("label.text")),Te||Ce){i("label.textangle");var pe=i("label.textposition",ke?"middle":"middle center");i("label.xanchor"),i("label.yanchor",Ofe(ke,pe)),i("label.padding"),Wg.coerceFont(i,"label.font",r.font)}}}});var qB=de((rxe,FB)=>{"use strict";var Vfe=Ua(),RB=Bt();function Hfe(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}FB.exports=function(t,r,i){i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),RB.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity");var a=i("newshape.line.width");if(a){var s=(t||{}).plot_bgcolor||"#FFF";i("newshape.line.color",Vfe.contrast(s)),i("newshape.line.dash")}var l=t.dragmode==="drawline",f=i("newshape.label.text"),h=i("newshape.label.texttemplate");if(f||h){i("newshape.label.textangle");var v=i("newshape.label.textposition",l?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",Hfe(l,v)),i("newshape.label.padding"),RB.coerceFont(i,"newshape.label.font",r.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}});var VB=de((axe,UB)=>{"use strict";var wT=Bt(),fm=Yi(),cm=ng(),BB=Hh();UB.exports=function(t){var r=t._fullLayout,i=wT.filterVisible(r.shapes);if(!(!i.length||!t._fullData.length))for(var a=0;a0?v+l:l;return{ppad:l,ppadplus:f?b:T,ppadminus:f?T:b}}else return{ppad:l}}function NB(e,t,r){var i=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",s,l,f=0,h=0,v=a?e.r2c:e.d2c,m=t[i+"sizemode"]==="scaled";if(m?(s=t[i+"0"],l=t[i+"1"],a&&(f=t[i+"0shift"],h=t[i+"1shift"])):(s=t[i+"anchor"],l=t[i+"anchor"]),s!==void 0)return[v(s)+f,v(l)+h];if(t.path){var b=1/0,T=-1/0,S=t.path.match(cm.segmentRE),C,P,E,I,R;for(e.type==="date"&&(v=BB.decodeDate(v)),C=0;CT&&(T=R)));if(T>=b)return[b,T]}}});var ZB=de((ixe,GB)=>{"use strict";var HB=J2();GB.exports={moduleType:"component",name:"shapes",layoutAttributes:bT(),supplyLayoutDefaults:IB(),supplyDrawNewShapeDefaults:qB(),includeBasePlot:Sg()("shapes"),calcAutorange:VB(),draw:HB.draw,drawOne:HB.drawOne}});var TT=de((oxe,WB)=>{"use strict";var YB=Ao(),Yfe=Di().templatedArray,nxe=Mg();WB.exports=Yfe("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",YB.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",YB.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var jB=de((sxe,XB)=>{"use strict";var Wfe=Bt(),AT=Yi(),Xfe=Wl(),jfe=TT(),Jfe="images";XB.exports=function(t,r){var i={name:Jfe,handleItemDefaults:Kfe};Xfe(t,r,i)};function Kfe(e,t,r){function i(T,S){return Wfe.coerce(e,t,jfe,T,S)}var a=i("source"),s=i("visible",!!a);if(!s)return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var l={_fullLayout:r},f=["x","y"],h=0;h<2;h++){var v=f[h],m=AT.coerceRef(e,t,l,v,"paper",void 0);if(m!=="paper"){var b=AT.getFromId(l,m);b._imgIndices.push(t._index)}AT.coercePosition(t,l,i,m,v,0)}return t}});var $B=de((lxe,QB)=>{"use strict";var JB=ja(),Qfe=_i(),hm=Yi(),KB=$n(),$fe=zh();QB.exports=function(t){var r=t._fullLayout,i=[],a={},s=[],l,f;for(f=0;f{"use strict";var eO=Da(),ece=J1();tO.exports=function(t,r,i,a){r=r||{};var s=i==="log"&&r.type==="linear",l=i==="linear"&&r.type==="log";if(s||l){for(var f=t._fullLayout.images,h=r._id.charAt(0),v,m,b=0;b{"use strict";aO.exports={moduleType:"component",name:"images",layoutAttributes:TT(),supplyLayoutDefaults:jB(),includeBasePlot:Sg()("images"),draw:$B(),convertCoords:rO()}});var lb=de((cxe,nO)=>{"use strict";nO.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 MT=de((hxe,sO)=>{"use strict";var tce=qo(),rce=Af(),ace=hn().extendFlat,ice=nl().overrideAll,nce=c_(),oO=Di().templatedArray,oce=oO("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}});sO.exports=ice(oO("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:oce,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:ace(nce({editType:"arraydraw"}),{}),font:tce({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:rce.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var cO=de((vxe,fO)=>{"use strict";var ub=Bt(),lO=Wl(),uO=MT(),sce=lb(),lce=sce.name,uce=uO.buttons;fO.exports=function(t,r){var i={name:lce,handleItemDefaults:fce};lO(t,r,i)};function fce(e,t,r){function i(l,f){return ub.coerce(e,t,uO,l,f)}var a=lO(e,t,{name:"buttons",handleItemDefaults:cce}),s=i("visible",a.length>0);s&&(i("active"),i("direction"),i("type"),i("showactive"),i("x"),i("y"),ub.noneOrAll(e,t,["x","y"]),i("xanchor"),i("yanchor"),i("pad.t"),i("pad.r"),i("pad.b"),i("pad.l"),ub.coerceFont(i,"font",r.font),i("bgcolor",r.paper_bgcolor),i("bordercolor"),i("borderwidth"))}function cce(e,t){function r(a,s){return ub.coerce(e,t,uce,a,s)}var i=r("visible",e.method==="skip"||Array.isArray(e.args));i&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var dO=de((dxe,vO)=>{"use strict";vO.exports=rn;var Zu=ja(),hO=Ua(),vm=_i(),fb=Bt();function rn(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})}rn.barWidth=2;rn.barLength=20;rn.barRadius=2;rn.barPad=1;rn.barColor="#808BA4";rn.prototype.enable=function(t,r,i){var a=this.gd._fullLayout,s=a.width,l=a.height;this.position=t;var f=this.position.l,h=this.position.w,v=this.position.t,m=this.position.h,b=this.position.direction,T=b==="down",S=b==="left",C=b==="right",P=b==="up",E=h,I=m,R,N,z,O;!T&&!S&&!C&&!P&&(this.position.direction="down",T=!0);var H=T||P;H?(R=f,N=R+E,T?(z=v,O=Math.min(z+I,l),I=O-z):(O=v+I,z=Math.max(O-I,0),I=O-z)):(z=v,O=z+I,S?(N=f+E,R=Math.max(N-E,0),E=N-R):(R=f,N=Math.min(R+E,s),E=N-R)),this._box={l:R,t:z,w:E,h:I};var V=h>E,W=rn.barLength+2*rn.barPad,J=rn.barWidth+2*rn.barPad,re=f,oe=v+m;oe+J>l&&(oe=l-J);var ne=this.container.selectAll("rect.scrollbar-horizontal").data(V?[0]:[]);ne.exit().on(".drag",null).remove(),ne.enter().append("rect").classed("scrollbar-horizontal",!0).call(hO.fill,rn.barColor),V?(this.hbar=ne.attr({rx:rn.barRadius,ry:rn.barRadius,x:re,y:oe,width:W,height:J}),this._hbarXMin=re+W/2,this._hbarTranslateMax=E-W):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var fe=m>I,ve=rn.barWidth+2*rn.barPad,ke=rn.barLength+2*rn.barPad,Ce=f+h,Te=v;Ce+ve>s&&(Ce=s-ve);var pe=this.container.selectAll("rect.scrollbar-vertical").data(fe?[0]:[]);pe.exit().on(".drag",null).remove(),pe.enter().append("rect").classed("scrollbar-vertical",!0).call(hO.fill,rn.barColor),fe?(this.vbar=pe.attr({rx:rn.barRadius,ry:rn.barRadius,x:Ce,y:Te,width:ve,height:ke}),this._vbarYMin=Te+ke/2,this._vbarTranslateMax=I-ke):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Ae=this.id,Se=R-.5,Le=fe?N+ve+.5:N+.5,Ke=z-.5,ht=V?O+J+.5:O+.5,it=a._topdefs.selectAll("#"+Ae).data(V||fe?[0]:[]);if(it.exit().remove(),it.enter().append("clipPath").attr("id",Ae).append("rect"),V||fe?(this._clipRect=it.select("rect").attr({x:Math.floor(Se),y:Math.floor(Ke),width:Math.ceil(Le)-Math.floor(Se),height:Math.ceil(ht)-Math.floor(Ke)}),this.container.call(vm.setClipUrl,Ae,this.gd),this.bg.attr({x:f,y:v,width:h,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vm.setClipUrl,null),delete this._clipRect),V||fe){var lt=Zu.behavior.drag().on("dragstart",function(){Zu.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(lt);var He=Zu.behavior.drag().on("dragstart",function(){Zu.event.sourceEvent.preventDefault(),Zu.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));V&&this.hbar.on(".drag",null).call(He),fe&&this.vbar.on(".drag",null).call(He)}this.setTranslate(r,i)};rn.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vm.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)};rn.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Zu.event.dx),this.vbar&&(r-=Zu.event.dy),this.setTranslate(t,r)};rn.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Zu.event.deltaY),this.vbar&&(r+=Zu.event.deltaY),this.setTranslate(t,r)};rn.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var i=t+this._hbarXMin,a=i+this._hbarTranslateMax,s=fb.constrain(Zu.event.x,i,a),l=(s-i)/(a-i),f=this.position.w-this._box.w;t=l*f}if(this.vbar){var h=r+this._vbarYMin,v=h+this._vbarTranslateMax,m=fb.constrain(Zu.event.y,h,v),b=(m-h)/(v-h),T=this.position.h-this._box.h;r=b*T}this.setTranslate(t,r)};rn.prototype.setTranslate=function(t,r){var i=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=fb.constrain(t||0,0,i),r=fb.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(vm.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 s=t/i;this.hbar.call(vm.setTranslate,t+s*this._hbarTranslateMax,r)}if(this.vbar){var l=r/a;this.vbar.call(vm.setTranslate,t,r+l*this._vbarTranslateMax)}}});var AO=de((pxe,TO)=>{"use strict";var dm=ja(),Xg=eo(),jg=Ua(),pm=_i(),hl=Bt(),cb=co(),hce=Di().arrayEditor,mO=ts().LINE_SPACING,aa=lb(),vce=dO();TO.exports=function(t){var r=t._fullLayout,i=hl.filterVisible(r[aa.name]);function a(T){Xg.autoMargin(t,bO(T))}var s=r._menulayer.selectAll("g."+aa.containerClassName).data(i.length>0?[0]:[]);if(s.enter().append("g").classed(aa.containerClassName,!0).style("cursor","pointer"),s.exit().each(function(){dm.select(this).selectAll("g."+aa.headerGroupClassName).each(a)}).remove(),i.length!==0){var l=s.selectAll("g."+aa.headerGroupClassName).data(i,dce);l.enter().append("g").classed(aa.headerGroupClassName,!0);for(var f=hl.ensureSingle(s,"g",aa.dropdownButtonGroupClassName,function(T){T.style("pointer-events","all")}),h=0;h{"use strict";var bce=lb();MO.exports={moduleType:"component",name:bce.name,layoutAttributes:MT(),supplyLayoutDefaults:cO(),draw:AO()}});var Kg=de((yxe,kO)=>{"use strict";kO.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 ET=de((gxe,LO)=>{"use strict";var CO=qo(),wce=c_(),Tce=hn().extendDeepAll,Ace=nl().overrideAll,Mce=Ly(),EO=Di().templatedArray,Od=Kg(),Sce=EO("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}});LO.exports=Ace(EO("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Sce,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:Tce(wce({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:Mce.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:CO({})},font:CO({}),activebgcolor:{valType:"color",dflt:Od.gripBgActiveColor},bgcolor:{valType:"color",dflt:Od.railBgColor},bordercolor:{valType:"color",dflt:Od.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Od.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Od.tickLength},tickcolor:{valType:"color",dflt:Od.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Od.minorTickLength}}),"arraydraw","from-root")});var IO=de((_xe,zO)=>{"use strict";var mm=Bt(),PO=Wl(),DO=ET(),kce=Kg(),Cce=kce.name,Ece=DO.steps;zO.exports=function(t,r){PO(t,r,{name:Cce,handleItemDefaults:Lce})};function Lce(e,t,r){function i(b,T){return mm.coerce(e,t,DO,b,T)}for(var a=PO(e,t,{name:"steps",handleItemDefaults:Pce}),s=0,l=0;l{"use strict";var Yu=ja(),hb=eo(),Kh=Ua(),Wu=_i(),vl=Bt(),Dce=vl.strTranslate,Qg=co(),zce=Di().arrayEditor,ba=Kg(),DT=ts(),qO=DT.LINE_SPACING,LT=DT.FROM_TL,PT=DT.FROM_BR;HO.exports=function(t){var r=t._context.staticPlot,i=t._fullLayout,a=Ice(i,t),s=i._infolayer.selectAll("g."+ba.containerClassName).data(a.length>0?[0]:[]);s.enter().append("g").classed(ba.containerClassName,!0).style("cursor",r?null:"ew-resize");function l(m){m._commandObserver&&(m._commandObserver.remove(),delete m._commandObserver),hb.autoMargin(t,NO(m))}if(s.exit().each(function(){Yu.select(this).selectAll("g."+ba.groupClassName).each(l)}).remove(),a.length!==0){var f=s.selectAll("g."+ba.groupClassName).data(a,Rce);f.enter().append("g").classed(ba.groupClassName,!0),f.exit().each(l).remove();for(var h=0;h0&&(f=f.transition().duration(t.transition.duration).ease(t.transition.easing)),f.attr("transform",Dce(l-ba.gripWidth*.5,t._dims.currentValueTotalHeight))}}function zT(e,t){var r=e._dims;return r.inputAreaStart+ba.stepInset+(r.inputAreaLength-2*ba.stepInset)*Math.min(1,Math.max(0,t))}function FO(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-ba.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*ba.stepInset-2*r.inputAreaStart)))}function Vce(e,t,r){var i=r._dims,a=vl.ensureSingle(e,"rect",ba.railTouchRectClass,function(s){s.call(UO,t,e,r).style("pointer-events","all")});a.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,ba.tickOffset+r.ticklen+i.labelHeight)}).call(Kh.fill,r.bgcolor).attr("opacity",0),Wu.setTranslate(a,0,i.currentValueTotalHeight)}function Hce(e,t){var r=t._dims,i=r.inputAreaLength-ba.railInset*2,a=vl.ensureSingle(e,"rect",ba.railRectClass);a.attr({width:i,height:ba.railWidth,rx:ba.railRadius,ry:ba.railRadius,"shape-rendering":"crispEdges"}).call(Kh.stroke,t.bordercolor).call(Kh.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Wu.setTranslate(a,ba.railInset,(r.inputAreaWidth-ba.railWidth)*.5+r.currentValueTotalHeight)}});var YO=de((bxe,ZO)=>{"use strict";var Gce=Kg();ZO.exports={moduleType:"component",name:Gce.name,layoutAttributes:ET(),supplyLayoutDefaults:IO(),draw:GO()}});var db=de((wxe,XO)=>{"use strict";var WO=Af();XO.exports={bgcolor:{valType:"color",dflt:WO.background,editType:"plot"},bordercolor:{valType:"color",dflt:WO.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 IT=de((Txe,jO)=>{"use strict";jO.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 pb=de((Axe,JO)=>{"use strict";JO.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 $O=de(yb=>{"use strict";var Zce=$n(),Yce=co(),KO=pb(),Wce=ts().LINE_SPACING,mb=KO.name;function QO(e){var t=e&&e[mb];return t&&t.visible}yb.isVisible=QO;yb.makeData=function(e){for(var t=Zce.list({_fullLayout:e},"x",!0),r=e.margin,i=[],a=0;a{"use strict";var gb=Bt(),eU=Di(),tU=$n(),Xce=db(),jce=IT();rU.exports=function(t,r,i){var a=t[i],s=r[i];if(!(a.rangeslider||r._requestRangeslider[s._id]))return;gb.isPlainObject(a.rangeslider)||(a.rangeslider={});var l=a.rangeslider,f=eU.newContainer(s,"rangeslider");function h(O,H){return gb.coerce(l,f,Xce,O,H)}var v,m;function b(O,H){return gb.coerce(v,m,jce,O,H)}var T=h("visible");if(T){h("bgcolor",r.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!s.isValidRange(l.range)),h("range");var S=r._subplots;if(S)for(var C=S.cartesian.filter(function(O){return O.substr(0,O.indexOf("y"))===tU.name2id(i)}).map(function(O){return O.substr(O.indexOf("y"),O.length)}),P=gb.simpleMap(C,tU.id2name),E=0;E{"use strict";var Jce=$n().list,Kce=Xy().getAutoRange,Qce=pb();iU.exports=function(t){for(var r=Jce(t,"x",!0),i=0;i{"use strict";var _b=ja(),$ce=la(),ehe=eo(),mn=Bt(),xb=mn.strTranslate,sU=_i(),Qh=Ua(),the=Yy(),rhe=lT(),RT=$n(),ahe=jl(),ihe=Oh(),Ra=pb();lU.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i=pe.max)Ce=oe[Te+1];else if(ke=pe.pmax)Ce=oe[Te+1];else if(ke0?e.touches[0].clientX:0}function nhe(e,t,r,i){if(t._context.staticPlot)return;var a=e.select("rect."+Ra.slideBoxClassName).node(),s=e.select("rect."+Ra.grabAreaMinClassName).node(),l=e.select("rect."+Ra.grabAreaMaxClassName).node();function f(){var h=_b.event,v=h.target,m=oU(h),b=m-e.node().getBoundingClientRect().left,T=i.d2p(r._rl[0]),S=i.d2p(r._rl[1]),C=ahe.coverSlip();this.addEventListener("touchmove",P),this.addEventListener("touchend",E),C.addEventListener("mousemove",P),C.addEventListener("mouseup",E);function P(I){var R=oU(I),N=+R-m,z,O,H;switch(v){case a:if(H="ew-resize",T+N>r._length||S+N<0)return;z=T+N,O=S+N;break;case s:if(H="col-resize",T+N>r._length)return;z=T+N,O=S;break;case l:if(H="col-resize",S+N<0)return;z=T,O=S+N;break;default:H="ew-resize",z=b,O=b+N;break}if(O{"use strict";var phe=Bt(),mhe=db(),yhe=IT(),FT=$O();fU.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:phe.extendFlat({},mhe,{yaxis:yhe})}}},layoutAttributes:db(),handleDefaults:aU(),calcAutorange:nU(),draw:uU(),isVisible:FT.isVisible,makeData:FT.makeData,autoMarginOpts:FT.autoMarginOpts}});var bb=de((Lxe,vU)=>{"use strict";var ghe=qo(),hU=Af(),_he=Di().templatedArray,xhe=_he("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"});vU.exports={visible:{valType:"boolean",editType:"plot"},buttons:xhe,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:ghe({editType:"plot"}),bgcolor:{valType:"color",dflt:hU.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:hU.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var qT=de((Pxe,dU)=>{"use strict";dU.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var yU=de((Dxe,mU)=>{"use strict";var wb=Bt(),bhe=Ua(),whe=Di(),The=Wl(),pU=bb(),NT=qT();mU.exports=function(t,r,i,a,s){var l=t.rangeselector||{},f=whe.newContainer(r,"rangeselector");function h(S,C){return wb.coerce(l,f,pU,S,C)}var v=The(l,f,{name:"buttons",handleItemDefaults:Ahe,calendar:s}),m=h("visible",v.length>0);if(m){var b=Mhe(r,i,a);h("x",b[0]),h("y",b[1]),wb.noneOrAll(t,r,["x","y"]),h("xanchor"),h("yanchor"),wb.coerceFont(h,"font",i.font);var T=h("bgcolor");h("activecolor",bhe.contrast(T,NT.lightAmount,NT.darkAmount)),h("bordercolor"),h("borderwidth")}};function Ahe(e,t,r,i){var a=i.calendar;function s(h,v){return wb.coerce(e,t,pU.buttons,h,v)}var l=s("visible");if(l){var f=s("step");f!=="all"&&(a&&a!=="gregorian"&&(f==="month"||f==="year")?t.stepmode="backward":s("stepmode"),s("count")),s("label")}}function Mhe(e,t,r){for(var i=r.filter(function(f){return t[f].anchor===e._id}),a=0,s=0;s{"use strict";var She=F3(),khe=Bt().titleCase;gU.exports=function(t,r){var i=t._name,a={};if(r.step==="all")a[i+".autorange"]=!0;else{var s=Che(t,r);a[i+".range[0]"]=s[0],a[i+".range[1]"]=s[1]}return a};function Che(e,t){var r=e.range,i=new Date(e.r2l(r[1])),a=t.step,s=She["utc"+khe(a)],l=t.count,f;switch(t.stepmode){case"backward":f=e.l2r(+s.offset(i,-l));break;case"todate":var h=s.offset(i,-l);f=e.l2r(+s.ceil(h));break}var v=r[1];return[f,v]}});var kU=de((Ixe,SU)=>{"use strict";var Ab=ja(),Ehe=la(),Lhe=eo(),xU=Ua(),MU=_i(),Lc=Bt(),bU=Lc.strTranslate,Tb=co(),Phe=$n(),UT=ts(),wU=UT.LINE_SPACING,TU=UT.FROM_TL,AU=UT.FROM_BR,OT=qT(),Dhe=_U();SU.exports=function(t){var r=t._fullLayout,i=r._infolayer.selectAll(".rangeselector").data(zhe(t),Ihe);i.enter().append("g").classed("rangeselector",!0),i.exit().remove(),i.style({cursor:"pointer","pointer-events":"all"}),i.each(function(a){var s=Ab.select(this),l=a,f=l.rangeselector,h=s.selectAll("g.button").data(Lc.filterVisible(f.buttons));h.enter().append("g").classed("button",!0),h.exit().remove(),h.each(function(v){var m=Ab.select(this),b=Dhe(l,v);v._isActive=Rhe(l,v,b),m.call(BT,f,v),m.call(qhe,f,v,t),m.on("click",function(){t._dragged||Ehe.call("_guiRelayout",t,b)}),m.on("mouseover",function(){v._isHovered=!0,m.call(BT,f,v)}),m.on("mouseout",function(){v._isHovered=!1,m.call(BT,f,v)})}),Bhe(t,h,f,l._name,s)})};function zhe(e){for(var t=Phe.list(e,"x",!0),r=[],i=0;i{"use strict";CU.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:bb()}}},layoutAttributes:bb(),handleDefaults:yU(),draw:kU()}});var Mb=de(VT=>{"use strict";var LU=hn().extendFlat;VT.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=e.name?e.name+" ":"",a=e.trace?"trace ":"subplot ",s=t.description?" "+t.description:"",l={x:LU({},r,{}),y:LU({},r,{}),editType:e.editType};return e.noGridCell||(l.row={valType:"integer",min:0,dflt:0,editType:e.editType},l.column={valType:"integer",min:0,dflt:0,editType:e.editType}),l};VT.defaults=function(e,t,r,i){var a=i&&i.x||[0,1],s=i&&i.y||[0,1],l=t.grid;if(l){var f=r("domain.column");f!==void 0&&(f{"use strict";var Ohe=Bt(),Uhe=c0().counter,Vhe=Mb().attributes,PU=Ao().idRegex,Hhe=Di(),HT={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:[Uhe("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[PU.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[PU.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:Vhe({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 Sb(e,t,r){var i=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(i))return i;if(a.length)return a}function Ghe(e,t){var r=e.grid||{},i=Sb(t,r,"x"),a=Sb(t,r,"y");if(!e.grid&&!i&&!a)return;var s=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),l=Array.isArray(i),f=Array.isArray(a),h=l&&i!==r.xaxes&&f&&a!==r.yaxes,v,m;s?(v=r.subplots.length,m=r.subplots[0].length):(f&&(v=a.length),l&&(m=i.length));var b=Hhe.newContainer(t,"grid");function T(H,V){return Ohe.coerce(r,b,HT,H,V)}var S=T("rows",v),C=T("columns",m);if(!(S*C>1)){delete t.grid;return}if(!s&&!l&&!f){var P=T("pattern")==="independent";P&&(s=!0)}b._hasSubplotGrid=s;var E=T("roworder"),I=E==="top to bottom",R=s?.2:.1,N=s?.3:.1,z,O;h&&t._splomGridDflt&&(z=t._splomGridDflt.xside,O=t._splomGridDflt.yside),b._domains={x:DU("x",T,R,z,C),y:DU("y",T,N,O,S,I)}}function DU(e,t,r,i,a,s){var l=t(e+"gap",r),f=t("domain."+e);t(e+"side",i);for(var h=new Array(a),v=f[0],m=(f[1]-v)/(a-l),b=m*(1-l),T=0;T{"use strict";FU.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 BU=de((Bxe,NU)=>{"use strict";var qU=Da(),Yhe=la(),Whe=Bt(),Xhe=Di(),jhe=GT();NU.exports=function(e,t,r,i){var a="error_"+i.axis,s=Xhe.newContainer(t,a),l=e[a]||{};function f(C,P){return Whe.coerce(l,s,jhe,C,P)}var h=l.array!==void 0||l.value!==void 0||l.type==="sqrt",v=f("visible",h);if(v!==!1){var m=f("type","array"in l?"data":"percent"),b=!0;m!=="sqrt"&&(b=f("symmetric",!((m==="data"?"arrayminus":"valueminus")in l))),m==="data"?(f("array"),f("traceref"),b||(f("arrayminus"),f("tracerefminus"))):(m==="percent"||m==="constant")&&(f("value"),b||f("valueminus"));var T="copy_"+i.inherit+"style";if(i.inherit){var S=t["error_"+i.inherit];(S||{}).visible&&f(T,!(l.color||qU(l.thickness)||qU(l.width)))}(!i.inherit||!s[T])&&(f("color",r),f("thickness"),f("width",Yhe.traceIs(t,"gl3d")?0:4))}}});var ZT=de((Oxe,UU)=>{"use strict";UU.exports=function(t){var r=t.type,i=t.symmetric;if(r==="data"){var a=t.array||[];if(i)return function(v,m){var b=+a[m];return[b,b]};var s=t.arrayminus||[];return function(v,m){var b=+a[m],T=+s[m];return!isNaN(b)||!isNaN(T)?[T||0,b||0]:[NaN,NaN]}}else{var l=OU(r,t.value),f=OU(r,t.valueminus);return i||t.valueminus===void 0?function(v){var m=l(v);return[m,m]}:function(v){return[f(v),l(v)]}}};function OU(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 GU=de((Uxe,HU)=>{"use strict";var YT=Da(),Jhe=la(),WT=Yi(),Khe=Bt(),Qhe=ZT();HU.exports=function(t){for(var r=t.calcdata,i=0;i{"use strict";var ZU=ja(),$h=Da(),$he=_i(),eve=rs();YU.exports=function(t,r,i,a){var s,l=i.xaxis,f=i.yaxis,h=a&&a.duration>0,v=t._context.staticPlot;r.each(function(m){var b=m[0].trace,T=b.error_x||{},S=b.error_y||{},C;b.ids&&(C=function(R){return R.id});var P=eve.hasMarkers(b)&&b.marker.maxdisplayed>0;!S.visible&&!T.visible&&(m=[]);var E=ZU.select(this).selectAll("g.errorbar").data(m,C);if(E.exit().remove(),!!m.length){T.visible||E.selectAll("path.xerror").remove(),S.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var I=E.enter().append("g").classed("errorbar",!0);h&&I.style("opacity",0).transition().duration(a.duration).style("opacity",1),$he.setClipUrl(E,i.layerClipId,t),E.each(function(R){var N=ZU.select(this),z=tve(R,l,f);if(!(P&&!R.vis)){var O,H=N.select("path.yerror");if(S.visible&&$h(z.x)&&$h(z.yh)&&$h(z.ys)){var V=S.width;O="M"+(z.x-V)+","+z.yh+"h"+2*V+"m-"+V+",0V"+z.ys,z.noYS||(O+="m-"+V+",0h"+2*V),s=!H.size(),s?H=N.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("yerror",!0):h&&(H=H.transition().duration(a.duration).ease(a.easing)),H.attr("d",O)}else H.remove();var W=N.select("path.xerror");if(T.visible&&$h(z.y)&&$h(z.xh)&&$h(z.xs)){var J=(T.copy_ystyle?S:T).width;O="M"+z.xh+","+(z.y-J)+"v"+2*J+"m0,-"+J+"H"+z.xs,z.noXS||(O+="m0,-"+J+"v"+2*J),s=!W.size(),s?W=N.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("xerror",!0):h&&(W=W.transition().duration(a.duration).ease(a.easing)),W.attr("d",O)}else W.remove()}})}})};function tve(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),$h(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),$h(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}});var JU=de((Hxe,jU)=>{"use strict";var rve=ja(),XU=Ua();jU.exports=function(t){t.each(function(r){var i=r[0].trace,a=i.error_y||{},s=i.error_x||{},l=rve.select(this);l.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(XU.stroke,a.color),s.copy_ystyle&&(s=a),l.selectAll("path.xerror").style("stroke-width",s.thickness+"px").call(XU.stroke,s.color)})}});var $U=de((Gxe,QU)=>{"use strict";var $g=Bt(),KU=nl().overrideAll,e1=GT(),Ud={error_x:$g.extendFlat({},e1),error_y:$g.extendFlat({},e1)};delete Ud.error_x.copy_zstyle;delete Ud.error_y.copy_zstyle;delete Ud.error_y.copy_ystyle;var t1={error_x:$g.extendFlat({},e1),error_y:$g.extendFlat({},e1),error_z:$g.extendFlat({},e1)};delete t1.error_x.copy_ystyle;delete t1.error_y.copy_ystyle;delete t1.error_z.copy_ystyle;delete t1.error_z.copy_zstyle;QU.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ud,bar:Ud,histogram:Ud,scatter3d:KU(t1,"calc","nested"),scattergl:KU(Ud,"calc","nested")}},supplyDefaults:BU(),calc:GU(),makeComputeError:ZT(),plot:WU(),style:JU(),hoverInfo:ave};function ave(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 tV=de((Zxe,eV)=>{"use strict";eV.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 lV=de((Yxe,sV)=>{"use strict";var ev=ja(),XT=Tf(),Cb=eo(),rV=la(),Pc=Yi(),kb=jl(),su=Bt(),ju=su.strTranslate,oV=hn().extendFlat,jT=Oh(),Xu=_i(),JT=Ua(),ive=Yy(),nve=co(),ove=kf().flipScale,sve=iT(),lve=nT(),uve=Ru(),KT=ts(),aV=KT.LINE_SPACING,iV=KT.FROM_TL,nV=KT.FROM_BR,Ji=tV().cn;function fve(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Ji.colorbar).data(cve(e),function(i){return i._id});r.enter().append("g").attr("class",function(i){return i._id}).classed(Ji.colorbar,!0),r.each(function(i){var a=ev.select(this);su.ensureSingle(a,"rect",Ji.cbbg),su.ensureSingle(a,"g",Ji.cbfills),su.ensureSingle(a,"g",Ji.cblines),su.ensureSingle(a,"g",Ji.cbaxis,function(l){l.classed(Ji.crisp,!0)}),su.ensureSingle(a,"g",Ji.cbtitleunshift,function(l){l.append("g").classed(Ji.cbtitle,!0)}),su.ensureSingle(a,"rect",Ji.cboutline);var s=hve(a,i,e);s&&s.then&&(e._promises||[]).push(s),e._context.edits.colorbarPosition&&vve(a,i,e)}),r.exit().each(function(i){Cb.autoMargin(e,i._id)}).remove(),r.order()}function cve(e){var t=e._fullLayout,r=e.calcdata,i=[],a,s,l,f;function h(N){return oV(N,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function v(){typeof f.calc=="function"?f.calc(e,l,a):(a._fillgradient=s.reversescale?ove(s.colorscale):s.colorscale,a._zrange=[s[f.min],s[f.max]])}for(var m=0;m1){var Re=Math.pow(10,Math.floor(Math.log(ge)/Math.LN10));kt*=Re*su.roundUp(ge/Re,[2,5,10]),(Math.abs(ne.start)/ne.size+1e-6)%1<2e-6&&(at.tick0=0)}at.dtick=kt}at.domain=i?[He+C/z.h,He+Ae-C/z.h]:[He+S/z.w,He+Ae-S/z.w],at.setScale(),e.attr("transform",ju(Math.round(z.l),Math.round(z.t)));var xe=e.select("."+Ji.cbtitleunshift).attr("transform",ju(-Math.round(z.l),-Math.round(z.t))),et=at.ticklabelposition,vt=at.title.font.size,tt=e.select("."+Ji.cbaxis),Nt,Mt=0,Ct=0;function Rt(Wt,Be){var ft={propContainer:at,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:N._dfltTitle.colorbar,containerGroup:e.select("."+Ji.cbtitle)},mt=Wt.charAt(0)==="h"?Wt.substr(1):"h"+Wt;e.selectAll("."+mt+",."+mt+"-math-group").remove(),ive.draw(r,Wt,oV(ft,Be||{}))}function Ut(){if(i&&At||!i&&!At){var Wt,Be;W==="top"&&(Wt=S+z.l+Se*P,Be=C+z.t+Le*(1-He-Ae)+3+vt*.75),W==="bottom"&&(Wt=S+z.l+Se*P,Be=C+z.t+Le*(1-He)-3-vt*.25),W==="right"&&(Be=C+z.t+Le*E+3+vt*.75,Wt=S+z.l+Se*He),Rt(at._id+"title",{attributes:{x:Wt,y:Be,"text-anchor":i?"start":"middle"}})}}function xt(){if(i&&!At||!i&&At){var Wt=at.position||0,Be=at._offset+at._length/2,ft,mt;if(W==="right")mt=Be,ft=z.l+Se*Wt+10+vt*(at.showticklabels?1:.5);else if(ft=Be,W==="bottom"&&(mt=z.t+Le*Wt+10+(et.indexOf("inside")===-1?at.tickfont.size:0)+(at.ticks!=="intside"&&t.ticklen||0)),W==="top"){var Ar=V.text.split("
").length;mt=z.t+Le*Wt+10-Ce-aV*vt*Ar}Rt((i?"h":"v")+at._id+"title",{avoid:{selection:ev.select(r).selectAll("g."+at._id+"tick"),side:W,offsetTop:i?0:z.t,offsetLeft:i?z.l:0,maxShift:i?N.width:N.height},attributes:{x:ft,y:mt,"text-anchor":"middle"},transform:{rotate:i?-90:0,offset:0}})}}function Et(){if(!i&&!At||i&&At){var Wt=e.select("."+Ji.cbtitle),Be=Wt.select("text"),ft=[-h/2,h/2],mt=Wt.select(".h"+at._id+"title-math-group").node(),Ar=15.6;Be.node()&&(Ar=parseInt(Be.node().style.fontSize,10)*aV);var dr;if(mt?(dr=Xu.bBox(mt),Ct=dr.width,Mt=dr.height,Mt>Ar&&(ft[1]-=(Mt-Ar)/2)):Be.node()&&!Be.classed(Ji.jsPlaceholder)&&(dr=Xu.bBox(Be.node()),Ct=dr.width,Mt=dr.height),i){if(Mt){if(Mt+=5,W==="top")at.domain[1]-=Mt/z.h,ft[1]*=-1;else{at.domain[0]+=Mt/z.h;var Tt=nve.lineCount(Be);ft[1]+=(1-Tt)*Ar}Wt.attr("transform",ju(ft[0],ft[1])),at.setScale()}}else Ct&&(W==="right"&&(at.domain[0]+=(Ct+vt/2)/z.w),Wt.attr("transform",ju(ft[0],ft[1])),at.setScale())}e.selectAll("."+Ji.cbfills+",."+Ji.cblines).attr("transform",i?ju(0,Math.round(z.h*(1-at.domain[1]))):ju(Math.round(z.w*at.domain[0]),0)),tt.attr("transform",i?ju(0,Math.round(-z.t)):ju(Math.round(-z.l),0));var wt=e.select("."+Ji.cbfills).selectAll("rect."+Ji.cbfill).attr("style","").data(ve);wt.enter().append("rect").classed(Ji.cbfill,!0).attr("style",""),wt.exit().remove();var Vt=J.map(at.c2p).map(Math.round).sort(function(Mr,xr){return Mr-xr});wt.each(function(Mr,xr){var Pt=[xr===0?J[0]:(ve[xr]+ve[xr-1])/2,xr===ve.length-1?J[1]:(ve[xr]+ve[xr+1])/2].map(at.c2p).map(Math.round);i&&(Pt[1]=su.constrain(Pt[1]+(Pt[1]>Pt[0])?1:-1,Vt[0],Vt[1]));var Fe=ev.select(this).attr(i?"x":"y",Ke).attr(i?"y":"x",ev.min(Pt)).attr(i?"width":"height",Math.max(Ce,2)).attr(i?"height":"width",Math.max(ev.max(Pt)-ev.min(Pt),2));if(t._fillgradient)Xu.gradient(Fe,r,t._id,i?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Ge=oe(Mr).replace("e-","");Fe.attr("fill",XT(Ge).toHexString())}});var Kt=e.select("."+Ji.cblines).selectAll("path."+Ji.cbline).data(H.color&&H.width?ke:[]);Kt.enter().append("path").classed(Ji.cbline,!0),Kt.exit().remove(),Kt.each(function(Mr){var xr=Ke,Pt=Math.round(at.c2p(Mr))+H.width/2%1;ev.select(this).attr("d","M"+(i?xr+","+Pt:Pt+","+xr)+(i?"h":"v")+Ce).call(Xu.lineGroupStyle,H.width,re(Mr),H.dash)}),tt.selectAll("g."+at._id+"tick,path").remove();var Ht=Ke+Ce+(h||0)/2-(t.ticks==="outside"?1:0),Ot=Pc.calcTicks(at),er=Pc.getTickSigns(at)[2];return Pc.drawTicks(r,at,{vals:at.ticks==="inside"?Pc.clipEnds(at,Ot):Ot,layer:tt,path:Pc.makeTickPath(at,Ht,er),transFn:Pc.makeTransTickFn(at)}),Pc.drawLabels(r,at,{vals:Ot,layer:tt,transFn:Pc.makeTransTickLabelFn(at),labelFns:Pc.makeLabelFns(at,Ht)})}function ir(){var Wt,Be=Ce+h/2;et.indexOf("inside")===-1&&(Wt=Xu.bBox(tt.node()),Be+=i?Wt.width:Wt.height),Nt=xe.select("text");var ft=0,mt=i&&W==="top",Ar=!i&&W==="right",dr=0;if(Nt.node()&&!Nt.classed(Ji.jsPlaceholder)){var Tt,wt=xe.select(".h"+at._id+"title-math-group").node();wt&&(i&&At||!i&&!At)?(Wt=Xu.bBox(wt),ft=Wt.width,Tt=Wt.height):(Wt=Xu.bBox(xe.node()),ft=Wt.right-z.l-(i?Ke:_t),Tt=Wt.bottom-z.t-(i?_t:Ke),!i&&W==="top"&&(Be+=Wt.height,dr=Wt.height)),Ar&&(Nt.attr("transform",ju(ft/2+vt/2,0)),ft*=2),Be=Math.max(Be,i?ft:Tt)}var Vt=(i?S:C)*2+Be+v+h/2,Kt=0;!i&&V.text&&T==="bottom"&&E<=0&&(Kt=Vt/2,Vt+=Kt,dr+=Kt),N._hColorbarMoveTitle=Kt,N._hColorbarMoveCBTitle=dr;var Ht=v+h,Ot=(i?Ke:_t)-Ht/2-(i?S:0),er=(i?_t:Ke)-(i?pe:C+dr-Kt);e.select("."+Ji.cbbg).attr("x",Ot).attr("y",er).attr(i?"width":"height",Math.max(Vt-Kt,2)).attr(i?"height":"width",Math.max(pe+Ht,2)).call(JT.fill,m).call(JT.stroke,t.bordercolor).style("stroke-width",v);var Mr=Ar?Math.max(ft-10,0):0;e.selectAll("."+Ji.cboutline).attr("x",(i?Ke:_t+S)+Mr).attr("y",(i?_t+C-pe:Ke)+(mt?Mt:0)).attr(i?"width":"height",Math.max(Ce,2)).attr(i?"height":"width",Math.max(pe-(i?2*C+Mt:2*S+Mr),2)).call(JT.stroke,t.outlinecolor).style({fill:"none","stroke-width":h});var xr=i?ht*Vt:0,Pt=i?0:(1-it)*Vt-dr;if(xr=R?z.l-xr:-xr,Pt=I?z.t-Pt:-Pt,e.attr("transform",ju(xr,Pt)),!i&&(v||XT(m).getAlpha()&&!XT.equals(N.paper_bgcolor,m))){var Fe=tt.selectAll("text"),Ge=Fe[0].length,bt=e.select("."+Ji.cbbg).node(),dt=Xu.bBox(bt),gr=Xu.getTranslate(e),Er=2;Fe.each(function(jn,En){var Vi=0,pa=Ge-1;if(En===Vi||En===pa){var Gr=Xu.bBox(this),Qa=Xu.getTranslate(this),Zr;if(En===pa){var vi=Gr.right+Qa.x,ya=dt.right+gr.x+_t-v-Er+P;Zr=ya-vi,Zr>0&&(Zr=0)}else if(En===Vi){var le=Gr.left+Qa.x,ee=dt.left+gr.x+_t+v+Er;Zr=ee-le,Zr<0&&(Zr=0)}Zr&&(Ge<3?this.setAttribute("transform","translate("+Zr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Tr={},Hr=iV[b],_a=nV[b],ka=iV[T],Ea=nV[T],Ri=Vt-Ce;i?(s==="pixels"?(Tr.y=E,Tr.t=pe*ka,Tr.b=pe*Ea):(Tr.t=Tr.b=0,Tr.yt=E+a*ka,Tr.yb=E-a*Ea),f==="pixels"?(Tr.x=P,Tr.l=Vt*Hr,Tr.r=Vt*_a):(Tr.l=Ri*Hr,Tr.r=Ri*_a,Tr.xl=P-l*Hr,Tr.xr=P+l*_a)):(s==="pixels"?(Tr.x=P,Tr.l=pe*Hr,Tr.r=pe*_a):(Tr.l=Tr.r=0,Tr.xl=P+a*Hr,Tr.xr=P-a*_a),f==="pixels"?(Tr.y=1-E,Tr.t=Vt*ka,Tr.b=Vt*Ea):(Tr.t=Ri*ka,Tr.b=Ri*Ea,Tr.yt=E-l*ka,Tr.yb=E+l*Ea));var Ki=t.y<.5?"b":"t",yn=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Xi={r:N.width-Ot-xr,l:Ot+Tr.r,b:N.height-er-Pt,t:er+Tr.b};R&&I?Cb.autoMargin(r,t._id,Tr):R?r._fullLayout._reservedMargin[t._id][Ki]=Xi[Ki]:I||i?r._fullLayout._reservedMargin[t._id][yn]=Xi[yn]:r._fullLayout._reservedMargin[t._id][Ki]=Xi[Ki]}return su.syncOrAsync([Cb.previousPromises,Ut,Et,xt,Cb.previousPromises,ir],r)}function vve(e,t,r){var i=t.orientation==="v",a=r._fullLayout,s=a._size,l,f,h;kb.init({element:e.node(),gd:r,prepFn:function(){l=e.attr("transform"),jT(e)},moveFn:function(v,m){e.attr("transform",l+ju(v,m)),f=kb.align((i?t._uFrac:t._vFrac)+v/s.w,i?t._thickFrac:t._lenFrac,0,1,t.xanchor),h=kb.align((i?t._vFrac:1-t._uFrac)-m/s.h,i?t._lenFrac:t._thickFrac,0,1,t.yanchor);var b=kb.getCursor(f,h,t.xanchor,t.yanchor);jT(e,b)},doneFn:function(){if(jT(e),f!==void 0&&h!==void 0){var v={};v[t._propPrefix+"x"]=f,v[t._propPrefix+"y"]=h,t._traceIndex!==void 0?rV.call("_guiRestyle",r,v,t._traceIndex):rV.call("_guiRelayout",r,v)}}})}function dve(e,t,r){var i=t._levels,a=[],s=[],l,f,h=i.end+i.size/100,v=i.size,m=1.001*r[0]-.001*r[1],b=1.001*r[1]-.001*r[0];for(f=0;f<1e5&&(l=i.start+f*v,!(v>0?l>=h:l<=h));f++)l>m&&l0?l>=h:l<=h));f++)l>r[0]&&l{"use strict";uV.exports={moduleType:"component",name:"colorbar",attributes:V_(),supplyDefaults:$w(),draw:lV().draw,hasColorbar:Vw()}});var hV=de((Xxe,cV)=>{"use strict";cV.exports={moduleType:"component",name:"legend",layoutAttributes:J5(),supplyLayoutDefaults:$5(),draw:h4(),style:l4()}});var dV=de((jxe,vV)=>{"use strict";vV.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 mV=de((Jxe,pV)=>{"use strict";pV.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var $T=de((Kxe,xV)=>{"use strict";var mve=la(),_V=Bt(),QT=_V.extendFlat,yV=_V.extendDeep;function gV(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 yve(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}xV.exports=function(t,r){var i,a=t.data,s=t.layout,l=yV([],a),f=yV({},s,gV(r.tileClass)),h=t._context||{};if(r.width&&(f.width=r.width),r.height&&(f.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){f.annotations=[];var v=Object.keys(f);for(i=0;i{"use strict";var gve=C_().EventEmitter,_ve=la(),xve=Bt(),bV=Pd(),bve=$T(),wve=Fx(),Tve=qx();function Ave(e,t){var r=new gve,i=bve(e,{format:"png"}),a=i.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function s(){var f=bV.getDelay(a._fullLayout);setTimeout(function(){var h=wve(a),v=document.createElement("canvas");v.id=xve.randstr(),r=Tve({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:v,emitter:r,svg:h}),r.clean=function(){a&&document.body.removeChild(a)}},f)}var l=bV.getRedrawFunc(a);return _ve.call("_doPlot",a,i.data,i.layout,i.config).then(l).then(s).catch(function(f){r.emit("error",f)}),r}wV.exports=Ave});var SV=de(($xe,MV)=>{"use strict";var AV=Pd(),Mve={getDelay:AV.getDelay,getRedrawFunc:AV.getRedrawFunc,clone:$T(),toSVG:Fx(),svgToImg:qx(),toImage:TV(),downloadImage:C6()};MV.exports=Mve});var CV=de(Dc=>{"use strict";Dc.version=U1().version;_7();uk();var Sve=la(),r1=Dc.register=Sve.register,tA=DF(),kV=Object.keys(tA);for(Eb=0;Eb{"use strict";EV.exports=CV()});var rA=de((rbe,zV)=>{"use strict";var kve=Hl().hovertemplateAttrs,Cve=Hl().texttemplateAttrs,Eve=px(),Vf=kc(),Lve=ms(),PV=xc(),Pve=hc().dash,Vd=hn().extendFlat,Dve=nl().overrideAll,lu=Vf.marker,DV=Vf.line,zve=lu.line;zV.exports=Dve({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:Vd({},Vf.mode,{dflt:"markers"}),text:Vd({},Vf.text,{}),texttemplate:Cve({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:Vd({},Vf.hovertext,{}),textfont:Vf.textfont,textposition:Vf.textposition,line:{color:DV.color,width:DV.width,dash:Pve},connectgaps:Vf.connectgaps,marker:Vd({symbol:lu.symbol,opacity:lu.opacity,angle:lu.angle,angleref:Vd({},lu.angleref,{values:["previous","up","north"]}),standoff:lu.standoff,size:lu.size,sizeref:lu.sizeref,sizemin:lu.sizemin,sizemode:lu.sizemode,colorbar:lu.colorbar,line:Vd({width:zve.width},PV("marker.line")),gradient:lu.gradient},PV("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Eve(),selected:Vf.selected,unselected:Vf.unselected,hoverinfo:Vd({},Lve.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:kve()},"calc","nested")});var zc=de((abe,OV)=>{"use strict";var Ive=g_(),IV="1.13.4",NV='\xA9 OpenStreetMap contributors',RV=['\xA9 Carto',NV].join(" "),FV=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),Rve=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),BV={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:NV,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:RV,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:RV,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:FV,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:FV,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:Rve,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"}},qV=Ive(BV);OV.exports={requiredVersion:IV,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:BV,styleValuesNonMapbox:qV,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@"+IV+"."].join(` +`+v9(s.dayMonthYear,e,i,a);return v9(t,e,i,a)};var d9=3*qs;kn.incrementMonth=function(e,t,r){r=dc(r)&&r;var i=kh(e,qs);if(e=Math.round(e-i),r)try{var a=Math.round(e/qs)+Dy,s=vc.getComponentMethod("calendars","getCal")(r),l=s.fromJD(a);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-Dy)*qs+i}catch(h){ow.error("invalid ms "+e+" in calendar "+r)}var f=new Date(e+d9);return f.setUTCMonth(f.getUTCMonth()+t)+i-d9};kn.findExactDates=function(e,t){for(var r=0,i=0,a=0,s=0,l,f,h=dc(t)&&vc.getComponentMethod("calendars","getCal")(t),v=0;v{"use strict";g9.exports=function(t){return t}});var lw=de(pc=>{"use strict";var hK=Da(),vK=Th(),dK=y_(),pK=Hi().BADNUM,sw=1e-9;pc.findBin=function(e,t,r){if(hK(t.start))return r?Math.ceil((e-t.start)/t.size-sw)-1:Math.floor((e-t.start)/t.size+sw);var i=0,a=t.length,s=0,l=a>1?(t[a-1]-t[0])/(a-1):1,f,h;for(l>=0?h=r?mK:yK:h=r?_K:gK,e+=l*sw*(r?-1:1)*(l>=0?1:-1);i90&&vK.log("Long binary search..."),i-1};function mK(e,t){return et}function _K(e,t){return e>=t}pc.sorterAsc=function(e,t){return e-t};pc.sorterDes=function(e,t){return t-e};pc.distinctVals=function(e){var t=e.slice();t.sort(pc.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===pK;r--);for(var i=t[r]-t[0]||1,a=i/(r||1)/1e4,s=[],l,f=0;f<=r;f++){var h=t[f],v=h-l;l===void 0?(s.push(h),l=h):v>a&&(i=Math.min(i,v),s.push(h),l=h)}return{vals:s,minDiff:i}};pc.roundUp=function(e,t,r){for(var i=0,a=t.length-1,s,l=0,f=r?0:1,h=r?1:0,v=r?Math.ceil:Math.floor;i0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()};pc.findIndexOfMin=function(e,t){t=t||dK;for(var r=1/0,i,a=0;a{"use strict";_9.exports=function(t){return Object.keys(t).sort()}});var x9=de(Cn=>{"use strict";var zy=Da(),xK=il().isArrayOrTypedArray;Cn.aggNums=function(e,t,r,i){var a,s;if((!i||i>r.length)&&(i=r.length),zy(t)||(t=!1),xK(r[0])){for(s=new Array(i),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var M9=de((Jye,A9)=>{"use strict";var b9=u0(),uw=b9.mod,bK=b9.modHalf,Iy=Math.PI,Ch=2*Iy;function wK(e){return e/180*Iy}function TK(e){return e/Iy*180}function fw(e){return Math.abs(e[1]-e[0])>Ch-1e-14}function w9(e,t){return bK(t-e,Ch)}function AK(e,t){return Math.abs(w9(e,t))}function T9(e,t){if(fw(t))return!0;var r,i;t[0]i&&(i+=Ch);var a=uw(e,Ch),s=a+Ch;return a>=r&&a<=i||s>=r&&s<=i}function MK(e,t,r,i){if(!T9(t,i))return!1;var a,s;return r[0]=a&&e<=s}function cw(e,t,r,i,a,s,l){a=a||0,s=s||0;var f=fw([r,i]),h,v,m,b,T;f?(h=0,v=Iy,m=Ch):r{"use strict";id.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};id.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};id.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};id.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};id.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};id.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var E9=de(nd=>{"use strict";var hw=u0().mod;nd.segmentsIntersect=C9;function C9(e,t,r,i,a,s,l,f){var h=r-e,v=a-e,m=l-a,b=i-t,T=s-t,S=f-s,C=h*S-m*b;if(C===0)return null;var P=(v*S-m*T)/C,E=(v*b-h*T)/C;return E<0||E>1||P<0||P>1?null:{x:e+h*P,y:t+b*P}}nd.segmentDistance=function(t,r,i,a,s,l,f,h){if(C9(t,r,i,a,s,l,f,h))return 0;var v=i-t,m=a-r,b=f-s,T=h-l,S=v*v+m*m,C=b*b+T*T,P=Math.min(__(v,m,S,s-t,l-r),__(v,m,S,f-t,h-r),__(b,T,C,t-s,r-l),__(b,T,C,i-s,a-l));return Math.sqrt(P)};function __(e,t,r,i,a){var s=i*e+a*t;if(s<0)return i*i+a*a;if(s>r){var l=i-e,f=a-t;return l*l+f*f}else{var h=i*t-a*e;return h*h/r}}var x_,vw,k9;nd.getTextLocation=function(t,r,i,a){if((t!==vw||a!==k9)&&(x_={},vw=t,k9=a),x_[i])return x_[i];var s=t.getPointAtLength(hw(i-a/2,r)),l=t.getPointAtLength(hw(i+a/2,r)),f=Math.atan((l.y-s.y)/(l.x-s.x)),h=t.getPointAtLength(hw(i,r)),v=(h.x*4+s.x+l.x)/6,m=(h.y*4+s.y+l.y)/6,b={x:v,y:m,theta:f};return x_[i]=b,b};nd.clearLocationCache=function(){vw=null};nd.getVisibleSegment=function(t,r,i){var a=r.left,s=r.right,l=r.top,f=r.bottom,h=0,v=t.getTotalLength(),m=v,b,T;function S(P){var E=t.getPointAtLength(P);P===0?b=E:P===v&&(T=E);var I=E.xs?E.x-s:0,F=E.yf?E.y-f:0;return Math.sqrt(I*I+F*F)}for(var C=S(h);C;){if(h+=C+i,h>m)return;C=S(h)}for(C=S(m);C;){if(m-=C+i,h>m)return;C=S(m)}return{min:h,max:m,len:m-h,total:v,isClosed:h===0&&m===v&&Math.abs(b.x-T.x)<.1&&Math.abs(b.y-T.y)<.1}};nd.findPointOnPath=function(t,r,i,a){a=a||{};for(var s=a.pathLength||t.getTotalLength(),l=a.tolerance||.001,f=a.iterationLimit||30,h=t.getPointAtLength(0)[i]>t.getPointAtLength(s)[i]?-1:1,v=0,m=0,b=s,T,S,C;v0?b=T:m=T,v++}return S}});var b_=de(Ry=>{"use strict";var mc={};Ry.throttle=function(t,r,i){var a=mc[t],s=Date.now();if(!a){for(var l in mc)mc[l].tsa.ts+r){f();return}a.timer=setTimeout(function(){f(),a.timer=null},r)};Ry.done=function(e){var t=mc[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var i=t.onDone;t.onDone=function(){i&&i(),r(),t.onDone=null}})};Ry.clear=function(e){if(e)L9(mc[e]),delete mc[e];else for(var t in mc)Ry.clear(t)};function L9(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var D9=de((ege,P9)=>{"use strict";P9.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var z9=de((tge,w_)=>{"use strict";w_.exports=dw;w_.exports.isMobile=dw;w_.exports.default=dw;var EK=/(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,LK=/CrOS/,PK=/android|ipad|playbook|silk/i;function dw(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=EK.test(t)&&!LK.test(t)||!!e.tablet&&PK.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var R9=de((rge,I9)=>{"use strict";var DK=Da(),zK=z9();I9.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=IK(),typeof r!="string")return!0;var i=zK({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!i)for(var a=r.split(" "),s=1;s-1;f--){var h=a[f];if(h.substr(0,8)==="Version/"){var v=h.substr(8).split(".")[0];if(DK(v)&&(v=+v),v>=13)return!0}}}return i};function IK(){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 q9=de((age,F9)=>{"use strict";var RK=ja();F9.exports=function(t,r,i){var a=t.selectAll("g."+i.replace(/\s/g,".")).data(r,function(l){return l[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",i),a.order();var s=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(l){l[0][s]=RK.select(this)}),a}});var B9=de((ige,N9)=>{"use strict";var FK=la();N9.exports=function(t,r){for(var i=t._context.locale,a=0;a<2;a++){for(var s=t._context.locales,l=0;l<2;l++){var f=(s[i]||{}).dictionary;if(f){var h=f[r];if(h)return h}s=FK.localeRegistry}var v=i.split("-")[0];if(v===i)break;i=v}return r}});var U9=de((nge,O9)=>{"use strict";O9.exports=function(t){for(var r={},i=[],a=0,s=0;s{"use strict";V9.exports=function(t){for(var r=BK(t)?NK:qK,i=[],a=0;a{"use strict";G9.exports=function(t,r){if(!r)return t;var i=1/Math.abs(r),a=i>1?(i*t+i*r)/i:t+r,s=String(a).length;if(s>16){var l=String(r).length,f=String(t).length;if(s>=f+l){var h=parseFloat(a).toPrecision(12);h.indexOf("e+")===-1&&(a=+h)}}return a}});var W9=de((lge,Y9)=>{"use strict";var OK=Da(),UK=Hi().BADNUM,VK=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Y9.exports=function(t){return typeof t=="string"&&(t=t.replace(VK,"")),OK(t)?Number(t):UK}});var Bt=de((uge,ok)=>{"use strict";var Fy=ja(),HK=s0().utcFormat,GK=q3().format,$9=Da(),ek=Hi(),tk=ek.FP_SAFE,ZK=-tk,X9=ek.BADNUM,$e=ok.exports={};$e.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 j9={};$e.warnBadFormat=function(e){var t=String(e);j9[t]||(j9[t]=1,$e.warn('encountered bad format: "'+t+'"'))};$e.noFormat=function(e){return String(e)};$e.numberFormat=function(e){var t;try{t=GK($e.adjustFormat(e))}catch(r){return $e.warnBadFormat(e),$e.noFormat}return t};$e.nestedProperty=wy();$e.keyedContainer=B7();$e.relativeAttr=U7();$e.isPlainObject=cc();$e.toLogRange=J1();$e.relinkPrivateKeys=Z7();var Eh=il();$e.isArrayBuffer=Eh.isArrayBuffer;$e.isTypedArray=Eh.isTypedArray;$e.isArrayOrTypedArray=Eh.isArrayOrTypedArray;$e.isArray1D=Eh.isArray1D;$e.ensureArray=Eh.ensureArray;$e.concat=Eh.concat;$e.maxRowLength=Eh.maxRowLength;$e.minRowLength=Eh.minRowLength;var rk=u0();$e.mod=rk.mod;$e.modHalf=rk.modHalf;var Lh=f8();$e.valObjectMeta=Lh.valObjectMeta;$e.coerce=Lh.coerce;$e.coerce2=Lh.coerce2;$e.coerceFont=Lh.coerceFont;$e.coercePattern=Lh.coercePattern;$e.coerceHoverinfo=Lh.coerceHoverinfo;$e.coerceSelectionMarkerOpacity=Lh.coerceSelectionMarkerOpacity;$e.validate=Lh.validate;var ol=y9();$e.dateTime2ms=ol.dateTime2ms;$e.isDateTime=ol.isDateTime;$e.ms2DateTime=ol.ms2DateTime;$e.ms2DateTimeLocal=ol.ms2DateTimeLocal;$e.cleanDate=ol.cleanDate;$e.isJSDate=ol.isJSDate;$e.formatDate=ol.formatDate;$e.incrementMonth=ol.incrementMonth;$e.dateTick0=ol.dateTick0;$e.dfltRange=ol.dfltRange;$e.findExactDates=ol.findExactDates;$e.MIN_MS=ol.MIN_MS;$e.MAX_MS=ol.MAX_MS;var od=lw();$e.findBin=od.findBin;$e.sorterAsc=od.sorterAsc;$e.sorterDes=od.sorterDes;$e.distinctVals=od.distinctVals;$e.roundUp=od.roundUp;$e.sort=od.sort;$e.findIndexOfMin=od.findIndexOfMin;$e.sortObjectKeys=g_();var yc=x9();$e.aggNums=yc.aggNums;$e.len=yc.len;$e.mean=yc.mean;$e.geometricMean=yc.geometricMean;$e.median=yc.median;$e.midRange=yc.midRange;$e.variance=yc.variance;$e.stdev=yc.stdev;$e.interp=yc.interp;var Du=o_();$e.init2dArray=Du.init2dArray;$e.transposeRagged=Du.transposeRagged;$e.dot=Du.dot;$e.translationMatrix=Du.translationMatrix;$e.rotationMatrix=Du.rotationMatrix;$e.rotationXYMatrix=Du.rotationXYMatrix;$e.apply3DTransform=Du.apply3DTransform;$e.apply2DTransform=Du.apply2DTransform;$e.apply2DTransform2=Du.apply2DTransform2;$e.convertCssMatrix=Du.convertCssMatrix;$e.inverseTransformMatrix=Du.inverseTransformMatrix;var Sf=M9();$e.deg2rad=Sf.deg2rad;$e.rad2deg=Sf.rad2deg;$e.angleDelta=Sf.angleDelta;$e.angleDist=Sf.angleDist;$e.isFullCircle=Sf.isFullCircle;$e.isAngleInsideSector=Sf.isAngleInsideSector;$e.isPtInsideSector=Sf.isPtInsideSector;$e.pathArc=Sf.pathArc;$e.pathSector=Sf.pathSector;$e.pathAnnulus=Sf.pathAnnulus;var x0=S9();$e.isLeftAnchor=x0.isLeftAnchor;$e.isCenterAnchor=x0.isCenterAnchor;$e.isRightAnchor=x0.isRightAnchor;$e.isTopAnchor=x0.isTopAnchor;$e.isMiddleAnchor=x0.isMiddleAnchor;$e.isBottomAnchor=x0.isBottomAnchor;var b0=E9();$e.segmentsIntersect=b0.segmentsIntersect;$e.segmentDistance=b0.segmentDistance;$e.getTextLocation=b0.getTextLocation;$e.clearLocationCache=b0.clearLocationCache;$e.getVisibleSegment=b0.getVisibleSegment;$e.findPointOnPath=b0.findPointOnPath;var M_=hn();$e.extendFlat=M_.extendFlat;$e.extendDeep=M_.extendDeep;$e.extendDeepAll=M_.extendDeepAll;$e.extendDeepNoArrays=M_.extendDeepNoArrays;var pw=Th();$e.log=pw.log;$e.warn=pw.warn;$e.error=pw.error;var YK=c0();$e.counterRegex=YK.counter;var mw=b_();$e.throttle=mw.throttle;$e.throttleDone=mw.done;$e.clearThrottle=mw.clear;var zu=Ey();$e.getGraphDiv=zu.getGraphDiv;$e.isPlotDiv=zu.isPlotDiv;$e.removeElement=zu.removeElement;$e.addStyleRule=zu.addStyleRule;$e.addRelatedStyleRule=zu.addRelatedStyleRule;$e.deleteRelatedStyleRule=zu.deleteRelatedStyleRule;$e.setStyleOnHover=zu.setStyleOnHover;$e.getFullTransformMatrix=zu.getFullTransformMatrix;$e.getElementTransformMatrix=zu.getElementTransformMatrix;$e.getElementAndAncestors=zu.getElementAndAncestors;$e.equalDomRects=zu.equalDomRects;$e.clearResponsive=D9();$e.preserveDrawingBuffer=R9();$e.makeTraceGroups=q9();$e._=B9();$e.notifier=X3();$e.filterUnique=U9();$e.filterVisible=H9();$e.pushUnique=K3();$e.increment=Z9();$e.cleanNumber=W9();$e.ensureNumber=function(t){return $9(t)?(t=Number(t),t>tk||t=t?!1:$9(e)&&e>=0&&e%1===0};$e.noop=n_();$e.identity=y_();$e.repeat=function(e,t){for(var r=new Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};$e.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};$e.simpleMap=function(e,t,r,i,a){for(var s=e.length,l=new Array(s),f=0;f=Math.pow(2,r)?a>10?($e.warn("randstr failed uniqueness"),l):e(t,r,i,(a||0)+1):l};$e.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r};$e.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,i=2*r,a=2*t-1,s=new Array(a),l=new Array(r),f,h,v,m;for(f=0;f=i&&(v-=i*Math.floor(v/i)),v<0?v=-1-v:v>=r&&(v=i-1-v),m+=e[v]*s[h];l[f]=m}return l};$e.syncOrAsync=function(e,t,r){var i,a;function s(){return $e.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],i=a(t),i&&i.then)return i.then(s);return r&&r(t)};$e.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};$e.noneOrAll=function(e,t,r){if(e){var i=!1,a=!0,s,l;for(s=0;s0?a:0})};$e.fillArray=function(e,t,r,i){if(i=i||$e.identity,$e.isArrayOrTypedArray(e))for(var a=0;a1?a+l[1]:"";if(s&&(l.length>1||f.length>4||r))for(;i.test(f);)f=f.replace(i,"$1"+s+"$2");return f+h};$e.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var nk=/^\w*$/;$e.templateString=function(e,t){var r={};return e.replace($e.TEMPLATE_STRING_REGEX,function(i,a){var s;return nk.test(a)?s=t[a]:(r[a]=r[a]||$e.nestedProperty(t,a).get,s=r[a]()),$e.isValidTextValue(s)?s:""})};var QK={max:10,count:0,name:"hovertemplate"};$e.hovertemplateString=function(){return yw.apply(QK,arguments)};var $K={max:10,count:0,name:"texttemplate"};$e.texttemplateString=function(){return yw.apply($K,arguments)};var eQ=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function tQ(e){var t=e.match(eQ);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var rQ={max:10,count:0,name:"texttemplate",parseMultDiv:!0};$e.texttemplateStringForShapes=function(){return yw.apply(rQ,arguments)};var J9=/^[:|\|]/;function yw(e,t,r){var i=this,a=arguments;t||(t={});var s={};return e.replace($e.TEMPLATE_STRING_REGEX,function(l,f,h){var v=f==="xother"||f==="yother",m=f==="_xother"||f==="_yother",b=f==="_xother_"||f==="_yother_",T=f==="xother_"||f==="yother_",S=v||m||T||b,C=f;(m||b)&&(C=C.substring(1)),(T||b)&&(C=C.substring(0,C.length-1));var P=null,E=null;if(i.parseMultDiv){var I=tQ(C);C=I.key,P=I.op,E=I.number}var F;if(S){if(F=t[C],F===void 0)return""}else{var N,z;for(z=3;z=A_&&l<=K9,v=f>=A_&&f<=K9;if(h&&(i=10*i+l-A_),v&&(a=10*a+f-A_),!h||!v){if(i!==a)return i-a;if(l!==f)return l-f}}return a-i};var _0=2e9;$e.seedPseudoRandom=function(){_0=2e9};$e.pseudoRandom=function(){var e=_0;return _0=(69069*_0+1)%4294967296,Math.abs(_0-e)<429496729?$e.pseudoRandom():_0/4294967296};$e.fillText=function(e,t,r){var i=Array.isArray(r)?function(l){r.push(l)}:function(l){r.text=l},a=$e.extractOption(e,t,"htx","hovertext");if($e.isValidTextValue(a))return i(a);var s=$e.extractOption(e,t,"tx","text");if($e.isValidTextValue(s))return i(s)};$e.isValidTextValue=function(e){return e||e===0};$e.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i1&&(v=1):v=0,$e.strTranslate(a-v*(r+l),s-v*(i+f))+$e.strScale(v)+(h?"rotate("+h+(t?"":" "+r+" "+i)+")":"")};$e.setTransormAndDisplay=function(e,t){e.attr("transform",$e.getTextTransform(t)),e.style("display",t.scale?null:"none")};$e.ensureUniformFontSize=function(e,t){var r=$e.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};$e.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)};$e.bigFont=function(e){return Math.round(1.2*e)};var Q9=$e.getFirefoxVersion(),aQ=Q9!==null&&Q9<86;$e.getPositionFromD3Event=function(){return aQ?[Fy.event.layerX,Fy.event.layerY]:[Fy.event.offsetX,Fy.event.offsetY]}});var uk=de(()=>{"use strict";var iQ=Bt(),sk={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(gw in sk)lk=gw.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),iQ.addStyleRule(lk,sk[gw]);var lk,gw});var _w=de((hge,fk)=>{fk.exports=!0});var bw=de((vge,ck)=>{"use strict";var nQ=_w(),xw;typeof window.matchMedia=="function"?xw=!window.matchMedia("(hover: none)").matches:xw=nQ;ck.exports=xw});var C_=de((dge,ww)=>{"use strict";var w0=typeof Reflect=="object"?Reflect:null,hk=w0&&typeof w0.apply=="function"?w0.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},S_;w0&&typeof w0.ownKeys=="function"?S_=w0.ownKeys:Object.getOwnPropertySymbols?S_=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:S_=function(t){return Object.getOwnPropertyNames(t)};function oQ(e){console&&console.warn&&console.warn(e)}var dk=Number.isNaN||function(t){return t!==t};function Gi(){Gi.init.call(this)}ww.exports=Gi;ww.exports.once=fQ;Gi.EventEmitter=Gi;Gi.prototype._events=void 0;Gi.prototype._eventsCount=0;Gi.prototype._maxListeners=void 0;var vk=10;function k_(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Gi,"defaultMaxListeners",{enumerable:!0,get:function(){return vk},set:function(e){if(typeof e!="number"||e<0||dk(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");vk=e}});Gi.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};Gi.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||dk(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 pk(e){return e._maxListeners===void 0?Gi.defaultMaxListeners:e._maxListeners}Gi.prototype.getMaxListeners=function(){return pk(this)};Gi.prototype.emit=function(t){for(var r=[],i=1;i0&&(l=r[0]),l instanceof Error)throw l;var f=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw f.context=l,f}var h=s[t];if(h===void 0)return!1;if(typeof h=="function")hk(h,this,r);else for(var v=h.length,m=xk(h,v),i=0;i0&&l.length>a&&!l.warned){l.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=l.length,oQ(f)}return e}Gi.prototype.addListener=function(t,r){return mk(this,t,r,!1)};Gi.prototype.on=Gi.prototype.addListener;Gi.prototype.prependListener=function(t,r){return mk(this,t,r,!0)};function sQ(){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 yk(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=sQ.bind(i);return a.listener=r,i.wrapFn=a,a}Gi.prototype.once=function(t,r){return k_(r),this.on(t,yk(this,t,r)),this};Gi.prototype.prependOnceListener=function(t,r){return k_(r),this.prependListener(t,yk(this,t,r)),this};Gi.prototype.removeListener=function(t,r){var i,a,s,l,f;if(k_(r),a=this._events,a===void 0)return this;if(i=a[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(s=-1,l=i.length-1;l>=0;l--)if(i[l]===r||i[l].listener===r){f=i[l].listener,s=l;break}if(s<0)return this;s===0?i.shift():lQ(i,s),i.length===1&&(a[t]=i[0]),a.removeListener!==void 0&&this.emit("removeListener",t,f||r)}return this};Gi.prototype.off=Gi.prototype.removeListener;Gi.prototype.removeAllListeners=function(t){var r,i,a;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var s=Object.keys(i),l;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function gk(e,t,r){var i=e._events;if(i===void 0)return[];var a=i[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?uQ(a):xk(a,a.length)}Gi.prototype.listeners=function(t){return gk(this,t,!0)};Gi.prototype.rawListeners=function(t){return gk(this,t,!1)};Gi.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):_k.call(e,t)};Gi.prototype.listenerCount=_k;function _k(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}Gi.prototype.eventNames=function(){return this._eventsCount>0?S_(this._events):[]};function xk(e,t){for(var r=new Array(t),i=0;i{"use strict";var Tw=C_().EventEmitter,hQ={init:function(e){if(e._ev instanceof Tw)return e;var t=new Tw,r=new Tw;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(i,a){t.emit(i,a),r.emit(i,a)},e},triggerHandler:function(e,t,r){var i,a=e._ev;if(!a)return;var s=a._events[t];if(!s)return;function l(h){if(h.listener){if(a.removeListener(t,h.listener),!h.fired)return h.fired=!0,h.listener.apply(a,[r])}else return h.apply(a,[r])}s=Array.isArray(s)?s:[s];var f;for(f=0;f{"use strict";var Tk=Bt(),vQ=rd().dfltConfig;function dQ(e,t){for(var r=[],i,a=0;avQ.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};gc.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};gc.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};gc.undo=function(t){var r,i;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,i=0;i=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,i=0;i{"use strict";Sk.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var M0=de(Yn=>{"use strict";var Zl=la(),Ny=Bt(),L_=ms(),Mw=d0(),pQ=Aw(),mQ=Ly(),yQ=rd().configAttributes,kk=nl(),Iu=Ny.extendDeepAll,T0=Ny.isPlainObject,gQ=Ny.isArrayOrTypedArray,P_=Ny.nestedProperty,_Q=Ny.valObjectMeta,Sw="_isSubplotObj",D_="_isLinkedToArray",xQ="_arrayAttrRegexps",Ek="_deprecated",kw=[Sw,D_,xQ,Ek];Yn.IS_SUBPLOT_OBJ=Sw;Yn.IS_LINKED_TO_ARRAY=D_;Yn.DEPRECATED=Ek;Yn.UNDERSCORE_ATTRS=kw;Yn.get=function(){var e={};return Zl.allTypes.forEach(function(t){e[t]=wQ(t)}),{defs:{valObjects:_Q,metaKeys:kw.concat(["description","role","editType","impliedEdits"]),editType:{traces:kk.traces,layout:kk.layout},impliedEdits:{}},traces:e,layout:TQ(),frames:AQ(),animation:A0(mQ),config:A0(yQ)}};Yn.crawl=function(e,t,r,i){var a=r||0;i=i||"",Object.keys(e).forEach(function(s){var l=e[s];if(kw.indexOf(s)===-1){var f=(i?i+".":"")+s;t(l,s,e,a,f),!Yn.isValObject(l)&&T0(l)&&s!=="impliedEdits"&&Yn.crawl(l,t,a+1,f)}})};Yn.isValObject=function(e){return e&&e.valType!==void 0};Yn.findArrayAttributes=function(e){var t=[],r=[],i=[],a,s;function l(h,v,m,b){r=r.slice(0,b).concat([v]),i=i.slice(0,b).concat([h&&h._isLinkedToArray]);var T=h&&(h.valType==="data_array"||h.arrayOk===!0)&&!(r[b-1]==="colorbar"&&(v==="ticktext"||v==="tickvals"));T&&f(a,0,"")}function f(h,v,m){var b=h[r[v]],T=m+r[v];if(v===r.length-1)gQ(b)&&t.push(s+T);else if(i[v]){if(Array.isArray(b))for(var S=0;S=s.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var l=t[r];if(!E_(l))return!1;e=s[a][l]}else e=s[a]}else e=s}}return e}function E_(e){return e===Math.round(e)&&e>=0}function wQ(e){var t,r;t=Zl.modules[e]._module,r=t.basePlotModule;var i={};i.type=null;var a=Iu({},L_),s=Iu({},t.attributes);Yn.crawl(s,function(h,v,m,b,T){P_(a,T).set(void 0),h===void 0&&P_(s,T).set(void 0)}),Iu(i,a),Zl.traceIs(e,"noOpacity")&&delete i.opacity,Zl.traceIs(e,"showLegend")||(delete i.showlegend,delete i.legendgroup),Zl.traceIs(e,"noHover")&&(delete i.hoverinfo,delete i.hoverlabel),t.selectPoints||delete i.selectedpoints,Iu(i,s),r.attributes&&Iu(i,r.attributes),i.type=e;var l={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:A0(i)};if(t.layoutAttributes){var f={};Iu(f,t.layoutAttributes),l.layoutAttributes=A0(f)}return t.animatable||Yn.crawl(l,function(h){Yn.isValObject(h)&&"anim"in h&&delete h.anim}),l}function TQ(){var e={},t,r;Iu(e,Mw);for(t in Zl.subplotsRegistry)if(r=Zl.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var i=0;i{"use strict";var S0=Bt(),EQ=ms(),Ph="templateitemname",Cw={name:{valType:"string",editType:"none"}};Cw[Ph]={valType:"string",editType:"calc"};sd.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=Cw.name,t[Ph]=Cw[Ph],t};sd.traceTemplater=function(e){var t={},r,i;for(r in e)i=e[r],Array.isArray(i)&&i.length&&(t[r]=0);function a(s){r=S0.coerce(s,{},EQ,"type");var l={type:r,_template:null};if(r in t){i=e[r];var f=t[r]%i.length;t[r]++,l._template=i[f]}return l}return{newTrace:a}};sd.newContainer=function(e,t,r){var i=e._template,a=i&&(i[t]||r&&i[r]);S0.isPlainObject(a)||(a=null);var s=e[t]={_template:a};return s};sd.arrayTemplater=function(e,t,r){var i=e._template,a=i&&i[Dk(t)],s=i&&i[t];(!Array.isArray(s)||!s.length)&&(s=[]);var l={};function f(v){var m={name:v.name,_input:v},b=m[Ph]=v[Ph];if(!Pk(b))return m._template=a,m;for(var T=0;T=i&&(r._input||{})._templateitemname;s&&(a=i);var l=t+"["+a+"]",f;function h(){f={},s&&(f[l]={},f[l][Ph]=s)}h();function v(S,C){f[S]=C}function m(S,C){s?S0.nestedProperty(f[l],S).set(C):f[l+"."+S]=C}function b(){var S=f;return h(),S}function T(S,C){S&&m(S,C);var P=b();for(var E in P)S0.nestedProperty(e,E).set(P[E])}return{modifyBase:v,modifyItem:m,getUpdateObj:b,applyUpdate:T}}});var Ao=de((xge,zk)=>{"use strict";var By=c0().counter;zk.exports={idRegex:{x:By("x","( domain)?"),y:By("y","( domain)?")},attrRegex:By("[xy]axis"),xAxisMatch:By("xaxis"),yAxisMatch:By("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 $n=de(Ns=>{"use strict";var LQ=la(),Ew=Ao();Ns.id2name=function(t){if(!(typeof t!="string"||!t.match(Ew.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Ns.name2id=function(t){if(t.match(Ew.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Ns.cleanId=function(t,r,i){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(Ew.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!i)){var s=t.split(" ")[0].substr(1).replace(/^0+/,"");return s==="1"&&(s=""),t.charAt(0)+s+(a&&i?" domain":"")}};Ns.list=function(e,t,r){var i=e._fullLayout;if(!i)return[];var a=Ns.listIds(e,t),s=new Array(a.length),l;for(l=0;li?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Ns.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Ik(e,t){if(t&&t.length){for(var r=0;r{"use strict";function PQ(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function DQ(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Rk.exports={clearOutlineControllers:PQ,clearOutline:DQ}});var z_=de((Tge,Fk)=>{"use strict";Fk.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var F_=de(R_=>{"use strict";var I_=la(),Age=Ao().SUBPLOT_PATTERN;R_.getSubplotCalcData=function(e,t,r){var i=I_.subplotsRegistry[t];if(!i)return[];for(var a=i.attr,s=[],l=0;l{"use strict";var zQ=la(),k0=Bt();ld.manageCommandObserver=function(e,t,r,i){var a={},s=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var l=ld.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(l)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(l){qk(e,l,a.cache),a.check=function(){if(s){var m=qk(e,l,a.cache);return m.changed&&i&&a.lookupTable[m.value]!==void 0&&(a.disable(),Promise.resolve(i({value:m.value,type:l.type,prop:l.prop,traces:l.traces,index:a.lookupTable[m.value]})).then(a.enable,a.enable)),m.changed}};for(var f=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h0?".":"")+a;k0.isPlainObject(s)?Lw(s,t,l,i+1):t(l,a,s)}})}});var eo=de((kge,eC)=>{"use strict";var Wk=ja(),RQ=s0().timeFormatLocale,FQ=q3().formatLocale,Oy=Da(),qQ=N3(),ai=la(),Xk=M0(),NQ=Di(),Pr=Bt(),jk=Ua(),Uk=Hi().BADNUM,Bs=$n(),BQ=Dh().clearOutline,OQ=z_(),Pw=Ly(),UQ=Aw(),VQ=F_().getModuleCalcData,Vk=Pr.relinkPrivateKeys,ud=Pr._,yr=eC.exports={};Pr.extendFlat(yr,ai);yr.attributes=ms();yr.attributes.type.values=yr.allTypes;yr.fontAttrs=qo();yr.layoutAttributes=d0();var N_=Ok();yr.executeAPICommand=N_.executeAPICommand;yr.computeAPICommandBindings=N_.computeAPICommandBindings;yr.manageCommandObserver=N_.manageCommandObserver;yr.hasSimpleAPICommandBindings=N_.hasSimpleAPICommandBindings;yr.redrawText=function(e){return e=Pr.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(ai.getComponentMethod("annotations","draw")(e),ai.getComponentMethod("legend","draw")(e),ai.getComponentMethod("colorbar","draw")(e),t(yr.previousPromises(e)))},300)})};yr.resize=function(e){e=Pr.getGraphDiv(e);var t,r=new Promise(function(i,a){(!e||Pr.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=i,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Pr.isHidden(e)){i(e);return}delete e.layout.width,delete e.layout.height;var s=e.changed;e.autoplay=!0,ai.call("relayout",e,{autosize:!0}).then(function(){e.changed=s,e._resolveResize===i&&(delete e._resolveResize,i(e))})},100)});return t&&t(r),r};yr.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};yr.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Pr.ensureSingle(t._paper,"text","js-plot-link-container",function(h){h.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:jk.defaultLine,"pointer-events":"all"}).each(function(){var v=Wk.select(this);v.append("tspan").classed("js-link-to-tool",!0),v.append("tspan").classed("js-link-spacer",!0),v.append("tspan").classed("js-sourcelinks",!0)})}),i=r.node(),a={y:t._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),r.attr(a);var s=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),f=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&HQ(e,s),l.text(s.text()&&f.text()?" - ":"")}};function HQ(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(){yr.sendDataToCloud(e)});else{var i=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+i[2].split(".")[0]+"/"+i[1]+a})}}yr.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Wk.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),a=i.append("input").attr({type:"text",name:"data"});return a.node().value=yr.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var GQ=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],ZQ=["year","month","dayMonth","dayMonthYear"];yr.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,i=e._fullLayout||{};if(i._skipDefaults){delete i._skipDefaults;return}var a=e._fullLayout={},s=e.layout||{},l=e._fullData||[],f=e._fullData=[],h=e.data||[],v=e.calcdata||[],m=e._context||{},b;e._transitionData||yr.createTransitionData(e),a._dfltTitle={plot:ud(e,"Click to enter Plot title"),subtitle:ud(e,"Click to enter Plot subtitle"),x:ud(e,"Click to enter X axis title"),y:ud(e,"Click to enter Y axis title"),colorbar:ud(e,"Click to enter Colorscale title"),annotation:ud(e,"new text")},a._traceWord=ud(e,"trace");var T=Hk(e,GQ);if(a._mapboxAccessToken=m.mapboxAccessToken,i._initialAutoSizeIsDone){var S=i.width,C=i.height;yr.supplyLayoutGlobalDefaults(s,a,T),s.width||(a.width=S),s.height||(a.height=C),yr.sanitizeMargins(a)}else{yr.supplyLayoutGlobalDefaults(s,a,T);var P=!s.width||!s.height,E=a.autosize,I=m.autosizable,F=P&&(E||I);F?yr.plotAutoSize(e,s,a):P&&yr.sanitizeMargins(a),!E&&P&&(s.width=a.width,s.height=a.height)}a._d3locale=XQ(T,a.separators),a._extraFormat=Hk(e,ZQ),a._initialAutoSizeIsDone=!0,a._dataLength=h.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var N=a._subplots=WQ(),z=a._splomAxes={x:{},y:{}},O=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=YQ(l,h),yr.supplyDataDefaults(h,f,s,a);var H=Object.keys(z.x),V=Object.keys(z.y);if(H.length>1&&V.length>1){for(ai.getComponentMethod("grid","sizeDefaults")(s,a),b=0;b15&&V.length>15&&a.shapes.length===0&&a.images.length===0,yr.linkSubplots(f,a,l,i),yr.cleanPlot(f,a,l,i);var ne=!!(i._has&&i._has("cartesian")),fe=!!(a._has&&a._has("cartesian")),ve=ne,Ce=fe;ve&&!Ce?i._bgLayer.remove():Ce&&!ve&&(a._shouldCreateBgLayer=!0),i._zoomlayer&&!e._dragging&&BQ({_fullLayout:i}),jQ(f,a),Vk(a,i),ai.getComponentMethod("colorscale","crossTraceDefaults")(f,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var Se=a._tracePreGUI,Te={},pe;for(pe in Se)Te[pe]="old";for(b=0;b0){var m=1-2*s;l=Math.round(m*l),f=Math.round(m*f)}}var b=yr.layoutAttributes.width.min,T=yr.layoutAttributes.height.min;l1,C=!r.height&&Math.abs(i.height-f)>1;(C||S)&&(S&&(i.width=l),C&&(i.height=f)),t._initialAutoSize||(t._initialAutoSize={width:l,height:f}),yr.sanitizeMargins(i)};yr.supplyLayoutModuleDefaults=function(e,t,r,i){var a=ai.componentsRegistry,s=t._basePlotModules,l,f,h,v=ai.subplotsRegistry.cartesian;for(l in a)h=a[l],h.includeBasePlot&&h.includeBasePlot(e,t);s.length||s.push(v),t._has("cartesian")&&(ai.getComponentMethod("grid","contentDefaults")(e,t),v.finalizeSubplots(e,t));for(var m in t._subplots)t._subplots[m].sort(Pr.subplotSort);for(f=0;f1&&(r.l/=E,r.r/=E)}if(T){var I=(r.t+r.b)/T;I>1&&(r.t/=I,r.b/=I)}var F=r.xl!==void 0?r.xl:r.x,N=r.xr!==void 0?r.xr:r.x,z=r.yt!==void 0?r.yt:r.y,O=r.yb!==void 0?r.yb:r.y;S[t]={l:{val:F,size:r.l+P},r:{val:N,size:r.r+P},b:{val:O,size:r.b+P},t:{val:z,size:r.t+P}},C[t]=1}if(!i._replotting)return yr.doAutoMargin(e)}};function KQ(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Bs.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}yr.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,i=t.height;t._size||(t._size={}),Jk(t);var a=t._size,s=t.margin,l={t:0,b:0,l:0,r:0},f=Pr.extendFlat({},a),h=s.l,v=s.r,m=s.t,b=s.b,T=t._pushmargin,S=t._pushmarginIds,C=t.minreducedwidth,P=t.minreducedheight;if(s.autoexpand!==!1){for(var E in T)S[E]||delete T[E];var I=e._fullLayout._reservedMargin;for(var F in I)for(var N in I[F]){var z=I[F][N];l[N]=Math.max(l[N],z)}T.base={l:{val:0,size:h},r:{val:1,size:v},t:{val:1,size:m},b:{val:0,size:b}};for(var O in l){var H=0;for(var V in T)V!=="base"&&Oy(T[V][O].size)&&(H=T[V][O].size>H?T[V][O].size:H);var W=Math.max(0,s[O]-H);l[O]=Math.max(0,l[O]-W)}for(var J in T){var re=T[J].l||{},oe=T[J].b||{},ne=re.val,fe=re.size,ve=oe.val,Ce=oe.size,Se=r-l.r-l.l,Te=i-l.t-l.b;for(var pe in T){if(Oy(fe)&&T[pe].r){var Ae=T[pe].r.val,Me=T[pe].r.size;if(Ae>ne){var Le=(fe*Ae+(Me-Se)*ne)/(Ae-ne),Ke=(Me*(1-ne)+(fe-Se)*(1-Ae))/(Ae-ne);Le+Ke>h+v&&(h=Le,v=Ke)}}if(Oy(Ce)&&T[pe].t){var ht=T[pe].t.val,it=T[pe].t.size;if(ht>ve){var lt=(Ce*ht+(it-Te)*ve)/(ht-ve),He=(it*(1-ve)+(Ce-Te)*(1-ht))/(ht-ve);lt+He>b+m&&(b=lt,m=He)}}}}}var _t=Pr.constrain(r-s.l-s.r,Kk,C),at=Pr.constrain(i-s.t-s.b,Qk,P),At=Math.max(0,r-_t),kt=Math.max(0,i-at);if(At){var pt=(h+v)/At;pt>1&&(h/=pt,v/=pt)}if(kt){var ge=(b+m)/kt;ge>1&&(b/=ge,m/=ge)}if(a.l=Math.round(h)+l.l,a.r=Math.round(v)+l.r,a.t=Math.round(m)+l.t,a.b=Math.round(b)+l.b,a.p=Math.round(s.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(i)-a.t-a.b,!t._replotting&&(yr.didMarginChange(f,a)||KQ(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Re=3*(1+Object.keys(S).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};yr.graphJson=function(e,t,r,i,a,s){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&yr.supplyDefaults(e);var l=a?e._fullData:e.data,f=a?e._fullLayout:e.layout,h=(e._transitionData||{})._frames;function v(T,S){if(typeof T=="function")return S?"_function_":null;if(Pr.isPlainObject(T)){var C={},P;return Object.keys(T).sort().forEach(function(N){if(["_","["].indexOf(N.charAt(0))===-1){if(typeof T[N]=="function"){S&&(C[N]="_function");return}if(r==="keepdata"){if(N.substr(N.length-3)==="src")return}else if(r==="keepstream"){if(P=T[N+"src"],typeof P=="string"&&P.indexOf(":")>0&&!Pr.isPlainObject(T.stream))return}else if(r!=="keepall"&&(P=T[N+"src"],typeof P=="string"&&P.indexOf(":")>0))return;C[N]=v(T[N],S)}}),C}var E=Array.isArray(T),I=Pr.isTypedArray(T);if((E||I)&&T.dtype&&T.shape){var F=T.bdata;return v({dtype:T.dtype,shape:T.shape,bdata:Pr.isArrayBuffer(F)?qQ.encode(F):F},S)}return E?T.map(function(N){return v(N,S)}):I?Pr.simpleMap(T,Pr.identity):Pr.isJSDate(T)?Pr.ms2DateTimeLocal(+T):T}var m={data:(l||[]).map(function(T){var S=v(T);return t&&delete S.fit,S})};if(!t&&(m.layout=v(f),a)){var b=f._size;m.layout.computed={margin:{b:b.b,l:b.l,r:b.r,t:b.t}}}return h&&(m.frames=v(h)),s&&(m.config=v(e._context,!0)),i==="object"?m:JSON.stringify(m)};yr.modifyFrames=function(e,t){var r,i,a,s=e._transitionData._frames,l=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return ai.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var T=0,S=0;function C(){return T++,function(){S++,!i&&S===T&&f(b)}}r.runFn(C),setTimeout(C())})}function f(b){if(e._transitionData)return s(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return ai.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(b)}function h(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var v=[yr.previousPromises,h,r.prepareFn,yr.rehover,yr.reselect,l],m=Pr.syncOrAsync(v,e);return(!m||!m.then)&&(m=Promise.resolve()),m.then(function(){return e})}yr.doCalcdata=function(e,t){var r=Bs.list(e),i=e._fullData,a=e._fullLayout,s,l,f,h,v=new Array(i.length),m=(e.calcdata||[]).slice();for(e.calcdata=v,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},f=0;f=0;h--)if(O[h].enabled){s._indexToPoints=O[h]._indexToPoints;break}l&&l.calc&&(z=l.calc(e,s))}(!Array.isArray(z)||!z[0])&&(z=[{x:Uk,y:Uk}]),z[0].t||(z[0].t={}),z[0].trace=s,v[F]=z}}for(Zk(r,i,a),f=0;f{"use strict";fd.xmlns="http://www.w3.org/2000/xmlns/";fd.svg="http://www.w3.org/2000/svg";fd.xlink="http://www.w3.org/1999/xlink";fd.svgAttrs={xmlns:fd.svg,"xmlns:xlink":fd.xlink}});var ts=de((Ege,tC)=>{"use strict";tC.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 co=de(Yl=>{"use strict";var Fn=ja(),_c=Bt(),t$=_c.strTranslate,Dw=zh(),r$=ts().LINE_SPACING,a$=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;Yl.convertToTspans=function(e,t,r){var i=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&i.match(a$),s=Fn.select(e.node().parentNode);if(s.empty())return;var l=e.attr("class")?e.attr("class").split(" ")[0]:"text";l+="-math",s.selectAll("svg."+l).remove(),s.selectAll("g."+l+"-group").remove(),e.style("display",null).attr({"data-unformatted":i,"data-math":"N"});function f(){s.empty()||(l=e.attr("class")+"-math",s.select("svg."+l).remove()),e.text("").style("white-space","pre");var h=m$(e.node(),i);h&&e.style("pointer-events","all"),Yl.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(h){e.style("display","none");var v=parseInt(e.node().style.fontSize,10),m={fontSize:v};s$(a[2],m,function(b,T,S){s.selectAll("svg."+l).remove(),s.selectAll("g."+l+"-group").remove();var C=b&&b.select("svg");if(!C||!C.node()){f(),h();return}var P=s.append("g").classed(l+"-group",!0).attr({"pointer-events":"none","data-unformatted":i,"data-math":"Y"});P.node().appendChild(C.node()),T&&T.node()&&C.node().insertBefore(T.node().cloneNode(!0),C.node().firstChild);var E=S.width,I=S.height;C.attr({class:l,height:I,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var F=e.node().style.fill||"black",N=C.select("g");N.attr({fill:F,stroke:F});var z=N.node().getBoundingClientRect(),O=z.width,H=z.height;(O>E||H>I)&&(C.style("overflow","hidden"),z=C.node().getBoundingClientRect(),O=z.width,H=z.height);var V=+e.attr("x"),W=+e.attr("y"),J=v||e.node().getBoundingClientRect().height,re=-J/4;if(l[0]==="y")P.attr({transform:"rotate("+[-90,V,W]+")"+t$(-O/2,re-H/2)});else if(l[0]==="l")W=re-H/2;else if(l[0]==="a"&&l.indexOf("atitle")!==0)V=0,W=re;else{var oe=e.attr("text-anchor");V=V-O*(oe==="middle"?.5:oe==="end"?1:0),W=W+re-H/2}C.attr({x:V,y:W}),r&&r.call(e,P),h(P)})})):f(),e};var i$=/(<|<|<)/g,n$=/(>|>|>)/g;function o$(e){return e.replace(i$,"\\lt ").replace(n$,"\\gt ")}var rC=[["$","$"],["\\(","\\)"]];function s$(e,t,r){var i=parseInt((MathJax.version||"").split(".")[0]);if(i!==2&&i!==3){_c.warn("No MathJax version:",MathJax.version);return}var a,s,l,f,h=function(){return s=_c.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:rC},displayAlign:"left"})},v=function(){s=_c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=rC},m=function(){if(a=MathJax.Hub.config.menuSettings.renderer,a!=="SVG")return MathJax.Hub.setRenderer("SVG")},b=function(){a=MathJax.config.startup.output,a!=="svg"&&(MathJax.config.startup.output="svg")},T=function(){var F="math-output-"+_c.randstr({},64);f=Fn.select("body").append("div").attr({id:F}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(o$(e));var N=f.node();return i===2?MathJax.Hub.Typeset(N):MathJax.typeset([N])},S=function(){var F=f.select(i===2?".MathJax_SVG":".MathJax"),N=!F.empty()&&f.select("svg").node();if(!N)_c.log("There was an error in the tex syntax.",e),r();else{var z=N.getBoundingClientRect(),O;i===2?O=Fn.select("body").select("#MathJax_SVG_glyphs"):O=F.select("defs"),r(F,O,z)}f.remove()},C=function(){if(a!=="SVG")return MathJax.Hub.setRenderer(a)},P=function(){a!=="svg"&&(MathJax.config.startup.output=a)},E=function(){return l!==void 0&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(s)},I=function(){MathJax.config=s};i===2?MathJax.Hub.Queue(h,m,T,S,C,E):i===3&&(v(),b(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){T(),S(),P(),I()}))}var oC={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"},l$={sub:"0.3em",sup:"-0.6em"},u$={sub:"-0.21em",sup:"0.42em"},aC="\u200B",iC=["http:","https:","mailto:","",void 0,":"],sC=Yl.NEWLINES=/(\r\n?|\n)/g,Iw=/(<[^<>]*>)/,Rw=/<(\/?)([^ >]*)(\s+(.*))?>/i,f$=//i;Yl.BR_TAG_ALL=//gi;var lC=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,uC=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,fC=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,c$=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function cd(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&B_(i)}var h$=/(^|;)\s*color:/;Yl.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,i=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",s=a.length,l=e.split(Iw),f=[],h="",v=0,m=0;ms?f.push(b.substr(0,P-s)+a):f.push(b.substr(0,P));break}h=""}}return f.join("")};var v$={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},d$=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B_(e){return e.replace(d$,function(t,r){var i;return r.charAt(0)==="#"?i=p$(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):i=v$[r],i||t})}Yl.convertEntities=B_;function p$(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 m$(e,t){t=t.replace(sC," ");var r=!1,i=[],a,s=-1;function l(){s++;var H=document.createElementNS(Dw.svg,"tspan");Fn.select(H).attr({class:"line",dy:s*r$+"em"}),e.appendChild(H),a=H;var V=i;if(i=[{node:H}],V.length>1)for(var W=1;W.",t);return}var V=i.pop();H!==V.type&&_c.log("Start tag <"+V.type+"> doesnt match end tag <"+H+">. Pretending it did match.",t),a=i[i.length-1].node}var m=f$.test(t);m?l():(a=e,i=[{node:e}]);for(var b=t.split(Iw),T=0;T{"use strict";var y$=ja(),U_=Tf(),Vy=Da(),O_=Bt(),hC=Ua(),g$=ed().isValid;function _$(e,t,r){var i=t?O_.nestedProperty(e,t).get()||{}:e,a=i[r||"color"];a&&a._inputArray&&(a=a._inputArray);var s=!1;if(O_.isArrayOrTypedArray(a)){for(var l=0;l=0;i--,a++){var s=e[i];r[a]=[1-s[0],s[1]]}return r}function gC(e,t){t=t||{};for(var r=e.domain,i=e.range,a=i.length,s=new Array(a),l=0;l{"use strict";var xC=rw(),b$=xC.FORMAT_LINK,w$=xC.DATE_FORMAT_LINK;function T$(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?Fw:bC)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function Fw(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: "+b$+"."].join(" ")}function bC(e,t){return Fw(e,t)+[" And for dates see: "+w$+".","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(" ")}wC.exports={axisHoverFormat:T$,descriptionOnlyNumbers:Fw,descriptionWithDates:bC}});var Ru=de((zge,BC)=>{"use strict";var TC=qo(),C0=Af(),NC=hc().dash,Bw=hn().extendFlat,AC=Di().templatedArray,MC=qw().descriptionWithDates,A$=Hi().ONEDAY,Cf=Ao(),M$=Cf.HOUR_PATTERN,S$=Cf.WEEKDAY_PATTERN,Nw={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},k$=Bw({},Nw,{values:Nw.values.slice().concat(["sync"])});function SC(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var kC={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},CC={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},EC={valType:"data_array",editType:"ticks"},LC={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function PC(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function DC(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var zC={valType:"color",dflt:C0.defaultLine,editType:"ticks"},IC={valType:"color",dflt:C0.lightLine,editType:"ticks"};function RC(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var FC=Bw({},NC,{editType:"ticks"}),qC={valType:"boolean",editType:"ticks"};BC.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:C0.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:TC({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Cf.idRegex.x.toString(),Cf.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:[Cf.idRegex.x.toString(),Cf.idRegex.y.toString()],editType:"calc"},rangebreaks:AC("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:[S$,M$,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:A$},editType:"calc"}),tickmode:k$,nticks:SC(),tick0:kC,dtick:CC,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:EC,ticktext:{valType:"data_array",editType:"ticks"},ticks:LC,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:PC(),tickwidth:DC(),tickcolor:zC,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:Bw({},NC,{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:TC({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:MC("tick label")},tickformatstops:AC("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:MC("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:C0.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:qC,gridcolor:IC,gridwidth:RC(),griddash:FC,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:C0.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:C0.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Cf.idRegex.x.toString(),Cf.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Cf.idRegex.x.toString(),Cf.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Nw,nticks:SC("minor"),tick0:kC,dtick:CC,tickvals:EC,ticks:LC,ticklen:PC("minor"),tickwidth:DC("minor"),tickcolor:zC,gridcolor:IC,gridwidth:RC("minor"),griddash:FC,showgrid:qC,editType:"ticks"},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 V_=de((Ige,VC)=>{"use strict";var Zi=Ru(),OC=qo(),UC=hn().extendFlat,C$=nl().overrideAll;VC.exports=C$({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:Zi.linecolor,outlinewidth:Zi.linewidth,bordercolor:Zi.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Zi.minor.tickmode,nticks:Zi.nticks,tick0:Zi.tick0,dtick:Zi.dtick,tickvals:Zi.tickvals,ticktext:Zi.ticktext,ticks:UC({},Zi.ticks,{dflt:""}),ticklabeloverflow:UC({},Zi.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:Zi.ticklen,tickwidth:Zi.tickwidth,tickcolor:Zi.tickcolor,ticklabelstep:Zi.ticklabelstep,showticklabels:Zi.showticklabels,labelalias:Zi.labelalias,tickfont:OC({}),tickangle:Zi.tickangle,tickformat:Zi.tickformat,tickformatstops:Zi.tickformatstops,tickprefix:Zi.tickprefix,showtickprefix:Zi.showtickprefix,ticksuffix:Zi.ticksuffix,showticksuffix:Zi.showticksuffix,separatethousands:Zi.separatethousands,exponentformat:Zi.exponentformat,minexponent:Zi.minexponent,showexponent:Zi.showexponent,title:{text:{valType:"string"},font:OC({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var xc=de((Fge,GC)=>{"use strict";var E$=V_(),L$=c0().counter,P$=g_(),HC=ed().scales,Rge=P$(HC);function H_(e){return"`"+e+"`"}GC.exports=function(t,r){t=t||"",r=r||{};var i=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,s="noScale"in r?r.noScale:t==="marker.line",l="showScaleDflt"in r?r.showScaleDflt:i==="z",f=typeof r.colorscaleDflt=="string"?HC[r.colorscaleDflt]:null,h=r.editTypeOverride||"",v=t?t+".":"",m,b;"colorAttr"in r?(m=r.colorAttr,b=r.colorAttr):(m={z:"z",c:"color"}[i],b="in "+H_(v+m));var T=a?" Has an effect only if "+b+" is set to a numerical array.":"",S=i+"auto",C=i+"min",P=i+"max",E=i+"mid",I=H_(v+S),F=H_(v+C),N=H_(v+P),z=F+" and "+N,O={};O[C]=O[P]=void 0;var H={};H[S]=!1;var V={};return m==="color"&&(V.color={valType:"color",arrayOk:!0,editType:h||"style"},r.anim&&(V.color.anim=!0)),V[S]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:O},V[C]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:H},V[P]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:H},V[E]={valType:"number",dflt:null,editType:"calc",impliedEdits:O},V.colorscale={valType:"colorscale",editType:"calc",dflt:f,impliedEdits:{autocolorscale:!1}},V.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},V.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(V.showscale={valType:"boolean",dflt:l,editType:"calc"},V.colorbar=E$),r.noColorAxis||(V.coloraxis={valType:"subplotid",regex:L$("coloraxis"),dflt:null,editType:"calc"}),V}});var Uw=de((qge,ZC)=>{"use strict";var D$=hn().extendFlat,z$=xc(),Ow=ed().scales;ZC.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Ow.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Ow.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Ow.RdBu,editType:"calc"}},coloraxis:D$({_isSubplotObj:!0,editType:"calc"},z$("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var Vw=de((Nge,YC)=>{"use strict";var I$=Bt();YC.exports=function(t){return I$.isPlainObject(t.colorbar)}});var Zw=de(Gw=>{"use strict";var Hw=Da(),WC=Bt(),XC=Hi(),R$=XC.ONEDAY,F$=XC.ONEWEEK;Gw.dtick=function(e,t){var r=t==="log",i=t==="date",a=t==="category",s=i?R$:1;if(!e)return s;if(Hw(e))return e=Number(e),e<=0?s:a?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if(typeof e!="string"||!(i||r))return s;var l=e.charAt(0),f=e.substr(1);return f=Hw(f)?Number(f):0,f<=0||!(i&&l==="M"&&f===Math.round(f)||r&&l==="L"||r&&l==="D"&&(f===1||f===2))?s:e};Gw.tick0=function(e,t,r,i){if(t==="date")return WC.cleanDate(e,WC.dateTick0(r,i%F$===0?1:0));if(!(i==="D1"||i==="D2"))return Hw(e)?Number(e):0}});var Yw=de((Oge,JC)=>{"use strict";var jC=Zw(),q$=Bt().isArrayOrTypedArray,N$=il().isTypedArraySpec,B$=il().decodeTypedArraySpec;JC.exports=function(t,r,i,a,s){s||(s={});var l=s.isMinor,f=l?t.minor||{}:t,h=l?r.minor:r,v=l?"minor.":"";function m(F){var N=f[F];return N$(N)&&(N=B$(N)),N!==void 0?N:(h._template||{})[F]}var b=m("tick0"),T=m("dtick"),S=m("tickvals"),C=q$(S)?"array":T?"linear":"auto",P=i(v+"tickmode",C);if(P==="auto"||P==="sync")i(v+"nticks");else if(P==="linear"){var E=h.dtick=jC.dtick(T,a);h.tick0=jC.tick0(b,a,r.calendar,E)}else if(a!=="multicategory"){var I=i(v+"tickvals");I===void 0?h.tickmode="auto":l||i("ticktext")}}});var Xw=de((Uge,QC)=>{"use strict";var Ww=Bt(),KC=Ru();QC.exports=function(t,r,i,a){var s=a.isMinor,l=s?t.minor||{}:t,f=s?r.minor:r,h=s?KC.minor:KC,v=s?"minor.":"",m=Ww.coerce2(l,f,h,"ticklen",s?(r.ticklen||5)*.6:void 0),b=Ww.coerce2(l,f,h,"tickwidth",s?r.tickwidth||1:void 0),T=Ww.coerce2(l,f,h,"tickcolor",(s?r.tickcolor:void 0)||f.color),S=i(v+"ticks",!s&&a.outerTicks||m||b||T?"outside":"");S||(delete f.ticklen,delete f.tickwidth,delete f.tickcolor)}});var jw=de((Vge,$C)=>{"use strict";$C.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],i=r.filter(function(s){return t[s]!==void 0}),a=function(s){return t[s]===t[i[0]]};if(i.every(a)||i.length===1)return t[i[0]]}});var Wl=de((Hge,eE)=>{"use strict";var G_=Bt(),O$=Di();eE.exports=function(t,r,i){var a=i.name,s=i.inclusionAttr||"visible",l=r[a],f=G_.isArrayOrTypedArray(t[a])?t[a]:[],h=r[a]=[],v=O$.arrayTemplater(r,a,s),m,b;for(m=0;m{"use strict";var Jw=Bt(),U$=Ua().contrast,tE=Ru(),V$=jw(),H$=Wl();rE.exports=function(t,r,i,a,s){s||(s={});var l=i("labelalias");Jw.isPlainObject(l)||delete r.labelalias;var f=V$(t),h=i("showticklabels");if(h){s.noTicklabelshift||i("ticklabelshift"),s.noTicklabelstandoff||i("ticklabelstandoff");var v=s.font||{},m=r.color,b=r.ticklabelposition||"",T=b.indexOf("inside")!==-1?U$(s.bgColor):m&&m!==tE.color.dflt?m:v.color;if(Jw.coerceFont(i,"tickfont",v,{overrideDflt:{color:T}}),!s.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&i("ticklabelstep"),!s.noAng){var S=i("tickangle");!s.noAutotickangles&&S==="auto"&&i("autotickangles")}if(a!=="category"){var C=i("tickformat");H$(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:G$}),r.tickformatstops.length||delete r.tickformatstops,!s.noExp&&!C&&a!=="date"&&(i("showexponent",f),i("exponentformat"),i("minexponent"),i("separatethousands"))}}};function G$(e,t){function r(a,s){return Jw.coerce(e,t,tE.tickformatstops,a,s)}var i=r("enabled");i&&(r("dtickrange"),r("value"))}});var Qw=de((Zge,aE)=>{"use strict";var Z$=jw();aE.exports=function(t,r,i,a,s){s||(s={});var l=s.tickSuffixDflt,f=Z$(t),h=i("tickprefix");h&&i("showtickprefix",f);var v=i("ticksuffix",l);v&&i("showticksuffix",f)}});var $w=de((Yge,iE)=>{"use strict";var Ih=Bt(),Y$=Di(),W$=Yw(),X$=Xw(),j$=Kw(),J$=Qw(),K$=V_();iE.exports=function(t,r,i){var a=Y$.newContainer(r,"colorbar"),s=t.colorbar||{};function l(oe,ne){return Ih.coerce(s,a,K$,oe,ne)}var f=i.margin||{t:0,b:0,l:0,r:0},h=i.width-f.l-f.r,v=i.height-f.t-f.b,m=l("orientation"),b=m==="v",T=l("thicknessmode");l("thickness",T==="fraction"?30/(b?h:v):30);var S=l("lenmode");l("len",S==="fraction"?1:b?v:h);var C=l("yref"),P=l("xref"),E=C==="paper",I=P==="paper",F,N,z,O="left";b?(z="middle",O=I?"left":"right",F=I?1.02:1,N=.5):(z=E?"bottom":"top",O="center",F=.5,N=E?1.02:1),Ih.coerce(s,a,{x:{valType:"number",min:I?-2:0,max:I?3:1,dflt:F}},"x"),Ih.coerce(s,a,{y:{valType:"number",min:E?-2:0,max:E?3:1,dflt:N}},"y"),l("xanchor",O),l("xpad"),l("yanchor",z),l("ypad"),Ih.noneOrAll(s,a,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var H=Ih.coerce(s,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:b?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",H.indexOf("inside")!==-1?"hide past domain":"hide past div"),W$(s,a,l,"linear");var V=i.font,W={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:V};H.indexOf("inside")!==-1&&(W.bgColor="black"),J$(s,a,l,"linear",W),j$(s,a,l,"linear",W),X$(s,a,l,"linear",W),l("title.text",i._dfltTitle.colorbar);var J=a.showticklabels?a.tickfont:V,re=Ih.extendFlat({},V,{family:J.family,size:Ih.bigFont(J.size)});Ih.coerceFont(l,"title.font",re),l("title.side",b?"top":"right")}});var hd=de((Wge,sE)=>{"use strict";var nE=Da(),t5=Bt(),Q$=Vw(),$$=$w(),oE=ed().isValid,eee=la().traceIs;function e5(e,t){var r=t.slice(0,t.length-1);return t?t5.nestedProperty(e,r).get()||{}:e}sE.exports=function e(t,r,i,a,s){var l=s.prefix,f=s.cLetter,h="_module"in r,v=e5(t,l),m=e5(r,l),b=e5(r._template||{},l)||{},T=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,i,a,s)};if(h){var S=i._colorAxes||{},C=a(l+"coloraxis");if(C){var P=eee(r,"contour")&&t5.nestedProperty(r,"contours.coloring").get()||"heatmap",E=S[C];E?(E[2].push(T),E[0]!==P&&(E[0]=!1,t5.warn(["Ignoring coloraxis:",C,"setting","as it is linked to incompatible colorscales."].join(" ")))):S[C]=[P,r,[T]];return}}var I=v[f+"min"],F=v[f+"max"],N=nE(I)&&nE(F)&&I{"use strict";var lE=Bt(),tee=Di(),uE=Uw(),ree=hd();fE.exports=function(t,r){function i(b,T){return lE.coerce(t,r,uE,b,T)}i("colorscale.sequential"),i("colorscale.sequentialminus"),i("colorscale.diverging");var a=r._colorAxes,s,l;function f(b,T){return lE.coerce(s,l,uE.coloraxis,b,T)}for(var h in a){var v=a[h];if(v[0])s=t[h]||{},l=tee.newContainer(r,h,"coloraxis"),l._name=h,ree(s,l,r,f,{prefix:"",cLetter:"c"});else{for(var m=0;m{"use strict";var aee=Bt(),iee=kf().hasColorscale,nee=kf().extractOpts;hE.exports=function(t,r){function i(m,b){var T=m["_"+b];T!==void 0&&(m[b]=T)}function a(m,b){var T=b.container?aee.nestedProperty(m,b.container).get():m;if(T)if(T.coloraxis)T._colorAx=r[T.coloraxis];else{var S=nee(T),C=S.auto;(C||S.min===void 0)&&i(T,b.min),(C||S.max===void 0)&&i(T,b.max),S.autocolorscale&&i(T,"colorscale")}}for(var s=0;s{"use strict";var dE=Da(),r5=Bt(),oee=kf().extractOpts;pE.exports=function(t,r,i){var a=t._fullLayout,s=i.vals,l=i.containerStr,f=l?r5.nestedProperty(r,l).get():r,h=oee(f),v=h.auto!==!1,m=h.min,b=h.max,T=h.mid,S=function(){return r5.aggNums(Math.min,null,s)},C=function(){return r5.aggNums(Math.max,null,s)};if(m===void 0?m=S():v&&(f._colorAx&&dE(m)?m=Math.min(m,S()):m=S()),b===void 0?b=C():v&&(f._colorAx&&dE(b)?b=Math.max(b,C()):b=C()),v&&T!==void 0&&(b-T>T-m?m=T-(b-T):b-T=0?P=a.colorscale.sequential:P=a.colorscale.sequentialminus,h._sync("colorscale",P)}}});var L0=de((Kge,mE)=>{"use strict";var Z_=ed(),E0=kf();mE.exports={moduleType:"component",name:"colorscale",attributes:xc(),layoutAttributes:Uw(),supplyLayoutDefaults:cE(),handleDefaults:hd(),crossTraceDefaults:vE(),calc:Hy(),scales:Z_.scales,defaultScale:Z_.defaultScale,getScale:Z_.get,isValidScale:Z_.isValid,hasColorscale:E0.hasColorscale,extractOpts:E0.extractOpts,extractScale:E0.extractScale,flipScale:E0.flipScale,makeColorScaleFunc:E0.makeColorScaleFunc,makeColorScaleFuncFromTrace:E0.makeColorScaleFuncFromTrace}});var rs=de((Qge,gE)=>{"use strict";var yE=Bt(),see=il().isTypedArraySpec;gE.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 yE.isPlainObject(t)&&(yE.isArrayOrTypedArray(t.size)||see(t.size))}}});var a5=de(($ge,_E)=>{"use strict";var lee=Da();_E.exports=function(t,r){r||(r=2);var i=t.marker,a=i.sizeref||1,s=i.sizemin||0,l=i.sizemode==="area"?function(f){return Math.sqrt(f/a)}:function(f){return f/a};return function(f){var h=l(f/r);return lee(h)&&h>0?Math.max(h,s):0}}});var bc=de(No=>{"use strict";var xE=Bt();No.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};No.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],i=e.yaxes||[],a=0;a=0&&r.index{TE.exports=vee;var i5={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},hee=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function vee(e){var t=[];return e.replace(hee,function(r,i,a){var s=i.toLowerCase();for(a=pee(a),s=="m"&&a.length>2&&(t.push([i].concat(a.splice(0,2))),s="l",i=i=="m"?"l":"L");;){if(a.length==i5[s])return a.unshift(i),t.push(a);if(a.length{"use strict";var mee=n5(),sr=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},ha="M0,0Z",AE=Math.sqrt(2),Rh=Math.sqrt(3),o5=Math.PI,s5=Math.cos,l5=Math.sin;EE.exports={circle:{n:0,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a="M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z";return r?da(t,r,a):a}},square:{n:1,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")}},diamond:{n:2,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.3,2);return da(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"Z")}},cross:{n:3,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.4,2),a=sr(e*1.2,2);return da(t,r,"M"+a+","+i+"H"+i+"V"+a+"H-"+i+"V"+i+"H-"+a+"V-"+i+"H-"+i+"V-"+a+"H"+i+"V-"+i+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.8/AE,2),a="l"+i+","+i,s="l"+i+",-"+i,l="l-"+i+",-"+i,f="l-"+i+","+i;return da(t,r,"M0,"+i+a+s+l+s+l+f+l+f+a+f+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M-"+i+","+a+"H"+i+"L0,-"+s+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M-"+i+",-"+a+"H"+i+"L0,"+s+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M"+a+",-"+i+"V"+i+"L-"+s+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2/Rh,2),a=sr(e/2,2),s=sr(e,2);return da(t,r,"M-"+a+",-"+i+"V"+i+"L"+s+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M-"+a+",-"+i+"H"+i+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M"+i+",-"+a+"V"+i+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M"+a+","+i+"H-"+i+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.6,2),a=sr(e*1.2,2);return da(t,r,"M-"+i+","+a+"V-"+i+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.951,2),a=sr(e*.588,2),s=sr(-e,2),l=sr(e*-.309,2),f=sr(e*.809,2);return da(t,r,"M"+i+","+l+"L"+a+","+f+"H-"+a+"L-"+i+","+l+"L0,"+s+"Z")}},hexagon:{n:14,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e/2,2),s=sr(e*Rh/2,2);return da(t,r,"M"+s+",-"+a+"V"+a+"L0,"+i+"L-"+s+","+a+"V-"+a+"L0,-"+i+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e/2,2),s=sr(e*Rh/2,2);return da(t,r,"M-"+a+","+s+"H"+a+"L"+i+",0L"+a+",-"+s+"H-"+a+"L-"+i+",0Z")}},octagon:{n:16,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.924,2),a=sr(e*.383,2);return da(t,r,"M-"+a+",-"+i+"H"+a+"L"+i+",-"+a+"V"+a+"L"+a+","+i+"H-"+a+"L-"+i+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(va(t))return ha;var i=e*1.4,a=sr(i*.225,2),s=sr(i*.951,2),l=sr(i*.363,2),f=sr(i*.588,2),h=sr(-i,2),v=sr(i*-.309,2),m=sr(i*.118,2),b=sr(i*.809,2),T=sr(i*.382,2);return da(t,r,"M"+a+","+v+"H"+s+"L"+l+","+m+"L"+f+","+b+"L0,"+T+"L-"+f+","+b+"L-"+l+","+m+"L-"+s+","+v+"H-"+a+"L0,"+h+"Z")}},hexagram:{n:18,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.66,2),a=sr(e*.38,2),s=sr(e*.76,2);return da(t,r,"M-"+s+",0l-"+a+",-"+i+"h"+s+"l"+a+",-"+i+"l"+a+","+i+"h"+s+"l-"+a+","+i+"l"+a+","+i+"h-"+s+"l-"+a+","+i+"l-"+a+",-"+i+"h-"+s+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(va(t))return ha;var i=sr(e*Rh*.8,2),a=sr(e*.8,2),s=sr(e*1.6,2),l=sr(e*4,2),f="A "+l+","+l+" 0 0 1 ";return da(t,r,"M-"+i+","+a+f+i+","+a+f+"0,-"+s+f+"-"+i+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(va(t))return ha;var i=sr(e*Rh*.8,2),a=sr(e*.8,2),s=sr(e*1.6,2),l=sr(e*4,2),f="A "+l+","+l+" 0 0 1 ";return da(t,r,"M"+i+",-"+a+f+"-"+i+",-"+a+f+"0,"+s+f+i+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.1,2),a=sr(e*2,2),s="A "+a+","+a+" 0 0 1 ";return da(t,r,"M-"+i+",-"+i+s+"-"+i+","+i+s+i+","+i+s+i+",-"+i+s+"-"+i+",-"+i+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2),a=sr(e*1.9,2),s="A "+a+","+a+" 0 0 1 ";return da(t,r,"M-"+i+",0"+s+"0,"+i+s+i+",0"+s+"0,-"+i+s+"-"+i+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(va(t))return ha;var i=sr(e*.7,2),a=sr(e*1.4,2);return da(t,r,"M0,"+a+"L"+i+",0L0,-"+a+"L-"+i+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2),a=sr(e*.7,2);return da(t,r,"M0,"+a+"L"+i+",0L0,-"+a+"L-"+i+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"H-"+i+"L"+i+",-"+i+"H-"+i+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"V-"+i+"L-"+i+","+i+"V-"+i+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e/AE,2);return da(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.3,2);return da(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM0,-"+i+"V"+i+"M-"+i+",0H"+i)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.3,2),a=sr(e*.65,2);return da(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*.85,2);return da(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(va(t))return ha;var i=sr(e/2,2),a=sr(e,2);return da(t,r,"M"+i+","+a+"V-"+a+"M"+(i-a)+",-"+a+"V"+a+"M"+a+","+i+"H-"+a+"M-"+a+","+(i-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M-"+i+","+s+"L0,0M"+i+","+s+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M-"+i+",-"+s+"L0,0M"+i+",-"+s+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M"+s+","+i+"L0,0M"+s+",-"+i+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.2,2),a=sr(e*1.6,2),s=sr(e*.8,2);return da(t,r,"M-"+s+","+i+"L0,0M-"+s+",-"+i+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2);return da(t,r,"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(va(t))return ha;var i=sr(e*1.4,2);return da(t,r,"M0,"+i+"V-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2);return da(t,r,"M"+i+","+i+"L-"+i+",-"+i)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M0,0L-"+i+","+a+"H"+i+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M0,0L-"+i+",-"+a+"H"+i+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,0L"+i+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,0L-"+i+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+","+a+"H"+i+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(va(t))return ha;var i=sr(e,2),a=sr(e*2,2);return da(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+",-"+a+"H"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,-"+a+"V"+a+"M0,0L"+i+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(va(t))return ha;var i=sr(e*2,2),a=sr(e,2);return da(t,r,"M0,-"+a+"V"+a+"M0,0L-"+i+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(va(t))return ha;var i=o5/2.5,a=2*e*s5(i),s=2*e*l5(i);return da(t,r,"M0,0L"+-a+","+s+"L"+a+","+s+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(va(t))return ha;var i=o5/4,a=2*e*s5(i),s=2*e*l5(i);return da(t,r,"M0,0L"+-a+","+s+"A "+2*e+","+2*e+" 0 0 1 "+a+","+s+"Z")},backoff:.4,noDot:!0}};function va(e){return e===null}var ME,SE,kE,CE;function da(e,t,r){if((!e||e%360===0)&&!t)return r;if(kE===e&&CE===t&&ME===r)return SE;kE=e,CE=t,ME=r;function i(E,I){var F=s5(E),N=l5(E),z=I[0],O=I[1]+(t||0);return[z*F-O*N,z*N+O*F]}for(var a=e/180*o5,s=0,l=0,f=mee(r),h="",v=0;v{"use strict";var to=ja(),bi=Bt(),yee=bi.numberFormat,md=Da(),d5=Tf(),W_=la(),Mo=Ua(),gee=L0(),Zy=bi.strTranslate,X_=co(),_ee=zh(),xee=ts(),bee=xee.LINE_SPACING,OE=a_().DESELECTDIM,wee=rs(),Tee=a5(),Aee=bc().appendArrayPointValue,vr=JE.exports={};vr.font=function(e,t){var r=t.variant,i=t.style,a=t.weight,s=t.color,l=t.size,f=t.family,h=t.shadow,v=t.lineposition,m=t.textcase;f&&e.style("font-family",f),l+1&&e.style("font-size",l+"px"),s&&e.call(Mo.fill,s),a&&e.style("font-weight",a),i&&e.style("font-style",i),r&&e.style("font-variant",r),m&&e.style("text-transform",u5(See(m))),h&&e.style("text-shadow",h==="auto"?X_.makeTextShadow(Mo.contrast(s)):u5(h)),v&&e.style("text-decoration-line",u5(kee(v)))};function u5(e){return e==="none"?void 0:e}var Mee={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function See(e){return Mee[e]}function kee(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}vr.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};vr.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};vr.setRect=function(e,t,r,i,a){e.call(vr.setPosition,t,r).call(vr.setSize,i,a)};vr.translatePoint=function(e,t,r,i){var a=r.c2p(e.x),s=i.c2p(e.y);if(md(a)&&md(s)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",s):t.attr("transform",Zy(a,s));else return!1;return!0};vr.translatePoints=function(e,t,r){e.each(function(i){var a=to.select(this);vr.translatePoint(i,a,t,r)})};vr.hideOutsideRangePoint=function(e,t,r,i,a,s){t.attr("display",r.isPtWithinRange(e,a)&&i.isPtWithinRange(e,s)?null:"none")};vr.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each(function(a){var s=a[0].trace,l=s.xcalendar,f=s.ycalendar,h=W_.traceIs(s,"bar-like")?".bartext":".point,.textpoint";e.selectAll(h).each(function(v){vr.hideOutsideRangePoint(v,to.select(this),r,i,l,f)})})}};vr.crispRound=function(e,t,r){return!t||!md(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};vr.singleLineStyle=function(e,t,r,i,a){t.style("fill","none");var s=(((e||[])[0]||{}).trace||{}).line||{},l=r||s.width||0,f=a||s.dash||"";Mo.stroke(t,i||s.color),vr.dashLine(t,f,l)};vr.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each(function(a){var s=(((a||[])[0]||{}).trace||{}).line||{},l=t||s.width||0,f=i||s.dash||"";to.select(this).call(Mo.stroke,r||s.color).call(vr.dashLine,f,l)})};vr.dashLine=function(e,t,r){r=+r||0,t=vr.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};vr.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 UE(e,t,r,i){var a=t.fillpattern,s=t.fillgradient,l=a&&vr.getPatternAttr(a.shape,0,"");if(l){var f=vr.getPatternAttr(a.bgcolor,0,null),h=vr.getPatternAttr(a.fgcolor,0,null),v=a.fgopacity,m=vr.getPatternAttr(a.size,0,8),b=vr.getPatternAttr(a.solidity,0,.3),T=t.uid;vr.pattern(e,"point",r,T,l,m,b,void 0,a.fillmode,f,h,v)}else if(s&&s.type!=="none"){var S=s.type,C="scatterfill-"+t.uid;if(i&&(C="legendfill-"+t.uid),!i&&(s.start!==void 0||s.stop!==void 0)){var P,E;S==="horizontal"?(P={x:s.start,y:0},E={x:s.stop,y:0}):S==="vertical"&&(P={x:0,y:s.start},E={x:0,y:s.stop}),P.x=t._xA.c2p(P.x===void 0?t._extremes.x.min[0].val:P.x,!0),P.y=t._yA.c2p(P.y===void 0?t._extremes.y.min[0].val:P.y,!0),E.x=t._xA.c2p(E.x===void 0?t._extremes.x.max[0].val:E.x,!0),E.y=t._yA.c2p(E.y===void 0?t._extremes.y.max[0].val:E.y,!0),e.call(GE,r,C,"linear",s.colorscale,"fill",P,E,!0,!1)}else S==="horizontal"&&(S=S+"reversed"),e.call(vr.gradient,r,C,S,s.colorscale,"fill")}else t.fillcolor&&e.call(Mo.fill,t.fillcolor)}vr.singleFillStyle=function(e,t){var r=to.select(e.node()),i=r.data(),a=((i[0]||[])[0]||{}).trace||{};UE(e,a,t,!1)};vr.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(i){var a=to.select(this);i[0].trace&&UE(a,i[0].trace,t,r)})};var PE=LE();vr.symbolNames=[];vr.symbolFuncs=[];vr.symbolBackOffs=[];vr.symbolNeedLines={};vr.symbolNoDot={};vr.symbolNoFill={};vr.symbolList=[];Object.keys(PE).forEach(function(e){var t=PE[e],r=t.n;vr.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),vr.symbolNames[r]=e,vr.symbolFuncs[r]=t.f,vr.symbolBackOffs[r]=t.backoff||0,t.needLine&&(vr.symbolNeedLines[r]=!0),t.noDot?vr.symbolNoDot[r]=!0:vr.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(vr.symbolNoFill[r]=!0)});var Cee=vr.symbolNames.length,Eee="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";vr.symbolNumber=function(e){if(md(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=vr.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=Cee||e>=400?0:Math.floor(Math.max(e,0))};function VE(e,t,r,i){var a=e%100;return vr.symbolFuncs[a](t,r,i)+(e>=200?Eee:"")}var DE=yee("~f"),HE={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}};vr.gradient=function(e,t,r,i,a,s){var l=HE[i];return GE(e,t,r,l.type,a,s,l.start,l.stop,!1,l.reversed)};function GE(e,t,r,i,a,s,l,f,h,v){var m=a.length,b;i==="linear"?b={node:"linearGradient",attrs:{x1:l.x,y1:l.y,x2:f.x,y2:f.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:v}:i==="radial"&&(b={node:"radialGradient",reversed:v});for(var T=new Array(m),S=0;S=0&&e.i===void 0&&(e.i=s.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):e.mo===void 0?l.opacity:e.mo),i.ms2mrc){var h;e.ms==="various"||l.size==="various"?h=3:h=i.ms2mrc(e.ms),e.mrc=h,i.selectedSizeFn&&(h=e.mrc=i.selectedSizeFn(e));var v=vr.symbolNumber(e.mx||l.symbol)||0;e.om=v%200>=100;var m=y5(e,r),b=m5(e,r);t.attr("d",VE(v,h,m,b))}var T=!1,S,C,P;if(e.so)P=f.outlierwidth,C=f.outliercolor,S=l.outliercolor;else{var E=(f||{}).width;P=(e.mlw+1||E+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?C=e.mlcc=i.lineScale(e.mlc):bi.isArrayOrTypedArray(f.color)?C=Mo.defaultLine:C=f.color,bi.isArrayOrTypedArray(l.color)&&(S=Mo.defaultLine,T=!0),"mc"in e?S=e.mcc=i.markerScale(e.mc):S=l.color||l.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(S=i.selectedColorFn(e))}if(e.om)t.call(Mo.stroke,S).style({"stroke-width":(P||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:P)+"px");var I=l.gradient,F=e.mgt;F?T=!0:F=I&&I.type,bi.isArrayOrTypedArray(F)&&(F=F[0],HE[F]||(F=0));var N=l.pattern,z=N&&vr.getPatternAttr(N.shape,e.i,"");if(F&&F!=="none"){var O=e.mgc;O?T=!0:O=I.color;var H=r.uid;T&&(H+="-"+e.i),vr.gradient(t,a,H,F,[[0,O],[1,S]],"fill")}else if(z){var V=!1,W=N.fgcolor;!W&&s&&s.color&&(W=s.color,V=!0);var J=vr.getPatternAttr(W,e.i,s&&s.color||null),re=vr.getPatternAttr(N.bgcolor,e.i,null),oe=N.fgopacity,ne=vr.getPatternAttr(N.size,e.i,8),fe=vr.getPatternAttr(N.solidity,e.i,.3);V=V||e.mcc||bi.isArrayOrTypedArray(N.shape)||bi.isArrayOrTypedArray(N.bgcolor)||bi.isArrayOrTypedArray(N.fgcolor)||bi.isArrayOrTypedArray(N.size)||bi.isArrayOrTypedArray(N.solidity);var ve=r.uid;V&&(ve+="-"+e.i),vr.pattern(t,"point",a,ve,z,ne,fe,e.mcc,N.fillmode,re,J,oe)}else bi.isArrayOrTypedArray(S)?Mo.fill(t,S[e.i]):Mo.fill(t,S);P&&Mo.stroke(t,C)}};vr.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=vr.tryColorscale(r,""),t.lineScale=vr.tryColorscale(r,"line"),W_.traceIs(e,"symbols")&&(t.ms2mrc=wee.isBubble(e)?Tee(e):function(){return(r.size||6)/2}),e.selectedpoints&&bi.extendFlat(t,vr.makeSelectedPointStyleFns(e)),t};vr.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},a=e.marker||{},s=r.marker||{},l=i.marker||{},f=a.opacity,h=s.opacity,v=l.opacity,m=h!==void 0,b=v!==void 0;(bi.isArrayOrTypedArray(f)||m||b)&&(t.selectedOpacityFn=function(z){var O=z.mo===void 0?a.opacity:z.mo;return z.selected?m?h:O:b?v:OE*O});var T=a.color,S=s.color,C=l.color;(S||C)&&(t.selectedColorFn=function(z){var O=z.mcc||T;return z.selected?S||O:C||O});var P=a.size,E=s.size,I=l.size,F=E!==void 0,N=I!==void 0;return W_.traceIs(e,"symbols")&&(F||N)&&(t.selectedSizeFn=function(z){var O=z.mrc||P/2;return z.selected?F?E/2:O:N?I/2:O}),t};vr.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},a=e.textfont||{},s=r.textfont||{},l=i.textfont||{},f=a.color,h=s.color,v=l.color;return t.selectedTextColorFn=function(m){var b=m.tc||f;return m.selected?h||b:v||(h?b:Mo.addOpacity(b,OE))},t};vr.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=vr.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(s,l){s.style("opacity",r.selectedOpacityFn(l))}),r.selectedColorFn&&a.push(function(s,l){Mo.fill(s,r.selectedColorFn(l))}),r.selectedSizeFn&&a.push(function(s,l){var f=l.mx||i.symbol||0,h=r.selectedSizeFn(l);s.attr("d",VE(vr.symbolNumber(f),h,y5(l,t),m5(l,t))),l.mrc2=h}),a.length&&e.each(function(s){for(var l=to.select(this),f=0;f0?r:0}vr.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var a=vr.makeSelectedTextStyleFns(t);i=a.selectedTextColorFn}var s=t.texttemplate,l=r._fullLayout;e.each(function(f){var h=to.select(this),v=s?bi.extractOption(f,t,"txt","texttemplate"):bi.extractOption(f,t,"tx","text");if(!v&&v!==0){h.remove();return}if(s){var m=t._module.formatLabels,b=m?m(f,t,l):{},T={};Aee(T,t,f.i);var S=t._meta||{};v=bi.texttemplateString(v,b,l._d3locale,T,f,S)}var C=f.tp||t.textposition,P=YE(f,t),E=i?i(f):f.tc||t.textfont.color;h.call(vr.font,{family:f.tf||t.textfont.family,weight:f.tw||t.textfont.weight,style:f.ty||t.textfont.style,variant:f.tv||t.textfont.variant,textcase:f.tC||t.textfont.textcase,lineposition:f.tE||t.textfont.lineposition,shadow:f.tS||t.textfont.shadow,size:P,color:E}).text(v).call(X_.convertToTspans,r).call(ZE,C,P,f.mrc)})}};vr.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=vr.makeSelectedTextStyleFns(t);e.each(function(i){var a=to.select(this),s=r.selectedTextColorFn(i),l=i.tp||t.textposition,f=YE(i,t);Mo.fill(a,s);var h=W_.traceIs(t,"bar-like");ZE(a,l,f,i.mrc2||i.mrc,h)})}};var zE=.5;vr.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],i=[],a;for(a=1;a=h||z>=m&&z<=h)&&(O<=b&&O>=v||O>=b&&O<=v)&&(e=[z,O])}return e}vr.applyBackoff=jE;vr.makeTester=function(){var e=bi.ensureSingleById(to.select("body"),"svg","js-plotly-tester",function(r){r.attr(_ee.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=bi.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});vr.tester=e,vr.testref=t};vr.savedBBoxes={};var c5=0,Dee=1e4;vr.bBox=function(e,t,r){r||(r=IE(e));var i;if(r){if(i=vr.savedBBoxes[r],i)return bi.extendFlat({},i)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=IE(a),r){var s=+a.getAttribute("x")||0,l=+a.getAttribute("y")||0,f=a.getAttribute("transform");if(!f){var h=vr.bBox(a,!1,r);return s&&(h.left+=s,h.right+=s),l&&(h.top+=l,h.bottom+=l),h}if(r+="~"+s+"~"+l+"~"+f,i=vr.savedBBoxes[r],i)return bi.extendFlat({},i)}}var v,m;t?v=e:(m=vr.tester.node(),v=e.cloneNode(!0),m.appendChild(v)),to.select(v).attr("transform",null).call(X_.positionText,0,0);var b=v.getBoundingClientRect(),T=vr.testref.node().getBoundingClientRect();t||m.removeChild(v);var S={height:b.height,width:b.width,left:b.left-T.left,top:b.top-T.top,right:b.right-T.left,bottom:b.bottom-T.top};return c5>=Dee&&(vr.savedBBoxes={},c5=0),r&&(vr.savedBBoxes[r]=S),c5++,bi.extendFlat({},S)};function IE(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}vr.setClipUrl=function(e,t,r){e.attr("clip-path",p5(t,r))};function p5(e,t){if(!e)return null;var r=t._context,i=r._exportedPlot?"":r._baseUrl||"";return i?"url('"+i+"#"+e+"')":"url(#"+e+")"}vr.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",a=i.replace(t,function(s,l,f){return[l,f].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};vr.setTranslate=function(e,t,r){var i=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",s=e.attr?"attr":"setAttribute",l=e[a]("transform")||"";return t=t||0,r=r||0,l=l.replace(i,"").trim(),l+=Zy(t,r),l=l.trim(),e[s]("transform",l),l};vr.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",a=i.replace(t,function(s,l,f){return[l,f].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};vr.setScale=function(e,t,r){var i=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",s=e.attr?"attr":"setAttribute",l=e[a]("transform")||"";return t=t||1,r=r||1,l=l.replace(i,"").trim(),l+="scale("+t+","+r+")",l=l.trim(),e[s]("transform",l),l};var zee=/\s*sc.*/;vr.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var i=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(zee,"");a+=i,a=a.trim(),this.setAttribute("transform",a)})}};var Iee=/translate\([^)]*\)\s*$/;vr.setTextPointsScale=function(e,t,r){e&&e.each(function(){var i,a=to.select(this),s=a.select("text");if(s.node()){var l=parseFloat(s.attr("x")||0),f=parseFloat(s.attr("y")||0),h=(a.attr("transform")||"").match(Iee);t===1&&r===1?i=[]:i=[Zy(l,f),"scale("+t+","+r+")",Zy(-l,-f)],h&&i.push(h),a.attr("transform",i.join(""))}})};function m5(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}vr.getMarkerStandoff=m5;var Gy=Math.atan2,vd=Math.cos,D0=Math.sin;function RE(e,t){var r=t[0],i=t[1];return[r*vd(e)-i*D0(e),r*D0(e)+i*vd(e)]}var FE,qE,NE,BE,h5,v5;function y5(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||bi.isArrayOrTypedArray(r))&&(r=0));var i,a,s=t.marker.angleref;if(s==="previous"||s==="north"){if(t._geo){var l=t._geo.project(e.lonlat);i=l[0],a=l[1]}else{var f=t._xA,h=t._yA;if(f&&h)i=f.c2p(e.x),a=h.c2p(e.y);else return 90}if(t._geo){var v=e.lonlat[0],m=e.lonlat[1],b=t._geo.project([v,m+1e-5]),T=t._geo.project([v+1e-5,m]),S=Gy(T[1]-a,T[0]-i),C=Gy(b[1]-a,b[0]-i),P;if(s==="north")P=r/180*Math.PI;else if(s==="previous"){var E=v/180*Math.PI,I=m/180*Math.PI,F=FE/180*Math.PI,N=qE/180*Math.PI,z=F-E,O=vd(N)*D0(z),H=D0(N)*vd(I)-vd(N)*D0(I)*vd(z);P=-Gy(O,H)-Math.PI,FE=v,qE=m}var V=RE(S,[vd(P),0]),W=RE(C,[D0(P),0]);r=Gy(V[1]+W[1],V[0]+W[0])/Math.PI*180,s==="previous"&&!(v5===t.uid&&e.i===h5+1)&&(r=null)}if(s==="previous"&&!t._geo)if(v5===t.uid&&e.i===h5+1&&md(i)&&md(a)){var J=i-NE,re=a-BE,oe=t.line&&t.line.shape||"",ne=oe.slice(oe.length-1);ne==="h"&&(re=0),ne==="v"&&(J=0),r+=Gy(re,J)/Math.PI*180+90}else r=null}return NE=i,BE=a,h5=e.i,v5=t.uid,r}vr.getMarkerAngle=y5});var Yy=de((i1e,eL)=>{"use strict";var z0=ja(),Ree=Da(),Fee=eo(),g5=la(),yd=Bt(),KE=yd.strTranslate,j_=_i(),J_=Ua(),I0=co(),QE=a_(),qee=ts().OPPOSITE_SIDE,$E=/ [XY][0-9]* /,_5=1.6,x5=1.6;function Nee(e,t,r){var i=e._fullLayout,a=r.propContainer,s=r.propName,l=r.placeholder,f=r.traceIndex,h=r.avoid||{},v=r.attributes,m=r.transform,b=r.containerGroup,T=1,S=a.title,C=(S&&S.text?S.text:"").trim(),P=!1,E=S&&S.font?S.font:{},I=E.family,F=E.size,N=E.color,z=E.weight,O=E.style,H=E.variant,V=E.textcase,W=E.lineposition,J=E.shadow,re=r.subtitlePropName,oe=!!re,ne=r.subtitlePlaceholder,fe=(a.title||{}).subtitle||{text:"",font:{}},ve=fe.text.trim(),Ce=!1,Se=1,Te=fe.font,pe=Te.family,Ae=Te.size,Me=Te.color,Le=Te.weight,Ke=Te.style,ht=Te.variant,it=Te.textcase,lt=Te.lineposition,He=Te.shadow,_t;s==="title.text"?_t="titleText":s.indexOf("axis")!==-1?_t="axisTitleText":s.indexOf("colorbar"!==-1)&&(_t="colorbarTitleText");var at=e._context.edits[_t];function At(Ut,xt){return Ut===void 0||xt===void 0?!1:Ut.replace($E," % ")===xt.replace($E," % ")}C===""?T=0:At(C,l)&&(at||(C=""),T=.2,P=!0),oe&&(ve===""?Se=0:At(ve,ne)&&(at||(ve=""),Se=.2,Ce=!0)),r._meta?C=yd.templateString(C,r._meta):i._meta&&(C=yd.templateString(C,i._meta));var kt=C||ve||at,pt;b||(b=yd.ensureSingle(i._infolayer,"g","g-"+t),pt=i._hColorbarMoveTitle);var ge=b.selectAll("text."+t).data(kt?[0]:[]);ge.enter().append("text"),ge.text(C).attr("class",t),ge.exit().remove();var Re=null,xe=t+"-subtitle",et=ve||at;if(oe&&et&&(Re=b.selectAll("text."+xe).data(et?[0]:[]),Re.enter().append("text"),Re.text(ve).attr("class",xe),Re.exit().remove()),!kt)return b;function vt(Ut,xt){yd.syncOrAsync([tt,Nt],{title:Ut,subtitle:xt})}function tt(Ut){var xt=Ut.title,Et=Ut.subtitle,ir;!m&&pt&&(m={}),m?(ir="",m.rotate&&(ir+="rotate("+[m.rotate,v.x,v.y]+")"),(m.offset||pt)&&(ir+=KE(0,(m.offset||0)-(pt||0)))):ir=null,xt.attr("transform",ir);function Wt(Tt){if(Tt){var wt=z0.select(Tt.node().parentNode).select("."+xe);if(!wt.empty()){var Vt=Tt.node().getBBox();if(Vt.height){var Kt=Vt.y+Vt.height+_5*Ae;wt.attr("y",Kt)}}}}if(xt.style("opacity",T*J_.opacity(N)).call(j_.font,{color:J_.rgb(N),size:z0.round(F,2),family:I,weight:z,style:O,variant:H,textcase:V,shadow:J,lineposition:W}).attr(v).call(I0.convertToTspans,e,Wt),Et){var Be=b.select("."+t+"-math-group"),ft=xt.node().getBBox(),mt=Be.node()?Be.node().getBBox():void 0,Ar=mt?mt.y+mt.height+_5*Ae:ft.y+ft.height+x5*Ae,dr=yd.extendFlat({},v,{y:Ar});Et.attr("transform",ir),Et.style("opacity",Se*J_.opacity(Me)).call(j_.font,{color:J_.rgb(Me),size:z0.round(Ae,2),family:pe,weight:Le,style:Ke,variant:ht,textcase:it,shadow:He,lineposition:lt}).attr(dr).call(I0.convertToTspans,e)}return Fee.previousPromises(e)}function Nt(Ut){var xt=Ut.title,Et=z0.select(xt.node().parentNode);if(h&&h.selection&&h.side&&C){Et.attr("transform",null);var ir=qee[h.side],Wt=h.side==="left"||h.side==="top"?-1:1,Be=Ree(h.pad)?h.pad:2,ft=j_.bBox(Et.node()),mt={t:0,b:0,l:0,r:0},Ar=e._fullLayout._reservedMargin;for(var dr in Ar)for(var Tt in Ar[dr]){var wt=Ar[dr][Tt];mt[Tt]=Math.max(mt[Tt],wt)}var Vt={left:mt.l,top:mt.t,right:i.width-mt.r,bottom:i.height-mt.b},Kt=h.maxShift||Wt*(Vt[h.side]-ft[h.side]),Ht=0;if(Kt<0)Ht=Kt;else{var Ot=h.offsetLeft||0,er=h.offsetTop||0;ft.left-=Ot,ft.right-=Ot,ft.top-=er,ft.bottom-=er,h.selection.each(function(){var xr=j_.bBox(this);yd.bBoxIntersect(ft,xr,Be)&&(Ht=Math.max(Ht,Wt*(xr[h.side]-ft[ir])+Be))}),Ht=Math.min(Kt,Ht),a._titleScoot=Math.abs(Ht)}if(Ht>0||Kt<0){var Mr={left:[-Ht,0],right:[Ht,0],top:[0,-Ht],bottom:[0,Ht]}[h.side];Et.attr("transform",KE(Mr[0],Mr[1]))}}}ge.call(vt,Re);function Mt(Ut,xt){Ut.text(xt).on("mouseover.opacity",function(){z0.select(this).transition().duration(QE.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){z0.select(this).transition().duration(QE.HIDE_PLACEHOLDER).style("opacity",0)})}if(at&&(C?ge.on(".opacity",null):(Mt(ge,l),P=!0),ge.call(I0.makeEditable,{gd:e}).on("edit",function(Ut){f!==void 0?g5.call("_guiRestyle",e,s,Ut,f):g5.call("_guiRelayout",e,s,Ut)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(vt)}).on("input",function(Ut){this.text(Ut||" ").call(I0.positionText,v.x,v.y)}),oe)){if(oe&&!C){var Ct=ge.node().getBBox(),Rt=Ct.y+Ct.height+x5*Ae;Re.attr("y",Rt)}ve?Re.on(".opacity",null):(Mt(Re,ne),Ce=!0),Re.call(I0.makeEditable,{gd:e}).on("edit",function(Ut){g5.call("_guiRelayout",e,"title.subtitle.text",Ut)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(vt)}).on("input",function(Ut){this.text(Ut||" ").call(I0.positionText,Re.attr("x"),Re.attr("y"))})}return ge.classed("js-placeholder",P),Re&&Re.classed("js-placeholder",Ce),b}eL.exports={draw:Nee,SUBTITLE_PADDING_EM:x5,SUBTITLE_PADDING_MATHJAX_EM:_5}});var i2=de((n1e,nL)=>{"use strict";var Bee=ja(),Oee=s0().utcFormat,zi=Bt(),Uee=zi.numberFormat,Ef=Da(),Fh=zi.cleanNumber,Vee=zi.ms2DateTime,tL=zi.dateTime2ms,Lf=zi.ensureNumber,rL=zi.isArrayOrTypedArray,qh=Hi(),K_=qh.FP_SAFE,Fu=qh.BADNUM,Hee=qh.LOG_CLIP,Gee=qh.ONEWEEK,Q_=qh.ONEDAY,$_=qh.ONEHOUR,aL=qh.ONEMIN,iL=qh.ONESEC,e2=$n(),a2=Ao(),t2=a2.HOUR_PATTERN,r2=a2.WEEKDAY_PATTERN;function Wy(e){return Math.pow(10,e)}function b5(e){return e!=null}nL.exports=function(t,r){r=r||{};var i=t._id||"x",a=i.charAt(0);function s(z,O){if(z>0)return Math.log(z)/Math.LN10;if(z<=0&&O&&t.range&&t.range.length===2){var H=t.range[0],V=t.range[1];return .5*(H+V-2*Hee*Math.abs(H-V))}else return Fu}function l(z,O,H,V){if((V||{}).msUTC&&Ef(z))return+z;var W=tL(z,H||t.calendar);if(W===Fu)if(Ef(z)){z=+z;var J=Math.floor(zi.mod(z+.05,1)*10),re=Math.round(z-J/10);W=tL(new Date(re))+J/10}else return Fu;return W}function f(z,O,H){return Vee(z,O,H||t.calendar)}function h(z){return t._categories[Math.round(z)]}function v(z){if(b5(z)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[z]!==void 0)return t._categoriesMap[z];t._categories.push(typeof z=="number"?String(z):z);var O=t._categories.length-1;return t._categoriesMap[z]=O,O}return Fu}function m(z,O){for(var H=new Array(O),V=0;Vt.range[1]&&(H=!H);for(var V=H?-1:1,W=V*z,J=0,re=0;rene)J=re+1;else{J=W<(oe+ne)/2?re:re+1;break}}var fe=t._B[J]||0;return isFinite(fe)?C(z,t._m2,fe):0},I=function(z){var O=t._rangebreaks.length;if(!O)return P(z,t._m,t._b);for(var H=0,V=0;Vt._rangebreaks[V].pmax&&(H=V+1);return P(z,t._m2,t._B[H])}}t.c2l=t.type==="log"?s:Lf,t.l2c=t.type==="log"?Wy:Lf,t.l2p=E,t.p2l=I,t.c2p=t.type==="log"?function(z,O){return E(s(z,O))}:E,t.p2c=t.type==="log"?function(z){return Wy(I(z))}:I,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=Fh,t.c2d=t.c2r=t.l2d=t.l2r=Lf,t.d2p=t.r2p=function(z){return t.l2p(Fh(z))},t.p2d=t.p2r=I,t.cleanPos=Lf):t.type==="log"?(t.d2r=t.d2l=function(z,O){return s(Fh(z),O)},t.r2d=t.r2c=function(z){return Wy(Fh(z))},t.d2c=t.r2l=Fh,t.c2d=t.l2r=Lf,t.c2r=s,t.l2d=Wy,t.d2p=function(z,O){return t.l2p(t.d2r(z,O))},t.p2d=function(z){return Wy(I(z))},t.r2p=function(z){return t.l2p(Fh(z))},t.p2r=I,t.cleanPos=Lf):t.type==="date"?(t.d2r=t.r2d=zi.identity,t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(z,O,H){return t.l2p(l(z,0,H))},t.p2d=t.p2r=function(z,O,H){return f(I(z),O,H)},t.cleanPos=function(z){return zi.cleanDate(z,Fu,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=v,t.r2d=t.c2d=t.l2d=h,t.d2r=t.d2l_noadd=T,t.r2c=function(z){var O=S(z);return O!==void 0?O:t.fraction2r(.5)},t.l2r=t.c2r=Lf,t.r2l=S,t.d2p=function(z){return t.l2p(t.r2c(z))},t.p2d=function(z){return h(I(z))},t.r2p=t.d2p,t.p2r=I,t.cleanPos=function(z){return typeof z=="string"&&z!==""?z:Lf(z)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=h,t.d2r=t.d2l_noadd=T,t.r2c=function(z){var O=T(z);return O!==void 0?O:t.fraction2r(.5)},t.r2c_just_indices=b,t.l2r=t.c2r=Lf,t.r2l=T,t.d2p=function(z){return t.l2p(t.r2c(z))},t.p2d=function(z){return h(I(z))},t.r2p=t.d2p,t.p2r=I,t.cleanPos=function(z){return Array.isArray(z)||typeof z=="string"&&z!==""?z:Lf(z)},t.setupMultiCategory=function(z){var O=t._traceIndices,H,V,W=t._matchGroup;if(W&&t._categories.length===0){for(var J in W)if(J!==i){var re=r[e2.id2name(J)];O=O.concat(re._traceIndices)}}var oe=[[0,{}],[0,{}]],ne=[];for(H=0;Hre[1]&&(V[J?0:1]=H),V[0]===V[1]){var oe=t.l2r(O),ne=t.l2r(H);if(O!==void 0){var fe=oe+1;H!==void 0&&(fe=Math.min(fe,ne)),V[J?1:0]=fe}if(H!==void 0){var ve=ne+1;O!==void 0&&(ve=Math.max(ve,oe)),V[J?0:1]=ve}}}},t.cleanRange=function(z,O){t._cleanRange(z,O),t.limitRange(z)},t._cleanRange=function(z,O){O||(O={}),z||(z="range");var H=zi.nestedProperty(t,z).get(),V,W;if(t.type==="date"?W=zi.dfltRange(t.calendar):a==="y"?W=a2.DFLTRANGEY:t._name==="realaxis"?W=[0,1]:W=O.dfltRange||a2.DFLTRANGEX,W=W.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(W[0]=0),!H||H.length!==2){zi.nestedProperty(t,z).set(W);return}var J=H[0]===null,re=H[1]===null;for(t.type==="date"&&!t.autorange&&(H[0]=zi.cleanDate(H[0],Fu,t.calendar),H[1]=zi.cleanDate(H[1],Fu,t.calendar)),V=0;V<2;V++)if(t.type==="date"){if(!zi.isDateTime(H[V],t.calendar)){t[z]=W;break}if(t.r2l(H[0])===t.r2l(H[1])){var oe=zi.constrain(t.r2l(H[0]),zi.MIN_MS+1e3,zi.MAX_MS-1e3);H[0]=t.l2r(oe-1e3),H[1]=t.l2r(oe+1e3);break}}else{if(!Ef(H[V]))if(!(J||re)&&Ef(H[1-V]))H[V]=H[1-V]*(V?10:.1);else{t[z]=W;break}if(H[V]<-K_?H[V]=-K_:H[V]>K_&&(H[V]=K_),H[0]===H[1]){var ne=Math.max(1,Math.abs(H[0]*1e-6));H[0]-=ne,H[1]+=ne}}},t.setScale=function(z){var O=r._size;if(t.overlaying){var H=e2.getFromId({_fullLayout:r},t.overlaying);t.domain=H.domain}var V=z&&t._r?"_r":"range",W=t.calendar;t.cleanRange(V);var J=t.r2l(t[V][0],W),re=t.r2l(t[V][1],W),oe=a==="y";if(oe?(t._offset=O.t+(1-t.domain[1])*O.h,t._length=O.h*(t.domain[1]-t.domain[0]),t._m=t._length/(J-re),t._b=-t._m*re):(t._offset=O.l+t.domain[0]*O.w,t._length=O.w*(t.domain[1]-t.domain[0]),t._m=t._length/(re-J),t._b=-t._m*J),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var ne,fe;if(t._rangebreaks=t.locateBreaks(Math.min(J,re),Math.max(J,re)),t._rangebreaks.length){for(ne=0;nere&&(ve=!ve),ve&&t._rangebreaks.reverse();var Ce=ve?-1:1;for(t._m2=Ce*t._length/(Math.abs(re-J)-t._lBreaks),t._B.push(-t._m2*(oe?re:J)),ne=0;neW&&(W+=7,JW&&(W+=24,J=V&&J=V&&z=He.min&&(KeHe.max&&(He.max=ht),it=!1)}it&&re.push({min:Ke,max:ht})}};for(H=0;H{"use strict";var oL=Da(),w5=Bt(),Zee=Hi().BADNUM,n2=w5.isArrayOrTypedArray,Yee=w5.isDateTime,Wee=w5.cleanNumber,sL=Math.round;uL.exports=function(t,r,i){var a=t,s=i.noMultiCategory;if(n2(a)&&!a.length)return"-";if(!s&&Qee(a))return"multicategory";if(s&&Array.isArray(a[0])){for(var l=[],f=0;fs*2}function lL(e){return Math.max(1,(e-1)/1e3)}function Kee(e,t){for(var r=e.length,i=lL(r),a=0,s=0,l={},f=0;fa*2}function Qee(e){return n2(e[0])&&n2(e[1])}});var Xy=de((s1e,yL)=>{"use strict";var $ee=ja(),vL=Da(),Nh=Bt(),o2=Hi().FP_SAFE,ete=la(),tte=_i(),dL=$n(),rte=dL.getFromId,ate=dL.isLinked;yL.exports={applyAutorangeOptions:mL,getAutoRange:A5,makePadFn:M5,doAutoRange:nte,findExtremes:ote,concatExtremes:C5};function A5(e,t){var r,i,a=[],s=e._fullLayout,l=M5(s,t,0),f=M5(s,t,1),h=C5(e,t),v=h.min,m=h.max;if(v.length===0||m.length===0)return Nh.simpleMap(t.range,t.r2l);var b=v[0].val,T=m[0].val;for(r=1;r0&&(re=N-l(H)-f(V),re>z?oe/re>O&&(W=H,J=V,O=oe/re):oe/N>O&&(W={val:H.val,nopad:1},J={val:V.val,nopad:1},O=oe/N));function ne(Te,pe){return Math.max(Te,f(pe))}if(b===T){var fe=b-1,ve=b+1;if(I)if(b===0)a=[0,1];else{var Ce=(b>0?m:v).reduce(ne,0),Se=b/(1-Math.min(.5,Ce/N));a=b>0?[0,Se]:[Se,0]}else F?a=[Math.max(0,fe),Math.max(1,ve)]:a=[fe,ve]}else I?(W.val>=0&&(W={val:0,nopad:1}),J.val<=0&&(J={val:0,nopad:1})):F&&(W.val-O*l(W)<0&&(W={val:0,nopad:1}),J.val<=0&&(J={val:1,nopad:1})),O=(J.val-W.val-fL(t,H.val,V.val))/(N-l(W)-f(J)),a=[W.val-O*l(W),J.val+O*f(J)];return a=mL(a,t),t.limitRange&&t.limitRange(),C&&a.reverse(),Nh.simpleMap(a,t.l2r||Number)}function fL(e,t,r){var i=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),s=0;s0?r.ppadplus:r.ppadminus)||r.ppad||0),H=z((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),V=z(r.vpadplus||r.vpad),W=z(r.vpadminus||r.vpad);if(!v){if(F=1/0,N=-1/0,h)for(b=0;b0&&(F=T),T>N&&T-o2&&(F=T),T>N&&T=oe;b--)re(b);return{min:i,max:a,opts:r}}function S5(e,t,r,i){pL(e,t,r,i,ste)}function k5(e,t,r,i){pL(e,t,r,i,lte)}function pL(e,t,r,i,a){for(var s=i.tozero,l=i.extrapad,f=!0,h=0;h=r&&(v.extrapad||!l)){f=!1;break}else a(t,v.val)&&v.pad<=r&&(l||!v.extrapad)&&(e.splice(h,1),h--)}if(f){var m=s&&t===0;e.push({val:t,pad:m?0:r,extrapad:m?!1:l})}}function hL(e){return vL(e)&&Math.abs(e)=t}function ute(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&s2(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&s2(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function fte(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&s2(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&s2(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function s2(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=h&&(s=h,r=h),l<=h&&(l=h,i=h)}}return r=ute(r,t),i=fte(i,t),[r,i]}});var Yi=de((l1e,BL)=>{"use strict";var Xl=ja(),qn=Da(),R0=eo(),Jy=la(),ta=Bt(),F0=ta.strTranslate,gd=co(),cte=Yy(),Ky=Ua(),sl=_i(),hte=Ru(),gL=Zw(),So=Hi(),vte=So.ONEMAXYEAR,f2=So.ONEAVGYEAR,c2=So.ONEMINYEAR,dte=So.ONEMAXQUARTER,D5=So.ONEAVGQUARTER,h2=So.ONEMINQUARTER,pte=So.ONEMAXMONTH,q0=So.ONEAVGMONTH,v2=So.ONEMINMONTH,ll=So.ONEWEEK,as=So.ONEDAY,Bh=as/2,Df=So.ONEHOUR,Qy=So.ONEMIN,d2=So.ONESEC,mte=So.ONEMILLI,yte=So.ONEMICROSEC,_d=So.MINUS_SIGN,y2=So.BADNUM,z5={K:"zeroline"},I5={K:"gridline",L:"path"},R5={K:"minor-gridline",L:"path"},EL={K:"tick",L:"path"},_L={K:"tick",L:"text"},xL={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},g2=ts(),jy=g2.MID_SHIFT,xd=g2.CAP_SHIFT,$y=g2.LINE_SPACING,gte=g2.OPPOSITE_SIDE,p2=3,$t=BL.exports={};$t.setConvert=i2();var _te=T5(),wc=$n(),xte=wc.idSort,bte=wc.isLinked;$t.id2name=wc.id2name;$t.name2id=wc.name2id;$t.cleanId=wc.cleanId;$t.list=wc.list;$t.listIds=wc.listIds;$t.getFromId=wc.getFromId;$t.getFromTrace=wc.getFromTrace;var LL=Xy();$t.getAutoRange=LL.getAutoRange;$t.findExtremes=LL.findExtremes;var wte=1e-4;function B5(e){var t=(e[1]-e[0])*wte;return[e[0]-t,e[1]+t]}$t.coerceRef=function(e,t,r,i,a,s){var l=i.charAt(i.length-1),f=r._fullLayout._subplots[l+"axis"],h=i+"ref",v={};return a||(a=f[0]||(typeof s=="string"?s:s[0])),s||(s=a),f=f.concat(f.map(function(m){return m+" domain"})),v[h]={valType:"enumerated",values:f.concat(s?typeof s=="string"?[s]:s:[]),dflt:a},ta.coerce(e,t,v,h)};$t.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};$t.coercePosition=function(e,t,r,i,a,s){var l,f,h=$t.getRefType(i);if(h!=="range")l=ta.ensureNumber,f=r(a,s);else{var v=$t.getFromId(t,i);s=v.fraction2r(s),f=r(a,s),l=v.cleanPos}e[a]=l(f)};$t.cleanPosition=function(e,t,r){var i=r==="paper"||r==="pixel"?ta.ensureNumber:$t.getFromId(t,r).cleanPos;return i(e)};$t.redrawComponents=function(e,t){t=t||$t.listIds(e);var r=e._fullLayout;function i(a,s,l,f){for(var h=Jy.getComponentMethod(a,s),v={},m=0;m2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};$t.saveRangeInitial=function(e,t){for(var r=$t.list(e,"",!0),i=!1,a=0;ab*.3||v(i)||v(a))){var T=r.dtick/2;e+=e+Tl){var f=Number(r.substr(1));s.exactYears>l&&f%12===0?e=$t.tickIncrement(e,"M6","reverse")+as*1.5:s.exactMonths>l?e=$t.tickIncrement(e,"M1","reverse")+as*15.5:e-=Bh;var h=$t.tickIncrement(e,r);if(h<=i)return h}return e}$t.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var i=t.dtick&&qn(t._tmin),a;if(i){var s=$t.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,s*.99+t._tmin*.01]}else{var l=ta.simpleMap(t.range,t.r2l);a=[l[0],.8*l[0]+.2*l[1]]}if(e.range=ta.simpleMap(a,t.l2r),e._isMinor=!0,$t.prepTicks(e,r),i){var f=qn(t.dtick),h=qn(e.dtick),v=f?t.dtick:+t.dtick.substring(1),m=h?e.dtick:+e.dtick.substring(1);f&&h?E5(v,m)?v===2*ll&&m===2*as&&(e.dtick=ll):v===2*ll&&m===3*as?e.dtick=ll:v===ll&&!(t._input.minor||{}).nticks?e.dtick=as:TL(v/m,2.5)?e.dtick=v/2:e.dtick=v:String(t.dtick).charAt(0)==="M"?h?e.dtick="M1":E5(v,m)?v>=12&&m===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?E5(v,m)||(e.dtick=TL(v/m,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 E5(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function TL(e,t){return Math.abs(e/t-1)<.001}$t.prepTicks=function(e,t){var r=ta.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var i=e.nticks,a;i||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ta.bigFont(e.tickfont.size||12):15,i=e._length/a):(a=e._id.charAt(0)==="y"?40:80,i=ta.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(i*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,$t.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(s=i-1,l=i):(s=i,l=i);var f=e[s].value,h=e[l].value,v=Math.abs(h-f),m=r||v,b=0;m>=c2?v>=c2&&v<=vte?b=v:b=f2:r===D5&&m>=h2?v>=h2&&v<=dte?b=v:b=D5:m>=v2?v>=v2&&v<=pte?b=v:b=q0:r===ll&&m>=ll?b=ll:m>=as?b=as:r===Bh&&m>=Bh?b=Bh:r===Df&&m>=Df&&(b=Df);var T;b>=v&&(b=v,T=!0);var S=a+b;if(t.rangebreaks&&b>0){for(var C=84,P=0,E=0;Ell&&(b=v)}(b>0||i===0)&&(e[i].periodX=a+b/2)}}$t.calcTicks=function(t,r){for(var i=t.type,a=t.calendar,s=t.ticklabelstep,l=t.ticklabelmode==="period",f=t.range[0]>t.range[1],h=!t.ticklabelindex||ta.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],v=ta.simpleMap(t.range,t.r2l,void 0,void 0,r),m=v[1]=(N?0:1);z--){var O=!z;z?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var H=z?t:ta.extendFlat({},t,t.minor);if(O?$t.prepMinorTicks(H,t,r):$t.prepTicks(H,r),H.tickmode==="array"){z?(E=[],C=AL(t,!O)):(I=[],P=AL(t,!O));continue}if(H.tickmode==="sync"){E=[],C=Cte(t);continue}var V=B5(v),W=V[0],J=V[1],re=qn(H.dtick),oe=i==="log"&&!(re||H.dtick.charAt(0)==="L"),ne=$t.tickFirst(H,r);if(z){if(t._tmin=ne,ne=J:ve<=J;ve=$t.tickIncrement(ve,Te,m,a)){if(z&&Ce++,H.rangebreaks&&!m){if(ve=T)break}if(E.length>S||ve===fe)break;fe=ve;var pe={value:ve};z?(oe&&ve!==(ve|0)&&(pe.simpleLabel=!0),s>1&&Ce%s&&(pe.skipLabel=!0),E.push(pe)):(pe.minor=!0,I.push(pe))}}if(!I||I.length<2)h=!1;else{var Ae=(I[1].value-I[0].value)*(f?-1:1);Qte(Ae,t.tickformat)||(h=!1)}if(!h)F=E;else{var Me=E.concat(I);l&&E.length&&(Me=Me.slice(1)),Me=Me.sort(function(Rt,Ut){return Rt.value-Ut.value}).filter(function(Rt,Ut,xt){return Ut===0||Rt.value!==xt[Ut-1].value});var Le=Me.map(function(Rt,Ut){return Rt.minor===void 0&&!Rt.skipLabel?Ut:null}).filter(function(Rt){return Rt!==null});Le.forEach(function(Rt){h.map(function(Ut){var xt=Rt+Ut;xt>=0&&xt-1;kt--){if(E[kt].drop){E.splice(kt,1);continue}E[kt].value=P5(E[kt].value,t);var xe=t.c2p(E[kt].value);(pt?Re>xe-ge:ReT||EtT&&(xt.periodX=T),Eta&&Tf2)t/=f2,i=a(10),e.dtick="M"+12*Pf(t,i,l2);else if(s>q0)t/=q0,e.dtick="M"+Pf(t,1,ML);else if(s>as){if(e.dtick=Pf(t,as,e._hasDayOfWeekBreaks?[1,2,7,14]:Ete),!r){var l=$t.getTickFormat(e),f=e.ticklabelmode==="period";f&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=ta.dateTick0(e.calendar,2):e.tick0=ta.dateTick0(e.calendar,1),f&&(e._dowTick0=e.tick0)}}else s>Df?e.dtick=Pf(t,Df,ML):s>Qy?e.dtick=Pf(t,Qy,SL):s>d2?e.dtick=Pf(t,d2,SL):(i=a(10),e.dtick=Pf(t,i,l2))}else if(e.type==="log"){e.tick0=0;var h=ta.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(h[1]-h[0])<1){var v=1.5*Math.abs((h[1]-h[0])/t);t=Math.abs(Math.pow(10,h[1])-Math.pow(10,h[0]))/v,i=a(10),e.dtick="L"+Pf(t,i,l2)}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))):V5(e)?(e.tick0=0,i=1,e.dtick=Pf(t,i,Lte)):(e.tick0=0,i=a(10),e.dtick=Pf(t,i,l2));if(e.dtick===0&&(e.dtick=1),!qn(e.dtick)&&typeof e.dtick!="string"){var m=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(m)}};function IL(e){var t=e.dtick;if(e._tickexponent=0,!qn(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),i=e.l2r(r).replace(/(^-|i)/g,""),a=i.length;if(String(t).charAt(0)==="M")a>10||i.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=as&&a<=10||t>=as*15)e._tickround="d";else if(t>=Qy&&a<=16||t>=Df)e._tickround="M";else if(t>=d2&&a<=19||t>=Qy)e._tickround="S";else{var s=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,s)-20,e._tickround<0&&(e._tickround=4)}}else if(qn(t)||t.charAt(0)==="L"){var l=e.range.map(e.r2d||Number);qn(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var f=Math.max(Math.abs(l[0]),Math.abs(l[1])),h=Math.floor(Math.log(f)/Math.LN10+.01),v=e.minexponent===void 0?3:e.minexponent;Math.abs(h)>v&&(m2(e.exponentformat)&&!O5(h)?e._tickexponent=3*Math.round((h-1)/3):e._tickexponent=h)}else e._tickround=null}$t.tickIncrement=function(e,t,r,i){var a=r?-1:1;if(qn(t))return ta.increment(e,a*t);var s=t.charAt(0),l=a*Number(t.substr(1));if(s==="M")return ta.incrementMonth(e,l,i);if(s==="L")return Math.log(Math.pow(10,e)+l)/Math.LN10;if(s==="D"){var f=t==="D2"?zL:DL,h=e+a*.01,v=ta.roundUp(ta.mod(h,1),f,r);return Math.floor(h)+Math.log(Xl.round(Math.pow(10,v),1))/Math.LN10}throw"unrecognized dtick "+String(t)};$t.tickFirst=function(e,t){var r=e.r2l||Number,i=ta.simpleMap(e.range,r,void 0,void 0,t),a=i[1]=0&&I<=e._length?E:null};if(s&&ta.isArrayOrTypedArray(e.ticktext)){var b=ta.simpleMap(e.range,e.r2l),T=(Math.abs(b[1]-b[0])-(e._lBreaks||0))/1e4;for(v=0;v"+f;else{var v=tg(e),m=e._trueSide||e.side;(!v&&m==="top"||v&&m==="bottom")&&(l+="
")}t.text=l}function Dte(e,t,r,i,a){var s=e.dtick,l=t.x,f=e.tickformat,h=typeof s=="string"&&s.charAt(0);if(a==="never"&&(a=""),i&&h!=="L"&&(s="L3",h="L"),f||h==="L")t.text=eg(Math.pow(10,l),e,a,i);else if(qn(s)||h==="D"&&ta.mod(l+.01,1)<.1){var v=Math.round(l),m=Math.abs(v),b=e.exponentformat;b==="power"||m2(b)&&O5(v)?(v===0?t.text=1:v===1?t.text="10":t.text="10"+(v>1?"":_d)+m+"",t.fontSize*=1.25):(b==="e"||b==="E")&&m>2?t.text="1"+b+(v>0?"+":_d)+m:(t.text=eg(Math.pow(10,l),e,"","fakehover"),s==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(h==="D")t.text=String(Math.round(Math.pow(10,ta.mod(l,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(s);if(e.dtick==="D1"){var T=String(t.text).charAt(0);(T==="0"||T==="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*(l<0?.5:.25)))}}function zte(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function Ite(e,t,r){var i=Math.round(t.x),a=e._categories[i]||[],s=a[1]===void 0?"":String(a[1]),l=a[0]===void 0?"":String(a[0]);r?t.text=l+" - "+s:(t.text=s,t.text2=l)}function Rte(e,t,r,i,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=eg(t.x,e,a,i)}function Fte(e,t,r,i,a){if(e.thetaunit==="radians"&&!r){var s=t.x/180;if(s===0)t.text="0";else{var l=qte(s);if(l[1]>=100)t.text=eg(ta.deg2rad(t.x),e,a,i);else{var f=t.x<0;l[1]===1?l[0]===1?t.text="\u03C0":t.text=l[0]+"\u03C0":t.text=["",l[0],"","\u2044","",l[1],"","\u03C0"].join(""),f&&(t.text=_d+t.text)}}}else t.text=eg(t.x,e,a,i)}function qte(e){function t(f,h){return Math.abs(f-h)<=1e-6}function r(f,h){return t(h,0)?f:r(h,f%h)}function i(f){for(var h=1;!t(Math.round(f*h)/h,f);)h*=10;return h}var a=i(e),s=e*a,l=Math.abs(r(s,a));return[Math.round(s/l),Math.round(a/l)]}var Nte=["f","p","n","\u03BC","m","","k","M","G","T"];function m2(e){return e==="SI"||e==="B"}function O5(e){return e>14||e<-15}function eg(e,t,r,i){var a=e<0,s=t._tickround,l=r||t.exponentformat||"B",f=t._tickexponent,h=$t.getTickFormat(t),v=t.separatethousands;if(i){var m={exponentformat:l,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:qn(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};IL(m),s=(Number(m._tickround)||0)+4,f=m._tickexponent,t.hoverformat&&(h=t.hoverformat)}if(h)return t._numFormat(h)(e).replace(/-/g,_d);var b=Math.pow(10,-s)/2;if(l==="none"&&(f=0),e=Math.abs(e),e"+C+"":l==="B"&&f===9?e+="B":m2(l)&&(e+=Nte[f/3+5])}return a?_d+e:e}$t.getTickFormat=function(e){var t;function r(h){return typeof h!="string"?h:Number(h.replace("M",""))*q0}function i(h,v){var m=["L","D"];if(typeof h==typeof v){if(typeof h=="number")return h-v;var b=m.indexOf(h.charAt(0)),T=m.indexOf(v.charAt(0));return b===T?Number(h.replace(/(L|D)/g,""))-Number(v.replace(/(L|D)/g,"")):b-T}else return typeof h=="number"?1:-1}function a(h,v,m){var b=m||function(C){return C},T=v[0],S=v[1];return(!T&&typeof T!="number"||b(T)<=b(h))&&(!S&&typeof S!="number"||b(S)>=b(h))}function s(h,v){var m=v[0]===null,b=v[1]===null,T=i(h,v[0])>=0,S=i(h,v[1])<=0;return(m||T)&&(b||S)}var l,f;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(m,1).shift())}});var f={false:{left:0,right:0}};return ta.syncOrAsync(a.map(function(h){return function(){if(h){var v=$t.getFromId(e,h);r||(r={}),r.axShifts=f,r.overlayingShiftedAx=l;var m=$t.drawOne(e,v,r);return v._shiftPusher&&N5(v,v._fullDepth||0,f,!0),v._r=v.range.slice(),v._rl=ta.simpleMap(v._r,v.r2l),m}}}))};$t.drawOne=function(e,t,r){r=r||{};var i=r.axShifts||{},a=r.overlayingShiftedAx||[],s,l,f;t.setScale();var h=e._fullLayout,v=t._id,m=v.charAt(0),b=$t.counterLetter(v),T=h._plots[t._mainSubplot];if(!T)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var S=t.linewidth/2||0;t.ticks==="inside"&&(S+=t.ticklen),N5(t,S,i,!0),N5(t,t.shift||0,i,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Kte(t,i));var C=T[m+"axislayer"],P=t._mainLinePosition,E=P+=t._shift,I=t._mainMirrorPosition,F=t._vals=$t.calcTicks(t),N=[t.mirror,E,I].join("_");for(s=0;s0?xt.bottom-Rt:0,Ut))));var Be=0,ft=0;if(t._shiftPusher&&(Be=Math.max(Ut,xt.height>0?Mt==="l"?Rt-xt.left:xt.right-Rt:0),t.title.text!==h._dfltTitle[m]&&(ft=(t._titleStandoff||0)+(t._titleScoot||0),Mt==="l"&&(ft+=CL(t))),t._fullDepth=Math.max(Be,ft)),t.automargin){Et={x:0,y:0,r:0,l:0,t:0,b:0};var mt=[0,1],Ar=typeof t._shift=="number"?t._shift:0;if(m==="x"){if(Mt==="b"?Et[Mt]=t._depth:(Et[Mt]=t._depth=Math.max(xt.width>0?Rt-xt.top:0,Ut),mt.reverse()),xt.width>0){var dr=xt.right-(t._offset+t._length);dr>0&&(Et.xr=1,Et.r=dr);var Tt=t._offset-xt.left;Tt>0&&(Et.xl=0,Et.l=Tt)}}else if(Mt==="l"?(t._depth=Math.max(xt.height>0?Rt-xt.left:0,Ut),Et[Mt]=t._depth-Ar):(t._depth=Math.max(xt.height>0?xt.right-Rt:0,Ut),Et[Mt]=t._depth+Ar,mt.reverse()),xt.height>0){var wt=xt.bottom-(t._offset+t._length);wt>0&&(Et.yb=0,Et.b=wt);var Vt=t._offset-xt.top;Vt>0&&(Et.yt=1,Et.t=Vt)}Et[b]=t.anchor==="free"?t.position:t._anchorAxis.domain[mt[0]],t.title.text!==h._dfltTitle[m]&&(Et[Mt]+=CL(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(ir={x:0,y:0,r:0,l:0,t:0,b:0},ir[Ct]=t.linewidth,t.mirror&&t.mirror!==!0&&(ir[Ct]+=Ut),t.mirror===!0||t.mirror==="ticks"?ir[b]=t._anchorAxis.domain[mt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(ir[b]=[t._counterDomainMin,t._counterDomainMax][mt[1]]))}Nt&&(Wt=Jy.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(kL(Et,t.automargin),kL(ir,t.automargin)),R0.autoMargin(e,U5(t),Et),R0.autoMargin(e,qL(t),ir),R0.autoMargin(e,NL(t),Wt)}),ta.syncOrAsync(vt)}};function kL(e,t){if(e){var r=Object.keys(xL).reduce(function(i,a){return t.indexOf(a)!==-1&&xL[a].forEach(function(s){i[s]=1}),i},{});Object.keys(e).forEach(function(i){r[i]||(i.length===1?e[i]=0:delete e[i])})}}function Bte(e,t){var r=[],i,a=function(s,l){var f=s.xbnd[l];f!==null&&r.push(ta.extendFlat({},s,{x:f}))};if(t.length){for(i=0;ie.range[1],f=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,h=!f;if(r){var v=l?-1:1;r=r*v}if(i){var m=e.side,b=f&&(m==="top"||m==="left")||h&&(m==="bottom"||m==="right")?1:-1;i=i*b}return e._id.charAt(0)==="x"?function(T){return F0(a+e._offset+e.l2p(F5(T))+r,s+i)}:function(T){return F0(s+i,a+e._offset+e.l2p(F5(T))+r)}};function F5(e){return e.periodX!==void 0?e.periodX:e.x}function Hte(e){var t=e.ticklabelposition||"",r=function(S){return t.indexOf(S)!==-1},i=r("top"),a=r("left"),s=r("right"),l=r("bottom"),f=r("inside"),h=l||a||i||s;if(!h&&!f)return[0,0];var v=e.side,m=h?(e.tickwidth||0)/2:0,b=p2,T=e.tickfont?e.tickfont.size:12;return(l||i)&&(m+=T*xd,b+=(e.linewidth||0)/2),(a||s)&&(m+=(e.linewidth||0)/2,b+=p2),f&&v==="top"&&(b-=T*(1-xd)),(a||i)&&(m=-m),(v==="bottom"||v==="right")&&(b=-b),[h?m:0,f?b:0]}$t.makeTickPath=function(e,t,r,i){i||(i={});var a=i.minor;if(a&&!e.minor)return"";var s=i.len!==void 0?i.len:a?e.minor.ticklen:e.ticklen,l=e._id.charAt(0),f=(e.linewidth||1)/2;return l==="x"?"M0,"+(t+f*r)+"v"+s*r:"M"+(t+f*r)+",0h"+s*r};$t.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",a=function(ne){return i.indexOf(ne)!==-1},s=a("top"),l=a("left"),f=a("right"),h=a("bottom"),v=h||l||s||f,m=a("inside"),b=i==="inside"&&e.ticks==="inside"||!m&&e.ticks==="outside"&&e.tickson!=="boundaries",T=0,S=0,C=b?e.ticklen:0;if(m?C*=-1:v&&(C=0),b&&(T+=C,r)){var P=ta.deg2rad(r);T=C*Math.cos(P)+1,S=C*Math.sin(P)}e.showticklabels&&(b||e.showline)&&(T+=.2*e.tickfont.size),T+=(e.linewidth||1)/2*(m?-1:1);var E={labelStandoff:T,labelShift:S},I,F,N,z,O=0,H=e.side,V=e._id.charAt(0),W=e.tickangle,J;if(V==="x")J=!m&&H==="bottom"||m&&H==="top",z=J?1:-1,m&&(z*=-1),I=S*z,F=t+T*z,N=J?1:-.2,Math.abs(W)===90&&(m?N+=jy:W===-90&&H==="bottom"?N=xd:W===90&&H==="top"?N=jy:N=.5,O=jy/2*(W/90)),E.xFn=function(ne){return ne.dx+I+O*ne.fontSize},E.yFn=function(ne){return ne.dy+F+ne.fontSize*N},E.anchorFn=function(ne,fe){if(v){if(l)return"end";if(f)return"start"}return!qn(fe)||fe===0||fe===180?"middle":fe*z<0!==m?"end":"start"},E.heightFn=function(ne,fe,ve){return fe<-60||fe>60?-.5*ve:e.side==="top"!==m?-ve:0};else if(V==="y"){if(J=!m&&H==="left"||m&&H==="right",z=J?1:-1,m&&(z*=-1),I=T,F=S*z,N=0,!m&&Math.abs(W)===90&&(W===-90&&H==="left"||W===90&&H==="right"?N=xd:N=.5),m){var re=qn(W)?+W:0;if(re!==0){var oe=ta.deg2rad(re);O=Math.abs(Math.sin(oe))*xd*z,N=0}}E.xFn=function(ne){return ne.dx+t-(I+ne.fontSize*N)*z+O*ne.fontSize},E.yFn=function(ne){return ne.dy+F+ne.fontSize*jy},E.anchorFn=function(ne,fe){return qn(fe)&&Math.abs(fe)===90?"middle":J?"end":"start"},E.heightFn=function(ne,fe,ve){return e.side==="right"&&(fe*=-1),fe<-30?-ve:fe<30?-.5*ve:0}}return E};function _2(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}$t.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(l){return l.minor&&!l.noTick}):[]).concat(t.ticks?r.vals.filter(function(l){return!l.minor&&!l.noTick}):[]),s=r.layer.selectAll("path."+i).data(a,_2);s.exit().remove(),s.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(l){return Ky.stroke(Xl.select(this),l.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(l){return sl.crispRound(e,l.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),x2(t,[EL]),s.attr("transform",r.transFn)};$t.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,s=a?r.vals.filter(function(I){return I.minor}):[],l=t.showgrid?r.vals.filter(function(I){return!I.minor}):[],f=r.counterAxis;if(f&&$t.shouldShowZeroLine(e,t,f))for(var h=t.tickmode==="array",v=0;v=0;C--){var P=C?T:S;if(P){var E=P.selectAll("path."+i).data(C?l:s,_2);E.exit().remove(),E.enter().append("path").classed(i,1).classed("crisp",r.crisp!==!1),E.attr("transform",r.transFn).attr("d",r.path).each(function(I){return Ky.stroke(Xl.select(this),I.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(I){return sl.dashStyle(I.minor?t.minor.griddash:t.griddash,I.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(I){return(I.minor?b:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&E.attr("d",r.path)}}x2(t,[I5,R5])}};$t.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",a=$t.shouldShowZeroLine(e,t,r.counterAxis),s=r.layer.selectAll("path."+i).data(a?[{x:0,id:t._id}]:[]);s.exit().remove(),s.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(l,f){return xte(l.id,f.id)})}),s.attr("transform",r.transFn).attr("d",r.path).call(Ky.stroke,t.zerolinecolor||Ky.defaultLine).style("stroke-width",sl.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),x2(t,[z5])};$t.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,a=t._id,s=r.cls||a+"tick",l=r.vals.filter(function(pe){return pe.text}),f=r.labelFns,h=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[s],m=r.layer.selectAll("g."+s).data(t.showticklabels?l:[],_2),b=[];m.enter().append("g").classed(s,1).append("text").attr("text-anchor","middle").each(function(pe){var Ae=Xl.select(this),Me=e._promises.length;Ae.call(gd.positionText,f.xFn(pe),f.yFn(pe)).call(sl.font,{family:pe.font,size:pe.fontSize,color:pe.fontColor,weight:pe.fontWeight,style:pe.fontStyle,variant:pe.fontVariant,textcase:pe.fontTextcase,lineposition:pe.fontLineposition,shadow:pe.fontShadow}).text(pe.text).call(gd.convertToTspans,e),e._promises[Me]?b.push(e._promises.pop().then(function(){T(Ae,h)})):T(Ae,h)}),x2(t,[_L]),m.exit().remove(),r.repositionOnUpdate&&m.each(function(pe){Xl.select(this).select("text").call(gd.positionText,f.xFn(pe),f.yFn(pe))});function T(pe,Ae){pe.each(function(Me){var Le=Xl.select(this),Ke=Le.select(".text-math-group"),ht=f.anchorFn(Me,Ae),it=r.transFn.call(Le.node(),Me)+(qn(Ae)&&+Ae!=0?" rotate("+Ae+","+f.xFn(Me)+","+(f.yFn(Me)-Me.fontSize/2)+")":""),lt=gd.lineCount(Le),He=$y*Me.fontSize,_t=f.heightFn(Me,qn(Ae)?+Ae:0,(lt-1)*He);if(_t&&(it+=F0(0,_t)),Ke.empty()){var at=Le.select("text");at.attr({transform:it,"text-anchor":ht}),at.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var At=sl.bBox(Ke.node()).width,kt=At*{end:-.5,start:.5}[ht];Ke.attr("transform",it+F0(kt,0))}})}t._adjustTickLabelsOverflow=function(){var pe=t.ticklabeloverflow;if(!(!pe||pe==="allow")){var Ae=pe.indexOf("hide")!==-1,Me=t._id.charAt(0)==="x",Le=0,Ke=Me?e._fullLayout.width:e._fullLayout.height;if(pe.indexOf("domain")!==-1){var ht=ta.simpleMap(t.range,t.r2l);Le=t.l2p(ht[0])+t._offset,Ke=t.l2p(ht[1])+t._offset}var it=Math.min(Le,Ke),lt=Math.max(Le,Ke),He=t.side,_t=1/0,at=-1/0;m.each(function(ge){var Re=Xl.select(this),xe=Re.select(".text-math-group");if(xe.empty()){var et=sl.bBox(Re.node()),vt=0;Me?(et.right>lt||et.leftlt||et.top+(t.tickangle?0:ge.fontSize/4)t["_visibleLabelMin_"+ht._id]?ge.style("display","none"):lt.K==="tick"&&!it&&ge.style("display",null)})})})})},T(m,v+1?v:h);function S(){return b.length&&Promise.all(b)}var C=null;function P(){if(T(m,h),l.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){C=t.autotickangles[0];var pe=0,Ae=[],Me,Le=1;m.each(function(xt){pe=Math.max(pe,xt.fontSize);var Et=t.l2p(xt.x),ir=q5(this),Wt=sl.bBox(ir.node());Le=Math.max(Le,gd.lineCount(ir)),Ae.push({top:0,bottom:10,height:10,left:Et-Wt.width/2,right:Et+Wt.width/2+2,width:Wt.width+2})});var Ke=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ht=l.length,it=Math.abs((l[ht-1].x-l[0].x)*t._m)/(ht-1),lt=Ke?it/2:it,He=Ke?t.ticklen:pe*1.25*Le,_t=Math.sqrt(Math.pow(lt,2)+Math.pow(He,2)),at=lt/_t,At=t.autotickangles.map(function(xt){return xt*Math.PI/180}),kt=At.find(function(xt){return Math.abs(Math.cos(xt))<=at});kt===void 0&&(kt=At.reduce(function(xt,Et){return Math.abs(Math.cos(xt))Ce*ve&&(oe=ve,W[V]=J[V]=ne[V])}var Se=Math.abs(oe-re);Se-z>0?(Se-=z,z*=1+z/Se):z=0,t._id.charAt(0)!=="y"&&(z=-z),W[H]=F.p2r(F.r2p(J[H])+O*z),F.autorange==="min"||F.autorange==="max reversed"?(W[0]=null,F._rangeInitial0=void 0,F._rangeInitial1=void 0):(F.autorange==="max"||F.autorange==="min reversed")&&(W[1]=null,F._rangeInitial0=void 0,F._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[F._name+".range"]=W}var Te=ta.syncOrAsync(E);return Te&&Te.then&&e._promises.push(Te),Te};function Gte(e,t,r){var i=t._id+"divider",a=r.vals,s=r.layer.selectAll("path."+i).data(a,_2);s.exit().remove(),s.enter().insert("path",":first-child").classed(i,1).classed("crisp",1).call(Ky.stroke,t.dividercolor).style("stroke-width",sl.crispRound(e,t.dividerwidth,1)+"px"),s.attr("transform",r.transFn).attr("d",r.path)}$t.getPxPosition=function(e,t){var r=e._fullLayout._size,i=t._id.charAt(0),a=t.side,s;if(t.anchor!=="free"?s=t._anchorAxis:i==="x"?s={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:i==="y"&&(s={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return s._offset;if(a==="bottom"||a==="right")return s._offset+s._length};function CL(e){var t=e.title.font.size,r=(e.title.text.match(gd.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(xd+r*$y):r?t*(r+1)*$y:t}function Zte(e,t){var r=e._fullLayout,i=t._id,a=i.charAt(0),s=t.title.font.size,l,f=(t.title.text.match(gd.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?l=t._depth+t.title.standoff+s*xd:(t.side==="top"||t.side==="left")&&(l=t._depth+t.title.standoff+s*(jy+f*$y));else{var h=tg(t);if(t.type==="multicategory")l=t._depth;else{var v=1.5*s;h&&(v=.5*s,t.ticks==="outside"&&(v+=t.ticklen)),l=10+v+(t.linewidth?t.linewidth-1:0)}h||(a==="x"?l+=t.side==="top"?s*(t.showticklabels?1:0):s*(t.showticklabels?1.5:.5):l+=t.side==="right"?s*(t.showticklabels?1:.5):s*(t.showticklabels?.5:0))}var m=$t.getPxPosition(e,t),b,T,S;a==="x"?(T=t._offset+t._length/2,S=t.side==="top"?m-l:m+l):(S=t._offset+t._length/2,T=t.side==="right"?m+l:m-l,b={rotate:"-90",offset:0});var C;if(t.type!=="multicategory"){var P=t._selections[t._id+"tick"];if(C={selection:P,side:t.side},P&&P.node()&&P.node().parentNode){var E=sl.getTranslate(P.node().parentNode);C.offsetLeft=E.x,C.offsetTop=E.y}t.title.hasOwnProperty("standoff")&&(C.pad=0)}return t._titleStandoff=l,cte.draw(e,i+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:C,transform:b,attributes:{x:T,y:S,"text-anchor":"middle"}})}$t.shouldShowZeroLine=function(e,t,r){var i=ta.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===y2)&&(FL(t,0)||!Yte(e,t,r,i)||Wte(e,t))};$t.clipEnds=function(e,t){return t.filter(function(r){return FL(e,r.x)})};function FL(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=yte:/%L/.test(t)?e>=mte:/%[SX]/.test(t)?e>=d2:/%M/.test(t)?e>=Qy:/%[HI]/.test(t)?e>=Df:/%p/.test(t)?e>=Bh:/%[Aadejuwx]/.test(t)?e>=as:/%[UVW]/.test(t)?e>=ll:/%[Bbm]/.test(t)?e>=v2:/%[q]/.test(t)?e>=h2:/%[Yy]/.test(t)?e>=c2:!0}});var UL=de((u1e,OL)=>{"use strict";OL.exports=function(t,r,i){var a,s;if(i){var l=r==="reversed"||r==="min reversed"||r==="max reversed";a=i[l?1:0],s=i[l?0:1]}var f=t("autorangeoptions.minallowed",s===null?a:void 0),h=t("autorangeoptions.maxallowed",a===null?s:void 0);f===void 0&&t("autorangeoptions.clipmin"),h===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var H5=de((f1e,VL)=>{"use strict";var $te=UL();VL.exports=function(t,r,i,a){var s=r._template||{},l=r.type||s.type||"-";i("minallowed"),i("maxallowed");var f=i("range");if(!f){var h;!a.noInsiderange&&l!=="log"&&(h=i("insiderange"),h&&(h[0]===null||h[1]===null)&&(r.insiderange=!1,h=void 0),h&&(f=i("range",h)))}var v=r.getAutorangeDflt(f,a),m=i("autorange",v),b;f&&(f[0]===null&&f[1]===null||(f[0]===null||f[1]===null)&&(m==="reversed"||m===!0)||f[0]!==null&&(m==="min"||m==="max reversed")||f[1]!==null&&(m==="max"||m==="min reversed"))&&(f=void 0,delete r.range,r.autorange=!0,b=!0),b||(v=r.getAutorangeDflt(f,a),m=i("autorange",v)),m&&($te(i,m,f),(l==="linear"||l==="-")&&i("rangemode")),r.cleanRange()}});var GL=de((c1e,HL)=>{var ere={left:0,top:0};HL.exports=tre;function tre(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,a=e.clientY||0,s=rre(t);return r[0]=i-s.left,r[1]=a-s.top,r}function rre(e){return e===window||e===document||e===document.body?ere:e.getBoundingClientRect()}});var G5=de((h1e,ZL)=>{"use strict";var are=_w();function ire(){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}ZL.exports=are&&ire()});var WL=de((v1e,YL)=>{"use strict";YL.exports=function(t,r,i,a,s){var l=(t-i)/(a-i),f=l+r/(a-i),h=(l+f)/2;return s==="left"||s==="bottom"?l:s==="center"||s==="middle"?h:s==="right"||s==="top"?f:l<2/3-h?l:f>4/3-h?f:h}});var JL=de((d1e,jL)=>{"use strict";var XL=Bt(),nre=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];jL.exports=function(t,r,i,a){return i==="left"?t=0:i==="center"?t=1:i==="right"?t=2:t=XL.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=XL.constrain(Math.floor(r*3),0,2),nre[r][t]}});var QL=de((p1e,KL)=>{"use strict";var ore=qy(),sre=b_(),lre=Ey().getGraphDiv,ure=ky(),Z5=KL.exports={};Z5.wrapped=function(e,t,r){e=lre(e),e._fullLayout&&sre.clear(e._fullLayout._uid+ure.HOVERID),Z5.raw(e,t,r)};Z5.raw=function(t,r){var i=t._fullLayout,a=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&ore.triggerHandler(t,"plotly_beforehover",r)===!1)&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}))}});var jl=de((m1e,tP)=>{"use strict";var fre=GL(),Y5=bw(),cre=G5(),hre=Bt().removeElement,vre=Ao(),bd=tP.exports={};bd.align=WL();bd.getCursor=JL();var $L=QL();bd.unhover=$L.wrapped;bd.unhoverRaw=$L.raw;bd.init=function(t){var r=t.gd,i=1,a=r._context.doubleClickDelay,s=t.element,l,f,h,v,m,b,T,S;r._mouseDownTime||(r._mouseDownTime=0),s.style.pointerEvents="all",s.onmousedown=E,cre?(s._ontouchstart&&s.removeEventListener("touchstart",s._ontouchstart),s._ontouchstart=E,s.addEventListener("touchstart",E,{passive:!1})):s.ontouchstart=E;function C(N,z,O){return Math.abs(N)a&&(i=Math.max(i-1,1)),r._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(i,b),!S){var z;try{z=new MouseEvent("click",N)}catch(H){var O=W5(N);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",N.bubbles,N.cancelable,N.view,N.detail,N.screenX,N.screenY,O[0],O[1],N.ctrlKey,N.altKey,N.shiftKey,N.metaKey,N.button,N.relatedTarget)}T.dispatchEvent(z)}r._dragging=!1,r._dragged=!1}};function eP(){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}bd.coverSlip=eP;function W5(e){return fre(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Oh=de((y1e,rP)=>{"use strict";rP.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(i){i.indexOf("cursor-")===0&&t.classed(i,!1)}),r&&t.classed("cursor-"+r,!0)}});var nP=de((g1e,iP)=>{"use strict";var X5=Oh(),rg="data-savedcursor",aP="!!";iP.exports=function(t,r){var i=t.attr(rg);if(r){if(!i){for(var a=(t.attr("class")||"").split(" "),s=0;s{"use strict";var j5=qo(),dre=Af();oP.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:dre.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:j5({editType:"legend"}),grouptitlefont:j5({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:j5({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var w2=de(b2=>{"use strict";b2.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};b2.isVertical=function(t){return t.orientation!=="h"};b2.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var $5=de((b1e,sP)=>{"use strict";var K5=la(),ul=Bt(),pre=Di(),mre=ms(),yre=J5(),gre=d0(),Q5=w2();function _re(e,t,r,i){var a=t[e]||{},s=pre.newContainer(r,e);function l(Te,pe){return ul.coerce(a,s,yre,Te,pe)}var f=ul.coerceFont(l,"font",r.font);l("bgcolor",r.paper_bgcolor),l("bordercolor");var h=l("visible");if(h){for(var v,m=function(Te,pe){var Ae=v._input,Me=v;return ul.coerce(Ae,Me,mre,Te,pe)},b=r.font||{},T=ul.coerceFont(l,"grouptitlefont",b,{overrideDflt:{size:Math.round(b.size*1.1)}}),S=0,C=!1,P="normal",E=(r.shapes||[]).filter(function(Te){return Te.showlegend}),I=i.concat(E).filter(function(Te){return e===(Te.legend||"legend")}),F=0;F(e==="legend"?1:0));if(z===!1&&(r[e]=void 0),!(z===!1&&!a.uirevision)&&(l("uirevision",r.uirevision),z!==!1)){l("borderwidth");var O=l("orientation"),H=l("yref"),V=l("xref"),W=O==="h",J=H==="paper",re=V==="paper",oe,ne,fe,ve="left";W?(oe=0,K5.getComponentMethod("rangeslider","isVisible")(t.xaxis)?J?(ne=1.1,fe="bottom"):(ne=1,fe="top"):J?(ne=-.1,fe="top"):(ne=0,fe="bottom")):(ne=1,fe="auto",re?oe=1.02:(oe=1,ve="right")),ul.coerce(a,s,{x:{valType:"number",editType:"legend",min:re?-2:0,max:re?3:1,dflt:oe}},"x"),ul.coerce(a,s,{y:{valType:"number",editType:"legend",min:J?-2:0,max:J?3:1,dflt:ne}},"y"),l("traceorder",P),Q5.isGrouped(r[e])&&l("tracegroupgap"),l("entrywidth"),l("entrywidthmode"),l("indentation"),l("itemsizing"),l("itemwidth"),l("itemclick"),l("itemdoubleclick"),l("groupclick"),l("xanchor",ve),l("yanchor",fe),l("valign"),ul.noneOrAll(a,s,["x","y"]);var Ce=l("title.text");if(Ce){l("title.side",W?"left":"top");var Se=ul.extendFlat({},f,{size:ul.bigFont(f.size)});ul.coerceFont(l,"title.font",Se)}}}}sP.exports=function(t,r,i){var a,s=i.slice(),l=r.shapes;if(l)for(a=0;a{"use strict";var N0=la(),t4=Bt(),xre=t4.pushUnique,e4=!0;lP.exports=function(t,r,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var s=a.legend.itemclick,l=a.legend.itemdoubleclick,f=a.legend.groupclick;i===1&&s==="toggle"&&l==="toggleothers"&&e4&&r.data&&r._context.showTips&&t4.notifier(t4._(r,"Double-click on legend to isolate one trace"),"long"),e4=!1;var h;if(i===1?h=s:i===2&&(h=l),!h)return;var v=f==="togglegroup",m=a.hiddenlabels?a.hiddenlabels.slice():[],b=t.data()[0][0];if(b.groupTitle&&b.noClick)return;var T=r._fullData,S=(a.shapes||[]).filter(function(Rt){return Rt.showlegend}),C=T.concat(S),P=b.trace;P._isShape&&(P=P._fullInput);var E=P.legendgroup,I,F,N,z,O,H,V={},W=[],J=[],re=[];function oe(Rt,Ut){var xt=W.indexOf(Rt),Et=V.visible;return Et||(Et=V.visible=[]),W.indexOf(Rt)===-1&&(W.push(Rt),xt=W.length-1),Et[xt]=Ut,xt}var ne=(a.shapes||[]).map(function(Rt){return Rt._input}),fe=!1;function ve(Rt,Ut){ne[Rt].visible=Ut,fe=!0}function Ce(Rt,Ut){if(!(b.groupTitle&&!v)){var xt=Rt._fullInput||Rt,Et=xt._isShape,ir=xt.index;ir===void 0&&(ir=xt._index);var Wt=xt.visible===!1?!1:Ut;Et?ve(ir,Wt):oe(ir,Wt)}}var Se=P.legend,Te=P._fullInput,pe=Te&&Te._isShape;if(!pe&&N0.traceIs(P,"pie-like")){var Ae=b.label,Me=m.indexOf(Ae);if(h==="toggle")Me===-1?m.push(Ae):m.splice(Me,1);else if(h==="toggleothers"){var Le=Me!==-1,Ke=[];for(I=0;I{"use strict";fP.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var vP=de((A1e,hP)=>{"use strict";var cP=la(),a4=w2();hP.exports=function(t,r,i){var a=r._inHover,s=a4.isGrouped(r),l=a4.isReversed(r),f={},h=[],v=!1,m={},b=0,T=0,S,C;function P(Te,pe,Ae){if(r.visible!==!1&&!(i&&Te!==r._id))if(pe===""||!a4.isGrouped(r)){var Me="~~i"+b;h.push(Me),f[Me]=[Ae],b++}else h.indexOf(pe)===-1?(h.push(pe),v=!0,f[pe]=[Ae]):f[pe].push(Ae)}for(S=0;Sre&&(J=re)}V[S][0]._groupMinRank=J,V[S][0]._preGroupSort=S}var oe=function(Te,pe){return Te[0]._groupMinRank-pe[0]._groupMinRank||Te[0]._preGroupSort-pe[0]._preGroupSort},ne=function(Te,pe){return Te.trace.legendrank-pe.trace.legendrank||Te._preSort-pe._preSort};for(V.forEach(function(Te,pe){Te[0]._preGroupSort=pe}),V.sort(oe),S=0;S{"use strict";var T2=Bt();function dP(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}wd.formatPiePercent=function(t,r){var i=dP((t*100).toPrecision(3));return T2.numSeparate(i,r)+"%"};wd.formatPieValue=function(t,r){var i=dP(t.toPrecision(10));return T2.numSeparate(i,r)};wd.getFirstFilled=function(t,r){if(T2.isArrayOrTypedArray(t))for(var i=0;i{"use strict";var bre=_i(),wre=Ua();pP.exports=function(t,r,i,a){var s=i.marker.pattern;s&&s.shape?bre.pointStyle(t,i,a,r):wre.fill(t,r.color)}});var xP=de((k1e,_P)=>{"use strict";var yP=Ua(),gP=i4().castOption,Tre=mP();_P.exports=function(t,r,i,a){var s=i.marker.line,l=gP(s.color,r.pts)||yP.defaultLine,f=gP(s.width,r.pts)||0;t.call(Tre,r,i,a).style("stroke-width",f).call(yP.stroke,l)}});var l4=de((C1e,SP)=>{"use strict";var is=ja(),n4=la(),Bo=Bt(),bP=Bo.strTranslate,ys=_i(),Jl=Ua(),o4=kf().extractOpts,A2=rs(),Are=xP(),Mre=i4().castOption,Sre=r4(),wP=12,TP=5,Td=2,kre=10,B0=5;SP.exports=function(t,r,i){var a=r._fullLayout;i||(i=a.legend);var s=i.itemsizing==="constant",l=i.itemwidth,f=(l+Sre.itemGap*2)/2,h=bP(f,0),v=function(V,W,J,re){var oe;if(V+1)oe=V;else if(W&&W.width>0)oe=W.width;else return 0;return s?re:Math.min(oe,J)};t.each(function(V){var W=is.select(this),J=Bo.ensureSingle(W,"g","layers");J.style("opacity",V[0].trace.opacity);var re=i.indentation,oe=i.valign,ne=V[0].lineHeight,fe=V[0].height;if(oe==="middle"&&re===0||!ne||!fe)J.attr("transform",null);else{var ve={top:1,bottom:-1}[oe],Ce=ve*(.5*(ne-fe+3))||0,Se=i.indentation;J.attr("transform",bP(Se,Ce))}var Te=J.selectAll("g.legendfill").data([V]);Te.enter().append("g").classed("legendfill",!0);var pe=J.selectAll("g.legendlines").data([V]);pe.enter().append("g").classed("legendlines",!0);var Ae=J.selectAll("g.legendsymbols").data([V]);Ae.enter().append("g").classed("legendsymbols",!0),Ae.selectAll("g.legendpoints").data([V]).enter().append("g").classed("legendpoints",!0)}).each(H).each(T).each(C).each(S).each(E).each(z).each(N).each(m).each(b).each(I).each(F);function m(V){var W=AP(V),J=W.showFill,re=W.showLine,oe=W.showGradientLine,ne=W.showGradientFill,fe=W.anyFill,ve=W.anyLine,Ce=V[0],Se=Ce.trace,Te,pe,Ae=o4(Se),Me=Ae.colorscale,Le=Ae.reversescale,Ke=function(At){if(At.size())if(J)ys.fillGroupStyle(At,r,!0);else{var kt="legendfill-"+Se.uid;ys.gradient(At,r,kt,s4(Le),Me,"fill")}},ht=function(At){if(At.size()){var kt="legendline-"+Se.uid;ys.lineGroupStyle(At),ys.gradient(At,r,kt,s4(Le),Me,"stroke")}},it=A2.hasMarkers(Se)||!fe?"M5,0":ve?"M5,-2":"M5,-3",lt=is.select(this),He=lt.select(".legendfill").selectAll("path").data(J||ne?[V]:[]);if(He.enter().append("path").classed("js-fill",!0),He.exit().remove(),He.attr("d",it+"h"+l+"v6h-"+l+"z").call(Ke),re||oe){var _t=v(void 0,Se.line,kre,TP);pe=Bo.minExtend(Se,{line:{width:_t}}),Te=[Bo.minExtend(Ce,{trace:pe})]}var at=lt.select(".legendlines").selectAll("path").data(re||oe?[Te]:[]);at.enter().append("path").classed("js-line",!0),at.exit().remove(),at.attr("d",it+(oe?"l"+l+",0.0001":"h"+l)).call(re?ys.lineGroupStyle:ht)}function b(V){var W=AP(V),J=W.anyFill,re=W.anyLine,oe=W.showLine,ne=W.showMarker,fe=V[0],ve=fe.trace,Ce=!ne&&!re&&!J&&A2.hasText(ve),Se,Te;function pe(He,_t,at,At){var kt=Bo.nestedProperty(ve,He).get(),pt=Bo.isArrayOrTypedArray(kt)&&_t?_t(kt):kt;if(s&&pt&&At!==void 0&&(pt=At),at){if(ptat[1])return at[1]}return pt}function Ae(He){return fe._distinct&&fe.index&&He[fe.index]?He[fe.index]:He[0]}if(ne||Ce||oe){var Me={},Le={};if(ne){Me.mc=pe("marker.color",Ae),Me.mx=pe("marker.symbol",Ae),Me.mo=pe("marker.opacity",Bo.mean,[.2,1]),Me.mlc=pe("marker.line.color",Ae),Me.mlw=pe("marker.line.width",Bo.mean,[0,5],Td),Le.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ke=pe("marker.size",Bo.mean,[2,16],wP);Me.ms=Ke,Le.marker.size=Ke}oe&&(Le.line={width:pe("line.width",Ae,[0,10],TP)}),Ce&&(Me.tx="Aa",Me.tp=pe("textposition",Ae),Me.ts=10,Me.tc=pe("textfont.color",Ae),Me.tf=pe("textfont.family",Ae),Me.tw=pe("textfont.weight",Ae),Me.ty=pe("textfont.style",Ae),Me.tv=pe("textfont.variant",Ae),Me.tC=pe("textfont.textcase",Ae),Me.tE=pe("textfont.lineposition",Ae),Me.tS=pe("textfont.shadow",Ae)),Se=[Bo.minExtend(fe,Me)],Te=Bo.minExtend(ve,Le),Te.selectedpoints=null,Te.texttemplate=null}var ht=is.select(this).select("g.legendpoints"),it=ht.selectAll("path.scatterpts").data(ne?Se:[]);it.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",h),it.exit().remove(),it.call(ys.pointStyle,Te,r),ne&&(Se[0].mrc=3);var lt=ht.selectAll("g.pointtext").data(Ce?Se:[]);lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",h),lt.exit().remove(),lt.selectAll("text").call(ys.textPointStyle,Te,r)}function T(V){var W=V[0].trace,J=W.type==="waterfall";if(V[0]._distinct&&J){var re=V[0].trace[V[0].dir].marker;return V[0].mc=re.color,V[0].mlw=re.line.width,V[0].mlc=re.line.color,P(V,this,"waterfall")}var oe=[];W.visible&&J&&(oe=V[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 ne=is.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(oe);ne.enter().append("path").classed("legendwaterfall",!0).attr("transform",h).style("stroke-miterlimit",1),ne.exit().remove(),ne.each(function(fe){var ve=is.select(this),Ce=W[fe[0]].marker,Se=v(void 0,Ce.line,B0,Td);ve.attr("d",fe[1]).style("stroke-width",Se+"px").call(Jl.fill,Ce.color),Se&&ve.call(Jl.stroke,Ce.line.color)})}function S(V){P(V,this)}function C(V){P(V,this,"funnel")}function P(V,W,J){var re=V[0].trace,oe=re.marker||{},ne=oe.line||{},fe=oe.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ve=J?re.visible&&re.type===J:n4.traceIs(re,"bar"),Ce=is.select(W).select("g.legendpoints").selectAll("path.legend"+J).data(ve?[V]:[]);Ce.enter().append("path").classed("legend"+J,!0).attr("d",fe).attr("transform",h),Ce.exit().remove(),Ce.each(function(Se){var Te=is.select(this),pe=Se[0],Ae=v(pe.mlw,oe.line,B0,Td);Te.style("stroke-width",Ae+"px");var Me=pe.mcc;if(!i._inHover&&"mc"in pe){var Le=o4(oe),Ke=Le.mid;Ke===void 0&&(Ke=(Le.max+Le.min)/2),Me=ys.tryColorscale(oe,"")(Ke)}var ht=Me||pe.mc||oe.color,it=oe.pattern,lt=it&&ys.getPatternAttr(it.shape,0,"");if(lt){var He=ys.getPatternAttr(it.bgcolor,0,null),_t=ys.getPatternAttr(it.fgcolor,0,null),at=it.fgopacity,At=MP(it.size,8,10),kt=MP(it.solidity,.5,1),pt="legend-"+re.uid;Te.call(ys.pattern,"legend",r,pt,lt,At,kt,Me,it.fillmode,He,_t,at)}else Te.call(Jl.fill,ht);Ae&&Jl.stroke(Te,pe.mlc||ne.color)})}function E(V){var W=V[0].trace,J=is.select(this).select("g.legendpoints").selectAll("path.legendbox").data(W.visible&&n4.traceIs(W,"box-violin")?[V]:[]);J.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",h),J.exit().remove(),J.each(function(){var re=is.select(this);if((W.boxpoints==="all"||W.points==="all")&&Jl.opacity(W.fillcolor)===0&&Jl.opacity((W.line||{}).color)===0){var oe=Bo.minExtend(W,{marker:{size:s?wP:Bo.constrain(W.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});J.call(ys.pointStyle,oe,r)}else{var ne=v(void 0,W.line,B0,Td);re.style("stroke-width",ne+"px").call(Jl.fill,W.fillcolor),ne&&Jl.stroke(re,W.line.color)}})}function I(V){var W=V[0].trace,J=is.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(W.visible&&W.type==="candlestick"?[V,V]:[]);J.enter().append("path").classed("legendcandle",!0).attr("d",function(re,oe){return oe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",h).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(re,oe){var ne=is.select(this),fe=W[oe?"increasing":"decreasing"],ve=v(void 0,fe.line,B0,Td);ne.style("stroke-width",ve+"px").call(Jl.fill,fe.fillcolor),ve&&Jl.stroke(ne,fe.line.color)})}function F(V){var W=V[0].trace,J=is.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(W.visible&&W.type==="ohlc"?[V,V]:[]);J.enter().append("path").classed("legendohlc",!0).attr("d",function(re,oe){return oe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",h).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(re,oe){var ne=is.select(this),fe=W[oe?"increasing":"decreasing"],ve=v(void 0,fe.line,B0,Td);ne.style("fill","none").call(ys.dashLine,fe.line.dash,ve),ve&&Jl.stroke(ne,fe.line.color)})}function N(V){O(V,this,"pie")}function z(V){O(V,this,"funnelarea")}function O(V,W,J){var re=V[0],oe=re.trace,ne=J?oe.visible&&oe.type===J:n4.traceIs(oe,J),fe=is.select(W).select("g.legendpoints").selectAll("path.legend"+J).data(ne?[V]:[]);if(fe.enter().append("path").classed("legend"+J,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",h),fe.exit().remove(),fe.size()){var ve=oe.marker||{},Ce=v(Mre(ve.line.width,re.pts),ve.line,B0,Td),Se="pieLike",Te=Bo.minExtend(oe,{marker:{line:{width:Ce}}},Se),pe=Bo.minExtend(re,{trace:Te},Se);Are(fe,pe,Te,r)}}function H(V){var W=V[0].trace,J,re=[];if(W.visible)switch(W.type){case"histogram2d":case"heatmap":re=[["M-15,-2V4H15V-2Z"]],J=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":re=[["M-6,-6V6H6V-6Z"]],J=!0;break;case"densitymapbox":case"densitymap":re=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],J="radial";break;case"cone":re=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],J=!1;break;case"streamtube":re=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],J=!1;break;case"surface":re=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],J=!0;break;case"mesh3d":re=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],J=!1;break;case"volume":re=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],J=!0;break;case"isosurface":re=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],J=!1;break}var oe=is.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(re);oe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",h).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(ne,fe){var ve=is.select(this),Ce=o4(W),Se=Ce.colorscale,Te=Ce.reversescale,pe=function(Ke){if(Ke.size()){var ht="legendfill-"+W.uid;ys.gradient(Ke,r,ht,s4(Te,J==="radial"),Se,"fill")}},Ae;if(Se){if(!J){var Le=Se.length;Ae=fe===0?Se[Te?Le-1:0][1]:fe===1?Se[Te?0:Le-1][1]:Se[Math.floor((Le-1)/2)][1]}}else{var Me=W.vertexcolor||W.facecolor||W.color;Ae=Bo.isArrayOrTypedArray(Me)?Me[fe]||Me[0]:Me}ve.attr("d",ne[0]),Ae?ve.call(Jl.fill,Ae):ve.call(pe)})}};function s4(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function AP(e){var t=e[0].trace,r=t.contours,i=A2.hasLines(t),a=A2.hasMarkers(t),s=t.visible&&t.fill&&t.fill!=="none",l=!1,f=!1;if(r){var h=r.coloring;h==="lines"?l=!0:i=h==="none"||h==="heatmap"||r.showlines,r.type==="constraint"?s=r._operation!=="=":(h==="fill"||h==="heatmap")&&(f=!0)}return{showMarker:a,showLine:i,showFill:s,showGradientLine:l,showGradientFill:f,anyLine:i||l,anyFill:s||f}}function MP(e,t,r){return e&&Bo.isArrayOrTypedArray(e)?t:e>r?r:e}});var h4=de((E1e,FP)=>{"use strict";var Os=ja(),Nn=Bt(),f4=eo(),V0=la(),kP=qy(),u4=jl(),Bn=_i(),S2=Ua(),Ad=co(),CP=uP(),Wn=r4(),c4=ts(),IP=c4.LINE_SPACING,U0=c4.FROM_TL,EP=c4.FROM_BR,LP=vP(),Cre=l4(),PP=w2(),O0=1,Ere=/^legend[0-9]*$/;FP.exports=function(t,r){if(r)DP(t,r);else{var i=t._fullLayout,a=i._legends,s=i._infolayer.selectAll('[class^="legend"]');s.each(function(){var v=Os.select(this),m=v.attr("class"),b=m.split(" ")[0];b.match(Ere)&&a.indexOf(b)===-1&&v.remove()});for(var l=0;l1)}var C=i.hiddenlabels||[];if(!f&&(!i.showlegend||!h.length))return l.selectAll("."+a).remove(),i._topdefs.select("#"+s).remove(),f4.autoMargin(e,a);var P=Nn.ensureSingle(l,"g",a,function(W){f||W.attr("pointer-events","all")}),E=Nn.ensureSingleById(i._topdefs,"clipPath",s,function(W){W.append("rect")}),I=Nn.ensureSingle(P,"rect","bg",function(W){W.attr("shape-rendering","crispEdges")});I.call(S2.stroke,r.bordercolor).call(S2.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var F=Nn.ensureSingle(P,"g","scrollbox"),N=r.title;r._titleWidth=0,r._titleHeight=0;var z;N.text?(z=Nn.ensureSingle(F,"text",a+"titletext"),z.attr("text-anchor","start").call(Bn.font,N.font).text(N.text),k2(z,F,e,r,O0)):F.selectAll("."+a+"titletext").remove();var O=Nn.ensureSingle(P,"rect","scrollbar",function(W){W.attr(Wn.scrollBarEnterAttrs).call(S2.fill,Wn.scrollBarColor)}),H=F.selectAll("g.groups").data(h);H.enter().append("g").attr("class","groups"),H.exit().remove();var V=H.selectAll("g.traces").data(Nn.identity);V.enter().append("g").attr("class","traces"),V.exit().remove(),V.style("opacity",function(W){var J=W[0].trace;return V0.traceIs(J,"pie-like")?C.indexOf(W[0].label)!==-1?.5:1:J.visible==="legendonly"?.5:1}).each(function(){Os.select(this).call(Pre,e,r)}).call(Cre,e,r).each(function(){f||Os.select(this).call(Dre,e,a)}),Nn.syncOrAsync([f4.previousPromises,function(){return Rre(e,H,V,r)},function(){var W=i._size,J=r.borderwidth,re=r.xref==="paper",oe=r.yref==="paper";if(N.text&&Lre(z,r,J),!f){var ne,fe;re?ne=W.l+W.w*r.x-U0[C2(r)]*r._width:ne=i.width*r.x-U0[C2(r)]*r._width,oe?fe=W.t+W.h*(1-r.y)-U0[E2(r)]*r._effHeight:fe=i.height*(1-r.y)-U0[E2(r)]*r._effHeight;var ve=Fre(e,a,ne,fe);if(ve)return;if(i.margin.autoexpand){var Ce=ne,Se=fe;ne=re?Nn.constrain(ne,0,i.width-r._width):Ce,fe=oe?Nn.constrain(fe,0,i.height-r._effHeight):Se,ne!==Ce&&Nn.log("Constrain "+a+".x to make legend fit inside graph"),fe!==Se&&Nn.log("Constrain "+a+".y to make legend fit inside graph")}Bn.setTranslate(P,ne,fe)}if(O.on(".drag",null),P.on("wheel",null),f||r._height<=r._maxHeight||e._context.staticPlot){var Te=r._effHeight;f&&(Te=r._height),I.attr({width:r._width-J,height:Te-J,x:J/2,y:J/2}),Bn.setTranslate(F,0,0),E.select("rect").attr({width:r._width-2*J,height:Te-2*J,x:J,y:J}),Bn.setClipUrl(F,s,e),Bn.setRect(O,0,0,0,0),delete r._scrollY}else{var pe=Math.max(Wn.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),Ae=r._effHeight-pe-2*Wn.scrollBarMargin,Me=r._height-r._effHeight,Le=Ae/Me,Ke=Math.min(r._scrollY||0,Me);I.attr({width:r._width-2*J+Wn.scrollBarWidth+Wn.scrollBarMargin,height:r._effHeight-J,x:J/2,y:J/2}),E.select("rect").attr({width:r._width-2*J+Wn.scrollBarWidth+Wn.scrollBarMargin,height:r._effHeight-2*J,x:J,y:J+Ke}),Bn.setClipUrl(F,s,e),kt(Ke,pe,Le),P.on("wheel",function(){Ke=Nn.constrain(r._scrollY+Os.event.deltaY/Ae*Me,0,Me),kt(Ke,pe,Le),Ke!==0&&Ke!==Me&&Os.event.preventDefault()});var ht,it,lt,He=function(et,vt,tt){var Nt=(tt-vt)/Le+et;return Nn.constrain(Nt,0,Me)},_t=function(et,vt,tt){var Nt=(vt-tt)/Le+et;return Nn.constrain(Nt,0,Me)},at=Os.behavior.drag().on("dragstart",function(){var et=Os.event.sourceEvent;et.type==="touchstart"?ht=et.changedTouches[0].clientY:ht=et.clientY,lt=Ke}).on("drag",function(){var et=Os.event.sourceEvent;et.buttons===2||et.ctrlKey||(et.type==="touchmove"?it=et.changedTouches[0].clientY:it=et.clientY,Ke=He(lt,ht,it),kt(Ke,pe,Le))});O.call(at);var At=Os.behavior.drag().on("dragstart",function(){var et=Os.event.sourceEvent;et.type==="touchstart"&&(ht=et.changedTouches[0].clientY,lt=Ke)}).on("drag",function(){var et=Os.event.sourceEvent;et.type==="touchmove"&&(it=et.changedTouches[0].clientY,Ke=_t(lt,ht,it),kt(Ke,pe,Le))});F.call(At)}function kt(et,vt,tt){r._scrollY=e._fullLayout[a]._scrollY=et,Bn.setTranslate(F,0,-et),Bn.setRect(O,r._width,Wn.scrollBarMargin+et*tt,Wn.scrollBarWidth,vt),E.select("rect").attr("y",J+et)}if(e._context.edits.legendPosition){var pt,ge,Re,xe;P.classed("cursor-move",!0),u4.init({element:P.node(),gd:e,prepFn:function(et){if(et.target!==O.node()){var vt=Bn.getTranslate(P);Re=vt.x,xe=vt.y}},moveFn:function(et,vt){if(Re!==void 0&&xe!==void 0){var tt=Re+et,Nt=xe+vt;Bn.setTranslate(P,tt,Nt),pt=u4.align(tt,r._width,W.l,W.l+W.w,r.xanchor),ge=u4.align(Nt+r._height,-r._height,W.t+W.h,W.t,r.yanchor)}},doneFn:function(){if(pt!==void 0&&ge!==void 0){var et={};et[a+".x"]=pt,et[a+".y"]=ge,V0.call("_guiRelayout",e,et)}},clickFn:function(et,vt){var tt=l.selectAll("g.traces").filter(function(){var Nt=this.getBoundingClientRect();return vt.clientX>=Nt.left&&vt.clientX<=Nt.right&&vt.clientY>=Nt.top&&vt.clientY<=Nt.bottom});tt.size()>0&&RP(e,P,tt,et,vt)}})}}],e)}}function M2(e,t,r){var i=e[0],a=i.width,s=t.entrywidthmode,l=i.trace.legendwidth||t.entrywidth;return s==="fraction"?t._maxWidth*l:r+(l||a)}function RP(e,t,r,i,a){var s=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:s.index,expandedIndex:s.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};s._group&&(l.group=s._group),V0.traceIs(s,"pie-like")&&(l.label=r.datum()[0].label);var f=kP.triggerHandler(e,"plotly_legendclick",l);if(i===1){if(f===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&CP(r,e,i)},e._context.doubleClickDelay)}else if(i===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var h=kP.triggerHandler(e,"plotly_legenddoubleclick",l);h!==!1&&f!==!1&&CP(r,e,i)}}function Pre(e,t,r){var i=L2(r),a=e.data()[0][0],s=a.trace,l=V0.traceIs(s,"pie-like"),f=!r._inHover&&t._context.edits.legendText&&!l,h=r._maxNameLength,v,m;a.groupTitle?(v=a.groupTitle.text,m=a.groupTitle.font):(m=r.font,r.entries?v=a.text:(v=l?a.label:s.name,s._meta&&(v=Nn.templateString(v,s._meta))));var b=Nn.ensureSingle(e,"text",i+"text");b.attr("text-anchor","start").call(Bn.font,m).text(f?zP(v,h):v);var T=r.indentation+r.itemwidth+Wn.itemGap*2;Ad.positionText(b,T,0),f?b.call(Ad.makeEditable,{gd:t,text:v}).call(k2,e,t,r).on("edit",function(S){this.text(zP(S,h)).call(k2,e,t,r);var C=a.trace._fullInput||{},P={};return P.name=S,C._isShape?V0.call("_guiRelayout",t,"shapes["+s.index+"].name",P.name):V0.call("_guiRestyle",t,P,s.index)}):k2(b,e,t,r)}function zP(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function Dre(e,t,r){var i=t._context.doubleClickDelay,a,s=1,l=Nn.ensureSingle(e,"rect",r+"toggle",function(f){t._context.staticPlot||f.style("cursor","pointer").attr("pointer-events","all"),f.call(S2.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimei&&(s=Math.max(s-1,1)),RP(t,f,e,s,Os.event)}}))}function k2(e,t,r,i,a){i._inHover&&e.attr("data-notex",!0),Ad.convertToTspans(e,r,function(){zre(t,r,i,a)})}function zre(e,t,r,i){var a=e.data()[0][0];if(!r._inHover&&a&&!a.trace.showlegend){e.remove();return}var s=e.select("g[class*=math-group]"),l=s.node(),f=L2(r);r||(r=t._fullLayout[f]);var h=r.borderwidth,v;i===O0?v=r.title.font:a.groupTitle?v=a.groupTitle.font:v=r.font;var m=v.size*IP,b,T;if(l){var S=Bn.bBox(l);b=S.height,T=S.width,i===O0?Bn.setTranslate(s,h,h+b*.75):Bn.setTranslate(s,0,b*.25)}else{var C="."+f+(i===O0?"title":"")+"text",P=e.select(C),E=Ad.lineCount(P),I=P.node();if(b=m*E,T=I?Bn.bBox(I).width:0,i===O0)r.title.side==="left"&&(T+=Wn.itemGap*2),Ad.positionText(P,h+Wn.titlePad,h+m);else{var F=Wn.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(F=Wn.itemGap,T-=r.indentation+r.itemwidth),Ad.positionText(P,F,-m*((E-1)/2-.3))}}i===O0?(r._titleWidth=T,r._titleHeight=b):(a.lineHeight=m,a.height=Math.max(b,16)+3,a.width=T)}function Ire(e){var t=0,r=0,i=e.title.side;return i&&(i.indexOf("left")!==-1&&(t=e._titleWidth),i.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Rre(e,t,r,i){var a=e._fullLayout,s=L2(i);i||(i=a[s]);var l=a._size,f=PP.isVertical(i),h=PP.isGrouped(i),v=i.entrywidthmode==="fraction",m=i.borderwidth,b=2*m,T=Wn.itemGap,S=i.indentation+i.itemwidth+T*2,C=2*(m+T),P=E2(i),E=i.y<0||i.y===0&&P==="top",I=i.y>1||i.y===1&&P==="bottom",F=i.tracegroupgap,N={};i._maxHeight=Math.max(E||I?a.height/2:l.h,30);var z=0;i._width=0,i._height=0;var O=Ire(i);if(f)r.each(function(lt){var He=lt[0].height;Bn.setTranslate(this,m+O[0],m+O[1]+i._height+He/2+T),i._height+=He,i._width=Math.max(i._width,lt[0].width)}),z=S+i._width,i._width+=T+S+b,i._height+=C,h&&(t.each(function(lt,He){Bn.setTranslate(this,0,He*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var H=C2(i),V=i.x<0||i.x===0&&H==="right",W=i.x>1||i.x===1&&H==="left",J=I||E,re=a.width/2;i._maxWidth=Math.max(V?J&&H==="left"?l.l+l.w:re:W?J&&H==="right"?l.r+l.w:re:l.w,2*S);var oe=0,ne=0;r.each(function(lt){var He=M2(lt,i,S);oe=Math.max(oe,He),ne+=He}),z=null;var fe=0;if(h){var ve=0,Ce=0,Se=0;t.each(function(){var lt=0,He=0;Os.select(this).selectAll("g.traces").each(function(at){var At=M2(at,i,S),kt=at[0].height;Bn.setTranslate(this,O[0],O[1]+m+T+kt/2+He),He+=kt,lt=Math.max(lt,At),N[at[0].trace.legendgroup]=lt});var _t=lt+T;Ce>0&&_t+m+Ce>i._maxWidth?(fe=Math.max(fe,Ce),Ce=0,Se+=ve+F,ve=He):ve=Math.max(ve,He),Bn.setTranslate(this,Ce,Se),Ce+=_t}),i._width=Math.max(fe,Ce)+m,i._height=Se+ve+C}else{var Te=r.size(),pe=ne+b+(Te-1)*T=i._maxWidth&&(fe=Math.max(fe,Ke),Me=0,Le+=Ae,i._height+=Ae,Ae=0),Bn.setTranslate(this,O[0]+m+Me,O[1]+m+Le+He/2+T),Ke=Me+_t+T,Me+=at,Ae=Math.max(Ae,He)}),pe?(i._width=Me+b,i._height=Ae+C):(i._width=Math.max(fe,Ke)+b,i._height+=Ae+C)}}i._width=Math.ceil(Math.max(i._width+O[0],i._titleWidth+2*(m+Wn.titlePad))),i._height=Math.ceil(Math.max(i._height+O[1],i._titleHeight+2*(m+Wn.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var ht=e._context.edits,it=ht.legendText||ht.legendPosition;r.each(function(lt){var He=Os.select(this).select("."+s+"toggle"),_t=lt[0].height,at=lt[0].trace.legendgroup,At=M2(lt,i,S);h&&at!==""&&(At=N[at]);var kt=it?S:z||At;!f&&!v&&(kt+=T/2),Bn.setRect(He,0,-_t/2,kt,_t)})}function Fre(e,t,r,i){var a=e._fullLayout,s=a[t],l=C2(s),f=E2(s),h=s.xref==="paper",v=s.yref==="paper";e._fullLayout._reservedMargin[t]={};var m=s.y<.5?"b":"t",b=s.x<.5?"l":"r",T={r:a.width-r,l:r+s._width,b:a.height-i,t:i+s._effHeight};if(h&&v)return f4.autoMargin(e,t,{x:s.x,y:s.y,l:s._width*U0[l],r:s._width*EP[l],b:s._effHeight*EP[f],t:s._effHeight*U0[f]});h?e._fullLayout._reservedMargin[t][m]=T[m]:v||s.orientation==="v"?e._fullLayout._reservedMargin[t][b]=T[b]:e._fullLayout._reservedMargin[t][m]=T[m]}function C2(e){return Nn.isRightAnchor(e)?"right":Nn.isCenterAnchor(e)?"center":"left"}function E2(e){return Nn.isBottomAnchor(e)?"bottom":Nn.isMiddleAnchor(e)?"middle":"top"}function L2(e){return e._id||"legend"}});var m4=de(p4=>{"use strict";var Md=ja(),Tc=Da(),qP=Tf(),vn=Bt(),qre=vn.pushUnique,v4=vn.strTranslate,Nre=vn.strRotate,Bre=qy(),Kl=co(),Ore=nP(),zf=_i(),ro=Ua(),P2=jl(),If=Yi(),Ure=Ao().zindexSeparator,G0=la(),qu=bc(),Sd=ky(),Vre=$5(),Hre=h4(),ZP=Sd.YANGLE,d4=Math.PI*ZP/180,Gre=1/Math.sin(d4),Zre=Math.cos(d4),Yre=Math.sin(d4),ji=Sd.HOVERARROWSIZE,qa=Sd.HOVERTEXTPAD,NP={box:!0,ohlc:!0,violin:!0,candlestick:!0},Wre={scatter:!0,scattergl:!0,splom:!0};function BP(e,t){return e.distance-t.distance}p4.hover=function(t,r,i,a){t=vn.getGraphDiv(t);var s=r.target;vn.throttle(t._fullLayout._uid+Sd.HOVERID,Sd.HOVERMINTIME,function(){Xre(t,r,i,a,s)})};p4.loneHover=function(t,r){var i=!0;Array.isArray(t)||(i=!1,t=[t]);var a=r.gd,s=JP(a),l=KP(a),f=t.map(function(E){var I=E._x0||E.x0||E.x||0,F=E._x1||E.x1||E.x||0,N=E._y0||E.y0||E.y||0,z=E._y1||E.y1||E.y||0,O=E.eventData;if(O){var H=Math.min(I,F),V=Math.max(I,F),W=Math.min(N,z),J=Math.max(N,z),re=E.trace;if(G0.traceIs(re,"gl3d")){var oe=a._fullLayout[re.scene]._scene.container,ne=oe.offsetLeft,fe=oe.offsetTop;H+=ne,V+=ne,W+=fe,J+=fe}O.bbox={x0:H+l,x1:V+l,y0:W+s,y1:J+s},r.inOut_bbox&&r.inOut_bbox.push(O.bbox)}else O=!1;return{color:E.color||ro.defaultLine,x0:E.x0||E.x||0,x1:E.x1||E.x||0,y0:E.y0||E.y||0,y1:E.y1||E.y||0,xLabel:E.xLabel,yLabel:E.yLabel,zLabel:E.zLabel,text:E.text,name:E.name,idealAlign:E.idealAlign,borderColor:E.borderColor,fontFamily:E.fontFamily,fontSize:E.fontSize,fontColor:E.fontColor,fontWeight:E.fontWeight,fontStyle:E.fontStyle,fontVariant:E.fontVariant,nameLength:E.nameLength,textAlign:E.textAlign,trace:E.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:E.hovertemplate||!1,hovertemplateLabels:E.hovertemplateLabels||!1,eventData:O}}),h=!1,v=WP(f,{gd:a,hovermode:"closest",rotateLabels:h,bgColor:r.bgColor||ro.background,container:Md.select(r.container),outerContainer:r.outerContainer||r.container}),m=v.hoverLabels,b=5,T=0,S=0;m.sort(function(E,I){return E.y0-I.y0}).each(function(E,I){var F=E.y0-E.by/2;F-bV[0]._length||xe<0||xe>W[0]._length)return P2.unhoverRaw(e,t)}if(t.pointerX=Re+V[0]._offset,t.pointerY=xe+W[0]._offset,"xval"in t?Se=qu.flat(s,t.xval):Se=qu.p2c(V,Re),"yval"in t?Te=qu.flat(s,t.yval):Te=qu.p2c(W,xe),!Tc(Se[0])||!Tc(Te[0]))return vn.warn("Fx.hover failed",t,e),P2.unhoverRaw(e,t)}var tt=1/0;function Nt(Gr,Qa){for(Ae=0;Aeat&&(ve.splice(0,at),tt=ve[0].distance),b&&fe!==0&&ve.length===0){_t.distance=fe,_t.index=!1;var ee=Le._module.hoverPoints(_t,lt,He,"closest",{hoverLayer:f._hoverlayer});if(ee&&(ee=ee.filter(function(Ve){return Ve.spikeDistance<=fe})),ee&&ee.length){var se,ce=ee.filter(function(Ve){return Ve.xa.showspikes&&Ve.xa.spikesnap!=="hovered data"});if(ce.length){var Ee=ce[0];Tc(Ee.x0)&&Tc(Ee.y0)&&(se=Ct(Ee),(!At.vLinePoint||At.vLinePoint.spikeDistance>se.spikeDistance)&&(At.vLinePoint=se))}var Ne=ee.filter(function(Ve){return Ve.ya.showspikes&&Ve.ya.spikesnap!=="hovered data"});if(Ne.length){var rt=Ne[0];Tc(rt.x0)&&Tc(rt.y0)&&(se=Ct(rt),(!At.hLinePoint||At.hLinePoint.spikeDistance>se.spikeDistance)&&(At.hLinePoint=se))}}}}}Nt();function Mt(Gr,Qa,Zr){for(var vi=null,ya=1/0,le,ee=0;ee0&&Math.abs(Gr.distance)wt-1;xr--)Mr(ve[xr]);ve=Ht,Et()}var Pt=e._hoverdata,Fe=[],Ge=JP(e),bt=KP(e);for(pe=0;pe1||ve.length>1)||T==="closest"&&kt&&ve.length>1,jn=ro.combine(f.plot_bgcolor||ro.background,f.paper_bgcolor),En=WP(ve,{gd:e,hovermode:T,rotateLabels:Xi,bgColor:jn,container:f._hoverlayer,outerContainer:f._paper.node(),commonLabelOpts:f.hoverlabel,hoverdistance:f.hoverdistance}),Vi=En.hoverLabels;if(qu.isUnifiedHover(T)||(Jre(Vi,Xi,f,En.commonLabelBoundingBox),jP(Vi,Xi,f._invScaleX,f._invScaleY)),a&&a.tagName){var pa=G0.getComponentMethod("annotations","hasClickToShow")(e,Fe);Ore(Md.select(a),pa?"pointer":"")}!a||i||!$re(e,t,Pt)||(Pt&&e.emit("plotly_unhover",{event:t,points:Pt}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:V,yaxes:W,xvals:Se,yvals:Te}))}function YP(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 jre=/([\s\S]*)<\/extra>/;function WP(e,t){var r=t.gd,i=r._fullLayout,a=t.hovermode,s=t.rotateLabels,l=t.bgColor,f=t.container,h=t.outerContainer,v=t.commonLabelOpts||{};if(e.length===0)return[[]];var m=t.fontFamily||Sd.HOVERFONT,b=t.fontSize||Sd.HOVERFONTSIZE,T=t.fontWeight||i.font.weight,S=t.fontStyle||i.font.style,C=t.fontVariant||i.font.variant,P=t.fontTextcase||i.font.textcase,E=t.fontLineposition||i.font.lineposition,I=t.fontShadow||i.font.shadow,F=e[0],N=F.xa,z=F.ya,O=a.charAt(0),H=O+"Label",V=F[H];if(V===void 0&&N.type==="multicategory")for(var W=0;Wi.width-Pt&&(Fe=i.width-Pt),Ar.attr("d","M"+(er-Fe)+",0L"+(er-Fe+ji)+","+xr+ji+"H"+Pt+"v"+xr+(qa*2+Ot.height)+"H"+-Pt+"V"+xr+ji+"H"+(er-Fe-ji)+"Z"),er=Fe,Ae.minX=er-Pt,Ae.maxX=er+Pt,N.side==="top"?(Ae.minY=Mr-(qa*2+Ot.height),Ae.maxY=Mr-qa):(Ae.minY=Mr+qa,Ae.maxY=Mr+(qa*2+Ot.height))}else{var Ge,bt,dt;z.side==="right"?(Ge="start",bt=1,dt="",er=N._offset+N._length):(Ge="end",bt=-1,dt="-",er=N._offset),Mr=z._offset+(F.y0+F.y1)/2,dr.attr("text-anchor",Ge),Ar.attr("d","M0,0L"+dt+ji+","+ji+"V"+(qa+Ot.height/2)+"h"+dt+(qa*2+Ot.width)+"V-"+(qa+Ot.height/2)+"H"+dt+ji+"V-"+ji+"Z"),Ae.minY=Mr-(qa+Ot.height/2),Ae.maxY=Mr+(qa+Ot.height/2),z.side==="right"?(Ae.minX=er+ji,Ae.maxX=er+ji+(qa*2+Ot.width)):(Ae.minX=er-ji-(qa*2+Ot.width),Ae.maxX=er-ji);var gr=Ot.height/2,Er=re-Ot.top-gr,Tr="clip"+i._uid+"commonlabel"+z._id,Hr;if(er=0?Wt=Ut:xt+xe=0?Wt=xt:Et+xe=0?Be=Ct:Rt+et=0?Be=Rt:ir+et=0,(mt.idealAlign==="top"||!Ea)&&Ri?(dt-=Er/2,mt.anchor="end"):Ea?(dt+=Er/2,mt.anchor="start"):mt.anchor="middle",mt.crossPos=dt;else{if(mt.pos=dt,Ea=bt+gr/2+ka<=oe,Ri=bt-gr/2-ka>=0,(mt.idealAlign==="left"||!Ea)&&Ri)bt-=gr/2,mt.anchor="end";else if(Ea)bt+=gr/2,mt.anchor="start";else{mt.anchor="middle";var Ki=ka/2,yn=bt+Ki-oe,Xi=bt-Ki;yn>0&&(bt-=yn),Xi<0&&(bt+=-Xi)}mt.crossPos=bt}Mr.attr("text-anchor",mt.anchor),Pt&&xr.attr("text-anchor",mt.anchor),Ar.attr("transform",v4(bt,dt)+(s?Nre(ZP):""))}),{hoverLabels:ft,commonLabelBoundingBox:Ae}}function OP(e,t,r,i,a,s){var l="",f="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=vn.templateString(e.name,e.trace._meta)),l=HP(e.name,e.nameLength));var h=r.charAt(0),v=h==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(f+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(f+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(f+=(f?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?f=e[v+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(f=e.yLabel):e.yLabel===void 0?f=e.xLabel:f="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(f+=(f?"
":"")+e.text),e.extraText!==void 0&&(f+=(f?"
":"")+e.extraText),s&&f===""&&!e.hovertemplate&&(l===""&&s.remove(),f=l);var m=e.hovertemplate||!1;if(m){var b=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(b[h+"other"]=b[h+"Val"],b[h+"otherLabel"]=b[h+"Label"]),f=vn.hovertemplateString(m,b,i._d3locale,e.eventData[0]||{},e.trace._meta),f=f.replace(jre,function(T,S){return l=HP(S,e.nameLength),""})}return[f,l]}function Jre(e,t,r,i){var a=t?"xa":"ya",s=t?"ya":"xa",l=0,f=1,h=e.size(),v=new Array(h),m=0,b=i.minX,T=i.maxX,S=i.minY,C=i.maxY,P=function(Se){return Se*r._invScaleX},E=function(Se){return Se*r._invScaleY};e.each(function(Se){var Te=Se[a],pe=Se[s],Ae=Te._id.charAt(0)==="x",Me=Te.range;m===0&&Me&&Me[0]>Me[1]!==Ae&&(f=-1);var Le=0,Ke=Ae?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ht=XP(Se,t),it=Se.anchor,lt=it==="end"?-1:1,He,_t;if(it==="middle")He=Se.crossPos+(Ae?E(ht.y-Se.by/2):P(Se.bx/2+Se.tx2width/2)),_t=He+(Ae?E(Se.by):P(Se.bx));else if(Ae)He=Se.crossPos+E(ji+ht.y)-E(Se.by/2-ji),_t=He+E(Se.by);else{var at=P(lt*ji+ht.x),At=at+P(lt*Se.bx);He=Se.crossPos+Math.min(at,At),_t=Se.crossPos+Math.max(at,At)}Ae?S!==void 0&&C!==void 0&&Math.min(_t,C)-Math.max(He,S)>1&&(pe.side==="left"?(Le=pe._mainLinePosition,Ke=r.width):Ke=pe._mainLinePosition):b!==void 0&&T!==void 0&&Math.min(_t,T)-Math.max(He,b)>1&&(pe.side==="top"?(Le=pe._mainLinePosition,Ke=r.height):Ke=pe._mainLinePosition)}v[m++]=[{datum:Se,traceIndex:Se.trace.index,dp:0,pos:Se.pos,posref:Se.posref,size:Se.by*(Ae?Gre:1)/2,pmin:Le,pmax:Ke}]}),v.sort(function(Se,Te){return Se[0].posref-Te[0].posref||f*(Te[0].traceIndex-Se[0].traceIndex)});var I,F,N,z,O,H,V;function W(Se){var Te=Se[0],pe=Se[Se.length-1];if(F=Te.pmin-Te.pos-Te.dp+Te.size,N=pe.pos+pe.dp+pe.size-Te.pmax,F>.01){for(O=Se.length-1;O>=0;O--)Se[O].dp+=F;I=!1}if(!(N<.01)){if(F<-.01){for(O=Se.length-1;O>=0;O--)Se[O].dp-=N;I=!1}if(I){var Ae=0;for(z=0;zTe.pmax&&Ae++;for(z=Se.length-1;z>=0&&!(Ae<=0);z--)H=Se[z],H.pos>Te.pmax-1&&(H.del=!0,Ae--);for(z=0;z=0;O--)Se[O].dp-=N;for(z=Se.length-1;z>=0&&!(Ae<=0);z--)H=Se[z],H.pos+H.dp+H.size>Te.pmax&&(H.del=!0,Ae--)}}}for(;!I&&l<=h;){for(l++,I=!0,z=0;z.01){for(O=re.length-1;O>=0;O--)re[O].dp+=F;for(J.push.apply(J,re),v.splice(z+1,1),V=0,O=J.length-1;O>=0;O--)V+=J[O].dp;for(N=V/J.length,O=J.length-1;O>=0;O--)J[O].dp-=N;I=!1}else z++}v.forEach(W)}for(z=v.length-1;z>=0;z--){var fe=v[z];for(O=fe.length-1;O>=0;O--){var ve=fe[O],Ce=ve.datum;Ce.offset=ve.dp,Ce.del=ve.del}}}function XP(e,t){var r=0,i=e.offset;return t&&(i*=-Yre,r=e.offset*Zre),{x:r,y:i}}function Kre(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(ji+qa),i=r+t*(e.txwidth+qa),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,i+=e.txwidth/2+qa),{alignShift:t,textShiftX:r,text2ShiftX:i}}function jP(e,t,r,i){var a=function(l){return l*r},s=function(l){return l*i};e.each(function(l){var f=Md.select(this);if(l.del)return f.remove();var h=f.select("text.nums"),v=l.anchor,m=v==="end"?-1:1,b=Kre(l),T=XP(l,t),S=T.x,C=T.y,P=v==="middle";f.select("path").attr("d",P?"M-"+a(l.bx/2+l.tx2width/2)+","+s(C-l.by/2)+"h"+a(l.bx)+"v"+s(l.by)+"h-"+a(l.bx)+"Z":"M0,0L"+a(m*ji+S)+","+s(ji+C)+"v"+s(l.by/2-ji)+"h"+a(m*l.bx)+"v-"+s(l.by)+"H"+a(m*ji+S)+"V"+s(C-ji)+"Z");var E=S+b.textShiftX,I=C+l.ty0-l.by/2+qa,F=l.textAlign||"auto";F!=="auto"&&(F==="left"&&v!=="start"?(h.attr("text-anchor","start"),E=P?-l.bx/2-l.tx2width/2+qa:-l.bx-qa):F==="right"&&v!=="end"&&(h.attr("text-anchor","end"),E=P?l.bx/2-l.tx2width/2-qa:l.bx+qa)),h.call(Kl.positionText,a(E),s(I)),l.tx2width&&(f.select("text.name").call(Kl.positionText,a(b.text2ShiftX+b.alignShift*qa+S),s(C+l.ty0-l.by/2+qa)),f.select("rect").call(zf.setRect,a(b.text2ShiftX+(b.alignShift-1)*l.tx2width/2+S),s(C-l.by/2-1),a(l.tx2width),s(l.by+2)))})}function Qre(e,t){var r=e.index,i=e.trace||{},a=e.cd[0],s=e.cd[r]||{};function l(T){return T||Tc(T)&&T===0}var f=Array.isArray(r)?function(T,S){var C=vn.castOption(a,r,T);return l(C)?C:vn.extractOption({},i,"",S)}:function(T,S){return vn.extractOption(s,i,T,S)};function h(T,S,C){var P=f(S,C);l(P)&&(e[T]=P)}if(h("hoverinfo","hi","hoverinfo"),h("bgcolor","hbg","hoverlabel.bgcolor"),h("borderColor","hbc","hoverlabel.bordercolor"),h("fontFamily","htf","hoverlabel.font.family"),h("fontSize","hts","hoverlabel.font.size"),h("fontColor","htc","hoverlabel.font.color"),h("fontWeight","htw","hoverlabel.font.weight"),h("fontStyle","hty","hoverlabel.font.style"),h("fontVariant","htv","hoverlabel.font.variant"),h("nameLength","hnl","hoverlabel.namelength"),h("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&i.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=vn.constrain(e.x0,0,e.xa._length),e.x1=vn.constrain(e.x1,0,e.xa._length),e.y0=vn.constrain(e.y0,0,e.ya._length),e.y1=vn.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:If.hoverLabelText(e.xa,e.xLabelVal,i.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:If.hoverLabelText(e.ya,e.yLabelVal,i.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var v=If.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+v+" / -"+If.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+v,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var m=If.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+m+" / -"+If.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+m,t==="y"&&(e.distance+=1)}var b=e.hoverinfo||e.trace.hoverinfo;return b&&b!=="all"&&(b=Array.isArray(b)?b:b.split("+"),b.indexOf("x")===-1&&(e.xLabel=void 0),b.indexOf("y")===-1&&(e.yLabel=void 0),b.indexOf("z")===-1&&(e.zLabel=void 0),b.indexOf("text")===-1&&(e.text=void 0),b.indexOf("name")===-1&&(e.name=void 0)),e}function UP(e,t,r){var i=r.container,a=r.fullLayout,s=a._size,l=r.event,f=!!t.hLinePoint,h=!!t.vLinePoint,v,m;if(i.selectAll(".spikeline").remove(),!!(h||f)){var b=ro.combine(a.plot_bgcolor,a.paper_bgcolor);if(f){var T=t.hLinePoint,S,C;v=T&&T.xa,m=T&&T.ya;var P=m.spikesnap;P==="cursor"?(S=l.pointerX,C=l.pointerY):(S=v._offset+T.x,C=m._offset+T.y);var E=qP.readability(T.color,b)<1.5?ro.contrast(b):T.color,I=m.spikemode,F=m.spikethickness,N=m.spikecolor||E,z=If.getPxPosition(e,m),O,H;if(I.indexOf("toaxis")!==-1||I.indexOf("across")!==-1){if(I.indexOf("toaxis")!==-1&&(O=z,H=S),I.indexOf("across")!==-1){var V=m._counterDomainMin,W=m._counterDomainMax;m.anchor==="free"&&(V=Math.min(V,m.position),W=Math.max(W,m.position)),O=s.l+V*s.w,H=s.l+W*s.w}i.insert("line",":first-child").attr({x1:O,x2:H,y1:C,y2:C,"stroke-width":F,stroke:N,"stroke-dasharray":zf.dashStyle(m.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:O,x2:H,y1:C,y2:C,"stroke-width":F+2,stroke:b}).classed("spikeline",!0).classed("crisp",!0)}I.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:z+(m.side!=="right"?F:-F),cy:C,r:F,fill:N}).classed("spikeline",!0)}if(h){var J=t.vLinePoint,re,oe;v=J&&J.xa,m=J&&J.ya;var ne=v.spikesnap;ne==="cursor"?(re=l.pointerX,oe=l.pointerY):(re=v._offset+J.x,oe=m._offset+J.y);var fe=qP.readability(J.color,b)<1.5?ro.contrast(b):J.color,ve=v.spikemode,Ce=v.spikethickness,Se=v.spikecolor||fe,Te=If.getPxPosition(e,v),pe,Ae;if(ve.indexOf("toaxis")!==-1||ve.indexOf("across")!==-1){if(ve.indexOf("toaxis")!==-1&&(pe=Te,Ae=oe),ve.indexOf("across")!==-1){var Me=v._counterDomainMin,Le=v._counterDomainMax;v.anchor==="free"&&(Me=Math.min(Me,v.position),Le=Math.max(Le,v.position)),pe=s.t+(1-Le)*s.h,Ae=s.t+(1-Me)*s.h}i.insert("line",":first-child").attr({x1:re,x2:re,y1:pe,y2:Ae,"stroke-width":Ce,stroke:Se,"stroke-dasharray":zf.dashStyle(v.spikedash,Ce)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:re,x2:re,y1:pe,y2:Ae,"stroke-width":Ce+2,stroke:b}).classed("spikeline",!0).classed("crisp",!0)}ve.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:re,cy:Te-(v.side!=="top"?Ce:-Ce),r:Ce,fill:Se}).classed("spikeline",!0)}}}function $re(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var i=r.length-1;i>=0;i--){var a=r[i],s=e._hoverdata[i];if(a.curveNumber!==s.curveNumber||String(a.pointNumber)!==String(s.pointNumber)||String(a.pointNumbers)!==String(s.pointNumbers))return!0}return!1}function VP(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function HP(e,t){return Kl.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function eae(e,t){for(var r=t.charAt(0),i=[],a=[],s=[],l=0;l{"use strict";var tae=Bt(),rae=Ua(),aae=bc().isUnifiedHover;QP.exports=function(t,r,i,a){a=a||{};var s=r.legend;function l(f){a.font[f]||(a.font[f]=s?r.legend.font[f]:r.font[f])}r&&aae(r.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(a.bgcolor||(a.bgcolor=rae.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),i("hoverlabel.bgcolor",a.bgcolor),i("hoverlabel.bordercolor",a.bordercolor),i("hoverlabel.namelength",a.namelength),tae.coerceFont(i,"hoverlabel.font",a.font),i("hoverlabel.align",a.align)}});var eD=de((D1e,$P)=>{"use strict";var iae=Bt(),nae=D2(),oae=f0();$P.exports=function(t,r){function i(a,s){return iae.coerce(t,r,oae,a,s)}nae(t,r,i)}});var aD=de((z1e,rD)=>{"use strict";var tD=Bt(),sae=e_(),lae=D2();rD.exports=function(t,r,i,a){function s(f,h){return tD.coerce(t,r,sae,f,h)}var l=tD.extendFlat({},a.hoverlabel);r.hovertemplate&&(l.namelength=-1),lae(t,r,s,l)}});var y4=de((I1e,iD)=>{"use strict";var uae=Bt(),fae=f0();iD.exports=function(t,r){function i(a,s){return r[a]!==void 0?r[a]:uae.coerce(t,r,fae,a,s)}return i("clickmode"),i("hoversubplots"),i("hovermode")}});var sD=de((R1e,oD)=>{"use strict";var nD=Bt(),cae=f0(),hae=y4(),vae=D2();oD.exports=function(t,r){function i(m,b){return nD.coerce(t,r,cae,m,b)}var a=hae(t,r);a&&(i("hoverdistance"),i("spikedistance"));var s=i("dragmode");s==="select"&&i("selectdirection");var l=r._has("mapbox"),f=r._has("map"),h=r._has("geo"),v=r._basePlotModules.length;r.dragmode==="zoom"&&((l||f||h)&&v===1||(l||f)&&h&&v===2)&&(r.dragmode="pan"),vae(t,r,i),nD.coerceFont(i,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var fD=de((F1e,uD)=>{"use strict";var g4=Bt(),lD=la();uD.exports=function(t){var r=t.calcdata,i=t._fullLayout;function a(v){return function(m){return g4.coerceHoverinfo({hoverinfo:m},{_module:v._module},i)}}for(var s=0;s{"use strict";var pae=la(),mae=m4().hover;cD.exports=function(t,r,i){var a=pae.getComponentMethod("annotations","onClick")(t,t._hoverdata);i!==void 0&&mae(t,r,i,!0);function s(){t.emit("plotly_click",{points:t._hoverdata,event:r})}t._hoverdata&&r&&r.target&&(a&&a.then?a.then(s):s(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var Rf=de((N1e,pD)=>{"use strict";var yae=ja(),z2=Bt(),gae=jl(),ag=bc(),vD=f0(),dD=m4();pD.exports={moduleType:"component",name:"fx",constants:ky(),schema:{layout:vD},attributes:e_(),layoutAttributes:vD,supplyLayoutGlobalDefaults:eD(),supplyDefaults:aD(),supplyLayoutDefaults:sD(),calc:fD(),getDistanceFunction:ag.getDistanceFunction,getClosest:ag.getClosest,inbox:ag.inbox,quadrature:ag.quadrature,appendArrayPointValue:ag.appendArrayPointValue,castHoverOption:xae,castHoverinfo:bae,hover:dD.hover,unhover:gae.unhover,loneHover:dD.loneHover,loneUnhover:_ae,click:hD()};function _ae(e){var t=z2.isD3Selection(e)?e:yae.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function xae(e,t,r){return z2.castOption(e,t,"hoverlabel."+r)}function bae(e,t,r){function i(a){return z2.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return z2.castOption(e,r,"hoverinfo",i)}});var kd=de(Ac=>{"use strict";Ac.selectMode=function(e){return e==="lasso"||e==="select"};Ac.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ac.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Ac.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Ac.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Ac.selectingOrDrawing=function(e){return Ac.freeMode(e)||Ac.rectMode(e)}});var I2=de((O1e,mD)=>{"use strict";mD.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(i){i.regl&&i.regl.clear({color:!0,depth:!0})})}});var R2=de((U1e,yD)=>{"use strict";yD.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 q2=de((V1e,gD)=>{"use strict";var F2=32;gD.exports={CIRCLE_SIDES:F2,i000:0,i090:F2/4,i180:F2/2,i270:F2/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var N2=de((H1e,xD)=>{"use strict";var wae=Bt().strTranslate;function _D(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 Tae(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 Aae(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return _D(e,r[t])}}function Mae(e){return wae(e.xaxis._offset,e.yaxis._offset)}xD.exports={p2r:_D,r2p:Tae,axValue:Aae,getTransform:Mae}});var Uh=de(Mc=>{"use strict";var Sae=n5(),TD=q2(),Z0=TD.CIRCLE_SIDES,_4=TD.SQRT2,AD=N2(),bD=AD.p2r,wD=AD.r2p,kae=[0,3,4,5,6,1,2],Cae=[0,3,4,1,2];Mc.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&h{"use strict";var ED=kd(),Eae=ED.drawMode,Lae=ED.openMode,Y0=q2(),MD=Y0.i000,SD=Y0.i090,kD=Y0.i180,CD=Y0.i270,Pae=Y0.cos45,Dae=Y0.sin45,LD=N2(),O2=LD.p2r,Vh=LD.r2p,zae=Dh(),Iae=zae.clearOutline,U2=Uh(),Rae=U2.readPaths,Fae=U2.writePaths,qae=U2.ellipseOver,Nae=U2.fixDatesForPaths;function Bae(e,t){if(e.length){var r=e[0][0];if(r){var i=t.gd,a=t.isActiveShape,s=t.dragmode,l=(i.layout||{}).shapes||[];if(!Eae(s)&&a!==void 0){var f=i._fullLayout._activeShapeIndex;if(f{"use strict";var Oae=kd(),Uae=Oae.selectMode,Vae=Dh(),Hae=Vae.clearOutline,x4=Uh(),Gae=x4.readPaths,Zae=x4.writePaths,Yae=x4.fixDatesForPaths;zD.exports=function(t,r){if(t.length){var i=t[0][0];if(i){var a=i.getAttribute("d"),s=r.gd,l=s._fullLayout.newselection,f=r.plotinfo,h=f.xaxis,v=f.yaxis,m=r.isActiveSelection,b=r.dragmode,T=(s.layout||{}).selections||[];if(!Uae(b)&&m!==void 0){var S=s._fullLayout._activeSelectionIndex;if(S{"use strict";ID.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 Hh=de(ho=>{"use strict";var Cd=ng(),RD=Bt(),H2=Yi();ho.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};ho.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};ho.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};ho.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};ho.extractPathCoords=function(e,t,r){var i=[],a=e.match(Cd.segmentRE);return a.forEach(function(s){var l=t[s.charAt(0)].drawn;if(l!==void 0){var f=s.substr(1).match(Cd.paramRE);if(!(!f||f.lengthS&&(P="X"),P});return v>S&&(C=C.replace(/[\s,]*X.*/,""),RD.log("Ignoring extra params in segment "+h)),m+C})}function og(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 T4=de((j1e,BD)=>{"use strict";var Xae=Bt(),W0=Yi(),FD=co(),qD=_i(),jae=Uh().readPaths,w4=Hh(),Jae=w4.getPathString,ND=f_(),Kae=ts().FROM_TL;BD.exports=function(t,r,i,a){if(a.selectAll(".shape-label").remove(),!!(i.label.text||i.label.texttemplate)){var s;if(i.label.texttemplate){var l={};if(i.type!=="path"){var f=W0.getFromId(t,i.xref),h=W0.getFromId(t,i.yref);for(var v in ND){var m=ND[v](i,f,h);m!==void 0&&(l[v]=m)}}s=Xae.texttemplateStringForShapes(i.label.texttemplate,{},t._fullLayout._d3locale,l)}else s=i.label.text;var b={"data-index":r},T=i.label.font,S={"data-notex":1},C=a.append("g").attr(b).classed("shape-label",!0),P=C.append("text").attr(S).classed("shape-label-text",!0).text(s),E,I,F,N;if(i.path){var z=Jae(t,i),O=jae(z,t);E=1/0,F=1/0,I=-1/0,N=-1/0;for(var H=0;H=e?a=t-i:a=i-t,-180/Math.PI*Math.atan2(a,s)}function $ae(e,t,r,i,a,s,l){var f=a.label.textposition,h=a.label.textangle,v=a.label.padding,m=a.type,b=Math.PI/180*s,T=Math.sin(b),S=Math.cos(b),C=a.label.xanchor,P=a.label.yanchor,E,I,F,N;if(m==="line"){f==="start"?(E=e,I=t):f==="end"?(E=r,I=i):(E=(e+r)/2,I=(t+i)/2),C==="auto"&&(f==="start"?h==="auto"?r>e?C="left":re?C="right":re?C="right":re?C="left":r{"use strict";var eie=Bt(),tie=eie.strTranslate,OD=jl(),HD=kd(),rie=HD.drawMode,GD=HD.selectMode,ZD=la(),UD=Ua(),Z2=q2(),aie=Z2.i000,iie=Z2.i090,nie=Z2.i180,oie=Z2.i270,sie=Dh(),YD=sie.clearOutlineControllers,M4=Uh(),G2=M4.pointsOnRectangle,A4=M4.pointsOnEllipse,lie=M4.writePaths,uie=V2().newShapes,fie=V2().createShapeObj,cie=b4(),hie=T4();WD.exports=function e(t,r,i,a){a||(a=0);var s=i.gd;function l(){e(t,r,i,a++),(A4(t[0])||i.hasText)&&f({redrawing:!0})}function f(Te){var pe={};i.isActiveShape!==void 0&&(i.isActiveShape=!1,pe=uie(r,i)),i.isActiveSelection!==void 0&&(i.isActiveSelection=!1,pe=cie(r,i),s._fullLayout._reselect=!0),Object.keys(pe).length&&ZD.call((Te||{}).redrawing?"relayout":"_guiRelayout",s,pe)}var h=s._fullLayout,v=h._zoomlayer,m=i.dragmode,b=rie(m),T=GD(m);(b||T)&&(s._fullLayout._outlining=!0),YD(s),r.attr("d",lie(t));var S,C,P,E,I;if(!a&&(i.isActiveShape||i.isActiveSelection)){I=vie([],t);var F=v.append("g").attr("class","outline-controllers");re(F),Se()}if(b&&i.hasText){var N=v.select(".label-temp"),z=fie(r,i,i.dragmode);hie(s,"label-temp",z,N)}function O(Te){P=+Te.srcElement.getAttribute("data-i"),E=+Te.srcElement.getAttribute("data-j"),S[P][E].moveFn=H}function H(Te,pe){if(t.length){var Ae=I[P][E][1],Me=I[P][E][2],Le=t[P],Ke=Le.length;if(G2(Le)){var ht=Te,it=pe;if(i.isActiveSelection){var lt=VD(Le,E);lt[1]===Le[E][1]?it=0:ht=0}for(var He=0;He1&&!(Te.length===2&&Te[1][0]==="Z")&&(E===0&&(Te[0][0]="M"),t[P]=Te,l(),f())}}function J(Te,pe){if(Te===2){P=+pe.srcElement.getAttribute("data-i"),E=+pe.srcElement.getAttribute("data-j");var Ae=t[P];!G2(Ae)&&!A4(Ae)&&W()}}function re(Te){S=[];for(var pe=0;pe{"use strict";var pie=ja(),$D=la(),XD=Bt(),X0=Yi(),mie=Uh().readPaths,yie=Y2(),X2=T4(),ez=Dh().clearOutlineControllers,S4=Ua(),C4=_i(),gie=Di().arrayEditor,jD=jl(),JD=Oh(),Ed=ng(),Us=Hh(),k4=Us.getPathString;az.exports={draw:E4,drawOne:tz,eraseActiveShape:bie,drawLabel:X2};function E4(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var i=t._plots[r].shapelayer;i&&(i.selectAll("path").remove(),i.selectAll("text").remove())}for(var a=0;al&&Ut>f&&!Mt.shiftKey?jD.getCursor(xt/Rt,1-Et/Ut):"move";JD(t,ir),_t=ir.split("-")[0]}}function pt(Mt){W2(e)||(h&&(I=Le(r.xanchor)),v&&(F=Ke(r.yanchor)),r.type==="path"?oe=r.path:(S=h?r.x0:Le(r.x0),C=v?r.y0:Ke(r.y0),P=h?r.x1:Le(r.x1),E=v?r.y1:Ke(r.y1)),SE?(N=C,V="y0",z=E,W="y1"):(N=E,V="y1",z=C,W="y0"),kt(Mt),vt(a,r),Nt(t,r,e),He.moveFn=_t==="move"?xe:et,He.altKey=Mt.altKey)}function ge(){W2(e)||(JD(t),tt(a),rz(t,e,r),$D.call("_guiRelayout",e,s.getUpdateObj()))}function Re(){W2(e)||tt(a)}function xe(Mt,Ct){if(r.type==="path"){var Rt=function(Et){return Et},Ut=Rt,xt=Rt;h?T("xanchor",r.xanchor=ht(I+Mt)):(Ut=function(ir){return ht(Le(ir)+Mt)},fe&&fe.type==="date"&&(Ut=Us.encodeDate(Ut))),v?T("yanchor",r.yanchor=it(F+Ct)):(xt=function(ir){return it(Ke(ir)+Ct)},Ce&&Ce.type==="date"&&(xt=Us.encodeDate(xt))),T("path",r.path=KD(oe,Ut,xt))}else h?T("xanchor",r.xanchor=ht(I+Mt)):(T("x0",r.x0=ht(S+Mt)),T("x1",r.x1=ht(P+Mt))),v?T("yanchor",r.yanchor=it(F+Ct)):(T("y0",r.y0=it(C+Ct)),T("y1",r.y1=it(E+Ct)));t.attr("d",k4(e,r)),vt(a,r),X2(e,i,r,ne)}function et(Mt,Ct){if(b){var Rt=function(Ot){return Ot},Ut=Rt,xt=Rt;h?T("xanchor",r.xanchor=ht(I+Mt)):(Ut=function(er){return ht(Le(er)+Mt)},fe&&fe.type==="date"&&(Ut=Us.encodeDate(Ut))),v?T("yanchor",r.yanchor=it(F+Ct)):(xt=function(er){return it(Ke(er)+Ct)},Ce&&Ce.type==="date"&&(xt=Us.encodeDate(xt))),T("path",r.path=KD(oe,Ut,xt))}else if(m){if(_t==="resize-over-start-point"){var Et=S+Mt,ir=v?C-Ct:C+Ct;T("x0",r.x0=h?Et:ht(Et)),T("y0",r.y0=v?ir:it(ir))}else if(_t==="resize-over-end-point"){var Wt=P+Mt,Be=v?E-Ct:E+Ct;T("x1",r.x1=h?Wt:ht(Wt)),T("y1",r.y1=v?Be:it(Be))}}else{var ft=function(Ot){return _t.indexOf(Ot)!==-1},mt=ft("n"),Ar=ft("s"),dr=ft("w"),Tt=ft("e"),wt=mt?N+Ct:N,Vt=Ar?z+Ct:z,Kt=dr?O+Mt:O,Ht=Tt?H+Mt:H;v&&(mt&&(wt=N-Ct),Ar&&(Vt=z-Ct)),(!v&&Vt-wt>f||v&&wt-Vt>f)&&(T(V,r[V]=v?wt:it(wt)),T(W,r[W]=v?Vt:it(Vt))),Ht-Kt>l&&(T(J,r[J]=h?Kt:ht(Kt)),T(re,r[re]=h?Ht:ht(Ht)))}t.attr("d",k4(e,r)),vt(a,r),X2(e,i,r,ne)}function vt(Mt,Ct){(h||v)&&Rt();function Rt(){var Ut=Ct.type!=="path",xt=Mt.selectAll(".visual-cue").data([0]),Et=1;xt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Et}).classed("visual-cue",!0);var ir=Le(h?Ct.xanchor:XD.midRange(Ut?[Ct.x0,Ct.x1]:Us.extractPathCoords(Ct.path,Ed.paramIsX))),Wt=Ke(v?Ct.yanchor:XD.midRange(Ut?[Ct.y0,Ct.y1]:Us.extractPathCoords(Ct.path,Ed.paramIsY)));if(ir=Us.roundPositionForSharpStrokeRendering(ir,Et),Wt=Us.roundPositionForSharpStrokeRendering(Wt,Et),h&&v){var Be="M"+(ir-1-Et)+","+(Wt-1-Et)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";xt.attr("d",Be)}else if(h){var ft="M"+(ir-1-Et)+","+(Wt-9-Et)+"v18 h2 v-18 Z";xt.attr("d",ft)}else{var mt="M"+(ir-9-Et)+","+(Wt-1-Et)+"h18 v2 h-18 Z";xt.attr("d",mt)}}}function tt(Mt){Mt.selectAll(".visual-cue").remove()}function Nt(Mt,Ct,Rt){var Ut=Ct.xref,xt=Ct.yref,Et=X0.getFromId(Rt,Ut),ir=X0.getFromId(Rt,xt),Wt="";Ut!=="paper"&&!Et.autorange&&(Wt+=Ut),xt!=="paper"&&!ir.autorange&&(Wt+=xt),C4.setClipUrl(Mt,Wt?"clip"+Rt._fullLayout._uid+Wt:null,Rt)}}function KD(e,t,r){return e.replace(Ed.segmentRE,function(i){var a=0,s=i.charAt(0),l=Ed.paramIsX[s],f=Ed.paramIsY[s],h=Ed.numParams[s],v=i.substr(1).replace(Ed.paramRE,function(m){return a>=h||(l[a]?m=t(m):f[a]&&(m=r(m)),a++),m});return s+v})}function xie(e,t){if(j2(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeShapeIndex){QD(e);return}e._fullLayout._activeShapeIndex=i,e._fullLayout._deactivateShape=QD,E4(e)}}}function QD(e){if(j2(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(ez(e),delete e._fullLayout._activeShapeIndex,E4(e))}}function bie(e){if(j2(e)){ez(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var Ql=la(),iz=eo(),nz=$n(),Ja=R2(),wie=J2().eraseActiveShape,K2=Bt(),Ia=K2._,Ka=hz.exports={};Ka.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Ia(e,"Download plot as a png"):Ia(e,"Download plot")},icon:Ja.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};K2.notifier(Ia(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(i){i in t&&(r[i]=t[i])}),Ql.call("downloadImage",e,r).then(function(i){K2.notifier(Ia(e,"Snapshot succeeded")+" - "+i,"long")}).catch(function(){K2.notifier(Ia(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ka.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Ia(e,"Edit in Chart Studio")},icon:Ja.disk,click:function(e){iz.sendDataToCloud(e)}};Ka.editInChartStudio={name:"editInChartStudio",title:function(e){return Ia(e,"Edit in Chart Studio")},icon:Ja.pencil,click:function(e){iz.sendDataToCloud(e)}};Ka.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ia(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Ja.zoombox,click:ns};Ka.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ia(e,"Pan")},attr:"dragmode",val:"pan",icon:Ja.pan,click:ns};Ka.select2d={name:"select2d",_cat:"select",title:function(e){return Ia(e,"Box Select")},attr:"dragmode",val:"select",icon:Ja.selectbox,click:ns};Ka.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ia(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Ja.lasso,click:ns};Ka.drawclosedpath={name:"drawclosedpath",title:function(e){return Ia(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Ja.drawclosedpath,click:ns};Ka.drawopenpath={name:"drawopenpath",title:function(e){return Ia(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Ja.drawopenpath,click:ns};Ka.drawline={name:"drawline",title:function(e){return Ia(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Ja.drawline,click:ns};Ka.drawrect={name:"drawrect",title:function(e){return Ia(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Ja.drawrect,click:ns};Ka.drawcircle={name:"drawcircle",title:function(e){return Ia(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Ja.drawcircle,click:ns};Ka.eraseshape={name:"eraseshape",title:function(e){return Ia(e,"Erase active shape")},icon:Ja.eraseshape,click:wie};Ka.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ia(e,"Zoom in")},attr:"zoom",val:"in",icon:Ja.zoom_plus,click:ns};Ka.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ia(e,"Zoom out")},attr:"zoom",val:"out",icon:Ja.zoom_minus,click:ns};Ka.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ia(e,"Autoscale")},attr:"zoom",val:"auto",icon:Ja.autoscale,click:ns};Ka.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ia(e,"Reset axes")},attr:"zoom",val:"reset",icon:Ja.home,click:ns};Ka.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ia(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Ja.tooltip_basic,gravity:"ne",click:ns};Ka.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ia(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Ja.tooltip_compare,gravity:"ne",click:ns};function ns(e,t){var r=t.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,s=e._fullLayout,l={},f=nz.list(e,null,!0),h=s._cartesianSpikesEnabled,v,m;if(i==="zoom"){var b=a==="in"?.5:2,T=(1+b)/2,S=(1-b)/2,C;for(m=0;m{"use strict";var vz=D4(),Mie=Object.keys(vz),dz=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],pz=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(dz),J0=[],Sie=function(e){if(pz.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();J0.indexOf(t)===-1&&J0.push(t),J0.indexOf(r)===-1&&J0.push(r)}};Mie.forEach(function(e){Sie(vz[e])});J0.sort();mz.exports={DRAW_MODES:dz,backButtons:pz,foreButtons:J0}});var I4=de((t_e,yz)=>{"use strict";var e_e=z4();yz.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 _z=de((r_e,gz)=>{"use strict";var kie=Bt(),sg=Ua(),Cie=Di(),Eie=I4();gz.exports=function(t,r){var i=t.modebar||{},a=Cie.newContainer(r,"modebar");function s(f,h){return kie.coerce(i,a,Eie,f,h)}s("orientation"),s("bgcolor",sg.addOpacity(r.paper_bgcolor,.5));var l=sg.contrast(sg.rgb(r.modebar.bgcolor));s("color",sg.addOpacity(l,.3)),s("activecolor",sg.addOpacity(l,.7)),s("uirevision",r.uirevision),s("add"),s("remove")}});var Tz=de((a_e,wz)=>{"use strict";var R4=ja(),Lie=Da(),$2=Bt(),xz=R2(),Pie=U1().version,Die=new DOMParser;function bz(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Ff=bz.prototype;Ff.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,a="modebar-"+i._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),i.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var s=i.modebar,l="#"+a+" .modebar-group";document.querySelectorAll(l).forEach(function(b){b.style.backgroundColor=s.bgcolor}),$2.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+s.activecolor,"fill: "+s.color);var f=!this.hasButtons(t),h=this.hasLogo!==r.displaylogo,v=this.locale!==r.locale;if(this.locale=r.locale,(f||h||v)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var m=this.getLogo();r.watermark&&(m.className=m.className+" watermark"),i.modebar.orientation==="v"?this.element.insertBefore(m,this.element.childNodes[0]):this.element.appendChild(m),this.hasLogo=!0}this.updateActiveButton()};Ff.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var i=t.createGroup();r.forEach(function(a){var s=a.name;if(!s)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(s)!==-1)throw new Error("button name '"+s+"' is taken");t.buttonsNames.push(s);var l=t.createButton(a);t.buttonElements.push(l),i.appendChild(l)}),t.element.appendChild(i)})};Ff.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Ff.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;i===void 0?i=e.name:typeof i=="function"&&(i=i(this.graphInfo)),(i||i===0)&&r.setAttribute("data-title",i),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var s=e.click;if(typeof s!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(f){e.click(t.graphInfo,f),t.updateActiveButton(f.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&R4.select(r).classed("active",!0);var l=e.icon;return typeof l=="function"?r.appendChild(l()):r.appendChild(this.createIcon(l||xz.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Ff.createIcon=function(e){var t=Lie(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",i;if(e.path){i=document.createElementNS(r,"svg"),i.setAttribute("viewBox",[0,0,e.width,t].join(" ")),i.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),i.appendChild(a)}if(e.svg){var s=Die.parseFromString(e.svg,"application/xml");i=s.childNodes[0]}return i.setAttribute("height","1em"),i.setAttribute("width","1em"),i};Ff.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var a=i.getAttribute("data-val")||!0,s=i.getAttribute("data-attr"),l=i.getAttribute("data-toggle")==="true",f=R4.select(i),h=function(b,T){var S=t.modebar,C=b.querySelector(".icon path");C&&(T||b.matches(":hover")?C.style.fill=S.activecolor:C.style.fill=S.color)};if(l){if(s===r){var v=!f.classed("active");f.classed("active",v),h(i,v)}}else{var m=s===null?s:$2.nestedProperty(t,s).get();f.classed("active",m===a),h(i,m===a)}})};Ff.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Rie=$n(),Az=rs(),F4=la(),Fie=bc().isUnifiedHover,qie=Tz(),ex=D4(),Nie=z4().DRAW_MODES,Bie=Bt().extendDeep;Mz.exports=function(t){var r=t._fullLayout,i=t._context,a=r._modeBar;if(!i.displayModeBar&&!i.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(i.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(i.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var s=i.modeBarButtons,l;Array.isArray(s)&&s.length?l=Zie(s):!i.displayModeBar&&i.watermark?l=[]:l=Oie(t),a?a.update(t,l):r._modeBar=qie(t,l)};function Oie(e){var t=e._fullLayout,r=e._fullData,i=e._context;function a(pe,Ae){if(typeof Ae=="string"){if(Ae.toLowerCase()===pe.toLowerCase())return!0}else{var Me=Ae.name,Le=Ae._cat||Ae.name;if(Me===pe||Le===pe.toLowerCase())return!0}return!1}var s=t.modebar.add;typeof s=="string"&&(s=[s]);var l=t.modebar.remove;typeof l=="string"&&(l=[l]);var f=i.modeBarButtonsToAdd.concat(s.filter(function(pe){for(var Ae=0;Ae1?(re=["toggleHover"],oe=["resetViews"]):b?(J=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],oe=["resetGeo"]):m?(re=["hoverClosest3d"],oe=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(J=["zoomInMapbox","zoomOutMapbox"],re=["toggleHover"],oe=["resetViewMapbox"]):E?(J=["zoomInMap","zoomOutMap"],re=["toggleHover"],oe=["resetViewMap"]):T?re=["hoverClosestPie"]:N?(re=["hoverClosestCartesian","hoverCompareCartesian"],oe=["resetViewSankey"]):re=["toggleHover"],v&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Hie(r)||O)&&(re=[]),v&&!z&&(J=["zoomIn2d","zoomOut2d","autoScale2d"],oe[0]!=="resetViews"&&(oe=["resetScale2d"])),m?ne=["zoom3d","pan3d","orbitRotation","tableRotation"]:v&&!z||C?ne=["zoom2d","pan2d"]:P||E||b?ne=["pan2d"]:I&&(ne=["zoom2d"]),Vie(r)&&ne.push("select2d","lasso2d");var fe=[],ve=function(pe){fe.indexOf(pe)===-1&&re.indexOf(pe)!==-1&&fe.push(pe)};if(Array.isArray(f)){for(var Ce=[],Se=0;Se{"use strict";kz.exports={moduleType:"component",name:"modebar",layoutAttributes:I4(),supplyLayoutDefaults:_z(),manage:Sz()}});var N4=de((o_e,Cz)=>{"use strict";var Yie=ts().FROM_BL;Cz.exports=function(t,r,i){i===void 0&&(i=Yie[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],s=a[0]+(a[1]-a[0])*i;t.range=t._input.range=[t.l2r(s+(a[0]-s)*r),t.l2r(s+(a[1]-s)*r)],t.setScale()}});var ug=de(lg=>{"use strict";var Ld=Bt(),B4=Xy(),Nu=$n().id2name,Wie=Ru(),Ez=N4(),Xie=i2(),jie=Hi().ALMOST_EQUAL,Jie=ts().FROM_BL;lg.handleDefaults=function(e,t,r){var i=r.axIds,a=r.axHasImage,s=t._axisConstraintGroups=[],l=t._axisMatchGroups=[],f,h,v,m,b,T,S,C;for(f=0;fs?r.substr(s):i.substr(a))+l}function Qie(e,t){for(var r=t._size,i=r.h/r.w,a={},s=Object.keys(e),l=0;ljie*C&&!F)){for(s=0;sne&&Mere&&(re=Me);var Ke=(re-J)/(2*oe);b/=Ke,J=h.l2r(J),re=h.l2r(re),h.range=h._input.range=H{"use strict";var rx=ja(),os=la(),fl=eo(),$l=Bt(),V4=co(),H4=I2(),fg=Ua(),K0=_i(),zz=Yy(),Nz=q4(),cg=Yi(),Sc=ts(),Bz=ug(),$ie=Bz.enforce,ene=Bz.clean,Iz=Xy().doAutoRange,Oz="start",tne="middle",Uz="end",rne=Ao().zindexSeparator;ao.layoutStyles=function(e){return $l.syncOrAsync([fl.doAutoMargin,ine],e)};function ane(e,t,r){for(var i=0;i=e[1]||a[1]<=e[0])&&s[0]t[0])return!0}return!1}function ine(e){var t=e._fullLayout,r=t._size,i=r.p,a=cg.list(e,"",!0),s,l,f,h,v,m;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(K0.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),ao.drawMainTitle(e),Nz.manage(e),!t._has("cartesian"))return fl.previousPromises(e);function b(pt,ge,Re){var xe=pt._lw/2;if(pt._id.charAt(0)==="x"){if(ge){if(Re==="top")return ge._offset-i-xe}else return r.t+r.h*(1-(pt.position||0))+xe%1;return ge._offset+ge._length+i+xe}if(ge){if(Re==="right")return ge._offset+ge._length+i+xe}else return r.l+r.w*(pt.position||0)+xe%1;return ge._offset-i-xe}for(s=0;s0){lne(e,s,v,h),f.attr({x:l,y:s,"text-anchor":i,dy:qz(t.yanchor)}).call(V4.positionText,l,s);var m=(t.text.match(V4.BR_TAG_ALL)||[]).length;if(m){var b=Sc.LINE_SPACING*m+Sc.MID_SHIFT;t.y===0&&(b=-b),f.selectAll(".line").each(function(){var E=+this.getAttribute("dy").slice(0,-2)-b+"em";this.setAttribute("dy",E)})}var T=rx.selectAll(".gtitle-subtitle");if(T.node()){var S=f.node().getBBox(),C=S.y+S.height,P=C+zz.SUBTITLE_PADDING_EM*t.subtitle.font.size;T.attr({x:l,y:P,"text-anchor":i,dy:qz(t.yanchor)}).call(V4.positionText,l,P)}}}};function nne(e,t,r,i,a){var s=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,l=$l.isTopAnchor(t)?i:i-a,f=r==="b"?s-l:l;return $l.isTopAnchor(t)&&r==="t"||$l.isBottomAnchor(t)&&r==="b"?!1:f.5?"t":"b",l=e._fullLayout.margin[s],f=0;return t.yref==="paper"?f=r+t.pad.t+t.pad.b:t.yref==="container"&&(f=one(s,i,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),f>l?f:0}function lne(e,t,r,i){var a="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",f={x:s.x,y:s.y,t:0,b:0},h={};s.yref==="paper"&&nne(e,s,l,t,i)?f[l]=r:s.yref==="container"&&(h[l]=r,e._fullLayout._reservedMargin[a]=h),fl.allowAutoMargin(e,a),fl.autoMargin(e,a,f)}function une(e,t){var r=e.title,i=e._size,a=0;switch(t===Oz?a=r.pad.l:t===Uz&&(a=-r.pad.r),r.xref){case"paper":return i.l+i.w*r.x+a;case"container":default:return e.width*r.x+a}}function fne(e,t){var r=e.title,i=e._size,a=0;if(t==="0em"||!t?a=-r.pad.b:t===Sc.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto")return i.t/2;switch(r.yref){case"paper":return i.t+i.h-i.h*r.y+a;case"container":default:return e.height-e.height*r.y+a}}function qz(e){return e==="top"?Sc.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Sc.MID_SHIFT+"em"}function cne(e){var t=e.title,r=tne;return $l.isRightAnchor(t)?r=Uz:$l.isLeftAnchor(t)&&(r=Oz),r}function hne(e){var t=e.title,r="0em";return $l.isTopAnchor(t)?r=Sc.CAP_SHIFT+"em":$l.isMiddleAnchor(t)&&(r=Sc.MID_SHIFT+"em"),r}ao.doTraceStyle=function(e){var t=e.calcdata,r=[],i;for(i=0;i{"use strict";var vne=Uh().readPaths,dne=Y2(),Vz=Dh().clearOutlineControllers,G4=Ua(),Hz=_i(),pne=Di().arrayEditor,Gz=Hh(),mne=Gz.getPathString;Yz.exports={draw:ix,drawOne:Zz,activateLastSelection:_ne};function ix(e){var t=e._fullLayout;Vz(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var i=t._plots[r].selectionLayer;i&&i.selectAll("path").remove()}for(var a=0;a=0;E--){var I=l.append("path").attr(h).style("opacity",E?.1:v).call(G4.stroke,b).call(G4.fill,m).call(Hz.dashLine,E?"solid":S,E?4+T:T);if(yne(I,e,i),C){var F=pne(e.layout,"selections",i);I.style({cursor:"move"});var N={element:I.node(),plotinfo:a,gd:e,editHelpers:F,isActiveSelection:!0},z=vne(f,e);dne(z,I,N)}else I.style("pointer-events",E?"all":"none");P[E]=I}var O=P[0],H=P[1];H.node().addEventListener("click",function(){return gne(e,O)})}}function yne(e,t,r){var i=r.xref+r.yref;Hz.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}function gne(e,t){if(nx(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeSelectionIndex){Z4(e);return}e._fullLayout._activeSelectionIndex=i,e._fullLayout._deactivateSelection=Z4,ix(e)}}}function _ne(e){if(nx(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=Z4,ix(e)}}function Z4(e){if(nx(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Vz(e),delete e._fullLayout._activeSelectionIndex,ix(e))}}});var Xz=de((f_e,Wz)=>{function xne(){var e,t=0,r=!1;function i(a,s){return e.list.push({type:a,data:s?JSON.parse(JSON.stringify(s)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,s){return i("check",{seg1:a,seg2:s})},segmentChop:function(a,s){return i("div_seg",{seg:a,pt:s}),i("chop",{seg:a,pt:s})},statusRemove:function(a){return i("pop_seg",{seg:a})},segmentUpdate:function(a){return i("seg_update",{seg:a})},segmentNew:function(a,s){return i("new_seg",{seg:a,primary:s})},segmentRemove:function(a){return i("rem_seg",{seg:a})},tempStatus:function(a,s,l){return i("temp_status",{seg:a,above:s,below:l})},rewind:function(a){return i("rewind",{seg:a})},status:function(a,s,l){return i("status",{seg:a,above:s,below:l})},vert:function(a){return a===r?e:(r=a,i("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),i("log",{txt:a})},reset:function(){return i("reset")},selected:function(a){return i("selected",{segs:a})},chainStart:function(a){return i("chain_start",{seg:a})},chainRemoveHead:function(a,s){return i("chain_rem_head",{index:a,pt:s})},chainRemoveTail:function(a,s){return i("chain_rem_tail",{index:a,pt:s})},chainNew:function(a,s){return i("chain_new",{pt1:a,pt2:s})},chainMatch:function(a){return i("chain_match",{index:a})},chainClose:function(a){return i("chain_close",{index:a})},chainAddHead:function(a,s){return i("chain_add_head",{index:a,pt:s})},chainAddTail:function(a,s){return i("chain_add_tail",{index:a,pt:s})},chainConnect:function(a,s){return i("chain_con",{index1:a,index2:s})},chainReverse:function(a){return i("chain_rev",{index:a})},chainJoin:function(a,s){return i("chain_join",{index1:a,index2:s})},done:function(){return i("done")}},e}Wz.exports=xne});var Jz=de((c_e,jz)=>{function bne(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,i,a){var s=i[0],l=i[1],f=a[0],h=a[1],v=r[0],m=r[1];return(f-s)*(m-l)-(h-l)*(v-s)>=-e},pointBetween:function(r,i,a){var s=r[1]-i[1],l=a[0]-i[0],f=r[0]-i[0],h=a[1]-i[1],v=f*l+s*h;if(v-e)},pointsSameX:function(r,i){return Math.abs(r[0]-i[0])e!=f-s>e&&(l-m)*(s-b)/(f-b)+m-a>e&&(h=!h),l=m,f=b}return h}};return t}jz.exports=bne});var Qz=de((h_e,Kz)=>{var wne={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}i=a,a=a.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;i!==null&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(a){return a.prev=r,a.next=i,r.next=a,i!==null&&(i.prev=a),a}}}};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}};Kz.exports=wne});var eI=de((v_e,$z)=>{var hg=Qz();function Tne(e,t,r){function i(C,P){return{id:r?r.segmentId():-1,start:C,end:P,myFill:{above:null,below:null},otherFill:null}}function a(C,P,E){return{id:r?r.segmentId():-1,start:C,end:P,myFill:{above:E.myFill.above,below:E.myFill.below},otherFill:null}}var s=hg.create();function l(C,P,E,I,F,N){var z=t.pointsCompare(P,F);return z!==0?z:t.pointsSame(E,N)?0:C!==I?C?1:-1:t.pointAboveOrOnLine(E,I?F:N,I?N:F)?1:-1}function f(C,P){s.insertBefore(C,function(E){var I=l(C.isStart,C.pt,P,E.isStart,E.pt,E.other.pt);return I<0})}function h(C,P){var E=hg.node({isStart:!0,pt:C.start,seg:C,primary:P,other:null,status:null});return f(E,C.end),E}function v(C,P,E){var I=hg.node({isStart:!1,pt:P.end,seg:P,primary:E,other:C,status:null});C.other=I,f(I,C.pt)}function m(C,P){var E=h(C,P);return v(E,C,P),E}function b(C,P){r&&r.segmentChop(C.seg,P),C.other.remove(),C.seg.end=P,C.other.pt=P,f(C.other,C.pt)}function T(C,P){var E=a(P,C.seg.end,C.seg);return b(C,P),m(E,C.primary)}function S(C,P){var E=hg.create();function I(Ce,Se){var Te=Ce.seg.start,pe=Ce.seg.end,Ae=Se.seg.start,Me=Se.seg.end;return t.pointsCollinear(Te,Ae,Me)?t.pointsCollinear(pe,Ae,Me)||t.pointAboveOrOnLine(pe,Ae,Me)?1:-1:t.pointAboveOrOnLine(Te,Ae,Me)?1:-1}function F(Ce){return E.findTransition(function(Se){var Te=I(Ce,Se.ev);return Te>0})}function N(Ce,Se){var Te=Ce.seg,pe=Se.seg,Ae=Te.start,Me=Te.end,Le=pe.start,Ke=pe.end;r&&r.checkIntersection(Te,pe);var ht=t.linesIntersect(Ae,Me,Le,Ke);if(ht===!1){if(!t.pointsCollinear(Ae,Me,Le)||t.pointsSame(Ae,Ke)||t.pointsSame(Me,Le))return!1;var it=t.pointsSame(Ae,Le),lt=t.pointsSame(Me,Ke);if(it&<)return Se;var He=!it&&t.pointBetween(Ae,Le,Ke),_t=!lt&&t.pointBetween(Me,Le,Ke);if(it)return _t?T(Se,Me):T(Ce,Ke),Se;He&&(lt||(_t?T(Se,Me):T(Ce,Ke)),T(Se,Ae))}else ht.alongA===0&&(ht.alongB===-1?T(Ce,Le):ht.alongB===0?T(Ce,ht.pt):ht.alongB===1&&T(Ce,Ke)),ht.alongB===0&&(ht.alongA===-1?T(Se,Ae):ht.alongA===0?T(Se,ht.pt):ht.alongA===1&&T(Se,Me));return!1}for(var z=[];!s.isEmpty();){var O=s.getHead();if(r&&r.vert(O.pt[0]),O.isStart){let Ce=function(){if(V){var Se=N(O,V);if(Se)return Se}return W?N(O,W):!1};var ve=Ce;r&&r.segmentNew(O.seg,O.primary);var H=F(O),V=H.before?H.before.ev:null,W=H.after?H.after.ev:null;r&&r.tempStatus(O.seg,V?V.seg:!1,W?W.seg:!1);var J=Ce();if(J){if(e){var re;O.seg.myFill.below===null?re=!0:re=O.seg.myFill.above!==O.seg.myFill.below,re&&(J.seg.myFill.above=!J.seg.myFill.above)}else J.seg.otherFill=O.seg.myFill;r&&r.segmentUpdate(J.seg),O.other.remove(),O.remove()}if(s.getHead()!==O){r&&r.rewind(O.seg);continue}if(e){var re;O.seg.myFill.below===null?re=!0:re=O.seg.myFill.above!==O.seg.myFill.below,W?O.seg.myFill.below=W.seg.myFill.above:O.seg.myFill.below=C,re?O.seg.myFill.above=!O.seg.myFill.below:O.seg.myFill.above=O.seg.myFill.below}else if(O.seg.otherFill===null){var oe;W?O.primary===W.primary?oe=W.seg.otherFill.above:oe=W.seg.myFill.above:oe=O.primary?P:C,O.seg.otherFill={above:oe,below:oe}}r&&r.status(O.seg,V?V.seg:!1,W?W.seg:!1),O.other.status=H.insert(hg.node({ev:O}))}else{var ne=O.status;if(ne===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(E.exists(ne.prev)&&E.exists(ne.next)&&N(ne.prev.ev,ne.next.ev),r&&r.statusRemove(ne.ev.seg),ne.remove(),!O.primary){var fe=O.seg.myFill;O.seg.myFill=O.seg.otherFill,O.seg.otherFill=fe}z.push(O.seg)}s.getHead().remove()}return r&&r.done(),z}return e?{addRegion:function(C){for(var P,E=C[C.length-1],I=0;I{function Ane(e,t,r){var i=[],a=[];return e.forEach(function(s){var l=s.start,f=s.end;if(t.pointsSame(l,f)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(s);var h={index:0,matches_head:!1,matches_pt1:!1},v={index:0,matches_head:!1,matches_pt1:!1},m=h;function b(ve,Ce,Se){return m.index=ve,m.matches_head=Ce,m.matches_pt1=Se,m===h?(m=v,!1):(m=null,!0)}for(var T=0;T{function vg(e,t,r){var i=[];return e.forEach(function(a){var s=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[s]!==0&&i.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[s]===1,below:t[s]===2},otherFill:null})}),r&&r.selected(i),i}var Mne={union:function(e,t){return vg(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return vg(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return vg(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return vg(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return vg(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};aI.exports=Mne});var oI=de((m_e,nI)=>{var Sne={toPolygon:function(e,t){function r(s){if(s.length<=0)return e.segments({inverted:!1,regions:[]});function l(v){var m=v.slice(0,v.length-1);return e.segments({inverted:!1,regions:[m]})}for(var f=l(s[0]),h=1;h{var kne=Xz(),Cne=Jz(),sI=eI(),Ene=rI(),dg=iI(),lI=oI(),eu=!1,pg=Cne(),Vs;Vs={buildLog:function(e){return e===!0?eu=kne():e===!1&&(eu=!1),eu===!1?!1:eu.list},epsilon:function(e){return pg.epsilon(e)},segments:function(e){var t=sI(!0,pg,eu);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=sI(!1,pg,eu);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:dg.union(e.combined,eu),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:dg.intersect(e.combined,eu),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:dg.difference(e.combined,eu),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:dg.differenceRev(e.combined,eu),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:dg.xor(e.combined,eu),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Ene(e.segments,pg,eu),inverted:e.inverted}},polygonFromGeoJSON:function(e){return lI.toPolygon(Vs,e)},polygonToGeoJSON:function(e){return lI.fromPolygon(Vs,pg,e)},union:function(e,t){return mg(e,t,Vs.selectUnion)},intersect:function(e,t){return mg(e,t,Vs.selectIntersect)},difference:function(e,t){return mg(e,t,Vs.selectDifference)},differenceRev:function(e,t){return mg(e,t,Vs.selectDifferenceRev)},xor:function(e,t){return mg(e,t,Vs.selectXor)}};function mg(e,t,r){var i=Vs.segments(e),a=Vs.segments(t),s=Vs.combine(i,a),l=r(s);return Vs.polygon(l)}typeof window=="object"&&(window.PolyBool=Vs);uI.exports=Vs});var hI=de((g_e,cI)=>{cI.exports=function(t,r,i,a){var s=t[0],l=t[1],f=!1;i===void 0&&(i=0),a===void 0&&(a=r.length);for(var h=a-i,v=0,m=h-1;vl!=C>l&&s<(S-b)*(l-T)/(C-T)+b;P&&(f=!f)}return f}});var lx=de((__e,vI)=>{"use strict";var W4=o_().dot,ox=Hi().BADNUM,sx=vI.exports={};sx.tester=function(t){var r=t.slice(),i=r[0][0],a=i,s=r[0][1],l=s,f;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),f=1;fa||I===ox||Il||P&&v(C))}function b(C,P){var E=C[0],I=C[1];if(E===ox||Ea||I===ox||Il)return!1;var F=r.length,N=r[0][0],z=r[0][1],O=0,H,V,W,J,re;for(H=1;HMath.max(V,N)||I>Math.max(W,z)))if(If||Math.abs(W4(b,v))>a)return!0;return!1};sx.filter=function(t,r){var i=[t[0]],a=0,s=0;function l(h){t.push(h);var v=i.length,m=a;i.splice(s+1);for(var b=m+1;b1){var f=t.pop();l(f)}return{addPt:l,raw:t,filtered:i}}});var pI=de((x_e,dI)=>{"use strict";dI.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var qI=de((b_e,FI)=>{"use strict";var mI=fI(),Lne=hI(),_g=la(),Pne=_i().dashStyle,yg=Ua(),Dne=Rf(),zne=bc().makeEventData,Ag=kd(),Ine=Ag.freeMode,Rne=Ag.rectMode,xg=Ag.drawMode,K4=Ag.openMode,Q4=Ag.selectMode,yI=Hh(),gI=ng(),TI=Y2(),AI=Dh().clearOutline,MI=Uh(),X4=MI.handleEllipse,Fne=MI.readPaths,qne=V2().newShapes,Nne=b4(),Bne=Y4().activateLastSelection,fx=Bt(),One=fx.sorterAsc,SI=lx(),gg=b_(),tu=$n().getFromId,Une=I2(),Vne=ax().redrawReglTraces,cx=pI(),qf=cx.MINSELECT,Hne=SI.filter,$4=SI.tester,e6=N2(),_I=e6.p2r,Gne=e6.axValue,Zne=e6.getTransform;function t6(e){return e.subplot!==void 0}function Yne(e,t,r,i,a){var s=!t6(i),l=Ine(a),f=Rne(a),h=K4(a),v=xg(a),m=Q4(a),b=a==="drawline",T=a==="drawcircle",S=b||T,C=i.gd,P=C._fullLayout,E=m&&P.newselection.mode==="immediate"&&s,I=P._zoomlayer,F=i.element.getBoundingClientRect(),N=i.plotinfo,z=Zne(N),O=t-F.left,H=r-F.top;P._calcInverseTransform(C);var V=fx.apply3DTransform(P._invTransform)(O,H);O=V[0],H=V[1];var W=P._invScaleX,J=P._invScaleY,re=O,oe=H,ne="M"+O+","+H,fe=i.xaxes[0],ve=i.yaxes[0],Ce=fe._length,Se=ve._length,Te=e.altKey&&!(xg(a)&&h),pe,Ae,Me,Le,Ke,ht,it;CI(e,C,i),l&&(pe=Hne([[O,H]],cx.BENDPX));var lt=I.selectAll("path.select-outline-"+N.id).data([1]),He=v?P.newshape:P.newselection;v&&(i.hasText=He.label.text||He.label.texttemplate);var _t=v&&!h?He.fillcolor:"rgba(0,0,0,0)",at=He.line.color||(s?yg.contrast(C._fullLayout.plot_bgcolor):"#7f7f7f");lt.enter().append("path").attr("class","select-outline select-outline-"+N.id).style({opacity:v?He.opacity/2:1,"stroke-dasharray":Pne(He.line.dash,He.line.width),"stroke-width":He.line.width+"px","shape-rendering":"crispEdges"}).call(yg.stroke,at).call(yg.fill,_t).attr("fill-rule","evenodd").classed("cursor-move",!!v).attr("transform",z).attr("d",ne+"Z");var At=I.append("path").attr("class","zoombox-corners").style({fill:yg.background,stroke:yg.defaultLine,"stroke-width":1}).attr("transform",z).attr("d","M0,0Z");if(v&&i.hasText){var kt=I.select(".label-temp");kt.empty()&&(kt=I.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var pt=P._uid+cx.SELECTID,ge=[],Re=hx(C,i.xaxes,i.yaxes,i.subplot);E&&!e.shiftKey&&(i._clearSubplotSelections=function(){if(s){var et=fe._id,vt=ve._id;zI(C,et,vt,Re);for(var tt=(C.layout||{}).selections||[],Nt=[],Mt=!1,Ct=0;Ct=0){C._fullLayout._deactivateShape(C);return}if(!v){var tt=P.clickmode;gg.done(pt).then(function(){if(gg.clear(pt),et===2){for(lt.remove(),Ke=0;Ke-1&&kI(vt,C,i.xaxes,i.yaxes,i.subplot,i,lt),tt==="event"&&Tg(C,void 0);Dne.click(C,vt,N.id)}).catch(fx.error)}},i.doneFn=function(){At.remove(),gg.done(pt).then(function(){gg.clear(pt),!E&&Le&&i.selectionDefs&&(Le.subtract=Te,i.selectionDefs.push(Le),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,Me)),(E||v)&&bg(i,E),i.doneFnCompleted&&i.doneFnCompleted(ge),m&&Tg(C,it)}).catch(fx.error)}}function kI(e,t,r,i,a,s,l){var f=t._hoverdata,h=t._fullLayout,v=h.clickmode,m=v.indexOf("event")>-1,b=[],T,S,C,P,E,I,F,N,z,O;if(Kne(f)){CI(e,t,s),T=hx(t,r,i,a);var H=Qne(f,T),V=H.pointNumbers.length>0;if(V?$ne(T,H):eoe(T)&&(F=bI(H))){for(l&&l.remove(),O=0;O=0}function Jne(e){return e._fullLayout._activeSelectionIndex>=0}function bg(e,t){var r=e.dragmode,i=e.plotinfo,a=e.gd;jne(a)&&a._fullLayout._deactivateShape(a),Jne(a)&&a._fullLayout._deactivateSelection(a);var s=a._fullLayout,l=s._zoomlayer,f=xg(r),h=Q4(r);if(f||h){var v=l.selectAll(".select-outline-"+i.id);if(v&&a._fullLayout._outlining){var m;f&&(m=qne(v,e)),m&&_g.call("_guiRelayout",a,{shapes:m});var b;h&&!t6(e)&&(b=Nne(v,e)),b&&(a._fullLayout._noEmitSelectedAtStart=!0,_g.call("_guiRelayout",a,{selections:b}).then(function(){t&&Bne(a)})),a._fullLayout._outlining=!1}}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function xI(e){return e._id}function hx(e,t,r,i){if(!e.calcdata)return[];var a=[],s=t.map(xI),l=r.map(xI),f,h,v;for(v=0;v0,s=a?i[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(s)>-1:!1}function $ne(e,t){var r=[],i,a,s,l;for(l=0;l0&&r.push(i);if(r.length===1&&(s=r[0]===t.searchInfo,s&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(l=0;l1||(t+=i.selectedpoints.length,t>1)))return!1;return t===1}function wg(e,t,r){var i;for(i=0;i-1&&t;if(!l&&t){var et=wI(e,!0);if(et.length){var vt=et[0].xref,tt=et[0].yref;if(vt&&tt){var Nt=II(et),Mt=RI([tu(e,vt,"x"),tu(e,tt,"y")]);Mt(ge,Nt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:xe&&Tg(e,ge),T._reselect=!1}if(!l&&T._deselect){var Ct=T._deselect;f=Ct.xref,h=Ct.yref,aoe(f,h,m)||zI(e,f,h,i),xe&&(ge.points.length?Tg(e,ge):i6(e)),T._deselect=!1}return{eventData:ge,selectionTesters:r}}function roe(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";NI.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 Mg=de((T_e,BI)=>{"use strict";BI.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 Q0=de((M_e,VI)=>{"use strict";var OI=n6(),UI=qo(),vx=Ao(),loe=Di().templatedArray,A_e=Mg();VI.exports=loe("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:UI({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:OI.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:OI.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",vx.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",vx.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",vx.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",vx.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:UI({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var dx=de((S_e,HI)=>{"use strict";HI.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var px=de((k_e,GI)=>{"use strict";GI.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var kc=de((C_e,JI)=>{"use strict";var ZI=qw().axisHoverFormat,uoe=Hl().texttemplateAttrs,foe=Hl().hovertemplateAttrs,YI=xc(),coe=qo(),hoe=hc().dash,voe=hc().pattern,doe=_i(),poe=dx(),mx=hn().extendFlat,moe=px();function WI(e){return{valType:"any",dflt:0,editType:"calc"}}function XI(e){return{valType:"any",editType:"calc"}}function jI(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}JI.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:WI("x"),yperiod:WI("y"),xperiod0:XI("x0"),yperiod0:XI("y0"),xperiodalignment:jI("x"),yperiodalignment:jI("y"),xhoverformat:ZI("x"),yhoverformat:ZI("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:uoe({},{}),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:foe({},{keys:poe.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:mx({},hoe,{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:moe(!0),fillgradient:mx({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:voe,marker:mx({symbol:{valType:"enumerated",values:doe.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:mx({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},YI("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"},YI("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:coe({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var o6=de((L_e,$I)=>{"use strict";var KI=Q0(),QI=kc().line,yoe=hc().dash,yx=hn().extendFlat,goe=nl().overrideAll,_oe=Di().templatedArray,E_e=Mg();$I.exports=goe(_oe("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:yx({},KI.xref,{}),yref:yx({},KI.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:QI.color,width:yx({},QI.width,{min:1,dflt:1}),dash:yx({},yoe,{dflt:"dot"})}}),"arraydraw","from-root")});var aR=de((P_e,rR)=>{"use strict";var eR=Bt(),gx=Yi(),xoe=Wl(),boe=o6(),tR=Hh();rR.exports=function(t,r){xoe(t,r,{name:"selections",handleItemDefaults:woe});for(var i=r.selections,a=0;a{"use strict";iR.exports=function(t,r,i){i("newselection.mode");var a=i("newselection.line.width");a&&(i("newselection.line.color"),i("newselection.line.dash")),i("activeselection.fillcolor"),i("activeselection.opacity")}});var Sg=de((z_e,lR)=>{"use strict";var Toe=la(),oR=Bt(),sR=$n();lR.exports=function(t){return function(i,a){var s=i[t];if(Array.isArray(s))for(var l=Toe.subplotsRegistry.cartesian,f=l.idRegex,h=a._subplots,v=h.xaxis,m=h.yaxis,b=h.cartesian,T=a._has("cartesian"),S=0;S{"use strict";var uR=Y4(),kg=qI();fR.exports={moduleType:"component",name:"selections",layoutAttributes:o6(),supplyLayoutDefaults:aR(),supplyDrawNewSelectionDefaults:nR(),includeBasePlot:Sg()("selections"),draw:uR.draw,drawOne:uR.drawOne,reselect:kg.reselect,prepSelect:kg.prepSelect,clearOutline:kg.clearOutline,clearSelectionsCache:kg.clearSelectionsCache,selectOnClick:kg.selectOnClick}});var PR=de((R_e,LR)=>{"use strict";var c6=ja(),ru=Bt(),cR=ru.numberFormat,Aoe=Tf(),Moe=G5(),_x=la(),xR=ru.strTranslate,Soe=co(),hR=Ua(),Zh=_i(),koe=Rf(),vR=Yi(),Coe=Oh(),Eoe=jl(),bR=kd(),xx=bR.selectingOrDrawing,Loe=bR.freeMode,Poe=ts().FROM_TL,Doe=I2(),zoe=ax().redrawReglTraces,Ioe=eo(),l6=$n().getFromId,Roe=Nf().prepSelect,Foe=Nf().clearOutline,qoe=Nf().selectOnClick,s6=N4(),h6=Ao(),dR=h6.MINDRAG,gs=h6.MINZOOM,pR=!0;function Noe(e,t,r,i,a,s,l,f){var h=e._fullLayout._zoomlayer,v=l+f==="nsew",m=(l+f).length===1,b,T,S,C,P,E,I,F,N,z,O,H,V,W,J,re,oe,ne,fe,ve,Ce,Se,Te;r+=t.yaxis._shift;function pe(){if(b=t.xaxis,T=t.yaxis,N=b._length,z=T._length,I=b._offset,F=T._offset,S={},S[b._id]=b,C={},C[T._id]=T,l&&f)for(var Tt=t.overlays,wt=0;wt=0){Vt._fullLayout._deactivateShape(Vt);return}var Kt=Vt._fullLayout.clickmode;if(f6(Vt),Tt===2&&!m&&Wt(),v)Kt.indexOf("select")>-1&&qoe(wt,Vt,P,E,t.id,Le),Kt.indexOf("event")>-1&&koe.click(Vt,wt,t.id);else if(Tt===1&&m){var Ht=l?T:b,Ot=l==="s"||f==="w"?0:1,er=Ht._name+".range["+Ot+"]",Mr=Boe(Ht,Ot),xr="left",Pt="middle";if(Ht.fixedrange)return;l?(Pt=l==="n"?"top":"bottom",Ht.side==="right"&&(xr="right")):f==="e"&&(xr="right"),Vt._context.showAxisRangeEntryBoxes&&c6.select(Me).call(Soe.makeEditable,{gd:Vt,immediate:!0,background:Vt._fullLayout.paper_bgcolor,text:String(Mr),fill:Ht.tickfont?Ht.tickfont.color:"#444",horizontalAlign:xr,verticalAlign:Pt}).on("edit",function(Fe){var Ge=Ht.d2r(Fe);Ge!==void 0&&_x.call("_guiRelayout",Vt,er,Ge)})}}Eoe.init(Le);var it,lt,He,_t,at,At,kt,pt,ge,Re;function xe(Tt,wt,Vt){var Kt=Me.getBoundingClientRect();it=wt-Kt.left,lt=Vt-Kt.top,e._fullLayout._calcInverseTransform(e);var Ht=ru.apply3DTransform(e._fullLayout._invTransform)(it,lt);it=Ht[0],lt=Ht[1],He={l:it,r:it,w:0,t:lt,b:lt,h:0},_t=e._hmpixcount?e._hmlumcount/e._hmpixcount:Aoe(e._fullLayout.plot_bgcolor).getLuminance(),at="M0,0H"+N+"V"+z+"H0V0",At=!1,kt="xy",Re=!1,pt=AR(h,_t,I,F,at),ge=MR(h,I,F)}function et(Tt,wt){if(e._transitioningWithDuration)return!1;var Vt=Math.max(0,Math.min(N,Se*Tt+it)),Kt=Math.max(0,Math.min(z,Te*wt+lt)),Ht=Math.abs(Vt-it),Ot=Math.abs(Kt-lt);He.l=Math.min(it,Vt),He.r=Math.max(it,Vt),He.t=Math.min(lt,Kt),He.b=Math.max(lt,Kt);function er(){kt="",He.r=He.l,He.t=He.b,ge.attr("d","M0,0Z")}if(O.isSubplotConstrained)Ht>gs||Ot>gs?(kt="xy",Ht/N>Ot/z?(Ot=Ht*z/N,lt>Kt?He.t=lt-Ot:He.b=lt+Ot):(Ht=Ot*N/z,it>Vt?He.l=it-Ht:He.r=it+Ht),ge.attr("d",bx(He))):er();else if(H.isSubplotConstrained)if(Ht>gs||Ot>gs){kt="xy";var Mr=Math.min(He.l/N,(z-He.b)/z),xr=Math.max(He.r/N,(z-He.t)/z);He.l=Mr*N,He.r=xr*N,He.b=(1-Mr)*z,He.t=(1-xr)*z,ge.attr("d",bx(He))}else er();else!W||Ot0){var Fe;if(H.isSubplotConstrained||!V&&W.length===1){for(Fe=0;Fe1&&(er.maxallowed!==void 0&&re===(er.range[0]1&&(Mr.maxallowed!==void 0&&oe===(Mr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Uoe(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function AR(e,t,r,i,a){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",xR(r,i)).attr("d",a+"Z")}function MR(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:hR.background,stroke:hR.defaultLine,"stroke-width":1,opacity:0}).attr("transform",xR(t,r)).attr("d","M0,0Z")}function SR(e,t,r,i,a,s){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),kR(e,t,a,s)}function kR(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function f6(e){c6.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function CR(e){pR&&e.data&&e._context.showTips&&(ru.notifier(ru._(e,"Double-click to zoom back out"),"long"),pR=!1)}function Voe(e,t){return"M"+(e.l-.5)+","+(t-gs-.5)+"h-3v"+(2*gs+1)+"h3ZM"+(e.r+.5)+","+(t-gs-.5)+"h3v"+(2*gs+1)+"h-3Z"}function Hoe(e,t){return"M"+(t-gs-.5)+","+(e.t-.5)+"v-3h"+(2*gs+1)+"v3ZM"+(t-gs-.5)+","+(e.b+.5)+"v3h"+(2*gs+1)+"v-3Z"}function bx(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,gs)/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 gR(e,t,r,i,a){for(var s=!1,l={},f={},h,v,m,b,T=(a||{}).xaHash,S=(a||{}).yaHash,C=0;C{"use strict";var Goe=ja(),wx=Rf(),Zoe=jl(),Yoe=Oh(),Bu=PR().makeDragBox,io=Ao().DRAGGERSIZE;Tx.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Goe.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var i=Object.keys(r._plots||{}).sort(function(s,l){if((r._plots[s].mainplot&&!0)===(r._plots[l].mainplot&&!0)){var f=s.split("y"),h=l.split("y");return f[0]===h[0]?Number(f[1]||1)-Number(h[1]||1):Number(f[0]||1)-Number(h[0]||1)}return r._plots[s].mainplot?1:-1});i.forEach(function(s){var l=r._plots[s],f=l.xaxis,h=l.yaxis;if(!l.mainplot){var v=Bu(t,l,f._offset,h._offset,f._length,h._length,"ns","ew");v.onmousemove=function(T){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===s&&t._fullLayout._plots[s]&&wx.hover(t,T,s)},wx.hover(t,T,s),t._fullLayout._lasthover=v,t._fullLayout._hoversubplot=s},v.onmouseout=function(T){t._dragging||(t._fullLayout._hoversubplot=null,Zoe.unhover(t,T))},t._context.showAxisDragHandles&&(Bu(t,l,f._offset-io,h._offset-io,io,io,"n","w"),Bu(t,l,f._offset+f._length,h._offset-io,io,io,"n","e"),Bu(t,l,f._offset-io,h._offset+h._length,io,io,"s","w"),Bu(t,l,f._offset+f._length,h._offset+h._length,io,io,"s","e"))}if(t._context.showAxisDragHandles){if(s===f._mainSubplot){var m=f._mainLinePosition;f.side==="top"&&(m-=io),Bu(t,l,f._offset+f._length*.1,m,f._length*.8,io,"","ew"),Bu(t,l,f._offset,m,f._length*.1,io,"","w"),Bu(t,l,f._offset+f._length*.9,m,f._length*.1,io,"","e")}if(s===h._mainSubplot){var b=h._mainLinePosition;h.side!=="right"&&(b-=io),Bu(t,l,b,h._offset+h._length*.1,io,h._length*.8,"ns",""),Bu(t,l,b,h._offset+h._length*.9,io,h._length*.1,"s",""),Bu(t,l,b,h._offset,io,h._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(s){s.target=t._fullLayout._lasthover,wx.hover(t,s,r._hoversubplot)},a.onclick=function(s){s.target=t._fullLayout._lasthover,wx.click(t,s)},a.onmousedown=function(s){t._fullLayout._lasthover.onmousedown(s)},Tx.updateFx(t)}};Tx.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Yoe(t._draggers,r)}});var IR=de((q_e,zR)=>{"use strict";var DR=la();zR.exports=function(t){for(var r=DR.layoutArrayContainers,i=DR.layoutArrayRegexes,a=t.split("[")[0],s,l,f=0;f{"use strict";var Woe=cc(),d6=n_(),Cg=Th(),Xoe=lw().sorterAsc,p6=la();Eg.containerArrayMatch=IR();var joe=Eg.isAddVal=function(t){return t==="add"||Woe(t)},RR=Eg.isRemoveVal=function(t){return t===null||t==="remove"};Eg.applyContainerArrayChanges=function(t,r,i,a,s){var l=r.astr,f=p6.getComponentMethod(l,"supplyLayoutDefaults"),h=p6.getComponentMethod(l,"draw"),v=p6.getComponentMethod(l,"drawOne"),m=a.replot||a.recalc||f===d6||h===d6,b=t.layout,T=t._fullLayout;if(i[""]){Object.keys(i).length>1&&Cg.warn("Full array edits are incompatible with other edits",l);var S=i[""][""];if(RR(S))r.set(null);else if(Array.isArray(S))r.set(S);else return Cg.warn("Unrecognized full array edit value",l,S),!0;return m?!1:(f(b,T),h(t),!0)}var C=Object.keys(i).map(Number).sort(Xoe),P=r.get(),E=P||[],I=s(T,l).get(),F=[],N=-1,z=E.length,O,H,V,W,J,re,oe,ne;for(O=0;OE.length-(oe?0:1)){Cg.warn("index out of range",l,V);continue}if(re!==void 0)J.length>1&&Cg.warn("Insertion & removal are incompatible with edits to the same index.",l,V),RR(re)?F.push(V):oe?(re==="add"&&(re={}),E.splice(V,0,re),I&&I.splice(V,0,{})):Cg.warn("Unrecognized full object edit value",l,V,re),N===-1&&(N=V);else for(H=0;H=0;O--)E.splice(F[O],1),I&&I.splice(F[O],1);if(E.length?P||r.set(E):r.set(null),m)return!1;if(f(b,T),v!==d6){var fe;if(N===-1)fe=C;else{for(z=Math.max(E.length,z),fe=[],O=0;O=N));O++)fe.push(V);for(O=N;O{"use strict";var OR=Da(),B_e=$3(),UR=la(),Hs=Bt(),Lg=eo(),VR=$n(),HR=Ua(),Pg=VR.cleanId,Joe=VR.getFromTrace,m6=UR.traceIs;Ou.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Hs.log("Clearing previous rejected promises from queue."),e._promises=[]};Ou.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(Lg.subplotsRegistry.cartesian||{}).attrRegex,a=(Lg.subplotsRegistry.polar||{}).attrRegex,s=(Lg.subplotsRegistry.ternary||{}).attrRegex,l=(Lg.subplotsRegistry.gl3d||{}).attrRegex,f=Object.keys(e);for(t=0;t3?(E.x=1.02,E.xanchor="left"):E.x<-2&&(E.x=-.02,E.xanchor="right"),E.y>3?(E.y=1.02,E.yanchor="bottom"):E.y<-2&&(E.y=-.02,E.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),HR.clean(e),e.template&&e.template.layout&&Ou.cleanLayout(e.template.layout),e};function $0(e,t){var r=e[t],i=t.charAt(0);r&&r!=="paper"&&(e[t]=Pg(r,i,!0))}Ou.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}Ou.hasParent=function(e,t){for(var r=BR(t);r;){if(r in e)return!0;r=BR(r)}return!1};var $oe=["x","y","z"];Ou.clearAxisTypes=function(e,t,r){for(var i=0;i{"use strict";var kx=ja(),ese=Da(),tse=bw(),mr=Bt(),Ii=mr.nestedProperty,_6=qy(),_s=Mk(),au=la(),Ix=M0(),ra=eo(),ss=Yi(),rse=H5(),ase=Ru(),y6=_i(),ise=Ua(),nse=v6().initInteractions,ose=zh(),sse=Nf().clearOutline,jR=rd().dfltConfig,Mx=FR(),On=GR(),hi=ax(),Yh=nl(),lse=Ao().AX_NAME_PATTERN,g6=0,ZR=5;function use(e,t,r,i){var a;if(e=mr.getGraphDiv(e),_6.init(e),mr.isPlainObject(t)){var s=t;t=s.data,r=s.layout,i=s.config,a=s.frames}var l=_6.triggerHandler(e,"plotly_beforeplot",[t,r,i]);if(l===!1)return Promise.reject();!t&&!r&&!mr.isPlotDiv(e)&&mr.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function f(){if(a)return ei.addFrames(e,a)}KR(e,i),r||(r={}),kx.select(e).classed("js-plotly-plot",!0),y6.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var h=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(On.cleanData(t),h?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||h)&&(e.layout=On.cleanLayout(r)),ra.supplyDefaults(e);var v=e._fullLayout,m=v._has("cartesian");v._replotting=!0,(h||v._shouldCreateBgLayer)&&(Pse(e),v._shouldCreateBgLayer&&delete v._shouldCreateBgLayer),y6.initGradients(e),y6.initPatterns(e),h&&ss.saveShowSpikeInitial(e);var b=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;b&&ra.doCalcdata(e);for(var T=0;T=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,i+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function QR(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]),Ex(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&Ex(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function dse(e,t,r){var i,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;i=0&&m=0&&m0&&typeof W.parts[oe]!="string";)oe--;var ne=W.parts[oe],fe=W.parts[oe-1]+"."+ne,ve=W.parts.slice(0,oe).join("."),Ce=Ii(e.layout,ve).get(),Se=Ii(i,ve).get(),Te=W.get();if(J!==void 0){I[V]=J,F[V]=ne==="reverse"?J:Cc(Te);var pe=Ix.getLayoutValObject(i,W.parts);if(pe&&pe.impliedEdits&&J!==null)for(var Ae in pe.impliedEdits)N(mr.relativeAttr(V,Ae),pe.impliedEdits[Ae]);if(["width","height"].indexOf(V)!==-1)if(J){N("autosize",null);var Me=V==="height"?"width":"height";N(Me,i[Me])}else i[V]=e._initialAutoSize[V];else if(V==="autosize")N("width",J?null:i.width),N("height",J?null:i.height);else if(fe.match(sF))H(fe),Ii(i,ve+"._inputRange").set(null);else if(fe.match(lF)){H(fe),Ii(i,ve+"._inputRange").set(null);var Le=Ii(i,ve).get();Le._inputDomain&&(Le._input.domain=Le._inputDomain.slice())}else fe.match(uF)&&Ii(i,ve+"._inputDomain").set(null);if(ne==="type"){O=Ce;var Ke=Se.type==="linear"&&J==="log",ht=Se.type==="log"&&J==="linear";if(Ke||ht){if(!O||!O.range)N(ve+".autorange",!0);else if(Se.autorange)Ke&&(O.range=O.range[1]>O.range[0]?[1,2]:[2,1]);else{var it=O.range[0],lt=O.range[1];Ke?(it<=0&<<=0&&N(ve+".autorange",!0),it<=0?it=lt/1e6:lt<=0&&(lt=it/1e6),N(ve+".range[0]",Math.log(it)/Math.LN10),N(ve+".range[1]",Math.log(lt)/Math.LN10)):(N(ve+".range[0]",Math.pow(10,it)),N(ve+".range[1]",Math.pow(10,lt)))}Array.isArray(i._subplots.polar)&&i._subplots.polar.length&&i[W.parts[0]]&&W.parts[1]==="radialaxis"&&delete i[W.parts[0]]._subplot.viewInitial["radialaxis.range"],au.getComponentMethod("annotations","convertCoords")(e,Se,J,N),au.getComponentMethod("images","convertCoords")(e,Se,J,N)}else N(ve+".autorange",!0),N(ve+".range",null);Ii(i,ve+"._inputRange").set(null)}else if(ne.match(lse)){var He=Ii(i,V).get(),_t=(J||{}).type;(!_t||_t==="-")&&(_t="linear"),au.getComponentMethod("annotations","convertCoords")(e,He,_t,N),au.getComponentMethod("images","convertCoords")(e,He,_t,N)}var at=Mx.containerArrayMatch(V);if(at){m=at.array,b=at.index;var At=at.property,kt=pe||{editType:"calc"};b!==""&&At===""&&(Mx.isAddVal(J)?F[V]=null:Mx.isRemoveVal(J)?F[V]=(Ii(r,m).get()||[])[b]:mr.warn("unrecognized full object value",t)),Yh.update(E,kt),v[m]||(v[m]={});var pt=v[m][b];pt||(pt=v[m][b]={}),pt[At]=J,delete t[V]}else ne==="reverse"?(Ce.range?Ce.range.reverse():(N(ve+".autorange",!0),Ce.range=[1,0]),Se.autorange?E.calc=!0:E.plot=!0):(V==="dragmode"&&(J===!1&&Te!==!1||J!==!1&&Te===!1)||i._has("scatter-like")&&i._has("regl")&&V==="dragmode"&&(J==="lasso"||J==="select")&&!(Te==="lasso"||Te==="select")?E.plot=!0:pe?Yh.update(E,pe):E.calc=!0,W.set(J))}}for(m in v){var ge=Mx.applyContainerArrayChanges(e,s(r,m),v[m],E,s);ge||(E.plot=!0)}for(var Re in z){O=ss.getFromId(e,Re);var xe=O&&O._constraintGroup;if(xe){E.calc=!0;for(var et in xe)z[et]||(ss.getFromId(e,et)._constraintShrinkable=!0)}}(cF(e)||t.height||t.width)&&(E.plot=!0);var vt=i.shapes;for(b=0;b1;)if(i.pop(),r=Ii(t,i.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function xse(e,t){for(var r=0;r=a.length?a[0]:a[v]:a}function f(v){return Array.isArray(s)?v>=s.length?s[0]:s[v]:s}function h(v,m){var b=0;return function(){if(v&&++b===m)return v()}}return new Promise(function(v,m){function b(){if(i._frameQueue.length!==0){for(;i._frameQueue.length;){var ne=i._frameQueue.pop();ne.onInterrupt&&ne.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function T(ne){if(ne.length!==0){for(var fe=0;fei._timeToNext&&C()};ne()}var E=0;function I(ne){return Array.isArray(a)?E>=a.length?ne.transitionOpts=a[E]:ne.transitionOpts=a[0]:ne.transitionOpts=a,E++,ne}var F,N,z=[],O=t==null,H=Array.isArray(t),V=!O&&!H&&mr.isPlainObject(t);if(V)z.push({type:"object",data:I(mr.extendFlat({},t))});else if(O||["string","number"].indexOf(typeof t)!==-1)for(F=0;F0&&rere)&&oe.push(N);z=oe}}z.length>0?T(z):(e.emit("plotly_animated"),v())})}function kse(e,t,r){if(e=mr.getGraphDiv(e),t==null)return Promise.resolve();if(!mr.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,a,s,l,f=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var v=f.length+t.length*2,m=[],b={};for(i=t.length-1;i>=0;i--)if(mr.isPlainObject(t[i])){var T=t[i].name,S=(h[T]||b[T]||{}).name,C=t[i].name,P=h[S]||b[S];S&&C&&typeof C=="number"&&P&&g6W.index?-1:V.index=0;i--){if(a=m[i].frame,typeof a.name=="number"&&mr.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(s=0;s=0;r--)i=t[r],s.push({type:"delete",index:i}),l.unshift({type:"insert",index:i,value:a[i]});var f=ra.modifyFrames,h=ra.modifyFrames,v=[e,l],m=[e,s];return _s&&_s.add(e,f,v,h,m),ra.modifyFrames(e,s)}function Ese(e){e=mr.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return ra.cleanPlot([],{},r,t),ra.purge(e),_6.purge(e),t._container&&t._container.remove(),delete e._context,e}function Lse(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!mr.equalDomRects(r,t._lastBBox)){var i=t._invTransform=mr.inverseTransformMatrix(mr.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(i[0][0]*i[0][0]+i[0][1]*i[0][1]+i[0][2]*i[0][2]),t._invScaleY=Math.sqrt(i[1][0]*i[1][0]+i[1][1]*i[1][1]+i[1][2]*i[1][2]),t._lastBBox=r}}function Pse(e){var t=kx.select(e),r=e._fullLayout;if(r._calcInverseTransform=Lse,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),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};kx.selectAll("defs").each(function(){this.id&&(i[this.id.split("-")[1]]=1)}),r._uid=mr.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(ose.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 a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.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 s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.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")}ei.animate=Sse;ei.addFrames=kse;ei.deleteFrames=Cse;ei.addTraces=aF;ei.deleteTraces=iF;ei.extendTraces=tF;ei.moveTraces=x6;ei.prependTraces=rF;ei.newPlot=vse;ei._doPlot=use;ei.purge=Ese;ei.react=Tse;ei.redraw=hse;ei.relayout=Dg;ei.restyle=Lx;ei.setPlotConfig=fse;ei.update=Dx;ei._guiRelayout=w6(Dg);ei._guiRestyle=w6(Lx);ei._guiUpdate=w6(Dx);ei._storeDirectGUIEdit=yse});var Pd=de(Bf=>{"use strict";var Dse=la();Bf.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Bf.getRedrawFunc=function(e){return function(){Dse.getComponentMethod("colorbar","draw")(e)}};Bf.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Bf.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var hF=window.URL||window.webkitURL;Bf.createObjectURL=function(e){return hF.createObjectURL(e)};Bf.revokeObjectURL=function(e){return hF.revokeObjectURL(e)};Bf.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=zse(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Bf.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function zse(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),a=0;a{"use strict";var M6=ja(),H_e=Bt(),Ise=_i(),Rse=Ua(),G_e=zh(),A6=/"/g,Ig="TOBESTRIPPED",Fse=new RegExp('("'+Ig+")|("+Ig+'")',"g");function qse(e){var t=M6.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(i){return i==="<"?"<":i==="&rt;"?">":i.indexOf("<")!==-1||i.indexOf(">")!==-1?"":t.html(i).text()});return t.remove(),r}function Nse(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}vF.exports=function(t,r,i){var a=t._fullLayout,s=a._paper,l=a._toppaper,f=a.width,h=a.height,v;s.insert("rect",":first-child").call(Ise.setRect,0,0,f,h).call(Rse.fill,a.paper_bgcolor);var m=a._basePlotModules||[];for(v=0;v{"use strict";var Bse=Bt(),Ose=C_().EventEmitter,Rg=Pd();function Use(e){var t=e.emitter||new Ose,r=new Promise(function(i,a){var s=window.Image,l=e.svg,f=e.format||"png",h=e.canvas,v=e.scale||1,m=e.width||300,b=e.height||150,T=v*m,S=v*b,C=h.getContext("2d",{willReadFrequently:!0}),P=new s,E,I;f==="svg"||Bse.isSafari()?I=Rg.encodeSVG(l):(E=Rg.createBlob(l,"svg"),I=Rg.createObjectURL(E)),h.width=T,h.height=S,P.onload=function(){var F;switch(E=null,Rg.revokeObjectURL(I),f!=="svg"&&C.drawImage(P,0,0,T,S),f){case"jpeg":F=h.toDataURL("image/jpeg");break;case"png":F=h.toDataURL("image/png");break;case"webp":F=h.toDataURL("image/webp");break;case"svg":F=I;break;default:var N="Image format is not jpeg, png, svg or webp.";if(a(new Error(N)),!e.promise)return t.emit("error",N)}i(F),e.promise||t.emit("success",F)},P.onerror=function(F){if(E=null,Rg.revokeObjectURL(I),a(F),!e.promise)return t.emit("error",F)},P.src=I});return e.promise?r:t}dF.exports=Use});var k6=de((W_e,yF)=>{"use strict";var pF=Da(),mF=T6(),Vse=eo(),Of=Bt(),Fg=Pd(),Hse=Fx(),Gse=qx(),Zse=U1().version,S6={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 Yse(e,t){t=t||{};var r,i,a,s;Of.isPlainObject(e)?(r=e.data||[],i=e.layout||{},a=e.config||{},s={}):(e=Of.getGraphDiv(e),r=Of.extendDeep([],e.data),i=Of.extendDeep({},e.layout),a=e._context,s=e._fullLayout||{});function l(H){return!(H in t)||Of.validate(t[H],S6[H])}if(!l("width")&&t.width!==null||!l("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!l("format"))throw new Error("Export format is not "+Of.join2(S6.format.values,", "," or ")+".");var f={};function h(H,V){return Of.coerce(t,f,S6,H,V)}var v=h("format"),m=h("width"),b=h("height"),T=h("scale"),S=h("setBackground"),C=h("imageDataOnly"),P=document.createElement("div");P.style.position="absolute",P.style.left="-5000px",document.body.appendChild(P);var E=Of.extendFlat({},i);m?E.width=m:t.width===null&&pF(s.width)&&(E.width=s.width),b?E.height=b:t.height===null&&pF(s.height)&&(E.height=s.height);var I=Of.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:S}),F=Fg.getRedrawFunc(P);function N(){return new Promise(function(H){setTimeout(H,Fg.getDelay(P._fullLayout))})}function z(){return new Promise(function(H,V){var W=Hse(P,v,T),J=P._fullLayout.width,re=P._fullLayout.height;function oe(){mF.purge(P),document.body.removeChild(P)}if(v==="full-json"){var ne=Vse.graphJson(P,!1,"keepdata","object",!0,!0);return ne.version=Zse,ne=JSON.stringify(ne),oe(),H(C?ne:Fg.encodeJSON(ne))}if(oe(),v==="svg")return H(C?W:Fg.encodeSVG(W));var fe=document.createElement("canvas");fe.id=Of.randstr(),Gse({format:v,width:J,height:re,scale:T,canvas:fe,svg:W,promise:!0}).then(H).catch(V)})}function O(H){return C?H.replace(Fg.IMAGE_URL_PREFIX,""):H}return new Promise(function(H,V){mF.newPlot(P,r,E,I).then(F).then(N).then(z).then(function(W){H(O(W))}).catch(function(W){V(W)})})}yF.exports=Yse});var bF=de((X_e,xF)=>{"use strict";var iu=Bt(),Wse=eo(),Xse=M0(),jse=rd().dfltConfig,Uu=iu.isPlainObject,zd=Array.isArray,gF=iu.isArrayOrTypedArray;xF.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var i=Xse.get(),a=[],s={_context:iu.extendFlat({},jse)},l,f;zd(t)?(s.data=iu.extendDeep([],t),l=t):(s.data=[],l=[],a.push(no("array","data"))),Uu(r)?(s.layout=iu.extendDeep({},r),f=r):(s.layout={},f={},arguments.length>1&&a.push(no("object","layout"))),Wse.supplyDefaults(s);for(var h=s._fullData,v=l.length,m=0;mb.length&&i.push(no("unused",a,v.concat(b.length)));var I=b.length,F=Array.isArray(E);F&&(I=Math.min(I,E.length));var N,z,O,H,V;if(T.dimensions===2)for(z=0;zb[z].length&&i.push(no("unused",a,v.concat(z,b[z].length)));var W=b[z].length;for(N=0;N<(F?Math.min(W,E[z].length):W);N++)O=F?E[z][N]:E,H=m[z][N],V=b[z][N],iu.validate(H,O)?V!==H&&V!==+H&&i.push(no("dynamic",a,v.concat(z,N),H,V)):i.push(no("value",a,v.concat(z,N),H))}else i.push(no("array",a,v.concat(z),m[z]));else for(z=0;z{"use strict";var rle=Bt(),Bx=Pd();function ale(e,t,r){var i=document.createElement("a"),a="download"in i,s=new Promise(function(l,f){var h,v;if(a)return h=Bx.createBlob(e,r),v=Bx.createObjectURL(h),i.href=v,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),Bx.revokeObjectURL(v),h=null,l(t);if(rle.isSafari()){var m=r==="svg"?",":";base64,";return Bx.octetStream(m+encodeURIComponent(e)),l(t)}f(new Error("download error"))});return s}wF.exports=ale});var C6=de((K_e,MF)=>{"use strict";var AF=Bt(),ile=k6(),nle=TF(),J_e=Pd();function ole(e,t){var r;return AF.isPlainObject(e)||(r=AF.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(i,a){r&&r._snapshotInProgress&&a(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var s=ile(e,t),l=t.filename||e.fn||"newplot";l+="."+t.format.replace("-","."),s.then(function(f){return r&&(r._snapshotInProgress=!1),nle(f,l,t.format)}).then(function(f){i(f)}).catch(function(f){r&&(r._snapshotInProgress=!1),a(f)})})}MF.exports=ole});var LF=de(E6=>{"use strict";var Gs=Bt(),Zs=Gs.isPlainObject,SF=M0(),kF=eo(),sle=ms(),CF=Di(),EF=rd().dfltConfig;E6.makeTemplate=function(e){e=Gs.isPlainObject(e)?e:Gs.getGraphDiv(e),e=Gs.extendDeep({_context:EF},{data:e.data,layout:e.layout}),kF.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach(function(S){var C={};qg(S,C,ule.bind(null,S));var P=Gs.coerce(S,{},sle,"type"),E=i.data[P];E||(E=i.data[P]=[]),E.push(C)}),qg(r,i.layout,lle.bind(null,r)),delete i.layout.template;var a=r.template;if(Zs(a)){var s=a.layout,l,f,h,v,m,b;Zs(s)&&Ox(s,i.layout);var T=a.data;if(Zs(T)){for(f in i.data)if(h=T[f],Array.isArray(h)){for(m=i.data[f],b=m.length,v=h.length,l=0;lI?l.push({code:"unused",traceType:S,templateCount:E,dataCount:I}):I>E&&l.push({code:"reused",traceType:S,templateCount:E,dataCount:I})}}function F(N,z){for(var O in N)if(O.charAt(0)!=="_"){var H=N[O],V=nu(N,O,z);Zs(H)?(Array.isArray(N)&&H._template===!1&&H.templateitemname&&l.push({code:"missing",path:V,templateitemname:H.templateitemname}),F(H,V)):Array.isArray(H)&&fle(H)&&F(H,V)}}if(F({data:h,layout:f},""),l.length)return l.map(cle)};function fle(e){for(var t=0;t{"use strict";var Xn=T6();Wi._doPlot=Xn._doPlot;Wi.newPlot=Xn.newPlot;Wi.restyle=Xn.restyle;Wi.relayout=Xn.relayout;Wi.redraw=Xn.redraw;Wi.update=Xn.update;Wi._guiRestyle=Xn._guiRestyle;Wi._guiRelayout=Xn._guiRelayout;Wi._guiUpdate=Xn._guiUpdate;Wi._storeDirectGUIEdit=Xn._storeDirectGUIEdit;Wi.react=Xn.react;Wi.extendTraces=Xn.extendTraces;Wi.prependTraces=Xn.prependTraces;Wi.addTraces=Xn.addTraces;Wi.deleteTraces=Xn.deleteTraces;Wi.moveTraces=Xn.moveTraces;Wi.purge=Xn.purge;Wi.addFrames=Xn.addFrames;Wi.deleteFrames=Xn.deleteFrames;Wi.animate=Xn.animate;Wi.setPlotConfig=Xn.setPlotConfig;var hle=Ey().getGraphDiv,vle=J2().eraseActiveShape;Wi.deleteActiveShape=function(e){return vle(hle(e))};Wi.toImage=k6();Wi.validate=bF();Wi.downloadImage=C6();var PF=LF();Wi.makeTemplate=PF.makeTemplate;Wi.validateTemplate=PF.validateTemplate});var IF=de((e2e,zF)=>{"use strict";var L6=Bt(),dle=la();zF.exports=function(t,r,i,a){var s=a("x"),l=a("y"),f,h=dle.getComponentMethod("calendars","handleTraceDefaults");if(h(t,r,["x","y"],i),s){var v=L6.minRowLength(s);l?f=Math.min(v,L6.minRowLength(l)):(f=v,a("y0"),a("dy"))}else{if(!l)return 0;f=L6.minRowLength(l),a("x0"),a("dx")}return r._length=f,f}});var NF=de((t2e,qF)=>{"use strict";var RF=Bt().dateTick0,ple=Hi(),mle=ple.ONEWEEK;function FF(e,t){return e%mle===0?RF(t,1):RF(t,0)}qF.exports=function(t,r,i,a,s){if(s||(s={x:!0,y:!0}),s.x){var l=a("xperiod");l&&(a("xperiod0",FF(l,r.xcalendar)),a("xperiodalignment"))}if(s.y){var f=a("yperiod");f&&(a("yperiod0",FF(f,r.ycalendar)),a("yperiodalignment"))}}});var UF=de((r2e,OF)=>{"use strict";var BF=["orientation","groupnorm","stackgaps"];OF.exports=function(t,r,i,a){var s=i._scatterStackOpts,l=a("stackgroup");if(l){var f=r.xaxis+r.yaxis,h=s[f];h||(h=s[f]={});var v=h[l],m=!1;v?v.traces.push(r):(v=h[l]={traceIndices:[],traces:[r]},m=!0);for(var b={orientation:r.x&&!r.y?"h":"v"},T=0;T{"use strict";var VF=Ua(),HF=kf().hasColorscale,GF=hd(),yle=rs();ZF.exports=function(t,r,i,a,s,l){var f=yle.isBubble(t),h=(t.line||{}).color,v;if(l=l||{},h&&(i=h),s("marker.symbol"),s("marker.opacity",f?.7:1),s("marker.size"),l.noAngle||(s("marker.angle"),l.noAngleRef||s("marker.angleref"),l.noStandOff||s("marker.standoff")),s("marker.color",i),HF(t,"marker")&&GF(t,r,a,s,{prefix:"marker.",cLetter:"c"}),l.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),l.noLine||(h&&!Array.isArray(h)&&r.marker.color!==h?v=h:f?v=VF.background:v=VF.defaultLine,s("marker.line.color",v),HF(t,"marker.line")&&GF(t,r,a,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",f?1:0)),f&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),l.gradient){var m=s("marker.gradient.type");m!=="none"&&s("marker.gradient.color")}}});var D6=de((i2e,YF)=>{"use strict";var gle=Bt().isArrayOrTypedArray,_le=kf().hasColorscale,xle=hd();YF.exports=function(t,r,i,a,s,l){l||(l={});var f=(t.marker||{}).color;if(f&&f._inputArray&&(f=f._inputArray),s("line.color",i),_le(t,"line"))xle(t,r,a,s,{prefix:"line.",cLetter:"c"});else{var h=(gle(f)?!1:f)||i;s("line.color",h)}s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}});var XF=de((n2e,WF)=>{"use strict";WF.exports=function(t,r,i){var a=i("line.shape");a==="spline"&&i("line.smoothing")}});var z6=de((o2e,jF)=>{"use strict";var ble=Bt();jF.exports=function(e,t,r,i,a){a=a||{},i("textposition"),ble.coerceFont(i,"textfont",a.font||r.font,a),a.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}});var I6=de((s2e,KF)=>{"use strict";var Vx=Ua(),JF=Bt().isArrayOrTypedArray;function wle(e){for(var t=Vx.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var QF=Bt(),Tle=la(),Ale=kc(),Mle=dx(),em=rs(),Sle=IF(),kle=NF(),Cle=UF(),Ele=P6(),Lle=D6(),$F=XF(),Ple=z6(),Dle=I6(),zle=Bt().coercePattern;eq.exports=function(t,r,i,a){function s(S,C){return QF.coerce(t,r,Ale,S,C)}var l=Sle(t,r,a,s);if(l||(r.visible=!1),!!r.visible){kle(t,r,a,s),s("xhoverformat"),s("yhoverformat"),s("zorder");var f=Cle(t,r,a,s);a.scattermode==="group"&&r.orientation===void 0&&s("orientation","v");var h=!f&&l{"use strict";var Ile=ug().getAxisGroup;rq.exports=function(t,r,i,a,s){var l=r.orientation,f=r[{v:"x",h:"y"}[l]+"axis"],h=Ile(i,f)+l,v=i._alignmentOpts||{},m=a("alignmentgroup"),b=v[h];b||(b=v[h]={});var T=b[m];T?T.traces.push(r):T=b[m]={traces:[r],alignmentIndex:Object.keys(b).length,offsetGroups:{}};var S=a("offsetgroup")||"",C=T.offsetGroups,P=C[S];r._offsetIndex=0,(s!=="group"||S)&&(P||(P=C[S]={offsetIndex:Object.keys(C).length}),r._offsetIndex=P.offsetIndex)}});var nq=de((f2e,iq)=>{"use strict";var Rle=Bt(),Fle=aq(),qle=kc();iq.exports=function(t,r){var i,a,s,l=r.scattermode;function f(T){return Rle.coerce(a._input,a,qle,T)}if(r.scattermode==="group")for(s=0;s=0;m--){var b=t[m];if(b.type==="scatter"&&b.xaxis===h.xaxis&&b.yaxis===h.yaxis){b.opacity=void 0;break}}}}}});var sq=de((c2e,oq)=>{"use strict";var Nle=Bt(),Ble=z_();oq.exports=function(e,t){function r(a,s){return Nle.coerce(e,t,Ble,a,s)}var i=t.barmode==="group";t.scattermode==="group"&&r("scattergap",i?t.bargap:.2)}});var fq=de((h2e,uq)=>{"use strict";var Ole=Da(),lq=Bt(),Ule=lq.dateTime2ms,Hx=lq.incrementMonth,Vle=Hi(),Hle=Vle.ONEAVGMONTH;uq.exports=function(t,r,i,a){if(r.type!=="date")return{vals:a};var s=t[i+"periodalignment"];if(!s)return{vals:a};var l=t[i+"period"],f;if(Ole(l)){if(l=+l,l<=0)return{vals:a}}else if(typeof l=="string"&&l.charAt(0)==="M"){var h=+l.substring(1);if(h>0&&Math.round(h)===h)f=h;else return{vals:a}}for(var v=r.calendar,m=s==="start",b=s==="end",T=t[i+"period0"],S=Ule(T,v)||0,C=[],P=[],E=[],I=a.length,F=0;FN;)H=Hx(H,-f,v);for(;H<=N;)H=Hx(H,f,v);O=Hx(H,-f,v)}else{for(z=Math.round((N-S)/l),H=S+z*l;H>N;)H-=l;for(;H<=N;)H+=l;O=H-l}C[F]=m?O:b?H:(O+H)/2,P[F]=O,E[F]=H}return{vals:C,starts:P,ends:E}}});var q6=de((v2e,hq)=>{"use strict";var R6=kf().hasColorscale,F6=Hy(),cq=rs();hq.exports=function(t,r){cq.hasLines(r)&&R6(r,"line")&&F6(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),cq.hasMarkers(r)&&(R6(r,"marker")&&F6(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),R6(r,"marker.line")&&F6(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Ng=de((d2e,vq)=>{"use strict";var dn=Bt();vq.exports=function(t,r){for(var i=0;i{"use strict";var dq=Bt();pq.exports=function(t,r){dq.isArrayOrTypedArray(r.selectedpoints)&&dq.tagSelected(t,r)}});var V6=de((m2e,wq)=>{"use strict";var mq=Da(),B6=Bt(),Bg=Yi(),yq=fq(),N6=Hi().BADNUM,O6=rs(),Gle=q6(),Zle=Ng(),Yle=Gx();function Wle(e,t){var r=e._fullLayout,i=t._xA=Bg.getFromId(e,t.xaxis||"x","x"),a=t._yA=Bg.getFromId(e,t.yaxis||"y","y"),s=i.makeCalcdata(t,"x"),l=a.makeCalcdata(t,"y"),f=yq(t,i,"x",s),h=yq(t,a,"y",l),v=f.vals,m=h.vals,b=t._length,T=new Array(b),S=t.ids,C=U6(t,r,i,a),P=!1,E,I,F,N,z,O;xq(r,t);var H="x",V="y",W;if(C)B6.pushUnique(C.traceIndices,t.index),E=C.orientation==="v",E?(V="s",W="x"):(H="s",W="y"),z=C.stackgaps==="interpolate";else{var J=_q(t,b);gq(e,t,i,a,v,m,J)}var re=!!t.xperiodalignment,oe=!!t.yperiodalignment;for(I=0;II&&T[N].gap;)N--;for(O=T[N].s,F=T.length-1;F>N;F--)T[F].s=O;for(;I{"use strict";Tq.exports=Zx;var Xle=Bt().distinctVals;function Zx(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),a=[],s=0;s{"use strict";var ou=Da(),Wh=Bt().isArrayOrTypedArray,tm=Hi().BADNUM,jle=la(),Og=Yi(),Jle=ug().getAxisGroup,Yx=Aq();function Kle(e,t){for(var r=t.xaxis,i=t.yaxis,a=e._fullLayout,s=e._fullData,l=e.calcdata,f=[],h=[],v=0;vh+l||!ou(f))}for(var m=0;m{"use strict";var Lq=V6(),Pq=Eq().setGroupPositions;function uue(e,t){for(var r=t.xaxis,i=t.yaxis,a=e._fullLayout,s=e._fullData,l=e.calcdata,f=[],h=[],v=0;vJ[m]&&m{"use strict";var cue=_i(),qq=Hi(),Ug=qq.BADNUM,Nq=qq.LOG_CLIP,Iq=Nq+.5,Rq=Nq-.5,Wx=Bt(),hue=Wx.segmentsIntersect,Fq=Wx.constrain,X6=dx();Bq.exports=function(t,r){var i=r.trace||{},a=r.xaxis,s=r.yaxis,l=a.type==="log",f=s.type==="log",h=a._length,v=s._length,m=r.backoff,b=i.marker,T=r.connectGaps,S=r.baseTolerance,C=r.shape,P=C==="linear",E=i.fill&&i.fill!=="none",I=[],F=X6.minTolerance,N=t.length,z=new Array(N),O=0,H,V,W,J,re,oe,ne,fe,ve,Ce,Se,Te,pe,Ae,Me,Le;function Ke(Pt){var Fe=t[Pt];if(!Fe)return!1;var Ge=r.linearized?a.l2p(Fe.x):a.c2p(Fe.x),bt=r.linearized?s.l2p(Fe.y):s.c2p(Fe.y);if(Ge===Ug){if(l&&(Ge=a.c2p(Fe.x,!0)),Ge===Ug)return!1;f&&bt===Ug&&(Ge*=Math.abs(a._m*v*(a._m>0?Iq:Rq)/(s._m*h*(s._m>0?Iq:Rq)))),Ge*=1e3}if(bt===Ug){if(f&&(bt=s.c2p(Fe.y,!0)),bt===Ug)return!1;bt*=1e3}return[Ge,bt]}function ht(Pt,Fe,Ge,bt){var dt=Ge-Pt,gr=bt-Fe,Er=.5-Pt,Tr=.5-Fe,Hr=dt*dt+gr*gr,_a=dt*Er+gr*Tr;if(_a>0&&_a1||Math.abs(Er.y-Ge[0][1])>1)&&(Er=[Er.x,Er.y],bt&&_t(Er,Pt)<_t(Ge[0],Pt)?Ge.unshift(Er):Ge.push(Er),bt++)}return Ge}function Rt(Pt){if(Pt[0]kt||Pt[1]ge)return[Fq(Pt[0],At,kt),Fq(Pt[1],pt,ge)]}function Ut(Pt,Fe){if(Pt[0]===Fe[0]&&(Pt[0]===At||Pt[0]===kt)||Pt[1]===Fe[1]&&(Pt[1]===pt||Pt[1]===ge))return!0}function xt(Pt,Fe){var Ge=[],bt=Rt(Pt),dt=Rt(Fe);return bt&&dt&&Ut(bt,dt)||(bt&&Ge.push(bt),dt&&Ge.push(dt)),Ge}function Et(Pt,Fe,Ge){return function(bt,dt){var gr=Rt(bt),Er=Rt(dt),Tr=[];if(gr&&Er&&Ut(gr,Er))return Tr;gr&&Tr.push(gr),Er&&Tr.push(Er);var Hr=2*Wx.constrain((bt[Pt]+dt[Pt])/2,Fe,Ge)-((gr||bt)[Pt]+(Er||dt)[Pt]);if(Hr){var _a;gr&&Er?_a=Hr>0==gr[Pt]>Er[Pt]?gr:Er:_a=gr||Er,_a[Pt]+=Hr}return Tr}}var ir;C==="linear"||C==="spline"?ir=Ct:C==="hv"||C==="vh"?ir=xt:C==="hvh"?ir=Et(0,At,kt):C==="vhv"&&(ir=Et(1,pt,ge));function Wt(Pt,Fe){var Ge=Fe[0]-Pt[0],bt=(Fe[1]-Pt[1])/Ge,dt=(Pt[1]*Fe[0]-Fe[1]*Pt[0])/Ge;return dt>0?[bt>0?At:kt,ge]:[bt>0?kt:At,pt]}function Be(Pt){var Fe=Pt[0],Ge=Pt[1],bt=Fe===z[O-1][0],dt=Ge===z[O-1][1];if(!(bt&&dt))if(O>1){var gr=Fe===z[O-2][0],Er=Ge===z[O-2][1];bt&&(Fe===At||Fe===kt)&&gr?Er?O--:z[O-1]=Pt:dt&&(Ge===pt||Ge===ge)&&Er?gr?O--:z[O-1]=Pt:z[O++]=Pt}else z[O++]=Pt}function ft(Pt){z[O-1][0]!==Pt[0]&&z[O-1][1]!==Pt[1]&&Be([vt,tt]),Be(Pt),Nt=null,vt=tt=0}var mt=Wx.isArrayOrTypedArray(b);function Ar(Pt){if(Pt&&m&&(Pt.i=H,Pt.d=t,Pt.trace=i,Pt.marker=mt?b[Pt.i]:b,Pt.backoff=m),it=Pt[0]/h,lt=Pt[1]/v,xe=Pt[0]kt?kt:0,et=Pt[1]ge?ge:0,xe||et){if(!O)z[O++]=[xe||Pt[0],et||Pt[1]];else if(Nt){var Fe=ir(Nt,Pt);Fe.length>1&&(ft(Fe[0]),z[O++]=Fe[1])}else Mt=ir(z[O-1],Pt)[0],z[O++]=Mt;var Ge=z[O-1];xe&&et&&(Ge[0]!==xe||Ge[1]!==et)?(Nt&&(vt!==xe&&tt!==et?Be(vt&&tt?Wt(Nt,Pt):[vt||xe,tt||et]):vt&&tt&&Be([vt,tt])),Be([xe,et])):vt-xe&&tt-et&&Be([xe||vt,et||tt]),Nt=Pt,vt=xe,tt=et}else Nt&&ft(ir(Nt,Pt)[0]),z[O++]=Pt}for(H=0;HHe(oe,dr))break;W=oe,pe=ve[0]*fe[0]+ve[1]*fe[1],pe>Se?(Se=pe,J=oe,ne=!1):pe=t.length||!oe)break;Ar(oe),V=oe}}Nt&&Be([vt||Nt[0],tt||Nt[1]]),I.push(z.slice(0,O))}var Tt=C.slice(C.length-1);if(m&&Tt!=="h"&&Tt!=="v"){for(var wt=!1,Vt=-1,Kt=[],Ht=0;Ht{"use strict";var Uq={tonextx:1,tonexty:1,tonext:1};Vq.exports=function(t,r,i){var a,s,l,f,h,v={},m=!1,b=-1,T=0,S=-1;for(s=0;s=0?h=S:(h=S=T,T++),h{"use strict";var Vu=ja(),vue=la(),Vg=Bt(),am=Vg.ensureSingle,Zq=Vg.identity,pn=_i(),im=rs(),due=Oq(),pue=Hq(),Xx=lx().tester;Yq.exports=function(t,r,i,a,s,l){var f,h,v=!s,m=!!s&&s.duration>0,b=pue(t,r,i);if(f=a.selectAll("g.trace").data(b,function(S){return S[0].trace.uid}),f.enter().append("g").attr("class",function(S){return"trace scatter trace"+S[0].trace.uid}).style("stroke-miterlimit",2),f.order(),mue(t,f,r),m){l&&(h=l());var T=Vu.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()});T.each(function(){a.selectAll("g.trace").each(function(S,C){Gq(t,C,r,S,b,this,s)})})}else f.each(function(S,C){Gq(t,C,r,S,b,this,s)});v&&f.exit().remove(),a.selectAll("path:not([d])").remove()};function mue(e,t,r){t.each(function(i){var a=am(Vu.select(this),"g","fills");pn.setClipUrl(a,r.layerClipId,e);var s=i[0].trace,l=[];s._ownfill&&l.push("_ownFill"),s._nexttrace&&l.push("_nextFill");var f=a.selectAll("g").data(l,Zq);f.enter().append("g"),f.exit().each(function(h){s[h]=null}).remove(),f.order().each(function(h){s[h]=am(Vu.select(this),"path","js-fill")})})}function Gq(e,t,r,i,a,s,l){var f=e._context.staticPlot,h;yue(e,t,r,i,a);var v=!!l&&l.duration>0;function m(Et){return v?Et.transition():Et}var b=r.xaxis,T=r.yaxis,S=i[0].trace,C=S.line,P=Vu.select(s),E=am(P,"g","errorbars"),I=am(P,"g","lines"),F=am(P,"g","points"),N=am(P,"g","text");if(vue.getComponentMethod("errorbars","plot")(e,E,r,l),S.visible!==!0)return;m(P).style("opacity",S.opacity);var z,O,H=S.fill.charAt(S.fill.length-1);H!=="x"&&H!=="y"&&(H="");var V,W;H==="y"?(V=1,W=T.c2p(0,!0)):H==="x"&&(V=0,W=b.c2p(0,!0)),i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=P;var J="",re=[],oe=S._prevtrace,ne=null,fe=null;oe&&(J=oe._prevRevpath||"",O=oe._nextFill,re=oe._ownPolygons,ne=oe._fillsegments,fe=oe._fillElement);var ve,Ce,Se="",Te="",pe,Ae,Me,Le,Ke,ht,it=[];S._polygons=[];var lt=[],He=[],_t=Vg.noop;if(z=S._ownFill,im.hasLines(S)||S.fill!=="none"){O&&O.datum(i),["hv","vh","hvh","vhv"].indexOf(C.shape)!==-1?(pe=pn.steps(C.shape),Ae=pn.steps(C.shape.split("").reverse().join(""))):C.shape==="spline"?pe=Ae=function(Et){var ir=Et[Et.length-1];return Et.length>1&&Et[0][0]===ir[0]&&Et[0][1]===ir[1]?pn.smoothclosed(Et.slice(1),C.smoothing):pn.smoothopen(Et,C.smoothing)}:pe=Ae=function(Et){return"M"+Et.join("L")},Me=function(Et){return Ae(Et.reverse())},He=due(i,{xaxis:b,yaxis:T,trace:S,connectGaps:S.connectgaps,baseTolerance:Math.max(C.width||1,3)/4,shape:C.shape,backoff:C.backoff,simplify:C.simplify,fill:S.fill}),lt=new Array(He.length);var at=0;for(h=0;h=f[0]&&P.x<=f[1]&&P.y>=h[0]&&P.y<=h[1]}),T=Math.ceil(b.length/m),S=0;a.forEach(function(P,E){var I=P[0].trace;im.hasMarkers(I)&&I.marker.maxdisplayed>0&&E{"use strict";Xq.exports={container:"marker",min:"cmin",max:"cmax"}});var Jq=de((A2e,jq)=>{"use strict";var jx=Yi();jq.exports=function(t,r,i){var a={},s={_fullLayout:i},l=jx.getFromTrace(s,r,"x"),f=jx.getFromTrace(s,r,"y"),h=t.orig_x;h===void 0&&(h=t.x);var v=t.orig_y;return v===void 0&&(v=t.y),a.xLabel=jx.tickText(l,l.c2l(h),!0).text,a.yLabel=jx.tickText(f,f.c2l(v),!0).text,a}});var $6=de((M2e,Kq)=>{"use strict";var J6=ja(),nm=_i(),gue=la();function _ue(e){var t=J6.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var i=J6.select(this),a=r.trace||r[0].trace;K6(i,a,e)}),t.selectAll("g.text").each(function(r){var i=J6.select(this),a=r.trace||r[0].trace;Q6(i,a,e)}),t.selectAll("g.trace path.js-line").call(nm.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nm.fillGroupStyle,e,!1),gue.getComponentMethod("errorbars","style")(t)}function K6(e,t,r){nm.pointStyle(e.selectAll("path.point"),t,r)}function Q6(e,t,r){nm.textPointStyle(e.selectAll("text"),t,r)}function xue(e,t,r){var i=t[0].trace;i.selectedpoints?(nm.selectedPointStyle(r.selectAll("path.point"),i),nm.selectedTextStyle(r.selectAll("text"),i)):(K6(r,i,e),Q6(r,i,e))}Kq.exports={style:_ue,stylePoints:K6,styleText:Q6,styleOnSelect:xue}});var eT=de((S2e,Qq)=>{"use strict";var om=Ua(),bue=rs();Qq.exports=function(t,r){var i,a;if(t.mode==="lines")return i=t.line.color,i&&om.opacity(i)?i:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var s=r.mcc||(t.marker||{}).color,l=r.mlcc||((t.marker||{}).line||{}).color;return a=s&&om.opacity(s)?s:l&&om.opacity(l)&&(r.mlw||((t.marker||{}).line||{}).width)?l:"",a?om.opacity(a)<.3?om.addOpacity(a,.3):a:(i=(t.line||{}).color,i&&om.opacity(i)&&bue.hasLines(t)&&t.line.width?i:t.fillcolor)}});var tN=de((k2e,eN)=>{"use strict";var Jx=Bt(),$q=Rf(),wue=la(),Tue=eT(),tT=Ua(),Aue=Jx.fillText;eN.exports=function(t,r,i,a){var s=t.cd,l=s[0].trace,f=t.xa,h=t.ya,v=f.c2p(r),m=h.c2p(i),b=[v,m],T=l.hoveron||"",S=l.mode.indexOf("markers")!==-1?3:.5,C=!!l.xperiodalignment,P=!!l.yperiodalignment;if(T.indexOf("points")!==-1){var E=function(Te){if(C){var pe=f.c2p(Te.xStart),Ae=f.c2p(Te.xEnd);return v>=Math.min(pe,Ae)&&v<=Math.max(pe,Ae)?0:1/0}var Me=Math.max(3,Te.mrc||0),Le=1-1/Me,Ke=Math.abs(f.c2p(Te.x)-v);return Ke=Math.min(pe,Ae)&&m<=Math.max(pe,Ae)?0:1/0}var Me=Math.max(3,Te.mrc||0),Le=1-1/Me,Ke=Math.abs(h.c2p(Te.y)-m);return Keit!=ge>=it&&(At=_t[He-1][0],kt=_t[He][0],ge-pt&&(at=At+(kt-At)*(it-pt)/(ge-pt),Me=Math.min(Me,at),Le=Math.max(Le,at)));return Me=Math.max(Me,0),Le=Math.min(Le,f._length),{x0:Me,x1:Le,y0:it,y1:it}}if(T.indexOf("fills")!==-1&&l._fillElement){var ve=ne(l._fillElement)&&!ne(l._fillExclusionElement);if(ve){var Ce=fe(l._polygons);Ce===null&&(Ce={x0:b[0],x1:b[0],y0:b[1],y1:b[1]});var Se=tT.defaultLine;return tT.opacity(l.fillcolor)?Se=l.fillcolor:tT.opacity((l.line||{}).color)&&(Se=l.line.color),Jx.extendFlat(t,{distance:t.maxHoverDistance,x0:Ce.x0,x1:Ce.x1,y0:Ce.y0,y1:Ce.y1,color:Se,hovertemplate:!1}),delete t.index,l.text&&!Jx.isArrayOrTypedArray(l.text)?t.text=String(l.text):t.text=l.name,[t]}}}});var iN=de((C2e,aN)=>{"use strict";var rN=rs();aN.exports=function(t,r){var i=t.cd,a=t.xaxis,s=t.yaxis,l=[],f=i[0].trace,h,v,m,b,T=!rN.hasMarkers(f)&&!rN.hasText(f);if(T)return[];if(r===!1)for(h=0;h{"use strict";nN.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var fN=de((L2e,uN)=>{"use strict";var Hg=la().traceIs,rT=T5();uN.exports=function(t,r,i,a){i("autotypenumbers",a.autotypenumbersDflt);var s=i("type",(a.splomStash||{}).type);s==="-"&&(Mue(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function Mue(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=i);var s=Sue(t,r,i);if(s){if(s.type==="histogram"&&i==={v:"y",h:"x"}[s.orientation||"v"]){e.type="linear";return}var l=i+"calendar",f=s[l],h={noMultiCategory:!Hg(s,"cartesian")||Hg(s,"noMultiCategory")};if(s.type==="box"&&s._hasPreCompStats&&i==={h:"x",v:"y"}[s.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=e.autotypenumbers,lN(s,i)){var v=sN(s),m=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(lN(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function sN(e){return{v:"x",h:"y"}[e.orientation||"v"]}function lN(e,t){var r=sN(e),i=Hg(e,"box-violin"),a=Hg(e._fullInput||{},"candlestick");return i&&!a&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var hN=de((P2e,cN)=>{"use strict";var kue=il().isTypedArraySpec;function Cue(e,t){var r=t.dataAttr||e._id.charAt(0),i={},a,s,l;if(t.axData)a=t.axData;else for(a=[],s=0;s0||kue(s),f;l&&(f="array");var h=i("categoryorder",f),v;h==="array"&&(v=i("categoryarray")),!l&&h==="array"&&(h=r.categoryorder="trace"),h==="trace"?r._initialCategories=[]:h==="array"?r._initialCategories=v.slice():(v=Cue(r,a).sort(),h==="category ascending"?r._initialCategories=v:h==="category descending"&&(r._initialCategories=v.reverse()))}}});var pN=de((D2e,dN)=>{"use strict";var vN=Tf().mix,Eue=Af(),Lue=Bt();dN.exports=function(t,r,i,a){a=a||{};var s=a.dfltColor;function l(V,W){return Lue.coerce2(t,r,a.attributes,V,W)}var f=l("linecolor",s),h=l("linewidth"),v=i("showline",a.showLine||!!f||!!h);v||(delete r.linecolor,delete r.linewidth);var m=vN(s,a.bgColor,a.blend||Eue.lightFraction).toRgbString(),b=l("gridcolor",m),T=l("gridwidth"),S=l("griddash"),C=i("showgrid",a.showGrid||!!b||!!T||!!S);if(C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var P=vN(r.gridcolor,a.bgColor,67).toRgbString(),E=l("minor.gridcolor",P),I=l("minor.gridwidth",r.gridwidth||1),F=l("minor.griddash",r.griddash||"solid"),N=i("minor.showgrid",!!E||!!I||!!F);N||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var z=l("zerolinecolor",s),O=l("zerolinewidth"),H=i("zeroline",a.showGrid||!!z||!!O);H||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var iT=de((z2e,bN)=>{"use strict";var mN=Da(),Pue=la(),Gg=Bt(),Due=Di(),zue=Wl(),aT=Ru(),yN=Yw(),gN=Xw(),Iue=Kw(),Rue=Qw(),Fue=hN(),que=pN(),Nue=H5(),_N=i2(),Kx=Ao().WEEKDAY_PATTERN,Bue=Ao().HOUR_PATTERN;bN.exports=function(t,r,i,a,s){var l=a.letter,f=a.font||{},h=a.splomStash||{},v=i("visible",!a.visibleDflt),m=r._template||{},b=r.type||m.type||"-",T;if(b==="date"){var S=Pue.getComponentMethod("calendars","handleDefaults");S(t,r,"calendar",a.calendar),a.noTicklabelmode||(T=i("ticklabelmode"))}!a.noTicklabelindex&&(b==="date"||b==="linear")&&i("ticklabelindex");var C="";(!a.noTicklabelposition||b==="multicategory")&&(C=Gg.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:T==="period"?["outside","inside"]:l==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||i("ticklabeloverflow",C.indexOf("inside")!==-1?"hide past domain":b==="category"||b==="multicategory"?"allow":"hide past div"),_N(r,s),Nue(t,r,i,a),Fue(t,r,i,a),b!=="category"&&!a.noHover&&i("hoverformat");var P=i("color"),E=P!==aT.color.dflt?P:f.color,I=h.label||s._dfltTitle[l];if(Rue(t,r,i,b,a),!v)return r;i("title.text",I),Gg.coerceFont(i,"title.font",f,{overrideDflt:{size:Gg.bigFont(f.size),color:E}}),yN(t,r,i,b);var F=a.hasMinor;if(F&&(Due.newContainer(r,"minor"),yN(t,r,i,b,{isMinor:!0})),Iue(t,r,i,b,a),gN(t,r,i,a),F){var N=a.isMinor;a.isMinor=!0,gN(t,r,i,a),a.isMinor=N}que(t,r,i,{dfltColor:P,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:F,attributes:aT}),F&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&i("mirror");var z=b==="multicategory";if(!a.noTickson&&(b==="category"||z)&&(r.ticks||r.showgrid)){var O;z&&(O="boundaries");var H=i("tickson",O);H==="boundaries"&&delete r.ticklabelposition}if(z){var V=i("showdividers");V&&(i("dividercolor"),i("dividerwidth"))}if(b==="date")if(zue(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Oue}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var W=0;W=2){var l="",f,h;if(s.length===2){for(f=0;f<2;f++)if(h=xN(s[f]),h){l=Kx;break}}var v=i("pattern",l);if(v===Kx)for(f=0;f<2;f++)h=xN(s[f]),h&&(t.bounds[f]=s[f]=h-1);if(v)for(f=0;f<2;f++)switch(h=s[f],v){case Kx:if(!mN(h)){t.enabled=!1;return}if(h=+h,h!==Math.floor(h)||h<0||h>=7){t.enabled=!1;return}t.bounds[f]=s[f]=h;break;case Bue:if(!mN(h)){t.enabled=!1;return}if(h=+h,h<0||h>24){t.enabled=!1;return}t.bounds[f]=s[f]=h;break}if(r.autorange===!1){var m=r.range;if(m[0]m[1]){t.enabled=!1;return}}else if(s[0]>m[0]&&s[1]{"use strict";var Vue=Da(),Qx=Bt();wN.exports=function(t,r,i,a){var s=a.counterAxes||[],l=a.overlayableAxes||[],f=a.letter,h=a.grid,v=a.overlayingDomain,m,b,T,S,C,P;h&&(b=h._domains[f][h._axisMap[r._id]],m=h._anchors[r._id],b&&(T=h[f+"side"].split(" ")[0],S=h.domain[f][T==="right"||T==="top"?1:0])),b=b||[0,1],m=m||(Vue(t.position)?"free":s[0]||"free"),T=T||(f==="x"?"bottom":"left"),S=S||0,C=0,P=!1;var E=Qx.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(s),dflt:m}},"anchor"),I=Qx.coerce(t,r,{side:{valType:"enumerated",values:f==="x"?["bottom","top"]:["left","right"],dflt:T}},"side");if(E==="free"){if(f==="y"){var F=i("autoshift");F&&(S=I==="left"?v[0]:v[1],P=r.automargin?r.automargin:!0,C=I==="left"?-3:3),i("shift",C)}i("position",S)}i("automargin",P);var N=!1;if(l.length&&(N=Qx.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(l),dflt:!1}},"overlaying")),!N){var z=i("domain",b);z[0]>z[1]-1/4096&&(r.domain=b),Qx.noneOrAll(t.domain,r.domain,b),r.tickmode==="sync"&&(r.tickmode="auto")}return i("layer"),r}});var PN=de((R2e,LN)=>{"use strict";var Id=Bt(),TN=Ua(),Hue=bc().isUnifiedHover,Gue=y4(),AN=Di(),Zue=d0(),MN=Ru(),Yue=fN(),SN=iT(),Wue=ug(),kN=nT(),sT=$n(),Uf=sT.id2name,CN=sT.name2id,Xue=Ao().AX_ID_PATTERN,EN=la(),$x=EN.traceIs,oT=EN.getComponentMethod;function eb(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}LN.exports=function(t,r,i){var a=r.autotypenumbers,s={},l={},f={},h={},v={},m={},b={},T={},S={},C={},P,E;for(P=0;P{"use strict";var jue=ja(),DN=la(),tb=Bt(),cl=_i(),rb=Yi();zN.exports=function(t,r,i,a){var s=t._fullLayout;if(r.length===0){rb.redrawComponents(t);return}function l(E){var I=E.xaxis,F=E.yaxis;s._defs.select("#"+E.clipId+"> rect").call(cl.setTranslate,0,0).call(cl.setScale,1,1),E.plot.call(cl.setTranslate,I._offset,F._offset).call(cl.setScale,1,1);var N=E.plot.selectAll(".scatterlayer .trace");N.selectAll(".point").call(cl.setPointGroupScale,1,1),N.selectAll(".textpoint").call(cl.setTextPointsScale,1,1),N.call(cl.hideOutsideRangePoints,E)}function f(E,I){var F=E.plotinfo,N=F.xaxis,z=F.yaxis,O=N._length,H=z._length,V=!!E.xr1,W=!!E.yr1,J=[];if(V){var re=tb.simpleMap(E.xr0,N.r2l),oe=tb.simpleMap(E.xr1,N.r2l),ne=re[1]-re[0],fe=oe[1]-oe[0];J[0]=(re[0]*(1-I)+I*oe[0]-re[0])/(re[1]-re[0])*O,J[2]=O*(1-I+I*fe/ne),N.range[0]=N.l2r(re[0]*(1-I)+I*oe[0]),N.range[1]=N.l2r(re[1]*(1-I)+I*oe[1])}else J[0]=0,J[2]=O;if(W){var ve=tb.simpleMap(E.yr0,z.r2l),Ce=tb.simpleMap(E.yr1,z.r2l),Se=ve[1]-ve[0],Te=Ce[1]-Ce[0];J[1]=(ve[1]*(1-I)+I*Ce[1]-ve[1])/(ve[0]-ve[1])*H,J[3]=H*(1-I+I*Te/Se),z.range[0]=N.l2r(ve[0]*(1-I)+I*Ce[0]),z.range[1]=z.l2r(ve[1]*(1-I)+I*Ce[1])}else J[1]=0,J[3]=H;rb.drawOne(t,N,{skipTitle:!0}),rb.drawOne(t,z,{skipTitle:!0}),rb.redrawComponents(t,[N._id,z._id]);var pe=V?O/J[2]:1,Ae=W?H/J[3]:1,Me=V?J[0]:0,Le=W?J[1]:0,Ke=V?J[0]/J[2]*O:0,ht=W?J[1]/J[3]*H:0,it=N._offset-Ke,lt=z._offset-ht;F.clipRect.call(cl.setTranslate,Me,Le).call(cl.setScale,1/pe,1/Ae),F.plot.call(cl.setTranslate,it,lt).call(cl.setScale,pe,Ae),cl.setPointGroupScale(F.zoomScalePts,1/pe,1/Ae),cl.setTextPointsScale(F.zoomScaleTxt,1/pe,1/Ae)}var h;a&&(h=a());function v(){for(var E={},I=0;Ii.duration?(v(),S=window.cancelAnimationFrame(P)):S=window.requestAnimationFrame(P)}return b=Date.now(),S=window.requestAnimationFrame(P),Promise.resolve()}});var lT=de(Oo=>{"use strict";var ib=ja(),RN=la(),Rd=Bt(),Jue=eo(),Kue=_i(),FN=F_().getModuleCalcData,Xh=$n(),Hu=Ao(),Que=zh(),oi=Rd.ensureSingle;function ab(e,t,r){return Rd.ensureSingle(e,t,r,function(i){i.datum(r)})}var Fd=Hu.zindexSeparator;Oo.name="cartesian";Oo.attr=["xaxis","yaxis"];Oo.idRoot=["x","y"];Oo.idRegex=Hu.idRegex;Oo.attrRegex=Hu.attrRegex;Oo.attributes=oN();Oo.layoutAttributes=Ru();Oo.supplyLayoutDefaults=PN();Oo.transitionAxes=IN();Oo.finalizeSubplots=function(e,t){var r=t._subplots,i=r.xaxis,a=r.yaxis,s=r.cartesian,l=s,f={},h={},v,m,b;for(v=0;v0){var S=T.id;if(S.indexOf(Fd)!==-1)continue;S+=Fd+(v+1),T=Rd.extendFlat({},T,{id:S,plot:a._cartesianlayer.selectAll(".subplot").select("."+S)})}for(var C=[],P,E=0;E1&&(O+=Fd+z),N.push(f+O),l=0;l1,b=t.mainplotinfo;if(!t.mainplot||m)if(v)t.xlines=oi(i,"path","xlines-above"),t.ylines=oi(i,"path","ylines-above"),t.xaxislayer=oi(i,"g","xaxislayer-above"),t.yaxislayer=oi(i,"g","yaxislayer-above");else{if(!l){var T=oi(i,"g","layer-subplot");t.shapelayer=oi(T,"g","shapelayer"),t.imagelayer=oi(T,"g","imagelayer"),b&&m?(t.minorGridlayer=b.minorGridlayer,t.gridlayer=b.gridlayer,t.zerolinelayer=b.zerolinelayer):(t.minorGridlayer=oi(i,"g","minor-gridlayer"),t.gridlayer=oi(i,"g","gridlayer"),t.zerolinelayer=oi(i,"g","zerolinelayer"));var S=oi(i,"g","layer-between");t.shapelayerBetween=oi(S,"g","shapelayer"),t.imagelayerBetween=oi(S,"g","imagelayer"),oi(i,"path","xlines-below"),oi(i,"path","ylines-below"),t.overlinesBelow=oi(i,"g","overlines-below"),oi(i,"g","xaxislayer-below"),oi(i,"g","yaxislayer-below"),t.overaxesBelow=oi(i,"g","overaxes-below")}t.overplot=oi(i,"g","overplot"),t.plot=oi(t.overplot,"g",a),l||(t.xlines=oi(i,"path","xlines-above"),t.ylines=oi(i,"path","ylines-above"),t.overlinesAbove=oi(i,"g","overlines-above"),oi(i,"g","xaxislayer-above"),oi(i,"g","yaxislayer-above"),t.overaxesAbove=oi(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+f),t.ylines=i.select(".ylines-"+h),t.xaxislayer=i.select(".xaxislayer-"+f),t.yaxislayer=i.select(".yaxislayer-"+h))}else{var C=b.plotgroup,P=a+"-x",E=a+"-y";t.minorGridlayer=b.minorGridlayer,t.gridlayer=b.gridlayer,t.zerolinelayer=b.zerolinelayer,oi(b.overlinesBelow,"path",P),oi(b.overlinesBelow,"path",E),oi(b.overaxesBelow,"g",P),oi(b.overaxesBelow,"g",E),t.plot=oi(b.overplot,"g",a),oi(b.overlinesAbove,"path",P),oi(b.overlinesAbove,"path",E),oi(b.overaxesAbove,"g",P),oi(b.overaxesAbove,"g",E),t.xlines=C.select(".overlines-"+f).select("."+P),t.ylines=C.select(".overlines-"+h).select("."+E),t.xaxislayer=C.select(".overaxes-"+f).select("."+P),t.yaxislayer=C.select(".overaxes-"+h).select("."+E)}l||(v||(ab(t.minorGridlayer,"g",t.xaxis._id),ab(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(I){return I[0]}).sort(Xh.idSort),ab(t.gridlayer,"g",t.xaxis._id),ab(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(I){return I[0]}).sort(Xh.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function BN(e,t){if(e){var r={};e.each(function(h){var v=h[0],m=ib.select(this);m.remove(),ON(v,t),r[v]=!0});for(var i in t._plots)for(var a=t._plots[i],s=a.overlays||[],l=0;l{"use strict";var nb=rs();UN.exports={hasLines:nb.hasLines,hasMarkers:nb.hasMarkers,hasText:nb.hasText,isBubble:nb.isBubble,attributes:kc(),layoutAttributes:z_(),supplyDefaults:tq(),crossTraceDefaults:nq(),supplyLayoutDefaults:sq(),calc:V6().calc,crossTraceCalc:zq(),arraysToCalcdata:Ng(),plot:Wq(),colorbar:j6(),formatLabels:Jq(),style:$6().style,styleOnSelect:$6().styleOnSelect,hoverPoints:tN(),selectPoints:iN(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:lT(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var ZN=de((B2e,GN)=>{"use strict";var efe=ja(),tfe=Ua(),HN=n6(),uT=Bt(),rfe=uT.strScale,afe=uT.strRotate,ife=uT.strTranslate;GN.exports=function(t,r,i){var a=t.node(),s=HN[i.arrowhead||0],l=HN[i.startarrowhead||0],f=(i.arrowwidth||1)*(i.arrowsize||1),h=(i.arrowwidth||1)*(i.startarrowsize||1),v=r.indexOf("start")>=0,m=r.indexOf("end")>=0,b=s.backoff*f+i.standoff,T=l.backoff*h+i.startstandoff,S,C,P,E;if(a.nodeName==="line"){S={x:+t.attr("x1"),y:+t.attr("y1")},C={x:+t.attr("x2"),y:+t.attr("y2")};var I=S.x-C.x,F=S.y-C.y;if(P=Math.atan2(F,I),E=P+Math.PI,b&&T&&b+T>Math.sqrt(I*I+F*F)){ve();return}if(b){if(b*b>I*I+F*F){ve();return}var N=b*Math.cos(P),z=b*Math.sin(P);C.x+=N,C.y+=z,t.attr({x2:C.x,y2:C.y})}if(T){if(T*T>I*I+F*F){ve();return}var O=T*Math.cos(P),H=T*Math.sin(P);S.x-=O,S.y-=H,t.attr({x1:S.x,y1:S.y})}}else if(a.nodeName==="path"){var V=a.getTotalLength(),W="";if(V{"use strict";var YN=ja(),fT=la(),nfe=eo(),Jh=Bt(),cT=Jh.strTranslate,Yg=Yi(),qd=Ua(),Ec=_i(),WN=Rf(),hT=co(),vT=Oh(),Zg=jl(),ofe=Di().arrayEditor,sfe=ZN();JN.exports={draw:lfe,drawOne:XN,drawRaw:jN};function lfe(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?dt="right":dt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[dt]}for(var pt=!1,ge=["x","y"],Re=0;Re1)&&(vt===et?(dr=tt.r2fraction(t["a"+xe]),(dr<0||dr>1)&&(pt=!0)):pt=!0),ir=tt._offset+tt.r2p(t[xe]),ft=.5}else{var Tt=Ar==="domain";xe==="x"?(Be=t[xe],ir=Tt?tt._offset+tt._length*Be:ir=f.l+f.w*Be):(Be=1-t[xe],ir=Tt?tt._offset+tt._length*Be:ir=f.t+f.h*Be),ft=t.showarrow?.5:Be}if(t.showarrow){Et.head=ir;var wt=t["a"+xe];if(mt=Mt*kt(.5,t.xanchor)-Ct*kt(.5,t.yanchor),vt===et){var Vt=Yg.getRefType(vt);Vt==="domain"?(xe==="y"&&(wt=1-wt),Et.tail=tt._offset+tt._length*wt):Vt==="paper"?xe==="y"?(wt=1-wt,Et.tail=f.t+f.h*wt):Et.tail=f.l+f.w*wt:Et.tail=tt._offset+tt.r2p(wt),Wt=mt}else Et.tail=ir+wt,Wt=mt+wt;Et.text=Et.tail+mt;var Kt=l[xe==="x"?"width":"height"];if(et==="paper"&&(Et.head=Jh.constrain(Et.head,1,Kt-1)),vt==="pixel"){var Ht=-Math.max(Et.tail-3,Et.text),Ot=Math.min(Et.tail+3,Et.text)-Kt;Ht>0?(Et.tail+=Ht,Et.text+=Ht):Ot>0&&(Et.tail-=Ot,Et.text-=Ot)}Et.tail+=xt,Et.head+=xt}else mt=Rt*kt(ft,Ut),Wt=mt,Et.text=ir+mt;Et.text+=xt,mt+=xt,Wt+=xt,t["_"+xe+"padplus"]=Rt/2+Wt,t["_"+xe+"padminus"]=Rt/2-Wt,t["_"+xe+"size"]=Rt,t["_"+xe+"shift"]=mt}if(pt){V.remove();return}var er=0,Mr=0;if(t.align!=="left"&&(er=(He-it)*(t.align==="center"?.5:1)),t.valign!=="top"&&(Mr=(_t-lt)*(t.valign==="middle"?.5:1)),Ke)Le.select("svg").attr({x:re+er-1,y:re+Mr}).call(Ec.setClipUrl,ne?P:null,e);else{var xr=re+Mr-ht.top,Pt=re+er-ht.left;Se.call(hT.positionText,Pt,xr).call(Ec.setClipUrl,ne?P:null,e)}fe.select("rect").call(Ec.setRect,re,re,He,_t),oe.call(Ec.setRect,W/2,W/2,at-W,At-W),V.call(Ec.setTranslate,Math.round(E.x.text-at/2),Math.round(E.y.text-At/2)),N.attr({transform:"rotate("+I+","+E.x.text+","+E.y.text+")"});var Fe=function(bt,dt){F.selectAll(".annotation-arrow-g").remove();var gr=E.x.head,Er=E.y.head,Tr=E.x.tail+bt,Hr=E.y.tail+dt,_a=E.x.text+bt,ka=E.y.text+dt,Ea=Jh.rotationXYMatrix(I,_a,ka),Ri=Jh.apply2DTransform(Ea),Ki=Jh.apply2DTransform2(Ea),yn=+oe.attr("width"),Xi=+oe.attr("height"),jn=_a-.5*yn,En=jn+yn,Vi=ka-.5*Xi,pa=Vi+Xi,Gr=[[jn,Vi,jn,pa],[jn,pa,En,pa],[En,pa,En,Vi],[En,Vi,jn,Vi]].map(Ki);if(!Gr.reduce(function(Ve,yt){return Ve^!!Jh.segmentsIntersect(gr,Er,gr+1e6,Er+1e6,yt[0],yt[1],yt[2],yt[3])},!1)){Gr.forEach(function(Ve){var yt=Jh.segmentsIntersect(Tr,Hr,gr,Er,Ve[0],Ve[1],Ve[2],Ve[3]);yt&&(Tr=yt.x,Hr=yt.y)});var Qa=t.arrowwidth,Zr=t.arrowcolor,vi=t.arrowside,ya=F.append("g").style({opacity:qd.opacity(Zr)}).classed("annotation-arrow-g",!0),le=ya.append("path").attr("d","M"+Tr+","+Hr+"L"+gr+","+Er).style("stroke-width",Qa+"px").call(qd.stroke,qd.rgb(Zr));if(sfe(le,vi,t),h.annotationPosition&&le.node().parentNode&&!i){var ee=gr,se=Er;if(t.standoff){var ce=Math.sqrt(Math.pow(gr-Tr,2)+Math.pow(Er-Hr,2));ee+=t.standoff*(Tr-gr)/ce,se+=t.standoff*(Hr-Er)/ce}var Ee=ya.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Tr-ee)+","+(Hr-se),transform:cT(ee,se)}).style("stroke-width",Qa+6+"px").call(qd.stroke,"rgba(0,0,0,0)").call(qd.fill,"rgba(0,0,0,0)"),Ne,rt;Zg.init({element:Ee.node(),gd:e,prepFn:function(){var Ve=Ec.getTranslate(V);Ne=Ve.x,rt=Ve.y,a&&a.autorange&&T(a._name+".autorange",!0),s&&s.autorange&&T(s._name+".autorange",!0)},moveFn:function(Ve,yt){var Dt=Ri(Ne,rt),Ft=Dt[0]+Ve,tr=Dt[1]+yt;V.call(Ec.setTranslate,Ft,tr),S("x",jh(a,Ve,"x",f,t)),S("y",jh(s,yt,"y",f,t)),t.axref===t.xref&&S("ax",jh(a,Ve,"ax",f,t)),t.ayref===t.yref&&S("ay",jh(s,yt,"ay",f,t)),ya.attr("transform",cT(Ve,yt)),N.attr({transform:"rotate("+I+","+Ft+","+tr+")"})},doneFn:function(){fT.call("_guiRelayout",e,C());var Ve=document.querySelector(".js-notes-box-panel");Ve&&Ve.redraw(Ve.selectedObj)}})}}};if(t.showarrow&&Fe(0,0),z){var Ge;Zg.init({element:V.node(),gd:e,prepFn:function(){Ge=N.attr("transform")},moveFn:function(bt,dt){var gr="pointer";if(t.showarrow)t.axref===t.xref?S("ax",jh(a,bt,"ax",f,t)):S("ax",t.ax+bt),t.ayref===t.yref?S("ay",jh(s,dt,"ay",f.w,t)):S("ay",t.ay+dt),Fe(bt,dt);else{if(i)return;var Er,Tr;if(a)Er=jh(a,bt,"x",f,t);else{var Hr=t._xsize/f.w,_a=t.x+(t._xshift-t.xshift)/f.w-Hr/2;Er=Zg.align(_a+bt/f.w,Hr,0,1,t.xanchor)}if(s)Tr=jh(s,dt,"y",f,t);else{var ka=t._ysize/f.h,Ea=t.y-(t._yshift+t.yshift)/f.h-ka/2;Tr=Zg.align(Ea-dt/f.h,ka,0,1,t.yanchor)}S("x",Er),S("y",Tr),(!a||!s)&&(gr=Zg.getCursor(a?.5:Er,s?.5:Tr,t.xanchor,t.yanchor))}N.attr({transform:cT(bt,dt)+Ge}),vT(V,gr)},clickFn:function(bt,dt){t.captureevents&&e.emit("plotly_clickannotation",H(dt))},doneFn:function(){vT(V),fT.call("_guiRelayout",e,C());var bt=document.querySelector(".js-notes-box-panel");bt&&bt.redraw(bt.selectedObj)}})}}h.annotationText?Se.call(hT.makeEditable,{delegate:V,gd:e}).call(Te).on("edit",function(Ae){t.text=Ae,this.call(Te),S("text",Ae),a&&a.autorange&&T(a._name+".autorange",!0),s&&s.autorange&&T(s._name+".autorange",!0),fT.call("_guiRelayout",e,C())}):Se.call(Te)}});var rB=de((U2e,tB)=>{"use strict";var KN=Bt(),ufe=la(),QN=Di().arrayEditor;tB.exports={hasClickToShow:ffe,onClick:cfe};function ffe(e,t){var r=eB(e,t);return r.on.length>0||r.explicitOff.length>0}function cfe(e,t){var r=eB(e,t),i=r.on,a=r.off.concat(r.explicitOff),s={},l=e._fullLayout.annotations,f,h;if(i.length||a.length){for(f=0;f{"use strict";var dT=Bt(),sm=Ua();aB.exports=function(t,r,i,a){a("opacity");var s=a("bgcolor"),l=a("bordercolor"),f=sm.opacity(l);a("borderpad");var h=a("borderwidth"),v=a("showarrow");a("text",v?" ":i._dfltTitle.annotation),a("textangle"),dT.coerceFont(a,"font",i.font),a("width"),a("align");var m=a("height");if(m&&a("valign"),v){var b=a("arrowside"),T,S;b.indexOf("end")!==-1&&(T=a("arrowhead"),S=a("arrowsize")),b.indexOf("start")!==-1&&(a("startarrowhead",T),a("startarrowsize",S)),a("arrowcolor",f?r.bordercolor:sm.defaultLine),a("arrowwidth",(f&&h||1)*2),a("standoff"),a("startstandoff")}var C=a("hovertext"),P=i.hoverlabel||{};if(C){var E=a("hoverlabel.bgcolor",P.bgcolor||(sm.opacity(s)?sm.rgb(s):sm.defaultLine)),I=a("hoverlabel.bordercolor",P.bordercolor||sm.contrast(E)),F=dT.extendFlat({},P.font);F.color||(F.color=I),dT.coerceFont(a,"hoverlabel.font",F)}a("captureevents",!!C)}});var nB=de((H2e,iB)=>{"use strict";var mT=Bt(),Nd=Yi(),hfe=Wl(),vfe=pT(),dfe=Q0();iB.exports=function(t,r){hfe(t,r,{name:"annotations",handleItemDefaults:pfe})};function pfe(e,t,r){function i(N,z){return mT.coerce(e,t,dfe,N,z)}var a=i("visible"),s=i("clicktoshow");if(a||s){vfe(e,t,r,i);for(var l=t.showarrow,f=["x","y"],h=[-10,-30],v={_fullLayout:r},m=0;m<2;m++){var b=f[m],T=Nd.coerceRef(e,t,v,b,"","paper");if(T!=="paper"){var S=Nd.getFromId(v,T);S._annIndices.push(t._index)}if(Nd.coercePosition(t,v,i,T,b,.5),l){var C="a"+b,P=Nd.coerceRef(e,t,v,C,"pixel",["pixel","paper"]);P!=="pixel"&&P!==T&&(P=t[C]="pixel");var E=P==="pixel"?h[m]:.4;Nd.coercePosition(t,v,i,P,C,E)}i(b+"anchor"),i(b+"shift")}if(mT.noneOrAll(e,t,["x","y"]),l&&mT.noneOrAll(e,t,["ax","ay"]),s){var I=i("xclick"),F=i("yclick");t._xclick=I===void 0?t.x:Nd.cleanPosition(I,v,t.xref),t._yclick=F===void 0?t.y:Nd.cleanPosition(F,v,t.yref)}}}});var lB=de((G2e,sB)=>{"use strict";var yT=Bt(),Bd=Yi(),mfe=ob().draw;sB.exports=function(t){var r=t._fullLayout,i=yT.filterVisible(r.annotations);if(i.length&&t._fullData.length)return yT.syncOrAsync([mfe,yfe],t)};function yfe(e){var t=e._fullLayout;yT.filterVisible(t.annotations).forEach(function(r){var i=Bd.getFromId(e,r.xref),a=Bd.getFromId(e,r.yref),s=Bd.getRefType(r.xref),l=Bd.getRefType(r.yref);r._extremes={},s==="range"&&oB(r,i),l==="range"&&oB(r,a)})}function oB(e,t){var r=t._id,i=r.charAt(0),a=e[i],s=e["a"+i],l=e[i+"ref"],f=e["a"+i+"ref"],h=e["_"+i+"padplus"],v=e["_"+i+"padminus"],m={x:1,y:-1}[i]*e[i+"shift"],b=3*e.arrowsize*e.arrowwidth||0,T=b+m,S=b-m,C=3*e.startarrowsize*e.arrowwidth||0,P=C+m,E=C-m,I;if(f===l){var F=Bd.findExtremes(t,[t.r2c(a)],{ppadplus:T,ppadminus:S}),N=Bd.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(h,P),ppadminus:Math.max(v,E)});I={min:[F.min[0],N.min[0]],max:[F.max[0],N.max[0]]}}else P=s?P+s:P,E=s?E-s:E,I=Bd.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(h,T,P),ppadminus:Math.max(v,S,E)});e._extremes[r]=I}});var fB=de((Z2e,uB)=>{"use strict";var gfe=Da(),_fe=J1();uB.exports=function(t,r,i,a){r=r||{};var s=i==="log"&&r.type==="linear",l=i==="linear"&&r.type==="log";if(!(s||l))return;var f=t._fullLayout.annotations,h=r._id.charAt(0),v,m;function b(S){var C=v[S],P=null;s?P=_fe(C,r.range):P=Math.pow(10,C),gfe(P)||(P=null),a(m+S,P)}for(var T=0;T{"use strict";var gT=ob(),cB=rB();hB.exports={moduleType:"component",name:"annotations",layoutAttributes:Q0(),supplyLayoutDefaults:nB(),includeBasePlot:Sg()("annotations"),calcAutorange:lB(),draw:gT.draw,drawOne:gT.drawOne,drawRaw:gT.drawRaw,hasClickToShow:cB.hasClickToShow,onClick:cB.onClick,convertCoords:fB()}});var sb=de((W2e,dB)=>{"use strict";var Ni=Q0(),xfe=nl().overrideAll,bfe=Di().templatedArray;dB.exports=xfe(bfe("annotation",{visible:Ni.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ni.xanchor,xshift:Ni.xshift,yanchor:Ni.yanchor,yshift:Ni.yshift,text:Ni.text,textangle:Ni.textangle,font:Ni.font,width:Ni.width,height:Ni.height,opacity:Ni.opacity,align:Ni.align,valign:Ni.valign,bgcolor:Ni.bgcolor,bordercolor:Ni.bordercolor,borderpad:Ni.borderpad,borderwidth:Ni.borderwidth,showarrow:Ni.showarrow,arrowcolor:Ni.arrowcolor,arrowhead:Ni.arrowhead,startarrowhead:Ni.startarrowhead,arrowside:Ni.arrowside,arrowsize:Ni.arrowsize,startarrowsize:Ni.startarrowsize,arrowwidth:Ni.arrowwidth,standoff:Ni.standoff,startstandoff:Ni.startstandoff,hovertext:Ni.hovertext,hoverlabel:Ni.hoverlabel,captureevents:Ni.captureevents}),"calc","from-root")});var mB=de((X2e,pB)=>{"use strict";var _T=Bt(),wfe=Yi(),Tfe=Wl(),Afe=pT(),Mfe=sb();pB.exports=function(t,r,i){Tfe(t,r,{name:"annotations",handleItemDefaults:Sfe,fullLayout:i.fullLayout})};function Sfe(e,t,r,i){function a(f,h){return _T.coerce(e,t,Mfe,f,h)}function s(f){var h=f+"axis",v={_fullLayout:{}};return v._fullLayout[h]=r[h],wfe.coercePosition(t,v,a,f,f,.5)}var l=a("visible");l&&(Afe(e,t,i.fullLayout,a),s("x"),s("y"),s("z"),_T.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),_T.noneOrAll(e,t,["ax","ay"])))}});var xB=de((j2e,_B)=>{"use strict";var yB=Bt(),gB=Yi();_B.exports=function(t){for(var r=t.fullSceneLayout,i=r.annotations,a=0;a{"use strict";function xT(e,t){var r=[0,0,0,0],i,a;for(i=0;i<4;++i)for(a=0;a<4;++a)r[a]+=e[4*i+a]*t[i];return r}function Cfe(e,t){var r=xT(e.projection,xT(e.view,xT(e.model,[t[0],t[1],t[2],1])));return r}bB.exports=Cfe});var AB=de((K2e,TB)=>{"use strict";var Efe=ob().drawRaw,Lfe=wB(),Pfe=["x","y","z"];TB.exports=function(t){for(var r=t.fullSceneLayout,i=t.dataScale,a=r.annotations,s=0;s1){f=!0;break}}f?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=Lfe(t.glplot.cameraParams,[r.xaxis.r2l(l.x)*i[0],r.yaxis.r2l(l.y)*i[1],r.zaxis.r2l(l.z)*i[2]]),Efe(t.graphDiv,l,s,t.id,l._xa,l._ya))}}});var kB=de((Q2e,SB)=>{"use strict";var Dfe=la(),MB=Bt();SB.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:sb()}}},layoutAttributes:sb(),handleDefaults:mB(),includeBasePlot:zfe,convert:xB(),draw:AB()};function zfe(e,t){var r=Dfe.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,a=Object.keys(e),s=0;s{"use strict";var CB=Q0(),EB=qo(),LB=kc().line,Ife=hc().dash,Gu=hn().extendFlat,Rfe=Di().templatedArray,$2e=Mg(),lm=ms(),Ffe=Hl().shapeTexttemplateAttrs,qfe=f_();PB.exports=Rfe("shape",{visible:Gu({},lm.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Gu({},lm.legend,{editType:"calc+arraydraw"}),legendgroup:Gu({},lm.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Gu({},lm.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:EB({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Gu({},lm.legendrank,{editType:"calc+arraydraw"}),legendwidth:Gu({},lm.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:Gu({},CB.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:Gu({},CB.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:Gu({},LB.color,{editType:"arraydraw"}),width:Gu({},LB.width,{editType:"calc+arraydraw"}),dash:Gu({},Ife,{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:Ffe({},{keys:Object.keys(qfe)}),font:EB({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 IB=de((txe,zB)=>{"use strict";var Wg=Bt(),um=Yi(),Nfe=Wl(),Bfe=bT(),DB=Hh();zB.exports=function(t,r){Nfe(t,r,{name:"shapes",handleItemDefaults:Ufe})};function Ofe(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Ufe(e,t,r){function i(Ae,Me){return Wg.coerce(e,t,Bfe,Ae,Me)}t._isShape=!0;var a=i("visible");if(a){var s=i("showlegend");s&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),Wg.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var l=i("path"),f=l?"path":"rect",h=i("type",f),v=h!=="path";v&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var m=i("line.width");m&&(i("line.color"),i("line.dash"));for(var b=i("xsizemode"),T=i("ysizemode"),S=["x","y"],C=0;C<2;C++){var P=S[C],E=P+"anchor",I=P==="x"?b:T,F={_fullLayout:r},N,z,O,H=um.coerceRef(e,t,F,P,void 0,"paper"),V=um.getRefType(H);if(V==="range"?(N=um.getFromId(F,H),N._shapeIndices.push(t._index),O=DB.rangeToShapePosition(N),z=DB.shapePositionToRange(N),(N.type==="category"||N.type==="multicategory")&&(i(P+"0shift"),i(P+"1shift"))):z=O=Wg.identity,v){var W=.25,J=.75,re=P+"0",oe=P+"1",ne=e[re],fe=e[oe];e[re]=z(e[re],!0),e[oe]=z(e[oe],!0),I==="pixel"?(i(re,0),i(oe,10)):(um.coercePosition(t,F,i,H,re,W),um.coercePosition(t,F,i,H,oe,J)),t[re]=O(t[re]),t[oe]=O(t[oe]),e[re]=ne,e[oe]=fe}if(I==="pixel"){var ve=e[E];e[E]=z(e[E],!0),um.coercePosition(t,F,i,H,E,.25),t[E]=O(t[E]),e[E]=ve}}v&&Wg.noneOrAll(e,t,["x0","x1","y0","y1"]);var Ce=h==="line",Se,Te;if(v&&(Se=i("label.texttemplate")),Se||(Te=i("label.text")),Te||Se){i("label.textangle");var pe=i("label.textposition",Ce?"middle":"middle center");i("label.xanchor"),i("label.yanchor",Ofe(Ce,pe)),i("label.padding"),Wg.coerceFont(i,"label.font",r.font)}}}});var qB=de((rxe,FB)=>{"use strict";var Vfe=Ua(),RB=Bt();function Hfe(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}FB.exports=function(t,r,i){i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),RB.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity");var a=i("newshape.line.width");if(a){var s=(t||{}).plot_bgcolor||"#FFF";i("newshape.line.color",Vfe.contrast(s)),i("newshape.line.dash")}var l=t.dragmode==="drawline",f=i("newshape.label.text"),h=i("newshape.label.texttemplate");if(f||h){i("newshape.label.textangle");var v=i("newshape.label.textposition",l?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",Hfe(l,v)),i("newshape.label.padding"),RB.coerceFont(i,"newshape.label.font",r.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}});var VB=de((axe,UB)=>{"use strict";var wT=Bt(),fm=Yi(),cm=ng(),BB=Hh();UB.exports=function(t){var r=t._fullLayout,i=wT.filterVisible(r.shapes);if(!(!i.length||!t._fullData.length))for(var a=0;a0?v+l:l;return{ppad:l,ppadplus:f?b:T,ppadminus:f?T:b}}else return{ppad:l}}function NB(e,t,r){var i=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",s,l,f=0,h=0,v=a?e.r2c:e.d2c,m=t[i+"sizemode"]==="scaled";if(m?(s=t[i+"0"],l=t[i+"1"],a&&(f=t[i+"0shift"],h=t[i+"1shift"])):(s=t[i+"anchor"],l=t[i+"anchor"]),s!==void 0)return[v(s)+f,v(l)+h];if(t.path){var b=1/0,T=-1/0,S=t.path.match(cm.segmentRE),C,P,E,I,F;for(e.type==="date"&&(v=BB.decodeDate(v)),C=0;CT&&(T=F)));if(T>=b)return[b,T]}}});var ZB=de((ixe,GB)=>{"use strict";var HB=J2();GB.exports={moduleType:"component",name:"shapes",layoutAttributes:bT(),supplyLayoutDefaults:IB(),supplyDrawNewShapeDefaults:qB(),includeBasePlot:Sg()("shapes"),calcAutorange:VB(),draw:HB.draw,drawOne:HB.drawOne}});var TT=de((oxe,WB)=>{"use strict";var YB=Ao(),Yfe=Di().templatedArray,nxe=Mg();WB.exports=Yfe("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",YB.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",YB.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var jB=de((sxe,XB)=>{"use strict";var Wfe=Bt(),AT=Yi(),Xfe=Wl(),jfe=TT(),Jfe="images";XB.exports=function(t,r){var i={name:Jfe,handleItemDefaults:Kfe};Xfe(t,r,i)};function Kfe(e,t,r){function i(T,S){return Wfe.coerce(e,t,jfe,T,S)}var a=i("source"),s=i("visible",!!a);if(!s)return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var l={_fullLayout:r},f=["x","y"],h=0;h<2;h++){var v=f[h],m=AT.coerceRef(e,t,l,v,"paper",void 0);if(m!=="paper"){var b=AT.getFromId(l,m);b._imgIndices.push(t._index)}AT.coercePosition(t,l,i,m,v,0)}return t}});var $B=de((lxe,QB)=>{"use strict";var JB=ja(),Qfe=_i(),hm=Yi(),KB=$n(),$fe=zh();QB.exports=function(t){var r=t._fullLayout,i=[],a={},s=[],l,f;for(f=0;f{"use strict";var eO=Da(),ece=J1();tO.exports=function(t,r,i,a){r=r||{};var s=i==="log"&&r.type==="linear",l=i==="linear"&&r.type==="log";if(s||l){for(var f=t._fullLayout.images,h=r._id.charAt(0),v,m,b=0;b{"use strict";aO.exports={moduleType:"component",name:"images",layoutAttributes:TT(),supplyLayoutDefaults:jB(),includeBasePlot:Sg()("images"),draw:$B(),convertCoords:rO()}});var lb=de((cxe,nO)=>{"use strict";nO.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 MT=de((hxe,sO)=>{"use strict";var tce=qo(),rce=Af(),ace=hn().extendFlat,ice=nl().overrideAll,nce=c_(),oO=Di().templatedArray,oce=oO("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}});sO.exports=ice(oO("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:oce,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:ace(nce({editType:"arraydraw"}),{}),font:tce({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:rce.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var cO=de((vxe,fO)=>{"use strict";var ub=Bt(),lO=Wl(),uO=MT(),sce=lb(),lce=sce.name,uce=uO.buttons;fO.exports=function(t,r){var i={name:lce,handleItemDefaults:fce};lO(t,r,i)};function fce(e,t,r){function i(l,f){return ub.coerce(e,t,uO,l,f)}var a=lO(e,t,{name:"buttons",handleItemDefaults:cce}),s=i("visible",a.length>0);s&&(i("active"),i("direction"),i("type"),i("showactive"),i("x"),i("y"),ub.noneOrAll(e,t,["x","y"]),i("xanchor"),i("yanchor"),i("pad.t"),i("pad.r"),i("pad.b"),i("pad.l"),ub.coerceFont(i,"font",r.font),i("bgcolor",r.paper_bgcolor),i("bordercolor"),i("borderwidth"))}function cce(e,t){function r(a,s){return ub.coerce(e,t,uce,a,s)}var i=r("visible",e.method==="skip"||Array.isArray(e.args));i&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var dO=de((dxe,vO)=>{"use strict";vO.exports=rn;var Zu=ja(),hO=Ua(),vm=_i(),fb=Bt();function rn(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})}rn.barWidth=2;rn.barLength=20;rn.barRadius=2;rn.barPad=1;rn.barColor="#808BA4";rn.prototype.enable=function(t,r,i){var a=this.gd._fullLayout,s=a.width,l=a.height;this.position=t;var f=this.position.l,h=this.position.w,v=this.position.t,m=this.position.h,b=this.position.direction,T=b==="down",S=b==="left",C=b==="right",P=b==="up",E=h,I=m,F,N,z,O;!T&&!S&&!C&&!P&&(this.position.direction="down",T=!0);var H=T||P;H?(F=f,N=F+E,T?(z=v,O=Math.min(z+I,l),I=O-z):(O=v+I,z=Math.max(O-I,0),I=O-z)):(z=v,O=z+I,S?(N=f+E,F=Math.max(N-E,0),E=N-F):(F=f,N=Math.min(F+E,s),E=N-F)),this._box={l:F,t:z,w:E,h:I};var V=h>E,W=rn.barLength+2*rn.barPad,J=rn.barWidth+2*rn.barPad,re=f,oe=v+m;oe+J>l&&(oe=l-J);var ne=this.container.selectAll("rect.scrollbar-horizontal").data(V?[0]:[]);ne.exit().on(".drag",null).remove(),ne.enter().append("rect").classed("scrollbar-horizontal",!0).call(hO.fill,rn.barColor),V?(this.hbar=ne.attr({rx:rn.barRadius,ry:rn.barRadius,x:re,y:oe,width:W,height:J}),this._hbarXMin=re+W/2,this._hbarTranslateMax=E-W):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var fe=m>I,ve=rn.barWidth+2*rn.barPad,Ce=rn.barLength+2*rn.barPad,Se=f+h,Te=v;Se+ve>s&&(Se=s-ve);var pe=this.container.selectAll("rect.scrollbar-vertical").data(fe?[0]:[]);pe.exit().on(".drag",null).remove(),pe.enter().append("rect").classed("scrollbar-vertical",!0).call(hO.fill,rn.barColor),fe?(this.vbar=pe.attr({rx:rn.barRadius,ry:rn.barRadius,x:Se,y:Te,width:ve,height:Ce}),this._vbarYMin=Te+Ce/2,this._vbarTranslateMax=I-Ce):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Ae=this.id,Me=F-.5,Le=fe?N+ve+.5:N+.5,Ke=z-.5,ht=V?O+J+.5:O+.5,it=a._topdefs.selectAll("#"+Ae).data(V||fe?[0]:[]);if(it.exit().remove(),it.enter().append("clipPath").attr("id",Ae).append("rect"),V||fe?(this._clipRect=it.select("rect").attr({x:Math.floor(Me),y:Math.floor(Ke),width:Math.ceil(Le)-Math.floor(Me),height:Math.ceil(ht)-Math.floor(Ke)}),this.container.call(vm.setClipUrl,Ae,this.gd),this.bg.attr({x:f,y:v,width:h,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vm.setClipUrl,null),delete this._clipRect),V||fe){var lt=Zu.behavior.drag().on("dragstart",function(){Zu.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(lt);var He=Zu.behavior.drag().on("dragstart",function(){Zu.event.sourceEvent.preventDefault(),Zu.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));V&&this.hbar.on(".drag",null).call(He),fe&&this.vbar.on(".drag",null).call(He)}this.setTranslate(r,i)};rn.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vm.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)};rn.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Zu.event.dx),this.vbar&&(r-=Zu.event.dy),this.setTranslate(t,r)};rn.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Zu.event.deltaY),this.vbar&&(r+=Zu.event.deltaY),this.setTranslate(t,r)};rn.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var i=t+this._hbarXMin,a=i+this._hbarTranslateMax,s=fb.constrain(Zu.event.x,i,a),l=(s-i)/(a-i),f=this.position.w-this._box.w;t=l*f}if(this.vbar){var h=r+this._vbarYMin,v=h+this._vbarTranslateMax,m=fb.constrain(Zu.event.y,h,v),b=(m-h)/(v-h),T=this.position.h-this._box.h;r=b*T}this.setTranslate(t,r)};rn.prototype.setTranslate=function(t,r){var i=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=fb.constrain(t||0,0,i),r=fb.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(vm.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 s=t/i;this.hbar.call(vm.setTranslate,t+s*this._hbarTranslateMax,r)}if(this.vbar){var l=r/a;this.vbar.call(vm.setTranslate,t,r+l*this._vbarTranslateMax)}}});var AO=de((pxe,TO)=>{"use strict";var dm=ja(),Xg=eo(),jg=Ua(),pm=_i(),hl=Bt(),cb=co(),hce=Di().arrayEditor,mO=ts().LINE_SPACING,aa=lb(),vce=dO();TO.exports=function(t){var r=t._fullLayout,i=hl.filterVisible(r[aa.name]);function a(T){Xg.autoMargin(t,bO(T))}var s=r._menulayer.selectAll("g."+aa.containerClassName).data(i.length>0?[0]:[]);if(s.enter().append("g").classed(aa.containerClassName,!0).style("cursor","pointer"),s.exit().each(function(){dm.select(this).selectAll("g."+aa.headerGroupClassName).each(a)}).remove(),i.length!==0){var l=s.selectAll("g."+aa.headerGroupClassName).data(i,dce);l.enter().append("g").classed(aa.headerGroupClassName,!0);for(var f=hl.ensureSingle(s,"g",aa.dropdownButtonGroupClassName,function(T){T.style("pointer-events","all")}),h=0;h{"use strict";var bce=lb();MO.exports={moduleType:"component",name:bce.name,layoutAttributes:MT(),supplyLayoutDefaults:cO(),draw:AO()}});var Kg=de((yxe,kO)=>{"use strict";kO.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 ET=de((gxe,LO)=>{"use strict";var CO=qo(),wce=c_(),Tce=hn().extendDeepAll,Ace=nl().overrideAll,Mce=Ly(),EO=Di().templatedArray,Od=Kg(),Sce=EO("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}});LO.exports=Ace(EO("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Sce,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:Tce(wce({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:Mce.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:CO({})},font:CO({}),activebgcolor:{valType:"color",dflt:Od.gripBgActiveColor},bgcolor:{valType:"color",dflt:Od.railBgColor},bordercolor:{valType:"color",dflt:Od.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Od.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Od.tickLength},tickcolor:{valType:"color",dflt:Od.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Od.minorTickLength}}),"arraydraw","from-root")});var IO=de((_xe,zO)=>{"use strict";var mm=Bt(),PO=Wl(),DO=ET(),kce=Kg(),Cce=kce.name,Ece=DO.steps;zO.exports=function(t,r){PO(t,r,{name:Cce,handleItemDefaults:Lce})};function Lce(e,t,r){function i(b,T){return mm.coerce(e,t,DO,b,T)}for(var a=PO(e,t,{name:"steps",handleItemDefaults:Pce}),s=0,l=0;l{"use strict";var Yu=ja(),hb=eo(),Kh=Ua(),Wu=_i(),vl=Bt(),Dce=vl.strTranslate,Qg=co(),zce=Di().arrayEditor,ba=Kg(),DT=ts(),qO=DT.LINE_SPACING,LT=DT.FROM_TL,PT=DT.FROM_BR;HO.exports=function(t){var r=t._context.staticPlot,i=t._fullLayout,a=Ice(i,t),s=i._infolayer.selectAll("g."+ba.containerClassName).data(a.length>0?[0]:[]);s.enter().append("g").classed(ba.containerClassName,!0).style("cursor",r?null:"ew-resize");function l(m){m._commandObserver&&(m._commandObserver.remove(),delete m._commandObserver),hb.autoMargin(t,NO(m))}if(s.exit().each(function(){Yu.select(this).selectAll("g."+ba.groupClassName).each(l)}).remove(),a.length!==0){var f=s.selectAll("g."+ba.groupClassName).data(a,Rce);f.enter().append("g").classed(ba.groupClassName,!0),f.exit().each(l).remove();for(var h=0;h0&&(f=f.transition().duration(t.transition.duration).ease(t.transition.easing)),f.attr("transform",Dce(l-ba.gripWidth*.5,t._dims.currentValueTotalHeight))}}function zT(e,t){var r=e._dims;return r.inputAreaStart+ba.stepInset+(r.inputAreaLength-2*ba.stepInset)*Math.min(1,Math.max(0,t))}function FO(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-ba.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*ba.stepInset-2*r.inputAreaStart)))}function Vce(e,t,r){var i=r._dims,a=vl.ensureSingle(e,"rect",ba.railTouchRectClass,function(s){s.call(UO,t,e,r).style("pointer-events","all")});a.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,ba.tickOffset+r.ticklen+i.labelHeight)}).call(Kh.fill,r.bgcolor).attr("opacity",0),Wu.setTranslate(a,0,i.currentValueTotalHeight)}function Hce(e,t){var r=t._dims,i=r.inputAreaLength-ba.railInset*2,a=vl.ensureSingle(e,"rect",ba.railRectClass);a.attr({width:i,height:ba.railWidth,rx:ba.railRadius,ry:ba.railRadius,"shape-rendering":"crispEdges"}).call(Kh.stroke,t.bordercolor).call(Kh.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Wu.setTranslate(a,ba.railInset,(r.inputAreaWidth-ba.railWidth)*.5+r.currentValueTotalHeight)}});var YO=de((bxe,ZO)=>{"use strict";var Gce=Kg();ZO.exports={moduleType:"component",name:Gce.name,layoutAttributes:ET(),supplyLayoutDefaults:IO(),draw:GO()}});var db=de((wxe,XO)=>{"use strict";var WO=Af();XO.exports={bgcolor:{valType:"color",dflt:WO.background,editType:"plot"},bordercolor:{valType:"color",dflt:WO.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 IT=de((Txe,jO)=>{"use strict";jO.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 pb=de((Axe,JO)=>{"use strict";JO.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 $O=de(yb=>{"use strict";var Zce=$n(),Yce=co(),KO=pb(),Wce=ts().LINE_SPACING,mb=KO.name;function QO(e){var t=e&&e[mb];return t&&t.visible}yb.isVisible=QO;yb.makeData=function(e){for(var t=Zce.list({_fullLayout:e},"x",!0),r=e.margin,i=[],a=0;a{"use strict";var gb=Bt(),eU=Di(),tU=$n(),Xce=db(),jce=IT();rU.exports=function(t,r,i){var a=t[i],s=r[i];if(!(a.rangeslider||r._requestRangeslider[s._id]))return;gb.isPlainObject(a.rangeslider)||(a.rangeslider={});var l=a.rangeslider,f=eU.newContainer(s,"rangeslider");function h(O,H){return gb.coerce(l,f,Xce,O,H)}var v,m;function b(O,H){return gb.coerce(v,m,jce,O,H)}var T=h("visible");if(T){h("bgcolor",r.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!s.isValidRange(l.range)),h("range");var S=r._subplots;if(S)for(var C=S.cartesian.filter(function(O){return O.substr(0,O.indexOf("y"))===tU.name2id(i)}).map(function(O){return O.substr(O.indexOf("y"),O.length)}),P=gb.simpleMap(C,tU.id2name),E=0;E{"use strict";var Jce=$n().list,Kce=Xy().getAutoRange,Qce=pb();iU.exports=function(t){for(var r=Jce(t,"x",!0),i=0;i{"use strict";var _b=ja(),$ce=la(),ehe=eo(),mn=Bt(),xb=mn.strTranslate,sU=_i(),Qh=Ua(),the=Yy(),rhe=lT(),RT=$n(),ahe=jl(),ihe=Oh(),Ra=pb();lU.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i=pe.max)Se=oe[Te+1];else if(Ce=pe.pmax)Se=oe[Te+1];else if(Ce0?e.touches[0].clientX:0}function nhe(e,t,r,i){if(t._context.staticPlot)return;var a=e.select("rect."+Ra.slideBoxClassName).node(),s=e.select("rect."+Ra.grabAreaMinClassName).node(),l=e.select("rect."+Ra.grabAreaMaxClassName).node();function f(){var h=_b.event,v=h.target,m=oU(h),b=m-e.node().getBoundingClientRect().left,T=i.d2p(r._rl[0]),S=i.d2p(r._rl[1]),C=ahe.coverSlip();this.addEventListener("touchmove",P),this.addEventListener("touchend",E),C.addEventListener("mousemove",P),C.addEventListener("mouseup",E);function P(I){var F=oU(I),N=+F-m,z,O,H;switch(v){case a:if(H="ew-resize",T+N>r._length||S+N<0)return;z=T+N,O=S+N;break;case s:if(H="col-resize",T+N>r._length)return;z=T+N,O=S;break;case l:if(H="col-resize",S+N<0)return;z=T,O=S+N;break;default:H="ew-resize",z=b,O=b+N;break}if(O{"use strict";var phe=Bt(),mhe=db(),yhe=IT(),FT=$O();fU.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:phe.extendFlat({},mhe,{yaxis:yhe})}}},layoutAttributes:db(),handleDefaults:aU(),calcAutorange:nU(),draw:uU(),isVisible:FT.isVisible,makeData:FT.makeData,autoMarginOpts:FT.autoMarginOpts}});var bb=de((Lxe,vU)=>{"use strict";var ghe=qo(),hU=Af(),_he=Di().templatedArray,xhe=_he("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"});vU.exports={visible:{valType:"boolean",editType:"plot"},buttons:xhe,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:ghe({editType:"plot"}),bgcolor:{valType:"color",dflt:hU.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:hU.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var qT=de((Pxe,dU)=>{"use strict";dU.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var yU=de((Dxe,mU)=>{"use strict";var wb=Bt(),bhe=Ua(),whe=Di(),The=Wl(),pU=bb(),NT=qT();mU.exports=function(t,r,i,a,s){var l=t.rangeselector||{},f=whe.newContainer(r,"rangeselector");function h(S,C){return wb.coerce(l,f,pU,S,C)}var v=The(l,f,{name:"buttons",handleItemDefaults:Ahe,calendar:s}),m=h("visible",v.length>0);if(m){var b=Mhe(r,i,a);h("x",b[0]),h("y",b[1]),wb.noneOrAll(t,r,["x","y"]),h("xanchor"),h("yanchor"),wb.coerceFont(h,"font",i.font);var T=h("bgcolor");h("activecolor",bhe.contrast(T,NT.lightAmount,NT.darkAmount)),h("bordercolor"),h("borderwidth")}};function Ahe(e,t,r,i){var a=i.calendar;function s(h,v){return wb.coerce(e,t,pU.buttons,h,v)}var l=s("visible");if(l){var f=s("step");f!=="all"&&(a&&a!=="gregorian"&&(f==="month"||f==="year")?t.stepmode="backward":s("stepmode"),s("count")),s("label")}}function Mhe(e,t,r){for(var i=r.filter(function(f){return t[f].anchor===e._id}),a=0,s=0;s{"use strict";var She=F3(),khe=Bt().titleCase;gU.exports=function(t,r){var i=t._name,a={};if(r.step==="all")a[i+".autorange"]=!0;else{var s=Che(t,r);a[i+".range[0]"]=s[0],a[i+".range[1]"]=s[1]}return a};function Che(e,t){var r=e.range,i=new Date(e.r2l(r[1])),a=t.step,s=She["utc"+khe(a)],l=t.count,f;switch(t.stepmode){case"backward":f=e.l2r(+s.offset(i,-l));break;case"todate":var h=s.offset(i,-l);f=e.l2r(+s.ceil(h));break}var v=r[1];return[f,v]}});var kU=de((Ixe,SU)=>{"use strict";var Ab=ja(),Ehe=la(),Lhe=eo(),xU=Ua(),MU=_i(),Lc=Bt(),bU=Lc.strTranslate,Tb=co(),Phe=$n(),UT=ts(),wU=UT.LINE_SPACING,TU=UT.FROM_TL,AU=UT.FROM_BR,OT=qT(),Dhe=_U();SU.exports=function(t){var r=t._fullLayout,i=r._infolayer.selectAll(".rangeselector").data(zhe(t),Ihe);i.enter().append("g").classed("rangeselector",!0),i.exit().remove(),i.style({cursor:"pointer","pointer-events":"all"}),i.each(function(a){var s=Ab.select(this),l=a,f=l.rangeselector,h=s.selectAll("g.button").data(Lc.filterVisible(f.buttons));h.enter().append("g").classed("button",!0),h.exit().remove(),h.each(function(v){var m=Ab.select(this),b=Dhe(l,v);v._isActive=Rhe(l,v,b),m.call(BT,f,v),m.call(qhe,f,v,t),m.on("click",function(){t._dragged||Ehe.call("_guiRelayout",t,b)}),m.on("mouseover",function(){v._isHovered=!0,m.call(BT,f,v)}),m.on("mouseout",function(){v._isHovered=!1,m.call(BT,f,v)})}),Bhe(t,h,f,l._name,s)})};function zhe(e){for(var t=Phe.list(e,"x",!0),r=[],i=0;i{"use strict";CU.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:bb()}}},layoutAttributes:bb(),handleDefaults:yU(),draw:kU()}});var Mb=de(VT=>{"use strict";var LU=hn().extendFlat;VT.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=e.name?e.name+" ":"",a=e.trace?"trace ":"subplot ",s=t.description?" "+t.description:"",l={x:LU({},r,{}),y:LU({},r,{}),editType:e.editType};return e.noGridCell||(l.row={valType:"integer",min:0,dflt:0,editType:e.editType},l.column={valType:"integer",min:0,dflt:0,editType:e.editType}),l};VT.defaults=function(e,t,r,i){var a=i&&i.x||[0,1],s=i&&i.y||[0,1],l=t.grid;if(l){var f=r("domain.column");f!==void 0&&(f{"use strict";var Ohe=Bt(),Uhe=c0().counter,Vhe=Mb().attributes,PU=Ao().idRegex,Hhe=Di(),HT={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:[Uhe("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[PU.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[PU.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:Vhe({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 Sb(e,t,r){var i=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(i))return i;if(a.length)return a}function Ghe(e,t){var r=e.grid||{},i=Sb(t,r,"x"),a=Sb(t,r,"y");if(!e.grid&&!i&&!a)return;var s=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),l=Array.isArray(i),f=Array.isArray(a),h=l&&i!==r.xaxes&&f&&a!==r.yaxes,v,m;s?(v=r.subplots.length,m=r.subplots[0].length):(f&&(v=a.length),l&&(m=i.length));var b=Hhe.newContainer(t,"grid");function T(H,V){return Ohe.coerce(r,b,HT,H,V)}var S=T("rows",v),C=T("columns",m);if(!(S*C>1)){delete t.grid;return}if(!s&&!l&&!f){var P=T("pattern")==="independent";P&&(s=!0)}b._hasSubplotGrid=s;var E=T("roworder"),I=E==="top to bottom",F=s?.2:.1,N=s?.3:.1,z,O;h&&t._splomGridDflt&&(z=t._splomGridDflt.xside,O=t._splomGridDflt.yside),b._domains={x:DU("x",T,F,z,C),y:DU("y",T,N,O,S,I)}}function DU(e,t,r,i,a,s){var l=t(e+"gap",r),f=t("domain."+e);t(e+"side",i);for(var h=new Array(a),v=f[0],m=(f[1]-v)/(a-l),b=m*(1-l),T=0;T{"use strict";FU.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 BU=de((Bxe,NU)=>{"use strict";var qU=Da(),Yhe=la(),Whe=Bt(),Xhe=Di(),jhe=GT();NU.exports=function(e,t,r,i){var a="error_"+i.axis,s=Xhe.newContainer(t,a),l=e[a]||{};function f(C,P){return Whe.coerce(l,s,jhe,C,P)}var h=l.array!==void 0||l.value!==void 0||l.type==="sqrt",v=f("visible",h);if(v!==!1){var m=f("type","array"in l?"data":"percent"),b=!0;m!=="sqrt"&&(b=f("symmetric",!((m==="data"?"arrayminus":"valueminus")in l))),m==="data"?(f("array"),f("traceref"),b||(f("arrayminus"),f("tracerefminus"))):(m==="percent"||m==="constant")&&(f("value"),b||f("valueminus"));var T="copy_"+i.inherit+"style";if(i.inherit){var S=t["error_"+i.inherit];(S||{}).visible&&f(T,!(l.color||qU(l.thickness)||qU(l.width)))}(!i.inherit||!s[T])&&(f("color",r),f("thickness"),f("width",Yhe.traceIs(t,"gl3d")?0:4))}}});var ZT=de((Oxe,UU)=>{"use strict";UU.exports=function(t){var r=t.type,i=t.symmetric;if(r==="data"){var a=t.array||[];if(i)return function(v,m){var b=+a[m];return[b,b]};var s=t.arrayminus||[];return function(v,m){var b=+a[m],T=+s[m];return!isNaN(b)||!isNaN(T)?[T||0,b||0]:[NaN,NaN]}}else{var l=OU(r,t.value),f=OU(r,t.valueminus);return i||t.valueminus===void 0?function(v){var m=l(v);return[m,m]}:function(v){return[f(v),l(v)]}}};function OU(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 GU=de((Uxe,HU)=>{"use strict";var YT=Da(),Jhe=la(),WT=Yi(),Khe=Bt(),Qhe=ZT();HU.exports=function(t){for(var r=t.calcdata,i=0;i{"use strict";var ZU=ja(),$h=Da(),$he=_i(),eve=rs();YU.exports=function(t,r,i,a){var s,l=i.xaxis,f=i.yaxis,h=a&&a.duration>0,v=t._context.staticPlot;r.each(function(m){var b=m[0].trace,T=b.error_x||{},S=b.error_y||{},C;b.ids&&(C=function(F){return F.id});var P=eve.hasMarkers(b)&&b.marker.maxdisplayed>0;!S.visible&&!T.visible&&(m=[]);var E=ZU.select(this).selectAll("g.errorbar").data(m,C);if(E.exit().remove(),!!m.length){T.visible||E.selectAll("path.xerror").remove(),S.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var I=E.enter().append("g").classed("errorbar",!0);h&&I.style("opacity",0).transition().duration(a.duration).style("opacity",1),$he.setClipUrl(E,i.layerClipId,t),E.each(function(F){var N=ZU.select(this),z=tve(F,l,f);if(!(P&&!F.vis)){var O,H=N.select("path.yerror");if(S.visible&&$h(z.x)&&$h(z.yh)&&$h(z.ys)){var V=S.width;O="M"+(z.x-V)+","+z.yh+"h"+2*V+"m-"+V+",0V"+z.ys,z.noYS||(O+="m-"+V+",0h"+2*V),s=!H.size(),s?H=N.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("yerror",!0):h&&(H=H.transition().duration(a.duration).ease(a.easing)),H.attr("d",O)}else H.remove();var W=N.select("path.xerror");if(T.visible&&$h(z.y)&&$h(z.xh)&&$h(z.xs)){var J=(T.copy_ystyle?S:T).width;O="M"+z.xh+","+(z.y-J)+"v"+2*J+"m0,-"+J+"H"+z.xs,z.noXS||(O+="m0,-"+J+"v"+2*J),s=!W.size(),s?W=N.append("path").style("vector-effect",v?"none":"non-scaling-stroke").classed("xerror",!0):h&&(W=W.transition().duration(a.duration).ease(a.easing)),W.attr("d",O)}else W.remove()}})}})};function tve(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),$h(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),$h(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}});var JU=de((Hxe,jU)=>{"use strict";var rve=ja(),XU=Ua();jU.exports=function(t){t.each(function(r){var i=r[0].trace,a=i.error_y||{},s=i.error_x||{},l=rve.select(this);l.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(XU.stroke,a.color),s.copy_ystyle&&(s=a),l.selectAll("path.xerror").style("stroke-width",s.thickness+"px").call(XU.stroke,s.color)})}});var $U=de((Gxe,QU)=>{"use strict";var $g=Bt(),KU=nl().overrideAll,e1=GT(),Ud={error_x:$g.extendFlat({},e1),error_y:$g.extendFlat({},e1)};delete Ud.error_x.copy_zstyle;delete Ud.error_y.copy_zstyle;delete Ud.error_y.copy_ystyle;var t1={error_x:$g.extendFlat({},e1),error_y:$g.extendFlat({},e1),error_z:$g.extendFlat({},e1)};delete t1.error_x.copy_ystyle;delete t1.error_y.copy_ystyle;delete t1.error_z.copy_ystyle;delete t1.error_z.copy_zstyle;QU.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ud,bar:Ud,histogram:Ud,scatter3d:KU(t1,"calc","nested"),scattergl:KU(Ud,"calc","nested")}},supplyDefaults:BU(),calc:GU(),makeComputeError:ZT(),plot:WU(),style:JU(),hoverInfo:ave};function ave(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 tV=de((Zxe,eV)=>{"use strict";eV.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 lV=de((Yxe,sV)=>{"use strict";var ev=ja(),XT=Tf(),Cb=eo(),rV=la(),Pc=Yi(),kb=jl(),su=Bt(),ju=su.strTranslate,oV=hn().extendFlat,jT=Oh(),Xu=_i(),JT=Ua(),ive=Yy(),nve=co(),ove=kf().flipScale,sve=iT(),lve=nT(),uve=Ru(),KT=ts(),aV=KT.LINE_SPACING,iV=KT.FROM_TL,nV=KT.FROM_BR,Ji=tV().cn;function fve(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Ji.colorbar).data(cve(e),function(i){return i._id});r.enter().append("g").attr("class",function(i){return i._id}).classed(Ji.colorbar,!0),r.each(function(i){var a=ev.select(this);su.ensureSingle(a,"rect",Ji.cbbg),su.ensureSingle(a,"g",Ji.cbfills),su.ensureSingle(a,"g",Ji.cblines),su.ensureSingle(a,"g",Ji.cbaxis,function(l){l.classed(Ji.crisp,!0)}),su.ensureSingle(a,"g",Ji.cbtitleunshift,function(l){l.append("g").classed(Ji.cbtitle,!0)}),su.ensureSingle(a,"rect",Ji.cboutline);var s=hve(a,i,e);s&&s.then&&(e._promises||[]).push(s),e._context.edits.colorbarPosition&&vve(a,i,e)}),r.exit().each(function(i){Cb.autoMargin(e,i._id)}).remove(),r.order()}function cve(e){var t=e._fullLayout,r=e.calcdata,i=[],a,s,l,f;function h(N){return oV(N,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function v(){typeof f.calc=="function"?f.calc(e,l,a):(a._fillgradient=s.reversescale?ove(s.colorscale):s.colorscale,a._zrange=[s[f.min],s[f.max]])}for(var m=0;m1){var Re=Math.pow(10,Math.floor(Math.log(ge)/Math.LN10));kt*=Re*su.roundUp(ge/Re,[2,5,10]),(Math.abs(ne.start)/ne.size+1e-6)%1<2e-6&&(at.tick0=0)}at.dtick=kt}at.domain=i?[He+C/z.h,He+Ae-C/z.h]:[He+S/z.w,He+Ae-S/z.w],at.setScale(),e.attr("transform",ju(Math.round(z.l),Math.round(z.t)));var xe=e.select("."+Ji.cbtitleunshift).attr("transform",ju(-Math.round(z.l),-Math.round(z.t))),et=at.ticklabelposition,vt=at.title.font.size,tt=e.select("."+Ji.cbaxis),Nt,Mt=0,Ct=0;function Rt(Wt,Be){var ft={propContainer:at,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:N._dfltTitle.colorbar,containerGroup:e.select("."+Ji.cbtitle)},mt=Wt.charAt(0)==="h"?Wt.substr(1):"h"+Wt;e.selectAll("."+mt+",."+mt+"-math-group").remove(),ive.draw(r,Wt,oV(ft,Be||{}))}function Ut(){if(i&&At||!i&&!At){var Wt,Be;W==="top"&&(Wt=S+z.l+Me*P,Be=C+z.t+Le*(1-He-Ae)+3+vt*.75),W==="bottom"&&(Wt=S+z.l+Me*P,Be=C+z.t+Le*(1-He)-3-vt*.25),W==="right"&&(Be=C+z.t+Le*E+3+vt*.75,Wt=S+z.l+Me*He),Rt(at._id+"title",{attributes:{x:Wt,y:Be,"text-anchor":i?"start":"middle"}})}}function xt(){if(i&&!At||!i&&At){var Wt=at.position||0,Be=at._offset+at._length/2,ft,mt;if(W==="right")mt=Be,ft=z.l+Me*Wt+10+vt*(at.showticklabels?1:.5);else if(ft=Be,W==="bottom"&&(mt=z.t+Le*Wt+10+(et.indexOf("inside")===-1?at.tickfont.size:0)+(at.ticks!=="intside"&&t.ticklen||0)),W==="top"){var Ar=V.text.split("
").length;mt=z.t+Le*Wt+10-Se-aV*vt*Ar}Rt((i?"h":"v")+at._id+"title",{avoid:{selection:ev.select(r).selectAll("g."+at._id+"tick"),side:W,offsetTop:i?0:z.t,offsetLeft:i?z.l:0,maxShift:i?N.width:N.height},attributes:{x:ft,y:mt,"text-anchor":"middle"},transform:{rotate:i?-90:0,offset:0}})}}function Et(){if(!i&&!At||i&&At){var Wt=e.select("."+Ji.cbtitle),Be=Wt.select("text"),ft=[-h/2,h/2],mt=Wt.select(".h"+at._id+"title-math-group").node(),Ar=15.6;Be.node()&&(Ar=parseInt(Be.node().style.fontSize,10)*aV);var dr;if(mt?(dr=Xu.bBox(mt),Ct=dr.width,Mt=dr.height,Mt>Ar&&(ft[1]-=(Mt-Ar)/2)):Be.node()&&!Be.classed(Ji.jsPlaceholder)&&(dr=Xu.bBox(Be.node()),Ct=dr.width,Mt=dr.height),i){if(Mt){if(Mt+=5,W==="top")at.domain[1]-=Mt/z.h,ft[1]*=-1;else{at.domain[0]+=Mt/z.h;var Tt=nve.lineCount(Be);ft[1]+=(1-Tt)*Ar}Wt.attr("transform",ju(ft[0],ft[1])),at.setScale()}}else Ct&&(W==="right"&&(at.domain[0]+=(Ct+vt/2)/z.w),Wt.attr("transform",ju(ft[0],ft[1])),at.setScale())}e.selectAll("."+Ji.cbfills+",."+Ji.cblines).attr("transform",i?ju(0,Math.round(z.h*(1-at.domain[1]))):ju(Math.round(z.w*at.domain[0]),0)),tt.attr("transform",i?ju(0,Math.round(-z.t)):ju(Math.round(-z.l),0));var wt=e.select("."+Ji.cbfills).selectAll("rect."+Ji.cbfill).attr("style","").data(ve);wt.enter().append("rect").classed(Ji.cbfill,!0).attr("style",""),wt.exit().remove();var Vt=J.map(at.c2p).map(Math.round).sort(function(Mr,xr){return Mr-xr});wt.each(function(Mr,xr){var Pt=[xr===0?J[0]:(ve[xr]+ve[xr-1])/2,xr===ve.length-1?J[1]:(ve[xr]+ve[xr+1])/2].map(at.c2p).map(Math.round);i&&(Pt[1]=su.constrain(Pt[1]+(Pt[1]>Pt[0])?1:-1,Vt[0],Vt[1]));var Fe=ev.select(this).attr(i?"x":"y",Ke).attr(i?"y":"x",ev.min(Pt)).attr(i?"width":"height",Math.max(Se,2)).attr(i?"height":"width",Math.max(ev.max(Pt)-ev.min(Pt),2));if(t._fillgradient)Xu.gradient(Fe,r,t._id,i?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Ge=oe(Mr).replace("e-","");Fe.attr("fill",XT(Ge).toHexString())}});var Kt=e.select("."+Ji.cblines).selectAll("path."+Ji.cbline).data(H.color&&H.width?Ce:[]);Kt.enter().append("path").classed(Ji.cbline,!0),Kt.exit().remove(),Kt.each(function(Mr){var xr=Ke,Pt=Math.round(at.c2p(Mr))+H.width/2%1;ev.select(this).attr("d","M"+(i?xr+","+Pt:Pt+","+xr)+(i?"h":"v")+Se).call(Xu.lineGroupStyle,H.width,re(Mr),H.dash)}),tt.selectAll("g."+at._id+"tick,path").remove();var Ht=Ke+Se+(h||0)/2-(t.ticks==="outside"?1:0),Ot=Pc.calcTicks(at),er=Pc.getTickSigns(at)[2];return Pc.drawTicks(r,at,{vals:at.ticks==="inside"?Pc.clipEnds(at,Ot):Ot,layer:tt,path:Pc.makeTickPath(at,Ht,er),transFn:Pc.makeTransTickFn(at)}),Pc.drawLabels(r,at,{vals:Ot,layer:tt,transFn:Pc.makeTransTickLabelFn(at),labelFns:Pc.makeLabelFns(at,Ht)})}function ir(){var Wt,Be=Se+h/2;et.indexOf("inside")===-1&&(Wt=Xu.bBox(tt.node()),Be+=i?Wt.width:Wt.height),Nt=xe.select("text");var ft=0,mt=i&&W==="top",Ar=!i&&W==="right",dr=0;if(Nt.node()&&!Nt.classed(Ji.jsPlaceholder)){var Tt,wt=xe.select(".h"+at._id+"title-math-group").node();wt&&(i&&At||!i&&!At)?(Wt=Xu.bBox(wt),ft=Wt.width,Tt=Wt.height):(Wt=Xu.bBox(xe.node()),ft=Wt.right-z.l-(i?Ke:_t),Tt=Wt.bottom-z.t-(i?_t:Ke),!i&&W==="top"&&(Be+=Wt.height,dr=Wt.height)),Ar&&(Nt.attr("transform",ju(ft/2+vt/2,0)),ft*=2),Be=Math.max(Be,i?ft:Tt)}var Vt=(i?S:C)*2+Be+v+h/2,Kt=0;!i&&V.text&&T==="bottom"&&E<=0&&(Kt=Vt/2,Vt+=Kt,dr+=Kt),N._hColorbarMoveTitle=Kt,N._hColorbarMoveCBTitle=dr;var Ht=v+h,Ot=(i?Ke:_t)-Ht/2-(i?S:0),er=(i?_t:Ke)-(i?pe:C+dr-Kt);e.select("."+Ji.cbbg).attr("x",Ot).attr("y",er).attr(i?"width":"height",Math.max(Vt-Kt,2)).attr(i?"height":"width",Math.max(pe+Ht,2)).call(JT.fill,m).call(JT.stroke,t.bordercolor).style("stroke-width",v);var Mr=Ar?Math.max(ft-10,0):0;e.selectAll("."+Ji.cboutline).attr("x",(i?Ke:_t+S)+Mr).attr("y",(i?_t+C-pe:Ke)+(mt?Mt:0)).attr(i?"width":"height",Math.max(Se,2)).attr(i?"height":"width",Math.max(pe-(i?2*C+Mt:2*S+Mr),2)).call(JT.stroke,t.outlinecolor).style({fill:"none","stroke-width":h});var xr=i?ht*Vt:0,Pt=i?0:(1-it)*Vt-dr;if(xr=F?z.l-xr:-xr,Pt=I?z.t-Pt:-Pt,e.attr("transform",ju(xr,Pt)),!i&&(v||XT(m).getAlpha()&&!XT.equals(N.paper_bgcolor,m))){var Fe=tt.selectAll("text"),Ge=Fe[0].length,bt=e.select("."+Ji.cbbg).node(),dt=Xu.bBox(bt),gr=Xu.getTranslate(e),Er=2;Fe.each(function(jn,En){var Vi=0,pa=Ge-1;if(En===Vi||En===pa){var Gr=Xu.bBox(this),Qa=Xu.getTranslate(this),Zr;if(En===pa){var vi=Gr.right+Qa.x,ya=dt.right+gr.x+_t-v-Er+P;Zr=ya-vi,Zr>0&&(Zr=0)}else if(En===Vi){var le=Gr.left+Qa.x,ee=dt.left+gr.x+_t+v+Er;Zr=ee-le,Zr<0&&(Zr=0)}Zr&&(Ge<3?this.setAttribute("transform","translate("+Zr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Tr={},Hr=iV[b],_a=nV[b],ka=iV[T],Ea=nV[T],Ri=Vt-Se;i?(s==="pixels"?(Tr.y=E,Tr.t=pe*ka,Tr.b=pe*Ea):(Tr.t=Tr.b=0,Tr.yt=E+a*ka,Tr.yb=E-a*Ea),f==="pixels"?(Tr.x=P,Tr.l=Vt*Hr,Tr.r=Vt*_a):(Tr.l=Ri*Hr,Tr.r=Ri*_a,Tr.xl=P-l*Hr,Tr.xr=P+l*_a)):(s==="pixels"?(Tr.x=P,Tr.l=pe*Hr,Tr.r=pe*_a):(Tr.l=Tr.r=0,Tr.xl=P+a*Hr,Tr.xr=P-a*_a),f==="pixels"?(Tr.y=1-E,Tr.t=Vt*ka,Tr.b=Vt*Ea):(Tr.t=Ri*ka,Tr.b=Ri*Ea,Tr.yt=E-l*ka,Tr.yb=E+l*Ea));var Ki=t.y<.5?"b":"t",yn=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Xi={r:N.width-Ot-xr,l:Ot+Tr.r,b:N.height-er-Pt,t:er+Tr.b};F&&I?Cb.autoMargin(r,t._id,Tr):F?r._fullLayout._reservedMargin[t._id][Ki]=Xi[Ki]:I||i?r._fullLayout._reservedMargin[t._id][yn]=Xi[yn]:r._fullLayout._reservedMargin[t._id][Ki]=Xi[Ki]}return su.syncOrAsync([Cb.previousPromises,Ut,Et,xt,Cb.previousPromises,ir],r)}function vve(e,t,r){var i=t.orientation==="v",a=r._fullLayout,s=a._size,l,f,h;kb.init({element:e.node(),gd:r,prepFn:function(){l=e.attr("transform"),jT(e)},moveFn:function(v,m){e.attr("transform",l+ju(v,m)),f=kb.align((i?t._uFrac:t._vFrac)+v/s.w,i?t._thickFrac:t._lenFrac,0,1,t.xanchor),h=kb.align((i?t._vFrac:1-t._uFrac)-m/s.h,i?t._lenFrac:t._thickFrac,0,1,t.yanchor);var b=kb.getCursor(f,h,t.xanchor,t.yanchor);jT(e,b)},doneFn:function(){if(jT(e),f!==void 0&&h!==void 0){var v={};v[t._propPrefix+"x"]=f,v[t._propPrefix+"y"]=h,t._traceIndex!==void 0?rV.call("_guiRestyle",r,v,t._traceIndex):rV.call("_guiRelayout",r,v)}}})}function dve(e,t,r){var i=t._levels,a=[],s=[],l,f,h=i.end+i.size/100,v=i.size,m=1.001*r[0]-.001*r[1],b=1.001*r[1]-.001*r[0];for(f=0;f<1e5&&(l=i.start+f*v,!(v>0?l>=h:l<=h));f++)l>m&&l0?l>=h:l<=h));f++)l>r[0]&&l{"use strict";uV.exports={moduleType:"component",name:"colorbar",attributes:V_(),supplyDefaults:$w(),draw:lV().draw,hasColorbar:Vw()}});var hV=de((Xxe,cV)=>{"use strict";cV.exports={moduleType:"component",name:"legend",layoutAttributes:J5(),supplyLayoutDefaults:$5(),draw:h4(),style:l4()}});var dV=de((jxe,vV)=>{"use strict";vV.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 mV=de((Jxe,pV)=>{"use strict";pV.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var $T=de((Kxe,xV)=>{"use strict";var mve=la(),_V=Bt(),QT=_V.extendFlat,yV=_V.extendDeep;function gV(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 yve(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}xV.exports=function(t,r){var i,a=t.data,s=t.layout,l=yV([],a),f=yV({},s,gV(r.tileClass)),h=t._context||{};if(r.width&&(f.width=r.width),r.height&&(f.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){f.annotations=[];var v=Object.keys(f);for(i=0;i{"use strict";var gve=C_().EventEmitter,_ve=la(),xve=Bt(),bV=Pd(),bve=$T(),wve=Fx(),Tve=qx();function Ave(e,t){var r=new gve,i=bve(e,{format:"png"}),a=i.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function s(){var f=bV.getDelay(a._fullLayout);setTimeout(function(){var h=wve(a),v=document.createElement("canvas");v.id=xve.randstr(),r=Tve({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:v,emitter:r,svg:h}),r.clean=function(){a&&document.body.removeChild(a)}},f)}var l=bV.getRedrawFunc(a);return _ve.call("_doPlot",a,i.data,i.layout,i.config).then(l).then(s).catch(function(f){r.emit("error",f)}),r}wV.exports=Ave});var SV=de(($xe,MV)=>{"use strict";var AV=Pd(),Mve={getDelay:AV.getDelay,getRedrawFunc:AV.getRedrawFunc,clone:$T(),toSVG:Fx(),svgToImg:qx(),toImage:TV(),downloadImage:C6()};MV.exports=Mve});var CV=de(Dc=>{"use strict";Dc.version=U1().version;_7();uk();var Sve=la(),r1=Dc.register=Sve.register,tA=DF(),kV=Object.keys(tA);for(Eb=0;Eb{"use strict";EV.exports=CV()});var rA=de((rbe,zV)=>{"use strict";var kve=Hl().hovertemplateAttrs,Cve=Hl().texttemplateAttrs,Eve=px(),Vf=kc(),Lve=ms(),PV=xc(),Pve=hc().dash,Vd=hn().extendFlat,Dve=nl().overrideAll,lu=Vf.marker,DV=Vf.line,zve=lu.line;zV.exports=Dve({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:Vd({},Vf.mode,{dflt:"markers"}),text:Vd({},Vf.text,{}),texttemplate:Cve({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:Vd({},Vf.hovertext,{}),textfont:Vf.textfont,textposition:Vf.textposition,line:{color:DV.color,width:DV.width,dash:Pve},connectgaps:Vf.connectgaps,marker:Vd({symbol:lu.symbol,opacity:lu.opacity,angle:lu.angle,angleref:Vd({},lu.angleref,{values:["previous","up","north"]}),standoff:lu.standoff,size:lu.size,sizeref:lu.sizeref,sizemin:lu.sizemin,sizemode:lu.sizemode,colorbar:lu.colorbar,line:Vd({width:zve.width},PV("marker.line")),gradient:lu.gradient},PV("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Eve(),selected:Vf.selected,unselected:Vf.unselected,hoverinfo:Vd({},Lve.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:kve()},"calc","nested")});var zc=de((abe,OV)=>{"use strict";var Ive=g_(),IV="1.13.4",NV='\xA9 OpenStreetMap contributors',RV=['\xA9 Carto',NV].join(" "),FV=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),Rve=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),BV={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:NV,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:RV,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:RV,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:FV,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:FV,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:Rve,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"}},qV=Ive(BV);OV.exports={requiredVersion:IV,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:BV,styleValuesNonMapbox:qV,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@"+IV+"."].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:",qV.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 a1=de((ibe,GV)=>{"use strict";var UV=Bt(),VV=Ua().defaultLine,Fve=Mb().attributes,qve=qo(),Nve=kc().textposition,Bve=nl().overrideAll,Ove=Di().templatedArray,aA=zc(),HV=qve({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});HV.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var Uve=GV.exports=Bve({_arrayAttrRegexps:[UV.counterRegex("mapbox",".layers",!0)],domain:Fve({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:aA.styleValuesMapbox.concat(aA.styleValuesNonMapbox),dflt:aA.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:Ove("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:VV},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:VV}},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:HV,textposition:UV.extendFlat({},Nve,{arrayOk:!1})}})},"plot","from-root");Uve.uirevision={valType:"any",editType:"none"}});var Pb=de((nbe,WV)=>{"use strict";var Vve=Hl().hovertemplateAttrs,Hve=Hl().texttemplateAttrs,Gve=px(),i1=rA(),gm=kc(),ZV=a1(),Zve=ms(),Yve=xc(),Hd=hn().extendFlat,Wve=nl().overrideAll,Xve=a1(),YV=i1.line,_m=i1.marker;WV.exports=Wve({lon:i1.lon,lat:i1.lat,cluster:{enabled:{valType:"boolean"},maxzoom:Hd({},Xve.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:Hd({},_m.opacity,{dflt:1})},mode:Hd({},gm.mode,{dflt:"markers"}),text:Hd({},gm.text,{}),texttemplate:Hve({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:Hd({},gm.hovertext,{}),line:{color:YV.color,width:YV.width},connectgaps:gm.connectgaps,marker:Hd({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:_m.opacity,size:_m.size,sizeref:_m.sizeref,sizemin:_m.sizemin,sizemode:_m.sizemode},Yve("marker")),fill:i1.fill,fillcolor:Gve(),textfont:ZV.layers.symbol.textfont,textposition:ZV.layers.symbol.textposition,below:{valType:"string"},selected:{marker:gm.selected.marker},unselected:{marker:gm.unselected.marker},hoverinfo:Hd({},Zve.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:Vve()},"calc","nested")});var iA=de((obe,XV)=>{"use strict";var jve=["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"];XV.exports={isSupportedFont:function(e){return jve.indexOf(e)!==-1}}});var KV=de((sbe,JV)=>{"use strict";var n1=Bt(),nA=rs(),Jve=P6(),Kve=D6(),Qve=z6(),$ve=I6(),jV=Pb(),ede=iA().isSupportedFont;JV.exports=function(t,r,i,a){function s(I,R){return n1.coerce(t,r,jV,I,R)}function l(I,R){return n1.coerce2(t,r,jV,I,R)}var f=tde(t,r,s);if(!f){r.visible=!1;return}if(s("text"),s("texttemplate"),s("hovertext"),s("hovertemplate"),s("mode"),s("below"),nA.hasMarkers(r)){Jve(t,r,i,a,s,{noLine:!0,noAngle:!0}),s("marker.allowoverlap"),s("marker.angle");var h=r.marker;h.symbol!=="circle"&&(n1.isArrayOrTypedArray(h.size)&&(h.size=h.size[0]),n1.isArrayOrTypedArray(h.color)&&(h.color=h.color[0]))}nA.hasLines(r)&&(Kve(t,r,i,a,s,{noDash:!0}),s("connectgaps"));var v=l("cluster.maxzoom"),m=l("cluster.step"),b=l("cluster.color",r.marker&&r.marker.color||i),T=l("cluster.size"),S=l("cluster.opacity"),C=v!==!1||m!==!1||b!==!1||T!==!1||S!==!1,P=s("cluster.enabled",C);if(P||nA.hasText(r)){var E=a.font.family;Qve(t,r,a,s,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:ede(E)?E:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}s("fill"),r.fill!=="none"&&$ve(t,r,i,s),n1.coerceSelectionMarkerOpacity(r,s)};function tde(e,t,r){var i=r("lon")||[],a=r("lat")||[],s=Math.min(i.length,a.length);return t._length=s,s}});var oA=de((lbe,$V)=>{"use strict";var QV=Yi();$V.exports=function(t,r,i){var a={},s=i[r.subplot]._subplot,l=s.mockAxis,f=t.lonlat;return a.lonLabel=QV.tickText(l,l.c2l(f[0]),!0).text,a.latLabel=QV.tickText(l,l.c2l(f[1]),!0).text,a}});var iH=de((ube,aH)=>{"use strict";var sA=Da(),eH=Hi().BADNUM,rde=q6(),ade=Ng(),ide=Gx(),nde=Bt().isArrayOrTypedArray,tH=Bt()._;function rH(e){return e&&typeof e=="string"}aH.exports=function(t,r){var i=nde(r.locations),a=i?r.locations.length:r._length,s=new Array(a),l;r.geojson?l=function(T){return rH(T)||sA(T)}:l=rH;for(var f=0;f{"use strict";var ode=Hi().BADNUM;o1.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,i=[],a=[],s=0;s0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i};o1.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};o1.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var nH=Bt();oH.exports=function(t,r){var i=t.split(" "),a=i[0],s=i[1],l=nH.isArrayOrTypedArray(r)?nH.mean(r):r,f=.5+l/100,h=1.5+l/100,v=["",""],m=[0,0];switch(a){case"top":v[0]="top",m[1]=-h;break;case"bottom":v[0]="bottom",m[1]=h;break}switch(s){case"left":v[1]="right",m[0]=-f;break;case"right":v[1]="left",m[0]=f;break}var b;return v[0]&&v[1]?b=v.join("-"):v[0]?b=v[0]:v[1]?b=v[1]:b="center",{anchor:b,offset:m}}});var hH=de((hbe,cH)=>{"use strict";var uH=Da(),ko=Bt(),sde=Hi().BADNUM,Ib=Db(),sH=L0(),lde=_i(),ude=a5(),Rb=rs(),fde=iA().isSupportedFont,cde=lA(),hde=bc().appendArrayPointValue,vde=co().NEWLINES,dde=co().BR_TAG_ALL;cH.exports=function(t,r){var i=r[0].trace,a=i.visible===!0&&i._length!==0,s=i.fill!=="none",l=Rb.hasLines(i),f=Rb.hasMarkers(i),h=Rb.hasText(i),v=f&&i.marker.symbol==="circle",m=f&&i.marker.symbol!=="circle",b=i.cluster&&i.cluster.enabled,T=zb("fill"),S=zb("line"),C=zb("circle"),P=zb("symbol"),E={fill:T,line:S,circle:C,symbol:P};if(!a)return E;var I;if((s||l)&&(I=Ib.calcTraceToLineCoords(r)),s&&(T.geojson=Ib.makePolygon(I),T.layout.visibility="visible",ko.extendFlat(T.paint,{"fill-color":i.fillcolor})),l&&(S.geojson=Ib.makeLine(I),S.layout.visibility="visible",ko.extendFlat(S.paint,{"line-width":i.line.width,"line-color":i.line.color,"line-opacity":i.opacity})),v){var R=pde(r);C.geojson=R.geojson,C.layout.visibility="visible",b&&(C.filter=["!",["has","point_count"]],E.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":fA(i.cluster.color,i.cluster.step),"circle-radius":fA(i.cluster.size,i.cluster.step),"circle-opacity":fA(i.cluster.opacity,i.cluster.step)}},E.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":lH(i),"text-size":12}}),ko.extendFlat(C.paint,{"circle-color":R.mcc,"circle-radius":R.mrc,"circle-opacity":R.mo})}if(v&&b&&(C.filter=["!",["has","point_count"]]),(m||h)&&(P.geojson=mde(r,t),ko.extendFlat(P.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),m&&(ko.extendFlat(P.layout,{"icon-size":i.marker.size/10}),"angle"in i.marker&&i.marker.angle!=="auto"&&ko.extendFlat(P.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),P.layout["icon-allow-overlap"]=i.marker.allowoverlap,ko.extendFlat(P.paint,{"icon-opacity":i.opacity*i.marker.opacity,"icon-color":i.marker.color})),h)){var N=(i.marker||{}).size,z=cde(i.textposition,N);ko.extendFlat(P.layout,{"text-size":i.textfont.size,"text-anchor":z.anchor,"text-offset":z.offset,"text-font":lH(i)}),ko.extendFlat(P.paint,{"text-color":i.textfont.color,"text-opacity":i.opacity})}return E};function zb(e){return{type:e,geojson:Ib.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function pde(e){var t=e[0].trace,r=t.marker,i=t.selectedpoints,a=ko.isArrayOrTypedArray(r.color),s=ko.isArrayOrTypedArray(r.size),l=ko.isArrayOrTypedArray(r.opacity),f;function h(N){return t.opacity*N}function v(N){return N/2}var m;a&&(sH.hasColorscale(t,"marker")?m=sH.makeColorScaleFuncFromTrace(r):m=ko.identity);var b;s&&(b=ude(t));var T;l&&(T=function(N){var z=uH(N)?+ko.constrain(N,0,1):0;return h(z)});var S=[];for(f=0;f850?f+=" Black":a>750?f+=" Extra Bold":a>650?f+=" Bold":a>550?f+=" Semi Bold":a>450?f+=" Medium":a>350?f+=" Regular":a>250?f+=" Light":a>150?f+=" Extra Light":f+=" Thin"):s.slice(0,2).join(" ")==="Open Sans"?(f="Open Sans",a>750?f+=" Extrabold":a>650?f+=" Bold":a>550?f+=" Semibold":a>350?f+=" Regular":f+=" Light"):s.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(f="Klokantech Noto Sans",s[3]==="CJK"&&(f+=" CJK"),f+=a>500?" Bold":" Regular")),l&&(f+=" Italic"),f==="Open Sans Regular Italic"?f="Open Sans Italic":f==="Open Sans Regular Bold"?f="Open Sans Bold":f==="Open Sans Regular Bold Italic"?f="Open Sans Bold Italic":f==="Klokantech Noto Sans Regular Italic"&&(f="Klokantech Noto Sans Italic"),fde(f)||(f=r);var h=f.split(", ");return h}});var mH=de((vbe,pH)=>{"use strict";var yde=Bt(),vH=hH(),xm=zc().traceLayerPrefix,uu={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function dH(e,t,r,i){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=i,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:xm+t+"-fill",line:xm+t+"-line",circle:xm+t+"-circle",symbol:xm+t+"-symbol",cluster:xm+t+"-cluster",clusterCount:xm+t+"-cluster-count"},this.below=null}var s1=dH.prototype;s1.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&yde.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)};s1.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};s1.addLayer=function(e,t,r){var i={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(i.filter=t.filter);for(var a=this.layerIds[e],s,l=this.subplot.getMapLayers(),f=0;f=0;O--){var H=z[O];a.removeLayer(v.layerIds[H])}N||a.removeSource(v.sourceIds.circle)}function T(N){for(var z=uu.nonCluster,O=0;O=0;O--){var H=z[O];a.removeLayer(v.layerIds[H]),N||a.removeSource(v.sourceIds[H])}}function C(N){h?b(N):S(N)}function P(N){f?m(N):T(N)}function E(){for(var N=f?uu.cluster:uu.nonCluster,z=0;z=0;i--){var a=r[i];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};pH.exports=function(t,r){var i=r[0].trace,a=i.cluster&&i.cluster.enabled,s=i.visible!==!0,l=new dH(t,i.uid,a,s),f=vH(t.gd,r),h=l.below=t.belowLookup["trace-"+i.uid],v,m,b;if(a)for(l.addSource("circle",f.circle,i.cluster),v=0;v{"use strict";var gde=Rf(),cA=Bt(),_de=eT(),xde=cA.fillText,bde=Hi().BADNUM,wde=zc().traceLayerPrefix;function Tde(e,t,r){var i=e.cd,a=i[0].trace,s=e.xa,l=e.ya,f=e.subplot,h=[],v=wde+a.uid+"-circle",m=a.cluster&&a.cluster.enabled;if(m){var b=f.map.queryRenderedFeatures(null,{layers:[v]});h=b.map(function(W){return W.id})}var T=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),S=T*360,C=t-S;function P(W){var J=W.lonlat;if(J[0]===bde||m&&h.indexOf(W.i+1)===-1)return 1/0;var re=cA.modHalf(J[0],360),oe=J[1],ne=f.project([re,oe]),fe=ne.x-s.c2p([C,oe]),ve=ne.y-l.c2p([re,r]),ke=Math.max(3,W.mrc||0);return Math.max(Math.sqrt(fe*fe+ve*ve)-ke,1-3/ke)}if(gde.getClosest(i,P,e),e.index!==!1){var E=i[e.index],I=E.lonlat,R=[cA.modHalf(I[0],360)+S,I[1]],N=s.c2p(R),z=l.c2p(R),O=E.mrc||1;e.x0=N-O,e.x1=N+O,e.y0=z-O,e.y1=z+O;var H={};H[a.subplot]={_subplot:f};var V=a._module.formatLabels(E,a,H);return e.lonLabel=V.lonLabel,e.latLabel=V.latLabel,e.color=_de(a,E),e.extraText=yH(a,E,i[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function yH(e,t,r){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i.split("+"),s=a.indexOf("all")!==-1,l=a.indexOf("lon")!==-1,f=a.indexOf("lat")!==-1,h=t.lonlat,v=[];function m(b){return b+"\xB0"}return s||l&&f?v.push("("+m(h[1])+", "+m(h[0])+")"):l?v.push(r.lon+m(h[0])):f&&v.push(r.lat+m(h[1])),(s||a.indexOf("text")!==-1)&&xde(t,e,v),v.join("
")}gH.exports={hoverPoints:Tde,getExtraText:yH}});var xH=de((pbe,_H)=>{"use strict";_H.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var wH=de((mbe,bH)=>{"use strict";var Ade=Bt(),Mde=rs(),Sde=Hi().BADNUM;bH.exports=function(t,r){var i=t.cd,a=t.xaxis,s=t.yaxis,l=[],f=i[0].trace,h;if(!Mde.hasMarkers(f))return[];if(r===!1)for(h=0;h{(function(e,t){typeof hA=="object"&&typeof vA!="undefined"?vA.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(hA,function(){"use strict";var e,t,r;function i(a,s){if(!e)e=s;else if(!t)t=s;else{var l="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",f={};e(f),r=s(f),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([l],{type:"text/javascript"})))}}return i(["exports"],function(a){"use strict";function s(n,o){return o={exports:{}},n(o,o.exports),o.exports}var l="1.13.4",f=h;function h(n,o,u,p){this.cx=3*n,this.bx=3*(u-n)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=n,this.p1y=p,this.p2x=u,this.p2y=p}h.prototype.sampleCurveX=function(n){return((this.ax*n+this.bx)*n+this.cx)*n},h.prototype.sampleCurveY=function(n){return((this.ay*n+this.by)*n+this.cy)*n},h.prototype.sampleCurveDerivativeX=function(n){return(3*this.ax*n+2*this.bx)*n+this.cx},h.prototype.solveCurveX=function(n,o){typeof o=="undefined"&&(o=1e-6);var u,p,_,A,k;for(_=n,k=0;k<8;k++){if(A=this.sampleCurveX(_)-n,Math.abs(A)p)return p;for(;uA?u=_:p=_,_=(p-u)*.5+u}return _},h.prototype.solve=function(n,o){return this.sampleCurveY(this.solveCurveX(n,o))};var v=m;function m(n,o){this.x=n,this.y=o}m.prototype={clone:function(){return new m(this.x,this.y)},add:function(n){return this.clone()._add(n)},sub:function(n){return this.clone()._sub(n)},multByPoint:function(n){return this.clone()._multByPoint(n)},divByPoint:function(n){return this.clone()._divByPoint(n)},mult:function(n){return this.clone()._mult(n)},div:function(n){return this.clone()._div(n)},rotate:function(n){return this.clone()._rotate(n)},rotateAround:function(n,o){return this.clone()._rotateAround(n,o)},matMult:function(n){return this.clone()._matMult(n)},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(n){return this.x===n.x&&this.y===n.y},dist:function(n){return Math.sqrt(this.distSqr(n))},distSqr:function(n){var o=n.x-this.x,u=n.y-this.y;return o*o+u*u},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(n){return Math.atan2(this.y-n.y,this.x-n.x)},angleWith:function(n){return this.angleWithSep(n.x,n.y)},angleWithSep:function(n,o){return Math.atan2(this.x*o-this.y*n,this.x*n+this.y*o)},_matMult:function(n){var o=n[0]*this.x+n[1]*this.y,u=n[2]*this.x+n[3]*this.y;return this.x=o,this.y=u,this},_add:function(n){return this.x+=n.x,this.y+=n.y,this},_sub:function(n){return this.x-=n.x,this.y-=n.y,this},_mult:function(n){return this.x*=n,this.y*=n,this},_div:function(n){return this.x/=n,this.y/=n,this},_multByPoint:function(n){return this.x*=n.x,this.y*=n.y,this},_divByPoint:function(n){return this.x/=n.x,this.y/=n.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var n=this.y;return this.y=this.x,this.x=-n,this},_rotate:function(n){var o=Math.cos(n),u=Math.sin(n),p=o*this.x-u*this.y,_=u*this.x+o*this.y;return this.x=p,this.y=_,this},_rotateAround:function(n,o){var u=Math.cos(n),p=Math.sin(n),_=o.x+u*(this.x-o.x)-p*(this.y-o.y),A=o.y+p*(this.x-o.x)+u*(this.y-o.y);return this.x=_,this.y=A,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(n){return n instanceof m?n:Array.isArray(n)?new m(n[0],n[1]):n};var b=typeof self!="undefined"?self:{};function T(n,o){if(Array.isArray(n)){if(!Array.isArray(o)||n.length!==o.length)return!1;for(var u=0;u=1)return 1;var o=n*n,u=o*n;return 4*(n<.5?u:3*(n-o)+u-.75)}function P(n,o,u,p){var _=new f(n,o,u,p);return function(A){return _.solve(A)}}var E=P(.25,.1,.25,1);function I(n,o,u){return Math.min(u,Math.max(o,n))}function R(n,o,u){var p=u-o,_=((n-o)%p+p)%p+o;return _===o?u:_}function N(n,o,u){if(!n.length)return u(null,[]);var p=n.length,_=new Array(n.length),A=null;n.forEach(function(k,q){o(k,function(Y,j){Y&&(A=Y),_[q]=j,--p===0&&u(A,_)})})}function z(n){var o=[];for(var u in n)o.push(n[u]);return o}function O(n,o){var u=[];for(var p in n)p in o||u.push(p);return u}function H(n){for(var o=[],u=arguments.length-1;u-- >0;)o[u]=arguments[u+1];for(var p=0,_=o;p<_.length;p+=1){var A=_[p];for(var k in A)n[k]=A[k]}return n}function V(n,o){for(var u={},p=0;p>o/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,n)}return n()}function oe(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function ne(n){return n?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(n):!1}function fe(n,o){n.forEach(function(u){o[u]&&(o[u]=o[u].bind(o))})}function ve(n,o){return n.indexOf(o,n.length-o.length)!==-1}function ke(n,o,u){var p={};for(var _ in n)p[_]=o.call(u||this,n[_],_,n);return p}function Ce(n,o,u){var p={};for(var _ in n)o.call(u||this,n[_],_,n)&&(p[_]=n[_]);return p}function Te(n){return Array.isArray(n)?n.map(Te):typeof n=="object"&&n?ke(n,Te):n}function pe(n,o){for(var u=0;u=0)return!0;return!1}var Ae={};function Se(n){Ae[n]||(typeof console!="undefined"&&console.warn(n),Ae[n]=!0)}function Le(n,o,u){return(u.y-n.y)*(o.x-n.x)>(o.y-n.y)*(u.x-n.x)}function Ke(n){for(var o=0,u=0,p=n.length,_=p-1,A=void 0,k=void 0;u@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,u={};if(n.replace(o,function(_,A,k,q){var Y=k||q;return u[A]=Y?Y.toLowerCase():!0,""}),u["max-age"]){var p=parseInt(u["max-age"],10);isNaN(p)?delete u["max-age"]:u["max-age"]=p}return u}var He=null;function _t(n){if(He==null){var o=n.navigator?n.navigator.userAgent:null;He=!!n.safari||!!(o&&(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return He}function at(n){try{var o=b[n];return o.setItem("_mapbox_test_",1),o.removeItem("_mapbox_test_"),!0}catch(u){return!1}}function At(n){return b.btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(o,u){return String.fromCharCode(+("0x"+u))}))}function kt(n){return decodeURIComponent(b.atob(n).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var pt=b.performance&&b.performance.now?b.performance.now.bind(b.performance):Date.now.bind(Date),ge=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame,Re=b.cancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelAnimationFrame||b.msCancelAnimationFrame,xe,et,vt={now:pt,frame:function(o){var u=ge(o);return{cancel:function(){return Re(u)}}},getImageData:function(o,u){u===void 0&&(u=0);var p=b.document.createElement("canvas"),_=p.getContext("2d");if(!_)throw new Error("failed to create canvas 2d context");return p.width=o.width,p.height=o.height,_.drawImage(o,0,0,o.width,o.height),_.getImageData(-u,-u,o.width+2*u,o.height+2*u)},resolveURL:function(o){return xe||(xe=b.document.createElement("a")),xe.href=o,xe.href},hardwareConcurrency:b.navigator&&b.navigator.hardwareConcurrency||4,get devicePixelRatio(){return b.devicePixelRatio},get prefersReducedMotion(){return b.matchMedia?(et==null&&(et=b.matchMedia("(prefers-reduced-motion: reduce)")),et.matches):!1}},tt={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},Nt={supported:!1,testSupport:xt},Mt,Ct=!1,Rt,Ut=!1;b.document&&(Rt=b.document.createElement("img"),Rt.onload=function(){Mt&&Et(Mt),Mt=null,Ut=!0},Rt.onerror=function(){Ct=!0,Mt=null},Rt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function xt(n){Ct||!Rt||(Ut?Et(n):Mt=n)}function Et(n){var o=n.createTexture();n.bindTexture(n.TEXTURE_2D,o);try{if(n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,Rt),n.isContextLost())return;Nt.supported=!0}catch(u){}n.deleteTexture(o),Ct=!0}var ir="01";function Wt(){for(var n="1",o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",u="",p=0;p<10;p++)u+=o[Math.floor(Math.random()*62)];var _=12*60*60*1e3,A=[n,ir,u].join(""),k=Date.now()+_;return{token:A,tokenExpiresAt:k}}var Be=function(o,u){this._transformRequestFn=o,this._customAccessToken=u,this._createSkuToken()};Be.prototype._createSkuToken=function(){var o=Wt();this._skuToken=o.token,this._skuTokenExpiresAt=o.tokenExpiresAt},Be.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Be.prototype.transformRequest=function(o,u){return this._transformRequestFn?this._transformRequestFn(o,u)||{url:o}:{url:o}},Be.prototype.normalizeStyleURL=function(o,u){if(!ft(o))return o;var p=Vt(o);return p.path="/styles/v1"+p.path,this._makeAPIURL(p,this._customAccessToken||u)},Be.prototype.normalizeGlyphsURL=function(o,u){if(!ft(o))return o;var p=Vt(o);return p.path="/fonts/v1"+p.path,this._makeAPIURL(p,this._customAccessToken||u)},Be.prototype.normalizeSourceURL=function(o,u){if(!ft(o))return o;var p=Vt(o);return p.path="/v4/"+p.authority+".json",p.params.push("secure"),this._makeAPIURL(p,this._customAccessToken||u)},Be.prototype.normalizeSpriteURL=function(o,u,p,_){var A=Vt(o);return ft(o)?(A.path="/styles/v1"+A.path+"/sprite"+u+p,this._makeAPIURL(A,this._customAccessToken||_)):(A.path+=""+u+p,Kt(A))},Be.prototype.normalizeTileURL=function(o,u){if(this._isSkuTokenExpired()&&this._createSkuToken(),o&&!ft(o))return o;var p=Vt(o),_=/(\.(png|jpg)\d*)(?=$)/,A=/^.+\/v4\//,k=vt.devicePixelRatio>=2||u===512?"@2x":"",q=Nt.supported?".webp":"$1";p.path=p.path.replace(_,""+k+q),p.path=p.path.replace(A,"/"),p.path="/v4"+p.path;var Y=this._customAccessToken||Tt(p.params)||tt.ACCESS_TOKEN;return tt.REQUIRE_ACCESS_TOKEN&&Y&&this._skuToken&&p.params.push("sku="+this._skuToken),this._makeAPIURL(p,Y)},Be.prototype.canonicalizeTileURL=function(o,u){var p="/v4/",_=/\.[\w]+$/,A=Vt(o);if(!A.path.match(/(^\/v4\/)/)||!A.path.match(_))return o;var k="mapbox://tiles/";k+=A.path.replace(p,"");var q=A.params;return u&&(q=q.filter(function(Y){return!Y.match(/^access_token=/)})),q.length&&(k+="?"+q.join("&")),k},Be.prototype.canonicalizeTileset=function(o,u){for(var p=u?ft(u):!1,_=[],A=0,k=o.tiles||[];A=0&&o.params.splice(A,1)}if(_.path!=="/"&&(o.path=""+_.path+o.path),!tt.REQUIRE_ACCESS_TOKEN)return Kt(o);if(u=u||tt.ACCESS_TOKEN,!u)throw new Error("An API access token is required to use Mapbox GL. "+p);if(u[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+p);return o.params=o.params.filter(function(k){return k.indexOf("access_token")===-1}),o.params.push("access_token="+u),Kt(o)};function ft(n){return n.indexOf("mapbox:")===0}var mt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ar(n){return mt.test(n)}function dr(n){return n.indexOf("sku=")>0&&Ar(n)}function Tt(n){for(var o=0,u=n;o=1&&b.localStorage.setItem(u,JSON.stringify(this.eventData))}catch(_){Se("Unable to write to LocalStorage")}},er.prototype.processRequests=function(o){},er.prototype.postEvent=function(o,u,p,_){var A=this;if(tt.EVENTS_URL){var k=Vt(tt.EVENTS_URL);k.params.push("access_token="+(_||tt.ACCESS_TOKEN||""));var q={event:this.type,created:new Date(o).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:l,skuId:ir,userId:this.anonId},Y=u?H(q,u):q,j={url:Kt(k),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Y])};this.pendingRequest=Ve(j,function(Q){A.pendingRequest=null,p(Q),A.saveEventData(),A.processRequests(_)})}},er.prototype.queueRequest=function(o,u){this.queue.push(o),this.processRequests(u)};var Mr=function(n){function o(){n.call(this,"map.load"),this.success={},this.skuToken=""}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.postMapLoadEvent=function(p,_,A,k){this.skuToken=A,(tt.EVENTS_URL&&k||tt.ACCESS_TOKEN&&Array.isArray(p)&&p.some(function(q){return ft(q)||Ar(q)}))&&this.queueRequest({id:_,timestamp:Date.now()},k)},o.prototype.processRequests=function(p){var _=this;if(!(this.pendingRequest||this.queue.length===0)){var A=this.queue.shift(),k=A.id,q=A.timestamp;k&&this.success[k]||(this.anonId||this.fetchEventData(),ne(this.anonId)||(this.anonId=re()),this.postEvent(q,{skuToken:this.skuToken},function(Y){Y||k&&(_.success[k]=!0)},p))}},o}(er),xr=function(n){function o(u){n.call(this,"appUserTurnstile"),this._customAccessToken=u}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.postTurnstileEvent=function(p,_){tt.EVENTS_URL&&tt.ACCESS_TOKEN&&Array.isArray(p)&&p.some(function(A){return ft(A)||Ar(A)})&&this.queueRequest(Date.now(),_)},o.prototype.processRequests=function(p){var _=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var A=Ot(tt.ACCESS_TOKEN),k=A?A.u:tt.ACCESS_TOKEN,q=k!==this.eventData.tokenU;ne(this.anonId)||(this.anonId=re(),q=!0);var Y=this.queue.shift();if(this.eventData.lastSuccess){var j=new Date(this.eventData.lastSuccess),Q=new Date(Y),ie=(Y-this.eventData.lastSuccess)/(24*60*60*1e3);q=q||ie>=1||ie<-1||j.getDate()!==Q.getDate()}else q=!0;if(!q)return this.processRequests();this.postEvent(Y,{"enabled.telemetry":!1},function(ye){ye||(_.eventData.lastSuccess=Y,_.eventData.tokenU=k)},p)}},o}(er),Pt=new xr,Fe=Pt.postTurnstileEvent.bind(Pt),Ge=new Mr,bt=Ge.postMapLoadEvent.bind(Ge),dt="mapbox-tiles",gr=500,Er=50,Tr=1e3*60*7,Hr;function _a(){b.caches&&!Hr&&(Hr=b.caches.open(dt))}var ka;function Ea(n,o){if(ka===void 0)try{new Response(new ReadableStream),ka=!0}catch(u){ka=!1}ka?o(n.body):n.blob().then(o)}function Ri(n,o,u){if(_a(),!!Hr){var p={status:o.status,statusText:o.statusText,headers:new b.Headers};o.headers.forEach(function(k,q){return p.headers.set(q,k)});var _=lt(o.headers.get("Cache-Control")||"");if(!_["no-store"]){_["max-age"]&&p.headers.set("Expires",new Date(u+_["max-age"]*1e3).toUTCString());var A=new Date(p.headers.get("Expires")).getTime()-u;ADate.now()&&!u["no-cache"]}var jn=1/0;function En(n){jn++,jn>Er&&(n.getActor().send("enforceCacheSizeLimit",gr),jn=0)}function Vi(n){_a(),Hr&&Hr.then(function(o){o.keys().then(function(u){for(var p=0;p=200&&u.status<300||u.status===0)&&u.response!==null){var _=u.response;if(n.type==="json")try{_=JSON.parse(u.response)}catch(A){return o(A)}o(null,_,u.getResponseHeader("Cache-Control"),u.getResponseHeader("Expires"))}else o(new ya(u.statusText,u.status,n.url))},u.send(n.body),{cancel:function(){return u.abort()}}}var Ee=function(n,o){if(!ee(n.url)){if(b.fetch&&b.Request&&b.AbortController&&b.Request.prototype.hasOwnProperty("signal"))return se(n,o);if(it()&&self.worker&&self.worker.actor){var u=!0;return self.worker.actor.send("getResource",n,o,void 0,u)}}return ce(n,o)},Ne=function(n,o){return Ee(H(n,{type:"json"}),o)},rt=function(n,o){return Ee(H(n,{type:"arrayBuffer"}),o)},Ve=function(n,o){return Ee(H(n,{method:"POST"}),o)};function yt(n){var o=b.document.createElement("a");return o.href=n,o.protocol===b.document.location.protocol&&o.host===b.document.location.host}var Dt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ft(n,o,u,p){var _=new b.Image,A=b.URL;_.onload=function(){o(null,_),A.revokeObjectURL(_.src),_.onload=null,b.requestAnimationFrame(function(){_.src=Dt})},_.onerror=function(){return o(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 k=new b.Blob([new Uint8Array(n)],{type:"image/png"});_.cacheControl=u,_.expires=p,_.src=n.byteLength?A.createObjectURL(k):Dt}function tr(n,o){var u=new b.Blob([new Uint8Array(n)],{type:"image/png"});b.createImageBitmap(u).then(function(p){o(null,p)}).catch(function(p){o(new Error("Could not load image because of "+p.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Yt,wr,Yr=function(){Yt=[],wr=0};Yr();var Br=function(n,o){if(Nt.supported&&(n.headers||(n.headers={}),n.headers.accept="image/webp,*/*"),wr>=tt.MAX_PARALLEL_IMAGE_REQUESTS){var u={requestParameters:n,callback:o,cancelled:!1,cancel:function(){this.cancelled=!0}};return Yt.push(u),u}wr++;var p=!1,_=function(){if(!p)for(p=!0,wr--;Yt.length&&wr0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)},pr.prototype.setEventedParent=function(o,u){return this._eventedParent=o,this._eventedParentData=u,this};var $r=8,ga={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"}},nr={"*":{type:"source"}},wi=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],La={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:"*"}},si={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:"*"}},fa={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:"*"}},Ln={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"}},Co={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"}}},xs={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"}}},Ga={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"}},Jn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],hu={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Bi={"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"}},dl={"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"}},Qd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qc={"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"}},Nc={"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"}},hv={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},vv={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},vu={type:"array",value:"*"},pl={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},$d={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Ku={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Zf={type:"array",value:"*",minimum:1},Qi={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}},Ho=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],mo={"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"}},ml={"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"}},Go={"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"}},du={"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"}},ep={"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"}},dv={"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"}},Qu={"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"}},pv={"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"}},mv={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},oo={"*":{type:"string"}},Xt={$version:$r,$root:ga,sources:nr,source:wi,source_vector:La,source_raster:si,source_raster_dem:fa,source_geojson:Ln,source_video:Co,source_image:xs,layer:Ga,layout:Jn,layout_background:hu,layout_fill:Bi,layout_circle:dl,layout_heatmap:Qd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:qc,layout_symbol:Nc,layout_raster:hv,layout_hillshade:vv,filter:vu,filter_operator:pl,geometry_type:$d,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:Ku,expression:Zf,light:Qi,paint:Ho,paint_fill:mo,"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:ml,paint_circle:Go,paint_heatmap:du,paint_symbol:ep,paint_raster:dv,paint_hillshade:Qu,paint_background:pv,transition:mv,"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:oo},Or=function(o,u,p,_){this.message=(o?o+": ":"")+p,_&&(this.identifier=_),u!=null&&u.__line__&&(this.line=u.__line__)};function tp(n){var o=n.key,u=n.value;return u?[new Or(o,u,"constants have been deprecated as of v8")]:[]}function pu(n){for(var o=[],u=arguments.length-1;u-- >0;)o[u]=arguments[u+1];for(var p=0,_=o;p<_.length;p+=1){var A=_[p];for(var k in A)n[k]=A[k]}return n}function an(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function yl(n){if(Array.isArray(n))return n.map(yl);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){var o={};for(var u in n)o[u]=yl(n[u]);return o}return an(n)}var bs=function(n){function o(u,p){n.call(this,p),this.message=p,this.key=u}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o}(Error),$u=function(o,u){u===void 0&&(u=[]),this.parent=o,this.bindings={};for(var p=0,_=u;p<_.length;p+=1){var A=_[p],k=A[0],q=A[1];this.bindings[k]=q}};$u.prototype.concat=function(o){return new $u(this,o)},$u.prototype.get=function(o){if(this.bindings[o])return this.bindings[o];if(this.parent)return this.parent.get(o);throw new Error(o+" not found in scope.")},$u.prototype.has=function(o){return this.bindings[o]?!0:this.parent?this.parent.has(o):!1};var ef={kind:"null"},Cr={kind:"number"},wa={kind:"string"},Ta={kind:"boolean"},ws={kind:"color"},gl={kind:"object"},Ma={kind:"value"},Xs={kind:"error"},mu={kind:"collator"},us={kind:"formatted"},_l={kind:"resolvedImage"};function yo(n,o){return{kind:"array",itemType:n,N:o}}function ki(n){if(n.kind==="array"){var o=ki(n.itemType);return typeof n.N=="number"?"array<"+o+", "+n.N+">":n.itemType.kind==="value"?"array":"array<"+o+">"}else return n.kind}var Ts=[ef,Cr,wa,Ta,ws,us,gl,yo(Ma),_l];function fs(n,o){if(o.kind==="error")return null;if(n.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!fs(n.itemType,o.itemType))&&(typeof n.N!="number"||n.N===o.N))return null}else{if(n.kind===o.kind)return null;if(n.kind==="value")for(var u=0,p=Ts;u255?255:j}function _(j){return j<0?0:j>1?1:j}function A(j){return j[j.length-1]==="%"?p(parseFloat(j)/100*255):p(parseInt(j))}function k(j){return j[j.length-1]==="%"?_(parseFloat(j)/100):_(parseFloat(j))}function q(j,Q,ie){return ie<0?ie+=1:ie>1&&(ie-=1),ie*6<1?j+(Q-j)*ie*6:ie*2<1?Q:ie*3<2?j+(Q-j)*(2/3-ie)*6:j}function Y(j){var Q=j.replace(/ /g,"").toLowerCase();if(Q in u)return u[Q].slice();if(Q[0]==="#"){if(Q.length===4){var ie=parseInt(Q.substr(1),16);return ie>=0&&ie<=4095?[(ie&3840)>>4|(ie&3840)>>8,ie&240|(ie&240)>>4,ie&15|(ie&15)<<4,1]:null}else if(Q.length===7){var ie=parseInt(Q.substr(1),16);return ie>=0&&ie<=16777215?[(ie&16711680)>>16,(ie&65280)>>8,ie&255,1]:null}return null}var ye=Q.indexOf("("),he=Q.indexOf(")");if(ye!==-1&&he+1===Q.length){var Me=Q.substr(0,ye),qe=Q.substr(ye+1,he-(ye+1)).split(","),st=1;switch(Me){case"rgba":if(qe.length!==4)return null;st=k(qe.pop());case"rgb":return qe.length!==3?null:[A(qe[0]),A(qe[1]),A(qe[2]),st];case"hsla":if(qe.length!==4)return null;st=k(qe.pop());case"hsl":if(qe.length!==3)return null;var Qe=(parseFloat(qe[0])%360+360)%360/360,Lt=k(qe[1]),gt=k(qe[2]),St=gt<=.5?gt*(Lt+1):gt+Lt-gt*Lt,It=gt*2-St;return[p(q(It,St,Qe+1/3)*255),p(q(It,St,Qe)*255),p(q(It,St,Qe-1/3)*255),st];default:return null}}return null}try{o.parseCSSColor=Y}catch(j){}}),Yf=Mm.parseCSSColor,ni=function(o,u,p,_){_===void 0&&(_=1),this.r=o,this.g=u,this.b=p,this.a=_};ni.parse=function(o){if(o){if(o instanceof ni)return o;if(typeof o=="string"){var u=Yf(o);if(u)return new ni(u[0]/255*u[3],u[1]/255*u[3],u[2]/255*u[3],u[3])}}},ni.prototype.toString=function(){var o=this.toArray(),u=o[0],p=o[1],_=o[2],A=o[3];return"rgba("+Math.round(u)+","+Math.round(p)+","+Math.round(_)+","+A+")"},ni.prototype.toArray=function(){var o=this,u=o.r,p=o.g,_=o.b,A=o.a;return A===0?[0,0,0,0]:[u*255/A,p*255/A,_*255/A,A]},ni.black=new ni(0,0,0,1),ni.white=new ni(1,1,1,1),ni.transparent=new ni(0,0,0,0),ni.red=new ni(1,0,0,1);var Wf=function(o,u,p){o?this.sensitivity=u?"variant":"case":this.sensitivity=u?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Wf.prototype.compare=function(o,u){return this.collator.compare(o,u)},Wf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var yv=function(o,u,p,_,A){this.text=o,this.image=u,this.scale=p,this.fontStack=_,this.textColor=A},gn=function(o){this.sections=o};gn.fromString=function(o){return new gn([new yv(o,null,null,null,null)])},gn.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(o){return o.text.length!==0||o.image&&o.image.name.length!==0})},gn.factory=function(o){return o instanceof gn?o:gn.fromString(o)},gn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(o){return o.text}).join("")},gn.prototype.serialize=function(){for(var o=["format"],u=0,p=this.sections;u=0&&n<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof u=="number"&&u>=0&&u<=255)){var _=typeof p=="number"?[n,o,u,p]:[n,o,u];return"Invalid rgba value ["+_.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof p=="undefined"||typeof p=="number"&&p>=0&&p<=1?null:"Invalid rgba value ["+[n,o,u,p].join(", ")+"]: 'a' must be between 0 and 1."}function tf(n){if(n===null)return!0;if(typeof n=="string")return!0;if(typeof n=="boolean")return!0;if(typeof n=="number")return!0;if(n instanceof ni)return!0;if(n instanceof Wf)return!0;if(n instanceof gn)return!0;if(n instanceof Pn)return!0;if(Array.isArray(n)){for(var o=0,u=n;o2){var q=o[1];if(typeof q!="string"||!(q in Xf)||q==="object")return u.error('The item type argument of "array" must be one of string, number, boolean',1);k=Xf[q],p++}else k=Ma;var Y;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return u.error('The length argument to "array" must be a positive integer literal',2);Y=o[2],p++}_=yo(k,Y)}else _=Xf[A];for(var j=[];p1)&&u.push(_)}}return u.concat(this.args.map(function(A){return A.serialize()}))};var Yo=function(o){this.type=us,this.sections=o};Yo.parse=function(o,u){if(o.length<2)return u.error("Expected at least one argument.");var p=o[1];if(!Array.isArray(p)&&typeof p=="object")return u.error("First argument must be an image or text section.");for(var _=[],A=!1,k=1;k<=o.length-1;++k){var q=o[k];if(A&&typeof q=="object"&&!Array.isArray(q)){A=!1;var Y=null;if(q["font-scale"]&&(Y=u.parse(q["font-scale"],1,Cr),!Y))return null;var j=null;if(q["text-font"]&&(j=u.parse(q["text-font"],1,yo(wa)),!j))return null;var Q=null;if(q["text-color"]&&(Q=u.parse(q["text-color"],1,ws),!Q))return null;var ie=_[_.length-1];ie.scale=Y,ie.font=j,ie.textColor=Q}else{var ye=u.parse(o[k],1,Ma);if(!ye)return null;var he=ye.type.kind;if(he!=="string"&&he!=="value"&&he!=="null"&&he!=="resolvedImage")return u.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");A=!0,_.push({content:ye,scale:null,font:null,textColor:null})}}return new Yo(_)},Yo.prototype.evaluate=function(o){var u=function(p){var _=p.content.evaluate(o);return nn(_)===_l?new yv("",_,null,null,null):new yv(Eo(_),null,p.scale?p.scale.evaluate(o):null,p.font?p.font.evaluate(o).join(","):null,p.textColor?p.textColor.evaluate(o):null)};return new gn(this.sections.map(u))},Yo.prototype.eachChild=function(o){for(var u=0,p=this.sections;u-1),p},js.prototype.eachChild=function(o){o(this.input)},js.prototype.outputDefined=function(){return!1},js.prototype.serialize=function(){return["image",this.input.serialize()]};var Sm={"to-boolean":Ta,"to-color":ws,"to-number":Cr,"to-string":wa},Wo=function(o,u){this.type=o,this.args=u};Wo.parse=function(o,u){if(o.length<2)return u.error("Expected at least one argument.");var p=o[0];if((p==="to-boolean"||p==="to-string")&&o.length!==2)return u.error("Expected one argument.");for(var _=Sm[p],A=[],k=1;k4?p="Invalid rbga value "+JSON.stringify(u)+": expected an array containing either three or four numeric values.":p=rp(u[0],u[1],u[2],u[3]),!p))return new ni(u[0]/255,u[1]/255,u[2]/255,u[3])}throw new un(p||"Could not parse color from value '"+(typeof u=="string"?u:String(JSON.stringify(u)))+"'")}else if(this.type.kind==="number"){for(var Y=null,j=0,Q=this.args;j=o[2]||n[1]<=o[1]||n[3]>=o[3])}function Pm(n,o){var u=Em(n[0]),p=Lm(n[1]),_=Math.pow(2,o.z);return[Math.round(u*_*bl),Math.round(p*_*bl)]}function Dm(n,o,u){var p=n[0]-o[0],_=n[1]-o[1],A=n[0]-u[0],k=n[1]-u[1];return p*k-A*_===0&&p*A<=0&&_*k<=0}function zm(n,o,u){return o[1]>n[1]!=u[1]>n[1]&&n[0]<(u[0]-o[0])*(n[1]-o[1])/(u[1]-o[1])+o[0]}function _v(n,o){for(var u=!1,p=0,_=o.length;p<_;p++)for(var A=o[p],k=0,q=A.length;k0&&ie<0||Q<0&&ie>0}function ap(n,o,u,p){var _=[o[0]-n[0],o[1]-n[1]],A=[p[0]-u[0],p[1]-u[1]];return Rm(A,_)===0?!1:!!(xv(n,o,u,p)&&xv(u,p,n,o))}function ip(n,o,u){for(var p=0,_=u;p<_.length;p+=1)for(var A=_[p],k=0;ku[2]){var _=p*.5,A=n[0]-u[0]>_?-p:u[0]-n[0]>_?p:0;A===0&&(A=n[0]-u[2]>_?-p:u[2]-n[0]>_?p:0),n[0]+=A}gv(o,n)}function qm(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function op(n,o,u,p){for(var _=Math.pow(2,p.z)*bl,A=[p.x*bl,p.y*bl],k=[],q=0,Y=n;q=0)return!1;var u=!0;return n.eachChild(function(p){u&&!Vc(p,o)&&(u=!1)}),u}var Tl=function(o,u){this.type=u.type,this.name=o,this.boundExpression=u};Tl.parse=function(o,u){if(o.length!==2||typeof o[1]!="string")return u.error("'var' expression requires exactly one string literal argument.");var p=o[1];return u.scope.has(p)?new Tl(p,u.scope.get(p)):u.error('Unknown variable "'+p+'". Make sure "'+p+'" has been bound in an enclosing "let" expression before using it.',1)},Tl.prototype.evaluate=function(o){return this.boundExpression.evaluate(o)},Tl.prototype.eachChild=function(){},Tl.prototype.outputDefined=function(){return!1},Tl.prototype.serialize=function(){return["var",this.name]};var Al=function(o,u,p,_,A){u===void 0&&(u=[]),_===void 0&&(_=new $u),A===void 0&&(A=[]),this.registry=o,this.path=u,this.key=u.map(function(k){return"["+k+"]"}).join(""),this.scope=_,this.errors=A,this.expectedType=p};Al.prototype.parse=function(o,u,p,_,A){return A===void 0&&(A={}),u?this.concat(u,p,_)._parse(o,A):this._parse(o,A)},Al.prototype._parse=function(o,u){(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number")&&(o=["literal",o]);function p(Q,ie,ye){return ye==="assert"?new on(ie,[Q]):ye==="coerce"?new Wo(ie,[Q]):Q}if(Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var _=o[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 A=this.registry[_];if(A){var k=A.parse(o,this);if(!k)return null;if(this.expectedType){var q=this.expectedType,Y=k.type;if((q.kind==="string"||q.kind==="number"||q.kind==="boolean"||q.kind==="object"||q.kind==="array")&&Y.kind==="value")k=p(k,q,u.typeAnnotation||"assert");else if((q.kind==="color"||q.kind==="formatted"||q.kind==="resolvedImage")&&(Y.kind==="value"||Y.kind==="string"))k=p(k,q,u.typeAnnotation||"coerce");else if(this.checkSubtype(q,Y))return null}if(!(k instanceof Zo)&&k.type.kind!=="resolvedImage"&&Tv(k)){var j=new Js;try{k=new Zo(k.type,k.evaluate(j))}catch(Q){return this.error(Q.message),null}}return k}return this.error('Unknown expression "'+_+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof o=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof o=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof o+" instead.")},Al.prototype.concat=function(o,u,p){var _=typeof o=="number"?this.path.concat(o):this.path,A=p?this.scope.concat(p):this.scope;return new Al(this.registry,_,u||null,A,this.errors)},Al.prototype.error=function(o){for(var u=[],p=arguments.length-1;p-- >0;)u[p]=arguments[p+1];var _=""+this.key+u.map(function(A){return"["+A+"]"}).join("");this.errors.push(new bs(_,o))},Al.prototype.checkSubtype=function(o,u){var p=fs(o,u);return p&&this.error(p),p};function Tv(n){if(n instanceof Tl)return Tv(n.boundExpression);if(n instanceof Dn&&n.name==="error")return!1;if(n instanceof xl)return!1;if(n instanceof cs)return!1;var o=n instanceof Wo||n instanceof on,u=!0;return n.eachChild(function(p){o?u=u&&Tv(p):u=u&&p instanceof Zo}),u?Uc(n)&&Vc(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Hc(n,o){for(var u=n.length-1,p=0,_=u,A=0,k,q;p<=_;)if(A=Math.floor((p+_)/2),k=n[A],q=n[A+1],k<=o){if(A===u||oo)_=A-1;else throw new un("Input is not a number.");return 0}var As=function(o,u,p){this.type=o,this.input=u,this.labels=[],this.outputs=[];for(var _=0,A=p;_=q)return u.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',j);var ie=u.parse(Y,Q,A);if(!ie)return null;A=A||ie.type,_.push([q,ie])}return new As(A,p,_)},As.prototype.evaluate=function(o){var u=this.labels,p=this.outputs;if(u.length===1)return p[0].evaluate(o);var _=this.input.evaluate(o);if(_<=u[0])return p[0].evaluate(o);var A=u.length;if(_>=u[A-1])return p[A-1].evaluate(o);var k=Hc(u,_);return p[k].evaluate(o)},As.prototype.eachChild=function(o){o(this.input);for(var u=0,p=this.outputs;u0&&o.push(this.labels[u]),o.push(this.outputs[u].serialize());return o};function fn(n,o,u){return n*(1-u)+o*u}function Bm(n,o,u){return new ni(fn(n.r,o.r,u),fn(n.g,o.g,u),fn(n.b,o.b,u),fn(n.a,o.a,u))}function Om(n,o,u){return n.map(function(p,_){return fn(p,o[_],u)})}var Ml=Object.freeze({__proto__:null,number:fn,color:Bm,array:Om}),rf=.95047,hs=1,up=1.08883,fp=4/29,af=6/29,cp=3*af*af,hp=af*af*af,Um=Math.PI/180,Vm=180/Math.PI;function Av(n){return n>hp?Math.pow(n,1/3):n/cp+fp}function Mv(n){return n>af?n*n*n:cp*(n-fp)}function Sv(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function jf(n){return n/=255,n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Gc(n){var o=jf(n.r),u=jf(n.g),p=jf(n.b),_=Av((.4124564*o+.3575761*u+.1804375*p)/rf),A=Av((.2126729*o+.7151522*u+.072175*p)/hs),k=Av((.0193339*o+.119192*u+.9503041*p)/up);return{l:116*A-16,a:500*(_-A),b:200*(A-k),alpha:n.a}}function vp(n){var o=(n.l+16)/116,u=isNaN(n.a)?o:o+n.a/500,p=isNaN(n.b)?o:o-n.b/200;return o=hs*Mv(o),u=rf*Mv(u),p=up*Mv(p),new ni(Sv(3.2404542*u-1.5371385*o-.4985314*p),Sv(-.969266*u+1.8760108*o+.041556*p),Sv(.0556434*u-.2040259*o+1.0572252*p),n.alpha)}function Fi(n,o,u){return{l:fn(n.l,o.l,u),a:fn(n.a,o.a,u),b:fn(n.b,o.b,u),alpha:fn(n.alpha,o.alpha,u)}}function Hm(n){var o=Gc(n),u=o.l,p=o.a,_=o.b,A=Math.atan2(_,p)*Vm;return{h:A<0?A+360:A,c:Math.sqrt(p*p+_*_),l:u,alpha:n.a}}function Zc(n){var o=n.h*Um,u=n.c,p=n.l;return vp({l:p,a:Math.cos(o)*u,b:Math.sin(o)*u,alpha:n.alpha})}function kv(n,o,u){var p=o-n;return n+u*(p>180||p<-180?p-360*Math.round(p/360):p)}function dp(n,o,u){return{h:kv(n.h,o.h,u),c:fn(n.c,o.c,u),l:fn(n.l,o.l,u),alpha:fn(n.alpha,o.alpha,u)}}var nf={forward:Gc,reverse:vp,interpolate:Fi},_u={forward:Hm,reverse:Zc,interpolate:dp},Cv=Object.freeze({__proto__:null,lab:nf,hcl:_u}),_n=function(o,u,p,_,A){this.type=o,this.operator=u,this.interpolation=p,this.input=_,this.labels=[],this.outputs=[];for(var k=0,q=A;k1}))return u.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:Y}}else return u.error("Unknown interpolation type "+String(_[0]),1,0);if(o.length-1<4)return u.error("Expected at least 4 arguments, but found only "+(o.length-1)+".");if((o.length-1)%2!==0)return u.error("Expected an even number of arguments.");if(A=u.parse(A,2,Cr),!A)return null;var j=[],Q=null;p==="interpolate-hcl"||p==="interpolate-lab"?Q=ws:u.expectedType&&u.expectedType.kind!=="value"&&(Q=u.expectedType);for(var ie=0;ie=ye)return u.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Me);var st=u.parse(he,qe,Q);if(!st)return null;Q=Q||st.type,j.push([ye,st])}return Q.kind!=="number"&&Q.kind!=="color"&&!(Q.kind==="array"&&Q.itemType.kind==="number"&&typeof Q.N=="number")?u.error("Type "+ki(Q)+" is not interpolatable."):new _n(Q,p,_,A,j)},_n.prototype.evaluate=function(o){var u=this.labels,p=this.outputs;if(u.length===1)return p[0].evaluate(o);var _=this.input.evaluate(o);if(_<=u[0])return p[0].evaluate(o);var A=u.length;if(_>=u[A-1])return p[A-1].evaluate(o);var k=Hc(u,_),q=u[k],Y=u[k+1],j=_n.interpolationFactor(this.interpolation,_,q,Y),Q=p[k].evaluate(o),ie=p[k+1].evaluate(o);return this.operator==="interpolate"?Ml[this.type.kind.toLowerCase()](Q,ie,j):this.operator==="interpolate-hcl"?_u.reverse(_u.interpolate(_u.forward(Q),_u.forward(ie),j)):nf.reverse(nf.interpolate(nf.forward(Q),nf.forward(ie),j))},_n.prototype.eachChild=function(o){o(this.input);for(var u=0,p=this.outputs;u=p.length)throw new un("Array index out of bounds: "+u+" > "+(p.length-1)+".");if(u!==Math.floor(u))throw new un("Array index must be an integer, but found "+u+" instead.");return p[u]},kl.prototype.eachChild=function(o){o(this.index),o(this.input)},kl.prototype.outputDefined=function(){return!1},kl.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Cl=function(o,u){this.type=Ta,this.needle=o,this.haystack=u};Cl.parse=function(o,u){if(o.length!==3)return u.error("Expected 2 arguments, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1,Ma),_=u.parse(o[2],2,Ma);return!p||!_?null:Bc(p.type,[Ta,wa,Cr,ef,Ma])?new Cl(p,_):u.error("Expected first argument to be of type boolean, string, number or null, but found "+ki(p.type)+" instead")},Cl.prototype.evaluate=function(o){var u=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!yu(u,["boolean","string","number","null"]))throw new un("Expected first argument to be of type boolean, string, number or null, but found "+ki(nn(u))+" instead.");if(!yu(p,["string","array"]))throw new un("Expected second argument to be of type array or string, but found "+ki(nn(p))+" instead.");return p.indexOf(u)>=0},Cl.prototype.eachChild=function(o){o(this.needle),o(this.haystack)},Cl.prototype.outputDefined=function(){return!0},Cl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Qs=function(o,u,p){this.type=Cr,this.needle=o,this.haystack=u,this.fromIndex=p};Qs.parse=function(o,u){if(o.length<=2||o.length>=5)return u.error("Expected 3 or 4 arguments, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1,Ma),_=u.parse(o[2],2,Ma);if(!p||!_)return null;if(!Bc(p.type,[Ta,wa,Cr,ef,Ma]))return u.error("Expected first argument to be of type boolean, string, number or null, but found "+ki(p.type)+" instead");if(o.length===4){var A=u.parse(o[3],3,Cr);return A?new Qs(p,_,A):null}else return new Qs(p,_)},Qs.prototype.evaluate=function(o){var u=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!yu(u,["boolean","string","number","null"]))throw new un("Expected first argument to be of type boolean, string, number or null, but found "+ki(nn(u))+" instead.");if(!yu(p,["string","array"]))throw new un("Expected second argument to be of type array or string, but found "+ki(nn(p))+" instead.");if(this.fromIndex){var _=this.fromIndex.evaluate(o);return p.indexOf(u,_)}return p.indexOf(u)},Qs.prototype.eachChild=function(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)},Qs.prototype.outputDefined=function(){return!1},Qs.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var o=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),o]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ms=function(o,u,p,_,A,k){this.inputType=o,this.type=u,this.input=p,this.cases=_,this.outputs=A,this.otherwise=k};Ms.parse=function(o,u){if(o.length<5)return u.error("Expected at least 4 arguments, but found only "+(o.length-1)+".");if(o.length%2!==1)return u.error("Expected an even number of arguments.");var p,_;u.expectedType&&u.expectedType.kind!=="value"&&(_=u.expectedType);for(var A={},k=[],q=2;qNumber.MAX_SAFE_INTEGER)return Q.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof he=="number"&&Math.floor(he)!==he)return Q.error("Numeric branch labels must be integer values.");if(!p)p=nn(he);else if(Q.checkSubtype(p,nn(he)))return null;if(typeof A[String(he)]!="undefined")return Q.error("Branch labels must be unique.");A[String(he)]=k.length}var Me=u.parse(j,q,_);if(!Me)return null;_=_||Me.type,k.push(Me)}var qe=u.parse(o[1],1,Ma);if(!qe)return null;var st=u.parse(o[o.length-1],o.length-1,_);return!st||qe.type.kind!=="value"&&u.concat(1).checkSubtype(p,qe.type)?null:new Ms(p,_,qe,A,k,st)},Ms.prototype.evaluate=function(o){var u=this.input.evaluate(o),p=nn(u)===this.inputType&&this.outputs[this.cases[u]]||this.otherwise;return p.evaluate(o)},Ms.prototype.eachChild=function(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)},Ms.prototype.outputDefined=function(){return this.outputs.every(function(o){return o.outputDefined()})&&this.otherwise.outputDefined()},Ms.prototype.serialize=function(){for(var o=this,u=["match",this.input.serialize()],p=Object.keys(this.cases).sort(),_=[],A={},k=0,q=p;k=5)return u.error("Expected 3 or 4 arguments, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1,Ma),_=u.parse(o[2],2,Cr);if(!p||!_)return null;if(!Bc(p.type,[yo(Ma),wa,Ma]))return u.error("Expected first argument to be of type array or string, but found "+ki(p.type)+" instead");if(o.length===4){var A=u.parse(o[3],3,Cr);return A?new El(p.type,p,_,A):null}else return new El(p.type,p,_)},El.prototype.evaluate=function(o){var u=this.input.evaluate(o),p=this.beginIndex.evaluate(o);if(!yu(u,["string","array"]))throw new un("Expected first argument to be of type array or string, but found "+ki(nn(u))+" instead.");if(this.endIndex){var _=this.endIndex.evaluate(o);return u.slice(p,_)}return u.slice(p)},El.prototype.eachChild=function(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)},El.prototype.outputDefined=function(){return!1},El.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var o=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),o]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function pp(n,o){return n==="=="||n==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Gm(n,o,u){return o===u}function Zm(n,o,u){return o!==u}function Ym(n,o,u){return ou}function yp(n,o,u){return o<=u}function Ev(n,o,u){return o>=u}function Lv(n,o,u,p){return p.compare(o,u)===0}function Kf(n,o,u,p){return!Lv(n,o,u,p)}function Yc(n,o,u,p){return p.compare(o,u)<0}function gp(n,o,u,p){return p.compare(o,u)>0}function Pv(n,o,u,p){return p.compare(o,u)<=0}function _p(n,o,u,p){return p.compare(o,u)>=0}function of(n,o,u){var p=n!=="=="&&n!=="!=";return function(){function _(A,k,q){this.type=Ta,this.lhs=A,this.rhs=k,this.collator=q,this.hasUntypedArgument=A.type.kind==="value"||k.type.kind==="value"}return _.parse=function(k,q){if(k.length!==3&&k.length!==4)return q.error("Expected two or three arguments.");var Y=k[0],j=q.parse(k[1],1,Ma);if(!j)return null;if(!pp(Y,j.type))return q.concat(1).error('"'+Y+`" comparisons are not supported for type '`+ki(j.type)+"'.");var Q=q.parse(k[2],2,Ma);if(!Q)return null;if(!pp(Y,Q.type))return q.concat(2).error('"'+Y+`" comparisons are not supported for type '`+ki(Q.type)+"'.");if(j.type.kind!==Q.type.kind&&j.type.kind!=="value"&&Q.type.kind!=="value")return q.error("Cannot compare types '"+ki(j.type)+"' and '"+ki(Q.type)+"'.");p&&(j.type.kind==="value"&&Q.type.kind!=="value"?j=new on(Q.type,[j]):j.type.kind!=="value"&&Q.type.kind==="value"&&(Q=new on(j.type,[Q])));var ie=null;if(k.length===4){if(j.type.kind!=="string"&&Q.type.kind!=="string"&&j.type.kind!=="value"&&Q.type.kind!=="value")return q.error("Cannot use collator to compare non-string types.");if(ie=q.parse(k[3],3,mu),!ie)return null}return new _(j,Q,ie)},_.prototype.evaluate=function(k){var q=this.lhs.evaluate(k),Y=this.rhs.evaluate(k);if(p&&this.hasUntypedArgument){var j=nn(q),Q=nn(Y);if(j.kind!==Q.kind||!(j.kind==="string"||j.kind==="number"))throw new un('Expected arguments for "'+n+'" to be (string, string) or (number, number), but found ('+j.kind+", "+Q.kind+") instead.")}if(this.collator&&!p&&this.hasUntypedArgument){var ie=nn(q),ye=nn(Y);if(ie.kind!=="string"||ye.kind!=="string")return o(k,q,Y)}return this.collator?u(k,q,Y,this.collator.evaluate(k)):o(k,q,Y)},_.prototype.eachChild=function(k){k(this.lhs),k(this.rhs),this.collator&&k(this.collator)},_.prototype.outputDefined=function(){return!0},_.prototype.serialize=function(){var k=[n];return this.eachChild(function(q){k.push(q.serialize())}),k},_}()}var Wm=of("==",Gm,Lv),xp=of("!=",Zm,Kf),bp=of("<",Ym,Yc),wp=of(">",mp,gp),Dv=of("<=",yp,Pv),zv=of(">=",Ev,_p),xu=function(o,u,p,_,A){this.type=wa,this.number=o,this.locale=u,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=A};xu.parse=function(o,u){if(o.length!==3)return u.error("Expected two arguments.");var p=u.parse(o[1],1,Cr);if(!p)return null;var _=o[2];if(typeof _!="object"||Array.isArray(_))return u.error("NumberFormat options argument must be an object.");var A=null;if(_.locale&&(A=u.parse(_.locale,1,wa),!A))return null;var k=null;if(_.currency&&(k=u.parse(_.currency,1,wa),!k))return null;var q=null;if(_["min-fraction-digits"]&&(q=u.parse(_["min-fraction-digits"],1,Cr),!q))return null;var Y=null;return _["max-fraction-digits"]&&(Y=u.parse(_["max-fraction-digits"],1,Cr),!Y)?null:new xu(p,A,k,q,Y)},xu.prototype.evaluate=function(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))},xu.prototype.eachChild=function(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){var o={};return this.locale&&(o.locale=this.locale.serialize()),this.currency&&(o.currency=this.currency.serialize()),this.minFractionDigits&&(o["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(o["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),o]};var Ll=function(o){this.type=Cr,this.input=o};Ll.parse=function(o,u){if(o.length!==2)return u.error("Expected 1 argument, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?u.error("Expected argument of type string or array, but found "+ki(p.type)+" instead."):new Ll(p):null},Ll.prototype.evaluate=function(o){var u=this.input.evaluate(o);if(typeof u=="string")return u.length;if(Array.isArray(u))return u.length;throw new un("Expected value to be of type string or array, but found "+ki(nn(u))+" instead.")},Ll.prototype.eachChild=function(o){o(this.input)},Ll.prototype.outputDefined=function(){return!1},Ll.prototype.serialize=function(){var o=["length"];return this.eachChild(function(u){o.push(u.serialize())}),o};var Qf={"==":Wm,"!=":xp,">":wp,"<":bp,">=":zv,"<=":Dv,array:on,at:kl,boolean:on,case:Ss,coalesce:Ks,collator:xl,format:Yo,image:js,in:Cl,"index-of":Qs,interpolate:_n,"interpolate-hcl":_n,"interpolate-lab":_n,length:Ll,let:Sl,literal:Zo,match:Ms,number:on,"number-format":xu,object:on,slice:El,step:As,string:on,"to-boolean":Wo,"to-color":Wo,"to-number":Wo,"to-string":Wo,var:Tl,within:cs};function Iv(n,o){var u=o[0],p=o[1],_=o[2],A=o[3];u=u.evaluate(n),p=p.evaluate(n),_=_.evaluate(n);var k=A?A.evaluate(n):1,q=rp(u,p,_,k);if(q)throw new un(q);return new ni(u/255*k,p/255*k,_/255*k,k)}function Wc(n,o){return n in o}function Xc(n,o){var u=o[n];return typeof u=="undefined"?null:u}function jc(n,o,u,p){for(;u<=p;){var _=u+p>>1;if(o[_]===n)return!0;o[_]>n?p=_-1:u=_+1}return!1}function Pl(n){return{type:n}}Dn.register(Qf,{error:[Xs,[wa],function(n,o){var u=o[0];throw new un(u.evaluate(n))}],typeof:[wa,[Ma],function(n,o){var u=o[0];return ki(nn(u.evaluate(n)))}],"to-rgba":[yo(Cr,4),[ws],function(n,o){var u=o[0];return u.evaluate(n).toArray()}],rgb:[ws,[Cr,Cr,Cr],Iv],rgba:[ws,[Cr,Cr,Cr,Cr],Iv],has:{type:Ta,overloads:[[[wa],function(n,o){var u=o[0];return Wc(u.evaluate(n),n.properties())}],[[wa,gl],function(n,o){var u=o[0],p=o[1];return Wc(u.evaluate(n),p.evaluate(n))}]]},get:{type:Ma,overloads:[[[wa],function(n,o){var u=o[0];return Xc(u.evaluate(n),n.properties())}],[[wa,gl],function(n,o){var u=o[0],p=o[1];return Xc(u.evaluate(n),p.evaluate(n))}]]},"feature-state":[Ma,[wa],function(n,o){var u=o[0];return Xc(u.evaluate(n),n.featureState||{})}],properties:[gl,[],function(n){return n.properties()}],"geometry-type":[wa,[],function(n){return n.geometryType()}],id:[Ma,[],function(n){return n.id()}],zoom:[Cr,[],function(n){return n.globals.zoom}],"heatmap-density":[Cr,[],function(n){return n.globals.heatmapDensity||0}],"line-progress":[Cr,[],function(n){return n.globals.lineProgress||0}],accumulated:[Ma,[],function(n){return n.globals.accumulated===void 0?null:n.globals.accumulated}],"+":[Cr,Pl(Cr),function(n,o){for(var u=0,p=0,_=o;p<_.length;p+=1){var A=_[p];u+=A.evaluate(n)}return u}],"*":[Cr,Pl(Cr),function(n,o){for(var u=1,p=0,_=o;p<_.length;p+=1){var A=_[p];u*=A.evaluate(n)}return u}],"-":{type:Cr,overloads:[[[Cr,Cr],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)-p.evaluate(n)}],[[Cr],function(n,o){var u=o[0];return-u.evaluate(n)}]]},"/":[Cr,[Cr,Cr],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)/p.evaluate(n)}],"%":[Cr,[Cr,Cr],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)%p.evaluate(n)}],ln2:[Cr,[],function(){return Math.LN2}],pi:[Cr,[],function(){return Math.PI}],e:[Cr,[],function(){return Math.E}],"^":[Cr,[Cr,Cr],function(n,o){var u=o[0],p=o[1];return Math.pow(u.evaluate(n),p.evaluate(n))}],sqrt:[Cr,[Cr],function(n,o){var u=o[0];return Math.sqrt(u.evaluate(n))}],log10:[Cr,[Cr],function(n,o){var u=o[0];return Math.log(u.evaluate(n))/Math.LN10}],ln:[Cr,[Cr],function(n,o){var u=o[0];return Math.log(u.evaluate(n))}],log2:[Cr,[Cr],function(n,o){var u=o[0];return Math.log(u.evaluate(n))/Math.LN2}],sin:[Cr,[Cr],function(n,o){var u=o[0];return Math.sin(u.evaluate(n))}],cos:[Cr,[Cr],function(n,o){var u=o[0];return Math.cos(u.evaluate(n))}],tan:[Cr,[Cr],function(n,o){var u=o[0];return Math.tan(u.evaluate(n))}],asin:[Cr,[Cr],function(n,o){var u=o[0];return Math.asin(u.evaluate(n))}],acos:[Cr,[Cr],function(n,o){var u=o[0];return Math.acos(u.evaluate(n))}],atan:[Cr,[Cr],function(n,o){var u=o[0];return Math.atan(u.evaluate(n))}],min:[Cr,Pl(Cr),function(n,o){return Math.min.apply(Math,o.map(function(u){return u.evaluate(n)}))}],max:[Cr,Pl(Cr),function(n,o){return Math.max.apply(Math,o.map(function(u){return u.evaluate(n)}))}],abs:[Cr,[Cr],function(n,o){var u=o[0];return Math.abs(u.evaluate(n))}],round:[Cr,[Cr],function(n,o){var u=o[0],p=u.evaluate(n);return p<0?-Math.round(-p):Math.round(p)}],floor:[Cr,[Cr],function(n,o){var u=o[0];return Math.floor(u.evaluate(n))}],ceil:[Cr,[Cr],function(n,o){var u=o[0];return Math.ceil(u.evaluate(n))}],"filter-==":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1];return n.properties()[u.value]===p.value}],"filter-id-==":[Ta,[Ma],function(n,o){var u=o[0];return n.id()===u.value}],"filter-type-==":[Ta,[wa],function(n,o){var u=o[0];return n.geometryType()===u.value}],"filter-<":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_>A}],"filter-id->":[Ta,[Ma],function(n,o){var u=o[0],p=n.id(),_=u.value;return typeof p==typeof _&&p>_}],"filter-<=":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_<=A}],"filter-id-<=":[Ta,[Ma],function(n,o){var u=o[0],p=n.id(),_=u.value;return typeof p==typeof _&&p<=_}],"filter->=":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_>=A}],"filter-id->=":[Ta,[Ma],function(n,o){var u=o[0],p=n.id(),_=u.value;return typeof p==typeof _&&p>=_}],"filter-has":[Ta,[Ma],function(n,o){var u=o[0];return u.value in n.properties()}],"filter-has-id":[Ta,[],function(n){return n.id()!==null&&n.id()!==void 0}],"filter-type-in":[Ta,[yo(wa)],function(n,o){var u=o[0];return u.value.indexOf(n.geometryType())>=0}],"filter-id-in":[Ta,[yo(Ma)],function(n,o){var u=o[0];return u.value.indexOf(n.id())>=0}],"filter-in-small":[Ta,[wa,yo(Ma)],function(n,o){var u=o[0],p=o[1];return p.value.indexOf(n.properties()[u.value])>=0}],"filter-in-large":[Ta,[wa,yo(Ma)],function(n,o){var u=o[0],p=o[1];return jc(n.properties()[u.value],p.value,0,p.value.length-1)}],all:{type:Ta,overloads:[[[Ta,Ta],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)&&p.evaluate(n)}],[Pl(Ta),function(n,o){for(var u=0,p=o;u-1}function Kc(n){return!!n.expression&&n.expression.interpolated}function di(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function $f(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Ap(n){return n}function Mp(n,o){var u=o.type==="color",p=n.stops&&typeof n.stops[0][0]=="object",_=p||n.property!==void 0,A=p||!_,k=n.type||(Kc(o)?"exponential":"interval");if(u&&(n=pu({},n),n.stops&&(n.stops=n.stops.map(function(ur){return[ur[0],ni.parse(ur[1])]})),n.default?n.default=ni.parse(n.default):n.default=ni.parse(o.default)),n.colorSpace&&n.colorSpace!=="rgb"&&!Cv[n.colorSpace])throw new Error("Unknown color space: "+n.colorSpace);var q,Y,j;if(k==="exponential")q=Rv;else if(k==="interval")q=kp;else if(k==="categorical"){q=Sp,Y=Object.create(null);for(var Q=0,ie=n.stops;Q=n.stops[p-1][0])return n.stops[p-1][1];var _=Hc(n.stops.map(function(A){return A[0]}),u);return n.stops[_][1]}function Rv(n,o,u){var p=n.base!==void 0?n.base:1;if(di(u)!=="number")return Dl(n.default,o.default);var _=n.stops.length;if(_===1||u<=n.stops[0][0])return n.stops[0][1];if(u>=n.stops[_-1][0])return n.stops[_-1][1];var A=Hc(n.stops.map(function(ie){return ie[0]}),u),k=Xm(u,p,n.stops[A][0],n.stops[A+1][0]),q=n.stops[A][1],Y=n.stops[A+1][1],j=Ml[o.type]||Ap;if(n.colorSpace&&n.colorSpace!=="rgb"){var Q=Cv[n.colorSpace];j=function(ie,ye){return Q.reverse(Q.interpolate(Q.forward(ie),Q.forward(ye),k))}}return typeof q.evaluate=="function"?{evaluate:function(){for(var ye=[],he=arguments.length;he--;)ye[he]=arguments[he];var Me=q.evaluate.apply(void 0,ye),qe=Y.evaluate.apply(void 0,ye);if(!(Me===void 0||qe===void 0))return j(Me,qe,k)}}:j(q,Y,k)}function Cp(n,o,u){return o.type==="color"?u=ni.parse(u):o.type==="formatted"?u=gn.fromString(u.toString()):o.type==="resolvedImage"?u=Pn.fromString(u.toString()):di(u)!==o.type&&(o.type!=="enum"||!o.values[u])&&(u=void 0),Dl(u,n.default,o.default)}function Xm(n,o,u,p){var _=p-u,A=n-u;return _===0?0:o===1?A/_:(Math.pow(o,A)-1)/(Math.pow(o,_)-1)}var zl=function(o,u){this.expression=o,this._warningHistory={},this._evaluator=new Js,this._defaultValue=u?Jm(u):null,this._enumValues=u&&u.type==="enum"?u.values:null};zl.prototype.evaluateWithoutErrorHandling=function(o,u,p,_,A,k){return this._evaluator.globals=o,this._evaluator.feature=u,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=A||null,this._evaluator.formattedSection=k,this.expression.evaluate(this._evaluator)},zl.prototype.evaluate=function(o,u,p,_,A,k){this._evaluator.globals=o,this._evaluator.feature=u||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=A||null,this._evaluator.formattedSection=k||null;try{var q=this.expression.evaluate(this._evaluator);if(q==null||typeof q=="number"&&q!==q)return this._defaultValue;if(this._enumValues&&!(q in this._enumValues))throw new un("Expected value to be one of "+Object.keys(this._enumValues).map(function(Y){return JSON.stringify(Y)}).join(", ")+", but found "+JSON.stringify(q)+" instead.");return q}catch(Y){return this._warningHistory[Y.message]||(this._warningHistory[Y.message]=!0,typeof console!="undefined"&&console.warn(Y.message)),this._defaultValue}};function wu(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Qf}function ec(n,o){var u=new Al(Qf,[],o?Fv(o):void 0),p=u.parse(n,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?Jc(new zl(p,o)):bu(u.errors)}var ks=function(o,u){this.kind=o,this._styleExpression=u,this.isStateDependent=o!=="constant"&&!wl(u.expression)};ks.prototype.evaluateWithoutErrorHandling=function(o,u,p,_,A,k){return this._styleExpression.evaluateWithoutErrorHandling(o,u,p,_,A,k)},ks.prototype.evaluate=function(o,u,p,_,A,k){return this._styleExpression.evaluate(o,u,p,_,A,k)};var Cs=function(o,u,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=u,this.isStateDependent=o!=="camera"&&!wl(u.expression),this.interpolationType=_};Cs.prototype.evaluateWithoutErrorHandling=function(o,u,p,_,A,k){return this._styleExpression.evaluateWithoutErrorHandling(o,u,p,_,A,k)},Cs.prototype.evaluate=function(o,u,p,_,A,k){return this._styleExpression.evaluate(o,u,p,_,A,k)},Cs.prototype.interpolationFactor=function(o,u,p){return this.interpolationType?_n.interpolationFactor(this.interpolationType,o,u,p):0};function Xo(n,o){if(n=ec(n,o),n.result==="error")return n;var u=n.value.expression,p=Uc(u);if(!p&&!sf(o))return bu([new bs("","data expressions not supported")]);var _=Vc(u,["zoom"]);if(!_&&!Tp(o))return bu([new bs("","zoom expressions not supported")]);var A=uf(u);if(!A&&!_)return bu([new bs("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(A instanceof bs)return bu([A]);if(A instanceof _n&&!Kc(o))return bu([new bs("",'"interpolate" expressions cannot be used with this property')]);if(!A)return Jc(p?new ks("constant",n.value):new ks("source",n.value));var k=A instanceof _n?A.interpolation:void 0;return Jc(p?new Cs("camera",n.value,A.labels,k):new Cs("composite",n.value,A.labels,k))}var lf=function(o,u){this._parameters=o,this._specification=u,pu(this,Mp(this._parameters,this._specification))};lf.deserialize=function(o){return new lf(o._parameters,o._specification)},lf.serialize=function(o){return{_parameters:o._parameters,_specification:o._specification}};function jm(n,o){if($f(n))return new lf(n,o);if(wu(n)){var u=Xo(n,o);if(u.result==="error")throw new Error(u.value.map(function(_){return _.key+": "+_.message}).join(", "));return u.value}else{var p=n;return typeof n=="string"&&o.type==="color"&&(p=ni.parse(n)),{kind:"constant",evaluate:function(){return p}}}}function uf(n){var o=null;if(n instanceof Sl)o=uf(n.result);else if(n instanceof Ks)for(var u=0,p=n.args;up.maximum?[new Or(o,u,u+" is greater than the maximum value "+p.maximum)]:[]}function Qc(n){var o=n.valueSpec,u=an(n.value.type),p,_={},A,k,q=u!=="categorical"&&n.value.property===void 0,Y=!q,j=di(n.value.stops)==="array"&&di(n.value.stops[0])==="array"&&di(n.value.stops[0][0])==="object",Q=vs({key:n.key,value:n.value,valueSpec:n.styleSpec.function,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:ie,default:Me}});return u==="identity"&&q&&Q.push(new Or(n.key,n.value,'missing required property "property"')),u!=="identity"&&!n.value.stops&&Q.push(new Or(n.key,n.value,'missing required property "stops"')),u==="exponential"&&n.valueSpec.expression&&!Kc(n.valueSpec)&&Q.push(new Or(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(Y&&!sf(n.valueSpec)?Q.push(new Or(n.key,n.value,"property functions not supported")):q&&!Tp(n.valueSpec)&&Q.push(new Or(n.key,n.value,"zoom functions not supported"))),(u==="categorical"||j)&&n.value.property===void 0&&Q.push(new Or(n.key,n.value,'"property" property is required')),Q;function ie(qe){if(u==="identity")return[new Or(qe.key,qe.value,'identity function may not have a "stops" property')];var st=[],Qe=qe.value;return st=st.concat(qv({key:qe.key,value:Qe,valueSpec:qe.valueSpec,style:qe.style,styleSpec:qe.styleSpec,arrayElementValidator:ye})),di(Qe)==="array"&&Qe.length===0&&st.push(new Or(qe.key,Qe,"array must have at least one stop")),st}function ye(qe){var st=[],Qe=qe.value,Lt=qe.key;if(di(Qe)!=="array")return[new Or(Lt,Qe,"array expected, "+di(Qe)+" found")];if(Qe.length!==2)return[new Or(Lt,Qe,"array length 2 expected, length "+Qe.length+" found")];if(j){if(di(Qe[0])!=="object")return[new Or(Lt,Qe,"object expected, "+di(Qe[0])+" found")];if(Qe[0].zoom===void 0)return[new Or(Lt,Qe,"object stop key must have zoom")];if(Qe[0].value===void 0)return[new Or(Lt,Qe,"object stop key must have value")];if(k&&k>an(Qe[0].zoom))return[new Or(Lt,Qe[0].zoom,"stop zoom values must appear in ascending order")];an(Qe[0].zoom)!==k&&(k=an(Qe[0].zoom),A=void 0,_={}),st=st.concat(vs({key:Lt+"[0]",value:Qe[0],valueSpec:{zoom:{}},style:qe.style,styleSpec:qe.styleSpec,objectElementValidators:{zoom:ff,value:he}}))}else st=st.concat(he({key:Lt+"[0]",value:Qe[0],valueSpec:{},style:qe.style,styleSpec:qe.styleSpec},Qe));return wu(yl(Qe[1]))?st.concat([new Or(Lt+"[1]",Qe[1],"expressions are not allowed in function stops.")]):st.concat(li({key:Lt+"[1]",value:Qe[1],valueSpec:o,style:qe.style,styleSpec:qe.styleSpec}))}function he(qe,st){var Qe=di(qe.value),Lt=an(qe.value),gt=qe.value!==null?qe.value:st;if(!p)p=Qe;else if(Qe!==p)return[new Or(qe.key,gt,Qe+" stop domain type must match previous stop domain type "+p)];if(Qe!=="number"&&Qe!=="string"&&Qe!=="boolean")return[new Or(qe.key,gt,"stop domain value must be a number, string, or boolean")];if(Qe!=="number"&&u!=="categorical"){var St="number expected, "+Qe+" found";return sf(o)&&u===void 0&&(St+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Or(qe.key,gt,St)]}return u==="categorical"&&Qe==="number"&&(!isFinite(Lt)||Math.floor(Lt)!==Lt)?[new Or(qe.key,gt,"integer expected, found "+Lt)]:u!=="categorical"&&Qe==="number"&&A!==void 0&&Lt=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(var o=0,u=n.slice(1);oo?1:0}function hf(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(var o=1;o"||o==="<="||o===">="?Nv(n[1],n[2],o):o==="any"?$m(n.slice(1)):o==="all"?["all"].concat(n.slice(1).map(vf)):o==="none"?["all"].concat(n.slice(1).map(vf).map(tc)):o==="in"?Lp(n[1],n.slice(2)):o==="!in"?tc(Lp(n[1],n.slice(2))):o==="has"?Bv(n[1]):o==="!has"?tc(Bv(n[1])):o==="within"?n:!0;return u}function Nv(n,o,u){switch(n){case"$type":return["filter-type-"+u,o];case"$id":return["filter-id-"+u,o];default:return["filter-"+u,n,o]}}function $m(n){return["any"].concat(n.map(vf))}function Lp(n,o){if(o.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(function(u){return typeof u!=typeof o[0]})?["filter-in-large",n,["literal",o.sort(Il)]]:["filter-in-small",n,["literal",o]]}}function Bv(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function tc(n){return["!",n]}function eh(n){return go(yl(n.value))?Tu(pu({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ov(n)}function Ov(n){var o=n.value,u=n.key;if(di(o)!=="array")return[new Or(u,o,"array expected, "+di(o)+" found")];var p=n.styleSpec,_,A=[];if(o.length<1)return[new Or(u,o,"filter array must have at least 1 element")];switch(A=A.concat($c({key:u+"[0]",value:o[0],valueSpec:p.filter_operator,style:n.style,styleSpec:n.styleSpec})),an(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&an(o[1])==="$type"&&A.push(new Or(u,o,'"$type" cannot be use with operator "'+o[0]+'"'));case"==":case"!=":o.length!==3&&A.push(new Or(u,o,'filter array for operator "'+o[0]+'" must have 3 elements'));case"in":case"!in":o.length>=2&&(_=di(o[1]),_!=="string"&&A.push(new Or(u+"[1]",o[1],"string expected, "+_+" found")));for(var k=2;k=Q[he+0]&&p>=Q[he+1])?(k[ye]=!0,A.push(j[ye])):k[ye]=!1}}},Ls.prototype._forEachCell=function(n,o,u,p,_,A,k,q){for(var Y=this._convertToCellCoord(n),j=this._convertToCellCoord(o),Q=this._convertToCellCoord(u),ie=this._convertToCellCoord(p),ye=Y;ye<=Q;ye++)for(var he=j;he<=ie;he++){var Me=this.d*he+ye;if(!(q&&!q(this._convertFromCellCoord(ye),this._convertFromCellCoord(he),this._convertFromCellCoord(ye+1),this._convertFromCellCoord(he+1)))&&_.call(this,n,o,u,p,Me,A,k,q))return}},Ls.prototype._convertFromCellCoord=function(n){return(n-this.padding)/this.scale},Ls.prototype._convertToCellCoord=function(n){return Math.max(0,Math.min(this.d-1,Math.floor(n*this.scale)+this.padding))},Ls.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var n=this.cells,o=Fl+this.cells.length+1+1,u=0,p=0;p=0)){var ie=n[Q];j[Q]=ql[Y].shallow.indexOf(Q)>=0?ie:U(ie,o)}n instanceof Error&&(j.message=n.message)}if(j.$name)throw new Error("$name property is reserved for worker serialization logic.");return Y!=="Object"&&(j.$name=Y),j}throw new Error("can't serialize object of type "+typeof n)}function Z(n){if(n==null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp||D(n)||B(n)||ArrayBuffer.isView(n)||n instanceof nh)return n;if(Array.isArray(n))return n.map(Z);if(typeof n=="object"){var o=n.$name||"Object",u=ql[o],p=u.klass;if(!p)throw new Error("can't deserialize unregistered class "+o);if(p.deserialize)return p.deserialize(n);for(var _=Object.create(p.prototype),A=0,k=Object.keys(n);A=0?Y:Z(Y)}}return _}throw new Error("can't deserialize object of type "+typeof n)}var $=function(){this.first=!0};$.prototype.update=function(o,u){var p=Math.floor(o);return this.first?(this.first=!1,this.lastIntegerZoom=p,this.lastIntegerZoomTime=0,this.lastZoom=o,this.lastFloorZoom=p,!0):(this.lastFloorZoom>p?(this.lastIntegerZoom=p+1,this.lastIntegerZoomTime=u):this.lastFloorZoom=128&&n<=255},Arabic:function(n){return n>=1536&&n<=1791},"Arabic Supplement":function(n){return n>=1872&&n<=1919},"Arabic Extended-A":function(n){return n>=2208&&n<=2303},"Hangul Jamo":function(n){return n>=4352&&n<=4607},"Unified Canadian Aboriginal Syllabics":function(n){return n>=5120&&n<=5759},Khmer:function(n){return n>=6016&&n<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(n){return n>=6320&&n<=6399},"General Punctuation":function(n){return n>=8192&&n<=8303},"Letterlike Symbols":function(n){return n>=8448&&n<=8527},"Number Forms":function(n){return n>=8528&&n<=8591},"Miscellaneous Technical":function(n){return n>=8960&&n<=9215},"Control Pictures":function(n){return n>=9216&&n<=9279},"Optical Character Recognition":function(n){return n>=9280&&n<=9311},"Enclosed Alphanumerics":function(n){return n>=9312&&n<=9471},"Geometric Shapes":function(n){return n>=9632&&n<=9727},"Miscellaneous Symbols":function(n){return n>=9728&&n<=9983},"Miscellaneous Symbols and Arrows":function(n){return n>=11008&&n<=11263},"CJK Radicals Supplement":function(n){return n>=11904&&n<=12031},"Kangxi Radicals":function(n){return n>=12032&&n<=12255},"Ideographic Description Characters":function(n){return n>=12272&&n<=12287},"CJK Symbols and Punctuation":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},"Hangul Compatibility Jamo":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},"Bopomofo Extended":function(n){return n>=12704&&n<=12735},"CJK Strokes":function(n){return n>=12736&&n<=12783},"Katakana Phonetic Extensions":function(n){return n>=12784&&n<=12799},"Enclosed CJK Letters and Months":function(n){return n>=12800&&n<=13055},"CJK Compatibility":function(n){return n>=13056&&n<=13311},"CJK Unified Ideographs Extension A":function(n){return n>=13312&&n<=19903},"Yijing Hexagram Symbols":function(n){return n>=19904&&n<=19967},"CJK Unified Ideographs":function(n){return n>=19968&&n<=40959},"Yi Syllables":function(n){return n>=40960&&n<=42127},"Yi Radicals":function(n){return n>=42128&&n<=42191},"Hangul Jamo Extended-A":function(n){return n>=43360&&n<=43391},"Hangul Syllables":function(n){return n>=44032&&n<=55215},"Hangul Jamo Extended-B":function(n){return n>=55216&&n<=55295},"Private Use Area":function(n){return n>=57344&&n<=63743},"CJK Compatibility Ideographs":function(n){return n>=63744&&n<=64255},"Arabic Presentation Forms-A":function(n){return n>=64336&&n<=65023},"Vertical Forms":function(n){return n>=65040&&n<=65055},"CJK Compatibility Forms":function(n){return n>=65072&&n<=65103},"Small Form Variants":function(n){return n>=65104&&n<=65135},"Arabic Presentation Forms-B":function(n){return n>=65136&&n<=65279},"Halfwidth and Fullwidth Forms":function(n){return n>=65280&&n<=65519}};function ae(n){for(var o=0,u=n;o=65097&&n<=65103)||X["CJK Compatibility Ideographs"](n)||X["CJK Compatibility"](n)||X["CJK Radicals Supplement"](n)||X["CJK Strokes"](n)||X["CJK Symbols and Punctuation"](n)&&!(n>=12296&&n<=12305)&&!(n>=12308&&n<=12319)&&n!==12336||X["CJK Unified Ideographs Extension A"](n)||X["CJK Unified Ideographs"](n)||X["Enclosed CJK Letters and Months"](n)||X["Hangul Compatibility Jamo"](n)||X["Hangul Jamo Extended-A"](n)||X["Hangul Jamo Extended-B"](n)||X["Hangul Jamo"](n)||X["Hangul Syllables"](n)||X.Hiragana(n)||X["Ideographic Description Characters"](n)||X.Kanbun(n)||X["Kangxi Radicals"](n)||X["Katakana Phonetic Extensions"](n)||X.Katakana(n)&&n!==12540||X["Halfwidth and Fullwidth Forms"](n)&&n!==65288&&n!==65289&&n!==65293&&!(n>=65306&&n<=65310)&&n!==65339&&n!==65341&&n!==65343&&!(n>=65371&&n<=65503)&&n!==65507&&!(n>=65512&&n<=65519)||X["Small Form Variants"](n)&&!(n>=65112&&n<=65118)&&!(n>=65123&&n<=65126)||X["Unified Canadian Aboriginal Syllabics"](n)||X["Unified Canadian Aboriginal Syllabics Extended"](n)||X["Vertical Forms"](n)||X["Yijing Hexagram Symbols"](n)||X["Yi Syllables"](n)||X["Yi Radicals"](n))}function Je(n){return!!(X["Latin-1 Supplement"](n)&&(n===167||n===169||n===174||n===177||n===188||n===189||n===190||n===215||n===247)||X["General Punctuation"](n)&&(n===8214||n===8224||n===8225||n===8240||n===8241||n===8251||n===8252||n===8258||n===8263||n===8264||n===8265||n===8273)||X["Letterlike Symbols"](n)||X["Number Forms"](n)||X["Miscellaneous Technical"](n)&&(n>=8960&&n<=8967||n>=8972&&n<=8991||n>=8996&&n<=9e3||n===9003||n>=9085&&n<=9114||n>=9150&&n<=9165||n===9167||n>=9169&&n<=9179||n>=9186&&n<=9215)||X["Control Pictures"](n)&&n!==9251||X["Optical Character Recognition"](n)||X["Enclosed Alphanumerics"](n)||X["Geometric Shapes"](n)||X["Miscellaneous Symbols"](n)&&!(n>=9754&&n<=9759)||X["Miscellaneous Symbols and Arrows"](n)&&(n>=11026&&n<=11055||n>=11088&&n<=11097||n>=11192&&n<=11243)||X["CJK Symbols and Punctuation"](n)||X.Katakana(n)||X["Private Use Area"](n)||X["CJK Compatibility Forms"](n)||X["Small Form Variants"](n)||X["Halfwidth and Fullwidth Forms"](n)||n===8734||n===8756||n===8757||n>=9984&&n<=10087||n>=10102&&n<=10131||n===65532||n===65533)}function ot(n){return!(Pe(n)||Je(n))}function ze(n){return X.Arabic(n)||X["Arabic Supplement"](n)||X["Arabic Extended-A"](n)||X["Arabic Presentation Forms-A"](n)||X["Arabic Presentation Forms-B"](n)}function Ue(n){return n>=1424&&n<=2303||X["Arabic Presentation Forms-A"](n)||X["Arabic Presentation Forms-B"](n)}function je(n,o){return!(!o&&Ue(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||X.Khmer(n))}function ut(n){for(var o=0,u=n;o-1&&(or=We.error),Gt&&Gt(n)};function Dr(){Ir.fire(new ii("pluginStateChange",{pluginStatus:or,pluginURL:fr}))}var Ir=new pr,ea=function(){return or},Ur=function(n){return n({pluginStatus:or,pluginURL:fr}),Ir.on("pluginStateChange",n),n},Kr=function(n,o,u){if(u===void 0&&(u=!1),or===We.deferred||or===We.loading||or===We.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");fr=vt.resolveURL(n),or=We.deferred,Gt=o,Dr(),u||Ba()},Ba=function(){if(or!==We.deferred||!fr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");or=We.loading,Dr(),fr&&rt({url:fr},function(n){n?lr(n):(or=We.loaded,Dr())})},ri={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return or===We.loaded||ri.applyArabicShaping!=null},isLoading:function(){return or===We.loading},setState:function(o){or=o.pluginStatus,fr=o.pluginURL},isParsed:function(){return ri.applyArabicShaping!=null&&ri.processBidirectionalText!=null&&ri.processStyledBidirectionalText!=null},getPluginURL:function(){return fr}},$a=function(){!ri.isLoading()&&!ri.isLoaded()&&ea()==="deferred"&&Ba()},jt=function(o,u){this.zoom=o,u?(this.now=u.now,this.fadeDuration=u.fadeDuration,this.zoomHistory=u.zoomHistory,this.transition=u.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new $,this.transition={})};jt.prototype.isSupportedScript=function(o){return nt(o,ri.isLoaded())},jt.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},jt.prototype.getCrossfadeParameters=function(){var o=this.zoom,u=o-Math.floor(o),p=this.crossFadingFactor();return o>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:u+(1-u)*p}:{fromScale:.5,toScale:1,t:1-(1-p)*u}};var Jr=function(o,u){this.property=o,this.value=u,this.expression=jm(u===void 0?o.specification.default:u,o.specification)};Jr.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Jr.prototype.possiblyEvaluate=function(o,u,p){return this.property.possiblyEvaluate(this,o,u,p)};var oa=function(o){this.property=o,this.value=new Jr(o,void 0)};oa.prototype.transitioned=function(o,u){return new Ei(this.property,this.value,u,H({},o.transition,this.transition),o.now)},oa.prototype.untransitioned=function(){return new Ei(this.property,this.value,null,{},0)};var sa=function(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)};sa.prototype.getValue=function(o){return Te(this._values[o].value.value)},sa.prototype.setValue=function(o,u){this._values.hasOwnProperty(o)||(this._values[o]=new oa(this._values[o].property)),this._values[o].value=new Jr(this._values[o].property,u===null?void 0:Te(u))},sa.prototype.getTransition=function(o){return Te(this._values[o].transition)},sa.prototype.setTransition=function(o,u){this._values.hasOwnProperty(o)||(this._values[o]=new oa(this._values[o].property)),this._values[o].transition=Te(u)||void 0},sa.prototype.serialize=function(){for(var o={},u=0,p=Object.keys(this._values);uthis.end)return this.prior=null,A;if(this.value.isDataDriven())return this.prior=null,A;if(_k.zoomHistory.lastIntegerZoom?{from:p,to:_}:{from:A,to:_}},o.prototype.interpolate=function(p){return p},o}(Vr),Ti=function(o){this.specification=o};Ti.prototype.possiblyEvaluate=function(o,u,p,_){if(o.value!==void 0)if(o.expression.kind==="constant"){var A=o.expression.evaluate(u,null,{},p,_);return this._calculate(A,A,A,u)}else return this._calculate(o.expression.evaluate(new jt(Math.floor(u.zoom-1),u)),o.expression.evaluate(new jt(Math.floor(u.zoom),u)),o.expression.evaluate(new jt(Math.floor(u.zoom+1),u)),u)},Ti.prototype._calculate=function(o,u,p,_){var A=_.zoom;return A>_.zoomHistory.lastIntegerZoom?{from:o,to:u}:{from:p,to:u}},Ti.prototype.interpolate=function(o){return o};var lo=function(o){this.specification=o};lo.prototype.possiblyEvaluate=function(o,u,p,_){return!!o.expression.evaluate(u,null,{},p,_)},lo.prototype.interpolate=function(){return!1};var zn=function(o){this.properties=o,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var u in o){var p=o[u];p.specification.overridable&&this.overridableProperties.push(u);var _=this.defaultPropertyValues[u]=new Jr(p,void 0),A=this.defaultTransitionablePropertyValues[u]=new oa(p);this.defaultTransitioningPropertyValues[u]=A.untransitioned(),this.defaultPossiblyEvaluatedValues[u]=_.possiblyEvaluate({})}};y("DataDrivenProperty",Vr),y("DataConstantProperty",br),y("CrossFadedDataDrivenProperty",qi),y("CrossFadedProperty",Ti),y("ColorRampProperty",lo);var cn="-transition",pi=function(n){function o(u,p){if(n.call(this),this.id=u.id,this.type=u.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},u.type!=="custom"&&(u=u,this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,u.type!=="background"&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),p.layout&&(this._unevaluatedLayout=new $i(p.layout)),p.paint)){this._transitionablePaint=new sa(p.paint);for(var _ in u.paint)this.setPaintProperty(_,u.paint[_],{validate:!1});for(var A in u.layout)this.setLayoutProperty(A,u.layout[A],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xn(p.paint)}}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},o.prototype.getLayoutProperty=function(p){return p==="visibility"?this.visibility:this._unevaluatedLayout.getValue(p)},o.prototype.setLayoutProperty=function(p,_,A){if(A===void 0&&(A={}),_!=null){var k="layers."+this.id+".layout."+p;if(this._validate(Rl,k,p,_,A))return}if(p==="visibility"){this.visibility=_;return}this._unevaluatedLayout.setValue(p,_)},o.prototype.getPaintProperty=function(p){return ve(p,cn)?this._transitionablePaint.getTransition(p.slice(0,-cn.length)):this._transitionablePaint.getValue(p)},o.prototype.setPaintProperty=function(p,_,A){if(A===void 0&&(A={}),_!=null){var k="layers."+this.id+".paint."+p;if(this._validate(ih,k,p,_,A))return!1}if(ve(p,cn))return this._transitionablePaint.setTransition(p.slice(0,-cn.length),_||void 0),!1;var q=this._transitionablePaint._values[p],Y=q.property.specification["property-type"]==="cross-faded-data-driven",j=q.value.isDataDriven(),Q=q.value;this._transitionablePaint.setValue(p,_),this._handleSpecialPaintPropertyUpdate(p);var ie=this._transitionablePaint._values[p].value,ye=ie.isDataDriven();return ye||j||Y||this._handleOverridablePaintPropertyUpdate(p,Q,ie)},o.prototype._handleSpecialPaintPropertyUpdate=function(p){},o.prototype._handleOverridablePaintPropertyUpdate=function(p,_,A){return!1},o.prototype.isHidden=function(p){return this.minzoom&&p=this.maxzoom?!0:this.visibility==="none"},o.prototype.updateTransitions=function(p){this._transitioningPaint=this._transitionablePaint.transitioned(p,this._transitioningPaint)},o.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},o.prototype.recalculate=function(p,_){p.getCrossfadeParameters&&(this._crossfadeParameters=p.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(p,void 0,_)),this.paint=this._transitioningPaint.possiblyEvaluate(p,void 0,_)},o.prototype.serialize=function(){var p={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&&(p.layout=p.layout||{},p.layout.visibility=this.visibility),Ce(p,function(_,A){return _!==void 0&&!(A==="layout"&&!Object.keys(_).length)&&!(A==="paint"&&!Object.keys(_).length)})},o.prototype._validate=function(p,_,A,k,q){return q===void 0&&(q={}),q&&q.validate===!1?!1:rc(this,p.call(ti,{key:_,layerType:this.type,objectKey:A,value:k,styleSpec:Xt,style:{glyphs:!0,sprite:!0}}))},o.prototype.is3D=function(){return!1},o.prototype.isTileClipped=function(){return!1},o.prototype.hasOffscreenPass=function(){return!1},o.prototype.resize=function(){},o.prototype.isStateDependent=function(){for(var p in this.paint._values){var _=this.paint.get(p);if(!(!(_ instanceof xi)||!sf(_.property.specification))&&(_.value.kind==="source"||_.value.kind==="composite")&&_.value.isStateDependent)return!0}return!1},o}(pr),jo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},uo=function(o,u){this._structArray=o,this._pos1=u*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ci=128,gf=5,Aa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Aa.serialize=function(o,u){return o._trim(),u&&(o.isTransferred=!0,u.push(o.arrayBuffer)),{length:o.length,arrayBuffer:o.arrayBuffer}},Aa.deserialize=function(o){var u=Object.create(this.prototype);return u.arrayBuffer=o.arrayBuffer,u.length=o.length,u.capacity=o.arrayBuffer.byteLength/u.bytesPerElement,u._refreshViews(),u},Aa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Aa.prototype.clear=function(){this.length=0},Aa.prototype.resize=function(o){this.reserve(o),this.length=o},Aa.prototype.reserve=function(o){if(o>this.capacity){this.capacity=Math.max(o,Math.floor(this.capacity*gf),ci),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var u=this.uint8;this._refreshViews(),u&&this.uint8.set(u)}},Aa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ui(n,o){o===void 0&&(o=1);var u=0,p=0,_=n.map(function(k){var q=Nl(k.type),Y=u=Hv(u,Math.max(o,q)),j=k.components||1;return p=Math.max(p,q),u+=q*j,{name:k.name,type:k.type,components:j,offset:Y}}),A=Hv(u,Math.max(p,o));return{members:_,size:A,alignment:o}}function Nl(n){return jo[n].BYTES_PER_ELEMENT}function Hv(n,o){return Math.ceil(n/o)*o}var ac=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_){var A=this.length;return this.resize(A+1),this.emplace(A,p,_)},o.prototype.emplace=function(p,_,A){var k=p*2;return this.int16[k+0]=_,this.int16[k+1]=A,p},o}(Aa);ac.prototype.bytesPerElement=4,y("StructArrayLayout2i4",ac);var ey=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k){var q=this.length;return this.resize(q+1),this.emplace(q,p,_,A,k)},o.prototype.emplace=function(p,_,A,k,q){var Y=p*4;return this.int16[Y+0]=_,this.int16[Y+1]=A,this.int16[Y+2]=k,this.int16[Y+3]=q,p},o}(Aa);ey.prototype.bytesPerElement=8,y("StructArrayLayout4i8",ey);var _f=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y){var j=this.length;return this.resize(j+1),this.emplace(j,p,_,A,k,q,Y)},o.prototype.emplace=function(p,_,A,k,q,Y,j){var Q=p*6;return this.int16[Q+0]=_,this.int16[Q+1]=A,this.int16[Q+2]=k,this.int16[Q+3]=q,this.int16[Q+4]=Y,this.int16[Q+5]=j,p},o}(Aa);_f.prototype.bytesPerElement=12,y("StructArrayLayout2i4i12",_f);var oh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y){var j=this.length;return this.resize(j+1),this.emplace(j,p,_,A,k,q,Y)},o.prototype.emplace=function(p,_,A,k,q,Y,j){var Q=p*4,ie=p*8;return this.int16[Q+0]=_,this.int16[Q+1]=A,this.uint8[ie+4]=k,this.uint8[ie+5]=q,this.uint8[ie+6]=Y,this.uint8[ie+7]=j,p},o}(Aa);oh.prototype.bytesPerElement=8,y("StructArrayLayout2i4ub8",oh);var sh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_){var A=this.length;return this.resize(A+1),this.emplace(A,p,_)},o.prototype.emplace=function(p,_,A){var k=p*2;return this.float32[k+0]=_,this.float32[k+1]=A,p},o}(Aa);sh.prototype.bytesPerElement=8,y("StructArrayLayout2f8",sh);var Lo=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye){var he=this.length;return this.resize(he+1),this.emplace(he,p,_,A,k,q,Y,j,Q,ie,ye)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he){var Me=p*10;return this.uint16[Me+0]=_,this.uint16[Me+1]=A,this.uint16[Me+2]=k,this.uint16[Me+3]=q,this.uint16[Me+4]=Y,this.uint16[Me+5]=j,this.uint16[Me+6]=Q,this.uint16[Me+7]=ie,this.uint16[Me+8]=ye,this.uint16[Me+9]=he,p},o}(Aa);Lo.prototype.bytesPerElement=20,y("StructArrayLayout10ui20",Lo);var xf=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye,he,Me){var qe=this.length;return this.resize(qe+1),this.emplace(qe,p,_,A,k,q,Y,j,Q,ie,ye,he,Me)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe){var st=p*12;return this.int16[st+0]=_,this.int16[st+1]=A,this.int16[st+2]=k,this.int16[st+3]=q,this.uint16[st+4]=Y,this.uint16[st+5]=j,this.uint16[st+6]=Q,this.uint16[st+7]=ie,this.int16[st+8]=ye,this.int16[st+9]=he,this.int16[st+10]=Me,this.int16[st+11]=qe,p},o}(Aa);xf.prototype.bytesPerElement=24,y("StructArrayLayout4i4ui4i24",xf);var ty=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*3;return this.float32[q+0]=_,this.float32[q+1]=A,this.float32[q+2]=k,p},o}(Aa);ty.prototype.bytesPerElement=12,y("StructArrayLayout3f12",ty);var ry=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p){var _=this.length;return this.resize(_+1),this.emplace(_,p)},o.prototype.emplace=function(p,_){var A=p*1;return this.uint32[A+0]=_,p},o}(Aa);ry.prototype.bytesPerElement=4,y("StructArrayLayout1ul4",ry);var Gv=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.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)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie){var ye=this.length;return this.resize(ye+1),this.emplace(ye,p,_,A,k,q,Y,j,Q,ie)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye){var he=p*10,Me=p*5;return this.int16[he+0]=_,this.int16[he+1]=A,this.int16[he+2]=k,this.int16[he+3]=q,this.int16[he+4]=Y,this.int16[he+5]=j,this.uint32[Me+3]=Q,this.uint16[he+8]=ie,this.uint16[he+9]=ye,p},o}(Aa);Gv.prototype.bytesPerElement=20,y("StructArrayLayout6i1ul2ui20",Gv);var Rp=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y){var j=this.length;return this.resize(j+1),this.emplace(j,p,_,A,k,q,Y)},o.prototype.emplace=function(p,_,A,k,q,Y,j){var Q=p*6;return this.int16[Q+0]=_,this.int16[Q+1]=A,this.int16[Q+2]=k,this.int16[Q+3]=q,this.int16[Q+4]=Y,this.int16[Q+5]=j,p},o}(Aa);Rp.prototype.bytesPerElement=12,y("StructArrayLayout2i2i2i12",Rp);var Mu=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q){var Y=this.length;return this.resize(Y+1),this.emplace(Y,p,_,A,k,q)},o.prototype.emplace=function(p,_,A,k,q,Y){var j=p*4,Q=p*8;return this.float32[j+0]=_,this.float32[j+1]=A,this.float32[j+2]=k,this.int16[Q+6]=q,this.int16[Q+7]=Y,p},o}(Aa);Mu.prototype.bytesPerElement=16,y("StructArrayLayout2f1f2i16",Mu);var Jo=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k){var q=this.length;return this.resize(q+1),this.emplace(q,p,_,A,k)},o.prototype.emplace=function(p,_,A,k,q){var Y=p*12,j=p*3;return this.uint8[Y+0]=_,this.uint8[Y+1]=A,this.float32[j+1]=k,this.float32[j+2]=q,p},o}(Aa);Jo.prototype.bytesPerElement=12,y("StructArrayLayout2ub2f12",Jo);var Su=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*3;return this.uint16[q+0]=_,this.uint16[q+1]=A,this.uint16[q+2]=k,p},o}(Aa);Su.prototype.bytesPerElement=6,y("StructArrayLayout3ui6",Su);var Zv=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.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)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe,st,Qe,Lt,gt){var St=this.length;return this.resize(St+1),this.emplace(St,p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe,st,Qe,Lt,gt)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe,st,Qe,Lt,gt,St){var It=p*24,Jt=p*12,hr=p*48;return this.int16[It+0]=_,this.int16[It+1]=A,this.uint16[It+2]=k,this.uint16[It+3]=q,this.uint32[Jt+2]=Y,this.uint32[Jt+3]=j,this.uint32[Jt+4]=Q,this.uint16[It+10]=ie,this.uint16[It+11]=ye,this.uint16[It+12]=he,this.float32[Jt+7]=Me,this.float32[Jt+8]=qe,this.uint8[hr+36]=st,this.uint8[hr+37]=Qe,this.uint8[hr+38]=Lt,this.uint32[Jt+10]=gt,this.int16[It+22]=St,p},o}(Aa);Zv.prototype.bytesPerElement=48,y("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zv);var Fp=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.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)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe,st,Qe,Lt,gt,St,It,Jt,hr,ur,Rr,kr,zr,Qr,Fr,Nr){var ma=this.length;return this.resize(ma+1),this.emplace(ma,p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe,st,Qe,Lt,gt,St,It,Jt,hr,ur,Rr,kr,zr,Qr,Fr,Nr)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he,Me,qe,st,Qe,Lt,gt,St,It,Jt,hr,ur,Rr,kr,zr,Qr,Fr,Nr,ma){var jr=p*34,Ya=p*17;return this.int16[jr+0]=_,this.int16[jr+1]=A,this.int16[jr+2]=k,this.int16[jr+3]=q,this.int16[jr+4]=Y,this.int16[jr+5]=j,this.int16[jr+6]=Q,this.int16[jr+7]=ie,this.uint16[jr+8]=ye,this.uint16[jr+9]=he,this.uint16[jr+10]=Me,this.uint16[jr+11]=qe,this.uint16[jr+12]=st,this.uint16[jr+13]=Qe,this.uint16[jr+14]=Lt,this.uint16[jr+15]=gt,this.uint16[jr+16]=St,this.uint16[jr+17]=It,this.uint16[jr+18]=Jt,this.uint16[jr+19]=hr,this.uint16[jr+20]=ur,this.uint16[jr+21]=Rr,this.uint16[jr+22]=kr,this.uint32[Ya+12]=zr,this.float32[Ya+13]=Qr,this.float32[Ya+14]=Fr,this.float32[Ya+15]=Nr,this.float32[Ya+16]=ma,p},o}(Aa);Fp.prototype.bytesPerElement=68,y("StructArrayLayout8i15ui1ul4f68",Fp);var lh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p){var _=this.length;return this.resize(_+1),this.emplace(_,p)},o.prototype.emplace=function(p,_){var A=p*1;return this.float32[A+0]=_,p},o}(Aa);lh.prototype.bytesPerElement=4,y("StructArrayLayout1f4",lh);var ay=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*3;return this.int16[q+0]=_,this.int16[q+1]=A,this.int16[q+2]=k,p},o}(Aa);ay.prototype.bytesPerElement=6,y("StructArrayLayout3i6",ay);var bf=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*2,Y=p*4;return this.uint32[q+0]=_,this.uint16[Y+2]=A,this.uint16[Y+3]=k,p},o}(Aa);bf.prototype.bytesPerElement=8,y("StructArrayLayout1ul2ui8",bf);var Yv=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_){var A=this.length;return this.resize(A+1),this.emplace(A,p,_)},o.prototype.emplace=function(p,_,A){var k=p*2;return this.uint16[k+0]=_,this.uint16[k+1]=A,p},o}(Aa);Yv.prototype.bytesPerElement=4,y("StructArrayLayout2ui4",Yv);var uh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p){var _=this.length;return this.resize(_+1),this.emplace(_,p)},o.prototype.emplace=function(p,_){var A=p*1;return this.uint16[A+0]=_,p},o}(Aa);uh.prototype.bytesPerElement=2,y("StructArrayLayout1ui2",uh);var ic=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k){var q=this.length;return this.resize(q+1),this.emplace(q,p,_,A,k)},o.prototype.emplace=function(p,_,A,k,q){var Y=p*4;return this.float32[Y+0]=_,this.float32[Y+1]=A,this.float32[Y+2]=k,this.float32[Y+3]=q,p},o}(Aa);ic.prototype.bytesPerElement=16,y("StructArrayLayout4f16",ic);var d1=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={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 u.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},u.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},u.x1.get=function(){return this._structArray.int16[this._pos2+2]},u.y1.get=function(){return this._structArray.int16[this._pos2+3]},u.x2.get=function(){return this._structArray.int16[this._pos2+4]},u.y2.get=function(){return this._structArray.int16[this._pos2+5]},u.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},u.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},u.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},u.anchorPoint.get=function(){return new v(this.anchorPointX,this.anchorPointY)},Object.defineProperties(o.prototype,u),o}(uo);d1.prototype.size=20;var iy=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new d1(this,p)},o}(Gv);y("CollisionBoxArray",iy);var nc=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={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 u.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},u.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},u.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},u.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},u.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},u.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},u.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},u.segment.get=function(){return this._structArray.uint16[this._pos2+10]},u.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},u.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},u.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},u.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},u.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},u.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},u.placedOrientation.set=function(p){this._structArray.uint8[this._pos1+37]=p},u.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},u.hidden.set=function(p){this._structArray.uint8[this._pos1+38]=p},u.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},u.crossTileID.set=function(p){this._structArray.uint32[this._pos4+10]=p},u.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(o.prototype,u),o}(uo);nc.prototype.size=48;var ny=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new nc(this,p)},o}(Zv);y("PlacedSymbolArray",ny);var fh=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={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 u.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},u.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},u.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},u.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},u.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},u.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},u.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},u.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},u.key.get=function(){return this._structArray.uint16[this._pos2+8]},u.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},u.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},u.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},u.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},u.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},u.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},u.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},u.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},u.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},u.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},u.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},u.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},u.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},u.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},u.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},u.crossTileID.set=function(p){this._structArray.uint32[this._pos4+12]=p},u.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},u.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},u.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},u.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(o.prototype,u),o}(uo);fh.prototype.size=68;var p1=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new fh(this,p)},o}(Fp);y("SymbolInstanceArray",p1);var m1=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.getoffsetX=function(p){return this.float32[p*1+0]},o}(lh);y("GlyphOffsetArray",m1);var $s=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.getx=function(p){return this.int16[p*3+0]},o.prototype.gety=function(p){return this.int16[p*3+1]},o.prototype.gettileUnitDistanceFromAnchor=function(p){return this.int16[p*3+2]},o}(ay);y("SymbolLineVertexArray",$s);var y1=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return u.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},u.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},u.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(o.prototype,u),o}(uo);y1.prototype.size=8;var g1=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new y1(this,p)},o}(bf);y("FeatureIndexArray",g1);var o3=ui([{name:"a_pos",components:2,type:"Int16"}],4),_1=o3.members,bn=function(o){o===void 0&&(o=[]),this.segments=o};bn.prototype.prepareSegment=function(o,u,p,_){var A=this.segments[this.segments.length-1];return o>bn.MAX_VERTEX_ARRAY_LENGTH&&Se("Max vertices per segment is "+bn.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+o),(!A||A.vertexLength+o>bn.MAX_VERTEX_ARRAY_LENGTH||A.sortKey!==_)&&(A={vertexOffset:u.length,primitiveOffset:p.length,vertexLength:0,primitiveLength:0},_!==void 0&&(A.sortKey=_),this.segments.push(A)),A},bn.prototype.get=function(){return this.segments},bn.prototype.destroy=function(){for(var o=0,u=this.segments;o>>16)*Y&65535)<<16)&4294967295,Q=Q<<15|Q>>>17,Q=(Q&65535)*j+(((Q>>>16)*j&65535)<<16)&4294967295,k^=Q,k=k<<13|k>>>19,q=(k&65535)*5+(((k>>>16)*5&65535)<<16)&4294967295,k=(q&65535)+27492+(((q>>>16)+58964&65535)<<16);switch(Q=0,_){case 3:Q^=(u.charCodeAt(ie+2)&255)<<16;case 2:Q^=(u.charCodeAt(ie+1)&255)<<8;case 1:Q^=u.charCodeAt(ie)&255,Q=(Q&65535)*Y+(((Q>>>16)*Y&65535)<<16)&4294967295,Q=Q<<15|Q>>>17,Q=(Q&65535)*j+(((Q>>>16)*j&65535)<<16)&4294967295,k^=Q}return k^=u.length,k^=k>>>16,k=(k&65535)*2246822507+(((k>>>16)*2246822507&65535)<<16)&4294967295,k^=k>>>13,k=(k&65535)*3266489909+(((k>>>16)*3266489909&65535)<<16)&4294967295,k^=k>>>16,k>>>0}n.exports=o}),d=s(function(n){function o(u,p){for(var _=u.length,A=p^_,k=0,q;_>=4;)q=u.charCodeAt(k)&255|(u.charCodeAt(++k)&255)<<8|(u.charCodeAt(++k)&255)<<16|(u.charCodeAt(++k)&255)<<24,q=(q&65535)*1540483477+(((q>>>16)*1540483477&65535)<<16),q^=q>>>24,q=(q&65535)*1540483477+(((q>>>16)*1540483477&65535)<<16),A=(A&65535)*1540483477+(((A>>>16)*1540483477&65535)<<16)^q,_-=4,++k;switch(_){case 3:A^=(u.charCodeAt(k+2)&255)<<16;case 2:A^=(u.charCodeAt(k+1)&255)<<8;case 1:A^=u.charCodeAt(k)&255,A=(A&65535)*1540483477+(((A>>>16)*1540483477&65535)<<16)}return A^=A>>>13,A=(A&65535)*1540483477+(((A>>>16)*1540483477&65535)<<16),A^=A>>>15,A>>>0}n.exports=o}),w=x,L=x,F=d;w.murmur3=L,w.murmur2=F;var G=function(){this.ids=[],this.positions=[],this.indexed=!1};G.prototype.add=function(o,u,p,_){this.ids.push(te(o)),this.positions.push(u,p,_)},G.prototype.getPositions=function(o){for(var u=te(o),p=0,_=this.ids.length-1;p<_;){var A=p+_>>1;this.ids[A]>=u?_=A:p=A+1}for(var k=[];this.ids[p]===u;){var q=this.positions[3*p],Y=this.positions[3*p+1],j=this.positions[3*p+2];k.push({index:q,start:Y,end:j}),p++}return k},G.serialize=function(o,u){var p=new Float64Array(o.ids),_=new Uint32Array(o.positions);return ue(p,_,0,p.length-1),u&&u.push(p.buffer,_.buffer),{ids:p,positions:_}},G.deserialize=function(o){var u=new G;return u.ids=o.ids,u.positions=o.positions,u.indexed=!0,u};var K=Math.pow(2,53)-1;function te(n){var o=+n;return!isNaN(o)&&o<=K?o:w(String(n))}function ue(n,o,u,p){for(;u>1],A=u-1,k=p+1;;){do A++;while(n[A]<_);do k--;while(n[k]>_);if(A>=k)break;we(n,A,k),we(o,3*A,3*k),we(o,3*A+1,3*k+1),we(o,3*A+2,3*k+2)}k-uk.x+1||Yk.y+1)&&Se("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return u}function Ai(n,o){return{type:n.type,id:n.id,properties:n.properties,geometry:o?Va(n):[]}}function Pa(n,o,u,p,_){n.emplaceBack(o*2+(p+1)/2,u*2+(_+1)/2)}var mi=function(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(function(u){return u.id}),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new ac,this.indexArray=new Su,this.segments=new bn,this.programConfigurations=new Sr(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(function(u){return u.isStateDependent()}).map(function(u){return u.id})};mi.prototype.populate=function(o,u,p){var _=this.layers[0],A=[],k=null;_.type==="circle"&&(k=_.layout.get("circle-sort-key"));for(var q=0,Y=o;q=qr||ye<0||ye>=qr)){var he=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),Me=he.vertexLength;Pa(this.layoutVertexArray,ie,ye,-1,-1),Pa(this.layoutVertexArray,ie,ye,1,-1),Pa(this.layoutVertexArray,ie,ye,1,1),Pa(this.layoutVertexArray,ie,ye,-1,1),this.indexArray.emplaceBack(Me,Me+1,Me+2),this.indexArray.emplaceBack(Me,Me+3,Me+2),he.vertexLength+=4,he.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,{},_)},y("CircleBucket",mi,{omit:["layers"]});function na(n,o){for(var u=0;u=3){for(var A=0;A<_.length;A++)if(Po(n,_[A]))return!0}if(Ps(n,_,u))return!0}return!1}function Ps(n,o,u){if(n.length>1){if(Ds(n,o))return!0;for(var p=0;p1?n.distSqr(u):n.distSqr(u.sub(o)._mult(_)._add(o))}function Ol(n,o){for(var u=!1,p,_,A,k=0;ko.y!=A.y>o.y&&o.x<(A.x-_.x)*(o.y-_.y)/(A.y-_.y)+_.x&&(u=!u)}return u}function Po(n,o){for(var u=!1,p=0,_=n.length-1;po.y!=k.y>o.y&&o.x<(k.x-A.x)*(o.y-A.y)/(k.y-A.y)+A.x&&(u=!u)}return u}function Ul(n,o,u,p,_){for(var A=0,k=n;A=q.x&&_>=q.y)return!0}var Y=[new v(o,u),new v(o,_),new v(p,_),new v(p,u)];if(n.length>2)for(var j=0,Q=Y;j_.x&&o.x>_.x||n.y_.y&&o.y>_.y)return!1;var A=Le(n,o,u[0]);return A!==Le(n,o,u[1])||A!==Le(n,o,u[2])||A!==Le(n,o,u[3])}function Do(n,o,u){var p=o.paint.get(n).value;return p.kind==="constant"?p.value:u.programConfigurations.get(o.id).getMaxValue(n)}function tl(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function ku(n,o,u,p,_){if(!o[0]&&!o[1])return n;var A=v.convert(o)._mult(_);u==="viewport"&&A._rotate(-p);for(var k=[],q=0;q0&&(A=1/Math.sqrt(A)),n[0]=o[0]*A,n[1]=o[1]*A,n[2]=o[2]*A,n}function eY(n,o){return n[0]*o[0]+n[1]*o[1]+n[2]*o[2]}function tY(n,o,u){var p=o[0],_=o[1],A=o[2],k=u[0],q=u[1],Y=u[2];return n[0]=_*Y-A*q,n[1]=A*k-p*Y,n[2]=p*q-_*k,n}function rY(n,o,u){var p=o[0],_=o[1],A=o[2];return n[0]=p*u[0]+_*u[3]+A*u[6],n[1]=p*u[1]+_*u[4]+A*u[7],n[2]=p*u[2]+_*u[5]+A*u[8],n}var aY=f3,ume=function(){var n=Xv();return function(o,u,p,_,A,k){var q,Y;for(u||(u=3),p||(p=0),_?Y=Math.min(_*u+p,o.length):Y=o.length,q=p;qn.width||_.height>n.height||u.x>n.width-_.width||u.y>n.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>o.width||_.height>o.height||p.x>o.width-_.width||p.y>o.height-_.height)throw new RangeError("out of range destination coordinates for image copy");for(var k=n.data,q=o.data,Y=0;Y<_.height;Y++)for(var j=((u.y+Y)*n.width+u.x)*A,Q=((p.y+Y)*o.width+p.x)*A,ie=0;ie<_.width*A;ie++)q[Q+ie]=k[j+ie];return o}var jv=function(o,u){h3(this,o,1,u)};jv.prototype.resize=function(o){uM(this,o,1)},jv.prototype.clone=function(){return new jv({width:this.width,height:this.height},new Uint8Array(this.data))},jv.copy=function(o,u,p,_,A){v3(o,u,p,_,A,1)};var es=function(o,u){h3(this,o,4,u)};es.prototype.resize=function(o){uM(this,o,4)},es.prototype.replace=function(o,u){u?this.data.set(o):o instanceof Uint8ClampedArray?this.data=new Uint8Array(o.buffer):this.data=o},es.prototype.clone=function(){return new es({width:this.width,height:this.height},new Uint8Array(this.data))},es.copy=function(o,u,p,_,A){v3(o,u,p,_,A,4)},y("AlphaImage",jv),y("RGBAImage",es);var hY=new zn({"heatmap-radius":new Vr(Xt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Vr(Xt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new br(Xt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new lo(Xt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new br(Xt.paint_heatmap["heatmap-opacity"])}),vY={paint:hY};function fM(n){var o={},u=n.resolution||256,p=n.clips?n.clips.length:1,_=n.image||new es({width:u,height:p}),A=function(Lt,gt,St){o[n.evaluationKey]=St;var It=n.expression.evaluate(o);_.data[Lt+gt+0]=Math.floor(It.r*255/It.a),_.data[Lt+gt+1]=Math.floor(It.g*255/It.a),_.data[Lt+gt+2]=Math.floor(It.b*255/It.a),_.data[Lt+gt+3]=Math.floor(It.a*255)};if(n.clips)for(var j=0,Q=0;j80*u){q=j=n[0],Y=Q=n[1];for(var Me=u;Me<_;Me+=u)ie=n[Me],ye=n[Me+1],iej&&(j=ie),ye>Q&&(Q=ye);he=Math.max(j-q,Q-Y),he=he!==0?1/he:0}return ly(A,k,u,q,Y,he),k}function cM(n,o,u,p,_){var A,k;if(_===y3(n,o,u,p)>0)for(A=o;A=o;A-=p)k=dM(A,n[A],n[A+1],k);return k&&w1(k,k.next)&&(fy(k),k=k.next),k}function ph(n,o){if(!n)return n;o||(o=n);var u=n,p;do if(p=!1,!u.steiner&&(w1(u,u.next)||wn(u.prev,u,u.next)===0)){if(fy(u),u=o=u.prev,u===u.next)break;p=!0}else u=u.next;while(p||u!==o);return o}function ly(n,o,u,p,_,A,k){if(n){!k&&A&&LY(n,p,_,A);for(var q=n,Y,j;n.prev!==n.next;){if(Y=n.prev,j=n.next,A?wY(n,p,_,A):bY(n)){o.push(Y.i/u),o.push(n.i/u),o.push(j.i/u),fy(n),n=j.next,q=j.next;continue}if(n=j,n===q){k?k===1?(n=TY(ph(n),o,u),ly(n,o,u,p,_,A,2)):k===2&&AY(n,o,u,p,_,A):ly(ph(n),o,u,p,_,A,1);break}}}}function bY(n){var o=n.prev,u=n,p=n.next;if(wn(o,u,p)>=0)return!1;for(var _=n.next.next;_!==n.prev;){if(Gp(o.x,o.y,u.x,u.y,p.x,p.y,_.x,_.y)&&wn(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function wY(n,o,u,p){var _=n.prev,A=n,k=n.next;if(wn(_,A,k)>=0)return!1;for(var q=_.xA.x?_.x>k.x?_.x:k.x:A.x>k.x?A.x:k.x,Q=_.y>A.y?_.y>k.y?_.y:k.y:A.y>k.y?A.y:k.y,ie=p3(q,Y,o,u,p),ye=p3(j,Q,o,u,p),he=n.prevZ,Me=n.nextZ;he&&he.z>=ie&&Me&&Me.z<=ye;){if(he!==n.prev&&he!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,he.x,he.y)&&wn(he.prev,he,he.next)>=0||(he=he.prevZ,Me!==n.prev&&Me!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,Me.x,Me.y)&&wn(Me.prev,Me,Me.next)>=0))return!1;Me=Me.nextZ}for(;he&&he.z>=ie;){if(he!==n.prev&&he!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,he.x,he.y)&&wn(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;Me&&Me.z<=ye;){if(Me!==n.prev&&Me!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,Me.x,Me.y)&&wn(Me.prev,Me,Me.next)>=0)return!1;Me=Me.nextZ}return!0}function TY(n,o,u){var p=n;do{var _=p.prev,A=p.next.next;!w1(_,A)&&hM(_,p,p.next,A)&&uy(_,A)&&uy(A,_)&&(o.push(_.i/u),o.push(p.i/u),o.push(A.i/u),fy(p),fy(p.next),p=n=A),p=p.next}while(p!==n);return ph(p)}function AY(n,o,u,p,_,A){var k=n;do{for(var q=k.next.next;q!==k.prev;){if(k.i!==q.i&&zY(k,q)){var Y=vM(k,q);k=ph(k,k.next),Y=ph(Y,Y.next),ly(k,o,u,p,_,A),ly(Y,o,u,p,_,A);return}q=q.next}k=k.next}while(k!==n)}function MY(n,o,u,p){var _=[],A,k,q,Y,j;for(A=0,k=o.length;A=u.next.y&&u.next.y!==u.y){var q=u.x+(_-u.y)*(u.next.x-u.x)/(u.next.y-u.y);if(q<=p&&q>A){if(A=q,q===p){if(_===u.y)return u;if(_===u.next.y)return u.next}k=u.x=u.x&&u.x>=j&&p!==u.x&&Gp(_k.x||u.x===k.x&&EY(k,u)))&&(k=u,ie=ye)),u=u.next;while(u!==Y);return k}function EY(n,o){return wn(n.prev,n,o.prev)<0&&wn(o.next,n,n.next)<0}function LY(n,o,u,p){var _=n;do _.z===null&&(_.z=p3(_.x,_.y,o,u,p)),_.prevZ=_.prev,_.nextZ=_.next,_=_.next;while(_!==n);_.prevZ.nextZ=null,_.prevZ=null,PY(_)}function PY(n){var o,u,p,_,A,k,q,Y,j=1;do{for(u=n,n=null,A=null,k=0;u;){for(k++,p=u,q=0,o=0;o0||Y>0&&p;)q!==0&&(Y===0||!p||u.z<=p.z)?(_=u,u=u.nextZ,q--):(_=p,p=p.nextZ,Y--),A?A.nextZ=_:n=_,_.prevZ=A,A=_;u=p}A.nextZ=null,j*=2}while(k>1);return n}function p3(n,o,u,p,_){return n=32767*(n-u)*_,o=32767*(o-p)*_,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1}function DY(n){var o=n,u=n;do(o.x=0&&(n-k)*(p-q)-(u-k)*(o-q)>=0&&(u-k)*(A-q)-(_-k)*(p-q)>=0}function zY(n,o){return n.next.i!==o.i&&n.prev.i!==o.i&&!IY(n,o)&&(uy(n,o)&&uy(o,n)&&RY(n,o)&&(wn(n.prev,n,o.prev)||wn(n,o.prev,o))||w1(n,o)&&wn(n.prev,n,n.next)>0&&wn(o.prev,o,o.next)>0)}function wn(n,o,u){return(o.y-n.y)*(u.x-o.x)-(o.x-n.x)*(u.y-o.y)}function w1(n,o){return n.x===o.x&&n.y===o.y}function hM(n,o,u,p){var _=A1(wn(n,o,u)),A=A1(wn(n,o,p)),k=A1(wn(u,p,n)),q=A1(wn(u,p,o));return!!(_!==A&&k!==q||_===0&&T1(n,u,o)||A===0&&T1(n,p,o)||k===0&&T1(u,n,p)||q===0&&T1(u,o,p))}function T1(n,o,u){return o.x<=Math.max(n.x,u.x)&&o.x>=Math.min(n.x,u.x)&&o.y<=Math.max(n.y,u.y)&&o.y>=Math.min(n.y,u.y)}function A1(n){return n>0?1:n<0?-1:0}function IY(n,o){var u=n;do{if(u.i!==n.i&&u.next.i!==n.i&&u.i!==o.i&&u.next.i!==o.i&&hM(u,u.next,n,o))return!0;u=u.next}while(u!==n);return!1}function uy(n,o){return wn(n.prev,n,n.next)<0?wn(n,o,n.next)>=0&&wn(n,n.prev,o)>=0:wn(n,o,n.prev)<0||wn(n,n.next,o)<0}function RY(n,o){var u=n,p=!1,_=(n.x+o.x)/2,A=(n.y+o.y)/2;do u.y>A!=u.next.y>A&&u.next.y!==u.y&&_<(u.next.x-u.x)*(A-u.y)/(u.next.y-u.y)+u.x&&(p=!p),u=u.next;while(u!==n);return p}function vM(n,o){var u=new m3(n.i,n.x,n.y),p=new m3(o.i,o.x,o.y),_=n.next,A=o.prev;return n.next=o,o.prev=n,u.next=_,_.prev=u,p.next=u,u.prev=p,A.next=p,p.prev=A,p}function dM(n,o,u,p){var _=new m3(n,o,u);return p?(_.next=p.next,_.prev=p,p.next.prev=_,p.next=_):(_.prev=_,_.next=_),_}function fy(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function m3(n,o,u){this.i=n,this.x=o,this.y=u,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}b1.deviation=function(n,o,u,p){var _=o&&o.length,A=_?o[0]*u:n.length,k=Math.abs(y3(n,0,A,u));if(_)for(var q=0,Y=o.length;q0&&(p+=n[_-1].length,u.holes.push(p))}return u},d3.default=xY;function FY(n,o,u,p,_){pM(n,o,u||0,p||n.length-1,_||qY)}function pM(n,o,u,p,_){for(;p>u;){if(p-u>600){var A=p-u+1,k=o-u+1,q=Math.log(A),Y=.5*Math.exp(2*q/3),j=.5*Math.sqrt(q*Y*(A-Y)/A)*(k-A/2<0?-1:1),Q=Math.max(u,Math.floor(o-k*Y/A+j)),ie=Math.min(p,Math.floor(o+(A-k)*Y/A+j));pM(n,o,Q,ie,_)}var ye=n[o],he=u,Me=p;for(cy(n,u,o),_(n[p],ye)>0&&cy(n,u,p);he0;)Me--}_(n[u],ye)===0?cy(n,u,Me):(Me++,cy(n,Me,p)),Me<=o&&(u=Me+1),o<=Me&&(p=Me-1)}}function cy(n,o,u){var p=n[o];n[o]=n[u],n[u]=p}function qY(n,o){return no?1:0}function g3(n,o){var u=n.length;if(u<=1)return[n];for(var p=[],_,A,k=0;k1)for(var Y=0;Y>3}if(p--,u===1||u===2)_+=n.readSVarint(),A+=n.readSVarint(),u===1&&(q&&k.push(q),q=[]),q.push(new v(_,A));else if(u===7)q&&q.push(q[0].clone());else throw new Error("unknown command "+u)}return q&&k.push(q),k},Zp.prototype.bbox=function(){var n=this._pbf;n.pos=this._geometry;for(var o=n.readVarint()+n.pos,u=1,p=0,_=0,A=0,k=1/0,q=-1/0,Y=1/0,j=-1/0;n.pos>3}if(p--,u===1||u===2)_+=n.readSVarint(),A+=n.readSVarint(),_q&&(q=_),Aj&&(j=A);else if(u!==7)throw new Error("unknown command "+u)}return[k,Y,q,j]},Zp.prototype.toGeoJSON=function(n,o,u){var p=this.extent*Math.pow(2,u),_=this.extent*n,A=this.extent*o,k=this.loadGeometry(),q=Zp.types[this.type],Y,j;function Q(he){for(var Me=0;Me>3;o=p===1?n.readString():p===2?n.readFloat():p===3?n.readDouble():p===4?n.readVarint64():p===5?n.readVarint():p===6?n.readSVarint():p===7?n.readBoolean():null}return o}gM.prototype.feature=function(n){if(n<0||n>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[n];var o=this._pbf.readVarint()+this._pbf.pos;return new mM(this._pbf,o,this.extent,this._keys,this._values)};var QY=$Y;function $Y(n,o){this.layers=n.readFields(eW,{},o)}function eW(n,o,u){if(n===3){var p=new yM(u,u.readVarint()+u.pos);p.length&&(o[p.name]=p)}}var tW=QY,rW=mM,aW=yM,Yp={VectorTile:tW,VectorTileFeature:rW,VectorTileLayer:aW},iW=Yp.VectorTileFeature.types,nW=500,b3=Math.pow(2,13);function hy(n,o,u,p,_,A,k,q){n.emplaceBack(o,u,Math.floor(p*b3)*2+k,_*b3*2,A*b3*2,Math.round(q))}var Eu=function(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(function(u){return u.id}),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new _f,this.indexArray=new Su,this.programConfigurations=new Sr(o.layers,o.zoom),this.segments=new bn,this.stateDependentLayerIds=this.layers.filter(function(u){return u.isStateDependent()}).map(function(u){return u.id})};Eu.prototype.populate=function(o,u,p){this.features=[],this.hasPattern=_3("fill-extrusion",this.layers,u);for(var _=0,A=o;_=1){var St=st[Lt-1];if(!oW(gt,St)){he.vertexLength+4>bn.MAX_VERTEX_ARRAY_LENGTH&&(he=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var It=gt.sub(St)._perp()._unit(),Jt=St.dist(gt);Qe+Jt>32768&&(Qe=0),hy(this.layoutVertexArray,gt.x,gt.y,It.x,It.y,0,0,Qe),hy(this.layoutVertexArray,gt.x,gt.y,It.x,It.y,0,1,Qe),Qe+=Jt,hy(this.layoutVertexArray,St.x,St.y,It.x,It.y,0,0,Qe),hy(this.layoutVertexArray,St.x,St.y,It.x,It.y,0,1,Qe);var hr=he.vertexLength;this.indexArray.emplaceBack(hr,hr+2,hr+1),this.indexArray.emplaceBack(hr+1,hr+2,hr+3),he.vertexLength+=4,he.primitiveLength+=2}}}}if(he.vertexLength+j>bn.MAX_VERTEX_ARRAY_LENGTH&&(he=this.segments.prepareSegment(j,this.layoutVertexArray,this.indexArray)),iW[o.type]==="Polygon"){for(var ur=[],Rr=[],kr=he.vertexLength,zr=0,Qr=Y;zrqr)||n.y===o.y&&(n.y<0||n.y>qr)}function sW(n){return n.every(function(o){return o.x<0})||n.every(function(o){return o.x>qr})||n.every(function(o){return o.y<0})||n.every(function(o){return o.y>qr})}var lW=new zn({"fill-extrusion-opacity":new br(Xt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Vr(Xt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new br(Xt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new br(Xt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qi(Xt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Vr(Xt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Vr(Xt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new br(Xt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),uW={paint:lW},fW=function(n){function o(u){n.call(this,u,uW)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.createBucket=function(p){return new Eu(p)},o.prototype.queryRadius=function(){return tl(this.paint.get("fill-extrusion-translate"))},o.prototype.is3D=function(){return!0},o.prototype.queryIntersectsFeature=function(p,_,A,k,q,Y,j,Q){var ie=ku(p,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Y.angle,j),ye=this.paint.get("fill-extrusion-height").evaluate(_,A),he=this.paint.get("fill-extrusion-base").evaluate(_,A),Me=vW(ie,Q,Y,0),qe=hW(k,he,ye,Q),st=qe[0],Qe=qe[1];return cW(st,Qe,Me)},o}(pi);function vy(n,o){return n.x*o.x+n.y*o.y}function _M(n,o){if(n.length===1){for(var u=0,p=o[u++],_;!_||p.equals(_);)if(_=o[u++],!_)return 1/0;for(;u=2&&o[j-1].equals(o[j-2]);)j--;for(var Q=0;Q0;if(ur&&Lt>Q){var kr=he.dist(Me);if(kr>2*ie){var zr=he.sub(he.sub(Me)._mult(ie/kr)._round());this.updateDistance(Me,zr),this.addCurrentVertex(zr,st,0,0,ye),Me=zr}}var Qr=Me&&qe,Fr=Qr?p:Y?"butt":_;if(Qr&&Fr==="round"&&(JtA&&(Fr="bevel"),Fr==="bevel"&&(Jt>2&&(Fr="flipbevel"),Jt100)gt=Qe.mult(-1);else{var Nr=Jt*st.add(Qe).mag()/st.sub(Qe).mag();gt._perp()._mult(Nr*(Rr?-1:1))}this.addCurrentVertex(he,gt,0,0,ye),this.addCurrentVertex(he,gt.mult(-1),0,0,ye)}else if(Fr==="bevel"||Fr==="fakeround"){var ma=-Math.sqrt(Jt*Jt-1),jr=Rr?ma:0,Ya=Rr?0:ma;if(Me&&this.addCurrentVertex(he,st,jr,Ya,ye),Fr==="fakeround")for(var gi=Math.round(hr*180/Math.PI/bW),Wa=1;Wa2*ie){var Mn=he.add(qe.sub(he)._mult(ie/Gn)._round());this.updateDistance(he,Mn),this.addCurrentVertex(Mn,Qe,0,0,ye),he=Mn}}}}},zo.prototype.addCurrentVertex=function(o,u,p,_,A,k){k===void 0&&(k=!1);var q=u.x+u.y*p,Y=u.y-u.x*p,j=-u.x+u.y*_,Q=-u.y-u.x*_;this.addHalfVertex(o,q,Y,k,!1,p,A),this.addHalfVertex(o,j,Q,k,!0,-_,A),this.distance>wM/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(o,u,p,_,A,k))},zo.prototype.addHalfVertex=function(o,u,p,_,A,k,q){var Y=o.x,j=o.y,Q=this.lineClips?this.scaledDistance*(wM-1):this.scaledDistance,ie=Q*bM;if(this.layoutVertexArray.emplaceBack((Y<<1)+(_?1:0),(j<<1)+(A?1:0),Math.round(xM*u)+128,Math.round(xM*p)+128,(k===0?0:k<0?-1:1)+1|(ie&63)<<2,ie>>6),this.lineClips){var ye=this.scaledDistance-this.lineClips.start,he=this.lineClips.end-this.lineClips.start,Me=ye/he;this.layoutVertexArray2.emplaceBack(Me,this.lineClipsArray.length)}var qe=q.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,qe),q.primitiveLength++),A?this.e2=qe:this.e1=qe},zo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},zo.prototype.updateDistance=function(o,u){this.distance+=o.dist(u),this.updateScaledDistance()},y("LineBucket",zo,{omit:["layers","patternFeatures"]});var TW=new zn({"line-cap":new br(Xt.layout_line["line-cap"]),"line-join":new Vr(Xt.layout_line["line-join"]),"line-miter-limit":new br(Xt.layout_line["line-miter-limit"]),"line-round-limit":new br(Xt.layout_line["line-round-limit"]),"line-sort-key":new Vr(Xt.layout_line["line-sort-key"])}),AW=new zn({"line-opacity":new Vr(Xt.paint_line["line-opacity"]),"line-color":new Vr(Xt.paint_line["line-color"]),"line-translate":new br(Xt.paint_line["line-translate"]),"line-translate-anchor":new br(Xt.paint_line["line-translate-anchor"]),"line-width":new Vr(Xt.paint_line["line-width"]),"line-gap-width":new Vr(Xt.paint_line["line-gap-width"]),"line-offset":new Vr(Xt.paint_line["line-offset"]),"line-blur":new Vr(Xt.paint_line["line-blur"]),"line-dasharray":new Ti(Xt.paint_line["line-dasharray"]),"line-pattern":new qi(Xt.paint_line["line-pattern"]),"line-gradient":new lo(Xt.paint_line["line-gradient"])}),TM={paint:AW,layout:TW},MW=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.possiblyEvaluate=function(p,_){return _=new jt(Math.floor(_.zoom),{now:_.now,fadeDuration:_.fadeDuration,zoomHistory:_.zoomHistory,transition:_.transition}),n.prototype.possiblyEvaluate.call(this,p,_)},o.prototype.evaluate=function(p,_,A,k){return _=H({},_,{zoom:Math.floor(_.zoom)}),n.prototype.evaluate.call(this,p,_,A,k)},o}(Vr),AM=new MW(TM.paint.properties["line-width"].specification);AM.useIntegerZoom=!0;var SW=function(n){function o(u){n.call(this,u,TM),this.gradientVersion=0}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._handleSpecialPaintPropertyUpdate=function(p){if(p==="line-gradient"){var _=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=_._styleExpression.expression instanceof As,this.gradientVersion=(this.gradientVersion+1)%S}},o.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},o.prototype.recalculate=function(p,_){n.prototype.recalculate.call(this,p,_),this.paint._values["line-floorwidth"]=AM.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,p)},o.prototype.createBucket=function(p){return new zo(p)},o.prototype.queryRadius=function(p){var _=p,A=MM(Do("line-width",this,_),Do("line-gap-width",this,_)),k=Do("line-offset",this,_);return A/2+Math.abs(k)+tl(this.paint.get("line-translate"))},o.prototype.queryIntersectsFeature=function(p,_,A,k,q,Y,j){var Q=ku(p,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Y.angle,j),ie=j/2*MM(this.paint.get("line-width").evaluate(_,A),this.paint.get("line-gap-width").evaluate(_,A)),ye=this.paint.get("line-offset").evaluate(_,A);return ye&&(k=kW(k,ye*j)),In(Q,k,ie)},o.prototype.isTileClipped=function(){return!0},o}(pi);function MM(n,o){return o>0?o+2*n:n}function kW(n,o){for(var u=[],p=new v(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 RW(n){for(var o="",u=0;u>1,Q=-7,ie=u?_-1:0,ye=u?-1:1,he=n[o+ie];for(ie+=ye,A=he&(1<<-Q)-1,he>>=-Q,Q+=q;Q>0;A=A*256+n[o+ie],ie+=ye,Q-=8);for(k=A&(1<<-Q)-1,A>>=-Q,Q+=p;Q>0;k=k*256+n[o+ie],ie+=ye,Q-=8);if(A===0)A=1-j;else{if(A===Y)return k?NaN:(he?-1:1)*(1/0);k=k+Math.pow(2,p),A=A-j}return(he?-1:1)*k*Math.pow(2,A-p)},qW=function(n,o,u,p,_,A){var k,q,Y,j=A*8-_-1,Q=(1<>1,ye=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,he=p?0:A-1,Me=p?1:-1,qe=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(q=isNaN(o)?1:0,k=Q):(k=Math.floor(Math.log(o)/Math.LN2),o*(Y=Math.pow(2,-k))<1&&(k--,Y*=2),k+ie>=1?o+=ye/Y:o+=ye*Math.pow(2,1-ie),o*Y>=2&&(k++,Y/=2),k+ie>=Q?(q=0,k=Q):k+ie>=1?(q=(o*Y-1)*Math.pow(2,_),k=k+ie):(q=o*Math.pow(2,ie-1)*Math.pow(2,_),k=0));_>=8;n[u+he]=q&255,he+=Me,q/=256,_-=8);for(k=k<<_|q,j+=_;j>0;n[u+he]=k&255,he+=Me,k/=256,j-=8);n[u+he-Me]|=qe*128},M1={read:FW,write:qW},S1=Li;function Li(n){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(n)?n:new Uint8Array(n||0),this.pos=0,this.type=0,this.length=this.buf.length}Li.Varint=0,Li.Fixed64=1,Li.Bytes=2,Li.Fixed32=5;var w3=65536*65536,kM=1/w3,NW=12,CM=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Li.prototype={destroy:function(){this.buf=null},readFields:function(n,o,u){for(u=u||this.length;this.pos>3,A=this.pos;this.type=p&7,n(_,o,this),this.pos===A&&this.skip(p)}return o},readMessage:function(n,o){return this.readFields(n,o,this.readVarint()+this.pos)},readFixed32:function(){var n=k1(this.buf,this.pos);return this.pos+=4,n},readSFixed32:function(){var n=LM(this.buf,this.pos);return this.pos+=4,n},readFixed64:function(){var n=k1(this.buf,this.pos)+k1(this.buf,this.pos+4)*w3;return this.pos+=8,n},readSFixed64:function(){var n=k1(this.buf,this.pos)+LM(this.buf,this.pos+4)*w3;return this.pos+=8,n},readFloat:function(){var n=M1.read(this.buf,this.pos,!0,23,4);return this.pos+=4,n},readDouble:function(){var n=M1.read(this.buf,this.pos,!0,52,8);return this.pos+=8,n},readVarint:function(n){var o=this.buf,u,p;return p=o[this.pos++],u=p&127,p<128||(p=o[this.pos++],u|=(p&127)<<7,p<128)||(p=o[this.pos++],u|=(p&127)<<14,p<128)||(p=o[this.pos++],u|=(p&127)<<21,p<128)?u:(p=o[this.pos],u|=(p&15)<<28,BW(u,n,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var n=this.readVarint();return n%2===1?(n+1)/-2:n/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var n=this.readVarint()+this.pos,o=this.pos;return this.pos=n,n-o>=NW&&CM?$W(this.buf,o,n):QW(this.buf,o,n)},readBytes:function(){var n=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,n);return this.pos=n,o},readPackedVarint:function(n,o){if(this.type!==Li.Bytes)return n.push(this.readVarint(o));var u=sc(this);for(n=n||[];this.pos127;);else if(o===Li.Bytes)this.pos=this.readVarint()+this.pos;else if(o===Li.Fixed32)this.pos+=4;else if(o===Li.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+o)},writeTag:function(n,o){this.writeVarint(n<<3|o)},realloc:function(n){for(var o=this.length||16;o268435455||n<0){OW(n,this);return}this.realloc(4),this.buf[this.pos++]=n&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=n>>>7&127)))},writeSVarint:function(n){this.writeVarint(n<0?-n*2-1:n*2)},writeBoolean:function(n){this.writeVarint(!!n)},writeString:function(n){n=String(n),this.realloc(n.length*4),this.pos++;var o=this.pos;this.pos=eX(this.buf,n,this.pos);var u=this.pos-o;u>=128&&EM(o,u,this),this.pos=o-1,this.writeVarint(u),this.pos+=u},writeFloat:function(n){this.realloc(4),M1.write(this.buf,n,this.pos,!0,23,4),this.pos+=4},writeDouble:function(n){this.realloc(8),M1.write(this.buf,n,this.pos,!0,52,8),this.pos+=8},writeBytes:function(n){var o=n.length;this.writeVarint(o),this.realloc(o);for(var u=0;u=128&&EM(u,p,this),this.pos=u-1,this.writeVarint(p),this.pos+=p},writeMessage:function(n,o,u){this.writeTag(n,Li.Bytes),this.writeRawMessage(o,u)},writePackedVarint:function(n,o){o.length&&this.writeMessage(n,HW,o)},writePackedSVarint:function(n,o){o.length&&this.writeMessage(n,GW,o)},writePackedBoolean:function(n,o){o.length&&this.writeMessage(n,WW,o)},writePackedFloat:function(n,o){o.length&&this.writeMessage(n,ZW,o)},writePackedDouble:function(n,o){o.length&&this.writeMessage(n,YW,o)},writePackedFixed32:function(n,o){o.length&&this.writeMessage(n,XW,o)},writePackedSFixed32:function(n,o){o.length&&this.writeMessage(n,jW,o)},writePackedFixed64:function(n,o){o.length&&this.writeMessage(n,JW,o)},writePackedSFixed64:function(n,o){o.length&&this.writeMessage(n,KW,o)},writeBytesField:function(n,o){this.writeTag(n,Li.Bytes),this.writeBytes(o)},writeFixed32Field:function(n,o){this.writeTag(n,Li.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(n,o){this.writeTag(n,Li.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(n,o){this.writeTag(n,Li.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(n,o){this.writeTag(n,Li.Fixed64),this.writeSFixed64(o)},writeVarintField:function(n,o){this.writeTag(n,Li.Varint),this.writeVarint(o)},writeSVarintField:function(n,o){this.writeTag(n,Li.Varint),this.writeSVarint(o)},writeStringField:function(n,o){this.writeTag(n,Li.Bytes),this.writeString(o)},writeFloatField:function(n,o){this.writeTag(n,Li.Fixed32),this.writeFloat(o)},writeDoubleField:function(n,o){this.writeTag(n,Li.Fixed64),this.writeDouble(o)},writeBooleanField:function(n,o){this.writeVarintField(n,!!o)}};function BW(n,o,u){var p=u.buf,_,A;if(A=p[u.pos++],_=(A&112)>>4,A<128||(A=p[u.pos++],_|=(A&127)<<3,A<128)||(A=p[u.pos++],_|=(A&127)<<10,A<128)||(A=p[u.pos++],_|=(A&127)<<17,A<128)||(A=p[u.pos++],_|=(A&127)<<24,A<128)||(A=p[u.pos++],_|=(A&1)<<31,A<128))return Wp(n,_,o);throw new Error("Expected varint not more than 10 bytes")}function sc(n){return n.type===Li.Bytes?n.readVarint()+n.pos:n.pos+1}function Wp(n,o,u){return u?o*4294967296+(n>>>0):(o>>>0)*4294967296+(n>>>0)}function OW(n,o){var u,p;if(n>=0?(u=n%4294967296|0,p=n/4294967296|0):(u=~(-n%4294967296),p=~(-n/4294967296),u^4294967295?u=u+1|0:(u=0,p=p+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");o.realloc(10),UW(u,p,o),VW(p,o)}function UW(n,o,u){u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos]=n&127}function VW(n,o){var u=(n&7)<<4;o.buf[o.pos++]|=u|((n>>>=3)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127)))))}function EM(n,o,u){var p=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(Math.LN2*7));u.realloc(p);for(var _=u.pos-1;_>=n;_--)u.buf[_+p]=u.buf[_]}function HW(n,o){for(var u=0;u>>8,n[u+2]=o>>>16,n[u+3]=o>>>24}function LM(n,o){return(n[o]|n[o+1]<<8|n[o+2]<<16)+(n[o+3]<<24)}function QW(n,o,u){for(var p="",_=o;_239?4:A>223?3:A>191?2:1;if(_+q>u)break;var Y,j,Q;q===1?A<128&&(k=A):q===2?(Y=n[_+1],(Y&192)===128&&(k=(A&31)<<6|Y&63,k<=127&&(k=null))):q===3?(Y=n[_+1],j=n[_+2],(Y&192)===128&&(j&192)===128&&(k=(A&15)<<12|(Y&63)<<6|j&63,(k<=2047||k>=55296&&k<=57343)&&(k=null))):q===4&&(Y=n[_+1],j=n[_+2],Q=n[_+3],(Y&192)===128&&(j&192)===128&&(Q&192)===128&&(k=(A&15)<<18|(Y&63)<<12|(j&63)<<6|Q&63,(k<=65535||k>=1114112)&&(k=null))),k===null?(k=65533,q=1):k>65535&&(k-=65536,p+=String.fromCharCode(k>>>10&1023|55296),k=56320|k&1023),p+=String.fromCharCode(k),_+=q}return p}function $W(n,o,u){return CM.decode(n.subarray(o,u))}function eX(n,o,u){for(var p=0,_,A;p55295&&_<57344)if(A)if(_<56320){n[u++]=239,n[u++]=191,n[u++]=189,A=_;continue}else _=A-55296<<10|_-56320|65536,A=null;else{_>56319||p+1===o.length?(n[u++]=239,n[u++]=191,n[u++]=189):A=_;continue}else A&&(n[u++]=239,n[u++]=191,n[u++]=189,A=null);_<128?n[u++]=_:(_<2048?n[u++]=_>>6|192:(_<65536?n[u++]=_>>12|224:(n[u++]=_>>18|240,n[u++]=_>>12&63|128),n[u++]=_>>6&63|128),n[u++]=_&63|128)}return u}var T3=3;function tX(n,o,u){n===1&&u.readMessage(rX,o)}function rX(n,o,u){if(n===3){var p=u.readMessage(aX,{}),_=p.id,A=p.bitmap,k=p.width,q=p.height,Y=p.left,j=p.top,Q=p.advance;o.push({id:_,bitmap:new jv({width:k+2*T3,height:q+2*T3},A),metrics:{width:k,height:q,left:Y,top:j,advance:Q}})}}function aX(n,o,u){n===1?o.id=u.readVarint():n===2?o.bitmap=u.readBytes():n===3?o.width=u.readVarint():n===4?o.height=u.readVarint():n===5?o.left=u.readSVarint():n===6?o.top=u.readSVarint():n===7&&(o.advance=u.readVarint())}function iX(n){return new S1(n).readFields(tX,[])}var PM=T3;function DM(n){for(var o=0,u=0,p=0,_=n;p<_.length;p+=1){var A=_[p];o+=A.w*A.h,u=Math.max(u,A.w)}n.sort(function(st,Qe){return Qe.h-st.h});for(var k=Math.max(Math.ceil(Math.sqrt(o/.95)),u),q=[{x:0,y:0,w:k,h:1/0}],Y=0,j=0,Q=0,ie=n;Q=0;he--){var Me=q[he];if(!(ye.w>Me.w||ye.h>Me.h)){if(ye.x=Me.x,ye.y=Me.y,j=Math.max(j,ye.y+ye.h),Y=Math.max(Y,ye.x+ye.w),ye.w===Me.w&&ye.h===Me.h){var qe=q.pop();he=0&&_>=o&&wf[this.text.charCodeAt(_)];_--)p--;this.text=this.text.substring(o,p),this.sectionIndex=this.sectionIndex.slice(o,p)},bo.prototype.substring=function(o,u){var p=new bo;return p.text=this.text.substring(o,u),p.sectionIndex=this.sectionIndex.slice(o,u),p.sections=this.sections,p},bo.prototype.toString=function(){return this.text},bo.prototype.getMaxScale=function(){var o=this;return this.sectionIndex.reduce(function(u,p){return Math.max(u,o.sections[p].scale)},0)},bo.prototype.addTextSection=function(o,u){this.text+=o.text,this.sections.push(jp.forText(o.scale,o.fontStack||u));for(var p=this.sections.length-1,_=0;_=IM?null:++this.imageSectionID:(this.imageSectionID=zM,this.imageSectionID)};function oX(n,o){for(var u=[],p=n.text,_=0,A=0,k=o;A=0,Q=0,ie=0;ie0&&Mn>Rr&&(Rr=Mn)}else{var Xa=u[zr.fontStack],Ha=Xa&&Xa[Fr];if(Ha&&Ha.rect)jr=Ha.rect,ma=Ha.metrics;else{var Mi=o[zr.fontStack],Pi=Mi&&Mi[Fr];if(!Pi)continue;ma=Pi.metrics}Nr=(It-zr.scale)*Kn}Wa?(n.verticalizable=!0,ur.push({glyph:Fr,imageName:Ya,x:ye,y:he+Nr,vertical:Wa,scale:zr.scale,fontStack:zr.fontStack,sectionIndex:Qr,metrics:ma,rect:jr}),ye+=gi*zr.scale+j):(ur.push({glyph:Fr,imageName:Ya,x:ye,y:he+Nr,vertical:Wa,scale:zr.scale,fontStack:zr.fontStack,sectionIndex:Qr,metrics:ma,rect:jr}),ye+=ma.advance*zr.scale+j)}if(ur.length!==0){var wo=ye-j;Me=Math.max(wo,Me),fX(ur,0,ur.length-1,st,Rr)}ye=0;var To=A*It+Rr;hr.lineOffset=Math.max(Rr,Jt),he+=To,qe=Math.max(To,qe),++Qe}var Zn=he-yy,Io=M3(k),Ro=Io.horizontalAlign,Rn=Io.verticalAlign;cX(n.positionedLines,st,Ro,Rn,Me,qe,A,Zn,_.length),n.top+=-Rn*Zn,n.bottom=n.top+Zn,n.left+=-Ro*Me,n.right=n.left+Me}function fX(n,o,u,p,_){if(!(!p&&!_))for(var A=n[u],k=A.metrics.advance*A.scale,q=(n[u].x+k)*p,Y=o;Y<=u;Y++)n[Y].x-=q,n[Y].y+=_}function cX(n,o,u,p,_,A,k,q,Y){var j=(o-u)*_,Q=0;A!==k?Q=-q*p-yy:Q=(-p*Y+.5)*k;for(var ie=0,ye=n;ie-u/2;){if(k--,k<0)return!1;q-=n[k].dist(A),A=n[k]}q+=n[k].dist(n[k+1]),k++;for(var Y=[],j=0;qp;)j-=Y.shift().angleDelta;if(j>_)return!1;k++,q+=ie.dist(ye)}return!0}function HM(n){for(var o=0,u=0;uj){var Me=(j-Y)/he,qe=fn(ie.x,ye.x,Me),st=fn(ie.y,ye.y,Me),Qe=new Jp(qe,st,ye.angleTo(ie),Q);return Qe._round(),!k||VM(n,Qe,q,k,o)?Qe:void 0}Y+=he}}function pX(n,o,u,p,_,A,k,q,Y){var j=GM(p,A,k),Q=ZM(p,_),ie=Q*k,ye=n[0].x===0||n[0].x===Y||n[0].y===0||n[0].y===Y;o-ie=0&&St=0&&It=0&&ye+j<=Q){var Jt=new Jp(St,It,Lt,Me);Jt._round(),(!p||VM(n,Jt,A,p,_))&&he.push(Jt)}}ie+=Qe}return!q&&!he.length&&!k&&(he=YM(n,ie/2,u,p,_,A,k,!0,Y)),he}function WM(n,o,u,p,_){for(var A=[],k=0;k=p&&ie.x>=p)&&(Q.x>=p?Q=new v(p,Q.y+(ie.y-Q.y)*((p-Q.x)/(ie.x-Q.x)))._round():ie.x>=p&&(ie=new v(p,Q.y+(ie.y-Q.y)*((p-Q.x)/(ie.x-Q.x)))._round()),!(Q.y>=_&&ie.y>=_)&&(Q.y>=_?Q=new v(Q.x+(ie.x-Q.x)*((_-Q.y)/(ie.y-Q.y)),_)._round():ie.y>=_&&(ie=new v(Q.x+(ie.x-Q.x)*((_-Q.y)/(ie.y-Q.y)),_)._round()),(!Y||!Q.equals(Y[Y.length-1]))&&(Y=[Q],A.push(Y)),Y.push(ie)))))}return A}var Kp=ds;function XM(n,o,u,p){var _=[],A=n.image,k=A.pixelRatio,q=A.paddedRect.w-2*Kp,Y=A.paddedRect.h-2*Kp,j=n.right-n.left,Q=n.bottom-n.top,ie=A.stretchX||[[0,q]],ye=A.stretchY||[[0,Y]],he=function(Xa,Ha){return Xa+Ha[1]-Ha[0]},Me=ie.reduce(he,0),qe=ye.reduce(he,0),st=q-Me,Qe=Y-qe,Lt=0,gt=Me,St=0,It=qe,Jt=0,hr=st,ur=0,Rr=Qe;if(A.content&&p){var kr=A.content;Lt=L1(ie,0,kr[0]),St=L1(ye,0,kr[1]),gt=L1(ie,kr[0],kr[2]),It=L1(ye,kr[1],kr[3]),Jt=kr[0]-Lt,ur=kr[1]-St,hr=kr[2]-kr[0]-gt,Rr=kr[3]-kr[1]-It}var zr=function(Xa,Ha,Mi,Pi){var tn=P1(Xa.stretch-Lt,gt,j,n.left),ln=D1(Xa.fixed-Jt,hr,Xa.stretch,Me),Gn=P1(Ha.stretch-St,It,Q,n.top),Mn=D1(Ha.fixed-ur,Rr,Ha.stretch,qe),wo=P1(Mi.stretch-Lt,gt,j,n.left),To=D1(Mi.fixed-Jt,hr,Mi.stretch,Me),Zn=P1(Pi.stretch-St,It,Q,n.top),Io=D1(Pi.fixed-ur,Rr,Pi.stretch,qe),Ro=new v(tn,Gn),Rn=new v(wo,Gn),Fo=new v(wo,Zn),Is=new v(tn,Zn),fc=new v(ln/k,Mn/k),gh=new v(To/k,Io/k),_h=o*Math.PI/180;if(_h){var xh=Math.sin(_h),n0=Math.cos(_h),Vl=[n0,-xh,xh,n0];Ro._matMult(Vl),Rn._matMult(Vl),Is._matMult(Vl),Fo._matMult(Vl)}var N1=Xa.stretch+Xa.fixed,I3=Mi.stretch+Mi.fixed,B1=Ha.stretch+Ha.fixed,R3=Pi.stretch+Pi.fixed,al={x:A.paddedRect.x+Kp+N1,y:A.paddedRect.y+Kp+B1,w:I3-N1,h:R3-B1},o0=hr/k/j,O1=Rr/k/Q;return{tl:Ro,tr:Rn,bl:Is,br:Fo,tex:al,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fc,pixelOffsetBR:gh,minFontScaleX:o0,minFontScaleY:O1,isSDF:u}};if(!p||!A.stretchX&&!A.stretchY)_.push(zr({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:q+1},{fixed:0,stretch:Y+1}));else for(var Qr=jM(ie,st,Me),Fr=jM(ye,Qe,qe),Nr=0;Nr0&&(Me=Math.max(10,Me),this.circleDiameter=Me)}else{var qe=k.top*q-Y,st=k.bottom*q+Y,Qe=k.left*q-Y,Lt=k.right*q+Y,gt=k.collisionPadding;if(gt&&(Qe-=gt[0]*q,qe-=gt[1]*q,Lt+=gt[2]*q,st+=gt[3]*q),Q){var St=new v(Qe,qe),It=new v(Lt,qe),Jt=new v(Qe,st),hr=new v(Lt,st),ur=Q*Math.PI/180;St._rotate(ur),It._rotate(ur),Jt._rotate(ur),hr._rotate(ur),Qe=Math.min(St.x,It.x,Jt.x,hr.x),Lt=Math.max(St.x,It.x,Jt.x,hr.x),qe=Math.min(St.y,It.y,Jt.y,hr.y),st=Math.max(St.y,It.y,Jt.y,hr.y)}o.emplaceBack(u.x,u.y,Qe,qe,Lt,st,p,_,A)}this.boxEndIndex=o.length},Qp=function(o,u){if(o===void 0&&(o=[]),u===void 0&&(u=yX),this.data=o,this.length=this.data.length,this.compare=u,this.length>0)for(var p=(this.length>>1)-1;p>=0;p--)this._down(p)};Qp.prototype.push=function(o){this.data.push(o),this.length++,this._up(this.length-1)},Qp.prototype.pop=function(){if(this.length!==0){var o=this.data[0],u=this.data.pop();return this.length--,this.length>0&&(this.data[0]=u,this._down(0)),o}},Qp.prototype.peek=function(){return this.data[0]},Qp.prototype._up=function(o){for(var u=this,p=u.data,_=u.compare,A=p[o];o>0;){var k=o-1>>1,q=p[k];if(_(A,q)>=0)break;p[o]=q,o=k}p[o]=A},Qp.prototype._down=function(o){for(var u=this,p=u.data,_=u.compare,A=this.length>>1,k=p[o];o=0)break;p[o]=Y,o=q}p[o]=k};function yX(n,o){return no?1:0}function gX(n,o,u){o===void 0&&(o=1),u===void 0&&(u=!1);for(var p=1/0,_=1/0,A=-1/0,k=-1/0,q=n[0],Y=0;YA)&&(A=j.x),(!Y||j.y>k)&&(k=j.y)}var Q=A-p,ie=k-_,ye=Math.min(Q,ie),he=ye/2,Me=new Qp([],_X);if(ye===0)return new v(p,_);for(var qe=p;qeQe.d||!Qe.d)&&(Qe=gt,u&&console.log("found best %d after %d probes",Math.round(1e4*gt.d)/1e4,Lt)),!(gt.max-Qe.d<=o)&&(he=gt.h/2,Me.push(new $p(gt.p.x-he,gt.p.y-he,he,n)),Me.push(new $p(gt.p.x+he,gt.p.y-he,he,n)),Me.push(new $p(gt.p.x-he,gt.p.y+he,he,n)),Me.push(new $p(gt.p.x+he,gt.p.y+he,he,n)),Lt+=4)}return u&&(console.log("num probes: "+Lt),console.log("best distance: "+Qe.d)),Qe.p}function _X(n,o){return o.max-n.max}function $p(n,o,u,p){this.p=new v(n,o),this.h=u,this.d=xX(this.p,p),this.max=this.d+this.h*Math.SQRT2}function xX(n,o){for(var u=!1,p=1/0,_=0;_n.y!=Q.y>n.y&&n.x<(Q.x-j.x)*(n.y-j.y)/(Q.y-j.y)+j.x&&(u=!u),p=Math.min(p,oc(n,j,Q))}return(u?1:-1)*Math.sqrt(p)}function bX(n){for(var o=0,u=0,p=0,_=n[0],A=0,k=_.length,q=k-1;A=qr||Vl.y<0||Vl.y>=qr||AX(n,Vl,n0,u,p,_,Fr,n.layers[0],n.collisionBoxArray,o.index,o.sourceLayerIndex,n.index,Qe,It,ur,Y,gt,Jt,Rr,he,o,A,j,Q,k)};if(kr==="line")for(var ma=0,jr=WM(o.geometry,0,0,qr,qr);ma1){var Gn=dX(ln,hr,u.vertical||Me,p,qe,Lt);Gn&&Nr(ln,Gn)}}else if(o.type==="Polygon")for(var Mn=0,wo=g3(o.geometry,0);Mnmh&&Se(n.layerIds[0]+': Value for "text-size" is >= '+gy+'. Reduce your "text-size".')):st.kind==="composite"&&(Qe=[Lu*he.compositeTextSizes[0].evaluate(k,{},Me),Lu*he.compositeTextSizes[1].evaluate(k,{},Me)],(Qe[0]>mh||Qe[1]>mh)&&Se(n.layerIds[0]+': Value for "text-size" is >= '+gy+'. Reduce your "text-size".')),n.addSymbols(n.text,qe,Qe,q,A,k,j,o,Y.lineStartIndex,Y.lineLength,ye,Me);for(var Lt=0,gt=Q;Ltmh&&Se(n.layerIds[0]+': Value for "icon-size" is >= '+gy+'. Reduce your "icon-size".')):Ro.kind==="composite"&&(Rn=[Lu*It.compositeIconSizes[0].evaluate(St,{},hr),Lu*It.compositeIconSizes[1].evaluate(St,{},hr)],(Rn[0]>mh||Rn[1]>mh)&&Se(n.layerIds[0]+': Value for "icon-size" is >= '+gy+'. Reduce your "icon-size".')),n.addSymbols(n.icon,Zn,Rn,gt,Lt,St,!1,o,kr.lineStartIndex,kr.lineLength,-1,hr),Wa=n.icon.placedSymbolArray.length-1,Io&&(jr=Io.length*4,n.addSymbols(n.icon,Io,Rn,gt,Lt,St,zs.vertical,o,kr.lineStartIndex,kr.lineLength,-1,hr),Xa=n.icon.placedSymbolArray.length-1)}for(var Fo in p.horizontal){var Is=p.horizontal[Fo];if(!zr){Mi=w(Is.text);var fc=q.layout.get("text-rotate").evaluate(St,{},hr);zr=new z1(Y,o,j,Q,ie,Is,ye,he,Me,fc)}var gh=Is.positionedLines.length===1;if(Ya+=KM(n,o,Is,A,q,Me,St,qe,kr,p.vertical?zs.horizontal:zs.horizontalOnly,gh?Object.keys(p.horizontal):[Fo],Ha,Wa,It,hr),gh)break}p.vertical&&(gi+=KM(n,o,p.vertical,A,q,Me,St,qe,kr,zs.vertical,["vertical"],Ha,Xa,It,hr));var _h=zr?zr.boxStartIndex:n.collisionBoxArray.length,xh=zr?zr.boxEndIndex:n.collisionBoxArray.length,n0=Fr?Fr.boxStartIndex:n.collisionBoxArray.length,Vl=Fr?Fr.boxEndIndex:n.collisionBoxArray.length,N1=Qr?Qr.boxStartIndex:n.collisionBoxArray.length,I3=Qr?Qr.boxEndIndex:n.collisionBoxArray.length,B1=Nr?Nr.boxStartIndex:n.collisionBoxArray.length,R3=Nr?Nr.boxEndIndex:n.collisionBoxArray.length,al=-1,o0=function(by,d7){return by&&by.circleDiameter?Math.max(by.circleDiameter,d7):d7};al=o0(zr,al),al=o0(Fr,al),al=o0(Qr,al),al=o0(Nr,al);var O1=al>-1?1:0;O1&&(al*=ur/Kn),n.glyphOffsetArray.length>=yi.MAX_GLYPHS&&Se("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),St.sortKey!==void 0&&n.addToSortKeyRanges(n.symbolInstances.length,St.sortKey),n.symbolInstances.emplaceBack(o.x,o.y,Ha.right>=0?Ha.right:-1,Ha.center>=0?Ha.center:-1,Ha.left>=0?Ha.left:-1,Ha.vertical||-1,Wa,Xa,Mi,_h,xh,n0,Vl,N1,I3,B1,R3,j,Ya,gi,ma,jr,O1,0,ye,Pi,tn,al)}function MX(n,o,u,p){var _=n.compareText;if(!(o in _))_[o]=[];else for(var A=_[o],k=A.length-1;k>=0;k--)if(p.dist(A[k])0)&&(k.value.kind!=="constant"||k.value.value.length>0),Q=Y.value.kind!=="constant"||!!Y.value.value||Object.keys(Y.parameters).length>0,ie=A.get("symbol-sort-key");if(this.features=[],!(!j&&!Q)){for(var ye=u.iconDependencies,he=u.glyphDependencies,Me=u.availableImages,qe=new jt(this.zoom),st=0,Qe=o;st=0;for(var gi=0,Wa=Rr.sections;gi=0;Y--)k[Y]={x:u[Y].x,y:u[Y].y,tileUnitDistanceFromAnchor:A},Y>0&&(A+=u[Y-1].dist(u[Y]));for(var j=0;j0},yi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},yi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},yi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},yi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},yi.prototype.addIndicesForPlacedSymbol=function(o,u){for(var p=o.placedSymbolArray.get(u),_=p.vertexStartIndex+p.numGlyphs*4,A=p.vertexStartIndex;A<_;A+=4)o.indexArray.emplaceBack(A,A+1,A+2),o.indexArray.emplaceBack(A+1,A+2,A+3)},yi.prototype.getSortedSymbolIndexes=function(o){if(this.sortedAngle===o&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var u=Math.sin(o),p=Math.cos(o),_=[],A=[],k=[],q=0;q1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var p=0,_=this.symbolInstanceIndexes;p<_.length;p+=1){var A=_[p],k=this.symbolInstances.get(A);this.featureSortOrder.push(k.featureIndex),[k.rightJustifiedTextSymbolIndex,k.centerJustifiedTextSymbolIndex,k.leftJustifiedTextSymbolIndex].forEach(function(q,Y,j){q>=0&&j.indexOf(q)===Y&&u.addIndicesForPlacedSymbol(u.text,q)}),k.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,k.verticalPlacedTextSymbolIndex),k.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,k.placedIconSymbolIndex),k.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,k.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},y("SymbolBucket",yi,{omit:["layers","collisionBoxArray","features","compareText"]}),yi.MAX_GLYPHS=65535,yi.addDynamicAttributes=E3;function EX(n,o){return o.replace(/{([^{}]+)}/g,function(u,p){return p in n?String(n[p]):""})}var LX=new zn({"symbol-placement":new br(Xt.layout_symbol["symbol-placement"]),"symbol-spacing":new br(Xt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new br(Xt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Vr(Xt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new br(Xt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new br(Xt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new br(Xt.layout_symbol["icon-ignore-placement"]),"icon-optional":new br(Xt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new br(Xt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Vr(Xt.layout_symbol["icon-size"]),"icon-text-fit":new br(Xt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new br(Xt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Vr(Xt.layout_symbol["icon-image"]),"icon-rotate":new Vr(Xt.layout_symbol["icon-rotate"]),"icon-padding":new br(Xt.layout_symbol["icon-padding"]),"icon-keep-upright":new br(Xt.layout_symbol["icon-keep-upright"]),"icon-offset":new Vr(Xt.layout_symbol["icon-offset"]),"icon-anchor":new Vr(Xt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new br(Xt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new br(Xt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new br(Xt.layout_symbol["text-rotation-alignment"]),"text-field":new Vr(Xt.layout_symbol["text-field"]),"text-font":new Vr(Xt.layout_symbol["text-font"]),"text-size":new Vr(Xt.layout_symbol["text-size"]),"text-max-width":new Vr(Xt.layout_symbol["text-max-width"]),"text-line-height":new br(Xt.layout_symbol["text-line-height"]),"text-letter-spacing":new Vr(Xt.layout_symbol["text-letter-spacing"]),"text-justify":new Vr(Xt.layout_symbol["text-justify"]),"text-radial-offset":new Vr(Xt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new br(Xt.layout_symbol["text-variable-anchor"]),"text-anchor":new Vr(Xt.layout_symbol["text-anchor"]),"text-max-angle":new br(Xt.layout_symbol["text-max-angle"]),"text-writing-mode":new br(Xt.layout_symbol["text-writing-mode"]),"text-rotate":new Vr(Xt.layout_symbol["text-rotate"]),"text-padding":new br(Xt.layout_symbol["text-padding"]),"text-keep-upright":new br(Xt.layout_symbol["text-keep-upright"]),"text-transform":new Vr(Xt.layout_symbol["text-transform"]),"text-offset":new Vr(Xt.layout_symbol["text-offset"]),"text-allow-overlap":new br(Xt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new br(Xt.layout_symbol["text-ignore-placement"]),"text-optional":new br(Xt.layout_symbol["text-optional"])}),PX=new zn({"icon-opacity":new Vr(Xt.paint_symbol["icon-opacity"]),"icon-color":new Vr(Xt.paint_symbol["icon-color"]),"icon-halo-color":new Vr(Xt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Vr(Xt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Vr(Xt.paint_symbol["icon-halo-blur"]),"icon-translate":new br(Xt.paint_symbol["icon-translate"]),"icon-translate-anchor":new br(Xt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Vr(Xt.paint_symbol["text-opacity"]),"text-color":new Vr(Xt.paint_symbol["text-color"],{runtimeType:ws,getOverride:function(n){return n.textColor},hasOverride:function(n){return!!n.textColor}}),"text-halo-color":new Vr(Xt.paint_symbol["text-halo-color"]),"text-halo-width":new Vr(Xt.paint_symbol["text-halo-width"]),"text-halo-blur":new Vr(Xt.paint_symbol["text-halo-blur"]),"text-translate":new br(Xt.paint_symbol["text-translate"]),"text-translate-anchor":new br(Xt.paint_symbol["text-translate-anchor"])}),L3={paint:PX,layout:LX},r0=function(o){this.type=o.property.overrides?o.property.overrides.runtimeType:ef,this.defaultValue=o};r0.prototype.evaluate=function(o){if(o.formattedSection){var u=this.defaultValue.property.overrides;if(u&&u.hasOverride(o.formattedSection))return u.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default},r0.prototype.eachChild=function(o){if(!this.defaultValue.isConstant()){var u=this.defaultValue.value;o(u._styleExpression.expression)}},r0.prototype.outputDefined=function(){return!1},r0.prototype.serialize=function(){return null},y("FormatSectionOverride",r0,{omit:["defaultValue"]});var DX=function(n){function o(u){n.call(this,u,L3)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.recalculate=function(p,_){if(n.prototype.recalculate.call(this,p,_),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 A=this.layout.get("text-writing-mode");if(A){for(var k=[],q=0,Y=A;q",targetMapId:_,sourceMapId:k.mapId})}}},a0.prototype.receive=function(o){var u=o.data,p=u.id;if(p&&!(u.targetMapId&&this.mapId!==u.targetMapId))if(u.type===""){delete this.tasks[p];var _=this.cancelCallbacks[p];delete this.cancelCallbacks[p],_&&_()}else it()||u.mustQueue?(this.tasks[p]=u,this.taskQueue.push(p),this.invoker.trigger()):this.processTask(p,u)},a0.prototype.process=function(){if(this.taskQueue.length){var o=this.taskQueue.shift(),u=this.tasks[o];delete this.tasks[o],this.taskQueue.length&&this.invoker.trigger(),u&&this.processTask(o,u)}},a0.prototype.processTask=function(o,u){var p=this;if(u.type===""){var _=this.callbacks[o];delete this.callbacks[o],_&&(u.error?_(Z(u.error)):_(null,Z(u.data)))}else{var A=!1,k=_t(this.globalScope)?void 0:[],q=u.hasCallback?function(ye,he){A=!0,delete p.cancelCallbacks[o],p.target.postMessage({id:o,type:"",sourceMapId:p.mapId,error:ye?U(ye):null,data:U(he,k)},k)}:function(ye){A=!0},Y=null,j=Z(u.data);if(this.parent[u.type])Y=this.parent[u.type](u.sourceMapId,j,q);else if(this.parent.getWorkerSource){var Q=u.type.split("."),ie=this.parent.getWorkerSource(u.sourceMapId,Q[0],j.source);Y=ie[Q[1]](j,q)}else q(new Error("Could not find function "+u.type));!A&&Y&&Y.cancel&&(this.cancelCallbacks[o]=Y.cancel)}},a0.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function HX(n,o,u){o=Math.pow(2,u)-o-1;var p=a7(n*256,o*256,u),_=a7((n+1)*256,(o+1)*256,u);return p[0]+","+p[1]+","+_[0]+","+_[1]}function a7(n,o,u){var p=2*Math.PI*6378137/256/Math.pow(2,u),_=n*p-2*Math.PI*6378137/2,A=o*p-2*Math.PI*6378137/2;return[_,A]}var Tn=function(o,u){o&&(u?this.setSouthWest(o).setNorthEast(u):o.length===4?this.setSouthWest([o[0],o[1]]).setNorthEast([o[2],o[3]]):this.setSouthWest(o[0]).setNorthEast(o[1]))};Tn.prototype.setNorthEast=function(o){return this._ne=o instanceof Ui?new Ui(o.lng,o.lat):Ui.convert(o),this},Tn.prototype.setSouthWest=function(o){return this._sw=o instanceof Ui?new Ui(o.lng,o.lat):Ui.convert(o),this},Tn.prototype.extend=function(o){var u=this._sw,p=this._ne,_,A;if(o instanceof Ui)_=o,A=o;else if(o instanceof Tn){if(_=o._sw,A=o._ne,!_||!A)return this}else{if(Array.isArray(o))if(o.length===4||o.every(Array.isArray)){var k=o;return this.extend(Tn.convert(k))}else{var q=o;return this.extend(Ui.convert(q))}return this}return!u&&!p?(this._sw=new Ui(_.lng,_.lat),this._ne=new Ui(A.lng,A.lat)):(u.lng=Math.min(_.lng,u.lng),u.lat=Math.min(_.lat,u.lat),p.lng=Math.max(A.lng,p.lng),p.lat=Math.max(A.lat,p.lat)),this},Tn.prototype.getCenter=function(){return new Ui((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tn.prototype.getSouthWest=function(){return this._sw},Tn.prototype.getNorthEast=function(){return this._ne},Tn.prototype.getNorthWest=function(){return new Ui(this.getWest(),this.getNorth())},Tn.prototype.getSouthEast=function(){return new Ui(this.getEast(),this.getSouth())},Tn.prototype.getWest=function(){return this._sw.lng},Tn.prototype.getSouth=function(){return this._sw.lat},Tn.prototype.getEast=function(){return this._ne.lng},Tn.prototype.getNorth=function(){return this._ne.lat},Tn.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tn.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tn.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tn.prototype.contains=function(o){var u=Ui.convert(o),p=u.lng,_=u.lat,A=this._sw.lat<=_&&_<=this._ne.lat,k=this._sw.lng<=p&&p<=this._ne.lng;return this._sw.lng>this._ne.lng&&(k=this._sw.lng>=p&&p>=this._ne.lng),A&&k},Tn.convert=function(o){return!o||o instanceof Tn?o:new Tn(o)};var i7=63710088e-1,Ui=function(o,u){if(isNaN(o)||isNaN(u))throw new Error("Invalid LngLat object: ("+o+", "+u+")");if(this.lng=+o,this.lat=+u,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ui.prototype.wrap=function(){return new Ui(R(this.lng,-180,180),this.lat)},Ui.prototype.toArray=function(){return[this.lng,this.lat]},Ui.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ui.prototype.distanceTo=function(o){var u=Math.PI/180,p=this.lat*u,_=o.lat*u,A=Math.sin(p)*Math.sin(_)+Math.cos(p)*Math.cos(_)*Math.cos((o.lng-this.lng)*u),k=i7*Math.acos(Math.min(A,1));return k},Ui.prototype.toBounds=function(o){o===void 0&&(o=0);var u=40075017,p=360*o/u,_=p/Math.cos(Math.PI/180*this.lat);return new Tn(new Ui(this.lng-_,this.lat-p),new Ui(this.lng+_,this.lat+p))},Ui.convert=function(o){if(o instanceof Ui)return o;if(Array.isArray(o)&&(o.length===2||o.length===3))return new Ui(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&typeof o=="object"&&o!==null)return new Ui(Number("lng"in o?o.lng:o.lon),Number(o.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 n7=2*Math.PI*i7;function o7(n){return n7*Math.cos(n*Math.PI/180)}function s7(n){return(180+n)/360}function l7(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function u7(n,o){return n/o7(o)}function GX(n){return n*360-180}function D3(n){var o=180-n*360;return 360/Math.PI*Math.atan(Math.exp(o*Math.PI/180))-90}function ZX(n,o){return n*o7(D3(o))}function YX(n){return 1/Math.cos(n*Math.PI/180)}var Kv=function(o,u,p){p===void 0&&(p=0),this.x=+o,this.y=+u,this.z=+p};Kv.fromLngLat=function(o,u){u===void 0&&(u=0);var p=Ui.convert(o);return new Kv(s7(p.lng),l7(p.lat),u7(u,p.lat))},Kv.prototype.toLngLat=function(){return new Ui(GX(this.x),D3(this.y))},Kv.prototype.toAltitude=function(){return ZX(this.z,this.y)},Kv.prototype.meterInMercatorCoordinateUnits=function(){return 1/n7*YX(D3(this.y))};var Qv=function(o,u,p){this.z=o,this.x=u,this.y=p,this.key=xy(0,o,o,u,p)};Qv.prototype.equals=function(o){return this.z===o.z&&this.x===o.x&&this.y===o.y},Qv.prototype.url=function(o,u){var p=HX(this.x,this.y,this.z),_=WX(this.z,this.x,this.y);return o[(this.x+this.y)%o.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(u==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",_).replace("{bbox-epsg-3857}",p)},Qv.prototype.getTilePoint=function(o){var u=Math.pow(2,this.z);return new v((o.x*u-this.x)*qr,(o.y*u-this.y)*qr)},Qv.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var f7=function(o,u){this.wrap=o,this.canonical=u,this.key=xy(o,u.z,u.z,u.x,u.y)},An=function(o,u,p,_,A){this.overscaledZ=o,this.wrap=u,this.canonical=new Qv(p,+_,+A),this.key=xy(u,o,p,_,A)};An.prototype.equals=function(o){return this.overscaledZ===o.overscaledZ&&this.wrap===o.wrap&&this.canonical.equals(o.canonical)},An.prototype.scaledTo=function(o){var u=this.canonical.z-o;return o>this.canonical.z?new An(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new An(o,this.wrap,o,this.canonical.x>>u,this.canonical.y>>u)},An.prototype.calculateScaledKey=function(o,u){var p=this.canonical.z-o;return o>this.canonical.z?xy(this.wrap*+u,o,this.canonical.z,this.canonical.x,this.canonical.y):xy(this.wrap*+u,o,o,this.canonical.x>>p,this.canonical.y>>p)},An.prototype.isChildOf=function(o){if(o.wrap!==this.wrap)return!1;var u=this.canonical.z-o.canonical.z;return o.overscaledZ===0||o.overscaledZ>u&&o.canonical.y===this.canonical.y>>u},An.prototype.children=function(o){if(this.overscaledZ>=o)return[new An(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var u=this.canonical.z+1,p=this.canonical.x*2,_=this.canonical.y*2;return[new An(u,this.wrap,u,p,_),new An(u,this.wrap,u,p+1,_),new An(u,this.wrap,u,p,_+1),new An(u,this.wrap,u,p+1,_+1)]},An.prototype.isLessThan=function(o){return this.wrapo.wrap?!1:this.overscaledZo.overscaledZ?!1:this.canonical.xo.canonical.x?!1:this.canonical.y0;A--)_=1<=this.dim+1||u<-1||u>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(u+1)*this.stride+(o+1)},lc.prototype._unpackMapbox=function(o,u,p){return(o*256*256+u*256+p)/10-1e4},lc.prototype._unpackTerrarium=function(o,u,p){return o*256+u+p/256-32768},lc.prototype.getPixels=function(){return new es({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},lc.prototype.backfillBorder=function(o,u,p){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");var _=u*this.dim,A=u*this.dim+this.dim,k=p*this.dim,q=p*this.dim+this.dim;switch(u){case-1:_=A-1;break;case 1:A=_+1;break}switch(p){case-1:k=q-1;break;case 1:q=k+1;break}for(var Y=-u*this.dim,j=-p*this.dim,Q=k;Q=0&&ie[3]>=0&&Y.insert(q,ie[0],ie[1],ie[2],ie[3])}},uc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Yp.VectorTile(new S1(this.rawTileData)).layers,this.sourceLayerCoder=new F1(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},uc.prototype.query=function(o,u,p,_){var A=this;this.loadVTLayers();for(var k=o.params||{},q=qr/o.tileSize/o.scale,Y=cf(k.filter),j=o.queryGeometry,Q=o.queryPadding*q,ie=h7(j),ye=this.grid.query(ie.minX-Q,ie.minY-Q,ie.maxX+Q,ie.maxY+Q),he=h7(o.cameraQueryGeometry),Me=this.grid3D.query(he.minX-Q,he.minY-Q,he.maxX+Q,he.maxY+Q,function(Jt,hr,ur,Rr){return Ul(o.cameraQueryGeometry,Jt-Q,hr-Q,ur+Q,Rr+Q)}),qe=0,st=Me;qe_)A=!1;else if(!u)A=!0;else if(this.expirationTime=$r.maxzoom)&&$r.visibility!=="none"){T(pr,this.zoom,ce);var ga=Dt[$r.id]=$r.createBucket({index:yt.bucketLayerIDs.length,layers:pr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Yr,sourceID:this.source});ga.populate(Br,Ft,this.tileID.canonical),yt.bucketLayerIDs.push(pr.map(function(Ga){return Ga.id}))}}}}var nr,wi,La,si,fa=a.mapObject(Ft.glyphDependencies,function(Ga){return Object.keys(Ga).map(Number)});Object.keys(fa).length?Ee.send("getGlyphs",{uid:this.uid,stacks:fa},function(Ga,Jn){nr||(nr=Ga,wi=Jn,xs.call(rt))}):wi={};var Ln=Object.keys(Ft.iconDependencies);Ln.length?Ee.send("getImages",{icons:Ln,source:this.source,tileID:this.tileID,type:"icons"},function(Ga,Jn){nr||(nr=Ga,La=Jn,xs.call(rt))}):La={};var Co=Object.keys(Ft.patternDependencies);Co.length?Ee.send("getImages",{icons:Co,source:this.source,tileID:this.tileID,type:"patterns"},function(Ga,Jn){nr||(nr=Ga,si=Jn,xs.call(rt))}):si={},xs.call(this);function xs(){if(nr)return Ne(nr);if(wi&&La&&si){var Ga=new m(wi),Jn=new a.ImageAtlas(La,si);for(var hu in Dt){var Bi=Dt[hu];Bi instanceof a.SymbolBucket?(T(Bi.layers,this.zoom,ce),a.performSymbolLayout(Bi,wi,Ga.positions,La,Jn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Bi.hasPattern&&(Bi instanceof a.LineBucket||Bi instanceof a.FillBucket||Bi instanceof a.FillExtrusionBucket)&&(T(Bi.layers,this.zoom,ce),Bi.addFeatures(Ft,this.tileID.canonical,Jn.patternPositions))}this.status="done",Ne(null,{buckets:a.values(Dt).filter(function(dl){return!dl.isEmpty()}),featureIndex:yt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ga.image,imageAtlas:Jn,glyphMap:this.returnDependencies?wi:null,iconMap:this.returnDependencies?La:null,glyphPositions:this.returnDependencies?Ga.positions:null})}}};function T(le,ee,se){for(var ce=new a.EvaluationParameters(ee),Ee=0,Ne=le;Ee=0!=!!ee&&le.reverse()}var O=a.vectorTile.VectorTileFeature.prototype.toGeoJSON,H=function(ee){this._feature=ee,this.extent=a.EXTENT,this.type=ee.type,this.properties=ee.tags,"id"in ee&&!isNaN(ee.id)&&(this.id=parseInt(ee.id,10))};H.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ee=[],se=0,ce=this._feature.geometry;se>31}function it(le,ee){for(var se=le.loadGeometry(),ce=le.type,Ee=0,Ne=0,rt=se.length,Ve=0;Ve>1;_t(le,ee,rt,ce,Ee,Ne%2),He(le,ee,se,ce,rt-1,Ne+1),He(le,ee,se,rt+1,Ee,Ne+1)}}function _t(le,ee,se,ce,Ee,Ne){for(;Ee>ce;){if(Ee-ce>600){var rt=Ee-ce+1,Ve=se-ce+1,yt=Math.log(rt),Dt=.5*Math.exp(2*yt/3),Ft=.5*Math.sqrt(yt*Dt*(rt-Dt)/rt)*(Ve-rt/2<0?-1:1),tr=Math.max(ce,Math.floor(se-Ve*Dt/rt+Ft)),Yt=Math.min(Ee,Math.floor(se+(rt-Ve)*Dt/rt+Ft));_t(le,ee,se,tr,Yt,Ne)}var wr=ee[2*se+Ne],Yr=ce,Br=Ee;for(at(le,ee,ce,se),ee[2*Ee+Ne]>wr&&at(le,ee,ce,Ee);Yrwr;)Br--}ee[2*ce+Ne]===wr?at(le,ee,ce,Br):(Br++,at(le,ee,Br,Ee)),Br<=se&&(ce=Br+1),se<=Br&&(Ee=Br-1)}}function at(le,ee,se,ce){At(le,se,ce),At(ee,2*se,2*ce),At(ee,2*se+1,2*ce+1)}function At(le,ee,se){var ce=le[ee];le[ee]=le[se],le[se]=ce}function kt(le,ee,se,ce,Ee,Ne,rt){for(var Ve=[0,le.length-1,0],yt=[],Dt,Ft;Ve.length;){var tr=Ve.pop(),Yt=Ve.pop(),wr=Ve.pop();if(Yt-wr<=rt){for(var Yr=wr;Yr<=Yt;Yr++)Dt=ee[2*Yr],Ft=ee[2*Yr+1],Dt>=se&&Dt<=Ee&&Ft>=ce&&Ft<=Ne&&yt.push(le[Yr]);continue}var Br=Math.floor((wr+Yt)/2);Dt=ee[2*Br],Ft=ee[2*Br+1],Dt>=se&&Dt<=Ee&&Ft>=ce&&Ft<=Ne&&yt.push(le[Br]);var ca=(tr+1)%2;(tr===0?se<=Dt:ce<=Ft)&&(Ve.push(wr),Ve.push(Br-1),Ve.push(ca)),(tr===0?Ee>=Dt:Ne>=Ft)&&(Ve.push(Br+1),Ve.push(Yt),Ve.push(ca))}return yt}function pt(le,ee,se,ce,Ee,Ne){for(var rt=[0,le.length-1,0],Ve=[],yt=Ee*Ee;rt.length;){var Dt=rt.pop(),Ft=rt.pop(),tr=rt.pop();if(Ft-tr<=Ne){for(var Yt=tr;Yt<=Ft;Yt++)ge(ee[2*Yt],ee[2*Yt+1],se,ce)<=yt&&Ve.push(le[Yt]);continue}var wr=Math.floor((tr+Ft)/2),Yr=ee[2*wr],Br=ee[2*wr+1];ge(Yr,Br,se,ce)<=yt&&Ve.push(le[wr]);var ca=(Dt+1)%2;(Dt===0?se-Ee<=Yr:ce-Ee<=Br)&&(rt.push(tr),rt.push(wr-1),rt.push(ca)),(Dt===0?se+Ee>=Yr:ce+Ee>=Br)&&(rt.push(wr+1),rt.push(Ft),rt.push(ca))}return Ve}function ge(le,ee,se,ce){var Ee=le-se,Ne=ee-ce;return Ee*Ee+Ne*Ne}var Re=function(le){return le[0]},xe=function(le){return le[1]},et=function(ee,se,ce,Ee,Ne){se===void 0&&(se=Re),ce===void 0&&(ce=xe),Ee===void 0&&(Ee=64),Ne===void 0&&(Ne=Float64Array),this.nodeSize=Ee,this.points=ee;for(var rt=ee.length<65536?Uint16Array:Uint32Array,Ve=this.ids=new rt(ee.length),yt=this.coords=new Ne(ee.length*2),Dt=0;Dt=Ee;Ft--){var tr=+Date.now();yt=this._cluster(yt,Ft),this.trees[Ft]=new et(yt,Be,ft,rt,Float32Array),ce&&console.log("z%d: %d clusters in %dms",Ft,yt.length,+Date.now()-tr)}return ce&&console.timeEnd("total time"),this},tt.prototype.getClusters=function(ee,se){var ce=((ee[0]+180)%360+360)%360-180,Ee=Math.max(-90,Math.min(90,ee[1])),Ne=ee[2]===180?180:((ee[2]+180)%360+360)%360-180,rt=Math.max(-90,Math.min(90,ee[3]));if(ee[2]-ee[0]>=360)ce=-180,Ne=180;else if(ce>Ne){var Ve=this.getClusters([ce,Ee,180,rt],se),yt=this.getClusters([-180,Ee,Ne,rt],se);return Ve.concat(yt)}for(var Dt=this.trees[this._limitZoom(se)],Ft=Dt.range(Ut(ce),xt(rt),Ut(Ne),xt(Ee)),tr=[],Yt=0,wr=Ft;Ytse&&(Br+=ii.numPoints||1)}if(Br>=yt){for(var Wr=tr.x*Yr,pr=tr.y*Yr,$r=Ve&&Yr>1?this._map(tr,!0):null,ga=(Ft<<5)+(se+1)+this.points.length,nr=0,wi=wr;nr1)for(var Ln=0,Co=wr;Ln>5},tt.prototype._getOriginZoom=function(ee){return(ee-this.points.length)%32},tt.prototype._map=function(ee,se){if(ee.numPoints)return se?Wt({},ee.properties):ee.properties;var ce=this.points[ee.index].properties,Ee=this.options.map(ce);return se&&Ee===ce?Wt({},Ee):Ee};function Nt(le,ee,se,ce,Ee){return{x:le,y:ee,zoom:1/0,id:se,parentId:-1,numPoints:ce,properties:Ee}}function Mt(le,ee){var se=le.geometry.coordinates,ce=se[0],Ee=se[1];return{x:Ut(ce),y:xt(Ee),zoom:1/0,index:ee,parentId:-1}}function Ct(le){return{type:"Feature",id:le.id,properties:Rt(le),geometry:{type:"Point",coordinates:[Et(le.x),ir(le.y)]}}}function Rt(le){var ee=le.numPoints,se=ee>=1e4?Math.round(ee/1e3)+"k":ee>=1e3?Math.round(ee/100)/10+"k":ee;return Wt(Wt({},le.properties),{cluster:!0,cluster_id:le.id,point_count:ee,point_count_abbreviated:se})}function Ut(le){return le/360+.5}function xt(le){var ee=Math.sin(le*Math.PI/180),se=.5-.25*Math.log((1+ee)/(1-ee))/Math.PI;return se<0?0:se>1?1:se}function Et(le){return(le-.5)*360}function ir(le){var ee=(180-le*360)*Math.PI/180;return 360*Math.atan(Math.exp(ee))/Math.PI-90}function Wt(le,ee){for(var se in ee)le[se]=ee[se];return le}function Be(le){return le.x}function ft(le){return le.y}function mt(le,ee,se,ce){for(var Ee=ce,Ne=se-ee>>1,rt=se-ee,Ve,yt=le[ee],Dt=le[ee+1],Ft=le[se],tr=le[se+1],Yt=ee+3;YtEe)Ve=Yt,Ee=wr;else if(wr===Ee){var Yr=Math.abs(Yt-Ne);Yrce&&(Ve-ee>3&&mt(le,ee,Ve,ce),le[Ve+2]=Ee,se-Ve>3&&mt(le,Ve,se,ce))}function Ar(le,ee,se,ce,Ee,Ne){var rt=Ee-se,Ve=Ne-ce;if(rt!==0||Ve!==0){var yt=((le-se)*rt+(ee-ce)*Ve)/(rt*rt+Ve*Ve);yt>1?(se=Ee,ce=Ne):yt>0&&(se+=rt*yt,ce+=Ve*yt)}return rt=le-se,Ve=ee-ce,rt*rt+Ve*Ve}function dr(le,ee,se,ce){var Ee={id:typeof le=="undefined"?null:le,type:ee,geometry:se,tags:ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Tt(Ee),Ee}function Tt(le){var ee=le.geometry,se=le.type;if(se==="Point"||se==="MultiPoint"||se==="LineString")wt(le,ee);else if(se==="Polygon"||se==="MultiLineString")for(var ce=0;ce0&&(ce?rt+=(Ee*Dt-yt*Ne)/2:rt+=Math.sqrt(Math.pow(yt-Ee,2)+Math.pow(Dt-Ne,2))),Ee=yt,Ne=Dt}var Ft=ee.length-3;ee[2]=1,mt(ee,0,Ft,se),ee[Ft+2]=1,ee.size=Math.abs(rt),ee.start=0,ee.end=ee.size}function er(le,ee,se,ce){for(var Ee=0;Ee1?1:se}function Pt(le,ee,se,ce,Ee,Ne,rt,Ve){if(se/=ee,ce/=ee,Ne>=se&&rt=ce)return null;for(var yt=[],Dt=0;Dt=se&&Yr=ce)continue;var Br=[];if(Yt==="Point"||Yt==="MultiPoint")Fe(tr,Br,se,ce,Ee);else if(Yt==="LineString")Ge(tr,Br,se,ce,Ee,!1,Ve.lineMetrics);else if(Yt==="MultiLineString")dt(tr,Br,se,ce,Ee,!1);else if(Yt==="Polygon")dt(tr,Br,se,ce,Ee,!0);else if(Yt==="MultiPolygon")for(var ca=0;ca=se&&rt<=ce&&(ee.push(le[Ne]),ee.push(le[Ne+1]),ee.push(le[Ne+2]))}}function Ge(le,ee,se,ce,Ee,Ne,rt){for(var Ve=bt(le),yt=Ee===0?Er:Tr,Dt=le.start,Ft,tr,Yt=0;Ytse&&(tr=yt(Ve,wr,Yr,ca,ua,se),rt&&(Ve.start=Dt+Ft*tr)):Na>ce?ii=se&&(tr=yt(Ve,wr,Yr,ca,ua,se),Wr=!0),ii>ce&&Na<=ce&&(tr=yt(Ve,wr,Yr,ca,ua,ce),Wr=!0),!Ne&&Wr&&(rt&&(Ve.end=Dt+Ft*tr),ee.push(Ve),Ve=bt(le)),rt&&(Dt+=Ft)}var pr=le.length-3;wr=le[pr],Yr=le[pr+1],Br=le[pr+2],Na=Ee===0?wr:Yr,Na>=se&&Na<=ce&&gr(Ve,wr,Yr,Br),pr=Ve.length-3,Ne&&pr>=3&&(Ve[pr]!==Ve[0]||Ve[pr+1]!==Ve[1])&&gr(Ve,Ve[0],Ve[1],Ve[2]),Ve.length&&ee.push(Ve)}function bt(le){var ee=[];return ee.size=le.size,ee.start=le.start,ee.end=le.end,ee}function dt(le,ee,se,ce,Ee,Ne){for(var rt=0;rtrt.maxX&&(rt.maxX=Ft),tr>rt.maxY&&(rt.maxY=tr)}return rt}function yn(le,ee,se,ce){var Ee=ee.geometry,Ne=ee.type,rt=[];if(Ne==="Point"||Ne==="MultiPoint")for(var Ve=0;Ve0&&ee.size<(Ee?rt:ce)){se.numPoints+=ee.length/3;return}for(var Ve=[],yt=0;ytrt)&&(se.numSimplified++,Ve.push(ee[yt]),Ve.push(ee[yt+1])),se.numPoints++;Ee&&jn(Ve,Ne),le.push(Ve)}function jn(le,ee){for(var se=0,ce=0,Ee=le.length,Ne=Ee-2;ce0===ee)for(ce=0,Ee=le.length;ce24)throw new Error("maxZoom should be in the 0-24 range");if(ee.promoteId&&ee.generateId)throw new Error("promoteId and generateId cannot be used together.");var ce=Vt(le,ee);this.tiles={},this.tileCoords=[],se&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ee.indexMaxZoom,ee.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ce=Hr(ce,ee),ce.length&&this.splitTile(ce,0,0,0),se&&(ce.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)))}Vi.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Vi.prototype.splitTile=function(le,ee,se,ce,Ee,Ne,rt){for(var Ve=[le,ee,se,ce],yt=this.options,Dt=yt.debug;Ve.length;){ce=Ve.pop(),se=Ve.pop(),ee=Ve.pop(),le=Ve.pop();var Ft=1<1&&console.time("creation"),Yt=this.tiles[tr]=Ki(le,ee,se,ce,yt),this.tileCoords.push({z:ee,x:se,y:ce}),Dt)){Dt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ee,se,ce,Yt.numFeatures,Yt.numPoints,Yt.numSimplified),console.timeEnd("creation"));var wr="z"+ee;this.stats[wr]=(this.stats[wr]||0)+1,this.total++}if(Yt.source=le,Ee){if(ee===yt.maxZoom||ee===Ee)continue;var Yr=1<1&&console.time("clipping");var Br=.5*yt.buffer/yt.extent,ca=.5-Br,ua=.5+Br,Na=1+Br,ii,Wr,pr,$r,ga,nr;ii=Wr=pr=$r=null,ga=Pt(le,Ft,se-Br,se+ua,0,Yt.minX,Yt.maxX,yt),nr=Pt(le,Ft,se+ca,se+Na,0,Yt.minX,Yt.maxX,yt),le=null,ga&&(ii=Pt(ga,Ft,ce-Br,ce+ua,1,Yt.minY,Yt.maxY,yt),Wr=Pt(ga,Ft,ce+ca,ce+Na,1,Yt.minY,Yt.maxY,yt),ga=null),nr&&(pr=Pt(nr,Ft,ce-Br,ce+ua,1,Yt.minY,Yt.maxY,yt),$r=Pt(nr,Ft,ce+ca,ce+Na,1,Yt.minY,Yt.maxY,yt),nr=null),Dt>1&&console.timeEnd("clipping"),Ve.push(ii||[],ee+1,se*2,ce*2),Ve.push(Wr||[],ee+1,se*2,ce*2+1),Ve.push(pr||[],ee+1,se*2+1,ce*2),Ve.push($r||[],ee+1,se*2+1,ce*2+1)}}},Vi.prototype.getTile=function(le,ee,se){var ce=this.options,Ee=ce.extent,Ne=ce.debug;if(le<0||le>24)return null;var rt=1<1&&console.log("drilling down to z%d-%d-%d",le,ee,se);for(var yt=le,Dt=ee,Ft=se,tr;!tr&&yt>0;)yt--,Dt=Math.floor(Dt/2),Ft=Math.floor(Ft/2),tr=this.tiles[pa(yt,Dt,Ft)];return!tr||!tr.source?null:(Ne>1&&console.log("found parent tile z%d-%d-%d",yt,Dt,Ft),Ne>1&&console.time("drilling down"),this.splitTile(tr.source,yt,Dt,Ft,le,ee,se),Ne>1&&console.timeEnd("drilling down"),this.tiles[Ve]?Ea(this.tiles[Ve],Ee):null)};function pa(le,ee,se){return((1<=0?0:g.button},l.remove=function(g){g.parentNode&&g.parentNode.removeChild(g)};function P(g,c,x){var d,w,L,F=a.browser.devicePixelRatio>1?"@2x":"",G=a.getJSON(c.transformRequest(c.normalizeSpriteURL(g,F,".json"),a.ResourceType.SpriteJSON),function(ue,we){G=null,L||(L=ue,d=we,te())}),K=a.getImage(c.transformRequest(c.normalizeSpriteURL(g,F,".png"),a.ResourceType.SpriteImage),function(ue,we){K=null,L||(L=ue,w=we,te())});function te(){if(L)x(L);else if(d&&w){var ue=a.browser.getImageData(w),we={};for(var be in d){var Ie=d[be],Ye=Ie.width,Ze=Ie.height,Oe=Ie.x,Xe=Ie.y,ct=Ie.sdf,zt=Ie.pixelRatio,qt=Ie.stretchX,Qt=Ie.stretchY,rr=Ie.content,Zt=new a.RGBAImage({width:Ye,height:Ze});a.RGBAImage.copy(ue,Zt,{x:Oe,y:Xe},{x:0,y:0},{width:Ye,height:Ze}),we[be]={data:Zt,pixelRatio:zt,sdf:ct,stretchX:qt,stretchY:Qt,content:rr}}x(null,we)}}return{cancel:function(){G&&(G.cancel(),G=null),K&&(K.cancel(),K=null)}}}function E(g){var c=g.userImage;if(c&&c.render){var x=c.render();if(x)return g.data.replace(new Uint8Array(c.data.buffer)),!0}return!1}var I=1,R=function(g){function c(){g.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.isLoaded=function(){return this.loaded},c.prototype.setLoaded=function(d){if(this.loaded!==d&&(this.loaded=d,d)){for(var w=0,L=this.requestors;w=0?1.2:1))}V.prototype.draw=function(g){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(g,this.buffer,this.middle);for(var c=this.ctx.getImageData(0,0,this.size,this.size),x=new Uint8ClampedArray(this.size*this.size),d=0;d65535){ue(new Error("glyphs > 65535 not supported"));return}if(Ie.ranges[Ze]){ue(null,{stack:we,id:be,glyph:Ye});return}var Oe=Ie.requests[Ze];Oe||(Oe=Ie.requests[Ze]=[],re.loadGlyphRange(we,Ze,d.url,d.requestManager,function(Xe,ct){if(ct){for(var zt in ct)d._doesCharSupportLocalGlyph(+zt)||(Ie.glyphs[+zt]=ct[+zt]);Ie.ranges[Ze]=!0}for(var qt=0,Qt=Oe;qt1&&(te=c[++K]);var we=Math.abs(ue-te.left),be=Math.abs(ue-te.right),Ie=Math.min(we,be),Ye=void 0,Ze=L/d*(w+1);if(te.isDash){var Oe=w-Math.abs(Ze);Ye=Math.sqrt(Ie*Ie+Oe*Oe)}else Ye=w-Math.sqrt(Ie*Ie+Ze*Ze);this.data[G+ue]=Math.max(0,Math.min(255,Ye+128))}},ke.prototype.addRegularDash=function(c){for(var x=c.length-1;x>=0;--x){var d=c[x],w=c[x+1];d.zeroLength?c.splice(x,1):w&&w.isDash===d.isDash&&(w.left=d.left,c.splice(x,1))}var L=c[0],F=c[c.length-1];L.isDash===F.isDash&&(L.left=F.left-this.width,F.right=L.right+this.width);for(var G=this.width*this.nextRow,K=0,te=c[K],ue=0;ue1&&(te=c[++K]);var we=Math.abs(ue-te.left),be=Math.abs(ue-te.right),Ie=Math.min(we,be),Ye=te.isDash?Ie:-Ie;this.data[G+ue]=Math.max(0,Math.min(255,Ye+128))}},ke.prototype.addDash=function(c,x){var d=x?7:0,w=2*d+1;if(this.nextRow+w>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var L=0,F=0;F=d.minX&&c.x=d.minY&&c.y0&&(ue[new a.OverscaledTileID(d.overscaledZ,G,w.z,F,w.y-1).key]={backfilled:!1},ue[new a.OverscaledTileID(d.overscaledZ,d.wrap,w.z,w.x,w.y-1).key]={backfilled:!1},ue[new a.OverscaledTileID(d.overscaledZ,te,w.z,K,w.y-1).key]={backfilled:!1}),w.y+10&&(L.resourceTiming=d._resourceTiming,d._resourceTiming=[]),d.fire(new a.Event("data",L))})},c.prototype.onAdd=function(d){this.map=d,this.load()},c.prototype.setData=function(d){var w=this;return this._data=d,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(L){if(L){w.fire(new a.ErrorEvent(L));return}var F={dataType:"source",sourceDataType:"content"};w._collectResourceTiming&&w._resourceTiming&&w._resourceTiming.length>0&&(F.resourceTiming=w._resourceTiming,w._resourceTiming=[]),w.fire(new a.Event("data",F))}),this},c.prototype.getClusterExpansionZoom=function(d,w){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:d,source:this.id},w),this},c.prototype.getClusterChildren=function(d,w){return this.actor.send("geojson.getClusterChildren",{clusterId:d,source:this.id},w),this},c.prototype.getClusterLeaves=function(d,w,L,F){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:d,limit:w,offset:L},F),this},c.prototype._updateWorkerData=function(d){var w=this;this._loaded=!1;var L=a.extend({},this.workerOptions),F=this._data;typeof F=="string"?(L.request=this.map._requestManager.transformRequest(a.browser.resolveURL(F),a.ResourceType.Source),L.request.collectResourceTiming=this._collectResourceTiming):L.data=JSON.stringify(F),this.actor.send(this.type+".loadData",L,function(G,K){w._removed||K&&K.abandoned||(w._loaded=!0,K&&K.resourceTiming&&K.resourceTiming[w.id]&&(w._resourceTiming=K.resourceTiming[w.id].slice(0)),w.actor.send(w.type+".coalesce",{source:L.source},null),d(G))})},c.prototype.loaded=function(){return this._loaded},c.prototype.loadTile=function(d,w){var L=this,F=d.actor?"reloadTile":"loadTile";d.actor=this.actor;var G={type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};d.request=this.actor.send(F,G,function(K,te){return delete d.request,d.unloadVectorData(),d.aborted?w(null):K?w(K):(d.loadVectorData(te,L.map.painter,F==="reloadTile"),w(null))})},c.prototype.abortTile=function(d){d.request&&(d.request.cancel(),delete d.request),d.aborted=!0},c.prototype.unloadTile=function(d){d.unloadVectorData(),this.actor.send("removeTile",{uid:d.uid,type:this.type,source:this.id})},c.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},c.prototype.serialize=function(){return a.extend({},this._options,{type:this.type,data:this._data})},c.prototype.hasTransition=function(){return!1},c}(a.Evented),ht=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),it=function(g){function c(x,d,w,L){g.call(this),this.id=x,this.dispatcher=w,this.coordinates=d.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(L),this.options=d}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.load=function(d,w){var L=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),function(F,G){L._loaded=!0,F?L.fire(new a.ErrorEvent(F)):G&&(L.image=G,d&&(L.coordinates=d),w&&w(),L._finishLoading())})},c.prototype.loaded=function(){return this._loaded},c.prototype.updateImage=function(d){var w=this;return!this.image||!d.url?this:(this.options.url=d.url,this.load(d.coordinates,function(){w.texture=null}),this)},c.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},c.prototype.onAdd=function(d){this.map=d,this.load()},c.prototype.setCoordinates=function(d){var w=this;this.coordinates=d;var L=d.map(a.MercatorCoordinate.fromLngLat);this.tileID=lt(L),this.minzoom=this.maxzoom=this.tileID.z;var F=L.map(function(G){return w.tileID.getTilePoint(G)._round()});return this._boundsArray=new a.StructArrayLayout4i8,this._boundsArray.emplaceBack(F[0].x,F[0].y,0,0),this._boundsArray.emplaceBack(F[1].x,F[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(F[3].x,F[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(F[2].x,F[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this},c.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var d=this.map.painter.context,w=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,ht.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new a.Texture(d,this.image,w.RGBA),this.texture.bind(w.LINEAR,w.CLAMP_TO_EDGE));for(var L in this.tiles){var F=this.tiles[L];F.state!=="loaded"&&(F.state="loaded",F.texture=this.texture)}}},c.prototype.loadTile=function(d,w){this.tileID&&this.tileID.equals(d.tileID.canonical)?(this.tiles[String(d.tileID.wrap)]=d,d.buckets={},w(null)):(d.state="errored",w(null))},c.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},c.prototype.hasTransition=function(){return!1},c}(a.Evented);function lt(g){for(var c=1/0,x=1/0,d=-1/0,w=-1/0,L=0,F=g;Lw.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+w.start(0)+" and "+w.end(0)+"-second mark."))):this.video.currentTime=d}},c.prototype.getVideo=function(){return this.video},c.prototype.onAdd=function(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},c.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var d=this.map.painter.context,w=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,ht.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(w.LINEAR,w.CLAMP_TO_EDGE),w.texSubImage2D(w.TEXTURE_2D,0,0,0,w.RGBA,w.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(d,this.video,w.RGBA),this.texture.bind(w.LINEAR,w.CLAMP_TO_EDGE));for(var L in this.tiles){var F=this.tiles[L];F.state!=="loaded"&&(F.state="loaded",F.texture=this.texture)}}},c.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},c.prototype.hasTransition=function(){return this.video&&!this.video.paused},c}(it),_t=function(g){function c(x,d,w,L){g.call(this,x,d,w,L),d.coordinates?(!Array.isArray(d.coordinates)||d.coordinates.length!==4||d.coordinates.some(function(F){return!Array.isArray(F)||F.length!==2||F.some(function(G){return typeof G!="number"})}))&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,null,'missing required property "coordinates"'))),d.animate&&typeof d.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,null,'optional "animate" property must be a boolean value'))),d.canvas?typeof d.canvas!="string"&&!(d.canvas instanceof a.window.HTMLCanvasElement)&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,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.ErrorEvent(new a.ValidationError("sources."+x,null,'missing required property "canvas"'))),this.options=d,this.animate=d.animate!==void 0?d.animate:!0}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof a.window.HTMLCanvasElement?this.options.canvas:a.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new a.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()},c.prototype.getCanvas=function(){return this.canvas},c.prototype.onAdd=function(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()},c.prototype.onRemove=function(){this.pause()},c.prototype.prepare=function(){var d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var w=this.map.painter.context,L=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ht.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(w,this.canvas,L.RGBA,{premultiply:!0});for(var F in this.tiles){var G=this.tiles[F];G.state!=="loaded"&&(G.state="loaded",G.texture=this.texture)}}},c.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},c.prototype.hasTransition=function(){return this._playing},c.prototype._hasInvalidDimensions=function(){for(var d=0,w=[this.canvas.width,this.canvas.height];dthis.max){var G=this._getAndRemoveByKey(this.order[0]);G&&this.onRemove(G)}return this},Mt.prototype.has=function(c){return c.wrapped().key in this.data},Mt.prototype.getAndRemove=function(c){return this.has(c)?this._getAndRemoveByKey(c.wrapped().key):null},Mt.prototype._getAndRemoveByKey=function(c){var x=this.data[c].shift();return x.timeout&&clearTimeout(x.timeout),this.data[c].length===0&&delete this.data[c],this.order.splice(this.order.indexOf(c),1),x.value},Mt.prototype.getByKey=function(c){var x=this.data[c];return x?x[0].value:null},Mt.prototype.get=function(c){if(!this.has(c))return null;var x=this.data[c.wrapped().key][0];return x.value},Mt.prototype.remove=function(c,x){if(!this.has(c))return this;var d=c.wrapped().key,w=x===void 0?0:this.data[d].indexOf(x),L=this.data[d][w];return this.data[d].splice(w,1),L.timeout&&clearTimeout(L.timeout),this.data[d].length===0&&delete this.data[d],this.onRemove(L.value),this.order.splice(this.order.indexOf(d),1),this},Mt.prototype.setMaxSize=function(c){for(this.max=c;this.order.length>this.max;){var x=this._getAndRemoveByKey(this.order[0]);x&&this.onRemove(x)}return this},Mt.prototype.filter=function(c){var x=[];for(var d in this.data)for(var w=0,L=this.data[d];w1||(Math.abs(we)>1&&(Math.abs(we+Ie)===1?we+=Ie:Math.abs(we-Ie)===1&&(we-=Ie)),!(!ue.dem||!te.dem)&&(te.dem.backfillBorder(ue.dem,we,be),te.neighboringTiles&&te.neighboringTiles[Ye]&&(te.neighboringTiles[Ye].backfilled=!0)))}},c.prototype.getTile=function(d){return this.getTileByID(d.key)},c.prototype.getTileByID=function(d){return this._tiles[d]},c.prototype._retainLoadedChildren=function(d,w,L,F){for(var G in this._tiles){var K=this._tiles[G];if(!(F[G]||!K.hasData()||K.tileID.overscaledZ<=w||K.tileID.overscaledZ>L)){for(var te=K.tileID;K&&K.tileID.overscaledZ>w+1;){var ue=K.tileID.scaledTo(K.tileID.overscaledZ-1);K=this._tiles[ue.key],K&&K.hasData()&&(te=ue)}for(var we=te;we.overscaledZ>w;)if(we=we.scaledTo(we.overscaledZ-1),d[we.key]){F[te.key]=te;break}}}},c.prototype.findLoadedParent=function(d,w){if(d.key in this._loadedParentTiles){var L=this._loadedParentTiles[d.key];return L&&L.tileID.overscaledZ>=w?L:null}for(var F=d.overscaledZ-1;F>=w;F--){var G=d.scaledTo(F),K=this._getLoadedTile(G);if(K)return K}},c.prototype._getLoadedTile=function(d){var w=this._tiles[d.key];if(w&&w.hasData())return w;var L=this._cache.getByKey(d.wrapped().key);return L},c.prototype.updateCacheSize=function(d){var w=Math.ceil(d.width/this._source.tileSize)+1,L=Math.ceil(d.height/this._source.tileSize)+1,F=w*L,G=5,K=Math.floor(F*G),te=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,K):K;this._cache.setMaxSize(te)},c.prototype.handleWrapJump=function(d){var w=this._prevLng===void 0?d:this._prevLng,L=d-w,F=L/360,G=Math.round(F);if(this._prevLng=d,G){var K={};for(var te in this._tiles){var ue=this._tiles[te];ue.tileID=ue.tileID.unwrapTo(ue.tileID.wrap+G),K[ue.tileID.key]=ue}this._tiles=K;for(var we in this._timers)clearTimeout(this._timers[we]),delete this._timers[we];for(var be in this._tiles){var Ie=this._tiles[be];this._setTileReloadTimer(be,Ie)}}},c.prototype.update=function(d){var w=this;if(this.transform=d,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var L;this.used?this._source.tileID?L=d.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(_r){return new a.OverscaledTileID(_r.canonical.z,_r.wrap,_r.canonical.z,_r.canonical.x,_r.canonical.y)}):(L=d.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(L=L.filter(function(_r){return w._source.hasTile(_r)}))):L=[];var F=d.coveringZoomLevel(this._source),G=Math.max(F-c.maxOverzooming,this._source.minzoom),K=Math.max(F+c.maxUnderzooming,this._source.minzoom),te=this._updateRetainedTiles(L,F);if(yt(this._source.type)){for(var ue={},we={},be=Object.keys(te),Ie=0,Ye=be;Iethis._source.maxzoom){var ct=Oe.children(this._source.maxzoom)[0],zt=this.getTile(ct);if(zt&&zt.hasData()){L[ct.key]=ct;continue}}else{var qt=Oe.children(this._source.maxzoom);if(L[qt[0].key]&&L[qt[1].key]&&L[qt[2].key]&&L[qt[3].key])continue}for(var Qt=Xe.wasRequested(),rr=Oe.overscaledZ-1;rr>=G;--rr){var Zt=Oe.scaledTo(rr);if(F[Zt.key]||(F[Zt.key]=!0,Xe=this.getTile(Zt),!Xe&&Qt&&(Xe=this._addTile(Zt)),Xe&&(L[Zt.key]=Zt,Qt=Xe.wasRequested(),Xe.hasData())))break}}}return L},c.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var d in this._tiles){for(var w=[],L=void 0,F=this._tiles[d].tileID;F.overscaledZ>0;){if(F.key in this._loadedParentTiles){L=this._loadedParentTiles[F.key];break}w.push(F.key);var G=F.scaledTo(F.overscaledZ-1);if(L=this._getLoadedTile(G),L)break;F=G}for(var K=0,te=w;K0)&&(w.hasData()&&w.state!=="reloading"?this._cache.add(w.tileID,w,w.getExpiryTimeout()):(w.aborted=!0,this._abortTile(w),this._unloadTile(w))))},c.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var d in this._tiles)this._removeTile(d);this._cache.reset()},c.prototype.tilesIn=function(d,w,L){var F=this,G=[],K=this.transform;if(!K)return G;for(var te=L?K.getCameraQueryGeometry(d):d,ue=d.map(function(rr){return K.pointCoordinate(rr)}),we=te.map(function(rr){return K.pointCoordinate(rr)}),be=this.getIds(),Ie=1/0,Ye=1/0,Ze=-1/0,Oe=-1/0,Xe=0,ct=we;Xe=0&&Lr[1].y+_r>=0){var Sr=ue.map(function(Fa){return ar.getTilePoint(Fa)}),Xr=we.map(function(Fa){return ar.getTilePoint(Fa)});G.push({tile:Zt,tileID:ar,queryGeometry:Sr,cameraQueryGeometry:Xr,scale:cr})}}},Qt=0;Qt=a.browser.now())return!0}return!1},c.prototype.setFeatureState=function(d,w,L){d=d||"_geojsonTileLayer",this._state.updateState(d,w,L)},c.prototype.removeFeatureState=function(d,w,L){d=d||"_geojsonTileLayer",this._state.removeFeatureState(d,w,L)},c.prototype.getFeatureState=function(d,w){return d=d||"_geojsonTileLayer",this._state.getState(d,w)},c.prototype.setDependencies=function(d,w,L){var F=this._tiles[d];F&&F.setDependencies(w,L)},c.prototype.reloadTilesForDependencies=function(d,w){for(var L in this._tiles){var F=this._tiles[L];F.hasDependency(d,w)&&this._reloadTile(L,"reloading")}this._cache.filter(function(G){return!G.hasDependency(d,w)})},c}(a.Evented);rt.maxOverzooming=10,rt.maxUnderzooming=3;function Ve(g,c){var x=Math.abs(g.wrap*2)-+(g.wrap<0),d=Math.abs(c.wrap*2)-+(c.wrap<0);return g.overscaledZ-c.overscaledZ||d-x||c.canonical.y-g.canonical.y||c.canonical.x-g.canonical.x}function yt(g){return g==="raster"||g==="image"||g==="video"}function Dt(){return new a.window.Worker(bn.workerUrl)}var Ft="mapboxgl_preloaded_worker_pool",tr=function(){this.active={}};tr.prototype.acquire=function(c){if(!this.workers)for(this.workers=[];this.workers.length0?(w-F)/G:0;return this.points[L].mult(1-K).add(this.points[x].mult(K))};var Ga=function(c,x,d){var w=this.boxCells=[],L=this.circleCells=[];this.xCellCount=Math.ceil(c/d),this.yCellCount=Math.ceil(x/d);for(var F=0;Fthis.width||w<0||x>this.height)return L?!1:[];var G=[];if(c<=0&&x<=0&&this.width<=d&&this.height<=w){if(L)return!0;for(var K=0;K0:G}},Ga.prototype._queryCircle=function(c,x,d,w,L){var F=c-d,G=c+d,K=x-d,te=x+d;if(G<0||F>this.width||te<0||K>this.height)return w?!1:[];var ue=[],we={hitTest:w,circle:{x:c,y:x,radius:d},seenUids:{box:{},circle:{}}};return this._forEachCell(F,K,G,te,this._queryCellCircle,ue,we,L),w?ue.length>0:ue},Ga.prototype.query=function(c,x,d,w,L){return this._query(c,x,d,w,!1,L)},Ga.prototype.hitTest=function(c,x,d,w,L){return this._query(c,x,d,w,!0,L)},Ga.prototype.hitTestCircle=function(c,x,d,w){return this._queryCircle(c,x,d,!0,w)},Ga.prototype._queryCell=function(c,x,d,w,L,F,G,K){var te=G.seenUids,ue=this.boxCells[L];if(ue!==null)for(var we=this.bboxes,be=0,Ie=ue;be=we[Ze+0]&&w>=we[Ze+1]&&(!K||K(this.boxKeys[Ye]))){if(G.hitTest)return F.push(!0),!0;F.push({key:this.boxKeys[Ye],x1:we[Ze],y1:we[Ze+1],x2:we[Ze+2],y2:we[Ze+3]})}}}var Oe=this.circleCells[L];if(Oe!==null)for(var Xe=this.circles,ct=0,zt=Oe;ctG*G+K*K},Ga.prototype._circleAndRectCollide=function(c,x,d,w,L,F,G){var K=(F-w)/2,te=Math.abs(c-(w+K));if(te>K+d)return!1;var ue=(G-L)/2,we=Math.abs(x-(L+ue));if(we>ue+d)return!1;if(te<=K||we<=ue)return!0;var be=te-K,Ie=we-ue;return be*be+Ie*Ie<=d*d};function Jn(g,c,x,d,w){var L=a.create();return c?(a.scale(L,L,[1/w,1/w,1]),x||a.rotateZ(L,L,d.angle)):a.multiply(L,d.labelPlaneMatrix,g),L}function hu(g,c,x,d,w){if(c){var L=a.clone(g);return a.scale(L,L,[w,w,1]),x||a.rotateZ(L,L,-d.angle),L}else return d.glCoordMatrix}function Bi(g,c){var x=[g.x,g.y,0,1];Zf(x,x,c);var d=x[3];return{point:new a.Point(x[0]/d,x[1]/d),signedDistanceFromCamera:d}}function dl(g,c){return .5+.5*(g/c)}function Qd(g,c){var x=g[0]/g[3],d=g[1]/g[3],w=x>=-c[0]&&x<=c[0]&&d>=-c[1]&&d<=c[1];return w}function qc(g,c,x,d,w,L,F,G){var K=d?g.textSizeData:g.iconSizeData,te=a.evaluateSizeForZoom(K,x.transform.zoom),ue=[256/x.width*2+1,256/x.height*2+1],we=d?g.text.dynamicLayoutVertexArray:g.icon.dynamicLayoutVertexArray;we.clear();for(var be=g.lineVertexArray,Ie=d?g.text.placedSymbolArray:g.icon.placedSymbolArray,Ye=x.transform.width/x.transform.height,Ze=!1,Oe=0;OeL)return{useVertical:!0}}return(g===a.WritingMode.vertical?c.yx.x)?{needsFlipping:!0}:null}function vv(g,c,x,d,w,L,F,G,K,te,ue,we,be,Ie){var Ye=c/24,Ze=g.lineOffsetX*Ye,Oe=g.lineOffsetY*Ye,Xe;if(g.numGlyphs>1){var ct=g.glyphStartIndex+g.numGlyphs,zt=g.lineStartIndex,qt=g.lineStartIndex+g.lineLength,Qt=Nc(Ye,G,Ze,Oe,x,ue,we,g,K,L,be);if(!Qt)return{notEnoughRoom:!0};var rr=Bi(Qt.first.point,F).point,Zt=Bi(Qt.last.point,F).point;if(d&&!x){var ar=hv(g.writingMode,rr,Zt,Ie);if(ar)return ar}Xe=[Qt.first];for(var cr=g.glyphStartIndex+1;cr0?Xr.point:vu(we,Sr,_r,1,w),xa=hv(g.writingMode,_r,Fa,Ie);if(xa)return xa}var qr=pl(Ye*G.getoffsetX(g.glyphStartIndex),Ze,Oe,x,ue,we,g.segment,g.lineStartIndex,g.lineStartIndex+g.lineLength,K,L,be);if(!qr)return{notEnoughRoom:!0};Xe=[qr]}for(var Sa=0,ia=Xe;Sa0?1:-1,Ye=0;d&&(Ie*=-1,Ye=Math.PI),Ie<0&&(Ye+=Math.PI);for(var Ze=Ie>0?G+F:G+F+1,Oe=w,Xe=w,ct=0,zt=0,qt=Math.abs(be),Qt=[];ct+zt<=qt;){if(Ze+=Ie,Ze=K)return null;if(Xe=Oe,Qt.push(Oe),Oe=we[Ze],Oe===void 0){var rr=new a.Point(te.getx(Ze),te.gety(Ze)),Zt=Bi(rr,ue);if(Zt.signedDistanceFromCamera>0)Oe=we[Ze]=Zt.point;else{var ar=Ze-Ie,cr=ct===0?L:new a.Point(te.getx(ar),te.gety(ar));Oe=vu(cr,rr,Xe,qt-ct+1,ue)}}ct+=zt,zt=Xe.dist(Oe)}var _r=(qt-ct)/zt,Lr=Oe.sub(Xe),Sr=Lr.mult(_r)._add(Xe);Sr._add(Lr._unit()._perp()._mult(x*Ie));var Xr=Ye+Math.atan2(Oe.y-Xe.y,Oe.x-Xe.x);return Qt.push(Sr),{point:Sr,angle:Xr,path:Qt}}var $d=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ku(g,c){for(var x=0;x=1;Za--)ia.push(qr.path[Za]);for(var Va=1;Va0){for(var na=ia[0].clone(),Oa=ia[0].clone(),en=1;en=Xr.x&&Oa.x<=Fa.x&&na.y>=Xr.y&&Oa.y<=Fa.y?mi=[ia]:Oa.xFa.x||Oa.yFa.y?mi=[]:mi=a.clipLine([ia],Xr.x,Xr.y,Fa.x,Fa.y)}for(var In=0,Ps=mi;In=this.screenRightBoundary||wthis.screenBottomBoundary},Ho.prototype.isInsideGrid=function(c,x,d,w){return d>=0&&c=0&&x0){var qt;return this.prevPlacement&&this.prevPlacement.variableOffsets[be.crossTileID]&&this.prevPlacement.placements[be.crossTileID]&&this.prevPlacement.placements[be.crossTileID].text&&(qt=this.prevPlacement.variableOffsets[be.crossTileID].anchor),this.variableOffsets[be.crossTileID]={textOffset:Oe,width:d,height:w,anchor:c,textBoxScale:L,prevAnchor:qt},this.markUsedJustification(Ie,c,be,Ye),Ie.allowVerticalPlacement&&(this.markUsedOrientation(Ie,Ye,be),this.placedOrientations[be.crossTileID]=Ye),{shift:Xe,placedGlyphBoxes:ct}}},oo.prototype.placeLayerBucketPart=function(c,x,d){var w=this,L=c.parameters,F=L.bucket,G=L.layout,K=L.posMatrix,te=L.textLabelPlaneMatrix,ue=L.labelToScreenMatrix,we=L.textPixelRatio,be=L.holdingForFade,Ie=L.collisionBoxArray,Ye=L.partiallyEvaluatedTextSize,Ze=L.collisionGroup,Oe=G.get("text-optional"),Xe=G.get("icon-optional"),ct=G.get("text-allow-overlap"),zt=G.get("icon-allow-overlap"),qt=G.get("text-rotation-alignment")==="map",Qt=G.get("text-pitch-alignment")==="map",rr=G.get("icon-text-fit")!=="none",Zt=G.get("symbol-z-order")==="viewport-y",ar=ct&&(zt||!F.hasIconData()||Xe),cr=zt&&(ct||!F.hasTextData()||Oe);!F.collisionArrays&&Ie&&F.deserializeCollisionBoxes(Ie);var _r=function(qr,Sa){if(!x[qr.crossTileID]){if(be){w.placements[qr.crossTileID]=new du(!1,!1,!1);return}var ia=!1,Za=!1,Va=!0,Ai=null,Pa={box:null,offscreen:null},mi={box:null,offscreen:null},na=null,Oa=null,en=null,In=0,Ps=0,Ds=0;Sa.textFeatureIndex?In=Sa.textFeatureIndex:qr.useRuntimeCollisionCircles&&(In=qr.featureIndex),Sa.verticalTextFeatureIndex&&(Ps=Sa.verticalTextFeatureIndex);var el=Sa.textBox;if(el){var Bl=function(sn){var Qo=a.WritingMode.horizontal;if(F.allowVerticalPlacement&&!sn&&w.prevPlacement){var $o=w.prevPlacement.placedOrientations[qr.crossTileID];$o&&(w.placedOrientations[qr.crossTileID]=$o,Qo=$o,w.markUsedOrientation(F,Qo,qr))}return Qo},oc=function(sn,Qo){if(F.allowVerticalPlacement&&qr.numVerticalGlyphVertices>0&&Sa.verticalTextBox)for(var $o=0,Vp=F.writingModes;$o0&&(Ko=Ko.filter(function(sn){return sn!==Do.anchor}),Ko.unshift(Do.anchor))}var tl=function(sn,Qo,$o){for(var Vp=sn.x2-sn.x1,oy=sn.y2-sn.y1,s3=qr.textBoxScale,l3=rr&&!zt?Qo:null,Xv={box:[],offscreen:!1},u3=ct?Ko.length*2:Ko.length,Hp=0;Hp=Ko.length,sy=w.attemptAnchorPlacement(f3,sn,Vp,oy,s3,qt,Qt,we,K,Ze,c3,qr,F,$o,l3);if(sy&&(Xv=sy.placedGlyphBoxes,Xv&&Xv.box&&Xv.box.length)){ia=!0,Ai=sy.shift;break}}return Xv},ku=function(){return tl(el,Sa.iconBox,a.WritingMode.horizontal)},rl=function(){var sn=Sa.verticalTextBox,Qo=Pa&&Pa.box&&Pa.box.length;return F.allowVerticalPlacement&&!Qo&&qr.numVerticalGlyphVertices>0&&sn?tl(sn,Sa.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}};oc(ku,rl),Pa&&(ia=Pa.box,Va=Pa.offscreen);var qp=Bl(Pa&&Pa.box);if(!ia&&w.prevPlacement){var ch=w.prevPlacement.variableOffsets[qr.crossTileID];ch&&(w.variableOffsets[qr.crossTileID]=ch,w.markUsedJustification(F,ch.anchor,qr,qp))}}else{var Ol=function(sn,Qo){var $o=w.collisionIndex.placeCollisionBox(sn,ct,we,K,Ze.predicate);return $o&&$o.box&&$o.box.length&&(w.markUsedOrientation(F,Qo,qr),w.placedOrientations[qr.crossTileID]=Qo),$o},Po=function(){return Ol(el,a.WritingMode.horizontal)},Ul=function(){var sn=Sa.verticalTextBox;return F.allowVerticalPlacement&&qr.numVerticalGlyphVertices>0&&sn?Ol(sn,a.WritingMode.vertical):{box:null,offscreen:null}};oc(Po,Ul),Bl(Pa&&Pa.box&&Pa.box.length)}}if(na=Pa,ia=na&&na.box&&na.box.length>0,Va=na&&na.offscreen,qr.useRuntimeCollisionCircles){var Vn=F.text.placedSymbolArray.get(qr.centerJustifiedTextSymbolIndex),Np=a.evaluateSizeForFeature(F.textSizeData,Ye,Vn),Wv=G.get("text-padding"),xo=qr.collisionCircleDiameter;Oa=w.collisionIndex.placeCollisionCircles(ct,Vn,F.lineVertexArray,F.glyphOffsetArray,Np,K,te,ue,d,Qt,Ze.predicate,xo,Wv),ia=ct||Oa.circles.length>0&&!Oa.collisionDetected,Va=Va&&Oa.offscreen}if(Sa.iconFeatureIndex&&(Ds=Sa.iconFeatureIndex),Sa.iconBox){var hh=function(sn){var Qo=rr&&Ai?mv(sn,Ai.x,Ai.y,qt,Qt,w.transform.angle):sn;return w.collisionIndex.placeCollisionBox(Qo,zt,we,K,Ze.predicate)};mi&&mi.box&&mi.box.length&&Sa.verticalIconBox?(en=hh(Sa.verticalIconBox),Za=en.box.length>0):(en=hh(Sa.iconBox),Za=en.box.length>0),Va=Va&&en.offscreen}var Bp=Oe||qr.numHorizontalGlyphVertices===0&&qr.numVerticalGlyphVertices===0,Op=Xe||qr.numIconVertices===0;if(!Bp&&!Op?Za=ia=Za&&ia:Op?Bp||(Za=Za&&ia):ia=Za&&ia,ia&&na&&na.box&&(mi&&mi.box&&Ps?w.collisionIndex.insertCollisionBox(na.box,G.get("text-ignore-placement"),F.bucketInstanceId,Ps,Ze.ID):w.collisionIndex.insertCollisionBox(na.box,G.get("text-ignore-placement"),F.bucketInstanceId,In,Ze.ID)),Za&&en&&w.collisionIndex.insertCollisionBox(en.box,G.get("icon-ignore-placement"),F.bucketInstanceId,Ds,Ze.ID),Oa&&(ia&&w.collisionIndex.insertCollisionCircles(Oa.circles,G.get("text-ignore-placement"),F.bucketInstanceId,In,Ze.ID),d)){var Up=F.bucketInstanceId,vh=w.collisionCircleArrays[Up];vh===void 0&&(vh=w.collisionCircleArrays[Up]=new ep);for(var dh=0;dh=0;--Sr){var Xr=Lr[Sr];_r(F.symbolInstances.get(Xr),F.collisionArrays[Xr])}else for(var Fa=c.symbolInstanceStart;Fa=0&&(F>=0&&ue!==F?c.text.placedSymbolArray.get(ue).crossTileID=0:c.text.placedSymbolArray.get(ue).crossTileID=d.crossTileID)}},oo.prototype.markUsedOrientation=function(c,x,d){for(var w=x===a.WritingMode.horizontal||x===a.WritingMode.horizontalOnly?x:0,L=x===a.WritingMode.vertical?x:0,F=[d.leftJustifiedTextSymbolIndex,d.centerJustifiedTextSymbolIndex,d.rightJustifiedTextSymbolIndex],G=0,K=F;G0||Qt>0,_r=zt.numIconVertices>0,Lr=w.placedOrientations[zt.crossTileID],Sr=Lr===a.WritingMode.vertical,Xr=Lr===a.WritingMode.horizontal||Lr===a.WritingMode.horizontalOnly;if(cr){var Fa=ef(ar.text),xa=Sr?Cr:Fa;Ye(c.text,qt,xa);var qr=Xr?Cr:Fa;Ye(c.text,Qt,qr);var Sa=ar.text.isHidden();[zt.rightJustifiedTextSymbolIndex,zt.centerJustifiedTextSymbolIndex,zt.leftJustifiedTextSymbolIndex].forEach(function(Ds){Ds>=0&&(c.text.placedSymbolArray.get(Ds).hidden=Sa||Sr?1:0)}),zt.verticalPlacedTextSymbolIndex>=0&&(c.text.placedSymbolArray.get(zt.verticalPlacedTextSymbolIndex).hidden=Sa||Xr?1:0);var ia=w.variableOffsets[zt.crossTileID];ia&&w.markUsedJustification(c,ia.anchor,zt,Lr);var Za=w.placedOrientations[zt.crossTileID];Za&&(w.markUsedJustification(c,"left",zt,Za),w.markUsedOrientation(c,Za,zt))}if(_r){var Va=ef(ar.icon),Ai=!(be&&zt.verticalPlacedIconSymbolIndex&&Sr);if(zt.placedIconSymbolIndex>=0){var Pa=Ai?Va:Cr;Ye(c.icon,zt.numIconVertices,Pa),c.icon.placedSymbolArray.get(zt.placedIconSymbolIndex).hidden=ar.icon.isHidden()}if(zt.verticalPlacedIconSymbolIndex>=0){var mi=Ai?Cr:Va;Ye(c.icon,zt.numVerticalIconVertices,mi),c.icon.placedSymbolArray.get(zt.verticalPlacedIconSymbolIndex).hidden=ar.icon.isHidden()}}if(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData()){var na=c.collisionArrays[ct];if(na){var Oa=new a.Point(0,0);if(na.textBox||na.verticalTextBox){var en=!0;if(te){var In=w.variableOffsets[rr];In?(Oa=pv(In.anchor,In.width,In.height,In.textOffset,In.textBoxScale),ue&&Oa._rotate(we?w.transform.angle:-w.transform.angle)):en=!1}na.textBox&&Xt(c.textCollisionBox.collisionVertexArray,ar.text.placed,!en||Sr,Oa.x,Oa.y),na.verticalTextBox&&Xt(c.textCollisionBox.collisionVertexArray,ar.text.placed,!en||Xr,Oa.x,Oa.y)}var Ps=!!(!Xr&&na.verticalIconBox);na.iconBox&&Xt(c.iconCollisionBox.collisionVertexArray,ar.icon.placed,Ps,be?Oa.x:0,be?Oa.y:0),na.verticalIconBox&&Xt(c.iconCollisionBox.collisionVertexArray,ar.icon.placed,!Ps,be?Oa.x:0,be?Oa.y:0)}}},Oe=0;Oec},oo.prototype.setStale=function(){this.stale=!0};function Xt(g,c,x,d,w){g.emplaceBack(c?1:0,x?1:0,d||0,w||0),g.emplaceBack(c?1:0,x?1:0,d||0,w||0),g.emplaceBack(c?1:0,x?1:0,d||0,w||0),g.emplaceBack(c?1:0,x?1:0,d||0,w||0)}var Or=Math.pow(2,25),tp=Math.pow(2,24),pu=Math.pow(2,17),an=Math.pow(2,16),yl=Math.pow(2,9),bs=Math.pow(2,8),$u=Math.pow(2,1);function ef(g){if(g.opacity===0&&!g.placed)return 0;if(g.opacity===1&&g.placed)return 4294967295;var c=g.placed?1:0,x=Math.floor(g.opacity*127);return x*Or+c*tp+x*pu+c*an+x*yl+c*bs+x*$u+c}var Cr=0,wa=function(c){this._sortAcrossTiles=c.layout.get("symbol-z-order")!=="viewport-y"&&c.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wa.prototype.continuePlacement=function(c,x,d,w,L){for(var F=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var G=c[this._currentPlacementIndex],K=x[G],te=this.placement.collisionIndex.transform.zoom;if(K.type==="symbol"&&(!K.minzoom||K.minzoom<=te)&&(!K.maxzoom||K.maxzoom>te)){this._inProgressLayer||(this._inProgressLayer=new wa(K));var ue=this._inProgressLayer.continuePlacement(d[K.source],this.placement,this._showCollisionBoxes,K,F);if(ue)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ta.prototype.commit=function(c){return this.placement.commit(c),this.placement};var ws=512/a.EXTENT/2,gl=function(c,x,d){this.tileID=c,this.indexedSymbolInstances={},this.bucketInstanceId=d;for(var w=0;wc.overscaledZ)for(var te in K){var ue=K[te];ue.tileID.isChildOf(c)&&ue.findMatches(x.symbolInstances,c,F)}else{var we=c.scaledTo(Number(G)),be=K[we.key];be&&be.findMatches(x.symbolInstances,c,F)}}for(var Ie=0;Ie0)throw new Error("Unimplemented: "+F.map(function(G){return G.command}).join(", ")+".");return L.forEach(function(G){G.command!=="setTransition"&&w[G.command].apply(w,G.args)}),this.stylesheet=d,!0},c.prototype.addImage=function(d,w){if(this.getImage(d))return this.fire(new a.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(d,w),this._afterImageUpdated(d)},c.prototype.updateImage=function(d,w){this.imageManager.updateImage(d,w)},c.prototype.getImage=function(d){return this.imageManager.getImage(d)},c.prototype.removeImage=function(d){if(!this.getImage(d))return this.fire(new a.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(d),this._afterImageUpdated(d)},c.prototype._afterImageUpdated=function(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))},c.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},c.prototype.addSource=function(d,w,L){var F=this;if(L===void 0&&(L={}),this._checkLoaded(),this.sourceCaches[d]!==void 0)throw new Error("There is already a source with this ID");if(!w.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(w).join(", ")+".");var G=["vector","raster","geojson","video","image"],K=G.indexOf(w.type)>=0;if(!(K&&this._validate(a.validateStyle.source,"sources."+d,w,null,L))){this.map&&this.map._collectResourceTiming&&(w.collectResourceTiming=!0);var te=this.sourceCaches[d]=new rt(d,w,this.dispatcher);te.style=this,te.setEventedParent(this,function(){return{isSourceLoaded:F.loaded(),source:te.serialize(),sourceId:d}}),te.onAdd(this.map),this._changed=!0}},c.prototype.removeSource=function(d){if(this._checkLoaded(),this.sourceCaches[d]===void 0)throw new Error("There is no source with this ID");for(var w in this._layers)if(this._layers[w].source===d)return this.fire(new a.ErrorEvent(new Error('Source "'+d+'" cannot be removed while layer "'+w+'" is using it.')));var L=this.sourceCaches[d];delete this.sourceCaches[d],delete this._updatedSources[d],L.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),L.setEventedParent(null),L.clearTiles(),L.onRemove&&L.onRemove(this.map),this._changed=!0},c.prototype.setGeoJSONSourceData=function(d,w){this._checkLoaded();var L=this.sourceCaches[d].getSource();L.setData(w),this._changed=!0},c.prototype.getSource=function(d){return this.sourceCaches[d]&&this.sourceCaches[d].getSource()},c.prototype.addLayer=function(d,w,L){L===void 0&&(L={}),this._checkLoaded();var F=d.id;if(this.getLayer(F)){this.fire(new a.ErrorEvent(new Error('Layer with id "'+F+'" already exists on this map')));return}var G;if(d.type==="custom"){if(us(this,a.validateCustomStyleLayer(d)))return;G=a.createStyleLayer(d)}else{if(typeof d.source=="object"&&(this.addSource(F,d.source),d=a.clone$1(d),d=a.extend(d,{source:F})),this._validate(a.validateStyle.layer,"layers."+F,d,{arrayIndex:-1},L))return;G=a.createStyleLayer(d),this._validateLayer(G),G.setEventedParent(this,{layer:{id:F}}),this._serializedLayers[G.id]=G.serialize()}var K=w?this._order.indexOf(w):this._order.length;if(w&&K===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+w+'" does not exist on this map.')));return}if(this._order.splice(K,0,F),this._layerOrderChanged=!0,this._layers[F]=G,this._removedLayers[F]&&G.source&&G.type!=="custom"){var te=this._removedLayers[F];delete this._removedLayers[F],te.type!==G.type?this._updatedSources[G.source]="clear":(this._updatedSources[G.source]="reload",this.sourceCaches[G.source].pause())}this._updateLayer(G),G.onAdd&&G.onAdd(this.map)},c.prototype.moveLayer=function(d,w){this._checkLoaded(),this._changed=!0;var L=this._layers[d];if(!L){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be moved.")));return}if(d!==w){var F=this._order.indexOf(d);this._order.splice(F,1);var G=w?this._order.indexOf(w):this._order.length;if(w&&G===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+w+'" does not exist on this map.')));return}this._order.splice(G,0,d),this._layerOrderChanged=!0}},c.prototype.removeLayer=function(d){this._checkLoaded();var w=this._layers[d];if(!w){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be removed.")));return}w.setEventedParent(null);var L=this._order.indexOf(d);this._order.splice(L,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=w,delete this._layers[d],delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],w.onRemove&&w.onRemove(this.map)},c.prototype.getLayer=function(d){return this._layers[d]},c.prototype.hasLayer=function(d){return d in this._layers},c.prototype.setLayerZoomRange=function(d,w,L){this._checkLoaded();var F=this.getLayer(d);if(!F){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot have zoom extent.")));return}F.minzoom===w&&F.maxzoom===L||(w!=null&&(F.minzoom=w),L!=null&&(F.maxzoom=L),this._updateLayer(F))},c.prototype.setFilter=function(d,w,L){L===void 0&&(L={}),this._checkLoaded();var F=this.getLayer(d);if(!F){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be filtered.")));return}if(!a.deepEqual(F.filter,w)){if(w==null){F.filter=void 0,this._updateLayer(F);return}this._validate(a.validateStyle.filter,"layers."+F.id+".filter",w,null,L)||(F.filter=a.clone$1(w),this._updateLayer(F))}},c.prototype.getFilter=function(d){return a.clone$1(this.getLayer(d).filter)},c.prototype.setLayoutProperty=function(d,w,L,F){F===void 0&&(F={}),this._checkLoaded();var G=this.getLayer(d);if(!G){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")));return}a.deepEqual(G.getLayoutProperty(w),L)||(G.setLayoutProperty(w,L,F),this._updateLayer(G))},c.prototype.getLayoutProperty=function(d,w){var L=this.getLayer(d);if(!L){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style.")));return}return L.getLayoutProperty(w)},c.prototype.setPaintProperty=function(d,w,L,F){F===void 0&&(F={}),this._checkLoaded();var G=this.getLayer(d);if(!G){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")));return}if(!a.deepEqual(G.getPaintProperty(w),L)){var K=G.setPaintProperty(w,L,F);K&&this._updateLayer(G),this._changed=!0,this._updatedPaintProps[d]=!0}},c.prototype.getPaintProperty=function(d,w){return this.getLayer(d).getPaintProperty(w)},c.prototype.setFeatureState=function(d,w){this._checkLoaded();var L=d.source,F=d.sourceLayer,G=this.sourceCaches[L];if(G===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+L+"' does not exist in the map's style.")));return}var K=G.getSource().type;if(K==="geojson"&&F){this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(K==="vector"&&!F){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}d.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),G.setFeatureState(F,d.id,w)},c.prototype.removeFeatureState=function(d,w){this._checkLoaded();var L=d.source,F=this.sourceCaches[L];if(F===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+L+"' does not exist in the map's style.")));return}var G=F.getSource().type,K=G==="vector"?d.sourceLayer:void 0;if(G==="vector"&&!K){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(w&&typeof d.id!="string"&&typeof d.id!="number"){this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}F.removeFeatureState(K,d.id,w)},c.prototype.getFeatureState=function(d){this._checkLoaded();var w=d.source,L=d.sourceLayer,F=this.sourceCaches[w];if(F===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+w+"' does not exist in the map's style.")));return}var G=F.getSource().type;if(G==="vector"&&!L){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return d.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),F.getFeatureState(L,d.id)},c.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},c.prototype.serialize=function(){return a.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:a.mapObject(this.sourceCaches,function(d){return d.serialize()}),layers:this._serializeLayers(this._order)},function(d){return d!==void 0})},c.prototype._updateLayer=function(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.sourceCaches[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause()),this._changed=!0},c.prototype._flattenAndSortRenderedFeatures=function(d){for(var w=this,L=function(Xr){return w._layers[Xr].type==="fill-extrusion"},F={},G=[],K=this._order.length-1;K>=0;K--){var te=this._order[K];if(L(te)){F[te]=K;for(var ue=0,we=d;ue=0;ct--){var zt=this._order[ct];if(L(zt))for(var qt=G.length-1;qt>=0;qt--){var Qt=G[qt].feature;if(F[Qt.layer.id] .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 a1=de((ibe,GV)=>{"use strict";var UV=Bt(),VV=Ua().defaultLine,Fve=Mb().attributes,qve=qo(),Nve=kc().textposition,Bve=nl().overrideAll,Ove=Di().templatedArray,aA=zc(),HV=qve({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});HV.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var Uve=GV.exports=Bve({_arrayAttrRegexps:[UV.counterRegex("mapbox",".layers",!0)],domain:Fve({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:aA.styleValuesMapbox.concat(aA.styleValuesNonMapbox),dflt:aA.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:Ove("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:VV},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:VV}},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:HV,textposition:UV.extendFlat({},Nve,{arrayOk:!1})}})},"plot","from-root");Uve.uirevision={valType:"any",editType:"none"}});var Pb=de((nbe,WV)=>{"use strict";var Vve=Hl().hovertemplateAttrs,Hve=Hl().texttemplateAttrs,Gve=px(),i1=rA(),gm=kc(),ZV=a1(),Zve=ms(),Yve=xc(),Hd=hn().extendFlat,Wve=nl().overrideAll,Xve=a1(),YV=i1.line,_m=i1.marker;WV.exports=Wve({lon:i1.lon,lat:i1.lat,cluster:{enabled:{valType:"boolean"},maxzoom:Hd({},Xve.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:Hd({},_m.opacity,{dflt:1})},mode:Hd({},gm.mode,{dflt:"markers"}),text:Hd({},gm.text,{}),texttemplate:Hve({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:Hd({},gm.hovertext,{}),line:{color:YV.color,width:YV.width},connectgaps:gm.connectgaps,marker:Hd({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:_m.opacity,size:_m.size,sizeref:_m.sizeref,sizemin:_m.sizemin,sizemode:_m.sizemode},Yve("marker")),fill:i1.fill,fillcolor:Gve(),textfont:ZV.layers.symbol.textfont,textposition:ZV.layers.symbol.textposition,below:{valType:"string"},selected:{marker:gm.selected.marker},unselected:{marker:gm.unselected.marker},hoverinfo:Hd({},Zve.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:Vve()},"calc","nested")});var iA=de((obe,XV)=>{"use strict";var jve=["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"];XV.exports={isSupportedFont:function(e){return jve.indexOf(e)!==-1}}});var KV=de((sbe,JV)=>{"use strict";var n1=Bt(),nA=rs(),Jve=P6(),Kve=D6(),Qve=z6(),$ve=I6(),jV=Pb(),ede=iA().isSupportedFont;JV.exports=function(t,r,i,a){function s(I,F){return n1.coerce(t,r,jV,I,F)}function l(I,F){return n1.coerce2(t,r,jV,I,F)}var f=tde(t,r,s);if(!f){r.visible=!1;return}if(s("text"),s("texttemplate"),s("hovertext"),s("hovertemplate"),s("mode"),s("below"),nA.hasMarkers(r)){Jve(t,r,i,a,s,{noLine:!0,noAngle:!0}),s("marker.allowoverlap"),s("marker.angle");var h=r.marker;h.symbol!=="circle"&&(n1.isArrayOrTypedArray(h.size)&&(h.size=h.size[0]),n1.isArrayOrTypedArray(h.color)&&(h.color=h.color[0]))}nA.hasLines(r)&&(Kve(t,r,i,a,s,{noDash:!0}),s("connectgaps"));var v=l("cluster.maxzoom"),m=l("cluster.step"),b=l("cluster.color",r.marker&&r.marker.color||i),T=l("cluster.size"),S=l("cluster.opacity"),C=v!==!1||m!==!1||b!==!1||T!==!1||S!==!1,P=s("cluster.enabled",C);if(P||nA.hasText(r)){var E=a.font.family;Qve(t,r,a,s,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:ede(E)?E:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}s("fill"),r.fill!=="none"&&$ve(t,r,i,s),n1.coerceSelectionMarkerOpacity(r,s)};function tde(e,t,r){var i=r("lon")||[],a=r("lat")||[],s=Math.min(i.length,a.length);return t._length=s,s}});var oA=de((lbe,$V)=>{"use strict";var QV=Yi();$V.exports=function(t,r,i){var a={},s=i[r.subplot]._subplot,l=s.mockAxis,f=t.lonlat;return a.lonLabel=QV.tickText(l,l.c2l(f[0]),!0).text,a.latLabel=QV.tickText(l,l.c2l(f[1]),!0).text,a}});var iH=de((ube,aH)=>{"use strict";var sA=Da(),eH=Hi().BADNUM,rde=q6(),ade=Ng(),ide=Gx(),nde=Bt().isArrayOrTypedArray,tH=Bt()._;function rH(e){return e&&typeof e=="string"}aH.exports=function(t,r){var i=nde(r.locations),a=i?r.locations.length:r._length,s=new Array(a),l;r.geojson?l=function(T){return rH(T)||sA(T)}:l=rH;for(var f=0;f{"use strict";var ode=Hi().BADNUM;o1.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,i=[],a=[],s=0;s0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i};o1.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};o1.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var nH=Bt();oH.exports=function(t,r){var i=t.split(" "),a=i[0],s=i[1],l=nH.isArrayOrTypedArray(r)?nH.mean(r):r,f=.5+l/100,h=1.5+l/100,v=["",""],m=[0,0];switch(a){case"top":v[0]="top",m[1]=-h;break;case"bottom":v[0]="bottom",m[1]=h;break}switch(s){case"left":v[1]="right",m[0]=-f;break;case"right":v[1]="left",m[0]=f;break}var b;return v[0]&&v[1]?b=v.join("-"):v[0]?b=v[0]:v[1]?b=v[1]:b="center",{anchor:b,offset:m}}});var hH=de((hbe,cH)=>{"use strict";var uH=Da(),ko=Bt(),sde=Hi().BADNUM,Ib=Db(),sH=L0(),lde=_i(),ude=a5(),Rb=rs(),fde=iA().isSupportedFont,cde=lA(),hde=bc().appendArrayPointValue,vde=co().NEWLINES,dde=co().BR_TAG_ALL;cH.exports=function(t,r){var i=r[0].trace,a=i.visible===!0&&i._length!==0,s=i.fill!=="none",l=Rb.hasLines(i),f=Rb.hasMarkers(i),h=Rb.hasText(i),v=f&&i.marker.symbol==="circle",m=f&&i.marker.symbol!=="circle",b=i.cluster&&i.cluster.enabled,T=zb("fill"),S=zb("line"),C=zb("circle"),P=zb("symbol"),E={fill:T,line:S,circle:C,symbol:P};if(!a)return E;var I;if((s||l)&&(I=Ib.calcTraceToLineCoords(r)),s&&(T.geojson=Ib.makePolygon(I),T.layout.visibility="visible",ko.extendFlat(T.paint,{"fill-color":i.fillcolor})),l&&(S.geojson=Ib.makeLine(I),S.layout.visibility="visible",ko.extendFlat(S.paint,{"line-width":i.line.width,"line-color":i.line.color,"line-opacity":i.opacity})),v){var F=pde(r);C.geojson=F.geojson,C.layout.visibility="visible",b&&(C.filter=["!",["has","point_count"]],E.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":fA(i.cluster.color,i.cluster.step),"circle-radius":fA(i.cluster.size,i.cluster.step),"circle-opacity":fA(i.cluster.opacity,i.cluster.step)}},E.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":lH(i),"text-size":12}}),ko.extendFlat(C.paint,{"circle-color":F.mcc,"circle-radius":F.mrc,"circle-opacity":F.mo})}if(v&&b&&(C.filter=["!",["has","point_count"]]),(m||h)&&(P.geojson=mde(r,t),ko.extendFlat(P.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),m&&(ko.extendFlat(P.layout,{"icon-size":i.marker.size/10}),"angle"in i.marker&&i.marker.angle!=="auto"&&ko.extendFlat(P.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),P.layout["icon-allow-overlap"]=i.marker.allowoverlap,ko.extendFlat(P.paint,{"icon-opacity":i.opacity*i.marker.opacity,"icon-color":i.marker.color})),h)){var N=(i.marker||{}).size,z=cde(i.textposition,N);ko.extendFlat(P.layout,{"text-size":i.textfont.size,"text-anchor":z.anchor,"text-offset":z.offset,"text-font":lH(i)}),ko.extendFlat(P.paint,{"text-color":i.textfont.color,"text-opacity":i.opacity})}return E};function zb(e){return{type:e,geojson:Ib.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function pde(e){var t=e[0].trace,r=t.marker,i=t.selectedpoints,a=ko.isArrayOrTypedArray(r.color),s=ko.isArrayOrTypedArray(r.size),l=ko.isArrayOrTypedArray(r.opacity),f;function h(N){return t.opacity*N}function v(N){return N/2}var m;a&&(sH.hasColorscale(t,"marker")?m=sH.makeColorScaleFuncFromTrace(r):m=ko.identity);var b;s&&(b=ude(t));var T;l&&(T=function(N){var z=uH(N)?+ko.constrain(N,0,1):0;return h(z)});var S=[];for(f=0;f850?f+=" Black":a>750?f+=" Extra Bold":a>650?f+=" Bold":a>550?f+=" Semi Bold":a>450?f+=" Medium":a>350?f+=" Regular":a>250?f+=" Light":a>150?f+=" Extra Light":f+=" Thin"):s.slice(0,2).join(" ")==="Open Sans"?(f="Open Sans",a>750?f+=" Extrabold":a>650?f+=" Bold":a>550?f+=" Semibold":a>350?f+=" Regular":f+=" Light"):s.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(f="Klokantech Noto Sans",s[3]==="CJK"&&(f+=" CJK"),f+=a>500?" Bold":" Regular")),l&&(f+=" Italic"),f==="Open Sans Regular Italic"?f="Open Sans Italic":f==="Open Sans Regular Bold"?f="Open Sans Bold":f==="Open Sans Regular Bold Italic"?f="Open Sans Bold Italic":f==="Klokantech Noto Sans Regular Italic"&&(f="Klokantech Noto Sans Italic"),fde(f)||(f=r);var h=f.split(", ");return h}});var mH=de((vbe,pH)=>{"use strict";var yde=Bt(),vH=hH(),xm=zc().traceLayerPrefix,uu={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function dH(e,t,r,i){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=i,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:xm+t+"-fill",line:xm+t+"-line",circle:xm+t+"-circle",symbol:xm+t+"-symbol",cluster:xm+t+"-cluster",clusterCount:xm+t+"-cluster-count"},this.below=null}var s1=dH.prototype;s1.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&yde.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)};s1.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};s1.addLayer=function(e,t,r){var i={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(i.filter=t.filter);for(var a=this.layerIds[e],s,l=this.subplot.getMapLayers(),f=0;f=0;O--){var H=z[O];a.removeLayer(v.layerIds[H])}N||a.removeSource(v.sourceIds.circle)}function T(N){for(var z=uu.nonCluster,O=0;O=0;O--){var H=z[O];a.removeLayer(v.layerIds[H]),N||a.removeSource(v.sourceIds[H])}}function C(N){h?b(N):S(N)}function P(N){f?m(N):T(N)}function E(){for(var N=f?uu.cluster:uu.nonCluster,z=0;z=0;i--){var a=r[i];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};pH.exports=function(t,r){var i=r[0].trace,a=i.cluster&&i.cluster.enabled,s=i.visible!==!0,l=new dH(t,i.uid,a,s),f=vH(t.gd,r),h=l.below=t.belowLookup["trace-"+i.uid],v,m,b;if(a)for(l.addSource("circle",f.circle,i.cluster),v=0;v{"use strict";var gde=Rf(),cA=Bt(),_de=eT(),xde=cA.fillText,bde=Hi().BADNUM,wde=zc().traceLayerPrefix;function Tde(e,t,r){var i=e.cd,a=i[0].trace,s=e.xa,l=e.ya,f=e.subplot,h=[],v=wde+a.uid+"-circle",m=a.cluster&&a.cluster.enabled;if(m){var b=f.map.queryRenderedFeatures(null,{layers:[v]});h=b.map(function(W){return W.id})}var T=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),S=T*360,C=t-S;function P(W){var J=W.lonlat;if(J[0]===bde||m&&h.indexOf(W.i+1)===-1)return 1/0;var re=cA.modHalf(J[0],360),oe=J[1],ne=f.project([re,oe]),fe=ne.x-s.c2p([C,oe]),ve=ne.y-l.c2p([re,r]),Ce=Math.max(3,W.mrc||0);return Math.max(Math.sqrt(fe*fe+ve*ve)-Ce,1-3/Ce)}if(gde.getClosest(i,P,e),e.index!==!1){var E=i[e.index],I=E.lonlat,F=[cA.modHalf(I[0],360)+S,I[1]],N=s.c2p(F),z=l.c2p(F),O=E.mrc||1;e.x0=N-O,e.x1=N+O,e.y0=z-O,e.y1=z+O;var H={};H[a.subplot]={_subplot:f};var V=a._module.formatLabels(E,a,H);return e.lonLabel=V.lonLabel,e.latLabel=V.latLabel,e.color=_de(a,E),e.extraText=yH(a,E,i[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function yH(e,t,r){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i.split("+"),s=a.indexOf("all")!==-1,l=a.indexOf("lon")!==-1,f=a.indexOf("lat")!==-1,h=t.lonlat,v=[];function m(b){return b+"\xB0"}return s||l&&f?v.push("("+m(h[1])+", "+m(h[0])+")"):l?v.push(r.lon+m(h[0])):f&&v.push(r.lat+m(h[1])),(s||a.indexOf("text")!==-1)&&xde(t,e,v),v.join("
")}gH.exports={hoverPoints:Tde,getExtraText:yH}});var xH=de((pbe,_H)=>{"use strict";_H.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var wH=de((mbe,bH)=>{"use strict";var Ade=Bt(),Mde=rs(),Sde=Hi().BADNUM;bH.exports=function(t,r){var i=t.cd,a=t.xaxis,s=t.yaxis,l=[],f=i[0].trace,h;if(!Mde.hasMarkers(f))return[];if(r===!1)for(h=0;h{(function(e,t){typeof hA=="object"&&typeof vA!="undefined"?vA.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(hA,function(){"use strict";var e,t,r;function i(a,s){if(!e)e=s;else if(!t)t=s;else{var l="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",f={};e(f),r=s(f),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([l],{type:"text/javascript"})))}}return i(["exports"],function(a){"use strict";function s(n,o){return o={exports:{}},n(o,o.exports),o.exports}var l="1.13.4",f=h;function h(n,o,u,p){this.cx=3*n,this.bx=3*(u-n)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=n,this.p1y=p,this.p2x=u,this.p2y=p}h.prototype.sampleCurveX=function(n){return((this.ax*n+this.bx)*n+this.cx)*n},h.prototype.sampleCurveY=function(n){return((this.ay*n+this.by)*n+this.cy)*n},h.prototype.sampleCurveDerivativeX=function(n){return(3*this.ax*n+2*this.bx)*n+this.cx},h.prototype.solveCurveX=function(n,o){typeof o=="undefined"&&(o=1e-6);var u,p,_,A,k;for(_=n,k=0;k<8;k++){if(A=this.sampleCurveX(_)-n,Math.abs(A)p)return p;for(;uA?u=_:p=_,_=(p-u)*.5+u}return _},h.prototype.solve=function(n,o){return this.sampleCurveY(this.solveCurveX(n,o))};var v=m;function m(n,o){this.x=n,this.y=o}m.prototype={clone:function(){return new m(this.x,this.y)},add:function(n){return this.clone()._add(n)},sub:function(n){return this.clone()._sub(n)},multByPoint:function(n){return this.clone()._multByPoint(n)},divByPoint:function(n){return this.clone()._divByPoint(n)},mult:function(n){return this.clone()._mult(n)},div:function(n){return this.clone()._div(n)},rotate:function(n){return this.clone()._rotate(n)},rotateAround:function(n,o){return this.clone()._rotateAround(n,o)},matMult:function(n){return this.clone()._matMult(n)},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(n){return this.x===n.x&&this.y===n.y},dist:function(n){return Math.sqrt(this.distSqr(n))},distSqr:function(n){var o=n.x-this.x,u=n.y-this.y;return o*o+u*u},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(n){return Math.atan2(this.y-n.y,this.x-n.x)},angleWith:function(n){return this.angleWithSep(n.x,n.y)},angleWithSep:function(n,o){return Math.atan2(this.x*o-this.y*n,this.x*n+this.y*o)},_matMult:function(n){var o=n[0]*this.x+n[1]*this.y,u=n[2]*this.x+n[3]*this.y;return this.x=o,this.y=u,this},_add:function(n){return this.x+=n.x,this.y+=n.y,this},_sub:function(n){return this.x-=n.x,this.y-=n.y,this},_mult:function(n){return this.x*=n,this.y*=n,this},_div:function(n){return this.x/=n,this.y/=n,this},_multByPoint:function(n){return this.x*=n.x,this.y*=n.y,this},_divByPoint:function(n){return this.x/=n.x,this.y/=n.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var n=this.y;return this.y=this.x,this.x=-n,this},_rotate:function(n){var o=Math.cos(n),u=Math.sin(n),p=o*this.x-u*this.y,_=u*this.x+o*this.y;return this.x=p,this.y=_,this},_rotateAround:function(n,o){var u=Math.cos(n),p=Math.sin(n),_=o.x+u*(this.x-o.x)-p*(this.y-o.y),A=o.y+p*(this.x-o.x)+u*(this.y-o.y);return this.x=_,this.y=A,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(n){return n instanceof m?n:Array.isArray(n)?new m(n[0],n[1]):n};var b=typeof self!="undefined"?self:{};function T(n,o){if(Array.isArray(n)){if(!Array.isArray(o)||n.length!==o.length)return!1;for(var u=0;u=1)return 1;var o=n*n,u=o*n;return 4*(n<.5?u:3*(n-o)+u-.75)}function P(n,o,u,p){var _=new f(n,o,u,p);return function(A){return _.solve(A)}}var E=P(.25,.1,.25,1);function I(n,o,u){return Math.min(u,Math.max(o,n))}function F(n,o,u){var p=u-o,_=((n-o)%p+p)%p+o;return _===o?u:_}function N(n,o,u){if(!n.length)return u(null,[]);var p=n.length,_=new Array(n.length),A=null;n.forEach(function(k,q){o(k,function(Y,j){Y&&(A=Y),_[q]=j,--p===0&&u(A,_)})})}function z(n){var o=[];for(var u in n)o.push(n[u]);return o}function O(n,o){var u=[];for(var p in n)p in o||u.push(p);return u}function H(n){for(var o=[],u=arguments.length-1;u-- >0;)o[u]=arguments[u+1];for(var p=0,_=o;p<_.length;p+=1){var A=_[p];for(var k in A)n[k]=A[k]}return n}function V(n,o){for(var u={},p=0;p>o/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,n)}return n()}function oe(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function ne(n){return n?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(n):!1}function fe(n,o){n.forEach(function(u){o[u]&&(o[u]=o[u].bind(o))})}function ve(n,o){return n.indexOf(o,n.length-o.length)!==-1}function Ce(n,o,u){var p={};for(var _ in n)p[_]=o.call(u||this,n[_],_,n);return p}function Se(n,o,u){var p={};for(var _ in n)o.call(u||this,n[_],_,n)&&(p[_]=n[_]);return p}function Te(n){return Array.isArray(n)?n.map(Te):typeof n=="object"&&n?Ce(n,Te):n}function pe(n,o){for(var u=0;u=0)return!0;return!1}var Ae={};function Me(n){Ae[n]||(typeof console!="undefined"&&console.warn(n),Ae[n]=!0)}function Le(n,o,u){return(u.y-n.y)*(o.x-n.x)>(o.y-n.y)*(u.x-n.x)}function Ke(n){for(var o=0,u=0,p=n.length,_=p-1,A=void 0,k=void 0;u@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,u={};if(n.replace(o,function(_,A,k,q){var Y=k||q;return u[A]=Y?Y.toLowerCase():!0,""}),u["max-age"]){var p=parseInt(u["max-age"],10);isNaN(p)?delete u["max-age"]:u["max-age"]=p}return u}var He=null;function _t(n){if(He==null){var o=n.navigator?n.navigator.userAgent:null;He=!!n.safari||!!(o&&(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return He}function at(n){try{var o=b[n];return o.setItem("_mapbox_test_",1),o.removeItem("_mapbox_test_"),!0}catch(u){return!1}}function At(n){return b.btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(o,u){return String.fromCharCode(+("0x"+u))}))}function kt(n){return decodeURIComponent(b.atob(n).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var pt=b.performance&&b.performance.now?b.performance.now.bind(b.performance):Date.now.bind(Date),ge=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame,Re=b.cancelAnimationFrame||b.mozCancelAnimationFrame||b.webkitCancelAnimationFrame||b.msCancelAnimationFrame,xe,et,vt={now:pt,frame:function(o){var u=ge(o);return{cancel:function(){return Re(u)}}},getImageData:function(o,u){u===void 0&&(u=0);var p=b.document.createElement("canvas"),_=p.getContext("2d");if(!_)throw new Error("failed to create canvas 2d context");return p.width=o.width,p.height=o.height,_.drawImage(o,0,0,o.width,o.height),_.getImageData(-u,-u,o.width+2*u,o.height+2*u)},resolveURL:function(o){return xe||(xe=b.document.createElement("a")),xe.href=o,xe.href},hardwareConcurrency:b.navigator&&b.navigator.hardwareConcurrency||4,get devicePixelRatio(){return b.devicePixelRatio},get prefersReducedMotion(){return b.matchMedia?(et==null&&(et=b.matchMedia("(prefers-reduced-motion: reduce)")),et.matches):!1}},tt={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},Nt={supported:!1,testSupport:xt},Mt,Ct=!1,Rt,Ut=!1;b.document&&(Rt=b.document.createElement("img"),Rt.onload=function(){Mt&&Et(Mt),Mt=null,Ut=!0},Rt.onerror=function(){Ct=!0,Mt=null},Rt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function xt(n){Ct||!Rt||(Ut?Et(n):Mt=n)}function Et(n){var o=n.createTexture();n.bindTexture(n.TEXTURE_2D,o);try{if(n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,Rt),n.isContextLost())return;Nt.supported=!0}catch(u){}n.deleteTexture(o),Ct=!0}var ir="01";function Wt(){for(var n="1",o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",u="",p=0;p<10;p++)u+=o[Math.floor(Math.random()*62)];var _=12*60*60*1e3,A=[n,ir,u].join(""),k=Date.now()+_;return{token:A,tokenExpiresAt:k}}var Be=function(o,u){this._transformRequestFn=o,this._customAccessToken=u,this._createSkuToken()};Be.prototype._createSkuToken=function(){var o=Wt();this._skuToken=o.token,this._skuTokenExpiresAt=o.tokenExpiresAt},Be.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Be.prototype.transformRequest=function(o,u){return this._transformRequestFn?this._transformRequestFn(o,u)||{url:o}:{url:o}},Be.prototype.normalizeStyleURL=function(o,u){if(!ft(o))return o;var p=Vt(o);return p.path="/styles/v1"+p.path,this._makeAPIURL(p,this._customAccessToken||u)},Be.prototype.normalizeGlyphsURL=function(o,u){if(!ft(o))return o;var p=Vt(o);return p.path="/fonts/v1"+p.path,this._makeAPIURL(p,this._customAccessToken||u)},Be.prototype.normalizeSourceURL=function(o,u){if(!ft(o))return o;var p=Vt(o);return p.path="/v4/"+p.authority+".json",p.params.push("secure"),this._makeAPIURL(p,this._customAccessToken||u)},Be.prototype.normalizeSpriteURL=function(o,u,p,_){var A=Vt(o);return ft(o)?(A.path="/styles/v1"+A.path+"/sprite"+u+p,this._makeAPIURL(A,this._customAccessToken||_)):(A.path+=""+u+p,Kt(A))},Be.prototype.normalizeTileURL=function(o,u){if(this._isSkuTokenExpired()&&this._createSkuToken(),o&&!ft(o))return o;var p=Vt(o),_=/(\.(png|jpg)\d*)(?=$)/,A=/^.+\/v4\//,k=vt.devicePixelRatio>=2||u===512?"@2x":"",q=Nt.supported?".webp":"$1";p.path=p.path.replace(_,""+k+q),p.path=p.path.replace(A,"/"),p.path="/v4"+p.path;var Y=this._customAccessToken||Tt(p.params)||tt.ACCESS_TOKEN;return tt.REQUIRE_ACCESS_TOKEN&&Y&&this._skuToken&&p.params.push("sku="+this._skuToken),this._makeAPIURL(p,Y)},Be.prototype.canonicalizeTileURL=function(o,u){var p="/v4/",_=/\.[\w]+$/,A=Vt(o);if(!A.path.match(/(^\/v4\/)/)||!A.path.match(_))return o;var k="mapbox://tiles/";k+=A.path.replace(p,"");var q=A.params;return u&&(q=q.filter(function(Y){return!Y.match(/^access_token=/)})),q.length&&(k+="?"+q.join("&")),k},Be.prototype.canonicalizeTileset=function(o,u){for(var p=u?ft(u):!1,_=[],A=0,k=o.tiles||[];A=0&&o.params.splice(A,1)}if(_.path!=="/"&&(o.path=""+_.path+o.path),!tt.REQUIRE_ACCESS_TOKEN)return Kt(o);if(u=u||tt.ACCESS_TOKEN,!u)throw new Error("An API access token is required to use Mapbox GL. "+p);if(u[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+p);return o.params=o.params.filter(function(k){return k.indexOf("access_token")===-1}),o.params.push("access_token="+u),Kt(o)};function ft(n){return n.indexOf("mapbox:")===0}var mt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ar(n){return mt.test(n)}function dr(n){return n.indexOf("sku=")>0&&Ar(n)}function Tt(n){for(var o=0,u=n;o=1&&b.localStorage.setItem(u,JSON.stringify(this.eventData))}catch(_){Me("Unable to write to LocalStorage")}},er.prototype.processRequests=function(o){},er.prototype.postEvent=function(o,u,p,_){var A=this;if(tt.EVENTS_URL){var k=Vt(tt.EVENTS_URL);k.params.push("access_token="+(_||tt.ACCESS_TOKEN||""));var q={event:this.type,created:new Date(o).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:l,skuId:ir,userId:this.anonId},Y=u?H(q,u):q,j={url:Kt(k),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Y])};this.pendingRequest=Ve(j,function(Q){A.pendingRequest=null,p(Q),A.saveEventData(),A.processRequests(_)})}},er.prototype.queueRequest=function(o,u){this.queue.push(o),this.processRequests(u)};var Mr=function(n){function o(){n.call(this,"map.load"),this.success={},this.skuToken=""}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.postMapLoadEvent=function(p,_,A,k){this.skuToken=A,(tt.EVENTS_URL&&k||tt.ACCESS_TOKEN&&Array.isArray(p)&&p.some(function(q){return ft(q)||Ar(q)}))&&this.queueRequest({id:_,timestamp:Date.now()},k)},o.prototype.processRequests=function(p){var _=this;if(!(this.pendingRequest||this.queue.length===0)){var A=this.queue.shift(),k=A.id,q=A.timestamp;k&&this.success[k]||(this.anonId||this.fetchEventData(),ne(this.anonId)||(this.anonId=re()),this.postEvent(q,{skuToken:this.skuToken},function(Y){Y||k&&(_.success[k]=!0)},p))}},o}(er),xr=function(n){function o(u){n.call(this,"appUserTurnstile"),this._customAccessToken=u}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.postTurnstileEvent=function(p,_){tt.EVENTS_URL&&tt.ACCESS_TOKEN&&Array.isArray(p)&&p.some(function(A){return ft(A)||Ar(A)})&&this.queueRequest(Date.now(),_)},o.prototype.processRequests=function(p){var _=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var A=Ot(tt.ACCESS_TOKEN),k=A?A.u:tt.ACCESS_TOKEN,q=k!==this.eventData.tokenU;ne(this.anonId)||(this.anonId=re(),q=!0);var Y=this.queue.shift();if(this.eventData.lastSuccess){var j=new Date(this.eventData.lastSuccess),Q=new Date(Y),ie=(Y-this.eventData.lastSuccess)/(24*60*60*1e3);q=q||ie>=1||ie<-1||j.getDate()!==Q.getDate()}else q=!0;if(!q)return this.processRequests();this.postEvent(Y,{"enabled.telemetry":!1},function(ye){ye||(_.eventData.lastSuccess=Y,_.eventData.tokenU=k)},p)}},o}(er),Pt=new xr,Fe=Pt.postTurnstileEvent.bind(Pt),Ge=new Mr,bt=Ge.postMapLoadEvent.bind(Ge),dt="mapbox-tiles",gr=500,Er=50,Tr=1e3*60*7,Hr;function _a(){b.caches&&!Hr&&(Hr=b.caches.open(dt))}var ka;function Ea(n,o){if(ka===void 0)try{new Response(new ReadableStream),ka=!0}catch(u){ka=!1}ka?o(n.body):n.blob().then(o)}function Ri(n,o,u){if(_a(),!!Hr){var p={status:o.status,statusText:o.statusText,headers:new b.Headers};o.headers.forEach(function(k,q){return p.headers.set(q,k)});var _=lt(o.headers.get("Cache-Control")||"");if(!_["no-store"]){_["max-age"]&&p.headers.set("Expires",new Date(u+_["max-age"]*1e3).toUTCString());var A=new Date(p.headers.get("Expires")).getTime()-u;ADate.now()&&!u["no-cache"]}var jn=1/0;function En(n){jn++,jn>Er&&(n.getActor().send("enforceCacheSizeLimit",gr),jn=0)}function Vi(n){_a(),Hr&&Hr.then(function(o){o.keys().then(function(u){for(var p=0;p=200&&u.status<300||u.status===0)&&u.response!==null){var _=u.response;if(n.type==="json")try{_=JSON.parse(u.response)}catch(A){return o(A)}o(null,_,u.getResponseHeader("Cache-Control"),u.getResponseHeader("Expires"))}else o(new ya(u.statusText,u.status,n.url))},u.send(n.body),{cancel:function(){return u.abort()}}}var Ee=function(n,o){if(!ee(n.url)){if(b.fetch&&b.Request&&b.AbortController&&b.Request.prototype.hasOwnProperty("signal"))return se(n,o);if(it()&&self.worker&&self.worker.actor){var u=!0;return self.worker.actor.send("getResource",n,o,void 0,u)}}return ce(n,o)},Ne=function(n,o){return Ee(H(n,{type:"json"}),o)},rt=function(n,o){return Ee(H(n,{type:"arrayBuffer"}),o)},Ve=function(n,o){return Ee(H(n,{method:"POST"}),o)};function yt(n){var o=b.document.createElement("a");return o.href=n,o.protocol===b.document.location.protocol&&o.host===b.document.location.host}var Dt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ft(n,o,u,p){var _=new b.Image,A=b.URL;_.onload=function(){o(null,_),A.revokeObjectURL(_.src),_.onload=null,b.requestAnimationFrame(function(){_.src=Dt})},_.onerror=function(){return o(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 k=new b.Blob([new Uint8Array(n)],{type:"image/png"});_.cacheControl=u,_.expires=p,_.src=n.byteLength?A.createObjectURL(k):Dt}function tr(n,o){var u=new b.Blob([new Uint8Array(n)],{type:"image/png"});b.createImageBitmap(u).then(function(p){o(null,p)}).catch(function(p){o(new Error("Could not load image because of "+p.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Yt,wr,Yr=function(){Yt=[],wr=0};Yr();var Br=function(n,o){if(Nt.supported&&(n.headers||(n.headers={}),n.headers.accept="image/webp,*/*"),wr>=tt.MAX_PARALLEL_IMAGE_REQUESTS){var u={requestParameters:n,callback:o,cancelled:!1,cancel:function(){this.cancelled=!0}};return Yt.push(u),u}wr++;var p=!1,_=function(){if(!p)for(p=!0,wr--;Yt.length&&wr0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)},pr.prototype.setEventedParent=function(o,u){return this._eventedParent=o,this._eventedParentData=u,this};var $r=8,ga={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"}},nr={"*":{type:"source"}},wi=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],La={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:"*"}},si={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:"*"}},fa={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:"*"}},Ln={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"}},Co={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"}}},xs={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"}}},Ga={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"}},Jn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],hu={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Bi={"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"}},dl={"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"}},Qd={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},qc={"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"}},Nc={"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"}},hv={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},vv={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},vu={type:"array",value:"*"},pl={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},$d={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Ku={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},Zf={type:"array",value:"*",minimum:1},Qi={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}},Ho=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],mo={"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"}},ml={"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"}},Go={"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"}},du={"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"}},ep={"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"}},dv={"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"}},Qu={"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"}},pv={"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"}},mv={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},oo={"*":{type:"string"}},Xt={$version:$r,$root:ga,sources:nr,source:wi,source_vector:La,source_raster:si,source_raster_dem:fa,source_geojson:Ln,source_video:Co,source_image:xs,layer:Ga,layout:Jn,layout_background:hu,layout_fill:Bi,layout_circle:dl,layout_heatmap:Qd,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:qc,layout_symbol:Nc,layout_raster:hv,layout_hillshade:vv,filter:vu,filter_operator:pl,geometry_type:$d,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:Ku,expression:Zf,light:Qi,paint:Ho,paint_fill:mo,"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:ml,paint_circle:Go,paint_heatmap:du,paint_symbol:ep,paint_raster:dv,paint_hillshade:Qu,paint_background:pv,transition:mv,"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:oo},Or=function(o,u,p,_){this.message=(o?o+": ":"")+p,_&&(this.identifier=_),u!=null&&u.__line__&&(this.line=u.__line__)};function tp(n){var o=n.key,u=n.value;return u?[new Or(o,u,"constants have been deprecated as of v8")]:[]}function pu(n){for(var o=[],u=arguments.length-1;u-- >0;)o[u]=arguments[u+1];for(var p=0,_=o;p<_.length;p+=1){var A=_[p];for(var k in A)n[k]=A[k]}return n}function an(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function yl(n){if(Array.isArray(n))return n.map(yl);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){var o={};for(var u in n)o[u]=yl(n[u]);return o}return an(n)}var bs=function(n){function o(u,p){n.call(this,p),this.message=p,this.key=u}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o}(Error),$u=function(o,u){u===void 0&&(u=[]),this.parent=o,this.bindings={};for(var p=0,_=u;p<_.length;p+=1){var A=_[p],k=A[0],q=A[1];this.bindings[k]=q}};$u.prototype.concat=function(o){return new $u(this,o)},$u.prototype.get=function(o){if(this.bindings[o])return this.bindings[o];if(this.parent)return this.parent.get(o);throw new Error(o+" not found in scope.")},$u.prototype.has=function(o){return this.bindings[o]?!0:this.parent?this.parent.has(o):!1};var ef={kind:"null"},Cr={kind:"number"},wa={kind:"string"},Ta={kind:"boolean"},ws={kind:"color"},gl={kind:"object"},Ma={kind:"value"},Xs={kind:"error"},mu={kind:"collator"},us={kind:"formatted"},_l={kind:"resolvedImage"};function yo(n,o){return{kind:"array",itemType:n,N:o}}function ki(n){if(n.kind==="array"){var o=ki(n.itemType);return typeof n.N=="number"?"array<"+o+", "+n.N+">":n.itemType.kind==="value"?"array":"array<"+o+">"}else return n.kind}var Ts=[ef,Cr,wa,Ta,ws,us,gl,yo(Ma),_l];function fs(n,o){if(o.kind==="error")return null;if(n.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!fs(n.itemType,o.itemType))&&(typeof n.N!="number"||n.N===o.N))return null}else{if(n.kind===o.kind)return null;if(n.kind==="value")for(var u=0,p=Ts;u255?255:j}function _(j){return j<0?0:j>1?1:j}function A(j){return j[j.length-1]==="%"?p(parseFloat(j)/100*255):p(parseInt(j))}function k(j){return j[j.length-1]==="%"?_(parseFloat(j)/100):_(parseFloat(j))}function q(j,Q,ie){return ie<0?ie+=1:ie>1&&(ie-=1),ie*6<1?j+(Q-j)*ie*6:ie*2<1?Q:ie*3<2?j+(Q-j)*(2/3-ie)*6:j}function Y(j){var Q=j.replace(/ /g,"").toLowerCase();if(Q in u)return u[Q].slice();if(Q[0]==="#"){if(Q.length===4){var ie=parseInt(Q.substr(1),16);return ie>=0&&ie<=4095?[(ie&3840)>>4|(ie&3840)>>8,ie&240|(ie&240)>>4,ie&15|(ie&15)<<4,1]:null}else if(Q.length===7){var ie=parseInt(Q.substr(1),16);return ie>=0&&ie<=16777215?[(ie&16711680)>>16,(ie&65280)>>8,ie&255,1]:null}return null}var ye=Q.indexOf("("),he=Q.indexOf(")");if(ye!==-1&&he+1===Q.length){var ke=Q.substr(0,ye),qe=Q.substr(ye+1,he-(ye+1)).split(","),st=1;switch(ke){case"rgba":if(qe.length!==4)return null;st=k(qe.pop());case"rgb":return qe.length!==3?null:[A(qe[0]),A(qe[1]),A(qe[2]),st];case"hsla":if(qe.length!==4)return null;st=k(qe.pop());case"hsl":if(qe.length!==3)return null;var Qe=(parseFloat(qe[0])%360+360)%360/360,Lt=k(qe[1]),gt=k(qe[2]),St=gt<=.5?gt*(Lt+1):gt+Lt-gt*Lt,It=gt*2-St;return[p(q(It,St,Qe+1/3)*255),p(q(It,St,Qe)*255),p(q(It,St,Qe-1/3)*255),st];default:return null}}return null}try{o.parseCSSColor=Y}catch(j){}}),Yf=Mm.parseCSSColor,ni=function(o,u,p,_){_===void 0&&(_=1),this.r=o,this.g=u,this.b=p,this.a=_};ni.parse=function(o){if(o){if(o instanceof ni)return o;if(typeof o=="string"){var u=Yf(o);if(u)return new ni(u[0]/255*u[3],u[1]/255*u[3],u[2]/255*u[3],u[3])}}},ni.prototype.toString=function(){var o=this.toArray(),u=o[0],p=o[1],_=o[2],A=o[3];return"rgba("+Math.round(u)+","+Math.round(p)+","+Math.round(_)+","+A+")"},ni.prototype.toArray=function(){var o=this,u=o.r,p=o.g,_=o.b,A=o.a;return A===0?[0,0,0,0]:[u*255/A,p*255/A,_*255/A,A]},ni.black=new ni(0,0,0,1),ni.white=new ni(1,1,1,1),ni.transparent=new ni(0,0,0,0),ni.red=new ni(1,0,0,1);var Wf=function(o,u,p){o?this.sensitivity=u?"variant":"case":this.sensitivity=u?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Wf.prototype.compare=function(o,u){return this.collator.compare(o,u)},Wf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var yv=function(o,u,p,_,A){this.text=o,this.image=u,this.scale=p,this.fontStack=_,this.textColor=A},gn=function(o){this.sections=o};gn.fromString=function(o){return new gn([new yv(o,null,null,null,null)])},gn.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(o){return o.text.length!==0||o.image&&o.image.name.length!==0})},gn.factory=function(o){return o instanceof gn?o:gn.fromString(o)},gn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(o){return o.text}).join("")},gn.prototype.serialize=function(){for(var o=["format"],u=0,p=this.sections;u=0&&n<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof u=="number"&&u>=0&&u<=255)){var _=typeof p=="number"?[n,o,u,p]:[n,o,u];return"Invalid rgba value ["+_.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof p=="undefined"||typeof p=="number"&&p>=0&&p<=1?null:"Invalid rgba value ["+[n,o,u,p].join(", ")+"]: 'a' must be between 0 and 1."}function tf(n){if(n===null)return!0;if(typeof n=="string")return!0;if(typeof n=="boolean")return!0;if(typeof n=="number")return!0;if(n instanceof ni)return!0;if(n instanceof Wf)return!0;if(n instanceof gn)return!0;if(n instanceof Pn)return!0;if(Array.isArray(n)){for(var o=0,u=n;o2){var q=o[1];if(typeof q!="string"||!(q in Xf)||q==="object")return u.error('The item type argument of "array" must be one of string, number, boolean',1);k=Xf[q],p++}else k=Ma;var Y;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return u.error('The length argument to "array" must be a positive integer literal',2);Y=o[2],p++}_=yo(k,Y)}else _=Xf[A];for(var j=[];p1)&&u.push(_)}}return u.concat(this.args.map(function(A){return A.serialize()}))};var Yo=function(o){this.type=us,this.sections=o};Yo.parse=function(o,u){if(o.length<2)return u.error("Expected at least one argument.");var p=o[1];if(!Array.isArray(p)&&typeof p=="object")return u.error("First argument must be an image or text section.");for(var _=[],A=!1,k=1;k<=o.length-1;++k){var q=o[k];if(A&&typeof q=="object"&&!Array.isArray(q)){A=!1;var Y=null;if(q["font-scale"]&&(Y=u.parse(q["font-scale"],1,Cr),!Y))return null;var j=null;if(q["text-font"]&&(j=u.parse(q["text-font"],1,yo(wa)),!j))return null;var Q=null;if(q["text-color"]&&(Q=u.parse(q["text-color"],1,ws),!Q))return null;var ie=_[_.length-1];ie.scale=Y,ie.font=j,ie.textColor=Q}else{var ye=u.parse(o[k],1,Ma);if(!ye)return null;var he=ye.type.kind;if(he!=="string"&&he!=="value"&&he!=="null"&&he!=="resolvedImage")return u.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");A=!0,_.push({content:ye,scale:null,font:null,textColor:null})}}return new Yo(_)},Yo.prototype.evaluate=function(o){var u=function(p){var _=p.content.evaluate(o);return nn(_)===_l?new yv("",_,null,null,null):new yv(Eo(_),null,p.scale?p.scale.evaluate(o):null,p.font?p.font.evaluate(o).join(","):null,p.textColor?p.textColor.evaluate(o):null)};return new gn(this.sections.map(u))},Yo.prototype.eachChild=function(o){for(var u=0,p=this.sections;u-1),p},js.prototype.eachChild=function(o){o(this.input)},js.prototype.outputDefined=function(){return!1},js.prototype.serialize=function(){return["image",this.input.serialize()]};var Sm={"to-boolean":Ta,"to-color":ws,"to-number":Cr,"to-string":wa},Wo=function(o,u){this.type=o,this.args=u};Wo.parse=function(o,u){if(o.length<2)return u.error("Expected at least one argument.");var p=o[0];if((p==="to-boolean"||p==="to-string")&&o.length!==2)return u.error("Expected one argument.");for(var _=Sm[p],A=[],k=1;k4?p="Invalid rbga value "+JSON.stringify(u)+": expected an array containing either three or four numeric values.":p=rp(u[0],u[1],u[2],u[3]),!p))return new ni(u[0]/255,u[1]/255,u[2]/255,u[3])}throw new un(p||"Could not parse color from value '"+(typeof u=="string"?u:String(JSON.stringify(u)))+"'")}else if(this.type.kind==="number"){for(var Y=null,j=0,Q=this.args;j=o[2]||n[1]<=o[1]||n[3]>=o[3])}function Pm(n,o){var u=Em(n[0]),p=Lm(n[1]),_=Math.pow(2,o.z);return[Math.round(u*_*bl),Math.round(p*_*bl)]}function Dm(n,o,u){var p=n[0]-o[0],_=n[1]-o[1],A=n[0]-u[0],k=n[1]-u[1];return p*k-A*_===0&&p*A<=0&&_*k<=0}function zm(n,o,u){return o[1]>n[1]!=u[1]>n[1]&&n[0]<(u[0]-o[0])*(n[1]-o[1])/(u[1]-o[1])+o[0]}function _v(n,o){for(var u=!1,p=0,_=o.length;p<_;p++)for(var A=o[p],k=0,q=A.length;k0&&ie<0||Q<0&&ie>0}function ap(n,o,u,p){var _=[o[0]-n[0],o[1]-n[1]],A=[p[0]-u[0],p[1]-u[1]];return Rm(A,_)===0?!1:!!(xv(n,o,u,p)&&xv(u,p,n,o))}function ip(n,o,u){for(var p=0,_=u;p<_.length;p+=1)for(var A=_[p],k=0;ku[2]){var _=p*.5,A=n[0]-u[0]>_?-p:u[0]-n[0]>_?p:0;A===0&&(A=n[0]-u[2]>_?-p:u[2]-n[0]>_?p:0),n[0]+=A}gv(o,n)}function qm(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function op(n,o,u,p){for(var _=Math.pow(2,p.z)*bl,A=[p.x*bl,p.y*bl],k=[],q=0,Y=n;q=0)return!1;var u=!0;return n.eachChild(function(p){u&&!Vc(p,o)&&(u=!1)}),u}var Tl=function(o,u){this.type=u.type,this.name=o,this.boundExpression=u};Tl.parse=function(o,u){if(o.length!==2||typeof o[1]!="string")return u.error("'var' expression requires exactly one string literal argument.");var p=o[1];return u.scope.has(p)?new Tl(p,u.scope.get(p)):u.error('Unknown variable "'+p+'". Make sure "'+p+'" has been bound in an enclosing "let" expression before using it.',1)},Tl.prototype.evaluate=function(o){return this.boundExpression.evaluate(o)},Tl.prototype.eachChild=function(){},Tl.prototype.outputDefined=function(){return!1},Tl.prototype.serialize=function(){return["var",this.name]};var Al=function(o,u,p,_,A){u===void 0&&(u=[]),_===void 0&&(_=new $u),A===void 0&&(A=[]),this.registry=o,this.path=u,this.key=u.map(function(k){return"["+k+"]"}).join(""),this.scope=_,this.errors=A,this.expectedType=p};Al.prototype.parse=function(o,u,p,_,A){return A===void 0&&(A={}),u?this.concat(u,p,_)._parse(o,A):this._parse(o,A)},Al.prototype._parse=function(o,u){(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number")&&(o=["literal",o]);function p(Q,ie,ye){return ye==="assert"?new on(ie,[Q]):ye==="coerce"?new Wo(ie,[Q]):Q}if(Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var _=o[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 A=this.registry[_];if(A){var k=A.parse(o,this);if(!k)return null;if(this.expectedType){var q=this.expectedType,Y=k.type;if((q.kind==="string"||q.kind==="number"||q.kind==="boolean"||q.kind==="object"||q.kind==="array")&&Y.kind==="value")k=p(k,q,u.typeAnnotation||"assert");else if((q.kind==="color"||q.kind==="formatted"||q.kind==="resolvedImage")&&(Y.kind==="value"||Y.kind==="string"))k=p(k,q,u.typeAnnotation||"coerce");else if(this.checkSubtype(q,Y))return null}if(!(k instanceof Zo)&&k.type.kind!=="resolvedImage"&&Tv(k)){var j=new Js;try{k=new Zo(k.type,k.evaluate(j))}catch(Q){return this.error(Q.message),null}}return k}return this.error('Unknown expression "'+_+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof o=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof o=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof o+" instead.")},Al.prototype.concat=function(o,u,p){var _=typeof o=="number"?this.path.concat(o):this.path,A=p?this.scope.concat(p):this.scope;return new Al(this.registry,_,u||null,A,this.errors)},Al.prototype.error=function(o){for(var u=[],p=arguments.length-1;p-- >0;)u[p]=arguments[p+1];var _=""+this.key+u.map(function(A){return"["+A+"]"}).join("");this.errors.push(new bs(_,o))},Al.prototype.checkSubtype=function(o,u){var p=fs(o,u);return p&&this.error(p),p};function Tv(n){if(n instanceof Tl)return Tv(n.boundExpression);if(n instanceof Dn&&n.name==="error")return!1;if(n instanceof xl)return!1;if(n instanceof cs)return!1;var o=n instanceof Wo||n instanceof on,u=!0;return n.eachChild(function(p){o?u=u&&Tv(p):u=u&&p instanceof Zo}),u?Uc(n)&&Vc(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Hc(n,o){for(var u=n.length-1,p=0,_=u,A=0,k,q;p<=_;)if(A=Math.floor((p+_)/2),k=n[A],q=n[A+1],k<=o){if(A===u||oo)_=A-1;else throw new un("Input is not a number.");return 0}var As=function(o,u,p){this.type=o,this.input=u,this.labels=[],this.outputs=[];for(var _=0,A=p;_=q)return u.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',j);var ie=u.parse(Y,Q,A);if(!ie)return null;A=A||ie.type,_.push([q,ie])}return new As(A,p,_)},As.prototype.evaluate=function(o){var u=this.labels,p=this.outputs;if(u.length===1)return p[0].evaluate(o);var _=this.input.evaluate(o);if(_<=u[0])return p[0].evaluate(o);var A=u.length;if(_>=u[A-1])return p[A-1].evaluate(o);var k=Hc(u,_);return p[k].evaluate(o)},As.prototype.eachChild=function(o){o(this.input);for(var u=0,p=this.outputs;u0&&o.push(this.labels[u]),o.push(this.outputs[u].serialize());return o};function fn(n,o,u){return n*(1-u)+o*u}function Bm(n,o,u){return new ni(fn(n.r,o.r,u),fn(n.g,o.g,u),fn(n.b,o.b,u),fn(n.a,o.a,u))}function Om(n,o,u){return n.map(function(p,_){return fn(p,o[_],u)})}var Ml=Object.freeze({__proto__:null,number:fn,color:Bm,array:Om}),rf=.95047,hs=1,up=1.08883,fp=4/29,af=6/29,cp=3*af*af,hp=af*af*af,Um=Math.PI/180,Vm=180/Math.PI;function Av(n){return n>hp?Math.pow(n,1/3):n/cp+fp}function Mv(n){return n>af?n*n*n:cp*(n-fp)}function Sv(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function jf(n){return n/=255,n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Gc(n){var o=jf(n.r),u=jf(n.g),p=jf(n.b),_=Av((.4124564*o+.3575761*u+.1804375*p)/rf),A=Av((.2126729*o+.7151522*u+.072175*p)/hs),k=Av((.0193339*o+.119192*u+.9503041*p)/up);return{l:116*A-16,a:500*(_-A),b:200*(A-k),alpha:n.a}}function vp(n){var o=(n.l+16)/116,u=isNaN(n.a)?o:o+n.a/500,p=isNaN(n.b)?o:o-n.b/200;return o=hs*Mv(o),u=rf*Mv(u),p=up*Mv(p),new ni(Sv(3.2404542*u-1.5371385*o-.4985314*p),Sv(-.969266*u+1.8760108*o+.041556*p),Sv(.0556434*u-.2040259*o+1.0572252*p),n.alpha)}function Fi(n,o,u){return{l:fn(n.l,o.l,u),a:fn(n.a,o.a,u),b:fn(n.b,o.b,u),alpha:fn(n.alpha,o.alpha,u)}}function Hm(n){var o=Gc(n),u=o.l,p=o.a,_=o.b,A=Math.atan2(_,p)*Vm;return{h:A<0?A+360:A,c:Math.sqrt(p*p+_*_),l:u,alpha:n.a}}function Zc(n){var o=n.h*Um,u=n.c,p=n.l;return vp({l:p,a:Math.cos(o)*u,b:Math.sin(o)*u,alpha:n.alpha})}function kv(n,o,u){var p=o-n;return n+u*(p>180||p<-180?p-360*Math.round(p/360):p)}function dp(n,o,u){return{h:kv(n.h,o.h,u),c:fn(n.c,o.c,u),l:fn(n.l,o.l,u),alpha:fn(n.alpha,o.alpha,u)}}var nf={forward:Gc,reverse:vp,interpolate:Fi},_u={forward:Hm,reverse:Zc,interpolate:dp},Cv=Object.freeze({__proto__:null,lab:nf,hcl:_u}),_n=function(o,u,p,_,A){this.type=o,this.operator=u,this.interpolation=p,this.input=_,this.labels=[],this.outputs=[];for(var k=0,q=A;k1}))return u.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:Y}}else return u.error("Unknown interpolation type "+String(_[0]),1,0);if(o.length-1<4)return u.error("Expected at least 4 arguments, but found only "+(o.length-1)+".");if((o.length-1)%2!==0)return u.error("Expected an even number of arguments.");if(A=u.parse(A,2,Cr),!A)return null;var j=[],Q=null;p==="interpolate-hcl"||p==="interpolate-lab"?Q=ws:u.expectedType&&u.expectedType.kind!=="value"&&(Q=u.expectedType);for(var ie=0;ie=ye)return u.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ke);var st=u.parse(he,qe,Q);if(!st)return null;Q=Q||st.type,j.push([ye,st])}return Q.kind!=="number"&&Q.kind!=="color"&&!(Q.kind==="array"&&Q.itemType.kind==="number"&&typeof Q.N=="number")?u.error("Type "+ki(Q)+" is not interpolatable."):new _n(Q,p,_,A,j)},_n.prototype.evaluate=function(o){var u=this.labels,p=this.outputs;if(u.length===1)return p[0].evaluate(o);var _=this.input.evaluate(o);if(_<=u[0])return p[0].evaluate(o);var A=u.length;if(_>=u[A-1])return p[A-1].evaluate(o);var k=Hc(u,_),q=u[k],Y=u[k+1],j=_n.interpolationFactor(this.interpolation,_,q,Y),Q=p[k].evaluate(o),ie=p[k+1].evaluate(o);return this.operator==="interpolate"?Ml[this.type.kind.toLowerCase()](Q,ie,j):this.operator==="interpolate-hcl"?_u.reverse(_u.interpolate(_u.forward(Q),_u.forward(ie),j)):nf.reverse(nf.interpolate(nf.forward(Q),nf.forward(ie),j))},_n.prototype.eachChild=function(o){o(this.input);for(var u=0,p=this.outputs;u=p.length)throw new un("Array index out of bounds: "+u+" > "+(p.length-1)+".");if(u!==Math.floor(u))throw new un("Array index must be an integer, but found "+u+" instead.");return p[u]},kl.prototype.eachChild=function(o){o(this.index),o(this.input)},kl.prototype.outputDefined=function(){return!1},kl.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Cl=function(o,u){this.type=Ta,this.needle=o,this.haystack=u};Cl.parse=function(o,u){if(o.length!==3)return u.error("Expected 2 arguments, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1,Ma),_=u.parse(o[2],2,Ma);return!p||!_?null:Bc(p.type,[Ta,wa,Cr,ef,Ma])?new Cl(p,_):u.error("Expected first argument to be of type boolean, string, number or null, but found "+ki(p.type)+" instead")},Cl.prototype.evaluate=function(o){var u=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!yu(u,["boolean","string","number","null"]))throw new un("Expected first argument to be of type boolean, string, number or null, but found "+ki(nn(u))+" instead.");if(!yu(p,["string","array"]))throw new un("Expected second argument to be of type array or string, but found "+ki(nn(p))+" instead.");return p.indexOf(u)>=0},Cl.prototype.eachChild=function(o){o(this.needle),o(this.haystack)},Cl.prototype.outputDefined=function(){return!0},Cl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Qs=function(o,u,p){this.type=Cr,this.needle=o,this.haystack=u,this.fromIndex=p};Qs.parse=function(o,u){if(o.length<=2||o.length>=5)return u.error("Expected 3 or 4 arguments, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1,Ma),_=u.parse(o[2],2,Ma);if(!p||!_)return null;if(!Bc(p.type,[Ta,wa,Cr,ef,Ma]))return u.error("Expected first argument to be of type boolean, string, number or null, but found "+ki(p.type)+" instead");if(o.length===4){var A=u.parse(o[3],3,Cr);return A?new Qs(p,_,A):null}else return new Qs(p,_)},Qs.prototype.evaluate=function(o){var u=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!yu(u,["boolean","string","number","null"]))throw new un("Expected first argument to be of type boolean, string, number or null, but found "+ki(nn(u))+" instead.");if(!yu(p,["string","array"]))throw new un("Expected second argument to be of type array or string, but found "+ki(nn(p))+" instead.");if(this.fromIndex){var _=this.fromIndex.evaluate(o);return p.indexOf(u,_)}return p.indexOf(u)},Qs.prototype.eachChild=function(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)},Qs.prototype.outputDefined=function(){return!1},Qs.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var o=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),o]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ms=function(o,u,p,_,A,k){this.inputType=o,this.type=u,this.input=p,this.cases=_,this.outputs=A,this.otherwise=k};Ms.parse=function(o,u){if(o.length<5)return u.error("Expected at least 4 arguments, but found only "+(o.length-1)+".");if(o.length%2!==1)return u.error("Expected an even number of arguments.");var p,_;u.expectedType&&u.expectedType.kind!=="value"&&(_=u.expectedType);for(var A={},k=[],q=2;qNumber.MAX_SAFE_INTEGER)return Q.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof he=="number"&&Math.floor(he)!==he)return Q.error("Numeric branch labels must be integer values.");if(!p)p=nn(he);else if(Q.checkSubtype(p,nn(he)))return null;if(typeof A[String(he)]!="undefined")return Q.error("Branch labels must be unique.");A[String(he)]=k.length}var ke=u.parse(j,q,_);if(!ke)return null;_=_||ke.type,k.push(ke)}var qe=u.parse(o[1],1,Ma);if(!qe)return null;var st=u.parse(o[o.length-1],o.length-1,_);return!st||qe.type.kind!=="value"&&u.concat(1).checkSubtype(p,qe.type)?null:new Ms(p,_,qe,A,k,st)},Ms.prototype.evaluate=function(o){var u=this.input.evaluate(o),p=nn(u)===this.inputType&&this.outputs[this.cases[u]]||this.otherwise;return p.evaluate(o)},Ms.prototype.eachChild=function(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)},Ms.prototype.outputDefined=function(){return this.outputs.every(function(o){return o.outputDefined()})&&this.otherwise.outputDefined()},Ms.prototype.serialize=function(){for(var o=this,u=["match",this.input.serialize()],p=Object.keys(this.cases).sort(),_=[],A={},k=0,q=p;k=5)return u.error("Expected 3 or 4 arguments, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1,Ma),_=u.parse(o[2],2,Cr);if(!p||!_)return null;if(!Bc(p.type,[yo(Ma),wa,Ma]))return u.error("Expected first argument to be of type array or string, but found "+ki(p.type)+" instead");if(o.length===4){var A=u.parse(o[3],3,Cr);return A?new El(p.type,p,_,A):null}else return new El(p.type,p,_)},El.prototype.evaluate=function(o){var u=this.input.evaluate(o),p=this.beginIndex.evaluate(o);if(!yu(u,["string","array"]))throw new un("Expected first argument to be of type array or string, but found "+ki(nn(u))+" instead.");if(this.endIndex){var _=this.endIndex.evaluate(o);return u.slice(p,_)}return u.slice(p)},El.prototype.eachChild=function(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)},El.prototype.outputDefined=function(){return!1},El.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var o=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),o]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function pp(n,o){return n==="=="||n==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Gm(n,o,u){return o===u}function Zm(n,o,u){return o!==u}function Ym(n,o,u){return ou}function yp(n,o,u){return o<=u}function Ev(n,o,u){return o>=u}function Lv(n,o,u,p){return p.compare(o,u)===0}function Kf(n,o,u,p){return!Lv(n,o,u,p)}function Yc(n,o,u,p){return p.compare(o,u)<0}function gp(n,o,u,p){return p.compare(o,u)>0}function Pv(n,o,u,p){return p.compare(o,u)<=0}function _p(n,o,u,p){return p.compare(o,u)>=0}function of(n,o,u){var p=n!=="=="&&n!=="!=";return function(){function _(A,k,q){this.type=Ta,this.lhs=A,this.rhs=k,this.collator=q,this.hasUntypedArgument=A.type.kind==="value"||k.type.kind==="value"}return _.parse=function(k,q){if(k.length!==3&&k.length!==4)return q.error("Expected two or three arguments.");var Y=k[0],j=q.parse(k[1],1,Ma);if(!j)return null;if(!pp(Y,j.type))return q.concat(1).error('"'+Y+`" comparisons are not supported for type '`+ki(j.type)+"'.");var Q=q.parse(k[2],2,Ma);if(!Q)return null;if(!pp(Y,Q.type))return q.concat(2).error('"'+Y+`" comparisons are not supported for type '`+ki(Q.type)+"'.");if(j.type.kind!==Q.type.kind&&j.type.kind!=="value"&&Q.type.kind!=="value")return q.error("Cannot compare types '"+ki(j.type)+"' and '"+ki(Q.type)+"'.");p&&(j.type.kind==="value"&&Q.type.kind!=="value"?j=new on(Q.type,[j]):j.type.kind!=="value"&&Q.type.kind==="value"&&(Q=new on(j.type,[Q])));var ie=null;if(k.length===4){if(j.type.kind!=="string"&&Q.type.kind!=="string"&&j.type.kind!=="value"&&Q.type.kind!=="value")return q.error("Cannot use collator to compare non-string types.");if(ie=q.parse(k[3],3,mu),!ie)return null}return new _(j,Q,ie)},_.prototype.evaluate=function(k){var q=this.lhs.evaluate(k),Y=this.rhs.evaluate(k);if(p&&this.hasUntypedArgument){var j=nn(q),Q=nn(Y);if(j.kind!==Q.kind||!(j.kind==="string"||j.kind==="number"))throw new un('Expected arguments for "'+n+'" to be (string, string) or (number, number), but found ('+j.kind+", "+Q.kind+") instead.")}if(this.collator&&!p&&this.hasUntypedArgument){var ie=nn(q),ye=nn(Y);if(ie.kind!=="string"||ye.kind!=="string")return o(k,q,Y)}return this.collator?u(k,q,Y,this.collator.evaluate(k)):o(k,q,Y)},_.prototype.eachChild=function(k){k(this.lhs),k(this.rhs),this.collator&&k(this.collator)},_.prototype.outputDefined=function(){return!0},_.prototype.serialize=function(){var k=[n];return this.eachChild(function(q){k.push(q.serialize())}),k},_}()}var Wm=of("==",Gm,Lv),xp=of("!=",Zm,Kf),bp=of("<",Ym,Yc),wp=of(">",mp,gp),Dv=of("<=",yp,Pv),zv=of(">=",Ev,_p),xu=function(o,u,p,_,A){this.type=wa,this.number=o,this.locale=u,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=A};xu.parse=function(o,u){if(o.length!==3)return u.error("Expected two arguments.");var p=u.parse(o[1],1,Cr);if(!p)return null;var _=o[2];if(typeof _!="object"||Array.isArray(_))return u.error("NumberFormat options argument must be an object.");var A=null;if(_.locale&&(A=u.parse(_.locale,1,wa),!A))return null;var k=null;if(_.currency&&(k=u.parse(_.currency,1,wa),!k))return null;var q=null;if(_["min-fraction-digits"]&&(q=u.parse(_["min-fraction-digits"],1,Cr),!q))return null;var Y=null;return _["max-fraction-digits"]&&(Y=u.parse(_["max-fraction-digits"],1,Cr),!Y)?null:new xu(p,A,k,q,Y)},xu.prototype.evaluate=function(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))},xu.prototype.eachChild=function(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)},xu.prototype.outputDefined=function(){return!1},xu.prototype.serialize=function(){var o={};return this.locale&&(o.locale=this.locale.serialize()),this.currency&&(o.currency=this.currency.serialize()),this.minFractionDigits&&(o["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(o["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),o]};var Ll=function(o){this.type=Cr,this.input=o};Ll.parse=function(o,u){if(o.length!==2)return u.error("Expected 1 argument, but found "+(o.length-1)+" instead.");var p=u.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?u.error("Expected argument of type string or array, but found "+ki(p.type)+" instead."):new Ll(p):null},Ll.prototype.evaluate=function(o){var u=this.input.evaluate(o);if(typeof u=="string")return u.length;if(Array.isArray(u))return u.length;throw new un("Expected value to be of type string or array, but found "+ki(nn(u))+" instead.")},Ll.prototype.eachChild=function(o){o(this.input)},Ll.prototype.outputDefined=function(){return!1},Ll.prototype.serialize=function(){var o=["length"];return this.eachChild(function(u){o.push(u.serialize())}),o};var Qf={"==":Wm,"!=":xp,">":wp,"<":bp,">=":zv,"<=":Dv,array:on,at:kl,boolean:on,case:Ss,coalesce:Ks,collator:xl,format:Yo,image:js,in:Cl,"index-of":Qs,interpolate:_n,"interpolate-hcl":_n,"interpolate-lab":_n,length:Ll,let:Sl,literal:Zo,match:Ms,number:on,"number-format":xu,object:on,slice:El,step:As,string:on,"to-boolean":Wo,"to-color":Wo,"to-number":Wo,"to-string":Wo,var:Tl,within:cs};function Iv(n,o){var u=o[0],p=o[1],_=o[2],A=o[3];u=u.evaluate(n),p=p.evaluate(n),_=_.evaluate(n);var k=A?A.evaluate(n):1,q=rp(u,p,_,k);if(q)throw new un(q);return new ni(u/255*k,p/255*k,_/255*k,k)}function Wc(n,o){return n in o}function Xc(n,o){var u=o[n];return typeof u=="undefined"?null:u}function jc(n,o,u,p){for(;u<=p;){var _=u+p>>1;if(o[_]===n)return!0;o[_]>n?p=_-1:u=_+1}return!1}function Pl(n){return{type:n}}Dn.register(Qf,{error:[Xs,[wa],function(n,o){var u=o[0];throw new un(u.evaluate(n))}],typeof:[wa,[Ma],function(n,o){var u=o[0];return ki(nn(u.evaluate(n)))}],"to-rgba":[yo(Cr,4),[ws],function(n,o){var u=o[0];return u.evaluate(n).toArray()}],rgb:[ws,[Cr,Cr,Cr],Iv],rgba:[ws,[Cr,Cr,Cr,Cr],Iv],has:{type:Ta,overloads:[[[wa],function(n,o){var u=o[0];return Wc(u.evaluate(n),n.properties())}],[[wa,gl],function(n,o){var u=o[0],p=o[1];return Wc(u.evaluate(n),p.evaluate(n))}]]},get:{type:Ma,overloads:[[[wa],function(n,o){var u=o[0];return Xc(u.evaluate(n),n.properties())}],[[wa,gl],function(n,o){var u=o[0],p=o[1];return Xc(u.evaluate(n),p.evaluate(n))}]]},"feature-state":[Ma,[wa],function(n,o){var u=o[0];return Xc(u.evaluate(n),n.featureState||{})}],properties:[gl,[],function(n){return n.properties()}],"geometry-type":[wa,[],function(n){return n.geometryType()}],id:[Ma,[],function(n){return n.id()}],zoom:[Cr,[],function(n){return n.globals.zoom}],"heatmap-density":[Cr,[],function(n){return n.globals.heatmapDensity||0}],"line-progress":[Cr,[],function(n){return n.globals.lineProgress||0}],accumulated:[Ma,[],function(n){return n.globals.accumulated===void 0?null:n.globals.accumulated}],"+":[Cr,Pl(Cr),function(n,o){for(var u=0,p=0,_=o;p<_.length;p+=1){var A=_[p];u+=A.evaluate(n)}return u}],"*":[Cr,Pl(Cr),function(n,o){for(var u=1,p=0,_=o;p<_.length;p+=1){var A=_[p];u*=A.evaluate(n)}return u}],"-":{type:Cr,overloads:[[[Cr,Cr],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)-p.evaluate(n)}],[[Cr],function(n,o){var u=o[0];return-u.evaluate(n)}]]},"/":[Cr,[Cr,Cr],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)/p.evaluate(n)}],"%":[Cr,[Cr,Cr],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)%p.evaluate(n)}],ln2:[Cr,[],function(){return Math.LN2}],pi:[Cr,[],function(){return Math.PI}],e:[Cr,[],function(){return Math.E}],"^":[Cr,[Cr,Cr],function(n,o){var u=o[0],p=o[1];return Math.pow(u.evaluate(n),p.evaluate(n))}],sqrt:[Cr,[Cr],function(n,o){var u=o[0];return Math.sqrt(u.evaluate(n))}],log10:[Cr,[Cr],function(n,o){var u=o[0];return Math.log(u.evaluate(n))/Math.LN10}],ln:[Cr,[Cr],function(n,o){var u=o[0];return Math.log(u.evaluate(n))}],log2:[Cr,[Cr],function(n,o){var u=o[0];return Math.log(u.evaluate(n))/Math.LN2}],sin:[Cr,[Cr],function(n,o){var u=o[0];return Math.sin(u.evaluate(n))}],cos:[Cr,[Cr],function(n,o){var u=o[0];return Math.cos(u.evaluate(n))}],tan:[Cr,[Cr],function(n,o){var u=o[0];return Math.tan(u.evaluate(n))}],asin:[Cr,[Cr],function(n,o){var u=o[0];return Math.asin(u.evaluate(n))}],acos:[Cr,[Cr],function(n,o){var u=o[0];return Math.acos(u.evaluate(n))}],atan:[Cr,[Cr],function(n,o){var u=o[0];return Math.atan(u.evaluate(n))}],min:[Cr,Pl(Cr),function(n,o){return Math.min.apply(Math,o.map(function(u){return u.evaluate(n)}))}],max:[Cr,Pl(Cr),function(n,o){return Math.max.apply(Math,o.map(function(u){return u.evaluate(n)}))}],abs:[Cr,[Cr],function(n,o){var u=o[0];return Math.abs(u.evaluate(n))}],round:[Cr,[Cr],function(n,o){var u=o[0],p=u.evaluate(n);return p<0?-Math.round(-p):Math.round(p)}],floor:[Cr,[Cr],function(n,o){var u=o[0];return Math.floor(u.evaluate(n))}],ceil:[Cr,[Cr],function(n,o){var u=o[0];return Math.ceil(u.evaluate(n))}],"filter-==":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1];return n.properties()[u.value]===p.value}],"filter-id-==":[Ta,[Ma],function(n,o){var u=o[0];return n.id()===u.value}],"filter-type-==":[Ta,[wa],function(n,o){var u=o[0];return n.geometryType()===u.value}],"filter-<":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_>A}],"filter-id->":[Ta,[Ma],function(n,o){var u=o[0],p=n.id(),_=u.value;return typeof p==typeof _&&p>_}],"filter-<=":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_<=A}],"filter-id-<=":[Ta,[Ma],function(n,o){var u=o[0],p=n.id(),_=u.value;return typeof p==typeof _&&p<=_}],"filter->=":[Ta,[wa,Ma],function(n,o){var u=o[0],p=o[1],_=n.properties()[u.value],A=p.value;return typeof _==typeof A&&_>=A}],"filter-id->=":[Ta,[Ma],function(n,o){var u=o[0],p=n.id(),_=u.value;return typeof p==typeof _&&p>=_}],"filter-has":[Ta,[Ma],function(n,o){var u=o[0];return u.value in n.properties()}],"filter-has-id":[Ta,[],function(n){return n.id()!==null&&n.id()!==void 0}],"filter-type-in":[Ta,[yo(wa)],function(n,o){var u=o[0];return u.value.indexOf(n.geometryType())>=0}],"filter-id-in":[Ta,[yo(Ma)],function(n,o){var u=o[0];return u.value.indexOf(n.id())>=0}],"filter-in-small":[Ta,[wa,yo(Ma)],function(n,o){var u=o[0],p=o[1];return p.value.indexOf(n.properties()[u.value])>=0}],"filter-in-large":[Ta,[wa,yo(Ma)],function(n,o){var u=o[0],p=o[1];return jc(n.properties()[u.value],p.value,0,p.value.length-1)}],all:{type:Ta,overloads:[[[Ta,Ta],function(n,o){var u=o[0],p=o[1];return u.evaluate(n)&&p.evaluate(n)}],[Pl(Ta),function(n,o){for(var u=0,p=o;u-1}function Kc(n){return!!n.expression&&n.expression.interpolated}function di(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function $f(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Ap(n){return n}function Mp(n,o){var u=o.type==="color",p=n.stops&&typeof n.stops[0][0]=="object",_=p||n.property!==void 0,A=p||!_,k=n.type||(Kc(o)?"exponential":"interval");if(u&&(n=pu({},n),n.stops&&(n.stops=n.stops.map(function(ur){return[ur[0],ni.parse(ur[1])]})),n.default?n.default=ni.parse(n.default):n.default=ni.parse(o.default)),n.colorSpace&&n.colorSpace!=="rgb"&&!Cv[n.colorSpace])throw new Error("Unknown color space: "+n.colorSpace);var q,Y,j;if(k==="exponential")q=Rv;else if(k==="interval")q=kp;else if(k==="categorical"){q=Sp,Y=Object.create(null);for(var Q=0,ie=n.stops;Q=n.stops[p-1][0])return n.stops[p-1][1];var _=Hc(n.stops.map(function(A){return A[0]}),u);return n.stops[_][1]}function Rv(n,o,u){var p=n.base!==void 0?n.base:1;if(di(u)!=="number")return Dl(n.default,o.default);var _=n.stops.length;if(_===1||u<=n.stops[0][0])return n.stops[0][1];if(u>=n.stops[_-1][0])return n.stops[_-1][1];var A=Hc(n.stops.map(function(ie){return ie[0]}),u),k=Xm(u,p,n.stops[A][0],n.stops[A+1][0]),q=n.stops[A][1],Y=n.stops[A+1][1],j=Ml[o.type]||Ap;if(n.colorSpace&&n.colorSpace!=="rgb"){var Q=Cv[n.colorSpace];j=function(ie,ye){return Q.reverse(Q.interpolate(Q.forward(ie),Q.forward(ye),k))}}return typeof q.evaluate=="function"?{evaluate:function(){for(var ye=[],he=arguments.length;he--;)ye[he]=arguments[he];var ke=q.evaluate.apply(void 0,ye),qe=Y.evaluate.apply(void 0,ye);if(!(ke===void 0||qe===void 0))return j(ke,qe,k)}}:j(q,Y,k)}function Cp(n,o,u){return o.type==="color"?u=ni.parse(u):o.type==="formatted"?u=gn.fromString(u.toString()):o.type==="resolvedImage"?u=Pn.fromString(u.toString()):di(u)!==o.type&&(o.type!=="enum"||!o.values[u])&&(u=void 0),Dl(u,n.default,o.default)}function Xm(n,o,u,p){var _=p-u,A=n-u;return _===0?0:o===1?A/_:(Math.pow(o,A)-1)/(Math.pow(o,_)-1)}var zl=function(o,u){this.expression=o,this._warningHistory={},this._evaluator=new Js,this._defaultValue=u?Jm(u):null,this._enumValues=u&&u.type==="enum"?u.values:null};zl.prototype.evaluateWithoutErrorHandling=function(o,u,p,_,A,k){return this._evaluator.globals=o,this._evaluator.feature=u,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=A||null,this._evaluator.formattedSection=k,this.expression.evaluate(this._evaluator)},zl.prototype.evaluate=function(o,u,p,_,A,k){this._evaluator.globals=o,this._evaluator.feature=u||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=A||null,this._evaluator.formattedSection=k||null;try{var q=this.expression.evaluate(this._evaluator);if(q==null||typeof q=="number"&&q!==q)return this._defaultValue;if(this._enumValues&&!(q in this._enumValues))throw new un("Expected value to be one of "+Object.keys(this._enumValues).map(function(Y){return JSON.stringify(Y)}).join(", ")+", but found "+JSON.stringify(q)+" instead.");return q}catch(Y){return this._warningHistory[Y.message]||(this._warningHistory[Y.message]=!0,typeof console!="undefined"&&console.warn(Y.message)),this._defaultValue}};function wu(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Qf}function ec(n,o){var u=new Al(Qf,[],o?Fv(o):void 0),p=u.parse(n,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?Jc(new zl(p,o)):bu(u.errors)}var ks=function(o,u){this.kind=o,this._styleExpression=u,this.isStateDependent=o!=="constant"&&!wl(u.expression)};ks.prototype.evaluateWithoutErrorHandling=function(o,u,p,_,A,k){return this._styleExpression.evaluateWithoutErrorHandling(o,u,p,_,A,k)},ks.prototype.evaluate=function(o,u,p,_,A,k){return this._styleExpression.evaluate(o,u,p,_,A,k)};var Cs=function(o,u,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=u,this.isStateDependent=o!=="camera"&&!wl(u.expression),this.interpolationType=_};Cs.prototype.evaluateWithoutErrorHandling=function(o,u,p,_,A,k){return this._styleExpression.evaluateWithoutErrorHandling(o,u,p,_,A,k)},Cs.prototype.evaluate=function(o,u,p,_,A,k){return this._styleExpression.evaluate(o,u,p,_,A,k)},Cs.prototype.interpolationFactor=function(o,u,p){return this.interpolationType?_n.interpolationFactor(this.interpolationType,o,u,p):0};function Xo(n,o){if(n=ec(n,o),n.result==="error")return n;var u=n.value.expression,p=Uc(u);if(!p&&!sf(o))return bu([new bs("","data expressions not supported")]);var _=Vc(u,["zoom"]);if(!_&&!Tp(o))return bu([new bs("","zoom expressions not supported")]);var A=uf(u);if(!A&&!_)return bu([new bs("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(A instanceof bs)return bu([A]);if(A instanceof _n&&!Kc(o))return bu([new bs("",'"interpolate" expressions cannot be used with this property')]);if(!A)return Jc(p?new ks("constant",n.value):new ks("source",n.value));var k=A instanceof _n?A.interpolation:void 0;return Jc(p?new Cs("camera",n.value,A.labels,k):new Cs("composite",n.value,A.labels,k))}var lf=function(o,u){this._parameters=o,this._specification=u,pu(this,Mp(this._parameters,this._specification))};lf.deserialize=function(o){return new lf(o._parameters,o._specification)},lf.serialize=function(o){return{_parameters:o._parameters,_specification:o._specification}};function jm(n,o){if($f(n))return new lf(n,o);if(wu(n)){var u=Xo(n,o);if(u.result==="error")throw new Error(u.value.map(function(_){return _.key+": "+_.message}).join(", "));return u.value}else{var p=n;return typeof n=="string"&&o.type==="color"&&(p=ni.parse(n)),{kind:"constant",evaluate:function(){return p}}}}function uf(n){var o=null;if(n instanceof Sl)o=uf(n.result);else if(n instanceof Ks)for(var u=0,p=n.args;up.maximum?[new Or(o,u,u+" is greater than the maximum value "+p.maximum)]:[]}function Qc(n){var o=n.valueSpec,u=an(n.value.type),p,_={},A,k,q=u!=="categorical"&&n.value.property===void 0,Y=!q,j=di(n.value.stops)==="array"&&di(n.value.stops[0])==="array"&&di(n.value.stops[0][0])==="object",Q=vs({key:n.key,value:n.value,valueSpec:n.styleSpec.function,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:ie,default:ke}});return u==="identity"&&q&&Q.push(new Or(n.key,n.value,'missing required property "property"')),u!=="identity"&&!n.value.stops&&Q.push(new Or(n.key,n.value,'missing required property "stops"')),u==="exponential"&&n.valueSpec.expression&&!Kc(n.valueSpec)&&Q.push(new Or(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(Y&&!sf(n.valueSpec)?Q.push(new Or(n.key,n.value,"property functions not supported")):q&&!Tp(n.valueSpec)&&Q.push(new Or(n.key,n.value,"zoom functions not supported"))),(u==="categorical"||j)&&n.value.property===void 0&&Q.push(new Or(n.key,n.value,'"property" property is required')),Q;function ie(qe){if(u==="identity")return[new Or(qe.key,qe.value,'identity function may not have a "stops" property')];var st=[],Qe=qe.value;return st=st.concat(qv({key:qe.key,value:Qe,valueSpec:qe.valueSpec,style:qe.style,styleSpec:qe.styleSpec,arrayElementValidator:ye})),di(Qe)==="array"&&Qe.length===0&&st.push(new Or(qe.key,Qe,"array must have at least one stop")),st}function ye(qe){var st=[],Qe=qe.value,Lt=qe.key;if(di(Qe)!=="array")return[new Or(Lt,Qe,"array expected, "+di(Qe)+" found")];if(Qe.length!==2)return[new Or(Lt,Qe,"array length 2 expected, length "+Qe.length+" found")];if(j){if(di(Qe[0])!=="object")return[new Or(Lt,Qe,"object expected, "+di(Qe[0])+" found")];if(Qe[0].zoom===void 0)return[new Or(Lt,Qe,"object stop key must have zoom")];if(Qe[0].value===void 0)return[new Or(Lt,Qe,"object stop key must have value")];if(k&&k>an(Qe[0].zoom))return[new Or(Lt,Qe[0].zoom,"stop zoom values must appear in ascending order")];an(Qe[0].zoom)!==k&&(k=an(Qe[0].zoom),A=void 0,_={}),st=st.concat(vs({key:Lt+"[0]",value:Qe[0],valueSpec:{zoom:{}},style:qe.style,styleSpec:qe.styleSpec,objectElementValidators:{zoom:ff,value:he}}))}else st=st.concat(he({key:Lt+"[0]",value:Qe[0],valueSpec:{},style:qe.style,styleSpec:qe.styleSpec},Qe));return wu(yl(Qe[1]))?st.concat([new Or(Lt+"[1]",Qe[1],"expressions are not allowed in function stops.")]):st.concat(li({key:Lt+"[1]",value:Qe[1],valueSpec:o,style:qe.style,styleSpec:qe.styleSpec}))}function he(qe,st){var Qe=di(qe.value),Lt=an(qe.value),gt=qe.value!==null?qe.value:st;if(!p)p=Qe;else if(Qe!==p)return[new Or(qe.key,gt,Qe+" stop domain type must match previous stop domain type "+p)];if(Qe!=="number"&&Qe!=="string"&&Qe!=="boolean")return[new Or(qe.key,gt,"stop domain value must be a number, string, or boolean")];if(Qe!=="number"&&u!=="categorical"){var St="number expected, "+Qe+" found";return sf(o)&&u===void 0&&(St+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Or(qe.key,gt,St)]}return u==="categorical"&&Qe==="number"&&(!isFinite(Lt)||Math.floor(Lt)!==Lt)?[new Or(qe.key,gt,"integer expected, found "+Lt)]:u!=="categorical"&&Qe==="number"&&A!==void 0&&Lt=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(var o=0,u=n.slice(1);oo?1:0}function hf(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(var o=1;o"||o==="<="||o===">="?Nv(n[1],n[2],o):o==="any"?$m(n.slice(1)):o==="all"?["all"].concat(n.slice(1).map(vf)):o==="none"?["all"].concat(n.slice(1).map(vf).map(tc)):o==="in"?Lp(n[1],n.slice(2)):o==="!in"?tc(Lp(n[1],n.slice(2))):o==="has"?Bv(n[1]):o==="!has"?tc(Bv(n[1])):o==="within"?n:!0;return u}function Nv(n,o,u){switch(n){case"$type":return["filter-type-"+u,o];case"$id":return["filter-id-"+u,o];default:return["filter-"+u,n,o]}}function $m(n){return["any"].concat(n.map(vf))}function Lp(n,o){if(o.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(function(u){return typeof u!=typeof o[0]})?["filter-in-large",n,["literal",o.sort(Il)]]:["filter-in-small",n,["literal",o]]}}function Bv(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function tc(n){return["!",n]}function eh(n){return go(yl(n.value))?Tu(pu({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ov(n)}function Ov(n){var o=n.value,u=n.key;if(di(o)!=="array")return[new Or(u,o,"array expected, "+di(o)+" found")];var p=n.styleSpec,_,A=[];if(o.length<1)return[new Or(u,o,"filter array must have at least 1 element")];switch(A=A.concat($c({key:u+"[0]",value:o[0],valueSpec:p.filter_operator,style:n.style,styleSpec:n.styleSpec})),an(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&an(o[1])==="$type"&&A.push(new Or(u,o,'"$type" cannot be use with operator "'+o[0]+'"'));case"==":case"!=":o.length!==3&&A.push(new Or(u,o,'filter array for operator "'+o[0]+'" must have 3 elements'));case"in":case"!in":o.length>=2&&(_=di(o[1]),_!=="string"&&A.push(new Or(u+"[1]",o[1],"string expected, "+_+" found")));for(var k=2;k=Q[he+0]&&p>=Q[he+1])?(k[ye]=!0,A.push(j[ye])):k[ye]=!1}}},Ls.prototype._forEachCell=function(n,o,u,p,_,A,k,q){for(var Y=this._convertToCellCoord(n),j=this._convertToCellCoord(o),Q=this._convertToCellCoord(u),ie=this._convertToCellCoord(p),ye=Y;ye<=Q;ye++)for(var he=j;he<=ie;he++){var ke=this.d*he+ye;if(!(q&&!q(this._convertFromCellCoord(ye),this._convertFromCellCoord(he),this._convertFromCellCoord(ye+1),this._convertFromCellCoord(he+1)))&&_.call(this,n,o,u,p,ke,A,k,q))return}},Ls.prototype._convertFromCellCoord=function(n){return(n-this.padding)/this.scale},Ls.prototype._convertToCellCoord=function(n){return Math.max(0,Math.min(this.d-1,Math.floor(n*this.scale)+this.padding))},Ls.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var n=this.cells,o=Fl+this.cells.length+1+1,u=0,p=0;p=0)){var ie=n[Q];j[Q]=ql[Y].shallow.indexOf(Q)>=0?ie:U(ie,o)}n instanceof Error&&(j.message=n.message)}if(j.$name)throw new Error("$name property is reserved for worker serialization logic.");return Y!=="Object"&&(j.$name=Y),j}throw new Error("can't serialize object of type "+typeof n)}function Z(n){if(n==null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp||D(n)||B(n)||ArrayBuffer.isView(n)||n instanceof nh)return n;if(Array.isArray(n))return n.map(Z);if(typeof n=="object"){var o=n.$name||"Object",u=ql[o],p=u.klass;if(!p)throw new Error("can't deserialize unregistered class "+o);if(p.deserialize)return p.deserialize(n);for(var _=Object.create(p.prototype),A=0,k=Object.keys(n);A=0?Y:Z(Y)}}return _}throw new Error("can't deserialize object of type "+typeof n)}var $=function(){this.first=!0};$.prototype.update=function(o,u){var p=Math.floor(o);return this.first?(this.first=!1,this.lastIntegerZoom=p,this.lastIntegerZoomTime=0,this.lastZoom=o,this.lastFloorZoom=p,!0):(this.lastFloorZoom>p?(this.lastIntegerZoom=p+1,this.lastIntegerZoomTime=u):this.lastFloorZoom=128&&n<=255},Arabic:function(n){return n>=1536&&n<=1791},"Arabic Supplement":function(n){return n>=1872&&n<=1919},"Arabic Extended-A":function(n){return n>=2208&&n<=2303},"Hangul Jamo":function(n){return n>=4352&&n<=4607},"Unified Canadian Aboriginal Syllabics":function(n){return n>=5120&&n<=5759},Khmer:function(n){return n>=6016&&n<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(n){return n>=6320&&n<=6399},"General Punctuation":function(n){return n>=8192&&n<=8303},"Letterlike Symbols":function(n){return n>=8448&&n<=8527},"Number Forms":function(n){return n>=8528&&n<=8591},"Miscellaneous Technical":function(n){return n>=8960&&n<=9215},"Control Pictures":function(n){return n>=9216&&n<=9279},"Optical Character Recognition":function(n){return n>=9280&&n<=9311},"Enclosed Alphanumerics":function(n){return n>=9312&&n<=9471},"Geometric Shapes":function(n){return n>=9632&&n<=9727},"Miscellaneous Symbols":function(n){return n>=9728&&n<=9983},"Miscellaneous Symbols and Arrows":function(n){return n>=11008&&n<=11263},"CJK Radicals Supplement":function(n){return n>=11904&&n<=12031},"Kangxi Radicals":function(n){return n>=12032&&n<=12255},"Ideographic Description Characters":function(n){return n>=12272&&n<=12287},"CJK Symbols and Punctuation":function(n){return n>=12288&&n<=12351},Hiragana:function(n){return n>=12352&&n<=12447},Katakana:function(n){return n>=12448&&n<=12543},Bopomofo:function(n){return n>=12544&&n<=12591},"Hangul Compatibility Jamo":function(n){return n>=12592&&n<=12687},Kanbun:function(n){return n>=12688&&n<=12703},"Bopomofo Extended":function(n){return n>=12704&&n<=12735},"CJK Strokes":function(n){return n>=12736&&n<=12783},"Katakana Phonetic Extensions":function(n){return n>=12784&&n<=12799},"Enclosed CJK Letters and Months":function(n){return n>=12800&&n<=13055},"CJK Compatibility":function(n){return n>=13056&&n<=13311},"CJK Unified Ideographs Extension A":function(n){return n>=13312&&n<=19903},"Yijing Hexagram Symbols":function(n){return n>=19904&&n<=19967},"CJK Unified Ideographs":function(n){return n>=19968&&n<=40959},"Yi Syllables":function(n){return n>=40960&&n<=42127},"Yi Radicals":function(n){return n>=42128&&n<=42191},"Hangul Jamo Extended-A":function(n){return n>=43360&&n<=43391},"Hangul Syllables":function(n){return n>=44032&&n<=55215},"Hangul Jamo Extended-B":function(n){return n>=55216&&n<=55295},"Private Use Area":function(n){return n>=57344&&n<=63743},"CJK Compatibility Ideographs":function(n){return n>=63744&&n<=64255},"Arabic Presentation Forms-A":function(n){return n>=64336&&n<=65023},"Vertical Forms":function(n){return n>=65040&&n<=65055},"CJK Compatibility Forms":function(n){return n>=65072&&n<=65103},"Small Form Variants":function(n){return n>=65104&&n<=65135},"Arabic Presentation Forms-B":function(n){return n>=65136&&n<=65279},"Halfwidth and Fullwidth Forms":function(n){return n>=65280&&n<=65519}};function ae(n){for(var o=0,u=n;o=65097&&n<=65103)||X["CJK Compatibility Ideographs"](n)||X["CJK Compatibility"](n)||X["CJK Radicals Supplement"](n)||X["CJK Strokes"](n)||X["CJK Symbols and Punctuation"](n)&&!(n>=12296&&n<=12305)&&!(n>=12308&&n<=12319)&&n!==12336||X["CJK Unified Ideographs Extension A"](n)||X["CJK Unified Ideographs"](n)||X["Enclosed CJK Letters and Months"](n)||X["Hangul Compatibility Jamo"](n)||X["Hangul Jamo Extended-A"](n)||X["Hangul Jamo Extended-B"](n)||X["Hangul Jamo"](n)||X["Hangul Syllables"](n)||X.Hiragana(n)||X["Ideographic Description Characters"](n)||X.Kanbun(n)||X["Kangxi Radicals"](n)||X["Katakana Phonetic Extensions"](n)||X.Katakana(n)&&n!==12540||X["Halfwidth and Fullwidth Forms"](n)&&n!==65288&&n!==65289&&n!==65293&&!(n>=65306&&n<=65310)&&n!==65339&&n!==65341&&n!==65343&&!(n>=65371&&n<=65503)&&n!==65507&&!(n>=65512&&n<=65519)||X["Small Form Variants"](n)&&!(n>=65112&&n<=65118)&&!(n>=65123&&n<=65126)||X["Unified Canadian Aboriginal Syllabics"](n)||X["Unified Canadian Aboriginal Syllabics Extended"](n)||X["Vertical Forms"](n)||X["Yijing Hexagram Symbols"](n)||X["Yi Syllables"](n)||X["Yi Radicals"](n))}function Je(n){return!!(X["Latin-1 Supplement"](n)&&(n===167||n===169||n===174||n===177||n===188||n===189||n===190||n===215||n===247)||X["General Punctuation"](n)&&(n===8214||n===8224||n===8225||n===8240||n===8241||n===8251||n===8252||n===8258||n===8263||n===8264||n===8265||n===8273)||X["Letterlike Symbols"](n)||X["Number Forms"](n)||X["Miscellaneous Technical"](n)&&(n>=8960&&n<=8967||n>=8972&&n<=8991||n>=8996&&n<=9e3||n===9003||n>=9085&&n<=9114||n>=9150&&n<=9165||n===9167||n>=9169&&n<=9179||n>=9186&&n<=9215)||X["Control Pictures"](n)&&n!==9251||X["Optical Character Recognition"](n)||X["Enclosed Alphanumerics"](n)||X["Geometric Shapes"](n)||X["Miscellaneous Symbols"](n)&&!(n>=9754&&n<=9759)||X["Miscellaneous Symbols and Arrows"](n)&&(n>=11026&&n<=11055||n>=11088&&n<=11097||n>=11192&&n<=11243)||X["CJK Symbols and Punctuation"](n)||X.Katakana(n)||X["Private Use Area"](n)||X["CJK Compatibility Forms"](n)||X["Small Form Variants"](n)||X["Halfwidth and Fullwidth Forms"](n)||n===8734||n===8756||n===8757||n>=9984&&n<=10087||n>=10102&&n<=10131||n===65532||n===65533)}function ot(n){return!(Pe(n)||Je(n))}function ze(n){return X.Arabic(n)||X["Arabic Supplement"](n)||X["Arabic Extended-A"](n)||X["Arabic Presentation Forms-A"](n)||X["Arabic Presentation Forms-B"](n)}function Ue(n){return n>=1424&&n<=2303||X["Arabic Presentation Forms-A"](n)||X["Arabic Presentation Forms-B"](n)}function je(n,o){return!(!o&&Ue(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||X.Khmer(n))}function ut(n){for(var o=0,u=n;o-1&&(or=We.error),Gt&&Gt(n)};function Dr(){Ir.fire(new ii("pluginStateChange",{pluginStatus:or,pluginURL:fr}))}var Ir=new pr,ea=function(){return or},Ur=function(n){return n({pluginStatus:or,pluginURL:fr}),Ir.on("pluginStateChange",n),n},Kr=function(n,o,u){if(u===void 0&&(u=!1),or===We.deferred||or===We.loading||or===We.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");fr=vt.resolveURL(n),or=We.deferred,Gt=o,Dr(),u||Ba()},Ba=function(){if(or!==We.deferred||!fr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");or=We.loading,Dr(),fr&&rt({url:fr},function(n){n?lr(n):(or=We.loaded,Dr())})},ri={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return or===We.loaded||ri.applyArabicShaping!=null},isLoading:function(){return or===We.loading},setState:function(o){or=o.pluginStatus,fr=o.pluginURL},isParsed:function(){return ri.applyArabicShaping!=null&&ri.processBidirectionalText!=null&&ri.processStyledBidirectionalText!=null},getPluginURL:function(){return fr}},$a=function(){!ri.isLoading()&&!ri.isLoaded()&&ea()==="deferred"&&Ba()},jt=function(o,u){this.zoom=o,u?(this.now=u.now,this.fadeDuration=u.fadeDuration,this.zoomHistory=u.zoomHistory,this.transition=u.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new $,this.transition={})};jt.prototype.isSupportedScript=function(o){return nt(o,ri.isLoaded())},jt.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},jt.prototype.getCrossfadeParameters=function(){var o=this.zoom,u=o-Math.floor(o),p=this.crossFadingFactor();return o>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:u+(1-u)*p}:{fromScale:.5,toScale:1,t:1-(1-p)*u}};var Jr=function(o,u){this.property=o,this.value=u,this.expression=jm(u===void 0?o.specification.default:u,o.specification)};Jr.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Jr.prototype.possiblyEvaluate=function(o,u,p){return this.property.possiblyEvaluate(this,o,u,p)};var oa=function(o){this.property=o,this.value=new Jr(o,void 0)};oa.prototype.transitioned=function(o,u){return new Ei(this.property,this.value,u,H({},o.transition,this.transition),o.now)},oa.prototype.untransitioned=function(){return new Ei(this.property,this.value,null,{},0)};var sa=function(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)};sa.prototype.getValue=function(o){return Te(this._values[o].value.value)},sa.prototype.setValue=function(o,u){this._values.hasOwnProperty(o)||(this._values[o]=new oa(this._values[o].property)),this._values[o].value=new Jr(this._values[o].property,u===null?void 0:Te(u))},sa.prototype.getTransition=function(o){return Te(this._values[o].transition)},sa.prototype.setTransition=function(o,u){this._values.hasOwnProperty(o)||(this._values[o]=new oa(this._values[o].property)),this._values[o].transition=Te(u)||void 0},sa.prototype.serialize=function(){for(var o={},u=0,p=Object.keys(this._values);uthis.end)return this.prior=null,A;if(this.value.isDataDriven())return this.prior=null,A;if(_k.zoomHistory.lastIntegerZoom?{from:p,to:_}:{from:A,to:_}},o.prototype.interpolate=function(p){return p},o}(Vr),Ti=function(o){this.specification=o};Ti.prototype.possiblyEvaluate=function(o,u,p,_){if(o.value!==void 0)if(o.expression.kind==="constant"){var A=o.expression.evaluate(u,null,{},p,_);return this._calculate(A,A,A,u)}else return this._calculate(o.expression.evaluate(new jt(Math.floor(u.zoom-1),u)),o.expression.evaluate(new jt(Math.floor(u.zoom),u)),o.expression.evaluate(new jt(Math.floor(u.zoom+1),u)),u)},Ti.prototype._calculate=function(o,u,p,_){var A=_.zoom;return A>_.zoomHistory.lastIntegerZoom?{from:o,to:u}:{from:p,to:u}},Ti.prototype.interpolate=function(o){return o};var lo=function(o){this.specification=o};lo.prototype.possiblyEvaluate=function(o,u,p,_){return!!o.expression.evaluate(u,null,{},p,_)},lo.prototype.interpolate=function(){return!1};var zn=function(o){this.properties=o,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var u in o){var p=o[u];p.specification.overridable&&this.overridableProperties.push(u);var _=this.defaultPropertyValues[u]=new Jr(p,void 0),A=this.defaultTransitionablePropertyValues[u]=new oa(p);this.defaultTransitioningPropertyValues[u]=A.untransitioned(),this.defaultPossiblyEvaluatedValues[u]=_.possiblyEvaluate({})}};y("DataDrivenProperty",Vr),y("DataConstantProperty",br),y("CrossFadedDataDrivenProperty",qi),y("CrossFadedProperty",Ti),y("ColorRampProperty",lo);var cn="-transition",pi=function(n){function o(u,p){if(n.call(this),this.id=u.id,this.type=u.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},u.type!=="custom"&&(u=u,this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,u.type!=="background"&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),p.layout&&(this._unevaluatedLayout=new $i(p.layout)),p.paint)){this._transitionablePaint=new sa(p.paint);for(var _ in u.paint)this.setPaintProperty(_,u.paint[_],{validate:!1});for(var A in u.layout)this.setLayoutProperty(A,u.layout[A],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xn(p.paint)}}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},o.prototype.getLayoutProperty=function(p){return p==="visibility"?this.visibility:this._unevaluatedLayout.getValue(p)},o.prototype.setLayoutProperty=function(p,_,A){if(A===void 0&&(A={}),_!=null){var k="layers."+this.id+".layout."+p;if(this._validate(Rl,k,p,_,A))return}if(p==="visibility"){this.visibility=_;return}this._unevaluatedLayout.setValue(p,_)},o.prototype.getPaintProperty=function(p){return ve(p,cn)?this._transitionablePaint.getTransition(p.slice(0,-cn.length)):this._transitionablePaint.getValue(p)},o.prototype.setPaintProperty=function(p,_,A){if(A===void 0&&(A={}),_!=null){var k="layers."+this.id+".paint."+p;if(this._validate(ih,k,p,_,A))return!1}if(ve(p,cn))return this._transitionablePaint.setTransition(p.slice(0,-cn.length),_||void 0),!1;var q=this._transitionablePaint._values[p],Y=q.property.specification["property-type"]==="cross-faded-data-driven",j=q.value.isDataDriven(),Q=q.value;this._transitionablePaint.setValue(p,_),this._handleSpecialPaintPropertyUpdate(p);var ie=this._transitionablePaint._values[p].value,ye=ie.isDataDriven();return ye||j||Y||this._handleOverridablePaintPropertyUpdate(p,Q,ie)},o.prototype._handleSpecialPaintPropertyUpdate=function(p){},o.prototype._handleOverridablePaintPropertyUpdate=function(p,_,A){return!1},o.prototype.isHidden=function(p){return this.minzoom&&p=this.maxzoom?!0:this.visibility==="none"},o.prototype.updateTransitions=function(p){this._transitioningPaint=this._transitionablePaint.transitioned(p,this._transitioningPaint)},o.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},o.prototype.recalculate=function(p,_){p.getCrossfadeParameters&&(this._crossfadeParameters=p.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(p,void 0,_)),this.paint=this._transitioningPaint.possiblyEvaluate(p,void 0,_)},o.prototype.serialize=function(){var p={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&&(p.layout=p.layout||{},p.layout.visibility=this.visibility),Se(p,function(_,A){return _!==void 0&&!(A==="layout"&&!Object.keys(_).length)&&!(A==="paint"&&!Object.keys(_).length)})},o.prototype._validate=function(p,_,A,k,q){return q===void 0&&(q={}),q&&q.validate===!1?!1:rc(this,p.call(ti,{key:_,layerType:this.type,objectKey:A,value:k,styleSpec:Xt,style:{glyphs:!0,sprite:!0}}))},o.prototype.is3D=function(){return!1},o.prototype.isTileClipped=function(){return!1},o.prototype.hasOffscreenPass=function(){return!1},o.prototype.resize=function(){},o.prototype.isStateDependent=function(){for(var p in this.paint._values){var _=this.paint.get(p);if(!(!(_ instanceof xi)||!sf(_.property.specification))&&(_.value.kind==="source"||_.value.kind==="composite")&&_.value.isStateDependent)return!0}return!1},o}(pr),jo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},uo=function(o,u){this._structArray=o,this._pos1=u*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ci=128,gf=5,Aa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Aa.serialize=function(o,u){return o._trim(),u&&(o.isTransferred=!0,u.push(o.arrayBuffer)),{length:o.length,arrayBuffer:o.arrayBuffer}},Aa.deserialize=function(o){var u=Object.create(this.prototype);return u.arrayBuffer=o.arrayBuffer,u.length=o.length,u.capacity=o.arrayBuffer.byteLength/u.bytesPerElement,u._refreshViews(),u},Aa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Aa.prototype.clear=function(){this.length=0},Aa.prototype.resize=function(o){this.reserve(o),this.length=o},Aa.prototype.reserve=function(o){if(o>this.capacity){this.capacity=Math.max(o,Math.floor(this.capacity*gf),ci),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var u=this.uint8;this._refreshViews(),u&&this.uint8.set(u)}},Aa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ui(n,o){o===void 0&&(o=1);var u=0,p=0,_=n.map(function(k){var q=Nl(k.type),Y=u=Hv(u,Math.max(o,q)),j=k.components||1;return p=Math.max(p,q),u+=q*j,{name:k.name,type:k.type,components:j,offset:Y}}),A=Hv(u,Math.max(p,o));return{members:_,size:A,alignment:o}}function Nl(n){return jo[n].BYTES_PER_ELEMENT}function Hv(n,o){return Math.ceil(n/o)*o}var ac=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_){var A=this.length;return this.resize(A+1),this.emplace(A,p,_)},o.prototype.emplace=function(p,_,A){var k=p*2;return this.int16[k+0]=_,this.int16[k+1]=A,p},o}(Aa);ac.prototype.bytesPerElement=4,y("StructArrayLayout2i4",ac);var ey=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k){var q=this.length;return this.resize(q+1),this.emplace(q,p,_,A,k)},o.prototype.emplace=function(p,_,A,k,q){var Y=p*4;return this.int16[Y+0]=_,this.int16[Y+1]=A,this.int16[Y+2]=k,this.int16[Y+3]=q,p},o}(Aa);ey.prototype.bytesPerElement=8,y("StructArrayLayout4i8",ey);var _f=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y){var j=this.length;return this.resize(j+1),this.emplace(j,p,_,A,k,q,Y)},o.prototype.emplace=function(p,_,A,k,q,Y,j){var Q=p*6;return this.int16[Q+0]=_,this.int16[Q+1]=A,this.int16[Q+2]=k,this.int16[Q+3]=q,this.int16[Q+4]=Y,this.int16[Q+5]=j,p},o}(Aa);_f.prototype.bytesPerElement=12,y("StructArrayLayout2i4i12",_f);var oh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y){var j=this.length;return this.resize(j+1),this.emplace(j,p,_,A,k,q,Y)},o.prototype.emplace=function(p,_,A,k,q,Y,j){var Q=p*4,ie=p*8;return this.int16[Q+0]=_,this.int16[Q+1]=A,this.uint8[ie+4]=k,this.uint8[ie+5]=q,this.uint8[ie+6]=Y,this.uint8[ie+7]=j,p},o}(Aa);oh.prototype.bytesPerElement=8,y("StructArrayLayout2i4ub8",oh);var sh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_){var A=this.length;return this.resize(A+1),this.emplace(A,p,_)},o.prototype.emplace=function(p,_,A){var k=p*2;return this.float32[k+0]=_,this.float32[k+1]=A,p},o}(Aa);sh.prototype.bytesPerElement=8,y("StructArrayLayout2f8",sh);var Lo=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye){var he=this.length;return this.resize(he+1),this.emplace(he,p,_,A,k,q,Y,j,Q,ie,ye)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he){var ke=p*10;return this.uint16[ke+0]=_,this.uint16[ke+1]=A,this.uint16[ke+2]=k,this.uint16[ke+3]=q,this.uint16[ke+4]=Y,this.uint16[ke+5]=j,this.uint16[ke+6]=Q,this.uint16[ke+7]=ie,this.uint16[ke+8]=ye,this.uint16[ke+9]=he,p},o}(Aa);Lo.prototype.bytesPerElement=20,y("StructArrayLayout10ui20",Lo);var xf=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye,he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,p,_,A,k,q,Y,j,Q,ie,ye,he,ke)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe){var st=p*12;return this.int16[st+0]=_,this.int16[st+1]=A,this.int16[st+2]=k,this.int16[st+3]=q,this.uint16[st+4]=Y,this.uint16[st+5]=j,this.uint16[st+6]=Q,this.uint16[st+7]=ie,this.int16[st+8]=ye,this.int16[st+9]=he,this.int16[st+10]=ke,this.int16[st+11]=qe,p},o}(Aa);xf.prototype.bytesPerElement=24,y("StructArrayLayout4i4ui4i24",xf);var ty=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*3;return this.float32[q+0]=_,this.float32[q+1]=A,this.float32[q+2]=k,p},o}(Aa);ty.prototype.bytesPerElement=12,y("StructArrayLayout3f12",ty);var ry=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p){var _=this.length;return this.resize(_+1),this.emplace(_,p)},o.prototype.emplace=function(p,_){var A=p*1;return this.uint32[A+0]=_,p},o}(Aa);ry.prototype.bytesPerElement=4,y("StructArrayLayout1ul4",ry);var Gv=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.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)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie){var ye=this.length;return this.resize(ye+1),this.emplace(ye,p,_,A,k,q,Y,j,Q,ie)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye){var he=p*10,ke=p*5;return this.int16[he+0]=_,this.int16[he+1]=A,this.int16[he+2]=k,this.int16[he+3]=q,this.int16[he+4]=Y,this.int16[he+5]=j,this.uint32[ke+3]=Q,this.uint16[he+8]=ie,this.uint16[he+9]=ye,p},o}(Aa);Gv.prototype.bytesPerElement=20,y("StructArrayLayout6i1ul2ui20",Gv);var Rp=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q,Y){var j=this.length;return this.resize(j+1),this.emplace(j,p,_,A,k,q,Y)},o.prototype.emplace=function(p,_,A,k,q,Y,j){var Q=p*6;return this.int16[Q+0]=_,this.int16[Q+1]=A,this.int16[Q+2]=k,this.int16[Q+3]=q,this.int16[Q+4]=Y,this.int16[Q+5]=j,p},o}(Aa);Rp.prototype.bytesPerElement=12,y("StructArrayLayout2i2i2i12",Rp);var Mu=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k,q){var Y=this.length;return this.resize(Y+1),this.emplace(Y,p,_,A,k,q)},o.prototype.emplace=function(p,_,A,k,q,Y){var j=p*4,Q=p*8;return this.float32[j+0]=_,this.float32[j+1]=A,this.float32[j+2]=k,this.int16[Q+6]=q,this.int16[Q+7]=Y,p},o}(Aa);Mu.prototype.bytesPerElement=16,y("StructArrayLayout2f1f2i16",Mu);var Jo=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k){var q=this.length;return this.resize(q+1),this.emplace(q,p,_,A,k)},o.prototype.emplace=function(p,_,A,k,q){var Y=p*12,j=p*3;return this.uint8[Y+0]=_,this.uint8[Y+1]=A,this.float32[j+1]=k,this.float32[j+2]=q,p},o}(Aa);Jo.prototype.bytesPerElement=12,y("StructArrayLayout2ub2f12",Jo);var Su=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*3;return this.uint16[q+0]=_,this.uint16[q+1]=A,this.uint16[q+2]=k,p},o}(Aa);Su.prototype.bytesPerElement=6,y("StructArrayLayout3ui6",Su);var Zv=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.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)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe,st,Qe,Lt,gt){var St=this.length;return this.resize(St+1),this.emplace(St,p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe,st,Qe,Lt,gt)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe,st,Qe,Lt,gt,St){var It=p*24,Jt=p*12,hr=p*48;return this.int16[It+0]=_,this.int16[It+1]=A,this.uint16[It+2]=k,this.uint16[It+3]=q,this.uint32[Jt+2]=Y,this.uint32[Jt+3]=j,this.uint32[Jt+4]=Q,this.uint16[It+10]=ie,this.uint16[It+11]=ye,this.uint16[It+12]=he,this.float32[Jt+7]=ke,this.float32[Jt+8]=qe,this.uint8[hr+36]=st,this.uint8[hr+37]=Qe,this.uint8[hr+38]=Lt,this.uint32[Jt+10]=gt,this.int16[It+22]=St,p},o}(Aa);Zv.prototype.bytesPerElement=48,y("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zv);var Fp=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.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)},o.prototype.emplaceBack=function(p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe,st,Qe,Lt,gt,St,It,Jt,hr,ur,Rr,kr,zr,Qr,Fr,Nr){var ma=this.length;return this.resize(ma+1),this.emplace(ma,p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe,st,Qe,Lt,gt,St,It,Jt,hr,ur,Rr,kr,zr,Qr,Fr,Nr)},o.prototype.emplace=function(p,_,A,k,q,Y,j,Q,ie,ye,he,ke,qe,st,Qe,Lt,gt,St,It,Jt,hr,ur,Rr,kr,zr,Qr,Fr,Nr,ma){var jr=p*34,Ya=p*17;return this.int16[jr+0]=_,this.int16[jr+1]=A,this.int16[jr+2]=k,this.int16[jr+3]=q,this.int16[jr+4]=Y,this.int16[jr+5]=j,this.int16[jr+6]=Q,this.int16[jr+7]=ie,this.uint16[jr+8]=ye,this.uint16[jr+9]=he,this.uint16[jr+10]=ke,this.uint16[jr+11]=qe,this.uint16[jr+12]=st,this.uint16[jr+13]=Qe,this.uint16[jr+14]=Lt,this.uint16[jr+15]=gt,this.uint16[jr+16]=St,this.uint16[jr+17]=It,this.uint16[jr+18]=Jt,this.uint16[jr+19]=hr,this.uint16[jr+20]=ur,this.uint16[jr+21]=Rr,this.uint16[jr+22]=kr,this.uint32[Ya+12]=zr,this.float32[Ya+13]=Qr,this.float32[Ya+14]=Fr,this.float32[Ya+15]=Nr,this.float32[Ya+16]=ma,p},o}(Aa);Fp.prototype.bytesPerElement=68,y("StructArrayLayout8i15ui1ul4f68",Fp);var lh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p){var _=this.length;return this.resize(_+1),this.emplace(_,p)},o.prototype.emplace=function(p,_){var A=p*1;return this.float32[A+0]=_,p},o}(Aa);lh.prototype.bytesPerElement=4,y("StructArrayLayout1f4",lh);var ay=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*3;return this.int16[q+0]=_,this.int16[q+1]=A,this.int16[q+2]=k,p},o}(Aa);ay.prototype.bytesPerElement=6,y("StructArrayLayout3i6",ay);var bf=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A){var k=this.length;return this.resize(k+1),this.emplace(k,p,_,A)},o.prototype.emplace=function(p,_,A,k){var q=p*2,Y=p*4;return this.uint32[q+0]=_,this.uint16[Y+2]=A,this.uint16[Y+3]=k,p},o}(Aa);bf.prototype.bytesPerElement=8,y("StructArrayLayout1ul2ui8",bf);var Yv=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_){var A=this.length;return this.resize(A+1),this.emplace(A,p,_)},o.prototype.emplace=function(p,_,A){var k=p*2;return this.uint16[k+0]=_,this.uint16[k+1]=A,p},o}(Aa);Yv.prototype.bytesPerElement=4,y("StructArrayLayout2ui4",Yv);var uh=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p){var _=this.length;return this.resize(_+1),this.emplace(_,p)},o.prototype.emplace=function(p,_){var A=p*1;return this.uint16[A+0]=_,p},o}(Aa);uh.prototype.bytesPerElement=2,y("StructArrayLayout1ui2",uh);var ic=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},o.prototype.emplaceBack=function(p,_,A,k){var q=this.length;return this.resize(q+1),this.emplace(q,p,_,A,k)},o.prototype.emplace=function(p,_,A,k,q){var Y=p*4;return this.float32[Y+0]=_,this.float32[Y+1]=A,this.float32[Y+2]=k,this.float32[Y+3]=q,p},o}(Aa);ic.prototype.bytesPerElement=16,y("StructArrayLayout4f16",ic);var d1=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={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 u.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},u.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},u.x1.get=function(){return this._structArray.int16[this._pos2+2]},u.y1.get=function(){return this._structArray.int16[this._pos2+3]},u.x2.get=function(){return this._structArray.int16[this._pos2+4]},u.y2.get=function(){return this._structArray.int16[this._pos2+5]},u.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},u.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},u.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},u.anchorPoint.get=function(){return new v(this.anchorPointX,this.anchorPointY)},Object.defineProperties(o.prototype,u),o}(uo);d1.prototype.size=20;var iy=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new d1(this,p)},o}(Gv);y("CollisionBoxArray",iy);var nc=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={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 u.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},u.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},u.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},u.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},u.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},u.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},u.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},u.segment.get=function(){return this._structArray.uint16[this._pos2+10]},u.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},u.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},u.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},u.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},u.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},u.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},u.placedOrientation.set=function(p){this._structArray.uint8[this._pos1+37]=p},u.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},u.hidden.set=function(p){this._structArray.uint8[this._pos1+38]=p},u.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},u.crossTileID.set=function(p){this._structArray.uint32[this._pos4+10]=p},u.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(o.prototype,u),o}(uo);nc.prototype.size=48;var ny=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new nc(this,p)},o}(Zv);y("PlacedSymbolArray",ny);var fh=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={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 u.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},u.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},u.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},u.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},u.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},u.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},u.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},u.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},u.key.get=function(){return this._structArray.uint16[this._pos2+8]},u.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},u.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},u.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},u.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},u.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},u.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},u.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},u.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},u.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},u.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},u.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},u.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},u.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},u.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},u.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},u.crossTileID.set=function(p){this._structArray.uint32[this._pos4+12]=p},u.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},u.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},u.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},u.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(o.prototype,u),o}(uo);fh.prototype.size=68;var p1=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new fh(this,p)},o}(Fp);y("SymbolInstanceArray",p1);var m1=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.getoffsetX=function(p){return this.float32[p*1+0]},o}(lh);y("GlyphOffsetArray",m1);var $s=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.getx=function(p){return this.int16[p*3+0]},o.prototype.gety=function(p){return this.int16[p*3+1]},o.prototype.gettileUnitDistanceFromAnchor=function(p){return this.int16[p*3+2]},o}(ay);y("SymbolLineVertexArray",$s);var y1=function(n){function o(){n.apply(this,arguments)}n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o;var u={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return u.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},u.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},u.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(o.prototype,u),o}(uo);y1.prototype.size=8;var g1=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.get=function(p){return new y1(this,p)},o}(bf);y("FeatureIndexArray",g1);var o3=ui([{name:"a_pos",components:2,type:"Int16"}],4),_1=o3.members,bn=function(o){o===void 0&&(o=[]),this.segments=o};bn.prototype.prepareSegment=function(o,u,p,_){var A=this.segments[this.segments.length-1];return o>bn.MAX_VERTEX_ARRAY_LENGTH&&Me("Max vertices per segment is "+bn.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+o),(!A||A.vertexLength+o>bn.MAX_VERTEX_ARRAY_LENGTH||A.sortKey!==_)&&(A={vertexOffset:u.length,primitiveOffset:p.length,vertexLength:0,primitiveLength:0},_!==void 0&&(A.sortKey=_),this.segments.push(A)),A},bn.prototype.get=function(){return this.segments},bn.prototype.destroy=function(){for(var o=0,u=this.segments;o>>16)*Y&65535)<<16)&4294967295,Q=Q<<15|Q>>>17,Q=(Q&65535)*j+(((Q>>>16)*j&65535)<<16)&4294967295,k^=Q,k=k<<13|k>>>19,q=(k&65535)*5+(((k>>>16)*5&65535)<<16)&4294967295,k=(q&65535)+27492+(((q>>>16)+58964&65535)<<16);switch(Q=0,_){case 3:Q^=(u.charCodeAt(ie+2)&255)<<16;case 2:Q^=(u.charCodeAt(ie+1)&255)<<8;case 1:Q^=u.charCodeAt(ie)&255,Q=(Q&65535)*Y+(((Q>>>16)*Y&65535)<<16)&4294967295,Q=Q<<15|Q>>>17,Q=(Q&65535)*j+(((Q>>>16)*j&65535)<<16)&4294967295,k^=Q}return k^=u.length,k^=k>>>16,k=(k&65535)*2246822507+(((k>>>16)*2246822507&65535)<<16)&4294967295,k^=k>>>13,k=(k&65535)*3266489909+(((k>>>16)*3266489909&65535)<<16)&4294967295,k^=k>>>16,k>>>0}n.exports=o}),d=s(function(n){function o(u,p){for(var _=u.length,A=p^_,k=0,q;_>=4;)q=u.charCodeAt(k)&255|(u.charCodeAt(++k)&255)<<8|(u.charCodeAt(++k)&255)<<16|(u.charCodeAt(++k)&255)<<24,q=(q&65535)*1540483477+(((q>>>16)*1540483477&65535)<<16),q^=q>>>24,q=(q&65535)*1540483477+(((q>>>16)*1540483477&65535)<<16),A=(A&65535)*1540483477+(((A>>>16)*1540483477&65535)<<16)^q,_-=4,++k;switch(_){case 3:A^=(u.charCodeAt(k+2)&255)<<16;case 2:A^=(u.charCodeAt(k+1)&255)<<8;case 1:A^=u.charCodeAt(k)&255,A=(A&65535)*1540483477+(((A>>>16)*1540483477&65535)<<16)}return A^=A>>>13,A=(A&65535)*1540483477+(((A>>>16)*1540483477&65535)<<16),A^=A>>>15,A>>>0}n.exports=o}),w=x,L=x,R=d;w.murmur3=L,w.murmur2=R;var G=function(){this.ids=[],this.positions=[],this.indexed=!1};G.prototype.add=function(o,u,p,_){this.ids.push(te(o)),this.positions.push(u,p,_)},G.prototype.getPositions=function(o){for(var u=te(o),p=0,_=this.ids.length-1;p<_;){var A=p+_>>1;this.ids[A]>=u?_=A:p=A+1}for(var k=[];this.ids[p]===u;){var q=this.positions[3*p],Y=this.positions[3*p+1],j=this.positions[3*p+2];k.push({index:q,start:Y,end:j}),p++}return k},G.serialize=function(o,u){var p=new Float64Array(o.ids),_=new Uint32Array(o.positions);return ue(p,_,0,p.length-1),u&&u.push(p.buffer,_.buffer),{ids:p,positions:_}},G.deserialize=function(o){var u=new G;return u.ids=o.ids,u.positions=o.positions,u.indexed=!0,u};var K=Math.pow(2,53)-1;function te(n){var o=+n;return!isNaN(o)&&o<=K?o:w(String(n))}function ue(n,o,u,p){for(;u>1],A=u-1,k=p+1;;){do A++;while(n[A]<_);do k--;while(n[k]>_);if(A>=k)break;we(n,A,k),we(o,3*A,3*k),we(o,3*A+1,3*k+1),we(o,3*A+2,3*k+2)}k-uk.x+1||Yk.y+1)&&Me("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return u}function Ai(n,o){return{type:n.type,id:n.id,properties:n.properties,geometry:o?Va(n):[]}}function Pa(n,o,u,p,_){n.emplaceBack(o*2+(p+1)/2,u*2+(_+1)/2)}var mi=function(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(function(u){return u.id}),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new ac,this.indexArray=new Su,this.segments=new bn,this.programConfigurations=new Sr(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(function(u){return u.isStateDependent()}).map(function(u){return u.id})};mi.prototype.populate=function(o,u,p){var _=this.layers[0],A=[],k=null;_.type==="circle"&&(k=_.layout.get("circle-sort-key"));for(var q=0,Y=o;q=qr||ye<0||ye>=qr)){var he=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),ke=he.vertexLength;Pa(this.layoutVertexArray,ie,ye,-1,-1),Pa(this.layoutVertexArray,ie,ye,1,-1),Pa(this.layoutVertexArray,ie,ye,1,1),Pa(this.layoutVertexArray,ie,ye,-1,1),this.indexArray.emplaceBack(ke,ke+1,ke+2),this.indexArray.emplaceBack(ke,ke+3,ke+2),he.vertexLength+=4,he.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,{},_)},y("CircleBucket",mi,{omit:["layers"]});function na(n,o){for(var u=0;u=3){for(var A=0;A<_.length;A++)if(Po(n,_[A]))return!0}if(Ps(n,_,u))return!0}return!1}function Ps(n,o,u){if(n.length>1){if(Ds(n,o))return!0;for(var p=0;p1?n.distSqr(u):n.distSqr(u.sub(o)._mult(_)._add(o))}function Ol(n,o){for(var u=!1,p,_,A,k=0;ko.y!=A.y>o.y&&o.x<(A.x-_.x)*(o.y-_.y)/(A.y-_.y)+_.x&&(u=!u)}return u}function Po(n,o){for(var u=!1,p=0,_=n.length-1;po.y!=k.y>o.y&&o.x<(k.x-A.x)*(o.y-A.y)/(k.y-A.y)+A.x&&(u=!u)}return u}function Ul(n,o,u,p,_){for(var A=0,k=n;A=q.x&&_>=q.y)return!0}var Y=[new v(o,u),new v(o,_),new v(p,_),new v(p,u)];if(n.length>2)for(var j=0,Q=Y;j_.x&&o.x>_.x||n.y_.y&&o.y>_.y)return!1;var A=Le(n,o,u[0]);return A!==Le(n,o,u[1])||A!==Le(n,o,u[2])||A!==Le(n,o,u[3])}function Do(n,o,u){var p=o.paint.get(n).value;return p.kind==="constant"?p.value:u.programConfigurations.get(o.id).getMaxValue(n)}function tl(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function ku(n,o,u,p,_){if(!o[0]&&!o[1])return n;var A=v.convert(o)._mult(_);u==="viewport"&&A._rotate(-p);for(var k=[],q=0;q0&&(A=1/Math.sqrt(A)),n[0]=o[0]*A,n[1]=o[1]*A,n[2]=o[2]*A,n}function eY(n,o){return n[0]*o[0]+n[1]*o[1]+n[2]*o[2]}function tY(n,o,u){var p=o[0],_=o[1],A=o[2],k=u[0],q=u[1],Y=u[2];return n[0]=_*Y-A*q,n[1]=A*k-p*Y,n[2]=p*q-_*k,n}function rY(n,o,u){var p=o[0],_=o[1],A=o[2];return n[0]=p*u[0]+_*u[3]+A*u[6],n[1]=p*u[1]+_*u[4]+A*u[7],n[2]=p*u[2]+_*u[5]+A*u[8],n}var aY=f3,ume=function(){var n=Xv();return function(o,u,p,_,A,k){var q,Y;for(u||(u=3),p||(p=0),_?Y=Math.min(_*u+p,o.length):Y=o.length,q=p;qn.width||_.height>n.height||u.x>n.width-_.width||u.y>n.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>o.width||_.height>o.height||p.x>o.width-_.width||p.y>o.height-_.height)throw new RangeError("out of range destination coordinates for image copy");for(var k=n.data,q=o.data,Y=0;Y<_.height;Y++)for(var j=((u.y+Y)*n.width+u.x)*A,Q=((p.y+Y)*o.width+p.x)*A,ie=0;ie<_.width*A;ie++)q[Q+ie]=k[j+ie];return o}var jv=function(o,u){h3(this,o,1,u)};jv.prototype.resize=function(o){uM(this,o,1)},jv.prototype.clone=function(){return new jv({width:this.width,height:this.height},new Uint8Array(this.data))},jv.copy=function(o,u,p,_,A){v3(o,u,p,_,A,1)};var es=function(o,u){h3(this,o,4,u)};es.prototype.resize=function(o){uM(this,o,4)},es.prototype.replace=function(o,u){u?this.data.set(o):o instanceof Uint8ClampedArray?this.data=new Uint8Array(o.buffer):this.data=o},es.prototype.clone=function(){return new es({width:this.width,height:this.height},new Uint8Array(this.data))},es.copy=function(o,u,p,_,A){v3(o,u,p,_,A,4)},y("AlphaImage",jv),y("RGBAImage",es);var hY=new zn({"heatmap-radius":new Vr(Xt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Vr(Xt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new br(Xt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new lo(Xt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new br(Xt.paint_heatmap["heatmap-opacity"])}),vY={paint:hY};function fM(n){var o={},u=n.resolution||256,p=n.clips?n.clips.length:1,_=n.image||new es({width:u,height:p}),A=function(Lt,gt,St){o[n.evaluationKey]=St;var It=n.expression.evaluate(o);_.data[Lt+gt+0]=Math.floor(It.r*255/It.a),_.data[Lt+gt+1]=Math.floor(It.g*255/It.a),_.data[Lt+gt+2]=Math.floor(It.b*255/It.a),_.data[Lt+gt+3]=Math.floor(It.a*255)};if(n.clips)for(var j=0,Q=0;j80*u){q=j=n[0],Y=Q=n[1];for(var ke=u;ke<_;ke+=u)ie=n[ke],ye=n[ke+1],iej&&(j=ie),ye>Q&&(Q=ye);he=Math.max(j-q,Q-Y),he=he!==0?1/he:0}return ly(A,k,u,q,Y,he),k}function cM(n,o,u,p,_){var A,k;if(_===y3(n,o,u,p)>0)for(A=o;A=o;A-=p)k=dM(A,n[A],n[A+1],k);return k&&w1(k,k.next)&&(fy(k),k=k.next),k}function ph(n,o){if(!n)return n;o||(o=n);var u=n,p;do if(p=!1,!u.steiner&&(w1(u,u.next)||wn(u.prev,u,u.next)===0)){if(fy(u),u=o=u.prev,u===u.next)break;p=!0}else u=u.next;while(p||u!==o);return o}function ly(n,o,u,p,_,A,k){if(n){!k&&A&&LY(n,p,_,A);for(var q=n,Y,j;n.prev!==n.next;){if(Y=n.prev,j=n.next,A?wY(n,p,_,A):bY(n)){o.push(Y.i/u),o.push(n.i/u),o.push(j.i/u),fy(n),n=j.next,q=j.next;continue}if(n=j,n===q){k?k===1?(n=TY(ph(n),o,u),ly(n,o,u,p,_,A,2)):k===2&&AY(n,o,u,p,_,A):ly(ph(n),o,u,p,_,A,1);break}}}}function bY(n){var o=n.prev,u=n,p=n.next;if(wn(o,u,p)>=0)return!1;for(var _=n.next.next;_!==n.prev;){if(Gp(o.x,o.y,u.x,u.y,p.x,p.y,_.x,_.y)&&wn(_.prev,_,_.next)>=0)return!1;_=_.next}return!0}function wY(n,o,u,p){var _=n.prev,A=n,k=n.next;if(wn(_,A,k)>=0)return!1;for(var q=_.xA.x?_.x>k.x?_.x:k.x:A.x>k.x?A.x:k.x,Q=_.y>A.y?_.y>k.y?_.y:k.y:A.y>k.y?A.y:k.y,ie=p3(q,Y,o,u,p),ye=p3(j,Q,o,u,p),he=n.prevZ,ke=n.nextZ;he&&he.z>=ie&&ke&&ke.z<=ye;){if(he!==n.prev&&he!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,he.x,he.y)&&wn(he.prev,he,he.next)>=0||(he=he.prevZ,ke!==n.prev&&ke!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,ke.x,ke.y)&&wn(ke.prev,ke,ke.next)>=0))return!1;ke=ke.nextZ}for(;he&&he.z>=ie;){if(he!==n.prev&&he!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,he.x,he.y)&&wn(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;ke&&ke.z<=ye;){if(ke!==n.prev&&ke!==n.next&&Gp(_.x,_.y,A.x,A.y,k.x,k.y,ke.x,ke.y)&&wn(ke.prev,ke,ke.next)>=0)return!1;ke=ke.nextZ}return!0}function TY(n,o,u){var p=n;do{var _=p.prev,A=p.next.next;!w1(_,A)&&hM(_,p,p.next,A)&&uy(_,A)&&uy(A,_)&&(o.push(_.i/u),o.push(p.i/u),o.push(A.i/u),fy(p),fy(p.next),p=n=A),p=p.next}while(p!==n);return ph(p)}function AY(n,o,u,p,_,A){var k=n;do{for(var q=k.next.next;q!==k.prev;){if(k.i!==q.i&&zY(k,q)){var Y=vM(k,q);k=ph(k,k.next),Y=ph(Y,Y.next),ly(k,o,u,p,_,A),ly(Y,o,u,p,_,A);return}q=q.next}k=k.next}while(k!==n)}function MY(n,o,u,p){var _=[],A,k,q,Y,j;for(A=0,k=o.length;A=u.next.y&&u.next.y!==u.y){var q=u.x+(_-u.y)*(u.next.x-u.x)/(u.next.y-u.y);if(q<=p&&q>A){if(A=q,q===p){if(_===u.y)return u;if(_===u.next.y)return u.next}k=u.x=u.x&&u.x>=j&&p!==u.x&&Gp(_k.x||u.x===k.x&&EY(k,u)))&&(k=u,ie=ye)),u=u.next;while(u!==Y);return k}function EY(n,o){return wn(n.prev,n,o.prev)<0&&wn(o.next,n,n.next)<0}function LY(n,o,u,p){var _=n;do _.z===null&&(_.z=p3(_.x,_.y,o,u,p)),_.prevZ=_.prev,_.nextZ=_.next,_=_.next;while(_!==n);_.prevZ.nextZ=null,_.prevZ=null,PY(_)}function PY(n){var o,u,p,_,A,k,q,Y,j=1;do{for(u=n,n=null,A=null,k=0;u;){for(k++,p=u,q=0,o=0;o0||Y>0&&p;)q!==0&&(Y===0||!p||u.z<=p.z)?(_=u,u=u.nextZ,q--):(_=p,p=p.nextZ,Y--),A?A.nextZ=_:n=_,_.prevZ=A,A=_;u=p}A.nextZ=null,j*=2}while(k>1);return n}function p3(n,o,u,p,_){return n=32767*(n-u)*_,o=32767*(o-p)*_,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1}function DY(n){var o=n,u=n;do(o.x=0&&(n-k)*(p-q)-(u-k)*(o-q)>=0&&(u-k)*(A-q)-(_-k)*(p-q)>=0}function zY(n,o){return n.next.i!==o.i&&n.prev.i!==o.i&&!IY(n,o)&&(uy(n,o)&&uy(o,n)&&RY(n,o)&&(wn(n.prev,n,o.prev)||wn(n,o.prev,o))||w1(n,o)&&wn(n.prev,n,n.next)>0&&wn(o.prev,o,o.next)>0)}function wn(n,o,u){return(o.y-n.y)*(u.x-o.x)-(o.x-n.x)*(u.y-o.y)}function w1(n,o){return n.x===o.x&&n.y===o.y}function hM(n,o,u,p){var _=A1(wn(n,o,u)),A=A1(wn(n,o,p)),k=A1(wn(u,p,n)),q=A1(wn(u,p,o));return!!(_!==A&&k!==q||_===0&&T1(n,u,o)||A===0&&T1(n,p,o)||k===0&&T1(u,n,p)||q===0&&T1(u,o,p))}function T1(n,o,u){return o.x<=Math.max(n.x,u.x)&&o.x>=Math.min(n.x,u.x)&&o.y<=Math.max(n.y,u.y)&&o.y>=Math.min(n.y,u.y)}function A1(n){return n>0?1:n<0?-1:0}function IY(n,o){var u=n;do{if(u.i!==n.i&&u.next.i!==n.i&&u.i!==o.i&&u.next.i!==o.i&&hM(u,u.next,n,o))return!0;u=u.next}while(u!==n);return!1}function uy(n,o){return wn(n.prev,n,n.next)<0?wn(n,o,n.next)>=0&&wn(n,n.prev,o)>=0:wn(n,o,n.prev)<0||wn(n,n.next,o)<0}function RY(n,o){var u=n,p=!1,_=(n.x+o.x)/2,A=(n.y+o.y)/2;do u.y>A!=u.next.y>A&&u.next.y!==u.y&&_<(u.next.x-u.x)*(A-u.y)/(u.next.y-u.y)+u.x&&(p=!p),u=u.next;while(u!==n);return p}function vM(n,o){var u=new m3(n.i,n.x,n.y),p=new m3(o.i,o.x,o.y),_=n.next,A=o.prev;return n.next=o,o.prev=n,u.next=_,_.prev=u,p.next=u,u.prev=p,A.next=p,p.prev=A,p}function dM(n,o,u,p){var _=new m3(n,o,u);return p?(_.next=p.next,_.prev=p,p.next.prev=_,p.next=_):(_.prev=_,_.next=_),_}function fy(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function m3(n,o,u){this.i=n,this.x=o,this.y=u,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}b1.deviation=function(n,o,u,p){var _=o&&o.length,A=_?o[0]*u:n.length,k=Math.abs(y3(n,0,A,u));if(_)for(var q=0,Y=o.length;q0&&(p+=n[_-1].length,u.holes.push(p))}return u},d3.default=xY;function FY(n,o,u,p,_){pM(n,o,u||0,p||n.length-1,_||qY)}function pM(n,o,u,p,_){for(;p>u;){if(p-u>600){var A=p-u+1,k=o-u+1,q=Math.log(A),Y=.5*Math.exp(2*q/3),j=.5*Math.sqrt(q*Y*(A-Y)/A)*(k-A/2<0?-1:1),Q=Math.max(u,Math.floor(o-k*Y/A+j)),ie=Math.min(p,Math.floor(o+(A-k)*Y/A+j));pM(n,o,Q,ie,_)}var ye=n[o],he=u,ke=p;for(cy(n,u,o),_(n[p],ye)>0&&cy(n,u,p);he0;)ke--}_(n[u],ye)===0?cy(n,u,ke):(ke++,cy(n,ke,p)),ke<=o&&(u=ke+1),o<=ke&&(p=ke-1)}}function cy(n,o,u){var p=n[o];n[o]=n[u],n[u]=p}function qY(n,o){return no?1:0}function g3(n,o){var u=n.length;if(u<=1)return[n];for(var p=[],_,A,k=0;k1)for(var Y=0;Y>3}if(p--,u===1||u===2)_+=n.readSVarint(),A+=n.readSVarint(),u===1&&(q&&k.push(q),q=[]),q.push(new v(_,A));else if(u===7)q&&q.push(q[0].clone());else throw new Error("unknown command "+u)}return q&&k.push(q),k},Zp.prototype.bbox=function(){var n=this._pbf;n.pos=this._geometry;for(var o=n.readVarint()+n.pos,u=1,p=0,_=0,A=0,k=1/0,q=-1/0,Y=1/0,j=-1/0;n.pos>3}if(p--,u===1||u===2)_+=n.readSVarint(),A+=n.readSVarint(),_q&&(q=_),Aj&&(j=A);else if(u!==7)throw new Error("unknown command "+u)}return[k,Y,q,j]},Zp.prototype.toGeoJSON=function(n,o,u){var p=this.extent*Math.pow(2,u),_=this.extent*n,A=this.extent*o,k=this.loadGeometry(),q=Zp.types[this.type],Y,j;function Q(he){for(var ke=0;ke>3;o=p===1?n.readString():p===2?n.readFloat():p===3?n.readDouble():p===4?n.readVarint64():p===5?n.readVarint():p===6?n.readSVarint():p===7?n.readBoolean():null}return o}gM.prototype.feature=function(n){if(n<0||n>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[n];var o=this._pbf.readVarint()+this._pbf.pos;return new mM(this._pbf,o,this.extent,this._keys,this._values)};var QY=$Y;function $Y(n,o){this.layers=n.readFields(eW,{},o)}function eW(n,o,u){if(n===3){var p=new yM(u,u.readVarint()+u.pos);p.length&&(o[p.name]=p)}}var tW=QY,rW=mM,aW=yM,Yp={VectorTile:tW,VectorTileFeature:rW,VectorTileLayer:aW},iW=Yp.VectorTileFeature.types,nW=500,b3=Math.pow(2,13);function hy(n,o,u,p,_,A,k,q){n.emplaceBack(o,u,Math.floor(p*b3)*2+k,_*b3*2,A*b3*2,Math.round(q))}var Eu=function(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(function(u){return u.id}),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new _f,this.indexArray=new Su,this.programConfigurations=new Sr(o.layers,o.zoom),this.segments=new bn,this.stateDependentLayerIds=this.layers.filter(function(u){return u.isStateDependent()}).map(function(u){return u.id})};Eu.prototype.populate=function(o,u,p){this.features=[],this.hasPattern=_3("fill-extrusion",this.layers,u);for(var _=0,A=o;_=1){var St=st[Lt-1];if(!oW(gt,St)){he.vertexLength+4>bn.MAX_VERTEX_ARRAY_LENGTH&&(he=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var It=gt.sub(St)._perp()._unit(),Jt=St.dist(gt);Qe+Jt>32768&&(Qe=0),hy(this.layoutVertexArray,gt.x,gt.y,It.x,It.y,0,0,Qe),hy(this.layoutVertexArray,gt.x,gt.y,It.x,It.y,0,1,Qe),Qe+=Jt,hy(this.layoutVertexArray,St.x,St.y,It.x,It.y,0,0,Qe),hy(this.layoutVertexArray,St.x,St.y,It.x,It.y,0,1,Qe);var hr=he.vertexLength;this.indexArray.emplaceBack(hr,hr+2,hr+1),this.indexArray.emplaceBack(hr+1,hr+2,hr+3),he.vertexLength+=4,he.primitiveLength+=2}}}}if(he.vertexLength+j>bn.MAX_VERTEX_ARRAY_LENGTH&&(he=this.segments.prepareSegment(j,this.layoutVertexArray,this.indexArray)),iW[o.type]==="Polygon"){for(var ur=[],Rr=[],kr=he.vertexLength,zr=0,Qr=Y;zrqr)||n.y===o.y&&(n.y<0||n.y>qr)}function sW(n){return n.every(function(o){return o.x<0})||n.every(function(o){return o.x>qr})||n.every(function(o){return o.y<0})||n.every(function(o){return o.y>qr})}var lW=new zn({"fill-extrusion-opacity":new br(Xt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Vr(Xt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new br(Xt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new br(Xt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new qi(Xt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Vr(Xt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Vr(Xt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new br(Xt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),uW={paint:lW},fW=function(n){function o(u){n.call(this,u,uW)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.createBucket=function(p){return new Eu(p)},o.prototype.queryRadius=function(){return tl(this.paint.get("fill-extrusion-translate"))},o.prototype.is3D=function(){return!0},o.prototype.queryIntersectsFeature=function(p,_,A,k,q,Y,j,Q){var ie=ku(p,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Y.angle,j),ye=this.paint.get("fill-extrusion-height").evaluate(_,A),he=this.paint.get("fill-extrusion-base").evaluate(_,A),ke=vW(ie,Q,Y,0),qe=hW(k,he,ye,Q),st=qe[0],Qe=qe[1];return cW(st,Qe,ke)},o}(pi);function vy(n,o){return n.x*o.x+n.y*o.y}function _M(n,o){if(n.length===1){for(var u=0,p=o[u++],_;!_||p.equals(_);)if(_=o[u++],!_)return 1/0;for(;u=2&&o[j-1].equals(o[j-2]);)j--;for(var Q=0;Q0;if(ur&&Lt>Q){var kr=he.dist(ke);if(kr>2*ie){var zr=he.sub(he.sub(ke)._mult(ie/kr)._round());this.updateDistance(ke,zr),this.addCurrentVertex(zr,st,0,0,ye),ke=zr}}var Qr=ke&&qe,Fr=Qr?p:Y?"butt":_;if(Qr&&Fr==="round"&&(JtA&&(Fr="bevel"),Fr==="bevel"&&(Jt>2&&(Fr="flipbevel"),Jt100)gt=Qe.mult(-1);else{var Nr=Jt*st.add(Qe).mag()/st.sub(Qe).mag();gt._perp()._mult(Nr*(Rr?-1:1))}this.addCurrentVertex(he,gt,0,0,ye),this.addCurrentVertex(he,gt.mult(-1),0,0,ye)}else if(Fr==="bevel"||Fr==="fakeround"){var ma=-Math.sqrt(Jt*Jt-1),jr=Rr?ma:0,Ya=Rr?0:ma;if(ke&&this.addCurrentVertex(he,st,jr,Ya,ye),Fr==="fakeround")for(var gi=Math.round(hr*180/Math.PI/bW),Wa=1;Wa2*ie){var Mn=he.add(qe.sub(he)._mult(ie/Gn)._round());this.updateDistance(he,Mn),this.addCurrentVertex(Mn,Qe,0,0,ye),he=Mn}}}}},zo.prototype.addCurrentVertex=function(o,u,p,_,A,k){k===void 0&&(k=!1);var q=u.x+u.y*p,Y=u.y-u.x*p,j=-u.x+u.y*_,Q=-u.y-u.x*_;this.addHalfVertex(o,q,Y,k,!1,p,A),this.addHalfVertex(o,j,Q,k,!0,-_,A),this.distance>wM/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(o,u,p,_,A,k))},zo.prototype.addHalfVertex=function(o,u,p,_,A,k,q){var Y=o.x,j=o.y,Q=this.lineClips?this.scaledDistance*(wM-1):this.scaledDistance,ie=Q*bM;if(this.layoutVertexArray.emplaceBack((Y<<1)+(_?1:0),(j<<1)+(A?1:0),Math.round(xM*u)+128,Math.round(xM*p)+128,(k===0?0:k<0?-1:1)+1|(ie&63)<<2,ie>>6),this.lineClips){var ye=this.scaledDistance-this.lineClips.start,he=this.lineClips.end-this.lineClips.start,ke=ye/he;this.layoutVertexArray2.emplaceBack(ke,this.lineClipsArray.length)}var qe=q.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,qe),q.primitiveLength++),A?this.e2=qe:this.e1=qe},zo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},zo.prototype.updateDistance=function(o,u){this.distance+=o.dist(u),this.updateScaledDistance()},y("LineBucket",zo,{omit:["layers","patternFeatures"]});var TW=new zn({"line-cap":new br(Xt.layout_line["line-cap"]),"line-join":new Vr(Xt.layout_line["line-join"]),"line-miter-limit":new br(Xt.layout_line["line-miter-limit"]),"line-round-limit":new br(Xt.layout_line["line-round-limit"]),"line-sort-key":new Vr(Xt.layout_line["line-sort-key"])}),AW=new zn({"line-opacity":new Vr(Xt.paint_line["line-opacity"]),"line-color":new Vr(Xt.paint_line["line-color"]),"line-translate":new br(Xt.paint_line["line-translate"]),"line-translate-anchor":new br(Xt.paint_line["line-translate-anchor"]),"line-width":new Vr(Xt.paint_line["line-width"]),"line-gap-width":new Vr(Xt.paint_line["line-gap-width"]),"line-offset":new Vr(Xt.paint_line["line-offset"]),"line-blur":new Vr(Xt.paint_line["line-blur"]),"line-dasharray":new Ti(Xt.paint_line["line-dasharray"]),"line-pattern":new qi(Xt.paint_line["line-pattern"]),"line-gradient":new lo(Xt.paint_line["line-gradient"])}),TM={paint:AW,layout:TW},MW=function(n){function o(){n.apply(this,arguments)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.possiblyEvaluate=function(p,_){return _=new jt(Math.floor(_.zoom),{now:_.now,fadeDuration:_.fadeDuration,zoomHistory:_.zoomHistory,transition:_.transition}),n.prototype.possiblyEvaluate.call(this,p,_)},o.prototype.evaluate=function(p,_,A,k){return _=H({},_,{zoom:Math.floor(_.zoom)}),n.prototype.evaluate.call(this,p,_,A,k)},o}(Vr),AM=new MW(TM.paint.properties["line-width"].specification);AM.useIntegerZoom=!0;var SW=function(n){function o(u){n.call(this,u,TM),this.gradientVersion=0}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype._handleSpecialPaintPropertyUpdate=function(p){if(p==="line-gradient"){var _=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=_._styleExpression.expression instanceof As,this.gradientVersion=(this.gradientVersion+1)%S}},o.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},o.prototype.recalculate=function(p,_){n.prototype.recalculate.call(this,p,_),this.paint._values["line-floorwidth"]=AM.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,p)},o.prototype.createBucket=function(p){return new zo(p)},o.prototype.queryRadius=function(p){var _=p,A=MM(Do("line-width",this,_),Do("line-gap-width",this,_)),k=Do("line-offset",this,_);return A/2+Math.abs(k)+tl(this.paint.get("line-translate"))},o.prototype.queryIntersectsFeature=function(p,_,A,k,q,Y,j){var Q=ku(p,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Y.angle,j),ie=j/2*MM(this.paint.get("line-width").evaluate(_,A),this.paint.get("line-gap-width").evaluate(_,A)),ye=this.paint.get("line-offset").evaluate(_,A);return ye&&(k=kW(k,ye*j)),In(Q,k,ie)},o.prototype.isTileClipped=function(){return!0},o}(pi);function MM(n,o){return o>0?o+2*n:n}function kW(n,o){for(var u=[],p=new v(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 RW(n){for(var o="",u=0;u>1,Q=-7,ie=u?_-1:0,ye=u?-1:1,he=n[o+ie];for(ie+=ye,A=he&(1<<-Q)-1,he>>=-Q,Q+=q;Q>0;A=A*256+n[o+ie],ie+=ye,Q-=8);for(k=A&(1<<-Q)-1,A>>=-Q,Q+=p;Q>0;k=k*256+n[o+ie],ie+=ye,Q-=8);if(A===0)A=1-j;else{if(A===Y)return k?NaN:(he?-1:1)*(1/0);k=k+Math.pow(2,p),A=A-j}return(he?-1:1)*k*Math.pow(2,A-p)},qW=function(n,o,u,p,_,A){var k,q,Y,j=A*8-_-1,Q=(1<>1,ye=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,he=p?0:A-1,ke=p?1:-1,qe=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(q=isNaN(o)?1:0,k=Q):(k=Math.floor(Math.log(o)/Math.LN2),o*(Y=Math.pow(2,-k))<1&&(k--,Y*=2),k+ie>=1?o+=ye/Y:o+=ye*Math.pow(2,1-ie),o*Y>=2&&(k++,Y/=2),k+ie>=Q?(q=0,k=Q):k+ie>=1?(q=(o*Y-1)*Math.pow(2,_),k=k+ie):(q=o*Math.pow(2,ie-1)*Math.pow(2,_),k=0));_>=8;n[u+he]=q&255,he+=ke,q/=256,_-=8);for(k=k<<_|q,j+=_;j>0;n[u+he]=k&255,he+=ke,k/=256,j-=8);n[u+he-ke]|=qe*128},M1={read:FW,write:qW},S1=Li;function Li(n){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(n)?n:new Uint8Array(n||0),this.pos=0,this.type=0,this.length=this.buf.length}Li.Varint=0,Li.Fixed64=1,Li.Bytes=2,Li.Fixed32=5;var w3=65536*65536,kM=1/w3,NW=12,CM=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Li.prototype={destroy:function(){this.buf=null},readFields:function(n,o,u){for(u=u||this.length;this.pos>3,A=this.pos;this.type=p&7,n(_,o,this),this.pos===A&&this.skip(p)}return o},readMessage:function(n,o){return this.readFields(n,o,this.readVarint()+this.pos)},readFixed32:function(){var n=k1(this.buf,this.pos);return this.pos+=4,n},readSFixed32:function(){var n=LM(this.buf,this.pos);return this.pos+=4,n},readFixed64:function(){var n=k1(this.buf,this.pos)+k1(this.buf,this.pos+4)*w3;return this.pos+=8,n},readSFixed64:function(){var n=k1(this.buf,this.pos)+LM(this.buf,this.pos+4)*w3;return this.pos+=8,n},readFloat:function(){var n=M1.read(this.buf,this.pos,!0,23,4);return this.pos+=4,n},readDouble:function(){var n=M1.read(this.buf,this.pos,!0,52,8);return this.pos+=8,n},readVarint:function(n){var o=this.buf,u,p;return p=o[this.pos++],u=p&127,p<128||(p=o[this.pos++],u|=(p&127)<<7,p<128)||(p=o[this.pos++],u|=(p&127)<<14,p<128)||(p=o[this.pos++],u|=(p&127)<<21,p<128)?u:(p=o[this.pos],u|=(p&15)<<28,BW(u,n,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var n=this.readVarint();return n%2===1?(n+1)/-2:n/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var n=this.readVarint()+this.pos,o=this.pos;return this.pos=n,n-o>=NW&&CM?$W(this.buf,o,n):QW(this.buf,o,n)},readBytes:function(){var n=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,n);return this.pos=n,o},readPackedVarint:function(n,o){if(this.type!==Li.Bytes)return n.push(this.readVarint(o));var u=sc(this);for(n=n||[];this.pos127;);else if(o===Li.Bytes)this.pos=this.readVarint()+this.pos;else if(o===Li.Fixed32)this.pos+=4;else if(o===Li.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+o)},writeTag:function(n,o){this.writeVarint(n<<3|o)},realloc:function(n){for(var o=this.length||16;o268435455||n<0){OW(n,this);return}this.realloc(4),this.buf[this.pos++]=n&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=(n>>>=7)&127|(n>127?128:0),!(n<=127)&&(this.buf[this.pos++]=n>>>7&127)))},writeSVarint:function(n){this.writeVarint(n<0?-n*2-1:n*2)},writeBoolean:function(n){this.writeVarint(!!n)},writeString:function(n){n=String(n),this.realloc(n.length*4),this.pos++;var o=this.pos;this.pos=eX(this.buf,n,this.pos);var u=this.pos-o;u>=128&&EM(o,u,this),this.pos=o-1,this.writeVarint(u),this.pos+=u},writeFloat:function(n){this.realloc(4),M1.write(this.buf,n,this.pos,!0,23,4),this.pos+=4},writeDouble:function(n){this.realloc(8),M1.write(this.buf,n,this.pos,!0,52,8),this.pos+=8},writeBytes:function(n){var o=n.length;this.writeVarint(o),this.realloc(o);for(var u=0;u=128&&EM(u,p,this),this.pos=u-1,this.writeVarint(p),this.pos+=p},writeMessage:function(n,o,u){this.writeTag(n,Li.Bytes),this.writeRawMessage(o,u)},writePackedVarint:function(n,o){o.length&&this.writeMessage(n,HW,o)},writePackedSVarint:function(n,o){o.length&&this.writeMessage(n,GW,o)},writePackedBoolean:function(n,o){o.length&&this.writeMessage(n,WW,o)},writePackedFloat:function(n,o){o.length&&this.writeMessage(n,ZW,o)},writePackedDouble:function(n,o){o.length&&this.writeMessage(n,YW,o)},writePackedFixed32:function(n,o){o.length&&this.writeMessage(n,XW,o)},writePackedSFixed32:function(n,o){o.length&&this.writeMessage(n,jW,o)},writePackedFixed64:function(n,o){o.length&&this.writeMessage(n,JW,o)},writePackedSFixed64:function(n,o){o.length&&this.writeMessage(n,KW,o)},writeBytesField:function(n,o){this.writeTag(n,Li.Bytes),this.writeBytes(o)},writeFixed32Field:function(n,o){this.writeTag(n,Li.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(n,o){this.writeTag(n,Li.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(n,o){this.writeTag(n,Li.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(n,o){this.writeTag(n,Li.Fixed64),this.writeSFixed64(o)},writeVarintField:function(n,o){this.writeTag(n,Li.Varint),this.writeVarint(o)},writeSVarintField:function(n,o){this.writeTag(n,Li.Varint),this.writeSVarint(o)},writeStringField:function(n,o){this.writeTag(n,Li.Bytes),this.writeString(o)},writeFloatField:function(n,o){this.writeTag(n,Li.Fixed32),this.writeFloat(o)},writeDoubleField:function(n,o){this.writeTag(n,Li.Fixed64),this.writeDouble(o)},writeBooleanField:function(n,o){this.writeVarintField(n,!!o)}};function BW(n,o,u){var p=u.buf,_,A;if(A=p[u.pos++],_=(A&112)>>4,A<128||(A=p[u.pos++],_|=(A&127)<<3,A<128)||(A=p[u.pos++],_|=(A&127)<<10,A<128)||(A=p[u.pos++],_|=(A&127)<<17,A<128)||(A=p[u.pos++],_|=(A&127)<<24,A<128)||(A=p[u.pos++],_|=(A&1)<<31,A<128))return Wp(n,_,o);throw new Error("Expected varint not more than 10 bytes")}function sc(n){return n.type===Li.Bytes?n.readVarint()+n.pos:n.pos+1}function Wp(n,o,u){return u?o*4294967296+(n>>>0):(o>>>0)*4294967296+(n>>>0)}function OW(n,o){var u,p;if(n>=0?(u=n%4294967296|0,p=n/4294967296|0):(u=~(-n%4294967296),p=~(-n/4294967296),u^4294967295?u=u+1|0:(u=0,p=p+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");o.realloc(10),UW(u,p,o),VW(p,o)}function UW(n,o,u){u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos++]=n&127|128,n>>>=7,u.buf[u.pos]=n&127}function VW(n,o){var u=(n&7)<<4;o.buf[o.pos++]|=u|((n>>>=3)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127|((n>>>=7)?128:0),n&&(o.buf[o.pos++]=n&127)))))}function EM(n,o,u){var p=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(Math.LN2*7));u.realloc(p);for(var _=u.pos-1;_>=n;_--)u.buf[_+p]=u.buf[_]}function HW(n,o){for(var u=0;u>>8,n[u+2]=o>>>16,n[u+3]=o>>>24}function LM(n,o){return(n[o]|n[o+1]<<8|n[o+2]<<16)+(n[o+3]<<24)}function QW(n,o,u){for(var p="",_=o;_239?4:A>223?3:A>191?2:1;if(_+q>u)break;var Y,j,Q;q===1?A<128&&(k=A):q===2?(Y=n[_+1],(Y&192)===128&&(k=(A&31)<<6|Y&63,k<=127&&(k=null))):q===3?(Y=n[_+1],j=n[_+2],(Y&192)===128&&(j&192)===128&&(k=(A&15)<<12|(Y&63)<<6|j&63,(k<=2047||k>=55296&&k<=57343)&&(k=null))):q===4&&(Y=n[_+1],j=n[_+2],Q=n[_+3],(Y&192)===128&&(j&192)===128&&(Q&192)===128&&(k=(A&15)<<18|(Y&63)<<12|(j&63)<<6|Q&63,(k<=65535||k>=1114112)&&(k=null))),k===null?(k=65533,q=1):k>65535&&(k-=65536,p+=String.fromCharCode(k>>>10&1023|55296),k=56320|k&1023),p+=String.fromCharCode(k),_+=q}return p}function $W(n,o,u){return CM.decode(n.subarray(o,u))}function eX(n,o,u){for(var p=0,_,A;p55295&&_<57344)if(A)if(_<56320){n[u++]=239,n[u++]=191,n[u++]=189,A=_;continue}else _=A-55296<<10|_-56320|65536,A=null;else{_>56319||p+1===o.length?(n[u++]=239,n[u++]=191,n[u++]=189):A=_;continue}else A&&(n[u++]=239,n[u++]=191,n[u++]=189,A=null);_<128?n[u++]=_:(_<2048?n[u++]=_>>6|192:(_<65536?n[u++]=_>>12|224:(n[u++]=_>>18|240,n[u++]=_>>12&63|128),n[u++]=_>>6&63|128),n[u++]=_&63|128)}return u}var T3=3;function tX(n,o,u){n===1&&u.readMessage(rX,o)}function rX(n,o,u){if(n===3){var p=u.readMessage(aX,{}),_=p.id,A=p.bitmap,k=p.width,q=p.height,Y=p.left,j=p.top,Q=p.advance;o.push({id:_,bitmap:new jv({width:k+2*T3,height:q+2*T3},A),metrics:{width:k,height:q,left:Y,top:j,advance:Q}})}}function aX(n,o,u){n===1?o.id=u.readVarint():n===2?o.bitmap=u.readBytes():n===3?o.width=u.readVarint():n===4?o.height=u.readVarint():n===5?o.left=u.readSVarint():n===6?o.top=u.readSVarint():n===7&&(o.advance=u.readVarint())}function iX(n){return new S1(n).readFields(tX,[])}var PM=T3;function DM(n){for(var o=0,u=0,p=0,_=n;p<_.length;p+=1){var A=_[p];o+=A.w*A.h,u=Math.max(u,A.w)}n.sort(function(st,Qe){return Qe.h-st.h});for(var k=Math.max(Math.ceil(Math.sqrt(o/.95)),u),q=[{x:0,y:0,w:k,h:1/0}],Y=0,j=0,Q=0,ie=n;Q=0;he--){var ke=q[he];if(!(ye.w>ke.w||ye.h>ke.h)){if(ye.x=ke.x,ye.y=ke.y,j=Math.max(j,ye.y+ye.h),Y=Math.max(Y,ye.x+ye.w),ye.w===ke.w&&ye.h===ke.h){var qe=q.pop();he=0&&_>=o&&wf[this.text.charCodeAt(_)];_--)p--;this.text=this.text.substring(o,p),this.sectionIndex=this.sectionIndex.slice(o,p)},bo.prototype.substring=function(o,u){var p=new bo;return p.text=this.text.substring(o,u),p.sectionIndex=this.sectionIndex.slice(o,u),p.sections=this.sections,p},bo.prototype.toString=function(){return this.text},bo.prototype.getMaxScale=function(){var o=this;return this.sectionIndex.reduce(function(u,p){return Math.max(u,o.sections[p].scale)},0)},bo.prototype.addTextSection=function(o,u){this.text+=o.text,this.sections.push(jp.forText(o.scale,o.fontStack||u));for(var p=this.sections.length-1,_=0;_=IM?null:++this.imageSectionID:(this.imageSectionID=zM,this.imageSectionID)};function oX(n,o){for(var u=[],p=n.text,_=0,A=0,k=o;A=0,Q=0,ie=0;ie0&&Mn>Rr&&(Rr=Mn)}else{var Xa=u[zr.fontStack],Ha=Xa&&Xa[Fr];if(Ha&&Ha.rect)jr=Ha.rect,ma=Ha.metrics;else{var Mi=o[zr.fontStack],Pi=Mi&&Mi[Fr];if(!Pi)continue;ma=Pi.metrics}Nr=(It-zr.scale)*Kn}Wa?(n.verticalizable=!0,ur.push({glyph:Fr,imageName:Ya,x:ye,y:he+Nr,vertical:Wa,scale:zr.scale,fontStack:zr.fontStack,sectionIndex:Qr,metrics:ma,rect:jr}),ye+=gi*zr.scale+j):(ur.push({glyph:Fr,imageName:Ya,x:ye,y:he+Nr,vertical:Wa,scale:zr.scale,fontStack:zr.fontStack,sectionIndex:Qr,metrics:ma,rect:jr}),ye+=ma.advance*zr.scale+j)}if(ur.length!==0){var wo=ye-j;ke=Math.max(wo,ke),fX(ur,0,ur.length-1,st,Rr)}ye=0;var To=A*It+Rr;hr.lineOffset=Math.max(Rr,Jt),he+=To,qe=Math.max(To,qe),++Qe}var Zn=he-yy,Io=M3(k),Ro=Io.horizontalAlign,Rn=Io.verticalAlign;cX(n.positionedLines,st,Ro,Rn,ke,qe,A,Zn,_.length),n.top+=-Rn*Zn,n.bottom=n.top+Zn,n.left+=-Ro*ke,n.right=n.left+ke}function fX(n,o,u,p,_){if(!(!p&&!_))for(var A=n[u],k=A.metrics.advance*A.scale,q=(n[u].x+k)*p,Y=o;Y<=u;Y++)n[Y].x-=q,n[Y].y+=_}function cX(n,o,u,p,_,A,k,q,Y){var j=(o-u)*_,Q=0;A!==k?Q=-q*p-yy:Q=(-p*Y+.5)*k;for(var ie=0,ye=n;ie-u/2;){if(k--,k<0)return!1;q-=n[k].dist(A),A=n[k]}q+=n[k].dist(n[k+1]),k++;for(var Y=[],j=0;qp;)j-=Y.shift().angleDelta;if(j>_)return!1;k++,q+=ie.dist(ye)}return!0}function HM(n){for(var o=0,u=0;uj){var ke=(j-Y)/he,qe=fn(ie.x,ye.x,ke),st=fn(ie.y,ye.y,ke),Qe=new Jp(qe,st,ye.angleTo(ie),Q);return Qe._round(),!k||VM(n,Qe,q,k,o)?Qe:void 0}Y+=he}}function pX(n,o,u,p,_,A,k,q,Y){var j=GM(p,A,k),Q=ZM(p,_),ie=Q*k,ye=n[0].x===0||n[0].x===Y||n[0].y===0||n[0].y===Y;o-ie=0&&St=0&&It=0&&ye+j<=Q){var Jt=new Jp(St,It,Lt,ke);Jt._round(),(!p||VM(n,Jt,A,p,_))&&he.push(Jt)}}ie+=Qe}return!q&&!he.length&&!k&&(he=YM(n,ie/2,u,p,_,A,k,!0,Y)),he}function WM(n,o,u,p,_){for(var A=[],k=0;k=p&&ie.x>=p)&&(Q.x>=p?Q=new v(p,Q.y+(ie.y-Q.y)*((p-Q.x)/(ie.x-Q.x)))._round():ie.x>=p&&(ie=new v(p,Q.y+(ie.y-Q.y)*((p-Q.x)/(ie.x-Q.x)))._round()),!(Q.y>=_&&ie.y>=_)&&(Q.y>=_?Q=new v(Q.x+(ie.x-Q.x)*((_-Q.y)/(ie.y-Q.y)),_)._round():ie.y>=_&&(ie=new v(Q.x+(ie.x-Q.x)*((_-Q.y)/(ie.y-Q.y)),_)._round()),(!Y||!Q.equals(Y[Y.length-1]))&&(Y=[Q],A.push(Y)),Y.push(ie)))))}return A}var Kp=ds;function XM(n,o,u,p){var _=[],A=n.image,k=A.pixelRatio,q=A.paddedRect.w-2*Kp,Y=A.paddedRect.h-2*Kp,j=n.right-n.left,Q=n.bottom-n.top,ie=A.stretchX||[[0,q]],ye=A.stretchY||[[0,Y]],he=function(Xa,Ha){return Xa+Ha[1]-Ha[0]},ke=ie.reduce(he,0),qe=ye.reduce(he,0),st=q-ke,Qe=Y-qe,Lt=0,gt=ke,St=0,It=qe,Jt=0,hr=st,ur=0,Rr=Qe;if(A.content&&p){var kr=A.content;Lt=L1(ie,0,kr[0]),St=L1(ye,0,kr[1]),gt=L1(ie,kr[0],kr[2]),It=L1(ye,kr[1],kr[3]),Jt=kr[0]-Lt,ur=kr[1]-St,hr=kr[2]-kr[0]-gt,Rr=kr[3]-kr[1]-It}var zr=function(Xa,Ha,Mi,Pi){var tn=P1(Xa.stretch-Lt,gt,j,n.left),ln=D1(Xa.fixed-Jt,hr,Xa.stretch,ke),Gn=P1(Ha.stretch-St,It,Q,n.top),Mn=D1(Ha.fixed-ur,Rr,Ha.stretch,qe),wo=P1(Mi.stretch-Lt,gt,j,n.left),To=D1(Mi.fixed-Jt,hr,Mi.stretch,ke),Zn=P1(Pi.stretch-St,It,Q,n.top),Io=D1(Pi.fixed-ur,Rr,Pi.stretch,qe),Ro=new v(tn,Gn),Rn=new v(wo,Gn),Fo=new v(wo,Zn),Is=new v(tn,Zn),fc=new v(ln/k,Mn/k),gh=new v(To/k,Io/k),_h=o*Math.PI/180;if(_h){var xh=Math.sin(_h),n0=Math.cos(_h),Vl=[n0,-xh,xh,n0];Ro._matMult(Vl),Rn._matMult(Vl),Is._matMult(Vl),Fo._matMult(Vl)}var N1=Xa.stretch+Xa.fixed,I3=Mi.stretch+Mi.fixed,B1=Ha.stretch+Ha.fixed,R3=Pi.stretch+Pi.fixed,al={x:A.paddedRect.x+Kp+N1,y:A.paddedRect.y+Kp+B1,w:I3-N1,h:R3-B1},o0=hr/k/j,O1=Rr/k/Q;return{tl:Ro,tr:Rn,bl:Is,br:Fo,tex:al,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fc,pixelOffsetBR:gh,minFontScaleX:o0,minFontScaleY:O1,isSDF:u}};if(!p||!A.stretchX&&!A.stretchY)_.push(zr({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:q+1},{fixed:0,stretch:Y+1}));else for(var Qr=jM(ie,st,ke),Fr=jM(ye,Qe,qe),Nr=0;Nr0&&(ke=Math.max(10,ke),this.circleDiameter=ke)}else{var qe=k.top*q-Y,st=k.bottom*q+Y,Qe=k.left*q-Y,Lt=k.right*q+Y,gt=k.collisionPadding;if(gt&&(Qe-=gt[0]*q,qe-=gt[1]*q,Lt+=gt[2]*q,st+=gt[3]*q),Q){var St=new v(Qe,qe),It=new v(Lt,qe),Jt=new v(Qe,st),hr=new v(Lt,st),ur=Q*Math.PI/180;St._rotate(ur),It._rotate(ur),Jt._rotate(ur),hr._rotate(ur),Qe=Math.min(St.x,It.x,Jt.x,hr.x),Lt=Math.max(St.x,It.x,Jt.x,hr.x),qe=Math.min(St.y,It.y,Jt.y,hr.y),st=Math.max(St.y,It.y,Jt.y,hr.y)}o.emplaceBack(u.x,u.y,Qe,qe,Lt,st,p,_,A)}this.boxEndIndex=o.length},Qp=function(o,u){if(o===void 0&&(o=[]),u===void 0&&(u=yX),this.data=o,this.length=this.data.length,this.compare=u,this.length>0)for(var p=(this.length>>1)-1;p>=0;p--)this._down(p)};Qp.prototype.push=function(o){this.data.push(o),this.length++,this._up(this.length-1)},Qp.prototype.pop=function(){if(this.length!==0){var o=this.data[0],u=this.data.pop();return this.length--,this.length>0&&(this.data[0]=u,this._down(0)),o}},Qp.prototype.peek=function(){return this.data[0]},Qp.prototype._up=function(o){for(var u=this,p=u.data,_=u.compare,A=p[o];o>0;){var k=o-1>>1,q=p[k];if(_(A,q)>=0)break;p[o]=q,o=k}p[o]=A},Qp.prototype._down=function(o){for(var u=this,p=u.data,_=u.compare,A=this.length>>1,k=p[o];o=0)break;p[o]=Y,o=q}p[o]=k};function yX(n,o){return no?1:0}function gX(n,o,u){o===void 0&&(o=1),u===void 0&&(u=!1);for(var p=1/0,_=1/0,A=-1/0,k=-1/0,q=n[0],Y=0;YA)&&(A=j.x),(!Y||j.y>k)&&(k=j.y)}var Q=A-p,ie=k-_,ye=Math.min(Q,ie),he=ye/2,ke=new Qp([],_X);if(ye===0)return new v(p,_);for(var qe=p;qeQe.d||!Qe.d)&&(Qe=gt,u&&console.log("found best %d after %d probes",Math.round(1e4*gt.d)/1e4,Lt)),!(gt.max-Qe.d<=o)&&(he=gt.h/2,ke.push(new $p(gt.p.x-he,gt.p.y-he,he,n)),ke.push(new $p(gt.p.x+he,gt.p.y-he,he,n)),ke.push(new $p(gt.p.x-he,gt.p.y+he,he,n)),ke.push(new $p(gt.p.x+he,gt.p.y+he,he,n)),Lt+=4)}return u&&(console.log("num probes: "+Lt),console.log("best distance: "+Qe.d)),Qe.p}function _X(n,o){return o.max-n.max}function $p(n,o,u,p){this.p=new v(n,o),this.h=u,this.d=xX(this.p,p),this.max=this.d+this.h*Math.SQRT2}function xX(n,o){for(var u=!1,p=1/0,_=0;_n.y!=Q.y>n.y&&n.x<(Q.x-j.x)*(n.y-j.y)/(Q.y-j.y)+j.x&&(u=!u),p=Math.min(p,oc(n,j,Q))}return(u?1:-1)*Math.sqrt(p)}function bX(n){for(var o=0,u=0,p=0,_=n[0],A=0,k=_.length,q=k-1;A=qr||Vl.y<0||Vl.y>=qr||AX(n,Vl,n0,u,p,_,Fr,n.layers[0],n.collisionBoxArray,o.index,o.sourceLayerIndex,n.index,Qe,It,ur,Y,gt,Jt,Rr,he,o,A,j,Q,k)};if(kr==="line")for(var ma=0,jr=WM(o.geometry,0,0,qr,qr);ma1){var Gn=dX(ln,hr,u.vertical||ke,p,qe,Lt);Gn&&Nr(ln,Gn)}}else if(o.type==="Polygon")for(var Mn=0,wo=g3(o.geometry,0);Mnmh&&Me(n.layerIds[0]+': Value for "text-size" is >= '+gy+'. Reduce your "text-size".')):st.kind==="composite"&&(Qe=[Lu*he.compositeTextSizes[0].evaluate(k,{},ke),Lu*he.compositeTextSizes[1].evaluate(k,{},ke)],(Qe[0]>mh||Qe[1]>mh)&&Me(n.layerIds[0]+': Value for "text-size" is >= '+gy+'. Reduce your "text-size".')),n.addSymbols(n.text,qe,Qe,q,A,k,j,o,Y.lineStartIndex,Y.lineLength,ye,ke);for(var Lt=0,gt=Q;Ltmh&&Me(n.layerIds[0]+': Value for "icon-size" is >= '+gy+'. Reduce your "icon-size".')):Ro.kind==="composite"&&(Rn=[Lu*It.compositeIconSizes[0].evaluate(St,{},hr),Lu*It.compositeIconSizes[1].evaluate(St,{},hr)],(Rn[0]>mh||Rn[1]>mh)&&Me(n.layerIds[0]+': Value for "icon-size" is >= '+gy+'. Reduce your "icon-size".')),n.addSymbols(n.icon,Zn,Rn,gt,Lt,St,!1,o,kr.lineStartIndex,kr.lineLength,-1,hr),Wa=n.icon.placedSymbolArray.length-1,Io&&(jr=Io.length*4,n.addSymbols(n.icon,Io,Rn,gt,Lt,St,zs.vertical,o,kr.lineStartIndex,kr.lineLength,-1,hr),Xa=n.icon.placedSymbolArray.length-1)}for(var Fo in p.horizontal){var Is=p.horizontal[Fo];if(!zr){Mi=w(Is.text);var fc=q.layout.get("text-rotate").evaluate(St,{},hr);zr=new z1(Y,o,j,Q,ie,Is,ye,he,ke,fc)}var gh=Is.positionedLines.length===1;if(Ya+=KM(n,o,Is,A,q,ke,St,qe,kr,p.vertical?zs.horizontal:zs.horizontalOnly,gh?Object.keys(p.horizontal):[Fo],Ha,Wa,It,hr),gh)break}p.vertical&&(gi+=KM(n,o,p.vertical,A,q,ke,St,qe,kr,zs.vertical,["vertical"],Ha,Xa,It,hr));var _h=zr?zr.boxStartIndex:n.collisionBoxArray.length,xh=zr?zr.boxEndIndex:n.collisionBoxArray.length,n0=Fr?Fr.boxStartIndex:n.collisionBoxArray.length,Vl=Fr?Fr.boxEndIndex:n.collisionBoxArray.length,N1=Qr?Qr.boxStartIndex:n.collisionBoxArray.length,I3=Qr?Qr.boxEndIndex:n.collisionBoxArray.length,B1=Nr?Nr.boxStartIndex:n.collisionBoxArray.length,R3=Nr?Nr.boxEndIndex:n.collisionBoxArray.length,al=-1,o0=function(by,d7){return by&&by.circleDiameter?Math.max(by.circleDiameter,d7):d7};al=o0(zr,al),al=o0(Fr,al),al=o0(Qr,al),al=o0(Nr,al);var O1=al>-1?1:0;O1&&(al*=ur/Kn),n.glyphOffsetArray.length>=yi.MAX_GLYPHS&&Me("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),St.sortKey!==void 0&&n.addToSortKeyRanges(n.symbolInstances.length,St.sortKey),n.symbolInstances.emplaceBack(o.x,o.y,Ha.right>=0?Ha.right:-1,Ha.center>=0?Ha.center:-1,Ha.left>=0?Ha.left:-1,Ha.vertical||-1,Wa,Xa,Mi,_h,xh,n0,Vl,N1,I3,B1,R3,j,Ya,gi,ma,jr,O1,0,ye,Pi,tn,al)}function MX(n,o,u,p){var _=n.compareText;if(!(o in _))_[o]=[];else for(var A=_[o],k=A.length-1;k>=0;k--)if(p.dist(A[k])0)&&(k.value.kind!=="constant"||k.value.value.length>0),Q=Y.value.kind!=="constant"||!!Y.value.value||Object.keys(Y.parameters).length>0,ie=A.get("symbol-sort-key");if(this.features=[],!(!j&&!Q)){for(var ye=u.iconDependencies,he=u.glyphDependencies,ke=u.availableImages,qe=new jt(this.zoom),st=0,Qe=o;st=0;for(var gi=0,Wa=Rr.sections;gi=0;Y--)k[Y]={x:u[Y].x,y:u[Y].y,tileUnitDistanceFromAnchor:A},Y>0&&(A+=u[Y-1].dist(u[Y]));for(var j=0;j0},yi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},yi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},yi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},yi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},yi.prototype.addIndicesForPlacedSymbol=function(o,u){for(var p=o.placedSymbolArray.get(u),_=p.vertexStartIndex+p.numGlyphs*4,A=p.vertexStartIndex;A<_;A+=4)o.indexArray.emplaceBack(A,A+1,A+2),o.indexArray.emplaceBack(A+1,A+2,A+3)},yi.prototype.getSortedSymbolIndexes=function(o){if(this.sortedAngle===o&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var u=Math.sin(o),p=Math.cos(o),_=[],A=[],k=[],q=0;q1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var p=0,_=this.symbolInstanceIndexes;p<_.length;p+=1){var A=_[p],k=this.symbolInstances.get(A);this.featureSortOrder.push(k.featureIndex),[k.rightJustifiedTextSymbolIndex,k.centerJustifiedTextSymbolIndex,k.leftJustifiedTextSymbolIndex].forEach(function(q,Y,j){q>=0&&j.indexOf(q)===Y&&u.addIndicesForPlacedSymbol(u.text,q)}),k.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,k.verticalPlacedTextSymbolIndex),k.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,k.placedIconSymbolIndex),k.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,k.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},y("SymbolBucket",yi,{omit:["layers","collisionBoxArray","features","compareText"]}),yi.MAX_GLYPHS=65535,yi.addDynamicAttributes=E3;function EX(n,o){return o.replace(/{([^{}]+)}/g,function(u,p){return p in n?String(n[p]):""})}var LX=new zn({"symbol-placement":new br(Xt.layout_symbol["symbol-placement"]),"symbol-spacing":new br(Xt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new br(Xt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Vr(Xt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new br(Xt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new br(Xt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new br(Xt.layout_symbol["icon-ignore-placement"]),"icon-optional":new br(Xt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new br(Xt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Vr(Xt.layout_symbol["icon-size"]),"icon-text-fit":new br(Xt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new br(Xt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Vr(Xt.layout_symbol["icon-image"]),"icon-rotate":new Vr(Xt.layout_symbol["icon-rotate"]),"icon-padding":new br(Xt.layout_symbol["icon-padding"]),"icon-keep-upright":new br(Xt.layout_symbol["icon-keep-upright"]),"icon-offset":new Vr(Xt.layout_symbol["icon-offset"]),"icon-anchor":new Vr(Xt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new br(Xt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new br(Xt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new br(Xt.layout_symbol["text-rotation-alignment"]),"text-field":new Vr(Xt.layout_symbol["text-field"]),"text-font":new Vr(Xt.layout_symbol["text-font"]),"text-size":new Vr(Xt.layout_symbol["text-size"]),"text-max-width":new Vr(Xt.layout_symbol["text-max-width"]),"text-line-height":new br(Xt.layout_symbol["text-line-height"]),"text-letter-spacing":new Vr(Xt.layout_symbol["text-letter-spacing"]),"text-justify":new Vr(Xt.layout_symbol["text-justify"]),"text-radial-offset":new Vr(Xt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new br(Xt.layout_symbol["text-variable-anchor"]),"text-anchor":new Vr(Xt.layout_symbol["text-anchor"]),"text-max-angle":new br(Xt.layout_symbol["text-max-angle"]),"text-writing-mode":new br(Xt.layout_symbol["text-writing-mode"]),"text-rotate":new Vr(Xt.layout_symbol["text-rotate"]),"text-padding":new br(Xt.layout_symbol["text-padding"]),"text-keep-upright":new br(Xt.layout_symbol["text-keep-upright"]),"text-transform":new Vr(Xt.layout_symbol["text-transform"]),"text-offset":new Vr(Xt.layout_symbol["text-offset"]),"text-allow-overlap":new br(Xt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new br(Xt.layout_symbol["text-ignore-placement"]),"text-optional":new br(Xt.layout_symbol["text-optional"])}),PX=new zn({"icon-opacity":new Vr(Xt.paint_symbol["icon-opacity"]),"icon-color":new Vr(Xt.paint_symbol["icon-color"]),"icon-halo-color":new Vr(Xt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Vr(Xt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Vr(Xt.paint_symbol["icon-halo-blur"]),"icon-translate":new br(Xt.paint_symbol["icon-translate"]),"icon-translate-anchor":new br(Xt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Vr(Xt.paint_symbol["text-opacity"]),"text-color":new Vr(Xt.paint_symbol["text-color"],{runtimeType:ws,getOverride:function(n){return n.textColor},hasOverride:function(n){return!!n.textColor}}),"text-halo-color":new Vr(Xt.paint_symbol["text-halo-color"]),"text-halo-width":new Vr(Xt.paint_symbol["text-halo-width"]),"text-halo-blur":new Vr(Xt.paint_symbol["text-halo-blur"]),"text-translate":new br(Xt.paint_symbol["text-translate"]),"text-translate-anchor":new br(Xt.paint_symbol["text-translate-anchor"])}),L3={paint:PX,layout:LX},r0=function(o){this.type=o.property.overrides?o.property.overrides.runtimeType:ef,this.defaultValue=o};r0.prototype.evaluate=function(o){if(o.formattedSection){var u=this.defaultValue.property.overrides;if(u&&u.hasOverride(o.formattedSection))return u.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default},r0.prototype.eachChild=function(o){if(!this.defaultValue.isConstant()){var u=this.defaultValue.value;o(u._styleExpression.expression)}},r0.prototype.outputDefined=function(){return!1},r0.prototype.serialize=function(){return null},y("FormatSectionOverride",r0,{omit:["defaultValue"]});var DX=function(n){function o(u){n.call(this,u,L3)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o.prototype.recalculate=function(p,_){if(n.prototype.recalculate.call(this,p,_),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 A=this.layout.get("text-writing-mode");if(A){for(var k=[],q=0,Y=A;q",targetMapId:_,sourceMapId:k.mapId})}}},a0.prototype.receive=function(o){var u=o.data,p=u.id;if(p&&!(u.targetMapId&&this.mapId!==u.targetMapId))if(u.type===""){delete this.tasks[p];var _=this.cancelCallbacks[p];delete this.cancelCallbacks[p],_&&_()}else it()||u.mustQueue?(this.tasks[p]=u,this.taskQueue.push(p),this.invoker.trigger()):this.processTask(p,u)},a0.prototype.process=function(){if(this.taskQueue.length){var o=this.taskQueue.shift(),u=this.tasks[o];delete this.tasks[o],this.taskQueue.length&&this.invoker.trigger(),u&&this.processTask(o,u)}},a0.prototype.processTask=function(o,u){var p=this;if(u.type===""){var _=this.callbacks[o];delete this.callbacks[o],_&&(u.error?_(Z(u.error)):_(null,Z(u.data)))}else{var A=!1,k=_t(this.globalScope)?void 0:[],q=u.hasCallback?function(ye,he){A=!0,delete p.cancelCallbacks[o],p.target.postMessage({id:o,type:"",sourceMapId:p.mapId,error:ye?U(ye):null,data:U(he,k)},k)}:function(ye){A=!0},Y=null,j=Z(u.data);if(this.parent[u.type])Y=this.parent[u.type](u.sourceMapId,j,q);else if(this.parent.getWorkerSource){var Q=u.type.split("."),ie=this.parent.getWorkerSource(u.sourceMapId,Q[0],j.source);Y=ie[Q[1]](j,q)}else q(new Error("Could not find function "+u.type));!A&&Y&&Y.cancel&&(this.cancelCallbacks[o]=Y.cancel)}},a0.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function HX(n,o,u){o=Math.pow(2,u)-o-1;var p=a7(n*256,o*256,u),_=a7((n+1)*256,(o+1)*256,u);return p[0]+","+p[1]+","+_[0]+","+_[1]}function a7(n,o,u){var p=2*Math.PI*6378137/256/Math.pow(2,u),_=n*p-2*Math.PI*6378137/2,A=o*p-2*Math.PI*6378137/2;return[_,A]}var Tn=function(o,u){o&&(u?this.setSouthWest(o).setNorthEast(u):o.length===4?this.setSouthWest([o[0],o[1]]).setNorthEast([o[2],o[3]]):this.setSouthWest(o[0]).setNorthEast(o[1]))};Tn.prototype.setNorthEast=function(o){return this._ne=o instanceof Ui?new Ui(o.lng,o.lat):Ui.convert(o),this},Tn.prototype.setSouthWest=function(o){return this._sw=o instanceof Ui?new Ui(o.lng,o.lat):Ui.convert(o),this},Tn.prototype.extend=function(o){var u=this._sw,p=this._ne,_,A;if(o instanceof Ui)_=o,A=o;else if(o instanceof Tn){if(_=o._sw,A=o._ne,!_||!A)return this}else{if(Array.isArray(o))if(o.length===4||o.every(Array.isArray)){var k=o;return this.extend(Tn.convert(k))}else{var q=o;return this.extend(Ui.convert(q))}return this}return!u&&!p?(this._sw=new Ui(_.lng,_.lat),this._ne=new Ui(A.lng,A.lat)):(u.lng=Math.min(_.lng,u.lng),u.lat=Math.min(_.lat,u.lat),p.lng=Math.max(A.lng,p.lng),p.lat=Math.max(A.lat,p.lat)),this},Tn.prototype.getCenter=function(){return new Ui((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tn.prototype.getSouthWest=function(){return this._sw},Tn.prototype.getNorthEast=function(){return this._ne},Tn.prototype.getNorthWest=function(){return new Ui(this.getWest(),this.getNorth())},Tn.prototype.getSouthEast=function(){return new Ui(this.getEast(),this.getSouth())},Tn.prototype.getWest=function(){return this._sw.lng},Tn.prototype.getSouth=function(){return this._sw.lat},Tn.prototype.getEast=function(){return this._ne.lng},Tn.prototype.getNorth=function(){return this._ne.lat},Tn.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tn.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tn.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tn.prototype.contains=function(o){var u=Ui.convert(o),p=u.lng,_=u.lat,A=this._sw.lat<=_&&_<=this._ne.lat,k=this._sw.lng<=p&&p<=this._ne.lng;return this._sw.lng>this._ne.lng&&(k=this._sw.lng>=p&&p>=this._ne.lng),A&&k},Tn.convert=function(o){return!o||o instanceof Tn?o:new Tn(o)};var i7=63710088e-1,Ui=function(o,u){if(isNaN(o)||isNaN(u))throw new Error("Invalid LngLat object: ("+o+", "+u+")");if(this.lng=+o,this.lat=+u,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ui.prototype.wrap=function(){return new Ui(F(this.lng,-180,180),this.lat)},Ui.prototype.toArray=function(){return[this.lng,this.lat]},Ui.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ui.prototype.distanceTo=function(o){var u=Math.PI/180,p=this.lat*u,_=o.lat*u,A=Math.sin(p)*Math.sin(_)+Math.cos(p)*Math.cos(_)*Math.cos((o.lng-this.lng)*u),k=i7*Math.acos(Math.min(A,1));return k},Ui.prototype.toBounds=function(o){o===void 0&&(o=0);var u=40075017,p=360*o/u,_=p/Math.cos(Math.PI/180*this.lat);return new Tn(new Ui(this.lng-_,this.lat-p),new Ui(this.lng+_,this.lat+p))},Ui.convert=function(o){if(o instanceof Ui)return o;if(Array.isArray(o)&&(o.length===2||o.length===3))return new Ui(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&typeof o=="object"&&o!==null)return new Ui(Number("lng"in o?o.lng:o.lon),Number(o.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 n7=2*Math.PI*i7;function o7(n){return n7*Math.cos(n*Math.PI/180)}function s7(n){return(180+n)/360}function l7(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function u7(n,o){return n/o7(o)}function GX(n){return n*360-180}function D3(n){var o=180-n*360;return 360/Math.PI*Math.atan(Math.exp(o*Math.PI/180))-90}function ZX(n,o){return n*o7(D3(o))}function YX(n){return 1/Math.cos(n*Math.PI/180)}var Kv=function(o,u,p){p===void 0&&(p=0),this.x=+o,this.y=+u,this.z=+p};Kv.fromLngLat=function(o,u){u===void 0&&(u=0);var p=Ui.convert(o);return new Kv(s7(p.lng),l7(p.lat),u7(u,p.lat))},Kv.prototype.toLngLat=function(){return new Ui(GX(this.x),D3(this.y))},Kv.prototype.toAltitude=function(){return ZX(this.z,this.y)},Kv.prototype.meterInMercatorCoordinateUnits=function(){return 1/n7*YX(D3(this.y))};var Qv=function(o,u,p){this.z=o,this.x=u,this.y=p,this.key=xy(0,o,o,u,p)};Qv.prototype.equals=function(o){return this.z===o.z&&this.x===o.x&&this.y===o.y},Qv.prototype.url=function(o,u){var p=HX(this.x,this.y,this.z),_=WX(this.z,this.x,this.y);return o[(this.x+this.y)%o.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(u==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",_).replace("{bbox-epsg-3857}",p)},Qv.prototype.getTilePoint=function(o){var u=Math.pow(2,this.z);return new v((o.x*u-this.x)*qr,(o.y*u-this.y)*qr)},Qv.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var f7=function(o,u){this.wrap=o,this.canonical=u,this.key=xy(o,u.z,u.z,u.x,u.y)},An=function(o,u,p,_,A){this.overscaledZ=o,this.wrap=u,this.canonical=new Qv(p,+_,+A),this.key=xy(u,o,p,_,A)};An.prototype.equals=function(o){return this.overscaledZ===o.overscaledZ&&this.wrap===o.wrap&&this.canonical.equals(o.canonical)},An.prototype.scaledTo=function(o){var u=this.canonical.z-o;return o>this.canonical.z?new An(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new An(o,this.wrap,o,this.canonical.x>>u,this.canonical.y>>u)},An.prototype.calculateScaledKey=function(o,u){var p=this.canonical.z-o;return o>this.canonical.z?xy(this.wrap*+u,o,this.canonical.z,this.canonical.x,this.canonical.y):xy(this.wrap*+u,o,o,this.canonical.x>>p,this.canonical.y>>p)},An.prototype.isChildOf=function(o){if(o.wrap!==this.wrap)return!1;var u=this.canonical.z-o.canonical.z;return o.overscaledZ===0||o.overscaledZ>u&&o.canonical.y===this.canonical.y>>u},An.prototype.children=function(o){if(this.overscaledZ>=o)return[new An(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var u=this.canonical.z+1,p=this.canonical.x*2,_=this.canonical.y*2;return[new An(u,this.wrap,u,p,_),new An(u,this.wrap,u,p+1,_),new An(u,this.wrap,u,p,_+1),new An(u,this.wrap,u,p+1,_+1)]},An.prototype.isLessThan=function(o){return this.wrapo.wrap?!1:this.overscaledZo.overscaledZ?!1:this.canonical.xo.canonical.x?!1:this.canonical.y0;A--)_=1<=this.dim+1||u<-1||u>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(u+1)*this.stride+(o+1)},lc.prototype._unpackMapbox=function(o,u,p){return(o*256*256+u*256+p)/10-1e4},lc.prototype._unpackTerrarium=function(o,u,p){return o*256+u+p/256-32768},lc.prototype.getPixels=function(){return new es({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},lc.prototype.backfillBorder=function(o,u,p){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");var _=u*this.dim,A=u*this.dim+this.dim,k=p*this.dim,q=p*this.dim+this.dim;switch(u){case-1:_=A-1;break;case 1:A=_+1;break}switch(p){case-1:k=q-1;break;case 1:q=k+1;break}for(var Y=-u*this.dim,j=-p*this.dim,Q=k;Q=0&&ie[3]>=0&&Y.insert(q,ie[0],ie[1],ie[2],ie[3])}},uc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Yp.VectorTile(new S1(this.rawTileData)).layers,this.sourceLayerCoder=new F1(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},uc.prototype.query=function(o,u,p,_){var A=this;this.loadVTLayers();for(var k=o.params||{},q=qr/o.tileSize/o.scale,Y=cf(k.filter),j=o.queryGeometry,Q=o.queryPadding*q,ie=h7(j),ye=this.grid.query(ie.minX-Q,ie.minY-Q,ie.maxX+Q,ie.maxY+Q),he=h7(o.cameraQueryGeometry),ke=this.grid3D.query(he.minX-Q,he.minY-Q,he.maxX+Q,he.maxY+Q,function(Jt,hr,ur,Rr){return Ul(o.cameraQueryGeometry,Jt-Q,hr-Q,ur+Q,Rr+Q)}),qe=0,st=ke;qe_)A=!1;else if(!u)A=!0;else if(this.expirationTime=$r.maxzoom)&&$r.visibility!=="none"){T(pr,this.zoom,ce);var ga=Dt[$r.id]=$r.createBucket({index:yt.bucketLayerIDs.length,layers:pr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Yr,sourceID:this.source});ga.populate(Br,Ft,this.tileID.canonical),yt.bucketLayerIDs.push(pr.map(function(Ga){return Ga.id}))}}}}var nr,wi,La,si,fa=a.mapObject(Ft.glyphDependencies,function(Ga){return Object.keys(Ga).map(Number)});Object.keys(fa).length?Ee.send("getGlyphs",{uid:this.uid,stacks:fa},function(Ga,Jn){nr||(nr=Ga,wi=Jn,xs.call(rt))}):wi={};var Ln=Object.keys(Ft.iconDependencies);Ln.length?Ee.send("getImages",{icons:Ln,source:this.source,tileID:this.tileID,type:"icons"},function(Ga,Jn){nr||(nr=Ga,La=Jn,xs.call(rt))}):La={};var Co=Object.keys(Ft.patternDependencies);Co.length?Ee.send("getImages",{icons:Co,source:this.source,tileID:this.tileID,type:"patterns"},function(Ga,Jn){nr||(nr=Ga,si=Jn,xs.call(rt))}):si={},xs.call(this);function xs(){if(nr)return Ne(nr);if(wi&&La&&si){var Ga=new m(wi),Jn=new a.ImageAtlas(La,si);for(var hu in Dt){var Bi=Dt[hu];Bi instanceof a.SymbolBucket?(T(Bi.layers,this.zoom,ce),a.performSymbolLayout(Bi,wi,Ga.positions,La,Jn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Bi.hasPattern&&(Bi instanceof a.LineBucket||Bi instanceof a.FillBucket||Bi instanceof a.FillExtrusionBucket)&&(T(Bi.layers,this.zoom,ce),Bi.addFeatures(Ft,this.tileID.canonical,Jn.patternPositions))}this.status="done",Ne(null,{buckets:a.values(Dt).filter(function(dl){return!dl.isEmpty()}),featureIndex:yt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Ga.image,imageAtlas:Jn,glyphMap:this.returnDependencies?wi:null,iconMap:this.returnDependencies?La:null,glyphPositions:this.returnDependencies?Ga.positions:null})}}};function T(le,ee,se){for(var ce=new a.EvaluationParameters(ee),Ee=0,Ne=le;Ee=0!=!!ee&&le.reverse()}var O=a.vectorTile.VectorTileFeature.prototype.toGeoJSON,H=function(ee){this._feature=ee,this.extent=a.EXTENT,this.type=ee.type,this.properties=ee.tags,"id"in ee&&!isNaN(ee.id)&&(this.id=parseInt(ee.id,10))};H.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ee=[],se=0,ce=this._feature.geometry;se>31}function it(le,ee){for(var se=le.loadGeometry(),ce=le.type,Ee=0,Ne=0,rt=se.length,Ve=0;Ve>1;_t(le,ee,rt,ce,Ee,Ne%2),He(le,ee,se,ce,rt-1,Ne+1),He(le,ee,se,rt+1,Ee,Ne+1)}}function _t(le,ee,se,ce,Ee,Ne){for(;Ee>ce;){if(Ee-ce>600){var rt=Ee-ce+1,Ve=se-ce+1,yt=Math.log(rt),Dt=.5*Math.exp(2*yt/3),Ft=.5*Math.sqrt(yt*Dt*(rt-Dt)/rt)*(Ve-rt/2<0?-1:1),tr=Math.max(ce,Math.floor(se-Ve*Dt/rt+Ft)),Yt=Math.min(Ee,Math.floor(se+(rt-Ve)*Dt/rt+Ft));_t(le,ee,se,tr,Yt,Ne)}var wr=ee[2*se+Ne],Yr=ce,Br=Ee;for(at(le,ee,ce,se),ee[2*Ee+Ne]>wr&&at(le,ee,ce,Ee);Yrwr;)Br--}ee[2*ce+Ne]===wr?at(le,ee,ce,Br):(Br++,at(le,ee,Br,Ee)),Br<=se&&(ce=Br+1),se<=Br&&(Ee=Br-1)}}function at(le,ee,se,ce){At(le,se,ce),At(ee,2*se,2*ce),At(ee,2*se+1,2*ce+1)}function At(le,ee,se){var ce=le[ee];le[ee]=le[se],le[se]=ce}function kt(le,ee,se,ce,Ee,Ne,rt){for(var Ve=[0,le.length-1,0],yt=[],Dt,Ft;Ve.length;){var tr=Ve.pop(),Yt=Ve.pop(),wr=Ve.pop();if(Yt-wr<=rt){for(var Yr=wr;Yr<=Yt;Yr++)Dt=ee[2*Yr],Ft=ee[2*Yr+1],Dt>=se&&Dt<=Ee&&Ft>=ce&&Ft<=Ne&&yt.push(le[Yr]);continue}var Br=Math.floor((wr+Yt)/2);Dt=ee[2*Br],Ft=ee[2*Br+1],Dt>=se&&Dt<=Ee&&Ft>=ce&&Ft<=Ne&&yt.push(le[Br]);var ca=(tr+1)%2;(tr===0?se<=Dt:ce<=Ft)&&(Ve.push(wr),Ve.push(Br-1),Ve.push(ca)),(tr===0?Ee>=Dt:Ne>=Ft)&&(Ve.push(Br+1),Ve.push(Yt),Ve.push(ca))}return yt}function pt(le,ee,se,ce,Ee,Ne){for(var rt=[0,le.length-1,0],Ve=[],yt=Ee*Ee;rt.length;){var Dt=rt.pop(),Ft=rt.pop(),tr=rt.pop();if(Ft-tr<=Ne){for(var Yt=tr;Yt<=Ft;Yt++)ge(ee[2*Yt],ee[2*Yt+1],se,ce)<=yt&&Ve.push(le[Yt]);continue}var wr=Math.floor((tr+Ft)/2),Yr=ee[2*wr],Br=ee[2*wr+1];ge(Yr,Br,se,ce)<=yt&&Ve.push(le[wr]);var ca=(Dt+1)%2;(Dt===0?se-Ee<=Yr:ce-Ee<=Br)&&(rt.push(tr),rt.push(wr-1),rt.push(ca)),(Dt===0?se+Ee>=Yr:ce+Ee>=Br)&&(rt.push(wr+1),rt.push(Ft),rt.push(ca))}return Ve}function ge(le,ee,se,ce){var Ee=le-se,Ne=ee-ce;return Ee*Ee+Ne*Ne}var Re=function(le){return le[0]},xe=function(le){return le[1]},et=function(ee,se,ce,Ee,Ne){se===void 0&&(se=Re),ce===void 0&&(ce=xe),Ee===void 0&&(Ee=64),Ne===void 0&&(Ne=Float64Array),this.nodeSize=Ee,this.points=ee;for(var rt=ee.length<65536?Uint16Array:Uint32Array,Ve=this.ids=new rt(ee.length),yt=this.coords=new Ne(ee.length*2),Dt=0;Dt=Ee;Ft--){var tr=+Date.now();yt=this._cluster(yt,Ft),this.trees[Ft]=new et(yt,Be,ft,rt,Float32Array),ce&&console.log("z%d: %d clusters in %dms",Ft,yt.length,+Date.now()-tr)}return ce&&console.timeEnd("total time"),this},tt.prototype.getClusters=function(ee,se){var ce=((ee[0]+180)%360+360)%360-180,Ee=Math.max(-90,Math.min(90,ee[1])),Ne=ee[2]===180?180:((ee[2]+180)%360+360)%360-180,rt=Math.max(-90,Math.min(90,ee[3]));if(ee[2]-ee[0]>=360)ce=-180,Ne=180;else if(ce>Ne){var Ve=this.getClusters([ce,Ee,180,rt],se),yt=this.getClusters([-180,Ee,Ne,rt],se);return Ve.concat(yt)}for(var Dt=this.trees[this._limitZoom(se)],Ft=Dt.range(Ut(ce),xt(rt),Ut(Ne),xt(Ee)),tr=[],Yt=0,wr=Ft;Ytse&&(Br+=ii.numPoints||1)}if(Br>=yt){for(var Wr=tr.x*Yr,pr=tr.y*Yr,$r=Ve&&Yr>1?this._map(tr,!0):null,ga=(Ft<<5)+(se+1)+this.points.length,nr=0,wi=wr;nr1)for(var Ln=0,Co=wr;Ln>5},tt.prototype._getOriginZoom=function(ee){return(ee-this.points.length)%32},tt.prototype._map=function(ee,se){if(ee.numPoints)return se?Wt({},ee.properties):ee.properties;var ce=this.points[ee.index].properties,Ee=this.options.map(ce);return se&&Ee===ce?Wt({},Ee):Ee};function Nt(le,ee,se,ce,Ee){return{x:le,y:ee,zoom:1/0,id:se,parentId:-1,numPoints:ce,properties:Ee}}function Mt(le,ee){var se=le.geometry.coordinates,ce=se[0],Ee=se[1];return{x:Ut(ce),y:xt(Ee),zoom:1/0,index:ee,parentId:-1}}function Ct(le){return{type:"Feature",id:le.id,properties:Rt(le),geometry:{type:"Point",coordinates:[Et(le.x),ir(le.y)]}}}function Rt(le){var ee=le.numPoints,se=ee>=1e4?Math.round(ee/1e3)+"k":ee>=1e3?Math.round(ee/100)/10+"k":ee;return Wt(Wt({},le.properties),{cluster:!0,cluster_id:le.id,point_count:ee,point_count_abbreviated:se})}function Ut(le){return le/360+.5}function xt(le){var ee=Math.sin(le*Math.PI/180),se=.5-.25*Math.log((1+ee)/(1-ee))/Math.PI;return se<0?0:se>1?1:se}function Et(le){return(le-.5)*360}function ir(le){var ee=(180-le*360)*Math.PI/180;return 360*Math.atan(Math.exp(ee))/Math.PI-90}function Wt(le,ee){for(var se in ee)le[se]=ee[se];return le}function Be(le){return le.x}function ft(le){return le.y}function mt(le,ee,se,ce){for(var Ee=ce,Ne=se-ee>>1,rt=se-ee,Ve,yt=le[ee],Dt=le[ee+1],Ft=le[se],tr=le[se+1],Yt=ee+3;YtEe)Ve=Yt,Ee=wr;else if(wr===Ee){var Yr=Math.abs(Yt-Ne);Yrce&&(Ve-ee>3&&mt(le,ee,Ve,ce),le[Ve+2]=Ee,se-Ve>3&&mt(le,Ve,se,ce))}function Ar(le,ee,se,ce,Ee,Ne){var rt=Ee-se,Ve=Ne-ce;if(rt!==0||Ve!==0){var yt=((le-se)*rt+(ee-ce)*Ve)/(rt*rt+Ve*Ve);yt>1?(se=Ee,ce=Ne):yt>0&&(se+=rt*yt,ce+=Ve*yt)}return rt=le-se,Ve=ee-ce,rt*rt+Ve*Ve}function dr(le,ee,se,ce){var Ee={id:typeof le=="undefined"?null:le,type:ee,geometry:se,tags:ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Tt(Ee),Ee}function Tt(le){var ee=le.geometry,se=le.type;if(se==="Point"||se==="MultiPoint"||se==="LineString")wt(le,ee);else if(se==="Polygon"||se==="MultiLineString")for(var ce=0;ce0&&(ce?rt+=(Ee*Dt-yt*Ne)/2:rt+=Math.sqrt(Math.pow(yt-Ee,2)+Math.pow(Dt-Ne,2))),Ee=yt,Ne=Dt}var Ft=ee.length-3;ee[2]=1,mt(ee,0,Ft,se),ee[Ft+2]=1,ee.size=Math.abs(rt),ee.start=0,ee.end=ee.size}function er(le,ee,se,ce){for(var Ee=0;Ee1?1:se}function Pt(le,ee,se,ce,Ee,Ne,rt,Ve){if(se/=ee,ce/=ee,Ne>=se&&rt=ce)return null;for(var yt=[],Dt=0;Dt=se&&Yr=ce)continue;var Br=[];if(Yt==="Point"||Yt==="MultiPoint")Fe(tr,Br,se,ce,Ee);else if(Yt==="LineString")Ge(tr,Br,se,ce,Ee,!1,Ve.lineMetrics);else if(Yt==="MultiLineString")dt(tr,Br,se,ce,Ee,!1);else if(Yt==="Polygon")dt(tr,Br,se,ce,Ee,!0);else if(Yt==="MultiPolygon")for(var ca=0;ca=se&&rt<=ce&&(ee.push(le[Ne]),ee.push(le[Ne+1]),ee.push(le[Ne+2]))}}function Ge(le,ee,se,ce,Ee,Ne,rt){for(var Ve=bt(le),yt=Ee===0?Er:Tr,Dt=le.start,Ft,tr,Yt=0;Ytse&&(tr=yt(Ve,wr,Yr,ca,ua,se),rt&&(Ve.start=Dt+Ft*tr)):Na>ce?ii=se&&(tr=yt(Ve,wr,Yr,ca,ua,se),Wr=!0),ii>ce&&Na<=ce&&(tr=yt(Ve,wr,Yr,ca,ua,ce),Wr=!0),!Ne&&Wr&&(rt&&(Ve.end=Dt+Ft*tr),ee.push(Ve),Ve=bt(le)),rt&&(Dt+=Ft)}var pr=le.length-3;wr=le[pr],Yr=le[pr+1],Br=le[pr+2],Na=Ee===0?wr:Yr,Na>=se&&Na<=ce&&gr(Ve,wr,Yr,Br),pr=Ve.length-3,Ne&&pr>=3&&(Ve[pr]!==Ve[0]||Ve[pr+1]!==Ve[1])&&gr(Ve,Ve[0],Ve[1],Ve[2]),Ve.length&&ee.push(Ve)}function bt(le){var ee=[];return ee.size=le.size,ee.start=le.start,ee.end=le.end,ee}function dt(le,ee,se,ce,Ee,Ne){for(var rt=0;rtrt.maxX&&(rt.maxX=Ft),tr>rt.maxY&&(rt.maxY=tr)}return rt}function yn(le,ee,se,ce){var Ee=ee.geometry,Ne=ee.type,rt=[];if(Ne==="Point"||Ne==="MultiPoint")for(var Ve=0;Ve0&&ee.size<(Ee?rt:ce)){se.numPoints+=ee.length/3;return}for(var Ve=[],yt=0;ytrt)&&(se.numSimplified++,Ve.push(ee[yt]),Ve.push(ee[yt+1])),se.numPoints++;Ee&&jn(Ve,Ne),le.push(Ve)}function jn(le,ee){for(var se=0,ce=0,Ee=le.length,Ne=Ee-2;ce0===ee)for(ce=0,Ee=le.length;ce24)throw new Error("maxZoom should be in the 0-24 range");if(ee.promoteId&&ee.generateId)throw new Error("promoteId and generateId cannot be used together.");var ce=Vt(le,ee);this.tiles={},this.tileCoords=[],se&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ee.indexMaxZoom,ee.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ce=Hr(ce,ee),ce.length&&this.splitTile(ce,0,0,0),se&&(ce.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)))}Vi.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Vi.prototype.splitTile=function(le,ee,se,ce,Ee,Ne,rt){for(var Ve=[le,ee,se,ce],yt=this.options,Dt=yt.debug;Ve.length;){ce=Ve.pop(),se=Ve.pop(),ee=Ve.pop(),le=Ve.pop();var Ft=1<1&&console.time("creation"),Yt=this.tiles[tr]=Ki(le,ee,se,ce,yt),this.tileCoords.push({z:ee,x:se,y:ce}),Dt)){Dt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ee,se,ce,Yt.numFeatures,Yt.numPoints,Yt.numSimplified),console.timeEnd("creation"));var wr="z"+ee;this.stats[wr]=(this.stats[wr]||0)+1,this.total++}if(Yt.source=le,Ee){if(ee===yt.maxZoom||ee===Ee)continue;var Yr=1<1&&console.time("clipping");var Br=.5*yt.buffer/yt.extent,ca=.5-Br,ua=.5+Br,Na=1+Br,ii,Wr,pr,$r,ga,nr;ii=Wr=pr=$r=null,ga=Pt(le,Ft,se-Br,se+ua,0,Yt.minX,Yt.maxX,yt),nr=Pt(le,Ft,se+ca,se+Na,0,Yt.minX,Yt.maxX,yt),le=null,ga&&(ii=Pt(ga,Ft,ce-Br,ce+ua,1,Yt.minY,Yt.maxY,yt),Wr=Pt(ga,Ft,ce+ca,ce+Na,1,Yt.minY,Yt.maxY,yt),ga=null),nr&&(pr=Pt(nr,Ft,ce-Br,ce+ua,1,Yt.minY,Yt.maxY,yt),$r=Pt(nr,Ft,ce+ca,ce+Na,1,Yt.minY,Yt.maxY,yt),nr=null),Dt>1&&console.timeEnd("clipping"),Ve.push(ii||[],ee+1,se*2,ce*2),Ve.push(Wr||[],ee+1,se*2,ce*2+1),Ve.push(pr||[],ee+1,se*2+1,ce*2),Ve.push($r||[],ee+1,se*2+1,ce*2+1)}}},Vi.prototype.getTile=function(le,ee,se){var ce=this.options,Ee=ce.extent,Ne=ce.debug;if(le<0||le>24)return null;var rt=1<1&&console.log("drilling down to z%d-%d-%d",le,ee,se);for(var yt=le,Dt=ee,Ft=se,tr;!tr&&yt>0;)yt--,Dt=Math.floor(Dt/2),Ft=Math.floor(Ft/2),tr=this.tiles[pa(yt,Dt,Ft)];return!tr||!tr.source?null:(Ne>1&&console.log("found parent tile z%d-%d-%d",yt,Dt,Ft),Ne>1&&console.time("drilling down"),this.splitTile(tr.source,yt,Dt,Ft,le,ee,se),Ne>1&&console.timeEnd("drilling down"),this.tiles[Ve]?Ea(this.tiles[Ve],Ee):null)};function pa(le,ee,se){return((1<=0?0:g.button},l.remove=function(g){g.parentNode&&g.parentNode.removeChild(g)};function P(g,c,x){var d,w,L,R=a.browser.devicePixelRatio>1?"@2x":"",G=a.getJSON(c.transformRequest(c.normalizeSpriteURL(g,R,".json"),a.ResourceType.SpriteJSON),function(ue,we){G=null,L||(L=ue,d=we,te())}),K=a.getImage(c.transformRequest(c.normalizeSpriteURL(g,R,".png"),a.ResourceType.SpriteImage),function(ue,we){K=null,L||(L=ue,w=we,te())});function te(){if(L)x(L);else if(d&&w){var ue=a.browser.getImageData(w),we={};for(var be in d){var Ie=d[be],Ye=Ie.width,Ze=Ie.height,Oe=Ie.x,Xe=Ie.y,ct=Ie.sdf,zt=Ie.pixelRatio,qt=Ie.stretchX,Qt=Ie.stretchY,rr=Ie.content,Zt=new a.RGBAImage({width:Ye,height:Ze});a.RGBAImage.copy(ue,Zt,{x:Oe,y:Xe},{x:0,y:0},{width:Ye,height:Ze}),we[be]={data:Zt,pixelRatio:zt,sdf:ct,stretchX:qt,stretchY:Qt,content:rr}}x(null,we)}}return{cancel:function(){G&&(G.cancel(),G=null),K&&(K.cancel(),K=null)}}}function E(g){var c=g.userImage;if(c&&c.render){var x=c.render();if(x)return g.data.replace(new Uint8Array(c.data.buffer)),!0}return!1}var I=1,F=function(g){function c(){g.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.isLoaded=function(){return this.loaded},c.prototype.setLoaded=function(d){if(this.loaded!==d&&(this.loaded=d,d)){for(var w=0,L=this.requestors;w=0?1.2:1))}V.prototype.draw=function(g){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(g,this.buffer,this.middle);for(var c=this.ctx.getImageData(0,0,this.size,this.size),x=new Uint8ClampedArray(this.size*this.size),d=0;d65535){ue(new Error("glyphs > 65535 not supported"));return}if(Ie.ranges[Ze]){ue(null,{stack:we,id:be,glyph:Ye});return}var Oe=Ie.requests[Ze];Oe||(Oe=Ie.requests[Ze]=[],re.loadGlyphRange(we,Ze,d.url,d.requestManager,function(Xe,ct){if(ct){for(var zt in ct)d._doesCharSupportLocalGlyph(+zt)||(Ie.glyphs[+zt]=ct[+zt]);Ie.ranges[Ze]=!0}for(var qt=0,Qt=Oe;qt1&&(te=c[++K]);var we=Math.abs(ue-te.left),be=Math.abs(ue-te.right),Ie=Math.min(we,be),Ye=void 0,Ze=L/d*(w+1);if(te.isDash){var Oe=w-Math.abs(Ze);Ye=Math.sqrt(Ie*Ie+Oe*Oe)}else Ye=w-Math.sqrt(Ie*Ie+Ze*Ze);this.data[G+ue]=Math.max(0,Math.min(255,Ye+128))}},Ce.prototype.addRegularDash=function(c){for(var x=c.length-1;x>=0;--x){var d=c[x],w=c[x+1];d.zeroLength?c.splice(x,1):w&&w.isDash===d.isDash&&(w.left=d.left,c.splice(x,1))}var L=c[0],R=c[c.length-1];L.isDash===R.isDash&&(L.left=R.left-this.width,R.right=L.right+this.width);for(var G=this.width*this.nextRow,K=0,te=c[K],ue=0;ue1&&(te=c[++K]);var we=Math.abs(ue-te.left),be=Math.abs(ue-te.right),Ie=Math.min(we,be),Ye=te.isDash?Ie:-Ie;this.data[G+ue]=Math.max(0,Math.min(255,Ye+128))}},Ce.prototype.addDash=function(c,x){var d=x?7:0,w=2*d+1;if(this.nextRow+w>this.height)return a.warnOnce("LineAtlas out of space"),null;for(var L=0,R=0;R=d.minX&&c.x=d.minY&&c.y0&&(ue[new a.OverscaledTileID(d.overscaledZ,G,w.z,R,w.y-1).key]={backfilled:!1},ue[new a.OverscaledTileID(d.overscaledZ,d.wrap,w.z,w.x,w.y-1).key]={backfilled:!1},ue[new a.OverscaledTileID(d.overscaledZ,te,w.z,K,w.y-1).key]={backfilled:!1}),w.y+10&&(L.resourceTiming=d._resourceTiming,d._resourceTiming=[]),d.fire(new a.Event("data",L))})},c.prototype.onAdd=function(d){this.map=d,this.load()},c.prototype.setData=function(d){var w=this;return this._data=d,this.fire(new a.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(L){if(L){w.fire(new a.ErrorEvent(L));return}var R={dataType:"source",sourceDataType:"content"};w._collectResourceTiming&&w._resourceTiming&&w._resourceTiming.length>0&&(R.resourceTiming=w._resourceTiming,w._resourceTiming=[]),w.fire(new a.Event("data",R))}),this},c.prototype.getClusterExpansionZoom=function(d,w){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:d,source:this.id},w),this},c.prototype.getClusterChildren=function(d,w){return this.actor.send("geojson.getClusterChildren",{clusterId:d,source:this.id},w),this},c.prototype.getClusterLeaves=function(d,w,L,R){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:d,limit:w,offset:L},R),this},c.prototype._updateWorkerData=function(d){var w=this;this._loaded=!1;var L=a.extend({},this.workerOptions),R=this._data;typeof R=="string"?(L.request=this.map._requestManager.transformRequest(a.browser.resolveURL(R),a.ResourceType.Source),L.request.collectResourceTiming=this._collectResourceTiming):L.data=JSON.stringify(R),this.actor.send(this.type+".loadData",L,function(G,K){w._removed||K&&K.abandoned||(w._loaded=!0,K&&K.resourceTiming&&K.resourceTiming[w.id]&&(w._resourceTiming=K.resourceTiming[w.id].slice(0)),w.actor.send(w.type+".coalesce",{source:L.source},null),d(G))})},c.prototype.loaded=function(){return this._loaded},c.prototype.loadTile=function(d,w){var L=this,R=d.actor?"reloadTile":"loadTile";d.actor=this.actor;var G={type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:a.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};d.request=this.actor.send(R,G,function(K,te){return delete d.request,d.unloadVectorData(),d.aborted?w(null):K?w(K):(d.loadVectorData(te,L.map.painter,R==="reloadTile"),w(null))})},c.prototype.abortTile=function(d){d.request&&(d.request.cancel(),delete d.request),d.aborted=!0},c.prototype.unloadTile=function(d){d.unloadVectorData(),this.actor.send("removeTile",{uid:d.uid,type:this.type,source:this.id})},c.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},c.prototype.serialize=function(){return a.extend({},this._options,{type:this.type,data:this._data})},c.prototype.hasTransition=function(){return!1},c}(a.Evented),ht=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),it=function(g){function c(x,d,w,L){g.call(this),this.id=x,this.dispatcher=w,this.coordinates=d.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(L),this.options=d}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.load=function(d,w){var L=this;this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),function(R,G){L._loaded=!0,R?L.fire(new a.ErrorEvent(R)):G&&(L.image=G,d&&(L.coordinates=d),w&&w(),L._finishLoading())})},c.prototype.loaded=function(){return this._loaded},c.prototype.updateImage=function(d){var w=this;return!this.image||!d.url?this:(this.options.url=d.url,this.load(d.coordinates,function(){w.texture=null}),this)},c.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))},c.prototype.onAdd=function(d){this.map=d,this.load()},c.prototype.setCoordinates=function(d){var w=this;this.coordinates=d;var L=d.map(a.MercatorCoordinate.fromLngLat);this.tileID=lt(L),this.minzoom=this.maxzoom=this.tileID.z;var R=L.map(function(G){return w.tileID.getTilePoint(G)._round()});return this._boundsArray=new a.StructArrayLayout4i8,this._boundsArray.emplaceBack(R[0].x,R[0].y,0,0),this._boundsArray.emplaceBack(R[1].x,R[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(R[3].x,R[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(R[2].x,R[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this},c.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var d=this.map.painter.context,w=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,ht.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new a.Texture(d,this.image,w.RGBA),this.texture.bind(w.LINEAR,w.CLAMP_TO_EDGE));for(var L in this.tiles){var R=this.tiles[L];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture)}}},c.prototype.loadTile=function(d,w){this.tileID&&this.tileID.equals(d.tileID.canonical)?(this.tiles[String(d.tileID.wrap)]=d,d.buckets={},w(null)):(d.state="errored",w(null))},c.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},c.prototype.hasTransition=function(){return!1},c}(a.Evented);function lt(g){for(var c=1/0,x=1/0,d=-1/0,w=-1/0,L=0,R=g;Lw.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+w.start(0)+" and "+w.end(0)+"-second mark."))):this.video.currentTime=d}},c.prototype.getVideo=function(){return this.video},c.prototype.onAdd=function(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},c.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var d=this.map.painter.context,w=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,ht.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(w.LINEAR,w.CLAMP_TO_EDGE),w.texSubImage2D(w.TEXTURE_2D,0,0,0,w.RGBA,w.UNSIGNED_BYTE,this.video)):(this.texture=new a.Texture(d,this.video,w.RGBA),this.texture.bind(w.LINEAR,w.CLAMP_TO_EDGE));for(var L in this.tiles){var R=this.tiles[L];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture)}}},c.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},c.prototype.hasTransition=function(){return this.video&&!this.video.paused},c}(it),_t=function(g){function c(x,d,w,L){g.call(this,x,d,w,L),d.coordinates?(!Array.isArray(d.coordinates)||d.coordinates.length!==4||d.coordinates.some(function(R){return!Array.isArray(R)||R.length!==2||R.some(function(G){return typeof G!="number"})}))&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,null,'missing required property "coordinates"'))),d.animate&&typeof d.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,null,'optional "animate" property must be a boolean value'))),d.canvas?typeof d.canvas!="string"&&!(d.canvas instanceof a.window.HTMLCanvasElement)&&this.fire(new a.ErrorEvent(new a.ValidationError("sources."+x,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.ErrorEvent(new a.ValidationError("sources."+x,null,'missing required property "canvas"'))),this.options=d,this.animate=d.animate!==void 0?d.animate:!0}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof a.window.HTMLCanvasElement?this.options.canvas:a.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new a.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()},c.prototype.getCanvas=function(){return this.canvas},c.prototype.onAdd=function(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()},c.prototype.onRemove=function(){this.pause()},c.prototype.prepare=function(){var d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var w=this.map.painter.context,L=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ht.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new a.Texture(w,this.canvas,L.RGBA,{premultiply:!0});for(var R in this.tiles){var G=this.tiles[R];G.state!=="loaded"&&(G.state="loaded",G.texture=this.texture)}}},c.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},c.prototype.hasTransition=function(){return this._playing},c.prototype._hasInvalidDimensions=function(){for(var d=0,w=[this.canvas.width,this.canvas.height];dthis.max){var G=this._getAndRemoveByKey(this.order[0]);G&&this.onRemove(G)}return this},Mt.prototype.has=function(c){return c.wrapped().key in this.data},Mt.prototype.getAndRemove=function(c){return this.has(c)?this._getAndRemoveByKey(c.wrapped().key):null},Mt.prototype._getAndRemoveByKey=function(c){var x=this.data[c].shift();return x.timeout&&clearTimeout(x.timeout),this.data[c].length===0&&delete this.data[c],this.order.splice(this.order.indexOf(c),1),x.value},Mt.prototype.getByKey=function(c){var x=this.data[c];return x?x[0].value:null},Mt.prototype.get=function(c){if(!this.has(c))return null;var x=this.data[c.wrapped().key][0];return x.value},Mt.prototype.remove=function(c,x){if(!this.has(c))return this;var d=c.wrapped().key,w=x===void 0?0:this.data[d].indexOf(x),L=this.data[d][w];return this.data[d].splice(w,1),L.timeout&&clearTimeout(L.timeout),this.data[d].length===0&&delete this.data[d],this.onRemove(L.value),this.order.splice(this.order.indexOf(d),1),this},Mt.prototype.setMaxSize=function(c){for(this.max=c;this.order.length>this.max;){var x=this._getAndRemoveByKey(this.order[0]);x&&this.onRemove(x)}return this},Mt.prototype.filter=function(c){var x=[];for(var d in this.data)for(var w=0,L=this.data[d];w1||(Math.abs(we)>1&&(Math.abs(we+Ie)===1?we+=Ie:Math.abs(we-Ie)===1&&(we-=Ie)),!(!ue.dem||!te.dem)&&(te.dem.backfillBorder(ue.dem,we,be),te.neighboringTiles&&te.neighboringTiles[Ye]&&(te.neighboringTiles[Ye].backfilled=!0)))}},c.prototype.getTile=function(d){return this.getTileByID(d.key)},c.prototype.getTileByID=function(d){return this._tiles[d]},c.prototype._retainLoadedChildren=function(d,w,L,R){for(var G in this._tiles){var K=this._tiles[G];if(!(R[G]||!K.hasData()||K.tileID.overscaledZ<=w||K.tileID.overscaledZ>L)){for(var te=K.tileID;K&&K.tileID.overscaledZ>w+1;){var ue=K.tileID.scaledTo(K.tileID.overscaledZ-1);K=this._tiles[ue.key],K&&K.hasData()&&(te=ue)}for(var we=te;we.overscaledZ>w;)if(we=we.scaledTo(we.overscaledZ-1),d[we.key]){R[te.key]=te;break}}}},c.prototype.findLoadedParent=function(d,w){if(d.key in this._loadedParentTiles){var L=this._loadedParentTiles[d.key];return L&&L.tileID.overscaledZ>=w?L:null}for(var R=d.overscaledZ-1;R>=w;R--){var G=d.scaledTo(R),K=this._getLoadedTile(G);if(K)return K}},c.prototype._getLoadedTile=function(d){var w=this._tiles[d.key];if(w&&w.hasData())return w;var L=this._cache.getByKey(d.wrapped().key);return L},c.prototype.updateCacheSize=function(d){var w=Math.ceil(d.width/this._source.tileSize)+1,L=Math.ceil(d.height/this._source.tileSize)+1,R=w*L,G=5,K=Math.floor(R*G),te=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,K):K;this._cache.setMaxSize(te)},c.prototype.handleWrapJump=function(d){var w=this._prevLng===void 0?d:this._prevLng,L=d-w,R=L/360,G=Math.round(R);if(this._prevLng=d,G){var K={};for(var te in this._tiles){var ue=this._tiles[te];ue.tileID=ue.tileID.unwrapTo(ue.tileID.wrap+G),K[ue.tileID.key]=ue}this._tiles=K;for(var we in this._timers)clearTimeout(this._timers[we]),delete this._timers[we];for(var be in this._tiles){var Ie=this._tiles[be];this._setTileReloadTimer(be,Ie)}}},c.prototype.update=function(d){var w=this;if(this.transform=d,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var L;this.used?this._source.tileID?L=d.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(_r){return new a.OverscaledTileID(_r.canonical.z,_r.wrap,_r.canonical.z,_r.canonical.x,_r.canonical.y)}):(L=d.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(L=L.filter(function(_r){return w._source.hasTile(_r)}))):L=[];var R=d.coveringZoomLevel(this._source),G=Math.max(R-c.maxOverzooming,this._source.minzoom),K=Math.max(R+c.maxUnderzooming,this._source.minzoom),te=this._updateRetainedTiles(L,R);if(yt(this._source.type)){for(var ue={},we={},be=Object.keys(te),Ie=0,Ye=be;Iethis._source.maxzoom){var ct=Oe.children(this._source.maxzoom)[0],zt=this.getTile(ct);if(zt&&zt.hasData()){L[ct.key]=ct;continue}}else{var qt=Oe.children(this._source.maxzoom);if(L[qt[0].key]&&L[qt[1].key]&&L[qt[2].key]&&L[qt[3].key])continue}for(var Qt=Xe.wasRequested(),rr=Oe.overscaledZ-1;rr>=G;--rr){var Zt=Oe.scaledTo(rr);if(R[Zt.key]||(R[Zt.key]=!0,Xe=this.getTile(Zt),!Xe&&Qt&&(Xe=this._addTile(Zt)),Xe&&(L[Zt.key]=Zt,Qt=Xe.wasRequested(),Xe.hasData())))break}}}return L},c.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var d in this._tiles){for(var w=[],L=void 0,R=this._tiles[d].tileID;R.overscaledZ>0;){if(R.key in this._loadedParentTiles){L=this._loadedParentTiles[R.key];break}w.push(R.key);var G=R.scaledTo(R.overscaledZ-1);if(L=this._getLoadedTile(G),L)break;R=G}for(var K=0,te=w;K0)&&(w.hasData()&&w.state!=="reloading"?this._cache.add(w.tileID,w,w.getExpiryTimeout()):(w.aborted=!0,this._abortTile(w),this._unloadTile(w))))},c.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var d in this._tiles)this._removeTile(d);this._cache.reset()},c.prototype.tilesIn=function(d,w,L){var R=this,G=[],K=this.transform;if(!K)return G;for(var te=L?K.getCameraQueryGeometry(d):d,ue=d.map(function(rr){return K.pointCoordinate(rr)}),we=te.map(function(rr){return K.pointCoordinate(rr)}),be=this.getIds(),Ie=1/0,Ye=1/0,Ze=-1/0,Oe=-1/0,Xe=0,ct=we;Xe=0&&Lr[1].y+_r>=0){var Sr=ue.map(function(Fa){return ar.getTilePoint(Fa)}),Xr=we.map(function(Fa){return ar.getTilePoint(Fa)});G.push({tile:Zt,tileID:ar,queryGeometry:Sr,cameraQueryGeometry:Xr,scale:cr})}}},Qt=0;Qt=a.browser.now())return!0}return!1},c.prototype.setFeatureState=function(d,w,L){d=d||"_geojsonTileLayer",this._state.updateState(d,w,L)},c.prototype.removeFeatureState=function(d,w,L){d=d||"_geojsonTileLayer",this._state.removeFeatureState(d,w,L)},c.prototype.getFeatureState=function(d,w){return d=d||"_geojsonTileLayer",this._state.getState(d,w)},c.prototype.setDependencies=function(d,w,L){var R=this._tiles[d];R&&R.setDependencies(w,L)},c.prototype.reloadTilesForDependencies=function(d,w){for(var L in this._tiles){var R=this._tiles[L];R.hasDependency(d,w)&&this._reloadTile(L,"reloading")}this._cache.filter(function(G){return!G.hasDependency(d,w)})},c}(a.Evented);rt.maxOverzooming=10,rt.maxUnderzooming=3;function Ve(g,c){var x=Math.abs(g.wrap*2)-+(g.wrap<0),d=Math.abs(c.wrap*2)-+(c.wrap<0);return g.overscaledZ-c.overscaledZ||d-x||c.canonical.y-g.canonical.y||c.canonical.x-g.canonical.x}function yt(g){return g==="raster"||g==="image"||g==="video"}function Dt(){return new a.window.Worker(bn.workerUrl)}var Ft="mapboxgl_preloaded_worker_pool",tr=function(){this.active={}};tr.prototype.acquire=function(c){if(!this.workers)for(this.workers=[];this.workers.length0?(w-R)/G:0;return this.points[L].mult(1-K).add(this.points[x].mult(K))};var Ga=function(c,x,d){var w=this.boxCells=[],L=this.circleCells=[];this.xCellCount=Math.ceil(c/d),this.yCellCount=Math.ceil(x/d);for(var R=0;Rthis.width||w<0||x>this.height)return L?!1:[];var G=[];if(c<=0&&x<=0&&this.width<=d&&this.height<=w){if(L)return!0;for(var K=0;K0:G}},Ga.prototype._queryCircle=function(c,x,d,w,L){var R=c-d,G=c+d,K=x-d,te=x+d;if(G<0||R>this.width||te<0||K>this.height)return w?!1:[];var ue=[],we={hitTest:w,circle:{x:c,y:x,radius:d},seenUids:{box:{},circle:{}}};return this._forEachCell(R,K,G,te,this._queryCellCircle,ue,we,L),w?ue.length>0:ue},Ga.prototype.query=function(c,x,d,w,L){return this._query(c,x,d,w,!1,L)},Ga.prototype.hitTest=function(c,x,d,w,L){return this._query(c,x,d,w,!0,L)},Ga.prototype.hitTestCircle=function(c,x,d,w){return this._queryCircle(c,x,d,!0,w)},Ga.prototype._queryCell=function(c,x,d,w,L,R,G,K){var te=G.seenUids,ue=this.boxCells[L];if(ue!==null)for(var we=this.bboxes,be=0,Ie=ue;be=we[Ze+0]&&w>=we[Ze+1]&&(!K||K(this.boxKeys[Ye]))){if(G.hitTest)return R.push(!0),!0;R.push({key:this.boxKeys[Ye],x1:we[Ze],y1:we[Ze+1],x2:we[Ze+2],y2:we[Ze+3]})}}}var Oe=this.circleCells[L];if(Oe!==null)for(var Xe=this.circles,ct=0,zt=Oe;ctG*G+K*K},Ga.prototype._circleAndRectCollide=function(c,x,d,w,L,R,G){var K=(R-w)/2,te=Math.abs(c-(w+K));if(te>K+d)return!1;var ue=(G-L)/2,we=Math.abs(x-(L+ue));if(we>ue+d)return!1;if(te<=K||we<=ue)return!0;var be=te-K,Ie=we-ue;return be*be+Ie*Ie<=d*d};function Jn(g,c,x,d,w){var L=a.create();return c?(a.scale(L,L,[1/w,1/w,1]),x||a.rotateZ(L,L,d.angle)):a.multiply(L,d.labelPlaneMatrix,g),L}function hu(g,c,x,d,w){if(c){var L=a.clone(g);return a.scale(L,L,[w,w,1]),x||a.rotateZ(L,L,-d.angle),L}else return d.glCoordMatrix}function Bi(g,c){var x=[g.x,g.y,0,1];Zf(x,x,c);var d=x[3];return{point:new a.Point(x[0]/d,x[1]/d),signedDistanceFromCamera:d}}function dl(g,c){return .5+.5*(g/c)}function Qd(g,c){var x=g[0]/g[3],d=g[1]/g[3],w=x>=-c[0]&&x<=c[0]&&d>=-c[1]&&d<=c[1];return w}function qc(g,c,x,d,w,L,R,G){var K=d?g.textSizeData:g.iconSizeData,te=a.evaluateSizeForZoom(K,x.transform.zoom),ue=[256/x.width*2+1,256/x.height*2+1],we=d?g.text.dynamicLayoutVertexArray:g.icon.dynamicLayoutVertexArray;we.clear();for(var be=g.lineVertexArray,Ie=d?g.text.placedSymbolArray:g.icon.placedSymbolArray,Ye=x.transform.width/x.transform.height,Ze=!1,Oe=0;OeL)return{useVertical:!0}}return(g===a.WritingMode.vertical?c.yx.x)?{needsFlipping:!0}:null}function vv(g,c,x,d,w,L,R,G,K,te,ue,we,be,Ie){var Ye=c/24,Ze=g.lineOffsetX*Ye,Oe=g.lineOffsetY*Ye,Xe;if(g.numGlyphs>1){var ct=g.glyphStartIndex+g.numGlyphs,zt=g.lineStartIndex,qt=g.lineStartIndex+g.lineLength,Qt=Nc(Ye,G,Ze,Oe,x,ue,we,g,K,L,be);if(!Qt)return{notEnoughRoom:!0};var rr=Bi(Qt.first.point,R).point,Zt=Bi(Qt.last.point,R).point;if(d&&!x){var ar=hv(g.writingMode,rr,Zt,Ie);if(ar)return ar}Xe=[Qt.first];for(var cr=g.glyphStartIndex+1;cr0?Xr.point:vu(we,Sr,_r,1,w),xa=hv(g.writingMode,_r,Fa,Ie);if(xa)return xa}var qr=pl(Ye*G.getoffsetX(g.glyphStartIndex),Ze,Oe,x,ue,we,g.segment,g.lineStartIndex,g.lineStartIndex+g.lineLength,K,L,be);if(!qr)return{notEnoughRoom:!0};Xe=[qr]}for(var Sa=0,ia=Xe;Sa0?1:-1,Ye=0;d&&(Ie*=-1,Ye=Math.PI),Ie<0&&(Ye+=Math.PI);for(var Ze=Ie>0?G+R:G+R+1,Oe=w,Xe=w,ct=0,zt=0,qt=Math.abs(be),Qt=[];ct+zt<=qt;){if(Ze+=Ie,Ze=K)return null;if(Xe=Oe,Qt.push(Oe),Oe=we[Ze],Oe===void 0){var rr=new a.Point(te.getx(Ze),te.gety(Ze)),Zt=Bi(rr,ue);if(Zt.signedDistanceFromCamera>0)Oe=we[Ze]=Zt.point;else{var ar=Ze-Ie,cr=ct===0?L:new a.Point(te.getx(ar),te.gety(ar));Oe=vu(cr,rr,Xe,qt-ct+1,ue)}}ct+=zt,zt=Xe.dist(Oe)}var _r=(qt-ct)/zt,Lr=Oe.sub(Xe),Sr=Lr.mult(_r)._add(Xe);Sr._add(Lr._unit()._perp()._mult(x*Ie));var Xr=Ye+Math.atan2(Oe.y-Xe.y,Oe.x-Xe.x);return Qt.push(Sr),{point:Sr,angle:Xr,path:Qt}}var $d=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ku(g,c){for(var x=0;x=1;Za--)ia.push(qr.path[Za]);for(var Va=1;Va0){for(var na=ia[0].clone(),Oa=ia[0].clone(),en=1;en=Xr.x&&Oa.x<=Fa.x&&na.y>=Xr.y&&Oa.y<=Fa.y?mi=[ia]:Oa.xFa.x||Oa.yFa.y?mi=[]:mi=a.clipLine([ia],Xr.x,Xr.y,Fa.x,Fa.y)}for(var In=0,Ps=mi;In=this.screenRightBoundary||wthis.screenBottomBoundary},Ho.prototype.isInsideGrid=function(c,x,d,w){return d>=0&&c=0&&x0){var qt;return this.prevPlacement&&this.prevPlacement.variableOffsets[be.crossTileID]&&this.prevPlacement.placements[be.crossTileID]&&this.prevPlacement.placements[be.crossTileID].text&&(qt=this.prevPlacement.variableOffsets[be.crossTileID].anchor),this.variableOffsets[be.crossTileID]={textOffset:Oe,width:d,height:w,anchor:c,textBoxScale:L,prevAnchor:qt},this.markUsedJustification(Ie,c,be,Ye),Ie.allowVerticalPlacement&&(this.markUsedOrientation(Ie,Ye,be),this.placedOrientations[be.crossTileID]=Ye),{shift:Xe,placedGlyphBoxes:ct}}},oo.prototype.placeLayerBucketPart=function(c,x,d){var w=this,L=c.parameters,R=L.bucket,G=L.layout,K=L.posMatrix,te=L.textLabelPlaneMatrix,ue=L.labelToScreenMatrix,we=L.textPixelRatio,be=L.holdingForFade,Ie=L.collisionBoxArray,Ye=L.partiallyEvaluatedTextSize,Ze=L.collisionGroup,Oe=G.get("text-optional"),Xe=G.get("icon-optional"),ct=G.get("text-allow-overlap"),zt=G.get("icon-allow-overlap"),qt=G.get("text-rotation-alignment")==="map",Qt=G.get("text-pitch-alignment")==="map",rr=G.get("icon-text-fit")!=="none",Zt=G.get("symbol-z-order")==="viewport-y",ar=ct&&(zt||!R.hasIconData()||Xe),cr=zt&&(ct||!R.hasTextData()||Oe);!R.collisionArrays&&Ie&&R.deserializeCollisionBoxes(Ie);var _r=function(qr,Sa){if(!x[qr.crossTileID]){if(be){w.placements[qr.crossTileID]=new du(!1,!1,!1);return}var ia=!1,Za=!1,Va=!0,Ai=null,Pa={box:null,offscreen:null},mi={box:null,offscreen:null},na=null,Oa=null,en=null,In=0,Ps=0,Ds=0;Sa.textFeatureIndex?In=Sa.textFeatureIndex:qr.useRuntimeCollisionCircles&&(In=qr.featureIndex),Sa.verticalTextFeatureIndex&&(Ps=Sa.verticalTextFeatureIndex);var el=Sa.textBox;if(el){var Bl=function(sn){var Qo=a.WritingMode.horizontal;if(R.allowVerticalPlacement&&!sn&&w.prevPlacement){var $o=w.prevPlacement.placedOrientations[qr.crossTileID];$o&&(w.placedOrientations[qr.crossTileID]=$o,Qo=$o,w.markUsedOrientation(R,Qo,qr))}return Qo},oc=function(sn,Qo){if(R.allowVerticalPlacement&&qr.numVerticalGlyphVertices>0&&Sa.verticalTextBox)for(var $o=0,Vp=R.writingModes;$o0&&(Ko=Ko.filter(function(sn){return sn!==Do.anchor}),Ko.unshift(Do.anchor))}var tl=function(sn,Qo,$o){for(var Vp=sn.x2-sn.x1,oy=sn.y2-sn.y1,s3=qr.textBoxScale,l3=rr&&!zt?Qo:null,Xv={box:[],offscreen:!1},u3=ct?Ko.length*2:Ko.length,Hp=0;Hp=Ko.length,sy=w.attemptAnchorPlacement(f3,sn,Vp,oy,s3,qt,Qt,we,K,Ze,c3,qr,R,$o,l3);if(sy&&(Xv=sy.placedGlyphBoxes,Xv&&Xv.box&&Xv.box.length)){ia=!0,Ai=sy.shift;break}}return Xv},ku=function(){return tl(el,Sa.iconBox,a.WritingMode.horizontal)},rl=function(){var sn=Sa.verticalTextBox,Qo=Pa&&Pa.box&&Pa.box.length;return R.allowVerticalPlacement&&!Qo&&qr.numVerticalGlyphVertices>0&&sn?tl(sn,Sa.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}};oc(ku,rl),Pa&&(ia=Pa.box,Va=Pa.offscreen);var qp=Bl(Pa&&Pa.box);if(!ia&&w.prevPlacement){var ch=w.prevPlacement.variableOffsets[qr.crossTileID];ch&&(w.variableOffsets[qr.crossTileID]=ch,w.markUsedJustification(R,ch.anchor,qr,qp))}}else{var Ol=function(sn,Qo){var $o=w.collisionIndex.placeCollisionBox(sn,ct,we,K,Ze.predicate);return $o&&$o.box&&$o.box.length&&(w.markUsedOrientation(R,Qo,qr),w.placedOrientations[qr.crossTileID]=Qo),$o},Po=function(){return Ol(el,a.WritingMode.horizontal)},Ul=function(){var sn=Sa.verticalTextBox;return R.allowVerticalPlacement&&qr.numVerticalGlyphVertices>0&&sn?Ol(sn,a.WritingMode.vertical):{box:null,offscreen:null}};oc(Po,Ul),Bl(Pa&&Pa.box&&Pa.box.length)}}if(na=Pa,ia=na&&na.box&&na.box.length>0,Va=na&&na.offscreen,qr.useRuntimeCollisionCircles){var Vn=R.text.placedSymbolArray.get(qr.centerJustifiedTextSymbolIndex),Np=a.evaluateSizeForFeature(R.textSizeData,Ye,Vn),Wv=G.get("text-padding"),xo=qr.collisionCircleDiameter;Oa=w.collisionIndex.placeCollisionCircles(ct,Vn,R.lineVertexArray,R.glyphOffsetArray,Np,K,te,ue,d,Qt,Ze.predicate,xo,Wv),ia=ct||Oa.circles.length>0&&!Oa.collisionDetected,Va=Va&&Oa.offscreen}if(Sa.iconFeatureIndex&&(Ds=Sa.iconFeatureIndex),Sa.iconBox){var hh=function(sn){var Qo=rr&&Ai?mv(sn,Ai.x,Ai.y,qt,Qt,w.transform.angle):sn;return w.collisionIndex.placeCollisionBox(Qo,zt,we,K,Ze.predicate)};mi&&mi.box&&mi.box.length&&Sa.verticalIconBox?(en=hh(Sa.verticalIconBox),Za=en.box.length>0):(en=hh(Sa.iconBox),Za=en.box.length>0),Va=Va&&en.offscreen}var Bp=Oe||qr.numHorizontalGlyphVertices===0&&qr.numVerticalGlyphVertices===0,Op=Xe||qr.numIconVertices===0;if(!Bp&&!Op?Za=ia=Za&&ia:Op?Bp||(Za=Za&&ia):ia=Za&&ia,ia&&na&&na.box&&(mi&&mi.box&&Ps?w.collisionIndex.insertCollisionBox(na.box,G.get("text-ignore-placement"),R.bucketInstanceId,Ps,Ze.ID):w.collisionIndex.insertCollisionBox(na.box,G.get("text-ignore-placement"),R.bucketInstanceId,In,Ze.ID)),Za&&en&&w.collisionIndex.insertCollisionBox(en.box,G.get("icon-ignore-placement"),R.bucketInstanceId,Ds,Ze.ID),Oa&&(ia&&w.collisionIndex.insertCollisionCircles(Oa.circles,G.get("text-ignore-placement"),R.bucketInstanceId,In,Ze.ID),d)){var Up=R.bucketInstanceId,vh=w.collisionCircleArrays[Up];vh===void 0&&(vh=w.collisionCircleArrays[Up]=new ep);for(var dh=0;dh=0;--Sr){var Xr=Lr[Sr];_r(R.symbolInstances.get(Xr),R.collisionArrays[Xr])}else for(var Fa=c.symbolInstanceStart;Fa=0&&(R>=0&&ue!==R?c.text.placedSymbolArray.get(ue).crossTileID=0:c.text.placedSymbolArray.get(ue).crossTileID=d.crossTileID)}},oo.prototype.markUsedOrientation=function(c,x,d){for(var w=x===a.WritingMode.horizontal||x===a.WritingMode.horizontalOnly?x:0,L=x===a.WritingMode.vertical?x:0,R=[d.leftJustifiedTextSymbolIndex,d.centerJustifiedTextSymbolIndex,d.rightJustifiedTextSymbolIndex],G=0,K=R;G0||Qt>0,_r=zt.numIconVertices>0,Lr=w.placedOrientations[zt.crossTileID],Sr=Lr===a.WritingMode.vertical,Xr=Lr===a.WritingMode.horizontal||Lr===a.WritingMode.horizontalOnly;if(cr){var Fa=ef(ar.text),xa=Sr?Cr:Fa;Ye(c.text,qt,xa);var qr=Xr?Cr:Fa;Ye(c.text,Qt,qr);var Sa=ar.text.isHidden();[zt.rightJustifiedTextSymbolIndex,zt.centerJustifiedTextSymbolIndex,zt.leftJustifiedTextSymbolIndex].forEach(function(Ds){Ds>=0&&(c.text.placedSymbolArray.get(Ds).hidden=Sa||Sr?1:0)}),zt.verticalPlacedTextSymbolIndex>=0&&(c.text.placedSymbolArray.get(zt.verticalPlacedTextSymbolIndex).hidden=Sa||Xr?1:0);var ia=w.variableOffsets[zt.crossTileID];ia&&w.markUsedJustification(c,ia.anchor,zt,Lr);var Za=w.placedOrientations[zt.crossTileID];Za&&(w.markUsedJustification(c,"left",zt,Za),w.markUsedOrientation(c,Za,zt))}if(_r){var Va=ef(ar.icon),Ai=!(be&&zt.verticalPlacedIconSymbolIndex&&Sr);if(zt.placedIconSymbolIndex>=0){var Pa=Ai?Va:Cr;Ye(c.icon,zt.numIconVertices,Pa),c.icon.placedSymbolArray.get(zt.placedIconSymbolIndex).hidden=ar.icon.isHidden()}if(zt.verticalPlacedIconSymbolIndex>=0){var mi=Ai?Cr:Va;Ye(c.icon,zt.numVerticalIconVertices,mi),c.icon.placedSymbolArray.get(zt.verticalPlacedIconSymbolIndex).hidden=ar.icon.isHidden()}}if(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData()){var na=c.collisionArrays[ct];if(na){var Oa=new a.Point(0,0);if(na.textBox||na.verticalTextBox){var en=!0;if(te){var In=w.variableOffsets[rr];In?(Oa=pv(In.anchor,In.width,In.height,In.textOffset,In.textBoxScale),ue&&Oa._rotate(we?w.transform.angle:-w.transform.angle)):en=!1}na.textBox&&Xt(c.textCollisionBox.collisionVertexArray,ar.text.placed,!en||Sr,Oa.x,Oa.y),na.verticalTextBox&&Xt(c.textCollisionBox.collisionVertexArray,ar.text.placed,!en||Xr,Oa.x,Oa.y)}var Ps=!!(!Xr&&na.verticalIconBox);na.iconBox&&Xt(c.iconCollisionBox.collisionVertexArray,ar.icon.placed,Ps,be?Oa.x:0,be?Oa.y:0),na.verticalIconBox&&Xt(c.iconCollisionBox.collisionVertexArray,ar.icon.placed,!Ps,be?Oa.x:0,be?Oa.y:0)}}},Oe=0;Oec},oo.prototype.setStale=function(){this.stale=!0};function Xt(g,c,x,d,w){g.emplaceBack(c?1:0,x?1:0,d||0,w||0),g.emplaceBack(c?1:0,x?1:0,d||0,w||0),g.emplaceBack(c?1:0,x?1:0,d||0,w||0),g.emplaceBack(c?1:0,x?1:0,d||0,w||0)}var Or=Math.pow(2,25),tp=Math.pow(2,24),pu=Math.pow(2,17),an=Math.pow(2,16),yl=Math.pow(2,9),bs=Math.pow(2,8),$u=Math.pow(2,1);function ef(g){if(g.opacity===0&&!g.placed)return 0;if(g.opacity===1&&g.placed)return 4294967295;var c=g.placed?1:0,x=Math.floor(g.opacity*127);return x*Or+c*tp+x*pu+c*an+x*yl+c*bs+x*$u+c}var Cr=0,wa=function(c){this._sortAcrossTiles=c.layout.get("symbol-z-order")!=="viewport-y"&&c.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wa.prototype.continuePlacement=function(c,x,d,w,L){for(var R=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var G=c[this._currentPlacementIndex],K=x[G],te=this.placement.collisionIndex.transform.zoom;if(K.type==="symbol"&&(!K.minzoom||K.minzoom<=te)&&(!K.maxzoom||K.maxzoom>te)){this._inProgressLayer||(this._inProgressLayer=new wa(K));var ue=this._inProgressLayer.continuePlacement(d[K.source],this.placement,this._showCollisionBoxes,K,R);if(ue)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ta.prototype.commit=function(c){return this.placement.commit(c),this.placement};var ws=512/a.EXTENT/2,gl=function(c,x,d){this.tileID=c,this.indexedSymbolInstances={},this.bucketInstanceId=d;for(var w=0;wc.overscaledZ)for(var te in K){var ue=K[te];ue.tileID.isChildOf(c)&&ue.findMatches(x.symbolInstances,c,R)}else{var we=c.scaledTo(Number(G)),be=K[we.key];be&&be.findMatches(x.symbolInstances,c,R)}}for(var Ie=0;Ie0)throw new Error("Unimplemented: "+R.map(function(G){return G.command}).join(", ")+".");return L.forEach(function(G){G.command!=="setTransition"&&w[G.command].apply(w,G.args)}),this.stylesheet=d,!0},c.prototype.addImage=function(d,w){if(this.getImage(d))return this.fire(new a.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(d,w),this._afterImageUpdated(d)},c.prototype.updateImage=function(d,w){this.imageManager.updateImage(d,w)},c.prototype.getImage=function(d){return this.imageManager.getImage(d)},c.prototype.removeImage=function(d){if(!this.getImage(d))return this.fire(new a.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(d),this._afterImageUpdated(d)},c.prototype._afterImageUpdated=function(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))},c.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},c.prototype.addSource=function(d,w,L){var R=this;if(L===void 0&&(L={}),this._checkLoaded(),this.sourceCaches[d]!==void 0)throw new Error("There is already a source with this ID");if(!w.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(w).join(", ")+".");var G=["vector","raster","geojson","video","image"],K=G.indexOf(w.type)>=0;if(!(K&&this._validate(a.validateStyle.source,"sources."+d,w,null,L))){this.map&&this.map._collectResourceTiming&&(w.collectResourceTiming=!0);var te=this.sourceCaches[d]=new rt(d,w,this.dispatcher);te.style=this,te.setEventedParent(this,function(){return{isSourceLoaded:R.loaded(),source:te.serialize(),sourceId:d}}),te.onAdd(this.map),this._changed=!0}},c.prototype.removeSource=function(d){if(this._checkLoaded(),this.sourceCaches[d]===void 0)throw new Error("There is no source with this ID");for(var w in this._layers)if(this._layers[w].source===d)return this.fire(new a.ErrorEvent(new Error('Source "'+d+'" cannot be removed while layer "'+w+'" is using it.')));var L=this.sourceCaches[d];delete this.sourceCaches[d],delete this._updatedSources[d],L.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),L.setEventedParent(null),L.clearTiles(),L.onRemove&&L.onRemove(this.map),this._changed=!0},c.prototype.setGeoJSONSourceData=function(d,w){this._checkLoaded();var L=this.sourceCaches[d].getSource();L.setData(w),this._changed=!0},c.prototype.getSource=function(d){return this.sourceCaches[d]&&this.sourceCaches[d].getSource()},c.prototype.addLayer=function(d,w,L){L===void 0&&(L={}),this._checkLoaded();var R=d.id;if(this.getLayer(R)){this.fire(new a.ErrorEvent(new Error('Layer with id "'+R+'" already exists on this map')));return}var G;if(d.type==="custom"){if(us(this,a.validateCustomStyleLayer(d)))return;G=a.createStyleLayer(d)}else{if(typeof d.source=="object"&&(this.addSource(R,d.source),d=a.clone$1(d),d=a.extend(d,{source:R})),this._validate(a.validateStyle.layer,"layers."+R,d,{arrayIndex:-1},L))return;G=a.createStyleLayer(d),this._validateLayer(G),G.setEventedParent(this,{layer:{id:R}}),this._serializedLayers[G.id]=G.serialize()}var K=w?this._order.indexOf(w):this._order.length;if(w&&K===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+w+'" does not exist on this map.')));return}if(this._order.splice(K,0,R),this._layerOrderChanged=!0,this._layers[R]=G,this._removedLayers[R]&&G.source&&G.type!=="custom"){var te=this._removedLayers[R];delete this._removedLayers[R],te.type!==G.type?this._updatedSources[G.source]="clear":(this._updatedSources[G.source]="reload",this.sourceCaches[G.source].pause())}this._updateLayer(G),G.onAdd&&G.onAdd(this.map)},c.prototype.moveLayer=function(d,w){this._checkLoaded(),this._changed=!0;var L=this._layers[d];if(!L){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be moved.")));return}if(d!==w){var R=this._order.indexOf(d);this._order.splice(R,1);var G=w?this._order.indexOf(w):this._order.length;if(w&&G===-1){this.fire(new a.ErrorEvent(new Error('Layer with id "'+w+'" does not exist on this map.')));return}this._order.splice(G,0,d),this._layerOrderChanged=!0}},c.prototype.removeLayer=function(d){this._checkLoaded();var w=this._layers[d];if(!w){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be removed.")));return}w.setEventedParent(null);var L=this._order.indexOf(d);this._order.splice(L,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=w,delete this._layers[d],delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],w.onRemove&&w.onRemove(this.map)},c.prototype.getLayer=function(d){return this._layers[d]},c.prototype.hasLayer=function(d){return d in this._layers},c.prototype.setLayerZoomRange=function(d,w,L){this._checkLoaded();var R=this.getLayer(d);if(!R){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot have zoom extent.")));return}R.minzoom===w&&R.maxzoom===L||(w!=null&&(R.minzoom=w),L!=null&&(R.maxzoom=L),this._updateLayer(R))},c.prototype.setFilter=function(d,w,L){L===void 0&&(L={}),this._checkLoaded();var R=this.getLayer(d);if(!R){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be filtered.")));return}if(!a.deepEqual(R.filter,w)){if(w==null){R.filter=void 0,this._updateLayer(R);return}this._validate(a.validateStyle.filter,"layers."+R.id+".filter",w,null,L)||(R.filter=a.clone$1(w),this._updateLayer(R))}},c.prototype.getFilter=function(d){return a.clone$1(this.getLayer(d).filter)},c.prototype.setLayoutProperty=function(d,w,L,R){R===void 0&&(R={}),this._checkLoaded();var G=this.getLayer(d);if(!G){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")));return}a.deepEqual(G.getLayoutProperty(w),L)||(G.setLayoutProperty(w,L,R),this._updateLayer(G))},c.prototype.getLayoutProperty=function(d,w){var L=this.getLayer(d);if(!L){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style.")));return}return L.getLayoutProperty(w)},c.prototype.setPaintProperty=function(d,w,L,R){R===void 0&&(R={}),this._checkLoaded();var G=this.getLayer(d);if(!G){this.fire(new a.ErrorEvent(new Error("The layer '"+d+"' does not exist in the map's style and cannot be styled.")));return}if(!a.deepEqual(G.getPaintProperty(w),L)){var K=G.setPaintProperty(w,L,R);K&&this._updateLayer(G),this._changed=!0,this._updatedPaintProps[d]=!0}},c.prototype.getPaintProperty=function(d,w){return this.getLayer(d).getPaintProperty(w)},c.prototype.setFeatureState=function(d,w){this._checkLoaded();var L=d.source,R=d.sourceLayer,G=this.sourceCaches[L];if(G===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+L+"' does not exist in the map's style.")));return}var K=G.getSource().type;if(K==="geojson"&&R){this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(K==="vector"&&!R){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}d.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),G.setFeatureState(R,d.id,w)},c.prototype.removeFeatureState=function(d,w){this._checkLoaded();var L=d.source,R=this.sourceCaches[L];if(R===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+L+"' does not exist in the map's style.")));return}var G=R.getSource().type,K=G==="vector"?d.sourceLayer:void 0;if(G==="vector"&&!K){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(w&&typeof d.id!="string"&&typeof d.id!="number"){this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}R.removeFeatureState(K,d.id,w)},c.prototype.getFeatureState=function(d){this._checkLoaded();var w=d.source,L=d.sourceLayer,R=this.sourceCaches[w];if(R===void 0){this.fire(new a.ErrorEvent(new Error("The source '"+w+"' does not exist in the map's style.")));return}var G=R.getSource().type;if(G==="vector"&&!L){this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return d.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),R.getFeatureState(L,d.id)},c.prototype.getTransition=function(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},c.prototype.serialize=function(){return a.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:a.mapObject(this.sourceCaches,function(d){return d.serialize()}),layers:this._serializeLayers(this._order)},function(d){return d!==void 0})},c.prototype._updateLayer=function(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.sourceCaches[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause()),this._changed=!0},c.prototype._flattenAndSortRenderedFeatures=function(d){for(var w=this,L=function(Xr){return w._layers[Xr].type==="fill-extrusion"},R={},G=[],K=this._order.length-1;K>=0;K--){var te=this._order[K];if(L(te)){R[te]=K;for(var ue=0,we=d;ue=0;ct--){var zt=this._order[ct];if(L(zt))for(var qt=G.length-1;qt>=0;qt--){var Qt=G[qt].feature;if(R[Qt.layer.id] 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);}`,wl=Fi(Bc,yu),Vc=Fi(Mm,Yf),Tl=Fi(ni,Wf),Al=Fi(yv,gn),Tv=Fi(Pn,rp),Hc=Fi(tf,nn),As=Fi(Eo,Zo),fn=Fi(un,Xf),Bm=Fi(on,Yo),Om=Fi(js,Sm),Ml=Fi(Wo,km),rf=Fi(Js,Dn),hs=Fi(Cm,xl),up=Fi(bl,gv),fp=Fi(Em,Lm),af=Fi(Oc,Pm),cp=Fi(Dm,zm),hp=Fi(_v,Im),Um=Fi(Rm,xv),Vm=Fi(ap,ip),Av=Fi(bv,Fm),Mv=Fi(wv,gu),Sv=Fi(np,qm),jf=Fi(op,sp),Gc=Fi(lp,Nm),vp=Fi(cs,Uc);function Fi(g,c){var x=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,d=c.match(/attribute ([\w]+) ([\w]+)/g),w=g.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),L=c.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),F=L?L.concat(w):w,G={};return g=g.replace(x,function(K,te,ue,we,be){return G[be]=!0,te==="define"?` +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);}`,wl=Fi(Bc,yu),Vc=Fi(Mm,Yf),Tl=Fi(ni,Wf),Al=Fi(yv,gn),Tv=Fi(Pn,rp),Hc=Fi(tf,nn),As=Fi(Eo,Zo),fn=Fi(un,Xf),Bm=Fi(on,Yo),Om=Fi(js,Sm),Ml=Fi(Wo,km),rf=Fi(Js,Dn),hs=Fi(Cm,xl),up=Fi(bl,gv),fp=Fi(Em,Lm),af=Fi(Oc,Pm),cp=Fi(Dm,zm),hp=Fi(_v,Im),Um=Fi(Rm,xv),Vm=Fi(ap,ip),Av=Fi(bv,Fm),Mv=Fi(wv,gu),Sv=Fi(np,qm),jf=Fi(op,sp),Gc=Fi(lp,Nm),vp=Fi(cs,Uc);function Fi(g,c){var x=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,d=c.match(/attribute ([\w]+) ([\w]+)/g),w=g.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),L=c.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),R=L?L.concat(w):w,G={};return g=g.replace(x,function(K,te,ue,we,be){return G[be]=!0,te==="define"?` #ifndef HAS_UNIFORM_u_`+be+` varying `+ue+" "+we+" "+be+`; #else @@ -517,9 +517,9 @@ uniform `+ue+" "+we+" u_"+be+`; #else `+ue+" "+we+" "+be+" = u_"+be+`; #endif -`}),{fragmentSource:g,vertexSource:c,staticAttributes:d,staticUniforms:F}}var Hm=Object.freeze({__proto__:null,prelude:wl,background:Vc,backgroundPattern:Tl,circle:Al,clippingMask:Tv,heatmap:Hc,heatmapTexture:As,collisionBox:fn,collisionCircle:Bm,debug:Om,fill:Ml,fillOutline:rf,fillOutlinePattern:hs,fillPattern:up,fillExtrusion:fp,fillExtrusionPattern:af,hillshadePrepare:cp,hillshade:hp,line:Um,lineGradient:Vm,linePattern:Av,lineSDF:Mv,raster:Sv,symbolIcon:jf,symbolSDF:Gc,symbolTextAndIcon:vp}),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(c,x,d,w,L,F,G,K){this.context=c;for(var te=this.boundPaintVertexBuffers.length!==w.length,ue=0;!te&&ue>16,G>>16],u_pixel_coord_lower:[F&65535,G&65535]}}function _u(g,c,x,d){var w=x.imageManager.getPattern(g.from.toString()),L=x.imageManager.getPattern(g.to.toString()),F=x.imageManager.getPixelSize(),G=F.width,K=F.height,te=Math.pow(2,d.tileID.overscaledZ),ue=d.tileSize*Math.pow(2,x.transform.tileZoom)/te,we=ue*(d.tileID.canonical.x+d.tileID.wrap*te),be=ue*d.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:w.tl,u_pattern_br_a:w.br,u_pattern_tl_b:L.tl,u_pattern_br_b:L.br,u_texsize:[G,K],u_mix:c.t,u_pattern_size_a:w.displaySize,u_pattern_size_b:L.displaySize,u_scale_a:c.fromScale,u_scale_b:c.toScale,u_tile_units_to_pixels:1/mo(d,1,x.transform.tileZoom),u_pixel_coord_upper:[we>>16,be>>16],u_pixel_coord_lower:[we&65535,be&65535]}}var Cv=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_lightpos:new a.Uniform3f(g,c.u_lightpos),u_lightintensity:new a.Uniform1f(g,c.u_lightintensity),u_lightcolor:new a.Uniform3f(g,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(g,c.u_vertical_gradient),u_opacity:new a.Uniform1f(g,c.u_opacity)}},_n=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_lightpos:new a.Uniform3f(g,c.u_lightpos),u_lightintensity:new a.Uniform1f(g,c.u_lightintensity),u_lightcolor:new a.Uniform3f(g,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(g,c.u_vertical_gradient),u_height_factor:new a.Uniform1f(g,c.u_height_factor),u_image:new a.Uniform1i(g,c.u_image),u_texsize:new a.Uniform2f(g,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade),u_opacity:new a.Uniform1f(g,c.u_opacity)}},Jf=function(g,c,x,d){var w=c.style.light,L=w.properties.get("position"),F=[L.x,L.y,L.z],G=a.create$1();w.properties.get("anchor")==="viewport"&&a.fromRotation(G,-c.transform.angle),a.transformMat3(F,F,G);var K=w.properties.get("color");return{u_matrix:g,u_lightpos:F,u_lightintensity:w.properties.get("intensity"),u_lightcolor:[K.r,K.g,K.b],u_vertical_gradient:+x,u_opacity:d}},Ks=function(g,c,x,d,w,L,F){return a.extend(Jf(g,c,x,d),nf(L,c,F),{u_height_factor:-Math.pow(2,w.overscaledZ)/F.tileSize/8})},Sl=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},kl=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_image:new a.Uniform1i(g,c.u_image),u_texsize:new a.Uniform2f(g,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade)}},Cl=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_world:new a.Uniform2f(g,c.u_world)}},Qs=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_world:new a.Uniform2f(g,c.u_world),u_image:new a.Uniform1i(g,c.u_image),u_texsize:new a.Uniform2f(g,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade)}},Ms=function(g){return{u_matrix:g}},Ss=function(g,c,x,d){return a.extend(Ms(g),nf(x,c,d))},El=function(g,c){return{u_matrix:g,u_world:c}},pp=function(g,c,x,d,w){return a.extend(Ss(g,c,x,d),{u_world:w})},Gm=function(g,c){return{u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(g,c.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(g,c.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},Zm=function(g,c,x,d){var w=g.transform,L,F;if(d.paint.get("circle-pitch-alignment")==="map"){var G=mo(x,1,w.zoom);L=!0,F=[G,G]}else L=!1,F=w.pixelsToGLUnits;return{u_camera_to_center_distance:w.cameraToCenterDistance,u_scale_with_map:+(d.paint.get("circle-pitch-scale")==="map"),u_matrix:g.translatePosMatrix(c.posMatrix,x,d.paint.get("circle-translate"),d.paint.get("circle-translate-anchor")),u_pitch_with_map:+L,u_device_pixel_ratio:a.browser.devicePixelRatio,u_extrude_scale:F}},Ym=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(g,c.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(g,c.u_extrude_scale),u_overscale_factor:new a.Uniform1f(g,c.u_overscale_factor)}},mp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_inv_matrix:new a.UniformMatrix4f(g,c.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(g,c.u_viewport_size)}},yp=function(g,c,x){var d=mo(x,1,c.zoom),w=Math.pow(2,c.zoom-x.tileID.overscaledZ),L=x.tileID.overscaleFactor();return{u_matrix:g,u_camera_to_center_distance:c.cameraToCenterDistance,u_pixels_to_tile_units:d,u_extrude_scale:[c.pixelsToGLUnits[0]/(d*w),c.pixelsToGLUnits[1]/(d*w)],u_overscale_factor:L}},Ev=function(g,c,x){return{u_matrix:g,u_inv_matrix:c,u_camera_to_center_distance:x.cameraToCenterDistance,u_viewport_size:[x.width,x.height]}},Lv=function(g,c){return{u_color:new a.UniformColor(g,c.u_color),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_overlay:new a.Uniform1i(g,c.u_overlay),u_overlay_scale:new a.Uniform1f(g,c.u_overlay_scale)}},Kf=function(g,c,x){return x===void 0&&(x=1),{u_matrix:g,u_color:c,u_overlay:0,u_overlay_scale:x}},Yc=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},gp=function(g){return{u_matrix:g}},Pv=function(g,c){return{u_extrude_scale:new a.Uniform1f(g,c.u_extrude_scale),u_intensity:new a.Uniform1f(g,c.u_intensity),u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},_p=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_world:new a.Uniform2f(g,c.u_world),u_image:new a.Uniform1i(g,c.u_image),u_color_ramp:new a.Uniform1i(g,c.u_color_ramp),u_opacity:new a.Uniform1f(g,c.u_opacity)}},of=function(g,c,x,d){return{u_matrix:g,u_extrude_scale:mo(c,1,x),u_intensity:d}},Wm=function(g,c,x,d){var w=a.create();a.ortho(w,0,g.width,g.height,0,0,1);var L=g.context.gl;return{u_matrix:w,u_world:[L.drawingBufferWidth,L.drawingBufferHeight],u_image:x,u_color_ramp:d,u_opacity:c.paint.get("heatmap-opacity")}},xp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_image:new a.Uniform1i(g,c.u_image),u_latrange:new a.Uniform2f(g,c.u_latrange),u_light:new a.Uniform2f(g,c.u_light),u_shadow:new a.UniformColor(g,c.u_shadow),u_highlight:new a.UniformColor(g,c.u_highlight),u_accent:new a.UniformColor(g,c.u_accent)}},bp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_image:new a.Uniform1i(g,c.u_image),u_dimension:new a.Uniform2f(g,c.u_dimension),u_zoom:new a.Uniform1f(g,c.u_zoom),u_unpack:new a.Uniform4f(g,c.u_unpack)}},wp=function(g,c,x){var d=x.paint.get("hillshade-shadow-color"),w=x.paint.get("hillshade-highlight-color"),L=x.paint.get("hillshade-accent-color"),F=x.paint.get("hillshade-illumination-direction")*(Math.PI/180);x.paint.get("hillshade-illumination-anchor")==="viewport"&&(F-=g.transform.angle);var G=!g.options.moving;return{u_matrix:g.transform.calculatePosMatrix(c.tileID.toUnwrapped(),G),u_image:0,u_latrange:zv(g,c.tileID),u_light:[x.paint.get("hillshade-exaggeration"),F],u_shadow:d,u_highlight:w,u_accent:L}},Dv=function(g,c){var x=c.stride,d=a.create();return a.ortho(d,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(d,d,[0,-a.EXTENT,0]),{u_matrix:d,u_image:1,u_dimension:[x,x],u_zoom:g.overscaledZ,u_unpack:c.getUnpackVector()}};function zv(g,c){var x=Math.pow(2,c.canonical.z),d=c.canonical.y;return[new a.MercatorCoordinate(0,d/x).toLngLat().lat,new a.MercatorCoordinate(0,(d+1)/x).toLngLat().lat]}var xu=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels)}},Ll=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels),u_image:new a.Uniform1i(g,c.u_image),u_image_height:new a.Uniform1f(g,c.u_image_height)}},Qf=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_texsize:new a.Uniform2f(g,c.u_texsize),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_image:new a.Uniform1i(g,c.u_image),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade)}},Iv=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(g,c.u_patternscale_a),u_patternscale_b:new a.Uniform2f(g,c.u_patternscale_b),u_sdfgamma:new a.Uniform1f(g,c.u_sdfgamma),u_image:new a.Uniform1i(g,c.u_image),u_tex_y_a:new a.Uniform1f(g,c.u_tex_y_a),u_tex_y_b:new a.Uniform1f(g,c.u_tex_y_b),u_mix:new a.Uniform1f(g,c.u_mix)}},Wc=function(g,c,x){var d=g.transform;return{u_matrix:bu(g,c,x),u_ratio:1/mo(c,1,d.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Xc=function(g,c,x,d){return a.extend(Wc(g,c,x),{u_image:0,u_image_height:d})},jc=function(g,c,x,d){var w=g.transform,L=Jc(c,w);return{u_matrix:bu(g,c,x),u_texsize:c.imageAtlasTexture.size,u_ratio:1/mo(c,1,w.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_image:0,u_scale:[L,d.fromScale,d.toScale],u_fade:d.t,u_units_to_pixels:[1/w.pixelsToGLUnits[0],1/w.pixelsToGLUnits[1]]}},Pl=function(g,c,x,d,w){var L=g.transform,F=g.lineAtlas,G=Jc(c,L),K=x.layout.get("line-cap")==="round",te=F.getDash(d.from,K),ue=F.getDash(d.to,K),we=te.width*w.fromScale,be=ue.width*w.toScale;return a.extend(Wc(g,c,x),{u_patternscale_a:[G/we,-te.height/2],u_patternscale_b:[G/be,-ue.height/2],u_sdfgamma:F.width/(Math.min(we,be)*256*a.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:te.y,u_tex_y_b:ue.y,u_mix:w.t})};function Jc(g,c){return 1/mo(g,1,c.tileZoom)}function bu(g,c,x){return g.translatePosMatrix(c.tileID.posMatrix,c,x.paint.get("line-translate"),x.paint.get("line-translate-anchor"))}var sf=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_tl_parent:new a.Uniform2f(g,c.u_tl_parent),u_scale_parent:new a.Uniform1f(g,c.u_scale_parent),u_buffer_scale:new a.Uniform1f(g,c.u_buffer_scale),u_fade_t:new a.Uniform1f(g,c.u_fade_t),u_opacity:new a.Uniform1f(g,c.u_opacity),u_image0:new a.Uniform1i(g,c.u_image0),u_image1:new a.Uniform1i(g,c.u_image1),u_brightness_low:new a.Uniform1f(g,c.u_brightness_low),u_brightness_high:new a.Uniform1f(g,c.u_brightness_high),u_saturation_factor:new a.Uniform1f(g,c.u_saturation_factor),u_contrast_factor:new a.Uniform1f(g,c.u_contrast_factor),u_spin_weights:new a.Uniform3f(g,c.u_spin_weights)}},Tp=function(g,c,x,d,w){return{u_matrix:g,u_tl_parent:c,u_scale_parent:x,u_buffer_scale:1,u_fade_t:d.mix,u_opacity:d.opacity*w.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:w.paint.get("raster-brightness-min"),u_brightness_high:w.paint.get("raster-brightness-max"),u_saturation_factor:$f(w.paint.get("raster-saturation")),u_contrast_factor:di(w.paint.get("raster-contrast")),u_spin_weights:Kc(w.paint.get("raster-hue-rotate"))}};function Kc(g){g*=Math.PI/180;var c=Math.sin(g),x=Math.cos(g);return[(2*x+1)/3,(-Math.sqrt(3)*c-x+1)/3,(Math.sqrt(3)*c-x+1)/3]}function di(g){return g>0?1/(1-g):1+g}function $f(g){return g>0?1-1/(1.001-g):-g}var Ap=function(g,c){return{u_is_size_zoom_constant:new a.Uniform1i(g,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(g,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(g,c.u_size_t),u_size:new a.Uniform1f(g,c.u_size),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(g,c.u_pitch),u_rotate_symbol:new a.Uniform1i(g,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(g,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(g,c.u_fade_change),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(g,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(g,c.u_coord_matrix),u_is_text:new a.Uniform1i(g,c.u_is_text),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_texsize:new a.Uniform2f(g,c.u_texsize),u_texture:new a.Uniform1i(g,c.u_texture)}},Mp=function(g,c){return{u_is_size_zoom_constant:new a.Uniform1i(g,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(g,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(g,c.u_size_t),u_size:new a.Uniform1f(g,c.u_size),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(g,c.u_pitch),u_rotate_symbol:new a.Uniform1i(g,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(g,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(g,c.u_fade_change),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(g,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(g,c.u_coord_matrix),u_is_text:new a.Uniform1i(g,c.u_is_text),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_texsize:new a.Uniform2f(g,c.u_texsize),u_texture:new a.Uniform1i(g,c.u_texture),u_gamma_scale:new a.Uniform1f(g,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(g,c.u_is_halo)}},Dl=function(g,c){return{u_is_size_zoom_constant:new a.Uniform1i(g,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(g,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(g,c.u_size_t),u_size:new a.Uniform1f(g,c.u_size),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(g,c.u_pitch),u_rotate_symbol:new a.Uniform1i(g,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(g,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(g,c.u_fade_change),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(g,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(g,c.u_coord_matrix),u_is_text:new a.Uniform1i(g,c.u_is_text),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_texsize:new a.Uniform2f(g,c.u_texsize),u_texsize_icon:new a.Uniform2f(g,c.u_texsize_icon),u_texture:new a.Uniform1i(g,c.u_texture),u_texture_icon:new a.Uniform1i(g,c.u_texture_icon),u_gamma_scale:new a.Uniform1f(g,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(g,c.u_is_halo)}},Sp=function(g,c,x,d,w,L,F,G,K,te){var ue=w.transform;return{u_is_size_zoom_constant:+(g==="constant"||g==="source"),u_is_size_feature_constant:+(g==="constant"||g==="camera"),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:ue.cameraToCenterDistance,u_pitch:ue.pitch/360*2*Math.PI,u_rotate_symbol:+x,u_aspect_ratio:ue.width/ue.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:L,u_label_plane_matrix:F,u_coord_matrix:G,u_is_text:+K,u_pitch_with_map:+d,u_texsize:te,u_texture:0}},kp=function(g,c,x,d,w,L,F,G,K,te,ue){var we=w.transform;return a.extend(Sp(g,c,x,d,w,L,F,G,K,te),{u_gamma_scale:d?Math.cos(we._pitch)*we.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:+ue})},Rv=function(g,c,x,d,w,L,F,G,K,te){return a.extend(kp(g,c,x,d,w,L,F,G,!0,K,!0),{u_texsize_icon:te,u_texture_icon:1})},Cp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_opacity:new a.Uniform1f(g,c.u_opacity),u_color:new a.UniformColor(g,c.u_color)}},Xm=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_opacity:new a.Uniform1f(g,c.u_opacity),u_image:new a.Uniform1i(g,c.u_image),u_pattern_tl_a:new a.Uniform2f(g,c.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(g,c.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(g,c.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(g,c.u_pattern_br_b),u_texsize:new a.Uniform2f(g,c.u_texsize),u_mix:new a.Uniform1f(g,c.u_mix),u_pattern_size_a:new a.Uniform2f(g,c.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(g,c.u_pattern_size_b),u_scale_a:new a.Uniform1f(g,c.u_scale_a),u_scale_b:new a.Uniform1f(g,c.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(g,c.u_tile_units_to_pixels)}},zl=function(g,c,x){return{u_matrix:g,u_opacity:c,u_color:x}},wu=function(g,c,x,d,w,L){return a.extend(_u(d,L,x,w),{u_matrix:g,u_opacity:c})},ec={fillExtrusion:Cv,fillExtrusionPattern:_n,fill:Sl,fillPattern:kl,fillOutline:Cl,fillOutlinePattern:Qs,circle:Gm,collisionBox:Ym,collisionCircle:mp,debug:Lv,clippingMask:Yc,heatmap:Pv,heatmapTexture:_p,hillshade:xp,hillshadePrepare:bp,line:xu,lineGradient:Ll,linePattern:Qf,lineSDF:Iv,raster:sf,symbolIcon:Ap,symbolSDF:Mp,symbolTextAndIcon:Dl,background:Cp,backgroundPattern:Xm},ks;function Cs(g,c,x,d,w,L,F){for(var G=g.context,K=G.gl,te=g.useProgram("collisionBox"),ue=[],we=0,be=0,Ie=0;Ie0){var qt=a.create(),Qt=Xe;a.mul(qt,Oe.placementInvProjMatrix,g.transform.glCoordMatrix),a.mul(qt,qt,Oe.placementViewportMatrix),ue.push({circleArray:zt,circleOffset:be,transform:Qt,invTransform:qt}),we+=zt.length/4,be=we}ct&&te.draw(G,K.LINES,pa.disabled,Zr.disabled,g.colorModeForRenderPass(),Ee.disabled,yp(Xe,g.transform,Ze),x.id,ct.layoutVertexBuffer,ct.indexBuffer,ct.segments,null,g.transform.zoom,null,null,ct.collisionVertexBuffer)}}if(!(!F||!ue.length)){var rr=g.useProgram("collisionCircle"),Zt=new a.StructArrayLayout2f1f2i16;Zt.resize(we*4),Zt._trim();for(var ar=0,cr=0,_r=ue;cr<_r.length;cr+=1)for(var Lr=_r[cr],Sr=0;Sr=0&&(Ye[Oe.associatedIconIndex]={shiftedAnchor:Xr,angle:Fa})}}if(ue){Ie.clear();for(var qr=g.icon.placedSymbolArray,Sa=0;Sa0){var F=a.browser.now(),G=(F-g.timeAdded)/L,K=c?(F-c.timeAdded)/L:-1,te=x.getSource(),ue=w.coveringZoomLevel({tileSize:te.tileSize,roundZoom:te.roundZoom}),we=!c||Math.abs(c.tileID.overscaledZ-ue)>Math.abs(g.tileID.overscaledZ-ue),be=we&&g.refreshedUponExpiration?1:a.clamp(we?G:1-K,0,1);return g.refreshedUponExpiration&&G>=1&&(g.refreshedUponExpiration=!1),c?{opacity:1,mix:1-be}:{opacity:be,mix:0}}else return{opacity:1,mix:0}}function tc(g,c,x){var d=x.paint.get("background-color"),w=x.paint.get("background-opacity");if(w!==0){var L=g.context,F=L.gl,G=g.transform,K=G.tileSize,te=x.paint.get("background-pattern");if(!g.isPatternMissing(te)){var ue=!te&&d.a===1&&w===1&&g.opaquePassEnabledForLayer()?"opaque":"translucent";if(g.renderPass===ue){var we=Zr.disabled,be=g.depthModeForSublayer(0,ue==="opaque"?pa.ReadWrite:pa.ReadOnly),Ie=g.colorModeForRenderPass(),Ye=g.useProgram(te?"backgroundPattern":"background"),Ze=G.coveringTiles({tileSize:K});te&&(L.activeTexture.set(F.TEXTURE0),g.imageManager.bind(g.context));for(var Oe=x.getCrossfadeParameters(),Xe=0,ct=Ze;Xe "+x.overscaledZ);var Xe=Oe+" "+Ie+"kb";Ip(g,Xe),F.draw(d,w.TRIANGLES,G,K,ee.alphaBlended,Ee.disabled,Kf(L,a.Color.transparent,Ze),ue,g.debugBuffer,g.quadTriangleIndexBuffer,g.debugSegments)}function Ip(g,c){g.initDebugOverlayCanvas();var x=g.debugOverlayCanvas,d=g.context.gl,w=g.debugOverlayCanvas.getContext("2d");w.clearRect(0,0,x.width,x.height),w.shadowColor="white",w.shadowBlur=2,w.lineWidth=1.5,w.strokeStyle="white",w.textBaseline="top",w.font="bold 36px Open Sans, sans-serif",w.fillText(c,5,5),w.strokeText(c,5,5),g.debugOverlayTexture.update(x),g.debugOverlayTexture.bind(d.LINEAR,d.CLAMP_TO_EDGE)}function pf(g,c,x){var d=g.context,w=x.implementation;if(g.renderPass==="offscreen"){var L=w.prerender;L&&(g.setCustomLayerDefaults(),d.setColorMode(g.colorModeForRenderPass()),L.call(w,d.gl,g.transform.customLayerMatrix()),d.setDirty(),g.setBaseState())}else if(g.renderPass==="translucent"){g.setCustomLayerDefaults(),d.setColorMode(g.colorModeForRenderPass()),d.setStencilMode(Zr.disabled);var F=w.renderingMode==="3d"?new pa(g.context.gl.LEQUAL,pa.ReadWrite,g.depthRangeFor3D):g.depthModeForSublayer(0,pa.ReadOnly);d.setDepthMode(F),w.render(d.gl,g.transform.customLayerMatrix()),d.setDirty(),g.setBaseState(),d.bindFramebuffer.set(null)}}var li={symbol:jm,circle:Qc,heatmap:Tu,line:go,fill:Ep,"fill-extrusion":Il,hillshade:vf,raster:Lp,background:tc,debug:Vv,custom:pf},Ci=function(c,x){this.context=new Ne(c),this.transform=x,this._tileTextures={},this.setup(),this.numSublayers=rt.maxUnderzooming+rt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new mu,this.gpuTimers={}};Ci.prototype.resize=function(c,x){if(this.width=c*a.browser.devicePixelRatio,this.height=x*a.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var d=0,w=this.style._order;d256&&this.clearStencil(),d.setColorMode(ee.disabled),d.setDepthMode(pa.disabled);var L=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var F=0,G=x;F256&&this.clearStencil();var c=this.nextStencilID++,x=this.context.gl;return new Zr({func:x.NOTEQUAL,mask:255},c,255,x.KEEP,x.KEEP,x.REPLACE)},Ci.prototype.stencilModeForClipping=function(c){var x=this.context.gl;return new Zr({func:x.EQUAL,mask:255},this._tileClippingMaskIDs[c.key],0,x.KEEP,x.KEEP,x.REPLACE)},Ci.prototype.stencilConfigForOverlap=function(c){var x,d=this.context.gl,w=c.sort(function(te,ue){return ue.overscaledZ-te.overscaledZ}),L=w[w.length-1].overscaledZ,F=w[0].overscaledZ-L+1;if(F>1){this.currentStencilSource=void 0,this.nextStencilID+F>256&&this.clearStencil();for(var G={},K=0;K=0;this.currentLayer--){var qt=this.style._layers[w[this.currentLayer]],Qt=L[qt.source],rr=K[qt.source];this._renderTileClippingMasks(qt,rr),this.renderLayer(this,Qt,qt,rr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?x.pop():null},Ci.prototype.isPatternMissing=function(c){if(!c)return!1;if(!c.from||!c.to)return!0;var x=this.imageManager.getPattern(c.from.toString()),d=this.imageManager.getPattern(c.to.toString());return!x||!d},Ci.prototype.useProgram=function(c,x){this.cache=this.cache||{};var d=""+c+(x?x.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[d]||(this.cache[d]=new dp(this.context,c,Hm[c],x,ec[c],this._showOverdrawInspector)),this.cache[d]},Ci.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()},Ci.prototype.setBaseState=function(){var c=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(c.FUNC_ADD)},Ci.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var c=this.context.gl;this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,c.RGBA)}},Ci.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var so=function(c,x){this.points=c,this.planes=x};so.fromInvProjectionMatrix=function(c,x,d){var w=[[-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]],L=Math.pow(2,d),F=w.map(function(te){return a.transformMat4([],te,c)}).map(function(te){return a.scale$1([],te,1/te[3]/x*L)}),G=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],K=G.map(function(te){var ue=a.sub([],F[te[0]],F[te[1]]),we=a.sub([],F[te[2]],F[te[1]]),be=a.normalize([],a.cross([],ue,we)),Ie=-a.dot(be,F[te[1]]);return be.concat(Ie)});return new so(F,K)};var Es=function(c,x){this.min=c,this.max=x,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};Es.prototype.quadrant=function(c){for(var x=[c%2===0,c<2],d=a.clone$2(this.min),w=a.clone$2(this.max),L=0;L=0;if(F===0)return 0;F!==x.length&&(d=!1)}if(d)return 2;for(var K=0;K<3;K++){for(var te=Number.MAX_VALUE,ue=-Number.MAX_VALUE,we=0;wethis.max[K]-this.min[K])return 0}return 1};var _o=function(c,x,d,w){if(c===void 0&&(c=0),x===void 0&&(x=0),d===void 0&&(d=0),w===void 0&&(w=0),isNaN(c)||c<0||isNaN(x)||x<0||isNaN(d)||d<0||isNaN(w)||w<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=c,this.bottom=x,this.left=d,this.right=w};_o.prototype.interpolate=function(c,x,d){return x.top!=null&&c.top!=null&&(this.top=a.number(c.top,x.top,d)),x.bottom!=null&&c.bottom!=null&&(this.bottom=a.number(c.bottom,x.bottom,d)),x.left!=null&&c.left!=null&&(this.left=a.number(c.left,x.left,d)),x.right!=null&&c.right!=null&&(this.right=a.number(c.right,x.right,d)),this},_o.prototype.getCenter=function(c,x){var d=a.clamp((this.left+c-this.right)/2,0,c),w=a.clamp((this.top+x-this.bottom)/2,0,x);return new a.Point(d,w)},_o.prototype.equals=function(c){return this.top===c.top&&this.bottom===c.bottom&&this.left===c.left&&this.right===c.right},_o.prototype.clone=function(){return new _o(this.top,this.bottom,this.left,this.right)},_o.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var ti=function(c,x,d,w,L){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=L===void 0?!0:L,this._minZoom=c||0,this._maxZoom=x||22,this._minPitch=d==null?0:d,this._maxPitch=w==null?60:w,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new _o,this._posMatrixCache={},this._alignedPosMatrixCache={}},fi={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}};ti.prototype.clone=function(){var c=new ti(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return c.tileSize=this.tileSize,c.latRange=this.latRange,c.width=this.width,c.height=this.height,c._center=this._center,c.zoom=this.zoom,c.angle=this.angle,c._fov=this._fov,c._pitch=this._pitch,c._unmodified=this._unmodified,c._edgeInsets=this._edgeInsets.clone(),c._calcMatrices(),c},fi.minZoom.get=function(){return this._minZoom},fi.minZoom.set=function(g){this._minZoom!==g&&(this._minZoom=g,this.zoom=Math.max(this.zoom,g))},fi.maxZoom.get=function(){return this._maxZoom},fi.maxZoom.set=function(g){this._maxZoom!==g&&(this._maxZoom=g,this.zoom=Math.min(this.zoom,g))},fi.minPitch.get=function(){return this._minPitch},fi.minPitch.set=function(g){this._minPitch!==g&&(this._minPitch=g,this.pitch=Math.max(this.pitch,g))},fi.maxPitch.get=function(){return this._maxPitch},fi.maxPitch.set=function(g){this._maxPitch!==g&&(this._maxPitch=g,this.pitch=Math.min(this.pitch,g))},fi.renderWorldCopies.get=function(){return this._renderWorldCopies},fi.renderWorldCopies.set=function(g){g===void 0?g=!0:g===null&&(g=!1),this._renderWorldCopies=g},fi.worldSize.get=function(){return this.tileSize*this.scale},fi.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},fi.size.get=function(){return new a.Point(this.width,this.height)},fi.bearing.get=function(){return-this.angle/Math.PI*180},fi.bearing.set=function(g){var c=-a.wrap(g,-180,180)*Math.PI/180;this.angle!==c&&(this._unmodified=!1,this.angle=c,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},fi.pitch.get=function(){return this._pitch/Math.PI*180},fi.pitch.set=function(g){var c=a.clamp(g,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==c&&(this._unmodified=!1,this._pitch=c,this._calcMatrices())},fi.fov.get=function(){return this._fov/Math.PI*180},fi.fov.set=function(g){g=Math.max(.01,Math.min(60,g)),this._fov!==g&&(this._unmodified=!1,this._fov=g/180*Math.PI,this._calcMatrices())},fi.zoom.get=function(){return this._zoom},fi.zoom.set=function(g){var c=Math.min(Math.max(g,this.minZoom),this.maxZoom);this._zoom!==c&&(this._unmodified=!1,this._zoom=c,this.scale=this.zoomScale(c),this.tileZoom=Math.floor(c),this.zoomFraction=c-this.tileZoom,this._constrain(),this._calcMatrices())},fi.center.get=function(){return this._center},fi.center.set=function(g){g.lat===this._center.lat&&g.lng===this._center.lng||(this._unmodified=!1,this._center=g,this._constrain(),this._calcMatrices())},fi.padding.get=function(){return this._edgeInsets.toJSON()},fi.padding.set=function(g){this._edgeInsets.equals(g)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,g,1),this._calcMatrices())},fi.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},ti.prototype.isPaddingEqual=function(c){return this._edgeInsets.equals(c)},ti.prototype.interpolatePadding=function(c,x,d){this._unmodified=!1,this._edgeInsets.interpolate(c,x,d),this._constrain(),this._calcMatrices()},ti.prototype.coveringZoomLevel=function(c){var x=(c.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/c.tileSize));return Math.max(0,x)},ti.prototype.getVisibleUnwrappedCoordinates=function(c){var x=[new a.UnwrappedTileID(0,c)];if(this._renderWorldCopies)for(var d=this.pointCoordinate(new a.Point(0,0)),w=this.pointCoordinate(new a.Point(this.width,0)),L=this.pointCoordinate(new a.Point(this.width,this.height)),F=this.pointCoordinate(new a.Point(0,this.height)),G=Math.floor(Math.min(d.x,w.x,L.x,F.x)),K=Math.floor(Math.max(d.x,w.x,L.x,F.x)),te=1,ue=G-te;ue<=K+te;ue++)ue!==0&&x.push(new a.UnwrappedTileID(ue,c));return x},ti.prototype.coveringTiles=function(c){var x=this.coveringZoomLevel(c),d=x;if(c.minzoom!==void 0&&xc.maxzoom&&(x=c.maxzoom);var w=a.MercatorCoordinate.fromLngLat(this.center),L=Math.pow(2,x),F=[L*w.x,L*w.y,0],G=so.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,x),K=c.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(K=x);var te=3,ue=function(Sr){return{aabb:new Es([Sr*L,0,0],[(Sr+1)*L,L,0]),zoom:0,x:0,y:0,wrap:Sr,fullyVisible:!1}},we=[],be=[],Ie=x,Ye=c.reparseOverscaled?d:x;if(this._renderWorldCopies)for(var Ze=1;Ze<=3;Ze++)we.push(ue(-Ze)),we.push(ue(Ze));for(we.push(ue(0));we.length>0;){var Oe=we.pop(),Xe=Oe.x,ct=Oe.y,zt=Oe.fullyVisible;if(!zt){var qt=Oe.aabb.intersects(G);if(qt===0)continue;zt=qt===2}var Qt=Oe.aabb.distanceX(F),rr=Oe.aabb.distanceY(F),Zt=Math.max(Math.abs(Qt),Math.abs(rr)),ar=te+(1<ar&&Oe.zoom>=K){be.push({tileID:new a.OverscaledTileID(Oe.zoom===Ie?Ye:Oe.zoom,Oe.wrap,Oe.zoom,Xe,ct),distanceSq:a.sqrLen([F[0]-.5-Xe,F[1]-.5-ct])});continue}for(var cr=0;cr<4;cr++){var _r=(Xe<<1)+cr%2,Lr=(ct<<1)+(cr>>1);we.push({aabb:Oe.aabb.quadrant(cr),zoom:Oe.zoom+1,x:_r,y:Lr,wrap:Oe.wrap,fullyVisible:zt})}}return be.sort(function(Sr,Xr){return Sr.distanceSq-Xr.distanceSq}).map(function(Sr){return Sr.tileID})},ti.prototype.resize=function(c,x){this.width=c,this.height=x,this.pixelsToGLUnits=[2/c,-2/x],this._constrain(),this._calcMatrices()},fi.unmodified.get=function(){return this._unmodified},ti.prototype.zoomScale=function(c){return Math.pow(2,c)},ti.prototype.scaleZoom=function(c){return Math.log(c)/Math.LN2},ti.prototype.project=function(c){var x=a.clamp(c.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(c.lng)*this.worldSize,a.mercatorYfromLat(x)*this.worldSize)},ti.prototype.unproject=function(c){return new a.MercatorCoordinate(c.x/this.worldSize,c.y/this.worldSize).toLngLat()},fi.point.get=function(){return this.project(this.center)},ti.prototype.setLocationAtPoint=function(c,x){var d=this.pointCoordinate(x),w=this.pointCoordinate(this.centerPoint),L=this.locationCoordinate(c),F=new a.MercatorCoordinate(L.x-(d.x-w.x),L.y-(d.y-w.y));this.center=this.coordinateLocation(F),this._renderWorldCopies&&(this.center=this.center.wrap())},ti.prototype.locationPoint=function(c){return this.coordinatePoint(this.locationCoordinate(c))},ti.prototype.pointLocation=function(c){return this.coordinateLocation(this.pointCoordinate(c))},ti.prototype.locationCoordinate=function(c){return a.MercatorCoordinate.fromLngLat(c)},ti.prototype.coordinateLocation=function(c){return c.toLngLat()},ti.prototype.pointCoordinate=function(c){var x=0,d=[c.x,c.y,0,1],w=[c.x,c.y,1,1];a.transformMat4(d,d,this.pixelMatrixInverse),a.transformMat4(w,w,this.pixelMatrixInverse);var L=d[3],F=w[3],G=d[0]/L,K=w[0]/F,te=d[1]/L,ue=w[1]/F,we=d[2]/L,be=w[2]/F,Ie=we===be?0:(x-we)/(be-we);return new a.MercatorCoordinate(a.number(G,K,Ie)/this.worldSize,a.number(te,ue,Ie)/this.worldSize)},ti.prototype.coordinatePoint=function(c){var x=[c.x*this.worldSize,c.y*this.worldSize,0,1];return a.transformMat4(x,x,this.pixelMatrix),new a.Point(x[0]/x[3],x[1]/x[3])},ti.prototype.getBounds=function(){return new a.LngLatBounds().extend(this.pointLocation(new a.Point(0,0))).extend(this.pointLocation(new a.Point(this.width,0))).extend(this.pointLocation(new a.Point(this.width,this.height))).extend(this.pointLocation(new a.Point(0,this.height)))},ti.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},ti.prototype.setMaxBounds=function(c){c?(this.lngRange=[c.getWest(),c.getEast()],this.latRange=[c.getSouth(),c.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},ti.prototype.calculatePosMatrix=function(c,x){x===void 0&&(x=!1);var d=c.key,w=x?this._alignedPosMatrixCache:this._posMatrixCache;if(w[d])return w[d];var L=c.canonical,F=this.worldSize/this.zoomScale(L.z),G=L.x+Math.pow(2,L.z)*c.wrap,K=a.identity(new Float64Array(16));return a.translate(K,K,[G*F,L.y*F,0]),a.scale(K,K,[F/a.EXTENT,F/a.EXTENT,1]),a.multiply(K,x?this.alignedProjMatrix:this.projMatrix,K),w[d]=new Float32Array(K),w[d]},ti.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},ti.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var c=-90,x=90,d=-180,w=180,L,F,G,K,te=this.size,ue=this._unmodified;if(this.latRange){var we=this.latRange;c=a.mercatorYfromLat(we[1])*this.worldSize,x=a.mercatorYfromLat(we[0])*this.worldSize,L=x-cx&&(K=x-Oe)}if(this.lngRange){var Xe=Ie.x,ct=te.x/2;Xe-ctw&&(G=w-ct)}(G!==void 0||K!==void 0)&&(this.center=this.unproject(new a.Point(G!==void 0?G:Ie.x,K!==void 0?K:Ie.y))),this._unmodified=ue,this._constraining=!1}},ti.prototype._calcMatrices=function(){if(this.height){var c=this._fov/2,x=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(c)*this.height;var d=Math.PI/2+this._pitch,w=this._fov*(.5+x.y/this.height),L=Math.sin(w)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-d-w,.01,Math.PI-.01)),F=this.point,G=F.x,K=F.y,te=Math.cos(Math.PI/2-this._pitch)*L+this.cameraToCenterDistance,ue=te*1.01,we=this.height/50,be=new Float64Array(16);a.perspective(be,this._fov,this.width/this.height,we,ue),be[8]=-x.x*2/this.width,be[9]=x.y*2/this.height,a.scale(be,be,[1,-1,1]),a.translate(be,be,[0,0,-this.cameraToCenterDistance]),a.rotateX(be,be,this._pitch),a.rotateZ(be,be,this.angle),a.translate(be,be,[-G,-K,0]),this.mercatorMatrix=a.scale([],be,[this.worldSize,this.worldSize,this.worldSize]),a.scale(be,be,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=be,this.invProjMatrix=a.invert([],this.projMatrix);var Ie=this.width%2/2,Ye=this.height%2/2,Ze=Math.cos(this.angle),Oe=Math.sin(this.angle),Xe=G-Math.round(G)+Ze*Ie+Oe*Ye,ct=K-Math.round(K)+Ze*Ye+Oe*Ie,zt=new Float64Array(be);if(a.translate(zt,zt,[Xe>.5?Xe-1:Xe,ct>.5?ct-1:ct,0]),this.alignedProjMatrix=zt,be=a.create(),a.scale(be,be,[this.width/2,-this.height/2,1]),a.translate(be,be,[1,-1,0]),this.labelPlaneMatrix=be,be=a.create(),a.scale(be,be,[1,-1,1]),a.translate(be,be,[-1,-1,0]),a.scale(be,be,[2/this.width,2/this.height,1]),this.glCoordMatrix=be,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),be=a.invert(new Float64Array(16),this.pixelMatrix),!be)throw new Error("failed to invert matrix");this.pixelMatrixInverse=be,this._posMatrixCache={},this._alignedPosMatrixCache={}}},ti.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var c=this.pointCoordinate(new a.Point(0,0)),x=[c.x*this.worldSize,c.y*this.worldSize,0,1],d=a.transformMat4(x,x,this.pixelMatrix);return d[3]/this.cameraToCenterDistance},ti.prototype.getCameraPoint=function(){var c=this._pitch,x=Math.tan(c)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,x))},ti.prototype.getCameraQueryGeometry=function(c){var x=this.getCameraPoint();if(c.length===1)return[c[0],x];for(var d=x.x,w=x.y,L=x.x,F=x.y,G=0,K=c;G=3&&!c.some(function(d){return isNaN(d)})){var x=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:x,pitch:+(c[4]||0)}),!0}return!1},Rl.prototype._updateHashUnthrottled=function(){var c=a.window.location.href.replace(/(#.+)?$/,this.getHashString());try{a.window.history.replaceState(a.window.history.state,null,c)}catch(x){}};var rc={linearity:.3,easing:a.bezier(0,0,.3,1)},mf=a.extend({deceleration:2500,maxSpeed:1400},rc),Fl=a.extend({deceleration:20,maxSpeed:1400},rc),Ls=a.extend({deceleration:1e3,maxSpeed:360},rc),nh=a.extend({deceleration:1e3,maxSpeed:90},rc),yf=function(c){this._map=c,this.clear()};yf.prototype.clear=function(){this._inertiaBuffer=[]},yf.prototype.record=function(c){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.browser.now(),settings:c})},yf.prototype._drainInertiaBuffer=function(){for(var c=this._inertiaBuffer,x=a.browser.now(),d=160;c.length>0&&x-c[0].time>d;)c.shift()},yf.prototype._onMoveEnd=function(c){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var x={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},d=0,w=this._inertiaBuffer;d=this._clickTolerance||this._map.fire(new M(c.type,this._map,c))},U.prototype.dblclick=function(c){return this._firePreventable(new M(c.type,this._map,c))},U.prototype.mouseover=function(c){this._map.fire(new M(c.type,this._map,c))},U.prototype.mouseout=function(c){this._map.fire(new M(c.type,this._map,c))},U.prototype.touchstart=function(c){return this._firePreventable(new D(c.type,this._map,c))},U.prototype.touchmove=function(c){this._map.fire(new D(c.type,this._map,c))},U.prototype.touchend=function(c){this._map.fire(new D(c.type,this._map,c))},U.prototype.touchcancel=function(c){this._map.fire(new D(c.type,this._map,c))},U.prototype._firePreventable=function(c){if(this._map.fire(c),c.defaultPrevented)return{}},U.prototype.isEnabled=function(){return!0},U.prototype.isActive=function(){return!1},U.prototype.enable=function(){},U.prototype.disable=function(){};var Z=function(c){this._map=c};Z.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Z.prototype.mousemove=function(c){this._map.fire(new M(c.type,this._map,c))},Z.prototype.mousedown=function(){this._delayContextMenu=!0},Z.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new M("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Z.prototype.contextmenu=function(c){this._delayContextMenu?this._contextMenuEvent=c:this._map.fire(new M(c.type,this._map,c)),this._map.listens("contextmenu")&&c.preventDefault()},Z.prototype.isEnabled=function(){return!0},Z.prototype.isActive=function(){return!1},Z.prototype.enable=function(){},Z.prototype.disable=function(){};var $=function(c,x){this._map=c,this._el=c.getCanvasContainer(),this._container=c.getContainer(),this._clickTolerance=x.clickTolerance||1};$.prototype.isEnabled=function(){return!!this._enabled},$.prototype.isActive=function(){return!!this._active},$.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},$.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},$.prototype.mousedown=function(c,x){this.isEnabled()&&c.shiftKey&&c.button===0&&(l.disableDrag(),this._startPos=this._lastPos=x,this._active=!0)},$.prototype.mousemoveWindow=function(c,x){if(this._active){var d=x;if(!(this._lastPos.equals(d)||!this._box&&d.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=c.timeStamp),d.length===this.numTouches&&(this.centroid=ae(x),this.touches=X(d,x)))},Pe.prototype.touchmove=function(c,x,d){if(!(this.aborted||!this.centroid)){var w=X(d,x);for(var L in this.touches){var F=this.touches[L],G=w[L];(!G||G.dist(F)>De)&&(this.aborted=!0)}}},Pe.prototype.touchend=function(c,x,d){if((!this.centroid||c.timeStamp-this.startTime>_e)&&(this.aborted=!0),d.length===0){var w=!this.aborted&&this.centroid;if(this.reset(),w)return w}};var Je=function(c){this.singleTap=new Pe(c),this.numTaps=c.numTaps,this.reset()};Je.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Je.prototype.touchstart=function(c,x,d){this.singleTap.touchstart(c,x,d)},Je.prototype.touchmove=function(c,x,d){this.singleTap.touchmove(c,x,d)},Je.prototype.touchend=function(c,x,d){var w=this.singleTap.touchend(c,x,d);if(w){var L=c.timeStamp-this.lastTime0&&(this._active=!0);var w=X(d,x),L=new a.Point(0,0),F=new a.Point(0,0),G=0;for(var K in w){var te=w[K],ue=this._touches[K];ue&&(L._add(te),F._add(te.sub(ue)),G++,w[K]=te)}if(this._touches=w,!(GMath.abs(g.x)}var jt=100,Jr=function(g){function c(){g.apply(this,arguments)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.reset=function(){g.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},c.prototype._start=function(d){this._lastPoints=d,$a(d[0].sub(d[1]))&&(this._valid=!1)},c.prototype._move=function(d,w,L){var F=d[0].sub(this._lastPoints[0]),G=d[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(F,G,L.timeStamp),!!this._valid){this._lastPoints=d,this._active=!0;var K=(F.y+G.y)/2,te=-.5;return{pitchDelta:K*te}}},c.prototype.gestureBeginsVertically=function(d,w,L){if(this._valid!==void 0)return this._valid;var F=2,G=d.mag()>=F,K=w.mag()>=F;if(!(!G&&!K)){if(!G||!K)return this._firstMove===void 0&&(this._firstMove=L),L-this._firstMove0==w.y>0;return $a(d)&&$a(w)&&te}},c}(lr),oa={panStep:100,bearingStep:15,pitchStep:10},sa=function(){var c=oa;this._panStep=c.panStep,this._bearingStep=c.bearingStep,this._pitchStep=c.pitchStep,this._rotationDisabled=!1};sa.prototype.reset=function(){this._active=!1},sa.prototype.keydown=function(c){var x=this;if(!(c.altKey||c.ctrlKey||c.metaKey)){var d=0,w=0,L=0,F=0,G=0;switch(c.keyCode){case 61:case 107:case 171:case 187:d=1;break;case 189:case 109:case 173:d=-1;break;case 37:c.shiftKey?w=-1:(c.preventDefault(),F=-1);break;case 39:c.shiftKey?w=1:(c.preventDefault(),F=1);break;case 38:c.shiftKey?L=1:(c.preventDefault(),G=-1);break;case 40:c.shiftKey?L=-1:(c.preventDefault(),G=1);break;default:return}return this._rotationDisabled&&(w=0,L=0),{cameraAnimation:function(K){var te=K.getZoom();K.easeTo({duration:300,easeId:"keyboardHandler",easing:Ei,zoom:d?Math.round(te)+d*(c.shiftKey?2:1):te,bearing:K.getBearing()+w*x._bearingStep,pitch:K.getPitch()+L*x._pitchStep,offset:[-F*x._panStep,-G*x._panStep],center:K.getCenter()},{originalEvent:c})}}}},sa.prototype.enable=function(){this._enabled=!0},sa.prototype.disable=function(){this._enabled=!1,this.reset()},sa.prototype.isEnabled=function(){return this._enabled},sa.prototype.isActive=function(){return this._active},sa.prototype.disableRotation=function(){this._rotationDisabled=!0},sa.prototype.enableRotation=function(){this._rotationDisabled=!1};function Ei(g){return g*(2-g)}var Oi=4.000244140625,$i=1/100,xi=1/450,xn=2,br=function(c,x){this._map=c,this._el=c.getCanvasContainer(),this._handler=x,this._delta=0,this._defaultZoomRate=$i,this._wheelZoomRate=xi,a.bindAll(["_onTimeout"],this)};br.prototype.setZoomRate=function(c){this._defaultZoomRate=c},br.prototype.setWheelZoomRate=function(c){this._wheelZoomRate=c},br.prototype.isEnabled=function(){return!!this._enabled},br.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},br.prototype.isZooming=function(){return!!this._zooming},br.prototype.enable=function(c){this.isEnabled()||(this._enabled=!0,this._aroundCenter=c&&c.around==="center")},br.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},br.prototype.wheel=function(c){if(this.isEnabled()){var x=c.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?c.deltaY*40:c.deltaY,d=a.browser.now(),w=d-(this._lastWheelEventTime||0);this._lastWheelEventTime=d,x!==0&&x%Oi===0?this._type="wheel":x!==0&&Math.abs(x)<4?this._type="trackpad":w>400?(this._type=null,this._lastValue=x,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=Math.abs(w*x)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,x+=this._lastValue)),c.shiftKey&&x&&(x=x/4),this._type&&(this._lastWheelEvent=c,this._delta-=x,this._active||this._start(c)),c.preventDefault()}},br.prototype._onTimeout=function(c){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(c)},br.prototype._start=function(c){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 x=l.mousePos(this._el,c);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(x)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},br.prototype.renderFrame=function(){var c=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var x=this._map.transform;if(this._delta!==0){var d=this._type==="wheel"&&Math.abs(this._delta)>Oi?this._wheelZoomRate:this._defaultZoomRate,w=xn/(1+Math.exp(-Math.abs(this._delta*d)));this._delta<0&&w!==0&&(w=1/w);var L=typeof this._targetZoom=="number"?x.zoomScale(this._targetZoom):x.scale;this._targetZoom=Math.min(x.maxZoom,Math.max(x.minZoom,x.scaleZoom(L*w))),this._type==="wheel"&&(this._startZoom=x.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var F=typeof this._targetZoom=="number"?this._targetZoom:x.zoom,G=this._startZoom,K=this._easing,te=!1,ue;if(this._type==="wheel"&&G&&K){var we=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),be=K(we);ue=a.number(G,F,be),we<1?this._frameId||(this._frameId=!0):te=!0}else ue=F,te=!0;return this._active=!0,te&&(this._active=!1,this._finishTimeout=setTimeout(function(){c._zooming=!1,c._handler._triggerRenderFrame(),delete c._targetZoom,delete c._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!te,zoomDelta:ue-x.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},br.prototype._smoothOutEasing=function(c){var x=a.ease;if(this._prevEase){var d=this._prevEase,w=(a.browser.now()-d.start)/d.duration,L=d.easing(w+.01)-d.easing(w),F=.27/Math.sqrt(L*L+1e-4)*.01,G=Math.sqrt(.27*.27-F*F);x=a.bezier(F,G,.25,1)}return this._prevEase={start:a.browser.now(),duration:c,easing:x},x},br.prototype.reset=function(){this._active=!1};var Vr=function(c,x){this._clickZoom=c,this._tapZoom=x};Vr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var qi=function(){this.reset()};qi.prototype.reset=function(){this._active=!1},qi.prototype.dblclick=function(c,x){return c.preventDefault(),{cameraAnimation:function(d){d.easeTo({duration:300,zoom:d.getZoom()+(c.shiftKey?-1:1),around:d.unproject(x)},{originalEvent:c})}}},qi.prototype.enable=function(){this._enabled=!0},qi.prototype.disable=function(){this._enabled=!1,this.reset()},qi.prototype.isEnabled=function(){return this._enabled},qi.prototype.isActive=function(){return this._active};var Ti=function(){this._tap=new Je({numTouches:1,numTaps:1}),this.reset()};Ti.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ti.prototype.touchstart=function(c,x,d){this._swipePoint||(this._tapTime&&c.timeStamp-this._tapTime>me&&this.reset(),this._tapTime?d.length>0&&(this._swipePoint=x[0],this._swipeTouch=d[0].identifier):this._tap.touchstart(c,x,d))},Ti.prototype.touchmove=function(c,x,d){if(!this._tapTime)this._tap.touchmove(c,x,d);else if(this._swipePoint){if(d[0].identifier!==this._swipeTouch)return;var w=x[0],L=w.y-this._swipePoint.y;return this._swipePoint=w,c.preventDefault(),this._active=!0,{zoomDelta:L/128}}},Ti.prototype.touchend=function(c,x,d){if(this._tapTime)this._swipePoint&&d.length===0&&this.reset();else{var w=this._tap.touchend(c,x,d);w&&(this._tapTime=c.timeStamp)}},Ti.prototype.touchcancel=function(){this.reset()},Ti.prototype.enable=function(){this._enabled=!0},Ti.prototype.disable=function(){this._enabled=!1,this.reset()},Ti.prototype.isEnabled=function(){return this._enabled},Ti.prototype.isActive=function(){return this._active};var lo=function(c,x,d){this._el=c,this._mousePan=x,this._touchPan=d};lo.prototype.enable=function(c){this._inertiaOptions=c||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},lo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},lo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},lo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var zn=function(c,x,d){this._pitchWithRotate=c.pitchWithRotate,this._mouseRotate=x,this._mousePitch=d};zn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},zn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},zn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},zn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var cn=function(c,x,d,w){this._el=c,this._touchZoom=x,this._touchRotate=d,this._tapDragZoom=w,this._rotationDisabled=!1,this._enabled=!0};cn.prototype.enable=function(c){this._touchZoom.enable(c),this._rotationDisabled||this._touchRotate.enable(c),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},cn.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},cn.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},cn.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},cn.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},cn.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var pi=function(g){return g.zoom||g.drag||g.pitch||g.rotate},jo=function(g){function c(){g.apply(this,arguments)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c}(a.Event);function uo(g){return g.panDelta&&g.panDelta.mag()||g.zoomDelta||g.bearingDelta||g.pitchDelta}var ci=function(c,x){this._map=c,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new yf(c),this._bearingSnap=x.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(x),a.bindAll(["handleEvent","handleWindowEvent"],this);var d=this._el;this._listeners=[[d,"touchstart",{passive:!0}],[d,"touchmove",{passive:!1}],[d,"touchend",void 0],[d,"touchcancel",void 0],[d,"mousedown",void 0],[d,"mousemove",void 0],[d,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[d,"mouseover",void 0],[d,"mouseout",void 0],[d,"dblclick",void 0],[d,"click",void 0],[d,"keydown",{capture:!1}],[d,"keyup",void 0],[d,"wheel",{passive:!1}],[d,"contextmenu",void 0],[a.window,"blur",void 0]];for(var w=0,L=this._listeners;wG?Math.min(2,Qt):Math.max(.5,Qt),Sr=Math.pow(Lr,1-cr),Xr=F.unproject(zt.add(qt.mult(cr*Sr)).mult(_r));F.setLocationAtPoint(F.renderWorldCopies?Xr.wrap():Xr,Oe)}L._fireMoveEvents(w)},function(cr){L._afterEase(w,cr)},d),this},c.prototype._prepareEase=function(d,w,L){L===void 0&&(L={}),this._moving=!0,!w&&!L.moving&&this.fire(new a.Event("movestart",d)),this._zooming&&!L.zooming&&this.fire(new a.Event("zoomstart",d)),this._rotating&&!L.rotating&&this.fire(new a.Event("rotatestart",d)),this._pitching&&!L.pitching&&this.fire(new a.Event("pitchstart",d))},c.prototype._fireMoveEvents=function(d){this.fire(new a.Event("move",d)),this._zooming&&this.fire(new a.Event("zoom",d)),this._rotating&&this.fire(new a.Event("rotate",d)),this._pitching&&this.fire(new a.Event("pitch",d))},c.prototype._afterEase=function(d,w){if(!(this._easeId&&w&&this._easeId===w)){delete this._easeId;var L=this._zooming,F=this._rotating,G=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,L&&this.fire(new a.Event("zoomend",d)),F&&this.fire(new a.Event("rotateend",d)),G&&this.fire(new a.Event("pitchend",d)),this.fire(new a.Event("moveend",d))}},c.prototype.flyTo=function(d,w){var L=this;if(!d.essential&&a.browser.prefersReducedMotion){var F=a.pick(d,["center","zoom","bearing","pitch","around"]);return this.jumpTo(F,w)}this.stop(),d=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},d);var G=this.transform,K=this.getZoom(),te=this.getBearing(),ue=this.getPitch(),we=this.getPadding(),be="zoom"in d?a.clamp(+d.zoom,G.minZoom,G.maxZoom):K,Ie="bearing"in d?this._normalizeBearing(d.bearing,te):te,Ye="pitch"in d?+d.pitch:ue,Ze="padding"in d?d.padding:G.padding,Oe=G.zoomScale(be-K),Xe=a.Point.convert(d.offset),ct=G.centerPoint.add(Xe),zt=G.pointLocation(ct),qt=a.LngLat.convert(d.center||zt);this._normalizeCenter(qt);var Qt=G.project(zt),rr=G.project(qt).sub(Qt),Zt=d.curve,ar=Math.max(G.width,G.height),cr=ar/Oe,_r=rr.mag();if("minZoom"in d){var Lr=a.clamp(Math.min(d.minZoom,K,be),G.minZoom,G.maxZoom),Sr=ar/G.zoomScale(Lr-K);Zt=Math.sqrt(Sr/_r*2)}var Xr=Zt*Zt;function Fa(na){var Oa=(cr*cr-ar*ar+(na?-1:1)*Xr*Xr*_r*_r)/(2*(na?cr:ar)*Xr*_r);return Math.log(Math.sqrt(Oa*Oa+1)-Oa)}function xa(na){return(Math.exp(na)-Math.exp(-na))/2}function qr(na){return(Math.exp(na)+Math.exp(-na))/2}function Sa(na){return xa(na)/qr(na)}var ia=Fa(0),Za=function(na){return qr(ia)/qr(ia+Zt*na)},Va=function(na){return ar*((qr(ia)*Sa(ia+Zt*na)-xa(ia))/Xr)/_r},Ai=(Fa(1)-ia)/Zt;if(Math.abs(_r)<1e-6||!isFinite(Ai)){if(Math.abs(ar-cr)<1e-6)return this.easeTo(d,w);var Pa=crd.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=te!==Ie,this._pitching=Ye!==ue,this._padding=!G.isPaddingEqual(Ze),this._prepareEase(w,!1),this._ease(function(na){var Oa=na*Ai,en=1/Za(Oa);G.zoom=na===1?be:K+G.scaleZoom(en),L._rotating&&(G.bearing=a.number(te,Ie,na)),L._pitching&&(G.pitch=a.number(ue,Ye,na)),L._padding&&(G.interpolatePadding(we,Ze,na),ct=G.centerPoint.add(Xe));var In=na===1?qt:G.unproject(Qt.add(rr.mult(Va(Oa))).mult(en));G.setLocationAtPoint(G.renderWorldCopies?In.wrap():In,ct),L._fireMoveEvents(w)},function(){return L._afterEase(w)},d),this},c.prototype.isEasing=function(){return!!this._easeFrameId},c.prototype.stop=function(){return this._stop()},c.prototype._stop=function(d,w){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var L=this._onEaseEnd;delete this._onEaseEnd,L.call(this,w)}if(!d){var F=this.handlers;F&&F.stop(!1)}return this},c.prototype._ease=function(d,w,L){L.animate===!1||L.duration===0?(d(1),w()):(this._easeStart=a.browser.now(),this._easeOptions=L,this._onEaseFrame=d,this._onEaseEnd=w,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},c.prototype._renderFrameCallback=function(){var d=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(d)),d<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},c.prototype._normalizeBearing=function(d,w){d=a.wrap(d,-180,180);var L=Math.abs(d-w);return Math.abs(d-360-w)180?-360:L<-180?360:0}},c}(a.Evented),Aa=function(c){c===void 0&&(c={}),this.options=c,a.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Aa.prototype.getDefaultPosition=function(){return"bottom-right"},Aa.prototype.onAdd=function(c){var x=this.options&&this.options.compact;return this._map=c,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=l.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=l.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),x&&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),x===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Aa.prototype.onRemove=function(){l.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},Aa.prototype._setElementTitle=function(c,x){var d=this._map._getUIString("AttributionControl."+x);c.title=d,c.setAttribute("aria-label",d)},Aa.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"))},Aa.prototype._updateEditLink=function(){var c=this._editLink;c||(c=this._editLink=this._container.querySelector(".mapbox-improve-map"));var x=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||a.config.ACCESS_TOKEN}];if(c){var d=x.reduce(function(w,L,F){return L.value&&(w+=L.key+"="+L.value+(F=0)return!1;return!0});var G=c.join(" | ");G!==this._attribHTML&&(this._attribHTML=G,c.length?(this._innerContainer.innerHTML=G,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Aa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ui=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};ui.prototype.onAdd=function(c){this._map=c,this._container=l.create("div","mapboxgl-ctrl");var x=l.create("a","mapboxgl-ctrl-logo");return x.target="_blank",x.rel="noopener nofollow",x.href="https://www.mapbox.com/",x.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),x.setAttribute("rel","noopener nofollow"),this._container.appendChild(x),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ui.prototype.onRemove=function(){l.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ui.prototype.getDefaultPosition=function(){return"bottom-left"},ui.prototype._updateLogo=function(c){(!c||c.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ui.prototype._logoRequired=function(){if(this._map.style){var c=this._map.style.sourceCaches;for(var x in c){var d=c[x].getSource();if(d.mapbox_logo)return!0}return!1}},ui.prototype._updateCompact=function(){var c=this._container.children;if(c.length){var x=c[0];this._map.getCanvasContainer().offsetWidth<250?x.classList.add("mapboxgl-compact"):x.classList.remove("mapboxgl-compact")}};var Nl=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Nl.prototype.add=function(c){var x=++this._id,d=this._queue;return d.push({callback:c,id:x,cancelled:!1}),x},Nl.prototype.remove=function(c){for(var x=this._currentlyRunning,d=x?this._queue.concat(x):this._queue,w=0,L=d;wd.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(d.minPitch!=null&&d.maxPitch!=null&&d.minPitch>d.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(d.minPitch!=null&&d.minPitchxf)throw new Error("maxPitch must be less than or equal to "+xf);var L=new ti(d.minZoom,d.maxZoom,d.minPitch,d.maxPitch,d.renderWorldCopies);if(g.call(this,L,d),this._interactive=d.interactive,this._maxTileCacheSize=d.maxTileCacheSize,this._failIfMajorPerformanceCaveat=d.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=d.preserveDrawingBuffer,this._antialias=d.antialias,this._trackResize=d.trackResize,this._bearingSnap=d.bearingSnap,this._refreshExpiredTiles=d.refreshExpiredTiles,this._fadeDuration=d.fadeDuration,this._crossSourceCollisions=d.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=d.collectResourceTiming,this._renderTaskQueue=new Nl,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},Hv,d.locale),this._clickTolerance=d.clickTolerance,this._requestManager=new a.RequestManager(d.transformRequest,d.accessToken),typeof d.container=="string"){if(this._container=a.window.document.getElementById(d.container),!this._container)throw new Error("Container '"+d.container+"' not found.")}else if(d.container instanceof ey)this._container=d.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(d.maxBounds&&this.setMaxBounds(d.maxBounds),a.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 w._update(!1)}),this.on("moveend",function(){return w._update(!1)}),this.on("zoom",function(){return w._update(!0)}),typeof a.window!="undefined"&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1),a.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new ci(this,d);var F=typeof d.hash=="string"&&d.hash||void 0;this._hash=d.hash&&new Rl(F).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:d.center,zoom:d.zoom,bearing:d.bearing,pitch:d.pitch}),d.bounds&&(this.resize(),this.fitBounds(d.bounds,a.extend({},d.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=d.localIdeographFontFamily,d.style&&this.setStyle(d.style,{localIdeographFontFamily:d.localIdeographFontFamily}),d.attributionControl&&this.addControl(new Aa({customAttribution:d.customAttribution})),this.addControl(new ui,d.logoPosition),this.on("style.load",function(){w.transform.unmodified&&w.jumpTo(w.style.stylesheet)}),this.on("data",function(G){w._update(G.dataType==="style"),w.fire(new a.Event(G.dataType+"data",G))}),this.on("dataloading",function(G){w.fire(new a.Event(G.dataType+"dataloading",G))})}g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c;var x={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return c.prototype._getMapId=function(){return this._mapId},c.prototype.addControl=function(w,L){if(L===void 0&&(w.getDefaultPosition?L=w.getDefaultPosition():L="top-right"),!w||!w.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var F=w.onAdd(this);this._controls.push(w);var G=this._controlPositions[L];return L.indexOf("bottom")!==-1?G.insertBefore(F,G.firstChild):G.appendChild(F),this},c.prototype.removeControl=function(w){if(!w||!w.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var L=this._controls.indexOf(w);return L>-1&&this._controls.splice(L,1),w.onRemove(this),this},c.prototype.hasControl=function(w){return this._controls.indexOf(w)>-1},c.prototype.resize=function(w){var L=this._containerDimensions(),F=L[0],G=L[1];this._resizeCanvas(F,G),this.transform.resize(F,G),this.painter.resize(F,G);var K=!this._moving;return K&&(this.stop(),this.fire(new a.Event("movestart",w)).fire(new a.Event("move",w))),this.fire(new a.Event("resize",w)),K&&this.fire(new a.Event("moveend",w)),this},c.prototype.getBounds=function(){return this.transform.getBounds()},c.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},c.prototype.setMaxBounds=function(w){return this.transform.setMaxBounds(a.LngLatBounds.convert(w)),this._update()},c.prototype.setMinZoom=function(w){if(w=w==null?oh:w,w>=oh&&w<=this.transform.maxZoom)return this.transform.minZoom=w,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=w,this._update(),this.getZoom()>w&&this.setZoom(w),this;throw new Error("maxZoom must be greater than the current minZoom")},c.prototype.getMaxZoom=function(){return this.transform.maxZoom},c.prototype.setMinPitch=function(w){if(w=w==null?Lo:w,w=Lo&&w<=this.transform.maxPitch)return this.transform.minPitch=w,this._update(),this.getPitch()xf)throw new Error("maxPitch must be less than or equal to "+xf);if(w>=this.transform.minPitch)return this.transform.maxPitch=w,this._update(),this.getPitch()>w&&this.setPitch(w),this;throw new Error("maxPitch must be greater than the current minPitch")},c.prototype.getMaxPitch=function(){return this.transform.maxPitch},c.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},c.prototype.setRenderWorldCopies=function(w){return this.transform.renderWorldCopies=w,this._update()},c.prototype.project=function(w){return this.transform.locationPoint(a.LngLat.convert(w))},c.prototype.unproject=function(w){return this.transform.pointLocation(a.Point.convert(w))},c.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},c.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},c.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},c.prototype._createDelegatedListener=function(w,L,F){var G=this,K;if(w==="mouseenter"||w==="mouseover"){var te=!1,ue=function(Oe){var Xe=G.getLayer(L)?G.queryRenderedFeatures(Oe.point,{layers:[L]}):[];Xe.length?te||(te=!0,F.call(G,new M(w,G,Oe.originalEvent,{features:Xe}))):te=!1},we=function(){te=!1};return{layer:L,listener:F,delegates:{mousemove:ue,mouseout:we}}}else if(w==="mouseleave"||w==="mouseout"){var be=!1,Ie=function(Oe){var Xe=G.getLayer(L)?G.queryRenderedFeatures(Oe.point,{layers:[L]}):[];Xe.length?be=!0:be&&(be=!1,F.call(G,new M(w,G,Oe.originalEvent)))},Ye=function(Oe){be&&(be=!1,F.call(G,new M(w,G,Oe.originalEvent)))};return{layer:L,listener:F,delegates:{mousemove:Ie,mouseout:Ye}}}else{var Ze=function(Oe){var Xe=G.getLayer(L)?G.queryRenderedFeatures(Oe.point,{layers:[L]}):[];Xe.length&&(Oe.features=Xe,F.call(G,Oe),delete Oe.features)};return{layer:L,listener:F,delegates:(K={},K[w]=Ze,K)}}},c.prototype.on=function(w,L,F){if(F===void 0)return g.prototype.on.call(this,w,L);var G=this._createDelegatedListener(w,L,F);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[w]=this._delegatedListeners[w]||[],this._delegatedListeners[w].push(G);for(var K in G.delegates)this.on(K,G.delegates[K]);return this},c.prototype.once=function(w,L,F){if(F===void 0)return g.prototype.once.call(this,w,L);var G=this._createDelegatedListener(w,L,F);for(var K in G.delegates)this.once(K,G.delegates[K]);return this},c.prototype.off=function(w,L,F){var G=this;if(F===void 0)return g.prototype.off.call(this,w,L);var K=function(te){for(var ue=te[w],we=0;we180;){var F=x.locationPoint(g);if(F.x>=0&&F.y>=0&&F.x<=x.width&&F.y<=x.height)break;g.lng>x.center.lng?g.lng-=360:g.lng+=360}return g}var Zv={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 Fp(g,c,x){var d=g.classList;for(var w in Zv)d.remove("mapboxgl-"+x+"-anchor-"+w);d.add("mapboxgl-"+x+"-anchor-"+c)}var lh=function(g){function c(x,d){if(g.call(this),(x instanceof a.window.HTMLElement||d)&&(x=a.extend({element:x},d)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=x&&x.anchor||"center",this._color=x&&x.color||"#3FB1CE",this._scale=x&&x.scale||1,this._draggable=x&&x.draggable||!1,this._clickTolerance=x&&x.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=x&&x.rotation||0,this._rotationAlignment=x&&x.rotationAlignment||"auto",this._pitchAlignment=x&&x.pitchAlignment&&x.pitchAlignment!=="auto"?x.pitchAlignment:this._rotationAlignment,!x||!x.element){this._defaultMarker=!0,this._element=l.create("div"),this._element.setAttribute("aria-label","Map marker");var w=l.createNS("http://www.w3.org/2000/svg","svg"),L=41,F=27;w.setAttributeNS(null,"display","block"),w.setAttributeNS(null,"height",L+"px"),w.setAttributeNS(null,"width",F+"px"),w.setAttributeNS(null,"viewBox","0 0 "+F+" "+L);var G=l.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"stroke","none"),G.setAttributeNS(null,"stroke-width","1"),G.setAttributeNS(null,"fill","none"),G.setAttributeNS(null,"fill-rule","evenodd");var K=l.createNS("http://www.w3.org/2000/svg","g");K.setAttributeNS(null,"fill-rule","nonzero");var te=l.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"transform","translate(3.0, 29.0)"),te.setAttributeNS(null,"fill","#000000");for(var ue=[{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"}],we=0,be=ue;we=w}this._isDragging&&(this._pos=d.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.Event("dragstart"))),this.fire(new a.Event("drag")))},c.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 a.Event("dragend")),this._state="inactive"},c.prototype._addDragHandler=function(d){this._element.contains(d.originalEvent.target)&&(d.preventDefault(),this._positionDelta=d.point.sub(this._pos).add(this._offset),this._pointerdownPos=d.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))},c.prototype.setDraggable=function(d){return this._draggable=!!d,this._map&&(d?(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},c.prototype.isDraggable=function(){return this._draggable},c.prototype.setRotation=function(d){return this._rotation=d||0,this._update(),this},c.prototype.getRotation=function(){return this._rotation},c.prototype.setRotationAlignment=function(d){return this._rotationAlignment=d||"auto",this._update(),this},c.prototype.getRotationAlignment=function(){return this._rotationAlignment},c.prototype.setPitchAlignment=function(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this},c.prototype.getPitchAlignment=function(){return this._pitchAlignment},c}(a.Evented),ay={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bf;function Yv(g){bf!==void 0?g(bf):a.window.navigator.permissions!==void 0?a.window.navigator.permissions.query({name:"geolocation"}).then(function(c){bf=c.state!=="denied",g(bf)}):(bf=!!a.window.navigator.geolocation,g(bf))}var uh=0,ic=!1,d1=function(g){function c(x){g.call(this),this.options=a.extend({},ay,x),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.onAdd=function(d){return this._map=d,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Yv(this._setupUI),this._container},c.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(a.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(),l.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,uh=0,ic=!1},c.prototype._isOutOfMapMaxBounds=function(d){var w=this._map.getMaxBounds(),L=d.coords;return w&&(L.longitudew.getEast()||L.latitudew.getNorth())},c.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}},c.prototype._onSuccess=function(d){if(this._map){if(this._isOutOfMapMaxBounds(d)){this._setErrorState(),this.fire(new a.Event("outofmaxbounds",d)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,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(d),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",d)),this._finish()}},c.prototype._updateCamera=function(d){var w=new a.LngLat(d.coords.longitude,d.coords.latitude),L=d.coords.accuracy,F=this._map.getBearing(),G=a.extend({bearing:F},this.options.fitBoundsOptions);this._map.fitBounds(w.toBounds(L),G,{geolocateSource:!0})},c.prototype._updateMarker=function(d){if(d){var w=new a.LngLat(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(w).addTo(this._map),this._userLocationDotMarker.setLngLat(w).addTo(this._map),this._accuracy=d.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},c.prototype._updateCircleRadius=function(){var d=this._map._container.clientHeight/2,w=this._map.unproject([0,d]),L=this._map.unproject([1,d]),F=w.distanceTo(L),G=Math.ceil(2*this._accuracy/F);this._circleElement.style.width=G+"px",this._circleElement.style.height=G+"px"},c.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},c.prototype._onError=function(d){if(this._map){if(this.options.trackUserLocation)if(d.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 w=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=w,this._geolocateButton.setAttribute("aria-label",w),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&ic)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",d)),this._finish()}},c.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},c.prototype._setupUI=function(d){var w=this;if(this._container.addEventListener("contextmenu",function(G){return G.preventDefault()}),this._geolocateButton=l.create("button","mapboxgl-ctrl-geolocate",this._container),l.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",d===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var L=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=L,this._geolocateButton.setAttribute("aria-label",L)}else{var F=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=F,this._geolocateButton.setAttribute("aria-label",F)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=l.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new lh(this._dotElement),this._circleElement=l.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new lh({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(G){var K=G.originalEvent&&G.originalEvent.type==="resize";!G.geolocateSource&&w._watchState==="ACTIVE_LOCK"&&!K&&(w._watchState="BACKGROUND",w._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),w._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),w.fire(new a.Event("trackuserlocationend")))})},c.prototype.trigger=function(){if(!this._setup)return a.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 a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":uh--,ic=!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 a.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 a.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"),uh++;var d;uh>1?(d={maximumAge:6e5,timeout:0},ic=!0):(d=this.options.positionOptions,ic=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,d)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},c.prototype._clearWatch=function(){a.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)},c}(a.Evented),iy={maxWidth:100,unit:"metric"},nc=function(c){this.options=a.extend({},iy,c),a.bindAll(["_onMove","setUnit"],this)};nc.prototype.getDefaultPosition=function(){return"bottom-left"},nc.prototype._onMove=function(){ny(this._map,this._container,this.options)},nc.prototype.onAdd=function(c){return this._map=c,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",c.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},nc.prototype.onRemove=function(){l.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},nc.prototype.setUnit=function(c){this.options.unit=c,ny(this._map,this._container,this.options)};function ny(g,c,x){var d=x&&x.maxWidth||100,w=g._container.clientHeight/2,L=g.unproject([0,w]),F=g.unproject([d,w]),G=L.distanceTo(F);if(x&&x.unit==="imperial"){var K=3.2808*G;if(K>5280){var te=K/5280;fh(c,d,te,g._getUIString("ScaleControl.Miles"))}else fh(c,d,K,g._getUIString("ScaleControl.Feet"))}else if(x&&x.unit==="nautical"){var ue=G/1852;fh(c,d,ue,g._getUIString("ScaleControl.NauticalMiles"))}else G>=1e3?fh(c,d,G/1e3,g._getUIString("ScaleControl.Kilometers")):fh(c,d,G,g._getUIString("ScaleControl.Meters"))}function fh(g,c,x,d){var w=m1(x),L=w/x;g.style.width=c*L+"px",g.innerHTML=w+" "+d}function p1(g){var c=Math.pow(10,Math.ceil(-Math.log(g)/Math.LN10));return Math.round(g*c)/c}function m1(g){var c=Math.pow(10,(""+Math.floor(g)).length-1),x=g/c;return x=x>=10?10:x>=5?5:x>=3?3:x>=2?2:x>=1?1:p1(x),c*x}var $s=function(c){this._fullscreen=!1,c&&c.container&&(c.container instanceof a.window.HTMLElement?this._container=c.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.window.document&&(this._fullscreenchange="MSFullscreenChange")};$s.prototype.onAdd=function(c){return this._map=c,this._container||(this._container=this._map.getContainer()),this._controlContainer=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},$s.prototype.onRemove=function(){l.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},$s.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},$s.prototype._setupUI=function(){var c=this._fullscreenButton=l.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);l.create("span","mapboxgl-ctrl-icon",c).setAttribute("aria-hidden",!0),c.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},$s.prototype._updateTitle=function(){var c=this._getTitle();this._fullscreenButton.setAttribute("aria-label",c),this._fullscreenButton.title=c},$s.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},$s.prototype._isFullscreen=function(){return this._fullscreen},$s.prototype._changeIcon=function(){var c=a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement;c===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},$s.prototype._onClickFullscreen=function(){this._isFullscreen()?a.window.document.exitFullscreen?a.window.document.exitFullscreen():a.window.document.mozCancelFullScreen?a.window.document.mozCancelFullScreen():a.window.document.msExitFullscreen?a.window.document.msExitFullscreen():a.window.document.webkitCancelFullScreen&&a.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 y1={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},g1=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),o3=function(g){function c(x){g.call(this),this.options=a.extend(Object.create(y1),x),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.addTo=function(d){return this._map&&this.remove(),this._map=d,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 a.Event("open")),this},c.prototype.isOpen=function(){return!!this._map},c.prototype.remove=function(){return this._content&&l.remove(this._content),this._container&&(l.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 a.Event("close")),this},c.prototype.getLngLat=function(){return this._lngLat},c.prototype.setLngLat=function(d){return this._lngLat=a.LngLat.convert(d),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},c.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},c.prototype.getElement=function(){return this._container},c.prototype.setText=function(d){return this.setDOMContent(a.window.document.createTextNode(d))},c.prototype.setHTML=function(d){var w=a.window.document.createDocumentFragment(),L=a.window.document.createElement("body"),F;for(L.innerHTML=d;F=L.firstChild,!!F;)w.appendChild(F);return this.setDOMContent(w)},c.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},c.prototype.setMaxWidth=function(d){return this.options.maxWidth=d,this._update(),this},c.prototype.setDOMContent=function(d){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=l.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(d),this._createCloseButton(),this._update(),this._focusFirstElement(),this},c.prototype.addClassName=function(d){this._container&&this._container.classList.add(d)},c.prototype.removeClassName=function(d){this._container&&this._container.classList.remove(d)},c.prototype.setOffset=function(d){return this.options.offset=d,this._update(),this},c.prototype.toggleClassName=function(d){if(this._container)return this._container.classList.toggle(d)},c.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=l.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))},c.prototype._onMouseUp=function(d){this._update(d.point)},c.prototype._onMouseMove=function(d){this._update(d.point)},c.prototype._onDrag=function(d){this._update(d.point)},c.prototype._update=function(d){var w=this,L=this._lngLat||this._trackPointer;if(!(!this._map||!L||!this._content)&&(this._container||(this._container=l.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=l.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ie){return w._container.classList.add(Ie)}),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=Su(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!d))){var F=this._pos=this._trackPointer&&d?d:this._map.project(this._lngLat),G=this.options.anchor,K=_1(this.options.offset);if(!G){var te=this._container.offsetWidth,ue=this._container.offsetHeight,we;F.y+K.bottom.ythis._map.transform.height-ue?we=["bottom"]:we=[],F.xthis._map.transform.width-te/2&&we.push("right"),we.length===0?G="bottom":G=we.join("-")}var be=F.add(K[G]).round();l.setTransform(this._container,Zv[G]+" translate("+be.x+"px,"+be.y+"px)"),Fp(this._container,G,"popup")}},c.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var d=this._container.querySelector(g1);d&&d.focus()}},c.prototype._onClose=function(){this.remove()},c}(a.Evented);function _1(g){if(g)if(typeof g=="number"){var c=Math.round(Math.sqrt(.5*Math.pow(g,2)));return{center:new a.Point(0,0),top:new a.Point(0,g),"top-left":new a.Point(c,c),"top-right":new a.Point(-c,c),bottom:new a.Point(0,-g),"bottom-left":new a.Point(c,-c),"bottom-right":new a.Point(-c,-c),left:new a.Point(g,0),right:new a.Point(-g,0)}}else if(g instanceof a.Point||Array.isArray(g)){var x=a.Point.convert(g);return{center:x,top:x,"top-left":x,"top-right":x,bottom:x,"bottom-left":x,"bottom-right":x,left:x,right:x}}else return{center:a.Point.convert(g.center||[0,0]),top:a.Point.convert(g.top||[0,0]),"top-left":a.Point.convert(g["top-left"]||[0,0]),"top-right":a.Point.convert(g["top-right"]||[0,0]),bottom:a.Point.convert(g.bottom||[0,0]),"bottom-left":a.Point.convert(g["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(g["bottom-right"]||[0,0]),left:a.Point.convert(g.left||[0,0]),right:a.Point.convert(g.right||[0,0])};else return _1(new a.Point(0,0))}var bn={version:a.version,supported:s,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:ry,NavigationControl:Mu,GeolocateControl:d1,AttributionControl:Aa,ScaleControl:nc,FullscreenControl:$s,Popup:o3,Marker:lh,Style:Ts,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:Br,clearPrewarmedResources:ca,get accessToken(){return a.config.ACCESS_TOKEN},set accessToken(g){a.config.ACCESS_TOKEN=g},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(g){a.config.API_URL=g},get workerCount(){return tr.workerCount},set workerCount(g){tr.workerCount=g},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(g){a.config.MAX_PARALLEL_IMAGE_REQUESTS=g},clearStorage:function(c){a.clearTileCache(c)},workerUrl:""};return bn}),r})});var AH=de((ybe,TH)=>{TH.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 Ob=de(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});var Ys=63710088e-1,mA={centimeters:Ys*100,centimetres:Ys*100,degrees:360/(2*Math.PI),feet:Ys*3.28084,inches:Ys*39.37,kilometers:Ys/1e3,kilometres:Ys/1e3,meters:Ys,metres:Ys,miles:Ys/1609.344,millimeters:Ys*1e3,millimetres:Ys*1e3,nauticalmiles:Ys/1852,radians:1,yards:Ys*1.0936},pA={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 tv(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}function kde(e,t,r={}){switch(e){case"Point":return yA(t).geometry;case"LineString":return _A(t).geometry;case"Polygon":return gA(t).geometry;case"MultiPoint":return SH(t).geometry;case"MultiLineString":return MH(t).geometry;case"MultiPolygon":return kH(t).geometry;default:throw new Error(e+" is invalid")}}function yA(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(!Nb(e[0])||!Nb(e[1]))throw new Error("coordinates must contain numbers");return tv({type:"Point",coordinates:e},t,r)}function Cde(e,t,r={}){return Bb(e.map(i=>yA(i,t)),r)}function gA(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sgA(i,t)),r)}function _A(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return tv({type:"LineString",coordinates:e},t,r)}function Lde(e,t,r={}){return Bb(e.map(i=>_A(i,t)),r)}function Bb(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function MH(e,t,r={}){return tv({type:"MultiLineString",coordinates:e},t,r)}function SH(e,t,r={}){return tv({type:"MultiPoint",coordinates:e},t,r)}function kH(e,t,r={}){return tv({type:"MultiPolygon",coordinates:e},t,r)}function Pde(e,t,r={}){return tv({type:"GeometryCollection",geometries:e},t,r)}function Dde(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 CH(e,t="kilometers"){let r=mA[t];if(!r)throw new Error(t+" units is invalid");return e*r}function xA(e,t="kilometers"){let r=mA[t];if(!r)throw new Error(t+" units is invalid");return e/r}function zde(e,t){return EH(xA(e,t))}function Ide(e){let t=e%360;return t<0&&(t+=360),t}function Rde(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function EH(e){return e%(2*Math.PI)*180/Math.PI}function Fde(e){return e%360*Math.PI/180}function qde(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return CH(xA(e,t),r)}function Nde(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=pA[t];if(!i)throw new Error("invalid original units");let a=pA[r];if(!a)throw new Error("invalid final units");return e/i*a}function Nb(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Bde(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ode(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(!Nb(t))throw new Error("bbox must only contain numbers")})}function Ude(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")}Si.areaFactors=pA;Si.azimuthToBearing=Rde;Si.bearingToAzimuth=Ide;Si.convertArea=Nde;Si.convertLength=qde;Si.degreesToRadians=Fde;Si.earthRadius=Ys;Si.factors=mA;Si.feature=tv;Si.featureCollection=Bb;Si.geometry=kde;Si.geometryCollection=Pde;Si.isNumber=Nb;Si.isObject=Bde;Si.lengthToDegrees=zde;Si.lengthToRadians=xA;Si.lineString=_A;Si.lineStrings=Lde;Si.multiLineString=MH;Si.multiPoint=SH;Si.multiPolygon=kH;Si.point=yA;Si.points=Cde;Si.polygon=gA;Si.polygons=Ede;Si.radiansToDegrees=EH;Si.radiansToLength=CH;Si.round=Dde;Si.validateBBox=Ode;Si.validateId=Ude});var Vb=de(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var ls=Ob();function l1(e,t,r){if(e!==null)for(var i,a,s,l,f,h,v,m=0,b=0,T,S=e.type,C=S==="FeatureCollection",P=S==="Feature",E=C?e.features.length:1,I=0;Ih||C>v||P>m){f=b,h=i,v=C,m=P,s=0;return}var E=ls.lineString.call(void 0,[f,b],r.properties);if(t(E,i,a,P,s)===!1)return!1;s++,f=b})===!1)return!1}}})}function Xde(e,t,r){var i=r,a=!1;return DH(e,function(s,l,f,h,v){a===!1&&r===void 0?i=s:i=t(i,s,l,f,h,v),a=!0}),i}function zH(e,t){if(!e)throw new Error("geojson is required");Ub(e,function(r,i,a){if(r.geometry!==null){var s=r.geometry.type,l=r.geometry.coordinates;switch(s){case"LineString":if(t(r,i,a,0,0)===!1)return!1;break;case"Polygon":for(var f=0;f{"use strict";Object.defineProperty(Hb,"__esModule",{value:!0});var IH=Ob(),Qde=Vb();function qH(e){return Qde.geomReduce.call(void 0,e,(t,r)=>t+$de(r),0)}function $de(e){let t=0,r;switch(e.type){case"Polygon":return RH(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(FH(e[0]));for(let r=1;r=t?(i+2)%t:i+2],f=a[0]*wA,h=s[1]*wA,v=l[0]*wA;r+=(v-f)*Math.sin(h),i++}return r*epe}var tpe=qH;Hb.area=qH;Hb.default=tpe});var OH=de(Gb=>{"use strict";Object.defineProperty(Gb,"__esModule",{value:!0});var rpe=Ob(),ape=Vb();function BH(e,t={}){let r=0,i=0,a=0;return ape.coordEach.call(void 0,e,function(s){r+=s[0],i+=s[1],a++},!0),rpe.point.call(void 0,[r/a,i/a],t.properties)}var ipe=BH;Gb.centroid=BH;Gb.default=ipe});var VH=de(Zb=>{"use strict";Object.defineProperty(Zb,"__esModule",{value:!0});var npe=Vb();function UH(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return npe.coordEach.call(void 0,e,i=>{r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]{"use strict";var spe=ja(),ZH=AH(),{area:lpe}=NH(),{centroid:upe}=OH(),{bbox:fpe}=VH(),HH=y_(),bm=Th(),cpe=cc(),hpe=wy(),Yb=lx(),GH=Object.keys(ZH),vpe={"ISO-3":HH,"USA-states":HH,"country names":dpe};function dpe(e){for(var t=0;t0&&m[b+1][0]<0)return b;return null}switch(i==="RUS"||i==="FJI"?s=function(m){var b;if(v(m)===null)b=m;else for(b=new Array(m.length),h=0;hb?T[S++]=[m[h][0]+360,m[h][1]]:h===b?(T[S++]=m[h],T[S++]=[m[h][0],-90]):T[S++]=m[h];var C=Yb.tester(T);C.pts.pop(),a.push(C)}:s=function(m){a.push(Yb.tester(m))},t.type){case"MultiPolygon":for(l=0;l0?C.properties.ct=gpe(C):C.properties.ct=[NaN,NaN],T.fIn=m,T.fOut=C,a.push(C)}else bm.log(["Location",T.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[b]}switch(r.type){case"FeatureCollection":var h=r.features;for(s=0;sa&&(a=f,r=l)}else r=t;return upe(r).geometry.coordinates}function _pe(e){var t=window.PlotlyGeoAssets||{},r=[];function i(h){return new Promise(function(v,m){spe.json(h,function(b,T){if(b){delete t[h];var S=b.status===404?'GeoJSON at URL "'+h+'" does not exist.':"Unexpected error while fetching from "+h;return m(new Error(S))}return t[h]=T,v(T)})})}function a(h){return new Promise(function(v,m){var b=0,T=setInterval(function(){if(t[h]&&t[h]!=="pending")return clearInterval(T),v(t[h]);if(b>100)return clearInterval(T),m("Unexpected error while fetching from "+h);b++},50)})}for(var s=0;s{"use strict";var Gd=Bt(),bpe=co().sanitizeHTML,wpe=lA(),XH=zc();function jH(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=XH.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var fu=jH.prototype;fu.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=Wb(t)};fu.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))};fu.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};fu.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};fu.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};fu.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)};fu.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,!!Wb(e)){var r=Tpe(e);t.addSource(this.idSource,r)}};fu.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function JH(e){var t={},r={};switch(e.type){case"circle":Gd.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":Gd.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":Gd.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,a=wpe(i.textposition,i.iconsize);Gd.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":i.placement}),Gd.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":Gd.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Tpe(e){var t=e.sourcetype,r=e.source,i={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",i.tileSize=256):t==="image"&&(a="url",i.coordinates=e.coordinates),i[a]=r,e.sourceattribution&&(i.attribution=bpe(e.sourceattribution)),i}KH.exports=function(t,r,i){var a=new jH(t,r);return a.update(i),a}});var sG=de((Mbe,oG)=>{"use strict";var AA=dA(),MA=Bt(),rG=TA(),$H=la(),Ape=Yi(),Mpe=jl(),Xb=Rf(),aG=kd(),Spe=aG.drawMode,kpe=aG.selectMode,Cpe=Nf().prepSelect,Epe=Nf().clearOutline,Lpe=Nf().clearSelectionsCache,Ppe=Nf().selectOnClick,rv=zc(),Dpe=QH();function iG(e,t){this.id=t,this.gd=e;var r=e._fullLayout,i=e._context;this.container=r._glcontainer.node(),this.isStatic=i.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Un=iG.prototype;Un.plot=function(e,t,r){var i=this,a=t[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]);var s;i.map?s=new Promise(function(l,f){i.updateMap(e,t,l,f)}):s=new Promise(function(l,f){i.createMap(e,t,l,f)}),r.push(s)};Un.createMap=function(e,t,r,i){var a=this,s=t[a.id],l=a.styleObj=nG(s.style,t);a.accessToken=s.accesstoken;var f=s.bounds,h=f?[[f.west,f.south],[f.east,f.north]]:null,v=a.map=new AA.Map({container:a.div,style:l.style,center:SA(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:h,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new AA.AttributionControl({compact:!0}));v._canvas.style.left="0px",v._canvas.style.top="0px",a.rejectOnError(i),a.isStatic||a.initFx(e,t);var m=[];m.push(new Promise(function(b){v.once("load",b)})),m=m.concat(rG.fetchTraceGeoData(e)),Promise.all(m).then(function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(i)};Un.updateMap=function(e,t,r,i){var a=this,s=a.map,l=t[this.id];a.rejectOnError(i);var f=[],h=nG(l.style,t);JSON.stringify(a.styleObj)!==JSON.stringify(h)&&(a.styleObj=h,s.setStyle(h.style),a.traceHash={},f.push(new Promise(function(v){s.once("styledata",v)}))),f=f.concat(rG.fetchTraceGeoData(e)),Promise.all(f).then(function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(i)};Un.fillBelowLookup=function(e,t){var r=t[this.id],i=r.layers,a,s,l=this.belowLookup={},f=!1;for(a=0;a1)for(a=0;a-1&&Ppe(h.originalEvent,i,[r.xaxis],[r.yaxis],r.id,f),v.indexOf("event")>-1&&Xb.click(i,h.originalEvent)}}};Un.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(t.isStatic)return;function a(h){var v=t.map.unproject(h);return[v.lng,v.lat]}var s=e.dragmode,l;l=function(h,v){if(v.isRect){var m=h.range={};m[t.id]=[a([v.xmin,v.ymin]),a([v.xmax,v.ymax])]}else{var b=h.lassoPoints={};b[t.id]=v.map(a)}};var f=t.dragOptions;t.dragOptions=MA.extendDeep(f||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:l},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),kpe(s)||Spe(s)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(h,v,m){Cpe(h,v,m,t.dragOptions,s)},Mpe.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))};Un.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Un.updateLayers=function(e){var t=e[this.id],r=t.layers,i=this.layerList,a;if(r.length!==i.length){for(a=0;a{"use strict";var zpe=Bt(),Ipe=Di(),Rpe=Mb().defaults;lG.exports=function(t,r,i,a){var s=a.type,l=a.attributes,f=a.handleDefaults,h=a.partition||"x",v=r._subplots[s],m=v.length,b=m&&v[0].replace(/\d+$/,""),T,S;function C(R,N){return zpe.coerce(T,S,l,R,N)}for(var P=0;P{"use strict";var kA=Bt(),Fpe=uG(),qpe=Wl(),fG=a1();cG.exports=function(t,r,i){Fpe(t,r,i,{type:"mapbox",attributes:fG,handleDefaults:Npe,partition:"y",accessToken:r._mapboxAccessToken})};function Npe(e,t,r,i){r("accesstoken",i.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var a=r("bounds.west"),s=r("bounds.east"),l=r("bounds.south"),f=r("bounds.north");(a===void 0||s===void 0||l===void 0||f===void 0)&&delete t.bounds,qpe(e,t,{name:"layers",handleItemDefaults:Bpe}),t._input=e}function Bpe(e,t){function r(h,v){return kA.coerce(e,t,fG.layers,h,v)}var i=r("visible");if(i){var a=r("sourcetype"),s=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var l;s&&(l="raster");var f=r("type",l);s&&f!=="raster"&&(f=t.type="raster",kA.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),f==="circle"&&r("circle.radius"),f==="line"&&(r("line.width"),r("line.dash")),f==="fill"&&r("fill.outlinecolor"),f==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),kA.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var jb=de(Ws=>{"use strict";var vG=dA(),Ju=Bt(),CA=Ju.strTranslate,Ope=Ju.strScale,Upe=F_().getSubplotCalcData,Vpe=zh(),Hpe=ja(),dG=_i(),Gpe=co(),Zpe=sG(),av="mapbox",Hf=Ws.constants=zc();Ws.name=av;Ws.attr="subplot";Ws.idRoot=av;Ws.idRegex=Ws.attrRegex=Ju.counterRegex(av);var Ype=["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(" ");Ws.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Ws.layoutAttributes=a1();Ws.supplyLayoutDefaults=hG();var pG=!0;Ws.plot=function(t){pG&&(pG=!1,Ju.warn(Ype));var r=t._fullLayout,i=t.calcdata,a=r._subplots[av];if(vG.version!==Hf.requiredVersion)throw new Error(Hf.wrongVersionErrorMsg);var s=Wpe(t,a);vG.accessToken=s;for(var l=0;lI/2){var R=S.split("|").join("
");P.text(R).attr("data-unformatted",R).call(Gpe.convertToTspans,e),E=dG.bBox(P.node())}P.attr("transform",CA(-3,-E.height+8)),C.insert("rect",".static-attribution").attr({x:-E.width-6,y:-E.height-3,width:E.width+6,height:E.height+3,fill:"rgba(255, 255, 255, 0.75)"});var N=1;E.width+6>I&&(N=I/(E.width+6));var z=[i.l+i.w*l.x[1],i.t+i.h*(1-l.y[0])];C.attr("transform",CA(z[0],z[1])+Ope(N))}};function Wpe(e,t){var r=e._fullLayout,i=e._context;if(i.mapboxAccessToken==="")return"";for(var a=[],s=[],l=!1,f=!1,h=0;h1&&Ju.warn(Hf.multipleTokensErrorMsg),a[0]):(s.length&&Ju.log(["Listed mapbox access token(s)",s.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function mG(e){return typeof e=="string"&&(Hf.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Ws.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[av],i=0;i{"use strict";var Ebe=["*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(" ");yG.exports={attributes:Pb(),supplyDefaults:KV(),colorbar:j6(),formatLabels:oA(),calc:iH(),plot:mH(),hoverPoints:qb().hoverPoints,eventData:xH(),selectPoints:wH(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:jb(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var xG=de((Pbe,_G)=>{"use strict";_G.exports=gG()});var EA=de((Dbe,TG)=>{"use strict";var Xpe=Hl().hovertemplateAttrs,nv=rA(),jpe=xc(),bG=ms(),Jpe=Af().defaultLine,iv=hn().extendFlat,wG=nv.marker.line;TG.exports=iv({locations:{valType:"data_array",editType:"calc"},locationmode:nv.locationmode,z:{valType:"data_array",editType:"calc"},geojson:iv({},nv.geojson,{}),featureidkey:nv.featureidkey,text:iv({},nv.text,{}),hovertext:iv({},nv.hovertext,{}),marker:{line:{color:iv({},wG.color,{dflt:Jpe}),width:iv({},wG.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:nv.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:nv.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:iv({},bG.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Xpe(),showlegend:iv({},bG.showlegend,{dflt:!1})},jpe("",{cLetter:"z",editTypeOverride:"calc"}))});var LA=de((zbe,AG)=>{"use strict";var Ic=EA(),Kpe=xc(),Qpe=Hl().hovertemplateAttrs,$pe=ms(),ov=hn().extendFlat;AG.exports=ov({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:ov({},Ic.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Ic.text,hovertext:Ic.hovertext,marker:{line:{color:ov({},Ic.marker.line.color,{editType:"plot"}),width:ov({},Ic.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:ov({},Ic.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:ov({},Ic.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:ov({},Ic.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Ic.hoverinfo,hovertemplate:Qpe({},{keys:["properties"]}),showlegend:ov({},$pe.showlegend,{dflt:!1})},Kpe("",{cLetter:"z",editTypeOverride:"calc"}))});var SG=de((Ibe,MG)=>{"use strict";var u1=Bt(),e0e=hd(),t0e=LA();MG.exports=function(t,r,i,a){function s(m,b){return u1.coerce(t,r,t0e,m,b)}var l=s("locations"),f=s("z"),h=s("geojson");if(!u1.isArrayOrTypedArray(l)||!l.length||!u1.isArrayOrTypedArray(f)||!f.length||!(typeof h=="string"&&h!==""||u1.isPlainObject(h))){r.visible=!1;return}s("featureidkey"),r._length=Math.min(l.length,f.length),s("below"),s("text"),s("hovertext"),s("hovertemplate");var v=s("marker.line.width");v&&s("marker.line.color"),s("marker.opacity"),e0e(t,r,a,s,{prefix:"",cLetter:"z"}),u1.coerceSelectionMarkerOpacity(r,s)}});var PA=de((Rbe,kG)=>{"use strict";kG.exports={min:"zmin",max:"zmax"}});var PG=de((Fbe,LG)=>{"use strict";var CG=Da(),r0e=Hi().BADNUM,a0e=Hy(),i0e=Ng(),n0e=Gx();function EG(e){return e&&typeof e=="string"}LG.exports=function(t,r){var i=r._length,a=new Array(i),s;r.geojson?s=function(m){return EG(m)||CG(m)}:s=EG;for(var l=0;l{"use strict";var o0e=Da(),Rc=Bt(),s0e=L0(),l0e=_i(),u0e=Db().makeBlank,DG=TA();function f0e(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,i={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},s=t._opts={fill:i,line:a,geojson:u0e()};if(!r)return s;var l=DG.extractTraceFeature(e);if(!l)return s;var f=s0e.makeColorScaleFuncFromTrace(t),h=t.marker,v=h.line||{},m;Rc.isArrayOrTypedArray(h.opacity)&&(m=function(R){var N=R.mo;return o0e(N)?+Rc.constrain(N,0,1):0});var b;Rc.isArrayOrTypedArray(v.color)&&(b=function(R){return R.mlc});var T;Rc.isArrayOrTypedArray(v.width)&&(T=function(R){return R.mlw});for(var S=0;S{"use strict";var FG=DA().convert,c0e=DA().convertOnSelect,RG=zc().traceLayerPrefix;function qG(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",RG+t+"-fill"],["line",RG+t+"-line"]],this.below=null}var wm=qG.prototype;wm.update=function(e){this._update(FG(e)),e[0].trace._glTrace=this};wm.updateOnSelect=function(e){this._update(c0e(e))};wm._update=function(e){var t=this.subplot,r=this.layerList,i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(e,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};wm.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};NG.exports=function(t,r){var i=r[0].trace,a=new qG(t,i.uid),s=a.sourceId,l=FG(r),f=a.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(s,{type:"geojson",data:l.geojson}),a._addLayers(l,f),r[0].trace._glTrace=a,a}});var UG=de((Bbe,OG)=>{"use strict";var h0e=Yi(),v0e=EA(),d0e=Bt().fillText;OG.exports=function(t,r,i){var a=t.cd,s=a[0].trace,l=t.subplot,f,h,v,m,b=[r,i],T=[r+360,i];for(h=0;h")}}});var HG=de((Obe,VG)=>{"use strict";VG.exports=function(t,r,i,a,s){t.location=r.location,t.z=r.z;var l=a[s];return l.fIn&&l.fIn.properties&&(t.properties=l.fIn.properties),t.ct=l.ct,t}});var ZG=de((Ube,GG)=>{"use strict";GG.exports=function(t,r){var i=t.cd,a=t.xaxis,s=t.yaxis,l=[],f,h,v,m,b;if(r===!1)for(f=0;f{"use strict";var Vbe=["*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(" ");YG.exports={attributes:LA(),supplyDefaults:SG(),colorbar:PA(),calc:PG(),plot:BG(),hoverPoints:UG(),eventData:HG(),selectPoints:ZG(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var a=r[i].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var s=i+1;s{"use strict";XG.exports=WG()});var IA=de((Zbe,KG)=>{"use strict";var m0e=xc(),y0e=Hl().hovertemplateAttrs,JG=ms(),Jb=Pb(),zA=hn().extendFlat;KG.exports=zA({lon:Jb.lon,lat:Jb.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:Jb.text,hovertext:Jb.hovertext,hoverinfo:zA({},JG.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:y0e(),showlegend:zA({},JG.showlegend,{dflt:!1})},m0e("",{cLetter:"z",editTypeOverride:"calc"}))});var $G=de((Ybe,QG)=>{"use strict";var g0e=Bt(),_0e=hd(),x0e=IA();QG.exports=function(t,r,i,a){function s(v,m){return g0e.coerce(t,r,x0e,v,m)}var l=s("lon")||[],f=s("lat")||[],h=Math.min(l.length,f.length);if(!h){r.visible=!1;return}r._length=h,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),_0e(t,r,a,s,{prefix:"",cLetter:"z"})}});var rZ=de((Wbe,tZ)=>{"use strict";var RA=Da(),b0e=Bt().isArrayOrTypedArray,FA=Hi().BADNUM,w0e=Hy(),eZ=Bt()._;tZ.exports=function(t,r){for(var i=r._length,a=new Array(i),s=r.z,l=b0e(s)&&s.length,f=0;f{"use strict";var T0e=Da(),qA=Bt(),aZ=Ua(),iZ=L0(),nZ=Hi().BADNUM,A0e=Db().makeBlank;oZ.exports=function(t){var r=t[0].trace,i=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},s=r._opts={heatmap:a,geojson:A0e()};if(!i)return s;var l=[],f,h=r.z,v=r.radius,m=qA.isArrayOrTypedArray(h)&&h.length,b=qA.isArrayOrTypedArray(v);for(f=0;f0?+v[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:C})}}var E=iZ.extractOpts(r),I=E.reversescale?iZ.flipScale(E.colorscale):E.colorscale,R=I[0][1],N=aZ.opacity(R)<1?R:aZ.addOpacity(R,0),z=["interpolate",["linear"],["heatmap-density"],0,N];for(f=1;f{"use strict";var lZ=sZ(),M0e=zc().traceLayerPrefix;function uZ(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",M0e+t+"-heatmap"]],this.below=null}var Kb=uZ.prototype;Kb.update=function(e){var t=this.subplot,r=this.layerList,i=lZ(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(i,a),this.below=a);for(var s=0;s=0;r--)e.removeLayer(t[r][1])};Kb.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};fZ.exports=function(t,r){var i=r[0].trace,a=new uZ(t,i.uid),s=a.sourceId,l=lZ(r),f=a.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(s,{type:"geojson",data:l.geojson}),a._addLayers(l,f),a}});var vZ=de((Jbe,hZ)=>{"use strict";var S0e=Yi(),k0e=qb().hoverPoints,C0e=qb().getExtraText;hZ.exports=function(t,r,i){var a=k0e(t,r,i);if(a){var s=a[0],l=s.cd,f=l[0].trace,h=l[s.index];if(delete s.color,"z"in h){var v=s.subplot.mockAxis;s.z=h.z,s.zLabel=S0e.tickText(v,v.c2l(h.z),"hover").text}return s.extraText=C0e(f,h,l[0].t.labels),[s]}}});var pZ=de((Kbe,dZ)=>{"use strict";dZ.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var yZ=de(($be,mZ)=>{"use strict";var Qbe=["*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(" ");mZ.exports={attributes:IA(),supplyDefaults:$G(),colorbar:PA(),formatLabels:oA(),calc:rZ(),plot:cZ(),hoverPoints:vZ(),eventData:pZ(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;i{"use strict";gZ.exports=yZ()});var Uo=de((t3e,bZ)=>{"use strict";var xZ=Object.getOwnPropertySymbols,E0e=Object.prototype.hasOwnProperty,L0e=Object.prototype.propertyIsEnumerable;function P0e(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function D0e(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(s){return t[s]});if(i.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(s){a[s]=s}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(s){return!1}}bZ.exports=D0e()?Object.assign:function(e,t){for(var r,i=P0e(e),a,s=1;s{var $b=Uo();function wZ(){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={}}$b(wZ.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,a){return i=(e!=null&&e.year?e.calendar():typeof i=="string"?this.instance(i,a):i)||this.instance(),i.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",a=0;r>0;){var s=r%10;i=(s===0?"":e[s]+t[a])+i,a++,r=Math.floor(r/10)}return i.indexOf(e[1]+t[1])===0&&(i=i.substr(1)),i||e[0]}}});function NA(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function Qb(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}$b(NA.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(Ca.local.invalidDate||Ca.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(Ca.local.differentCalendars||Ca.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?"-":"")+Qb(Math.abs(this.year()),4)+"-"+Qb(this.month(),2)+"-"+Qb(this.day(),2)}});function BA(){this.shortYearCutoff="+10"}$b(BA.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new NA(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ca.local.invalidYear||Ca.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,Ca.local.invalidYear||Ca.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+Qb(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ca.local.invalidYear||Ca.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Ca.local.invalidMonth||Ca.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,Ca.local.invalidMonth||Ca.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ca.local.invalidYear||Ca.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var i=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(i);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var s=e.year()+(r==="y"?t:0),l=e.monthOfYear()+(r==="m"?t:0),a=e.day(),f=function(m){for(;lb-1+m.minMonth;)s++,l-=b,b=m.monthsInYear(s)};r==="y"?(e.month()!==this.fromMonthOfYear(s,l)&&(l=this.newDate(s,e.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(s)),a=Math.min(a,this.daysInMonth(s,this.fromMonthOfYear(s,l)))):r==="m"&&(f(this),a=Math.min(a,this.daysInMonth(s,this.fromMonthOfYear(s,l))));var h=[s,this.fromMonthOfYear(s,l),a];return this._validateLevel--,h}catch(v){throw this._validateLevel--,v}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],s=r<0?-1:1;t=this._add(e,r*a[0]+s*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate);var i=r==="y"?t:e.year(),a=r==="m"?t:e.month(),s=r==="d"?t:e.day();return(r==="y"||r==="m")&&(s=Math.min(s,this.daysInMonth(i,a))),e.date(i,a,s)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||e!==0;if(i){var a=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),v=a-(h>2.5?4716:4715);return v<=0&&v--,this.newDate(v,h,f)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),a=new Date(i.year(),i.month()-1,i.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Ca=TZ.exports=new wZ;Ca.cdate=NA;Ca.baseCalendar=BA;Ca.calendars.gregorian=OA});var AZ=de(()=>{var UA=Uo(),po=Vo();UA(po.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"});po.local=po.regionalOptions[""];UA(po.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});UA(po.baseCalendar.prototype,{UNIX_EPOCH:po.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:po.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 po.local.invalidFormat||po.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var i=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,s=r.monthNumbers||this.local.monthNumbers,l=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,h=r.calculateWeek||this.local.calculateWeek,v=function(z,O){for(var H=1;N+H1},m=function(z,O,H,V){var W=""+O;if(v(z,V))for(;W.length1},R=function(ne,fe){var ve=I(ne,fe),ke=[2,3,ve?4:2,ve?4:2,10,11,20]["oyYJ@!".indexOf(ne)+1],Ce=new RegExp("^-?\\d{1,"+ke+"}"),Te=t.substring(W).match(Ce);if(!Te)throw(po.local.missingNumberAt||po.regionalOptions[""].missingNumberAt).replace(/\{0\}/,W);return W+=Te[0].length,parseInt(Te[0],10)},N=this,z=function(){if(typeof f=="function"){I("m");var ne=f.call(N,t.substring(W));return W+=ne.length,ne}return R("m")},O=function(ne,fe,ve,ke){for(var Ce=I(ne,ke)?ve:fe,Te=0;Te-1){T=1,S=C;for(var oe=this.daysInMonth(b,T);S>oe;oe=this.daysInMonth(b,T))T++,S-=oe}return m>-1?this.fromJD(m):this.newDate(b,T,S)},determineDate:function(e,t,r,i,a){r&&typeof r!="object"&&(a=i,i=r,r=null),typeof i!="string"&&(a=i,i="");var s=this,l=function(f){try{return s.parseDate(i,f,a)}catch(b){}f=f.toLowerCase();for(var h=(f.match(/^c/)&&r?r.newDate():null)||s.today(),v=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,m=v.exec(f);m;)h.add(parseInt(m[1],10),m[2]||"d"),m=v.exec(f);return h};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?l(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:s.today().add(e,"d"):s.newDate(e),e}})});var MZ=de(()=>{var sv=Vo(),z0e=Uo(),VA=sv.instance();function e3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}e3.prototype=new sv.baseCalendar;z0e(e3.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(R0e);return r?r[0]:""}var i=this._validateYear(e),a=e.month(),s=""+this.toChineseMonth(i,a);return t&&s.length<2&&(s="0"+s),this.isIntercalaryMonth(i,a)&&(s+="i"),s},monthNames:function(e){if(typeof e=="string"){var t=e.match(F0e);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),a=this.toChineseMonth(r,i),s=["\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"][a-1];return this.isIntercalaryMonth(r,i)&&(s="\u95F0"+s),s},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(q0e);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),a=this.toChineseMonth(r,i),s=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,i)&&(s="\u95F0"+s),s},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),i;if(isNaN(r))t[0]==="\u95F0"&&(i=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];i=a==="i"||a==="I"}var s=this.toMonthIndex(e,r,i);return s},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var i=this.intercalaryMonth(e),a=r&&t!==i;if(a||t<1||t>12)throw sv.local.invalidMonth.replace(/\{0\}/,this.local.name);var s;return i?!r&&t<=i?s=t-1:s=t:s=t-1,s},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),i=r?12:11;if(t<0||t>i)throw sv.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var i=this._validateYear(e,sv.local.invalidyear),a=uv[i-uv[0]],s=a>>9&4095,l=a>>5&15,f=a&31,h;h=VA.newDate(s,l,f),h.add(4-(h.dayOfWeek()||7),"d");var v=this.toJD(e,t,r)-h.toJD();return 1+Math.floor(v/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=lv[e-lv[0]],i=r>>13,a=i?12:11;if(t>a)throw sv.local.invalidMonth.replace(/\{0\}/,this.local.name);var s=r&1<<12-t?30:29;return s},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,s,r,sv.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),r=i.day();var a=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=B0e(e,s,r,a);return VA.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=VA.fromJD(e),r=N0e(t.year(),t.month(),t.day()),i=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,i,r.day)},fromString:function(e){var t=e.match(I0e),r=this._validateYear(+t[1]),i=+t[2],a=!!t[3],s=this.toMonthIndex(r,i,a),l=+t[4];return this.newDate(r,s,l)},add:function(e,t,r){var i=e.year(),a=e.month(),s=this.isIntercalaryMonth(i,a),l=this.toChineseMonth(i,a),f=Object.getPrototypeOf(e3.prototype).add.call(this,e,t,r);if(r==="y"){var h=f.year(),v=f.month(),m=this.isIntercalaryMonth(h,l),b=s&&m?this.toMonthIndex(h,l,!0):this.toMonthIndex(h,l,!1);b!==v&&f.month(b)}return f}});var I0e=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,R0e=/^\d?\d[iI]?/m,F0e=/^闰?十?[一二三四五六七八九]?月/m,q0e=/^闰?十?[一二三四五六七八九]?/m;sv.calendars.chinese=e3;var lv=[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],uv=[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 N0e(e,t,r,i){var a,s;if(typeof e=="object")a=e,s=t||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var f=typeof t=="number"&&t>=1&&t<=12;if(!f)throw new Error("Solar month outside range 1 - 12");var h=typeof r=="number"&&r>=1&&r<=31;if(!h)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},s=i||{}}var v=uv[a.year-uv[0]],m=a.year<<9|a.month<<5|a.day;s.year=m>=v?a.year:a.year-1,v=uv[s.year-uv[0]];var b=v>>9&4095,T=v>>5&15,S=v&31,C,P=new Date(b,T-1,S),E=new Date(a.year,a.month-1,a.day);C=Math.round((E-P)/(24*3600*1e3));var I=lv[s.year-lv[0]],R;for(R=0;R<13;R++){var N=I&1<<12-R?30:29;if(C>13;return!z||R=1888&&e<=2111;if(!f)throw new Error("Lunar year outside range 1888-2111");var h=typeof t=="number"&&t>=1&&t<=12;if(!h)throw new Error("Lunar month outside range 1 - 12");var v=typeof r=="number"&&r>=1&&r<=30;if(!v)throw new Error("Lunar day outside range 1 - 30");var m;typeof i=="object"?(m=!1,s=i):(m=!!i,s=a||{}),l={year:e,month:t,day:r,isIntercalary:m}}var b;b=l.day-1;var T=lv[l.year-lv[0]],S=T>>13,C;S&&(l.month>S||l.isIntercalary)?C=l.month:C=l.month-1;for(var P=0;P>9&4095,N=I>>5&15,z=I&31,O=new Date(R,N-1,z+b);return s.year=O.getFullYear(),s.month=1+O.getMonth(),s.day=O.getDate(),s}});var SZ=de(()=>{var Zd=Vo(),O0e=Uo();function HA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}HA.prototype=new Zd.baseCalendar;O0e(HA.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,Zd.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,Zd.local.invalidYear||Zd.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Zd.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,Zd.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,a=t-(i-1)*30+1;return this.newDate(r,i,a)}});Zd.calendars.coptic=HA});var kZ=de(()=>{var Fc=Vo(),U0e=Uo();function GA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}GA.prototype=new Fc.baseCalendar;U0e(GA.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,Fc.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fc.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fc.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Fc.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,Fc.local.invalidDate);return(i.day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,Fc.local.invalidDate);return{century:V0e[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,r){var i=this._validate(e,t,r,Fc.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),r=i.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var V0e={20:"Fruitbat",21:"Anchovy"};Fc.calendars.discworld=GA});var CZ=de(()=>{var Yd=Vo(),H0e=Uo();function ZA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}ZA.prototype=new Yd.baseCalendar;H0e(ZA.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,Yd.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,Yd.local.invalidYear||Yd.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Yd.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,Yd.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,a=t-(i-1)*30+1;return this.newDate(r,i,a)}});Yd.calendars.ethiopian=ZA});var EZ=de(()=>{var fv=Vo(),G0e=Uo();function YA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}YA.prototype=new fv.baseCalendar;G0e(YA.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,fv.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,t3(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fv.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fv.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,fv.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&t3(this.daysInYear(e),10)===5?30:t===9&&t3(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,fv.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,r){var i=this._validate(e,t,r,fv.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=e<=0?e+1:e,s=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)s+=this.daysInMonth(e,l);for(var l=1;l=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});function t3(e,t){return e-t*Math.floor(e/t)}fv.calendars.hebrew=YA});var LZ=de(()=>{var f1=Vo(),Z0e=Uo();function WA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}WA.prototype=new f1.baseCalendar;Z0e(WA.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,f1.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,f1.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,f1.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});f1.calendars.islamic=WA});var PZ=de(()=>{var c1=Vo(),Y0e=Uo();function XA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}XA.prototype=new c1.baseCalendar;Y0e(XA.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,c1.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,c1.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,c1.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,i=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*i),s=Math.floor((r-a)/30.6001),l=s-Math.floor(s<14?1:13),f=i-Math.floor(l>2?4716:4715),h=r-a-Math.floor(30.6001*s);return f<=0&&f--,this.newDate(f,l,h)}});c1.calendars.julian=XA});var zZ=de(()=>{var cu=Vo(),W0e=Uo();function JA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}JA.prototype=new cu.baseCalendar;W0e(JA.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,cu.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,cu.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var i=Math.floor(e/20);return r+"."+i+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&i<0)throw"Invalid Mayan year";t=t*20+i}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cu.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,cu.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cu.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,cu.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,cu.local.invalidDate);return i.day()},weekDay:function(e,t,r){return this._validate(e,t,r,cu.local.invalidDate),!0},extraInfo:function(e,t,r){var i=this._validate(e,t,r,cu.local.invalidDate),a=i.toJD(),s=this._toHaab(a),l=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[s[0]-1],haabMonth:s[0],haabDay:s[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=jA(e+8+17*20,365);return[Math.floor(t/20)+1,jA(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[DZ(e+20,20),DZ(e+4,13)]},toJD:function(e,t,r){var i=this._validate(e,t,r,cu.local.invalidDate);return i.day()+i.month()*20+i.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),i=e%20;return this.newDate(t,r,i)}});function jA(e,t){return e-t*Math.floor(e/t)}function DZ(e,t){return jA(e-1,t)+1}cu.calendars.mayan=JA});var RZ=de(()=>{var Wd=Vo(),X0e=Uo();function KA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}KA.prototype=new Wd.baseCalendar;var IZ=Wd.instance("gregorian");X0e(KA.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,Wd.local.invalidYear||Wd.regionalOptions[""].invalidYear);return IZ.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Wd.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(a,t,r){var i=this._validate(a,t,r,Wd.local.invalidMonth),a=i.year();a<0&&a++;for(var s=i.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}});Wd.calendars.nanakshahi=KA});var FZ=de(()=>{var Xd=Vo(),j0e=Uo();function QA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QA.prototype=new Xd.baseCalendar;j0e(QA.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xd.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[e][i];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Xd.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var i=this._validate(e,t,r,Xd.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=Xd.instance(),s=0,l=t,f=e;this._createMissingCalendarData(e);var h=e-(l>9||l===9&&r>=this.NEPALI_CALENDAR_DATA[f][0]?56:57);for(t!==9&&(s=r,l--);l!==9;)l<=0&&(l=12,f--),s+=this.NEPALI_CALENDAR_DATA[f][l],l--;return t===9?(s+=r-this.NEPALI_CALENDAR_DATA[f][0],s<0&&(s+=a.daysInYear(h))):s+=this.NEPALI_CALENDAR_DATA[f][9]-this.NEPALI_CALENDAR_DATA[f][0],a.newDate(h,1,1).add(s,"d").toJD()},fromJD:function(e){var t=Xd.instance(),r=t.fromJD(e),i=r.year(),a=r.dayOfYear(),s=i+56;this._createMissingCalendarData(s);for(var l=9,f=this.NEPALI_CALENDAR_DATA[s][0],h=this.NEPALI_CALENDAR_DATA[s][l]-f+1;a>h;)l++,l>12&&(l=1,s++),h+=this.NEPALI_CALENDAR_DATA[s][l];var v=this.NEPALI_CALENDAR_DATA[s][l]-(h-a);return this.newDate(s,l,v)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var Tm=Vo(),J0e=Uo();function r3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r3.prototype=new Tm.baseCalendar;J0e(r3.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,Tm.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tm.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,Tm.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=e-(e>=0?474:473),s=474+$A(a,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((s*682-110)/2816)+(s-1)*365+Math.floor(a/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),i=$A(t,1029983),a=2820;if(i!==1029982){var s=Math.floor(i/366),l=$A(i,366);a=Math.floor((2134*s+2816*l+2815)/1028522)+s+1}var f=a+2820*r+474;f=f<=0?f-1:f;var h=e-this.toJD(f,1,1)+1,v=h<=186?Math.ceil(h/31):Math.ceil((h-6)/30),m=e-this.toJD(f,v,1)+1;return this.newDate(f,v,m)}});function $A(e,t){return e-t*Math.floor(e/t)}Tm.calendars.persian=r3;Tm.calendars.jalali=r3});var NZ=de(()=>{var jd=Vo(),K0e=Uo(),a3=jd.instance();function eM(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eM.prototype=new jd.baseCalendar;K0e(eM.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,jd.local.invalidYear),r=this._t2gYear(t.year());return a3.leapYear(r)},weekOfYear:function(a,t,r){var i=this._validate(a,this.minMonth,this.minDay,jd.local.invalidYear),a=this._t2gYear(i.year());return a3.weekOfYear(a,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,jd.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(a,t,r){var i=this._validate(a,t,r,jd.local.invalidDate),a=this._t2gYear(i.year());return a3.toJD(a,i.month(),i.day())},fromJD:function(e){var t=a3.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)}});jd.calendars.taiwan=eM});var BZ=de(()=>{var Jd=Vo(),Q0e=Uo(),i3=Jd.instance();function tM(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tM.prototype=new Jd.baseCalendar;Q0e(tM.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,Jd.local.invalidYear),r=this._t2gYear(t.year());return i3.leapYear(r)},weekOfYear:function(a,t,r){var i=this._validate(a,this.minMonth,this.minDay,Jd.local.invalidYear),a=this._t2gYear(i.year());return i3.weekOfYear(a,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Jd.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(a,t,r){var i=this._validate(a,t,r,Jd.local.invalidDate),a=this._t2gYear(i.year());return i3.toJD(a,i.month(),i.day())},fromJD:function(e){var t=i3.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)}});Jd.calendars.thai=tM});var OZ=de(()=>{var Kd=Vo(),$0e=Uo();function rM(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rM.prototype=new Kd.baseCalendar;$0e(rM.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,Kd.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,Kd.local.invalidMonth),i=r.toJD()-24e5+.5,a=0,s=0;si)return cv[a]-cv[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,Kd.local.invalidDate),a=12*(i.year()-1)+i.month()-15292,s=i.day()+cv[a-1]-1;return s+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var a=r+15292,s=Math.floor((a-1)/12),l=s+1,f=a-12*s,h=t-cv[r-1]+1;return this.newDate(l,f,h)},isValid:function(e,t,r){var i=Kd.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(e=e.year!=null?e.year:e,i=e>=1276&&e<=1500),i},_validate:function(e,t,r,i){var a=Kd.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}});Kd.calendars.ummalqura=rM;var cv=[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 VZ=de((z3e,UZ)=>{"use strict";UZ.exports=Vo();AZ();MZ();SZ();kZ();CZ();EZ();LZ();PZ();zZ();RZ();FZ();qZ();NZ();BZ();OZ()});var jZ=de((I3e,XZ)=>{"use strict";var GZ=VZ(),h1=Bt(),ZZ=Hi(),eme=ZZ.EPOCHJD,tme=ZZ.ONEDAY,nM={valType:"enumerated",values:h1.sortObjectKeys(GZ.calendars),editType:"calc",dflt:"gregorian"},YZ=function(e,t,r,i){var a={};return a[r]=nM,h1.coerce(e,t,a,r,i)},rme=function(e,t,r,i){for(var a=0;a{"use strict";JZ.exports=jZ()});var lme=de((F3e,$Z)=>{var QZ=LV();QZ.register([xG(),jG(),_Z(),KZ()]);$Z.exports=QZ});return lme();})(); +`),Qt=G.createShader(G.FRAGMENT_SHADER);if(G.isContextLost()){this.failedToCreate=!0;return}G.shaderSource(Qt,zt),G.compileShader(Qt),G.attachShader(this.program,Qt);var rr=G.createShader(G.VERTEX_SHADER);if(G.isContextLost()){this.failedToCreate=!0;return}G.shaderSource(rr,qt),G.compileShader(rr),G.attachShader(this.program,rr),this.attributes={};var Zt={};this.numAttributes=ue.length;for(var ar=0;ar>16,G>>16],u_pixel_coord_lower:[R&65535,G&65535]}}function _u(g,c,x,d){var w=x.imageManager.getPattern(g.from.toString()),L=x.imageManager.getPattern(g.to.toString()),R=x.imageManager.getPixelSize(),G=R.width,K=R.height,te=Math.pow(2,d.tileID.overscaledZ),ue=d.tileSize*Math.pow(2,x.transform.tileZoom)/te,we=ue*(d.tileID.canonical.x+d.tileID.wrap*te),be=ue*d.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:w.tl,u_pattern_br_a:w.br,u_pattern_tl_b:L.tl,u_pattern_br_b:L.br,u_texsize:[G,K],u_mix:c.t,u_pattern_size_a:w.displaySize,u_pattern_size_b:L.displaySize,u_scale_a:c.fromScale,u_scale_b:c.toScale,u_tile_units_to_pixels:1/mo(d,1,x.transform.tileZoom),u_pixel_coord_upper:[we>>16,be>>16],u_pixel_coord_lower:[we&65535,be&65535]}}var Cv=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_lightpos:new a.Uniform3f(g,c.u_lightpos),u_lightintensity:new a.Uniform1f(g,c.u_lightintensity),u_lightcolor:new a.Uniform3f(g,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(g,c.u_vertical_gradient),u_opacity:new a.Uniform1f(g,c.u_opacity)}},_n=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_lightpos:new a.Uniform3f(g,c.u_lightpos),u_lightintensity:new a.Uniform1f(g,c.u_lightintensity),u_lightcolor:new a.Uniform3f(g,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(g,c.u_vertical_gradient),u_height_factor:new a.Uniform1f(g,c.u_height_factor),u_image:new a.Uniform1i(g,c.u_image),u_texsize:new a.Uniform2f(g,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade),u_opacity:new a.Uniform1f(g,c.u_opacity)}},Jf=function(g,c,x,d){var w=c.style.light,L=w.properties.get("position"),R=[L.x,L.y,L.z],G=a.create$1();w.properties.get("anchor")==="viewport"&&a.fromRotation(G,-c.transform.angle),a.transformMat3(R,R,G);var K=w.properties.get("color");return{u_matrix:g,u_lightpos:R,u_lightintensity:w.properties.get("intensity"),u_lightcolor:[K.r,K.g,K.b],u_vertical_gradient:+x,u_opacity:d}},Ks=function(g,c,x,d,w,L,R){return a.extend(Jf(g,c,x,d),nf(L,c,R),{u_height_factor:-Math.pow(2,w.overscaledZ)/R.tileSize/8})},Sl=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},kl=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_image:new a.Uniform1i(g,c.u_image),u_texsize:new a.Uniform2f(g,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade)}},Cl=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_world:new a.Uniform2f(g,c.u_world)}},Qs=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_world:new a.Uniform2f(g,c.u_world),u_image:new a.Uniform1i(g,c.u_image),u_texsize:new a.Uniform2f(g,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade)}},Ms=function(g){return{u_matrix:g}},Ss=function(g,c,x,d){return a.extend(Ms(g),nf(x,c,d))},El=function(g,c){return{u_matrix:g,u_world:c}},pp=function(g,c,x,d,w){return a.extend(Ss(g,c,x,d),{u_world:w})},Gm=function(g,c){return{u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(g,c.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(g,c.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},Zm=function(g,c,x,d){var w=g.transform,L,R;if(d.paint.get("circle-pitch-alignment")==="map"){var G=mo(x,1,w.zoom);L=!0,R=[G,G]}else L=!1,R=w.pixelsToGLUnits;return{u_camera_to_center_distance:w.cameraToCenterDistance,u_scale_with_map:+(d.paint.get("circle-pitch-scale")==="map"),u_matrix:g.translatePosMatrix(c.posMatrix,x,d.paint.get("circle-translate"),d.paint.get("circle-translate-anchor")),u_pitch_with_map:+L,u_device_pixel_ratio:a.browser.devicePixelRatio,u_extrude_scale:R}},Ym=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(g,c.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(g,c.u_extrude_scale),u_overscale_factor:new a.Uniform1f(g,c.u_overscale_factor)}},mp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_inv_matrix:new a.UniformMatrix4f(g,c.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(g,c.u_viewport_size)}},yp=function(g,c,x){var d=mo(x,1,c.zoom),w=Math.pow(2,c.zoom-x.tileID.overscaledZ),L=x.tileID.overscaleFactor();return{u_matrix:g,u_camera_to_center_distance:c.cameraToCenterDistance,u_pixels_to_tile_units:d,u_extrude_scale:[c.pixelsToGLUnits[0]/(d*w),c.pixelsToGLUnits[1]/(d*w)],u_overscale_factor:L}},Ev=function(g,c,x){return{u_matrix:g,u_inv_matrix:c,u_camera_to_center_distance:x.cameraToCenterDistance,u_viewport_size:[x.width,x.height]}},Lv=function(g,c){return{u_color:new a.UniformColor(g,c.u_color),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_overlay:new a.Uniform1i(g,c.u_overlay),u_overlay_scale:new a.Uniform1f(g,c.u_overlay_scale)}},Kf=function(g,c,x){return x===void 0&&(x=1),{u_matrix:g,u_color:c,u_overlay:0,u_overlay_scale:x}},Yc=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},gp=function(g){return{u_matrix:g}},Pv=function(g,c){return{u_extrude_scale:new a.Uniform1f(g,c.u_extrude_scale),u_intensity:new a.Uniform1f(g,c.u_intensity),u_matrix:new a.UniformMatrix4f(g,c.u_matrix)}},_p=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_world:new a.Uniform2f(g,c.u_world),u_image:new a.Uniform1i(g,c.u_image),u_color_ramp:new a.Uniform1i(g,c.u_color_ramp),u_opacity:new a.Uniform1f(g,c.u_opacity)}},of=function(g,c,x,d){return{u_matrix:g,u_extrude_scale:mo(c,1,x),u_intensity:d}},Wm=function(g,c,x,d){var w=a.create();a.ortho(w,0,g.width,g.height,0,0,1);var L=g.context.gl;return{u_matrix:w,u_world:[L.drawingBufferWidth,L.drawingBufferHeight],u_image:x,u_color_ramp:d,u_opacity:c.paint.get("heatmap-opacity")}},xp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_image:new a.Uniform1i(g,c.u_image),u_latrange:new a.Uniform2f(g,c.u_latrange),u_light:new a.Uniform2f(g,c.u_light),u_shadow:new a.UniformColor(g,c.u_shadow),u_highlight:new a.UniformColor(g,c.u_highlight),u_accent:new a.UniformColor(g,c.u_accent)}},bp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_image:new a.Uniform1i(g,c.u_image),u_dimension:new a.Uniform2f(g,c.u_dimension),u_zoom:new a.Uniform1f(g,c.u_zoom),u_unpack:new a.Uniform4f(g,c.u_unpack)}},wp=function(g,c,x){var d=x.paint.get("hillshade-shadow-color"),w=x.paint.get("hillshade-highlight-color"),L=x.paint.get("hillshade-accent-color"),R=x.paint.get("hillshade-illumination-direction")*(Math.PI/180);x.paint.get("hillshade-illumination-anchor")==="viewport"&&(R-=g.transform.angle);var G=!g.options.moving;return{u_matrix:g.transform.calculatePosMatrix(c.tileID.toUnwrapped(),G),u_image:0,u_latrange:zv(g,c.tileID),u_light:[x.paint.get("hillshade-exaggeration"),R],u_shadow:d,u_highlight:w,u_accent:L}},Dv=function(g,c){var x=c.stride,d=a.create();return a.ortho(d,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(d,d,[0,-a.EXTENT,0]),{u_matrix:d,u_image:1,u_dimension:[x,x],u_zoom:g.overscaledZ,u_unpack:c.getUnpackVector()}};function zv(g,c){var x=Math.pow(2,c.canonical.z),d=c.canonical.y;return[new a.MercatorCoordinate(0,d/x).toLngLat().lat,new a.MercatorCoordinate(0,(d+1)/x).toLngLat().lat]}var xu=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels)}},Ll=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels),u_image:new a.Uniform1i(g,c.u_image),u_image_height:new a.Uniform1f(g,c.u_image_height)}},Qf=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_texsize:new a.Uniform2f(g,c.u_texsize),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_image:new a.Uniform1i(g,c.u_image),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels),u_scale:new a.Uniform3f(g,c.u_scale),u_fade:new a.Uniform1f(g,c.u_fade)}},Iv=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_ratio:new a.Uniform1f(g,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(g,c.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(g,c.u_patternscale_a),u_patternscale_b:new a.Uniform2f(g,c.u_patternscale_b),u_sdfgamma:new a.Uniform1f(g,c.u_sdfgamma),u_image:new a.Uniform1i(g,c.u_image),u_tex_y_a:new a.Uniform1f(g,c.u_tex_y_a),u_tex_y_b:new a.Uniform1f(g,c.u_tex_y_b),u_mix:new a.Uniform1f(g,c.u_mix)}},Wc=function(g,c,x){var d=g.transform;return{u_matrix:bu(g,c,x),u_ratio:1/mo(c,1,d.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Xc=function(g,c,x,d){return a.extend(Wc(g,c,x),{u_image:0,u_image_height:d})},jc=function(g,c,x,d){var w=g.transform,L=Jc(c,w);return{u_matrix:bu(g,c,x),u_texsize:c.imageAtlasTexture.size,u_ratio:1/mo(c,1,w.zoom),u_device_pixel_ratio:a.browser.devicePixelRatio,u_image:0,u_scale:[L,d.fromScale,d.toScale],u_fade:d.t,u_units_to_pixels:[1/w.pixelsToGLUnits[0],1/w.pixelsToGLUnits[1]]}},Pl=function(g,c,x,d,w){var L=g.transform,R=g.lineAtlas,G=Jc(c,L),K=x.layout.get("line-cap")==="round",te=R.getDash(d.from,K),ue=R.getDash(d.to,K),we=te.width*w.fromScale,be=ue.width*w.toScale;return a.extend(Wc(g,c,x),{u_patternscale_a:[G/we,-te.height/2],u_patternscale_b:[G/be,-ue.height/2],u_sdfgamma:R.width/(Math.min(we,be)*256*a.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:te.y,u_tex_y_b:ue.y,u_mix:w.t})};function Jc(g,c){return 1/mo(g,1,c.tileZoom)}function bu(g,c,x){return g.translatePosMatrix(c.tileID.posMatrix,c,x.paint.get("line-translate"),x.paint.get("line-translate-anchor"))}var sf=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_tl_parent:new a.Uniform2f(g,c.u_tl_parent),u_scale_parent:new a.Uniform1f(g,c.u_scale_parent),u_buffer_scale:new a.Uniform1f(g,c.u_buffer_scale),u_fade_t:new a.Uniform1f(g,c.u_fade_t),u_opacity:new a.Uniform1f(g,c.u_opacity),u_image0:new a.Uniform1i(g,c.u_image0),u_image1:new a.Uniform1i(g,c.u_image1),u_brightness_low:new a.Uniform1f(g,c.u_brightness_low),u_brightness_high:new a.Uniform1f(g,c.u_brightness_high),u_saturation_factor:new a.Uniform1f(g,c.u_saturation_factor),u_contrast_factor:new a.Uniform1f(g,c.u_contrast_factor),u_spin_weights:new a.Uniform3f(g,c.u_spin_weights)}},Tp=function(g,c,x,d,w){return{u_matrix:g,u_tl_parent:c,u_scale_parent:x,u_buffer_scale:1,u_fade_t:d.mix,u_opacity:d.opacity*w.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:w.paint.get("raster-brightness-min"),u_brightness_high:w.paint.get("raster-brightness-max"),u_saturation_factor:$f(w.paint.get("raster-saturation")),u_contrast_factor:di(w.paint.get("raster-contrast")),u_spin_weights:Kc(w.paint.get("raster-hue-rotate"))}};function Kc(g){g*=Math.PI/180;var c=Math.sin(g),x=Math.cos(g);return[(2*x+1)/3,(-Math.sqrt(3)*c-x+1)/3,(Math.sqrt(3)*c-x+1)/3]}function di(g){return g>0?1/(1-g):1+g}function $f(g){return g>0?1-1/(1.001-g):-g}var Ap=function(g,c){return{u_is_size_zoom_constant:new a.Uniform1i(g,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(g,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(g,c.u_size_t),u_size:new a.Uniform1f(g,c.u_size),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(g,c.u_pitch),u_rotate_symbol:new a.Uniform1i(g,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(g,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(g,c.u_fade_change),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(g,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(g,c.u_coord_matrix),u_is_text:new a.Uniform1i(g,c.u_is_text),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_texsize:new a.Uniform2f(g,c.u_texsize),u_texture:new a.Uniform1i(g,c.u_texture)}},Mp=function(g,c){return{u_is_size_zoom_constant:new a.Uniform1i(g,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(g,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(g,c.u_size_t),u_size:new a.Uniform1f(g,c.u_size),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(g,c.u_pitch),u_rotate_symbol:new a.Uniform1i(g,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(g,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(g,c.u_fade_change),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(g,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(g,c.u_coord_matrix),u_is_text:new a.Uniform1i(g,c.u_is_text),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_texsize:new a.Uniform2f(g,c.u_texsize),u_texture:new a.Uniform1i(g,c.u_texture),u_gamma_scale:new a.Uniform1f(g,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(g,c.u_is_halo)}},Dl=function(g,c){return{u_is_size_zoom_constant:new a.Uniform1i(g,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(g,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(g,c.u_size_t),u_size:new a.Uniform1f(g,c.u_size),u_camera_to_center_distance:new a.Uniform1f(g,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(g,c.u_pitch),u_rotate_symbol:new a.Uniform1i(g,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(g,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(g,c.u_fade_change),u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(g,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(g,c.u_coord_matrix),u_is_text:new a.Uniform1i(g,c.u_is_text),u_pitch_with_map:new a.Uniform1i(g,c.u_pitch_with_map),u_texsize:new a.Uniform2f(g,c.u_texsize),u_texsize_icon:new a.Uniform2f(g,c.u_texsize_icon),u_texture:new a.Uniform1i(g,c.u_texture),u_texture_icon:new a.Uniform1i(g,c.u_texture_icon),u_gamma_scale:new a.Uniform1f(g,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(g,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(g,c.u_is_halo)}},Sp=function(g,c,x,d,w,L,R,G,K,te){var ue=w.transform;return{u_is_size_zoom_constant:+(g==="constant"||g==="source"),u_is_size_feature_constant:+(g==="constant"||g==="camera"),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:ue.cameraToCenterDistance,u_pitch:ue.pitch/360*2*Math.PI,u_rotate_symbol:+x,u_aspect_ratio:ue.width/ue.height,u_fade_change:w.options.fadeDuration?w.symbolFadeChange:1,u_matrix:L,u_label_plane_matrix:R,u_coord_matrix:G,u_is_text:+K,u_pitch_with_map:+d,u_texsize:te,u_texture:0}},kp=function(g,c,x,d,w,L,R,G,K,te,ue){var we=w.transform;return a.extend(Sp(g,c,x,d,w,L,R,G,K,te),{u_gamma_scale:d?Math.cos(we._pitch)*we.cameraToCenterDistance:1,u_device_pixel_ratio:a.browser.devicePixelRatio,u_is_halo:+ue})},Rv=function(g,c,x,d,w,L,R,G,K,te){return a.extend(kp(g,c,x,d,w,L,R,G,!0,K,!0),{u_texsize_icon:te,u_texture_icon:1})},Cp=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_opacity:new a.Uniform1f(g,c.u_opacity),u_color:new a.UniformColor(g,c.u_color)}},Xm=function(g,c){return{u_matrix:new a.UniformMatrix4f(g,c.u_matrix),u_opacity:new a.Uniform1f(g,c.u_opacity),u_image:new a.Uniform1i(g,c.u_image),u_pattern_tl_a:new a.Uniform2f(g,c.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(g,c.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(g,c.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(g,c.u_pattern_br_b),u_texsize:new a.Uniform2f(g,c.u_texsize),u_mix:new a.Uniform1f(g,c.u_mix),u_pattern_size_a:new a.Uniform2f(g,c.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(g,c.u_pattern_size_b),u_scale_a:new a.Uniform1f(g,c.u_scale_a),u_scale_b:new a.Uniform1f(g,c.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(g,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(g,c.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(g,c.u_tile_units_to_pixels)}},zl=function(g,c,x){return{u_matrix:g,u_opacity:c,u_color:x}},wu=function(g,c,x,d,w,L){return a.extend(_u(d,L,x,w),{u_matrix:g,u_opacity:c})},ec={fillExtrusion:Cv,fillExtrusionPattern:_n,fill:Sl,fillPattern:kl,fillOutline:Cl,fillOutlinePattern:Qs,circle:Gm,collisionBox:Ym,collisionCircle:mp,debug:Lv,clippingMask:Yc,heatmap:Pv,heatmapTexture:_p,hillshade:xp,hillshadePrepare:bp,line:xu,lineGradient:Ll,linePattern:Qf,lineSDF:Iv,raster:sf,symbolIcon:Ap,symbolSDF:Mp,symbolTextAndIcon:Dl,background:Cp,backgroundPattern:Xm},ks;function Cs(g,c,x,d,w,L,R){for(var G=g.context,K=G.gl,te=g.useProgram("collisionBox"),ue=[],we=0,be=0,Ie=0;Ie0){var qt=a.create(),Qt=Xe;a.mul(qt,Oe.placementInvProjMatrix,g.transform.glCoordMatrix),a.mul(qt,qt,Oe.placementViewportMatrix),ue.push({circleArray:zt,circleOffset:be,transform:Qt,invTransform:qt}),we+=zt.length/4,be=we}ct&&te.draw(G,K.LINES,pa.disabled,Zr.disabled,g.colorModeForRenderPass(),Ee.disabled,yp(Xe,g.transform,Ze),x.id,ct.layoutVertexBuffer,ct.indexBuffer,ct.segments,null,g.transform.zoom,null,null,ct.collisionVertexBuffer)}}if(!(!R||!ue.length)){var rr=g.useProgram("collisionCircle"),Zt=new a.StructArrayLayout2f1f2i16;Zt.resize(we*4),Zt._trim();for(var ar=0,cr=0,_r=ue;cr<_r.length;cr+=1)for(var Lr=_r[cr],Sr=0;Sr=0&&(Ye[Oe.associatedIconIndex]={shiftedAnchor:Xr,angle:Fa})}}if(ue){Ie.clear();for(var qr=g.icon.placedSymbolArray,Sa=0;Sa0){var R=a.browser.now(),G=(R-g.timeAdded)/L,K=c?(R-c.timeAdded)/L:-1,te=x.getSource(),ue=w.coveringZoomLevel({tileSize:te.tileSize,roundZoom:te.roundZoom}),we=!c||Math.abs(c.tileID.overscaledZ-ue)>Math.abs(g.tileID.overscaledZ-ue),be=we&&g.refreshedUponExpiration?1:a.clamp(we?G:1-K,0,1);return g.refreshedUponExpiration&&G>=1&&(g.refreshedUponExpiration=!1),c?{opacity:1,mix:1-be}:{opacity:be,mix:0}}else return{opacity:1,mix:0}}function tc(g,c,x){var d=x.paint.get("background-color"),w=x.paint.get("background-opacity");if(w!==0){var L=g.context,R=L.gl,G=g.transform,K=G.tileSize,te=x.paint.get("background-pattern");if(!g.isPatternMissing(te)){var ue=!te&&d.a===1&&w===1&&g.opaquePassEnabledForLayer()?"opaque":"translucent";if(g.renderPass===ue){var we=Zr.disabled,be=g.depthModeForSublayer(0,ue==="opaque"?pa.ReadWrite:pa.ReadOnly),Ie=g.colorModeForRenderPass(),Ye=g.useProgram(te?"backgroundPattern":"background"),Ze=G.coveringTiles({tileSize:K});te&&(L.activeTexture.set(R.TEXTURE0),g.imageManager.bind(g.context));for(var Oe=x.getCrossfadeParameters(),Xe=0,ct=Ze;Xe "+x.overscaledZ);var Xe=Oe+" "+Ie+"kb";Ip(g,Xe),R.draw(d,w.TRIANGLES,G,K,ee.alphaBlended,Ee.disabled,Kf(L,a.Color.transparent,Ze),ue,g.debugBuffer,g.quadTriangleIndexBuffer,g.debugSegments)}function Ip(g,c){g.initDebugOverlayCanvas();var x=g.debugOverlayCanvas,d=g.context.gl,w=g.debugOverlayCanvas.getContext("2d");w.clearRect(0,0,x.width,x.height),w.shadowColor="white",w.shadowBlur=2,w.lineWidth=1.5,w.strokeStyle="white",w.textBaseline="top",w.font="bold 36px Open Sans, sans-serif",w.fillText(c,5,5),w.strokeText(c,5,5),g.debugOverlayTexture.update(x),g.debugOverlayTexture.bind(d.LINEAR,d.CLAMP_TO_EDGE)}function pf(g,c,x){var d=g.context,w=x.implementation;if(g.renderPass==="offscreen"){var L=w.prerender;L&&(g.setCustomLayerDefaults(),d.setColorMode(g.colorModeForRenderPass()),L.call(w,d.gl,g.transform.customLayerMatrix()),d.setDirty(),g.setBaseState())}else if(g.renderPass==="translucent"){g.setCustomLayerDefaults(),d.setColorMode(g.colorModeForRenderPass()),d.setStencilMode(Zr.disabled);var R=w.renderingMode==="3d"?new pa(g.context.gl.LEQUAL,pa.ReadWrite,g.depthRangeFor3D):g.depthModeForSublayer(0,pa.ReadOnly);d.setDepthMode(R),w.render(d.gl,g.transform.customLayerMatrix()),d.setDirty(),g.setBaseState(),d.bindFramebuffer.set(null)}}var li={symbol:jm,circle:Qc,heatmap:Tu,line:go,fill:Ep,"fill-extrusion":Il,hillshade:vf,raster:Lp,background:tc,debug:Vv,custom:pf},Ci=function(c,x){this.context=new Ne(c),this.transform=x,this._tileTextures={},this.setup(),this.numSublayers=rt.maxUnderzooming+rt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new mu,this.gpuTimers={}};Ci.prototype.resize=function(c,x){if(this.width=c*a.browser.devicePixelRatio,this.height=x*a.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var d=0,w=this.style._order;d256&&this.clearStencil(),d.setColorMode(ee.disabled),d.setDepthMode(pa.disabled);var L=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var R=0,G=x;R256&&this.clearStencil();var c=this.nextStencilID++,x=this.context.gl;return new Zr({func:x.NOTEQUAL,mask:255},c,255,x.KEEP,x.KEEP,x.REPLACE)},Ci.prototype.stencilModeForClipping=function(c){var x=this.context.gl;return new Zr({func:x.EQUAL,mask:255},this._tileClippingMaskIDs[c.key],0,x.KEEP,x.KEEP,x.REPLACE)},Ci.prototype.stencilConfigForOverlap=function(c){var x,d=this.context.gl,w=c.sort(function(te,ue){return ue.overscaledZ-te.overscaledZ}),L=w[w.length-1].overscaledZ,R=w[0].overscaledZ-L+1;if(R>1){this.currentStencilSource=void 0,this.nextStencilID+R>256&&this.clearStencil();for(var G={},K=0;K=0;this.currentLayer--){var qt=this.style._layers[w[this.currentLayer]],Qt=L[qt.source],rr=K[qt.source];this._renderTileClippingMasks(qt,rr),this.renderLayer(this,Qt,qt,rr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?x.pop():null},Ci.prototype.isPatternMissing=function(c){if(!c)return!1;if(!c.from||!c.to)return!0;var x=this.imageManager.getPattern(c.from.toString()),d=this.imageManager.getPattern(c.to.toString());return!x||!d},Ci.prototype.useProgram=function(c,x){this.cache=this.cache||{};var d=""+c+(x?x.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[d]||(this.cache[d]=new dp(this.context,c,Hm[c],x,ec[c],this._showOverdrawInspector)),this.cache[d]},Ci.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()},Ci.prototype.setBaseState=function(){var c=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(c.FUNC_ADD)},Ci.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=a.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var c=this.context.gl;this.debugOverlayTexture=new a.Texture(this.context,this.debugOverlayCanvas,c.RGBA)}},Ci.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var so=function(c,x){this.points=c,this.planes=x};so.fromInvProjectionMatrix=function(c,x,d){var w=[[-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]],L=Math.pow(2,d),R=w.map(function(te){return a.transformMat4([],te,c)}).map(function(te){return a.scale$1([],te,1/te[3]/x*L)}),G=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],K=G.map(function(te){var ue=a.sub([],R[te[0]],R[te[1]]),we=a.sub([],R[te[2]],R[te[1]]),be=a.normalize([],a.cross([],ue,we)),Ie=-a.dot(be,R[te[1]]);return be.concat(Ie)});return new so(R,K)};var Es=function(c,x){this.min=c,this.max=x,this.center=a.scale$2([],a.add([],this.min,this.max),.5)};Es.prototype.quadrant=function(c){for(var x=[c%2===0,c<2],d=a.clone$2(this.min),w=a.clone$2(this.max),L=0;L=0;if(R===0)return 0;R!==x.length&&(d=!1)}if(d)return 2;for(var K=0;K<3;K++){for(var te=Number.MAX_VALUE,ue=-Number.MAX_VALUE,we=0;wethis.max[K]-this.min[K])return 0}return 1};var _o=function(c,x,d,w){if(c===void 0&&(c=0),x===void 0&&(x=0),d===void 0&&(d=0),w===void 0&&(w=0),isNaN(c)||c<0||isNaN(x)||x<0||isNaN(d)||d<0||isNaN(w)||w<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=c,this.bottom=x,this.left=d,this.right=w};_o.prototype.interpolate=function(c,x,d){return x.top!=null&&c.top!=null&&(this.top=a.number(c.top,x.top,d)),x.bottom!=null&&c.bottom!=null&&(this.bottom=a.number(c.bottom,x.bottom,d)),x.left!=null&&c.left!=null&&(this.left=a.number(c.left,x.left,d)),x.right!=null&&c.right!=null&&(this.right=a.number(c.right,x.right,d)),this},_o.prototype.getCenter=function(c,x){var d=a.clamp((this.left+c-this.right)/2,0,c),w=a.clamp((this.top+x-this.bottom)/2,0,x);return new a.Point(d,w)},_o.prototype.equals=function(c){return this.top===c.top&&this.bottom===c.bottom&&this.left===c.left&&this.right===c.right},_o.prototype.clone=function(){return new _o(this.top,this.bottom,this.left,this.right)},_o.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var ti=function(c,x,d,w,L){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=L===void 0?!0:L,this._minZoom=c||0,this._maxZoom=x||22,this._minPitch=d==null?0:d,this._maxPitch=w==null?60:w,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new _o,this._posMatrixCache={},this._alignedPosMatrixCache={}},fi={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}};ti.prototype.clone=function(){var c=new ti(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return c.tileSize=this.tileSize,c.latRange=this.latRange,c.width=this.width,c.height=this.height,c._center=this._center,c.zoom=this.zoom,c.angle=this.angle,c._fov=this._fov,c._pitch=this._pitch,c._unmodified=this._unmodified,c._edgeInsets=this._edgeInsets.clone(),c._calcMatrices(),c},fi.minZoom.get=function(){return this._minZoom},fi.minZoom.set=function(g){this._minZoom!==g&&(this._minZoom=g,this.zoom=Math.max(this.zoom,g))},fi.maxZoom.get=function(){return this._maxZoom},fi.maxZoom.set=function(g){this._maxZoom!==g&&(this._maxZoom=g,this.zoom=Math.min(this.zoom,g))},fi.minPitch.get=function(){return this._minPitch},fi.minPitch.set=function(g){this._minPitch!==g&&(this._minPitch=g,this.pitch=Math.max(this.pitch,g))},fi.maxPitch.get=function(){return this._maxPitch},fi.maxPitch.set=function(g){this._maxPitch!==g&&(this._maxPitch=g,this.pitch=Math.min(this.pitch,g))},fi.renderWorldCopies.get=function(){return this._renderWorldCopies},fi.renderWorldCopies.set=function(g){g===void 0?g=!0:g===null&&(g=!1),this._renderWorldCopies=g},fi.worldSize.get=function(){return this.tileSize*this.scale},fi.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},fi.size.get=function(){return new a.Point(this.width,this.height)},fi.bearing.get=function(){return-this.angle/Math.PI*180},fi.bearing.set=function(g){var c=-a.wrap(g,-180,180)*Math.PI/180;this.angle!==c&&(this._unmodified=!1,this.angle=c,this._calcMatrices(),this.rotationMatrix=a.create$2(),a.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},fi.pitch.get=function(){return this._pitch/Math.PI*180},fi.pitch.set=function(g){var c=a.clamp(g,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==c&&(this._unmodified=!1,this._pitch=c,this._calcMatrices())},fi.fov.get=function(){return this._fov/Math.PI*180},fi.fov.set=function(g){g=Math.max(.01,Math.min(60,g)),this._fov!==g&&(this._unmodified=!1,this._fov=g/180*Math.PI,this._calcMatrices())},fi.zoom.get=function(){return this._zoom},fi.zoom.set=function(g){var c=Math.min(Math.max(g,this.minZoom),this.maxZoom);this._zoom!==c&&(this._unmodified=!1,this._zoom=c,this.scale=this.zoomScale(c),this.tileZoom=Math.floor(c),this.zoomFraction=c-this.tileZoom,this._constrain(),this._calcMatrices())},fi.center.get=function(){return this._center},fi.center.set=function(g){g.lat===this._center.lat&&g.lng===this._center.lng||(this._unmodified=!1,this._center=g,this._constrain(),this._calcMatrices())},fi.padding.get=function(){return this._edgeInsets.toJSON()},fi.padding.set=function(g){this._edgeInsets.equals(g)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,g,1),this._calcMatrices())},fi.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},ti.prototype.isPaddingEqual=function(c){return this._edgeInsets.equals(c)},ti.prototype.interpolatePadding=function(c,x,d){this._unmodified=!1,this._edgeInsets.interpolate(c,x,d),this._constrain(),this._calcMatrices()},ti.prototype.coveringZoomLevel=function(c){var x=(c.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/c.tileSize));return Math.max(0,x)},ti.prototype.getVisibleUnwrappedCoordinates=function(c){var x=[new a.UnwrappedTileID(0,c)];if(this._renderWorldCopies)for(var d=this.pointCoordinate(new a.Point(0,0)),w=this.pointCoordinate(new a.Point(this.width,0)),L=this.pointCoordinate(new a.Point(this.width,this.height)),R=this.pointCoordinate(new a.Point(0,this.height)),G=Math.floor(Math.min(d.x,w.x,L.x,R.x)),K=Math.floor(Math.max(d.x,w.x,L.x,R.x)),te=1,ue=G-te;ue<=K+te;ue++)ue!==0&&x.push(new a.UnwrappedTileID(ue,c));return x},ti.prototype.coveringTiles=function(c){var x=this.coveringZoomLevel(c),d=x;if(c.minzoom!==void 0&&xc.maxzoom&&(x=c.maxzoom);var w=a.MercatorCoordinate.fromLngLat(this.center),L=Math.pow(2,x),R=[L*w.x,L*w.y,0],G=so.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,x),K=c.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(K=x);var te=3,ue=function(Sr){return{aabb:new Es([Sr*L,0,0],[(Sr+1)*L,L,0]),zoom:0,x:0,y:0,wrap:Sr,fullyVisible:!1}},we=[],be=[],Ie=x,Ye=c.reparseOverscaled?d:x;if(this._renderWorldCopies)for(var Ze=1;Ze<=3;Ze++)we.push(ue(-Ze)),we.push(ue(Ze));for(we.push(ue(0));we.length>0;){var Oe=we.pop(),Xe=Oe.x,ct=Oe.y,zt=Oe.fullyVisible;if(!zt){var qt=Oe.aabb.intersects(G);if(qt===0)continue;zt=qt===2}var Qt=Oe.aabb.distanceX(R),rr=Oe.aabb.distanceY(R),Zt=Math.max(Math.abs(Qt),Math.abs(rr)),ar=te+(1<ar&&Oe.zoom>=K){be.push({tileID:new a.OverscaledTileID(Oe.zoom===Ie?Ye:Oe.zoom,Oe.wrap,Oe.zoom,Xe,ct),distanceSq:a.sqrLen([R[0]-.5-Xe,R[1]-.5-ct])});continue}for(var cr=0;cr<4;cr++){var _r=(Xe<<1)+cr%2,Lr=(ct<<1)+(cr>>1);we.push({aabb:Oe.aabb.quadrant(cr),zoom:Oe.zoom+1,x:_r,y:Lr,wrap:Oe.wrap,fullyVisible:zt})}}return be.sort(function(Sr,Xr){return Sr.distanceSq-Xr.distanceSq}).map(function(Sr){return Sr.tileID})},ti.prototype.resize=function(c,x){this.width=c,this.height=x,this.pixelsToGLUnits=[2/c,-2/x],this._constrain(),this._calcMatrices()},fi.unmodified.get=function(){return this._unmodified},ti.prototype.zoomScale=function(c){return Math.pow(2,c)},ti.prototype.scaleZoom=function(c){return Math.log(c)/Math.LN2},ti.prototype.project=function(c){var x=a.clamp(c.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.Point(a.mercatorXfromLng(c.lng)*this.worldSize,a.mercatorYfromLat(x)*this.worldSize)},ti.prototype.unproject=function(c){return new a.MercatorCoordinate(c.x/this.worldSize,c.y/this.worldSize).toLngLat()},fi.point.get=function(){return this.project(this.center)},ti.prototype.setLocationAtPoint=function(c,x){var d=this.pointCoordinate(x),w=this.pointCoordinate(this.centerPoint),L=this.locationCoordinate(c),R=new a.MercatorCoordinate(L.x-(d.x-w.x),L.y-(d.y-w.y));this.center=this.coordinateLocation(R),this._renderWorldCopies&&(this.center=this.center.wrap())},ti.prototype.locationPoint=function(c){return this.coordinatePoint(this.locationCoordinate(c))},ti.prototype.pointLocation=function(c){return this.coordinateLocation(this.pointCoordinate(c))},ti.prototype.locationCoordinate=function(c){return a.MercatorCoordinate.fromLngLat(c)},ti.prototype.coordinateLocation=function(c){return c.toLngLat()},ti.prototype.pointCoordinate=function(c){var x=0,d=[c.x,c.y,0,1],w=[c.x,c.y,1,1];a.transformMat4(d,d,this.pixelMatrixInverse),a.transformMat4(w,w,this.pixelMatrixInverse);var L=d[3],R=w[3],G=d[0]/L,K=w[0]/R,te=d[1]/L,ue=w[1]/R,we=d[2]/L,be=w[2]/R,Ie=we===be?0:(x-we)/(be-we);return new a.MercatorCoordinate(a.number(G,K,Ie)/this.worldSize,a.number(te,ue,Ie)/this.worldSize)},ti.prototype.coordinatePoint=function(c){var x=[c.x*this.worldSize,c.y*this.worldSize,0,1];return a.transformMat4(x,x,this.pixelMatrix),new a.Point(x[0]/x[3],x[1]/x[3])},ti.prototype.getBounds=function(){return new a.LngLatBounds().extend(this.pointLocation(new a.Point(0,0))).extend(this.pointLocation(new a.Point(this.width,0))).extend(this.pointLocation(new a.Point(this.width,this.height))).extend(this.pointLocation(new a.Point(0,this.height)))},ti.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},ti.prototype.setMaxBounds=function(c){c?(this.lngRange=[c.getWest(),c.getEast()],this.latRange=[c.getSouth(),c.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},ti.prototype.calculatePosMatrix=function(c,x){x===void 0&&(x=!1);var d=c.key,w=x?this._alignedPosMatrixCache:this._posMatrixCache;if(w[d])return w[d];var L=c.canonical,R=this.worldSize/this.zoomScale(L.z),G=L.x+Math.pow(2,L.z)*c.wrap,K=a.identity(new Float64Array(16));return a.translate(K,K,[G*R,L.y*R,0]),a.scale(K,K,[R/a.EXTENT,R/a.EXTENT,1]),a.multiply(K,x?this.alignedProjMatrix:this.projMatrix,K),w[d]=new Float32Array(K),w[d]},ti.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},ti.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var c=-90,x=90,d=-180,w=180,L,R,G,K,te=this.size,ue=this._unmodified;if(this.latRange){var we=this.latRange;c=a.mercatorYfromLat(we[1])*this.worldSize,x=a.mercatorYfromLat(we[0])*this.worldSize,L=x-cx&&(K=x-Oe)}if(this.lngRange){var Xe=Ie.x,ct=te.x/2;Xe-ctw&&(G=w-ct)}(G!==void 0||K!==void 0)&&(this.center=this.unproject(new a.Point(G!==void 0?G:Ie.x,K!==void 0?K:Ie.y))),this._unmodified=ue,this._constraining=!1}},ti.prototype._calcMatrices=function(){if(this.height){var c=this._fov/2,x=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(c)*this.height;var d=Math.PI/2+this._pitch,w=this._fov*(.5+x.y/this.height),L=Math.sin(w)*this.cameraToCenterDistance/Math.sin(a.clamp(Math.PI-d-w,.01,Math.PI-.01)),R=this.point,G=R.x,K=R.y,te=Math.cos(Math.PI/2-this._pitch)*L+this.cameraToCenterDistance,ue=te*1.01,we=this.height/50,be=new Float64Array(16);a.perspective(be,this._fov,this.width/this.height,we,ue),be[8]=-x.x*2/this.width,be[9]=x.y*2/this.height,a.scale(be,be,[1,-1,1]),a.translate(be,be,[0,0,-this.cameraToCenterDistance]),a.rotateX(be,be,this._pitch),a.rotateZ(be,be,this.angle),a.translate(be,be,[-G,-K,0]),this.mercatorMatrix=a.scale([],be,[this.worldSize,this.worldSize,this.worldSize]),a.scale(be,be,[1,1,a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=be,this.invProjMatrix=a.invert([],this.projMatrix);var Ie=this.width%2/2,Ye=this.height%2/2,Ze=Math.cos(this.angle),Oe=Math.sin(this.angle),Xe=G-Math.round(G)+Ze*Ie+Oe*Ye,ct=K-Math.round(K)+Ze*Ye+Oe*Ie,zt=new Float64Array(be);if(a.translate(zt,zt,[Xe>.5?Xe-1:Xe,ct>.5?ct-1:ct,0]),this.alignedProjMatrix=zt,be=a.create(),a.scale(be,be,[this.width/2,-this.height/2,1]),a.translate(be,be,[1,-1,0]),this.labelPlaneMatrix=be,be=a.create(),a.scale(be,be,[1,-1,1]),a.translate(be,be,[-1,-1,0]),a.scale(be,be,[2/this.width,2/this.height,1]),this.glCoordMatrix=be,this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),be=a.invert(new Float64Array(16),this.pixelMatrix),!be)throw new Error("failed to invert matrix");this.pixelMatrixInverse=be,this._posMatrixCache={},this._alignedPosMatrixCache={}}},ti.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var c=this.pointCoordinate(new a.Point(0,0)),x=[c.x*this.worldSize,c.y*this.worldSize,0,1],d=a.transformMat4(x,x,this.pixelMatrix);return d[3]/this.cameraToCenterDistance},ti.prototype.getCameraPoint=function(){var c=this._pitch,x=Math.tan(c)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.Point(0,x))},ti.prototype.getCameraQueryGeometry=function(c){var x=this.getCameraPoint();if(c.length===1)return[c[0],x];for(var d=x.x,w=x.y,L=x.x,R=x.y,G=0,K=c;G=3&&!c.some(function(d){return isNaN(d)})){var x=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:x,pitch:+(c[4]||0)}),!0}return!1},Rl.prototype._updateHashUnthrottled=function(){var c=a.window.location.href.replace(/(#.+)?$/,this.getHashString());try{a.window.history.replaceState(a.window.history.state,null,c)}catch(x){}};var rc={linearity:.3,easing:a.bezier(0,0,.3,1)},mf=a.extend({deceleration:2500,maxSpeed:1400},rc),Fl=a.extend({deceleration:20,maxSpeed:1400},rc),Ls=a.extend({deceleration:1e3,maxSpeed:360},rc),nh=a.extend({deceleration:1e3,maxSpeed:90},rc),yf=function(c){this._map=c,this.clear()};yf.prototype.clear=function(){this._inertiaBuffer=[]},yf.prototype.record=function(c){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.browser.now(),settings:c})},yf.prototype._drainInertiaBuffer=function(){for(var c=this._inertiaBuffer,x=a.browser.now(),d=160;c.length>0&&x-c[0].time>d;)c.shift()},yf.prototype._onMoveEnd=function(c){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var x={zoom:0,bearing:0,pitch:0,pan:new a.Point(0,0),pinchAround:void 0,around:void 0},d=0,w=this._inertiaBuffer;d=this._clickTolerance||this._map.fire(new M(c.type,this._map,c))},U.prototype.dblclick=function(c){return this._firePreventable(new M(c.type,this._map,c))},U.prototype.mouseover=function(c){this._map.fire(new M(c.type,this._map,c))},U.prototype.mouseout=function(c){this._map.fire(new M(c.type,this._map,c))},U.prototype.touchstart=function(c){return this._firePreventable(new D(c.type,this._map,c))},U.prototype.touchmove=function(c){this._map.fire(new D(c.type,this._map,c))},U.prototype.touchend=function(c){this._map.fire(new D(c.type,this._map,c))},U.prototype.touchcancel=function(c){this._map.fire(new D(c.type,this._map,c))},U.prototype._firePreventable=function(c){if(this._map.fire(c),c.defaultPrevented)return{}},U.prototype.isEnabled=function(){return!0},U.prototype.isActive=function(){return!1},U.prototype.enable=function(){},U.prototype.disable=function(){};var Z=function(c){this._map=c};Z.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Z.prototype.mousemove=function(c){this._map.fire(new M(c.type,this._map,c))},Z.prototype.mousedown=function(){this._delayContextMenu=!0},Z.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new M("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Z.prototype.contextmenu=function(c){this._delayContextMenu?this._contextMenuEvent=c:this._map.fire(new M(c.type,this._map,c)),this._map.listens("contextmenu")&&c.preventDefault()},Z.prototype.isEnabled=function(){return!0},Z.prototype.isActive=function(){return!1},Z.prototype.enable=function(){},Z.prototype.disable=function(){};var $=function(c,x){this._map=c,this._el=c.getCanvasContainer(),this._container=c.getContainer(),this._clickTolerance=x.clickTolerance||1};$.prototype.isEnabled=function(){return!!this._enabled},$.prototype.isActive=function(){return!!this._active},$.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},$.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},$.prototype.mousedown=function(c,x){this.isEnabled()&&c.shiftKey&&c.button===0&&(l.disableDrag(),this._startPos=this._lastPos=x,this._active=!0)},$.prototype.mousemoveWindow=function(c,x){if(this._active){var d=x;if(!(this._lastPos.equals(d)||!this._box&&d.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=c.timeStamp),d.length===this.numTouches&&(this.centroid=ae(x),this.touches=X(d,x)))},Pe.prototype.touchmove=function(c,x,d){if(!(this.aborted||!this.centroid)){var w=X(d,x);for(var L in this.touches){var R=this.touches[L],G=w[L];(!G||G.dist(R)>De)&&(this.aborted=!0)}}},Pe.prototype.touchend=function(c,x,d){if((!this.centroid||c.timeStamp-this.startTime>_e)&&(this.aborted=!0),d.length===0){var w=!this.aborted&&this.centroid;if(this.reset(),w)return w}};var Je=function(c){this.singleTap=new Pe(c),this.numTaps=c.numTaps,this.reset()};Je.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Je.prototype.touchstart=function(c,x,d){this.singleTap.touchstart(c,x,d)},Je.prototype.touchmove=function(c,x,d){this.singleTap.touchmove(c,x,d)},Je.prototype.touchend=function(c,x,d){var w=this.singleTap.touchend(c,x,d);if(w){var L=c.timeStamp-this.lastTime0&&(this._active=!0);var w=X(d,x),L=new a.Point(0,0),R=new a.Point(0,0),G=0;for(var K in w){var te=w[K],ue=this._touches[K];ue&&(L._add(te),R._add(te.sub(ue)),G++,w[K]=te)}if(this._touches=w,!(GMath.abs(g.x)}var jt=100,Jr=function(g){function c(){g.apply(this,arguments)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.reset=function(){g.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},c.prototype._start=function(d){this._lastPoints=d,$a(d[0].sub(d[1]))&&(this._valid=!1)},c.prototype._move=function(d,w,L){var R=d[0].sub(this._lastPoints[0]),G=d[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(R,G,L.timeStamp),!!this._valid){this._lastPoints=d,this._active=!0;var K=(R.y+G.y)/2,te=-.5;return{pitchDelta:K*te}}},c.prototype.gestureBeginsVertically=function(d,w,L){if(this._valid!==void 0)return this._valid;var R=2,G=d.mag()>=R,K=w.mag()>=R;if(!(!G&&!K)){if(!G||!K)return this._firstMove===void 0&&(this._firstMove=L),L-this._firstMove0==w.y>0;return $a(d)&&$a(w)&&te}},c}(lr),oa={panStep:100,bearingStep:15,pitchStep:10},sa=function(){var c=oa;this._panStep=c.panStep,this._bearingStep=c.bearingStep,this._pitchStep=c.pitchStep,this._rotationDisabled=!1};sa.prototype.reset=function(){this._active=!1},sa.prototype.keydown=function(c){var x=this;if(!(c.altKey||c.ctrlKey||c.metaKey)){var d=0,w=0,L=0,R=0,G=0;switch(c.keyCode){case 61:case 107:case 171:case 187:d=1;break;case 189:case 109:case 173:d=-1;break;case 37:c.shiftKey?w=-1:(c.preventDefault(),R=-1);break;case 39:c.shiftKey?w=1:(c.preventDefault(),R=1);break;case 38:c.shiftKey?L=1:(c.preventDefault(),G=-1);break;case 40:c.shiftKey?L=-1:(c.preventDefault(),G=1);break;default:return}return this._rotationDisabled&&(w=0,L=0),{cameraAnimation:function(K){var te=K.getZoom();K.easeTo({duration:300,easeId:"keyboardHandler",easing:Ei,zoom:d?Math.round(te)+d*(c.shiftKey?2:1):te,bearing:K.getBearing()+w*x._bearingStep,pitch:K.getPitch()+L*x._pitchStep,offset:[-R*x._panStep,-G*x._panStep],center:K.getCenter()},{originalEvent:c})}}}},sa.prototype.enable=function(){this._enabled=!0},sa.prototype.disable=function(){this._enabled=!1,this.reset()},sa.prototype.isEnabled=function(){return this._enabled},sa.prototype.isActive=function(){return this._active},sa.prototype.disableRotation=function(){this._rotationDisabled=!0},sa.prototype.enableRotation=function(){this._rotationDisabled=!1};function Ei(g){return g*(2-g)}var Oi=4.000244140625,$i=1/100,xi=1/450,xn=2,br=function(c,x){this._map=c,this._el=c.getCanvasContainer(),this._handler=x,this._delta=0,this._defaultZoomRate=$i,this._wheelZoomRate=xi,a.bindAll(["_onTimeout"],this)};br.prototype.setZoomRate=function(c){this._defaultZoomRate=c},br.prototype.setWheelZoomRate=function(c){this._wheelZoomRate=c},br.prototype.isEnabled=function(){return!!this._enabled},br.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},br.prototype.isZooming=function(){return!!this._zooming},br.prototype.enable=function(c){this.isEnabled()||(this._enabled=!0,this._aroundCenter=c&&c.around==="center")},br.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},br.prototype.wheel=function(c){if(this.isEnabled()){var x=c.deltaMode===a.window.WheelEvent.DOM_DELTA_LINE?c.deltaY*40:c.deltaY,d=a.browser.now(),w=d-(this._lastWheelEventTime||0);this._lastWheelEventTime=d,x!==0&&x%Oi===0?this._type="wheel":x!==0&&Math.abs(x)<4?this._type="trackpad":w>400?(this._type=null,this._lastValue=x,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=Math.abs(w*x)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,x+=this._lastValue)),c.shiftKey&&x&&(x=x/4),this._type&&(this._lastWheelEvent=c,this._delta-=x,this._active||this._start(c)),c.preventDefault()}},br.prototype._onTimeout=function(c){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(c)},br.prototype._start=function(c){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 x=l.mousePos(this._el,c);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(x)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},br.prototype.renderFrame=function(){var c=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var x=this._map.transform;if(this._delta!==0){var d=this._type==="wheel"&&Math.abs(this._delta)>Oi?this._wheelZoomRate:this._defaultZoomRate,w=xn/(1+Math.exp(-Math.abs(this._delta*d)));this._delta<0&&w!==0&&(w=1/w);var L=typeof this._targetZoom=="number"?x.zoomScale(this._targetZoom):x.scale;this._targetZoom=Math.min(x.maxZoom,Math.max(x.minZoom,x.scaleZoom(L*w))),this._type==="wheel"&&(this._startZoom=x.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var R=typeof this._targetZoom=="number"?this._targetZoom:x.zoom,G=this._startZoom,K=this._easing,te=!1,ue;if(this._type==="wheel"&&G&&K){var we=Math.min((a.browser.now()-this._lastWheelEventTime)/200,1),be=K(we);ue=a.number(G,R,be),we<1?this._frameId||(this._frameId=!0):te=!0}else ue=R,te=!0;return this._active=!0,te&&(this._active=!1,this._finishTimeout=setTimeout(function(){c._zooming=!1,c._handler._triggerRenderFrame(),delete c._targetZoom,delete c._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!te,zoomDelta:ue-x.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},br.prototype._smoothOutEasing=function(c){var x=a.ease;if(this._prevEase){var d=this._prevEase,w=(a.browser.now()-d.start)/d.duration,L=d.easing(w+.01)-d.easing(w),R=.27/Math.sqrt(L*L+1e-4)*.01,G=Math.sqrt(.27*.27-R*R);x=a.bezier(R,G,.25,1)}return this._prevEase={start:a.browser.now(),duration:c,easing:x},x},br.prototype.reset=function(){this._active=!1};var Vr=function(c,x){this._clickZoom=c,this._tapZoom=x};Vr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var qi=function(){this.reset()};qi.prototype.reset=function(){this._active=!1},qi.prototype.dblclick=function(c,x){return c.preventDefault(),{cameraAnimation:function(d){d.easeTo({duration:300,zoom:d.getZoom()+(c.shiftKey?-1:1),around:d.unproject(x)},{originalEvent:c})}}},qi.prototype.enable=function(){this._enabled=!0},qi.prototype.disable=function(){this._enabled=!1,this.reset()},qi.prototype.isEnabled=function(){return this._enabled},qi.prototype.isActive=function(){return this._active};var Ti=function(){this._tap=new Je({numTouches:1,numTaps:1}),this.reset()};Ti.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ti.prototype.touchstart=function(c,x,d){this._swipePoint||(this._tapTime&&c.timeStamp-this._tapTime>me&&this.reset(),this._tapTime?d.length>0&&(this._swipePoint=x[0],this._swipeTouch=d[0].identifier):this._tap.touchstart(c,x,d))},Ti.prototype.touchmove=function(c,x,d){if(!this._tapTime)this._tap.touchmove(c,x,d);else if(this._swipePoint){if(d[0].identifier!==this._swipeTouch)return;var w=x[0],L=w.y-this._swipePoint.y;return this._swipePoint=w,c.preventDefault(),this._active=!0,{zoomDelta:L/128}}},Ti.prototype.touchend=function(c,x,d){if(this._tapTime)this._swipePoint&&d.length===0&&this.reset();else{var w=this._tap.touchend(c,x,d);w&&(this._tapTime=c.timeStamp)}},Ti.prototype.touchcancel=function(){this.reset()},Ti.prototype.enable=function(){this._enabled=!0},Ti.prototype.disable=function(){this._enabled=!1,this.reset()},Ti.prototype.isEnabled=function(){return this._enabled},Ti.prototype.isActive=function(){return this._active};var lo=function(c,x,d){this._el=c,this._mousePan=x,this._touchPan=d};lo.prototype.enable=function(c){this._inertiaOptions=c||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},lo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},lo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},lo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var zn=function(c,x,d){this._pitchWithRotate=c.pitchWithRotate,this._mouseRotate=x,this._mousePitch=d};zn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},zn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},zn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},zn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var cn=function(c,x,d,w){this._el=c,this._touchZoom=x,this._touchRotate=d,this._tapDragZoom=w,this._rotationDisabled=!1,this._enabled=!0};cn.prototype.enable=function(c){this._touchZoom.enable(c),this._rotationDisabled||this._touchRotate.enable(c),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},cn.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},cn.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},cn.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},cn.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},cn.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var pi=function(g){return g.zoom||g.drag||g.pitch||g.rotate},jo=function(g){function c(){g.apply(this,arguments)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c}(a.Event);function uo(g){return g.panDelta&&g.panDelta.mag()||g.zoomDelta||g.bearingDelta||g.pitchDelta}var ci=function(c,x){this._map=c,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new yf(c),this._bearingSnap=x.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(x),a.bindAll(["handleEvent","handleWindowEvent"],this);var d=this._el;this._listeners=[[d,"touchstart",{passive:!0}],[d,"touchmove",{passive:!1}],[d,"touchend",void 0],[d,"touchcancel",void 0],[d,"mousedown",void 0],[d,"mousemove",void 0],[d,"mouseup",void 0],[a.window.document,"mousemove",{capture:!0}],[a.window.document,"mouseup",void 0],[d,"mouseover",void 0],[d,"mouseout",void 0],[d,"dblclick",void 0],[d,"click",void 0],[d,"keydown",{capture:!1}],[d,"keyup",void 0],[d,"wheel",{passive:!1}],[d,"contextmenu",void 0],[a.window,"blur",void 0]];for(var w=0,L=this._listeners;wG?Math.min(2,Qt):Math.max(.5,Qt),Sr=Math.pow(Lr,1-cr),Xr=R.unproject(zt.add(qt.mult(cr*Sr)).mult(_r));R.setLocationAtPoint(R.renderWorldCopies?Xr.wrap():Xr,Oe)}L._fireMoveEvents(w)},function(cr){L._afterEase(w,cr)},d),this},c.prototype._prepareEase=function(d,w,L){L===void 0&&(L={}),this._moving=!0,!w&&!L.moving&&this.fire(new a.Event("movestart",d)),this._zooming&&!L.zooming&&this.fire(new a.Event("zoomstart",d)),this._rotating&&!L.rotating&&this.fire(new a.Event("rotatestart",d)),this._pitching&&!L.pitching&&this.fire(new a.Event("pitchstart",d))},c.prototype._fireMoveEvents=function(d){this.fire(new a.Event("move",d)),this._zooming&&this.fire(new a.Event("zoom",d)),this._rotating&&this.fire(new a.Event("rotate",d)),this._pitching&&this.fire(new a.Event("pitch",d))},c.prototype._afterEase=function(d,w){if(!(this._easeId&&w&&this._easeId===w)){delete this._easeId;var L=this._zooming,R=this._rotating,G=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,L&&this.fire(new a.Event("zoomend",d)),R&&this.fire(new a.Event("rotateend",d)),G&&this.fire(new a.Event("pitchend",d)),this.fire(new a.Event("moveend",d))}},c.prototype.flyTo=function(d,w){var L=this;if(!d.essential&&a.browser.prefersReducedMotion){var R=a.pick(d,["center","zoom","bearing","pitch","around"]);return this.jumpTo(R,w)}this.stop(),d=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},d);var G=this.transform,K=this.getZoom(),te=this.getBearing(),ue=this.getPitch(),we=this.getPadding(),be="zoom"in d?a.clamp(+d.zoom,G.minZoom,G.maxZoom):K,Ie="bearing"in d?this._normalizeBearing(d.bearing,te):te,Ye="pitch"in d?+d.pitch:ue,Ze="padding"in d?d.padding:G.padding,Oe=G.zoomScale(be-K),Xe=a.Point.convert(d.offset),ct=G.centerPoint.add(Xe),zt=G.pointLocation(ct),qt=a.LngLat.convert(d.center||zt);this._normalizeCenter(qt);var Qt=G.project(zt),rr=G.project(qt).sub(Qt),Zt=d.curve,ar=Math.max(G.width,G.height),cr=ar/Oe,_r=rr.mag();if("minZoom"in d){var Lr=a.clamp(Math.min(d.minZoom,K,be),G.minZoom,G.maxZoom),Sr=ar/G.zoomScale(Lr-K);Zt=Math.sqrt(Sr/_r*2)}var Xr=Zt*Zt;function Fa(na){var Oa=(cr*cr-ar*ar+(na?-1:1)*Xr*Xr*_r*_r)/(2*(na?cr:ar)*Xr*_r);return Math.log(Math.sqrt(Oa*Oa+1)-Oa)}function xa(na){return(Math.exp(na)-Math.exp(-na))/2}function qr(na){return(Math.exp(na)+Math.exp(-na))/2}function Sa(na){return xa(na)/qr(na)}var ia=Fa(0),Za=function(na){return qr(ia)/qr(ia+Zt*na)},Va=function(na){return ar*((qr(ia)*Sa(ia+Zt*na)-xa(ia))/Xr)/_r},Ai=(Fa(1)-ia)/Zt;if(Math.abs(_r)<1e-6||!isFinite(Ai)){if(Math.abs(ar-cr)<1e-6)return this.easeTo(d,w);var Pa=crd.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=te!==Ie,this._pitching=Ye!==ue,this._padding=!G.isPaddingEqual(Ze),this._prepareEase(w,!1),this._ease(function(na){var Oa=na*Ai,en=1/Za(Oa);G.zoom=na===1?be:K+G.scaleZoom(en),L._rotating&&(G.bearing=a.number(te,Ie,na)),L._pitching&&(G.pitch=a.number(ue,Ye,na)),L._padding&&(G.interpolatePadding(we,Ze,na),ct=G.centerPoint.add(Xe));var In=na===1?qt:G.unproject(Qt.add(rr.mult(Va(Oa))).mult(en));G.setLocationAtPoint(G.renderWorldCopies?In.wrap():In,ct),L._fireMoveEvents(w)},function(){return L._afterEase(w)},d),this},c.prototype.isEasing=function(){return!!this._easeFrameId},c.prototype.stop=function(){return this._stop()},c.prototype._stop=function(d,w){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var L=this._onEaseEnd;delete this._onEaseEnd,L.call(this,w)}if(!d){var R=this.handlers;R&&R.stop(!1)}return this},c.prototype._ease=function(d,w,L){L.animate===!1||L.duration===0?(d(1),w()):(this._easeStart=a.browser.now(),this._easeOptions=L,this._onEaseFrame=d,this._onEaseEnd=w,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},c.prototype._renderFrameCallback=function(){var d=Math.min((a.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(d)),d<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},c.prototype._normalizeBearing=function(d,w){d=a.wrap(d,-180,180);var L=Math.abs(d-w);return Math.abs(d-360-w)180?-360:L<-180?360:0}},c}(a.Evented),Aa=function(c){c===void 0&&(c={}),this.options=c,a.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Aa.prototype.getDefaultPosition=function(){return"bottom-right"},Aa.prototype.onAdd=function(c){var x=this.options&&this.options.compact;return this._map=c,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=l.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=l.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),x&&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),x===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Aa.prototype.onRemove=function(){l.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},Aa.prototype._setElementTitle=function(c,x){var d=this._map._getUIString("AttributionControl."+x);c.title=d,c.setAttribute("aria-label",d)},Aa.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"))},Aa.prototype._updateEditLink=function(){var c=this._editLink;c||(c=this._editLink=this._container.querySelector(".mapbox-improve-map"));var x=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||a.config.ACCESS_TOKEN}];if(c){var d=x.reduce(function(w,L,R){return L.value&&(w+=L.key+"="+L.value+(R=0)return!1;return!0});var G=c.join(" | ");G!==this._attribHTML&&(this._attribHTML=G,c.length?(this._innerContainer.innerHTML=G,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Aa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ui=function(){a.bindAll(["_updateLogo"],this),a.bindAll(["_updateCompact"],this)};ui.prototype.onAdd=function(c){this._map=c,this._container=l.create("div","mapboxgl-ctrl");var x=l.create("a","mapboxgl-ctrl-logo");return x.target="_blank",x.rel="noopener nofollow",x.href="https://www.mapbox.com/",x.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),x.setAttribute("rel","noopener nofollow"),this._container.appendChild(x),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ui.prototype.onRemove=function(){l.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ui.prototype.getDefaultPosition=function(){return"bottom-left"},ui.prototype._updateLogo=function(c){(!c||c.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ui.prototype._logoRequired=function(){if(this._map.style){var c=this._map.style.sourceCaches;for(var x in c){var d=c[x].getSource();if(d.mapbox_logo)return!0}return!1}},ui.prototype._updateCompact=function(){var c=this._container.children;if(c.length){var x=c[0];this._map.getCanvasContainer().offsetWidth<250?x.classList.add("mapboxgl-compact"):x.classList.remove("mapboxgl-compact")}};var Nl=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Nl.prototype.add=function(c){var x=++this._id,d=this._queue;return d.push({callback:c,id:x,cancelled:!1}),x},Nl.prototype.remove=function(c){for(var x=this._currentlyRunning,d=x?this._queue.concat(x):this._queue,w=0,L=d;wd.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(d.minPitch!=null&&d.maxPitch!=null&&d.minPitch>d.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(d.minPitch!=null&&d.minPitchxf)throw new Error("maxPitch must be less than or equal to "+xf);var L=new ti(d.minZoom,d.maxZoom,d.minPitch,d.maxPitch,d.renderWorldCopies);if(g.call(this,L,d),this._interactive=d.interactive,this._maxTileCacheSize=d.maxTileCacheSize,this._failIfMajorPerformanceCaveat=d.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=d.preserveDrawingBuffer,this._antialias=d.antialias,this._trackResize=d.trackResize,this._bearingSnap=d.bearingSnap,this._refreshExpiredTiles=d.refreshExpiredTiles,this._fadeDuration=d.fadeDuration,this._crossSourceCollisions=d.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=d.collectResourceTiming,this._renderTaskQueue=new Nl,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},Hv,d.locale),this._clickTolerance=d.clickTolerance,this._requestManager=new a.RequestManager(d.transformRequest,d.accessToken),typeof d.container=="string"){if(this._container=a.window.document.getElementById(d.container),!this._container)throw new Error("Container '"+d.container+"' not found.")}else if(d.container instanceof ey)this._container=d.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(d.maxBounds&&this.setMaxBounds(d.maxBounds),a.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 w._update(!1)}),this.on("moveend",function(){return w._update(!1)}),this.on("zoom",function(){return w._update(!0)}),typeof a.window!="undefined"&&(a.window.addEventListener("online",this._onWindowOnline,!1),a.window.addEventListener("resize",this._onWindowResize,!1),a.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new ci(this,d);var R=typeof d.hash=="string"&&d.hash||void 0;this._hash=d.hash&&new Rl(R).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:d.center,zoom:d.zoom,bearing:d.bearing,pitch:d.pitch}),d.bounds&&(this.resize(),this.fitBounds(d.bounds,a.extend({},d.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=d.localIdeographFontFamily,d.style&&this.setStyle(d.style,{localIdeographFontFamily:d.localIdeographFontFamily}),d.attributionControl&&this.addControl(new Aa({customAttribution:d.customAttribution})),this.addControl(new ui,d.logoPosition),this.on("style.load",function(){w.transform.unmodified&&w.jumpTo(w.style.stylesheet)}),this.on("data",function(G){w._update(G.dataType==="style"),w.fire(new a.Event(G.dataType+"data",G))}),this.on("dataloading",function(G){w.fire(new a.Event(G.dataType+"dataloading",G))})}g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c;var x={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return c.prototype._getMapId=function(){return this._mapId},c.prototype.addControl=function(w,L){if(L===void 0&&(w.getDefaultPosition?L=w.getDefaultPosition():L="top-right"),!w||!w.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var R=w.onAdd(this);this._controls.push(w);var G=this._controlPositions[L];return L.indexOf("bottom")!==-1?G.insertBefore(R,G.firstChild):G.appendChild(R),this},c.prototype.removeControl=function(w){if(!w||!w.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var L=this._controls.indexOf(w);return L>-1&&this._controls.splice(L,1),w.onRemove(this),this},c.prototype.hasControl=function(w){return this._controls.indexOf(w)>-1},c.prototype.resize=function(w){var L=this._containerDimensions(),R=L[0],G=L[1];this._resizeCanvas(R,G),this.transform.resize(R,G),this.painter.resize(R,G);var K=!this._moving;return K&&(this.stop(),this.fire(new a.Event("movestart",w)).fire(new a.Event("move",w))),this.fire(new a.Event("resize",w)),K&&this.fire(new a.Event("moveend",w)),this},c.prototype.getBounds=function(){return this.transform.getBounds()},c.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},c.prototype.setMaxBounds=function(w){return this.transform.setMaxBounds(a.LngLatBounds.convert(w)),this._update()},c.prototype.setMinZoom=function(w){if(w=w==null?oh:w,w>=oh&&w<=this.transform.maxZoom)return this.transform.minZoom=w,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=w,this._update(),this.getZoom()>w&&this.setZoom(w),this;throw new Error("maxZoom must be greater than the current minZoom")},c.prototype.getMaxZoom=function(){return this.transform.maxZoom},c.prototype.setMinPitch=function(w){if(w=w==null?Lo:w,w=Lo&&w<=this.transform.maxPitch)return this.transform.minPitch=w,this._update(),this.getPitch()xf)throw new Error("maxPitch must be less than or equal to "+xf);if(w>=this.transform.minPitch)return this.transform.maxPitch=w,this._update(),this.getPitch()>w&&this.setPitch(w),this;throw new Error("maxPitch must be greater than the current minPitch")},c.prototype.getMaxPitch=function(){return this.transform.maxPitch},c.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},c.prototype.setRenderWorldCopies=function(w){return this.transform.renderWorldCopies=w,this._update()},c.prototype.project=function(w){return this.transform.locationPoint(a.LngLat.convert(w))},c.prototype.unproject=function(w){return this.transform.pointLocation(a.Point.convert(w))},c.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},c.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},c.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},c.prototype._createDelegatedListener=function(w,L,R){var G=this,K;if(w==="mouseenter"||w==="mouseover"){var te=!1,ue=function(Oe){var Xe=G.getLayer(L)?G.queryRenderedFeatures(Oe.point,{layers:[L]}):[];Xe.length?te||(te=!0,R.call(G,new M(w,G,Oe.originalEvent,{features:Xe}))):te=!1},we=function(){te=!1};return{layer:L,listener:R,delegates:{mousemove:ue,mouseout:we}}}else if(w==="mouseleave"||w==="mouseout"){var be=!1,Ie=function(Oe){var Xe=G.getLayer(L)?G.queryRenderedFeatures(Oe.point,{layers:[L]}):[];Xe.length?be=!0:be&&(be=!1,R.call(G,new M(w,G,Oe.originalEvent)))},Ye=function(Oe){be&&(be=!1,R.call(G,new M(w,G,Oe.originalEvent)))};return{layer:L,listener:R,delegates:{mousemove:Ie,mouseout:Ye}}}else{var Ze=function(Oe){var Xe=G.getLayer(L)?G.queryRenderedFeatures(Oe.point,{layers:[L]}):[];Xe.length&&(Oe.features=Xe,R.call(G,Oe),delete Oe.features)};return{layer:L,listener:R,delegates:(K={},K[w]=Ze,K)}}},c.prototype.on=function(w,L,R){if(R===void 0)return g.prototype.on.call(this,w,L);var G=this._createDelegatedListener(w,L,R);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[w]=this._delegatedListeners[w]||[],this._delegatedListeners[w].push(G);for(var K in G.delegates)this.on(K,G.delegates[K]);return this},c.prototype.once=function(w,L,R){if(R===void 0)return g.prototype.once.call(this,w,L);var G=this._createDelegatedListener(w,L,R);for(var K in G.delegates)this.once(K,G.delegates[K]);return this},c.prototype.off=function(w,L,R){var G=this;if(R===void 0)return g.prototype.off.call(this,w,L);var K=function(te){for(var ue=te[w],we=0;we180;){var R=x.locationPoint(g);if(R.x>=0&&R.y>=0&&R.x<=x.width&&R.y<=x.height)break;g.lng>x.center.lng?g.lng-=360:g.lng+=360}return g}var Zv={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 Fp(g,c,x){var d=g.classList;for(var w in Zv)d.remove("mapboxgl-"+x+"-anchor-"+w);d.add("mapboxgl-"+x+"-anchor-"+c)}var lh=function(g){function c(x,d){if(g.call(this),(x instanceof a.window.HTMLElement||d)&&(x=a.extend({element:x},d)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=x&&x.anchor||"center",this._color=x&&x.color||"#3FB1CE",this._scale=x&&x.scale||1,this._draggable=x&&x.draggable||!1,this._clickTolerance=x&&x.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=x&&x.rotation||0,this._rotationAlignment=x&&x.rotationAlignment||"auto",this._pitchAlignment=x&&x.pitchAlignment&&x.pitchAlignment!=="auto"?x.pitchAlignment:this._rotationAlignment,!x||!x.element){this._defaultMarker=!0,this._element=l.create("div"),this._element.setAttribute("aria-label","Map marker");var w=l.createNS("http://www.w3.org/2000/svg","svg"),L=41,R=27;w.setAttributeNS(null,"display","block"),w.setAttributeNS(null,"height",L+"px"),w.setAttributeNS(null,"width",R+"px"),w.setAttributeNS(null,"viewBox","0 0 "+R+" "+L);var G=l.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"stroke","none"),G.setAttributeNS(null,"stroke-width","1"),G.setAttributeNS(null,"fill","none"),G.setAttributeNS(null,"fill-rule","evenodd");var K=l.createNS("http://www.w3.org/2000/svg","g");K.setAttributeNS(null,"fill-rule","nonzero");var te=l.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"transform","translate(3.0, 29.0)"),te.setAttributeNS(null,"fill","#000000");for(var ue=[{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"}],we=0,be=ue;we=w}this._isDragging&&(this._pos=d.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.Event("dragstart"))),this.fire(new a.Event("drag")))},c.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 a.Event("dragend")),this._state="inactive"},c.prototype._addDragHandler=function(d){this._element.contains(d.originalEvent.target)&&(d.preventDefault(),this._positionDelta=d.point.sub(this._pos).add(this._offset),this._pointerdownPos=d.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))},c.prototype.setDraggable=function(d){return this._draggable=!!d,this._map&&(d?(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},c.prototype.isDraggable=function(){return this._draggable},c.prototype.setRotation=function(d){return this._rotation=d||0,this._update(),this},c.prototype.getRotation=function(){return this._rotation},c.prototype.setRotationAlignment=function(d){return this._rotationAlignment=d||"auto",this._update(),this},c.prototype.getRotationAlignment=function(){return this._rotationAlignment},c.prototype.setPitchAlignment=function(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this},c.prototype.getPitchAlignment=function(){return this._pitchAlignment},c}(a.Evented),ay={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bf;function Yv(g){bf!==void 0?g(bf):a.window.navigator.permissions!==void 0?a.window.navigator.permissions.query({name:"geolocation"}).then(function(c){bf=c.state!=="denied",g(bf)}):(bf=!!a.window.navigator.geolocation,g(bf))}var uh=0,ic=!1,d1=function(g){function c(x){g.call(this),this.options=a.extend({},ay,x),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.onAdd=function(d){return this._map=d,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Yv(this._setupUI),this._container},c.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(a.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(),l.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,uh=0,ic=!1},c.prototype._isOutOfMapMaxBounds=function(d){var w=this._map.getMaxBounds(),L=d.coords;return w&&(L.longitudew.getEast()||L.latitudew.getNorth())},c.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}},c.prototype._onSuccess=function(d){if(this._map){if(this._isOutOfMapMaxBounds(d)){this._setErrorState(),this.fire(new a.Event("outofmaxbounds",d)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,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(d),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",d)),this._finish()}},c.prototype._updateCamera=function(d){var w=new a.LngLat(d.coords.longitude,d.coords.latitude),L=d.coords.accuracy,R=this._map.getBearing(),G=a.extend({bearing:R},this.options.fitBoundsOptions);this._map.fitBounds(w.toBounds(L),G,{geolocateSource:!0})},c.prototype._updateMarker=function(d){if(d){var w=new a.LngLat(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(w).addTo(this._map),this._userLocationDotMarker.setLngLat(w).addTo(this._map),this._accuracy=d.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},c.prototype._updateCircleRadius=function(){var d=this._map._container.clientHeight/2,w=this._map.unproject([0,d]),L=this._map.unproject([1,d]),R=w.distanceTo(L),G=Math.ceil(2*this._accuracy/R);this._circleElement.style.width=G+"px",this._circleElement.style.height=G+"px"},c.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},c.prototype._onError=function(d){if(this._map){if(this.options.trackUserLocation)if(d.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 w=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=w,this._geolocateButton.setAttribute("aria-label",w),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&ic)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",d)),this._finish()}},c.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},c.prototype._setupUI=function(d){var w=this;if(this._container.addEventListener("contextmenu",function(G){return G.preventDefault()}),this._geolocateButton=l.create("button","mapboxgl-ctrl-geolocate",this._container),l.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",d===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var L=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=L,this._geolocateButton.setAttribute("aria-label",L)}else{var R=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=R,this._geolocateButton.setAttribute("aria-label",R)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=l.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new lh(this._dotElement),this._circleElement=l.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new lh({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(G){var K=G.originalEvent&&G.originalEvent.type==="resize";!G.geolocateSource&&w._watchState==="ACTIVE_LOCK"&&!K&&(w._watchState="BACKGROUND",w._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),w._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),w.fire(new a.Event("trackuserlocationend")))})},c.prototype.trigger=function(){if(!this._setup)return a.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 a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":uh--,ic=!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 a.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 a.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"),uh++;var d;uh>1?(d={maximumAge:6e5,timeout:0},ic=!0):(d=this.options.positionOptions,ic=!1),this._geolocationWatchID=a.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,d)}}else a.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},c.prototype._clearWatch=function(){a.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)},c}(a.Evented),iy={maxWidth:100,unit:"metric"},nc=function(c){this.options=a.extend({},iy,c),a.bindAll(["_onMove","setUnit"],this)};nc.prototype.getDefaultPosition=function(){return"bottom-left"},nc.prototype._onMove=function(){ny(this._map,this._container,this.options)},nc.prototype.onAdd=function(c){return this._map=c,this._container=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",c.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},nc.prototype.onRemove=function(){l.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},nc.prototype.setUnit=function(c){this.options.unit=c,ny(this._map,this._container,this.options)};function ny(g,c,x){var d=x&&x.maxWidth||100,w=g._container.clientHeight/2,L=g.unproject([0,w]),R=g.unproject([d,w]),G=L.distanceTo(R);if(x&&x.unit==="imperial"){var K=3.2808*G;if(K>5280){var te=K/5280;fh(c,d,te,g._getUIString("ScaleControl.Miles"))}else fh(c,d,K,g._getUIString("ScaleControl.Feet"))}else if(x&&x.unit==="nautical"){var ue=G/1852;fh(c,d,ue,g._getUIString("ScaleControl.NauticalMiles"))}else G>=1e3?fh(c,d,G/1e3,g._getUIString("ScaleControl.Kilometers")):fh(c,d,G,g._getUIString("ScaleControl.Meters"))}function fh(g,c,x,d){var w=m1(x),L=w/x;g.style.width=c*L+"px",g.innerHTML=w+" "+d}function p1(g){var c=Math.pow(10,Math.ceil(-Math.log(g)/Math.LN10));return Math.round(g*c)/c}function m1(g){var c=Math.pow(10,(""+Math.floor(g)).length-1),x=g/c;return x=x>=10?10:x>=5?5:x>=3?3:x>=2?2:x>=1?1:p1(x),c*x}var $s=function(c){this._fullscreen=!1,c&&c.container&&(c.container instanceof a.window.HTMLElement?this._container=c.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in a.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in a.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in a.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in a.window.document&&(this._fullscreenchange="MSFullscreenChange")};$s.prototype.onAdd=function(c){return this._map=c,this._container||(this._container=this._map.getContainer()),this._controlContainer=l.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},$s.prototype.onRemove=function(){l.remove(this._controlContainer),this._map=null,a.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},$s.prototype._checkFullscreenSupport=function(){return!!(a.window.document.fullscreenEnabled||a.window.document.mozFullScreenEnabled||a.window.document.msFullscreenEnabled||a.window.document.webkitFullscreenEnabled)},$s.prototype._setupUI=function(){var c=this._fullscreenButton=l.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);l.create("span","mapboxgl-ctrl-icon",c).setAttribute("aria-hidden",!0),c.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),a.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},$s.prototype._updateTitle=function(){var c=this._getTitle();this._fullscreenButton.setAttribute("aria-label",c),this._fullscreenButton.title=c},$s.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},$s.prototype._isFullscreen=function(){return this._fullscreen},$s.prototype._changeIcon=function(){var c=a.window.document.fullscreenElement||a.window.document.mozFullScreenElement||a.window.document.webkitFullscreenElement||a.window.document.msFullscreenElement;c===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},$s.prototype._onClickFullscreen=function(){this._isFullscreen()?a.window.document.exitFullscreen?a.window.document.exitFullscreen():a.window.document.mozCancelFullScreen?a.window.document.mozCancelFullScreen():a.window.document.msExitFullscreen?a.window.document.msExitFullscreen():a.window.document.webkitCancelFullScreen&&a.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 y1={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},g1=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),o3=function(g){function c(x){g.call(this),this.options=a.extend(Object.create(y1),x),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return g&&(c.__proto__=g),c.prototype=Object.create(g&&g.prototype),c.prototype.constructor=c,c.prototype.addTo=function(d){return this._map&&this.remove(),this._map=d,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 a.Event("open")),this},c.prototype.isOpen=function(){return!!this._map},c.prototype.remove=function(){return this._content&&l.remove(this._content),this._container&&(l.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 a.Event("close")),this},c.prototype.getLngLat=function(){return this._lngLat},c.prototype.setLngLat=function(d){return this._lngLat=a.LngLat.convert(d),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},c.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},c.prototype.getElement=function(){return this._container},c.prototype.setText=function(d){return this.setDOMContent(a.window.document.createTextNode(d))},c.prototype.setHTML=function(d){var w=a.window.document.createDocumentFragment(),L=a.window.document.createElement("body"),R;for(L.innerHTML=d;R=L.firstChild,!!R;)w.appendChild(R);return this.setDOMContent(w)},c.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},c.prototype.setMaxWidth=function(d){return this.options.maxWidth=d,this._update(),this},c.prototype.setDOMContent=function(d){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=l.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(d),this._createCloseButton(),this._update(),this._focusFirstElement(),this},c.prototype.addClassName=function(d){this._container&&this._container.classList.add(d)},c.prototype.removeClassName=function(d){this._container&&this._container.classList.remove(d)},c.prototype.setOffset=function(d){return this.options.offset=d,this._update(),this},c.prototype.toggleClassName=function(d){if(this._container)return this._container.classList.toggle(d)},c.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=l.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))},c.prototype._onMouseUp=function(d){this._update(d.point)},c.prototype._onMouseMove=function(d){this._update(d.point)},c.prototype._onDrag=function(d){this._update(d.point)},c.prototype._update=function(d){var w=this,L=this._lngLat||this._trackPointer;if(!(!this._map||!L||!this._content)&&(this._container||(this._container=l.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=l.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ie){return w._container.classList.add(Ie)}),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=Su(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!d))){var R=this._pos=this._trackPointer&&d?d:this._map.project(this._lngLat),G=this.options.anchor,K=_1(this.options.offset);if(!G){var te=this._container.offsetWidth,ue=this._container.offsetHeight,we;R.y+K.bottom.ythis._map.transform.height-ue?we=["bottom"]:we=[],R.xthis._map.transform.width-te/2&&we.push("right"),we.length===0?G="bottom":G=we.join("-")}var be=R.add(K[G]).round();l.setTransform(this._container,Zv[G]+" translate("+be.x+"px,"+be.y+"px)"),Fp(this._container,G,"popup")}},c.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var d=this._container.querySelector(g1);d&&d.focus()}},c.prototype._onClose=function(){this.remove()},c}(a.Evented);function _1(g){if(g)if(typeof g=="number"){var c=Math.round(Math.sqrt(.5*Math.pow(g,2)));return{center:new a.Point(0,0),top:new a.Point(0,g),"top-left":new a.Point(c,c),"top-right":new a.Point(-c,c),bottom:new a.Point(0,-g),"bottom-left":new a.Point(c,-c),"bottom-right":new a.Point(-c,-c),left:new a.Point(g,0),right:new a.Point(-g,0)}}else if(g instanceof a.Point||Array.isArray(g)){var x=a.Point.convert(g);return{center:x,top:x,"top-left":x,"top-right":x,bottom:x,"bottom-left":x,"bottom-right":x,left:x,right:x}}else return{center:a.Point.convert(g.center||[0,0]),top:a.Point.convert(g.top||[0,0]),"top-left":a.Point.convert(g["top-left"]||[0,0]),"top-right":a.Point.convert(g["top-right"]||[0,0]),bottom:a.Point.convert(g.bottom||[0,0]),"bottom-left":a.Point.convert(g["bottom-left"]||[0,0]),"bottom-right":a.Point.convert(g["bottom-right"]||[0,0]),left:a.Point.convert(g.left||[0,0]),right:a.Point.convert(g.right||[0,0])};else return _1(new a.Point(0,0))}var bn={version:a.version,supported:s,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:ry,NavigationControl:Mu,GeolocateControl:d1,AttributionControl:Aa,ScaleControl:nc,FullscreenControl:$s,Popup:o3,Marker:lh,Style:Ts,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.Point,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,config:a.config,prewarm:Br,clearPrewarmedResources:ca,get accessToken(){return a.config.ACCESS_TOKEN},set accessToken(g){a.config.ACCESS_TOKEN=g},get baseApiUrl(){return a.config.API_URL},set baseApiUrl(g){a.config.API_URL=g},get workerCount(){return tr.workerCount},set workerCount(g){tr.workerCount=g},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(g){a.config.MAX_PARALLEL_IMAGE_REQUESTS=g},clearStorage:function(c){a.clearTileCache(c)},workerUrl:""};return bn}),r})});var AH=de((ybe,TH)=>{TH.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 Ob=de(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});var Ys=63710088e-1,mA={centimeters:Ys*100,centimetres:Ys*100,degrees:360/(2*Math.PI),feet:Ys*3.28084,inches:Ys*39.37,kilometers:Ys/1e3,kilometres:Ys/1e3,meters:Ys,metres:Ys,miles:Ys/1609.344,millimeters:Ys*1e3,millimetres:Ys*1e3,nauticalmiles:Ys/1852,radians:1,yards:Ys*1.0936},pA={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 tv(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}function kde(e,t,r={}){switch(e){case"Point":return yA(t).geometry;case"LineString":return _A(t).geometry;case"Polygon":return gA(t).geometry;case"MultiPoint":return SH(t).geometry;case"MultiLineString":return MH(t).geometry;case"MultiPolygon":return kH(t).geometry;default:throw new Error(e+" is invalid")}}function yA(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(!Nb(e[0])||!Nb(e[1]))throw new Error("coordinates must contain numbers");return tv({type:"Point",coordinates:e},t,r)}function Cde(e,t,r={}){return Bb(e.map(i=>yA(i,t)),r)}function gA(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sgA(i,t)),r)}function _A(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return tv({type:"LineString",coordinates:e},t,r)}function Lde(e,t,r={}){return Bb(e.map(i=>_A(i,t)),r)}function Bb(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function MH(e,t,r={}){return tv({type:"MultiLineString",coordinates:e},t,r)}function SH(e,t,r={}){return tv({type:"MultiPoint",coordinates:e},t,r)}function kH(e,t,r={}){return tv({type:"MultiPolygon",coordinates:e},t,r)}function Pde(e,t,r={}){return tv({type:"GeometryCollection",geometries:e},t,r)}function Dde(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 CH(e,t="kilometers"){let r=mA[t];if(!r)throw new Error(t+" units is invalid");return e*r}function xA(e,t="kilometers"){let r=mA[t];if(!r)throw new Error(t+" units is invalid");return e/r}function zde(e,t){return EH(xA(e,t))}function Ide(e){let t=e%360;return t<0&&(t+=360),t}function Rde(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function EH(e){return e%(2*Math.PI)*180/Math.PI}function Fde(e){return e%360*Math.PI/180}function qde(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return CH(xA(e,t),r)}function Nde(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=pA[t];if(!i)throw new Error("invalid original units");let a=pA[r];if(!a)throw new Error("invalid final units");return e/i*a}function Nb(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Bde(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ode(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(!Nb(t))throw new Error("bbox must only contain numbers")})}function Ude(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")}Si.areaFactors=pA;Si.azimuthToBearing=Rde;Si.bearingToAzimuth=Ide;Si.convertArea=Nde;Si.convertLength=qde;Si.degreesToRadians=Fde;Si.earthRadius=Ys;Si.factors=mA;Si.feature=tv;Si.featureCollection=Bb;Si.geometry=kde;Si.geometryCollection=Pde;Si.isNumber=Nb;Si.isObject=Bde;Si.lengthToDegrees=zde;Si.lengthToRadians=xA;Si.lineString=_A;Si.lineStrings=Lde;Si.multiLineString=MH;Si.multiPoint=SH;Si.multiPolygon=kH;Si.point=yA;Si.points=Cde;Si.polygon=gA;Si.polygons=Ede;Si.radiansToDegrees=EH;Si.radiansToLength=CH;Si.round=Dde;Si.validateBBox=Ode;Si.validateId=Ude});var Vb=de(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var ls=Ob();function l1(e,t,r){if(e!==null)for(var i,a,s,l,f,h,v,m=0,b=0,T,S=e.type,C=S==="FeatureCollection",P=S==="Feature",E=C?e.features.length:1,I=0;Ih||C>v||P>m){f=b,h=i,v=C,m=P,s=0;return}var E=ls.lineString.call(void 0,[f,b],r.properties);if(t(E,i,a,P,s)===!1)return!1;s++,f=b})===!1)return!1}}})}function Xde(e,t,r){var i=r,a=!1;return DH(e,function(s,l,f,h,v){a===!1&&r===void 0?i=s:i=t(i,s,l,f,h,v),a=!0}),i}function zH(e,t){if(!e)throw new Error("geojson is required");Ub(e,function(r,i,a){if(r.geometry!==null){var s=r.geometry.type,l=r.geometry.coordinates;switch(s){case"LineString":if(t(r,i,a,0,0)===!1)return!1;break;case"Polygon":for(var f=0;f{"use strict";Object.defineProperty(Hb,"__esModule",{value:!0});var IH=Ob(),Qde=Vb();function qH(e){return Qde.geomReduce.call(void 0,e,(t,r)=>t+$de(r),0)}function $de(e){let t=0,r;switch(e.type){case"Polygon":return RH(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(FH(e[0]));for(let r=1;r=t?(i+2)%t:i+2],f=a[0]*wA,h=s[1]*wA,v=l[0]*wA;r+=(v-f)*Math.sin(h),i++}return r*epe}var tpe=qH;Hb.area=qH;Hb.default=tpe});var OH=de(Gb=>{"use strict";Object.defineProperty(Gb,"__esModule",{value:!0});var rpe=Ob(),ape=Vb();function BH(e,t={}){let r=0,i=0,a=0;return ape.coordEach.call(void 0,e,function(s){r+=s[0],i+=s[1],a++},!0),rpe.point.call(void 0,[r/a,i/a],t.properties)}var ipe=BH;Gb.centroid=BH;Gb.default=ipe});var VH=de(Zb=>{"use strict";Object.defineProperty(Zb,"__esModule",{value:!0});var npe=Vb();function UH(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return npe.coordEach.call(void 0,e,i=>{r[0]>i[0]&&(r[0]=i[0]),r[1]>i[1]&&(r[1]=i[1]),r[2]{"use strict";var spe=ja(),ZH=AH(),{area:lpe}=NH(),{centroid:upe}=OH(),{bbox:fpe}=VH(),HH=y_(),bm=Th(),cpe=cc(),hpe=wy(),Yb=lx(),GH=Object.keys(ZH),vpe={"ISO-3":HH,"USA-states":HH,"country names":dpe};function dpe(e){for(var t=0;t0&&m[b+1][0]<0)return b;return null}switch(i==="RUS"||i==="FJI"?s=function(m){var b;if(v(m)===null)b=m;else for(b=new Array(m.length),h=0;hb?T[S++]=[m[h][0]+360,m[h][1]]:h===b?(T[S++]=m[h],T[S++]=[m[h][0],-90]):T[S++]=m[h];var C=Yb.tester(T);C.pts.pop(),a.push(C)}:s=function(m){a.push(Yb.tester(m))},t.type){case"MultiPolygon":for(l=0;l0?C.properties.ct=gpe(C):C.properties.ct=[NaN,NaN],T.fIn=m,T.fOut=C,a.push(C)}else bm.log(["Location",T.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[b]}switch(r.type){case"FeatureCollection":var h=r.features;for(s=0;sa&&(a=f,r=l)}else r=t;return upe(r).geometry.coordinates}function _pe(e){var t=window.PlotlyGeoAssets||{},r=[];function i(h){return new Promise(function(v,m){spe.json(h,function(b,T){if(b){delete t[h];var S=b.status===404?'GeoJSON at URL "'+h+'" does not exist.':"Unexpected error while fetching from "+h;return m(new Error(S))}return t[h]=T,v(T)})})}function a(h){return new Promise(function(v,m){var b=0,T=setInterval(function(){if(t[h]&&t[h]!=="pending")return clearInterval(T),v(t[h]);if(b>100)return clearInterval(T),m("Unexpected error while fetching from "+h);b++},50)})}for(var s=0;s{"use strict";var Gd=Bt(),bpe=co().sanitizeHTML,wpe=lA(),XH=zc();function jH(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=XH.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var fu=jH.prototype;fu.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=Wb(t)};fu.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))};fu.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};fu.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};fu.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};fu.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)};fu.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,!!Wb(e)){var r=Tpe(e);t.addSource(this.idSource,r)}};fu.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function JH(e){var t={},r={};switch(e.type){case"circle":Gd.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":Gd.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":Gd.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,a=wpe(i.textposition,i.iconsize);Gd.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":i.placement}),Gd.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":Gd.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Tpe(e){var t=e.sourcetype,r=e.source,i={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",i.tileSize=256):t==="image"&&(a="url",i.coordinates=e.coordinates),i[a]=r,e.sourceattribution&&(i.attribution=bpe(e.sourceattribution)),i}KH.exports=function(t,r,i){var a=new jH(t,r);return a.update(i),a}});var sG=de((Mbe,oG)=>{"use strict";var AA=dA(),MA=Bt(),rG=TA(),$H=la(),Ape=Yi(),Mpe=jl(),Xb=Rf(),aG=kd(),Spe=aG.drawMode,kpe=aG.selectMode,Cpe=Nf().prepSelect,Epe=Nf().clearOutline,Lpe=Nf().clearSelectionsCache,Ppe=Nf().selectOnClick,rv=zc(),Dpe=QH();function iG(e,t){this.id=t,this.gd=e;var r=e._fullLayout,i=e._context;this.container=r._glcontainer.node(),this.isStatic=i.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Un=iG.prototype;Un.plot=function(e,t,r){var i=this,a=t[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]);var s;i.map?s=new Promise(function(l,f){i.updateMap(e,t,l,f)}):s=new Promise(function(l,f){i.createMap(e,t,l,f)}),r.push(s)};Un.createMap=function(e,t,r,i){var a=this,s=t[a.id],l=a.styleObj=nG(s.style,t);a.accessToken=s.accesstoken;var f=s.bounds,h=f?[[f.west,f.south],[f.east,f.north]]:null,v=a.map=new AA.Map({container:a.div,style:l.style,center:SA(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:h,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new AA.AttributionControl({compact:!0}));v._canvas.style.left="0px",v._canvas.style.top="0px",a.rejectOnError(i),a.isStatic||a.initFx(e,t);var m=[];m.push(new Promise(function(b){v.once("load",b)})),m=m.concat(rG.fetchTraceGeoData(e)),Promise.all(m).then(function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(i)};Un.updateMap=function(e,t,r,i){var a=this,s=a.map,l=t[this.id];a.rejectOnError(i);var f=[],h=nG(l.style,t);JSON.stringify(a.styleObj)!==JSON.stringify(h)&&(a.styleObj=h,s.setStyle(h.style),a.traceHash={},f.push(new Promise(function(v){s.once("styledata",v)}))),f=f.concat(rG.fetchTraceGeoData(e)),Promise.all(f).then(function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(i)};Un.fillBelowLookup=function(e,t){var r=t[this.id],i=r.layers,a,s,l=this.belowLookup={},f=!1;for(a=0;a1)for(a=0;a-1&&Ppe(h.originalEvent,i,[r.xaxis],[r.yaxis],r.id,f),v.indexOf("event")>-1&&Xb.click(i,h.originalEvent)}}};Un.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(t.isStatic)return;function a(h){var v=t.map.unproject(h);return[v.lng,v.lat]}var s=e.dragmode,l;l=function(h,v){if(v.isRect){var m=h.range={};m[t.id]=[a([v.xmin,v.ymin]),a([v.xmax,v.ymax])]}else{var b=h.lassoPoints={};b[t.id]=v.map(a)}};var f=t.dragOptions;t.dragOptions=MA.extendDeep(f||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:l},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),kpe(s)||Spe(s)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(h,v,m){Cpe(h,v,m,t.dragOptions,s)},Mpe.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))};Un.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Un.updateLayers=function(e){var t=e[this.id],r=t.layers,i=this.layerList,a;if(r.length!==i.length){for(a=0;a{"use strict";var zpe=Bt(),Ipe=Di(),Rpe=Mb().defaults;lG.exports=function(t,r,i,a){var s=a.type,l=a.attributes,f=a.handleDefaults,h=a.partition||"x",v=r._subplots[s],m=v.length,b=m&&v[0].replace(/\d+$/,""),T,S;function C(F,N){return zpe.coerce(T,S,l,F,N)}for(var P=0;P{"use strict";var kA=Bt(),Fpe=uG(),qpe=Wl(),fG=a1();cG.exports=function(t,r,i){Fpe(t,r,i,{type:"mapbox",attributes:fG,handleDefaults:Npe,partition:"y",accessToken:r._mapboxAccessToken})};function Npe(e,t,r,i){r("accesstoken",i.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var a=r("bounds.west"),s=r("bounds.east"),l=r("bounds.south"),f=r("bounds.north");(a===void 0||s===void 0||l===void 0||f===void 0)&&delete t.bounds,qpe(e,t,{name:"layers",handleItemDefaults:Bpe}),t._input=e}function Bpe(e,t){function r(h,v){return kA.coerce(e,t,fG.layers,h,v)}var i=r("visible");if(i){var a=r("sourcetype"),s=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var l;s&&(l="raster");var f=r("type",l);s&&f!=="raster"&&(f=t.type="raster",kA.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),f==="circle"&&r("circle.radius"),f==="line"&&(r("line.width"),r("line.dash")),f==="fill"&&r("fill.outlinecolor"),f==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),kA.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var jb=de(Ws=>{"use strict";var vG=dA(),Ju=Bt(),CA=Ju.strTranslate,Ope=Ju.strScale,Upe=F_().getSubplotCalcData,Vpe=zh(),Hpe=ja(),dG=_i(),Gpe=co(),Zpe=sG(),av="mapbox",Hf=Ws.constants=zc();Ws.name=av;Ws.attr="subplot";Ws.idRoot=av;Ws.idRegex=Ws.attrRegex=Ju.counterRegex(av);var Ype=["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(" ");Ws.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Ws.layoutAttributes=a1();Ws.supplyLayoutDefaults=hG();var pG=!0;Ws.plot=function(t){pG&&(pG=!1,Ju.warn(Ype));var r=t._fullLayout,i=t.calcdata,a=r._subplots[av];if(vG.version!==Hf.requiredVersion)throw new Error(Hf.wrongVersionErrorMsg);var s=Wpe(t,a);vG.accessToken=s;for(var l=0;lI/2){var F=S.split("|").join("
");P.text(F).attr("data-unformatted",F).call(Gpe.convertToTspans,e),E=dG.bBox(P.node())}P.attr("transform",CA(-3,-E.height+8)),C.insert("rect",".static-attribution").attr({x:-E.width-6,y:-E.height-3,width:E.width+6,height:E.height+3,fill:"rgba(255, 255, 255, 0.75)"});var N=1;E.width+6>I&&(N=I/(E.width+6));var z=[i.l+i.w*l.x[1],i.t+i.h*(1-l.y[0])];C.attr("transform",CA(z[0],z[1])+Ope(N))}};function Wpe(e,t){var r=e._fullLayout,i=e._context;if(i.mapboxAccessToken==="")return"";for(var a=[],s=[],l=!1,f=!1,h=0;h1&&Ju.warn(Hf.multipleTokensErrorMsg),a[0]):(s.length&&Ju.log(["Listed mapbox access token(s)",s.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function mG(e){return typeof e=="string"&&(Hf.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Ws.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[av],i=0;i{"use strict";var Ebe=["*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(" ");yG.exports={attributes:Pb(),supplyDefaults:KV(),colorbar:j6(),formatLabels:oA(),calc:iH(),plot:mH(),hoverPoints:qb().hoverPoints,eventData:xH(),selectPoints:wH(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:jb(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var xG=de((Pbe,_G)=>{"use strict";_G.exports=gG()});var EA=de((Dbe,TG)=>{"use strict";var Xpe=Hl().hovertemplateAttrs,nv=rA(),jpe=xc(),bG=ms(),Jpe=Af().defaultLine,iv=hn().extendFlat,wG=nv.marker.line;TG.exports=iv({locations:{valType:"data_array",editType:"calc"},locationmode:nv.locationmode,z:{valType:"data_array",editType:"calc"},geojson:iv({},nv.geojson,{}),featureidkey:nv.featureidkey,text:iv({},nv.text,{}),hovertext:iv({},nv.hovertext,{}),marker:{line:{color:iv({},wG.color,{dflt:Jpe}),width:iv({},wG.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:nv.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:nv.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:iv({},bG.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Xpe(),showlegend:iv({},bG.showlegend,{dflt:!1})},jpe("",{cLetter:"z",editTypeOverride:"calc"}))});var LA=de((zbe,AG)=>{"use strict";var Ic=EA(),Kpe=xc(),Qpe=Hl().hovertemplateAttrs,$pe=ms(),ov=hn().extendFlat;AG.exports=ov({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:ov({},Ic.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Ic.text,hovertext:Ic.hovertext,marker:{line:{color:ov({},Ic.marker.line.color,{editType:"plot"}),width:ov({},Ic.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:ov({},Ic.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:ov({},Ic.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:ov({},Ic.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Ic.hoverinfo,hovertemplate:Qpe({},{keys:["properties"]}),showlegend:ov({},$pe.showlegend,{dflt:!1})},Kpe("",{cLetter:"z",editTypeOverride:"calc"}))});var SG=de((Ibe,MG)=>{"use strict";var u1=Bt(),e0e=hd(),t0e=LA();MG.exports=function(t,r,i,a){function s(m,b){return u1.coerce(t,r,t0e,m,b)}var l=s("locations"),f=s("z"),h=s("geojson");if(!u1.isArrayOrTypedArray(l)||!l.length||!u1.isArrayOrTypedArray(f)||!f.length||!(typeof h=="string"&&h!==""||u1.isPlainObject(h))){r.visible=!1;return}s("featureidkey"),r._length=Math.min(l.length,f.length),s("below"),s("text"),s("hovertext"),s("hovertemplate");var v=s("marker.line.width");v&&s("marker.line.color"),s("marker.opacity"),e0e(t,r,a,s,{prefix:"",cLetter:"z"}),u1.coerceSelectionMarkerOpacity(r,s)}});var PA=de((Rbe,kG)=>{"use strict";kG.exports={min:"zmin",max:"zmax"}});var PG=de((Fbe,LG)=>{"use strict";var CG=Da(),r0e=Hi().BADNUM,a0e=Hy(),i0e=Ng(),n0e=Gx();function EG(e){return e&&typeof e=="string"}LG.exports=function(t,r){var i=r._length,a=new Array(i),s;r.geojson?s=function(m){return EG(m)||CG(m)}:s=EG;for(var l=0;l{"use strict";var o0e=Da(),Rc=Bt(),s0e=L0(),l0e=_i(),u0e=Db().makeBlank,DG=TA();function f0e(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,i={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},s=t._opts={fill:i,line:a,geojson:u0e()};if(!r)return s;var l=DG.extractTraceFeature(e);if(!l)return s;var f=s0e.makeColorScaleFuncFromTrace(t),h=t.marker,v=h.line||{},m;Rc.isArrayOrTypedArray(h.opacity)&&(m=function(F){var N=F.mo;return o0e(N)?+Rc.constrain(N,0,1):0});var b;Rc.isArrayOrTypedArray(v.color)&&(b=function(F){return F.mlc});var T;Rc.isArrayOrTypedArray(v.width)&&(T=function(F){return F.mlw});for(var S=0;S{"use strict";var FG=DA().convert,c0e=DA().convertOnSelect,RG=zc().traceLayerPrefix;function qG(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",RG+t+"-fill"],["line",RG+t+"-line"]],this.below=null}var wm=qG.prototype;wm.update=function(e){this._update(FG(e)),e[0].trace._glTrace=this};wm.updateOnSelect=function(e){this._update(c0e(e))};wm._update=function(e){var t=this.subplot,r=this.layerList,i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(e,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};wm.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};NG.exports=function(t,r){var i=r[0].trace,a=new qG(t,i.uid),s=a.sourceId,l=FG(r),f=a.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(s,{type:"geojson",data:l.geojson}),a._addLayers(l,f),r[0].trace._glTrace=a,a}});var UG=de((Bbe,OG)=>{"use strict";var h0e=Yi(),v0e=EA(),d0e=Bt().fillText;OG.exports=function(t,r,i){var a=t.cd,s=a[0].trace,l=t.subplot,f,h,v,m,b=[r,i],T=[r+360,i];for(h=0;h")}}});var HG=de((Obe,VG)=>{"use strict";VG.exports=function(t,r,i,a,s){t.location=r.location,t.z=r.z;var l=a[s];return l.fIn&&l.fIn.properties&&(t.properties=l.fIn.properties),t.ct=l.ct,t}});var ZG=de((Ube,GG)=>{"use strict";GG.exports=function(t,r){var i=t.cd,a=t.xaxis,s=t.yaxis,l=[],f,h,v,m,b;if(r===!1)for(f=0;f{"use strict";var Vbe=["*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(" ");YG.exports={attributes:LA(),supplyDefaults:SG(),colorbar:PA(),calc:PG(),plot:BG(),hoverPoints:UG(),eventData:HG(),selectPoints:ZG(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var a=r[i].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var s=i+1;s{"use strict";XG.exports=WG()});var IA=de((Zbe,KG)=>{"use strict";var m0e=xc(),y0e=Hl().hovertemplateAttrs,JG=ms(),Jb=Pb(),zA=hn().extendFlat;KG.exports=zA({lon:Jb.lon,lat:Jb.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:Jb.text,hovertext:Jb.hovertext,hoverinfo:zA({},JG.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:y0e(),showlegend:zA({},JG.showlegend,{dflt:!1})},m0e("",{cLetter:"z",editTypeOverride:"calc"}))});var $G=de((Ybe,QG)=>{"use strict";var g0e=Bt(),_0e=hd(),x0e=IA();QG.exports=function(t,r,i,a){function s(v,m){return g0e.coerce(t,r,x0e,v,m)}var l=s("lon")||[],f=s("lat")||[],h=Math.min(l.length,f.length);if(!h){r.visible=!1;return}r._length=h,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),_0e(t,r,a,s,{prefix:"",cLetter:"z"})}});var rZ=de((Wbe,tZ)=>{"use strict";var RA=Da(),b0e=Bt().isArrayOrTypedArray,FA=Hi().BADNUM,w0e=Hy(),eZ=Bt()._;tZ.exports=function(t,r){for(var i=r._length,a=new Array(i),s=r.z,l=b0e(s)&&s.length,f=0;f{"use strict";var T0e=Da(),qA=Bt(),aZ=Ua(),iZ=L0(),nZ=Hi().BADNUM,A0e=Db().makeBlank;oZ.exports=function(t){var r=t[0].trace,i=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},s=r._opts={heatmap:a,geojson:A0e()};if(!i)return s;var l=[],f,h=r.z,v=r.radius,m=qA.isArrayOrTypedArray(h)&&h.length,b=qA.isArrayOrTypedArray(v);for(f=0;f0?+v[f]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:C})}}var E=iZ.extractOpts(r),I=E.reversescale?iZ.flipScale(E.colorscale):E.colorscale,F=I[0][1],N=aZ.opacity(F)<1?F:aZ.addOpacity(F,0),z=["interpolate",["linear"],["heatmap-density"],0,N];for(f=1;f{"use strict";var lZ=sZ(),M0e=zc().traceLayerPrefix;function uZ(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",M0e+t+"-heatmap"]],this.below=null}var Kb=uZ.prototype;Kb.update=function(e){var t=this.subplot,r=this.layerList,i=lZ(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(i,a),this.below=a);for(var s=0;s=0;r--)e.removeLayer(t[r][1])};Kb.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};fZ.exports=function(t,r){var i=r[0].trace,a=new uZ(t,i.uid),s=a.sourceId,l=lZ(r),f=a.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(s,{type:"geojson",data:l.geojson}),a._addLayers(l,f),a}});var vZ=de((Jbe,hZ)=>{"use strict";var S0e=Yi(),k0e=qb().hoverPoints,C0e=qb().getExtraText;hZ.exports=function(t,r,i){var a=k0e(t,r,i);if(a){var s=a[0],l=s.cd,f=l[0].trace,h=l[s.index];if(delete s.color,"z"in h){var v=s.subplot.mockAxis;s.z=h.z,s.zLabel=S0e.tickText(v,v.c2l(h.z),"hover").text}return s.extraText=C0e(f,h,l[0].t.labels),[s]}}});var pZ=de((Kbe,dZ)=>{"use strict";dZ.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var yZ=de(($be,mZ)=>{"use strict";var Qbe=["*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(" ");mZ.exports={attributes:IA(),supplyDefaults:$G(),colorbar:PA(),formatLabels:oA(),calc:rZ(),plot:cZ(),hoverPoints:vZ(),eventData:pZ(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;i{"use strict";gZ.exports=yZ()});var Uo=de((t3e,bZ)=>{"use strict";var xZ=Object.getOwnPropertySymbols,E0e=Object.prototype.hasOwnProperty,L0e=Object.prototype.propertyIsEnumerable;function P0e(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function D0e(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(s){return t[s]});if(i.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(s){a[s]=s}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(s){return!1}}bZ.exports=D0e()?Object.assign:function(e,t){for(var r,i=P0e(e),a,s=1;s{var $b=Uo();function wZ(){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={}}$b(wZ.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,a){return i=(e!=null&&e.year?e.calendar():typeof i=="string"?this.instance(i,a):i)||this.instance(),i.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",a=0;r>0;){var s=r%10;i=(s===0?"":e[s]+t[a])+i,a++,r=Math.floor(r/10)}return i.indexOf(e[1]+t[1])===0&&(i=i.substr(1)),i||e[0]}}});function NA(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function Qb(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}$b(NA.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(Ca.local.invalidDate||Ca.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(Ca.local.differentCalendars||Ca.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?"-":"")+Qb(Math.abs(this.year()),4)+"-"+Qb(this.month(),2)+"-"+Qb(this.day(),2)}});function BA(){this.shortYearCutoff="+10"}$b(BA.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new NA(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ca.local.invalidYear||Ca.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,Ca.local.invalidYear||Ca.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+Qb(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ca.local.invalidYear||Ca.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Ca.local.invalidMonth||Ca.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,Ca.local.invalidMonth||Ca.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ca.local.invalidYear||Ca.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var i=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(i);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var s=e.year()+(r==="y"?t:0),l=e.monthOfYear()+(r==="m"?t:0),a=e.day(),f=function(m){for(;lb-1+m.minMonth;)s++,l-=b,b=m.monthsInYear(s)};r==="y"?(e.month()!==this.fromMonthOfYear(s,l)&&(l=this.newDate(s,e.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(s)),a=Math.min(a,this.daysInMonth(s,this.fromMonthOfYear(s,l)))):r==="m"&&(f(this),a=Math.min(a,this.daysInMonth(s,this.fromMonthOfYear(s,l))));var h=[s,this.fromMonthOfYear(s,l),a];return this._validateLevel--,h}catch(v){throw this._validateLevel--,v}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],s=r<0?-1:1;t=this._add(e,r*a[0]+s*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate);var i=r==="y"?t:e.year(),a=r==="m"?t:e.month(),s=r==="d"?t:e.day();return(r==="y"||r==="m")&&(s=Math.min(s,this.daysInMonth(i,a))),e.date(i,a,s)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||e!==0;if(i){var a=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),v=a-(h>2.5?4716:4715);return v<=0&&v--,this.newDate(v,h,f)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,Ca.local.invalidDate||Ca.regionalOptions[""].invalidDate),a=new Date(i.year(),i.month()-1,i.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Ca=TZ.exports=new wZ;Ca.cdate=NA;Ca.baseCalendar=BA;Ca.calendars.gregorian=OA});var AZ=de(()=>{var UA=Uo(),po=Vo();UA(po.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"});po.local=po.regionalOptions[""];UA(po.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});UA(po.baseCalendar.prototype,{UNIX_EPOCH:po.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:po.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 po.local.invalidFormat||po.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var i=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,s=r.monthNumbers||this.local.monthNumbers,l=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,h=r.calculateWeek||this.local.calculateWeek,v=function(z,O){for(var H=1;N+H1},m=function(z,O,H,V){var W=""+O;if(v(z,V))for(;W.length1},F=function(ne,fe){var ve=I(ne,fe),Ce=[2,3,ve?4:2,ve?4:2,10,11,20]["oyYJ@!".indexOf(ne)+1],Se=new RegExp("^-?\\d{1,"+Ce+"}"),Te=t.substring(W).match(Se);if(!Te)throw(po.local.missingNumberAt||po.regionalOptions[""].missingNumberAt).replace(/\{0\}/,W);return W+=Te[0].length,parseInt(Te[0],10)},N=this,z=function(){if(typeof f=="function"){I("m");var ne=f.call(N,t.substring(W));return W+=ne.length,ne}return F("m")},O=function(ne,fe,ve,Ce){for(var Se=I(ne,Ce)?ve:fe,Te=0;Te-1){T=1,S=C;for(var oe=this.daysInMonth(b,T);S>oe;oe=this.daysInMonth(b,T))T++,S-=oe}return m>-1?this.fromJD(m):this.newDate(b,T,S)},determineDate:function(e,t,r,i,a){r&&typeof r!="object"&&(a=i,i=r,r=null),typeof i!="string"&&(a=i,i="");var s=this,l=function(f){try{return s.parseDate(i,f,a)}catch(b){}f=f.toLowerCase();for(var h=(f.match(/^c/)&&r?r.newDate():null)||s.today(),v=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,m=v.exec(f);m;)h.add(parseInt(m[1],10),m[2]||"d"),m=v.exec(f);return h};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?l(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:s.today().add(e,"d"):s.newDate(e),e}})});var MZ=de(()=>{var sv=Vo(),z0e=Uo(),VA=sv.instance();function e3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}e3.prototype=new sv.baseCalendar;z0e(e3.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(R0e);return r?r[0]:""}var i=this._validateYear(e),a=e.month(),s=""+this.toChineseMonth(i,a);return t&&s.length<2&&(s="0"+s),this.isIntercalaryMonth(i,a)&&(s+="i"),s},monthNames:function(e){if(typeof e=="string"){var t=e.match(F0e);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),a=this.toChineseMonth(r,i),s=["\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"][a-1];return this.isIntercalaryMonth(r,i)&&(s="\u95F0"+s),s},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(q0e);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),a=this.toChineseMonth(r,i),s=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,i)&&(s="\u95F0"+s),s},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),i;if(isNaN(r))t[0]==="\u95F0"&&(i=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];i=a==="i"||a==="I"}var s=this.toMonthIndex(e,r,i);return s},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var i=this.intercalaryMonth(e),a=r&&t!==i;if(a||t<1||t>12)throw sv.local.invalidMonth.replace(/\{0\}/,this.local.name);var s;return i?!r&&t<=i?s=t-1:s=t:s=t-1,s},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),i=r?12:11;if(t<0||t>i)throw sv.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var i=this._validateYear(e,sv.local.invalidyear),a=uv[i-uv[0]],s=a>>9&4095,l=a>>5&15,f=a&31,h;h=VA.newDate(s,l,f),h.add(4-(h.dayOfWeek()||7),"d");var v=this.toJD(e,t,r)-h.toJD();return 1+Math.floor(v/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=lv[e-lv[0]],i=r>>13,a=i?12:11;if(t>a)throw sv.local.invalidMonth.replace(/\{0\}/,this.local.name);var s=r&1<<12-t?30:29;return s},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,s,r,sv.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),r=i.day();var a=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=B0e(e,s,r,a);return VA.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=VA.fromJD(e),r=N0e(t.year(),t.month(),t.day()),i=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,i,r.day)},fromString:function(e){var t=e.match(I0e),r=this._validateYear(+t[1]),i=+t[2],a=!!t[3],s=this.toMonthIndex(r,i,a),l=+t[4];return this.newDate(r,s,l)},add:function(e,t,r){var i=e.year(),a=e.month(),s=this.isIntercalaryMonth(i,a),l=this.toChineseMonth(i,a),f=Object.getPrototypeOf(e3.prototype).add.call(this,e,t,r);if(r==="y"){var h=f.year(),v=f.month(),m=this.isIntercalaryMonth(h,l),b=s&&m?this.toMonthIndex(h,l,!0):this.toMonthIndex(h,l,!1);b!==v&&f.month(b)}return f}});var I0e=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,R0e=/^\d?\d[iI]?/m,F0e=/^闰?十?[一二三四五六七八九]?月/m,q0e=/^闰?十?[一二三四五六七八九]?/m;sv.calendars.chinese=e3;var lv=[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],uv=[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 N0e(e,t,r,i){var a,s;if(typeof e=="object")a=e,s=t||{};else{var l=typeof e=="number"&&e>=1888&&e<=2111;if(!l)throw new Error("Solar year outside range 1888-2111");var f=typeof t=="number"&&t>=1&&t<=12;if(!f)throw new Error("Solar month outside range 1 - 12");var h=typeof r=="number"&&r>=1&&r<=31;if(!h)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},s=i||{}}var v=uv[a.year-uv[0]],m=a.year<<9|a.month<<5|a.day;s.year=m>=v?a.year:a.year-1,v=uv[s.year-uv[0]];var b=v>>9&4095,T=v>>5&15,S=v&31,C,P=new Date(b,T-1,S),E=new Date(a.year,a.month-1,a.day);C=Math.round((E-P)/(24*3600*1e3));var I=lv[s.year-lv[0]],F;for(F=0;F<13;F++){var N=I&1<<12-F?30:29;if(C>13;return!z||F=1888&&e<=2111;if(!f)throw new Error("Lunar year outside range 1888-2111");var h=typeof t=="number"&&t>=1&&t<=12;if(!h)throw new Error("Lunar month outside range 1 - 12");var v=typeof r=="number"&&r>=1&&r<=30;if(!v)throw new Error("Lunar day outside range 1 - 30");var m;typeof i=="object"?(m=!1,s=i):(m=!!i,s=a||{}),l={year:e,month:t,day:r,isIntercalary:m}}var b;b=l.day-1;var T=lv[l.year-lv[0]],S=T>>13,C;S&&(l.month>S||l.isIntercalary)?C=l.month:C=l.month-1;for(var P=0;P>9&4095,N=I>>5&15,z=I&31,O=new Date(F,N-1,z+b);return s.year=O.getFullYear(),s.month=1+O.getMonth(),s.day=O.getDate(),s}});var SZ=de(()=>{var Zd=Vo(),O0e=Uo();function HA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}HA.prototype=new Zd.baseCalendar;O0e(HA.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,Zd.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,Zd.local.invalidYear||Zd.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Zd.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,Zd.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,a=t-(i-1)*30+1;return this.newDate(r,i,a)}});Zd.calendars.coptic=HA});var kZ=de(()=>{var Fc=Vo(),U0e=Uo();function GA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}GA.prototype=new Fc.baseCalendar;U0e(GA.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,Fc.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fc.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Fc.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Fc.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,Fc.local.invalidDate);return(i.day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,Fc.local.invalidDate);return{century:V0e[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,r){var i=this._validate(e,t,r,Fc.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),r=i.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var V0e={20:"Fruitbat",21:"Anchovy"};Fc.calendars.discworld=GA});var CZ=de(()=>{var Yd=Vo(),H0e=Uo();function ZA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}ZA.prototype=new Yd.baseCalendar;H0e(ZA.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,Yd.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,Yd.local.invalidYear||Yd.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Yd.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,Yd.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,a=t-(i-1)*30+1;return this.newDate(r,i,a)}});Yd.calendars.ethiopian=ZA});var EZ=de(()=>{var fv=Vo(),G0e=Uo();function YA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}YA.prototype=new fv.baseCalendar;G0e(YA.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,fv.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,t3(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fv.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fv.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,fv.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&t3(this.daysInYear(e),10)===5?30:t===9&&t3(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,fv.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,r){var i=this._validate(e,t,r,fv.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=e<=0?e+1:e,s=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)s+=this.daysInMonth(e,l);for(var l=1;l=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});function t3(e,t){return e-t*Math.floor(e/t)}fv.calendars.hebrew=YA});var LZ=de(()=>{var f1=Vo(),Z0e=Uo();function WA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}WA.prototype=new f1.baseCalendar;Z0e(WA.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,f1.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,f1.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,f1.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});f1.calendars.islamic=WA});var PZ=de(()=>{var c1=Vo(),Y0e=Uo();function XA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}XA.prototype=new c1.baseCalendar;Y0e(XA.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,c1.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,c1.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,c1.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,i=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*i),s=Math.floor((r-a)/30.6001),l=s-Math.floor(s<14?1:13),f=i-Math.floor(l>2?4716:4715),h=r-a-Math.floor(30.6001*s);return f<=0&&f--,this.newDate(f,l,h)}});c1.calendars.julian=XA});var zZ=de(()=>{var cu=Vo(),W0e=Uo();function JA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}JA.prototype=new cu.baseCalendar;W0e(JA.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,cu.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,cu.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var i=Math.floor(e/20);return r+"."+i+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&i<0)throw"Invalid Mayan year";t=t*20+i}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cu.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,cu.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cu.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,cu.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,cu.local.invalidDate);return i.day()},weekDay:function(e,t,r){return this._validate(e,t,r,cu.local.invalidDate),!0},extraInfo:function(e,t,r){var i=this._validate(e,t,r,cu.local.invalidDate),a=i.toJD(),s=this._toHaab(a),l=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[s[0]-1],haabMonth:s[0],haabDay:s[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=jA(e+8+17*20,365);return[Math.floor(t/20)+1,jA(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[DZ(e+20,20),DZ(e+4,13)]},toJD:function(e,t,r){var i=this._validate(e,t,r,cu.local.invalidDate);return i.day()+i.month()*20+i.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),i=e%20;return this.newDate(t,r,i)}});function jA(e,t){return e-t*Math.floor(e/t)}function DZ(e,t){return jA(e-1,t)+1}cu.calendars.mayan=JA});var RZ=de(()=>{var Wd=Vo(),X0e=Uo();function KA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}KA.prototype=new Wd.baseCalendar;var IZ=Wd.instance("gregorian");X0e(KA.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,Wd.local.invalidYear||Wd.regionalOptions[""].invalidYear);return IZ.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Wd.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(a,t,r){var i=this._validate(a,t,r,Wd.local.invalidMonth),a=i.year();a<0&&a++;for(var s=i.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}});Wd.calendars.nanakshahi=KA});var FZ=de(()=>{var Xd=Vo(),j0e=Uo();function QA(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QA.prototype=new Xd.baseCalendar;j0e(QA.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xd.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[e][i];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Xd.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var i=this._validate(e,t,r,Xd.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=Xd.instance(),s=0,l=t,f=e;this._createMissingCalendarData(e);var h=e-(l>9||l===9&&r>=this.NEPALI_CALENDAR_DATA[f][0]?56:57);for(t!==9&&(s=r,l--);l!==9;)l<=0&&(l=12,f--),s+=this.NEPALI_CALENDAR_DATA[f][l],l--;return t===9?(s+=r-this.NEPALI_CALENDAR_DATA[f][0],s<0&&(s+=a.daysInYear(h))):s+=this.NEPALI_CALENDAR_DATA[f][9]-this.NEPALI_CALENDAR_DATA[f][0],a.newDate(h,1,1).add(s,"d").toJD()},fromJD:function(e){var t=Xd.instance(),r=t.fromJD(e),i=r.year(),a=r.dayOfYear(),s=i+56;this._createMissingCalendarData(s);for(var l=9,f=this.NEPALI_CALENDAR_DATA[s][0],h=this.NEPALI_CALENDAR_DATA[s][l]-f+1;a>h;)l++,l>12&&(l=1,s++),h+=this.NEPALI_CALENDAR_DATA[s][l];var v=this.NEPALI_CALENDAR_DATA[s][l]-(h-a);return this.newDate(s,l,v)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var Tm=Vo(),J0e=Uo();function r3(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r3.prototype=new Tm.baseCalendar;J0e(r3.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,Tm.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tm.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,Tm.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var a=e-(e>=0?474:473),s=474+$A(a,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((s*682-110)/2816)+(s-1)*365+Math.floor(a/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),i=$A(t,1029983),a=2820;if(i!==1029982){var s=Math.floor(i/366),l=$A(i,366);a=Math.floor((2134*s+2816*l+2815)/1028522)+s+1}var f=a+2820*r+474;f=f<=0?f-1:f;var h=e-this.toJD(f,1,1)+1,v=h<=186?Math.ceil(h/31):Math.ceil((h-6)/30),m=e-this.toJD(f,v,1)+1;return this.newDate(f,v,m)}});function $A(e,t){return e-t*Math.floor(e/t)}Tm.calendars.persian=r3;Tm.calendars.jalali=r3});var NZ=de(()=>{var jd=Vo(),K0e=Uo(),a3=jd.instance();function eM(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eM.prototype=new jd.baseCalendar;K0e(eM.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,jd.local.invalidYear),r=this._t2gYear(t.year());return a3.leapYear(r)},weekOfYear:function(a,t,r){var i=this._validate(a,this.minMonth,this.minDay,jd.local.invalidYear),a=this._t2gYear(i.year());return a3.weekOfYear(a,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,jd.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(a,t,r){var i=this._validate(a,t,r,jd.local.invalidDate),a=this._t2gYear(i.year());return a3.toJD(a,i.month(),i.day())},fromJD:function(e){var t=a3.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)}});jd.calendars.taiwan=eM});var BZ=de(()=>{var Jd=Vo(),Q0e=Uo(),i3=Jd.instance();function tM(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tM.prototype=new Jd.baseCalendar;Q0e(tM.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,Jd.local.invalidYear),r=this._t2gYear(t.year());return i3.leapYear(r)},weekOfYear:function(a,t,r){var i=this._validate(a,this.minMonth,this.minDay,Jd.local.invalidYear),a=this._t2gYear(i.year());return i3.weekOfYear(a,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Jd.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(a,t,r){var i=this._validate(a,t,r,Jd.local.invalidDate),a=this._t2gYear(i.year());return i3.toJD(a,i.month(),i.day())},fromJD:function(e){var t=i3.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)}});Jd.calendars.thai=tM});var OZ=de(()=>{var Kd=Vo(),$0e=Uo();function rM(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rM.prototype=new Kd.baseCalendar;$0e(rM.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,Kd.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,Kd.local.invalidMonth),i=r.toJD()-24e5+.5,a=0,s=0;si)return cv[a]-cv[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,Kd.local.invalidDate),a=12*(i.year()-1)+i.month()-15292,s=i.day()+cv[a-1]-1;return s+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var a=r+15292,s=Math.floor((a-1)/12),l=s+1,f=a-12*s,h=t-cv[r-1]+1;return this.newDate(l,f,h)},isValid:function(e,t,r){var i=Kd.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(e=e.year!=null?e.year:e,i=e>=1276&&e<=1500),i},_validate:function(e,t,r,i){var a=Kd.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}});Kd.calendars.ummalqura=rM;var cv=[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 VZ=de((z3e,UZ)=>{"use strict";UZ.exports=Vo();AZ();MZ();SZ();kZ();CZ();EZ();LZ();PZ();zZ();RZ();FZ();qZ();NZ();BZ();OZ()});var jZ=de((I3e,XZ)=>{"use strict";var GZ=VZ(),h1=Bt(),ZZ=Hi(),eme=ZZ.EPOCHJD,tme=ZZ.ONEDAY,nM={valType:"enumerated",values:h1.sortObjectKeys(GZ.calendars),editType:"calc",dflt:"gregorian"},YZ=function(e,t,r,i){var a={};return a[r]=nM,h1.coerce(e,t,a,r,i)},rme=function(e,t,r,i){for(var a=0;a{"use strict";JZ.exports=jZ()});var lme=de((F3e,$Z)=>{var QZ=LV();QZ.register([xG(),jG(),_Z(),KZ()]);$Z.exports=QZ});return lme();})(); /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/dist/plotly-strict.js b/dist/plotly-strict.js index 120019f3af6..9cb2ac35271 100644 --- a/dist/plotly-strict.js +++ b/dist/plotly-strict.js @@ -13731,7 +13731,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13755,10 +13755,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54128,8 +54128,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54142,18 +54148,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly-strict.min.js b/dist/plotly-strict.min.js index b709a61fb5f..f202bd4e9ac 100644 --- a/dist/plotly-strict.min.js +++ b/dist/plotly-strict.min.js @@ -12,14 +12,14 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var $C=Object.defineProperty,wet=Object.defineProperties,Tet=Object.getOwnPropertyDescriptor,Aet=Object.getOwnPropertyDescriptors,Met=Object.getOwnPropertyNames,nee=Object.getOwnPropertySymbols;var oee=Object.prototype.hasOwnProperty,Eet=Object.prototype.propertyIsEnumerable;var aee=(e,t,r)=>t in e?$C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,see=(e,t)=>{for(var r in t||(t={}))oee.call(t,r)&&aee(e,r,t[r]);if(nee)for(var r of nee(t))Eet.call(t,r)&&aee(e,r,t[r]);return e},lee=(e,t)=>wet(e,Aet(t));var Qf=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ket=(e,t)=>{for(var r in t)$C(e,r,{get:t[r],enumerable:!0})},Cet=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Met(t))!oee.call(e,i)&&i!==r&&$C(e,i,{get:()=>t[i],enumerable:!(n=Tet(t,i))||n.enumerable});return e};var ab=e=>Cet($C({},"__esModule",{value:!0}),e);var QC=Se(uee=>{"use strict";uee.version="3.0.0-rc.0"});var cee=Se((fee,eL)=>{(function(t,r,n){r[t]=r[t]||n(),typeof eL!="undefined"&&eL.exports?eL.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:fee,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(E){return setImmediate(E)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(E,k,A,L){return Object.defineProperty(E,k,{value:A,writable:!0,configurable:L!==!1})}}catch(y){t=function(k,A,L){return k[A]=L,k}}n=function(){var E,k,A;function L(_,C){this.fn=_,this.self=C,this.next=void 0}return{add:function(C,M){A=new L(C,M),k?k.next=A:E=A,k=A,A=void 0},drain:function(){var C=E;for(E=k=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(y,E){n.add(y,E),r||(r=a(n.drain))}function s(y){var E,k=typeof y;return y!=null&&(k=="object"||k=="function")&&(E=y.then),typeof E=="function"?E:!1}function u(){for(var y=0;y0&&o(u,k))}catch(A){c.call(new d(k),A)}}}function c(y){var E=this;E.triggered||(E.triggered=!0,E.def&&(E=E.def),E.msg=y,E.state=2,E.chain.length>0&&o(u,E))}function h(y,E,k,A){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 Le=se.length,We=new Array(Le);Le--;)We[Le]=se[Le];return We}}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,u=o.setAttributeNS,l=this.CSSStyleDeclaration.prototype,f=l.setProperty;o.setAttribute=function(se,Le){s.call(this,se,Le+"")},o.setAttributeNS=function(se,Le,We){u.call(this,se,Le,We+"")},l.setProperty=function(se,Le,We){f.call(this,se,Le+"",We)}}e.ascending=c;function c(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 Le=-1,We=X.length,Ye,it;if(arguments.length===1){for(;++Le=it){Ye=it;break}for(;++Leit&&(Ye=it)}else{for(;++Le=it){Ye=it;break}for(;++Leit&&(Ye=it)}return Ye},e.max=function(X,se){var Le=-1,We=X.length,Ye,it;if(arguments.length===1){for(;++Le=it){Ye=it;break}for(;++LeYe&&(Ye=it)}else{for(;++Le=it){Ye=it;break}for(;++LeYe&&(Ye=it)}return Ye},e.extent=function(X,se){var Le=-1,We=X.length,Ye,it,Nt;if(arguments.length===1){for(;++Le=it){Ye=Nt=it;break}for(;++Leit&&(Ye=it),Nt=it){Ye=Nt=it;break}for(;++Leit&&(Ye=it),Nt1)return Nt/(er-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function p(X){return{left:function(se,Le,We,Ye){for(arguments.length<3&&(We=0),arguments.length<4&&(Ye=se.length);We>>1;X(se[it],Le)<0?We=it+1:Ye=it}return We},right:function(se,Le,We,Ye){for(arguments.length<3&&(We=0),arguments.length<4&&(Ye=se.length);We>>1;X(se[it],Le)>0?Ye=it:We=it+1}return We}}}var x=p(c);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(X){return p(X.length===1?function(se,Le){return c(X(se),Le)}:X)},e.shuffle=function(X,se,Le){(We=arguments.length)<3&&(Le=X.length,We<2&&(se=0));for(var We=Le-se,Ye,it;We;)it=Math.random()*We--|0,Ye=X[We+se],X[We+se]=X[it+se],X[it+se]=Ye;return X},e.permute=function(X,se){for(var Le=se.length,We=new Array(Le);Le--;)We[Le]=X[se[Le]];return We},e.pairs=function(X){for(var se=0,Le=X.length-1,We,Ye=X[0],it=new Array(Le<0?0:Le);se=0;)for(Nt=X[se],Le=Nt.length;--Le>=0;)it[--Ye]=Nt[Le];return it};var y=Math.abs;e.range=function(X,se,Le){if(arguments.length<3&&(Le=1,arguments.length<2&&(se=X,X=0)),(se-X)/Le===1/0)throw new Error("infinite range");var We=[],Ye=E(y(Le)),it=-1,Nt;if(X*=Ye,se*=Ye,Le*=Ye,Le<0)for(;(Nt=X+Le*++it)>se;)We.push(Nt/Ye);else for(;(Nt=X+Le*++it)=se.length)return Ye?Ye.call(X,er):We?er.sort(We):er;for(var wr=-1,ni=er.length,Wr=se[_r++],Ci,Ji,ai,Ti=new A,Bi;++wr=se.length)return mt;var _r=[],wr=Le[er++];return mt.forEach(function(ni,Wr){_r.push({key:ni,values:Nt(Wr,er)})}),wr?_r.sort(function(ni,Wr){return wr(ni.key,Wr.key)}):_r}return X.map=function(mt,er){return it(er,mt,0)},X.entries=function(mt){return Nt(it(e.map,mt,0),0)},X.key=function(mt){return se.push(mt),X},X.sortKeys=function(mt){return Le[se.length-1]=mt,X},X.sortValues=function(mt){return We=mt,X},X.rollup=function(mt){return Ye=mt,X},X},e.set=function(X){var se=new U;if(X)for(var Le=0,We=X.length;Le=0&&(We=X.slice(Le+1),X=X.slice(0,Le)),X)return arguments.length<2?this[X].on(We):this[X].on(We,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(We,null);return this}};function ne(X){var se=[],Le=new A;function We(){for(var Ye=se,it=-1,Nt=Ye.length,mt;++it=0&&(Le=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),Ze.hasOwnProperty(Le)?{space:Ze[Le],local:X}:X}},Re.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Le=this.node();return X=e.ns.qualify(X),X.local?Le.getAttributeNS(X.space,X.local):Le.getAttribute(X)}for(se in X)this.each(et(se,X[se]));return this}return this.each(et(X,se))};function et(X,se){X=e.ns.qualify(X);function Le(){this.removeAttribute(X)}function We(){this.removeAttributeNS(X.space,X.local)}function Ye(){this.setAttribute(X,se)}function it(){this.setAttributeNS(X.space,X.local,se)}function Nt(){var er=se.apply(this,arguments);er==null?this.removeAttribute(X):this.setAttribute(X,er)}function mt(){var er=se.apply(this,arguments);er==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,er)}return se==null?X.local?We:Le:typeof se=="function"?X.local?mt:Nt:X.local?it:Ye}function gt(X){return X.trim().replace(/\s+/g," ")}Re.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Le=this.node(),We=(X=Qe(X)).length,Ye=-1;if(se=Le.classList){for(;++Ye=0;)(it=Le[We])&&(Ye&&Ye!==it.nextSibling&&Ye.parentNode.insertBefore(it,Ye),Ye=it);return this},Re.sort=function(X){X=nt.apply(this,arguments);for(var se=-1,Le=this.length;++se=se&&(se=Ye+1);!(er=Nt[se])&&++se0&&(X=X.slice(0,Ye));var Nt=Je.get(X);Nt&&(X=Nt,it=Vt);function mt(){var wr=this[We];wr&&(this.removeEventListener(X,wr,wr.$),delete this[We])}function er(){var wr=it(se,r(arguments));mt.call(this),this.addEventListener(X,this[We]=wr,wr.$=Le),wr._=se}function _r(){var wr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),ni;for(var Wr in this)if(ni=Wr.match(wr)){var Ci=this[Wr];this.removeEventListener(ni[1],Ci,Ci.$),delete this[Wr]}}return Ye?se?er:mt:se?W:_r}var Je=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Je.forEach(function(X){"on"+X in n&&Je.remove(X)});function Mt(X,se){return function(Le){var We=e.event;e.event=Le,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=We}}}function Vt(X,se){var Le=Mt(X,se);return function(We){var Ye=this,it=We.relatedTarget;(!it||it!==Ye&&!(it.compareDocumentPosition(Ye)&8))&&Le.call(Ye,We)}}var Kt,ir=0;function fr(X){var se=".dragsuppress-"+ ++ir,Le="click"+se,We=e.select(a(X)).on("touchmove"+se,be).on("dragstart"+se,be).on("selectstart"+se,be);if(Kt==null&&(Kt="onselectstart"in X?!1:G(X.style,"userSelect")),Kt){var Ye=i(X).style,it=Ye[Kt];Ye[Kt]="none"}return function(Nt){if(We.on(se,null),Kt&&(Ye[Kt]=it),Nt){var mt=function(){We.on(Le,null)};We.on(Le,function(){be(),mt()},!0),setTimeout(mt,0)}}}e.mouse=function(X){return De(X,ze())};var Ot=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function De(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Le=X.ownerSVGElement||X;if(Le.createSVGPoint){var We=Le.createSVGPoint();if(Ot<0){var Ye=a(X);if(Ye.scrollX||Ye.scrollY){Le=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var it=Le[0][0].getScreenCTM();Ot=!(it.f||it.e),Le.remove()}}return Ot?(We.x=se.pageX,We.y=se.pageY):(We.x=se.clientX,We.y=se.clientY),We=We.matrixTransform(X.getScreenCTM().inverse()),[We.x,We.y]}var Nt=X.getBoundingClientRect();return[se.clientX-Nt.left-X.clientLeft,se.clientY-Nt.top-X.clientTop]}e.touch=function(X,se,Le){if(arguments.length<3&&(Le=se,se=ze().changedTouches),se){for(var We=0,Ye=se.length,it;We0?1:X<0?-1:0}function St(X,se,Le){return(se[0]-X[0])*(Le[1]-X[1])-(se[1]-X[1])*(Le[0]-X[0])}function Zt(X){return X>1?0:X<-1?Ie:Math.acos(X)}function qr(X){return X>1?ue:X<-1?-ue:Math.asin(X)}function Lr(X){return((X=Math.exp(X))-1/X)/2}function vr(X){return((X=Math.exp(X))+1/X)/2}function Er(X){return((X=Math.exp(2*X))-1)/(X+1)}function si(X){return(X=Math.sin(X/2))*X}var Ei=Math.SQRT2,Si=2,xi=4;e.interpolateZoom=function(X,se){var Le=X[0],We=X[1],Ye=X[2],it=se[0],Nt=se[1],mt=se[2],er=it-Le,_r=Nt-We,wr=er*er+_r*_r,ni,Wr;if(wr0&&(qo=qo.transition().duration(Nt)),qo.call(Wi.event)}function vl(){Ti&&Ti.domain(ai.range().map(function(qo){return(qo-X.x)/X.k}).map(ai.invert)),en&&en.domain(Bi.range().map(function(qo){return(qo-X.y)/X.k}).map(Bi.invert))}function wl(qo){mt++||qo({type:"zoomstart"})}function au(qo){vl(),qo({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Al(qo){--mt||(qo({type:"zoomend"}),Le=null)}function nu(){var qo=this,Rl=Ji.of(qo,arguments),pu=0,xu=e.select(a(qo)).on(_r,xf).on(wr,hf),of=bi(e.mouse(qo)),ff=fr(qo);ys.call(qo),wl(Rl);function xf(){pu=1,Ko(e.mouse(qo),of),au(Rl)}function hf(){xu.on(_r,null).on(wr,null),ff(pu),Al(Rl)}}function Bu(){var qo=this,Rl=Ji.of(qo,arguments),pu={},xu=0,of,ff=".zoom-"+e.event.changedTouches[0].identifier,xf="touchmove"+ff,hf="touchend"+ff,dc=[],Gt=e.select(qo),jr=fr(qo);Mn(),wl(Rl),Gt.on(er,null).on(Wr,Mn);function _i(){var ha=e.touches(qo);return of=X.k,ha.forEach(function(Io){Io.identifier in pu&&(pu[Io.identifier]=bi(Io))}),ha}function Mn(){var ha=e.event.target;e.select(ha).on(xf,Ta).on(hf,fa),dc.push(ha);for(var Io=e.event.changedTouches,Vs=0,Hs=Io.length;Vs1){var Ps=is[0],qs=is[1],Do=Ps[0]-qs[0],kn=Ps[1]-qs[1];xu=Do*Do+kn*kn}}function Ta(){var ha=e.touches(qo),Io,Vs,Hs,is;ys.call(qo);for(var su=0,Ps=ha.length;su1?1:se,Le=Le<0?0:Le>1?1:Le,Ye=Le<=.5?Le*(1+se):Le+se-Le*se,We=2*Le-Ye;function it(mt){return mt>360?mt-=360:mt<0&&(mt+=360),mt<60?We+(Ye-We)*mt/60:mt<180?Ye:mt<240?We+(Ye-We)*(240-mt)/60:We}function Nt(mt){return Math.round(it(mt)*255)}return new ki(Nt(X+120),Nt(X),Nt(X-120))}e.hcl=Bt;function Bt(X,se,Le){return this instanceof Bt?(this.h=+X,this.c=+se,void(this.l=+Le)):arguments.length<2?X instanceof Bt?new Bt(X.h,X.c,X.l):X instanceof zr?Yr(X.l,X.a,X.b):Yr((X=Or((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new Bt(X,se,Le)}var sr=Bt.prototype=new Di;sr.brighter=function(X){return new Bt(this.h,this.c,Math.min(100,this.l+Tr*(arguments.length?X:1)))},sr.darker=function(X){return new Bt(this.h,this.c,Math.max(0,this.l-Tr*(arguments.length?X:1)))},sr.rgb=function(){return br(this.h,this.c,this.l).rgb()};function br(X,se,Le){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new zr(Le,Math.cos(X*=de)*se,Math.sin(X)*se)}e.lab=zr;function zr(X,se,Le){return this instanceof zr?(this.l=+X,this.a=+se,void(this.b=+Le)):arguments.length<2?X instanceof zr?new zr(X.l,X.a,X.b):X instanceof Bt?br(X.h,X.c,X.l):Or((X=ki(X)).r,X.g,X.b):new zr(X,se,Le)}var Tr=18,Rr=.95047,Br=1,oi=1.08883,vi=zr.prototype=new Di;vi.brighter=function(X){return new zr(Math.min(100,this.l+Tr*(arguments.length?X:1)),this.a,this.b)},vi.darker=function(X){return new zr(Math.max(0,this.l-Tr*(arguments.length?X:1)),this.a,this.b)},vi.rgb=function(){return Pi(this.l,this.a,this.b)};function Pi(X,se,Le){var We=(X+16)/116,Ye=We+se/500,it=We-Le/200;return Ye=Ni(Ye)*Rr,We=Ni(We)*Br,it=Ni(it)*oi,new ki(ti(3.2404542*Ye-1.5371385*We-.4985314*it),ti(-.969266*Ye+1.8760108*We+.041556*it),ti(.0556434*Ye-.2040259*We+1.0572252*it))}function Yr(X,se,Le){return X>0?new Bt(Math.atan2(Le,se)*ht,Math.sqrt(se*se+Le*Le),X):new Bt(NaN,NaN,X)}function Ni(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function Ur(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ti(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=ki;function ki(X,se,Le){return this instanceof ki?(this.r=~~X,this.g=~~se,void(this.b=~~Le)):arguments.length<2?X instanceof ki?new ki(X.r,X.g,X.b):sn(""+X,ki,Dt):new ki(X,se,Le)}function ji(X){return new ki(X>>16,X>>8&255,X&255)}function Vi(X){return ji(X)+""}var zi=ki.prototype=new Di;zi.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Le=this.g,We=this.b,Ye=30;return!se&&!Le&&!We?new ki(Ye,Ye,Ye):(se&&se>4,We=We>>4|We,Ye=er&240,Ye=Ye>>4|Ye,it=er&15,it=it<<4|it):X.length===7&&(We=(er&16711680)>>16,Ye=(er&65280)>>8,it=er&255)),se(We,Ye,it))}function fi(X,se,Le){var We=Math.min(X/=255,se/=255,Le/=255),Ye=Math.max(X,se,Le),it=Ye-We,Nt,mt,er=(Ye+We)/2;return it?(mt=er<.5?it/(Ye+We):it/(2-Ye-We),X==Ye?Nt=(se-Le)/it+(se0&&er<1?0:Nt),new Lt(Nt,mt,er)}function Or(X,se,Le){X=st(X),se=st(se),Le=st(Le);var We=Ur((.4124564*X+.3575761*se+.1804375*Le)/Rr),Ye=Ur((.2126729*X+.7151522*se+.072175*Le)/Br),it=Ur((.0193339*X+.119192*se+.9503041*Le)/oi);return zr(116*Ye-16,500*(We-Ye),200*(Ye-it))}function st(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Wt(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var tr=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});tr.forEach(function(X,se){tr.set(X,ji(se))});function or(X){return typeof X=="function"?X:function(){return X}}e.functor=or,e.xhr=Nr(H);function Nr(X){return function(se,Le,We){return arguments.length===2&&typeof Le=="function"&&(We=Le,Le=null),hi(se,Le,X,We)}}function hi(X,se,Le,We){var Ye={},it=e.dispatch("beforesend","progress","load","error"),Nt={},mt=new XMLHttpRequest,er=null;self.XDomainRequest&&!("withCredentials"in mt)&&/^(http(s)?:)?\/\//.test(X)&&(mt=new XDomainRequest),"onload"in mt?mt.onload=mt.onerror=_r:mt.onreadystatechange=function(){mt.readyState>3&&_r()};function _r(){var wr=mt.status,ni;if(!wr&&Qr(mt)||wr>=200&&wr<300||wr===304){try{ni=Le.call(Ye,mt)}catch(Wr){it.error.call(Ye,Wr);return}it.load.call(Ye,ni)}else it.error.call(Ye,mt)}return mt.onprogress=function(wr){var ni=e.event;e.event=wr;try{it.progress.call(Ye,mt)}finally{e.event=ni}},Ye.header=function(wr,ni){return wr=(wr+"").toLowerCase(),arguments.length<2?Nt[wr]:(ni==null?delete Nt[wr]:Nt[wr]=ni+"",Ye)},Ye.mimeType=function(wr){return arguments.length?(se=wr==null?null:wr+"",Ye):se},Ye.responseType=function(wr){return arguments.length?(er=wr,Ye):er},Ye.response=function(wr){return Le=wr,Ye},["get","post"].forEach(function(wr){Ye[wr]=function(){return Ye.send.apply(Ye,[wr].concat(r(arguments)))}}),Ye.send=function(wr,ni,Wr){if(arguments.length===2&&typeof ni=="function"&&(Wr=ni,ni=null),mt.open(wr,X,!0),se!=null&&!("accept"in Nt)&&(Nt.accept=se+",*/*"),mt.setRequestHeader)for(var Ci in Nt)mt.setRequestHeader(Ci,Nt[Ci]);return se!=null&&mt.overrideMimeType&&mt.overrideMimeType(se),er!=null&&(mt.responseType=er),Wr!=null&&Ye.on("error",Wr).on("load",function(Ji){Wr(null,Ji)}),it.beforesend.call(Ye,mt),mt.send(ni==null?null:ni),Ye},Ye.abort=function(){return mt.abort(),Ye},e.rebind(Ye,it,"on"),We==null?Ye:Ye.get(Gi(We))}function Gi(X){return X.length===1?function(se,Le){X(se==null?Le:null)}:X}function Qr(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Le=new RegExp('["'+X+` +"use strict";var Plotly=(()=>{var $C=Object.defineProperty,wet=Object.defineProperties,Tet=Object.getOwnPropertyDescriptor,Aet=Object.getOwnPropertyDescriptors,Met=Object.getOwnPropertyNames,nee=Object.getOwnPropertySymbols;var oee=Object.prototype.hasOwnProperty,Eet=Object.prototype.propertyIsEnumerable;var aee=(e,t,r)=>t in e?$C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,see=(e,t)=>{for(var r in t||(t={}))oee.call(t,r)&&aee(e,r,t[r]);if(nee)for(var r of nee(t))Eet.call(t,r)&&aee(e,r,t[r]);return e},lee=(e,t)=>wet(e,Aet(t));var Qf=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ket=(e,t)=>{for(var r in t)$C(e,r,{get:t[r],enumerable:!0})},Cet=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Met(t))!oee.call(e,i)&&i!==r&&$C(e,i,{get:()=>t[i],enumerable:!(n=Tet(t,i))||n.enumerable});return e};var ab=e=>Cet($C({},"__esModule",{value:!0}),e);var QC=Se(uee=>{"use strict";uee.version="3.0.0-rc.0"});var cee=Se((fee,eL)=>{(function(t,r,n){r[t]=r[t]||n(),typeof eL!="undefined"&&eL.exports?eL.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:fee,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,A,L){return Object.defineProperty(k,E,{value:A,writable:!0,configurable:L!==!1})}}catch(y){t=function(E,A,L){return E[A]=L,E}}n=function(){var k,E,A;function L(_,C){this.fn=_,this.self=C,this.next=void 0}return{add:function(C,M){A=new L(C,M),E?E.next=A:k=A,E=A,A=void 0},drain:function(){var C=k;for(k=E=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(y,k){n.add(y,k),r||(r=a(n.drain))}function s(y){var k,E=typeof y;return y!=null&&(E=="object"||E=="function")&&(k=y.then),typeof k=="function"?k:!1}function u(){for(var y=0;y0&&o(u,E))}catch(A){c.call(new d(E),A)}}}function c(y){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=y,k.state=2,k.chain.length>0&&o(u,k))}function h(y,k,E,A){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 Le=se.length,We=new Array(Le);Le--;)We[Le]=se[Le];return We}}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,u=o.setAttributeNS,l=this.CSSStyleDeclaration.prototype,f=l.setProperty;o.setAttribute=function(se,Le){s.call(this,se,Le+"")},o.setAttributeNS=function(se,Le,We){u.call(this,se,Le,We+"")},l.setProperty=function(se,Le,We){f.call(this,se,Le+"",We)}}e.ascending=c;function c(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 Le=-1,We=X.length,Ye,it;if(arguments.length===1){for(;++Le=it){Ye=it;break}for(;++Leit&&(Ye=it)}else{for(;++Le=it){Ye=it;break}for(;++Leit&&(Ye=it)}return Ye},e.max=function(X,se){var Le=-1,We=X.length,Ye,it;if(arguments.length===1){for(;++Le=it){Ye=it;break}for(;++LeYe&&(Ye=it)}else{for(;++Le=it){Ye=it;break}for(;++LeYe&&(Ye=it)}return Ye},e.extent=function(X,se){var Le=-1,We=X.length,Ye,it,Nt;if(arguments.length===1){for(;++Le=it){Ye=Nt=it;break}for(;++Leit&&(Ye=it),Nt=it){Ye=Nt=it;break}for(;++Leit&&(Ye=it),Nt1)return Nt/(er-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function p(X){return{left:function(se,Le,We,Ye){for(arguments.length<3&&(We=0),arguments.length<4&&(Ye=se.length);We>>1;X(se[it],Le)<0?We=it+1:Ye=it}return We},right:function(se,Le,We,Ye){for(arguments.length<3&&(We=0),arguments.length<4&&(Ye=se.length);We>>1;X(se[it],Le)>0?Ye=it:We=it+1}return We}}}var x=p(c);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(X){return p(X.length===1?function(se,Le){return c(X(se),Le)}:X)},e.shuffle=function(X,se,Le){(We=arguments.length)<3&&(Le=X.length,We<2&&(se=0));for(var We=Le-se,Ye,it;We;)it=Math.random()*We--|0,Ye=X[We+se],X[We+se]=X[it+se],X[it+se]=Ye;return X},e.permute=function(X,se){for(var Le=se.length,We=new Array(Le);Le--;)We[Le]=X[se[Le]];return We},e.pairs=function(X){for(var se=0,Le=X.length-1,We,Ye=X[0],it=new Array(Le<0?0:Le);se=0;)for(Nt=X[se],Le=Nt.length;--Le>=0;)it[--Ye]=Nt[Le];return it};var y=Math.abs;e.range=function(X,se,Le){if(arguments.length<3&&(Le=1,arguments.length<2&&(se=X,X=0)),(se-X)/Le===1/0)throw new Error("infinite range");var We=[],Ye=k(y(Le)),it=-1,Nt;if(X*=Ye,se*=Ye,Le*=Ye,Le<0)for(;(Nt=X+Le*++it)>se;)We.push(Nt/Ye);else for(;(Nt=X+Le*++it)=se.length)return Ye?Ye.call(X,er):We?er.sort(We):er;for(var wr=-1,ni=er.length,Wr=se[_r++],Ci,Ji,ai,Ti=new A,Bi;++wr=se.length)return mt;var _r=[],wr=Le[er++];return mt.forEach(function(ni,Wr){_r.push({key:ni,values:Nt(Wr,er)})}),wr?_r.sort(function(ni,Wr){return wr(ni.key,Wr.key)}):_r}return X.map=function(mt,er){return it(er,mt,0)},X.entries=function(mt){return Nt(it(e.map,mt,0),0)},X.key=function(mt){return se.push(mt),X},X.sortKeys=function(mt){return Le[se.length-1]=mt,X},X.sortValues=function(mt){return We=mt,X},X.rollup=function(mt){return Ye=mt,X},X},e.set=function(X){var se=new U;if(X)for(var Le=0,We=X.length;Le=0&&(We=X.slice(Le+1),X=X.slice(0,Le)),X)return arguments.length<2?this[X].on(We):this[X].on(We,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(We,null);return this}};function ne(X){var se=[],Le=new A;function We(){for(var Ye=se,it=-1,Nt=Ye.length,mt;++it=0&&(Le=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),Ze.hasOwnProperty(Le)?{space:Ze[Le],local:X}:X}},Re.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Le=this.node();return X=e.ns.qualify(X),X.local?Le.getAttributeNS(X.space,X.local):Le.getAttribute(X)}for(se in X)this.each(et(se,X[se]));return this}return this.each(et(X,se))};function et(X,se){X=e.ns.qualify(X);function Le(){this.removeAttribute(X)}function We(){this.removeAttributeNS(X.space,X.local)}function Ye(){this.setAttribute(X,se)}function it(){this.setAttributeNS(X.space,X.local,se)}function Nt(){var er=se.apply(this,arguments);er==null?this.removeAttribute(X):this.setAttribute(X,er)}function mt(){var er=se.apply(this,arguments);er==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,er)}return se==null?X.local?We:Le:typeof se=="function"?X.local?mt:Nt:X.local?it:Ye}function gt(X){return X.trim().replace(/\s+/g," ")}Re.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Le=this.node(),We=(X=Qe(X)).length,Ye=-1;if(se=Le.classList){for(;++Ye=0;)(it=Le[We])&&(Ye&&Ye!==it.nextSibling&&Ye.parentNode.insertBefore(it,Ye),Ye=it);return this},Re.sort=function(X){X=nt.apply(this,arguments);for(var se=-1,Le=this.length;++se=se&&(se=Ye+1);!(er=Nt[se])&&++se0&&(X=X.slice(0,Ye));var Nt=Je.get(X);Nt&&(X=Nt,it=Vt);function mt(){var wr=this[We];wr&&(this.removeEventListener(X,wr,wr.$),delete this[We])}function er(){var wr=it(se,r(arguments));mt.call(this),this.addEventListener(X,this[We]=wr,wr.$=Le),wr._=se}function _r(){var wr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),ni;for(var Wr in this)if(ni=Wr.match(wr)){var Ci=this[Wr];this.removeEventListener(ni[1],Ci,Ci.$),delete this[Wr]}}return Ye?se?er:mt:se?W:_r}var Je=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Je.forEach(function(X){"on"+X in n&&Je.remove(X)});function Mt(X,se){return function(Le){var We=e.event;e.event=Le,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=We}}}function Vt(X,se){var Le=Mt(X,se);return function(We){var Ye=this,it=We.relatedTarget;(!it||it!==Ye&&!(it.compareDocumentPosition(Ye)&8))&&Le.call(Ye,We)}}var Kt,ir=0;function fr(X){var se=".dragsuppress-"+ ++ir,Le="click"+se,We=e.select(a(X)).on("touchmove"+se,be).on("dragstart"+se,be).on("selectstart"+se,be);if(Kt==null&&(Kt="onselectstart"in X?!1:G(X.style,"userSelect")),Kt){var Ye=i(X).style,it=Ye[Kt];Ye[Kt]="none"}return function(Nt){if(We.on(se,null),Kt&&(Ye[Kt]=it),Nt){var mt=function(){We.on(Le,null)};We.on(Le,function(){be(),mt()},!0),setTimeout(mt,0)}}}e.mouse=function(X){return De(X,ze())};var Ot=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function De(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Le=X.ownerSVGElement||X;if(Le.createSVGPoint){var We=Le.createSVGPoint();if(Ot<0){var Ye=a(X);if(Ye.scrollX||Ye.scrollY){Le=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var it=Le[0][0].getScreenCTM();Ot=!(it.f||it.e),Le.remove()}}return Ot?(We.x=se.pageX,We.y=se.pageY):(We.x=se.clientX,We.y=se.clientY),We=We.matrixTransform(X.getScreenCTM().inverse()),[We.x,We.y]}var Nt=X.getBoundingClientRect();return[se.clientX-Nt.left-X.clientLeft,se.clientY-Nt.top-X.clientTop]}e.touch=function(X,se,Le){if(arguments.length<3&&(Le=se,se=ze().changedTouches),se){for(var We=0,Ye=se.length,it;We0?1:X<0?-1:0}function St(X,se,Le){return(se[0]-X[0])*(Le[1]-X[1])-(se[1]-X[1])*(Le[0]-X[0])}function Zt(X){return X>1?0:X<-1?Ie:Math.acos(X)}function qr(X){return X>1?ue:X<-1?-ue:Math.asin(X)}function Lr(X){return((X=Math.exp(X))-1/X)/2}function vr(X){return((X=Math.exp(X))+1/X)/2}function Er(X){return((X=Math.exp(2*X))-1)/(X+1)}function si(X){return(X=Math.sin(X/2))*X}var Ei=Math.SQRT2,Si=2,xi=4;e.interpolateZoom=function(X,se){var Le=X[0],We=X[1],Ye=X[2],it=se[0],Nt=se[1],mt=se[2],er=it-Le,_r=Nt-We,wr=er*er+_r*_r,ni,Wr;if(wr0&&(qo=qo.transition().duration(Nt)),qo.call(Wi.event)}function vl(){Ti&&Ti.domain(ai.range().map(function(qo){return(qo-X.x)/X.k}).map(ai.invert)),en&&en.domain(Bi.range().map(function(qo){return(qo-X.y)/X.k}).map(Bi.invert))}function wl(qo){mt++||qo({type:"zoomstart"})}function au(qo){vl(),qo({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Al(qo){--mt||(qo({type:"zoomend"}),Le=null)}function nu(){var qo=this,Rl=Ji.of(qo,arguments),pu=0,xu=e.select(a(qo)).on(_r,xf).on(wr,hf),of=bi(e.mouse(qo)),ff=fr(qo);ys.call(qo),wl(Rl);function xf(){pu=1,Ko(e.mouse(qo),of),au(Rl)}function hf(){xu.on(_r,null).on(wr,null),ff(pu),Al(Rl)}}function Bu(){var qo=this,Rl=Ji.of(qo,arguments),pu={},xu=0,of,ff=".zoom-"+e.event.changedTouches[0].identifier,xf="touchmove"+ff,hf="touchend"+ff,dc=[],Gt=e.select(qo),jr=fr(qo);Mn(),wl(Rl),Gt.on(er,null).on(Wr,Mn);function _i(){var ha=e.touches(qo);return of=X.k,ha.forEach(function(Io){Io.identifier in pu&&(pu[Io.identifier]=bi(Io))}),ha}function Mn(){var ha=e.event.target;e.select(ha).on(xf,Ta).on(hf,fa),dc.push(ha);for(var Io=e.event.changedTouches,Vs=0,Hs=Io.length;Vs1){var Ps=is[0],qs=is[1],Do=Ps[0]-qs[0],kn=Ps[1]-qs[1];xu=Do*Do+kn*kn}}function Ta(){var ha=e.touches(qo),Io,Vs,Hs,is;ys.call(qo);for(var su=0,Ps=ha.length;su1?1:se,Le=Le<0?0:Le>1?1:Le,Ye=Le<=.5?Le*(1+se):Le+se-Le*se,We=2*Le-Ye;function it(mt){return mt>360?mt-=360:mt<0&&(mt+=360),mt<60?We+(Ye-We)*mt/60:mt<180?Ye:mt<240?We+(Ye-We)*(240-mt)/60:We}function Nt(mt){return Math.round(it(mt)*255)}return new ki(Nt(X+120),Nt(X),Nt(X-120))}e.hcl=Bt;function Bt(X,se,Le){return this instanceof Bt?(this.h=+X,this.c=+se,void(this.l=+Le)):arguments.length<2?X instanceof Bt?new Bt(X.h,X.c,X.l):X instanceof zr?Yr(X.l,X.a,X.b):Yr((X=Or((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new Bt(X,se,Le)}var sr=Bt.prototype=new Di;sr.brighter=function(X){return new Bt(this.h,this.c,Math.min(100,this.l+Tr*(arguments.length?X:1)))},sr.darker=function(X){return new Bt(this.h,this.c,Math.max(0,this.l-Tr*(arguments.length?X:1)))},sr.rgb=function(){return br(this.h,this.c,this.l).rgb()};function br(X,se,Le){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new zr(Le,Math.cos(X*=de)*se,Math.sin(X)*se)}e.lab=zr;function zr(X,se,Le){return this instanceof zr?(this.l=+X,this.a=+se,void(this.b=+Le)):arguments.length<2?X instanceof zr?new zr(X.l,X.a,X.b):X instanceof Bt?br(X.h,X.c,X.l):Or((X=ki(X)).r,X.g,X.b):new zr(X,se,Le)}var Tr=18,Rr=.95047,Br=1,oi=1.08883,vi=zr.prototype=new Di;vi.brighter=function(X){return new zr(Math.min(100,this.l+Tr*(arguments.length?X:1)),this.a,this.b)},vi.darker=function(X){return new zr(Math.max(0,this.l-Tr*(arguments.length?X:1)),this.a,this.b)},vi.rgb=function(){return Pi(this.l,this.a,this.b)};function Pi(X,se,Le){var We=(X+16)/116,Ye=We+se/500,it=We-Le/200;return Ye=Ni(Ye)*Rr,We=Ni(We)*Br,it=Ni(it)*oi,new ki(ti(3.2404542*Ye-1.5371385*We-.4985314*it),ti(-.969266*Ye+1.8760108*We+.041556*it),ti(.0556434*Ye-.2040259*We+1.0572252*it))}function Yr(X,se,Le){return X>0?new Bt(Math.atan2(Le,se)*ht,Math.sqrt(se*se+Le*Le),X):new Bt(NaN,NaN,X)}function Ni(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function Ur(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ti(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=ki;function ki(X,se,Le){return this instanceof ki?(this.r=~~X,this.g=~~se,void(this.b=~~Le)):arguments.length<2?X instanceof ki?new ki(X.r,X.g,X.b):sn(""+X,ki,Dt):new ki(X,se,Le)}function ji(X){return new ki(X>>16,X>>8&255,X&255)}function Vi(X){return ji(X)+""}var zi=ki.prototype=new Di;zi.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Le=this.g,We=this.b,Ye=30;return!se&&!Le&&!We?new ki(Ye,Ye,Ye):(se&&se>4,We=We>>4|We,Ye=er&240,Ye=Ye>>4|Ye,it=er&15,it=it<<4|it):X.length===7&&(We=(er&16711680)>>16,Ye=(er&65280)>>8,it=er&255)),se(We,Ye,it))}function fi(X,se,Le){var We=Math.min(X/=255,se/=255,Le/=255),Ye=Math.max(X,se,Le),it=Ye-We,Nt,mt,er=(Ye+We)/2;return it?(mt=er<.5?it/(Ye+We):it/(2-Ye-We),X==Ye?Nt=(se-Le)/it+(se0&&er<1?0:Nt),new Lt(Nt,mt,er)}function Or(X,se,Le){X=st(X),se=st(se),Le=st(Le);var We=Ur((.4124564*X+.3575761*se+.1804375*Le)/Rr),Ye=Ur((.2126729*X+.7151522*se+.072175*Le)/Br),it=Ur((.0193339*X+.119192*se+.9503041*Le)/oi);return zr(116*Ye-16,500*(We-Ye),200*(Ye-it))}function st(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Wt(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var tr=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});tr.forEach(function(X,se){tr.set(X,ji(se))});function or(X){return typeof X=="function"?X:function(){return X}}e.functor=or,e.xhr=Nr(H);function Nr(X){return function(se,Le,We){return arguments.length===2&&typeof Le=="function"&&(We=Le,Le=null),hi(se,Le,X,We)}}function hi(X,se,Le,We){var Ye={},it=e.dispatch("beforesend","progress","load","error"),Nt={},mt=new XMLHttpRequest,er=null;self.XDomainRequest&&!("withCredentials"in mt)&&/^(http(s)?:)?\/\//.test(X)&&(mt=new XDomainRequest),"onload"in mt?mt.onload=mt.onerror=_r:mt.onreadystatechange=function(){mt.readyState>3&&_r()};function _r(){var wr=mt.status,ni;if(!wr&&Qr(mt)||wr>=200&&wr<300||wr===304){try{ni=Le.call(Ye,mt)}catch(Wr){it.error.call(Ye,Wr);return}it.load.call(Ye,ni)}else it.error.call(Ye,mt)}return mt.onprogress=function(wr){var ni=e.event;e.event=wr;try{it.progress.call(Ye,mt)}finally{e.event=ni}},Ye.header=function(wr,ni){return wr=(wr+"").toLowerCase(),arguments.length<2?Nt[wr]:(ni==null?delete Nt[wr]:Nt[wr]=ni+"",Ye)},Ye.mimeType=function(wr){return arguments.length?(se=wr==null?null:wr+"",Ye):se},Ye.responseType=function(wr){return arguments.length?(er=wr,Ye):er},Ye.response=function(wr){return Le=wr,Ye},["get","post"].forEach(function(wr){Ye[wr]=function(){return Ye.send.apply(Ye,[wr].concat(r(arguments)))}}),Ye.send=function(wr,ni,Wr){if(arguments.length===2&&typeof ni=="function"&&(Wr=ni,ni=null),mt.open(wr,X,!0),se!=null&&!("accept"in Nt)&&(Nt.accept=se+",*/*"),mt.setRequestHeader)for(var Ci in Nt)mt.setRequestHeader(Ci,Nt[Ci]);return se!=null&&mt.overrideMimeType&&mt.overrideMimeType(se),er!=null&&(mt.responseType=er),Wr!=null&&Ye.on("error",Wr).on("load",function(Ji){Wr(null,Ji)}),it.beforesend.call(Ye,mt),mt.send(ni==null?null:ni),Ye},Ye.abort=function(){return mt.abort(),Ye},e.rebind(Ye,it,"on"),We==null?Ye:Ye.get(Gi(We))}function Gi(X){return X.length===1?function(se,Le){X(se==null?Le:null)}:X}function Qr(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Le=new RegExp('["'+X+` ]`),We=X.charCodeAt(0);function Ye(_r,wr,ni){arguments.length<3&&(ni=wr,wr=null);var Wr=hi(_r,se,wr==null?it:Nt(wr),ni);return Wr.row=function(Ci){return arguments.length?Wr.response((wr=Ci)==null?it:Nt(Ci)):wr},Wr}function it(_r){return Ye.parse(_r.responseText)}function Nt(_r){return function(wr){return Ye.parse(wr.responseText,_r)}}Ye.parse=function(_r,wr){var ni;return Ye.parseRows(_r,function(Wr,Ci){if(ni)return ni(Wr,Ci-1);var Ji=function(ai){for(var Ti={},Bi=Wr.length,en=0;en=Ji)return Wr;if(en)return en=!1,ni;var ao=ai;if(_r.charCodeAt(ao)===34){for(var yo=ao;yo++24?(isFinite(se)&&(clearTimeout(xn),xn=setTimeout(Fn,se)),fn=0):(fn=1,_a(Fn))}e.timer.flush=function(){ia(),za()};function ia(){for(var X=Date.now(),se=Ui;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function za(){for(var X,se=Ui,Le=1/0;se;)se.c?(se.t=0;--mt)ai.push(Ye[_r[ni[mt]][2]]);for(mt=+Ci;mt1&&St(X[Le[We-2]],X[Le[We-1]],X[Ye])<=0;)--We;Le[We++]=Ye}return Le.slice(0,We)}function Dn(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return te(X,un),X};var un=e.geom.polygon.prototype=[];un.area=function(){for(var X=-1,se=this.length,Le,We=this[se-1],Ye=0;++XFe)mt=mt.L;else if(Nt=se-ln(mt,Le),Nt>Fe){if(!mt.R){We=mt;break}mt=mt.R}else{it>-Fe?(We=mt.P,Ye=mt):Nt>-Fe?(We=mt,Ye=mt.N):We=Ye=mt;break}var er=to(X);if(Ha.insert(We,er),!(!We&&!Ye)){if(We===Ye){Yn(We),Ye=to(We.site),Ha.insert(er,Ye),er.edge=Ye.edge=qa(We.site,er.site),Fi(We),Fi(Ye);return}if(!Ye){er.edge=qa(We.site,er.site);return}Yn(We),Yn(Ye);var _r=We.site,wr=_r.x,ni=_r.y,Wr=X.x-wr,Ci=X.y-ni,Ji=Ye.site,ai=Ji.x-wr,Ti=Ji.y-ni,Bi=2*(Wr*Ti-Ci*ai),en=Wr*Wr+Ci*Ci,Wi=ai*ai+Ti*Ti,bi={x:(Ti*en-Ci*Wi)/Bi+wr,y:(Wr*Wi-ai*en)/Bi+ni};Vo(Ye.edge,_r,Ji,bi),er.edge=qa(_r,X,null,bi),Ye.edge=qa(X,Ji,null,bi),Fi(We),Fi(Ye)}}function pa(X,se){var Le=X.site,We=Le.x,Ye=Le.y,it=Ye-se;if(!it)return We;var Nt=X.P;if(!Nt)return-1/0;Le=Nt.site;var mt=Le.x,er=Le.y,_r=er-se;if(!_r)return mt;var wr=mt-We,ni=1/it-1/_r,Wr=wr/_r;return ni?(-Wr+Math.sqrt(Wr*Wr-2*ni*(wr*wr/(-2*_r)-er+_r/2+Ye-it/2)))/ni+We:(We+mt)/2}function ln(X,se){var Le=X.N;if(Le)return pa(Le,se);var We=X.site;return We.y===se?We.x:1/0}function ka(X){this.site=X,this.edges=[]}ka.prototype.prepare=function(){for(var X=this.edges,se=X.length,Le;se--;)Le=X[se].edge,(!Le.b||!Le.a)&&X.splice(se,1);return X.sort(bo),X.length};function va(X){for(var se=X[0][0],Le=X[1][0],We=X[0][1],Ye=X[1][1],it,Nt,mt,er,_r=Ea,wr=_r.length,ni,Wr,Ci,Ji,ai,Ti;wr--;)if(ni=_r[wr],!(!ni||!ni.prepare()))for(Ci=ni.edges,Ji=Ci.length,Wr=0;WrFe||y(er-Nt)>Fe)&&(Ci.splice(Wr,0,new Pa(jo(ni.site,Ti,y(mt-se)Fe?{x:se,y:y(it-se)Fe?{x:y(Nt-Ye)Fe?{x:Le,y:y(it-Le)Fe?{x:y(Nt-We)=-Pe)){var Wr=er*er+_r*_r,Ci=wr*wr+Ti*Ti,Ji=(Ti*Wr-_r*Ci)/ni,ai=(er*Ci-wr*Wr)/ni,Ti=ai+mt,Bi=ts.pop()||new Co;Bi.arc=X,Bi.site=Ye,Bi.x=Ji+Nt,Bi.y=Ti+Math.sqrt(Ji*Ji+ai*ai),Bi.cy=Ti,X.circle=Bi;for(var en=null,Wi=Xn._;Wi;)if(Bi.y0)){if(ai/=Ci,Ci<0){if(ai0){if(ai>Wr)return;ai>ni&&(ni=ai)}if(ai=Le-mt,!(!Ci&&ai<0)){if(ai/=Ci,Ci<0){if(ai>Wr)return;ai>ni&&(ni=ai)}else if(Ci>0){if(ai0)){if(ai/=Ji,Ji<0){if(ai0){if(ai>Wr)return;ai>ni&&(ni=ai)}if(ai=We-er,!(!Ji&&ai<0)){if(ai/=Ji,Ji<0){if(ai>Wr)return;ai>ni&&(ni=ai)}else if(Ji>0){if(ai0&&(Ye.a={x:mt+ni*Ci,y:er+ni*Ji}),Wr<1&&(Ye.b={x:mt+Wr*Ci,y:er+Wr*Ji}),Ye}}}}}}function Qi(X){for(var se=Bo,Le=xa(X[0][0],X[0][1],X[1][0],X[1][1]),We=se.length,Ye;We--;)Ye=se[We],(!Nn(Ye,X)||!Le(Ye)||y(Ye.a.x-Ye.b.x)=it)return;if(wr>Wr){if(!We)We={x:Ji,y:Nt};else if(We.y>=mt)return;Le={x:Ji,y:mt}}else{if(!We)We={x:Ji,y:mt};else if(We.y1)if(wr>Wr){if(!We)We={x:(Nt-Bi)/Ti,y:Nt};else if(We.y>=mt)return;Le={x:(mt-Bi)/Ti,y:mt}}else{if(!We)We={x:(mt-Bi)/Ti,y:mt};else if(We.y=it)return;Le={x:it,y:Ti*it+Bi}}else{if(!We)We={x:it,y:Ti*it+Bi};else if(We.x=wr&&Bi.x<=Wr&&Bi.y>=ni&&Bi.y<=Ci?[[wr,Ci],[Wr,Ci],[Wr,ni],[wr,ni]]:[];en.point=er[ai]}),_r}function mt(er){return er.map(function(_r,wr){return{x:Math.round(We(_r,wr)/Fe)*Fe,y:Math.round(Ye(_r,wr)/Fe)*Fe,i:wr}})}return Nt.links=function(er){return bs(mt(er)).edges.filter(function(_r){return _r.l&&_r.r}).map(function(_r){return{source:er[_r.l.i],target:er[_r.r.i]}})},Nt.triangles=function(er){var _r=[];return bs(mt(er)).cells.forEach(function(wr,ni){for(var Wr=wr.site,Ci=wr.edges.sort(bo),Ji=-1,ai=Ci.length,Ti,Bi,en=Ci[ai-1].edge,Wi=en.l===Wr?en.r:en.l;++JiWi&&(Wi=wr.x),wr.y>bi&&(bi=wr.y),Ci.push(wr.x),Ji.push(wr.y);else for(ai=0;aiWi&&(Wi=ao),yo>bi&&(bi=yo),Ci.push(ao),Ji.push(yo)}var Ko=Wi-Bi,Ms=bi-en;Ko>Ms?bi=en+Ko:Wi=Bi+Ms;function vl(Al,nu,Bu,qu,Ju,qo,Rl,pu){if(!(isNaN(Bu)||isNaN(qu)))if(Al.leaf){var xu=Al.x,of=Al.y;if(xu!=null)if(y(xu-Bu)+y(of-qu)<.01)wl(Al,nu,Bu,qu,Ju,qo,Rl,pu);else{var ff=Al.point;Al.x=Al.y=Al.point=null,wl(Al,ff,xu,of,Ju,qo,Rl,pu),wl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}else Al.x=Bu,Al.y=qu,Al.point=nu}else wl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}function wl(Al,nu,Bu,qu,Ju,qo,Rl,pu){var xu=(Ju+Rl)*.5,of=(qo+pu)*.5,ff=Bu>=xu,xf=qu>=of,hf=xf<<1|ff;Al.leaf=!1,Al=Al.nodes[hf]||(Al.nodes[hf]=on()),ff?Ju=xu:Rl=xu,xf?qo=of:pu=of,vl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}var au=on();if(au.add=function(Al){vl(au,Al,+ni(Al,++ai),+Wr(Al,ai),Bi,en,Wi,bi)},au.visit=function(Al){mn(Al,au,Bi,en,Wi,bi)},au.find=function(Al){return Ga(au,Al[0],Al[1],Bi,en,Wi,bi)},ai=-1,se==null){for(;++aiit||Wr>Nt||Ci=ao,Ms=Le>=yo,vl=Ms<<1|Ko,wl=vl+4;vlLe&&(it=se.slice(Le,it),mt[Nt]?mt[Nt]+=it:mt[++Nt]=it),(We=We[0])===(Ye=Ye[0])?mt[Nt]?mt[Nt]+=Ye:mt[++Nt]=Ye:(mt[++Nt]=null,er.push({i:Nt,x:Xi(We,Ye)})),Le=yn.lastIndex;return Le=0&&!(We=e.interpolators[Le](X,se)););return We}e.interpolators=[function(X,se){var Le=typeof se;return(Le==="string"?tr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?ca:qn:se instanceof Di?ca:Array.isArray(se)?ba:Le==="object"&&isNaN(se)?bn:Xi)(X,se)}],e.interpolateArray=ba;function ba(X,se){var Le=[],We=[],Ye=X.length,it=se.length,Nt=Math.min(X.length,se.length),mt;for(mt=0;mt=0?X.slice(0,se):X,We=se>=0?X.slice(se+1):"in";return Le=Aa.get(Le)||Da,We=Ln.get(We)||H,wo(We(Le.apply(null,t.call(arguments,1))))};function wo(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function wa(X){return function(se){return 1-X(1-se)}}function $i(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function ea(X){return X*X}function Sa(X){return X*X*X}function Za(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Le=se*X;return 4*(X<.5?Le:3*(X-se)+Le-.75)}function xo(X){return function(se){return Math.pow(se,X)}}function Wa(X){return 1-Math.cos(X*ue)}function hn(X){return Math.pow(2,10*(X-1))}function Un(X){return 1-Math.sqrt(1-X*X)}function Ss(X,se){var Le;return arguments.length<2&&(se=.45),arguments.length?Le=se/lt*Math.asin(1/X):(X=1,Le=se/4),function(We){return 1+X*Math.pow(2,-10*We)*Math.sin((We-Le)*lt/se)}}function Kn(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function ns(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=Jo;function Jo(X,se){X=e.hcl(X),se=e.hcl(se);var Le=X.h,We=X.c,Ye=X.l,it=se.h-Le,Nt=se.c-We,mt=se.l-Ye;return isNaN(Nt)&&(Nt=0,We=isNaN(We)?se.c:We),isNaN(it)?(it=0,Le=isNaN(Le)?se.h:Le):it>180?it-=360:it<-180&&(it+=360),function(er){return br(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateHsl=vo;function vo(X,se){X=e.hsl(X),se=e.hsl(se);var Le=X.h,We=X.s,Ye=X.l,it=se.h-Le,Nt=se.s-We,mt=se.l-Ye;return isNaN(Nt)&&(Nt=0,We=isNaN(We)?se.s:We),isNaN(it)?(it=0,Le=isNaN(Le)?se.h:Le):it>180?it-=360:it<-180&&(it+=360),function(er){return Dt(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateLab=ma;function ma(X,se){X=e.lab(X),se=e.lab(se);var Le=X.l,We=X.a,Ye=X.b,it=se.l-Le,Nt=se.a-We,mt=se.b-Ye;return function(er){return Pi(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateRound=ja;function ja(X,se){return se-=X,function(Le){return Math.round(X+se*Le)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Le){if(Le!=null){se.setAttribute("transform",Le);var We=se.transform.baseVal.consolidate()}return new To(We?We.matrix:ho)})(X)};function To(X){var se=[X.a,X.b],Le=[X.c,X.d],We=la(se),Ye=Ao(se,Le),it=la(Ki(Le,se,-Ye))||0;se[0]*Le[1]180?se+=360:se-X>180&&(X+=360),We.push({i:Le.push(Ka(Le)+"rotate(",null,")")-2,x:Xi(X,se)})):se&&Le.push(Ka(Le)+"rotate("+se+")")}function En(X,se,Le,We){X!==se?We.push({i:Le.push(Ka(Le)+"skewX(",null,")")-2,x:Xi(X,se)}):se&&Le.push(Ka(Le)+"skewX("+se+")")}function Mo(X,se,Le,We){if(X[0]!==se[0]||X[1]!==se[1]){var Ye=Le.push(Ka(Le)+"scale(",null,",",null,")");We.push({i:Ye-4,x:Xi(X[0],se[0])},{i:Ye-2,x:Xi(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Le.push(Ka(Le)+"scale("+se+")")}function Ds(X,se){var Le=[],We=[];return X=e.transform(X),se=e.transform(se),Ca(X.translate,se.translate,Le,We),ta(X.rotate,se.rotate,Le,We),En(X.skew,se.skew,Le,We),Mo(X.scale,se.scale,Le,We),X=se=null,function(Ye){for(var it=-1,Nt=We.length,mt;++it0?it=bi:(Le.c=null,Le.t=NaN,Le=null,se.end({type:"end",alpha:it=0})):bi>0&&(se.start({type:"start",alpha:it=bi}),Le=Wn(X.tick)),X):it},X.start=function(){var bi,ao=Ci.length,yo=Ji.length,Ko=We[0],Ms=We[1],vl,wl;for(bi=0;bi=0;)it.push(wr=_r[er]),wr.parent=mt,wr.depth=mt.depth+1;Le&&(mt.value=0),mt.children=_r}else Le&&(mt.value=+Le.call(We,mt,mt.depth)||0),delete mt.children;return uo(Ye,function(ni){var Wr,Ci;X&&(Wr=ni.children)&&Wr.sort(X),Le&&(Ci=ni.parent)&&(Ci.value+=ni.value)}),Nt}return We.sort=function(Ye){return arguments.length?(X=Ye,We):X},We.children=function(Ye){return arguments.length?(se=Ye,We):se},We.value=function(Ye){return arguments.length?(Le=Ye,We):Le},We.revalue=function(Ye){return Le&&(Sn(Ye,function(it){it.children&&(it.value=0)}),uo(Ye,function(it){var Nt;it.children||(it.value=+Le.call(We,it,it.depth)||0),(Nt=it.parent)&&(Nt.value+=it.value)})),Ye},We};function $n(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=os,X}function Sn(X,se){for(var Le=[X];(X=Le.pop())!=null;)if(se(X),(Ye=X.children)&&(We=Ye.length))for(var We,Ye;--We>=0;)Le.push(Ye[We])}function uo(X,se){for(var Le=[X],We=[];(X=Le.pop())!=null;)if(We.push(X),(Nt=X.children)&&(it=Nt.length))for(var Ye=-1,it,Nt;++YeYe&&(Ye=mt),We.push(mt)}for(Nt=0;NtWe&&(Le=se,We=Ye);return Le}function ro(X){return X.reduce(Ma,0)}function Ma(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Le=Oo,We=io;function Ye(it,Wr){for(var mt=[],er=it.map(se,this),_r=Le.call(this,er,Wr),wr=We.call(this,_r,er,Wr),ni,Wr=-1,Ci=er.length,Ji=wr.length-1,ai=X?1:1/Ci,Ti;++Wr0)for(Wr=-1;++Wr=_r[0]&&Ti<=_r[1]&&(ni=mt[e.bisect(wr,Ti,1,Ji)-1],ni.y+=ai,ni.push(it[Wr]));return mt}return Ye.value=function(it){return arguments.length?(se=it,Ye):se},Ye.range=function(it){return arguments.length?(Le=or(it),Ye):Le},Ye.bins=function(it){return arguments.length?(We=typeof it=="number"?function(Nt){return aa(Nt,it)}:or(it),Ye):We},Ye.frequency=function(it){return arguments.length?(X=!!it,Ye):X},Ye};function io(X,se){return aa(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function aa(X,se){for(var Le=-1,We=+X[0],Ye=(X[1]-We)/se,it=[];++Le<=se;)it[Le]=Ye*Le+We;return it}function Oo(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(No),se=0,Le=[1,1],We;function Ye(it,Nt){var mt=X.call(this,it,Nt),er=mt[0],_r=Le[0],wr=Le[1],ni=We==null?Math.sqrt:typeof We=="function"?We:function(){return We};if(er.x=er.y=0,uo(er,function(Ci){Ci.r=+ni(Ci.value)}),uo(er,no),se){var Wr=se*(We?1:Math.max(2*er.r/_r,2*er.r/wr))/2;uo(er,function(Ci){Ci.r+=Wr}),uo(er,no),uo(er,function(Ci){Ci.r-=Wr})}return Xs(er,_r/2,wr/2,We?1:1/Math.max(2*er.r/_r,2*er.r/wr)),mt}return Ye.size=function(it){return arguments.length?(Le=it,Ye):Le},Ye.radius=function(it){return arguments.length?(We=it==null||typeof it=="function"?it:+it,Ye):We},Ye.padding=function(it){return arguments.length?(se=+it,Ye):se},$n(Ye,X)};function No(X,se){return X.value-se.value}function Zs(X,se){var Le=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Le,Le._pack_prev=se}function Fs(X,se){X._pack_next=se,se._pack_prev=X}function ws(X,se){var Le=se.x-X.x,We=se.y-X.y,Ye=X.r+se.r;return .999*Ye*Ye>Le*Le+We*We}function no(X){if(!(se=X.children)||!(Wr=se.length))return;var se,Le=1/0,We=-1/0,Ye=1/0,it=-1/0,Nt,mt,er,_r,wr,ni,Wr;function Ci(bi){Le=Math.min(bi.x-bi.r,Le),We=Math.max(bi.x+bi.r,We),Ye=Math.min(bi.y-bi.r,Ye),it=Math.max(bi.y+bi.r,it)}if(se.forEach(Ls),Nt=se[0],Nt.x=-Nt.r,Nt.y=0,Ci(Nt),Wr>1&&(mt=se[1],mt.x=mt.r,mt.y=0,Ci(mt),Wr>2))for(er=se[2],oa(Nt,mt,er),Ci(er),Zs(Nt,er),Nt._pack_prev=er,Zs(er,mt),mt=Nt._pack_next,_r=3;_rTi.x&&(Ti=ao),ao.depth>Bi.depth&&(Bi=ao)});var en=se(ai,Ti)/2-ai.x,Wi=Le[0]/(Ti.x+se(Ti,ai)/2+en),bi=Le[1]/(Bi.depth||1);Sn(Ci,function(ao){ao.x=(ao.x+en)*Wi,ao.y=ao.depth*bi})}return Wr}function it(wr){for(var ni={A:null,children:[wr]},Wr=[ni],Ci;(Ci=Wr.pop())!=null;)for(var Ji=Ci.children,ai,Ti=0,Bi=Ji.length;Ti0&&(ls(bt(ai,wr,Wr),wr,ao),Bi+=ao,en+=ao),Wi+=ai.m,Bi+=Ci.m,bi+=Ti.m,en+=Ji.m;ai&&!ss(Ji)&&(Ji.t=ai,Ji.m+=Wi-en),Ci&&!po(Ti)&&(Ti.t=Ci,Ti.m+=Bi-bi,Wr=wr)}return Wr}function _r(wr){wr.x*=Le[0],wr.y=wr.depth*Le[1]}return Ye.separation=function(wr){return arguments.length?(se=wr,Ye):se},Ye.size=function(wr){return arguments.length?(We=(Le=wr)==null?_r:null,Ye):We?null:Le},Ye.nodeSize=function(wr){return arguments.length?(We=(Le=wr)==null?null:_r,Ye):We?Le:null},$n(Ye,X)};function Yo(X,se){return X.parent==se.parent?1:2}function po(X){var se=X.children;return se.length?se[0]:X.t}function ss(X){var se=X.children,Le;return(Le=se.length)?se[Le-1]:X.t}function ls(X,se,Le){var We=Le/(se.i-X.i);se.c-=We,se.s+=Le,X.c+=We,se.z+=Le,se.m+=Le}function gs(X){for(var se=0,Le=0,We=X.children,Ye=We.length,it;--Ye>=0;)it=We[Ye],it.z+=se,it.m+=se,se+=it.s+(Le+=it.c)}function bt(X,se,Le){return X.a.parent===se.parent?X.a:Le}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=Yo,Le=[1,1],We=!1;function Ye(it,Nt){var mt=X.call(this,it,Nt),er=mt[0],_r,wr=0;uo(er,function(ai){var Ti=ai.children;Ti&&Ti.length?(ai.x=hr(Ti),ai.y=Ft(Ti)):(ai.x=_r?wr+=se(ai,_r):0,ai.y=0,_r=ai)});var ni=nr(er),Wr=Sr(er),Ci=ni.x-se(ni,Wr)/2,Ji=Wr.x+se(Wr,ni)/2;return uo(er,We?function(ai){ai.x=(ai.x-er.x)*Le[0],ai.y=(er.y-ai.y)*Le[1]}:function(ai){ai.x=(ai.x-Ci)/(Ji-Ci)*Le[0],ai.y=(1-(er.y?ai.y/er.y:1))*Le[1]}),mt}return Ye.separation=function(it){return arguments.length?(se=it,Ye):se},Ye.size=function(it){return arguments.length?(We=(Le=it)==null,Ye):We?null:Le},Ye.nodeSize=function(it){return arguments.length?(We=(Le=it)!=null,Ye):We?Le:null},$n(Ye,X)};function Ft(X){return 1+e.max(X,function(se){return se.y})}function hr(X){return X.reduce(function(se,Le){return se+Le.x},0)/X.length}function nr(X){var se=X.children;return se&&se.length?nr(se[0]):X}function Sr(X){var se=X.children,Le;return se&&(Le=se.length)?Sr(se[Le-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Le=[1,1],We=null,Ye=li,it=!1,Nt,mt="squarify",er=.5*(1+Math.sqrt(5));function _r(ai,Ti){for(var Bi=-1,en=ai.length,Wi,bi;++Bi0;)en.push(bi=Wi[Ms-1]),en.area+=bi.area,mt!=="squarify"||(yo=Wr(en,Ko))<=ao?(Wi.pop(),ao=yo):(en.area-=en.pop().area,Ci(en,Ko,Bi,!1),Ko=Math.min(Bi.dx,Bi.dy),en.length=en.area=0,ao=1/0);en.length&&(Ci(en,Ko,Bi,!0),en.length=en.area=0),Ti.forEach(wr)}}function ni(ai){var Ti=ai.children;if(Ti&&Ti.length){var Bi=Ye(ai),en=Ti.slice(),Wi,bi=[];for(_r(en,Bi.dx*Bi.dy/ai.value),bi.area=0;Wi=en.pop();)bi.push(Wi),bi.area+=Wi.area,Wi.z!=null&&(Ci(bi,Wi.z?Bi.dx:Bi.dy,Bi,!en.length),bi.length=bi.area=0);Ti.forEach(ni)}}function Wr(ai,Ti){for(var Bi=ai.area,en,Wi=0,bi=1/0,ao=-1,yo=ai.length;++aoWi&&(Wi=en));return Bi*=Bi,Ti*=Ti,Bi?Math.max(Ti*Wi*er/Bi,Bi/(Ti*bi*er)):1/0}function Ci(ai,Ti,Bi,en){var Wi=-1,bi=ai.length,ao=Bi.x,yo=Bi.y,Ko=Ti?se(ai.area/Ti):0,Ms;if(Ti==Bi.dx){for((en||Ko>Bi.dy)&&(Ko=Bi.dy);++WiBi.dx)&&(Ko=Bi.dx);++Wi1);return X+se*We*Math.sqrt(-2*Math.log(it)/it)}},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,Le=0;Le2?gi:dn,_r=We?vs:Ro;return Ye=er(X,se,_r,Le),it=er(se,X,_r,Ya),mt}function mt(er){return Ye(er)}return mt.invert=function(er){return it(er)},mt.domain=function(er){return arguments.length?(X=er.map(Number),Nt()):X},mt.range=function(er){return arguments.length?(se=er,Nt()):se},mt.rangeRound=function(er){return mt.range(er).interpolate(ja)},mt.clamp=function(er){return arguments.length?(We=er,Nt()):We},mt.interpolate=function(er){return arguments.length?(Le=er,Nt()):Le},mt.ticks=function(er){return Hn(X,er)},mt.tickFormat=function(er,_r){return d3_scale_linearTickFormat(X,er,_r)},mt.nice=function(er){return Vn(X,er),Nt()},mt.copy=function(){return gn(X,se,Le,We)},Nt()}function In(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Vn(X,se){return wi(X,ui(Rn(X,se)[2])),wi(X,ui(Rn(X,se)[2])),X}function Rn(X,se){se==null&&(se=10);var Le=mi(X),We=Le[1]-Le[0],Ye=Math.pow(10,Math.floor(Math.log(We/se)/Math.LN10)),it=se/We*Ye;return it<=.15?Ye*=10:it<=.35?Ye*=5:it<=.75&&(Ye*=2),Le[0]=Math.ceil(Le[0]/Ye)*Ye,Le[1]=Math.floor(Le[1]/Ye)*Ye+Ye*.5,Le[2]=Ye,Le}function Hn(X,se){return e.range.apply(e,Rn(X,se))}var Gn={s:1,g:1,p:1,r:1,e:1};function pn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Lo(X,se){var Le=pn(se[2]);return X in Gn?Math.abs(Le-pn(Math.max(y(se[0]),y(se[1]))))+ +(X!=="e"):Le-(X==="%")*2}e.scale.log=function(){return us(e.scale.linear().domain([0,1]),10,!0,[1,10])};function us(X,se,Le,We){function Ye(mt){return(Le?Math.log(mt<0?0:mt):-Math.log(mt>0?0:-mt))/Math.log(se)}function it(mt){return Le?Math.pow(se,mt):-Math.pow(se,-mt)}function Nt(mt){return X(Ye(mt))}return Nt.invert=function(mt){return it(X.invert(mt))},Nt.domain=function(mt){return arguments.length?(Le=mt[0]>=0,X.domain((We=mt.map(Number)).map(Ye)),Nt):We},Nt.base=function(mt){return arguments.length?(se=+mt,X.domain(We.map(Ye)),Nt):se},Nt.nice=function(){var mt=wi(We.map(Ye),Le?Math:Bs);return X.domain(mt),We=mt.map(it),Nt},Nt.ticks=function(){var mt=mi(We),er=[],_r=mt[0],wr=mt[1],ni=Math.floor(Ye(_r)),Wr=Math.ceil(Ye(wr)),Ci=se%1?2:se;if(isFinite(Wr-ni)){if(Le){for(;ni0;Ji--)er.push(it(ni)*Ji);for(ni=0;er[ni]<_r;ni++);for(Wr=er.length;er[Wr-1]>wr;Wr--);er=er.slice(ni,Wr)}return er},Nt.copy=function(){return us(X.copy(),se,Le,We)},In(Nt,X)}var Bs={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Js(e.scale.linear(),1,[0,1])};function Js(X,se,Le){var We=ol(se),Ye=ol(1/se);function it(Nt){return X(We(Nt))}return it.invert=function(Nt){return Ye(X.invert(Nt))},it.domain=function(Nt){return arguments.length?(X.domain((Le=Nt.map(Number)).map(We)),it):Le},it.ticks=function(Nt){return Hn(Le,Nt)},it.tickFormat=function(Nt,mt){return d3_scale_linearTickFormat(Le,Nt,mt)},it.nice=function(Nt){return it.domain(Vn(Le,Nt))},it.exponent=function(Nt){return arguments.length?(We=ol(se=Nt),Ye=ol(1/se),X.domain(Le.map(We)),it):se},it.copy=function(){return Js(X.copy(),se,Le)},In(it,X)}function ol(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 Cl([],{t:"range",a:[[]]})};function Cl(X,se){var Le,We,Ye;function it(mt){return We[((Le.get(mt)||(se.t==="range"?Le.set(mt,X.push(mt)):NaN))-1)%We.length]}function Nt(mt,er){return e.range(X.length).map(function(_r){return mt+er*_r})}return it.domain=function(mt){if(!arguments.length)return X;X=[],Le=new A;for(var er=-1,_r=mt.length,wr;++er<_r;)Le.has(wr=mt[er])||Le.set(wr,X.push(wr));return it[se.t].apply(it,se.a)},it.range=function(mt){return arguments.length?(We=mt,Ye=0,se={t:"range",a:arguments},it):We},it.rangePoints=function(mt,er){arguments.length<2&&(er=0);var _r=mt[0],wr=mt[1],ni=X.length<2?(_r=(_r+wr)/2,0):(wr-_r)/(X.length-1+er);return We=Nt(_r+ni*er/2,ni),Ye=0,se={t:"rangePoints",a:arguments},it},it.rangeRoundPoints=function(mt,er){arguments.length<2&&(er=0);var _r=mt[0],wr=mt[1],ni=X.length<2?(_r=wr=Math.round((_r+wr)/2),0):(wr-_r)/(X.length-1+er)|0;return We=Nt(_r+Math.round(ni*er/2+(wr-_r-(X.length-1+er)*ni)/2),ni),Ye=0,se={t:"rangeRoundPoints",a:arguments},it},it.rangeBands=function(mt,er,_r){arguments.length<2&&(er=0),arguments.length<3&&(_r=er);var wr=mt[1]0?Le[it-1]:X[0],itWr?0:1;if(wr<_r&&(ai=wr,wr=_r,_r=ai),Ci>=ye)return er(wr,Ji)+(_r?er(_r,1-Ji):"")+"Z";var ai,Ti,Bi,en,Wi=0,bi=0,ao,yo,Ko,Ms,vl,wl,au,Al,nu=[];if((en=(+Nt.apply(this,arguments)||0)/2)&&(Bi=We===Gs?Math.sqrt(_r*_r+wr*wr):+We.apply(this,arguments),Ji||(bi*=-1),wr&&(bi=qr(Bi/wr*Math.sin(en))),_r&&(Wi=qr(Bi/_r*Math.sin(en)))),wr){ao=wr*Math.cos(ni+bi),yo=wr*Math.sin(ni+bi),Ko=wr*Math.cos(Wr-bi),Ms=wr*Math.sin(Wr-bi);var Bu=Math.abs(Wr-ni-2*bi)<=Ie?0:1;if(bi&&xl(ao,yo,Ko,Ms)===Ji^Bu){var qu=(ni+Wr)/2;ao=wr*Math.cos(qu),yo=wr*Math.sin(qu),Ko=Ms=null}}else ao=yo=0;if(_r){vl=_r*Math.cos(Wr-Wi),wl=_r*Math.sin(Wr-Wi),au=_r*Math.cos(ni+Wi),Al=_r*Math.sin(ni+Wi);var Ju=Math.abs(ni-Wr+2*Wi)<=Ie?0:1;if(Wi&&xl(vl,wl,au,Al)===1-Ji^Ju){var qo=(ni+Wr)/2;vl=_r*Math.cos(qo),wl=_r*Math.sin(qo),au=Al=null}}else vl=wl=0;if(Ci>Fe&&(ai=Math.min(Math.abs(wr-_r)/2,+Le.apply(this,arguments)))>.001){Ti=_r0?0:1}function Uo(X,se,Le,We,Ye){var it=X[0]-se[0],Nt=X[1]-se[1],mt=(Ye?We:-We)/Math.sqrt(it*it+Nt*Nt),er=mt*Nt,_r=-mt*it,wr=X[0]+er,ni=X[1]+_r,Wr=se[0]+er,Ci=se[1]+_r,Ji=(wr+Wr)/2,ai=(ni+Ci)/2,Ti=Wr-wr,Bi=Ci-ni,en=Ti*Ti+Bi*Bi,Wi=Le-We,bi=wr*Ci-Wr*ni,ao=(Bi<0?-1:1)*Math.sqrt(Math.max(0,Wi*Wi*en-bi*bi)),yo=(bi*Bi-Ti*ao)/en,Ko=(-bi*Ti-Bi*ao)/en,Ms=(bi*Bi+Ti*ao)/en,vl=(-bi*Ti+Bi*ao)/en,wl=yo-Ji,au=Ko-ai,Al=Ms-Ji,nu=vl-ai;return wl*wl+au*au>Al*Al+nu*nu&&(yo=Ms,Ko=vl),[[yo-er,Ko-_r],[yo*Le/Wi,Ko*Le/Wi]]}function _s(){return!0}function Bl(X){var se=Hr,Le=na,We=_s,Ye=Dl,it=Ye.key,Nt=.7;function mt(er){var _r=[],wr=[],ni=-1,Wr=er.length,Ci,Ji=or(se),ai=or(Le);function Ti(){_r.push("M",Ye(X(wr),Nt))}for(;++ni1?X.join("L"):X+"Z"}function oe(X){return X.join("L")+"Z"}function w(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se1&&Ye.push("H",We[0]),Ye.join("")}function B(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se1){mt=se[1],it=X[er],er++,We+="C"+(Ye[0]+Nt[0])+","+(Ye[1]+Nt[1])+","+(it[0]-mt[0])+","+(it[1]-mt[1])+","+it[0]+","+it[1];for(var _r=2;_r9&&(it=Le*3/Math.sqrt(it),Nt[mt]=it*We,Nt[mt+1]=it*Ye));for(mt=-1;++mt<=er;)it=(X[Math.min(er,mt+1)][0]-X[Math.max(0,mt-1)][0])/(6*(1+Nt[mt]*Nt[mt])),se.push([it||0,Nt[mt]*it||0]);return se}function qt(X){return X.length<3?Dl(X):X[0]+$e(X,ft(X))}e.svg.line.radial=function(){var X=Bl(Xt);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Xt(X){for(var se,Le=-1,We=X.length,Ye,it;++LeIe)+",1 "+ni}function _r(wr,ni,Wr,Ci){return"Q 0,0 "+Ci}return it.radius=function(wr){return arguments.length?(Le=or(wr),it):Le},it.source=function(wr){return arguments.length?(X=or(wr),it):X},it.target=function(wr){return arguments.length?(se=or(wr),it):se},it.startAngle=function(wr){return arguments.length?(We=or(wr),it):We},it.endAngle=function(wr){return arguments.length?(Ye=or(wr),it):Ye},it};function $r(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Mr,Le=ii;function We(Ye,it){var Nt=X.call(this,Ye,it),mt=se.call(this,Ye,it),er=(Nt.y+mt.y)/2,_r=[Nt,{x:Nt.x,y:er},{x:mt.x,y:er},mt];return _r=_r.map(Le),"M"+_r[0]+"C"+_r[1]+" "+_r[2]+" "+_r[3]}return We.source=function(Ye){return arguments.length?(X=or(Ye),We):X},We.target=function(Ye){return arguments.length?(se=or(Ye),We):se},We.projection=function(Ye){return arguments.length?(Le=Ye,We):Le},We};function ii(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=ii,Le=X.projection;return X.projection=function(We){return arguments.length?Le(pi(se=We)):se},X};function pi(X){return function(){var se=X.apply(this,arguments),Le=se[0],We=se[1]-ue;return[Le*Math.cos(We),Le*Math.sin(We)]}}e.svg.symbol=function(){var X=wn,se=Yi;function Le(We,Ye){return(ua.get(X.call(this,We,Ye))||Tn)(se.call(this,We,Ye))}return Le.type=function(We){return arguments.length?(X=or(We),Le):X},Le.size=function(We){return arguments.length?(se=or(We),Le):se},Le};function Yi(){return 64}function wn(){return"circle"}function Tn(X){var se=Math.sqrt(X/Ie);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var ua=e.map({circle:Tn,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*el)),Le=se*el;return"M0,"+-se+"L"+Le+",0 0,"+se+" "+-Le+",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/oo),Le=se*oo/2;return"M0,"+Le+"L"+se+","+-Le+" "+-se+","+-Le+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/oo),Le=se*oo/2;return"M0,"+-Le+"L"+se+","+Le+" "+-se+","+Le+"Z"}});e.svg.symbolTypes=ua.keys();var oo=Math.sqrt(3),el=Math.tan(30*de);Re.transition=function(X){for(var se=Ll||++Hl,Le=Kl(X),We=[],Ye,it,Nt=Ql||{time:Date.now(),ease:Za,delay:0,duration:250},mt=-1,er=this.length;++mt0;)ni[--en].call(X,Bi);if(Ti>=1)return Nt.event&&Nt.event.end.call(X,X.__data__,se),--it.count?delete it[We]:delete X[Le],1}Nt||(mt=Ye.time,er=Wn(Wr,0,mt),Nt=it[We]={tween:new A,time:mt,timer:er,delay:Ye.delay,duration:Ye.duration,ease:Ye.ease,index:se},Ye=null,++it.count)}e.svg.axis=function(){var X=e.scale.linear(),se=tf,Le=6,We=6,Ye=3,it=[10],Nt=null,mt;function er(_r){_r.each(function(){var wr=e.select(this),ni=this.__chart__||X,Wr=this.__chart__=X.copy(),Ci=Nt==null?Wr.ticks?Wr.ticks.apply(Wr,it):Wr.domain():Nt,Ji=mt==null?Wr.tickFormat?Wr.tickFormat.apply(Wr,it):H:mt,ai=wr.selectAll(".tick").data(Ci,Wr),Ti=ai.enter().insert("g",".domain").attr("class","tick").style("opacity",Fe),Bi=e.transition(ai.exit()).style("opacity",Fe).remove(),en=e.transition(ai.order()).style("opacity",1),Wi=Math.max(Le,0)+Ye,bi,ao=Oi(Wr),yo=wr.selectAll(".domain").data([0]),Ko=(yo.enter().append("path").attr("class","domain"),e.transition(yo));Ti.append("line"),Ti.append("text");var Ms=Ti.select("line"),vl=en.select("line"),wl=ai.select("text").text(Ji),au=Ti.select("text"),Al=en.select("text"),nu=se==="top"||se==="left"?-1:1,Bu,qu,Ju,qo;if(se==="bottom"||se==="top"?(bi=Gu,Bu="x",Ju="y",qu="x2",qo="y2",wl.attr("dy",nu<0?"0em":".71em").style("text-anchor","middle"),Ko.attr("d","M"+ao[0]+","+nu*We+"V0H"+ao[1]+"V"+nu*We)):(bi=Wu,Bu="y",Ju="x",qu="y2",qo="x2",wl.attr("dy",".32em").style("text-anchor",nu<0?"end":"start"),Ko.attr("d","M"+nu*We+","+ao[0]+"H0V"+ao[1]+"H"+nu*We)),Ms.attr(qo,nu*Le),au.attr(Ju,nu*Wi),vl.attr(qu,0).attr(qo,nu*Le),Al.attr(Bu,0).attr(Ju,nu*Wi),Wr.rangeBand){var Rl=Wr,pu=Rl.rangeBand()/2;ni=Wr=function(xu){return Rl(xu)+pu}}else ni.rangeBand?ni=Wr:Bi.call(bi,Wr,ni);Ti.call(bi,ni,Wr),en.call(bi,Wr,Wr)})}return er.scale=function(_r){return arguments.length?(X=_r,er):X},er.orient=function(_r){return arguments.length?(se=_r in Ku?_r+"":tf,er):se},er.ticks=function(){return arguments.length?(it=r(arguments),er):it},er.tickValues=function(_r){return arguments.length?(Nt=_r,er):Nt},er.tickFormat=function(_r){return arguments.length?(mt=_r,er):mt},er.tickSize=function(_r){var wr=arguments.length;return wr?(Le=+_r,We=+arguments[wr-1],er):Le},er.innerTickSize=function(_r){return arguments.length?(Le=+_r,er):Le},er.outerTickSize=function(_r){return arguments.length?(We=+_r,er):We},er.tickPadding=function(_r){return arguments.length?(Ye=+_r,er):Ye},er.tickSubdivide=function(){return arguments.length&&er},er};var tf="bottom",Ku={top:1,right:1,bottom:1,left:1};function Gu(X,se,Le){X.attr("transform",function(We){var Ye=se(We);return"translate("+(isFinite(Ye)?Ye:Le(We))+",0)"})}function Wu(X,se,Le){X.attr("transform",function(We){var Ye=se(We);return"translate(0,"+(isFinite(Ye)?Ye:Le(We))+")"})}e.svg.brush=function(){var X=Ce(wr,"brushstart","brush","brushend"),se=null,Le=null,We=[0,0],Ye=[0,0],it,Nt,mt=!0,er=!0,_r=gf[0];function wr(ai){ai.each(function(){var Ti=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ji).on("touchstart.brush",Ji),Bi=Ti.selectAll(".background").data([0]);Bi.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ti.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var en=Ti.selectAll(".resize").data(_r,H);en.exit().remove(),en.enter().append("g").attr("class",function(yo){return"resize "+yo}).style("cursor",function(yo){return sf[yo]}).append("rect").attr("x",function(yo){return/[ew]$/.test(yo)?-3:null}).attr("y",function(yo){return/^[ns]/.test(yo)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),en.style("display",wr.empty()?"none":null);var Wi=e.transition(Ti),bi=e.transition(Bi),ao;se&&(ao=Oi(se),bi.attr("x",ao[0]).attr("width",ao[1]-ao[0]),Wr(Wi)),Le&&(ao=Oi(Le),bi.attr("y",ao[0]).attr("height",ao[1]-ao[0]),Ci(Wi)),ni(Wi)})}wr.event=function(ai){ai.each(function(){var Ti=X.of(this,arguments),Bi={x:We,y:Ye,i:it,j:Nt},en=this.__chart__||Bi;this.__chart__=Bi,Ll?e.select(this).transition().each("start.brush",function(){it=en.i,Nt=en.j,We=en.x,Ye=en.y,Ti({type:"brushstart"})}).tween("brush:brush",function(){var Wi=ba(We,Bi.x),bi=ba(Ye,Bi.y);return it=Nt=null,function(ao){We=Bi.x=Wi(ao),Ye=Bi.y=bi(ao),Ti({type:"brush",mode:"resize"})}}).each("end.brush",function(){it=Bi.i,Nt=Bi.j,Ti({type:"brush",mode:"resize"}),Ti({type:"brushend"})}):(Ti({type:"brushstart"}),Ti({type:"brush",mode:"resize"}),Ti({type:"brushend"}))})};function ni(ai){ai.selectAll(".resize").attr("transform",function(Ti){return"translate("+We[+/e$/.test(Ti)]+","+Ye[+/^s/.test(Ti)]+")"})}function Wr(ai){ai.select(".extent").attr("x",We[0]),ai.selectAll(".extent,.n>rect,.s>rect").attr("width",We[1]-We[0])}function Ci(ai){ai.select(".extent").attr("y",Ye[0]),ai.selectAll(".extent,.e>rect,.w>rect").attr("height",Ye[1]-Ye[0])}function Ji(){var ai=this,Ti=e.select(e.event.target),Bi=X.of(ai,arguments),en=e.select(ai),Wi=Ti.datum(),bi=!/^(n|s)$/.test(Wi)&&se,ao=!/^(e|w)$/.test(Wi)&&Le,yo=Ti.classed("extent"),Ko=fr(ai),Ms,vl=e.mouse(ai),wl,au=e.select(a(ai)).on("keydown.brush",Bu).on("keyup.brush",qu);if(e.event.changedTouches?au.on("touchmove.brush",Ju).on("touchend.brush",Rl):au.on("mousemove.brush",Ju).on("mouseup.brush",Rl),en.interrupt().selectAll("*").interrupt(),yo)vl[0]=We[0]-vl[0],vl[1]=Ye[0]-vl[1];else if(Wi){var Al=+/w$/.test(Wi),nu=+/^n/.test(Wi);wl=[We[1-Al]-vl[0],Ye[1-nu]-vl[1]],vl[0]=We[Al],vl[1]=Ye[nu]}else e.event.altKey&&(Ms=vl.slice());en.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ti.style("cursor")),Bi({type:"brushstart"}),Ju();function Bu(){e.event.keyCode==32&&(yo||(Ms=null,vl[0]-=We[1],vl[1]-=Ye[1],yo=2),be())}function qu(){e.event.keyCode==32&&yo==2&&(vl[0]+=We[1],vl[1]+=Ye[1],yo=0,be())}function Ju(){var pu=e.mouse(ai),xu=!1;wl&&(pu[0]+=wl[0],pu[1]+=wl[1]),yo||(e.event.altKey?(Ms||(Ms=[(We[0]+We[1])/2,(Ye[0]+Ye[1])/2]),vl[0]=We[+(pu[0]{(function(e,t){typeof rL=="object"&&typeof hee!="undefined"?t(rL):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(rL,function(e){"use strict";var t=new Date,r=new Date;function n(Te,nt,ut,ct){function rt(je){return Te(je=arguments.length===0?new Date:new Date(+je)),je}return rt.floor=function(je){return Te(je=new Date(+je)),je},rt.ceil=function(je){return Te(je=new Date(je-1)),nt(je,1),Te(je),je},rt.round=function(je){var tt=rt(je),Je=rt.ceil(je);return je-tt0))return Mt;do Mt.push(Vt=new Date(+je)),nt(je,Je),Te(je);while(Vt=tt)for(;Te(tt),!je(tt);)tt.setTime(tt-1)},function(tt,Je){if(tt>=tt)if(Je<0)for(;++Je<=0;)for(;nt(tt,-1),!je(tt););else for(;--Je>=0;)for(;nt(tt,1),!je(tt););})},ut&&(rt.count=function(je,tt){return t.setTime(+je),r.setTime(+tt),Te(t),Te(r),Math.floor(ut(t,r))},rt.every=function(je){return je=Math.floor(je),!isFinite(je)||!(je>0)?null:je>1?rt.filter(ct?function(tt){return ct(tt)%je===0}:function(tt){return rt.count(0,tt)%je===0}):rt}),rt}var i=n(function(){},function(Te,nt){Te.setTime(+Te+nt)},function(Te,nt){return nt-Te});i.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(nt){nt.setTime(Math.floor(nt/Te)*Te)},function(nt,ut){nt.setTime(+nt+ut*Te)},function(nt,ut){return(ut-nt)/Te}):i};var a=i.range,o=1e3,s=6e4,u=36e5,l=864e5,f=6048e5,c=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,nt){Te.setTime(+Te+nt*o)},function(Te,nt){return(nt-Te)/o},function(Te){return Te.getUTCSeconds()}),h=c.range,d=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,nt){Te.setTime(+Te+nt*s)},function(Te,nt){return(nt-Te)/s},function(Te){return Te.getMinutes()}),p=d.range,x=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,nt){Te.setTime(+Te+nt*u)},function(Te,nt){return(nt-Te)/u},function(Te){return Te.getHours()}),b=x.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,nt){Te.setDate(Te.getDate()+nt)},function(Te,nt){return(nt-Te-(nt.getTimezoneOffset()-Te.getTimezoneOffset())*s)/l},function(Te){return Te.getDate()-1}),E=y.range;function k(Te){return n(function(nt){nt.setDate(nt.getDate()-(nt.getDay()+7-Te)%7),nt.setHours(0,0,0,0)},function(nt,ut){nt.setDate(nt.getDate()+ut*7)},function(nt,ut){return(ut-nt-(ut.getTimezoneOffset()-nt.getTimezoneOffset())*s)/f})}var A=k(0),L=k(1),_=k(2),C=k(3),M=k(4),v=k(5),z=k(6),T=A.range,F=L.range,q=_.range,U=C.range,H=M.range,j=v.range,G=z.range,O=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,nt){Te.setMonth(Te.getMonth()+nt)},function(Te,nt){return nt.getMonth()-Te.getMonth()+(nt.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),W=O.range,re=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,nt){Te.setFullYear(Te.getFullYear()+nt)},function(Te,nt){return nt.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});re.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(nt){nt.setFullYear(Math.floor(nt.getFullYear()/Te)*Te),nt.setMonth(0,1),nt.setHours(0,0,0,0)},function(nt,ut){nt.setFullYear(nt.getFullYear()+ut*Te)})};var ne=re.range,be=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,nt){Te.setTime(+Te+nt*s)},function(Te,nt){return(nt-Te)/s},function(Te){return Te.getUTCMinutes()}),ze=be.range,Ce=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,nt){Te.setTime(+Te+nt*u)},function(Te,nt){return(nt-Te)/u},function(Te){return Te.getUTCHours()}),he=Ce.range,te=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCDate(Te.getUTCDate()+nt)},function(Te,nt){return(nt-Te)/l},function(Te){return Te.getUTCDate()-1}),ke=te.range;function Ee(Te){return n(function(nt){nt.setUTCDate(nt.getUTCDate()-(nt.getUTCDay()+7-Te)%7),nt.setUTCHours(0,0,0,0)},function(nt,ut){nt.setUTCDate(nt.getUTCDate()+ut*7)},function(nt,ut){return(ut-nt)/f})}var Me=Ee(0),Oe=Ee(1),Re=Ee(2),me=Ee(3),Be=Ee(4),fe=Ee(5),Ze=Ee(6),et=Me.range,gt=Oe.range,Pt=Re.range,Qe=me.range,Xe=Be.range,Tt=fe.range,xt=Ze.range,_t=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCMonth(Te.getUTCMonth()+nt)},function(Te,nt){return nt.getUTCMonth()-Te.getUTCMonth()+(nt.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),Ct=_t.range,jt=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCFullYear(Te.getUTCFullYear()+nt)},function(Te,nt){return nt.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});jt.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(nt){nt.setUTCFullYear(Math.floor(nt.getUTCFullYear()/Te)*Te),nt.setUTCMonth(0,1),nt.setUTCHours(0,0,0,0)},function(nt,ut){nt.setUTCFullYear(nt.getUTCFullYear()+ut*Te)})};var At=jt.range;e.timeDay=y,e.timeDays=E,e.timeFriday=v,e.timeFridays=j,e.timeHour=x,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=F,e.timeMonth=O,e.timeMonths=W,e.timeSaturday=z,e.timeSaturdays=G,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=A,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=H,e.timeTuesday=_,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=A,e.timeWeeks=T,e.timeYear=re,e.timeYears=ne,e.utcDay=te,e.utcDays=ke,e.utcFriday=fe,e.utcFridays=Tt,e.utcHour=Ce,e.utcHours=he,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=be,e.utcMinutes=ze,e.utcMonday=Oe,e.utcMondays=gt,e.utcMonth=_t,e.utcMonths=Ct,e.utcSaturday=Ze,e.utcSaturdays=xt,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=Me,e.utcSundays=et,e.utcThursday=Be,e.utcThursdays=Xe,e.utcTuesday=Re,e.utcTuesdays=Pt,e.utcWednesday=me,e.utcWednesdays=Qe,e.utcWeek=Me,e.utcWeeks=et,e.utcYear=jt,e.utcYears=At,Object.defineProperty(e,"__esModule",{value:!0})})});var e3=Se((iL,dee)=>{(function(e,t){typeof iL=="object"&&typeof dee!="undefined"?t(iL,wB()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(iL,function(e,t){"use strict";function r(_e){if(0<=_e.y&&_e.y<100){var Fe=new Date(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L);return Fe.setFullYear(_e.y),Fe}return new Date(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L)}function n(_e){if(0<=_e.y&&_e.y<100){var Fe=new Date(Date.UTC(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L));return Fe.setUTCFullYear(_e.y),Fe}return new Date(Date.UTC(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L))}function i(_e,Fe,Pe){return{y:_e,m:Fe,d:Pe,H:0,M:0,S:0,L:0}}function a(_e){var Fe=_e.dateTime,Pe=_e.date,Ie=_e.time,lt=_e.periods,ye=_e.days,ue=_e.shortDays,de=_e.months,ht=_e.shortMonths,Et=h(lt),St=d(lt),Zt=h(ye),qr=d(ye),Lr=h(ue),vr=d(ue),Er=h(de),si=d(de),Ei=h(ht),Si=d(ht),xi={a:Br,A:oi,b:vi,B:Pi,c:null,d:O,e:O,f:ze,H:W,I:re,j:ne,L:be,m:Ce,M:he,p:Yr,q:Ni,Q:tt,s:Je,S:te,u:ke,U:Ee,V:Me,w:Oe,W:Re,x:null,X:null,y:me,Y:Be,Z:fe,"%":je},Hi={a:Ur,A:ti,b:ki,B:ji,c:null,d:Ze,e:Ze,f:Xe,H:et,I:gt,j:Pt,L:Qe,m:Tt,M:xt,p:Vi,q:zi,Q:tt,s:Je,S:_t,u:Ct,U:jt,V:At,w:Te,W:nt,x:null,X:null,y:ut,Y:ct,Z:rt,"%":je},Jr={a:Dt,A:Bt,b:sr,B:br,c:zr,d:M,e:M,f:U,H:z,I:z,j:v,L:q,m:C,M:T,p:vt,q:_,Q:j,s:G,S:F,u:x,U:b,V:y,w:p,W:E,x:Tr,X:Rr,y:A,Y:k,Z:L,"%":H};xi.x=ci(Pe,xi),xi.X=ci(Ie,xi),xi.c=ci(Fe,xi),Hi.x=ci(Pe,Hi),Hi.X=ci(Ie,Hi),Hi.c=ci(Fe,Hi);function ci(Mi,sn){return function(fi){var Or=[],st=-1,Wt=0,tr=Mi.length,or,Nr,hi;for(fi instanceof Date||(fi=new Date(+fi));++st53)return null;"w"in Or||(Or.w=1),"Z"in Or?(Wt=n(i(Or.y,0,1)),tr=Wt.getUTCDay(),Wt=tr>4||tr===0?t.utcMonday.ceil(Wt):t.utcMonday(Wt),Wt=t.utcDay.offset(Wt,(Or.V-1)*7),Or.y=Wt.getUTCFullYear(),Or.m=Wt.getUTCMonth(),Or.d=Wt.getUTCDate()+(Or.w+6)%7):(Wt=r(i(Or.y,0,1)),tr=Wt.getDay(),Wt=tr>4||tr===0?t.timeMonday.ceil(Wt):t.timeMonday(Wt),Wt=t.timeDay.offset(Wt,(Or.V-1)*7),Or.y=Wt.getFullYear(),Or.m=Wt.getMonth(),Or.d=Wt.getDate()+(Or.w+6)%7)}else("W"in Or||"U"in Or)&&("w"in Or||(Or.w="u"in Or?Or.u%7:"W"in Or?1:0),tr="Z"in Or?n(i(Or.y,0,1)).getUTCDay():r(i(Or.y,0,1)).getDay(),Or.m=0,Or.d="W"in Or?(Or.w+6)%7+Or.W*7-(tr+5)%7:Or.w+Or.U*7-(tr+6)%7);return"Z"in Or?(Or.H+=Or.Z/100|0,Or.M+=Or.Z%100,n(Or)):r(Or)}}function Lt(Mi,sn,fi,Or){for(var st=0,Wt=sn.length,tr=fi.length,or,Nr;st=tr)return-1;if(or=sn.charCodeAt(st++),or===37){if(or=sn.charAt(st++),Nr=Jr[or in o?sn.charAt(st++):or],!Nr||(Or=Nr(Mi,fi,Or))<0)return-1}else if(or!=fi.charCodeAt(Or++))return-1}return Or}function vt(Mi,sn,fi){var Or=Et.exec(sn.slice(fi));return Or?(Mi.p=St[Or[0].toLowerCase()],fi+Or[0].length):-1}function Dt(Mi,sn,fi){var Or=Lr.exec(sn.slice(fi));return Or?(Mi.w=vr[Or[0].toLowerCase()],fi+Or[0].length):-1}function Bt(Mi,sn,fi){var Or=Zt.exec(sn.slice(fi));return Or?(Mi.w=qr[Or[0].toLowerCase()],fi+Or[0].length):-1}function sr(Mi,sn,fi){var Or=Ei.exec(sn.slice(fi));return Or?(Mi.m=Si[Or[0].toLowerCase()],fi+Or[0].length):-1}function br(Mi,sn,fi){var Or=Er.exec(sn.slice(fi));return Or?(Mi.m=si[Or[0].toLowerCase()],fi+Or[0].length):-1}function zr(Mi,sn,fi){return Lt(Mi,Fe,sn,fi)}function Tr(Mi,sn,fi){return Lt(Mi,Pe,sn,fi)}function Rr(Mi,sn,fi){return Lt(Mi,Ie,sn,fi)}function Br(Mi){return ue[Mi.getDay()]}function oi(Mi){return ye[Mi.getDay()]}function vi(Mi){return ht[Mi.getMonth()]}function Pi(Mi){return de[Mi.getMonth()]}function Yr(Mi){return lt[+(Mi.getHours()>=12)]}function Ni(Mi){return 1+~~(Mi.getMonth()/3)}function Ur(Mi){return ue[Mi.getUTCDay()]}function ti(Mi){return ye[Mi.getUTCDay()]}function ki(Mi){return ht[Mi.getUTCMonth()]}function ji(Mi){return de[Mi.getUTCMonth()]}function Vi(Mi){return lt[+(Mi.getUTCHours()>=12)]}function zi(Mi){return 1+~~(Mi.getUTCMonth()/3)}return{format:function(Mi){var sn=ci(Mi+="",xi);return sn.toString=function(){return Mi},sn},parse:function(Mi){var sn=Di(Mi+="",!1);return sn.toString=function(){return Mi},sn},utcFormat:function(Mi){var sn=ci(Mi+="",Hi);return sn.toString=function(){return Mi},sn},utcParse:function(Mi){var sn=Di(Mi+="",!0);return sn.toString=function(){return Mi},sn}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,u=/^%/,l=/[\\^$*+?|[\]().{}]/g;function f(_e,Fe,Pe){var Ie=_e<0?"-":"",lt=(Ie?-_e:_e)+"",ye=lt.length;return Ie+(ye68?1900:2e3),Pe+Ie[0].length):-1}function L(_e,Fe,Pe){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Fe.slice(Pe,Pe+6));return Ie?(_e.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Pe+Ie[0].length):-1}function _(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+1));return Ie?(_e.q=Ie[0]*3-3,Pe+Ie[0].length):-1}function C(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.m=Ie[0]-1,Pe+Ie[0].length):-1}function M(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.d=+Ie[0],Pe+Ie[0].length):-1}function v(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+3));return Ie?(_e.m=0,_e.d=+Ie[0],Pe+Ie[0].length):-1}function z(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.H=+Ie[0],Pe+Ie[0].length):-1}function T(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.M=+Ie[0],Pe+Ie[0].length):-1}function F(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.S=+Ie[0],Pe+Ie[0].length):-1}function q(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+3));return Ie?(_e.L=+Ie[0],Pe+Ie[0].length):-1}function U(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+6));return Ie?(_e.L=Math.floor(Ie[0]/1e3),Pe+Ie[0].length):-1}function H(_e,Fe,Pe){var Ie=u.exec(Fe.slice(Pe,Pe+1));return Ie?Pe+Ie[0].length:-1}function j(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe));return Ie?(_e.Q=+Ie[0],Pe+Ie[0].length):-1}function G(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe));return Ie?(_e.s=+Ie[0],Pe+Ie[0].length):-1}function O(_e,Fe){return f(_e.getDate(),Fe,2)}function W(_e,Fe){return f(_e.getHours(),Fe,2)}function re(_e,Fe){return f(_e.getHours()%12||12,Fe,2)}function ne(_e,Fe){return f(1+t.timeDay.count(t.timeYear(_e),_e),Fe,3)}function be(_e,Fe){return f(_e.getMilliseconds(),Fe,3)}function ze(_e,Fe){return be(_e,Fe)+"000"}function Ce(_e,Fe){return f(_e.getMonth()+1,Fe,2)}function he(_e,Fe){return f(_e.getMinutes(),Fe,2)}function te(_e,Fe){return f(_e.getSeconds(),Fe,2)}function ke(_e){var Fe=_e.getDay();return Fe===0?7:Fe}function Ee(_e,Fe){return f(t.timeSunday.count(t.timeYear(_e)-1,_e),Fe,2)}function Me(_e,Fe){var Pe=_e.getDay();return _e=Pe>=4||Pe===0?t.timeThursday(_e):t.timeThursday.ceil(_e),f(t.timeThursday.count(t.timeYear(_e),_e)+(t.timeYear(_e).getDay()===4),Fe,2)}function Oe(_e){return _e.getDay()}function Re(_e,Fe){return f(t.timeMonday.count(t.timeYear(_e)-1,_e),Fe,2)}function me(_e,Fe){return f(_e.getFullYear()%100,Fe,2)}function Be(_e,Fe){return f(_e.getFullYear()%1e4,Fe,4)}function fe(_e){var Fe=_e.getTimezoneOffset();return(Fe>0?"-":(Fe*=-1,"+"))+f(Fe/60|0,"0",2)+f(Fe%60,"0",2)}function Ze(_e,Fe){return f(_e.getUTCDate(),Fe,2)}function et(_e,Fe){return f(_e.getUTCHours(),Fe,2)}function gt(_e,Fe){return f(_e.getUTCHours()%12||12,Fe,2)}function Pt(_e,Fe){return f(1+t.utcDay.count(t.utcYear(_e),_e),Fe,3)}function Qe(_e,Fe){return f(_e.getUTCMilliseconds(),Fe,3)}function Xe(_e,Fe){return Qe(_e,Fe)+"000"}function Tt(_e,Fe){return f(_e.getUTCMonth()+1,Fe,2)}function xt(_e,Fe){return f(_e.getUTCMinutes(),Fe,2)}function _t(_e,Fe){return f(_e.getUTCSeconds(),Fe,2)}function Ct(_e){var Fe=_e.getUTCDay();return Fe===0?7:Fe}function jt(_e,Fe){return f(t.utcSunday.count(t.utcYear(_e)-1,_e),Fe,2)}function At(_e,Fe){var Pe=_e.getUTCDay();return _e=Pe>=4||Pe===0?t.utcThursday(_e):t.utcThursday.ceil(_e),f(t.utcThursday.count(t.utcYear(_e),_e)+(t.utcYear(_e).getUTCDay()===4),Fe,2)}function Te(_e){return _e.getUTCDay()}function nt(_e,Fe){return f(t.utcMonday.count(t.utcYear(_e)-1,_e),Fe,2)}function ut(_e,Fe){return f(_e.getUTCFullYear()%100,Fe,2)}function ct(_e,Fe){return f(_e.getUTCFullYear()%1e4,Fe,4)}function rt(){return"+0000"}function je(){return"%"}function tt(_e){return+_e}function Je(_e){return Math.floor(+_e/1e3)}var Mt;Vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Vt(_e){return Mt=a(_e),e.timeFormat=Mt.format,e.timeParse=Mt.parse,e.utcFormat=Mt.utcFormat,e.utcParse=Mt.utcParse,Mt}var Kt="%Y-%m-%dT%H:%M:%S.%LZ";function ir(_e){return _e.toISOString()}var fr=Date.prototype.toISOString?ir:e.utcFormat(Kt);function Ot(_e){var Fe=new Date(_e);return isNaN(Fe)?null:Fe}var De=+new Date("2000-01-01T00:00:00.000Z")?Ot:e.utcParse(Kt);e.isoFormat=fr,e.isoParse=De,e.timeFormatDefaultLocale=Vt,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var TB=Se((nL,pee)=>{(function(e,t){typeof nL=="object"&&typeof pee!="undefined"?t(nL):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(nL,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((v=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var v,z=C.slice(0,v);return[z.length>1?z[0]+z.slice(2):z,+C.slice(v+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(v,z){for(var T=v.length,F=[],q=0,U=C[0],H=0;T>0&&U>0&&(H+U+1>z&&(U=Math.max(1,z-H)),F.push(v.substring(T-=U,T+U)),!((H+=U+1)>z));)U=C[q=(q+1)%C.length];return F.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(v){return C[+v]})}}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 u({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=u.prototype;function u(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+""}u.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 l(C){e:for(var M=C.length,v=1,z=-1,T;v0&&(z=0);break}return z>0?C.slice(0,z)+C.slice(T+1):C}var f;function c(C,M){var v=r(C,M);if(!v)return C+"";var z=v[0],T=v[1],F=T-(f=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,q=z.length;return F===q?z:F>q?z+new Array(F-q+1).join("0"):F>0?z.slice(0,F)+"."+z.slice(F):"0."+new Array(1-F).join("0")+r(C,Math.max(0,M+F-1))[0]}function h(C,M){var v=r(C,M);if(!v)return C+"";var z=v[0],T=v[1];return T<0?"0."+new Array(-T).join("0")+z:z.length>T+1?z.slice(0,T+1)+"."+z.slice(T+1):z+new Array(T-z.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:c,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function p(C){return C}var x=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(C){var M=C.grouping===void 0||C.thousands===void 0?p:i(x.call(C.grouping,Number),C.thousands+""),v=C.currency===void 0?"":C.currency[0]+"",z=C.currency===void 0?"":C.currency[1]+"",T=C.decimal===void 0?".":C.decimal+"",F=C.numerals===void 0?p:a(x.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",U=C.minus===void 0?"-":C.minus+"",H=C.nan===void 0?"NaN":C.nan+"";function j(O){O=s(O);var W=O.fill,re=O.align,ne=O.sign,be=O.symbol,ze=O.zero,Ce=O.width,he=O.comma,te=O.precision,ke=O.trim,Ee=O.type;Ee==="n"?(he=!0,Ee="g"):d[Ee]||(te===void 0&&(te=12),ke=!0,Ee="g"),(ze||W==="0"&&re==="=")&&(ze=!0,W="0",re="=");var Me=be==="$"?v:be==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",Oe=be==="$"?z:/[%p]/.test(Ee)?q:"",Re=d[Ee],me=/[defgprs%]/.test(Ee);te=te===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te));function Be(fe){var Ze=Me,et=Oe,gt,Pt,Qe;if(Ee==="c")et=Re(fe)+et,fe="";else{fe=+fe;var Xe=fe<0||1/fe<0;if(fe=isNaN(fe)?H:Re(Math.abs(fe),te),ke&&(fe=l(fe)),Xe&&+fe==0&&ne!=="+"&&(Xe=!1),Ze=(Xe?ne==="("?ne:U:ne==="-"||ne==="("?"":ne)+Ze,et=(Ee==="s"?b[8+f/3]:"")+et+(Xe&&ne==="("?")":""),me){for(gt=-1,Pt=fe.length;++gtQe||Qe>57){et=(Qe===46?T+fe.slice(gt+1):fe.slice(gt))+et,fe=fe.slice(0,gt);break}}}he&&!ze&&(fe=M(fe,1/0));var Tt=Ze.length+fe.length+et.length,xt=Tt>1)+Ze+fe+et+xt.slice(Tt);break;default:fe=xt+Ze+fe+et;break}return F(fe)}return Be.toString=function(){return O+""},Be}function G(O,W){var re=j((O=s(O),O.type="f",O)),ne=Math.max(-8,Math.min(8,Math.floor(n(W)/3)))*3,be=Math.pow(10,-ne),ze=b[8+ne/3];return function(Ce){return re(be*Ce)+ze}}return{format:j,formatPrefix:G}}var E;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(C){return E=y(C),e.format=E.format,e.formatPrefix=E.formatPrefix,E}function A(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 _(C,M){return C=Math.abs(C),M=Math.abs(M)-C,Math.max(0,n(M)-n(C))+1}e.FormatSpecifier=u,e.formatDefaultLocale=k,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=A,e.precisionPrefix=L,e.precisionRound=_,Object.defineProperty(e,"__esModule",{value:!0})})});var yee=Se((etr,vee)=>{"use strict";vee.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 _u=Se((ttr,mee)=>{"use strict";var Let=yee();mee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Let(r))return!1}else if(t!=="number")return!1;return e-e<1}});var ju=Se((rtr,gee)=>{"use strict";gee.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 AB=Se((aL,_ee)=>{(function(e,t){typeof aL=="object"&&typeof _ee!="undefined"?t(aL):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(aL,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],f+=t[(s[u]&3)<<4|s[u+1]>>4],f+=t[(s[u+1]&15)<<2|s[u+2]>>6],f+=t[s[u+2]&63];return l%3===2?f=f.substring(0,f.length-1)+"=":l%3===1&&(f=f.substring(0,f.length-2)+"=="),f},a=function(o){var s=o.length*.75,u=o.length,l,f=0,c,h,d,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var x=new ArrayBuffer(s),b=new Uint8Array(x);for(l=0;l>4,b[f++]=(h&15)<<4|d>>2,b[f++]=(d&3)<<6|p&63;return x};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var yg=Se((itr,xee)=>{"use strict";xee.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 yp=Se(my=>{"use strict";var zet=AB().decode,Pet=yg(),SB=Array.isArray,Iet=ArrayBuffer,Det=DataView;function bee(e){return Iet.isView(e)&&!(e instanceof Det)}my.isTypedArray=bee;function oL(e){return SB(e)||bee(e)}my.isArrayOrTypedArray=oL;function Ret(e){return!oL(e[0])}my.isArray1D=Ret;my.ensureArray=function(e,t){return SB(e)||(e=[]),e.length=t,e};var Pd={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};Pd.uint8c=Pd.u1c;Pd.uint8=Pd.u1;Pd.int8=Pd.i1;Pd.uint16=Pd.u2;Pd.int16=Pd.i2;Pd.uint32=Pd.u4;Pd.int32=Pd.i4;Pd.float32=Pd.f4;Pd.float64=Pd.f8;function MB(e){return e.constructor===ArrayBuffer}my.isArrayBuffer=MB;my.decodeTypedArraySpec=function(e){var t=[],r=Fet(e),n=r.dtype,i=Pd[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;MB(o)||(o=zet(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var u=s.length,l,f,c=+s[0],h=a*c,d=0;if(u===1)t=new i(o);else if(u===2)for(l=+s[1],f=0;f{"use strict";var Tee=_u(),kB=yp().isArrayOrTypedArray;Eee.exports=function(t,r){if(Tee(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var t3=EM(),Uet=/^\w*$/,Vet=0,kee=1,sL=2,Cee=3,ob=4;Lee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,u={};r&&r.length?(s=t3(t,r),o=s.get()):o=t,r=r||"";var l={};if(o)for(a=0;a2)return u[d]=u[d]|sL,c.set(h,null);if(f){for(a=d;a{"use strict";var Het=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Get=/^[^\.\[\]]+$/;Pee.exports=function(e,t){for(;t;){var r=e.match(Het);if(r)e=r[1];else if(e.match(Get))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 lL=Se((ltr,Dee)=>{"use strict";var Wet=_u();Dee.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 Wet(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var qee=Se((utr,Fee)=>{"use strict";var Ree=yp().isArrayOrTypedArray,kM=yg();Fee.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(Ree(i)&&Ree(a)&&kM(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function jet(e,t){var r=e%t;return r<0?r+t:r}function Zet(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Bee.exports={mod:jet,modHalf:Zet}});var cd=Se((ctr,uL)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function u(me,Be){if(me=me||"",Be=Be||{},me instanceof u)return me;if(!(this instanceof u))return new u(me,Be);var fe=l(me);this._originalInput=me,this._r=fe.r,this._g=fe.g,this._b=fe.b,this._a=fe.a,this._roundA=i(100*this._a)/100,this._format=Be.format||fe.format,this._gradientType=Be.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=fe.ok,this._tc_id=n++}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),Be,fe,Ze,et,gt,Pt;return Be=me.r/255,fe=me.g/255,Ze=me.b/255,Be<=.03928?et=Be/12.92:et=e.pow((Be+.055)/1.055,2.4),fe<=.03928?gt=fe/12.92:gt=e.pow((fe+.055)/1.055,2.4),Ze<=.03928?Pt=Ze/12.92:Pt=e.pow((Ze+.055)/1.055,2.4),.2126*et+.7152*gt+.0722*Pt},setAlpha:function(me){return this._a=O(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),Be=i(me.h*360),fe=i(me.s*100),Ze=i(me.v*100);return this._a==1?"hsv("+Be+", "+fe+"%, "+Ze+"%)":"hsva("+Be+", "+fe+"%, "+Ze+"%, "+this._roundA+")"},toHsl:function(){var me=c(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=c(this._r,this._g,this._b),Be=i(me.h*360),fe=i(me.s*100),Ze=i(me.l*100);return this._a==1?"hsl("+Be+", "+fe+"%, "+Ze+"%)":"hsla("+Be+", "+fe+"%, "+Ze+"%, "+this._roundA+")"},toHex:function(me){return x(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(W(this._r,255)*100)+"%",g:i(W(this._g,255)*100)+"%",b:i(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%)":"rgba("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var Be="#"+y(this._r,this._g,this._b,this._a),fe=Be,Ze=this._gradientType?"GradientType = 1, ":"";if(me){var et=u(me);fe="#"+y(et._r,et._g,et._b,et._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ze+"startColorstr="+Be+",endColorstr="+fe+")"},toString:function(me){var Be=!!me;me=me||this._format;var fe=!1,Ze=this._a<1&&this._a>=0,et=!Be&&Ze&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return et?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(fe=this.toRgbString()),me==="prgb"&&(fe=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(fe=this.toHexString()),me==="hex3"&&(fe=this.toHexString(!0)),me==="hex4"&&(fe=this.toHex8String(!0)),me==="hex8"&&(fe=this.toHex8String()),me==="name"&&(fe=this.toName()),me==="hsl"&&(fe=this.toHslString()),me==="hsv"&&(fe=this.toHsvString()),fe||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(me,Be){var fe=me.apply(null,[this].concat([].slice.call(Be)));return this._r=fe._r,this._g=fe._g,this._b=fe._b,this.setAlpha(fe._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(E,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,Be){return me.apply(null,[this].concat([].slice.call(Be)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(z,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},u.fromRatio=function(me,Be){if(typeof me=="object"){var fe={};for(var Ze in me)me.hasOwnProperty(Ze)&&(Ze==="a"?fe[Ze]=me[Ze]:fe[Ze]=he(me[Ze]));me=fe}return u(me,Be)};function l(me){var Be={r:0,g:0,b:0},fe=1,Ze=null,et=null,gt=null,Pt=!1,Qe=!1;return typeof me=="string"&&(me=Oe(me)),typeof me=="object"&&(Me(me.r)&&Me(me.g)&&Me(me.b)?(Be=f(me.r,me.g,me.b),Pt=!0,Qe=String(me.r).substr(-1)==="%"?"prgb":"rgb"):Me(me.h)&&Me(me.s)&&Me(me.v)?(Ze=he(me.s),et=he(me.v),Be=p(me.h,Ze,et),Pt=!0,Qe="hsv"):Me(me.h)&&Me(me.s)&&Me(me.l)&&(Ze=he(me.s),gt=he(me.l),Be=h(me.h,Ze,gt),Pt=!0,Qe="hsl"),me.hasOwnProperty("a")&&(fe=me.a)),fe=O(fe),{ok:Pt,format:me.format||Qe,r:a(255,o(Be.r,0)),g:a(255,o(Be.g,0)),b:a(255,o(Be.b,0)),a:fe}}function f(me,Be,fe){return{r:W(me,255)*255,g:W(Be,255)*255,b:W(fe,255)*255}}function c(me,Be,fe){me=W(me,255),Be=W(Be,255),fe=W(fe,255);var Ze=o(me,Be,fe),et=a(me,Be,fe),gt,Pt,Qe=(Ze+et)/2;if(Ze==et)gt=Pt=0;else{var Xe=Ze-et;switch(Pt=Qe>.5?Xe/(2-Ze-et):Xe/(Ze+et),Ze){case me:gt=(Be-fe)/Xe+(Be1&&(_t-=1),_t<1/6?Tt+(xt-Tt)*6*_t:_t<1/2?xt:_t<2/3?Tt+(xt-Tt)*(2/3-_t)*6:Tt}if(Be===0)Ze=et=gt=fe;else{var Qe=fe<.5?fe*(1+Be):fe+Be-fe*Be,Xe=2*fe-Qe;Ze=Pt(Xe,Qe,me+1/3),et=Pt(Xe,Qe,me),gt=Pt(Xe,Qe,me-1/3)}return{r:Ze*255,g:et*255,b:gt*255}}function d(me,Be,fe){me=W(me,255),Be=W(Be,255),fe=W(fe,255);var Ze=o(me,Be,fe),et=a(me,Be,fe),gt,Pt,Qe=Ze,Xe=Ze-et;if(Pt=Ze===0?0:Xe/Ze,Ze==et)gt=0;else{switch(Ze){case me:gt=(Be-fe)/Xe+(Be>1)+720)%360;--Be;)Ze.h=(Ze.h+et)%360,gt.push(u(Ze));return gt}function U(me,Be){Be=Be||6;for(var fe=u(me).toHsv(),Ze=fe.h,et=fe.s,gt=fe.v,Pt=[],Qe=1/Be;Be--;)Pt.push(u({h:Ze,s:et,v:gt})),gt=(gt+Qe)%1;return Pt}u.mix=function(me,Be,fe){fe=fe===0?0:fe||50;var Ze=u(me).toRgb(),et=u(Be).toRgb(),gt=fe/100,Pt={r:(et.r-Ze.r)*gt+Ze.r,g:(et.g-Ze.g)*gt+Ze.g,b:(et.b-Ze.b)*gt+Ze.b,a:(et.a-Ze.a)*gt+Ze.a};return u(Pt)},u.readability=function(me,Be){var fe=u(me),Ze=u(Be);return(e.max(fe.getLuminance(),Ze.getLuminance())+.05)/(e.min(fe.getLuminance(),Ze.getLuminance())+.05)},u.isReadable=function(me,Be,fe){var Ze=u.readability(me,Be),et,gt;switch(gt=!1,et=Re(fe),et.level+et.size){case"AAsmall":case"AAAlarge":gt=Ze>=4.5;break;case"AAlarge":gt=Ze>=3;break;case"AAAsmall":gt=Ze>=7;break}return gt},u.mostReadable=function(me,Be,fe){var Ze=null,et=0,gt,Pt,Qe,Xe;fe=fe||{},Pt=fe.includeFallbackColors,Qe=fe.level,Xe=fe.size;for(var Tt=0;Ttet&&(et=gt,Ze=u(Be[Tt]));return u.isReadable(me,Ze,{level:Qe,size:Xe})||!Pt?Ze:(fe.includeFallbackColors=!1,u.mostReadable(me,["#fff","#000"],fe))};var H=u.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"},j=u.hexNames=G(H);function G(me){var Be={};for(var fe in me)me.hasOwnProperty(fe)&&(Be[me[fe]]=fe);return Be}function O(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function W(me,Be){be(me)&&(me="100%");var fe=ze(me);return me=a(Be,o(0,parseFloat(me))),fe&&(me=parseInt(me*Be,10)/100),e.abs(me-Be)<1e-6?1:me%Be/parseFloat(Be)}function re(me){return a(1,o(0,me))}function ne(me){return parseInt(me,16)}function be(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function ze(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Ce(me){return me.length==1?"0"+me:""+me}function he(me){return me<=1&&(me=me*100+"%"),me}function te(me){return e.round(parseFloat(me)*255).toString(16)}function ke(me){return ne(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",Be="[-\\+]?\\d*\\.\\d+%?",fe="(?:"+Be+")|(?:"+me+")",Ze="[\\s|\\(]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")\\s*\\)?",et="[\\s|\\(]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")\\s*\\)?";return{CSS_UNIT:new RegExp(fe),rgb:new RegExp("rgb"+Ze),rgba:new RegExp("rgba"+et),hsl:new RegExp("hsl"+Ze),hsla:new RegExp("hsla"+et),hsv:new RegExp("hsv"+Ze),hsva:new RegExp("hsva"+et),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 Me(me){return!!Ee.CSS_UNIT.exec(me)}function Oe(me){me=me.replace(t,"").replace(r,"").toLowerCase();var Be=!1;if(H[me])me=H[me],Be=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var fe;return(fe=Ee.rgb.exec(me))?{r:fe[1],g:fe[2],b:fe[3]}:(fe=Ee.rgba.exec(me))?{r:fe[1],g:fe[2],b:fe[3],a:fe[4]}:(fe=Ee.hsl.exec(me))?{h:fe[1],s:fe[2],l:fe[3]}:(fe=Ee.hsla.exec(me))?{h:fe[1],s:fe[2],l:fe[3],a:fe[4]}:(fe=Ee.hsv.exec(me))?{h:fe[1],s:fe[2],v:fe[3]}:(fe=Ee.hsva.exec(me))?{h:fe[1],s:fe[2],v:fe[3],a:fe[4]}:(fe=Ee.hex8.exec(me))?{r:ne(fe[1]),g:ne(fe[2]),b:ne(fe[3]),a:ke(fe[4]),format:Be?"name":"hex8"}:(fe=Ee.hex6.exec(me))?{r:ne(fe[1]),g:ne(fe[2]),b:ne(fe[3]),format:Be?"name":"hex"}:(fe=Ee.hex4.exec(me))?{r:ne(fe[1]+""+fe[1]),g:ne(fe[2]+""+fe[2]),b:ne(fe[3]+""+fe[3]),a:ke(fe[4]+""+fe[4]),format:Be?"name":"hex8"}:(fe=Ee.hex3.exec(me))?{r:ne(fe[1]+""+fe[1]),g:ne(fe[2]+""+fe[2]),b:ne(fe[3]+""+fe[3]),format:Be?"name":"hex"}:!1}function Re(me){var Be,fe;return me=me||{level:"AA",size:"small"},Be=(me.level||"AA").toUpperCase(),fe=(me.size||"small").toLowerCase(),Be!=="AA"&&Be!=="AAA"&&(Be="AA"),fe!=="small"&&fe!=="large"&&(fe="small"),{level:Be,size:fe}}typeof uL!="undefined"&&uL.exports?uL.exports=u:typeof define=="function"&&define.amd?define(function(){return u}):window.tinycolor=u})(Math)});var vu=Se(zM=>{"use strict";var Oee=yg(),CM=Array.isArray;function Xet(e,t){var r,n;for(r=0;r{"use strict";Nee.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 PM=Se((ptr,Uee)=>{"use strict";Uee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var O1=Se((vtr,Gee)=>{"use strict";var Vee=PM(),Hee=uc(),CB=Hee({editType:"none"});CB.family.dflt=Vee.HOVERFONT;CB.size.dflt=Vee.HOVERFONTSIZE;Gee.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:CB,grouptitlefont:Hee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var i3=Se((ytr,Wee)=>{"use strict";var Yet=uc(),fL=O1().hoverlabel,cL=vu().extendFlat;Wee.exports={hoverlabel:{bgcolor:cL({},fL.bgcolor,{arrayOk:!0}),bordercolor:cL({},fL.bordercolor,{arrayOk:!0}),font:Yet({arrayOk:!0,editType:"none"}),align:cL({},fL.align,{arrayOk:!0}),namelength:cL({},fL.namelength,{arrayOk:!0}),editType:"none"}}});var zf=Se((mtr,jee)=>{"use strict";var Ket=uc(),Jet=i3();jee.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:Ket({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:Jet.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 sb=Se((gtr,Yee)=>{"use strict";var $et=cd(),hL={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)"]]},Zee=hL.RdBu;function Qet(e,t){if(t||(t=Zee),!e)return t;function r(){try{e=hL[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Xee(e)?e:t}function Xee(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";lb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];lb.defaultLine="#444";lb.lightLine="#eee";lb.background="#fff";lb.borderLine="#BEC8D9";lb.lightFraction=100*10/11});var Pl=Se((xtr,Kee)=>{"use strict";var xv=cd(),ttt=_u(),rtt=yp().isTypedArray,hd=Kee.exports={},dL=Ih();hd.defaults=dL.defaults;var itt=hd.defaultLine=dL.defaultLine;hd.lightLine=dL.lightLine;var zB=hd.background=dL.background;hd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};hd.rgb=function(e){return hd.tinyRGB(xv(e))};hd.opacity=function(e){return e?xv(e).getAlpha():0};hd.addOpacity=function(e,t){var r=xv(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=xv(e).toRgb();if(r.a===1)return xv(e).toRgbString();var n=xv(t||zB).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 xv(a).toRgbString()};hd.interpolate=function(e,t,r){var n=xv(e).toRgb(),i=xv(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 xv(a).toRgbString()};hd.contrast=function(e,t,r){var n=xv(e);n.getAlpha()!==1&&(n=xv(hd.combine(e,zB)));var i=n.isDark()?t?n.lighten(t):zB:r?n.darken(r):itt;return i.toString()};hd.stroke=function(e,t){var r=xv(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=xv(t);e.style({fill:hd.tinyRGB(r),"fill-opacity":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r=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=Se((btr,Jee)=>{"use strict";Jee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var n3=Se($ee=>{"use strict";$ee.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 rte=Se(bv=>{"use strict";var PB=_u(),Qee=cd(),ete=vu().extendFlat,ntt=zf(),att=sb(),ott=Pl(),stt=N1().DESELECTDIM,a3=EM(),tte=n3().counter,ltt=r3().modHalf,dm=yp().isArrayOrTypedArray,U1=yp().isTypedArraySpec,V1=yp().decodeTypedArraySpec;bv.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(dm(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;nn.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||!PB(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)),Qee(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return Qee(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(att.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e==="auto"?t.set("auto"):PB(e)?t.set(ltt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||tte(r);if(typeof e=="string"&&i.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!tte(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 ite={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/"},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:{}}},nte={};function ate(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),ate(n,t[r]))}}ate(ite,nte);ote.exports={configAttributes:ite,dfltConfig:nte}});var DB=Se((Str,ste)=>{"use strict";var IB=Nl(),utt=_u(),IM=[];ste.exports=function(e,t){if(IM.indexOf(e)!==-1)return;IM.push(e);var r=1e3;utt(t)?r=t:t==="long"&&(r=3e3);var n=IB.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(IM);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var u=IM.indexOf(s);u!==-1&&IM.splice(u,1),IB.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=IB.select(this);s.append("button").classed("notifier-close",!0).html("×").on("click",function(){s.transition().call(a)});for(var u=s.append("p"),l=o.split(//g),f=0;f{"use strict";var o3=ub().dfltConfig,RB=DB(),FB=lte.exports={};FB.log=function(){var e;if(o3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};FB.warn=function(){var e;if(o3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};FB.error=function(){var e;if(o3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var vL=Se((Etr,ute)=>{"use strict";ute.exports=function(){}});var qB=Se((ktr,fte)=>{"use strict";fte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{cte.exports=ftt;function ftt(){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 pte=Se((Ltr,dte)=>{dte.exports=ctt;function ctt(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 yte=Se((ztr,vte)=>{vte.exports=htt;function htt(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 BB=Se((Ptr,mte)=>{mte.exports=dtt;function dtt(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 _te=Se((Itr,gte)=>{gte.exports=ptt;function ptt(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 bte=Se((Dtr,xte)=>{xte.exports=vtt;function vtt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],f=t[8],c=t[9],h=t[10],d=t[11],p=t[12],x=t[13],b=t[14],y=t[15],E=r*s-n*o,k=r*u-i*o,A=r*l-a*o,L=n*u-i*s,_=n*l-a*s,C=i*l-a*u,M=f*x-c*p,v=f*b-h*p,z=f*y-d*p,T=c*b-h*x,F=c*y-d*x,q=h*y-d*b,U=E*q-k*F+A*T+L*z-_*v+C*M;return U?(U=1/U,e[0]=(s*q-u*F+l*T)*U,e[1]=(i*F-n*q-a*T)*U,e[2]=(x*C-b*_+y*L)*U,e[3]=(h*_-c*C-d*L)*U,e[4]=(u*z-o*q-l*v)*U,e[5]=(r*q-i*z+a*v)*U,e[6]=(b*A-p*C-y*k)*U,e[7]=(f*C-h*A+d*k)*U,e[8]=(o*F-s*z+l*M)*U,e[9]=(n*z-r*F-a*M)*U,e[10]=(p*_-x*A+y*E)*U,e[11]=(c*A-f*_-d*E)*U,e[12]=(s*v-o*T-u*M)*U,e[13]=(r*T-n*v+i*M)*U,e[14]=(x*k-p*L-b*E)*U,e[15]=(f*L-c*k+h*E)*U,e):null}});var Tte=Se((Rtr,wte)=>{wte.exports=ytt;function ytt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],f=t[8],c=t[9],h=t[10],d=t[11],p=t[12],x=t[13],b=t[14],y=t[15];return e[0]=s*(h*y-d*b)-c*(u*y-l*b)+x*(u*d-l*h),e[1]=-(n*(h*y-d*b)-c*(i*y-a*b)+x*(i*d-a*h)),e[2]=n*(u*y-l*b)-s*(i*y-a*b)+x*(i*l-a*u),e[3]=-(n*(u*d-l*h)-s*(i*d-a*h)+c*(i*l-a*u)),e[4]=-(o*(h*y-d*b)-f*(u*y-l*b)+p*(u*d-l*h)),e[5]=r*(h*y-d*b)-f*(i*y-a*b)+p*(i*d-a*h),e[6]=-(r*(u*y-l*b)-o*(i*y-a*b)+p*(i*l-a*u)),e[7]=r*(u*d-l*h)-o*(i*d-a*h)+f*(i*l-a*u),e[8]=o*(c*y-d*x)-f*(s*y-l*x)+p*(s*d-l*c),e[9]=-(r*(c*y-d*x)-f*(n*y-a*x)+p*(n*d-a*c)),e[10]=r*(s*y-l*x)-o*(n*y-a*x)+p*(n*l-a*s),e[11]=-(r*(s*d-l*c)-o*(n*d-a*c)+f*(n*l-a*s)),e[12]=-(o*(c*b-h*x)-f*(s*b-u*x)+p*(s*h-u*c)),e[13]=r*(c*b-h*x)-f*(n*b-i*x)+p*(n*h-i*c),e[14]=-(r*(s*b-u*x)-o*(n*b-i*x)+p*(n*u-i*s)),e[15]=r*(s*h-u*c)-o*(n*h-i*c)+f*(n*u-i*s),e}});var Ste=Se((Ftr,Ate)=>{Ate.exports=mtt;function mtt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],x=e[14],b=e[15],y=t*o-r*a,E=t*s-n*a,k=t*u-i*a,A=r*s-n*o,L=r*u-i*o,_=n*u-i*s,C=l*p-f*d,M=l*x-c*d,v=l*b-h*d,z=f*x-c*p,T=f*b-h*p,F=c*b-h*x;return y*F-E*T+k*z+A*v-L*M+_*C}});var Ete=Se((qtr,Mte)=>{Mte.exports=gtt;function gtt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],f=t[7],c=t[8],h=t[9],d=t[10],p=t[11],x=t[12],b=t[13],y=t[14],E=t[15],k=r[0],A=r[1],L=r[2],_=r[3];return e[0]=k*n+A*s+L*c+_*x,e[1]=k*i+A*u+L*h+_*b,e[2]=k*a+A*l+L*d+_*y,e[3]=k*o+A*f+L*p+_*E,k=r[4],A=r[5],L=r[6],_=r[7],e[4]=k*n+A*s+L*c+_*x,e[5]=k*i+A*u+L*h+_*b,e[6]=k*a+A*l+L*d+_*y,e[7]=k*o+A*f+L*p+_*E,k=r[8],A=r[9],L=r[10],_=r[11],e[8]=k*n+A*s+L*c+_*x,e[9]=k*i+A*u+L*h+_*b,e[10]=k*a+A*l+L*d+_*y,e[11]=k*o+A*f+L*p+_*E,k=r[12],A=r[13],L=r[14],_=r[15],e[12]=k*n+A*s+L*c+_*x,e[13]=k*i+A*u+L*h+_*b,e[14]=k*a+A*l+L*d+_*y,e[15]=k*o+A*f+L*p+_*E,e}});var Cte=Se((Btr,kte)=>{kte.exports=_tt;function _tt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,u,l,f,c,h,d,p,x,b,y;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],u=t[2],l=t[3],f=t[4],c=t[5],h=t[6],d=t[7],p=t[8],x=t[9],b=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=u,e[3]=l,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=x,e[10]=b,e[11]=y,e[12]=o*n+f*i+p*a+t[12],e[13]=s*n+c*i+x*a+t[13],e[14]=u*n+h*i+b*a+t[14],e[15]=l*n+d*i+y*a+t[15]),e}});var zte=Se((Otr,Lte)=>{Lte.exports=xtt;function xtt(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 Ite=Se((Ntr,Pte)=>{Pte.exports=btt;function btt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,u=Math.sin(r),l=Math.cos(r),f=1-l,c=t[0],h=t[1],d=t[2],p=t[3],x=t[4],b=t[5],y=t[6],E=t[7],k=t[8],A=t[9],L=t[10],_=t[11],C=i*i*f+l,M=a*i*f+o*u,v=o*i*f-a*u,z=i*a*f-o*u,T=a*a*f+l,F=o*a*f+i*u,q=i*o*f+a*u,U=a*o*f-i*u,H=o*o*f+l,e[0]=c*C+x*M+k*v,e[1]=h*C+b*M+A*v,e[2]=d*C+y*M+L*v,e[3]=p*C+E*M+_*v,e[4]=c*z+x*T+k*F,e[5]=h*z+b*T+A*F,e[6]=d*z+y*T+L*F,e[7]=p*z+E*T+_*F,e[8]=c*q+x*U+k*H,e[9]=h*q+b*U+A*H,e[10]=d*q+y*U+L*H,e[11]=p*q+E*U+_*H,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Rte=Se((Utr,Dte)=>{Dte.exports=wtt;function wtt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],l=t[8],f=t[9],c=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+l*n,e[5]=o*i+f*n,e[6]=s*i+c*n,e[7]=u*i+h*n,e[8]=l*i-a*n,e[9]=f*i-o*n,e[10]=c*i-s*n,e[11]=h*i-u*n,e}});var qte=Se((Vtr,Fte)=>{Fte.exports=Ttt;function Ttt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[8],f=t[9],c=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-l*n,e[1]=o*i-f*n,e[2]=s*i-c*n,e[3]=u*i-h*n,e[8]=a*n+l*i,e[9]=o*n+f*i,e[10]=s*n+c*i,e[11]=u*n+h*i,e}});var Ote=Se((Htr,Bte)=>{Bte.exports=Att;function Att(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[4],f=t[5],c=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+l*n,e[1]=o*i+f*n,e[2]=s*i+c*n,e[3]=u*i+h*n,e[4]=l*i-a*n,e[5]=f*i-o*n,e[6]=c*i-s*n,e[7]=h*i-u*n,e}});var Ute=Se((Gtr,Nte)=>{Nte.exports=Stt;function Stt(e,t,r){var n,i,a,o=r[0],s=r[1],u=r[2],l=Math.sqrt(o*o+s*s+u*u);return Math.abs(l)<1e-6?null:(l=1/l,o*=l,s*=l,u*=l,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+u*n,e[2]=u*o*a-s*n,e[3]=0,e[4]=o*s*a-u*n,e[5]=s*s*a+i,e[6]=u*s*a+o*n,e[7]=0,e[8]=o*u*a+s*n,e[9]=s*u*a-o*n,e[10]=u*u*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Hte=Se((Wtr,Vte)=>{Vte.exports=Mtt;function Mtt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,l=a+a,f=n*s,c=n*u,h=n*l,d=i*u,p=i*l,x=a*l,b=o*s,y=o*u,E=o*l;return e[0]=1-(d+x),e[1]=c+E,e[2]=h-y,e[3]=0,e[4]=c-E,e[5]=1-(f+x),e[6]=p+b,e[7]=0,e[8]=h+y,e[9]=p-b,e[10]=1-(f+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Wte=Se((jtr,Gte)=>{Gte.exports=Ett;function Ett(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 Zte=Se((Ztr,jte)=>{jte.exports=ktt;function ktt(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 Yte=Se((Xtr,Xte)=>{Xte.exports=Ctt;function Ctt(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 Jte=Se((Ytr,Kte)=>{Kte.exports=Ltt;function Ltt(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 Qte=Se((Ktr,$te)=>{$te.exports=ztt;function ztt(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 OB=Se((Jtr,ere)=>{ere.exports=Ptt;function Ptt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,l=r*o,f=n*o,c=n*s,h=i*o,d=i*s,p=i*u,x=a*o,b=a*s,y=a*u;return e[0]=1-c-p,e[1]=f+y,e[2]=h-b,e[3]=0,e[4]=f-y,e[5]=1-l-p,e[6]=d+x,e[7]=0,e[8]=h+b,e[9]=d-x,e[10]=1-l-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var rre=Se(($tr,tre)=>{tre.exports=Itt;function Itt(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),l=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*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*l,e[15]=0,e}});var nre=Se((Qtr,ire)=>{ire.exports=Dtt;function Dtt(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 ore=Se((err,are)=>{are.exports=Rtt;function Rtt(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),u=2/(o+s),l=2/(i+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-((o-s)*u*.5),e[9]=(i-a)*l*.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 lre=Se((trr,sre)=>{sre.exports=Ftt;function Ftt(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),l=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*l,e[15]=1,e}});var fre=Se((rrr,ure)=>{var qtt=BB();ure.exports=Btt;function Btt(e,t,r,n){var i,a,o,s,u,l,f,c,h,d,p=t[0],x=t[1],b=t[2],y=n[0],E=n[1],k=n[2],A=r[0],L=r[1],_=r[2];return Math.abs(p-A)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(b-_)<1e-6?qtt(e):(f=p-A,c=x-L,h=b-_,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,i=E*h-k*c,a=k*f-y*h,o=y*c-E*f,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=c*o-h*a,u=h*i-f*o,l=f*a-c*i,d=Math.sqrt(s*s+u*u+l*l),d?(d=1/d,s*=d,u*=d,l*=d):(s=0,u=0,l=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=a,e[5]=u,e[6]=c,e[7]=0,e[8]=o,e[9]=l,e[10]=h,e[11]=0,e[12]=-(i*p+a*x+o*b),e[13]=-(s*p+u*x+l*b),e[14]=-(f*p+c*x+h*b),e[15]=1,e)}});var hre=Se((irr,cre)=>{cre.exports=Ott;function Ott(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 NB=Se((nrr,dre)=>{dre.exports={create:hte(),clone:pte(),copy:yte(),identity:BB(),transpose:_te(),invert:bte(),adjoint:Tte(),determinant:Ste(),multiply:Ete(),translate:Cte(),scale:zte(),rotate:Ite(),rotateX:Rte(),rotateY:qte(),rotateZ:Ote(),fromRotation:Ute(),fromRotationTranslation:Hte(),fromScaling:Wte(),fromTranslation:Zte(),fromXRotation:Yte(),fromYRotation:Jte(),fromZRotation:Qte(),fromQuat:OB(),frustum:rre(),perspective:nre(),perspectiveFromFieldOfView:ore(),ortho:lre(),lookAt:fre(),str:hre()}});var yL=Se(xh=>{"use strict";var Ntt=NB();xh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Utt=Nl(),pre=H1(),Vtt=yL(),Htt=NB();function Gtt(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 Wtt(e){var t=Utt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function vre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function jtt(e,t){yre("global",e,t)}function yre(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):pre.warn("addStyleRule failed"):pre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Ztt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&vre(r)}function Xtt(e,t,r,n,i){var a=n.split(":"),o=i.split(":"),s="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(u){u.getAttribute(s)||(u.addEventListener("mouseenter",function(){var l=this.querySelector(r);l&&(l.style[a[0]]=a[1])}),u.addEventListener("mouseleave",function(){var l=this.querySelector(r);l&&(t&&this.matches(t)?l.style[a[0]]=a[1]:l.style[o[0]]=o[1])}),u.setAttribute(s,!0))})}function Ytt(e){var t=gre(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=mre(n);if(i){var a=Vtt.convertCssMatrix(i);r=Htt.multiply(r,r,a)}}),r}function mre(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 gre(e){for(var t=[];Ktt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Ktt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Jtt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}_re.exports={getGraphDiv:Gtt,isPlotDiv:Wtt,removeElement:vre,addStyleRule:jtt,addRelatedStyleRule:yre,deleteRelatedStyleRule:Ztt,setStyleOnHover:Xtt,getFullTransformMatrix:Ytt,getElementTransformMatrix:mre,getElementAndAncestors:gre,equalDomRects:Jtt}});var RM=Se((srr,xre)=>{"use strict";xre.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 _c=Se((lrr,Ere)=>{"use strict";var wre=vu().extendFlat,$tt=yg(),Tre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Are={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Qtt=Tre.flags.slice().concat(["fullReplot"]),ert=Are.flags.slice().concat("layoutReplot");Ere.exports={traces:Tre,layout:Are,traceFlags:function(){return bre(Qtt)},layoutFlags:function(){return bre(ert)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";UB.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};UB.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 VB=Se((frr,kre)=>{"use strict";kre.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 Du=Se(mL=>{"use strict";var Cre=VB(),crr=Cre.FORMAT_LINK,hrr=Cre.DATE_FORMAT_LINK;function HB(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i{"use strict";function G1(e,t){return t?t.d2l(e):e}function Lre(e,t){return t?t.l2d(e):e}function trt(e){return e.x0}function rrt(e){return e.x1}function irt(e){return e.y0}function nrt(e){return e.y1}function zre(e){return e.x0shift||0}function Pre(e){return e.x1shift||0}function Ire(e){return e.y0shift||0}function Dre(e){return e.y1shift||0}function gL(e,t){return G1(e.x1,t)+Pre(e)-G1(e.x0,t)-zre(e)}function _L(e,t,r){return G1(e.y1,r)+Dre(e)-G1(e.y0,r)-Ire(e)}function art(e,t){return Math.abs(gL(e,t))}function ort(e,t,r){return Math.abs(_L(e,t,r))}function srt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(gL(e,t),2)+Math.pow(_L(e,t,r),2))}function lrt(e,t){return Lre((G1(e.x1,t)+Pre(e)+G1(e.x0,t)+zre(e))/2,t)}function urt(e,t,r){return Lre((G1(e.y1,r)+Dre(e)+G1(e.y0,r)+Ire(e))/2,r)}function frt(e,t,r){return e.type!=="line"?void 0:_L(e,t,r)/gL(e,t)}Rre.exports={x0:trt,x1:rrt,y0:irt,y1:nrt,slope:frt,dx:gL,dy:_L,width:art,height:ort,length:srt,xcenter:lrt,ycenter:urt}});var Bre=Se((vrr,qre)=>{"use strict";var crt=_c().overrideAll,fb=zf(),Fre=uc(),hrt=Id().dash,W1=vu().extendFlat,drt=Du().shapeTexttemplateAttrs,prt=xL();qre.exports=crt({newshape:{visible:W1({},fb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:W1({},fb.legend,{}),legendgroup:W1({},fb.legendgroup,{}),legendgrouptitle:{text:W1({},fb.legendgrouptitle.text,{}),font:Fre({})},legendrank:W1({},fb.legendrank,{}),legendwidth:W1({},fb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:W1({},hrt,{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:W1({},fb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:drt({newshape:!0},{keys:Object.keys(prt)}),font:Fre({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Nre=Se((yrr,Ore)=>{"use strict";var vrt=Id().dash,yrt=vu().extendFlat;Ore.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:yrt({},vrt,{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 bL=Se((mrr,Ure)=>{"use strict";Ure.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 s3=Se((grr,Wre)=>{"use strict";var GB=uc(),mrt=RM(),wL=Ih(),Vre=Bre(),Hre=Nre(),grt=bL(),Gre=vu().extendFlat,TL=GB({editType:"calc"});TL.family.dflt='"Open Sans", verdana, arial, sans-serif';TL.size.dflt=12;TL.color.dflt=wL.defaultLine;Wre.exports={font:TL,title:{text:{valType:"string",editType:"layoutstyle"},font:GB({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:GB({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:Gre(grt({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:wL.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:wL.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:wL.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:Vre.newshape,activeshape:Vre.activeshape,newselection:Hre.newselection,activeselection:Hre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Gre({},mrt.transition,{editType:"none"})}});var jre=Qf(()=>{});var _rt={};var Zre=Qf(()=>{jre()});var Ul=Se(df=>{"use strict";var l3=H1(),Xre=vL(),Yre=qB(),xrt=yg(),brt=DM().addStyleRule,Kre=vu(),wrt=zf(),Trt=s3(),Art=Kre.extendFlat,WB=Kre.extendDeepAll;df.modules={};df.allCategories={};df.allTypes=[];df.subplotsRegistry={};df.componentsRegistry={};df.layoutArrayContainers=[];df.layoutArrayRegexes=[];df.traceLayoutAttributes={};df.localeRegistry={};df.apiMethodRegistry={};df.collectableSubplotTypes=null;df.register=function(t){if(df.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 Lrt=e3().timeFormat,sie=_u(),jB=H1(),Z1=r3().mod,c3=ju(),_0=c3.BADNUM,wv=c3.ONEDAY,FM=c3.ONEHOUR,j1=c3.ONEMIN,f3=c3.ONESEC,qM=c3.EPOCHJD,mg=Ul(),tie=e3().utcFormat,zrt=/^\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,Prt=/^\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,rie=new Date().getFullYear()-70;function gg(e){return e&&mg.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}bh.dateTick0=function(e,t){var r=Irt(e,!!t);if(t<2)return r;var n=bh.dateTime2ms(r,e);return n+=wv*(t-1),bh.ms2DateTime(n,0,e)};function Irt(e,t){return gg(e)?t?mg.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:mg.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}bh.dfltRange=function(e){return gg(e)?mg.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};bh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var SL,ML;bh.dateTime2ms=function(e,t){if(bh.isJSDate(e)){var r=e.getTimezoneOffset()*j1,n=(e.getUTCMinutes()-e.getMinutes())*j1+(e.getUTCSeconds()-e.getSeconds())*f3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*j1;r=r-i/2+Z1(n-r+i/2,i)}return e=Number(e)-r,e>=SL&&e<=ML?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=gg(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.substr(1),t="");var s=a&&t.substr(0,7)==="chinese",u=e.match(s?Prt:zrt);if(!u)return _0;var l=u[1],f=u[3]||"1",c=Number(u[5]||1),h=Number(u[7]||0),d=Number(u[9]||0),p=Number(u[11]||0);if(a){if(l.length===2)return _0;l=Number(l);var x;try{var b=mg.getComponentMethod("calendars","getCal")(t);if(s){var y=f.charAt(f.length-1)==="i";f=parseInt(f,10),x=b.newDate(l,b.toMonthIndex(l,f,y),c)}else x=b.newDate(l,Number(f),c)}catch(k){return _0}return x?(x.toJD()-qM)*wv+h*FM+d*j1+p*f3:_0}l.length===2?l=(Number(l)+2e3-rie)%100+rie:l=Number(l),f-=1;var E=new Date(Date.UTC(2e3,f,c,h,d));return E.setUTCFullYear(l),E.getUTCMonth()!==f||E.getUTCDate()!==c?_0:E.getTime()+p*f3};SL=bh.MIN_MS=bh.dateTime2ms("-9999");ML=bh.MAX_MS=bh.dateTime2ms("9999-12-31 23:59:59.9999");bh.isDateTime=function(e,t){return bh.dateTime2ms(e,t)!==_0};function u3(e,t){return String(e+Math.pow(10,t)).substr(1)}var AL=90*wv,iie=3*FM,nie=5*j1;bh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=SL&&e<=ML))return _0;t||(t=0);var n=Math.floor(Z1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,u,l,f;if(gg(r)){var c=Math.floor(i/wv)+qM,h=Math.floor(Z1(e,wv));try{a=mg.getComponentMethod("calendars","getCal")(r).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){a=tie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=SL+wv&&e<=ML-wv))return _0;var t=Math.floor(Z1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Lrt("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return lie(n,i,a,o,s)};function lie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+u3(t,2)+":"+u3(r,2),(n||i)&&(e+=":"+u3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+u3(i,a)}return e}bh.cleanDate=function(e,t,r){if(e===_0)return t;if(bh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(gg(r))return jB.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=bh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!bh.isDateTime(e,r))return jB.error("unrecognized date",e),t;return e};var Drt=/%\d?f/g,Rrt=/%h/g,Frt={1:"1",2:"1",3:"2",4:"2"};function aie(e,t,r,n){e=e.replace(Drt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Rrt,function(){return Frt[r("%q")(i)]}),gg(n))try{e=mg.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var qrt=[59,59.9,59.99,59.999,59.9999];function Brt(e,t){var r=Z1(e+.05,wv),n=u3(Math.floor(r/FM),2)+":"+u3(Z1(Math.floor(r/j1),60),2);if(t!=="M"){sie(t)||(t=0);var i=Math.min(Z1(e/f3,60),qrt[t]),a=(100+i).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}bh.formatDate=function(e,t,r,n,i,a){if(i=gg(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` +`)};function mt(_r){return _r.map(er).join(X)}function er(_r){return Le.test(_r)?'"'+_r.replace(/\"/g,'""')+'"':_r}return Ye},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Ui,zn,fn,xn,_a=this[G(this,"requestAnimationFrame")]||function(X){setTimeout(X,17)};e.timer=function(){Wn.apply(this,arguments)};function Wn(X,se,Le){var We=arguments.length;We<2&&(se=0),We<3&&(Le=Date.now());var Ye=Le+se,it={c:X,t:Ye,n:null};return zn?zn.n=it:Ui=it,zn=it,fn||(xn=clearTimeout(xn),fn=1,_a(Fn)),it}function Fn(){var X=ia(),se=za()-X;se>24?(isFinite(se)&&(clearTimeout(xn),xn=setTimeout(Fn,se)),fn=0):(fn=1,_a(Fn))}e.timer.flush=function(){ia(),za()};function ia(){for(var X=Date.now(),se=Ui;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function za(){for(var X,se=Ui,Le=1/0;se;)se.c?(se.t=0;--mt)ai.push(Ye[_r[ni[mt]][2]]);for(mt=+Ci;mt1&&St(X[Le[We-2]],X[Le[We-1]],X[Ye])<=0;)--We;Le[We++]=Ye}return Le.slice(0,We)}function Dn(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return te(X,un),X};var un=e.geom.polygon.prototype=[];un.area=function(){for(var X=-1,se=this.length,Le,We=this[se-1],Ye=0;++XFe)mt=mt.L;else if(Nt=se-ln(mt,Le),Nt>Fe){if(!mt.R){We=mt;break}mt=mt.R}else{it>-Fe?(We=mt.P,Ye=mt):Nt>-Fe?(We=mt,Ye=mt.N):We=Ye=mt;break}var er=to(X);if(Ha.insert(We,er),!(!We&&!Ye)){if(We===Ye){Yn(We),Ye=to(We.site),Ha.insert(er,Ye),er.edge=Ye.edge=qa(We.site,er.site),Fi(We),Fi(Ye);return}if(!Ye){er.edge=qa(We.site,er.site);return}Yn(We),Yn(Ye);var _r=We.site,wr=_r.x,ni=_r.y,Wr=X.x-wr,Ci=X.y-ni,Ji=Ye.site,ai=Ji.x-wr,Ti=Ji.y-ni,Bi=2*(Wr*Ti-Ci*ai),en=Wr*Wr+Ci*Ci,Wi=ai*ai+Ti*Ti,bi={x:(Ti*en-Ci*Wi)/Bi+wr,y:(Wr*Wi-ai*en)/Bi+ni};Vo(Ye.edge,_r,Ji,bi),er.edge=qa(_r,X,null,bi),Ye.edge=qa(X,Ji,null,bi),Fi(We),Fi(Ye)}}function pa(X,se){var Le=X.site,We=Le.x,Ye=Le.y,it=Ye-se;if(!it)return We;var Nt=X.P;if(!Nt)return-1/0;Le=Nt.site;var mt=Le.x,er=Le.y,_r=er-se;if(!_r)return mt;var wr=mt-We,ni=1/it-1/_r,Wr=wr/_r;return ni?(-Wr+Math.sqrt(Wr*Wr-2*ni*(wr*wr/(-2*_r)-er+_r/2+Ye-it/2)))/ni+We:(We+mt)/2}function ln(X,se){var Le=X.N;if(Le)return pa(Le,se);var We=X.site;return We.y===se?We.x:1/0}function ka(X){this.site=X,this.edges=[]}ka.prototype.prepare=function(){for(var X=this.edges,se=X.length,Le;se--;)Le=X[se].edge,(!Le.b||!Le.a)&&X.splice(se,1);return X.sort(bo),X.length};function va(X){for(var se=X[0][0],Le=X[1][0],We=X[0][1],Ye=X[1][1],it,Nt,mt,er,_r=Ea,wr=_r.length,ni,Wr,Ci,Ji,ai,Ti;wr--;)if(ni=_r[wr],!(!ni||!ni.prepare()))for(Ci=ni.edges,Ji=Ci.length,Wr=0;WrFe||y(er-Nt)>Fe)&&(Ci.splice(Wr,0,new Pa(jo(ni.site,Ti,y(mt-se)Fe?{x:se,y:y(it-se)Fe?{x:y(Nt-Ye)Fe?{x:Le,y:y(it-Le)Fe?{x:y(Nt-We)=-Pe)){var Wr=er*er+_r*_r,Ci=wr*wr+Ti*Ti,Ji=(Ti*Wr-_r*Ci)/ni,ai=(er*Ci-wr*Wr)/ni,Ti=ai+mt,Bi=ts.pop()||new Co;Bi.arc=X,Bi.site=Ye,Bi.x=Ji+Nt,Bi.y=Ti+Math.sqrt(Ji*Ji+ai*ai),Bi.cy=Ti,X.circle=Bi;for(var en=null,Wi=Xn._;Wi;)if(Bi.y0)){if(ai/=Ci,Ci<0){if(ai0){if(ai>Wr)return;ai>ni&&(ni=ai)}if(ai=Le-mt,!(!Ci&&ai<0)){if(ai/=Ci,Ci<0){if(ai>Wr)return;ai>ni&&(ni=ai)}else if(Ci>0){if(ai0)){if(ai/=Ji,Ji<0){if(ai0){if(ai>Wr)return;ai>ni&&(ni=ai)}if(ai=We-er,!(!Ji&&ai<0)){if(ai/=Ji,Ji<0){if(ai>Wr)return;ai>ni&&(ni=ai)}else if(Ji>0){if(ai0&&(Ye.a={x:mt+ni*Ci,y:er+ni*Ji}),Wr<1&&(Ye.b={x:mt+Wr*Ci,y:er+Wr*Ji}),Ye}}}}}}function Qi(X){for(var se=Bo,Le=xa(X[0][0],X[0][1],X[1][0],X[1][1]),We=se.length,Ye;We--;)Ye=se[We],(!Nn(Ye,X)||!Le(Ye)||y(Ye.a.x-Ye.b.x)=it)return;if(wr>Wr){if(!We)We={x:Ji,y:Nt};else if(We.y>=mt)return;Le={x:Ji,y:mt}}else{if(!We)We={x:Ji,y:mt};else if(We.y1)if(wr>Wr){if(!We)We={x:(Nt-Bi)/Ti,y:Nt};else if(We.y>=mt)return;Le={x:(mt-Bi)/Ti,y:mt}}else{if(!We)We={x:(mt-Bi)/Ti,y:mt};else if(We.y=it)return;Le={x:it,y:Ti*it+Bi}}else{if(!We)We={x:it,y:Ti*it+Bi};else if(We.x=wr&&Bi.x<=Wr&&Bi.y>=ni&&Bi.y<=Ci?[[wr,Ci],[Wr,Ci],[Wr,ni],[wr,ni]]:[];en.point=er[ai]}),_r}function mt(er){return er.map(function(_r,wr){return{x:Math.round(We(_r,wr)/Fe)*Fe,y:Math.round(Ye(_r,wr)/Fe)*Fe,i:wr}})}return Nt.links=function(er){return bs(mt(er)).edges.filter(function(_r){return _r.l&&_r.r}).map(function(_r){return{source:er[_r.l.i],target:er[_r.r.i]}})},Nt.triangles=function(er){var _r=[];return bs(mt(er)).cells.forEach(function(wr,ni){for(var Wr=wr.site,Ci=wr.edges.sort(bo),Ji=-1,ai=Ci.length,Ti,Bi,en=Ci[ai-1].edge,Wi=en.l===Wr?en.r:en.l;++JiWi&&(Wi=wr.x),wr.y>bi&&(bi=wr.y),Ci.push(wr.x),Ji.push(wr.y);else for(ai=0;aiWi&&(Wi=ao),yo>bi&&(bi=yo),Ci.push(ao),Ji.push(yo)}var Ko=Wi-Bi,Ms=bi-en;Ko>Ms?bi=en+Ko:Wi=Bi+Ms;function vl(Al,nu,Bu,qu,Ju,qo,Rl,pu){if(!(isNaN(Bu)||isNaN(qu)))if(Al.leaf){var xu=Al.x,of=Al.y;if(xu!=null)if(y(xu-Bu)+y(of-qu)<.01)wl(Al,nu,Bu,qu,Ju,qo,Rl,pu);else{var ff=Al.point;Al.x=Al.y=Al.point=null,wl(Al,ff,xu,of,Ju,qo,Rl,pu),wl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}else Al.x=Bu,Al.y=qu,Al.point=nu}else wl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}function wl(Al,nu,Bu,qu,Ju,qo,Rl,pu){var xu=(Ju+Rl)*.5,of=(qo+pu)*.5,ff=Bu>=xu,xf=qu>=of,hf=xf<<1|ff;Al.leaf=!1,Al=Al.nodes[hf]||(Al.nodes[hf]=on()),ff?Ju=xu:Rl=xu,xf?qo=of:pu=of,vl(Al,nu,Bu,qu,Ju,qo,Rl,pu)}var au=on();if(au.add=function(Al){vl(au,Al,+ni(Al,++ai),+Wr(Al,ai),Bi,en,Wi,bi)},au.visit=function(Al){mn(Al,au,Bi,en,Wi,bi)},au.find=function(Al){return Ga(au,Al[0],Al[1],Bi,en,Wi,bi)},ai=-1,se==null){for(;++aiit||Wr>Nt||Ci=ao,Ms=Le>=yo,vl=Ms<<1|Ko,wl=vl+4;vlLe&&(it=se.slice(Le,it),mt[Nt]?mt[Nt]+=it:mt[++Nt]=it),(We=We[0])===(Ye=Ye[0])?mt[Nt]?mt[Nt]+=Ye:mt[++Nt]=Ye:(mt[++Nt]=null,er.push({i:Nt,x:Xi(We,Ye)})),Le=yn.lastIndex;return Le=0&&!(We=e.interpolators[Le](X,se)););return We}e.interpolators=[function(X,se){var Le=typeof se;return(Le==="string"?tr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?ca:qn:se instanceof Di?ca:Array.isArray(se)?ba:Le==="object"&&isNaN(se)?bn:Xi)(X,se)}],e.interpolateArray=ba;function ba(X,se){var Le=[],We=[],Ye=X.length,it=se.length,Nt=Math.min(X.length,se.length),mt;for(mt=0;mt=0?X.slice(0,se):X,We=se>=0?X.slice(se+1):"in";return Le=Aa.get(Le)||Da,We=Ln.get(We)||H,wo(We(Le.apply(null,t.call(arguments,1))))};function wo(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function wa(X){return function(se){return 1-X(1-se)}}function $i(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function ea(X){return X*X}function Sa(X){return X*X*X}function Za(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Le=se*X;return 4*(X<.5?Le:3*(X-se)+Le-.75)}function xo(X){return function(se){return Math.pow(se,X)}}function Wa(X){return 1-Math.cos(X*ue)}function hn(X){return Math.pow(2,10*(X-1))}function Un(X){return 1-Math.sqrt(1-X*X)}function Ss(X,se){var Le;return arguments.length<2&&(se=.45),arguments.length?Le=se/lt*Math.asin(1/X):(X=1,Le=se/4),function(We){return 1+X*Math.pow(2,-10*We)*Math.sin((We-Le)*lt/se)}}function Kn(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function ns(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=Jo;function Jo(X,se){X=e.hcl(X),se=e.hcl(se);var Le=X.h,We=X.c,Ye=X.l,it=se.h-Le,Nt=se.c-We,mt=se.l-Ye;return isNaN(Nt)&&(Nt=0,We=isNaN(We)?se.c:We),isNaN(it)?(it=0,Le=isNaN(Le)?se.h:Le):it>180?it-=360:it<-180&&(it+=360),function(er){return br(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateHsl=vo;function vo(X,se){X=e.hsl(X),se=e.hsl(se);var Le=X.h,We=X.s,Ye=X.l,it=se.h-Le,Nt=se.s-We,mt=se.l-Ye;return isNaN(Nt)&&(Nt=0,We=isNaN(We)?se.s:We),isNaN(it)?(it=0,Le=isNaN(Le)?se.h:Le):it>180?it-=360:it<-180&&(it+=360),function(er){return Dt(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateLab=ma;function ma(X,se){X=e.lab(X),se=e.lab(se);var Le=X.l,We=X.a,Ye=X.b,it=se.l-Le,Nt=se.a-We,mt=se.b-Ye;return function(er){return Pi(Le+it*er,We+Nt*er,Ye+mt*er)+""}}e.interpolateRound=ja;function ja(X,se){return se-=X,function(Le){return Math.round(X+se*Le)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Le){if(Le!=null){se.setAttribute("transform",Le);var We=se.transform.baseVal.consolidate()}return new To(We?We.matrix:ho)})(X)};function To(X){var se=[X.a,X.b],Le=[X.c,X.d],We=la(se),Ye=Ao(se,Le),it=la(Ki(Le,se,-Ye))||0;se[0]*Le[1]180?se+=360:se-X>180&&(X+=360),We.push({i:Le.push(Ka(Le)+"rotate(",null,")")-2,x:Xi(X,se)})):se&&Le.push(Ka(Le)+"rotate("+se+")")}function En(X,se,Le,We){X!==se?We.push({i:Le.push(Ka(Le)+"skewX(",null,")")-2,x:Xi(X,se)}):se&&Le.push(Ka(Le)+"skewX("+se+")")}function Mo(X,se,Le,We){if(X[0]!==se[0]||X[1]!==se[1]){var Ye=Le.push(Ka(Le)+"scale(",null,",",null,")");We.push({i:Ye-4,x:Xi(X[0],se[0])},{i:Ye-2,x:Xi(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Le.push(Ka(Le)+"scale("+se+")")}function Ds(X,se){var Le=[],We=[];return X=e.transform(X),se=e.transform(se),Ca(X.translate,se.translate,Le,We),ta(X.rotate,se.rotate,Le,We),En(X.skew,se.skew,Le,We),Mo(X.scale,se.scale,Le,We),X=se=null,function(Ye){for(var it=-1,Nt=We.length,mt;++it0?it=bi:(Le.c=null,Le.t=NaN,Le=null,se.end({type:"end",alpha:it=0})):bi>0&&(se.start({type:"start",alpha:it=bi}),Le=Wn(X.tick)),X):it},X.start=function(){var bi,ao=Ci.length,yo=Ji.length,Ko=We[0],Ms=We[1],vl,wl;for(bi=0;bi=0;)it.push(wr=_r[er]),wr.parent=mt,wr.depth=mt.depth+1;Le&&(mt.value=0),mt.children=_r}else Le&&(mt.value=+Le.call(We,mt,mt.depth)||0),delete mt.children;return uo(Ye,function(ni){var Wr,Ci;X&&(Wr=ni.children)&&Wr.sort(X),Le&&(Ci=ni.parent)&&(Ci.value+=ni.value)}),Nt}return We.sort=function(Ye){return arguments.length?(X=Ye,We):X},We.children=function(Ye){return arguments.length?(se=Ye,We):se},We.value=function(Ye){return arguments.length?(Le=Ye,We):Le},We.revalue=function(Ye){return Le&&(Sn(Ye,function(it){it.children&&(it.value=0)}),uo(Ye,function(it){var Nt;it.children||(it.value=+Le.call(We,it,it.depth)||0),(Nt=it.parent)&&(Nt.value+=it.value)})),Ye},We};function $n(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=os,X}function Sn(X,se){for(var Le=[X];(X=Le.pop())!=null;)if(se(X),(Ye=X.children)&&(We=Ye.length))for(var We,Ye;--We>=0;)Le.push(Ye[We])}function uo(X,se){for(var Le=[X],We=[];(X=Le.pop())!=null;)if(We.push(X),(Nt=X.children)&&(it=Nt.length))for(var Ye=-1,it,Nt;++YeYe&&(Ye=mt),We.push(mt)}for(Nt=0;NtWe&&(Le=se,We=Ye);return Le}function ro(X){return X.reduce(Ma,0)}function Ma(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Le=Oo,We=io;function Ye(it,Wr){for(var mt=[],er=it.map(se,this),_r=Le.call(this,er,Wr),wr=We.call(this,_r,er,Wr),ni,Wr=-1,Ci=er.length,Ji=wr.length-1,ai=X?1:1/Ci,Ti;++Wr0)for(Wr=-1;++Wr=_r[0]&&Ti<=_r[1]&&(ni=mt[e.bisect(wr,Ti,1,Ji)-1],ni.y+=ai,ni.push(it[Wr]));return mt}return Ye.value=function(it){return arguments.length?(se=it,Ye):se},Ye.range=function(it){return arguments.length?(Le=or(it),Ye):Le},Ye.bins=function(it){return arguments.length?(We=typeof it=="number"?function(Nt){return aa(Nt,it)}:or(it),Ye):We},Ye.frequency=function(it){return arguments.length?(X=!!it,Ye):X},Ye};function io(X,se){return aa(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function aa(X,se){for(var Le=-1,We=+X[0],Ye=(X[1]-We)/se,it=[];++Le<=se;)it[Le]=Ye*Le+We;return it}function Oo(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(No),se=0,Le=[1,1],We;function Ye(it,Nt){var mt=X.call(this,it,Nt),er=mt[0],_r=Le[0],wr=Le[1],ni=We==null?Math.sqrt:typeof We=="function"?We:function(){return We};if(er.x=er.y=0,uo(er,function(Ci){Ci.r=+ni(Ci.value)}),uo(er,no),se){var Wr=se*(We?1:Math.max(2*er.r/_r,2*er.r/wr))/2;uo(er,function(Ci){Ci.r+=Wr}),uo(er,no),uo(er,function(Ci){Ci.r-=Wr})}return Xs(er,_r/2,wr/2,We?1:1/Math.max(2*er.r/_r,2*er.r/wr)),mt}return Ye.size=function(it){return arguments.length?(Le=it,Ye):Le},Ye.radius=function(it){return arguments.length?(We=it==null||typeof it=="function"?it:+it,Ye):We},Ye.padding=function(it){return arguments.length?(se=+it,Ye):se},$n(Ye,X)};function No(X,se){return X.value-se.value}function Zs(X,se){var Le=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Le,Le._pack_prev=se}function Fs(X,se){X._pack_next=se,se._pack_prev=X}function ws(X,se){var Le=se.x-X.x,We=se.y-X.y,Ye=X.r+se.r;return .999*Ye*Ye>Le*Le+We*We}function no(X){if(!(se=X.children)||!(Wr=se.length))return;var se,Le=1/0,We=-1/0,Ye=1/0,it=-1/0,Nt,mt,er,_r,wr,ni,Wr;function Ci(bi){Le=Math.min(bi.x-bi.r,Le),We=Math.max(bi.x+bi.r,We),Ye=Math.min(bi.y-bi.r,Ye),it=Math.max(bi.y+bi.r,it)}if(se.forEach(Ls),Nt=se[0],Nt.x=-Nt.r,Nt.y=0,Ci(Nt),Wr>1&&(mt=se[1],mt.x=mt.r,mt.y=0,Ci(mt),Wr>2))for(er=se[2],oa(Nt,mt,er),Ci(er),Zs(Nt,er),Nt._pack_prev=er,Zs(er,mt),mt=Nt._pack_next,_r=3;_rTi.x&&(Ti=ao),ao.depth>Bi.depth&&(Bi=ao)});var en=se(ai,Ti)/2-ai.x,Wi=Le[0]/(Ti.x+se(Ti,ai)/2+en),bi=Le[1]/(Bi.depth||1);Sn(Ci,function(ao){ao.x=(ao.x+en)*Wi,ao.y=ao.depth*bi})}return Wr}function it(wr){for(var ni={A:null,children:[wr]},Wr=[ni],Ci;(Ci=Wr.pop())!=null;)for(var Ji=Ci.children,ai,Ti=0,Bi=Ji.length;Ti0&&(ls(bt(ai,wr,Wr),wr,ao),Bi+=ao,en+=ao),Wi+=ai.m,Bi+=Ci.m,bi+=Ti.m,en+=Ji.m;ai&&!ss(Ji)&&(Ji.t=ai,Ji.m+=Wi-en),Ci&&!po(Ti)&&(Ti.t=Ci,Ti.m+=Bi-bi,Wr=wr)}return Wr}function _r(wr){wr.x*=Le[0],wr.y=wr.depth*Le[1]}return Ye.separation=function(wr){return arguments.length?(se=wr,Ye):se},Ye.size=function(wr){return arguments.length?(We=(Le=wr)==null?_r:null,Ye):We?null:Le},Ye.nodeSize=function(wr){return arguments.length?(We=(Le=wr)==null?null:_r,Ye):We?Le:null},$n(Ye,X)};function Yo(X,se){return X.parent==se.parent?1:2}function po(X){var se=X.children;return se.length?se[0]:X.t}function ss(X){var se=X.children,Le;return(Le=se.length)?se[Le-1]:X.t}function ls(X,se,Le){var We=Le/(se.i-X.i);se.c-=We,se.s+=Le,X.c+=We,se.z+=Le,se.m+=Le}function gs(X){for(var se=0,Le=0,We=X.children,Ye=We.length,it;--Ye>=0;)it=We[Ye],it.z+=se,it.m+=se,se+=it.s+(Le+=it.c)}function bt(X,se,Le){return X.a.parent===se.parent?X.a:Le}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=Yo,Le=[1,1],We=!1;function Ye(it,Nt){var mt=X.call(this,it,Nt),er=mt[0],_r,wr=0;uo(er,function(ai){var Ti=ai.children;Ti&&Ti.length?(ai.x=hr(Ti),ai.y=Ft(Ti)):(ai.x=_r?wr+=se(ai,_r):0,ai.y=0,_r=ai)});var ni=nr(er),Wr=Sr(er),Ci=ni.x-se(ni,Wr)/2,Ji=Wr.x+se(Wr,ni)/2;return uo(er,We?function(ai){ai.x=(ai.x-er.x)*Le[0],ai.y=(er.y-ai.y)*Le[1]}:function(ai){ai.x=(ai.x-Ci)/(Ji-Ci)*Le[0],ai.y=(1-(er.y?ai.y/er.y:1))*Le[1]}),mt}return Ye.separation=function(it){return arguments.length?(se=it,Ye):se},Ye.size=function(it){return arguments.length?(We=(Le=it)==null,Ye):We?null:Le},Ye.nodeSize=function(it){return arguments.length?(We=(Le=it)!=null,Ye):We?Le:null},$n(Ye,X)};function Ft(X){return 1+e.max(X,function(se){return se.y})}function hr(X){return X.reduce(function(se,Le){return se+Le.x},0)/X.length}function nr(X){var se=X.children;return se&&se.length?nr(se[0]):X}function Sr(X){var se=X.children,Le;return se&&(Le=se.length)?Sr(se[Le-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Le=[1,1],We=null,Ye=li,it=!1,Nt,mt="squarify",er=.5*(1+Math.sqrt(5));function _r(ai,Ti){for(var Bi=-1,en=ai.length,Wi,bi;++Bi0;)en.push(bi=Wi[Ms-1]),en.area+=bi.area,mt!=="squarify"||(yo=Wr(en,Ko))<=ao?(Wi.pop(),ao=yo):(en.area-=en.pop().area,Ci(en,Ko,Bi,!1),Ko=Math.min(Bi.dx,Bi.dy),en.length=en.area=0,ao=1/0);en.length&&(Ci(en,Ko,Bi,!0),en.length=en.area=0),Ti.forEach(wr)}}function ni(ai){var Ti=ai.children;if(Ti&&Ti.length){var Bi=Ye(ai),en=Ti.slice(),Wi,bi=[];for(_r(en,Bi.dx*Bi.dy/ai.value),bi.area=0;Wi=en.pop();)bi.push(Wi),bi.area+=Wi.area,Wi.z!=null&&(Ci(bi,Wi.z?Bi.dx:Bi.dy,Bi,!en.length),bi.length=bi.area=0);Ti.forEach(ni)}}function Wr(ai,Ti){for(var Bi=ai.area,en,Wi=0,bi=1/0,ao=-1,yo=ai.length;++aoWi&&(Wi=en));return Bi*=Bi,Ti*=Ti,Bi?Math.max(Ti*Wi*er/Bi,Bi/(Ti*bi*er)):1/0}function Ci(ai,Ti,Bi,en){var Wi=-1,bi=ai.length,ao=Bi.x,yo=Bi.y,Ko=Ti?se(ai.area/Ti):0,Ms;if(Ti==Bi.dx){for((en||Ko>Bi.dy)&&(Ko=Bi.dy);++WiBi.dx)&&(Ko=Bi.dx);++Wi1);return X+se*We*Math.sqrt(-2*Math.log(it)/it)}},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,Le=0;Le2?gi:dn,_r=We?vs:Ro;return Ye=er(X,se,_r,Le),it=er(se,X,_r,Ya),mt}function mt(er){return Ye(er)}return mt.invert=function(er){return it(er)},mt.domain=function(er){return arguments.length?(X=er.map(Number),Nt()):X},mt.range=function(er){return arguments.length?(se=er,Nt()):se},mt.rangeRound=function(er){return mt.range(er).interpolate(ja)},mt.clamp=function(er){return arguments.length?(We=er,Nt()):We},mt.interpolate=function(er){return arguments.length?(Le=er,Nt()):Le},mt.ticks=function(er){return Hn(X,er)},mt.tickFormat=function(er,_r){return d3_scale_linearTickFormat(X,er,_r)},mt.nice=function(er){return Vn(X,er),Nt()},mt.copy=function(){return gn(X,se,Le,We)},Nt()}function In(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Vn(X,se){return wi(X,ui(Rn(X,se)[2])),wi(X,ui(Rn(X,se)[2])),X}function Rn(X,se){se==null&&(se=10);var Le=mi(X),We=Le[1]-Le[0],Ye=Math.pow(10,Math.floor(Math.log(We/se)/Math.LN10)),it=se/We*Ye;return it<=.15?Ye*=10:it<=.35?Ye*=5:it<=.75&&(Ye*=2),Le[0]=Math.ceil(Le[0]/Ye)*Ye,Le[1]=Math.floor(Le[1]/Ye)*Ye+Ye*.5,Le[2]=Ye,Le}function Hn(X,se){return e.range.apply(e,Rn(X,se))}var Gn={s:1,g:1,p:1,r:1,e:1};function pn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Lo(X,se){var Le=pn(se[2]);return X in Gn?Math.abs(Le-pn(Math.max(y(se[0]),y(se[1]))))+ +(X!=="e"):Le-(X==="%")*2}e.scale.log=function(){return us(e.scale.linear().domain([0,1]),10,!0,[1,10])};function us(X,se,Le,We){function Ye(mt){return(Le?Math.log(mt<0?0:mt):-Math.log(mt>0?0:-mt))/Math.log(se)}function it(mt){return Le?Math.pow(se,mt):-Math.pow(se,-mt)}function Nt(mt){return X(Ye(mt))}return Nt.invert=function(mt){return it(X.invert(mt))},Nt.domain=function(mt){return arguments.length?(Le=mt[0]>=0,X.domain((We=mt.map(Number)).map(Ye)),Nt):We},Nt.base=function(mt){return arguments.length?(se=+mt,X.domain(We.map(Ye)),Nt):se},Nt.nice=function(){var mt=wi(We.map(Ye),Le?Math:Bs);return X.domain(mt),We=mt.map(it),Nt},Nt.ticks=function(){var mt=mi(We),er=[],_r=mt[0],wr=mt[1],ni=Math.floor(Ye(_r)),Wr=Math.ceil(Ye(wr)),Ci=se%1?2:se;if(isFinite(Wr-ni)){if(Le){for(;ni0;Ji--)er.push(it(ni)*Ji);for(ni=0;er[ni]<_r;ni++);for(Wr=er.length;er[Wr-1]>wr;Wr--);er=er.slice(ni,Wr)}return er},Nt.copy=function(){return us(X.copy(),se,Le,We)},In(Nt,X)}var Bs={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Js(e.scale.linear(),1,[0,1])};function Js(X,se,Le){var We=ol(se),Ye=ol(1/se);function it(Nt){return X(We(Nt))}return it.invert=function(Nt){return Ye(X.invert(Nt))},it.domain=function(Nt){return arguments.length?(X.domain((Le=Nt.map(Number)).map(We)),it):Le},it.ticks=function(Nt){return Hn(Le,Nt)},it.tickFormat=function(Nt,mt){return d3_scale_linearTickFormat(Le,Nt,mt)},it.nice=function(Nt){return it.domain(Vn(Le,Nt))},it.exponent=function(Nt){return arguments.length?(We=ol(se=Nt),Ye=ol(1/se),X.domain(Le.map(We)),it):se},it.copy=function(){return Js(X.copy(),se,Le)},In(it,X)}function ol(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 Cl([],{t:"range",a:[[]]})};function Cl(X,se){var Le,We,Ye;function it(mt){return We[((Le.get(mt)||(se.t==="range"?Le.set(mt,X.push(mt)):NaN))-1)%We.length]}function Nt(mt,er){return e.range(X.length).map(function(_r){return mt+er*_r})}return it.domain=function(mt){if(!arguments.length)return X;X=[],Le=new A;for(var er=-1,_r=mt.length,wr;++er<_r;)Le.has(wr=mt[er])||Le.set(wr,X.push(wr));return it[se.t].apply(it,se.a)},it.range=function(mt){return arguments.length?(We=mt,Ye=0,se={t:"range",a:arguments},it):We},it.rangePoints=function(mt,er){arguments.length<2&&(er=0);var _r=mt[0],wr=mt[1],ni=X.length<2?(_r=(_r+wr)/2,0):(wr-_r)/(X.length-1+er);return We=Nt(_r+ni*er/2,ni),Ye=0,se={t:"rangePoints",a:arguments},it},it.rangeRoundPoints=function(mt,er){arguments.length<2&&(er=0);var _r=mt[0],wr=mt[1],ni=X.length<2?(_r=wr=Math.round((_r+wr)/2),0):(wr-_r)/(X.length-1+er)|0;return We=Nt(_r+Math.round(ni*er/2+(wr-_r-(X.length-1+er)*ni)/2),ni),Ye=0,se={t:"rangeRoundPoints",a:arguments},it},it.rangeBands=function(mt,er,_r){arguments.length<2&&(er=0),arguments.length<3&&(_r=er);var wr=mt[1]0?Le[it-1]:X[0],itWr?0:1;if(wr<_r&&(ai=wr,wr=_r,_r=ai),Ci>=ye)return er(wr,Ji)+(_r?er(_r,1-Ji):"")+"Z";var ai,Ti,Bi,en,Wi=0,bi=0,ao,yo,Ko,Ms,vl,wl,au,Al,nu=[];if((en=(+Nt.apply(this,arguments)||0)/2)&&(Bi=We===Gs?Math.sqrt(_r*_r+wr*wr):+We.apply(this,arguments),Ji||(bi*=-1),wr&&(bi=qr(Bi/wr*Math.sin(en))),_r&&(Wi=qr(Bi/_r*Math.sin(en)))),wr){ao=wr*Math.cos(ni+bi),yo=wr*Math.sin(ni+bi),Ko=wr*Math.cos(Wr-bi),Ms=wr*Math.sin(Wr-bi);var Bu=Math.abs(Wr-ni-2*bi)<=Ie?0:1;if(bi&&xl(ao,yo,Ko,Ms)===Ji^Bu){var qu=(ni+Wr)/2;ao=wr*Math.cos(qu),yo=wr*Math.sin(qu),Ko=Ms=null}}else ao=yo=0;if(_r){vl=_r*Math.cos(Wr-Wi),wl=_r*Math.sin(Wr-Wi),au=_r*Math.cos(ni+Wi),Al=_r*Math.sin(ni+Wi);var Ju=Math.abs(ni-Wr+2*Wi)<=Ie?0:1;if(Wi&&xl(vl,wl,au,Al)===1-Ji^Ju){var qo=(ni+Wr)/2;vl=_r*Math.cos(qo),wl=_r*Math.sin(qo),au=Al=null}}else vl=wl=0;if(Ci>Fe&&(ai=Math.min(Math.abs(wr-_r)/2,+Le.apply(this,arguments)))>.001){Ti=_r0?0:1}function Uo(X,se,Le,We,Ye){var it=X[0]-se[0],Nt=X[1]-se[1],mt=(Ye?We:-We)/Math.sqrt(it*it+Nt*Nt),er=mt*Nt,_r=-mt*it,wr=X[0]+er,ni=X[1]+_r,Wr=se[0]+er,Ci=se[1]+_r,Ji=(wr+Wr)/2,ai=(ni+Ci)/2,Ti=Wr-wr,Bi=Ci-ni,en=Ti*Ti+Bi*Bi,Wi=Le-We,bi=wr*Ci-Wr*ni,ao=(Bi<0?-1:1)*Math.sqrt(Math.max(0,Wi*Wi*en-bi*bi)),yo=(bi*Bi-Ti*ao)/en,Ko=(-bi*Ti-Bi*ao)/en,Ms=(bi*Bi+Ti*ao)/en,vl=(-bi*Ti+Bi*ao)/en,wl=yo-Ji,au=Ko-ai,Al=Ms-Ji,nu=vl-ai;return wl*wl+au*au>Al*Al+nu*nu&&(yo=Ms,Ko=vl),[[yo-er,Ko-_r],[yo*Le/Wi,Ko*Le/Wi]]}function _s(){return!0}function Bl(X){var se=Hr,Le=na,We=_s,Ye=Dl,it=Ye.key,Nt=.7;function mt(er){var _r=[],wr=[],ni=-1,Wr=er.length,Ci,Ji=or(se),ai=or(Le);function Ti(){_r.push("M",Ye(X(wr),Nt))}for(;++ni1?X.join("L"):X+"Z"}function oe(X){return X.join("L")+"Z"}function w(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se1&&Ye.push("H",We[0]),Ye.join("")}function B(X){for(var se=0,Le=X.length,We=X[0],Ye=[We[0],",",We[1]];++se1){mt=se[1],it=X[er],er++,We+="C"+(Ye[0]+Nt[0])+","+(Ye[1]+Nt[1])+","+(it[0]-mt[0])+","+(it[1]-mt[1])+","+it[0]+","+it[1];for(var _r=2;_r9&&(it=Le*3/Math.sqrt(it),Nt[mt]=it*We,Nt[mt+1]=it*Ye));for(mt=-1;++mt<=er;)it=(X[Math.min(er,mt+1)][0]-X[Math.max(0,mt-1)][0])/(6*(1+Nt[mt]*Nt[mt])),se.push([it||0,Nt[mt]*it||0]);return se}function qt(X){return X.length<3?Dl(X):X[0]+$e(X,ft(X))}e.svg.line.radial=function(){var X=Bl(Xt);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Xt(X){for(var se,Le=-1,We=X.length,Ye,it;++LeIe)+",1 "+ni}function _r(wr,ni,Wr,Ci){return"Q 0,0 "+Ci}return it.radius=function(wr){return arguments.length?(Le=or(wr),it):Le},it.source=function(wr){return arguments.length?(X=or(wr),it):X},it.target=function(wr){return arguments.length?(se=or(wr),it):se},it.startAngle=function(wr){return arguments.length?(We=or(wr),it):We},it.endAngle=function(wr){return arguments.length?(Ye=or(wr),it):Ye},it};function $r(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Mr,Le=ii;function We(Ye,it){var Nt=X.call(this,Ye,it),mt=se.call(this,Ye,it),er=(Nt.y+mt.y)/2,_r=[Nt,{x:Nt.x,y:er},{x:mt.x,y:er},mt];return _r=_r.map(Le),"M"+_r[0]+"C"+_r[1]+" "+_r[2]+" "+_r[3]}return We.source=function(Ye){return arguments.length?(X=or(Ye),We):X},We.target=function(Ye){return arguments.length?(se=or(Ye),We):se},We.projection=function(Ye){return arguments.length?(Le=Ye,We):Le},We};function ii(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=ii,Le=X.projection;return X.projection=function(We){return arguments.length?Le(pi(se=We)):se},X};function pi(X){return function(){var se=X.apply(this,arguments),Le=se[0],We=se[1]-ue;return[Le*Math.cos(We),Le*Math.sin(We)]}}e.svg.symbol=function(){var X=wn,se=Yi;function Le(We,Ye){return(ua.get(X.call(this,We,Ye))||Tn)(se.call(this,We,Ye))}return Le.type=function(We){return arguments.length?(X=or(We),Le):X},Le.size=function(We){return arguments.length?(se=or(We),Le):se},Le};function Yi(){return 64}function wn(){return"circle"}function Tn(X){var se=Math.sqrt(X/Ie);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var ua=e.map({circle:Tn,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*el)),Le=se*el;return"M0,"+-se+"L"+Le+",0 0,"+se+" "+-Le+",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/oo),Le=se*oo/2;return"M0,"+Le+"L"+se+","+-Le+" "+-se+","+-Le+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/oo),Le=se*oo/2;return"M0,"+-Le+"L"+se+","+Le+" "+-se+","+Le+"Z"}});e.svg.symbolTypes=ua.keys();var oo=Math.sqrt(3),el=Math.tan(30*de);Re.transition=function(X){for(var se=Ll||++Hl,Le=Kl(X),We=[],Ye,it,Nt=Ql||{time:Date.now(),ease:Za,delay:0,duration:250},mt=-1,er=this.length;++mt0;)ni[--en].call(X,Bi);if(Ti>=1)return Nt.event&&Nt.event.end.call(X,X.__data__,se),--it.count?delete it[We]:delete X[Le],1}Nt||(mt=Ye.time,er=Wn(Wr,0,mt),Nt=it[We]={tween:new A,time:mt,timer:er,delay:Ye.delay,duration:Ye.duration,ease:Ye.ease,index:se},Ye=null,++it.count)}e.svg.axis=function(){var X=e.scale.linear(),se=tf,Le=6,We=6,Ye=3,it=[10],Nt=null,mt;function er(_r){_r.each(function(){var wr=e.select(this),ni=this.__chart__||X,Wr=this.__chart__=X.copy(),Ci=Nt==null?Wr.ticks?Wr.ticks.apply(Wr,it):Wr.domain():Nt,Ji=mt==null?Wr.tickFormat?Wr.tickFormat.apply(Wr,it):H:mt,ai=wr.selectAll(".tick").data(Ci,Wr),Ti=ai.enter().insert("g",".domain").attr("class","tick").style("opacity",Fe),Bi=e.transition(ai.exit()).style("opacity",Fe).remove(),en=e.transition(ai.order()).style("opacity",1),Wi=Math.max(Le,0)+Ye,bi,ao=Oi(Wr),yo=wr.selectAll(".domain").data([0]),Ko=(yo.enter().append("path").attr("class","domain"),e.transition(yo));Ti.append("line"),Ti.append("text");var Ms=Ti.select("line"),vl=en.select("line"),wl=ai.select("text").text(Ji),au=Ti.select("text"),Al=en.select("text"),nu=se==="top"||se==="left"?-1:1,Bu,qu,Ju,qo;if(se==="bottom"||se==="top"?(bi=Gu,Bu="x",Ju="y",qu="x2",qo="y2",wl.attr("dy",nu<0?"0em":".71em").style("text-anchor","middle"),Ko.attr("d","M"+ao[0]+","+nu*We+"V0H"+ao[1]+"V"+nu*We)):(bi=Wu,Bu="y",Ju="x",qu="y2",qo="x2",wl.attr("dy",".32em").style("text-anchor",nu<0?"end":"start"),Ko.attr("d","M"+nu*We+","+ao[0]+"H0V"+ao[1]+"H"+nu*We)),Ms.attr(qo,nu*Le),au.attr(Ju,nu*Wi),vl.attr(qu,0).attr(qo,nu*Le),Al.attr(Bu,0).attr(Ju,nu*Wi),Wr.rangeBand){var Rl=Wr,pu=Rl.rangeBand()/2;ni=Wr=function(xu){return Rl(xu)+pu}}else ni.rangeBand?ni=Wr:Bi.call(bi,Wr,ni);Ti.call(bi,ni,Wr),en.call(bi,Wr,Wr)})}return er.scale=function(_r){return arguments.length?(X=_r,er):X},er.orient=function(_r){return arguments.length?(se=_r in Ku?_r+"":tf,er):se},er.ticks=function(){return arguments.length?(it=r(arguments),er):it},er.tickValues=function(_r){return arguments.length?(Nt=_r,er):Nt},er.tickFormat=function(_r){return arguments.length?(mt=_r,er):mt},er.tickSize=function(_r){var wr=arguments.length;return wr?(Le=+_r,We=+arguments[wr-1],er):Le},er.innerTickSize=function(_r){return arguments.length?(Le=+_r,er):Le},er.outerTickSize=function(_r){return arguments.length?(We=+_r,er):We},er.tickPadding=function(_r){return arguments.length?(Ye=+_r,er):Ye},er.tickSubdivide=function(){return arguments.length&&er},er};var tf="bottom",Ku={top:1,right:1,bottom:1,left:1};function Gu(X,se,Le){X.attr("transform",function(We){var Ye=se(We);return"translate("+(isFinite(Ye)?Ye:Le(We))+",0)"})}function Wu(X,se,Le){X.attr("transform",function(We){var Ye=se(We);return"translate(0,"+(isFinite(Ye)?Ye:Le(We))+")"})}e.svg.brush=function(){var X=Ce(wr,"brushstart","brush","brushend"),se=null,Le=null,We=[0,0],Ye=[0,0],it,Nt,mt=!0,er=!0,_r=gf[0];function wr(ai){ai.each(function(){var Ti=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ji).on("touchstart.brush",Ji),Bi=Ti.selectAll(".background").data([0]);Bi.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ti.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var en=Ti.selectAll(".resize").data(_r,H);en.exit().remove(),en.enter().append("g").attr("class",function(yo){return"resize "+yo}).style("cursor",function(yo){return sf[yo]}).append("rect").attr("x",function(yo){return/[ew]$/.test(yo)?-3:null}).attr("y",function(yo){return/^[ns]/.test(yo)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),en.style("display",wr.empty()?"none":null);var Wi=e.transition(Ti),bi=e.transition(Bi),ao;se&&(ao=Oi(se),bi.attr("x",ao[0]).attr("width",ao[1]-ao[0]),Wr(Wi)),Le&&(ao=Oi(Le),bi.attr("y",ao[0]).attr("height",ao[1]-ao[0]),Ci(Wi)),ni(Wi)})}wr.event=function(ai){ai.each(function(){var Ti=X.of(this,arguments),Bi={x:We,y:Ye,i:it,j:Nt},en=this.__chart__||Bi;this.__chart__=Bi,Ll?e.select(this).transition().each("start.brush",function(){it=en.i,Nt=en.j,We=en.x,Ye=en.y,Ti({type:"brushstart"})}).tween("brush:brush",function(){var Wi=ba(We,Bi.x),bi=ba(Ye,Bi.y);return it=Nt=null,function(ao){We=Bi.x=Wi(ao),Ye=Bi.y=bi(ao),Ti({type:"brush",mode:"resize"})}}).each("end.brush",function(){it=Bi.i,Nt=Bi.j,Ti({type:"brush",mode:"resize"}),Ti({type:"brushend"})}):(Ti({type:"brushstart"}),Ti({type:"brush",mode:"resize"}),Ti({type:"brushend"}))})};function ni(ai){ai.selectAll(".resize").attr("transform",function(Ti){return"translate("+We[+/e$/.test(Ti)]+","+Ye[+/^s/.test(Ti)]+")"})}function Wr(ai){ai.select(".extent").attr("x",We[0]),ai.selectAll(".extent,.n>rect,.s>rect").attr("width",We[1]-We[0])}function Ci(ai){ai.select(".extent").attr("y",Ye[0]),ai.selectAll(".extent,.e>rect,.w>rect").attr("height",Ye[1]-Ye[0])}function Ji(){var ai=this,Ti=e.select(e.event.target),Bi=X.of(ai,arguments),en=e.select(ai),Wi=Ti.datum(),bi=!/^(n|s)$/.test(Wi)&&se,ao=!/^(e|w)$/.test(Wi)&&Le,yo=Ti.classed("extent"),Ko=fr(ai),Ms,vl=e.mouse(ai),wl,au=e.select(a(ai)).on("keydown.brush",Bu).on("keyup.brush",qu);if(e.event.changedTouches?au.on("touchmove.brush",Ju).on("touchend.brush",Rl):au.on("mousemove.brush",Ju).on("mouseup.brush",Rl),en.interrupt().selectAll("*").interrupt(),yo)vl[0]=We[0]-vl[0],vl[1]=Ye[0]-vl[1];else if(Wi){var Al=+/w$/.test(Wi),nu=+/^n/.test(Wi);wl=[We[1-Al]-vl[0],Ye[1-nu]-vl[1]],vl[0]=We[Al],vl[1]=Ye[nu]}else e.event.altKey&&(Ms=vl.slice());en.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Ti.style("cursor")),Bi({type:"brushstart"}),Ju();function Bu(){e.event.keyCode==32&&(yo||(Ms=null,vl[0]-=We[1],vl[1]-=Ye[1],yo=2),be())}function qu(){e.event.keyCode==32&&yo==2&&(vl[0]+=We[1],vl[1]+=Ye[1],yo=0,be())}function Ju(){var pu=e.mouse(ai),xu=!1;wl&&(pu[0]+=wl[0],pu[1]+=wl[1]),yo||(e.event.altKey?(Ms||(Ms=[(We[0]+We[1])/2,(Ye[0]+Ye[1])/2]),vl[0]=We[+(pu[0]{(function(e,t){typeof rL=="object"&&typeof hee!="undefined"?t(rL):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(rL,function(e){"use strict";var t=new Date,r=new Date;function n(Te,nt,ut,ct){function rt(je){return Te(je=arguments.length===0?new Date:new Date(+je)),je}return rt.floor=function(je){return Te(je=new Date(+je)),je},rt.ceil=function(je){return Te(je=new Date(je-1)),nt(je,1),Te(je),je},rt.round=function(je){var tt=rt(je),Je=rt.ceil(je);return je-tt0))return Mt;do Mt.push(Vt=new Date(+je)),nt(je,Je),Te(je);while(Vt=tt)for(;Te(tt),!je(tt);)tt.setTime(tt-1)},function(tt,Je){if(tt>=tt)if(Je<0)for(;++Je<=0;)for(;nt(tt,-1),!je(tt););else for(;--Je>=0;)for(;nt(tt,1),!je(tt););})},ut&&(rt.count=function(je,tt){return t.setTime(+je),r.setTime(+tt),Te(t),Te(r),Math.floor(ut(t,r))},rt.every=function(je){return je=Math.floor(je),!isFinite(je)||!(je>0)?null:je>1?rt.filter(ct?function(tt){return ct(tt)%je===0}:function(tt){return rt.count(0,tt)%je===0}):rt}),rt}var i=n(function(){},function(Te,nt){Te.setTime(+Te+nt)},function(Te,nt){return nt-Te});i.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(nt){nt.setTime(Math.floor(nt/Te)*Te)},function(nt,ut){nt.setTime(+nt+ut*Te)},function(nt,ut){return(ut-nt)/Te}):i};var a=i.range,o=1e3,s=6e4,u=36e5,l=864e5,f=6048e5,c=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,nt){Te.setTime(+Te+nt*o)},function(Te,nt){return(nt-Te)/o},function(Te){return Te.getUTCSeconds()}),h=c.range,d=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,nt){Te.setTime(+Te+nt*s)},function(Te,nt){return(nt-Te)/s},function(Te){return Te.getMinutes()}),p=d.range,x=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,nt){Te.setTime(+Te+nt*u)},function(Te,nt){return(nt-Te)/u},function(Te){return Te.getHours()}),b=x.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,nt){Te.setDate(Te.getDate()+nt)},function(Te,nt){return(nt-Te-(nt.getTimezoneOffset()-Te.getTimezoneOffset())*s)/l},function(Te){return Te.getDate()-1}),k=y.range;function E(Te){return n(function(nt){nt.setDate(nt.getDate()-(nt.getDay()+7-Te)%7),nt.setHours(0,0,0,0)},function(nt,ut){nt.setDate(nt.getDate()+ut*7)},function(nt,ut){return(ut-nt-(ut.getTimezoneOffset()-nt.getTimezoneOffset())*s)/f})}var A=E(0),L=E(1),_=E(2),C=E(3),M=E(4),v=E(5),z=E(6),T=A.range,F=L.range,q=_.range,U=C.range,H=M.range,j=v.range,G=z.range,O=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,nt){Te.setMonth(Te.getMonth()+nt)},function(Te,nt){return nt.getMonth()-Te.getMonth()+(nt.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),W=O.range,re=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,nt){Te.setFullYear(Te.getFullYear()+nt)},function(Te,nt){return nt.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});re.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(nt){nt.setFullYear(Math.floor(nt.getFullYear()/Te)*Te),nt.setMonth(0,1),nt.setHours(0,0,0,0)},function(nt,ut){nt.setFullYear(nt.getFullYear()+ut*Te)})};var ne=re.range,be=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,nt){Te.setTime(+Te+nt*s)},function(Te,nt){return(nt-Te)/s},function(Te){return Te.getUTCMinutes()}),ze=be.range,Ce=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,nt){Te.setTime(+Te+nt*u)},function(Te,nt){return(nt-Te)/u},function(Te){return Te.getUTCHours()}),he=Ce.range,te=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCDate(Te.getUTCDate()+nt)},function(Te,nt){return(nt-Te)/l},function(Te){return Te.getUTCDate()-1}),ke=te.range;function Ee(Te){return n(function(nt){nt.setUTCDate(nt.getUTCDate()-(nt.getUTCDay()+7-Te)%7),nt.setUTCHours(0,0,0,0)},function(nt,ut){nt.setUTCDate(nt.getUTCDate()+ut*7)},function(nt,ut){return(ut-nt)/f})}var Me=Ee(0),Oe=Ee(1),Re=Ee(2),me=Ee(3),Be=Ee(4),fe=Ee(5),Ze=Ee(6),et=Me.range,gt=Oe.range,Pt=Re.range,Qe=me.range,Xe=Be.range,Tt=fe.range,xt=Ze.range,_t=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCMonth(Te.getUTCMonth()+nt)},function(Te,nt){return nt.getUTCMonth()-Te.getUTCMonth()+(nt.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),Ct=_t.range,jt=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,nt){Te.setUTCFullYear(Te.getUTCFullYear()+nt)},function(Te,nt){return nt.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});jt.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(nt){nt.setUTCFullYear(Math.floor(nt.getUTCFullYear()/Te)*Te),nt.setUTCMonth(0,1),nt.setUTCHours(0,0,0,0)},function(nt,ut){nt.setUTCFullYear(nt.getUTCFullYear()+ut*Te)})};var At=jt.range;e.timeDay=y,e.timeDays=k,e.timeFriday=v,e.timeFridays=j,e.timeHour=x,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=F,e.timeMonth=O,e.timeMonths=W,e.timeSaturday=z,e.timeSaturdays=G,e.timeSecond=c,e.timeSeconds=h,e.timeSunday=A,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=H,e.timeTuesday=_,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=A,e.timeWeeks=T,e.timeYear=re,e.timeYears=ne,e.utcDay=te,e.utcDays=ke,e.utcFriday=fe,e.utcFridays=Tt,e.utcHour=Ce,e.utcHours=he,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=be,e.utcMinutes=ze,e.utcMonday=Oe,e.utcMondays=gt,e.utcMonth=_t,e.utcMonths=Ct,e.utcSaturday=Ze,e.utcSaturdays=xt,e.utcSecond=c,e.utcSeconds=h,e.utcSunday=Me,e.utcSundays=et,e.utcThursday=Be,e.utcThursdays=Xe,e.utcTuesday=Re,e.utcTuesdays=Pt,e.utcWednesday=me,e.utcWednesdays=Qe,e.utcWeek=Me,e.utcWeeks=et,e.utcYear=jt,e.utcYears=At,Object.defineProperty(e,"__esModule",{value:!0})})});var e3=Se((iL,dee)=>{(function(e,t){typeof iL=="object"&&typeof dee!="undefined"?t(iL,wB()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(iL,function(e,t){"use strict";function r(_e){if(0<=_e.y&&_e.y<100){var Fe=new Date(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L);return Fe.setFullYear(_e.y),Fe}return new Date(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L)}function n(_e){if(0<=_e.y&&_e.y<100){var Fe=new Date(Date.UTC(-1,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L));return Fe.setUTCFullYear(_e.y),Fe}return new Date(Date.UTC(_e.y,_e.m,_e.d,_e.H,_e.M,_e.S,_e.L))}function i(_e,Fe,Pe){return{y:_e,m:Fe,d:Pe,H:0,M:0,S:0,L:0}}function a(_e){var Fe=_e.dateTime,Pe=_e.date,Ie=_e.time,lt=_e.periods,ye=_e.days,ue=_e.shortDays,de=_e.months,ht=_e.shortMonths,Et=h(lt),St=d(lt),Zt=h(ye),qr=d(ye),Lr=h(ue),vr=d(ue),Er=h(de),si=d(de),Ei=h(ht),Si=d(ht),xi={a:Br,A:oi,b:vi,B:Pi,c:null,d:O,e:O,f:ze,H:W,I:re,j:ne,L:be,m:Ce,M:he,p:Yr,q:Ni,Q:tt,s:Je,S:te,u:ke,U:Ee,V:Me,w:Oe,W:Re,x:null,X:null,y:me,Y:Be,Z:fe,"%":je},Hi={a:Ur,A:ti,b:ki,B:ji,c:null,d:Ze,e:Ze,f:Xe,H:et,I:gt,j:Pt,L:Qe,m:Tt,M:xt,p:Vi,q:zi,Q:tt,s:Je,S:_t,u:Ct,U:jt,V:At,w:Te,W:nt,x:null,X:null,y:ut,Y:ct,Z:rt,"%":je},Jr={a:Dt,A:Bt,b:sr,B:br,c:zr,d:M,e:M,f:U,H:z,I:z,j:v,L:q,m:C,M:T,p:vt,q:_,Q:j,s:G,S:F,u:x,U:b,V:y,w:p,W:k,x:Tr,X:Rr,y:A,Y:E,Z:L,"%":H};xi.x=ci(Pe,xi),xi.X=ci(Ie,xi),xi.c=ci(Fe,xi),Hi.x=ci(Pe,Hi),Hi.X=ci(Ie,Hi),Hi.c=ci(Fe,Hi);function ci(Mi,sn){return function(fi){var Or=[],st=-1,Wt=0,tr=Mi.length,or,Nr,hi;for(fi instanceof Date||(fi=new Date(+fi));++st53)return null;"w"in Or||(Or.w=1),"Z"in Or?(Wt=n(i(Or.y,0,1)),tr=Wt.getUTCDay(),Wt=tr>4||tr===0?t.utcMonday.ceil(Wt):t.utcMonday(Wt),Wt=t.utcDay.offset(Wt,(Or.V-1)*7),Or.y=Wt.getUTCFullYear(),Or.m=Wt.getUTCMonth(),Or.d=Wt.getUTCDate()+(Or.w+6)%7):(Wt=r(i(Or.y,0,1)),tr=Wt.getDay(),Wt=tr>4||tr===0?t.timeMonday.ceil(Wt):t.timeMonday(Wt),Wt=t.timeDay.offset(Wt,(Or.V-1)*7),Or.y=Wt.getFullYear(),Or.m=Wt.getMonth(),Or.d=Wt.getDate()+(Or.w+6)%7)}else("W"in Or||"U"in Or)&&("w"in Or||(Or.w="u"in Or?Or.u%7:"W"in Or?1:0),tr="Z"in Or?n(i(Or.y,0,1)).getUTCDay():r(i(Or.y,0,1)).getDay(),Or.m=0,Or.d="W"in Or?(Or.w+6)%7+Or.W*7-(tr+5)%7:Or.w+Or.U*7-(tr+6)%7);return"Z"in Or?(Or.H+=Or.Z/100|0,Or.M+=Or.Z%100,n(Or)):r(Or)}}function Lt(Mi,sn,fi,Or){for(var st=0,Wt=sn.length,tr=fi.length,or,Nr;st=tr)return-1;if(or=sn.charCodeAt(st++),or===37){if(or=sn.charAt(st++),Nr=Jr[or in o?sn.charAt(st++):or],!Nr||(Or=Nr(Mi,fi,Or))<0)return-1}else if(or!=fi.charCodeAt(Or++))return-1}return Or}function vt(Mi,sn,fi){var Or=Et.exec(sn.slice(fi));return Or?(Mi.p=St[Or[0].toLowerCase()],fi+Or[0].length):-1}function Dt(Mi,sn,fi){var Or=Lr.exec(sn.slice(fi));return Or?(Mi.w=vr[Or[0].toLowerCase()],fi+Or[0].length):-1}function Bt(Mi,sn,fi){var Or=Zt.exec(sn.slice(fi));return Or?(Mi.w=qr[Or[0].toLowerCase()],fi+Or[0].length):-1}function sr(Mi,sn,fi){var Or=Ei.exec(sn.slice(fi));return Or?(Mi.m=Si[Or[0].toLowerCase()],fi+Or[0].length):-1}function br(Mi,sn,fi){var Or=Er.exec(sn.slice(fi));return Or?(Mi.m=si[Or[0].toLowerCase()],fi+Or[0].length):-1}function zr(Mi,sn,fi){return Lt(Mi,Fe,sn,fi)}function Tr(Mi,sn,fi){return Lt(Mi,Pe,sn,fi)}function Rr(Mi,sn,fi){return Lt(Mi,Ie,sn,fi)}function Br(Mi){return ue[Mi.getDay()]}function oi(Mi){return ye[Mi.getDay()]}function vi(Mi){return ht[Mi.getMonth()]}function Pi(Mi){return de[Mi.getMonth()]}function Yr(Mi){return lt[+(Mi.getHours()>=12)]}function Ni(Mi){return 1+~~(Mi.getMonth()/3)}function Ur(Mi){return ue[Mi.getUTCDay()]}function ti(Mi){return ye[Mi.getUTCDay()]}function ki(Mi){return ht[Mi.getUTCMonth()]}function ji(Mi){return de[Mi.getUTCMonth()]}function Vi(Mi){return lt[+(Mi.getUTCHours()>=12)]}function zi(Mi){return 1+~~(Mi.getUTCMonth()/3)}return{format:function(Mi){var sn=ci(Mi+="",xi);return sn.toString=function(){return Mi},sn},parse:function(Mi){var sn=Di(Mi+="",!1);return sn.toString=function(){return Mi},sn},utcFormat:function(Mi){var sn=ci(Mi+="",Hi);return sn.toString=function(){return Mi},sn},utcParse:function(Mi){var sn=Di(Mi+="",!0);return sn.toString=function(){return Mi},sn}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,u=/^%/,l=/[\\^$*+?|[\]().{}]/g;function f(_e,Fe,Pe){var Ie=_e<0?"-":"",lt=(Ie?-_e:_e)+"",ye=lt.length;return Ie+(ye68?1900:2e3),Pe+Ie[0].length):-1}function L(_e,Fe,Pe){var Ie=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Fe.slice(Pe,Pe+6));return Ie?(_e.Z=Ie[1]?0:-(Ie[2]+(Ie[3]||"00")),Pe+Ie[0].length):-1}function _(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+1));return Ie?(_e.q=Ie[0]*3-3,Pe+Ie[0].length):-1}function C(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.m=Ie[0]-1,Pe+Ie[0].length):-1}function M(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.d=+Ie[0],Pe+Ie[0].length):-1}function v(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+3));return Ie?(_e.m=0,_e.d=+Ie[0],Pe+Ie[0].length):-1}function z(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.H=+Ie[0],Pe+Ie[0].length):-1}function T(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.M=+Ie[0],Pe+Ie[0].length):-1}function F(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+2));return Ie?(_e.S=+Ie[0],Pe+Ie[0].length):-1}function q(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+3));return Ie?(_e.L=+Ie[0],Pe+Ie[0].length):-1}function U(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe,Pe+6));return Ie?(_e.L=Math.floor(Ie[0]/1e3),Pe+Ie[0].length):-1}function H(_e,Fe,Pe){var Ie=u.exec(Fe.slice(Pe,Pe+1));return Ie?Pe+Ie[0].length:-1}function j(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe));return Ie?(_e.Q=+Ie[0],Pe+Ie[0].length):-1}function G(_e,Fe,Pe){var Ie=s.exec(Fe.slice(Pe));return Ie?(_e.s=+Ie[0],Pe+Ie[0].length):-1}function O(_e,Fe){return f(_e.getDate(),Fe,2)}function W(_e,Fe){return f(_e.getHours(),Fe,2)}function re(_e,Fe){return f(_e.getHours()%12||12,Fe,2)}function ne(_e,Fe){return f(1+t.timeDay.count(t.timeYear(_e),_e),Fe,3)}function be(_e,Fe){return f(_e.getMilliseconds(),Fe,3)}function ze(_e,Fe){return be(_e,Fe)+"000"}function Ce(_e,Fe){return f(_e.getMonth()+1,Fe,2)}function he(_e,Fe){return f(_e.getMinutes(),Fe,2)}function te(_e,Fe){return f(_e.getSeconds(),Fe,2)}function ke(_e){var Fe=_e.getDay();return Fe===0?7:Fe}function Ee(_e,Fe){return f(t.timeSunday.count(t.timeYear(_e)-1,_e),Fe,2)}function Me(_e,Fe){var Pe=_e.getDay();return _e=Pe>=4||Pe===0?t.timeThursday(_e):t.timeThursday.ceil(_e),f(t.timeThursday.count(t.timeYear(_e),_e)+(t.timeYear(_e).getDay()===4),Fe,2)}function Oe(_e){return _e.getDay()}function Re(_e,Fe){return f(t.timeMonday.count(t.timeYear(_e)-1,_e),Fe,2)}function me(_e,Fe){return f(_e.getFullYear()%100,Fe,2)}function Be(_e,Fe){return f(_e.getFullYear()%1e4,Fe,4)}function fe(_e){var Fe=_e.getTimezoneOffset();return(Fe>0?"-":(Fe*=-1,"+"))+f(Fe/60|0,"0",2)+f(Fe%60,"0",2)}function Ze(_e,Fe){return f(_e.getUTCDate(),Fe,2)}function et(_e,Fe){return f(_e.getUTCHours(),Fe,2)}function gt(_e,Fe){return f(_e.getUTCHours()%12||12,Fe,2)}function Pt(_e,Fe){return f(1+t.utcDay.count(t.utcYear(_e),_e),Fe,3)}function Qe(_e,Fe){return f(_e.getUTCMilliseconds(),Fe,3)}function Xe(_e,Fe){return Qe(_e,Fe)+"000"}function Tt(_e,Fe){return f(_e.getUTCMonth()+1,Fe,2)}function xt(_e,Fe){return f(_e.getUTCMinutes(),Fe,2)}function _t(_e,Fe){return f(_e.getUTCSeconds(),Fe,2)}function Ct(_e){var Fe=_e.getUTCDay();return Fe===0?7:Fe}function jt(_e,Fe){return f(t.utcSunday.count(t.utcYear(_e)-1,_e),Fe,2)}function At(_e,Fe){var Pe=_e.getUTCDay();return _e=Pe>=4||Pe===0?t.utcThursday(_e):t.utcThursday.ceil(_e),f(t.utcThursday.count(t.utcYear(_e),_e)+(t.utcYear(_e).getUTCDay()===4),Fe,2)}function Te(_e){return _e.getUTCDay()}function nt(_e,Fe){return f(t.utcMonday.count(t.utcYear(_e)-1,_e),Fe,2)}function ut(_e,Fe){return f(_e.getUTCFullYear()%100,Fe,2)}function ct(_e,Fe){return f(_e.getUTCFullYear()%1e4,Fe,4)}function rt(){return"+0000"}function je(){return"%"}function tt(_e){return+_e}function Je(_e){return Math.floor(+_e/1e3)}var Mt;Vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Vt(_e){return Mt=a(_e),e.timeFormat=Mt.format,e.timeParse=Mt.parse,e.utcFormat=Mt.utcFormat,e.utcParse=Mt.utcParse,Mt}var Kt="%Y-%m-%dT%H:%M:%S.%LZ";function ir(_e){return _e.toISOString()}var fr=Date.prototype.toISOString?ir:e.utcFormat(Kt);function Ot(_e){var Fe=new Date(_e);return isNaN(Fe)?null:Fe}var De=+new Date("2000-01-01T00:00:00.000Z")?Ot:e.utcParse(Kt);e.isoFormat=fr,e.isoParse=De,e.timeFormatDefaultLocale=Vt,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var TB=Se((nL,pee)=>{(function(e,t){typeof nL=="object"&&typeof pee!="undefined"?t(nL):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(nL,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((v=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var v,z=C.slice(0,v);return[z.length>1?z[0]+z.slice(2):z,+C.slice(v+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(v,z){for(var T=v.length,F=[],q=0,U=C[0],H=0;T>0&&U>0&&(H+U+1>z&&(U=Math.max(1,z-H)),F.push(v.substring(T-=U,T+U)),!((H+=U+1)>z));)U=C[q=(q+1)%C.length];return F.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(v){return C[+v]})}}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 u({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=u.prototype;function u(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+""}u.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 l(C){e:for(var M=C.length,v=1,z=-1,T;v0&&(z=0);break}return z>0?C.slice(0,z)+C.slice(T+1):C}var f;function c(C,M){var v=r(C,M);if(!v)return C+"";var z=v[0],T=v[1],F=T-(f=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,q=z.length;return F===q?z:F>q?z+new Array(F-q+1).join("0"):F>0?z.slice(0,F)+"."+z.slice(F):"0."+new Array(1-F).join("0")+r(C,Math.max(0,M+F-1))[0]}function h(C,M){var v=r(C,M);if(!v)return C+"";var z=v[0],T=v[1];return T<0?"0."+new Array(-T).join("0")+z:z.length>T+1?z.slice(0,T+1)+"."+z.slice(T+1):z+new Array(T-z.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:c,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function p(C){return C}var x=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(C){var M=C.grouping===void 0||C.thousands===void 0?p:i(x.call(C.grouping,Number),C.thousands+""),v=C.currency===void 0?"":C.currency[0]+"",z=C.currency===void 0?"":C.currency[1]+"",T=C.decimal===void 0?".":C.decimal+"",F=C.numerals===void 0?p:a(x.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",U=C.minus===void 0?"-":C.minus+"",H=C.nan===void 0?"NaN":C.nan+"";function j(O){O=s(O);var W=O.fill,re=O.align,ne=O.sign,be=O.symbol,ze=O.zero,Ce=O.width,he=O.comma,te=O.precision,ke=O.trim,Ee=O.type;Ee==="n"?(he=!0,Ee="g"):d[Ee]||(te===void 0&&(te=12),ke=!0,Ee="g"),(ze||W==="0"&&re==="=")&&(ze=!0,W="0",re="=");var Me=be==="$"?v:be==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",Oe=be==="$"?z:/[%p]/.test(Ee)?q:"",Re=d[Ee],me=/[defgprs%]/.test(Ee);te=te===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te));function Be(fe){var Ze=Me,et=Oe,gt,Pt,Qe;if(Ee==="c")et=Re(fe)+et,fe="";else{fe=+fe;var Xe=fe<0||1/fe<0;if(fe=isNaN(fe)?H:Re(Math.abs(fe),te),ke&&(fe=l(fe)),Xe&&+fe==0&&ne!=="+"&&(Xe=!1),Ze=(Xe?ne==="("?ne:U:ne==="-"||ne==="("?"":ne)+Ze,et=(Ee==="s"?b[8+f/3]:"")+et+(Xe&&ne==="("?")":""),me){for(gt=-1,Pt=fe.length;++gtQe||Qe>57){et=(Qe===46?T+fe.slice(gt+1):fe.slice(gt))+et,fe=fe.slice(0,gt);break}}}he&&!ze&&(fe=M(fe,1/0));var Tt=Ze.length+fe.length+et.length,xt=Tt>1)+Ze+fe+et+xt.slice(Tt);break;default:fe=xt+Ze+fe+et;break}return F(fe)}return Be.toString=function(){return O+""},Be}function G(O,W){var re=j((O=s(O),O.type="f",O)),ne=Math.max(-8,Math.min(8,Math.floor(n(W)/3)))*3,be=Math.pow(10,-ne),ze=b[8+ne/3];return function(Ce){return re(be*Ce)+ze}}return{format:j,formatPrefix:G}}var k;E({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function E(C){return k=y(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function A(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 _(C,M){return C=Math.abs(C),M=Math.abs(M)-C,Math.max(0,n(M)-n(C))+1}e.FormatSpecifier=u,e.formatDefaultLocale=E,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=A,e.precisionPrefix=L,e.precisionRound=_,Object.defineProperty(e,"__esModule",{value:!0})})});var yee=Se((etr,vee)=>{"use strict";vee.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 _u=Se((ttr,mee)=>{"use strict";var Let=yee();mee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Let(r))return!1}else if(t!=="number")return!1;return e-e<1}});var ju=Se((rtr,gee)=>{"use strict";gee.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 AB=Se((aL,_ee)=>{(function(e,t){typeof aL=="object"&&typeof _ee!="undefined"?t(aL):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(aL,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],f+=t[(s[u]&3)<<4|s[u+1]>>4],f+=t[(s[u+1]&15)<<2|s[u+2]>>6],f+=t[s[u+2]&63];return l%3===2?f=f.substring(0,f.length-1)+"=":l%3===1&&(f=f.substring(0,f.length-2)+"=="),f},a=function(o){var s=o.length*.75,u=o.length,l,f=0,c,h,d,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var x=new ArrayBuffer(s),b=new Uint8Array(x);for(l=0;l>4,b[f++]=(h&15)<<4|d>>2,b[f++]=(d&3)<<6|p&63;return x};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var yg=Se((itr,xee)=>{"use strict";xee.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 yp=Se(my=>{"use strict";var zet=AB().decode,Pet=yg(),SB=Array.isArray,Iet=ArrayBuffer,Det=DataView;function bee(e){return Iet.isView(e)&&!(e instanceof Det)}my.isTypedArray=bee;function oL(e){return SB(e)||bee(e)}my.isArrayOrTypedArray=oL;function Ret(e){return!oL(e[0])}my.isArray1D=Ret;my.ensureArray=function(e,t){return SB(e)||(e=[]),e.length=t,e};var Pd={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};Pd.uint8c=Pd.u1c;Pd.uint8=Pd.u1;Pd.int8=Pd.i1;Pd.uint16=Pd.u2;Pd.int16=Pd.i2;Pd.uint32=Pd.u4;Pd.int32=Pd.i4;Pd.float32=Pd.f4;Pd.float64=Pd.f8;function MB(e){return e.constructor===ArrayBuffer}my.isArrayBuffer=MB;my.decodeTypedArraySpec=function(e){var t=[],r=Fet(e),n=r.dtype,i=Pd[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;MB(o)||(o=zet(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var u=s.length,l,f,c=+s[0],h=a*c,d=0;if(u===1)t=new i(o);else if(u===2)for(l=+s[1],f=0;f{"use strict";var Tee=_u(),kB=yp().isArrayOrTypedArray;Eee.exports=function(t,r){if(Tee(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var t3=EM(),Uet=/^\w*$/,Vet=0,kee=1,sL=2,Cee=3,ob=4;Lee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,u={};r&&r.length?(s=t3(t,r),o=s.get()):o=t,r=r||"";var l={};if(o)for(a=0;a2)return u[d]=u[d]|sL,c.set(h,null);if(f){for(a=d;a{"use strict";var Het=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Get=/^[^\.\[\]]+$/;Pee.exports=function(e,t){for(;t;){var r=e.match(Het);if(r)e=r[1];else if(e.match(Get))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 lL=Se((ltr,Dee)=>{"use strict";var Wet=_u();Dee.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 Wet(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var qee=Se((utr,Fee)=>{"use strict";var Ree=yp().isArrayOrTypedArray,kM=yg();Fee.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(Ree(i)&&Ree(a)&&kM(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function jet(e,t){var r=e%t;return r<0?r+t:r}function Zet(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Bee.exports={mod:jet,modHalf:Zet}});var cd=Se((ctr,uL)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function u(me,Be){if(me=me||"",Be=Be||{},me instanceof u)return me;if(!(this instanceof u))return new u(me,Be);var fe=l(me);this._originalInput=me,this._r=fe.r,this._g=fe.g,this._b=fe.b,this._a=fe.a,this._roundA=i(100*this._a)/100,this._format=Be.format||fe.format,this._gradientType=Be.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=fe.ok,this._tc_id=n++}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),Be,fe,Ze,et,gt,Pt;return Be=me.r/255,fe=me.g/255,Ze=me.b/255,Be<=.03928?et=Be/12.92:et=e.pow((Be+.055)/1.055,2.4),fe<=.03928?gt=fe/12.92:gt=e.pow((fe+.055)/1.055,2.4),Ze<=.03928?Pt=Ze/12.92:Pt=e.pow((Ze+.055)/1.055,2.4),.2126*et+.7152*gt+.0722*Pt},setAlpha:function(me){return this._a=O(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),Be=i(me.h*360),fe=i(me.s*100),Ze=i(me.v*100);return this._a==1?"hsv("+Be+", "+fe+"%, "+Ze+"%)":"hsva("+Be+", "+fe+"%, "+Ze+"%, "+this._roundA+")"},toHsl:function(){var me=c(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=c(this._r,this._g,this._b),Be=i(me.h*360),fe=i(me.s*100),Ze=i(me.l*100);return this._a==1?"hsl("+Be+", "+fe+"%, "+Ze+"%)":"hsla("+Be+", "+fe+"%, "+Ze+"%, "+this._roundA+")"},toHex:function(me){return x(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(W(this._r,255)*100)+"%",g:i(W(this._g,255)*100)+"%",b:i(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%)":"rgba("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var Be="#"+y(this._r,this._g,this._b,this._a),fe=Be,Ze=this._gradientType?"GradientType = 1, ":"";if(me){var et=u(me);fe="#"+y(et._r,et._g,et._b,et._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ze+"startColorstr="+Be+",endColorstr="+fe+")"},toString:function(me){var Be=!!me;me=me||this._format;var fe=!1,Ze=this._a<1&&this._a>=0,et=!Be&&Ze&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return et?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(fe=this.toRgbString()),me==="prgb"&&(fe=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(fe=this.toHexString()),me==="hex3"&&(fe=this.toHexString(!0)),me==="hex4"&&(fe=this.toHex8String(!0)),me==="hex8"&&(fe=this.toHex8String()),me==="name"&&(fe=this.toName()),me==="hsl"&&(fe=this.toHslString()),me==="hsv"&&(fe=this.toHsvString()),fe||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(me,Be){var fe=me.apply(null,[this].concat([].slice.call(Be)));return this._r=fe._r,this._g=fe._g,this._b=fe._b,this.setAlpha(fe._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(_,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(A,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,Be){return me.apply(null,[this].concat([].slice.call(Be)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(z,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},u.fromRatio=function(me,Be){if(typeof me=="object"){var fe={};for(var Ze in me)me.hasOwnProperty(Ze)&&(Ze==="a"?fe[Ze]=me[Ze]:fe[Ze]=he(me[Ze]));me=fe}return u(me,Be)};function l(me){var Be={r:0,g:0,b:0},fe=1,Ze=null,et=null,gt=null,Pt=!1,Qe=!1;return typeof me=="string"&&(me=Oe(me)),typeof me=="object"&&(Me(me.r)&&Me(me.g)&&Me(me.b)?(Be=f(me.r,me.g,me.b),Pt=!0,Qe=String(me.r).substr(-1)==="%"?"prgb":"rgb"):Me(me.h)&&Me(me.s)&&Me(me.v)?(Ze=he(me.s),et=he(me.v),Be=p(me.h,Ze,et),Pt=!0,Qe="hsv"):Me(me.h)&&Me(me.s)&&Me(me.l)&&(Ze=he(me.s),gt=he(me.l),Be=h(me.h,Ze,gt),Pt=!0,Qe="hsl"),me.hasOwnProperty("a")&&(fe=me.a)),fe=O(fe),{ok:Pt,format:me.format||Qe,r:a(255,o(Be.r,0)),g:a(255,o(Be.g,0)),b:a(255,o(Be.b,0)),a:fe}}function f(me,Be,fe){return{r:W(me,255)*255,g:W(Be,255)*255,b:W(fe,255)*255}}function c(me,Be,fe){me=W(me,255),Be=W(Be,255),fe=W(fe,255);var Ze=o(me,Be,fe),et=a(me,Be,fe),gt,Pt,Qe=(Ze+et)/2;if(Ze==et)gt=Pt=0;else{var Xe=Ze-et;switch(Pt=Qe>.5?Xe/(2-Ze-et):Xe/(Ze+et),Ze){case me:gt=(Be-fe)/Xe+(Be1&&(_t-=1),_t<1/6?Tt+(xt-Tt)*6*_t:_t<1/2?xt:_t<2/3?Tt+(xt-Tt)*(2/3-_t)*6:Tt}if(Be===0)Ze=et=gt=fe;else{var Qe=fe<.5?fe*(1+Be):fe+Be-fe*Be,Xe=2*fe-Qe;Ze=Pt(Xe,Qe,me+1/3),et=Pt(Xe,Qe,me),gt=Pt(Xe,Qe,me-1/3)}return{r:Ze*255,g:et*255,b:gt*255}}function d(me,Be,fe){me=W(me,255),Be=W(Be,255),fe=W(fe,255);var Ze=o(me,Be,fe),et=a(me,Be,fe),gt,Pt,Qe=Ze,Xe=Ze-et;if(Pt=Ze===0?0:Xe/Ze,Ze==et)gt=0;else{switch(Ze){case me:gt=(Be-fe)/Xe+(Be>1)+720)%360;--Be;)Ze.h=(Ze.h+et)%360,gt.push(u(Ze));return gt}function U(me,Be){Be=Be||6;for(var fe=u(me).toHsv(),Ze=fe.h,et=fe.s,gt=fe.v,Pt=[],Qe=1/Be;Be--;)Pt.push(u({h:Ze,s:et,v:gt})),gt=(gt+Qe)%1;return Pt}u.mix=function(me,Be,fe){fe=fe===0?0:fe||50;var Ze=u(me).toRgb(),et=u(Be).toRgb(),gt=fe/100,Pt={r:(et.r-Ze.r)*gt+Ze.r,g:(et.g-Ze.g)*gt+Ze.g,b:(et.b-Ze.b)*gt+Ze.b,a:(et.a-Ze.a)*gt+Ze.a};return u(Pt)},u.readability=function(me,Be){var fe=u(me),Ze=u(Be);return(e.max(fe.getLuminance(),Ze.getLuminance())+.05)/(e.min(fe.getLuminance(),Ze.getLuminance())+.05)},u.isReadable=function(me,Be,fe){var Ze=u.readability(me,Be),et,gt;switch(gt=!1,et=Re(fe),et.level+et.size){case"AAsmall":case"AAAlarge":gt=Ze>=4.5;break;case"AAlarge":gt=Ze>=3;break;case"AAAsmall":gt=Ze>=7;break}return gt},u.mostReadable=function(me,Be,fe){var Ze=null,et=0,gt,Pt,Qe,Xe;fe=fe||{},Pt=fe.includeFallbackColors,Qe=fe.level,Xe=fe.size;for(var Tt=0;Ttet&&(et=gt,Ze=u(Be[Tt]));return u.isReadable(me,Ze,{level:Qe,size:Xe})||!Pt?Ze:(fe.includeFallbackColors=!1,u.mostReadable(me,["#fff","#000"],fe))};var H=u.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"},j=u.hexNames=G(H);function G(me){var Be={};for(var fe in me)me.hasOwnProperty(fe)&&(Be[me[fe]]=fe);return Be}function O(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function W(me,Be){be(me)&&(me="100%");var fe=ze(me);return me=a(Be,o(0,parseFloat(me))),fe&&(me=parseInt(me*Be,10)/100),e.abs(me-Be)<1e-6?1:me%Be/parseFloat(Be)}function re(me){return a(1,o(0,me))}function ne(me){return parseInt(me,16)}function be(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function ze(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Ce(me){return me.length==1?"0"+me:""+me}function he(me){return me<=1&&(me=me*100+"%"),me}function te(me){return e.round(parseFloat(me)*255).toString(16)}function ke(me){return ne(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",Be="[-\\+]?\\d*\\.\\d+%?",fe="(?:"+Be+")|(?:"+me+")",Ze="[\\s|\\(]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")\\s*\\)?",et="[\\s|\\(]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")[,|\\s]+("+fe+")\\s*\\)?";return{CSS_UNIT:new RegExp(fe),rgb:new RegExp("rgb"+Ze),rgba:new RegExp("rgba"+et),hsl:new RegExp("hsl"+Ze),hsla:new RegExp("hsla"+et),hsv:new RegExp("hsv"+Ze),hsva:new RegExp("hsva"+et),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 Me(me){return!!Ee.CSS_UNIT.exec(me)}function Oe(me){me=me.replace(t,"").replace(r,"").toLowerCase();var Be=!1;if(H[me])me=H[me],Be=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var fe;return(fe=Ee.rgb.exec(me))?{r:fe[1],g:fe[2],b:fe[3]}:(fe=Ee.rgba.exec(me))?{r:fe[1],g:fe[2],b:fe[3],a:fe[4]}:(fe=Ee.hsl.exec(me))?{h:fe[1],s:fe[2],l:fe[3]}:(fe=Ee.hsla.exec(me))?{h:fe[1],s:fe[2],l:fe[3],a:fe[4]}:(fe=Ee.hsv.exec(me))?{h:fe[1],s:fe[2],v:fe[3]}:(fe=Ee.hsva.exec(me))?{h:fe[1],s:fe[2],v:fe[3],a:fe[4]}:(fe=Ee.hex8.exec(me))?{r:ne(fe[1]),g:ne(fe[2]),b:ne(fe[3]),a:ke(fe[4]),format:Be?"name":"hex8"}:(fe=Ee.hex6.exec(me))?{r:ne(fe[1]),g:ne(fe[2]),b:ne(fe[3]),format:Be?"name":"hex"}:(fe=Ee.hex4.exec(me))?{r:ne(fe[1]+""+fe[1]),g:ne(fe[2]+""+fe[2]),b:ne(fe[3]+""+fe[3]),a:ke(fe[4]+""+fe[4]),format:Be?"name":"hex8"}:(fe=Ee.hex3.exec(me))?{r:ne(fe[1]+""+fe[1]),g:ne(fe[2]+""+fe[2]),b:ne(fe[3]+""+fe[3]),format:Be?"name":"hex"}:!1}function Re(me){var Be,fe;return me=me||{level:"AA",size:"small"},Be=(me.level||"AA").toUpperCase(),fe=(me.size||"small").toLowerCase(),Be!=="AA"&&Be!=="AAA"&&(Be="AA"),fe!=="small"&&fe!=="large"&&(fe="small"),{level:Be,size:fe}}typeof uL!="undefined"&&uL.exports?uL.exports=u:typeof define=="function"&&define.amd?define(function(){return u}):window.tinycolor=u})(Math)});var vu=Se(zM=>{"use strict";var Oee=yg(),CM=Array.isArray;function Xet(e,t){var r,n;for(r=0;r{"use strict";Nee.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 PM=Se((ptr,Uee)=>{"use strict";Uee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var O1=Se((vtr,Gee)=>{"use strict";var Vee=PM(),Hee=uc(),CB=Hee({editType:"none"});CB.family.dflt=Vee.HOVERFONT;CB.size.dflt=Vee.HOVERFONTSIZE;Gee.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:CB,grouptitlefont:Hee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var i3=Se((ytr,Wee)=>{"use strict";var Yet=uc(),fL=O1().hoverlabel,cL=vu().extendFlat;Wee.exports={hoverlabel:{bgcolor:cL({},fL.bgcolor,{arrayOk:!0}),bordercolor:cL({},fL.bordercolor,{arrayOk:!0}),font:Yet({arrayOk:!0,editType:"none"}),align:cL({},fL.align,{arrayOk:!0}),namelength:cL({},fL.namelength,{arrayOk:!0}),editType:"none"}}});var zf=Se((mtr,jee)=>{"use strict";var Ket=uc(),Jet=i3();jee.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:Ket({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:Jet.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 sb=Se((gtr,Yee)=>{"use strict";var $et=cd(),hL={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)"]]},Zee=hL.RdBu;function Qet(e,t){if(t||(t=Zee),!e)return t;function r(){try{e=hL[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Xee(e)?e:t}function Xee(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";lb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];lb.defaultLine="#444";lb.lightLine="#eee";lb.background="#fff";lb.borderLine="#BEC8D9";lb.lightFraction=100*10/11});var Pl=Se((xtr,Kee)=>{"use strict";var xv=cd(),ttt=_u(),rtt=yp().isTypedArray,hd=Kee.exports={},dL=Ih();hd.defaults=dL.defaults;var itt=hd.defaultLine=dL.defaultLine;hd.lightLine=dL.lightLine;var zB=hd.background=dL.background;hd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};hd.rgb=function(e){return hd.tinyRGB(xv(e))};hd.opacity=function(e){return e?xv(e).getAlpha():0};hd.addOpacity=function(e,t){var r=xv(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=xv(e).toRgb();if(r.a===1)return xv(e).toRgbString();var n=xv(t||zB).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 xv(a).toRgbString()};hd.interpolate=function(e,t,r){var n=xv(e).toRgb(),i=xv(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 xv(a).toRgbString()};hd.contrast=function(e,t,r){var n=xv(e);n.getAlpha()!==1&&(n=xv(hd.combine(e,zB)));var i=n.isDark()?t?n.lighten(t):zB:r?n.darken(r):itt;return i.toString()};hd.stroke=function(e,t){var r=xv(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=xv(t);e.style({fill:hd.tinyRGB(r),"fill-opacity":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r=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=Se((btr,Jee)=>{"use strict";Jee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var n3=Se($ee=>{"use strict";$ee.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 rte=Se(bv=>{"use strict";var PB=_u(),Qee=cd(),ete=vu().extendFlat,ntt=zf(),att=sb(),ott=Pl(),stt=N1().DESELECTDIM,a3=EM(),tte=n3().counter,ltt=r3().modHalf,dm=yp().isArrayOrTypedArray,U1=yp().isTypedArraySpec,V1=yp().decodeTypedArraySpec;bv.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(dm(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;nn.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||!PB(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)),Qee(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return Qee(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(att.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e==="auto"?t.set("auto"):PB(e)?t.set(ltt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||tte(r);if(typeof e=="string"&&i.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!tte(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 ite={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/"},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:{}}},nte={};function ate(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),ate(n,t[r]))}}ate(ite,nte);ote.exports={configAttributes:ite,dfltConfig:nte}});var DB=Se((Str,ste)=>{"use strict";var IB=Nl(),utt=_u(),IM=[];ste.exports=function(e,t){if(IM.indexOf(e)!==-1)return;IM.push(e);var r=1e3;utt(t)?r=t:t==="long"&&(r=3e3);var n=IB.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(IM);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var u=IM.indexOf(s);u!==-1&&IM.splice(u,1),IB.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=IB.select(this);s.append("button").classed("notifier-close",!0).html("×").on("click",function(){s.transition().call(a)});for(var u=s.append("p"),l=o.split(//g),f=0;f{"use strict";var o3=ub().dfltConfig,RB=DB(),FB=lte.exports={};FB.log=function(){var e;if(o3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};FB.warn=function(){var e;if(o3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};FB.error=function(){var e;if(o3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var vL=Se((Etr,ute)=>{"use strict";ute.exports=function(){}});var qB=Se((ktr,fte)=>{"use strict";fte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{cte.exports=ftt;function ftt(){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 pte=Se((Ltr,dte)=>{dte.exports=ctt;function ctt(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 yte=Se((ztr,vte)=>{vte.exports=htt;function htt(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 BB=Se((Ptr,mte)=>{mte.exports=dtt;function dtt(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 _te=Se((Itr,gte)=>{gte.exports=ptt;function ptt(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 bte=Se((Dtr,xte)=>{xte.exports=vtt;function vtt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],f=t[8],c=t[9],h=t[10],d=t[11],p=t[12],x=t[13],b=t[14],y=t[15],k=r*s-n*o,E=r*u-i*o,A=r*l-a*o,L=n*u-i*s,_=n*l-a*s,C=i*l-a*u,M=f*x-c*p,v=f*b-h*p,z=f*y-d*p,T=c*b-h*x,F=c*y-d*x,q=h*y-d*b,U=k*q-E*F+A*T+L*z-_*v+C*M;return U?(U=1/U,e[0]=(s*q-u*F+l*T)*U,e[1]=(i*F-n*q-a*T)*U,e[2]=(x*C-b*_+y*L)*U,e[3]=(h*_-c*C-d*L)*U,e[4]=(u*z-o*q-l*v)*U,e[5]=(r*q-i*z+a*v)*U,e[6]=(b*A-p*C-y*E)*U,e[7]=(f*C-h*A+d*E)*U,e[8]=(o*F-s*z+l*M)*U,e[9]=(n*z-r*F-a*M)*U,e[10]=(p*_-x*A+y*k)*U,e[11]=(c*A-f*_-d*k)*U,e[12]=(s*v-o*T-u*M)*U,e[13]=(r*T-n*v+i*M)*U,e[14]=(x*E-p*L-b*k)*U,e[15]=(f*L-c*E+h*k)*U,e):null}});var Tte=Se((Rtr,wte)=>{wte.exports=ytt;function ytt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],f=t[8],c=t[9],h=t[10],d=t[11],p=t[12],x=t[13],b=t[14],y=t[15];return e[0]=s*(h*y-d*b)-c*(u*y-l*b)+x*(u*d-l*h),e[1]=-(n*(h*y-d*b)-c*(i*y-a*b)+x*(i*d-a*h)),e[2]=n*(u*y-l*b)-s*(i*y-a*b)+x*(i*l-a*u),e[3]=-(n*(u*d-l*h)-s*(i*d-a*h)+c*(i*l-a*u)),e[4]=-(o*(h*y-d*b)-f*(u*y-l*b)+p*(u*d-l*h)),e[5]=r*(h*y-d*b)-f*(i*y-a*b)+p*(i*d-a*h),e[6]=-(r*(u*y-l*b)-o*(i*y-a*b)+p*(i*l-a*u)),e[7]=r*(u*d-l*h)-o*(i*d-a*h)+f*(i*l-a*u),e[8]=o*(c*y-d*x)-f*(s*y-l*x)+p*(s*d-l*c),e[9]=-(r*(c*y-d*x)-f*(n*y-a*x)+p*(n*d-a*c)),e[10]=r*(s*y-l*x)-o*(n*y-a*x)+p*(n*l-a*s),e[11]=-(r*(s*d-l*c)-o*(n*d-a*c)+f*(n*l-a*s)),e[12]=-(o*(c*b-h*x)-f*(s*b-u*x)+p*(s*h-u*c)),e[13]=r*(c*b-h*x)-f*(n*b-i*x)+p*(n*h-i*c),e[14]=-(r*(s*b-u*x)-o*(n*b-i*x)+p*(n*u-i*s)),e[15]=r*(s*h-u*c)-o*(n*h-i*c)+f*(n*u-i*s),e}});var Ste=Se((Ftr,Ate)=>{Ate.exports=mtt;function mtt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],f=e[9],c=e[10],h=e[11],d=e[12],p=e[13],x=e[14],b=e[15],y=t*o-r*a,k=t*s-n*a,E=t*u-i*a,A=r*s-n*o,L=r*u-i*o,_=n*u-i*s,C=l*p-f*d,M=l*x-c*d,v=l*b-h*d,z=f*x-c*p,T=f*b-h*p,F=c*b-h*x;return y*F-k*T+E*z+A*v-L*M+_*C}});var Ete=Se((qtr,Mte)=>{Mte.exports=gtt;function gtt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],l=t[6],f=t[7],c=t[8],h=t[9],d=t[10],p=t[11],x=t[12],b=t[13],y=t[14],k=t[15],E=r[0],A=r[1],L=r[2],_=r[3];return e[0]=E*n+A*s+L*c+_*x,e[1]=E*i+A*u+L*h+_*b,e[2]=E*a+A*l+L*d+_*y,e[3]=E*o+A*f+L*p+_*k,E=r[4],A=r[5],L=r[6],_=r[7],e[4]=E*n+A*s+L*c+_*x,e[5]=E*i+A*u+L*h+_*b,e[6]=E*a+A*l+L*d+_*y,e[7]=E*o+A*f+L*p+_*k,E=r[8],A=r[9],L=r[10],_=r[11],e[8]=E*n+A*s+L*c+_*x,e[9]=E*i+A*u+L*h+_*b,e[10]=E*a+A*l+L*d+_*y,e[11]=E*o+A*f+L*p+_*k,E=r[12],A=r[13],L=r[14],_=r[15],e[12]=E*n+A*s+L*c+_*x,e[13]=E*i+A*u+L*h+_*b,e[14]=E*a+A*l+L*d+_*y,e[15]=E*o+A*f+L*p+_*k,e}});var Cte=Se((Btr,kte)=>{kte.exports=_tt;function _tt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,u,l,f,c,h,d,p,x,b,y;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],u=t[2],l=t[3],f=t[4],c=t[5],h=t[6],d=t[7],p=t[8],x=t[9],b=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=u,e[3]=l,e[4]=f,e[5]=c,e[6]=h,e[7]=d,e[8]=p,e[9]=x,e[10]=b,e[11]=y,e[12]=o*n+f*i+p*a+t[12],e[13]=s*n+c*i+x*a+t[13],e[14]=u*n+h*i+b*a+t[14],e[15]=l*n+d*i+y*a+t[15]),e}});var zte=Se((Otr,Lte)=>{Lte.exports=xtt;function xtt(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 Ite=Se((Ntr,Pte)=>{Pte.exports=btt;function btt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,u=Math.sin(r),l=Math.cos(r),f=1-l,c=t[0],h=t[1],d=t[2],p=t[3],x=t[4],b=t[5],y=t[6],k=t[7],E=t[8],A=t[9],L=t[10],_=t[11],C=i*i*f+l,M=a*i*f+o*u,v=o*i*f-a*u,z=i*a*f-o*u,T=a*a*f+l,F=o*a*f+i*u,q=i*o*f+a*u,U=a*o*f-i*u,H=o*o*f+l,e[0]=c*C+x*M+E*v,e[1]=h*C+b*M+A*v,e[2]=d*C+y*M+L*v,e[3]=p*C+k*M+_*v,e[4]=c*z+x*T+E*F,e[5]=h*z+b*T+A*F,e[6]=d*z+y*T+L*F,e[7]=p*z+k*T+_*F,e[8]=c*q+x*U+E*H,e[9]=h*q+b*U+A*H,e[10]=d*q+y*U+L*H,e[11]=p*q+k*U+_*H,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Rte=Se((Utr,Dte)=>{Dte.exports=wtt;function wtt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],l=t[8],f=t[9],c=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+l*n,e[5]=o*i+f*n,e[6]=s*i+c*n,e[7]=u*i+h*n,e[8]=l*i-a*n,e[9]=f*i-o*n,e[10]=c*i-s*n,e[11]=h*i-u*n,e}});var qte=Se((Vtr,Fte)=>{Fte.exports=Ttt;function Ttt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[8],f=t[9],c=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-l*n,e[1]=o*i-f*n,e[2]=s*i-c*n,e[3]=u*i-h*n,e[8]=a*n+l*i,e[9]=o*n+f*i,e[10]=s*n+c*i,e[11]=u*n+h*i,e}});var Ote=Se((Htr,Bte)=>{Bte.exports=Att;function Att(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],l=t[4],f=t[5],c=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+l*n,e[1]=o*i+f*n,e[2]=s*i+c*n,e[3]=u*i+h*n,e[4]=l*i-a*n,e[5]=f*i-o*n,e[6]=c*i-s*n,e[7]=h*i-u*n,e}});var Ute=Se((Gtr,Nte)=>{Nte.exports=Stt;function Stt(e,t,r){var n,i,a,o=r[0],s=r[1],u=r[2],l=Math.sqrt(o*o+s*s+u*u);return Math.abs(l)<1e-6?null:(l=1/l,o*=l,s*=l,u*=l,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+u*n,e[2]=u*o*a-s*n,e[3]=0,e[4]=o*s*a-u*n,e[5]=s*s*a+i,e[6]=u*s*a+o*n,e[7]=0,e[8]=o*u*a+s*n,e[9]=s*u*a-o*n,e[10]=u*u*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Hte=Se((Wtr,Vte)=>{Vte.exports=Mtt;function Mtt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,l=a+a,f=n*s,c=n*u,h=n*l,d=i*u,p=i*l,x=a*l,b=o*s,y=o*u,k=o*l;return e[0]=1-(d+x),e[1]=c+k,e[2]=h-y,e[3]=0,e[4]=c-k,e[5]=1-(f+x),e[6]=p+b,e[7]=0,e[8]=h+y,e[9]=p-b,e[10]=1-(f+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Wte=Se((jtr,Gte)=>{Gte.exports=Ett;function Ett(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 Zte=Se((Ztr,jte)=>{jte.exports=ktt;function ktt(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 Yte=Se((Xtr,Xte)=>{Xte.exports=Ctt;function Ctt(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 Jte=Se((Ytr,Kte)=>{Kte.exports=Ltt;function Ltt(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 Qte=Se((Ktr,$te)=>{$te.exports=ztt;function ztt(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 OB=Se((Jtr,ere)=>{ere.exports=Ptt;function Ptt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,l=r*o,f=n*o,c=n*s,h=i*o,d=i*s,p=i*u,x=a*o,b=a*s,y=a*u;return e[0]=1-c-p,e[1]=f+y,e[2]=h-b,e[3]=0,e[4]=f-y,e[5]=1-l-p,e[6]=d+x,e[7]=0,e[8]=h+b,e[9]=d-x,e[10]=1-l-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var rre=Se(($tr,tre)=>{tre.exports=Itt;function Itt(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),l=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*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*l,e[15]=0,e}});var nre=Se((Qtr,ire)=>{ire.exports=Dtt;function Dtt(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 ore=Se((err,are)=>{are.exports=Rtt;function Rtt(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),u=2/(o+s),l=2/(i+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-((o-s)*u*.5),e[9]=(i-a)*l*.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 lre=Se((trr,sre)=>{sre.exports=Ftt;function Ftt(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),l=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*l,e[15]=1,e}});var fre=Se((rrr,ure)=>{var qtt=BB();ure.exports=Btt;function Btt(e,t,r,n){var i,a,o,s,u,l,f,c,h,d,p=t[0],x=t[1],b=t[2],y=n[0],k=n[1],E=n[2],A=r[0],L=r[1],_=r[2];return Math.abs(p-A)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(b-_)<1e-6?qtt(e):(f=p-A,c=x-L,h=b-_,d=1/Math.sqrt(f*f+c*c+h*h),f*=d,c*=d,h*=d,i=k*h-E*c,a=E*f-y*h,o=y*c-k*f,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=c*o-h*a,u=h*i-f*o,l=f*a-c*i,d=Math.sqrt(s*s+u*u+l*l),d?(d=1/d,s*=d,u*=d,l*=d):(s=0,u=0,l=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=a,e[5]=u,e[6]=c,e[7]=0,e[8]=o,e[9]=l,e[10]=h,e[11]=0,e[12]=-(i*p+a*x+o*b),e[13]=-(s*p+u*x+l*b),e[14]=-(f*p+c*x+h*b),e[15]=1,e)}});var hre=Se((irr,cre)=>{cre.exports=Ott;function Ott(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 NB=Se((nrr,dre)=>{dre.exports={create:hte(),clone:pte(),copy:yte(),identity:BB(),transpose:_te(),invert:bte(),adjoint:Tte(),determinant:Ste(),multiply:Ete(),translate:Cte(),scale:zte(),rotate:Ite(),rotateX:Rte(),rotateY:qte(),rotateZ:Ote(),fromRotation:Ute(),fromRotationTranslation:Hte(),fromScaling:Wte(),fromTranslation:Zte(),fromXRotation:Yte(),fromYRotation:Jte(),fromZRotation:Qte(),fromQuat:OB(),frustum:rre(),perspective:nre(),perspectiveFromFieldOfView:ore(),ortho:lre(),lookAt:fre(),str:hre()}});var yL=Se(xh=>{"use strict";var Ntt=NB();xh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Utt=Nl(),pre=H1(),Vtt=yL(),Htt=NB();function Gtt(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 Wtt(e){var t=Utt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function vre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function jtt(e,t){yre("global",e,t)}function yre(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):pre.warn("addStyleRule failed"):pre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Ztt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&vre(r)}function Xtt(e,t,r,n,i){var a=n.split(":"),o=i.split(":"),s="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(u){u.getAttribute(s)||(u.addEventListener("mouseenter",function(){var l=this.querySelector(r);l&&(l.style[a[0]]=a[1])}),u.addEventListener("mouseleave",function(){var l=this.querySelector(r);l&&(t&&this.matches(t)?l.style[a[0]]=a[1]:l.style[o[0]]=o[1])}),u.setAttribute(s,!0))})}function Ytt(e){var t=gre(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=mre(n);if(i){var a=Vtt.convertCssMatrix(i);r=Htt.multiply(r,r,a)}}),r}function mre(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 gre(e){for(var t=[];Ktt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Ktt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Jtt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}_re.exports={getGraphDiv:Gtt,isPlotDiv:Wtt,removeElement:vre,addStyleRule:jtt,addRelatedStyleRule:yre,deleteRelatedStyleRule:Ztt,setStyleOnHover:Xtt,getFullTransformMatrix:Ytt,getElementTransformMatrix:mre,getElementAndAncestors:gre,equalDomRects:Jtt}});var RM=Se((srr,xre)=>{"use strict";xre.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 _c=Se((lrr,Ere)=>{"use strict";var wre=vu().extendFlat,$tt=yg(),Tre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Are={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Qtt=Tre.flags.slice().concat(["fullReplot"]),ert=Are.flags.slice().concat("layoutReplot");Ere.exports={traces:Tre,layout:Are,traceFlags:function(){return bre(Qtt)},layoutFlags:function(){return bre(ert)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";UB.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};UB.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 VB=Se((frr,kre)=>{"use strict";kre.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 Du=Se(mL=>{"use strict";var Cre=VB(),crr=Cre.FORMAT_LINK,hrr=Cre.DATE_FORMAT_LINK;function HB(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i{"use strict";function G1(e,t){return t?t.d2l(e):e}function Lre(e,t){return t?t.l2d(e):e}function trt(e){return e.x0}function rrt(e){return e.x1}function irt(e){return e.y0}function nrt(e){return e.y1}function zre(e){return e.x0shift||0}function Pre(e){return e.x1shift||0}function Ire(e){return e.y0shift||0}function Dre(e){return e.y1shift||0}function gL(e,t){return G1(e.x1,t)+Pre(e)-G1(e.x0,t)-zre(e)}function _L(e,t,r){return G1(e.y1,r)+Dre(e)-G1(e.y0,r)-Ire(e)}function art(e,t){return Math.abs(gL(e,t))}function ort(e,t,r){return Math.abs(_L(e,t,r))}function srt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(gL(e,t),2)+Math.pow(_L(e,t,r),2))}function lrt(e,t){return Lre((G1(e.x1,t)+Pre(e)+G1(e.x0,t)+zre(e))/2,t)}function urt(e,t,r){return Lre((G1(e.y1,r)+Dre(e)+G1(e.y0,r)+Ire(e))/2,r)}function frt(e,t,r){return e.type!=="line"?void 0:_L(e,t,r)/gL(e,t)}Rre.exports={x0:trt,x1:rrt,y0:irt,y1:nrt,slope:frt,dx:gL,dy:_L,width:art,height:ort,length:srt,xcenter:lrt,ycenter:urt}});var Bre=Se((vrr,qre)=>{"use strict";var crt=_c().overrideAll,fb=zf(),Fre=uc(),hrt=Id().dash,W1=vu().extendFlat,drt=Du().shapeTexttemplateAttrs,prt=xL();qre.exports=crt({newshape:{visible:W1({},fb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:W1({},fb.legend,{}),legendgroup:W1({},fb.legendgroup,{}),legendgrouptitle:{text:W1({},fb.legendgrouptitle.text,{}),font:Fre({})},legendrank:W1({},fb.legendrank,{}),legendwidth:W1({},fb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:W1({},hrt,{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:W1({},fb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:drt({newshape:!0},{keys:Object.keys(prt)}),font:Fre({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Nre=Se((yrr,Ore)=>{"use strict";var vrt=Id().dash,yrt=vu().extendFlat;Ore.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:yrt({},vrt,{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 bL=Se((mrr,Ure)=>{"use strict";Ure.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 s3=Se((grr,Wre)=>{"use strict";var GB=uc(),mrt=RM(),wL=Ih(),Vre=Bre(),Hre=Nre(),grt=bL(),Gre=vu().extendFlat,TL=GB({editType:"calc"});TL.family.dflt='"Open Sans", verdana, arial, sans-serif';TL.size.dflt=12;TL.color.dflt=wL.defaultLine;Wre.exports={font:TL,title:{text:{valType:"string",editType:"layoutstyle"},font:GB({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:GB({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:Gre(grt({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:wL.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:wL.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:wL.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:"plot"},newshape:Vre.newshape,activeshape:Vre.activeshape,newselection:Hre.newselection,activeselection:Hre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Gre({},mrt.transition,{editType:"none"})}});var jre=Qf(()=>{});var _rt={};var Zre=Qf(()=>{jre()});var Ul=Se(df=>{"use strict";var l3=H1(),Xre=vL(),Yre=qB(),xrt=yg(),brt=DM().addStyleRule,Kre=vu(),wrt=zf(),Trt=s3(),Art=Kre.extendFlat,WB=Kre.extendDeepAll;df.modules={};df.allCategories={};df.allTypes=[];df.subplotsRegistry={};df.componentsRegistry={};df.layoutArrayContainers=[];df.layoutArrayRegexes=[];df.traceLayoutAttributes={};df.localeRegistry={};df.apiMethodRegistry={};df.collectableSubplotTypes=null;df.register=function(t){if(df.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 Lrt=e3().timeFormat,sie=_u(),jB=H1(),Z1=r3().mod,c3=ju(),_0=c3.BADNUM,wv=c3.ONEDAY,FM=c3.ONEHOUR,j1=c3.ONEMIN,f3=c3.ONESEC,qM=c3.EPOCHJD,mg=Ul(),tie=e3().utcFormat,zrt=/^\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,Prt=/^\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,rie=new Date().getFullYear()-70;function gg(e){return e&&mg.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}bh.dateTick0=function(e,t){var r=Irt(e,!!t);if(t<2)return r;var n=bh.dateTime2ms(r,e);return n+=wv*(t-1),bh.ms2DateTime(n,0,e)};function Irt(e,t){return gg(e)?t?mg.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:mg.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}bh.dfltRange=function(e){return gg(e)?mg.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};bh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var SL,ML;bh.dateTime2ms=function(e,t){if(bh.isJSDate(e)){var r=e.getTimezoneOffset()*j1,n=(e.getUTCMinutes()-e.getMinutes())*j1+(e.getUTCSeconds()-e.getSeconds())*f3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*j1;r=r-i/2+Z1(n-r+i/2,i)}return e=Number(e)-r,e>=SL&&e<=ML?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=gg(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.substr(1),t="");var s=a&&t.substr(0,7)==="chinese",u=e.match(s?Prt:zrt);if(!u)return _0;var l=u[1],f=u[3]||"1",c=Number(u[5]||1),h=Number(u[7]||0),d=Number(u[9]||0),p=Number(u[11]||0);if(a){if(l.length===2)return _0;l=Number(l);var x;try{var b=mg.getComponentMethod("calendars","getCal")(t);if(s){var y=f.charAt(f.length-1)==="i";f=parseInt(f,10),x=b.newDate(l,b.toMonthIndex(l,f,y),c)}else x=b.newDate(l,Number(f),c)}catch(E){return _0}return x?(x.toJD()-qM)*wv+h*FM+d*j1+p*f3:_0}l.length===2?l=(Number(l)+2e3-rie)%100+rie:l=Number(l),f-=1;var k=new Date(Date.UTC(2e3,f,c,h,d));return k.setUTCFullYear(l),k.getUTCMonth()!==f||k.getUTCDate()!==c?_0:k.getTime()+p*f3};SL=bh.MIN_MS=bh.dateTime2ms("-9999");ML=bh.MAX_MS=bh.dateTime2ms("9999-12-31 23:59:59.9999");bh.isDateTime=function(e,t){return bh.dateTime2ms(e,t)!==_0};function u3(e,t){return String(e+Math.pow(10,t)).substr(1)}var AL=90*wv,iie=3*FM,nie=5*j1;bh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=SL&&e<=ML))return _0;t||(t=0);var n=Math.floor(Z1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,u,l,f;if(gg(r)){var c=Math.floor(i/wv)+qM,h=Math.floor(Z1(e,wv));try{a=mg.getComponentMethod("calendars","getCal")(r).fromJD(c).formatDate("yyyy-mm-dd")}catch(d){a=tie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=SL+wv&&e<=ML-wv))return _0;var t=Math.floor(Z1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Lrt("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return lie(n,i,a,o,s)};function lie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+u3(t,2)+":"+u3(r,2),(n||i)&&(e+=":"+u3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+u3(i,a)}return e}bh.cleanDate=function(e,t,r){if(e===_0)return t;if(bh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(gg(r))return jB.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=bh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!bh.isDateTime(e,r))return jB.error("unrecognized date",e),t;return e};var Drt=/%\d?f/g,Rrt=/%h/g,Frt={1:"1",2:"1",3:"2",4:"2"};function aie(e,t,r,n){e=e.replace(Drt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Rrt,function(){return Frt[r("%q")(i)]}),gg(n))try{e=mg.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var qrt=[59,59.9,59.99,59.999,59.9999];function Brt(e,t){var r=Z1(e+.05,wv),n=u3(Math.floor(r/FM),2)+":"+u3(Z1(Math.floor(r/j1),60),2);if(t!=="M"){sie(t)||(t=0);var i=Math.min(Z1(e/f3,60),qrt[t]),a=(100+i).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}bh.formatDate=function(e,t,r,n,i,a){if(i=gg(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 Brt(e,r)+` -`+aie(a.dayMonthYear,e,n,i);return aie(t,e,n,i)};var oie=3*wv;bh.incrementMonth=function(e,t,r){r=gg(r)&&r;var n=Z1(e,wv);if(e=Math.round(e-n),r)try{var i=Math.round(e/wv)+qM,a=mg.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-qM)*wv+n}catch(u){jB.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+oie);return s.setUTCMonth(s.getUTCMonth()+t)+n-oie};bh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,u=gg(t)&&mg.getComponentMethod("calendars","getCal")(t),l=0;l{"use strict";fie.exports=function(t){return t}});var EL=Se(_g=>{"use strict";var Ort=_u(),Nrt=H1(),Urt=BM(),Vrt=ju().BADNUM,ZB=1e-9;_g.findBin=function(e,t,r){if(Ort(t.start))return r?Math.ceil((e-t.start)/t.size-ZB)-1:Math.floor((e-t.start)/t.size+ZB);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,u;for(o>=0?u=r?Hrt:Grt:u=r?jrt:Wrt,e+=o*ZB*(r?-1:1)*(o>=0?1:-1);n90&&Nrt.log("Long binary search..."),n-1};function Hrt(e,t){return et}function jrt(e,t){return e>=t}_g.sorterAsc=function(e,t){return e-t};_g.sorterDes=function(e,t){return t-e};_g.distinctVals=function(e){var t=e.slice();t.sort(_g.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Vrt;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var u=t[s],l=u-o;o===void 0?(a.push(u),o=u):l>i&&(n=Math.min(n,l),a.push(u),o=u)}return{vals:a,minDiff:n}};_g.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,u=r?1:0,l=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};_g.findIndexOfMin=function(e,t){t=t||Urt;for(var r=1/0,n,i=0;i{"use strict";cie.exports=function(t){return Object.keys(t).sort()}});var hie=Se(wh=>{"use strict";var OM=_u(),Zrt=yp().isArrayOrTypedArray;wh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),OM(t)||(t=!1),Zrt(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 mie=Se((krr,yie)=>{"use strict";var die=r3(),XB=die.mod,Xrt=die.modHalf,NM=Math.PI,Y1=2*NM;function Yrt(e){return e/180*NM}function Krt(e){return e/NM*180}function YB(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function pie(e,t){return Xrt(t-e,Y1)}function Jrt(e,t){return Math.abs(pie(e,t))}function vie(e,t){if(YB(t))return!0;var r,n;t[0]n&&(n+=Y1);var i=XB(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function $rt(e,t,r,n){if(!vie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function KB(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=YB([r,n]),u,l,f,c,h;s?(u=0,l=NM,f=Y1):r{"use strict";cb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};cb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};cb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};cb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};cb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};cb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var bie=Se(hb=>{"use strict";var JB=r3().mod;hb.segmentsIntersect=xie;function xie(e,t,r,n,i,a,o,s){var u=r-e,l=i-e,f=o-i,c=n-t,h=a-t,d=s-a,p=u*d-f*c;if(p===0)return null;var x=(l*d-f*h)/p,b=(l*c-u*h)/p;return b<0||b>1||x<0||x>1?null:{x:e+u*x,y:t+c*x}}hb.segmentDistance=function(t,r,n,i,a,o,s,u){if(xie(t,r,n,i,a,o,s,u))return 0;var l=n-t,f=i-r,c=s-a,h=u-o,d=l*l+f*f,p=c*c+h*h,x=Math.min(kL(l,f,d,a-t,o-r),kL(l,f,d,s-t,u-r),kL(c,h,p,t-a,r-o),kL(c,h,p,n-a,i-o));return Math.sqrt(x)};function kL(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 u=n*t-i*e;return u*u/r}}var CL,$B,_ie;hb.getTextLocation=function(t,r,n,i){if((t!==$B||i!==_ie)&&(CL={},$B=t,_ie=i),CL[n])return CL[n];var a=t.getPointAtLength(JB(n-i/2,r)),o=t.getPointAtLength(JB(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),u=t.getPointAtLength(JB(n,r)),l=(u.x*4+a.x+o.x)/6,f=(u.y*4+a.y+o.y)/6,c={x:l,y:f,theta:s};return CL[n]=c,c};hb.clearLocationCache=function(){$B=null};hb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,u=0,l=t.getTotalLength(),f=l,c,h;function d(x){var b=t.getPointAtLength(x);x===0?c=b:x===l&&(h=b);var y=b.xa?b.x-a:0,E=b.ys?b.y-s:0;return Math.sqrt(y*y+E*E)}for(var p=d(u);p;){if(u+=p+n,u>f)return;p=d(u)}for(p=d(f);p;){if(f-=p+n,u>f)return;p=d(f)}return{min:u,max:f,len:f-u,total:l,isClosed:u===0&&f===l&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};hb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,u=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,l=0,f=0,c=a,h,d,p;l0?c=h:f=h,l++}return d}});var LL=Se(UM=>{"use strict";var xg={};UM.throttle=function(t,r,n){var i=xg[t],a=Date.now();if(!i){for(var o in xg)xg[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};UM.done=function(e){var t=xg[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};UM.clear=function(e){if(e)wie(xg[e]),delete xg[e];else for(var t in xg)UM.clear(t)};function wie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Aie=Se((Prr,Tie)=>{"use strict";Tie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Sie=Se((Irr,zL)=>{"use strict";zL.exports=QB;zL.exports.isMobile=QB;zL.exports.default=QB;var rit=/(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,iit=/CrOS/,nit=/android|ipad|playbook|silk/i;function QB(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=rit.test(t)&&!iit.test(t)||!!e.tablet&&nit.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Eie=Se((Drr,Mie)=>{"use strict";var ait=_u(),oit=Sie();Mie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=sit(),typeof r!="string")return!0;var n=oit({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a-1;s--){var u=i[s];if(u.substr(0,8)==="Version/"){var l=u.substr(8).split(".")[0];if(ait(l)&&(l=+l),l>=13)return!0}}}return n};function sit(){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 Cie=Se((Rrr,kie)=>{"use strict";var lit=Nl();kie.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]=lit.select(this)}),i}});var zie=Se((Frr,Lie)=>{"use strict";var uit=Ul();Lie.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 u=s[r];if(u)return u}a=uit.localeRegistry}var l=n.split("-")[0];if(l===n)break;n=l}return r}});var eO=Se((qrr,Pie)=>{"use strict";Pie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";Iie.exports=function(t){for(var r=hit(t)?cit:fit,n=[],i=0;i{"use strict";Rie.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 u=parseFloat(i).toPrecision(12);u.indexOf("e+")===-1&&(i=+u)}}return i}});var Bie=Se((Nrr,qie)=>{"use strict";var dit=_u(),pit=ju().BADNUM,vit=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;qie.exports=function(t){return typeof t=="string"&&(t=t.replace(vit,"")),dit(t)?Number(t):pit}});var Zr=Se((Urr,Jie)=>{"use strict";var VM=Nl(),yit=e3().utcFormat,mit=TB().format,Gie=_u(),Wie=ju(),jie=Wie.FP_SAFE,git=-jie,Oie=Wie.BADNUM,nn=Jie.exports={};nn.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 Nie={};nn.warnBadFormat=function(e){var t=String(e);Nie[t]||(Nie[t]=1,nn.warn('encountered bad format: "'+t+'"'))};nn.noFormat=function(e){return String(e)};nn.numberFormat=function(e){var t;try{t=mit(nn.adjustFormat(e))}catch(r){return nn.warnBadFormat(e),nn.noFormat}return t};nn.nestedProperty=EM();nn.keyedContainer=zee();nn.relativeAttr=Iee();nn.isPlainObject=yg();nn.toLogRange=lL();nn.relinkPrivateKeys=qee();var K1=yp();nn.isArrayBuffer=K1.isArrayBuffer;nn.isTypedArray=K1.isTypedArray;nn.isArrayOrTypedArray=K1.isArrayOrTypedArray;nn.isArray1D=K1.isArray1D;nn.ensureArray=K1.ensureArray;nn.concat=K1.concat;nn.maxRowLength=K1.maxRowLength;nn.minRowLength=K1.minRowLength;var Zie=r3();nn.mod=Zie.mod;nn.modHalf=Zie.modHalf;var J1=rte();nn.valObjectMeta=J1.valObjectMeta;nn.coerce=J1.coerce;nn.coerce2=J1.coerce2;nn.coerceFont=J1.coerceFont;nn.coercePattern=J1.coercePattern;nn.coerceHoverinfo=J1.coerceHoverinfo;nn.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;nn.validate=J1.validate;var jv=uie();nn.dateTime2ms=jv.dateTime2ms;nn.isDateTime=jv.isDateTime;nn.ms2DateTime=jv.ms2DateTime;nn.ms2DateTimeLocal=jv.ms2DateTimeLocal;nn.cleanDate=jv.cleanDate;nn.isJSDate=jv.isJSDate;nn.formatDate=jv.formatDate;nn.incrementMonth=jv.incrementMonth;nn.dateTick0=jv.dateTick0;nn.dfltRange=jv.dfltRange;nn.findExactDates=jv.findExactDates;nn.MIN_MS=jv.MIN_MS;nn.MAX_MS=jv.MAX_MS;var db=EL();nn.findBin=db.findBin;nn.sorterAsc=db.sorterAsc;nn.sorterDes=db.sorterDes;nn.distinctVals=db.distinctVals;nn.roundUp=db.roundUp;nn.sort=db.sort;nn.findIndexOfMin=db.findIndexOfMin;nn.sortObjectKeys=X1();var bg=hie();nn.aggNums=bg.aggNums;nn.len=bg.len;nn.mean=bg.mean;nn.geometricMean=bg.geometricMean;nn.median=bg.median;nn.midRange=bg.midRange;nn.variance=bg.variance;nn.stdev=bg.stdev;nn.interp=bg.interp;var gy=yL();nn.init2dArray=gy.init2dArray;nn.transposeRagged=gy.transposeRagged;nn.dot=gy.dot;nn.translationMatrix=gy.translationMatrix;nn.rotationMatrix=gy.rotationMatrix;nn.rotationXYMatrix=gy.rotationXYMatrix;nn.apply3DTransform=gy.apply3DTransform;nn.apply2DTransform=gy.apply2DTransform;nn.apply2DTransform2=gy.apply2DTransform2;nn.convertCssMatrix=gy.convertCssMatrix;nn.inverseTransformMatrix=gy.inverseTransformMatrix;var pm=mie();nn.deg2rad=pm.deg2rad;nn.rad2deg=pm.rad2deg;nn.angleDelta=pm.angleDelta;nn.angleDist=pm.angleDist;nn.isFullCircle=pm.isFullCircle;nn.isAngleInsideSector=pm.isAngleInsideSector;nn.isPtInsideSector=pm.isPtInsideSector;nn.pathArc=pm.pathArc;nn.pathSector=pm.pathSector;nn.pathAnnulus=pm.pathAnnulus;var d3=gie();nn.isLeftAnchor=d3.isLeftAnchor;nn.isCenterAnchor=d3.isCenterAnchor;nn.isRightAnchor=d3.isRightAnchor;nn.isTopAnchor=d3.isTopAnchor;nn.isMiddleAnchor=d3.isMiddleAnchor;nn.isBottomAnchor=d3.isBottomAnchor;var p3=bie();nn.segmentsIntersect=p3.segmentsIntersect;nn.segmentDistance=p3.segmentDistance;nn.getTextLocation=p3.getTextLocation;nn.clearLocationCache=p3.clearLocationCache;nn.getVisibleSegment=p3.getVisibleSegment;nn.findPointOnPath=p3.findPointOnPath;var DL=vu();nn.extendFlat=DL.extendFlat;nn.extendDeep=DL.extendDeep;nn.extendDeepAll=DL.extendDeepAll;nn.extendDeepNoArrays=DL.extendDeepNoArrays;var tO=H1();nn.log=tO.log;nn.warn=tO.warn;nn.error=tO.error;var _it=n3();nn.counterRegex=_it.counter;var rO=LL();nn.throttle=rO.throttle;nn.throttleDone=rO.done;nn.clearThrottle=rO.clear;var _y=DM();nn.getGraphDiv=_y.getGraphDiv;nn.isPlotDiv=_y.isPlotDiv;nn.removeElement=_y.removeElement;nn.addStyleRule=_y.addStyleRule;nn.addRelatedStyleRule=_y.addRelatedStyleRule;nn.deleteRelatedStyleRule=_y.deleteRelatedStyleRule;nn.setStyleOnHover=_y.setStyleOnHover;nn.getFullTransformMatrix=_y.getFullTransformMatrix;nn.getElementTransformMatrix=_y.getElementTransformMatrix;nn.getElementAndAncestors=_y.getElementAndAncestors;nn.equalDomRects=_y.equalDomRects;nn.clearResponsive=Aie();nn.preserveDrawingBuffer=Eie();nn.makeTraceGroups=Cie();nn._=zie();nn.notifier=DB();nn.filterUnique=eO();nn.filterVisible=Die();nn.pushUnique=qB();nn.increment=Fie();nn.cleanNumber=Bie();nn.ensureNumber=function(t){return Gie(t)?(t=Number(t),t>jie||t=t?!1:Gie(e)&&e>=0&&e%1===0};nn.noop=vL();nn.identity=BM();nn.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))};nn.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};nn.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?(nn.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};nn.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};nn.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,u,l,f;for(s=0;s=n&&(l-=n*Math.floor(l/n)),l<0?l=-1-l:l>=r&&(l=n-1-l),f+=e[l]*a[u];o[s]=f}return o};nn.syncOrAsync=function(e,t,r){var n,i;function a(){return nn.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)};nn.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};nn.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};nn.fillArray=function(e,t,r,n){if(n=n||nn.identity,nn.isArrayOrTypedArray(e))for(var i=0;i1?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+u};nn.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Kie=/^\w*$/;nn.templateString=function(e,t){var r={};return e.replace(nn.TEMPLATE_STRING_REGEX,function(n,i){var a;return Kie.test(i)?a=t[i]:(r[i]=r[i]||nn.nestedProperty(t,i).get,a=r[i]()),nn.isValidTextValue(a)?a:""})};var Sit={max:10,count:0,name:"hovertemplate"};nn.hovertemplateString=function(){return iO.apply(Sit,arguments)};var Mit={max:10,count:0,name:"texttemplate"};nn.texttemplateString=function(){return iO.apply(Mit,arguments)};var Eit=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function kit(e){var t=e.match(Eit);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Cit={max:10,count:0,name:"texttemplate",parseMultDiv:!0};nn.texttemplateStringForShapes=function(){return iO.apply(Cit,arguments)};var Uie=/^[:|\|]/;function iO(e,t,r){var n=this,i=arguments;t||(t={});var a={};return e.replace(nn.TEMPLATE_STRING_REGEX,function(o,s,u){var l=s==="xother"||s==="yother",f=s==="_xother"||s==="_yother",c=s==="_xother_"||s==="_yother_",h=s==="xother_"||s==="yother_",d=l||f||h||c,p=s;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var x=null,b=null;if(n.parseMultDiv){var y=kit(p);p=y.key,x=y.op,b=y.number}var E;if(d){if(E=t[p],E===void 0)return""}else{var k,A;for(A=3;A=IL&&o<=Vie,l=s>=IL&&s<=Vie;if(u&&(n=10*n+o-IL),l&&(i=10*i+s-IL),!u||!l){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var h3=2e9;nn.seedPseudoRandom=function(){h3=2e9};nn.pseudoRandom=function(){var e=h3;return h3=(69069*h3+1)%4294967296,Math.abs(h3-e)<429496729?nn.pseudoRandom():h3/4294967296};nn.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=nn.extractOption(e,t,"htx","hovertext");if(nn.isValidTextValue(i))return n(i);var a=nn.extractOption(e,t,"tx","text");if(nn.isValidTextValue(a))return n(a)};nn.isValidTextValue=function(e){return e||e===0};nn.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&&(l=1):l=0,nn.strTranslate(i-l*(r+o),a-l*(n+s))+nn.strScale(l)+(u?"rotate("+u+(t?"":" "+r+" "+n)+")":"")};nn.setTransormAndDisplay=function(e,t){e.attr("transform",nn.getTextTransform(t)),e.style("display",t.scale?null:"none")};nn.ensureUniformFontSize=function(e,t){var r=nn.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};nn.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)};nn.bigFont=function(e){return Math.round(1.2*e)};var Hie=nn.getFirefoxVersion(),Lit=Hie!==null&&Hie<86;nn.getPositionFromD3Event=function(){return Lit?[VM.event.layerX,VM.event.layerY]:[VM.event.offsetX,VM.event.offsetY]}});var ene=Se(()=>{"use strict";var zit=Zr(),$ie={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(nO in $ie)Qie=nO.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),zit.addStyleRule(Qie,$ie[nO]);var Qie,nO});var aO=Se((Grr,tne)=>{tne.exports=!0});var sO=Se((Wrr,rne)=>{"use strict";var Pit=aO(),oO;typeof window.matchMedia=="function"?oO=!window.matchMedia("(hover: none)").matches:oO=Pit;rne.exports=oO});var pb=Se((jrr,lO)=>{"use strict";var v3=typeof Reflect=="object"?Reflect:null,ine=v3&&typeof v3.apply=="function"?v3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},RL;v3&&typeof v3.ownKeys=="function"?RL=v3.ownKeys:Object.getOwnPropertySymbols?RL=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:RL=function(t){return Object.getOwnPropertyNames(t)};function Iit(e){console&&console.warn&&console.warn(e)}var ane=Number.isNaN||function(t){return t!==t};function Oc(){Oc.init.call(this)}lO.exports=Oc;lO.exports.once=qit;Oc.EventEmitter=Oc;Oc.prototype._events=void 0;Oc.prototype._eventsCount=0;Oc.prototype._maxListeners=void 0;var nne=10;function FL(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Oc,"defaultMaxListeners",{enumerable:!0,get:function(){return nne},set:function(e){if(typeof e!="number"||e<0||ane(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");nne=e}});Oc.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};Oc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||ane(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 one(e){return e._maxListeners===void 0?Oc.defaultMaxListeners:e._maxListeners}Oc.prototype.getMaxListeners=function(){return one(this)};Oc.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 u=a[t];if(u===void 0)return!1;if(typeof u=="function")ine(u,this,r);else for(var l=u.length,f=cne(u,l),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,Iit(s)}return e}Oc.prototype.addListener=function(t,r){return sne(this,t,r,!1)};Oc.prototype.on=Oc.prototype.addListener;Oc.prototype.prependListener=function(t,r){return sne(this,t,r,!0)};function Dit(){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 lne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Dit.bind(n);return i.listener=r,n.wrapFn=i,i}Oc.prototype.once=function(t,r){return FL(r),this.on(t,lne(this,t,r)),this};Oc.prototype.prependOnceListener=function(t,r){return FL(r),this.prependListener(t,lne(this,t,r)),this};Oc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(FL(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():Rit(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Oc.prototype.off=Oc.prototype.removeListener;Oc.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 une(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?Fit(i):cne(i,i.length)}Oc.prototype.listeners=function(t){return une(this,t,!0)};Oc.prototype.rawListeners=function(t){return une(this,t,!1)};Oc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):fne.call(e,t)};Oc.prototype.listenerCount=fne;function fne(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}Oc.prototype.eventNames=function(){return this._eventsCount>0?RL(this._events):[]};function cne(e,t){for(var r=new Array(t),n=0;n{"use strict";var uO=pb().EventEmitter,Oit={init:function(e){if(e._ev instanceof uO)return e;var t=new uO,r=new uO;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)},e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(u){if(u.listener){if(i.removeListener(t,u.listener),!u.fired)return u.fired=!0,u.listener.apply(i,[r])}else return u.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var pne=Zr(),Nit=ub().dfltConfig;function Uit(e,t){for(var r=[],n,i=0;iNit.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};wg.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};wg.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};wg.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";mne.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var _3=Se($h=>{"use strict";var x0=Ul(),HM=Zr(),BL=zf(),cO=s3(),Vit=fO(),Hit=RM(),Git=ub().configAttributes,gne=_c(),xy=HM.extendDeepAll,m3=HM.isPlainObject,Wit=HM.isArrayOrTypedArray,OL=HM.nestedProperty,jit=HM.valObjectMeta,hO="_isSubplotObj",NL="_isLinkedToArray",Zit="_arrayAttrRegexps",xne="_deprecated",dO=[hO,NL,Zit,xne];$h.IS_SUBPLOT_OBJ=hO;$h.IS_LINKED_TO_ARRAY=NL;$h.DEPRECATED=xne;$h.UNDERSCORE_ATTRS=dO;$h.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Yit(t)}),{defs:{valObjects:jit,metaKeys:dO.concat(["description","role","editType","impliedEdits"]),editType:{traces:gne.traces,layout:gne.layout},impliedEdits:{}},traces:e,layout:Kit(),frames:Jit(),animation:g3(Hit),config:g3(Git)}};$h.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(dO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!$h.isValObject(o)&&m3(o)&&a!=="impliedEdits"&&$h.crawl(o,t,i+1,s)}})};$h.isValObject=function(e){return e&&e.valType!==void 0};$h.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(u,l,f,c){r=r.slice(0,c).concat([l]),n=n.slice(0,c).concat([u&&u._isLinkedToArray]);var h=u&&(u.valType==="data_array"||u.arrayOk===!0)&&!(r[c-1]==="colorbar"&&(l==="ticktext"||l==="tickvals"));h&&s(i,0,"")}function s(u,l,f){var c=u[r[l]],h=f+r[l];if(l===r.length-1)Wit(c)&&t.push(a+h);else if(n[l]){if(Array.isArray(c))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(!qL(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function qL(e){return e===Math.round(e)&&e>=0}function Yit(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=xy({},BL),a=xy({},t.attributes);$h.crawl(a,function(u,l,f,c,h){OL(i,h).set(void 0),u===void 0&&OL(a,h).set(void 0)}),xy(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,xy(n,a),r.attributes&&xy(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:g3(n)};if(t.layoutAttributes){var s={};xy(s,t.layoutAttributes),o.layoutAttributes=g3(s)}return t.animatable||$h.crawl(o,function(u){$h.isValObject(u)&&"anim"in u&&delete u.anim}),o}function Kit(){var e={},t,r;xy(e,cO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var x3=Zr(),rnt=zf(),$1="templateitemname",pO={name:{valType:"string",editType:"none"}};pO[$1]={valType:"string",editType:"calc"};vb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pO.name,t[$1]=pO[$1],t};vb.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=x3.coerce(a,{},rnt,"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}};vb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);x3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};vb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Tne(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(l){var f={name:l.name,_input:l},c=f[$1]=l[$1];if(!wne(c))return f._template=i,f;for(var h=0;h=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function u(){s={},a&&(s[o]={},s[o][$1]=a)}u();function l(d,p){s[d]=p}function f(d,p){a?x3.nestedProperty(s[o],d).set(p):s[o+"."+d]=p}function c(){var d=s;return u(),d}function h(d,p){d&&f(d,p);var x=c();for(var b in x)x3.nestedProperty(e,b).set(x[b])}return{modifyBase:l,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var dd=Se(($rr,Ane)=>{"use strict";var GM=n3().counter;Ane.exports={idRegex:{x:GM("x","( domain)?"),y:GM("y","( domain)?")},attrRegex:GM("[xy]axis"),xAxisMatch:GM("xaxis"),yAxisMatch:GM("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 $c=Se(Tv=>{"use strict";var int=Ul(),vO=dd();Tv.id2name=function(t){if(!(typeof t!="string"||!t.match(vO.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Tv.name2id=function(t){if(t.match(vO.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Tv.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(vO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Tv.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Tv.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Tv.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Sne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function nnt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function ant(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Mne.exports={clearOutlineControllers:nnt,clearOutline:ant}});var UL=Se((tir,Ene)=>{"use strict";Ene.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Dd=Se(HL=>{"use strict";var VL=Ul(),rir=dd().SUBPLOT_PATTERN;HL.getSubplotCalcData=function(e,t,r){var n=VL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var ont=Ul(),b3=Zr();yb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=yb.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){kne(e,o,i.cache),i.check=function(){if(a){var f=kne(e,o,i.cache);return f.changed&&n&&i.lookupTable[f.value]!==void 0&&(i.disable(),Promise.resolve(n({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[f.value]})).then(i.enable,i.enable)),f.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u0?".":"")+i;b3.isPlainObject(a)?yO(a,t,o,n+1):t(o,i,a)}})}});var Sc=Se((air,Wne)=>{"use strict";var Bne=Nl(),lnt=e3().timeFormatLocale,unt=TB().formatLocale,WM=_u(),fnt=AB(),Df=Ul(),One=_3(),cnt=_f(),Wl=Zr(),Nne=Pl(),Pne=ju().BADNUM,Av=$c(),hnt=Q1().clearOutline,dnt=UL(),mO=RM(),pnt=fO(),vnt=Dd().getModuleCalcData,Ine=Wl.relinkPrivateKeys,mb=Wl._,El=Wne.exports={};Wl.extendFlat(El,Df);El.attributes=zf();El.attributes.type.values=El.allTypes;El.fontAttrs=uc();El.layoutAttributes=s3();var WL=zne();El.executeAPICommand=WL.executeAPICommand;El.computeAPICommandBindings=WL.computeAPICommandBindings;El.manageCommandObserver=WL.manageCommandObserver;El.hasSimpleAPICommandBindings=WL.hasSimpleAPICommandBindings;El.redrawText=function(e){return e=Wl.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Df.getComponentMethod("annotations","draw")(e),Df.getComponentMethod("legend","draw")(e),Df.getComponentMethod("colorbar","draw")(e),t(El.previousPromises(e)))},300)})};El.resize=function(e){e=Wl.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Wl.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||Wl.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Df.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};El.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};El.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Wl.ensureSingle(t._paper,"text","js-plot-link-container",function(u){u.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Nne.defaultLine,"pointer-events":"all"}).each(function(){var l=Bne.select(this);l.append("tspan").classed("js-link-to-tool",!0),l.append("tspan").classed("js-link-spacer",!0),l.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&&ynt(e,a),o.text(a.text()&&s.text()?" - ":"")}};function ynt(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(){El.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})}}El.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Bne.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=El.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var mnt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],gnt=["year","month","dayMonth","dayMonthYear"];El.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=[],u=e.data||[],l=e.calcdata||[],f=e._context||{},c;e._transitionData||El.createTransitionData(e),i._dfltTitle={plot:mb(e,"Click to enter Plot title"),subtitle:mb(e,"Click to enter Plot subtitle"),x:mb(e,"Click to enter X axis title"),y:mb(e,"Click to enter Y axis title"),colorbar:mb(e,"Click to enter Colorscale title"),annotation:mb(e,"new text")},i._traceWord=mb(e,"trace");var h=Dne(e,mnt);if(i._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,p=n.height;El.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=p),El.sanitizeMargins(i)}else{El.supplyLayoutGlobalDefaults(a,i,h);var x=!a.width||!a.height,b=i.autosize,y=f.autosizable,E=x&&(b||y);E?El.plotAutoSize(e,a,i):x&&El.sanitizeMargins(i),!b&&x&&(a.width=i.width,a.height=i.height)}i._d3locale=bnt(h,i.separators),i._extraFormat=Dne(e,gnt),i._initialAutoSizeIsDone=!0,i._dataLength=u.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var k=i._subplots=xnt(),A=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=_nt(o,u),El.supplyDataDefaults(u,s,a,i);var _=Object.keys(A.x),C=Object.keys(A.y);if(_.length>1&&C.length>1){for(Df.getComponentMethod("grid","sizeDefaults")(a,i),c=0;c<_.length;c++)Wl.pushUnique(k.xaxis,_[c]);for(c=0;c15&&C.length>15&&i.shapes.length===0&&i.images.length===0,El.linkSubplots(s,i,o,n),El.cleanPlot(s,i,o,n);var F=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),U=F,H=q;U&&!H?n._bgLayer.remove():H&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&hnt({_fullLayout:n}),wnt(s,i),Ine(i,n),Df.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var j=i._tracePreGUI,G={},O;for(O in j)G[O]="old";for(c=0;c0){var f=1-2*a;o=Math.round(f*o),s=Math.round(f*s)}}var c=El.layoutAttributes.width.min,h=El.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(n.height-s)>1;(p||d)&&(d&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),El.sanitizeMargins(n)};El.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Df.componentsRegistry,a=t._basePlotModules,o,s,u,l=Df.subplotsRegistry.cartesian;for(o in i)u=i[o],u.includeBasePlot&&u.includeBasePlot(e,t);a.length||a.push(l),t._has("cartesian")&&(Df.getComponentMethod("grid","contentDefaults")(e,t),l.finalizeSubplots(e,t));for(var f in t._subplots)t._subplots[f].sort(Wl.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var E=r.xl!==void 0?r.xl:r.x,k=r.xr!==void 0?r.xr:r.x,A=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:E,size:r.l+x},r:{val:k,size:r.r+x},b:{val:L,size:r.b+x},t:{val:A,size:r.t+x}},p[t]=1}if(!n._replotting)return El.doAutoMargin(e)}};function Ant(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Av.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}El.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Une(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Wl.extendFlat({},i),u=a.l,l=a.r,f=a.t,c=a.b,h=t._pushmargin,d=t._pushmarginIds,p=t.minreducedwidth,x=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var y=e._fullLayout._reservedMargin;for(var E in y)for(var k in y[E]){var A=y[E][k];o[k]=Math.max(o[k],A)}h.base={l:{val:0,size:u},r:{val:1,size:l},t:{val:1,size:f},b:{val:0,size:c}};for(var L in o){var _=0;for(var C in h)C!=="base"&&WM(h[C][L].size)&&(_=h[C][L].size>_?h[C][L].size:_);var M=Math.max(0,a[L]-_);o[L]=Math.max(0,o[L]-M)}for(var v in h){var z=h[v].l||{},T=h[v].b||{},F=z.val,q=z.size,U=T.val,H=T.size,j=r-o.r-o.l,G=n-o.t-o.b;for(var O in h){if(WM(q)&&h[O].r){var W=h[O].r.val,re=h[O].r.size;if(W>F){var ne=(q*W+(re-j)*F)/(W-F),be=(re*(1-F)+(q-j)*(1-W))/(W-F);ne+be>u+l&&(u=ne,l=be)}}if(WM(H)&&h[O].t){var ze=h[O].t.val,Ce=h[O].t.size;if(ze>U){var he=(H*ze+(Ce-G)*U)/(ze-U),te=(Ce*(1-U)+(H-G)*(1-ze))/(ze-U);he+te>c+f&&(c=he,f=te)}}}}}var ke=Wl.constrain(r-a.l-a.r,Vne,p),Ee=Wl.constrain(n-a.t-a.b,Hne,x),Me=Math.max(0,r-ke),Oe=Math.max(0,n-Ee);if(Me){var Re=(u+l)/Me;Re>1&&(u/=Re,l/=Re)}if(Oe){var me=(c+f)/Oe;me>1&&(c/=me,f/=me)}if(i.l=Math.round(u)+o.l,i.r=Math.round(l)+o.r,i.t=Math.round(f)+o.t,i.b=Math.round(c)+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&&(El.didMarginChange(s,i)||Ant(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Be=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};El.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&El.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function l(h,d){if(typeof h=="function")return d?"_function_":null;if(Wl.isPlainObject(h)){var p={},x;return Object.keys(h).sort().forEach(function(k){if(["_","["].indexOf(k.charAt(0))===-1){if(typeof h[k]=="function"){d&&(p[k]="_function");return}if(r==="keepdata"){if(k.substr(k.length-3)==="src")return}else if(r==="keepstream"){if(x=h[k+"src"],typeof x=="string"&&x.indexOf(":")>0&&!Wl.isPlainObject(h.stream))return}else if(r!=="keepall"&&(x=h[k+"src"],typeof x=="string"&&x.indexOf(":")>0))return;p[k]=l(h[k],d)}}),p}var b=Array.isArray(h),y=Wl.isTypedArray(h);if((b||y)&&h.dtype&&h.shape){var E=h.bdata;return l({dtype:h.dtype,shape:h.shape,bdata:Wl.isArrayBuffer(E)?fnt.encode(E):E},d)}return b?h.map(function(k){return l(k,d)}):y?Wl.simpleMap(h,Wl.identity):Wl.isJSDate(h)?Wl.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=l(h);return t&&delete d.fit,d})};if(!t&&(f.layout=l(s),i)){var c=s._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return u&&(f.frames=l(u)),a&&(f.config=l(e._context,!0)),n==="object"?f:JSON.stringify(f)};El.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 Df.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!n&&d===h&&s(c)}}r.runFn(p),setTimeout(p())})}function s(c){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Df.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function u(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var l=[El.previousPromises,u,r.prepareFn,El.rehover,El.reselect,o],f=Wl.syncOrAsync(l,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}El.doCalcdata=function(e,t){var r=Av.list(e),n=e._fullData,i=e._fullLayout,a,o,s,u,l=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=l,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;u--)if(L[u].enabled){a._indexToPoints=L[u]._indexToPoints;break}o&&o.calc&&(A=o.calc(e,a))}(!Array.isArray(A)||!A[0])&&(A=[{x:Pne,y:Pne}]),A[0].t||(A[0].t={}),A[0].trace=a,l[E]=A}}for(Fne(r,n,i),s=0;s{"use strict";gb.xmlns="http://www.w3.org/2000/xmlns/";gb.svg="http://www.w3.org/2000/svg";gb.xlink="http://www.w3.org/1999/xlink";gb.svgAttrs={xmlns:gb.svg,"xmlns:xlink":gb.xlink}});var Qh=Se((sir,jne)=>{"use strict";jne.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 Bf=Se(b0=>{"use strict";var Dh=Nl(),Tg=Zr(),knt=Tg.strTranslate,gO=Zv(),Cnt=Qh().LINE_SPACING,Lnt=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Lnt),a=Dh.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 u=Hnt(e.node(),n);u&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(u){e.style("display","none");var l=parseInt(e.node().style.fontSize,10),f={fontSize:l};Dnt(i[2],f,function(c,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){s(),u();return}var x=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var b=d.width,y=d.height;p.attr({class:o,height:y,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var E=e.node().style.fill||"black",k=p.select("g");k.attr({fill:E,stroke:E});var A=k.node().getBoundingClientRect(),L=A.width,_=A.height;(L>b||_>y)&&(p.style("overflow","hidden"),A=p.node().getBoundingClientRect(),L=A.width,_=A.height);var C=+e.attr("x"),M=+e.attr("y"),v=l||e.node().getBoundingClientRect().height,z=-v/4;if(o[0]==="y")x.attr({transform:"rotate("+[-90,C,M]+")"+knt(-L/2,z-_/2)});else if(o[0]==="l")M=z-_/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,M=z;else{var T=e.attr("text-anchor");C=C-L*(T==="middle"?.5:T==="end"?1:0),M=M+z-_/2}p.attr({x:C,y:M}),r&&r.call(e,x),u(x)})})):s(),e};var znt=/(<|<|<)/g,Pnt=/(>|>|>)/g;function Int(e){return e.replace(znt,"\\lt ").replace(Pnt,"\\gt ")}var Zne=[["$","$"],["\\(","\\)"]];function Dnt(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Tg.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,u=function(){return a=Tg.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:Zne},displayAlign:"left"})},l=function(){a=Tg.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Zne},f=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var E="math-output-"+Tg.randstr({},64);s=Dh.select("body").append("div").attr({id:E}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Int(e));var k=s.node();return n===2?MathJax.Hub.Typeset(k):MathJax.typeset([k])},d=function(){var E=s.select(n===2?".MathJax_SVG":".MathJax"),k=!E.empty()&&s.select("svg").node();if(!k)Tg.log("There was an error in the tex syntax.",e),r();else{var A=k.getBoundingClientRect(),L;n===2?L=Dh.select("body").select("#MathJax_SVG_glyphs"):L=E.select("defs"),r(E,L,A)}s.remove()},p=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},x=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},y=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(u,f,h,d,p,b):n===3&&(l(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),x(),y()}))}var Jne={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"},Rnt={sub:"0.3em",sup:"-0.6em"},Fnt={sub:"-0.21em",sup:"0.42em"},Xne="\u200B",Yne=["http:","https:","mailto:","",void 0,":"],$ne=b0.NEWLINES=/(\r\n?|\n)/g,xO=/(<[^<>]*>)/,bO=/<(\/?)([^ >]*)(\s+(.*))?>/i,qnt=//i;b0.BR_TAG_ALL=//gi;var Qne=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,eae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,tae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Bnt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function _b(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&jL(n)}var Ont=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(xO),s=[],u="",l=0,f=0;fa?s.push(c.substr(0,x-a)+i):s.push(c.substr(0,x));break}u=""}}return s.join("")};var Nnt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Unt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function jL(e){return e.replace(Unt,function(t,r){var n;return r.charAt(0)==="#"?n=Vnt(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):n=Nnt[r],n||t})}b0.convertEntities=jL;function Vnt(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 Hnt(e,t){t=t.replace($ne," ");var r=!1,n=[],i,a=-1;function o(){a++;var _=document.createElementNS(gO.svg,"tspan");Dh.select(_).attr({class:"line",dy:a*Cnt+"em"}),e.appendChild(_),i=_;var C=n;if(n=[{node:_}],C.length>1)for(var M=1;M.",t);return}var C=n.pop();_!==C.type&&Tg.log("Start tag <"+C.type+"> doesnt match end tag <"+_+">. Pretending it did match.",t),i=n[n.length-1].node}var f=qnt.test(t);f?o():(i=e,n=[{node:e}]);for(var c=t.split(xO),h=0;h{"use strict";var Gnt=Nl(),XL=cd(),ZM=_u(),ZL=Zr(),iae=Pl(),Wnt=sb().isValid;function jnt(e,t,r){var n=t?ZL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(ZL.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function uae(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 cae=VB(),Xnt=cae.FORMAT_LINK,Ynt=cae.DATE_FORMAT_LINK;function Knt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?wO:hae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function wO(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: "+Xnt+"."].join(" ")}function hae(e,t){return wO(e,t)+[" And for dates see: "+Ynt+".","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(" ")}dae.exports={axisHoverFormat:Knt,descriptionOnlyNumbers:wO,descriptionWithDates:hae}});var Rd=Se((cir,Lae)=>{"use strict";var pae=uc(),w3=Ih(),Cae=Id().dash,AO=vu().extendFlat,vae=_f().templatedArray,yae=Gc().descriptionWithDates,Jnt=ju().ONEDAY,vm=dd(),$nt=vm.HOUR_PATTERN,Qnt=vm.WEEKDAY_PATTERN,TO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},eat=AO({},TO,{values:TO.values.slice().concat(["sync"])});function mae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var gae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},_ae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},xae={valType:"data_array",editType:"ticks"},bae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function wae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Tae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Aae={valType:"color",dflt:w3.defaultLine,editType:"ticks"},Sae={valType:"color",dflt:w3.lightLine,editType:"ticks"};function Mae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Eae=AO({},Cae,{editType:"ticks"}),kae={valType:"boolean",editType:"ticks"};Lae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:pae({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[vm.idRegex.x.toString(),vm.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:[vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"calc"},rangebreaks:vae("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:[Qnt,$nt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Jnt},editType:"calc"}),tickmode:eat,nticks:mae(),tick0:gae,dtick:_ae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:xae,ticktext:{valType:"data_array",editType:"ticks"},ticks:bae,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:wae(),tickwidth:Tae(),tickcolor:Aae,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:AO({},Cae,{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:pae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:yae("tick label")},tickformatstops:vae("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")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:kae,gridcolor:Sae,gridwidth:Mae(),griddash:Eae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:TO,nticks:mae("minor"),tick0:gae,dtick:_ae,tickvals:xae,ticks:bae,ticklen:wae("minor"),tickwidth:Tae("minor"),tickcolor:Aae,gridcolor:Sae,gridwidth:Mae("minor"),griddash:Eae,showgrid:kae,editType:"ticks"},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 YL=Se((hir,Iae)=>{"use strict";var Nc=Rd(),zae=uc(),Pae=vu().extendFlat,tat=_c().overrideAll;Iae.exports=tat({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:Nc.linecolor,outlinewidth:Nc.linewidth,bordercolor:Nc.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Nc.minor.tickmode,nticks:Nc.nticks,tick0:Nc.tick0,dtick:Nc.dtick,tickvals:Nc.tickvals,ticktext:Nc.ticktext,ticks:Pae({},Nc.ticks,{dflt:""}),ticklabeloverflow:Pae({},Nc.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:Nc.ticklen,tickwidth:Nc.tickwidth,tickcolor:Nc.tickcolor,ticklabelstep:Nc.ticklabelstep,showticklabels:Nc.showticklabels,labelalias:Nc.labelalias,tickfont:zae({}),tickangle:Nc.tickangle,tickformat:Nc.tickformat,tickformatstops:Nc.tickformatstops,tickprefix:Nc.tickprefix,showtickprefix:Nc.showtickprefix,ticksuffix:Nc.ticksuffix,showticksuffix:Nc.showticksuffix,separatethousands:Nc.separatethousands,exponentformat:Nc.exponentformat,minexponent:Nc.minexponent,showexponent:Nc.showexponent,title:{text:{valType:"string"},font:zae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Xf=Se((pir,Rae)=>{"use strict";var rat=YL(),iat=n3().counter,nat=X1(),Dae=sb().scales,dir=nat(Dae);function KL(e){return"`"+e+"`"}Rae.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"?Dae[r.colorscaleDflt]:null,u=r.editTypeOverride||"",l=t?t+".":"",f,c;"colorAttr"in r?(f=r.colorAttr,c=r.colorAttr):(f={z:"z",c:"color"}[n],c="in "+KL(l+f));var h=i?" Has an effect only if "+c+" is set to a numerical array.":"",d=n+"auto",p=n+"min",x=n+"max",b=n+"mid",y=KL(l+d),E=KL(l+p),k=KL(l+x),A=E+" and "+k,L={};L[p]=L[x]=void 0;var _={};_[d]=!1;var C={};return f==="color"&&(C.color={valType:"color",arrayOk:!0,editType:u||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[p]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},C[x]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},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=rat),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:iat("coloraxis"),dflt:null,editType:"calc"}),C}});var MO=Se((vir,Fae)=>{"use strict";var aat=vu().extendFlat,oat=Xf(),SO=sb().scales;Fae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:SO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:SO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:SO.RdBu,editType:"calc"}},coloraxis:aat({_isSubplotObj:!0,editType:"calc"},oat("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var EO=Se((yir,qae)=>{"use strict";var sat=Zr();qae.exports=function(t){return sat.isPlainObject(t.colorbar)}});var LO=Se(CO=>{"use strict";var kO=_u(),Bae=Zr(),Oae=ju(),lat=Oae.ONEDAY,uat=Oae.ONEWEEK;CO.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?lat:1;if(!e)return a;if(kO(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.substr(1);return s=kO(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};CO.tick0=function(e,t,r,n){if(t==="date")return Bae.cleanDate(e,Bae.dateTick0(r,n%uat===0?1:0));if(!(n==="D1"||n==="D2"))return kO(e)?Number(e):0}});var xb=Se((gir,Uae)=>{"use strict";var Nae=LO(),fat=Zr().isArrayOrTypedArray,cat=yp().isTypedArraySpec,hat=yp().decodeTypedArraySpec;Uae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,u=o?r.minor:r,l=o?"minor.":"";function f(E){var k=s[E];return cat(k)&&(k=hat(k)),k!==void 0?k:(u._template||{})[E]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=fat(d)?"array":h?"linear":"auto",x=n(l+"tickmode",p);if(x==="auto"||x==="sync")n(l+"nticks");else if(x==="linear"){var b=u.dtick=Nae.dtick(h,i);u.tick0=Nae.tick0(c,i,r.calendar,b)}else if(i!=="multicategory"){var y=n(l+"tickvals");y===void 0?u.tickmode="auto":o||n("ticktext")}}});var T3=Se((_ir,Hae)=>{"use strict";var zO=Zr(),Vae=Rd();Hae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,u=a?Vae.minor:Vae,l=a?"minor.":"",f=zO.coerce2(o,s,u,"ticklen",a?(r.ticklen||5)*.6:void 0),c=zO.coerce2(o,s,u,"tickwidth",a?r.tickwidth||1:void 0),h=zO.coerce2(o,s,u,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(l+"ticks",!a&&i.outerTicks||f||c||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var PO=Se((xir,Gae)=>{"use strict";Gae.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 Jd=Se((bir,Wae)=>{"use strict";var JL=Zr(),dat=_f();Wae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=JL.isArrayOrTypedArray(t[i])?t[i]:[],u=r[i]=[],l=dat.arrayTemplater(r,i,a),f,c;for(f=0;f{"use strict";var IO=Zr(),pat=Pl().contrast,jae=Rd(),vat=PO(),yat=Jd();Zae.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");IO.isPlainObject(o)||delete r.labelalias;var s=vat(t),u=n("showticklabels");if(u){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var l=a.font||{},f=r.color,c=r.ticklabelposition||"",h=c.indexOf("inside")!==-1?pat(a.bgColor):f&&f!==jae.color.dflt?f:l.color;if(IO.coerceFont(n,"tickfont",l,{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 p=n("tickformat");yat(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:mat}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!p&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function mat(e,t){function r(i,a){return IO.coerce(e,t,jae.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var t_=Se((Tir,Xae)=>{"use strict";var gat=PO();Xae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=gat(t),u=n("tickprefix");u&&n("showtickprefix",s);var l=n("ticksuffix",o);l&&n("showticksuffix",s)}});var DO=Se((Air,Yae)=>{"use strict";var r_=Zr(),_at=_f(),xat=xb(),bat=T3(),wat=e_(),Tat=t_(),Aat=YL();Yae.exports=function(t,r,n){var i=_at.newContainer(r,"colorbar"),a=t.colorbar||{};function o(T,F){return r_.coerce(a,i,Aat,T,F)}var s=n.margin||{t:0,b:0,l:0,r:0},u=n.width-s.l-s.r,l=n.height-s.t-s.b,f=o("orientation"),c=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(c?u:l):30);var d=o("lenmode");o("len",d==="fraction"?1:c?l:u);var p=o("yref"),x=o("xref"),b=p==="paper",y=x==="paper",E,k,A,L="left";c?(A="middle",L=y?"left":"right",E=y?1.02:1,k=.5):(A=b?"bottom":"top",L="center",E=.5,k=b?1.02:1),r_.coerce(a,i,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:E}},"x"),r_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:k}},"y"),o("xanchor",L),o("xpad"),o("yanchor",A),o("ypad"),r_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var _=r_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",_.indexOf("inside")!==-1?"hide past domain":"hide past div"),xat(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};_.indexOf("inside")!==-1&&(M.bgColor="black"),Tat(a,i,o,"linear",M),wat(a,i,o,"linear",M),bat(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var v=i.showticklabels?i.tickfont:C,z=r_.extendFlat({},C,{family:v.family,size:r_.bigFont(v.size)});r_.coerceFont(o,"title.font",z),o("title.side",c?"top":"right")}});var ed=Se((Sir,$ae)=>{"use strict";var Kae=_u(),FO=Zr(),Sat=EO(),Mat=DO(),Jae=sb().isValid,Eat=Ul().traceIs;function RO(e,t){var r=t.slice(0,t.length-1);return t?FO.nestedProperty(e,r).get()||{}:e}$ae.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,u="_module"in r,l=RO(t,o),f=RO(r,o),c=RO(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(u){var d=n._colorAxes||{},p=i(o+"coloraxis");if(p){var x=Eat(r,"contour")&&FO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[p];b?(b[2].push(h),b[0]!==x&&(b[0]=!1,FO.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[x,r,[h]];return}}var y=l[s+"min"],E=l[s+"max"],k=Kae(y)&&Kae(E)&&y{"use strict";var Qae=Zr(),kat=_f(),eoe=MO(),Cat=ed();toe.exports=function(t,r){function n(c,h){return Qae.coerce(t,r,eoe,c,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(c,h){return Qae.coerce(a,o,eoe.coloraxis,c,h)}for(var u in i){var l=i[u];if(l[0])a=t[u]||{},o=kat.newContainer(r,u,"coloraxis"),o._name=u,Cat(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var Lat=Zr(),zat=Dp().hasColorscale,Pat=Dp().extractOpts;ioe.exports=function(t,r){function n(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function i(f,c){var h=c.container?Lat.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Pat(h),p=d.auto;(p||d.min===void 0)&&n(h,c.min),(p||d.max===void 0)&&n(h,c.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a{"use strict";var aoe=_u(),qO=Zr(),Iat=Dp().extractOpts;ooe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?qO.nestedProperty(r,o).get():r,u=Iat(s),l=u.auto!==!1,f=u.min,c=u.max,h=u.mid,d=function(){return qO.aggNums(Math.min,null,a)},p=function(){return qO.aggNums(Math.max,null,a)};if(f===void 0?f=d():l&&(s._colorAx&&aoe(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():l&&(s._colorAx&&aoe(c)?c=Math.max(c,p()):c=p()),l&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h=0?x=i.colorscale.sequential:x=i.colorscale.sequentialminus,u._sync("colorscale",x)}}});var fc=Se((Cir,soe)=>{"use strict";var $L=sb(),A3=Dp();soe.exports={moduleType:"component",name:"colorscale",attributes:Xf(),layoutAttributes:MO(),supplyLayoutDefaults:roe(),handleDefaults:ed(),crossTraceDefaults:noe(),calc:Rp(),scales:$L.scales,defaultScale:$L.defaultScale,getScale:$L.get,isValidScale:$L.isValid,hasColorscale:A3.hasColorscale,extractOpts:A3.extractOpts,extractScale:A3.extractScale,flipScale:A3.flipScale,makeColorScaleFunc:A3.makeColorScaleFunc,makeColorScaleFuncFromTrace:A3.makeColorScaleFuncFromTrace}});var ec=Se((Lir,uoe)=>{"use strict";var loe=Zr(),Dat=yp().isTypedArraySpec;uoe.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 loe.isPlainObject(t)&&(loe.isArrayOrTypedArray(t.size)||Dat(t.size))}}});var S3=Se((zir,foe)=>{"use strict";var Rat=_u();foe.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 u=o(s/r);return Rat(u)&&u>0?Math.max(u,a):0}}});var rv=Se(mp=>{"use strict";var coe=Zr();mp.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mp.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{poe.exports=Nat;var BO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Oat=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Nat(e){var t=[];return e.replace(Oat,function(r,n,i){var a=n.toLowerCase();for(i=Vat(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==BO[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var Hat=XM(),ll=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},Zu="M0,0Z",voe=Math.sqrt(2),i_=Math.sqrt(3),OO=Math.PI,NO=Math.cos,UO=Math.sin;xoe.exports={circle:{n:0,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Yu(t,r,i):i}},square:{n:1,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.3,2);return Yu(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.4,2),i=ll(e*1.2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*.8/voe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Yu(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(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.951,2),i=ll(e*.588,2),a=ll(-e,2),o=ll(e*-.309,2),s=ll(e*.809,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/2,2),a=ll(e*i_/2,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/2,2),a=ll(e*i_/2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*.924,2),i=ll(e*.383,2);return Yu(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(Xu(t))return Zu;var n=e*1.4,i=ll(n*.225,2),a=ll(n*.951,2),o=ll(n*.363,2),s=ll(n*.588,2),u=ll(-n,2),l=ll(n*-.309,2),f=ll(n*.118,2),c=ll(n*.809,2),h=ll(n*.382,2);return Yu(t,r,"M"+i+","+l+"H"+a+"L"+o+","+f+"L"+s+","+c+"L0,"+h+"L-"+s+","+c+"L-"+o+","+f+"L-"+a+","+l+"H-"+i+"L0,"+u+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.66,2),i=ll(e*.38,2),a=ll(e*.76,2);return Yu(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(Xu(t))return Zu;var n=ll(e*i_*.8,2),i=ll(e*.8,2),a=ll(e*1.6,2),o=ll(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*i_*.8,2),i=ll(e*.8,2),a=ll(e*1.6,2),o=ll(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*1.1,2),i=ll(e*2,2),a="A "+i+","+i+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2),i=ll(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*.7,2),i=ll(e*1.4,2);return Yu(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.4,2),i=ll(e*.7,2);return Yu(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/voe,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.3,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.3,2),i=ll(e*.65,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*.85,2);return Yu(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(Xu(t))return Zu;var n=ll(e/2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=OO/2.5,i=2*e*NO(n),a=2*e*UO(n);return Yu(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Xu(t))return Zu;var n=OO/4,i=2*e*NO(n),a=2*e*UO(n);return Yu(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function Xu(e){return e===null}var yoe,moe,goe,_oe;function Yu(e,t,r){if((!e||e%360===0)&&!t)return r;if(goe===e&&_oe===t&&yoe===r)return moe;goe=e,_oe=t,yoe=r;function n(b,y){var E=NO(b),k=UO(b),A=y[0],L=y[1]+(t||0);return[A*E-L*k,A*k+L*E]}for(var i=e/180*OO,a=0,o=0,s=Hat(r),u="",l=0;l{"use strict";var pd=Nl(),rc=Zr(),Gat=rc.numberFormat,Ab=_u(),ZO=cd(),ez=Ul(),$d=Pl(),Wat=fc(),KM=rc.strTranslate,tz=Bf(),jat=Zv(),Zat=Qh(),Xat=Zat.LINE_SPACING,zoe=N1().DESELECTDIM,Yat=ec(),Kat=S3(),Jat=rv().appendArrayPointValue,ml=Uoe.exports={};ml.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,u=t.shadow,l=t.lineposition,f=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call($d.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",VO(Qat(f))),u&&e.style("text-shadow",u==="auto"?tz.makeTextShadow($d.contrast(a)):VO(u)),l&&e.style("text-decoration-line",VO(eot(l)))};function VO(e){return e==="none"?void 0:e}var $at={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function Qat(e){return $at[e]}function eot(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ml.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};ml.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};ml.setRect=function(e,t,r,n,i){e.call(ml.setPosition,t,r).call(ml.setSize,n,i)};ml.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Ab(i)&&Ab(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",KM(i,a));else return!1;return!0};ml.translatePoints=function(e,t,r){e.each(function(n){var i=pd.select(this);ml.translatePoint(n,i,t,r)})};ml.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};ml.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,u=ez.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each(function(l){ml.hideOutsideRangePoint(l,pd.select(this),r,n,o,s)})})}};ml.crispRound=function(e,t,r){return!t||!Ab(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};ml.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||"";$d.stroke(t,n||a.color),ml.dashLine(t,s,o)};ml.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||"";pd.select(this).call($d.stroke,r||a.color).call(ml.dashLine,s,o)})};ml.dashLine=function(e,t,r){r=+r||0,t=ml.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};ml.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 Poe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&ml.getPatternAttr(i.shape,0,"");if(o){var s=ml.getPatternAttr(i.bgcolor,0,null),u=ml.getPatternAttr(i.fgcolor,0,null),l=i.fgopacity,f=ml.getPatternAttr(i.size,0,8),c=ml.getPatternAttr(i.solidity,0,.3),h=t.uid;ml.pattern(e,"point",r,h,o,f,c,void 0,i.fillmode,s,u,l)}else if(a&&a.type!=="none"){var d=a.type,p="scatterfill-"+t.uid;if(n&&(p="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var x,b;d==="horizontal"?(x={x:a.start,y:0},b={x:a.stop,y:0}):d==="vertical"&&(x={x:0,y:a.start},b={x:0,y:a.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.max[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.max[0].val:b.y,!0),e.call(Roe,r,p,"linear",a.colorscale,"fill",x,b,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(ml.gradient,r,p,d,a.colorscale,"fill")}else t.fillcolor&&e.call($d.fill,t.fillcolor)}ml.singleFillStyle=function(e,t){var r=pd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Poe(e,i,t,!1)};ml.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=pd.select(this);n[0].trace&&Poe(i,n[0].trace,t,r)})};var woe=boe();ml.symbolNames=[];ml.symbolFuncs=[];ml.symbolBackOffs=[];ml.symbolNeedLines={};ml.symbolNoDot={};ml.symbolNoFill={};ml.symbolList=[];Object.keys(woe).forEach(function(e){var t=woe[e],r=t.n;ml.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),ml.symbolNames[r]=e,ml.symbolFuncs[r]=t.f,ml.symbolBackOffs[r]=t.backoff||0,t.needLine&&(ml.symbolNeedLines[r]=!0),t.noDot?ml.symbolNoDot[r]=!0:ml.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(ml.symbolNoFill[r]=!0)});var tot=ml.symbolNames.length,rot="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ml.symbolNumber=function(e){if(Ab(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=ml.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=tot||e>=400?0:Math.floor(Math.max(e,0))};function Ioe(e,t,r,n){var i=e%100;return ml.symbolFuncs[i](t,r,n)+(e>=200?rot:"")}var Toe=Gat("~f"),Doe={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}};ml.gradient=function(e,t,r,n,i,a){var o=Doe[n];return Roe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Roe(e,t,r,n,i,a,o,s,u,l){var f=i.length,c;n==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:u?"userSpaceOnUse":"objectBoundingBox"},reversed:l}:n==="radial"&&(c={node:"radialGradient",reversed:l});for(var h=new Array(f),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 u;e.ms==="various"||o.size==="various"?u=3:u=n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var l=ml.symbolNumber(e.mx||o.symbol)||0;e.om=l%200>=100;var f=KO(e,r),c=YO(e,r);t.attr("d",Ioe(l,u,f,c))}var h=!1,d,p,x;if(e.so)x=s.outlierwidth,p=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;x=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):rc.isArrayOrTypedArray(s.color)?p=$d.defaultLine:p=s.color,rc.isArrayOrTypedArray(o.color)&&(d=$d.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($d.stroke,d).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var y=o.gradient,E=e.mgt;E?h=!0:E=y&&y.type,rc.isArrayOrTypedArray(E)&&(E=E[0],Doe[E]||(E=0));var k=o.pattern,A=k&&ml.getPatternAttr(k.shape,e.i,"");if(E&&E!=="none"){var L=e.mgc;L?h=!0:L=y.color;var _=r.uid;h&&(_+="-"+e.i),ml.gradient(t,i,_,E,[[0,L],[1,d]],"fill")}else if(A){var C=!1,M=k.fgcolor;!M&&a&&a.color&&(M=a.color,C=!0);var v=ml.getPatternAttr(M,e.i,a&&a.color||null),z=ml.getPatternAttr(k.bgcolor,e.i,null),T=k.fgopacity,F=ml.getPatternAttr(k.size,e.i,8),q=ml.getPatternAttr(k.solidity,e.i,.3);C=C||e.mcc||rc.isArrayOrTypedArray(k.shape)||rc.isArrayOrTypedArray(k.bgcolor)||rc.isArrayOrTypedArray(k.fgcolor)||rc.isArrayOrTypedArray(k.size)||rc.isArrayOrTypedArray(k.solidity);var U=r.uid;C&&(U+="-"+e.i),ml.pattern(t,"point",i,U,A,F,q,e.mcc,k.fillmode,z,v,T)}else rc.isArrayOrTypedArray(d)?$d.fill(t,d[e.i]):$d.fill(t,d);x&&$d.stroke(t,p)}};ml.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=ml.tryColorscale(r,""),t.lineScale=ml.tryColorscale(r,"line"),ez.traceIs(e,"symbols")&&(t.ms2mrc=Yat.isBubble(e)?Kat(e):function(){return(r.size||6)/2}),e.selectedpoints&&rc.extendFlat(t,ml.makeSelectedPointStyleFns(e)),t};ml.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,u=a.opacity,l=o.opacity,f=u!==void 0,c=l!==void 0;(rc.isArrayOrTypedArray(s)||f||c)&&(t.selectedOpacityFn=function(A){var L=A.mo===void 0?i.opacity:A.mo;return A.selected?f?u:L:c?l:zoe*L});var h=i.color,d=a.color,p=o.color;(d||p)&&(t.selectedColorFn=function(A){var L=A.mcc||h;return A.selected?d||L:p||L});var x=i.size,b=a.size,y=o.size,E=b!==void 0,k=y!==void 0;return ez.traceIs(e,"symbols")&&(E||k)&&(t.selectedSizeFn=function(A){var L=A.mrc||x/2;return A.selected?E?b/2:L:k?y/2:L}),t};ml.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,u=a.color,l=o.color;return t.selectedTextColorFn=function(f){var c=f.tc||s;return f.selected?u||c:l||(u?c:$d.addOpacity(c,zoe))},t};ml.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ml.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){$d.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,u=r.selectedSizeFn(o);a.attr("d",Ioe(ml.symbolNumber(s),u,KO(o,t),YO(o,t))),o.mrc2=u}),i.length&&e.each(function(a){for(var o=pd.select(this),s=0;s0?r:0}ml.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=ml.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var u=pd.select(this),l=a?rc.extractOption(s,t,"txt","texttemplate"):rc.extractOption(s,t,"tx","text");if(!l&&l!==0){u.remove();return}if(a){var f=t._module.formatLabels,c=f?f(s,t,o):{},h={};Jat(h,t,s.i);var d=t._meta||{};l=rc.texttemplateString(l,c,o._d3locale,h,s,d)}var p=s.tp||t.textposition,x=qoe(s,t),b=n?n(s):s.tc||t.textfont.color;u.call(ml.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:x,color:b}).text(l).call(tz.convertToTspans,r).call(Foe,p,x,s.mrc)})}};ml.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ml.makeSelectedTextStyleFns(t);e.each(function(n){var i=pd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=qoe(n,t);$d.fill(i,a);var u=ez.traceIs(t,"bar-like");Foe(i,o,s,n.mrc2||n.mrc,u)})}};var Aoe=.5;ml.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i=u||A>=f&&A<=u)&&(L<=c&&L>=l||L>=c&&L<=l)&&(e=[A,L])}return e}ml.applyBackoff=Noe;ml.makeTester=function(){var e=rc.ensureSingleById(pd.select("body"),"svg","js-plotly-tester",function(r){r.attr(jat.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=rc.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ml.tester=e,ml.testref=t};ml.savedBBoxes={};var GO=0,aot=1e4;ml.bBox=function(e,t,r){r||(r=Soe(e));var n;if(r){if(n=ml.savedBBoxes[r],n)return rc.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Soe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var u=ml.bBox(i,!1,r);return a&&(u.left+=a,u.right+=a),o&&(u.top+=o,u.bottom+=o),u}if(r+="~"+a+"~"+o+"~"+s,n=ml.savedBBoxes[r],n)return rc.extendFlat({},n)}}var l,f;t?l=e:(f=ml.tester.node(),l=e.cloneNode(!0),f.appendChild(l)),pd.select(l).attr("transform",null).call(tz.positionText,0,0);var c=l.getBoundingClientRect(),h=ml.testref.node().getBoundingClientRect();t||f.removeChild(l);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return GO>=aot&&(ml.savedBBoxes={},GO=0),r&&(ml.savedBBoxes[r]=d),GO++,rc.extendFlat({},d)};function Soe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ml.setClipUrl=function(e,t,r){e.attr("clip-path",XO(t,r))};function XO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}ml.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}};ml.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+=KM(t,r),o=o.trim(),e[a]("transform",o),o};ml.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}};ml.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 oot=/\s*sc.*/;ml.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(oot,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var sot=/translate\([^)]*\)\s*$/;ml.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=pd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),u=(i.attr("transform")||"").match(sot);t===1&&r===1?n=[]:n=[KM(o,s),"scale("+t+","+r+")",KM(-o,-s)],u&&n.push(u),i.attr("transform",n.join(""))}})};function YO(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}ml.getMarkerStandoff=YO;var YM=Math.atan2,bb=Math.cos,E3=Math.sin;function Moe(e,t){var r=t[0],n=t[1];return[r*bb(e)-n*E3(e),r*E3(e)+n*bb(e)]}var Eoe,koe,Coe,Loe,WO,jO;function KO(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||rc.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,u=t._yA;if(s&&u)n=s.c2p(e.x),i=u.c2p(e.y);else return 90}if(t._geo){var l=e.lonlat[0],f=e.lonlat[1],c=t._geo.project([l,f+1e-5]),h=t._geo.project([l+1e-5,f]),d=YM(h[1]-i,h[0]-n),p=YM(c[1]-i,c[0]-n),x;if(a==="north")x=r/180*Math.PI;else if(a==="previous"){var b=l/180*Math.PI,y=f/180*Math.PI,E=Eoe/180*Math.PI,k=koe/180*Math.PI,A=E-b,L=bb(k)*E3(A),_=E3(k)*bb(y)-bb(k)*E3(y)*bb(A);x=-YM(L,_)-Math.PI,Eoe=l,koe=f}var C=Moe(d,[bb(x),0]),M=Moe(p,[E3(x),0]);r=YM(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(jO===t.uid&&e.i===WO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(jO===t.uid&&e.i===WO+1&&Ab(n)&&Ab(i)){var v=n-Coe,z=i-Loe,T=t.line&&t.line.shape||"",F=T.slice(T.length-1);F==="h"&&(z=0),F==="v"&&(v=0),r+=YM(z,v)/Math.PI*180+90}else r=null}return Coe=n,Loe=i,WO=e.i,jO=t.uid,r}ml.getMarkerAngle=KO});var Mb=Se((Fir,Woe)=>{"use strict";var k3=Nl(),lot=_u(),uot=Sc(),JO=Ul(),Sb=Zr(),Voe=Sb.strTranslate,rz=yu(),iz=Pl(),C3=Bf(),Hoe=N1(),fot=Qh().OPPOSITE_SIDE,Goe=/ [XY][0-9]* /,$O=1.6,QO=1.6;function cot(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,u=r.avoid||{},l=r.attributes,f=r.transform,c=r.containerGroup,h=1,d=i.title,p=(d&&d.text?d.text:"").trim(),x=!1,b=d&&d.font?d.font:{},y=b.family,E=b.size,k=b.color,A=b.weight,L=b.style,_=b.variant,C=b.textcase,M=b.lineposition,v=b.shadow,z=r.subtitlePropName,T=!!z,F=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},U=q.text.trim(),H=!1,j=1,G=q.font,O=G.family,W=G.size,re=G.color,ne=G.weight,be=G.style,ze=G.variant,Ce=G.textcase,he=G.lineposition,te=G.shadow,ke;a==="title.text"?ke="titleText":a.indexOf("axis")!==-1?ke="axisTitleText":a.indexOf("colorbar"!==-1)&&(ke="colorbarTitleText");var Ee=e._context.edits[ke];function Me(xt,_t){return xt===void 0||_t===void 0?!1:xt.replace(Goe," % ")===_t.replace(Goe," % ")}p===""?h=0:Me(p,o)&&(Ee||(p=""),h=.2,x=!0),T&&(U===""?j=0:Me(U,F)&&(Ee||(U=""),j=.2,H=!0)),r._meta?p=Sb.templateString(p,r._meta):n._meta&&(p=Sb.templateString(p,n._meta));var Oe=p||U||Ee,Re;c||(c=Sb.ensureSingle(n._infolayer,"g","g-"+t),Re=n._hColorbarMoveTitle);var me=c.selectAll("text."+t).data(Oe?[0]:[]);me.enter().append("text"),me.text(p).attr("class",t),me.exit().remove();var Be=null,fe=t+"-subtitle",Ze=U||Ee;if(T&&Ze&&(Be=c.selectAll("text."+fe).data(Ze?[0]:[]),Be.enter().append("text"),Be.text(U).attr("class",fe),Be.exit().remove()),!Oe)return c;function et(xt,_t){Sb.syncOrAsync([gt,Pt],{title:xt,subtitle:_t})}function gt(xt){var _t=xt.title,Ct=xt.subtitle,jt;!f&&Re&&(f={}),f?(jt="",f.rotate&&(jt+="rotate("+[f.rotate,l.x,l.y]+")"),(f.offset||Re)&&(jt+=Voe(0,(f.offset||0)-(Re||0)))):jt=null,_t.attr("transform",jt);function At(je){if(je){var tt=k3.select(je.node().parentNode).select("."+fe);if(!tt.empty()){var Je=je.node().getBBox();if(Je.height){var Mt=Je.y+Je.height+$O*W;tt.attr("y",Mt)}}}}if(_t.style("opacity",h*iz.opacity(k)).call(rz.font,{color:iz.rgb(k),size:k3.round(E,2),family:y,weight:A,style:L,variant:_,textcase:C,shadow:v,lineposition:M}).attr(l).call(C3.convertToTspans,e,At),Ct){var Te=c.select("."+t+"-math-group"),nt=_t.node().getBBox(),ut=Te.node()?Te.node().getBBox():void 0,ct=ut?ut.y+ut.height+$O*W:nt.y+nt.height+QO*W,rt=Sb.extendFlat({},l,{y:ct});Ct.attr("transform",jt),Ct.style("opacity",j*iz.opacity(re)).call(rz.font,{color:iz.rgb(re),size:k3.round(W,2),family:O,weight:ne,style:be,variant:ze,textcase:Ce,shadow:te,lineposition:he}).attr(rt).call(C3.convertToTspans,e)}return uot.previousPromises(e)}function Pt(xt){var _t=xt.title,Ct=k3.select(_t.node().parentNode);if(u&&u.selection&&u.side&&p){Ct.attr("transform",null);var jt=fot[u.side],At=u.side==="left"||u.side==="top"?-1:1,Te=lot(u.pad)?u.pad:2,nt=rz.bBox(Ct.node()),ut={t:0,b:0,l:0,r:0},ct=e._fullLayout._reservedMargin;for(var rt in ct)for(var je in ct[rt]){var tt=ct[rt][je];ut[je]=Math.max(ut[je],tt)}var Je={left:ut.l,top:ut.t,right:n.width-ut.r,bottom:n.height-ut.b},Mt=u.maxShift||At*(Je[u.side]-nt[u.side]),Vt=0;if(Mt<0)Vt=Mt;else{var Kt=u.offsetLeft||0,ir=u.offsetTop||0;nt.left-=Kt,nt.right-=Kt,nt.top-=ir,nt.bottom-=ir,u.selection.each(function(){var Ot=rz.bBox(this);Sb.bBoxIntersect(nt,Ot,Te)&&(Vt=Math.max(Vt,At*(Ot[u.side]-nt[jt])+Te))}),Vt=Math.min(Mt,Vt),i._titleScoot=Math.abs(Vt)}if(Vt>0||Mt<0){var fr={left:[-Vt,0],right:[Vt,0],top:[0,-Vt],bottom:[0,Vt]}[u.side];Ct.attr("transform",Voe(fr[0],fr[1]))}}}me.call(et,Be);function Qe(xt,_t){xt.text(_t).on("mouseover.opacity",function(){k3.select(this).transition().duration(Hoe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k3.select(this).transition().duration(Hoe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(p?me.on(".opacity",null):(Qe(me,o),x=!0),me.call(C3.makeEditable,{gd:e}).on("edit",function(xt){s!==void 0?JO.call("_guiRestyle",e,a,xt,s):JO.call("_guiRelayout",e,a,xt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(et)}).on("input",function(xt){this.text(xt||" ").call(C3.positionText,l.x,l.y)}),T)){if(T&&!p){var Xe=me.node().getBBox(),Tt=Xe.y+Xe.height+QO*W;Be.attr("y",Tt)}U?Be.on(".opacity",null):(Qe(Be,F),H=!0),Be.call(C3.makeEditable,{gd:e}).on("edit",function(xt){JO.call("_guiRelayout",e,"title.subtitle.text",xt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(et)}).on("input",function(xt){this.text(xt||" ").call(C3.positionText,Be.attr("x"),Be.attr("y"))})}return me.classed("js-placeholder",x),Be&&Be.classed("js-placeholder",H),c}Woe.exports={draw:cot,SUBTITLE_PADDING_EM:QO,SUBTITLE_PADDING_MATHJAX_EM:$O}});var gm=Se((qir,Koe)=>{"use strict";var hot=Nl(),dot=e3().utcFormat,xc=Zr(),pot=xc.numberFormat,ym=_u(),n_=xc.cleanNumber,vot=xc.ms2DateTime,joe=xc.dateTime2ms,mm=xc.ensureNumber,Zoe=xc.isArrayOrTypedArray,a_=ju(),nz=a_.FP_SAFE,by=a_.BADNUM,yot=a_.LOG_CLIP,mot=a_.ONEWEEK,az=a_.ONEDAY,oz=a_.ONEHOUR,Xoe=a_.ONEMIN,Yoe=a_.ONESEC,sz=$c(),fz=dd(),lz=fz.HOUR_PATTERN,uz=fz.WEEKDAY_PATTERN;function JM(e){return Math.pow(10,e)}function eN(e){return e!=null}Koe.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(A,L){if(A>0)return Math.log(A)/Math.LN10;if(A<=0&&L&&t.range&&t.range.length===2){var _=t.range[0],C=t.range[1];return .5*(_+C-2*yot*Math.abs(_-C))}else return by}function o(A,L,_,C){if((C||{}).msUTC&&ym(A))return+A;var M=joe(A,_||t.calendar);if(M===by)if(ym(A)){A=+A;var v=Math.floor(xc.mod(A+.05,1)*10),z=Math.round(A-v/10);M=joe(new Date(z))+v/10}else return by;return M}function s(A,L,_){return vot(A,L,_||t.calendar)}function u(A){return t._categories[Math.round(A)]}function l(A){if(eN(A)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[A]!==void 0)return t._categoriesMap[A];t._categories.push(typeof A=="number"?String(A):A);var L=t._categories.length-1;return t._categoriesMap[A]=L,L}return by}function f(A,L){for(var _=new Array(L),C=0;Ct.range[1]&&(_=!_);for(var C=_?-1:1,M=C*A,v=0,z=0;zF)v=z+1;else{v=M<(T+F)/2?z:z+1;break}}var q=t._B[v]||0;return isFinite(q)?p(A,t._m2,q):0},y=function(A){var L=t._rangebreaks.length;if(!L)return x(A,t._m,t._b);for(var _=0,C=0;Ct._rangebreaks[C].pmax&&(_=C+1);return x(A,t._m2,t._B[_])}}t.c2l=t.type==="log"?a:mm,t.l2c=t.type==="log"?JM:mm,t.l2p=b,t.p2l=y,t.c2p=t.type==="log"?function(A,L){return b(a(A,L))}:b,t.p2c=t.type==="log"?function(A){return JM(y(A))}:y,["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(A){return t.l2p(n_(A))},t.p2d=t.p2r=y,t.cleanPos=mm):t.type==="log"?(t.d2r=t.d2l=function(A,L){return a(n_(A),L)},t.r2d=t.r2c=function(A){return JM(n_(A))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=JM,t.d2p=function(A,L){return t.l2p(t.d2r(A,L))},t.p2d=function(A){return JM(y(A))},t.r2p=function(A){return t.l2p(n_(A))},t.p2r=y,t.cleanPos=mm):t.type==="date"?(t.d2r=t.r2d=xc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(A,L,_){return t.l2p(o(A,0,_))},t.p2d=t.p2r=function(A,L,_){return s(y(A),L,_)},t.cleanPos=function(A){return xc.cleanDate(A,by,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=l,t.r2d=t.c2d=t.l2d=u,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=d(A);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=mm,t.r2l=d,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return u(y(A))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(A){return typeof A=="string"&&A!==""?A:mm(A)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=u,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=h(A);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=c,t.l2r=t.c2r=mm,t.r2l=h,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return u(y(A))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(A){return Array.isArray(A)||typeof A=="string"&&A!==""?A:mm(A)},t.setupMultiCategory=function(A){var L=t._traceIndices,_,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var v in M)if(v!==n){var z=r[sz.id2name(v)];L=L.concat(z._traceIndices)}}var T=[[0,{}],[0,{}]],F=[];for(_=0;_z[1]&&(C[v?0:1]=_),C[0]===C[1]){var T=t.l2r(L),F=t.l2r(_);if(L!==void 0){var q=T+1;_!==void 0&&(q=Math.min(q,F)),C[v?1:0]=q}if(_!==void 0){var U=F+1;L!==void 0&&(U=Math.max(U,T)),C[v?0:1]=U}}}},t.cleanRange=function(A,L){t._cleanRange(A,L),t.limitRange(A)},t._cleanRange=function(A,L){L||(L={}),A||(A="range");var _=xc.nestedProperty(t,A).get(),C,M;if(t.type==="date"?M=xc.dfltRange(t.calendar):i==="y"?M=fz.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||fz.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!_||_.length!==2){xc.nestedProperty(t,A).set(M);return}var v=_[0]===null,z=_[1]===null;for(t.type==="date"&&!t.autorange&&(_[0]=xc.cleanDate(_[0],by,t.calendar),_[1]=xc.cleanDate(_[1],by,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!xc.isDateTime(_[C],t.calendar)){t[A]=M;break}if(t.r2l(_[0])===t.r2l(_[1])){var T=xc.constrain(t.r2l(_[0]),xc.MIN_MS+1e3,xc.MAX_MS-1e3);_[0]=t.l2r(T-1e3),_[1]=t.l2r(T+1e3);break}}else{if(!ym(_[C]))if(!(v||z)&&ym(_[1-C]))_[C]=_[1-C]*(C?10:.1);else{t[A]=M;break}if(_[C]<-nz?_[C]=-nz:_[C]>nz&&(_[C]=nz),_[0]===_[1]){var F=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=F,_[1]+=F}}},t.setScale=function(A){var L=r._size;if(t.overlaying){var _=sz.getFromId({_fullLayout:r},t.overlaying);t.domain=_.domain}var C=A&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var v=t.r2l(t[C][0],M),z=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/(v-z),t._b=-t._m*z):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(z-v),t._b=-t._m*v),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var F,q;if(t._rangebreaks=t.locateBreaks(Math.min(v,z),Math.max(v,z)),t._rangebreaks.length){for(F=0;Fz&&(U=!U),U&&t._rangebreaks.reverse();var H=U?-1:1;for(t._m2=H*t._length/(Math.abs(z-v)-t._lBreaks),t._B.push(-t._m2*(T?z:v)),F=0;FM&&(M+=7,vM&&(M+=24,v=C&&v=C&&A=te.min&&(bete.max&&(te.max=ze),Ce=!1)}Ce&&z.push({min:be,max:ze})}};for(_=0;_{"use strict";var Joe=_u(),tN=Zr(),got=ju().BADNUM,cz=tN.isArrayOrTypedArray,_ot=tN.isDateTime,xot=tN.cleanNumber,$oe=Math.round;ese.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(cz(i)&&!i.length)return"-";if(!a&&Sot(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function Qoe(e){return Math.max(1,(e-1)/1e3)}function Aot(e,t){for(var r=e.length,n=Qoe(r),i=0,a=0,o={},s=0;si*2}function Sot(e){return cz(e[0])&&cz(e[1])}});var wy=Se((Oir,lse)=>{"use strict";var Mot=Nl(),nse=_u(),o_=Zr(),hz=ju().FP_SAFE,Eot=Ul(),kot=yu(),ase=$c(),Cot=ase.getFromId,Lot=ase.isLinked;lse.exports={applyAutorangeOptions:sse,getAutoRange:rN,makePadFn:iN,doAutoRange:Pot,findExtremes:Iot,concatExtremes:oN};function rN(e,t){var r,n,i=[],a=e._fullLayout,o=iN(a,t,0),s=iN(a,t,1),u=oN(e,t),l=u.min,f=u.max;if(l.length===0||f.length===0)return o_.simpleMap(t.range,t.r2l);var c=l[0].val,h=f[0].val;for(r=1;r0&&(z=k-o(_)-s(C),z>A?T/z>L&&(M=_,v=C,L=T/z):T/k>L&&(M={val:_.val,nopad:1},v={val:C.val,nopad:1},L=T/k));function F(G,O){return Math.max(G,s(O))}if(c===h){var q=c-1,U=c+1;if(y)if(c===0)i=[0,1];else{var H=(c>0?f:l).reduce(F,0),j=c/(1-Math.min(.5,H/k));i=c>0?[0,j]:[j,0]}else E?i=[Math.max(0,q),Math.max(1,U)]:i=[q,U]}else y?(M.val>=0&&(M={val:0,nopad:1}),v.val<=0&&(v={val:0,nopad:1})):E&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),v.val<=0&&(v={val:1,nopad:1})),L=(v.val-M.val-tse(t,_.val,C.val))/(k-o(M)-s(v)),i=[M.val-L*o(M),v.val+L*s(v)];return i=sse(i,t),t.limitRange&&t.limitRange(),p&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function tse(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),_=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),M=A(r.vpadminus||r.vpad);if(!l){if(E=1/0,k=-1/0,u)for(c=0;c0&&(E=h),h>k&&h-hz&&(E=h),h>k&&h=T;c--)z(c);return{min:n,max:i,opts:r}}function nN(e,t,r,n){ose(e,t,r,n,Dot)}function aN(e,t,r,n){ose(e,t,r,n,Rot)}function ose(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,u=0;u=r&&(l.extrapad||!o)){s=!1;break}else i(t,l.val)&&l.pad<=r&&(o||!l.extrapad)&&(e.splice(u,1),u--)}if(s){var f=a&&t===0;e.push({val:t,pad:f?0:r,extrapad:f?!1:o})}}function ise(e){return nse(e)&&Math.abs(e)=t}function Fot(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&dz(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&dz(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function qot(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&dz(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&dz(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function dz(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=u&&(a=u,r=u),o<=u&&(o=u,n=u)}}return r=Fot(r,t),n=qot(n,t),[r,n]}});var hu=Se((Nir,Lse)=>{"use strict";var w0=Nl(),Rh=_u(),z3=Sc(),QM=Ul(),zu=Zr(),P3=zu.strTranslate,Eb=Bf(),Bot=Mb(),e5=Pl(),Xv=yu(),Oot=Rd(),use=LO(),Qd=ju(),Not=Qd.ONEMAXYEAR,yz=Qd.ONEAVGYEAR,mz=Qd.ONEMINYEAR,Uot=Qd.ONEMAXQUARTER,fN=Qd.ONEAVGQUARTER,gz=Qd.ONEMINQUARTER,Vot=Qd.ONEMAXMONTH,I3=Qd.ONEAVGMONTH,_z=Qd.ONEMINMONTH,Yv=Qd.ONEWEEK,Fp=Qd.ONEDAY,s_=Fp/2,xm=Qd.ONEHOUR,t5=Qd.ONEMIN,xz=Qd.ONESEC,Hot=Qd.ONEMILLI,Got=Qd.ONEMICROSEC,kb=Qd.MINUS_SIGN,Tz=Qd.BADNUM,cN={K:"zeroline"},hN={K:"gridline",L:"path"},dN={K:"minor-gridline",L:"path"},xse={K:"tick",L:"path"},fse={K:"tick",L:"text"},cse={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Az=Qh(),$M=Az.MID_SHIFT,Cb=Az.CAP_SHIFT,r5=Az.LINE_SPACING,Wot=Az.OPPOSITE_SIDE,bz=3,Is=Lse.exports={};Is.setConvert=gm();var jot=L3(),Ag=$c(),Zot=Ag.idSort,Xot=Ag.isLinked;Is.id2name=Ag.id2name;Is.name2id=Ag.name2id;Is.cleanId=Ag.cleanId;Is.list=Ag.list;Is.listIds=Ag.listIds;Is.getFromId=Ag.getFromId;Is.getFromTrace=Ag.getFromTrace;var bse=wy();Is.getAutoRange=bse.getAutoRange;Is.findExtremes=bse.findExtremes;var Yot=1e-4;function mN(e){var t=(e[1]-e[0])*Yot;return[e[0]-t,e[1]+t]}Is.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],u=n+"ref",l={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(f){return f+" domain"})),l[u]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},zu.coerce(e,t,l,u)};Is.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Is.coercePosition=function(e,t,r,n,i,a){var o,s,u=Is.getRefType(n);if(u!=="range")o=zu.ensureNumber,s=r(i,a);else{var l=Is.getFromId(t,n);a=l.fraction2r(a),s=r(i,a),o=l.cleanPos}e[i]=o(s)};Is.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?zu.ensureNumber:Is.getFromId(t,r).cleanPos;return n(e)};Is.redrawComponents=function(e,t){t=t||Is.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var u=QM.getComponentMethod(i,a),l={},f=0;f2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Is.saveRangeInitial=function(e,t){for(var r=Is.list(e,"",!0),n=!1,i=0;ic*.3||l(n)||l(i))){var h=r.dtick/2;e+=e+ho){var s=Number(r.substr(1));a.exactYears>o&&s%12===0?e=Is.tickIncrement(e,"M6","reverse")+Fp*1.5:a.exactMonths>o?e=Is.tickIncrement(e,"M1","reverse")+Fp*15.5:e-=s_;var u=Is.tickIncrement(e,r);if(u<=n)return u}return e}Is.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&Rh(t._tmin),i;if(n){var a=Is.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=zu.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=zu.simpleMap(i,t.l2r),e._isMinor=!0,Is.prepTicks(e,r),n){var s=Rh(t.dtick),u=Rh(e.dtick),l=s?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);s&&u?sN(l,f)?l===2*Yv&&f===2*Fp&&(e.dtick=Yv):l===2*Yv&&f===3*Fp?e.dtick=Yv:l===Yv&&!(t._input.minor||{}).nticks?e.dtick=Fp:pse(l/f,2.5)?e.dtick=l/2:e.dtick=l:String(t.dtick).charAt(0)==="M"?u?e.dtick="M1":sN(l,f)?l>=12&&f===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?sN(l,f)||(e.dtick=pse(l/f,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 sN(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function pse(e,t){return Math.abs(e/t-1)<.001}Is.prepTicks=function(e,t){var r=zu.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?zu.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=zu.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,Is.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,u=e[o].value,l=Math.abs(u-s),f=r||l,c=0;f>=mz?l>=mz&&l<=Not?c=l:c=yz:r===fN&&f>=gz?l>=gz&&l<=Uot?c=l:c=fN:f>=_z?l>=_z&&l<=Vot?c=l:c=I3:r===Yv&&f>=Yv?c=Yv:f>=Fp?c=Fp:r===s_&&f>=s_?c=s_:r===xm&&f>=xm&&(c=xm);var h;c>=l&&(c=l,h=!0);var d=i+c;if(t.rangebreaks&&c>0){for(var p=84,x=0,b=0;bYv&&(c=l)}(c>0||n===0)&&(e[n].periodX=i+c/2)}}Is.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],u=!t.ticklabelindex||zu.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],l=zu.simpleMap(t.range,t.r2l,void 0,void 0,r),f=l[1]=(k?0:1);A--){var L=!A;A?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var _=A?t:zu.extendFlat({},t,t.minor);if(L?Is.prepMinorTicks(_,t,r):Is.prepTicks(_,r),_.tickmode==="array"){A?(b=[],p=vse(t,!L)):(y=[],x=vse(t,!L));continue}if(_.tickmode==="sync"){b=[],p=tst(t);continue}var C=mN(l),M=C[0],v=C[1],z=Rh(_.dtick),T=n==="log"&&!(z||_.dtick.charAt(0)==="L"),F=Is.tickFirst(_,r);if(A){if(t._tmin=F,F=v:U<=v;U=Is.tickIncrement(U,G,f,i)){if(A&&H++,_.rangebreaks&&!f){if(U=h)break}if(b.length>d||U===q)break;q=U;var O={value:U};A?(T&&U!==(U|0)&&(O.simpleLabel=!0),a>1&&H%a&&(O.skipLabel=!0),b.push(O)):(O.minor=!0,y.push(O))}}if(!y||y.length<2)u=!1;else{var W=(y[1].value-y[0].value)*(s?-1:1);Sst(W,t.tickformat)||(u=!1)}if(!u)E=b;else{var re=b.concat(y);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Tt,xt){return Tt.value-xt.value}).filter(function(Tt,xt,_t){return xt===0||Tt.value!==_t[xt-1].value});var ne=re.map(function(Tt,xt){return Tt.minor===void 0&&!Tt.skipLabel?xt:null}).filter(function(Tt){return Tt!==null});ne.forEach(function(Tt){u.map(function(xt){var _t=Tt+xt;_t>=0&&_t-1;Oe--){if(b[Oe].drop){b.splice(Oe,1);continue}b[Oe].value=uN(b[Oe].value,t);var fe=t.c2p(b[Oe].value);(Re?Be>fe-me:Beh||Cth&&(_t.periodX=h),Cti&&hyz)t/=yz,n=i(10),e.dtick="M"+12*_m(t,n,pz);else if(a>I3)t/=I3,e.dtick="M"+_m(t,1,yse);else if(a>Fp){if(e.dtick=_m(t,Fp,e._hasDayOfWeekBreaks?[1,2,7,14]:rst),!r){var o=Is.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=zu.dateTick0(e.calendar,2):e.tick0=zu.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,yse):a>t5?e.dtick=_m(t,t5,mse):a>xz?e.dtick=_m(t,xz,mse):(n=i(10),e.dtick=_m(t,n,pz))}else if(e.type==="log"){e.tick0=0;var u=zu.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var l=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/l,n=i(10),e.dtick="L"+_m(t,n,pz)}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))):xN(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,ist)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,pz));if(e.dtick===0&&(e.dtick=1),!Rh(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function Sse(e){var t=e.dtick;if(e._tickexponent=0,!Rh(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.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=Fp&&i<=10||t>=Fp*15)e._tickround="d";else if(t>=t5&&i<=16||t>=xm)e._tickround="M";else if(t>=xz&&i<=19||t>=t5)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(Rh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Rh(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),u=Math.floor(Math.log(s)/Math.LN10+.01),l=e.minexponent===void 0?3:e.minexponent;Math.abs(u)>l&&(wz(e.exponentformat)&&!gN(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}Is.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(Rh(t))return zu.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.substr(1));if(a==="M")return zu.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Ase:Tse,u=e+i*.01,l=zu.roundUp(zu.mod(u,1),s,r);return Math.floor(u)+Math.log(w0.round(Math.pow(10,l),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Is.tickFirst=function(e,t){var r=e.r2l||Number,n=zu.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&y<=e._length?b:null};if(a&&zu.isArrayOrTypedArray(e.ticktext)){var c=zu.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(l=0;l"+s;else{var l=n5(e),f=e._trueSide||e.side;(!l&&f==="top"||l&&f==="bottom")&&(o+="
")}t.text=o}function ast(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,u=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&u!=="L"&&(a="L3",u="L"),s||u==="L")t.text=i5(Math.pow(10,o),e,i,n);else if(Rh(a)||u==="D"&&zu.mod(o+.01,1)<.1){var l=Math.round(o),f=Math.abs(l),c=e.exponentformat;c==="power"||wz(c)&&gN(l)?(l===0?t.text=1:l===1?t.text="10":t.text="10"+(l>1?"":kb)+f+"",t.fontSize*=1.25):(c==="e"||c==="E")&&f>2?t.text="1"+c+(l>0?"+":kb)+f:(t.text=i5(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(u==="D")t.text=String(Math.round(Math.pow(10,zu.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var h=String(t.text).charAt(0);(h==="0"||h==="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 ost(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function sst(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 lst(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=i5(t.x,e,i,n)}function ust(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=fst(a);if(o[1]>=100)t.text=i5(zu.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=kb+t.text)}}}else t.text=i5(t.x,e,i,n)}function fst(e){function t(s,u){return Math.abs(s-u)<=1e-6}function r(s,u){return t(u,0)?s:r(u,s%u)}function n(s){for(var u=1;!t(Math.round(s*u)/u,s);)u*=10;return u}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var cst=["f","p","n","\u03BC","m","","k","M","G","T"];function wz(e){return e==="SI"||e==="B"}function gN(e){return e>14||e<-15}function i5(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,u=Is.getTickFormat(t),l=t.separatethousands;if(n){var f={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Rh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Sse(f),a=(Number(f._tickround)||0)+4,s=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,kb);var c=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+p+"":o==="B"&&s===9?e+="B":wz(o)&&(e+=cst[s/3+5])}return i?kb+e:e}Is.getTickFormat=function(e){var t;function r(u){return typeof u!="string"?u:Number(u.replace("M",""))*I3}function n(u,l){var f=["L","D"];if(typeof u==typeof l){if(typeof u=="number")return u-l;var c=f.indexOf(u.charAt(0)),h=f.indexOf(l.charAt(0));return c===h?Number(u.replace(/(L|D)/g,""))-Number(l.replace(/(L|D)/g,"")):c-h}else return typeof u=="number"?1:-1}function i(u,l,f){var c=f||function(p){return p},h=l[0],d=l[1];return(!h&&typeof h!="number"||c(h)<=c(u))&&(!d&&typeof d!="number"||c(d)>=c(u))}function a(u,l){var f=l[0]===null,c=l[1]===null,h=n(u,l[0])>=0,d=n(u,l[1])<=0;return(f||h)&&(c||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(f,1).shift())}});var s={false:{left:0,right:0}};return zu.syncOrAsync(i.map(function(u){return function(){if(u){var l=Is.getFromId(e,u);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var f=Is.drawOne(e,l,r);return l._shiftPusher&&yN(l,l._fullDepth||0,s,!0),l._r=l.range.slice(),l._rl=zu.simpleMap(l._r,l.r2l),f}}}))};Is.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var u=e._fullLayout,l=t._id,f=l.charAt(0),c=Is.counterLetter(l),h=u._plots[t._mainSubplot];if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),yN(t,d,n,!0),yN(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Ast(t,n));var p=h[f+"axislayer"],x=t._mainLinePosition,b=x+=t._shift,y=t._mainMirrorPosition,E=t._vals=Is.calcTicks(t),k=[t.mirror,b,y].join("_");for(a=0;a0?_t.bottom-Tt:0,xt))));var Te=0,nt=0;if(t._shiftPusher&&(Te=Math.max(xt,_t.height>0?Qe==="l"?Tt-_t.left:_t.right-Tt:0),t.title.text!==u._dfltTitle[f]&&(nt=(t._titleStandoff||0)+(t._titleScoot||0),Qe==="l"&&(nt+=_se(t))),t._fullDepth=Math.max(Te,nt)),t.automargin){Ct={x:0,y:0,r:0,l:0,t:0,b:0};var ut=[0,1],ct=typeof t._shift=="number"?t._shift:0;if(f==="x"){if(Qe==="b"?Ct[Qe]=t._depth:(Ct[Qe]=t._depth=Math.max(_t.width>0?Tt-_t.top:0,xt),ut.reverse()),_t.width>0){var rt=_t.right-(t._offset+t._length);rt>0&&(Ct.xr=1,Ct.r=rt);var je=t._offset-_t.left;je>0&&(Ct.xl=0,Ct.l=je)}}else if(Qe==="l"?(t._depth=Math.max(_t.height>0?Tt-_t.left:0,xt),Ct[Qe]=t._depth-ct):(t._depth=Math.max(_t.height>0?_t.right-Tt:0,xt),Ct[Qe]=t._depth+ct,ut.reverse()),_t.height>0){var tt=_t.bottom-(t._offset+t._length);tt>0&&(Ct.yb=0,Ct.b=tt);var Je=t._offset-_t.top;Je>0&&(Ct.yt=1,Ct.t=Je)}Ct[c]=t.anchor==="free"?t.position:t._anchorAxis.domain[ut[0]],t.title.text!==u._dfltTitle[f]&&(Ct[Qe]+=_se(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(jt={x:0,y:0,r:0,l:0,t:0,b:0},jt[Xe]=t.linewidth,t.mirror&&t.mirror!==!0&&(jt[Xe]+=xt),t.mirror===!0||t.mirror==="ticks"?jt[c]=t._anchorAxis.domain[ut[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(jt[c]=[t._counterDomainMin,t._counterDomainMax][ut[1]]))}Pt&&(At=QM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(gse(Ct,t.automargin),gse(jt,t.automargin)),z3.autoMargin(e,_N(t),Ct),z3.autoMargin(e,kse(t),jt),z3.autoMargin(e,Cse(t),At)}),zu.syncOrAsync(et)}};function gse(e,t){if(e){var r=Object.keys(cse).reduce(function(n,i){return t.indexOf(i)!==-1&&cse[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 hst(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(zu.extendFlat({},a,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,u=!s;if(r){var l=o?-1:1;r=r*l}if(n){var f=e.side,c=s&&(f==="top"||f==="left")||u&&(f==="bottom"||f==="right")?1:-1;n=n*c}return e._id.charAt(0)==="x"?function(h){return P3(i+e._offset+e.l2p(pN(h))+r,a+n)}:function(h){return P3(a+n,i+e._offset+e.l2p(pN(h))+r)}};function pN(e){return e.periodX!==void 0?e.periodX:e.x}function yst(e){var t=e.ticklabelposition||"",r=function(d){return t.indexOf(d)!==-1},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),u=o||i||n||a;if(!u&&!s)return[0,0];var l=e.side,f=u?(e.tickwidth||0)/2:0,c=bz,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(f+=h*Cb,c+=(e.linewidth||0)/2),(i||a)&&(f+=(e.linewidth||0)/2,c+=bz),s&&l==="top"&&(c-=h*(1-Cb)),(i||n)&&(f=-f),(l==="bottom"||l==="right")&&(c=-c),[u?f:0,s?c:0]}Is.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};Is.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(F){return n.indexOf(F)!==-1},a=i("top"),o=i("left"),s=i("right"),u=i("bottom"),l=u||o||a||s,f=i("inside"),c=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:l&&(p=0),c&&(h+=p,r)){var x=zu.deg2rad(r);h=p*Math.cos(x)+1,d=p*Math.sin(x)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var b={labelStandoff:h,labelShift:d},y,E,k,A,L=0,_=e.side,C=e._id.charAt(0),M=e.tickangle,v;if(C==="x")v=!f&&_==="bottom"||f&&_==="top",A=v?1:-1,f&&(A*=-1),y=d*A,E=t+h*A,k=v?1:-.2,Math.abs(M)===90&&(f?k+=$M:M===-90&&_==="bottom"?k=Cb:M===90&&_==="top"?k=$M:k=.5,L=$M/2*(M/90)),b.xFn=function(F){return F.dx+y+L*F.fontSize},b.yFn=function(F){return F.dy+E+F.fontSize*k},b.anchorFn=function(F,q){if(l){if(o)return"end";if(s)return"start"}return!Rh(q)||q===0||q===180?"middle":q*A<0!==f?"end":"start"},b.heightFn=function(F,q,U){return q<-60||q>60?-.5*U:e.side==="top"!==f?-U:0};else if(C==="y"){if(v=!f&&_==="left"||f&&_==="right",A=v?1:-1,f&&(A*=-1),y=h,E=d*A,k=0,!f&&Math.abs(M)===90&&(M===-90&&_==="left"||M===90&&_==="right"?k=Cb:k=.5),f){var z=Rh(M)?+M:0;if(z!==0){var T=zu.deg2rad(z);L=Math.abs(Math.sin(T))*Cb*A,k=0}}b.xFn=function(F){return F.dx+t-(y+F.fontSize*k)*A+L*F.fontSize},b.yFn=function(F){return F.dy+E+F.fontSize*$M},b.anchorFn=function(F,q){return Rh(q)&&Math.abs(q)===90?"middle":v?"end":"start"},b.heightFn=function(F,q,U){return e.side==="right"&&(q*=-1),q<-30?-U:q<30?-.5*U:0}}return b};function Sz(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Is.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,Sz);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return e5.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xv.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Mz(t,[xse]),a.attr("transform",r.transFn)};Is.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(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Is.shouldShowZeroLine(e,t,s))for(var u=t.tickmode==="array",l=0;l=0;p--){var x=p?h:d;if(x){var b=x.selectAll("path."+n).data(p?o:a,Sz);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(y){return e5.stroke(w0.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return Xv.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?c:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}Mz(t,[hN,dN])}};Is.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=Is.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 Zot(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(e5.stroke,t.zerolinecolor||e5.defaultLine).style("stroke-width",Xv.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Mz(t,[cN])};Is.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=r.cls||i+"tick",o=r.vals.filter(function(O){return O.text}),s=r.labelFns,u=r.secondary?0:t.tickangle,l=(t._prevTickAngles||{})[a],f=r.layer.selectAll("g."+a).data(t.showticklabels?o:[],Sz),c=[];f.enter().append("g").classed(a,1).append("text").attr("text-anchor","middle").each(function(O){var W=w0.select(this),re=e._promises.length;W.call(Eb.positionText,s.xFn(O),s.yFn(O)).call(Xv.font,{family:O.font,size:O.fontSize,color:O.fontColor,weight:O.fontWeight,style:O.fontStyle,variant:O.fontVariant,textcase:O.fontTextcase,lineposition:O.fontLineposition,shadow:O.fontShadow}).text(O.text).call(Eb.convertToTspans,e),e._promises[re]?c.push(e._promises.pop().then(function(){h(W,u)})):h(W,u)}),Mz(t,[fse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(O){w0.select(this).select("text").call(Eb.positionText,s.xFn(O),s.yFn(O))});function h(O,W){O.each(function(re){var ne=w0.select(this),be=ne.select(".text-math-group"),ze=s.anchorFn(re,W),Ce=r.transFn.call(ne.node(),re)+(Rh(W)&&+W!=0?" rotate("+W+","+s.xFn(re)+","+(s.yFn(re)-re.fontSize/2)+")":""),he=Eb.lineCount(ne),te=r5*re.fontSize,ke=s.heightFn(re,Rh(W)?+W:0,(he-1)*te);if(ke&&(Ce+=P3(0,ke)),be.empty()){var Ee=ne.select("text");Ee.attr({transform:Ce,"text-anchor":ze}),Ee.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Me=Xv.bBox(be.node()).width,Oe=Me*{end:-.5,start:.5}[ze];be.attr("transform",Ce+P3(Oe,0))}})}t._adjustTickLabelsOverflow=function(){var O=t.ticklabeloverflow;if(!(!O||O==="allow")){var W=O.indexOf("hide")!==-1,re=t._id.charAt(0)==="x",ne=0,be=re?e._fullLayout.width:e._fullLayout.height;if(O.indexOf("domain")!==-1){var ze=zu.simpleMap(t.range,t.r2l);ne=t.l2p(ze[0])+t._offset,be=t.l2p(ze[1])+t._offset}var Ce=Math.min(ne,be),he=Math.max(ne,be),te=t.side,ke=1/0,Ee=-1/0;f.each(function(me){var Be=w0.select(this),fe=Be.select(".text-math-group");if(fe.empty()){var Ze=Xv.bBox(Be.node()),et=0;re?(Ze.right>he||Ze.lefthe||Ze.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+ze._id]?me.style("display","none"):he.K==="tick"&&!Ce&&me.style("display",null)})})})})},h(f,l+1?l:u);function d(){return c.length&&Promise.all(c)}var p=null;function x(){if(h(f,u),o.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){p=t.autotickangles[0];var O=0,W=[],re,ne=1;f.each(function(_t){O=Math.max(O,_t.fontSize);var Ct=t.l2p(_t.x),jt=vN(this),At=Xv.bBox(jt.node());ne=Math.max(ne,Eb.lineCount(jt)),W.push({top:0,bottom:10,height:10,left:Ct-At.width/2,right:Ct+At.width/2+2,width:At.width+2})});var be=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ze=o.length,Ce=Math.abs((o[ze-1].x-o[0].x)*t._m)/(ze-1),he=be?Ce/2:Ce,te=be?t.ticklen:O*1.25*ne,ke=Math.sqrt(Math.pow(he,2)+Math.pow(te,2)),Ee=he/ke,Me=t.autotickangles.map(function(_t){return _t*Math.PI/180}),Oe=Me.find(function(_t){return Math.abs(Math.cos(_t))<=Ee});Oe===void 0&&(Oe=Me.reduce(function(_t,Ct){return Math.abs(Math.cos(_t))H*U&&(T=U,M[C]=v[C]=F[C])}var j=Math.abs(T-z);j-A>0?(j-=A,A*=1+A/j):A=0,t._id.charAt(0)!=="y"&&(A=-A),M[_]=E.p2r(E.r2p(v[_])+L*A),E.autorange==="min"||E.autorange==="max reversed"?(M[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange==="max"||E.autorange==="min reversed")&&(M[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+".range"]=M}var G=zu.syncOrAsync(b);return G&&G.then&&e._promises.push(G),G};function mst(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,Sz);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(e5.stroke,t.dividercolor).style("stroke-width",Xv.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Is.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 _se(e){var t=e.title.font.size,r=(e.title.text.match(Eb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Cb+r*r5):r?t*(r+1)*r5:t}function gst(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Eb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Cb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*($M+s*r5));else{var u=n5(t);if(t.type==="multicategory")o=t._depth;else{var l=1.5*a;u&&(l=.5*a,t.ticks==="outside"&&(l+=t.ticklen)),o=10+l+(t.linewidth?t.linewidth-1:0)}u||(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 f=Is.getPxPosition(e,t),c,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?f-o:f+o):(d=t._offset+t._length/2,h=t.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var x=t._selections[t._id+"tick"];if(p={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var b=Xv.getTranslate(x.node().parentNode);p.offsetLeft=b.x,p.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,Bot.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}Is.shouldShowZeroLine=function(e,t,r){var n=zu.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===Tz)&&(Ese(t,0)||!_st(e,t,r,n)||xst(e,t))};Is.clipEnds=function(e,t){return t.filter(function(r){return Ese(e,r.x)})};function Ese(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=Got:/%L/.test(t)?e>=Hot:/%[SX]/.test(t)?e>=xz:/%M/.test(t)?e>=t5:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=Fp:/%[UVW]/.test(t)?e>=Yv:/%[Bbm]/.test(t)?e>=_z:/%[q]/.test(t)?e>=gz:/%[Yy]/.test(t)?e>=mz:!0}});var bN=Se((Uir,zse)=>{"use strict";zse.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),u=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),u===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var wN=Se((Vir,Pse)=>{"use strict";var Mst=bN();Pse.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 u;!i.noInsiderange&&o!=="log"&&(u=n("insiderange"),u&&(u[0]===null||u[1]===null)&&(r.insiderange=!1,u=void 0),u&&(s=n("range",u)))}var l=r.getAutorangeDflt(s,i),f=n("autorange",l),c;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(f==="reversed"||f===!0)||s[0]!==null&&(f==="min"||f==="max reversed")||s[1]!==null&&(f==="max"||f==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,c=!0),c||(l=r.getAutorangeDflt(s,i),f=n("autorange",l)),f&&(Mst(n,f,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Dse=Se((Hir,Ise)=>{var Est={left:0,top:0};Ise.exports=kst;function kst(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=Cst(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Cst(e){return e===window||e===document||e===document.body?Est:e.getBoundingClientRect()}});var Ez=Se((Gir,Rse)=>{"use strict";var Lst=aO();function zst(){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}Rse.exports=Lst&&zst()});var qse=Se((Wir,Fse)=>{"use strict";Fse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),u=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?u:a==="right"||a==="top"?s:o<2/3-u?o:s>4/3-u?s:u}});var Nse=Se((jir,Ose)=>{"use strict";var Bse=Zr(),Pst=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Ose.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Bse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Bse.constrain(Math.floor(r*3),0,2),Pst[r][t]}});var Vse=Se((Zir,Use)=>{"use strict";var Ist=y3(),Dst=LL(),Rst=DM().getGraphDiv,Fst=PM(),TN=Use.exports={};TN.wrapped=function(e,t,r){e=Rst(e),e._fullLayout&&Dst.clear(e._fullLayout._uid+Fst.HOVERID),TN.raw(e,t,r)};TN.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Ist.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 gp=Se((Xir,Wse)=>{"use strict";var qst=Dse(),AN=sO(),Bst=Ez(),Ost=Zr().removeElement,Nst=dd(),Lb=Wse.exports={};Lb.align=qse();Lb.getCursor=Nse();var Hse=Vse();Lb.unhover=Hse.wrapped;Lb.unhoverRaw=Hse.raw;Lb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,u,l,f,c,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,Bst?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function p(k,A,L){return Math.abs(k)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(n,c),!d){var A;try{A=new MouseEvent("click",k)}catch(_){var L=SN(k);A=document.createEvent("MouseEvents"),A.initMouseEvent("click",k.bubbles,k.cancelable,k.view,k.detail,k.screenX,k.screenY,L[0],L[1],k.ctrlKey,k.altKey,k.shiftKey,k.metaKey,k.button,k.relatedTarget)}h.dispatchEvent(A)}r._dragging=!1,r._dragged=!1}};function Gse(){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}Lb.coverSlip=Gse;function SN(e){return qst(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Ty=Se((Yir,jse)=>{"use strict";jse.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 Yse=Se((Kir,Xse)=>{"use strict";var MN=Ty(),a5="data-savedcursor",Zse="!!";Xse.exports=function(t,r){var n=t.attr(a5);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var EN=uc(),Ust=Ih();Kse.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Ust.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:EN({editType:"legend"}),grouptitlefont:EN({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:EN({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Cz=Se(kz=>{"use strict";kz.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};kz.isVertical=function(t){return t.orientation!=="h"};kz.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var zN=Se((Qir,Jse)=>{"use strict";var CN=Ul(),Kv=Zr(),Vst=_f(),Hst=zf(),Gst=kN(),Wst=s3(),LN=Cz();function jst(e,t,r,n){var i=t[e]||{},a=Vst.newContainer(r,e);function o(G,O){return Kv.coerce(i,a,Gst,G,O)}var s=Kv.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var u=o("visible");if(u){for(var l,f=function(G,O){var W=l._input,re=l;return Kv.coerce(W,re,Hst,G,O)},c=r.font||{},h=Kv.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,x="normal",b=(r.shapes||[]).filter(function(G){return G.showlegend}),y=n.concat(b).filter(function(G){return e===(G.legend||"legend")}),E=0;E(e==="legend"?1:0));if(A===!1&&(r[e]=void 0),!(A===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),A!==!1)){o("borderwidth");var L=o("orientation"),_=o("yref"),C=o("xref"),M=L==="h",v=_==="paper",z=C==="paper",T,F,q,U="left";M?(T=0,CN.getComponentMethod("rangeslider","isVisible")(t.xaxis)?v?(F=1.1,q="bottom"):(F=1,q="top"):v?(F=-.1,q="top"):(F=0,q="bottom")):(F=1,q="auto",z?T=1.02:(T=1,U="right")),Kv.coerce(i,a,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:T}},"x"),Kv.coerce(i,a,{y:{valType:"number",editType:"legend",min:v?-2:0,max:v?3:1,dflt:F}},"y"),o("traceorder",x),LN.isGrouped(r[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",U),o("yanchor",q),o("valign"),Kv.noneOrAll(i,a,["x","y"]);var H=o("title.text");if(H){o("title.side",M?"left":"top");var j=Kv.extendFlat({},s,{size:Kv.bigFont(s.size)});Kv.coerceFont(o,"title.font",j)}}}}Jse.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var D3=Ul(),IN=Zr(),Zst=IN.pushUnique,PN=!0;$se.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"&&PN&&r.data&&r._context.showTips&&IN.notifier(IN._(r,"Double-click on legend to isolate one trace"),"long"),PN=!1;var u;if(n===1?u=a:n===2&&(u=o),!u)return;var l=s==="togglegroup",f=i.hiddenlabels?i.hiddenlabels.slice():[],c=t.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=r._fullData,d=(i.shapes||[]).filter(function(Tt){return Tt.showlegend}),p=h.concat(d),x=c.trace;x._isShape&&(x=x._fullInput);var b=x.legendgroup,y,E,k,A,L,_,C={},M=[],v=[],z=[];function T(Tt,xt){var _t=M.indexOf(Tt),Ct=C.visible;return Ct||(Ct=C.visible=[]),M.indexOf(Tt)===-1&&(M.push(Tt),_t=M.length-1),Ct[_t]=xt,_t}var F=(i.shapes||[]).map(function(Tt){return Tt._input}),q=!1;function U(Tt,xt){F[Tt].visible=xt,q=!0}function H(Tt,xt){if(!(c.groupTitle&&!l)){var _t=Tt._fullInput||Tt,Ct=_t._isShape,jt=_t.index;jt===void 0&&(jt=_t._index);var At=_t.visible===!1?!1:xt;Ct?U(jt,At):T(jt,At)}}var j=x.legend,G=x._fullInput,O=G&&G._isShape;if(!O&&D3.traceIs(x,"pie-like")){var W=c.label,re=f.indexOf(W);if(u==="toggle")re===-1?f.push(W):f.splice(re,1);else if(u==="toggleothers"){var ne=re!==-1,be=[];for(y=0;y{"use strict";ele.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var ile=Se((rnr,rle)=>{"use strict";var tle=Ul(),RN=Cz();rle.exports=function(t,r,n){var i=r._inHover,a=RN.isGrouped(r),o=RN.isReversed(r),s={},u=[],l=!1,f={},c=0,h=0,d,p;function x(G,O,W){if(r.visible!==!1&&!(n&&G!==r._id))if(O===""||!RN.isGrouped(r)){var re="~~i"+c;u.push(re),s[re]=[W],c++}else u.indexOf(O)===-1?(u.push(O),l=!0,s[O]=[W]):s[O].push(W)}for(d=0;dz&&(v=z)}C[d][0]._groupMinRank=v,C[d][0]._preGroupSort=d}var T=function(G,O){return G[0]._groupMinRank-O[0]._groupMinRank||G[0]._preGroupSort-O[0]._preGroupSort},F=function(G,O){return G.trace.legendrank-O.trace.legendrank||G._preSort-O._preSort};for(C.forEach(function(G,O){G[0]._preGroupSort=O}),C.sort(T),d=0;d{"use strict";var Lz=Zr();function nle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}zb.formatPiePercent=function(t,r){var n=nle((t*100).toPrecision(3));return Lz.numSeparate(n,r)+"%"};zb.formatPieValue=function(t,r){var n=nle(t.toPrecision(10));return Lz.numSeparate(n,r)};zb.getFirstFilled=function(t,r){if(Lz.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var Xst=yu(),Yst=Pl();ale.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?Xst.pointStyle(t,n,i,r):Yst.fill(t,r.color)}});var R3=Se((anr,ule)=>{"use strict";var sle=Pl(),lle=l_().castOption,Kst=ole();ule.exports=function(t,r,n,i){var a=n.marker.line,o=lle(a.color,r.pts)||sle.defaultLine,s=lle(a.width,r.pts)||0;t.call(Kst,r,n,i).style("stroke-width",s).call(sle.stroke,o)}});var ON=Se((onr,vle)=>{"use strict";var qp=Nl(),FN=Ul(),_p=Zr(),fle=_p.strTranslate,iv=yu(),T0=Pl(),qN=Dp().extractOpts,zz=ec(),Jst=R3(),$st=l_().castOption,Qst=DN(),cle=12,hle=5,Pb=2,elt=10,F3=5;vle.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+Qst.itemGap*2)/2,u=fle(s,0),l=function(C,M,v,z){var T;if(C+1)T=C;else if(M&&M.width>0)T=M.width;else return 0;return a?z:Math.min(T,v)};t.each(function(C){var M=qp.select(this),v=_p.ensureSingle(M,"g","layers");v.style("opacity",C[0].trace.opacity);var z=n.indentation,T=n.valign,F=C[0].lineHeight,q=C[0].height;if(T==="middle"&&z===0||!F||!q)v.attr("transform",null);else{var U={top:1,bottom:-1}[T],H=U*(.5*(F-q+3))||0,j=n.indentation;v.attr("transform",fle(j,H))}var G=v.selectAll("g.legendfill").data([C]);G.enter().append("g").classed("legendfill",!0);var O=v.selectAll("g.legendlines").data([C]);O.enter().append("g").classed("legendlines",!0);var W=v.selectAll("g.legendsymbols").data([C]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(_).each(h).each(p).each(d).each(b).each(A).each(k).each(f).each(c).each(y).each(E);function f(C){var M=dle(C),v=M.showFill,z=M.showLine,T=M.showGradientLine,F=M.showGradientFill,q=M.anyFill,U=M.anyLine,H=C[0],j=H.trace,G,O,W=qN(j),re=W.colorscale,ne=W.reversescale,be=function(Me){if(Me.size())if(v)iv.fillGroupStyle(Me,r,!0);else{var Oe="legendfill-"+j.uid;iv.gradient(Me,r,Oe,BN(ne),re,"fill")}},ze=function(Me){if(Me.size()){var Oe="legendline-"+j.uid;iv.lineGroupStyle(Me),iv.gradient(Me,r,Oe,BN(ne),re,"stroke")}},Ce=zz.hasMarkers(j)||!q?"M5,0":U?"M5,-2":"M5,-3",he=qp.select(this),te=he.select(".legendfill").selectAll("path").data(v||F?[C]:[]);if(te.enter().append("path").classed("js-fill",!0),te.exit().remove(),te.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(be),z||T){var ke=l(void 0,j.line,elt,hle);O=_p.minExtend(j,{line:{width:ke}}),G=[_p.minExtend(H,{trace:O})]}var Ee=he.select(".legendlines").selectAll("path").data(z||T?[G]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",Ce+(T?"l"+o+",0.0001":"h"+o)).call(z?iv.lineGroupStyle:ze)}function c(C){var M=dle(C),v=M.anyFill,z=M.anyLine,T=M.showLine,F=M.showMarker,q=C[0],U=q.trace,H=!F&&!z&&!v&&zz.hasText(U),j,G;function O(te,ke,Ee,Me){var Oe=_p.nestedProperty(U,te).get(),Re=_p.isArrayOrTypedArray(Oe)&&ke?ke(Oe):Oe;if(a&&Re&&Me!==void 0&&(Re=Me),Ee){if(ReEe[1])return Ee[1]}return Re}function W(te){return q._distinct&&q.index&&te[q.index]?te[q.index]:te[0]}if(F||H||T){var re={},ne={};if(F){re.mc=O("marker.color",W),re.mx=O("marker.symbol",W),re.mo=O("marker.opacity",_p.mean,[.2,1]),re.mlc=O("marker.line.color",W),re.mlw=O("marker.line.width",_p.mean,[0,5],Pb),ne.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var be=O("marker.size",_p.mean,[2,16],cle);re.ms=be,ne.marker.size=be}T&&(ne.line={width:O("line.width",W,[0,10],hle)}),H&&(re.tx="Aa",re.tp=O("textposition",W),re.ts=10,re.tc=O("textfont.color",W),re.tf=O("textfont.family",W),re.tw=O("textfont.weight",W),re.ty=O("textfont.style",W),re.tv=O("textfont.variant",W),re.tC=O("textfont.textcase",W),re.tE=O("textfont.lineposition",W),re.tS=O("textfont.shadow",W)),j=[_p.minExtend(q,re)],G=_p.minExtend(U,ne),G.selectedpoints=null,G.texttemplate=null}var ze=qp.select(this).select("g.legendpoints"),Ce=ze.selectAll("path.scatterpts").data(F?j:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",u),Ce.exit().remove(),Ce.call(iv.pointStyle,G,r),F&&(j[0].mrc=3);var he=ze.selectAll("g.pointtext").data(H?j:[]);he.enter().append("g").classed("pointtext",!0).append("text").attr("transform",u),he.exit().remove(),he.selectAll("text").call(iv.textPointStyle,G,r)}function h(C){var M=C[0].trace,v=M.type==="waterfall";if(C[0]._distinct&&v){var z=C[0].trace[C[0].dir].marker;return C[0].mc=z.color,C[0].mlw=z.line.width,C[0].mlc=z.line.color,x(C,this,"waterfall")}var T=[];M.visible&&v&&(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 F=qp.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(T);F.enter().append("path").classed("legendwaterfall",!0).attr("transform",u).style("stroke-miterlimit",1),F.exit().remove(),F.each(function(q){var U=qp.select(this),H=M[q[0]].marker,j=l(void 0,H.line,F3,Pb);U.attr("d",q[1]).style("stroke-width",j+"px").call(T0.fill,H.color),j&&U.call(T0.stroke,H.line.color)})}function d(C){x(C,this)}function p(C){x(C,this,"funnel")}function x(C,M,v){var z=C[0].trace,T=z.marker||{},F=T.line||{},q=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",U=v?z.visible&&z.type===v:FN.traceIs(z,"bar"),H=qp.select(M).select("g.legendpoints").selectAll("path.legend"+v).data(U?[C]:[]);H.enter().append("path").classed("legend"+v,!0).attr("d",q).attr("transform",u),H.exit().remove(),H.each(function(j){var G=qp.select(this),O=j[0],W=l(O.mlw,T.line,F3,Pb);G.style("stroke-width",W+"px");var re=O.mcc;if(!n._inHover&&"mc"in O){var ne=qN(T),be=ne.mid;be===void 0&&(be=(ne.max+ne.min)/2),re=iv.tryColorscale(T,"")(be)}var ze=re||O.mc||T.color,Ce=T.pattern,he=Ce&&iv.getPatternAttr(Ce.shape,0,"");if(he){var te=iv.getPatternAttr(Ce.bgcolor,0,null),ke=iv.getPatternAttr(Ce.fgcolor,0,null),Ee=Ce.fgopacity,Me=ple(Ce.size,8,10),Oe=ple(Ce.solidity,.5,1),Re="legend-"+z.uid;G.call(iv.pattern,"legend",r,Re,he,Me,Oe,re,Ce.fillmode,te,ke,Ee)}else G.call(T0.fill,ze);W&&T0.stroke(G,O.mlc||F.color)})}function b(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&FN.traceIs(M,"box-violin")?[C]:[]);v.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),v.exit().remove(),v.each(function(){var z=qp.select(this);if((M.boxpoints==="all"||M.points==="all")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var T=_p.minExtend(M,{marker:{size:a?cle:_p.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});v.call(iv.pointStyle,T,r)}else{var F=l(void 0,M.line,F3,Pb);z.style("stroke-width",F+"px").call(T0.fill,M.fillcolor),F&&T0.stroke(z,M.line.color)}})}function y(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);v.enter().append("path").classed("legendcandle",!0).attr("d",function(z,T){return T?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",u).style("stroke-miterlimit",1),v.exit().remove(),v.each(function(z,T){var F=qp.select(this),q=M[T?"increasing":"decreasing"],U=l(void 0,q.line,F3,Pb);F.style("stroke-width",U+"px").call(T0.fill,q.fillcolor),U&&T0.stroke(F,q.line.color)})}function E(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);v.enter().append("path").classed("legendohlc",!0).attr("d",function(z,T){return T?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",u).style("stroke-miterlimit",1),v.exit().remove(),v.each(function(z,T){var F=qp.select(this),q=M[T?"increasing":"decreasing"],U=l(void 0,q.line,F3,Pb);F.style("fill","none").call(iv.dashLine,q.line.dash,U),U&&T0.stroke(F,q.line.color)})}function k(C){L(C,this,"pie")}function A(C){L(C,this,"funnelarea")}function L(C,M,v){var z=C[0],T=z.trace,F=v?T.visible&&T.type===v:FN.traceIs(T,v),q=qp.select(M).select("g.legendpoints").selectAll("path.legend"+v).data(F?[C]:[]);if(q.enter().append("path").classed("legend"+v,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),q.exit().remove(),q.size()){var U=T.marker||{},H=l($st(U.line.width,z.pts),U.line,F3,Pb),j="pieLike",G=_p.minExtend(T,{marker:{line:{width:H}}},j),O=_p.minExtend(z,{trace:G},j);Jst(q,O,G,r)}}function _(C){var M=C[0].trace,v,z=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":z=[["M-15,-2V4H15V-2Z"]],v=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":z=[["M-6,-6V6H6V-6Z"]],v=!0;break;case"densitymapbox":case"densitymap":z=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],v="radial";break;case"cone":z=[["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"]],v=!1;break;case"streamtube":z=[["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"]],v=!1;break;case"surface":z=[["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"]],v=!0;break;case"mesh3d":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],v=!1;break;case"volume":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],v=!0;break;case"isosurface":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],v=!1;break}var T=qp.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(z);T.enter().append("path").classed("legend3dandfriends",!0).attr("transform",u).style("stroke-miterlimit",1),T.exit().remove(),T.each(function(F,q){var U=qp.select(this),H=qN(M),j=H.colorscale,G=H.reversescale,O=function(be){if(be.size()){var ze="legendfill-"+M.uid;iv.gradient(be,r,ze,BN(G,v==="radial"),j,"fill")}},W;if(j){if(!v){var ne=j.length;W=q===0?j[G?ne-1:0][1]:q===1?j[G?0:ne-1][1]:j[Math.floor((ne-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;W=_p.isArrayOrTypedArray(re)?re[q]||re[0]:re}U.attr("d",F[0]),W?U.call(T0.fill,W):U.call(O)})}};function BN(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function dle(e){var t=e[0].trace,r=t.contours,n=zz.hasLines(t),i=zz.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var u=r.coloring;u==="lines"?o=!0:n=u==="none"||u==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(u==="fill"||u==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function ple(e,t,r){return e&&_p.isArrayOrTypedArray(e)?t:e>r?r:e}});var HN=Se((snr,Sle)=>{"use strict";var Sv=Nl(),Fh=Zr(),UN=Sc(),O3=Ul(),yle=y3(),NN=gp(),qh=yu(),Iz=Pl(),Ib=Bf(),mle=Qse(),td=DN(),VN=Qh(),Tle=VN.LINE_SPACING,B3=VN.FROM_TL,gle=VN.FROM_BR,_le=ile(),tlt=ON(),xle=Cz(),q3=1,rlt=/^legend[0-9]*$/;Sle.exports=function(t,r){if(r)ble(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var l=Sv.select(this),f=l.attr("class"),c=f.split(" ")[0];c.match(rlt)&&i.indexOf(c)===-1&&l.remove()});for(var o=0;o1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!u.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),UN.autoMargin(e,i);var x=Fh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=Fh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),y=Fh.ensureSingle(x,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});y.call(Iz.stroke,r.bordercolor).call(Iz.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var E=Fh.ensureSingle(x,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var A;k.text?(A=Fh.ensureSingle(E,"text",i+"titletext"),A.attr("text-anchor","start").call(qh.font,k.font).text(k.text),Dz(A,E,e,r,q3)):E.selectAll("."+i+"titletext").remove();var L=Fh.ensureSingle(x,"rect","scrollbar",function(M){M.attr(td.scrollBarEnterAttrs).call(Iz.fill,td.scrollBarColor)}),_=E.selectAll("g.groups").data(u);_.enter().append("g").attr("class","groups"),_.exit().remove();var C=_.selectAll("g.traces").data(Fh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){var v=M[0].trace;return O3.traceIs(v,"pie-like")?p.indexOf(M[0].label)!==-1?.5:1:v.visible==="legendonly"?.5:1}).each(function(){Sv.select(this).call(nlt,e,r)}).call(tlt,e,r).each(function(){s||Sv.select(this).call(alt,e,i)}),Fh.syncOrAsync([UN.previousPromises,function(){return llt(e,_,C,r)},function(){var M=n._size,v=r.borderwidth,z=r.xref==="paper",T=r.yref==="paper";if(k.text&&ilt(A,r,v),!s){var F,q;z?F=M.l+M.w*r.x-B3[Rz(r)]*r._width:F=n.width*r.x-B3[Rz(r)]*r._width,T?q=M.t+M.h*(1-r.y)-B3[Fz(r)]*r._effHeight:q=n.height*(1-r.y)-B3[Fz(r)]*r._effHeight;var U=ult(e,i,F,q);if(U)return;if(n.margin.autoexpand){var H=F,j=q;F=z?Fh.constrain(F,0,n.width-r._width):H,q=T?Fh.constrain(q,0,n.height-r._effHeight):j,F!==H&&Fh.log("Constrain "+i+".x to make legend fit inside graph"),q!==j&&Fh.log("Constrain "+i+".y to make legend fit inside graph")}qh.setTranslate(x,F,q)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var G=r._effHeight;s&&(G=r._height),y.attr({width:r._width-v,height:G-v,x:v/2,y:v/2}),qh.setTranslate(E,0,0),b.select("rect").attr({width:r._width-2*v,height:G-2*v,x:v,y:v}),qh.setClipUrl(E,a,e),qh.setRect(L,0,0,0,0),delete r._scrollY}else{var O=Math.max(td.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),W=r._effHeight-O-2*td.scrollBarMargin,re=r._height-r._effHeight,ne=W/re,be=Math.min(r._scrollY||0,re);y.attr({width:r._width-2*v+td.scrollBarWidth+td.scrollBarMargin,height:r._effHeight-v,x:v/2,y:v/2}),b.select("rect").attr({width:r._width-2*v+td.scrollBarWidth+td.scrollBarMargin,height:r._effHeight-2*v,x:v,y:v+be}),qh.setClipUrl(E,a,e),Oe(be,O,ne),x.on("wheel",function(){be=Fh.constrain(r._scrollY+Sv.event.deltaY/W*re,0,re),Oe(be,O,ne),be!==0&&be!==re&&Sv.event.preventDefault()});var ze,Ce,he,te=function(Ze,et,gt){var Pt=(gt-et)/ne+Ze;return Fh.constrain(Pt,0,re)},ke=function(Ze,et,gt){var Pt=(et-gt)/ne+Ze;return Fh.constrain(Pt,0,re)},Ee=Sv.behavior.drag().on("dragstart",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchstart"?ze=Ze.changedTouches[0].clientY:ze=Ze.clientY,he=be}).on("drag",function(){var Ze=Sv.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Ze.type==="touchmove"?Ce=Ze.changedTouches[0].clientY:Ce=Ze.clientY,be=te(he,ze,Ce),Oe(be,O,ne))});L.call(Ee);var Me=Sv.behavior.drag().on("dragstart",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchstart"&&(ze=Ze.changedTouches[0].clientY,he=be)}).on("drag",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchmove"&&(Ce=Ze.changedTouches[0].clientY,be=ke(he,ze,Ce),Oe(be,O,ne))});E.call(Me)}function Oe(Ze,et,gt){r._scrollY=e._fullLayout[i]._scrollY=Ze,qh.setTranslate(E,0,-Ze),qh.setRect(L,r._width,td.scrollBarMargin+Ze*gt,td.scrollBarWidth,et),b.select("rect").attr("y",v+Ze)}if(e._context.edits.legendPosition){var Re,me,Be,fe;x.classed("cursor-move",!0),NN.init({element:x.node(),gd:e,prepFn:function(Ze){if(Ze.target!==L.node()){var et=qh.getTranslate(x);Be=et.x,fe=et.y}},moveFn:function(Ze,et){if(Be!==void 0&&fe!==void 0){var gt=Be+Ze,Pt=fe+et;qh.setTranslate(x,gt,Pt),Re=NN.align(gt,r._width,M.l,M.l+M.w,r.xanchor),me=NN.align(Pt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Re!==void 0&&me!==void 0){var Ze={};Ze[i+".x"]=Re,Ze[i+".y"]=me,O3.call("_guiRelayout",e,Ze)}},clickFn:function(Ze,et){var gt=o.selectAll("g.traces").filter(function(){var Pt=this.getBoundingClientRect();return et.clientX>=Pt.left&&et.clientX<=Pt.right&&et.clientY>=Pt.top&&et.clientY<=Pt.bottom});gt.size()>0&&Ale(e,x,gt,Ze,et)}})}}],e)}}function Pz(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 Ale(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),O3.traceIs(a,"pie-like")&&(o.label=r.datum()[0].label);var s=yle.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&mle(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var u=yle.triggerHandler(e,"plotly_legenddoubleclick",o);u!==!1&&s!==!1&&mle(r,e,n)}}function nlt(e,t,r){var n=qz(r),i=e.data()[0][0],a=i.trace,o=O3.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,u=r._maxNameLength,l,f;i.groupTitle?(l=i.groupTitle.text,f=i.groupTitle.font):(f=r.font,r.entries?l=i.text:(l=o?i.label:a.name,a._meta&&(l=Fh.templateString(l,a._meta))));var c=Fh.ensureSingle(e,"text",n+"text");c.attr("text-anchor","start").call(qh.font,f).text(s?wle(l,u):l);var h=r.indentation+r.itemwidth+td.itemGap*2;Ib.positionText(c,h,0),s?c.call(Ib.makeEditable,{gd:t,text:l}).call(Dz,e,t,r).on("edit",function(d){this.text(wle(d,u)).call(Dz,e,t,r);var p=i.trace._fullInput||{},x={};return x.name=d,p._isShape?O3.call("_guiRelayout",t,"shapes["+a.index+"].name",x.name):O3.call("_guiRestyle",t,x,a.index)}):Dz(c,e,t,r)}function wle(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 alt(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=Fh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(Iz.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)),Ale(t,s,e,a,Sv.event)}}))}function Dz(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Ib.convertToTspans(e,r,function(){olt(t,r,n,i)})}function olt(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){e.remove();return}var a=e.select("g[class*=math-group]"),o=a.node(),s=qz(r);r||(r=t._fullLayout[s]);var u=r.borderwidth,l;n===q3?l=r.title.font:i.groupTitle?l=i.groupTitle.font:l=r.font;var f=l.size*Tle,c,h;if(o){var d=qh.bBox(o);c=d.height,h=d.width,n===q3?qh.setTranslate(a,u,u+c*.75):qh.setTranslate(a,0,c*.25)}else{var p="."+s+(n===q3?"title":"")+"text",x=e.select(p),b=Ib.lineCount(x),y=x.node();if(c=f*b,h=y?qh.bBox(y).width:0,n===q3)r.title.side==="left"&&(h+=td.itemGap*2),Ib.positionText(x,u+td.titlePad,u+f);else{var E=td.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(E=td.itemGap,h-=r.indentation+r.itemwidth),Ib.positionText(x,E,-f*((b-1)/2-.3))}}n===q3?(r._titleWidth=h,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=h)}function slt(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 llt(e,t,r,n){var i=e._fullLayout,a=qz(n);n||(n=i[a]);var o=i._size,s=xle.isVertical(n),u=xle.isGrouped(n),l=n.entrywidthmode==="fraction",f=n.borderwidth,c=2*f,h=td.itemGap,d=n.indentation+n.itemwidth+h*2,p=2*(f+h),x=Fz(n),b=n.y<0||n.y===0&&x==="top",y=n.y>1||n.y===1&&x==="bottom",E=n.tracegroupgap,k={};n._maxHeight=Math.max(b||y?i.height/2:o.h,30);var A=0;n._width=0,n._height=0;var L=slt(n);if(s)r.each(function(he){var te=he[0].height;qh.setTranslate(this,f+L[0],f+L[1]+n._height+te/2+h),n._height+=te,n._width=Math.max(n._width,he[0].width)}),A=d+n._width,n._width+=h+d+c,n._height+=p,u&&(t.each(function(he,te){qh.setTranslate(this,0,te*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var _=Rz(n),C=n.x<0||n.x===0&&_==="right",M=n.x>1||n.x===1&&_==="left",v=y||b,z=i.width/2;n._maxWidth=Math.max(C?v&&_==="left"?o.l+o.w:z:M?v&&_==="right"?o.r+o.w:z:o.w,2*d);var T=0,F=0;r.each(function(he){var te=Pz(he,n,d);T=Math.max(T,te),F+=te}),A=null;var q=0;if(u){var U=0,H=0,j=0;t.each(function(){var he=0,te=0;Sv.select(this).selectAll("g.traces").each(function(Ee){var Me=Pz(Ee,n,d),Oe=Ee[0].height;qh.setTranslate(this,L[0],L[1]+f+h+Oe/2+te),te+=Oe,he=Math.max(he,Me),k[Ee[0].trace.legendgroup]=he});var ke=he+h;H>0&&ke+f+H>n._maxWidth?(q=Math.max(q,H),H=0,j+=U+E,U=te):U=Math.max(U,te),qh.setTranslate(this,H,j),H+=ke}),n._width=Math.max(q,H)+f,n._height=j+U+p}else{var G=r.size(),O=F+c+(G-1)*h=n._maxWidth&&(q=Math.max(q,be),re=0,ne+=W,n._height+=W,W=0),qh.setTranslate(this,L[0]+f+re,L[1]+f+ne+te/2+h),be=re+ke+h,re+=Ee,W=Math.max(W,te)}),O?(n._width=re+c,n._height=W+p):(n._width=Math.max(q,be)+c,n._height+=W+p)}}n._width=Math.ceil(Math.max(n._width+L[0],n._titleWidth+2*(f+td.titlePad))),n._height=Math.ceil(Math.max(n._height+L[1],n._titleHeight+2*(f+td.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ze=e._context.edits,Ce=ze.legendText||ze.legendPosition;r.each(function(he){var te=Sv.select(this).select("."+a+"toggle"),ke=he[0].height,Ee=he[0].trace.legendgroup,Me=Pz(he,n,d);u&&Ee!==""&&(Me=k[Ee]);var Oe=Ce?d:A||Me;!s&&!l&&(Oe+=h/2),qh.setRect(te,0,-ke/2,Oe,ke)})}function ult(e,t,r,n){var i=e._fullLayout,a=i[t],o=Rz(a),s=Fz(a),u=a.xref==="paper",l=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var f=a.y<.5?"b":"t",c=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(u&&l)return UN.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*B3[o],r:a._width*gle[o],b:a._effHeight*gle[s],t:a._effHeight*B3[s]});u?e._fullLayout._reservedMargin[t][f]=h[f]:l||a.orientation==="v"?e._fullLayout._reservedMargin[t][c]=h[c]:e._fullLayout._reservedMargin[t][f]=h[f]}function Rz(e){return Fh.isRightAnchor(e)?"right":Fh.isCenterAnchor(e)?"center":"left"}function Fz(e){return Fh.isBottomAnchor(e)?"bottom":Fh.isMiddleAnchor(e)?"middle":"top"}function qz(e){return e._id||"legend"}});var ZN=Se(jN=>{"use strict";var Db=Nl(),Sg=_u(),Mle=cd(),fh=Zr(),flt=fh.pushUnique,GN=fh.strTranslate,clt=fh.strRotate,hlt=y3(),A0=Bf(),dlt=Yse(),bm=yu(),vd=Pl(),Bz=gp(),wm=hu(),plt=dd().zindexSeparator,U3=Ul(),Ay=rv(),Rb=PM(),vlt=zN(),ylt=HN(),Dle=Rb.YANGLE,WN=Math.PI*Dle/180,mlt=1/Math.sin(WN),glt=Math.cos(WN),_lt=Math.sin(WN),Wc=Rb.HOVERARROWSIZE,mf=Rb.HOVERTEXTPAD,Ele={box:!0,ohlc:!0,violin:!0,candlestick:!0},xlt={scatter:!0,scattergl:!0,splom:!0};function kle(e,t){return e.distance-t.distance}jN.hover=function(t,r,n,i){t=fh.getGraphDiv(t);var a=r.target;fh.throttle(t._fullLayout._uid+Rb.HOVERID,Rb.HOVERMINTIME,function(){blt(t,r,n,i,a)})};jN.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Ole(i),o=Nle(i),s=t.map(function(b){var y=b._x0||b.x0||b.x||0,E=b._x1||b.x1||b.x||0,k=b._y0||b.y0||b.y||0,A=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var _=Math.min(y,E),C=Math.max(y,E),M=Math.min(k,A),v=Math.max(k,A),z=b.trace;if(U3.traceIs(z,"gl3d")){var T=i._fullLayout[z.scene]._scene.container,F=T.offsetLeft,q=T.offsetTop;_+=F,C+=F,M+=q,v+=q}L.bbox={x0:_+o,x1:C+o,y0:M+a,y1:v+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}}),u=!1,l=Fle(s,{gd:i,hovermode:"closest",rotateLabels:u,bgColor:r.bgColor||vd.background,container:Db.select(r.container),outerContainer:r.outerContainer||r.container}),f=l.hoverLabels,c=5,h=0,d=0;f.sort(function(b,y){return b.y0-y.y0}).each(function(b,y){var E=b.y0-b.by/2;E-cC[0]._length||fe<0||fe>M[0]._length)return Bz.unhoverRaw(e,t)}if(t.pointerX=Be+C[0]._offset,t.pointerY=fe+M[0]._offset,"xval"in t?j=Ay.flat(a,t.xval):j=Ay.p2c(C,Be),"yval"in t?G=Ay.flat(a,t.yval):G=Ay.p2c(M,fe),!Sg(j[0])||!Sg(G[0]))return fh.warn("Fx.hover failed",t,e),Bz.unhoverRaw(e,t)}var gt=1/0;function Pt(xi,Hi){for(W=0;WEe&&(U.splice(0,Ee),gt=U[0].distance),c&&q!==0&&U.length===0){ke.distance=q,ke.index=!1;var vt=ne._module.hoverPoints(ke,he,te,"closest",{hoverLayer:s._hoverlayer});if(vt&&(vt=vt.filter(function(Tr){return Tr.spikeDistance<=q})),vt&&vt.length){var Dt,Bt=vt.filter(function(Tr){return Tr.xa.showspikes&&Tr.xa.spikesnap!=="hovered data"});if(Bt.length){var sr=Bt[0];Sg(sr.x0)&&Sg(sr.y0)&&(Dt=Xe(sr),(!Me.vLinePoint||Me.vLinePoint.spikeDistance>Dt.spikeDistance)&&(Me.vLinePoint=Dt))}var br=vt.filter(function(Tr){return Tr.ya.showspikes&&Tr.ya.spikesnap!=="hovered data"});if(br.length){var zr=br[0];Sg(zr.x0)&&Sg(zr.y0)&&(Dt=Xe(zr),(!Me.hLinePoint||Me.hLinePoint.spikeDistance>Dt.spikeDistance)&&(Me.hLinePoint=Dt))}}}}}Pt();function Qe(xi,Hi,Jr){for(var ci=null,Di=1/0,Lt,vt=0;vt0&&Math.abs(xi.distance)tt-1;Ot--)fr(U[Ot]);U=Vt,Ct()}var De=e._hoverdata,_e=[],Fe=Ole(e),Pe=Nle(e);for(O=0;O1||U.length>1)||h==="closest"&&Oe&&U.length>1,Er=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),si=Fle(U,{gd:e,hovermode:h,rotateLabels:vr,bgColor:Er,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Ei=si.hoverLabels;if(Ay.isUnifiedHover(h)||(Tlt(Ei,vr,s,si.commonLabelBoundingBox),Ble(Ei,vr,s._invScaleX,s._invScaleY)),i&&i.tagName){var Si=U3.getComponentMethod("annotations","hasClickToShow")(e,_e);dlt(Db.select(i),Si?"pointer":"")}!i||n||!Mlt(e,t,De)||(De&&e.emit("plotly_unhover",{event:t,points:De}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:j,yvals:G}))}function Rle(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 wlt=/([\s\S]*)<\/extra>/;function Fle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,u=t.outerContainer,l=t.commonLabelOpts||{};if(e.length===0)return[[]];var f=t.fontFamily||Rb.HOVERFONT,c=t.fontSize||Rb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,E=e[0],k=E.xa,A=E.ya,L=i.charAt(0),_=L+"Label",C=E[_];if(C===void 0&&k.type==="multicategory")for(var M=0;Mn.width-De&&(_e=n.width-De),ct.attr("d","M"+(ir-_e)+",0L"+(ir-_e+Wc)+","+Ot+Wc+"H"+De+"v"+Ot+(mf*2+Kt.height)+"H"+-De+"V"+Ot+Wc+"H"+(ir-_e-Wc)+"Z"),ir=_e,W.minX=ir-De,W.maxX=ir+De,k.side==="top"?(W.minY=fr-(mf*2+Kt.height),W.maxY=fr-mf):(W.minY=fr+mf,W.maxY=fr+(mf*2+Kt.height))}else{var Fe,Pe,Ie;A.side==="right"?(Fe="start",Pe=1,Ie="",ir=k._offset+k._length):(Fe="end",Pe=-1,Ie="-",ir=k._offset),fr=A._offset+(E.y0+E.y1)/2,rt.attr("text-anchor",Fe),ct.attr("d","M0,0L"+Ie+Wc+","+Wc+"V"+(mf+Kt.height/2)+"h"+Ie+(mf*2+Kt.width)+"V-"+(mf+Kt.height/2)+"H"+Ie+Wc+"V-"+Wc+"Z"),W.minY=fr-(mf+Kt.height/2),W.maxY=fr+(mf+Kt.height/2),A.side==="right"?(W.minX=ir+Wc,W.maxX=ir+Wc+(mf*2+Kt.width)):(W.minX=ir-Wc-(mf*2+Kt.width),W.maxX=ir-Wc);var lt=Kt.height/2,ye=z-Kt.top-lt,ue="clip"+n._uid+"commonlabel"+A._id,de;if(ir=0?At=xt:_t+fe=0?At=_t:Ct+fe=0?Te=Xe:Tt+Ze=0?Te=Tt:jt+Ze=0,(ut.idealAlign==="top"||!St)&&Zt?(Ie-=ye/2,ut.anchor="end"):St?(Ie+=ye/2,ut.anchor="start"):ut.anchor="middle",ut.crossPos=Ie;else{if(ut.pos=Ie,St=Pe+lt/2+Et<=T,Zt=Pe-lt/2-Et>=0,(ut.idealAlign==="left"||!St)&&Zt)Pe-=lt/2,ut.anchor="end";else if(St)Pe+=lt/2,ut.anchor="start";else{ut.anchor="middle";var qr=Et/2,Lr=Pe+qr-T,vr=Pe-qr;Lr>0&&(Pe-=Lr),vr<0&&(Pe+=-vr)}ut.crossPos=Pe}fr.attr("text-anchor",ut.anchor),De&&Ot.attr("text-anchor",ut.anchor),ct.attr("transform",GN(Pe,Ie)+(a?clt(Dle):""))}),{hoverLabels:nt,commonLabelBoundingBox:W}}function Cle(e,t,r,n,i,a){var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=fh.templateString(e.name,e.trace._meta)),o=Ple(e.name,e.nameLength));var u=r.charAt(0),l=u==="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[u+"Label"]===i?s=e[l+"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);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[u+"Label"]!==i&&(c[u+"other"]=c[u+"Val"],c[u+"otherLabel"]=c[u+"Label"]),s=fh.hovertemplateString(f,c,n._d3locale,e.eventData[0]||{},e.trace._meta),s=s.replace(wlt,function(h,d){return o=Ple(d,e.nameLength),""})}return[s,o]}function Tlt(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,u=e.size(),l=new Array(u),f=0,c=n.minX,h=n.maxX,d=n.minY,p=n.maxY,x=function(j){return j*r._invScaleX},b=function(j){return j*r._invScaleY};e.each(function(j){var G=j[i],O=j[a],W=G._id.charAt(0)==="x",re=G.range;f===0&&re&&re[0]>re[1]!==W&&(s=-1);var ne=0,be=W?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ze=qle(j,t),Ce=j.anchor,he=Ce==="end"?-1:1,te,ke;if(Ce==="middle")te=j.crossPos+(W?b(ze.y-j.by/2):x(j.bx/2+j.tx2width/2)),ke=te+(W?b(j.by):x(j.bx));else if(W)te=j.crossPos+b(Wc+ze.y)-b(j.by/2-Wc),ke=te+b(j.by);else{var Ee=x(he*Wc+ze.x),Me=Ee+x(he*j.bx);te=j.crossPos+Math.min(Ee,Me),ke=j.crossPos+Math.max(Ee,Me)}W?d!==void 0&&p!==void 0&&Math.min(ke,p)-Math.max(te,d)>1&&(O.side==="left"?(ne=O._mainLinePosition,be=r.width):be=O._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ke,h)-Math.max(te,c)>1&&(O.side==="top"?(ne=O._mainLinePosition,be=r.height):be=O._mainLinePosition)}l[f++]=[{datum:j,traceIndex:j.trace.index,dp:0,pos:j.pos,posref:j.posref,size:j.by*(W?mlt:1)/2,pmin:ne,pmax:be}]}),l.sort(function(j,G){return j[0].posref-G[0].posref||s*(G[0].traceIndex-j[0].traceIndex)});var y,E,k,A,L,_,C;function M(j){var G=j[0],O=j[j.length-1];if(E=G.pmin-G.pos-G.dp+G.size,k=O.pos+O.dp+O.size-G.pmax,E>.01){for(L=j.length-1;L>=0;L--)j[L].dp+=E;y=!1}if(!(k<.01)){if(E<-.01){for(L=j.length-1;L>=0;L--)j[L].dp-=k;y=!1}if(y){var W=0;for(A=0;AG.pmax&&W++;for(A=j.length-1;A>=0&&!(W<=0);A--)_=j[A],_.pos>G.pmax-1&&(_.del=!0,W--);for(A=0;A=0;L--)j[L].dp-=k;for(A=j.length-1;A>=0&&!(W<=0);A--)_=j[A],_.pos+_.dp+_.size>G.pmax&&(_.del=!0,W--)}}}for(;!y&&o<=u;){for(o++,y=!0,A=0;A.01){for(L=z.length-1;L>=0;L--)z[L].dp+=E;for(v.push.apply(v,z),l.splice(A+1,1),C=0,L=v.length-1;L>=0;L--)C+=v[L].dp;for(k=C/v.length,L=v.length-1;L>=0;L--)v[L].dp-=k;y=!1}else A++}l.forEach(M)}for(A=l.length-1;A>=0;A--){var q=l[A];for(L=q.length-1;L>=0;L--){var U=q[L],H=U.datum;H.offset=U.dp,H.del=U.del}}}function qle(e,t){var r=0,n=e.offset;return t&&(n*=-_lt,r=e.offset*glt),{x:r,y:n}}function Alt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Wc+mf),n=r+t*(e.txwidth+mf),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+mf),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Ble(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Db.select(this);if(o.del)return s.remove();var u=s.select("text.nums"),l=o.anchor,f=l==="end"?-1:1,c=Alt(o),h=qle(o,t),d=h.x,p=h.y,x=l==="middle";s.select("path").attr("d",x?"M-"+i(o.bx/2+o.tx2width/2)+","+a(p-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(f*Wc+d)+","+a(Wc+p)+"v"+a(o.by/2-Wc)+"h"+i(f*o.bx)+"v-"+a(o.by)+"H"+i(f*Wc+d)+"V"+a(p-Wc)+"Z");var b=d+c.textShiftX,y=p+o.ty0-o.by/2+mf,E=o.textAlign||"auto";E!=="auto"&&(E==="left"&&l!=="start"?(u.attr("text-anchor","start"),b=x?-o.bx/2-o.tx2width/2+mf:-o.bx-mf):E==="right"&&l!=="end"&&(u.attr("text-anchor","end"),b=x?o.bx/2-o.tx2width/2-mf:o.bx+mf)),u.call(A0.positionText,i(b),a(y)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(c.text2ShiftX+c.alignShift*mf+d),a(p+o.ty0-o.by/2+mf)),s.select("rect").call(bm.setRect,i(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),a(p-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Slt(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Sg(h)&&h===0}var s=Array.isArray(r)?function(h,d){var p=fh.castOption(i,r,h);return o(p)?p:fh.extractOption({},n,"",d)}:function(h,d){return fh.extractOption(a,n,h,d)};function u(h,d,p){var x=s(d,p);o(x)&&(e[h]=x)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("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=fh.constrain(e.x0,0,e.xa._length),e.x1=fh.constrain(e.x1,0,e.xa._length),e.y0=fh.constrain(e.y0,0,e.ya._length),e.y1=fh.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 l=wm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+l+" / -"+wm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+l,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=wm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+wm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,t==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function Lle(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,u=!!t.vLinePoint,l,f;if(n.selectAll(".spikeline").remove(),!!(u||s)){var c=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,p;l=h&&h.xa,f=h&&h.ya;var x=f.spikesnap;x==="cursor"?(d=o.pointerX,p=o.pointerY):(d=l._offset+h.x,p=f._offset+h.y);var b=Mle.readability(h.color,c)<1.5?vd.contrast(c):h.color,y=f.spikemode,E=f.spikethickness,k=f.spikecolor||b,A=wm.getPxPosition(e,f),L,_;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=A,_=d),y.indexOf("across")!==-1){var C=f._counterDomainMin,M=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),M=Math.max(M,f.position)),L=a.l+C*a.w,_=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:_,y1:p,y2:p,"stroke-width":E,stroke:k,"stroke-dasharray":bm.dashStyle(f.spikedash,E)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:_,y1:p,y2:p,"stroke-width":E+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:A+(f.side!=="right"?E:-E),cy:p,r:E,fill:k}).classed("spikeline",!0)}if(u){var v=t.vLinePoint,z,T;l=v&&v.xa,f=v&&v.ya;var F=l.spikesnap;F==="cursor"?(z=o.pointerX,T=o.pointerY):(z=l._offset+v.x,T=f._offset+v.y);var q=Mle.readability(v.color,c)<1.5?vd.contrast(c):v.color,U=l.spikemode,H=l.spikethickness,j=l.spikecolor||q,G=wm.getPxPosition(e,l),O,W;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(O=G,W=T),U.indexOf("across")!==-1){var re=l._counterDomainMin,ne=l._counterDomainMax;l.anchor==="free"&&(re=Math.min(re,l.position),ne=Math.max(ne,l.position)),O=a.t+(1-ne)*a.h,W=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:z,x2:z,y1:O,y2:W,"stroke-width":H,stroke:j,"stroke-dasharray":bm.dashStyle(l.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:z,x2:z,y1:O,y2:W,"stroke-width":H+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:z,cy:G-(l.side!=="top"?H:-H),r:H,fill:j}).classed("spikeline",!0)}}}function Mlt(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))return!0}return!1}function zle(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Ple(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Elt(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o{"use strict";var klt=Zr(),Clt=Pl(),Llt=rv().isUnifiedHover;Ule.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&&Llt(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=Clt.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),klt.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Hle=Se((fnr,Vle)=>{"use strict";var zlt=Zr(),Plt=o5(),Ilt=O1();Vle.exports=function(t,r){function n(i,a){return zlt.coerce(t,r,Ilt,i,a)}Plt(t,r,n)}});var jle=Se((cnr,Wle)=>{"use strict";var Gle=Zr(),Dlt=i3(),Rlt=o5();Wle.exports=function(t,r,n,i){function a(s,u){return Gle.coerce(t,r,Dlt,s,u)}var o=Gle.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Rlt(t,r,a,o)}});var XN=Se((hnr,Zle)=>{"use strict";var Flt=Zr(),qlt=O1();Zle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Flt.coerce(t,r,qlt,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var Kle=Se((dnr,Yle)=>{"use strict";var Xle=Zr(),Blt=O1(),Olt=XN(),Nlt=o5();Yle.exports=function(t,r){function n(f,c){return Xle.coerce(t,r,Blt,f,c)}var i=Olt(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),u=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||u)&&l===1||(o||s)&&u&&l===2)&&(r.dragmode="pan"),Nlt(t,r,n),Xle.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Qle=Se((pnr,$le)=>{"use strict";var YN=Zr(),Jle=Ul();$le.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(l){return function(f){return YN.coerceHoverinfo({hoverinfo:f},{_module:l._module},n)}}for(var a=0;a{"use strict";var Vlt=Ul(),Hlt=ZN().hover;eue.exports=function(t,r,n){var i=Vlt.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&Hlt(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 jc=Se((ynr,nue)=>{"use strict";var Glt=Nl(),Oz=Zr(),Wlt=gp(),s5=rv(),rue=O1(),iue=ZN();nue.exports={moduleType:"component",name:"fx",constants:PM(),schema:{layout:rue},attributes:i3(),layoutAttributes:rue,supplyLayoutGlobalDefaults:Hle(),supplyDefaults:jle(),supplyLayoutDefaults:Kle(),calc:Qle(),getDistanceFunction:s5.getDistanceFunction,getClosest:s5.getClosest,inbox:s5.inbox,quadrature:s5.quadrature,appendArrayPointValue:s5.appendArrayPointValue,castHoverOption:Zlt,castHoverinfo:Xlt,hover:iue.hover,unhover:Wlt.unhover,loneHover:iue.loneHover,loneUnhover:jlt,click:tue()};function jlt(e){var t=Oz.isD3Selection(e)?e:Glt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function Zlt(e,t,r){return Oz.castOption(e,t,"hoverlabel."+r)}function Xlt(e,t,r){function n(i){return Oz.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return Oz.castOption(e,r,"hoverinfo",n)}});var Sy=Se(Mg=>{"use strict";Mg.selectMode=function(e){return e==="lasso"||e==="select"};Mg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Mg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Mg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Mg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Mg.selectingOrDrawing=function(e){return Mg.freeMode(e)||Mg.rectMode(e)}});var l5=Se((gnr,aue)=>{"use strict";aue.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 Nz=Se((_nr,oue)=>{"use strict";oue.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 Vz=Se((xnr,sue)=>{"use strict";var Uz=32;sue.exports={CIRCLE_SIDES:Uz,i000:0,i090:Uz/4,i180:Uz/2,i270:Uz/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var Hz=Se((bnr,uue)=>{"use strict";var Ylt=Zr().strTranslate;function lue(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 Klt(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 Jlt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return lue(e,r[t])}}function $lt(e){return Ylt(e.xaxis._offset,e.yaxis._offset)}uue.exports={p2r:lue,r2p:Klt,axValue:Jlt,getTransform:$lt}});var u_=Se(Eg=>{"use strict";var Qlt=XM(),hue=Vz(),V3=hue.CIRCLE_SIDES,KN=hue.SQRT2,due=Hz(),fue=due.p2r,cue=due.r2p,eut=[0,3,4,5,6,1,2],tut=[0,3,4,1,2];Eg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&u{"use strict";var gue=Sy(),rut=gue.drawMode,iut=gue.openMode,H3=Vz(),pue=H3.i000,vue=H3.i090,yue=H3.i180,mue=H3.i270,nut=H3.cos45,aut=H3.sin45,_ue=Hz(),Wz=_ue.p2r,f_=_ue.r2p,out=Q1(),sut=out.clearOutline,jz=u_(),lut=jz.readPaths,uut=jz.writePaths,fut=jz.ellipseOver,cut=jz.fixDatesForPaths;function hut(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(!rut(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var dut=Sy(),put=dut.selectMode,vut=Q1(),yut=vut.clearOutline,JN=u_(),mut=JN.readPaths,gut=JN.writePaths,_ut=JN.fixDatesForPaths;wue.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,u=s.xaxis,l=s.yaxis,f=r.isActiveSelection,c=r.dragmode,h=(a.layout||{}).selections||[];if(!put(c)&&f!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";Tue.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 c_=Se(Fd=>{"use strict";var Fb=f5(),Aue=Zr(),Xz=hu();Fd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Fd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Fd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Fd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Fd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Fb.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.substr(1).match(Fb.paramRE);if(!(!s||s.lengthd&&(x="X"),x});return l>d&&(p=p.replace(/[\s,]*X.*/,""),Aue.log("Ignoring extra params in segment "+u)),f+p})}function c5(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 e7=Se((Enr,kue)=>{"use strict";var but=Zr(),G3=hu(),Sue=Bf(),Mue=yu(),wut=u_().readPaths,QN=c_(),Tut=QN.getPathString,Eue=xL(),Aut=Qh().FROM_TL;kue.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=G3.getFromId(t,n.xref),u=G3.getFromId(t,n.yref);for(var l in Eue){var f=Eue[l](n,s,u);f!==void 0&&(o[l]=f)}}a=but.texttemplateStringForShapes(n.label.texttemplate,{},t._fullLayout._d3locale,o)}else a=n.label.text;var c={"data-index":r},h=n.label.font,d={"data-notex":1},p=i.append("g").attr(c).classed("shape-label",!0),x=p.append("text").attr(d).classed("shape-label-text",!0).text(a),b,y,E,k;if(n.path){var A=Tut(t,n),L=wut(A,t);b=1/0,E=1/0,y=-1/0,k=-1/0;for(var _=0;_=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Mut(e,t,r,n,i,a,o){var s=i.label.textposition,u=i.label.textangle,l=i.label.padding,f=i.type,c=Math.PI/180*a,h=Math.sin(c),d=Math.cos(c),p=i.label.xanchor,x=i.label.yanchor,b,y,E,k;if(f==="line"){s==="start"?(b=e,y=t):s==="end"?(b=r,y=n):(b=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?u==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var Eut=Zr(),kut=Eut.strTranslate,Cue=gp(),Pue=Sy(),Cut=Pue.drawMode,Iue=Pue.selectMode,Due=Ul(),Lue=Pl(),Kz=Vz(),Lut=Kz.i000,zut=Kz.i090,Put=Kz.i180,Iut=Kz.i270,Dut=Q1(),Rue=Dut.clearOutlineControllers,r7=u_(),Yz=r7.pointsOnRectangle,t7=r7.pointsOnEllipse,Rut=r7.writePaths,Fut=Zz().newShapes,qut=Zz().createShapeObj,But=$N(),Out=e7();Fue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(t7(t[0])||n.hasText)&&s({redrawing:!0})}function s(G){var O={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,O=Fut(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,O=But(r,n),a._fullLayout._reselect=!0),Object.keys(O).length&&Due.call((G||{}).redrawing?"relayout":"_guiRelayout",a,O)}var u=a._fullLayout,l=u._zoomlayer,f=n.dragmode,c=Cut(f),h=Iue(f);(c||h)&&(a._fullLayout._outlining=!0),Rue(a),r.attr("d",Rut(t));var d,p,x,b,y;if(!i&&(n.isActiveShape||n.isActiveSelection)){y=Nut([],t);var E=l.append("g").attr("class","outline-controllers");z(E),j()}if(c&&n.hasText){var k=l.select(".label-temp"),A=qut(r,n,n.dragmode);Out(a,"label-temp",A,k)}function L(G){x=+G.srcElement.getAttribute("data-i"),b=+G.srcElement.getAttribute("data-j"),d[x][b].moveFn=_}function _(G,O){if(t.length){var W=y[x][b][1],re=y[x][b][2],ne=t[x],be=ne.length;if(Yz(ne)){var ze=G,Ce=O;if(n.isActiveSelection){var he=zue(ne,b);he[1]===ne[b][1]?Ce=0:ze=0}for(var te=0;te1&&!(G.length===2&&G[1][0]==="Z")&&(b===0&&(G[0][0]="M"),t[x]=G,o(),s())}}function v(G,O){if(G===2){x=+O.srcElement.getAttribute("data-i"),b=+O.srcElement.getAttribute("data-j");var W=t[x];!Yz(W)&&!t7(W)&&M()}}function z(G){d=[];for(var O=0;O{"use strict";var Vut=Nl(),Vue=Ul(),que=Zr(),W3=hu(),Hut=u_().readPaths,Gut=Jz(),Qz=e7(),Hue=Q1().clearOutlineControllers,i7=Pl(),a7=yu(),Wut=_f().arrayEditor,Bue=gp(),Oue=Ty(),qb=f5(),Mv=c_(),n7=Mv.getPathString;jue.exports={draw:o7,drawOne:Gue,eraseActiveShape:Xut,drawLabel:Qz};function o7(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&&xt>s&&!Qe.shiftKey?Bue.getCursor(_t/Tt,1-Ct/xt):"move";Oue(t,jt),ke=jt.split("-")[0]}}function Re(Qe){$z(e)||(u&&(y=ne(r.xanchor)),l&&(E=be(r.yanchor)),r.type==="path"?T=r.path:(d=u?r.x0:ne(r.x0),p=l?r.y0:be(r.y0),x=u?r.x1:ne(r.x1),b=l?r.y1:be(r.y1)),db?(k=p,C="y0",A=b,M="y1"):(k=b,C="y1",A=p,M="y0"),Oe(Qe),et(i,r),Pt(t,r,e),te.moveFn=ke==="move"?fe:Ze,te.altKey=Qe.altKey)}function me(){$z(e)||(Oue(t),gt(i),Wue(t,e,r),Vue.call("_guiRelayout",e,a.getUpdateObj()))}function Be(){$z(e)||gt(i)}function fe(Qe,Xe){if(r.type==="path"){var Tt=function(Ct){return Ct},xt=Tt,_t=Tt;u?h("xanchor",r.xanchor=ze(y+Qe)):(xt=function(jt){return ze(ne(jt)+Qe)},q&&q.type==="date"&&(xt=Mv.encodeDate(xt))),l?h("yanchor",r.yanchor=Ce(E+Xe)):(_t=function(jt){return Ce(be(jt)+Xe)},H&&H.type==="date"&&(_t=Mv.encodeDate(_t))),h("path",r.path=Nue(T,xt,_t))}else u?h("xanchor",r.xanchor=ze(y+Qe)):(h("x0",r.x0=ze(d+Qe)),h("x1",r.x1=ze(x+Qe))),l?h("yanchor",r.yanchor=Ce(E+Xe)):(h("y0",r.y0=Ce(p+Xe)),h("y1",r.y1=Ce(b+Xe)));t.attr("d",n7(e,r)),et(i,r),Qz(e,n,r,F)}function Ze(Qe,Xe){if(c){var Tt=function(Kt){return Kt},xt=Tt,_t=Tt;u?h("xanchor",r.xanchor=ze(y+Qe)):(xt=function(ir){return ze(ne(ir)+Qe)},q&&q.type==="date"&&(xt=Mv.encodeDate(xt))),l?h("yanchor",r.yanchor=Ce(E+Xe)):(_t=function(ir){return Ce(be(ir)+Xe)},H&&H.type==="date"&&(_t=Mv.encodeDate(_t))),h("path",r.path=Nue(T,xt,_t))}else if(f){if(ke==="resize-over-start-point"){var Ct=d+Qe,jt=l?p-Xe:p+Xe;h("x0",r.x0=u?Ct:ze(Ct)),h("y0",r.y0=l?jt:Ce(jt))}else if(ke==="resize-over-end-point"){var At=x+Qe,Te=l?b-Xe:b+Xe;h("x1",r.x1=u?At:ze(At)),h("y1",r.y1=l?Te:Ce(Te))}}else{var nt=function(Kt){return ke.indexOf(Kt)!==-1},ut=nt("n"),ct=nt("s"),rt=nt("w"),je=nt("e"),tt=ut?k+Xe:k,Je=ct?A+Xe:A,Mt=rt?L+Qe:L,Vt=je?_+Qe:_;l&&(ut&&(tt=k-Xe),ct&&(Je=A-Xe)),(!l&&Je-tt>s||l&&tt-Je>s)&&(h(C,r[C]=l?tt:Ce(tt)),h(M,r[M]=l?Je:Ce(Je))),Vt-Mt>o&&(h(v,r[v]=u?Mt:ze(Mt)),h(z,r[z]=u?Vt:ze(Vt)))}t.attr("d",n7(e,r)),et(i,r),Qz(e,n,r,F)}function et(Qe,Xe){(u||l)&&Tt();function Tt(){var xt=Xe.type!=="path",_t=Qe.selectAll(".visual-cue").data([0]),Ct=1;_t.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var jt=ne(u?Xe.xanchor:que.midRange(xt?[Xe.x0,Xe.x1]:Mv.extractPathCoords(Xe.path,qb.paramIsX))),At=be(l?Xe.yanchor:que.midRange(xt?[Xe.y0,Xe.y1]:Mv.extractPathCoords(Xe.path,qb.paramIsY)));if(jt=Mv.roundPositionForSharpStrokeRendering(jt,Ct),At=Mv.roundPositionForSharpStrokeRendering(At,Ct),u&&l){var Te="M"+(jt-1-Ct)+","+(At-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";_t.attr("d",Te)}else if(u){var nt="M"+(jt-1-Ct)+","+(At-9-Ct)+"v18 h2 v-18 Z";_t.attr("d",nt)}else{var ut="M"+(jt-9-Ct)+","+(At-1-Ct)+"h18 v2 h-18 Z";_t.attr("d",ut)}}}function gt(Qe){Qe.selectAll(".visual-cue").remove()}function Pt(Qe,Xe,Tt){var xt=Xe.xref,_t=Xe.yref,Ct=W3.getFromId(Tt,xt),jt=W3.getFromId(Tt,_t),At="";xt!=="paper"&&!Ct.autorange&&(At+=xt),_t!=="paper"&&!jt.autorange&&(At+=_t),a7.setClipUrl(Qe,At?"clip"+Tt._fullLayout._uid+At:null,Tt)}}function Nue(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],u=qb.numParams[a],l=n.substr(1).replace(qb.paramRE,function(f){return i>=u||(o[i]?f=t(f):s[i]&&(f=r(f)),i++),f});return a+l})}function Zut(e,t){if(eP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Uue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Uue,o7(e)}}}function Uue(e){if(eP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Hue(e),delete e._fullLayout._activeShapeIndex,o7(e))}}function Xut(e){if(eP(e)){Hue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=Ul(),Zue=Sc(),Xue=$c(),Mf=Nz(),Yut=tP().eraseActiveShape,rP=Zr(),pf=rP._,Ef=tfe.exports={};Ef.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?pf(e,"Download plot as a png"):pf(e,"Download plot")},icon:Mf.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};rP.notifier(pf(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){rP.notifier(pf(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){rP.notifier(pf(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ef.sendDataToCloud={name:"sendDataToCloud",title:function(e){return pf(e,"Edit in Chart Studio")},icon:Mf.disk,click:function(e){Zue.sendDataToCloud(e)}};Ef.editInChartStudio={name:"editInChartStudio",title:function(e){return pf(e,"Edit in Chart Studio")},icon:Mf.pencil,click:function(e){Zue.sendDataToCloud(e)}};Ef.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return pf(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Mf.zoombox,click:Bp};Ef.pan2d={name:"pan2d",_cat:"pan",title:function(e){return pf(e,"Pan")},attr:"dragmode",val:"pan",icon:Mf.pan,click:Bp};Ef.select2d={name:"select2d",_cat:"select",title:function(e){return pf(e,"Box Select")},attr:"dragmode",val:"select",icon:Mf.selectbox,click:Bp};Ef.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return pf(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Mf.lasso,click:Bp};Ef.drawclosedpath={name:"drawclosedpath",title:function(e){return pf(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Mf.drawclosedpath,click:Bp};Ef.drawopenpath={name:"drawopenpath",title:function(e){return pf(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Mf.drawopenpath,click:Bp};Ef.drawline={name:"drawline",title:function(e){return pf(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Mf.drawline,click:Bp};Ef.drawrect={name:"drawrect",title:function(e){return pf(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Mf.drawrect,click:Bp};Ef.drawcircle={name:"drawcircle",title:function(e){return pf(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Mf.drawcircle,click:Bp};Ef.eraseshape={name:"eraseshape",title:function(e){return pf(e,"Erase active shape")},icon:Mf.eraseshape,click:Yut};Ef.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return pf(e,"Zoom in")},attr:"zoom",val:"in",icon:Mf.zoom_plus,click:Bp};Ef.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return pf(e,"Zoom out")},attr:"zoom",val:"out",icon:Mf.zoom_minus,click:Bp};Ef.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return pf(e,"Autoscale")},attr:"zoom",val:"auto",icon:Mf.autoscale,click:Bp};Ef.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return pf(e,"Reset axes")},attr:"zoom",val:"reset",icon:Mf.home,click:Bp};Ef.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return pf(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Mf.tooltip_basic,gravity:"ne",click:Bp};Ef.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return pf(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Mf.tooltip_compare,gravity:"ne",click:Bp};function Bp(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Xue.list(e,null,!0),u=a._cartesianSpikesEnabled,l,f;if(n==="zoom"){var c=i==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var rfe=u7(),$ut=Object.keys(rfe),ife=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],nfe=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(ife),Z3=[],Qut=function(e){if(nfe.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Z3.indexOf(t)===-1&&Z3.push(t),Z3.indexOf(r)===-1&&Z3.push(r)}};$ut.forEach(function(e){Qut(rfe[e])});Z3.sort();afe.exports={DRAW_MODES:ife,backButtons:nfe,foreButtons:Z3}});var c7=Se((Inr,ofe)=>{"use strict";var Pnr=f7();ofe.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 lfe=Se((Dnr,sfe)=>{"use strict";var eft=Zr(),h5=Pl(),tft=_f(),rft=c7();sfe.exports=function(t,r){var n=t.modebar||{},i=tft.newContainer(r,"modebar");function a(s,u){return eft.coerce(n,i,rft,s,u)}a("orientation"),a("bgcolor",h5.addOpacity(r.paper_bgcolor,.5));var o=h5.contrast(h5.rgb(r.modebar.bgcolor));a("color",h5.addOpacity(o,.3)),a("activecolor",h5.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var hfe=Se((Rnr,cfe)=>{"use strict";var h7=Nl(),ift=_u(),nP=Zr(),ufe=Nz(),nft=QC().version,aft=new DOMParser;function ffe(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=ffe.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._uid=i,this.element.className="modebar",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(c){c.style.backgroundColor=a.bgcolor}),nP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color);var s=!this.hasButtons(t),u=this.hasLogo!==r.displaylogo,l=this.locale!==r.locale;if(this.locale=r.locale,(s||u||l)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};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("a");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),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&&h7.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||ufe.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Tm.createIcon=function(e){var t=ift(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=aft.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=h7.select(n),u=function(c,h){var d=t.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(a===r){var l=!s.classed("active");s.classed("active",l),u(n,l)}}else{var f=a===null?a:nP.nestedProperty(t,a).get();s.classed("active",f===i),u(n,f===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 lft=$c(),dfe=ec(),d7=Ul(),uft=rv().isUnifiedHover,fft=hfe(),aP=u7(),cft=f7().DRAW_MODES,hft=Zr().extendDeep;pfe.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=gft(a):!n.displayModeBar&&n.watermark?o=[]:o=dft(t),i?i.update(t,o):r._modeBar=fft(t,o)};function dft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(O,W){if(typeof W=="string"){if(W.toLowerCase()===O.toLowerCase())return!0}else{var re=W.name,ne=W._cat||W.name;if(re===O||ne===O.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(O){for(var W=0;W1?(z=["toggleHover"],T=["resetViews"]):c?(v=["zoomInGeo","zoomOutGeo"],z=["hoverClosestGeo"],T=["resetGeo"]):f?(z=["hoverClosest3d"],T=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(v=["zoomInMapbox","zoomOutMapbox"],z=["toggleHover"],T=["resetViewMapbox"]):b?(v=["zoomInMap","zoomOutMap"],z=["toggleHover"],T=["resetViewMap"]):h?z=["hoverClosestPie"]:k?(z=["hoverClosestCartesian","hoverCompareCartesian"],T=["resetViewSankey"]):z=["toggleHover"],l&&z.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(yft(r)||L)&&(z=[]),l&&!A&&(v=["zoomIn2d","zoomOut2d","autoScale2d"],T[0]!=="resetViews"&&(T=["resetScale2d"])),f?F=["zoom3d","pan3d","orbitRotation","tableRotation"]:l&&!A||p?F=["zoom2d","pan2d"]:x||b||c?F=["pan2d"]:y&&(F=["zoom2d"]),vft(r)&&F.push("select2d","lasso2d");var q=[],U=function(O){q.indexOf(O)===-1&&z.indexOf(O)!==-1&&q.push(O)};if(Array.isArray(s)){for(var H=[],j=0;j{"use strict";yfe.exports={moduleType:"component",name:"modebar",layoutAttributes:c7(),supplyLayoutDefaults:lfe(),manage:vfe()}});var v7=Se((Bnr,mfe)=>{"use strict";var _ft=Qh().FROM_BL;mfe.exports=function(t,r,n){n===void 0&&(n=_ft[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 Ob=Se(d5=>{"use strict";var Bb=Zr(),y7=wy(),My=$c().id2name,xft=Rd(),gfe=v7(),bft=gm(),wft=ju().ALMOST_EQUAL,Tft=Qh().FROM_BL;d5.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,u,l,f,c,h,d,p;for(s=0;sa?r.substr(a):n.substr(i))+o}function Sft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;owft*p&&!E)){for(a=0;aF&&rez&&(z=re);var be=(z-v)/(2*T);c/=be,v=u.l2r(v),z=u.l2r(z),u.range=u._input.range=_{"use strict";var sP=Nl(),Op=Ul(),Jv=Sc(),M0=Zr(),_7=Bf(),x7=l5(),p5=Pl(),X3=yu(),wfe=Mb(),Efe=p7(),v5=hu(),kg=Qh(),kfe=Ob(),Mft=kfe.enforce,Eft=kfe.clean,Tfe=wy().doAutoRange,Cfe="start",kft="middle",Lfe="end",Cft=dd().zindexSeparator;yd.layoutStyles=function(e){return M0.syncOrAsync([Jv.doAutoMargin,zft],e)};function Lft(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function zft(e){var t=e._fullLayout,r=t._size,n=r.p,i=v5.list(e,"",!0),a,o,s,u,l,f;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(X3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),yd.drawMainTitle(e),Efe.manage(e),!t._has("cartesian"))return Jv.previousPromises(e);function c(Re,me,Be){var fe=Re._lw/2;if(Re._id.charAt(0)==="x"){if(me){if(Be==="top")return me._offset-n-fe}else return r.t+r.h*(1-(Re.position||0))+fe%1;return me._offset+me._length+n+fe}if(me){if(Be==="right")return me._offset+me._length+n+fe}else return r.l+r.w*(Re.position||0)+fe%1;return me._offset-n-fe}for(a=0;a0){Rft(e,a,l,u),s.attr({x:o,y:a,"text-anchor":n,dy:Mfe(t.yanchor)}).call(_7.positionText,o,a);var f=(t.text.match(_7.BR_TAG_ALL)||[]).length;if(f){var c=kg.LINE_SPACING*f+kg.MID_SHIFT;t.y===0&&(c=-c),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",b)})}var h=sP.selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),p=d.y+d.height,x=p+wfe.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:x,"text-anchor":n,dy:Mfe(t.yanchor)}).call(_7.positionText,o,x)}}}};function Pft(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.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=Ift(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Rft(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},u={};a.yref==="paper"&&Pft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(u[o]=r,e._fullLayout._reservedMargin[i]=u),Jv.allowAutoMargin(e,i),Jv.autoMargin(e,i,s)}function Fft(e,t){var r=e.title,n=e._size,i=0;switch(t===Cfe?i=r.pad.l:t===Lfe&&(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 qft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===kg.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 Mfe(e){return e==="top"?kg.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":kg.MID_SHIFT+"em"}function Bft(e){var t=e.title,r=kft;return M0.isRightAnchor(t)?r=Lfe:M0.isLeftAnchor(t)&&(r=Cfe),r}function Oft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=kg.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=kg.MID_SHIFT+"em"),r}yd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var Nft=u_().readPaths,Uft=Jz(),zfe=Q1().clearOutlineControllers,b7=Pl(),Pfe=yu(),Vft=_f().arrayEditor,Ife=c_(),Hft=Ife.getPathString;Rfe.exports={draw:lP,drawOne:Dfe,activateLastSelection:jft};function lP(e){var t=e._fullLayout;zfe(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 y=o.append("path").attr(u).style("opacity",b?.1:l).call(b7.stroke,c).call(b7.fill,f).call(Pfe.dashLine,b?"solid":d,b?4+h:h);if(Gft(y,e,n),p){var E=Vft(e.layout,"selections",n);y.style({cursor:"move"});var k={element:y.node(),plotinfo:i,gd:e,editHelpers:E,isActiveSelection:!0},A=Nft(s,e);Uft(A,y,k)}else y.style("pointer-events",b?"all":"none");x[b]=y}var L=x[0],_=x[1];_.node().addEventListener("click",function(){return Wft(e,L)})}}function Gft(e,t,r){var n=r.xref+r.yref;Pfe.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Wft(e,t){if(uP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){w7(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=w7,lP(e)}}}function jft(e){if(uP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=w7,lP(e)}}function w7(e){if(uP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(zfe(e),delete e._fullLayout._activeSelectionIndex,lP(e))}}});var qfe=Se((Vnr,Ffe)=>{function Zft(){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}Ffe.exports=Zft});var Ofe=Se((Hnr,Bfe)=>{function Xft(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],u=i[1],l=r[0],f=r[1];return(s-a)*(f-o)-(u-o)*(l-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],u=i[1]-n[1],l=s*o+a*u;if(l-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-a>e&&(o-f)*(a-c)/(s-c)+f-i>e&&(u=!u),o=f,s=c}return u}};return t}Bfe.exports=Xft});var Ufe=Se((Gnr,Nfe)=>{var Yft={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}};Nfe.exports=Yft});var Hfe=Se((Wnr,Vfe)=>{var m5=Ufe();function Kft(e,t,r){function n(p,x){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:null,below:null},otherFill:null}}function i(p,x,b){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=m5.create();function o(p,x,b,y,E,k){var A=t.pointsCompare(x,E);return A!==0?A:t.pointsSame(b,k)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(b,y?E:k,y?k:E)?1:-1}function s(p,x){a.insertBefore(p,function(b){var y=o(p.isStart,p.pt,x,b.isStart,b.pt,b.other.pt);return y<0})}function u(p,x){var b=m5.node({isStart:!0,pt:p.start,seg:p,primary:x,other:null,status:null});return s(b,p.end),b}function l(p,x,b){var y=m5.node({isStart:!1,pt:x.end,seg:x,primary:b,other:p,status:null});p.other=y,s(y,p.pt)}function f(p,x){var b=u(p,x);return l(b,p,x),b}function c(p,x){r&&r.segmentChop(p.seg,x),p.other.remove(),p.seg.end=x,p.other.pt=x,s(p.other,p.pt)}function h(p,x){var b=i(x,p.seg.end,p.seg);return c(p,x),f(b,p.primary)}function d(p,x){var b=m5.create();function y(H,j){var G=H.seg.start,O=H.seg.end,W=j.seg.start,re=j.seg.end;return t.pointsCollinear(G,W,re)?t.pointsCollinear(O,W,re)||t.pointAboveOrOnLine(O,W,re)?1:-1:t.pointAboveOrOnLine(G,W,re)?1:-1}function E(H){return b.findTransition(function(j){var G=y(H,j.ev);return G>0})}function k(H,j){var G=H.seg,O=j.seg,W=G.start,re=G.end,ne=O.start,be=O.end;r&&r.checkIntersection(G,O);var ze=t.linesIntersect(W,re,ne,be);if(ze===!1){if(!t.pointsCollinear(W,re,ne)||t.pointsSame(W,be)||t.pointsSame(re,ne))return!1;var Ce=t.pointsSame(W,ne),he=t.pointsSame(re,be);if(Ce&&he)return j;var te=!Ce&&t.pointBetween(W,ne,be),ke=!he&&t.pointBetween(re,ne,be);if(Ce)return ke?h(j,re):h(H,be),j;te&&(he||(ke?h(j,re):h(H,be)),h(j,W))}else ze.alongA===0&&(ze.alongB===-1?h(H,ne):ze.alongB===0?h(H,ze.pt):ze.alongB===1&&h(H,be)),ze.alongB===0&&(ze.alongA===-1?h(j,W):ze.alongA===0?h(j,ze.pt):ze.alongA===1&&h(j,re));return!1}for(var A=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let H=function(){if(C){var j=k(L,C);if(j)return j}return M?k(L,M):!1};var U=H;r&&r.segmentNew(L.seg,L.primary);var _=E(L),C=_.before?_.before.ev:null,M=_.after?_.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var v=H();if(v){if(e){var z;L.seg.myFill.below===null?z=!0:z=L.seg.myFill.above!==L.seg.myFill.below,z&&(v.seg.myFill.above=!v.seg.myFill.above)}else v.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(v.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var z;L.seg.myFill.below===null?z=!0:z=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=p,z?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?x:p,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=_.insert(m5.node({ev:L}))}else{var F=L.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(F.prev)&&b.exists(F.next)&&k(F.prev.ev,F.next.ev),r&&r.statusRemove(F.ev.seg),F.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}A.push(L.seg)}a.getHead().remove()}return r&&r.done(),A}return e?{addRegion:function(p){for(var x,b=p[p.length-1],y=0;y{function Jft(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 u={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},f=u;function c(U,H,j){return f.index=U,f.matches_head=H,f.matches_pt1=j,f===u?(f=l,!1):(f=null,!0)}for(var h=0;h{function g5(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 $ft={union:function(e,t){return g5(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return g5(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return g5(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return g5(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return g5(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};jfe.exports=$ft});var Yfe=Se((Xnr,Xfe)=>{var Qft={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(l){var f=l.slice(0,l.length-1);return e.segments({inverted:!1,regions:[f]})}for(var s=o(a[0]),u=1;u{var ect=qfe(),tct=Ofe(),Kfe=Hfe(),rct=Wfe(),_5=Zfe(),Jfe=Yfe(),E0=!1,x5=tct(),Ev;Ev={buildLog:function(e){return e===!0?E0=ect():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return x5.epsilon(e)},segments:function(e){var t=Kfe(!0,x5,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Kfe(!1,x5,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:_5.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:_5.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:_5.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:_5.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:_5.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:rct(e.segments,x5,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Jfe.toPolygon(Ev,e)},polygonToGeoJSON:function(e){return Jfe.fromPolygon(Ev,x5,e)},union:function(e,t){return b5(e,t,Ev.selectUnion)},intersect:function(e,t){return b5(e,t,Ev.selectIntersect)},difference:function(e,t){return b5(e,t,Ev.selectDifference)},differenceRev:function(e,t){return b5(e,t,Ev.selectDifferenceRev)},xor:function(e,t){return b5(e,t,Ev.selectXor)}};function b5(e,t,r){var n=Ev.segments(e),i=Ev.segments(t),a=Ev.combine(n,i),o=r(a);return Ev.polygon(o)}typeof window=="object"&&(window.PolyBool=Ev);$fe.exports=Ev});var tce=Se((Knr,ece)=>{ece.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 u=i-n,l=0,f=u-1;lo!=p>o&&a<(d-c)*(o-h)/(p-h)+c;x&&(s=!s)}return s}});var w5=Se((Jnr,rce)=>{"use strict";var A7=yL().dot,fP=ju().BADNUM,cP=rce.exports={};cP.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||y===fP||yo||x&&l(p))}function c(p,x){var b=p[0],y=p[1];if(b===fP||bi||y===fP||yo)return!1;var E=r.length,k=r[0][0],A=r[0][1],L=0,_,C,M,v,z;for(_=1;_Math.max(C,k)||y>Math.max(M,A)))if(ys||Math.abs(A7(c,l))>i)return!0;return!1};cP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(u){t.push(u);var l=n.length,f=i;n.splice(a+1);for(var c=f+1;c1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var nce=Se(($nr,ice)=>{"use strict";ice.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Mce=Se((Qnr,Sce)=>{"use strict";var ace=Qfe(),ict=tce(),S5=Ul(),nct=yu().dashStyle,T5=Pl(),act=jc(),oct=rv().makeEventData,L5=Sy(),sct=L5.freeMode,lct=L5.rectMode,M5=L5.drawMode,k7=L5.openMode,C7=L5.selectMode,oce=c_(),sce=f5(),hce=Jz(),dce=Q1().clearOutline,pce=u_(),S7=pce.handleEllipse,uct=pce.readPaths,fct=Zz().newShapes,cct=$N(),hct=T7().activateLastSelection,dP=Zr(),dct=dP.sorterAsc,vce=w5(),A5=LL(),k0=$c().getFromId,pct=l5(),vct=y5().redrawReglTraces,pP=nce(),Am=pP.MINSELECT,yct=vce.filter,L7=vce.tester,z7=Hz(),lce=z7.p2r,mct=z7.axValue,gct=z7.getTransform;function P7(e){return e.subplot!==void 0}function _ct(e,t,r,n,i){var a=!P7(n),o=sct(i),s=lct(i),u=k7(i),l=M5(i),f=C7(i),c=i==="drawline",h=i==="drawcircle",d=c||h,p=n.gd,x=p._fullLayout,b=f&&x.newselection.mode==="immediate"&&a,y=x._zoomlayer,E=n.element.getBoundingClientRect(),k=n.plotinfo,A=gct(k),L=t-E.left,_=r-E.top;x._calcInverseTransform(p);var C=dP.apply3DTransform(x._invTransform)(L,_);L=C[0],_=C[1];var M=x._invScaleX,v=x._invScaleY,z=L,T=_,F="M"+L+","+_,q=n.xaxes[0],U=n.yaxes[0],H=q._length,j=U._length,G=e.altKey&&!(M5(i)&&u),O,W,re,ne,be,ze,Ce;mce(e,p,n),o&&(O=yct([[L,_]],pP.BENDPX));var he=y.selectAll("path.select-outline-"+k.id).data([1]),te=l?x.newshape:x.newselection;l&&(n.hasText=te.label.text||te.label.texttemplate);var ke=l&&!u?te.fillcolor:"rgba(0,0,0,0)",Ee=te.line.color||(a?T5.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");he.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:l?te.opacity/2:1,"stroke-dasharray":nct(te.line.dash,te.line.width),"stroke-width":te.line.width+"px","shape-rendering":"crispEdges"}).call(T5.stroke,Ee).call(T5.fill,ke).attr("fill-rule","evenodd").classed("cursor-move",!!l).attr("transform",A).attr("d",F+"Z");var Me=y.append("path").attr("class","zoombox-corners").style({fill:T5.background,stroke:T5.defaultLine,"stroke-width":1}).attr("transform",A).attr("d","M0,0Z");if(l&&n.hasText){var Oe=y.select(".label-temp");Oe.empty()&&(Oe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Re=x._uid+pP.SELECTID,me=[],Be=vP(p,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ze=q._id,et=U._id;wce(p,Ze,et,Be);for(var gt=(p.layout||{}).selections||[],Pt=[],Qe=!1,Xe=0;Xe=0){p._fullLayout._deactivateShape(p);return}if(!l){var gt=x.clickmode;A5.done(Re).then(function(){if(A5.clear(Re),Ze===2){for(he.remove(),be=0;be-1&&yce(et,p,n.xaxes,n.yaxes,n.subplot,n,he),gt==="event"&&C5(p,void 0);act.click(p,et,k.id)}).catch(dP.error)}},n.doneFn=function(){Me.remove(),A5.done(Re).then(function(){A5.clear(Re),!b&&ne&&n.selectionDefs&&(ne.subtract=G,n.selectionDefs.push(ne),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||l)&&E5(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),f&&C5(p,Ce)}).catch(dP.error)}}function yce(e,t,r,n,i,a,o){var s=t._hoverdata,u=t._fullLayout,l=u.clickmode,f=l.indexOf("event")>-1,c=[],h,d,p,x,b,y,E,k,A,L;if(Act(s)){mce(e,t,a),h=vP(t,r,n,i);var _=Sct(s,h),C=_.pointNumbers.length>0;if(C?Mct(h,_):Ect(h)&&(E=fce(_))){for(o&&o.remove(),L=0;L=0}function Tct(e){return e._fullLayout._activeSelectionIndex>=0}function E5(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;wct(i)&&i._fullLayout._deactivateShape(i),Tct(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=M5(r),u=C7(r);if(s||u){var l=o.selectAll(".select-outline-"+n.id);if(l&&i._fullLayout._outlining){var f;s&&(f=fct(l,e)),f&&S5.call("_guiRelayout",i,{shapes:f});var c;u&&!P7(e)&&(c=cct(l,e)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,S5.call("_guiRelayout",i,{selections:c}).then(function(){t&&hct(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function uce(e){return e._id}function vP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(uce),o=r.map(uce),s,u,l;for(l=0;l0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Mct(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 k5(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var Ze=cce(e,!0);if(Ze.length){var et=Ze[0].xref,gt=Ze[0].yref;if(et&>){var Pt=Tce(Ze),Qe=Ace([k0(e,et,"x"),k0(e,gt,"y")]);Qe(me,Pt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:fe&&C5(e,me),h._reselect=!1}if(!o&&h._deselect){var Xe=h._deselect;s=Xe.xref,u=Xe.yref,Lct(s,u,f)||wce(e,s,u,n),fe&&(me.points.length?C5(e,me):R7(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Cct(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";Ece.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 z5=Se((tar,kce)=>{"use strict";kce.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 Nb=Se((iar,zce)=>{"use strict";var Cce=F7(),Lce=uc(),yP=dd(),Rct=_f().templatedArray,rar=z5();zce.exports=Rct("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Lce({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:Cce.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Cce.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",yP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",yP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",yP.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",yP.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:Lce({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Sm=Se((nar,Pce)=>{"use strict";Pce.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Ey=Se((aar,Ice)=>{"use strict";Ice.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Zc=Se((oar,Oce)=>{"use strict";var Dce=Gc().axisHoverFormat,Fct=Du().texttemplateAttrs,qct=Du().hovertemplateAttrs,Rce=Xf(),Bct=uc(),Oct=Id().dash,Nct=Id().pattern,Uct=yu(),Vct=Sm(),mP=vu().extendFlat,Hct=Ey();function Fce(e){return{valType:"any",dflt:0,editType:"calc"}}function qce(e){return{valType:"any",editType:"calc"}}function Bce(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Oce.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:Fce("x"),yperiod:Fce("y"),xperiod0:qce("x0"),yperiod0:qce("y0"),xperiodalignment:Bce("x"),yperiodalignment:Bce("y"),xhoverformat:Dce("x"),yhoverformat:Dce("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:Fct({},{}),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:qct({},{keys:Vct.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:mP({},Oct,{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:Hct(!0),fillgradient:mP({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:Nct,marker:mP({symbol:{valType:"enumerated",values:Uct.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:mP({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Rce("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"},Rce("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:Bct({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var q7=Se((lar,Vce)=>{"use strict";var Nce=Nb(),Uce=Zc().line,Gct=Id().dash,gP=vu().extendFlat,Wct=_c().overrideAll,jct=_f().templatedArray,sar=z5();Vce.exports=Wct(jct("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:gP({},Nce.xref,{}),yref:gP({},Nce.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:Uce.color,width:gP({},Uce.width,{min:1,dflt:1}),dash:gP({},Gct,{dflt:"dot"})}}),"arraydraw","from-root")});var jce=Se((uar,Wce)=>{"use strict";var Hce=Zr(),_P=hu(),Zct=Jd(),Xct=q7(),Gce=c_();Wce.exports=function(t,r){Zct(t,r,{name:"selections",handleItemDefaults:Yct});for(var n=r.selections,i=0;i{"use strict";Zce.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 P5=Se((car,Jce)=>{"use strict";var Kct=Ul(),Yce=Zr(),Kce=$c();Jce.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=Kct.subplotsRegistry.cartesian,s=o.idRegex,u=i._subplots,l=u.xaxis,f=u.yaxis,c=u.cartesian,h=i._has("cartesian"),d=0;d{"use strict";var $ce=T7(),I5=Mce();Qce.exports={moduleType:"component",name:"selections",layoutAttributes:q7(),supplyLayoutDefaults:jce(),supplyDrawNewSelectionDefaults:Xce(),includeBasePlot:P5()("selections"),draw:$ce.draw,drawOne:$ce.drawOne,reselect:I5.reselect,prepSelect:I5.prepSelect,clearOutline:I5.clearOutline,clearSelectionsCache:I5.clearSelectionsCache,selectOnClick:I5.selectOnClick}});var G7=Se((dar,_he)=>{"use strict";var V7=Nl(),C0=Zr(),ehe=C0.numberFormat,Jct=cd(),$ct=Ez(),xP=Ul(),uhe=C0.strTranslate,Qct=Bf(),the=Pl(),d_=yu(),eht=jc(),rhe=hu(),tht=Ty(),rht=gp(),fhe=Sy(),bP=fhe.selectingOrDrawing,iht=fhe.freeMode,nht=Qh().FROM_TL,aht=l5(),oht=y5().redrawReglTraces,sht=Sc(),O7=$c().getFromId,lht=nh().prepSelect,uht=nh().clearOutline,fht=nh().selectOnClick,B7=v7(),H7=dd(),ihe=H7.MINDRAG,nv=H7.MINZOOM,nhe=!0;function cht(e,t,r,n,i,a,o,s){var u=e._fullLayout._zoomlayer,l=o+s==="nsew",f=(o+s).length===1,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G;r+=t.yaxis._shift;function O(){if(c=t.xaxis,h=t.yaxis,k=c._length,A=h._length,y=c._offset,E=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,o&&s)for(var je=t.overlays,tt=0;tt=0){Je._fullLayout._deactivateShape(Je);return}var Mt=Je._fullLayout.clickmode;if(U7(Je),je===2&&!f&&At(),l)Mt.indexOf("select")>-1&&fht(tt,Je,x,b,t.id,ne),Mt.indexOf("event")>-1&&eht.click(Je,tt,t.id);else if(je===1&&f){var Vt=o?h:c,Kt=o==="s"||s==="w"?0:1,ir=Vt._name+".range["+Kt+"]",fr=hht(Vt,Kt),Ot="left",De="middle";if(Vt.fixedrange)return;o?(De=o==="n"?"top":"bottom",Vt.side==="right"&&(Ot="right")):s==="e"&&(Ot="right"),Je._context.showAxisRangeEntryBoxes&&V7.select(re).call(Qct.makeEditable,{gd:Je,immediate:!0,background:Je._fullLayout.paper_bgcolor,text:String(fr),fill:Vt.tickfont?Vt.tickfont.color:"#444",horizontalAlign:Ot,verticalAlign:De}).on("edit",function(_e){var Fe=Vt.d2r(_e);Fe!==void 0&&xP.call("_guiRelayout",Je,ir,Fe)})}}rht.init(ne);var Ce,he,te,ke,Ee,Me,Oe,Re,me,Be;function fe(je,tt,Je){var Mt=re.getBoundingClientRect();Ce=tt-Mt.left,he=Je-Mt.top,e._fullLayout._calcInverseTransform(e);var Vt=C0.apply3DTransform(e._fullLayout._invTransform)(Ce,he);Ce=Vt[0],he=Vt[1],te={l:Ce,r:Ce,w:0,t:he,b:he,h:0},ke=e._hmpixcount?e._hmlumcount/e._hmpixcount:Jct(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+k+"V"+A+"H0V0",Me=!1,Oe="xy",Be=!1,Re=dhe(u,ke,y,E,Ee),me=phe(u,y,E)}function Ze(je,tt){if(e._transitioningWithDuration)return!1;var Je=Math.max(0,Math.min(k,j*je+Ce)),Mt=Math.max(0,Math.min(A,G*tt+he)),Vt=Math.abs(Je-Ce),Kt=Math.abs(Mt-he);te.l=Math.min(Ce,Je),te.r=Math.max(Ce,Je),te.t=Math.min(he,Mt),te.b=Math.max(he,Mt);function ir(){Oe="",te.r=te.l,te.t=te.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)Vt>nv||Kt>nv?(Oe="xy",Vt/k>Kt/A?(Kt=Vt*A/k,he>Mt?te.t=he-Kt:te.b=he+Kt):(Vt=Kt*k/A,Ce>Je?te.l=Ce-Vt:te.r=Ce+Vt),me.attr("d",wP(te))):ir();else if(_.isSubplotConstrained)if(Vt>nv||Kt>nv){Oe="xy";var fr=Math.min(te.l/k,(A-te.b)/A),Ot=Math.max(te.r/k,(A-te.t)/A);te.l=fr*k,te.r=Ot*k,te.b=(1-fr)*A,te.t=(1-Ot)*A,me.attr("d",wP(te))}else ir();else!M||Kt0){var _e;if(_.isSubplotConstrained||!C&&M.length===1){for(_e=0;_e1&&(ir.maxallowed!==void 0&&z===(ir.range[0]1&&(fr.maxallowed!==void 0&&T===(fr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function pht(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function dhe(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",uhe(r,n)).attr("d",i+"Z")}function phe(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:the.background,stroke:the.defaultLine,"stroke-width":1,opacity:0}).attr("transform",uhe(t,r)).attr("d","M0,0Z")}function vhe(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"),yhe(e,t,i,a)}function yhe(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 U7(e){V7.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function mhe(e){nhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long"),nhe=!1)}function vht(e,t){return"M"+(e.l-.5)+","+(t-nv-.5)+"h-3v"+(2*nv+1)+"h3ZM"+(e.r+.5)+","+(t-nv-.5)+"h3v"+(2*nv+1)+"h-3Z"}function yht(e,t){return"M"+(t-nv-.5)+","+(e.t-.5)+"v-3h"+(2*nv+1)+"v3ZM"+(t-nv-.5)+","+(e.b+.5)+"v3h"+(2*nv+1)+"v-3Z"}function wP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,nv)/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 she(e,t,r,n,i){for(var a=!1,o={},s={},u,l,f,c,h=(i||{}).xaHash,d=(i||{}).yaHash,p=0;p{"use strict";var mht=Nl(),TP=jc(),ght=gp(),_ht=Ty(),ky=G7().makeDragBox,md=dd().DRAGGERSIZE;AP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){mht.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"),u=o.split("y");return s[0]===u[0]?Number(s[1]||1)-Number(u[1]||1):Number(s[0]||1)-Number(u[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,u=o.yaxis;if(!o.mainplot){var l=ky(t,o,s._offset,u._offset,s._length,u._length,"ns","ew");l.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&TP.hover(t,h,a)},TP.hover(t,h,a),t._fullLayout._lasthover=l,t._fullLayout._hoversubplot=a},l.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,ght.unhover(t,h))},t._context.showAxisDragHandles&&(ky(t,o,s._offset-md,u._offset-md,md,md,"n","w"),ky(t,o,s._offset+s._length,u._offset-md,md,md,"n","e"),ky(t,o,s._offset-md,u._offset+u._length,md,md,"s","w"),ky(t,o,s._offset+s._length,u._offset+u._length,md,md,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var f=s._mainLinePosition;s.side==="top"&&(f-=md),ky(t,o,s._offset+s._length*.1,f,s._length*.8,md,"","ew"),ky(t,o,s._offset,f,s._length*.1,md,"","w"),ky(t,o,s._offset+s._length*.9,f,s._length*.1,md,"","e")}if(a===u._mainSubplot){var c=u._mainLinePosition;u.side!=="right"&&(c-=md),ky(t,o,c,u._offset+u._length*.1,md,u._length*.8,"ns",""),ky(t,o,c,u._offset+u._length*.9,md,u._length*.1,"s",""),ky(t,o,c,u._offset,md,u._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,TP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,TP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},AP.updateFx(t)}};AP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";_ht(t._draggers,r)}});var whe=Se((yar,bhe)=>{"use strict";var xhe=Ul();bhe.exports=function(t){for(var r=xhe.layoutArrayContainers,n=xhe.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var xht=yg(),j7=vL(),D5=H1(),bht=EL().sorterAsc,Z7=Ul();R5.containerArrayMatch=whe();var wht=R5.isAddVal=function(t){return t==="add"||xht(t)},The=R5.isRemoveVal=function(t){return t===null||t==="remove"};R5.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=Z7.getComponentMethod(o,"supplyLayoutDefaults"),u=Z7.getComponentMethod(o,"draw"),l=Z7.getComponentMethod(o,"drawOne"),f=i.replot||i.recalc||s===j7||u===j7,c=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&D5.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(The(d))r.set(null);else if(Array.isArray(d))r.set(d);else return D5.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(s(c,h),u(t),!0)}var p=Object.keys(n).map(Number).sort(bht),x=r.get(),b=x||[],y=a(h,o).get(),E=[],k=-1,A=b.length,L,_,C,M,v,z,T,F;for(L=0;Lb.length-(T?0:1)){D5.warn("index out of range",o,C);continue}if(z!==void 0)v.length>1&&D5.warn("Insertion & removal are incompatible with edits to the same index.",o,C),The(z)?E.push(C):T?(z==="add"&&(z={}),b.splice(C,0,z),y&&y.splice(C,0,{})):D5.warn("Unrecognized full object edit value",o,C,z),k===-1&&(k=C);else for(_=0;_=0;L--)b.splice(E[L],1),y&&y.splice(E[L],1);if(b.length?x||r.set(b):r.set(null),f)return!1;if(s(c,h),l!==j7){var q;if(k===-1)q=p;else{for(A=Math.max(b.length,A),q=[],L=0;L=k));L++)q.push(C);for(L=k;L{"use strict";var khe=_u(),gar=OB(),Che=Ul(),kv=Zr(),F5=Sc(),Lhe=$c(),zhe=Pl(),q5=Lhe.cleanId,Tht=Lhe.getFromTrace,X7=Che.traceIs;Cy.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&kv.log("Clearing previous rejected promises from queue."),e._promises=[]};Cy.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=(F5.subplotsRegistry.cartesian||{}).attrRegex,i=(F5.subplotsRegistry.polar||{}).attrRegex,a=(F5.subplotsRegistry.ternary||{}).attrRegex,o=(F5.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&&Cy.cleanLayout(e.template.layout),e};function Y3(e,t){var r=e[t],n=t.charAt(0);r&&r!=="paper"&&(e[t]=q5(r,n,!0))}Cy.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}Cy.hasParent=function(e,t){for(var r=Ehe(t);r;){if(r in e)return!0;r=Ehe(r)}return!1};var Mht=["x","y","z"];Cy.clearAxisTypes=function(e,t,r){for(var n=0;n{"use strict";var kP=Nl(),Eht=_u(),kht=sO(),Tl=Zr(),bc=Tl.nestedProperty,J7=y3(),av=yne(),L0=Ul(),RP=_3(),Pu=Sc(),Np=hu(),Cht=wN(),Lht=Rd(),Y7=yu(),zht=Pl(),Pht=W7().initInteractions,Iht=Zv(),Dht=nh().clearOutline,qhe=ub().dfltConfig,MP=Ahe(),Bh=Phe(),Yf=y5(),p_=_c(),Rht=dd().AX_NAME_PATTERN,K7=0,Ihe=5;function Fht(e,t,r,n){var i;if(e=Tl.getGraphDiv(e),J7.init(e),Tl.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=J7.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Tl.isPlotDiv(e)&&Tl.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return Pf.addFrames(e,i)}Ohe(e,n),r||(r={}),kP.select(e).classed("js-plotly-plot",!0),Y7.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var u=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(Bh.cleanData(t),u?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||u)&&(e.layout=Bh.cleanLayout(r)),Pu.supplyDefaults(e);var l=e._fullLayout,f=l._has("cartesian");l._replotting=!0,(u||l._shouldCreateBgLayer)&&(ndt(e),l._shouldCreateBgLayer&&delete l._shouldCreateBgLayer),Y7.initGradients(e),Y7.initPatterns(e),u&&Np.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&Pu.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 Nhe(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]),LP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&LP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Uht(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&&f=0&&f0&&typeof M.parts[T]!="string";)T--;var F=M.parts[T],q=M.parts[T-1]+"."+F,U=M.parts.slice(0,T).join("."),H=bc(e.layout,U).get(),j=bc(n,U).get(),G=M.get();if(v!==void 0){y[C]=v,E[C]=F==="reverse"?v:Cg(G);var O=RP.getLayoutValObject(n,M.parts);if(O&&O.impliedEdits&&v!==null)for(var W in O.impliedEdits)k(Tl.relativeAttr(C,W),O.impliedEdits[W]);if(["width","height"].indexOf(C)!==-1)if(v){k("autosize",null);var re=C==="height"?"width":"height";k(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")k("width",v?null:n.width),k("height",v?null:n.height);else if(q.match(Yhe))_(q),bc(n,U+"._inputRange").set(null);else if(q.match(Khe)){_(q),bc(n,U+"._inputRange").set(null);var ne=bc(n,U).get();ne._inputDomain&&(ne._input.domain=ne._inputDomain.slice())}else q.match(Jhe)&&bc(n,U+"._inputDomain").set(null);if(F==="type"){L=H;var be=j.type==="linear"&&v==="log",ze=j.type==="log"&&v==="linear";if(be||ze){if(!L||!L.range)k(U+".autorange",!0);else if(j.autorange)be&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],he=L.range[1];be?(Ce<=0&&he<=0&&k(U+".autorange",!0),Ce<=0?Ce=he/1e6:he<=0&&(he=Ce/1e6),k(U+".range[0]",Math.log(Ce)/Math.LN10),k(U+".range[1]",Math.log(he)/Math.LN10)):(k(U+".range[0]",Math.pow(10,Ce)),k(U+".range[1]",Math.pow(10,he)))}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,j,v,k),L0.getComponentMethod("images","convertCoords")(e,j,v,k)}else k(U+".autorange",!0),k(U+".range",null);bc(n,U+"._inputRange").set(null)}else if(F.match(Rht)){var te=bc(n,C).get(),ke=(v||{}).type;(!ke||ke==="-")&&(ke="linear"),L0.getComponentMethod("annotations","convertCoords")(e,te,ke,k),L0.getComponentMethod("images","convertCoords")(e,te,ke,k)}var Ee=MP.containerArrayMatch(C);if(Ee){f=Ee.array,c=Ee.index;var Me=Ee.property,Oe=O||{editType:"calc"};c!==""&&Me===""&&(MP.isAddVal(v)?E[C]=null:MP.isRemoveVal(v)?E[C]=(bc(r,f).get()||[])[c]:Tl.warn("unrecognized full object value",t)),p_.update(b,Oe),l[f]||(l[f]={});var Re=l[f][c];Re||(Re=l[f][c]={}),Re[Me]=v,delete t[C]}else F==="reverse"?(H.range?H.range.reverse():(k(U+".autorange",!0),H.range=[1,0]),j.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(v===!1&&G!==!1||v!==!1&&G===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(v==="lasso"||v==="select")&&!(G==="lasso"||G==="select")?b.plot=!0:O?p_.update(b,O):b.calc=!0,M.set(v))}}for(f in l){var me=MP.applyContainerArrayChanges(e,a(r,f),l[f],b,a);me||(b.plot=!0)}for(var Be in A){L=Np.getFromId(e,Be);var fe=L&&L._constraintGroup;if(fe){b.calc=!0;for(var Ze in fe)A[Ze]||(Np.getFromId(e,Ze)._constraintShrinkable=!0)}}(Qhe(e)||t.height||t.width)&&(b.plot=!0);var et=n.shapes;for(c=0;c1;)if(n.pop(),r=bc(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Zht(e,t){for(var r=0;r=i.length?i[0]:i[l]:i}function s(l){return Array.isArray(a)?l>=a.length?a[0]:a[l]:a}function u(l,f){var c=0;return function(){if(l&&++c===f)return l()}}return new Promise(function(l,f){function c(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var F=n._frameQueue.pop();F.onInterrupt&&F.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(F){if(F.length!==0){for(var q=0;qn._timeToNext&&p()};F()}var b=0;function y(F){return Array.isArray(i)?b>=i.length?F.transitionOpts=i[b]:F.transitionOpts=i[0]:F.transitionOpts=i,b++,F}var E,k,A=[],L=t==null,_=Array.isArray(t),C=!L&&!_&&Tl.isPlainObject(t);if(C)A.push({type:"object",data:y(Tl.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(E=0;E0&&zz)&&T.push(k);A=T}}A.length>0?h(A):(e.emit("plotly_animated"),l())})}function edt(e,t,r){if(e=Tl.getGraphDiv(e),t==null)return Promise.resolve();if(!Tl.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,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var l=s.length+t.length*2,f=[],c={};for(n=t.length-1;n>=0;n--)if(Tl.isPlainObject(t[n])){var h=t[n].name,d=(u[h]||c[h]||{}).name,p=t[n].name,x=u[d]||c[d];d&&p&&typeof p=="number"&&x&&K7M.index?-1:C.index=0;n--){if(i=f[n].frame,typeof i.name=="number"&&Tl.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[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=Pu.modifyFrames,u=Pu.modifyFrames,l=[e,o],f=[e,a];return av&&av.add(e,s,l,u,f),Pu.modifyFrames(e,a)}function rdt(e){e=Tl.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Pu.cleanPlot([],{},r,t),Pu.purge(e),J7.purge(e),t._container&&t._container.remove(),delete e._context,e}function idt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Tl.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Tl.inverseTransformMatrix(Tl.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 ndt(e){var t=kP.select(e),r=e._fullLayout;if(r._calcInverseTransform=idt,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),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={};kP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Tl.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Iht.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")}Pf.animate=Qht;Pf.addFrames=edt;Pf.deleteFrames=tdt;Pf.addTraces=Whe;Pf.deleteTraces=jhe;Pf.extendTraces=Hhe;Pf.moveTraces=$7;Pf.prependTraces=Ghe;Pf.newPlot=Nht;Pf._doPlot=Fht;Pf.purge=rdt;Pf.react=Kht;Pf.redraw=Oht;Pf.relayout=B5;Pf.restyle=zP;Pf.setPlotConfig=qht;Pf.update=IP;Pf._guiRelayout=eU(B5);Pf._guiRestyle=eU(zP);Pf._guiUpdate=eU(IP);Pf._storeDirectGUIEdit=Ght});var Lg=Se(Mm=>{"use strict";var adt=Ul();Mm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Mm.getRedrawFunc=function(e){return function(){adt.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 ede=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return ede.createObjectURL(e)};Mm.revokeObjectURL=function(e){return ede.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=odt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Mm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function odt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var rU=Nl(),war=Zr(),sdt=yu(),ldt=Pl(),Tar=Zv(),tU=/"/g,N5="TOBESTRIPPED",udt=new RegExp('("'+N5+")|("+N5+'")',"g");function fdt(e){var t=rU.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 cdt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}tde.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,u=i.height,l;a.insert("rect",":first-child").call(sdt.setRect,0,0,s,u).call(ldt.fill,i.paper_bgcolor);var f=i._basePlotModules||[];for(l=0;l{"use strict";var hdt=Zr(),ddt=pb().EventEmitter,U5=Lg();function pdt(e){var t=e.emitter||new ddt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",u=e.canvas,l=e.scale||1,f=e.width||300,c=e.height||150,h=l*f,d=l*c,p=u.getContext("2d",{willReadFrequently:!0}),x=new a,b,y;s==="svg"||hdt.isSafari()?y=U5.encodeSVG(o):(b=U5.createBlob(o,"svg"),y=U5.createObjectURL(b)),u.width=h,u.height=d,x.onload=function(){var E;switch(b=null,U5.revokeObjectURL(y),s!=="svg"&&p.drawImage(x,0,0,h,d),s){case"jpeg":E=u.toDataURL("image/jpeg");break;case"png":E=u.toDataURL("image/png");break;case"webp":E=u.toDataURL("image/webp");break;case"svg":E=y;break;default:var k="Image format is not jpeg, png, svg or webp.";if(i(new Error(k)),!e.promise)return t.emit("error",k)}n(E),e.promise||t.emit("success",E)},x.onerror=function(E){if(b=null,U5.revokeObjectURL(y),i(E),!e.promise)return t.emit("error",E)},x.src=y});return e.promise?r:t}rde.exports=pdt});var nU=Se((Mar,ade)=>{"use strict";var ide=_u(),nde=qP(),vdt=Sc(),Em=Zr(),V5=Lg(),ydt=BP(),mdt=OP(),gdt=QC().version,iU={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 _dt(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(_){return!(_ in t)||Em.validate(t[_],iU[_])}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(iU.format.values,", "," or ")+".");var s={};function u(_,C){return Em.coerce(t,s,iU,_,C)}var l=u("format"),f=u("width"),c=u("height"),h=u("scale"),d=u("setBackground"),p=u("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var b=Em.extendFlat({},n);f?b.width=f:t.width===null&&ide(a.width)&&(b.width=a.width),c?b.height=c:t.height===null&&ide(a.height)&&(b.height=a.height);var y=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),E=V5.getRedrawFunc(x);function k(){return new Promise(function(_){setTimeout(_,V5.getDelay(x._fullLayout))})}function A(){return new Promise(function(_,C){var M=ydt(x,l,h),v=x._fullLayout.width,z=x._fullLayout.height;function T(){nde.purge(x),document.body.removeChild(x)}if(l==="full-json"){var F=vdt.graphJson(x,!1,"keepdata","object",!0,!0);return F.version=gdt,F=JSON.stringify(F),T(),_(p?F:V5.encodeJSON(F))}if(T(),l==="svg")return _(p?M:V5.encodeSVG(M));var q=document.createElement("canvas");q.id=Em.randstr(),mdt({format:l,width:v,height:z,scale:h,canvas:q,svg:M,promise:!0}).then(_).catch(C)})}function L(_){return p?_.replace(V5.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,C){nde.newPlot(x,r,b,y).then(E).then(k).then(A).then(function(M){_(L(M))}).catch(function(M){C(M)})})}ade.exports=_dt});var ude=Se((Ear,lde)=>{"use strict";var z0=Zr(),xdt=Sc(),bdt=_3(),wdt=ub().dfltConfig,Ly=z0.isPlainObject,Vb=Array.isArray,ode=z0.isArrayOrTypedArray;lde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=bdt.get(),i=[],a={_context:z0.extendFlat({},wdt)},o,s;Vb(t)?(a.data=z0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(gd("array","data"))),Ly(r)?(a.layout=z0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(gd("object","layout"))),xdt.supplyDefaults(a);for(var u=a._fullData,l=o.length,f=0;fc.length&&n.push(gd("unused",i,l.concat(c.length)));var y=c.length,E=Array.isArray(b);E&&(y=Math.min(y,b.length));var k,A,L,_,C;if(h.dimensions===2)for(A=0;Ac[A].length&&n.push(gd("unused",i,l.concat(A,c[A].length)));var M=c[A].length;for(k=0;k<(E?Math.min(M,b[A].length):M);k++)L=E?b[A][k]:b,_=f[A][k],C=c[A][k],z0.validate(_,L)?C!==_&&C!==+_&&n.push(gd("dynamic",i,l.concat(A,k),_,C)):n.push(gd("value",i,l.concat(A,k),_))}else n.push(gd("array",i,l.concat(A),f[A]));else for(A=0;A{"use strict";var Cdt=Zr(),UP=Lg();function Ldt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var u,l;if(i)return u=UP.createBlob(e,r),l=UP.createObjectURL(u),n.href=l,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),UP.revokeObjectURL(l),u=null,o(t);if(Cdt.isSafari()){var f=r==="svg"?",":";base64,";return UP.octetStream(f+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}fde.exports=Ldt});var aU=Se((Lar,dde)=>{"use strict";var hde=Zr(),zdt=nU(),Pdt=cde(),Car=Lg();function Idt(e,t){var r;return hde.isPlainObject(e)||(r=hde.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=zdt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Pdt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}dde.exports=Idt});var gde=Se(oU=>{"use strict";var Cv=Zr(),Lv=Cv.isPlainObject,pde=_3(),vde=Sc(),Ddt=zf(),yde=_f(),mde=ub().dfltConfig;oU.makeTemplate=function(e){e=Cv.isPlainObject(e)?e:Cv.getGraphDiv(e),e=Cv.extendDeep({_context:mde},{data:e.data,layout:e.layout}),vde.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 p={};H5(d,p,Fdt.bind(null,d));var x=Cv.coerce(d,{},Ddt,"type"),b=n.data[x];b||(b=n.data[x]=[]),b.push(p)}),H5(r,n.layout,Rdt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lv(i)){var a=i.layout,o,s,u,l,f,c;Lv(a)&&VP(a,n.layout);var h=i.data;if(Lv(h)){for(s in n.data)if(u=h[s],Array.isArray(u)){for(f=n.data[s],c=f.length,l=u.length,o=0;oy?o.push({code:"unused",traceType:d,templateCount:b,dataCount:y}):y>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:y})}}function E(k,A){for(var L in k)if(L.charAt(0)!=="_"){var _=k[L],C=P0(k,L,A);Lv(_)?(Array.isArray(k)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:C,templateitemname:_.templateitemname}),E(_,C)):Array.isArray(_)&&qdt(_)&&E(_,C)}}if(E({data:u,layout:s},""),o.length)return o.map(Bdt)};function qdt(e){for(var t=0;t{"use strict";var rd=qP();Uc._doPlot=rd._doPlot;Uc.newPlot=rd.newPlot;Uc.restyle=rd.restyle;Uc.relayout=rd.relayout;Uc.redraw=rd.redraw;Uc.update=rd.update;Uc._guiRestyle=rd._guiRestyle;Uc._guiRelayout=rd._guiRelayout;Uc._guiUpdate=rd._guiUpdate;Uc._storeDirectGUIEdit=rd._storeDirectGUIEdit;Uc.react=rd.react;Uc.extendTraces=rd.extendTraces;Uc.prependTraces=rd.prependTraces;Uc.addTraces=rd.addTraces;Uc.deleteTraces=rd.deleteTraces;Uc.moveTraces=rd.moveTraces;Uc.purge=rd.purge;Uc.addFrames=rd.addFrames;Uc.deleteFrames=rd.deleteFrames;Uc.animate=rd.animate;Uc.setPlotConfig=rd.setPlotConfig;var Odt=DM().getGraphDiv,Ndt=tP().eraseActiveShape;Uc.deleteActiveShape=function(e){return Ndt(Odt(e))};Uc.toImage=nU();Uc.validate=ude();Uc.downloadImage=aU();var _de=gde();Uc.makeTemplate=_de.makeTemplate;Uc.validateTemplate=_de.validateTemplate});var K3=Se((Iar,bde)=>{"use strict";var sU=Zr(),Udt=Ul();bde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,u=Udt.getComponentMethod("calendars","handleTraceDefaults");if(u(t,r,["x","y"],n),a){var l=sU.minRowLength(a);o?s=Math.min(l,sU.minRowLength(o)):(s=l,i("y0"),i("dy"))}else{if(!o)return 0;s=sU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var zy=Se((Dar,Ade)=>{"use strict";var wde=Zr().dateTick0,Vdt=ju(),Hdt=Vdt.ONEWEEK;function Tde(e,t){return e%Hdt===0?wde(t,1):wde(t,0)}Ade.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Tde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Tde(s,r.ycalendar)),i("yperiodalignment"))}}});var Ede=Se((Rar,Mde)=>{"use strict";var Sde=["orientation","groupnorm","stackgaps"];Mde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,u=a[s];u||(u=a[s]={});var l=u[o],f=!1;l?l.traces.push(r):(l=u[o]={traceIndices:[],traces:[r]},f=!0);for(var c={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var kde=Pl(),Cde=Dp().hasColorscale,Lde=ed(),Gdt=ec();zde.exports=function(t,r,n,i,a,o){var s=Gdt.isBubble(t),u=(t.line||{}).color,l;if(o=o||{},u&&(n=u),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),Cde(t,"marker")&&Lde(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||(u&&!Array.isArray(u)&&r.marker.color!==u?l=u:s?l=kde.background:l=kde.defaultLine,a("marker.line.color",l),Cde(t,"marker.line")&&Lde(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 f=a("marker.gradient.type");f!=="none"&&a("marker.gradient.color")}}});var I0=Se((qar,Pde)=>{"use strict";var Wdt=Zr().isArrayOrTypedArray,jdt=Dp().hasColorscale,Zdt=ed();Pde.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),jdt(t,"line"))Zdt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var u=(Wdt(s)?!1:s)||n;a("line.color",u)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var J3=Se((Bar,Ide)=>{"use strict";Ide.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var D0=Se((Oar,Dde)=>{"use strict";var Xdt=Zr();Dde.exports=function(e,t,r,n,i){i=i||{},n("textposition"),Xdt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Py=Se((Nar,Fde)=>{"use strict";var GP=Pl(),Rde=Zr().isArrayOrTypedArray;function Ydt(e){for(var t=GP.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var qde=Zr(),Kdt=Ul(),Jdt=Zc(),$dt=Sm(),$3=ec(),Qdt=K3(),ept=zy(),tpt=Ede(),rpt=$v(),ipt=I0(),Bde=J3(),npt=D0(),apt=Py(),opt=Zr().coercePattern;Ode.exports=function(t,r,n,i){function a(d,p){return qde.coerce(t,r,Jdt,d,p)}var o=Qdt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){ept(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=tpt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var u=!s&&o<$dt.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("mode",u),$3.hasMarkers(r)&&rpt(t,r,n,i,a,{gradient:!0}),$3.hasLines(r)&&(ipt(t,r,n,i,a,{backoff:!0}),Bde(t,r,a),a("connectgaps"),a("line.simplify")),$3.hasText(r)&&(a("texttemplate"),npt(t,r,i,a));var l=[];($3.hasMarkers(r)||$3.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),l.push("points")),a("fill",s?s.fillDflt:"none"),r.fill!=="none"&&(apt(t,r,n,a,{moduleHasFillgradient:!0}),$3.hasLines(r)||Bde(t,r,a),opt(a,"fillpattern",r.fillcolor,!1));var f=(r.line||{}).color,c=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&l.push("fills"),a("hoveron",l.join("+")||"points"),r.hoveron!=="fills"&&a("hovertemplate");var h=Kdt.getComponentMethod("errorbars","supplyDefaults");h(t,r,f||c||n,{axis:"y"}),h(t,r,f||c||n,{axis:"x",inherit:"y"}),qde.coerceSelectionMarkerOpacity(r,a)}}});var Hb=Se((Var,Ude)=>{"use strict";var spt=Ob().getAxisGroup;Ude.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],u=spt(n,s)+o,l=n._alignmentOpts||{},f=i("alignmentgroup"),c=l[u];c||(c=l[u]={});var h=c[f];h?h.traces.push(r):h=c[f]={traces:[r],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=i("offsetgroup")||"",p=h.offsetGroups,x=p[d];r._offsetIndex=0,(a!=="group"||d)&&(x||(x=p[d]={offsetIndex:Object.keys(p).length}),r._offsetIndex=x.offsetIndex)}});var lU=Se((Har,Vde)=>{"use strict";var lpt=Zr(),upt=Hb(),fpt=Zc();Vde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return lpt.coerce(i._input,i,fpt,h)}if(r.scattermode==="group")for(a=0;a=0;f--){var c=t[f];if(c.type==="scatter"&&c.xaxis===u.xaxis&&c.yaxis===u.yaxis){c.opacity=void 0;break}}}}}});var Gde=Se((Gar,Hde)=>{"use strict";var cpt=Zr(),hpt=UL();Hde.exports=function(e,t){function r(i,a){return cpt.coerce(e,t,hpt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var Iy=Se((War,jde)=>{"use strict";var dpt=_u(),Wde=Zr(),ppt=Wde.dateTime2ms,WP=Wde.incrementMonth,vpt=ju(),ypt=vpt.ONEAVGMONTH;jde.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(dpt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var u=+o.substring(1);if(u>0&&Math.round(u)===u)s=u;else return{vals:i}}for(var l=r.calendar,f=a==="start",c=a==="end",h=t[n+"period0"],d=ppt(h,l)||0,p=[],x=[],b=[],y=i.length,E=0;Ek;)_=WP(_,-s,l);for(;_<=k;)_=WP(_,s,l);L=WP(_,-s,l)}else{for(A=Math.round((k-d)/o),_=d+A*o;_>k;)_-=o;for(;_<=k;)_+=o;L=_-o}p[E]=f?L:c?_:(L+_)/2,x[E]=L,b[E]=_}return{vals:p,starts:x,ends:b}}});var R0=Se((jar,Xde)=>{"use strict";var uU=Dp().hasColorscale,fU=Rp(),Zde=ec();Xde.exports=function(t,r){Zde.hasLines(r)&&uU(r,"line")&&fU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),Zde.hasMarkers(r)&&(uU(r,"marker")&&fU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),uU(r,"marker.line")&&fU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var km=Se((Zar,Yde)=>{"use strict";var ch=Zr();Yde.exports=function(t,r){for(var n=0;n{"use strict";var Kde=Zr();Jde.exports=function(t,r){Kde.isArrayOrTypedArray(r.selectedpoints)&&Kde.tagSelected(t,r)}});var q0=Se((Yar,npe)=>{"use strict";var $de=_u(),hU=Zr(),G5=hu(),Qde=Iy(),cU=ju().BADNUM,dU=ec(),mpt=R0(),gpt=km(),_pt=F0();function xpt(e,t){var r=e._fullLayout,n=t._xA=G5.getFromId(e,t.xaxis||"x","x"),i=t._yA=G5.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=Qde(t,n,"x",a),u=Qde(t,i,"y",o),l=s.vals,f=u.vals,c=t._length,h=new Array(c),d=t.ids,p=pU(t,r,n,i),x=!1,b,y,E,k,A,L;rpe(r,t);var _="x",C="y",M;if(p)hU.pushUnique(p.traceIndices,t.index),b=p.orientation==="v",b?(C="s",M="x"):(_="s",M="y"),A=p.stackgaps==="interpolate";else{var v=tpe(t,c);epe(e,t,n,i,l,f,v)}var z=!!t.xperiodalignment,T=!!t.yperiodalignment;for(y=0;yy&&h[k].gap;)k--;for(L=h[k].s,E=h.length-1;E>k;E--)h[E].s=L;for(;y{"use strict";ape.exports=jP;var bpt=Zr().distinctVals;function jP(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 B0=_u(),v_=Zr().isArrayOrTypedArray,Q3=ju().BADNUM,wpt=Ul(),W5=hu(),Tpt=Ob().getAxisGroup,ZP=ope();function Apt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],u=[],l=0;lu+o||!B0(s))}for(var f=0;f{"use strict";var cpe=q0(),hpe=Gb().setGroupPositions;function Fpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],u=[],l=0;lv[f]&&f{"use strict";var Bpt=yu(),gpe=ju(),j5=gpe.BADNUM,_pe=gpe.LOG_CLIP,vpe=_pe+.5,ype=_pe-.5,XP=Zr(),Opt=XP.segmentsIntersect,mpe=XP.constrain,xU=Sm();xpe.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",u=i._length,l=a._length,f=r.backoff,c=n.marker,h=r.connectGaps,d=r.baseTolerance,p=r.shape,x=p==="linear",b=n.fill&&n.fill!=="none",y=[],E=xU.minTolerance,k=t.length,A=new Array(k),L=0,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne;function be(De){var _e=t[De];if(!_e)return!1;var Fe=r.linearized?i.l2p(_e.x):i.c2p(_e.x),Pe=r.linearized?a.l2p(_e.y):a.c2p(_e.y);if(Fe===j5){if(o&&(Fe=i.c2p(_e.x,!0)),Fe===j5)return!1;s&&Pe===j5&&(Fe*=Math.abs(i._m*l*(i._m>0?vpe:ype)/(a._m*u*(a._m>0?vpe:ype)))),Fe*=1e3}if(Pe===j5){if(s&&(Pe=a.c2p(_e.y,!0)),Pe===j5)return!1;Pe*=1e3}return[Fe,Pe]}function ze(De,_e,Fe,Pe){var Ie=Fe-De,lt=Pe-_e,ye=.5-De,ue=.5-_e,de=Ie*Ie+lt*lt,ht=Ie*ye+lt*ue;if(ht>0&&ht1||Math.abs(ye.y-Fe[0][1])>1)&&(ye=[ye.x,ye.y],Pe&&ke(ye,De)Oe||De[1]me)return[mpe(De[0],Me,Oe),mpe(De[1],Re,me)]}function xt(De,_e){if(De[0]===_e[0]&&(De[0]===Me||De[0]===Oe)||De[1]===_e[1]&&(De[1]===Re||De[1]===me))return!0}function _t(De,_e){var Fe=[],Pe=Tt(De),Ie=Tt(_e);return Pe&&Ie&&xt(Pe,Ie)||(Pe&&Fe.push(Pe),Ie&&Fe.push(Ie)),Fe}function Ct(De,_e,Fe){return function(Pe,Ie){var lt=Tt(Pe),ye=Tt(Ie),ue=[];if(lt&&ye&&xt(lt,ye))return ue;lt&&ue.push(lt),ye&&ue.push(ye);var de=2*XP.constrain((Pe[De]+Ie[De])/2,_e,Fe)-((lt||Pe)[De]+(ye||Ie)[De]);if(de){var ht;lt&&ye?ht=de>0==lt[De]>ye[De]?lt:ye:ht=lt||ye,ht[De]+=de}return ue}}var jt;p==="linear"||p==="spline"?jt=Xe:p==="hv"||p==="vh"?jt=_t:p==="hvh"?jt=Ct(0,Me,Oe):p==="vhv"&&(jt=Ct(1,Re,me));function At(De,_e){var Fe=_e[0]-De[0],Pe=(_e[1]-De[1])/Fe,Ie=(De[1]*_e[0]-_e[1]*De[0])/Fe;return Ie>0?[Pe>0?Me:Oe,me]:[Pe>0?Oe:Me,Re]}function Te(De){var _e=De[0],Fe=De[1],Pe=_e===A[L-1][0],Ie=Fe===A[L-1][1];if(!(Pe&&Ie))if(L>1){var lt=_e===A[L-2][0],ye=Fe===A[L-2][1];Pe&&(_e===Me||_e===Oe)&<?ye?L--:A[L-1]=De:Ie&&(Fe===Re||Fe===me)&&ye?lt?L--:A[L-1]=De:A[L++]=De}else A[L++]=De}function nt(De){A[L-1][0]!==De[0]&&A[L-1][1]!==De[1]&&Te([et,gt]),Te(De),Pt=null,et=gt=0}var ut=XP.isArrayOrTypedArray(c);function ct(De){if(De&&f&&(De.i=_,De.d=t,De.trace=n,De.marker=ut?c[De.i]:c,De.backoff=f),Ce=De[0]/u,he=De[1]/l,fe=De[0]Oe?Oe:0,Ze=De[1]me?me:0,fe||Ze){if(!L)A[L++]=[fe||De[0],Ze||De[1]];else if(Pt){var _e=jt(Pt,De);_e.length>1&&(nt(_e[0]),A[L++]=_e[1])}else Qe=jt(A[L-1],De)[0],A[L++]=Qe;var Fe=A[L-1];fe&&Ze&&(Fe[0]!==fe||Fe[1]!==Ze)?(Pt&&(et!==fe&>!==Ze?Te(et&>?At(Pt,De):[et||fe,gt||Ze]):et&>&&Te([et,gt])),Te([fe,Ze])):et-fe&>-Ze&&Te([fe||et,Ze||gt]),Pt=De,et=fe,gt=Ze}else Pt&&nt(jt(Pt,De)[0]),A[L++]=De}for(_=0;_te(T,rt))break;M=T,O=U[0]*q[0]+U[1]*q[1],O>j?(j=O,v=T,F=!1):O=t.length||!T)break;ct(T),C=T}}Pt&&Te([et||Pt[0],gt||Pt[1]]),y.push(A.slice(0,L))}var je=p.slice(p.length-1);if(f&&je!=="h"&&je!=="v"){for(var tt=!1,Je=-1,Mt=[],Vt=0;Vt{"use strict";var bpe={tonextx:1,tonexty:1,tonext:1};wpe.exports=function(t,r,n){var i,a,o,s,u,l={},f=!1,c=-1,h=0,d=-1;for(a=0;a=0?u=d:(u=d=h,h++),u{"use strict";var Dy=Nl(),Npt=Ul(),Z5=Zr(),tT=Z5.ensureSingle,Ape=Z5.identity,hh=yu(),rT=ec(),Upt=bU(),Vpt=wU(),YP=w5().tester;Spe.exports=function(t,r,n,i,a,o){var s,u,l=!a,f=!!a&&a.duration>0,c=Vpt(t,r,n);if(s=i.selectAll("g.trace").data(c,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(),Hpt(t,s,r),f){o&&(u=o());var h=Dy.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});h.each(function(){i.selectAll("g.trace").each(function(d,p){Tpe(t,p,r,d,c,this,a)})})}else s.each(function(d,p){Tpe(t,p,r,d,c,this,a)});l&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function Hpt(e,t,r){t.each(function(n){var i=tT(Dy.select(this),"g","fills");hh.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,Ape);s.enter().append("g"),s.exit().each(function(u){a[u]=null}).remove(),s.order().each(function(u){a[u]=tT(Dy.select(this),"path","js-fill")})})}function Tpe(e,t,r,n,i,a,o){var s=e._context.staticPlot,u;Gpt(e,t,r,n,i);var l=!!o&&o.duration>0;function f(Ct){return l?Ct.transition():Ct}var c=r.xaxis,h=r.yaxis,d=n[0].trace,p=d.line,x=Dy.select(a),b=tT(x,"g","errorbars"),y=tT(x,"g","lines"),E=tT(x,"g","points"),k=tT(x,"g","text");if(Npt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;f(x).style("opacity",d.opacity);var A,L,_=d.fill.charAt(d.fill.length-1);_!=="x"&&_!=="y"&&(_="");var C,M;_==="y"?(C=1,M=h.c2p(0,!0)):_==="x"&&(C=0,M=c.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var v="",z=[],T=d._prevtrace,F=null,q=null;T&&(v=T._prevRevpath||"",L=T._nextFill,z=T._ownPolygons,F=T._fillsegments,q=T._fillElement);var U,H,j="",G="",O,W,re,ne,be,ze,Ce=[];d._polygons=[];var he=[],te=[],ke=Z5.noop;if(A=d._ownFill,rT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(O=hh.steps(p.shape),W=hh.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?O=W=function(Ct){var jt=Ct[Ct.length-1];return Ct.length>1&&Ct[0][0]===jt[0]&&Ct[0][1]===jt[1]?hh.smoothclosed(Ct.slice(1),p.smoothing):hh.smoothopen(Ct,p.smoothing)}:O=W=function(Ct){return"M"+Ct.join("L")},re=function(Ct){return W(Ct.reverse())},te=Upt(n,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),he=new Array(te.length);var Ee=0;for(u=0;u=s[0]&&x.x<=s[1]&&x.y>=u[0]&&x.y<=u[1]}),h=Math.ceil(c.length/f),d=0;i.forEach(function(x,b){var y=x[0].trace;rT.hasMarkers(y)&&y.marker.maxdisplayed>0&&b{"use strict";Mpe.exports={container:"marker",min:"cmin",max:"cmax"}});var JP=Se((ior,Epe)=>{"use strict";var KP=hu();Epe.exports=function(t,r,n){var i={},a={_fullLayout:n},o=KP.getFromTrace(a,r,"x"),s=KP.getFromTrace(a,r,"y"),u=t.orig_x;u===void 0&&(u=t.x);var l=t.orig_y;return l===void 0&&(l=t.y),i.xLabel=KP.tickText(o,o.c2l(u),!0).text,i.yLabel=KP.tickText(s,s.c2l(l),!0).text,i}});var ov=Se((nor,kpe)=>{"use strict";var TU=Nl(),nT=yu(),Wpt=Ul();function jpt(e){var t=TU.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=TU.select(this),i=r.trace||r[0].trace;AU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=TU.select(this),i=r.trace||r[0].trace;SU(n,i,e)}),t.selectAll("g.trace path.js-line").call(nT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nT.fillGroupStyle,e,!1),Wpt.getComponentMethod("errorbars","style")(t)}function AU(e,t,r){nT.pointStyle(e.selectAll("path.point"),t,r)}function SU(e,t,r){nT.textPointStyle(e.selectAll("text"),t,r)}function Zpt(e,t,r){var n=t[0].trace;n.selectedpoints?(nT.selectedPointStyle(r.selectAll("path.point"),n),nT.selectedTextStyle(r.selectAll("text"),n)):(AU(r,n,e),SU(r,n,e))}kpe.exports={style:jpt,stylePoints:AU,styleText:SU,styleOnSelect:Zpt}});var oT=Se((aor,Cpe)=>{"use strict";var aT=Pl(),Xpt=ec();Cpe.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&aT.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&&aT.opacity(a)?a:o&&aT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?aT.opacity(i)<.3?aT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&aT.opacity(n)&&Xpt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var sT=Se((oor,zpe)=>{"use strict";var $P=Zr(),Lpe=jc(),Ypt=Ul(),Kpt=oT(),MU=Pl(),Jpt=$P.fillText;zpe.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,u=t.ya,l=s.c2p(r),f=u.c2p(n),c=[l,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,x=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(G){if(p){var O=s.c2p(G.xStart),W=s.c2p(G.xEnd);return l>=Math.min(O,W)&&l<=Math.max(O,W)?0:1/0}var re=Math.max(3,G.mrc||0),ne=1-1/re,be=Math.abs(s.c2p(G.x)-l);return be=Math.min(O,W)&&f<=Math.max(O,W)?0:1/0}var re=Math.max(3,G.mrc||0),ne=1-1/re,be=Math.abs(u.c2p(G.y)-f);return beCe!=me>=Ce&&(Me=ke[te-1][0],Oe=ke[te][0],me-Re&&(Ee=Me+(Oe-Me)*(Ce-Re)/(me-Re),re=Math.min(re,Ee),ne=Math.max(ne,Ee)));return re=Math.max(re,0),ne=Math.min(ne,s._length),{x0:re,x1:ne,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=F(o._fillElement)&&!F(o._fillExclusionElement);if(U){var H=q(o._polygons);H===null&&(H={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var j=MU.defaultLine;return MU.opacity(o.fillcolor)?j=o.fillcolor:MU.opacity((o.line||{}).color)&&(j=o.line.color),$P.extendFlat(t,{distance:t.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:j,hovertemplate:!1}),delete t.index,o.text&&!$P.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var lT=Se((sor,Ipe)=>{"use strict";var Ppe=ec();Ipe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u,l,f,c,h=!Ppe.hasMarkers(s)&&!Ppe.hasText(s);if(h)return[];if(r===!1)for(u=0;u{"use strict";Dpe.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var kU=Se((uor,Bpe)=>{"use strict";var X5=Ul().traceIs,EU=L3();Bpe.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&($pt(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function $pt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=Qpt(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],u={noMultiCategory:!X5(a,"cartesian")||X5(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(u.noMultiCategory=!0),u.autotypenumbers=e.autotypenumbers,qpe(a,n)){var l=Fpe(a),f=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(qpe(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Fpe(e){return{v:"x",h:"y"}[e.orientation||"v"]}function qpe(e,t){var r=Fpe(e),n=X5(e,"box-violin"),i=X5(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var QP=Se((cor,Ope)=>{"use strict";var evt=yp().isTypedArraySpec;function tvt(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||evt(a),s;o&&(s="array");var u=n("categoryorder",s),l;u==="array"&&(l=n("categoryarray")),!o&&u==="array"&&(u=r.categoryorder="trace"),u==="trace"?r._initialCategories=[]:u==="array"?r._initialCategories=l.slice():(l=tvt(r,i).sort(),u==="category ascending"?r._initialCategories=l:u==="category descending"&&(r._initialCategories=l.reverse()))}}});var Y5=Se((hor,Upe)=>{"use strict";var Npe=cd().mix,rvt=Ih(),ivt=Zr();Upe.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(C,M){return ivt.coerce2(t,r,i.attributes,C,M)}var s=o("linecolor",a),u=o("linewidth"),l=n("showline",i.showLine||!!s||!!u);l||(delete r.linecolor,delete r.linewidth);var f=Npe(a,i.bgColor,i.blend||rvt.lightFraction).toRgbString(),c=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),p=n("showgrid",i.showGrid||!!c||!!h||!!d);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var x=Npe(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",x),y=o("minor.gridwidth",r.gridwidth||1),E=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!b||!!y||!!E);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var A=o("zerolinecolor",a),L=o("zerolinewidth"),_=n("zeroline",i.showGrid||!!A||!!L);_||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var J5=Se((dor,Zpe)=>{"use strict";var Vpe=_u(),nvt=Ul(),K5=Zr(),avt=_f(),ovt=Jd(),CU=Rd(),Hpe=xb(),Gpe=T3(),svt=e_(),lvt=t_(),uvt=QP(),fvt=Y5(),cvt=wN(),Wpe=gm(),eI=dd().WEEKDAY_PATTERN,hvt=dd().HOUR_PATTERN;Zpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},u=i.splomStash||{},l=n("visible",!i.visibleDflt),f=r._template||{},c=r.type||f.type||"-",h;if(c==="date"){var d=nvt.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(c==="date"||c==="linear")&&n("ticklabelindex");var p="";(!i.noTicklabelposition||c==="multicategory")&&(p=K5.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",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),Wpe(r,a),cvt(t,r,n,i),uvt(t,r,n,i),c!=="category"&&!i.noHover&&n("hoverformat");var x=n("color"),b=x!==CU.color.dflt?x:s.color,y=u.label||a._dfltTitle[o];if(lvt(t,r,n,c,i),!l)return r;n("title.text",y),K5.coerceFont(n,"title.font",s,{overrideDflt:{size:K5.bigFont(s.size),color:b}}),Hpe(t,r,n,c);var E=i.hasMinor;if(E&&(avt.newContainer(r,"minor"),Hpe(t,r,n,c,{isMinor:!0})),svt(t,r,n,c,i),Gpe(t,r,n,i),E){var k=i.isMinor;i.isMinor=!0,Gpe(t,r,n,i),i.isMinor=k}fvt(t,r,n,{dfltColor:x,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:E,attributes:CU}),E&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var A=c==="multicategory";if(!i.noTickson&&(c==="category"||A)&&(r.ticks||r.showgrid)){var L;A&&(L="boundaries");var _=n("tickson",L);_==="boundaries"&&delete r.ticklabelposition}if(A){var C=n("showdividers");C&&(n("dividercolor"),n("dividerwidth"))}if(c==="date")if(ovt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:dvt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var M=0;M=2){var o="",s,u;if(a.length===2){for(s=0;s<2;s++)if(u=jpe(a[s]),u){o=eI;break}}var l=n("pattern",o);if(l===eI)for(s=0;s<2;s++)u=jpe(a[s]),u&&(t.bounds[s]=a[s]=u-1);if(l)for(s=0;s<2;s++)switch(u=a[s],l){case eI:if(!Vpe(u)){t.enabled=!1;return}if(u=+u,u!==Math.floor(u)||u<0||u>=7){t.enabled=!1;return}t.bounds[s]=a[s]=u;break;case hvt:if(!Vpe(u)){t.enabled=!1;return}if(u=+u,u<0||u>24){t.enabled=!1;return}t.bounds[s]=a[s]=u;break}if(r.autorange===!1){var f=r.range;if(f[0]f[1]){t.enabled=!1;return}}else if(a[0]>f[0]&&a[1]{"use strict";var vvt=_u(),tI=Zr();Xpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,u=i.grid,l=i.overlayingDomain,f,c,h,d,p,x;u&&(c=u._domains[s][u._axisMap[r._id]],f=u._anchors[r._id],c&&(h=u[s+"side"].split(" ")[0],d=u.domain[s][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(vvt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,p=0,x=!1;var b=tI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:f}},"anchor"),y=tI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var E=n("autoshift");E&&(d=y==="left"?l[0]:l[1],x=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",d)}n("automargin",x);var k=!1;if(o.length&&(k=tI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var A=n("domain",c);A[0]>A[1]-1/4096&&(r.domain=c),tI.noneOrAll(t.domain,r.domain,c),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var ive=Se((vor,rve)=>{"use strict";var Wb=Zr(),Ype=Pl(),yvt=rv().isUnifiedHover,mvt=XN(),Kpe=_f(),gvt=s3(),Jpe=Rd(),_vt=kU(),$pe=J5(),xvt=Ob(),Qpe=rI(),zU=$c(),Cm=zU.id2name,eve=zU.name2id,bvt=dd().AX_ID_PATTERN,tve=Ul(),iI=tve.traceIs,LU=tve.getComponentMethod;function nI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}rve.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},u={},l={},f={},c={},h={},d={},p={},x,b;for(x=0;x{"use strict";var wvt=Nl(),nve=Ul(),aI=Zr(),Qv=yu(),oI=hu();ave.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){oI.redrawComponents(t);return}function o(b){var y=b.xaxis,E=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qv.setTranslate,0,0).call(Qv.setScale,1,1),b.plot.call(Qv.setTranslate,y._offset,E._offset).call(Qv.setScale,1,1);var k=b.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(Qv.setPointGroupScale,1,1),k.selectAll(".textpoint").call(Qv.setTextPointsScale,1,1),k.call(Qv.hideOutsideRangePoints,b)}function s(b,y){var E=b.plotinfo,k=E.xaxis,A=E.yaxis,L=k._length,_=A._length,C=!!b.xr1,M=!!b.yr1,v=[];if(C){var z=aI.simpleMap(b.xr0,k.r2l),T=aI.simpleMap(b.xr1,k.r2l),F=z[1]-z[0],q=T[1]-T[0];v[0]=(z[0]*(1-y)+y*T[0]-z[0])/(z[1]-z[0])*L,v[2]=L*(1-y+y*q/F),k.range[0]=k.l2r(z[0]*(1-y)+y*T[0]),k.range[1]=k.l2r(z[1]*(1-y)+y*T[1])}else v[0]=0,v[2]=L;if(M){var U=aI.simpleMap(b.yr0,A.r2l),H=aI.simpleMap(b.yr1,A.r2l),j=U[1]-U[0],G=H[1]-H[0];v[1]=(U[1]*(1-y)+y*H[1]-U[1])/(U[0]-U[1])*_,v[3]=_*(1-y+y*G/j),A.range[0]=k.l2r(U[0]*(1-y)+y*H[0]),A.range[1]=A.l2r(U[1]*(1-y)+y*H[1])}else v[1]=0,v[3]=_;oI.drawOne(t,k,{skipTitle:!0}),oI.drawOne(t,A,{skipTitle:!0}),oI.redrawComponents(t,[k._id,A._id]);var O=C?L/v[2]:1,W=M?_/v[3]:1,re=C?v[0]:0,ne=M?v[1]:0,be=C?v[0]/v[2]*L:0,ze=M?v[1]/v[3]*_:0,Ce=k._offset-be,he=A._offset-ze;E.clipRect.call(Qv.setTranslate,re,ne).call(Qv.setScale,1/O,1/W),E.plot.call(Qv.setTranslate,Ce,he).call(Qv.setScale,O,W),Qv.setPointGroupScale(E.zoomScalePts,1/O,1/W),Qv.setTextPointsScale(E.zoomScaleTxt,1/O,1/W)}var u;i&&(u=i());function l(){for(var b={},y=0;yn.duration?(l(),d=window.cancelAnimationFrame(x)):d=window.requestAnimationFrame(x)}return c=Date.now(),d=window.requestAnimationFrame(x),Promise.resolve()}});var Th=Se(xp=>{"use strict";var lI=Nl(),sve=Ul(),jb=Zr(),Tvt=Sc(),Avt=yu(),lve=Dd().getModuleCalcData,y_=$c(),Ry=dd(),Svt=Zv(),Nf=jb.ensureSingle;function sI(e,t,r){return jb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Zb=Ry.zindexSeparator;xp.name="cartesian";xp.attr=["xaxis","yaxis"];xp.idRoot=["x","y"];xp.idRegex=Ry.idRegex;xp.attrRegex=Ry.attrRegex;xp.attributes=Rpe();xp.layoutAttributes=Rd();xp.supplyLayoutDefaults=ive();xp.transitionAxes=ove();xp.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},u={},l,f,c;for(l=0;l0){var d=h.id;if(d.indexOf(Zb)!==-1)continue;d+=Zb+(l+1),h=jb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],x,b=0;b1&&(L+=Zb+A),k.push(s+L),o=0;o1,c=t.mainplotinfo;if(!t.mainplot||f)if(l)t.xlines=Nf(n,"path","xlines-above"),t.ylines=Nf(n,"path","ylines-above"),t.xaxislayer=Nf(n,"g","xaxislayer-above"),t.yaxislayer=Nf(n,"g","yaxislayer-above");else{if(!o){var h=Nf(n,"g","layer-subplot");t.shapelayer=Nf(h,"g","shapelayer"),t.imagelayer=Nf(h,"g","imagelayer"),c&&f?(t.minorGridlayer=c.minorGridlayer,t.gridlayer=c.gridlayer,t.zerolinelayer=c.zerolinelayer):(t.minorGridlayer=Nf(n,"g","minor-gridlayer"),t.gridlayer=Nf(n,"g","gridlayer"),t.zerolinelayer=Nf(n,"g","zerolinelayer"));var d=Nf(n,"g","layer-between");t.shapelayerBetween=Nf(d,"g","shapelayer"),t.imagelayerBetween=Nf(d,"g","imagelayer"),Nf(n,"path","xlines-below"),Nf(n,"path","ylines-below"),t.overlinesBelow=Nf(n,"g","overlines-below"),Nf(n,"g","xaxislayer-below"),Nf(n,"g","yaxislayer-below"),t.overaxesBelow=Nf(n,"g","overaxes-below")}t.overplot=Nf(n,"g","overplot"),t.plot=Nf(t.overplot,"g",i),o||(t.xlines=Nf(n,"path","xlines-above"),t.ylines=Nf(n,"path","ylines-above"),t.overlinesAbove=Nf(n,"g","overlines-above"),Nf(n,"g","xaxislayer-above"),Nf(n,"g","yaxislayer-above"),t.overaxesAbove=Nf(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+u),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+u))}else{var p=c.plotgroup,x=i+"-x",b=i+"-y";t.minorGridlayer=c.minorGridlayer,t.gridlayer=c.gridlayer,t.zerolinelayer=c.zerolinelayer,Nf(c.overlinesBelow,"path",x),Nf(c.overlinesBelow,"path",b),Nf(c.overaxesBelow,"g",x),Nf(c.overaxesBelow,"g",b),t.plot=Nf(c.overplot,"g",i),Nf(c.overlinesAbove,"path",x),Nf(c.overlinesAbove,"path",b),Nf(c.overaxesAbove,"g",x),Nf(c.overaxesAbove,"g",b),t.xlines=p.select(".overlines-"+s).select("."+x),t.ylines=p.select(".overlines-"+u).select("."+b),t.xaxislayer=p.select(".overaxes-"+s).select("."+x),t.yaxislayer=p.select(".overaxes-"+u).select("."+b)}o||(l||(sI(t.minorGridlayer,"g",t.xaxis._id),sI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(y_.idSort),sI(t.gridlayer,"g",t.xaxis._id),sI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(y_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function cve(e,t){if(e){var r={};e.each(function(u){var l=u[0],f=lI.select(this);f.remove(),hve(l,t),r[l]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o{"use strict";var uI=ec();dve.exports={hasLines:uI.hasLines,hasMarkers:uI.hasMarkers,hasText:uI.hasText,isBubble:uI.isBubble,attributes:Zc(),layoutAttributes:UL(),supplyDefaults:Nde(),crossTraceDefaults:lU(),supplyLayoutDefaults:Gde(),calc:q0().calc,crossTraceCalc:ppe(),arraysToCalcdata:km(),plot:iT(),colorbar:ep(),formatLabels:JP(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:sT(),selectPoints:lT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Th(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var mve=Se((_or,yve)=>{"use strict";var Evt=Nl(),kvt=Pl(),vve=F7(),PU=Zr(),Cvt=PU.strScale,Lvt=PU.strRotate,zvt=PU.strTranslate;yve.exports=function(t,r,n){var i=t.node(),a=vve[n.arrowhead||0],o=vve[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),u=(n.arrowwidth||1)*(n.startarrowsize||1),l=r.indexOf("start")>=0,f=r.indexOf("end")>=0,c=a.backoff*s+n.standoff,h=o.backoff*u+n.startstandoff,d,p,x,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=d.x-p.x,E=d.y-p.y;if(x=Math.atan2(E,y),b=x+Math.PI,c&&h&&c+h>Math.sqrt(y*y+E*E)){U();return}if(c){if(c*c>y*y+E*E){U();return}var k=c*Math.cos(x),A=c*Math.sin(x);p.x+=k,p.y+=A,t.attr({x2:p.x,y2:p.y})}if(h){if(h*h>y*y+E*E){U();return}var L=h*Math.cos(x),_=h*Math.sin(x);d.x-=L,d.y-=_,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C{"use strict";var gve=Nl(),IU=Ul(),Pvt=Sc(),g_=Zr(),DU=g_.strTranslate,Q5=hu(),Xb=Pl(),zg=yu(),_ve=jc(),RU=Bf(),FU=Ty(),$5=gp(),Ivt=_f().arrayEditor,Dvt=mve();wve.exports={draw:Rvt,drawOne:xve,drawRaw:bve};function Rvt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Ie="right":Ie="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ie]}for(var Re=!1,me=["x","y"],Be=0;Be1)&&(et===Ze?(rt=gt.r2fraction(t["a"+fe]),(rt<0||rt>1)&&(Re=!0)):Re=!0),jt=gt._offset+gt.r2p(t[fe]),nt=.5}else{var je=ct==="domain";fe==="x"?(Te=t[fe],jt=je?gt._offset+gt._length*Te:jt=s.l+s.w*Te):(Te=1-t[fe],jt=je?gt._offset+gt._length*Te:jt=s.t+s.h*Te),nt=t.showarrow?.5:Te}if(t.showarrow){Ct.head=jt;var tt=t["a"+fe];if(ut=Qe*Oe(.5,t.xanchor)-Xe*Oe(.5,t.yanchor),et===Ze){var Je=Q5.getRefType(et);Je==="domain"?(fe==="y"&&(tt=1-tt),Ct.tail=gt._offset+gt._length*tt):Je==="paper"?fe==="y"?(tt=1-tt,Ct.tail=s.t+s.h*tt):Ct.tail=s.l+s.w*tt:Ct.tail=gt._offset+gt.r2p(tt),At=ut}else Ct.tail=jt+tt,At=ut+tt;Ct.text=Ct.tail+ut;var Mt=o[fe==="x"?"width":"height"];if(Ze==="paper"&&(Ct.head=g_.constrain(Ct.head,1,Mt-1)),et==="pixel"){var Vt=-Math.max(Ct.tail-3,Ct.text),Kt=Math.min(Ct.tail+3,Ct.text)-Mt;Vt>0?(Ct.tail+=Vt,Ct.text+=Vt):Kt>0&&(Ct.tail-=Kt,Ct.text-=Kt)}Ct.tail+=_t,Ct.head+=_t}else ut=Tt*Oe(nt,xt),At=ut,Ct.text=jt+ut;Ct.text+=_t,ut+=_t,At+=_t,t["_"+fe+"padplus"]=Tt/2+At,t["_"+fe+"padminus"]=Tt/2-At,t["_"+fe+"size"]=Tt,t["_"+fe+"shift"]=ut}if(Re){C.remove();return}var ir=0,fr=0;if(t.align!=="left"&&(ir=(te-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(fr=(ke-he)*(t.valign==="middle"?.5:1)),be)ne.select("svg").attr({x:z+ir-1,y:z+fr}).call(zg.setClipUrl,F?x:null,e);else{var Ot=z+fr-ze.top,De=z+ir-ze.left;j.call(RU.positionText,De,Ot).call(zg.setClipUrl,F?x:null,e)}q.select("rect").call(zg.setRect,z,z,te,ke),T.call(zg.setRect,M/2,M/2,Ee-M,Me-M),C.call(zg.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Me/2)),k.attr({transform:"rotate("+y+","+b.x.text+","+b.y.text+")"});var _e=function(Pe,Ie){E.selectAll(".annotation-arrow-g").remove();var lt=b.x.head,ye=b.y.head,ue=b.x.tail+Pe,de=b.y.tail+Ie,ht=b.x.text+Pe,Et=b.y.text+Ie,St=g_.rotationXYMatrix(y,ht,Et),Zt=g_.apply2DTransform(St),qr=g_.apply2DTransform2(St),Lr=+T.attr("width"),vr=+T.attr("height"),Er=ht-.5*Lr,si=Er+Lr,Ei=Et-.5*vr,Si=Ei+vr,xi=[[Er,Ei,Er,Si],[Er,Si,si,Si],[si,Si,si,Ei],[si,Ei,Er,Ei]].map(qr);if(!xi.reduce(function(Tr,Rr){return Tr^!!g_.segmentsIntersect(lt,ye,lt+1e6,ye+1e6,Rr[0],Rr[1],Rr[2],Rr[3])},!1)){xi.forEach(function(Tr){var Rr=g_.segmentsIntersect(ue,de,lt,ye,Tr[0],Tr[1],Tr[2],Tr[3]);Rr&&(ue=Rr.x,de=Rr.y)});var Hi=t.arrowwidth,Jr=t.arrowcolor,ci=t.arrowside,Di=E.append("g").style({opacity:Xb.opacity(Jr)}).classed("annotation-arrow-g",!0),Lt=Di.append("path").attr("d","M"+ue+","+de+"L"+lt+","+ye).style("stroke-width",Hi+"px").call(Xb.stroke,Xb.rgb(Jr));if(Dvt(Lt,ci,t),u.annotationPosition&&Lt.node().parentNode&&!n){var vt=lt,Dt=ye;if(t.standoff){var Bt=Math.sqrt(Math.pow(lt-ue,2)+Math.pow(ye-de,2));vt+=t.standoff*(ue-lt)/Bt,Dt+=t.standoff*(de-ye)/Bt}var sr=Di.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ue-vt)+","+(de-Dt),transform:DU(vt,Dt)}).style("stroke-width",Hi+6+"px").call(Xb.stroke,"rgba(0,0,0,0)").call(Xb.fill,"rgba(0,0,0,0)"),br,zr;$5.init({element:sr.node(),gd:e,prepFn:function(){var Tr=zg.getTranslate(C);br=Tr.x,zr=Tr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Tr,Rr){var Br=Zt(br,zr),oi=Br[0]+Tr,vi=Br[1]+Rr;C.call(zg.setTranslate,oi,vi),d("x",m_(i,Tr,"x",s,t)),d("y",m_(a,Rr,"y",s,t)),t.axref===t.xref&&d("ax",m_(i,Tr,"ax",s,t)),t.ayref===t.yref&&d("ay",m_(a,Rr,"ay",s,t)),Di.attr("transform",DU(Tr,Rr)),k.attr({transform:"rotate("+y+","+oi+","+vi+")"})},doneFn:function(){IU.call("_guiRelayout",e,p());var Tr=document.querySelector(".js-notes-box-panel");Tr&&Tr.redraw(Tr.selectedObj)}})}}};if(t.showarrow&&_e(0,0),A){var Fe;$5.init({element:C.node(),gd:e,prepFn:function(){Fe=k.attr("transform")},moveFn:function(Pe,Ie){var lt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",m_(i,Pe,"ax",s,t)):d("ax",t.ax+Pe),t.ayref===t.yref?d("ay",m_(a,Ie,"ay",s.w,t)):d("ay",t.ay+Ie),_e(Pe,Ie);else{if(n)return;var ye,ue;if(i)ye=m_(i,Pe,"x",s,t);else{var de=t._xsize/s.w,ht=t.x+(t._xshift-t.xshift)/s.w-de/2;ye=$5.align(ht+Pe/s.w,de,0,1,t.xanchor)}if(a)ue=m_(a,Ie,"y",s,t);else{var Et=t._ysize/s.h,St=t.y-(t._yshift+t.yshift)/s.h-Et/2;ue=$5.align(St-Ie/s.h,Et,0,1,t.yanchor)}d("x",ye),d("y",ue),(!i||!a)&&(lt=$5.getCursor(i?.5:ye,a?.5:ue,t.xanchor,t.yanchor))}k.attr({transform:DU(Pe,Ie)+Fe}),FU(C,lt)},clickFn:function(Pe,Ie){t.captureevents&&e.emit("plotly_clickannotation",_(Ie))},doneFn:function(){FU(C),IU.call("_guiRelayout",e,p());var Pe=document.querySelector(".js-notes-box-panel");Pe&&Pe.redraw(Pe.selectedObj)}})}}u.annotationText?j.call(RU.makeEditable,{delegate:C,gd:e}).call(G).on("edit",function(W){t.text=W,this.call(G),d("text",W),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),IU.call("_guiRelayout",e,p())}):j.call(G)}});var kve=Se((bor,Eve)=>{"use strict";var Tve=Zr(),Fvt=Ul(),Ave=_f().arrayEditor;Eve.exports={hasClickToShow:qvt,onClick:Bvt};function qvt(e,t){var r=Mve(e,t);return r.on.length>0||r.explicitOff.length>0}function Bvt(e,t){var r=Mve(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,u;if(n.length||i.length){for(s=0;s{"use strict";var qU=Zr(),uT=Pl();Cve.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=uT.opacity(o);i("borderpad");var u=i("borderwidth"),l=i("showarrow");i("text",l?" ":n._dfltTitle.annotation),i("textangle"),qU.coerceFont(i,"font",n.font),i("width"),i("align");var f=i("height");if(f&&i("valign"),l){var c=i("arrowside"),h,d;c.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),c.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:uT.defaultLine),i("arrowwidth",(s&&u||1)*2),i("standoff"),i("startstandoff")}var p=i("hovertext"),x=n.hoverlabel||{};if(p){var b=i("hoverlabel.bgcolor",x.bgcolor||(uT.opacity(a)?uT.rgb(a):uT.defaultLine)),y=i("hoverlabel.bordercolor",x.bordercolor||uT.contrast(b)),E=qU.extendFlat({},x.font);E.color||(E.color=y),qU.coerceFont(i,"hoverlabel.font",E)}i("captureevents",!!p)}});var zve=Se((Tor,Lve)=>{"use strict";var OU=Zr(),Yb=hu(),Ovt=Jd(),Nvt=BU(),Uvt=Nb();Lve.exports=function(t,r){Ovt(t,r,{name:"annotations",handleItemDefaults:Vvt})};function Vvt(e,t,r){function n(k,A){return OU.coerce(e,t,Uvt,k,A)}var i=n("visible"),a=n("clicktoshow");if(i||a){Nvt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],u=[-10,-30],l={_fullLayout:r},f=0;f<2;f++){var c=s[f],h=Yb.coerceRef(e,t,l,c,"","paper");if(h!=="paper"){var d=Yb.getFromId(l,h);d._annIndices.push(t._index)}if(Yb.coercePosition(t,l,n,h,c,.5),o){var p="a"+c,x=Yb.coerceRef(e,t,l,p,"pixel",["pixel","paper"]);x!=="pixel"&&x!==h&&(x=t[p]="pixel");var b=x==="pixel"?u[f]:.4;Yb.coercePosition(t,l,n,x,p,b)}n(c+"anchor"),n(c+"shift")}if(OU.noneOrAll(e,t,["x","y"]),o&&OU.noneOrAll(e,t,["ax","ay"]),a){var y=n("xclick"),E=n("yclick");t._xclick=y===void 0?t.x:Yb.cleanPosition(y,l,t.xref),t._yclick=E===void 0?t.y:Yb.cleanPosition(E,l,t.yref)}}}});var Dve=Se((Aor,Ive)=>{"use strict";var NU=Zr(),Kb=hu(),Hvt=fI().draw;Ive.exports=function(t){var r=t._fullLayout,n=NU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return NU.syncOrAsync([Hvt,Gvt],t)};function Gvt(e){var t=e._fullLayout;NU.filterVisible(t.annotations).forEach(function(r){var n=Kb.getFromId(e,r.xref),i=Kb.getFromId(e,r.yref),a=Kb.getRefType(r.xref),o=Kb.getRefType(r.yref);r._extremes={},a==="range"&&Pve(r,n),o==="range"&&Pve(r,i)})}function Pve(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"],u=e["_"+n+"padplus"],l=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,x=p+f,b=p-f,y;if(s===o){var E=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),k=Kb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(u,x),ppadminus:Math.max(l,b)});y={min:[E.min[0],k.min[0]],max:[E.max[0],k.max[0]]}}else x=a?x+a:x,b=a?b-a:b,y=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(u,h,x),ppadminus:Math.max(l,d,b)});e._extremes[r]=y}});var Fve=Se((Sor,Rve)=>{"use strict";var Wvt=_u(),jvt=lL();Rve.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,u=r._id.charAt(0),l,f;function c(d){var p=l[d],x=null;a?x=jvt(p,r.range):x=Math.pow(10,p),Wvt(x)||(x=null),i(f+d,x)}for(var h=0;h{"use strict";var UU=fI(),qve=kve();Bve.exports={moduleType:"component",name:"annotations",layoutAttributes:Nb(),supplyLayoutDefaults:zve(),includeBasePlot:P5()("annotations"),calcAutorange:Dve(),draw:UU.draw,drawOne:UU.drawOne,drawRaw:UU.drawRaw,hasClickToShow:qve.hasClickToShow,onClick:qve.onClick,convertCoords:Fve()}});var cI=Se((Eor,Nve)=>{"use strict";var Mc=Nb(),Zvt=_c().overrideAll,Xvt=_f().templatedArray;Nve.exports=Zvt(Xvt("annotation",{visible:Mc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Mc.xanchor,xshift:Mc.xshift,yanchor:Mc.yanchor,yshift:Mc.yshift,text:Mc.text,textangle:Mc.textangle,font:Mc.font,width:Mc.width,height:Mc.height,opacity:Mc.opacity,align:Mc.align,valign:Mc.valign,bgcolor:Mc.bgcolor,bordercolor:Mc.bordercolor,borderpad:Mc.borderpad,borderwidth:Mc.borderwidth,showarrow:Mc.showarrow,arrowcolor:Mc.arrowcolor,arrowhead:Mc.arrowhead,startarrowhead:Mc.startarrowhead,arrowside:Mc.arrowside,arrowsize:Mc.arrowsize,startarrowsize:Mc.startarrowsize,arrowwidth:Mc.arrowwidth,standoff:Mc.standoff,startstandoff:Mc.startstandoff,hovertext:Mc.hovertext,hoverlabel:Mc.hoverlabel,captureevents:Mc.captureevents}),"calc","from-root")});var Vve=Se((kor,Uve)=>{"use strict";var VU=Zr(),Yvt=hu(),Kvt=Jd(),Jvt=BU(),$vt=cI();Uve.exports=function(t,r,n){Kvt(t,r,{name:"annotations",handleItemDefaults:Qvt,fullLayout:n.fullLayout})};function Qvt(e,t,r,n){function i(s,u){return VU.coerce(e,t,$vt,s,u)}function a(s){var u=s+"axis",l={_fullLayout:{}};return l._fullLayout[u]=r[u],Yvt.coercePosition(t,l,i,s,s,.5)}var o=i("visible");o&&(Jvt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),VU.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),VU.noneOrAll(e,t,["ax","ay"])))}});var jve=Se((Cor,Wve)=>{"use strict";var Hve=Zr(),Gve=hu();Wve.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function HU(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 t0t(e,t){var r=HU(e.projection,HU(e.view,HU(e.model,[t[0],t[1],t[2],1])));return r}Zve.exports=t0t});var Yve=Se((zor,Xve)=>{"use strict";var r0t=fI().drawRaw,i0t=GU(),n0t=["x","y","z"];Xve.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=i0t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),r0t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var $ve=Se((Por,Jve)=>{"use strict";var a0t=Ul(),Kve=Zr();Jve.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:cI()}}},layoutAttributes:cI(),handleDefaults:Vve(),includeBasePlot:o0t,convert:jve(),draw:Yve()};function o0t(e,t){var r=a0t.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var Qve=Nb(),e0e=uc(),t0e=Zc().line,s0t=Id().dash,Fy=vu().extendFlat,l0t=_f().templatedArray,Ior=z5(),fT=zf(),u0t=Du().shapeTexttemplateAttrs,f0t=xL();r0e.exports=l0t("shape",{visible:Fy({},fT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Fy({},fT.legend,{editType:"calc+arraydraw"}),legendgroup:Fy({},fT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Fy({},fT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:e0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Fy({},fT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Fy({},fT.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:Fy({},Qve.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:Fy({},Qve.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:Fy({},t0e.color,{editType:"arraydraw"}),width:Fy({},t0e.width,{editType:"calc+arraydraw"}),dash:Fy({},s0t,{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:u0t({},{keys:Object.keys(f0t)}),font:e0e({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 a0e=Se((Ror,n0e)=>{"use strict";var e4=Zr(),cT=hu(),c0t=Jd(),h0t=WU(),i0e=c_();n0e.exports=function(t,r){c0t(t,r,{name:"shapes",handleItemDefaults:p0t})};function d0t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function p0t(e,t,r){function n(W,re){return e4.coerce(e,t,h0t,W,re)}t._isShape=!0;var i=n("visible");if(i){var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),e4.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",u=n("type",s),l=u!=="path";l&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var c=n("xsizemode"),h=n("ysizemode"),d=["x","y"],p=0;p<2;p++){var x=d[p],b=x+"anchor",y=x==="x"?c:h,E={_fullLayout:r},k,A,L,_=cT.coerceRef(e,t,E,x,void 0,"paper"),C=cT.getRefType(_);if(C==="range"?(k=cT.getFromId(E,_),k._shapeIndices.push(t._index),L=i0e.rangeToShapePosition(k),A=i0e.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(n(x+"0shift"),n(x+"1shift"))):A=L=e4.identity,l){var M=.25,v=.75,z=x+"0",T=x+"1",F=e[z],q=e[T];e[z]=A(e[z],!0),e[T]=A(e[T],!0),y==="pixel"?(n(z,0),n(T,10)):(cT.coercePosition(t,E,n,_,z,M),cT.coercePosition(t,E,n,_,T,v)),t[z]=L(t[z]),t[T]=L(t[T]),e[z]=F,e[T]=q}if(y==="pixel"){var U=e[b];e[b]=A(e[b],!0),cT.coercePosition(t,E,n,_,b,.25),t[b]=L(t[b]),e[b]=U}}l&&e4.noneOrAll(e,t,["x0","x1","y0","y1"]);var H=u==="line",j,G;if(l&&(j=n("label.texttemplate")),j||(G=n("label.text")),G||j){n("label.textangle");var O=n("label.textposition",H?"middle":"middle center");n("label.xanchor"),n("label.yanchor",d0t(H,O)),n("label.padding"),e4.coerceFont(n,"label.font",r.font)}}}});var l0e=Se((For,s0e)=>{"use strict";var v0t=Pl(),o0e=Zr();function y0t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}s0e.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"),o0e.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",v0t.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),u=n("newshape.label.texttemplate");if(s||u){n("newshape.label.textangle");var l=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",y0t(o,l)),n("newshape.label.padding"),o0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var d0e=Se((qor,h0e)=>{"use strict";var jU=Zr(),hT=hu(),dT=f5(),f0e=c_();h0e.exports=function(t){var r=t._fullLayout,n=jU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i0?l+o:o;return{ppad:o,ppadplus:s?c:h,ppadminus:s?h:c}}else return{ppad:o}}function u0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,u=0,l=i?e.r2c:e.d2c,f=t[n+"sizemode"]==="scaled";if(f?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],u=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[l(a)+s,l(o)+u];if(t.path){var c=1/0,h=-1/0,d=t.path.match(dT.segmentRE),p,x,b,y,E;for(e.type==="date"&&(l=f0e.decodeDate(l)),p=0;ph&&(h=E)));if(h>=c)return[c,h]}}});var y0e=Se((Bor,v0e)=>{"use strict";var p0e=tP();v0e.exports={moduleType:"component",name:"shapes",layoutAttributes:WU(),supplyLayoutDefaults:a0e(),supplyDrawNewShapeDefaults:l0e(),includeBasePlot:P5()("shapes"),calcAutorange:d0e(),draw:p0e.draw,drawOne:p0e.drawOne}});var ZU=Se((Nor,g0e)=>{"use strict";var m0e=dd(),_0t=_f().templatedArray,Oor=z5();g0e.exports=_0t("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",m0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",m0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var x0e=Se((Uor,_0e)=>{"use strict";var x0t=Zr(),XU=hu(),b0t=Jd(),w0t=ZU(),T0t="images";_0e.exports=function(t,r){var n={name:T0t,handleItemDefaults:A0t};b0t(t,r,n)};function A0t(e,t,r){function n(h,d){return x0t.coerce(e,t,w0t,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"],u=0;u<2;u++){var l=s[u],f=XU.coerceRef(e,t,o,l,"paper",void 0);if(f!=="paper"){var c=XU.getFromId(o,f);c._imgIndices.push(t._index)}XU.coercePosition(t,o,n,f,l,0)}return t}});var A0e=Se((Vor,T0e)=>{"use strict";var b0e=Nl(),S0t=yu(),pT=hu(),w0e=$c(),M0t=Zv();T0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var S0e=_u(),E0t=lL();M0e.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,u=r._id.charAt(0),l,f,c=0;c{"use strict";k0e.exports={moduleType:"component",name:"images",layoutAttributes:ZU(),supplyLayoutDefaults:x0e(),includeBasePlot:P5()("images"),draw:A0e(),convertCoords:E0e()}});var hI=Se((Wor,L0e)=>{"use strict";L0e.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 YU=Se((jor,P0e)=>{"use strict";var k0t=uc(),C0t=Ih(),L0t=vu().extendFlat,z0t=_c().overrideAll,P0t=bL(),z0e=_f().templatedArray,I0t=z0e("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}});P0e.exports=z0t(z0e("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:I0t,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:L0t(P0t({editType:"arraydraw"}),{}),font:k0t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C0t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var F0e=Se((Zor,R0e)=>{"use strict";var dI=Zr(),I0e=Jd(),D0e=YU(),D0t=hI(),R0t=D0t.name,F0t=D0e.buttons;R0e.exports=function(t,r){var n={name:R0t,handleItemDefaults:q0t};I0e(t,r,n)};function q0t(e,t,r){function n(o,s){return dI.coerce(e,t,D0e,o,s)}var i=I0e(e,t,{name:"buttons",handleItemDefaults:B0t}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),dI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),dI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function B0t(e,t){function r(i,a){return dI.coerce(e,t,F0t,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 O0e=Se((Xor,B0e)=>{"use strict";B0e.exports=Qc;var qy=Nl(),q0e=Pl(),vT=yu(),pI=Zr();function Qc(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})}Qc.barWidth=2;Qc.barLength=20;Qc.barRadius=2;Qc.barPad=1;Qc.barColor="#808BA4";Qc.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,u=this.position.w,l=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",x=c==="up",b=u,y=f,E,k,A,L;!h&&!d&&!p&&!x&&(this.position.direction="down",h=!0);var _=h||x;_?(E=s,k=E+b,h?(A=l,L=Math.min(A+y,o),y=L-A):(L=l+y,A=Math.max(L-y,0),y=L-A)):(A=l,L=A+y,d?(k=s+b,E=Math.max(k-b,0),b=k-E):(E=s,k=Math.min(E+b,a),b=k-E)),this._box={l:E,t:A,w:b,h:y};var C=u>b,M=Qc.barLength+2*Qc.barPad,v=Qc.barWidth+2*Qc.barPad,z=s,T=l+f;T+v>o&&(T=o-v);var F=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(q0e.fill,Qc.barColor),C?(this.hbar=F.attr({rx:Qc.barRadius,ry:Qc.barRadius,x:z,y:T,width:M,height:v}),this._hbarXMin=z+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=f>y,U=Qc.barWidth+2*Qc.barPad,H=Qc.barLength+2*Qc.barPad,j=s+u,G=l;j+U>a&&(j=a-U);var O=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-vertical",!0).call(q0e.fill,Qc.barColor),q?(this.vbar=O.attr({rx:Qc.barRadius,ry:Qc.barRadius,x:j,y:G,width:U,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=y-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,re=E-.5,ne=q?k+U+.5:k+.5,be=A-.5,ze=C?L+v+.5:L+.5,Ce=i._topdefs.selectAll("#"+W).data(C||q?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",W).append("rect"),C||q?(this._clipRect=Ce.select("rect").attr({x:Math.floor(re),y:Math.floor(be),width:Math.ceil(ne)-Math.floor(re),height:Math.ceil(ze)-Math.floor(be)}),this.container.call(vT.setClipUrl,W,this.gd),this.bg.attr({x:s,y:l,width:u,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vT.setClipUrl,null),delete this._clipRect),C||q){var he=qy.behavior.drag().on("dragstart",function(){qy.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(he);var te=qy.behavior.drag().on("dragstart",function(){qy.event.sourceEvent.preventDefault(),qy.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(te),q&&this.vbar.on(".drag",null).call(te)}this.setTranslate(r,n)};Qc.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vT.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)};Qc.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=qy.event.dx),this.vbar&&(r-=qy.event.dy),this.setTranslate(t,r)};Qc.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=qy.event.deltaY),this.vbar&&(r+=qy.event.deltaY),this.setTranslate(t,r)};Qc.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=pI.constrain(qy.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var u=r+this._vbarYMin,l=u+this._vbarTranslateMax,f=pI.constrain(qy.event.y,u,l),c=(f-u)/(l-u),h=this.position.h-this._box.h;r=c*h}this.setTranslate(t,r)};Qc.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=pI.constrain(t||0,0,n),r=pI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(vT.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(vT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(vT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var Y0e=Se((Yor,X0e)=>{"use strict";var yT=Nl(),t4=Sc(),r4=Pl(),mT=yu(),e0=Zr(),vI=Bf(),O0t=_f().arrayEditor,U0e=Qh().LINE_SPACING,Iu=hI(),N0t=O0e();X0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[Iu.name]);function i(h){t4.autoMargin(t,j0e(h))}var a=r._menulayer.selectAll("g."+Iu.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(Iu.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){yT.select(this).selectAll("g."+Iu.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+Iu.headerGroupClassName).data(n,U0t);o.enter().append("g").classed(Iu.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,"g",Iu.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),u=0;u{"use strict";var X0t=hI();K0e.exports={moduleType:"component",name:X0t.name,layoutAttributes:YU(),supplyLayoutDefaults:F0e(),draw:Y0e()}});var n4=Se((Jor,$0e)=>{"use strict";$0e.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 QU=Se(($or,tye)=>{"use strict";var Q0e=uc(),Y0t=bL(),K0t=vu().extendDeepAll,J0t=_c().overrideAll,$0t=RM(),eye=_f().templatedArray,Jb=n4(),Q0t=eye("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}});tye.exports=J0t(eye("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Q0t,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:K0t(Y0t({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:$0t.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:Q0e({})},font:Q0e({}),activebgcolor:{valType:"color",dflt:Jb.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jb.railBgColor},bordercolor:{valType:"color",dflt:Jb.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jb.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jb.tickLength},tickcolor:{valType:"color",dflt:Jb.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jb.minorTickLength}}),"arraydraw","from-root")});var aye=Se((Qor,nye)=>{"use strict";var gT=Zr(),rye=Jd(),iye=QU(),eyt=n4(),tyt=eyt.name,ryt=iye.steps;nye.exports=function(t,r){rye(t,r,{name:tyt,handleItemDefaults:iyt})};function iyt(e,t,r){function n(c,h){return gT.coerce(e,t,iye,c,h)}for(var i=rye(e,t,{name:"steps",handleItemDefaults:nyt}),a=0,o=0;o{"use strict";var By=Nl(),yI=Sc(),__=Pl(),Oy=yu(),t0=Zr(),ayt=t0.strTranslate,a4=Bf(),oyt=_f().arrayEditor,lf=n4(),rV=Qh(),lye=rV.LINE_SPACING,eV=rV.FROM_TL,tV=rV.FROM_BR;pye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=syt(n,t),a=n._infolayer.selectAll("g."+lf.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(lf.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),yI.autoMargin(t,uye(f))}if(a.exit().each(function(){By.select(this).selectAll("g."+lf.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+lf.groupClassName).data(i,lyt);s.enter().append("g").classed(lf.groupClassName,!0),s.exit().each(o).remove();for(var u=0;u0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",ayt(o-lf.gripWidth*.5,t._dims.currentValueTotalHeight))}}function iV(e,t){var r=e._dims;return r.inputAreaStart+lf.stepInset+(r.inputAreaLength-2*lf.stepInset)*Math.min(1,Math.max(0,t))}function sye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-lf.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*lf.stepInset-2*r.inputAreaStart)))}function vyt(e,t,r){var n=r._dims,i=t0.ensureSingle(e,"rect",lf.railTouchRectClass,function(a){a.call(hye,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,lf.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr("opacity",0),Oy.setTranslate(i,0,n.currentValueTotalHeight)}function yyt(e,t){var r=t._dims,n=r.inputAreaLength-lf.railInset*2,i=t0.ensureSingle(e,"rect",lf.railRectClass);i.attr({width:n,height:lf.railWidth,rx:lf.railRadius,ry:lf.railRadius,"shape-rendering":"crispEdges"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Oy.setTranslate(i,lf.railInset,(r.inputAreaWidth-lf.railWidth)*.5+r.currentValueTotalHeight)}});var mye=Se((tsr,yye)=>{"use strict";var myt=n4();yye.exports={moduleType:"component",name:myt.name,layoutAttributes:QU(),supplyLayoutDefaults:aye(),draw:vye()}});var gI=Se((rsr,_ye)=>{"use strict";var gye=Ih();_ye.exports={bgcolor:{valType:"color",dflt:gye.background,editType:"plot"},bordercolor:{valType:"color",dflt:gye.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 nV=Se((isr,xye)=>{"use strict";xye.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 _I=Se((nsr,bye)=>{"use strict";bye.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 Aye=Se(bI=>{"use strict";var gyt=$c(),_yt=Bf(),wye=_I(),xyt=Qh().LINE_SPACING,xI=wye.name;function Tye(e){var t=e&&e[xI];return t&&t.visible}bI.isVisible=Tye;bI.makeData=function(e){for(var t=gyt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var wI=Zr(),Sye=_f(),Mye=$c(),byt=gI(),wyt=nV();Eye.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;wI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Sye.newContainer(a,"rangeslider");function u(L,_){return wI.coerce(o,s,byt,L,_)}var l,f;function c(L,_){return wI.coerce(l,f,wyt,L,_)}var h=u("visible");if(h){u("bgcolor",r.plot_bgcolor),u("bordercolor"),u("borderwidth"),u("thickness"),u("autorange",!a.isValidRange(o.range)),u("range");var d=r._subplots;if(d)for(var p=d.cartesian.filter(function(L){return L.substr(0,L.indexOf("y"))===Mye.name2id(n)}).map(function(L){return L.substr(L.indexOf("y"),L.length)}),x=wI.simpleMap(p,Mye.id2name),b=0;b{"use strict";var Tyt=$c().list,Ayt=wy().getAutoRange,Syt=_I();Cye.exports=function(t){for(var r=Tyt(t,"x",!0),n=0;n{"use strict";var TI=Nl(),Myt=Ul(),Eyt=Sc(),dh=Zr(),AI=dh.strTranslate,Pye=yu(),x_=Pl(),kyt=Mb(),Cyt=Th(),aV=$c(),Lyt=gp(),zyt=Ty(),vf=_I();Iye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=O.max)j=T[G+1];else if(H=O.pmax)j=T[G+1];else if(H0?e.touches[0].clientX:0}function Pyt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+vf.slideBoxClassName).node(),a=e.select("rect."+vf.grabAreaMinClassName).node(),o=e.select("rect."+vf.grabAreaMaxClassName).node();function s(){var u=TI.event,l=u.target,f=zye(u),c=f-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),p=Lyt.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",b),p.addEventListener("mousemove",x),p.addEventListener("mouseup",b);function x(y){var E=zye(y),k=+E-f,A,L,_;switch(l){case i:if(_="ew-resize",h+k>r._length||d+k<0)return;A=h+k,L=d+k;break;case a:if(_="col-resize",h+k>r._length)return;A=h+k,L=d;break;case o:if(_="col-resize",d+k<0)return;A=h,L=d+k;break;default:_="ew-resize",A=c,L=c+k;break}if(L{"use strict";var Vyt=Zr(),Hyt=gI(),Gyt=nV(),oV=Aye();Rye.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Vyt.extendFlat({},Hyt,{yaxis:Gyt})}}},layoutAttributes:gI(),handleDefaults:kye(),calcAutorange:Lye(),draw:Dye(),isVisible:oV.isVisible,makeData:oV.makeData,autoMarginOpts:oV.autoMarginOpts}});var SI=Se((fsr,Bye)=>{"use strict";var Wyt=uc(),qye=Ih(),jyt=_f().templatedArray,Zyt=jyt("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"});Bye.exports={visible:{valType:"boolean",editType:"plot"},buttons:Zyt,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:Wyt({editType:"plot"}),bgcolor:{valType:"color",dflt:qye.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:qye.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var sV=Se((csr,Oye)=>{"use strict";Oye.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Vye=Se((hsr,Uye)=>{"use strict";var MI=Zr(),Xyt=Pl(),Yyt=_f(),Kyt=Jd(),Nye=SI(),lV=sV();Uye.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=Yyt.newContainer(r,"rangeselector");function u(d,p){return MI.coerce(o,s,Nye,d,p)}var l=Kyt(o,s,{name:"buttons",handleItemDefaults:Jyt,calendar:a}),f=u("visible",l.length>0);if(f){var c=$yt(r,n,i);u("x",c[0]),u("y",c[1]),MI.noneOrAll(t,r,["x","y"]),u("xanchor"),u("yanchor"),MI.coerceFont(u,"font",n.font);var h=u("bgcolor");u("activecolor",Xyt.contrast(h,lV.lightAmount,lV.darkAmount)),u("bordercolor"),u("borderwidth")}};function Jyt(e,t,r,n){var i=n.calendar;function a(u,l){return MI.coerce(e,t,Nye.buttons,u,l)}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 $yt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var Qyt=wB(),emt=Zr().titleCase;Hye.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=tmt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function tmt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=Qyt["utc"+emt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var u=a.offset(n,-o);s=e.l2r(+a.ceil(u));break}var l=r[1];return[s,l]}});var $ye=Se((psr,Jye)=>{"use strict";var kI=Nl(),rmt=Ul(),imt=Sc(),Wye=Pl(),Kye=yu(),Pg=Zr(),jye=Pg.strTranslate,EI=Bf(),nmt=$c(),cV=Qh(),Zye=cV.LINE_SPACING,Xye=cV.FROM_TL,Yye=cV.FROM_BR,fV=sV(),amt=Gye();Jye.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(omt(t),smt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=kI.select(this),o=i,s=o.rangeselector,u=a.selectAll("g.button").data(Pg.filterVisible(s.buttons));u.enter().append("g").classed("button",!0),u.exit().remove(),u.each(function(l){var f=kI.select(this),c=amt(o,l);l._isActive=lmt(o,l,c),f.call(uV,s,l),f.call(fmt,s,l,t),f.on("click",function(){t._dragged||rmt.call("_guiRelayout",t,c)}),f.on("mouseover",function(){l._isHovered=!0,f.call(uV,s,l)}),f.on("mouseout",function(){l._isHovered=!1,f.call(uV,s,l)})}),hmt(t,u,s,o._name,a)})};function omt(e){for(var t=nmt.list(e,"x",!0),r=[],n=0;n{"use strict";Qye.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:SI()}}},layoutAttributes:SI(),handleDefaults:Vye(),draw:$ye()}});var Ec=Se(hV=>{"use strict";var tme=vu().extendFlat;hV.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:tme({},r,{}),y:tme({},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};hV.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 dmt=Zr(),pmt=n3().counter,vmt=Ec().attributes,rme=dd().idRegex,ymt=_f(),dV={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:[pmt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[rme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[rme.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:vmt({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 CI(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 mmt(e,t){var r=e.grid||{},n=CI(t,r,"x"),i=CI(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),u=o&&n!==r.xaxes&&s&&i!==r.yaxes,l,f;a?(l=r.subplots.length,f=r.subplots[0].length):(s&&(l=i.length),o&&(f=n.length));var c=ymt.newContainer(t,"grid");function h(_,C){return dmt.coerce(r,c,dV,_,C)}var d=h("rows",l),p=h("columns",f);if(!(d*p>1)){delete t.grid;return}if(!a&&!o&&!s){var x=h("pattern")==="independent";x&&(a=!0)}c._hasSubplotGrid=a;var b=h("roworder"),y=b==="top to bottom",E=a?.2:.1,k=a?.3:.1,A,L;u&&t._splomGridDflt&&(A=t._splomGridDflt.xside,L=t._splomGridDflt.yside),c._domains={x:ime("x",h,E,A,p),y:ime("y",h,k,L,d,y)}}function ime(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var u=new Array(i),l=s[0],f=(s[1]-l)/(i-o),c=f*(1-o),h=0;h{"use strict";ome.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 ume=Se((_sr,lme)=>{"use strict";var sme=_u(),_mt=Ul(),xmt=Zr(),bmt=_f(),wmt=vV();lme.exports=function(e,t,r,n){var i="error_"+n.axis,a=bmt.newContainer(t,i),o=e[i]||{};function s(p,x){return xmt.coerce(o,a,wmt,p,x)}var u=o.array!==void 0||o.value!==void 0||o.type==="sqrt",l=s("visible",u);if(l!==!1){var f=s("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=s("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(s("array"),s("traceref"),c||(s("arrayminus"),s("tracerefminus"))):(f==="percent"||f==="constant")&&(s("value"),c||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||sme(o.thickness)||sme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",_mt.traceIs(t,"gl3d")?0:4))}}});var yV=Se((xsr,cme)=>{"use strict";cme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(l,f){var c=+i[f];return[c,c]};var a=t.arrayminus||[];return function(l,f){var c=+i[f],h=+a[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var o=fme(r,t.value),s=fme(r,t.valueminus);return n||t.valueminus===void 0?function(l){var f=o(l);return[f,f]}:function(l){return[s(l),o(l)]}}};function fme(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 pme=Se((bsr,dme)=>{"use strict";var mV=_u(),Tmt=Ul(),gV=hu(),Amt=Zr(),Smt=yV();dme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var vme=Nl(),b_=_u(),Mmt=yu(),Emt=ec();yme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,u=i&&i.duration>0,l=t._context.staticPlot;r.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(E){return E.id});var x=Emt.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var b=vme.select(this).selectAll("g.errorbar").data(f,p);if(b.exit().remove(),!!f.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var y=b.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(i.duration).style("opacity",1),Mmt.setClipUrl(b,n.layerClipId,t),b.each(function(E){var k=vme.select(this),A=kmt(E,o,s);if(!(x&&!E.vis)){var L,_=k.select("path.yerror");if(d.visible&&b_(A.x)&&b_(A.yh)&&b_(A.ys)){var C=d.width;L="M"+(A.x-C)+","+A.yh+"h"+2*C+"m-"+C+",0V"+A.ys,A.noYS||(L+="m-"+C+",0h"+2*C),a=!_.size(),a?_=k.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("yerror",!0):u&&(_=_.transition().duration(i.duration).ease(i.easing)),_.attr("d",L)}else _.remove();var M=k.select("path.xerror");if(h.visible&&b_(A.y)&&b_(A.xh)&&b_(A.xs)){var v=(h.copy_ystyle?d:h).width;L="M"+A.xh+","+(A.y-v)+"v"+2*v+"m0,-"+v+"H"+A.xs,A.noXS||(L+="m0,-"+v+"v"+2*v),a=!M.size(),a?M=k.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("xerror",!0):u&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr("d",L)}else M.remove()}})}})};function kmt(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 xme=Se((Tsr,_me)=>{"use strict";var Cmt=Nl(),gme=Pl();_me.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Cmt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(gme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(gme.stroke,a.color)})}});var Tme=Se((Asr,wme)=>{"use strict";var o4=Zr(),bme=_c().overrideAll,s4=vV(),$b={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4)};delete $b.error_x.copy_zstyle;delete $b.error_y.copy_zstyle;delete $b.error_y.copy_ystyle;var l4={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4),error_z:o4.extendFlat({},s4)};delete l4.error_x.copy_ystyle;delete l4.error_y.copy_ystyle;delete l4.error_z.copy_ystyle;delete l4.error_z.copy_zstyle;wme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$b,bar:$b,histogram:$b,scatter3d:bme(l4,"calc","nested"),scattergl:bme($b,"calc","nested")}},supplyDefaults:ume(),calc:pme(),makeComputeError:yV(),plot:mme(),style:xme(),hoverInfo:Lmt};function Lmt(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 Sme=Se((Ssr,Ame)=>{"use strict";Ame.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 Pme=Se((Msr,zme)=>{"use strict";var w_=Nl(),_V=cd(),zI=Sc(),Mme=Ul(),Ig=hu(),LI=gp(),O0=Zr(),Uy=O0.strTranslate,Lme=vu().extendFlat,xV=Ty(),Ny=yu(),bV=Pl(),zmt=Mb(),Pmt=Bf(),Imt=Dp().flipScale,Dmt=J5(),Rmt=rI(),Fmt=Rd(),wV=Qh(),Eme=wV.LINE_SPACING,kme=wV.FROM_TL,Cme=wV.FROM_BR,Xc=Sme().cn;function qmt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Xc.colorbar).data(Bmt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Xc.colorbar,!0),r.each(function(n){var i=w_.select(this);O0.ensureSingle(i,"rect",Xc.cbbg),O0.ensureSingle(i,"g",Xc.cbfills),O0.ensureSingle(i,"g",Xc.cblines),O0.ensureSingle(i,"g",Xc.cbaxis,function(o){o.classed(Xc.crisp,!0)}),O0.ensureSingle(i,"g",Xc.cbtitleunshift,function(o){o.append("g").classed(Xc.cbtitle,!0)}),O0.ensureSingle(i,"rect",Xc.cboutline);var a=Omt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Nmt(i,n,e)}),r.exit().each(function(n){zI.autoMargin(e,n._id)}).remove(),r.order()}function Bmt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function u(k){return Lme(k,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function l(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Imt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var f=0;f1){var Be=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));Oe*=Be*O0.roundUp(me/Be,[2,5,10]),(Math.abs(F.start)/F.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=Oe}Ee.domain=n?[te+p/A.h,te+W-p/A.h]:[te+d/A.w,te+W-d/A.w],Ee.setScale(),e.attr("transform",Uy(Math.round(A.l),Math.round(A.t)));var fe=e.select("."+Xc.cbtitleunshift).attr("transform",Uy(-Math.round(A.l),-Math.round(A.t))),Ze=Ee.ticklabelposition,et=Ee.title.font.size,gt=e.select("."+Xc.cbaxis),Pt,Qe=0,Xe=0;function Tt(At,Te){var nt={propContainer:Ee,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Xc.cbtitle)},ut=At.charAt(0)==="h"?At.substr(1):"h"+At;e.selectAll("."+ut+",."+ut+"-math-group").remove(),zmt.draw(r,At,Lme(nt,Te||{}))}function xt(){if(n&&Me||!n&&!Me){var At,Te;M==="top"&&(At=d+A.l+re*x,Te=p+A.t+ne*(1-te-W)+3+et*.75),M==="bottom"&&(At=d+A.l+re*x,Te=p+A.t+ne*(1-te)-3-et*.25),M==="right"&&(Te=p+A.t+ne*b+3+et*.75,At=d+A.l+re*te),Tt(Ee._id+"title",{attributes:{x:At,y:Te,"text-anchor":n?"start":"middle"}})}}function _t(){if(n&&!Me||!n&&Me){var At=Ee.position||0,Te=Ee._offset+Ee._length/2,nt,ut;if(M==="right")ut=Te,nt=A.l+re*At+10+et*(Ee.showticklabels?1:.5);else if(nt=Te,M==="bottom"&&(ut=A.t+ne*At+10+(Ze.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="intside"&&t.ticklen||0)),M==="top"){var ct=C.text.split("
").length;ut=A.t+ne*At+10-j-Eme*et*ct}Tt((n?"h":"v")+Ee._id+"title",{avoid:{selection:w_.select(r).selectAll("g."+Ee._id+"tick"),side:M,offsetTop:n?0:A.t,offsetLeft:n?A.l:0,maxShift:n?k.width:k.height},attributes:{x:nt,y:ut,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Ct(){if(!n&&!Me||n&&Me){var At=e.select("."+Xc.cbtitle),Te=At.select("text"),nt=[-u/2,u/2],ut=At.select(".h"+Ee._id+"title-math-group").node(),ct=15.6;Te.node()&&(ct=parseInt(Te.node().style.fontSize,10)*Eme);var rt;if(ut?(rt=Ny.bBox(ut),Xe=rt.width,Qe=rt.height,Qe>ct&&(nt[1]-=(Qe-ct)/2)):Te.node()&&!Te.classed(Xc.jsPlaceholder)&&(rt=Ny.bBox(Te.node()),Xe=rt.width,Qe=rt.height),n){if(Qe){if(Qe+=5,M==="top")Ee.domain[1]-=Qe/A.h,nt[1]*=-1;else{Ee.domain[0]+=Qe/A.h;var je=Pmt.lineCount(Te);nt[1]+=(1-je)*ct}At.attr("transform",Uy(nt[0],nt[1])),Ee.setScale()}}else Xe&&(M==="right"&&(Ee.domain[0]+=(Xe+et/2)/A.w),At.attr("transform",Uy(nt[0],nt[1])),Ee.setScale())}e.selectAll("."+Xc.cbfills+",."+Xc.cblines).attr("transform",n?Uy(0,Math.round(A.h*(1-Ee.domain[1]))):Uy(Math.round(A.w*Ee.domain[0]),0)),gt.attr("transform",n?Uy(0,Math.round(-A.t)):Uy(Math.round(-A.l),0));var tt=e.select("."+Xc.cbfills).selectAll("rect."+Xc.cbfill).attr("style","").data(U);tt.enter().append("rect").classed(Xc.cbfill,!0).attr("style",""),tt.exit().remove();var Je=v.map(Ee.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});tt.each(function(fr,Ot){var De=[Ot===0?v[0]:(U[Ot]+U[Ot-1])/2,Ot===U.length-1?v[1]:(U[Ot]+U[Ot+1])/2].map(Ee.c2p).map(Math.round);n&&(De[1]=O0.constrain(De[1]+(De[1]>De[0])?1:-1,Je[0],Je[1]));var _e=w_.select(this).attr(n?"x":"y",be).attr(n?"y":"x",w_.min(De)).attr(n?"width":"height",Math.max(j,2)).attr(n?"height":"width",Math.max(w_.max(De)-w_.min(De),2));if(t._fillgradient)Ny.gradient(_e,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Fe=T(fr).replace("e-","");_e.attr("fill",_V(Fe).toHexString())}});var Mt=e.select("."+Xc.cblines).selectAll("path."+Xc.cbline).data(_.color&&_.width?H:[]);Mt.enter().append("path").classed(Xc.cbline,!0),Mt.exit().remove(),Mt.each(function(fr){var Ot=be,De=Math.round(Ee.c2p(fr))+_.width/2%1;w_.select(this).attr("d","M"+(n?Ot+","+De:De+","+Ot)+(n?"h":"v")+j).call(Ny.lineGroupStyle,_.width,z(fr),_.dash)}),gt.selectAll("g."+Ee._id+"tick,path").remove();var Vt=be+j+(u||0)/2-(t.ticks==="outside"?1:0),Kt=Ig.calcTicks(Ee),ir=Ig.getTickSigns(Ee)[2];return Ig.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Ig.clipEnds(Ee,Kt):Kt,layer:gt,path:Ig.makeTickPath(Ee,Vt,ir),transFn:Ig.makeTransTickFn(Ee)}),Ig.drawLabels(r,Ee,{vals:Kt,layer:gt,transFn:Ig.makeTransTickLabelFn(Ee),labelFns:Ig.makeLabelFns(Ee,Vt)})}function jt(){var At,Te=j+u/2;Ze.indexOf("inside")===-1&&(At=Ny.bBox(gt.node()),Te+=n?At.width:At.height),Pt=fe.select("text");var nt=0,ut=n&&M==="top",ct=!n&&M==="right",rt=0;if(Pt.node()&&!Pt.classed(Xc.jsPlaceholder)){var je,tt=fe.select(".h"+Ee._id+"title-math-group").node();tt&&(n&&Me||!n&&!Me)?(At=Ny.bBox(tt),nt=At.width,je=At.height):(At=Ny.bBox(fe.node()),nt=At.right-A.l-(n?be:ke),je=At.bottom-A.t-(n?ke:be),!n&&M==="top"&&(Te+=At.height,rt=At.height)),ct&&(Pt.attr("transform",Uy(nt/2+et/2,0)),nt*=2),Te=Math.max(Te,n?nt:je)}var Je=(n?d:p)*2+Te+l+u/2,Mt=0;!n&&C.text&&h==="bottom"&&b<=0&&(Mt=Je/2,Je+=Mt,rt+=Mt),k._hColorbarMoveTitle=Mt,k._hColorbarMoveCBTitle=rt;var Vt=l+u,Kt=(n?be:ke)-Vt/2-(n?d:0),ir=(n?ke:be)-(n?O:p+rt-Mt);e.select("."+Xc.cbbg).attr("x",Kt).attr("y",ir).attr(n?"width":"height",Math.max(Je-Mt,2)).attr(n?"height":"width",Math.max(O+Vt,2)).call(bV.fill,f).call(bV.stroke,t.bordercolor).style("stroke-width",l);var fr=ct?Math.max(nt-10,0):0;e.selectAll("."+Xc.cboutline).attr("x",(n?be:ke+d)+fr).attr("y",(n?ke+p-O:be)+(ut?Qe:0)).attr(n?"width":"height",Math.max(j,2)).attr(n?"height":"width",Math.max(O-(n?2*p+Qe:2*d+fr),2)).call(bV.stroke,t.outlinecolor).style({fill:"none","stroke-width":u});var Ot=n?ze*Je:0,De=n?0:(1-Ce)*Je-rt;if(Ot=E?A.l-Ot:-Ot,De=y?A.t-De:-De,e.attr("transform",Uy(Ot,De)),!n&&(l||_V(f).getAlpha()&&!_V.equals(k.paper_bgcolor,f))){var _e=gt.selectAll("text"),Fe=_e[0].length,Pe=e.select("."+Xc.cbbg).node(),Ie=Ny.bBox(Pe),lt=Ny.getTranslate(e),ye=2;_e.each(function(Er,si){var Ei=0,Si=Fe-1;if(si===Ei||si===Si){var xi=Ny.bBox(this),Hi=Ny.getTranslate(this),Jr;if(si===Si){var ci=xi.right+Hi.x,Di=Ie.right+lt.x+ke-l-ye+x;Jr=Di-ci,Jr>0&&(Jr=0)}else if(si===Ei){var Lt=xi.left+Hi.x,vt=Ie.left+lt.x+ke+l+ye;Jr=vt-Lt,Jr<0&&(Jr=0)}Jr&&(Fe<3?this.setAttribute("transform","translate("+Jr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ue={},de=kme[c],ht=Cme[c],Et=kme[h],St=Cme[h],Zt=Je-j;n?(a==="pixels"?(ue.y=b,ue.t=O*Et,ue.b=O*St):(ue.t=ue.b=0,ue.yt=b+i*Et,ue.yb=b-i*St),s==="pixels"?(ue.x=x,ue.l=Je*de,ue.r=Je*ht):(ue.l=Zt*de,ue.r=Zt*ht,ue.xl=x-o*de,ue.xr=x+o*ht)):(a==="pixels"?(ue.x=x,ue.l=O*de,ue.r=O*ht):(ue.l=ue.r=0,ue.xl=x+i*de,ue.xr=x-i*ht),s==="pixels"?(ue.y=1-b,ue.t=Je*Et,ue.b=Je*St):(ue.t=Zt*Et,ue.b=Zt*St,ue.yt=b-o*Et,ue.yb=b+o*St));var qr=t.y<.5?"b":"t",Lr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var vr={r:k.width-Kt-Ot,l:Kt+ue.r,b:k.height-ir-De,t:ir+ue.b};E&&y?zI.autoMargin(r,t._id,ue):E?r._fullLayout._reservedMargin[t._id][qr]=vr[qr]:y||n?r._fullLayout._reservedMargin[t._id][Lr]=vr[Lr]:r._fullLayout._reservedMargin[t._id][qr]=vr[qr]}return O0.syncOrAsync([zI.previousPromises,xt,Ct,_t,zI.previousPromises,jt],r)}function Nmt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,u;LI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),xV(e)},moveFn:function(l,f){e.attr("transform",o+Uy(l,f)),s=LI.align((n?t._uFrac:t._vFrac)+l/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),u=LI.align((n?t._vFrac:1-t._uFrac)-f/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var c=LI.getCursor(s,u,t.xanchor,t.yanchor);xV(e,c)},doneFn:function(){if(xV(e),s!==void 0&&u!==void 0){var l={};l[t._propPrefix+"x"]=s,l[t._propPrefix+"y"]=u,t._traceIndex!==void 0?Mme.call("_guiRestyle",r,l,t._traceIndex):Mme.call("_guiRelayout",r,l)}}})}function Umt(e,t,r){var n=t._levels,i=[],a=[],o,s,u=n.end+n.size/100,l=n.size,f=1.001*r[0]-.001*r[1],c=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*l,!(l>0?o>=u:o<=u));s++)o>f&&o0?o>=u:o<=u));s++)o>r[0]&&o{"use strict";Ime.exports={moduleType:"component",name:"colorbar",attributes:YL(),supplyDefaults:DO(),draw:Pme().draw,hasColorbar:EO()}});var Fme=Se((ksr,Rme)=>{"use strict";Rme.exports={moduleType:"component",name:"legend",layoutAttributes:kN(),supplyLayoutDefaults:zN(),draw:HN(),style:ON()}});var Bme=Se((Csr,qme)=>{"use strict";qme.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 Nme=Se((Lsr,Ome)=>{"use strict";Ome.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var AV=Se((zsr,Gme)=>{"use strict";var Hmt=Ul(),Hme=Zr(),TV=Hme.extendFlat,Ume=Hme.extendDeep;function Vme(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 Gmt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Gme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Ume([],i),s=Ume({},a,Vme(r.tileClass)),u=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 l=Object.keys(s);for(n=0;n{"use strict";var Wmt=pb().EventEmitter,jmt=Ul(),Zmt=Zr(),Wme=Lg(),Xmt=AV(),Ymt=BP(),Kmt=OP();function Jmt(e,t){var r=new Wmt,n=Xmt(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=Wme.getDelay(i._fullLayout);setTimeout(function(){var u=Ymt(i),l=document.createElement("canvas");l.id=Zmt.randstr(),r=Kmt({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:l,emitter:r,svg:u}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=Wme.getRedrawFunc(i);return jmt.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}jme.exports=Jmt});var Kme=Se((Isr,Yme)=>{"use strict";var Xme=Lg(),$mt={getDelay:Xme.getDelay,getRedrawFunc:Xme.getRedrawFunc,clone:AV(),toSVG:BP(),svgToImg:OP(),toImage:Zme(),downloadImage:aU()};Yme.exports=$mt});var $me=Se(Dg=>{"use strict";Dg.version=QC().version;cee();ene();var Qmt=Ul(),u4=Dg.register=Qmt.register,MV=xde(),Jme=Object.keys(MV);for(PI=0;PI{"use strict";Qme.exports=$me()});var Qb=Se((Fsr,tge)=>{"use strict";tge.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Lm=Se((qsr,age)=>{"use strict";var ah=Zc(),rge=Gc().axisHoverFormat,egt=Du().hovertemplateAttrs,tgt=Du().texttemplateAttrs,nge=Xf(),rgt=uc(),ige=Qb(),igt=Id().pattern,e2=vu().extendFlat,EV=rgt({editType:"calc",arrayOk:!0,colorEditType:"style"}),ngt=ah.marker,agt=ngt.line,ogt=e2({},agt.width,{dflt:0}),sgt=e2({width:ogt,editType:"calc"},nge("marker.line")),lgt=e2({line:sgt,editType:"calc"},nge("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:igt,cornerradius:{valType:"any",editType:"calc"}});age.exports={x:ah.x,x0:ah.x0,dx:ah.dx,y:ah.y,y0:ah.y0,dy:ah.dy,xperiod:ah.xperiod,yperiod:ah.yperiod,xperiod0:ah.xperiod0,yperiod0:ah.yperiod0,xperiodalignment:ah.xperiodalignment,yperiodalignment:ah.yperiodalignment,xhoverformat:rge("x"),yhoverformat:rge("y"),text:ah.text,texttemplate:tgt({editType:"plot"},{keys:ige.eventDataKeys}),hovertext:ah.hovertext,hovertemplate:egt({},{keys:ige.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:e2({},EV,{}),insidetextfont:e2({},EV,{}),outsidetextfont:e2({},EV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:e2({},ah.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:lgt,offsetgroup:ah.offsetgroup,alignmentgroup:ah.alignmentgroup,selected:{marker:{opacity:ah.selected.marker.opacity,color:ah.selected.marker.color,editType:"style"},textfont:ah.selected.textfont,editType:"style"},unselected:{marker:{opacity:ah.unselected.marker.opacity,color:ah.unselected.marker.color,editType:"style"},textfont:ah.unselected.textfont,editType:"style"},zorder:ah.zorder}});var DI=Se((Bsr,oge)=>{"use strict";oge.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 RI=Se((Osr,uge)=>{"use strict";var ugt=Pl(),sge=Dp().hasColorscale,lge=ed(),fgt=Zr().coercePattern;uge.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=sge(t,"marker");s&&lge(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",ugt.defaultLine),sge(t,"marker.line")&&lge(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),fgt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var r0=Se((Nsr,vge)=>{"use strict";var fge=_u(),xT=Zr(),cge=Pl(),cgt=Ul(),hgt=K3(),dgt=zy(),pgt=RI(),vgt=Hb(),hge=Lm(),FI=xT.coerceFont;function ygt(e,t,r,n){function i(l,f){return xT.coerce(e,t,hge,l,f)}var a=hgt(e,t,n,i);if(!a){t.visible=!1;return}dgt(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");var o=i("textposition");pge(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),pgt(e,t,i,r,n);var s=(t.marker.line||{}).color,u=cgt.getComponentMethod("errorbars","supplyDefaults");u(e,t,s||cge.defaultLine,{axis:"y"}),u(e,t,s||cge.defaultLine,{axis:"x",inherit:"y"}),xT.coerceSelectionMarkerOpacity(t,i)}function mgt(e,t){var r,n;function i(s,u){return xT.coerce(n._input,n,hge,s,u)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&fge(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function pge(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,u=a.moduleHasConstrain!==!1,l=a.moduleHasCliponaxis!==!1,f=a.moduleHasTextangle!==!1,c=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",p=d||i==="inside",x=d||i==="outside";if(p||x){var b=FI(n,"textfont",r.font),y=xT.extendFlat({},b),E=e.textfont&&e.textfont.color,k=!E;if(k&&delete y.color,FI(n,"insidetextfont",y),h){var A=xT.extendFlat({},b);k&&delete A.color,FI(n,"pathbar.textfont",A)}x&&FI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),u&&n("constraintext"),l&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}p&&c&&n("insidetextanchor")}vge.exports={supplyDefaults:ygt,crossTraceDefaults:mgt,handleText:pge,validateCornerradius:dge}});var kV=Se((Usr,yge)=>{"use strict";var ggt=Ul(),_gt=hu(),xgt=Zr(),bgt=DI(),wgt=r0().validateCornerradius;yge.exports=function(e,t,r){function n(x,b){return xgt.coerce(e,t,bgt,x,b)}for(var i=!1,a=!1,o=!1,s={},u=n("barmode"),l=u==="group",f=0;f0&&!s[h]&&(o=!0),s[h]=!0),c.visible&&c.type==="histogram"){var d=_gt.getFromId({_fullLayout:t},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}u!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=wgt(p)}});var f4=Se((Vsr,mge)=>{"use strict";var bT=Zr();mge.exports=function(t,r){for(var n=0;n{"use strict";var gge=hu(),_ge=Iy(),xge=Dp().hasColorscale,bge=Rp(),Tgt=f4(),Agt=F0();wge.exports=function(t,r){var n=gge.getFromId(t,r.xaxis||"x"),i=gge.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f,c={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",c),s=i.makeCalcdata(r,"y"),u=_ge(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y",c),s=n.makeCalcdata(r,"x"),u=_ge(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),p=0;p{"use strict";var Sgt=Nl(),Mgt=Zr();function Egt(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 u=s.transform;if(u){u.scale=a&&u.hide?0:i/u.fontSize;var l=Sgt.select(this).select("text");Mgt.setTransormAndDisplay(l,u)}})}}function kgt(e,t,r){if(r.uniformtext.mode){var n=Age(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var Lgt=_u(),zgt=cd(),Mge=Zr().isArrayOrTypedArray;t2.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};t2.coerceNumber=function(e,t,r){if(Lgt(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};t2.coerceColor=function(e,t,r){return zgt(t).isValid()?t:r!==void 0?r:e.dflt};t2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};t2.getValue=function(e,t){var r;return Mge(e)?t{"use strict";var c4=Nl(),Pgt=Pl(),h4=yu(),Ege=Zr(),kge=Ul(),Cge=bp().resizeText,CV=Lm(),Igt=CV.textfont,Dgt=CV.insidetextfont,Rgt=CV.outsidetextfont,tp=qI();function Fgt(e){var t=c4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Cge(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)&&c4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=c4.select(this),o=i[0].trace;Lge(a,o,e)}),kge.getComponentMethod("errorbars","style")(t)}function Lge(e,t,r){h4.pointStyle(e.selectAll("path"),t,r),zge(e,t,r)}function zge(e,t,r){e.selectAll("text").each(function(n){var i=c4.select(this),a=Ege.ensureUniformFontSize(r,Pge(i,n,t,r));h4.font(i,a)})}function qgt(e,t,r){var n=t[0].trace;n.selectedpoints?Bgt(r,n,e):(Lge(r,n,e),kge.getComponentMethod("errorbars","style")(r))}function Bgt(e,t,r){h4.selectedPointStyle(e.selectAll("path"),t),Ogt(e.selectAll("text"),t,r)}function Ogt(e,t,r){e.each(function(n){var i=c4.select(this),a;if(n.selected){a=Ege.ensureUniformFontSize(r,Pge(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),h4.font(i,a)}else h4.selectedTextStyle(i,t)})}function Pge(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Fge(t,r);a=Dge(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Rge(r,t.i,i));return a}function Ige(e,t,r){return LV(Igt,e.textfont,t,r)}function Dge(e,t,r,n){var i=Ige(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:Pgt.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}),LV(Dgt,e.insidetextfont,t,i)}function Rge(e,t,r){var n=Ige(e,t,r);return LV(Rgt,e.outsidetextfont,t,n)}function LV(e,t,r,n){t=t||{};var i=tp.getValue(t.family,r),a=tp.getValue(t.size,r),o=tp.getValue(t.color,r),s=tp.getValue(t.weight,r),u=tp.getValue(t.style,r),l=tp.getValue(t.variant,r),f=tp.getValue(t.textcase,r),c=tp.getValue(t.lineposition,r),h=tp.getValue(t.shadow,r);return{family:tp.coerceString(e.family,i,n.family),size:tp.coerceNumber(e.size,a,n.size),color:tp.coerceColor(e.color,o,n.color),weight:tp.coerceString(e.weight,s,n.weight),style:tp.coerceString(e.style,u,n.style),variant:tp.coerceString(e.variant,l,n.variant),textcase:tp.coerceString(e.variant,f,n.textcase),lineposition:tp.coerceString(e.variant,c,n.lineposition),shadow:tp.coerceString(e.variant,h,n.shadow)}}function Fge(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}qge.exports={style:Fgt,styleTextPoints:zge,styleOnSelect:qgt,getInsideTextFont:Dge,getOutsideTextFont:Rge,getBarColor:Fge,resizeText:Cge}});var i2=Se((Zsr,Wge)=>{"use strict";var BI=Nl(),OI=_u(),qd=Zr(),Ngt=Bf(),Ugt=Pl(),T_=yu(),Vgt=Ul(),NI=hu().tickText,Bge=bp(),Hgt=Bge.recordMinTextSize,Ggt=Bge.clearMinTextSize,zV=N0(),wT=qI(),Wgt=Qb(),Oge=Lm(),jgt=Oge.text,Zgt=Oge.textposition,Xgt=rv().appendArrayPointValue,Up=Wgt.TEXTPAD;function Ygt(e){return e.id}function Kgt(e){if(e.ids)return Ygt}function PV(e){return(e>0)-(e<0)}function zm(e,t){return e0}function $gt(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,u=e._fullLayout,l=e._context.staticPlot;i||(i={mode:u.barmode,norm:u.barmode,gap:u.bargap,groupgap:u.bargroupgap},Ggt("bar",u));var f=qd.makeTraceGroups(n,r,"trace bars").each(function(c){var h=BI.select(this),d=c[0].trace,p=c[0].t,x=d.type==="waterfall",b=d.type==="funnel",y=d.type==="histogram",E=d.type==="bar",k=E||b,A=0;x&&d.connector.visible&&d.connector.mode==="between"&&(A=d.connector.line.width/2);var L=d.orientation==="h",_=Uge(i),C=qd.ensureSingle(h,"g","points"),M=Kgt(d),v=C.selectAll("g.point").data(qd.identity,M);v.enter().append("g").classed("point",!0),v.exit().remove(),v.each(function(T,F){var q=BI.select(this),U=Jgt(T,o,s,L),H=U[0][0],j=U[0][1],G=U[1][0],O=U[1][1],W=(L?j-H:O-G)===0;W&&k&&wT.getLineWidth(d,T)&&(W=!1),W||(W=!OI(H)||!OI(j)||!OI(G)||!OI(O)),T.isBlank=W,W&&(L?j=H:O=G),A&&!W&&(L?(H-=zm(H,j)*A,j+=zm(H,j)*A):(G-=zm(G,O)*A,O+=zm(G,O)*A));var re,ne;if(d.type==="waterfall"){if(!W){var be=d[T.dir].marker;re=be.line.width,ne=be.color}}else re=wT.getLineWidth(d,T),ne=T.mc||d.marker.color;function ze(Te){var nt=BI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?BI.round(Math.round(Te)-nt,2):Te}function Ce(Te,nt,ut){return ut&&Te===nt?Te:Math.abs(Te-nt)>=2?ze(Te):Te>nt?Math.ceil(Te):Math.floor(Te)}var he=Ugt.opacity(ne),te=he<1||re>.01?ze:Ce;e._context.staticPlot||(H=te(H,j,L),j=te(j,H,L),G=te(G,O,!L),O=te(O,G,!L));var ke=L?o.c2p:s.c2p,Ee;T.s0>0?Ee=T._sMax:T.s0<0?Ee=T._sMin:Ee=T.s1>0?T._sMax:T._sMin;function Me(Te,nt){if(!Te)return 0;var ut=Math.abs(L?O-G:j-H),ct=Math.abs(L?j-H:O-G),rt=te(Math.abs(ke(Ee,!0)-ke(0,!0))),je=T.hasB?Math.min(ut/2,ct/2):Math.min(ut/2,rt),tt;if(nt==="%"){var Je=Math.min(50,Te);tt=ut*(Je/100)}else tt=Te;return te(Math.max(Math.min(tt,je),0))}var Oe=E||y?Me(p.cornerradiusvalue,p.cornerradiusform):0,Re,me,Be="M"+H+","+G+"V"+O+"H"+j+"V"+G+"Z",fe=0;if(Oe&&T.s){var Ze=PV(T.s0)===0||PV(T.s)===PV(T.s0)?T.s1:T.s0;if(fe=te(T.hasB?0:Math.abs(ke(Ee,!0)-ke(Ze,!0))),fe0?Math.sqrt(fe*(2*Oe-fe)):0,Tt=et>0?Math.max:Math.min;Re="M"+H+","+G+"V"+(O-Qe*gt)+"H"+Tt(j-(Oe-fe)*et,H)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt-Xe)+"V"+(G+Oe*gt+Xe)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+Tt(j-(Oe-fe)*et,H)+","+(G+Qe*gt)+"Z"}else if(T.hasB)Re="M"+(H+Oe*et)+","+G+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+H+","+(G+Oe*gt)+"V"+(O-Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et)+","+O+"H"+(j-Oe*et)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt)+"V"+(G+Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-Oe*et)+","+G+"Z";else{me=Math.abs(O-G)+fe;var xt=me0?Math.sqrt(fe*(2*Oe-fe)):0,Ct=gt>0?Math.max:Math.min;Re="M"+(H+xt*et)+","+G+"V"+Ct(O-(Oe-fe)*gt,G)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et-_t)+","+O+"H"+(j-Oe*et+_t)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-xt*et)+","+Ct(O-(Oe-fe)*gt,G)+"V"+G+"Z"}}else Re=Be}else Re=Be;var jt=Nge(qd.ensureSingle(q,"path"),u,i,a);if(jt.style("vector-effect",l?"none":"non-scaling-stroke").attr("d",isNaN((j-H)*(O-G))||W&&e._context.staticPlot?"M0,0Z":Re).call(T_.setClipUrl,t.layerClipId,e),!u.uniformtext.mode&&_){var At=T_.makePointStyleFns(d);T_.singlePointStyle(T,jt,d,At,e)}Qgt(e,t,q,c,F,H,j,G,O,Oe,fe,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var z=d.cliponaxis===!1;T_.setClipUrl(h,z?null:t.layerClipId,e)});Vgt.getComponentMethod("errorbars","plot")(e,f,t,i)}function Qgt(e,t,r,n,i,a,o,s,u,l,f,c,h){var d=t.xaxis,p=t.yaxis,x=e._fullLayout,b;function y(me,Be,fe){var Ze=qd.ensureSingle(me,"text").text(Be).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(T_.font,fe).call(Ngt.convertToTspans,e);return Ze}var E=n[0].trace,k=E.orientation==="h",A=r1t(x,n,i,d,p);b=i1t(E,i);var L=c.mode==="stack"||c.mode==="relative",_=n[i],C=!L||_._outmost,M=_.hasB,v=l&&l-f>Up;if(!A||b==="none"||(_.isBlank||a===o||s===u)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var z=x.font,T=zV.getBarColor(n[i],E),F=zV.getInsideTextFont(E,i,z,T),q=zV.getOutsideTextFont(E,i,z),U=E.insidetextanchor||"end",H=r.datum();k?d.type==="log"&&H.s0<=0&&(d.range[0]0&&ze>0,te;v?M?te=r2(O-2*l,W,be,ze,k)||r2(O,W-2*l,be,ze,k):k?te=r2(O-(l-f),W,be,ze,k)||r2(O,W-2*(l-f),be,ze,k):te=r2(O,W-(l-f),be,ze,k)||r2(O-2*(l-f),W,be,ze,k):te=r2(O,W,be,ze,k),he&&te?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){Ce=qd.ensureUniformFontSize(e,b==="outside"?q:F),re=y(r,A,Ce);var ke=re.attr("transform");if(re.attr("transform",""),ne=T_.bBox(re.node()),be=ne.width,ze=ne.height,re.attr("transform",ke),be<=0||ze<=0){re.remove();return}}var Ee=E.textangle,Me,Oe;b==="outside"?(Oe=E.constraintext==="both"||E.constraintext==="outside",Me=t1t(a,o,s,u,ne,{isHorizontal:k,constrained:Oe,angle:Ee})):(Oe=E.constraintext==="both"||E.constraintext==="inside",Me=Gge(a,o,s,u,ne,{isHorizontal:k,constrained:Oe,angle:Ee,anchor:U,hasB:M,r:l,overhead:f})),Me.fontSize=Ce.size,Hgt(E.type==="histogram"?"bar":E.type,Me,x),_.transform=Me;var Re=Nge(re,x,c,h);qd.setTransormAndDisplay(Re,Me)}function r2(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 Vge(e){return e==="auto"?0:e}function Hge(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 Gge(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,u=a.angle||0,l=a.anchor,f=l==="end",c=l==="start",h=a.leftToRight||0,d=(h+1)/2,p=1-d,x=a.hasB,b=a.r,y=a.overhead,E=i.width,k=i.height,A=Math.abs(t-e),L=Math.abs(n-r),_=A>2*Up&&L>2*Up?Up:0;A-=2*_,L-=2*_;var C=Vge(u);u==="auto"&&!(E<=A&&k<=L)&&(E>A||k>L)&&(!(E>L||k>A)||EUp){var T=e1t(e,t,r,n,M,b,y,o,x);v=T.scale,z=T.pad}else v=1,s&&(v=Math.min(1,A/M.x,L/M.y)),z=0;var F=i.left*p+i.right*d,q=(i.top+i.bottom)/2,U=(e+Up)*p+(t-Up)*d,H=(r+n)/2,j=0,G=0;if(c||f){var O=(o?M.x:M.y)/2;b&&(f||x)&&(_+=z);var W=o?zm(e,t):zm(r,n);o?c?(U=e+W*_,j=-W*O):(U=t-W*_,j=W*O):c?(H=r+W*_,G=-W*O):(H=n-W*_,G=W*O)}return{textX:F,textY:q,targetX:U,targetY:H,anchorX:j,anchorY:G,scale:v,rotate:C}}function e1t(e,t,r,n,i,a,o,s,u){var l=Math.max(0,Math.abs(t-e)-2*Up),f=Math.max(0,Math.abs(n-r)-2*Up),c=a-Up,h=o?c-Math.sqrt(c*c-(c-o)*(c-o)):c,d=u?c*2:s?c-o:2*h,p=u?c*2:s?2*h:c-o,x,b,y,E,k;return i.y/i.x>=f/(l-d)?E=f/i.y:i.y/i.x<=(f-p)/l?E=l/i.x:!u&&s?(x=i.x*i.x+i.y*i.y/4,b=-2*i.x*(l-c)-i.y*(f/2-c),y=(l-c)*(l-c)+(f/2-c)*(f/2-c)-c*c,E=(-b+Math.sqrt(b*b-4*x*y))/(2*x)):u?(x=(i.x*i.x+i.y*i.y)/4,b=-i.x*(l/2-c)-i.y*(f/2-c),y=(l/2-c)*(l/2-c)+(f/2-c)*(f/2-c)-c*c,E=(-b+Math.sqrt(b*b-4*x*y))/(2*x)):(x=i.x*i.x/4+i.y*i.y,b=-i.x*(l/2-c)-2*i.y*(f-c),y=(l/2-c)*(l/2-c)+(f-c)*(f-c)-c*c,E=(-b+Math.sqrt(b*b-4*x*y))/(2*x)),E=Math.min(1,E),s?k=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-i.y*E)/2)*(c-(f-i.y*E)/2)))-o):k=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(l-i.x*E)/2)*(c-(l-i.x*E)/2)))-o),{scale:E,pad:k}}function t1t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,u=a.angle||0,l=i.width,f=i.height,c=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Up?Up:0:d=c>2*Up?Up:0;var p=1;s&&(p=o?Math.min(1,h/f):Math.min(1,c/l));var x=Vge(u),b=Hge(i,x),y=(o?b.x:b.y)/2,E=(i.left+i.right)/2,k=(i.top+i.bottom)/2,A=(e+t)/2,L=(r+n)/2,_=0,C=0,M=o?zm(t,e):zm(r,n);return o?(A=t-M*d,_=M*y):(L=n+M*d,C=-M*y),{textX:E,textY:k,targetX:A,targetY:L,anchorX:_,anchorY:C,scale:p,rotate:x}}function r1t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=n1t(e,t,r,n,i):a.textinfo?s=a1t(t,r,n,i):s=wT.getValue(a.text,r),wT.coerceString(jgt,s)}function i1t(e,t){var r=wT.getValue(e.textposition,t);return wT.coerceEnumerated(Zgt,r)}function n1t(e,t,r,n,i){var a=t[0].trace,o=qd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",u=a.type==="waterfall",l=a.type==="funnel",f=a.orientation==="h",c,h,d,p;f?(c="y",h=i,d="x",p=n):(c="x",h=n,d="y",p=i);function x(_){return NI(h,h.c2l(_),!0).text}function b(_){return NI(p,p.c2l(_),!0).text}var y=t[r],E={};E.label=y.p,E.labelLabel=E[c+"Label"]=x(y.p);var k=qd.castOption(a,y.i,"text");(k===0||k)&&(E.text=k),E.value=y.s,E.valueLabel=E[d+"Label"]=b(y.s);var A={};Xgt(A,a,y.i),(s||A.x===void 0)&&(A.x=f?E.value:E.label),(s||A.y===void 0)&&(A.y=f?E.label:E.value),(s||A.xLabel===void 0)&&(A.xLabel=f?E.valueLabel:E.labelLabel),(s||A.yLabel===void 0)&&(A.yLabel=f?E.labelLabel:E.valueLabel),u&&(E.delta=+y.rawS||y.s,E.deltaLabel=b(E.delta),E.final=y.v,E.finalLabel=b(E.final),E.initial=E.final-E.delta,E.initialLabel=b(E.initial)),l&&(E.value=y.s,E.valueLabel=b(E.value),E.percentInitial=y.begR,E.percentInitialLabel=qd.formatPercent(y.begR),E.percentPrevious=y.difR,E.percentPreviousLabel=qd.formatPercent(y.difR),E.percentTotal=y.sumR,E.percenTotalLabel=qd.formatPercent(y.sumR));var L=qd.castOption(a,y.i,"customdata");return L&&(E.customdata=L),qd.texttemplateString(o,E,e._d3locale,A,E,a._meta||{})}function a1t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function u(L){var _=a?n:r;return NI(_,L,!0).text}function l(L){var _=a?r:n;return NI(_,+L,!0).text}var f=i.textinfo,c=e[t],h=f.split("+"),d=[],p,x=function(L){return h.indexOf(L)!==-1};if(x("label")&&d.push(u(e[t].p)),x("text")&&(p=qd.castOption(i,c.i,"text"),(p===0||p)&&d.push(p)),o){var b=+c.rawS||c.s,y=c.v,E=y-b;x("initial")&&d.push(l(E)),x("delta")&&d.push(l(b)),x("final")&&d.push(l(y))}if(s){x("value")&&d.push(l(c.s));var k=0;x("percent initial")&&k++,x("percent previous")&&k++,x("percent total")&&k++;var A=k>1;x("percent initial")&&(p=qd.formatPercent(c.begR),A&&(p+=" of initial"),d.push(p)),x("percent previous")&&(p=qd.formatPercent(c.difR),A&&(p+=" of previous"),d.push(p)),x("percent total")&&(p=qd.formatPercent(c.sumR),A&&(p+=" of total"),d.push(p))}return d.join("
")}Wge.exports={plot:$gt,toMoveInsideBar:Gge}});var TT=Se((Xsr,Yge)=>{"use strict";var d4=jc(),o1t=Ul(),jge=Pl(),s1t=Zr().fillText,l1t=qI().getLineWidth,IV=hu().hoverLabelText,u1t=ju().BADNUM;function f1t(e,t,r,n,i){var a=Zge(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,u=o[a.index];return a.color=Xge(s,u),o1t.getComponentMethod("errorbars","hoverInfo")(u,s,a),[a]}}function Zge(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,u=n==="closest",l=o.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,h,d,p,x,b,y,E;o.orientation==="h"?(h=r,d=t,p="y",x="x",b=H,y=F):(h=t,d=r,p="x",x="y",y=H,b=F);var k=o[p+"period"],A=u||k;function L(te){return C(te,-1)}function _(te){return C(te,1)}function C(te,ke){var Ee=te.w;return te[p]+ke*Ee/2}function M(te){return te[p+"End"]-te[p+"Start"]}var v=u?L:k?function(te){return te.p-M(te)/2}:function(te){return Math.min(L(te),te.p-s.bardelta/2)},z=u?_:k?function(te){return te.p+M(te)/2}:function(te){return Math.max(_(te),te.p+s.bardelta/2)};function T(te,ke,Ee){return i.finiteRange&&(Ee=0),d4.inbox(te-h,ke-h,Ee+Math.min(1,Math.abs(ke-te)/E)-1)}function F(te){return T(v(te),z(te),f)}function q(te){return T(L(te),_(te),c)}function U(te){var ke=te[x];if(l){var Ee=Math.abs(te.rawS)||0;d>0?ke+=Ee:d<0&&(ke-=Ee)}return ke}function H(te){var ke=d,Ee=te.b,Me=U(te);return d4.inbox(Ee-ke,Me-ke,f+(Me-ke)/(Me-Ee)-1)}function j(te){var ke=d,Ee=te.b,Me=U(te);return d4.inbox(Ee-ke,Me-ke,c+(Me-ke)/(Me-Ee)-1)}var G=e[p+"a"],O=e[x+"a"];E=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function W(te){return(b(te)+y(te))/2}var re=d4.getDistanceFunction(n,b,y,W);if(d4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==u1t){A||(v=function(te){return Math.min(L(te),te.p-s.bargroupwidth/2)},z=function(te){return Math.max(_(te),te.p+s.bargroupwidth/2)});var ne=e.index,be=a[ne],ze=o.base?be.b+be.s:be.s;e[x+"0"]=e[x+"1"]=O.c2p(be[x],!0),e[x+"LabelVal"]=ze;var Ce=s.extents[s.extents.round(be.p)];e[p+"0"]=G.c2p(u?v(be):Ce[0],!0),e[p+"1"]=G.c2p(u?z(be):Ce[1],!0);var he=be.orig_p!==void 0;return e[p+"LabelVal"]=he?be.orig_p:be.p,e.labelLabel=IV(G,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=IV(O,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=IV(O,be.b,o[x+"hoverformat"]),e.spikeDistance=(j(be)+q(be))/2,e[p+"Spike"]=G.c2p(be.p,!0),s1t(be,o,e),e.hovertemplate=o.hovertemplate,e}}function Xge(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=l1t(e,t);if(jge.opacity(r))return r;if(jge.opacity(n)&&i)return n}Yge.exports={hoverPoints:f1t,hoverOnBars:Zge,getTraceColor:Xge}});var Jge=Se((Ysr,Kge)=>{"use strict";Kge.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 AT=Se((Ksr,$ge)=>{"use strict";$ge.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",u=o.orientation==="h",l=[],f;if(r===!1)for(f=0;f{"use strict";Qge.exports={attributes:Lm(),layoutAttributes:DI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:kV(),calc:Tge(),crossTraceCalc:Gb().crossTraceCalc,colorbar:ep(),arraysToCalcdata:f4(),plot:i2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:TT().hoverPoints,eventData:Jge(),selectPoints:AT(),moduleType:"trace",name:"bar",basePlotModule:Th(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var r1e=Se(($sr,t1e)=>{"use strict";t1e.exports=e1e()});var p4=Se((Qsr,o1e)=>{"use strict";var h1t=Ey(),U0=Zc(),i1e=Lm(),d1t=Ih(),n1e=Gc().axisHoverFormat,p1t=Du().hovertemplateAttrs,Rg=vu().extendFlat,ST=U0.marker,a1e=ST.line;o1e.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:n1e("x"),yhoverformat:n1e("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:Rg({},ST.symbol,{arrayOk:!1,editType:"plot"}),opacity:Rg({},ST.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Rg({},ST.angle,{arrayOk:!1,editType:"calc"}),size:Rg({},ST.size,{arrayOk:!1,editType:"calc"}),color:Rg({},ST.color,{arrayOk:!1,editType:"style"}),line:{color:Rg({},a1e.color,{arrayOk:!1,dflt:d1t.defaultLine,editType:"style"}),width:Rg({},a1e.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:h1t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i1e.offsetgroup,alignmentgroup:i1e.alignmentgroup,selected:{marker:U0.selected.marker,editType:"style"},unselected:{marker:U0.unselected.marker,editType:"style"},text:Rg({},U0.text,{}),hovertext:Rg({},U0.hovertext,{}),hovertemplate:p1t({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:U0.zorder}});var v4=Se((elr,s1e)=>{"use strict";s1e.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 m4=Se((tlr,c1e)=>{"use strict";var V0=Zr(),v1t=Ul(),y1t=Pl(),m1t=zy(),g1t=Hb(),l1e=L3(),y4=p4();function _1t(e,t,r,n){function i(p,x){return V0.coerce(e,t,y4,p,x)}if(u1e(e,t,i,n),t.visible!==!1){m1t(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",y1t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),u=i("sd");s&&s.length&&(o=!0,u&&u.length&&(o="sd"))}i("whiskerwidth");var l=i("sizemode"),f;l==="quartiles"&&(f=i("boxmean",o)),i("showwhiskers",l==="quartiles"),(l==="sd"||f==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var c=!1;if(a){var h=i("notchspan");h&&h.length&&(c=!0)}else V0.validate(e.notchwidth,y4.notchwidth)&&(c=!0);var d=i("notched",c);d&&i("notchwidth"),f1e(e,t,i,{prefix:"box"}),i("zorder")}}function u1e(e,t,r,n){function i(z){var T=0;return z&&z.length&&(T+=1,V0.isArrayOrTypedArray(z[0])&&z[0].length&&(T+=1)),T}function a(z){return V0.validate(e[z],y4[z])}var o=r("y"),s=r("x"),u;if(t.type==="box"){var l=r("q1"),f=r("median"),c=r("q3");t._hasPreCompStats=l&&l.length&&f&&f.length&&c&&c.length,u=Math.min(V0.minRowLength(l),V0.minRowLength(f),V0.minRowLength(c))}var h=i(o),d=i(s),p=h&&V0.minRowLength(o),x=d&&V0.minRowLength(s),b=n.calendar,y={autotypenumbers:n.autotypenumbers},E,k;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var A=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!A?E="h":E="v",k=u;break;case"10":E="v",k=Math.min(u,x);break;case"20":E="h",k=Math.min(u,s.length);break;case"01":E="h",k=Math.min(u,p);break;case"02":E="v",k=Math.min(u,o.length);break;case"12":E="v",k=Math.min(u,x,o.length);break;case"21":E="h",k=Math.min(u,s.length,p);break;case"11":k=0;break;case"22":var _=!1,C;for(C=0;C0?(E="v",d>0?k=Math.min(x,p):k=Math.min(p)):d>0?(E="h",k=Math.min(x)):k=0;if(!k){t.visible=!1;return}t._length=k;var M=r("orientation",E);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 v=v1t.getComponentMethod("calendars","handleTraceDefaults");v(e,t,["x","y"],n)}function f1e(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,y4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var u=r(i+"points",s);u?(r("jitter",u==="all"?.3:0),r("pointpos",u==="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"),u==="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 l=r("hoveron");(l==="all"||l.indexOf("points")!==-1)&&r("hovertemplate"),V0.coerceSelectionMarkerOpacity(t,r)}function x1t(e,t){var r,n;function i(u){return V0.coerce(n._input,n,y4,u)}for(var a=0;a{"use strict";var b1t=Ul(),w1t=Zr(),T1t=v4();function h1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var RV=_u(),VI=hu(),S1t=Iy(),Ah=Zr(),i0=ju().BADNUM,Fg=Ah._;w1e.exports=function(t,r){var n=t._fullLayout,i=VI.getFromId(t,r.xaxis||"x"),a=VI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",u,l,f,c,h,d,p;r.orientation==="h"?(f=i,c="x",h=a,d="y",p=!!r.yperiodalignment):(f=a,c="y",h=i,d="x",p=!!r.xperiodalignment);var x=M1t(r,d,h,n[s]),b=x[0],y=x[1],E=Ah.distinctVals(b,h),k=E.vals,A=E.minDiff/2,L,_,C,M,v,z,T=(r.boxpoints||r.points)==="all"?Ah.identity:function(Pt){return Pt.vL.uf};if(r._hasPreCompStats){var F=r[c],q=function(Pt){return f.d2c((r[Pt]||[])[u])},U=1/0,H=-1/0;for(u=0;u=L.q1&&L.q3>=L.med){var G=q("lowerfence");L.lf=G!==i0&&G<=L.q1?G:m1e(L,C,M);var O=q("upperfence");L.uf=O!==i0&&O>=L.q3?O:g1e(L,C,M);var W=q("mean");L.mean=W!==i0?W:M?Ah.mean(C,M):(L.q1+L.q3)/2;var re=q("sd");L.sd=W!==i0&&re>=0?re:M?Ah.stdev(C,M,L.mean):L.q3-L.q1,L.lo=_1e(L),L.uo=x1e(L);var ne=q("notchspan");ne=ne!==i0&&ne>0?ne:b1e(L,M),L.ln=L.med-ne,L.un=L.med+ne;var be=L.lf,ze=L.uf;r.boxpoints&&C.length&&(be=Math.min(be,C[0]),ze=Math.max(ze,C[M-1])),r.notched&&(be=Math.min(be,L.ln),ze=Math.max(ze,L.un)),L.min=be,L.max=ze}else{Ah.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}U=Math.min(U,L.min),H=Math.max(H,L.max),L.pts2=_.filter(T),o.push(L)}}r._extremes[f._id]=VI.findExtremes(f,[U,H],{padded:!0})}else{var he=f.makeCalcdata(r,c),te=E1t(k,A),ke=k.length,Ee=k1t(ke);for(u=0;u=0&&Me0){if(L={},L.pos=L[d]=k[u],_=L.pts=Ee[u].sort(v1e),C=L[c]=_.map(y1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=Ah.mean(C,M),L.sd=Ah.stdev(C,M,L.mean)*r.sdmultiple,L.med=Ah.interp(C,.5),M%2&&(Be||fe)){var Ze,et;Be?(Ze=C.slice(0,M/2),et=C.slice(M/2+1)):fe&&(Ze=C.slice(0,M/2+1),et=C.slice(M/2)),L.q1=Ah.interp(Ze,.5),L.q3=Ah.interp(et,.5)}else L.q1=Ah.interp(C,.25),L.q3=Ah.interp(C,.75);L.lf=m1e(L,C,M),L.uf=g1e(L,C,M),L.lo=_1e(L),L.uo=x1e(L);var gt=b1e(L,M);L.ln=L.med-gt,L.un=L.med+gt,Oe=Math.min(Oe,L.ln),Re=Math.max(Re,L.un),L.pts2=_.filter(T),o.push(L)}r.notched&&Ah.isTypedArray(he)&&(he=Array.from(he)),r._extremes[f._id]=VI.findExtremes(f,r.notched?he.concat([Oe,Re]):he,{padded:!0})}return C1t(o,r),o.length>0?(o[0].t={num:n[s],dPos:A,posLetter:d,valLetter:c,labels:{med:Fg(t,"median:"),min:Fg(t,"min:"),q1:Fg(t,"q1:"),q3:Fg(t,"q3:"),max:Fg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Fg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Fg(t,"mean:"),lf:Fg(t,"lower fence:"),uf:Fg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function M1t(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),u=S1t(e,r,t,s).vals;return[u,s]}var l;a?l=e[t+"0"]:"name"in e&&(r.type==="category"||RV(e.name)&&["linear","log"].indexOf(r.type)!==-1||Ah.isDateTime(e.name)&&r.type==="date")?l=e.name:l=n;for(var f=r.type==="multicategory"?r.r2c_just_indices(l):r.d2c(l,0,e[t+"calendar"]),c=e._length,h=new Array(c),d=0;d{"use strict";var T1e=hu(),L1t=Zr(),z1t=Ob().getAxisGroup,A1e=["v","h"];function P1t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,E=1-a[e+"gap"],k=1-a[e+"groupgap"];for(u=0;u0;if(C==="positive"?(O=M*(_?1:.5),ne=re,W=ne=z):C==="negative"?(O=ne=z,W=M*(_?1:.5),be=re):(O=W=M,ne=be=re),Ee){var Me=A.pointpos,Oe=A.jitter,Re=A.marker.size/2,me=0;Me+Oe>=0&&(me=re*(Me+Oe),me>O?(ke=!0,he=Re,ze=me):me>ne&&(he=Re,ze=O)),me<=O&&(ze=O);var Be=0;Me-Oe<=0&&(Be=-re*(Me-Oe),Be>W?(ke=!0,te=Re,Ce=Be):Be>be&&(te=Re,Ce=W)),Be<=W&&(Ce=W)}else ze=O,Ce=W;var fe=new Array(f.length);for(l=0;l{"use strict";var MT=Nl(),n2=Zr(),I1t=yu(),E1e=5,D1t=.01;function R1t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;n2.makeTraceGroups(n,r,"trace boxes").each(function(s){var u=MT.select(this),l=s[0],f=l.t,c=l.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){u.remove();return}var h,d;c.orientation==="h"?(h=o,d=a):(h=a,d=o),k1e(u,{pos:h,val:d},c,f,i),C1e(u,{x:a,y:o},c,f),L1e(u,{pos:h,val:d},c,f)})}function k1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,u=!!s.rangebreaks,l=n.bPos,f=n.wdPos||0,c=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,p=r.notched||!1,x=p?1-2*r.notchwidth:1,b,y;Array.isArray(n.bdPos)?(b=n.bdPos[0],y=n.bdPos[1]):(b=n.bdPos,y=n.bdPos);var E=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?n2.identity:[]);E.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),E.exit().remove(),E.each(function(k){if(k.empty)return MT.select(this).attr("d","M0,0Z");var A=s.c2l(k.pos+l,!0),L=s.l2p(A-b)+c,_=s.l2p(A+y)+c,C=u?(L+_)/2:s.l2p(A)+c,M=r.whiskerwidth,v=u?L*M+(1-M)*C:s.l2p(A-f)+c,z=u?_*M+(1-M)*C:s.l2p(A+f)+c,T=s.l2p(A-b*x)+c,F=s.l2p(A+y*x)+c,q=r.sizemode==="sd",U=o.c2p(q?k.mean-k.sd:k.q1,!0),H=q?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),j=n2.constrain(q?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(U,H)+1,Math.max(U,H)-1),G=k.lf===void 0||r.boxpoints===!1||q,O=o.c2p(G?k.min:k.lf,!0),W=o.c2p(G?k.max:k.uf,!0),re=o.c2p(k.ln,!0),ne=o.c2p(k.un,!0);a?MT.select(this).attr("d","M"+j+","+T+"V"+F+"M"+U+","+L+"V"+_+(p?"H"+re+"L"+j+","+F+"L"+ne+","+_:"")+"H"+H+"V"+L+(p?"H"+ne+"L"+j+","+T+"L"+re+","+L:"")+"Z"+(d?"M"+U+","+C+"H"+O+"M"+H+","+C+"H"+W+(h===0?"":"M"+O+","+v+"V"+z+"M"+W+","+v+"V"+z):"")):MT.select(this).attr("d","M"+T+","+j+"H"+F+"M"+L+","+U+"H"+_+(p?"V"+re+"L"+F+","+j+"L"+_+","+ne:"")+"V"+H+"H"+L+(p?"V"+ne+"L"+T+","+j+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+U+"V"+O+"M"+C+","+H+"V"+W+(h===0?"":"M"+v+","+O+"H"+z+"M"+v+","+W+"H"+z):""))})}function C1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,u=r.boxpoints||r.points;n2.seedPseudoRandom();var l=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},f=e.selectAll("g.points").data(u?l:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(h){var d,p=h.pts2,x=Math.max((h.max-h.min)/10,h.q3-h.q1),b=x*1e-9,y=x*D1t,E=[],k=0,A;if(r.jitter){if(x===0)for(k=1,E=new Array(p.length),d=0;dh.lo&&(z.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(I1t.translatePoints,i,a)}function L1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,u=n.bPosPxOffset||0,l=r.boxmean||(r.meanline||{}).visible,f,c;Array.isArray(n.bdPos)?(f=n.bdPos[0],c=n.bdPos[1]):(f=n.bdPos,c=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?n2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=a.c2l(d.pos+s,!0),x=a.l2p(p-f)+u,b=a.l2p(p+c)+u,y=o?(x+b)/2:a.l2p(p)+u,E=i.c2p(d.mean,!0),k=i.c2p(d.mean-d.sd,!0),A=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?MT.select(this).attr("d","M"+E+","+x+"V"+b+(l==="sd"?"m0,0L"+k+","+y+"L"+E+","+x+"L"+A+","+y+"Z":"")):MT.select(this).attr("d","M"+x+","+E+"H"+b+(l==="sd"?"m0,0L"+y+","+k+"L"+x+","+E+"L"+y+","+A+"Z":""))})}z1e.exports={plot:R1t,plotBoxAndWhiskers:k1e,plotPoints:C1e,plotBoxMean:L1e}});var WI=Se((olr,P1e)=>{"use strict";var qV=Nl(),BV=Pl(),OV=yu();function F1t(e,t,r){var n=r||qV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=qV.select(this),o=i[0].trace,s=o.line.width;function u(c,h,d,p){c.style("stroke-width",h+"px").call(BV.stroke,d).call(BV.fill,p)}var l=a.selectAll("path.box");if(o.type==="candlestick")l.each(function(c){if(!c.empty){var h=qV.select(this),d=o[c.dir];u(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!c.selected?.3:1)}});else{u(l,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(BV.stroke,o.line.color);var f=a.selectAll("path.point");OV.pointStyle(f,o,e)}})}function q1t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?OV.selectedPointStyle(i,n):OV.pointStyle(i,n,e)}P1e.exports={style:F1t,styleOnSelect:q1t}});var UV=Se((slr,F1e)=>{"use strict";var B1t=hu(),NV=Zr(),A_=jc(),I1e=Pl(),O1t=NV.fillText;function N1t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],u;return o.indexOf("boxes")!==-1&&(s=s.concat(D1e(e,t,r,n))),o.indexOf("points")!==-1&&(u=R1e(e,t,r)),n==="closest"?u?[u]:s:(u&&s.push(u),s)}function D1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,u=i[0].t,l=s.type==="violin",f,c,h,d,p,x,b,y,E,k,A,L=u.bdPos,_,C,M=u.wHover,v=function(Re){return h.c2l(Re.pos)+u.bPos-h.c2l(x)};l&&s.side!=="both"?(s.side==="positive"&&(E=function(Re){var me=v(Re);return A_.inbox(me,me+M,k)},_=L,C=0),s.side==="negative"&&(E=function(Re){var me=v(Re);return A_.inbox(me-M,me,k)},_=0,C=L)):(E=function(Re){var me=v(Re);return A_.inbox(me-M,me+M,k)},_=C=L);var z;l?z=function(Re){return A_.inbox(Re.span[0]-p,Re.span[1]-p,k)}:z=function(Re){return A_.inbox(Re.min-p,Re.max-p,k)},s.orientation==="h"?(p=t,x=r,b=z,y=E,f="y",h=o,c="x",d=a):(p=r,x=t,b=E,y=z,f="x",h=a,c="y",d=o);var T=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));k=e.maxHoverDistance-T,A=e.maxSpikeDistance-T;function F(Re){return(b(Re)+y(Re))/2}var q=A_.getDistanceFunction(n,b,y,F);if(A_.getClosest(i,q,e),e.index===!1)return[];var U=i[e.index],H=s.line.color,j=(s.marker||{}).color;I1e.opacity(H)&&s.line.width?e.color=H:I1e.opacity(j)&&s.boxpoints?e.color=j:e.color=s.fillcolor,e[f+"0"]=h.c2p(U.pos+u.bPos-C,!0),e[f+"1"]=h.c2p(U.pos+u.bPos+_,!0),e[f+"LabelVal"]=U.orig_p!==void 0?U.orig_p:U.pos;var G=f+"Spike";e.spikeDistance=F(U)*A/k,e[G]=h.c2p(U.pos,!0);var O=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,W=s.boxpoints||s.points,re=W&&O?["max","uf","q3","med","mean","q1","lf","min"]:W&&!O?["max","uf","q3","med","q1","lf","min"]:!W&&O?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ne=d.range[1]{"use strict";q1e.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 VV=Se((ulr,O1e)=>{"use strict";O1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u;if(r===!1)for(s=0;s{"use strict";N1e.exports={attributes:p4(),layoutAttributes:v4(),supplyDefaults:m4().supplyDefaults,crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:UI().supplyLayoutDefaults,calc:FV(),crossTraceCalc:HI().crossTraceCalc,plot:GI().plot,style:WI().style,styleOnSelect:WI().styleOnSelect,hoverPoints:UV().hoverPoints,eventData:B1e(),selectPoints:VV(),moduleType:"trace",name:"box",basePlotModule:Th(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var H1e=Se((clr,V1e)=>{"use strict";V1e.exports=U1e()});var ET=Se((hlr,G1e)=>{"use strict";var n0=Zc(),U1t=zf(),V1t=uc(),HV=Gc().axisHoverFormat,H1t=Du().hovertemplateAttrs,G1t=Du().texttemplateAttrs,W1t=Xf(),zv=vu().extendFlat;G1e.exports=zv({z:{valType:"data_array",editType:"calc"},x:zv({},n0.x,{impliedEdits:{xtype:"array"}}),x0:zv({},n0.x0,{impliedEdits:{xtype:"scaled"}}),dx:zv({},n0.dx,{impliedEdits:{xtype:"scaled"}}),y:zv({},n0.y,{impliedEdits:{ytype:"array"}}),y0:zv({},n0.y0,{impliedEdits:{ytype:"scaled"}}),dy:zv({},n0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:zv({},n0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:zv({},n0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:zv({},n0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:zv({},n0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:zv({},n0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:zv({},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:HV("x"),yhoverformat:HV("y"),zhoverformat:HV("z",1),hovertemplate:H1t(),texttemplate:G1t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:V1t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:zv({},U1t.showlegend,{dflt:!1}),zorder:n0.zorder},W1t("",{cLetter:"z",autoColorDflt:!1}))});var ZI=Se((dlr,j1e)=>{"use strict";var j1t=_u(),jI=Zr(),Z1t=Ul();j1e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var u,l;if(s===void 0||!s.length)return 0;if(jI.isArray1D(s)){u=n(a),l=n(o);var f=jI.minRowLength(u),c=jI.minRowLength(l);if(f===0||c===0)return 0;r._length=Math.min(f,c,s.length)}else{if(u=W1e(a,n),l=W1e(o,n),!X1t(s))return 0;n("transpose"),r._length=null}var h=Z1t.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function W1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function X1t(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var Z1e=Zr();X1e.exports=function(t,r){t("texttemplate");var n=Z1e.extendFlat({},r.font,{color:"auto",size:"auto"});Z1e.coerceFont(t,"textfont",n)}});var GV=Se((vlr,Y1e)=>{"use strict";Y1e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var $1e=Se((ylr,J1e)=>{"use strict";var K1e=Zr(),Y1t=ZI(),K1t=g4(),J1t=zy(),$1t=GV(),Q1t=ed(),e_t=ET();J1e.exports=function(t,r,n,i){function a(s,u){return K1e.coerce(t,r,e_t,s,u)}var o=Y1t(t,r,a,i);if(!o){r.visible=!1;return}J1t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),K1t(a,i),$1t(t,r,a,i),a("hoverongaps"),a("connectgaps",K1e.isArray1D(r.z)&&r.zsmooth!==!1),Q1t(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var WV=Se((mlr,Q1e)=>{"use strict";var kT=_u();Q1e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return kT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return kT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(kT(i))if(i=Number(i),kT(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(kT(i))if(i=Number(i),kT(r[e])){if(r[e]{"use strict";e_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";t_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var CT=ju(),a2=CT.ONEAVGYEAR,r_e=CT.ONEAVGMONTH,YI=CT.ONEDAY,i_e=CT.ONEHOUR,n_e=CT.ONEMIN,a_e=CT.ONESEC,o_e=hu().tickIncrement;u_e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,u=t-s,l=n[0],f=n[1],c=Math.min(XI(l+s,l+u,i,a),XI(f+s,f+u,i,a)),h=Math.min(XI(l+o,l+s,i,a),XI(f+o,f+s,i,a)),d,p;if(c>h&&hYI){var x=d===a2?1:6,b=d===a2?"M12":"M1";return function(y,E){var k=i.c2d(y,a2,a),A=k.indexOf("-",x);A>0&&(k=k.substr(0,A));var L=i.d2c(k,0,a);if(La_e?e>YI?e>a2*1.1?a2:e>r_e*1.1?r_e:YI:e>i_e?i_e:e>n_e?n_e:a_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function t_t(e,t,r,n,i,a){if(n&&e>YI){var o=l_e(t,i,a),s=l_e(r,i,a),u=e===a2?0:1;return o[u]!==s[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function l_e(e,t,r){var n=t.c2d(e,a2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var JV=Se((blr,h_e)=>{"use strict";var YV=_u(),Vp=Zr(),f_e=Ul(),H0=hu(),r_t=f4(),c_e=WV(),i_t=jV(),n_t=ZV(),a_t=XV();function o_t(e,t){var r=[],n=[],i=t.orientation==="h",a=H0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],u=t[o+"calendar"],l=t.cumulative,f,c=KV(e,t,a,o),h=c[0],d=c[1],p=typeof h.size=="string",x=[],b=p?x:h,y=[],E=[],k=[],A=0,L=t.histnorm,_=t.histfunc,C=L.indexOf("density")!==-1,M,v,z;l.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var T=_==="max"||_==="min",F=T?null:0,q=c_e.count,U=i_t[L],H=!1,j=function(me){return a.r2c(me,0,u)},G;for(Vp.isArrayOrTypedArray(t[s])&&_!=="count"&&(G=t[s],H=_==="avg",q=c_e[_]),f=j(h.start),v=j(h.end)+(f-H0.tickIncrement(f,h.size,!1,u))/1e6;f=0&&z=Me;f--)if(n[f]){Oe=f;break}for(f=Me;f<=Oe;f++)if(YV(r[f])&&YV(n[f])){var Re={p:r[f],s:n[f],b:0};l.enabled||(Re.pts=k[f],ne?Re.ph0=Re.ph1=k[f].length?d[k[f][0]]:r[f]:(t._computePh=!0,Re.ph0=te(x[f]),Re.ph1=te(x[f+1],!0))),Ee.push(Re)}return Ee.length===1&&(Ee[0].width1=H0.tickIncrement(Ee[0].p,h.size,!1,u)-Ee[0].p),r_t(Ee,t),Vp.isArrayOrTypedArray(t.selectedpoints)&&Vp.tagSelected(Ee,t,Ce),Ee}function KV(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],u=o._histogramBinOpts[s],l=o.barmode==="overlay",f,c,h,d,p,x,b,y=function(he){return r.r2c(he,0,d)},E=function(he){return r.c2r(he,0,d)},k=r.type==="date"?function(he){return he||he===0?Vp.cleanDate(he,null,d):null}:function(he){return YV(he)?Number(he):null};function A(he,te,ke){te[he+"Found"]?(te[he]=k(te[he]),te[he]===null&&(te[he]=ke[he])):(x[he]=te[he]=ke[he],Vp.nestedProperty(c[0],a+"."+he).set(ke[he]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{c=u.traces;var L=[],_=!0,C=!1,M=!1;for(f=0;fr.r2l(G)&&(W=H0.tickIncrement(W,u.size,!0,d)),q.start=r.l2r(W),j||Vp.nestedProperty(t,a+".start").set(q.start)}var re=u.end,ne=r.r2l(F.end),be=ne!==void 0;if((u.endFound||be)&&ne!==r.r2l(re)){var ze=be?ne:Vp.aggNums(Math.max,null,p);q.end=r.l2r(ze),be||Vp.nestedProperty(t,a+".start").set(q.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Vp.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[q,p]}function s_t(e,t,r,n,i){var a=e._fullLayout,o=l_t(e,t),s=!1,u=1/0,l=[t],f,c,h;for(f=0;f=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())}}h_e.exports={calc:o_t,calcAllAutoBins:KV}});var x_e=Se((wlr,__e)=>{"use strict";var d_e=Zr(),LT=hu(),p_e=WV(),f_t=jV(),c_t=ZV(),h_t=XV(),v_e=JV().calcAllAutoBins;__e.exports=function(t,r){var n=LT.getFromId(t,r.xaxis),i=LT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(je){return n.r2c(je,0,a)},u=function(je){return i.r2c(je,0,o)},l=function(je){return n.c2r(je,0,a)},f=function(je){return i.c2r(je,0,o)},c,h,d,p,x=v_e(t,r,n,"x"),b=x[0],y=x[1],E=v_e(t,r,i,"y"),k=E[0],A=E[1],L=r._length;y.length>L&&y.splice(L,y.length-L),A.length>L&&A.splice(L,A.length-L);var _=[],C=[],M=[],v=typeof b.size=="string",z=typeof k.size=="string",T=[],F=[],q=v?T:b,U=z?F:k,H=0,j=[],G=[],O=r.histnorm,W=r.histfunc,re=O.indexOf("density")!==-1,ne=W==="max"||W==="min",be=ne?null:0,ze=p_e.count,Ce=f_t[O],he=!1,te=[],ke=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&W!=="count"&&(he=W==="avg",ze=p_e[W]);var Me=b.size,Oe=s(b.start),Re=s(b.end)+(Oe-LT.tickIncrement(Oe,Me,!1,a))/1e6;for(c=Oe;c=0&&d=0&&p{"use strict";var Pm=Zr(),b_e=ju().BADNUM,w_e=Iy();T_e.exports=function(t,r,n,i,a,o){var s=t._length,u=r.makeCalcdata(t,i),l=n.makeCalcdata(t,a);u=w_e(t,r,i,u).vals,l=w_e(t,n,a,l).vals;var f=t.text,c=f!==void 0&&Pm.isArray1D(f),h=t.hovertext,d=h!==void 0&&Pm.isArray1D(h),p,x,b=Pm.distinctVals(u),y=b.vals,E=Pm.distinctVals(l),k=E.vals,A=[],L,_,C=k.length,M=y.length;for(p=0;p{"use strict";var d_t=_u(),p_t=Zr(),JI=ju().BADNUM;A_e.exports=function(t,r,n,i){var a,o,s,u,l,f;function c(y){if(d_t(y))return+y}if(r&&r.transpose){for(a=0,l=0;l{"use strict";var v_t=Zr(),S_e=.01,y_t=[[-1,0],[1,0],[0,-1],[0,1]];function m_t(e){return .5-.25*Math.min(1,e*.5)}E_e.exports=function(t,r){var n=1,i;for(M_e(t,r),i=0;iS_e;i++)n=M_e(t,r,m_t(n));return n>S_e&&v_t.log("interp2d didn't converge quickly",n),t};function M_e(e,t,r){var n=0,i,a,o,s,u,l,f,c,h,d,p,x,b;for(s=0;sx&&(n=Math.max(n,Math.abs(e[a][o]-p)/(b-x))))}return n}});var eD=Se((Mlr,k_e)=>{"use strict";var g_t=Zr().maxRowLength;k_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],u=g_t(t),l,f,c,h,d,p,x,b;for(f=0;f=0;d--)h=i[d],f=h[0],c=h[1],p=((n[[f-1,c]]||s)[2]+(n[[f+1,c]]||s)[2]+(n[[f,c-1]]||s)[2]+(n[[f,c+1]]||s)[2])/20,p&&(x[h]=[f,c,p],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in x)n[h]=x[h],r.push(x[h])}return r.sort(function(y,E){return E[2]-y[2]})}});var $V=Se((Elr,z_e)=>{"use strict";var C_e=Ul(),L_e=Zr().isArrayOrTypedArray;z_e.exports=function(t,r,n,i,a,o){var s=[],u=C_e.traceIs(t,"contour"),l=C_e.traceIs(t,"histogram"),f,c,h,d=L_e(r)&&r.length>1;if(d&&!l&&o.type!=="category"){var p=r.length;if(p<=a){if(u)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 P_e=Ul(),QV=Zr(),tD=hu(),I_e=Iy(),__t=x_e(),x_t=Rp(),b_t=KI(),w_t=$I(),T_t=QI(),A_t=eD(),rD=$V(),eH=ju().BADNUM;R_e.exports=function(t,r){var n=tD.getFromId(t,r.xaxis||"x"),i=tD.getFromId(t,r.yaxis||"y"),a=P_e.traceIs(r,"contour"),o=P_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,u,l,f,c,h,d,p,x,b,y,E;if(n._minDtick=0,i._minDtick=0,o)E=__t(t,r),c=E.orig_x,u=E.x,l=E.x0,f=E.dx,x=E.orig_y,h=E.y,d=E.y0,p=E.dy,b=E.z;else{var k=r.z;QV.isArray1D(k)?(b_t(r,n,i,"x","y",["z"]),u=r._x,h=r._y,k=r._z):(c=r.x?n.makeCalcdata(r,"x"):[],x=r.y?i.makeCalcdata(r,"y"):[],u=I_e(r,n,"x",c).vals,h=I_e(r,i,"y",x).vals,r._x=u,r._y=h),l=r.x0,f=r.dx,d=r.y0,p=r.dy,b=w_t(k,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=S_t(u,h,b),o||(u=D_e(u),h=D_e(h),r._x=u,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=A_t(b),T_t(b,r._emptypoints));function A(q){s=r._input.zsmooth=r.zsmooth=!1,QV.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var U=(q[q.length-1]-q[0])/(q.length-1),H=Math.abs(U/100);for(y=0;yH)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&A("log axis found"):L(u)?L(h)?r._islinear=!0:s==="fast"&&A("y scale is not linear"):s==="fast"&&A("x scale is not linear");var _=QV.maxRowLength(b),C=r.xtype==="scaled"?"":u,M=rD(r,C,l,f,_,n),v=r.ytype==="scaled"?"":h,z=rD(r,v,d,p,b.length,i);r._extremes[n._id]=tD.findExtremes(n,M),r._extremes[i._id]=tD.findExtremes(i,z);var T={x:M,y:z,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&c&&(T.orig_x=c),r.yperiodalignment&&x&&(T.orig_y=x),C&&C.length===M.length-1&&(T.xCenter=C),v&&v.length===z.length-1&&(T.yCenter=v),o&&(T.xRanges=E.xRanges,T.yRanges=E.yRanges,T.pts=E.pts),a||x_t(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var F={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=rD(F,C,l,f,_,n),T.yfill=rD(F,v,d,p,b.length,i)}return[T]};function D_e(e){for(var t=[],r=e.length,n=0;n{"use strict";nD.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"]];nD.STYLE=nD.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var tH=Se((Llr,B_e)=>{"use strict";var F_e=aD(),M_t=yu(),q_e=Zr(),zT=null;function E_t(){if(zT!==null)return zT;zT=!1;var e=q_e.isSafari()||q_e.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(F_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")zT=t.some(function(o){return r.apply(null,o)});else{var n=M_t.tester.append("image").attr("style",F_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;zT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return zT}B_e.exports=E_t});var oD=Se((zlr,Z_e)=>{"use strict";var O_e=Nl(),k_t=cd(),C_t=Ul(),L_t=yu(),z_t=hu(),G0=Zr(),N_e=Bf(),P_t=JP(),I_t=Pl(),D_t=fc().extractOpts,R_t=fc().makeColorScaleFuncFromTrace,F_t=Zv(),q_t=Qh(),rH=q_t.LINE_SPACING,B_t=tH(),O_t=aD().STYLE,W_e="heatmap-label";function j_e(e){return e.selectAll("g."+W_e)}function U_e(e){j_e(e).remove()}Z_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;G0.makeTraceGroups(n,r,"hm").each(function(o){var s=O_e.select(this),u=o[0],l=u.trace,f=l.xgap||0,c=l.ygap||0,h=u.z,d=u.x,p=u.y,x=u.xCenter,b=u.yCenter,y=C_t.traceIs(l,"contour"),E=y?"best":l.zsmooth,k=h.length,A=G0.maxRowLength(h),L=!1,_=!1,C,M,v,z,T,F,q,U;for(F=0;C===void 0&&F0;)M=i.c2p(d[F]),F--;for(M0;)T=a.c2p(p[F]),F--;T=i._length||M<=0||z>=a._length||T<=0;if(W){var re=s.selectAll("image").data([]);re.exit().remove(),U_e(s);return}var ne,be;H==="fast"?(ne=A,be=k):(ne=G,be=O);var ze=document.createElement("canvas");ze.width=ne,ze.height=be;var Ce=ze.getContext("2d",{willReadFrequently:!0}),he=R_t(l,{noNumericCheck:!0,returnArray:!0}),te,ke;H==="fast"?(te=L?function(vi){return A-1-vi}:G0.identity,ke=_?function(vi){return k-1-vi}:G0.identity):(te=function(vi){return G0.constrain(Math.round(i.c2p(d[vi])-C),0,G)},ke=function(vi){return G0.constrain(Math.round(a.c2p(p[vi])-z),0,O)});var Ee=ke(0),Me=[Ee,Ee],Oe=L?0:1,Re=_?0:1,me=0,Be=0,fe=0,Ze=0,et,gt,Pt,Qe,Xe;function Tt(vi,Pi){if(vi!==void 0){var Yr=he(vi);return Yr[0]=Math.round(Yr[0]),Yr[1]=Math.round(Yr[1]),Yr[2]=Math.round(Yr[2]),me+=Pi,Be+=Yr[0]*Pi,fe+=Yr[1]*Pi,Ze+=Yr[2]*Pi,Yr}return[0,0,0,0]}function xt(vi,Pi,Yr,Ni){var Ur=vi[Yr.bin0];if(Ur===void 0)return Tt(void 0,1);var ti=vi[Yr.bin1],ki=Pi[Yr.bin0],ji=Pi[Yr.bin1],Vi=ti-Ur||0,zi=ki-Ur||0,Mi;return ti===void 0?ji===void 0?Mi=0:ki===void 0?Mi=2*(ji-Ur):Mi=(2*ji-ki-Ur)*2/3:ji===void 0?ki===void 0?Mi=0:Mi=(2*Ur-ti-ki)*2/3:ki===void 0?Mi=(2*ji-ti-Ur)*2/3:Mi=ji+Ur-ti-ki,Tt(Ur+Yr.frac*Vi+Ni.frac*(zi+Yr.frac*Mi))}if(H!=="default"){var _t=0,Ct;try{Ct=new Uint8Array(ne*be*4)}catch(vi){Ct=new Array(ne*be*4)}if(H==="smooth"){var jt=x||d,At=b||p,Te=new Array(jt.length),nt=new Array(At.length),ut=new Array(G),ct=x?H_e:V_e,rt=b?H_e:V_e,je,tt,Je;for(F=0;FZt||Zt>a._length))for(q=de;qLr||Lr>i._length)){var vr=P_t({x:qr,y:St},l,e._fullLayout);vr.x=qr,vr.y=St;var Er=u.z[F][q];Er===void 0?(vr.z="",vr.zLabel=""):(vr.z=Er,vr.zLabel=z_t.tickText(Pe,Er,"hover").text);var si=u.text&&u.text[F]&&u.text[F][q];(si===void 0||si===!1)&&(si=""),vr.text=si;var Ei=G0.texttemplateString(_e,vr,e._fullLayout._d3locale,vr,l._meta||{});if(Ei){var Si=Ei.split("
"),xi=Si.length,Hi=0;for(U=0;U{"use strict";X_e.exports={min:"zmin",max:"zmax"}});var sD=Se((Ilr,Y_e)=>{"use strict";var N_t=Nl();Y_e.exports=function(t){N_t.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var uD=Se((Dlr,J_e)=>{"use strict";var K_e=jc(),_4=Zr(),lD=_4.isArrayOrTypedArray,U_t=hu(),V_t=fc().extractOpts;J_e.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],u=s.trace,l=t.xa,f=t.ya,c=s.x,h=s.y,d=s.z,p=s.xCenter,x=s.yCenter,b=s.zmask,y=u.zhoverformat,E=c,k=h,A,L,_,C;if(t.index!==!1){try{_=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){_4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(_<0||_>=d[0].length||C<0||C>d.length)return}else{if(K_e.inbox(r-c[0],r-c[c.length-1],0)>0||K_e.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(E=[2*c[0]-c[1]],M=1;M{"use strict";$_e.exports={attributes:ET(),supplyDefaults:$1e(),calc:iD(),plot:oD(),colorbar:S_(),style:sD(),hoverPoints:uD(),moduleType:"trace",name:"heatmap",basePlotModule:Th(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var txe=Se((Flr,exe)=>{"use strict";exe.exports=Q_e()});var iH=Se((qlr,rxe)=>{"use strict";rxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var nxe=Se((Blr,ixe)=>{"use strict";ixe.exports={eventDataKeys:["binNumber"]}});var fD=Se((Olr,sxe)=>{"use strict";var Pv=Lm(),axe=Gc().axisHoverFormat,H_t=Du().hovertemplateAttrs,G_t=Du().texttemplateAttrs,nH=uc(),oxe=iH(),W_t=nxe(),aH=vu().extendFlat;sxe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:axe("x"),yhoverformat:axe("y"),text:aH({},Pv.text,{}),hovertext:aH({},Pv.hovertext,{}),orientation:Pv.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:oxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:oxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:H_t({},{keys:W_t.eventDataKeys}),texttemplate:G_t({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:aH({},Pv.textposition,{arrayOk:!1}),textfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Pv.insidetextanchor,textangle:Pv.textangle,cliponaxis:Pv.cliponaxis,constraintext:Pv.constraintext,marker:Pv.marker,offsetgroup:Pv.offsetgroup,alignmentgroup:Pv.alignmentgroup,selected:Pv.selected,unselected:Pv.unselected,zorder:Pv.zorder}});var cxe=Se((Nlr,fxe)=>{"use strict";var lxe=Ul(),x4=Zr(),uxe=Pl(),j_t=r0().handleText,Z_t=RI(),X_t=fD();fxe.exports=function(t,r,n,i){function a(E,k){return x4.coerce(t,r,X_t,E,k)}var o=a("x"),s=a("y"),u=a("cumulative.enabled");u&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var l=a("textposition");j_t(t,r,i,a,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat");var f=a("orientation",s&&!o?"h":"v"),c=f==="v"?"x":"y",h=f==="v"?"y":"x",d=o&&s?Math.min(x4.minRowLength(o)&&x4.minRowLength(s)):x4.minRowLength(r[c]||[]);if(!d){r.visible=!1;return}r._length=d;var p=lxe.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],i);var x=r[h];x&&a("histfunc"),a("histnorm"),a("autobin"+c),Z_t(t,r,a,n,i),x4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,y=lxe.getComponentMethod("errorbars","supplyDefaults");y(t,r,b||uxe.defaultLine,{axis:"y"}),y(t,r,b||uxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var hD=Se((Ulr,pxe)=>{"use strict";var b4=Zr(),Y_t=$c(),cD=Ul().traceIs,K_t=Hb(),J_t=r0().validateCornerradius,hxe=b4.nestedProperty,oH=Ob().getAxisGroup,dxe=[{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"}],$_t=["x","y"];pxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,u,l,f,c,h,d;function p(H,j){return b4.coerce(s._input,s,s._module.attributes,H,j)}function x(H){return H.orientation==="v"?"x":"y"}function b(H,j){var G=Y_t.getFromTrace({_fullLayout:r},H,j);return G.type}function y(H,j,G){var O=H.uid+"__"+G;j||(j=O);var W=b(H,G),re=H[G+"calendar"]||"",ne=n[j],be=!0;ne&&(W===ne.axType&&re===ne.calendar?(be=!1,ne.traces.push(H),ne.dirs.push(G)):(j=O,W!==ne.axType&&b4.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+W,"axis","with bins on","type:"+ne.axType,"axis."].join(" ")),re!==ne.calendar&&b4.warn(["Attempted to group the bins of trace",H.index,"set with a",re,"calendar","with bins",ne.calendar?"on a "+ne.calendar+" calendar":"w/o a set calendar"].join(" ")))),be&&(n[j]={traces:[H],dirs:[G],axType:W,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=j}for(c=0;c{"use strict";var Q_t=TT().hoverPoints,ext=hu().hoverLabelText;vxe.exports=function(t,r,n,i,a){var o=Q_t(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],u=t.cd[0].trace;if(!u.cumulative.enabled){var l=u.orientation==="h"?"y":"x";t[l+"Label"]=ext(t[l+"a"],[s.ph0,s.ph1],u[l+"hoverformat"])}return o}}});var sH=Se((Hlr,mxe)=>{"use strict";mxe.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 u=0;u{"use strict";gxe.exports={attributes:fD(),layoutAttributes:DI(),supplyDefaults:cxe(),crossTraceDefaults:hD(),supplyLayoutDefaults:kV(),calc:JV().calc,crossTraceCalc:Gb().crossTraceCalc,plot:i2().plot,layerName:"barlayer",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:ep(),hoverPoints:yxe(),selectPoints:AT(),eventData:sH(),moduleType:"trace",name:"histogram",basePlotModule:Th(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var bxe=Se((Wlr,xxe)=>{"use strict";xxe.exports=_xe()});var pD=Se((jlr,Txe)=>{"use strict";var Vy=fD(),wxe=iH(),dD=ET(),txt=zf(),lH=Gc().axisHoverFormat,rxt=Du().hovertemplateAttrs,ixt=Du().texttemplateAttrs,nxt=Xf(),w4=vu().extendFlat;Txe.exports=w4({x:Vy.x,y:Vy.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Vy.histnorm,histfunc:Vy.histfunc,nbinsx:Vy.nbinsx,xbins:wxe("x"),nbinsy:Vy.nbinsy,ybins:wxe("y"),autobinx:Vy.autobinx,autobiny:Vy.autobiny,bingroup:w4({},Vy.bingroup,{}),xbingroup:w4({},Vy.bingroup,{}),ybingroup:w4({},Vy.bingroup,{}),xgap:dD.xgap,ygap:dD.ygap,zsmooth:dD.zsmooth,xhoverformat:lH("x"),yhoverformat:lH("y"),zhoverformat:lH("z",1),hovertemplate:rxt({},{keys:"z"}),texttemplate:ixt({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:dD.textfont,showlegend:w4({},txt.showlegend,{dflt:!1})},nxt("",{cLetter:"z",autoColorDflt:!1}))});var uH=Se((Zlr,Sxe)=>{"use strict";var axt=Ul(),Axe=Zr();Sxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=Axe.minRowLength(a),u=Axe.minRowLength(o);if(!s||!u){r.visible=!1;return}r._length=Math.min(s,u);var l=axt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y"],i);var f=n("z")||n("marker.color");f&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Exe=Se((Xlr,Mxe)=>{"use strict";var oxt=Zr(),sxt=uH(),lxt=GV(),uxt=ed(),fxt=g4(),cxt=pD();Mxe.exports=function(t,r,n,i){function a(o,s){return oxt.coerce(t,r,cxt,o,s)}sxt(t,r,a,i),r.visible!==!1&&(lxt(t,r,a,i),uxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),fxt(a,i),a("xhoverformat"),a("yhoverformat"))}});var Lxe=Se((Ylr,Cxe)=>{"use strict";var hxt=uD(),kxe=hu().hoverLabelText;Cxe.exports=function(t,r,n,i,a){var o=hxt(t,r,n,i,a);if(o){t=o[0];var s=t.index,u=s[0],l=s[1],f=t.cd[0],c=f.trace,h=f.xRanges[l],d=f.yRanges[u];return t.xLabel=kxe(t.xa,[h[0],h[1]],c.xhoverformat),t.yLabel=kxe(t.ya,[d[0],d[1]],c.yhoverformat),o}}});var Pxe=Se((Klr,zxe)=>{"use strict";zxe.exports={attributes:pD(),supplyDefaults:Exe(),crossTraceDefaults:hD(),calc:iD(),plot:oD(),layerName:"heatmaplayer",colorbar:S_(),style:sD(),hoverPoints:Lxe(),eventData:sH(),moduleType:"trace",name:"histogram2d",basePlotModule:Th(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Dxe=Se((Jlr,Ixe)=>{"use strict";Ixe.exports=Pxe()});var vD=Se(($lr,Rxe)=>{"use strict";Rxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var T4=Se((Qlr,Oxe)=>{"use strict";var id=ET(),yD=Zc(),qxe=Gc(),fH=qxe.axisHoverFormat,dxt=qxe.descriptionOnlyNumbers,pxt=Xf(),vxt=Id().dash,yxt=uc(),PT=vu().extendFlat,Bxe=vD(),mxt=Bxe.COMPARISON_OPS2,gxt=Bxe.INTERVAL_OPS,Fxe=yD.line;Oxe.exports=PT({z:id.z,x:id.x,x0:id.x0,dx:id.dx,y:id.y,y0:id.y0,dy:id.dy,xperiod:id.xperiod,yperiod:id.yperiod,xperiod0:yD.xperiod0,yperiod0:yD.yperiod0,xperiodalignment:id.xperiodalignment,yperiodalignment:id.yperiodalignment,text:id.text,hovertext:id.hovertext,transpose:id.transpose,xtype:id.xtype,ytype:id.ytype,xhoverformat:fH("x"),yhoverformat:fH("y"),zhoverformat:fH("z",1),hovertemplate:id.hovertemplate,texttemplate:PT({},id.texttemplate,{}),textfont:PT({},id.textfont,{}),hoverongaps:id.hoverongaps,connectgaps:PT({},id.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:yxt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:dxt("contour label")},operation:{valType:"enumerated",values:[].concat(mxt).concat(gxt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:PT({},Fxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:vxt,smoothing:PT({},Fxe.smoothing,{}),editType:"plot"},zorder:yD.zorder},pxt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var hH=Se((eur,Uxe)=>{"use strict";var Hp=pD(),qg=T4(),_xt=Xf(),cH=Gc().axisHoverFormat,Nxe=vu().extendFlat;Uxe.exports=Nxe({x:Hp.x,y:Hp.y,z:Hp.z,marker:Hp.marker,histnorm:Hp.histnorm,histfunc:Hp.histfunc,nbinsx:Hp.nbinsx,xbins:Hp.xbins,nbinsy:Hp.nbinsy,ybins:Hp.ybins,autobinx:Hp.autobinx,autobiny:Hp.autobiny,bingroup:Hp.bingroup,xbingroup:Hp.xbingroup,ybingroup:Hp.ybingroup,autocontour:qg.autocontour,ncontours:qg.ncontours,contours:qg.contours,line:{color:qg.line.color,width:Nxe({},qg.line.width,{dflt:.5}),dash:qg.line.dash,smoothing:qg.line.smoothing,editType:"plot"},xhoverformat:cH("x"),yhoverformat:cH("y"),zhoverformat:cH("z",1),hovertemplate:Hp.hovertemplate,texttemplate:qg.texttemplate,textfont:qg.textfont},_xt("",{cLetter:"z",editTypeOverride:"calc"}))});var mD=Se((tur,Vxe)=>{"use strict";Vxe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,u=n("contours.size"),l;s?l=r.autocontour=!0:l=n("autocontour",!1),(l||!u)&&n("ncontours")}});var dH=Se((rur,Hxe)=>{"use strict";var xxt=Zr();Hxe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;xxt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var gD=Se((iur,Gxe)=>{"use strict";var bxt=ed(),wxt=dH();Gxe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,u="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(u=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,bxt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),wxt(n,i,u,a)}});var Xxe=Se((nur,Zxe)=>{"use strict";var Wxe=Zr(),Txt=uH(),Axt=mD(),Sxt=gD(),Mxt=g4(),jxe=hH();Zxe.exports=function(t,r,n,i){function a(s,u){return Wxe.coerce(t,r,jxe,s,u)}function o(s){return Wxe.coerce2(t,r,jxe,s)}Txt(t,r,a,i),r.visible!==!1&&(Axt(t,r,a,o),Sxt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),r.contours&&r.contours.coloring==="heatmap"&&Mxt(a,i))}});var yH=Se((aur,Kxe)=>{"use strict";var vH=hu(),pH=Zr();Kxe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=pH.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=pH.aggNums(Math.max,null,r));var o=Yxe(i,a,t.ncontours);n.size=o.dtick,n.start=vH.tickFirst(o),o.range.reverse(),n.end=vH.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={}),pH.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,u=n.end,l=t._input.contours;if(s>u&&(n.start=l.start=u,u=n.end=l.end=s,s=n.start),!(n.size>0)){var f;s===u?f=1:f=Yxe(s,u,t.ncontours).dtick,l.size=n.size=f}}};function Yxe(e,t,r){var n={type:"linear",range:[e,t]};return vH.autoTicks(n,(t-e)/(r||15)),n}});var A4=Se((our,Jxe)=>{"use strict";Jxe.exports=function(t){return t.end+t.size/1e6}});var mH=Se((sur,Qxe)=>{"use strict";var $xe=fc(),Ext=iD(),kxt=yH(),Cxt=A4();Qxe.exports=function(t,r){var n=Ext(t,r),i=n[0].z;kxt(r,i);var a=r.contours,o=$xe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var u=a.start,l=Cxt(a),f=a.size||1,c=Math.floor((l-u)/f)+1;isFinite(f)||(f=1,c=1);var h=u-f/2,d=h+c*f;s=[h,d]}else s=i;return $xe.calc(t,r,{vals:s,cLetter:"z"}),n}});var S4=Se((lur,ebe)=>{"use strict";ebe.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 gH=Se((uur,tbe)=>{"use strict";var _D=S4();tbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,u,l,f,c,h,d,p;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 _H=Se((fur,nbe)=>{"use strict";var xD=Zr(),IT=S4();nbe.exports=function(t,r,n){var i,a,o,s,u;for(r=r||.01,n=n||.01,o=0;o20?(o=IT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=IT.SADDLEREMAINDER[o]):delete e.crossings[a],s=IT.NEWDELTA[o],!s){xD.log("Found bad marching index:",o,t,e.level);break}u.push(ibe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),M4(u[u.length-1],u[u.length-2],n,i)&&u.pop();var p=s[0]&&(t[0]<0||t[0]>f-2)||s[1]&&(t[1]<0||t[1]>l-2),x=t[0]===c[0]&&t[1]===c[1]&&s[0]===h[0]&&s[1]===h[1];if(x||r&&p)break;o=e.crossings[a]}d===1e4&&xD.log("Infinite loop in contour?");var b=M4(u[0],u[u.length-1],n,i),y=0,E=.2*e.smoothing,k=[],A=0,L,_,C,M,v,z,T,F,q,U,H;for(d=1;d=A;d--)if(L=k[d],L=A&&L+k[_]F&&q--,e.edgepaths[q]=H.concat(u,U));break}W||(e.edgepaths[F]=u.concat(U))}for(F=0;F20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:IT.BOTTOMSTART.indexOf(e)!==-1?i=1:IT.LEFTSTART.indexOf(e)!==-1?n=1:IT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function ibe(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 u=(e.level-a)/(e.z[i][n+1]-a),l=(u!==1?(1-u)*o.c2l(e.x[n]):0)+(u!==0?u*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(l),!0),s.c2p(e.y[i],!0),n+u,i]}else{var f=(e.level-a)/(e.z[i+1][n]-a),c=(f!==1?(1-f)*s.c2l(e.y[i]):0)+(f!==0?f*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(c),!0),n,i+f]}}});var lbe=Se((cur,sbe)=>{"use strict";var xH=vD(),Ixt=_u();sbe.exports={"[]":abe("[]"),"][":abe("]["),">":bH(">"),"<":bH("<"),"=":bH("=")};function obe(e,t){var r=Array.isArray(t),n;function i(a){return Ixt(a)?+a:null}return xH.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):xH.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:xH.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function abe(e){return function(t){t=obe(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 bH(e){return function(t){return t=obe(e,t),{start:t,end:1/0,size:1/0}}}});var wH=Se((hur,fbe)=>{"use strict";var ube=Zr(),Dxt=lbe(),Rxt=A4();fbe.exports=function(t,r,n){for(var i=t.type==="constraint"?Dxt[t._operation](t.value):t,a=i.size,o=[],s=Rxt(i),u=n.trace._carpetTrace,l=u?{xaxis:u.aaxis,yaxis:u.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},f=i.start;f1e3){ube.warn("Too many contours, clipping at 1000",t);break}return o}});var TH=Se((dur,hbe)=>{"use strict";var DT=Zr();hbe.exports=function(e,t){var r,n,i,a=function(u){return u.reverse()},o=function(u){return u};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&DT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";dbe.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,u=r.y.length,l=-1/0,f=1/0;for(i=0;i":c>l&&(r.prefixBoundary=!0);break;case"<":(cl||r.starts.length&&d===f)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),hl&&(r.prefixBoundary=!0);break}break}}});var bD=Se(Gp=>{"use strict";var k4=Nl(),Bd=Zr(),Bg=yu(),Fxt=fc(),ybe=Bf(),pbe=hu(),vbe=gm(),qxt=oD(),mbe=gH(),gbe=_H(),Bxt=wH(),Oxt=TH(),_be=AH(),E4=S4(),Im=E4.LABELOPTIMIZER;Gp.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Bd.makeTraceGroups(i,n,"contour").each(function(s){var u=k4.select(this),l=s[0],f=l.trace,c=l.x,h=l.y,d=f.contours,p=Bxt(d,r,l),x=Bd.ensureSingle(u,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),qxt(t,r,b,x),mbe(p),gbe(p);var y=a.c2p(c[0],!0),E=a.c2p(c[c.length-1],!0),k=o.c2p(h[0],!0),A=o.c2p(h[h.length-1],!0),L=[[y,A],[E,A],[E,k],[y,k]],_=p;d.type==="constraint"&&(_=Oxt(p,d._operation)),Nxt(u,L,d),Uxt(u,_,L,d),Vxt(u,p,t,l,d),Gxt(u,r,t,l,L)})};function Nxt(e,t,r){var n=Bd.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 Uxt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&_be(t,n);var o=Bd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(u){var l=(u.prefixBoundary?a:"")+xbe(u,r);l?k4.select(this).attr("d",l).style("stroke","none"):k4.select(this).remove()})}function xbe(e,t){var r="",n=0,i=e.edgepaths.map(function(y,E){return E}),a=!0,o,s,u,l,f,c;function h(y){return Math.abs(y[1]-t[0][1])<.01}function d(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function x(y){return Math.abs(y[0]-t[2][0])<.01}for(;i.length;){for(c=Bg.smoothopen(e.edgepaths[n],e.smoothing),r+=a?c:c.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],l=-1,u=0;u<4;u++){if(!o){Bd.log("Missing end?",n,e);break}for(h(o)&&!x(o)?s=t[1]:p(o)?s=t[0]:d(o)?s=t[3]:x(o)&&(s=t[2]),f=0;f=0&&(s=b,l=f):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,l=f):Bd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,l>=0)break;r+="L"+s}if(l===e.edgepaths.length){Bd.log("unclosed perimeter path");break}n=l,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;nIm.MAXCOST*2)break;h&&(s/=2),o=l-s/2,u=o+s*1.5}if(c<=Im.MAXCOST)return f};function Hxt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,u=e.theta,l=Math.cos(u)*i,f=Math.sin(u)*i,c=(o>n.center?n.right-o:o-n.left)/(l+Math.abs(Math.sin(u)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(f)+Math.cos(u)*a);if(c<1||h<1)return 1/0;var d=Im.EDGECOST*(1/(c-1)+1/(h-1));d+=Im.ANGLECOST*u*u;for(var p=o-l,x=s-f,b=o+l,y=s+f,E=0;E{"use strict";var jxt=Nl(),SH=fc(),Zxt=A4();bbe.exports=function(t){var r=t.contours,n=r.start,i=Zxt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,u=SH.extractOpts(t);isFinite(a)||(a=1,o=1);var l=u.reversescale?SH.flipScale(u.colorscale):u.colorscale,f=l.length,c=new Array(f),h=new Array(f),d,p,x=u.min,b=u.max;if(r.coloring==="heatmap"){for(p=0;p=b)&&(n<=x&&(n=x),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),p=0;px&&(c.unshift(x),h.unshift(h[0])),c[c.length-1]{"use strict";var wD=Nl(),wbe=yu(),Xxt=sD(),Yxt=MH();Tbe.exports=function(t){var r=wD.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=wD.select(this),a=n[0].trace,o=a.contours,s=a.line,u=o.size||1,l=o.start,f=o.type==="constraint",c=!f&&o.coloring==="lines",h=!f&&o.coloring==="fill",d=c||h?Yxt(a):null;i.selectAll("g.contourlevel").each(function(b){wD.select(this).selectAll("path").call(wbe.lineGroupStyle,s.width,c?d(b.level):s.color,s.dash)});var p=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){wbe.font(wD.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(c?d(b.level):s.color)})}),f)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var x;i.selectAll("g.contourfill path").style("fill",function(b){return x===void 0&&(x=b.level),d(b.level+.5*u)}),x===void 0&&(x=l),i.selectAll("g.contourbg path").style("fill",d(x-.5*u))}}),Xxt(t)}});var AD=Se((gur,Sbe)=>{"use strict";var Abe=fc(),Kxt=MH(),Jxt=A4();function $xt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=Kxt(t,{isColorbar:!0});if(o==="heatmap"){var u=Abe.extractOpts(t);r._fillgradient=u.reversescale?Abe.flipScale(u.colorscale):u.colorscale,r._zrange=[u.min,u.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:Jxt(n),size:a}}Sbe.exports={min:"zmin",max:"zmax",calc:$xt}});var EH=Se((_ur,Mbe)=>{"use strict";var SD=Pl(),Qxt=uD();Mbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=Qxt(t,r,n,i,a);return o&&o.forEach(function(s){var u=s.trace;u.contours.type==="constraint"&&(u.fillcolor&&SD.opacity(u.fillcolor)?s.color=SD.addOpacity(u.fillcolor,1):u.contours.showlines&&SD.opacity(u.line.color)&&(s.color=SD.addOpacity(u.line.color,1)))}),o}});var kbe=Se((xur,Ebe)=>{"use strict";Ebe.exports={attributes:hH(),supplyDefaults:Xxe(),crossTraceDefaults:hD(),calc:mH(),plot:bD().plot,layerName:"contourlayer",style:TD(),colorbar:AD(),hoverPoints:EH(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Th(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Lbe=Se((bur,Cbe)=>{"use strict";Cbe.exports=kbe()});var kH=Se((wur,Fbe)=>{"use strict";var zbe=_u(),ebt=dH(),Dbe=Pl(),Pbe=Dbe.addOpacity,tbt=Dbe.opacity,Rbe=vD(),Ibe=Zr().isArrayOrTypedArray,rbt=Rbe.CONSTRAINT_REDUCTION,ibt=Rbe.COMPARISON_OPS2;Fbe.exports=function(t,r,n,i,a,o){var s=r.contours,u,l,f,c=n("contours.operation");if(s._operation=rbt[c],nbt(n,s),c==="="?u=s.showlines=!0:(u=n("contours.showlines"),f=n("fillcolor",Pbe((t.line||{}).color||a,.5))),u){var h=f&&tbt(f)?Pbe(r.fillcolor,1):a;l=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),ebt(n,i,l,o)};function nbt(e,t){var r;ibt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Ibe(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])]:zbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),zbe(t.value)||(Ibe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Obe=Se((Tur,Bbe)=>{"use strict";var CH=Zr(),abt=ZI(),obt=zy(),sbt=kH(),lbt=mD(),ubt=gD(),fbt=g4(),qbe=T4();Bbe.exports=function(t,r,n,i){function a(l,f){return CH.coerce(t,r,qbe,l,f)}function o(l){return CH.coerce2(t,r,qbe,l)}var s=abt(t,r,a,i);if(!s){r.visible=!1;return}obt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate");var u=a("contours.type")==="constraint";a("connectgaps",CH.isArray1D(r.z)),u?sbt(t,r,a,i,n):(lbt(t,r,a,o),ubt(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&fbt(a,i),a("zorder")}});var Ube=Se((Aur,Nbe)=>{"use strict";Nbe.exports={attributes:T4(),supplyDefaults:Obe(),calc:mH(),plot:bD().plot,style:TD(),colorbar:AD(),hoverPoints:EH(),moduleType:"trace",name:"contour",basePlotModule:Th(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Hbe=Se((Sur,Vbe)=>{"use strict";Vbe.exports=Ube()});var LH=Se((Mur,Wbe)=>{"use strict";var cbt=Du().hovertemplateAttrs,hbt=Du().texttemplateAttrs,dbt=Ey(),a0=Zc(),pbt=zf(),Gbe=Xf(),vbt=Id().dash,M_=vu().extendFlat,W0=a0.marker,C4=a0.line,ybt=W0.line;Wbe.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:hbt({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:M_({},a0.hovertext,{}),line:{color:C4.color,width:C4.width,dash:vbt,backoff:C4.backoff,shape:M_({},C4.shape,{values:["linear","spline"]}),smoothing:C4.smoothing,editType:"calc"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:dbt(),marker:M_({symbol:W0.symbol,opacity:W0.opacity,angle:W0.angle,angleref:W0.angleref,standoff:W0.standoff,maxdisplayed:W0.maxdisplayed,size:W0.size,sizeref:W0.sizeref,sizemin:W0.sizemin,sizemode:W0.sizemode,line:M_({width:ybt.width,editType:"calc"},Gbe("marker.line")),gradient:W0.gradient,editType:"calc"},Gbe("marker")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},pbt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a0.hoveron,hovertemplate:cbt()}});var Ybe=Se((Eur,Xbe)=>{"use strict";var jbe=Zr(),mbt=Sm(),RT=ec(),gbt=$v(),_bt=I0(),Zbe=J3(),xbt=D0(),bbt=Py(),wbt=LH();Xbe.exports=function(t,r,n,i){function a(h,d){return jbe.coerce(t,r,wbt,h,d)}var o=a("a"),s=a("b"),u=a("c"),l;if(o?(l=o.length,s?(l=Math.min(l,s.length),u&&(l=Math.min(l,u.length))):u?l=Math.min(l,u.length):l=0):s&&u&&(l=Math.min(s.length,u.length)),!l){r.visible=!1;return}r._length=l,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&a("hovertemplate");var f=l{"use strict";var zH=hu();Kbe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zH.tickText(a.aaxis,t.a,!0).text,i.bLabel=zH.tickText(a.baxis,t.b,!0).text,i.cLabel=zH.tickText(a.caxis,t.c,!0).text,i}});var t2e=Se((Cur,e2e)=>{"use strict";var PH=_u(),Tbt=R0(),Abt=km(),Sbt=F0(),Mbt=q0().calcMarkerSize,$be=["a","b","c"],Qbe={a:["b","c"],b:["a","c"],c:["a","b"]};e2e.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,u,l,f,c,h,d;for(u=0;u<$be.length;u++)if(f=$be[u],!o[f]){for(h=o[Qbe[f][0]],d=o[Qbe[f][1]],c=new Array(h.length),l=0;l{"use strict";var Ebt=iT();r2e.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},u=r.layers.frontplot.select("g.scatterlayer"),l=0;l{"use strict";var kbt=sT();n2e.exports=function(t,r,n,i){var a=kbt(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,u=t.xa._length,l=u*s/2,f=u-l;return o.x0=Math.max(Math.min(o.x0,f),l),o.x1=Math.max(Math.min(o.x1,f),l),a}var c=o.cd[o.index],h=o.trace,d=o.subplot;o.a=c.a,o.b=c.b,o.c=c.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[h.subplot]={_subplot:d};var x=h._module.formatLabels(c,h,p);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var b=c.hi||h.hoverinfo,y=[];function E(A,L){y.push(A._hovertitle+": "+L)}if(!h.hovertemplate){var k=b.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&E(d.aaxis,o.aLabel),k.indexOf("b")!==-1&&E(d.baxis,o.bLabel),k.indexOf("c")!==-1&&E(d.caxis,o.cLabel)}return o.extraText=y.join("
"),o.hovertemplate=h.hovertemplate,a}});var s2e=Se((Pur,o2e)=>{"use strict";o2e.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 g2e=Se((Iur,m2e)=>{"use strict";var d2e=Nl(),Cbt=cd(),IH=Ul(),Og=Zr(),Dm=Og.strTranslate,MD=Og._,qT=Pl(),ED=yu(),L4=gm(),DH=vu().extendFlat,Lbt=Sc(),E_=hu(),l2e=gp(),u2e=jc(),p2e=Sy(),f2e=p2e.freeMode,zbt=p2e.rectMode,RH=Mb(),Pbt=nh().prepSelect,Ibt=nh().selectOnClick,Dbt=nh().clearOutline,Rbt=nh().clearSelectionsCache,v2e=dd();function y2e(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=y2e;var Rm=y2e.prototype;Rm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Rm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aFT*l?(y=l,b=y*FT):(b=u,y=b/FT),E=o*b/u,k=s*y/l,p=t.l+t.w*i-b/2,x=t.t+t.h*(1-a)-y/2,r.x0=p,r.y0=x,r.w=b,r.h=y,r.sum=f,r.xaxis={type:"linear",range:[c+2*d-f,f-c-2*h],domain:[i-E/2,i+E/2],_id:"x"},L4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(U){return U.a>=r.aaxis.range[0]&&U.a<=r.aaxis.range[1]&&U.b>=r.baxis.range[1]&&U.b<=r.baxis.range[0]&&U.c>=r.caxis.range[1]&&U.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[c,f-h-d],domain:[a-k/2,a+k/2],_id:"y"},L4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var A=r.yaxis.domain[0],L=r.aaxis=DH({},e.aaxis,{range:[c,f-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+k*FT],anchor:"free",position:0,_id:"y",_length:b});L4(L,r.graphDiv._fullLayout),L.setScale();var _=r.baxis=DH({},e.baxis,{range:[f-c-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});L4(_,r.graphDiv._fullLayout),_.setScale();var C=r.caxis=DH({},e.caxis,{range:[f-c-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+k*FT],anchor:"free",position:0,_id:"y",_length:b});L4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+p+","+(x+y)+"h"+b+"l-"+b/2+",-"+y+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var v="M0,"+y+"h"+b+"l-"+b/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",v);var z=Dm(p,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",z),r.clipDefRelative.select("path").attr("transform",null);var T=Dm(p-_._offset,x+y);r.layers.baxis.attr("transform",T),r.layers.bgrid.attr("transform",T);var F=Dm(p+b/2,x)+"rotate(30)"+Dm(0,-L._offset);r.layers.aaxis.attr("transform",F),r.layers.agrid.attr("transform",F);var q=Dm(p+b/2,x)+"rotate(-30)"+Dm(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(x+y)+"l"+b/2+",-"+y:"M0,0").call(qT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",_.showline?"M"+p+","+(x+y)+"h"+b:"M0,0").call(qT.stroke,_.linecolor||"#000").style("stroke-width",(_.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(p+b/2)+","+x+"l"+b/2+","+y:"M0,0").call(qT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),ED.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Rm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(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 u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),l=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=RH.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:MD(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-u,"text-anchor":"middle"}}),i["b-title"]=RH.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:MD(r,"Click to enter Component B title"),attributes:{x:t.x0-l,y:t.y0+t.h+o.title.font.size*.83+l,"text-anchor":"middle"}}),i["c-title"]=RH.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:MD(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+l,y:t.y0+t.h+s.title.font.size*.83+l,"text-anchor":"middle"}})}};Rm.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,u=i+"tickLayout",l=Fbt(e);t[u]!==l&&(o.selectAll("."+a+"tick").remove(),t[u]=l),e.setScale();var f=E_.calcTicks(e),c=E_.clipEnds(e,f),h=E_.makeTransTickFn(e),d=E_.getTickSigns(e)[2],p=Og.deg2rad(s),x=d*(e.linewidth||1)/2,b=d*e.ticklen,y=t.w,E=t.h,k=i==="b"?"M0,"+x+"l"+Math.sin(p)*b+","+Math.cos(p)*b:"M"+x+",0l"+Math.cos(p)*b+","+-Math.sin(p)*b,A={a:"M0,0l"+E+",-"+y/2,b:"M0,0l-"+y/2+",-"+E,c:"M0,0l-"+E+","+y/2}[i];E_.drawTicks(r,e,{vals:e.ticks==="inside"?c:f,layer:o,path:k,transFn:h,crisp:!1}),E_.drawGrid(r,e,{vals:c,layer:t.layers[i+"grid"],path:A,transFn:h,crisp:!1}),E_.drawLabels(r,e,{vals:f,layer:o,transFn:h,labelFns:E_.makeLabelFns(e,0,s)})};function Fbt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var _d=v2e.MINZOOM/2+.87,qbt="m-0.87,.5h"+_d+"v3h-"+(_d+5.2)+"l"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l2.6,1.5l-"+_d/2+","+_d*.87+"Z",Bbt="m0.87,.5h-"+_d+"v3h"+(_d+5.2)+"l-"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l-2.6,1.5l"+_d/2+","+_d*.87+"Z",Obt="m0,1l"+_d/2+","+_d*.87+"l2.6,-1.5l-"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l-"+(_d/2+2.6)+","+(_d*.87+4.5)+"l2.6,1.5l"+_d/2+",-"+_d*.87+"Z",Nbt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",c2e=!0;Rm.clearOutline=function(){Rbt(this.dragOptions),Dbt(this.dragOptions.gd)};Rm.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,F,q){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var U=e.dragOptions.dragmode=r._fullLayout.dragmode;f2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U==="zoom"?(e.dragOptions.moveFn=_,e.dragOptions.clickFn=y,e.dragOptions.doneFn=C,E(T,F,q)):U==="pan"?(e.dragOptions.moveFn=v,e.dragOptions.clickFn=y,e.dragOptions.doneFn=z,M(),e.clearOutline(r)):(zbt(U)||f2e(U))&&Pbt(T,F,q,e.dragOptions,U)}};var o,s,u,l,f,c,h,d,p,x;function b(T){var F={};return F[e.id+".aaxis.min"]=T.a,F[e.id+".baxis.min"]=T.b,F[e.id+".caxis.min"]=T.c,F}function y(T,F){var q=r._fullLayout.clickmode;h2e(r),T===2&&(r.emit("plotly_doubleclick",null),IH.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&T===1&&Ibt(F,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&u2e.click(r,F,e.id)}function E(T,F,q){var U=t.getBoundingClientRect();o=F-U.left,s=q-U.top,r._fullLayout._calcInverseTransform(r);var H=r._fullLayout._invTransform,j=Og.apply3DTransform(H)(o,s);o=j[0],s=j[1],u={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=u,l=e.aaxis.range[1]-u.a,c=Cbt(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=n.append("path").attr("class","zoombox").attr("transform",Dm(e.x0,e.y0)).style({fill:c>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),x=n.append("path").attr("class","zoombox-corners").attr("transform",Dm(e.x0,e.y0)).style({fill:qT.background,stroke:qT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(T,F){return 1-F/e.h}function A(T,F){return 1-(T+(e.h-F)/Math.sqrt(3))/e.w}function L(T,F){return(T-(e.h-F)/Math.sqrt(3))/e.w}function _(T,F){var q=o+T*i,U=s+F*a,H=Math.max(0,Math.min(1,k(o,s),k(q,U))),j=Math.max(0,Math.min(1,A(o,s),A(q,U))),G=Math.max(0,Math.min(1,L(o,s),L(q,U))),O=(H/2+G)*e.w,W=(1-H/2-j)*e.w,re=(O+W)/2,ne=W-O,be=(1-H)*e.h,ze=be-ne/FT;ne.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(f))}function C(){h2e(r),f!==u&&(IH.call("_guiRelayout",r,b(f)),c2e&&r.data&&r._context.showTips&&(Og.notifier(MD(r,"Double-click to zoom back out"),"long"),c2e=!1))}function M(){u={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=u}function v(T,F){var q=T/e.xaxis._m,U=F/e.yaxis._m;f={a:u.a-U,b:u.b+(q+U)/2,c:u.c-(q-U)/2};var H=[f.a,f.b,f.c].sort(Og.sorterAsc),j={a:H.indexOf(f.a),b:H.indexOf(f.b),c:H.indexOf(f.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),f={a:H[j.a],b:H[j.b],c:H[j.c]},F=(u.a-f.a)*e.yaxis._m,T=(u.c-f.c-u.b+f.b)*e.xaxis._m);var G=Dm(e.x0+T,e.y0+F);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var O=Dm(-T,-F);e.clipDefRelative.select("path").attr("transform",O),e.aaxis.range=[f.a,e.sum-f.b-f.c],e.baxis.range=[e.sum-f.a-f.c,f.b],e.caxis.range=[e.sum-f.a-f.b,f.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(ED.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(f))}function z(){IH.call("_guiRelayout",r,b(f))}t.onmousemove=function(T){u2e.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||l2e.unhover(r,T)},l2e.init(this.dragOptions)};function h2e(e){d2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var BH=Se((Dur,_2e)=>{"use strict";var Ubt=Ih(),Vbt=Ec().attributes,Uf=Rd(),Hbt=_c().overrideAll,FH=vu().extendFlat,qH={title:{text:Uf.title.text,font:Uf.title.font},color:Uf.color,tickmode:Uf.minor.tickmode,nticks:FH({},Uf.nticks,{dflt:6,min:1}),tick0:Uf.tick0,dtick:Uf.dtick,tickvals:Uf.tickvals,ticktext:Uf.ticktext,ticks:Uf.ticks,ticklen:Uf.ticklen,tickwidth:Uf.tickwidth,tickcolor:Uf.tickcolor,ticklabelstep:Uf.ticklabelstep,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,showexponent:Uf.showexponent,exponentformat:Uf.exponentformat,minexponent:Uf.minexponent,separatethousands:Uf.separatethousands,tickfont:Uf.tickfont,tickangle:Uf.tickangle,tickformat:Uf.tickformat,tickformatstops:Uf.tickformatstops,hoverformat:Uf.hoverformat,showline:FH({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:FH({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash,layer:Uf.layer,min:{valType:"number",dflt:0,min:0}},kD=_2e.exports=Hbt({domain:Vbt({name:"ternary"}),bgcolor:{valType:"color",dflt:Ubt.background},sum:{valType:"number",dflt:1,min:0},aaxis:qH,baxis:qH,caxis:qH},"plot","from-root");kD.uirevision={valType:"any",editType:"none"};kD.aaxis.uirevision=kD.baxis.uirevision=kD.caxis.uirevision={valType:"any",editType:"none"}});var k_=Se((Rur,x2e)=>{"use strict";var Gbt=Zr(),Wbt=_f(),jbt=Ec().defaults;x2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,u=i.partition||"x",l=r._subplots[a],f=l.length,c=f&&l[0].replace(/\d+$/,""),h,d;function p(E,k){return Gbt.coerce(h,d,o,E,k)}for(var x=0;x{"use strict";var Zbt=Pl(),Xbt=_f(),CD=Zr(),Ybt=k_(),Kbt=e_(),Jbt=t_(),$bt=T3(),Qbt=xb(),e2t=Y5(),w2e=BH(),b2e=["aaxis","baxis","caxis"];T2e.exports=function(t,r,n){Ybt(t,r,n,{type:"ternary",attributes:w2e,handleDefaults:t2t,font:r.font,paper_bgcolor:r.paper_bgcolor})};function t2t(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=Zbt.combine(i,n.paper_bgcolor);for(var o,s,u,l=0;l=a&&(f.min=0,c.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function r2t(e,t,r,n){var i=w2e[t._name];function a(d,p){return CD.coerce(e,t,i,d,p)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,u=t._name,l=u.charAt(0).toUpperCase(),f="Component "+l,c=a("title.text",f);t._hovertitle=c===f?c:l,CD.coerceFont(a,"title.font",r.font,{overrideDflt:{size:CD.bigFont(r.font.size),color:s}}),a("min"),Qbt(e,t,a,"linear"),Jbt(e,t,a,"linear"),Kbt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),$bt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(CD.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),e2t(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var S2e=Se(j0=>{"use strict";var i2t=g2e(),n2t=Dd().getSubplotCalcData,a2t=Zr().counterRegex,BT="ternary";j0.name=BT;var o2t=j0.attr="subplot";j0.idRoot=BT;j0.idRegex=j0.attrRegex=a2t(BT);var s2t=j0.attributes={};s2t[o2t]={valType:"subplotid",dflt:"ternary",editType:"calc"};j0.layoutAttributes=BH();j0.supplyLayoutDefaults=A2e();j0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[BT],a=0;a{"use strict";M2e.exports={attributes:LH(),supplyDefaults:Ybe(),colorbar:ep(),formatLabels:Jbe(),calc:t2e(),plot:i2e(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:a2e(),selectPoints:lT(),eventData:s2e(),moduleType:"trace",name:"scatterternary",basePlotModule:S2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var C2e=Se((Our,k2e)=>{"use strict";k2e.exports=E2e()});var OH=Se((Nur,z2e)=>{"use strict";var nd=p4(),OT=vu().extendFlat,L2e=Gc().axisHoverFormat;z2e.exports={y:nd.y,x:nd.x,x0:nd.x0,y0:nd.y0,xhoverformat:L2e("x"),yhoverformat:L2e("y"),name:OT({},nd.name,{}),orientation:OT({},nd.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:nd.fillcolor,points:OT({},nd.boxpoints,{}),jitter:OT({},nd.jitter,{}),pointpos:OT({},nd.pointpos,{}),width:OT({},nd.width,{}),marker:nd.marker,text:nd.text,hovertext:nd.hovertext,hovertemplate:nd.hovertemplate,quartilemethod:nd.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:nd.offsetgroup,alignmentgroup:nd.alignmentgroup,selected:nd.selected,unselected:nd.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:nd.zorder}});var VH=Se((Uur,P2e)=>{"use strict";var NH=v4(),UH=Zr().extendFlat;P2e.exports={violinmode:UH({},NH.boxmode,{}),violingap:UH({},NH.boxgap,{}),violingroupgap:UH({},NH.boxgroupgap,{})}});var q2e=Se((Vur,F2e)=>{"use strict";var I2e=Zr(),l2t=Pl(),D2e=m4(),R2e=OH();F2e.exports=function(t,r,n,i){function a(L,_){return I2e.coerce(t,r,R2e,L,_)}function o(L,_){return I2e.coerce2(t,r,R2e,L,_)}if(D2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var u=a("span"),l;Array.isArray(u)&&(l="manual"),a("spanmode",l);var f=a("line.color",(t.marker||{}).color||n),c=a("line.width"),h=a("fillcolor",l2t.addOpacity(r.line.color,.5));D2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",h),x=o("box.line.color",f),b=o("box.line.width",c),y=a("box.visible",!!(d||p||x||b));y||(r.box={visible:!1});var E=o("meanline.color",f),k=o("meanline.width",c),A=a("meanline.visible",!!(E||k));A||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var O2e=Se((Hur,B2e)=>{"use strict";var u2t=Zr(),f2t=VH(),c2t=UI();B2e.exports=function(t,r,n){function i(a,o){return u2t.coerce(t,r,f2t,a,o)}c2t._supply(t,r,n,i,"violin")}});var LD=Se(o2=>{"use strict";var h2t=Zr(),d2t={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};o2.makeKDE=function(e,t,r){var n=r.length,i=d2t.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var u=0,l=0;l{"use strict";var HH=Zr(),GH=hu(),p2t=FV(),N2e=LD(),v2t=ju().BADNUM;U2e.exports=function(t,r){var n=p2t(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=GH.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,u=0,l=0,f=0;f{"use strict";var _2t=HI().setPositionOffset,H2e=["v","h"];G2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var WH=Nl(),jH=Zr(),x2t=yu(),ZH=GI(),b2t=bU(),w2t=LD();j2e.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,u=r.yaxis;function l(f,c){var h=b2t(f,{xaxis:s,yaxis:u,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return x2t.smoothopen(h[0],1)}jH.makeTraceGroups(i,n,"trace violins").each(function(f){var c=WH.select(this),h=f[0],d=h.t,p=h.trace;if(p.visible!==!0||d.empty){c.remove();return}var x=d.bPos,b=d.bdPos,y=r[d.valLetter+"axis"],E=r[d.posLetter+"axis"],k=p.side==="both",A=k||p.side==="positive",L=k||p.side==="negative",_=c.selectAll("path.violin").data(jH.identity);_.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(U){var H=WH.select(this),j=U.density,G=j.length,O=E.c2l(U.pos+x,!0),W=E.l2p(O),re;if(p.width)re=d.maxKDE/b;else{var ne=o._violinScaleGroupStats[p.scalegroup];re=p.scalemode==="count"?ne.maxKDE/b*(ne.maxCount/U.pts.length):ne.maxKDE/b}var be,ze,Ce,he,te,ke,Ee;if(A){for(ke=new Array(G),he=0;he{"use strict";var X2e=Nl(),NT=Pl(),T2t=ov().stylePoints;Y2e.exports=function(t){var r=X2e.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=X2e.select(this),o=i.box||{},s=o.line||{},u=i.meanline||{},l=u.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(NT.stroke,i.line.color).call(NT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(NT.stroke,s.color).call(NT.fill,o.fillcolor);var f={"stroke-width":l+"px","stroke-dasharray":2*l+"px,"+l+"px"};a.selectAll("path.mean").style(f).call(NT.stroke,u.color),a.selectAll("path.meanline").style(f).call(NT.stroke,u.color),T2t(a,i,t)})}});var ewe=Se((Yur,Q2e)=>{"use strict";var A2t=Pl(),XH=Zr(),S2t=hu(),J2e=UV(),$2e=LD();Q2e.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,u=s[0].trace,l=u.hoveron,f=l.indexOf("violins")!==-1,c=l.indexOf("kde")!==-1,h=[],d,p;if(f||c){var x=J2e.hoverOnBoxes(t,r,n,i);if(c&&x.length>0){var b=t.xa,y=t.ya,E,k,A,L,_;u.orientation==="h"?(_=r,E="y",A=y,k="x",L=b):(_=n,E="x",A=b,k="y",L=y);var C=s[t.index];if(_>=C.span[0]&&_<=C.span[1]){var M=XH.extendFlat({},t),v=L.c2p(_,!0),z=$2e.getKdeValue(C,u,_),T=$2e.getPositionOnKdePath(C,u,v),F=A._offset,q=A._length;M[E+"0"]=T[0],M[E+"1"]=T[1],M[k+"0"]=M[k+"1"]=v,M[k+"Label"]=k+": "+S2t.hoverLabelText(L,_,u[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+z.toFixed(3);for(var U=0,H=0;H{"use strict";twe.exports={attributes:OH(),layoutAttributes:VH(),supplyDefaults:q2e(),crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:O2e(),calc:V2e(),crossTraceCalc:W2e(),plot:Z2e(),style:K2e(),styleOnSelect:ov().styleOnSelect,hoverPoints:ewe(),selectPoints:VV(),moduleType:"trace",name:"violin",basePlotModule:Th(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var nwe=Se((Jur,iwe)=>{"use strict";iwe.exports=rwe()});var owe=Se(($ur,awe)=>{"use strict";awe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var KH=Se((Qur,uwe)=>{"use strict";var Dc=Lm(),YH=Zc().line,M2t=zf(),swe=Gc().axisHoverFormat,E2t=Du().hovertemplateAttrs,k2t=Du().texttemplateAttrs,lwe=owe(),Ng=vu().extendFlat,C2t=Pl();uwe.exports={x:Dc.x,x0:Dc.x0,dx:Dc.dx,y:Dc.y,y0:Dc.y0,dy:Dc.dy,xperiod:Dc.xperiod,yperiod:Dc.yperiod,xperiod0:Dc.xperiod0,yperiod0:Dc.yperiod0,xperiodalignment:Dc.xperiodalignment,yperiodalignment:Dc.yperiodalignment,xhoverformat:swe("x"),yhoverformat:swe("y"),hovertext:Dc.hovertext,hovertemplate:E2t({},{keys:lwe.eventDataKeys}),hoverinfo:Ng({},M2t.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:k2t({editType:"plot"},{keys:lwe.eventDataKeys.concat(["label","value"])}),text:Dc.text,textposition:Dc.textposition,insidetextanchor:Ng({},Dc.insidetextanchor,{dflt:"middle"}),textangle:Ng({},Dc.textangle,{dflt:0}),textfont:Dc.textfont,insidetextfont:Dc.insidetextfont,outsidetextfont:Dc.outsidetextfont,constraintext:Dc.constraintext,cliponaxis:Dc.cliponaxis,orientation:Ng({},Dc.orientation,{}),offset:Ng({},Dc.offset,{arrayOk:!1}),width:Ng({},Dc.width,{arrayOk:!1}),marker:L2t(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ng({},YH.color,{dflt:C2t.defaultLine}),width:Ng({},YH.width,{dflt:0,editType:"plot"}),dash:YH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Dc.offsetgroup,alignmentgroup:Dc.alignmentgroup,zorder:Dc.zorder};function L2t(){var e=Ng({},Dc.marker);return delete e.pattern,delete e.cornerradius,e}});var JH=Se((efr,fwe)=>{"use strict";fwe.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 QH=Se((tfr,hwe)=>{"use strict";var zD=Zr(),z2t=Hb(),P2t=r0().handleText,I2t=K3(),D2t=zy(),cwe=KH(),$H=Pl();function R2t(e,t,r,n){function i(c,h){return zD.coerce(e,t,cwe,c,h)}var a=I2t(e,t,n,i);if(!a){t.visible=!1;return}D2t(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");var s=i("textposition");P2t(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",zD.isArrayOrTypedArray(o)?"text+value":"value");var u=i("marker.color",r);i("marker.line.color",$H.defaultLine),i("marker.line.width");var l=i("connector.visible");if(l){i("connector.fillcolor",F2t(u));var f=i("connector.line.width");f&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function F2t(e){var t=zD.isArrayOrTypedArray(e)?"#000":e;return $H.addOpacity(t,.5*$H.opacity(t))}function q2t(e,t){var r,n;function i(o){return zD.coerce(n._input,n,cwe,o)}for(var a=0;a{"use strict";var B2t=Zr(),O2t=JH();dwe.exports=function(e,t,r){var n=!1;function i(s,u){return B2t.coerce(e,t,O2t,s,u)}for(var a=0;a{"use strict";var UT=Zr();vwe.exports=function(t,r){for(var n=0;n{"use strict";var mwe=hu(),gwe=Iy(),N2t=ywe(),U2t=F0(),z4=ju().BADNUM;_we.exports=function(t,r){var n=mwe.getFromId(t,r.xaxis||"x"),i=mwe.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f,c,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),u=gwe(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),u=gwe(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;var d=Math.min(o.length,a.length),p=new Array(d);for(r._base=[],c=0;c{"use strict";var bwe=Gb().setGroupPositions;wwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,u=[],l=[],f=[],c,h;for(h=0;h{"use strict";var PD=Nl(),L_=Zr(),Awe=yu(),C_=ju().BADNUM,V2t=i2(),H2t=bp().clearMinTextSize;Mwe.exports=function(t,r,n,i){var a=t._fullLayout;H2t("funnel",a),G2t(t,r,n,i),W2t(t,r,n,i),V2t.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function G2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=PD.select(this),u=o[0].trace,l=L_.ensureSingle(s,"g","regions");if(!u.connector||!u.connector.visible){l.remove();return}var f=u.orientation==="h",c=l.selectAll("g.region").data(L_.identity);c.enter().append("g").classed("region",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var x=Swe(d,i,a,f),b=x[0],y=x[1],E="";b[0]!==C_&&y[0]!==C_&&b[1]!==C_&&y[1]!==C_&&b[2]!==C_&&y[2]!==C_&&b[3]!==C_&&y[3]!==C_&&(f?E+="M"+b[0]+","+y[1]+"L"+b[2]+","+y[2]+"H"+b[3]+"L"+b[1]+","+y[1]+"Z":E+="M"+b[1]+","+y[1]+"L"+b[2]+","+y[3]+"V"+y[2]+"L"+b[1]+","+y[0]+"Z"),E===""&&(E="M0,0Z"),L_.ensureSingle(PD.select(this),"path").attr("d",E).call(Awe.setClipUrl,t.layerClipId,e)}})})}function W2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=PD.select(this),u=o[0].trace,l=L_.ensureSingle(s,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){l.remove();return}var f=u.orientation==="h",c=l.selectAll("g.line").data(L_.identity);c.enter().append("g").classed("line",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var x=Swe(d,i,a,f),b=x[0],y=x[1],E="";b[3]!==void 0&&y[3]!==void 0&&(f?(E+="M"+b[0]+","+y[1]+"L"+b[2]+","+y[2],E+="M"+b[1]+","+y[1]+"L"+b[3]+","+y[2]):(E+="M"+b[1]+","+y[1]+"L"+b[2]+","+y[3],E+="M"+b[1]+","+y[0]+"L"+b[2]+","+y[2])),E===""&&(E="M0,0Z"),L_.ensureSingle(PD.select(this),"path").attr("d",E).call(Awe.setClipUrl,t.layerClipId,e)}})})}function Swe(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 Lwe=Se((sfr,Cwe)=>{"use strict";var P4=Nl(),kwe=yu(),tG=Pl(),j2t=N1().DESELECTDIM,Z2t=N0(),X2t=bp().resizeText,Y2t=Z2t.styleTextPoints;function K2t(e,t,r){var n=r||P4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");X2t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=P4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var u=o.marker;P4.select(this).call(tG.fill,s.mc||u.color).call(tG.stroke,s.mlc||u.line.color).call(kwe.dashLine,u.line.dash,s.mlw||u.line.width).style("opacity",o.selectedpoints&&!s.selected?j2t:1)}}),Y2t(a,o,e),a.selectAll(".regions").each(function(){P4.select(this).selectAll("path").style("stroke-width",0).call(tG.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;kwe.lineGroupStyle(P4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}Cwe.exports={style:K2t}});var Iwe=Se((lfr,Pwe)=>{"use strict";var zwe=Pl().opacity,J2t=TT().hoverOnBars,rG=Zr().formatPercent;Pwe.exports=function(t,r,n,i,a){var o=J2t(t,r,n,i,a);if(o){var s=o.cd,u=s[0].trace,l=u.orientation==="h",f=o.index,c=s[f],h=l?"x":"y";o[h+"LabelVal"]=c.s,o.percentInitial=c.begR,o.percentInitialLabel=rG(c.begR,1),o.percentPrevious=c.difR,o.percentPreviousLabel=rG(c.difR,1),o.percentTotal=c.sumR,o.percentTotalLabel=rG(c.sumR,1);var d=c.hi||u.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var x=d==="all",b=d.split("+"),y=function(E){return x||b.indexOf(E)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=$2t(u,c),[o]}};function $2t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(zwe(n))return n;if(zwe(i)&&a)return i}});var Rwe=Se((ufr,Dwe)=>{"use strict";Dwe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var qwe=Se((ffr,Fwe)=>{"use strict";Fwe.exports={attributes:KH(),layoutAttributes:JH(),supplyDefaults:QH().supplyDefaults,crossTraceDefaults:QH().crossTraceDefaults,supplyLayoutDefaults:pwe(),calc:xwe(),crossTraceCalc:Twe(),plot:Ewe(),style:Lwe().style,hoverPoints:Iwe(),eventData:Rwe(),selectPoints:AT(),moduleType:"trace",name:"funnel",basePlotModule:Th(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Owe=Se((cfr,Bwe)=>{"use strict";Bwe.exports=qwe()});var Uwe=Se((hfr,Nwe)=>{"use strict";Nwe.exports={eventDataKeys:["initial","delta","final"]}});var aG=Se((dfr,Gwe)=>{"use strict";var wc=Lm(),iG=Zc().line,Q2t=zf(),Vwe=Gc().axisHoverFormat,ewt=Du().hovertemplateAttrs,twt=Du().texttemplateAttrs,Hwe=Uwe(),VT=vu().extendFlat,rwt=Pl();function nG(e){return{marker:{color:VT({},wc.marker.color,{arrayOk:!1,editType:"style"}),line:{color:VT({},wc.marker.line.color,{arrayOk:!1,editType:"style"}),width:VT({},wc.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Gwe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:wc.x,x0:wc.x0,dx:wc.dx,y:wc.y,y0:wc.y0,dy:wc.dy,xperiod:wc.xperiod,yperiod:wc.yperiod,xperiod0:wc.xperiod0,yperiod0:wc.yperiod0,xperiodalignment:wc.xperiodalignment,yperiodalignment:wc.yperiodalignment,xhoverformat:Vwe("x"),yhoverformat:Vwe("y"),hovertext:wc.hovertext,hovertemplate:ewt({},{keys:Hwe.eventDataKeys}),hoverinfo:VT({},Q2t.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:twt({editType:"plot"},{keys:Hwe.eventDataKeys.concat(["label"])}),text:wc.text,textposition:wc.textposition,insidetextanchor:wc.insidetextanchor,textangle:wc.textangle,textfont:wc.textfont,insidetextfont:wc.insidetextfont,outsidetextfont:wc.outsidetextfont,constraintext:wc.constraintext,cliponaxis:wc.cliponaxis,orientation:wc.orientation,offset:wc.offset,width:wc.width,increasing:nG("increasing"),decreasing:nG("decreasing"),totals:nG("intermediate sums and total"),connector:{line:{color:VT({},iG.color,{dflt:rwt.defaultLine}),width:VT({},iG.width,{editType:"plot"}),dash:iG.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:wc.offsetgroup,alignmentgroup:wc.alignmentgroup,zorder:wc.zorder}});var oG=Se((pfr,Wwe)=>{"use strict";Wwe.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 HT=Se((vfr,jwe)=>{"use strict";jwe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var lG=Se((yfr,Kwe)=>{"use strict";var Zwe=Zr(),iwt=Hb(),nwt=r0().handleText,awt=K3(),owt=zy(),Xwe=aG(),swt=Pl(),Ywe=HT(),lwt=Ywe.INCREASING.COLOR,uwt=Ywe.DECREASING.COLOR,fwt="#4499FF";function sG(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",swt.defaultLine),e(t+".marker.line.width")}function cwt(e,t,r,n){function i(l,f){return Zwe.coerce(e,t,Xwe,l,f)}var a=awt(e,t,n,i);if(!a){t.visible=!1;return}owt(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");var o=i("textposition");nwt(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),t.texttemplate||i("textinfo")),sG(i,"increasing",lwt),sG(i,"decreasing",uwt),sG(i,"totals",fwt);var s=i("connector.visible");if(s){i("connector.mode");var u=i("connector.line.width");u&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function hwt(e,t){var r,n;function i(o){return Zwe.coerce(n._input,n,Xwe,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var dwt=Zr(),pwt=oG();Jwe.exports=function(e,t,r){var n=!1;function i(s,u){return dwt.coerce(e,t,pwt,s,u)}for(var a=0;a{"use strict";var Qwe=hu(),e3e=Iy(),t3e=Zr().mergeArray,vwt=F0(),r3e=ju().BADNUM;function uG(e){return e==="a"||e==="absolute"}function fG(e){return e==="t"||e==="total"}i3e.exports=function(t,r){var n=Qwe.getFromId(t,r.xaxis||"x"),i=Qwe.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),u=e3e(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),u=e3e(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;for(var c=Math.min(o.length,a.length),h=new Array(c),d=0,p,x=!1,b=0;b{"use strict";var a3e=Gb().setGroupPositions;o3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,u=[],l=[],f=[],c,h;for(h=0;h{"use strict";var l3e=Nl(),ID=Zr(),ywt=yu(),GT=ju().BADNUM,mwt=i2(),gwt=bp().clearMinTextSize;u3e.exports=function(t,r,n,i){var a=t._fullLayout;gwt("waterfall",a),mwt.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),_wt(t,r,n,i)};function _wt(e,t,r,n){var i=t.xaxis,a=t.yaxis;ID.makeTraceGroups(n,r,"trace bars").each(function(o){var s=l3e.select(this),u=o[0].trace,l=ID.ensureSingle(s,"g","lines");if(!u.connector||!u.connector.visible){l.remove();return}var f=u.orientation==="h",c=u.connector.mode,h=l.selectAll("g.line").data(ID.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,x){if(!(x!==d-1&&!p.cNext)){var b=xwt(p,i,a,f),y=b[0],E=b[1],k="";y[0]!==GT&&E[0]!==GT&&y[1]!==GT&&E[1]!==GT&&(c==="spanning"&&!p.isSum&&x>0&&(f?k+="M"+y[0]+","+E[1]+"V"+E[0]:k+="M"+y[1]+","+E[0]+"H"+y[0]),c!=="between"&&(p.isSum||x{"use strict";var DD=Nl(),c3e=yu(),h3e=Pl(),bwt=N1().DESELECTDIM,wwt=N0(),Twt=bp().resizeText,Awt=wwt.styleTextPoints;function Swt(e,t,r){var n=r||DD.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");Twt(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=DD.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var u=o[s.dir].marker;DD.select(this).call(h3e.fill,u.color).call(h3e.stroke,u.line.color).call(c3e.dashLine,u.line.dash,u.line.width).style("opacity",o.selectedpoints&&!s.selected?bwt:1)}}),Awt(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;c3e.lineGroupStyle(DD.select(this).selectAll("path"),s.width,s.color,s.dash)})})}d3e.exports={style:Swt}});var _3e=Se((wfr,g3e)=>{"use strict";var Mwt=hu().hoverLabelText,v3e=Pl().opacity,Ewt=TT().hoverOnBars,y3e=HT(),m3e={increasing:y3e.INCREASING.SYMBOL,decreasing:y3e.DECREASING.SYMBOL};g3e.exports=function(t,r,n,i,a){var o=Ewt(t,r,n,i,a);if(!o)return;var s=o.cd,u=s[0].trace,l=u.orientation==="h",f=l?"x":"y",c=l?t.xa:t.ya;function h(_){return Mwt(c,_,u[f+"hoverformat"])}var d=o.index,p=s[d],x=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-x,o.delta=x,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=x<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var y=p.hi||u.hoverinfo,E=[];if(y&&y!=="none"&&y!=="skip"){var k=y==="all",A=y.split("+"),L=function(_){return k||A.indexOf(_)!==-1};p.isSum||(L("final")&&(l?!L("x"):!L("y"))&&E.push(o.finalLabel),L("delta")&&(x<0?E.push(o.deltaLabel+" "+m3e.decreasing):E.push(o.deltaLabel+" "+m3e.increasing)),L("initial")&&E.push("Initial: "+o.initialLabel))}return E.length&&(o.extraText=E.join("
")),o.color=kwt(u,p),[o]};function kwt(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(v3e(n))return n;if(v3e(i)&&a)return i}});var b3e=Se((Tfr,x3e)=>{"use strict";x3e.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 T3e=Se((Afr,w3e)=>{"use strict";w3e.exports={attributes:aG(),layoutAttributes:oG(),supplyDefaults:lG().supplyDefaults,crossTraceDefaults:lG().crossTraceDefaults,supplyLayoutDefaults:$we(),calc:n3e(),crossTraceCalc:s3e(),plot:f3e(),style:p3e().style,hoverPoints:_3e(),eventData:b3e(),selectPoints:AT(),moduleType:"trace",name:"waterfall",basePlotModule:Th(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var S3e=Se((Sfr,A3e)=>{"use strict";A3e.exports=T3e()});var WT=Se((Mfr,M3e)=>{"use strict";M3e.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 cG=Se((Efr,k3e)=>{"use strict";var Cwt=zf(),Lwt=Zc().zorder,zwt=Du().hovertemplateAttrs,E3e=vu().extendFlat,Pwt=WT().colormodel,D4=["rgb","rgba","rgba256","hsl","hsla"],Iwt=[],Dwt=[];for(jT=0;jT{"use strict";var Rwt=Zr(),Fwt=cG(),C3e=WT(),qwt=Lg().IMAGE_URL_PREFIX;L3e.exports=function(t,r){function n(o,s){return Rwt.coerce(t,r,Fwt,o,s)}n("source"),r.source&&!r.source.match(qwt)&&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=C3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=C3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),r._length=null,n("zorder")}});var Ug=Se((Cfr,hG)=>{typeof Object.create=="function"?hG.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hG.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 dG=Se((Lfr,P3e)=>{P3e.exports=pb().EventEmitter});var R3e=Se(RD=>{"use strict";RD.byteLength=Owt;RD.toByteArray=Uwt;RD.fromByteArray=Gwt;var Fm=[],Z0=[],Bwt=typeof Uint8Array!="undefined"?Uint8Array:Array,pG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s2=0,I3e=pG.length;s20)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 Owt(e){var t=D3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Nwt(e,t,r){return(t+r)*3/4-r}function Uwt(e){var t,r=D3e(e),n=r[0],i=r[1],a=new Bwt(Nwt(e,n,i)),o=0,s=i>0?n-4:n,u;for(u=0;u>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Z0[e.charCodeAt(u)]<<2|Z0[e.charCodeAt(u+1)]>>4,a[o++]=t&255),i===1&&(t=Z0[e.charCodeAt(u)]<<10|Z0[e.charCodeAt(u+1)]<<4|Z0[e.charCodeAt(u+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Vwt(e){return Fm[e>>18&63]+Fm[e>>12&63]+Fm[e>>6&63]+Fm[e&63]}function Hwt(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Fm[t>>2]+Fm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Fm[t>>10]+Fm[t>>4&63]+Fm[t<<2&63]+"=")),i.join("")}});var F3e=Se(vG=>{vG.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,u=(1<>1,f=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=a*256+e[t+c],c+=h,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=o*256+e[t+c],c+=h,f-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(d?-1:1)*o*Math.pow(2,a-n)};vG.write=function(e,t,r,n,i,a){var o,s,u,l=a*8-i-1,f=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,x=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+c>=1?t+=h/u:t+=h*Math.pow(2,1-c),t*u>=2&&(o++,u/=2),o+c>=f?(s=0,o=f):o+c>=1?(s=(t*u-1)*Math.pow(2,i),o=o+c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=o&255,d+=p,o/=256,l-=8);e[r+d-p]|=x*128}});var u2=Se(KT=>{"use strict";var yG=R3e(),XT=F3e(),q3e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;KT.Buffer=Ns;KT.SlowBuffer=Kwt;KT.INSPECT_MAX_BYTES=50;var FD=2147483647;KT.kMaxLength=FD;Ns.TYPED_ARRAY_SUPPORT=Wwt();!Ns.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 Wwt(){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(Ns.prototype,"parent",{enumerable:!0,get:function(){if(Ns.isBuffer(this))return this.buffer}});Object.defineProperty(Ns.prototype,"offset",{enumerable:!0,get:function(){if(Ns.isBuffer(this))return this.byteOffset}});function Vg(e){if(e>FD)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Ns.prototype),t}function Ns(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 xG(e)}return U3e(e,t,r)}Ns.poolSize=8192;function U3e(e,t,r){if(typeof e=="string")return Zwt(e,t);if(ArrayBuffer.isView(e))return Xwt(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 gG(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 Ns.from(n,t,r);let i=Ywt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ns.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)}Ns.from=function(e,t,r){return U3e(e,t,r)};Object.setPrototypeOf(Ns.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ns,Uint8Array);function V3e(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 jwt(e,t,r){return V3e(e),e<=0?Vg(e):t!==void 0?typeof r=="string"?Vg(e).fill(t,r):Vg(e).fill(t):Vg(e)}Ns.alloc=function(e,t,r){return jwt(e,t,r)};function xG(e){return V3e(e),Vg(e<0?0:bG(e)|0)}Ns.allocUnsafe=function(e){return xG(e)};Ns.allocUnsafeSlow=function(e){return xG(e)};function Zwt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Ns.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=H3e(e,t)|0,n=Vg(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function mG(e){let t=e.length<0?0:bG(e.length)|0,r=Vg(t);for(let n=0;n=FD)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+FD.toString(16)+" bytes");return e|0}function Kwt(e){return+e!=e&&(e=0),Ns.alloc(+e)}Ns.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ns.prototype};Ns.compare=function(t,r){if(qm(t,Uint8Array)&&(t=Ns.from(t,t.offset,t.byteLength)),qm(r,Uint8Array)&&(r=Ns.from(r,r.offset,r.byteLength)),!Ns.isBuffer(t)||!Ns.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?(Ns.isBuffer(o)||(o=Ns.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(Ns.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function H3e(e,t){if(Ns.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 _G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return $3e(e).length;default:if(i)return n?-1:_G(e).length;t=(""+t).toLowerCase(),i=!0}}Ns.byteLength=H3e;function Jwt(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 s3t(this,t,r);case"utf8":case"utf-8":return W3e(this,t,r);case"ascii":return a3t(this,t,r);case"latin1":case"binary":return o3t(this,t,r);case"base64":return i3t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l3t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ns.prototype._isBuffer=!0;function l2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Ns.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+=" ... "),""};q3e&&(Ns.prototype[q3e]=Ns.prototype.inspect);Ns.prototype.compare=function(t,r,n,i,a){if(qm(t,Uint8Array)&&(t=Ns.from(t,t.offset,t.byteLength)),!Ns.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,u=Math.min(o,s),l=this.slice(i,a),f=t.slice(r,n);for(let c=0;c2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,TG(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=Ns.from(t,n)),Ns.isBuffer(t))return t.length===0?-1:B3e(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):B3e(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function B3e(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 u(f,c){return a===1?f[c]:f.readUInt16BE(c*a)}let l;if(i){let f=-1;for(l=r;lo&&(r=o-s),l=r;l>=0;l--){let f=!0;for(let c=0;ci&&(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 $wt(this,t,r,n);case"utf8":case"utf-8":return Qwt(this,t,r,n);case"ascii":case"latin1":case"binary":return e3t(this,t,r,n);case"base64":return t3t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r3t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};Ns.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function i3t(e,t,r){return t===0&&r===e.length?yG.fromByteArray(e):yG.fromByteArray(e.slice(t,r))}function W3e(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 u,l,f,c;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],(u&192)===128&&(c=(a&31)<<6|u&63,c>127&&(o=c));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(c=(a&15)<<12|(u&63)<<6|l&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:u=e[i+1],l=e[i+2],f=e[i+3],(u&192)===128&&(l&192)===128&&(f&192)===128&&(c=(a&15)<<18|(u&63)<<12|(l&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}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 n3t(n)}var O3e=4096;function n3t(e){let t=e.length;if(t<=O3e)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")}Ns.prototype.readUintLE=Ns.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||rp(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};Ns.prototype.readUint8=Ns.prototype.readUInt8=function(t,r){return t=t>>>0,r||rp(t,1,this.length),this[t]};Ns.prototype.readUint16LE=Ns.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||rp(t,2,this.length),this[t]|this[t+1]<<8};Ns.prototype.readUint16BE=Ns.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||rp(t,2,this.length),this[t]<<8|this[t+1]};Ns.prototype.readUint32LE=Ns.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Ns.prototype.readUint32BE=Ns.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Ns.prototype.readBigUInt64LE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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||rp(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};Ns.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(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};Ns.prototype.readInt8=function(t,r){return t=t>>>0,r||rp(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Ns.prototype.readInt16LE=function(t,r){t=t>>>0,r||rp(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Ns.prototype.readInt16BE=function(t,r){t=t>>>0,r||rp(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Ns.prototype.readInt32LE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Ns.prototype.readInt32BE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Ns.prototype.readBigInt64LE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||rp(t,4,this.length),XT.read(this,t,!0,23,4)};Ns.prototype.readFloatBE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),XT.read(this,t,!1,23,4)};Ns.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||rp(t,8,this.length),XT.read(this,t,!0,52,8)};Ns.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||rp(t,8,this.length),XT.read(this,t,!1,52,8)};function Iv(e,t,r,n,i,a){if(!Ns.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}Ns.prototype.writeUintLE=Ns.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;Iv(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;Iv(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};Ns.prototype.writeUint8=Ns.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,1,255,0),this[r]=t&255,r+1};Ns.prototype.writeUint16LE=Ns.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Ns.prototype.writeUint16BE=Ns.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Ns.prototype.writeUint32LE=Ns.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeUint32BE=Ns.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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 j3e(e,t,r,n,i){J3e(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 Z3e(e,t,r,n,i){J3e(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}Ns.prototype.writeBigUInt64LE=z_(function(t,r=0){return j3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ns.prototype.writeBigUInt64BE=z_(function(t,r=0){return Z3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ns.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Iv(this,t,r,n,u-1,-u)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+n};Ns.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Iv(this,t,r,n,u-1,-u)}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};Ns.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Ns.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Ns.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Ns.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeBigInt64LE=z_(function(t,r=0){return j3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ns.prototype.writeBigInt64BE=z_(function(t,r=0){return Z3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X3e(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 Y3e(e,t,r,n,i){return t=+t,r=r>>>0,i||X3e(e,t,r,4,34028234663852886e22,-34028234663852886e22),XT.write(e,t,r,n,23,4),r+4}Ns.prototype.writeFloatLE=function(t,r,n){return Y3e(this,t,r,!0,n)};Ns.prototype.writeFloatBE=function(t,r,n){return Y3e(this,t,r,!1,n)};function K3e(e,t,r,n,i){return t=+t,r=r>>>0,i||X3e(e,t,r,8,17976931348623157e292,-17976931348623157e292),XT.write(e,t,r,n,52,8),r+8}Ns.prototype.writeDoubleLE=function(t,r,n){return K3e(this,t,r,!0,n)};Ns.prototype.writeDoubleBE=function(t,r,n){return K3e(this,t,r,!1,n)};Ns.prototype.copy=function(t,r,n,i){if(!Ns.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=N3e(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=N3e(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function N3e(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 u3t(e,t,r){YT(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&R4(t,e.length-(r+1))}function J3e(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 ZT.ERR_OUT_OF_RANGE("value",s,e)}u3t(n,i,a)}function YT(e,t){if(typeof e!="number")throw new ZT.ERR_INVALID_ARG_TYPE(t,"number",e)}function R4(e,t,r){throw Math.floor(e)!==e?(YT(e,r),new ZT.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ZT.ERR_BUFFER_OUT_OF_BOUNDS:new ZT.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var f3t=/[^+/0-9A-Za-z-_]/g;function c3t(e){if(e=e.split("=")[0],e=e.trim().replace(f3t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function _G(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 h3t(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function $3e(e){return yG.toByteArray(c3t(e))}function qD(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 TG(e){return e!==e}var p3t=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 z_(e){return typeof BigInt=="undefined"?v3t:e}function v3t(){throw new Error("BigInt not supported")}});var BD=Se((Rfr,Q3e)=>{"use strict";Q3e.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(r 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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var F4=Se((Ffr,eTe)=>{"use strict";var y3t=BD();eTe.exports=function(){return y3t()&&!!Symbol.toStringTag}});var rTe=Se((qfr,tTe)=>{"use strict";tTe.exports=Error});var nTe=Se((Bfr,iTe)=>{"use strict";iTe.exports=EvalError});var oTe=Se((Ofr,aTe)=>{"use strict";aTe.exports=RangeError});var lTe=Se((Nfr,sTe)=>{"use strict";sTe.exports=ReferenceError});var AG=Se((Ufr,uTe)=>{"use strict";uTe.exports=SyntaxError});var q4=Se((Vfr,fTe)=>{"use strict";fTe.exports=TypeError});var hTe=Se((Hfr,cTe)=>{"use strict";cTe.exports=URIError});var vTe=Se((Gfr,pTe)=>{"use strict";var dTe=typeof Symbol!="undefined"&&Symbol,m3t=BD();pTe.exports=function(){return typeof dTe!="function"||typeof Symbol!="function"||typeof dTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:m3t()}});var gTe=Se((Wfr,mTe)=>{"use strict";var yTe={foo:{}},g3t=Object;mTe.exports=function(){return{__proto__:yTe}.foo===yTe.foo&&!({__proto__:null}instanceof g3t)}});var bTe=Se((jfr,xTe)=>{"use strict";var _3t="Function.prototype.bind called on incompatible ",x3t=Object.prototype.toString,b3t=Math.max,w3t="[object Function]",_Te=function(t,r){for(var n=[],i=0;i{"use strict";var S3t=bTe();wTe.exports=Function.prototype.bind||S3t});var ATe=Se((Xfr,TTe)=>{"use strict";var M3t=Function.prototype.call,E3t=Object.prototype.hasOwnProperty,k3t=OD();TTe.exports=k3t.call(M3t,E3t)});var tA=Se((Yfr,CTe)=>{"use strict";var Wf,C3t=rTe(),L3t=nTe(),z3t=oTe(),P3t=lTe(),eA=AG(),QT=q4(),I3t=hTe(),kTe=Function,SG=function(e){try{return kTe('"use strict"; return ('+e+").constructor;")()}catch(t){}},f2=Object.getOwnPropertyDescriptor;if(f2)try{f2({},"")}catch(e){f2=null}var MG=function(){throw new QT},D3t=f2?function(){try{return arguments.callee,MG}catch(e){try{return f2(arguments,"callee").get}catch(t){return MG}}}():MG,JT=vTe()(),R3t=gTe()(),ip=Object.getPrototypeOf||(R3t?function(e){return e.__proto__}:null),$T={},F3t=typeof Uint8Array=="undefined"||!ip?Wf:ip(Uint8Array),c2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Wf:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Wf:ArrayBuffer,"%ArrayIteratorPrototype%":JT&&ip?ip([][Symbol.iterator]()):Wf,"%AsyncFromSyncIteratorPrototype%":Wf,"%AsyncFunction%":$T,"%AsyncGenerator%":$T,"%AsyncGeneratorFunction%":$T,"%AsyncIteratorPrototype%":$T,"%Atomics%":typeof Atomics=="undefined"?Wf:Atomics,"%BigInt%":typeof BigInt=="undefined"?Wf:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Wf:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Wf:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Wf:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C3t,"%eval%":eval,"%EvalError%":L3t,"%Float32Array%":typeof Float32Array=="undefined"?Wf:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Wf:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Wf:FinalizationRegistry,"%Function%":kTe,"%GeneratorFunction%":$T,"%Int8Array%":typeof Int8Array=="undefined"?Wf:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Wf:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Wf:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":JT&&ip?ip(ip([][Symbol.iterator]())):Wf,"%JSON%":typeof JSON=="object"?JSON:Wf,"%Map%":typeof Map=="undefined"?Wf:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!JT||!ip?Wf:ip(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Wf:Promise,"%Proxy%":typeof Proxy=="undefined"?Wf:Proxy,"%RangeError%":z3t,"%ReferenceError%":P3t,"%Reflect%":typeof Reflect=="undefined"?Wf:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Wf:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!JT||!ip?Wf:ip(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Wf:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":JT&&ip?ip(""[Symbol.iterator]()):Wf,"%Symbol%":JT?Symbol:Wf,"%SyntaxError%":eA,"%ThrowTypeError%":D3t,"%TypedArray%":F3t,"%TypeError%":QT,"%Uint8Array%":typeof Uint8Array=="undefined"?Wf:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Wf:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Wf:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Wf:Uint32Array,"%URIError%":I3t,"%WeakMap%":typeof WeakMap=="undefined"?Wf:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Wf:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Wf:WeakSet};if(ip)try{null.error}catch(e){STe=ip(ip(e)),c2["%Error.prototype%"]=STe}var STe,q3t=function e(t){var r;if(t==="%AsyncFunction%")r=SG("async function () {}");else if(t==="%GeneratorFunction%")r=SG("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=SG("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ip&&(r=ip(i.prototype))}return c2[t]=r,r},MTe={__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"]},B4=OD(),ND=ATe(),B3t=B4.call(Function.call,Array.prototype.concat),O3t=B4.call(Function.apply,Array.prototype.splice),ETe=B4.call(Function.call,String.prototype.replace),UD=B4.call(Function.call,String.prototype.slice),N3t=B4.call(Function.call,RegExp.prototype.exec),U3t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V3t=/\\(\\)?/g,H3t=function(t){var r=UD(t,0,1),n=UD(t,-1);if(r==="%"&&n!=="%")throw new eA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new eA("invalid intrinsic syntax, expected opening `%`");var i=[];return ETe(t,U3t,function(a,o,s,u){i[i.length]=s?ETe(u,V3t,"$1"):o||a}),i},G3t=function(t,r){var n=t,i;if(ND(MTe,n)&&(i=MTe[n],n="%"+i[0]+"%"),ND(c2,n)){var a=c2[n];if(a===$T&&(a=q3t(n)),typeof a=="undefined"&&!r)throw new QT("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new eA("intrinsic "+t+" does not exist!")};CTe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new QT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new QT('"allowMissing" argument must be a boolean');if(N3t(/^%?[^%]*%?$/,t)===null)throw new eA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=H3t(t),i=n.length>0?n[0]:"",a=G3t("%"+i+"%",r),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],O3t(n,B3t([0,1],l)));for(var f=1,c=!0;f=n.length){var x=f2(s,h);c=!!x,c&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[h]}else c=ND(s,h),s=s[h];c&&!u&&(c2[o]=s)}}return s}});var HD=Se((Kfr,LTe)=>{"use strict";var W3t=tA(),VD=W3t("%Object.defineProperty%",!0)||!1;if(VD)try{VD({},"a",{value:1})}catch(e){VD=!1}LTe.exports=VD});var O4=Se((Jfr,zTe)=>{"use strict";var j3t=tA(),GD=j3t("%Object.getOwnPropertyDescriptor%",!0);if(GD)try{GD([],"length")}catch(e){GD=null}zTe.exports=GD});var RTe=Se(($fr,DTe)=>{"use strict";var PTe=HD(),Z3t=AG(),rA=q4(),ITe=O4();DTe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new rA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new rA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new rA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new rA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new rA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new rA("`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,u=!!ITe&&ITe(t,r);if(PTe)PTe(t,r,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new Z3t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var kG=Se((Qfr,qTe)=>{"use strict";var EG=HD(),FTe=function(){return!!EG};FTe.hasArrayLengthDefineBug=function(){if(!EG)return null;try{return EG([],"length",{value:1}).length!==1}catch(t){return!0}};qTe.exports=FTe});var VTe=Se((ecr,UTe)=>{"use strict";var X3t=tA(),BTe=RTe(),Y3t=kG()(),OTe=O4(),NTe=q4(),K3t=X3t("%Math.floor%");UTe.exports=function(t,r){if(typeof t!="function")throw new NTe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||K3t(r)!==r)throw new NTe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&OTe){var o=OTe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(Y3t?BTe(t,"length",r,!0,!0):BTe(t,"length",r)),t}});var N4=Se((tcr,WD)=>{"use strict";var CG=OD(),jD=tA(),J3t=VTe(),$3t=q4(),WTe=jD("%Function.prototype.apply%"),jTe=jD("%Function.prototype.call%"),ZTe=jD("%Reflect.apply%",!0)||CG.call(jTe,WTe),HTe=HD(),Q3t=jD("%Math.max%");WD.exports=function(t){if(typeof t!="function")throw new $3t("a function is required");var r=ZTe(CG,jTe,arguments);return J3t(r,1+Q3t(0,t.length-(arguments.length-1)),!0)};var GTe=function(){return ZTe(CG,WTe,arguments)};HTe?HTe(WD.exports,"apply",{value:GTe}):WD.exports.apply=GTe});var iA=Se((rcr,KTe)=>{"use strict";var XTe=tA(),YTe=N4(),eTt=YTe(XTe("String.prototype.indexOf"));KTe.exports=function(t,r){var n=XTe(t,!!r);return typeof n=="function"&&eTt(t,".prototype.")>-1?YTe(n):n}});var QTe=Se((icr,$Te)=>{"use strict";var tTt=F4()(),rTt=iA(),LG=rTt("Object.prototype.toString"),ZD=function(t){return tTt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:LG(t)==="[object Arguments]"},JTe=function(t){return ZD(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&LG(t)!=="[object Array]"&&LG(t.callee)==="[object Function]"},iTt=function(){return ZD(arguments)}();ZD.isLegacyArguments=JTe;$Te.exports=iTt?ZD:JTe});var rAe=Se((ncr,tAe)=>{"use strict";var nTt=Object.prototype.toString,aTt=Function.prototype.toString,oTt=/^\s*(?:function)?\*/,eAe=F4()(),zG=Object.getPrototypeOf,sTt=function(){if(!eAe)return!1;try{return Function("return function*() {}")()}catch(e){}},PG;tAe.exports=function(t){if(typeof t!="function")return!1;if(oTt.test(aTt.call(t)))return!0;if(!eAe){var r=nTt.call(t);return r==="[object GeneratorFunction]"}if(!zG)return!1;if(typeof PG=="undefined"){var n=sTt();PG=n?zG(n):!1}return zG(t)===PG}});var oAe=Se((acr,aAe)=>{"use strict";var nAe=Function.prototype.toString,nA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,DG,XD;if(typeof nA=="function"&&typeof Object.defineProperty=="function")try{DG=Object.defineProperty({},"length",{get:function(){throw XD}}),XD={},nA(function(){throw 42},null,DG)}catch(e){e!==XD&&(nA=null)}else nA=null;var lTt=/^\s*class\b/,RG=function(t){try{var r=nAe.call(t);return lTt.test(r)}catch(n){return!1}},IG=function(t){try{return RG(t)?!1:(nAe.call(t),!0)}catch(r){return!1}},YD=Object.prototype.toString,uTt="[object Object]",fTt="[object Function]",cTt="[object GeneratorFunction]",hTt="[object HTMLAllCollection]",dTt="[object HTML document.all class]",pTt="[object HTMLCollection]",vTt=typeof Symbol=="function"&&!!Symbol.toStringTag,yTt=!(0 in[,]),FG=function(){return!1};typeof document=="object"&&(iAe=document.all,YD.call(iAe)===YD.call(document.all)&&(FG=function(t){if((yTt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=YD.call(t);return(r===hTt||r===dTt||r===pTt||r===uTt)&&t("")==null}catch(n){}return!1}));var iAe;aAe.exports=nA?function(t){if(FG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{nA(t,null,DG)}catch(r){if(r!==XD)return!1}return!RG(t)&&IG(t)}:function(t){if(FG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(vTt)return IG(t);if(RG(t))return!1;var r=YD.call(t);return r!==fTt&&r!==cTt&&!/^\[object HTML/.test(r)?!1:IG(t)}});var qG=Se((ocr,lAe)=>{"use strict";var mTt=oAe(),gTt=Object.prototype.toString,sAe=Object.prototype.hasOwnProperty,_Tt=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),gTt.call(t)==="[object Array]"?_Tt(t,r,i):typeof t=="string"?xTt(t,r,i):bTt(t,r,i)};lAe.exports=wTt});var OG=Se((scr,uAe)=>{"use strict";var BG=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],TTt=typeof globalThis=="undefined"?window:globalThis;uAe.exports=function(){for(var t=[],r=0;r{"use strict";var JD=qG(),ATt=OG(),fAe=N4(),VG=iA(),KD=O4(),STt=VG("Object.prototype.toString"),hAe=F4()(),cAe=typeof globalThis=="undefined"?window:globalThis,UG=ATt(),HG=VG("String.prototype.slice"),NG=Object.getPrototypeOf,MTt=VG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:kTt(t)}return KD?ETt(t):null}});var xAe=Se((ucr,_Ae)=>{"use strict";var vAe=qG(),CTt=OG(),WG=iA(),LTt=WG("Object.prototype.toString"),yAe=F4()(),QD=O4(),zTt=typeof globalThis=="undefined"?window:globalThis,mAe=CTt(),PTt=WG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return QD?DTt(t):!1}});var XG=Se(Vf=>{"use strict";var RTt=QTe(),FTt=rAe(),Hy=pAe(),bAe=xAe();function aA(e){return e.call.bind(e)}var wAe=typeof BigInt!="undefined",TAe=typeof Symbol!="undefined",X0=aA(Object.prototype.toString),qTt=aA(Number.prototype.valueOf),BTt=aA(String.prototype.valueOf),OTt=aA(Boolean.prototype.valueOf);wAe&&(AAe=aA(BigInt.prototype.valueOf));var AAe;TAe&&(SAe=aA(Symbol.prototype.valueOf));var SAe;function V4(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Vf.isArgumentsObject=RTt;Vf.isGeneratorFunction=FTt;Vf.isTypedArray=bAe;function NTt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Vf.isPromise=NTt;function UTt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):bAe(e)||EAe(e)}Vf.isArrayBufferView=UTt;function VTt(e){return Hy(e)==="Uint8Array"}Vf.isUint8Array=VTt;function HTt(e){return Hy(e)==="Uint8ClampedArray"}Vf.isUint8ClampedArray=HTt;function GTt(e){return Hy(e)==="Uint16Array"}Vf.isUint16Array=GTt;function WTt(e){return Hy(e)==="Uint32Array"}Vf.isUint32Array=WTt;function jTt(e){return Hy(e)==="Int8Array"}Vf.isInt8Array=jTt;function ZTt(e){return Hy(e)==="Int16Array"}Vf.isInt16Array=ZTt;function XTt(e){return Hy(e)==="Int32Array"}Vf.isInt32Array=XTt;function YTt(e){return Hy(e)==="Float32Array"}Vf.isFloat32Array=YTt;function KTt(e){return Hy(e)==="Float64Array"}Vf.isFloat64Array=KTt;function JTt(e){return Hy(e)==="BigInt64Array"}Vf.isBigInt64Array=JTt;function $Tt(e){return Hy(e)==="BigUint64Array"}Vf.isBigUint64Array=$Tt;function e6(e){return X0(e)==="[object Map]"}e6.working=typeof Map!="undefined"&&e6(new Map);function QTt(e){return typeof Map=="undefined"?!1:e6.working?e6(e):e instanceof Map}Vf.isMap=QTt;function t6(e){return X0(e)==="[object Set]"}t6.working=typeof Set!="undefined"&&t6(new Set);function eAt(e){return typeof Set=="undefined"?!1:t6.working?t6(e):e instanceof Set}Vf.isSet=eAt;function r6(e){return X0(e)==="[object WeakMap]"}r6.working=typeof WeakMap!="undefined"&&r6(new WeakMap);function tAt(e){return typeof WeakMap=="undefined"?!1:r6.working?r6(e):e instanceof WeakMap}Vf.isWeakMap=tAt;function ZG(e){return X0(e)==="[object WeakSet]"}ZG.working=typeof WeakSet!="undefined"&&ZG(new WeakSet);function rAt(e){return ZG(e)}Vf.isWeakSet=rAt;function i6(e){return X0(e)==="[object ArrayBuffer]"}i6.working=typeof ArrayBuffer!="undefined"&&i6(new ArrayBuffer);function MAe(e){return typeof ArrayBuffer=="undefined"?!1:i6.working?i6(e):e instanceof ArrayBuffer}Vf.isArrayBuffer=MAe;function n6(e){return X0(e)==="[object DataView]"}n6.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&n6(new DataView(new ArrayBuffer(1),0,1));function EAe(e){return typeof DataView=="undefined"?!1:n6.working?n6(e):e instanceof DataView}Vf.isDataView=EAe;var jG=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function U4(e){return X0(e)==="[object SharedArrayBuffer]"}function kAe(e){return typeof jG=="undefined"?!1:(typeof U4.working=="undefined"&&(U4.working=U4(new jG)),U4.working?U4(e):e instanceof jG)}Vf.isSharedArrayBuffer=kAe;function iAt(e){return X0(e)==="[object AsyncFunction]"}Vf.isAsyncFunction=iAt;function nAt(e){return X0(e)==="[object Map Iterator]"}Vf.isMapIterator=nAt;function aAt(e){return X0(e)==="[object Set Iterator]"}Vf.isSetIterator=aAt;function oAt(e){return X0(e)==="[object Generator]"}Vf.isGeneratorObject=oAt;function sAt(e){return X0(e)==="[object WebAssembly.Module]"}Vf.isWebAssemblyCompiledModule=sAt;function CAe(e){return V4(e,qTt)}Vf.isNumberObject=CAe;function LAe(e){return V4(e,BTt)}Vf.isStringObject=LAe;function zAe(e){return V4(e,OTt)}Vf.isBooleanObject=zAe;function PAe(e){return wAe&&V4(e,AAe)}Vf.isBigIntObject=PAe;function IAe(e){return TAe&&V4(e,SAe)}Vf.isSymbolObject=IAe;function lAt(e){return CAe(e)||LAe(e)||zAe(e)||PAe(e)||IAe(e)}Vf.isBoxedPrimitive=lAt;function uAt(e){return typeof Uint8Array!="undefined"&&(MAe(e)||kAe(e))}Vf.isAnyArrayBuffer=uAt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Vf,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var YG=Se((ccr,DAe)=>{DAe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var tW=Se(Hf=>{var RAe=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(u){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),QG(t)?r.showHidden=t:t&&Hf._extend(r,t),d2(r.showHidden)&&(r.showHidden=!1),d2(r.depth)&&(r.depth=2),d2(r.colors)&&(r.colors=!1),d2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=cAt),l6(r,e,r.depth)}Hf.inspect=P_;P_.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]};P_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function cAt(e,t){var r=P_.styles[t];return r?"\x1B["+P_.colors[r][0]+"m"+e+"\x1B["+P_.colors[r][1]+"m":e}function hAt(e,t){return e}function dAt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function l6(e,t,r){if(e.customInspect&&t&&s6(t.inspect)&&t.inspect!==Hf.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return c6(n)||(n=l6(e,n,r)),n}var i=pAt(e,t);if(i)return i;var a=Object.keys(t),o=dAt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),G4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return KG(t);if(a.length===0){if(s6(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(H4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(u6(t))return e.stylize(Date.prototype.toString.call(t),"date");if(G4(t))return KG(t)}var u="",l=!1,f=["{","}"];if(qAe(t)&&(l=!0,f=["[","]"]),s6(t)){var c=t.name?": "+t.name:"";u=" [Function"+c+"]"}if(H4(t)&&(u=" "+RegExp.prototype.toString.call(t)),u6(t)&&(u=" "+Date.prototype.toUTCString.call(t)),G4(t)&&(u=" "+KG(t)),a.length===0&&(!l||t.length==0))return f[0]+u+f[1];if(r<0)return H4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return l?h=vAt(e,t,r,o,a):h=a.map(function(d){return $G(e,t,r,o,d,l)}),e.seen.pop(),yAt(h,u,f)}function pAt(e,t){if(d2(t))return e.stylize("undefined","undefined");if(c6(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(BAe(t))return e.stylize(""+t,"number");if(QG(t))return e.stylize(""+t,"boolean");if(f6(t))return e.stylize("null","null")}function KG(e){return"["+Error.prototype.toString.call(e)+"]"}function vAt(e,t,r,n,i){for(var a=[],o=0,s=t.length;o{"use strict";fie.exports=function(t){return t}});var EL=Se(_g=>{"use strict";var Ort=_u(),Nrt=H1(),Urt=BM(),Vrt=ju().BADNUM,ZB=1e-9;_g.findBin=function(e,t,r){if(Ort(t.start))return r?Math.ceil((e-t.start)/t.size-ZB)-1:Math.floor((e-t.start)/t.size+ZB);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,u;for(o>=0?u=r?Hrt:Grt:u=r?jrt:Wrt,e+=o*ZB*(r?-1:1)*(o>=0?1:-1);n90&&Nrt.log("Long binary search..."),n-1};function Hrt(e,t){return et}function jrt(e,t){return e>=t}_g.sorterAsc=function(e,t){return e-t};_g.sorterDes=function(e,t){return t-e};_g.distinctVals=function(e){var t=e.slice();t.sort(_g.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Vrt;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var u=t[s],l=u-o;o===void 0?(a.push(u),o=u):l>i&&(n=Math.min(n,l),a.push(u),o=u)}return{vals:a,minDiff:n}};_g.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,u=r?1:0,l=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};_g.findIndexOfMin=function(e,t){t=t||Urt;for(var r=1/0,n,i=0;i{"use strict";cie.exports=function(t){return Object.keys(t).sort()}});var hie=Se(wh=>{"use strict";var OM=_u(),Zrt=yp().isArrayOrTypedArray;wh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),OM(t)||(t=!1),Zrt(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 mie=Se((krr,yie)=>{"use strict";var die=r3(),XB=die.mod,Xrt=die.modHalf,NM=Math.PI,Y1=2*NM;function Yrt(e){return e/180*NM}function Krt(e){return e/NM*180}function YB(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function pie(e,t){return Xrt(t-e,Y1)}function Jrt(e,t){return Math.abs(pie(e,t))}function vie(e,t){if(YB(t))return!0;var r,n;t[0]n&&(n+=Y1);var i=XB(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function $rt(e,t,r,n){if(!vie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function KB(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=YB([r,n]),u,l,f,c,h;s?(u=0,l=NM,f=Y1):r{"use strict";cb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};cb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};cb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};cb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};cb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};cb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var bie=Se(hb=>{"use strict";var JB=r3().mod;hb.segmentsIntersect=xie;function xie(e,t,r,n,i,a,o,s){var u=r-e,l=i-e,f=o-i,c=n-t,h=a-t,d=s-a,p=u*d-f*c;if(p===0)return null;var x=(l*d-f*h)/p,b=(l*c-u*h)/p;return b<0||b>1||x<0||x>1?null:{x:e+u*x,y:t+c*x}}hb.segmentDistance=function(t,r,n,i,a,o,s,u){if(xie(t,r,n,i,a,o,s,u))return 0;var l=n-t,f=i-r,c=s-a,h=u-o,d=l*l+f*f,p=c*c+h*h,x=Math.min(kL(l,f,d,a-t,o-r),kL(l,f,d,s-t,u-r),kL(c,h,p,t-a,r-o),kL(c,h,p,n-a,i-o));return Math.sqrt(x)};function kL(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 u=n*t-i*e;return u*u/r}}var CL,$B,_ie;hb.getTextLocation=function(t,r,n,i){if((t!==$B||i!==_ie)&&(CL={},$B=t,_ie=i),CL[n])return CL[n];var a=t.getPointAtLength(JB(n-i/2,r)),o=t.getPointAtLength(JB(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),u=t.getPointAtLength(JB(n,r)),l=(u.x*4+a.x+o.x)/6,f=(u.y*4+a.y+o.y)/6,c={x:l,y:f,theta:s};return CL[n]=c,c};hb.clearLocationCache=function(){$B=null};hb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,u=0,l=t.getTotalLength(),f=l,c,h;function d(x){var b=t.getPointAtLength(x);x===0?c=b:x===l&&(h=b);var y=b.xa?b.x-a:0,k=b.ys?b.y-s:0;return Math.sqrt(y*y+k*k)}for(var p=d(u);p;){if(u+=p+n,u>f)return;p=d(u)}for(p=d(f);p;){if(f-=p+n,u>f)return;p=d(f)}return{min:u,max:f,len:f-u,total:l,isClosed:u===0&&f===l&&Math.abs(c.x-h.x)<.1&&Math.abs(c.y-h.y)<.1}};hb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,u=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,l=0,f=0,c=a,h,d,p;l0?c=h:f=h,l++}return d}});var LL=Se(UM=>{"use strict";var xg={};UM.throttle=function(t,r,n){var i=xg[t],a=Date.now();if(!i){for(var o in xg)xg[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};UM.done=function(e){var t=xg[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};UM.clear=function(e){if(e)wie(xg[e]),delete xg[e];else for(var t in xg)UM.clear(t)};function wie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Aie=Se((Prr,Tie)=>{"use strict";Tie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Sie=Se((Irr,zL)=>{"use strict";zL.exports=QB;zL.exports.isMobile=QB;zL.exports.default=QB;var rit=/(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,iit=/CrOS/,nit=/android|ipad|playbook|silk/i;function QB(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=rit.test(t)&&!iit.test(t)||!!e.tablet&&nit.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Eie=Se((Drr,Mie)=>{"use strict";var ait=_u(),oit=Sie();Mie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=sit(),typeof r!="string")return!0;var n=oit({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a-1;s--){var u=i[s];if(u.substr(0,8)==="Version/"){var l=u.substr(8).split(".")[0];if(ait(l)&&(l=+l),l>=13)return!0}}}return n};function sit(){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 Cie=Se((Rrr,kie)=>{"use strict";var lit=Nl();kie.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]=lit.select(this)}),i}});var zie=Se((Frr,Lie)=>{"use strict";var uit=Ul();Lie.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 u=s[r];if(u)return u}a=uit.localeRegistry}var l=n.split("-")[0];if(l===n)break;n=l}return r}});var eO=Se((qrr,Pie)=>{"use strict";Pie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";Iie.exports=function(t){for(var r=hit(t)?cit:fit,n=[],i=0;i{"use strict";Rie.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 u=parseFloat(i).toPrecision(12);u.indexOf("e+")===-1&&(i=+u)}}return i}});var Bie=Se((Nrr,qie)=>{"use strict";var dit=_u(),pit=ju().BADNUM,vit=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;qie.exports=function(t){return typeof t=="string"&&(t=t.replace(vit,"")),dit(t)?Number(t):pit}});var Zr=Se((Urr,Jie)=>{"use strict";var VM=Nl(),yit=e3().utcFormat,mit=TB().format,Gie=_u(),Wie=ju(),jie=Wie.FP_SAFE,git=-jie,Oie=Wie.BADNUM,nn=Jie.exports={};nn.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 Nie={};nn.warnBadFormat=function(e){var t=String(e);Nie[t]||(Nie[t]=1,nn.warn('encountered bad format: "'+t+'"'))};nn.noFormat=function(e){return String(e)};nn.numberFormat=function(e){var t;try{t=mit(nn.adjustFormat(e))}catch(r){return nn.warnBadFormat(e),nn.noFormat}return t};nn.nestedProperty=EM();nn.keyedContainer=zee();nn.relativeAttr=Iee();nn.isPlainObject=yg();nn.toLogRange=lL();nn.relinkPrivateKeys=qee();var K1=yp();nn.isArrayBuffer=K1.isArrayBuffer;nn.isTypedArray=K1.isTypedArray;nn.isArrayOrTypedArray=K1.isArrayOrTypedArray;nn.isArray1D=K1.isArray1D;nn.ensureArray=K1.ensureArray;nn.concat=K1.concat;nn.maxRowLength=K1.maxRowLength;nn.minRowLength=K1.minRowLength;var Zie=r3();nn.mod=Zie.mod;nn.modHalf=Zie.modHalf;var J1=rte();nn.valObjectMeta=J1.valObjectMeta;nn.coerce=J1.coerce;nn.coerce2=J1.coerce2;nn.coerceFont=J1.coerceFont;nn.coercePattern=J1.coercePattern;nn.coerceHoverinfo=J1.coerceHoverinfo;nn.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;nn.validate=J1.validate;var jv=uie();nn.dateTime2ms=jv.dateTime2ms;nn.isDateTime=jv.isDateTime;nn.ms2DateTime=jv.ms2DateTime;nn.ms2DateTimeLocal=jv.ms2DateTimeLocal;nn.cleanDate=jv.cleanDate;nn.isJSDate=jv.isJSDate;nn.formatDate=jv.formatDate;nn.incrementMonth=jv.incrementMonth;nn.dateTick0=jv.dateTick0;nn.dfltRange=jv.dfltRange;nn.findExactDates=jv.findExactDates;nn.MIN_MS=jv.MIN_MS;nn.MAX_MS=jv.MAX_MS;var db=EL();nn.findBin=db.findBin;nn.sorterAsc=db.sorterAsc;nn.sorterDes=db.sorterDes;nn.distinctVals=db.distinctVals;nn.roundUp=db.roundUp;nn.sort=db.sort;nn.findIndexOfMin=db.findIndexOfMin;nn.sortObjectKeys=X1();var bg=hie();nn.aggNums=bg.aggNums;nn.len=bg.len;nn.mean=bg.mean;nn.geometricMean=bg.geometricMean;nn.median=bg.median;nn.midRange=bg.midRange;nn.variance=bg.variance;nn.stdev=bg.stdev;nn.interp=bg.interp;var gy=yL();nn.init2dArray=gy.init2dArray;nn.transposeRagged=gy.transposeRagged;nn.dot=gy.dot;nn.translationMatrix=gy.translationMatrix;nn.rotationMatrix=gy.rotationMatrix;nn.rotationXYMatrix=gy.rotationXYMatrix;nn.apply3DTransform=gy.apply3DTransform;nn.apply2DTransform=gy.apply2DTransform;nn.apply2DTransform2=gy.apply2DTransform2;nn.convertCssMatrix=gy.convertCssMatrix;nn.inverseTransformMatrix=gy.inverseTransformMatrix;var pm=mie();nn.deg2rad=pm.deg2rad;nn.rad2deg=pm.rad2deg;nn.angleDelta=pm.angleDelta;nn.angleDist=pm.angleDist;nn.isFullCircle=pm.isFullCircle;nn.isAngleInsideSector=pm.isAngleInsideSector;nn.isPtInsideSector=pm.isPtInsideSector;nn.pathArc=pm.pathArc;nn.pathSector=pm.pathSector;nn.pathAnnulus=pm.pathAnnulus;var d3=gie();nn.isLeftAnchor=d3.isLeftAnchor;nn.isCenterAnchor=d3.isCenterAnchor;nn.isRightAnchor=d3.isRightAnchor;nn.isTopAnchor=d3.isTopAnchor;nn.isMiddleAnchor=d3.isMiddleAnchor;nn.isBottomAnchor=d3.isBottomAnchor;var p3=bie();nn.segmentsIntersect=p3.segmentsIntersect;nn.segmentDistance=p3.segmentDistance;nn.getTextLocation=p3.getTextLocation;nn.clearLocationCache=p3.clearLocationCache;nn.getVisibleSegment=p3.getVisibleSegment;nn.findPointOnPath=p3.findPointOnPath;var DL=vu();nn.extendFlat=DL.extendFlat;nn.extendDeep=DL.extendDeep;nn.extendDeepAll=DL.extendDeepAll;nn.extendDeepNoArrays=DL.extendDeepNoArrays;var tO=H1();nn.log=tO.log;nn.warn=tO.warn;nn.error=tO.error;var _it=n3();nn.counterRegex=_it.counter;var rO=LL();nn.throttle=rO.throttle;nn.throttleDone=rO.done;nn.clearThrottle=rO.clear;var _y=DM();nn.getGraphDiv=_y.getGraphDiv;nn.isPlotDiv=_y.isPlotDiv;nn.removeElement=_y.removeElement;nn.addStyleRule=_y.addStyleRule;nn.addRelatedStyleRule=_y.addRelatedStyleRule;nn.deleteRelatedStyleRule=_y.deleteRelatedStyleRule;nn.setStyleOnHover=_y.setStyleOnHover;nn.getFullTransformMatrix=_y.getFullTransformMatrix;nn.getElementTransformMatrix=_y.getElementTransformMatrix;nn.getElementAndAncestors=_y.getElementAndAncestors;nn.equalDomRects=_y.equalDomRects;nn.clearResponsive=Aie();nn.preserveDrawingBuffer=Eie();nn.makeTraceGroups=Cie();nn._=zie();nn.notifier=DB();nn.filterUnique=eO();nn.filterVisible=Die();nn.pushUnique=qB();nn.increment=Fie();nn.cleanNumber=Bie();nn.ensureNumber=function(t){return Gie(t)?(t=Number(t),t>jie||t=t?!1:Gie(e)&&e>=0&&e%1===0};nn.noop=vL();nn.identity=BM();nn.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))};nn.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};nn.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?(nn.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};nn.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};nn.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,u,l,f;for(s=0;s=n&&(l-=n*Math.floor(l/n)),l<0?l=-1-l:l>=r&&(l=n-1-l),f+=e[l]*a[u];o[s]=f}return o};nn.syncOrAsync=function(e,t,r){var n,i;function a(){return nn.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)};nn.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};nn.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};nn.fillArray=function(e,t,r,n){if(n=n||nn.identity,nn.isArrayOrTypedArray(e))for(var i=0;i1?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+u};nn.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Kie=/^\w*$/;nn.templateString=function(e,t){var r={};return e.replace(nn.TEMPLATE_STRING_REGEX,function(n,i){var a;return Kie.test(i)?a=t[i]:(r[i]=r[i]||nn.nestedProperty(t,i).get,a=r[i]()),nn.isValidTextValue(a)?a:""})};var Sit={max:10,count:0,name:"hovertemplate"};nn.hovertemplateString=function(){return iO.apply(Sit,arguments)};var Mit={max:10,count:0,name:"texttemplate"};nn.texttemplateString=function(){return iO.apply(Mit,arguments)};var Eit=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function kit(e){var t=e.match(Eit);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Cit={max:10,count:0,name:"texttemplate",parseMultDiv:!0};nn.texttemplateStringForShapes=function(){return iO.apply(Cit,arguments)};var Uie=/^[:|\|]/;function iO(e,t,r){var n=this,i=arguments;t||(t={});var a={};return e.replace(nn.TEMPLATE_STRING_REGEX,function(o,s,u){var l=s==="xother"||s==="yother",f=s==="_xother"||s==="_yother",c=s==="_xother_"||s==="_yother_",h=s==="xother_"||s==="yother_",d=l||f||h||c,p=s;(f||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var x=null,b=null;if(n.parseMultDiv){var y=kit(p);p=y.key,x=y.op,b=y.number}var k;if(d){if(k=t[p],k===void 0)return""}else{var E,A;for(A=3;A=IL&&o<=Vie,l=s>=IL&&s<=Vie;if(u&&(n=10*n+o-IL),l&&(i=10*i+s-IL),!u||!l){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var h3=2e9;nn.seedPseudoRandom=function(){h3=2e9};nn.pseudoRandom=function(){var e=h3;return h3=(69069*h3+1)%4294967296,Math.abs(h3-e)<429496729?nn.pseudoRandom():h3/4294967296};nn.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=nn.extractOption(e,t,"htx","hovertext");if(nn.isValidTextValue(i))return n(i);var a=nn.extractOption(e,t,"tx","text");if(nn.isValidTextValue(a))return n(a)};nn.isValidTextValue=function(e){return e||e===0};nn.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&&(l=1):l=0,nn.strTranslate(i-l*(r+o),a-l*(n+s))+nn.strScale(l)+(u?"rotate("+u+(t?"":" "+r+" "+n)+")":"")};nn.setTransormAndDisplay=function(e,t){e.attr("transform",nn.getTextTransform(t)),e.style("display",t.scale?null:"none")};nn.ensureUniformFontSize=function(e,t){var r=nn.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};nn.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)};nn.bigFont=function(e){return Math.round(1.2*e)};var Hie=nn.getFirefoxVersion(),Lit=Hie!==null&&Hie<86;nn.getPositionFromD3Event=function(){return Lit?[VM.event.layerX,VM.event.layerY]:[VM.event.offsetX,VM.event.offsetY]}});var ene=Se(()=>{"use strict";var zit=Zr(),$ie={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(nO in $ie)Qie=nO.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),zit.addStyleRule(Qie,$ie[nO]);var Qie,nO});var aO=Se((Grr,tne)=>{tne.exports=!0});var sO=Se((Wrr,rne)=>{"use strict";var Pit=aO(),oO;typeof window.matchMedia=="function"?oO=!window.matchMedia("(hover: none)").matches:oO=Pit;rne.exports=oO});var pb=Se((jrr,lO)=>{"use strict";var v3=typeof Reflect=="object"?Reflect:null,ine=v3&&typeof v3.apply=="function"?v3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},RL;v3&&typeof v3.ownKeys=="function"?RL=v3.ownKeys:Object.getOwnPropertySymbols?RL=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:RL=function(t){return Object.getOwnPropertyNames(t)};function Iit(e){console&&console.warn&&console.warn(e)}var ane=Number.isNaN||function(t){return t!==t};function Oc(){Oc.init.call(this)}lO.exports=Oc;lO.exports.once=qit;Oc.EventEmitter=Oc;Oc.prototype._events=void 0;Oc.prototype._eventsCount=0;Oc.prototype._maxListeners=void 0;var nne=10;function FL(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Oc,"defaultMaxListeners",{enumerable:!0,get:function(){return nne},set:function(e){if(typeof e!="number"||e<0||ane(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");nne=e}});Oc.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};Oc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||ane(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 one(e){return e._maxListeners===void 0?Oc.defaultMaxListeners:e._maxListeners}Oc.prototype.getMaxListeners=function(){return one(this)};Oc.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 u=a[t];if(u===void 0)return!1;if(typeof u=="function")ine(u,this,r);else for(var l=u.length,f=cne(u,l),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,Iit(s)}return e}Oc.prototype.addListener=function(t,r){return sne(this,t,r,!1)};Oc.prototype.on=Oc.prototype.addListener;Oc.prototype.prependListener=function(t,r){return sne(this,t,r,!0)};function Dit(){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 lne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Dit.bind(n);return i.listener=r,n.wrapFn=i,i}Oc.prototype.once=function(t,r){return FL(r),this.on(t,lne(this,t,r)),this};Oc.prototype.prependOnceListener=function(t,r){return FL(r),this.prependListener(t,lne(this,t,r)),this};Oc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(FL(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():Rit(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Oc.prototype.off=Oc.prototype.removeListener;Oc.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 une(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?Fit(i):cne(i,i.length)}Oc.prototype.listeners=function(t){return une(this,t,!0)};Oc.prototype.rawListeners=function(t){return une(this,t,!1)};Oc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):fne.call(e,t)};Oc.prototype.listenerCount=fne;function fne(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}Oc.prototype.eventNames=function(){return this._eventsCount>0?RL(this._events):[]};function cne(e,t){for(var r=new Array(t),n=0;n{"use strict";var uO=pb().EventEmitter,Oit={init:function(e){if(e._ev instanceof uO)return e;var t=new uO,r=new uO;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)},e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(u){if(u.listener){if(i.removeListener(t,u.listener),!u.fired)return u.fired=!0,u.listener.apply(i,[r])}else return u.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var pne=Zr(),Nit=ub().dfltConfig;function Uit(e,t){for(var r=[],n,i=0;iNit.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};wg.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};wg.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};wg.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";mne.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var _3=Se($h=>{"use strict";var x0=Ul(),HM=Zr(),BL=zf(),cO=s3(),Vit=fO(),Hit=RM(),Git=ub().configAttributes,gne=_c(),xy=HM.extendDeepAll,m3=HM.isPlainObject,Wit=HM.isArrayOrTypedArray,OL=HM.nestedProperty,jit=HM.valObjectMeta,hO="_isSubplotObj",NL="_isLinkedToArray",Zit="_arrayAttrRegexps",xne="_deprecated",dO=[hO,NL,Zit,xne];$h.IS_SUBPLOT_OBJ=hO;$h.IS_LINKED_TO_ARRAY=NL;$h.DEPRECATED=xne;$h.UNDERSCORE_ATTRS=dO;$h.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Yit(t)}),{defs:{valObjects:jit,metaKeys:dO.concat(["description","role","editType","impliedEdits"]),editType:{traces:gne.traces,layout:gne.layout},impliedEdits:{}},traces:e,layout:Kit(),frames:Jit(),animation:g3(Hit),config:g3(Git)}};$h.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(dO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!$h.isValObject(o)&&m3(o)&&a!=="impliedEdits"&&$h.crawl(o,t,i+1,s)}})};$h.isValObject=function(e){return e&&e.valType!==void 0};$h.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(u,l,f,c){r=r.slice(0,c).concat([l]),n=n.slice(0,c).concat([u&&u._isLinkedToArray]);var h=u&&(u.valType==="data_array"||u.arrayOk===!0)&&!(r[c-1]==="colorbar"&&(l==="ticktext"||l==="tickvals"));h&&s(i,0,"")}function s(u,l,f){var c=u[r[l]],h=f+r[l];if(l===r.length-1)Wit(c)&&t.push(a+h);else if(n[l]){if(Array.isArray(c))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(!qL(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function qL(e){return e===Math.round(e)&&e>=0}function Yit(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=xy({},BL),a=xy({},t.attributes);$h.crawl(a,function(u,l,f,c,h){OL(i,h).set(void 0),u===void 0&&OL(a,h).set(void 0)}),xy(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,xy(n,a),r.attributes&&xy(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:g3(n)};if(t.layoutAttributes){var s={};xy(s,t.layoutAttributes),o.layoutAttributes=g3(s)}return t.animatable||$h.crawl(o,function(u){$h.isValObject(u)&&"anim"in u&&delete u.anim}),o}function Kit(){var e={},t,r;xy(e,cO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var x3=Zr(),rnt=zf(),$1="templateitemname",pO={name:{valType:"string",editType:"none"}};pO[$1]={valType:"string",editType:"calc"};vb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pO.name,t[$1]=pO[$1],t};vb.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=x3.coerce(a,{},rnt,"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}};vb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);x3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};vb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Tne(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(l){var f={name:l.name,_input:l},c=f[$1]=l[$1];if(!wne(c))return f._template=i,f;for(var h=0;h=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function u(){s={},a&&(s[o]={},s[o][$1]=a)}u();function l(d,p){s[d]=p}function f(d,p){a?x3.nestedProperty(s[o],d).set(p):s[o+"."+d]=p}function c(){var d=s;return u(),d}function h(d,p){d&&f(d,p);var x=c();for(var b in x)x3.nestedProperty(e,b).set(x[b])}return{modifyBase:l,modifyItem:f,getUpdateObj:c,applyUpdate:h}}});var dd=Se(($rr,Ane)=>{"use strict";var GM=n3().counter;Ane.exports={idRegex:{x:GM("x","( domain)?"),y:GM("y","( domain)?")},attrRegex:GM("[xy]axis"),xAxisMatch:GM("xaxis"),yAxisMatch:GM("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 $c=Se(Tv=>{"use strict";var int=Ul(),vO=dd();Tv.id2name=function(t){if(!(typeof t!="string"||!t.match(vO.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Tv.name2id=function(t){if(t.match(vO.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Tv.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(vO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Tv.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Tv.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Tv.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Sne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function nnt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function ant(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Mne.exports={clearOutlineControllers:nnt,clearOutline:ant}});var UL=Se((tir,Ene)=>{"use strict";Ene.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Dd=Se(HL=>{"use strict";var VL=Ul(),rir=dd().SUBPLOT_PATTERN;HL.getSubplotCalcData=function(e,t,r){var n=VL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var ont=Ul(),b3=Zr();yb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=yb.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){kne(e,o,i.cache),i.check=function(){if(a){var f=kne(e,o,i.cache);return f.changed&&n&&i.lookupTable[f.value]!==void 0&&(i.disable(),Promise.resolve(n({value:f.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[f.value]})).then(i.enable,i.enable)),f.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u0?".":"")+i;b3.isPlainObject(a)?yO(a,t,o,n+1):t(o,i,a)}})}});var Sc=Se((air,Wne)=>{"use strict";var Bne=Nl(),lnt=e3().timeFormatLocale,unt=TB().formatLocale,WM=_u(),fnt=AB(),Df=Ul(),One=_3(),cnt=_f(),Wl=Zr(),Nne=Pl(),Pne=ju().BADNUM,Av=$c(),hnt=Q1().clearOutline,dnt=UL(),mO=RM(),pnt=fO(),vnt=Dd().getModuleCalcData,Ine=Wl.relinkPrivateKeys,mb=Wl._,El=Wne.exports={};Wl.extendFlat(El,Df);El.attributes=zf();El.attributes.type.values=El.allTypes;El.fontAttrs=uc();El.layoutAttributes=s3();var WL=zne();El.executeAPICommand=WL.executeAPICommand;El.computeAPICommandBindings=WL.computeAPICommandBindings;El.manageCommandObserver=WL.manageCommandObserver;El.hasSimpleAPICommandBindings=WL.hasSimpleAPICommandBindings;El.redrawText=function(e){return e=Wl.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Df.getComponentMethod("annotations","draw")(e),Df.getComponentMethod("legend","draw")(e),Df.getComponentMethod("colorbar","draw")(e),t(El.previousPromises(e)))},300)})};El.resize=function(e){e=Wl.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Wl.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||Wl.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Df.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};El.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};El.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Wl.ensureSingle(t._paper,"text","js-plot-link-container",function(u){u.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Nne.defaultLine,"pointer-events":"all"}).each(function(){var l=Bne.select(this);l.append("tspan").classed("js-link-to-tool",!0),l.append("tspan").classed("js-link-spacer",!0),l.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&&ynt(e,a),o.text(a.text()&&s.text()?" - ":"")}};function ynt(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(){El.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})}}El.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Bne.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=El.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var mnt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],gnt=["year","month","dayMonth","dayMonthYear"];El.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=[],u=e.data||[],l=e.calcdata||[],f=e._context||{},c;e._transitionData||El.createTransitionData(e),i._dfltTitle={plot:mb(e,"Click to enter Plot title"),subtitle:mb(e,"Click to enter Plot subtitle"),x:mb(e,"Click to enter X axis title"),y:mb(e,"Click to enter Y axis title"),colorbar:mb(e,"Click to enter Colorscale title"),annotation:mb(e,"new text")},i._traceWord=mb(e,"trace");var h=Dne(e,mnt);if(i._mapboxAccessToken=f.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,p=n.height;El.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=p),El.sanitizeMargins(i)}else{El.supplyLayoutGlobalDefaults(a,i,h);var x=!a.width||!a.height,b=i.autosize,y=f.autosizable,k=x&&(b||y);k?El.plotAutoSize(e,a,i):x&&El.sanitizeMargins(i),!b&&x&&(a.width=i.width,a.height=i.height)}i._d3locale=bnt(h,i.separators),i._extraFormat=Dne(e,gnt),i._initialAutoSizeIsDone=!0,i._dataLength=u.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var E=i._subplots=xnt(),A=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=_nt(o,u),El.supplyDataDefaults(u,s,a,i);var _=Object.keys(A.x),C=Object.keys(A.y);if(_.length>1&&C.length>1){for(Df.getComponentMethod("grid","sizeDefaults")(a,i),c=0;c<_.length;c++)Wl.pushUnique(E.xaxis,_[c]);for(c=0;c15&&C.length>15&&i.shapes.length===0&&i.images.length===0,El.linkSubplots(s,i,o,n),El.cleanPlot(s,i,o,n);var F=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),U=F,H=q;U&&!H?n._bgLayer.remove():H&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&hnt({_fullLayout:n}),wnt(s,i),Ine(i,n),Df.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var j=i._tracePreGUI,G={},O;for(O in j)G[O]="old";for(c=0;c0){var f=1-2*a;o=Math.round(f*o),s=Math.round(f*s)}}var c=El.layoutAttributes.width.min,h=El.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(n.height-s)>1;(p||d)&&(d&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),El.sanitizeMargins(n)};El.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Df.componentsRegistry,a=t._basePlotModules,o,s,u,l=Df.subplotsRegistry.cartesian;for(o in i)u=i[o],u.includeBasePlot&&u.includeBasePlot(e,t);a.length||a.push(l),t._has("cartesian")&&(Df.getComponentMethod("grid","contentDefaults")(e,t),l.finalizeSubplots(e,t));for(var f in t._subplots)t._subplots[f].sort(Wl.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var k=r.xl!==void 0?r.xl:r.x,E=r.xr!==void 0?r.xr:r.x,A=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+x},r:{val:E,size:r.r+x},b:{val:L,size:r.b+x},t:{val:A,size:r.t+x}},p[t]=1}if(!n._replotting)return El.doAutoMargin(e)}};function Ant(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Av.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}El.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Une(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Wl.extendFlat({},i),u=a.l,l=a.r,f=a.t,c=a.b,h=t._pushmargin,d=t._pushmarginIds,p=t.minreducedwidth,x=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var y=e._fullLayout._reservedMargin;for(var k in y)for(var E in y[k]){var A=y[k][E];o[E]=Math.max(o[E],A)}h.base={l:{val:0,size:u},r:{val:1,size:l},t:{val:1,size:f},b:{val:0,size:c}};for(var L in o){var _=0;for(var C in h)C!=="base"&&WM(h[C][L].size)&&(_=h[C][L].size>_?h[C][L].size:_);var M=Math.max(0,a[L]-_);o[L]=Math.max(0,o[L]-M)}for(var v in h){var z=h[v].l||{},T=h[v].b||{},F=z.val,q=z.size,U=T.val,H=T.size,j=r-o.r-o.l,G=n-o.t-o.b;for(var O in h){if(WM(q)&&h[O].r){var W=h[O].r.val,re=h[O].r.size;if(W>F){var ne=(q*W+(re-j)*F)/(W-F),be=(re*(1-F)+(q-j)*(1-W))/(W-F);ne+be>u+l&&(u=ne,l=be)}}if(WM(H)&&h[O].t){var ze=h[O].t.val,Ce=h[O].t.size;if(ze>U){var he=(H*ze+(Ce-G)*U)/(ze-U),te=(Ce*(1-U)+(H-G)*(1-ze))/(ze-U);he+te>c+f&&(c=he,f=te)}}}}}var ke=Wl.constrain(r-a.l-a.r,Vne,p),Ee=Wl.constrain(n-a.t-a.b,Hne,x),Me=Math.max(0,r-ke),Oe=Math.max(0,n-Ee);if(Me){var Re=(u+l)/Me;Re>1&&(u/=Re,l/=Re)}if(Oe){var me=(c+f)/Oe;me>1&&(c/=me,f/=me)}if(i.l=Math.round(u)+o.l,i.r=Math.round(l)+o.r,i.t=Math.round(f)+o.t,i.b=Math.round(c)+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&&(El.didMarginChange(s,i)||Ant(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Be=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};El.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&El.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function l(h,d){if(typeof h=="function")return d?"_function_":null;if(Wl.isPlainObject(h)){var p={},x;return Object.keys(h).sort().forEach(function(E){if(["_","["].indexOf(E.charAt(0))===-1){if(typeof h[E]=="function"){d&&(p[E]="_function");return}if(r==="keepdata"){if(E.substr(E.length-3)==="src")return}else if(r==="keepstream"){if(x=h[E+"src"],typeof x=="string"&&x.indexOf(":")>0&&!Wl.isPlainObject(h.stream))return}else if(r!=="keepall"&&(x=h[E+"src"],typeof x=="string"&&x.indexOf(":")>0))return;p[E]=l(h[E],d)}}),p}var b=Array.isArray(h),y=Wl.isTypedArray(h);if((b||y)&&h.dtype&&h.shape){var k=h.bdata;return l({dtype:h.dtype,shape:h.shape,bdata:Wl.isArrayBuffer(k)?fnt.encode(k):k},d)}return b?h.map(function(E){return l(E,d)}):y?Wl.simpleMap(h,Wl.identity):Wl.isJSDate(h)?Wl.ms2DateTimeLocal(+h):h}var f={data:(o||[]).map(function(h){var d=l(h);return t&&delete d.fit,d})};if(!t&&(f.layout=l(s),i)){var c=s._size;f.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return u&&(f.frames=l(u)),a&&(f.config=l(e._context,!0)),n==="object"?f:JSON.stringify(f)};El.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 Df.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!n&&d===h&&s(c)}}r.runFn(p),setTimeout(p())})}function s(c){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Df.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(c)}function u(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var l=[El.previousPromises,u,r.prepareFn,El.rehover,El.reselect,o],f=Wl.syncOrAsync(l,e);return(!f||!f.then)&&(f=Promise.resolve()),f.then(function(){return e})}El.doCalcdata=function(e,t){var r=Av.list(e),n=e._fullData,i=e._fullLayout,a,o,s,u,l=new Array(n.length),f=(e.calcdata||[]).slice();for(e.calcdata=l,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;u--)if(L[u].enabled){a._indexToPoints=L[u]._indexToPoints;break}o&&o.calc&&(A=o.calc(e,a))}(!Array.isArray(A)||!A[0])&&(A=[{x:Pne,y:Pne}]),A[0].t||(A[0].t={}),A[0].trace=a,l[k]=A}}for(Fne(r,n,i),s=0;s{"use strict";gb.xmlns="http://www.w3.org/2000/xmlns/";gb.svg="http://www.w3.org/2000/svg";gb.xlink="http://www.w3.org/1999/xlink";gb.svgAttrs={xmlns:gb.svg,"xmlns:xlink":gb.xlink}});var Qh=Se((sir,jne)=>{"use strict";jne.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 Bf=Se(b0=>{"use strict";var Dh=Nl(),Tg=Zr(),knt=Tg.strTranslate,gO=Zv(),Cnt=Qh().LINE_SPACING,Lnt=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Lnt),a=Dh.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 u=Hnt(e.node(),n);u&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(u){e.style("display","none");var l=parseInt(e.node().style.fontSize,10),f={fontSize:l};Dnt(i[2],f,function(c,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var p=c&&c.select("svg");if(!p||!p.node()){s(),u();return}var x=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(p.node()),h&&h.node()&&p.node().insertBefore(h.node().cloneNode(!0),p.node().firstChild);var b=d.width,y=d.height;p.attr({class:o,height:y,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",E=p.select("g");E.attr({fill:k,stroke:k});var A=E.node().getBoundingClientRect(),L=A.width,_=A.height;(L>b||_>y)&&(p.style("overflow","hidden"),A=p.node().getBoundingClientRect(),L=A.width,_=A.height);var C=+e.attr("x"),M=+e.attr("y"),v=l||e.node().getBoundingClientRect().height,z=-v/4;if(o[0]==="y")x.attr({transform:"rotate("+[-90,C,M]+")"+knt(-L/2,z-_/2)});else if(o[0]==="l")M=z-_/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,M=z;else{var T=e.attr("text-anchor");C=C-L*(T==="middle"?.5:T==="end"?1:0),M=M+z-_/2}p.attr({x:C,y:M}),r&&r.call(e,x),u(x)})})):s(),e};var znt=/(<|<|<)/g,Pnt=/(>|>|>)/g;function Int(e){return e.replace(znt,"\\lt ").replace(Pnt,"\\gt ")}var Zne=[["$","$"],["\\(","\\)"]];function Dnt(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Tg.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,u=function(){return a=Tg.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:Zne},displayAlign:"left"})},l=function(){a=Tg.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=Zne},f=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},c=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Tg.randstr({},64);s=Dh.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Int(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)Tg.log("There was an error in the tex syntax.",e),r();else{var A=E.getBoundingClientRect(),L;n===2?L=Dh.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,A)}s.remove()},p=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},x=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},y=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(u,f,h,d,p,b):n===3&&(l(),c(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),x(),y()}))}var Jne={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"},Rnt={sub:"0.3em",sup:"-0.6em"},Fnt={sub:"-0.21em",sup:"0.42em"},Xne="\u200B",Yne=["http:","https:","mailto:","",void 0,":"],$ne=b0.NEWLINES=/(\r\n?|\n)/g,xO=/(<[^<>]*>)/,bO=/<(\/?)([^ >]*)(\s+(.*))?>/i,qnt=//i;b0.BR_TAG_ALL=//gi;var Qne=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,eae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,tae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Bnt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function _b(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&jL(n)}var Ont=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(xO),s=[],u="",l=0,f=0;fa?s.push(c.substr(0,x-a)+i):s.push(c.substr(0,x));break}u=""}}return s.join("")};var Nnt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Unt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function jL(e){return e.replace(Unt,function(t,r){var n;return r.charAt(0)==="#"?n=Vnt(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):n=Nnt[r],n||t})}b0.convertEntities=jL;function Vnt(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 Hnt(e,t){t=t.replace($ne," ");var r=!1,n=[],i,a=-1;function o(){a++;var _=document.createElementNS(gO.svg,"tspan");Dh.select(_).attr({class:"line",dy:a*Cnt+"em"}),e.appendChild(_),i=_;var C=n;if(n=[{node:_}],C.length>1)for(var M=1;M.",t);return}var C=n.pop();_!==C.type&&Tg.log("Start tag <"+C.type+"> doesnt match end tag <"+_+">. Pretending it did match.",t),i=n[n.length-1].node}var f=qnt.test(t);f?o():(i=e,n=[{node:e}]);for(var c=t.split(xO),h=0;h{"use strict";var Gnt=Nl(),XL=cd(),ZM=_u(),ZL=Zr(),iae=Pl(),Wnt=sb().isValid;function jnt(e,t,r){var n=t?ZL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(ZL.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function uae(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 cae=VB(),Xnt=cae.FORMAT_LINK,Ynt=cae.DATE_FORMAT_LINK;function Knt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?wO:hae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function wO(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: "+Xnt+"."].join(" ")}function hae(e,t){return wO(e,t)+[" And for dates see: "+Ynt+".","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(" ")}dae.exports={axisHoverFormat:Knt,descriptionOnlyNumbers:wO,descriptionWithDates:hae}});var Rd=Se((cir,Lae)=>{"use strict";var pae=uc(),w3=Ih(),Cae=Id().dash,AO=vu().extendFlat,vae=_f().templatedArray,yae=Gc().descriptionWithDates,Jnt=ju().ONEDAY,vm=dd(),$nt=vm.HOUR_PATTERN,Qnt=vm.WEEKDAY_PATTERN,TO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},eat=AO({},TO,{values:TO.values.slice().concat(["sync"])});function mae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var gae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},_ae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},xae={valType:"data_array",editType:"ticks"},bae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function wae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Tae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Aae={valType:"color",dflt:w3.defaultLine,editType:"ticks"},Sae={valType:"color",dflt:w3.lightLine,editType:"ticks"};function Mae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Eae=AO({},Cae,{editType:"ticks"}),kae={valType:"boolean",editType:"ticks"};Lae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:pae({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"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[vm.idRegex.x.toString(),vm.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:[vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"calc"},rangebreaks:vae("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:[Qnt,$nt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Jnt},editType:"calc"}),tickmode:eat,nticks:mae(),tick0:gae,dtick:_ae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:xae,ticktext:{valType:"data_array",editType:"ticks"},ticks:bae,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:wae(),tickwidth:Tae(),tickcolor:Aae,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:AO({},Cae,{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:pae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:yae("tick label")},tickformatstops:vae("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")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:kae,gridcolor:Sae,gridwidth:Mae(),griddash:Eae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",vm.idRegex.x.toString(),vm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:TO,nticks:mae("minor"),tick0:gae,dtick:_ae,tickvals:xae,ticks:bae,ticklen:wae("minor"),tickwidth:Tae("minor"),tickcolor:Aae,gridcolor:Sae,gridwidth:Mae("minor"),griddash:Eae,showgrid:kae,editType:"ticks"},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 YL=Se((hir,Iae)=>{"use strict";var Nc=Rd(),zae=uc(),Pae=vu().extendFlat,tat=_c().overrideAll;Iae.exports=tat({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:Nc.linecolor,outlinewidth:Nc.linewidth,bordercolor:Nc.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Nc.minor.tickmode,nticks:Nc.nticks,tick0:Nc.tick0,dtick:Nc.dtick,tickvals:Nc.tickvals,ticktext:Nc.ticktext,ticks:Pae({},Nc.ticks,{dflt:""}),ticklabeloverflow:Pae({},Nc.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:Nc.ticklen,tickwidth:Nc.tickwidth,tickcolor:Nc.tickcolor,ticklabelstep:Nc.ticklabelstep,showticklabels:Nc.showticklabels,labelalias:Nc.labelalias,tickfont:zae({}),tickangle:Nc.tickangle,tickformat:Nc.tickformat,tickformatstops:Nc.tickformatstops,tickprefix:Nc.tickprefix,showtickprefix:Nc.showtickprefix,ticksuffix:Nc.ticksuffix,showticksuffix:Nc.showticksuffix,separatethousands:Nc.separatethousands,exponentformat:Nc.exponentformat,minexponent:Nc.minexponent,showexponent:Nc.showexponent,title:{text:{valType:"string"},font:zae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Xf=Se((pir,Rae)=>{"use strict";var rat=YL(),iat=n3().counter,nat=X1(),Dae=sb().scales,dir=nat(Dae);function KL(e){return"`"+e+"`"}Rae.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"?Dae[r.colorscaleDflt]:null,u=r.editTypeOverride||"",l=t?t+".":"",f,c;"colorAttr"in r?(f=r.colorAttr,c=r.colorAttr):(f={z:"z",c:"color"}[n],c="in "+KL(l+f));var h=i?" Has an effect only if "+c+" is set to a numerical array.":"",d=n+"auto",p=n+"min",x=n+"max",b=n+"mid",y=KL(l+d),k=KL(l+p),E=KL(l+x),A=k+" and "+E,L={};L[p]=L[x]=void 0;var _={};_[d]=!1;var C={};return f==="color"&&(C.color={valType:"color",arrayOk:!0,editType:u||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[p]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},C[x]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},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=rat),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:iat("coloraxis"),dflt:null,editType:"calc"}),C}});var MO=Se((vir,Fae)=>{"use strict";var aat=vu().extendFlat,oat=Xf(),SO=sb().scales;Fae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:SO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:SO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:SO.RdBu,editType:"calc"}},coloraxis:aat({_isSubplotObj:!0,editType:"calc"},oat("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var EO=Se((yir,qae)=>{"use strict";var sat=Zr();qae.exports=function(t){return sat.isPlainObject(t.colorbar)}});var LO=Se(CO=>{"use strict";var kO=_u(),Bae=Zr(),Oae=ju(),lat=Oae.ONEDAY,uat=Oae.ONEWEEK;CO.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?lat:1;if(!e)return a;if(kO(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.substr(1);return s=kO(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};CO.tick0=function(e,t,r,n){if(t==="date")return Bae.cleanDate(e,Bae.dateTick0(r,n%uat===0?1:0));if(!(n==="D1"||n==="D2"))return kO(e)?Number(e):0}});var xb=Se((gir,Uae)=>{"use strict";var Nae=LO(),fat=Zr().isArrayOrTypedArray,cat=yp().isTypedArraySpec,hat=yp().decodeTypedArraySpec;Uae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,u=o?r.minor:r,l=o?"minor.":"";function f(k){var E=s[k];return cat(E)&&(E=hat(E)),E!==void 0?E:(u._template||{})[k]}var c=f("tick0"),h=f("dtick"),d=f("tickvals"),p=fat(d)?"array":h?"linear":"auto",x=n(l+"tickmode",p);if(x==="auto"||x==="sync")n(l+"nticks");else if(x==="linear"){var b=u.dtick=Nae.dtick(h,i);u.tick0=Nae.tick0(c,i,r.calendar,b)}else if(i!=="multicategory"){var y=n(l+"tickvals");y===void 0?u.tickmode="auto":o||n("ticktext")}}});var T3=Se((_ir,Hae)=>{"use strict";var zO=Zr(),Vae=Rd();Hae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,u=a?Vae.minor:Vae,l=a?"minor.":"",f=zO.coerce2(o,s,u,"ticklen",a?(r.ticklen||5)*.6:void 0),c=zO.coerce2(o,s,u,"tickwidth",a?r.tickwidth||1:void 0),h=zO.coerce2(o,s,u,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(l+"ticks",!a&&i.outerTicks||f||c||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var PO=Se((xir,Gae)=>{"use strict";Gae.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 Jd=Se((bir,Wae)=>{"use strict";var JL=Zr(),dat=_f();Wae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=JL.isArrayOrTypedArray(t[i])?t[i]:[],u=r[i]=[],l=dat.arrayTemplater(r,i,a),f,c;for(f=0;f{"use strict";var IO=Zr(),pat=Pl().contrast,jae=Rd(),vat=PO(),yat=Jd();Zae.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");IO.isPlainObject(o)||delete r.labelalias;var s=vat(t),u=n("showticklabels");if(u){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var l=a.font||{},f=r.color,c=r.ticklabelposition||"",h=c.indexOf("inside")!==-1?pat(a.bgColor):f&&f!==jae.color.dflt?f:l.color;if(IO.coerceFont(n,"tickfont",l,{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 p=n("tickformat");yat(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:mat}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!p&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function mat(e,t){function r(i,a){return IO.coerce(e,t,jae.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var t_=Se((Tir,Xae)=>{"use strict";var gat=PO();Xae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=gat(t),u=n("tickprefix");u&&n("showtickprefix",s);var l=n("ticksuffix",o);l&&n("showticksuffix",s)}});var DO=Se((Air,Yae)=>{"use strict";var r_=Zr(),_at=_f(),xat=xb(),bat=T3(),wat=e_(),Tat=t_(),Aat=YL();Yae.exports=function(t,r,n){var i=_at.newContainer(r,"colorbar"),a=t.colorbar||{};function o(T,F){return r_.coerce(a,i,Aat,T,F)}var s=n.margin||{t:0,b:0,l:0,r:0},u=n.width-s.l-s.r,l=n.height-s.t-s.b,f=o("orientation"),c=f==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(c?u:l):30);var d=o("lenmode");o("len",d==="fraction"?1:c?l:u);var p=o("yref"),x=o("xref"),b=p==="paper",y=x==="paper",k,E,A,L="left";c?(A="middle",L=y?"left":"right",k=y?1.02:1,E=.5):(A=b?"bottom":"top",L="center",k=.5,E=b?1.02:1),r_.coerce(a,i,{x:{valType:"number",min:y?-2:0,max:y?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",A),o("ypad"),r_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var _=r_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:c?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",_.indexOf("inside")!==-1?"hide past domain":"hide past div"),xat(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};_.indexOf("inside")!==-1&&(M.bgColor="black"),Tat(a,i,o,"linear",M),wat(a,i,o,"linear",M),bat(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var v=i.showticklabels?i.tickfont:C,z=r_.extendFlat({},C,{family:v.family,size:r_.bigFont(v.size)});r_.coerceFont(o,"title.font",z),o("title.side",c?"top":"right")}});var ed=Se((Sir,$ae)=>{"use strict";var Kae=_u(),FO=Zr(),Sat=EO(),Mat=DO(),Jae=sb().isValid,Eat=Ul().traceIs;function RO(e,t){var r=t.slice(0,t.length-1);return t?FO.nestedProperty(e,r).get()||{}:e}$ae.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,u="_module"in r,l=RO(t,o),f=RO(r,o),c=RO(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(u){var d=n._colorAxes||{},p=i(o+"coloraxis");if(p){var x=Eat(r,"contour")&&FO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[p];b?(b[2].push(h),b[0]!==x&&(b[0]=!1,FO.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[x,r,[h]];return}}var y=l[s+"min"],k=l[s+"max"],E=Kae(y)&&Kae(k)&&y{"use strict";var Qae=Zr(),kat=_f(),eoe=MO(),Cat=ed();toe.exports=function(t,r){function n(c,h){return Qae.coerce(t,r,eoe,c,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(c,h){return Qae.coerce(a,o,eoe.coloraxis,c,h)}for(var u in i){var l=i[u];if(l[0])a=t[u]||{},o=kat.newContainer(r,u,"coloraxis"),o._name=u,Cat(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var f=0;f{"use strict";var Lat=Zr(),zat=Dp().hasColorscale,Pat=Dp().extractOpts;ioe.exports=function(t,r){function n(f,c){var h=f["_"+c];h!==void 0&&(f[c]=h)}function i(f,c){var h=c.container?Lat.nestedProperty(f,c.container).get():f;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Pat(h),p=d.auto;(p||d.min===void 0)&&n(h,c.min),(p||d.max===void 0)&&n(h,c.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a{"use strict";var aoe=_u(),qO=Zr(),Iat=Dp().extractOpts;ooe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?qO.nestedProperty(r,o).get():r,u=Iat(s),l=u.auto!==!1,f=u.min,c=u.max,h=u.mid,d=function(){return qO.aggNums(Math.min,null,a)},p=function(){return qO.aggNums(Math.max,null,a)};if(f===void 0?f=d():l&&(s._colorAx&&aoe(f)?f=Math.min(f,d()):f=d()),c===void 0?c=p():l&&(s._colorAx&&aoe(c)?c=Math.max(c,p()):c=p()),l&&h!==void 0&&(c-h>h-f?f=h-(c-h):c-h=0?x=i.colorscale.sequential:x=i.colorscale.sequentialminus,u._sync("colorscale",x)}}});var fc=Se((Cir,soe)=>{"use strict";var $L=sb(),A3=Dp();soe.exports={moduleType:"component",name:"colorscale",attributes:Xf(),layoutAttributes:MO(),supplyLayoutDefaults:roe(),handleDefaults:ed(),crossTraceDefaults:noe(),calc:Rp(),scales:$L.scales,defaultScale:$L.defaultScale,getScale:$L.get,isValidScale:$L.isValid,hasColorscale:A3.hasColorscale,extractOpts:A3.extractOpts,extractScale:A3.extractScale,flipScale:A3.flipScale,makeColorScaleFunc:A3.makeColorScaleFunc,makeColorScaleFuncFromTrace:A3.makeColorScaleFuncFromTrace}});var ec=Se((Lir,uoe)=>{"use strict";var loe=Zr(),Dat=yp().isTypedArraySpec;uoe.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 loe.isPlainObject(t)&&(loe.isArrayOrTypedArray(t.size)||Dat(t.size))}}});var S3=Se((zir,foe)=>{"use strict";var Rat=_u();foe.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 u=o(s/r);return Rat(u)&&u>0?Math.max(u,a):0}}});var rv=Se(mp=>{"use strict";var coe=Zr();mp.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mp.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{poe.exports=Nat;var BO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Oat=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Nat(e){var t=[];return e.replace(Oat,function(r,n,i){var a=n.toLowerCase();for(i=Vat(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==BO[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var Hat=XM(),ll=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},Zu="M0,0Z",voe=Math.sqrt(2),i_=Math.sqrt(3),OO=Math.PI,NO=Math.cos,UO=Math.sin;xoe.exports={circle:{n:0,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Yu(t,r,i):i}},square:{n:1,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.3,2);return Yu(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.4,2),i=ll(e*1.2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*.8/voe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Yu(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(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2/i_,2),i=ll(e/2,2),a=ll(e,2);return Yu(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.6,2),i=ll(e*1.2,2);return Yu(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.951,2),i=ll(e*.588,2),a=ll(-e,2),o=ll(e*-.309,2),s=ll(e*.809,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/2,2),a=ll(e*i_/2,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/2,2),a=ll(e*i_/2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*.924,2),i=ll(e*.383,2);return Yu(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(Xu(t))return Zu;var n=e*1.4,i=ll(n*.225,2),a=ll(n*.951,2),o=ll(n*.363,2),s=ll(n*.588,2),u=ll(-n,2),l=ll(n*-.309,2),f=ll(n*.118,2),c=ll(n*.809,2),h=ll(n*.382,2);return Yu(t,r,"M"+i+","+l+"H"+a+"L"+o+","+f+"L"+s+","+c+"L0,"+h+"L-"+s+","+c+"L-"+o+","+f+"L-"+a+","+l+"H-"+i+"L0,"+u+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*.66,2),i=ll(e*.38,2),a=ll(e*.76,2);return Yu(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(Xu(t))return Zu;var n=ll(e*i_*.8,2),i=ll(e*.8,2),a=ll(e*1.6,2),o=ll(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*i_*.8,2),i=ll(e*.8,2),a=ll(e*1.6,2),o=ll(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*1.1,2),i=ll(e*2,2),a="A "+i+","+i+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2),i=ll(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return Yu(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(Xu(t))return Zu;var n=ll(e*.7,2),i=ll(e*1.4,2);return Yu(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.4,2),i=ll(e*.7,2);return Yu(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e/voe,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.3,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.3,2),i=ll(e*.65,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*.85,2);return Yu(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(Xu(t))return Zu;var n=ll(e/2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.2,2),i=ll(e*1.6,2),a=ll(e*.8,2);return Yu(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(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*1.4,2);return Yu(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2);return Yu(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(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(Xu(t))return Zu;var n=ll(e,2),i=ll(e*2,2);return Yu(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(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=ll(e*2,2),i=ll(e,2);return Yu(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(Xu(t))return Zu;var n=OO/2.5,i=2*e*NO(n),a=2*e*UO(n);return Yu(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Xu(t))return Zu;var n=OO/4,i=2*e*NO(n),a=2*e*UO(n);return Yu(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function Xu(e){return e===null}var yoe,moe,goe,_oe;function Yu(e,t,r){if((!e||e%360===0)&&!t)return r;if(goe===e&&_oe===t&&yoe===r)return moe;goe=e,_oe=t,yoe=r;function n(b,y){var k=NO(b),E=UO(b),A=y[0],L=y[1]+(t||0);return[A*k-L*E,A*E+L*k]}for(var i=e/180*OO,a=0,o=0,s=Hat(r),u="",l=0;l{"use strict";var pd=Nl(),rc=Zr(),Gat=rc.numberFormat,Ab=_u(),ZO=cd(),ez=Ul(),$d=Pl(),Wat=fc(),KM=rc.strTranslate,tz=Bf(),jat=Zv(),Zat=Qh(),Xat=Zat.LINE_SPACING,zoe=N1().DESELECTDIM,Yat=ec(),Kat=S3(),Jat=rv().appendArrayPointValue,ml=Uoe.exports={};ml.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,u=t.shadow,l=t.lineposition,f=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call($d.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",VO(Qat(f))),u&&e.style("text-shadow",u==="auto"?tz.makeTextShadow($d.contrast(a)):VO(u)),l&&e.style("text-decoration-line",VO(eot(l)))};function VO(e){return e==="none"?void 0:e}var $at={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function Qat(e){return $at[e]}function eot(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ml.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};ml.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};ml.setRect=function(e,t,r,n,i){e.call(ml.setPosition,t,r).call(ml.setSize,n,i)};ml.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Ab(i)&&Ab(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",KM(i,a));else return!1;return!0};ml.translatePoints=function(e,t,r){e.each(function(n){var i=pd.select(this);ml.translatePoint(n,i,t,r)})};ml.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};ml.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,u=ez.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each(function(l){ml.hideOutsideRangePoint(l,pd.select(this),r,n,o,s)})})}};ml.crispRound=function(e,t,r){return!t||!Ab(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};ml.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||"";$d.stroke(t,n||a.color),ml.dashLine(t,s,o)};ml.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||"";pd.select(this).call($d.stroke,r||a.color).call(ml.dashLine,s,o)})};ml.dashLine=function(e,t,r){r=+r||0,t=ml.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};ml.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 Poe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&ml.getPatternAttr(i.shape,0,"");if(o){var s=ml.getPatternAttr(i.bgcolor,0,null),u=ml.getPatternAttr(i.fgcolor,0,null),l=i.fgopacity,f=ml.getPatternAttr(i.size,0,8),c=ml.getPatternAttr(i.solidity,0,.3),h=t.uid;ml.pattern(e,"point",r,h,o,f,c,void 0,i.fillmode,s,u,l)}else if(a&&a.type!=="none"){var d=a.type,p="scatterfill-"+t.uid;if(n&&(p="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var x,b;d==="horizontal"?(x={x:a.start,y:0},b={x:a.stop,y:0}):d==="vertical"&&(x={x:0,y:a.start},b={x:0,y:a.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.max[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.max[0].val:b.y,!0),e.call(Roe,r,p,"linear",a.colorscale,"fill",x,b,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(ml.gradient,r,p,d,a.colorscale,"fill")}else t.fillcolor&&e.call($d.fill,t.fillcolor)}ml.singleFillStyle=function(e,t){var r=pd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Poe(e,i,t,!1)};ml.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=pd.select(this);n[0].trace&&Poe(i,n[0].trace,t,r)})};var woe=boe();ml.symbolNames=[];ml.symbolFuncs=[];ml.symbolBackOffs=[];ml.symbolNeedLines={};ml.symbolNoDot={};ml.symbolNoFill={};ml.symbolList=[];Object.keys(woe).forEach(function(e){var t=woe[e],r=t.n;ml.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),ml.symbolNames[r]=e,ml.symbolFuncs[r]=t.f,ml.symbolBackOffs[r]=t.backoff||0,t.needLine&&(ml.symbolNeedLines[r]=!0),t.noDot?ml.symbolNoDot[r]=!0:ml.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(ml.symbolNoFill[r]=!0)});var tot=ml.symbolNames.length,rot="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ml.symbolNumber=function(e){if(Ab(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=ml.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=tot||e>=400?0:Math.floor(Math.max(e,0))};function Ioe(e,t,r,n){var i=e%100;return ml.symbolFuncs[i](t,r,n)+(e>=200?rot:"")}var Toe=Gat("~f"),Doe={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}};ml.gradient=function(e,t,r,n,i,a){var o=Doe[n];return Roe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Roe(e,t,r,n,i,a,o,s,u,l){var f=i.length,c;n==="linear"?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:u?"userSpaceOnUse":"objectBoundingBox"},reversed:l}:n==="radial"&&(c={node:"radialGradient",reversed:l});for(var h=new Array(f),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 u;e.ms==="various"||o.size==="various"?u=3:u=n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var l=ml.symbolNumber(e.mx||o.symbol)||0;e.om=l%200>=100;var f=KO(e,r),c=YO(e,r);t.attr("d",Ioe(l,u,f,c))}var h=!1,d,p,x;if(e.so)x=s.outlierwidth,p=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;x=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):rc.isArrayOrTypedArray(s.color)?p=$d.defaultLine:p=s.color,rc.isArrayOrTypedArray(o.color)&&(d=$d.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($d.stroke,d).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var y=o.gradient,k=e.mgt;k?h=!0:k=y&&y.type,rc.isArrayOrTypedArray(k)&&(k=k[0],Doe[k]||(k=0));var E=o.pattern,A=E&&ml.getPatternAttr(E.shape,e.i,"");if(k&&k!=="none"){var L=e.mgc;L?h=!0:L=y.color;var _=r.uid;h&&(_+="-"+e.i),ml.gradient(t,i,_,k,[[0,L],[1,d]],"fill")}else if(A){var C=!1,M=E.fgcolor;!M&&a&&a.color&&(M=a.color,C=!0);var v=ml.getPatternAttr(M,e.i,a&&a.color||null),z=ml.getPatternAttr(E.bgcolor,e.i,null),T=E.fgopacity,F=ml.getPatternAttr(E.size,e.i,8),q=ml.getPatternAttr(E.solidity,e.i,.3);C=C||e.mcc||rc.isArrayOrTypedArray(E.shape)||rc.isArrayOrTypedArray(E.bgcolor)||rc.isArrayOrTypedArray(E.fgcolor)||rc.isArrayOrTypedArray(E.size)||rc.isArrayOrTypedArray(E.solidity);var U=r.uid;C&&(U+="-"+e.i),ml.pattern(t,"point",i,U,A,F,q,e.mcc,E.fillmode,z,v,T)}else rc.isArrayOrTypedArray(d)?$d.fill(t,d[e.i]):$d.fill(t,d);x&&$d.stroke(t,p)}};ml.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=ml.tryColorscale(r,""),t.lineScale=ml.tryColorscale(r,"line"),ez.traceIs(e,"symbols")&&(t.ms2mrc=Yat.isBubble(e)?Kat(e):function(){return(r.size||6)/2}),e.selectedpoints&&rc.extendFlat(t,ml.makeSelectedPointStyleFns(e)),t};ml.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,u=a.opacity,l=o.opacity,f=u!==void 0,c=l!==void 0;(rc.isArrayOrTypedArray(s)||f||c)&&(t.selectedOpacityFn=function(A){var L=A.mo===void 0?i.opacity:A.mo;return A.selected?f?u:L:c?l:zoe*L});var h=i.color,d=a.color,p=o.color;(d||p)&&(t.selectedColorFn=function(A){var L=A.mcc||h;return A.selected?d||L:p||L});var x=i.size,b=a.size,y=o.size,k=b!==void 0,E=y!==void 0;return ez.traceIs(e,"symbols")&&(k||E)&&(t.selectedSizeFn=function(A){var L=A.mrc||x/2;return A.selected?k?b/2:L:E?y/2:L}),t};ml.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,u=a.color,l=o.color;return t.selectedTextColorFn=function(f){var c=f.tc||s;return f.selected?u||c:l||(u?c:$d.addOpacity(c,zoe))},t};ml.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ml.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){$d.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,u=r.selectedSizeFn(o);a.attr("d",Ioe(ml.symbolNumber(s),u,KO(o,t),YO(o,t))),o.mrc2=u}),i.length&&e.each(function(a){for(var o=pd.select(this),s=0;s0?r:0}ml.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=ml.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var u=pd.select(this),l=a?rc.extractOption(s,t,"txt","texttemplate"):rc.extractOption(s,t,"tx","text");if(!l&&l!==0){u.remove();return}if(a){var f=t._module.formatLabels,c=f?f(s,t,o):{},h={};Jat(h,t,s.i);var d=t._meta||{};l=rc.texttemplateString(l,c,o._d3locale,h,s,d)}var p=s.tp||t.textposition,x=qoe(s,t),b=n?n(s):s.tc||t.textfont.color;u.call(ml.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:x,color:b}).text(l).call(tz.convertToTspans,r).call(Foe,p,x,s.mrc)})}};ml.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ml.makeSelectedTextStyleFns(t);e.each(function(n){var i=pd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=qoe(n,t);$d.fill(i,a);var u=ez.traceIs(t,"bar-like");Foe(i,o,s,n.mrc2||n.mrc,u)})}};var Aoe=.5;ml.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i=u||A>=f&&A<=u)&&(L<=c&&L>=l||L>=c&&L<=l)&&(e=[A,L])}return e}ml.applyBackoff=Noe;ml.makeTester=function(){var e=rc.ensureSingleById(pd.select("body"),"svg","js-plotly-tester",function(r){r.attr(jat.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=rc.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ml.tester=e,ml.testref=t};ml.savedBBoxes={};var GO=0,aot=1e4;ml.bBox=function(e,t,r){r||(r=Soe(e));var n;if(r){if(n=ml.savedBBoxes[r],n)return rc.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Soe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var u=ml.bBox(i,!1,r);return a&&(u.left+=a,u.right+=a),o&&(u.top+=o,u.bottom+=o),u}if(r+="~"+a+"~"+o+"~"+s,n=ml.savedBBoxes[r],n)return rc.extendFlat({},n)}}var l,f;t?l=e:(f=ml.tester.node(),l=e.cloneNode(!0),f.appendChild(l)),pd.select(l).attr("transform",null).call(tz.positionText,0,0);var c=l.getBoundingClientRect(),h=ml.testref.node().getBoundingClientRect();t||f.removeChild(l);var d={height:c.height,width:c.width,left:c.left-h.left,top:c.top-h.top,right:c.right-h.left,bottom:c.bottom-h.top};return GO>=aot&&(ml.savedBBoxes={},GO=0),r&&(ml.savedBBoxes[r]=d),GO++,rc.extendFlat({},d)};function Soe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ml.setClipUrl=function(e,t,r){e.attr("clip-path",XO(t,r))};function XO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}ml.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}};ml.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+=KM(t,r),o=o.trim(),e[a]("transform",o),o};ml.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}};ml.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 oot=/\s*sc.*/;ml.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(oot,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var sot=/translate\([^)]*\)\s*$/;ml.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=pd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),u=(i.attr("transform")||"").match(sot);t===1&&r===1?n=[]:n=[KM(o,s),"scale("+t+","+r+")",KM(-o,-s)],u&&n.push(u),i.attr("transform",n.join(""))}})};function YO(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}ml.getMarkerStandoff=YO;var YM=Math.atan2,bb=Math.cos,E3=Math.sin;function Moe(e,t){var r=t[0],n=t[1];return[r*bb(e)-n*E3(e),r*E3(e)+n*bb(e)]}var Eoe,koe,Coe,Loe,WO,jO;function KO(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||rc.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,u=t._yA;if(s&&u)n=s.c2p(e.x),i=u.c2p(e.y);else return 90}if(t._geo){var l=e.lonlat[0],f=e.lonlat[1],c=t._geo.project([l,f+1e-5]),h=t._geo.project([l+1e-5,f]),d=YM(h[1]-i,h[0]-n),p=YM(c[1]-i,c[0]-n),x;if(a==="north")x=r/180*Math.PI;else if(a==="previous"){var b=l/180*Math.PI,y=f/180*Math.PI,k=Eoe/180*Math.PI,E=koe/180*Math.PI,A=k-b,L=bb(E)*E3(A),_=E3(E)*bb(y)-bb(E)*E3(y)*bb(A);x=-YM(L,_)-Math.PI,Eoe=l,koe=f}var C=Moe(d,[bb(x),0]),M=Moe(p,[E3(x),0]);r=YM(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(jO===t.uid&&e.i===WO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(jO===t.uid&&e.i===WO+1&&Ab(n)&&Ab(i)){var v=n-Coe,z=i-Loe,T=t.line&&t.line.shape||"",F=T.slice(T.length-1);F==="h"&&(z=0),F==="v"&&(v=0),r+=YM(z,v)/Math.PI*180+90}else r=null}return Coe=n,Loe=i,WO=e.i,jO=t.uid,r}ml.getMarkerAngle=KO});var Mb=Se((Fir,Woe)=>{"use strict";var k3=Nl(),lot=_u(),uot=Sc(),JO=Ul(),Sb=Zr(),Voe=Sb.strTranslate,rz=yu(),iz=Pl(),C3=Bf(),Hoe=N1(),fot=Qh().OPPOSITE_SIDE,Goe=/ [XY][0-9]* /,$O=1.6,QO=1.6;function cot(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,u=r.avoid||{},l=r.attributes,f=r.transform,c=r.containerGroup,h=1,d=i.title,p=(d&&d.text?d.text:"").trim(),x=!1,b=d&&d.font?d.font:{},y=b.family,k=b.size,E=b.color,A=b.weight,L=b.style,_=b.variant,C=b.textcase,M=b.lineposition,v=b.shadow,z=r.subtitlePropName,T=!!z,F=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},U=q.text.trim(),H=!1,j=1,G=q.font,O=G.family,W=G.size,re=G.color,ne=G.weight,be=G.style,ze=G.variant,Ce=G.textcase,he=G.lineposition,te=G.shadow,ke;a==="title.text"?ke="titleText":a.indexOf("axis")!==-1?ke="axisTitleText":a.indexOf("colorbar"!==-1)&&(ke="colorbarTitleText");var Ee=e._context.edits[ke];function Me(xt,_t){return xt===void 0||_t===void 0?!1:xt.replace(Goe," % ")===_t.replace(Goe," % ")}p===""?h=0:Me(p,o)&&(Ee||(p=""),h=.2,x=!0),T&&(U===""?j=0:Me(U,F)&&(Ee||(U=""),j=.2,H=!0)),r._meta?p=Sb.templateString(p,r._meta):n._meta&&(p=Sb.templateString(p,n._meta));var Oe=p||U||Ee,Re;c||(c=Sb.ensureSingle(n._infolayer,"g","g-"+t),Re=n._hColorbarMoveTitle);var me=c.selectAll("text."+t).data(Oe?[0]:[]);me.enter().append("text"),me.text(p).attr("class",t),me.exit().remove();var Be=null,fe=t+"-subtitle",Ze=U||Ee;if(T&&Ze&&(Be=c.selectAll("text."+fe).data(Ze?[0]:[]),Be.enter().append("text"),Be.text(U).attr("class",fe),Be.exit().remove()),!Oe)return c;function et(xt,_t){Sb.syncOrAsync([gt,Pt],{title:xt,subtitle:_t})}function gt(xt){var _t=xt.title,Ct=xt.subtitle,jt;!f&&Re&&(f={}),f?(jt="",f.rotate&&(jt+="rotate("+[f.rotate,l.x,l.y]+")"),(f.offset||Re)&&(jt+=Voe(0,(f.offset||0)-(Re||0)))):jt=null,_t.attr("transform",jt);function At(je){if(je){var tt=k3.select(je.node().parentNode).select("."+fe);if(!tt.empty()){var Je=je.node().getBBox();if(Je.height){var Mt=Je.y+Je.height+$O*W;tt.attr("y",Mt)}}}}if(_t.style("opacity",h*iz.opacity(E)).call(rz.font,{color:iz.rgb(E),size:k3.round(k,2),family:y,weight:A,style:L,variant:_,textcase:C,shadow:v,lineposition:M}).attr(l).call(C3.convertToTspans,e,At),Ct){var Te=c.select("."+t+"-math-group"),nt=_t.node().getBBox(),ut=Te.node()?Te.node().getBBox():void 0,ct=ut?ut.y+ut.height+$O*W:nt.y+nt.height+QO*W,rt=Sb.extendFlat({},l,{y:ct});Ct.attr("transform",jt),Ct.style("opacity",j*iz.opacity(re)).call(rz.font,{color:iz.rgb(re),size:k3.round(W,2),family:O,weight:ne,style:be,variant:ze,textcase:Ce,shadow:te,lineposition:he}).attr(rt).call(C3.convertToTspans,e)}return uot.previousPromises(e)}function Pt(xt){var _t=xt.title,Ct=k3.select(_t.node().parentNode);if(u&&u.selection&&u.side&&p){Ct.attr("transform",null);var jt=fot[u.side],At=u.side==="left"||u.side==="top"?-1:1,Te=lot(u.pad)?u.pad:2,nt=rz.bBox(Ct.node()),ut={t:0,b:0,l:0,r:0},ct=e._fullLayout._reservedMargin;for(var rt in ct)for(var je in ct[rt]){var tt=ct[rt][je];ut[je]=Math.max(ut[je],tt)}var Je={left:ut.l,top:ut.t,right:n.width-ut.r,bottom:n.height-ut.b},Mt=u.maxShift||At*(Je[u.side]-nt[u.side]),Vt=0;if(Mt<0)Vt=Mt;else{var Kt=u.offsetLeft||0,ir=u.offsetTop||0;nt.left-=Kt,nt.right-=Kt,nt.top-=ir,nt.bottom-=ir,u.selection.each(function(){var Ot=rz.bBox(this);Sb.bBoxIntersect(nt,Ot,Te)&&(Vt=Math.max(Vt,At*(Ot[u.side]-nt[jt])+Te))}),Vt=Math.min(Mt,Vt),i._titleScoot=Math.abs(Vt)}if(Vt>0||Mt<0){var fr={left:[-Vt,0],right:[Vt,0],top:[0,-Vt],bottom:[0,Vt]}[u.side];Ct.attr("transform",Voe(fr[0],fr[1]))}}}me.call(et,Be);function Qe(xt,_t){xt.text(_t).on("mouseover.opacity",function(){k3.select(this).transition().duration(Hoe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k3.select(this).transition().duration(Hoe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(p?me.on(".opacity",null):(Qe(me,o),x=!0),me.call(C3.makeEditable,{gd:e}).on("edit",function(xt){s!==void 0?JO.call("_guiRestyle",e,a,xt,s):JO.call("_guiRelayout",e,a,xt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(et)}).on("input",function(xt){this.text(xt||" ").call(C3.positionText,l.x,l.y)}),T)){if(T&&!p){var Xe=me.node().getBBox(),Tt=Xe.y+Xe.height+QO*W;Be.attr("y",Tt)}U?Be.on(".opacity",null):(Qe(Be,F),H=!0),Be.call(C3.makeEditable,{gd:e}).on("edit",function(xt){JO.call("_guiRelayout",e,"title.subtitle.text",xt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(et)}).on("input",function(xt){this.text(xt||" ").call(C3.positionText,Be.attr("x"),Be.attr("y"))})}return me.classed("js-placeholder",x),Be&&Be.classed("js-placeholder",H),c}Woe.exports={draw:cot,SUBTITLE_PADDING_EM:QO,SUBTITLE_PADDING_MATHJAX_EM:$O}});var gm=Se((qir,Koe)=>{"use strict";var hot=Nl(),dot=e3().utcFormat,xc=Zr(),pot=xc.numberFormat,ym=_u(),n_=xc.cleanNumber,vot=xc.ms2DateTime,joe=xc.dateTime2ms,mm=xc.ensureNumber,Zoe=xc.isArrayOrTypedArray,a_=ju(),nz=a_.FP_SAFE,by=a_.BADNUM,yot=a_.LOG_CLIP,mot=a_.ONEWEEK,az=a_.ONEDAY,oz=a_.ONEHOUR,Xoe=a_.ONEMIN,Yoe=a_.ONESEC,sz=$c(),fz=dd(),lz=fz.HOUR_PATTERN,uz=fz.WEEKDAY_PATTERN;function JM(e){return Math.pow(10,e)}function eN(e){return e!=null}Koe.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(A,L){if(A>0)return Math.log(A)/Math.LN10;if(A<=0&&L&&t.range&&t.range.length===2){var _=t.range[0],C=t.range[1];return .5*(_+C-2*yot*Math.abs(_-C))}else return by}function o(A,L,_,C){if((C||{}).msUTC&&ym(A))return+A;var M=joe(A,_||t.calendar);if(M===by)if(ym(A)){A=+A;var v=Math.floor(xc.mod(A+.05,1)*10),z=Math.round(A-v/10);M=joe(new Date(z))+v/10}else return by;return M}function s(A,L,_){return vot(A,L,_||t.calendar)}function u(A){return t._categories[Math.round(A)]}function l(A){if(eN(A)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[A]!==void 0)return t._categoriesMap[A];t._categories.push(typeof A=="number"?String(A):A);var L=t._categories.length-1;return t._categoriesMap[A]=L,L}return by}function f(A,L){for(var _=new Array(L),C=0;Ct.range[1]&&(_=!_);for(var C=_?-1:1,M=C*A,v=0,z=0;zF)v=z+1;else{v=M<(T+F)/2?z:z+1;break}}var q=t._B[v]||0;return isFinite(q)?p(A,t._m2,q):0},y=function(A){var L=t._rangebreaks.length;if(!L)return x(A,t._m,t._b);for(var _=0,C=0;Ct._rangebreaks[C].pmax&&(_=C+1);return x(A,t._m2,t._B[_])}}t.c2l=t.type==="log"?a:mm,t.l2c=t.type==="log"?JM:mm,t.l2p=b,t.p2l=y,t.c2p=t.type==="log"?function(A,L){return b(a(A,L))}:b,t.p2c=t.type==="log"?function(A){return JM(y(A))}:y,["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(A){return t.l2p(n_(A))},t.p2d=t.p2r=y,t.cleanPos=mm):t.type==="log"?(t.d2r=t.d2l=function(A,L){return a(n_(A),L)},t.r2d=t.r2c=function(A){return JM(n_(A))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=JM,t.d2p=function(A,L){return t.l2p(t.d2r(A,L))},t.p2d=function(A){return JM(y(A))},t.r2p=function(A){return t.l2p(n_(A))},t.p2r=y,t.cleanPos=mm):t.type==="date"?(t.d2r=t.r2d=xc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(A,L,_){return t.l2p(o(A,0,_))},t.p2d=t.p2r=function(A,L,_){return s(y(A),L,_)},t.cleanPos=function(A){return xc.cleanDate(A,by,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=l,t.r2d=t.c2d=t.l2d=u,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=d(A);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=mm,t.r2l=d,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return u(y(A))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(A){return typeof A=="string"&&A!==""?A:mm(A)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=u,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=h(A);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=c,t.l2r=t.c2r=mm,t.r2l=h,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return u(y(A))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(A){return Array.isArray(A)||typeof A=="string"&&A!==""?A:mm(A)},t.setupMultiCategory=function(A){var L=t._traceIndices,_,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var v in M)if(v!==n){var z=r[sz.id2name(v)];L=L.concat(z._traceIndices)}}var T=[[0,{}],[0,{}]],F=[];for(_=0;_z[1]&&(C[v?0:1]=_),C[0]===C[1]){var T=t.l2r(L),F=t.l2r(_);if(L!==void 0){var q=T+1;_!==void 0&&(q=Math.min(q,F)),C[v?1:0]=q}if(_!==void 0){var U=F+1;L!==void 0&&(U=Math.max(U,T)),C[v?0:1]=U}}}},t.cleanRange=function(A,L){t._cleanRange(A,L),t.limitRange(A)},t._cleanRange=function(A,L){L||(L={}),A||(A="range");var _=xc.nestedProperty(t,A).get(),C,M;if(t.type==="date"?M=xc.dfltRange(t.calendar):i==="y"?M=fz.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||fz.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!_||_.length!==2){xc.nestedProperty(t,A).set(M);return}var v=_[0]===null,z=_[1]===null;for(t.type==="date"&&!t.autorange&&(_[0]=xc.cleanDate(_[0],by,t.calendar),_[1]=xc.cleanDate(_[1],by,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!xc.isDateTime(_[C],t.calendar)){t[A]=M;break}if(t.r2l(_[0])===t.r2l(_[1])){var T=xc.constrain(t.r2l(_[0]),xc.MIN_MS+1e3,xc.MAX_MS-1e3);_[0]=t.l2r(T-1e3),_[1]=t.l2r(T+1e3);break}}else{if(!ym(_[C]))if(!(v||z)&&ym(_[1-C]))_[C]=_[1-C]*(C?10:.1);else{t[A]=M;break}if(_[C]<-nz?_[C]=-nz:_[C]>nz&&(_[C]=nz),_[0]===_[1]){var F=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=F,_[1]+=F}}},t.setScale=function(A){var L=r._size;if(t.overlaying){var _=sz.getFromId({_fullLayout:r},t.overlaying);t.domain=_.domain}var C=A&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var v=t.r2l(t[C][0],M),z=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/(v-z),t._b=-t._m*z):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(z-v),t._b=-t._m*v),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var F,q;if(t._rangebreaks=t.locateBreaks(Math.min(v,z),Math.max(v,z)),t._rangebreaks.length){for(F=0;Fz&&(U=!U),U&&t._rangebreaks.reverse();var H=U?-1:1;for(t._m2=H*t._length/(Math.abs(z-v)-t._lBreaks),t._B.push(-t._m2*(T?z:v)),F=0;FM&&(M+=7,vM&&(M+=24,v=C&&v=C&&A=te.min&&(bete.max&&(te.max=ze),Ce=!1)}Ce&&z.push({min:be,max:ze})}};for(_=0;_{"use strict";var Joe=_u(),tN=Zr(),got=ju().BADNUM,cz=tN.isArrayOrTypedArray,_ot=tN.isDateTime,xot=tN.cleanNumber,$oe=Math.round;ese.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(cz(i)&&!i.length)return"-";if(!a&&Sot(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function Qoe(e){return Math.max(1,(e-1)/1e3)}function Aot(e,t){for(var r=e.length,n=Qoe(r),i=0,a=0,o={},s=0;si*2}function Sot(e){return cz(e[0])&&cz(e[1])}});var wy=Se((Oir,lse)=>{"use strict";var Mot=Nl(),nse=_u(),o_=Zr(),hz=ju().FP_SAFE,Eot=Ul(),kot=yu(),ase=$c(),Cot=ase.getFromId,Lot=ase.isLinked;lse.exports={applyAutorangeOptions:sse,getAutoRange:rN,makePadFn:iN,doAutoRange:Pot,findExtremes:Iot,concatExtremes:oN};function rN(e,t){var r,n,i=[],a=e._fullLayout,o=iN(a,t,0),s=iN(a,t,1),u=oN(e,t),l=u.min,f=u.max;if(l.length===0||f.length===0)return o_.simpleMap(t.range,t.r2l);var c=l[0].val,h=f[0].val;for(r=1;r0&&(z=E-o(_)-s(C),z>A?T/z>L&&(M=_,v=C,L=T/z):T/E>L&&(M={val:_.val,nopad:1},v={val:C.val,nopad:1},L=T/E));function F(G,O){return Math.max(G,s(O))}if(c===h){var q=c-1,U=c+1;if(y)if(c===0)i=[0,1];else{var H=(c>0?f:l).reduce(F,0),j=c/(1-Math.min(.5,H/E));i=c>0?[0,j]:[j,0]}else k?i=[Math.max(0,q),Math.max(1,U)]:i=[q,U]}else y?(M.val>=0&&(M={val:0,nopad:1}),v.val<=0&&(v={val:0,nopad:1})):k&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),v.val<=0&&(v={val:1,nopad:1})),L=(v.val-M.val-tse(t,_.val,C.val))/(E-o(M)-s(v)),i=[M.val-L*o(M),v.val+L*s(v)];return i=sse(i,t),t.limitRange&&t.limitRange(),p&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function tse(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),_=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),M=A(r.vpadminus||r.vpad);if(!l){if(k=1/0,E=-1/0,u)for(c=0;c0&&(k=h),h>E&&h-hz&&(k=h),h>E&&h=T;c--)z(c);return{min:n,max:i,opts:r}}function nN(e,t,r,n){ose(e,t,r,n,Dot)}function aN(e,t,r,n){ose(e,t,r,n,Rot)}function ose(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,u=0;u=r&&(l.extrapad||!o)){s=!1;break}else i(t,l.val)&&l.pad<=r&&(o||!l.extrapad)&&(e.splice(u,1),u--)}if(s){var f=a&&t===0;e.push({val:t,pad:f?0:r,extrapad:f?!1:o})}}function ise(e){return nse(e)&&Math.abs(e)=t}function Fot(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&dz(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&dz(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function qot(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&dz(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&dz(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function dz(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=u&&(a=u,r=u),o<=u&&(o=u,n=u)}}return r=Fot(r,t),n=qot(n,t),[r,n]}});var hu=Se((Nir,Lse)=>{"use strict";var w0=Nl(),Rh=_u(),z3=Sc(),QM=Ul(),zu=Zr(),P3=zu.strTranslate,Eb=Bf(),Bot=Mb(),e5=Pl(),Xv=yu(),Oot=Rd(),use=LO(),Qd=ju(),Not=Qd.ONEMAXYEAR,yz=Qd.ONEAVGYEAR,mz=Qd.ONEMINYEAR,Uot=Qd.ONEMAXQUARTER,fN=Qd.ONEAVGQUARTER,gz=Qd.ONEMINQUARTER,Vot=Qd.ONEMAXMONTH,I3=Qd.ONEAVGMONTH,_z=Qd.ONEMINMONTH,Yv=Qd.ONEWEEK,Fp=Qd.ONEDAY,s_=Fp/2,xm=Qd.ONEHOUR,t5=Qd.ONEMIN,xz=Qd.ONESEC,Hot=Qd.ONEMILLI,Got=Qd.ONEMICROSEC,kb=Qd.MINUS_SIGN,Tz=Qd.BADNUM,cN={K:"zeroline"},hN={K:"gridline",L:"path"},dN={K:"minor-gridline",L:"path"},xse={K:"tick",L:"path"},fse={K:"tick",L:"text"},cse={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Az=Qh(),$M=Az.MID_SHIFT,Cb=Az.CAP_SHIFT,r5=Az.LINE_SPACING,Wot=Az.OPPOSITE_SIDE,bz=3,Is=Lse.exports={};Is.setConvert=gm();var jot=L3(),Ag=$c(),Zot=Ag.idSort,Xot=Ag.isLinked;Is.id2name=Ag.id2name;Is.name2id=Ag.name2id;Is.cleanId=Ag.cleanId;Is.list=Ag.list;Is.listIds=Ag.listIds;Is.getFromId=Ag.getFromId;Is.getFromTrace=Ag.getFromTrace;var bse=wy();Is.getAutoRange=bse.getAutoRange;Is.findExtremes=bse.findExtremes;var Yot=1e-4;function mN(e){var t=(e[1]-e[0])*Yot;return[e[0]-t,e[1]+t]}Is.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],u=n+"ref",l={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(f){return f+" domain"})),l[u]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},zu.coerce(e,t,l,u)};Is.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Is.coercePosition=function(e,t,r,n,i,a){var o,s,u=Is.getRefType(n);if(u!=="range")o=zu.ensureNumber,s=r(i,a);else{var l=Is.getFromId(t,n);a=l.fraction2r(a),s=r(i,a),o=l.cleanPos}e[i]=o(s)};Is.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?zu.ensureNumber:Is.getFromId(t,r).cleanPos;return n(e)};Is.redrawComponents=function(e,t){t=t||Is.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var u=QM.getComponentMethod(i,a),l={},f=0;f2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Is.saveRangeInitial=function(e,t){for(var r=Is.list(e,"",!0),n=!1,i=0;ic*.3||l(n)||l(i))){var h=r.dtick/2;e+=e+ho){var s=Number(r.substr(1));a.exactYears>o&&s%12===0?e=Is.tickIncrement(e,"M6","reverse")+Fp*1.5:a.exactMonths>o?e=Is.tickIncrement(e,"M1","reverse")+Fp*15.5:e-=s_;var u=Is.tickIncrement(e,r);if(u<=n)return u}return e}Is.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&Rh(t._tmin),i;if(n){var a=Is.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=zu.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=zu.simpleMap(i,t.l2r),e._isMinor=!0,Is.prepTicks(e,r),n){var s=Rh(t.dtick),u=Rh(e.dtick),l=s?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);s&&u?sN(l,f)?l===2*Yv&&f===2*Fp&&(e.dtick=Yv):l===2*Yv&&f===3*Fp?e.dtick=Yv:l===Yv&&!(t._input.minor||{}).nticks?e.dtick=Fp:pse(l/f,2.5)?e.dtick=l/2:e.dtick=l:String(t.dtick).charAt(0)==="M"?u?e.dtick="M1":sN(l,f)?l>=12&&f===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?sN(l,f)||(e.dtick=pse(l/f,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 sN(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function pse(e,t){return Math.abs(e/t-1)<.001}Is.prepTicks=function(e,t){var r=zu.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?zu.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=zu.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,Is.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,u=e[o].value,l=Math.abs(u-s),f=r||l,c=0;f>=mz?l>=mz&&l<=Not?c=l:c=yz:r===fN&&f>=gz?l>=gz&&l<=Uot?c=l:c=fN:f>=_z?l>=_z&&l<=Vot?c=l:c=I3:r===Yv&&f>=Yv?c=Yv:f>=Fp?c=Fp:r===s_&&f>=s_?c=s_:r===xm&&f>=xm&&(c=xm);var h;c>=l&&(c=l,h=!0);var d=i+c;if(t.rangebreaks&&c>0){for(var p=84,x=0,b=0;bYv&&(c=l)}(c>0||n===0)&&(e[n].periodX=i+c/2)}}Is.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],u=!t.ticklabelindex||zu.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],l=zu.simpleMap(t.range,t.r2l,void 0,void 0,r),f=l[1]=(E?0:1);A--){var L=!A;A?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var _=A?t:zu.extendFlat({},t,t.minor);if(L?Is.prepMinorTicks(_,t,r):Is.prepTicks(_,r),_.tickmode==="array"){A?(b=[],p=vse(t,!L)):(y=[],x=vse(t,!L));continue}if(_.tickmode==="sync"){b=[],p=tst(t);continue}var C=mN(l),M=C[0],v=C[1],z=Rh(_.dtick),T=n==="log"&&!(z||_.dtick.charAt(0)==="L"),F=Is.tickFirst(_,r);if(A){if(t._tmin=F,F=v:U<=v;U=Is.tickIncrement(U,G,f,i)){if(A&&H++,_.rangebreaks&&!f){if(U=h)break}if(b.length>d||U===q)break;q=U;var O={value:U};A?(T&&U!==(U|0)&&(O.simpleLabel=!0),a>1&&H%a&&(O.skipLabel=!0),b.push(O)):(O.minor=!0,y.push(O))}}if(!y||y.length<2)u=!1;else{var W=(y[1].value-y[0].value)*(s?-1:1);Sst(W,t.tickformat)||(u=!1)}if(!u)k=b;else{var re=b.concat(y);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Tt,xt){return Tt.value-xt.value}).filter(function(Tt,xt,_t){return xt===0||Tt.value!==_t[xt-1].value});var ne=re.map(function(Tt,xt){return Tt.minor===void 0&&!Tt.skipLabel?xt:null}).filter(function(Tt){return Tt!==null});ne.forEach(function(Tt){u.map(function(xt){var _t=Tt+xt;_t>=0&&_t-1;Oe--){if(b[Oe].drop){b.splice(Oe,1);continue}b[Oe].value=uN(b[Oe].value,t);var fe=t.c2p(b[Oe].value);(Re?Be>fe-me:Beh||Cth&&(_t.periodX=h),Cti&&hyz)t/=yz,n=i(10),e.dtick="M"+12*_m(t,n,pz);else if(a>I3)t/=I3,e.dtick="M"+_m(t,1,yse);else if(a>Fp){if(e.dtick=_m(t,Fp,e._hasDayOfWeekBreaks?[1,2,7,14]:rst),!r){var o=Is.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=zu.dateTick0(e.calendar,2):e.tick0=zu.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,yse):a>t5?e.dtick=_m(t,t5,mse):a>xz?e.dtick=_m(t,xz,mse):(n=i(10),e.dtick=_m(t,n,pz))}else if(e.type==="log"){e.tick0=0;var u=zu.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var l=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/l,n=i(10),e.dtick="L"+_m(t,n,pz)}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))):xN(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,ist)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,pz));if(e.dtick===0&&(e.dtick=1),!Rh(e.dtick)&&typeof e.dtick!="string"){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}};function Sse(e){var t=e.dtick;if(e._tickexponent=0,!Rh(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.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=Fp&&i<=10||t>=Fp*15)e._tickround="d";else if(t>=t5&&i<=16||t>=xm)e._tickround="M";else if(t>=xz&&i<=19||t>=t5)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(Rh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Rh(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),u=Math.floor(Math.log(s)/Math.LN10+.01),l=e.minexponent===void 0?3:e.minexponent;Math.abs(u)>l&&(wz(e.exponentformat)&&!gN(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}Is.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(Rh(t))return zu.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.substr(1));if(a==="M")return zu.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Ase:Tse,u=e+i*.01,l=zu.roundUp(zu.mod(u,1),s,r);return Math.floor(u)+Math.log(w0.round(Math.pow(10,l),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Is.tickFirst=function(e,t){var r=e.r2l||Number,n=zu.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&y<=e._length?b:null};if(a&&zu.isArrayOrTypedArray(e.ticktext)){var c=zu.simpleMap(e.range,e.r2l),h=(Math.abs(c[1]-c[0])-(e._lBreaks||0))/1e4;for(l=0;l"+s;else{var l=n5(e),f=e._trueSide||e.side;(!l&&f==="top"||l&&f==="bottom")&&(o+="
")}t.text=o}function ast(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,u=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&u!=="L"&&(a="L3",u="L"),s||u==="L")t.text=i5(Math.pow(10,o),e,i,n);else if(Rh(a)||u==="D"&&zu.mod(o+.01,1)<.1){var l=Math.round(o),f=Math.abs(l),c=e.exponentformat;c==="power"||wz(c)&&gN(l)?(l===0?t.text=1:l===1?t.text="10":t.text="10"+(l>1?"":kb)+f+"",t.fontSize*=1.25):(c==="e"||c==="E")&&f>2?t.text="1"+c+(l>0?"+":kb)+f:(t.text=i5(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(u==="D")t.text=String(Math.round(Math.pow(10,zu.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var h=String(t.text).charAt(0);(h==="0"||h==="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 ost(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function sst(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 lst(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=i5(t.x,e,i,n)}function ust(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=fst(a);if(o[1]>=100)t.text=i5(zu.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=kb+t.text)}}}else t.text=i5(t.x,e,i,n)}function fst(e){function t(s,u){return Math.abs(s-u)<=1e-6}function r(s,u){return t(u,0)?s:r(u,s%u)}function n(s){for(var u=1;!t(Math.round(s*u)/u,s);)u*=10;return u}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var cst=["f","p","n","\u03BC","m","","k","M","G","T"];function wz(e){return e==="SI"||e==="B"}function gN(e){return e>14||e<-15}function i5(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,u=Is.getTickFormat(t),l=t.separatethousands;if(n){var f={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Rh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Sse(f),a=(Number(f._tickround)||0)+4,s=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,kb);var c=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+p+"":o==="B"&&s===9?e+="B":wz(o)&&(e+=cst[s/3+5])}return i?kb+e:e}Is.getTickFormat=function(e){var t;function r(u){return typeof u!="string"?u:Number(u.replace("M",""))*I3}function n(u,l){var f=["L","D"];if(typeof u==typeof l){if(typeof u=="number")return u-l;var c=f.indexOf(u.charAt(0)),h=f.indexOf(l.charAt(0));return c===h?Number(u.replace(/(L|D)/g,""))-Number(l.replace(/(L|D)/g,"")):c-h}else return typeof u=="number"?1:-1}function i(u,l,f){var c=f||function(p){return p},h=l[0],d=l[1];return(!h&&typeof h!="number"||c(h)<=c(u))&&(!d&&typeof d!="number"||c(d)>=c(u))}function a(u,l){var f=l[0]===null,c=l[1]===null,h=n(u,l[0])>=0,d=n(u,l[1])<=0;return(f||h)&&(c||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(f,1).shift())}});var s={false:{left:0,right:0}};return zu.syncOrAsync(i.map(function(u){return function(){if(u){var l=Is.getFromId(e,u);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var f=Is.drawOne(e,l,r);return l._shiftPusher&&yN(l,l._fullDepth||0,s,!0),l._r=l.range.slice(),l._rl=zu.simpleMap(l._r,l.r2l),f}}}))};Is.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var u=e._fullLayout,l=t._id,f=l.charAt(0),c=Is.counterLetter(l),h=u._plots[t._mainSubplot];if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),yN(t,d,n,!0),yN(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Ast(t,n));var p=h[f+"axislayer"],x=t._mainLinePosition,b=x+=t._shift,y=t._mainMirrorPosition,k=t._vals=Is.calcTicks(t),E=[t.mirror,b,y].join("_");for(a=0;a0?_t.bottom-Tt:0,xt))));var Te=0,nt=0;if(t._shiftPusher&&(Te=Math.max(xt,_t.height>0?Qe==="l"?Tt-_t.left:_t.right-Tt:0),t.title.text!==u._dfltTitle[f]&&(nt=(t._titleStandoff||0)+(t._titleScoot||0),Qe==="l"&&(nt+=_se(t))),t._fullDepth=Math.max(Te,nt)),t.automargin){Ct={x:0,y:0,r:0,l:0,t:0,b:0};var ut=[0,1],ct=typeof t._shift=="number"?t._shift:0;if(f==="x"){if(Qe==="b"?Ct[Qe]=t._depth:(Ct[Qe]=t._depth=Math.max(_t.width>0?Tt-_t.top:0,xt),ut.reverse()),_t.width>0){var rt=_t.right-(t._offset+t._length);rt>0&&(Ct.xr=1,Ct.r=rt);var je=t._offset-_t.left;je>0&&(Ct.xl=0,Ct.l=je)}}else if(Qe==="l"?(t._depth=Math.max(_t.height>0?Tt-_t.left:0,xt),Ct[Qe]=t._depth-ct):(t._depth=Math.max(_t.height>0?_t.right-Tt:0,xt),Ct[Qe]=t._depth+ct,ut.reverse()),_t.height>0){var tt=_t.bottom-(t._offset+t._length);tt>0&&(Ct.yb=0,Ct.b=tt);var Je=t._offset-_t.top;Je>0&&(Ct.yt=1,Ct.t=Je)}Ct[c]=t.anchor==="free"?t.position:t._anchorAxis.domain[ut[0]],t.title.text!==u._dfltTitle[f]&&(Ct[Qe]+=_se(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(jt={x:0,y:0,r:0,l:0,t:0,b:0},jt[Xe]=t.linewidth,t.mirror&&t.mirror!==!0&&(jt[Xe]+=xt),t.mirror===!0||t.mirror==="ticks"?jt[c]=t._anchorAxis.domain[ut[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(jt[c]=[t._counterDomainMin,t._counterDomainMax][ut[1]]))}Pt&&(At=QM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(gse(Ct,t.automargin),gse(jt,t.automargin)),z3.autoMargin(e,_N(t),Ct),z3.autoMargin(e,kse(t),jt),z3.autoMargin(e,Cse(t),At)}),zu.syncOrAsync(et)}};function gse(e,t){if(e){var r=Object.keys(cse).reduce(function(n,i){return t.indexOf(i)!==-1&&cse[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 hst(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(zu.extendFlat({},a,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,u=!s;if(r){var l=o?-1:1;r=r*l}if(n){var f=e.side,c=s&&(f==="top"||f==="left")||u&&(f==="bottom"||f==="right")?1:-1;n=n*c}return e._id.charAt(0)==="x"?function(h){return P3(i+e._offset+e.l2p(pN(h))+r,a+n)}:function(h){return P3(a+n,i+e._offset+e.l2p(pN(h))+r)}};function pN(e){return e.periodX!==void 0?e.periodX:e.x}function yst(e){var t=e.ticklabelposition||"",r=function(d){return t.indexOf(d)!==-1},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),u=o||i||n||a;if(!u&&!s)return[0,0];var l=e.side,f=u?(e.tickwidth||0)/2:0,c=bz,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(f+=h*Cb,c+=(e.linewidth||0)/2),(i||a)&&(f+=(e.linewidth||0)/2,c+=bz),s&&l==="top"&&(c-=h*(1-Cb)),(i||n)&&(f=-f),(l==="bottom"||l==="right")&&(c=-c),[u?f:0,s?c:0]}Is.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};Is.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(F){return n.indexOf(F)!==-1},a=i("top"),o=i("left"),s=i("right"),u=i("bottom"),l=u||o||a||s,f=i("inside"),c=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,p=c?e.ticklen:0;if(f?p*=-1:l&&(p=0),c&&(h+=p,r)){var x=zu.deg2rad(r);h=p*Math.cos(x)+1,d=p*Math.sin(x)}e.showticklabels&&(c||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(f?-1:1);var b={labelStandoff:h,labelShift:d},y,k,E,A,L=0,_=e.side,C=e._id.charAt(0),M=e.tickangle,v;if(C==="x")v=!f&&_==="bottom"||f&&_==="top",A=v?1:-1,f&&(A*=-1),y=d*A,k=t+h*A,E=v?1:-.2,Math.abs(M)===90&&(f?E+=$M:M===-90&&_==="bottom"?E=Cb:M===90&&_==="top"?E=$M:E=.5,L=$M/2*(M/90)),b.xFn=function(F){return F.dx+y+L*F.fontSize},b.yFn=function(F){return F.dy+k+F.fontSize*E},b.anchorFn=function(F,q){if(l){if(o)return"end";if(s)return"start"}return!Rh(q)||q===0||q===180?"middle":q*A<0!==f?"end":"start"},b.heightFn=function(F,q,U){return q<-60||q>60?-.5*U:e.side==="top"!==f?-U:0};else if(C==="y"){if(v=!f&&_==="left"||f&&_==="right",A=v?1:-1,f&&(A*=-1),y=h,k=d*A,E=0,!f&&Math.abs(M)===90&&(M===-90&&_==="left"||M===90&&_==="right"?E=Cb:E=.5),f){var z=Rh(M)?+M:0;if(z!==0){var T=zu.deg2rad(z);L=Math.abs(Math.sin(T))*Cb*A,E=0}}b.xFn=function(F){return F.dx+t-(y+F.fontSize*E)*A+L*F.fontSize},b.yFn=function(F){return F.dy+k+F.fontSize*$M},b.anchorFn=function(F,q){return Rh(q)&&Math.abs(q)===90?"middle":v?"end":"start"},b.heightFn=function(F,q,U){return e.side==="right"&&(q*=-1),q<-30?-U:q<30?-.5*U:0}}return b};function Sz(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Is.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,Sz);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return e5.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xv.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Mz(t,[xse]),a.attr("transform",r.transFn)};Is.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(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Is.shouldShowZeroLine(e,t,s))for(var u=t.tickmode==="array",l=0;l=0;p--){var x=p?h:d;if(x){var b=x.selectAll("path."+n).data(p?o:a,Sz);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(y){return e5.stroke(w0.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return Xv.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?c:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}Mz(t,[hN,dN])}};Is.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=Is.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 Zot(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(e5.stroke,t.zerolinecolor||e5.defaultLine).style("stroke-width",Xv.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Mz(t,[cN])};Is.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=r.cls||i+"tick",o=r.vals.filter(function(O){return O.text}),s=r.labelFns,u=r.secondary?0:t.tickangle,l=(t._prevTickAngles||{})[a],f=r.layer.selectAll("g."+a).data(t.showticklabels?o:[],Sz),c=[];f.enter().append("g").classed(a,1).append("text").attr("text-anchor","middle").each(function(O){var W=w0.select(this),re=e._promises.length;W.call(Eb.positionText,s.xFn(O),s.yFn(O)).call(Xv.font,{family:O.font,size:O.fontSize,color:O.fontColor,weight:O.fontWeight,style:O.fontStyle,variant:O.fontVariant,textcase:O.fontTextcase,lineposition:O.fontLineposition,shadow:O.fontShadow}).text(O.text).call(Eb.convertToTspans,e),e._promises[re]?c.push(e._promises.pop().then(function(){h(W,u)})):h(W,u)}),Mz(t,[fse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(O){w0.select(this).select("text").call(Eb.positionText,s.xFn(O),s.yFn(O))});function h(O,W){O.each(function(re){var ne=w0.select(this),be=ne.select(".text-math-group"),ze=s.anchorFn(re,W),Ce=r.transFn.call(ne.node(),re)+(Rh(W)&&+W!=0?" rotate("+W+","+s.xFn(re)+","+(s.yFn(re)-re.fontSize/2)+")":""),he=Eb.lineCount(ne),te=r5*re.fontSize,ke=s.heightFn(re,Rh(W)?+W:0,(he-1)*te);if(ke&&(Ce+=P3(0,ke)),be.empty()){var Ee=ne.select("text");Ee.attr({transform:Ce,"text-anchor":ze}),Ee.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Me=Xv.bBox(be.node()).width,Oe=Me*{end:-.5,start:.5}[ze];be.attr("transform",Ce+P3(Oe,0))}})}t._adjustTickLabelsOverflow=function(){var O=t.ticklabeloverflow;if(!(!O||O==="allow")){var W=O.indexOf("hide")!==-1,re=t._id.charAt(0)==="x",ne=0,be=re?e._fullLayout.width:e._fullLayout.height;if(O.indexOf("domain")!==-1){var ze=zu.simpleMap(t.range,t.r2l);ne=t.l2p(ze[0])+t._offset,be=t.l2p(ze[1])+t._offset}var Ce=Math.min(ne,be),he=Math.max(ne,be),te=t.side,ke=1/0,Ee=-1/0;f.each(function(me){var Be=w0.select(this),fe=Be.select(".text-math-group");if(fe.empty()){var Ze=Xv.bBox(Be.node()),et=0;re?(Ze.right>he||Ze.lefthe||Ze.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+ze._id]?me.style("display","none"):he.K==="tick"&&!Ce&&me.style("display",null)})})})})},h(f,l+1?l:u);function d(){return c.length&&Promise.all(c)}var p=null;function x(){if(h(f,u),o.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){p=t.autotickangles[0];var O=0,W=[],re,ne=1;f.each(function(_t){O=Math.max(O,_t.fontSize);var Ct=t.l2p(_t.x),jt=vN(this),At=Xv.bBox(jt.node());ne=Math.max(ne,Eb.lineCount(jt)),W.push({top:0,bottom:10,height:10,left:Ct-At.width/2,right:Ct+At.width/2+2,width:At.width+2})});var be=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ze=o.length,Ce=Math.abs((o[ze-1].x-o[0].x)*t._m)/(ze-1),he=be?Ce/2:Ce,te=be?t.ticklen:O*1.25*ne,ke=Math.sqrt(Math.pow(he,2)+Math.pow(te,2)),Ee=he/ke,Me=t.autotickangles.map(function(_t){return _t*Math.PI/180}),Oe=Me.find(function(_t){return Math.abs(Math.cos(_t))<=Ee});Oe===void 0&&(Oe=Me.reduce(function(_t,Ct){return Math.abs(Math.cos(_t))H*U&&(T=U,M[C]=v[C]=F[C])}var j=Math.abs(T-z);j-A>0?(j-=A,A*=1+A/j):A=0,t._id.charAt(0)!=="y"&&(A=-A),M[_]=k.p2r(k.r2p(v[_])+L*A),k.autorange==="min"||k.autorange==="max reversed"?(M[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(M[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=M}var G=zu.syncOrAsync(b);return G&&G.then&&e._promises.push(G),G};function mst(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,Sz);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(e5.stroke,t.dividercolor).style("stroke-width",Xv.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Is.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 _se(e){var t=e.title.font.size,r=(e.title.text.match(Eb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Cb+r*r5):r?t*(r+1)*r5:t}function gst(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Eb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Cb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*($M+s*r5));else{var u=n5(t);if(t.type==="multicategory")o=t._depth;else{var l=1.5*a;u&&(l=.5*a,t.ticks==="outside"&&(l+=t.ticklen)),o=10+l+(t.linewidth?t.linewidth-1:0)}u||(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 f=Is.getPxPosition(e,t),c,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?f-o:f+o):(d=t._offset+t._length/2,h=t.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var x=t._selections[t._id+"tick"];if(p={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var b=Xv.getTranslate(x.node().parentNode);p.offsetLeft=b.x,p.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,Bot.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:p,transform:c,attributes:{x:h,y:d,"text-anchor":"middle"}})}Is.shouldShowZeroLine=function(e,t,r){var n=zu.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===Tz)&&(Ese(t,0)||!_st(e,t,r,n)||xst(e,t))};Is.clipEnds=function(e,t){return t.filter(function(r){return Ese(e,r.x)})};function Ese(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=Got:/%L/.test(t)?e>=Hot:/%[SX]/.test(t)?e>=xz:/%M/.test(t)?e>=t5:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=Fp:/%[UVW]/.test(t)?e>=Yv:/%[Bbm]/.test(t)?e>=_z:/%[q]/.test(t)?e>=gz:/%[Yy]/.test(t)?e>=mz:!0}});var bN=Se((Uir,zse)=>{"use strict";zse.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),u=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),u===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var wN=Se((Vir,Pse)=>{"use strict";var Mst=bN();Pse.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 u;!i.noInsiderange&&o!=="log"&&(u=n("insiderange"),u&&(u[0]===null||u[1]===null)&&(r.insiderange=!1,u=void 0),u&&(s=n("range",u)))}var l=r.getAutorangeDflt(s,i),f=n("autorange",l),c;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(f==="reversed"||f===!0)||s[0]!==null&&(f==="min"||f==="max reversed")||s[1]!==null&&(f==="max"||f==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,c=!0),c||(l=r.getAutorangeDflt(s,i),f=n("autorange",l)),f&&(Mst(n,f,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Dse=Se((Hir,Ise)=>{var Est={left:0,top:0};Ise.exports=kst;function kst(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=Cst(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Cst(e){return e===window||e===document||e===document.body?Est:e.getBoundingClientRect()}});var Ez=Se((Gir,Rse)=>{"use strict";var Lst=aO();function zst(){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}Rse.exports=Lst&&zst()});var qse=Se((Wir,Fse)=>{"use strict";Fse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),u=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?u:a==="right"||a==="top"?s:o<2/3-u?o:s>4/3-u?s:u}});var Nse=Se((jir,Ose)=>{"use strict";var Bse=Zr(),Pst=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Ose.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Bse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Bse.constrain(Math.floor(r*3),0,2),Pst[r][t]}});var Vse=Se((Zir,Use)=>{"use strict";var Ist=y3(),Dst=LL(),Rst=DM().getGraphDiv,Fst=PM(),TN=Use.exports={};TN.wrapped=function(e,t,r){e=Rst(e),e._fullLayout&&Dst.clear(e._fullLayout._uid+Fst.HOVERID),TN.raw(e,t,r)};TN.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Ist.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 gp=Se((Xir,Wse)=>{"use strict";var qst=Dse(),AN=sO(),Bst=Ez(),Ost=Zr().removeElement,Nst=dd(),Lb=Wse.exports={};Lb.align=qse();Lb.getCursor=Nse();var Hse=Vse();Lb.unhover=Hse.wrapped;Lb.unhoverRaw=Hse.raw;Lb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,u,l,f,c,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,Bst?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function p(E,A,L){return Math.abs(E)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(n,c),!d){var A;try{A=new MouseEvent("click",E)}catch(_){var L=SN(E);A=document.createEvent("MouseEvents"),A.initMouseEvent("click",E.bubbles,E.cancelable,E.view,E.detail,E.screenX,E.screenY,L[0],L[1],E.ctrlKey,E.altKey,E.shiftKey,E.metaKey,E.button,E.relatedTarget)}h.dispatchEvent(A)}r._dragging=!1,r._dragged=!1}};function Gse(){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}Lb.coverSlip=Gse;function SN(e){return qst(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Ty=Se((Yir,jse)=>{"use strict";jse.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 Yse=Se((Kir,Xse)=>{"use strict";var MN=Ty(),a5="data-savedcursor",Zse="!!";Xse.exports=function(t,r){var n=t.attr(a5);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var EN=uc(),Ust=Ih();Kse.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Ust.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:EN({editType:"legend"}),grouptitlefont:EN({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:EN({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var Cz=Se(kz=>{"use strict";kz.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};kz.isVertical=function(t){return t.orientation!=="h"};kz.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var zN=Se((Qir,Jse)=>{"use strict";var CN=Ul(),Kv=Zr(),Vst=_f(),Hst=zf(),Gst=kN(),Wst=s3(),LN=Cz();function jst(e,t,r,n){var i=t[e]||{},a=Vst.newContainer(r,e);function o(G,O){return Kv.coerce(i,a,Gst,G,O)}var s=Kv.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var u=o("visible");if(u){for(var l,f=function(G,O){var W=l._input,re=l;return Kv.coerce(W,re,Hst,G,O)},c=r.font||{},h=Kv.coerceFont(o,"grouptitlefont",c,{overrideDflt:{size:Math.round(c.size*1.1)}}),d=0,p=!1,x="normal",b=(r.shapes||[]).filter(function(G){return G.showlegend}),y=n.concat(b).filter(function(G){return e===(G.legend||"legend")}),k=0;k(e==="legend"?1:0));if(A===!1&&(r[e]=void 0),!(A===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),A!==!1)){o("borderwidth");var L=o("orientation"),_=o("yref"),C=o("xref"),M=L==="h",v=_==="paper",z=C==="paper",T,F,q,U="left";M?(T=0,CN.getComponentMethod("rangeslider","isVisible")(t.xaxis)?v?(F=1.1,q="bottom"):(F=1,q="top"):v?(F=-.1,q="top"):(F=0,q="bottom")):(F=1,q="auto",z?T=1.02:(T=1,U="right")),Kv.coerce(i,a,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:T}},"x"),Kv.coerce(i,a,{y:{valType:"number",editType:"legend",min:v?-2:0,max:v?3:1,dflt:F}},"y"),o("traceorder",x),LN.isGrouped(r[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",U),o("yanchor",q),o("valign"),Kv.noneOrAll(i,a,["x","y"]);var H=o("title.text");if(H){o("title.side",M?"left":"top");var j=Kv.extendFlat({},s,{size:Kv.bigFont(s.size)});Kv.coerceFont(o,"title.font",j)}}}}Jse.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var D3=Ul(),IN=Zr(),Zst=IN.pushUnique,PN=!0;$se.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"&&PN&&r.data&&r._context.showTips&&IN.notifier(IN._(r,"Double-click on legend to isolate one trace"),"long"),PN=!1;var u;if(n===1?u=a:n===2&&(u=o),!u)return;var l=s==="togglegroup",f=i.hiddenlabels?i.hiddenlabels.slice():[],c=t.data()[0][0];if(c.groupTitle&&c.noClick)return;var h=r._fullData,d=(i.shapes||[]).filter(function(Tt){return Tt.showlegend}),p=h.concat(d),x=c.trace;x._isShape&&(x=x._fullInput);var b=x.legendgroup,y,k,E,A,L,_,C={},M=[],v=[],z=[];function T(Tt,xt){var _t=M.indexOf(Tt),Ct=C.visible;return Ct||(Ct=C.visible=[]),M.indexOf(Tt)===-1&&(M.push(Tt),_t=M.length-1),Ct[_t]=xt,_t}var F=(i.shapes||[]).map(function(Tt){return Tt._input}),q=!1;function U(Tt,xt){F[Tt].visible=xt,q=!0}function H(Tt,xt){if(!(c.groupTitle&&!l)){var _t=Tt._fullInput||Tt,Ct=_t._isShape,jt=_t.index;jt===void 0&&(jt=_t._index);var At=_t.visible===!1?!1:xt;Ct?U(jt,At):T(jt,At)}}var j=x.legend,G=x._fullInput,O=G&&G._isShape;if(!O&&D3.traceIs(x,"pie-like")){var W=c.label,re=f.indexOf(W);if(u==="toggle")re===-1?f.push(W):f.splice(re,1);else if(u==="toggleothers"){var ne=re!==-1,be=[];for(y=0;y{"use strict";ele.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var ile=Se((rnr,rle)=>{"use strict";var tle=Ul(),RN=Cz();rle.exports=function(t,r,n){var i=r._inHover,a=RN.isGrouped(r),o=RN.isReversed(r),s={},u=[],l=!1,f={},c=0,h=0,d,p;function x(G,O,W){if(r.visible!==!1&&!(n&&G!==r._id))if(O===""||!RN.isGrouped(r)){var re="~~i"+c;u.push(re),s[re]=[W],c++}else u.indexOf(O)===-1?(u.push(O),l=!0,s[O]=[W]):s[O].push(W)}for(d=0;dz&&(v=z)}C[d][0]._groupMinRank=v,C[d][0]._preGroupSort=d}var T=function(G,O){return G[0]._groupMinRank-O[0]._groupMinRank||G[0]._preGroupSort-O[0]._preGroupSort},F=function(G,O){return G.trace.legendrank-O.trace.legendrank||G._preSort-O._preSort};for(C.forEach(function(G,O){G[0]._preGroupSort=O}),C.sort(T),d=0;d{"use strict";var Lz=Zr();function nle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}zb.formatPiePercent=function(t,r){var n=nle((t*100).toPrecision(3));return Lz.numSeparate(n,r)+"%"};zb.formatPieValue=function(t,r){var n=nle(t.toPrecision(10));return Lz.numSeparate(n,r)};zb.getFirstFilled=function(t,r){if(Lz.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var Xst=yu(),Yst=Pl();ale.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?Xst.pointStyle(t,n,i,r):Yst.fill(t,r.color)}});var R3=Se((anr,ule)=>{"use strict";var sle=Pl(),lle=l_().castOption,Kst=ole();ule.exports=function(t,r,n,i){var a=n.marker.line,o=lle(a.color,r.pts)||sle.defaultLine,s=lle(a.width,r.pts)||0;t.call(Kst,r,n,i).style("stroke-width",s).call(sle.stroke,o)}});var ON=Se((onr,vle)=>{"use strict";var qp=Nl(),FN=Ul(),_p=Zr(),fle=_p.strTranslate,iv=yu(),T0=Pl(),qN=Dp().extractOpts,zz=ec(),Jst=R3(),$st=l_().castOption,Qst=DN(),cle=12,hle=5,Pb=2,elt=10,F3=5;vle.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+Qst.itemGap*2)/2,u=fle(s,0),l=function(C,M,v,z){var T;if(C+1)T=C;else if(M&&M.width>0)T=M.width;else return 0;return a?z:Math.min(T,v)};t.each(function(C){var M=qp.select(this),v=_p.ensureSingle(M,"g","layers");v.style("opacity",C[0].trace.opacity);var z=n.indentation,T=n.valign,F=C[0].lineHeight,q=C[0].height;if(T==="middle"&&z===0||!F||!q)v.attr("transform",null);else{var U={top:1,bottom:-1}[T],H=U*(.5*(F-q+3))||0,j=n.indentation;v.attr("transform",fle(j,H))}var G=v.selectAll("g.legendfill").data([C]);G.enter().append("g").classed("legendfill",!0);var O=v.selectAll("g.legendlines").data([C]);O.enter().append("g").classed("legendlines",!0);var W=v.selectAll("g.legendsymbols").data([C]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(_).each(h).each(p).each(d).each(b).each(A).each(E).each(f).each(c).each(y).each(k);function f(C){var M=dle(C),v=M.showFill,z=M.showLine,T=M.showGradientLine,F=M.showGradientFill,q=M.anyFill,U=M.anyLine,H=C[0],j=H.trace,G,O,W=qN(j),re=W.colorscale,ne=W.reversescale,be=function(Me){if(Me.size())if(v)iv.fillGroupStyle(Me,r,!0);else{var Oe="legendfill-"+j.uid;iv.gradient(Me,r,Oe,BN(ne),re,"fill")}},ze=function(Me){if(Me.size()){var Oe="legendline-"+j.uid;iv.lineGroupStyle(Me),iv.gradient(Me,r,Oe,BN(ne),re,"stroke")}},Ce=zz.hasMarkers(j)||!q?"M5,0":U?"M5,-2":"M5,-3",he=qp.select(this),te=he.select(".legendfill").selectAll("path").data(v||F?[C]:[]);if(te.enter().append("path").classed("js-fill",!0),te.exit().remove(),te.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(be),z||T){var ke=l(void 0,j.line,elt,hle);O=_p.minExtend(j,{line:{width:ke}}),G=[_p.minExtend(H,{trace:O})]}var Ee=he.select(".legendlines").selectAll("path").data(z||T?[G]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",Ce+(T?"l"+o+",0.0001":"h"+o)).call(z?iv.lineGroupStyle:ze)}function c(C){var M=dle(C),v=M.anyFill,z=M.anyLine,T=M.showLine,F=M.showMarker,q=C[0],U=q.trace,H=!F&&!z&&!v&&zz.hasText(U),j,G;function O(te,ke,Ee,Me){var Oe=_p.nestedProperty(U,te).get(),Re=_p.isArrayOrTypedArray(Oe)&&ke?ke(Oe):Oe;if(a&&Re&&Me!==void 0&&(Re=Me),Ee){if(ReEe[1])return Ee[1]}return Re}function W(te){return q._distinct&&q.index&&te[q.index]?te[q.index]:te[0]}if(F||H||T){var re={},ne={};if(F){re.mc=O("marker.color",W),re.mx=O("marker.symbol",W),re.mo=O("marker.opacity",_p.mean,[.2,1]),re.mlc=O("marker.line.color",W),re.mlw=O("marker.line.width",_p.mean,[0,5],Pb),ne.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var be=O("marker.size",_p.mean,[2,16],cle);re.ms=be,ne.marker.size=be}T&&(ne.line={width:O("line.width",W,[0,10],hle)}),H&&(re.tx="Aa",re.tp=O("textposition",W),re.ts=10,re.tc=O("textfont.color",W),re.tf=O("textfont.family",W),re.tw=O("textfont.weight",W),re.ty=O("textfont.style",W),re.tv=O("textfont.variant",W),re.tC=O("textfont.textcase",W),re.tE=O("textfont.lineposition",W),re.tS=O("textfont.shadow",W)),j=[_p.minExtend(q,re)],G=_p.minExtend(U,ne),G.selectedpoints=null,G.texttemplate=null}var ze=qp.select(this).select("g.legendpoints"),Ce=ze.selectAll("path.scatterpts").data(F?j:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",u),Ce.exit().remove(),Ce.call(iv.pointStyle,G,r),F&&(j[0].mrc=3);var he=ze.selectAll("g.pointtext").data(H?j:[]);he.enter().append("g").classed("pointtext",!0).append("text").attr("transform",u),he.exit().remove(),he.selectAll("text").call(iv.textPointStyle,G,r)}function h(C){var M=C[0].trace,v=M.type==="waterfall";if(C[0]._distinct&&v){var z=C[0].trace[C[0].dir].marker;return C[0].mc=z.color,C[0].mlw=z.line.width,C[0].mlc=z.line.color,x(C,this,"waterfall")}var T=[];M.visible&&v&&(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 F=qp.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(T);F.enter().append("path").classed("legendwaterfall",!0).attr("transform",u).style("stroke-miterlimit",1),F.exit().remove(),F.each(function(q){var U=qp.select(this),H=M[q[0]].marker,j=l(void 0,H.line,F3,Pb);U.attr("d",q[1]).style("stroke-width",j+"px").call(T0.fill,H.color),j&&U.call(T0.stroke,H.line.color)})}function d(C){x(C,this)}function p(C){x(C,this,"funnel")}function x(C,M,v){var z=C[0].trace,T=z.marker||{},F=T.line||{},q=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",U=v?z.visible&&z.type===v:FN.traceIs(z,"bar"),H=qp.select(M).select("g.legendpoints").selectAll("path.legend"+v).data(U?[C]:[]);H.enter().append("path").classed("legend"+v,!0).attr("d",q).attr("transform",u),H.exit().remove(),H.each(function(j){var G=qp.select(this),O=j[0],W=l(O.mlw,T.line,F3,Pb);G.style("stroke-width",W+"px");var re=O.mcc;if(!n._inHover&&"mc"in O){var ne=qN(T),be=ne.mid;be===void 0&&(be=(ne.max+ne.min)/2),re=iv.tryColorscale(T,"")(be)}var ze=re||O.mc||T.color,Ce=T.pattern,he=Ce&&iv.getPatternAttr(Ce.shape,0,"");if(he){var te=iv.getPatternAttr(Ce.bgcolor,0,null),ke=iv.getPatternAttr(Ce.fgcolor,0,null),Ee=Ce.fgopacity,Me=ple(Ce.size,8,10),Oe=ple(Ce.solidity,.5,1),Re="legend-"+z.uid;G.call(iv.pattern,"legend",r,Re,he,Me,Oe,re,Ce.fillmode,te,ke,Ee)}else G.call(T0.fill,ze);W&&T0.stroke(G,O.mlc||F.color)})}function b(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&FN.traceIs(M,"box-violin")?[C]:[]);v.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),v.exit().remove(),v.each(function(){var z=qp.select(this);if((M.boxpoints==="all"||M.points==="all")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var T=_p.minExtend(M,{marker:{size:a?cle:_p.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});v.call(iv.pointStyle,T,r)}else{var F=l(void 0,M.line,F3,Pb);z.style("stroke-width",F+"px").call(T0.fill,M.fillcolor),F&&T0.stroke(z,M.line.color)}})}function y(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);v.enter().append("path").classed("legendcandle",!0).attr("d",function(z,T){return T?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",u).style("stroke-miterlimit",1),v.exit().remove(),v.each(function(z,T){var F=qp.select(this),q=M[T?"increasing":"decreasing"],U=l(void 0,q.line,F3,Pb);F.style("stroke-width",U+"px").call(T0.fill,q.fillcolor),U&&T0.stroke(F,q.line.color)})}function k(C){var M=C[0].trace,v=qp.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);v.enter().append("path").classed("legendohlc",!0).attr("d",function(z,T){return T?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",u).style("stroke-miterlimit",1),v.exit().remove(),v.each(function(z,T){var F=qp.select(this),q=M[T?"increasing":"decreasing"],U=l(void 0,q.line,F3,Pb);F.style("fill","none").call(iv.dashLine,q.line.dash,U),U&&T0.stroke(F,q.line.color)})}function E(C){L(C,this,"pie")}function A(C){L(C,this,"funnelarea")}function L(C,M,v){var z=C[0],T=z.trace,F=v?T.visible&&T.type===v:FN.traceIs(T,v),q=qp.select(M).select("g.legendpoints").selectAll("path.legend"+v).data(F?[C]:[]);if(q.enter().append("path").classed("legend"+v,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",u),q.exit().remove(),q.size()){var U=T.marker||{},H=l($st(U.line.width,z.pts),U.line,F3,Pb),j="pieLike",G=_p.minExtend(T,{marker:{line:{width:H}}},j),O=_p.minExtend(z,{trace:G},j);Jst(q,O,G,r)}}function _(C){var M=C[0].trace,v,z=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":z=[["M-15,-2V4H15V-2Z"]],v=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":z=[["M-6,-6V6H6V-6Z"]],v=!0;break;case"densitymapbox":case"densitymap":z=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],v="radial";break;case"cone":z=[["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"]],v=!1;break;case"streamtube":z=[["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"]],v=!1;break;case"surface":z=[["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"]],v=!0;break;case"mesh3d":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],v=!1;break;case"volume":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],v=!0;break;case"isosurface":z=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],v=!1;break}var T=qp.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(z);T.enter().append("path").classed("legend3dandfriends",!0).attr("transform",u).style("stroke-miterlimit",1),T.exit().remove(),T.each(function(F,q){var U=qp.select(this),H=qN(M),j=H.colorscale,G=H.reversescale,O=function(be){if(be.size()){var ze="legendfill-"+M.uid;iv.gradient(be,r,ze,BN(G,v==="radial"),j,"fill")}},W;if(j){if(!v){var ne=j.length;W=q===0?j[G?ne-1:0][1]:q===1?j[G?0:ne-1][1]:j[Math.floor((ne-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;W=_p.isArrayOrTypedArray(re)?re[q]||re[0]:re}U.attr("d",F[0]),W?U.call(T0.fill,W):U.call(O)})}};function BN(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function dle(e){var t=e[0].trace,r=t.contours,n=zz.hasLines(t),i=zz.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var u=r.coloring;u==="lines"?o=!0:n=u==="none"||u==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(u==="fill"||u==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function ple(e,t,r){return e&&_p.isArrayOrTypedArray(e)?t:e>r?r:e}});var HN=Se((snr,Sle)=>{"use strict";var Sv=Nl(),Fh=Zr(),UN=Sc(),O3=Ul(),yle=y3(),NN=gp(),qh=yu(),Iz=Pl(),Ib=Bf(),mle=Qse(),td=DN(),VN=Qh(),Tle=VN.LINE_SPACING,B3=VN.FROM_TL,gle=VN.FROM_BR,_le=ile(),tlt=ON(),xle=Cz(),q3=1,rlt=/^legend[0-9]*$/;Sle.exports=function(t,r){if(r)ble(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var l=Sv.select(this),f=l.attr("class"),c=f.split(" ")[0];c.match(rlt)&&i.indexOf(c)===-1&&l.remove()});for(var o=0;o1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!u.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),UN.autoMargin(e,i);var x=Fh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=Fh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),y=Fh.ensureSingle(x,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});y.call(Iz.stroke,r.bordercolor).call(Iz.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=Fh.ensureSingle(x,"g","scrollbox"),E=r.title;r._titleWidth=0,r._titleHeight=0;var A;E.text?(A=Fh.ensureSingle(k,"text",i+"titletext"),A.attr("text-anchor","start").call(qh.font,E.font).text(E.text),Dz(A,k,e,r,q3)):k.selectAll("."+i+"titletext").remove();var L=Fh.ensureSingle(x,"rect","scrollbar",function(M){M.attr(td.scrollBarEnterAttrs).call(Iz.fill,td.scrollBarColor)}),_=k.selectAll("g.groups").data(u);_.enter().append("g").attr("class","groups"),_.exit().remove();var C=_.selectAll("g.traces").data(Fh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){var v=M[0].trace;return O3.traceIs(v,"pie-like")?p.indexOf(M[0].label)!==-1?.5:1:v.visible==="legendonly"?.5:1}).each(function(){Sv.select(this).call(nlt,e,r)}).call(tlt,e,r).each(function(){s||Sv.select(this).call(alt,e,i)}),Fh.syncOrAsync([UN.previousPromises,function(){return llt(e,_,C,r)},function(){var M=n._size,v=r.borderwidth,z=r.xref==="paper",T=r.yref==="paper";if(E.text&&ilt(A,r,v),!s){var F,q;z?F=M.l+M.w*r.x-B3[Rz(r)]*r._width:F=n.width*r.x-B3[Rz(r)]*r._width,T?q=M.t+M.h*(1-r.y)-B3[Fz(r)]*r._effHeight:q=n.height*(1-r.y)-B3[Fz(r)]*r._effHeight;var U=ult(e,i,F,q);if(U)return;if(n.margin.autoexpand){var H=F,j=q;F=z?Fh.constrain(F,0,n.width-r._width):H,q=T?Fh.constrain(q,0,n.height-r._effHeight):j,F!==H&&Fh.log("Constrain "+i+".x to make legend fit inside graph"),q!==j&&Fh.log("Constrain "+i+".y to make legend fit inside graph")}qh.setTranslate(x,F,q)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var G=r._effHeight;s&&(G=r._height),y.attr({width:r._width-v,height:G-v,x:v/2,y:v/2}),qh.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*v,height:G-2*v,x:v,y:v}),qh.setClipUrl(k,a,e),qh.setRect(L,0,0,0,0),delete r._scrollY}else{var O=Math.max(td.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),W=r._effHeight-O-2*td.scrollBarMargin,re=r._height-r._effHeight,ne=W/re,be=Math.min(r._scrollY||0,re);y.attr({width:r._width-2*v+td.scrollBarWidth+td.scrollBarMargin,height:r._effHeight-v,x:v/2,y:v/2}),b.select("rect").attr({width:r._width-2*v+td.scrollBarWidth+td.scrollBarMargin,height:r._effHeight-2*v,x:v,y:v+be}),qh.setClipUrl(k,a,e),Oe(be,O,ne),x.on("wheel",function(){be=Fh.constrain(r._scrollY+Sv.event.deltaY/W*re,0,re),Oe(be,O,ne),be!==0&&be!==re&&Sv.event.preventDefault()});var ze,Ce,he,te=function(Ze,et,gt){var Pt=(gt-et)/ne+Ze;return Fh.constrain(Pt,0,re)},ke=function(Ze,et,gt){var Pt=(et-gt)/ne+Ze;return Fh.constrain(Pt,0,re)},Ee=Sv.behavior.drag().on("dragstart",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchstart"?ze=Ze.changedTouches[0].clientY:ze=Ze.clientY,he=be}).on("drag",function(){var Ze=Sv.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Ze.type==="touchmove"?Ce=Ze.changedTouches[0].clientY:Ce=Ze.clientY,be=te(he,ze,Ce),Oe(be,O,ne))});L.call(Ee);var Me=Sv.behavior.drag().on("dragstart",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchstart"&&(ze=Ze.changedTouches[0].clientY,he=be)}).on("drag",function(){var Ze=Sv.event.sourceEvent;Ze.type==="touchmove"&&(Ce=Ze.changedTouches[0].clientY,be=ke(he,ze,Ce),Oe(be,O,ne))});k.call(Me)}function Oe(Ze,et,gt){r._scrollY=e._fullLayout[i]._scrollY=Ze,qh.setTranslate(k,0,-Ze),qh.setRect(L,r._width,td.scrollBarMargin+Ze*gt,td.scrollBarWidth,et),b.select("rect").attr("y",v+Ze)}if(e._context.edits.legendPosition){var Re,me,Be,fe;x.classed("cursor-move",!0),NN.init({element:x.node(),gd:e,prepFn:function(Ze){if(Ze.target!==L.node()){var et=qh.getTranslate(x);Be=et.x,fe=et.y}},moveFn:function(Ze,et){if(Be!==void 0&&fe!==void 0){var gt=Be+Ze,Pt=fe+et;qh.setTranslate(x,gt,Pt),Re=NN.align(gt,r._width,M.l,M.l+M.w,r.xanchor),me=NN.align(Pt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Re!==void 0&&me!==void 0){var Ze={};Ze[i+".x"]=Re,Ze[i+".y"]=me,O3.call("_guiRelayout",e,Ze)}},clickFn:function(Ze,et){var gt=o.selectAll("g.traces").filter(function(){var Pt=this.getBoundingClientRect();return et.clientX>=Pt.left&&et.clientX<=Pt.right&&et.clientY>=Pt.top&&et.clientY<=Pt.bottom});gt.size()>0&&Ale(e,x,gt,Ze,et)}})}}],e)}}function Pz(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 Ale(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),O3.traceIs(a,"pie-like")&&(o.label=r.datum()[0].label);var s=yle.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&mle(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var u=yle.triggerHandler(e,"plotly_legenddoubleclick",o);u!==!1&&s!==!1&&mle(r,e,n)}}function nlt(e,t,r){var n=qz(r),i=e.data()[0][0],a=i.trace,o=O3.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,u=r._maxNameLength,l,f;i.groupTitle?(l=i.groupTitle.text,f=i.groupTitle.font):(f=r.font,r.entries?l=i.text:(l=o?i.label:a.name,a._meta&&(l=Fh.templateString(l,a._meta))));var c=Fh.ensureSingle(e,"text",n+"text");c.attr("text-anchor","start").call(qh.font,f).text(s?wle(l,u):l);var h=r.indentation+r.itemwidth+td.itemGap*2;Ib.positionText(c,h,0),s?c.call(Ib.makeEditable,{gd:t,text:l}).call(Dz,e,t,r).on("edit",function(d){this.text(wle(d,u)).call(Dz,e,t,r);var p=i.trace._fullInput||{},x={};return x.name=d,p._isShape?O3.call("_guiRelayout",t,"shapes["+a.index+"].name",x.name):O3.call("_guiRestyle",t,x,a.index)}):Dz(c,e,t,r)}function wle(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 alt(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=Fh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(Iz.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)),Ale(t,s,e,a,Sv.event)}}))}function Dz(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Ib.convertToTspans(e,r,function(){olt(t,r,n,i)})}function olt(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){e.remove();return}var a=e.select("g[class*=math-group]"),o=a.node(),s=qz(r);r||(r=t._fullLayout[s]);var u=r.borderwidth,l;n===q3?l=r.title.font:i.groupTitle?l=i.groupTitle.font:l=r.font;var f=l.size*Tle,c,h;if(o){var d=qh.bBox(o);c=d.height,h=d.width,n===q3?qh.setTranslate(a,u,u+c*.75):qh.setTranslate(a,0,c*.25)}else{var p="."+s+(n===q3?"title":"")+"text",x=e.select(p),b=Ib.lineCount(x),y=x.node();if(c=f*b,h=y?qh.bBox(y).width:0,n===q3)r.title.side==="left"&&(h+=td.itemGap*2),Ib.positionText(x,u+td.titlePad,u+f);else{var k=td.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(k=td.itemGap,h-=r.indentation+r.itemwidth),Ib.positionText(x,k,-f*((b-1)/2-.3))}}n===q3?(r._titleWidth=h,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=h)}function slt(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 llt(e,t,r,n){var i=e._fullLayout,a=qz(n);n||(n=i[a]);var o=i._size,s=xle.isVertical(n),u=xle.isGrouped(n),l=n.entrywidthmode==="fraction",f=n.borderwidth,c=2*f,h=td.itemGap,d=n.indentation+n.itemwidth+h*2,p=2*(f+h),x=Fz(n),b=n.y<0||n.y===0&&x==="top",y=n.y>1||n.y===1&&x==="bottom",k=n.tracegroupgap,E={};n._maxHeight=Math.max(b||y?i.height/2:o.h,30);var A=0;n._width=0,n._height=0;var L=slt(n);if(s)r.each(function(he){var te=he[0].height;qh.setTranslate(this,f+L[0],f+L[1]+n._height+te/2+h),n._height+=te,n._width=Math.max(n._width,he[0].width)}),A=d+n._width,n._width+=h+d+c,n._height+=p,u&&(t.each(function(he,te){qh.setTranslate(this,0,te*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var _=Rz(n),C=n.x<0||n.x===0&&_==="right",M=n.x>1||n.x===1&&_==="left",v=y||b,z=i.width/2;n._maxWidth=Math.max(C?v&&_==="left"?o.l+o.w:z:M?v&&_==="right"?o.r+o.w:z:o.w,2*d);var T=0,F=0;r.each(function(he){var te=Pz(he,n,d);T=Math.max(T,te),F+=te}),A=null;var q=0;if(u){var U=0,H=0,j=0;t.each(function(){var he=0,te=0;Sv.select(this).selectAll("g.traces").each(function(Ee){var Me=Pz(Ee,n,d),Oe=Ee[0].height;qh.setTranslate(this,L[0],L[1]+f+h+Oe/2+te),te+=Oe,he=Math.max(he,Me),E[Ee[0].trace.legendgroup]=he});var ke=he+h;H>0&&ke+f+H>n._maxWidth?(q=Math.max(q,H),H=0,j+=U+k,U=te):U=Math.max(U,te),qh.setTranslate(this,H,j),H+=ke}),n._width=Math.max(q,H)+f,n._height=j+U+p}else{var G=r.size(),O=F+c+(G-1)*h=n._maxWidth&&(q=Math.max(q,be),re=0,ne+=W,n._height+=W,W=0),qh.setTranslate(this,L[0]+f+re,L[1]+f+ne+te/2+h),be=re+ke+h,re+=Ee,W=Math.max(W,te)}),O?(n._width=re+c,n._height=W+p):(n._width=Math.max(q,be)+c,n._height+=W+p)}}n._width=Math.ceil(Math.max(n._width+L[0],n._titleWidth+2*(f+td.titlePad))),n._height=Math.ceil(Math.max(n._height+L[1],n._titleHeight+2*(f+td.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ze=e._context.edits,Ce=ze.legendText||ze.legendPosition;r.each(function(he){var te=Sv.select(this).select("."+a+"toggle"),ke=he[0].height,Ee=he[0].trace.legendgroup,Me=Pz(he,n,d);u&&Ee!==""&&(Me=E[Ee]);var Oe=Ce?d:A||Me;!s&&!l&&(Oe+=h/2),qh.setRect(te,0,-ke/2,Oe,ke)})}function ult(e,t,r,n){var i=e._fullLayout,a=i[t],o=Rz(a),s=Fz(a),u=a.xref==="paper",l=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var f=a.y<.5?"b":"t",c=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(u&&l)return UN.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*B3[o],r:a._width*gle[o],b:a._effHeight*gle[s],t:a._effHeight*B3[s]});u?e._fullLayout._reservedMargin[t][f]=h[f]:l||a.orientation==="v"?e._fullLayout._reservedMargin[t][c]=h[c]:e._fullLayout._reservedMargin[t][f]=h[f]}function Rz(e){return Fh.isRightAnchor(e)?"right":Fh.isCenterAnchor(e)?"center":"left"}function Fz(e){return Fh.isBottomAnchor(e)?"bottom":Fh.isMiddleAnchor(e)?"middle":"top"}function qz(e){return e._id||"legend"}});var ZN=Se(jN=>{"use strict";var Db=Nl(),Sg=_u(),Mle=cd(),fh=Zr(),flt=fh.pushUnique,GN=fh.strTranslate,clt=fh.strRotate,hlt=y3(),A0=Bf(),dlt=Yse(),bm=yu(),vd=Pl(),Bz=gp(),wm=hu(),plt=dd().zindexSeparator,U3=Ul(),Ay=rv(),Rb=PM(),vlt=zN(),ylt=HN(),Dle=Rb.YANGLE,WN=Math.PI*Dle/180,mlt=1/Math.sin(WN),glt=Math.cos(WN),_lt=Math.sin(WN),Wc=Rb.HOVERARROWSIZE,mf=Rb.HOVERTEXTPAD,Ele={box:!0,ohlc:!0,violin:!0,candlestick:!0},xlt={scatter:!0,scattergl:!0,splom:!0};function kle(e,t){return e.distance-t.distance}jN.hover=function(t,r,n,i){t=fh.getGraphDiv(t);var a=r.target;fh.throttle(t._fullLayout._uid+Rb.HOVERID,Rb.HOVERMINTIME,function(){blt(t,r,n,i,a)})};jN.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Ole(i),o=Nle(i),s=t.map(function(b){var y=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,E=b._y0||b.y0||b.y||0,A=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var _=Math.min(y,k),C=Math.max(y,k),M=Math.min(E,A),v=Math.max(E,A),z=b.trace;if(U3.traceIs(z,"gl3d")){var T=i._fullLayout[z.scene]._scene.container,F=T.offsetLeft,q=T.offsetTop;_+=F,C+=F,M+=q,v+=q}L.bbox={x0:_+o,x1:C+o,y0:M+a,y1:v+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}}),u=!1,l=Fle(s,{gd:i,hovermode:"closest",rotateLabels:u,bgColor:r.bgColor||vd.background,container:Db.select(r.container),outerContainer:r.outerContainer||r.container}),f=l.hoverLabels,c=5,h=0,d=0;f.sort(function(b,y){return b.y0-y.y0}).each(function(b,y){var k=b.y0-b.by/2;k-cC[0]._length||fe<0||fe>M[0]._length)return Bz.unhoverRaw(e,t)}if(t.pointerX=Be+C[0]._offset,t.pointerY=fe+M[0]._offset,"xval"in t?j=Ay.flat(a,t.xval):j=Ay.p2c(C,Be),"yval"in t?G=Ay.flat(a,t.yval):G=Ay.p2c(M,fe),!Sg(j[0])||!Sg(G[0]))return fh.warn("Fx.hover failed",t,e),Bz.unhoverRaw(e,t)}var gt=1/0;function Pt(xi,Hi){for(W=0;WEe&&(U.splice(0,Ee),gt=U[0].distance),c&&q!==0&&U.length===0){ke.distance=q,ke.index=!1;var vt=ne._module.hoverPoints(ke,he,te,"closest",{hoverLayer:s._hoverlayer});if(vt&&(vt=vt.filter(function(Tr){return Tr.spikeDistance<=q})),vt&&vt.length){var Dt,Bt=vt.filter(function(Tr){return Tr.xa.showspikes&&Tr.xa.spikesnap!=="hovered data"});if(Bt.length){var sr=Bt[0];Sg(sr.x0)&&Sg(sr.y0)&&(Dt=Xe(sr),(!Me.vLinePoint||Me.vLinePoint.spikeDistance>Dt.spikeDistance)&&(Me.vLinePoint=Dt))}var br=vt.filter(function(Tr){return Tr.ya.showspikes&&Tr.ya.spikesnap!=="hovered data"});if(br.length){var zr=br[0];Sg(zr.x0)&&Sg(zr.y0)&&(Dt=Xe(zr),(!Me.hLinePoint||Me.hLinePoint.spikeDistance>Dt.spikeDistance)&&(Me.hLinePoint=Dt))}}}}}Pt();function Qe(xi,Hi,Jr){for(var ci=null,Di=1/0,Lt,vt=0;vt0&&Math.abs(xi.distance)tt-1;Ot--)fr(U[Ot]);U=Vt,Ct()}var De=e._hoverdata,_e=[],Fe=Ole(e),Pe=Nle(e);for(O=0;O1||U.length>1)||h==="closest"&&Oe&&U.length>1,Er=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),si=Fle(U,{gd:e,hovermode:h,rotateLabels:vr,bgColor:Er,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Ei=si.hoverLabels;if(Ay.isUnifiedHover(h)||(Tlt(Ei,vr,s,si.commonLabelBoundingBox),Ble(Ei,vr,s._invScaleX,s._invScaleY)),i&&i.tagName){var Si=U3.getComponentMethod("annotations","hasClickToShow")(e,_e);dlt(Db.select(i),Si?"pointer":"")}!i||n||!Mlt(e,t,De)||(De&&e.emit("plotly_unhover",{event:t,points:De}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:j,yvals:G}))}function Rle(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 wlt=/([\s\S]*)<\/extra>/;function Fle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,u=t.outerContainer,l=t.commonLabelOpts||{};if(e.length===0)return[[]];var f=t.fontFamily||Rb.HOVERFONT,c=t.fontSize||Rb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,k=e[0],E=k.xa,A=k.ya,L=i.charAt(0),_=L+"Label",C=k[_];if(C===void 0&&E.type==="multicategory")for(var M=0;Mn.width-De&&(_e=n.width-De),ct.attr("d","M"+(ir-_e)+",0L"+(ir-_e+Wc)+","+Ot+Wc+"H"+De+"v"+Ot+(mf*2+Kt.height)+"H"+-De+"V"+Ot+Wc+"H"+(ir-_e-Wc)+"Z"),ir=_e,W.minX=ir-De,W.maxX=ir+De,E.side==="top"?(W.minY=fr-(mf*2+Kt.height),W.maxY=fr-mf):(W.minY=fr+mf,W.maxY=fr+(mf*2+Kt.height))}else{var Fe,Pe,Ie;A.side==="right"?(Fe="start",Pe=1,Ie="",ir=E._offset+E._length):(Fe="end",Pe=-1,Ie="-",ir=E._offset),fr=A._offset+(k.y0+k.y1)/2,rt.attr("text-anchor",Fe),ct.attr("d","M0,0L"+Ie+Wc+","+Wc+"V"+(mf+Kt.height/2)+"h"+Ie+(mf*2+Kt.width)+"V-"+(mf+Kt.height/2)+"H"+Ie+Wc+"V-"+Wc+"Z"),W.minY=fr-(mf+Kt.height/2),W.maxY=fr+(mf+Kt.height/2),A.side==="right"?(W.minX=ir+Wc,W.maxX=ir+Wc+(mf*2+Kt.width)):(W.minX=ir-Wc-(mf*2+Kt.width),W.maxX=ir-Wc);var lt=Kt.height/2,ye=z-Kt.top-lt,ue="clip"+n._uid+"commonlabel"+A._id,de;if(ir=0?At=xt:_t+fe=0?At=_t:Ct+fe=0?Te=Xe:Tt+Ze=0?Te=Tt:jt+Ze=0,(ut.idealAlign==="top"||!St)&&Zt?(Ie-=ye/2,ut.anchor="end"):St?(Ie+=ye/2,ut.anchor="start"):ut.anchor="middle",ut.crossPos=Ie;else{if(ut.pos=Ie,St=Pe+lt/2+Et<=T,Zt=Pe-lt/2-Et>=0,(ut.idealAlign==="left"||!St)&&Zt)Pe-=lt/2,ut.anchor="end";else if(St)Pe+=lt/2,ut.anchor="start";else{ut.anchor="middle";var qr=Et/2,Lr=Pe+qr-T,vr=Pe-qr;Lr>0&&(Pe-=Lr),vr<0&&(Pe+=-vr)}ut.crossPos=Pe}fr.attr("text-anchor",ut.anchor),De&&Ot.attr("text-anchor",ut.anchor),ct.attr("transform",GN(Pe,Ie)+(a?clt(Dle):""))}),{hoverLabels:nt,commonLabelBoundingBox:W}}function Cle(e,t,r,n,i,a){var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=fh.templateString(e.name,e.trace._meta)),o=Ple(e.name,e.nameLength));var u=r.charAt(0),l=u==="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[u+"Label"]===i?s=e[l+"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);var f=e.hovertemplate||!1;if(f){var c=e.hovertemplateLabels||e;e[u+"Label"]!==i&&(c[u+"other"]=c[u+"Val"],c[u+"otherLabel"]=c[u+"Label"]),s=fh.hovertemplateString(f,c,n._d3locale,e.eventData[0]||{},e.trace._meta),s=s.replace(wlt,function(h,d){return o=Ple(d,e.nameLength),""})}return[s,o]}function Tlt(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,u=e.size(),l=new Array(u),f=0,c=n.minX,h=n.maxX,d=n.minY,p=n.maxY,x=function(j){return j*r._invScaleX},b=function(j){return j*r._invScaleY};e.each(function(j){var G=j[i],O=j[a],W=G._id.charAt(0)==="x",re=G.range;f===0&&re&&re[0]>re[1]!==W&&(s=-1);var ne=0,be=W?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ze=qle(j,t),Ce=j.anchor,he=Ce==="end"?-1:1,te,ke;if(Ce==="middle")te=j.crossPos+(W?b(ze.y-j.by/2):x(j.bx/2+j.tx2width/2)),ke=te+(W?b(j.by):x(j.bx));else if(W)te=j.crossPos+b(Wc+ze.y)-b(j.by/2-Wc),ke=te+b(j.by);else{var Ee=x(he*Wc+ze.x),Me=Ee+x(he*j.bx);te=j.crossPos+Math.min(Ee,Me),ke=j.crossPos+Math.max(Ee,Me)}W?d!==void 0&&p!==void 0&&Math.min(ke,p)-Math.max(te,d)>1&&(O.side==="left"?(ne=O._mainLinePosition,be=r.width):be=O._mainLinePosition):c!==void 0&&h!==void 0&&Math.min(ke,h)-Math.max(te,c)>1&&(O.side==="top"?(ne=O._mainLinePosition,be=r.height):be=O._mainLinePosition)}l[f++]=[{datum:j,traceIndex:j.trace.index,dp:0,pos:j.pos,posref:j.posref,size:j.by*(W?mlt:1)/2,pmin:ne,pmax:be}]}),l.sort(function(j,G){return j[0].posref-G[0].posref||s*(G[0].traceIndex-j[0].traceIndex)});var y,k,E,A,L,_,C;function M(j){var G=j[0],O=j[j.length-1];if(k=G.pmin-G.pos-G.dp+G.size,E=O.pos+O.dp+O.size-G.pmax,k>.01){for(L=j.length-1;L>=0;L--)j[L].dp+=k;y=!1}if(!(E<.01)){if(k<-.01){for(L=j.length-1;L>=0;L--)j[L].dp-=E;y=!1}if(y){var W=0;for(A=0;AG.pmax&&W++;for(A=j.length-1;A>=0&&!(W<=0);A--)_=j[A],_.pos>G.pmax-1&&(_.del=!0,W--);for(A=0;A=0;L--)j[L].dp-=E;for(A=j.length-1;A>=0&&!(W<=0);A--)_=j[A],_.pos+_.dp+_.size>G.pmax&&(_.del=!0,W--)}}}for(;!y&&o<=u;){for(o++,y=!0,A=0;A.01){for(L=z.length-1;L>=0;L--)z[L].dp+=k;for(v.push.apply(v,z),l.splice(A+1,1),C=0,L=v.length-1;L>=0;L--)C+=v[L].dp;for(E=C/v.length,L=v.length-1;L>=0;L--)v[L].dp-=E;y=!1}else A++}l.forEach(M)}for(A=l.length-1;A>=0;A--){var q=l[A];for(L=q.length-1;L>=0;L--){var U=q[L],H=U.datum;H.offset=U.dp,H.del=U.del}}}function qle(e,t){var r=0,n=e.offset;return t&&(n*=-_lt,r=e.offset*glt),{x:r,y:n}}function Alt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Wc+mf),n=r+t*(e.txwidth+mf),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+mf),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Ble(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Db.select(this);if(o.del)return s.remove();var u=s.select("text.nums"),l=o.anchor,f=l==="end"?-1:1,c=Alt(o),h=qle(o,t),d=h.x,p=h.y,x=l==="middle";s.select("path").attr("d",x?"M-"+i(o.bx/2+o.tx2width/2)+","+a(p-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(f*Wc+d)+","+a(Wc+p)+"v"+a(o.by/2-Wc)+"h"+i(f*o.bx)+"v-"+a(o.by)+"H"+i(f*Wc+d)+"V"+a(p-Wc)+"Z");var b=d+c.textShiftX,y=p+o.ty0-o.by/2+mf,k=o.textAlign||"auto";k!=="auto"&&(k==="left"&&l!=="start"?(u.attr("text-anchor","start"),b=x?-o.bx/2-o.tx2width/2+mf:-o.bx-mf):k==="right"&&l!=="end"&&(u.attr("text-anchor","end"),b=x?o.bx/2-o.tx2width/2-mf:o.bx+mf)),u.call(A0.positionText,i(b),a(y)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(c.text2ShiftX+c.alignShift*mf+d),a(p+o.ty0-o.by/2+mf)),s.select("rect").call(bm.setRect,i(c.text2ShiftX+(c.alignShift-1)*o.tx2width/2+d),a(p-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Slt(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Sg(h)&&h===0}var s=Array.isArray(r)?function(h,d){var p=fh.castOption(i,r,h);return o(p)?p:fh.extractOption({},n,"",d)}:function(h,d){return fh.extractOption(a,n,h,d)};function u(h,d,p){var x=s(d,p);o(x)&&(e[h]=x)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("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=fh.constrain(e.x0,0,e.xa._length),e.x1=fh.constrain(e.x1,0,e.xa._length),e.y0=fh.constrain(e.y0,0,e.ya._length),e.y1=fh.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 l=wm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+l+" / -"+wm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+l,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var f=wm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+f+" / -"+wm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+f,t==="y"&&(e.distance+=1)}var c=e.hoverinfo||e.trace.hoverinfo;return c&&c!=="all"&&(c=Array.isArray(c)?c:c.split("+"),c.indexOf("x")===-1&&(e.xLabel=void 0),c.indexOf("y")===-1&&(e.yLabel=void 0),c.indexOf("z")===-1&&(e.zLabel=void 0),c.indexOf("text")===-1&&(e.text=void 0),c.indexOf("name")===-1&&(e.name=void 0)),e}function Lle(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,u=!!t.vLinePoint,l,f;if(n.selectAll(".spikeline").remove(),!!(u||s)){var c=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,p;l=h&&h.xa,f=h&&h.ya;var x=f.spikesnap;x==="cursor"?(d=o.pointerX,p=o.pointerY):(d=l._offset+h.x,p=f._offset+h.y);var b=Mle.readability(h.color,c)<1.5?vd.contrast(c):h.color,y=f.spikemode,k=f.spikethickness,E=f.spikecolor||b,A=wm.getPxPosition(e,f),L,_;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=A,_=d),y.indexOf("across")!==-1){var C=f._counterDomainMin,M=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),M=Math.max(M,f.position)),L=a.l+C*a.w,_=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:_,y1:p,y2:p,"stroke-width":k,stroke:E,"stroke-dasharray":bm.dashStyle(f.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:_,y1:p,y2:p,"stroke-width":k+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:A+(f.side!=="right"?k:-k),cy:p,r:k,fill:E}).classed("spikeline",!0)}if(u){var v=t.vLinePoint,z,T;l=v&&v.xa,f=v&&v.ya;var F=l.spikesnap;F==="cursor"?(z=o.pointerX,T=o.pointerY):(z=l._offset+v.x,T=f._offset+v.y);var q=Mle.readability(v.color,c)<1.5?vd.contrast(c):v.color,U=l.spikemode,H=l.spikethickness,j=l.spikecolor||q,G=wm.getPxPosition(e,l),O,W;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(O=G,W=T),U.indexOf("across")!==-1){var re=l._counterDomainMin,ne=l._counterDomainMax;l.anchor==="free"&&(re=Math.min(re,l.position),ne=Math.max(ne,l.position)),O=a.t+(1-ne)*a.h,W=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:z,x2:z,y1:O,y2:W,"stroke-width":H,stroke:j,"stroke-dasharray":bm.dashStyle(l.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:z,x2:z,y1:O,y2:W,"stroke-width":H+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:z,cy:G-(l.side!=="top"?H:-H),r:H,fill:j}).classed("spikeline",!0)}}}function Mlt(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))return!0}return!1}function zle(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Ple(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Elt(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o{"use strict";var klt=Zr(),Clt=Pl(),Llt=rv().isUnifiedHover;Ule.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&&Llt(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=Clt.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),klt.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Hle=Se((fnr,Vle)=>{"use strict";var zlt=Zr(),Plt=o5(),Ilt=O1();Vle.exports=function(t,r){function n(i,a){return zlt.coerce(t,r,Ilt,i,a)}Plt(t,r,n)}});var jle=Se((cnr,Wle)=>{"use strict";var Gle=Zr(),Dlt=i3(),Rlt=o5();Wle.exports=function(t,r,n,i){function a(s,u){return Gle.coerce(t,r,Dlt,s,u)}var o=Gle.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Rlt(t,r,a,o)}});var XN=Se((hnr,Zle)=>{"use strict";var Flt=Zr(),qlt=O1();Zle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Flt.coerce(t,r,qlt,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var Kle=Se((dnr,Yle)=>{"use strict";var Xle=Zr(),Blt=O1(),Olt=XN(),Nlt=o5();Yle.exports=function(t,r){function n(f,c){return Xle.coerce(t,r,Blt,f,c)}var i=Olt(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),u=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||u)&&l===1||(o||s)&&u&&l===2)&&(r.dragmode="pan"),Nlt(t,r,n),Xle.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Qle=Se((pnr,$le)=>{"use strict";var YN=Zr(),Jle=Ul();$le.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(l){return function(f){return YN.coerceHoverinfo({hoverinfo:f},{_module:l._module},n)}}for(var a=0;a{"use strict";var Vlt=Ul(),Hlt=ZN().hover;eue.exports=function(t,r,n){var i=Vlt.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&Hlt(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 jc=Se((ynr,nue)=>{"use strict";var Glt=Nl(),Oz=Zr(),Wlt=gp(),s5=rv(),rue=O1(),iue=ZN();nue.exports={moduleType:"component",name:"fx",constants:PM(),schema:{layout:rue},attributes:i3(),layoutAttributes:rue,supplyLayoutGlobalDefaults:Hle(),supplyDefaults:jle(),supplyLayoutDefaults:Kle(),calc:Qle(),getDistanceFunction:s5.getDistanceFunction,getClosest:s5.getClosest,inbox:s5.inbox,quadrature:s5.quadrature,appendArrayPointValue:s5.appendArrayPointValue,castHoverOption:Zlt,castHoverinfo:Xlt,hover:iue.hover,unhover:Wlt.unhover,loneHover:iue.loneHover,loneUnhover:jlt,click:tue()};function jlt(e){var t=Oz.isD3Selection(e)?e:Glt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function Zlt(e,t,r){return Oz.castOption(e,t,"hoverlabel."+r)}function Xlt(e,t,r){function n(i){return Oz.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return Oz.castOption(e,r,"hoverinfo",n)}});var Sy=Se(Mg=>{"use strict";Mg.selectMode=function(e){return e==="lasso"||e==="select"};Mg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Mg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Mg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Mg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Mg.selectingOrDrawing=function(e){return Mg.freeMode(e)||Mg.rectMode(e)}});var l5=Se((gnr,aue)=>{"use strict";aue.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 Nz=Se((_nr,oue)=>{"use strict";oue.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 Vz=Se((xnr,sue)=>{"use strict";var Uz=32;sue.exports={CIRCLE_SIDES:Uz,i000:0,i090:Uz/4,i180:Uz/2,i270:Uz/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var Hz=Se((bnr,uue)=>{"use strict";var Ylt=Zr().strTranslate;function lue(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 Klt(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 Jlt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return lue(e,r[t])}}function $lt(e){return Ylt(e.xaxis._offset,e.yaxis._offset)}uue.exports={p2r:lue,r2p:Klt,axValue:Jlt,getTransform:$lt}});var u_=Se(Eg=>{"use strict";var Qlt=XM(),hue=Vz(),V3=hue.CIRCLE_SIDES,KN=hue.SQRT2,due=Hz(),fue=due.p2r,cue=due.r2p,eut=[0,3,4,5,6,1,2],tut=[0,3,4,1,2];Eg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&u{"use strict";var gue=Sy(),rut=gue.drawMode,iut=gue.openMode,H3=Vz(),pue=H3.i000,vue=H3.i090,yue=H3.i180,mue=H3.i270,nut=H3.cos45,aut=H3.sin45,_ue=Hz(),Wz=_ue.p2r,f_=_ue.r2p,out=Q1(),sut=out.clearOutline,jz=u_(),lut=jz.readPaths,uut=jz.writePaths,fut=jz.ellipseOver,cut=jz.fixDatesForPaths;function hut(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(!rut(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var dut=Sy(),put=dut.selectMode,vut=Q1(),yut=vut.clearOutline,JN=u_(),mut=JN.readPaths,gut=JN.writePaths,_ut=JN.fixDatesForPaths;wue.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,u=s.xaxis,l=s.yaxis,f=r.isActiveSelection,c=r.dragmode,h=(a.layout||{}).selections||[];if(!put(c)&&f!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";Tue.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 c_=Se(Fd=>{"use strict";var Fb=f5(),Aue=Zr(),Xz=hu();Fd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Fd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Fd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Fd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Fd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Fb.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.substr(1).match(Fb.paramRE);if(!(!s||s.lengthd&&(x="X"),x});return l>d&&(p=p.replace(/[\s,]*X.*/,""),Aue.log("Ignoring extra params in segment "+u)),f+p})}function c5(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 e7=Se((Enr,kue)=>{"use strict";var but=Zr(),G3=hu(),Sue=Bf(),Mue=yu(),wut=u_().readPaths,QN=c_(),Tut=QN.getPathString,Eue=xL(),Aut=Qh().FROM_TL;kue.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=G3.getFromId(t,n.xref),u=G3.getFromId(t,n.yref);for(var l in Eue){var f=Eue[l](n,s,u);f!==void 0&&(o[l]=f)}}a=but.texttemplateStringForShapes(n.label.texttemplate,{},t._fullLayout._d3locale,o)}else a=n.label.text;var c={"data-index":r},h=n.label.font,d={"data-notex":1},p=i.append("g").attr(c).classed("shape-label",!0),x=p.append("text").attr(d).classed("shape-label-text",!0).text(a),b,y,k,E;if(n.path){var A=Tut(t,n),L=wut(A,t);b=1/0,k=1/0,y=-1/0,E=-1/0;for(var _=0;_=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Mut(e,t,r,n,i,a,o){var s=i.label.textposition,u=i.label.textangle,l=i.label.padding,f=i.type,c=Math.PI/180*a,h=Math.sin(c),d=Math.cos(c),p=i.label.xanchor,x=i.label.yanchor,b,y,k,E;if(f==="line"){s==="start"?(b=e,y=t):s==="end"?(b=r,y=n):(b=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?u==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var Eut=Zr(),kut=Eut.strTranslate,Cue=gp(),Pue=Sy(),Cut=Pue.drawMode,Iue=Pue.selectMode,Due=Ul(),Lue=Pl(),Kz=Vz(),Lut=Kz.i000,zut=Kz.i090,Put=Kz.i180,Iut=Kz.i270,Dut=Q1(),Rue=Dut.clearOutlineControllers,r7=u_(),Yz=r7.pointsOnRectangle,t7=r7.pointsOnEllipse,Rut=r7.writePaths,Fut=Zz().newShapes,qut=Zz().createShapeObj,But=$N(),Out=e7();Fue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(t7(t[0])||n.hasText)&&s({redrawing:!0})}function s(G){var O={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,O=Fut(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,O=But(r,n),a._fullLayout._reselect=!0),Object.keys(O).length&&Due.call((G||{}).redrawing?"relayout":"_guiRelayout",a,O)}var u=a._fullLayout,l=u._zoomlayer,f=n.dragmode,c=Cut(f),h=Iue(f);(c||h)&&(a._fullLayout._outlining=!0),Rue(a),r.attr("d",Rut(t));var d,p,x,b,y;if(!i&&(n.isActiveShape||n.isActiveSelection)){y=Nut([],t);var k=l.append("g").attr("class","outline-controllers");z(k),j()}if(c&&n.hasText){var E=l.select(".label-temp"),A=qut(r,n,n.dragmode);Out(a,"label-temp",A,E)}function L(G){x=+G.srcElement.getAttribute("data-i"),b=+G.srcElement.getAttribute("data-j"),d[x][b].moveFn=_}function _(G,O){if(t.length){var W=y[x][b][1],re=y[x][b][2],ne=t[x],be=ne.length;if(Yz(ne)){var ze=G,Ce=O;if(n.isActiveSelection){var he=zue(ne,b);he[1]===ne[b][1]?Ce=0:ze=0}for(var te=0;te1&&!(G.length===2&&G[1][0]==="Z")&&(b===0&&(G[0][0]="M"),t[x]=G,o(),s())}}function v(G,O){if(G===2){x=+O.srcElement.getAttribute("data-i"),b=+O.srcElement.getAttribute("data-j");var W=t[x];!Yz(W)&&!t7(W)&&M()}}function z(G){d=[];for(var O=0;O{"use strict";var Vut=Nl(),Vue=Ul(),que=Zr(),W3=hu(),Hut=u_().readPaths,Gut=Jz(),Qz=e7(),Hue=Q1().clearOutlineControllers,i7=Pl(),a7=yu(),Wut=_f().arrayEditor,Bue=gp(),Oue=Ty(),qb=f5(),Mv=c_(),n7=Mv.getPathString;jue.exports={draw:o7,drawOne:Gue,eraseActiveShape:Xut,drawLabel:Qz};function o7(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&&xt>s&&!Qe.shiftKey?Bue.getCursor(_t/Tt,1-Ct/xt):"move";Oue(t,jt),ke=jt.split("-")[0]}}function Re(Qe){$z(e)||(u&&(y=ne(r.xanchor)),l&&(k=be(r.yanchor)),r.type==="path"?T=r.path:(d=u?r.x0:ne(r.x0),p=l?r.y0:be(r.y0),x=u?r.x1:ne(r.x1),b=l?r.y1:be(r.y1)),db?(E=p,C="y0",A=b,M="y1"):(E=b,C="y1",A=p,M="y0"),Oe(Qe),et(i,r),Pt(t,r,e),te.moveFn=ke==="move"?fe:Ze,te.altKey=Qe.altKey)}function me(){$z(e)||(Oue(t),gt(i),Wue(t,e,r),Vue.call("_guiRelayout",e,a.getUpdateObj()))}function Be(){$z(e)||gt(i)}function fe(Qe,Xe){if(r.type==="path"){var Tt=function(Ct){return Ct},xt=Tt,_t=Tt;u?h("xanchor",r.xanchor=ze(y+Qe)):(xt=function(jt){return ze(ne(jt)+Qe)},q&&q.type==="date"&&(xt=Mv.encodeDate(xt))),l?h("yanchor",r.yanchor=Ce(k+Xe)):(_t=function(jt){return Ce(be(jt)+Xe)},H&&H.type==="date"&&(_t=Mv.encodeDate(_t))),h("path",r.path=Nue(T,xt,_t))}else u?h("xanchor",r.xanchor=ze(y+Qe)):(h("x0",r.x0=ze(d+Qe)),h("x1",r.x1=ze(x+Qe))),l?h("yanchor",r.yanchor=Ce(k+Xe)):(h("y0",r.y0=Ce(p+Xe)),h("y1",r.y1=Ce(b+Xe)));t.attr("d",n7(e,r)),et(i,r),Qz(e,n,r,F)}function Ze(Qe,Xe){if(c){var Tt=function(Kt){return Kt},xt=Tt,_t=Tt;u?h("xanchor",r.xanchor=ze(y+Qe)):(xt=function(ir){return ze(ne(ir)+Qe)},q&&q.type==="date"&&(xt=Mv.encodeDate(xt))),l?h("yanchor",r.yanchor=Ce(k+Xe)):(_t=function(ir){return Ce(be(ir)+Xe)},H&&H.type==="date"&&(_t=Mv.encodeDate(_t))),h("path",r.path=Nue(T,xt,_t))}else if(f){if(ke==="resize-over-start-point"){var Ct=d+Qe,jt=l?p-Xe:p+Xe;h("x0",r.x0=u?Ct:ze(Ct)),h("y0",r.y0=l?jt:Ce(jt))}else if(ke==="resize-over-end-point"){var At=x+Qe,Te=l?b-Xe:b+Xe;h("x1",r.x1=u?At:ze(At)),h("y1",r.y1=l?Te:Ce(Te))}}else{var nt=function(Kt){return ke.indexOf(Kt)!==-1},ut=nt("n"),ct=nt("s"),rt=nt("w"),je=nt("e"),tt=ut?E+Xe:E,Je=ct?A+Xe:A,Mt=rt?L+Qe:L,Vt=je?_+Qe:_;l&&(ut&&(tt=E-Xe),ct&&(Je=A-Xe)),(!l&&Je-tt>s||l&&tt-Je>s)&&(h(C,r[C]=l?tt:Ce(tt)),h(M,r[M]=l?Je:Ce(Je))),Vt-Mt>o&&(h(v,r[v]=u?Mt:ze(Mt)),h(z,r[z]=u?Vt:ze(Vt)))}t.attr("d",n7(e,r)),et(i,r),Qz(e,n,r,F)}function et(Qe,Xe){(u||l)&&Tt();function Tt(){var xt=Xe.type!=="path",_t=Qe.selectAll(".visual-cue").data([0]),Ct=1;_t.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var jt=ne(u?Xe.xanchor:que.midRange(xt?[Xe.x0,Xe.x1]:Mv.extractPathCoords(Xe.path,qb.paramIsX))),At=be(l?Xe.yanchor:que.midRange(xt?[Xe.y0,Xe.y1]:Mv.extractPathCoords(Xe.path,qb.paramIsY)));if(jt=Mv.roundPositionForSharpStrokeRendering(jt,Ct),At=Mv.roundPositionForSharpStrokeRendering(At,Ct),u&&l){var Te="M"+(jt-1-Ct)+","+(At-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";_t.attr("d",Te)}else if(u){var nt="M"+(jt-1-Ct)+","+(At-9-Ct)+"v18 h2 v-18 Z";_t.attr("d",nt)}else{var ut="M"+(jt-9-Ct)+","+(At-1-Ct)+"h18 v2 h-18 Z";_t.attr("d",ut)}}}function gt(Qe){Qe.selectAll(".visual-cue").remove()}function Pt(Qe,Xe,Tt){var xt=Xe.xref,_t=Xe.yref,Ct=W3.getFromId(Tt,xt),jt=W3.getFromId(Tt,_t),At="";xt!=="paper"&&!Ct.autorange&&(At+=xt),_t!=="paper"&&!jt.autorange&&(At+=_t),a7.setClipUrl(Qe,At?"clip"+Tt._fullLayout._uid+At:null,Tt)}}function Nue(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],u=qb.numParams[a],l=n.substr(1).replace(qb.paramRE,function(f){return i>=u||(o[i]?f=t(f):s[i]&&(f=r(f)),i++),f});return a+l})}function Zut(e,t){if(eP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Uue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Uue,o7(e)}}}function Uue(e){if(eP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Hue(e),delete e._fullLayout._activeShapeIndex,o7(e))}}function Xut(e){if(eP(e)){Hue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=Ul(),Zue=Sc(),Xue=$c(),Mf=Nz(),Yut=tP().eraseActiveShape,rP=Zr(),pf=rP._,Ef=tfe.exports={};Ef.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?pf(e,"Download plot as a png"):pf(e,"Download plot")},icon:Mf.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};rP.notifier(pf(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){rP.notifier(pf(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){rP.notifier(pf(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ef.sendDataToCloud={name:"sendDataToCloud",title:function(e){return pf(e,"Edit in Chart Studio")},icon:Mf.disk,click:function(e){Zue.sendDataToCloud(e)}};Ef.editInChartStudio={name:"editInChartStudio",title:function(e){return pf(e,"Edit in Chart Studio")},icon:Mf.pencil,click:function(e){Zue.sendDataToCloud(e)}};Ef.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return pf(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Mf.zoombox,click:Bp};Ef.pan2d={name:"pan2d",_cat:"pan",title:function(e){return pf(e,"Pan")},attr:"dragmode",val:"pan",icon:Mf.pan,click:Bp};Ef.select2d={name:"select2d",_cat:"select",title:function(e){return pf(e,"Box Select")},attr:"dragmode",val:"select",icon:Mf.selectbox,click:Bp};Ef.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return pf(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Mf.lasso,click:Bp};Ef.drawclosedpath={name:"drawclosedpath",title:function(e){return pf(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Mf.drawclosedpath,click:Bp};Ef.drawopenpath={name:"drawopenpath",title:function(e){return pf(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Mf.drawopenpath,click:Bp};Ef.drawline={name:"drawline",title:function(e){return pf(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Mf.drawline,click:Bp};Ef.drawrect={name:"drawrect",title:function(e){return pf(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Mf.drawrect,click:Bp};Ef.drawcircle={name:"drawcircle",title:function(e){return pf(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Mf.drawcircle,click:Bp};Ef.eraseshape={name:"eraseshape",title:function(e){return pf(e,"Erase active shape")},icon:Mf.eraseshape,click:Yut};Ef.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return pf(e,"Zoom in")},attr:"zoom",val:"in",icon:Mf.zoom_plus,click:Bp};Ef.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return pf(e,"Zoom out")},attr:"zoom",val:"out",icon:Mf.zoom_minus,click:Bp};Ef.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return pf(e,"Autoscale")},attr:"zoom",val:"auto",icon:Mf.autoscale,click:Bp};Ef.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return pf(e,"Reset axes")},attr:"zoom",val:"reset",icon:Mf.home,click:Bp};Ef.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return pf(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Mf.tooltip_basic,gravity:"ne",click:Bp};Ef.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return pf(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Mf.tooltip_compare,gravity:"ne",click:Bp};function Bp(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Xue.list(e,null,!0),u=a._cartesianSpikesEnabled,l,f;if(n==="zoom"){var c=i==="in"?.5:2,h=(1+c)/2,d=(1-c)/2,p;for(f=0;f{"use strict";var rfe=u7(),$ut=Object.keys(rfe),ife=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],nfe=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(ife),Z3=[],Qut=function(e){if(nfe.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Z3.indexOf(t)===-1&&Z3.push(t),Z3.indexOf(r)===-1&&Z3.push(r)}};$ut.forEach(function(e){Qut(rfe[e])});Z3.sort();afe.exports={DRAW_MODES:ife,backButtons:nfe,foreButtons:Z3}});var c7=Se((Inr,ofe)=>{"use strict";var Pnr=f7();ofe.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 lfe=Se((Dnr,sfe)=>{"use strict";var eft=Zr(),h5=Pl(),tft=_f(),rft=c7();sfe.exports=function(t,r){var n=t.modebar||{},i=tft.newContainer(r,"modebar");function a(s,u){return eft.coerce(n,i,rft,s,u)}a("orientation"),a("bgcolor",h5.addOpacity(r.paper_bgcolor,.5));var o=h5.contrast(h5.rgb(r.modebar.bgcolor));a("color",h5.addOpacity(o,.3)),a("activecolor",h5.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var hfe=Se((Rnr,cfe)=>{"use strict";var h7=Nl(),ift=_u(),nP=Zr(),ufe=Nz(),nft=QC().version,aft=new DOMParser;function ffe(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=ffe.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._uid=i,this.element.className="modebar",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(c){c.style.backgroundColor=a.bgcolor}),nP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color);var s=!this.hasButtons(t),u=this.hasLogo!==r.displaylogo,l=this.locale!==r.locale;if(this.locale=r.locale,(s||u||l)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()};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("a");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),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&&h7.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||ufe.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Tm.createIcon=function(e){var t=ift(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=aft.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=h7.select(n),u=function(c,h){var d=t.modebar,p=c.querySelector(".icon path");p&&(h||c.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(a===r){var l=!s.classed("active");s.classed("active",l),u(n,l)}}else{var f=a===null?a:nP.nestedProperty(t,a).get();s.classed("active",f===i),u(n,f===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 lft=$c(),dfe=ec(),d7=Ul(),uft=rv().isUnifiedHover,fft=hfe(),aP=u7(),cft=f7().DRAW_MODES,hft=Zr().extendDeep;pfe.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=gft(a):!n.displayModeBar&&n.watermark?o=[]:o=dft(t),i?i.update(t,o):r._modeBar=fft(t,o)};function dft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(O,W){if(typeof W=="string"){if(W.toLowerCase()===O.toLowerCase())return!0}else{var re=W.name,ne=W._cat||W.name;if(re===O||ne===O.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(O){for(var W=0;W1?(z=["toggleHover"],T=["resetViews"]):c?(v=["zoomInGeo","zoomOutGeo"],z=["hoverClosestGeo"],T=["resetGeo"]):f?(z=["hoverClosest3d"],T=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(v=["zoomInMapbox","zoomOutMapbox"],z=["toggleHover"],T=["resetViewMapbox"]):b?(v=["zoomInMap","zoomOutMap"],z=["toggleHover"],T=["resetViewMap"]):h?z=["hoverClosestPie"]:E?(z=["hoverClosestCartesian","hoverCompareCartesian"],T=["resetViewSankey"]):z=["toggleHover"],l&&z.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(yft(r)||L)&&(z=[]),l&&!A&&(v=["zoomIn2d","zoomOut2d","autoScale2d"],T[0]!=="resetViews"&&(T=["resetScale2d"])),f?F=["zoom3d","pan3d","orbitRotation","tableRotation"]:l&&!A||p?F=["zoom2d","pan2d"]:x||b||c?F=["pan2d"]:y&&(F=["zoom2d"]),vft(r)&&F.push("select2d","lasso2d");var q=[],U=function(O){q.indexOf(O)===-1&&z.indexOf(O)!==-1&&q.push(O)};if(Array.isArray(s)){for(var H=[],j=0;j{"use strict";yfe.exports={moduleType:"component",name:"modebar",layoutAttributes:c7(),supplyLayoutDefaults:lfe(),manage:vfe()}});var v7=Se((Bnr,mfe)=>{"use strict";var _ft=Qh().FROM_BL;mfe.exports=function(t,r,n){n===void 0&&(n=_ft[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 Ob=Se(d5=>{"use strict";var Bb=Zr(),y7=wy(),My=$c().id2name,xft=Rd(),gfe=v7(),bft=gm(),wft=ju().ALMOST_EQUAL,Tft=Qh().FROM_BL;d5.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,u,l,f,c,h,d,p;for(s=0;sa?r.substr(a):n.substr(i))+o}function Sft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;owft*p&&!k)){for(a=0;aF&&rez&&(z=re);var be=(z-v)/(2*T);c/=be,v=u.l2r(v),z=u.l2r(z),u.range=u._input.range=_{"use strict";var sP=Nl(),Op=Ul(),Jv=Sc(),M0=Zr(),_7=Bf(),x7=l5(),p5=Pl(),X3=yu(),wfe=Mb(),Efe=p7(),v5=hu(),kg=Qh(),kfe=Ob(),Mft=kfe.enforce,Eft=kfe.clean,Tfe=wy().doAutoRange,Cfe="start",kft="middle",Lfe="end",Cft=dd().zindexSeparator;yd.layoutStyles=function(e){return M0.syncOrAsync([Jv.doAutoMargin,zft],e)};function Lft(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function zft(e){var t=e._fullLayout,r=t._size,n=r.p,i=v5.list(e,"",!0),a,o,s,u,l,f;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(X3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),yd.drawMainTitle(e),Efe.manage(e),!t._has("cartesian"))return Jv.previousPromises(e);function c(Re,me,Be){var fe=Re._lw/2;if(Re._id.charAt(0)==="x"){if(me){if(Be==="top")return me._offset-n-fe}else return r.t+r.h*(1-(Re.position||0))+fe%1;return me._offset+me._length+n+fe}if(me){if(Be==="right")return me._offset+me._length+n+fe}else return r.l+r.w*(Re.position||0)+fe%1;return me._offset-n-fe}for(a=0;a0){Rft(e,a,l,u),s.attr({x:o,y:a,"text-anchor":n,dy:Mfe(t.yanchor)}).call(_7.positionText,o,a);var f=(t.text.match(_7.BR_TAG_ALL)||[]).length;if(f){var c=kg.LINE_SPACING*f+kg.MID_SHIFT;t.y===0&&(c=-c),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-c+"em";this.setAttribute("dy",b)})}var h=sP.selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),p=d.y+d.height,x=p+wfe.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:x,"text-anchor":n,dy:Mfe(t.yanchor)}).call(_7.positionText,o,x)}}}};function Pft(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.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=Ift(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Rft(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},u={};a.yref==="paper"&&Pft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(u[o]=r,e._fullLayout._reservedMargin[i]=u),Jv.allowAutoMargin(e,i),Jv.autoMargin(e,i,s)}function Fft(e,t){var r=e.title,n=e._size,i=0;switch(t===Cfe?i=r.pad.l:t===Lfe&&(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 qft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===kg.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 Mfe(e){return e==="top"?kg.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":kg.MID_SHIFT+"em"}function Bft(e){var t=e.title,r=kft;return M0.isRightAnchor(t)?r=Lfe:M0.isLeftAnchor(t)&&(r=Cfe),r}function Oft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=kg.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=kg.MID_SHIFT+"em"),r}yd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var Nft=u_().readPaths,Uft=Jz(),zfe=Q1().clearOutlineControllers,b7=Pl(),Pfe=yu(),Vft=_f().arrayEditor,Ife=c_(),Hft=Ife.getPathString;Rfe.exports={draw:lP,drawOne:Dfe,activateLastSelection:jft};function lP(e){var t=e._fullLayout;zfe(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 y=o.append("path").attr(u).style("opacity",b?.1:l).call(b7.stroke,c).call(b7.fill,f).call(Pfe.dashLine,b?"solid":d,b?4+h:h);if(Gft(y,e,n),p){var k=Vft(e.layout,"selections",n);y.style({cursor:"move"});var E={element:y.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},A=Nft(s,e);Uft(A,y,E)}else y.style("pointer-events",b?"all":"none");x[b]=y}var L=x[0],_=x[1];_.node().addEventListener("click",function(){return Wft(e,L)})}}function Gft(e,t,r){var n=r.xref+r.yref;Pfe.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Wft(e,t){if(uP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){w7(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=w7,lP(e)}}}function jft(e){if(uP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=w7,lP(e)}}function w7(e){if(uP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(zfe(e),delete e._fullLayout._activeSelectionIndex,lP(e))}}});var qfe=Se((Vnr,Ffe)=>{function Zft(){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}Ffe.exports=Zft});var Ofe=Se((Hnr,Bfe)=>{function Xft(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],u=i[1],l=r[0],f=r[1];return(s-a)*(f-o)-(u-o)*(l-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],u=i[1]-n[1],l=s*o+a*u;if(l-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-a>e&&(o-f)*(a-c)/(s-c)+f-i>e&&(u=!u),o=f,s=c}return u}};return t}Bfe.exports=Xft});var Ufe=Se((Gnr,Nfe)=>{var Yft={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}};Nfe.exports=Yft});var Hfe=Se((Wnr,Vfe)=>{var m5=Ufe();function Kft(e,t,r){function n(p,x){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:null,below:null},otherFill:null}}function i(p,x,b){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=m5.create();function o(p,x,b,y,k,E){var A=t.pointsCompare(x,k);return A!==0?A:t.pointsSame(b,E)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(b,y?k:E,y?E:k)?1:-1}function s(p,x){a.insertBefore(p,function(b){var y=o(p.isStart,p.pt,x,b.isStart,b.pt,b.other.pt);return y<0})}function u(p,x){var b=m5.node({isStart:!0,pt:p.start,seg:p,primary:x,other:null,status:null});return s(b,p.end),b}function l(p,x,b){var y=m5.node({isStart:!1,pt:x.end,seg:x,primary:b,other:p,status:null});p.other=y,s(y,p.pt)}function f(p,x){var b=u(p,x);return l(b,p,x),b}function c(p,x){r&&r.segmentChop(p.seg,x),p.other.remove(),p.seg.end=x,p.other.pt=x,s(p.other,p.pt)}function h(p,x){var b=i(x,p.seg.end,p.seg);return c(p,x),f(b,p.primary)}function d(p,x){var b=m5.create();function y(H,j){var G=H.seg.start,O=H.seg.end,W=j.seg.start,re=j.seg.end;return t.pointsCollinear(G,W,re)?t.pointsCollinear(O,W,re)||t.pointAboveOrOnLine(O,W,re)?1:-1:t.pointAboveOrOnLine(G,W,re)?1:-1}function k(H){return b.findTransition(function(j){var G=y(H,j.ev);return G>0})}function E(H,j){var G=H.seg,O=j.seg,W=G.start,re=G.end,ne=O.start,be=O.end;r&&r.checkIntersection(G,O);var ze=t.linesIntersect(W,re,ne,be);if(ze===!1){if(!t.pointsCollinear(W,re,ne)||t.pointsSame(W,be)||t.pointsSame(re,ne))return!1;var Ce=t.pointsSame(W,ne),he=t.pointsSame(re,be);if(Ce&&he)return j;var te=!Ce&&t.pointBetween(W,ne,be),ke=!he&&t.pointBetween(re,ne,be);if(Ce)return ke?h(j,re):h(H,be),j;te&&(he||(ke?h(j,re):h(H,be)),h(j,W))}else ze.alongA===0&&(ze.alongB===-1?h(H,ne):ze.alongB===0?h(H,ze.pt):ze.alongB===1&&h(H,be)),ze.alongB===0&&(ze.alongA===-1?h(j,W):ze.alongA===0?h(j,ze.pt):ze.alongA===1&&h(j,re));return!1}for(var A=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let H=function(){if(C){var j=E(L,C);if(j)return j}return M?E(L,M):!1};var U=H;r&&r.segmentNew(L.seg,L.primary);var _=k(L),C=_.before?_.before.ev:null,M=_.after?_.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var v=H();if(v){if(e){var z;L.seg.myFill.below===null?z=!0:z=L.seg.myFill.above!==L.seg.myFill.below,z&&(v.seg.myFill.above=!v.seg.myFill.above)}else v.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(v.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var z;L.seg.myFill.below===null?z=!0:z=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=p,z?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?x:p,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=_.insert(m5.node({ev:L}))}else{var F=L.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(F.prev)&&b.exists(F.next)&&E(F.prev.ev,F.next.ev),r&&r.statusRemove(F.ev.seg),F.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}A.push(L.seg)}a.getHead().remove()}return r&&r.done(),A}return e?{addRegion:function(p){for(var x,b=p[p.length-1],y=0;y{function Jft(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 u={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},f=u;function c(U,H,j){return f.index=U,f.matches_head=H,f.matches_pt1=j,f===u?(f=l,!1):(f=null,!0)}for(var h=0;h{function g5(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 $ft={union:function(e,t){return g5(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return g5(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return g5(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return g5(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return g5(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};jfe.exports=$ft});var Yfe=Se((Xnr,Xfe)=>{var Qft={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(l){var f=l.slice(0,l.length-1);return e.segments({inverted:!1,regions:[f]})}for(var s=o(a[0]),u=1;u{var ect=qfe(),tct=Ofe(),Kfe=Hfe(),rct=Wfe(),_5=Zfe(),Jfe=Yfe(),E0=!1,x5=tct(),Ev;Ev={buildLog:function(e){return e===!0?E0=ect():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return x5.epsilon(e)},segments:function(e){var t=Kfe(!0,x5,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Kfe(!1,x5,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:_5.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:_5.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:_5.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:_5.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:_5.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:rct(e.segments,x5,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Jfe.toPolygon(Ev,e)},polygonToGeoJSON:function(e){return Jfe.fromPolygon(Ev,x5,e)},union:function(e,t){return b5(e,t,Ev.selectUnion)},intersect:function(e,t){return b5(e,t,Ev.selectIntersect)},difference:function(e,t){return b5(e,t,Ev.selectDifference)},differenceRev:function(e,t){return b5(e,t,Ev.selectDifferenceRev)},xor:function(e,t){return b5(e,t,Ev.selectXor)}};function b5(e,t,r){var n=Ev.segments(e),i=Ev.segments(t),a=Ev.combine(n,i),o=r(a);return Ev.polygon(o)}typeof window=="object"&&(window.PolyBool=Ev);$fe.exports=Ev});var tce=Se((Knr,ece)=>{ece.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 u=i-n,l=0,f=u-1;lo!=p>o&&a<(d-c)*(o-h)/(p-h)+c;x&&(s=!s)}return s}});var w5=Se((Jnr,rce)=>{"use strict";var A7=yL().dot,fP=ju().BADNUM,cP=rce.exports={};cP.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||y===fP||yo||x&&l(p))}function c(p,x){var b=p[0],y=p[1];if(b===fP||bi||y===fP||yo)return!1;var k=r.length,E=r[0][0],A=r[0][1],L=0,_,C,M,v,z;for(_=1;_Math.max(C,E)||y>Math.max(M,A)))if(ys||Math.abs(A7(c,l))>i)return!0;return!1};cP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(u){t.push(u);var l=n.length,f=i;n.splice(a+1);for(var c=f+1;c1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var nce=Se(($nr,ice)=>{"use strict";ice.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Mce=Se((Qnr,Sce)=>{"use strict";var ace=Qfe(),ict=tce(),S5=Ul(),nct=yu().dashStyle,T5=Pl(),act=jc(),oct=rv().makeEventData,L5=Sy(),sct=L5.freeMode,lct=L5.rectMode,M5=L5.drawMode,k7=L5.openMode,C7=L5.selectMode,oce=c_(),sce=f5(),hce=Jz(),dce=Q1().clearOutline,pce=u_(),S7=pce.handleEllipse,uct=pce.readPaths,fct=Zz().newShapes,cct=$N(),hct=T7().activateLastSelection,dP=Zr(),dct=dP.sorterAsc,vce=w5(),A5=LL(),k0=$c().getFromId,pct=l5(),vct=y5().redrawReglTraces,pP=nce(),Am=pP.MINSELECT,yct=vce.filter,L7=vce.tester,z7=Hz(),lce=z7.p2r,mct=z7.axValue,gct=z7.getTransform;function P7(e){return e.subplot!==void 0}function _ct(e,t,r,n,i){var a=!P7(n),o=sct(i),s=lct(i),u=k7(i),l=M5(i),f=C7(i),c=i==="drawline",h=i==="drawcircle",d=c||h,p=n.gd,x=p._fullLayout,b=f&&x.newselection.mode==="immediate"&&a,y=x._zoomlayer,k=n.element.getBoundingClientRect(),E=n.plotinfo,A=gct(E),L=t-k.left,_=r-k.top;x._calcInverseTransform(p);var C=dP.apply3DTransform(x._invTransform)(L,_);L=C[0],_=C[1];var M=x._invScaleX,v=x._invScaleY,z=L,T=_,F="M"+L+","+_,q=n.xaxes[0],U=n.yaxes[0],H=q._length,j=U._length,G=e.altKey&&!(M5(i)&&u),O,W,re,ne,be,ze,Ce;mce(e,p,n),o&&(O=yct([[L,_]],pP.BENDPX));var he=y.selectAll("path.select-outline-"+E.id).data([1]),te=l?x.newshape:x.newselection;l&&(n.hasText=te.label.text||te.label.texttemplate);var ke=l&&!u?te.fillcolor:"rgba(0,0,0,0)",Ee=te.line.color||(a?T5.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");he.enter().append("path").attr("class","select-outline select-outline-"+E.id).style({opacity:l?te.opacity/2:1,"stroke-dasharray":nct(te.line.dash,te.line.width),"stroke-width":te.line.width+"px","shape-rendering":"crispEdges"}).call(T5.stroke,Ee).call(T5.fill,ke).attr("fill-rule","evenodd").classed("cursor-move",!!l).attr("transform",A).attr("d",F+"Z");var Me=y.append("path").attr("class","zoombox-corners").style({fill:T5.background,stroke:T5.defaultLine,"stroke-width":1}).attr("transform",A).attr("d","M0,0Z");if(l&&n.hasText){var Oe=y.select(".label-temp");Oe.empty()&&(Oe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Re=x._uid+pP.SELECTID,me=[],Be=vP(p,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ze=q._id,et=U._id;wce(p,Ze,et,Be);for(var gt=(p.layout||{}).selections||[],Pt=[],Qe=!1,Xe=0;Xe=0){p._fullLayout._deactivateShape(p);return}if(!l){var gt=x.clickmode;A5.done(Re).then(function(){if(A5.clear(Re),Ze===2){for(he.remove(),be=0;be-1&&yce(et,p,n.xaxes,n.yaxes,n.subplot,n,he),gt==="event"&&C5(p,void 0);act.click(p,et,E.id)}).catch(dP.error)}},n.doneFn=function(){Me.remove(),A5.done(Re).then(function(){A5.clear(Re),!b&&ne&&n.selectionDefs&&(ne.subtract=G,n.selectionDefs.push(ne),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||l)&&E5(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),f&&C5(p,Ce)}).catch(dP.error)}}function yce(e,t,r,n,i,a,o){var s=t._hoverdata,u=t._fullLayout,l=u.clickmode,f=l.indexOf("event")>-1,c=[],h,d,p,x,b,y,k,E,A,L;if(Act(s)){mce(e,t,a),h=vP(t,r,n,i);var _=Sct(s,h),C=_.pointNumbers.length>0;if(C?Mct(h,_):Ect(h)&&(k=fce(_))){for(o&&o.remove(),L=0;L=0}function Tct(e){return e._fullLayout._activeSelectionIndex>=0}function E5(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;wct(i)&&i._fullLayout._deactivateShape(i),Tct(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=M5(r),u=C7(r);if(s||u){var l=o.selectAll(".select-outline-"+n.id);if(l&&i._fullLayout._outlining){var f;s&&(f=fct(l,e)),f&&S5.call("_guiRelayout",i,{shapes:f});var c;u&&!P7(e)&&(c=cct(l,e)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,S5.call("_guiRelayout",i,{selections:c}).then(function(){t&&hct(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function uce(e){return e._id}function vP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(uce),o=r.map(uce),s,u,l;for(l=0;l0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Mct(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 k5(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var Ze=cce(e,!0);if(Ze.length){var et=Ze[0].xref,gt=Ze[0].yref;if(et&>){var Pt=Tce(Ze),Qe=Ace([k0(e,et,"x"),k0(e,gt,"y")]);Qe(me,Pt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:fe&&C5(e,me),h._reselect=!1}if(!o&&h._deselect){var Xe=h._deselect;s=Xe.xref,u=Xe.yref,Lct(s,u,f)||wce(e,s,u,n),fe&&(me.points.length?C5(e,me):R7(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Cct(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";Ece.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 z5=Se((tar,kce)=>{"use strict";kce.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 Nb=Se((iar,zce)=>{"use strict";var Cce=F7(),Lce=uc(),yP=dd(),Rct=_f().templatedArray,rar=z5();zce.exports=Rct("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Lce({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:Cce.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:Cce.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",yP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",yP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",yP.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",yP.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:Lce({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Sm=Se((nar,Pce)=>{"use strict";Pce.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Ey=Se((aar,Ice)=>{"use strict";Ice.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Zc=Se((oar,Oce)=>{"use strict";var Dce=Gc().axisHoverFormat,Fct=Du().texttemplateAttrs,qct=Du().hovertemplateAttrs,Rce=Xf(),Bct=uc(),Oct=Id().dash,Nct=Id().pattern,Uct=yu(),Vct=Sm(),mP=vu().extendFlat,Hct=Ey();function Fce(e){return{valType:"any",dflt:0,editType:"calc"}}function qce(e){return{valType:"any",editType:"calc"}}function Bce(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Oce.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:Fce("x"),yperiod:Fce("y"),xperiod0:qce("x0"),yperiod0:qce("y0"),xperiodalignment:Bce("x"),yperiodalignment:Bce("y"),xhoverformat:Dce("x"),yhoverformat:Dce("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:Fct({},{}),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:qct({},{keys:Vct.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:mP({},Oct,{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:Hct(!0),fillgradient:mP({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:Nct,marker:mP({symbol:{valType:"enumerated",values:Uct.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:mP({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Rce("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"},Rce("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:Bct({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var q7=Se((lar,Vce)=>{"use strict";var Nce=Nb(),Uce=Zc().line,Gct=Id().dash,gP=vu().extendFlat,Wct=_c().overrideAll,jct=_f().templatedArray,sar=z5();Vce.exports=Wct(jct("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:gP({},Nce.xref,{}),yref:gP({},Nce.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:Uce.color,width:gP({},Uce.width,{min:1,dflt:1}),dash:gP({},Gct,{dflt:"dot"})}}),"arraydraw","from-root")});var jce=Se((uar,Wce)=>{"use strict";var Hce=Zr(),_P=hu(),Zct=Jd(),Xct=q7(),Gce=c_();Wce.exports=function(t,r){Zct(t,r,{name:"selections",handleItemDefaults:Yct});for(var n=r.selections,i=0;i{"use strict";Zce.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 P5=Se((car,Jce)=>{"use strict";var Kct=Ul(),Yce=Zr(),Kce=$c();Jce.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=Kct.subplotsRegistry.cartesian,s=o.idRegex,u=i._subplots,l=u.xaxis,f=u.yaxis,c=u.cartesian,h=i._has("cartesian"),d=0;d{"use strict";var $ce=T7(),I5=Mce();Qce.exports={moduleType:"component",name:"selections",layoutAttributes:q7(),supplyLayoutDefaults:jce(),supplyDrawNewSelectionDefaults:Xce(),includeBasePlot:P5()("selections"),draw:$ce.draw,drawOne:$ce.drawOne,reselect:I5.reselect,prepSelect:I5.prepSelect,clearOutline:I5.clearOutline,clearSelectionsCache:I5.clearSelectionsCache,selectOnClick:I5.selectOnClick}});var G7=Se((dar,_he)=>{"use strict";var V7=Nl(),C0=Zr(),ehe=C0.numberFormat,Jct=cd(),$ct=Ez(),xP=Ul(),uhe=C0.strTranslate,Qct=Bf(),the=Pl(),d_=yu(),eht=jc(),rhe=hu(),tht=Ty(),rht=gp(),fhe=Sy(),bP=fhe.selectingOrDrawing,iht=fhe.freeMode,nht=Qh().FROM_TL,aht=l5(),oht=y5().redrawReglTraces,sht=Sc(),O7=$c().getFromId,lht=nh().prepSelect,uht=nh().clearOutline,fht=nh().selectOnClick,B7=v7(),H7=dd(),ihe=H7.MINDRAG,nv=H7.MINZOOM,nhe=!0;function cht(e,t,r,n,i,a,o,s){var u=e._fullLayout._zoomlayer,l=o+s==="nsew",f=(o+s).length===1,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G;r+=t.yaxis._shift;function O(){if(c=t.xaxis,h=t.yaxis,E=c._length,A=h._length,y=c._offset,k=h._offset,d={},d[c._id]=c,p={},p[h._id]=h,o&&s)for(var je=t.overlays,tt=0;tt=0){Je._fullLayout._deactivateShape(Je);return}var Mt=Je._fullLayout.clickmode;if(U7(Je),je===2&&!f&&At(),l)Mt.indexOf("select")>-1&&fht(tt,Je,x,b,t.id,ne),Mt.indexOf("event")>-1&&eht.click(Je,tt,t.id);else if(je===1&&f){var Vt=o?h:c,Kt=o==="s"||s==="w"?0:1,ir=Vt._name+".range["+Kt+"]",fr=hht(Vt,Kt),Ot="left",De="middle";if(Vt.fixedrange)return;o?(De=o==="n"?"top":"bottom",Vt.side==="right"&&(Ot="right")):s==="e"&&(Ot="right"),Je._context.showAxisRangeEntryBoxes&&V7.select(re).call(Qct.makeEditable,{gd:Je,immediate:!0,background:Je._fullLayout.paper_bgcolor,text:String(fr),fill:Vt.tickfont?Vt.tickfont.color:"#444",horizontalAlign:Ot,verticalAlign:De}).on("edit",function(_e){var Fe=Vt.d2r(_e);Fe!==void 0&&xP.call("_guiRelayout",Je,ir,Fe)})}}rht.init(ne);var Ce,he,te,ke,Ee,Me,Oe,Re,me,Be;function fe(je,tt,Je){var Mt=re.getBoundingClientRect();Ce=tt-Mt.left,he=Je-Mt.top,e._fullLayout._calcInverseTransform(e);var Vt=C0.apply3DTransform(e._fullLayout._invTransform)(Ce,he);Ce=Vt[0],he=Vt[1],te={l:Ce,r:Ce,w:0,t:he,b:he,h:0},ke=e._hmpixcount?e._hmlumcount/e._hmpixcount:Jct(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+E+"V"+A+"H0V0",Me=!1,Oe="xy",Be=!1,Re=dhe(u,ke,y,k,Ee),me=phe(u,y,k)}function Ze(je,tt){if(e._transitioningWithDuration)return!1;var Je=Math.max(0,Math.min(E,j*je+Ce)),Mt=Math.max(0,Math.min(A,G*tt+he)),Vt=Math.abs(Je-Ce),Kt=Math.abs(Mt-he);te.l=Math.min(Ce,Je),te.r=Math.max(Ce,Je),te.t=Math.min(he,Mt),te.b=Math.max(he,Mt);function ir(){Oe="",te.r=te.l,te.t=te.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)Vt>nv||Kt>nv?(Oe="xy",Vt/E>Kt/A?(Kt=Vt*A/E,he>Mt?te.t=he-Kt:te.b=he+Kt):(Vt=Kt*E/A,Ce>Je?te.l=Ce-Vt:te.r=Ce+Vt),me.attr("d",wP(te))):ir();else if(_.isSubplotConstrained)if(Vt>nv||Kt>nv){Oe="xy";var fr=Math.min(te.l/E,(A-te.b)/A),Ot=Math.max(te.r/E,(A-te.t)/A);te.l=fr*E,te.r=Ot*E,te.b=(1-fr)*A,te.t=(1-Ot)*A,me.attr("d",wP(te))}else ir();else!M||Kt0){var _e;if(_.isSubplotConstrained||!C&&M.length===1){for(_e=0;_e1&&(ir.maxallowed!==void 0&&z===(ir.range[0]1&&(fr.maxallowed!==void 0&&T===(fr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function pht(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function dhe(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",uhe(r,n)).attr("d",i+"Z")}function phe(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:the.background,stroke:the.defaultLine,"stroke-width":1,opacity:0}).attr("transform",uhe(t,r)).attr("d","M0,0Z")}function vhe(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"),yhe(e,t,i,a)}function yhe(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 U7(e){V7.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function mhe(e){nhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long"),nhe=!1)}function vht(e,t){return"M"+(e.l-.5)+","+(t-nv-.5)+"h-3v"+(2*nv+1)+"h3ZM"+(e.r+.5)+","+(t-nv-.5)+"h3v"+(2*nv+1)+"h-3Z"}function yht(e,t){return"M"+(t-nv-.5)+","+(e.t-.5)+"v-3h"+(2*nv+1)+"v3ZM"+(t-nv-.5)+","+(e.b+.5)+"v3h"+(2*nv+1)+"v-3Z"}function wP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,nv)/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 she(e,t,r,n,i){for(var a=!1,o={},s={},u,l,f,c,h=(i||{}).xaHash,d=(i||{}).yaHash,p=0;p{"use strict";var mht=Nl(),TP=jc(),ght=gp(),_ht=Ty(),ky=G7().makeDragBox,md=dd().DRAGGERSIZE;AP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){mht.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"),u=o.split("y");return s[0]===u[0]?Number(s[1]||1)-Number(u[1]||1):Number(s[0]||1)-Number(u[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,u=o.yaxis;if(!o.mainplot){var l=ky(t,o,s._offset,u._offset,s._length,u._length,"ns","ew");l.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&TP.hover(t,h,a)},TP.hover(t,h,a),t._fullLayout._lasthover=l,t._fullLayout._hoversubplot=a},l.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,ght.unhover(t,h))},t._context.showAxisDragHandles&&(ky(t,o,s._offset-md,u._offset-md,md,md,"n","w"),ky(t,o,s._offset+s._length,u._offset-md,md,md,"n","e"),ky(t,o,s._offset-md,u._offset+u._length,md,md,"s","w"),ky(t,o,s._offset+s._length,u._offset+u._length,md,md,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var f=s._mainLinePosition;s.side==="top"&&(f-=md),ky(t,o,s._offset+s._length*.1,f,s._length*.8,md,"","ew"),ky(t,o,s._offset,f,s._length*.1,md,"","w"),ky(t,o,s._offset+s._length*.9,f,s._length*.1,md,"","e")}if(a===u._mainSubplot){var c=u._mainLinePosition;u.side!=="right"&&(c-=md),ky(t,o,c,u._offset+u._length*.1,md,u._length*.8,"ns",""),ky(t,o,c,u._offset+u._length*.9,md,u._length*.1,"s",""),ky(t,o,c,u._offset,md,u._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,TP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,TP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},AP.updateFx(t)}};AP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";_ht(t._draggers,r)}});var whe=Se((yar,bhe)=>{"use strict";var xhe=Ul();bhe.exports=function(t){for(var r=xhe.layoutArrayContainers,n=xhe.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var xht=yg(),j7=vL(),D5=H1(),bht=EL().sorterAsc,Z7=Ul();R5.containerArrayMatch=whe();var wht=R5.isAddVal=function(t){return t==="add"||xht(t)},The=R5.isRemoveVal=function(t){return t===null||t==="remove"};R5.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=Z7.getComponentMethod(o,"supplyLayoutDefaults"),u=Z7.getComponentMethod(o,"draw"),l=Z7.getComponentMethod(o,"drawOne"),f=i.replot||i.recalc||s===j7||u===j7,c=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&D5.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(The(d))r.set(null);else if(Array.isArray(d))r.set(d);else return D5.warn("Unrecognized full array edit value",o,d),!0;return f?!1:(s(c,h),u(t),!0)}var p=Object.keys(n).map(Number).sort(bht),x=r.get(),b=x||[],y=a(h,o).get(),k=[],E=-1,A=b.length,L,_,C,M,v,z,T,F;for(L=0;Lb.length-(T?0:1)){D5.warn("index out of range",o,C);continue}if(z!==void 0)v.length>1&&D5.warn("Insertion & removal are incompatible with edits to the same index.",o,C),The(z)?k.push(C):T?(z==="add"&&(z={}),b.splice(C,0,z),y&&y.splice(C,0,{})):D5.warn("Unrecognized full object edit value",o,C,z),E===-1&&(E=C);else for(_=0;_=0;L--)b.splice(k[L],1),y&&y.splice(k[L],1);if(b.length?x||r.set(b):r.set(null),f)return!1;if(s(c,h),l!==j7){var q;if(E===-1)q=p;else{for(A=Math.max(b.length,A),q=[],L=0;L=E));L++)q.push(C);for(L=E;L{"use strict";var khe=_u(),gar=OB(),Che=Ul(),kv=Zr(),F5=Sc(),Lhe=$c(),zhe=Pl(),q5=Lhe.cleanId,Tht=Lhe.getFromTrace,X7=Che.traceIs;Cy.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&kv.log("Clearing previous rejected promises from queue."),e._promises=[]};Cy.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=(F5.subplotsRegistry.cartesian||{}).attrRegex,i=(F5.subplotsRegistry.polar||{}).attrRegex,a=(F5.subplotsRegistry.ternary||{}).attrRegex,o=(F5.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&&Cy.cleanLayout(e.template.layout),e};function Y3(e,t){var r=e[t],n=t.charAt(0);r&&r!=="paper"&&(e[t]=q5(r,n,!0))}Cy.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}Cy.hasParent=function(e,t){for(var r=Ehe(t);r;){if(r in e)return!0;r=Ehe(r)}return!1};var Mht=["x","y","z"];Cy.clearAxisTypes=function(e,t,r){for(var n=0;n{"use strict";var kP=Nl(),Eht=_u(),kht=sO(),Tl=Zr(),bc=Tl.nestedProperty,J7=y3(),av=yne(),L0=Ul(),RP=_3(),Pu=Sc(),Np=hu(),Cht=wN(),Lht=Rd(),Y7=yu(),zht=Pl(),Pht=W7().initInteractions,Iht=Zv(),Dht=nh().clearOutline,qhe=ub().dfltConfig,MP=Ahe(),Bh=Phe(),Yf=y5(),p_=_c(),Rht=dd().AX_NAME_PATTERN,K7=0,Ihe=5;function Fht(e,t,r,n){var i;if(e=Tl.getGraphDiv(e),J7.init(e),Tl.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=J7.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Tl.isPlotDiv(e)&&Tl.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return Pf.addFrames(e,i)}Ohe(e,n),r||(r={}),kP.select(e).classed("js-plotly-plot",!0),Y7.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var u=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(Bh.cleanData(t),u?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||u)&&(e.layout=Bh.cleanLayout(r)),Pu.supplyDefaults(e);var l=e._fullLayout,f=l._has("cartesian");l._replotting=!0,(u||l._shouldCreateBgLayer)&&(ndt(e),l._shouldCreateBgLayer&&delete l._shouldCreateBgLayer),Y7.initGradients(e),Y7.initPatterns(e),u&&Np.saveShowSpikeInitial(e);var c=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;c&&Pu.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 Nhe(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]),LP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&LP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Uht(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&&f=0&&f0&&typeof M.parts[T]!="string";)T--;var F=M.parts[T],q=M.parts[T-1]+"."+F,U=M.parts.slice(0,T).join("."),H=bc(e.layout,U).get(),j=bc(n,U).get(),G=M.get();if(v!==void 0){y[C]=v,k[C]=F==="reverse"?v:Cg(G);var O=RP.getLayoutValObject(n,M.parts);if(O&&O.impliedEdits&&v!==null)for(var W in O.impliedEdits)E(Tl.relativeAttr(C,W),O.impliedEdits[W]);if(["width","height"].indexOf(C)!==-1)if(v){E("autosize",null);var re=C==="height"?"width":"height";E(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")E("width",v?null:n.width),E("height",v?null:n.height);else if(q.match(Yhe))_(q),bc(n,U+"._inputRange").set(null);else if(q.match(Khe)){_(q),bc(n,U+"._inputRange").set(null);var ne=bc(n,U).get();ne._inputDomain&&(ne._input.domain=ne._inputDomain.slice())}else q.match(Jhe)&&bc(n,U+"._inputDomain").set(null);if(F==="type"){L=H;var be=j.type==="linear"&&v==="log",ze=j.type==="log"&&v==="linear";if(be||ze){if(!L||!L.range)E(U+".autorange",!0);else if(j.autorange)be&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],he=L.range[1];be?(Ce<=0&&he<=0&&E(U+".autorange",!0),Ce<=0?Ce=he/1e6:he<=0&&(he=Ce/1e6),E(U+".range[0]",Math.log(Ce)/Math.LN10),E(U+".range[1]",Math.log(he)/Math.LN10)):(E(U+".range[0]",Math.pow(10,Ce)),E(U+".range[1]",Math.pow(10,he)))}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,j,v,E),L0.getComponentMethod("images","convertCoords")(e,j,v,E)}else E(U+".autorange",!0),E(U+".range",null);bc(n,U+"._inputRange").set(null)}else if(F.match(Rht)){var te=bc(n,C).get(),ke=(v||{}).type;(!ke||ke==="-")&&(ke="linear"),L0.getComponentMethod("annotations","convertCoords")(e,te,ke,E),L0.getComponentMethod("images","convertCoords")(e,te,ke,E)}var Ee=MP.containerArrayMatch(C);if(Ee){f=Ee.array,c=Ee.index;var Me=Ee.property,Oe=O||{editType:"calc"};c!==""&&Me===""&&(MP.isAddVal(v)?k[C]=null:MP.isRemoveVal(v)?k[C]=(bc(r,f).get()||[])[c]:Tl.warn("unrecognized full object value",t)),p_.update(b,Oe),l[f]||(l[f]={});var Re=l[f][c];Re||(Re=l[f][c]={}),Re[Me]=v,delete t[C]}else F==="reverse"?(H.range?H.range.reverse():(E(U+".autorange",!0),H.range=[1,0]),j.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(v===!1&&G!==!1||v!==!1&&G===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(v==="lasso"||v==="select")&&!(G==="lasso"||G==="select")?b.plot=!0:O?p_.update(b,O):b.calc=!0,M.set(v))}}for(f in l){var me=MP.applyContainerArrayChanges(e,a(r,f),l[f],b,a);me||(b.plot=!0)}for(var Be in A){L=Np.getFromId(e,Be);var fe=L&&L._constraintGroup;if(fe){b.calc=!0;for(var Ze in fe)A[Ze]||(Np.getFromId(e,Ze)._constraintShrinkable=!0)}}(Qhe(e)||t.height||t.width)&&(b.plot=!0);var et=n.shapes;for(c=0;c1;)if(n.pop(),r=bc(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Zht(e,t){for(var r=0;r=i.length?i[0]:i[l]:i}function s(l){return Array.isArray(a)?l>=a.length?a[0]:a[l]:a}function u(l,f){var c=0;return function(){if(l&&++c===f)return l()}}return new Promise(function(l,f){function c(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var F=n._frameQueue.pop();F.onInterrupt&&F.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(F){if(F.length!==0){for(var q=0;qn._timeToNext&&p()};F()}var b=0;function y(F){return Array.isArray(i)?b>=i.length?F.transitionOpts=i[b]:F.transitionOpts=i[0]:F.transitionOpts=i,b++,F}var k,E,A=[],L=t==null,_=Array.isArray(t),C=!L&&!_&&Tl.isPlainObject(t);if(C)A.push({type:"object",data:y(Tl.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(k=0;k0&&zz)&&T.push(E);A=T}}A.length>0?h(A):(e.emit("plotly_animated"),l())})}function edt(e,t,r){if(e=Tl.getGraphDiv(e),t==null)return Promise.resolve();if(!Tl.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,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var l=s.length+t.length*2,f=[],c={};for(n=t.length-1;n>=0;n--)if(Tl.isPlainObject(t[n])){var h=t[n].name,d=(u[h]||c[h]||{}).name,p=t[n].name,x=u[d]||c[d];d&&p&&typeof p=="number"&&x&&K7M.index?-1:C.index=0;n--){if(i=f[n].frame,typeof i.name=="number"&&Tl.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[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=Pu.modifyFrames,u=Pu.modifyFrames,l=[e,o],f=[e,a];return av&&av.add(e,s,l,u,f),Pu.modifyFrames(e,a)}function rdt(e){e=Tl.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Pu.cleanPlot([],{},r,t),Pu.purge(e),J7.purge(e),t._container&&t._container.remove(),delete e._context,e}function idt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Tl.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Tl.inverseTransformMatrix(Tl.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 ndt(e){var t=kP.select(e),r=e._fullLayout;if(r._calcInverseTransform=idt,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),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={};kP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Tl.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Iht.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")}Pf.animate=Qht;Pf.addFrames=edt;Pf.deleteFrames=tdt;Pf.addTraces=Whe;Pf.deleteTraces=jhe;Pf.extendTraces=Hhe;Pf.moveTraces=$7;Pf.prependTraces=Ghe;Pf.newPlot=Nht;Pf._doPlot=Fht;Pf.purge=rdt;Pf.react=Kht;Pf.redraw=Oht;Pf.relayout=B5;Pf.restyle=zP;Pf.setPlotConfig=qht;Pf.update=IP;Pf._guiRelayout=eU(B5);Pf._guiRestyle=eU(zP);Pf._guiUpdate=eU(IP);Pf._storeDirectGUIEdit=Ght});var Lg=Se(Mm=>{"use strict";var adt=Ul();Mm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Mm.getRedrawFunc=function(e){return function(){adt.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 ede=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return ede.createObjectURL(e)};Mm.revokeObjectURL=function(e){return ede.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=odt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Mm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function odt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var rU=Nl(),war=Zr(),sdt=yu(),ldt=Pl(),Tar=Zv(),tU=/"/g,N5="TOBESTRIPPED",udt=new RegExp('("'+N5+")|("+N5+'")',"g");function fdt(e){var t=rU.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 cdt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}tde.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,u=i.height,l;a.insert("rect",":first-child").call(sdt.setRect,0,0,s,u).call(ldt.fill,i.paper_bgcolor);var f=i._basePlotModules||[];for(l=0;l{"use strict";var hdt=Zr(),ddt=pb().EventEmitter,U5=Lg();function pdt(e){var t=e.emitter||new ddt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",u=e.canvas,l=e.scale||1,f=e.width||300,c=e.height||150,h=l*f,d=l*c,p=u.getContext("2d",{willReadFrequently:!0}),x=new a,b,y;s==="svg"||hdt.isSafari()?y=U5.encodeSVG(o):(b=U5.createBlob(o,"svg"),y=U5.createObjectURL(b)),u.width=h,u.height=d,x.onload=function(){var k;switch(b=null,U5.revokeObjectURL(y),s!=="svg"&&p.drawImage(x,0,0,h,d),s){case"jpeg":k=u.toDataURL("image/jpeg");break;case"png":k=u.toDataURL("image/png");break;case"webp":k=u.toDataURL("image/webp");break;case"svg":k=y;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)},x.onerror=function(k){if(b=null,U5.revokeObjectURL(y),i(k),!e.promise)return t.emit("error",k)},x.src=y});return e.promise?r:t}rde.exports=pdt});var nU=Se((Mar,ade)=>{"use strict";var ide=_u(),nde=qP(),vdt=Sc(),Em=Zr(),V5=Lg(),ydt=BP(),mdt=OP(),gdt=QC().version,iU={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 _dt(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(_){return!(_ in t)||Em.validate(t[_],iU[_])}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(iU.format.values,", "," or ")+".");var s={};function u(_,C){return Em.coerce(t,s,iU,_,C)}var l=u("format"),f=u("width"),c=u("height"),h=u("scale"),d=u("setBackground"),p=u("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var b=Em.extendFlat({},n);f?b.width=f:t.width===null&&ide(a.width)&&(b.width=a.width),c?b.height=c:t.height===null&&ide(a.height)&&(b.height=a.height);var y=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=V5.getRedrawFunc(x);function E(){return new Promise(function(_){setTimeout(_,V5.getDelay(x._fullLayout))})}function A(){return new Promise(function(_,C){var M=ydt(x,l,h),v=x._fullLayout.width,z=x._fullLayout.height;function T(){nde.purge(x),document.body.removeChild(x)}if(l==="full-json"){var F=vdt.graphJson(x,!1,"keepdata","object",!0,!0);return F.version=gdt,F=JSON.stringify(F),T(),_(p?F:V5.encodeJSON(F))}if(T(),l==="svg")return _(p?M:V5.encodeSVG(M));var q=document.createElement("canvas");q.id=Em.randstr(),mdt({format:l,width:v,height:z,scale:h,canvas:q,svg:M,promise:!0}).then(_).catch(C)})}function L(_){return p?_.replace(V5.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,C){nde.newPlot(x,r,b,y).then(k).then(E).then(A).then(function(M){_(L(M))}).catch(function(M){C(M)})})}ade.exports=_dt});var ude=Se((Ear,lde)=>{"use strict";var z0=Zr(),xdt=Sc(),bdt=_3(),wdt=ub().dfltConfig,Ly=z0.isPlainObject,Vb=Array.isArray,ode=z0.isArrayOrTypedArray;lde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=bdt.get(),i=[],a={_context:z0.extendFlat({},wdt)},o,s;Vb(t)?(a.data=z0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(gd("array","data"))),Ly(r)?(a.layout=z0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(gd("object","layout"))),xdt.supplyDefaults(a);for(var u=a._fullData,l=o.length,f=0;fc.length&&n.push(gd("unused",i,l.concat(c.length)));var y=c.length,k=Array.isArray(b);k&&(y=Math.min(y,b.length));var E,A,L,_,C;if(h.dimensions===2)for(A=0;Ac[A].length&&n.push(gd("unused",i,l.concat(A,c[A].length)));var M=c[A].length;for(E=0;E<(k?Math.min(M,b[A].length):M);E++)L=k?b[A][E]:b,_=f[A][E],C=c[A][E],z0.validate(_,L)?C!==_&&C!==+_&&n.push(gd("dynamic",i,l.concat(A,E),_,C)):n.push(gd("value",i,l.concat(A,E),_))}else n.push(gd("array",i,l.concat(A),f[A]));else for(A=0;A{"use strict";var Cdt=Zr(),UP=Lg();function Ldt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var u,l;if(i)return u=UP.createBlob(e,r),l=UP.createObjectURL(u),n.href=l,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),UP.revokeObjectURL(l),u=null,o(t);if(Cdt.isSafari()){var f=r==="svg"?",":";base64,";return UP.octetStream(f+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}fde.exports=Ldt});var aU=Se((Lar,dde)=>{"use strict";var hde=Zr(),zdt=nU(),Pdt=cde(),Car=Lg();function Idt(e,t){var r;return hde.isPlainObject(e)||(r=hde.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=zdt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Pdt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}dde.exports=Idt});var gde=Se(oU=>{"use strict";var Cv=Zr(),Lv=Cv.isPlainObject,pde=_3(),vde=Sc(),Ddt=zf(),yde=_f(),mde=ub().dfltConfig;oU.makeTemplate=function(e){e=Cv.isPlainObject(e)?e:Cv.getGraphDiv(e),e=Cv.extendDeep({_context:mde},{data:e.data,layout:e.layout}),vde.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 p={};H5(d,p,Fdt.bind(null,d));var x=Cv.coerce(d,{},Ddt,"type"),b=n.data[x];b||(b=n.data[x]=[]),b.push(p)}),H5(r,n.layout,Rdt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lv(i)){var a=i.layout,o,s,u,l,f,c;Lv(a)&&VP(a,n.layout);var h=i.data;if(Lv(h)){for(s in n.data)if(u=h[s],Array.isArray(u)){for(f=n.data[s],c=f.length,l=u.length,o=0;oy?o.push({code:"unused",traceType:d,templateCount:b,dataCount:y}):y>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:y})}}function k(E,A){for(var L in E)if(L.charAt(0)!=="_"){var _=E[L],C=P0(E,L,A);Lv(_)?(Array.isArray(E)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:C,templateitemname:_.templateitemname}),k(_,C)):Array.isArray(_)&&qdt(_)&&k(_,C)}}if(k({data:u,layout:s},""),o.length)return o.map(Bdt)};function qdt(e){for(var t=0;t{"use strict";var rd=qP();Uc._doPlot=rd._doPlot;Uc.newPlot=rd.newPlot;Uc.restyle=rd.restyle;Uc.relayout=rd.relayout;Uc.redraw=rd.redraw;Uc.update=rd.update;Uc._guiRestyle=rd._guiRestyle;Uc._guiRelayout=rd._guiRelayout;Uc._guiUpdate=rd._guiUpdate;Uc._storeDirectGUIEdit=rd._storeDirectGUIEdit;Uc.react=rd.react;Uc.extendTraces=rd.extendTraces;Uc.prependTraces=rd.prependTraces;Uc.addTraces=rd.addTraces;Uc.deleteTraces=rd.deleteTraces;Uc.moveTraces=rd.moveTraces;Uc.purge=rd.purge;Uc.addFrames=rd.addFrames;Uc.deleteFrames=rd.deleteFrames;Uc.animate=rd.animate;Uc.setPlotConfig=rd.setPlotConfig;var Odt=DM().getGraphDiv,Ndt=tP().eraseActiveShape;Uc.deleteActiveShape=function(e){return Ndt(Odt(e))};Uc.toImage=nU();Uc.validate=ude();Uc.downloadImage=aU();var _de=gde();Uc.makeTemplate=_de.makeTemplate;Uc.validateTemplate=_de.validateTemplate});var K3=Se((Iar,bde)=>{"use strict";var sU=Zr(),Udt=Ul();bde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,u=Udt.getComponentMethod("calendars","handleTraceDefaults");if(u(t,r,["x","y"],n),a){var l=sU.minRowLength(a);o?s=Math.min(l,sU.minRowLength(o)):(s=l,i("y0"),i("dy"))}else{if(!o)return 0;s=sU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var zy=Se((Dar,Ade)=>{"use strict";var wde=Zr().dateTick0,Vdt=ju(),Hdt=Vdt.ONEWEEK;function Tde(e,t){return e%Hdt===0?wde(t,1):wde(t,0)}Ade.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Tde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Tde(s,r.ycalendar)),i("yperiodalignment"))}}});var Ede=Se((Rar,Mde)=>{"use strict";var Sde=["orientation","groupnorm","stackgaps"];Mde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,u=a[s];u||(u=a[s]={});var l=u[o],f=!1;l?l.traces.push(r):(l=u[o]={traceIndices:[],traces:[r]},f=!0);for(var c={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var kde=Pl(),Cde=Dp().hasColorscale,Lde=ed(),Gdt=ec();zde.exports=function(t,r,n,i,a,o){var s=Gdt.isBubble(t),u=(t.line||{}).color,l;if(o=o||{},u&&(n=u),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),Cde(t,"marker")&&Lde(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||(u&&!Array.isArray(u)&&r.marker.color!==u?l=u:s?l=kde.background:l=kde.defaultLine,a("marker.line.color",l),Cde(t,"marker.line")&&Lde(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 f=a("marker.gradient.type");f!=="none"&&a("marker.gradient.color")}}});var I0=Se((qar,Pde)=>{"use strict";var Wdt=Zr().isArrayOrTypedArray,jdt=Dp().hasColorscale,Zdt=ed();Pde.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),jdt(t,"line"))Zdt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var u=(Wdt(s)?!1:s)||n;a("line.color",u)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var J3=Se((Bar,Ide)=>{"use strict";Ide.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var D0=Se((Oar,Dde)=>{"use strict";var Xdt=Zr();Dde.exports=function(e,t,r,n,i){i=i||{},n("textposition"),Xdt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Py=Se((Nar,Fde)=>{"use strict";var GP=Pl(),Rde=Zr().isArrayOrTypedArray;function Ydt(e){for(var t=GP.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var qde=Zr(),Kdt=Ul(),Jdt=Zc(),$dt=Sm(),$3=ec(),Qdt=K3(),ept=zy(),tpt=Ede(),rpt=$v(),ipt=I0(),Bde=J3(),npt=D0(),apt=Py(),opt=Zr().coercePattern;Ode.exports=function(t,r,n,i){function a(d,p){return qde.coerce(t,r,Jdt,d,p)}var o=Qdt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){ept(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=tpt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var u=!s&&o<$dt.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("mode",u),$3.hasMarkers(r)&&rpt(t,r,n,i,a,{gradient:!0}),$3.hasLines(r)&&(ipt(t,r,n,i,a,{backoff:!0}),Bde(t,r,a),a("connectgaps"),a("line.simplify")),$3.hasText(r)&&(a("texttemplate"),npt(t,r,i,a));var l=[];($3.hasMarkers(r)||$3.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),l.push("points")),a("fill",s?s.fillDflt:"none"),r.fill!=="none"&&(apt(t,r,n,a,{moduleHasFillgradient:!0}),$3.hasLines(r)||Bde(t,r,a),opt(a,"fillpattern",r.fillcolor,!1));var f=(r.line||{}).color,c=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&l.push("fills"),a("hoveron",l.join("+")||"points"),r.hoveron!=="fills"&&a("hovertemplate");var h=Kdt.getComponentMethod("errorbars","supplyDefaults");h(t,r,f||c||n,{axis:"y"}),h(t,r,f||c||n,{axis:"x",inherit:"y"}),qde.coerceSelectionMarkerOpacity(r,a)}}});var Hb=Se((Var,Ude)=>{"use strict";var spt=Ob().getAxisGroup;Ude.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],u=spt(n,s)+o,l=n._alignmentOpts||{},f=i("alignmentgroup"),c=l[u];c||(c=l[u]={});var h=c[f];h?h.traces.push(r):h=c[f]={traces:[r],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var d=i("offsetgroup")||"",p=h.offsetGroups,x=p[d];r._offsetIndex=0,(a!=="group"||d)&&(x||(x=p[d]={offsetIndex:Object.keys(p).length}),r._offsetIndex=x.offsetIndex)}});var lU=Se((Har,Vde)=>{"use strict";var lpt=Zr(),upt=Hb(),fpt=Zc();Vde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return lpt.coerce(i._input,i,fpt,h)}if(r.scattermode==="group")for(a=0;a=0;f--){var c=t[f];if(c.type==="scatter"&&c.xaxis===u.xaxis&&c.yaxis===u.yaxis){c.opacity=void 0;break}}}}}});var Gde=Se((Gar,Hde)=>{"use strict";var cpt=Zr(),hpt=UL();Hde.exports=function(e,t){function r(i,a){return cpt.coerce(e,t,hpt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var Iy=Se((War,jde)=>{"use strict";var dpt=_u(),Wde=Zr(),ppt=Wde.dateTime2ms,WP=Wde.incrementMonth,vpt=ju(),ypt=vpt.ONEAVGMONTH;jde.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(dpt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var u=+o.substring(1);if(u>0&&Math.round(u)===u)s=u;else return{vals:i}}for(var l=r.calendar,f=a==="start",c=a==="end",h=t[n+"period0"],d=ppt(h,l)||0,p=[],x=[],b=[],y=i.length,k=0;kE;)_=WP(_,-s,l);for(;_<=E;)_=WP(_,s,l);L=WP(_,-s,l)}else{for(A=Math.round((E-d)/o),_=d+A*o;_>E;)_-=o;for(;_<=E;)_+=o;L=_-o}p[k]=f?L:c?_:(L+_)/2,x[k]=L,b[k]=_}return{vals:p,starts:x,ends:b}}});var R0=Se((jar,Xde)=>{"use strict";var uU=Dp().hasColorscale,fU=Rp(),Zde=ec();Xde.exports=function(t,r){Zde.hasLines(r)&&uU(r,"line")&&fU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),Zde.hasMarkers(r)&&(uU(r,"marker")&&fU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),uU(r,"marker.line")&&fU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var km=Se((Zar,Yde)=>{"use strict";var ch=Zr();Yde.exports=function(t,r){for(var n=0;n{"use strict";var Kde=Zr();Jde.exports=function(t,r){Kde.isArrayOrTypedArray(r.selectedpoints)&&Kde.tagSelected(t,r)}});var q0=Se((Yar,npe)=>{"use strict";var $de=_u(),hU=Zr(),G5=hu(),Qde=Iy(),cU=ju().BADNUM,dU=ec(),mpt=R0(),gpt=km(),_pt=F0();function xpt(e,t){var r=e._fullLayout,n=t._xA=G5.getFromId(e,t.xaxis||"x","x"),i=t._yA=G5.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=Qde(t,n,"x",a),u=Qde(t,i,"y",o),l=s.vals,f=u.vals,c=t._length,h=new Array(c),d=t.ids,p=pU(t,r,n,i),x=!1,b,y,k,E,A,L;rpe(r,t);var _="x",C="y",M;if(p)hU.pushUnique(p.traceIndices,t.index),b=p.orientation==="v",b?(C="s",M="x"):(_="s",M="y"),A=p.stackgaps==="interpolate";else{var v=tpe(t,c);epe(e,t,n,i,l,f,v)}var z=!!t.xperiodalignment,T=!!t.yperiodalignment;for(y=0;yy&&h[E].gap;)E--;for(L=h[E].s,k=h.length-1;k>E;k--)h[k].s=L;for(;y{"use strict";ape.exports=jP;var bpt=Zr().distinctVals;function jP(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 B0=_u(),v_=Zr().isArrayOrTypedArray,Q3=ju().BADNUM,wpt=Ul(),W5=hu(),Tpt=Ob().getAxisGroup,ZP=ope();function Apt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],u=[],l=0;lu+o||!B0(s))}for(var f=0;f{"use strict";var cpe=q0(),hpe=Gb().setGroupPositions;function Fpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],u=[],l=0;lv[f]&&f{"use strict";var Bpt=yu(),gpe=ju(),j5=gpe.BADNUM,_pe=gpe.LOG_CLIP,vpe=_pe+.5,ype=_pe-.5,XP=Zr(),Opt=XP.segmentsIntersect,mpe=XP.constrain,xU=Sm();xpe.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",u=i._length,l=a._length,f=r.backoff,c=n.marker,h=r.connectGaps,d=r.baseTolerance,p=r.shape,x=p==="linear",b=n.fill&&n.fill!=="none",y=[],k=xU.minTolerance,E=t.length,A=new Array(E),L=0,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne;function be(De){var _e=t[De];if(!_e)return!1;var Fe=r.linearized?i.l2p(_e.x):i.c2p(_e.x),Pe=r.linearized?a.l2p(_e.y):a.c2p(_e.y);if(Fe===j5){if(o&&(Fe=i.c2p(_e.x,!0)),Fe===j5)return!1;s&&Pe===j5&&(Fe*=Math.abs(i._m*l*(i._m>0?vpe:ype)/(a._m*u*(a._m>0?vpe:ype)))),Fe*=1e3}if(Pe===j5){if(s&&(Pe=a.c2p(_e.y,!0)),Pe===j5)return!1;Pe*=1e3}return[Fe,Pe]}function ze(De,_e,Fe,Pe){var Ie=Fe-De,lt=Pe-_e,ye=.5-De,ue=.5-_e,de=Ie*Ie+lt*lt,ht=Ie*ye+lt*ue;if(ht>0&&ht1||Math.abs(ye.y-Fe[0][1])>1)&&(ye=[ye.x,ye.y],Pe&&ke(ye,De)Oe||De[1]me)return[mpe(De[0],Me,Oe),mpe(De[1],Re,me)]}function xt(De,_e){if(De[0]===_e[0]&&(De[0]===Me||De[0]===Oe)||De[1]===_e[1]&&(De[1]===Re||De[1]===me))return!0}function _t(De,_e){var Fe=[],Pe=Tt(De),Ie=Tt(_e);return Pe&&Ie&&xt(Pe,Ie)||(Pe&&Fe.push(Pe),Ie&&Fe.push(Ie)),Fe}function Ct(De,_e,Fe){return function(Pe,Ie){var lt=Tt(Pe),ye=Tt(Ie),ue=[];if(lt&&ye&&xt(lt,ye))return ue;lt&&ue.push(lt),ye&&ue.push(ye);var de=2*XP.constrain((Pe[De]+Ie[De])/2,_e,Fe)-((lt||Pe)[De]+(ye||Ie)[De]);if(de){var ht;lt&&ye?ht=de>0==lt[De]>ye[De]?lt:ye:ht=lt||ye,ht[De]+=de}return ue}}var jt;p==="linear"||p==="spline"?jt=Xe:p==="hv"||p==="vh"?jt=_t:p==="hvh"?jt=Ct(0,Me,Oe):p==="vhv"&&(jt=Ct(1,Re,me));function At(De,_e){var Fe=_e[0]-De[0],Pe=(_e[1]-De[1])/Fe,Ie=(De[1]*_e[0]-_e[1]*De[0])/Fe;return Ie>0?[Pe>0?Me:Oe,me]:[Pe>0?Oe:Me,Re]}function Te(De){var _e=De[0],Fe=De[1],Pe=_e===A[L-1][0],Ie=Fe===A[L-1][1];if(!(Pe&&Ie))if(L>1){var lt=_e===A[L-2][0],ye=Fe===A[L-2][1];Pe&&(_e===Me||_e===Oe)&<?ye?L--:A[L-1]=De:Ie&&(Fe===Re||Fe===me)&&ye?lt?L--:A[L-1]=De:A[L++]=De}else A[L++]=De}function nt(De){A[L-1][0]!==De[0]&&A[L-1][1]!==De[1]&&Te([et,gt]),Te(De),Pt=null,et=gt=0}var ut=XP.isArrayOrTypedArray(c);function ct(De){if(De&&f&&(De.i=_,De.d=t,De.trace=n,De.marker=ut?c[De.i]:c,De.backoff=f),Ce=De[0]/u,he=De[1]/l,fe=De[0]Oe?Oe:0,Ze=De[1]me?me:0,fe||Ze){if(!L)A[L++]=[fe||De[0],Ze||De[1]];else if(Pt){var _e=jt(Pt,De);_e.length>1&&(nt(_e[0]),A[L++]=_e[1])}else Qe=jt(A[L-1],De)[0],A[L++]=Qe;var Fe=A[L-1];fe&&Ze&&(Fe[0]!==fe||Fe[1]!==Ze)?(Pt&&(et!==fe&>!==Ze?Te(et&>?At(Pt,De):[et||fe,gt||Ze]):et&>&&Te([et,gt])),Te([fe,Ze])):et-fe&>-Ze&&Te([fe||et,Ze||gt]),Pt=De,et=fe,gt=Ze}else Pt&&nt(jt(Pt,De)[0]),A[L++]=De}for(_=0;_te(T,rt))break;M=T,O=U[0]*q[0]+U[1]*q[1],O>j?(j=O,v=T,F=!1):O=t.length||!T)break;ct(T),C=T}}Pt&&Te([et||Pt[0],gt||Pt[1]]),y.push(A.slice(0,L))}var je=p.slice(p.length-1);if(f&&je!=="h"&&je!=="v"){for(var tt=!1,Je=-1,Mt=[],Vt=0;Vt{"use strict";var bpe={tonextx:1,tonexty:1,tonext:1};wpe.exports=function(t,r,n){var i,a,o,s,u,l={},f=!1,c=-1,h=0,d=-1;for(a=0;a=0?u=d:(u=d=h,h++),u{"use strict";var Dy=Nl(),Npt=Ul(),Z5=Zr(),tT=Z5.ensureSingle,Ape=Z5.identity,hh=yu(),rT=ec(),Upt=bU(),Vpt=wU(),YP=w5().tester;Spe.exports=function(t,r,n,i,a,o){var s,u,l=!a,f=!!a&&a.duration>0,c=Vpt(t,r,n);if(s=i.selectAll("g.trace").data(c,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(),Hpt(t,s,r),f){o&&(u=o());var h=Dy.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});h.each(function(){i.selectAll("g.trace").each(function(d,p){Tpe(t,p,r,d,c,this,a)})})}else s.each(function(d,p){Tpe(t,p,r,d,c,this,a)});l&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function Hpt(e,t,r){t.each(function(n){var i=tT(Dy.select(this),"g","fills");hh.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,Ape);s.enter().append("g"),s.exit().each(function(u){a[u]=null}).remove(),s.order().each(function(u){a[u]=tT(Dy.select(this),"path","js-fill")})})}function Tpe(e,t,r,n,i,a,o){var s=e._context.staticPlot,u;Gpt(e,t,r,n,i);var l=!!o&&o.duration>0;function f(Ct){return l?Ct.transition():Ct}var c=r.xaxis,h=r.yaxis,d=n[0].trace,p=d.line,x=Dy.select(a),b=tT(x,"g","errorbars"),y=tT(x,"g","lines"),k=tT(x,"g","points"),E=tT(x,"g","text");if(Npt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;f(x).style("opacity",d.opacity);var A,L,_=d.fill.charAt(d.fill.length-1);_!=="x"&&_!=="y"&&(_="");var C,M;_==="y"?(C=1,M=h.c2p(0,!0)):_==="x"&&(C=0,M=c.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var v="",z=[],T=d._prevtrace,F=null,q=null;T&&(v=T._prevRevpath||"",L=T._nextFill,z=T._ownPolygons,F=T._fillsegments,q=T._fillElement);var U,H,j="",G="",O,W,re,ne,be,ze,Ce=[];d._polygons=[];var he=[],te=[],ke=Z5.noop;if(A=d._ownFill,rT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(O=hh.steps(p.shape),W=hh.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?O=W=function(Ct){var jt=Ct[Ct.length-1];return Ct.length>1&&Ct[0][0]===jt[0]&&Ct[0][1]===jt[1]?hh.smoothclosed(Ct.slice(1),p.smoothing):hh.smoothopen(Ct,p.smoothing)}:O=W=function(Ct){return"M"+Ct.join("L")},re=function(Ct){return W(Ct.reverse())},te=Upt(n,{xaxis:c,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),he=new Array(te.length);var Ee=0;for(u=0;u=s[0]&&x.x<=s[1]&&x.y>=u[0]&&x.y<=u[1]}),h=Math.ceil(c.length/f),d=0;i.forEach(function(x,b){var y=x[0].trace;rT.hasMarkers(y)&&y.marker.maxdisplayed>0&&b{"use strict";Mpe.exports={container:"marker",min:"cmin",max:"cmax"}});var JP=Se((ior,Epe)=>{"use strict";var KP=hu();Epe.exports=function(t,r,n){var i={},a={_fullLayout:n},o=KP.getFromTrace(a,r,"x"),s=KP.getFromTrace(a,r,"y"),u=t.orig_x;u===void 0&&(u=t.x);var l=t.orig_y;return l===void 0&&(l=t.y),i.xLabel=KP.tickText(o,o.c2l(u),!0).text,i.yLabel=KP.tickText(s,s.c2l(l),!0).text,i}});var ov=Se((nor,kpe)=>{"use strict";var TU=Nl(),nT=yu(),Wpt=Ul();function jpt(e){var t=TU.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=TU.select(this),i=r.trace||r[0].trace;AU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=TU.select(this),i=r.trace||r[0].trace;SU(n,i,e)}),t.selectAll("g.trace path.js-line").call(nT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nT.fillGroupStyle,e,!1),Wpt.getComponentMethod("errorbars","style")(t)}function AU(e,t,r){nT.pointStyle(e.selectAll("path.point"),t,r)}function SU(e,t,r){nT.textPointStyle(e.selectAll("text"),t,r)}function Zpt(e,t,r){var n=t[0].trace;n.selectedpoints?(nT.selectedPointStyle(r.selectAll("path.point"),n),nT.selectedTextStyle(r.selectAll("text"),n)):(AU(r,n,e),SU(r,n,e))}kpe.exports={style:jpt,stylePoints:AU,styleText:SU,styleOnSelect:Zpt}});var oT=Se((aor,Cpe)=>{"use strict";var aT=Pl(),Xpt=ec();Cpe.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&aT.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&&aT.opacity(a)?a:o&&aT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?aT.opacity(i)<.3?aT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&aT.opacity(n)&&Xpt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var sT=Se((oor,zpe)=>{"use strict";var $P=Zr(),Lpe=jc(),Ypt=Ul(),Kpt=oT(),MU=Pl(),Jpt=$P.fillText;zpe.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,u=t.ya,l=s.c2p(r),f=u.c2p(n),c=[l,f],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,x=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(G){if(p){var O=s.c2p(G.xStart),W=s.c2p(G.xEnd);return l>=Math.min(O,W)&&l<=Math.max(O,W)?0:1/0}var re=Math.max(3,G.mrc||0),ne=1-1/re,be=Math.abs(s.c2p(G.x)-l);return be=Math.min(O,W)&&f<=Math.max(O,W)?0:1/0}var re=Math.max(3,G.mrc||0),ne=1-1/re,be=Math.abs(u.c2p(G.y)-f);return beCe!=me>=Ce&&(Me=ke[te-1][0],Oe=ke[te][0],me-Re&&(Ee=Me+(Oe-Me)*(Ce-Re)/(me-Re),re=Math.min(re,Ee),ne=Math.max(ne,Ee)));return re=Math.max(re,0),ne=Math.min(ne,s._length),{x0:re,x1:ne,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=F(o._fillElement)&&!F(o._fillExclusionElement);if(U){var H=q(o._polygons);H===null&&(H={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var j=MU.defaultLine;return MU.opacity(o.fillcolor)?j=o.fillcolor:MU.opacity((o.line||{}).color)&&(j=o.line.color),$P.extendFlat(t,{distance:t.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:j,hovertemplate:!1}),delete t.index,o.text&&!$P.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var lT=Se((sor,Ipe)=>{"use strict";var Ppe=ec();Ipe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u,l,f,c,h=!Ppe.hasMarkers(s)&&!Ppe.hasText(s);if(h)return[];if(r===!1)for(u=0;u{"use strict";Dpe.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var kU=Se((uor,Bpe)=>{"use strict";var X5=Ul().traceIs,EU=L3();Bpe.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&($pt(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function $pt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=Qpt(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],u={noMultiCategory:!X5(a,"cartesian")||X5(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(u.noMultiCategory=!0),u.autotypenumbers=e.autotypenumbers,qpe(a,n)){var l=Fpe(a),f=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(qpe(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Fpe(e){return{v:"x",h:"y"}[e.orientation||"v"]}function qpe(e,t){var r=Fpe(e),n=X5(e,"box-violin"),i=X5(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var QP=Se((cor,Ope)=>{"use strict";var evt=yp().isTypedArraySpec;function tvt(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||evt(a),s;o&&(s="array");var u=n("categoryorder",s),l;u==="array"&&(l=n("categoryarray")),!o&&u==="array"&&(u=r.categoryorder="trace"),u==="trace"?r._initialCategories=[]:u==="array"?r._initialCategories=l.slice():(l=tvt(r,i).sort(),u==="category ascending"?r._initialCategories=l:u==="category descending"&&(r._initialCategories=l.reverse()))}}});var Y5=Se((hor,Upe)=>{"use strict";var Npe=cd().mix,rvt=Ih(),ivt=Zr();Upe.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(C,M){return ivt.coerce2(t,r,i.attributes,C,M)}var s=o("linecolor",a),u=o("linewidth"),l=n("showline",i.showLine||!!s||!!u);l||(delete r.linecolor,delete r.linewidth);var f=Npe(a,i.bgColor,i.blend||rvt.lightFraction).toRgbString(),c=o("gridcolor",f),h=o("gridwidth"),d=o("griddash"),p=n("showgrid",i.showGrid||!!c||!!h||!!d);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var x=Npe(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",x),y=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),E=n("minor.showgrid",!!b||!!y||!!k);E||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var A=o("zerolinecolor",a),L=o("zerolinewidth"),_=n("zeroline",i.showGrid||!!A||!!L);_||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var J5=Se((dor,Zpe)=>{"use strict";var Vpe=_u(),nvt=Ul(),K5=Zr(),avt=_f(),ovt=Jd(),CU=Rd(),Hpe=xb(),Gpe=T3(),svt=e_(),lvt=t_(),uvt=QP(),fvt=Y5(),cvt=wN(),Wpe=gm(),eI=dd().WEEKDAY_PATTERN,hvt=dd().HOUR_PATTERN;Zpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},u=i.splomStash||{},l=n("visible",!i.visibleDflt),f=r._template||{},c=r.type||f.type||"-",h;if(c==="date"){var d=nvt.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(c==="date"||c==="linear")&&n("ticklabelindex");var p="";(!i.noTicklabelposition||c==="multicategory")&&(p=K5.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",p.indexOf("inside")!==-1?"hide past domain":c==="category"||c==="multicategory"?"allow":"hide past div"),Wpe(r,a),cvt(t,r,n,i),uvt(t,r,n,i),c!=="category"&&!i.noHover&&n("hoverformat");var x=n("color"),b=x!==CU.color.dflt?x:s.color,y=u.label||a._dfltTitle[o];if(lvt(t,r,n,c,i),!l)return r;n("title.text",y),K5.coerceFont(n,"title.font",s,{overrideDflt:{size:K5.bigFont(s.size),color:b}}),Hpe(t,r,n,c);var k=i.hasMinor;if(k&&(avt.newContainer(r,"minor"),Hpe(t,r,n,c,{isMinor:!0})),svt(t,r,n,c,i),Gpe(t,r,n,i),k){var E=i.isMinor;i.isMinor=!0,Gpe(t,r,n,i),i.isMinor=E}fvt(t,r,n,{dfltColor:x,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:CU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var A=c==="multicategory";if(!i.noTickson&&(c==="category"||A)&&(r.ticks||r.showgrid)){var L;A&&(L="boundaries");var _=n("tickson",L);_==="boundaries"&&delete r.ticklabelposition}if(A){var C=n("showdividers");C&&(n("dividercolor"),n("dividerwidth"))}if(c==="date")if(ovt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:dvt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var M=0;M=2){var o="",s,u;if(a.length===2){for(s=0;s<2;s++)if(u=jpe(a[s]),u){o=eI;break}}var l=n("pattern",o);if(l===eI)for(s=0;s<2;s++)u=jpe(a[s]),u&&(t.bounds[s]=a[s]=u-1);if(l)for(s=0;s<2;s++)switch(u=a[s],l){case eI:if(!Vpe(u)){t.enabled=!1;return}if(u=+u,u!==Math.floor(u)||u<0||u>=7){t.enabled=!1;return}t.bounds[s]=a[s]=u;break;case hvt:if(!Vpe(u)){t.enabled=!1;return}if(u=+u,u<0||u>24){t.enabled=!1;return}t.bounds[s]=a[s]=u;break}if(r.autorange===!1){var f=r.range;if(f[0]f[1]){t.enabled=!1;return}}else if(a[0]>f[0]&&a[1]{"use strict";var vvt=_u(),tI=Zr();Xpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,u=i.grid,l=i.overlayingDomain,f,c,h,d,p,x;u&&(c=u._domains[s][u._axisMap[r._id]],f=u._anchors[r._id],c&&(h=u[s+"side"].split(" ")[0],d=u.domain[s][h==="right"||h==="top"?1:0])),c=c||[0,1],f=f||(vvt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,p=0,x=!1;var b=tI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:f}},"anchor"),y=tI.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=y==="left"?l[0]:l[1],x=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",d)}n("automargin",x);var E=!1;if(o.length&&(E=tI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!E){var A=n("domain",c);A[0]>A[1]-1/4096&&(r.domain=c),tI.noneOrAll(t.domain,r.domain,c),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var ive=Se((vor,rve)=>{"use strict";var Wb=Zr(),Ype=Pl(),yvt=rv().isUnifiedHover,mvt=XN(),Kpe=_f(),gvt=s3(),Jpe=Rd(),_vt=kU(),$pe=J5(),xvt=Ob(),Qpe=rI(),zU=$c(),Cm=zU.id2name,eve=zU.name2id,bvt=dd().AX_ID_PATTERN,tve=Ul(),iI=tve.traceIs,LU=tve.getComponentMethod;function nI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}rve.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},u={},l={},f={},c={},h={},d={},p={},x,b;for(x=0;x{"use strict";var wvt=Nl(),nve=Ul(),aI=Zr(),Qv=yu(),oI=hu();ave.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){oI.redrawComponents(t);return}function o(b){var y=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qv.setTranslate,0,0).call(Qv.setScale,1,1),b.plot.call(Qv.setTranslate,y._offset,k._offset).call(Qv.setScale,1,1);var E=b.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(Qv.setPointGroupScale,1,1),E.selectAll(".textpoint").call(Qv.setTextPointsScale,1,1),E.call(Qv.hideOutsideRangePoints,b)}function s(b,y){var k=b.plotinfo,E=k.xaxis,A=k.yaxis,L=E._length,_=A._length,C=!!b.xr1,M=!!b.yr1,v=[];if(C){var z=aI.simpleMap(b.xr0,E.r2l),T=aI.simpleMap(b.xr1,E.r2l),F=z[1]-z[0],q=T[1]-T[0];v[0]=(z[0]*(1-y)+y*T[0]-z[0])/(z[1]-z[0])*L,v[2]=L*(1-y+y*q/F),E.range[0]=E.l2r(z[0]*(1-y)+y*T[0]),E.range[1]=E.l2r(z[1]*(1-y)+y*T[1])}else v[0]=0,v[2]=L;if(M){var U=aI.simpleMap(b.yr0,A.r2l),H=aI.simpleMap(b.yr1,A.r2l),j=U[1]-U[0],G=H[1]-H[0];v[1]=(U[1]*(1-y)+y*H[1]-U[1])/(U[0]-U[1])*_,v[3]=_*(1-y+y*G/j),A.range[0]=E.l2r(U[0]*(1-y)+y*H[0]),A.range[1]=A.l2r(U[1]*(1-y)+y*H[1])}else v[1]=0,v[3]=_;oI.drawOne(t,E,{skipTitle:!0}),oI.drawOne(t,A,{skipTitle:!0}),oI.redrawComponents(t,[E._id,A._id]);var O=C?L/v[2]:1,W=M?_/v[3]:1,re=C?v[0]:0,ne=M?v[1]:0,be=C?v[0]/v[2]*L:0,ze=M?v[1]/v[3]*_:0,Ce=E._offset-be,he=A._offset-ze;k.clipRect.call(Qv.setTranslate,re,ne).call(Qv.setScale,1/O,1/W),k.plot.call(Qv.setTranslate,Ce,he).call(Qv.setScale,O,W),Qv.setPointGroupScale(k.zoomScalePts,1/O,1/W),Qv.setTextPointsScale(k.zoomScaleTxt,1/O,1/W)}var u;i&&(u=i());function l(){for(var b={},y=0;yn.duration?(l(),d=window.cancelAnimationFrame(x)):d=window.requestAnimationFrame(x)}return c=Date.now(),d=window.requestAnimationFrame(x),Promise.resolve()}});var Th=Se(xp=>{"use strict";var lI=Nl(),sve=Ul(),jb=Zr(),Tvt=Sc(),Avt=yu(),lve=Dd().getModuleCalcData,y_=$c(),Ry=dd(),Svt=Zv(),Nf=jb.ensureSingle;function sI(e,t,r){return jb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Zb=Ry.zindexSeparator;xp.name="cartesian";xp.attr=["xaxis","yaxis"];xp.idRoot=["x","y"];xp.idRegex=Ry.idRegex;xp.attrRegex=Ry.attrRegex;xp.attributes=Rpe();xp.layoutAttributes=Rd();xp.supplyLayoutDefaults=ive();xp.transitionAxes=ove();xp.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},u={},l,f,c;for(l=0;l0){var d=h.id;if(d.indexOf(Zb)!==-1)continue;d+=Zb+(l+1),h=jb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],x,b=0;b1&&(L+=Zb+A),E.push(s+L),o=0;o1,c=t.mainplotinfo;if(!t.mainplot||f)if(l)t.xlines=Nf(n,"path","xlines-above"),t.ylines=Nf(n,"path","ylines-above"),t.xaxislayer=Nf(n,"g","xaxislayer-above"),t.yaxislayer=Nf(n,"g","yaxislayer-above");else{if(!o){var h=Nf(n,"g","layer-subplot");t.shapelayer=Nf(h,"g","shapelayer"),t.imagelayer=Nf(h,"g","imagelayer"),c&&f?(t.minorGridlayer=c.minorGridlayer,t.gridlayer=c.gridlayer,t.zerolinelayer=c.zerolinelayer):(t.minorGridlayer=Nf(n,"g","minor-gridlayer"),t.gridlayer=Nf(n,"g","gridlayer"),t.zerolinelayer=Nf(n,"g","zerolinelayer"));var d=Nf(n,"g","layer-between");t.shapelayerBetween=Nf(d,"g","shapelayer"),t.imagelayerBetween=Nf(d,"g","imagelayer"),Nf(n,"path","xlines-below"),Nf(n,"path","ylines-below"),t.overlinesBelow=Nf(n,"g","overlines-below"),Nf(n,"g","xaxislayer-below"),Nf(n,"g","yaxislayer-below"),t.overaxesBelow=Nf(n,"g","overaxes-below")}t.overplot=Nf(n,"g","overplot"),t.plot=Nf(t.overplot,"g",i),o||(t.xlines=Nf(n,"path","xlines-above"),t.ylines=Nf(n,"path","ylines-above"),t.overlinesAbove=Nf(n,"g","overlines-above"),Nf(n,"g","xaxislayer-above"),Nf(n,"g","yaxislayer-above"),t.overaxesAbove=Nf(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+u),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+u))}else{var p=c.plotgroup,x=i+"-x",b=i+"-y";t.minorGridlayer=c.minorGridlayer,t.gridlayer=c.gridlayer,t.zerolinelayer=c.zerolinelayer,Nf(c.overlinesBelow,"path",x),Nf(c.overlinesBelow,"path",b),Nf(c.overaxesBelow,"g",x),Nf(c.overaxesBelow,"g",b),t.plot=Nf(c.overplot,"g",i),Nf(c.overlinesAbove,"path",x),Nf(c.overlinesAbove,"path",b),Nf(c.overaxesAbove,"g",x),Nf(c.overaxesAbove,"g",b),t.xlines=p.select(".overlines-"+s).select("."+x),t.ylines=p.select(".overlines-"+u).select("."+b),t.xaxislayer=p.select(".overaxes-"+s).select("."+x),t.yaxislayer=p.select(".overaxes-"+u).select("."+b)}o||(l||(sI(t.minorGridlayer,"g",t.xaxis._id),sI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(y_.idSort),sI(t.gridlayer,"g",t.xaxis._id),sI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(y_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function cve(e,t){if(e){var r={};e.each(function(u){var l=u[0],f=lI.select(this);f.remove(),hve(l,t),r[l]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o{"use strict";var uI=ec();dve.exports={hasLines:uI.hasLines,hasMarkers:uI.hasMarkers,hasText:uI.hasText,isBubble:uI.isBubble,attributes:Zc(),layoutAttributes:UL(),supplyDefaults:Nde(),crossTraceDefaults:lU(),supplyLayoutDefaults:Gde(),calc:q0().calc,crossTraceCalc:ppe(),arraysToCalcdata:km(),plot:iT(),colorbar:ep(),formatLabels:JP(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:sT(),selectPoints:lT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Th(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var mve=Se((_or,yve)=>{"use strict";var Evt=Nl(),kvt=Pl(),vve=F7(),PU=Zr(),Cvt=PU.strScale,Lvt=PU.strRotate,zvt=PU.strTranslate;yve.exports=function(t,r,n){var i=t.node(),a=vve[n.arrowhead||0],o=vve[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),u=(n.arrowwidth||1)*(n.startarrowsize||1),l=r.indexOf("start")>=0,f=r.indexOf("end")>=0,c=a.backoff*s+n.standoff,h=o.backoff*u+n.startstandoff,d,p,x,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=d.x-p.x,k=d.y-p.y;if(x=Math.atan2(k,y),b=x+Math.PI,c&&h&&c+h>Math.sqrt(y*y+k*k)){U();return}if(c){if(c*c>y*y+k*k){U();return}var E=c*Math.cos(x),A=c*Math.sin(x);p.x+=E,p.y+=A,t.attr({x2:p.x,y2:p.y})}if(h){if(h*h>y*y+k*k){U();return}var L=h*Math.cos(x),_=h*Math.sin(x);d.x-=L,d.y-=_,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C{"use strict";var gve=Nl(),IU=Ul(),Pvt=Sc(),g_=Zr(),DU=g_.strTranslate,Q5=hu(),Xb=Pl(),zg=yu(),_ve=jc(),RU=Bf(),FU=Ty(),$5=gp(),Ivt=_f().arrayEditor,Dvt=mve();wve.exports={draw:Rvt,drawOne:xve,drawRaw:bve};function Rvt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Ie="right":Ie="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ie]}for(var Re=!1,me=["x","y"],Be=0;Be1)&&(et===Ze?(rt=gt.r2fraction(t["a"+fe]),(rt<0||rt>1)&&(Re=!0)):Re=!0),jt=gt._offset+gt.r2p(t[fe]),nt=.5}else{var je=ct==="domain";fe==="x"?(Te=t[fe],jt=je?gt._offset+gt._length*Te:jt=s.l+s.w*Te):(Te=1-t[fe],jt=je?gt._offset+gt._length*Te:jt=s.t+s.h*Te),nt=t.showarrow?.5:Te}if(t.showarrow){Ct.head=jt;var tt=t["a"+fe];if(ut=Qe*Oe(.5,t.xanchor)-Xe*Oe(.5,t.yanchor),et===Ze){var Je=Q5.getRefType(et);Je==="domain"?(fe==="y"&&(tt=1-tt),Ct.tail=gt._offset+gt._length*tt):Je==="paper"?fe==="y"?(tt=1-tt,Ct.tail=s.t+s.h*tt):Ct.tail=s.l+s.w*tt:Ct.tail=gt._offset+gt.r2p(tt),At=ut}else Ct.tail=jt+tt,At=ut+tt;Ct.text=Ct.tail+ut;var Mt=o[fe==="x"?"width":"height"];if(Ze==="paper"&&(Ct.head=g_.constrain(Ct.head,1,Mt-1)),et==="pixel"){var Vt=-Math.max(Ct.tail-3,Ct.text),Kt=Math.min(Ct.tail+3,Ct.text)-Mt;Vt>0?(Ct.tail+=Vt,Ct.text+=Vt):Kt>0&&(Ct.tail-=Kt,Ct.text-=Kt)}Ct.tail+=_t,Ct.head+=_t}else ut=Tt*Oe(nt,xt),At=ut,Ct.text=jt+ut;Ct.text+=_t,ut+=_t,At+=_t,t["_"+fe+"padplus"]=Tt/2+At,t["_"+fe+"padminus"]=Tt/2-At,t["_"+fe+"size"]=Tt,t["_"+fe+"shift"]=ut}if(Re){C.remove();return}var ir=0,fr=0;if(t.align!=="left"&&(ir=(te-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(fr=(ke-he)*(t.valign==="middle"?.5:1)),be)ne.select("svg").attr({x:z+ir-1,y:z+fr}).call(zg.setClipUrl,F?x:null,e);else{var Ot=z+fr-ze.top,De=z+ir-ze.left;j.call(RU.positionText,De,Ot).call(zg.setClipUrl,F?x:null,e)}q.select("rect").call(zg.setRect,z,z,te,ke),T.call(zg.setRect,M/2,M/2,Ee-M,Me-M),C.call(zg.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Me/2)),E.attr({transform:"rotate("+y+","+b.x.text+","+b.y.text+")"});var _e=function(Pe,Ie){k.selectAll(".annotation-arrow-g").remove();var lt=b.x.head,ye=b.y.head,ue=b.x.tail+Pe,de=b.y.tail+Ie,ht=b.x.text+Pe,Et=b.y.text+Ie,St=g_.rotationXYMatrix(y,ht,Et),Zt=g_.apply2DTransform(St),qr=g_.apply2DTransform2(St),Lr=+T.attr("width"),vr=+T.attr("height"),Er=ht-.5*Lr,si=Er+Lr,Ei=Et-.5*vr,Si=Ei+vr,xi=[[Er,Ei,Er,Si],[Er,Si,si,Si],[si,Si,si,Ei],[si,Ei,Er,Ei]].map(qr);if(!xi.reduce(function(Tr,Rr){return Tr^!!g_.segmentsIntersect(lt,ye,lt+1e6,ye+1e6,Rr[0],Rr[1],Rr[2],Rr[3])},!1)){xi.forEach(function(Tr){var Rr=g_.segmentsIntersect(ue,de,lt,ye,Tr[0],Tr[1],Tr[2],Tr[3]);Rr&&(ue=Rr.x,de=Rr.y)});var Hi=t.arrowwidth,Jr=t.arrowcolor,ci=t.arrowside,Di=k.append("g").style({opacity:Xb.opacity(Jr)}).classed("annotation-arrow-g",!0),Lt=Di.append("path").attr("d","M"+ue+","+de+"L"+lt+","+ye).style("stroke-width",Hi+"px").call(Xb.stroke,Xb.rgb(Jr));if(Dvt(Lt,ci,t),u.annotationPosition&&Lt.node().parentNode&&!n){var vt=lt,Dt=ye;if(t.standoff){var Bt=Math.sqrt(Math.pow(lt-ue,2)+Math.pow(ye-de,2));vt+=t.standoff*(ue-lt)/Bt,Dt+=t.standoff*(de-ye)/Bt}var sr=Di.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ue-vt)+","+(de-Dt),transform:DU(vt,Dt)}).style("stroke-width",Hi+6+"px").call(Xb.stroke,"rgba(0,0,0,0)").call(Xb.fill,"rgba(0,0,0,0)"),br,zr;$5.init({element:sr.node(),gd:e,prepFn:function(){var Tr=zg.getTranslate(C);br=Tr.x,zr=Tr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Tr,Rr){var Br=Zt(br,zr),oi=Br[0]+Tr,vi=Br[1]+Rr;C.call(zg.setTranslate,oi,vi),d("x",m_(i,Tr,"x",s,t)),d("y",m_(a,Rr,"y",s,t)),t.axref===t.xref&&d("ax",m_(i,Tr,"ax",s,t)),t.ayref===t.yref&&d("ay",m_(a,Rr,"ay",s,t)),Di.attr("transform",DU(Tr,Rr)),E.attr({transform:"rotate("+y+","+oi+","+vi+")"})},doneFn:function(){IU.call("_guiRelayout",e,p());var Tr=document.querySelector(".js-notes-box-panel");Tr&&Tr.redraw(Tr.selectedObj)}})}}};if(t.showarrow&&_e(0,0),A){var Fe;$5.init({element:C.node(),gd:e,prepFn:function(){Fe=E.attr("transform")},moveFn:function(Pe,Ie){var lt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",m_(i,Pe,"ax",s,t)):d("ax",t.ax+Pe),t.ayref===t.yref?d("ay",m_(a,Ie,"ay",s.w,t)):d("ay",t.ay+Ie),_e(Pe,Ie);else{if(n)return;var ye,ue;if(i)ye=m_(i,Pe,"x",s,t);else{var de=t._xsize/s.w,ht=t.x+(t._xshift-t.xshift)/s.w-de/2;ye=$5.align(ht+Pe/s.w,de,0,1,t.xanchor)}if(a)ue=m_(a,Ie,"y",s,t);else{var Et=t._ysize/s.h,St=t.y-(t._yshift+t.yshift)/s.h-Et/2;ue=$5.align(St-Ie/s.h,Et,0,1,t.yanchor)}d("x",ye),d("y",ue),(!i||!a)&&(lt=$5.getCursor(i?.5:ye,a?.5:ue,t.xanchor,t.yanchor))}E.attr({transform:DU(Pe,Ie)+Fe}),FU(C,lt)},clickFn:function(Pe,Ie){t.captureevents&&e.emit("plotly_clickannotation",_(Ie))},doneFn:function(){FU(C),IU.call("_guiRelayout",e,p());var Pe=document.querySelector(".js-notes-box-panel");Pe&&Pe.redraw(Pe.selectedObj)}})}}u.annotationText?j.call(RU.makeEditable,{delegate:C,gd:e}).call(G).on("edit",function(W){t.text=W,this.call(G),d("text",W),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),IU.call("_guiRelayout",e,p())}):j.call(G)}});var kve=Se((bor,Eve)=>{"use strict";var Tve=Zr(),Fvt=Ul(),Ave=_f().arrayEditor;Eve.exports={hasClickToShow:qvt,onClick:Bvt};function qvt(e,t){var r=Mve(e,t);return r.on.length>0||r.explicitOff.length>0}function Bvt(e,t){var r=Mve(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,u;if(n.length||i.length){for(s=0;s{"use strict";var qU=Zr(),uT=Pl();Cve.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=uT.opacity(o);i("borderpad");var u=i("borderwidth"),l=i("showarrow");i("text",l?" ":n._dfltTitle.annotation),i("textangle"),qU.coerceFont(i,"font",n.font),i("width"),i("align");var f=i("height");if(f&&i("valign"),l){var c=i("arrowside"),h,d;c.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),c.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:uT.defaultLine),i("arrowwidth",(s&&u||1)*2),i("standoff"),i("startstandoff")}var p=i("hovertext"),x=n.hoverlabel||{};if(p){var b=i("hoverlabel.bgcolor",x.bgcolor||(uT.opacity(a)?uT.rgb(a):uT.defaultLine)),y=i("hoverlabel.bordercolor",x.bordercolor||uT.contrast(b)),k=qU.extendFlat({},x.font);k.color||(k.color=y),qU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!p)}});var zve=Se((Tor,Lve)=>{"use strict";var OU=Zr(),Yb=hu(),Ovt=Jd(),Nvt=BU(),Uvt=Nb();Lve.exports=function(t,r){Ovt(t,r,{name:"annotations",handleItemDefaults:Vvt})};function Vvt(e,t,r){function n(E,A){return OU.coerce(e,t,Uvt,E,A)}var i=n("visible"),a=n("clicktoshow");if(i||a){Nvt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],u=[-10,-30],l={_fullLayout:r},f=0;f<2;f++){var c=s[f],h=Yb.coerceRef(e,t,l,c,"","paper");if(h!=="paper"){var d=Yb.getFromId(l,h);d._annIndices.push(t._index)}if(Yb.coercePosition(t,l,n,h,c,.5),o){var p="a"+c,x=Yb.coerceRef(e,t,l,p,"pixel",["pixel","paper"]);x!=="pixel"&&x!==h&&(x=t[p]="pixel");var b=x==="pixel"?u[f]:.4;Yb.coercePosition(t,l,n,x,p,b)}n(c+"anchor"),n(c+"shift")}if(OU.noneOrAll(e,t,["x","y"]),o&&OU.noneOrAll(e,t,["ax","ay"]),a){var y=n("xclick"),k=n("yclick");t._xclick=y===void 0?t.x:Yb.cleanPosition(y,l,t.xref),t._yclick=k===void 0?t.y:Yb.cleanPosition(k,l,t.yref)}}}});var Dve=Se((Aor,Ive)=>{"use strict";var NU=Zr(),Kb=hu(),Hvt=fI().draw;Ive.exports=function(t){var r=t._fullLayout,n=NU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return NU.syncOrAsync([Hvt,Gvt],t)};function Gvt(e){var t=e._fullLayout;NU.filterVisible(t.annotations).forEach(function(r){var n=Kb.getFromId(e,r.xref),i=Kb.getFromId(e,r.yref),a=Kb.getRefType(r.xref),o=Kb.getRefType(r.yref);r._extremes={},a==="range"&&Pve(r,n),o==="range"&&Pve(r,i)})}function Pve(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"],u=e["_"+n+"padplus"],l=e["_"+n+"padminus"],f={x:1,y:-1}[n]*e[n+"shift"],c=3*e.arrowsize*e.arrowwidth||0,h=c+f,d=c-f,p=3*e.startarrowsize*e.arrowwidth||0,x=p+f,b=p-f,y;if(s===o){var k=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),E=Kb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(u,x),ppadminus:Math.max(l,b)});y={min:[k.min[0],E.min[0]],max:[k.max[0],E.max[0]]}}else x=a?x+a:x,b=a?b-a:b,y=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(u,h,x),ppadminus:Math.max(l,d,b)});e._extremes[r]=y}});var Fve=Se((Sor,Rve)=>{"use strict";var Wvt=_u(),jvt=lL();Rve.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,u=r._id.charAt(0),l,f;function c(d){var p=l[d],x=null;a?x=jvt(p,r.range):x=Math.pow(10,p),Wvt(x)||(x=null),i(f+d,x)}for(var h=0;h{"use strict";var UU=fI(),qve=kve();Bve.exports={moduleType:"component",name:"annotations",layoutAttributes:Nb(),supplyLayoutDefaults:zve(),includeBasePlot:P5()("annotations"),calcAutorange:Dve(),draw:UU.draw,drawOne:UU.drawOne,drawRaw:UU.drawRaw,hasClickToShow:qve.hasClickToShow,onClick:qve.onClick,convertCoords:Fve()}});var cI=Se((Eor,Nve)=>{"use strict";var Mc=Nb(),Zvt=_c().overrideAll,Xvt=_f().templatedArray;Nve.exports=Zvt(Xvt("annotation",{visible:Mc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Mc.xanchor,xshift:Mc.xshift,yanchor:Mc.yanchor,yshift:Mc.yshift,text:Mc.text,textangle:Mc.textangle,font:Mc.font,width:Mc.width,height:Mc.height,opacity:Mc.opacity,align:Mc.align,valign:Mc.valign,bgcolor:Mc.bgcolor,bordercolor:Mc.bordercolor,borderpad:Mc.borderpad,borderwidth:Mc.borderwidth,showarrow:Mc.showarrow,arrowcolor:Mc.arrowcolor,arrowhead:Mc.arrowhead,startarrowhead:Mc.startarrowhead,arrowside:Mc.arrowside,arrowsize:Mc.arrowsize,startarrowsize:Mc.startarrowsize,arrowwidth:Mc.arrowwidth,standoff:Mc.standoff,startstandoff:Mc.startstandoff,hovertext:Mc.hovertext,hoverlabel:Mc.hoverlabel,captureevents:Mc.captureevents}),"calc","from-root")});var Vve=Se((kor,Uve)=>{"use strict";var VU=Zr(),Yvt=hu(),Kvt=Jd(),Jvt=BU(),$vt=cI();Uve.exports=function(t,r,n){Kvt(t,r,{name:"annotations",handleItemDefaults:Qvt,fullLayout:n.fullLayout})};function Qvt(e,t,r,n){function i(s,u){return VU.coerce(e,t,$vt,s,u)}function a(s){var u=s+"axis",l={_fullLayout:{}};return l._fullLayout[u]=r[u],Yvt.coercePosition(t,l,i,s,s,.5)}var o=i("visible");o&&(Jvt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),VU.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),VU.noneOrAll(e,t,["ax","ay"])))}});var jve=Se((Cor,Wve)=>{"use strict";var Hve=Zr(),Gve=hu();Wve.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function HU(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 t0t(e,t){var r=HU(e.projection,HU(e.view,HU(e.model,[t[0],t[1],t[2],1])));return r}Zve.exports=t0t});var Yve=Se((zor,Xve)=>{"use strict";var r0t=fI().drawRaw,i0t=GU(),n0t=["x","y","z"];Xve.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=i0t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),r0t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var $ve=Se((Por,Jve)=>{"use strict";var a0t=Ul(),Kve=Zr();Jve.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:cI()}}},layoutAttributes:cI(),handleDefaults:Vve(),includeBasePlot:o0t,convert:jve(),draw:Yve()};function o0t(e,t){var r=a0t.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var Qve=Nb(),e0e=uc(),t0e=Zc().line,s0t=Id().dash,Fy=vu().extendFlat,l0t=_f().templatedArray,Ior=z5(),fT=zf(),u0t=Du().shapeTexttemplateAttrs,f0t=xL();r0e.exports=l0t("shape",{visible:Fy({},fT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Fy({},fT.legend,{editType:"calc+arraydraw"}),legendgroup:Fy({},fT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Fy({},fT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:e0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Fy({},fT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Fy({},fT.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:Fy({},Qve.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:Fy({},Qve.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:Fy({},t0e.color,{editType:"arraydraw"}),width:Fy({},t0e.width,{editType:"calc+arraydraw"}),dash:Fy({},s0t,{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:u0t({},{keys:Object.keys(f0t)}),font:e0e({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 a0e=Se((Ror,n0e)=>{"use strict";var e4=Zr(),cT=hu(),c0t=Jd(),h0t=WU(),i0e=c_();n0e.exports=function(t,r){c0t(t,r,{name:"shapes",handleItemDefaults:p0t})};function d0t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function p0t(e,t,r){function n(W,re){return e4.coerce(e,t,h0t,W,re)}t._isShape=!0;var i=n("visible");if(i){var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),e4.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",u=n("type",s),l=u!=="path";l&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var f=n("line.width");f&&(n("line.color"),n("line.dash"));for(var c=n("xsizemode"),h=n("ysizemode"),d=["x","y"],p=0;p<2;p++){var x=d[p],b=x+"anchor",y=x==="x"?c:h,k={_fullLayout:r},E,A,L,_=cT.coerceRef(e,t,k,x,void 0,"paper"),C=cT.getRefType(_);if(C==="range"?(E=cT.getFromId(k,_),E._shapeIndices.push(t._index),L=i0e.rangeToShapePosition(E),A=i0e.shapePositionToRange(E),(E.type==="category"||E.type==="multicategory")&&(n(x+"0shift"),n(x+"1shift"))):A=L=e4.identity,l){var M=.25,v=.75,z=x+"0",T=x+"1",F=e[z],q=e[T];e[z]=A(e[z],!0),e[T]=A(e[T],!0),y==="pixel"?(n(z,0),n(T,10)):(cT.coercePosition(t,k,n,_,z,M),cT.coercePosition(t,k,n,_,T,v)),t[z]=L(t[z]),t[T]=L(t[T]),e[z]=F,e[T]=q}if(y==="pixel"){var U=e[b];e[b]=A(e[b],!0),cT.coercePosition(t,k,n,_,b,.25),t[b]=L(t[b]),e[b]=U}}l&&e4.noneOrAll(e,t,["x0","x1","y0","y1"]);var H=u==="line",j,G;if(l&&(j=n("label.texttemplate")),j||(G=n("label.text")),G||j){n("label.textangle");var O=n("label.textposition",H?"middle":"middle center");n("label.xanchor"),n("label.yanchor",d0t(H,O)),n("label.padding"),e4.coerceFont(n,"label.font",r.font)}}}});var l0e=Se((For,s0e)=>{"use strict";var v0t=Pl(),o0e=Zr();function y0t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}s0e.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"),o0e.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",v0t.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),u=n("newshape.label.texttemplate");if(s||u){n("newshape.label.textangle");var l=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",y0t(o,l)),n("newshape.label.padding"),o0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var d0e=Se((qor,h0e)=>{"use strict";var jU=Zr(),hT=hu(),dT=f5(),f0e=c_();h0e.exports=function(t){var r=t._fullLayout,n=jU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i0?l+o:o;return{ppad:o,ppadplus:s?c:h,ppadminus:s?h:c}}else return{ppad:o}}function u0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,u=0,l=i?e.r2c:e.d2c,f=t[n+"sizemode"]==="scaled";if(f?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],u=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[l(a)+s,l(o)+u];if(t.path){var c=1/0,h=-1/0,d=t.path.match(dT.segmentRE),p,x,b,y,k;for(e.type==="date"&&(l=f0e.decodeDate(l)),p=0;ph&&(h=k)));if(h>=c)return[c,h]}}});var y0e=Se((Bor,v0e)=>{"use strict";var p0e=tP();v0e.exports={moduleType:"component",name:"shapes",layoutAttributes:WU(),supplyLayoutDefaults:a0e(),supplyDrawNewShapeDefaults:l0e(),includeBasePlot:P5()("shapes"),calcAutorange:d0e(),draw:p0e.draw,drawOne:p0e.drawOne}});var ZU=Se((Nor,g0e)=>{"use strict";var m0e=dd(),_0t=_f().templatedArray,Oor=z5();g0e.exports=_0t("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",m0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",m0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var x0e=Se((Uor,_0e)=>{"use strict";var x0t=Zr(),XU=hu(),b0t=Jd(),w0t=ZU(),T0t="images";_0e.exports=function(t,r){var n={name:T0t,handleItemDefaults:A0t};b0t(t,r,n)};function A0t(e,t,r){function n(h,d){return x0t.coerce(e,t,w0t,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"],u=0;u<2;u++){var l=s[u],f=XU.coerceRef(e,t,o,l,"paper",void 0);if(f!=="paper"){var c=XU.getFromId(o,f);c._imgIndices.push(t._index)}XU.coercePosition(t,o,n,f,l,0)}return t}});var A0e=Se((Vor,T0e)=>{"use strict";var b0e=Nl(),S0t=yu(),pT=hu(),w0e=$c(),M0t=Zv();T0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var S0e=_u(),E0t=lL();M0e.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,u=r._id.charAt(0),l,f,c=0;c{"use strict";k0e.exports={moduleType:"component",name:"images",layoutAttributes:ZU(),supplyLayoutDefaults:x0e(),includeBasePlot:P5()("images"),draw:A0e(),convertCoords:E0e()}});var hI=Se((Wor,L0e)=>{"use strict";L0e.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 YU=Se((jor,P0e)=>{"use strict";var k0t=uc(),C0t=Ih(),L0t=vu().extendFlat,z0t=_c().overrideAll,P0t=bL(),z0e=_f().templatedArray,I0t=z0e("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}});P0e.exports=z0t(z0e("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:I0t,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:L0t(P0t({editType:"arraydraw"}),{}),font:k0t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C0t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var F0e=Se((Zor,R0e)=>{"use strict";var dI=Zr(),I0e=Jd(),D0e=YU(),D0t=hI(),R0t=D0t.name,F0t=D0e.buttons;R0e.exports=function(t,r){var n={name:R0t,handleItemDefaults:q0t};I0e(t,r,n)};function q0t(e,t,r){function n(o,s){return dI.coerce(e,t,D0e,o,s)}var i=I0e(e,t,{name:"buttons",handleItemDefaults:B0t}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),dI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),dI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function B0t(e,t){function r(i,a){return dI.coerce(e,t,F0t,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 O0e=Se((Xor,B0e)=>{"use strict";B0e.exports=Qc;var qy=Nl(),q0e=Pl(),vT=yu(),pI=Zr();function Qc(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})}Qc.barWidth=2;Qc.barLength=20;Qc.barRadius=2;Qc.barPad=1;Qc.barColor="#808BA4";Qc.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,u=this.position.w,l=this.position.t,f=this.position.h,c=this.position.direction,h=c==="down",d=c==="left",p=c==="right",x=c==="up",b=u,y=f,k,E,A,L;!h&&!d&&!p&&!x&&(this.position.direction="down",h=!0);var _=h||x;_?(k=s,E=k+b,h?(A=l,L=Math.min(A+y,o),y=L-A):(L=l+y,A=Math.max(L-y,0),y=L-A)):(A=l,L=A+y,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:A,w:b,h:y};var C=u>b,M=Qc.barLength+2*Qc.barPad,v=Qc.barWidth+2*Qc.barPad,z=s,T=l+f;T+v>o&&(T=o-v);var F=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(q0e.fill,Qc.barColor),C?(this.hbar=F.attr({rx:Qc.barRadius,ry:Qc.barRadius,x:z,y:T,width:M,height:v}),this._hbarXMin=z+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=f>y,U=Qc.barWidth+2*Qc.barPad,H=Qc.barLength+2*Qc.barPad,j=s+u,G=l;j+U>a&&(j=a-U);var O=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-vertical",!0).call(q0e.fill,Qc.barColor),q?(this.vbar=O.attr({rx:Qc.barRadius,ry:Qc.barRadius,x:j,y:G,width:U,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=y-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,re=k-.5,ne=q?E+U+.5:E+.5,be=A-.5,ze=C?L+v+.5:L+.5,Ce=i._topdefs.selectAll("#"+W).data(C||q?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",W).append("rect"),C||q?(this._clipRect=Ce.select("rect").attr({x:Math.floor(re),y:Math.floor(be),width:Math.ceil(ne)-Math.floor(re),height:Math.ceil(ze)-Math.floor(be)}),this.container.call(vT.setClipUrl,W,this.gd),this.bg.attr({x:s,y:l,width:u,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vT.setClipUrl,null),delete this._clipRect),C||q){var he=qy.behavior.drag().on("dragstart",function(){qy.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(he);var te=qy.behavior.drag().on("dragstart",function(){qy.event.sourceEvent.preventDefault(),qy.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(te),q&&this.vbar.on(".drag",null).call(te)}this.setTranslate(r,n)};Qc.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(vT.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)};Qc.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=qy.event.dx),this.vbar&&(r-=qy.event.dy),this.setTranslate(t,r)};Qc.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=qy.event.deltaY),this.vbar&&(r+=qy.event.deltaY),this.setTranslate(t,r)};Qc.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=pI.constrain(qy.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var u=r+this._vbarYMin,l=u+this._vbarTranslateMax,f=pI.constrain(qy.event.y,u,l),c=(f-u)/(l-u),h=this.position.h-this._box.h;r=c*h}this.setTranslate(t,r)};Qc.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=pI.constrain(t||0,0,n),r=pI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(vT.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(vT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(vT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var Y0e=Se((Yor,X0e)=>{"use strict";var yT=Nl(),t4=Sc(),r4=Pl(),mT=yu(),e0=Zr(),vI=Bf(),O0t=_f().arrayEditor,U0e=Qh().LINE_SPACING,Iu=hI(),N0t=O0e();X0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[Iu.name]);function i(h){t4.autoMargin(t,j0e(h))}var a=r._menulayer.selectAll("g."+Iu.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(Iu.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){yT.select(this).selectAll("g."+Iu.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+Iu.headerGroupClassName).data(n,U0t);o.enter().append("g").classed(Iu.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,"g",Iu.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),u=0;u{"use strict";var X0t=hI();K0e.exports={moduleType:"component",name:X0t.name,layoutAttributes:YU(),supplyLayoutDefaults:F0e(),draw:Y0e()}});var n4=Se((Jor,$0e)=>{"use strict";$0e.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 QU=Se(($or,tye)=>{"use strict";var Q0e=uc(),Y0t=bL(),K0t=vu().extendDeepAll,J0t=_c().overrideAll,$0t=RM(),eye=_f().templatedArray,Jb=n4(),Q0t=eye("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}});tye.exports=J0t(eye("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Q0t,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:K0t(Y0t({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:$0t.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:Q0e({})},font:Q0e({}),activebgcolor:{valType:"color",dflt:Jb.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jb.railBgColor},bordercolor:{valType:"color",dflt:Jb.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jb.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jb.tickLength},tickcolor:{valType:"color",dflt:Jb.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jb.minorTickLength}}),"arraydraw","from-root")});var aye=Se((Qor,nye)=>{"use strict";var gT=Zr(),rye=Jd(),iye=QU(),eyt=n4(),tyt=eyt.name,ryt=iye.steps;nye.exports=function(t,r){rye(t,r,{name:tyt,handleItemDefaults:iyt})};function iyt(e,t,r){function n(c,h){return gT.coerce(e,t,iye,c,h)}for(var i=rye(e,t,{name:"steps",handleItemDefaults:nyt}),a=0,o=0;o{"use strict";var By=Nl(),yI=Sc(),__=Pl(),Oy=yu(),t0=Zr(),ayt=t0.strTranslate,a4=Bf(),oyt=_f().arrayEditor,lf=n4(),rV=Qh(),lye=rV.LINE_SPACING,eV=rV.FROM_TL,tV=rV.FROM_BR;pye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=syt(n,t),a=n._infolayer.selectAll("g."+lf.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(lf.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),yI.autoMargin(t,uye(f))}if(a.exit().each(function(){By.select(this).selectAll("g."+lf.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+lf.groupClassName).data(i,lyt);s.enter().append("g").classed(lf.groupClassName,!0),s.exit().each(o).remove();for(var u=0;u0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",ayt(o-lf.gripWidth*.5,t._dims.currentValueTotalHeight))}}function iV(e,t){var r=e._dims;return r.inputAreaStart+lf.stepInset+(r.inputAreaLength-2*lf.stepInset)*Math.min(1,Math.max(0,t))}function sye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-lf.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*lf.stepInset-2*r.inputAreaStart)))}function vyt(e,t,r){var n=r._dims,i=t0.ensureSingle(e,"rect",lf.railTouchRectClass,function(a){a.call(hye,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,lf.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr("opacity",0),Oy.setTranslate(i,0,n.currentValueTotalHeight)}function yyt(e,t){var r=t._dims,n=r.inputAreaLength-lf.railInset*2,i=t0.ensureSingle(e,"rect",lf.railRectClass);i.attr({width:n,height:lf.railWidth,rx:lf.railRadius,ry:lf.railRadius,"shape-rendering":"crispEdges"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Oy.setTranslate(i,lf.railInset,(r.inputAreaWidth-lf.railWidth)*.5+r.currentValueTotalHeight)}});var mye=Se((tsr,yye)=>{"use strict";var myt=n4();yye.exports={moduleType:"component",name:myt.name,layoutAttributes:QU(),supplyLayoutDefaults:aye(),draw:vye()}});var gI=Se((rsr,_ye)=>{"use strict";var gye=Ih();_ye.exports={bgcolor:{valType:"color",dflt:gye.background,editType:"plot"},bordercolor:{valType:"color",dflt:gye.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 nV=Se((isr,xye)=>{"use strict";xye.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 _I=Se((nsr,bye)=>{"use strict";bye.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 Aye=Se(bI=>{"use strict";var gyt=$c(),_yt=Bf(),wye=_I(),xyt=Qh().LINE_SPACING,xI=wye.name;function Tye(e){var t=e&&e[xI];return t&&t.visible}bI.isVisible=Tye;bI.makeData=function(e){for(var t=gyt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var wI=Zr(),Sye=_f(),Mye=$c(),byt=gI(),wyt=nV();Eye.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;wI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Sye.newContainer(a,"rangeslider");function u(L,_){return wI.coerce(o,s,byt,L,_)}var l,f;function c(L,_){return wI.coerce(l,f,wyt,L,_)}var h=u("visible");if(h){u("bgcolor",r.plot_bgcolor),u("bordercolor"),u("borderwidth"),u("thickness"),u("autorange",!a.isValidRange(o.range)),u("range");var d=r._subplots;if(d)for(var p=d.cartesian.filter(function(L){return L.substr(0,L.indexOf("y"))===Mye.name2id(n)}).map(function(L){return L.substr(L.indexOf("y"),L.length)}),x=wI.simpleMap(p,Mye.id2name),b=0;b{"use strict";var Tyt=$c().list,Ayt=wy().getAutoRange,Syt=_I();Cye.exports=function(t){for(var r=Tyt(t,"x",!0),n=0;n{"use strict";var TI=Nl(),Myt=Ul(),Eyt=Sc(),dh=Zr(),AI=dh.strTranslate,Pye=yu(),x_=Pl(),kyt=Mb(),Cyt=Th(),aV=$c(),Lyt=gp(),zyt=Ty(),vf=_I();Iye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=O.max)j=T[G+1];else if(H=O.pmax)j=T[G+1];else if(H0?e.touches[0].clientX:0}function Pyt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+vf.slideBoxClassName).node(),a=e.select("rect."+vf.grabAreaMinClassName).node(),o=e.select("rect."+vf.grabAreaMaxClassName).node();function s(){var u=TI.event,l=u.target,f=zye(u),c=f-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),p=Lyt.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",b),p.addEventListener("mousemove",x),p.addEventListener("mouseup",b);function x(y){var k=zye(y),E=+k-f,A,L,_;switch(l){case i:if(_="ew-resize",h+E>r._length||d+E<0)return;A=h+E,L=d+E;break;case a:if(_="col-resize",h+E>r._length)return;A=h+E,L=d;break;case o:if(_="col-resize",d+E<0)return;A=h,L=d+E;break;default:_="ew-resize",A=c,L=c+E;break}if(L{"use strict";var Vyt=Zr(),Hyt=gI(),Gyt=nV(),oV=Aye();Rye.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Vyt.extendFlat({},Hyt,{yaxis:Gyt})}}},layoutAttributes:gI(),handleDefaults:kye(),calcAutorange:Lye(),draw:Dye(),isVisible:oV.isVisible,makeData:oV.makeData,autoMarginOpts:oV.autoMarginOpts}});var SI=Se((fsr,Bye)=>{"use strict";var Wyt=uc(),qye=Ih(),jyt=_f().templatedArray,Zyt=jyt("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"});Bye.exports={visible:{valType:"boolean",editType:"plot"},buttons:Zyt,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:Wyt({editType:"plot"}),bgcolor:{valType:"color",dflt:qye.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:qye.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var sV=Se((csr,Oye)=>{"use strict";Oye.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Vye=Se((hsr,Uye)=>{"use strict";var MI=Zr(),Xyt=Pl(),Yyt=_f(),Kyt=Jd(),Nye=SI(),lV=sV();Uye.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=Yyt.newContainer(r,"rangeselector");function u(d,p){return MI.coerce(o,s,Nye,d,p)}var l=Kyt(o,s,{name:"buttons",handleItemDefaults:Jyt,calendar:a}),f=u("visible",l.length>0);if(f){var c=$yt(r,n,i);u("x",c[0]),u("y",c[1]),MI.noneOrAll(t,r,["x","y"]),u("xanchor"),u("yanchor"),MI.coerceFont(u,"font",n.font);var h=u("bgcolor");u("activecolor",Xyt.contrast(h,lV.lightAmount,lV.darkAmount)),u("bordercolor"),u("borderwidth")}};function Jyt(e,t,r,n){var i=n.calendar;function a(u,l){return MI.coerce(e,t,Nye.buttons,u,l)}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 $yt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var Qyt=wB(),emt=Zr().titleCase;Hye.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=tmt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function tmt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=Qyt["utc"+emt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var u=a.offset(n,-o);s=e.l2r(+a.ceil(u));break}var l=r[1];return[s,l]}});var $ye=Se((psr,Jye)=>{"use strict";var kI=Nl(),rmt=Ul(),imt=Sc(),Wye=Pl(),Kye=yu(),Pg=Zr(),jye=Pg.strTranslate,EI=Bf(),nmt=$c(),cV=Qh(),Zye=cV.LINE_SPACING,Xye=cV.FROM_TL,Yye=cV.FROM_BR,fV=sV(),amt=Gye();Jye.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(omt(t),smt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=kI.select(this),o=i,s=o.rangeselector,u=a.selectAll("g.button").data(Pg.filterVisible(s.buttons));u.enter().append("g").classed("button",!0),u.exit().remove(),u.each(function(l){var f=kI.select(this),c=amt(o,l);l._isActive=lmt(o,l,c),f.call(uV,s,l),f.call(fmt,s,l,t),f.on("click",function(){t._dragged||rmt.call("_guiRelayout",t,c)}),f.on("mouseover",function(){l._isHovered=!0,f.call(uV,s,l)}),f.on("mouseout",function(){l._isHovered=!1,f.call(uV,s,l)})}),hmt(t,u,s,o._name,a)})};function omt(e){for(var t=nmt.list(e,"x",!0),r=[],n=0;n{"use strict";Qye.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:SI()}}},layoutAttributes:SI(),handleDefaults:Vye(),draw:$ye()}});var Ec=Se(hV=>{"use strict";var tme=vu().extendFlat;hV.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:tme({},r,{}),y:tme({},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};hV.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 dmt=Zr(),pmt=n3().counter,vmt=Ec().attributes,rme=dd().idRegex,ymt=_f(),dV={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:[pmt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[rme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[rme.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:vmt({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 CI(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 mmt(e,t){var r=e.grid||{},n=CI(t,r,"x"),i=CI(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),u=o&&n!==r.xaxes&&s&&i!==r.yaxes,l,f;a?(l=r.subplots.length,f=r.subplots[0].length):(s&&(l=i.length),o&&(f=n.length));var c=ymt.newContainer(t,"grid");function h(_,C){return dmt.coerce(r,c,dV,_,C)}var d=h("rows",l),p=h("columns",f);if(!(d*p>1)){delete t.grid;return}if(!a&&!o&&!s){var x=h("pattern")==="independent";x&&(a=!0)}c._hasSubplotGrid=a;var b=h("roworder"),y=b==="top to bottom",k=a?.2:.1,E=a?.3:.1,A,L;u&&t._splomGridDflt&&(A=t._splomGridDflt.xside,L=t._splomGridDflt.yside),c._domains={x:ime("x",h,k,A,p),y:ime("y",h,E,L,d,y)}}function ime(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var u=new Array(i),l=s[0],f=(s[1]-l)/(i-o),c=f*(1-o),h=0;h{"use strict";ome.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 ume=Se((_sr,lme)=>{"use strict";var sme=_u(),_mt=Ul(),xmt=Zr(),bmt=_f(),wmt=vV();lme.exports=function(e,t,r,n){var i="error_"+n.axis,a=bmt.newContainer(t,i),o=e[i]||{};function s(p,x){return xmt.coerce(o,a,wmt,p,x)}var u=o.array!==void 0||o.value!==void 0||o.type==="sqrt",l=s("visible",u);if(l!==!1){var f=s("type","array"in o?"data":"percent"),c=!0;f!=="sqrt"&&(c=s("symmetric",!((f==="data"?"arrayminus":"valueminus")in o))),f==="data"?(s("array"),s("traceref"),c||(s("arrayminus"),s("tracerefminus"))):(f==="percent"||f==="constant")&&(s("value"),c||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||sme(o.thickness)||sme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",_mt.traceIs(t,"gl3d")?0:4))}}});var yV=Se((xsr,cme)=>{"use strict";cme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(l,f){var c=+i[f];return[c,c]};var a=t.arrayminus||[];return function(l,f){var c=+i[f],h=+a[f];return!isNaN(c)||!isNaN(h)?[h||0,c||0]:[NaN,NaN]}}else{var o=fme(r,t.value),s=fme(r,t.valueminus);return n||t.valueminus===void 0?function(l){var f=o(l);return[f,f]}:function(l){return[s(l),o(l)]}}};function fme(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 pme=Se((bsr,dme)=>{"use strict";var mV=_u(),Tmt=Ul(),gV=hu(),Amt=Zr(),Smt=yV();dme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var vme=Nl(),b_=_u(),Mmt=yu(),Emt=ec();yme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,u=i&&i.duration>0,l=t._context.staticPlot;r.each(function(f){var c=f[0].trace,h=c.error_x||{},d=c.error_y||{},p;c.ids&&(p=function(k){return k.id});var x=Emt.hasMarkers(c)&&c.marker.maxdisplayed>0;!d.visible&&!h.visible&&(f=[]);var b=vme.select(this).selectAll("g.errorbar").data(f,p);if(b.exit().remove(),!!f.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var y=b.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(i.duration).style("opacity",1),Mmt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var E=vme.select(this),A=kmt(k,o,s);if(!(x&&!k.vis)){var L,_=E.select("path.yerror");if(d.visible&&b_(A.x)&&b_(A.yh)&&b_(A.ys)){var C=d.width;L="M"+(A.x-C)+","+A.yh+"h"+2*C+"m-"+C+",0V"+A.ys,A.noYS||(L+="m-"+C+",0h"+2*C),a=!_.size(),a?_=E.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("yerror",!0):u&&(_=_.transition().duration(i.duration).ease(i.easing)),_.attr("d",L)}else _.remove();var M=E.select("path.xerror");if(h.visible&&b_(A.y)&&b_(A.xh)&&b_(A.xs)){var v=(h.copy_ystyle?d:h).width;L="M"+A.xh+","+(A.y-v)+"v"+2*v+"m0,-"+v+"H"+A.xs,A.noXS||(L+="m0,-"+v+"v"+2*v),a=!M.size(),a?M=E.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("xerror",!0):u&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr("d",L)}else M.remove()}})}})};function kmt(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 xme=Se((Tsr,_me)=>{"use strict";var Cmt=Nl(),gme=Pl();_me.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Cmt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(gme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(gme.stroke,a.color)})}});var Tme=Se((Asr,wme)=>{"use strict";var o4=Zr(),bme=_c().overrideAll,s4=vV(),$b={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4)};delete $b.error_x.copy_zstyle;delete $b.error_y.copy_zstyle;delete $b.error_y.copy_ystyle;var l4={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4),error_z:o4.extendFlat({},s4)};delete l4.error_x.copy_ystyle;delete l4.error_y.copy_ystyle;delete l4.error_z.copy_ystyle;delete l4.error_z.copy_zstyle;wme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$b,bar:$b,histogram:$b,scatter3d:bme(l4,"calc","nested"),scattergl:bme($b,"calc","nested")}},supplyDefaults:ume(),calc:pme(),makeComputeError:yV(),plot:mme(),style:xme(),hoverInfo:Lmt};function Lmt(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 Sme=Se((Ssr,Ame)=>{"use strict";Ame.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 Pme=Se((Msr,zme)=>{"use strict";var w_=Nl(),_V=cd(),zI=Sc(),Mme=Ul(),Ig=hu(),LI=gp(),O0=Zr(),Uy=O0.strTranslate,Lme=vu().extendFlat,xV=Ty(),Ny=yu(),bV=Pl(),zmt=Mb(),Pmt=Bf(),Imt=Dp().flipScale,Dmt=J5(),Rmt=rI(),Fmt=Rd(),wV=Qh(),Eme=wV.LINE_SPACING,kme=wV.FROM_TL,Cme=wV.FROM_BR,Xc=Sme().cn;function qmt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Xc.colorbar).data(Bmt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Xc.colorbar,!0),r.each(function(n){var i=w_.select(this);O0.ensureSingle(i,"rect",Xc.cbbg),O0.ensureSingle(i,"g",Xc.cbfills),O0.ensureSingle(i,"g",Xc.cblines),O0.ensureSingle(i,"g",Xc.cbaxis,function(o){o.classed(Xc.crisp,!0)}),O0.ensureSingle(i,"g",Xc.cbtitleunshift,function(o){o.append("g").classed(Xc.cbtitle,!0)}),O0.ensureSingle(i,"rect",Xc.cboutline);var a=Omt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Nmt(i,n,e)}),r.exit().each(function(n){zI.autoMargin(e,n._id)}).remove(),r.order()}function Bmt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function u(E){return Lme(E,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function l(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Imt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var f=0;f1){var Be=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));Oe*=Be*O0.roundUp(me/Be,[2,5,10]),(Math.abs(F.start)/F.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=Oe}Ee.domain=n?[te+p/A.h,te+W-p/A.h]:[te+d/A.w,te+W-d/A.w],Ee.setScale(),e.attr("transform",Uy(Math.round(A.l),Math.round(A.t)));var fe=e.select("."+Xc.cbtitleunshift).attr("transform",Uy(-Math.round(A.l),-Math.round(A.t))),Ze=Ee.ticklabelposition,et=Ee.title.font.size,gt=e.select("."+Xc.cbaxis),Pt,Qe=0,Xe=0;function Tt(At,Te){var nt={propContainer:Ee,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:E._dfltTitle.colorbar,containerGroup:e.select("."+Xc.cbtitle)},ut=At.charAt(0)==="h"?At.substr(1):"h"+At;e.selectAll("."+ut+",."+ut+"-math-group").remove(),zmt.draw(r,At,Lme(nt,Te||{}))}function xt(){if(n&&Me||!n&&!Me){var At,Te;M==="top"&&(At=d+A.l+re*x,Te=p+A.t+ne*(1-te-W)+3+et*.75),M==="bottom"&&(At=d+A.l+re*x,Te=p+A.t+ne*(1-te)-3-et*.25),M==="right"&&(Te=p+A.t+ne*b+3+et*.75,At=d+A.l+re*te),Tt(Ee._id+"title",{attributes:{x:At,y:Te,"text-anchor":n?"start":"middle"}})}}function _t(){if(n&&!Me||!n&&Me){var At=Ee.position||0,Te=Ee._offset+Ee._length/2,nt,ut;if(M==="right")ut=Te,nt=A.l+re*At+10+et*(Ee.showticklabels?1:.5);else if(nt=Te,M==="bottom"&&(ut=A.t+ne*At+10+(Ze.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="intside"&&t.ticklen||0)),M==="top"){var ct=C.text.split("
").length;ut=A.t+ne*At+10-j-Eme*et*ct}Tt((n?"h":"v")+Ee._id+"title",{avoid:{selection:w_.select(r).selectAll("g."+Ee._id+"tick"),side:M,offsetTop:n?0:A.t,offsetLeft:n?A.l:0,maxShift:n?E.width:E.height},attributes:{x:nt,y:ut,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Ct(){if(!n&&!Me||n&&Me){var At=e.select("."+Xc.cbtitle),Te=At.select("text"),nt=[-u/2,u/2],ut=At.select(".h"+Ee._id+"title-math-group").node(),ct=15.6;Te.node()&&(ct=parseInt(Te.node().style.fontSize,10)*Eme);var rt;if(ut?(rt=Ny.bBox(ut),Xe=rt.width,Qe=rt.height,Qe>ct&&(nt[1]-=(Qe-ct)/2)):Te.node()&&!Te.classed(Xc.jsPlaceholder)&&(rt=Ny.bBox(Te.node()),Xe=rt.width,Qe=rt.height),n){if(Qe){if(Qe+=5,M==="top")Ee.domain[1]-=Qe/A.h,nt[1]*=-1;else{Ee.domain[0]+=Qe/A.h;var je=Pmt.lineCount(Te);nt[1]+=(1-je)*ct}At.attr("transform",Uy(nt[0],nt[1])),Ee.setScale()}}else Xe&&(M==="right"&&(Ee.domain[0]+=(Xe+et/2)/A.w),At.attr("transform",Uy(nt[0],nt[1])),Ee.setScale())}e.selectAll("."+Xc.cbfills+",."+Xc.cblines).attr("transform",n?Uy(0,Math.round(A.h*(1-Ee.domain[1]))):Uy(Math.round(A.w*Ee.domain[0]),0)),gt.attr("transform",n?Uy(0,Math.round(-A.t)):Uy(Math.round(-A.l),0));var tt=e.select("."+Xc.cbfills).selectAll("rect."+Xc.cbfill).attr("style","").data(U);tt.enter().append("rect").classed(Xc.cbfill,!0).attr("style",""),tt.exit().remove();var Je=v.map(Ee.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});tt.each(function(fr,Ot){var De=[Ot===0?v[0]:(U[Ot]+U[Ot-1])/2,Ot===U.length-1?v[1]:(U[Ot]+U[Ot+1])/2].map(Ee.c2p).map(Math.round);n&&(De[1]=O0.constrain(De[1]+(De[1]>De[0])?1:-1,Je[0],Je[1]));var _e=w_.select(this).attr(n?"x":"y",be).attr(n?"y":"x",w_.min(De)).attr(n?"width":"height",Math.max(j,2)).attr(n?"height":"width",Math.max(w_.max(De)-w_.min(De),2));if(t._fillgradient)Ny.gradient(_e,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Fe=T(fr).replace("e-","");_e.attr("fill",_V(Fe).toHexString())}});var Mt=e.select("."+Xc.cblines).selectAll("path."+Xc.cbline).data(_.color&&_.width?H:[]);Mt.enter().append("path").classed(Xc.cbline,!0),Mt.exit().remove(),Mt.each(function(fr){var Ot=be,De=Math.round(Ee.c2p(fr))+_.width/2%1;w_.select(this).attr("d","M"+(n?Ot+","+De:De+","+Ot)+(n?"h":"v")+j).call(Ny.lineGroupStyle,_.width,z(fr),_.dash)}),gt.selectAll("g."+Ee._id+"tick,path").remove();var Vt=be+j+(u||0)/2-(t.ticks==="outside"?1:0),Kt=Ig.calcTicks(Ee),ir=Ig.getTickSigns(Ee)[2];return Ig.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Ig.clipEnds(Ee,Kt):Kt,layer:gt,path:Ig.makeTickPath(Ee,Vt,ir),transFn:Ig.makeTransTickFn(Ee)}),Ig.drawLabels(r,Ee,{vals:Kt,layer:gt,transFn:Ig.makeTransTickLabelFn(Ee),labelFns:Ig.makeLabelFns(Ee,Vt)})}function jt(){var At,Te=j+u/2;Ze.indexOf("inside")===-1&&(At=Ny.bBox(gt.node()),Te+=n?At.width:At.height),Pt=fe.select("text");var nt=0,ut=n&&M==="top",ct=!n&&M==="right",rt=0;if(Pt.node()&&!Pt.classed(Xc.jsPlaceholder)){var je,tt=fe.select(".h"+Ee._id+"title-math-group").node();tt&&(n&&Me||!n&&!Me)?(At=Ny.bBox(tt),nt=At.width,je=At.height):(At=Ny.bBox(fe.node()),nt=At.right-A.l-(n?be:ke),je=At.bottom-A.t-(n?ke:be),!n&&M==="top"&&(Te+=At.height,rt=At.height)),ct&&(Pt.attr("transform",Uy(nt/2+et/2,0)),nt*=2),Te=Math.max(Te,n?nt:je)}var Je=(n?d:p)*2+Te+l+u/2,Mt=0;!n&&C.text&&h==="bottom"&&b<=0&&(Mt=Je/2,Je+=Mt,rt+=Mt),E._hColorbarMoveTitle=Mt,E._hColorbarMoveCBTitle=rt;var Vt=l+u,Kt=(n?be:ke)-Vt/2-(n?d:0),ir=(n?ke:be)-(n?O:p+rt-Mt);e.select("."+Xc.cbbg).attr("x",Kt).attr("y",ir).attr(n?"width":"height",Math.max(Je-Mt,2)).attr(n?"height":"width",Math.max(O+Vt,2)).call(bV.fill,f).call(bV.stroke,t.bordercolor).style("stroke-width",l);var fr=ct?Math.max(nt-10,0):0;e.selectAll("."+Xc.cboutline).attr("x",(n?be:ke+d)+fr).attr("y",(n?ke+p-O:be)+(ut?Qe:0)).attr(n?"width":"height",Math.max(j,2)).attr(n?"height":"width",Math.max(O-(n?2*p+Qe:2*d+fr),2)).call(bV.stroke,t.outlinecolor).style({fill:"none","stroke-width":u});var Ot=n?ze*Je:0,De=n?0:(1-Ce)*Je-rt;if(Ot=k?A.l-Ot:-Ot,De=y?A.t-De:-De,e.attr("transform",Uy(Ot,De)),!n&&(l||_V(f).getAlpha()&&!_V.equals(E.paper_bgcolor,f))){var _e=gt.selectAll("text"),Fe=_e[0].length,Pe=e.select("."+Xc.cbbg).node(),Ie=Ny.bBox(Pe),lt=Ny.getTranslate(e),ye=2;_e.each(function(Er,si){var Ei=0,Si=Fe-1;if(si===Ei||si===Si){var xi=Ny.bBox(this),Hi=Ny.getTranslate(this),Jr;if(si===Si){var ci=xi.right+Hi.x,Di=Ie.right+lt.x+ke-l-ye+x;Jr=Di-ci,Jr>0&&(Jr=0)}else if(si===Ei){var Lt=xi.left+Hi.x,vt=Ie.left+lt.x+ke+l+ye;Jr=vt-Lt,Jr<0&&(Jr=0)}Jr&&(Fe<3?this.setAttribute("transform","translate("+Jr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ue={},de=kme[c],ht=Cme[c],Et=kme[h],St=Cme[h],Zt=Je-j;n?(a==="pixels"?(ue.y=b,ue.t=O*Et,ue.b=O*St):(ue.t=ue.b=0,ue.yt=b+i*Et,ue.yb=b-i*St),s==="pixels"?(ue.x=x,ue.l=Je*de,ue.r=Je*ht):(ue.l=Zt*de,ue.r=Zt*ht,ue.xl=x-o*de,ue.xr=x+o*ht)):(a==="pixels"?(ue.x=x,ue.l=O*de,ue.r=O*ht):(ue.l=ue.r=0,ue.xl=x+i*de,ue.xr=x-i*ht),s==="pixels"?(ue.y=1-b,ue.t=Je*Et,ue.b=Je*St):(ue.t=Zt*Et,ue.b=Zt*St,ue.yt=b-o*Et,ue.yb=b+o*St));var qr=t.y<.5?"b":"t",Lr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var vr={r:E.width-Kt-Ot,l:Kt+ue.r,b:E.height-ir-De,t:ir+ue.b};k&&y?zI.autoMargin(r,t._id,ue):k?r._fullLayout._reservedMargin[t._id][qr]=vr[qr]:y||n?r._fullLayout._reservedMargin[t._id][Lr]=vr[Lr]:r._fullLayout._reservedMargin[t._id][qr]=vr[qr]}return O0.syncOrAsync([zI.previousPromises,xt,Ct,_t,zI.previousPromises,jt],r)}function Nmt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,u;LI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),xV(e)},moveFn:function(l,f){e.attr("transform",o+Uy(l,f)),s=LI.align((n?t._uFrac:t._vFrac)+l/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),u=LI.align((n?t._vFrac:1-t._uFrac)-f/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var c=LI.getCursor(s,u,t.xanchor,t.yanchor);xV(e,c)},doneFn:function(){if(xV(e),s!==void 0&&u!==void 0){var l={};l[t._propPrefix+"x"]=s,l[t._propPrefix+"y"]=u,t._traceIndex!==void 0?Mme.call("_guiRestyle",r,l,t._traceIndex):Mme.call("_guiRelayout",r,l)}}})}function Umt(e,t,r){var n=t._levels,i=[],a=[],o,s,u=n.end+n.size/100,l=n.size,f=1.001*r[0]-.001*r[1],c=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*l,!(l>0?o>=u:o<=u));s++)o>f&&o0?o>=u:o<=u));s++)o>r[0]&&o{"use strict";Ime.exports={moduleType:"component",name:"colorbar",attributes:YL(),supplyDefaults:DO(),draw:Pme().draw,hasColorbar:EO()}});var Fme=Se((ksr,Rme)=>{"use strict";Rme.exports={moduleType:"component",name:"legend",layoutAttributes:kN(),supplyLayoutDefaults:zN(),draw:HN(),style:ON()}});var Bme=Se((Csr,qme)=>{"use strict";qme.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 Nme=Se((Lsr,Ome)=>{"use strict";Ome.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var AV=Se((zsr,Gme)=>{"use strict";var Hmt=Ul(),Hme=Zr(),TV=Hme.extendFlat,Ume=Hme.extendDeep;function Vme(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 Gmt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Gme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Ume([],i),s=Ume({},a,Vme(r.tileClass)),u=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 l=Object.keys(s);for(n=0;n{"use strict";var Wmt=pb().EventEmitter,jmt=Ul(),Zmt=Zr(),Wme=Lg(),Xmt=AV(),Ymt=BP(),Kmt=OP();function Jmt(e,t){var r=new Wmt,n=Xmt(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=Wme.getDelay(i._fullLayout);setTimeout(function(){var u=Ymt(i),l=document.createElement("canvas");l.id=Zmt.randstr(),r=Kmt({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:l,emitter:r,svg:u}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=Wme.getRedrawFunc(i);return jmt.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}jme.exports=Jmt});var Kme=Se((Isr,Yme)=>{"use strict";var Xme=Lg(),$mt={getDelay:Xme.getDelay,getRedrawFunc:Xme.getRedrawFunc,clone:AV(),toSVG:BP(),svgToImg:OP(),toImage:Zme(),downloadImage:aU()};Yme.exports=$mt});var $me=Se(Dg=>{"use strict";Dg.version=QC().version;cee();ene();var Qmt=Ul(),u4=Dg.register=Qmt.register,MV=xde(),Jme=Object.keys(MV);for(PI=0;PI{"use strict";Qme.exports=$me()});var Qb=Se((Fsr,tge)=>{"use strict";tge.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Lm=Se((qsr,age)=>{"use strict";var ah=Zc(),rge=Gc().axisHoverFormat,egt=Du().hovertemplateAttrs,tgt=Du().texttemplateAttrs,nge=Xf(),rgt=uc(),ige=Qb(),igt=Id().pattern,e2=vu().extendFlat,EV=rgt({editType:"calc",arrayOk:!0,colorEditType:"style"}),ngt=ah.marker,agt=ngt.line,ogt=e2({},agt.width,{dflt:0}),sgt=e2({width:ogt,editType:"calc"},nge("marker.line")),lgt=e2({line:sgt,editType:"calc"},nge("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:igt,cornerradius:{valType:"any",editType:"calc"}});age.exports={x:ah.x,x0:ah.x0,dx:ah.dx,y:ah.y,y0:ah.y0,dy:ah.dy,xperiod:ah.xperiod,yperiod:ah.yperiod,xperiod0:ah.xperiod0,yperiod0:ah.yperiod0,xperiodalignment:ah.xperiodalignment,yperiodalignment:ah.yperiodalignment,xhoverformat:rge("x"),yhoverformat:rge("y"),text:ah.text,texttemplate:tgt({editType:"plot"},{keys:ige.eventDataKeys}),hovertext:ah.hovertext,hovertemplate:egt({},{keys:ige.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:e2({},EV,{}),insidetextfont:e2({},EV,{}),outsidetextfont:e2({},EV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:e2({},ah.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:lgt,offsetgroup:ah.offsetgroup,alignmentgroup:ah.alignmentgroup,selected:{marker:{opacity:ah.selected.marker.opacity,color:ah.selected.marker.color,editType:"style"},textfont:ah.selected.textfont,editType:"style"},unselected:{marker:{opacity:ah.unselected.marker.opacity,color:ah.unselected.marker.color,editType:"style"},textfont:ah.unselected.textfont,editType:"style"},zorder:ah.zorder}});var DI=Se((Bsr,oge)=>{"use strict";oge.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 RI=Se((Osr,uge)=>{"use strict";var ugt=Pl(),sge=Dp().hasColorscale,lge=ed(),fgt=Zr().coercePattern;uge.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=sge(t,"marker");s&&lge(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",ugt.defaultLine),sge(t,"marker.line")&&lge(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),fgt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var r0=Se((Nsr,vge)=>{"use strict";var fge=_u(),xT=Zr(),cge=Pl(),cgt=Ul(),hgt=K3(),dgt=zy(),pgt=RI(),vgt=Hb(),hge=Lm(),FI=xT.coerceFont;function ygt(e,t,r,n){function i(l,f){return xT.coerce(e,t,hge,l,f)}var a=hgt(e,t,n,i);if(!a){t.visible=!1;return}dgt(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");var o=i("textposition");pge(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),pgt(e,t,i,r,n);var s=(t.marker.line||{}).color,u=cgt.getComponentMethod("errorbars","supplyDefaults");u(e,t,s||cge.defaultLine,{axis:"y"}),u(e,t,s||cge.defaultLine,{axis:"x",inherit:"y"}),xT.coerceSelectionMarkerOpacity(t,i)}function mgt(e,t){var r,n;function i(s,u){return xT.coerce(n._input,n,hge,s,u)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&fge(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function pge(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,u=a.moduleHasConstrain!==!1,l=a.moduleHasCliponaxis!==!1,f=a.moduleHasTextangle!==!1,c=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",p=d||i==="inside",x=d||i==="outside";if(p||x){var b=FI(n,"textfont",r.font),y=xT.extendFlat({},b),k=e.textfont&&e.textfont.color,E=!k;if(E&&delete y.color,FI(n,"insidetextfont",y),h){var A=xT.extendFlat({},b);E&&delete A.color,FI(n,"pathbar.textfont",A)}x&&FI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),u&&n("constraintext"),l&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}p&&c&&n("insidetextanchor")}vge.exports={supplyDefaults:ygt,crossTraceDefaults:mgt,handleText:pge,validateCornerradius:dge}});var kV=Se((Usr,yge)=>{"use strict";var ggt=Ul(),_gt=hu(),xgt=Zr(),bgt=DI(),wgt=r0().validateCornerradius;yge.exports=function(e,t,r){function n(x,b){return xgt.coerce(e,t,bgt,x,b)}for(var i=!1,a=!1,o=!1,s={},u=n("barmode"),l=u==="group",f=0;f0&&!s[h]&&(o=!0),s[h]=!0),c.visible&&c.type==="histogram"){var d=_gt.getFromId({_fullLayout:t},c[c.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}u!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=wgt(p)}});var f4=Se((Vsr,mge)=>{"use strict";var bT=Zr();mge.exports=function(t,r){for(var n=0;n{"use strict";var gge=hu(),_ge=Iy(),xge=Dp().hasColorscale,bge=Rp(),Tgt=f4(),Agt=F0();wge.exports=function(t,r){var n=gge.getFromId(t,r.xaxis||"x"),i=gge.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f,c={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",c),s=i.makeCalcdata(r,"y"),u=_ge(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y",c),s=n.makeCalcdata(r,"x"),u=_ge(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),p=0;p{"use strict";var Sgt=Nl(),Mgt=Zr();function Egt(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 u=s.transform;if(u){u.scale=a&&u.hide?0:i/u.fontSize;var l=Sgt.select(this).select("text");Mgt.setTransormAndDisplay(l,u)}})}}function kgt(e,t,r){if(r.uniformtext.mode){var n=Age(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var Lgt=_u(),zgt=cd(),Mge=Zr().isArrayOrTypedArray;t2.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};t2.coerceNumber=function(e,t,r){if(Lgt(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};t2.coerceColor=function(e,t,r){return zgt(t).isValid()?t:r!==void 0?r:e.dflt};t2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};t2.getValue=function(e,t){var r;return Mge(e)?t{"use strict";var c4=Nl(),Pgt=Pl(),h4=yu(),Ege=Zr(),kge=Ul(),Cge=bp().resizeText,CV=Lm(),Igt=CV.textfont,Dgt=CV.insidetextfont,Rgt=CV.outsidetextfont,tp=qI();function Fgt(e){var t=c4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Cge(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)&&c4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=c4.select(this),o=i[0].trace;Lge(a,o,e)}),kge.getComponentMethod("errorbars","style")(t)}function Lge(e,t,r){h4.pointStyle(e.selectAll("path"),t,r),zge(e,t,r)}function zge(e,t,r){e.selectAll("text").each(function(n){var i=c4.select(this),a=Ege.ensureUniformFontSize(r,Pge(i,n,t,r));h4.font(i,a)})}function qgt(e,t,r){var n=t[0].trace;n.selectedpoints?Bgt(r,n,e):(Lge(r,n,e),kge.getComponentMethod("errorbars","style")(r))}function Bgt(e,t,r){h4.selectedPointStyle(e.selectAll("path"),t),Ogt(e.selectAll("text"),t,r)}function Ogt(e,t,r){e.each(function(n){var i=c4.select(this),a;if(n.selected){a=Ege.ensureUniformFontSize(r,Pge(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),h4.font(i,a)}else h4.selectedTextStyle(i,t)})}function Pge(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Fge(t,r);a=Dge(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Rge(r,t.i,i));return a}function Ige(e,t,r){return LV(Igt,e.textfont,t,r)}function Dge(e,t,r,n){var i=Ige(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:Pgt.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}),LV(Dgt,e.insidetextfont,t,i)}function Rge(e,t,r){var n=Ige(e,t,r);return LV(Rgt,e.outsidetextfont,t,n)}function LV(e,t,r,n){t=t||{};var i=tp.getValue(t.family,r),a=tp.getValue(t.size,r),o=tp.getValue(t.color,r),s=tp.getValue(t.weight,r),u=tp.getValue(t.style,r),l=tp.getValue(t.variant,r),f=tp.getValue(t.textcase,r),c=tp.getValue(t.lineposition,r),h=tp.getValue(t.shadow,r);return{family:tp.coerceString(e.family,i,n.family),size:tp.coerceNumber(e.size,a,n.size),color:tp.coerceColor(e.color,o,n.color),weight:tp.coerceString(e.weight,s,n.weight),style:tp.coerceString(e.style,u,n.style),variant:tp.coerceString(e.variant,l,n.variant),textcase:tp.coerceString(e.variant,f,n.textcase),lineposition:tp.coerceString(e.variant,c,n.lineposition),shadow:tp.coerceString(e.variant,h,n.shadow)}}function Fge(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}qge.exports={style:Fgt,styleTextPoints:zge,styleOnSelect:qgt,getInsideTextFont:Dge,getOutsideTextFont:Rge,getBarColor:Fge,resizeText:Cge}});var i2=Se((Zsr,Wge)=>{"use strict";var BI=Nl(),OI=_u(),qd=Zr(),Ngt=Bf(),Ugt=Pl(),T_=yu(),Vgt=Ul(),NI=hu().tickText,Bge=bp(),Hgt=Bge.recordMinTextSize,Ggt=Bge.clearMinTextSize,zV=N0(),wT=qI(),Wgt=Qb(),Oge=Lm(),jgt=Oge.text,Zgt=Oge.textposition,Xgt=rv().appendArrayPointValue,Up=Wgt.TEXTPAD;function Ygt(e){return e.id}function Kgt(e){if(e.ids)return Ygt}function PV(e){return(e>0)-(e<0)}function zm(e,t){return e0}function $gt(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,u=e._fullLayout,l=e._context.staticPlot;i||(i={mode:u.barmode,norm:u.barmode,gap:u.bargap,groupgap:u.bargroupgap},Ggt("bar",u));var f=qd.makeTraceGroups(n,r,"trace bars").each(function(c){var h=BI.select(this),d=c[0].trace,p=c[0].t,x=d.type==="waterfall",b=d.type==="funnel",y=d.type==="histogram",k=d.type==="bar",E=k||b,A=0;x&&d.connector.visible&&d.connector.mode==="between"&&(A=d.connector.line.width/2);var L=d.orientation==="h",_=Uge(i),C=qd.ensureSingle(h,"g","points"),M=Kgt(d),v=C.selectAll("g.point").data(qd.identity,M);v.enter().append("g").classed("point",!0),v.exit().remove(),v.each(function(T,F){var q=BI.select(this),U=Jgt(T,o,s,L),H=U[0][0],j=U[0][1],G=U[1][0],O=U[1][1],W=(L?j-H:O-G)===0;W&&E&&wT.getLineWidth(d,T)&&(W=!1),W||(W=!OI(H)||!OI(j)||!OI(G)||!OI(O)),T.isBlank=W,W&&(L?j=H:O=G),A&&!W&&(L?(H-=zm(H,j)*A,j+=zm(H,j)*A):(G-=zm(G,O)*A,O+=zm(G,O)*A));var re,ne;if(d.type==="waterfall"){if(!W){var be=d[T.dir].marker;re=be.line.width,ne=be.color}}else re=wT.getLineWidth(d,T),ne=T.mc||d.marker.color;function ze(Te){var nt=BI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?BI.round(Math.round(Te)-nt,2):Te}function Ce(Te,nt,ut){return ut&&Te===nt?Te:Math.abs(Te-nt)>=2?ze(Te):Te>nt?Math.ceil(Te):Math.floor(Te)}var he=Ugt.opacity(ne),te=he<1||re>.01?ze:Ce;e._context.staticPlot||(H=te(H,j,L),j=te(j,H,L),G=te(G,O,!L),O=te(O,G,!L));var ke=L?o.c2p:s.c2p,Ee;T.s0>0?Ee=T._sMax:T.s0<0?Ee=T._sMin:Ee=T.s1>0?T._sMax:T._sMin;function Me(Te,nt){if(!Te)return 0;var ut=Math.abs(L?O-G:j-H),ct=Math.abs(L?j-H:O-G),rt=te(Math.abs(ke(Ee,!0)-ke(0,!0))),je=T.hasB?Math.min(ut/2,ct/2):Math.min(ut/2,rt),tt;if(nt==="%"){var Je=Math.min(50,Te);tt=ut*(Je/100)}else tt=Te;return te(Math.max(Math.min(tt,je),0))}var Oe=k||y?Me(p.cornerradiusvalue,p.cornerradiusform):0,Re,me,Be="M"+H+","+G+"V"+O+"H"+j+"V"+G+"Z",fe=0;if(Oe&&T.s){var Ze=PV(T.s0)===0||PV(T.s)===PV(T.s0)?T.s1:T.s0;if(fe=te(T.hasB?0:Math.abs(ke(Ee,!0)-ke(Ze,!0))),fe0?Math.sqrt(fe*(2*Oe-fe)):0,Tt=et>0?Math.max:Math.min;Re="M"+H+","+G+"V"+(O-Qe*gt)+"H"+Tt(j-(Oe-fe)*et,H)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt-Xe)+"V"+(G+Oe*gt+Xe)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+Tt(j-(Oe-fe)*et,H)+","+(G+Qe*gt)+"Z"}else if(T.hasB)Re="M"+(H+Oe*et)+","+G+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+H+","+(G+Oe*gt)+"V"+(O-Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et)+","+O+"H"+(j-Oe*et)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+j+","+(O-Oe*gt)+"V"+(G+Oe*gt)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-Oe*et)+","+G+"Z";else{me=Math.abs(O-G)+fe;var xt=me0?Math.sqrt(fe*(2*Oe-fe)):0,Ct=gt>0?Math.max:Math.min;Re="M"+(H+xt*et)+","+G+"V"+Ct(O-(Oe-fe)*gt,G)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(H+Oe*et-_t)+","+O+"H"+(j-Oe*et+_t)+"A "+Oe+","+Oe+" 0 0 "+Pt+" "+(j-xt*et)+","+Ct(O-(Oe-fe)*gt,G)+"V"+G+"Z"}}else Re=Be}else Re=Be;var jt=Nge(qd.ensureSingle(q,"path"),u,i,a);if(jt.style("vector-effect",l?"none":"non-scaling-stroke").attr("d",isNaN((j-H)*(O-G))||W&&e._context.staticPlot?"M0,0Z":Re).call(T_.setClipUrl,t.layerClipId,e),!u.uniformtext.mode&&_){var At=T_.makePointStyleFns(d);T_.singlePointStyle(T,jt,d,At,e)}Qgt(e,t,q,c,F,H,j,G,O,Oe,fe,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var z=d.cliponaxis===!1;T_.setClipUrl(h,z?null:t.layerClipId,e)});Vgt.getComponentMethod("errorbars","plot")(e,f,t,i)}function Qgt(e,t,r,n,i,a,o,s,u,l,f,c,h){var d=t.xaxis,p=t.yaxis,x=e._fullLayout,b;function y(me,Be,fe){var Ze=qd.ensureSingle(me,"text").text(Be).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(T_.font,fe).call(Ngt.convertToTspans,e);return Ze}var k=n[0].trace,E=k.orientation==="h",A=r1t(x,n,i,d,p);b=i1t(k,i);var L=c.mode==="stack"||c.mode==="relative",_=n[i],C=!L||_._outmost,M=_.hasB,v=l&&l-f>Up;if(!A||b==="none"||(_.isBlank||a===o||s===u)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var z=x.font,T=zV.getBarColor(n[i],k),F=zV.getInsideTextFont(k,i,z,T),q=zV.getOutsideTextFont(k,i,z),U=k.insidetextanchor||"end",H=r.datum();E?d.type==="log"&&H.s0<=0&&(d.range[0]0&&ze>0,te;v?M?te=r2(O-2*l,W,be,ze,E)||r2(O,W-2*l,be,ze,E):E?te=r2(O-(l-f),W,be,ze,E)||r2(O,W-2*(l-f),be,ze,E):te=r2(O,W-(l-f),be,ze,E)||r2(O-2*(l-f),W,be,ze,E):te=r2(O,W,be,ze,E),he&&te?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){Ce=qd.ensureUniformFontSize(e,b==="outside"?q:F),re=y(r,A,Ce);var ke=re.attr("transform");if(re.attr("transform",""),ne=T_.bBox(re.node()),be=ne.width,ze=ne.height,re.attr("transform",ke),be<=0||ze<=0){re.remove();return}}var Ee=k.textangle,Me,Oe;b==="outside"?(Oe=k.constraintext==="both"||k.constraintext==="outside",Me=t1t(a,o,s,u,ne,{isHorizontal:E,constrained:Oe,angle:Ee})):(Oe=k.constraintext==="both"||k.constraintext==="inside",Me=Gge(a,o,s,u,ne,{isHorizontal:E,constrained:Oe,angle:Ee,anchor:U,hasB:M,r:l,overhead:f})),Me.fontSize=Ce.size,Hgt(k.type==="histogram"?"bar":k.type,Me,x),_.transform=Me;var Re=Nge(re,x,c,h);qd.setTransormAndDisplay(Re,Me)}function r2(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 Vge(e){return e==="auto"?0:e}function Hge(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 Gge(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,u=a.angle||0,l=a.anchor,f=l==="end",c=l==="start",h=a.leftToRight||0,d=(h+1)/2,p=1-d,x=a.hasB,b=a.r,y=a.overhead,k=i.width,E=i.height,A=Math.abs(t-e),L=Math.abs(n-r),_=A>2*Up&&L>2*Up?Up:0;A-=2*_,L-=2*_;var C=Vge(u);u==="auto"&&!(k<=A&&E<=L)&&(k>A||E>L)&&(!(k>L||E>A)||kUp){var T=e1t(e,t,r,n,M,b,y,o,x);v=T.scale,z=T.pad}else v=1,s&&(v=Math.min(1,A/M.x,L/M.y)),z=0;var F=i.left*p+i.right*d,q=(i.top+i.bottom)/2,U=(e+Up)*p+(t-Up)*d,H=(r+n)/2,j=0,G=0;if(c||f){var O=(o?M.x:M.y)/2;b&&(f||x)&&(_+=z);var W=o?zm(e,t):zm(r,n);o?c?(U=e+W*_,j=-W*O):(U=t-W*_,j=W*O):c?(H=r+W*_,G=-W*O):(H=n-W*_,G=W*O)}return{textX:F,textY:q,targetX:U,targetY:H,anchorX:j,anchorY:G,scale:v,rotate:C}}function e1t(e,t,r,n,i,a,o,s,u){var l=Math.max(0,Math.abs(t-e)-2*Up),f=Math.max(0,Math.abs(n-r)-2*Up),c=a-Up,h=o?c-Math.sqrt(c*c-(c-o)*(c-o)):c,d=u?c*2:s?c-o:2*h,p=u?c*2:s?2*h:c-o,x,b,y,k,E;return i.y/i.x>=f/(l-d)?k=f/i.y:i.y/i.x<=(f-p)/l?k=l/i.x:!u&&s?(x=i.x*i.x+i.y*i.y/4,b=-2*i.x*(l-c)-i.y*(f/2-c),y=(l-c)*(l-c)+(f/2-c)*(f/2-c)-c*c,k=(-b+Math.sqrt(b*b-4*x*y))/(2*x)):u?(x=(i.x*i.x+i.y*i.y)/4,b=-i.x*(l/2-c)-i.y*(f/2-c),y=(l/2-c)*(l/2-c)+(f/2-c)*(f/2-c)-c*c,k=(-b+Math.sqrt(b*b-4*x*y))/(2*x)):(x=i.x*i.x/4+i.y*i.y,b=-i.x*(l/2-c)-2*i.y*(f-c),y=(l/2-c)*(l/2-c)+(f-c)*(f-c)-c*c,k=(-b+Math.sqrt(b*b-4*x*y))/(2*x)),k=Math.min(1,k),s?E=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(f-i.y*k)/2)*(c-(f-i.y*k)/2)))-o):E=Math.max(0,c-Math.sqrt(Math.max(0,c*c-(c-(l-i.x*k)/2)*(c-(l-i.x*k)/2)))-o),{scale:k,pad:E}}function t1t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,u=a.angle||0,l=i.width,f=i.height,c=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Up?Up:0:d=c>2*Up?Up:0;var p=1;s&&(p=o?Math.min(1,h/f):Math.min(1,c/l));var x=Vge(u),b=Hge(i,x),y=(o?b.x:b.y)/2,k=(i.left+i.right)/2,E=(i.top+i.bottom)/2,A=(e+t)/2,L=(r+n)/2,_=0,C=0,M=o?zm(t,e):zm(r,n);return o?(A=t-M*d,_=M*y):(L=n+M*d,C=-M*y),{textX:k,textY:E,targetX:A,targetY:L,anchorX:_,anchorY:C,scale:p,rotate:x}}function r1t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=n1t(e,t,r,n,i):a.textinfo?s=a1t(t,r,n,i):s=wT.getValue(a.text,r),wT.coerceString(jgt,s)}function i1t(e,t){var r=wT.getValue(e.textposition,t);return wT.coerceEnumerated(Zgt,r)}function n1t(e,t,r,n,i){var a=t[0].trace,o=qd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",u=a.type==="waterfall",l=a.type==="funnel",f=a.orientation==="h",c,h,d,p;f?(c="y",h=i,d="x",p=n):(c="x",h=n,d="y",p=i);function x(_){return NI(h,h.c2l(_),!0).text}function b(_){return NI(p,p.c2l(_),!0).text}var y=t[r],k={};k.label=y.p,k.labelLabel=k[c+"Label"]=x(y.p);var E=qd.castOption(a,y.i,"text");(E===0||E)&&(k.text=E),k.value=y.s,k.valueLabel=k[d+"Label"]=b(y.s);var A={};Xgt(A,a,y.i),(s||A.x===void 0)&&(A.x=f?k.value:k.label),(s||A.y===void 0)&&(A.y=f?k.label:k.value),(s||A.xLabel===void 0)&&(A.xLabel=f?k.valueLabel:k.labelLabel),(s||A.yLabel===void 0)&&(A.yLabel=f?k.labelLabel:k.valueLabel),u&&(k.delta=+y.rawS||y.s,k.deltaLabel=b(k.delta),k.final=y.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),l&&(k.value=y.s,k.valueLabel=b(k.value),k.percentInitial=y.begR,k.percentInitialLabel=qd.formatPercent(y.begR),k.percentPrevious=y.difR,k.percentPreviousLabel=qd.formatPercent(y.difR),k.percentTotal=y.sumR,k.percenTotalLabel=qd.formatPercent(y.sumR));var L=qd.castOption(a,y.i,"customdata");return L&&(k.customdata=L),qd.texttemplateString(o,k,e._d3locale,A,k,a._meta||{})}function a1t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function u(L){var _=a?n:r;return NI(_,L,!0).text}function l(L){var _=a?r:n;return NI(_,+L,!0).text}var f=i.textinfo,c=e[t],h=f.split("+"),d=[],p,x=function(L){return h.indexOf(L)!==-1};if(x("label")&&d.push(u(e[t].p)),x("text")&&(p=qd.castOption(i,c.i,"text"),(p===0||p)&&d.push(p)),o){var b=+c.rawS||c.s,y=c.v,k=y-b;x("initial")&&d.push(l(k)),x("delta")&&d.push(l(b)),x("final")&&d.push(l(y))}if(s){x("value")&&d.push(l(c.s));var E=0;x("percent initial")&&E++,x("percent previous")&&E++,x("percent total")&&E++;var A=E>1;x("percent initial")&&(p=qd.formatPercent(c.begR),A&&(p+=" of initial"),d.push(p)),x("percent previous")&&(p=qd.formatPercent(c.difR),A&&(p+=" of previous"),d.push(p)),x("percent total")&&(p=qd.formatPercent(c.sumR),A&&(p+=" of total"),d.push(p))}return d.join("
")}Wge.exports={plot:$gt,toMoveInsideBar:Gge}});var TT=Se((Xsr,Yge)=>{"use strict";var d4=jc(),o1t=Ul(),jge=Pl(),s1t=Zr().fillText,l1t=qI().getLineWidth,IV=hu().hoverLabelText,u1t=ju().BADNUM;function f1t(e,t,r,n,i){var a=Zge(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,u=o[a.index];return a.color=Xge(s,u),o1t.getComponentMethod("errorbars","hoverInfo")(u,s,a),[a]}}function Zge(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,u=n==="closest",l=o.type==="waterfall",f=e.maxHoverDistance,c=e.maxSpikeDistance,h,d,p,x,b,y,k;o.orientation==="h"?(h=r,d=t,p="y",x="x",b=H,y=F):(h=t,d=r,p="x",x="y",y=H,b=F);var E=o[p+"period"],A=u||E;function L(te){return C(te,-1)}function _(te){return C(te,1)}function C(te,ke){var Ee=te.w;return te[p]+ke*Ee/2}function M(te){return te[p+"End"]-te[p+"Start"]}var v=u?L:E?function(te){return te.p-M(te)/2}:function(te){return Math.min(L(te),te.p-s.bardelta/2)},z=u?_:E?function(te){return te.p+M(te)/2}:function(te){return Math.max(_(te),te.p+s.bardelta/2)};function T(te,ke,Ee){return i.finiteRange&&(Ee=0),d4.inbox(te-h,ke-h,Ee+Math.min(1,Math.abs(ke-te)/k)-1)}function F(te){return T(v(te),z(te),f)}function q(te){return T(L(te),_(te),c)}function U(te){var ke=te[x];if(l){var Ee=Math.abs(te.rawS)||0;d>0?ke+=Ee:d<0&&(ke-=Ee)}return ke}function H(te){var ke=d,Ee=te.b,Me=U(te);return d4.inbox(Ee-ke,Me-ke,f+(Me-ke)/(Me-Ee)-1)}function j(te){var ke=d,Ee=te.b,Me=U(te);return d4.inbox(Ee-ke,Me-ke,c+(Me-ke)/(Me-Ee)-1)}var G=e[p+"a"],O=e[x+"a"];k=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function W(te){return(b(te)+y(te))/2}var re=d4.getDistanceFunction(n,b,y,W);if(d4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==u1t){A||(v=function(te){return Math.min(L(te),te.p-s.bargroupwidth/2)},z=function(te){return Math.max(_(te),te.p+s.bargroupwidth/2)});var ne=e.index,be=a[ne],ze=o.base?be.b+be.s:be.s;e[x+"0"]=e[x+"1"]=O.c2p(be[x],!0),e[x+"LabelVal"]=ze;var Ce=s.extents[s.extents.round(be.p)];e[p+"0"]=G.c2p(u?v(be):Ce[0],!0),e[p+"1"]=G.c2p(u?z(be):Ce[1],!0);var he=be.orig_p!==void 0;return e[p+"LabelVal"]=he?be.orig_p:be.p,e.labelLabel=IV(G,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=IV(O,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=IV(O,be.b,o[x+"hoverformat"]),e.spikeDistance=(j(be)+q(be))/2,e[p+"Spike"]=G.c2p(be.p,!0),s1t(be,o,e),e.hovertemplate=o.hovertemplate,e}}function Xge(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=l1t(e,t);if(jge.opacity(r))return r;if(jge.opacity(n)&&i)return n}Yge.exports={hoverPoints:f1t,hoverOnBars:Zge,getTraceColor:Xge}});var Jge=Se((Ysr,Kge)=>{"use strict";Kge.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 AT=Se((Ksr,$ge)=>{"use strict";$ge.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",u=o.orientation==="h",l=[],f;if(r===!1)for(f=0;f{"use strict";Qge.exports={attributes:Lm(),layoutAttributes:DI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:kV(),calc:Tge(),crossTraceCalc:Gb().crossTraceCalc,colorbar:ep(),arraysToCalcdata:f4(),plot:i2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:TT().hoverPoints,eventData:Jge(),selectPoints:AT(),moduleType:"trace",name:"bar",basePlotModule:Th(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var r1e=Se(($sr,t1e)=>{"use strict";t1e.exports=e1e()});var p4=Se((Qsr,o1e)=>{"use strict";var h1t=Ey(),U0=Zc(),i1e=Lm(),d1t=Ih(),n1e=Gc().axisHoverFormat,p1t=Du().hovertemplateAttrs,Rg=vu().extendFlat,ST=U0.marker,a1e=ST.line;o1e.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:n1e("x"),yhoverformat:n1e("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:Rg({},ST.symbol,{arrayOk:!1,editType:"plot"}),opacity:Rg({},ST.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Rg({},ST.angle,{arrayOk:!1,editType:"calc"}),size:Rg({},ST.size,{arrayOk:!1,editType:"calc"}),color:Rg({},ST.color,{arrayOk:!1,editType:"style"}),line:{color:Rg({},a1e.color,{arrayOk:!1,dflt:d1t.defaultLine,editType:"style"}),width:Rg({},a1e.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:h1t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i1e.offsetgroup,alignmentgroup:i1e.alignmentgroup,selected:{marker:U0.selected.marker,editType:"style"},unselected:{marker:U0.unselected.marker,editType:"style"},text:Rg({},U0.text,{}),hovertext:Rg({},U0.hovertext,{}),hovertemplate:p1t({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:U0.zorder}});var v4=Se((elr,s1e)=>{"use strict";s1e.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 m4=Se((tlr,c1e)=>{"use strict";var V0=Zr(),v1t=Ul(),y1t=Pl(),m1t=zy(),g1t=Hb(),l1e=L3(),y4=p4();function _1t(e,t,r,n){function i(p,x){return V0.coerce(e,t,y4,p,x)}if(u1e(e,t,i,n),t.visible!==!1){m1t(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",y1t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),u=i("sd");s&&s.length&&(o=!0,u&&u.length&&(o="sd"))}i("whiskerwidth");var l=i("sizemode"),f;l==="quartiles"&&(f=i("boxmean",o)),i("showwhiskers",l==="quartiles"),(l==="sd"||f==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var c=!1;if(a){var h=i("notchspan");h&&h.length&&(c=!0)}else V0.validate(e.notchwidth,y4.notchwidth)&&(c=!0);var d=i("notched",c);d&&i("notchwidth"),f1e(e,t,i,{prefix:"box"}),i("zorder")}}function u1e(e,t,r,n){function i(z){var T=0;return z&&z.length&&(T+=1,V0.isArrayOrTypedArray(z[0])&&z[0].length&&(T+=1)),T}function a(z){return V0.validate(e[z],y4[z])}var o=r("y"),s=r("x"),u;if(t.type==="box"){var l=r("q1"),f=r("median"),c=r("q3");t._hasPreCompStats=l&&l.length&&f&&f.length&&c&&c.length,u=Math.min(V0.minRowLength(l),V0.minRowLength(f),V0.minRowLength(c))}var h=i(o),d=i(s),p=h&&V0.minRowLength(o),x=d&&V0.minRowLength(s),b=n.calendar,y={autotypenumbers:n.autotypenumbers},k,E;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var A=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!A?k="h":k="v",E=u;break;case"10":k="v",E=Math.min(u,x);break;case"20":k="h",E=Math.min(u,s.length);break;case"01":k="h",E=Math.min(u,p);break;case"02":k="v",E=Math.min(u,o.length);break;case"12":k="v",E=Math.min(u,x,o.length);break;case"21":k="h",E=Math.min(u,s.length,p);break;case"11":E=0;break;case"22":var _=!1,C;for(C=0;C0?(k="v",d>0?E=Math.min(x,p):E=Math.min(p)):d>0?(k="h",E=Math.min(x)):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 v=v1t.getComponentMethod("calendars","handleTraceDefaults");v(e,t,["x","y"],n)}function f1e(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,y4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var u=r(i+"points",s);u?(r("jitter",u==="all"?.3:0),r("pointpos",u==="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"),u==="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 l=r("hoveron");(l==="all"||l.indexOf("points")!==-1)&&r("hovertemplate"),V0.coerceSelectionMarkerOpacity(t,r)}function x1t(e,t){var r,n;function i(u){return V0.coerce(n._input,n,y4,u)}for(var a=0;a{"use strict";var b1t=Ul(),w1t=Zr(),T1t=v4();function h1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var RV=_u(),VI=hu(),S1t=Iy(),Ah=Zr(),i0=ju().BADNUM,Fg=Ah._;w1e.exports=function(t,r){var n=t._fullLayout,i=VI.getFromId(t,r.xaxis||"x"),a=VI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",u,l,f,c,h,d,p;r.orientation==="h"?(f=i,c="x",h=a,d="y",p=!!r.yperiodalignment):(f=a,c="y",h=i,d="x",p=!!r.xperiodalignment);var x=M1t(r,d,h,n[s]),b=x[0],y=x[1],k=Ah.distinctVals(b,h),E=k.vals,A=k.minDiff/2,L,_,C,M,v,z,T=(r.boxpoints||r.points)==="all"?Ah.identity:function(Pt){return Pt.vL.uf};if(r._hasPreCompStats){var F=r[c],q=function(Pt){return f.d2c((r[Pt]||[])[u])},U=1/0,H=-1/0;for(u=0;u=L.q1&&L.q3>=L.med){var G=q("lowerfence");L.lf=G!==i0&&G<=L.q1?G:m1e(L,C,M);var O=q("upperfence");L.uf=O!==i0&&O>=L.q3?O:g1e(L,C,M);var W=q("mean");L.mean=W!==i0?W:M?Ah.mean(C,M):(L.q1+L.q3)/2;var re=q("sd");L.sd=W!==i0&&re>=0?re:M?Ah.stdev(C,M,L.mean):L.q3-L.q1,L.lo=_1e(L),L.uo=x1e(L);var ne=q("notchspan");ne=ne!==i0&&ne>0?ne:b1e(L,M),L.ln=L.med-ne,L.un=L.med+ne;var be=L.lf,ze=L.uf;r.boxpoints&&C.length&&(be=Math.min(be,C[0]),ze=Math.max(ze,C[M-1])),r.notched&&(be=Math.min(be,L.ln),ze=Math.max(ze,L.un)),L.min=be,L.max=ze}else{Ah.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}U=Math.min(U,L.min),H=Math.max(H,L.max),L.pts2=_.filter(T),o.push(L)}}r._extremes[f._id]=VI.findExtremes(f,[U,H],{padded:!0})}else{var he=f.makeCalcdata(r,c),te=E1t(E,A),ke=E.length,Ee=k1t(ke);for(u=0;u=0&&Me0){if(L={},L.pos=L[d]=E[u],_=L.pts=Ee[u].sort(v1e),C=L[c]=_.map(y1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=Ah.mean(C,M),L.sd=Ah.stdev(C,M,L.mean)*r.sdmultiple,L.med=Ah.interp(C,.5),M%2&&(Be||fe)){var Ze,et;Be?(Ze=C.slice(0,M/2),et=C.slice(M/2+1)):fe&&(Ze=C.slice(0,M/2+1),et=C.slice(M/2)),L.q1=Ah.interp(Ze,.5),L.q3=Ah.interp(et,.5)}else L.q1=Ah.interp(C,.25),L.q3=Ah.interp(C,.75);L.lf=m1e(L,C,M),L.uf=g1e(L,C,M),L.lo=_1e(L),L.uo=x1e(L);var gt=b1e(L,M);L.ln=L.med-gt,L.un=L.med+gt,Oe=Math.min(Oe,L.ln),Re=Math.max(Re,L.un),L.pts2=_.filter(T),o.push(L)}r.notched&&Ah.isTypedArray(he)&&(he=Array.from(he)),r._extremes[f._id]=VI.findExtremes(f,r.notched?he.concat([Oe,Re]):he,{padded:!0})}return C1t(o,r),o.length>0?(o[0].t={num:n[s],dPos:A,posLetter:d,valLetter:c,labels:{med:Fg(t,"median:"),min:Fg(t,"min:"),q1:Fg(t,"q1:"),q3:Fg(t,"q3:"),max:Fg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Fg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Fg(t,"mean:"),lf:Fg(t,"lower fence:"),uf:Fg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function M1t(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),u=S1t(e,r,t,s).vals;return[u,s]}var l;a?l=e[t+"0"]:"name"in e&&(r.type==="category"||RV(e.name)&&["linear","log"].indexOf(r.type)!==-1||Ah.isDateTime(e.name)&&r.type==="date")?l=e.name:l=n;for(var f=r.type==="multicategory"?r.r2c_just_indices(l):r.d2c(l,0,e[t+"calendar"]),c=e._length,h=new Array(c),d=0;d{"use strict";var T1e=hu(),L1t=Zr(),z1t=Ob().getAxisGroup,A1e=["v","h"];function P1t(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(u=0;u0;if(C==="positive"?(O=M*(_?1:.5),ne=re,W=ne=z):C==="negative"?(O=ne=z,W=M*(_?1:.5),be=re):(O=W=M,ne=be=re),Ee){var Me=A.pointpos,Oe=A.jitter,Re=A.marker.size/2,me=0;Me+Oe>=0&&(me=re*(Me+Oe),me>O?(ke=!0,he=Re,ze=me):me>ne&&(he=Re,ze=O)),me<=O&&(ze=O);var Be=0;Me-Oe<=0&&(Be=-re*(Me-Oe),Be>W?(ke=!0,te=Re,Ce=Be):Be>be&&(te=Re,Ce=W)),Be<=W&&(Ce=W)}else ze=O,Ce=W;var fe=new Array(f.length);for(l=0;l{"use strict";var MT=Nl(),n2=Zr(),I1t=yu(),E1e=5,D1t=.01;function R1t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;n2.makeTraceGroups(n,r,"trace boxes").each(function(s){var u=MT.select(this),l=s[0],f=l.t,c=l.trace;if(f.wdPos=f.bdPos*c.whiskerwidth,c.visible!==!0||f.empty){u.remove();return}var h,d;c.orientation==="h"?(h=o,d=a):(h=a,d=o),k1e(u,{pos:h,val:d},c,f,i),C1e(u,{x:a,y:o},c,f),L1e(u,{pos:h,val:d},c,f)})}function k1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,u=!!s.rangebreaks,l=n.bPos,f=n.wdPos||0,c=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,p=r.notched||!1,x=p?1-2*r.notchwidth:1,b,y;Array.isArray(n.bdPos)?(b=n.bdPos[0],y=n.bdPos[1]):(b=n.bdPos,y=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?n2.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 MT.select(this).attr("d","M0,0Z");var A=s.c2l(E.pos+l,!0),L=s.l2p(A-b)+c,_=s.l2p(A+y)+c,C=u?(L+_)/2:s.l2p(A)+c,M=r.whiskerwidth,v=u?L*M+(1-M)*C:s.l2p(A-f)+c,z=u?_*M+(1-M)*C:s.l2p(A+f)+c,T=s.l2p(A-b*x)+c,F=s.l2p(A+y*x)+c,q=r.sizemode==="sd",U=o.c2p(q?E.mean-E.sd:E.q1,!0),H=q?o.c2p(E.mean+E.sd,!0):o.c2p(E.q3,!0),j=n2.constrain(q?o.c2p(E.mean,!0):o.c2p(E.med,!0),Math.min(U,H)+1,Math.max(U,H)-1),G=E.lf===void 0||r.boxpoints===!1||q,O=o.c2p(G?E.min:E.lf,!0),W=o.c2p(G?E.max:E.uf,!0),re=o.c2p(E.ln,!0),ne=o.c2p(E.un,!0);a?MT.select(this).attr("d","M"+j+","+T+"V"+F+"M"+U+","+L+"V"+_+(p?"H"+re+"L"+j+","+F+"L"+ne+","+_:"")+"H"+H+"V"+L+(p?"H"+ne+"L"+j+","+T+"L"+re+","+L:"")+"Z"+(d?"M"+U+","+C+"H"+O+"M"+H+","+C+"H"+W+(h===0?"":"M"+O+","+v+"V"+z+"M"+W+","+v+"V"+z):"")):MT.select(this).attr("d","M"+T+","+j+"H"+F+"M"+L+","+U+"H"+_+(p?"V"+re+"L"+F+","+j+"L"+_+","+ne:"")+"V"+H+"H"+L+(p?"V"+ne+"L"+T+","+j+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+U+"V"+O+"M"+C+","+H+"V"+W+(h===0?"":"M"+v+","+O+"H"+z+"M"+v+","+W+"H"+z):""))})}function C1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,u=r.boxpoints||r.points;n2.seedPseudoRandom();var l=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},f=e.selectAll("g.points").data(u?l:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var c=f.selectAll("path").data(function(h){var d,p=h.pts2,x=Math.max((h.max-h.min)/10,h.q3-h.q1),b=x*1e-9,y=x*D1t,k=[],E=0,A;if(r.jitter){if(x===0)for(E=1,k=new Array(p.length),d=0;dh.lo&&(z.so=!0)}return p});c.enter().append("path").classed("point",!0),c.exit().remove(),c.call(I1t.translatePoints,i,a)}function L1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,u=n.bPosPxOffset||0,l=r.boxmean||(r.meanline||{}).visible,f,c;Array.isArray(n.bdPos)?(f=n.bdPos[0],c=n.bdPos[1]):(f=n.bdPos,c=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?n2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=a.c2l(d.pos+s,!0),x=a.l2p(p-f)+u,b=a.l2p(p+c)+u,y=o?(x+b)/2:a.l2p(p)+u,k=i.c2p(d.mean,!0),E=i.c2p(d.mean-d.sd,!0),A=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?MT.select(this).attr("d","M"+k+","+x+"V"+b+(l==="sd"?"m0,0L"+E+","+y+"L"+k+","+x+"L"+A+","+y+"Z":"")):MT.select(this).attr("d","M"+x+","+k+"H"+b+(l==="sd"?"m0,0L"+y+","+E+"L"+x+","+k+"L"+y+","+A+"Z":""))})}z1e.exports={plot:R1t,plotBoxAndWhiskers:k1e,plotPoints:C1e,plotBoxMean:L1e}});var WI=Se((olr,P1e)=>{"use strict";var qV=Nl(),BV=Pl(),OV=yu();function F1t(e,t,r){var n=r||qV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=qV.select(this),o=i[0].trace,s=o.line.width;function u(c,h,d,p){c.style("stroke-width",h+"px").call(BV.stroke,d).call(BV.fill,p)}var l=a.selectAll("path.box");if(o.type==="candlestick")l.each(function(c){if(!c.empty){var h=qV.select(this),d=o[c.dir];u(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!c.selected?.3:1)}});else{u(l,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(BV.stroke,o.line.color);var f=a.selectAll("path.point");OV.pointStyle(f,o,e)}})}function q1t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?OV.selectedPointStyle(i,n):OV.pointStyle(i,n,e)}P1e.exports={style:F1t,styleOnSelect:q1t}});var UV=Se((slr,F1e)=>{"use strict";var B1t=hu(),NV=Zr(),A_=jc(),I1e=Pl(),O1t=NV.fillText;function N1t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],u;return o.indexOf("boxes")!==-1&&(s=s.concat(D1e(e,t,r,n))),o.indexOf("points")!==-1&&(u=R1e(e,t,r)),n==="closest"?u?[u]:s:(u&&s.push(u),s)}function D1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,u=i[0].t,l=s.type==="violin",f,c,h,d,p,x,b,y,k,E,A,L=u.bdPos,_,C,M=u.wHover,v=function(Re){return h.c2l(Re.pos)+u.bPos-h.c2l(x)};l&&s.side!=="both"?(s.side==="positive"&&(k=function(Re){var me=v(Re);return A_.inbox(me,me+M,E)},_=L,C=0),s.side==="negative"&&(k=function(Re){var me=v(Re);return A_.inbox(me-M,me,E)},_=0,C=L)):(k=function(Re){var me=v(Re);return A_.inbox(me-M,me+M,E)},_=C=L);var z;l?z=function(Re){return A_.inbox(Re.span[0]-p,Re.span[1]-p,E)}:z=function(Re){return A_.inbox(Re.min-p,Re.max-p,E)},s.orientation==="h"?(p=t,x=r,b=z,y=k,f="y",h=o,c="x",d=a):(p=r,x=t,b=k,y=z,f="x",h=a,c="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,A=e.maxSpikeDistance-T;function F(Re){return(b(Re)+y(Re))/2}var q=A_.getDistanceFunction(n,b,y,F);if(A_.getClosest(i,q,e),e.index===!1)return[];var U=i[e.index],H=s.line.color,j=(s.marker||{}).color;I1e.opacity(H)&&s.line.width?e.color=H:I1e.opacity(j)&&s.boxpoints?e.color=j:e.color=s.fillcolor,e[f+"0"]=h.c2p(U.pos+u.bPos-C,!0),e[f+"1"]=h.c2p(U.pos+u.bPos+_,!0),e[f+"LabelVal"]=U.orig_p!==void 0?U.orig_p:U.pos;var G=f+"Spike";e.spikeDistance=F(U)*A/E,e[G]=h.c2p(U.pos,!0);var O=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,W=s.boxpoints||s.points,re=W&&O?["max","uf","q3","med","mean","q1","lf","min"]:W&&!O?["max","uf","q3","med","q1","lf","min"]:!W&&O?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ne=d.range[1]{"use strict";q1e.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 VV=Se((ulr,O1e)=>{"use strict";O1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u;if(r===!1)for(s=0;s{"use strict";N1e.exports={attributes:p4(),layoutAttributes:v4(),supplyDefaults:m4().supplyDefaults,crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:UI().supplyLayoutDefaults,calc:FV(),crossTraceCalc:HI().crossTraceCalc,plot:GI().plot,style:WI().style,styleOnSelect:WI().styleOnSelect,hoverPoints:UV().hoverPoints,eventData:B1e(),selectPoints:VV(),moduleType:"trace",name:"box",basePlotModule:Th(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var H1e=Se((clr,V1e)=>{"use strict";V1e.exports=U1e()});var ET=Se((hlr,G1e)=>{"use strict";var n0=Zc(),U1t=zf(),V1t=uc(),HV=Gc().axisHoverFormat,H1t=Du().hovertemplateAttrs,G1t=Du().texttemplateAttrs,W1t=Xf(),zv=vu().extendFlat;G1e.exports=zv({z:{valType:"data_array",editType:"calc"},x:zv({},n0.x,{impliedEdits:{xtype:"array"}}),x0:zv({},n0.x0,{impliedEdits:{xtype:"scaled"}}),dx:zv({},n0.dx,{impliedEdits:{xtype:"scaled"}}),y:zv({},n0.y,{impliedEdits:{ytype:"array"}}),y0:zv({},n0.y0,{impliedEdits:{ytype:"scaled"}}),dy:zv({},n0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:zv({},n0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:zv({},n0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:zv({},n0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:zv({},n0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:zv({},n0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:zv({},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:HV("x"),yhoverformat:HV("y"),zhoverformat:HV("z",1),hovertemplate:H1t(),texttemplate:G1t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:V1t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:zv({},U1t.showlegend,{dflt:!1}),zorder:n0.zorder},W1t("",{cLetter:"z",autoColorDflt:!1}))});var ZI=Se((dlr,j1e)=>{"use strict";var j1t=_u(),jI=Zr(),Z1t=Ul();j1e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var u,l;if(s===void 0||!s.length)return 0;if(jI.isArray1D(s)){u=n(a),l=n(o);var f=jI.minRowLength(u),c=jI.minRowLength(l);if(f===0||c===0)return 0;r._length=Math.min(f,c,s.length)}else{if(u=W1e(a,n),l=W1e(o,n),!X1t(s))return 0;n("transpose"),r._length=null}var h=Z1t.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function W1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function X1t(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var Z1e=Zr();X1e.exports=function(t,r){t("texttemplate");var n=Z1e.extendFlat({},r.font,{color:"auto",size:"auto"});Z1e.coerceFont(t,"textfont",n)}});var GV=Se((vlr,Y1e)=>{"use strict";Y1e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var $1e=Se((ylr,J1e)=>{"use strict";var K1e=Zr(),Y1t=ZI(),K1t=g4(),J1t=zy(),$1t=GV(),Q1t=ed(),e_t=ET();J1e.exports=function(t,r,n,i){function a(s,u){return K1e.coerce(t,r,e_t,s,u)}var o=Y1t(t,r,a,i);if(!o){r.visible=!1;return}J1t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),K1t(a,i),$1t(t,r,a,i),a("hoverongaps"),a("connectgaps",K1e.isArray1D(r.z)&&r.zsmooth!==!1),Q1t(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var WV=Se((mlr,Q1e)=>{"use strict";var kT=_u();Q1e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return kT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return kT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(kT(i))if(i=Number(i),kT(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(kT(i))if(i=Number(i),kT(r[e])){if(r[e]{"use strict";e_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";t_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var CT=ju(),a2=CT.ONEAVGYEAR,r_e=CT.ONEAVGMONTH,YI=CT.ONEDAY,i_e=CT.ONEHOUR,n_e=CT.ONEMIN,a_e=CT.ONESEC,o_e=hu().tickIncrement;u_e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,u=t-s,l=n[0],f=n[1],c=Math.min(XI(l+s,l+u,i,a),XI(f+s,f+u,i,a)),h=Math.min(XI(l+o,l+s,i,a),XI(f+o,f+s,i,a)),d,p;if(c>h&&hYI){var x=d===a2?1:6,b=d===a2?"M12":"M1";return function(y,k){var E=i.c2d(y,a2,a),A=E.indexOf("-",x);A>0&&(E=E.substr(0,A));var L=i.d2c(E,0,a);if(La_e?e>YI?e>a2*1.1?a2:e>r_e*1.1?r_e:YI:e>i_e?i_e:e>n_e?n_e:a_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function t_t(e,t,r,n,i,a){if(n&&e>YI){var o=l_e(t,i,a),s=l_e(r,i,a),u=e===a2?0:1;return o[u]!==s[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function l_e(e,t,r){var n=t.c2d(e,a2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var JV=Se((blr,h_e)=>{"use strict";var YV=_u(),Vp=Zr(),f_e=Ul(),H0=hu(),r_t=f4(),c_e=WV(),i_t=jV(),n_t=ZV(),a_t=XV();function o_t(e,t){var r=[],n=[],i=t.orientation==="h",a=H0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],u=t[o+"calendar"],l=t.cumulative,f,c=KV(e,t,a,o),h=c[0],d=c[1],p=typeof h.size=="string",x=[],b=p?x:h,y=[],k=[],E=[],A=0,L=t.histnorm,_=t.histfunc,C=L.indexOf("density")!==-1,M,v,z;l.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var T=_==="max"||_==="min",F=T?null:0,q=c_e.count,U=i_t[L],H=!1,j=function(me){return a.r2c(me,0,u)},G;for(Vp.isArrayOrTypedArray(t[s])&&_!=="count"&&(G=t[s],H=_==="avg",q=c_e[_]),f=j(h.start),v=j(h.end)+(f-H0.tickIncrement(f,h.size,!1,u))/1e6;f=0&&z=Me;f--)if(n[f]){Oe=f;break}for(f=Me;f<=Oe;f++)if(YV(r[f])&&YV(n[f])){var Re={p:r[f],s:n[f],b:0};l.enabled||(Re.pts=E[f],ne?Re.ph0=Re.ph1=E[f].length?d[E[f][0]]:r[f]:(t._computePh=!0,Re.ph0=te(x[f]),Re.ph1=te(x[f+1],!0))),Ee.push(Re)}return Ee.length===1&&(Ee[0].width1=H0.tickIncrement(Ee[0].p,h.size,!1,u)-Ee[0].p),r_t(Ee,t),Vp.isArrayOrTypedArray(t.selectedpoints)&&Vp.tagSelected(Ee,t,Ce),Ee}function KV(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],u=o._histogramBinOpts[s],l=o.barmode==="overlay",f,c,h,d,p,x,b,y=function(he){return r.r2c(he,0,d)},k=function(he){return r.c2r(he,0,d)},E=r.type==="date"?function(he){return he||he===0?Vp.cleanDate(he,null,d):null}:function(he){return YV(he)?Number(he):null};function A(he,te,ke){te[he+"Found"]?(te[he]=E(te[he]),te[he]===null&&(te[he]=ke[he])):(x[he]=te[he]=ke[he],Vp.nestedProperty(c[0],a+"."+he).set(ke[he]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{c=u.traces;var L=[],_=!0,C=!1,M=!1;for(f=0;fr.r2l(G)&&(W=H0.tickIncrement(W,u.size,!0,d)),q.start=r.l2r(W),j||Vp.nestedProperty(t,a+".start").set(q.start)}var re=u.end,ne=r.r2l(F.end),be=ne!==void 0;if((u.endFound||be)&&ne!==r.r2l(re)){var ze=be?ne:Vp.aggNums(Math.max,null,p);q.end=r.l2r(ze),be||Vp.nestedProperty(t,a+".start").set(q.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Vp.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[q,p]}function s_t(e,t,r,n,i){var a=e._fullLayout,o=l_t(e,t),s=!1,u=1/0,l=[t],f,c,h;for(f=0;f=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())}}h_e.exports={calc:o_t,calcAllAutoBins:KV}});var x_e=Se((wlr,__e)=>{"use strict";var d_e=Zr(),LT=hu(),p_e=WV(),f_t=jV(),c_t=ZV(),h_t=XV(),v_e=JV().calcAllAutoBins;__e.exports=function(t,r){var n=LT.getFromId(t,r.xaxis),i=LT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(je){return n.r2c(je,0,a)},u=function(je){return i.r2c(je,0,o)},l=function(je){return n.c2r(je,0,a)},f=function(je){return i.c2r(je,0,o)},c,h,d,p,x=v_e(t,r,n,"x"),b=x[0],y=x[1],k=v_e(t,r,i,"y"),E=k[0],A=k[1],L=r._length;y.length>L&&y.splice(L,y.length-L),A.length>L&&A.splice(L,A.length-L);var _=[],C=[],M=[],v=typeof b.size=="string",z=typeof E.size=="string",T=[],F=[],q=v?T:b,U=z?F:E,H=0,j=[],G=[],O=r.histnorm,W=r.histfunc,re=O.indexOf("density")!==-1,ne=W==="max"||W==="min",be=ne?null:0,ze=p_e.count,Ce=f_t[O],he=!1,te=[],ke=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&W!=="count"&&(he=W==="avg",ze=p_e[W]);var Me=b.size,Oe=s(b.start),Re=s(b.end)+(Oe-LT.tickIncrement(Oe,Me,!1,a))/1e6;for(c=Oe;c=0&&d=0&&p{"use strict";var Pm=Zr(),b_e=ju().BADNUM,w_e=Iy();T_e.exports=function(t,r,n,i,a,o){var s=t._length,u=r.makeCalcdata(t,i),l=n.makeCalcdata(t,a);u=w_e(t,r,i,u).vals,l=w_e(t,n,a,l).vals;var f=t.text,c=f!==void 0&&Pm.isArray1D(f),h=t.hovertext,d=h!==void 0&&Pm.isArray1D(h),p,x,b=Pm.distinctVals(u),y=b.vals,k=Pm.distinctVals(l),E=k.vals,A=[],L,_,C=E.length,M=y.length;for(p=0;p{"use strict";var d_t=_u(),p_t=Zr(),JI=ju().BADNUM;A_e.exports=function(t,r,n,i){var a,o,s,u,l,f;function c(y){if(d_t(y))return+y}if(r&&r.transpose){for(a=0,l=0;l{"use strict";var v_t=Zr(),S_e=.01,y_t=[[-1,0],[1,0],[0,-1],[0,1]];function m_t(e){return .5-.25*Math.min(1,e*.5)}E_e.exports=function(t,r){var n=1,i;for(M_e(t,r),i=0;iS_e;i++)n=M_e(t,r,m_t(n));return n>S_e&&v_t.log("interp2d didn't converge quickly",n),t};function M_e(e,t,r){var n=0,i,a,o,s,u,l,f,c,h,d,p,x,b;for(s=0;sx&&(n=Math.max(n,Math.abs(e[a][o]-p)/(b-x))))}return n}});var eD=Se((Mlr,k_e)=>{"use strict";var g_t=Zr().maxRowLength;k_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],u=g_t(t),l,f,c,h,d,p,x,b;for(f=0;f=0;d--)h=i[d],f=h[0],c=h[1],p=((n[[f-1,c]]||s)[2]+(n[[f+1,c]]||s)[2]+(n[[f,c-1]]||s)[2]+(n[[f,c+1]]||s)[2])/20,p&&(x[h]=[f,c,p],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in x)n[h]=x[h],r.push(x[h])}return r.sort(function(y,k){return k[2]-y[2]})}});var $V=Se((Elr,z_e)=>{"use strict";var C_e=Ul(),L_e=Zr().isArrayOrTypedArray;z_e.exports=function(t,r,n,i,a,o){var s=[],u=C_e.traceIs(t,"contour"),l=C_e.traceIs(t,"histogram"),f,c,h,d=L_e(r)&&r.length>1;if(d&&!l&&o.type!=="category"){var p=r.length;if(p<=a){if(u)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 P_e=Ul(),QV=Zr(),tD=hu(),I_e=Iy(),__t=x_e(),x_t=Rp(),b_t=KI(),w_t=$I(),T_t=QI(),A_t=eD(),rD=$V(),eH=ju().BADNUM;R_e.exports=function(t,r){var n=tD.getFromId(t,r.xaxis||"x"),i=tD.getFromId(t,r.yaxis||"y"),a=P_e.traceIs(r,"contour"),o=P_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,u,l,f,c,h,d,p,x,b,y,k;if(n._minDtick=0,i._minDtick=0,o)k=__t(t,r),c=k.orig_x,u=k.x,l=k.x0,f=k.dx,x=k.orig_y,h=k.y,d=k.y0,p=k.dy,b=k.z;else{var E=r.z;QV.isArray1D(E)?(b_t(r,n,i,"x","y",["z"]),u=r._x,h=r._y,E=r._z):(c=r.x?n.makeCalcdata(r,"x"):[],x=r.y?i.makeCalcdata(r,"y"):[],u=I_e(r,n,"x",c).vals,h=I_e(r,i,"y",x).vals,r._x=u,r._y=h),l=r.x0,f=r.dx,d=r.y0,p=r.dy,b=w_t(E,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=S_t(u,h,b),o||(u=D_e(u),h=D_e(h),r._x=u,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=A_t(b),T_t(b,r._emptypoints));function A(q){s=r._input.zsmooth=r.zsmooth=!1,QV.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var U=(q[q.length-1]-q[0])/(q.length-1),H=Math.abs(U/100);for(y=0;yH)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&A("log axis found"):L(u)?L(h)?r._islinear=!0:s==="fast"&&A("y scale is not linear"):s==="fast"&&A("x scale is not linear");var _=QV.maxRowLength(b),C=r.xtype==="scaled"?"":u,M=rD(r,C,l,f,_,n),v=r.ytype==="scaled"?"":h,z=rD(r,v,d,p,b.length,i);r._extremes[n._id]=tD.findExtremes(n,M),r._extremes[i._id]=tD.findExtremes(i,z);var T={x:M,y:z,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&c&&(T.orig_x=c),r.yperiodalignment&&x&&(T.orig_y=x),C&&C.length===M.length-1&&(T.xCenter=C),v&&v.length===z.length-1&&(T.yCenter=v),o&&(T.xRanges=k.xRanges,T.yRanges=k.yRanges,T.pts=k.pts),a||x_t(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var F={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=rD(F,C,l,f,_,n),T.yfill=rD(F,v,d,p,b.length,i)}return[T]};function D_e(e){for(var t=[],r=e.length,n=0;n{"use strict";nD.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"]];nD.STYLE=nD.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var tH=Se((Llr,B_e)=>{"use strict";var F_e=aD(),M_t=yu(),q_e=Zr(),zT=null;function E_t(){if(zT!==null)return zT;zT=!1;var e=q_e.isSafari()||q_e.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(F_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")zT=t.some(function(o){return r.apply(null,o)});else{var n=M_t.tester.append("image").attr("style",F_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;zT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return zT}B_e.exports=E_t});var oD=Se((zlr,Z_e)=>{"use strict";var O_e=Nl(),k_t=cd(),C_t=Ul(),L_t=yu(),z_t=hu(),G0=Zr(),N_e=Bf(),P_t=JP(),I_t=Pl(),D_t=fc().extractOpts,R_t=fc().makeColorScaleFuncFromTrace,F_t=Zv(),q_t=Qh(),rH=q_t.LINE_SPACING,B_t=tH(),O_t=aD().STYLE,W_e="heatmap-label";function j_e(e){return e.selectAll("g."+W_e)}function U_e(e){j_e(e).remove()}Z_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;G0.makeTraceGroups(n,r,"hm").each(function(o){var s=O_e.select(this),u=o[0],l=u.trace,f=l.xgap||0,c=l.ygap||0,h=u.z,d=u.x,p=u.y,x=u.xCenter,b=u.yCenter,y=C_t.traceIs(l,"contour"),k=y?"best":l.zsmooth,E=h.length,A=G0.maxRowLength(h),L=!1,_=!1,C,M,v,z,T,F,q,U;for(F=0;C===void 0&&F0;)M=i.c2p(d[F]),F--;for(M0;)T=a.c2p(p[F]),F--;T=i._length||M<=0||z>=a._length||T<=0;if(W){var re=s.selectAll("image").data([]);re.exit().remove(),U_e(s);return}var ne,be;H==="fast"?(ne=A,be=E):(ne=G,be=O);var ze=document.createElement("canvas");ze.width=ne,ze.height=be;var Ce=ze.getContext("2d",{willReadFrequently:!0}),he=R_t(l,{noNumericCheck:!0,returnArray:!0}),te,ke;H==="fast"?(te=L?function(vi){return A-1-vi}:G0.identity,ke=_?function(vi){return E-1-vi}:G0.identity):(te=function(vi){return G0.constrain(Math.round(i.c2p(d[vi])-C),0,G)},ke=function(vi){return G0.constrain(Math.round(a.c2p(p[vi])-z),0,O)});var Ee=ke(0),Me=[Ee,Ee],Oe=L?0:1,Re=_?0:1,me=0,Be=0,fe=0,Ze=0,et,gt,Pt,Qe,Xe;function Tt(vi,Pi){if(vi!==void 0){var Yr=he(vi);return Yr[0]=Math.round(Yr[0]),Yr[1]=Math.round(Yr[1]),Yr[2]=Math.round(Yr[2]),me+=Pi,Be+=Yr[0]*Pi,fe+=Yr[1]*Pi,Ze+=Yr[2]*Pi,Yr}return[0,0,0,0]}function xt(vi,Pi,Yr,Ni){var Ur=vi[Yr.bin0];if(Ur===void 0)return Tt(void 0,1);var ti=vi[Yr.bin1],ki=Pi[Yr.bin0],ji=Pi[Yr.bin1],Vi=ti-Ur||0,zi=ki-Ur||0,Mi;return ti===void 0?ji===void 0?Mi=0:ki===void 0?Mi=2*(ji-Ur):Mi=(2*ji-ki-Ur)*2/3:ji===void 0?ki===void 0?Mi=0:Mi=(2*Ur-ti-ki)*2/3:ki===void 0?Mi=(2*ji-ti-Ur)*2/3:Mi=ji+Ur-ti-ki,Tt(Ur+Yr.frac*Vi+Ni.frac*(zi+Yr.frac*Mi))}if(H!=="default"){var _t=0,Ct;try{Ct=new Uint8Array(ne*be*4)}catch(vi){Ct=new Array(ne*be*4)}if(H==="smooth"){var jt=x||d,At=b||p,Te=new Array(jt.length),nt=new Array(At.length),ut=new Array(G),ct=x?H_e:V_e,rt=b?H_e:V_e,je,tt,Je;for(F=0;FZt||Zt>a._length))for(q=de;qLr||Lr>i._length)){var vr=P_t({x:qr,y:St},l,e._fullLayout);vr.x=qr,vr.y=St;var Er=u.z[F][q];Er===void 0?(vr.z="",vr.zLabel=""):(vr.z=Er,vr.zLabel=z_t.tickText(Pe,Er,"hover").text);var si=u.text&&u.text[F]&&u.text[F][q];(si===void 0||si===!1)&&(si=""),vr.text=si;var Ei=G0.texttemplateString(_e,vr,e._fullLayout._d3locale,vr,l._meta||{});if(Ei){var Si=Ei.split("
"),xi=Si.length,Hi=0;for(U=0;U{"use strict";X_e.exports={min:"zmin",max:"zmax"}});var sD=Se((Ilr,Y_e)=>{"use strict";var N_t=Nl();Y_e.exports=function(t){N_t.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var uD=Se((Dlr,J_e)=>{"use strict";var K_e=jc(),_4=Zr(),lD=_4.isArrayOrTypedArray,U_t=hu(),V_t=fc().extractOpts;J_e.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],u=s.trace,l=t.xa,f=t.ya,c=s.x,h=s.y,d=s.z,p=s.xCenter,x=s.yCenter,b=s.zmask,y=u.zhoverformat,k=c,E=h,A,L,_,C;if(t.index!==!1){try{_=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){_4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(_<0||_>=d[0].length||C<0||C>d.length)return}else{if(K_e.inbox(r-c[0],r-c[c.length-1],0)>0||K_e.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(k=[2*c[0]-c[1]],M=1;M{"use strict";$_e.exports={attributes:ET(),supplyDefaults:$1e(),calc:iD(),plot:oD(),colorbar:S_(),style:sD(),hoverPoints:uD(),moduleType:"trace",name:"heatmap",basePlotModule:Th(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var txe=Se((Flr,exe)=>{"use strict";exe.exports=Q_e()});var iH=Se((qlr,rxe)=>{"use strict";rxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var nxe=Se((Blr,ixe)=>{"use strict";ixe.exports={eventDataKeys:["binNumber"]}});var fD=Se((Olr,sxe)=>{"use strict";var Pv=Lm(),axe=Gc().axisHoverFormat,H_t=Du().hovertemplateAttrs,G_t=Du().texttemplateAttrs,nH=uc(),oxe=iH(),W_t=nxe(),aH=vu().extendFlat;sxe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:axe("x"),yhoverformat:axe("y"),text:aH({},Pv.text,{}),hovertext:aH({},Pv.hovertext,{}),orientation:Pv.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:oxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:oxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:H_t({},{keys:W_t.eventDataKeys}),texttemplate:G_t({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:aH({},Pv.textposition,{arrayOk:!1}),textfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nH({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Pv.insidetextanchor,textangle:Pv.textangle,cliponaxis:Pv.cliponaxis,constraintext:Pv.constraintext,marker:Pv.marker,offsetgroup:Pv.offsetgroup,alignmentgroup:Pv.alignmentgroup,selected:Pv.selected,unselected:Pv.unselected,zorder:Pv.zorder}});var cxe=Se((Nlr,fxe)=>{"use strict";var lxe=Ul(),x4=Zr(),uxe=Pl(),j_t=r0().handleText,Z_t=RI(),X_t=fD();fxe.exports=function(t,r,n,i){function a(k,E){return x4.coerce(t,r,X_t,k,E)}var o=a("x"),s=a("y"),u=a("cumulative.enabled");u&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var l=a("textposition");j_t(t,r,i,a,l,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat");var f=a("orientation",s&&!o?"h":"v"),c=f==="v"?"x":"y",h=f==="v"?"y":"x",d=o&&s?Math.min(x4.minRowLength(o)&&x4.minRowLength(s)):x4.minRowLength(r[c]||[]);if(!d){r.visible=!1;return}r._length=d;var p=lxe.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],i);var x=r[h];x&&a("histfunc"),a("histnorm"),a("autobin"+c),Z_t(t,r,a,n,i),x4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,y=lxe.getComponentMethod("errorbars","supplyDefaults");y(t,r,b||uxe.defaultLine,{axis:"y"}),y(t,r,b||uxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var hD=Se((Ulr,pxe)=>{"use strict";var b4=Zr(),Y_t=$c(),cD=Ul().traceIs,K_t=Hb(),J_t=r0().validateCornerradius,hxe=b4.nestedProperty,oH=Ob().getAxisGroup,dxe=[{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"}],$_t=["x","y"];pxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,u,l,f,c,h,d;function p(H,j){return b4.coerce(s._input,s,s._module.attributes,H,j)}function x(H){return H.orientation==="v"?"x":"y"}function b(H,j){var G=Y_t.getFromTrace({_fullLayout:r},H,j);return G.type}function y(H,j,G){var O=H.uid+"__"+G;j||(j=O);var W=b(H,G),re=H[G+"calendar"]||"",ne=n[j],be=!0;ne&&(W===ne.axType&&re===ne.calendar?(be=!1,ne.traces.push(H),ne.dirs.push(G)):(j=O,W!==ne.axType&&b4.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+W,"axis","with bins on","type:"+ne.axType,"axis."].join(" ")),re!==ne.calendar&&b4.warn(["Attempted to group the bins of trace",H.index,"set with a",re,"calendar","with bins",ne.calendar?"on a "+ne.calendar+" calendar":"w/o a set calendar"].join(" ")))),be&&(n[j]={traces:[H],dirs:[G],axType:W,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=j}for(c=0;c{"use strict";var Q_t=TT().hoverPoints,ext=hu().hoverLabelText;vxe.exports=function(t,r,n,i,a){var o=Q_t(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],u=t.cd[0].trace;if(!u.cumulative.enabled){var l=u.orientation==="h"?"y":"x";t[l+"Label"]=ext(t[l+"a"],[s.ph0,s.ph1],u[l+"hoverformat"])}return o}}});var sH=Se((Hlr,mxe)=>{"use strict";mxe.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 u=0;u{"use strict";gxe.exports={attributes:fD(),layoutAttributes:DI(),supplyDefaults:cxe(),crossTraceDefaults:hD(),supplyLayoutDefaults:kV(),calc:JV().calc,crossTraceCalc:Gb().crossTraceCalc,plot:i2().plot,layerName:"barlayer",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:ep(),hoverPoints:yxe(),selectPoints:AT(),eventData:sH(),moduleType:"trace",name:"histogram",basePlotModule:Th(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var bxe=Se((Wlr,xxe)=>{"use strict";xxe.exports=_xe()});var pD=Se((jlr,Txe)=>{"use strict";var Vy=fD(),wxe=iH(),dD=ET(),txt=zf(),lH=Gc().axisHoverFormat,rxt=Du().hovertemplateAttrs,ixt=Du().texttemplateAttrs,nxt=Xf(),w4=vu().extendFlat;Txe.exports=w4({x:Vy.x,y:Vy.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Vy.histnorm,histfunc:Vy.histfunc,nbinsx:Vy.nbinsx,xbins:wxe("x"),nbinsy:Vy.nbinsy,ybins:wxe("y"),autobinx:Vy.autobinx,autobiny:Vy.autobiny,bingroup:w4({},Vy.bingroup,{}),xbingroup:w4({},Vy.bingroup,{}),ybingroup:w4({},Vy.bingroup,{}),xgap:dD.xgap,ygap:dD.ygap,zsmooth:dD.zsmooth,xhoverformat:lH("x"),yhoverformat:lH("y"),zhoverformat:lH("z",1),hovertemplate:rxt({},{keys:"z"}),texttemplate:ixt({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:dD.textfont,showlegend:w4({},txt.showlegend,{dflt:!1})},nxt("",{cLetter:"z",autoColorDflt:!1}))});var uH=Se((Zlr,Sxe)=>{"use strict";var axt=Ul(),Axe=Zr();Sxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=Axe.minRowLength(a),u=Axe.minRowLength(o);if(!s||!u){r.visible=!1;return}r._length=Math.min(s,u);var l=axt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y"],i);var f=n("z")||n("marker.color");f&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Exe=Se((Xlr,Mxe)=>{"use strict";var oxt=Zr(),sxt=uH(),lxt=GV(),uxt=ed(),fxt=g4(),cxt=pD();Mxe.exports=function(t,r,n,i){function a(o,s){return oxt.coerce(t,r,cxt,o,s)}sxt(t,r,a,i),r.visible!==!1&&(lxt(t,r,a,i),uxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),fxt(a,i),a("xhoverformat"),a("yhoverformat"))}});var Lxe=Se((Ylr,Cxe)=>{"use strict";var hxt=uD(),kxe=hu().hoverLabelText;Cxe.exports=function(t,r,n,i,a){var o=hxt(t,r,n,i,a);if(o){t=o[0];var s=t.index,u=s[0],l=s[1],f=t.cd[0],c=f.trace,h=f.xRanges[l],d=f.yRanges[u];return t.xLabel=kxe(t.xa,[h[0],h[1]],c.xhoverformat),t.yLabel=kxe(t.ya,[d[0],d[1]],c.yhoverformat),o}}});var Pxe=Se((Klr,zxe)=>{"use strict";zxe.exports={attributes:pD(),supplyDefaults:Exe(),crossTraceDefaults:hD(),calc:iD(),plot:oD(),layerName:"heatmaplayer",colorbar:S_(),style:sD(),hoverPoints:Lxe(),eventData:sH(),moduleType:"trace",name:"histogram2d",basePlotModule:Th(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Dxe=Se((Jlr,Ixe)=>{"use strict";Ixe.exports=Pxe()});var vD=Se(($lr,Rxe)=>{"use strict";Rxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var T4=Se((Qlr,Oxe)=>{"use strict";var id=ET(),yD=Zc(),qxe=Gc(),fH=qxe.axisHoverFormat,dxt=qxe.descriptionOnlyNumbers,pxt=Xf(),vxt=Id().dash,yxt=uc(),PT=vu().extendFlat,Bxe=vD(),mxt=Bxe.COMPARISON_OPS2,gxt=Bxe.INTERVAL_OPS,Fxe=yD.line;Oxe.exports=PT({z:id.z,x:id.x,x0:id.x0,dx:id.dx,y:id.y,y0:id.y0,dy:id.dy,xperiod:id.xperiod,yperiod:id.yperiod,xperiod0:yD.xperiod0,yperiod0:yD.yperiod0,xperiodalignment:id.xperiodalignment,yperiodalignment:id.yperiodalignment,text:id.text,hovertext:id.hovertext,transpose:id.transpose,xtype:id.xtype,ytype:id.ytype,xhoverformat:fH("x"),yhoverformat:fH("y"),zhoverformat:fH("z",1),hovertemplate:id.hovertemplate,texttemplate:PT({},id.texttemplate,{}),textfont:PT({},id.textfont,{}),hoverongaps:id.hoverongaps,connectgaps:PT({},id.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:yxt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:dxt("contour label")},operation:{valType:"enumerated",values:[].concat(mxt).concat(gxt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:PT({},Fxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:vxt,smoothing:PT({},Fxe.smoothing,{}),editType:"plot"},zorder:yD.zorder},pxt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var hH=Se((eur,Uxe)=>{"use strict";var Hp=pD(),qg=T4(),_xt=Xf(),cH=Gc().axisHoverFormat,Nxe=vu().extendFlat;Uxe.exports=Nxe({x:Hp.x,y:Hp.y,z:Hp.z,marker:Hp.marker,histnorm:Hp.histnorm,histfunc:Hp.histfunc,nbinsx:Hp.nbinsx,xbins:Hp.xbins,nbinsy:Hp.nbinsy,ybins:Hp.ybins,autobinx:Hp.autobinx,autobiny:Hp.autobiny,bingroup:Hp.bingroup,xbingroup:Hp.xbingroup,ybingroup:Hp.ybingroup,autocontour:qg.autocontour,ncontours:qg.ncontours,contours:qg.contours,line:{color:qg.line.color,width:Nxe({},qg.line.width,{dflt:.5}),dash:qg.line.dash,smoothing:qg.line.smoothing,editType:"plot"},xhoverformat:cH("x"),yhoverformat:cH("y"),zhoverformat:cH("z",1),hovertemplate:Hp.hovertemplate,texttemplate:qg.texttemplate,textfont:qg.textfont},_xt("",{cLetter:"z",editTypeOverride:"calc"}))});var mD=Se((tur,Vxe)=>{"use strict";Vxe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,u=n("contours.size"),l;s?l=r.autocontour=!0:l=n("autocontour",!1),(l||!u)&&n("ncontours")}});var dH=Se((rur,Hxe)=>{"use strict";var xxt=Zr();Hxe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;xxt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var gD=Se((iur,Gxe)=>{"use strict";var bxt=ed(),wxt=dH();Gxe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,u="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(u=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,bxt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),wxt(n,i,u,a)}});var Xxe=Se((nur,Zxe)=>{"use strict";var Wxe=Zr(),Txt=uH(),Axt=mD(),Sxt=gD(),Mxt=g4(),jxe=hH();Zxe.exports=function(t,r,n,i){function a(s,u){return Wxe.coerce(t,r,jxe,s,u)}function o(s){return Wxe.coerce2(t,r,jxe,s)}Txt(t,r,a,i),r.visible!==!1&&(Axt(t,r,a,o),Sxt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),r.contours&&r.contours.coloring==="heatmap"&&Mxt(a,i))}});var yH=Se((aur,Kxe)=>{"use strict";var vH=hu(),pH=Zr();Kxe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=pH.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=pH.aggNums(Math.max,null,r));var o=Yxe(i,a,t.ncontours);n.size=o.dtick,n.start=vH.tickFirst(o),o.range.reverse(),n.end=vH.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={}),pH.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,u=n.end,l=t._input.contours;if(s>u&&(n.start=l.start=u,u=n.end=l.end=s,s=n.start),!(n.size>0)){var f;s===u?f=1:f=Yxe(s,u,t.ncontours).dtick,l.size=n.size=f}}};function Yxe(e,t,r){var n={type:"linear",range:[e,t]};return vH.autoTicks(n,(t-e)/(r||15)),n}});var A4=Se((our,Jxe)=>{"use strict";Jxe.exports=function(t){return t.end+t.size/1e6}});var mH=Se((sur,Qxe)=>{"use strict";var $xe=fc(),Ext=iD(),kxt=yH(),Cxt=A4();Qxe.exports=function(t,r){var n=Ext(t,r),i=n[0].z;kxt(r,i);var a=r.contours,o=$xe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var u=a.start,l=Cxt(a),f=a.size||1,c=Math.floor((l-u)/f)+1;isFinite(f)||(f=1,c=1);var h=u-f/2,d=h+c*f;s=[h,d]}else s=i;return $xe.calc(t,r,{vals:s,cLetter:"z"}),n}});var S4=Se((lur,ebe)=>{"use strict";ebe.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 gH=Se((uur,tbe)=>{"use strict";var _D=S4();tbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,u,l,f,c,h,d,p;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 _H=Se((fur,nbe)=>{"use strict";var xD=Zr(),IT=S4();nbe.exports=function(t,r,n){var i,a,o,s,u;for(r=r||.01,n=n||.01,o=0;o20?(o=IT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=IT.SADDLEREMAINDER[o]):delete e.crossings[a],s=IT.NEWDELTA[o],!s){xD.log("Found bad marching index:",o,t,e.level);break}u.push(ibe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),M4(u[u.length-1],u[u.length-2],n,i)&&u.pop();var p=s[0]&&(t[0]<0||t[0]>f-2)||s[1]&&(t[1]<0||t[1]>l-2),x=t[0]===c[0]&&t[1]===c[1]&&s[0]===h[0]&&s[1]===h[1];if(x||r&&p)break;o=e.crossings[a]}d===1e4&&xD.log("Infinite loop in contour?");var b=M4(u[0],u[u.length-1],n,i),y=0,k=.2*e.smoothing,E=[],A=0,L,_,C,M,v,z,T,F,q,U,H;for(d=1;d=A;d--)if(L=E[d],L=A&&L+E[_]F&&q--,e.edgepaths[q]=H.concat(u,U));break}W||(e.edgepaths[F]=u.concat(U))}for(F=0;F20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:IT.BOTTOMSTART.indexOf(e)!==-1?i=1:IT.LEFTSTART.indexOf(e)!==-1?n=1:IT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function ibe(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 u=(e.level-a)/(e.z[i][n+1]-a),l=(u!==1?(1-u)*o.c2l(e.x[n]):0)+(u!==0?u*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(l),!0),s.c2p(e.y[i],!0),n+u,i]}else{var f=(e.level-a)/(e.z[i+1][n]-a),c=(f!==1?(1-f)*s.c2l(e.y[i]):0)+(f!==0?f*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(c),!0),n,i+f]}}});var lbe=Se((cur,sbe)=>{"use strict";var xH=vD(),Ixt=_u();sbe.exports={"[]":abe("[]"),"][":abe("]["),">":bH(">"),"<":bH("<"),"=":bH("=")};function obe(e,t){var r=Array.isArray(t),n;function i(a){return Ixt(a)?+a:null}return xH.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):xH.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:xH.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function abe(e){return function(t){t=obe(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 bH(e){return function(t){return t=obe(e,t),{start:t,end:1/0,size:1/0}}}});var wH=Se((hur,fbe)=>{"use strict";var ube=Zr(),Dxt=lbe(),Rxt=A4();fbe.exports=function(t,r,n){for(var i=t.type==="constraint"?Dxt[t._operation](t.value):t,a=i.size,o=[],s=Rxt(i),u=n.trace._carpetTrace,l=u?{xaxis:u.aaxis,yaxis:u.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},f=i.start;f1e3){ube.warn("Too many contours, clipping at 1000",t);break}return o}});var TH=Se((dur,hbe)=>{"use strict";var DT=Zr();hbe.exports=function(e,t){var r,n,i,a=function(u){return u.reverse()},o=function(u){return u};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&DT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";dbe.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,u=r.y.length,l=-1/0,f=1/0;for(i=0;i":c>l&&(r.prefixBoundary=!0);break;case"<":(cl||r.starts.length&&d===f)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(c[0],c[1]),d=Math.max(c[0],c[1]),hl&&(r.prefixBoundary=!0);break}break}}});var bD=Se(Gp=>{"use strict";var k4=Nl(),Bd=Zr(),Bg=yu(),Fxt=fc(),ybe=Bf(),pbe=hu(),vbe=gm(),qxt=oD(),mbe=gH(),gbe=_H(),Bxt=wH(),Oxt=TH(),_be=AH(),E4=S4(),Im=E4.LABELOPTIMIZER;Gp.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Bd.makeTraceGroups(i,n,"contour").each(function(s){var u=k4.select(this),l=s[0],f=l.trace,c=l.x,h=l.y,d=f.contours,p=Bxt(d,r,l),x=Bd.ensureSingle(u,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),qxt(t,r,b,x),mbe(p),gbe(p);var y=a.c2p(c[0],!0),k=a.c2p(c[c.length-1],!0),E=o.c2p(h[0],!0),A=o.c2p(h[h.length-1],!0),L=[[y,A],[k,A],[k,E],[y,E]],_=p;d.type==="constraint"&&(_=Oxt(p,d._operation)),Nxt(u,L,d),Uxt(u,_,L,d),Vxt(u,p,t,l,d),Gxt(u,r,t,l,L)})};function Nxt(e,t,r){var n=Bd.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 Uxt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&_be(t,n);var o=Bd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(u){var l=(u.prefixBoundary?a:"")+xbe(u,r);l?k4.select(this).attr("d",l).style("stroke","none"):k4.select(this).remove()})}function xbe(e,t){var r="",n=0,i=e.edgepaths.map(function(y,k){return k}),a=!0,o,s,u,l,f,c;function h(y){return Math.abs(y[1]-t[0][1])<.01}function d(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function x(y){return Math.abs(y[0]-t[2][0])<.01}for(;i.length;){for(c=Bg.smoothopen(e.edgepaths[n],e.smoothing),r+=a?c:c.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],l=-1,u=0;u<4;u++){if(!o){Bd.log("Missing end?",n,e);break}for(h(o)&&!x(o)?s=t[1]:p(o)?s=t[0]:d(o)?s=t[3]:x(o)&&(s=t[2]),f=0;f=0&&(s=b,l=f):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,l=f):Bd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,l>=0)break;r+="L"+s}if(l===e.edgepaths.length){Bd.log("unclosed perimeter path");break}n=l,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;nIm.MAXCOST*2)break;h&&(s/=2),o=l-s/2,u=o+s*1.5}if(c<=Im.MAXCOST)return f};function Hxt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,u=e.theta,l=Math.cos(u)*i,f=Math.sin(u)*i,c=(o>n.center?n.right-o:o-n.left)/(l+Math.abs(Math.sin(u)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(f)+Math.cos(u)*a);if(c<1||h<1)return 1/0;var d=Im.EDGECOST*(1/(c-1)+1/(h-1));d+=Im.ANGLECOST*u*u;for(var p=o-l,x=s-f,b=o+l,y=s+f,k=0;k{"use strict";var jxt=Nl(),SH=fc(),Zxt=A4();bbe.exports=function(t){var r=t.contours,n=r.start,i=Zxt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,u=SH.extractOpts(t);isFinite(a)||(a=1,o=1);var l=u.reversescale?SH.flipScale(u.colorscale):u.colorscale,f=l.length,c=new Array(f),h=new Array(f),d,p,x=u.min,b=u.max;if(r.coloring==="heatmap"){for(p=0;p=b)&&(n<=x&&(n=x),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),p=0;px&&(c.unshift(x),h.unshift(h[0])),c[c.length-1]{"use strict";var wD=Nl(),wbe=yu(),Xxt=sD(),Yxt=MH();Tbe.exports=function(t){var r=wD.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=wD.select(this),a=n[0].trace,o=a.contours,s=a.line,u=o.size||1,l=o.start,f=o.type==="constraint",c=!f&&o.coloring==="lines",h=!f&&o.coloring==="fill",d=c||h?Yxt(a):null;i.selectAll("g.contourlevel").each(function(b){wD.select(this).selectAll("path").call(wbe.lineGroupStyle,s.width,c?d(b.level):s.color,s.dash)});var p=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){wbe.font(wD.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(c?d(b.level):s.color)})}),f)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var x;i.selectAll("g.contourfill path").style("fill",function(b){return x===void 0&&(x=b.level),d(b.level+.5*u)}),x===void 0&&(x=l),i.selectAll("g.contourbg path").style("fill",d(x-.5*u))}}),Xxt(t)}});var AD=Se((gur,Sbe)=>{"use strict";var Abe=fc(),Kxt=MH(),Jxt=A4();function $xt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=Kxt(t,{isColorbar:!0});if(o==="heatmap"){var u=Abe.extractOpts(t);r._fillgradient=u.reversescale?Abe.flipScale(u.colorscale):u.colorscale,r._zrange=[u.min,u.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:Jxt(n),size:a}}Sbe.exports={min:"zmin",max:"zmax",calc:$xt}});var EH=Se((_ur,Mbe)=>{"use strict";var SD=Pl(),Qxt=uD();Mbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=Qxt(t,r,n,i,a);return o&&o.forEach(function(s){var u=s.trace;u.contours.type==="constraint"&&(u.fillcolor&&SD.opacity(u.fillcolor)?s.color=SD.addOpacity(u.fillcolor,1):u.contours.showlines&&SD.opacity(u.line.color)&&(s.color=SD.addOpacity(u.line.color,1)))}),o}});var kbe=Se((xur,Ebe)=>{"use strict";Ebe.exports={attributes:hH(),supplyDefaults:Xxe(),crossTraceDefaults:hD(),calc:mH(),plot:bD().plot,layerName:"contourlayer",style:TD(),colorbar:AD(),hoverPoints:EH(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Th(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Lbe=Se((bur,Cbe)=>{"use strict";Cbe.exports=kbe()});var kH=Se((wur,Fbe)=>{"use strict";var zbe=_u(),ebt=dH(),Dbe=Pl(),Pbe=Dbe.addOpacity,tbt=Dbe.opacity,Rbe=vD(),Ibe=Zr().isArrayOrTypedArray,rbt=Rbe.CONSTRAINT_REDUCTION,ibt=Rbe.COMPARISON_OPS2;Fbe.exports=function(t,r,n,i,a,o){var s=r.contours,u,l,f,c=n("contours.operation");if(s._operation=rbt[c],nbt(n,s),c==="="?u=s.showlines=!0:(u=n("contours.showlines"),f=n("fillcolor",Pbe((t.line||{}).color||a,.5))),u){var h=f&&tbt(f)?Pbe(r.fillcolor,1):a;l=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),ebt(n,i,l,o)};function nbt(e,t){var r;ibt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Ibe(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])]:zbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),zbe(t.value)||(Ibe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Obe=Se((Tur,Bbe)=>{"use strict";var CH=Zr(),abt=ZI(),obt=zy(),sbt=kH(),lbt=mD(),ubt=gD(),fbt=g4(),qbe=T4();Bbe.exports=function(t,r,n,i){function a(l,f){return CH.coerce(t,r,qbe,l,f)}function o(l){return CH.coerce2(t,r,qbe,l)}var s=abt(t,r,a,i);if(!s){r.visible=!1;return}obt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate");var u=a("contours.type")==="constraint";a("connectgaps",CH.isArray1D(r.z)),u?sbt(t,r,a,i,n):(lbt(t,r,a,o),ubt(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&fbt(a,i),a("zorder")}});var Ube=Se((Aur,Nbe)=>{"use strict";Nbe.exports={attributes:T4(),supplyDefaults:Obe(),calc:mH(),plot:bD().plot,style:TD(),colorbar:AD(),hoverPoints:EH(),moduleType:"trace",name:"contour",basePlotModule:Th(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Hbe=Se((Sur,Vbe)=>{"use strict";Vbe.exports=Ube()});var LH=Se((Mur,Wbe)=>{"use strict";var cbt=Du().hovertemplateAttrs,hbt=Du().texttemplateAttrs,dbt=Ey(),a0=Zc(),pbt=zf(),Gbe=Xf(),vbt=Id().dash,M_=vu().extendFlat,W0=a0.marker,C4=a0.line,ybt=W0.line;Wbe.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:hbt({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:M_({},a0.hovertext,{}),line:{color:C4.color,width:C4.width,dash:vbt,backoff:C4.backoff,shape:M_({},C4.shape,{values:["linear","spline"]}),smoothing:C4.smoothing,editType:"calc"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:dbt(),marker:M_({symbol:W0.symbol,opacity:W0.opacity,angle:W0.angle,angleref:W0.angleref,standoff:W0.standoff,maxdisplayed:W0.maxdisplayed,size:W0.size,sizeref:W0.sizeref,sizemin:W0.sizemin,sizemode:W0.sizemode,line:M_({width:ybt.width,editType:"calc"},Gbe("marker.line")),gradient:W0.gradient,editType:"calc"},Gbe("marker")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},pbt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a0.hoveron,hovertemplate:cbt()}});var Ybe=Se((Eur,Xbe)=>{"use strict";var jbe=Zr(),mbt=Sm(),RT=ec(),gbt=$v(),_bt=I0(),Zbe=J3(),xbt=D0(),bbt=Py(),wbt=LH();Xbe.exports=function(t,r,n,i){function a(h,d){return jbe.coerce(t,r,wbt,h,d)}var o=a("a"),s=a("b"),u=a("c"),l;if(o?(l=o.length,s?(l=Math.min(l,s.length),u&&(l=Math.min(l,u.length))):u?l=Math.min(l,u.length):l=0):s&&u&&(l=Math.min(s.length,u.length)),!l){r.visible=!1;return}r._length=l,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&a("hovertemplate");var f=l{"use strict";var zH=hu();Kbe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zH.tickText(a.aaxis,t.a,!0).text,i.bLabel=zH.tickText(a.baxis,t.b,!0).text,i.cLabel=zH.tickText(a.caxis,t.c,!0).text,i}});var t2e=Se((Cur,e2e)=>{"use strict";var PH=_u(),Tbt=R0(),Abt=km(),Sbt=F0(),Mbt=q0().calcMarkerSize,$be=["a","b","c"],Qbe={a:["b","c"],b:["a","c"],c:["a","b"]};e2e.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,u,l,f,c,h,d;for(u=0;u<$be.length;u++)if(f=$be[u],!o[f]){for(h=o[Qbe[f][0]],d=o[Qbe[f][1]],c=new Array(h.length),l=0;l{"use strict";var Ebt=iT();r2e.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},u=r.layers.frontplot.select("g.scatterlayer"),l=0;l{"use strict";var kbt=sT();n2e.exports=function(t,r,n,i){var a=kbt(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,u=t.xa._length,l=u*s/2,f=u-l;return o.x0=Math.max(Math.min(o.x0,f),l),o.x1=Math.max(Math.min(o.x1,f),l),a}var c=o.cd[o.index],h=o.trace,d=o.subplot;o.a=c.a,o.b=c.b,o.c=c.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[h.subplot]={_subplot:d};var x=h._module.formatLabels(c,h,p);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var b=c.hi||h.hoverinfo,y=[];function k(A,L){y.push(A._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=y.join("
"),o.hovertemplate=h.hovertemplate,a}});var s2e=Se((Pur,o2e)=>{"use strict";o2e.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 g2e=Se((Iur,m2e)=>{"use strict";var d2e=Nl(),Cbt=cd(),IH=Ul(),Og=Zr(),Dm=Og.strTranslate,MD=Og._,qT=Pl(),ED=yu(),L4=gm(),DH=vu().extendFlat,Lbt=Sc(),E_=hu(),l2e=gp(),u2e=jc(),p2e=Sy(),f2e=p2e.freeMode,zbt=p2e.rectMode,RH=Mb(),Pbt=nh().prepSelect,Ibt=nh().selectOnClick,Dbt=nh().clearOutline,Rbt=nh().clearSelectionsCache,v2e=dd();function y2e(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=y2e;var Rm=y2e.prototype;Rm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Rm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aFT*l?(y=l,b=y*FT):(b=u,y=b/FT),k=o*b/u,E=s*y/l,p=t.l+t.w*i-b/2,x=t.t+t.h*(1-a)-y/2,r.x0=p,r.y0=x,r.w=b,r.h=y,r.sum=f,r.xaxis={type:"linear",range:[c+2*d-f,f-c-2*h],domain:[i-k/2,i+k/2],_id:"x"},L4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(U){return U.a>=r.aaxis.range[0]&&U.a<=r.aaxis.range[1]&&U.b>=r.baxis.range[1]&&U.b<=r.baxis.range[0]&&U.c>=r.caxis.range[1]&&U.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[c,f-h-d],domain:[a-E/2,a+E/2],_id:"y"},L4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var A=r.yaxis.domain[0],L=r.aaxis=DH({},e.aaxis,{range:[c,f-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+E*FT],anchor:"free",position:0,_id:"y",_length:b});L4(L,r.graphDiv._fullLayout),L.setScale();var _=r.baxis=DH({},e.baxis,{range:[f-c-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});L4(_,r.graphDiv._fullLayout),_.setScale();var C=r.caxis=DH({},e.caxis,{range:[f-c-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+E*FT],anchor:"free",position:0,_id:"y",_length:b});L4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+p+","+(x+y)+"h"+b+"l-"+b/2+",-"+y+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var v="M0,"+y+"h"+b+"l-"+b/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",v);var z=Dm(p,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",z),r.clipDefRelative.select("path").attr("transform",null);var T=Dm(p-_._offset,x+y);r.layers.baxis.attr("transform",T),r.layers.bgrid.attr("transform",T);var F=Dm(p+b/2,x)+"rotate(30)"+Dm(0,-L._offset);r.layers.aaxis.attr("transform",F),r.layers.agrid.attr("transform",F);var q=Dm(p+b/2,x)+"rotate(-30)"+Dm(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(x+y)+"l"+b/2+",-"+y:"M0,0").call(qT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",_.showline?"M"+p+","+(x+y)+"h"+b:"M0,0").call(qT.stroke,_.linecolor||"#000").style("stroke-width",(_.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(p+b/2)+","+x+"l"+b/2+","+y:"M0,0").call(qT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),ED.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Rm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(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 u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),l=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=RH.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:MD(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-u,"text-anchor":"middle"}}),i["b-title"]=RH.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:MD(r,"Click to enter Component B title"),attributes:{x:t.x0-l,y:t.y0+t.h+o.title.font.size*.83+l,"text-anchor":"middle"}}),i["c-title"]=RH.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:MD(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+l,y:t.y0+t.h+s.title.font.size*.83+l,"text-anchor":"middle"}})}};Rm.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,u=i+"tickLayout",l=Fbt(e);t[u]!==l&&(o.selectAll("."+a+"tick").remove(),t[u]=l),e.setScale();var f=E_.calcTicks(e),c=E_.clipEnds(e,f),h=E_.makeTransTickFn(e),d=E_.getTickSigns(e)[2],p=Og.deg2rad(s),x=d*(e.linewidth||1)/2,b=d*e.ticklen,y=t.w,k=t.h,E=i==="b"?"M0,"+x+"l"+Math.sin(p)*b+","+Math.cos(p)*b:"M"+x+",0l"+Math.cos(p)*b+","+-Math.sin(p)*b,A={a:"M0,0l"+k+",-"+y/2,b:"M0,0l-"+y/2+",-"+k,c:"M0,0l-"+k+","+y/2}[i];E_.drawTicks(r,e,{vals:e.ticks==="inside"?c:f,layer:o,path:E,transFn:h,crisp:!1}),E_.drawGrid(r,e,{vals:c,layer:t.layers[i+"grid"],path:A,transFn:h,crisp:!1}),E_.drawLabels(r,e,{vals:f,layer:o,transFn:h,labelFns:E_.makeLabelFns(e,0,s)})};function Fbt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var _d=v2e.MINZOOM/2+.87,qbt="m-0.87,.5h"+_d+"v3h-"+(_d+5.2)+"l"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l2.6,1.5l-"+_d/2+","+_d*.87+"Z",Bbt="m0.87,.5h-"+_d+"v3h"+(_d+5.2)+"l-"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l-2.6,1.5l"+_d/2+","+_d*.87+"Z",Obt="m0,1l"+_d/2+","+_d*.87+"l2.6,-1.5l-"+(_d/2+2.6)+",-"+(_d*.87+4.5)+"l-"+(_d/2+2.6)+","+(_d*.87+4.5)+"l2.6,1.5l"+_d/2+",-"+_d*.87+"Z",Nbt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",c2e=!0;Rm.clearOutline=function(){Rbt(this.dragOptions),Dbt(this.dragOptions.gd)};Rm.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,F,q){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var U=e.dragOptions.dragmode=r._fullLayout.dragmode;f2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U==="zoom"?(e.dragOptions.moveFn=_,e.dragOptions.clickFn=y,e.dragOptions.doneFn=C,k(T,F,q)):U==="pan"?(e.dragOptions.moveFn=v,e.dragOptions.clickFn=y,e.dragOptions.doneFn=z,M(),e.clearOutline(r)):(zbt(U)||f2e(U))&&Pbt(T,F,q,e.dragOptions,U)}};var o,s,u,l,f,c,h,d,p,x;function b(T){var F={};return F[e.id+".aaxis.min"]=T.a,F[e.id+".baxis.min"]=T.b,F[e.id+".caxis.min"]=T.c,F}function y(T,F){var q=r._fullLayout.clickmode;h2e(r),T===2&&(r.emit("plotly_doubleclick",null),IH.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&T===1&&Ibt(F,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&u2e.click(r,F,e.id)}function k(T,F,q){var U=t.getBoundingClientRect();o=F-U.left,s=q-U.top,r._fullLayout._calcInverseTransform(r);var H=r._fullLayout._invTransform,j=Og.apply3DTransform(H)(o,s);o=j[0],s=j[1],u={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=u,l=e.aaxis.range[1]-u.a,c=Cbt(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=n.append("path").attr("class","zoombox").attr("transform",Dm(e.x0,e.y0)).style({fill:c>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),x=n.append("path").attr("class","zoombox-corners").attr("transform",Dm(e.x0,e.y0)).style({fill:qT.background,stroke:qT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function E(T,F){return 1-F/e.h}function A(T,F){return 1-(T+(e.h-F)/Math.sqrt(3))/e.w}function L(T,F){return(T-(e.h-F)/Math.sqrt(3))/e.w}function _(T,F){var q=o+T*i,U=s+F*a,H=Math.max(0,Math.min(1,E(o,s),E(q,U))),j=Math.max(0,Math.min(1,A(o,s),A(q,U))),G=Math.max(0,Math.min(1,L(o,s),L(q,U))),O=(H/2+G)*e.w,W=(1-H/2-j)*e.w,re=(O+W)/2,ne=W-O,be=(1-H)*e.h,ze=be-ne/FT;ne.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(f))}function C(){h2e(r),f!==u&&(IH.call("_guiRelayout",r,b(f)),c2e&&r.data&&r._context.showTips&&(Og.notifier(MD(r,"Double-click to zoom back out"),"long"),c2e=!1))}function M(){u={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},f=u}function v(T,F){var q=T/e.xaxis._m,U=F/e.yaxis._m;f={a:u.a-U,b:u.b+(q+U)/2,c:u.c-(q-U)/2};var H=[f.a,f.b,f.c].sort(Og.sorterAsc),j={a:H.indexOf(f.a),b:H.indexOf(f.b),c:H.indexOf(f.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),f={a:H[j.a],b:H[j.b],c:H[j.c]},F=(u.a-f.a)*e.yaxis._m,T=(u.c-f.c-u.b+f.b)*e.xaxis._m);var G=Dm(e.x0+T,e.y0+F);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var O=Dm(-T,-F);e.clipDefRelative.select("path").attr("transform",O),e.aaxis.range=[f.a,e.sum-f.b-f.c],e.baxis.range=[e.sum-f.a-f.c,f.b],e.caxis.range=[e.sum-f.a-f.b,f.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(ED.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(f))}function z(){IH.call("_guiRelayout",r,b(f))}t.onmousemove=function(T){u2e.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||l2e.unhover(r,T)},l2e.init(this.dragOptions)};function h2e(e){d2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var BH=Se((Dur,_2e)=>{"use strict";var Ubt=Ih(),Vbt=Ec().attributes,Uf=Rd(),Hbt=_c().overrideAll,FH=vu().extendFlat,qH={title:{text:Uf.title.text,font:Uf.title.font},color:Uf.color,tickmode:Uf.minor.tickmode,nticks:FH({},Uf.nticks,{dflt:6,min:1}),tick0:Uf.tick0,dtick:Uf.dtick,tickvals:Uf.tickvals,ticktext:Uf.ticktext,ticks:Uf.ticks,ticklen:Uf.ticklen,tickwidth:Uf.tickwidth,tickcolor:Uf.tickcolor,ticklabelstep:Uf.ticklabelstep,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,showexponent:Uf.showexponent,exponentformat:Uf.exponentformat,minexponent:Uf.minexponent,separatethousands:Uf.separatethousands,tickfont:Uf.tickfont,tickangle:Uf.tickangle,tickformat:Uf.tickformat,tickformatstops:Uf.tickformatstops,hoverformat:Uf.hoverformat,showline:FH({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:FH({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash,layer:Uf.layer,min:{valType:"number",dflt:0,min:0}},kD=_2e.exports=Hbt({domain:Vbt({name:"ternary"}),bgcolor:{valType:"color",dflt:Ubt.background},sum:{valType:"number",dflt:1,min:0},aaxis:qH,baxis:qH,caxis:qH},"plot","from-root");kD.uirevision={valType:"any",editType:"none"};kD.aaxis.uirevision=kD.baxis.uirevision=kD.caxis.uirevision={valType:"any",editType:"none"}});var k_=Se((Rur,x2e)=>{"use strict";var Gbt=Zr(),Wbt=_f(),jbt=Ec().defaults;x2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,u=i.partition||"x",l=r._subplots[a],f=l.length,c=f&&l[0].replace(/\d+$/,""),h,d;function p(k,E){return Gbt.coerce(h,d,o,k,E)}for(var x=0;x{"use strict";var Zbt=Pl(),Xbt=_f(),CD=Zr(),Ybt=k_(),Kbt=e_(),Jbt=t_(),$bt=T3(),Qbt=xb(),e2t=Y5(),w2e=BH(),b2e=["aaxis","baxis","caxis"];T2e.exports=function(t,r,n){Ybt(t,r,n,{type:"ternary",attributes:w2e,handleDefaults:t2t,font:r.font,paper_bgcolor:r.paper_bgcolor})};function t2t(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=Zbt.combine(i,n.paper_bgcolor);for(var o,s,u,l=0;l=a&&(f.min=0,c.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function r2t(e,t,r,n){var i=w2e[t._name];function a(d,p){return CD.coerce(e,t,i,d,p)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,u=t._name,l=u.charAt(0).toUpperCase(),f="Component "+l,c=a("title.text",f);t._hovertitle=c===f?c:l,CD.coerceFont(a,"title.font",r.font,{overrideDflt:{size:CD.bigFont(r.font.size),color:s}}),a("min"),Qbt(e,t,a,"linear"),Jbt(e,t,a,"linear"),Kbt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),$bt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(CD.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),e2t(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var S2e=Se(j0=>{"use strict";var i2t=g2e(),n2t=Dd().getSubplotCalcData,a2t=Zr().counterRegex,BT="ternary";j0.name=BT;var o2t=j0.attr="subplot";j0.idRoot=BT;j0.idRegex=j0.attrRegex=a2t(BT);var s2t=j0.attributes={};s2t[o2t]={valType:"subplotid",dflt:"ternary",editType:"calc"};j0.layoutAttributes=BH();j0.supplyLayoutDefaults=A2e();j0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[BT],a=0;a{"use strict";M2e.exports={attributes:LH(),supplyDefaults:Ybe(),colorbar:ep(),formatLabels:Jbe(),calc:t2e(),plot:i2e(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:a2e(),selectPoints:lT(),eventData:s2e(),moduleType:"trace",name:"scatterternary",basePlotModule:S2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var C2e=Se((Our,k2e)=>{"use strict";k2e.exports=E2e()});var OH=Se((Nur,z2e)=>{"use strict";var nd=p4(),OT=vu().extendFlat,L2e=Gc().axisHoverFormat;z2e.exports={y:nd.y,x:nd.x,x0:nd.x0,y0:nd.y0,xhoverformat:L2e("x"),yhoverformat:L2e("y"),name:OT({},nd.name,{}),orientation:OT({},nd.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:nd.fillcolor,points:OT({},nd.boxpoints,{}),jitter:OT({},nd.jitter,{}),pointpos:OT({},nd.pointpos,{}),width:OT({},nd.width,{}),marker:nd.marker,text:nd.text,hovertext:nd.hovertext,hovertemplate:nd.hovertemplate,quartilemethod:nd.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:nd.offsetgroup,alignmentgroup:nd.alignmentgroup,selected:nd.selected,unselected:nd.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:nd.zorder}});var VH=Se((Uur,P2e)=>{"use strict";var NH=v4(),UH=Zr().extendFlat;P2e.exports={violinmode:UH({},NH.boxmode,{}),violingap:UH({},NH.boxgap,{}),violingroupgap:UH({},NH.boxgroupgap,{})}});var q2e=Se((Vur,F2e)=>{"use strict";var I2e=Zr(),l2t=Pl(),D2e=m4(),R2e=OH();F2e.exports=function(t,r,n,i){function a(L,_){return I2e.coerce(t,r,R2e,L,_)}function o(L,_){return I2e.coerce2(t,r,R2e,L,_)}if(D2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var u=a("span"),l;Array.isArray(u)&&(l="manual"),a("spanmode",l);var f=a("line.color",(t.marker||{}).color||n),c=a("line.width"),h=a("fillcolor",l2t.addOpacity(r.line.color,.5));D2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",h),x=o("box.line.color",f),b=o("box.line.width",c),y=a("box.visible",!!(d||p||x||b));y||(r.box={visible:!1});var k=o("meanline.color",f),E=o("meanline.width",c),A=a("meanline.visible",!!(k||E));A||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var O2e=Se((Hur,B2e)=>{"use strict";var u2t=Zr(),f2t=VH(),c2t=UI();B2e.exports=function(t,r,n){function i(a,o){return u2t.coerce(t,r,f2t,a,o)}c2t._supply(t,r,n,i,"violin")}});var LD=Se(o2=>{"use strict";var h2t=Zr(),d2t={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};o2.makeKDE=function(e,t,r){var n=r.length,i=d2t.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var u=0,l=0;l{"use strict";var HH=Zr(),GH=hu(),p2t=FV(),N2e=LD(),v2t=ju().BADNUM;U2e.exports=function(t,r){var n=p2t(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=GH.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,u=0,l=0,f=0;f{"use strict";var _2t=HI().setPositionOffset,H2e=["v","h"];G2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var WH=Nl(),jH=Zr(),x2t=yu(),ZH=GI(),b2t=bU(),w2t=LD();j2e.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,u=r.yaxis;function l(f,c){var h=b2t(f,{xaxis:s,yaxis:u,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return x2t.smoothopen(h[0],1)}jH.makeTraceGroups(i,n,"trace violins").each(function(f){var c=WH.select(this),h=f[0],d=h.t,p=h.trace;if(p.visible!==!0||d.empty){c.remove();return}var x=d.bPos,b=d.bdPos,y=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],E=p.side==="both",A=E||p.side==="positive",L=E||p.side==="negative",_=c.selectAll("path.violin").data(jH.identity);_.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(U){var H=WH.select(this),j=U.density,G=j.length,O=k.c2l(U.pos+x,!0),W=k.l2p(O),re;if(p.width)re=d.maxKDE/b;else{var ne=o._violinScaleGroupStats[p.scalegroup];re=p.scalemode==="count"?ne.maxKDE/b*(ne.maxCount/U.pts.length):ne.maxKDE/b}var be,ze,Ce,he,te,ke,Ee;if(A){for(ke=new Array(G),he=0;he{"use strict";var X2e=Nl(),NT=Pl(),T2t=ov().stylePoints;Y2e.exports=function(t){var r=X2e.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=X2e.select(this),o=i.box||{},s=o.line||{},u=i.meanline||{},l=u.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(NT.stroke,i.line.color).call(NT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(NT.stroke,s.color).call(NT.fill,o.fillcolor);var f={"stroke-width":l+"px","stroke-dasharray":2*l+"px,"+l+"px"};a.selectAll("path.mean").style(f).call(NT.stroke,u.color),a.selectAll("path.meanline").style(f).call(NT.stroke,u.color),T2t(a,i,t)})}});var ewe=Se((Yur,Q2e)=>{"use strict";var A2t=Pl(),XH=Zr(),S2t=hu(),J2e=UV(),$2e=LD();Q2e.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,u=s[0].trace,l=u.hoveron,f=l.indexOf("violins")!==-1,c=l.indexOf("kde")!==-1,h=[],d,p;if(f||c){var x=J2e.hoverOnBoxes(t,r,n,i);if(c&&x.length>0){var b=t.xa,y=t.ya,k,E,A,L,_;u.orientation==="h"?(_=r,k="y",A=y,E="x",L=b):(_=n,k="x",A=b,E="y",L=y);var C=s[t.index];if(_>=C.span[0]&&_<=C.span[1]){var M=XH.extendFlat({},t),v=L.c2p(_,!0),z=$2e.getKdeValue(C,u,_),T=$2e.getPositionOnKdePath(C,u,v),F=A._offset,q=A._length;M[k+"0"]=T[0],M[k+"1"]=T[1],M[E+"0"]=M[E+"1"]=v,M[E+"Label"]=E+": "+S2t.hoverLabelText(L,_,u[E+"hoverformat"])+", "+s[0].t.labels.kde+" "+z.toFixed(3);for(var U=0,H=0;H{"use strict";twe.exports={attributes:OH(),layoutAttributes:VH(),supplyDefaults:q2e(),crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:O2e(),calc:V2e(),crossTraceCalc:W2e(),plot:Z2e(),style:K2e(),styleOnSelect:ov().styleOnSelect,hoverPoints:ewe(),selectPoints:VV(),moduleType:"trace",name:"violin",basePlotModule:Th(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var nwe=Se((Jur,iwe)=>{"use strict";iwe.exports=rwe()});var owe=Se(($ur,awe)=>{"use strict";awe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var KH=Se((Qur,uwe)=>{"use strict";var Dc=Lm(),YH=Zc().line,M2t=zf(),swe=Gc().axisHoverFormat,E2t=Du().hovertemplateAttrs,k2t=Du().texttemplateAttrs,lwe=owe(),Ng=vu().extendFlat,C2t=Pl();uwe.exports={x:Dc.x,x0:Dc.x0,dx:Dc.dx,y:Dc.y,y0:Dc.y0,dy:Dc.dy,xperiod:Dc.xperiod,yperiod:Dc.yperiod,xperiod0:Dc.xperiod0,yperiod0:Dc.yperiod0,xperiodalignment:Dc.xperiodalignment,yperiodalignment:Dc.yperiodalignment,xhoverformat:swe("x"),yhoverformat:swe("y"),hovertext:Dc.hovertext,hovertemplate:E2t({},{keys:lwe.eventDataKeys}),hoverinfo:Ng({},M2t.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:k2t({editType:"plot"},{keys:lwe.eventDataKeys.concat(["label","value"])}),text:Dc.text,textposition:Dc.textposition,insidetextanchor:Ng({},Dc.insidetextanchor,{dflt:"middle"}),textangle:Ng({},Dc.textangle,{dflt:0}),textfont:Dc.textfont,insidetextfont:Dc.insidetextfont,outsidetextfont:Dc.outsidetextfont,constraintext:Dc.constraintext,cliponaxis:Dc.cliponaxis,orientation:Ng({},Dc.orientation,{}),offset:Ng({},Dc.offset,{arrayOk:!1}),width:Ng({},Dc.width,{arrayOk:!1}),marker:L2t(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ng({},YH.color,{dflt:C2t.defaultLine}),width:Ng({},YH.width,{dflt:0,editType:"plot"}),dash:YH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Dc.offsetgroup,alignmentgroup:Dc.alignmentgroup,zorder:Dc.zorder};function L2t(){var e=Ng({},Dc.marker);return delete e.pattern,delete e.cornerradius,e}});var JH=Se((efr,fwe)=>{"use strict";fwe.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 QH=Se((tfr,hwe)=>{"use strict";var zD=Zr(),z2t=Hb(),P2t=r0().handleText,I2t=K3(),D2t=zy(),cwe=KH(),$H=Pl();function R2t(e,t,r,n){function i(c,h){return zD.coerce(e,t,cwe,c,h)}var a=I2t(e,t,n,i);if(!a){t.visible=!1;return}D2t(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");var s=i("textposition");P2t(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",zD.isArrayOrTypedArray(o)?"text+value":"value");var u=i("marker.color",r);i("marker.line.color",$H.defaultLine),i("marker.line.width");var l=i("connector.visible");if(l){i("connector.fillcolor",F2t(u));var f=i("connector.line.width");f&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function F2t(e){var t=zD.isArrayOrTypedArray(e)?"#000":e;return $H.addOpacity(t,.5*$H.opacity(t))}function q2t(e,t){var r,n;function i(o){return zD.coerce(n._input,n,cwe,o)}for(var a=0;a{"use strict";var B2t=Zr(),O2t=JH();dwe.exports=function(e,t,r){var n=!1;function i(s,u){return B2t.coerce(e,t,O2t,s,u)}for(var a=0;a{"use strict";var UT=Zr();vwe.exports=function(t,r){for(var n=0;n{"use strict";var mwe=hu(),gwe=Iy(),N2t=ywe(),U2t=F0(),z4=ju().BADNUM;_we.exports=function(t,r){var n=mwe.getFromId(t,r.xaxis||"x"),i=mwe.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f,c,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),u=gwe(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),u=gwe(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;var d=Math.min(o.length,a.length),p=new Array(d);for(r._base=[],c=0;c{"use strict";var bwe=Gb().setGroupPositions;wwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,u=[],l=[],f=[],c,h;for(h=0;h{"use strict";var PD=Nl(),L_=Zr(),Awe=yu(),C_=ju().BADNUM,V2t=i2(),H2t=bp().clearMinTextSize;Mwe.exports=function(t,r,n,i){var a=t._fullLayout;H2t("funnel",a),G2t(t,r,n,i),W2t(t,r,n,i),V2t.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function G2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=PD.select(this),u=o[0].trace,l=L_.ensureSingle(s,"g","regions");if(!u.connector||!u.connector.visible){l.remove();return}var f=u.orientation==="h",c=l.selectAll("g.region").data(L_.identity);c.enter().append("g").classed("region",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var x=Swe(d,i,a,f),b=x[0],y=x[1],k="";b[0]!==C_&&y[0]!==C_&&b[1]!==C_&&y[1]!==C_&&b[2]!==C_&&y[2]!==C_&&b[3]!==C_&&y[3]!==C_&&(f?k+="M"+b[0]+","+y[1]+"L"+b[2]+","+y[2]+"H"+b[3]+"L"+b[1]+","+y[1]+"Z":k+="M"+b[1]+","+y[1]+"L"+b[2]+","+y[3]+"V"+y[2]+"L"+b[1]+","+y[0]+"Z"),k===""&&(k="M0,0Z"),L_.ensureSingle(PD.select(this),"path").attr("d",k).call(Awe.setClipUrl,t.layerClipId,e)}})})}function W2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=PD.select(this),u=o[0].trace,l=L_.ensureSingle(s,"g","lines");if(!u.connector||!u.connector.visible||!u.connector.line.width){l.remove();return}var f=u.orientation==="h",c=l.selectAll("g.line").data(L_.identity);c.enter().append("g").classed("line",!0),c.exit().remove();var h=c.size();c.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var x=Swe(d,i,a,f),b=x[0],y=x[1],k="";b[3]!==void 0&&y[3]!==void 0&&(f?(k+="M"+b[0]+","+y[1]+"L"+b[2]+","+y[2],k+="M"+b[1]+","+y[1]+"L"+b[3]+","+y[2]):(k+="M"+b[1]+","+y[1]+"L"+b[2]+","+y[3],k+="M"+b[1]+","+y[0]+"L"+b[2]+","+y[2])),k===""&&(k="M0,0Z"),L_.ensureSingle(PD.select(this),"path").attr("d",k).call(Awe.setClipUrl,t.layerClipId,e)}})})}function Swe(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 Lwe=Se((sfr,Cwe)=>{"use strict";var P4=Nl(),kwe=yu(),tG=Pl(),j2t=N1().DESELECTDIM,Z2t=N0(),X2t=bp().resizeText,Y2t=Z2t.styleTextPoints;function K2t(e,t,r){var n=r||P4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");X2t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=P4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var u=o.marker;P4.select(this).call(tG.fill,s.mc||u.color).call(tG.stroke,s.mlc||u.line.color).call(kwe.dashLine,u.line.dash,s.mlw||u.line.width).style("opacity",o.selectedpoints&&!s.selected?j2t:1)}}),Y2t(a,o,e),a.selectAll(".regions").each(function(){P4.select(this).selectAll("path").style("stroke-width",0).call(tG.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;kwe.lineGroupStyle(P4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}Cwe.exports={style:K2t}});var Iwe=Se((lfr,Pwe)=>{"use strict";var zwe=Pl().opacity,J2t=TT().hoverOnBars,rG=Zr().formatPercent;Pwe.exports=function(t,r,n,i,a){var o=J2t(t,r,n,i,a);if(o){var s=o.cd,u=s[0].trace,l=u.orientation==="h",f=o.index,c=s[f],h=l?"x":"y";o[h+"LabelVal"]=c.s,o.percentInitial=c.begR,o.percentInitialLabel=rG(c.begR,1),o.percentPrevious=c.difR,o.percentPreviousLabel=rG(c.difR,1),o.percentTotal=c.sumR,o.percentTotalLabel=rG(c.sumR,1);var d=c.hi||u.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var x=d==="all",b=d.split("+"),y=function(k){return x||b.indexOf(k)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=$2t(u,c),[o]}};function $2t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(zwe(n))return n;if(zwe(i)&&a)return i}});var Rwe=Se((ufr,Dwe)=>{"use strict";Dwe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var qwe=Se((ffr,Fwe)=>{"use strict";Fwe.exports={attributes:KH(),layoutAttributes:JH(),supplyDefaults:QH().supplyDefaults,crossTraceDefaults:QH().crossTraceDefaults,supplyLayoutDefaults:pwe(),calc:xwe(),crossTraceCalc:Twe(),plot:Ewe(),style:Lwe().style,hoverPoints:Iwe(),eventData:Rwe(),selectPoints:AT(),moduleType:"trace",name:"funnel",basePlotModule:Th(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Owe=Se((cfr,Bwe)=>{"use strict";Bwe.exports=qwe()});var Uwe=Se((hfr,Nwe)=>{"use strict";Nwe.exports={eventDataKeys:["initial","delta","final"]}});var aG=Se((dfr,Gwe)=>{"use strict";var wc=Lm(),iG=Zc().line,Q2t=zf(),Vwe=Gc().axisHoverFormat,ewt=Du().hovertemplateAttrs,twt=Du().texttemplateAttrs,Hwe=Uwe(),VT=vu().extendFlat,rwt=Pl();function nG(e){return{marker:{color:VT({},wc.marker.color,{arrayOk:!1,editType:"style"}),line:{color:VT({},wc.marker.line.color,{arrayOk:!1,editType:"style"}),width:VT({},wc.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Gwe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:wc.x,x0:wc.x0,dx:wc.dx,y:wc.y,y0:wc.y0,dy:wc.dy,xperiod:wc.xperiod,yperiod:wc.yperiod,xperiod0:wc.xperiod0,yperiod0:wc.yperiod0,xperiodalignment:wc.xperiodalignment,yperiodalignment:wc.yperiodalignment,xhoverformat:Vwe("x"),yhoverformat:Vwe("y"),hovertext:wc.hovertext,hovertemplate:ewt({},{keys:Hwe.eventDataKeys}),hoverinfo:VT({},Q2t.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:twt({editType:"plot"},{keys:Hwe.eventDataKeys.concat(["label"])}),text:wc.text,textposition:wc.textposition,insidetextanchor:wc.insidetextanchor,textangle:wc.textangle,textfont:wc.textfont,insidetextfont:wc.insidetextfont,outsidetextfont:wc.outsidetextfont,constraintext:wc.constraintext,cliponaxis:wc.cliponaxis,orientation:wc.orientation,offset:wc.offset,width:wc.width,increasing:nG("increasing"),decreasing:nG("decreasing"),totals:nG("intermediate sums and total"),connector:{line:{color:VT({},iG.color,{dflt:rwt.defaultLine}),width:VT({},iG.width,{editType:"plot"}),dash:iG.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:wc.offsetgroup,alignmentgroup:wc.alignmentgroup,zorder:wc.zorder}});var oG=Se((pfr,Wwe)=>{"use strict";Wwe.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 HT=Se((vfr,jwe)=>{"use strict";jwe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var lG=Se((yfr,Kwe)=>{"use strict";var Zwe=Zr(),iwt=Hb(),nwt=r0().handleText,awt=K3(),owt=zy(),Xwe=aG(),swt=Pl(),Ywe=HT(),lwt=Ywe.INCREASING.COLOR,uwt=Ywe.DECREASING.COLOR,fwt="#4499FF";function sG(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",swt.defaultLine),e(t+".marker.line.width")}function cwt(e,t,r,n){function i(l,f){return Zwe.coerce(e,t,Xwe,l,f)}var a=awt(e,t,n,i);if(!a){t.visible=!1;return}owt(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");var o=i("textposition");nwt(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),t.texttemplate||i("textinfo")),sG(i,"increasing",lwt),sG(i,"decreasing",uwt),sG(i,"totals",fwt);var s=i("connector.visible");if(s){i("connector.mode");var u=i("connector.line.width");u&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function hwt(e,t){var r,n;function i(o){return Zwe.coerce(n._input,n,Xwe,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var dwt=Zr(),pwt=oG();Jwe.exports=function(e,t,r){var n=!1;function i(s,u){return dwt.coerce(e,t,pwt,s,u)}for(var a=0;a{"use strict";var Qwe=hu(),e3e=Iy(),t3e=Zr().mergeArray,vwt=F0(),r3e=ju().BADNUM;function uG(e){return e==="a"||e==="absolute"}function fG(e){return e==="t"||e==="total"}i3e.exports=function(t,r){var n=Qwe.getFromId(t,r.xaxis||"x"),i=Qwe.getFromId(t,r.yaxis||"y"),a,o,s,u,l,f;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),u=e3e(r,i,"y",s),l=!!r.yperiodalignment,f="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),u=e3e(r,n,"x",s),l=!!r.xperiodalignment,f="x"),o=u.vals;for(var c=Math.min(o.length,a.length),h=new Array(c),d=0,p,x=!1,b=0;b{"use strict";var a3e=Gb().setGroupPositions;o3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,u=[],l=[],f=[],c,h;for(h=0;h{"use strict";var l3e=Nl(),ID=Zr(),ywt=yu(),GT=ju().BADNUM,mwt=i2(),gwt=bp().clearMinTextSize;u3e.exports=function(t,r,n,i){var a=t._fullLayout;gwt("waterfall",a),mwt.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),_wt(t,r,n,i)};function _wt(e,t,r,n){var i=t.xaxis,a=t.yaxis;ID.makeTraceGroups(n,r,"trace bars").each(function(o){var s=l3e.select(this),u=o[0].trace,l=ID.ensureSingle(s,"g","lines");if(!u.connector||!u.connector.visible){l.remove();return}var f=u.orientation==="h",c=u.connector.mode,h=l.selectAll("g.line").data(ID.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,x){if(!(x!==d-1&&!p.cNext)){var b=xwt(p,i,a,f),y=b[0],k=b[1],E="";y[0]!==GT&&k[0]!==GT&&y[1]!==GT&&k[1]!==GT&&(c==="spanning"&&!p.isSum&&x>0&&(f?E+="M"+y[0]+","+k[1]+"V"+k[0]:E+="M"+y[1]+","+k[0]+"H"+y[0]),c!=="between"&&(p.isSum||x{"use strict";var DD=Nl(),c3e=yu(),h3e=Pl(),bwt=N1().DESELECTDIM,wwt=N0(),Twt=bp().resizeText,Awt=wwt.styleTextPoints;function Swt(e,t,r){var n=r||DD.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");Twt(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=DD.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var u=o[s.dir].marker;DD.select(this).call(h3e.fill,u.color).call(h3e.stroke,u.line.color).call(c3e.dashLine,u.line.dash,u.line.width).style("opacity",o.selectedpoints&&!s.selected?bwt:1)}}),Awt(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;c3e.lineGroupStyle(DD.select(this).selectAll("path"),s.width,s.color,s.dash)})})}d3e.exports={style:Swt}});var _3e=Se((wfr,g3e)=>{"use strict";var Mwt=hu().hoverLabelText,v3e=Pl().opacity,Ewt=TT().hoverOnBars,y3e=HT(),m3e={increasing:y3e.INCREASING.SYMBOL,decreasing:y3e.DECREASING.SYMBOL};g3e.exports=function(t,r,n,i,a){var o=Ewt(t,r,n,i,a);if(!o)return;var s=o.cd,u=s[0].trace,l=u.orientation==="h",f=l?"x":"y",c=l?t.xa:t.ya;function h(_){return Mwt(c,_,u[f+"hoverformat"])}var d=o.index,p=s[d],x=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-x,o.delta=x,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=x<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var y=p.hi||u.hoverinfo,k=[];if(y&&y!=="none"&&y!=="skip"){var E=y==="all",A=y.split("+"),L=function(_){return E||A.indexOf(_)!==-1};p.isSum||(L("final")&&(l?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(x<0?k.push(o.deltaLabel+" "+m3e.decreasing):k.push(o.deltaLabel+" "+m3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("
")),o.color=kwt(u,p),[o]};function kwt(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(v3e(n))return n;if(v3e(i)&&a)return i}});var b3e=Se((Tfr,x3e)=>{"use strict";x3e.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 T3e=Se((Afr,w3e)=>{"use strict";w3e.exports={attributes:aG(),layoutAttributes:oG(),supplyDefaults:lG().supplyDefaults,crossTraceDefaults:lG().crossTraceDefaults,supplyLayoutDefaults:$we(),calc:n3e(),crossTraceCalc:s3e(),plot:f3e(),style:p3e().style,hoverPoints:_3e(),eventData:b3e(),selectPoints:AT(),moduleType:"trace",name:"waterfall",basePlotModule:Th(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var S3e=Se((Sfr,A3e)=>{"use strict";A3e.exports=T3e()});var WT=Se((Mfr,M3e)=>{"use strict";M3e.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 cG=Se((Efr,k3e)=>{"use strict";var Cwt=zf(),Lwt=Zc().zorder,zwt=Du().hovertemplateAttrs,E3e=vu().extendFlat,Pwt=WT().colormodel,D4=["rgb","rgba","rgba256","hsl","hsla"],Iwt=[],Dwt=[];for(jT=0;jT{"use strict";var Rwt=Zr(),Fwt=cG(),C3e=WT(),qwt=Lg().IMAGE_URL_PREFIX;L3e.exports=function(t,r){function n(o,s){return Rwt.coerce(t,r,Fwt,o,s)}n("source"),r.source&&!r.source.match(qwt)&&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=C3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=C3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),r._length=null,n("zorder")}});var Ug=Se((Cfr,hG)=>{typeof Object.create=="function"?hG.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hG.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 dG=Se((Lfr,P3e)=>{P3e.exports=pb().EventEmitter});var R3e=Se(RD=>{"use strict";RD.byteLength=Owt;RD.toByteArray=Uwt;RD.fromByteArray=Gwt;var Fm=[],Z0=[],Bwt=typeof Uint8Array!="undefined"?Uint8Array:Array,pG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s2=0,I3e=pG.length;s20)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 Owt(e){var t=D3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Nwt(e,t,r){return(t+r)*3/4-r}function Uwt(e){var t,r=D3e(e),n=r[0],i=r[1],a=new Bwt(Nwt(e,n,i)),o=0,s=i>0?n-4:n,u;for(u=0;u>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Z0[e.charCodeAt(u)]<<2|Z0[e.charCodeAt(u+1)]>>4,a[o++]=t&255),i===1&&(t=Z0[e.charCodeAt(u)]<<10|Z0[e.charCodeAt(u+1)]<<4|Z0[e.charCodeAt(u+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Vwt(e){return Fm[e>>18&63]+Fm[e>>12&63]+Fm[e>>6&63]+Fm[e&63]}function Hwt(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Fm[t>>2]+Fm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Fm[t>>10]+Fm[t>>4&63]+Fm[t<<2&63]+"=")),i.join("")}});var F3e=Se(vG=>{vG.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,u=(1<>1,f=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=a*256+e[t+c],c+=h,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=o*256+e[t+c],c+=h,f-=8);if(a===0)a=1-l;else{if(a===u)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(d?-1:1)*o*Math.pow(2,a-n)};vG.write=function(e,t,r,n,i,a){var o,s,u,l=a*8-i-1,f=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,x=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+c>=1?t+=h/u:t+=h*Math.pow(2,1-c),t*u>=2&&(o++,u/=2),o+c>=f?(s=0,o=f):o+c>=1?(s=(t*u-1)*Math.pow(2,i),o=o+c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=o&255,d+=p,o/=256,l-=8);e[r+d-p]|=x*128}});var u2=Se(KT=>{"use strict";var yG=R3e(),XT=F3e(),q3e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;KT.Buffer=Ns;KT.SlowBuffer=Kwt;KT.INSPECT_MAX_BYTES=50;var FD=2147483647;KT.kMaxLength=FD;Ns.TYPED_ARRAY_SUPPORT=Wwt();!Ns.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 Wwt(){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(Ns.prototype,"parent",{enumerable:!0,get:function(){if(Ns.isBuffer(this))return this.buffer}});Object.defineProperty(Ns.prototype,"offset",{enumerable:!0,get:function(){if(Ns.isBuffer(this))return this.byteOffset}});function Vg(e){if(e>FD)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Ns.prototype),t}function Ns(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 xG(e)}return U3e(e,t,r)}Ns.poolSize=8192;function U3e(e,t,r){if(typeof e=="string")return Zwt(e,t);if(ArrayBuffer.isView(e))return Xwt(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 gG(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 Ns.from(n,t,r);let i=Ywt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ns.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)}Ns.from=function(e,t,r){return U3e(e,t,r)};Object.setPrototypeOf(Ns.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ns,Uint8Array);function V3e(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 jwt(e,t,r){return V3e(e),e<=0?Vg(e):t!==void 0?typeof r=="string"?Vg(e).fill(t,r):Vg(e).fill(t):Vg(e)}Ns.alloc=function(e,t,r){return jwt(e,t,r)};function xG(e){return V3e(e),Vg(e<0?0:bG(e)|0)}Ns.allocUnsafe=function(e){return xG(e)};Ns.allocUnsafeSlow=function(e){return xG(e)};function Zwt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Ns.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=H3e(e,t)|0,n=Vg(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function mG(e){let t=e.length<0?0:bG(e.length)|0,r=Vg(t);for(let n=0;n=FD)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+FD.toString(16)+" bytes");return e|0}function Kwt(e){return+e!=e&&(e=0),Ns.alloc(+e)}Ns.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Ns.prototype};Ns.compare=function(t,r){if(qm(t,Uint8Array)&&(t=Ns.from(t,t.offset,t.byteLength)),qm(r,Uint8Array)&&(r=Ns.from(r,r.offset,r.byteLength)),!Ns.isBuffer(t)||!Ns.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?(Ns.isBuffer(o)||(o=Ns.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(Ns.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function H3e(e,t){if(Ns.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 _G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return $3e(e).length;default:if(i)return n?-1:_G(e).length;t=(""+t).toLowerCase(),i=!0}}Ns.byteLength=H3e;function Jwt(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 s3t(this,t,r);case"utf8":case"utf-8":return W3e(this,t,r);case"ascii":return a3t(this,t,r);case"latin1":case"binary":return o3t(this,t,r);case"base64":return i3t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l3t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Ns.prototype._isBuffer=!0;function l2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Ns.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+=" ... "),""};q3e&&(Ns.prototype[q3e]=Ns.prototype.inspect);Ns.prototype.compare=function(t,r,n,i,a){if(qm(t,Uint8Array)&&(t=Ns.from(t,t.offset,t.byteLength)),!Ns.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,u=Math.min(o,s),l=this.slice(i,a),f=t.slice(r,n);for(let c=0;c2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,TG(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=Ns.from(t,n)),Ns.isBuffer(t))return t.length===0?-1:B3e(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):B3e(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function B3e(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 u(f,c){return a===1?f[c]:f.readUInt16BE(c*a)}let l;if(i){let f=-1;for(l=r;lo&&(r=o-s),l=r;l>=0;l--){let f=!0;for(let c=0;ci&&(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 $wt(this,t,r,n);case"utf8":case"utf-8":return Qwt(this,t,r,n);case"ascii":case"latin1":case"binary":return e3t(this,t,r,n);case"base64":return t3t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r3t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};Ns.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function i3t(e,t,r){return t===0&&r===e.length?yG.fromByteArray(e):yG.fromByteArray(e.slice(t,r))}function W3e(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 u,l,f,c;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],(u&192)===128&&(c=(a&31)<<6|u&63,c>127&&(o=c));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(c=(a&15)<<12|(u&63)<<6|l&63,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:u=e[i+1],l=e[i+2],f=e[i+3],(u&192)===128&&(l&192)===128&&(f&192)===128&&(c=(a&15)<<18|(u&63)<<12|(l&63)<<6|f&63,c>65535&&c<1114112&&(o=c))}}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 n3t(n)}var O3e=4096;function n3t(e){let t=e.length;if(t<=O3e)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")}Ns.prototype.readUintLE=Ns.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||rp(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};Ns.prototype.readUint8=Ns.prototype.readUInt8=function(t,r){return t=t>>>0,r||rp(t,1,this.length),this[t]};Ns.prototype.readUint16LE=Ns.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||rp(t,2,this.length),this[t]|this[t+1]<<8};Ns.prototype.readUint16BE=Ns.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||rp(t,2,this.length),this[t]<<8|this[t+1]};Ns.prototype.readUint32LE=Ns.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Ns.prototype.readUint32BE=Ns.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Ns.prototype.readBigUInt64LE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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||rp(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};Ns.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||rp(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};Ns.prototype.readInt8=function(t,r){return t=t>>>0,r||rp(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Ns.prototype.readInt16LE=function(t,r){t=t>>>0,r||rp(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Ns.prototype.readInt16BE=function(t,r){t=t>>>0,r||rp(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Ns.prototype.readInt32LE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Ns.prototype.readInt32BE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Ns.prototype.readBigInt64LE=z_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&R4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||rp(t,4,this.length),XT.read(this,t,!0,23,4)};Ns.prototype.readFloatBE=function(t,r){return t=t>>>0,r||rp(t,4,this.length),XT.read(this,t,!1,23,4)};Ns.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||rp(t,8,this.length),XT.read(this,t,!0,52,8)};Ns.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||rp(t,8,this.length),XT.read(this,t,!1,52,8)};function Iv(e,t,r,n,i,a){if(!Ns.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}Ns.prototype.writeUintLE=Ns.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;Iv(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;Iv(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};Ns.prototype.writeUint8=Ns.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,1,255,0),this[r]=t&255,r+1};Ns.prototype.writeUint16LE=Ns.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Ns.prototype.writeUint16BE=Ns.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Ns.prototype.writeUint32LE=Ns.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeUint32BE=Ns.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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 j3e(e,t,r,n,i){J3e(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 Z3e(e,t,r,n,i){J3e(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}Ns.prototype.writeBigUInt64LE=z_(function(t,r=0){return j3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ns.prototype.writeBigUInt64BE=z_(function(t,r=0){return Z3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ns.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Iv(this,t,r,n,u-1,-u)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+n};Ns.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let u=Math.pow(2,8*n-1);Iv(this,t,r,n,u-1,-u)}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};Ns.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Ns.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Ns.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Ns.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Iv(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};Ns.prototype.writeBigInt64LE=z_(function(t,r=0){return j3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ns.prototype.writeBigInt64BE=z_(function(t,r=0){return Z3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X3e(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 Y3e(e,t,r,n,i){return t=+t,r=r>>>0,i||X3e(e,t,r,4,34028234663852886e22,-34028234663852886e22),XT.write(e,t,r,n,23,4),r+4}Ns.prototype.writeFloatLE=function(t,r,n){return Y3e(this,t,r,!0,n)};Ns.prototype.writeFloatBE=function(t,r,n){return Y3e(this,t,r,!1,n)};function K3e(e,t,r,n,i){return t=+t,r=r>>>0,i||X3e(e,t,r,8,17976931348623157e292,-17976931348623157e292),XT.write(e,t,r,n,52,8),r+8}Ns.prototype.writeDoubleLE=function(t,r,n){return K3e(this,t,r,!0,n)};Ns.prototype.writeDoubleBE=function(t,r,n){return K3e(this,t,r,!1,n)};Ns.prototype.copy=function(t,r,n,i){if(!Ns.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=N3e(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=N3e(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function N3e(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 u3t(e,t,r){YT(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&R4(t,e.length-(r+1))}function J3e(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 ZT.ERR_OUT_OF_RANGE("value",s,e)}u3t(n,i,a)}function YT(e,t){if(typeof e!="number")throw new ZT.ERR_INVALID_ARG_TYPE(t,"number",e)}function R4(e,t,r){throw Math.floor(e)!==e?(YT(e,r),new ZT.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ZT.ERR_BUFFER_OUT_OF_BOUNDS:new ZT.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var f3t=/[^+/0-9A-Za-z-_]/g;function c3t(e){if(e=e.split("=")[0],e=e.trim().replace(f3t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function _G(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 h3t(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function $3e(e){return yG.toByteArray(c3t(e))}function qD(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 TG(e){return e!==e}var p3t=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 z_(e){return typeof BigInt=="undefined"?v3t:e}function v3t(){throw new Error("BigInt not supported")}});var BD=Se((Rfr,Q3e)=>{"use strict";Q3e.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(r 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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var F4=Se((Ffr,eTe)=>{"use strict";var y3t=BD();eTe.exports=function(){return y3t()&&!!Symbol.toStringTag}});var rTe=Se((qfr,tTe)=>{"use strict";tTe.exports=Error});var nTe=Se((Bfr,iTe)=>{"use strict";iTe.exports=EvalError});var oTe=Se((Ofr,aTe)=>{"use strict";aTe.exports=RangeError});var lTe=Se((Nfr,sTe)=>{"use strict";sTe.exports=ReferenceError});var AG=Se((Ufr,uTe)=>{"use strict";uTe.exports=SyntaxError});var q4=Se((Vfr,fTe)=>{"use strict";fTe.exports=TypeError});var hTe=Se((Hfr,cTe)=>{"use strict";cTe.exports=URIError});var vTe=Se((Gfr,pTe)=>{"use strict";var dTe=typeof Symbol!="undefined"&&Symbol,m3t=BD();pTe.exports=function(){return typeof dTe!="function"||typeof Symbol!="function"||typeof dTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:m3t()}});var gTe=Se((Wfr,mTe)=>{"use strict";var yTe={foo:{}},g3t=Object;mTe.exports=function(){return{__proto__:yTe}.foo===yTe.foo&&!({__proto__:null}instanceof g3t)}});var bTe=Se((jfr,xTe)=>{"use strict";var _3t="Function.prototype.bind called on incompatible ",x3t=Object.prototype.toString,b3t=Math.max,w3t="[object Function]",_Te=function(t,r){for(var n=[],i=0;i{"use strict";var S3t=bTe();wTe.exports=Function.prototype.bind||S3t});var ATe=Se((Xfr,TTe)=>{"use strict";var M3t=Function.prototype.call,E3t=Object.prototype.hasOwnProperty,k3t=OD();TTe.exports=k3t.call(M3t,E3t)});var tA=Se((Yfr,CTe)=>{"use strict";var Wf,C3t=rTe(),L3t=nTe(),z3t=oTe(),P3t=lTe(),eA=AG(),QT=q4(),I3t=hTe(),kTe=Function,SG=function(e){try{return kTe('"use strict"; return ('+e+").constructor;")()}catch(t){}},f2=Object.getOwnPropertyDescriptor;if(f2)try{f2({},"")}catch(e){f2=null}var MG=function(){throw new QT},D3t=f2?function(){try{return arguments.callee,MG}catch(e){try{return f2(arguments,"callee").get}catch(t){return MG}}}():MG,JT=vTe()(),R3t=gTe()(),ip=Object.getPrototypeOf||(R3t?function(e){return e.__proto__}:null),$T={},F3t=typeof Uint8Array=="undefined"||!ip?Wf:ip(Uint8Array),c2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Wf:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Wf:ArrayBuffer,"%ArrayIteratorPrototype%":JT&&ip?ip([][Symbol.iterator]()):Wf,"%AsyncFromSyncIteratorPrototype%":Wf,"%AsyncFunction%":$T,"%AsyncGenerator%":$T,"%AsyncGeneratorFunction%":$T,"%AsyncIteratorPrototype%":$T,"%Atomics%":typeof Atomics=="undefined"?Wf:Atomics,"%BigInt%":typeof BigInt=="undefined"?Wf:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Wf:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Wf:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Wf:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C3t,"%eval%":eval,"%EvalError%":L3t,"%Float32Array%":typeof Float32Array=="undefined"?Wf:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Wf:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Wf:FinalizationRegistry,"%Function%":kTe,"%GeneratorFunction%":$T,"%Int8Array%":typeof Int8Array=="undefined"?Wf:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Wf:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Wf:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":JT&&ip?ip(ip([][Symbol.iterator]())):Wf,"%JSON%":typeof JSON=="object"?JSON:Wf,"%Map%":typeof Map=="undefined"?Wf:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!JT||!ip?Wf:ip(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Wf:Promise,"%Proxy%":typeof Proxy=="undefined"?Wf:Proxy,"%RangeError%":z3t,"%ReferenceError%":P3t,"%Reflect%":typeof Reflect=="undefined"?Wf:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Wf:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!JT||!ip?Wf:ip(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Wf:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":JT&&ip?ip(""[Symbol.iterator]()):Wf,"%Symbol%":JT?Symbol:Wf,"%SyntaxError%":eA,"%ThrowTypeError%":D3t,"%TypedArray%":F3t,"%TypeError%":QT,"%Uint8Array%":typeof Uint8Array=="undefined"?Wf:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Wf:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Wf:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Wf:Uint32Array,"%URIError%":I3t,"%WeakMap%":typeof WeakMap=="undefined"?Wf:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Wf:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Wf:WeakSet};if(ip)try{null.error}catch(e){STe=ip(ip(e)),c2["%Error.prototype%"]=STe}var STe,q3t=function e(t){var r;if(t==="%AsyncFunction%")r=SG("async function () {}");else if(t==="%GeneratorFunction%")r=SG("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=SG("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ip&&(r=ip(i.prototype))}return c2[t]=r,r},MTe={__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"]},B4=OD(),ND=ATe(),B3t=B4.call(Function.call,Array.prototype.concat),O3t=B4.call(Function.apply,Array.prototype.splice),ETe=B4.call(Function.call,String.prototype.replace),UD=B4.call(Function.call,String.prototype.slice),N3t=B4.call(Function.call,RegExp.prototype.exec),U3t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V3t=/\\(\\)?/g,H3t=function(t){var r=UD(t,0,1),n=UD(t,-1);if(r==="%"&&n!=="%")throw new eA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new eA("invalid intrinsic syntax, expected opening `%`");var i=[];return ETe(t,U3t,function(a,o,s,u){i[i.length]=s?ETe(u,V3t,"$1"):o||a}),i},G3t=function(t,r){var n=t,i;if(ND(MTe,n)&&(i=MTe[n],n="%"+i[0]+"%"),ND(c2,n)){var a=c2[n];if(a===$T&&(a=q3t(n)),typeof a=="undefined"&&!r)throw new QT("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new eA("intrinsic "+t+" does not exist!")};CTe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new QT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new QT('"allowMissing" argument must be a boolean');if(N3t(/^%?[^%]*%?$/,t)===null)throw new eA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=H3t(t),i=n.length>0?n[0]:"",a=G3t("%"+i+"%",r),o=a.name,s=a.value,u=!1,l=a.alias;l&&(i=l[0],O3t(n,B3t([0,1],l)));for(var f=1,c=!0;f=n.length){var x=f2(s,h);c=!!x,c&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[h]}else c=ND(s,h),s=s[h];c&&!u&&(c2[o]=s)}}return s}});var HD=Se((Kfr,LTe)=>{"use strict";var W3t=tA(),VD=W3t("%Object.defineProperty%",!0)||!1;if(VD)try{VD({},"a",{value:1})}catch(e){VD=!1}LTe.exports=VD});var O4=Se((Jfr,zTe)=>{"use strict";var j3t=tA(),GD=j3t("%Object.getOwnPropertyDescriptor%",!0);if(GD)try{GD([],"length")}catch(e){GD=null}zTe.exports=GD});var RTe=Se(($fr,DTe)=>{"use strict";var PTe=HD(),Z3t=AG(),rA=q4(),ITe=O4();DTe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new rA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new rA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new rA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new rA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new rA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new rA("`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,u=!!ITe&&ITe(t,r);if(PTe)PTe(t,r,{configurable:o===null&&u?u.configurable:!o,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:a===null&&u?u.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new Z3t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var kG=Se((Qfr,qTe)=>{"use strict";var EG=HD(),FTe=function(){return!!EG};FTe.hasArrayLengthDefineBug=function(){if(!EG)return null;try{return EG([],"length",{value:1}).length!==1}catch(t){return!0}};qTe.exports=FTe});var VTe=Se((ecr,UTe)=>{"use strict";var X3t=tA(),BTe=RTe(),Y3t=kG()(),OTe=O4(),NTe=q4(),K3t=X3t("%Math.floor%");UTe.exports=function(t,r){if(typeof t!="function")throw new NTe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||K3t(r)!==r)throw new NTe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&OTe){var o=OTe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(Y3t?BTe(t,"length",r,!0,!0):BTe(t,"length",r)),t}});var N4=Se((tcr,WD)=>{"use strict";var CG=OD(),jD=tA(),J3t=VTe(),$3t=q4(),WTe=jD("%Function.prototype.apply%"),jTe=jD("%Function.prototype.call%"),ZTe=jD("%Reflect.apply%",!0)||CG.call(jTe,WTe),HTe=HD(),Q3t=jD("%Math.max%");WD.exports=function(t){if(typeof t!="function")throw new $3t("a function is required");var r=ZTe(CG,jTe,arguments);return J3t(r,1+Q3t(0,t.length-(arguments.length-1)),!0)};var GTe=function(){return ZTe(CG,WTe,arguments)};HTe?HTe(WD.exports,"apply",{value:GTe}):WD.exports.apply=GTe});var iA=Se((rcr,KTe)=>{"use strict";var XTe=tA(),YTe=N4(),eTt=YTe(XTe("String.prototype.indexOf"));KTe.exports=function(t,r){var n=XTe(t,!!r);return typeof n=="function"&&eTt(t,".prototype.")>-1?YTe(n):n}});var QTe=Se((icr,$Te)=>{"use strict";var tTt=F4()(),rTt=iA(),LG=rTt("Object.prototype.toString"),ZD=function(t){return tTt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:LG(t)==="[object Arguments]"},JTe=function(t){return ZD(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&LG(t)!=="[object Array]"&&LG(t.callee)==="[object Function]"},iTt=function(){return ZD(arguments)}();ZD.isLegacyArguments=JTe;$Te.exports=iTt?ZD:JTe});var rAe=Se((ncr,tAe)=>{"use strict";var nTt=Object.prototype.toString,aTt=Function.prototype.toString,oTt=/^\s*(?:function)?\*/,eAe=F4()(),zG=Object.getPrototypeOf,sTt=function(){if(!eAe)return!1;try{return Function("return function*() {}")()}catch(e){}},PG;tAe.exports=function(t){if(typeof t!="function")return!1;if(oTt.test(aTt.call(t)))return!0;if(!eAe){var r=nTt.call(t);return r==="[object GeneratorFunction]"}if(!zG)return!1;if(typeof PG=="undefined"){var n=sTt();PG=n?zG(n):!1}return zG(t)===PG}});var oAe=Se((acr,aAe)=>{"use strict";var nAe=Function.prototype.toString,nA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,DG,XD;if(typeof nA=="function"&&typeof Object.defineProperty=="function")try{DG=Object.defineProperty({},"length",{get:function(){throw XD}}),XD={},nA(function(){throw 42},null,DG)}catch(e){e!==XD&&(nA=null)}else nA=null;var lTt=/^\s*class\b/,RG=function(t){try{var r=nAe.call(t);return lTt.test(r)}catch(n){return!1}},IG=function(t){try{return RG(t)?!1:(nAe.call(t),!0)}catch(r){return!1}},YD=Object.prototype.toString,uTt="[object Object]",fTt="[object Function]",cTt="[object GeneratorFunction]",hTt="[object HTMLAllCollection]",dTt="[object HTML document.all class]",pTt="[object HTMLCollection]",vTt=typeof Symbol=="function"&&!!Symbol.toStringTag,yTt=!(0 in[,]),FG=function(){return!1};typeof document=="object"&&(iAe=document.all,YD.call(iAe)===YD.call(document.all)&&(FG=function(t){if((yTt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=YD.call(t);return(r===hTt||r===dTt||r===pTt||r===uTt)&&t("")==null}catch(n){}return!1}));var iAe;aAe.exports=nA?function(t){if(FG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{nA(t,null,DG)}catch(r){if(r!==XD)return!1}return!RG(t)&&IG(t)}:function(t){if(FG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(vTt)return IG(t);if(RG(t))return!1;var r=YD.call(t);return r!==fTt&&r!==cTt&&!/^\[object HTML/.test(r)?!1:IG(t)}});var qG=Se((ocr,lAe)=>{"use strict";var mTt=oAe(),gTt=Object.prototype.toString,sAe=Object.prototype.hasOwnProperty,_Tt=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),gTt.call(t)==="[object Array]"?_Tt(t,r,i):typeof t=="string"?xTt(t,r,i):bTt(t,r,i)};lAe.exports=wTt});var OG=Se((scr,uAe)=>{"use strict";var BG=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],TTt=typeof globalThis=="undefined"?window:globalThis;uAe.exports=function(){for(var t=[],r=0;r{"use strict";var JD=qG(),ATt=OG(),fAe=N4(),VG=iA(),KD=O4(),STt=VG("Object.prototype.toString"),hAe=F4()(),cAe=typeof globalThis=="undefined"?window:globalThis,UG=ATt(),HG=VG("String.prototype.slice"),NG=Object.getPrototypeOf,MTt=VG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:kTt(t)}return KD?ETt(t):null}});var xAe=Se((ucr,_Ae)=>{"use strict";var vAe=qG(),CTt=OG(),WG=iA(),LTt=WG("Object.prototype.toString"),yAe=F4()(),QD=O4(),zTt=typeof globalThis=="undefined"?window:globalThis,mAe=CTt(),PTt=WG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return QD?DTt(t):!1}});var XG=Se(Vf=>{"use strict";var RTt=QTe(),FTt=rAe(),Hy=pAe(),bAe=xAe();function aA(e){return e.call.bind(e)}var wAe=typeof BigInt!="undefined",TAe=typeof Symbol!="undefined",X0=aA(Object.prototype.toString),qTt=aA(Number.prototype.valueOf),BTt=aA(String.prototype.valueOf),OTt=aA(Boolean.prototype.valueOf);wAe&&(AAe=aA(BigInt.prototype.valueOf));var AAe;TAe&&(SAe=aA(Symbol.prototype.valueOf));var SAe;function V4(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Vf.isArgumentsObject=RTt;Vf.isGeneratorFunction=FTt;Vf.isTypedArray=bAe;function NTt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Vf.isPromise=NTt;function UTt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):bAe(e)||EAe(e)}Vf.isArrayBufferView=UTt;function VTt(e){return Hy(e)==="Uint8Array"}Vf.isUint8Array=VTt;function HTt(e){return Hy(e)==="Uint8ClampedArray"}Vf.isUint8ClampedArray=HTt;function GTt(e){return Hy(e)==="Uint16Array"}Vf.isUint16Array=GTt;function WTt(e){return Hy(e)==="Uint32Array"}Vf.isUint32Array=WTt;function jTt(e){return Hy(e)==="Int8Array"}Vf.isInt8Array=jTt;function ZTt(e){return Hy(e)==="Int16Array"}Vf.isInt16Array=ZTt;function XTt(e){return Hy(e)==="Int32Array"}Vf.isInt32Array=XTt;function YTt(e){return Hy(e)==="Float32Array"}Vf.isFloat32Array=YTt;function KTt(e){return Hy(e)==="Float64Array"}Vf.isFloat64Array=KTt;function JTt(e){return Hy(e)==="BigInt64Array"}Vf.isBigInt64Array=JTt;function $Tt(e){return Hy(e)==="BigUint64Array"}Vf.isBigUint64Array=$Tt;function e6(e){return X0(e)==="[object Map]"}e6.working=typeof Map!="undefined"&&e6(new Map);function QTt(e){return typeof Map=="undefined"?!1:e6.working?e6(e):e instanceof Map}Vf.isMap=QTt;function t6(e){return X0(e)==="[object Set]"}t6.working=typeof Set!="undefined"&&t6(new Set);function eAt(e){return typeof Set=="undefined"?!1:t6.working?t6(e):e instanceof Set}Vf.isSet=eAt;function r6(e){return X0(e)==="[object WeakMap]"}r6.working=typeof WeakMap!="undefined"&&r6(new WeakMap);function tAt(e){return typeof WeakMap=="undefined"?!1:r6.working?r6(e):e instanceof WeakMap}Vf.isWeakMap=tAt;function ZG(e){return X0(e)==="[object WeakSet]"}ZG.working=typeof WeakSet!="undefined"&&ZG(new WeakSet);function rAt(e){return ZG(e)}Vf.isWeakSet=rAt;function i6(e){return X0(e)==="[object ArrayBuffer]"}i6.working=typeof ArrayBuffer!="undefined"&&i6(new ArrayBuffer);function MAe(e){return typeof ArrayBuffer=="undefined"?!1:i6.working?i6(e):e instanceof ArrayBuffer}Vf.isArrayBuffer=MAe;function n6(e){return X0(e)==="[object DataView]"}n6.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&n6(new DataView(new ArrayBuffer(1),0,1));function EAe(e){return typeof DataView=="undefined"?!1:n6.working?n6(e):e instanceof DataView}Vf.isDataView=EAe;var jG=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function U4(e){return X0(e)==="[object SharedArrayBuffer]"}function kAe(e){return typeof jG=="undefined"?!1:(typeof U4.working=="undefined"&&(U4.working=U4(new jG)),U4.working?U4(e):e instanceof jG)}Vf.isSharedArrayBuffer=kAe;function iAt(e){return X0(e)==="[object AsyncFunction]"}Vf.isAsyncFunction=iAt;function nAt(e){return X0(e)==="[object Map Iterator]"}Vf.isMapIterator=nAt;function aAt(e){return X0(e)==="[object Set Iterator]"}Vf.isSetIterator=aAt;function oAt(e){return X0(e)==="[object Generator]"}Vf.isGeneratorObject=oAt;function sAt(e){return X0(e)==="[object WebAssembly.Module]"}Vf.isWebAssemblyCompiledModule=sAt;function CAe(e){return V4(e,qTt)}Vf.isNumberObject=CAe;function LAe(e){return V4(e,BTt)}Vf.isStringObject=LAe;function zAe(e){return V4(e,OTt)}Vf.isBooleanObject=zAe;function PAe(e){return wAe&&V4(e,AAe)}Vf.isBigIntObject=PAe;function IAe(e){return TAe&&V4(e,SAe)}Vf.isSymbolObject=IAe;function lAt(e){return CAe(e)||LAe(e)||zAe(e)||PAe(e)||IAe(e)}Vf.isBoxedPrimitive=lAt;function uAt(e){return typeof Uint8Array!="undefined"&&(MAe(e)||kAe(e))}Vf.isAnyArrayBuffer=uAt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Vf,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var YG=Se((ccr,DAe)=>{DAe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var tW=Se(Hf=>{var RAe=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(u){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),QG(t)?r.showHidden=t:t&&Hf._extend(r,t),d2(r.showHidden)&&(r.showHidden=!1),d2(r.depth)&&(r.depth=2),d2(r.colors)&&(r.colors=!1),d2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=cAt),l6(r,e,r.depth)}Hf.inspect=P_;P_.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]};P_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function cAt(e,t){var r=P_.styles[t];return r?"\x1B["+P_.colors[r][0]+"m"+e+"\x1B["+P_.colors[r][1]+"m":e}function hAt(e,t){return e}function dAt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function l6(e,t,r){if(e.customInspect&&t&&s6(t.inspect)&&t.inspect!==Hf.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return c6(n)||(n=l6(e,n,r)),n}var i=pAt(e,t);if(i)return i;var a=Object.keys(t),o=dAt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),G4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return KG(t);if(a.length===0){if(s6(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(H4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(u6(t))return e.stylize(Date.prototype.toString.call(t),"date");if(G4(t))return KG(t)}var u="",l=!1,f=["{","}"];if(qAe(t)&&(l=!0,f=["[","]"]),s6(t)){var c=t.name?": "+t.name:"";u=" [Function"+c+"]"}if(H4(t)&&(u=" "+RegExp.prototype.toString.call(t)),u6(t)&&(u=" "+Date.prototype.toUTCString.call(t)),G4(t)&&(u=" "+KG(t)),a.length===0&&(!l||t.length==0))return f[0]+u+f[1];if(r<0)return H4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return l?h=vAt(e,t,r,o,a):h=a.map(function(d){return $G(e,t,r,o,d,l)}),e.seen.pop(),yAt(h,u,f)}function pAt(e,t){if(d2(t))return e.stylize("undefined","undefined");if(c6(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(BAe(t))return e.stylize(""+t,"number");if(QG(t))return e.stylize(""+t,"boolean");if(f6(t))return e.stylize("null","null")}function KG(e){return"["+Error.prototype.toString.call(e)+"]"}function vAt(e,t,r,n,i){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` `).map(function(l){return" "+l}).join(` `).slice(2):s=` @@ -44,29 +44,29 @@ `)+"".concat(l[0]," !== ").concat(f[0],` `)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(h=` `.concat(a5t(" ",c),"^"),c=0)}}}for(var x=l[l.length-1],b=f[f.length-1];x===b&&(c++<2?o=` - `.concat(x).concat(o):n=x,l.pop(),f.pop(),!(l.length===0||f.length===0));)x=l[l.length-1],b=f[f.length-1];var y=Math.max(l.length,f.length);if(y===0){var E=u.split(` -`);if(E.length>30)for(E[26]="".concat(Gy,"...").concat(wp);E.length>27;)E.pop();return"".concat(w2.notIdentical,` + `.concat(x).concat(o):n=x,l.pop(),f.pop(),!(l.length===0||f.length===0));)x=l[l.length-1],b=f[f.length-1];var y=Math.max(l.length,f.length);if(y===0){var k=u.split(` +`);if(k.length>30)for(k[26]="".concat(Gy,"...").concat(wp);k.length>27;)k.pop();return"".concat(w2.notIdentical,` -`).concat(E.join(` +`).concat(k.join(` `),` `)}c>3&&(o=` `.concat(Gy,"...").concat(wp).concat(o),s=!0),n!==""&&(o=` - `.concat(n).concat(o),n="");var k=0,A=w2[r]+` + `.concat(n).concat(o),n="");var E=0,A=w2[r]+` `.concat(rE,"+ actual").concat(wp," ").concat(iE,"- expected").concat(wp),L=" ".concat(Gy,"...").concat(wp," Lines skipped");for(c=0;c1&&c>2&&(_>4?(i+=` `.concat(Gy,"...").concat(wp),s=!0):_>3&&(i+=` - `.concat(f[c-2]),k++),i+=` - `.concat(f[c-1]),k++),a=c,n+=` -`.concat(iE,"-").concat(wp," ").concat(f[c]),k++;else if(f.length1&&c>2&&(_>4?(i+=` + `.concat(f[c-2]),E++),i+=` + `.concat(f[c-1]),E++),a=c,n+=` +`.concat(iE,"-").concat(wp," ").concat(f[c]),E++;else if(f.length1&&c>2&&(_>4?(i+=` `.concat(Gy,"...").concat(wp),s=!0):_>3&&(i+=` - `.concat(l[c-2]),k++),i+=` - `.concat(l[c-1]),k++),a=c,i+=` -`.concat(rE,"+").concat(wp," ").concat(l[c]),k++;else{var C=f[c],M=l[c],v=M!==C&&(!$Se(M,",")||M.slice(0,-1)!==C);v&&$Se(C,",")&&C.slice(0,-1)===M&&(v=!1,M+=","),v?(_>1&&c>2&&(_>4?(i+=` + `.concat(l[c-2]),E++),i+=` + `.concat(l[c-1]),E++),a=c,i+=` +`.concat(rE,"+").concat(wp," ").concat(l[c]),E++;else{var C=f[c],M=l[c],v=M!==C&&(!$Se(M,",")||M.slice(0,-1)!==C);v&&$Se(C,",")&&C.slice(0,-1)===M&&(v=!1,M+=","),v?(_>1&&c>2&&(_>4?(i+=` `.concat(Gy,"...").concat(wp),s=!0):_>3&&(i+=` - `.concat(l[c-2]),k++),i+=` - `.concat(l[c-1]),k++),a=c,i+=` + `.concat(l[c-2]),E++),i+=` + `.concat(l[c-1]),E++),a=c,i+=` `.concat(rE,"+").concat(wp," ").concat(M),n+=` -`.concat(iE,"-").concat(wp," ").concat(C),k+=2):(i+=n,n="",(_===1||c===0)&&(i+=` - `.concat(M),k++))}if(k>20&&c20&&c{var pE=1e3,vE=pE*60,yE=vE*60,mE=yE*24,b4t=mE*365.25;P5e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return w4t(e);if(r==="number"&&isNaN(e)===!1)return t.long?A4t(e):T4t(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function w4t(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*b4t;case"days":case"day":case"d":return r*mE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yE;case"minutes":case"minute":case"mins":case"min":case"m":return r*vE;case"seconds":case"second":case"secs":case"sec":case"s":return r*pE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function T4t(e){return e>=mE?Math.round(e/mE)+"d":e>=yE?Math.round(e/yE)+"h":e>=vE?Math.round(e/vE)+"m":e>=pE?Math.round(e/pE)+"s":e+"ms"}function A4t(e){return J6(e,mE,"day")||J6(e,yE,"hour")||J6(e,vE,"minute")||J6(e,pE,"second")||e+" ms"}function J6(e,t,r){if(!(e{kc=D5e.exports=tj.debug=tj.default=tj;kc.coerce=C4t;kc.disable=E4t;kc.enable=M4t;kc.enabled=k4t;kc.humanize=I5e();kc.names=[];kc.skips=[];kc.formatters={};var ej;function S4t(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return kc.colors[Math.abs(t)%kc.colors.length]}function tj(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(ej||n);r.diff=i,r.prev=ej,r.curr=n,ej=n;for(var a=new Array(arguments.length),o=0;o{lv=q5e.exports=R5e();lv.log=P4t;lv.formatArgs=z4t;lv.save=I4t;lv.load=F5e;lv.useColors=L4t;lv.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:D4t();lv.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function L4t(){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+)/)}lv.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function z4t(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+lv.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 P4t(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function I4t(e){try{e==null?lv.storage.removeItem("debug"):lv.storage.debug=e}catch(t){}}function F5e(){var e;try{e=lv.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}lv.enable(F5e());function D4t(){try{return window.localStorage}catch(e){}}});var j5e=Se((Kcr,W5e)=>{var vA=tE(),V_=B5e()("stream-parser");W5e.exports=F4t;var N5e=-1,$6=0,R4t=1,U5e=2;function F4t(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=q4t,e._skipBytes=B4t,t&&(e._passthrough=O4t),t?e._transform=U4t:e._write=N4t}function gE(e){V_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=N5e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function q4t(e,t){vA(!this._parserCallback,'there is already a "callback" set!'),vA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||gE(this),V_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=$6}function B4t(e,t){vA(!this._parserCallback,'there is already a "callback" set!'),vA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||gE(this),V_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=R4t}function O4t(e,t){vA(!this._parserCallback,'There is already a "callback" set!'),vA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||gE(this),V_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=U5e}function N4t(e,t,r){this._parserInit||gE(this),V_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),H5e(this,e,null,r)}function U4t(e,t,r){this._parserInit||gE(this),V_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),H5e(this,e,t,r)}function V5e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return O5e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return O5e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return V5e(e,t.slice(i.length),r,n)}})}}function O5e(e,t,r,n){if(e._parserBytesLeft-=t.length,V_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===$6?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===U5e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===$6&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==$6&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=N5e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(G5e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var H5e=G5e(V5e);function G5e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var cc=Se(Gg=>{"use strict";var Z5e=OSe().Transform,V4t=j5e();function _E(){Z5e.call(this,{readableObjectMode:!0})}_E.prototype=Object.create(Z5e.prototype);_E.prototype.constructor=_E;V4t(_E.prototype);Gg.ParserStream=_E;Gg.sliceEq=function(e,t,r){for(var n=t,i=0;i{"use strict";var yA=cc().readUInt16BE,ij=cc().readUInt32BE;function xE(e,t){if(e.length<4+t)return null;var r=ij(e,t);return e.length>4&15,n=e[4]&15,i=e[5]>>4&15,a=yA(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}eR.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(Z4t(e,t),!!t.sizes.length){var r=X4t(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 u=0;u{"use strict";function tR(e,t){var r=new Error(e);return r.code=t,r}function Y4t(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function Wg(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 tR("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}Wg.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)}};Wg.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw tR("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};Wg.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw tR("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};Wg.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};Wg.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}};Wg.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}};Wg.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;ithis.input.length)throw tR("unexpected EOF","EBADDATA");for(var h=[],d=f,p=0;p0&&(this.ifds_to_read.push({id:a,offset:h[0]}),c=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:l,data_offset:f+this.start,value:h,is_subifd_link:c};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};nj.exports.ExifParser=Wg;nj.exports.get_orientation=function(e){var t=0;try{return new Wg(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 K5e=Se((ehr,Y5e)=>{"use strict";var K4t=cc().str2arr,J4t=cc().sliceEq,$4t=cc().readUInt32BE,iR=X5e(),Q4t=rR(),eEt=K4t("ftyp");Y5e.exports=function(e){if(J4t(e,4,eEt)){var t=iR.unbox(e,0);if(t){var r=iR.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=iR.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=iR.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 u=$4t(e,o.exif_location.offset),l=e.slice(o.exif_location.offset+u+4,o.exif_location.offset+o.exif_location.length),f=Q4t.get_orientation(l);f>0&&(s.orientation=f)}return s}}}}}}});var Q5e=Se((thr,$5e)=>{"use strict";var tEt=cc().str2arr,rEt=cc().sliceEq,J5e=cc().readUInt16LE,iEt=tEt("BM");$5e.exports=function(e){if(!(e.length<26)&&rEt(e,0,iEt))return{width:J5e(e,18),height:J5e(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var n4e=Se((rhr,i4e)=>{"use strict";var r4e=cc().str2arr,e4e=cc().sliceEq,t4e=cc().readUInt16LE,nEt=r4e("GIF87a"),aEt=r4e("GIF89a");i4e.exports=function(e){if(!(e.length<10)&&!(!e4e(e,0,nEt)&&!e4e(e,0,aEt)))return{width:t4e(e,6),height:t4e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var s4e=Se((ihr,o4e)=>{"use strict";var aj=cc().readUInt16LE,oEt=0,sEt=1,a4e=16;o4e.exports=function(e){var t=aj(e,0),r=aj(e,2),n=aj(e,4);if(!(t!==oEt||r!==sEt||!n)){for(var i=[],a={width:0,height:0},o=0;oa.width||u>a.height)&&(a=l)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var u4e=Se((nhr,l4e)=>{"use strict";var oj=cc().readUInt16BE,lEt=cc().str2arr,uEt=cc().sliceEq,fEt=rR(),cEt=lEt("Exif\0\0");l4e.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=oj(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&uEt(e,t,cEt)&&(i=fEt.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 p4e=Se((ahr,d4e)=>{"use strict";var h4e=cc().str2arr,f4e=cc().sliceEq,c4e=cc().readUInt32BE,hEt=h4e(`\x89PNG\r  -`),dEt=h4e("IHDR");d4e.exports=function(e){if(!(e.length<24)&&f4e(e,0,hEt)&&f4e(e,12,dEt))return{width:c4e(e,16),height:c4e(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var m4e=Se((ohr,y4e)=>{"use strict";var pEt=cc().str2arr,vEt=cc().sliceEq,v4e=cc().readUInt32BE,yEt=pEt("8BPS\0");y4e.exports=function(e){if(!(e.length<22)&&vEt(e,0,yEt))return{width:v4e(e,18),height:v4e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var x4e=Se((shr,_4e)=>{"use strict";function mEt(e){return e===32||e===9||e===13||e===10}function mA(e){return typeof e=="number"&&isFinite(e)&&e>0}function gEt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,xEt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,bEt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,wEt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,TEt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,g4e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function AEt(e){var t=e.match(bEt),r=e.match(wEt),n=e.match(TEt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Nm(e){return g4e.test(e)?e.match(g4e)[0]:"px"}_4e.exports=function(e){if(gEt(e)){for(var t="",r=0;r{"use strict";var T4e=cc().str2arr,b4e=cc().sliceEq,SEt=cc().readUInt16LE,MEt=cc().readUInt16BE,EEt=cc().readUInt32LE,kEt=cc().readUInt32BE,CEt=T4e("II*\0"),LEt=T4e("MM\0*");function nR(e,t,r){return r?MEt(e,t):SEt(e,t)}function sj(e,t,r){return r?kEt(e,t):EEt(e,t)}function w4e(e,t,r){var n=nR(e,t+2,r),i=sj(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?nR(e,t+8,r):sj(e,t+8,r)}A4e.exports=function(e){if(!(e.length<8)&&!(!b4e(e,0,CEt)&&!b4e(e,0,LEt))){var t=e[0]===77,r=sj(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=nR(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var k4e=cc().str2arr,M4e=cc().sliceEq,E4e=cc().readUInt16LE,lj=cc().readUInt32LE,zEt=rR(),PEt=k4e("RIFF"),IEt=k4e("WEBP");function DEt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:E4e(e,t+6)&16383,height:E4e(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function REt(e,t){if(e[t]===47){var r=lj(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function FEt(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||DEt(e,t+8):a==="VP8L"&&o>=9?r=r||REt(e,t+8):a==="VP8X"&&o>=10?r=r||FEt(e,t+8):a==="EXIF"&&(n=zEt.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 P4e=Se((fhr,z4e)=>{"use strict";z4e.exports={avif:K5e(),bmp:Q5e(),gif:n4e(),ico:s4e(),jpeg:u4e(),png:p4e(),psd:m4e(),svg:x4e(),tiff:S4e(),webp:L4e()}});var I4e=Se((chr,fj)=>{"use strict";var uj=P4e();function qEt(e){for(var t=Object.keys(uj),r=0;r{"use strict";var BEt=I4e(),OEt=Lg().IMAGE_URL_PREFIX,NEt=u2().Buffer;D4e.getImageSize=function(e){var t=e.replace(OEt,""),r=new NEt(t,"base64");return BEt(r)}});var B4e=Se((dhr,q4e)=>{"use strict";var F4e=Zr(),UEt=WT(),VEt=_u(),aR=hu(),HEt=Zr().maxRowLength,GEt=R4e().getImageSize;q4e.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=HEt(r.z);else if(r._hasSource){var a=GEt(r.source);n=a.height,i=a.width}var o=aR.getFromId(t,r.xaxis||"x"),s=aR.getFromId(t,r.yaxis||"y"),u=o.d2c(r.x0)-r.dx/2,l=s.d2c(r.y0)-r.dy/2,f,c=[u,u+i*r.dx],h=[l,l+n*r.dy];if(o&&o.type==="log")for(f=0;f{"use strict";var XEt=Nl(),T2=Zr(),O4e=T2.strTranslate,YEt=Zv(),KEt=WT(),JEt=tH(),$Et=aD().STYLE;N4e.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&JEt();T2.makeTraceGroups(i,n,"im").each(function(u){var l=XEt.select(this),f=u[0],c=f.trace,h=(c.zsmooth==="fast"||c.zsmooth===!1&&s)&&!c._hasZ&&c._hasSource&&a.type==="linear"&&o.type==="linear";c._realImage=h;var d=f.z,p=f.x0,x=f.y0,b=f.w,y=f.h,E=c.dx,k=c.dy,A,L,_,C,M,v;for(v=0;A===void 0&&v0;)L=a.c2p(p+v*E),v--;for(v=0;C===void 0&&v0;)M=o.c2p(x+v*k),v--;if(LW[0];if(re||ne){var be=A+T/2,ze=C+F/2;G+="transform:"+O4e(be+"px",ze+"px")+"scale("+(re?-1:1)+","+(ne?-1:1)+")"+O4e(-be+"px",-ze+"px")+";"}}j.attr("style",G);var Ce=new Promise(function(he){if(c._hasZ)he();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===b&&c._canvas.el.height===y&&c._canvas.source===c.source)he();else{var te=document.createElement("canvas");te.width=b,te.height=y;var ke=te.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var Ee=c._image;Ee.onload=function(){ke.drawImage(Ee,0,0),c._canvas={el:te,source:c.source},he()},Ee.setAttribute("src",c.source)}}).then(function(){var he,te;if(c._hasZ)te=H(function(Me,Oe){var Re=d[Oe][Me];return T2.isTypedArray(Re)&&(Re=Array.from(Re)),Re}),he=te.toDataURL("image/png");else if(c._hasSource)if(h)he=c.source;else{var ke=c._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=ke.getImageData(0,0,b,y).data;te=H(function(Me,Oe){var Re=4*(Oe*b+Me);return[Ee[Re],Ee[Re+1],Ee[Re+2],Ee[Re+3]]}),he=te.toDataURL("image/png")}j.attr({"xlink:href":he,height:F,width:T,x:A,y:C})});t._promises.push(Ce)})}});var H4e=Se((vhr,V4e)=>{"use strict";var QEt=Nl();V4e.exports=function(t){QEt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var Z4e=Se((yhr,j4e)=>{"use strict";var G4e=jc(),W4e=Zr(),oR=W4e.isArrayOrTypedArray,ekt=WT();j4e.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(G4e.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||G4e.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var u=Math.floor((r-i.x0)/a.dx),l=Math.floor(Math.abs(n-i.y0)/a.dy),f;if(a._hasZ?f=i.z[l][u]:a._hasSource&&(f=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(u,l,1,1).data),!!f){var c=i.hi||a.hoverinfo,h;if(c){var d=c.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var p=ekt.colormodel[a.colormodel],x=p.colormodel||a.colormodel,b=x.length,y=a._scaler(f),E=p.suffix,k=[];(a.hovertemplate||h)&&(k.push("["+[y[0]+E[0],y[1]+E[1],y[2]+E[2]].join(", ")),b===4&&k.push(", "+y[3]+E[3]),k.push("]"),k=k.join(""),t.extraText=x.toUpperCase()+": "+k);var A;oR(a.hovertext)&&oR(a.hovertext[l])?A=a.hovertext[l][u]:oR(a.text)&&oR(a.text[l])&&(A=a.text[l][u]);var L=s.c2p(i.y0+(l+.5)*a.dy),_=i.x0+(u+.5)*a.dx,C=i.y0+(l+.5)*a.dy,M="["+f.slice(0,a.colormodel.length).join(", ")+"]";return[W4e.extendFlat(t,{index:[l,u],x0:o.c2p(i.x0+u*a.dx),x1:o.c2p(i.x0+(u+1)*a.dx),y0:L,y1:L,color:y,xVal:_,xLabelVal:_,yVal:C,yLabelVal:C,zLabelVal:M,text:A,hovertemplateLabels:{zLabel:M,colorLabel:k,"color[0]Label":y[0]+E[0],"color[1]Label":y[1]+E[1],"color[2]Label":y[2]+E[2],"color[3]Label":y[3]+E[3]}})]}}}});var Y4e=Se((mhr,X4e)=>{"use strict";X4e.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 J4e=Se((ghr,K4e)=>{"use strict";K4e.exports={attributes:cG(),supplyDefaults:z3e(),calc:B4e(),plot:U4e(),style:H4e(),hoverPoints:Z4e(),eventData:Y4e(),moduleType:"trace",name:"image",basePlotModule:Th(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var Q4e=Se((_hr,$4e)=>{"use strict";$4e.exports=J4e()});var A2=Se((xhr,eEe)=>{"use strict";var tkt=zf(),rkt=Ec().attributes,ikt=uc(),nkt=Ih(),akt=Du().hovertemplateAttrs,okt=Du().texttemplateAttrs,bE=vu().extendFlat,skt=Id().pattern,sR=ikt({editType:"plot",arrayOk:!0,colorEditType:"plot"});eEe.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:nkt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:skt,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:bE({},tkt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:akt({},{keys:["label","color","value","percent","text"]}),texttemplate:okt({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:bE({},sR,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:bE({},sR,{}),outsidetextfont:bE({},sR,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:bE({},sR,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:rkt({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 S2=Se((bhr,iEe)=>{"use strict";var lkt=_u(),wE=Zr(),ukt=A2(),fkt=Ec().defaults,ckt=r0().handleText,hkt=Zr().coercePattern;function tEe(e,t){var r=wE.isArrayOrTypedArray(e),n=wE.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 rEe(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");hkt(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 dkt(e,t,r,n){function i(E,k){return wE.coerce(e,t,ukt,E,k)}var a=i("labels"),o=i("values"),s=tEe(a,o),u=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!u){t.visible=!1;return}t._length=u,rEe(e,t,n,i,!0),i("scalegroup");var l=i("text"),f=i("texttemplate"),c;if(f||(c=i("textinfo",wE.isArrayOrTypedArray(l)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),f||c&&c!=="none"){var h=i("textposition");ckt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else c==="none"&&i("textposition","none");fkt(t,n,i);var x=i("hole"),b=i("title.text");if(b){var y=i("title.position",x?"middle center":"top center");!x&&y==="middle center"&&(t.title.position="top center"),wE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}iEe.exports={handleLabelsAndValues:tEe,handleMarkerDefaults:rEe,supplyDefaults:dkt}});var lR=Se((whr,nEe)=>{"use strict";nEe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var oEe=Se((Thr,aEe)=>{"use strict";var pkt=Zr(),vkt=lR();aEe.exports=function(t,r){function n(i,a){return pkt.coerce(t,r,vkt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var gA=Se((Ahr,uEe)=>{"use strict";var ykt=_u(),cj=cd(),mkt=Pl(),gkt={};function _kt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,u=t._length,l=t._hasValues&&u,f,c;if(t.dlabel)for(a=new Array(u),f=0;f=0});var A=t.type==="funnelarea"?x:t.sort;return A&&r.sort(function(L,_){return _.v-L.v}),r[0]&&(r[0].vTotal=p),r}function sEe(e){return function(r,n){return!r||(r=cj(r),!r.isValid())?!1:(r=mkt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function xkt(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=lEe(a,gkt));for(var s=0,u=0;u{"use strict";var bkt=rv().appendArrayMultiPointValues;fEe.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]),bkt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var hR=Se((Mhr,PEe)=>{"use strict";var Rv=Nl(),wkt=Sc(),uR=jc(),mEe=Pl(),jg=yu(),np=Zr(),Tkt=np.strScale,hEe=np.strTranslate,hj=Bf(),gEe=bp(),Akt=gEe.recordMinTextSize,Skt=gEe.clearMinTextSize,_Ee=Qb().TEXTPAD,Fu=l_(),fR=cEe(),dEe=Zr().isValidTextValue;function Mkt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;Skt("pie",n),wEe(t,e),CEe(t,i);var a=np.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Rv.select(this),u=o[0],l=u.trace;Rkt(o),s.attr("stroke-linejoin","round"),s.each(function(){var f=Rv.select(this).selectAll("g.slice").data(o);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],h=!1;f.each(function(A,L){if(A.hidden){Rv.select(this).selectAll("path,g").remove();return}A.pointNumber=A.i,A.curveNumber=l.index,c[A.pxmid[1]<0?0:1][A.pxmid[0]<0?0:1].push(A);var _=u.cx,C=u.cy,M=Rv.select(this),v=M.selectAll("path.surface").data([A]);if(v.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(xEe,e,o),l.pull){var z=+Fu.castOption(l.pull,A.pts)||0;z>0&&(_+=z*A.pxmid[0],C+=z*A.pxmid[1])}A.cxFinal=_,A.cyFinal=C;function T(O,W,re,ne){var be=ne*(W[0]-O[0]),ze=ne*(W[1]-O[1]);return"a"+ne*u.r+","+ne*u.r+" 0 "+A.largeArc+(re?" 1 ":" 0 ")+be+","+ze}var F=l.hole;if(A.v===u.vTotal){var q="M"+(_+A.px0[0])+","+(C+A.px0[1])+T(A.px0,A.pxmid,!0,1)+T(A.pxmid,A.px0,!0,1)+"Z";F?v.attr("d","M"+(_+F*A.px0[0])+","+(C+F*A.px0[1])+T(A.px0,A.pxmid,!1,F)+T(A.pxmid,A.px0,!1,F)+"Z"+q):v.attr("d",q)}else{var U=T(A.px0,A.px1,!0,1);if(F){var H=1-F;v.attr("d","M"+(_+F*A.px1[0])+","+(C+F*A.px1[1])+T(A.px1,A.px0,!1,F)+"l"+H*A.px0[0]+","+H*A.px0[1]+U+"Z")}else v.attr("d","M"+_+","+C+"l"+A.px0[0]+","+A.px0[1]+U+"Z")}LEe(e,A,u);var j=Fu.castOption(l.textposition,A.pts),G=M.selectAll("g.slicetext").data(A.text&&j!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var O=np.ensureSingle(Rv.select(this),"text","",function(te){te.attr("data-notex",1)}),W=np.ensureUniformFontSize(e,j==="outside"?kkt(l,A,n.font):bEe(l,A,n.font));O.text(A.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(jg.font,W).call(hj.convertToTspans,e);var re=jg.bBox(O.node()),ne;if(j==="outside")ne=yEe(re,A);else if(ne=TEe(re,A,u),j==="auto"&&ne.scale<1){var be=np.ensureUniformFontSize(e,l.outsidetextfont);O.call(jg.font,be),re=jg.bBox(O.node()),ne=yEe(re,A)}var ze=ne.textPosAngle,Ce=ze===void 0?A.pxmid:cR(u.r,ze);if(ne.targetX=_+Ce[0]*ne.rCenter+(ne.x||0),ne.targetY=C+Ce[1]*ne.rCenter+(ne.y||0),zEe(ne,re),ne.outside){var he=ne.targetY;A.yLabelMin=he-re.height/2,A.yLabelMid=he,A.yLabelMax=he+re.height/2,A.labelExtraX=0,A.labelExtraY=0,h=!0}ne.fontSize=W.size,Akt(l.type,ne,n),o[L].transform=ne,np.setTransormAndDisplay(O,ne)})});var d=Rv.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var A=np.ensureSingle(Rv.select(this),"text","",function(C){C.attr("data-notex",1)}),L=l.title.text;l._meta&&(L=np.templateString(L,l._meta)),A.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(jg.font,l.title.font).call(hj.convertToTspans,e);var _;l.title.position==="middle center"?_=zkt(u):_=EEe(u,i),A.attr("transform",hEe(_.x,_.y)+Tkt(Math.min(1,_.scale))+hEe(_.tx,_.ty))}),h&&Ikt(c,l),Ekt(f,l),h&&l.automargin){var p=jg.bBox(s.node()),x=l.domain,b=i.w*(x.x[1]-x.x[0]),y=i.h*(x.y[1]-x.y[0]),E=(.5*b-u.r)/i.w,k=(.5*y-u.r)/i.h;wkt.autoMargin(e,"pie."+l.uid+".automargin",{xl:x.x[0]-E,xr:x.x[1]+E,yb:x.y[0]-k,yt:x.y[1]+k,l:Math.max(u.cx-u.r-p.left,0),r:Math.max(p.right-(u.cx+u.r),0),b:Math.max(p.bottom-(u.cy+u.r),0),t:Math.max(u.cy-u.r-p.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Rv.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function Ekt(e,t){e.each(function(r){var n=Rv.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,np.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,u=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var l=r.labelExtraX*r.pxmid[1]/r.pxmid[0],f=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(l)>Math.abs(f)?s+="l"+f*r.pxmid[0]/r.pxmid[1]+","+f+"H"+(a+r.labelExtraX+u):s+="l"+r.labelExtraX+","+l+"v"+(f-l)+"h"+u}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+u;np.ensureSingle(n,"path","textline").call(mEe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function xEe(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(u){var l=t._fullLayout,f=t._fullData[o.index];if(!(t._dragging||l.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=uR.castHoverinfo({hoverinfo:[Fu.castOption(c,u.pts)],_module:o._module},l,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var h=u.rInscribed||0,d=i+u.pxmid[0]*(1-h),p=a+u.pxmid[1]*(1-h),x=l.separators,b=[];if(c&&c.indexOf("label")!==-1&&b.push(u.label),u.text=Fu.castOption(f.hovertext||f.text,u.pts),c&&c.indexOf("text")!==-1){var y=u.text;np.isValidTextValue(y)&&b.push(y)}u.value=u.v,u.valueLabel=Fu.formatPieValue(u.v,x),c&&c.indexOf("value")!==-1&&b.push(u.valueLabel),u.percent=u.v/n.vTotal,u.percentLabel=Fu.formatPiePercent(u.percent,x),c&&c.indexOf("percent")!==-1&&b.push(u.percentLabel);var E=f.hoverlabel,k=E.font,A=[];uR.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:p,_x0:s?i+u.TL[0]:d-h*n.r,_x1:s?i+u.TR[0]:d+h*n.r,_y0:s?a+u.TL[1]:p-h*n.r,_y1:s?a+u.BL[1]:p+h*n.r,text:b.join("
"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:u.pxmid[0]<0?"left":"right",color:Fu.castOption(E.bgcolor,u.pts)||u.color,borderColor:Fu.castOption(E.bordercolor,u.pts),fontFamily:Fu.castOption(k.family,u.pts),fontSize:Fu.castOption(k.size,u.pts),fontColor:Fu.castOption(k.color,u.pts),nameLength:Fu.castOption(E.namelength,u.pts),textAlign:Fu.castOption(E.align,u.pts),hovertemplate:Fu.castOption(f.hovertemplate,u.pts),hovertemplateLabels:u,eventData:[fR(u,f)]},{container:l._hoverlayer.node(),outerContainer:l._paper.node(),gd:t,inOut_bbox:A}),u.bbox=A[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[fR(u,f)],event:Rv.event})}}),e.on("mouseout",function(u){var l=t._fullLayout,f=t._fullData[o.index],c=Rv.select(this).datum();o._hasHoverEvent&&(u.originalEvent=Rv.event,t.emit("plotly_unhover",{points:[fR(c,f)],event:Rv.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(uR.loneUnhover(l._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(u){var l=t._fullLayout,f=t._fullData[o.index];t._dragging||l.hovermode===!1||(t._hoverdata=[fR(u,f)],uR.click(t,Rv.event))})}function kkt(e,t,r){var n=Fu.castOption(e.outsidetextfont.color,t.pts)||Fu.castOption(e.textfont.color,t.pts)||r.color,i=Fu.castOption(e.outsidetextfont.family,t.pts)||Fu.castOption(e.textfont.family,t.pts)||r.family,a=Fu.castOption(e.outsidetextfont.size,t.pts)||Fu.castOption(e.textfont.size,t.pts)||r.size,o=Fu.castOption(e.outsidetextfont.weight,t.pts)||Fu.castOption(e.textfont.weight,t.pts)||r.weight,s=Fu.castOption(e.outsidetextfont.style,t.pts)||Fu.castOption(e.textfont.style,t.pts)||r.style,u=Fu.castOption(e.outsidetextfont.variant,t.pts)||Fu.castOption(e.textfont.variant,t.pts)||r.variant,l=Fu.castOption(e.outsidetextfont.textcase,t.pts)||Fu.castOption(e.textfont.textcase,t.pts)||r.textcase,f=Fu.castOption(e.outsidetextfont.lineposition,t.pts)||Fu.castOption(e.textfont.lineposition,t.pts)||r.lineposition,c=Fu.castOption(e.outsidetextfont.shadow,t.pts)||Fu.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:u,textcase:l,lineposition:f,shadow:c}}function bEe(e,t,r){var n=Fu.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Fu.castOption(e._input.textfont.color,t.pts));var i=Fu.castOption(e.insidetextfont.family,t.pts)||Fu.castOption(e.textfont.family,t.pts)||r.family,a=Fu.castOption(e.insidetextfont.size,t.pts)||Fu.castOption(e.textfont.size,t.pts)||r.size,o=Fu.castOption(e.insidetextfont.weight,t.pts)||Fu.castOption(e.textfont.weight,t.pts)||r.weight,s=Fu.castOption(e.insidetextfont.style,t.pts)||Fu.castOption(e.textfont.style,t.pts)||r.style,u=Fu.castOption(e.insidetextfont.variant,t.pts)||Fu.castOption(e.textfont.variant,t.pts)||r.variant,l=Fu.castOption(e.insidetextfont.textcase,t.pts)||Fu.castOption(e.textfont.textcase,t.pts)||r.textcase,f=Fu.castOption(e.insidetextfont.lineposition,t.pts)||Fu.castOption(e.textfont.lineposition,t.pts)||r.lineposition,c=Fu.castOption(e.insidetextfont.shadow,t.pts)||Fu.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||mEe.contrast(t.color),family:i,size:a,weight:o,style:s,variant:u,textcase:l,lineposition:f,shadow:c}}function wEe(e,t){for(var r,n,i=0;i=-4;E-=2)y(Math.PI*E,"tan");for(E=4;E>=-4;E-=2)y(Math.PI*(E+1),"tan")}if(c||d){for(E=4;E>=-4;E-=2)y(Math.PI*(E+1.5),"rad");for(E=4;E>=-4;E-=2)y(Math.PI*(E+.5),"rad")}}if(s||p||c){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/k,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;x.push(b)}(p||d)&&(b=pEe(e,n,o,u,l),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b)),(p||h)&&(b=vEe(e,n,o,u,l),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b));for(var A=0,L=0,_=0;_=1)break}return x[A]}function Ckt(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 zkt(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 EEe(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=kEe(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 u=Pkt(e.r,e.trace.aspectratio),l=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(l=l+u,o.x-=(1+i)*u,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?l*=2:a.title.position.indexOf("right")!==-1&&(l=l+u,o.x+=(1+i)*u,s.tx-=e.titleBox.width/2),r=l/e.titleBox.width,n=dj(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function Pkt(e,t){return e/(t===void 0?1:t)}function dj(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 kEe(e){var t=e.pull;if(!t)return 0;var r;if(np.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function Ikt(e,t){var r,n,i,a,o,s,u,l,f,c,h,d,p;function x(k,A){return k.pxmid[1]-A.pxmid[1]}function b(k,A){return A.pxmid[1]-k.pxmid[1]}function y(k,A){A||(A={});var L=A.labelExtraY+(n?A.yLabelMax:A.yLabelMin),_=n?k.yLabelMin:k.yLabelMax,C=n?k.yLabelMax:k.yLabelMin,M=k.cyFinal+o(k.px0[1],k.px1[1]),v=L-_,z,T,F,q,U,H;if(v*u>0&&(k.labelExtraY=v),!!np.isArrayOrTypedArray(t.pull))for(T=0;T=(Fu.castOption(t.pull,F.pts)||0))&&((k.pxmid[1]-F.pxmid[1])*u>0?(q=F.cyFinal+o(F.px0[1],F.px1[1]),v=q-_-k.labelExtraY,v*u>0&&(k.labelExtraY+=v)):(C+k.labelExtraY-M)*u>0&&(z=3*s*Math.abs(T-c.indexOf(k)),U=F.cxFinal+a(F.px0[0],F.px1[0]),H=U+z-(k.cxFinal+k.pxmid[0])-k.labelExtraX,H*s>0&&(k.labelExtraX+=H)))}for(n=0;n<2;n++)for(i=n?x:b,o=n?Math.max:Math.min,u=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,l=e[n][r],l.sort(i),f=e[1-n][r],c=f.concat(l),d=[],h=0;h1?(l=r.r,f=l/i.aspectratio):(f=r.r,l=f*i.aspectratio),l*=(1+i.baseratio)/2,u=l*f}o=Math.min(o,u/r.vTotal)}for(n=0;nt.vTotal/2?1:0,l.halfangle=Math.PI*Math.min(l.v/t.vTotal,.5),l.ring=1-n.hole,l.rInscribed=Lkt(l,t))}function cR(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function LEe(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("+"),u=function(A){return s.indexOf(A)!==-1},l=u("label"),f=u("text"),c=u("value"),h=u("percent"),d=n.separators,p;if(p=l?[t.label]:[],f){var x=Fu.getFirstFilled(i.text,t.pts);dEe(x)&&p.push(x)}c&&p.push(Fu.formatPieValue(t.v,d)),h&&p.push(Fu.formatPiePercent(t.v/r.vTotal,d)),t.text=p.join("
")}function b(A){return{label:A.label,value:A.v,valueLabel:Fu.formatPieValue(A.v,n.separators),percent:A.v/r.vTotal,percentLabel:Fu.formatPiePercent(A.v/r.vTotal,n.separators),color:A.color,text:A.text,customdata:np.castOption(i,A.i,"customdata")}}if(a){var y=np.castOption(i,t.i,"texttemplate");if(!y)t.text="";else{var E=b(t),k=Fu.getFirstFilled(i.text,t.pts);(dEe(k)||k==="")&&(E.text=k),t.text=np.texttemplateString(y,E,e._fullLayout._d3locale,E,i._meta||{})}}}function zEe(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}PEe.exports={plot:Mkt,formatSliceLabel:LEe,transformInsideText:TEe,determineInsideTextFont:bEe,positionTitleOutside:EEe,prerenderTitles:wEe,layoutAreas:CEe,attachFxHandlers:xEe,computeTransform:zEe}});var REe=Se((Ehr,DEe)=>{"use strict";var IEe=Nl(),Fkt=R3(),qkt=bp().resizeText;DEe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");qkt(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=IEe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){IEe.select(this).call(Fkt,s,a,t)})})}});var qEe=Se(_A=>{"use strict";var FEe=Sc();_A.name="pie";_A.plot=function(e,t,r,n){FEe.plotBasePlot(_A.name,e,t,r,n)};_A.clean=function(e,t,r,n){FEe.cleanBasePlot(_A.name,e,t,r,n)}});var OEe=Se((Chr,BEe)=>{"use strict";BEe.exports={attributes:A2(),supplyDefaults:S2().supplyDefaults,supplyLayoutDefaults:oEe(),layoutAttributes:lR(),calc:gA().calc,crossTraceCalc:gA().crossTraceCalc,plot:hR().plot,style:REe(),styleOne:R3(),moduleType:"trace",name:"pie",basePlotModule:qEe(),categories:["pie-like","pie","showLegend"],meta:{}}});var UEe=Se((Lhr,NEe)=>{"use strict";NEe.exports=OEe()});var HEe=Se(xA=>{"use strict";var VEe=Sc();xA.name="sunburst";xA.plot=function(e,t,r,n){VEe.plotBasePlot(xA.name,e,t,r,n)};xA.clean=function(e,t,r,n){VEe.cleanBasePlot(xA.name,e,t,r,n)}});var pj=Se((Phr,GEe)=>{"use strict";GEe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var AE=Se((Ihr,jEe)=>{"use strict";var Bkt=zf(),Okt=Du().hovertemplateAttrs,Nkt=Du().texttemplateAttrs,Ukt=Xf(),Vkt=Ec().attributes,Zg=A2(),WEe=pj(),TE=vu().extendFlat,Hkt=Id().pattern;jEe.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:TE({colors:{valType:"data_array",editType:"calc"},line:{color:TE({},Zg.marker.line.color,{dflt:null}),width:TE({},Zg.marker.line.width,{dflt:1}),editType:"calc"},pattern:Hkt,editType:"calc"},Ukt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Zg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:Nkt({editType:"plot"},{keys:WEe.eventDataKeys.concat(["label","value"])}),hovertext:Zg.hovertext,hoverinfo:TE({},Bkt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:Okt({},{keys:WEe.eventDataKeys}),textfont:Zg.textfont,insidetextorientation:Zg.insidetextorientation,insidetextfont:Zg.insidetextfont,outsidetextfont:TE({},Zg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Zg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:Vkt({name:"sunburst",trace:!0,editType:"calc"})}});var vj=Se((Dhr,ZEe)=>{"use strict";ZEe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var JEe=Se((Rhr,KEe)=>{"use strict";var XEe=Zr(),Gkt=AE(),Wkt=Ec().defaults,jkt=r0().handleText,Zkt=S2().handleMarkerDefaults,YEe=fc(),Xkt=YEe.hasColorscale,Ykt=YEe.handleDefaults;KEe.exports=function(t,r,n,i){function a(h,d){return XEe.coerce(t,r,Gkt,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),Zkt(t,r,i,a);var l=r._hasColorscale=Xkt(t,"marker","colors")||(t.marker||{}).coloraxis;l&&Ykt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",l?1:.7);var f=a("text");a("texttemplate"),r.texttemplate||a("textinfo",XEe.isArrayOrTypedArray(f)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c="auto";jkt(t,r,i,a,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),Wkt(r,i,a),r._length=null}});var QEe=Se((Fhr,$Ee)=>{"use strict";var Kkt=Zr(),Jkt=vj();$Ee.exports=function(t,r){function n(i,a){return Kkt.coerce(t,r,Jkt,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var SE=Se((dR,eke)=>{(function(e,t){typeof dR=="object"&&typeof eke!="undefined"?t(dR):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(dR,function(e){"use strict";function t(Pe,Ie){return Pe.parent===Ie.parent?1:2}function r(Pe){return Pe.reduce(n,0)/Pe.length}function n(Pe,Ie){return Pe+Ie.x}function i(Pe){return 1+Pe.reduce(a,0)}function a(Pe,Ie){return Math.max(Pe,Ie.y)}function o(Pe){for(var Ie;Ie=Pe.children;)Pe=Ie[0];return Pe}function s(Pe){for(var Ie;Ie=Pe.children;)Pe=Ie[Ie.length-1];return Pe}function u(){var Pe=t,Ie=1,lt=1,ye=!1;function ue(de){var ht,Et=0;de.eachAfter(function(vr){var Er=vr.children;Er?(vr.x=r(Er),vr.y=i(Er)):(vr.x=ht?Et+=Pe(vr,ht):0,vr.y=0,ht=vr)});var St=o(de),Zt=s(de),qr=St.x-Pe(St,Zt)/2,Lr=Zt.x+Pe(Zt,St)/2;return de.eachAfter(ye?function(vr){vr.x=(vr.x-de.x)*Ie,vr.y=(de.y-vr.y)*lt}:function(vr){vr.x=(vr.x-qr)/(Lr-qr)*Ie,vr.y=(1-(de.y?vr.y/de.y:1))*lt})}return ue.separation=function(de){return arguments.length?(Pe=de,ue):Pe},ue.size=function(de){return arguments.length?(ye=!1,Ie=+de[0],lt=+de[1],ue):ye?null:[Ie,lt]},ue.nodeSize=function(de){return arguments.length?(ye=!0,Ie=+de[0],lt=+de[1],ue):ye?[Ie,lt]:null},ue}function l(Pe){var Ie=0,lt=Pe.children,ye=lt&<.length;if(!ye)Ie=1;else for(;--ye>=0;)Ie+=lt[ye].value;Pe.value=Ie}function f(){return this.eachAfter(l)}function c(Pe){var Ie=this,lt,ye=[Ie],ue,de,ht;do for(lt=ye.reverse(),ye=[];Ie=lt.pop();)if(Pe(Ie),ue=Ie.children,ue)for(de=0,ht=ue.length;de=0;--ue)lt.push(ye[ue]);return this}function d(Pe){for(var Ie=this,lt=[Ie],ye=[],ue,de,ht;Ie=lt.pop();)if(ye.push(Ie),ue=Ie.children,ue)for(de=0,ht=ue.length;de=0;)lt+=ye[ue].value;Ie.value=lt})}function x(Pe){return this.eachBefore(function(Ie){Ie.children&&Ie.children.sort(Pe)})}function b(Pe){for(var Ie=this,lt=y(Ie,Pe),ye=[Ie];Ie!==lt;)Ie=Ie.parent,ye.push(Ie);for(var ue=ye.length;Pe!==lt;)ye.splice(ue,0,Pe),Pe=Pe.parent;return ye}function y(Pe,Ie){if(Pe===Ie)return Pe;var lt=Pe.ancestors(),ye=Ie.ancestors(),ue=null;for(Pe=lt.pop(),Ie=ye.pop();Pe===Ie;)ue=Pe,Pe=lt.pop(),Ie=ye.pop();return ue}function E(){for(var Pe=this,Ie=[Pe];Pe=Pe.parent;)Ie.push(Pe);return Ie}function k(){var Pe=[];return this.each(function(Ie){Pe.push(Ie)}),Pe}function A(){var Pe=[];return this.eachBefore(function(Ie){Ie.children||Pe.push(Ie)}),Pe}function L(){var Pe=this,Ie=[];return Pe.each(function(lt){lt!==Pe&&Ie.push({source:lt.parent,target:lt})}),Ie}function _(Pe,Ie){var lt=new T(Pe),ye=+Pe.value&&(lt.value=Pe.value),ue,de=[lt],ht,Et,St,Zt;for(Ie==null&&(Ie=M);ue=de.pop();)if(ye&&(ue.value=+ue.data.value),(Et=Ie(ue.data))&&(Zt=Et.length))for(ue.children=new Array(Zt),St=Zt-1;St>=0;--St)de.push(ht=ue.children[St]=new T(Et[St])),ht.parent=ue,ht.depth=ue.depth+1;return lt.eachBefore(z)}function C(){return _(this).eachBefore(v)}function M(Pe){return Pe.children}function v(Pe){Pe.data=Pe.data.data}function z(Pe){var Ie=0;do Pe.height=Ie;while((Pe=Pe.parent)&&Pe.height<++Ie)}function T(Pe){this.data=Pe,this.depth=this.height=0,this.parent=null}T.prototype=_.prototype={constructor:T,count:f,each:c,eachAfter:d,eachBefore:h,sum:p,sort:x,path:b,ancestors:E,descendants:k,leaves:A,links:L,copy:C};var F=Array.prototype.slice;function q(Pe){for(var Ie=Pe.length,lt,ye;Ie;)ye=Math.random()*Ie--|0,lt=Pe[Ie],Pe[Ie]=Pe[ye],Pe[ye]=lt;return Pe}function U(Pe){for(var Ie=0,lt=(Pe=q(F.call(Pe))).length,ye=[],ue,de;Ie0&<*lt>ye*ye+ue*ue}function O(Pe,Ie){for(var lt=0;ltSt?(ue=(Zt+St-de)/(2*Zt),Et=Math.sqrt(Math.max(0,St/Zt-ue*ue)),lt.x=Pe.x-ue*ye-Et*ht,lt.y=Pe.y-ue*ht+Et*ye):(ue=(Zt+de-St)/(2*Zt),Et=Math.sqrt(Math.max(0,de/Zt-ue*ue)),lt.x=Ie.x+ue*ye-Et*ht,lt.y=Ie.y+ue*ht+Et*ye)):(lt.x=Ie.x+lt.r,lt.y=Ie.y)}function Ce(Pe,Ie){var lt=Pe.r+Ie.r-1e-6,ye=Ie.x-Pe.x,ue=Ie.y-Pe.y;return lt>0&<*lt>ye*ye+ue*ue}function he(Pe){var Ie=Pe._,lt=Pe.next._,ye=Ie.r+lt.r,ue=(Ie.x*lt.r+lt.x*Ie.r)/ye,de=(Ie.y*lt.r+lt.y*Ie.r)/ye;return ue*ue+de*de}function te(Pe){this._=Pe,this.next=null,this.previous=null}function ke(Pe){if(!(ue=Pe.length))return 0;var Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr;if(Ie=Pe[0],Ie.x=0,Ie.y=0,!(ue>1))return Ie.r;if(lt=Pe[1],Ie.x=-lt.r,lt.x=Ie.r,lt.y=0,!(ue>2))return Ie.r+lt.r;ze(lt,Ie,ye=Pe[2]),Ie=new te(Ie),lt=new te(lt),ye=new te(ye),Ie.next=ye.previous=lt,lt.next=Ie.previous=ye,ye.next=lt.previous=Ie;e:for(Et=3;Et0)throw new Error("cycle");return Et}return lt.id=function(ye){return arguments.length?(Pe=Oe(ye),lt):Pe},lt.parentId=function(ye){return arguments.length?(Ie=Oe(ye),lt):Ie},lt}function Te(Pe,Ie){return Pe.parent===Ie.parent?1:2}function nt(Pe){var Ie=Pe.children;return Ie?Ie[0]:Pe.t}function ut(Pe){var Ie=Pe.children;return Ie?Ie[Ie.length-1]:Pe.t}function ct(Pe,Ie,lt){var ye=lt/(Ie.i-Pe.i);Ie.c-=ye,Ie.s+=lt,Pe.c+=ye,Ie.z+=lt,Ie.m+=lt}function rt(Pe){for(var Ie=0,lt=0,ye=Pe.children,ue=ye.length,de;--ue>=0;)de=ye[ue],de.z+=Ie,de.m+=Ie,Ie+=de.s+(lt+=de.c)}function je(Pe,Ie,lt){return Pe.a.parent===Ie.parent?Pe.a:lt}function tt(Pe,Ie){this._=Pe,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=Ie}tt.prototype=Object.create(T.prototype);function Je(Pe){for(var Ie=new tt(Pe,0),lt,ye=[Ie],ue,de,ht,Et;lt=ye.pop();)if(de=lt._.children)for(lt.children=new Array(Et=de.length),ht=Et-1;ht>=0;--ht)ye.push(ue=lt.children[ht]=new tt(de[ht],ht)),ue.parent=lt;return(Ie.parent=new tt(null,0)).children=[Ie],Ie}function Mt(){var Pe=Te,Ie=1,lt=1,ye=null;function ue(Zt){var qr=Je(Zt);if(qr.eachAfter(de),qr.parent.m=-qr.z,qr.eachBefore(ht),ye)Zt.eachBefore(St);else{var Lr=Zt,vr=Zt,Er=Zt;Zt.eachBefore(function(Hi){Hi.xvr.x&&(vr=Hi),Hi.depth>Er.depth&&(Er=Hi)});var si=Lr===vr?1:Pe(Lr,vr)/2,Ei=si-Lr.x,Si=Ie/(vr.x+si+Ei),xi=lt/(Er.depth||1);Zt.eachBefore(function(Hi){Hi.x=(Hi.x+Ei)*Si,Hi.y=Hi.depth*xi})}return Zt}function de(Zt){var qr=Zt.children,Lr=Zt.parent.children,vr=Zt.i?Lr[Zt.i-1]:null;if(qr){rt(Zt);var Er=(qr[0].z+qr[qr.length-1].z)/2;vr?(Zt.z=vr.z+Pe(Zt._,vr._),Zt.m=Zt.z-Er):Zt.z=Er}else vr&&(Zt.z=vr.z+Pe(Zt._,vr._));Zt.parent.A=Et(Zt,vr,Zt.parent.A||Lr[0])}function ht(Zt){Zt._.x=Zt.z+Zt.parent.m,Zt.m+=Zt.parent.m}function Et(Zt,qr,Lr){if(qr){for(var vr=Zt,Er=Zt,si=qr,Ei=vr.parent.children[0],Si=vr.m,xi=Er.m,Hi=si.m,Jr=Ei.m,ci;si=ut(si),vr=nt(vr),si&&vr;)Ei=nt(Ei),Er=ut(Er),Er.a=Zt,ci=si.z+Hi-vr.z-Si+Pe(si._,vr._),ci>0&&(ct(je(si,Zt,Lr),Zt,ci),Si+=ci,xi+=ci),Hi+=si.m,Si+=vr.m,Jr+=Ei.m,xi+=Er.m;si&&!ut(Er)&&(Er.t=si,Er.m+=Hi-xi),vr&&!nt(Ei)&&(Ei.t=vr,Ei.m+=Si-Jr,Lr=Zt)}return Lr}function St(Zt){Zt.x*=Ie,Zt.y=Zt.depth*lt}return ue.separation=function(Zt){return arguments.length?(Pe=Zt,ue):Pe},ue.size=function(Zt){return arguments.length?(ye=!1,Ie=+Zt[0],lt=+Zt[1],ue):ye?null:[Ie,lt]},ue.nodeSize=function(Zt){return arguments.length?(ye=!0,Ie=+Zt[0],lt=+Zt[1],ue):ye?[Ie,lt]:null},ue}function Vt(Pe,Ie,lt,ye,ue){for(var de=Pe.children,ht,Et=-1,St=de.length,Zt=Pe.value&&(ue-lt)/Pe.value;++EtHi&&(Hi=Zt),Lt=Si*Si*Di,Jr=Math.max(Hi/Lt,Lt/xi),Jr>ci){Si-=Zt;break}ci=Jr}ht.push(St={value:Si,dice:Er1?ye:1)},lt}(Kt);function Ot(){var Pe=fr,Ie=!1,lt=1,ye=1,ue=[0],de=Re,ht=Re,Et=Re,St=Re,Zt=Re;function qr(vr){return vr.x0=vr.y0=0,vr.x1=lt,vr.y1=ye,vr.eachBefore(Lr),ue=[0],Ie&&vr.eachBefore(Pt),vr}function Lr(vr){var Er=ue[vr.depth],si=vr.x0+Er,Ei=vr.y0+Er,Si=vr.x1-Er,xi=vr.y1-Er;Si=vr-1){var Hi=de[Lr];Hi.x0=si,Hi.y0=Ei,Hi.x1=Si,Hi.y1=xi;return}for(var Jr=Zt[Lr],ci=Er/2+Jr,Di=Lr+1,Lt=vr-1;Di>>1;Zt[vt]xi-Ei){var sr=(si*Bt+Si*Dt)/Er;qr(Lr,Di,Dt,si,Ei,sr,xi),qr(Di,vr,Bt,sr,Ei,Si,xi)}else{var br=(Ei*Bt+xi*Dt)/Er;qr(Lr,Di,Dt,si,Ei,Si,br),qr(Di,vr,Bt,si,br,Si,xi)}}}function _e(Pe,Ie,lt,ye,ue){(Pe.depth&1?Vt:Qe)(Pe,Ie,lt,ye,ue)}var Fe=function Pe(Ie){function lt(ye,ue,de,ht,Et){if((St=ye._squarify)&&St.ratio===Ie)for(var St,Zt,qr,Lr,vr=-1,Er,si=St.length,Ei=ye.value;++vr1?ye:1)},lt}(Kt);e.cluster=u,e.hierarchy=_,e.pack=fe,e.packEnclose=U,e.packSiblings=Ee,e.partition=Xe,e.stratify=At,e.tree=Mt,e.treemap=Ot,e.treemapBinary=De,e.treemapDice=Qe,e.treemapResquarify=Fe,e.treemapSlice=Vt,e.treemapSliceDice=_e,e.treemapSquarify=fr,Object.defineProperty(e,"__esModule",{value:!0})})});var EE=Se(ME=>{"use strict";var tke=SE(),$kt=_u(),bA=Zr(),Qkt=fc().makeColorScaleFuncFromTrace,eCt=gA().makePullColorFn,tCt=gA().generateExtendedColors,rCt=fc().calc,iCt=ju().ALMOST_EQUAL,nCt={},aCt={},oCt={};ME.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=bA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,u=bA.isArrayOrTypedArray(s),l=[],f={},c={},h=function(G,O){f[G]?f[G].push(O):f[G]=[O],c[O]=1},d=function(G){return G||typeof G=="number"},p=function(G){return!u||$kt(s[G])&&s[G]>=0},x,b,y;i?(x=Math.min(n.length,o.length),b=function(G){return d(n[G])&&p(G)},y=function(G){return String(n[G])}):(x=Math.min(a.length,o.length),b=function(G){return d(a[G])&&p(G)},y=function(G){return String(a[G])}),u&&(x=Math.min(x,s.length));for(var E=0;E1){for(var M=bA.randstr(),v=0;v{"use strict";var pEt=cc().str2arr,vEt=cc().sliceEq,v4e=cc().readUInt32BE,yEt=pEt("8BPS\0");y4e.exports=function(e){if(!(e.length<22)&&vEt(e,0,yEt))return{width:v4e(e,18),height:v4e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var x4e=Se((shr,_4e)=>{"use strict";function mEt(e){return e===32||e===9||e===13||e===10}function mA(e){return typeof e=="number"&&isFinite(e)&&e>0}function gEt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,xEt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,bEt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,wEt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,TEt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,g4e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function AEt(e){var t=e.match(bEt),r=e.match(wEt),n=e.match(TEt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Nm(e){return g4e.test(e)?e.match(g4e)[0]:"px"}_4e.exports=function(e){if(gEt(e)){for(var t="",r=0;r{"use strict";var T4e=cc().str2arr,b4e=cc().sliceEq,SEt=cc().readUInt16LE,MEt=cc().readUInt16BE,EEt=cc().readUInt32LE,kEt=cc().readUInt32BE,CEt=T4e("II*\0"),LEt=T4e("MM\0*");function nR(e,t,r){return r?MEt(e,t):SEt(e,t)}function sj(e,t,r){return r?kEt(e,t):EEt(e,t)}function w4e(e,t,r){var n=nR(e,t+2,r),i=sj(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?nR(e,t+8,r):sj(e,t+8,r)}A4e.exports=function(e){if(!(e.length<8)&&!(!b4e(e,0,CEt)&&!b4e(e,0,LEt))){var t=e[0]===77,r=sj(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=nR(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var k4e=cc().str2arr,M4e=cc().sliceEq,E4e=cc().readUInt16LE,lj=cc().readUInt32LE,zEt=rR(),PEt=k4e("RIFF"),IEt=k4e("WEBP");function DEt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:E4e(e,t+6)&16383,height:E4e(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function REt(e,t){if(e[t]===47){var r=lj(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function FEt(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||DEt(e,t+8):a==="VP8L"&&o>=9?r=r||REt(e,t+8):a==="VP8X"&&o>=10?r=r||FEt(e,t+8):a==="EXIF"&&(n=zEt.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 P4e=Se((fhr,z4e)=>{"use strict";z4e.exports={avif:K5e(),bmp:Q5e(),gif:n4e(),ico:s4e(),jpeg:u4e(),png:p4e(),psd:m4e(),svg:x4e(),tiff:S4e(),webp:L4e()}});var I4e=Se((chr,fj)=>{"use strict";var uj=P4e();function qEt(e){for(var t=Object.keys(uj),r=0;r{"use strict";var BEt=I4e(),OEt=Lg().IMAGE_URL_PREFIX,NEt=u2().Buffer;D4e.getImageSize=function(e){var t=e.replace(OEt,""),r=new NEt(t,"base64");return BEt(r)}});var B4e=Se((dhr,q4e)=>{"use strict";var F4e=Zr(),UEt=WT(),VEt=_u(),aR=hu(),HEt=Zr().maxRowLength,GEt=R4e().getImageSize;q4e.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=HEt(r.z);else if(r._hasSource){var a=GEt(r.source);n=a.height,i=a.width}var o=aR.getFromId(t,r.xaxis||"x"),s=aR.getFromId(t,r.yaxis||"y"),u=o.d2c(r.x0)-r.dx/2,l=s.d2c(r.y0)-r.dy/2,f,c=[u,u+i*r.dx],h=[l,l+n*r.dy];if(o&&o.type==="log")for(f=0;f{"use strict";var XEt=Nl(),T2=Zr(),O4e=T2.strTranslate,YEt=Zv(),KEt=WT(),JEt=tH(),$Et=aD().STYLE;N4e.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&JEt();T2.makeTraceGroups(i,n,"im").each(function(u){var l=XEt.select(this),f=u[0],c=f.trace,h=(c.zsmooth==="fast"||c.zsmooth===!1&&s)&&!c._hasZ&&c._hasSource&&a.type==="linear"&&o.type==="linear";c._realImage=h;var d=f.z,p=f.x0,x=f.y0,b=f.w,y=f.h,k=c.dx,E=c.dy,A,L,_,C,M,v;for(v=0;A===void 0&&v0;)L=a.c2p(p+v*k),v--;for(v=0;C===void 0&&v0;)M=o.c2p(x+v*E),v--;if(LW[0];if(re||ne){var be=A+T/2,ze=C+F/2;G+="transform:"+O4e(be+"px",ze+"px")+"scale("+(re?-1:1)+","+(ne?-1:1)+")"+O4e(-be+"px",-ze+"px")+";"}}j.attr("style",G);var Ce=new Promise(function(he){if(c._hasZ)he();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===b&&c._canvas.el.height===y&&c._canvas.source===c.source)he();else{var te=document.createElement("canvas");te.width=b,te.height=y;var ke=te.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var Ee=c._image;Ee.onload=function(){ke.drawImage(Ee,0,0),c._canvas={el:te,source:c.source},he()},Ee.setAttribute("src",c.source)}}).then(function(){var he,te;if(c._hasZ)te=H(function(Me,Oe){var Re=d[Oe][Me];return T2.isTypedArray(Re)&&(Re=Array.from(Re)),Re}),he=te.toDataURL("image/png");else if(c._hasSource)if(h)he=c.source;else{var ke=c._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=ke.getImageData(0,0,b,y).data;te=H(function(Me,Oe){var Re=4*(Oe*b+Me);return[Ee[Re],Ee[Re+1],Ee[Re+2],Ee[Re+3]]}),he=te.toDataURL("image/png")}j.attr({"xlink:href":he,height:F,width:T,x:A,y:C})});t._promises.push(Ce)})}});var H4e=Se((vhr,V4e)=>{"use strict";var QEt=Nl();V4e.exports=function(t){QEt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var Z4e=Se((yhr,j4e)=>{"use strict";var G4e=jc(),W4e=Zr(),oR=W4e.isArrayOrTypedArray,ekt=WT();j4e.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(G4e.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||G4e.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var u=Math.floor((r-i.x0)/a.dx),l=Math.floor(Math.abs(n-i.y0)/a.dy),f;if(a._hasZ?f=i.z[l][u]:a._hasSource&&(f=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(u,l,1,1).data),!!f){var c=i.hi||a.hoverinfo,h;if(c){var d=c.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var p=ekt.colormodel[a.colormodel],x=p.colormodel||a.colormodel,b=x.length,y=a._scaler(f),k=p.suffix,E=[];(a.hovertemplate||h)&&(E.push("["+[y[0]+k[0],y[1]+k[1],y[2]+k[2]].join(", ")),b===4&&E.push(", "+y[3]+k[3]),E.push("]"),E=E.join(""),t.extraText=x.toUpperCase()+": "+E);var A;oR(a.hovertext)&&oR(a.hovertext[l])?A=a.hovertext[l][u]:oR(a.text)&&oR(a.text[l])&&(A=a.text[l][u]);var L=s.c2p(i.y0+(l+.5)*a.dy),_=i.x0+(u+.5)*a.dx,C=i.y0+(l+.5)*a.dy,M="["+f.slice(0,a.colormodel.length).join(", ")+"]";return[W4e.extendFlat(t,{index:[l,u],x0:o.c2p(i.x0+u*a.dx),x1:o.c2p(i.x0+(u+1)*a.dx),y0:L,y1:L,color:y,xVal:_,xLabelVal:_,yVal:C,yLabelVal:C,zLabelVal:M,text:A,hovertemplateLabels:{zLabel:M,colorLabel:E,"color[0]Label":y[0]+k[0],"color[1]Label":y[1]+k[1],"color[2]Label":y[2]+k[2],"color[3]Label":y[3]+k[3]}})]}}}});var Y4e=Se((mhr,X4e)=>{"use strict";X4e.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 J4e=Se((ghr,K4e)=>{"use strict";K4e.exports={attributes:cG(),supplyDefaults:z3e(),calc:B4e(),plot:U4e(),style:H4e(),hoverPoints:Z4e(),eventData:Y4e(),moduleType:"trace",name:"image",basePlotModule:Th(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var Q4e=Se((_hr,$4e)=>{"use strict";$4e.exports=J4e()});var A2=Se((xhr,eEe)=>{"use strict";var tkt=zf(),rkt=Ec().attributes,ikt=uc(),nkt=Ih(),akt=Du().hovertemplateAttrs,okt=Du().texttemplateAttrs,bE=vu().extendFlat,skt=Id().pattern,sR=ikt({editType:"plot",arrayOk:!0,colorEditType:"plot"});eEe.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:nkt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:skt,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:bE({},tkt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:akt({},{keys:["label","color","value","percent","text"]}),texttemplate:okt({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:bE({},sR,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:bE({},sR,{}),outsidetextfont:bE({},sR,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:bE({},sR,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:rkt({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 S2=Se((bhr,iEe)=>{"use strict";var lkt=_u(),wE=Zr(),ukt=A2(),fkt=Ec().defaults,ckt=r0().handleText,hkt=Zr().coercePattern;function tEe(e,t){var r=wE.isArrayOrTypedArray(e),n=wE.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 rEe(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");hkt(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 dkt(e,t,r,n){function i(k,E){return wE.coerce(e,t,ukt,k,E)}var a=i("labels"),o=i("values"),s=tEe(a,o),u=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!u){t.visible=!1;return}t._length=u,rEe(e,t,n,i,!0),i("scalegroup");var l=i("text"),f=i("texttemplate"),c;if(f||(c=i("textinfo",wE.isArrayOrTypedArray(l)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),f||c&&c!=="none"){var h=i("textposition");ckt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else c==="none"&&i("textposition","none");fkt(t,n,i);var x=i("hole"),b=i("title.text");if(b){var y=i("title.position",x?"middle center":"top center");!x&&y==="middle center"&&(t.title.position="top center"),wE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}iEe.exports={handleLabelsAndValues:tEe,handleMarkerDefaults:rEe,supplyDefaults:dkt}});var lR=Se((whr,nEe)=>{"use strict";nEe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var oEe=Se((Thr,aEe)=>{"use strict";var pkt=Zr(),vkt=lR();aEe.exports=function(t,r){function n(i,a){return pkt.coerce(t,r,vkt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var gA=Se((Ahr,uEe)=>{"use strict";var ykt=_u(),cj=cd(),mkt=Pl(),gkt={};function _kt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,u=t._length,l=t._hasValues&&u,f,c;if(t.dlabel)for(a=new Array(u),f=0;f=0});var A=t.type==="funnelarea"?x:t.sort;return A&&r.sort(function(L,_){return _.v-L.v}),r[0]&&(r[0].vTotal=p),r}function sEe(e){return function(r,n){return!r||(r=cj(r),!r.isValid())?!1:(r=mkt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function xkt(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=lEe(a,gkt));for(var s=0,u=0;u{"use strict";var bkt=rv().appendArrayMultiPointValues;fEe.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]),bkt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var hR=Se((Mhr,PEe)=>{"use strict";var Rv=Nl(),wkt=Sc(),uR=jc(),mEe=Pl(),jg=yu(),np=Zr(),Tkt=np.strScale,hEe=np.strTranslate,hj=Bf(),gEe=bp(),Akt=gEe.recordMinTextSize,Skt=gEe.clearMinTextSize,_Ee=Qb().TEXTPAD,Fu=l_(),fR=cEe(),dEe=Zr().isValidTextValue;function Mkt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;Skt("pie",n),wEe(t,e),CEe(t,i);var a=np.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Rv.select(this),u=o[0],l=u.trace;Rkt(o),s.attr("stroke-linejoin","round"),s.each(function(){var f=Rv.select(this).selectAll("g.slice").data(o);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],h=!1;f.each(function(A,L){if(A.hidden){Rv.select(this).selectAll("path,g").remove();return}A.pointNumber=A.i,A.curveNumber=l.index,c[A.pxmid[1]<0?0:1][A.pxmid[0]<0?0:1].push(A);var _=u.cx,C=u.cy,M=Rv.select(this),v=M.selectAll("path.surface").data([A]);if(v.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(xEe,e,o),l.pull){var z=+Fu.castOption(l.pull,A.pts)||0;z>0&&(_+=z*A.pxmid[0],C+=z*A.pxmid[1])}A.cxFinal=_,A.cyFinal=C;function T(O,W,re,ne){var be=ne*(W[0]-O[0]),ze=ne*(W[1]-O[1]);return"a"+ne*u.r+","+ne*u.r+" 0 "+A.largeArc+(re?" 1 ":" 0 ")+be+","+ze}var F=l.hole;if(A.v===u.vTotal){var q="M"+(_+A.px0[0])+","+(C+A.px0[1])+T(A.px0,A.pxmid,!0,1)+T(A.pxmid,A.px0,!0,1)+"Z";F?v.attr("d","M"+(_+F*A.px0[0])+","+(C+F*A.px0[1])+T(A.px0,A.pxmid,!1,F)+T(A.pxmid,A.px0,!1,F)+"Z"+q):v.attr("d",q)}else{var U=T(A.px0,A.px1,!0,1);if(F){var H=1-F;v.attr("d","M"+(_+F*A.px1[0])+","+(C+F*A.px1[1])+T(A.px1,A.px0,!1,F)+"l"+H*A.px0[0]+","+H*A.px0[1]+U+"Z")}else v.attr("d","M"+_+","+C+"l"+A.px0[0]+","+A.px0[1]+U+"Z")}LEe(e,A,u);var j=Fu.castOption(l.textposition,A.pts),G=M.selectAll("g.slicetext").data(A.text&&j!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var O=np.ensureSingle(Rv.select(this),"text","",function(te){te.attr("data-notex",1)}),W=np.ensureUniformFontSize(e,j==="outside"?kkt(l,A,n.font):bEe(l,A,n.font));O.text(A.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(jg.font,W).call(hj.convertToTspans,e);var re=jg.bBox(O.node()),ne;if(j==="outside")ne=yEe(re,A);else if(ne=TEe(re,A,u),j==="auto"&&ne.scale<1){var be=np.ensureUniformFontSize(e,l.outsidetextfont);O.call(jg.font,be),re=jg.bBox(O.node()),ne=yEe(re,A)}var ze=ne.textPosAngle,Ce=ze===void 0?A.pxmid:cR(u.r,ze);if(ne.targetX=_+Ce[0]*ne.rCenter+(ne.x||0),ne.targetY=C+Ce[1]*ne.rCenter+(ne.y||0),zEe(ne,re),ne.outside){var he=ne.targetY;A.yLabelMin=he-re.height/2,A.yLabelMid=he,A.yLabelMax=he+re.height/2,A.labelExtraX=0,A.labelExtraY=0,h=!0}ne.fontSize=W.size,Akt(l.type,ne,n),o[L].transform=ne,np.setTransormAndDisplay(O,ne)})});var d=Rv.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var A=np.ensureSingle(Rv.select(this),"text","",function(C){C.attr("data-notex",1)}),L=l.title.text;l._meta&&(L=np.templateString(L,l._meta)),A.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(jg.font,l.title.font).call(hj.convertToTspans,e);var _;l.title.position==="middle center"?_=zkt(u):_=EEe(u,i),A.attr("transform",hEe(_.x,_.y)+Tkt(Math.min(1,_.scale))+hEe(_.tx,_.ty))}),h&&Ikt(c,l),Ekt(f,l),h&&l.automargin){var p=jg.bBox(s.node()),x=l.domain,b=i.w*(x.x[1]-x.x[0]),y=i.h*(x.y[1]-x.y[0]),k=(.5*b-u.r)/i.w,E=(.5*y-u.r)/i.h;wkt.autoMargin(e,"pie."+l.uid+".automargin",{xl:x.x[0]-k,xr:x.x[1]+k,yb:x.y[0]-E,yt:x.y[1]+E,l:Math.max(u.cx-u.r-p.left,0),r:Math.max(p.right-(u.cx+u.r),0),b:Math.max(p.bottom-(u.cy+u.r),0),t:Math.max(u.cy-u.r-p.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Rv.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function Ekt(e,t){e.each(function(r){var n=Rv.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,np.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,u=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var l=r.labelExtraX*r.pxmid[1]/r.pxmid[0],f=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(l)>Math.abs(f)?s+="l"+f*r.pxmid[0]/r.pxmid[1]+","+f+"H"+(a+r.labelExtraX+u):s+="l"+r.labelExtraX+","+l+"v"+(f-l)+"h"+u}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+u;np.ensureSingle(n,"path","textline").call(mEe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function xEe(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(u){var l=t._fullLayout,f=t._fullData[o.index];if(!(t._dragging||l.hovermode===!1)){var c=f.hoverinfo;if(Array.isArray(c)&&(c=uR.castHoverinfo({hoverinfo:[Fu.castOption(c,u.pts)],_module:o._module},l,0)),c==="all"&&(c="label+text+value+percent+name"),f.hovertemplate||c!=="none"&&c!=="skip"&&c){var h=u.rInscribed||0,d=i+u.pxmid[0]*(1-h),p=a+u.pxmid[1]*(1-h),x=l.separators,b=[];if(c&&c.indexOf("label")!==-1&&b.push(u.label),u.text=Fu.castOption(f.hovertext||f.text,u.pts),c&&c.indexOf("text")!==-1){var y=u.text;np.isValidTextValue(y)&&b.push(y)}u.value=u.v,u.valueLabel=Fu.formatPieValue(u.v,x),c&&c.indexOf("value")!==-1&&b.push(u.valueLabel),u.percent=u.v/n.vTotal,u.percentLabel=Fu.formatPiePercent(u.percent,x),c&&c.indexOf("percent")!==-1&&b.push(u.percentLabel);var k=f.hoverlabel,E=k.font,A=[];uR.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:p,_x0:s?i+u.TL[0]:d-h*n.r,_x1:s?i+u.TR[0]:d+h*n.r,_y0:s?a+u.TL[1]:p-h*n.r,_y1:s?a+u.BL[1]:p+h*n.r,text:b.join("
"),name:f.hovertemplate||c.indexOf("name")!==-1?f.name:void 0,idealAlign:u.pxmid[0]<0?"left":"right",color:Fu.castOption(k.bgcolor,u.pts)||u.color,borderColor:Fu.castOption(k.bordercolor,u.pts),fontFamily:Fu.castOption(E.family,u.pts),fontSize:Fu.castOption(E.size,u.pts),fontColor:Fu.castOption(E.color,u.pts),nameLength:Fu.castOption(k.namelength,u.pts),textAlign:Fu.castOption(k.align,u.pts),hovertemplate:Fu.castOption(f.hovertemplate,u.pts),hovertemplateLabels:u,eventData:[fR(u,f)]},{container:l._hoverlayer.node(),outerContainer:l._paper.node(),gd:t,inOut_bbox:A}),u.bbox=A[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[fR(u,f)],event:Rv.event})}}),e.on("mouseout",function(u){var l=t._fullLayout,f=t._fullData[o.index],c=Rv.select(this).datum();o._hasHoverEvent&&(u.originalEvent=Rv.event,t.emit("plotly_unhover",{points:[fR(c,f)],event:Rv.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(uR.loneUnhover(l._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(u){var l=t._fullLayout,f=t._fullData[o.index];t._dragging||l.hovermode===!1||(t._hoverdata=[fR(u,f)],uR.click(t,Rv.event))})}function kkt(e,t,r){var n=Fu.castOption(e.outsidetextfont.color,t.pts)||Fu.castOption(e.textfont.color,t.pts)||r.color,i=Fu.castOption(e.outsidetextfont.family,t.pts)||Fu.castOption(e.textfont.family,t.pts)||r.family,a=Fu.castOption(e.outsidetextfont.size,t.pts)||Fu.castOption(e.textfont.size,t.pts)||r.size,o=Fu.castOption(e.outsidetextfont.weight,t.pts)||Fu.castOption(e.textfont.weight,t.pts)||r.weight,s=Fu.castOption(e.outsidetextfont.style,t.pts)||Fu.castOption(e.textfont.style,t.pts)||r.style,u=Fu.castOption(e.outsidetextfont.variant,t.pts)||Fu.castOption(e.textfont.variant,t.pts)||r.variant,l=Fu.castOption(e.outsidetextfont.textcase,t.pts)||Fu.castOption(e.textfont.textcase,t.pts)||r.textcase,f=Fu.castOption(e.outsidetextfont.lineposition,t.pts)||Fu.castOption(e.textfont.lineposition,t.pts)||r.lineposition,c=Fu.castOption(e.outsidetextfont.shadow,t.pts)||Fu.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:u,textcase:l,lineposition:f,shadow:c}}function bEe(e,t,r){var n=Fu.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Fu.castOption(e._input.textfont.color,t.pts));var i=Fu.castOption(e.insidetextfont.family,t.pts)||Fu.castOption(e.textfont.family,t.pts)||r.family,a=Fu.castOption(e.insidetextfont.size,t.pts)||Fu.castOption(e.textfont.size,t.pts)||r.size,o=Fu.castOption(e.insidetextfont.weight,t.pts)||Fu.castOption(e.textfont.weight,t.pts)||r.weight,s=Fu.castOption(e.insidetextfont.style,t.pts)||Fu.castOption(e.textfont.style,t.pts)||r.style,u=Fu.castOption(e.insidetextfont.variant,t.pts)||Fu.castOption(e.textfont.variant,t.pts)||r.variant,l=Fu.castOption(e.insidetextfont.textcase,t.pts)||Fu.castOption(e.textfont.textcase,t.pts)||r.textcase,f=Fu.castOption(e.insidetextfont.lineposition,t.pts)||Fu.castOption(e.textfont.lineposition,t.pts)||r.lineposition,c=Fu.castOption(e.insidetextfont.shadow,t.pts)||Fu.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||mEe.contrast(t.color),family:i,size:a,weight:o,style:s,variant:u,textcase:l,lineposition:f,shadow:c}}function wEe(e,t){for(var r,n,i=0;i=-4;k-=2)y(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)y(Math.PI*(k+1),"tan")}if(c||d){for(k=4;k>=-4;k-=2)y(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)y(Math.PI*(k+.5),"rad")}}if(s||p||c){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;x.push(b)}(p||d)&&(b=pEe(e,n,o,u,l),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b)),(p||h)&&(b=vEe(e,n,o,u,l),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b));for(var A=0,L=0,_=0;_=1)break}return x[A]}function Ckt(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 zkt(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 EEe(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=kEe(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 u=Pkt(e.r,e.trace.aspectratio),l=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(l=l+u,o.x-=(1+i)*u,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?l*=2:a.title.position.indexOf("right")!==-1&&(l=l+u,o.x+=(1+i)*u,s.tx-=e.titleBox.width/2),r=l/e.titleBox.width,n=dj(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function Pkt(e,t){return e/(t===void 0?1:t)}function dj(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 kEe(e){var t=e.pull;if(!t)return 0;var r;if(np.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function Ikt(e,t){var r,n,i,a,o,s,u,l,f,c,h,d,p;function x(E,A){return E.pxmid[1]-A.pxmid[1]}function b(E,A){return A.pxmid[1]-E.pxmid[1]}function y(E,A){A||(A={});var L=A.labelExtraY+(n?A.yLabelMax:A.yLabelMin),_=n?E.yLabelMin:E.yLabelMax,C=n?E.yLabelMax:E.yLabelMin,M=E.cyFinal+o(E.px0[1],E.px1[1]),v=L-_,z,T,F,q,U,H;if(v*u>0&&(E.labelExtraY=v),!!np.isArrayOrTypedArray(t.pull))for(T=0;T=(Fu.castOption(t.pull,F.pts)||0))&&((E.pxmid[1]-F.pxmid[1])*u>0?(q=F.cyFinal+o(F.px0[1],F.px1[1]),v=q-_-E.labelExtraY,v*u>0&&(E.labelExtraY+=v)):(C+E.labelExtraY-M)*u>0&&(z=3*s*Math.abs(T-c.indexOf(E)),U=F.cxFinal+a(F.px0[0],F.px1[0]),H=U+z-(E.cxFinal+E.pxmid[0])-E.labelExtraX,H*s>0&&(E.labelExtraX+=H)))}for(n=0;n<2;n++)for(i=n?x:b,o=n?Math.max:Math.min,u=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,l=e[n][r],l.sort(i),f=e[1-n][r],c=f.concat(l),d=[],h=0;h1?(l=r.r,f=l/i.aspectratio):(f=r.r,l=f*i.aspectratio),l*=(1+i.baseratio)/2,u=l*f}o=Math.min(o,u/r.vTotal)}for(n=0;nt.vTotal/2?1:0,l.halfangle=Math.PI*Math.min(l.v/t.vTotal,.5),l.ring=1-n.hole,l.rInscribed=Lkt(l,t))}function cR(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function LEe(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("+"),u=function(A){return s.indexOf(A)!==-1},l=u("label"),f=u("text"),c=u("value"),h=u("percent"),d=n.separators,p;if(p=l?[t.label]:[],f){var x=Fu.getFirstFilled(i.text,t.pts);dEe(x)&&p.push(x)}c&&p.push(Fu.formatPieValue(t.v,d)),h&&p.push(Fu.formatPiePercent(t.v/r.vTotal,d)),t.text=p.join("
")}function b(A){return{label:A.label,value:A.v,valueLabel:Fu.formatPieValue(A.v,n.separators),percent:A.v/r.vTotal,percentLabel:Fu.formatPiePercent(A.v/r.vTotal,n.separators),color:A.color,text:A.text,customdata:np.castOption(i,A.i,"customdata")}}if(a){var y=np.castOption(i,t.i,"texttemplate");if(!y)t.text="";else{var k=b(t),E=Fu.getFirstFilled(i.text,t.pts);(dEe(E)||E==="")&&(k.text=E),t.text=np.texttemplateString(y,k,e._fullLayout._d3locale,k,i._meta||{})}}}function zEe(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}PEe.exports={plot:Mkt,formatSliceLabel:LEe,transformInsideText:TEe,determineInsideTextFont:bEe,positionTitleOutside:EEe,prerenderTitles:wEe,layoutAreas:CEe,attachFxHandlers:xEe,computeTransform:zEe}});var REe=Se((Ehr,DEe)=>{"use strict";var IEe=Nl(),Fkt=R3(),qkt=bp().resizeText;DEe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");qkt(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=IEe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){IEe.select(this).call(Fkt,s,a,t)})})}});var qEe=Se(_A=>{"use strict";var FEe=Sc();_A.name="pie";_A.plot=function(e,t,r,n){FEe.plotBasePlot(_A.name,e,t,r,n)};_A.clean=function(e,t,r,n){FEe.cleanBasePlot(_A.name,e,t,r,n)}});var OEe=Se((Chr,BEe)=>{"use strict";BEe.exports={attributes:A2(),supplyDefaults:S2().supplyDefaults,supplyLayoutDefaults:oEe(),layoutAttributes:lR(),calc:gA().calc,crossTraceCalc:gA().crossTraceCalc,plot:hR().plot,style:REe(),styleOne:R3(),moduleType:"trace",name:"pie",basePlotModule:qEe(),categories:["pie-like","pie","showLegend"],meta:{}}});var UEe=Se((Lhr,NEe)=>{"use strict";NEe.exports=OEe()});var HEe=Se(xA=>{"use strict";var VEe=Sc();xA.name="sunburst";xA.plot=function(e,t,r,n){VEe.plotBasePlot(xA.name,e,t,r,n)};xA.clean=function(e,t,r,n){VEe.cleanBasePlot(xA.name,e,t,r,n)}});var pj=Se((Phr,GEe)=>{"use strict";GEe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var AE=Se((Ihr,jEe)=>{"use strict";var Bkt=zf(),Okt=Du().hovertemplateAttrs,Nkt=Du().texttemplateAttrs,Ukt=Xf(),Vkt=Ec().attributes,Zg=A2(),WEe=pj(),TE=vu().extendFlat,Hkt=Id().pattern;jEe.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:TE({colors:{valType:"data_array",editType:"calc"},line:{color:TE({},Zg.marker.line.color,{dflt:null}),width:TE({},Zg.marker.line.width,{dflt:1}),editType:"calc"},pattern:Hkt,editType:"calc"},Ukt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Zg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:Nkt({editType:"plot"},{keys:WEe.eventDataKeys.concat(["label","value"])}),hovertext:Zg.hovertext,hoverinfo:TE({},Bkt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:Okt({},{keys:WEe.eventDataKeys}),textfont:Zg.textfont,insidetextorientation:Zg.insidetextorientation,insidetextfont:Zg.insidetextfont,outsidetextfont:TE({},Zg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Zg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:Vkt({name:"sunburst",trace:!0,editType:"calc"})}});var vj=Se((Dhr,ZEe)=>{"use strict";ZEe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var JEe=Se((Rhr,KEe)=>{"use strict";var XEe=Zr(),Gkt=AE(),Wkt=Ec().defaults,jkt=r0().handleText,Zkt=S2().handleMarkerDefaults,YEe=fc(),Xkt=YEe.hasColorscale,Ykt=YEe.handleDefaults;KEe.exports=function(t,r,n,i){function a(h,d){return XEe.coerce(t,r,Gkt,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),Zkt(t,r,i,a);var l=r._hasColorscale=Xkt(t,"marker","colors")||(t.marker||{}).coloraxis;l&&Ykt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",l?1:.7);var f=a("text");a("texttemplate"),r.texttemplate||a("textinfo",XEe.isArrayOrTypedArray(f)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c="auto";jkt(t,r,i,a,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),Wkt(r,i,a),r._length=null}});var QEe=Se((Fhr,$Ee)=>{"use strict";var Kkt=Zr(),Jkt=vj();$Ee.exports=function(t,r){function n(i,a){return Kkt.coerce(t,r,Jkt,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var SE=Se((dR,eke)=>{(function(e,t){typeof dR=="object"&&typeof eke!="undefined"?t(dR):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(dR,function(e){"use strict";function t(Pe,Ie){return Pe.parent===Ie.parent?1:2}function r(Pe){return Pe.reduce(n,0)/Pe.length}function n(Pe,Ie){return Pe+Ie.x}function i(Pe){return 1+Pe.reduce(a,0)}function a(Pe,Ie){return Math.max(Pe,Ie.y)}function o(Pe){for(var Ie;Ie=Pe.children;)Pe=Ie[0];return Pe}function s(Pe){for(var Ie;Ie=Pe.children;)Pe=Ie[Ie.length-1];return Pe}function u(){var Pe=t,Ie=1,lt=1,ye=!1;function ue(de){var ht,Et=0;de.eachAfter(function(vr){var Er=vr.children;Er?(vr.x=r(Er),vr.y=i(Er)):(vr.x=ht?Et+=Pe(vr,ht):0,vr.y=0,ht=vr)});var St=o(de),Zt=s(de),qr=St.x-Pe(St,Zt)/2,Lr=Zt.x+Pe(Zt,St)/2;return de.eachAfter(ye?function(vr){vr.x=(vr.x-de.x)*Ie,vr.y=(de.y-vr.y)*lt}:function(vr){vr.x=(vr.x-qr)/(Lr-qr)*Ie,vr.y=(1-(de.y?vr.y/de.y:1))*lt})}return ue.separation=function(de){return arguments.length?(Pe=de,ue):Pe},ue.size=function(de){return arguments.length?(ye=!1,Ie=+de[0],lt=+de[1],ue):ye?null:[Ie,lt]},ue.nodeSize=function(de){return arguments.length?(ye=!0,Ie=+de[0],lt=+de[1],ue):ye?[Ie,lt]:null},ue}function l(Pe){var Ie=0,lt=Pe.children,ye=lt&<.length;if(!ye)Ie=1;else for(;--ye>=0;)Ie+=lt[ye].value;Pe.value=Ie}function f(){return this.eachAfter(l)}function c(Pe){var Ie=this,lt,ye=[Ie],ue,de,ht;do for(lt=ye.reverse(),ye=[];Ie=lt.pop();)if(Pe(Ie),ue=Ie.children,ue)for(de=0,ht=ue.length;de=0;--ue)lt.push(ye[ue]);return this}function d(Pe){for(var Ie=this,lt=[Ie],ye=[],ue,de,ht;Ie=lt.pop();)if(ye.push(Ie),ue=Ie.children,ue)for(de=0,ht=ue.length;de=0;)lt+=ye[ue].value;Ie.value=lt})}function x(Pe){return this.eachBefore(function(Ie){Ie.children&&Ie.children.sort(Pe)})}function b(Pe){for(var Ie=this,lt=y(Ie,Pe),ye=[Ie];Ie!==lt;)Ie=Ie.parent,ye.push(Ie);for(var ue=ye.length;Pe!==lt;)ye.splice(ue,0,Pe),Pe=Pe.parent;return ye}function y(Pe,Ie){if(Pe===Ie)return Pe;var lt=Pe.ancestors(),ye=Ie.ancestors(),ue=null;for(Pe=lt.pop(),Ie=ye.pop();Pe===Ie;)ue=Pe,Pe=lt.pop(),Ie=ye.pop();return ue}function k(){for(var Pe=this,Ie=[Pe];Pe=Pe.parent;)Ie.push(Pe);return Ie}function E(){var Pe=[];return this.each(function(Ie){Pe.push(Ie)}),Pe}function A(){var Pe=[];return this.eachBefore(function(Ie){Ie.children||Pe.push(Ie)}),Pe}function L(){var Pe=this,Ie=[];return Pe.each(function(lt){lt!==Pe&&Ie.push({source:lt.parent,target:lt})}),Ie}function _(Pe,Ie){var lt=new T(Pe),ye=+Pe.value&&(lt.value=Pe.value),ue,de=[lt],ht,Et,St,Zt;for(Ie==null&&(Ie=M);ue=de.pop();)if(ye&&(ue.value=+ue.data.value),(Et=Ie(ue.data))&&(Zt=Et.length))for(ue.children=new Array(Zt),St=Zt-1;St>=0;--St)de.push(ht=ue.children[St]=new T(Et[St])),ht.parent=ue,ht.depth=ue.depth+1;return lt.eachBefore(z)}function C(){return _(this).eachBefore(v)}function M(Pe){return Pe.children}function v(Pe){Pe.data=Pe.data.data}function z(Pe){var Ie=0;do Pe.height=Ie;while((Pe=Pe.parent)&&Pe.height<++Ie)}function T(Pe){this.data=Pe,this.depth=this.height=0,this.parent=null}T.prototype=_.prototype={constructor:T,count:f,each:c,eachAfter:d,eachBefore:h,sum:p,sort:x,path:b,ancestors:k,descendants:E,leaves:A,links:L,copy:C};var F=Array.prototype.slice;function q(Pe){for(var Ie=Pe.length,lt,ye;Ie;)ye=Math.random()*Ie--|0,lt=Pe[Ie],Pe[Ie]=Pe[ye],Pe[ye]=lt;return Pe}function U(Pe){for(var Ie=0,lt=(Pe=q(F.call(Pe))).length,ye=[],ue,de;Ie0&<*lt>ye*ye+ue*ue}function O(Pe,Ie){for(var lt=0;ltSt?(ue=(Zt+St-de)/(2*Zt),Et=Math.sqrt(Math.max(0,St/Zt-ue*ue)),lt.x=Pe.x-ue*ye-Et*ht,lt.y=Pe.y-ue*ht+Et*ye):(ue=(Zt+de-St)/(2*Zt),Et=Math.sqrt(Math.max(0,de/Zt-ue*ue)),lt.x=Ie.x+ue*ye-Et*ht,lt.y=Ie.y+ue*ht+Et*ye)):(lt.x=Ie.x+lt.r,lt.y=Ie.y)}function Ce(Pe,Ie){var lt=Pe.r+Ie.r-1e-6,ye=Ie.x-Pe.x,ue=Ie.y-Pe.y;return lt>0&<*lt>ye*ye+ue*ue}function he(Pe){var Ie=Pe._,lt=Pe.next._,ye=Ie.r+lt.r,ue=(Ie.x*lt.r+lt.x*Ie.r)/ye,de=(Ie.y*lt.r+lt.y*Ie.r)/ye;return ue*ue+de*de}function te(Pe){this._=Pe,this.next=null,this.previous=null}function ke(Pe){if(!(ue=Pe.length))return 0;var Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr;if(Ie=Pe[0],Ie.x=0,Ie.y=0,!(ue>1))return Ie.r;if(lt=Pe[1],Ie.x=-lt.r,lt.x=Ie.r,lt.y=0,!(ue>2))return Ie.r+lt.r;ze(lt,Ie,ye=Pe[2]),Ie=new te(Ie),lt=new te(lt),ye=new te(ye),Ie.next=ye.previous=lt,lt.next=Ie.previous=ye,ye.next=lt.previous=Ie;e:for(Et=3;Et0)throw new Error("cycle");return Et}return lt.id=function(ye){return arguments.length?(Pe=Oe(ye),lt):Pe},lt.parentId=function(ye){return arguments.length?(Ie=Oe(ye),lt):Ie},lt}function Te(Pe,Ie){return Pe.parent===Ie.parent?1:2}function nt(Pe){var Ie=Pe.children;return Ie?Ie[0]:Pe.t}function ut(Pe){var Ie=Pe.children;return Ie?Ie[Ie.length-1]:Pe.t}function ct(Pe,Ie,lt){var ye=lt/(Ie.i-Pe.i);Ie.c-=ye,Ie.s+=lt,Pe.c+=ye,Ie.z+=lt,Ie.m+=lt}function rt(Pe){for(var Ie=0,lt=0,ye=Pe.children,ue=ye.length,de;--ue>=0;)de=ye[ue],de.z+=Ie,de.m+=Ie,Ie+=de.s+(lt+=de.c)}function je(Pe,Ie,lt){return Pe.a.parent===Ie.parent?Pe.a:lt}function tt(Pe,Ie){this._=Pe,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=Ie}tt.prototype=Object.create(T.prototype);function Je(Pe){for(var Ie=new tt(Pe,0),lt,ye=[Ie],ue,de,ht,Et;lt=ye.pop();)if(de=lt._.children)for(lt.children=new Array(Et=de.length),ht=Et-1;ht>=0;--ht)ye.push(ue=lt.children[ht]=new tt(de[ht],ht)),ue.parent=lt;return(Ie.parent=new tt(null,0)).children=[Ie],Ie}function Mt(){var Pe=Te,Ie=1,lt=1,ye=null;function ue(Zt){var qr=Je(Zt);if(qr.eachAfter(de),qr.parent.m=-qr.z,qr.eachBefore(ht),ye)Zt.eachBefore(St);else{var Lr=Zt,vr=Zt,Er=Zt;Zt.eachBefore(function(Hi){Hi.xvr.x&&(vr=Hi),Hi.depth>Er.depth&&(Er=Hi)});var si=Lr===vr?1:Pe(Lr,vr)/2,Ei=si-Lr.x,Si=Ie/(vr.x+si+Ei),xi=lt/(Er.depth||1);Zt.eachBefore(function(Hi){Hi.x=(Hi.x+Ei)*Si,Hi.y=Hi.depth*xi})}return Zt}function de(Zt){var qr=Zt.children,Lr=Zt.parent.children,vr=Zt.i?Lr[Zt.i-1]:null;if(qr){rt(Zt);var Er=(qr[0].z+qr[qr.length-1].z)/2;vr?(Zt.z=vr.z+Pe(Zt._,vr._),Zt.m=Zt.z-Er):Zt.z=Er}else vr&&(Zt.z=vr.z+Pe(Zt._,vr._));Zt.parent.A=Et(Zt,vr,Zt.parent.A||Lr[0])}function ht(Zt){Zt._.x=Zt.z+Zt.parent.m,Zt.m+=Zt.parent.m}function Et(Zt,qr,Lr){if(qr){for(var vr=Zt,Er=Zt,si=qr,Ei=vr.parent.children[0],Si=vr.m,xi=Er.m,Hi=si.m,Jr=Ei.m,ci;si=ut(si),vr=nt(vr),si&&vr;)Ei=nt(Ei),Er=ut(Er),Er.a=Zt,ci=si.z+Hi-vr.z-Si+Pe(si._,vr._),ci>0&&(ct(je(si,Zt,Lr),Zt,ci),Si+=ci,xi+=ci),Hi+=si.m,Si+=vr.m,Jr+=Ei.m,xi+=Er.m;si&&!ut(Er)&&(Er.t=si,Er.m+=Hi-xi),vr&&!nt(Ei)&&(Ei.t=vr,Ei.m+=Si-Jr,Lr=Zt)}return Lr}function St(Zt){Zt.x*=Ie,Zt.y=Zt.depth*lt}return ue.separation=function(Zt){return arguments.length?(Pe=Zt,ue):Pe},ue.size=function(Zt){return arguments.length?(ye=!1,Ie=+Zt[0],lt=+Zt[1],ue):ye?null:[Ie,lt]},ue.nodeSize=function(Zt){return arguments.length?(ye=!0,Ie=+Zt[0],lt=+Zt[1],ue):ye?[Ie,lt]:null},ue}function Vt(Pe,Ie,lt,ye,ue){for(var de=Pe.children,ht,Et=-1,St=de.length,Zt=Pe.value&&(ue-lt)/Pe.value;++EtHi&&(Hi=Zt),Lt=Si*Si*Di,Jr=Math.max(Hi/Lt,Lt/xi),Jr>ci){Si-=Zt;break}ci=Jr}ht.push(St={value:Si,dice:Er1?ye:1)},lt}(Kt);function Ot(){var Pe=fr,Ie=!1,lt=1,ye=1,ue=[0],de=Re,ht=Re,Et=Re,St=Re,Zt=Re;function qr(vr){return vr.x0=vr.y0=0,vr.x1=lt,vr.y1=ye,vr.eachBefore(Lr),ue=[0],Ie&&vr.eachBefore(Pt),vr}function Lr(vr){var Er=ue[vr.depth],si=vr.x0+Er,Ei=vr.y0+Er,Si=vr.x1-Er,xi=vr.y1-Er;Si=vr-1){var Hi=de[Lr];Hi.x0=si,Hi.y0=Ei,Hi.x1=Si,Hi.y1=xi;return}for(var Jr=Zt[Lr],ci=Er/2+Jr,Di=Lr+1,Lt=vr-1;Di>>1;Zt[vt]xi-Ei){var sr=(si*Bt+Si*Dt)/Er;qr(Lr,Di,Dt,si,Ei,sr,xi),qr(Di,vr,Bt,sr,Ei,Si,xi)}else{var br=(Ei*Bt+xi*Dt)/Er;qr(Lr,Di,Dt,si,Ei,Si,br),qr(Di,vr,Bt,si,br,Si,xi)}}}function _e(Pe,Ie,lt,ye,ue){(Pe.depth&1?Vt:Qe)(Pe,Ie,lt,ye,ue)}var Fe=function Pe(Ie){function lt(ye,ue,de,ht,Et){if((St=ye._squarify)&&St.ratio===Ie)for(var St,Zt,qr,Lr,vr=-1,Er,si=St.length,Ei=ye.value;++vr1?ye:1)},lt}(Kt);e.cluster=u,e.hierarchy=_,e.pack=fe,e.packEnclose=U,e.packSiblings=Ee,e.partition=Xe,e.stratify=At,e.tree=Mt,e.treemap=Ot,e.treemapBinary=De,e.treemapDice=Qe,e.treemapResquarify=Fe,e.treemapSlice=Vt,e.treemapSliceDice=_e,e.treemapSquarify=fr,Object.defineProperty(e,"__esModule",{value:!0})})});var EE=Se(ME=>{"use strict";var tke=SE(),$kt=_u(),bA=Zr(),Qkt=fc().makeColorScaleFuncFromTrace,eCt=gA().makePullColorFn,tCt=gA().generateExtendedColors,rCt=fc().calc,iCt=ju().ALMOST_EQUAL,nCt={},aCt={},oCt={};ME.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=bA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,u=bA.isArrayOrTypedArray(s),l=[],f={},c={},h=function(G,O){f[G]?f[G].push(O):f[G]=[O],c[O]=1},d=function(G){return G||typeof G=="number"},p=function(G){return!u||$kt(s[G])&&s[G]>=0},x,b,y;i?(x=Math.min(n.length,o.length),b=function(G){return d(n[G])&&p(G)},y=function(G){return String(n[G])}):(x=Math.min(a.length,o.length),b=function(G){return d(a[G])&&p(G)},y=function(G){return String(a[G])}),u&&(x=Math.min(x,s.length));for(var k=0;k1){for(var M=bA.randstr(),v=0;v{});function Vm(){}function nke(){return this.rgb().formatHex()}function pCt(){return this.rgb().formatHex8()}function vCt(){return cke(this).formatHsl()}function ake(){return this.rgb().formatRgb()}function W_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=sCt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?oke(t):r===3?new xd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?vR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?vR(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=lCt.exec(e))?new xd(t[1],t[2],t[3],1):(t=uCt.exec(e))?new xd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fCt.exec(e))?vR(t[1],t[2],t[3],t[4]):(t=cCt.exec(e))?vR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hCt.exec(e))?uke(t[1],t[2]/100,t[3]/100,1):(t=dCt.exec(e))?uke(t[1],t[2]/100,t[3]/100,t[4]):ike.hasOwnProperty(e)?oke(ike[e]):e==="transparent"?new xd(NaN,NaN,NaN,0):null}function oke(e){return new xd(e>>16&255,e>>8&255,e&255,1)}function vR(e,t,r,n){return n<=0&&(e=t=r=NaN),new xd(e,t,r,n)}function CE(e){return e instanceof Vm||(e=W_(e)),e?(e=e.rgb(),new xd(e.r,e.g,e.b,e.opacity)):new xd}function TA(e,t,r,n){return arguments.length===1?CE(e):new xd(e,t,r,n==null?1:n)}function xd(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function ske(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}`}function yCt(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}${M2((isNaN(this.opacity)?1:this.opacity)*255)}`}function lke(){let e=mR(this.opacity);return`${e===1?"rgb(":"rgba("}${E2(this.r)}, ${E2(this.g)}, ${E2(this.b)}${e===1?")":`, ${e})`}`}function mR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M2(e){return e=E2(e),(e<16?"0":"")+e.toString(16)}function uke(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Zy(e,t,r,n)}function cke(e){if(e instanceof Zy)return new Zy(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(e=W_(e)),!e)return new Zy;if(e instanceof Zy)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,u=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&u<1?0:o,new Zy(o,s,u,e.opacity)}function LE(e,t,r,n){return arguments.length===1?cke(e):new Zy(e,t,r,n==null?1:n)}function Zy(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function fke(e){return e=(e||0)%360,e<0?e+360:e}function yR(e){return Math.max(0,Math.min(1,e||0))}function yj(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 G_,k2,wA,kE,Um,sCt,lCt,uCt,fCt,cCt,hCt,dCt,ike,gR=Qf(()=>{pR();G_=.7,k2=1/G_,wA="\\s*([+-]?\\d+)\\s*",kE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Um="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sCt=/^#([0-9a-f]{3,8})$/,lCt=new RegExp(`^rgb\\(${wA},${wA},${wA}\\)$`),uCt=new RegExp(`^rgb\\(${Um},${Um},${Um}\\)$`),fCt=new RegExp(`^rgba\\(${wA},${wA},${wA},${kE}\\)$`),cCt=new RegExp(`^rgba\\(${Um},${Um},${Um},${kE}\\)$`),hCt=new RegExp(`^hsl\\(${kE},${Um},${Um}\\)$`),dCt=new RegExp(`^hsla\\(${kE},${Um},${Um},${kE}\\)$`),ike={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};Xg(Vm,W_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nke,formatHex:nke,formatHex8:pCt,formatHsl:vCt,formatRgb:ake,toString:ake});Xg(xd,TA,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new xd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new xd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xd(E2(this.r),E2(this.g),E2(this.b),mR(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:ske,formatHex:ske,formatHex8:yCt,formatRgb:lke,toString:lke}));Xg(Zy,LE,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new Zy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new Zy(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 xd(yj(e>=240?e-240:e+120,i,n),yj(e,i,n),yj(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zy(fke(this.h),yR(this.s),yR(this.l),mR(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=mR(this.opacity);return`${e===1?"hsl(":"hsla("}${fke(this.h)}, ${yR(this.s)*100}%, ${yR(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var _R,xR,mj=Qf(()=>{_R=Math.PI/180,xR=180/Math.PI});function mke(e){if(e instanceof Hm)return new Hm(e.l,e.a,e.b,e.opacity);if(e instanceof Yg)return gke(e);e instanceof xd||(e=CE(e));var t=bj(e.r),r=bj(e.g),n=bj(e.b),i=gj((.2225045*t+.7168786*r+.0606169*n)/dke),a,o;return t===r&&r===n?a=o=i:(a=gj((.4360747*t+.3850649*r+.1430804*n)/hke),o=gj((.0139322*t+.0971045*r+.7141733*n)/pke)),new Hm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function SA(e,t,r,n){return arguments.length===1?mke(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 gj(e){return e>mCt?Math.pow(e,1/3):e/yke+vke}function _j(e){return e>AA?e*e*e:yke*(e-vke)}function xj(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function bj(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function gCt(e){if(e instanceof Yg)return new Yg(e.h,e.c,e.l,e.opacity);if(e instanceof Hm||(e=mke(e)),e.a===0&&e.b===0)return new Yg(NaN,0{pR();gR();mj();bR=18,hke=.96422,dke=1,pke=.82521,vke=4/29,AA=6/29,yke=3*AA*AA,mCt=AA*AA*AA;Xg(Hm,SA,H_(Vm,{brighter(e){return new Hm(this.l+bR*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Hm(this.l-bR*(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=hke*_j(t),e=dke*_j(e),r=pke*_j(r),new xd(xj(3.1338561*t-1.6168667*e-.4906146*r),xj(-.9787684*t+1.9161415*e+.033454*r),xj(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Xg(Yg,zE,H_(Vm,{brighter(e){return new Yg(this.h,this.c,this.l+bR*(e==null?1:e),this.opacity)},darker(e){return new Yg(this.h,this.c,this.l-bR*(e==null?1:e),this.opacity)},rgb(){return gke(this).rgb()}}))});function _Ct(e){if(e instanceof C2)return new C2(e.h,e.s,e.l,e.opacity);e instanceof xd||(e=CE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(wke*n+xke*t-bke*r)/(wke+xke-bke),a=n-i,o=(PE*(r-i)-Tj*a)/wR,s=Math.sqrt(o*o+a*a)/(PE*i*(1-i)),u=s?Math.atan2(o,a)*xR-120:NaN;return new C2(u<0?u+360:u,s,i,e.opacity)}function MA(e,t,r,n){return arguments.length===1?_Ct(e):new C2(e,t,r,n==null?1:n)}function C2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var Tke,wj,Tj,wR,PE,xke,bke,wke,Ake=Qf(()=>{pR();gR();mj();Tke=-.14861,wj=1.78277,Tj=-.29227,wR=-.90649,PE=1.97294,xke=PE*wR,bke=PE*wj,wke=wj*Tj-wR*Tke;Xg(C2,MA,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new C2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new C2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*_R,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new xd(255*(t+r*(Tke*n+wj*i)),255*(t+r*(Tj*n+wR*i)),255*(t+r*(PE*n)),this.opacity)}}))});var L2=Qf(()=>{gR();_ke();Ake()});function Aj(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 TR(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 SR(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 Aj((r-n/t)*t,i,a,o,s)}}var Sj=Qf(()=>{AR()});var EA,Mj=Qf(()=>{EA=e=>()=>e});function Ske(e,t){return function(r){return e+r*t}}function xCt(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 j_(e,t){var r=t-e;return r?Ske(e,r>180||r<-180?r-360*Math.round(r/360):r):EA(isNaN(e)?t:e)}function Mke(e){return(e=+e)==1?ph:function(t,r){return r-t?xCt(t,r,e):EA(isNaN(t)?r:t)}}function ph(e,t){var r=t-e;return r?Ske(e,r):EA(isNaN(e)?t:e)}var z2=Qf(()=>{Mj()});function Eke(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{L2();AR();Sj();z2();IE=function e(t){var r=Mke(t);function n(i,a){var o=r((i=TA(i)).r,(a=TA(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=ph(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return n.gamma=e,n}(1);kke=Eke(TR),Cke=Eke(SR)});function kA(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 Lke(e,t){return(MR(t)?kA:kj)(e,t)}function kj(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{DE();ER()});function kR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var Lj=Qf(()=>{});function Fv(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var RE=Qf(()=>{});function CR(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]=Z_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var zj=Qf(()=>{DE()});function bCt(e){return function(){return e}}function wCt(e){return function(t){return e(t)+""}}function LR(e,t){var r=Ij.lastIndex=Pj.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(n=Ij.exec(e))&&(i=Pj.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,u.push({i:o,x:Fv(n,i)})),r=Pj.lastIndex;return r{RE();Ij=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pj=new RegExp(Ij.source,"g")});function Z_(e,t){var r=typeof t,n;return t==null||r==="boolean"?EA(t):(r==="number"?Fv:r==="string"?(n=W_(t))?(t=n,IE):LR:t instanceof W_?IE:t instanceof Date?kR:MR(t)?kA:Array.isArray(t)?kj:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?CR:Fv)(e,t)}var DE=Qf(()=>{L2();Ej();Cj();Lj();RE();zj();Dj();Mj();ER()});function zke(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var Pke=Qf(()=>{});function Ike(e,t){var r=j_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var Dke=Qf(()=>{z2()});function Rke(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Fke=Qf(()=>{});function Rj(e,t,r,n,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,u/=s),e*n{qke=180/Math.PI,zR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Oke(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zR:Rj(t.a,t.b,t.c,t.d,t.e,t.f)}function Nke(e){return e==null?zR:(PR||(PR=document.createElementNS("http://www.w3.org/2000/svg","g")),PR.setAttribute("transform",e),(e=PR.transform.baseVal.consolidate())?(e=e.matrix,Rj(e.a,e.b,e.c,e.d,e.e,e.f)):zR)}var PR,Uke=Qf(()=>{Bke()});function Vke(e,t,r,n){function i(l){return l.length?l.pop()+" ":""}function a(l,f,c,h,d,p){if(l!==c||f!==h){var x=d.push("translate(",null,t,null,r);p.push({i:x-4,x:Fv(l,c)},{i:x-2,x:Fv(f,h)})}else(c||h)&&d.push("translate("+c+t+h+r)}function o(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Fv(l,f)})):f&&c.push(i(c)+"rotate("+f+n)}function s(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Fv(l,f)}):f&&c.push(i(c)+"skewX("+f+n)}function u(l,f,c,h,d,p){if(l!==c||f!==h){var x=d.push(i(d)+"scale(",null,",",null,")");p.push({i:x-4,x:Fv(l,c)},{i:x-2,x:Fv(f,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,c,h),o(l.rotate,f.rotate,c,h),s(l.skewX,f.skewX,c,h),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(d){for(var p=-1,x=h.length,b;++p{RE();Uke();Hke=Vke(Oke,"px, ","px)","deg)"),Gke=Vke(Nke,", ",")",")")});function jke(e){return((e=Math.exp(e))+1/e)/2}function ACt(e){return((e=Math.exp(e))-1/e)/2}function SCt(e){return((e=Math.exp(2*e))-1)/(e+1)}var TCt,Zke,Xke=Qf(()=>{TCt=1e-12;Zke=function e(t,r,n){function i(a,o){var s=a[0],u=a[1],l=a[2],f=o[0],c=o[1],h=o[2],d=f-s,p=c-u,x=d*d+p*p,b,y;if(x{L2();z2();Kke=Yke(j_),Jke=Yke(ph)});function Fj(e,t){var r=ph((e=SA(e)).l,(t=SA(t)).l),n=ph(e.a,t.a),i=ph(e.b,t.b),a=ph(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 Qke=Qf(()=>{L2();z2()});function eCe(e){return function(t,r){var n=e((t=zE(t)).h,(r=zE(r)).h),i=ph(t.c,r.c),a=ph(t.l,r.l),o=ph(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 tCe,rCe,iCe=Qf(()=>{L2();z2();tCe=eCe(j_),rCe=eCe(ph)});function nCe(e){return function t(r){r=+r;function n(i,a){var o=e((i=MA(i)).h,(a=MA(a)).h),s=ph(i.s,a.s),u=ph(i.l,a.l),l=ph(i.opacity,a.opacity);return function(f){return i.h=o(f),i.s=s(f),i.l=u(Math.pow(f,r)),i.opacity=l(f),i+""}}return n.gamma=t,n}(1)}var aCe,oCe,sCe=Qf(()=>{L2();z2();aCe=nCe(j_),oCe=nCe(ph)});function qj(e,t){t===void 0&&(t=e,e=Z_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{DE()});function uCe(e,t){for(var r=new Array(t),n=0;n{});var P2={};ket(P2,{interpolate:()=>Z_,interpolateArray:()=>Lke,interpolateBasis:()=>TR,interpolateBasisClosed:()=>SR,interpolateCubehelix:()=>aCe,interpolateCubehelixLong:()=>oCe,interpolateDate:()=>kR,interpolateDiscrete:()=>zke,interpolateHcl:()=>tCe,interpolateHclLong:()=>rCe,interpolateHsl:()=>Kke,interpolateHslLong:()=>Jke,interpolateHue:()=>Ike,interpolateLab:()=>Fj,interpolateNumber:()=>Fv,interpolateNumberArray:()=>kA,interpolateObject:()=>CR,interpolateRgb:()=>IE,interpolateRgbBasis:()=>kke,interpolateRgbBasisClosed:()=>Cke,interpolateRound:()=>Rke,interpolateString:()=>LR,interpolateTransformCss:()=>Hke,interpolateTransformSvg:()=>Gke,interpolateZoom:()=>Zke,piecewise:()=>qj,quantize:()=>uCe});var I2=Qf(()=>{DE();Cj();AR();Sj();Lj();Pke();Dke();RE();ER();zj();Fke();Dj();Wke();Xke();Ej();$ke();Qke();iCe();sCe();lCe();fCe()});var IR=Se((Mpr,cCe)=>{"use strict";var MCt=yu(),ECt=Pl();cCe.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,u=a||o.color;if(s>=0){r.i=o.i;var l=n.marker;l.pattern?(!l.colors||!l.pattern.shape)&&(l.color=u,r.color=u):(l.color=u,r.color=u),MCt.pointStyle(t,n,i,r)}else ECt.fill(t,u)}});var Bj=Se((Epr,yCe)=>{"use strict";var hCe=Nl(),dCe=Pl(),pCe=Zr(),kCt=bp().resizeText,CCt=IR();function LCt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");kCt(e,t,"sunburst"),t.each(function(r){var n=hCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){hCe.select(this).call(vCe,o,a,e)})})}function vCe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=pCe.castOption(r,o,"marker.line.color")||dCe.defaultLine,u=pCe.castOption(r,o,"marker.line.width")||0;e.call(CCt,t,r,n).style("stroke-width",u).call(dCe.stroke,s).style("opacity",a?r.leaf.opacity:null)}yCe.exports={style:LCt,styleOne:vCe}});var Kg=Se(uf=>{"use strict";var D2=Zr(),zCt=Pl(),PCt=Ty(),mCe=l_();uf.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(uf.getPtId(n)===t)return r=n.copy()}),r||e};uf.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a0)};uf.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};uf.isHeader=function(e,t){return!(uf.isLeaf(e)||e.depth===t._maxDepth-1)};function gCe(e){return e.data.data.pid}uf.getParent=function(e,t){return uf.findEntryWithLevel(e,gCe(t))};uf.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return uf.listPath(r,t).concat(n)};uf.getPath=function(e){return uf.listPath(e,"label").join("/")+"/"};uf.formatValue=mCe.formatPieValue;uf.formatPercent=function(e,t){var r=D2.formatPercent(e,0);return r==="0%"&&(r=mCe.formatPiePercent(e,t)),r}});var BE=Se((Cpr,bCe)=>{"use strict";var CA=Nl(),_Ce=Ul(),RCt=rv().appendArrayPointValue,FE=jc(),xCe=Zr(),FCt=y3(),ad=Kg(),qCt=l_(),BCt=qCt.formatPieValue;bCe.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,u=o.hierarchy,l=s.type==="sunburst",f=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var c=function(p){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var b=n._fullData[s.index],y=p.data.data,E=y.i,k=ad.isHierarchyRoot(p),A=ad.getParent(u,p),L=ad.getValue(p),_=function(ze){return xCe.castOption(b,E,ze)},C=_("hovertemplate"),M=FE.castHoverinfo(b,x,E),v=x.separators,z;if(C||M&&M!=="none"&&M!=="skip"){var T,F;l&&(T=o.cx+p.pxmid[0]*(1-p.rInscribed),F=o.cy+p.pxmid[1]*(1-p.rInscribed)),f&&(T=p._hoverX,F=p._hoverY);var q={},U=[],H=[],j=function(ze){return U.indexOf(ze)!==-1};M&&(U=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),q.label=y.label,j("label")&&q.label&&H.push(q.label),y.hasOwnProperty("v")&&(q.value=y.v,q.valueLabel=BCt(q.value,v),j("value")&&H.push(q.valueLabel)),q.currentPath=p.currentPath=ad.getPath(p.data),j("current path")&&!k&&H.push(q.currentPath);var G,O=[],W=function(){O.indexOf(G)===-1&&(H.push(G),O.push(G))};q.percentParent=p.percentParent=L/ad.getValue(A),q.parent=p.parentString=ad.getPtLabel(A),j("percent parent")&&(G=ad.formatPercent(q.percentParent,v)+" of "+q.parent,W()),q.percentEntry=p.percentEntry=L/ad.getValue(r),q.entry=p.entry=ad.getPtLabel(r),j("percent entry")&&!k&&!p.onPathbar&&(G=ad.formatPercent(q.percentEntry,v)+" of "+q.entry,W()),q.percentRoot=p.percentRoot=L/ad.getValue(u),q.root=p.root=ad.getPtLabel(u),j("percent root")&&!k&&(G=ad.formatPercent(q.percentRoot,v)+" of "+q.root,W()),q.text=_("hovertext")||_("text"),j("text")&&(G=q.text,xCe.isValidTextValue(G)&&H.push(G)),z=[qE(p,b,a.eventDataKeys)];var re={trace:b,y:F,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:H.join("
"),name:C||j("name")?b.name:void 0,color:_("hoverlabel.bgcolor")||y.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),fontWeight:_("hoverlabel.font.weight"),fontStyle:_("hoverlabel.font.style"),fontVariant:_("hoverlabel.font.variant"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:z};l&&(re.x0=T-p.rInscribed*p.rpx1,re.x1=T+p.rInscribed*p.rpx1,re.idealAlign=p.pxmid[0]<0?"left":"right"),f&&(re.x=T,re.idealAlign=T<0?"left":"right");var ne=[];FE.loneHover(re,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ne}),z[0].bbox=ne[0],s._hasHoverLabel=!0}if(f){var be=t.select("path.surface");a.styleOne(be,p,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:z||[qE(p,b,a.eventDataKeys)],event:CA.event})}},h=function(p){var x=n._fullLayout,b=n._fullData[s.index],y=CA.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=CA.event,n.emit("plotly_unhover",{points:[qE(y,b,a.eventDataKeys)],event:CA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(FE.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),f){var E=t.select("path.surface");a.styleOne(E,y,b,n,{hovered:!1})}},d=function(p){var x=n._fullLayout,b=n._fullData[s.index],y=l&&(ad.isHierarchyRoot(p)||ad.isLeaf(p)),E=ad.getPtId(p),k=ad.isEntry(p)?ad.findEntryWithChild(u,E):ad.findEntryWithLevel(u,E),A=ad.getPtId(k),L={points:[qE(p,b,a.eventDataKeys)],event:CA.event};y||(L.nextLevel=A);var _=FCt.triggerHandler(n,"plotly_"+s.type+"click",L);if(_!==!1&&x.hovermode&&(n._hoverdata=[qE(p,b,a.eventDataKeys)],FE.click(n,CA.event)),!y&&_!==!1&&!n._dragging&&!n._transitioning){_Ce.call("_storeDirectGUIEdit",b,x._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:A}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};FE.loneUnhover(x._hoverlayer.node()),_Ce.call("animate",n,C,M)}};t.on("mouseover",c),t.on("mouseout",h),t.on("click",d)};function qE(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 OE=Nl(),OCt=SE(),Xy=(I2(),ab(P2)).interpolate,wCe=yu(),Tp=Zr(),NCt=Bf(),MCe=bp(),TCe=MCe.recordMinTextSize,UCt=MCe.clearMinTextSize,ECe=hR(),VCt=l_().getRotationAngle,HCt=ECe.computeTransform,GCt=ECe.transformInsideText,WCt=Bj().styleOne,jCt=N0().resizeText,ZCt=BE(),Oj=pj(),kf=Kg();DR.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,u=!r,l=!i.uniformtext.mode&&kf.hasTransition(r);if(UCt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(c){return c[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),l){n&&(s=n());var f=OE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});f.each(function(){a.selectAll("g.trace").each(function(c){ACe(e,c,this,r)})})}else o.each(function(c){ACe(e,c,this,r)}),i.uniformtext.mode&&jCt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");u&&o.exit().remove()};function ACe(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&kf.hasTransition(n),s=OE.select(r),u=s.selectAll("g.slice"),l=t[0],f=l.trace,c=l.hierarchy,h=kf.findEntryWithLevel(c,f.level),d=kf.getMaxDepth(f),p=a._size,x=f.domain,b=p.w*(x.x[1]-x.x[0]),y=p.h*(x.y[1]-x.y[0]),E=.5*Math.min(b,y),k=l.cx=p.l+p.w*(x.x[1]+x.x[0])/2,A=l.cy=p.t+p.h*(1-x.y[0])-y/2;if(!h)return u.remove();var L=null,_={};o&&u.each(function(he){_[kf.getPtId(he)]={rpx0:he.rpx0,rpx1:he.rpx1,x0:he.x0,x1:he.x1,transform:he.transform},!L&&kf.isEntry(he)&&(L=he)});var C=XCt(h).descendants(),M=h.height+1,v=0,z=d;l.hasMultipleRoots&&kf.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,v=1,z+=1),C=C.filter(function(he){return he.y1<=z});var T=VCt(f.rotation);T&&C.forEach(function(he){he.x0+=T,he.x1+=T});var F=Math.min(M,d),q=function(he){return(he-v)/F*E},U=function(he,te){return[he*Math.cos(te),-he*Math.sin(te)]},H=function(he){return Tp.pathAnnulus(he.rpx0,he.rpx1,he.x0,he.x1,k,A)},j=function(he){return k+SCe(he)[0]*(he.transform.rCenter||0)+(he.transform.x||0)},G=function(he){return A+SCe(he)[1]*(he.transform.rCenter||0)+(he.transform.y||0)};u=u.data(C,kf.getPtId),u.enter().append("g").classed("slice",!0),o?u.exit().transition().each(function(){var he=OE.select(this),te=he.select("path.surface");te.transition().attrTween("d",function(Ee){var Me=ne(Ee);return function(Oe){return H(Me(Oe))}});var ke=he.select("g.slicetext");ke.attr("opacity",0)}).remove():u.exit().remove(),u.order();var O=null;if(o&&L){var W=kf.getPtId(L);u.each(function(he){O===null&&kf.getPtId(he)===W&&(O=he.x1)})}var re=u;o&&(re=re.transition().each("end",function(){var he=OE.select(this);kf.setSliceCursor(he,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(he){var te=OE.select(this),ke=Tp.ensureSingle(te,"path","surface",function(Be){Be.style("pointer-events",i?"none":"all")});he.rpx0=q(he.y0),he.rpx1=q(he.y1),he.xmid=(he.x0+he.x1)/2,he.pxmid=U(he.rpx1,he.xmid),he.midangle=-(he.xmid-Math.PI/2),he.startangle=-(he.x0-Math.PI/2),he.stopangle=-(he.x1-Math.PI/2),he.halfangle=.5*Math.min(Tp.angleDelta(he.x0,he.x1)||Math.PI,Math.PI),he.ring=1-he.rpx0/he.rpx1,he.rInscribed=YCt(he,f),o?ke.transition().attrTween("d",function(Be){var fe=be(Be);return function(Ze){return H(fe(Ze))}}):ke.attr("d",H),te.call(ZCt,h,e,t,{eventDataKeys:Oj.eventDataKeys,transitionTime:Oj.CLICK_TRANSITION_TIME,transitionEasing:Oj.CLICK_TRANSITION_EASING}).call(kf.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),ke.call(WCt,he,f,e);var Ee=Tp.ensureSingle(te,"g","slicetext"),Me=Tp.ensureSingle(Ee,"text","",function(Be){Be.attr("data-notex",1)}),Oe=Tp.ensureUniformFontSize(e,kf.determineTextFont(f,he,a.font));Me.text(DR.formatSliceLabel(he,h,f,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(wCe.font,Oe).call(NCt.convertToTspans,e);var Re=wCe.bBox(Me.node());he.transform=GCt(Re,he,l),he.transform.targetX=j(he),he.transform.targetY=G(he);var me=function(Be,fe){var Ze=Be.transform;return HCt(Ze,fe),Ze.fontSize=Oe.size,TCe(f.type,Ze,a),Tp.getTextTransform(Ze)};o?Me.transition().attrTween("transform",function(Be){var fe=ze(Be);return function(Ze){return me(fe(Ze),Re)}}):Me.attr("transform",me(he,Re))});function ne(he){var te=kf.getPtId(he),ke=_[te],Ee=_[kf.getPtId(h)],Me;if(Ee){var Oe=(he.x1>Ee.x1?2*Math.PI:0)+T;Me=he.rpx1O?2*Math.PI:0)+T;ke={x0:Me,x1:Me}}else ke={rpx0:E,rpx1:E},Tp.extendFlat(ke,Ce(he));else ke={rpx0:0,rpx1:0};else ke={x0:T,x1:T};return Xy(ke,Ee)}function ze(he){var te=_[kf.getPtId(he)],ke,Ee=he.transform;if(te)ke=te;else if(ke={rpx1:he.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(he.parent)if(O){var Me=he.x1>O?2*Math.PI:0;ke.x0=ke.x1=Me}else Tp.extendFlat(ke,Ce(he));else ke.x0=ke.x1=T;else ke.x0=ke.x1=T;var Oe=Xy(ke.transform.textPosAngle,he.transform.textPosAngle),Re=Xy(ke.rpx1,he.rpx1),me=Xy(ke.x0,he.x0),Be=Xy(ke.x1,he.x1),fe=Xy(ke.transform.scale,Ee.scale),Ze=Xy(ke.transform.rotate,Ee.rotate),et=Ee.rCenter===0?3:ke.transform.rCenter===0?1/3:1,gt=Xy(ke.transform.rCenter,Ee.rCenter),Pt=function(Qe){return gt(Math.pow(Qe,et))};return function(Qe){var Xe=Re(Qe),Tt=me(Qe),xt=Be(Qe),_t=Pt(Qe),Ct=U(Xe,(Tt+xt)/2),jt=Oe(Qe),At={pxmid:Ct,rpx1:Xe,transform:{textPosAngle:jt,rCenter:_t,x:Ee.x,y:Ee.y}};return TCe(f.type,Ee,a),{transform:{targetX:j(At),targetY:G(At),scale:fe(Qe),rotate:Ze(Qe),rCenter:_t}}}}function Ce(he){var te=he.parent,ke=_[kf.getPtId(te)],Ee={};if(ke){var Me=te.children,Oe=Me.indexOf(he),Re=Me.length,me=Xy(ke.x0,ke.x1);Ee.x0=me(Oe/Re),Ee.x1=me(Oe/Re)}else Ee.x0=Ee.x1=0;return Ee}}function XCt(e){return OCt.partition().size([2*Math.PI,e.height+1])(e)}DR.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,u=n[0],l=e.data.data,f=u.hierarchy,c=kf.isHierarchyRoot(e),h=kf.getParent(f,e),d=kf.getValue(e);if(!a){var p=o.split("+"),x=function(v){return p.indexOf(v)!==-1},b=[],y;if(x("label")&&l.label&&b.push(l.label),l.hasOwnProperty("v")&&x("value")&&b.push(kf.formatValue(l.v,s)),!c){x("current path")&&b.push(kf.getPath(e.data));var E=0;x("percent parent")&&E++,x("percent entry")&&E++,x("percent root")&&E++;var k=E>1;if(E){var A,L=function(v){y=kf.formatPercent(A,s),k&&(y+=" of "+v),b.push(y)};x("percent parent")&&!c&&(A=d/kf.getValue(h),L("parent")),x("percent entry")&&(A=d/kf.getValue(t),L("entry")),x("percent root")&&(A=d/kf.getValue(f),L("root"))}}return x("text")&&(y=Tp.castOption(r,l.i,"text"),Tp.isValidTextValue(y)&&b.push(y)),b.join("
")}var _=Tp.castOption(r,l.i,"texttemplate");if(!_)return"";var C={};l.label&&(C.label=l.label),l.hasOwnProperty("v")&&(C.value=l.v,C.valueLabel=kf.formatValue(l.v,s)),C.currentPath=kf.getPath(e.data),c||(C.percentParent=d/kf.getValue(h),C.percentParentLabel=kf.formatPercent(C.percentParent,s),C.parent=kf.getPtLabel(h)),C.percentEntry=d/kf.getValue(t),C.percentEntryLabel=kf.formatPercent(C.percentEntry,s),C.entry=kf.getPtLabel(t),C.percentRoot=d/kf.getValue(f),C.percentRootLabel=kf.formatPercent(C.percentRoot,s),C.root=kf.getPtLabel(f),l.hasOwnProperty("color")&&(C.color=l.color);var M=Tp.castOption(r,l.i,"text");return(Tp.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=Tp.castOption(r,l.i,"customdata"),Tp.texttemplateString(_,C,i._d3locale,C,r._meta||{})};function YCt(e){return e.rpx0===0&&Tp.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function SCe(e){return KCt(e.rpx1,e.transform.textPosAngle)}function KCt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var CCe=Se((zpr,kCe)=>{"use strict";kCe.exports={moduleType:"trace",name:"sunburst",basePlotModule:HEe(),categories:[],animatable:!0,attributes:AE(),layoutAttributes:vj(),supplyDefaults:JEe(),supplyLayoutDefaults:QEe(),calc:EE().calc,crossTraceCalc:EE().crossTraceCalc,plot:RR().plot,style:Bj().style,colorbar:ep(),meta:{}}});var zCe=Se((Ppr,LCe)=>{"use strict";LCe.exports=CCe()});var ICe=Se(LA=>{"use strict";var PCe=Sc();LA.name="treemap";LA.plot=function(e,t,r,n){PCe.plotBasePlot(LA.name,e,t,r,n)};LA.clean=function(e,t,r,n){PCe.cleanBasePlot(LA.name,e,t,r,n)}});var R2=Se((Dpr,DCe)=>{"use strict";DCe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var FR=Se((Rpr,FCe)=>{"use strict";var JCt=Du().hovertemplateAttrs,$Ct=Du().texttemplateAttrs,QCt=Xf(),eLt=Ec().attributes,F2=A2(),Q0=AE(),RCe=R2(),Nj=vu().extendFlat,tLt=Id().pattern;FCe.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:Nj({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:tLt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Q0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},QCt("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:Nj({},F2.textfont,{}),editType:"calc"},text:F2.text,textinfo:Q0.textinfo,texttemplate:$Ct({editType:"plot"},{keys:RCe.eventDataKeys.concat(["label","value"])}),hovertext:F2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:JCt({},{keys:RCe.eventDataKeys}),textfont:F2.textfont,insidetextfont:F2.insidetextfont,outsidetextfont:Nj({},F2.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:F2.sort,root:Q0.root,domain:eLt({name:"treemap",trace:!0,editType:"calc"})}});var Uj=Se((Fpr,qCe)=>{"use strict";qCe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var UCe=Se((qpr,NCe)=>{"use strict";var BCe=Zr(),rLt=FR(),iLt=Pl(),nLt=Ec().defaults,aLt=r0().handleText,oLt=Qb().TEXTPAD,sLt=S2().handleMarkerDefaults,OCe=fc(),lLt=OCe.hasColorscale,uLt=OCe.handleDefaults;NCe.exports=function(t,r,n,i){function a(b,y){return BCe.coerce(t,r,rLt,b,y)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var l=a("tiling.packing");l==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var f=a("text");a("texttemplate"),r.texttemplate||a("textinfo",BCe.isArrayOrTypedArray(f)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c=a("pathbar.visible"),h="auto";aLt(t,r,i,a,h,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;sLt(t,r,i,a);var p=r._hasColorscale=lLt(t,"marker","colors")||(t.marker||{}).coloraxis;p?uLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;a("marker.pad.t",d?x/4:x),a("marker.pad.l",x/4),a("marker.pad.r",x/4),a("marker.pad.b",d?x:x/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:iLt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*oLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),nLt(r,i,a),r._length=null}});var HCe=Se((Bpr,VCe)=>{"use strict";var fLt=Zr(),cLt=Uj();VCe.exports=function(t,r){function n(i,a){return fLt.coerce(t,r,cLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var Hj=Se(Vj=>{"use strict";var GCe=EE();Vj.calc=function(e,t){return GCe.calc(e,t)};Vj.crossTraceCalc=function(e){return GCe._runCrossTraceCalc("treemap",e)}});var Gj=Se((Npr,WCe)=>{"use strict";WCe.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=SE(),hLt=Gj();jCe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],u=n.pad[i?"right":"left"],l=n.pad[i?"left":"right"],f=n.pad[a?"top":"bottom"],c;o&&(c=u,u=s,s=c,c=l,l=f,f=c);var h=zA.treemap().tile(dLt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(u).paddingRight(l).paddingTop(s).paddingBottom(f).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&hLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function dLt(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 qR=Se((Vpr,KCe)=>{"use strict";var ZCe=Nl(),PA=Pl(),XCe=Zr(),jj=Kg(),pLt=bp().resizeText,vLt=IR();function yLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");pLt(e,t,"treemap"),t.each(function(r){var n=ZCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){ZCe.select(this).call(YCe,o,a,e,{hovered:!1})})})}function YCe(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,u,l,f=o.color,c=jj.isHierarchyRoot(t),h=1;if(a)u=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(c&&f===r.root.color)h=100,u="rgba(0,0,0,0)",l=0;else if(u=XCe.castOption(r,s,"marker.line.color")||PA.defaultLine,l=XCe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var p=PA.combine(PA.addOpacity(r._backgroundColor,.75),f),x;if(d===!0){var b=jj.getMaxDepth(r);isFinite(b)?jj.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var y=0;y{"use strict";var JCe=Nl(),BR=Zr(),$Ce=yu(),mLt=Bf(),gLt=Wj(),QCe=qR().styleOne,Zj=R2(),IA=Kg(),_Lt=BE(),Xj=!0;eLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,u=a.height,l=a.viewX,f=a.viewY,c=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,p=a.hasTransition,x=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,y=a.makeUpdateTextInterpolator,E={},k=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=L.hierarchy,M=s/_._entryDepth,v=IA.listPath(n.data,"id"),z=gLt(C.copy(),[s,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();z=z.filter(function(F){var q=v.indexOf(F.data.id);return q===-1?!1:(F.x0=M*q,F.x1=M*(q+1),F.y0=o,F.y1=o+u,F.onPathbar=!0,!0)}),z.reverse(),i=i.data(z,IA.getPtId),i.enter().append("g").classed("pathbar",!0),x(i,Xj,E,[s,u],c),i.order();var T=i;p&&(T=T.transition().each("end",function(){var F=JCe.select(this);IA.setSliceCursor(F,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(F){F._x0=l(F.x0),F._x1=l(F.x1),F._y0=f(F.y0),F._y1=f(F.y1),F._hoverX=l(F.x1-Math.min(s,u)/2),F._hoverY=f(F.y1-u/2);var q=JCe.select(this),U=BR.ensureSingle(q,"path","surface",function(O){O.style("pointer-events",k?"none":"all")});p?U.transition().attrTween("d",function(O){var W=b(O,Xj,E,[s,u]);return function(re){return c(W(re))}}):U.attr("d",c),q.call(_Lt,n,t,r,{styleOne:QCe,eventDataKeys:Zj.eventDataKeys,transitionTime:Zj.CLICK_TRANSITION_TIME,transitionEasing:Zj.CLICK_TRANSITION_EASING}).call(IA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call(QCe,F,_,t,{hovered:!1}),F._text=(IA.getPtLabel(F)||"").split("
").join(" ")||"";var H=BR.ensureSingle(q,"g","slicetext"),j=BR.ensureSingle(H,"text","",function(O){O.attr("data-notex",1)}),G=BR.ensureUniformFontSize(t,IA.determineTextFont(_,F,A.font,{onPathbar:!0}));j.text(F._text||" ").classed("slicetext",!0).attr("text-anchor","start").call($Ce.font,G).call(mLt.convertToTspans,t),F.textBB=$Ce.bBox(j.node()),F.transform=h(F,{fontSize:G.size,onPathbar:!0}),F.transform.fontSize=G.size,p?j.transition().attrTween("transform",function(O){var W=y(O,Xj,E,[s,u]);return function(re){return d(W(re))}}):j.attr("transform",d(F))})}});var aLe=Se((Gpr,nLe)=>{"use strict";var rLe=Nl(),Yj=(I2(),ab(P2)).interpolate,X_=Kg(),NE=Zr(),iLe=Qb().TEXTPAD,xLt=i2(),bLt=xLt.toMoveInsideBar,wLt=bp(),Kj=wLt.recordMinTextSize,TLt=R2(),ALt=tLe();function q2(e){return X_.isHierarchyRoot(e)?"":X_.getPtId(e)}nLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],u=s.trace,l=u.type,f=l==="icicle",c=s.hierarchy,h=X_.findEntryWithLevel(c,u.level),d=rLe.select(n),p=d.selectAll("g.pathbar"),x=d.selectAll("g.slice");if(!h){p.remove(),x.remove();return}var b=X_.isHierarchyRoot(h),y=!o.uniformtext.mode&&X_.hasTransition(i),E=X_.getMaxDepth(u),k=function(Te){return Te.data.depth-h.data.depth-1?C+z:-(v+z):0,F={x0:M,x1:M,y0:T,y1:T+v},q=function(Te,nt,ut){var ct=u.tiling.pad,rt=function(Mt){return Mt-ct<=nt.x0},je=function(Mt){return Mt+ct>=nt.x1},tt=function(Mt){return Mt-ct<=nt.y0},Je=function(Mt){return Mt+ct>=nt.y1};return Te.x0===nt.x0&&Te.x1===nt.x1&&Te.y0===nt.y0&&Te.y1===nt.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:rt(Te.x0-ct)?0:je(Te.x0-ct)?ut[0]:Te.x0,x1:rt(Te.x1+ct)?0:je(Te.x1+ct)?ut[0]:Te.x1,y0:tt(Te.y0-ct)?0:Je(Te.y0-ct)?ut[1]:Te.y0,y1:tt(Te.y1+ct)?0:Je(Te.y1+ct)?ut[1]:Te.y1}},U=null,H={},j={},G=null,O=function(Te,nt){return nt?H[q2(Te)]:j[q2(Te)]},W=function(Te,nt,ut,ct){if(nt)return H[q2(c)]||F;var rt=j[u.level]||ut;return k(Te)?q(Te,rt,ct):{}};s.hasMultipleRoots&&b&&E++,u._maxDepth=E,u._backgroundColor=o.paper_bgcolor,u._entryDepth=h.data.depth,u._atRootLevel=b;var re=-_/2+A.l+A.w*(L.x[1]+L.x[0])/2,ne=-C/2+A.t+A.h*(1-(L.y[1]+L.y[0])/2),be=function(Te){return re+Te},ze=function(Te){return ne+Te},Ce=ze(0),he=be(0),te=function(Te){return he+Te},ke=function(Te){return Ce+Te};function Ee(Te,nt){return Te+","+nt}var Me=te(0),Oe=function(Te){Te.x=Math.max(Me,Te.x)},Re=u.pathbar.edgeshape,me=function(Te){var nt=te(Math.max(Math.min(Te.x0,Te.x0),0)),ut=te(Math.min(Math.max(Te.x1,Te.x1),M)),ct=ke(Te.y0),rt=ke(Te.y1),je=v/2,tt={},Je={};tt.x=nt,Je.x=ut,tt.y=Je.y=(ct+rt)/2;var Mt={x:nt,y:ct},Vt={x:ut,y:ct},Kt={x:ut,y:rt},ir={x:nt,y:rt};return Re===">"?(Mt.x-=je,Vt.x-=je,Kt.x-=je,ir.x-=je):Re==="/"?(Kt.x-=je,ir.x-=je,tt.x-=je/2,Je.x-=je/2):Re==="\\"?(Mt.x-=je,Vt.x-=je,tt.x-=je/2,Je.x-=je/2):Re==="<"&&(tt.x-=je,Je.x-=je),Oe(Mt),Oe(ir),Oe(tt),Oe(Vt),Oe(Kt),Oe(Je),"M"+Ee(Mt.x,Mt.y)+"L"+Ee(Vt.x,Vt.y)+"L"+Ee(Je.x,Je.y)+"L"+Ee(Kt.x,Kt.y)+"L"+Ee(ir.x,ir.y)+"L"+Ee(tt.x,tt.y)+"Z"},Be=u[f?"tiling":"marker"].pad,fe=function(Te){return u.textposition.indexOf(Te)!==-1},Ze=fe("top"),et=fe("left"),gt=fe("right"),Pt=fe("bottom"),Qe=function(Te){var nt=be(Te.x0),ut=be(Te.x1),ct=ze(Te.y0),rt=ze(Te.y1),je=ut-nt,tt=rt-ct;if(!je||!tt)return"";var Je=u.marker.cornerradius||0,Mt=Math.min(Je,je/2,tt/2);Mt&&Te.data&&Te.data.data&&Te.data.data.label&&(Ze&&(Mt=Math.min(Mt,Be.t)),et&&(Mt=Math.min(Mt,Be.l)),gt&&(Mt=Math.min(Mt,Be.r)),Pt&&(Mt=Math.min(Mt,Be.b)));var Vt=function(Kt,ir){return Mt?"a"+Ee(Mt,Mt)+" 0 0 1 "+Ee(Kt,ir):""};return"M"+Ee(nt,ct+Mt)+Vt(Mt,-Mt)+"L"+Ee(ut-Mt,ct)+Vt(Mt,Mt)+"L"+Ee(ut,rt-Mt)+Vt(-Mt,Mt)+"L"+Ee(nt+Mt,rt)+Vt(-Mt,-Mt)+"Z"},Xe=function(Te,nt){var ut=Te.x0,ct=Te.x1,rt=Te.y0,je=Te.y1,tt=Te.textBB,Je=Ze||nt.isHeader&&!Pt,Mt=Je?"start":Pt?"end":"middle",Vt=fe("right"),Kt=fe("left")||nt.onPathbar,ir=Kt?-1:Vt?1:0;if(nt.isHeader){if(ut+=(f?Be:Be.l)-iLe,ct-=(f?Be:Be.r)-iLe,ut>=ct){var fr=(ut+ct)/2;ut=fr,ct=fr}var Ot;Pt?(Ot=je-(f?Be:Be.b),rt{"use strict";var SLt=Nl(),MLt=Kg(),ELt=bp(),kLt=ELt.clearMinTextSize,CLt=N0().resizeText,oLe=aLe();sLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,u=t._fullLayout,l=u["_"+o+"layer"],f,c,h=!n;if(kLt(o,u),f=l.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),f.enter().append("g").classed("trace",!0).classed(o,!0),f.order(),!u.uniformtext.mode&&MLt.hasTransition(n)){i&&(c=i());var d=SLt.transition().duration(n.duration).ease(n.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()});d.each(function(){l.selectAll("g.trace").each(function(p){oLe(t,p,this,n,s)})})}else f.each(function(p){oLe(t,p,this,n,s)}),u.uniformtext.mode&&CLt(t,l.selectAll(".trace"),o);h&&f.exit().remove()}});var hLe=Se((jpr,cLe)=>{"use strict";var lLe=Nl(),OR=Zr(),uLe=yu(),LLt=Bf(),zLt=Wj(),fLe=qR().styleOne,$j=R2(),Y_=Kg(),PLt=BE(),ILt=RR().formatSliceLabel,Qj=!1;cLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,u=a.viewX,l=a.viewY,f=a.pathSlice,c=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,y=a.prevEntry,E={},k=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,v=_.textposition.indexOf("bottom")!==-1,z=!v&&!_.marker.pad.t||v&&!_.marker.pad.b,T=zLt(n,[o,s],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),F=T.descendants(),q=1/0,U=-1/0;F.forEach(function(W){var re=W.depth;re>=_._maxDepth?(W.x0=W.x1=(W.x0+W.x1)/2,W.y0=W.y1=(W.y0+W.y1)/2):(q=Math.min(q,re),U=Math.max(U,re))}),i=i.data(F,Y_.getPtId),_._maxVisibleLayers=isFinite(U)?U-q+1:0,i.enter().append("g").classed("slice",!0),p(i,Qj,E,[o,s],f),i.order();var H=null;if(d&&y){var j=Y_.getPtId(y);i.each(function(W){H===null&&Y_.getPtId(W)===j&&(H={x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1})})}var G=function(){return H||{x0:0,x1:o,y0:0,y1:s}},O=i;return d&&(O=O.transition().each("end",function(){var W=lLe.select(this);Y_.setSliceCursor(W,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),O.each(function(W){var re=Y_.isHeader(W,_);W._x0=u(W.x0),W._x1=u(W.x1),W._y0=l(W.y0),W._y1=l(W.y1),W._hoverX=u(W.x1-_.marker.pad.r),W._hoverY=l(v?W.y1-_.marker.pad.b/2:W.y0+_.marker.pad.t/2);var ne=lLe.select(this),be=OR.ensureSingle(ne,"path","surface",function(Ee){Ee.style("pointer-events",k?"none":"all")});d?be.transition().attrTween("d",function(Ee){var Me=x(Ee,Qj,G(),[o,s]);return function(Oe){return f(Me(Oe))}}):be.attr("d",f),ne.call(PLt,n,t,r,{styleOne:fLe,eventDataKeys:$j.eventDataKeys,transitionTime:$j.CLICK_TRANSITION_TIME,transitionEasing:$j.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),be.call(fLe,W,_,t,{hovered:!1}),W.x0===W.x1||W.y0===W.y1?W._text="":re?W._text=z?"":Y_.getPtLabel(W)||"":W._text=ILt(W,n,_,r,A)||"";var ze=OR.ensureSingle(ne,"g","slicetext"),Ce=OR.ensureSingle(ze,"text","",function(Ee){Ee.attr("data-notex",1)}),he=OR.ensureUniformFontSize(t,Y_.determineTextFont(_,W,A.font)),te=W._text||" ",ke=re&&te.indexOf("
")===-1;Ce.text(te).classed("slicetext",!0).attr("text-anchor",M?"end":C||ke?"start":"middle").call(uLe.font,he).call(LLt.convertToTspans,t),W.textBB=uLe.bBox(Ce.node()),W.transform=c(W,{fontSize:he.size,isHeader:re}),W.transform.fontSize=he.size,d?Ce.transition().attrTween("transform",function(Ee){var Me=b(Ee,Qj,G(),[o,s]);return function(Oe){return h(Me(Oe))}}):Ce.attr("transform",h(W))}),H}});var pLe=Se((Zpr,dLe)=>{"use strict";var DLt=Jj(),RLt=hLe();dLe.exports=function(t,r,n,i){return DLt(t,r,n,i,{type:"treemap",drawDescendants:RLt})}});var yLe=Se((Xpr,vLe)=>{"use strict";vLe.exports={moduleType:"trace",name:"treemap",basePlotModule:ICe(),categories:[],animatable:!0,attributes:FR(),layoutAttributes:Uj(),supplyDefaults:UCe(),supplyLayoutDefaults:HCe(),calc:Hj().calc,crossTraceCalc:Hj().crossTraceCalc,plot:pLe(),style:qR().style,colorbar:ep(),meta:{}}});var gLe=Se((Ypr,mLe)=>{"use strict";mLe.exports=yLe()});var xLe=Se(DA=>{"use strict";var _Le=Sc();DA.name="icicle";DA.plot=function(e,t,r,n){_Le.plotBasePlot(DA.name,e,t,r,n)};DA.clean=function(e,t,r,n){_Le.cleanBasePlot(DA.name,e,t,r,n)}});var eZ=Se((Jpr,wLe)=>{"use strict";var FLt=Du().hovertemplateAttrs,qLt=Du().texttemplateAttrs,BLt=Xf(),OLt=Ec().attributes,UE=A2(),o0=AE(),NR=FR(),bLe=R2(),NLt=vu().extendFlat,ULt=Id().pattern;wLe.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:NR.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:NLt({colors:o0.marker.colors,line:o0.marker.line,pattern:ULt,editType:"calc"},BLt("marker",{colorAttr:"colors",anim:!1})),leaf:o0.leaf,pathbar:NR.pathbar,text:UE.text,textinfo:o0.textinfo,texttemplate:qLt({editType:"plot"},{keys:bLe.eventDataKeys.concat(["label","value"])}),hovertext:UE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:FLt({},{keys:bLe.eventDataKeys}),textfont:UE.textfont,insidetextfont:UE.insidetextfont,outsidetextfont:NR.outsidetextfont,textposition:NR.textposition,sort:UE.sort,root:o0.root,domain:OLt({name:"icicle",trace:!0,editType:"calc"})}});var tZ=Se(($pr,TLe)=>{"use strict";TLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ELe=Se((Qpr,MLe)=>{"use strict";var ALe=Zr(),VLt=eZ(),HLt=Pl(),GLt=Ec().defaults,WLt=r0().handleText,jLt=Qb().TEXTPAD,ZLt=S2().handleMarkerDefaults,SLe=fc(),XLt=SLe.hasColorscale,YLt=SLe.handleDefaults;MLe.exports=function(t,r,n,i){function a(d,p){return ALe.coerce(t,r,VLt,d,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var l=a("text");a("texttemplate"),r.texttemplate||a("textinfo",ALe.isArrayOrTypedArray(l)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f=a("pathbar.visible"),c="auto";WLt(t,r,i,a,c,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),ZLt(t,r,i,a);var h=r._hasColorscale=XLt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&YLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:HLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*jLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),GLt(r,i,a),r._length=null}});var CLe=Se((evr,kLe)=>{"use strict";var KLt=Zr(),JLt=tZ();kLe.exports=function(t,r){function n(i,a){return KLt.coerce(t,r,JLt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var iZ=Se(rZ=>{"use strict";var LLe=EE();rZ.calc=function(e,t){return LLe.calc(e,t)};rZ.crossTraceCalc=function(e){return LLe._runCrossTraceCalc("icicle",e)}});var PLe=Se((rvr,zLe)=>{"use strict";var $Lt=SE(),QLt=Gj();zLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,u=r[0],l=r[1];s&&(u=(t.height+1)*r[0]/Math.min(t.height+1,s),l=(t.height+1)*r[1]/Math.min(t.height+1,s));var f=$Lt.partition().padding(n.pad.inner).size(o?[r[1],u]:[r[0],l])(t);return(o||i||a)&&QLt(f,r,{swapXY:o,flipX:i,flipY:a}),f}});var nZ=Se((ivr,qLe)=>{"use strict";var ILe=Nl(),DLe=Pl(),RLe=Zr(),ezt=bp().resizeText,tzt=IR();function rzt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");ezt(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=RLe.castOption(r,o,"marker.line.color")||DLe.defaultLine,u=RLe.castOption(r,o,"marker.line.width")||0;e.call(tzt,t,r,n).style("stroke-width",u).call(DLe.stroke,s).style("opacity",a?r.leaf.opacity:null)}qLe.exports={style:rzt,styleOne:FLe}});var VLe=Se((nvr,ULe)=>{"use strict";var BLe=Nl(),UR=Zr(),OLe=yu(),izt=Bf(),nzt=PLe(),NLe=nZ().styleOne,aZ=R2(),RA=Kg(),azt=BE(),ozt=RR().formatSliceLabel,oZ=!1;ULe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,u=a.viewX,l=a.viewY,f=a.pathSlice,c=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,y=a.prevEntry,E={},k=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,v=_.textposition.indexOf("bottom")!==-1,z=nzt(n,[o,s],{flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,orientation:_.tiling.orientation,pad:{inner:_.tiling.pad},maxDepth:_._maxDepth}),T=z.descendants(),F=1/0,q=-1/0;T.forEach(function(O){var W=O.depth;W>=_._maxDepth?(O.x0=O.x1=(O.x0+O.x1)/2,O.y0=O.y1=(O.y0+O.y1)/2):(F=Math.min(F,W),q=Math.max(q,W))}),i=i.data(T,RA.getPtId),_._maxVisibleLayers=isFinite(q)?q-F+1:0,i.enter().append("g").classed("slice",!0),p(i,oZ,E,[o,s],f),i.order();var U=null;if(d&&y){var H=RA.getPtId(y);i.each(function(O){U===null&&RA.getPtId(O)===H&&(U={x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1})})}var j=function(){return U||{x0:0,x1:o,y0:0,y1:s}},G=i;return d&&(G=G.transition().each("end",function(){var O=BLe.select(this);RA.setSliceCursor(O,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(O){O._x0=u(O.x0),O._x1=u(O.x1),O._y0=l(O.y0),O._y1=l(O.y1),O._hoverX=u(O.x1-_.tiling.pad),O._hoverY=l(v?O.y1-_.tiling.pad/2:O.y0+_.tiling.pad/2);var W=BLe.select(this),re=UR.ensureSingle(W,"path","surface",function(Ce){Ce.style("pointer-events",k?"none":"all")});d?re.transition().attrTween("d",function(Ce){var he=x(Ce,oZ,j(),[o,s],{orientation:_.tiling.orientation,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1});return function(te){return f(he(te))}}):re.attr("d",f),W.call(azt,n,t,r,{styleOne:NLe,eventDataKeys:aZ.eventDataKeys,transitionTime:aZ.CLICK_TRANSITION_TIME,transitionEasing:aZ.CLICK_TRANSITION_EASING}).call(RA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(NLe,O,_,t,{hovered:!1}),O.x0===O.x1||O.y0===O.y1?O._text="":O._text=ozt(O,n,_,r,A)||"";var ne=UR.ensureSingle(W,"g","slicetext"),be=UR.ensureSingle(ne,"text","",function(Ce){Ce.attr("data-notex",1)}),ze=UR.ensureUniformFontSize(t,RA.determineTextFont(_,O,A.font));be.text(O._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(OLe.font,ze).call(izt.convertToTspans,t),O.textBB=OLe.bBox(be.node()),O.transform=c(O,{fontSize:ze.size}),O.transform.fontSize=ze.size,d?be.transition().attrTween("transform",function(Ce){var he=b(Ce,oZ,j(),[o,s]);return function(te){return h(he(te))}}):be.attr("transform",h(O))}),U}});var GLe=Se((avr,HLe)=>{"use strict";var szt=Jj(),lzt=VLe();HLe.exports=function(t,r,n,i){return szt(t,r,n,i,{type:"icicle",drawDescendants:lzt})}});var jLe=Se((ovr,WLe)=>{"use strict";WLe.exports={moduleType:"trace",name:"icicle",basePlotModule:xLe(),categories:[],animatable:!0,attributes:eZ(),layoutAttributes:tZ(),supplyDefaults:ELe(),supplyLayoutDefaults:CLe(),calc:iZ().calc,crossTraceCalc:iZ().crossTraceCalc,plot:GLe(),style:nZ().style,colorbar:ep(),meta:{}}});var XLe=Se((svr,ZLe)=>{"use strict";ZLe.exports=jLe()});var KLe=Se(FA=>{"use strict";var YLe=Sc();FA.name="funnelarea";FA.plot=function(e,t,r,n){YLe.plotBasePlot(FA.name,e,t,r,n)};FA.clean=function(e,t,r,n){YLe.cleanBasePlot(FA.name,e,t,r,n)}});var sZ=Se((uvr,JLe)=>{"use strict";var ap=A2(),uzt=zf(),fzt=Ec().attributes,czt=Du().hovertemplateAttrs,hzt=Du().texttemplateAttrs,B2=vu().extendFlat;JLe.exports={labels:ap.labels,label0:ap.label0,dlabel:ap.dlabel,values:ap.values,marker:{colors:ap.marker.colors,line:{color:B2({},ap.marker.line.color,{dflt:null}),width:B2({},ap.marker.line.width,{dflt:1}),editType:"calc"},pattern:ap.marker.pattern,editType:"calc"},text:ap.text,hovertext:ap.hovertext,scalegroup:B2({},ap.scalegroup,{}),textinfo:B2({},ap.textinfo,{flags:["label","text","value","percent"]}),texttemplate:hzt({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:B2({},uzt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:czt({},{keys:["label","color","value","text","percent"]}),textposition:B2({},ap.textposition,{values:["inside","none"],dflt:"inside"}),textfont:ap.textfont,insidetextfont:ap.insidetextfont,title:{text:ap.title.text,font:ap.title.font,position:B2({},ap.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:fzt({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 lZ=Se((fvr,$Le)=>{"use strict";var dzt=lR().hiddenlabels;$Le.exports={hiddenlabels:dzt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var tze=Se((cvr,eze)=>{"use strict";var QLe=Zr(),pzt=sZ(),vzt=Ec().defaults,yzt=r0().handleText,mzt=S2().handleLabelsAndValues,gzt=S2().handleMarkerDefaults;eze.exports=function(t,r,n,i){function a(x,b){return QLe.coerce(t,r,pzt,x,b)}var o=a("labels"),s=a("values"),u=mzt(o,s),l=u.len;if(r._hasLabels=u.hasLabels,r._hasValues=u.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!l){r.visible=!1;return}r._length=l,gzt(t,r,i,a),a("scalegroup");var f=a("text"),c=a("texttemplate"),h;if(c||(h=a("textinfo",Array.isArray(f)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),c||h&&h!=="none"){var d=a("textposition");yzt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");vzt(r,i,a);var p=a("title.text");p&&(a("title.position"),QLe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var ize=Se((hvr,rze)=>{"use strict";var _zt=Zr(),xzt=lZ();rze.exports=function(t,r){function n(i,a){return _zt.coerce(t,r,xzt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var uZ=Se((dvr,aze)=>{"use strict";var nze=gA();function bzt(e,t){return nze.calc(e,t)}function wzt(e){nze.crossTraceCalc(e,{type:"funnelarea"})}aze.exports={calc:bzt,crossTraceCalc:wzt}});var fze=Se((pvr,uze)=>{"use strict";var O2=Nl(),fZ=yu(),K_=Zr(),Tzt=K_.strScale,oze=K_.strTranslate,sze=Bf(),Azt=i2(),Szt=Azt.toMoveInsideBar,lze=bp(),Mzt=lze.recordMinTextSize,Ezt=lze.clearMinTextSize,kzt=l_(),qA=hR(),Czt=qA.attachFxHandlers,Lzt=qA.determineInsideTextFont,zzt=qA.layoutAreas,Pzt=qA.prerenderTitles,Izt=qA.positionTitleOutside,Dzt=qA.formatSliceLabel;uze.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;Ezt("funnelarea",i),Pzt(r,t),zzt(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=O2.select(this),s=a[0],u=s.trace;Fzt(a),o.each(function(){var l=O2.select(this).selectAll("g.slice").data(a);l.enter().append("g").classed("slice",!0),l.exit().remove(),l.each(function(c,h){if(c.hidden){O2.select(this).selectAll("path,g").remove();return}c.pointNumber=c.i,c.curveNumber=u.index;var d=s.cx,p=s.cy,x=O2.select(this),b=x.selectAll("path.surface").data([c]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(Czt,t,a);var y="M"+(d+c.TR[0])+","+(p+c.TR[1])+cZ(c.TR,c.BR)+cZ(c.BR,c.BL)+cZ(c.BL,c.TL)+"Z";b.attr("d",y),Dzt(t,c,s);var E=kzt.castOption(u.textposition,c.pts),k=x.selectAll("g.slicetext").data(c.text&&E!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var A=K_.ensureSingle(O2.select(this),"text","",function(F){F.attr("data-notex",1)}),L=K_.ensureUniformFontSize(t,Lzt(u,c,i.font));A.text(c.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(fZ.font,L).call(sze.convertToTspans,t);var _=fZ.bBox(A.node()),C,M,v,z=Math.min(c.BL[1],c.BR[1])+p,T=Math.max(c.TL[1],c.TR[1])+p;M=Math.max(c.TL[0],c.BL[0])+d,v=Math.min(c.TR[0],c.BR[0])+d,C=Szt(M,v,z,T,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,Mzt(u.type,C,i),a[h].transform=C,K_.setTransormAndDisplay(A,C)})});var f=O2.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);f.enter().append("g").classed("titletext",!0),f.exit().remove(),f.each(function(){var c=K_.ensureSingle(O2.select(this),"text","",function(p){p.attr("data-notex",1)}),h=u.title.text;u._meta&&(h=K_.templateString(h,u._meta)),c.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(fZ.font,u.title.font).call(sze.convertToTspans,t);var d=Izt(s,i._size);c.attr("transform",oze(d.x,d.y)+Tzt(Math.min(1,d.scale))+oze(d.tx,d.ty))})})})};function cZ(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function Rzt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function Fzt(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),u=o,l=s/o;function f(){var q=Math.sqrt(l);return{x:q,y:-q}}function c(){var q=f();return[q.x,q.y]}var h,d=[];d.push(c());var p,x;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){var b=x.v/u;l+=b,d.push(c())}var y=1/0,E=-1/0;for(p=0;p-1;p--)if(x=e[p],!x.hidden){z+=1;var T=d[z][0],F=d[z][1];x.TL=[-T,F],x.TR=[T,F],x.BL=M,x.BR=v,x.pxmid=Rzt(x.TR,x.BR),M=x.TL,v=x.TR}}});var dze=Se((vvr,hze)=>{"use strict";var cze=Nl(),qzt=R3(),Bzt=bp().resizeText;hze.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");Bzt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=cze.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){cze.select(this).call(qzt,s,a,t)})})}});var vze=Se((yvr,pze)=>{"use strict";pze.exports={moduleType:"trace",name:"funnelarea",basePlotModule:KLe(),categories:["pie-like","funnelarea","showLegend"],attributes:sZ(),layoutAttributes:lZ(),supplyDefaults:tze(),supplyLayoutDefaults:ize(),calc:uZ().calc,crossTraceCalc:uZ().crossTraceCalc,plot:fze(),style:dze(),styleOne:R3(),meta:{}}});var mze=Se((mvr,yze)=>{"use strict";yze.exports=vze()});var Od=Se((gvr,gze)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){"use strict";var s;function u(ye,ue){if(!(ye instanceof ue))throw new TypeError("Cannot call a class as a function")}function l(ye,ue){for(var de=0;deM)throw new RangeError('The value "'+ye+'" is invalid for option "size"');var ue=new Uint8Array(ye);return Object.setPrototypeOf(ue,T.prototype),ue}function T(ye,ue,de){if(typeof ye=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(ye)}return F(ye,ue,de)}T.poolSize=8192;function F(ye,ue,de){if(typeof ye=="string")return j(ye,ue);if(ArrayBuffer.isView(ye))return O(ye);if(ye==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(ye));if(_e(ye,ArrayBuffer)||ye&&_e(ye.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(_e(ye,SharedArrayBuffer)||ye&&_e(ye.buffer,SharedArrayBuffer)))return W(ye,ue,de);if(typeof ye=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ht=ye.valueOf&&ye.valueOf();if(ht!=null&&ht!==ye)return T.from(ht,ue,de);var Et=re(ye);if(Et)return Et;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ye[Symbol.toPrimitive]=="function")return T.from(ye[Symbol.toPrimitive]("string"),ue,de);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(ye))}T.from=function(ye,ue,de){return F(ye,ue,de)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function q(ye){if(typeof ye!="number")throw new TypeError('"size" argument must be of type number');if(ye<0)throw new RangeError('The value "'+ye+'" is invalid for option "size"')}function U(ye,ue,de){return q(ye),ye<=0?z(ye):ue!==void 0?typeof de=="string"?z(ye).fill(ue,de):z(ye).fill(ue):z(ye)}T.alloc=function(ye,ue,de){return U(ye,ue,de)};function H(ye){return q(ye),z(ye<0?0:ne(ye)|0)}T.allocUnsafe=function(ye){return H(ye)},T.allocUnsafeSlow=function(ye){return H(ye)};function j(ye,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!T.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);var de=ze(ye,ue)|0,ht=z(de),Et=ht.write(ye,ue);return Et!==de&&(ht=ht.slice(0,Et)),ht}function G(ye){for(var ue=ye.length<0?0:ne(ye.length)|0,de=z(ue),ht=0;ht=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return ye|0}function be(ye){return+ye!=ye&&(ye=0),T.alloc(+ye)}T.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==T.prototype},T.compare=function(ue,de){if(_e(ue,Uint8Array)&&(ue=T.from(ue,ue.offset,ue.byteLength)),_e(de,Uint8Array)&&(de=T.from(de,de.offset,de.byteLength)),!T.isBuffer(ue)||!T.isBuffer(de))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===de)return 0;for(var ht=ue.length,Et=de.length,St=0,Zt=Math.min(ht,Et);StEt.length?(T.isBuffer(Zt)||(Zt=T.from(Zt)),Zt.copy(Et,St)):Uint8Array.prototype.set.call(Et,Zt,St);else if(T.isBuffer(Zt))Zt.copy(Et,St);else throw new TypeError('"list" argument must be an Array of Buffers');St+=Zt.length}return Et};function ze(ye,ue){if(T.isBuffer(ye))return ye.length;if(ArrayBuffer.isView(ye)||_e(ye,ArrayBuffer))return ye.byteLength;if(typeof ye!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(ye));var de=ye.length,ht=arguments.length>2&&arguments[2]===!0;if(!ht&&de===0)return 0;for(var Et=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return de;case"utf8":case"utf-8":return Kt(ye).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de*2;case"hex":return de>>>1;case"base64":return Ot(ye).length;default:if(Et)return ht?-1:Kt(ye).length;ue=(""+ue).toLowerCase(),Et=!0}}T.byteLength=ze;function Ce(ye,ue,de){var ht=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((de===void 0||de>this.length)&&(de=this.length),de<=0)||(de>>>=0,ue>>>=0,de<=ue))return"";for(ye||(ye="utf8");;)switch(ye){case"hex":return Qe(this,ue,de);case"utf8":case"utf-8":return fe(this,ue,de);case"ascii":return gt(this,ue,de);case"latin1":case"binary":return Pt(this,ue,de);case"base64":return Be(this,ue,de);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,ue,de);default:if(ht)throw new TypeError("Unknown encoding: "+ye);ye=(ye+"").toLowerCase(),ht=!0}}T.prototype._isBuffer=!0;function he(ye,ue,de){var ht=ye[ue];ye[ue]=ye[de],ye[de]=ht}T.prototype.swap16=function(){var ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var de=0;dede&&(ue+=" ... "),""},C&&(T.prototype[C]=T.prototype.inspect),T.prototype.compare=function(ue,de,ht,Et,St){if(_e(ue,Uint8Array)&&(ue=T.from(ue,ue.offset,ue.byteLength)),!T.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+A(ue));if(de===void 0&&(de=0),ht===void 0&&(ht=ue?ue.length:0),Et===void 0&&(Et=0),St===void 0&&(St=this.length),de<0||ht>ue.length||Et<0||St>this.length)throw new RangeError("out of range index");if(Et>=St&&de>=ht)return 0;if(Et>=St)return-1;if(de>=ht)return 1;if(de>>>=0,ht>>>=0,Et>>>=0,St>>>=0,this===ue)return 0;for(var Zt=St-Et,qr=ht-de,Lr=Math.min(Zt,qr),vr=this.slice(Et,St),Er=ue.slice(de,ht),si=0;si2147483647?de=2147483647:de<-2147483648&&(de=-2147483648),de=+de,Fe(de)&&(de=Et?0:ye.length-1),de<0&&(de=ye.length+de),de>=ye.length){if(Et)return-1;de=ye.length-1}else if(de<0)if(Et)de=0;else return-1;if(typeof ue=="string"&&(ue=T.from(ue,ht)),T.isBuffer(ue))return ue.length===0?-1:ke(ye,ue,de,ht,Et);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?Et?Uint8Array.prototype.indexOf.call(ye,ue,de):Uint8Array.prototype.lastIndexOf.call(ye,ue,de):ke(ye,[ue],de,ht,Et);throw new TypeError("val must be string, number or Buffer")}function ke(ye,ue,de,ht,Et){var St=1,Zt=ye.length,qr=ue.length;if(ht!==void 0&&(ht=String(ht).toLowerCase(),ht==="ucs2"||ht==="ucs-2"||ht==="utf16le"||ht==="utf-16le")){if(ye.length<2||ue.length<2)return-1;St=2,Zt/=2,qr/=2,de/=2}function Lr(Si,xi){return St===1?Si[xi]:Si.readUInt16BE(xi*St)}var vr;if(Et){var Er=-1;for(vr=de;vrZt&&(de=Zt-qr),vr=de;vr>=0;vr--){for(var si=!0,Ei=0;EiEt&&(ht=Et)):ht=Et;var St=ue.length;ht>St/2&&(ht=St/2);var Zt;for(Zt=0;Zt>>0,isFinite(ht)?(ht=ht>>>0,Et===void 0&&(Et="utf8")):(Et=ht,ht=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var St=this.length-de;if((ht===void 0||ht>St)&&(ht=St),ue.length>0&&(ht<0||de<0)||de>this.length)throw new RangeError("Attempt to write outside buffer bounds");Et||(Et="utf8");for(var Zt=!1;;)switch(Et){case"hex":return Ee(this,ue,de,ht);case"utf8":case"utf-8":return Me(this,ue,de,ht);case"ascii":case"latin1":case"binary":return Oe(this,ue,de,ht);case"base64":return Re(this,ue,de,ht);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,ue,de,ht);default:if(Zt)throw new TypeError("Unknown encoding: "+Et);Et=(""+Et).toLowerCase(),Zt=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Be(ye,ue,de){return ue===0&&de===ye.length?L.fromByteArray(ye):L.fromByteArray(ye.slice(ue,de))}function fe(ye,ue,de){de=Math.min(ye.length,de);for(var ht=[],Et=ue;Et239?4:St>223?3:St>191?2:1;if(Et+qr<=de){var Lr=void 0,vr=void 0,Er=void 0,si=void 0;switch(qr){case 1:St<128&&(Zt=St);break;case 2:Lr=ye[Et+1],(Lr&192)===128&&(si=(St&31)<<6|Lr&63,si>127&&(Zt=si));break;case 3:Lr=ye[Et+1],vr=ye[Et+2],(Lr&192)===128&&(vr&192)===128&&(si=(St&15)<<12|(Lr&63)<<6|vr&63,si>2047&&(si<55296||si>57343)&&(Zt=si));break;case 4:Lr=ye[Et+1],vr=ye[Et+2],Er=ye[Et+3],(Lr&192)===128&&(vr&192)===128&&(Er&192)===128&&(si=(St&15)<<18|(Lr&63)<<12|(vr&63)<<6|Er&63,si>65535&&si<1114112&&(Zt=si))}}Zt===null?(Zt=65533,qr=1):Zt>65535&&(Zt-=65536,ht.push(Zt>>>10&1023|55296),Zt=56320|Zt&1023),ht.push(Zt),Et+=qr}return et(ht)}var Ze=4096;function et(ye){var ue=ye.length;if(ue<=Ze)return String.fromCharCode.apply(String,ye);for(var de="",ht=0;htht)&&(de=ht);for(var Et="",St=ue;Stht&&(ue=ht),de<0?(de+=ht,de<0&&(de=0)):de>ht&&(de=ht),dede)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue],St=1,Zt=0;++Zt>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue+--de],St=1;de>0&&(St*=256);)Et+=this[ue+--de]*St;return Et},T.prototype.readUint8=T.prototype.readUInt8=function(ue,de){return ue=ue>>>0,de||Tt(ue,1,this.length),this[ue]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,2,this.length),this[ue]|this[ue+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,2,this.length),this[ue]<<8|this[ue+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},T.prototype.readBigUInt64LE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=de+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,24),St=this[++ue]+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+ht*Math.pow(2,24);return BigInt(Et)+(BigInt(St)<>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=de*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+this[++ue],St=this[++ue]*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+ht;return(BigInt(Et)<>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue],St=1,Zt=0;++Zt=St&&(Et-=Math.pow(2,8*de)),Et},T.prototype.readIntBE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=de,St=1,Zt=this[ue+--Et];Et>0&&(St*=256);)Zt+=this[ue+--Et]*St;return St*=128,Zt>=St&&(Zt-=Math.pow(2,8*de)),Zt},T.prototype.readInt8=function(ue,de){return ue=ue>>>0,de||Tt(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},T.prototype.readInt16LE=function(ue,de){ue=ue>>>0,de||Tt(ue,2,this.length);var ht=this[ue]|this[ue+1]<<8;return ht&32768?ht|4294901760:ht},T.prototype.readInt16BE=function(ue,de){ue=ue>>>0,de||Tt(ue,2,this.length);var ht=this[ue+1]|this[ue]<<8;return ht&32768?ht|4294901760:ht},T.prototype.readInt32LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},T.prototype.readInt32BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},T.prototype.readBigInt64LE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=this[ue+4]+this[ue+5]*Math.pow(2,8)+this[ue+6]*Math.pow(2,16)+(ht<<24);return(BigInt(Et)<>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=(de<<24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+this[++ue];return(BigInt(Et)<>>0,de||Tt(ue,4,this.length),_.read(this,ue,!0,23,4)},T.prototype.readFloatBE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),_.read(this,ue,!1,23,4)},T.prototype.readDoubleLE=function(ue,de){return ue=ue>>>0,de||Tt(ue,8,this.length),_.read(this,ue,!0,52,8)},T.prototype.readDoubleBE=function(ue,de){return ue=ue>>>0,de||Tt(ue,8,this.length),_.read(this,ue,!1,52,8)};function xt(ye,ue,de,ht,Et,St){if(!T.isBuffer(ye))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Et||ueye.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,ht=ht>>>0,!Et){var St=Math.pow(2,8*ht)-1;xt(this,ue,de,ht,St,0)}var Zt=1,qr=0;for(this[de]=ue&255;++qr>>0,ht=ht>>>0,!Et){var St=Math.pow(2,8*ht)-1;xt(this,ue,de,ht,St,0)}var Zt=ht-1,qr=1;for(this[de+Zt]=ue&255;--Zt>=0&&(qr*=256);)this[de+Zt]=ue/qr&255;return de+ht},T.prototype.writeUint8=T.prototype.writeUInt8=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,1,255,0),this[de]=ue&255,de+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,65535,0),this[de]=ue&255,this[de+1]=ue>>>8,de+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,65535,0),this[de]=ue>>>8,this[de+1]=ue&255,de+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,4294967295,0),this[de+3]=ue>>>24,this[de+2]=ue>>>16,this[de+1]=ue>>>8,this[de]=ue&255,de+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,4294967295,0),this[de]=ue>>>24,this[de+1]=ue>>>16,this[de+2]=ue>>>8,this[de+3]=ue&255,de+4};function _t(ye,ue,de,ht,Et){je(ue,ht,Et,ye,de,7);var St=Number(ue&BigInt(4294967295));ye[de++]=St,St=St>>8,ye[de++]=St,St=St>>8,ye[de++]=St,St=St>>8,ye[de++]=St;var Zt=Number(ue>>BigInt(32)&BigInt(4294967295));return ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,de}function Ct(ye,ue,de,ht,Et){je(ue,ht,Et,ye,de,7);var St=Number(ue&BigInt(4294967295));ye[de+7]=St,St=St>>8,ye[de+6]=St,St=St>>8,ye[de+5]=St,St=St>>8,ye[de+4]=St;var Zt=Number(ue>>BigInt(32)&BigInt(4294967295));return ye[de+3]=Zt,Zt=Zt>>8,ye[de+2]=Zt,Zt=Zt>>8,ye[de+1]=Zt,Zt=Zt>>8,ye[de]=Zt,de+8}T.prototype.writeBigUInt64LE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,ue,de,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,ue,de,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,!Et){var St=Math.pow(2,8*ht-1);xt(this,ue,de,ht,St-1,-St)}var Zt=0,qr=1,Lr=0;for(this[de]=ue&255;++Zt>0)-Lr&255;return de+ht},T.prototype.writeIntBE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,!Et){var St=Math.pow(2,8*ht-1);xt(this,ue,de,ht,St-1,-St)}var Zt=ht-1,qr=1,Lr=0;for(this[de+Zt]=ue&255;--Zt>=0&&(qr*=256);)ue<0&&Lr===0&&this[de+Zt+1]!==0&&(Lr=1),this[de+Zt]=(ue/qr>>0)-Lr&255;return de+ht},T.prototype.writeInt8=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,1,127,-128),ue<0&&(ue=255+ue+1),this[de]=ue&255,de+1},T.prototype.writeInt16LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,32767,-32768),this[de]=ue&255,this[de+1]=ue>>>8,de+2},T.prototype.writeInt16BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,32767,-32768),this[de]=ue>>>8,this[de+1]=ue&255,de+2},T.prototype.writeInt32LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,2147483647,-2147483648),this[de]=ue&255,this[de+1]=ue>>>8,this[de+2]=ue>>>16,this[de+3]=ue>>>24,de+4},T.prototype.writeInt32BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[de]=ue>>>24,this[de+1]=ue>>>16,this[de+2]=ue>>>8,this[de+3]=ue&255,de+4},T.prototype.writeBigInt64LE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,ue,de,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,ue,de,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function jt(ye,ue,de,ht,Et,St){if(de+ht>ye.length)throw new RangeError("Index out of range");if(de<0)throw new RangeError("Index out of range")}function At(ye,ue,de,ht,Et){return ue=+ue,de=de>>>0,Et||jt(ye,ue,de,4,34028234663852886e22,-34028234663852886e22),_.write(ye,ue,de,ht,23,4),de+4}T.prototype.writeFloatLE=function(ue,de,ht){return At(this,ue,de,!0,ht)},T.prototype.writeFloatBE=function(ue,de,ht){return At(this,ue,de,!1,ht)};function Te(ye,ue,de,ht,Et){return ue=+ue,de=de>>>0,Et||jt(ye,ue,de,8,17976931348623157e292,-17976931348623157e292),_.write(ye,ue,de,ht,52,8),de+8}T.prototype.writeDoubleLE=function(ue,de,ht){return Te(this,ue,de,!0,ht)},T.prototype.writeDoubleBE=function(ue,de,ht){return Te(this,ue,de,!1,ht)},T.prototype.copy=function(ue,de,ht,Et){if(!T.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(ht||(ht=0),!Et&&Et!==0&&(Et=this.length),de>=ue.length&&(de=ue.length),de||(de=0),Et>0&&Et=this.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("sourceEnd out of bounds");Et>this.length&&(Et=this.length),ue.length-de>>0,ht=ht===void 0?this.length:ht>>>0,ue||(ue=0);var Zt;if(typeof ue=="number")for(Zt=de;ZtMath.pow(2,32)?Et=ct(String(de)):typeof de=="bigint"&&(Et=String(de),(de>Math.pow(BigInt(2),BigInt(32))||de<-Math.pow(BigInt(2),BigInt(32)))&&(Et=ct(Et)),Et+="n"),ht+=" It must be ".concat(ue,". Received ").concat(Et),ht},RangeError);function ct(ye){for(var ue="",de=ye.length,ht=ye[0]==="-"?1:0;de>=ht+4;de-=3)ue="_".concat(ye.slice(de-3,de)).concat(ue);return"".concat(ye.slice(0,de)).concat(ue)}function rt(ye,ue,de){tt(ue,"offset"),(ye[ue]===void 0||ye[ue+de]===void 0)&&Je(ue,ye.length-(de+1))}function je(ye,ue,de,ht,Et,St){if(ye>de||ye3?ue===0||ue===BigInt(0)?qr=">= 0".concat(Zt," and < 2").concat(Zt," ** ").concat((St+1)*8).concat(Zt):qr=">= -(2".concat(Zt," ** ").concat((St+1)*8-1).concat(Zt,") and < 2 ** ")+"".concat((St+1)*8-1).concat(Zt):qr=">= ".concat(ue).concat(Zt," and <= ").concat(de).concat(Zt),new nt.ERR_OUT_OF_RANGE("value",qr,ye)}rt(ht,Et,St)}function tt(ye,ue){if(typeof ye!="number")throw new nt.ERR_INVALID_ARG_TYPE(ue,"number",ye)}function Je(ye,ue,de){throw Math.floor(ye)!==ye?(tt(ye,de),new nt.ERR_OUT_OF_RANGE(de||"offset","an integer",ye)):ue<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(de||"offset",">= ".concat(de?1:0," and <= ").concat(ue),ye)}var Mt=/[^+/0-9A-Za-z-_]/g;function Vt(ye){if(ye=ye.split("=")[0],ye=ye.trim().replace(Mt,""),ye.length<2)return"";for(;ye.length%4!==0;)ye=ye+"=";return ye}function Kt(ye,ue){ue=ue||1/0;for(var de,ht=ye.length,Et=null,St=[],Zt=0;Zt55295&&de<57344){if(!Et){if(de>56319){(ue-=3)>-1&&St.push(239,191,189);continue}else if(Zt+1===ht){(ue-=3)>-1&&St.push(239,191,189);continue}Et=de;continue}if(de<56320){(ue-=3)>-1&&St.push(239,191,189),Et=de;continue}de=(Et-55296<<10|de-56320)+65536}else Et&&(ue-=3)>-1&&St.push(239,191,189);if(Et=null,de<128){if((ue-=1)<0)break;St.push(de)}else if(de<2048){if((ue-=2)<0)break;St.push(de>>6|192,de&63|128)}else if(de<65536){if((ue-=3)<0)break;St.push(de>>12|224,de>>6&63|128,de&63|128)}else if(de<1114112){if((ue-=4)<0)break;St.push(de>>18|240,de>>12&63|128,de>>6&63|128,de&63|128)}else throw new Error("Invalid code point")}return St}function ir(ye){for(var ue=[],de=0;de>8,Et=de%256,St.push(Et),St.push(ht);return St}function Ot(ye){return L.toByteArray(Vt(ye))}function De(ye,ue,de,ht){var Et;for(Et=0;Et=ue.length||Et>=ye.length);++Et)ue[Et+de]=ye[Et];return Et}function _e(ye,ue){return ye instanceof ue||ye!=null&&ye.constructor!=null&&ye.constructor.name!=null&&ye.constructor.name===ue.name}function Fe(ye){return ye!==ye}var Pe=function(){for(var ye="0123456789abcdef",ue=new Array(256),de=0;de<16;++de)for(var ht=de*16,Et=0;Et<16;++Et)ue[ht+Et]=ye[de]+ye[Et];return ue}();function Ie(ye){return typeof BigInt=="undefined"?lt:ye}function lt(){throw new Error("BigInt not supported")}},9216:function(i){"use strict";i.exports=u,i.exports.isMobile=u,i.exports.default=u;var a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function u(l){l||(l={});var f=l.ua;if(!f&&typeof navigator!="undefined"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=a.test(f)&&!o.test(f)||!!l.tablet&&s.test(f);return!c&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),u=o(9977),l=o(1811);function f(d,p){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(x){return d[x]}),this._mode=p,this._active=d[p],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=f.prototype;c.flush=function(d){for(var p=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=A);var _=L===A?0:4-L%4;return[L,_]}function d(k){var A=h(k),L=A[0],_=A[1];return(L+_)*3/4-_}function p(k,A,L){return(A+L)*3/4-L}function x(k){var A,L=h(k),_=L[0],C=L[1],M=new u(p(k,_,C)),v=0,z=C>0?_-4:_,T;for(T=0;T>16&255,M[v++]=A>>8&255,M[v++]=A&255;return C===2&&(A=s[k.charCodeAt(T)]<<2|s[k.charCodeAt(T+1)]>>4,M[v++]=A&255),C===1&&(A=s[k.charCodeAt(T)]<<10|s[k.charCodeAt(T+1)]<<4|s[k.charCodeAt(T+2)]>>2,M[v++]=A>>8&255,M[v++]=A&255),M}function b(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function y(k,A,L){for(var _,C=[],M=A;Mz?z:v+M));return _===1?(A=k[L-1],C.push(o[A>>2]+o[A<<4&63]+"==")):_===2&&(A=(k[L-2]<<8)+k[L-1],C.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]).add(f[0].mul(l[1])),l[1].mul(f[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]),l[1].mul(f[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),u=o(1533),l=o(2651),f=o(6768),c=o(869),h=o(8697);i.exports=d;function d(p,x){if(s(p))return x?h(p,d(x)):[p[0].clone(),p[1].clone()];var b=0,y,E;if(u(p))y=p.clone();else if(typeof p=="string")y=f(p);else{if(p===0)return[l(0),l(1)];if(p===Math.floor(p))y=l(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),b-=256;y=l(p)}}if(s(x))y.mul(x[1]),E=x[0].clone();else if(u(x))E=x.clone();else if(typeof x=="string")E=f(x);else if(!x)E=l(1);else if(x===Math.floor(x))E=l(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),b+=256;E=l(x)}return b>0?y=y.ushln(b):b<0&&(E=E.ushln(-b)),c(y,E)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=u;function u(l){return Array.isArray(l)&&l.length===2&&s(l[0])&&s(l[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return l.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=u;function u(l){var f=l.length,c=l.words,h=0;if(f===1)h=c[0];else if(f===2)h=c[0]+c[1]*67108864;else for(var d=0;d20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return l&&typeof l=="object"&&!!l.words}},2651:function(i,a,o){"use strict";var s=o(6859),u=o(2361);i.exports=l;function l(f){var c=u.exponent(f);return c<52?new s(f):new s(f*Math.pow(2,52-c)).ushln(c-52)}},869:function(i,a,o){"use strict";var s=o(2651),u=o(5716);i.exports=l;function l(f,c){var h=u(f),d=u(c);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(f=f.neg(),c=c.neg());var p=f.gcd(c);return p.cmpn(1)?[f.div(p),c.div(p)]:[f,c]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return new s(l)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[0]),l[1].mul(f[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=u;function u(l){return s(l[0])*s(l[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]).sub(l[1].mul(f[0])),l[1].mul(f[1]))}},946:function(i,a,o){"use strict";var s=o(1369),u=o(4025);i.exports=l;function l(f){var c=f[0],h=f[1];if(c.cmpn(0)===0)return 0;var d=c.abs().divmod(h.abs()),p=d.div,x=s(p),b=d.mod,y=c.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return y*x;if(x){var E=u(x)+4,k=s(b.ushln(E).divRound(h));return y*(x+k*Math.pow(2,-E))}else{var A=h.bitLength()-b.bitLength()+53,k=s(b.ushln(A).divRound(h));return A<1023?y*k*Math.pow(2,-A):(k*=Math.pow(2,-1023),y*k*Math.pow(2,1023-A))}}},2478:function(i){"use strict";function a(c,h,d,p,x){for(var b=x+1;p<=x;){var y=p+x>>>1,E=c[y],k=d!==void 0?d(E,h):E-h;k>=0?(b=y,x=y-1):p=y+1}return b}function o(c,h,d,p,x){for(var b=x+1;p<=x;){var y=p+x>>>1,E=c[y],k=d!==void 0?d(E,h):E-h;k>0?(b=y,x=y-1):p=y+1}return b}function s(c,h,d,p,x){for(var b=p-1;p<=x;){var y=p+x>>>1,E=c[y],k=d!==void 0?d(E,h):E-h;k<0?(b=y,p=y+1):x=y-1}return b}function u(c,h,d,p,x){for(var b=p-1;p<=x;){var y=p+x>>>1,E=c[y],k=d!==void 0?d(E,h):E-h;k<=0?(b=y,p=y+1):x=y-1}return b}function l(c,h,d,p,x){for(;p<=x;){var b=p+x>>>1,y=c[b],E=d!==void 0?d(y,h):y-h;if(E===0)return b;E<=0?p=b+1:x=b-1}return-1}function f(c,h,d,p,x,b){return typeof d=="function"?b(c,h,d,p===void 0?0:p|0,x===void 0?c.length-1:x|0):b(c,h,void 0,d===void 0?0:d|0,p===void 0?c.length-1:p|0)}i.exports={ge:function(c,h,d,p,x){return f(c,h,d,p,x,a)},gt:function(c,h,d,p,x){return f(c,h,d,p,x,o)},lt:function(c,h,d,p,x){return f(c,h,d,p,x,s)},le:function(c,h,d,p,x){return f(c,h,d,p,x,u)},eq:function(c,h,d,p,x){return f(c,h,d,p,x,l)}}},8828:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(l<0)},a.abs=function(l){var f=l>>o-1;return(l^f)-f},a.min=function(l,f){return f^(l^f)&-(l65535)<<4,l>>>=f,c=(l>255)<<3,l>>>=c,f|=c,c=(l>15)<<2,l>>>=c,f|=c,c=(l>3)<<1,l>>>=c,f|=c,f|l>>1},a.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},a.popCount=function(l){return l=l-(l>>>1&1431655765),l=(l&858993459)+(l>>>2&858993459),(l+(l>>>4)&252645135)*16843009>>>24};function s(l){var f=32;return l&=-l,l&&f--,l&65535&&(f-=16),l&16711935&&(f-=8),l&252645135&&(f-=4),l&858993459&&(f-=2),l&1431655765&&(f-=1),f}a.countTrailingZeros=s,a.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1},a.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l-(l>>>1)},a.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,l&=15,27030>>>l&1};var u=new Array(256);(function(l){for(var f=0;f<256;++f){var c=f,h=f,d=7;for(c>>>=1;c;c>>>=1)h<<=1,h|=c&1,--d;l[f]=h<>>8&255]<<16|u[l>>>16&255]<<8|u[l>>>24&255]},a.interleave2=function(l,f){return l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,l|f<<1},a.deinterleave2=function(l,f){return l=l>>>f&1431655765,l=(l|l>>>1)&858993459,l=(l|l>>>2)&252645135,l=(l|l>>>4)&16711935,l=(l|l>>>16)&65535,l<<16>>16},a.interleave3=function(l,f,c){return l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,l|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,l|c<<2},a.deinterleave3=function(l,f){return l=l>>>f&1227133513,l=(l|l>>>2)&3272356035,l=(l|l>>>4)&251719695,l=(l|l>>>8)&4278190335,l=(l|l>>>16)&1023,l<<22>>22},a.nextCombination=function(l){var f=l|l-1;return f+1|(~f&-~f)-1>>>s(l)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,u){"use strict";function l(G,O){if(!G)throw new Error(O||"Assertion failed")}function f(G,O){G.super_=O;var W=function(){};W.prototype=O.prototype,G.prototype=new W,G.prototype.constructor=G}function c(G,O,W){if(c.isBN(G))return G;this.negative=0,this.words=null,this.length=0,this.red=null,G!==null&&((O==="le"||O==="be")&&(W=O,O=10),this._init(G||0,O||10,W||"be"))}typeof s=="object"?s.exports=c:u.BN=c,c.BN=c,c.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(G){}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,W){return O.cmp(W)>0?O:W},c.min=function(O,W){return O.cmp(W)<0?O:W},c.prototype._init=function(O,W,re){if(typeof O=="number")return this._initNumber(O,W,re);if(typeof O=="object")return this._initArray(O,W,re);W==="hex"&&(W=16),l(W===(W|0)&&W>=2&&W<=36),O=O.toString().replace(/\s+/g,"");var ne=0;O[0]==="-"&&(ne++,this.negative=1),ne=0;ne-=3)ze=O[ne]|O[ne-1]<<8|O[ne-2]<<16,this.words[be]|=ze<>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,be++);else if(re==="le")for(ne=0,be=0;ne>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,be++);return this.strip()};function d(G,O){var W=G.charCodeAt(O);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function p(G,O,W){var re=d(G,W);return W-1>=O&&(re|=d(G,W-1)<<4),re}c.prototype._parseHex=function(O,W,re){this.length=Math.ceil((O.length-W)/6),this.words=new Array(this.length);for(var ne=0;ne=W;ne-=2)Ce=p(O,W,ne)<=18?(be-=18,ze+=1,this.words[ze]|=Ce>>>26):be+=8;else{var he=O.length-W;for(ne=he%2===0?W+1:W;ne=18?(be-=18,ze+=1,this.words[ze]|=Ce>>>26):be+=8}this.strip()};function x(G,O,W,re){for(var ne=0,be=Math.min(G.length,W),ze=O;ze=49?ne+=Ce-49+10:Ce>=17?ne+=Ce-17+10:ne+=Ce}return ne}c.prototype._parseBase=function(O,W,re){this.words=[0],this.length=1;for(var ne=0,be=1;be<=67108863;be*=W)ne++;ne--,be=be/W|0;for(var ze=O.length-re,Ce=ze%ne,he=Math.min(ze,ze-Ce)+re,te=0,ke=re;ke1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.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"],y=[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],E=[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];c.prototype.toString=function(O,W){O=O||10,W=W|0||1;var re;if(O===16||O==="hex"){re="";for(var ne=0,be=0,ze=0;ze>>24-ne&16777215,be!==0||ze!==this.length-1?re=b[6-he.length]+he+re:re=he+re,ne+=2,ne>=26&&(ne-=26,ze--)}for(be!==0&&(re=be.toString(16)+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(O===(O|0)&&O>=2&&O<=36){var te=y[O],ke=E[O];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Me=Ee.modn(ke).toString(O);Ee=Ee.idivn(ke),Ee.isZero()?re=Me+re:re=b[te-Me.length]+Me+re}for(this.isZero()&&(re="0"+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}l(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,W){return l(typeof h!="undefined"),this.toArrayLike(h,O,W)},c.prototype.toArray=function(O,W){return this.toArrayLike(Array,O,W)},c.prototype.toArrayLike=function(O,W,re){var ne=this.byteLength(),be=re||Math.max(1,ne);l(ne<=be,"byte array longer than desired length"),l(be>0,"Requested array length <= 0"),this.strip();var ze=W==="le",Ce=new O(be),he,te,ke=this.clone();if(ze){for(te=0;!ke.isZero();te++)he=ke.andln(255),ke.iushrn(8),Ce[te]=he;for(;te=4096&&(re+=13,W>>>=13),W>=64&&(re+=7,W>>>=7),W>=8&&(re+=4,W>>>=4),W>=2&&(re+=2,W>>>=2),re+W},c.prototype._zeroBits=function(O){if(O===0)return 26;var W=O,re=0;return W&8191||(re+=13,W>>>=13),W&127||(re+=7,W>>>=7),W&15||(re+=4,W>>>=4),W&3||(re+=2,W>>>=2),W&1||re++,re},c.prototype.bitLength=function(){var O=this.words[this.length-1],W=this._countBits(O);return(this.length-1)*26+W};function k(G){for(var O=new Array(G.bitLength()),W=0;W>>ne}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,W=0;WO.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var W;this.length>O.length?W=O:W=this;for(var re=0;reO.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var W,re;this.length>O.length?(W=this,re=O):(W=O,re=this);for(var ne=0;neO.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){l(typeof O=="number"&&O>=0);var W=Math.ceil(O/26)|0,re=O%26;this._expand(W),re>0&&W--;for(var ne=0;ne0&&(this.words[ne]=~this.words[ne]&67108863>>26-re),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,W){l(typeof O=="number"&&O>=0);var re=O/26|0,ne=O%26;return this._expand(re+1),W?this.words[re]=this.words[re]|1<O.length?(re=this,ne=O):(re=O,ne=this);for(var be=0,ze=0;ze>>26;for(;be!==0&&ze>>26;if(this.length=re.length,be!==0)this.words[this.length]=be,this.length++;else if(re!==this)for(;zeO.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var W=this.iadd(O);return O.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var re=this.cmp(O);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ne,be;re>0?(ne=this,be=O):(ne=O,be=this);for(var ze=0,Ce=0;Ce>26,this.words[Ce]=W&67108863;for(;ze!==0&&Ce>26,this.words[Ce]=W&67108863;if(ze===0&&Ce>>26,Ee=he&67108863,Me=Math.min(te,O.length-1),Oe=Math.max(0,te-G.length+1);Oe<=Me;Oe++){var Re=te-Oe|0;ne=G.words[Re]|0,be=O.words[Oe]|0,ze=ne*be+Ee,ke+=ze/67108864|0,Ee=ze&67108863}W.words[te]=Ee|0,he=ke|0}return he!==0?W.words[te]=he|0:W.length--,W.strip()}var L=function(O,W,re){var ne=O.words,be=W.words,ze=re.words,Ce=0,he,te,ke,Ee=ne[0]|0,Me=Ee&8191,Oe=Ee>>>13,Re=ne[1]|0,me=Re&8191,Be=Re>>>13,fe=ne[2]|0,Ze=fe&8191,et=fe>>>13,gt=ne[3]|0,Pt=gt&8191,Qe=gt>>>13,Xe=ne[4]|0,Tt=Xe&8191,xt=Xe>>>13,_t=ne[5]|0,Ct=_t&8191,jt=_t>>>13,At=ne[6]|0,Te=At&8191,nt=At>>>13,ut=ne[7]|0,ct=ut&8191,rt=ut>>>13,je=ne[8]|0,tt=je&8191,Je=je>>>13,Mt=ne[9]|0,Vt=Mt&8191,Kt=Mt>>>13,ir=be[0]|0,fr=ir&8191,Ot=ir>>>13,De=be[1]|0,_e=De&8191,Fe=De>>>13,Pe=be[2]|0,Ie=Pe&8191,lt=Pe>>>13,ye=be[3]|0,ue=ye&8191,de=ye>>>13,ht=be[4]|0,Et=ht&8191,St=ht>>>13,Zt=be[5]|0,qr=Zt&8191,Lr=Zt>>>13,vr=be[6]|0,Er=vr&8191,si=vr>>>13,Ei=be[7]|0,Si=Ei&8191,xi=Ei>>>13,Hi=be[8]|0,Jr=Hi&8191,ci=Hi>>>13,Di=be[9]|0,Lt=Di&8191,vt=Di>>>13;re.negative=O.negative^W.negative,re.length=19,he=Math.imul(Me,fr),te=Math.imul(Me,Ot),te=te+Math.imul(Oe,fr)|0,ke=Math.imul(Oe,Ot);var Dt=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,he=Math.imul(me,fr),te=Math.imul(me,Ot),te=te+Math.imul(Be,fr)|0,ke=Math.imul(Be,Ot),he=he+Math.imul(Me,_e)|0,te=te+Math.imul(Me,Fe)|0,te=te+Math.imul(Oe,_e)|0,ke=ke+Math.imul(Oe,Fe)|0;var Bt=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,he=Math.imul(Ze,fr),te=Math.imul(Ze,Ot),te=te+Math.imul(et,fr)|0,ke=Math.imul(et,Ot),he=he+Math.imul(me,_e)|0,te=te+Math.imul(me,Fe)|0,te=te+Math.imul(Be,_e)|0,ke=ke+Math.imul(Be,Fe)|0,he=he+Math.imul(Me,Ie)|0,te=te+Math.imul(Me,lt)|0,te=te+Math.imul(Oe,Ie)|0,ke=ke+Math.imul(Oe,lt)|0;var sr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(sr>>>26)|0,sr&=67108863,he=Math.imul(Pt,fr),te=Math.imul(Pt,Ot),te=te+Math.imul(Qe,fr)|0,ke=Math.imul(Qe,Ot),he=he+Math.imul(Ze,_e)|0,te=te+Math.imul(Ze,Fe)|0,te=te+Math.imul(et,_e)|0,ke=ke+Math.imul(et,Fe)|0,he=he+Math.imul(me,Ie)|0,te=te+Math.imul(me,lt)|0,te=te+Math.imul(Be,Ie)|0,ke=ke+Math.imul(Be,lt)|0,he=he+Math.imul(Me,ue)|0,te=te+Math.imul(Me,de)|0,te=te+Math.imul(Oe,ue)|0,ke=ke+Math.imul(Oe,de)|0;var br=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(br>>>26)|0,br&=67108863,he=Math.imul(Tt,fr),te=Math.imul(Tt,Ot),te=te+Math.imul(xt,fr)|0,ke=Math.imul(xt,Ot),he=he+Math.imul(Pt,_e)|0,te=te+Math.imul(Pt,Fe)|0,te=te+Math.imul(Qe,_e)|0,ke=ke+Math.imul(Qe,Fe)|0,he=he+Math.imul(Ze,Ie)|0,te=te+Math.imul(Ze,lt)|0,te=te+Math.imul(et,Ie)|0,ke=ke+Math.imul(et,lt)|0,he=he+Math.imul(me,ue)|0,te=te+Math.imul(me,de)|0,te=te+Math.imul(Be,ue)|0,ke=ke+Math.imul(Be,de)|0,he=he+Math.imul(Me,Et)|0,te=te+Math.imul(Me,St)|0,te=te+Math.imul(Oe,Et)|0,ke=ke+Math.imul(Oe,St)|0;var zr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(zr>>>26)|0,zr&=67108863,he=Math.imul(Ct,fr),te=Math.imul(Ct,Ot),te=te+Math.imul(jt,fr)|0,ke=Math.imul(jt,Ot),he=he+Math.imul(Tt,_e)|0,te=te+Math.imul(Tt,Fe)|0,te=te+Math.imul(xt,_e)|0,ke=ke+Math.imul(xt,Fe)|0,he=he+Math.imul(Pt,Ie)|0,te=te+Math.imul(Pt,lt)|0,te=te+Math.imul(Qe,Ie)|0,ke=ke+Math.imul(Qe,lt)|0,he=he+Math.imul(Ze,ue)|0,te=te+Math.imul(Ze,de)|0,te=te+Math.imul(et,ue)|0,ke=ke+Math.imul(et,de)|0,he=he+Math.imul(me,Et)|0,te=te+Math.imul(me,St)|0,te=te+Math.imul(Be,Et)|0,ke=ke+Math.imul(Be,St)|0,he=he+Math.imul(Me,qr)|0,te=te+Math.imul(Me,Lr)|0,te=te+Math.imul(Oe,qr)|0,ke=ke+Math.imul(Oe,Lr)|0;var Tr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,he=Math.imul(Te,fr),te=Math.imul(Te,Ot),te=te+Math.imul(nt,fr)|0,ke=Math.imul(nt,Ot),he=he+Math.imul(Ct,_e)|0,te=te+Math.imul(Ct,Fe)|0,te=te+Math.imul(jt,_e)|0,ke=ke+Math.imul(jt,Fe)|0,he=he+Math.imul(Tt,Ie)|0,te=te+Math.imul(Tt,lt)|0,te=te+Math.imul(xt,Ie)|0,ke=ke+Math.imul(xt,lt)|0,he=he+Math.imul(Pt,ue)|0,te=te+Math.imul(Pt,de)|0,te=te+Math.imul(Qe,ue)|0,ke=ke+Math.imul(Qe,de)|0,he=he+Math.imul(Ze,Et)|0,te=te+Math.imul(Ze,St)|0,te=te+Math.imul(et,Et)|0,ke=ke+Math.imul(et,St)|0,he=he+Math.imul(me,qr)|0,te=te+Math.imul(me,Lr)|0,te=te+Math.imul(Be,qr)|0,ke=ke+Math.imul(Be,Lr)|0,he=he+Math.imul(Me,Er)|0,te=te+Math.imul(Me,si)|0,te=te+Math.imul(Oe,Er)|0,ke=ke+Math.imul(Oe,si)|0;var Rr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,he=Math.imul(ct,fr),te=Math.imul(ct,Ot),te=te+Math.imul(rt,fr)|0,ke=Math.imul(rt,Ot),he=he+Math.imul(Te,_e)|0,te=te+Math.imul(Te,Fe)|0,te=te+Math.imul(nt,_e)|0,ke=ke+Math.imul(nt,Fe)|0,he=he+Math.imul(Ct,Ie)|0,te=te+Math.imul(Ct,lt)|0,te=te+Math.imul(jt,Ie)|0,ke=ke+Math.imul(jt,lt)|0,he=he+Math.imul(Tt,ue)|0,te=te+Math.imul(Tt,de)|0,te=te+Math.imul(xt,ue)|0,ke=ke+Math.imul(xt,de)|0,he=he+Math.imul(Pt,Et)|0,te=te+Math.imul(Pt,St)|0,te=te+Math.imul(Qe,Et)|0,ke=ke+Math.imul(Qe,St)|0,he=he+Math.imul(Ze,qr)|0,te=te+Math.imul(Ze,Lr)|0,te=te+Math.imul(et,qr)|0,ke=ke+Math.imul(et,Lr)|0,he=he+Math.imul(me,Er)|0,te=te+Math.imul(me,si)|0,te=te+Math.imul(Be,Er)|0,ke=ke+Math.imul(Be,si)|0,he=he+Math.imul(Me,Si)|0,te=te+Math.imul(Me,xi)|0,te=te+Math.imul(Oe,Si)|0,ke=ke+Math.imul(Oe,xi)|0;var Br=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Br>>>26)|0,Br&=67108863,he=Math.imul(tt,fr),te=Math.imul(tt,Ot),te=te+Math.imul(Je,fr)|0,ke=Math.imul(Je,Ot),he=he+Math.imul(ct,_e)|0,te=te+Math.imul(ct,Fe)|0,te=te+Math.imul(rt,_e)|0,ke=ke+Math.imul(rt,Fe)|0,he=he+Math.imul(Te,Ie)|0,te=te+Math.imul(Te,lt)|0,te=te+Math.imul(nt,Ie)|0,ke=ke+Math.imul(nt,lt)|0,he=he+Math.imul(Ct,ue)|0,te=te+Math.imul(Ct,de)|0,te=te+Math.imul(jt,ue)|0,ke=ke+Math.imul(jt,de)|0,he=he+Math.imul(Tt,Et)|0,te=te+Math.imul(Tt,St)|0,te=te+Math.imul(xt,Et)|0,ke=ke+Math.imul(xt,St)|0,he=he+Math.imul(Pt,qr)|0,te=te+Math.imul(Pt,Lr)|0,te=te+Math.imul(Qe,qr)|0,ke=ke+Math.imul(Qe,Lr)|0,he=he+Math.imul(Ze,Er)|0,te=te+Math.imul(Ze,si)|0,te=te+Math.imul(et,Er)|0,ke=ke+Math.imul(et,si)|0,he=he+Math.imul(me,Si)|0,te=te+Math.imul(me,xi)|0,te=te+Math.imul(Be,Si)|0,ke=ke+Math.imul(Be,xi)|0,he=he+Math.imul(Me,Jr)|0,te=te+Math.imul(Me,ci)|0,te=te+Math.imul(Oe,Jr)|0,ke=ke+Math.imul(Oe,ci)|0;var oi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(oi>>>26)|0,oi&=67108863,he=Math.imul(Vt,fr),te=Math.imul(Vt,Ot),te=te+Math.imul(Kt,fr)|0,ke=Math.imul(Kt,Ot),he=he+Math.imul(tt,_e)|0,te=te+Math.imul(tt,Fe)|0,te=te+Math.imul(Je,_e)|0,ke=ke+Math.imul(Je,Fe)|0,he=he+Math.imul(ct,Ie)|0,te=te+Math.imul(ct,lt)|0,te=te+Math.imul(rt,Ie)|0,ke=ke+Math.imul(rt,lt)|0,he=he+Math.imul(Te,ue)|0,te=te+Math.imul(Te,de)|0,te=te+Math.imul(nt,ue)|0,ke=ke+Math.imul(nt,de)|0,he=he+Math.imul(Ct,Et)|0,te=te+Math.imul(Ct,St)|0,te=te+Math.imul(jt,Et)|0,ke=ke+Math.imul(jt,St)|0,he=he+Math.imul(Tt,qr)|0,te=te+Math.imul(Tt,Lr)|0,te=te+Math.imul(xt,qr)|0,ke=ke+Math.imul(xt,Lr)|0,he=he+Math.imul(Pt,Er)|0,te=te+Math.imul(Pt,si)|0,te=te+Math.imul(Qe,Er)|0,ke=ke+Math.imul(Qe,si)|0,he=he+Math.imul(Ze,Si)|0,te=te+Math.imul(Ze,xi)|0,te=te+Math.imul(et,Si)|0,ke=ke+Math.imul(et,xi)|0,he=he+Math.imul(me,Jr)|0,te=te+Math.imul(me,ci)|0,te=te+Math.imul(Be,Jr)|0,ke=ke+Math.imul(Be,ci)|0,he=he+Math.imul(Me,Lt)|0,te=te+Math.imul(Me,vt)|0,te=te+Math.imul(Oe,Lt)|0,ke=ke+Math.imul(Oe,vt)|0;var vi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(vi>>>26)|0,vi&=67108863,he=Math.imul(Vt,_e),te=Math.imul(Vt,Fe),te=te+Math.imul(Kt,_e)|0,ke=Math.imul(Kt,Fe),he=he+Math.imul(tt,Ie)|0,te=te+Math.imul(tt,lt)|0,te=te+Math.imul(Je,Ie)|0,ke=ke+Math.imul(Je,lt)|0,he=he+Math.imul(ct,ue)|0,te=te+Math.imul(ct,de)|0,te=te+Math.imul(rt,ue)|0,ke=ke+Math.imul(rt,de)|0,he=he+Math.imul(Te,Et)|0,te=te+Math.imul(Te,St)|0,te=te+Math.imul(nt,Et)|0,ke=ke+Math.imul(nt,St)|0,he=he+Math.imul(Ct,qr)|0,te=te+Math.imul(Ct,Lr)|0,te=te+Math.imul(jt,qr)|0,ke=ke+Math.imul(jt,Lr)|0,he=he+Math.imul(Tt,Er)|0,te=te+Math.imul(Tt,si)|0,te=te+Math.imul(xt,Er)|0,ke=ke+Math.imul(xt,si)|0,he=he+Math.imul(Pt,Si)|0,te=te+Math.imul(Pt,xi)|0,te=te+Math.imul(Qe,Si)|0,ke=ke+Math.imul(Qe,xi)|0,he=he+Math.imul(Ze,Jr)|0,te=te+Math.imul(Ze,ci)|0,te=te+Math.imul(et,Jr)|0,ke=ke+Math.imul(et,ci)|0,he=he+Math.imul(me,Lt)|0,te=te+Math.imul(me,vt)|0,te=te+Math.imul(Be,Lt)|0,ke=ke+Math.imul(Be,vt)|0;var Pi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,he=Math.imul(Vt,Ie),te=Math.imul(Vt,lt),te=te+Math.imul(Kt,Ie)|0,ke=Math.imul(Kt,lt),he=he+Math.imul(tt,ue)|0,te=te+Math.imul(tt,de)|0,te=te+Math.imul(Je,ue)|0,ke=ke+Math.imul(Je,de)|0,he=he+Math.imul(ct,Et)|0,te=te+Math.imul(ct,St)|0,te=te+Math.imul(rt,Et)|0,ke=ke+Math.imul(rt,St)|0,he=he+Math.imul(Te,qr)|0,te=te+Math.imul(Te,Lr)|0,te=te+Math.imul(nt,qr)|0,ke=ke+Math.imul(nt,Lr)|0,he=he+Math.imul(Ct,Er)|0,te=te+Math.imul(Ct,si)|0,te=te+Math.imul(jt,Er)|0,ke=ke+Math.imul(jt,si)|0,he=he+Math.imul(Tt,Si)|0,te=te+Math.imul(Tt,xi)|0,te=te+Math.imul(xt,Si)|0,ke=ke+Math.imul(xt,xi)|0,he=he+Math.imul(Pt,Jr)|0,te=te+Math.imul(Pt,ci)|0,te=te+Math.imul(Qe,Jr)|0,ke=ke+Math.imul(Qe,ci)|0,he=he+Math.imul(Ze,Lt)|0,te=te+Math.imul(Ze,vt)|0,te=te+Math.imul(et,Lt)|0,ke=ke+Math.imul(et,vt)|0;var Yr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,he=Math.imul(Vt,ue),te=Math.imul(Vt,de),te=te+Math.imul(Kt,ue)|0,ke=Math.imul(Kt,de),he=he+Math.imul(tt,Et)|0,te=te+Math.imul(tt,St)|0,te=te+Math.imul(Je,Et)|0,ke=ke+Math.imul(Je,St)|0,he=he+Math.imul(ct,qr)|0,te=te+Math.imul(ct,Lr)|0,te=te+Math.imul(rt,qr)|0,ke=ke+Math.imul(rt,Lr)|0,he=he+Math.imul(Te,Er)|0,te=te+Math.imul(Te,si)|0,te=te+Math.imul(nt,Er)|0,ke=ke+Math.imul(nt,si)|0,he=he+Math.imul(Ct,Si)|0,te=te+Math.imul(Ct,xi)|0,te=te+Math.imul(jt,Si)|0,ke=ke+Math.imul(jt,xi)|0,he=he+Math.imul(Tt,Jr)|0,te=te+Math.imul(Tt,ci)|0,te=te+Math.imul(xt,Jr)|0,ke=ke+Math.imul(xt,ci)|0,he=he+Math.imul(Pt,Lt)|0,te=te+Math.imul(Pt,vt)|0,te=te+Math.imul(Qe,Lt)|0,ke=ke+Math.imul(Qe,vt)|0;var Ni=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,he=Math.imul(Vt,Et),te=Math.imul(Vt,St),te=te+Math.imul(Kt,Et)|0,ke=Math.imul(Kt,St),he=he+Math.imul(tt,qr)|0,te=te+Math.imul(tt,Lr)|0,te=te+Math.imul(Je,qr)|0,ke=ke+Math.imul(Je,Lr)|0,he=he+Math.imul(ct,Er)|0,te=te+Math.imul(ct,si)|0,te=te+Math.imul(rt,Er)|0,ke=ke+Math.imul(rt,si)|0,he=he+Math.imul(Te,Si)|0,te=te+Math.imul(Te,xi)|0,te=te+Math.imul(nt,Si)|0,ke=ke+Math.imul(nt,xi)|0,he=he+Math.imul(Ct,Jr)|0,te=te+Math.imul(Ct,ci)|0,te=te+Math.imul(jt,Jr)|0,ke=ke+Math.imul(jt,ci)|0,he=he+Math.imul(Tt,Lt)|0,te=te+Math.imul(Tt,vt)|0,te=te+Math.imul(xt,Lt)|0,ke=ke+Math.imul(xt,vt)|0;var Ur=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,he=Math.imul(Vt,qr),te=Math.imul(Vt,Lr),te=te+Math.imul(Kt,qr)|0,ke=Math.imul(Kt,Lr),he=he+Math.imul(tt,Er)|0,te=te+Math.imul(tt,si)|0,te=te+Math.imul(Je,Er)|0,ke=ke+Math.imul(Je,si)|0,he=he+Math.imul(ct,Si)|0,te=te+Math.imul(ct,xi)|0,te=te+Math.imul(rt,Si)|0,ke=ke+Math.imul(rt,xi)|0,he=he+Math.imul(Te,Jr)|0,te=te+Math.imul(Te,ci)|0,te=te+Math.imul(nt,Jr)|0,ke=ke+Math.imul(nt,ci)|0,he=he+Math.imul(Ct,Lt)|0,te=te+Math.imul(Ct,vt)|0,te=te+Math.imul(jt,Lt)|0,ke=ke+Math.imul(jt,vt)|0;var ti=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ti>>>26)|0,ti&=67108863,he=Math.imul(Vt,Er),te=Math.imul(Vt,si),te=te+Math.imul(Kt,Er)|0,ke=Math.imul(Kt,si),he=he+Math.imul(tt,Si)|0,te=te+Math.imul(tt,xi)|0,te=te+Math.imul(Je,Si)|0,ke=ke+Math.imul(Je,xi)|0,he=he+Math.imul(ct,Jr)|0,te=te+Math.imul(ct,ci)|0,te=te+Math.imul(rt,Jr)|0,ke=ke+Math.imul(rt,ci)|0,he=he+Math.imul(Te,Lt)|0,te=te+Math.imul(Te,vt)|0,te=te+Math.imul(nt,Lt)|0,ke=ke+Math.imul(nt,vt)|0;var ki=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ki>>>26)|0,ki&=67108863,he=Math.imul(Vt,Si),te=Math.imul(Vt,xi),te=te+Math.imul(Kt,Si)|0,ke=Math.imul(Kt,xi),he=he+Math.imul(tt,Jr)|0,te=te+Math.imul(tt,ci)|0,te=te+Math.imul(Je,Jr)|0,ke=ke+Math.imul(Je,ci)|0,he=he+Math.imul(ct,Lt)|0,te=te+Math.imul(ct,vt)|0,te=te+Math.imul(rt,Lt)|0,ke=ke+Math.imul(rt,vt)|0;var ji=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ji>>>26)|0,ji&=67108863,he=Math.imul(Vt,Jr),te=Math.imul(Vt,ci),te=te+Math.imul(Kt,Jr)|0,ke=Math.imul(Kt,ci),he=he+Math.imul(tt,Lt)|0,te=te+Math.imul(tt,vt)|0,te=te+Math.imul(Je,Lt)|0,ke=ke+Math.imul(Je,vt)|0;var Vi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,he=Math.imul(Vt,Lt),te=Math.imul(Vt,vt),te=te+Math.imul(Kt,Lt)|0,ke=Math.imul(Kt,vt);var zi=(Ce+he|0)+((te&8191)<<13)|0;return Ce=(ke+(te>>>13)|0)+(zi>>>26)|0,zi&=67108863,ze[0]=Dt,ze[1]=Bt,ze[2]=sr,ze[3]=br,ze[4]=zr,ze[5]=Tr,ze[6]=Rr,ze[7]=Br,ze[8]=oi,ze[9]=vi,ze[10]=Pi,ze[11]=Yr,ze[12]=Ni,ze[13]=Ur,ze[14]=ti,ze[15]=ki,ze[16]=ji,ze[17]=Vi,ze[18]=zi,Ce!==0&&(ze[19]=Ce,re.length++),re};Math.imul||(L=A);function _(G,O,W){W.negative=O.negative^G.negative,W.length=G.length+O.length;for(var re=0,ne=0,be=0;be>>26)|0,ne+=ze>>>26,ze&=67108863}W.words[be]=Ce,re=ze,ze=ne}return re!==0?W.words[be]=re:W.length--,W.strip()}function C(G,O,W){var re=new M;return re.mulp(G,O,W)}c.prototype.mulTo=function(O,W){var re,ne=this.length+O.length;return this.length===10&&O.length===10?re=L(this,O,W):ne<63?re=A(this,O,W):ne<1024?re=_(this,O,W):re=C(this,O,W),re};function M(G,O){this.x=G,this.y=O}M.prototype.makeRBT=function(O){for(var W=new Array(O),re=c.prototype._countBits(O)-1,ne=0;ne>=1;return ne},M.prototype.permute=function(O,W,re,ne,be,ze){for(var Ce=0;Ce>>1)be++;return 1<>>13,re[2*ze+1]=be&8191,be=be>>>13;for(ze=2*W;ze>=26,W+=ne/67108864|0,W+=be>>>26,this.words[re]=be&67108863}return W!==0&&(this.words[re]=W,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var W=k(O);if(W.length===0)return new c(1);for(var re=this,ne=0;ne=0);var W=O%26,re=(O-W)/26,ne=67108863>>>26-W<<26-W,be;if(W!==0){var ze=0;for(be=0;be>>26-W}ze&&(this.words[be]=ze,this.length++)}if(re!==0){for(be=this.length-1;be>=0;be--)this.words[be+re]=this.words[be];for(be=0;be=0);var ne;W?ne=(W-W%26)/26:ne=0;var be=O%26,ze=Math.min((O-be)/26,this.length),Ce=67108863^67108863>>>be<ze)for(this.length-=ze,te=0;te=0&&(ke!==0||te>=ne);te--){var Ee=this.words[te]|0;this.words[te]=ke<<26-be|Ee>>>be,ke=Ee&Ce}return he&&ke!==0&&(he.words[he.length++]=ke),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,W,re){return l(this.negative===0),this.iushrn(O,W,re)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){l(typeof O=="number"&&O>=0);var W=O%26,re=(O-W)/26,ne=1<=0);var W=O%26,re=(O-W)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(W!==0&&re++,this.length=Math.min(re,this.length),W!==0){var ne=67108863^67108863>>>W<=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+1),this},c.prototype.isubn=function(O){if(l(typeof O=="number"),l(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var W=0;W>26)-(he/67108864|0),this.words[be+re]=ze&67108863}for(;be>26,this.words[be+re]=ze&67108863;if(Ce===0)return this.strip();for(l(Ce===-1),Ce=0,be=0;be>26,this.words[be]=ze&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,W){var re=this.length-O.length,ne=this.clone(),be=O,ze=be.words[be.length-1]|0,Ce=this._countBits(ze);re=26-Ce,re!==0&&(be=be.ushln(re),ne.iushln(re),ze=be.words[be.length-1]|0);var he=ne.length-be.length,te;if(W!=="mod"){te=new c(null),te.length=he+1,te.words=new Array(te.length);for(var ke=0;ke=0;Me--){var Oe=(ne.words[be.length+Me]|0)*67108864+(ne.words[be.length+Me-1]|0);for(Oe=Math.min(Oe/ze|0,67108863),ne._ishlnsubmul(be,Oe,Me);ne.negative!==0;)Oe--,ne.negative=0,ne._ishlnsubmul(be,1,Me),ne.isZero()||(ne.negative^=1);te&&(te.words[Me]=Oe)}return te&&te.strip(),ne.strip(),W!=="div"&&re!==0&&ne.iushrn(re),{div:te||null,mod:ne}},c.prototype.divmod=function(O,W,re){if(l(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var ne,be,ze;return this.negative!==0&&O.negative===0?(ze=this.neg().divmod(O,W),W!=="mod"&&(ne=ze.div.neg()),W!=="div"&&(be=ze.mod.neg(),re&&be.negative!==0&&be.iadd(O)),{div:ne,mod:be}):this.negative===0&&O.negative!==0?(ze=this.divmod(O.neg(),W),W!=="mod"&&(ne=ze.div.neg()),{div:ne,mod:ze.mod}):this.negative&O.negative?(ze=this.neg().divmod(O.neg(),W),W!=="div"&&(be=ze.mod.neg(),re&&be.negative!==0&&be.isub(O)),{div:ze.div,mod:be}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?W==="div"?{div:this.divn(O.words[0]),mod:null}:W==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,W)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var W=this.divmod(O);if(W.mod.isZero())return W.div;var re=W.div.negative!==0?W.mod.isub(O):W.mod,ne=O.ushrn(1),be=O.andln(1),ze=re.cmp(ne);return ze<0||be===1&&ze===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},c.prototype.modn=function(O){l(O<=67108863);for(var W=(1<<26)%O,re=0,ne=this.length-1;ne>=0;ne--)re=(W*re+(this.words[ne]|0))%O;return re},c.prototype.idivn=function(O){l(O<=67108863);for(var W=0,re=this.length-1;re>=0;re--){var ne=(this.words[re]|0)+W*67108864;this.words[re]=ne/O|0,W=ne%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){l(O.negative===0),l(!O.isZero());var W=this,re=O.clone();W.negative!==0?W=W.umod(O):W=W.clone();for(var ne=new c(1),be=new c(0),ze=new c(0),Ce=new c(1),he=0;W.isEven()&&re.isEven();)W.iushrn(1),re.iushrn(1),++he;for(var te=re.clone(),ke=W.clone();!W.isZero();){for(var Ee=0,Me=1;!(W.words[0]&Me)&&Ee<26;++Ee,Me<<=1);if(Ee>0)for(W.iushrn(Ee);Ee-- >0;)(ne.isOdd()||be.isOdd())&&(ne.iadd(te),be.isub(ke)),ne.iushrn(1),be.iushrn(1);for(var Oe=0,Re=1;!(re.words[0]&Re)&&Oe<26;++Oe,Re<<=1);if(Oe>0)for(re.iushrn(Oe);Oe-- >0;)(ze.isOdd()||Ce.isOdd())&&(ze.iadd(te),Ce.isub(ke)),ze.iushrn(1),Ce.iushrn(1);W.cmp(re)>=0?(W.isub(re),ne.isub(ze),be.isub(Ce)):(re.isub(W),ze.isub(ne),Ce.isub(be))}return{a:ze,b:Ce,gcd:re.iushln(he)}},c.prototype._invmp=function(O){l(O.negative===0),l(!O.isZero());var W=this,re=O.clone();W.negative!==0?W=W.umod(O):W=W.clone();for(var ne=new c(1),be=new c(0),ze=re.clone();W.cmpn(1)>0&&re.cmpn(1)>0;){for(var Ce=0,he=1;!(W.words[0]&he)&&Ce<26;++Ce,he<<=1);if(Ce>0)for(W.iushrn(Ce);Ce-- >0;)ne.isOdd()&&ne.iadd(ze),ne.iushrn(1);for(var te=0,ke=1;!(re.words[0]&ke)&&te<26;++te,ke<<=1);if(te>0)for(re.iushrn(te);te-- >0;)be.isOdd()&&be.iadd(ze),be.iushrn(1);W.cmp(re)>=0?(W.isub(re),ne.isub(be)):(re.isub(W),be.isub(ne))}var Ee;return W.cmpn(1)===0?Ee=ne:Ee=be,Ee.cmpn(0)<0&&Ee.iadd(O),Ee},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var W=this.clone(),re=O.clone();W.negative=0,re.negative=0;for(var ne=0;W.isEven()&&re.isEven();ne++)W.iushrn(1),re.iushrn(1);do{for(;W.isEven();)W.iushrn(1);for(;re.isEven();)re.iushrn(1);var be=W.cmp(re);if(be<0){var ze=W;W=re,re=ze}else if(be===0||re.cmpn(1)===0)break;W.isub(re)}while(!0);return re.iushln(ne)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){l(typeof O=="number");var W=O%26,re=(O-W)/26,ne=1<>>26,Ce&=67108863,this.words[ze]=Ce}return be!==0&&(this.words[ze]=be,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var W=O<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this.strip();var re;if(this.length>1)re=1;else{W&&(O=-O),l(O<=67108863,"Number is too big");var ne=this.words[0]|0;re=ne===O?0:neO.length)return 1;if(this.length=0;re--){var ne=this.words[re]|0,be=O.words[re]|0;if(ne!==be){nebe&&(W=1);break}}return W},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new H(O)},c.prototype.toRed=function(O){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return l(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return l(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var v={k256:null,p224:null,p192:null,p25519:null};function z(G,O){this.name=G,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},z.prototype.ireduce=function(O){var W=O,re;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),re=W.bitLength();while(re>this.n);var ne=re0?W.isub(this.p):W.strip!==void 0?W.strip():W._strip(),W},z.prototype.split=function(O,W){O.iushrn(this.n,0,W)},z.prototype.imulK=function(O){return O.imul(this.k)};function T(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(T,z),T.prototype.split=function(O,W){for(var re=4194303,ne=Math.min(O.length,9),be=0;be>>22,ze=Ce}ze>>>=22,O.words[be-10]=ze,ze===0&&O.length>10?O.length-=10:O.length-=9},T.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var W=0,re=0;re>>=26,O.words[re]=be,W=ne}return W!==0&&(O.words[O.length++]=W),O},c._prime=function(O){if(v[O])return v[O];var W;if(O==="k256")W=new T;else if(O==="p224")W=new F;else if(O==="p192")W=new q;else if(O==="p25519")W=new U;else throw new Error("Unknown prime "+O);return v[O]=W,W};function H(G){if(typeof G=="string"){var O=c._prime(G);this.m=O.p,this.prime=O}else l(G.gtn(1),"modulus must be greater than 1"),this.m=G,this.prime=null}H.prototype._verify1=function(O){l(O.negative===0,"red works only with positives"),l(O.red,"red works only with red numbers")},H.prototype._verify2=function(O,W){l((O.negative|W.negative)===0,"red works only with positives"),l(O.red&&O.red===W.red,"red works only with red numbers")},H.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},H.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},H.prototype.add=function(O,W){this._verify2(O,W);var re=O.add(W);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},H.prototype.iadd=function(O,W){this._verify2(O,W);var re=O.iadd(W);return re.cmp(this.m)>=0&&re.isub(this.m),re},H.prototype.sub=function(O,W){this._verify2(O,W);var re=O.sub(W);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},H.prototype.isub=function(O,W){this._verify2(O,W);var re=O.isub(W);return re.cmpn(0)<0&&re.iadd(this.m),re},H.prototype.shl=function(O,W){return this._verify1(O),this.imod(O.ushln(W))},H.prototype.imul=function(O,W){return this._verify2(O,W),this.imod(O.imul(W))},H.prototype.mul=function(O,W){return this._verify2(O,W),this.imod(O.mul(W))},H.prototype.isqr=function(O){return this.imul(O,O.clone())},H.prototype.sqr=function(O){return this.mul(O,O)},H.prototype.sqrt=function(O){if(O.isZero())return O.clone();var W=this.m.andln(3);if(l(W%2===1),W===3){var re=this.m.add(new c(1)).iushrn(2);return this.pow(O,re)}for(var ne=this.m.subn(1),be=0;!ne.isZero()&&ne.andln(1)===0;)be++,ne.iushrn(1);l(!ne.isZero());var ze=new c(1).toRed(this),Ce=ze.redNeg(),he=this.m.subn(1).iushrn(1),te=this.m.bitLength();for(te=new c(2*te*te).toRed(this);this.pow(te,he).cmp(Ce)!==0;)te.redIAdd(Ce);for(var ke=this.pow(te,ne),Ee=this.pow(O,ne.addn(1).iushrn(1)),Me=this.pow(O,ne),Oe=be;Me.cmp(ze)!==0;){for(var Re=Me,me=0;Re.cmp(ze)!==0;me++)Re=Re.redSqr();l(me=0;be--){for(var ke=W.words[be],Ee=te-1;Ee>=0;Ee--){var Me=ke>>Ee&1;if(ze!==ne[0]&&(ze=this.sqr(ze)),Me===0&&Ce===0){he=0;continue}Ce<<=1,Ce|=Me,he++,!(he!==re&&(be!==0||Ee!==0))&&(ze=this.mul(ze,ne[Ce]),he=0,Ce=0)}te=26}return ze},H.prototype.convertTo=function(O){var W=O.umod(this.m);return W===O?W.clone():W},H.prototype.convertFrom=function(O){var W=O.clone();return W.red=null,W},c.mont=function(O){return new j(O)};function j(G){H.call(this,G),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}f(j,H),j.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},j.prototype.convertFrom=function(O){var W=this.imod(O.mul(this.rinv));return W.red=null,W},j.prototype.imul=function(O,W){if(O.isZero()||W.isZero())return O.words[0]=0,O.length=1,O;var re=O.imul(W),ne=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),be=re.isub(ne).iushrn(this.shift),ze=be;return be.cmp(this.m)>=0?ze=be.isub(this.m):be.cmpn(0)<0&&(ze=be.iadd(this.m)),ze._forceRed(this)},j.prototype.mul=function(O,W){if(O.isZero()||W.isZero())return new c(0)._forceRed(this);var re=O.mul(W),ne=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),be=re.isub(ne).iushrn(this.shift),ze=be;return be.cmp(this.m)>=0?ze=be.isub(this.m):be.cmpn(0)<0&&(ze=be.iadd(this.m)),ze._forceRed(this)},j.prototype.invm=function(O){var W=this.imod(O._invmp(this.m).mul(this.r2));return W._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,u,l,f=o.length,c=0;for(s=0;s>>1;if(!(M<=0)){var v,z=s.mallocDouble(2*M*_),T=s.mallocInt32(_);if(_=c(E,M,z,T),_>0){if(M===1&&L)u.init(_),v=u.sweepComplete(M,A,0,_,z,T,0,_,z,T);else{var F=s.mallocDouble(2*M*C),q=s.mallocInt32(C);C=c(k,M,F,q),C>0&&(u.init(_+C),M===1?v=u.sweepBipartite(M,A,0,_,z,T,0,C,F,q):v=l(M,A,L,_,z,T,C,F,q),s.free(F),s.free(q))}s.free(z),s.free(T)}return v}}}var d;function p(E,k){d.push([E,k])}function x(E){return d=[],h(E,E,p,!0),d}function b(E,k){return d=[],h(E,k,p,!1),d}function y(E,k,A){switch(arguments.length){case 1:return x(E);case 2:return typeof k=="function"?h(E,E,k,!0):b(E,k);case 3:return h(E,k,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function l(h,d,p,x,b,y,E,k,A,L,_){for(var C=2*h,M=x,v=C*x;MA-k?l(h,d,p,x,b,y,E,k,A,L,_):f(h,d,p,x,b,y,E,k,A,L,_)}return c}function s(){function l(p,x,b,y,E,k,A,L,_,C,M){for(var v=2*p,z=y,T=v*y;zC-_?y?l(p,x,b,E,k,A,L,_,C,M,v):f(p,x,b,E,k,A,L,_,C,M,v):y?c(p,x,b,E,k,A,L,_,C,M,v):h(p,x,b,E,k,A,L,_,C,M,v)}return d}function u(l){return l?o():s()}a.partial=u(!1),a.full=u(!0)},7150:function(i,a,o){"use strict";i.exports=G;var s=o(1888),u=o(8828),l=o(2455),f=l.partial,c=l.full,h=o(855),d=o(3545),p=o(8105),x=128,b=1<<22,y=1<<22,E=p("!(lo>=p0)&&!(p1>=hi)"),k=p("lo===p0"),A=p("lo0;){ke-=1;var Oe=ke*M,Re=T[Oe],me=T[Oe+1],Be=T[Oe+2],fe=T[Oe+3],Ze=T[Oe+4],et=T[Oe+5],gt=ke*v,Pt=F[gt],Qe=F[gt+1],Xe=et&1,Tt=!!(et&16),xt=be,_t=ze,Ct=he,jt=te;if(Xe&&(xt=he,_t=te,Ct=be,jt=ze),!(et&2&&(Be=A(O,Re,me,Be,xt,_t,Qe),me>=Be))&&!(et&4&&(me=L(O,Re,me,Be,xt,_t,Pt),me>=Be))){var At=Be-me,Te=Ze-fe;if(Tt){if(O*At*(At+Te)p&&b[C+d]>L;--_,C-=E){for(var M=C,v=C+E,z=0;z>>1,L=2*h,_=A,C=b[L*A+d];E=F?(_=T,C=F):z>=U?(_=v,C=z):(_=q,C=U):F>=U?(_=T,C=F):U>=z?(_=v,C=z):(_=q,C=U);for(var G=L*(k-1),O=L*_,H=0;H=p0)&&!(p1>=hi)":d};function o(p){return a[p]}function s(p,x,b,y,E,k,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=E[_+v];if(F===A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=E[_+q];E[_+q]=E[C],E[C++]=U}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function u(p,x,b,y,E,k,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=E[_+v];if(Fq;++q){var U=E[_+q];E[_+q]=E[C],E[C++]=U}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function l(p,x,b,y,E,k,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=E[_+z];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=E[_+q];E[_+q]=E[C],E[C++]=U}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function f(p,x,b,y,E,k,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=E[_+z];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=E[_+q];E[_+q]=E[C],E[C++]=U}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function c(p,x,b,y,E,k,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=E[_+v],q=E[_+z];if(F<=A&&A<=q)if(M===T)M+=1,C+=L;else{for(var U=0;L>U;++U){var H=E[_+U];E[_+U]=E[C],E[C++]=H}var j=k[T];k[T]=k[M],k[M++]=j}}return M}function h(p,x,b,y,E,k,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=E[_+v],q=E[_+z];if(FU;++U){var H=E[_+U];E[_+U]=E[C],E[C++]=H}var j=k[T];k[T]=k[M],k[M++]=j}}return M}function d(p,x,b,y,E,k,A,L){for(var _=2*p,C=_*b,M=C,v=b,z=x,T=p+x,F=b;y>F;++F,C+=_){var q=E[C+z],U=E[C+T];if(!(q>=A)&&!(L>=U))if(v===F)v+=1,M+=_;else{for(var H=0;_>H;++H){var j=E[C+H];E[C+H]=E[M],E[M++]=j}var G=k[F];k[F]=k[v],k[v++]=G}}return v}},4192:function(i){"use strict";i.exports=o;var a=32;function o(x,b){b<=4*a?s(0,b-1,x):p(0,b-1,x)}function s(x,b,y){for(var E=2*(x+1),k=x+1;k<=b;++k){for(var A=y[E++],L=y[E++],_=k,C=E-2;_-- >x;){var M=y[C-2],v=y[C-1];if(My[b+1]:!0}function d(x,b,y,E){x*=2;var k=E[x];return k>1,_=L-E,C=L+E,M=k,v=_,z=L,T=C,F=A,q=x+1,U=b-1,H=0;h(M,v,y)&&(H=M,M=v,v=H),h(T,F,y)&&(H=T,T=F,F=H),h(M,z,y)&&(H=M,M=z,z=H),h(v,z,y)&&(H=v,v=z,z=H),h(M,T,y)&&(H=M,M=T,T=H),h(z,T,y)&&(H=z,z=T,T=H),h(v,F,y)&&(H=v,v=F,F=H),h(v,z,y)&&(H=v,v=z,z=H),h(T,F,y)&&(H=T,T=F,F=H);for(var j=y[2*v],G=y[2*v+1],O=y[2*T],W=y[2*T+1],re=2*M,ne=2*z,be=2*F,ze=2*k,Ce=2*L,he=2*A,te=0;te<2;++te){var ke=y[re+te],Ee=y[ne+te],Me=y[be+te];y[ze+te]=ke,y[Ce+te]=Ee,y[he+te]=Me}l(_,x,y),l(C,b,y);for(var Oe=q;Oe<=U;++Oe)if(d(Oe,j,G,y))Oe!==q&&u(Oe,q,y),++q;else if(!d(Oe,O,W,y))for(;;)if(d(U,O,W,y)){d(U,j,G,y)?(f(Oe,q,U,y),++q,--U):(u(Oe,U,y),--U);break}else{if(--U>>1;l(E,Ee);for(var Me=0,Oe=0,Ce=0;Ce=f)Re=Re-f|0,A(p,x,Oe--,Re);else if(Re>=0)A(h,d,Me--,Re);else if(Re<=-f){Re=-Re-f|0;for(var me=0;me>>1;l(E,Ee);for(var Me=0,Oe=0,Re=0,Ce=0;Ce>1===E[2*Ce+3]>>1&&(Be=2,Ce+=1),me<0){for(var fe=-(me>>1)-1,Ze=0;Ze>1)-1;Be===0?A(h,d,Me--,fe):Be===1?A(p,x,Oe--,fe):Be===2&&A(b,y,Re--,fe)}}}function M(z,T,F,q,U,H,j,G,O,W,re,ne){var be=0,ze=2*z,Ce=T,he=T+z,te=1,ke=1;q?ke=f:te=f;for(var Ee=U;Ee>>1;l(E,me);for(var Be=0,Ee=0;Ee=f?(Ze=!q,Me-=f):(Ze=!!q,Me-=1),Ze)L(h,d,Be++,Me);else{var et=ne[Me],gt=ze*Me,Pt=re[gt+T+1],Qe=re[gt+T+1+z];e:for(var Xe=0;Xe>>1;l(E,Me);for(var Oe=0,he=0;he=f)h[Oe++]=te-f;else{te-=1;var me=re[te],Be=be*te,fe=W[Be+T+1],Ze=W[Be+T+1+z];e:for(var et=0;et=0;--et)if(h[et]===te){for(var Xe=et+1;Xe0;){for(var k=d.pop(),b=d.pop(),A=-1,L=-1,y=x[b],C=1;C=0||(h.flip(b,k),l(c,h,d,A,b,L),l(c,h,d,b,L,A),l(c,h,d,L,k,A),l(c,h,d,k,A,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function u(p,x,b,y,E,k,A){this.cells=p,this.neighbor=x,this.flags=y,this.constraint=b,this.active=E,this.next=k,this.boundary=A}var l=u.prototype;function f(p,x){return p[0]-x[0]||p[1]-x[1]||p[2]-x[2]}l.locate=function(){var p=[0,0,0];return function(x,b,y){var E=x,k=b,A=y;return b0||A.length>0;){for(;k.length>0;){var v=k.pop();if(L[v]!==-E){L[v]=E;for(var z=_[v],T=0;T<3;++T){var F=M[3*v+T];F>=0&&L[F]===0&&(C[3*v+T]?A.push(F):(k.push(F),L[F]=E))}}}var q=A;A=k,k=q,A.length=0,E=-E}var U=h(_,L,x);return b?U.concat(y.boundary):U}},8902:function(i,a,o){"use strict";var s=o(2478),u=o(3250)[3],l=0,f=1,c=2;i.exports=A;function h(L,_,C,M,v){this.a=L,this.b=_,this.idx=C,this.lowerIds=M,this.upperIds=v}function d(L,_,C,M){this.a=L,this.b=_,this.type=C,this.idx=M}function p(L,_){var C=L.a[0]-_.a[0]||L.a[1]-_.a[1]||L.type-_.type;return C||L.type!==l&&(C=u(L.a,L.b,_.b),C)?C:L.idx-_.idx}function x(L,_){return u(L.a,L.b,_)}function b(L,_,C,M,v){for(var z=s.lt(_,M,x),T=s.gt(_,M,x),F=z;F1&&u(C[U[j-2]],C[U[j-1]],M)>0;)L.push([U[j-1],U[j-2],v]),j-=1;U.length=j,U.push(v);for(var H=q.upperIds,j=H.length;j>1&&u(C[H[j-2]],C[H[j-1]],M)<0;)L.push([H[j-2],H[j-1],v]),j-=1;H.length=j,H.push(v)}}function y(L,_){var C;return L.a[0]<_.a[0]?C=u(L.a,L.b,_.a):C=u(_.b,_.a,L.a),C||(_.b[0]q[0]&&v.push(new d(q,F,c,z),new d(F,q,f,z))}v.sort(p);for(var U=v[0].a[0]-(1+Math.abs(v[0].a[0]))*Math.pow(2,-52),H=[new h([U,1],[U,0],-1,[],[],[],[])],j=[],z=0,G=v.length;z=0}}(),l.removeTriangle=function(h,d,p){var x=this.stars;f(x[h],d,p),f(x[d],p,h),f(x[p],h,d)},l.addTriangle=function(h,d,p){var x=this.stars;x[h].push(d,p),x[d].push(p,h),x[p].push(h,d)},l.opposite=function(h,d){for(var p=this.stars[d],x=1,b=p.length;x=0;--O){var ke=j[O];W=ke[0];var Ee=U[W],Me=Ee[0],Oe=Ee[1],Re=q[Me],me=q[Oe];if((Re[0]-me[0]||Re[1]-me[1])<0){var Be=Me;Me=Oe,Oe=Be}Ee[0]=Me;var fe=Ee[1]=ke[1],Ze;for(G&&(Ze=Ee[2]);O>0&&j[O-1][0]===W;){var ke=j[--O],et=ke[1];G?U.push([fe,et,Ze]):U.push([fe,et]),fe=et}G?U.push([fe,Oe,Ze]):U.push([fe,Oe])}return re}function _(q,U,H){for(var j=U.length,G=new s(j),O=[],W=0;WU[2]?1:0)}function v(q,U,H){if(q.length!==0){if(U)for(var j=0;j0||W.length>0}function F(q,U,H){var j;if(H){j=U;for(var G=new Array(U.length),O=0;OL+1)throw new Error(k+" map requires nshades to be at least size "+E.length);Array.isArray(d.alpha)?d.alpha.length!==2?_=[1,1]:_=d.alpha.slice():typeof d.alpha=="number"?_=[d.alpha,d.alpha]:_=[1,1],p=E.map(function(F){return Math.round(F.index*L)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var M=E.map(function(F,q){var U=E[q].index,H=E[q].rgb.slice();return H.length===4&&H[3]>=0&&H[3]<=1||(H[3]=_[0]+(_[1]-_[0])*U),H}),v=[];for(C=0;C=0}function d(p,x,b,y){var E=s(x,b,y);if(E===0){var k=u(s(p,x,b)),A=u(s(p,x,y));if(k===A){if(k===0){var L=h(p,x,b),_=h(p,x,y);return L===_?0:L?1:-1}return 0}else{if(A===0)return k>0||h(p,x,y)?-1:1;if(k===0)return A>0||h(p,x,b)?1:-1}return u(A-k)}var C=s(p,x,b);if(C>0)return E>0&&s(p,x,y)>0?1:-1;if(C<0)return E>0||s(p,x,y)>0?1:-1;var M=s(p,x,y);return M>0||h(p,x,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(u,l){return u-l}function s(u,l){var f=u.length,c=u.length-l.length;if(c)return c;switch(f){case 0:return 0;case 1:return u[0]-l[0];case 2:return u[0]+u[1]-l[0]-l[1]||a(u[0],u[1])-a(l[0],l[1]);case 3:var h=u[0]+u[1],d=l[0]+l[1];if(c=h+u[2]-(d+l[2]),c)return c;var p=a(u[0],u[1]),x=a(l[0],l[1]);return a(p,u[2])-a(x,l[2])||a(p+u[2],h)-a(x+l[2],d);case 4:var b=u[0],y=u[1],E=u[2],k=u[3],A=l[0],L=l[1],_=l[2],C=l[3];return b+y+E+k-(A+L+_+C)||a(b,y,E,k)-a(A,L,_,C,A)||a(b+y,b+E,b+k,y+E,y+k,E+k)-a(A+L,A+_,A+C,L+_,L+C,_+C)||a(b+y+E,b+y+k,b+E+k,y+E+k)-a(A+L+_,A+L+C,A+_+C,L+_+C);default:for(var M=u.slice().sort(o),v=l.slice().sort(o),z=0;zo[u][0]&&(u=l);return su?[[u],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=u;var s=o(3090);function u(l){var f=s(l),c=f.length;if(c<=2)return[];for(var h=new Array(c),d=f[c-1],p=0;p=d[A]&&(k+=1);y[E]=k}}return h}function c(h,d){try{return s(h,!0)}catch(y){var p=u(h);if(p.length<=d)return[];var x=l(h,p),b=s(x,!0);return f(b,p)}}},4769:function(i){"use strict";function a(s,u,l,f,c,h){var d=6*c*c-6*c,p=3*c*c-4*c+1,x=-6*c*c+6*c,b=3*c*c-2*c;if(s.length){h||(h=new Array(s.length));for(var y=s.length-1;y>=0;--y)h[y]=d*s[y]+p*u[y]+x*l[y]+b*f[y];return h}return d*s+p*u+x*l[y]+b*f}function o(s,u,l,f,c,h){var d=c-1,p=c*c,x=d*d,b=(1+2*c)*x,y=c*x,E=p*(3-2*c),k=p*d;if(s.length){h||(h=new Array(s.length));for(var A=s.length-1;A>=0;--A)h[A]=b*s[A]+y*u[A]+E*l[A]+k*f[A];return h}return b*s+y*u+E*l+k*f}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),u=o(1682);i.exports=h;function l(d,p){this.point=d,this.index=p}function f(d,p){for(var x=d.point,b=p.point,y=x.length,E=0;E=2)return!1;H[G]=O}return!0}):U=U.filter(function(H){for(var j=0;j<=b;++j){var G=z[H[j]];if(G<0)return!1;H[j]=G}return!0}),b&1)for(var k=0;k>>31},i.exports.exponent=function(E){var k=i.exports.hi(E);return(k<<1>>>21)-1023},i.exports.fraction=function(E){var k=i.exports.lo(E),A=i.exports.hi(E),L=A&(1<<20)-1;return A&2146435072&&(L+=1048576),[k,L]},i.exports.denormalized=function(E){var k=i.exports.hi(E);return!(k&2146435072)}},1338:function(i){"use strict";function a(u,l,f){var c=u[f]|0;if(c<=0)return[];var h=new Array(c),d;if(f===u.length-1)for(d=0;d0)return o(u|0,l);break;case"object":if(typeof u.length=="number")return a(u,l,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=u;var s=o(1682);function u(l,f){var c=l.length;if(typeof f!="number"){f=0;for(var h=0;h=b-1)for(var C=k.length-1,v=p-x[b-1],M=0;M=b-1)for(var _=k.length-1,C=p-x[b-1],M=0;M=0;--b)if(p[--x])return!1;return!0},c.jump=function(p){var x=this.lastT(),b=this.dimension;if(!(p0;--M)y.push(l(L[M-1],_[M-1],arguments[M])),E.push(0)}},c.push=function(p){var x=this.lastT(),b=this.dimension;if(!(p1e-6?1/A:0;this._time.push(p);for(var v=b;v>0;--v){var z=l(_[v-1],C[v-1],arguments[v]);y.push(z),E.push((z-y[k++])*M)}}},c.set=function(p){var x=this.dimension;if(!(p0;--L)b.push(l(k[L-1],A[L-1],arguments[L])),y.push(0)}},c.move=function(p){var x=this.lastT(),b=this.dimension;if(!(p<=x||arguments.length!==b+1)){var y=this._state,E=this._velocity,k=y.length-this.dimension,A=this.bounds,L=A[0],_=A[1],C=p-x,M=C>1e-6?1/C:0;this._time.push(p);for(var v=b;v>0;--v){var z=arguments[v];y.push(l(L[v-1],_[v-1],y[k++]+z)),E.push(z*M)}}},c.idle=function(p){var x=this.lastT();if(!(p=0;--M)y.push(l(L[M],_[M],y[k]+C*E[k])),E.push(0),k+=1}};function h(p){for(var x=new Array(p),b=0;b=0;--q){var v=z[q];T[q]<=0?z[q]=new s(v._color,v.key,v.value,z[q+1],v.right,v._count+1):z[q]=new s(v._color,v.key,v.value,v.left,z[q+1],v._count+1)}for(var q=z.length-1;q>1;--q){var U=z[q-1],v=z[q];if(U._color===o||v._color===o)break;var H=z[q-2];if(H.left===U)if(U.left===v){var j=H.right;if(j&&j._color===a)U._color=o,H.right=l(o,j),H._color=a,q-=1;else{if(H._color=a,H.left=U.right,U._color=o,U.right=H,z[q-2]=U,z[q-1]=v,f(H),f(U),q>=3){var G=z[q-3];G.left===H?G.left=U:G.right=U}break}}else{var j=H.right;if(j&&j._color===a)U._color=o,H.right=l(o,j),H._color=a,q-=1;else{if(U.right=v.left,H._color=a,H.left=v.right,v._color=o,v.left=U,v.right=H,z[q-2]=v,z[q-1]=U,f(H),f(U),f(v),q>=3){var G=z[q-3];G.left===H?G.left=v:G.right=v}break}}else if(U.right===v){var j=H.left;if(j&&j._color===a)U._color=o,H.left=l(o,j),H._color=a,q-=1;else{if(H._color=a,H.right=U.left,U._color=o,U.left=H,z[q-2]=U,z[q-1]=v,f(H),f(U),q>=3){var G=z[q-3];G.right===H?G.right=U:G.left=U}break}}else{var j=H.left;if(j&&j._color===a)U._color=o,H.left=l(o,j),H._color=a,q-=1;else{if(U.left=v.right,H._color=a,H.right=v.left,v._color=o,v.right=U,v.left=H,z[q-2]=v,z[q-1]=U,f(H),f(U),f(v),q>=3){var G=z[q-3];G.right===H?G.right=v:G.left=v}break}}}return z[0]._color=o,new c(M,z[0])};function d(_,C){if(C.left){var M=d(_,C.left);if(M)return M}var M=_(C.key,C.value);if(M)return M;if(C.right)return d(_,C.right)}function p(_,C,M,v){var z=C(_,v.key);if(z<=0){if(v.left){var T=p(_,C,M,v.left);if(T)return T}var T=M(v.key,v.value);if(T)return T}if(v.right)return p(_,C,M,v.right)}function x(_,C,M,v,z){var T=M(_,z.key),F=M(C,z.key),q;if(T<=0&&(z.left&&(q=x(_,C,M,v,z.left),q)||F>0&&(q=v(z.key,z.value),q)))return q;if(F>0&&z.right)return x(_,C,M,v,z.right)}h.forEach=function(C,M,v){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return p(M,this._compare,C,this.root);case 3:return this._compare(M,v)>=0?void 0:x(M,v,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.left;return new b(this,_)}}),Object.defineProperty(h,"end",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.right;return new b(this,_)}}),h.at=function(_){if(_<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(_=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T<=0&&(z=v.length),T<=0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.gt=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T<0&&(z=v.length),T<0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.lt=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T>0&&(z=v.length),T<=0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.le=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T>=0&&(z=v.length),T<0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.find=function(_){for(var C=this._compare,M=this.root,v=[];M;){var z=C(_,M.key);if(v.push(M),z===0)return new b(this,v);z<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(_){var C=this.find(_);return C?C.remove():this},h.get=function(_){for(var C=this._compare,M=this.root;M;){var v=C(_,M.key);if(v===0)return M.value;v<=0?M=M.left:M=M.right}};function b(_,C){this.tree=_,this._stack=C}var y=b.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new b(this.tree,this._stack.slice())};function E(_,C){_.key=C.key,_.value=C.value,_.left=C.left,_.right=C.right,_._color=C._color,_._count=C._count}function k(_){for(var C,M,v,z,T=_.length-1;T>=0;--T){if(C=_[T],T===0){C._color=o;return}if(M=_[T-1],M.left===C){if(v=M.right,v.right&&v.right._color===a){if(v=M.right=u(v),z=v.right=u(v.right),M.right=v.left,v.left=M,v.right=z,v._color=M._color,C._color=o,M._color=o,z._color=o,f(M),f(v),T>1){var F=_[T-2];F.left===M?F.left=v:F.right=v}_[T-1]=v;return}else if(v.left&&v.left._color===a){if(v=M.right=u(v),z=v.left=u(v.left),M.right=z.left,v.left=z.right,z.left=M,z.right=v,z._color=M._color,M._color=o,v._color=o,C._color=o,f(M),f(v),f(z),T>1){var F=_[T-2];F.left===M?F.left=z:F.right=z}_[T-1]=z;return}if(v._color===o)if(M._color===a){M._color=o,M.right=l(a,v);return}else{M.right=l(a,v);continue}else{if(v=u(v),M.right=v.left,v.left=M,v._color=M._color,M._color=a,f(M),f(v),T>1){var F=_[T-2];F.left===M?F.left=v:F.right=v}_[T-1]=v,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}else{if(v=M.left,v.left&&v.left._color===a){if(v=M.left=u(v),z=v.left=u(v.left),M.left=v.right,v.right=M,v.left=z,v._color=M._color,C._color=o,M._color=o,z._color=o,f(M),f(v),T>1){var F=_[T-2];F.right===M?F.right=v:F.left=v}_[T-1]=v;return}else if(v.right&&v.right._color===a){if(v=M.left=u(v),z=v.right=u(v.right),M.left=z.right,v.right=z.left,z.right=M,z.left=v,z._color=M._color,M._color=o,v._color=o,C._color=o,f(M),f(v),f(z),T>1){var F=_[T-2];F.right===M?F.right=z:F.left=z}_[T-1]=z;return}if(v._color===o)if(M._color===a){M._color=o,M.left=l(a,v);return}else{M.left=l(a,v);continue}else{if(v=u(v),M.left=v.right,v.right=M,v._color=M._color,M._color=a,f(M),f(v),T>1){var F=_[T-2];F.right===M?F.right=v:F.left=v}_[T-1]=v,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}}}y.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var C=new Array(_.length),M=_[_.length-1];C[C.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var v=_.length-2;v>=0;--v){var M=_[v];M.left===_[v+1]?C[v]=new s(M._color,M.key,M.value,C[v+1],M.right,M._count):C[v]=new s(M._color,M.key,M.value,M.left,C[v+1],M._count)}if(M=C[C.length-1],M.left&&M.right){var z=C.length;for(M=M.left;M.right;)C.push(M),M=M.right;var T=C[z-1];C.push(new s(M._color,T.key,T.value,M.left,M.right,M._count)),C[z-1].key=M.key,C[z-1].value=M.value;for(var v=C.length-2;v>=z;--v)M=C[v],C[v]=new s(M._color,M.key,M.value,M.left,C[v+1],M._count);C[z-1].left=C[z]}if(M=C[C.length-1],M._color===a){var F=C[C.length-2];F.left===M?F.left=null:F.right===M&&(F.right=null),C.pop();for(var v=0;v0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var _=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(_=C[C.length-1].left._count);for(var v=C.length-2;v>=0;--v)C[v+1]===C[v].right&&(++_,C[v].left&&(_+=C[v].left._count));return _},enumerable:!0}),y.next=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.right)for(C=C.right;C;)_.push(C),C=C.left;else for(_.pop();_.length>0&&_[_.length-1].right===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].left===_[C])return!0;return!1}}),y.update=function(_){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),v=C[C.length-1];M[M.length-1]=new s(v._color,v.key,_,v.left,v.right,v._count);for(var z=C.length-2;z>=0;--z)v=C[z],v.left===C[z+1]?M[z]=new s(v._color,v.key,v.value,M[z+1],v.right,v._count):M[z]=new s(v._color,v.key,v.value,v.left,M[z+1],v._count);return new c(this.tree._compare,M[0])},y.prev=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.left)for(C=C.left;C;)_.push(C),C=C.right;else for(_.pop();_.length>0&&_[_.length-1].left===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].right===_[C])return!0;return!1}});function A(_,C){return _C?1:0}function L(_){return new c(_||A,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),u=o(501),l=o(5304),f=o(6429),c=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,p=DataView;function x(U){return d.isView(U)&&!(U instanceof p)}function b(U){return Array.isArray(U)||x(U)}function y(U,H){return U[0]=H[0],U[1]=H[1],U[2]=H[2],U}function E(U){this.gl=U,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=l(U)}var k=E.prototype;k.update=function(U){U=U||{};function H(Me,Oe,Re){if(Re in U){var me=U[Re],Be=this[Re],fe;(Me?b(me)&&b(me[0]):b(me))?this[Re]=fe=[Oe(me[0]),Oe(me[1]),Oe(me[2])]:this[Re]=fe=[Oe(me),Oe(me),Oe(me)];for(var Ze=0;Ze<3;++Ze)if(fe[Ze]!==Be[Ze])return!0}return!1}var j=H.bind(this,!1,Number),G=H.bind(this,!1,Boolean),O=H.bind(this,!1,String),W=H.bind(this,!0,function(Me){if(b(Me)){if(Me.length===3)return[+Me[0],+Me[1],+Me[2],1];if(Me.length===4)return[+Me[0],+Me[1],+Me[2],+Me[3]]}return[0,0,0,1]}),re,ne=!1,be=!1;if("bounds"in U)for(var ze=U.bounds,Ce=0;Ce<2;++Ce)for(var he=0;he<3;++he)ze[Ce][he]!==this.bounds[Ce][he]&&(be=!0),this.bounds[Ce][he]=ze[Ce][he];if("ticks"in U){re=U.ticks,ne=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else j("tickSpacing")&&(this.autoTicks=!0,be=!0);if(this._firstInit&&("ticks"in U||"tickSpacing"in U||(this.autoTicks=!0),be=!0,ne=!0,this._firstInit=!1),be&&this.autoTicks&&(re=c.create(this.bounds,this.tickSpacing),ne=!0),ne){for(var Ce=0;Ce<3;++Ce)re[Ce].sort(function(Oe,Re){return Oe.x-Re.x});c.equal(re,this.ticks)?ne=!1:this.ticks=re}G("tickEnable"),O("tickFont")&&(ne=!0),O("tickFontStyle")&&(ne=!0),O("tickFontWeight")&&(ne=!0),O("tickFontVariant")&&(ne=!0),j("tickSize"),j("tickAngle"),j("tickPad"),W("tickColor");var te=O("labels");O("labelFont")&&(te=!0),O("labelFontStyle")&&(te=!0),O("labelFontWeight")&&(te=!0),O("labelFontVariant")&&(te=!0),G("labelEnable"),j("labelSize"),j("labelPad"),W("labelColor"),G("lineEnable"),G("lineMirror"),j("lineWidth"),W("lineColor"),G("lineTickEnable"),G("lineTickMirror"),j("lineTickLength"),j("lineTickWidth"),W("lineTickColor"),G("gridEnable"),j("gridWidth"),W("gridColor"),G("zeroEnable"),W("zeroLineColor"),j("zeroLineWidth"),G("backgroundEnable"),W("backgroundColor");var ke=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(te||ne)&&this._text.update(this.bounds,this.labels,ke,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,ke,this.ticks,Ee),this._lines&&ne&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new A,new A,new A];function _(U,H,j,G,O){for(var W=U.primalOffset,re=U.primalMinor,ne=U.mirrorOffset,be=U.mirrorMinor,ze=G[H],Ce=0;Ce<3;++Ce)if(H!==Ce){var he=W,te=ne,ke=re,Ee=be;ze&1<0?(ke[Ce]=-1,Ee[Ce]=0):(ke[Ce]=0,Ee[Ce]=1)}}var C=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(U){};var v=0,z=[0,0,0],T=[0,0,0],F=[0,0,0];k.draw=function(U){U=U||M;for(var Re=this.gl,H=U.model||h,j=U.view||h,G=U.projection||h,O=this.bounds,W=U._ortho||!1,re=f(H,j,G,O,W),ne=re.cubeEdges,be=re.axis,ze=j[12],Ce=j[13],he=j[14],te=j[15],ke=W?2:1,Ee=ke*this.pixelRatio*(G[3]*ze+G[7]*Ce+G[11]*he+G[15]*te)/Re.drawingBufferHeight,Me=0;Me<3;++Me)this.lastCubeProps.cubeEdges[Me]=ne[Me],this.lastCubeProps.axis[Me]=be[Me];for(var Oe=L,Me=0;Me<3;++Me)_(L[Me],Me,this.bounds,ne,be);for(var Re=this.gl,me=C,Me=0;Me<3;++Me)this.backgroundEnable[Me]?me[Me]=be[Me]:me[Me]=0;this._background.draw(H,j,G,O,me,this.backgroundColor),this._lines.bind(H,j,G,this);for(var Me=0;Me<3;++Me){var Be=[0,0,0];be[Me]>0?Be[Me]=O[1][Me]:Be[Me]=O[0][Me];for(var fe=0;fe<2;++fe){var Ze=(Me+1+fe)%3,et=(Me+1+(fe^1))%3;this.gridEnable[Ze]&&this._lines.drawGrid(Ze,et,this.bounds,Be,this.gridColor[Ze],this.gridWidth[Ze]*this.pixelRatio)}for(var fe=0;fe<2;++fe){var Ze=(Me+1+fe)%3,et=(Me+1+(fe^1))%3;this.zeroEnable[et]&&Math.min(O[0][et],O[1][et])<=0&&Math.max(O[0][et],O[1][et])>=0&&this._lines.drawZero(Ze,et,this.bounds,Be,this.zeroLineColor[et],this.zeroLineWidth[et]*this.pixelRatio)}}for(var Me=0;Me<3;++Me){this.lineEnable[Me]&&this._lines.drawAxisLine(Me,this.bounds,Oe[Me].primalOffset,this.lineColor[Me],this.lineWidth[Me]*this.pixelRatio),this.lineMirror[Me]&&this._lines.drawAxisLine(Me,this.bounds,Oe[Me].mirrorOffset,this.lineColor[Me],this.lineWidth[Me]*this.pixelRatio);for(var gt=y(z,Oe[Me].primalMinor),Pt=y(T,Oe[Me].mirrorMinor),Qe=this.lineTickLength,fe=0;fe<3;++fe){var Xe=Ee/H[5*fe];gt[fe]*=Qe[fe]*Xe,Pt[fe]*=Qe[fe]*Xe}this.lineTickEnable[Me]&&this._lines.drawAxisTicks(Me,Oe[Me].primalOffset,gt,this.lineTickColor[Me],this.lineTickWidth[Me]*this.pixelRatio),this.lineTickMirror[Me]&&this._lines.drawAxisTicks(Me,Oe[Me].mirrorOffset,Pt,this.lineTickColor[Me],this.lineTickWidth[Me]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,j,G,this.pixelRatio);var Tt,xt=.5,_t,Ct;function jt(rt){Ct=[0,0,0],Ct[rt]=1}function At(rt,je,tt){var Je=(rt+1)%3,Mt=(rt+2)%3,Vt=je[Je],Kt=je[Mt],ir=tt[Je],fr=tt[Mt];if(Vt>0&&fr>0){jt(Je);return}else if(Vt>0&&fr<0){jt(Je);return}else if(Vt<0&&fr>0){jt(Je);return}else if(Vt<0&&fr<0){jt(Je);return}else if(Kt>0&&ir>0){jt(Mt);return}else if(Kt>0&&ir<0){jt(Mt);return}else if(Kt<0&&ir>0){jt(Mt);return}else if(Kt<0&&ir<0){jt(Mt);return}}for(var Me=0;Me<3;++Me){for(var Te=Oe[Me].primalMinor,nt=Oe[Me].mirrorMinor,ut=y(F,Oe[Me].primalOffset),fe=0;fe<3;++fe)this.lineTickEnable[Me]&&(ut[fe]+=Ee*Te[fe]*Math.max(this.lineTickLength[fe],0)/H[5*fe]);var ct=[0,0,0];if(ct[Me]=1,this.tickEnable[Me]){this.tickAngle[Me]===-3600?(this.tickAngle[Me]=0,this.tickAlign[Me]="auto"):this.tickAlign[Me]=-1,_t=1,Tt=[this.tickAlign[Me],xt,_t],Tt[0]==="auto"?Tt[0]=v:Tt[0]=parseInt(""+Tt[0]),Ct=[0,0,0],At(Me,Te,nt);for(var fe=0;fe<3;++fe)ut[fe]+=Ee*Te[fe]*this.tickPad[fe]/H[5*fe];this._text.drawTicks(Me,this.tickSize[Me],this.tickAngle[Me],ut,this.tickColor[Me],ct,Ct,Tt)}if(this.labelEnable[Me]){_t=0,Ct=[0,0,0],this.labels[Me].length>4&&(jt(Me),_t=1),Tt=[this.labelAlign[Me],xt,_t],Tt[0]==="auto"?Tt[0]=v:Tt[0]=parseInt(""+Tt[0]);for(var fe=0;fe<3;++fe)ut[fe]+=Ee*Te[fe]*this.labelPad[fe]/H[5*fe];ut[Me]+=.5*(O[0][Me]+O[1][Me]),this._text.drawLabel(Me,this.labelSize[Me],this.labelAngle[Me],ut,this.labelColor[Me],[0,0,0],Ct,Tt)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function q(U,H){var j=new E(U);return j.update(H),j}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),u=o(8116),l=o(1879).bg;function f(d,p,x,b){this.gl=d,this.buffer=p,this.vao=x,this.shader=b}var c=f.prototype;c.draw=function(d,p,x,b,y,E){for(var k=!1,A=0;A<3;++A)k=k||y[A];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:p,projection:x,bounds:b,enable:y,colors:E},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var p=[],x=[],b=0,y=0;y<3;++y)for(var E=(y+1)%3,k=(y+2)%3,A=[0,0,0],L=[0,0,0],_=-1;_<=1;_+=2){x.push(b,b+2,b+1,b+1,b+2,b+3),A[y]=_,L[y]=_;for(var C=-1;C<=1;C+=2){A[E]=C;for(var M=-1;M<=1;M+=2)A[k]=M,p.push(A[0],A[1],A[2],L[0],L[1],L[2]),b+=1}var v=E;E=k,k=v}var z=s(d,new Float32Array(p)),T=s(d,new Uint16Array(x),d.ELEMENT_ARRAY_BUFFER),F=u(d,[{buffer:z,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:z,type:d.FLOAT,size:3,offset:12,stride:24}],T),q=l(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new f(d,z,F,q)}},6429:function(i,a,o){"use strict";i.exports=_;var s=o(8828),u=o(6760),l=o(5202),f=o(3250),c=new Array(16),h=new Array(8),d=new Array(8),p=new Array(3),x=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,M,v){for(var z=0;z<4;++z){C[z]=v[12+z];for(var T=0;T<3;++T)C[z]+=M[T]*v[4*T+z]}}var y=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function E(C){for(var M=0;Mbe&&(j|=1<be){j|=1<d[q][1])&&(Oe=q);for(var Re=-1,q=0;q<3;++q){var me=Oe^1<d[Be][0]&&(Be=me)}}var fe=k;fe[0]=fe[1]=fe[2]=0,fe[s.log2(Re^Oe)]=Oe&Re,fe[s.log2(Oe^Be)]=Oe&Be;var Ze=Be^7;Ze===j||Ze===Me?(Ze=Re^7,fe[s.log2(Be^Ze)]=Ze&Be):fe[s.log2(Re^Ze)]=Zeℜfor(var et=A,gt=j,W=0;W<3;++W)gt&1<{});function Vm(){}function nke(){return this.rgb().formatHex()}function pCt(){return this.rgb().formatHex8()}function vCt(){return cke(this).formatHsl()}function ake(){return this.rgb().formatRgb()}function W_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=sCt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?oke(t):r===3?new xd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?vR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?vR(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=lCt.exec(e))?new xd(t[1],t[2],t[3],1):(t=uCt.exec(e))?new xd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fCt.exec(e))?vR(t[1],t[2],t[3],t[4]):(t=cCt.exec(e))?vR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hCt.exec(e))?uke(t[1],t[2]/100,t[3]/100,1):(t=dCt.exec(e))?uke(t[1],t[2]/100,t[3]/100,t[4]):ike.hasOwnProperty(e)?oke(ike[e]):e==="transparent"?new xd(NaN,NaN,NaN,0):null}function oke(e){return new xd(e>>16&255,e>>8&255,e&255,1)}function vR(e,t,r,n){return n<=0&&(e=t=r=NaN),new xd(e,t,r,n)}function CE(e){return e instanceof Vm||(e=W_(e)),e?(e=e.rgb(),new xd(e.r,e.g,e.b,e.opacity)):new xd}function TA(e,t,r,n){return arguments.length===1?CE(e):new xd(e,t,r,n==null?1:n)}function xd(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function ske(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}`}function yCt(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}${M2((isNaN(this.opacity)?1:this.opacity)*255)}`}function lke(){let e=mR(this.opacity);return`${e===1?"rgb(":"rgba("}${E2(this.r)}, ${E2(this.g)}, ${E2(this.b)}${e===1?")":`, ${e})`}`}function mR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M2(e){return e=E2(e),(e<16?"0":"")+e.toString(16)}function uke(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Zy(e,t,r,n)}function cke(e){if(e instanceof Zy)return new Zy(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(e=W_(e)),!e)return new Zy;if(e instanceof Zy)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,u=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&u<1?0:o,new Zy(o,s,u,e.opacity)}function LE(e,t,r,n){return arguments.length===1?cke(e):new Zy(e,t,r,n==null?1:n)}function Zy(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function fke(e){return e=(e||0)%360,e<0?e+360:e}function yR(e){return Math.max(0,Math.min(1,e||0))}function yj(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 G_,k2,wA,kE,Um,sCt,lCt,uCt,fCt,cCt,hCt,dCt,ike,gR=Qf(()=>{pR();G_=.7,k2=1/G_,wA="\\s*([+-]?\\d+)\\s*",kE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Um="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sCt=/^#([0-9a-f]{3,8})$/,lCt=new RegExp(`^rgb\\(${wA},${wA},${wA}\\)$`),uCt=new RegExp(`^rgb\\(${Um},${Um},${Um}\\)$`),fCt=new RegExp(`^rgba\\(${wA},${wA},${wA},${kE}\\)$`),cCt=new RegExp(`^rgba\\(${Um},${Um},${Um},${kE}\\)$`),hCt=new RegExp(`^hsl\\(${kE},${Um},${Um}\\)$`),dCt=new RegExp(`^hsla\\(${kE},${Um},${Um},${kE}\\)$`),ike={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};Xg(Vm,W_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nke,formatHex:nke,formatHex8:pCt,formatHsl:vCt,formatRgb:ake,toString:ake});Xg(xd,TA,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new xd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new xd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xd(E2(this.r),E2(this.g),E2(this.b),mR(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:ske,formatHex:ske,formatHex8:yCt,formatRgb:lke,toString:lke}));Xg(Zy,LE,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new Zy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new Zy(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 xd(yj(e>=240?e-240:e+120,i,n),yj(e,i,n),yj(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zy(fke(this.h),yR(this.s),yR(this.l),mR(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=mR(this.opacity);return`${e===1?"hsl(":"hsla("}${fke(this.h)}, ${yR(this.s)*100}%, ${yR(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var _R,xR,mj=Qf(()=>{_R=Math.PI/180,xR=180/Math.PI});function mke(e){if(e instanceof Hm)return new Hm(e.l,e.a,e.b,e.opacity);if(e instanceof Yg)return gke(e);e instanceof xd||(e=CE(e));var t=bj(e.r),r=bj(e.g),n=bj(e.b),i=gj((.2225045*t+.7168786*r+.0606169*n)/dke),a,o;return t===r&&r===n?a=o=i:(a=gj((.4360747*t+.3850649*r+.1430804*n)/hke),o=gj((.0139322*t+.0971045*r+.7141733*n)/pke)),new Hm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function SA(e,t,r,n){return arguments.length===1?mke(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 gj(e){return e>mCt?Math.pow(e,1/3):e/yke+vke}function _j(e){return e>AA?e*e*e:yke*(e-vke)}function xj(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function bj(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function gCt(e){if(e instanceof Yg)return new Yg(e.h,e.c,e.l,e.opacity);if(e instanceof Hm||(e=mke(e)),e.a===0&&e.b===0)return new Yg(NaN,0{pR();gR();mj();bR=18,hke=.96422,dke=1,pke=.82521,vke=4/29,AA=6/29,yke=3*AA*AA,mCt=AA*AA*AA;Xg(Hm,SA,H_(Vm,{brighter(e){return new Hm(this.l+bR*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Hm(this.l-bR*(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=hke*_j(t),e=dke*_j(e),r=pke*_j(r),new xd(xj(3.1338561*t-1.6168667*e-.4906146*r),xj(-.9787684*t+1.9161415*e+.033454*r),xj(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Xg(Yg,zE,H_(Vm,{brighter(e){return new Yg(this.h,this.c,this.l+bR*(e==null?1:e),this.opacity)},darker(e){return new Yg(this.h,this.c,this.l-bR*(e==null?1:e),this.opacity)},rgb(){return gke(this).rgb()}}))});function _Ct(e){if(e instanceof C2)return new C2(e.h,e.s,e.l,e.opacity);e instanceof xd||(e=CE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(wke*n+xke*t-bke*r)/(wke+xke-bke),a=n-i,o=(PE*(r-i)-Tj*a)/wR,s=Math.sqrt(o*o+a*a)/(PE*i*(1-i)),u=s?Math.atan2(o,a)*xR-120:NaN;return new C2(u<0?u+360:u,s,i,e.opacity)}function MA(e,t,r,n){return arguments.length===1?_Ct(e):new C2(e,t,r,n==null?1:n)}function C2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var Tke,wj,Tj,wR,PE,xke,bke,wke,Ake=Qf(()=>{pR();gR();mj();Tke=-.14861,wj=1.78277,Tj=-.29227,wR=-.90649,PE=1.97294,xke=PE*wR,bke=PE*wj,wke=wj*Tj-wR*Tke;Xg(C2,MA,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new C2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new C2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*_R,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new xd(255*(t+r*(Tke*n+wj*i)),255*(t+r*(Tj*n+wR*i)),255*(t+r*(PE*n)),this.opacity)}}))});var L2=Qf(()=>{gR();_ke();Ake()});function Aj(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 TR(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 SR(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 Aj((r-n/t)*t,i,a,o,s)}}var Sj=Qf(()=>{AR()});var EA,Mj=Qf(()=>{EA=e=>()=>e});function Ske(e,t){return function(r){return e+r*t}}function xCt(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 j_(e,t){var r=t-e;return r?Ske(e,r>180||r<-180?r-360*Math.round(r/360):r):EA(isNaN(e)?t:e)}function Mke(e){return(e=+e)==1?ph:function(t,r){return r-t?xCt(t,r,e):EA(isNaN(t)?r:t)}}function ph(e,t){var r=t-e;return r?Ske(e,r):EA(isNaN(e)?t:e)}var z2=Qf(()=>{Mj()});function Eke(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{L2();AR();Sj();z2();IE=function e(t){var r=Mke(t);function n(i,a){var o=r((i=TA(i)).r,(a=TA(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=ph(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return n.gamma=e,n}(1);kke=Eke(TR),Cke=Eke(SR)});function kA(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 Lke(e,t){return(MR(t)?kA:kj)(e,t)}function kj(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{DE();ER()});function kR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var Lj=Qf(()=>{});function Fv(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var RE=Qf(()=>{});function CR(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]=Z_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var zj=Qf(()=>{DE()});function bCt(e){return function(){return e}}function wCt(e){return function(t){return e(t)+""}}function LR(e,t){var r=Ij.lastIndex=Pj.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(n=Ij.exec(e))&&(i=Pj.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,u.push({i:o,x:Fv(n,i)})),r=Pj.lastIndex;return r{RE();Ij=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pj=new RegExp(Ij.source,"g")});function Z_(e,t){var r=typeof t,n;return t==null||r==="boolean"?EA(t):(r==="number"?Fv:r==="string"?(n=W_(t))?(t=n,IE):LR:t instanceof W_?IE:t instanceof Date?kR:MR(t)?kA:Array.isArray(t)?kj:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?CR:Fv)(e,t)}var DE=Qf(()=>{L2();Ej();Cj();Lj();RE();zj();Dj();Mj();ER()});function zke(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var Pke=Qf(()=>{});function Ike(e,t){var r=j_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var Dke=Qf(()=>{z2()});function Rke(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Fke=Qf(()=>{});function Rj(e,t,r,n,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,u/=s),e*n{qke=180/Math.PI,zR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Oke(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zR:Rj(t.a,t.b,t.c,t.d,t.e,t.f)}function Nke(e){return e==null?zR:(PR||(PR=document.createElementNS("http://www.w3.org/2000/svg","g")),PR.setAttribute("transform",e),(e=PR.transform.baseVal.consolidate())?(e=e.matrix,Rj(e.a,e.b,e.c,e.d,e.e,e.f)):zR)}var PR,Uke=Qf(()=>{Bke()});function Vke(e,t,r,n){function i(l){return l.length?l.pop()+" ":""}function a(l,f,c,h,d,p){if(l!==c||f!==h){var x=d.push("translate(",null,t,null,r);p.push({i:x-4,x:Fv(l,c)},{i:x-2,x:Fv(f,h)})}else(c||h)&&d.push("translate("+c+t+h+r)}function o(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Fv(l,f)})):f&&c.push(i(c)+"rotate("+f+n)}function s(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Fv(l,f)}):f&&c.push(i(c)+"skewX("+f+n)}function u(l,f,c,h,d,p){if(l!==c||f!==h){var x=d.push(i(d)+"scale(",null,",",null,")");p.push({i:x-4,x:Fv(l,c)},{i:x-2,x:Fv(f,h)})}else(c!==1||h!==1)&&d.push(i(d)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=e(l),f=e(f),a(l.translateX,l.translateY,f.translateX,f.translateY,c,h),o(l.rotate,f.rotate,c,h),s(l.skewX,f.skewX,c,h),u(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(d){for(var p=-1,x=h.length,b;++p{RE();Uke();Hke=Vke(Oke,"px, ","px)","deg)"),Gke=Vke(Nke,", ",")",")")});function jke(e){return((e=Math.exp(e))+1/e)/2}function ACt(e){return((e=Math.exp(e))-1/e)/2}function SCt(e){return((e=Math.exp(2*e))-1)/(e+1)}var TCt,Zke,Xke=Qf(()=>{TCt=1e-12;Zke=function e(t,r,n){function i(a,o){var s=a[0],u=a[1],l=a[2],f=o[0],c=o[1],h=o[2],d=f-s,p=c-u,x=d*d+p*p,b,y;if(x{L2();z2();Kke=Yke(j_),Jke=Yke(ph)});function Fj(e,t){var r=ph((e=SA(e)).l,(t=SA(t)).l),n=ph(e.a,t.a),i=ph(e.b,t.b),a=ph(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 Qke=Qf(()=>{L2();z2()});function eCe(e){return function(t,r){var n=e((t=zE(t)).h,(r=zE(r)).h),i=ph(t.c,r.c),a=ph(t.l,r.l),o=ph(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 tCe,rCe,iCe=Qf(()=>{L2();z2();tCe=eCe(j_),rCe=eCe(ph)});function nCe(e){return function t(r){r=+r;function n(i,a){var o=e((i=MA(i)).h,(a=MA(a)).h),s=ph(i.s,a.s),u=ph(i.l,a.l),l=ph(i.opacity,a.opacity);return function(f){return i.h=o(f),i.s=s(f),i.l=u(Math.pow(f,r)),i.opacity=l(f),i+""}}return n.gamma=t,n}(1)}var aCe,oCe,sCe=Qf(()=>{L2();z2();aCe=nCe(j_),oCe=nCe(ph)});function qj(e,t){t===void 0&&(t=e,e=Z_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{DE()});function uCe(e,t){for(var r=new Array(t),n=0;n{});var P2={};ket(P2,{interpolate:()=>Z_,interpolateArray:()=>Lke,interpolateBasis:()=>TR,interpolateBasisClosed:()=>SR,interpolateCubehelix:()=>aCe,interpolateCubehelixLong:()=>oCe,interpolateDate:()=>kR,interpolateDiscrete:()=>zke,interpolateHcl:()=>tCe,interpolateHclLong:()=>rCe,interpolateHsl:()=>Kke,interpolateHslLong:()=>Jke,interpolateHue:()=>Ike,interpolateLab:()=>Fj,interpolateNumber:()=>Fv,interpolateNumberArray:()=>kA,interpolateObject:()=>CR,interpolateRgb:()=>IE,interpolateRgbBasis:()=>kke,interpolateRgbBasisClosed:()=>Cke,interpolateRound:()=>Rke,interpolateString:()=>LR,interpolateTransformCss:()=>Hke,interpolateTransformSvg:()=>Gke,interpolateZoom:()=>Zke,piecewise:()=>qj,quantize:()=>uCe});var I2=Qf(()=>{DE();Cj();AR();Sj();Lj();Pke();Dke();RE();ER();zj();Fke();Dj();Wke();Xke();Ej();$ke();Qke();iCe();sCe();lCe();fCe()});var IR=Se((Mpr,cCe)=>{"use strict";var MCt=yu(),ECt=Pl();cCe.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,u=a||o.color;if(s>=0){r.i=o.i;var l=n.marker;l.pattern?(!l.colors||!l.pattern.shape)&&(l.color=u,r.color=u):(l.color=u,r.color=u),MCt.pointStyle(t,n,i,r)}else ECt.fill(t,u)}});var Bj=Se((Epr,yCe)=>{"use strict";var hCe=Nl(),dCe=Pl(),pCe=Zr(),kCt=bp().resizeText,CCt=IR();function LCt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");kCt(e,t,"sunburst"),t.each(function(r){var n=hCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){hCe.select(this).call(vCe,o,a,e)})})}function vCe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=pCe.castOption(r,o,"marker.line.color")||dCe.defaultLine,u=pCe.castOption(r,o,"marker.line.width")||0;e.call(CCt,t,r,n).style("stroke-width",u).call(dCe.stroke,s).style("opacity",a?r.leaf.opacity:null)}yCe.exports={style:LCt,styleOne:vCe}});var Kg=Se(uf=>{"use strict";var D2=Zr(),zCt=Pl(),PCt=Ty(),mCe=l_();uf.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(uf.getPtId(n)===t)return r=n.copy()}),r||e};uf.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a0)};uf.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};uf.isHeader=function(e,t){return!(uf.isLeaf(e)||e.depth===t._maxDepth-1)};function gCe(e){return e.data.data.pid}uf.getParent=function(e,t){return uf.findEntryWithLevel(e,gCe(t))};uf.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return uf.listPath(r,t).concat(n)};uf.getPath=function(e){return uf.listPath(e,"label").join("/")+"/"};uf.formatValue=mCe.formatPieValue;uf.formatPercent=function(e,t){var r=D2.formatPercent(e,0);return r==="0%"&&(r=mCe.formatPiePercent(e,t)),r}});var BE=Se((Cpr,bCe)=>{"use strict";var CA=Nl(),_Ce=Ul(),RCt=rv().appendArrayPointValue,FE=jc(),xCe=Zr(),FCt=y3(),ad=Kg(),qCt=l_(),BCt=qCt.formatPieValue;bCe.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,u=o.hierarchy,l=s.type==="sunburst",f=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var c=function(p){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var b=n._fullData[s.index],y=p.data.data,k=y.i,E=ad.isHierarchyRoot(p),A=ad.getParent(u,p),L=ad.getValue(p),_=function(ze){return xCe.castOption(b,k,ze)},C=_("hovertemplate"),M=FE.castHoverinfo(b,x,k),v=x.separators,z;if(C||M&&M!=="none"&&M!=="skip"){var T,F;l&&(T=o.cx+p.pxmid[0]*(1-p.rInscribed),F=o.cy+p.pxmid[1]*(1-p.rInscribed)),f&&(T=p._hoverX,F=p._hoverY);var q={},U=[],H=[],j=function(ze){return U.indexOf(ze)!==-1};M&&(U=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),q.label=y.label,j("label")&&q.label&&H.push(q.label),y.hasOwnProperty("v")&&(q.value=y.v,q.valueLabel=BCt(q.value,v),j("value")&&H.push(q.valueLabel)),q.currentPath=p.currentPath=ad.getPath(p.data),j("current path")&&!E&&H.push(q.currentPath);var G,O=[],W=function(){O.indexOf(G)===-1&&(H.push(G),O.push(G))};q.percentParent=p.percentParent=L/ad.getValue(A),q.parent=p.parentString=ad.getPtLabel(A),j("percent parent")&&(G=ad.formatPercent(q.percentParent,v)+" of "+q.parent,W()),q.percentEntry=p.percentEntry=L/ad.getValue(r),q.entry=p.entry=ad.getPtLabel(r),j("percent entry")&&!E&&!p.onPathbar&&(G=ad.formatPercent(q.percentEntry,v)+" of "+q.entry,W()),q.percentRoot=p.percentRoot=L/ad.getValue(u),q.root=p.root=ad.getPtLabel(u),j("percent root")&&!E&&(G=ad.formatPercent(q.percentRoot,v)+" of "+q.root,W()),q.text=_("hovertext")||_("text"),j("text")&&(G=q.text,xCe.isValidTextValue(G)&&H.push(G)),z=[qE(p,b,a.eventDataKeys)];var re={trace:b,y:F,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:H.join("
"),name:C||j("name")?b.name:void 0,color:_("hoverlabel.bgcolor")||y.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),fontWeight:_("hoverlabel.font.weight"),fontStyle:_("hoverlabel.font.style"),fontVariant:_("hoverlabel.font.variant"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:z};l&&(re.x0=T-p.rInscribed*p.rpx1,re.x1=T+p.rInscribed*p.rpx1,re.idealAlign=p.pxmid[0]<0?"left":"right"),f&&(re.x=T,re.idealAlign=T<0?"left":"right");var ne=[];FE.loneHover(re,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ne}),z[0].bbox=ne[0],s._hasHoverLabel=!0}if(f){var be=t.select("path.surface");a.styleOne(be,p,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:z||[qE(p,b,a.eventDataKeys)],event:CA.event})}},h=function(p){var x=n._fullLayout,b=n._fullData[s.index],y=CA.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=CA.event,n.emit("plotly_unhover",{points:[qE(y,b,a.eventDataKeys)],event:CA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(FE.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),f){var k=t.select("path.surface");a.styleOne(k,y,b,n,{hovered:!1})}},d=function(p){var x=n._fullLayout,b=n._fullData[s.index],y=l&&(ad.isHierarchyRoot(p)||ad.isLeaf(p)),k=ad.getPtId(p),E=ad.isEntry(p)?ad.findEntryWithChild(u,k):ad.findEntryWithLevel(u,k),A=ad.getPtId(E),L={points:[qE(p,b,a.eventDataKeys)],event:CA.event};y||(L.nextLevel=A);var _=FCt.triggerHandler(n,"plotly_"+s.type+"click",L);if(_!==!1&&x.hovermode&&(n._hoverdata=[qE(p,b,a.eventDataKeys)],FE.click(n,CA.event)),!y&&_!==!1&&!n._dragging&&!n._transitioning){_Ce.call("_storeDirectGUIEdit",b,x._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:A}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};FE.loneUnhover(x._hoverlayer.node()),_Ce.call("animate",n,C,M)}};t.on("mouseover",c),t.on("mouseout",h),t.on("click",d)};function qE(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 OE=Nl(),OCt=SE(),Xy=(I2(),ab(P2)).interpolate,wCe=yu(),Tp=Zr(),NCt=Bf(),MCe=bp(),TCe=MCe.recordMinTextSize,UCt=MCe.clearMinTextSize,ECe=hR(),VCt=l_().getRotationAngle,HCt=ECe.computeTransform,GCt=ECe.transformInsideText,WCt=Bj().styleOne,jCt=N0().resizeText,ZCt=BE(),Oj=pj(),kf=Kg();DR.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,u=!r,l=!i.uniformtext.mode&&kf.hasTransition(r);if(UCt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(c){return c[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),l){n&&(s=n());var f=OE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});f.each(function(){a.selectAll("g.trace").each(function(c){ACe(e,c,this,r)})})}else o.each(function(c){ACe(e,c,this,r)}),i.uniformtext.mode&&jCt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");u&&o.exit().remove()};function ACe(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&kf.hasTransition(n),s=OE.select(r),u=s.selectAll("g.slice"),l=t[0],f=l.trace,c=l.hierarchy,h=kf.findEntryWithLevel(c,f.level),d=kf.getMaxDepth(f),p=a._size,x=f.domain,b=p.w*(x.x[1]-x.x[0]),y=p.h*(x.y[1]-x.y[0]),k=.5*Math.min(b,y),E=l.cx=p.l+p.w*(x.x[1]+x.x[0])/2,A=l.cy=p.t+p.h*(1-x.y[0])-y/2;if(!h)return u.remove();var L=null,_={};o&&u.each(function(he){_[kf.getPtId(he)]={rpx0:he.rpx0,rpx1:he.rpx1,x0:he.x0,x1:he.x1,transform:he.transform},!L&&kf.isEntry(he)&&(L=he)});var C=XCt(h).descendants(),M=h.height+1,v=0,z=d;l.hasMultipleRoots&&kf.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,v=1,z+=1),C=C.filter(function(he){return he.y1<=z});var T=VCt(f.rotation);T&&C.forEach(function(he){he.x0+=T,he.x1+=T});var F=Math.min(M,d),q=function(he){return(he-v)/F*k},U=function(he,te){return[he*Math.cos(te),-he*Math.sin(te)]},H=function(he){return Tp.pathAnnulus(he.rpx0,he.rpx1,he.x0,he.x1,E,A)},j=function(he){return E+SCe(he)[0]*(he.transform.rCenter||0)+(he.transform.x||0)},G=function(he){return A+SCe(he)[1]*(he.transform.rCenter||0)+(he.transform.y||0)};u=u.data(C,kf.getPtId),u.enter().append("g").classed("slice",!0),o?u.exit().transition().each(function(){var he=OE.select(this),te=he.select("path.surface");te.transition().attrTween("d",function(Ee){var Me=ne(Ee);return function(Oe){return H(Me(Oe))}});var ke=he.select("g.slicetext");ke.attr("opacity",0)}).remove():u.exit().remove(),u.order();var O=null;if(o&&L){var W=kf.getPtId(L);u.each(function(he){O===null&&kf.getPtId(he)===W&&(O=he.x1)})}var re=u;o&&(re=re.transition().each("end",function(){var he=OE.select(this);kf.setSliceCursor(he,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(he){var te=OE.select(this),ke=Tp.ensureSingle(te,"path","surface",function(Be){Be.style("pointer-events",i?"none":"all")});he.rpx0=q(he.y0),he.rpx1=q(he.y1),he.xmid=(he.x0+he.x1)/2,he.pxmid=U(he.rpx1,he.xmid),he.midangle=-(he.xmid-Math.PI/2),he.startangle=-(he.x0-Math.PI/2),he.stopangle=-(he.x1-Math.PI/2),he.halfangle=.5*Math.min(Tp.angleDelta(he.x0,he.x1)||Math.PI,Math.PI),he.ring=1-he.rpx0/he.rpx1,he.rInscribed=YCt(he,f),o?ke.transition().attrTween("d",function(Be){var fe=be(Be);return function(Ze){return H(fe(Ze))}}):ke.attr("d",H),te.call(ZCt,h,e,t,{eventDataKeys:Oj.eventDataKeys,transitionTime:Oj.CLICK_TRANSITION_TIME,transitionEasing:Oj.CLICK_TRANSITION_EASING}).call(kf.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),ke.call(WCt,he,f,e);var Ee=Tp.ensureSingle(te,"g","slicetext"),Me=Tp.ensureSingle(Ee,"text","",function(Be){Be.attr("data-notex",1)}),Oe=Tp.ensureUniformFontSize(e,kf.determineTextFont(f,he,a.font));Me.text(DR.formatSliceLabel(he,h,f,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(wCe.font,Oe).call(NCt.convertToTspans,e);var Re=wCe.bBox(Me.node());he.transform=GCt(Re,he,l),he.transform.targetX=j(he),he.transform.targetY=G(he);var me=function(Be,fe){var Ze=Be.transform;return HCt(Ze,fe),Ze.fontSize=Oe.size,TCe(f.type,Ze,a),Tp.getTextTransform(Ze)};o?Me.transition().attrTween("transform",function(Be){var fe=ze(Be);return function(Ze){return me(fe(Ze),Re)}}):Me.attr("transform",me(he,Re))});function ne(he){var te=kf.getPtId(he),ke=_[te],Ee=_[kf.getPtId(h)],Me;if(Ee){var Oe=(he.x1>Ee.x1?2*Math.PI:0)+T;Me=he.rpx1O?2*Math.PI:0)+T;ke={x0:Me,x1:Me}}else ke={rpx0:k,rpx1:k},Tp.extendFlat(ke,Ce(he));else ke={rpx0:0,rpx1:0};else ke={x0:T,x1:T};return Xy(ke,Ee)}function ze(he){var te=_[kf.getPtId(he)],ke,Ee=he.transform;if(te)ke=te;else if(ke={rpx1:he.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(he.parent)if(O){var Me=he.x1>O?2*Math.PI:0;ke.x0=ke.x1=Me}else Tp.extendFlat(ke,Ce(he));else ke.x0=ke.x1=T;else ke.x0=ke.x1=T;var Oe=Xy(ke.transform.textPosAngle,he.transform.textPosAngle),Re=Xy(ke.rpx1,he.rpx1),me=Xy(ke.x0,he.x0),Be=Xy(ke.x1,he.x1),fe=Xy(ke.transform.scale,Ee.scale),Ze=Xy(ke.transform.rotate,Ee.rotate),et=Ee.rCenter===0?3:ke.transform.rCenter===0?1/3:1,gt=Xy(ke.transform.rCenter,Ee.rCenter),Pt=function(Qe){return gt(Math.pow(Qe,et))};return function(Qe){var Xe=Re(Qe),Tt=me(Qe),xt=Be(Qe),_t=Pt(Qe),Ct=U(Xe,(Tt+xt)/2),jt=Oe(Qe),At={pxmid:Ct,rpx1:Xe,transform:{textPosAngle:jt,rCenter:_t,x:Ee.x,y:Ee.y}};return TCe(f.type,Ee,a),{transform:{targetX:j(At),targetY:G(At),scale:fe(Qe),rotate:Ze(Qe),rCenter:_t}}}}function Ce(he){var te=he.parent,ke=_[kf.getPtId(te)],Ee={};if(ke){var Me=te.children,Oe=Me.indexOf(he),Re=Me.length,me=Xy(ke.x0,ke.x1);Ee.x0=me(Oe/Re),Ee.x1=me(Oe/Re)}else Ee.x0=Ee.x1=0;return Ee}}function XCt(e){return OCt.partition().size([2*Math.PI,e.height+1])(e)}DR.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,u=n[0],l=e.data.data,f=u.hierarchy,c=kf.isHierarchyRoot(e),h=kf.getParent(f,e),d=kf.getValue(e);if(!a){var p=o.split("+"),x=function(v){return p.indexOf(v)!==-1},b=[],y;if(x("label")&&l.label&&b.push(l.label),l.hasOwnProperty("v")&&x("value")&&b.push(kf.formatValue(l.v,s)),!c){x("current path")&&b.push(kf.getPath(e.data));var k=0;x("percent parent")&&k++,x("percent entry")&&k++,x("percent root")&&k++;var E=k>1;if(k){var A,L=function(v){y=kf.formatPercent(A,s),E&&(y+=" of "+v),b.push(y)};x("percent parent")&&!c&&(A=d/kf.getValue(h),L("parent")),x("percent entry")&&(A=d/kf.getValue(t),L("entry")),x("percent root")&&(A=d/kf.getValue(f),L("root"))}}return x("text")&&(y=Tp.castOption(r,l.i,"text"),Tp.isValidTextValue(y)&&b.push(y)),b.join("
")}var _=Tp.castOption(r,l.i,"texttemplate");if(!_)return"";var C={};l.label&&(C.label=l.label),l.hasOwnProperty("v")&&(C.value=l.v,C.valueLabel=kf.formatValue(l.v,s)),C.currentPath=kf.getPath(e.data),c||(C.percentParent=d/kf.getValue(h),C.percentParentLabel=kf.formatPercent(C.percentParent,s),C.parent=kf.getPtLabel(h)),C.percentEntry=d/kf.getValue(t),C.percentEntryLabel=kf.formatPercent(C.percentEntry,s),C.entry=kf.getPtLabel(t),C.percentRoot=d/kf.getValue(f),C.percentRootLabel=kf.formatPercent(C.percentRoot,s),C.root=kf.getPtLabel(f),l.hasOwnProperty("color")&&(C.color=l.color);var M=Tp.castOption(r,l.i,"text");return(Tp.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=Tp.castOption(r,l.i,"customdata"),Tp.texttemplateString(_,C,i._d3locale,C,r._meta||{})};function YCt(e){return e.rpx0===0&&Tp.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function SCe(e){return KCt(e.rpx1,e.transform.textPosAngle)}function KCt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var CCe=Se((zpr,kCe)=>{"use strict";kCe.exports={moduleType:"trace",name:"sunburst",basePlotModule:HEe(),categories:[],animatable:!0,attributes:AE(),layoutAttributes:vj(),supplyDefaults:JEe(),supplyLayoutDefaults:QEe(),calc:EE().calc,crossTraceCalc:EE().crossTraceCalc,plot:RR().plot,style:Bj().style,colorbar:ep(),meta:{}}});var zCe=Se((Ppr,LCe)=>{"use strict";LCe.exports=CCe()});var ICe=Se(LA=>{"use strict";var PCe=Sc();LA.name="treemap";LA.plot=function(e,t,r,n){PCe.plotBasePlot(LA.name,e,t,r,n)};LA.clean=function(e,t,r,n){PCe.cleanBasePlot(LA.name,e,t,r,n)}});var R2=Se((Dpr,DCe)=>{"use strict";DCe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var FR=Se((Rpr,FCe)=>{"use strict";var JCt=Du().hovertemplateAttrs,$Ct=Du().texttemplateAttrs,QCt=Xf(),eLt=Ec().attributes,F2=A2(),Q0=AE(),RCe=R2(),Nj=vu().extendFlat,tLt=Id().pattern;FCe.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:Nj({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:tLt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Q0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},QCt("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:Nj({},F2.textfont,{}),editType:"calc"},text:F2.text,textinfo:Q0.textinfo,texttemplate:$Ct({editType:"plot"},{keys:RCe.eventDataKeys.concat(["label","value"])}),hovertext:F2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:JCt({},{keys:RCe.eventDataKeys}),textfont:F2.textfont,insidetextfont:F2.insidetextfont,outsidetextfont:Nj({},F2.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:F2.sort,root:Q0.root,domain:eLt({name:"treemap",trace:!0,editType:"calc"})}});var Uj=Se((Fpr,qCe)=>{"use strict";qCe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var UCe=Se((qpr,NCe)=>{"use strict";var BCe=Zr(),rLt=FR(),iLt=Pl(),nLt=Ec().defaults,aLt=r0().handleText,oLt=Qb().TEXTPAD,sLt=S2().handleMarkerDefaults,OCe=fc(),lLt=OCe.hasColorscale,uLt=OCe.handleDefaults;NCe.exports=function(t,r,n,i){function a(b,y){return BCe.coerce(t,r,rLt,b,y)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var l=a("tiling.packing");l==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var f=a("text");a("texttemplate"),r.texttemplate||a("textinfo",BCe.isArrayOrTypedArray(f)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c=a("pathbar.visible"),h="auto";aLt(t,r,i,a,h,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;sLt(t,r,i,a);var p=r._hasColorscale=lLt(t,"marker","colors")||(t.marker||{}).coloraxis;p?uLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;a("marker.pad.t",d?x/4:x),a("marker.pad.l",x/4),a("marker.pad.r",x/4),a("marker.pad.b",d?x:x/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:iLt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*oLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),nLt(r,i,a),r._length=null}});var HCe=Se((Bpr,VCe)=>{"use strict";var fLt=Zr(),cLt=Uj();VCe.exports=function(t,r){function n(i,a){return fLt.coerce(t,r,cLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var Hj=Se(Vj=>{"use strict";var GCe=EE();Vj.calc=function(e,t){return GCe.calc(e,t)};Vj.crossTraceCalc=function(e){return GCe._runCrossTraceCalc("treemap",e)}});var Gj=Se((Npr,WCe)=>{"use strict";WCe.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=SE(),hLt=Gj();jCe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],u=n.pad[i?"right":"left"],l=n.pad[i?"left":"right"],f=n.pad[a?"top":"bottom"],c;o&&(c=u,u=s,s=c,c=l,l=f,f=c);var h=zA.treemap().tile(dLt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(u).paddingRight(l).paddingTop(s).paddingBottom(f).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&hLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function dLt(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 qR=Se((Vpr,KCe)=>{"use strict";var ZCe=Nl(),PA=Pl(),XCe=Zr(),jj=Kg(),pLt=bp().resizeText,vLt=IR();function yLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");pLt(e,t,"treemap"),t.each(function(r){var n=ZCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){ZCe.select(this).call(YCe,o,a,e,{hovered:!1})})})}function YCe(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,u,l,f=o.color,c=jj.isHierarchyRoot(t),h=1;if(a)u=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(c&&f===r.root.color)h=100,u="rgba(0,0,0,0)",l=0;else if(u=XCe.castOption(r,s,"marker.line.color")||PA.defaultLine,l=XCe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var p=PA.combine(PA.addOpacity(r._backgroundColor,.75),f),x;if(d===!0){var b=jj.getMaxDepth(r);isFinite(b)?jj.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var y=0;y{"use strict";var JCe=Nl(),BR=Zr(),$Ce=yu(),mLt=Bf(),gLt=Wj(),QCe=qR().styleOne,Zj=R2(),IA=Kg(),_Lt=BE(),Xj=!0;eLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,u=a.height,l=a.viewX,f=a.viewY,c=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,p=a.hasTransition,x=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,y=a.makeUpdateTextInterpolator,k={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=L.hierarchy,M=s/_._entryDepth,v=IA.listPath(n.data,"id"),z=gLt(C.copy(),[s,u],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();z=z.filter(function(F){var q=v.indexOf(F.data.id);return q===-1?!1:(F.x0=M*q,F.x1=M*(q+1),F.y0=o,F.y1=o+u,F.onPathbar=!0,!0)}),z.reverse(),i=i.data(z,IA.getPtId),i.enter().append("g").classed("pathbar",!0),x(i,Xj,k,[s,u],c),i.order();var T=i;p&&(T=T.transition().each("end",function(){var F=JCe.select(this);IA.setSliceCursor(F,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(F){F._x0=l(F.x0),F._x1=l(F.x1),F._y0=f(F.y0),F._y1=f(F.y1),F._hoverX=l(F.x1-Math.min(s,u)/2),F._hoverY=f(F.y1-u/2);var q=JCe.select(this),U=BR.ensureSingle(q,"path","surface",function(O){O.style("pointer-events",E?"none":"all")});p?U.transition().attrTween("d",function(O){var W=b(O,Xj,k,[s,u]);return function(re){return c(W(re))}}):U.attr("d",c),q.call(_Lt,n,t,r,{styleOne:QCe,eventDataKeys:Zj.eventDataKeys,transitionTime:Zj.CLICK_TRANSITION_TIME,transitionEasing:Zj.CLICK_TRANSITION_EASING}).call(IA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call(QCe,F,_,t,{hovered:!1}),F._text=(IA.getPtLabel(F)||"").split("
").join(" ")||"";var H=BR.ensureSingle(q,"g","slicetext"),j=BR.ensureSingle(H,"text","",function(O){O.attr("data-notex",1)}),G=BR.ensureUniformFontSize(t,IA.determineTextFont(_,F,A.font,{onPathbar:!0}));j.text(F._text||" ").classed("slicetext",!0).attr("text-anchor","start").call($Ce.font,G).call(mLt.convertToTspans,t),F.textBB=$Ce.bBox(j.node()),F.transform=h(F,{fontSize:G.size,onPathbar:!0}),F.transform.fontSize=G.size,p?j.transition().attrTween("transform",function(O){var W=y(O,Xj,k,[s,u]);return function(re){return d(W(re))}}):j.attr("transform",d(F))})}});var aLe=Se((Gpr,nLe)=>{"use strict";var rLe=Nl(),Yj=(I2(),ab(P2)).interpolate,X_=Kg(),NE=Zr(),iLe=Qb().TEXTPAD,xLt=i2(),bLt=xLt.toMoveInsideBar,wLt=bp(),Kj=wLt.recordMinTextSize,TLt=R2(),ALt=tLe();function q2(e){return X_.isHierarchyRoot(e)?"":X_.getPtId(e)}nLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],u=s.trace,l=u.type,f=l==="icicle",c=s.hierarchy,h=X_.findEntryWithLevel(c,u.level),d=rLe.select(n),p=d.selectAll("g.pathbar"),x=d.selectAll("g.slice");if(!h){p.remove(),x.remove();return}var b=X_.isHierarchyRoot(h),y=!o.uniformtext.mode&&X_.hasTransition(i),k=X_.getMaxDepth(u),E=function(Te){return Te.data.depth-h.data.depth-1?C+z:-(v+z):0,F={x0:M,x1:M,y0:T,y1:T+v},q=function(Te,nt,ut){var ct=u.tiling.pad,rt=function(Mt){return Mt-ct<=nt.x0},je=function(Mt){return Mt+ct>=nt.x1},tt=function(Mt){return Mt-ct<=nt.y0},Je=function(Mt){return Mt+ct>=nt.y1};return Te.x0===nt.x0&&Te.x1===nt.x1&&Te.y0===nt.y0&&Te.y1===nt.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:rt(Te.x0-ct)?0:je(Te.x0-ct)?ut[0]:Te.x0,x1:rt(Te.x1+ct)?0:je(Te.x1+ct)?ut[0]:Te.x1,y0:tt(Te.y0-ct)?0:Je(Te.y0-ct)?ut[1]:Te.y0,y1:tt(Te.y1+ct)?0:Je(Te.y1+ct)?ut[1]:Te.y1}},U=null,H={},j={},G=null,O=function(Te,nt){return nt?H[q2(Te)]:j[q2(Te)]},W=function(Te,nt,ut,ct){if(nt)return H[q2(c)]||F;var rt=j[u.level]||ut;return E(Te)?q(Te,rt,ct):{}};s.hasMultipleRoots&&b&&k++,u._maxDepth=k,u._backgroundColor=o.paper_bgcolor,u._entryDepth=h.data.depth,u._atRootLevel=b;var re=-_/2+A.l+A.w*(L.x[1]+L.x[0])/2,ne=-C/2+A.t+A.h*(1-(L.y[1]+L.y[0])/2),be=function(Te){return re+Te},ze=function(Te){return ne+Te},Ce=ze(0),he=be(0),te=function(Te){return he+Te},ke=function(Te){return Ce+Te};function Ee(Te,nt){return Te+","+nt}var Me=te(0),Oe=function(Te){Te.x=Math.max(Me,Te.x)},Re=u.pathbar.edgeshape,me=function(Te){var nt=te(Math.max(Math.min(Te.x0,Te.x0),0)),ut=te(Math.min(Math.max(Te.x1,Te.x1),M)),ct=ke(Te.y0),rt=ke(Te.y1),je=v/2,tt={},Je={};tt.x=nt,Je.x=ut,tt.y=Je.y=(ct+rt)/2;var Mt={x:nt,y:ct},Vt={x:ut,y:ct},Kt={x:ut,y:rt},ir={x:nt,y:rt};return Re===">"?(Mt.x-=je,Vt.x-=je,Kt.x-=je,ir.x-=je):Re==="/"?(Kt.x-=je,ir.x-=je,tt.x-=je/2,Je.x-=je/2):Re==="\\"?(Mt.x-=je,Vt.x-=je,tt.x-=je/2,Je.x-=je/2):Re==="<"&&(tt.x-=je,Je.x-=je),Oe(Mt),Oe(ir),Oe(tt),Oe(Vt),Oe(Kt),Oe(Je),"M"+Ee(Mt.x,Mt.y)+"L"+Ee(Vt.x,Vt.y)+"L"+Ee(Je.x,Je.y)+"L"+Ee(Kt.x,Kt.y)+"L"+Ee(ir.x,ir.y)+"L"+Ee(tt.x,tt.y)+"Z"},Be=u[f?"tiling":"marker"].pad,fe=function(Te){return u.textposition.indexOf(Te)!==-1},Ze=fe("top"),et=fe("left"),gt=fe("right"),Pt=fe("bottom"),Qe=function(Te){var nt=be(Te.x0),ut=be(Te.x1),ct=ze(Te.y0),rt=ze(Te.y1),je=ut-nt,tt=rt-ct;if(!je||!tt)return"";var Je=u.marker.cornerradius||0,Mt=Math.min(Je,je/2,tt/2);Mt&&Te.data&&Te.data.data&&Te.data.data.label&&(Ze&&(Mt=Math.min(Mt,Be.t)),et&&(Mt=Math.min(Mt,Be.l)),gt&&(Mt=Math.min(Mt,Be.r)),Pt&&(Mt=Math.min(Mt,Be.b)));var Vt=function(Kt,ir){return Mt?"a"+Ee(Mt,Mt)+" 0 0 1 "+Ee(Kt,ir):""};return"M"+Ee(nt,ct+Mt)+Vt(Mt,-Mt)+"L"+Ee(ut-Mt,ct)+Vt(Mt,Mt)+"L"+Ee(ut,rt-Mt)+Vt(-Mt,Mt)+"L"+Ee(nt+Mt,rt)+Vt(-Mt,-Mt)+"Z"},Xe=function(Te,nt){var ut=Te.x0,ct=Te.x1,rt=Te.y0,je=Te.y1,tt=Te.textBB,Je=Ze||nt.isHeader&&!Pt,Mt=Je?"start":Pt?"end":"middle",Vt=fe("right"),Kt=fe("left")||nt.onPathbar,ir=Kt?-1:Vt?1:0;if(nt.isHeader){if(ut+=(f?Be:Be.l)-iLe,ct-=(f?Be:Be.r)-iLe,ut>=ct){var fr=(ut+ct)/2;ut=fr,ct=fr}var Ot;Pt?(Ot=je-(f?Be:Be.b),rt{"use strict";var SLt=Nl(),MLt=Kg(),ELt=bp(),kLt=ELt.clearMinTextSize,CLt=N0().resizeText,oLe=aLe();sLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,u=t._fullLayout,l=u["_"+o+"layer"],f,c,h=!n;if(kLt(o,u),f=l.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),f.enter().append("g").classed("trace",!0).classed(o,!0),f.order(),!u.uniformtext.mode&&MLt.hasTransition(n)){i&&(c=i());var d=SLt.transition().duration(n.duration).ease(n.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()});d.each(function(){l.selectAll("g.trace").each(function(p){oLe(t,p,this,n,s)})})}else f.each(function(p){oLe(t,p,this,n,s)}),u.uniformtext.mode&&CLt(t,l.selectAll(".trace"),o);h&&f.exit().remove()}});var hLe=Se((jpr,cLe)=>{"use strict";var lLe=Nl(),OR=Zr(),uLe=yu(),LLt=Bf(),zLt=Wj(),fLe=qR().styleOne,$j=R2(),Y_=Kg(),PLt=BE(),ILt=RR().formatSliceLabel,Qj=!1;cLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,u=a.viewX,l=a.viewY,f=a.pathSlice,c=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,y=a.prevEntry,k={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,v=_.textposition.indexOf("bottom")!==-1,z=!v&&!_.marker.pad.t||v&&!_.marker.pad.b,T=zLt(n,[o,s],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),F=T.descendants(),q=1/0,U=-1/0;F.forEach(function(W){var re=W.depth;re>=_._maxDepth?(W.x0=W.x1=(W.x0+W.x1)/2,W.y0=W.y1=(W.y0+W.y1)/2):(q=Math.min(q,re),U=Math.max(U,re))}),i=i.data(F,Y_.getPtId),_._maxVisibleLayers=isFinite(U)?U-q+1:0,i.enter().append("g").classed("slice",!0),p(i,Qj,k,[o,s],f),i.order();var H=null;if(d&&y){var j=Y_.getPtId(y);i.each(function(W){H===null&&Y_.getPtId(W)===j&&(H={x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1})})}var G=function(){return H||{x0:0,x1:o,y0:0,y1:s}},O=i;return d&&(O=O.transition().each("end",function(){var W=lLe.select(this);Y_.setSliceCursor(W,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),O.each(function(W){var re=Y_.isHeader(W,_);W._x0=u(W.x0),W._x1=u(W.x1),W._y0=l(W.y0),W._y1=l(W.y1),W._hoverX=u(W.x1-_.marker.pad.r),W._hoverY=l(v?W.y1-_.marker.pad.b/2:W.y0+_.marker.pad.t/2);var ne=lLe.select(this),be=OR.ensureSingle(ne,"path","surface",function(Ee){Ee.style("pointer-events",E?"none":"all")});d?be.transition().attrTween("d",function(Ee){var Me=x(Ee,Qj,G(),[o,s]);return function(Oe){return f(Me(Oe))}}):be.attr("d",f),ne.call(PLt,n,t,r,{styleOne:fLe,eventDataKeys:$j.eventDataKeys,transitionTime:$j.CLICK_TRANSITION_TIME,transitionEasing:$j.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),be.call(fLe,W,_,t,{hovered:!1}),W.x0===W.x1||W.y0===W.y1?W._text="":re?W._text=z?"":Y_.getPtLabel(W)||"":W._text=ILt(W,n,_,r,A)||"";var ze=OR.ensureSingle(ne,"g","slicetext"),Ce=OR.ensureSingle(ze,"text","",function(Ee){Ee.attr("data-notex",1)}),he=OR.ensureUniformFontSize(t,Y_.determineTextFont(_,W,A.font)),te=W._text||" ",ke=re&&te.indexOf("
")===-1;Ce.text(te).classed("slicetext",!0).attr("text-anchor",M?"end":C||ke?"start":"middle").call(uLe.font,he).call(LLt.convertToTspans,t),W.textBB=uLe.bBox(Ce.node()),W.transform=c(W,{fontSize:he.size,isHeader:re}),W.transform.fontSize=he.size,d?Ce.transition().attrTween("transform",function(Ee){var Me=b(Ee,Qj,G(),[o,s]);return function(Oe){return h(Me(Oe))}}):Ce.attr("transform",h(W))}),H}});var pLe=Se((Zpr,dLe)=>{"use strict";var DLt=Jj(),RLt=hLe();dLe.exports=function(t,r,n,i){return DLt(t,r,n,i,{type:"treemap",drawDescendants:RLt})}});var yLe=Se((Xpr,vLe)=>{"use strict";vLe.exports={moduleType:"trace",name:"treemap",basePlotModule:ICe(),categories:[],animatable:!0,attributes:FR(),layoutAttributes:Uj(),supplyDefaults:UCe(),supplyLayoutDefaults:HCe(),calc:Hj().calc,crossTraceCalc:Hj().crossTraceCalc,plot:pLe(),style:qR().style,colorbar:ep(),meta:{}}});var gLe=Se((Ypr,mLe)=>{"use strict";mLe.exports=yLe()});var xLe=Se(DA=>{"use strict";var _Le=Sc();DA.name="icicle";DA.plot=function(e,t,r,n){_Le.plotBasePlot(DA.name,e,t,r,n)};DA.clean=function(e,t,r,n){_Le.cleanBasePlot(DA.name,e,t,r,n)}});var eZ=Se((Jpr,wLe)=>{"use strict";var FLt=Du().hovertemplateAttrs,qLt=Du().texttemplateAttrs,BLt=Xf(),OLt=Ec().attributes,UE=A2(),o0=AE(),NR=FR(),bLe=R2(),NLt=vu().extendFlat,ULt=Id().pattern;wLe.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:NR.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:NLt({colors:o0.marker.colors,line:o0.marker.line,pattern:ULt,editType:"calc"},BLt("marker",{colorAttr:"colors",anim:!1})),leaf:o0.leaf,pathbar:NR.pathbar,text:UE.text,textinfo:o0.textinfo,texttemplate:qLt({editType:"plot"},{keys:bLe.eventDataKeys.concat(["label","value"])}),hovertext:UE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:FLt({},{keys:bLe.eventDataKeys}),textfont:UE.textfont,insidetextfont:UE.insidetextfont,outsidetextfont:NR.outsidetextfont,textposition:NR.textposition,sort:UE.sort,root:o0.root,domain:OLt({name:"icicle",trace:!0,editType:"calc"})}});var tZ=Se(($pr,TLe)=>{"use strict";TLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ELe=Se((Qpr,MLe)=>{"use strict";var ALe=Zr(),VLt=eZ(),HLt=Pl(),GLt=Ec().defaults,WLt=r0().handleText,jLt=Qb().TEXTPAD,ZLt=S2().handleMarkerDefaults,SLe=fc(),XLt=SLe.hasColorscale,YLt=SLe.handleDefaults;MLe.exports=function(t,r,n,i){function a(d,p){return ALe.coerce(t,r,VLt,d,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var u=a("values");u&&u.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var l=a("text");a("texttemplate"),r.texttemplate||a("textinfo",ALe.isArrayOrTypedArray(l)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f=a("pathbar.visible"),c="auto";WLt(t,r,i,a,c,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),ZLt(t,r,i,a);var h=r._hasColorscale=XLt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&YLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:HLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*jLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),GLt(r,i,a),r._length=null}});var CLe=Se((evr,kLe)=>{"use strict";var KLt=Zr(),JLt=tZ();kLe.exports=function(t,r){function n(i,a){return KLt.coerce(t,r,JLt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var iZ=Se(rZ=>{"use strict";var LLe=EE();rZ.calc=function(e,t){return LLe.calc(e,t)};rZ.crossTraceCalc=function(e){return LLe._runCrossTraceCalc("icicle",e)}});var PLe=Se((rvr,zLe)=>{"use strict";var $Lt=SE(),QLt=Gj();zLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,u=r[0],l=r[1];s&&(u=(t.height+1)*r[0]/Math.min(t.height+1,s),l=(t.height+1)*r[1]/Math.min(t.height+1,s));var f=$Lt.partition().padding(n.pad.inner).size(o?[r[1],u]:[r[0],l])(t);return(o||i||a)&&QLt(f,r,{swapXY:o,flipX:i,flipY:a}),f}});var nZ=Se((ivr,qLe)=>{"use strict";var ILe=Nl(),DLe=Pl(),RLe=Zr(),ezt=bp().resizeText,tzt=IR();function rzt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");ezt(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=RLe.castOption(r,o,"marker.line.color")||DLe.defaultLine,u=RLe.castOption(r,o,"marker.line.width")||0;e.call(tzt,t,r,n).style("stroke-width",u).call(DLe.stroke,s).style("opacity",a?r.leaf.opacity:null)}qLe.exports={style:rzt,styleOne:FLe}});var VLe=Se((nvr,ULe)=>{"use strict";var BLe=Nl(),UR=Zr(),OLe=yu(),izt=Bf(),nzt=PLe(),NLe=nZ().styleOne,aZ=R2(),RA=Kg(),azt=BE(),ozt=RR().formatSliceLabel,oZ=!1;ULe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,u=a.viewX,l=a.viewY,f=a.pathSlice,c=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,y=a.prevEntry,k={},E=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,v=_.textposition.indexOf("bottom")!==-1,z=nzt(n,[o,s],{flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,orientation:_.tiling.orientation,pad:{inner:_.tiling.pad},maxDepth:_._maxDepth}),T=z.descendants(),F=1/0,q=-1/0;T.forEach(function(O){var W=O.depth;W>=_._maxDepth?(O.x0=O.x1=(O.x0+O.x1)/2,O.y0=O.y1=(O.y0+O.y1)/2):(F=Math.min(F,W),q=Math.max(q,W))}),i=i.data(T,RA.getPtId),_._maxVisibleLayers=isFinite(q)?q-F+1:0,i.enter().append("g").classed("slice",!0),p(i,oZ,k,[o,s],f),i.order();var U=null;if(d&&y){var H=RA.getPtId(y);i.each(function(O){U===null&&RA.getPtId(O)===H&&(U={x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1})})}var j=function(){return U||{x0:0,x1:o,y0:0,y1:s}},G=i;return d&&(G=G.transition().each("end",function(){var O=BLe.select(this);RA.setSliceCursor(O,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(O){O._x0=u(O.x0),O._x1=u(O.x1),O._y0=l(O.y0),O._y1=l(O.y1),O._hoverX=u(O.x1-_.tiling.pad),O._hoverY=l(v?O.y1-_.tiling.pad/2:O.y0+_.tiling.pad/2);var W=BLe.select(this),re=UR.ensureSingle(W,"path","surface",function(Ce){Ce.style("pointer-events",E?"none":"all")});d?re.transition().attrTween("d",function(Ce){var he=x(Ce,oZ,j(),[o,s],{orientation:_.tiling.orientation,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1});return function(te){return f(he(te))}}):re.attr("d",f),W.call(azt,n,t,r,{styleOne:NLe,eventDataKeys:aZ.eventDataKeys,transitionTime:aZ.CLICK_TRANSITION_TIME,transitionEasing:aZ.CLICK_TRANSITION_EASING}).call(RA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(NLe,O,_,t,{hovered:!1}),O.x0===O.x1||O.y0===O.y1?O._text="":O._text=ozt(O,n,_,r,A)||"";var ne=UR.ensureSingle(W,"g","slicetext"),be=UR.ensureSingle(ne,"text","",function(Ce){Ce.attr("data-notex",1)}),ze=UR.ensureUniformFontSize(t,RA.determineTextFont(_,O,A.font));be.text(O._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(OLe.font,ze).call(izt.convertToTspans,t),O.textBB=OLe.bBox(be.node()),O.transform=c(O,{fontSize:ze.size}),O.transform.fontSize=ze.size,d?be.transition().attrTween("transform",function(Ce){var he=b(Ce,oZ,j(),[o,s]);return function(te){return h(he(te))}}):be.attr("transform",h(O))}),U}});var GLe=Se((avr,HLe)=>{"use strict";var szt=Jj(),lzt=VLe();HLe.exports=function(t,r,n,i){return szt(t,r,n,i,{type:"icicle",drawDescendants:lzt})}});var jLe=Se((ovr,WLe)=>{"use strict";WLe.exports={moduleType:"trace",name:"icicle",basePlotModule:xLe(),categories:[],animatable:!0,attributes:eZ(),layoutAttributes:tZ(),supplyDefaults:ELe(),supplyLayoutDefaults:CLe(),calc:iZ().calc,crossTraceCalc:iZ().crossTraceCalc,plot:GLe(),style:nZ().style,colorbar:ep(),meta:{}}});var XLe=Se((svr,ZLe)=>{"use strict";ZLe.exports=jLe()});var KLe=Se(FA=>{"use strict";var YLe=Sc();FA.name="funnelarea";FA.plot=function(e,t,r,n){YLe.plotBasePlot(FA.name,e,t,r,n)};FA.clean=function(e,t,r,n){YLe.cleanBasePlot(FA.name,e,t,r,n)}});var sZ=Se((uvr,JLe)=>{"use strict";var ap=A2(),uzt=zf(),fzt=Ec().attributes,czt=Du().hovertemplateAttrs,hzt=Du().texttemplateAttrs,B2=vu().extendFlat;JLe.exports={labels:ap.labels,label0:ap.label0,dlabel:ap.dlabel,values:ap.values,marker:{colors:ap.marker.colors,line:{color:B2({},ap.marker.line.color,{dflt:null}),width:B2({},ap.marker.line.width,{dflt:1}),editType:"calc"},pattern:ap.marker.pattern,editType:"calc"},text:ap.text,hovertext:ap.hovertext,scalegroup:B2({},ap.scalegroup,{}),textinfo:B2({},ap.textinfo,{flags:["label","text","value","percent"]}),texttemplate:hzt({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:B2({},uzt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:czt({},{keys:["label","color","value","text","percent"]}),textposition:B2({},ap.textposition,{values:["inside","none"],dflt:"inside"}),textfont:ap.textfont,insidetextfont:ap.insidetextfont,title:{text:ap.title.text,font:ap.title.font,position:B2({},ap.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:fzt({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 lZ=Se((fvr,$Le)=>{"use strict";var dzt=lR().hiddenlabels;$Le.exports={hiddenlabels:dzt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var tze=Se((cvr,eze)=>{"use strict";var QLe=Zr(),pzt=sZ(),vzt=Ec().defaults,yzt=r0().handleText,mzt=S2().handleLabelsAndValues,gzt=S2().handleMarkerDefaults;eze.exports=function(t,r,n,i){function a(x,b){return QLe.coerce(t,r,pzt,x,b)}var o=a("labels"),s=a("values"),u=mzt(o,s),l=u.len;if(r._hasLabels=u.hasLabels,r._hasValues=u.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!l){r.visible=!1;return}r._length=l,gzt(t,r,i,a),a("scalegroup");var f=a("text"),c=a("texttemplate"),h;if(c||(h=a("textinfo",Array.isArray(f)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),c||h&&h!=="none"){var d=a("textposition");yzt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");vzt(r,i,a);var p=a("title.text");p&&(a("title.position"),QLe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var ize=Se((hvr,rze)=>{"use strict";var _zt=Zr(),xzt=lZ();rze.exports=function(t,r){function n(i,a){return _zt.coerce(t,r,xzt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var uZ=Se((dvr,aze)=>{"use strict";var nze=gA();function bzt(e,t){return nze.calc(e,t)}function wzt(e){nze.crossTraceCalc(e,{type:"funnelarea"})}aze.exports={calc:bzt,crossTraceCalc:wzt}});var fze=Se((pvr,uze)=>{"use strict";var O2=Nl(),fZ=yu(),K_=Zr(),Tzt=K_.strScale,oze=K_.strTranslate,sze=Bf(),Azt=i2(),Szt=Azt.toMoveInsideBar,lze=bp(),Mzt=lze.recordMinTextSize,Ezt=lze.clearMinTextSize,kzt=l_(),qA=hR(),Czt=qA.attachFxHandlers,Lzt=qA.determineInsideTextFont,zzt=qA.layoutAreas,Pzt=qA.prerenderTitles,Izt=qA.positionTitleOutside,Dzt=qA.formatSliceLabel;uze.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;Ezt("funnelarea",i),Pzt(r,t),zzt(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=O2.select(this),s=a[0],u=s.trace;Fzt(a),o.each(function(){var l=O2.select(this).selectAll("g.slice").data(a);l.enter().append("g").classed("slice",!0),l.exit().remove(),l.each(function(c,h){if(c.hidden){O2.select(this).selectAll("path,g").remove();return}c.pointNumber=c.i,c.curveNumber=u.index;var d=s.cx,p=s.cy,x=O2.select(this),b=x.selectAll("path.surface").data([c]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(Czt,t,a);var y="M"+(d+c.TR[0])+","+(p+c.TR[1])+cZ(c.TR,c.BR)+cZ(c.BR,c.BL)+cZ(c.BL,c.TL)+"Z";b.attr("d",y),Dzt(t,c,s);var k=kzt.castOption(u.textposition,c.pts),E=x.selectAll("g.slicetext").data(c.text&&k!=="none"?[0]:[]);E.enter().append("g").classed("slicetext",!0),E.exit().remove(),E.each(function(){var A=K_.ensureSingle(O2.select(this),"text","",function(F){F.attr("data-notex",1)}),L=K_.ensureUniformFontSize(t,Lzt(u,c,i.font));A.text(c.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(fZ.font,L).call(sze.convertToTspans,t);var _=fZ.bBox(A.node()),C,M,v,z=Math.min(c.BL[1],c.BR[1])+p,T=Math.max(c.TL[1],c.TR[1])+p;M=Math.max(c.TL[0],c.BL[0])+d,v=Math.min(c.TR[0],c.BR[0])+d,C=Szt(M,v,z,T,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,Mzt(u.type,C,i),a[h].transform=C,K_.setTransormAndDisplay(A,C)})});var f=O2.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);f.enter().append("g").classed("titletext",!0),f.exit().remove(),f.each(function(){var c=K_.ensureSingle(O2.select(this),"text","",function(p){p.attr("data-notex",1)}),h=u.title.text;u._meta&&(h=K_.templateString(h,u._meta)),c.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(fZ.font,u.title.font).call(sze.convertToTspans,t);var d=Izt(s,i._size);c.attr("transform",oze(d.x,d.y)+Tzt(Math.min(1,d.scale))+oze(d.tx,d.ty))})})})};function cZ(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function Rzt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function Fzt(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),u=o,l=s/o;function f(){var q=Math.sqrt(l);return{x:q,y:-q}}function c(){var q=f();return[q.x,q.y]}var h,d=[];d.push(c());var p,x;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){var b=x.v/u;l+=b,d.push(c())}var y=1/0,k=-1/0;for(p=0;p-1;p--)if(x=e[p],!x.hidden){z+=1;var T=d[z][0],F=d[z][1];x.TL=[-T,F],x.TR=[T,F],x.BL=M,x.BR=v,x.pxmid=Rzt(x.TR,x.BR),M=x.TL,v=x.TR}}});var dze=Se((vvr,hze)=>{"use strict";var cze=Nl(),qzt=R3(),Bzt=bp().resizeText;hze.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");Bzt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=cze.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){cze.select(this).call(qzt,s,a,t)})})}});var vze=Se((yvr,pze)=>{"use strict";pze.exports={moduleType:"trace",name:"funnelarea",basePlotModule:KLe(),categories:["pie-like","funnelarea","showLegend"],attributes:sZ(),layoutAttributes:lZ(),supplyDefaults:tze(),supplyLayoutDefaults:ize(),calc:uZ().calc,crossTraceCalc:uZ().crossTraceCalc,plot:fze(),style:dze(),styleOne:R3(),meta:{}}});var mze=Se((mvr,yze)=>{"use strict";yze.exports=vze()});var Od=Se((gvr,gze)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){"use strict";var s;function u(ye,ue){if(!(ye instanceof ue))throw new TypeError("Cannot call a class as a function")}function l(ye,ue){for(var de=0;deM)throw new RangeError('The value "'+ye+'" is invalid for option "size"');var ue=new Uint8Array(ye);return Object.setPrototypeOf(ue,T.prototype),ue}function T(ye,ue,de){if(typeof ye=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(ye)}return F(ye,ue,de)}T.poolSize=8192;function F(ye,ue,de){if(typeof ye=="string")return j(ye,ue);if(ArrayBuffer.isView(ye))return O(ye);if(ye==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(ye));if(_e(ye,ArrayBuffer)||ye&&_e(ye.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(_e(ye,SharedArrayBuffer)||ye&&_e(ye.buffer,SharedArrayBuffer)))return W(ye,ue,de);if(typeof ye=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ht=ye.valueOf&&ye.valueOf();if(ht!=null&&ht!==ye)return T.from(ht,ue,de);var Et=re(ye);if(Et)return Et;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ye[Symbol.toPrimitive]=="function")return T.from(ye[Symbol.toPrimitive]("string"),ue,de);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(ye))}T.from=function(ye,ue,de){return F(ye,ue,de)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function q(ye){if(typeof ye!="number")throw new TypeError('"size" argument must be of type number');if(ye<0)throw new RangeError('The value "'+ye+'" is invalid for option "size"')}function U(ye,ue,de){return q(ye),ye<=0?z(ye):ue!==void 0?typeof de=="string"?z(ye).fill(ue,de):z(ye).fill(ue):z(ye)}T.alloc=function(ye,ue,de){return U(ye,ue,de)};function H(ye){return q(ye),z(ye<0?0:ne(ye)|0)}T.allocUnsafe=function(ye){return H(ye)},T.allocUnsafeSlow=function(ye){return H(ye)};function j(ye,ue){if((typeof ue!="string"||ue==="")&&(ue="utf8"),!T.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue);var de=ze(ye,ue)|0,ht=z(de),Et=ht.write(ye,ue);return Et!==de&&(ht=ht.slice(0,Et)),ht}function G(ye){for(var ue=ye.length<0?0:ne(ye.length)|0,de=z(ue),ht=0;ht=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return ye|0}function be(ye){return+ye!=ye&&(ye=0),T.alloc(+ye)}T.isBuffer=function(ue){return ue!=null&&ue._isBuffer===!0&&ue!==T.prototype},T.compare=function(ue,de){if(_e(ue,Uint8Array)&&(ue=T.from(ue,ue.offset,ue.byteLength)),_e(de,Uint8Array)&&(de=T.from(de,de.offset,de.byteLength)),!T.isBuffer(ue)||!T.isBuffer(de))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ue===de)return 0;for(var ht=ue.length,Et=de.length,St=0,Zt=Math.min(ht,Et);StEt.length?(T.isBuffer(Zt)||(Zt=T.from(Zt)),Zt.copy(Et,St)):Uint8Array.prototype.set.call(Et,Zt,St);else if(T.isBuffer(Zt))Zt.copy(Et,St);else throw new TypeError('"list" argument must be an Array of Buffers');St+=Zt.length}return Et};function ze(ye,ue){if(T.isBuffer(ye))return ye.length;if(ArrayBuffer.isView(ye)||_e(ye,ArrayBuffer))return ye.byteLength;if(typeof ye!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(ye));var de=ye.length,ht=arguments.length>2&&arguments[2]===!0;if(!ht&&de===0)return 0;for(var Et=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return de;case"utf8":case"utf-8":return Kt(ye).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de*2;case"hex":return de>>>1;case"base64":return Ot(ye).length;default:if(Et)return ht?-1:Kt(ye).length;ue=(""+ue).toLowerCase(),Et=!0}}T.byteLength=ze;function Ce(ye,ue,de){var ht=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((de===void 0||de>this.length)&&(de=this.length),de<=0)||(de>>>=0,ue>>>=0,de<=ue))return"";for(ye||(ye="utf8");;)switch(ye){case"hex":return Qe(this,ue,de);case"utf8":case"utf-8":return fe(this,ue,de);case"ascii":return gt(this,ue,de);case"latin1":case"binary":return Pt(this,ue,de);case"base64":return Be(this,ue,de);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,ue,de);default:if(ht)throw new TypeError("Unknown encoding: "+ye);ye=(ye+"").toLowerCase(),ht=!0}}T.prototype._isBuffer=!0;function he(ye,ue,de){var ht=ye[ue];ye[ue]=ye[de],ye[de]=ht}T.prototype.swap16=function(){var ue=this.length;if(ue%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var de=0;dede&&(ue+=" ... "),""},C&&(T.prototype[C]=T.prototype.inspect),T.prototype.compare=function(ue,de,ht,Et,St){if(_e(ue,Uint8Array)&&(ue=T.from(ue,ue.offset,ue.byteLength)),!T.isBuffer(ue))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+A(ue));if(de===void 0&&(de=0),ht===void 0&&(ht=ue?ue.length:0),Et===void 0&&(Et=0),St===void 0&&(St=this.length),de<0||ht>ue.length||Et<0||St>this.length)throw new RangeError("out of range index");if(Et>=St&&de>=ht)return 0;if(Et>=St)return-1;if(de>=ht)return 1;if(de>>>=0,ht>>>=0,Et>>>=0,St>>>=0,this===ue)return 0;for(var Zt=St-Et,qr=ht-de,Lr=Math.min(Zt,qr),vr=this.slice(Et,St),Er=ue.slice(de,ht),si=0;si2147483647?de=2147483647:de<-2147483648&&(de=-2147483648),de=+de,Fe(de)&&(de=Et?0:ye.length-1),de<0&&(de=ye.length+de),de>=ye.length){if(Et)return-1;de=ye.length-1}else if(de<0)if(Et)de=0;else return-1;if(typeof ue=="string"&&(ue=T.from(ue,ht)),T.isBuffer(ue))return ue.length===0?-1:ke(ye,ue,de,ht,Et);if(typeof ue=="number")return ue=ue&255,typeof Uint8Array.prototype.indexOf=="function"?Et?Uint8Array.prototype.indexOf.call(ye,ue,de):Uint8Array.prototype.lastIndexOf.call(ye,ue,de):ke(ye,[ue],de,ht,Et);throw new TypeError("val must be string, number or Buffer")}function ke(ye,ue,de,ht,Et){var St=1,Zt=ye.length,qr=ue.length;if(ht!==void 0&&(ht=String(ht).toLowerCase(),ht==="ucs2"||ht==="ucs-2"||ht==="utf16le"||ht==="utf-16le")){if(ye.length<2||ue.length<2)return-1;St=2,Zt/=2,qr/=2,de/=2}function Lr(Si,xi){return St===1?Si[xi]:Si.readUInt16BE(xi*St)}var vr;if(Et){var Er=-1;for(vr=de;vrZt&&(de=Zt-qr),vr=de;vr>=0;vr--){for(var si=!0,Ei=0;EiEt&&(ht=Et)):ht=Et;var St=ue.length;ht>St/2&&(ht=St/2);var Zt;for(Zt=0;Zt>>0,isFinite(ht)?(ht=ht>>>0,Et===void 0&&(Et="utf8")):(Et=ht,ht=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var St=this.length-de;if((ht===void 0||ht>St)&&(ht=St),ue.length>0&&(ht<0||de<0)||de>this.length)throw new RangeError("Attempt to write outside buffer bounds");Et||(Et="utf8");for(var Zt=!1;;)switch(Et){case"hex":return Ee(this,ue,de,ht);case"utf8":case"utf-8":return Me(this,ue,de,ht);case"ascii":case"latin1":case"binary":return Oe(this,ue,de,ht);case"base64":return Re(this,ue,de,ht);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,ue,de,ht);default:if(Zt)throw new TypeError("Unknown encoding: "+Et);Et=(""+Et).toLowerCase(),Zt=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Be(ye,ue,de){return ue===0&&de===ye.length?L.fromByteArray(ye):L.fromByteArray(ye.slice(ue,de))}function fe(ye,ue,de){de=Math.min(ye.length,de);for(var ht=[],Et=ue;Et239?4:St>223?3:St>191?2:1;if(Et+qr<=de){var Lr=void 0,vr=void 0,Er=void 0,si=void 0;switch(qr){case 1:St<128&&(Zt=St);break;case 2:Lr=ye[Et+1],(Lr&192)===128&&(si=(St&31)<<6|Lr&63,si>127&&(Zt=si));break;case 3:Lr=ye[Et+1],vr=ye[Et+2],(Lr&192)===128&&(vr&192)===128&&(si=(St&15)<<12|(Lr&63)<<6|vr&63,si>2047&&(si<55296||si>57343)&&(Zt=si));break;case 4:Lr=ye[Et+1],vr=ye[Et+2],Er=ye[Et+3],(Lr&192)===128&&(vr&192)===128&&(Er&192)===128&&(si=(St&15)<<18|(Lr&63)<<12|(vr&63)<<6|Er&63,si>65535&&si<1114112&&(Zt=si))}}Zt===null?(Zt=65533,qr=1):Zt>65535&&(Zt-=65536,ht.push(Zt>>>10&1023|55296),Zt=56320|Zt&1023),ht.push(Zt),Et+=qr}return et(ht)}var Ze=4096;function et(ye){var ue=ye.length;if(ue<=Ze)return String.fromCharCode.apply(String,ye);for(var de="",ht=0;htht)&&(de=ht);for(var Et="",St=ue;Stht&&(ue=ht),de<0?(de+=ht,de<0&&(de=0)):de>ht&&(de=ht),dede)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue],St=1,Zt=0;++Zt>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue+--de],St=1;de>0&&(St*=256);)Et+=this[ue+--de]*St;return Et},T.prototype.readUint8=T.prototype.readUInt8=function(ue,de){return ue=ue>>>0,de||Tt(ue,1,this.length),this[ue]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,2,this.length),this[ue]|this[ue+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,2,this.length),this[ue]<<8|this[ue+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),(this[ue]|this[ue+1]<<8|this[ue+2]<<16)+this[ue+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]*16777216+(this[ue+1]<<16|this[ue+2]<<8|this[ue+3])},T.prototype.readBigUInt64LE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=de+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,24),St=this[++ue]+this[++ue]*Math.pow(2,8)+this[++ue]*Math.pow(2,16)+ht*Math.pow(2,24);return BigInt(Et)+(BigInt(St)<>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=de*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+this[++ue],St=this[++ue]*Math.pow(2,24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+ht;return(BigInt(Et)<>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=this[ue],St=1,Zt=0;++Zt=St&&(Et-=Math.pow(2,8*de)),Et},T.prototype.readIntBE=function(ue,de,ht){ue=ue>>>0,de=de>>>0,ht||Tt(ue,de,this.length);for(var Et=de,St=1,Zt=this[ue+--Et];Et>0&&(St*=256);)Zt+=this[ue+--Et]*St;return St*=128,Zt>=St&&(Zt-=Math.pow(2,8*de)),Zt},T.prototype.readInt8=function(ue,de){return ue=ue>>>0,de||Tt(ue,1,this.length),this[ue]&128?(255-this[ue]+1)*-1:this[ue]},T.prototype.readInt16LE=function(ue,de){ue=ue>>>0,de||Tt(ue,2,this.length);var ht=this[ue]|this[ue+1]<<8;return ht&32768?ht|4294901760:ht},T.prototype.readInt16BE=function(ue,de){ue=ue>>>0,de||Tt(ue,2,this.length);var ht=this[ue+1]|this[ue]<<8;return ht&32768?ht|4294901760:ht},T.prototype.readInt32LE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]|this[ue+1]<<8|this[ue+2]<<16|this[ue+3]<<24},T.prototype.readInt32BE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),this[ue]<<24|this[ue+1]<<16|this[ue+2]<<8|this[ue+3]},T.prototype.readBigInt64LE=Ie(function(ue){ue=ue>>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=this[ue+4]+this[ue+5]*Math.pow(2,8)+this[ue+6]*Math.pow(2,16)+(ht<<24);return(BigInt(Et)<>>0,tt(ue,"offset");var de=this[ue],ht=this[ue+7];(de===void 0||ht===void 0)&&Je(ue,this.length-8);var Et=(de<<24)+this[++ue]*Math.pow(2,16)+this[++ue]*Math.pow(2,8)+this[++ue];return(BigInt(Et)<>>0,de||Tt(ue,4,this.length),_.read(this,ue,!0,23,4)},T.prototype.readFloatBE=function(ue,de){return ue=ue>>>0,de||Tt(ue,4,this.length),_.read(this,ue,!1,23,4)},T.prototype.readDoubleLE=function(ue,de){return ue=ue>>>0,de||Tt(ue,8,this.length),_.read(this,ue,!0,52,8)},T.prototype.readDoubleBE=function(ue,de){return ue=ue>>>0,de||Tt(ue,8,this.length),_.read(this,ue,!1,52,8)};function xt(ye,ue,de,ht,Et,St){if(!T.isBuffer(ye))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Et||ueye.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,ht=ht>>>0,!Et){var St=Math.pow(2,8*ht)-1;xt(this,ue,de,ht,St,0)}var Zt=1,qr=0;for(this[de]=ue&255;++qr>>0,ht=ht>>>0,!Et){var St=Math.pow(2,8*ht)-1;xt(this,ue,de,ht,St,0)}var Zt=ht-1,qr=1;for(this[de+Zt]=ue&255;--Zt>=0&&(qr*=256);)this[de+Zt]=ue/qr&255;return de+ht},T.prototype.writeUint8=T.prototype.writeUInt8=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,1,255,0),this[de]=ue&255,de+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,65535,0),this[de]=ue&255,this[de+1]=ue>>>8,de+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,65535,0),this[de]=ue>>>8,this[de+1]=ue&255,de+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,4294967295,0),this[de+3]=ue>>>24,this[de+2]=ue>>>16,this[de+1]=ue>>>8,this[de]=ue&255,de+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,4294967295,0),this[de]=ue>>>24,this[de+1]=ue>>>16,this[de+2]=ue>>>8,this[de+3]=ue&255,de+4};function _t(ye,ue,de,ht,Et){je(ue,ht,Et,ye,de,7);var St=Number(ue&BigInt(4294967295));ye[de++]=St,St=St>>8,ye[de++]=St,St=St>>8,ye[de++]=St,St=St>>8,ye[de++]=St;var Zt=Number(ue>>BigInt(32)&BigInt(4294967295));return ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,Zt=Zt>>8,ye[de++]=Zt,de}function Ct(ye,ue,de,ht,Et){je(ue,ht,Et,ye,de,7);var St=Number(ue&BigInt(4294967295));ye[de+7]=St,St=St>>8,ye[de+6]=St,St=St>>8,ye[de+5]=St,St=St>>8,ye[de+4]=St;var Zt=Number(ue>>BigInt(32)&BigInt(4294967295));return ye[de+3]=Zt,Zt=Zt>>8,ye[de+2]=Zt,Zt=Zt>>8,ye[de+1]=Zt,Zt=Zt>>8,ye[de]=Zt,de+8}T.prototype.writeBigUInt64LE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,ue,de,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,ue,de,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,!Et){var St=Math.pow(2,8*ht-1);xt(this,ue,de,ht,St-1,-St)}var Zt=0,qr=1,Lr=0;for(this[de]=ue&255;++Zt>0)-Lr&255;return de+ht},T.prototype.writeIntBE=function(ue,de,ht,Et){if(ue=+ue,de=de>>>0,!Et){var St=Math.pow(2,8*ht-1);xt(this,ue,de,ht,St-1,-St)}var Zt=ht-1,qr=1,Lr=0;for(this[de+Zt]=ue&255;--Zt>=0&&(qr*=256);)ue<0&&Lr===0&&this[de+Zt+1]!==0&&(Lr=1),this[de+Zt]=(ue/qr>>0)-Lr&255;return de+ht},T.prototype.writeInt8=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,1,127,-128),ue<0&&(ue=255+ue+1),this[de]=ue&255,de+1},T.prototype.writeInt16LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,32767,-32768),this[de]=ue&255,this[de+1]=ue>>>8,de+2},T.prototype.writeInt16BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,2,32767,-32768),this[de]=ue>>>8,this[de+1]=ue&255,de+2},T.prototype.writeInt32LE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,2147483647,-2147483648),this[de]=ue&255,this[de+1]=ue>>>8,this[de+2]=ue>>>16,this[de+3]=ue>>>24,de+4},T.prototype.writeInt32BE=function(ue,de,ht){return ue=+ue,de=de>>>0,ht||xt(this,ue,de,4,2147483647,-2147483648),ue<0&&(ue=4294967295+ue+1),this[de]=ue>>>24,this[de+1]=ue>>>16,this[de+2]=ue>>>8,this[de+3]=ue&255,de+4},T.prototype.writeBigInt64LE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return _t(this,ue,de,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Ie(function(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,ue,de,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function jt(ye,ue,de,ht,Et,St){if(de+ht>ye.length)throw new RangeError("Index out of range");if(de<0)throw new RangeError("Index out of range")}function At(ye,ue,de,ht,Et){return ue=+ue,de=de>>>0,Et||jt(ye,ue,de,4,34028234663852886e22,-34028234663852886e22),_.write(ye,ue,de,ht,23,4),de+4}T.prototype.writeFloatLE=function(ue,de,ht){return At(this,ue,de,!0,ht)},T.prototype.writeFloatBE=function(ue,de,ht){return At(this,ue,de,!1,ht)};function Te(ye,ue,de,ht,Et){return ue=+ue,de=de>>>0,Et||jt(ye,ue,de,8,17976931348623157e292,-17976931348623157e292),_.write(ye,ue,de,ht,52,8),de+8}T.prototype.writeDoubleLE=function(ue,de,ht){return Te(this,ue,de,!0,ht)},T.prototype.writeDoubleBE=function(ue,de,ht){return Te(this,ue,de,!1,ht)},T.prototype.copy=function(ue,de,ht,Et){if(!T.isBuffer(ue))throw new TypeError("argument should be a Buffer");if(ht||(ht=0),!Et&&Et!==0&&(Et=this.length),de>=ue.length&&(de=ue.length),de||(de=0),Et>0&&Et=this.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("sourceEnd out of bounds");Et>this.length&&(Et=this.length),ue.length-de>>0,ht=ht===void 0?this.length:ht>>>0,ue||(ue=0);var Zt;if(typeof ue=="number")for(Zt=de;ZtMath.pow(2,32)?Et=ct(String(de)):typeof de=="bigint"&&(Et=String(de),(de>Math.pow(BigInt(2),BigInt(32))||de<-Math.pow(BigInt(2),BigInt(32)))&&(Et=ct(Et)),Et+="n"),ht+=" It must be ".concat(ue,". Received ").concat(Et),ht},RangeError);function ct(ye){for(var ue="",de=ye.length,ht=ye[0]==="-"?1:0;de>=ht+4;de-=3)ue="_".concat(ye.slice(de-3,de)).concat(ue);return"".concat(ye.slice(0,de)).concat(ue)}function rt(ye,ue,de){tt(ue,"offset"),(ye[ue]===void 0||ye[ue+de]===void 0)&&Je(ue,ye.length-(de+1))}function je(ye,ue,de,ht,Et,St){if(ye>de||ye3?ue===0||ue===BigInt(0)?qr=">= 0".concat(Zt," and < 2").concat(Zt," ** ").concat((St+1)*8).concat(Zt):qr=">= -(2".concat(Zt," ** ").concat((St+1)*8-1).concat(Zt,") and < 2 ** ")+"".concat((St+1)*8-1).concat(Zt):qr=">= ".concat(ue).concat(Zt," and <= ").concat(de).concat(Zt),new nt.ERR_OUT_OF_RANGE("value",qr,ye)}rt(ht,Et,St)}function tt(ye,ue){if(typeof ye!="number")throw new nt.ERR_INVALID_ARG_TYPE(ue,"number",ye)}function Je(ye,ue,de){throw Math.floor(ye)!==ye?(tt(ye,de),new nt.ERR_OUT_OF_RANGE(de||"offset","an integer",ye)):ue<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(de||"offset",">= ".concat(de?1:0," and <= ").concat(ue),ye)}var Mt=/[^+/0-9A-Za-z-_]/g;function Vt(ye){if(ye=ye.split("=")[0],ye=ye.trim().replace(Mt,""),ye.length<2)return"";for(;ye.length%4!==0;)ye=ye+"=";return ye}function Kt(ye,ue){ue=ue||1/0;for(var de,ht=ye.length,Et=null,St=[],Zt=0;Zt55295&&de<57344){if(!Et){if(de>56319){(ue-=3)>-1&&St.push(239,191,189);continue}else if(Zt+1===ht){(ue-=3)>-1&&St.push(239,191,189);continue}Et=de;continue}if(de<56320){(ue-=3)>-1&&St.push(239,191,189),Et=de;continue}de=(Et-55296<<10|de-56320)+65536}else Et&&(ue-=3)>-1&&St.push(239,191,189);if(Et=null,de<128){if((ue-=1)<0)break;St.push(de)}else if(de<2048){if((ue-=2)<0)break;St.push(de>>6|192,de&63|128)}else if(de<65536){if((ue-=3)<0)break;St.push(de>>12|224,de>>6&63|128,de&63|128)}else if(de<1114112){if((ue-=4)<0)break;St.push(de>>18|240,de>>12&63|128,de>>6&63|128,de&63|128)}else throw new Error("Invalid code point")}return St}function ir(ye){for(var ue=[],de=0;de>8,Et=de%256,St.push(Et),St.push(ht);return St}function Ot(ye){return L.toByteArray(Vt(ye))}function De(ye,ue,de,ht){var Et;for(Et=0;Et=ue.length||Et>=ye.length);++Et)ue[Et+de]=ye[Et];return Et}function _e(ye,ue){return ye instanceof ue||ye!=null&&ye.constructor!=null&&ye.constructor.name!=null&&ye.constructor.name===ue.name}function Fe(ye){return ye!==ye}var Pe=function(){for(var ye="0123456789abcdef",ue=new Array(256),de=0;de<16;++de)for(var ht=de*16,Et=0;Et<16;++Et)ue[ht+Et]=ye[de]+ye[Et];return ue}();function Ie(ye){return typeof BigInt=="undefined"?lt:ye}function lt(){throw new Error("BigInt not supported")}},9216:function(i){"use strict";i.exports=u,i.exports.isMobile=u,i.exports.default=u;var a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function u(l){l||(l={});var f=l.ua;if(!f&&typeof navigator!="undefined"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=a.test(f)&&!o.test(f)||!!l.tablet&&s.test(f);return!c&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),u=o(9977),l=o(1811);function f(d,p){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(x){return d[x]}),this._mode=p,this._active=d[p],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=f.prototype;c.flush=function(d){for(var p=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=E.indexOf("=");L===-1&&(L=A);var _=L===A?0:4-L%4;return[L,_]}function d(E){var A=h(E),L=A[0],_=A[1];return(L+_)*3/4-_}function p(E,A,L){return(A+L)*3/4-L}function x(E){var A,L=h(E),_=L[0],C=L[1],M=new u(p(E,_,C)),v=0,z=C>0?_-4:_,T;for(T=0;T>16&255,M[v++]=A>>8&255,M[v++]=A&255;return C===2&&(A=s[E.charCodeAt(T)]<<2|s[E.charCodeAt(T+1)]>>4,M[v++]=A&255),C===1&&(A=s[E.charCodeAt(T)]<<10|s[E.charCodeAt(T+1)]<<4|s[E.charCodeAt(T+2)]>>2,M[v++]=A>>8&255,M[v++]=A&255),M}function b(E){return o[E>>18&63]+o[E>>12&63]+o[E>>6&63]+o[E&63]}function y(E,A,L){for(var _,C=[],M=A;Mz?z:v+M));return _===1?(A=E[L-1],C.push(o[A>>2]+o[A<<4&63]+"==")):_===2&&(A=(E[L-2]<<8)+E[L-1],C.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]).add(f[0].mul(l[1])),l[1].mul(f[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]),l[1].mul(f[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),u=o(1533),l=o(2651),f=o(6768),c=o(869),h=o(8697);i.exports=d;function d(p,x){if(s(p))return x?h(p,d(x)):[p[0].clone(),p[1].clone()];var b=0,y,k;if(u(p))y=p.clone();else if(typeof p=="string")y=f(p);else{if(p===0)return[l(0),l(1)];if(p===Math.floor(p))y=l(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),b-=256;y=l(p)}}if(s(x))y.mul(x[1]),k=x[0].clone();else if(u(x))k=x.clone();else if(typeof x=="string")k=f(x);else if(!x)k=l(1);else if(x===Math.floor(x))k=l(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),b+=256;k=l(x)}return b>0?y=y.ushln(b):b<0&&(k=k.ushln(-b)),c(y,k)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=u;function u(l){return Array.isArray(l)&&l.length===2&&s(l[0])&&s(l[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return l.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=u;function u(l){var f=l.length,c=l.words,h=0;if(f===1)h=c[0];else if(f===2)h=c[0]+c[1]*67108864;else for(var d=0;d20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return l&&typeof l=="object"&&!!l.words}},2651:function(i,a,o){"use strict";var s=o(6859),u=o(2361);i.exports=l;function l(f){var c=u.exponent(f);return c<52?new s(f):new s(f*Math.pow(2,52-c)).ushln(c-52)}},869:function(i,a,o){"use strict";var s=o(2651),u=o(5716);i.exports=l;function l(f,c){var h=u(f),d=u(c);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(f=f.neg(),c=c.neg());var p=f.gcd(c);return p.cmpn(1)?[f.div(p),c.div(p)]:[f,c]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=u;function u(l){return new s(l)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[0]),l[1].mul(f[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=u;function u(l){return s(l[0])*s(l[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=u;function u(l,f){return s(l[0].mul(f[1]).sub(l[1].mul(f[0])),l[1].mul(f[1]))}},946:function(i,a,o){"use strict";var s=o(1369),u=o(4025);i.exports=l;function l(f){var c=f[0],h=f[1];if(c.cmpn(0)===0)return 0;var d=c.abs().divmod(h.abs()),p=d.div,x=s(p),b=d.mod,y=c.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return y*x;if(x){var k=u(x)+4,E=s(b.ushln(k).divRound(h));return y*(x+E*Math.pow(2,-k))}else{var A=h.bitLength()-b.bitLength()+53,E=s(b.ushln(A).divRound(h));return A<1023?y*E*Math.pow(2,-A):(E*=Math.pow(2,-1023),y*E*Math.pow(2,1023-A))}}},2478:function(i){"use strict";function a(c,h,d,p,x){for(var b=x+1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E>=0?(b=y,x=y-1):p=y+1}return b}function o(c,h,d,p,x){for(var b=x+1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E>0?(b=y,x=y-1):p=y+1}return b}function s(c,h,d,p,x){for(var b=p-1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E<0?(b=y,p=y+1):x=y-1}return b}function u(c,h,d,p,x){for(var b=p-1;p<=x;){var y=p+x>>>1,k=c[y],E=d!==void 0?d(k,h):k-h;E<=0?(b=y,p=y+1):x=y-1}return b}function l(c,h,d,p,x){for(;p<=x;){var b=p+x>>>1,y=c[b],k=d!==void 0?d(y,h):y-h;if(k===0)return b;k<=0?p=b+1:x=b-1}return-1}function f(c,h,d,p,x,b){return typeof d=="function"?b(c,h,d,p===void 0?0:p|0,x===void 0?c.length-1:x|0):b(c,h,void 0,d===void 0?0:d|0,p===void 0?c.length-1:p|0)}i.exports={ge:function(c,h,d,p,x){return f(c,h,d,p,x,a)},gt:function(c,h,d,p,x){return f(c,h,d,p,x,o)},lt:function(c,h,d,p,x){return f(c,h,d,p,x,s)},le:function(c,h,d,p,x){return f(c,h,d,p,x,u)},eq:function(c,h,d,p,x){return f(c,h,d,p,x,l)}}},8828:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(l<0)},a.abs=function(l){var f=l>>o-1;return(l^f)-f},a.min=function(l,f){return f^(l^f)&-(l65535)<<4,l>>>=f,c=(l>255)<<3,l>>>=c,f|=c,c=(l>15)<<2,l>>>=c,f|=c,c=(l>3)<<1,l>>>=c,f|=c,f|l>>1},a.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},a.popCount=function(l){return l=l-(l>>>1&1431655765),l=(l&858993459)+(l>>>2&858993459),(l+(l>>>4)&252645135)*16843009>>>24};function s(l){var f=32;return l&=-l,l&&f--,l&65535&&(f-=16),l&16711935&&(f-=8),l&252645135&&(f-=4),l&858993459&&(f-=2),l&1431655765&&(f-=1),f}a.countTrailingZeros=s,a.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1},a.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l-(l>>>1)},a.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,l&=15,27030>>>l&1};var u=new Array(256);(function(l){for(var f=0;f<256;++f){var c=f,h=f,d=7;for(c>>>=1;c;c>>>=1)h<<=1,h|=c&1,--d;l[f]=h<>>8&255]<<16|u[l>>>16&255]<<8|u[l>>>24&255]},a.interleave2=function(l,f){return l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,l|f<<1},a.deinterleave2=function(l,f){return l=l>>>f&1431655765,l=(l|l>>>1)&858993459,l=(l|l>>>2)&252645135,l=(l|l>>>4)&16711935,l=(l|l>>>16)&65535,l<<16>>16},a.interleave3=function(l,f,c){return l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,l|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,l|c<<2},a.deinterleave3=function(l,f){return l=l>>>f&1227133513,l=(l|l>>>2)&3272356035,l=(l|l>>>4)&251719695,l=(l|l>>>8)&4278190335,l=(l|l>>>16)&1023,l<<22>>22},a.nextCombination=function(l){var f=l|l-1;return f+1|(~f&-~f)-1>>>s(l)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,u){"use strict";function l(G,O){if(!G)throw new Error(O||"Assertion failed")}function f(G,O){G.super_=O;var W=function(){};W.prototype=O.prototype,G.prototype=new W,G.prototype.constructor=G}function c(G,O,W){if(c.isBN(G))return G;this.negative=0,this.words=null,this.length=0,this.red=null,G!==null&&((O==="le"||O==="be")&&(W=O,O=10),this._init(G||0,O||10,W||"be"))}typeof s=="object"?s.exports=c:u.BN=c,c.BN=c,c.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(G){}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,W){return O.cmp(W)>0?O:W},c.min=function(O,W){return O.cmp(W)<0?O:W},c.prototype._init=function(O,W,re){if(typeof O=="number")return this._initNumber(O,W,re);if(typeof O=="object")return this._initArray(O,W,re);W==="hex"&&(W=16),l(W===(W|0)&&W>=2&&W<=36),O=O.toString().replace(/\s+/g,"");var ne=0;O[0]==="-"&&(ne++,this.negative=1),ne=0;ne-=3)ze=O[ne]|O[ne-1]<<8|O[ne-2]<<16,this.words[be]|=ze<>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,be++);else if(re==="le")for(ne=0,be=0;ne>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,be++);return this.strip()};function d(G,O){var W=G.charCodeAt(O);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function p(G,O,W){var re=d(G,W);return W-1>=O&&(re|=d(G,W-1)<<4),re}c.prototype._parseHex=function(O,W,re){this.length=Math.ceil((O.length-W)/6),this.words=new Array(this.length);for(var ne=0;ne=W;ne-=2)Ce=p(O,W,ne)<=18?(be-=18,ze+=1,this.words[ze]|=Ce>>>26):be+=8;else{var he=O.length-W;for(ne=he%2===0?W+1:W;ne=18?(be-=18,ze+=1,this.words[ze]|=Ce>>>26):be+=8}this.strip()};function x(G,O,W,re){for(var ne=0,be=Math.min(G.length,W),ze=O;ze=49?ne+=Ce-49+10:Ce>=17?ne+=Ce-17+10:ne+=Ce}return ne}c.prototype._parseBase=function(O,W,re){this.words=[0],this.length=1;for(var ne=0,be=1;be<=67108863;be*=W)ne++;ne--,be=be/W|0;for(var ze=O.length-re,Ce=ze%ne,he=Math.min(ze,ze-Ce)+re,te=0,ke=re;ke1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.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"],y=[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];c.prototype.toString=function(O,W){O=O||10,W=W|0||1;var re;if(O===16||O==="hex"){re="";for(var ne=0,be=0,ze=0;ze>>24-ne&16777215,be!==0||ze!==this.length-1?re=b[6-he.length]+he+re:re=he+re,ne+=2,ne>=26&&(ne-=26,ze--)}for(be!==0&&(re=be.toString(16)+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(O===(O|0)&&O>=2&&O<=36){var te=y[O],ke=k[O];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Me=Ee.modn(ke).toString(O);Ee=Ee.idivn(ke),Ee.isZero()?re=Me+re:re=b[te-Me.length]+Me+re}for(this.isZero()&&(re="0"+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}l(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,W){return l(typeof h!="undefined"),this.toArrayLike(h,O,W)},c.prototype.toArray=function(O,W){return this.toArrayLike(Array,O,W)},c.prototype.toArrayLike=function(O,W,re){var ne=this.byteLength(),be=re||Math.max(1,ne);l(ne<=be,"byte array longer than desired length"),l(be>0,"Requested array length <= 0"),this.strip();var ze=W==="le",Ce=new O(be),he,te,ke=this.clone();if(ze){for(te=0;!ke.isZero();te++)he=ke.andln(255),ke.iushrn(8),Ce[te]=he;for(;te=4096&&(re+=13,W>>>=13),W>=64&&(re+=7,W>>>=7),W>=8&&(re+=4,W>>>=4),W>=2&&(re+=2,W>>>=2),re+W},c.prototype._zeroBits=function(O){if(O===0)return 26;var W=O,re=0;return W&8191||(re+=13,W>>>=13),W&127||(re+=7,W>>>=7),W&15||(re+=4,W>>>=4),W&3||(re+=2,W>>>=2),W&1||re++,re},c.prototype.bitLength=function(){var O=this.words[this.length-1],W=this._countBits(O);return(this.length-1)*26+W};function E(G){for(var O=new Array(G.bitLength()),W=0;W>>ne}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,W=0;WO.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var W;this.length>O.length?W=O:W=this;for(var re=0;reO.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var W,re;this.length>O.length?(W=this,re=O):(W=O,re=this);for(var ne=0;neO.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){l(typeof O=="number"&&O>=0);var W=Math.ceil(O/26)|0,re=O%26;this._expand(W),re>0&&W--;for(var ne=0;ne0&&(this.words[ne]=~this.words[ne]&67108863>>26-re),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,W){l(typeof O=="number"&&O>=0);var re=O/26|0,ne=O%26;return this._expand(re+1),W?this.words[re]=this.words[re]|1<O.length?(re=this,ne=O):(re=O,ne=this);for(var be=0,ze=0;ze>>26;for(;be!==0&&ze>>26;if(this.length=re.length,be!==0)this.words[this.length]=be,this.length++;else if(re!==this)for(;zeO.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var W=this.iadd(O);return O.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var re=this.cmp(O);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ne,be;re>0?(ne=this,be=O):(ne=O,be=this);for(var ze=0,Ce=0;Ce>26,this.words[Ce]=W&67108863;for(;ze!==0&&Ce>26,this.words[Ce]=W&67108863;if(ze===0&&Ce>>26,Ee=he&67108863,Me=Math.min(te,O.length-1),Oe=Math.max(0,te-G.length+1);Oe<=Me;Oe++){var Re=te-Oe|0;ne=G.words[Re]|0,be=O.words[Oe]|0,ze=ne*be+Ee,ke+=ze/67108864|0,Ee=ze&67108863}W.words[te]=Ee|0,he=ke|0}return he!==0?W.words[te]=he|0:W.length--,W.strip()}var L=function(O,W,re){var ne=O.words,be=W.words,ze=re.words,Ce=0,he,te,ke,Ee=ne[0]|0,Me=Ee&8191,Oe=Ee>>>13,Re=ne[1]|0,me=Re&8191,Be=Re>>>13,fe=ne[2]|0,Ze=fe&8191,et=fe>>>13,gt=ne[3]|0,Pt=gt&8191,Qe=gt>>>13,Xe=ne[4]|0,Tt=Xe&8191,xt=Xe>>>13,_t=ne[5]|0,Ct=_t&8191,jt=_t>>>13,At=ne[6]|0,Te=At&8191,nt=At>>>13,ut=ne[7]|0,ct=ut&8191,rt=ut>>>13,je=ne[8]|0,tt=je&8191,Je=je>>>13,Mt=ne[9]|0,Vt=Mt&8191,Kt=Mt>>>13,ir=be[0]|0,fr=ir&8191,Ot=ir>>>13,De=be[1]|0,_e=De&8191,Fe=De>>>13,Pe=be[2]|0,Ie=Pe&8191,lt=Pe>>>13,ye=be[3]|0,ue=ye&8191,de=ye>>>13,ht=be[4]|0,Et=ht&8191,St=ht>>>13,Zt=be[5]|0,qr=Zt&8191,Lr=Zt>>>13,vr=be[6]|0,Er=vr&8191,si=vr>>>13,Ei=be[7]|0,Si=Ei&8191,xi=Ei>>>13,Hi=be[8]|0,Jr=Hi&8191,ci=Hi>>>13,Di=be[9]|0,Lt=Di&8191,vt=Di>>>13;re.negative=O.negative^W.negative,re.length=19,he=Math.imul(Me,fr),te=Math.imul(Me,Ot),te=te+Math.imul(Oe,fr)|0,ke=Math.imul(Oe,Ot);var Dt=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,he=Math.imul(me,fr),te=Math.imul(me,Ot),te=te+Math.imul(Be,fr)|0,ke=Math.imul(Be,Ot),he=he+Math.imul(Me,_e)|0,te=te+Math.imul(Me,Fe)|0,te=te+Math.imul(Oe,_e)|0,ke=ke+Math.imul(Oe,Fe)|0;var Bt=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,he=Math.imul(Ze,fr),te=Math.imul(Ze,Ot),te=te+Math.imul(et,fr)|0,ke=Math.imul(et,Ot),he=he+Math.imul(me,_e)|0,te=te+Math.imul(me,Fe)|0,te=te+Math.imul(Be,_e)|0,ke=ke+Math.imul(Be,Fe)|0,he=he+Math.imul(Me,Ie)|0,te=te+Math.imul(Me,lt)|0,te=te+Math.imul(Oe,Ie)|0,ke=ke+Math.imul(Oe,lt)|0;var sr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(sr>>>26)|0,sr&=67108863,he=Math.imul(Pt,fr),te=Math.imul(Pt,Ot),te=te+Math.imul(Qe,fr)|0,ke=Math.imul(Qe,Ot),he=he+Math.imul(Ze,_e)|0,te=te+Math.imul(Ze,Fe)|0,te=te+Math.imul(et,_e)|0,ke=ke+Math.imul(et,Fe)|0,he=he+Math.imul(me,Ie)|0,te=te+Math.imul(me,lt)|0,te=te+Math.imul(Be,Ie)|0,ke=ke+Math.imul(Be,lt)|0,he=he+Math.imul(Me,ue)|0,te=te+Math.imul(Me,de)|0,te=te+Math.imul(Oe,ue)|0,ke=ke+Math.imul(Oe,de)|0;var br=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(br>>>26)|0,br&=67108863,he=Math.imul(Tt,fr),te=Math.imul(Tt,Ot),te=te+Math.imul(xt,fr)|0,ke=Math.imul(xt,Ot),he=he+Math.imul(Pt,_e)|0,te=te+Math.imul(Pt,Fe)|0,te=te+Math.imul(Qe,_e)|0,ke=ke+Math.imul(Qe,Fe)|0,he=he+Math.imul(Ze,Ie)|0,te=te+Math.imul(Ze,lt)|0,te=te+Math.imul(et,Ie)|0,ke=ke+Math.imul(et,lt)|0,he=he+Math.imul(me,ue)|0,te=te+Math.imul(me,de)|0,te=te+Math.imul(Be,ue)|0,ke=ke+Math.imul(Be,de)|0,he=he+Math.imul(Me,Et)|0,te=te+Math.imul(Me,St)|0,te=te+Math.imul(Oe,Et)|0,ke=ke+Math.imul(Oe,St)|0;var zr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(zr>>>26)|0,zr&=67108863,he=Math.imul(Ct,fr),te=Math.imul(Ct,Ot),te=te+Math.imul(jt,fr)|0,ke=Math.imul(jt,Ot),he=he+Math.imul(Tt,_e)|0,te=te+Math.imul(Tt,Fe)|0,te=te+Math.imul(xt,_e)|0,ke=ke+Math.imul(xt,Fe)|0,he=he+Math.imul(Pt,Ie)|0,te=te+Math.imul(Pt,lt)|0,te=te+Math.imul(Qe,Ie)|0,ke=ke+Math.imul(Qe,lt)|0,he=he+Math.imul(Ze,ue)|0,te=te+Math.imul(Ze,de)|0,te=te+Math.imul(et,ue)|0,ke=ke+Math.imul(et,de)|0,he=he+Math.imul(me,Et)|0,te=te+Math.imul(me,St)|0,te=te+Math.imul(Be,Et)|0,ke=ke+Math.imul(Be,St)|0,he=he+Math.imul(Me,qr)|0,te=te+Math.imul(Me,Lr)|0,te=te+Math.imul(Oe,qr)|0,ke=ke+Math.imul(Oe,Lr)|0;var Tr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Tr>>>26)|0,Tr&=67108863,he=Math.imul(Te,fr),te=Math.imul(Te,Ot),te=te+Math.imul(nt,fr)|0,ke=Math.imul(nt,Ot),he=he+Math.imul(Ct,_e)|0,te=te+Math.imul(Ct,Fe)|0,te=te+Math.imul(jt,_e)|0,ke=ke+Math.imul(jt,Fe)|0,he=he+Math.imul(Tt,Ie)|0,te=te+Math.imul(Tt,lt)|0,te=te+Math.imul(xt,Ie)|0,ke=ke+Math.imul(xt,lt)|0,he=he+Math.imul(Pt,ue)|0,te=te+Math.imul(Pt,de)|0,te=te+Math.imul(Qe,ue)|0,ke=ke+Math.imul(Qe,de)|0,he=he+Math.imul(Ze,Et)|0,te=te+Math.imul(Ze,St)|0,te=te+Math.imul(et,Et)|0,ke=ke+Math.imul(et,St)|0,he=he+Math.imul(me,qr)|0,te=te+Math.imul(me,Lr)|0,te=te+Math.imul(Be,qr)|0,ke=ke+Math.imul(Be,Lr)|0,he=he+Math.imul(Me,Er)|0,te=te+Math.imul(Me,si)|0,te=te+Math.imul(Oe,Er)|0,ke=ke+Math.imul(Oe,si)|0;var Rr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,he=Math.imul(ct,fr),te=Math.imul(ct,Ot),te=te+Math.imul(rt,fr)|0,ke=Math.imul(rt,Ot),he=he+Math.imul(Te,_e)|0,te=te+Math.imul(Te,Fe)|0,te=te+Math.imul(nt,_e)|0,ke=ke+Math.imul(nt,Fe)|0,he=he+Math.imul(Ct,Ie)|0,te=te+Math.imul(Ct,lt)|0,te=te+Math.imul(jt,Ie)|0,ke=ke+Math.imul(jt,lt)|0,he=he+Math.imul(Tt,ue)|0,te=te+Math.imul(Tt,de)|0,te=te+Math.imul(xt,ue)|0,ke=ke+Math.imul(xt,de)|0,he=he+Math.imul(Pt,Et)|0,te=te+Math.imul(Pt,St)|0,te=te+Math.imul(Qe,Et)|0,ke=ke+Math.imul(Qe,St)|0,he=he+Math.imul(Ze,qr)|0,te=te+Math.imul(Ze,Lr)|0,te=te+Math.imul(et,qr)|0,ke=ke+Math.imul(et,Lr)|0,he=he+Math.imul(me,Er)|0,te=te+Math.imul(me,si)|0,te=te+Math.imul(Be,Er)|0,ke=ke+Math.imul(Be,si)|0,he=he+Math.imul(Me,Si)|0,te=te+Math.imul(Me,xi)|0,te=te+Math.imul(Oe,Si)|0,ke=ke+Math.imul(Oe,xi)|0;var Br=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Br>>>26)|0,Br&=67108863,he=Math.imul(tt,fr),te=Math.imul(tt,Ot),te=te+Math.imul(Je,fr)|0,ke=Math.imul(Je,Ot),he=he+Math.imul(ct,_e)|0,te=te+Math.imul(ct,Fe)|0,te=te+Math.imul(rt,_e)|0,ke=ke+Math.imul(rt,Fe)|0,he=he+Math.imul(Te,Ie)|0,te=te+Math.imul(Te,lt)|0,te=te+Math.imul(nt,Ie)|0,ke=ke+Math.imul(nt,lt)|0,he=he+Math.imul(Ct,ue)|0,te=te+Math.imul(Ct,de)|0,te=te+Math.imul(jt,ue)|0,ke=ke+Math.imul(jt,de)|0,he=he+Math.imul(Tt,Et)|0,te=te+Math.imul(Tt,St)|0,te=te+Math.imul(xt,Et)|0,ke=ke+Math.imul(xt,St)|0,he=he+Math.imul(Pt,qr)|0,te=te+Math.imul(Pt,Lr)|0,te=te+Math.imul(Qe,qr)|0,ke=ke+Math.imul(Qe,Lr)|0,he=he+Math.imul(Ze,Er)|0,te=te+Math.imul(Ze,si)|0,te=te+Math.imul(et,Er)|0,ke=ke+Math.imul(et,si)|0,he=he+Math.imul(me,Si)|0,te=te+Math.imul(me,xi)|0,te=te+Math.imul(Be,Si)|0,ke=ke+Math.imul(Be,xi)|0,he=he+Math.imul(Me,Jr)|0,te=te+Math.imul(Me,ci)|0,te=te+Math.imul(Oe,Jr)|0,ke=ke+Math.imul(Oe,ci)|0;var oi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(oi>>>26)|0,oi&=67108863,he=Math.imul(Vt,fr),te=Math.imul(Vt,Ot),te=te+Math.imul(Kt,fr)|0,ke=Math.imul(Kt,Ot),he=he+Math.imul(tt,_e)|0,te=te+Math.imul(tt,Fe)|0,te=te+Math.imul(Je,_e)|0,ke=ke+Math.imul(Je,Fe)|0,he=he+Math.imul(ct,Ie)|0,te=te+Math.imul(ct,lt)|0,te=te+Math.imul(rt,Ie)|0,ke=ke+Math.imul(rt,lt)|0,he=he+Math.imul(Te,ue)|0,te=te+Math.imul(Te,de)|0,te=te+Math.imul(nt,ue)|0,ke=ke+Math.imul(nt,de)|0,he=he+Math.imul(Ct,Et)|0,te=te+Math.imul(Ct,St)|0,te=te+Math.imul(jt,Et)|0,ke=ke+Math.imul(jt,St)|0,he=he+Math.imul(Tt,qr)|0,te=te+Math.imul(Tt,Lr)|0,te=te+Math.imul(xt,qr)|0,ke=ke+Math.imul(xt,Lr)|0,he=he+Math.imul(Pt,Er)|0,te=te+Math.imul(Pt,si)|0,te=te+Math.imul(Qe,Er)|0,ke=ke+Math.imul(Qe,si)|0,he=he+Math.imul(Ze,Si)|0,te=te+Math.imul(Ze,xi)|0,te=te+Math.imul(et,Si)|0,ke=ke+Math.imul(et,xi)|0,he=he+Math.imul(me,Jr)|0,te=te+Math.imul(me,ci)|0,te=te+Math.imul(Be,Jr)|0,ke=ke+Math.imul(Be,ci)|0,he=he+Math.imul(Me,Lt)|0,te=te+Math.imul(Me,vt)|0,te=te+Math.imul(Oe,Lt)|0,ke=ke+Math.imul(Oe,vt)|0;var vi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(vi>>>26)|0,vi&=67108863,he=Math.imul(Vt,_e),te=Math.imul(Vt,Fe),te=te+Math.imul(Kt,_e)|0,ke=Math.imul(Kt,Fe),he=he+Math.imul(tt,Ie)|0,te=te+Math.imul(tt,lt)|0,te=te+Math.imul(Je,Ie)|0,ke=ke+Math.imul(Je,lt)|0,he=he+Math.imul(ct,ue)|0,te=te+Math.imul(ct,de)|0,te=te+Math.imul(rt,ue)|0,ke=ke+Math.imul(rt,de)|0,he=he+Math.imul(Te,Et)|0,te=te+Math.imul(Te,St)|0,te=te+Math.imul(nt,Et)|0,ke=ke+Math.imul(nt,St)|0,he=he+Math.imul(Ct,qr)|0,te=te+Math.imul(Ct,Lr)|0,te=te+Math.imul(jt,qr)|0,ke=ke+Math.imul(jt,Lr)|0,he=he+Math.imul(Tt,Er)|0,te=te+Math.imul(Tt,si)|0,te=te+Math.imul(xt,Er)|0,ke=ke+Math.imul(xt,si)|0,he=he+Math.imul(Pt,Si)|0,te=te+Math.imul(Pt,xi)|0,te=te+Math.imul(Qe,Si)|0,ke=ke+Math.imul(Qe,xi)|0,he=he+Math.imul(Ze,Jr)|0,te=te+Math.imul(Ze,ci)|0,te=te+Math.imul(et,Jr)|0,ke=ke+Math.imul(et,ci)|0,he=he+Math.imul(me,Lt)|0,te=te+Math.imul(me,vt)|0,te=te+Math.imul(Be,Lt)|0,ke=ke+Math.imul(Be,vt)|0;var Pi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,he=Math.imul(Vt,Ie),te=Math.imul(Vt,lt),te=te+Math.imul(Kt,Ie)|0,ke=Math.imul(Kt,lt),he=he+Math.imul(tt,ue)|0,te=te+Math.imul(tt,de)|0,te=te+Math.imul(Je,ue)|0,ke=ke+Math.imul(Je,de)|0,he=he+Math.imul(ct,Et)|0,te=te+Math.imul(ct,St)|0,te=te+Math.imul(rt,Et)|0,ke=ke+Math.imul(rt,St)|0,he=he+Math.imul(Te,qr)|0,te=te+Math.imul(Te,Lr)|0,te=te+Math.imul(nt,qr)|0,ke=ke+Math.imul(nt,Lr)|0,he=he+Math.imul(Ct,Er)|0,te=te+Math.imul(Ct,si)|0,te=te+Math.imul(jt,Er)|0,ke=ke+Math.imul(jt,si)|0,he=he+Math.imul(Tt,Si)|0,te=te+Math.imul(Tt,xi)|0,te=te+Math.imul(xt,Si)|0,ke=ke+Math.imul(xt,xi)|0,he=he+Math.imul(Pt,Jr)|0,te=te+Math.imul(Pt,ci)|0,te=te+Math.imul(Qe,Jr)|0,ke=ke+Math.imul(Qe,ci)|0,he=he+Math.imul(Ze,Lt)|0,te=te+Math.imul(Ze,vt)|0,te=te+Math.imul(et,Lt)|0,ke=ke+Math.imul(et,vt)|0;var Yr=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,he=Math.imul(Vt,ue),te=Math.imul(Vt,de),te=te+Math.imul(Kt,ue)|0,ke=Math.imul(Kt,de),he=he+Math.imul(tt,Et)|0,te=te+Math.imul(tt,St)|0,te=te+Math.imul(Je,Et)|0,ke=ke+Math.imul(Je,St)|0,he=he+Math.imul(ct,qr)|0,te=te+Math.imul(ct,Lr)|0,te=te+Math.imul(rt,qr)|0,ke=ke+Math.imul(rt,Lr)|0,he=he+Math.imul(Te,Er)|0,te=te+Math.imul(Te,si)|0,te=te+Math.imul(nt,Er)|0,ke=ke+Math.imul(nt,si)|0,he=he+Math.imul(Ct,Si)|0,te=te+Math.imul(Ct,xi)|0,te=te+Math.imul(jt,Si)|0,ke=ke+Math.imul(jt,xi)|0,he=he+Math.imul(Tt,Jr)|0,te=te+Math.imul(Tt,ci)|0,te=te+Math.imul(xt,Jr)|0,ke=ke+Math.imul(xt,ci)|0,he=he+Math.imul(Pt,Lt)|0,te=te+Math.imul(Pt,vt)|0,te=te+Math.imul(Qe,Lt)|0,ke=ke+Math.imul(Qe,vt)|0;var Ni=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,he=Math.imul(Vt,Et),te=Math.imul(Vt,St),te=te+Math.imul(Kt,Et)|0,ke=Math.imul(Kt,St),he=he+Math.imul(tt,qr)|0,te=te+Math.imul(tt,Lr)|0,te=te+Math.imul(Je,qr)|0,ke=ke+Math.imul(Je,Lr)|0,he=he+Math.imul(ct,Er)|0,te=te+Math.imul(ct,si)|0,te=te+Math.imul(rt,Er)|0,ke=ke+Math.imul(rt,si)|0,he=he+Math.imul(Te,Si)|0,te=te+Math.imul(Te,xi)|0,te=te+Math.imul(nt,Si)|0,ke=ke+Math.imul(nt,xi)|0,he=he+Math.imul(Ct,Jr)|0,te=te+Math.imul(Ct,ci)|0,te=te+Math.imul(jt,Jr)|0,ke=ke+Math.imul(jt,ci)|0,he=he+Math.imul(Tt,Lt)|0,te=te+Math.imul(Tt,vt)|0,te=te+Math.imul(xt,Lt)|0,ke=ke+Math.imul(xt,vt)|0;var Ur=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,he=Math.imul(Vt,qr),te=Math.imul(Vt,Lr),te=te+Math.imul(Kt,qr)|0,ke=Math.imul(Kt,Lr),he=he+Math.imul(tt,Er)|0,te=te+Math.imul(tt,si)|0,te=te+Math.imul(Je,Er)|0,ke=ke+Math.imul(Je,si)|0,he=he+Math.imul(ct,Si)|0,te=te+Math.imul(ct,xi)|0,te=te+Math.imul(rt,Si)|0,ke=ke+Math.imul(rt,xi)|0,he=he+Math.imul(Te,Jr)|0,te=te+Math.imul(Te,ci)|0,te=te+Math.imul(nt,Jr)|0,ke=ke+Math.imul(nt,ci)|0,he=he+Math.imul(Ct,Lt)|0,te=te+Math.imul(Ct,vt)|0,te=te+Math.imul(jt,Lt)|0,ke=ke+Math.imul(jt,vt)|0;var ti=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ti>>>26)|0,ti&=67108863,he=Math.imul(Vt,Er),te=Math.imul(Vt,si),te=te+Math.imul(Kt,Er)|0,ke=Math.imul(Kt,si),he=he+Math.imul(tt,Si)|0,te=te+Math.imul(tt,xi)|0,te=te+Math.imul(Je,Si)|0,ke=ke+Math.imul(Je,xi)|0,he=he+Math.imul(ct,Jr)|0,te=te+Math.imul(ct,ci)|0,te=te+Math.imul(rt,Jr)|0,ke=ke+Math.imul(rt,ci)|0,he=he+Math.imul(Te,Lt)|0,te=te+Math.imul(Te,vt)|0,te=te+Math.imul(nt,Lt)|0,ke=ke+Math.imul(nt,vt)|0;var ki=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ki>>>26)|0,ki&=67108863,he=Math.imul(Vt,Si),te=Math.imul(Vt,xi),te=te+Math.imul(Kt,Si)|0,ke=Math.imul(Kt,xi),he=he+Math.imul(tt,Jr)|0,te=te+Math.imul(tt,ci)|0,te=te+Math.imul(Je,Jr)|0,ke=ke+Math.imul(Je,ci)|0,he=he+Math.imul(ct,Lt)|0,te=te+Math.imul(ct,vt)|0,te=te+Math.imul(rt,Lt)|0,ke=ke+Math.imul(rt,vt)|0;var ji=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(ji>>>26)|0,ji&=67108863,he=Math.imul(Vt,Jr),te=Math.imul(Vt,ci),te=te+Math.imul(Kt,Jr)|0,ke=Math.imul(Kt,ci),he=he+Math.imul(tt,Lt)|0,te=te+Math.imul(tt,vt)|0,te=te+Math.imul(Je,Lt)|0,ke=ke+Math.imul(Je,vt)|0;var Vi=(Ce+he|0)+((te&8191)<<13)|0;Ce=(ke+(te>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,he=Math.imul(Vt,Lt),te=Math.imul(Vt,vt),te=te+Math.imul(Kt,Lt)|0,ke=Math.imul(Kt,vt);var zi=(Ce+he|0)+((te&8191)<<13)|0;return Ce=(ke+(te>>>13)|0)+(zi>>>26)|0,zi&=67108863,ze[0]=Dt,ze[1]=Bt,ze[2]=sr,ze[3]=br,ze[4]=zr,ze[5]=Tr,ze[6]=Rr,ze[7]=Br,ze[8]=oi,ze[9]=vi,ze[10]=Pi,ze[11]=Yr,ze[12]=Ni,ze[13]=Ur,ze[14]=ti,ze[15]=ki,ze[16]=ji,ze[17]=Vi,ze[18]=zi,Ce!==0&&(ze[19]=Ce,re.length++),re};Math.imul||(L=A);function _(G,O,W){W.negative=O.negative^G.negative,W.length=G.length+O.length;for(var re=0,ne=0,be=0;be>>26)|0,ne+=ze>>>26,ze&=67108863}W.words[be]=Ce,re=ze,ze=ne}return re!==0?W.words[be]=re:W.length--,W.strip()}function C(G,O,W){var re=new M;return re.mulp(G,O,W)}c.prototype.mulTo=function(O,W){var re,ne=this.length+O.length;return this.length===10&&O.length===10?re=L(this,O,W):ne<63?re=A(this,O,W):ne<1024?re=_(this,O,W):re=C(this,O,W),re};function M(G,O){this.x=G,this.y=O}M.prototype.makeRBT=function(O){for(var W=new Array(O),re=c.prototype._countBits(O)-1,ne=0;ne>=1;return ne},M.prototype.permute=function(O,W,re,ne,be,ze){for(var Ce=0;Ce>>1)be++;return 1<>>13,re[2*ze+1]=be&8191,be=be>>>13;for(ze=2*W;ze>=26,W+=ne/67108864|0,W+=be>>>26,this.words[re]=be&67108863}return W!==0&&(this.words[re]=W,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var W=E(O);if(W.length===0)return new c(1);for(var re=this,ne=0;ne=0);var W=O%26,re=(O-W)/26,ne=67108863>>>26-W<<26-W,be;if(W!==0){var ze=0;for(be=0;be>>26-W}ze&&(this.words[be]=ze,this.length++)}if(re!==0){for(be=this.length-1;be>=0;be--)this.words[be+re]=this.words[be];for(be=0;be=0);var ne;W?ne=(W-W%26)/26:ne=0;var be=O%26,ze=Math.min((O-be)/26,this.length),Ce=67108863^67108863>>>be<ze)for(this.length-=ze,te=0;te=0&&(ke!==0||te>=ne);te--){var Ee=this.words[te]|0;this.words[te]=ke<<26-be|Ee>>>be,ke=Ee&Ce}return he&&ke!==0&&(he.words[he.length++]=ke),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,W,re){return l(this.negative===0),this.iushrn(O,W,re)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){l(typeof O=="number"&&O>=0);var W=O%26,re=(O-W)/26,ne=1<=0);var W=O%26,re=(O-W)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(W!==0&&re++,this.length=Math.min(re,this.length),W!==0){var ne=67108863^67108863>>>W<=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+1),this},c.prototype.isubn=function(O){if(l(typeof O=="number"),l(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var W=0;W>26)-(he/67108864|0),this.words[be+re]=ze&67108863}for(;be>26,this.words[be+re]=ze&67108863;if(Ce===0)return this.strip();for(l(Ce===-1),Ce=0,be=0;be>26,this.words[be]=ze&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,W){var re=this.length-O.length,ne=this.clone(),be=O,ze=be.words[be.length-1]|0,Ce=this._countBits(ze);re=26-Ce,re!==0&&(be=be.ushln(re),ne.iushln(re),ze=be.words[be.length-1]|0);var he=ne.length-be.length,te;if(W!=="mod"){te=new c(null),te.length=he+1,te.words=new Array(te.length);for(var ke=0;ke=0;Me--){var Oe=(ne.words[be.length+Me]|0)*67108864+(ne.words[be.length+Me-1]|0);for(Oe=Math.min(Oe/ze|0,67108863),ne._ishlnsubmul(be,Oe,Me);ne.negative!==0;)Oe--,ne.negative=0,ne._ishlnsubmul(be,1,Me),ne.isZero()||(ne.negative^=1);te&&(te.words[Me]=Oe)}return te&&te.strip(),ne.strip(),W!=="div"&&re!==0&&ne.iushrn(re),{div:te||null,mod:ne}},c.prototype.divmod=function(O,W,re){if(l(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var ne,be,ze;return this.negative!==0&&O.negative===0?(ze=this.neg().divmod(O,W),W!=="mod"&&(ne=ze.div.neg()),W!=="div"&&(be=ze.mod.neg(),re&&be.negative!==0&&be.iadd(O)),{div:ne,mod:be}):this.negative===0&&O.negative!==0?(ze=this.divmod(O.neg(),W),W!=="mod"&&(ne=ze.div.neg()),{div:ne,mod:ze.mod}):this.negative&O.negative?(ze=this.neg().divmod(O.neg(),W),W!=="div"&&(be=ze.mod.neg(),re&&be.negative!==0&&be.isub(O)),{div:ze.div,mod:be}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?W==="div"?{div:this.divn(O.words[0]),mod:null}:W==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,W)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var W=this.divmod(O);if(W.mod.isZero())return W.div;var re=W.div.negative!==0?W.mod.isub(O):W.mod,ne=O.ushrn(1),be=O.andln(1),ze=re.cmp(ne);return ze<0||be===1&&ze===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},c.prototype.modn=function(O){l(O<=67108863);for(var W=(1<<26)%O,re=0,ne=this.length-1;ne>=0;ne--)re=(W*re+(this.words[ne]|0))%O;return re},c.prototype.idivn=function(O){l(O<=67108863);for(var W=0,re=this.length-1;re>=0;re--){var ne=(this.words[re]|0)+W*67108864;this.words[re]=ne/O|0,W=ne%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){l(O.negative===0),l(!O.isZero());var W=this,re=O.clone();W.negative!==0?W=W.umod(O):W=W.clone();for(var ne=new c(1),be=new c(0),ze=new c(0),Ce=new c(1),he=0;W.isEven()&&re.isEven();)W.iushrn(1),re.iushrn(1),++he;for(var te=re.clone(),ke=W.clone();!W.isZero();){for(var Ee=0,Me=1;!(W.words[0]&Me)&&Ee<26;++Ee,Me<<=1);if(Ee>0)for(W.iushrn(Ee);Ee-- >0;)(ne.isOdd()||be.isOdd())&&(ne.iadd(te),be.isub(ke)),ne.iushrn(1),be.iushrn(1);for(var Oe=0,Re=1;!(re.words[0]&Re)&&Oe<26;++Oe,Re<<=1);if(Oe>0)for(re.iushrn(Oe);Oe-- >0;)(ze.isOdd()||Ce.isOdd())&&(ze.iadd(te),Ce.isub(ke)),ze.iushrn(1),Ce.iushrn(1);W.cmp(re)>=0?(W.isub(re),ne.isub(ze),be.isub(Ce)):(re.isub(W),ze.isub(ne),Ce.isub(be))}return{a:ze,b:Ce,gcd:re.iushln(he)}},c.prototype._invmp=function(O){l(O.negative===0),l(!O.isZero());var W=this,re=O.clone();W.negative!==0?W=W.umod(O):W=W.clone();for(var ne=new c(1),be=new c(0),ze=re.clone();W.cmpn(1)>0&&re.cmpn(1)>0;){for(var Ce=0,he=1;!(W.words[0]&he)&&Ce<26;++Ce,he<<=1);if(Ce>0)for(W.iushrn(Ce);Ce-- >0;)ne.isOdd()&&ne.iadd(ze),ne.iushrn(1);for(var te=0,ke=1;!(re.words[0]&ke)&&te<26;++te,ke<<=1);if(te>0)for(re.iushrn(te);te-- >0;)be.isOdd()&&be.iadd(ze),be.iushrn(1);W.cmp(re)>=0?(W.isub(re),ne.isub(be)):(re.isub(W),be.isub(ne))}var Ee;return W.cmpn(1)===0?Ee=ne:Ee=be,Ee.cmpn(0)<0&&Ee.iadd(O),Ee},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var W=this.clone(),re=O.clone();W.negative=0,re.negative=0;for(var ne=0;W.isEven()&&re.isEven();ne++)W.iushrn(1),re.iushrn(1);do{for(;W.isEven();)W.iushrn(1);for(;re.isEven();)re.iushrn(1);var be=W.cmp(re);if(be<0){var ze=W;W=re,re=ze}else if(be===0||re.cmpn(1)===0)break;W.isub(re)}while(!0);return re.iushln(ne)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){l(typeof O=="number");var W=O%26,re=(O-W)/26,ne=1<>>26,Ce&=67108863,this.words[ze]=Ce}return be!==0&&(this.words[ze]=be,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var W=O<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this.strip();var re;if(this.length>1)re=1;else{W&&(O=-O),l(O<=67108863,"Number is too big");var ne=this.words[0]|0;re=ne===O?0:neO.length)return 1;if(this.length=0;re--){var ne=this.words[re]|0,be=O.words[re]|0;if(ne!==be){nebe&&(W=1);break}}return W},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new H(O)},c.prototype.toRed=function(O){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return l(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return l(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var v={k256:null,p224:null,p192:null,p25519:null};function z(G,O){this.name=G,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}z.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},z.prototype.ireduce=function(O){var W=O,re;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),re=W.bitLength();while(re>this.n);var ne=re0?W.isub(this.p):W.strip!==void 0?W.strip():W._strip(),W},z.prototype.split=function(O,W){O.iushrn(this.n,0,W)},z.prototype.imulK=function(O){return O.imul(this.k)};function T(){z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(T,z),T.prototype.split=function(O,W){for(var re=4194303,ne=Math.min(O.length,9),be=0;be>>22,ze=Ce}ze>>>=22,O.words[be-10]=ze,ze===0&&O.length>10?O.length-=10:O.length-=9},T.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var W=0,re=0;re>>=26,O.words[re]=be,W=ne}return W!==0&&(O.words[O.length++]=W),O},c._prime=function(O){if(v[O])return v[O];var W;if(O==="k256")W=new T;else if(O==="p224")W=new F;else if(O==="p192")W=new q;else if(O==="p25519")W=new U;else throw new Error("Unknown prime "+O);return v[O]=W,W};function H(G){if(typeof G=="string"){var O=c._prime(G);this.m=O.p,this.prime=O}else l(G.gtn(1),"modulus must be greater than 1"),this.m=G,this.prime=null}H.prototype._verify1=function(O){l(O.negative===0,"red works only with positives"),l(O.red,"red works only with red numbers")},H.prototype._verify2=function(O,W){l((O.negative|W.negative)===0,"red works only with positives"),l(O.red&&O.red===W.red,"red works only with red numbers")},H.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},H.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},H.prototype.add=function(O,W){this._verify2(O,W);var re=O.add(W);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},H.prototype.iadd=function(O,W){this._verify2(O,W);var re=O.iadd(W);return re.cmp(this.m)>=0&&re.isub(this.m),re},H.prototype.sub=function(O,W){this._verify2(O,W);var re=O.sub(W);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},H.prototype.isub=function(O,W){this._verify2(O,W);var re=O.isub(W);return re.cmpn(0)<0&&re.iadd(this.m),re},H.prototype.shl=function(O,W){return this._verify1(O),this.imod(O.ushln(W))},H.prototype.imul=function(O,W){return this._verify2(O,W),this.imod(O.imul(W))},H.prototype.mul=function(O,W){return this._verify2(O,W),this.imod(O.mul(W))},H.prototype.isqr=function(O){return this.imul(O,O.clone())},H.prototype.sqr=function(O){return this.mul(O,O)},H.prototype.sqrt=function(O){if(O.isZero())return O.clone();var W=this.m.andln(3);if(l(W%2===1),W===3){var re=this.m.add(new c(1)).iushrn(2);return this.pow(O,re)}for(var ne=this.m.subn(1),be=0;!ne.isZero()&&ne.andln(1)===0;)be++,ne.iushrn(1);l(!ne.isZero());var ze=new c(1).toRed(this),Ce=ze.redNeg(),he=this.m.subn(1).iushrn(1),te=this.m.bitLength();for(te=new c(2*te*te).toRed(this);this.pow(te,he).cmp(Ce)!==0;)te.redIAdd(Ce);for(var ke=this.pow(te,ne),Ee=this.pow(O,ne.addn(1).iushrn(1)),Me=this.pow(O,ne),Oe=be;Me.cmp(ze)!==0;){for(var Re=Me,me=0;Re.cmp(ze)!==0;me++)Re=Re.redSqr();l(me=0;be--){for(var ke=W.words[be],Ee=te-1;Ee>=0;Ee--){var Me=ke>>Ee&1;if(ze!==ne[0]&&(ze=this.sqr(ze)),Me===0&&Ce===0){he=0;continue}Ce<<=1,Ce|=Me,he++,!(he!==re&&(be!==0||Ee!==0))&&(ze=this.mul(ze,ne[Ce]),he=0,Ce=0)}te=26}return ze},H.prototype.convertTo=function(O){var W=O.umod(this.m);return W===O?W.clone():W},H.prototype.convertFrom=function(O){var W=O.clone();return W.red=null,W},c.mont=function(O){return new j(O)};function j(G){H.call(this,G),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}f(j,H),j.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},j.prototype.convertFrom=function(O){var W=this.imod(O.mul(this.rinv));return W.red=null,W},j.prototype.imul=function(O,W){if(O.isZero()||W.isZero())return O.words[0]=0,O.length=1,O;var re=O.imul(W),ne=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),be=re.isub(ne).iushrn(this.shift),ze=be;return be.cmp(this.m)>=0?ze=be.isub(this.m):be.cmpn(0)<0&&(ze=be.iadd(this.m)),ze._forceRed(this)},j.prototype.mul=function(O,W){if(O.isZero()||W.isZero())return new c(0)._forceRed(this);var re=O.mul(W),ne=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),be=re.isub(ne).iushrn(this.shift),ze=be;return be.cmp(this.m)>=0?ze=be.isub(this.m):be.cmpn(0)<0&&(ze=be.iadd(this.m)),ze._forceRed(this)},j.prototype.invm=function(O){var W=this.imod(O._invmp(this.m).mul(this.r2));return W._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,u,l,f=o.length,c=0;for(s=0;s>>1;if(!(M<=0)){var v,z=s.mallocDouble(2*M*_),T=s.mallocInt32(_);if(_=c(k,M,z,T),_>0){if(M===1&&L)u.init(_),v=u.sweepComplete(M,A,0,_,z,T,0,_,z,T);else{var F=s.mallocDouble(2*M*C),q=s.mallocInt32(C);C=c(E,M,F,q),C>0&&(u.init(_+C),M===1?v=u.sweepBipartite(M,A,0,_,z,T,0,C,F,q):v=l(M,A,L,_,z,T,C,F,q),s.free(F),s.free(q))}s.free(z),s.free(T)}return v}}}var d;function p(k,E){d.push([k,E])}function x(k){return d=[],h(k,k,p,!0),d}function b(k,E){return d=[],h(k,E,p,!1),d}function y(k,E,A){switch(arguments.length){case 1:return x(k);case 2:return typeof E=="function"?h(k,k,E,!0):b(k,E);case 3:return h(k,E,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function l(h,d,p,x,b,y,k,E,A,L,_){for(var C=2*h,M=x,v=C*x;MA-E?l(h,d,p,x,b,y,k,E,A,L,_):f(h,d,p,x,b,y,k,E,A,L,_)}return c}function s(){function l(p,x,b,y,k,E,A,L,_,C,M){for(var v=2*p,z=y,T=v*y;zC-_?y?l(p,x,b,k,E,A,L,_,C,M,v):f(p,x,b,k,E,A,L,_,C,M,v):y?c(p,x,b,k,E,A,L,_,C,M,v):h(p,x,b,k,E,A,L,_,C,M,v)}return d}function u(l){return l?o():s()}a.partial=u(!1),a.full=u(!0)},7150:function(i,a,o){"use strict";i.exports=G;var s=o(1888),u=o(8828),l=o(2455),f=l.partial,c=l.full,h=o(855),d=o(3545),p=o(8105),x=128,b=1<<22,y=1<<22,k=p("!(lo>=p0)&&!(p1>=hi)"),E=p("lo===p0"),A=p("lo0;){ke-=1;var Oe=ke*M,Re=T[Oe],me=T[Oe+1],Be=T[Oe+2],fe=T[Oe+3],Ze=T[Oe+4],et=T[Oe+5],gt=ke*v,Pt=F[gt],Qe=F[gt+1],Xe=et&1,Tt=!!(et&16),xt=be,_t=ze,Ct=he,jt=te;if(Xe&&(xt=he,_t=te,Ct=be,jt=ze),!(et&2&&(Be=A(O,Re,me,Be,xt,_t,Qe),me>=Be))&&!(et&4&&(me=L(O,Re,me,Be,xt,_t,Pt),me>=Be))){var At=Be-me,Te=Ze-fe;if(Tt){if(O*At*(At+Te)p&&b[C+d]>L;--_,C-=k){for(var M=C,v=C+k,z=0;z>>1,L=2*h,_=A,C=b[L*A+d];k=F?(_=T,C=F):z>=U?(_=v,C=z):(_=q,C=U):F>=U?(_=T,C=F):U>=z?(_=v,C=z):(_=q,C=U);for(var G=L*(E-1),O=L*_,H=0;H=p0)&&!(p1>=hi)":d};function o(p){return a[p]}function s(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v];if(F===A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function u(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v];if(Fq;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function l(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+z];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function f(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+z];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[_+q];k[_+q]=k[C],k[C++]=U}var H=E[T];E[T]=E[M],E[M++]=H}}return M}function c(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v],q=k[_+z];if(F<=A&&A<=q)if(M===T)M+=1,C+=L;else{for(var U=0;L>U;++U){var H=k[_+U];k[_+U]=k[C],k[C++]=H}var j=E[T];E[T]=E[M],E[M++]=j}}return M}function h(p,x,b,y,k,E,A){for(var L=2*p,_=L*b,C=_,M=b,v=x,z=p+x,T=b;y>T;++T,_+=L){var F=k[_+v],q=k[_+z];if(FU;++U){var H=k[_+U];k[_+U]=k[C],k[C++]=H}var j=E[T];E[T]=E[M],E[M++]=j}}return M}function d(p,x,b,y,k,E,A,L){for(var _=2*p,C=_*b,M=C,v=b,z=x,T=p+x,F=b;y>F;++F,C+=_){var q=k[C+z],U=k[C+T];if(!(q>=A)&&!(L>=U))if(v===F)v+=1,M+=_;else{for(var H=0;_>H;++H){var j=k[C+H];k[C+H]=k[M],k[M++]=j}var G=E[F];E[F]=E[v],E[v++]=G}}return v}},4192:function(i){"use strict";i.exports=o;var a=32;function o(x,b){b<=4*a?s(0,b-1,x):p(0,b-1,x)}function s(x,b,y){for(var k=2*(x+1),E=x+1;E<=b;++E){for(var A=y[k++],L=y[k++],_=E,C=k-2;_-- >x;){var M=y[C-2],v=y[C-1];if(My[b+1]:!0}function d(x,b,y,k){x*=2;var E=k[x];return E>1,_=L-k,C=L+k,M=E,v=_,z=L,T=C,F=A,q=x+1,U=b-1,H=0;h(M,v,y)&&(H=M,M=v,v=H),h(T,F,y)&&(H=T,T=F,F=H),h(M,z,y)&&(H=M,M=z,z=H),h(v,z,y)&&(H=v,v=z,z=H),h(M,T,y)&&(H=M,M=T,T=H),h(z,T,y)&&(H=z,z=T,T=H),h(v,F,y)&&(H=v,v=F,F=H),h(v,z,y)&&(H=v,v=z,z=H),h(T,F,y)&&(H=T,T=F,F=H);for(var j=y[2*v],G=y[2*v+1],O=y[2*T],W=y[2*T+1],re=2*M,ne=2*z,be=2*F,ze=2*E,Ce=2*L,he=2*A,te=0;te<2;++te){var ke=y[re+te],Ee=y[ne+te],Me=y[be+te];y[ze+te]=ke,y[Ce+te]=Ee,y[he+te]=Me}l(_,x,y),l(C,b,y);for(var Oe=q;Oe<=U;++Oe)if(d(Oe,j,G,y))Oe!==q&&u(Oe,q,y),++q;else if(!d(Oe,O,W,y))for(;;)if(d(U,O,W,y)){d(U,j,G,y)?(f(Oe,q,U,y),++q,--U):(u(Oe,U,y),--U);break}else{if(--U>>1;l(k,Ee);for(var Me=0,Oe=0,Ce=0;Ce=f)Re=Re-f|0,A(p,x,Oe--,Re);else if(Re>=0)A(h,d,Me--,Re);else if(Re<=-f){Re=-Re-f|0;for(var me=0;me>>1;l(k,Ee);for(var Me=0,Oe=0,Re=0,Ce=0;Ce>1===k[2*Ce+3]>>1&&(Be=2,Ce+=1),me<0){for(var fe=-(me>>1)-1,Ze=0;Ze>1)-1;Be===0?A(h,d,Me--,fe):Be===1?A(p,x,Oe--,fe):Be===2&&A(b,y,Re--,fe)}}}function M(z,T,F,q,U,H,j,G,O,W,re,ne){var be=0,ze=2*z,Ce=T,he=T+z,te=1,ke=1;q?ke=f:te=f;for(var Ee=U;Ee>>1;l(k,me);for(var Be=0,Ee=0;Ee=f?(Ze=!q,Me-=f):(Ze=!!q,Me-=1),Ze)L(h,d,Be++,Me);else{var et=ne[Me],gt=ze*Me,Pt=re[gt+T+1],Qe=re[gt+T+1+z];e:for(var Xe=0;Xe>>1;l(k,Me);for(var Oe=0,he=0;he=f)h[Oe++]=te-f;else{te-=1;var me=re[te],Be=be*te,fe=W[Be+T+1],Ze=W[Be+T+1+z];e:for(var et=0;et=0;--et)if(h[et]===te){for(var Xe=et+1;Xe0;){for(var E=d.pop(),b=d.pop(),A=-1,L=-1,y=x[b],C=1;C=0||(h.flip(b,E),l(c,h,d,A,b,L),l(c,h,d,b,L,A),l(c,h,d,L,E,A),l(c,h,d,E,A,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function u(p,x,b,y,k,E,A){this.cells=p,this.neighbor=x,this.flags=y,this.constraint=b,this.active=k,this.next=E,this.boundary=A}var l=u.prototype;function f(p,x){return p[0]-x[0]||p[1]-x[1]||p[2]-x[2]}l.locate=function(){var p=[0,0,0];return function(x,b,y){var k=x,E=b,A=y;return b0||A.length>0;){for(;E.length>0;){var v=E.pop();if(L[v]!==-k){L[v]=k;for(var z=_[v],T=0;T<3;++T){var F=M[3*v+T];F>=0&&L[F]===0&&(C[3*v+T]?A.push(F):(E.push(F),L[F]=k))}}}var q=A;A=E,E=q,A.length=0,k=-k}var U=h(_,L,x);return b?U.concat(y.boundary):U}},8902:function(i,a,o){"use strict";var s=o(2478),u=o(3250)[3],l=0,f=1,c=2;i.exports=A;function h(L,_,C,M,v){this.a=L,this.b=_,this.idx=C,this.lowerIds=M,this.upperIds=v}function d(L,_,C,M){this.a=L,this.b=_,this.type=C,this.idx=M}function p(L,_){var C=L.a[0]-_.a[0]||L.a[1]-_.a[1]||L.type-_.type;return C||L.type!==l&&(C=u(L.a,L.b,_.b),C)?C:L.idx-_.idx}function x(L,_){return u(L.a,L.b,_)}function b(L,_,C,M,v){for(var z=s.lt(_,M,x),T=s.gt(_,M,x),F=z;F1&&u(C[U[j-2]],C[U[j-1]],M)>0;)L.push([U[j-1],U[j-2],v]),j-=1;U.length=j,U.push(v);for(var H=q.upperIds,j=H.length;j>1&&u(C[H[j-2]],C[H[j-1]],M)<0;)L.push([H[j-2],H[j-1],v]),j-=1;H.length=j,H.push(v)}}function y(L,_){var C;return L.a[0]<_.a[0]?C=u(L.a,L.b,_.a):C=u(_.b,_.a,L.a),C||(_.b[0]q[0]&&v.push(new d(q,F,c,z),new d(F,q,f,z))}v.sort(p);for(var U=v[0].a[0]-(1+Math.abs(v[0].a[0]))*Math.pow(2,-52),H=[new h([U,1],[U,0],-1,[],[],[],[])],j=[],z=0,G=v.length;z=0}}(),l.removeTriangle=function(h,d,p){var x=this.stars;f(x[h],d,p),f(x[d],p,h),f(x[p],h,d)},l.addTriangle=function(h,d,p){var x=this.stars;x[h].push(d,p),x[d].push(p,h),x[p].push(h,d)},l.opposite=function(h,d){for(var p=this.stars[d],x=1,b=p.length;x=0;--O){var ke=j[O];W=ke[0];var Ee=U[W],Me=Ee[0],Oe=Ee[1],Re=q[Me],me=q[Oe];if((Re[0]-me[0]||Re[1]-me[1])<0){var Be=Me;Me=Oe,Oe=Be}Ee[0]=Me;var fe=Ee[1]=ke[1],Ze;for(G&&(Ze=Ee[2]);O>0&&j[O-1][0]===W;){var ke=j[--O],et=ke[1];G?U.push([fe,et,Ze]):U.push([fe,et]),fe=et}G?U.push([fe,Oe,Ze]):U.push([fe,Oe])}return re}function _(q,U,H){for(var j=U.length,G=new s(j),O=[],W=0;WU[2]?1:0)}function v(q,U,H){if(q.length!==0){if(U)for(var j=0;j0||W.length>0}function F(q,U,H){var j;if(H){j=U;for(var G=new Array(U.length),O=0;OL+1)throw new Error(E+" map requires nshades to be at least size "+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?_=[1,1]:_=d.alpha.slice():typeof d.alpha=="number"?_=[d.alpha,d.alpha]:_=[1,1],p=k.map(function(F){return Math.round(F.index*L)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var M=k.map(function(F,q){var U=k[q].index,H=k[q].rgb.slice();return H.length===4&&H[3]>=0&&H[3]<=1||(H[3]=_[0]+(_[1]-_[0])*U),H}),v=[];for(C=0;C=0}function d(p,x,b,y){var k=s(x,b,y);if(k===0){var E=u(s(p,x,b)),A=u(s(p,x,y));if(E===A){if(E===0){var L=h(p,x,b),_=h(p,x,y);return L===_?0:L?1:-1}return 0}else{if(A===0)return E>0||h(p,x,y)?-1:1;if(E===0)return A>0||h(p,x,b)?1:-1}return u(A-E)}var C=s(p,x,b);if(C>0)return k>0&&s(p,x,y)>0?1:-1;if(C<0)return k>0||s(p,x,y)>0?1:-1;var M=s(p,x,y);return M>0||h(p,x,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(u,l){return u-l}function s(u,l){var f=u.length,c=u.length-l.length;if(c)return c;switch(f){case 0:return 0;case 1:return u[0]-l[0];case 2:return u[0]+u[1]-l[0]-l[1]||a(u[0],u[1])-a(l[0],l[1]);case 3:var h=u[0]+u[1],d=l[0]+l[1];if(c=h+u[2]-(d+l[2]),c)return c;var p=a(u[0],u[1]),x=a(l[0],l[1]);return a(p,u[2])-a(x,l[2])||a(p+u[2],h)-a(x+l[2],d);case 4:var b=u[0],y=u[1],k=u[2],E=u[3],A=l[0],L=l[1],_=l[2],C=l[3];return b+y+k+E-(A+L+_+C)||a(b,y,k,E)-a(A,L,_,C,A)||a(b+y,b+k,b+E,y+k,y+E,k+E)-a(A+L,A+_,A+C,L+_,L+C,_+C)||a(b+y+k,b+y+E,b+k+E,y+k+E)-a(A+L+_,A+L+C,A+_+C,L+_+C);default:for(var M=u.slice().sort(o),v=l.slice().sort(o),z=0;zo[u][0]&&(u=l);return su?[[u],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=u;var s=o(3090);function u(l){var f=s(l),c=f.length;if(c<=2)return[];for(var h=new Array(c),d=f[c-1],p=0;p=d[A]&&(E+=1);y[k]=E}}return h}function c(h,d){try{return s(h,!0)}catch(y){var p=u(h);if(p.length<=d)return[];var x=l(h,p),b=s(x,!0);return f(b,p)}}},4769:function(i){"use strict";function a(s,u,l,f,c,h){var d=6*c*c-6*c,p=3*c*c-4*c+1,x=-6*c*c+6*c,b=3*c*c-2*c;if(s.length){h||(h=new Array(s.length));for(var y=s.length-1;y>=0;--y)h[y]=d*s[y]+p*u[y]+x*l[y]+b*f[y];return h}return d*s+p*u+x*l[y]+b*f}function o(s,u,l,f,c,h){var d=c-1,p=c*c,x=d*d,b=(1+2*c)*x,y=c*x,k=p*(3-2*c),E=p*d;if(s.length){h||(h=new Array(s.length));for(var A=s.length-1;A>=0;--A)h[A]=b*s[A]+y*u[A]+k*l[A]+E*f[A];return h}return b*s+y*u+k*l+E*f}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),u=o(1682);i.exports=h;function l(d,p){this.point=d,this.index=p}function f(d,p){for(var x=d.point,b=p.point,y=x.length,k=0;k=2)return!1;H[G]=O}return!0}):U=U.filter(function(H){for(var j=0;j<=b;++j){var G=z[H[j]];if(G<0)return!1;H[j]=G}return!0}),b&1)for(var E=0;E>>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),A=i.exports.hi(k),L=A&(1<<20)-1;return A&2146435072&&(L+=1048576),[E,L]},i.exports.denormalized=function(k){var E=i.exports.hi(k);return!(E&2146435072)}},1338:function(i){"use strict";function a(u,l,f){var c=u[f]|0;if(c<=0)return[];var h=new Array(c),d;if(f===u.length-1)for(d=0;d0)return o(u|0,l);break;case"object":if(typeof u.length=="number")return a(u,l,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=u;var s=o(1682);function u(l,f){var c=l.length;if(typeof f!="number"){f=0;for(var h=0;h=b-1)for(var C=E.length-1,v=p-x[b-1],M=0;M=b-1)for(var _=E.length-1,C=p-x[b-1],M=0;M=0;--b)if(p[--x])return!1;return!0},c.jump=function(p){var x=this.lastT(),b=this.dimension;if(!(p0;--M)y.push(l(L[M-1],_[M-1],arguments[M])),k.push(0)}},c.push=function(p){var x=this.lastT(),b=this.dimension;if(!(p1e-6?1/A:0;this._time.push(p);for(var v=b;v>0;--v){var z=l(_[v-1],C[v-1],arguments[v]);y.push(z),k.push((z-y[E++])*M)}}},c.set=function(p){var x=this.dimension;if(!(p0;--L)b.push(l(E[L-1],A[L-1],arguments[L])),y.push(0)}},c.move=function(p){var x=this.lastT(),b=this.dimension;if(!(p<=x||arguments.length!==b+1)){var y=this._state,k=this._velocity,E=y.length-this.dimension,A=this.bounds,L=A[0],_=A[1],C=p-x,M=C>1e-6?1/C:0;this._time.push(p);for(var v=b;v>0;--v){var z=arguments[v];y.push(l(L[v-1],_[v-1],y[E++]+z)),k.push(z*M)}}},c.idle=function(p){var x=this.lastT();if(!(p=0;--M)y.push(l(L[M],_[M],y[E]+C*k[E])),k.push(0),E+=1}};function h(p){for(var x=new Array(p),b=0;b=0;--q){var v=z[q];T[q]<=0?z[q]=new s(v._color,v.key,v.value,z[q+1],v.right,v._count+1):z[q]=new s(v._color,v.key,v.value,v.left,z[q+1],v._count+1)}for(var q=z.length-1;q>1;--q){var U=z[q-1],v=z[q];if(U._color===o||v._color===o)break;var H=z[q-2];if(H.left===U)if(U.left===v){var j=H.right;if(j&&j._color===a)U._color=o,H.right=l(o,j),H._color=a,q-=1;else{if(H._color=a,H.left=U.right,U._color=o,U.right=H,z[q-2]=U,z[q-1]=v,f(H),f(U),q>=3){var G=z[q-3];G.left===H?G.left=U:G.right=U}break}}else{var j=H.right;if(j&&j._color===a)U._color=o,H.right=l(o,j),H._color=a,q-=1;else{if(U.right=v.left,H._color=a,H.left=v.right,v._color=o,v.left=U,v.right=H,z[q-2]=v,z[q-1]=U,f(H),f(U),f(v),q>=3){var G=z[q-3];G.left===H?G.left=v:G.right=v}break}}else if(U.right===v){var j=H.left;if(j&&j._color===a)U._color=o,H.left=l(o,j),H._color=a,q-=1;else{if(H._color=a,H.right=U.left,U._color=o,U.left=H,z[q-2]=U,z[q-1]=v,f(H),f(U),q>=3){var G=z[q-3];G.right===H?G.right=U:G.left=U}break}}else{var j=H.left;if(j&&j._color===a)U._color=o,H.left=l(o,j),H._color=a,q-=1;else{if(U.left=v.right,H._color=a,H.right=v.left,v._color=o,v.right=U,v.left=H,z[q-2]=v,z[q-1]=U,f(H),f(U),f(v),q>=3){var G=z[q-3];G.right===H?G.right=v:G.left=v}break}}}return z[0]._color=o,new c(M,z[0])};function d(_,C){if(C.left){var M=d(_,C.left);if(M)return M}var M=_(C.key,C.value);if(M)return M;if(C.right)return d(_,C.right)}function p(_,C,M,v){var z=C(_,v.key);if(z<=0){if(v.left){var T=p(_,C,M,v.left);if(T)return T}var T=M(v.key,v.value);if(T)return T}if(v.right)return p(_,C,M,v.right)}function x(_,C,M,v,z){var T=M(_,z.key),F=M(C,z.key),q;if(T<=0&&(z.left&&(q=x(_,C,M,v,z.left),q)||F>0&&(q=v(z.key,z.value),q)))return q;if(F>0&&z.right)return x(_,C,M,v,z.right)}h.forEach=function(C,M,v){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return p(M,this._compare,C,this.root);case 3:return this._compare(M,v)>=0?void 0:x(M,v,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.left;return new b(this,_)}}),Object.defineProperty(h,"end",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.right;return new b(this,_)}}),h.at=function(_){if(_<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(_=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T<=0&&(z=v.length),T<=0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.gt=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T<0&&(z=v.length),T<0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.lt=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T>0&&(z=v.length),T<=0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.le=function(_){for(var C=this._compare,M=this.root,v=[],z=0;M;){var T=C(_,M.key);v.push(M),T>=0&&(z=v.length),T<0?M=M.left:M=M.right}return v.length=z,new b(this,v)},h.find=function(_){for(var C=this._compare,M=this.root,v=[];M;){var z=C(_,M.key);if(v.push(M),z===0)return new b(this,v);z<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(_){var C=this.find(_);return C?C.remove():this},h.get=function(_){for(var C=this._compare,M=this.root;M;){var v=C(_,M.key);if(v===0)return M.value;v<=0?M=M.left:M=M.right}};function b(_,C){this.tree=_,this._stack=C}var y=b.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new b(this.tree,this._stack.slice())};function k(_,C){_.key=C.key,_.value=C.value,_.left=C.left,_.right=C.right,_._color=C._color,_._count=C._count}function E(_){for(var C,M,v,z,T=_.length-1;T>=0;--T){if(C=_[T],T===0){C._color=o;return}if(M=_[T-1],M.left===C){if(v=M.right,v.right&&v.right._color===a){if(v=M.right=u(v),z=v.right=u(v.right),M.right=v.left,v.left=M,v.right=z,v._color=M._color,C._color=o,M._color=o,z._color=o,f(M),f(v),T>1){var F=_[T-2];F.left===M?F.left=v:F.right=v}_[T-1]=v;return}else if(v.left&&v.left._color===a){if(v=M.right=u(v),z=v.left=u(v.left),M.right=z.left,v.left=z.right,z.left=M,z.right=v,z._color=M._color,M._color=o,v._color=o,C._color=o,f(M),f(v),f(z),T>1){var F=_[T-2];F.left===M?F.left=z:F.right=z}_[T-1]=z;return}if(v._color===o)if(M._color===a){M._color=o,M.right=l(a,v);return}else{M.right=l(a,v);continue}else{if(v=u(v),M.right=v.left,v.left=M,v._color=M._color,M._color=a,f(M),f(v),T>1){var F=_[T-2];F.left===M?F.left=v:F.right=v}_[T-1]=v,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}else{if(v=M.left,v.left&&v.left._color===a){if(v=M.left=u(v),z=v.left=u(v.left),M.left=v.right,v.right=M,v.left=z,v._color=M._color,C._color=o,M._color=o,z._color=o,f(M),f(v),T>1){var F=_[T-2];F.right===M?F.right=v:F.left=v}_[T-1]=v;return}else if(v.right&&v.right._color===a){if(v=M.left=u(v),z=v.right=u(v.right),M.left=z.right,v.right=z.left,z.right=M,z.left=v,z._color=M._color,M._color=o,v._color=o,C._color=o,f(M),f(v),f(z),T>1){var F=_[T-2];F.right===M?F.right=z:F.left=z}_[T-1]=z;return}if(v._color===o)if(M._color===a){M._color=o,M.left=l(a,v);return}else{M.left=l(a,v);continue}else{if(v=u(v),M.left=v.right,v.right=M,v._color=M._color,M._color=a,f(M),f(v),T>1){var F=_[T-2];F.right===M?F.right=v:F.left=v}_[T-1]=v,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}}}y.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var C=new Array(_.length),M=_[_.length-1];C[C.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var v=_.length-2;v>=0;--v){var M=_[v];M.left===_[v+1]?C[v]=new s(M._color,M.key,M.value,C[v+1],M.right,M._count):C[v]=new s(M._color,M.key,M.value,M.left,C[v+1],M._count)}if(M=C[C.length-1],M.left&&M.right){var z=C.length;for(M=M.left;M.right;)C.push(M),M=M.right;var T=C[z-1];C.push(new s(M._color,T.key,T.value,M.left,M.right,M._count)),C[z-1].key=M.key,C[z-1].value=M.value;for(var v=C.length-2;v>=z;--v)M=C[v],C[v]=new s(M._color,M.key,M.value,M.left,C[v+1],M._count);C[z-1].left=C[z]}if(M=C[C.length-1],M._color===a){var F=C[C.length-2];F.left===M?F.left=null:F.right===M&&(F.right=null),C.pop();for(var v=0;v0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var _=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(_=C[C.length-1].left._count);for(var v=C.length-2;v>=0;--v)C[v+1]===C[v].right&&(++_,C[v].left&&(_+=C[v].left._count));return _},enumerable:!0}),y.next=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.right)for(C=C.right;C;)_.push(C),C=C.left;else for(_.pop();_.length>0&&_[_.length-1].right===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].left===_[C])return!0;return!1}}),y.update=function(_){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),v=C[C.length-1];M[M.length-1]=new s(v._color,v.key,_,v.left,v.right,v._count);for(var z=C.length-2;z>=0;--z)v=C[z],v.left===C[z+1]?M[z]=new s(v._color,v.key,v.value,M[z+1],v.right,v._count):M[z]=new s(v._color,v.key,v.value,v.left,M[z+1],v._count);return new c(this.tree._compare,M[0])},y.prev=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.left)for(C=C.left;C;)_.push(C),C=C.right;else for(_.pop();_.length>0&&_[_.length-1].left===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].right===_[C])return!0;return!1}});function A(_,C){return _C?1:0}function L(_){return new c(_||A,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),u=o(501),l=o(5304),f=o(6429),c=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,p=DataView;function x(U){return d.isView(U)&&!(U instanceof p)}function b(U){return Array.isArray(U)||x(U)}function y(U,H){return U[0]=H[0],U[1]=H[1],U[2]=H[2],U}function k(U){this.gl=U,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=l(U)}var E=k.prototype;E.update=function(U){U=U||{};function H(Me,Oe,Re){if(Re in U){var me=U[Re],Be=this[Re],fe;(Me?b(me)&&b(me[0]):b(me))?this[Re]=fe=[Oe(me[0]),Oe(me[1]),Oe(me[2])]:this[Re]=fe=[Oe(me),Oe(me),Oe(me)];for(var Ze=0;Ze<3;++Ze)if(fe[Ze]!==Be[Ze])return!0}return!1}var j=H.bind(this,!1,Number),G=H.bind(this,!1,Boolean),O=H.bind(this,!1,String),W=H.bind(this,!0,function(Me){if(b(Me)){if(Me.length===3)return[+Me[0],+Me[1],+Me[2],1];if(Me.length===4)return[+Me[0],+Me[1],+Me[2],+Me[3]]}return[0,0,0,1]}),re,ne=!1,be=!1;if("bounds"in U)for(var ze=U.bounds,Ce=0;Ce<2;++Ce)for(var he=0;he<3;++he)ze[Ce][he]!==this.bounds[Ce][he]&&(be=!0),this.bounds[Ce][he]=ze[Ce][he];if("ticks"in U){re=U.ticks,ne=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else j("tickSpacing")&&(this.autoTicks=!0,be=!0);if(this._firstInit&&("ticks"in U||"tickSpacing"in U||(this.autoTicks=!0),be=!0,ne=!0,this._firstInit=!1),be&&this.autoTicks&&(re=c.create(this.bounds,this.tickSpacing),ne=!0),ne){for(var Ce=0;Ce<3;++Ce)re[Ce].sort(function(Oe,Re){return Oe.x-Re.x});c.equal(re,this.ticks)?ne=!1:this.ticks=re}G("tickEnable"),O("tickFont")&&(ne=!0),O("tickFontStyle")&&(ne=!0),O("tickFontWeight")&&(ne=!0),O("tickFontVariant")&&(ne=!0),j("tickSize"),j("tickAngle"),j("tickPad"),W("tickColor");var te=O("labels");O("labelFont")&&(te=!0),O("labelFontStyle")&&(te=!0),O("labelFontWeight")&&(te=!0),O("labelFontVariant")&&(te=!0),G("labelEnable"),j("labelSize"),j("labelPad"),W("labelColor"),G("lineEnable"),G("lineMirror"),j("lineWidth"),W("lineColor"),G("lineTickEnable"),G("lineTickMirror"),j("lineTickLength"),j("lineTickWidth"),W("lineTickColor"),G("gridEnable"),j("gridWidth"),W("gridColor"),G("zeroEnable"),W("zeroLineColor"),j("zeroLineWidth"),G("backgroundEnable"),W("backgroundColor");var ke=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(te||ne)&&this._text.update(this.bounds,this.labels,ke,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,ke,this.ticks,Ee),this._lines&&ne&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=u(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new A,new A,new A];function _(U,H,j,G,O){for(var W=U.primalOffset,re=U.primalMinor,ne=U.mirrorOffset,be=U.mirrorMinor,ze=G[H],Ce=0;Ce<3;++Ce)if(H!==Ce){var he=W,te=ne,ke=re,Ee=be;ze&1<0?(ke[Ce]=-1,Ee[Ce]=0):(ke[Ce]=0,Ee[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(U){};var v=0,z=[0,0,0],T=[0,0,0],F=[0,0,0];E.draw=function(U){U=U||M;for(var Re=this.gl,H=U.model||h,j=U.view||h,G=U.projection||h,O=this.bounds,W=U._ortho||!1,re=f(H,j,G,O,W),ne=re.cubeEdges,be=re.axis,ze=j[12],Ce=j[13],he=j[14],te=j[15],ke=W?2:1,Ee=ke*this.pixelRatio*(G[3]*ze+G[7]*Ce+G[11]*he+G[15]*te)/Re.drawingBufferHeight,Me=0;Me<3;++Me)this.lastCubeProps.cubeEdges[Me]=ne[Me],this.lastCubeProps.axis[Me]=be[Me];for(var Oe=L,Me=0;Me<3;++Me)_(L[Me],Me,this.bounds,ne,be);for(var Re=this.gl,me=C,Me=0;Me<3;++Me)this.backgroundEnable[Me]?me[Me]=be[Me]:me[Me]=0;this._background.draw(H,j,G,O,me,this.backgroundColor),this._lines.bind(H,j,G,this);for(var Me=0;Me<3;++Me){var Be=[0,0,0];be[Me]>0?Be[Me]=O[1][Me]:Be[Me]=O[0][Me];for(var fe=0;fe<2;++fe){var Ze=(Me+1+fe)%3,et=(Me+1+(fe^1))%3;this.gridEnable[Ze]&&this._lines.drawGrid(Ze,et,this.bounds,Be,this.gridColor[Ze],this.gridWidth[Ze]*this.pixelRatio)}for(var fe=0;fe<2;++fe){var Ze=(Me+1+fe)%3,et=(Me+1+(fe^1))%3;this.zeroEnable[et]&&Math.min(O[0][et],O[1][et])<=0&&Math.max(O[0][et],O[1][et])>=0&&this._lines.drawZero(Ze,et,this.bounds,Be,this.zeroLineColor[et],this.zeroLineWidth[et]*this.pixelRatio)}}for(var Me=0;Me<3;++Me){this.lineEnable[Me]&&this._lines.drawAxisLine(Me,this.bounds,Oe[Me].primalOffset,this.lineColor[Me],this.lineWidth[Me]*this.pixelRatio),this.lineMirror[Me]&&this._lines.drawAxisLine(Me,this.bounds,Oe[Me].mirrorOffset,this.lineColor[Me],this.lineWidth[Me]*this.pixelRatio);for(var gt=y(z,Oe[Me].primalMinor),Pt=y(T,Oe[Me].mirrorMinor),Qe=this.lineTickLength,fe=0;fe<3;++fe){var Xe=Ee/H[5*fe];gt[fe]*=Qe[fe]*Xe,Pt[fe]*=Qe[fe]*Xe}this.lineTickEnable[Me]&&this._lines.drawAxisTicks(Me,Oe[Me].primalOffset,gt,this.lineTickColor[Me],this.lineTickWidth[Me]*this.pixelRatio),this.lineTickMirror[Me]&&this._lines.drawAxisTicks(Me,Oe[Me].mirrorOffset,Pt,this.lineTickColor[Me],this.lineTickWidth[Me]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,j,G,this.pixelRatio);var Tt,xt=.5,_t,Ct;function jt(rt){Ct=[0,0,0],Ct[rt]=1}function At(rt,je,tt){var Je=(rt+1)%3,Mt=(rt+2)%3,Vt=je[Je],Kt=je[Mt],ir=tt[Je],fr=tt[Mt];if(Vt>0&&fr>0){jt(Je);return}else if(Vt>0&&fr<0){jt(Je);return}else if(Vt<0&&fr>0){jt(Je);return}else if(Vt<0&&fr<0){jt(Je);return}else if(Kt>0&&ir>0){jt(Mt);return}else if(Kt>0&&ir<0){jt(Mt);return}else if(Kt<0&&ir>0){jt(Mt);return}else if(Kt<0&&ir<0){jt(Mt);return}}for(var Me=0;Me<3;++Me){for(var Te=Oe[Me].primalMinor,nt=Oe[Me].mirrorMinor,ut=y(F,Oe[Me].primalOffset),fe=0;fe<3;++fe)this.lineTickEnable[Me]&&(ut[fe]+=Ee*Te[fe]*Math.max(this.lineTickLength[fe],0)/H[5*fe]);var ct=[0,0,0];if(ct[Me]=1,this.tickEnable[Me]){this.tickAngle[Me]===-3600?(this.tickAngle[Me]=0,this.tickAlign[Me]="auto"):this.tickAlign[Me]=-1,_t=1,Tt=[this.tickAlign[Me],xt,_t],Tt[0]==="auto"?Tt[0]=v:Tt[0]=parseInt(""+Tt[0]),Ct=[0,0,0],At(Me,Te,nt);for(var fe=0;fe<3;++fe)ut[fe]+=Ee*Te[fe]*this.tickPad[fe]/H[5*fe];this._text.drawTicks(Me,this.tickSize[Me],this.tickAngle[Me],ut,this.tickColor[Me],ct,Ct,Tt)}if(this.labelEnable[Me]){_t=0,Ct=[0,0,0],this.labels[Me].length>4&&(jt(Me),_t=1),Tt=[this.labelAlign[Me],xt,_t],Tt[0]==="auto"?Tt[0]=v:Tt[0]=parseInt(""+Tt[0]);for(var fe=0;fe<3;++fe)ut[fe]+=Ee*Te[fe]*this.labelPad[fe]/H[5*fe];ut[Me]+=.5*(O[0][Me]+O[1][Me]),this._text.drawLabel(Me,this.labelSize[Me],this.labelAngle[Me],ut,this.labelColor[Me],[0,0,0],Ct,Tt)}}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 q(U,H){var j=new k(U);return j.update(H),j}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),u=o(8116),l=o(1879).bg;function f(d,p,x,b){this.gl=d,this.buffer=p,this.vao=x,this.shader=b}var c=f.prototype;c.draw=function(d,p,x,b,y,k){for(var E=!1,A=0;A<3;++A)E=E||y[A];if(E){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:p,projection:x,bounds:b,enable:y,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var p=[],x=[],b=0,y=0;y<3;++y)for(var k=(y+1)%3,E=(y+2)%3,A=[0,0,0],L=[0,0,0],_=-1;_<=1;_+=2){x.push(b,b+2,b+1,b+1,b+2,b+3),A[y]=_,L[y]=_;for(var C=-1;C<=1;C+=2){A[k]=C;for(var M=-1;M<=1;M+=2)A[E]=M,p.push(A[0],A[1],A[2],L[0],L[1],L[2]),b+=1}var v=k;k=E,E=v}var z=s(d,new Float32Array(p)),T=s(d,new Uint16Array(x),d.ELEMENT_ARRAY_BUFFER),F=u(d,[{buffer:z,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:z,type:d.FLOAT,size:3,offset:12,stride:24}],T),q=l(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new f(d,z,F,q)}},6429:function(i,a,o){"use strict";i.exports=_;var s=o(8828),u=o(6760),l=o(5202),f=o(3250),c=new Array(16),h=new Array(8),d=new Array(8),p=new Array(3),x=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,M,v){for(var z=0;z<4;++z){C[z]=v[12+z];for(var T=0;T<3;++T)C[z]+=M[T]*v[4*T+z]}}var y=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function k(C){for(var M=0;Mbe&&(j|=1<be){j|=1<d[q][1])&&(Oe=q);for(var Re=-1,q=0;q<3;++q){var me=Oe^1<d[Be][0]&&(Be=me)}}var fe=E;fe[0]=fe[1]=fe[2]=0,fe[s.log2(Re^Oe)]=Oe&Re,fe[s.log2(Oe^Be)]=Oe&Be;var Ze=Be^7;Ze===j||Ze===Me?(Ze=Re^7,fe[s.log2(Be^Ze)]=Ze&Be):fe[s.log2(Re^Ze)]=Zeℜfor(var et=A,gt=j,W=0;W<3;++W)gt&1<=0;--fe){var Ze=Me[Be[fe]];M.push(Ee*Ze[0],-Ee*Ze[1],W)}}for(var z=[0,0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0],U=1.25,H={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},j=0;j<3;++j){F[j]=M.length/d|0,v(.5*(k[0][j]+k[1][j]),A[j],L[j],12,U,H),q[j]=(M.length/d|0)-F[j],z[j]=M.length/d|0;for(var G=0;G<_[j].length;++G)if(_[j][G].text){var O={family:_[j][G].font||C[j].family,style:C[j].fontStyle||C[j].style,weight:C[j].fontWeight||C[j].weight,variant:C[j].fontVariant||C[j].variant};v(_[j][G].x,_[j][G].text,O,_[j][G].fontSize||12,U,H)}T[j]=(M.length/d|0)-z[j]}this.buffer.update(M),this.tickOffset=z,this.tickCount=T,this.labelOffset=F,this.labelCount=q},x.drawTicks=function(k,A,L,_,C,M,v,z){this.tickCount[k]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=v,this.shader.uniforms.alignOpt=z,this.vao.draw(this.gl.TRIANGLES,this.tickCount[k],this.tickOffset[k]))},x.drawLabel=function(k,A,L,_,C,M,v,z){this.labelCount[k]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=v,this.shader.uniforms.alignOpt=z,this.vao.draw(this.gl.TRIANGLES,this.labelCount[k],this.labelOffset[k]))},x.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function y(k,A){try{return l(k,A)}catch(L){return console.warn('error vectorizing text:"'+k+'" error:',L),{cells:[],positions:[]}}}function E(k,A,L,_,C,M){var v=s(k),z=u(k,[{buffer:v,size:3}]),T=f(k);T.attributes.position.location=0;var F=new p(k,T,v,z);return F.update(A,L,_,C,M),F}},6444:function(i,a){"use strict";a.create=s,a.equal=u;function o(l,f){var c=l+"",h=c.indexOf("."),d=0;h>=0&&(d=c.length-h-1);var p=Math.pow(10,d),x=Math.round(l*f*p),b=x+"";if(b.indexOf("e")>=0)return b;var y=x/p,E=x%p;x<0?(y=-Math.ceil(y)|0,E=-E|0):(y=Math.floor(y)|0,E=E|0);var k=""+y;if(x<0&&(k="-"+k),d){for(var A=""+E;A.length=l[0][h];--x)d.push({x:x*f[h],text:o(f[h],x)});c.push(d)}return c}function u(l,f){for(var c=0;c<3;++c){if(l[c].length!==f[c].length)return!1;for(var h=0;hk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(E,_,L),k}function p(y,E){for(var k=s.malloc(y.length,E),A=y.length,L=0;L=0;--A){if(E[A]!==k)return!1;k*=y[A]}return!0}h.update=function(y,E){if(typeof E!="number"&&(E=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var k=y.dtype;if(f.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&k!=="uint16"?k="uint32":k="uint16"}if(k===y.dtype&&x(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,y.data,E):this.length=d(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),E);else{var L=s.malloc(y.size,k),_=l(L,y.shape);u.assign(_,y),E<0?this.length=d(this.gl,this.type,this.length,this.usage,L,E):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,y.size),E),s.free(L)}}else if(Array.isArray(y)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=p(y,"uint16"):C=p(y,"float32"),E<0?this.length=d(this.gl,this.type,this.length,this.usage,C,E):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,y.length),E),s.free(C)}else if(typeof y=="object"&&typeof y.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,y,E);else if(typeof y=="number"||y===void 0){if(E>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function b(y,E,k,A){if(k=k||y.ARRAY_BUFFER,A=A||y.DYNAMIC_DRAW,k!==y.ARRAY_BUFFER&&k!==y.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(A!==y.DYNAMIC_DRAW&&A!==y.STATIC_DRAW&&A!==y.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=y.createBuffer(),_=new c(y,k,L,0,A);return _.update(E),_}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(l,f){var c=l.positions,h=l.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:l.vertexIntensityBounds,vectors:[],cells:[],coneOffset:l.coneOffset,colormap:l.colormap};if(l.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),d;for(var p=0,x=1/0,b=-1/0,y=1/0,E=-1/0,k=1/0,A=-1/0,L=null,_=null,C=[],M=1/0,v=!1,z=l.coneSizemode==="raw",T=0;Tp&&(p=s.length(q)),T&&!z){var U=2*s.distance(L,F)/(s.length(_)+s.length(q));U?(M=Math.min(M,U),v=!1):v=!0}v||(L=F,_=q),C.push(q)}var H=[x,y,k],j=[b,E,A];f&&(f[0]=H,f[1]=j),p===0&&(p=1);var G=1/p;isFinite(M)||(M=1),d.vectorScale=M;var O=l.coneSize||(z?1:.5);l.absoluteConeSize&&(O=l.absoluteConeSize*G),d.coneScale=O;for(var T=0,W=0;T=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(C){this.pickId=C};function E(C){for(var M=p({colormap:C,nshades:256,format:"rgba"}),v=new Uint8Array(256*4),z=0;z<256;++z){for(var T=M[z],F=0;F<3;++F)v[4*z+F]=T[F];v[4*z+3]=T[3]*255}return d(v,[256,256,4],[4,0,1])}function k(C){for(var M=C.length,v=new Array(M),z=0;z0){var W=this.triShader;W.bind(),W.uniforms=U,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(C){C=C||{};for(var M=this.gl,v=C.model||x,z=C.view||x,T=C.projection||x,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)F[0][q]=Math.max(F[0][q],this.clipBounds[0][q]),F[1][q]=Math.min(F[1][q],this.clipBounds[1][q]);this._model=[].slice.call(v),this._view=[].slice.call(z),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var U={model:v,view:z,projection:T,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},H=this.pickShader;H.bind(),H.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],v=this.cells[M],z=this.positions[v[1]].slice(0,3),T={position:z,dataCoordinate:z,index:Math.floor(v[1]/48)};return this.traceType==="cone"?T.index=Math.floor(v[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[v[1]],T.velocity=this.vectors[v[1]].slice(0,3),T.divergence=this.vectors[v[1]][3],T.index=M),T},y.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 A(C,M){var v=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return v.attributes.position.location=0,v.attributes.color.location=2,v.attributes.uv.location=3,v.attributes.vector.location=4,v}function L(C,M){var v=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return v.attributes.position.location=0,v.attributes.id.location=1,v.attributes.vector.location=4,v}function _(C,M,v){var z=v.shaders;arguments.length===1&&(M=C,C=M.gl);var T=A(C,z),F=L(C,z),q=f(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var U=u(C),H=u(C),j=u(C),G=u(C),O=u(C),W=l(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:O,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:j,type:C.FLOAT,size:4},{buffer:G,type:C.FLOAT,size:2},{buffer:H,type:C.FLOAT,size:4}]),re=new b(C,q,T,F,U,H,O,j,G,W,v.traceType||"cone");return re.update(M),re}i.exports=_},614:function(i,a,o){var s=o(3236),u=s([`precision highp float; +}`]);a.bg=function(x){return u(x,d,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),u=o(8116),l=o(4359),f=o(1879).Q,c=window||process.global||{},h=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var d=3;function p(E,A,L,_){this.gl=E,this.shader=A,this.buffer=L,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var x=p.prototype,b=[0,0];x.bind=function(E,A,L,_){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=E,C.view=A,C.projection=L,C.pixelScale=_,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},x.unbind=function(){this.vao.unbind()},x.update=function(E,A,L,_,C){var M=[];function v(W,re,ne,be,ze,Ce){var he=[ne.style,ne.weight,ne.variant,ne.family].join("_"),te=h[he];te||(te=h[he]={});var ke=te[re];ke||(ke=te[re]=y(re,{triangles:!0,font:ne.family,fontStyle:ne.style,fontWeight:ne.weight,fontVariant:ne.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ze,styletags:Ce}));for(var Ee=(be||12)/12,Me=ke.positions,Oe=ke.cells,Re=0,me=Oe.length;Re=0;--fe){var Ze=Me[Be[fe]];M.push(Ee*Ze[0],-Ee*Ze[1],W)}}for(var z=[0,0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0],U=1.25,H={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},j=0;j<3;++j){F[j]=M.length/d|0,v(.5*(E[0][j]+E[1][j]),A[j],L[j],12,U,H),q[j]=(M.length/d|0)-F[j],z[j]=M.length/d|0;for(var G=0;G<_[j].length;++G)if(_[j][G].text){var O={family:_[j][G].font||C[j].family,style:C[j].fontStyle||C[j].style,weight:C[j].fontWeight||C[j].weight,variant:C[j].fontVariant||C[j].variant};v(_[j][G].x,_[j][G].text,O,_[j][G].fontSize||12,U,H)}T[j]=(M.length/d|0)-z[j]}this.buffer.update(M),this.tickOffset=z,this.tickCount=T,this.labelOffset=F,this.labelCount=q},x.drawTicks=function(E,A,L,_,C,M,v,z){this.tickCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=v,this.shader.uniforms.alignOpt=z,this.vao.draw(this.gl.TRIANGLES,this.tickCount[E],this.tickOffset[E]))},x.drawLabel=function(E,A,L,_,C,M,v,z){this.labelCount[E]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=v,this.shader.uniforms.alignOpt=z,this.vao.draw(this.gl.TRIANGLES,this.labelCount[E],this.labelOffset[E]))},x.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function y(E,A){try{return l(E,A)}catch(L){return console.warn('error vectorizing text:"'+E+'" error:',L),{cells:[],positions:[]}}}function k(E,A,L,_,C,M){var v=s(E),z=u(E,[{buffer:v,size:3}]),T=f(E);T.attributes.position.location=0;var F=new p(E,T,v,z);return F.update(A,L,_,C,M),F}},6444:function(i,a){"use strict";a.create=s,a.equal=u;function o(l,f){var c=l+"",h=c.indexOf("."),d=0;h>=0&&(d=c.length-h-1);var p=Math.pow(10,d),x=Math.round(l*f*p),b=x+"";if(b.indexOf("e")>=0)return b;var y=x/p,k=x%p;x<0?(y=-Math.ceil(y)|0,k=-k|0):(y=Math.floor(y)|0,k=k|0);var E=""+y;if(x<0&&(E="-"+E),d){for(var A=""+k;A.length=l[0][h];--x)d.push({x:x*f[h],text:o(f[h],x)});c.push(d)}return c}function u(l,f){for(var c=0;c<3;++c){if(l[c].length!==f[c].length)return!1;for(var h=0;hE)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(k,_,L),E}function p(y,k){for(var E=s.malloc(y.length,k),A=y.length,L=0;L=0;--A){if(k[A]!==E)return!1;E*=y[A]}return!0}h.update=function(y,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var E=y.dtype;if(f.indexOf(E)<0&&(E="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&E!=="uint16"?E="uint32":E="uint16"}if(E===y.dtype&&x(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,y.data,k):this.length=d(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),k);else{var L=s.malloc(y.size,E),_=l(L,y.shape);u.assign(_,y),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,y.size),k),s.free(L)}}else if(Array.isArray(y)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=p(y,"uint16"):C=p(y,"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,y.length),k),s.free(C)}else if(typeof y=="object"&&typeof y.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,y,k);else if(typeof y=="number"||y===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function b(y,k,E,A){if(E=E||y.ARRAY_BUFFER,A=A||y.DYNAMIC_DRAW,E!==y.ARRAY_BUFFER&&E!==y.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(A!==y.DYNAMIC_DRAW&&A!==y.STATIC_DRAW&&A!==y.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=y.createBuffer(),_=new c(y,E,L,0,A);return _.update(k),_}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(l,f){var c=l.positions,h=l.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:l.vertexIntensityBounds,vectors:[],cells:[],coneOffset:l.coneOffset,colormap:l.colormap};if(l.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),d;for(var p=0,x=1/0,b=-1/0,y=1/0,k=-1/0,E=1/0,A=-1/0,L=null,_=null,C=[],M=1/0,v=!1,z=l.coneSizemode==="raw",T=0;Tp&&(p=s.length(q)),T&&!z){var U=2*s.distance(L,F)/(s.length(_)+s.length(q));U?(M=Math.min(M,U),v=!1):v=!0}v||(L=F,_=q),C.push(q)}var H=[x,y,E],j=[b,k,A];f&&(f[0]=H,f[1]=j),p===0&&(p=1);var G=1/p;isFinite(M)||(M=1),d.vectorScale=M;var O=l.coneSize||(z?1:.5);l.absoluteConeSize&&(O=l.absoluteConeSize*G),d.coneScale=O;for(var T=0,W=0;T=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(C){this.pickId=C};function k(C){for(var M=p({colormap:C,nshades:256,format:"rgba"}),v=new Uint8Array(256*4),z=0;z<256;++z){for(var T=M[z],F=0;F<3;++F)v[4*z+F]=T[F];v[4*z+3]=T[3]*255}return d(v,[256,256,4],[4,0,1])}function E(C){for(var M=C.length,v=new Array(M),z=0;z0){var W=this.triShader;W.bind(),W.uniforms=U,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(C){C=C||{};for(var M=this.gl,v=C.model||x,z=C.view||x,T=C.projection||x,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)F[0][q]=Math.max(F[0][q],this.clipBounds[0][q]),F[1][q]=Math.min(F[1][q],this.clipBounds[1][q]);this._model=[].slice.call(v),this._view=[].slice.call(z),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var U={model:v,view:z,projection:T,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},H=this.pickShader;H.bind(),H.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],v=this.cells[M],z=this.positions[v[1]].slice(0,3),T={position:z,dataCoordinate:z,index:Math.floor(v[1]/48)};return this.traceType==="cone"?T.index=Math.floor(v[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[v[1]],T.velocity=this.vectors[v[1]].slice(0,3),T.divergence=this.vectors[v[1]][3],T.index=M),T},y.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 A(C,M){var v=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return v.attributes.position.location=0,v.attributes.color.location=2,v.attributes.uv.location=3,v.attributes.vector.location=4,v}function L(C,M){var v=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return v.attributes.position.location=0,v.attributes.id.location=1,v.attributes.vector.location=4,v}function _(C,M,v){var z=v.shaders;arguments.length===1&&(M=C,C=M.gl);var T=A(C,z),F=L(C,z),q=f(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var U=u(C),H=u(C),j=u(C),G=u(C),O=u(C),W=l(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:O,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:j,type:C.FLOAT,size:4},{buffer:G,type:C.FLOAT,size:2},{buffer:H,type:C.FLOAT,size:4}]),re=new b(C,q,T,F,U,H,O,j,G,W,v.traceType||"cone");return re.update(M),re}i.exports=_},614:function(i,a,o){var s=o(3236),u=s([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -653,7 +653,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(i){i.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(i,a,o){var s=o(737);i.exports=function(l){return s[l]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),u=o(8116),l=o(3436),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(y,E,k,A){this.gl=y,this.shader=A,this.buffer=E,this.vao=k,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=c.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(y){var E=this.gl,k=this.shader.uniforms;this.shader.bind();var A=k.view=y.view||f,L=k.projection=y.projection||f;k.model=y.model||f,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var _=A[12],C=A[13],M=A[14],v=A[15],z=y._ortho||!1,T=z?2:1,F=T*this.pixelRatio*(L[3]*_+L[7]*C+L[11]*M+L[15]*v)/E.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)E.lineWidth(this.lineWidth[q]*this.pixelRatio),k.capSize=this.capSize[q]*F,this.lineCount[q]&&E.drawArrays(E.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(y,E){for(var k=0;k<3;++k)y[0][k]=Math.min(y[0][k],E[k]),y[1][k]=Math.max(y[1][k],E[k])}var p=function(){for(var y=new Array(3),E=0;E<3;++E){for(var k=[],A=1;A<=2;++A)for(var L=-1;L<=1;L+=2){var _=(A+E)%3,C=[0,0,0];C[_]=L,k.push(C)}y[E]=k}return y}();function x(y,E,k,A){for(var L=p[A],_=0;_0){var U=z.slice();U[M]+=F[1][M],L.push(z[0],z[1],z[2],q[0],q[1],q[2],q[3],0,0,0,U[0],U[1],U[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,U),C+=2+x(L,U,q,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(y){var E=y.gl,k=s(E),A=u(E,[{buffer:k,type:E.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:E.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:E.FLOAT,size:3,offset:28,stride:40}]),L=l(E);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var _=new c(E,k,A,L);return _.update(y),_}},3436:function(i,a,o){"use strict";var s=o(3236),u=o(9405),l=s([`precision highp float; +}`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(i){i.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(i,a,o){var s=o(737);i.exports=function(l){return s[l]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),u=o(8116),l=o(3436),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(y,k,E,A){this.gl=y,this.shader=A,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=c.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(y){var k=this.gl,E=this.shader.uniforms;this.shader.bind();var A=E.view=y.view||f,L=E.projection=y.projection||f;E.model=y.model||f,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var _=A[12],C=A[13],M=A[14],v=A[15],z=y._ortho||!1,T=z?2:1,F=T*this.pixelRatio*(L[3]*_+L[7]*C+L[11]*M+L[15]*v)/k.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)k.lineWidth(this.lineWidth[q]*this.pixelRatio),E.capSize=this.capSize[q]*F,this.lineCount[q]&&k.drawArrays(k.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(y,k){for(var E=0;E<3;++E)y[0][E]=Math.min(y[0][E],k[E]),y[1][E]=Math.max(y[1][E],k[E])}var p=function(){for(var y=new Array(3),k=0;k<3;++k){for(var E=[],A=1;A<=2;++A)for(var L=-1;L<=1;L+=2){var _=(A+k)%3,C=[0,0,0];C[_]=L,E.push(C)}y[k]=E}return y}();function x(y,k,E,A){for(var L=p[A],_=0;_0){var U=z.slice();U[M]+=F[1][M],L.push(z[0],z[1],z[2],q[0],q[1],q[2],q[3],0,0,0,U[0],U[1],U[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,U),C+=2+x(L,U,q,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(y){var k=y.gl,E=s(k),A=u(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=l(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var _=new c(k,E,A,L);return _.update(y),_}},3436:function(i,a,o){"use strict";var s=o(3236),u=o(9405),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -704,13 +704,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);i.exports=function(c){return u(c,l,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(i,a,o){"use strict";var s=o(7766);i.exports=C;var u=null,l,f,c,h;function d(M){var v=M.getParameter(M.FRAMEBUFFER_BINDING),z=M.getParameter(M.RENDERBUFFER_BINDING),T=M.getParameter(M.TEXTURE_BINDING_2D);return[v,z,T]}function p(M,v){M.bindFramebuffer(M.FRAMEBUFFER,v[0]),M.bindRenderbuffer(M.RENDERBUFFER,v[1]),M.bindTexture(M.TEXTURE_2D,v[2])}function x(M,v){var z=M.getParameter(v.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(z+1);for(var T=0;T<=z;++T){for(var F=new Array(z),q=0;q1&&H.drawBuffersWEBGL(u[U]);var re=z.getExtension("WEBGL_depth_texture");re?j?M.depth=y(z,F,q,re.UNSIGNED_INT_24_8_WEBGL,z.DEPTH_STENCIL,z.DEPTH_STENCIL_ATTACHMENT):G&&(M.depth=y(z,F,q,z.UNSIGNED_SHORT,z.DEPTH_COMPONENT,z.DEPTH_ATTACHMENT)):G&&j?M._depth_rb=E(z,F,q,z.DEPTH_STENCIL,z.DEPTH_STENCIL_ATTACHMENT):G?M._depth_rb=E(z,F,q,z.DEPTH_COMPONENT16,z.DEPTH_ATTACHMENT):j&&(M._depth_rb=E(z,F,q,z.STENCIL_INDEX,z.STENCIL_ATTACHMENT));var ne=z.checkFramebufferStatus(z.FRAMEBUFFER);if(ne!==z.FRAMEBUFFER_COMPLETE){M._destroyed=!0,z.bindFramebuffer(z.FRAMEBUFFER,null),z.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(z.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var W=0;WF||z<0||z>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=v,M._shape[1]=z;for(var q=d(T),U=0;Uq||z<0||z>q)throw new Error("gl-fbo: Parameters are too large for FBO");T=T||{};var U=1;if("color"in T){if(U=Math.max(T.color|0,0),U<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(U>1)if(F){if(U>M.getParameter(F.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+U+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var H=M.UNSIGNED_BYTE,j=M.getExtension("OES_texture_float");if(T.float&&U>0){if(!j)throw new Error("gl-fbo: Context does not support floating point textures");H=M.FLOAT}else T.preferFloat&&U>0&&j&&(H=M.FLOAT);var G=!0;"depth"in T&&(G=!!T.depth);var O=!1;return"stencil"in T&&(O=!!T.stencil),new A(M,v,z,H,U,G,O,F)}},2992:function(i,a,o){var s=o(3387).sprintf,u=o(5171),l=o(1848),f=o(1085);i.exports=c;function c(h,d,p){"use strict";var x=l(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";p!==void 0&&(b=p===u.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s: -`,b,x),E=s("%s%s",y,h),k=h.split(` -`),A={},L=0;L1&&H.drawBuffersWEBGL(u[U]);var re=z.getExtension("WEBGL_depth_texture");re?j?M.depth=y(z,F,q,re.UNSIGNED_INT_24_8_WEBGL,z.DEPTH_STENCIL,z.DEPTH_STENCIL_ATTACHMENT):G&&(M.depth=y(z,F,q,z.UNSIGNED_SHORT,z.DEPTH_COMPONENT,z.DEPTH_ATTACHMENT)):G&&j?M._depth_rb=k(z,F,q,z.DEPTH_STENCIL,z.DEPTH_STENCIL_ATTACHMENT):G?M._depth_rb=k(z,F,q,z.DEPTH_COMPONENT16,z.DEPTH_ATTACHMENT):j&&(M._depth_rb=k(z,F,q,z.STENCIL_INDEX,z.STENCIL_ATTACHMENT));var ne=z.checkFramebufferStatus(z.FRAMEBUFFER);if(ne!==z.FRAMEBUFFER_COMPLETE){M._destroyed=!0,z.bindFramebuffer(z.FRAMEBUFFER,null),z.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(z.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var W=0;WF||z<0||z>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=v,M._shape[1]=z;for(var q=d(T),U=0;Uq||z<0||z>q)throw new Error("gl-fbo: Parameters are too large for FBO");T=T||{};var U=1;if("color"in T){if(U=Math.max(T.color|0,0),U<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(U>1)if(F){if(U>M.getParameter(F.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+U+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var H=M.UNSIGNED_BYTE,j=M.getExtension("OES_texture_float");if(T.float&&U>0){if(!j)throw new Error("gl-fbo: Context does not support floating point textures");H=M.FLOAT}else T.preferFloat&&U>0&&j&&(H=M.FLOAT);var G=!0;"depth"in T&&(G=!!T.depth);var O=!1;return"stencil"in T&&(O=!!T.stencil),new A(M,v,z,H,U,G,O,F)}},2992:function(i,a,o){var s=o(3387).sprintf,u=o(5171),l=o(1848),f=o(1085);i.exports=c;function c(h,d,p){"use strict";var x=l(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";p!==void 0&&(b=p===u.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s: +`,b,x),k=s("%s%s",y,h),E=h.split(` +`),A={},L=0;L0){for(var he=0;he<24;++he)q.push(q[q.length-12]);G+=2,be=!0}continue e}O[0][T]=Math.min(O[0][T],ze[T],Ce[T]),O[1][T]=Math.max(O[1][T],ze[T],Ce[T])}var te,ke;Array.isArray(re[0])?(te=re.length>z-1?re[z-1]:re.length>0?re[re.length-1]:[0,0,0,1],ke=re.length>z?re[z]:re.length>0?re[re.length-1]:[0,0,0,1]):te=ke=re,te.length===3&&(te=[te[0],te[1],te[2],1]),ke.length===3&&(ke=[ke[0],ke[1],ke[2],1]),!this.hasAlpha&&te[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(ne)?Ee=ne.length>z-1?ne[z-1]:ne.length>0?ne[ne.length-1]:[0,0,0,1]:Ee=ne;var Me=j;if(j+=k(ze,Ce),be){for(T=0;T<2;++T)q.push(ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,Ee,te[0],te[1],te[2],te[3]);G+=2,be=!1}q.push(ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,Ee,te[0],te[1],te[2],te[3],ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,-Ee,te[0],te[1],te[2],te[3],Ce[0],Ce[1],Ce[2],ze[0],ze[1],ze[2],j,-Ee,ke[0],ke[1],ke[2],ke[3],Ce[0],Ce[1],Ce[2],ze[0],ze[1],ze[2],j,Ee,ke[0],ke[1],ke[2],ke[3]),G+=4}}if(this.buffer.update(q),U.push(j),H.push(W[W.length-1].slice()),this.bounds=O,this.vertexCount=G,this.points=H,this.arcLength=U,"dashes"in v){var Oe=v.dashes,Re=Oe.slice();for(Re.unshift(0),z=1;z1.0001)return null;T+=z[L]}return Math.abs(T-1)>.001?null:[_,h(p,z),z]}},840:function(i,a,o){var s=o(3236),u=s([`precision highp float; +}`]),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 u(d,l,f,null,h)},a.createPickShader=function(d){return u(d,l,c,null,h)}},5714:function(i,a,o){"use strict";i.exports=M;var s=o(2762),u=o(8116),l=o(7766),f=new Uint8Array(4),c=new Float32Array(f.buffer);function h(v,z,T,F){return f[0]=F,f[1]=T,f[2]=z,f[3]=v,c[0]}var d=o(2478),p=o(9618),x=o(7319),b=x.createShader,y=x.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(v,z){for(var T=0,F=0;F<3;++F){var q=v[F]-z[F];T+=q*q}return Math.sqrt(T)}function A(v){for(var z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],T=0;T<3;++T)z[0][T]=Math.max(v[0][T],z[0][T]),z[1][T]=Math.min(v[1][T],z[1][T]);return z}function L(v,z,T,F){this.arcLength=v,this.position=z,this.index=T,this.dataCoordinate=F}function _(v,z,T,F,q,U){this.gl=v,this.shader=z,this.pickShader=T,this.buffer=F,this.vao=q,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=U,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=_.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(v){this.pickId=v},C.drawTransparent=C.draw=function(v){if(this.vertexCount){var z=this.gl,T=this.shader,F=this.vao;T.bind(),T.uniforms={model:v.model||k,view:v.view||k,projection:v.projection||k,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[z.drawingBufferWidth,z.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(z.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},C.drawPick=function(v){if(this.vertexCount){var z=this.gl,T=this.pickShader,F=this.vao;T.bind(),T.uniforms={model:v.model||k,view:v.view||k,projection:v.projection||k,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[z.drawingBufferWidth,z.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(z.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},C.update=function(v){var z,T;this.dirty=!0;var F=!!v.connectGaps;"dashScale"in v&&(this.dashScale=v.dashScale),this.hasAlpha=!1,"opacity"in v&&(this.opacity=+v.opacity,this.opacity<1&&(this.hasAlpha=!0));var q=[],U=[],H=[],j=0,G=0,O=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=v.position||v.positions;if(W){var re=v.color||v.colors||[0,0,0,1],ne=v.lineWidth||1,be=!1;e:for(z=1;z0){for(var he=0;he<24;++he)q.push(q[q.length-12]);G+=2,be=!0}continue e}O[0][T]=Math.min(O[0][T],ze[T],Ce[T]),O[1][T]=Math.max(O[1][T],ze[T],Ce[T])}var te,ke;Array.isArray(re[0])?(te=re.length>z-1?re[z-1]:re.length>0?re[re.length-1]:[0,0,0,1],ke=re.length>z?re[z]:re.length>0?re[re.length-1]:[0,0,0,1]):te=ke=re,te.length===3&&(te=[te[0],te[1],te[2],1]),ke.length===3&&(ke=[ke[0],ke[1],ke[2],1]),!this.hasAlpha&&te[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(ne)?Ee=ne.length>z-1?ne[z-1]:ne.length>0?ne[ne.length-1]:[0,0,0,1]:Ee=ne;var Me=j;if(j+=E(ze,Ce),be){for(T=0;T<2;++T)q.push(ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,Ee,te[0],te[1],te[2],te[3]);G+=2,be=!1}q.push(ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,Ee,te[0],te[1],te[2],te[3],ze[0],ze[1],ze[2],Ce[0],Ce[1],Ce[2],Me,-Ee,te[0],te[1],te[2],te[3],Ce[0],Ce[1],Ce[2],ze[0],ze[1],ze[2],j,-Ee,ke[0],ke[1],ke[2],ke[3],Ce[0],Ce[1],Ce[2],ze[0],ze[1],ze[2],j,Ee,ke[0],ke[1],ke[2],ke[3]),G+=4}}if(this.buffer.update(q),U.push(j),H.push(W[W.length-1].slice()),this.bounds=O,this.vertexCount=G,this.points=H,this.arcLength=U,"dashes"in v){var Oe=v.dashes,Re=Oe.slice();for(Re.unshift(0),z=1;z1.0001)return null;T+=z[L]}return Math.abs(T-1)>.001?null:[_,h(p,z),z]}},840:function(i,a,o){var s=o(3236),u=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1228,7 +1228,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),E=s([`precision highp float; +}`]),k=s([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1236,7 +1236,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:f,fragment:c,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:p,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:y,fragment:E,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,u=1e-6,l=o(9405),f=o(2762),c=o(8116),h=o(7766),d=o(8406),p=o(6760),x=o(7608),b=o(9618),y=o(6729),E=o(7765),k=o(1888),A=o(840),L=o(7626),_=A.meshShader,C=A.wireShader,M=A.pointShader,v=A.pickShader,z=A.pointPickShader,T=A.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt){this.gl=he,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=te,this.dirty=!0,this.triShader=ke,this.lineShader=Ee,this.pointShader=Me,this.pickShader=Oe,this.pointPickShader=Re,this.contourShader=me,this.trianglePositions=Be,this.triangleColors=Ze,this.triangleNormals=gt,this.triangleUVs=et,this.triangleIds=fe,this.triangleVAO=Pt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Qe,this.edgeColors=Tt,this.edgeUVs=xt,this.edgeIds=Xe,this.edgeVAO=_t,this.edgeCount=0,this.pointPositions=Ct,this.pointColors=At,this.pointUVs=Te,this.pointSizes=nt,this.pointIds=jt,this.pointVAO=ut,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ct,this.contourVAO=rt,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=F,this._view=F,this._projection=F,this._resolution=[1,1]}var U=q.prototype;U.isOpaque=function(){return!this.hasAlpha},U.isTransparent=function(){return this.hasAlpha},U.pickSlots=1,U.setPickBase=function(he){this.pickId=he};function H(he,te){if(!te||!te.length)return 1;for(var ke=0;kehe&&ke>0){var Ee=(te[ke][0]-he)/(te[ke][0]-te[ke-1][0]);return te[ke][1]*(1-Ee)+Ee*te[ke-1][1]}}return 1}function j(he,te){for(var ke=y({colormap:he,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),Me=0;Me<256;++Me){for(var Oe=ke[Me],Re=0;Re<3;++Re)Ee[4*Me+Re]=Oe[Re];te?Ee[4*Me+3]=255*H(Me/255,te):Ee[4*Me+3]=255*Oe[3]}return b(Ee,[256,256,4],[4,0,1])}function G(he){for(var te=he.length,ke=new Array(te),Ee=0;Ee0){var gt=this.triShader;gt.bind(),gt.uniforms=me,this.triangleVAO.bind(),te.drawArrays(te.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var gt=this.lineShader;gt.bind(),gt.uniforms=me,this.edgeVAO.bind(),te.lineWidth(this.lineWidth*this.pixelRatio),te.drawArrays(te.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var gt=this.pointShader;gt.bind(),gt.uniforms=me,this.pointVAO.bind(),te.drawArrays(te.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var gt=this.contourShader;gt.bind(),gt.uniforms=me,this.contourVAO.bind(),te.drawArrays(te.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(he){he=he||{};for(var te=this.gl,ke=he.model||F,Ee=he.view||F,Me=he.projection||F,Oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Re=0;Re<3;++Re)Oe[0][Re]=Math.max(Oe[0][Re],this.clipBounds[0][Re]),Oe[1][Re]=Math.min(Oe[1][Re],this.clipBounds[1][Re]);this._model=[].slice.call(ke),this._view=[].slice.call(Ee),this._projection=[].slice.call(Me),this._resolution=[te.drawingBufferWidth,te.drawingBufferHeight];var me={model:ke,view:Ee,projection:Me,clipBounds:Oe,pickId:this.pickId/255},Be=this.pickShader;if(Be.bind(),Be.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),te.drawArrays(te.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),te.lineWidth(this.lineWidth*this.pixelRatio),te.drawArrays(te.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Be=this.pointPickShader;Be.bind(),Be.uniforms=me,this.pointVAO.bind(),te.drawArrays(te.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(he){if(!he||he.id!==this.pickId)return null;for(var te=he.value[0]+256*he.value[1]+65536*he.value[2],ke=this.cells[te],Ee=this.positions,Me=new Array(ke.length),Oe=0;OeMath.abs(v))y.rotate(F,0,0,-M*z*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var q=-_.zoomSpeed*T*v/window.innerHeight*(F-y.lastT())/20;y.pan(F,0,0,k*(Math.exp(q)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(i,a,o){var s=o(3236),u=o(9405),l=s([`precision mediump float; +`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:f,fragment:c,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:p,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:y,fragment:k,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,u=1e-6,l=o(9405),f=o(2762),c=o(8116),h=o(7766),d=o(8406),p=o(6760),x=o(7608),b=o(9618),y=o(6729),k=o(7765),E=o(1888),A=o(840),L=o(7626),_=A.meshShader,C=A.wireShader,M=A.pointShader,v=A.pickShader,z=A.pointPickShader,T=A.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt){this.gl=he,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=te,this.dirty=!0,this.triShader=ke,this.lineShader=Ee,this.pointShader=Me,this.pickShader=Oe,this.pointPickShader=Re,this.contourShader=me,this.trianglePositions=Be,this.triangleColors=Ze,this.triangleNormals=gt,this.triangleUVs=et,this.triangleIds=fe,this.triangleVAO=Pt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Qe,this.edgeColors=Tt,this.edgeUVs=xt,this.edgeIds=Xe,this.edgeVAO=_t,this.edgeCount=0,this.pointPositions=Ct,this.pointColors=At,this.pointUVs=Te,this.pointSizes=nt,this.pointIds=jt,this.pointVAO=ut,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ct,this.contourVAO=rt,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=F,this._view=F,this._projection=F,this._resolution=[1,1]}var U=q.prototype;U.isOpaque=function(){return!this.hasAlpha},U.isTransparent=function(){return this.hasAlpha},U.pickSlots=1,U.setPickBase=function(he){this.pickId=he};function H(he,te){if(!te||!te.length)return 1;for(var ke=0;kehe&&ke>0){var Ee=(te[ke][0]-he)/(te[ke][0]-te[ke-1][0]);return te[ke][1]*(1-Ee)+Ee*te[ke-1][1]}}return 1}function j(he,te){for(var ke=y({colormap:he,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),Me=0;Me<256;++Me){for(var Oe=ke[Me],Re=0;Re<3;++Re)Ee[4*Me+Re]=Oe[Re];te?Ee[4*Me+3]=255*H(Me/255,te):Ee[4*Me+3]=255*Oe[3]}return b(Ee,[256,256,4],[4,0,1])}function G(he){for(var te=he.length,ke=new Array(te),Ee=0;Ee0){var gt=this.triShader;gt.bind(),gt.uniforms=me,this.triangleVAO.bind(),te.drawArrays(te.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var gt=this.lineShader;gt.bind(),gt.uniforms=me,this.edgeVAO.bind(),te.lineWidth(this.lineWidth*this.pixelRatio),te.drawArrays(te.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var gt=this.pointShader;gt.bind(),gt.uniforms=me,this.pointVAO.bind(),te.drawArrays(te.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var gt=this.contourShader;gt.bind(),gt.uniforms=me,this.contourVAO.bind(),te.drawArrays(te.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(he){he=he||{};for(var te=this.gl,ke=he.model||F,Ee=he.view||F,Me=he.projection||F,Oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Re=0;Re<3;++Re)Oe[0][Re]=Math.max(Oe[0][Re],this.clipBounds[0][Re]),Oe[1][Re]=Math.min(Oe[1][Re],this.clipBounds[1][Re]);this._model=[].slice.call(ke),this._view=[].slice.call(Ee),this._projection=[].slice.call(Me),this._resolution=[te.drawingBufferWidth,te.drawingBufferHeight];var me={model:ke,view:Ee,projection:Me,clipBounds:Oe,pickId:this.pickId/255},Be=this.pickShader;if(Be.bind(),Be.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),te.drawArrays(te.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),te.lineWidth(this.lineWidth*this.pixelRatio),te.drawArrays(te.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Be=this.pointPickShader;Be.bind(),Be.uniforms=me,this.pointVAO.bind(),te.drawArrays(te.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(he){if(!he||he.id!==this.pickId)return null;for(var te=he.value[0]+256*he.value[1]+65536*he.value[2],ke=this.cells[te],Ee=this.positions,Me=new Array(ke.length),Oe=0;OeMath.abs(v))y.rotate(F,0,0,-M*z*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var q=-_.zoomSpeed*T*v/window.innerHeight*(F-y.lastT())/20;y.pan(F,0,0,E*(Math.exp(q)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(i,a,o){var s=o(3236),u=o(9405),l=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -1252,7 +1252,7 @@ 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(c){return u(c,l,f,null,[{name:"position",type:"vec2"}])}},4100:function(i,a,o){"use strict";var s=o(4437),u=o(3837),l=o(5445),f=o(4449),c=o(3589),h=o(2260),d=o(7169),p=o(351),x=o(4772),b=o(4040),y=o(799),E=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function k(){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 A(v,z){var T=null;try{T=v.getContext("webgl",z),T||(T=v.getContext("experimental-webgl",z))}catch(F){return null}return T}function L(v){var z=Math.round(Math.log(Math.abs(v))/Math.log(10));if(z<0){var T=Math.round(Math.pow(10,-z));return Math.ceil(v*T)/T}else if(z>0){var T=Math.round(Math.pow(10,z));return Math.ceil(v/T)*T}return Math.ceil(v)}function _(v){return typeof v=="boolean"?v:!0}function C(v){v=v||{},v.camera=v.camera||{};var z=v.canvas;if(!z)if(z=document.createElement("canvas"),v.container){var T=v.container;T.appendChild(z)}else document.body.appendChild(z);var F=v.gl;if(F||(v.glOptions&&(E=!!v.glOptions.preserveDrawingBuffer),F=A(z,v.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:E})),!F)throw new Error("webgl not supported");var q=v.bounds||[[-10,-10,-10],[10,10,10]],U=new k,H=h(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!E}),j=y(F),G=v.cameraObject&&v.cameraObject._ortho===!0||v.camera.projection&&v.camera.projection.type==="orthographic"||!1,O={eye:v.camera.eye||[2,0,0],center:v.camera.center||[0,0,0],up:v.camera.up||[0,1,0],zoomMin:v.camera.zoomMax||.1,zoomMax:v.camera.zoomMin||100,mode:v.camera.mode||"turntable",_ortho:G},W=v.axes||{},re=u(F,W);re.enable=!W.disable;var ne=v.spikes||{},be=f(F,ne),ze=[],Ce=[],he=[],te=[],ke=!0,Re=!0,Ee=new Array(16),Me=new Array(16),Oe={view:null,projection:Ee,model:Me,_ortho:!1},Re=!0,me=[F.drawingBufferWidth,F.drawingBufferHeight],Be=v.cameraObject||s(z,O),fe={gl:F,contextLost:!1,pixelRatio:v.pixelRatio||1,canvas:z,selection:U,camera:Be,axes:re,axesPixels:null,spikes:be,bounds:q,objects:ze,shape:me,aspect:v.aspectRatio||[1,1,1],pickRadius:v.pickRadius||10,zNear:v.zNear||.01,zFar:v.zFar||1e3,fovy:v.fovy||Math.PI/4,clearColor:v.clearColor||[0,0,0,0],autoResize:_(v.autoResize),autoBounds:_(v.autoBounds),autoScale:!!v.autoScale,autoCenter:_(v.autoCenter),clipToBounds:_(v.clipToBounds),snapToData:!!v.snapToData,onselect:v.onselect||null,onrender:v.onrender||null,onclick:v.onclick||null,cameraParams:Oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ct){this.aspect[0]=Ct.x,this.aspect[1]=Ct.y,this.aspect[2]=Ct.z,Re=!0},setBounds:function(Ct,jt){this.bounds[0][Ct]=jt.min,this.bounds[1][Ct]=jt.max},setClearColor:function(Ct){this.clearColor=Ct},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=[F.drawingBufferWidth/fe.pixelRatio|0,F.drawingBufferHeight/fe.pixelRatio|0];function et(){if(!fe._stopped&&fe.autoResize){var Ct=z.parentNode,jt=1,At=1;Ct&&Ct!==document.body?(jt=Ct.clientWidth,At=Ct.clientHeight):(jt=window.innerWidth,At=window.innerHeight);var Te=Math.ceil(jt*fe.pixelRatio)|0,nt=Math.ceil(At*fe.pixelRatio)|0;if(Te!==z.width||nt!==z.height){z.width=Te,z.height=nt;var ut=z.style;ut.position=ut.position||"absolute",ut.left="0px",ut.top="0px",ut.width=jt+"px",ut.height=At+"px",ke=!0}}}fe.autoResize&&et(),window.addEventListener("resize",et);function gt(){for(var Ct=ze.length,jt=te.length,At=0;At0&&he[jt-1]===0;)he.pop(),te.pop().dispose()}fe.update=function(Ct){fe._stopped||(Ct=Ct||{},ke=!0,Re=!0)},fe.add=function(Ct){fe._stopped||(Ct.axes=re,ze.push(Ct),Ce.push(-1),ke=!0,Re=!0,gt())},fe.remove=function(Ct){if(!fe._stopped){var jt=ze.indexOf(Ct);jt<0||(ze.splice(jt,1),Ce.pop(),ke=!0,Re=!0,gt())}},fe.dispose=function(){if(!fe._stopped&&(fe._stopped=!0,window.removeEventListener("resize",et),z.removeEventListener("webglcontextlost",Pt),fe.mouseListener.enabled=!1,!fe.contextLost)){re.dispose(),be.dispose();for(var Ct=0;CtU.distance)continue;for(var tt=0;tt1e-6?(E=Math.acos(k),A=Math.sin(E),L=Math.sin((1-l)*E)/A,_=Math.sin(l*E)/A):(L=1-l,_=l),o[0]=L*f+_*p,o[1]=L*c+_*x,o[2]=L*h+_*b,o[3]=L*d+_*y,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=l;var u={};function l(f,c,h){var d=[c.style,c.weight,c.variant,c.family].join("_"),p=u[d];if(p||(p=u[d]={}),f in p)return p[f];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c.family,fontStyle:c.style,fontWeight:c.weight,fontVariant:c.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var b=s(f,x);x.triangles=!1;var y=s(f,x),E,k;if(h&&h!==1){for(E=0;E0){var T=Math.round(Math.pow(10,z));return Math.ceil(v/T)*T}return Math.ceil(v)}function _(v){return typeof v=="boolean"?v:!0}function C(v){v=v||{},v.camera=v.camera||{};var z=v.canvas;if(!z)if(z=document.createElement("canvas"),v.container){var T=v.container;T.appendChild(z)}else document.body.appendChild(z);var F=v.gl;if(F||(v.glOptions&&(k=!!v.glOptions.preserveDrawingBuffer),F=A(z,v.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!F)throw new Error("webgl not supported");var q=v.bounds||[[-10,-10,-10],[10,10,10]],U=new E,H=h(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!k}),j=y(F),G=v.cameraObject&&v.cameraObject._ortho===!0||v.camera.projection&&v.camera.projection.type==="orthographic"||!1,O={eye:v.camera.eye||[2,0,0],center:v.camera.center||[0,0,0],up:v.camera.up||[0,1,0],zoomMin:v.camera.zoomMax||.1,zoomMax:v.camera.zoomMin||100,mode:v.camera.mode||"turntable",_ortho:G},W=v.axes||{},re=u(F,W);re.enable=!W.disable;var ne=v.spikes||{},be=f(F,ne),ze=[],Ce=[],he=[],te=[],ke=!0,Re=!0,Ee=new Array(16),Me=new Array(16),Oe={view:null,projection:Ee,model:Me,_ortho:!1},Re=!0,me=[F.drawingBufferWidth,F.drawingBufferHeight],Be=v.cameraObject||s(z,O),fe={gl:F,contextLost:!1,pixelRatio:v.pixelRatio||1,canvas:z,selection:U,camera:Be,axes:re,axesPixels:null,spikes:be,bounds:q,objects:ze,shape:me,aspect:v.aspectRatio||[1,1,1],pickRadius:v.pickRadius||10,zNear:v.zNear||.01,zFar:v.zFar||1e3,fovy:v.fovy||Math.PI/4,clearColor:v.clearColor||[0,0,0,0],autoResize:_(v.autoResize),autoBounds:_(v.autoBounds),autoScale:!!v.autoScale,autoCenter:_(v.autoCenter),clipToBounds:_(v.clipToBounds),snapToData:!!v.snapToData,onselect:v.onselect||null,onrender:v.onrender||null,onclick:v.onclick||null,cameraParams:Oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ct){this.aspect[0]=Ct.x,this.aspect[1]=Ct.y,this.aspect[2]=Ct.z,Re=!0},setBounds:function(Ct,jt){this.bounds[0][Ct]=jt.min,this.bounds[1][Ct]=jt.max},setClearColor:function(Ct){this.clearColor=Ct},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=[F.drawingBufferWidth/fe.pixelRatio|0,F.drawingBufferHeight/fe.pixelRatio|0];function et(){if(!fe._stopped&&fe.autoResize){var Ct=z.parentNode,jt=1,At=1;Ct&&Ct!==document.body?(jt=Ct.clientWidth,At=Ct.clientHeight):(jt=window.innerWidth,At=window.innerHeight);var Te=Math.ceil(jt*fe.pixelRatio)|0,nt=Math.ceil(At*fe.pixelRatio)|0;if(Te!==z.width||nt!==z.height){z.width=Te,z.height=nt;var ut=z.style;ut.position=ut.position||"absolute",ut.left="0px",ut.top="0px",ut.width=jt+"px",ut.height=At+"px",ke=!0}}}fe.autoResize&&et(),window.addEventListener("resize",et);function gt(){for(var Ct=ze.length,jt=te.length,At=0;At0&&he[jt-1]===0;)he.pop(),te.pop().dispose()}fe.update=function(Ct){fe._stopped||(Ct=Ct||{},ke=!0,Re=!0)},fe.add=function(Ct){fe._stopped||(Ct.axes=re,ze.push(Ct),Ce.push(-1),ke=!0,Re=!0,gt())},fe.remove=function(Ct){if(!fe._stopped){var jt=ze.indexOf(Ct);jt<0||(ze.splice(jt,1),Ce.pop(),ke=!0,Re=!0,gt())}},fe.dispose=function(){if(!fe._stopped&&(fe._stopped=!0,window.removeEventListener("resize",et),z.removeEventListener("webglcontextlost",Pt),fe.mouseListener.enabled=!1,!fe.contextLost)){re.dispose(),be.dispose();for(var Ct=0;CtU.distance)continue;for(var tt=0;tt1e-6?(k=Math.acos(E),A=Math.sin(k),L=Math.sin((1-l)*k)/A,_=Math.sin(l*k)/A):(L=1-l,_=l),o[0]=L*f+_*p,o[1]=L*c+_*x,o[2]=L*h+_*b,o[3]=L*d+_*y,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=l;var u={};function l(f,c,h){var d=[c.style,c.weight,c.variant,c.family].join("_"),p=u[d];if(p||(p=u[d]={}),f in p)return p[f];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c.family,fontStyle:c.style,fontWeight:c.weight,fontVariant:c.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var b=s(f,x);x.triangles=!1;var y=s(f,x),k,E;if(h&&h!==1){for(k=0;k1?1:Me}function M(Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe){this.gl=Me,this.pixelRatio=1,this.shader=Oe,this.orthoShader=Re,this.projectShader=me,this.pointBuffer=Be,this.colorBuffer=fe,this.glyphBuffer=Ze,this.idBuffer=et,this.vao=gt,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=Pt,this.pickOrthoShader=Qe,this.pickProjectShader=Xe,this.points=[],this._selectResult=new _(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 v=M.prototype;v.pickSlots=1,v.setPickBase=function(Me){this.pickId=Me},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var Me=0;Me<3;++Me)if(this.axesProject[Me]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Me=0;Me<3;++Me)if(this.axesProject[Me]&&!this.projectHasAlpha)return!0;return!1};var z=[0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0,1],U=[0,0,0,1],H=x.slice(),j=[0,0,0],G=[[0,0,0],[0,0,0]];function O(Me){return Me[0]=Me[1]=Me[2]=0,Me}function W(Me,Oe){return Me[0]=Oe[0],Me[1]=Oe[1],Me[2]=Oe[2],Me[3]=1,Me}function re(Me,Oe,Re,me){return Me[0]=Oe[0],Me[1]=Oe[1],Me[2]=Oe[2],Me[Re]=me,Me}function ne(Me){for(var Oe=G,Re=0;Re<2;++Re)for(var me=0;me<3;++me)Oe[Re][me]=Math.max(Math.min(Me[Re][me],1e8),-1e8);return Oe}function be(Me,Oe,Re,me){var Be=Oe.axesProject,fe=Oe.gl,Ze=Me.uniforms,et=Re.model||x,gt=Re.view||x,Pt=Re.projection||x,Qe=Oe.axesBounds,Xe=ne(Oe.clipBounds),Tt;Oe.axes&&Oe.axes.lastCubeProps?Tt=Oe.axes.lastCubeProps.axis:Tt=[1,1,1],z[0]=2/fe.drawingBufferWidth,z[1]=2/fe.drawingBufferHeight,Me.bind(),Ze.view=gt,Ze.projection=Pt,Ze.screenSize=z,Ze.highlightId=Oe.highlightId,Ze.highlightScale=Oe.highlightScale,Ze.clipBounds=Xe,Ze.pickGroup=Oe.pickId/255,Ze.pixelRatio=me;for(var xt=0;xt<3;++xt)if(Be[xt]){Ze.scale=Oe.projectScale[xt],Ze.opacity=Oe.projectOpacity[xt];for(var _t=H,Ct=0;Ct<16;++Ct)_t[Ct]=0;for(var Ct=0;Ct<4;++Ct)_t[5*Ct]=1;_t[5*xt]=0,Tt[xt]<0?_t[12+xt]=Qe[0][xt]:_t[12+xt]=Qe[1][xt],c(_t,et,_t),Ze.model=_t;var jt=(xt+1)%3,At=(xt+2)%3,Te=O(T),nt=O(F);Te[jt]=1,nt[At]=1;var ut=L(Pt,gt,et,W(q,Te)),ct=L(Pt,gt,et,W(U,nt));if(Math.abs(ut[1])>Math.abs(ct[1])){var rt=ut;ut=ct,ct=rt,rt=Te,Te=nt,nt=rt;var je=jt;jt=At,At=je}ut[0]<0&&(Te[jt]=-1),ct[1]>0&&(nt[At]=-1);for(var tt=0,Je=0,Ct=0;Ct<4;++Ct)tt+=Math.pow(et[4*jt+Ct],2),Je+=Math.pow(et[4*At+Ct],2);Te[jt]/=Math.sqrt(tt),nt[At]/=Math.sqrt(Je),Ze.axes[0]=Te,Ze.axes[1]=nt,Ze.fragClipBounds[0]=re(j,Xe[0],xt,-1e8),Ze.fragClipBounds[1]=re(j,Xe[1],xt,1e8),Oe.vao.bind(),Oe.vao.draw(fe.TRIANGLES,Oe.vertexCount),Oe.lineWidth>0&&(fe.lineWidth(Oe.lineWidth*me),Oe.vao.draw(fe.LINES,Oe.lineVertexCount,Oe.vertexCount)),Oe.vao.unbind()}}var ze=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],he=[ze,Ce];function te(Me,Oe,Re,me,Be,fe,Ze){var et=Re.gl;if((fe===Re.projectHasAlpha||Ze)&&be(Oe,Re,me,Be),fe===Re.hasAlpha||Ze){Me.bind();var gt=Me.uniforms;gt.model=me.model||x,gt.view=me.view||x,gt.projection=me.projection||x,z[0]=2/et.drawingBufferWidth,z[1]=2/et.drawingBufferHeight,gt.screenSize=z,gt.highlightId=Re.highlightId,gt.highlightScale=Re.highlightScale,gt.fragClipBounds=he,gt.clipBounds=Re.axes.bounds,gt.opacity=Re.opacity,gt.pickGroup=Re.pickId/255,gt.pixelRatio=Be,Re.vao.bind(),Re.vao.draw(et.TRIANGLES,Re.vertexCount),Re.lineWidth>0&&(et.lineWidth(Re.lineWidth*Be),Re.vao.draw(et.LINES,Re.lineVertexCount,Re.vertexCount)),Re.vao.unbind()}}v.draw=function(Me){var Oe=this.useOrtho?this.orthoShader:this.shader;te(Oe,this.projectShader,this,Me,this.pixelRatio,!1,!1)},v.drawTransparent=function(Me){var Oe=this.useOrtho?this.orthoShader:this.shader;te(Oe,this.projectShader,this,Me,this.pixelRatio,!0,!1)},v.drawPick=function(Me){var Oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;te(Oe,this.pickProjectShader,this,Me,1,!0,!0)},v.pick=function(Me){if(!Me||Me.id!==this.pickId)return null;var Oe=Me.value[2]+(Me.value[1]<<8)+(Me.value[0]<<16);if(Oe>=this.pointCount||Oe<0)return null;var Re=this.points[Oe],me=this._selectResult;me.index=Oe;for(var Be=0;Be<3;++Be)me.position[Be]=me.dataCoordinate[Be]=Re[Be];return me},v.highlight=function(Me){if(!Me)this.highlightId=[1,1,1,1];else{var Oe=Me.index,Re=Oe&255,me=Oe>>8&255,Be=Oe>>16&255;this.highlightId=[Re/255,me/255,Be/255,0]}};function ke(Me,Oe,Re,me){var Be;k(Me)?Oe0){var Ot=0,De=At,_e=[0,0,0,1],Fe=[0,0,0,1],Pe=k(Tt)&&k(Tt[0]),Ie=k(Ct)&&k(Ct[0]);e:for(var me=0;me0?1-Je[0][0]:St<0?1+Je[1][0]:1,Zt*=Zt>0?1-Je[0][1]:Zt<0?1+Je[1][1]:1;for(var qr=[St,Zt],Ei=je.cells||[],Si=je.positions||[],ct=0;ctthis.buffer.length){u.free(this.buffer);for(var k=this.buffer=u.mallocUint8(f(E*y*4)),A=0;Ak)for(y=k;yE)for(y=E;y=0){for(var G=j.type.charAt(j.type.length-1)|0,O=new Array(G),W=0;W=0;)re+=1;U[H]=re}var ne=new Array(k.length);function be(){_.program=f.program(C,_._vref,_._fref,q,U);for(var ze=0;ze=0){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new s("","Invalid data type for attribute "+_+": "+C);c(p,x,M[0],y,v,E,_)}else if(C.indexOf("mat")>=0){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new s("","Invalid data type for attribute "+_+": "+C);h(p,x,M,y,v,E,_)}else throw new s("","Unknown data type for attribute "+_+": "+C);break}}return E}},3327:function(i,a,o){"use strict";var s=o(216),u=o(8866);i.exports=c;function l(h){return function(){return h}}function f(h,d){for(var p=new Array(h),x=0;x4)throw new u("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+ne+"iv"](x[U],H);break;case"v":h["uniform"+ne+"fv"](x[U],H);break;default:throw new u("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(ne=re.charCodeAt(re.length-1)-48,ne<2||ne>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+ne+"fv"](x[U],!1,H);break}else throw new u("","Unknown uniform data type for "+name+": "+re)}}}}}function E(C,M){if(typeof M!="object")return[[C,M]];var v=[];for(var z in M){var T=M[z],F=C;parseInt(z)+""===z?F+="["+z+"]":F+="."+z,typeof T=="object"?v.push.apply(v,E(F,T)):v.push([F,T])}return v}function k(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 v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new u("","Invalid data type");return C.charAt(0)==="b"?f(v,!1):f(v,0)}else if(C.indexOf("mat")===0&&C.length===4){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+C);return f(v*v,0)}else throw new u("","Unknown uniform data type for "+name+": "+C)}}function A(C,M,v){if(typeof v=="object"){var z=L(v);Object.defineProperty(C,M,{get:l(z),set:y(v),enumerable:!0,configurable:!1})}else x[v]?Object.defineProperty(C,M,{get:b(v),set:y(v),enumerable:!0,configurable:!1}):C[M]=k(p[v].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var v=0;v1){p[0]in h||(h[p[0]]=[]),h=h[p[0]];for(var x=1;x1)for(var E=0;E1?1:Me}function M(Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe){this.gl=Me,this.pixelRatio=1,this.shader=Oe,this.orthoShader=Re,this.projectShader=me,this.pointBuffer=Be,this.colorBuffer=fe,this.glyphBuffer=Ze,this.idBuffer=et,this.vao=gt,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=Pt,this.pickOrthoShader=Qe,this.pickProjectShader=Xe,this.points=[],this._selectResult=new _(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 v=M.prototype;v.pickSlots=1,v.setPickBase=function(Me){this.pickId=Me},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var Me=0;Me<3;++Me)if(this.axesProject[Me]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Me=0;Me<3;++Me)if(this.axesProject[Me]&&!this.projectHasAlpha)return!0;return!1};var z=[0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0,1],U=[0,0,0,1],H=x.slice(),j=[0,0,0],G=[[0,0,0],[0,0,0]];function O(Me){return Me[0]=Me[1]=Me[2]=0,Me}function W(Me,Oe){return Me[0]=Oe[0],Me[1]=Oe[1],Me[2]=Oe[2],Me[3]=1,Me}function re(Me,Oe,Re,me){return Me[0]=Oe[0],Me[1]=Oe[1],Me[2]=Oe[2],Me[Re]=me,Me}function ne(Me){for(var Oe=G,Re=0;Re<2;++Re)for(var me=0;me<3;++me)Oe[Re][me]=Math.max(Math.min(Me[Re][me],1e8),-1e8);return Oe}function be(Me,Oe,Re,me){var Be=Oe.axesProject,fe=Oe.gl,Ze=Me.uniforms,et=Re.model||x,gt=Re.view||x,Pt=Re.projection||x,Qe=Oe.axesBounds,Xe=ne(Oe.clipBounds),Tt;Oe.axes&&Oe.axes.lastCubeProps?Tt=Oe.axes.lastCubeProps.axis:Tt=[1,1,1],z[0]=2/fe.drawingBufferWidth,z[1]=2/fe.drawingBufferHeight,Me.bind(),Ze.view=gt,Ze.projection=Pt,Ze.screenSize=z,Ze.highlightId=Oe.highlightId,Ze.highlightScale=Oe.highlightScale,Ze.clipBounds=Xe,Ze.pickGroup=Oe.pickId/255,Ze.pixelRatio=me;for(var xt=0;xt<3;++xt)if(Be[xt]){Ze.scale=Oe.projectScale[xt],Ze.opacity=Oe.projectOpacity[xt];for(var _t=H,Ct=0;Ct<16;++Ct)_t[Ct]=0;for(var Ct=0;Ct<4;++Ct)_t[5*Ct]=1;_t[5*xt]=0,Tt[xt]<0?_t[12+xt]=Qe[0][xt]:_t[12+xt]=Qe[1][xt],c(_t,et,_t),Ze.model=_t;var jt=(xt+1)%3,At=(xt+2)%3,Te=O(T),nt=O(F);Te[jt]=1,nt[At]=1;var ut=L(Pt,gt,et,W(q,Te)),ct=L(Pt,gt,et,W(U,nt));if(Math.abs(ut[1])>Math.abs(ct[1])){var rt=ut;ut=ct,ct=rt,rt=Te,Te=nt,nt=rt;var je=jt;jt=At,At=je}ut[0]<0&&(Te[jt]=-1),ct[1]>0&&(nt[At]=-1);for(var tt=0,Je=0,Ct=0;Ct<4;++Ct)tt+=Math.pow(et[4*jt+Ct],2),Je+=Math.pow(et[4*At+Ct],2);Te[jt]/=Math.sqrt(tt),nt[At]/=Math.sqrt(Je),Ze.axes[0]=Te,Ze.axes[1]=nt,Ze.fragClipBounds[0]=re(j,Xe[0],xt,-1e8),Ze.fragClipBounds[1]=re(j,Xe[1],xt,1e8),Oe.vao.bind(),Oe.vao.draw(fe.TRIANGLES,Oe.vertexCount),Oe.lineWidth>0&&(fe.lineWidth(Oe.lineWidth*me),Oe.vao.draw(fe.LINES,Oe.lineVertexCount,Oe.vertexCount)),Oe.vao.unbind()}}var ze=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],he=[ze,Ce];function te(Me,Oe,Re,me,Be,fe,Ze){var et=Re.gl;if((fe===Re.projectHasAlpha||Ze)&&be(Oe,Re,me,Be),fe===Re.hasAlpha||Ze){Me.bind();var gt=Me.uniforms;gt.model=me.model||x,gt.view=me.view||x,gt.projection=me.projection||x,z[0]=2/et.drawingBufferWidth,z[1]=2/et.drawingBufferHeight,gt.screenSize=z,gt.highlightId=Re.highlightId,gt.highlightScale=Re.highlightScale,gt.fragClipBounds=he,gt.clipBounds=Re.axes.bounds,gt.opacity=Re.opacity,gt.pickGroup=Re.pickId/255,gt.pixelRatio=Be,Re.vao.bind(),Re.vao.draw(et.TRIANGLES,Re.vertexCount),Re.lineWidth>0&&(et.lineWidth(Re.lineWidth*Be),Re.vao.draw(et.LINES,Re.lineVertexCount,Re.vertexCount)),Re.vao.unbind()}}v.draw=function(Me){var Oe=this.useOrtho?this.orthoShader:this.shader;te(Oe,this.projectShader,this,Me,this.pixelRatio,!1,!1)},v.drawTransparent=function(Me){var Oe=this.useOrtho?this.orthoShader:this.shader;te(Oe,this.projectShader,this,Me,this.pixelRatio,!0,!1)},v.drawPick=function(Me){var Oe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;te(Oe,this.pickProjectShader,this,Me,1,!0,!0)},v.pick=function(Me){if(!Me||Me.id!==this.pickId)return null;var Oe=Me.value[2]+(Me.value[1]<<8)+(Me.value[0]<<16);if(Oe>=this.pointCount||Oe<0)return null;var Re=this.points[Oe],me=this._selectResult;me.index=Oe;for(var Be=0;Be<3;++Be)me.position[Be]=me.dataCoordinate[Be]=Re[Be];return me},v.highlight=function(Me){if(!Me)this.highlightId=[1,1,1,1];else{var Oe=Me.index,Re=Oe&255,me=Oe>>8&255,Be=Oe>>16&255;this.highlightId=[Re/255,me/255,Be/255,0]}};function ke(Me,Oe,Re,me){var Be;E(Me)?Oe0){var Ot=0,De=At,_e=[0,0,0,1],Fe=[0,0,0,1],Pe=E(Tt)&&E(Tt[0]),Ie=E(Ct)&&E(Ct[0]);e:for(var me=0;me0?1-Je[0][0]:St<0?1+Je[1][0]:1,Zt*=Zt>0?1-Je[0][1]:Zt<0?1+Je[1][1]:1;for(var qr=[St,Zt],Ei=je.cells||[],Si=je.positions||[],ct=0;ctthis.buffer.length){u.free(this.buffer);for(var E=this.buffer=u.mallocUint8(f(k*y*4)),A=0;AE)for(y=E;yk)for(y=k;y=0){for(var G=j.type.charAt(j.type.length-1)|0,O=new Array(G),W=0;W=0;)re+=1;U[H]=re}var ne=new Array(E.length);function be(){_.program=f.program(C,_._vref,_._fref,q,U);for(var ze=0;ze=0){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new s("","Invalid data type for attribute "+_+": "+C);c(p,x,M[0],y,v,k,_)}else if(C.indexOf("mat")>=0){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new s("","Invalid data type for attribute "+_+": "+C);h(p,x,M,y,v,k,_)}else throw new s("","Unknown data type for attribute "+_+": "+C);break}}return k}},3327:function(i,a,o){"use strict";var s=o(216),u=o(8866);i.exports=c;function l(h){return function(){return h}}function f(h,d){for(var p=new Array(h),x=0;x4)throw new u("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+ne+"iv"](x[U],H);break;case"v":h["uniform"+ne+"fv"](x[U],H);break;default:throw new u("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(ne=re.charCodeAt(re.length-1)-48,ne<2||ne>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+ne+"fv"](x[U],!1,H);break}else throw new u("","Unknown uniform data type for "+name+": "+re)}}}}}function k(C,M){if(typeof M!="object")return[[C,M]];var v=[];for(var z in M){var T=M[z],F=C;parseInt(z)+""===z?F+="["+z+"]":F+="."+z,typeof T=="object"?v.push.apply(v,k(F,T)):v.push([F,T])}return v}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 v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new u("","Invalid data type");return C.charAt(0)==="b"?f(v,!1):f(v,0)}else if(C.indexOf("mat")===0&&C.length===4){var v=C.charCodeAt(C.length-1)-48;if(v<2||v>4)throw new u("","Invalid uniform dimension type for matrix "+name+": "+C);return f(v*v,0)}else throw new u("","Unknown uniform data type for "+name+": "+C)}}function A(C,M,v){if(typeof v=="object"){var z=L(v);Object.defineProperty(C,M,{get:l(z),set:y(v),enumerable:!0,configurable:!1})}else x[v]?Object.defineProperty(C,M,{get:b(v),set:y(v),enumerable:!0,configurable:!1}):C[M]=E(p[v].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var v=0;v1){p[0]in h||(h[p[0]]=[]),h=h[p[0]];for(var x=1;x1)for(var k=0;k0)for(var te=0;teL)return C-1}return C},d=function(A,L,_){return A_?_:A},p=function(A,L,_){var C=L.vectors,M=L.meshgrid,v=A[0],z=A[1],T=A[2],F=M[0].length,q=M[1].length,U=M[2].length,H=h(M[0],v),j=h(M[1],z),G=h(M[2],T),O=H+1,W=j+1,re=G+1;if(H=d(H,0,F-1),O=d(O,0,F-1),j=d(j,0,q-1),W=d(W,0,q-1),G=d(G,0,U-1),re=d(re,0,U-1),H<0||j<0||G<0||O>F-1||W>q-1||re>U-1)return s.create();var ne=M[0][H],be=M[0][O],ze=M[1][j],Ce=M[1][W],he=M[2][G],te=M[2][re],ke=(v-ne)/(be-ne),Ee=(z-ze)/(Ce-ze),Me=(T-he)/(te-he);isFinite(ke)||(ke=.5),isFinite(Ee)||(Ee=.5),isFinite(Me)||(Me=.5);var Oe,Re,me,Be,fe,Ze;switch(_.reversedX&&(H=F-1-H,O=F-1-O),_.reversedY&&(j=q-1-j,W=q-1-W),_.reversedZ&&(G=U-1-G,re=U-1-re),_.filled){case 5:fe=G,Ze=re,me=j*U,Be=W*U,Oe=H*U*q,Re=O*U*q;break;case 4:fe=G,Ze=re,Oe=H*U,Re=O*U,me=j*U*F,Be=W*U*F;break;case 3:me=j,Be=W,fe=G*q,Ze=re*q,Oe=H*q*U,Re=O*q*U;break;case 2:me=j,Be=W,Oe=H*q,Re=O*q,fe=G*q*F,Ze=re*q*F;break;case 1:Oe=H,Re=O,fe=G*F,Ze=re*F,me=j*F*U,Be=W*F*U;break;default:Oe=H,Re=O,me=j*F,Be=W*F,fe=G*F*q,Ze=re*F*q;break}var et=C[Oe+me+fe],gt=C[Oe+me+Ze],Pt=C[Oe+Be+fe],Qe=C[Oe+Be+Ze],Xe=C[Re+me+fe],Tt=C[Re+me+Ze],xt=C[Re+Be+fe],_t=C[Re+Be+Ze],Ct=s.create(),jt=s.create(),At=s.create(),Te=s.create();s.lerp(Ct,et,Xe,ke),s.lerp(jt,gt,Tt,ke),s.lerp(At,Pt,xt,ke),s.lerp(Te,Qe,_t,ke);var nt=s.create(),ut=s.create();s.lerp(nt,Ct,At,Ee),s.lerp(ut,jt,Te,Ee);var ct=s.create();return s.lerp(ct,nt,ut,Me),ct},x=function(A,L){var _=L[0],C=L[1],M=L[2];return A[0]=_<0?-_:_,A[1]=C<0?-C:C,A[2]=M<0?-M:M,A},b=function(A){var L=1/0;A.sort(function(v,z){return v-z});for(var _=A.length,C=1;C<_;C++){var M=Math.abs(A[C]-A[C-1]);MO||_tW||Ctre)},be=s.distance(L[0],L[1]),ze=10*be/C,Ce=ze*ze,he=1,te=0,ke=_.length;ke>1&&(he=y(_));for(var Ee=0;Eete&&(te=et),fe.push(et),U.push({points:Oe,velocities:Re,divergences:fe});for(var gt=0;gtCe&&s.scale(Pt,Pt,ze/Math.sqrt(Qe)),s.add(Pt,Pt,Me),me=F(Pt),s.squaredDistance(Be,Pt)-Ce>-1e-4*Ce){Oe.push(Pt),Be=Pt,Re.push(me);var Ze=q(Pt,me),et=s.length(Ze);isFinite(et)&&et>te&&(te=et),fe.push(et)}Me=Pt}}var Xe=c(U,A.colormap,te,he);return v?Xe.tubeScale=v:(te===0&&(te=1),Xe.tubeScale=M*.5*he/te),Xe};var E=o(6740),k=o(6405).createMesh;i.exports.createTubeMesh=function(A,L){return k(A,L,{shaders:E,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),u=o(3236),l=u([`precision highp float; +}`]);a.meshShader={vertex:u,fragment:l,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(i,a,o){"use strict";var s=o(2931),u=o(9970),l=["xyz","xzy","yxz","yzx","zxy","zyx"],f=function(A,L,_,C){for(var M=A.points,v=A.velocities,z=A.divergences,T=[],F=[],q=[],U=[],H=[],j=[],G=0,O=0,W=u.create(),re=u.create(),ne=8,be=0;be0)for(var te=0;teL)return C-1}return C},d=function(A,L,_){return A_?_:A},p=function(A,L,_){var C=L.vectors,M=L.meshgrid,v=A[0],z=A[1],T=A[2],F=M[0].length,q=M[1].length,U=M[2].length,H=h(M[0],v),j=h(M[1],z),G=h(M[2],T),O=H+1,W=j+1,re=G+1;if(H=d(H,0,F-1),O=d(O,0,F-1),j=d(j,0,q-1),W=d(W,0,q-1),G=d(G,0,U-1),re=d(re,0,U-1),H<0||j<0||G<0||O>F-1||W>q-1||re>U-1)return s.create();var ne=M[0][H],be=M[0][O],ze=M[1][j],Ce=M[1][W],he=M[2][G],te=M[2][re],ke=(v-ne)/(be-ne),Ee=(z-ze)/(Ce-ze),Me=(T-he)/(te-he);isFinite(ke)||(ke=.5),isFinite(Ee)||(Ee=.5),isFinite(Me)||(Me=.5);var Oe,Re,me,Be,fe,Ze;switch(_.reversedX&&(H=F-1-H,O=F-1-O),_.reversedY&&(j=q-1-j,W=q-1-W),_.reversedZ&&(G=U-1-G,re=U-1-re),_.filled){case 5:fe=G,Ze=re,me=j*U,Be=W*U,Oe=H*U*q,Re=O*U*q;break;case 4:fe=G,Ze=re,Oe=H*U,Re=O*U,me=j*U*F,Be=W*U*F;break;case 3:me=j,Be=W,fe=G*q,Ze=re*q,Oe=H*q*U,Re=O*q*U;break;case 2:me=j,Be=W,Oe=H*q,Re=O*q,fe=G*q*F,Ze=re*q*F;break;case 1:Oe=H,Re=O,fe=G*F,Ze=re*F,me=j*F*U,Be=W*F*U;break;default:Oe=H,Re=O,me=j*F,Be=W*F,fe=G*F*q,Ze=re*F*q;break}var et=C[Oe+me+fe],gt=C[Oe+me+Ze],Pt=C[Oe+Be+fe],Qe=C[Oe+Be+Ze],Xe=C[Re+me+fe],Tt=C[Re+me+Ze],xt=C[Re+Be+fe],_t=C[Re+Be+Ze],Ct=s.create(),jt=s.create(),At=s.create(),Te=s.create();s.lerp(Ct,et,Xe,ke),s.lerp(jt,gt,Tt,ke),s.lerp(At,Pt,xt,ke),s.lerp(Te,Qe,_t,ke);var nt=s.create(),ut=s.create();s.lerp(nt,Ct,At,Ee),s.lerp(ut,jt,Te,Ee);var ct=s.create();return s.lerp(ct,nt,ut,Me),ct},x=function(A,L){var _=L[0],C=L[1],M=L[2];return A[0]=_<0?-_:_,A[1]=C<0?-C:C,A[2]=M<0?-M:M,A},b=function(A){var L=1/0;A.sort(function(v,z){return v-z});for(var _=A.length,C=1;C<_;C++){var M=Math.abs(A[C]-A[C-1]);MO||_tW||Ctre)},be=s.distance(L[0],L[1]),ze=10*be/C,Ce=ze*ze,he=1,te=0,ke=_.length;ke>1&&(he=y(_));for(var Ee=0;Eete&&(te=et),fe.push(et),U.push({points:Oe,velocities:Re,divergences:fe});for(var gt=0;gtCe&&s.scale(Pt,Pt,ze/Math.sqrt(Qe)),s.add(Pt,Pt,Me),me=F(Pt),s.squaredDistance(Be,Pt)-Ce>-1e-4*Ce){Oe.push(Pt),Be=Pt,Re.push(me);var Ze=q(Pt,me),et=s.length(Ze);isFinite(et)&&et>te&&(te=et),fe.push(et)}Me=Pt}}var Xe=c(U,A.colormap,te,he);return v?Xe.tubeScale=v:(te===0&&(te=1),Xe.tubeScale=M*.5*he/te),Xe};var k=o(6740),E=o(6405).createMesh;i.exports.createTubeMesh=function(A,L){return E(A,L,{shaders:k,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),u=o(3236),l=u([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1999,13 +1999,13 @@ void main() { 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 p=s(d,l,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},a.createPickShader=function(d){var p=s(d,l,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},a.createContourShader=function(d){var p=s(d,c,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},a.createPickContourShader=function(d){var p=s(d,c,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},9499:function(i,a,o){"use strict";i.exports=Oe;var s=o(8828),u=o(2762),l=o(8116),f=o(7766),c=o(1888),h=o(6729),d=o(5298),p=o(9994),x=o(9618),b=o(3711),y=o(6760),E=o(7608),k=o(2478),A=o(6199),L=o(990),_=L.createShader,C=L.createContourShader,M=L.createPickShader,v=L.createPickContourShader,z=4*10,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],q=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var Re=0;Re<3;++Re){var me=q[Re],Be=(Re+1)%3,fe=(Re+2)%3;me[Be+0]=1,me[fe+3]=1,me[Re+6]=1}})();function U(Re,me,Be,fe,Ze){this.position=Re,this.index=me,this.uv=Be,this.level=fe,this.dataCoordinate=Ze}var H=256;function j(Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt){this.gl=Re,this.shape=me,this.bounds=Be,this.objectOffset=jt,this.intensityBounds=[],this._shader=fe,this._pickShader=Ze,this._coordinateBuffer=et,this._vao=gt,this._colorMap=Pt,this._contourShader=Qe,this._contourPickShader=Xe,this._contourBuffer=Tt,this._contourVAO=xt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new U([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=_t,this._dynamicVAO=Ct,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[x(c.mallocFloat(1024),[0,0]),x(c.mallocFloat(1024),[0,0]),x(c.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var G=j.prototype;G.genColormap=function(Re,me){var Be=!1,fe=p([h({colormap:Re,nshades:H,format:"rgba"}).map(function(Ze,et){var gt=me?O(et/255,me):Ze[3];return gt<1&&(Be=!0),[Ze[0],Ze[1],Ze[2],255*gt]})]);return d.divseq(fe,255),this.hasAlphaScale=Be,fe},G.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},G.isOpaque=function(){return!this.isTransparent()},G.pickSlots=1,G.setPickBase=function(Re){this.pickId=Re};function O(Re,me){if(!me||!me.length)return 1;for(var Be=0;BeRe&&Be>0){var fe=(me[Be][0]-Re)/(me[Be][0]-me[Be-1][0]);return me[Be][1]*(1-fe)+fe*me[Be-1][1]}}return 1}var W=[0,0,0],re={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 ne(Re,me){var Be,fe,Ze,et=me.axes&&me.axes.lastCubeProps.axis||W,gt=me.showSurface,Pt=me.showContour;for(Be=0;Be<3;++Be)for(gt=gt||me.surfaceProject[Be],fe=0;fe<3;++fe)Pt=Pt||me.contourProject[Be][fe];for(Be=0;Be<3;++Be){var Qe=re.projections[Be];for(fe=0;fe<16;++fe)Qe[fe]=0;for(fe=0;fe<4;++fe)Qe[5*fe]=1;Qe[5*Be]=0,Qe[12+Be]=me.axesBounds[+(et[Be]>0)][Be],y(Qe,Re.model,Qe);var Xe=re.clipBounds[Be];for(Ze=0;Ze<2;++Ze)for(fe=0;fe<3;++fe)Xe[Ze][fe]=Re.clipBounds[Ze][fe];Xe[0][Be]=-1e8,Xe[1][Be]=1e8}return re.showSurface=gt,re.showContour=Pt,re}var be={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},ze=T.slice(),Ce=[1,0,0,0,1,0,0,0,1];function he(Re,me){Re=Re||{};var Be=this.gl;Be.disable(Be.CULL_FACE),this._colorMap.bind(0);var fe=be;fe.model=Re.model||T,fe.view=Re.view||T,fe.projection=Re.projection||T,fe.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],fe.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],fe.objectOffset=this.objectOffset,fe.contourColor=this.contourColor[0],fe.inverseModel=E(fe.inverseModel,fe.model);for(var Ze=0;Ze<2;++Ze)for(var et=fe.clipBounds[Ze],gt=0;gt<3;++gt)et[gt]=Math.min(Math.max(this.clipBounds[Ze][gt],-1e8),1e8);fe.kambient=this.ambientLight,fe.kdiffuse=this.diffuseLight,fe.kspecular=this.specularLight,fe.roughness=this.roughness,fe.fresnel=this.fresnel,fe.opacity=this.opacity,fe.height=0,fe.permutation=Ce,fe.vertexColor=this.vertexColor;var Pt=ze;for(y(Pt,fe.view,fe.model),y(Pt,fe.projection,Pt),E(Pt,Pt),Ze=0;Ze<3;++Ze)fe.eyePosition[Ze]=Pt[12+Ze]/Pt[15];var Qe=Pt[15];for(Ze=0;Ze<3;++Ze)Qe+=this.lightPosition[Ze]*Pt[4*Ze+3];for(Ze=0;Ze<3;++Ze){var Xe=Pt[12+Ze];for(gt=0;gt<3;++gt)Xe+=Pt[4*gt+Ze]*this.lightPosition[gt];fe.lightPosition[Ze]=Xe/Qe}var Tt=ne(fe,this);if(Tt.showSurface){for(this._shader.bind(),this._shader.uniforms=fe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Be.TRIANGLES,this._vertexCount),Ze=0;Ze<3;++Ze)!this.surfaceProject[Ze]||!this.vertexCount||(this._shader.uniforms.model=Tt.projections[Ze],this._shader.uniforms.clipBounds=Tt.clipBounds[Ze],this._vao.draw(Be.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Tt.showContour){var xt=this._contourShader;fe.kambient=1,fe.kdiffuse=0,fe.kspecular=0,fe.opacity=1,xt.bind(),xt.uniforms=fe;var _t=this._contourVAO;for(_t.bind(),Ze=0;Ze<3;++Ze)for(xt.uniforms.permutation=q[Ze],Be.lineWidth(this.contourWidth[Ze]*this.pixelRatio),gt=0;gt>4)/16)/255,Ze=Math.floor(fe),et=fe-Ze,gt=me[1]*(Re.value[1]+(Re.value[2]&15)/16)/255,Pt=Math.floor(gt),Qe=gt-Pt;Ze+=1,Pt+=1;var Xe=Be.position;Xe[0]=Xe[1]=Xe[2]=0;for(var Tt=0;Tt<2;++Tt)for(var xt=Tt?et:1-et,_t=0;_t<2;++_t)for(var Ct=_t?Qe:1-Qe,jt=Ze+Tt,At=Pt+_t,Te=xt*Ct,nt=0;nt<3;++nt)Xe[nt]+=this._field[nt].get(jt,At)*Te;for(var ut=this._pickResult.level,ct=0;ct<3;++ct)if(ut[ct]=k.le(this.contourLevels[ct],Xe[ct]),ut[ct]<0)this.contourLevels[ct].length>0&&(ut[ct]=0);else if(ut[ct]Math.abs(je-Xe[ct])&&(ut[ct]+=1)}for(Be.index[0]=et<.5?Ze:Ze+1,Be.index[1]=Qe<.5?Pt:Pt+1,Be.uv[0]=fe/me[0],Be.uv[1]=gt/me[1],nt=0;nt<3;++nt)Be.dataCoordinate[nt]=this._field[nt].get(Be.index[0],Be.index[1]);return Be},G.padField=function(Re,me){var Be=me.shape.slice(),fe=Re.shape.slice();d.assign(Re.lo(1,1).hi(Be[0],Be[1]),me),d.assign(Re.lo(1).hi(Be[0],1),me.hi(Be[0],1)),d.assign(Re.lo(1,fe[1]-1).hi(Be[0],1),me.lo(0,Be[1]-1).hi(Be[0],1)),d.assign(Re.lo(0,1).hi(1,Be[1]),me.hi(1)),d.assign(Re.lo(fe[0]-1,1).hi(1,Be[1]),me.lo(Be[0]-1)),Re.set(0,0,me.get(0,0)),Re.set(0,fe[1]-1,me.get(0,Be[1]-1)),Re.set(fe[0]-1,0,me.get(Be[0]-1,0)),Re.set(fe[0]-1,fe[1]-1,me.get(Be[0]-1,Be[1]-1))};function ke(Re,me){return Array.isArray(Re)?[me(Re[0]),me(Re[1]),me(Re[2])]:[me(Re),me(Re),me(Re)]}function Ee(Re){return Array.isArray(Re)?Re.length===3?[Re[0],Re[1],Re[2],1]:[Re[0],Re[1],Re[2],Re[3]]:[0,0,0,1]}function Me(Re){if(Array.isArray(Re)){if(Array.isArray(Re))return[Ee(Re[0]),Ee(Re[1]),Ee(Re[2])];var me=Ee(Re);return[me.slice(),me.slice(),me.slice()]}}G.update=function(Re){Re=Re||{},this.objectOffset=Re.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Re&&(this.contourWidth=ke(Re.contourWidth,Number)),"showContour"in Re&&(this.showContour=ke(Re.showContour,Boolean)),"showSurface"in Re&&(this.showSurface=!!Re.showSurface),"contourTint"in Re&&(this.contourTint=ke(Re.contourTint,Boolean)),"contourColor"in Re&&(this.contourColor=Me(Re.contourColor)),"contourProject"in Re&&(this.contourProject=ke(Re.contourProject,function(Pi){return ke(Pi,Boolean)})),"surfaceProject"in Re&&(this.surfaceProject=Re.surfaceProject),"dynamicColor"in Re&&(this.dynamicColor=Me(Re.dynamicColor)),"dynamicTint"in Re&&(this.dynamicTint=ke(Re.dynamicTint,Number)),"dynamicWidth"in Re&&(this.dynamicWidth=ke(Re.dynamicWidth,Number)),"opacity"in Re&&(this.opacity=Re.opacity),"opacityscale"in Re&&(this.opacityscale=Re.opacityscale),"colorBounds"in Re&&(this.colorBounds=Re.colorBounds),"vertexColor"in Re&&(this.vertexColor=Re.vertexColor?1:0),"colormap"in Re&&this._colorMap.setPixels(this.genColormap(Re.colormap,this.opacityscale));var me=Re.field||Re.coords&&Re.coords[2]||null,Be=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Re||"coords"in Re){var fe=(me.shape[0]+2)*(me.shape[1]+2);fe>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(s.nextPow2(fe))),this._field[2]=x(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var Ze=this.shape,et=0;et<2;++et)this._field[2].size>this._field[et].data.length&&(c.freeFloat(this._field[et].data),this._field[et].data=c.mallocFloat(this._field[2].size)),this._field[et]=x(this._field[et].data,[Ze[0]+2,Ze[1]+2]);if(Re.coords){var gt=Re.coords;if(!Array.isArray(gt)||gt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(et=0;et<2;++et){var Pt=gt[et];for(_t=0;_t<2;++_t)if(Pt.shape[_t]!==Ze[_t])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[et],Pt)}}else if(Re.ticks){var Qe=Re.ticks;if(!Array.isArray(Qe)||Qe.length!==2)throw new Error("gl-surface: invalid ticks");for(et=0;et<2;++et){var Xe=Qe[et];if((Array.isArray(Xe)||Xe.length)&&(Xe=x(Xe)),Xe.shape[0]!==Ze[et])throw new Error("gl-surface: invalid tick length");var Tt=x(Xe.data,Ze);Tt.stride[et]=Xe.stride[0],Tt.stride[et^1]=0,this.padField(this._field[et],Tt)}}else{for(et=0;et<2;++et){var xt=[0,0];xt[et]=1,this._field[et]=x(this._field[et].data,[Ze[0]+2,Ze[1]+2],xt,0)}this._field[0].set(0,0,0);for(var _t=0;_t0){for(var oi=0;oi<5;++oi)Lr.pop();Pe-=1}continue e}}}Ei.push(Pe)}this._contourOffsets[vr]=si,this._contourCounts[vr]=Ei}var vi=c.mallocFloat(Lr.length);for(et=0;etU||F<0||F>U)throw new Error("gl-texture2d: Invalid texture size");return z._shape=[T,F],z.bind(),q.texImage2D(q.TEXTURE_2D,0,z.format,T,F,0,z.format,z.type,null),z._mipLevels=[0],z}function y(z,T,F,q,U,H){this.gl=z,this.handle=T,this.format=U,this.type=H,this._shape=[F,q],this._mipLevels=[0],this._magFilter=z.NEAREST,this._minFilter=z.NEAREST,this._wrapS=z.CLAMP_TO_EDGE,this._wrapT=z.CLAMP_TO_EDGE,this._anisoSamples=1;var j=this,G=[this._wrapS,this._wrapT];Object.defineProperties(G,[{get:function(){return j._wrapS},set:function(W){return j.wrapS=W}},{get:function(){return j._wrapT},set:function(W){return j.wrapT=W}}]),this._wrapVector=G;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return j._shape[0]},set:function(W){return j.width=W}},{get:function(){return j._shape[1]},set:function(W){return j.height=W}}]),this._shapeVector=O}var E=y.prototype;Object.defineProperties(E,{minFilter:{get:function(){return this._minFilter},set:function(z){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(z)>=0&&(T.getExtension("OES_texture_float_linear")||(z=T.NEAREST)),c.indexOf(z)<0)throw new Error("gl-texture2d: Unknown filter mode "+z);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,z),this._minFilter=z}},magFilter:{get:function(){return this._magFilter},set:function(z){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(z)>=0&&(T.getExtension("OES_texture_float_linear")||(z=T.NEAREST)),c.indexOf(z)<0)throw new Error("gl-texture2d: Unknown filter mode "+z);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,z),this._magFilter=z}},mipSamples:{get:function(){return this._anisoSamples},set:function(z){var T=this._anisoSamples;if(this._anisoSamples=Math.max(z,1)|0,T!==this._anisoSamples){var F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(z){if(this.bind(),h.indexOf(z)<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,z),this._wrapS=z}},wrapT:{get:function(){return this._wrapT},set:function(z){if(this.bind(),h.indexOf(z)<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,z),this._wrapT=z}},wrap:{get:function(){return this._wrapVector},set:function(z){if(Array.isArray(z)||(z=[z,z]),z.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(z[T])<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);this._wrapS=z[0],this._wrapT=z[1];var F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,this._wrapT),z}},shape:{get:function(){return this._shapeVector},set:function(z){if(!Array.isArray(z))z=[z|0,z|0];else if(z.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,z[0]|0,z[1]|0),[z[0]|0,z[1]|0]}},width:{get:function(){return this._shape[0]},set:function(z){return z=z|0,b(this,z,this._shape[1]),z}},height:{get:function(){return this._shape[1]},set:function(z){return z=z|0,b(this,this._shape[0],z),z}}}),E.bind=function(z){var T=this.gl;return z!==void 0&&T.activeTexture(T.TEXTURE0+(z|0)),T.bindTexture(T.TEXTURE_2D,this.handle),z!==void 0?z|0:T.getParameter(T.ACTIVE_TEXTURE)-T.TEXTURE0},E.dispose=function(){this.gl.deleteTexture(this.handle)},E.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var z=Math.min(this._shape[0],this._shape[1]),T=0;z>0;++T,z>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},E.setPixels=function(z,T,F,q){var U=this.gl;this.bind(),Array.isArray(T)?(q=F,F=T[1]|0,T=T[0]|0):(T=T||0,F=F||0),q=q||0;var H=p(z)?z:z.raw;if(H){var j=this._mipLevels.indexOf(q)<0;j?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,H),this._mipLevels.push(q)):U.texSubImage2D(U.TEXTURE_2D,q,T,F,this.format,this.type,H)}else if(z.shape&&z.stride&&z.data){if(z.shape.length<2||T+z.shape[1]>this._shape[1]>>>q||F+z.shape[0]>this._shape[0]>>>q||T<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(U,T,F,q,this.format,this.type,this._mipLevels,z)}else throw new Error("gl-texture2d: Unsupported data type")};function k(z,T){return z.length===3?T[2]===1&&T[1]===z[0]*z[2]&&T[0]===z[2]:T[0]===1&&T[1]===z[0]}function A(z,T,F,q,U,H,j,G){var O=G.dtype,W=G.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,ne=0,be=k(W,G.stride.slice());O==="float32"?re=z.FLOAT:O==="float64"?(re=z.FLOAT,be=!1,O="float32"):O==="uint8"?re=z.UNSIGNED_BYTE:(re=z.UNSIGNED_BYTE,be=!1,O="uint8");var ze=1;if(W.length===2)ne=z.LUMINANCE,W=[W[0],W[1],1],G=s(G.data,W,[G.stride[0],G.stride[1],1],G.offset);else if(W.length===3){if(W[2]===1)ne=z.ALPHA;else if(W[2]===2)ne=z.LUMINANCE_ALPHA;else if(W[2]===3)ne=z.RGB;else if(W[2]===4)ne=z.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ze=W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ne===z.LUMINANCE||ne===z.ALPHA)&&(U===z.LUMINANCE||U===z.ALPHA)&&(ne=U),ne!==U)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=G.size,he=j.indexOf(q)<0;if(he&&j.push(q),re===H&&be)G.offset===0&&G.data.length===Ce?he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,G.data):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,G.data):he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,G.data.subarray(G.offset,G.offset+Ce)):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,G.data.subarray(G.offset,G.offset+Ce));else{var te;H===z.FLOAT?te=l.mallocFloat32(Ce):te=l.mallocUint8(Ce);var ke=s(te,W,[W[2],W[2]*W[0],1]);re===z.FLOAT&&H===z.UNSIGNED_BYTE?x(ke,G):u.assign(ke,G),he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,te.subarray(0,Ce)):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,te.subarray(0,Ce)),H===z.FLOAT?l.freeFloat32(te):l.freeUint8(te)}}function L(z){var T=z.createTexture();return z.bindTexture(z.TEXTURE_2D,T),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),T}function _(z,T,F,q,U){var H=z.getParameter(z.MAX_TEXTURE_SIZE);if(T<0||T>H||F<0||F>H)throw new Error("gl-texture2d: Invalid texture shape");if(U===z.FLOAT&&!z.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var j=L(z);return z.texImage2D(z.TEXTURE_2D,0,q,T,F,0,q,U,null),new y(z,j,T,F,q,U)}function C(z,T,F,q,U,H){var j=L(z);return z.texImage2D(z.TEXTURE_2D,0,U,U,H,T),new y(z,j,F,q,U,H)}function M(z,T){var F=T.dtype,q=T.shape.slice(),U=z.getParameter(z.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>U||q[1]<0||q[1]>U)throw new Error("gl-texture2d: Invalid texture size");var H=k(q,T.stride.slice()),j=0;F==="float32"?j=z.FLOAT:F==="float64"?(j=z.FLOAT,H=!1,F="float32"):F==="uint8"?j=z.UNSIGNED_BYTE:(j=z.UNSIGNED_BYTE,H=!1,F="uint8");var G=0;if(q.length===2)G=z.LUMINANCE,q=[q[0],q[1],1],T=s(T.data,q,[T.stride[0],T.stride[1],1],T.offset);else if(q.length===3)if(q[2]===1)G=z.ALPHA;else if(q[2]===2)G=z.LUMINANCE_ALPHA;else if(q[2]===3)G=z.RGB;else if(q[2]===4)G=z.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");j===z.FLOAT&&!z.getExtension("OES_texture_float")&&(j=z.UNSIGNED_BYTE,H=!1);var O,W,re=T.size;if(H)T.offset===0&&T.data.length===re?O=T.data:O=T.data.subarray(T.offset,T.offset+re);else{var ne=[q[2],q[2]*q[0],1];W=l.malloc(re,F);var be=s(W,q,ne,0);(F==="float32"||F==="float64")&&j===z.UNSIGNED_BYTE?x(be,T):u.assign(be,T),O=W.subarray(0,re)}var ze=L(z);return z.texImage2D(z.TEXTURE_2D,0,G,q[0],q[1],0,G,j,O),H||l.free(W),new y(z,ze,q[0],q[1],G,j)}function v(z){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||d(z),typeof arguments[1]=="number")return _(z,arguments[1],arguments[2],arguments[3]||z.RGBA,arguments[4]||z.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(z,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||z.RGBA,arguments[3]||z.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var T=arguments[1],F=p(T)?T:T.raw;if(F)return C(z,F,T.width|0,T.height|0,arguments[2]||z.RGBA,arguments[3]||z.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return M(z,T)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(i){"use strict";function a(o,s,u){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var l=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>l)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(x)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2];return o[0]=f*p-c*d,o[1]=c*h-l*p,o[2]=l*d-f*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2];return Math.sqrt(u*u+l*l+f*f)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]/u[0],o[1]=s[1]/u[1],o[2]=s[2]/u[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=u;var s=o(2613);function u(l,f){var c=l[0],h=l[1],d=l[2],p=f[0],x=f[1],b=f[2];return Math.abs(c-p)<=s*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(h-x)<=s*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=u;var s=o(1091)();function u(l,f,c,h,d,p){var x,b;for(f||(f=3),c||(c=0),h?b=Math.min(h*f+c,l.length):b=l.length,x=c;x0&&(c=1/Math.sqrt(c),o[0]=s[0]*c,o[1]=s[1]*c,o[2]=s[2]*c),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var u=Math.random()*2*Math.PI,l=Math.random()*2-1,f=Math.sqrt(1-l*l)*s;return o[0]=Math.cos(u)*f,o[1]=Math.sin(u)*f,o[2]=l*s,o}},6894:function(i){i.exports=a;function a(o,s,u,l){var f=u[1],c=u[2],h=s[1]-f,d=s[2]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=s[0],o[1]=f+h*x-d*p,o[2]=c+h*p+d*x,o}},109:function(i){i.exports=a;function a(o,s,u,l){var f=u[0],c=u[2],h=s[0]-f,d=s[2]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=f+d*p+h*x,o[1]=s[1],o[2]=c+d*x-h*p,o}},8692:function(i){i.exports=a;function a(o,s,u,l){var f=u[0],c=u[1],h=s[0]-f,d=s[1]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=f+h*x-d*p,o[1]=c+h*p+d*x,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o}},8489:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s[0]+u[0]*l,o[1]=s[1]+u[1]*l,o[2]=s[2]+u[2]*l,o}},1463:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s,o[1]=u,o[2]=l,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2];return u*u+l*l+f*f}},3066:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2];return s*s+u*u+l*l}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]-u[0],o[1]=s[1]-u[1],o[2]=s[2]-u[2],o}},492:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2];return o[0]=l*u[0]+f*u[3]+c*u[6],o[1]=l*u[1]+f*u[4]+c*u[7],o[2]=l*u[2]+f*u[5]+c*u[8],o}},5673:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[3]*l+u[7]*f+u[11]*c+u[15];return h=h||1,o[0]=(u[0]*l+u[4]*f+u[8]*c+u[12])/h,o[1]=(u[1]*l+u[5]*f+u[9]*c+u[13])/h,o[2]=(u[2]*l+u[6]*f+u[10]*c+u[14])/h,o}},264:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2],x=u[3],b=x*l+d*c-p*f,y=x*f+p*l-h*c,E=x*c+h*f-d*l,k=-h*l-d*f-p*c;return o[0]=b*x+k*-h+y*-p-E*-d,o[1]=y*x+k*-d+E*-h-b*-p,o[2]=E*x+k*-p+b*-d-y*-h,o}},4361:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]+u[0],o[1]=s[1]+u[1],o[2]=s[2]+u[2],o[3]=s[3]+u[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2],c=s[3]-o[3];return Math.sqrt(u*u+l*l+f*f+c*c)}},1373:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]/u[0],o[1]=s[1]/u[1],o[2]=s[2]/u[2],o[3]=s[3]/u[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,u,l){var f=new Float32Array(4);return f[0]=o,f[1]=s,f[2]=u,f[3]=l,f}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3];return Math.sqrt(s*s+u*u+l*l+f*f)}},2573:function(i){i.exports=a;function a(o,s,u,l){var f=s[0],c=s[1],h=s[2],d=s[3];return o[0]=f+l*(u[0]-f),o[1]=c+l*(u[1]-c),o[2]=h+l*(u[2]-h),o[3]=d+l*(u[3]-d),o}},160:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.max(s[0],u[0]),o[1]=Math.max(s[1],u[1]),o[2]=Math.max(s[2],u[2]),o[3]=Math.max(s[3],u[3]),o}},2334:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.min(s[0],u[0]),o[1]=Math.min(s[1],u[1]),o[2]=Math.min(s[2],u[2]),o[3]=Math.min(s[3],u[3]),o}},3576:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u[0],o[1]=s[1]*u[1],o[2]=s[2]*u[2],o[3]=s[3]*u[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var u=s[0],l=s[1],f=s[2],c=s[3],h=u*u+l*l+f*f+c*c;return h>0&&(h=1/Math.sqrt(h),o[0]=u*h,o[1]=l*h,o[2]=f*h,o[3]=c*h),o}},9131:function(i,a,o){var s=o(5177),u=o(9288);i.exports=l;function l(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),s(f,f),u(f,f,c),f}},9288:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o}},4844:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s[0]+u[0]*l,o[1]=s[1]+u[1]*l,o[2]=s[2]+u[2]*l,o[3]=s[3]+u[3]*l,o}},4578:function(i){i.exports=a;function a(o,s,u,l,f){return o[0]=s,o[1]=u,o[2]=l,o[3]=f,o}},7960:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2],c=s[3]-o[3];return u*u+l*l+f*f+c*c}},483:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3];return s*s+u*u+l*l+f*f}},6860:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]-u[0],o[1]=s[1]-u[1],o[2]=s[2]-u[2],o[3]=s[3]-u[3],o}},5352:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=s[3];return o[0]=u[0]*l+u[4]*f+u[8]*c+u[12]*h,o[1]=u[1]*l+u[5]*f+u[9]*c+u[13]*h,o[2]=u[2]*l+u[6]*f+u[10]*c+u[14]*h,o[3]=u[3]*l+u[7]*f+u[11]*c+u[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2],x=u[3],b=x*l+d*c-p*f,y=x*f+p*l-h*c,E=x*c+h*f-d*l,k=-h*l-d*f-p*c;return o[0]=b*x+k*-h+y*-p-E*-d,o[1]=y*x+k*-d+E*-h-b*-p,o[2]=E*x+k*-p+b*-d-y*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),u=o(6468);i.exports=l;function l(f){for(var c=Array.isArray(f)?f:s(f),h=0;h0)continue;ct=Te.slice(0,1).join("")}return Be(ct),Ce+=ct.length,O=O.slice(ct.length),O.length}while(!0)}function _t(){return/[^a-fA-F0-9]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function Ct(){return j==="."||/[eE]/.test(j)?(O.push(j),H=k,G=j,q+1):j==="x"&&O.length===1&&O[0]==="0"?(H=v,O.push(j),G=j,q+1):/[^\d]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function jt(){return j==="f"&&(O.push(j),G=j,q+=1),/[eE]/.test(j)||(j==="-"||j==="+")&&/[eE]/.test(G)?(O.push(j),G=j,q+1):/[^\d]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function At(){if(/[^\d\w_]/.test(j)){var Te=O.join("");return me[Te]?H=_:Re[Te]?H=L:H=A,Be(O.join("")),H=h,q}return O.push(j),G=j,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(i){i.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=u;function u(l,f){var c=s(f),h=[];return h=h.concat(c(l)),h=h.concat(c(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],u=0;u>1,b=-7,y=u?f-1:0,E=u?-1:1,k=o[s+y];for(y+=E,c=k&(1<<-b)-1,k>>=-b,b+=d;b>0;c=c*256+o[s+y],y+=E,b-=8);for(h=c&(1<<-b)-1,c>>=-b,b+=l;b>0;h=h*256+o[s+y],y+=E,b-=8);if(c===0)c=1-x;else{if(c===p)return h?NaN:(k?-1:1)*(1/0);h=h+Math.pow(2,l),c=c-x}return(k?-1:1)*h*Math.pow(2,c-l)},a.write=function(o,s,u,l,f,c){var h,d,p,x=c*8-f-1,b=(1<>1,E=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=l?0:c-1,A=l?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*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+y>=1?s+=E/p:s+=E*Math.pow(2,1-y),s*p>=2&&(h++,p/=2),h+y>=b?(d=0,h=b):h+y>=1?(d=(s*p-1)*Math.pow(2,f),h=h+y):(d=s*Math.pow(2,y-1)*Math.pow(2,f),h=0));f>=8;o[u+k]=d&255,k+=A,d/=256,f-=8);for(h=h<0;o[u+k]=h&255,k+=A,h/=256,x-=8);o[u+k-A]|=L*128}},8954:function(i,a,o){"use strict";i.exports=y;var s=o(3250),u=o(6803).Fw;function l(E,k,A){this.vertices=E,this.adjacent=k,this.boundary=A,this.lastVisited=-1}l.prototype.flip=function(){var E=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=E;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function f(E,k,A){this.vertices=E,this.cell=k,this.index=A}function c(E,k){return u(E.vertices,k.vertices)}function h(E){return function(){var k=this.tuple;return E.apply(this,k)}}function d(E){var k=s[E+1];return k||(k=s),h(k)}var p=[];function x(E,k,A){this.dimension=E,this.vertices=k,this.simplices=A,this.interior=A.filter(function(C){return!C.boundary}),this.tuple=new Array(E+1);for(var L=0;L<=E;++L)this.tuple[L]=this.vertices[L];var _=p[E];_||(_=p[E]=d(E)),this.orient=_}var b=x.prototype;b.handleBoundaryDegeneracy=function(E,k){var A=this.dimension,L=this.vertices.length-1,_=this.tuple,C=this.vertices,M=[E];for(E.lastVisited=-L;M.length>0;){E=M.pop();for(var v=E.adjacent,z=0;z<=A;++z){var T=v[z];if(!(!T.boundary||T.lastVisited<=-L)){for(var F=T.vertices,q=0;q<=A;++q){var U=F[q];U<0?_[q]=k:_[q]=C[U]}var H=this.orient();if(H>0)return T;T.lastVisited=-L,H===0&&M.push(T)}}}return null},b.walk=function(E,k){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=k?this.interior.length*Math.random()|0:this.interior.length-1,v=this.interior[M];e:for(;!v.boundary;){for(var z=v.vertices,T=v.adjacent,F=0;F<=L;++F)C[F]=_[z[F]];v.lastVisited=A;for(var F=0;F<=L;++F){var q=T[F];if(!(q.lastVisited>=A)){var U=C[F];C[F]=E;var H=this.orient();if(C[F]=U,H<0){v=q;continue e}else q.boundary?q.lastVisited=-A:q.lastVisited=A}}return}return v},b.addPeaks=function(E,k){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=this.interior,v=this.simplices,z=[k];k.lastVisited=A,k.vertices[k.vertices.indexOf(-1)]=A,k.boundary=!1,M.push(k);for(var T=[];z.length>0;){var k=z.pop(),F=k.vertices,q=k.adjacent,U=F.indexOf(A);if(!(U<0)){for(var H=0;H<=L;++H)if(H!==U){var j=q[H];if(!(!j.boundary||j.lastVisited>=A)){var G=j.vertices;if(j.lastVisited!==-A){for(var O=0,W=0;W<=L;++W)G[W]<0?(O=W,C[W]=E):C[W]=_[G[W]];var re=this.orient();if(re>0){G[O]=A,j.boundary=!1,M.push(j),z.push(j),j.lastVisited=A;continue}else j.lastVisited=-A}var ne=j.adjacent,be=F.slice(),ze=q.slice(),Ce=new l(be,ze,!0);v.push(Ce);var he=ne.indexOf(k);if(!(he<0)){ne[he]=Ce,ze[U]=j,be[H]=-1,ze[H]=k,q[H]=Ce,Ce.flip();for(var W=0;W<=L;++W){var te=be[W];if(!(te<0||te===A)){for(var ke=new Array(L-1),Ee=0,Me=0;Me<=L;++Me){var Oe=be[Me];Oe<0||Me===W||(ke[Ee++]=Oe)}T.push(new f(ke,Ce,W))}}}}}}}T.sort(c);for(var H=0;H+1=0?M[z++]=v[F]:T=F&1;if(T===(E&1)){var q=M[0];M[0]=M[1],M[1]=q}k.push(M)}}return k};function y(E,k){var A=E.length;if(A===0)throw new Error("Must have at least d+1 points");var L=E[0].length;if(A<=L)throw new Error("Must input at least d+1 points");var _=E.slice(0,L+1),C=s.apply(void 0,_);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),v=0;v<=L;++v)M[v]=v;C<0&&(M[0]=1,M[1]=0);for(var z=new l(M,new Array(L+1),!1),T=z.adjacent,F=new Array(L+2),v=0;v<=L;++v){for(var q=M.slice(),U=0;U<=L;++U)U===v&&(q[U]=-1);var H=q[0];q[0]=q[1],q[1]=H;var j=new l(q,new Array(L+1),!0);T[v]=j,F[v]=j}F[L+1]=z;for(var v=0;v<=L;++v)for(var q=T[v].vertices,G=T[v].adjacent,U=0;U<=L;++U){var O=q[U];if(O<0){G[U]=z;continue}for(var W=0;W<=L;++W)T[W].vertices.indexOf(O)<0&&(G[U]=T[W])}for(var re=new x(L,_,F),ne=!!k,v=L+1;v3*(F+1)?x(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?x(this,T):this.right.insert(T):this.right=C([T]);else{var q=s.ge(this.leftPoints,T,L),U=s.ge(this.rightPoints,T,_);this.leftPoints.splice(q,0,T),this.rightPoints.splice(U,0,T)}},h.remove=function(T){var F=this.count-this.leftPoints;if(T[1]3*(F-1))return b(this,T);var U=this.left.remove(T);return U===f?(this.left=null,this.count-=1,l):(U===l&&(this.count-=1),U)}else if(T[0]>this.mid){if(!this.right)return u;var H=this.left?this.left.count:0;if(4*H>3*(F-1))return b(this,T);var U=this.right.remove(T);return U===f?(this.right=null,this.count-=1,l):(U===l&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===T?f:u;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var j=this,G=this.left;G.right;)j=G,G=G.right;if(j===this)G.right=this.right;else{var O=this.left,U=this.right;j.count-=G.count,j.right=G.left,G.left=O,G.right=U}d(this,G),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 l}for(var O=s.ge(this.leftPoints,T,L);O=0&&T[U][1]>=F;--U){var H=q(T[U]);if(H)return H}}function k(T,F){for(var q=0;qthis.mid){if(this.right){var q=this.right.queryPoint(T,F);if(q)return q}return E(this.rightPoints,T,F)}else return k(this.leftPoints,F)},h.queryInterval=function(T,F,q){if(Tthis.mid&&this.right){var U=this.right.queryInterval(T,F,q);if(U)return U}return Fthis.mid?E(this.rightPoints,T,q):k(this.leftPoints,q)};function A(T,F){return T-F}function L(T,F){var q=T[0]-F[0];return q||T[1]-F[1]}function _(T,F){var q=T[1]-F[1];return q||T[0]-F[0]}function C(T){if(T.length===0)return null;for(var F=[],q=0;q>1],H=[],j=[],G=[],q=0;q13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,u){return o*(1-u)+s*u}i.exports=a},2652:function(i,a,o){var s=o(4335),u=o(6864),l=o(1903),f=o(9921),c=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=u(),x=u(),b=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],E=[0,0,0];i.exports=function(C,M,v,z,T,F){if(M||(M=[0,0,0]),v||(v=[0,0,0]),z||(z=[0,0,0]),T||(T=[0,0,0,1]),F||(F=[0,0,0,1]),!s(p,C)||(l(x,p),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(f(x)<1e-8)))return!1;var q=p[3],U=p[7],H=p[11],j=p[12],G=p[13],O=p[14],W=p[15];if(q!==0||U!==0||H!==0){b[0]=q,b[1]=U,b[2]=H,b[3]=W;var re=c(x,x);if(!re)return!1;h(x,x),k(T,b,x)}else T[0]=T[1]=T[2]=0,T[3]=1;if(M[0]=j,M[1]=G,M[2]=O,A(y,p),v[0]=d.length(y[0]),d.normalize(y[0],y[0]),z[0]=d.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-z[0]),v[1]=d.length(y[1]),d.normalize(y[1],y[1]),z[0]/=v[1],z[1]=d.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-z[1]),z[2]=d.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-z[2]),v[2]=d.length(y[2]),d.normalize(y[2],y[2]),z[1]/=v[2],z[2]/=v[2],d.cross(E,y[1],y[2]),d.dot(y[0],E)<0)for(var ne=0;ne<3;ne++)v[ne]*=-1,y[ne][0]*=-1,y[ne][1]*=-1,y[ne][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(F[0]=-F[0]),y[0][2]>y[2][0]&&(F[1]=-F[1]),y[1][0]>y[0][1]&&(F[2]=-F[2]),!0};function k(_,C,M){var v=C[0],z=C[1],T=C[2],F=C[3];return _[0]=M[0]*v+M[4]*z+M[8]*T+M[12]*F,_[1]=M[1]*v+M[5]*z+M[9]*T+M[13]*F,_[2]=M[2]*v+M[6]*z+M[10]*T+M[14]*F,_[3]=M[3]*v+M[7]*z+M[11]*T+M[15]*F,_}function A(_,C){_[0][0]=C[0],_[0][1]=C[1],_[0][2]=C[2],_[1][0]=C[4],_[1][1]=C[5],_[1][2]=C[6],_[2][0]=C[8],_[2][1]=C[9],_[2][2]=C[10]}function L(_,C,M,v,z){_[0]=C[0]*v+M[0]*z,_[1]=C[1]*v+M[1]*z,_[2]=C[2]*v+M[2]*z}},4335:function(i){i.exports=function(o,s){var u=s[15];if(u===0)return!1;for(var l=1/u,f=0;f<16;f++)o[f]=s[f]*l;return!0}},7442:function(i,a,o){var s=o(6658),u=o(7182),l=o(2652),f=o(9921),c=o(8648),h=b(),d=b(),p=b();i.exports=x;function x(k,A,L,_){if(f(A)===0||f(L)===0)return!1;var C=l(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=l(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!M?!1:(s(p.translate,h.translate,d.translate,_),s(p.skew,h.skew,d.skew,_),s(p.scale,h.scale,d.scale,_),s(p.perspective,h.perspective,d.perspective,_),c(p.quaternion,h.quaternion,d.quaternion,_),u(k,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function b(){return{translate:y(),scale:y(1),skew:y(),perspective:E(),quaternion:E()}}function y(k){return[k||0,k||0,k||0]}function E(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},u=s.create(),l=s.create();i.exports=function(c,h,d,p,x,b){return s.identity(c),s.fromRotationTranslation(c,b,h),c[3]=x[0],c[7]=x[1],c[11]=x[2],c[15]=x[3],s.identity(l),p[2]!==0&&(l[9]=p[2],s.multiply(c,c,l)),p[1]!==0&&(l[9]=0,l[8]=p[1],s.multiply(c,c,l)),p[0]!==0&&(l[8]=0,l[4]=p[0],s.multiply(c,c,l)),s.scale(c,c,d),c}},1811:function(i,a,o){"use strict";var s=o(2478),u=o(7442),l=o(7608),f=o(5567),c=o(2408),h=o(7089),d=o(6582),p=o(7656),x=o(2504),b=o(3536),y=[0,0,0];i.exports=L;function E(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var k=E.prototype;k.recalcMatrix=function(_){var C=this._time,M=s.le(C,_),v=this.computedMatrix;if(!(M<0)){var z=this._components;if(M===C.length-1)for(var T=16*M,F=0;F<16;++F)v[F]=z[T++];else{for(var q=C[M+1]-C[M],T=16*M,U=this.prevMatrix,H=!0,F=0;F<16;++F)U[F]=z[T++];for(var j=this.nextMatrix,F=0;F<16;++F)j[F]=z[T++],H=H&&U[F]===j[F];if(q<1e-6||H)for(var F=0;F<16;++F)v[F]=U[F];else u(v,U,j,(_-C[M])/q)}var G=this.computedUp;G[0]=v[1],G[1]=v[5],G[2]=v[9],b(G,G);var O=this.computedInverse;l(O,v);var W=this.computedEye,re=O[15];W[0]=O[12]/re,W[1]=O[13]/re,W[2]=O[14]/re;for(var ne=this.computedCenter,be=Math.exp(this.computedRadius[0]),F=0;F<3;++F)ne[F]=W[F]-v[2+4*F]*be}},k.idle=function(_){if(!(_1&&s(l[d[y-2]],l[d[y-1]],b)<=0;)y-=1,d.pop();for(d.push(x),y=p.length;y>1&&s(l[p[y-2]],l[p[y-1]],b)>=0;)y-=1,p.pop();p.push(x)}for(var E=new Array(p.length+d.length-2),k=0,c=0,A=d.length;c0;--L)E[k++]=p[L];return E}},351:function(i,a,o){"use strict";i.exports=u;var s=o(4687);function u(l,f){f||(f=l,l=window);var c=0,h=0,d=0,p={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function b(T){var F=!1;return"altKey"in T&&(F=F||T.altKey!==p.alt,p.alt=!!T.altKey),"shiftKey"in T&&(F=F||T.shiftKey!==p.shift,p.shift=!!T.shiftKey),"ctrlKey"in T&&(F=F||T.ctrlKey!==p.control,p.control=!!T.ctrlKey),"metaKey"in T&&(F=F||T.metaKey!==p.meta,p.meta=!!T.metaKey),F}function y(T,F){var q=s.x(F),U=s.y(F);"buttons"in F&&(T=F.buttons|0),(T!==c||q!==h||U!==d||b(F))&&(c=T|0,h=q||0,d=U||0,f&&f(c,h,d,p))}function E(T){y(0,T)}function k(){(c||h||d||p.shift||p.alt||p.meta||p.control)&&(h=d=0,c=0,p.shift=p.alt=p.control=p.meta=!1,f&&f(0,0,0,p))}function A(T){b(T)&&f&&f(c,h,d,p)}function L(T){s.buttons(T)===0?y(0,T):y(c,T)}function _(T){y(c|s.buttons(T),T)}function C(T){y(c&~s.buttons(T),T)}function M(){x||(x=!0,l.addEventListener("mousemove",L),l.addEventListener("mousedown",_),l.addEventListener("mouseup",C),l.addEventListener("mouseleave",E),l.addEventListener("mouseenter",E),l.addEventListener("mouseout",E),l.addEventListener("mouseover",E),l.addEventListener("blur",k),l.addEventListener("keyup",A),l.addEventListener("keydown",A),l.addEventListener("keypress",A),l!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function v(){x&&(x=!1,l.removeEventListener("mousemove",L),l.removeEventListener("mousedown",_),l.removeEventListener("mouseup",C),l.removeEventListener("mouseleave",E),l.removeEventListener("mouseenter",E),l.removeEventListener("mouseout",E),l.removeEventListener("mouseover",E),l.removeEventListener("blur",k),l.removeEventListener("keyup",A),l.removeEventListener("keydown",A),l.removeEventListener("keypress",A),l!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}M();var z={element:l};return Object.defineProperties(z,{enabled:{get:function(){return x},set:function(T){T?M():v()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),z}},24:function(i){var a={left:0,top:0};i.exports=o;function o(u,l,f){l=l||u.currentTarget||u.srcElement,Array.isArray(f)||(f=[0,0]);var c=u.clientX||0,h=u.clientY||0,d=s(l);return f[0]=c-d.left,f[1]=h-d.top,f}function s(u){return u===window||u===document||u===document.body?a:u.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(ze=1,te[Ee++]=p(M[F],k,A,L),F+=re,_>0)for(be=1,q=M[F],Me=te[Ee]=p(q,k,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,k,A,L),Qe=ke[Ee]=Ce++),Ee+=1,F+=re,be=2;be<_;++be)q=M[F],Me=te[Ee]=p(q,k,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,k,A,L),Qe=ke[Ee]=Ce++,Pt!==me&&d(ke[Ee+Oe],Qe,W,H,Pt,me,k,A,L)),Ee+=1,F+=re;for(F+=ne,Ee=0,Xe=Oe,Oe=Re,Re=Xe,Xe=Be,Be=fe,fe=Xe,Xe=et,et=gt,gt=Xe,ze=2;ze0)for(be=1,q=M[F],Me=te[Ee]=p(q,k,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,k,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,G,W,Ze,Pt,k,A,L)),Ee+=1,F+=re,be=2;be<_;++be)q=M[F],Me=te[Ee]=p(q,k,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,k,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,G,W,Ze,Pt,k,A,L),Pt!==me&&d(ke[Ee+Oe],Qe,W,H,Pt,me,k,A,L)),Ee+=1,F+=re;ze&1&&(Ee=0),Xe=Oe,Oe=Re,Re=Xe,Xe=Be,Be=fe,fe=Xe,Xe=et,et=gt,gt=Xe,F+=ne}}b(ke),b(te)}},"false,1,0":function(h,d,p,x,b){return function(E,k,A,L){var _=E.shape[0]|0,C=E.shape[1]|0,M=E.data,v=E.offset|0,z=E.stride[0]|0,T=E.stride[1]|0,F=v,q,U=-z|0,H=0,j=-T|0,G=0,O=-z-T|0,W=0,re=T|0,ne=z-T*C|0,be=0,ze=0,Ce=0,he=2*C|0,te=x(he),ke=x(he),Ee=0,Me=0,Oe=-1,Re=-1,me=0,Be=-C|0,fe=C|0,Ze=0,et=-C-1|0,gt=C-1|0,Pt=0,Qe=0,Xe=0;for(ze=0;ze0){if(be=1,te[Ee++]=p(M[F],k,A,L),F+=re,C>0)for(ze=1,q=M[F],Me=te[Ee]=p(q,k,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,k,A,L),Qe=ke[Ee]=Ce++),Ee+=1,F+=re,ze=2;ze0)for(ze=1,q=M[F],Me=te[Ee]=p(q,k,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,k,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,W,H,Pt,Ze,k,A,L)),Ee+=1,F+=re,ze=2;ze 0"),typeof c.vertex!="function"&&h("Must specify vertex creation function"),typeof c.cell!="function"&&h("Must specify cell creation function"),typeof c.phase!="function"&&h("Must specify phase function");for(var b=c.getters||[],y=new Array(p),E=0;E=0?y[E]=!0:y[E]=!1;return l(c.vertex,c.cell,c.phase,x,d,y)}},6199:function(i,a,o){"use strict";var s=o(1338),u={zero:function(L,_,C,M){var v=L[0],z=C[0];M|=0;var T=0,F=z;for(T=0;T2&&T[1]>2&&M(z.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),v.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),v.pick(-1,-1,1).lo(1,1).hi(T[0]-2,T[1]-2)),T[1]>2&&(C(z.pick(0,-1).lo(1).hi(T[1]-2),v.pick(0,-1,1).lo(1).hi(T[1]-2)),_(v.pick(0,-1,0).lo(1).hi(T[1]-2))),T[1]>2&&(C(z.pick(T[0]-1,-1).lo(1).hi(T[1]-2),v.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),_(v.pick(T[0]-1,-1,0).lo(1).hi(T[1]-2))),T[0]>2&&(C(z.pick(-1,0).lo(1).hi(T[0]-2),v.pick(-1,0,0).lo(1).hi(T[0]-2)),_(v.pick(-1,0,1).lo(1).hi(T[0]-2))),T[0]>2&&(C(z.pick(-1,T[1]-1).lo(1).hi(T[0]-2),v.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),_(v.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),v.set(0,0,0,0),v.set(0,0,1,0),v.set(T[0]-1,0,0,0),v.set(T[0]-1,0,1,0),v.set(0,T[1]-1,0,0),v.set(0,T[1]-1,1,0),v.set(T[0]-1,T[1]-1,0,0),v.set(T[0]-1,T[1]-1,1,0),v}}function A(L){var _=L.join(),T=p[_];if(T)return T;for(var C=L.length,M=[b,y],v=1;v<=C;++v)M.push(E(v));var z=k,T=z.apply(void 0,M);return p[_]=T,T}i.exports=function(_,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return _;if(C.dimension===0)return _.set(0),_;var v=A(M);return v(_,C)}},4317:function(i){"use strict";function a(f,c){var h=Math.floor(c),d=c-h,p=0<=h&&h0;){G<64?(_=G,G=0):(_=64,G-=64);for(var O=p[1]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),y=H+G*v+O*z,A=j+G*F+O*q;var W=0,re=0,ne=0,be=T,ze=v-M*T,Ce=z-_*v,he=U,te=F-M*U,ke=q-_*F;for(ne=0;ne0;){q<64?(_=q,q=0):(_=64,q-=64);for(var U=p[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),y=T+q*M+U*C,A=F+q*z+U*v;var H=0,j=0,G=M,O=C-_*M,W=z,re=v-_*z;for(j=0;j0;){j<64?(C=j,j=0):(C=64,j-=64);for(var G=p[0]|0;G>0;){G<64?(L=G,G=0):(L=64,G-=64);for(var O=p[1]|0;O>0;){O<64?(_=O,O=0):(_=64,O-=64),y=U+j*z+G*M+O*v,A=H+j*q+G*T+O*F;var W=0,re=0,ne=0,be=z,ze=M-C*z,Ce=v-L*M,he=q,te=T-C*q,ke=F-L*T;for(ne=0;ne<_;++ne){for(re=0;reE;){W=0,re=H-_;t:for(G=0;Gbe)break t;re+=T,W+=F}for(W=H,re=H-_,G=0;G>1,O=G-U,W=G+U,re=H,ne=O,be=G,ze=W,Ce=j,he=k+1,te=A-1,ke=!0,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt=0,Pt=0,Qe=0,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt=z,Kt=b(Vt),ir=b(Vt);Tt=C*re,xt=C*ne,Mt=_;e:for(Xe=0;Xe0){Me=re,re=ne,ne=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ze,xt=C*Ce,Mt=_;e:for(Xe=0;Xe0){Me=ze,ze=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*re,xt=C*be,Mt=_;e:for(Xe=0;Xe0){Me=re,re=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*be,Mt=_;e:for(Xe=0;Xe0){Me=ne,ne=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*re,xt=C*ze,Mt=_;e:for(Xe=0;Xe0){Me=re,re=ze,ze=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*be,xt=C*ze,Mt=_;e:for(Xe=0;Xe0){Me=be,be=ze,ze=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*Ce,Mt=_;e:for(Xe=0;Xe0){Me=ne,ne=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*be,Mt=_;e:for(Xe=0;Xe0){Me=ne,ne=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ze,xt=C*Ce,Mt=_;e:for(Xe=0;Xe0){Me=ze,ze=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}for(Tt=C*re,xt=C*ne,_t=C*be,Ct=C*ze,jt=C*Ce,At=C*H,Te=C*G,nt=C*j,Je=0,Mt=_,Xe=0;Xe0)te--;else if(Qe<0){for(Tt=C*Be,xt=C*he,_t=C*te,Mt=_,Xe=0;Xe0)for(;;){fe=_+te*C,Je=0;e:for(Xe=0;Xe0){if(--tej){e:for(;;){for(fe=_+he*C,Je=0,Mt=_,Xe=0;Xe1&&E?A(y,E[0],E[1]):A(y)}var d={"uint32,1,0":function(x,b){return function(y){var E=y.data,k=y.offset|0,A=y.shape,L=y.stride,_=L[0]|0,C=A[0]|0,M=L[1]|0,v=A[1]|0,z=M,T=M,F=1;C<=32?x(0,C-1,E,k,_,M,C,v,z,T,F):b(0,C-1,E,k,_,M,C,v,z,T,F)}}};function p(x,b){var y=[b,x].join(","),E=d[y],k=f(x,b),A=h(x,b,k);return E(k,A)}i.exports=p},446:function(i,a,o){"use strict";var s=o(7640),u={};function l(f){var c=f.order,h=f.dtype,d=[c,h],p=d.join(":"),x=u[p];return x||(u[p]=x=s(c,h)),x(f),f}i.exports=l},9618:function(i,a,o){var s=o(7163),u=typeof Float64Array!="undefined";function l(b,y){return b[0]-y[0]}function f(){var b=this.stride,y=new Array(b.length),E;for(E=0;E=0&&(M=_|0,C+=z*M,v-=M),new k(this.data,v,z,C)},A.step=function(_){var C=this.shape[0],M=this.stride[0],v=this.offset,z=0,T=Math.ceil;return typeof _=="number"&&(z=_|0,z<0?(v+=M*(C-1),C=T(-C/z)):C=T(C/z),M*=z),new k(this.data,C,M,v)},A.transpose=function(_){_=_===void 0?0:_|0;var C=this.shape,M=this.stride;return new k(this.data,C[_],M[_],this.offset)},A.pick=function(_){var C=[],M=[],v=this.offset;typeof _=="number"&&_>=0?v=v+this.stride[0]*_|0:(C.push(this.shape[0]),M.push(this.stride[0]));var z=y[C.length+1];return z(this.data,C,M,v)},function(_,C,M,v){return new k(_,C[0],M[0],v)}},2:function(b,y,E){function k(L,_,C,M,v,z){this.data=L,this.shape=[_,C],this.stride=[M,v],this.offset=z|0}var A=k.prototype;return A.dtype=b,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(_,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]=M},A.get=function(_,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]},A.index=function(_,C){return this.offset+this.stride[0]*_+this.stride[1]*C},A.hi=function(_,C){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(_,C){var M=this.offset,v=0,z=this.shape[0],T=this.shape[1],F=this.stride[0],q=this.stride[1];return typeof _=="number"&&_>=0&&(v=_|0,M+=F*v,z-=v),typeof C=="number"&&C>=0&&(v=C|0,M+=q*v,T-=v),new k(this.data,z,T,F,q,M)},A.step=function(_,C){var M=this.shape[0],v=this.shape[1],z=this.stride[0],T=this.stride[1],F=this.offset,q=0,U=Math.ceil;return typeof _=="number"&&(q=_|0,q<0?(F+=z*(M-1),M=U(-M/q)):M=U(M/q),z*=q),typeof C=="number"&&(q=C|0,q<0?(F+=T*(v-1),v=U(-v/q)):v=U(v/q),T*=q),new k(this.data,M,v,z,T,F)},A.transpose=function(_,C){_=_===void 0?0:_|0,C=C===void 0?1:C|0;var M=this.shape,v=this.stride;return new k(this.data,M[_],M[C],v[_],v[C],this.offset)},A.pick=function(_,C){var M=[],v=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(M.push(this.shape[0]),v.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(M.push(this.shape[1]),v.push(this.stride[1]));var T=y[M.length+1];return T(this.data,M,v,z)},function(_,C,M,v){return new k(_,C[0],C[1],M[0],M[1],v)}},3:function(b,y,E){function k(L,_,C,M,v,z,T,F){this.data=L,this.shape=[_,C,M],this.stride=[v,z,T],this.offset=F|0}var A=k.prototype;return A.dtype=b,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var _=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return _>C?C>M?[2,1,0]:_>M?[1,2,0]:[1,0,2]:_>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),A.set=function(_,C,M,v){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M,v):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]=v},A.get=function(_,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]},A.index=function(_,C,M){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M},A.hi=function(_,C,M){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|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)},A.lo=function(_,C,M){var v=this.offset,z=0,T=this.shape[0],F=this.shape[1],q=this.shape[2],U=this.stride[0],H=this.stride[1],j=this.stride[2];return typeof _=="number"&&_>=0&&(z=_|0,v+=U*z,T-=z),typeof C=="number"&&C>=0&&(z=C|0,v+=H*z,F-=z),typeof M=="number"&&M>=0&&(z=M|0,v+=j*z,q-=z),new k(this.data,T,F,q,U,H,j,v)},A.step=function(_,C,M){var v=this.shape[0],z=this.shape[1],T=this.shape[2],F=this.stride[0],q=this.stride[1],U=this.stride[2],H=this.offset,j=0,G=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(H+=F*(v-1),v=G(-v/j)):v=G(v/j),F*=j),typeof C=="number"&&(j=C|0,j<0?(H+=q*(z-1),z=G(-z/j)):z=G(z/j),q*=j),typeof M=="number"&&(j=M|0,j<0?(H+=U*(T-1),T=G(-T/j)):T=G(T/j),U*=j),new k(this.data,v,z,T,F,q,U,H)},A.transpose=function(_,C,M){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var v=this.shape,z=this.stride;return new k(this.data,v[_],v[C],v[M],z[_],z[C],z[M],this.offset)},A.pick=function(_,C,M){var v=[],z=[],T=this.offset;typeof _=="number"&&_>=0?T=T+this.stride[0]*_|0:(v.push(this.shape[0]),z.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(v.push(this.shape[1]),z.push(this.stride[1])),typeof M=="number"&&M>=0?T=T+this.stride[2]*M|0:(v.push(this.shape[2]),z.push(this.stride[2]));var F=y[v.length+1];return F(this.data,v,z,T)},function(_,C,M,v){return new k(_,C[0],C[1],C[2],M[0],M[1],M[2],v)}},4:function(b,y,E){function k(L,_,C,M,v,z,T,F,q,U){this.data=L,this.shape=[_,C,M,v],this.stride=[z,T,F,q],this.offset=U|0}var A=k.prototype;return A.dtype=b,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:E}),A.set=function(_,C,M,v,z){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v,z):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v]=z},A.get=function(_,C,M,v){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v]},A.index=function(_,C,M,v){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v},A.hi=function(_,C,M,v){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof v!="number"||v<0?this.shape[3]:v|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(_,C,M,v){var z=this.offset,T=0,F=this.shape[0],q=this.shape[1],U=this.shape[2],H=this.shape[3],j=this.stride[0],G=this.stride[1],O=this.stride[2],W=this.stride[3];return typeof _=="number"&&_>=0&&(T=_|0,z+=j*T,F-=T),typeof C=="number"&&C>=0&&(T=C|0,z+=G*T,q-=T),typeof M=="number"&&M>=0&&(T=M|0,z+=O*T,U-=T),typeof v=="number"&&v>=0&&(T=v|0,z+=W*T,H-=T),new k(this.data,F,q,U,H,j,G,O,W,z)},A.step=function(_,C,M,v){var z=this.shape[0],T=this.shape[1],F=this.shape[2],q=this.shape[3],U=this.stride[0],H=this.stride[1],j=this.stride[2],G=this.stride[3],O=this.offset,W=0,re=Math.ceil;return typeof _=="number"&&(W=_|0,W<0?(O+=U*(z-1),z=re(-z/W)):z=re(z/W),U*=W),typeof C=="number"&&(W=C|0,W<0?(O+=H*(T-1),T=re(-T/W)):T=re(T/W),H*=W),typeof M=="number"&&(W=M|0,W<0?(O+=j*(F-1),F=re(-F/W)):F=re(F/W),j*=W),typeof v=="number"&&(W=v|0,W<0?(O+=G*(q-1),q=re(-q/W)):q=re(q/W),G*=W),new k(this.data,z,T,F,q,U,H,j,G,O)},A.transpose=function(_,C,M,v){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,v=v===void 0?3:v|0;var z=this.shape,T=this.stride;return new k(this.data,z[_],z[C],z[M],z[v],T[_],T[C],T[M],T[v],this.offset)},A.pick=function(_,C,M,v){var z=[],T=[],F=this.offset;typeof _=="number"&&_>=0?F=F+this.stride[0]*_|0:(z.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?F=F+this.stride[1]*C|0:(z.push(this.shape[1]),T.push(this.stride[1])),typeof M=="number"&&M>=0?F=F+this.stride[2]*M|0:(z.push(this.shape[2]),T.push(this.stride[2])),typeof v=="number"&&v>=0?F=F+this.stride[3]*v|0:(z.push(this.shape[3]),T.push(this.stride[3]));var q=y[z.length+1];return q(this.data,z,T,F)},function(_,C,M,v){return new k(_,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],v)}},5:function(y,E,k){function A(_,C,M,v,z,T,F,q,U,H,j,G){this.data=_,this.shape=[C,M,v,z,T],this.stride=[F,q,U,H,j],this.offset=G|0}var L=A.prototype;return L.dtype=y,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:k}),L.set=function(C,M,v,z,T,F){return y==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T,F):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T]=F},L.get=function(C,M,v,z,T){return y==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T]},L.index=function(C,M,v,z,T){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T},L.hi=function(C,M,v,z,T){return new A(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof v!="number"||v<0?this.shape[2]:v|0,typeof z!="number"||z<0?this.shape[3]:z|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,v,z,T){var F=this.offset,q=0,U=this.shape[0],H=this.shape[1],j=this.shape[2],G=this.shape[3],O=this.shape[4],W=this.stride[0],re=this.stride[1],ne=this.stride[2],be=this.stride[3],ze=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,F+=W*q,U-=q),typeof M=="number"&&M>=0&&(q=M|0,F+=re*q,H-=q),typeof v=="number"&&v>=0&&(q=v|0,F+=ne*q,j-=q),typeof z=="number"&&z>=0&&(q=z|0,F+=be*q,G-=q),typeof T=="number"&&T>=0&&(q=T|0,F+=ze*q,O-=q),new A(this.data,U,H,j,G,O,W,re,ne,be,ze,F)},L.step=function(C,M,v,z,T){var F=this.shape[0],q=this.shape[1],U=this.shape[2],H=this.shape[3],j=this.shape[4],G=this.stride[0],O=this.stride[1],W=this.stride[2],re=this.stride[3],ne=this.stride[4],be=this.offset,ze=0,Ce=Math.ceil;return typeof C=="number"&&(ze=C|0,ze<0?(be+=G*(F-1),F=Ce(-F/ze)):F=Ce(F/ze),G*=ze),typeof M=="number"&&(ze=M|0,ze<0?(be+=O*(q-1),q=Ce(-q/ze)):q=Ce(q/ze),O*=ze),typeof v=="number"&&(ze=v|0,ze<0?(be+=W*(U-1),U=Ce(-U/ze)):U=Ce(U/ze),W*=ze),typeof z=="number"&&(ze=z|0,ze<0?(be+=re*(H-1),H=Ce(-H/ze)):H=Ce(H/ze),re*=ze),typeof T=="number"&&(ze=T|0,ze<0?(be+=ne*(j-1),j=Ce(-j/ze)):j=Ce(j/ze),ne*=ze),new A(this.data,F,q,U,H,j,G,O,W,re,ne,be)},L.transpose=function(C,M,v,z,T){C=C===void 0?0:C|0,M=M===void 0?1:M|0,v=v===void 0?2:v|0,z=z===void 0?3:z|0,T=T===void 0?4:T|0;var F=this.shape,q=this.stride;return new A(this.data,F[C],F[M],F[v],F[z],F[T],q[C],q[M],q[v],q[z],q[T],this.offset)},L.pick=function(C,M,v,z,T){var F=[],q=[],U=this.offset;typeof C=="number"&&C>=0?U=U+this.stride[0]*C|0:(F.push(this.shape[0]),q.push(this.stride[0])),typeof M=="number"&&M>=0?U=U+this.stride[1]*M|0:(F.push(this.shape[1]),q.push(this.stride[1])),typeof v=="number"&&v>=0?U=U+this.stride[2]*v|0:(F.push(this.shape[2]),q.push(this.stride[2])),typeof z=="number"&&z>=0?U=U+this.stride[3]*z|0:(F.push(this.shape[3]),q.push(this.stride[3])),typeof T=="number"&&T>=0?U=U+this.stride[4]*T|0:(F.push(this.shape[4]),q.push(this.stride[4]));var H=E[F.length+1];return H(this.data,F,q,U)},function(C,M,v,z){return new A(C,M[0],M[1],M[2],M[3],M[4],v[0],v[1],v[2],v[3],v[4],z)}}};function h(b,y){var E=y===-1?"T":String(y),k=c[E];return y===-1?k(b):y===0?k(b,p[b][0]):k(b,p[b],f)}function d(b){if(s(b))return"buffer";if(u)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 p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(b,y,E,k){if(b===void 0){var v=p.array[0];return v([])}else typeof b=="number"&&(b=[b]);y===void 0&&(y=[b.length]);var A=y.length;if(E===void 0){E=new Array(A);for(var L=A-1,_=1;L>=0;--L)E[L]=_,_*=y[L]}if(k===void 0){k=0;for(var L=0;L>>0;i.exports=f;function f(c,h){if(isNaN(c)||isNaN(h))return NaN;if(c===h)return c;if(c===0)return h<0?-u:u;var d=s.hi(c),p=s.lo(c);return h>c==c>0?p===l?(d+=1,p=0):p+=1:p===0?(p=l,d-=1):p-=1,s.pack(p,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(u,l,f){for(var c=l.length,h=new Array(c),d=f===void 0?o:f,p=0;pd)for(var F=h[y],q=1/Math.sqrt(M*z),T=0;T<3;++T){var U=(T+1)%3,H=(T+2)%3;F[T]+=q*(v[U]*C[H]-v[H]*C[U])}}for(var p=0;pd)for(var q=1/Math.sqrt(j),T=0;T<3;++T)F[T]*=q;else for(var T=0;T<3;++T)F[T]=0}return h},a.faceNormals=function(u,l,f){for(var c=u.length,h=new Array(c),d=f===void 0?s:f,p=0;pd?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)A[y]*=L;h[p]=A}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,u,l,f,c,h,d,p,x){var b=s+c+x;if(y>0){var y=Math.sqrt(b+1);o[0]=.5*(h-p)/y,o[1]=.5*(d-l)/y,o[2]=.5*(u-c)/y,o[3]=.5*y}else{var E=Math.max(s,c,x),y=Math.sqrt(2*E-b+1);s>=E?(o[0]=.5*y,o[1]=.5*(f+u)/y,o[2]=.5*(d+l)/y,o[3]=.5*(h-p)/y):c>=E?(o[0]=.5*(u+f)/y,o[1]=.5*y,o[2]=.5*(p+h)/y,o[3]=.5*(d-l)/y):(o[0]=.5*(l+d)/y,o[1]=.5*(h+p)/y,o[2]=.5*y,o[3]=.5*(u-f)/y)}return o}},9977:function(i,a,o){"use strict";i.exports=y;var s=o(9215),u=o(6582),l=o(7399),f=o(7608),c=o(4081);function h(E,k,A){return Math.sqrt(Math.pow(E,2)+Math.pow(k,2)+Math.pow(A,2))}function d(E,k,A,L){return Math.sqrt(Math.pow(E,2)+Math.pow(k,2)+Math.pow(A,2)+Math.pow(L,2))}function p(E,k){var A=k[0],L=k[1],_=k[2],C=k[3],M=d(A,L,_,C);M>1e-6?(E[0]=A/M,E[1]=L/M,E[2]=_/M,E[3]=C/M):(E[0]=E[1]=E[2]=0,E[3]=1)}function x(E,k,A){this.radius=s([A]),this.center=s(k),this.rotation=s(E),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=x.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(E){this.radius.curve(E),this.center.curve(E),this.rotation.curve(E);var k=this.computedRotation;p(k,k);var A=this.computedMatrix;l(A,k);var L=this.computedCenter,_=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);_[0]=L[0]+M*A[2],_[1]=L[1]+M*A[6],_[2]=L[2]+M*A[10],C[0]=A[1],C[1]=A[5],C[2]=A[9];for(var v=0;v<3;++v){for(var z=0,T=0;T<3;++T)z+=A[v+4*T]*_[T];A[12+v]=-z}},b.getMatrix=function(E,k){this.recalcMatrix(E);var A=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=A[L];return k}return A},b.idle=function(E){this.center.idle(E),this.radius.idle(E),this.rotation.idle(E)},b.flush=function(E){this.center.flush(E),this.radius.flush(E),this.rotation.flush(E)},b.pan=function(E,k,A,L){k=k||0,A=A||0,L=L||0,this.recalcMatrix(E);var _=this.computedMatrix,C=_[1],M=_[5],v=_[9],z=h(C,M,v);C/=z,M/=z,v/=z;var T=_[0],F=_[4],q=_[8],U=T*C+F*M+q*v;T-=C*U,F-=M*U,q-=v*U;var H=h(T,F,q);T/=H,F/=H,q/=H;var j=_[2],G=_[6],O=_[10],W=j*C+G*M+O*v,re=j*T+G*F+O*q;j-=W*C+re*T,G-=W*M+re*F,O-=W*v+re*q;var ne=h(j,G,O);j/=ne,G/=ne,O/=ne;var be=T*k+C*A,ze=F*k+M*A,Ce=q*k+v*A;this.center.move(E,be,ze,Ce);var he=Math.exp(this.computedRadius[0]);he=Math.max(1e-4,he+L),this.radius.set(E,Math.log(he))},b.rotate=function(E,k,A,L){this.recalcMatrix(E),k=k||0,A=A||0;var _=this.computedMatrix,C=_[0],M=_[4],v=_[8],z=_[1],T=_[5],F=_[9],q=_[2],U=_[6],H=_[10],j=k*C+A*z,G=k*M+A*T,O=k*v+A*F,W=-(U*O-H*G),re=-(H*j-q*O),ne=-(q*G-U*j),be=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(re,2)-Math.pow(ne,2))),ze=d(W,re,ne,be);ze>1e-6?(W/=ze,re/=ze,ne/=ze,be/=ze):(W=re=ne=0,be=1);var Ce=this.computedRotation,he=Ce[0],te=Ce[1],ke=Ce[2],Ee=Ce[3],Me=he*be+Ee*W+te*ne-ke*re,Oe=te*be+Ee*re+ke*W-he*ne,Re=ke*be+Ee*ne+he*re-te*W,me=Ee*be-he*W-te*re-ke*ne;if(L){W=q,re=U,ne=H;var Be=Math.sin(L)/h(W,re,ne);W*=Be,re*=Be,ne*=Be,be=Math.cos(k),Me=Me*be+me*W+Oe*ne-Re*re,Oe=Oe*be+me*re+Re*W-Me*ne,Re=Re*be+me*ne+Me*re-Oe*W,me=me*be-Me*W-Oe*re-Re*ne}var fe=d(Me,Oe,Re,me);fe>1e-6?(Me/=fe,Oe/=fe,Re/=fe,me/=fe):(Me=Oe=Re=0,me=1),this.rotation.set(E,Me,Oe,Re,me)},b.lookAt=function(E,k,A,L){this.recalcMatrix(E),A=A||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var _=this.computedMatrix;u(_,k,A,L);var C=this.computedRotation;c(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),p(C,C),this.rotation.set(E,C[0],C[1],C[2],C[3]);for(var M=0,v=0;v<3;++v)M+=Math.pow(A[v]-k[v],2);this.radius.set(E,.5*Math.log(Math.max(M,1e-6))),this.center.set(E,A[0],A[1],A[2])},b.translate=function(E,k,A,L){this.center.move(E,k||0,A||0,L||0)},b.setMatrix=function(E,k){var A=this.computedRotation;c(A,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),p(A,A),this.rotation.set(E,A[0],A[1],A[2],A[3]);var L=this.computedMatrix;f(L,k);var _=L[15];if(Math.abs(_)>1e-6){var C=L[12]/_,M=L[13]/_,v=L[14]/_;this.recalcMatrix(E);var z=Math.exp(this.computedRadius[0]);this.center.set(E,C-L[2]*z,M-L[6]*z,v-L[10]*z),this.radius.idle(E)}else this.center.idle(E),this.radius.idle(E)},b.setDistance=function(E,k){k>0&&this.radius.set(E,Math.log(k))},b.setDistanceLimits=function(E,k){E>0?E=Math.log(E):E=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,E),this.radius.bounds[0][0]=E,this.radius.bounds[1][0]=k},b.getDistanceLimits=function(E){var k=this.radius.bounds;return E?(E[0]=Math.exp(k[0][0]),E[1]=Math.exp(k[1][0]),E):[Math.exp(k[0][0]),Math.exp(k[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(E){var k=this.lastT(),A=E.center;A&&this.center.set(k,A[0],A[1],A[2]);var L=E.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var _=E.distance;_&&_>0&&this.radius.set(k,Math.log(_)),this.setDistanceLimits(E.zoomMin,E.zoomMax)};function y(E){E=E||{};var k=E.center||[0,0,0],A=E.rotation||[0,0,0,1],L=E.radius||1;k=[].slice.call(k,0,3),A=[].slice.call(A,0,4),p(A,A);var _=new x(A,k,Math.log(L));return _.setDistanceLimits(E.zoomMin,E.zoomMax),("eye"in E||"up"in E)&&_.lookAt(0,E.eye,E.center,E.up),_}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(l,f,c){return c=typeof c!="undefined"?c+"":" ",s(c,f)+l}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var u=parseFloat(o,10);return s[0]=u,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=u;var s=o(3140);function u(l,f){for(var c=f.length|0,h=l.length,d=[new Array(c),new Array(c)],p=0;p0){F=d[H][z][0],U=H;break}q=F[U^1];for(var j=0;j<2;++j)for(var G=d[j][z],O=0;O0&&(F=W,q=re,U=j)}return T||F&&y(F,U),q}function k(v,z){var T=d[z][v][0],F=[v];y(T,z);for(var q=T[z^1],U=z;;){for(;q!==v;)F.push(q),q=E(F[F.length-2],q,!1);if(d[0][v].length+d[1][v].length===0)break;var H=F[F.length-1],j=v,G=F[1],O=E(H,j,!0);if(s(f[H],f[j],f[G],f[O])<0)break;F.push(v),q=E(H,j)}return F}function A(v,z){return z[1]===z[z.length-1]}for(var p=0;p0;){var C=d[0][p].length,M=k(p,L);A(_,M)?_.push.apply(_,M):(_.length>0&&b.push(_),_=M)}_.length>0&&b.push(_)}return b}},5609:function(i,a,o){"use strict";i.exports=u;var s=o(3134);function u(l,f){for(var c=s(l,f.length),h=new Array(f.length),d=new Array(f.length),p=[],x=0;x0;){var y=p.pop();h[y]=!1;for(var E=c[y],x=0;x0}C=C.filter(M);for(var v=C.length,z=new Array(v),T=new Array(v),_=0;_0;){var fe=Re.pop(),Ze=ze[fe];h(Ze,function(Xe,Tt){return Xe-Tt});var et=Ze.length,gt=me[fe],Pt;if(gt===0){var G=C[fe];Pt=[G]}for(var _=0;_=0)&&(me[Qe]=gt^1,Re.push(Qe),gt===0)){var G=C[Qe];Oe(G)||(G.reverse(),Pt.push(G))}}gt===0&&Be.push(Pt)}return Be}},5085:function(i,a,o){i.exports=E;var s=o(3250)[3],u=o(4209),l=o(3352),f=o(2478);function c(){return!0}function h(k){return function(A,L){var _=k[A];return _?!!_.queryPoint(L,c):!1}}function d(k){for(var A={},L=0;L0&&A[_]===L[0])C=k[_-1];else return 1;for(var M=1;C;){var v=C.key,z=s(L,v[0],v[1]);if(v[0][0]0)M=-1,C=C.right;else return 0;else if(z>0)C=C.left;else if(z<0)M=1,C=C.right;else return 0}return M}}function x(k){return 1}function b(k){return function(L){return k(L[0],L[1])?0:1}}function y(k,A){return function(_){return k(_[0],_[1])?0:A(_)}}function E(k){for(var A=k.length,L=[],_=[],C=0,M=0;M=x?(v=1,T=x+2*E+A):(v=-E/x,T=E*v+A)):(v=0,k>=0?(z=0,T=A):-k>=y?(z=1,T=y+2*k+A):(z=-k/y,T=k*z+A));else if(z<0)z=0,E>=0?(v=0,T=A):-E>=x?(v=1,T=x+2*E+A):(v=-E/x,T=E*v+A);else{var F=1/M;v*=F,z*=F,T=v*(x*v+b*z+2*E)+z*(b*v+y*z+2*k)+A}else{var q,U,H,j;v<0?(q=b+E,U=y+k,U>q?(H=U-q,j=x-2*b+y,H>=j?(v=1,z=0,T=x+2*E+A):(v=H/j,z=1-v,T=v*(x*v+b*z+2*E)+z*(b*v+y*z+2*k)+A)):(v=0,U<=0?(z=1,T=y+2*k+A):k>=0?(z=0,T=A):(z=-k/y,T=k*z+A))):z<0?(q=b+k,U=x+E,U>q?(H=U-q,j=x-2*b+y,H>=j?(z=1,v=0,T=y+2*k+A):(z=H/j,v=1-z,T=v*(x*v+b*z+2*E)+z*(b*v+y*z+2*k)+A)):(z=0,U<=0?(v=1,T=x+2*E+A):E>=0?(v=0,T=A):(v=-E/x,T=E*v+A))):(H=y+k-b-E,H<=0?(v=0,z=1,T=y+2*k+A):(j=x-2*b+y,H>=j?(v=1,z=0,T=x+2*E+A):(v=H/j,z=1-v,T=v*(x*v+b*z+2*E)+z*(b*v+y*z+2*k)+A)))}for(var G=1-v-z,p=0;p0){var y=c[d-1];if(s(x,y)===0&&l(y)!==b){d-=1;continue}}c[d++]=x}}return c.length=d,c}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(u,l){if(typeof u!="string")throw new TypeError("expected a string");if(l===1)return u;if(l===2)return u+u;var f=u.length*l;if(o!==u||typeof o=="undefined")o=u,a="";else if(a.length>=f)return a.substr(0,f);for(;f>a.length&&l>1;)l&1&&(a+=u),l>>=1,u+=u;return a+=u,a=a.substr(0,f),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,u=o[o.length-1],l=s,f=s-2;f>=0;--f){var c=u,h=o[f];u=c+h;var d=u-c,p=h-d;p&&(o[--l]=u,u=p)}for(var x=0,f=l;f0){if(U<=0)return H;j=q+U}else if(q<0){if(U>=0)return H;j=-(q+U)}else return H;var G=d*j;return H>=G||H<=-G?H:k(z,T,F)},function(z,T,F,q){var U=z[0]-q[0],H=T[0]-q[0],j=F[0]-q[0],G=z[1]-q[1],O=T[1]-q[1],W=F[1]-q[1],re=z[2]-q[2],ne=T[2]-q[2],be=F[2]-q[2],ze=H*W,Ce=j*O,he=j*G,te=U*W,ke=U*O,Ee=H*G,Me=re*(ze-Ce)+ne*(he-te)+be*(ke-Ee),Oe=(Math.abs(ze)+Math.abs(Ce))*Math.abs(re)+(Math.abs(he)+Math.abs(te))*Math.abs(ne)+(Math.abs(ke)+Math.abs(Ee))*Math.abs(be),Re=p*Oe;return Me>Re||-Me>Re?Me:A(z,T,F,q)}];function _(v){var z=L[v.length];return z||(z=L[v.length]=E(v.length)),z.apply(void 0,v)}function C(v,z,T,F,q,U,H){return function(G,O,W,re,ne){switch(arguments.length){case 0:case 1:return 0;case 2:return F(G,O);case 3:return q(G,O,W);case 4:return U(G,O,W,re);case 5:return H(G,O,W,re,ne)}for(var be=new Array(arguments.length),ze=0;ze0&&x>0||p<0&&x<0)return!1;var b=s(h,f,c),y=s(d,f,c);return b>0&&y>0||b<0&&y<0?!1:p===0&&x===0&&b===0&&y===0?u(f,c,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,u){var l=s+u,f=l-s,c=l-f,h=u-f,d=s-c,p=d+h;return p?[p,l]:[l]}function o(s,u){var l=s.length|0,f=u.length|0;if(l===1&&f===1)return a(s[0],-u[0]);var c=l+f,h=new Array(c),d=0,p=0,x=0,b=Math.abs,y=s[p],E=b(y),k=-u[x],A=b(k),L,_;E=f?(L=y,p+=1,p=f?(L=y,p+=1,p>1,k=c[2*E+1];if(k===x)return E;x>1,k=c[2*E+1];if(k===x)return E;x>1,k=c[2*E+1];if(k===x)return E;x>1,k=c[2*E+1];if(k===x)return E;x>1,j=d(z[H],T);j<=0?(j===0&&(U=H),F=H+1):j>0&&(q=H-1)}return U}s=y;function E(z,T){for(var F=new Array(z.length),q=0,U=F.length;q=z.length||d(z[ze],H)!==0););}return F}s=E;function k(z,T){if(!T)return E(b(L(z,0)),z,0);for(var F=new Array(T),q=0;q>>W&1&&O.push(U[W]);T.push(O)}return x(T)}s=A;function L(z,T){if(T<0)return[];for(var F=[],q=(1<0)-(l<0)},a.abs=function(l){var f=l>>o-1;return(l^f)-f},a.min=function(l,f){return f^(l^f)&-(l65535)<<4,l>>>=f,c=(l>255)<<3,l>>>=c,f|=c,c=(l>15)<<2,l>>>=c,f|=c,c=(l>3)<<1,l>>>=c,f|=c,f|l>>1},a.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},a.popCount=function(l){return l=l-(l>>>1&1431655765),l=(l&858993459)+(l>>>2&858993459),(l+(l>>>4)&252645135)*16843009>>>24};function s(l){var f=32;return l&=-l,l&&f--,l&65535&&(f-=16),l&16711935&&(f-=8),l&252645135&&(f-=4),l&858993459&&(f-=2),l&1431655765&&(f-=1),f}a.countTrailingZeros=s,a.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1},a.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l-(l>>>1)},a.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,l&=15,27030>>>l&1};var u=new Array(256);(function(l){for(var f=0;f<256;++f){var c=f,h=f,d=7;for(c>>>=1;c;c>>>=1)h<<=1,h|=c&1,--d;l[f]=h<>>8&255]<<16|u[l>>>16&255]<<8|u[l>>>24&255]},a.interleave2=function(l,f){return l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,l|f<<1},a.deinterleave2=function(l,f){return l=l>>>f&1431655765,l=(l|l>>>1)&858993459,l=(l|l>>>2)&252645135,l=(l|l>>>4)&16711935,l=(l|l>>>16)&65535,l<<16>>16},a.interleave3=function(l,f,c){return l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,l|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,l|c<<2},a.deinterleave3=function(l,f){return l=l>>>f&1227133513,l=(l|l>>>2)&3272356035,l=(l|l>>>4)&251719695,l=(l|l>>>8)&4278190335,l=(l|l>>>16)&1023,l<<22>>22},a.nextCombination=function(l){var f=l|l-1;return f+1|(~f&-~f)-1>>>s(l)+1}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),u=o(4623);function l(v){for(var z=0,T=Math.max,F=0,q=v.length;F>1,H=h(v[U],z);H<=0?(H===0&&(q=U),T=U+1):H>0&&(F=U-1)}return q}a.findCell=b;function y(v,z){for(var T=new Array(v.length),F=0,q=T.length;F=v.length||h(v[be],U)!==0););}return T}a.incidence=y;function E(v,z){if(!z)return y(x(A(v,0)),v,0);for(var T=new Array(z),F=0;F>>O&1&&G.push(q[O]);z.push(G)}return p(z)}a.explode=k;function A(v,z){if(z<0)return[];for(var T=[],F=(1<>1:(te>>1)-1}function F(te){for(var ke=z(te);;){var Ee=ke,Me=2*te+1,Oe=2*(te+1),Re=te;if(Me0;){var Ee=T(te);if(Ee>=0){var Me=z(Ee);if(ke0){var te=G[0];return v(0,re-1),re-=1,F(0),te}return-1}function H(te,ke){var Ee=G[te];return E[Ee]===ke?te:(E[Ee]=-1/0,q(te),U(),E[Ee]=ke,re+=1,q(re-1))}function j(te){if(!k[te]){k[te]=!0;var ke=b[te],Ee=y[te];b[Ee]>=0&&(b[Ee]=ke),y[ke]>=0&&(y[ke]=Ee),O[ke]>=0&&H(O[ke],M(ke)),O[Ee]>=0&&H(O[Ee],M(Ee))}}for(var G=[],O=new Array(p),A=0;A>1;A>=0;--A)F(A);for(;;){var ne=U();if(ne<0||E[ne]>d)break;j(ne)}for(var be=[],A=0;A=0&&Ee>=0&&ke!==Ee){var Me=O[ke],Oe=O[Ee];Me!==Oe&&he.push([Me,Oe])}}),u.unique(u.normalize(he)),{positions:be,edges:he}}},1303:function(i,a,o){"use strict";i.exports=l;var s=o(3250);function u(f,c){var h,d;if(c[0][0]c[1][0])h=c[1],d=c[0];else{var p=Math.min(f[0][1],f[1][1]),x=Math.max(f[0][1],f[1][1]),b=Math.min(c[0][1],c[1][1]),y=Math.max(c[0][1],c[1][1]);return xy?p-y:x-y}var E,k;f[0][1]c[1][0])h=c[1],d=c[0];else return u(c,f);var p,x;if(f[0][0]f[1][0])p=f[1],x=f[0];else return-u(f,c);var b=s(h,d,x),y=s(h,d,p);if(b<0){if(y<=0)return b}else if(b>0){if(y>=0)return b}else if(y)return y;if(b=s(x,p,d),y=s(x,p,h),b<0){if(y<=0)return b}else if(b>0){if(y>=0)return b}else if(y)return y;return d[0]-x[0]}},4209:function(i,a,o){"use strict";i.exports=y;var s=o(2478),u=o(3840),l=o(3250),f=o(1303);function c(E,k,A){this.slabs=E,this.coordinates=k,this.horizontal=A}var h=c.prototype;function d(E,k){return E.y-k}function p(E,k){for(var A=null;E;){var L=E.key,_,C;L[0][0]0)if(k[0]!==L[1][0])A=E,E=E.right;else{var v=p(E.right,k);if(v)return v;E=E.left}else{if(k[0]!==L[1][0])return E;var v=p(E.right,k);if(v)return v;E=E.left}}return A}h.castUp=function(E){var k=s.le(this.coordinates,E[0]);if(k<0)return-1;var A=this.slabs[k],L=p(this.slabs[k],E),_=-1;if(L&&(_=L.value),this.coordinates[k]===E[0]){var C=null;if(L&&(C=L.key),k>0){var M=p(this.slabs[k-1],E);M&&(C?f(M.key,C)>0&&(C=M.key,_=M.value):(_=M.value,C=M.key))}var v=this.horizontal[k];if(v.length>0){var z=s.ge(v,E[1],d);if(z=v.length)return _;T=v[z]}}if(T.start)if(C){var F=l(C[0],C[1],[E[0],T.y]);C[0][0]>C[1][0]&&(F=-F),F>0&&(_=T.index)}else _=T.index;else T.y!==E[1]&&(_=T.index)}}}return _};function x(E,k,A,L){this.y=E,this.index=k,this.start=A,this.closed=L}function b(E,k,A,L){this.x=E,this.segment=k,this.create=A,this.index=L}function y(E){for(var k=E.length,A=2*k,L=new Array(A),_=0;_1&&(k=1);for(var A=1-k,L=p.length,_=new Array(L),C=0;C0||E>0&&_<0){var C=f(k,_,A,E);b.push(C),y.push(C.slice())}_<0?y.push(A.slice()):_>0?b.push(A.slice()):(b.push(A.slice()),y.push(A.slice())),E=_}return{positive:b,negative:y}}function h(p,x){for(var b=[],y=l(p[p.length-1],x),E=p[p.length-1],k=p[0],A=0;A0||y>0&&L<0)&&b.push(f(E,L,k,y)),L>=0&&b.push(k.slice()),y=L}return b}function d(p,x){for(var b=[],y=l(p[p.length-1],x),E=p[p.length-1],k=p[0],A=0;A0||y>0&&L<0)&&b.push(f(E,L,k,y)),L<=0&&b.push(k.slice()),y=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var u={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(p){return c(d(p),arguments)}function f(p,x){return l.apply(null,[p].concat(x||[]))}function c(p,x){var b=1,y=p.length,E,k="",A,L,_,C,M,v,z,T;for(A=0;A=0),_.type){case"b":E=parseInt(E,10).toString(2);break;case"c":E=String.fromCharCode(parseInt(E,10));break;case"d":case"i":E=parseInt(E,10);break;case"j":E=JSON.stringify(E,null,_.width?parseInt(_.width):0);break;case"e":E=_.precision?parseFloat(E).toExponential(_.precision):parseFloat(E).toExponential();break;case"f":E=_.precision?parseFloat(E).toFixed(_.precision):parseFloat(E);break;case"g":E=_.precision?String(Number(E.toPrecision(_.precision))):parseFloat(E);break;case"o":E=(parseInt(E,10)>>>0).toString(8);break;case"s":E=String(E),E=_.precision?E.substring(0,_.precision):E;break;case"t":E=String(!!E),E=_.precision?E.substring(0,_.precision):E;break;case"T":E=Object.prototype.toString.call(E).slice(8,-1).toLowerCase(),E=_.precision?E.substring(0,_.precision):E;break;case"u":E=parseInt(E,10)>>>0;break;case"v":E=E.valueOf(),E=_.precision?E.substring(0,_.precision):E;break;case"x":E=(parseInt(E,10)>>>0).toString(16);break;case"X":E=(parseInt(E,10)>>>0).toString(16).toUpperCase();break}u.json.test(_.type)?k+=E:(u.number.test(_.type)&&(!z||_.sign)?(T=z?"+":"-",E=E.toString().replace(u.sign,"")):T="",M=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",v=_.width-(T+E).length,C=_.width&&v>0?M.repeat(v):"",k+=_.align?T+E+C:M==="0"?T+C+E:C+T+E)}return k}var h=Object.create(null);function d(p){if(h[p])return h[p];for(var x=p,b,y=[],E=0;x;){if((b=u.text.exec(x))!==null)y.push(b[0]);else if((b=u.modulo.exec(x))!==null)y.push("%");else if((b=u.placeholder.exec(x))!==null){if(b[2]){E|=1;var k=[],A=b[2],L=[];if((L=u.key.exec(A))!==null)for(k.push(L[1]);(A=A.substring(L[0].length))!=="";)if((L=u.key_access.exec(A))!==null)k.push(L[1]);else if((L=u.index_access.exec(A))!==null)k.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]=k}else E|=2;if(E===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.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");x=x.substring(b[0].length)}return h[p]=y}a.sprintf=l,a.vsprintf=f,typeof window!="undefined"&&(window.sprintf=l,window.vsprintf=f,s=function(){return{sprintf:l,vsprintf:f}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),u=o(781),l={"2d":function(p,x,b){var y=p({order:x,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(k,A,L,_){return k>_|0},vertex:function(k,A,L,_,C,M,v,z,T,F,q,U,H){var j=(v<<0)+(z<<1)+(T<<2)+(F<<3)|0;if(!(j===0||j===15))switch(j){case 0:q.push([k-.5,A-.5]);break;case 1:q.push([k-.25-.25*(_+L-2*H)/(L-_),A-.25-.25*(C+L-2*H)/(L-C)]);break;case 2:q.push([k-.75-.25*(-_-L+2*H)/(_-L),A-.25-.25*(M+_-2*H)/(_-M)]);break;case 3:q.push([k-.5,A-.5-.5*(C+L+M+_-4*H)/(L-C+_-M)]);break;case 4:q.push([k-.25-.25*(M+C-2*H)/(C-M),A-.75-.25*(-C-L+2*H)/(C-L)]);break;case 5:q.push([k-.5-.5*(_+L+M+C-4*H)/(L-_+C-M),A-.5]);break;case 6:q.push([k-.5-.25*(-_-L+M+C)/(_-L+C-M),A-.5-.25*(-C-L+M+_)/(C-L+_-M)]);break;case 7:q.push([k-.75-.25*(M+C-2*H)/(C-M),A-.75-.25*(M+_-2*H)/(_-M)]);break;case 8:q.push([k-.75-.25*(-M-C+2*H)/(M-C),A-.75-.25*(-M-_+2*H)/(M-_)]);break;case 9:q.push([k-.5-.25*(_+L+-M-C)/(L-_+M-C),A-.5-.25*(C+L+-M-_)/(L-C+M-_)]);break;case 10:q.push([k-.5-.5*(-_-L+-M-C+4*H)/(_-L+M-C),A-.5]);break;case 11:q.push([k-.25-.25*(-M-C+2*H)/(M-C),A-.75-.25*(C+L-2*H)/(L-C)]);break;case 12:q.push([k-.5,A-.5-.5*(-C-L+-M-_+4*H)/(C-L+M-_)]);break;case 13:q.push([k-.75-.25*(_+L-2*H)/(L-_),A-.25-.25*(-M-_+2*H)/(M-_)]);break;case 14:q.push([k-.25-.25*(-_-L+2*H)/(_-L),A-.25-.25*(-C-L+2*H)/(C-L)]);break;case 15:q.push([k-.5,A-.5]);break}},cell:function(k,A,L,_,C,M,v,z,T){C?z.push([k,A]):z.push([A,k])}});return function(E,k){var A=[],L=[];return y(E,A,L,k),{positions:A,cells:L}}}};function f(p,x){var b=p.length+"d",y=l[b];if(y)return y(s,p,x)}function c(p,x){for(var b=u(p,x),y=b.length,E=new Array(y),k=new Array(y),A=0;AMath.max(_,C)?M[2]=1:_>Math.max(L,C)?M[0]=1:M[1]=1;for(var v=0,z=0,T=0;T<3;++T)v+=A[T]*A[T],z+=M[T]*A[T];for(var T=0;T<3;++T)M[T]-=z/v*A[T];return c(M,M),M}function b(A,L,_,C,M,v,z,T){this.center=s(_),this.up=s(C),this.right=s(M),this.radius=s([v]),this.angle=s([z,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var y=b.prototype;y.setDistanceLimits=function(A,L){A>0?A=Math.log(A):A=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(A){var L=this.radius.bounds[0];return A?(A[0]=Math.exp(L[0][0]),A[1]=Math.exp(L[1][0]),A):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var L=this.computedUp,_=this.computedRight,C=0,M=0,v=0;v<3;++v)M+=L[v]*_[v],C+=L[v]*L[v];for(var z=Math.sqrt(C),T=0,v=0;v<3;++v)_[v]-=L[v]*M/C,T+=_[v]*_[v],L[v]/=z;for(var F=Math.sqrt(T),v=0;v<3;++v)_[v]/=F;var q=this.computedToward;f(q,L,_),c(q,q);for(var U=Math.exp(this.computedRadius[0]),H=this.computedAngle[0],j=this.computedAngle[1],G=Math.cos(H),O=Math.sin(H),W=Math.cos(j),re=Math.sin(j),ne=this.computedCenter,be=G*W,ze=O*W,Ce=re,he=-G*re,te=-O*re,ke=W,Ee=this.computedEye,Me=this.computedMatrix,v=0;v<3;++v){var Oe=be*_[v]+ze*q[v]+Ce*L[v];Me[4*v+1]=he*_[v]+te*q[v]+ke*L[v],Me[4*v+2]=Oe,Me[4*v+3]=0}var Re=Me[1],me=Me[5],Be=Me[9],fe=Me[2],Ze=Me[6],et=Me[10],gt=me*et-Be*Ze,Pt=Be*fe-Re*et,Qe=Re*Ze-me*fe,Xe=d(gt,Pt,Qe);gt/=Xe,Pt/=Xe,Qe/=Xe,Me[0]=gt,Me[4]=Pt,Me[8]=Qe;for(var v=0;v<3;++v)Ee[v]=ne[v]+Me[2+4*v]*U;for(var v=0;v<3;++v){for(var T=0,Tt=0;Tt<3;++Tt)T+=Me[v+4*Tt]*Ee[Tt];Me[12+v]=-T}Me[15]=1},y.getMatrix=function(A,L){this.recalcMatrix(A);var _=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=_[C];return L}return _};var E=[0,0,0];y.rotate=function(A,L,_,C){if(this.angle.move(A,L,_),C){this.recalcMatrix(A);var M=this.computedMatrix;E[0]=M[2],E[1]=M[6],E[2]=M[10];for(var v=this.computedUp,z=this.computedRight,T=this.computedToward,F=0;F<3;++F)M[4*F]=v[F],M[4*F+1]=z[F],M[4*F+2]=T[F];l(M,M,C,E);for(var F=0;F<3;++F)v[F]=M[4*F],z[F]=M[4*F+1];this.up.set(A,v[0],v[1],v[2]),this.right.set(A,z[0],z[1],z[2])}},y.pan=function(A,L,_,C){L=L||0,_=_||0,C=C||0,this.recalcMatrix(A);var M=this.computedMatrix,v=Math.exp(this.computedRadius[0]),z=M[1],T=M[5],F=M[9],q=d(z,T,F);z/=q,T/=q,F/=q;var U=M[0],H=M[4],j=M[8],G=U*z+H*T+j*F;U-=z*G,H-=T*G,j-=F*G;var O=d(U,H,j);U/=O,H/=O,j/=O;var W=U*L+z*_,re=H*L+T*_,ne=j*L+F*_;this.center.move(A,W,re,ne);var be=Math.exp(this.computedRadius[0]);be=Math.max(1e-4,be+C),this.radius.set(A,Math.log(be))},y.translate=function(A,L,_,C){this.center.move(A,L||0,_||0,C||0)},y.setMatrix=function(A,L,_,C){var M=1;typeof _=="number"&&(M=_|0),(M<0||M>3)&&(M=1);var v=(M+2)%3,z=(M+1)%3;L||(this.recalcMatrix(A),L=this.computedMatrix);var T=L[M],F=L[M+4],q=L[M+8];if(C){var H=Math.abs(T),j=Math.abs(F),G=Math.abs(q),O=Math.max(H,j,G);H===O?(T=T<0?-1:1,F=q=0):G===O?(q=q<0?-1:1,T=F=0):(F=F<0?-1:1,T=q=0)}else{var U=d(T,F,q);T/=U,F/=U,q/=U}var W=L[v],re=L[v+4],ne=L[v+8],be=W*T+re*F+ne*q;W-=T*be,re-=F*be,ne-=q*be;var ze=d(W,re,ne);W/=ze,re/=ze,ne/=ze;var Ce=F*ne-q*re,he=q*W-T*ne,te=T*re-F*W,ke=d(Ce,he,te);Ce/=ke,he/=ke,te/=ke,this.center.jump(A,At,Te,nt),this.radius.idle(A),this.up.jump(A,T,F,q),this.right.jump(A,W,re,ne);var Ee,Me;if(M===2){var Oe=L[1],Re=L[5],me=L[9],Be=Oe*W+Re*re+me*ne,fe=Oe*Ce+Re*he+me*te;Pt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Me=Math.atan2(fe,Be)}else{var Ze=L[2],et=L[6],gt=L[10],Pt=Ze*T+et*F+gt*q,Qe=Ze*W+et*re+gt*ne,Xe=Ze*Ce+et*he+gt*te;Ee=Math.asin(p(Pt)),Me=Math.atan2(Xe,Qe)}this.angle.jump(A,Me,Ee),this.recalcMatrix(A);var Tt=L[2],xt=L[6],_t=L[10],Ct=this.computedMatrix;u(Ct,L);var jt=Ct[15],At=Ct[12]/jt,Te=Ct[13]/jt,nt=Ct[14]/jt,ut=Math.exp(this.computedRadius[0]);this.center.jump(A,At-Tt*ut,Te-xt*ut,nt-_t*ut)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},y.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},y.setDistance=function(A,L){L>0&&this.radius.set(A,Math.log(L))},y.lookAt=function(A,L,_,C){this.recalcMatrix(A),L=L||this.computedEye,_=_||this.computedCenter,C=C||this.computedUp;var M=C[0],v=C[1],z=C[2],T=d(M,v,z);if(!(T<1e-6)){M/=T,v/=T,z/=T;var F=L[0]-_[0],q=L[1]-_[1],U=L[2]-_[2],H=d(F,q,U);if(!(H<1e-6)){F/=H,q/=H,U/=H;var j=this.computedRight,G=j[0],O=j[1],W=j[2],re=M*G+v*O+z*W;G-=re*M,O-=re*v,W-=re*z;var ne=d(G,O,W);if(!(ne<.01&&(G=v*U-z*q,O=z*F-M*U,W=M*q-v*F,ne=d(G,O,W),ne<1e-6))){G/=ne,O/=ne,W/=ne,this.up.set(A,M,v,z),this.right.set(A,G,O,W),this.center.set(A,_[0],_[1],_[2]),this.radius.set(A,Math.log(H));var be=v*W-z*O,ze=z*G-M*W,Ce=M*O-v*G,he=d(be,ze,Ce);be/=he,ze/=he,Ce/=he;var te=M*F+v*q+z*U,ke=G*F+O*q+W*U,Ee=be*F+ze*q+Ce*U,Me=Math.asin(p(te)),Oe=Math.atan2(Ee,ke),Re=this.angle._state,me=Re[Re.length-1],Be=Re[Re.length-2];me=me%(2*Math.PI);var fe=Math.abs(me+2*Math.PI-Oe),Ze=Math.abs(me-Oe),et=Math.abs(me-2*Math.PI-Oe);fe0?W.pop():new ArrayBuffer(G)}a.mallocArrayBuffer=E;function k(j){return new Uint8Array(E(j),0,j)}a.mallocUint8=k;function A(j){return new Uint16Array(E(2*j),0,j)}a.mallocUint16=A;function L(j){return new Uint32Array(E(4*j),0,j)}a.mallocUint32=L;function _(j){return new Int8Array(E(j),0,j)}a.mallocInt8=_;function C(j){return new Int16Array(E(2*j),0,j)}a.mallocInt16=C;function M(j){return new Int32Array(E(4*j),0,j)}a.mallocInt32=M;function v(j){return new Float32Array(E(4*j),0,j)}a.mallocFloat32=a.mallocFloat=v;function z(j){return new Float64Array(E(8*j),0,j)}a.mallocFloat64=a.mallocDouble=z;function T(j){return f?new Uint8ClampedArray(E(j),0,j):k(j)}a.mallocUint8Clamped=T;function F(j){return c?new BigUint64Array(E(8*j),0,j):null}a.mallocBigUint64=F;function q(j){return h?new BigInt64Array(E(8*j),0,j):null}a.mallocBigInt64=q;function U(j){return new DataView(E(j),0,j)}a.mallocDataView=U;function H(j){j=s.nextPow2(j);var G=s.log2(j),O=x[G];return O.length>0?O.pop():new l(j)}a.mallocBuffer=H,a.clearCache=function(){for(var G=0;G<32;++G)d.UINT8[G].length=0,d.UINT16[G].length=0,d.UINT32[G].length=0,d.INT8[G].length=0,d.INT16[G].length=0,d.INT32[G].length=0,d.FLOAT[G].length=0,d.DOUBLE[G].length=0,d.BIGUINT64[G].length=0,d.BIGINT64[G].length=0,d.UINT8C[G].length=0,p[G].length=0,x[G].length=0}},1755:function(i){"use strict";"use restrict";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var u=0;u",W="",re=O.length,ne=W.length,be=H[0]===E||H[0]===L,ze=0,Ce=-ne;ze>-1&&(ze=j.indexOf(O,ze),!(ze===-1||(Ce=j.indexOf(W,ze+re),Ce===-1)||Ce<=ze));){for(var he=ze;he=Ce)G[he]=null,j=j.substr(0,he)+" "+j.substr(he+1);else if(G[he]!==null){var te=G[he].indexOf(H[0]);te===-1?G[he]+=H:be&&(G[he]=G[he].substr(0,te+1)+(1+parseInt(G[he][te+1]))+G[he].substr(te+2))}var ke=ze+re,Ee=j.substr(ke,Ce-ke),Me=Ee.indexOf(O);Me!==-1?ze=Me:ze=Ce+ne}return G}function M(U,H,j){for(var G=H.textAlign||"start",O=H.textBaseline||"alphabetic",W=[1<<30,1<<30],re=[0,0],ne=U.length,be=0;be/g,` -`):j=j.replace(/\/g," ");var re="",ne=[];for(me=0;me-1?parseInt(Te[1+ct]):0,tt=rt>-1?parseInt(nt[1+rt]):0;je!==tt&&(ut=ut.replace(Qe(),"?px "),Ze*=Math.pow(.75,tt-je),ut=ut.replace("?px ",Qe())),fe+=.25*te*(tt-je)}if(W.superscripts===!0){var Je=Te.indexOf(E),Mt=nt.indexOf(E),Vt=Je>-1?parseInt(Te[1+Je]):0,Kt=Mt>-1?parseInt(nt[1+Mt]):0;Vt!==Kt&&(ut=ut.replace(Qe(),"?px "),Ze*=Math.pow(.75,Kt-Vt),ut=ut.replace("?px ",Qe())),fe-=.25*te*(Kt-Vt)}if(W.bolds===!0){var ir=Te.indexOf(p)>-1,fr=nt.indexOf(p)>-1;!ir&&fr&&(Ot?ut=ut.replace("italic ","italic bold "):ut="bold "+ut),ir&&!fr&&(ut=ut.replace("bold ",""))}if(W.italics===!0){var Ot=Te.indexOf(b)>-1,De=nt.indexOf(b)>-1;!Ot&&De&&(ut="italic "+ut),Ot&&!De&&(ut=ut.replace("italic ",""))}H.font=ut}for(Re=0;Re0&&(O=G.size),G.lineSpacing&&G.lineSpacing>0&&(W=G.lineSpacing),G.styletags&&G.styletags.breaklines&&(re.breaklines=!!G.styletags.breaklines),G.styletags&&G.styletags.bolds&&(re.bolds=!!G.styletags.bolds),G.styletags&&G.styletags.italics&&(re.italics=!!G.styletags.italics),G.styletags&&G.styletags.subscripts&&(re.subscripts=!!G.styletags.subscripts),G.styletags&&G.styletags.superscripts&&(re.superscripts=!!G.styletags.superscripts)),j.font=[G.fontStyle,G.fontVariant,G.fontWeight,O+"px",G.font].filter(function(be){return be}).join(" "),j.textAlign="start",j.textBaseline="alphabetic",j.direction="ltr";var ne=v(H,j,U,O,W,re);return F(ne,G,O)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(T){T.permitHostObjects___&&T.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var l=new u,f=Object.freeze({});if(l.set(f,1),l.get(f)!==1)s=!0;else{i.exports=WeakMap;return}}}var c=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,p=Object.isExtensible,x="weakmap:",b=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),E=new Uint8Array(y);crypto.getRandomValues(E),b=x+"rand:"+Array.prototype.map.call(E,function(T){return(T%36).toString(36)}).join("")+"___"}function k(T){return!(T.substr(0,x.length)==x&&T.substr(T.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(F){return h(F).filter(k)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(F){return A(F).filter(k)}})}function L(T){if(T!==Object(T))throw new TypeError("Not an object: "+T);var F=T[b];if(F&&F.key===T)return F;if(p(T)){F={key:T};try{return d(T,b,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch(q){return}}}(function(){var T=Object.freeze;d(Object,"freeze",{value:function(H){return L(H),T(H)}});var F=Object.seal;d(Object,"seal",{value:function(H){return L(H),F(H)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(H){return L(H),q(H)}})})();function _(T){return T.prototype=null,Object.freeze(T)}var C=!1;function M(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var v=0,z=function(){this instanceof z||M();var T=[],F=[],q=v++;function U(O,W){var re,ne=L(O);return ne?q in ne?ne[q]:W:(re=T.indexOf(O),re>=0?F[re]:W)}function H(O){var W=L(O);return W?q in W:T.indexOf(O)>=0}function j(O,W){var re,ne=L(O);return ne?ne[q]=W:(re=T.indexOf(O),re>=0?F[re]=W:(re=T.length,F[re]=W,T[re]=O)),this}function G(O){var W=L(O),re,ne;return W?q in W&&delete W[q]:(re=T.indexOf(O),re<0?!1:(ne=T.length-1,T[re]=void 0,F[re]=F[ne],T[re]=T[ne],T.length=ne,F.length=ne,!0))}return Object.create(z.prototype,{get___:{value:_(U)},has___:{value:_(H)},set___:{value:_(j)},delete___:{value:_(G)}})};z.prototype=Object.create(Object.prototype,{get:{value:function(F,q){return this.get___(F,q)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,q){return this.set___(F,q)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof u=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function T(){this instanceof z||M();var F=new u,q=void 0,U=!1;function H(W,re){return q?F.has(W)?F.get(W):q.get___(W,re):F.get(W,re)}function j(W){return F.has(W)||(q?q.has___(W):!1)}var G;s?G=function(W,re){return F.set(W,re),F.has(W)||(q||(q=new z),q.set(W,re)),this}:G=function(W,re){if(U)try{F.set(W,re)}catch(ne){q||(q=new z),q.set___(W,re)}else F.set(W,re);return this};function O(W){var re=!!F.delete(W);return q&&q.delete___(W)||re}return Object.create(z.prototype,{get___:{value:_(H)},has___:{value:_(j)},set___:{value:_(G)},delete___:{value:_(O)},permitHostObjects___:{value:_(function(W){if(W===o)U=!0;else throw new Error("bogus call to permitHostObjects___")})}})}T.prototype=z.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=z)})()},236:function(i,a,o){var s=o(8284);i.exports=u;function u(){var l={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(l);return c&&c.identity===l?c:s(f,l)}}},8284:function(i){i.exports=a;function a(o,s){var u={identity:s},l=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(f){return f!==s?l.apply(this,arguments):u},writable:!0}),u}},606:function(i,a,o){var s=o(236);i.exports=u;function u(){var l=s();return{get:function(f,c){var h=l(f);return h.hasOwnProperty("value")?h.value:c},set:function(f,c){return l(f).value=c,this},has:function(f){return"value"in l(f)},delete:function(f){return delete l(f).value}}}},3349:function(i){"use strict";function a(){return function(c,h,d,p,x,b){var y=c[0],E=d[0],k=[0],A=E;p|=0;var L=0,_=E;for(L=0;L=0!=M>=0&&x.push(k[0]+.5+.5*(C+M)/(C-M))}p+=_,++k[0]}}}function o(){return a()}var s=o;function u(c){var h={};return function(p,x,b){var y=p.dtype,E=p.order,k=[y,E.join()].join(),A=h[k];return A||(h[k]=A=c([y,E])),A(p.shape.slice(0),p.data,p.stride,p.offset|0,x,b)}}function l(c){return u(s.bind(void 0,c))}function f(c){return l({funcName:c.funcName})}i.exports=f({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=u;var s=o(3349);function u(l,f){var c=[];return f=+f||0,s(l.hi(l.shape[0]-1),c,f),c}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);gze.exports=n})()});var xze=Se((_vr,_ze)=>{"use strict";_ze.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 Aze=Se((xvr,Tze)=>{"use strict";var bze=xze();Tze.exports=Ozt;var wze={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Ozt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),bze[e])r=bze[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 u=t[1],l=u==="rgb",a=u.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(wze[h]!==void 0)return wze[h]}return parseFloat(h)}),u===a&&r.push(1),n=l||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(f){return parseFloat(f)}),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 Mze=Se((bvr,Sze)=>{"use strict";Sze.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var kze=Se((wvr,Eze)=>{"use strict";var Nzt=Mze();Eze.exports={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,u;if(r===0)return u=n*255,[u,u,u];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,s=[0,0,0];for(var l=0;l<3;l++)o=t+1/3*-(l-1),o<0?o++:o>1&&o--,6*o<1?u=i+(a-i)*6*o:2*o<1?u=a:3*o<2?u=i+(a-i)*(2/3-o)*6:u=i,s[l]=u*255;return s}};Nzt.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,u,l;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),l=(i+a)/2,a===i?u=0:l<=.5?u=o/(a+i):u=o/(2-a-i),[s,u*100,l*100]}});var BA=Se((Tvr,Cze)=>{Cze.exports=Uzt;function Uzt(e,t,r){return tr?r:e:et?t:e}});var hZ=Se((Avr,Lze)=>{"use strict";var Vzt=Aze(),Hzt=kze(),VR=BA();Lze.exports=function(t){var r,n,i,a=Vzt(t);return a.space?(r=Array(3),r[0]=VR(a.values[0],0,255),r[1]=VR(a.values[1],0,255),r[2]=VR(a.values[2],0,255),a.space[0]==="h"&&(r=Hzt.rgb(r)),r.push(VR(a.alpha,0,1)),r):[]}});var HR=Se((Svr,zze)=>{zze.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_=Se((Mvr,Pze)=>{"use strict";var Gzt=hZ(),GR=BA(),Wzt=HR();Pze.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=Wzt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=Gzt(t),t[0]/=255,t[1]/=255,t[2]/=255),jzt(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]=GR(Math.floor(t[0]*255),0,255),i[1]=GR(Math.floor(t[1]*255),0,255),i[2]=GR(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:GR(Math.floor(t[3]*255),0,255)),i)};function jzt(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 Jg=Se((Evr,Ize)=>{"use strict";var Zzt=J_();function Xzt(e){return e?Zzt(e):[0,0,0,1]}Ize.exports=Xzt});var $g=Se((kvr,Nze)=>{"use strict";var Bze=_u(),Yzt=cd(),WR=J_(),jR=fc(),Kzt=Ih().defaultLine,Dze=yp().isArrayOrTypedArray,dZ=WR(Kzt),Oze=1;function Rze(e,t){var r=e;return r[3]*=t,r}function Fze(e){if(Bze(e))return dZ;var t=WR(e);return t.length?t:dZ}function qze(e){return Bze(e)?e:Oze}function Jzt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=Dze(n),a=Dze(t),o=jR.extractOpts(e),s=[],u,l,f,c,h;if(o.colorscale!==void 0?u=jR.makeColorScaleFuncFromTrace(e):u=Fze,i?l=function(p,x){return p[x]===void 0?dZ:WR(u(p[x]))}:l=Fze,a?f=function(p,x){return p[x]===void 0?Oze:qze(p[x])}:f=qze,i||a)for(var d=0;d{"use strict";Uze.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 ZR=Se((Lvr,Vze)=>{"use strict";Vze.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var Gze=Se((zvr,Hze)=>{"use strict";var Qzt=Ul();function vZ(e,t,r,n){if(!t||!t.visible)return null;for(var i=Qzt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var c=n.c2l(l);n._lowerLogErrorBound||(n._lowerLogErrorBound=c),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,c)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function ePt(e){for(var t=0;t{"use strict";var rPt=Od().gl_line3d,Wze=Od().gl_scatter3d,iPt=Od().gl_error3d,nPt=Od().gl_mesh3d,aPt=Od().delaunay_triangulate,Qg=Zr(),Kze=Jg(),XR=$g().formatColor,oPt=S3(),yZ=pZ(),sPt=ZR(),lPt=hu(),uPt=rv().appendArrayPointValue,fPt=Gze();function Jze(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 gZ=Jze.prototype;gZ.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&&(Qg.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 cPt(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 Zze(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function dPt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var l=cPt(s.position,s.delaunayColor,s.delaunayAxis);l.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(l):(l.gl=t,this.delaunayMesh=nPt(l),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)};gZ.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 mPt(e,t){var r=new Jze(e,t.uid);return r.update(t),r}$ze.exports=mPt});var TZ=Se((Ivr,rPe)=>{"use strict";var e1=Zc(),gPt=uc(),wZ=Xf(),_Z=Gc().axisHoverFormat,_Pt=Du().hovertemplateAttrs,xPt=Du().texttemplateAttrs,ePe=zf(),bPt=pZ(),wPt=ZR(),Yy=vu().extendFlat,TPt=_c().overrideAll,tPe=X1(),APt=e1.line,N2=e1.marker,SPt=N2.line,MPt=Yy({width:APt.width,dash:{valType:"enumerated",values:tPe(bPt),dflt:"solid"}},wZ("line"));function xZ(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 bZ=rPe.exports=TPt({x:e1.x,y:e1.y,z:{valType:"data_array"},text:Yy({},e1.text,{}),texttemplate:xPt({},{}),hovertext:Yy({},e1.hovertext,{}),hovertemplate:_Pt(),xhoverformat:_Z("x"),yhoverformat:_Z("y"),zhoverformat:_Z("z"),mode:Yy({},e1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:xZ("x"),y:xZ("y"),z:xZ("z")},connectgaps:e1.connectgaps,line:MPt,marker:Yy({symbol:{valType:"enumerated",values:tPe(wPt),dflt:"circle",arrayOk:!0},size:Yy({},N2.size,{dflt:8}),sizeref:N2.sizeref,sizemin:N2.sizemin,sizemode:N2.sizemode,opacity:Yy({},N2.opacity,{arrayOk:!1}),colorbar:N2.colorbar,line:Yy({width:Yy({},SPt.width,{arrayOk:!1})},wZ("marker.line"))},wZ("marker")),textposition:Yy({},e1.textposition,{dflt:"top center"}),textfont:gPt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:ePe.opacity,hoverinfo:Yy({},ePe.hoverinfo)},"calc","nested");bZ.x.editType=bZ.y.editType=bZ.z.editType="calc+clearAxisTypes"});var aPe=Se((Dvr,nPe)=>{"use strict";var iPe=Ul(),EPt=Zr(),AZ=ec(),kPt=$v(),CPt=I0(),LPt=D0(),zPt=TZ();nPe.exports=function(t,r,n,i){function a(d,p){return EPt.coerce(t,r,zPt,d,p)}var o=PPt(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),AZ.hasMarkers(r)&&kPt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),AZ.hasLines(r)&&(a("connectgaps"),CPt(t,r,n,i,a)),AZ.hasText(r)&&(a("texttemplate"),LPt(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,u=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||u);for(var l=["x","y","z"],f=0;f<3;++f){var c="projection."+l[f];a(c+".show")&&(a(c+".opacity"),a(c+".scale"))}var h=iPe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||u||n,{axis:"z"}),h(t,r,s||u||n,{axis:"y",inherit:"z"}),h(t,r,s||u||n,{axis:"x",inherit:"z"})};function PPt(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),u=iPe.getComponentMethod("calendars","handleTraceDefaults");return u(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 sPe=Se((Rvr,oPe)=>{"use strict";var IPt=km(),DPt=R0();oPe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return IPt(n,r),DPt(t,r),n}});var uPe=Se((Fvr,lPe)=>{lPe.exports=RPt;function RPt(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 FPt=uPe();fPe.exports=function(t){return FPt("webgl",t)}});var SZ=Se((Bvr,dPe)=>{"use strict";var hPe=Pl(),qPt=function(){};dPe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=qPt);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=hPe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=hPe.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 yPe=Se((Ovr,vPe)=>{"use strict";var U2=Jg(),BPt=Zr(),OPt=["xaxis","yaxis","zaxis"];function pPe(){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 NPt=pPe.prototype;NPt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[OPt[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?BPt.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=U2(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]=U2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=U2(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]=U2(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]=U2(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]=U2(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]=U2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function UPt(e,t){var r=new pPe;return r.merge(e,t),r}vPe.exports=UPt});var _Pe=Se((Nvr,gPe)=>{"use strict";var VPt=Jg(),HPt=["xaxis","yaxis","zaxis"];function mPe(){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 GPt=mPe.prototype;GPt.merge=function(e){for(var t=0;t<3;++t){var r=e[HPt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=VPt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function WPt(e){var t=new mPe;return t.merge(e),t}gPe.exports=WPt});var wPe=Se((Uvr,bPe)=>{"use strict";bPe.exports=KPt;var xPe=hu(),jPt=Zr(),ZPt=["xaxis","yaxis","zaxis"],XPt=[0,0,0];function YPt(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]=l,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){XPt[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var f=0;f<2;++f)t.bounds[f][a]=e.glplot.bounds[f][a]}e.contourLevels=YPt(i)}});var CPe=Se((Vvr,kPe)=>{"use strict";var SPe=Od().gl_plot3d,JPt=SPe.createCamera,TPe=SPe.createScene,$Pt=cPe(),QPt=Ez(),JR=Ul(),uv=Zr(),KR=uv.preserveDrawingBuffer(),$R=hu(),Ky=jc(),eIt=Jg(),tIt=SZ(),rIt=GU(),iIt=yPe(),nIt=_Pe(),aIt=wPe(),oIt=wy().applyAutorangeOptions,VE,YR,MPe=!1;function EPe(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=iIt(t,t[this.id]),this.spikeOptions=nIt(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=JR.getComponentMethod("annotations3d","convert"),this.drawAnnotations=JR.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Ap=EPe.prototype;Ap.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:KR,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(!YR&&(VE=document.createElement("canvas"),YR=$Pt({canvas:VE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!YR))throw new Error("error creating static canvas/context for image server");t.gl=YR,t.canvas=VE}return t};var APe=!0;Ap.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=TPe(t)}catch(n){if(e.staticMode||!APe||KR)r=!1;else{uv.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{KR=t.glOptions.preserveDrawingBuffer=!0,e.glplot=TPe(t)}catch(i){KR=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return APe=!1,r};Ap.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=JPt(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"})};Ap.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return tIt(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(){MPe=!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,u=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*u.x,y:s*u.y,z:s*u.z})}a(e)}},QPt?{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};Ap.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,u=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+u),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",u),aIt(e),e.glplot.axes.update(e.axesOptions);for(var l=Object.keys(e.traces),f=null,c=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=$R.hoverLabelText(e._mockAxis,e._mockAxis.d2l(c.traceCoordinate[3]),r.valuehoverformat),_.push("value: "+y.valueLabel),c.textLabel&&_.push(c.textLabel),L=_.join("
")):L=c.textLabel;var C={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:b};Ky.appendArrayPointValue(C,x,b),r._module.eventData&&(C=x._module.eventData(C,c,x,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var v=[];Ky.loneHover({trace:x,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*u,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:f.name,color:Ky.castHoverOption(x,b,"bgcolor")||f.color,borderColor:Ky.castHoverOption(x,b,"bordercolor"),fontFamily:Ky.castHoverOption(x,b,"font.family"),fontSize:Ky.castHoverOption(x,b,"font.size"),fontColor:Ky.castHoverOption(x,b,"font.color"),nameLength:Ky.castHoverOption(x,b,"namelength"),textAlign:Ky.castHoverOption(x,b,"align"),hovertemplate:uv.castOption(x,b,"hovertemplate"),hovertemplateLabels:uv.extendFlat({},C,y),eventData:[C]},{container:n,gd:t,inOut_bbox:v}),C.bbox=v[0]}c.distance<5&&(c.buttons||MPe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Ky.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Ap.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){uv.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var HE=["xaxis","yaxis","zaxis"];function sIt(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=HE[i],o=a.charAt(0),s=n[a],u=t[o],l=t[o+"calendar"],f=t["_"+o+"length"];if(!uv.isArrayOrTypedArray(u))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],f-1);else for(var c,h=0;h<(f||u.length);h++)if(uv.isArrayOrTypedArray(u[h]))for(var d=0;dx[1][o])x[0][o]=-1,x[1][o]=1;else{var T=x[1][o]-x[0][o];x[0][o]-=T/32,x[1][o]+=T/32}if(E=[x[0][o],x[1][o]],E=oIt(E,u),x[0][o]=E[0],x[1][o]=E[1],u.isReversed()){var F=x[0][o];x[0][o]=x[1][o],x[1][o]=F}}else E=u.range,x[0][o]=u.r2l(E[0]),x[1][o]=u.r2l(E[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),b[o]=x[1][o]-x[0][o],u.range=[x[0][o],x[1][o]],u.limitRange(),n.glplot.setBounds(o,{min:u.range[0]*d[o],max:u.range[1]*d[o]})}var q,U=f.aspectmode;if(U==="cube")q=[1,1,1];else if(U==="manual"){var H=f.aspectratio;q=[H.x,H.y,H.z]}else if(U==="auto"||U==="data"){var j=[1,1,1];for(o=0;o<3;++o){u=f[HE[o]],l=u.type;var G=y[l];j[o]=Math.pow(G.acc,1/G.count)/d[o]}U==="data"||Math.max.apply(null,j)/Math.min.apply(null,j)<=4?q=j:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");f.aspectratio.x=c.aspectratio.x=q[0],f.aspectratio.y=c.aspectratio.y=q[1],f.aspectratio.z=c.aspectratio.z=q[2],n.glplot.setAspectratio(f.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:f.aspectratio.x,y:f.aspectratio.y,z:f.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=f.aspectmode);var O=f.domain||null,W=t._size||null;if(O&&W){var re=n.container.style;re.position="absolute",re.left=W.l+O.x[0]*W.w+"px",re.top=W.t+(1-O.y[1])*W.h+"px",re.width=W.w*(O.x[1]-O.x[0])+"px",re.height=W.h*(O.y[1]-O.y[0])+"px"}n.glplot.redraw()}};Ap.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 uIt(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 fIt(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"}}}Ap.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),fIt(e.camera)};Ap.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,uIt(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())};Ap.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=uv.nestedProperty(e,t.id+".camera"),i=n.get();function a(l,f,c,h){var d=["up","center","eye"],p=["x","y","z"];return f[d[c]]&&l[d[c]][p[h]]===f[d[c]][p[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var u=0;u<3;u++)if(!a(r,i,s,u)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Ap.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=uv.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Ap.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,u,l=t.isCameraChanged(e),f=t.isAspectChanged(e),c=l||f;if(c){var h={};if(l&&(n=t.getCamera(),i=uv.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),f&&(o=t.glplot.getAspectratio(),s=uv.nestedProperty(e,t.id+".aspectratio"),u=s.get(),h[t.id+".aspectratio"]=u),JR.call("_storeDirectGUIEdit",e,r._preGUI,h),l){i.set(n);var d=uv.nestedProperty(r,t.id+".camera");d.set(n)}if(f){s.set(o);var p=uv.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return c};Ap.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,u=o.up.y,l=o.up.z;if(l/Math.sqrt(s*s+u*u+l*l)<.999){var f=r.id+".camera.up",c={x:0,y:0,z:1},h={};h[f]=c;var d=i.layout;JR.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=c,uv.nestedProperty(d,f).set(c)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function cIt(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,u=0;u<3;++u)e[a+u]=Math.min(s*e[a+u],255)}}Ap.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(VE),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),cIt(a,n,i),hIt(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),u=s.createImageData(n,i);u.data.set(a),s.putImageData(u,0,0);var l;switch(e){case"jpeg":l=o.toDataURL("image/jpeg");break;case"webp":l=o.toDataURL("image/webp");break;default:l=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(VE),l};Ap.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[HE[t]];$R.setConvert(r,e.fullLayout),r.setScale=uv.noop}};Ap.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},$R.setConvert(e._mockAxis,r)};kPe.exports=EPe});var zPe=Se((Hvr,LPe)=>{"use strict";LPe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var EZ=Se((Gvr,PPe)=>{"use strict";var dIt=Pl(),ef=Rd(),MZ=vu().extendFlat,pIt=_c().overrideAll;PPe.exports=pIt({visible:ef.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:dIt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:ef.color,categoryorder:ef.categoryorder,categoryarray:ef.categoryarray,title:{text:ef.title.text,font:ef.title.font},type:MZ({},ef.type,{values:["-","linear","log","date","category"]}),autotypenumbers:ef.autotypenumbers,autorange:ef.autorange,autorangeoptions:{minallowed:ef.autorangeoptions.minallowed,maxallowed:ef.autorangeoptions.maxallowed,clipmin:ef.autorangeoptions.clipmin,clipmax:ef.autorangeoptions.clipmax,include:ef.autorangeoptions.include,editType:"plot"},rangemode:ef.rangemode,minallowed:ef.minallowed,maxallowed:ef.maxallowed,range:MZ({},ef.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:ef.minor.tickmode,nticks:ef.nticks,tick0:ef.tick0,dtick:ef.dtick,tickvals:ef.tickvals,ticktext:ef.ticktext,ticks:ef.ticks,mirror:ef.mirror,ticklen:ef.ticklen,tickwidth:ef.tickwidth,tickcolor:ef.tickcolor,showticklabels:ef.showticklabels,labelalias:ef.labelalias,tickfont:ef.tickfont,tickangle:ef.tickangle,tickprefix:ef.tickprefix,showtickprefix:ef.showtickprefix,ticksuffix:ef.ticksuffix,showticksuffix:ef.showticksuffix,showexponent:ef.showexponent,exponentformat:ef.exponentformat,minexponent:ef.minexponent,separatethousands:ef.separatethousands,tickformat:ef.tickformat,tickformatstops:ef.tickformatstops,hoverformat:ef.hoverformat,showline:ef.showline,linecolor:ef.linecolor,linewidth:ef.linewidth,showgrid:ef.showgrid,gridcolor:MZ({},ef.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:ef.gridwidth,zeroline:ef.zeroline,zerolinecolor:ef.zerolinecolor,zerolinewidth:ef.zerolinewidth},"plot","from-root")});var zZ=Se((Wvr,IPe)=>{"use strict";var kZ=EZ(),vIt=Ec().attributes,CZ=vu().extendFlat,yIt=Zr().counterRegex;function LZ(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"}}IPe.exports={_arrayAttrRegexps:[yIt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:CZ(LZ(0,0,1),{}),center:CZ(LZ(0,0,0),{}),eye:CZ(LZ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:vIt({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:kZ,yaxis:kZ,zaxis:kZ,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 qPe=Se((jvr,FPe)=>{"use strict";var mIt=cd().mix,DPe=Zr(),gIt=_f(),_It=EZ(),xIt=kU(),bIt=J5(),RPe=["xaxis","yaxis","zaxis"],wIt=100*136/187;FPe.exports=function(t,r,n){var i,a;function o(l,f){return DPe.coerce(i,a,_It,l,f)}for(var s=0;s{"use strict";var TIt=Zr(),AIt=Pl(),SIt=Ul(),MIt=k_(),EIt=qPe(),BPe=zZ(),kIt=Dd().getSubplotData,OPe="gl3d";NPe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=TIt.validate(t[o],BPe[o]);if(s)return t[o]}}MIt(t,r,n,{type:OPe,attributes:BPe,handleDefaults:CIt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function CIt(e,t,r,n){for(var i=r("bgcolor"),a=AIt.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 $_=Se(fv=>{"use strict";var LIt=_c().overrideAll,zIt=O1(),PIt=CPe(),IIt=Dd().getSubplotData,DIt=Zr(),RIt=Zv(),OA="gl3d",PZ="scene";fv.name=OA;fv.attr=PZ;fv.idRoot=PZ;fv.idRegex=fv.attrRegex=DIt.counterRegex("scene");fv.attributes=zPe();fv.layoutAttributes=zZ();fv.baseLayoutAttrOverrides=LIt({hoverlabel:zIt.hoverlabel},"plot","nested");fv.supplyLayoutDefaults=UPe();fv.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[OA],a=0;a{"use strict";VPe.exports={plot:Qze(),attributes:TZ(),markerSymbols:ZR(),supplyDefaults:aPe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:sPe(),moduleType:"trace",name:"scatter3d",basePlotModule:$_(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var WPe=Se((Kvr,GPe)=>{"use strict";GPe.exports=HPe()});var GE=Se((Jvr,XPe)=>{"use strict";var jPe=Pl(),FIt=Xf(),IZ=Gc().axisHoverFormat,qIt=Du().hovertemplateAttrs,ZPe=zf(),DZ=vu().extendFlat,BIt=_c().overrideAll;function RZ(e){return{valType:"boolean",dflt:!1}}function FZ(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:RZ("x"),y:RZ("y"),z:RZ("z")},color:{valType:"color",dflt:jPe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:jPe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var qZ=XPe.exports=BIt(DZ({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:qIt(),xhoverformat:IZ("x"),yhoverformat:IZ("y"),zhoverformat:IZ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},FIt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:FZ("x"),y:FZ("y"),z:FZ("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:DZ({},ZPe.hoverinfo),showlegend:DZ({},ZPe.showlegend,{dflt:!1})}),"calc","nested");qZ.x.editType=qZ.y.editType=qZ.z.editType="calc+clearAxisTypes"});var OZ=Se(($vr,JPe)=>{"use strict";var OIt=Ul(),YPe=Zr(),NIt=ed(),UIt=GE(),BZ=.1;function VIt(e,t){for(var r=[],n=32,i=0;i{"use strict";var $Pe=Rp();QPe.exports=function(t,r){r.surfacecolor?$Pe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):$Pe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var oIe=Se((e0r,aIe)=>{"use strict";var WIt=Od().gl_surface3d,NA=Od().ndarray,jIt=Od().ndarray_linear_interpolate.d2,ZIt=QI(),XIt=eD(),WE=Zr().isArrayOrTypedArray,YIt=$g().parseColorScale,tIe=Jg(),KIt=fc().extractOpts;function iIe(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 Jy=iIe.prototype;Jy.getXat=function(e,t,r,n){var i=WE(this.data.x)?WE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};Jy.getYat=function(e,t,r,n){var i=WE(this.data.y)?WE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};Jy.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)};Jy.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 WE(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 JIt(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 UA=[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 $It(e,t){if(e0){r=UA[n];break}return r}function eDt(e,t){if(!(e<1||t<1)){for(var r=NZ(e),n=NZ(t),i=1,a=0;aQR;)n--,n/=QIt(n),n++,n1?i:1};function rDt(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 iDt(e,t,r){return nDt(e,t,rDt,r),e}function nDt(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[l]=h),this.maxValues[l]{"use strict";sIe.exports={attributes:GE(),supplyDefaults:OZ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:eIe(),plot:oIe(),moduleType:"trace",name:"surface",basePlotModule:$_(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var fIe=Se((r0r,uIe)=>{"use strict";uIe.exports=lIe()});var VA=Se((i0r,hIe)=>{"use strict";var sDt=Xf(),UZ=Gc().axisHoverFormat,lDt=Du().hovertemplateAttrs,Q_=GE(),cIe=zf(),ex=vu().extendFlat;hIe.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:lDt({editType:"calc"}),xhoverformat:UZ("x"),yhoverformat:UZ("y"),zhoverformat:UZ("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"}},sDt("",{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"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},Q_.lighting),hoverinfo:ex({},cIe.hoverinfo,{editType:"calc"}),showlegend:ex({},cIe.showlegend,{dflt:!1})})});var tF=Se((n0r,pIe)=>{"use strict";var uDt=Xf(),eF=Gc().axisHoverFormat,fDt=Du().hovertemplateAttrs,jE=VA(),dIe=zf(),VZ=vu().extendFlat,cDt=_c().overrideAll;function HZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function GZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var HA=pIe.exports=cDt(VZ({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:HZ("x"),y:HZ("y"),z:HZ("z")},caps:{x:GZ("x"),y:GZ("y"),z:GZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:fDt(),xhoverformat:eF("x"),yhoverformat:eF("y"),zhoverformat:eF("z"),valuehoverformat:eF("value",1),showlegend:VZ({},dIe.showlegend,{dflt:!1})},uDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:jE.opacity,lightposition:jE.lightposition,lighting:jE.lighting,flatshading:jE.flatshading,contour:jE.contour,hoverinfo:VZ({},dIe.hoverinfo)}),"calc","nested");HA.flatshading.dflt=!0;HA.lighting.facenormalsepsilon.dflt=0;HA.x.editType=HA.y.editType=HA.z.editType=HA.value.editType="calc+clearAxisTypes"});var WZ=Se((a0r,yIe)=>{"use strict";var hDt=Zr(),dDt=Ul(),pDt=tF(),vDt=ed();function yDt(e,t,r,n){function i(a,o){return hDt.coerce(e,t,pDt,a,o)}vIe(e,t,r,n,i)}function vIe(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"),u=i("y"),l=i("z"),f=i("value");if(!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length){t.visible=!1;return}var c=dDt.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(x){i(x+"hoverformat");var b="caps."+x,y=i(b+".show");y&&i(b+".fill");var E="slices."+x,k=i(E+".show");k&&(i(E+".fill"),i(E+".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 p=i("contour.show");p&&(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(x){i(x)}),vDt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}yIe.exports={supplyDefaults:yDt,supplyIsoDefaults:vIe}});var rF=Se((o0r,gIe)=>{"use strict";var ZZ=Zr(),mDt=Rp();function gDt(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=Gm(t.u,t._len),t._v=Gm(t.v,t._len),t._w=Gm(t.w,t._len),t._x=Gm(t.x,t._len),t._y=Gm(t.y,t._len),t._z=Gm(t.z,t._len);var r=mIe(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=Gm(t.starts.x||[]),a=Gm(t.starts.y||[]),o=Gm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,u=1/0,l;for(l=0;l1&&(k=t[i-1],L=r[i-1],C=n[i-1]),a=0;ak?"-":"+")+"x"),p=p.replace("y",(A>L?"-":"+")+"y"),p=p.replace("z",(_>C?"-":"+")+"z");var T=function(){i=0,M=[],v=[],z=[]};(!i||i{"use strict";var _Dt=Rp(),xDt=rF().processGrid,iF=rF().filter;_Ie.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=iF(r.x,r._len),r._y=iF(r.y,r._len),r._z=iF(r.z,r._len),r._value=iF(r.value,r._len);var n=xDt(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";xIe.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var bDt=Od().gl_mesh3d,wDt=$g().parseColorScale,TDt=Zr().isArrayOrTypedArray,ADt=Jg(),SDt=fc().extractOpts,bIe=GA(),ZE=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 ne(ut,ct){return ut===null?ct:ut}function be(ut,ct,rt){T();var je=[ct],tt=[rt];if(G>=1)je=[ct],tt=[rt];else if(G>0){var Je=W(ct,rt);je=Je.xyzv,tt=Je.abc}for(var Mt=0;Mt-1?rt[Kt]:z(ir,fr,Ot);_e>-1?Vt[Kt]=_e:Vt[Kt]=q(ir,fr,Ot,ne(ut,De))}U(Vt[0],Vt[1],Vt[2])}}function ze(ut,ct,rt){var je=function(tt,Je,Mt){be(ut,[ct[tt],ct[Je],ct[Mt]],[rt[tt],rt[Je],rt[Mt]])};je(0,1,2),je(2,3,0)}function Ce(ut,ct,rt){var je=function(tt,Je,Mt){be(ut,[ct[tt],ct[Je],ct[Mt]],[rt[tt],rt[Je],rt[Mt]])};je(0,1,2),je(3,0,1),je(2,3,0),je(1,2,3)}function he(ut,ct,rt,je){var tt=ut[3];ttje&&(tt=je);for(var Je=(ut[3]-tt)/(ut[3]-ct[3]+1e-9),Mt=[],Vt=0;Vt<4;Vt++)Mt[Vt]=(1-Je)*ut[Vt]+Je*ct[Vt];return Mt}function te(ut,ct,rt){return ut>=ct&&ut<=rt}function ke(ut){var ct=.001*(L-A);return ut>=A-ct&&ut<=L+ct}function Ee(ut){for(var ct=[],rt=0;rt<4;rt++){var je=ut[rt];ct.push([e._x[je],e._y[je],e._z[je],e._value[je]])}return ct}var Me=3;function Oe(ut,ct,rt,je,tt,Je){Je||(Je=1),rt=[-1,-1,-1];var Mt=!1,Vt=[te(ct[0][3],je,tt),te(ct[1][3],je,tt),te(ct[2][3],je,tt)];if(!Vt[0]&&!Vt[1]&&!Vt[2])return!1;var Kt=function(fr,Ot,De){return ke(Ot[0][3])&&ke(Ot[1][3])&&ke(Ot[2][3])?(be(fr,Ot,De),!0):JeVt?[E,Je]:[Je,k];xt(ct,Kt[0],Kt[1])}}var ir=[[Math.min(A,k),Math.max(A,k)],[Math.min(E,L),Math.max(E,L)]];["x","y","z"].forEach(function(fr){for(var Ot=[],De=0;De0&&(ye.push(ht.id),fr==="x"?ue.push([ht.distRatio,0,0]):fr==="y"?ue.push([0,ht.distRatio,0]):ue.push([0,0,ht.distRatio]))}else fr==="x"?lt=At(1,d-1):fr==="y"?lt=At(1,p-1):lt=At(1,x-1);ye.length>0&&(fr==="x"?Ot[_e]=_t(ut,ye,Fe,Pe,ue,Ot[_e]):fr==="y"?Ot[_e]=Ct(ut,ye,Fe,Pe,ue,Ot[_e]):Ot[_e]=jt(ut,ye,Fe,Pe,ue,Ot[_e]),_e++),lt.length>0&&(fr==="x"?Ot[_e]=gt(ut,lt,Fe,Pe,Ot[_e]):fr==="y"?Ot[_e]=Pt(ut,lt,Fe,Pe,Ot[_e]):Ot[_e]=Qe(ut,lt,Fe,Pe,Ot[_e]),_e++)}var Et=e.caps[fr];Et.show&&Et.fill&&(O(Et.fill),fr==="x"?Ot[_e]=gt(ut,[0,d-1],Fe,Pe,Ot[_e]):fr==="y"?Ot[_e]=Pt(ut,[0,p-1],Fe,Pe,Ot[_e]):Ot[_e]=Qe(ut,[0,x-1],Fe,Pe,Ot[_e]),_e++)}}),s===0&&F(),e._meshX=_,e._meshY=C,e._meshZ=M,e._meshIntensity=v,e._Xs=f,e._Ys=c,e._Zs=h}return nt(),e}function EDt(e,t){var r=e.glplot.gl,n=bDt({gl:r}),i=new wIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}AIe.exports={findNearestOnAxis:ZE,generateIsoMeshes:TIe,createIsosurfaceTrace:EDt}});var MIe=Se((f0r,SIe)=>{"use strict";SIe.exports={attributes:tF(),supplyDefaults:WZ().supplyDefaults,calc:XZ(),colorbar:{min:"cmin",max:"cmax"},plot:nF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var kIe=Se((c0r,EIe)=>{"use strict";EIe.exports=MIe()});var JZ=Se((h0r,LIe)=>{"use strict";var kDt=Xf(),Nh=tF(),CDt=GE(),CIe=zf(),KZ=vu().extendFlat,LDt=_c().overrideAll,aF=LIe.exports=LDt(KZ({x:Nh.x,y:Nh.y,z:Nh.z,value:Nh.value,isomin:Nh.isomin,isomax:Nh.isomax,surface:Nh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Nh.slices,caps:Nh.caps,text:Nh.text,hovertext:Nh.hovertext,xhoverformat:Nh.xhoverformat,yhoverformat:Nh.yhoverformat,zhoverformat:Nh.zhoverformat,valuehoverformat:Nh.valuehoverformat,hovertemplate:Nh.hovertemplate},kDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Nh.colorbar,opacity:Nh.opacity,opacityscale:CDt.opacityscale,lightposition:Nh.lightposition,lighting:Nh.lighting,flatshading:Nh.flatshading,contour:Nh.contour,hoverinfo:KZ({},CIe.hoverinfo),showlegend:KZ({},CIe.showlegend,{dflt:!1})}),"calc","nested");aF.x.editType=aF.y.editType=aF.z.editType=aF.value.editType="calc+clearAxisTypes"});var PIe=Se((d0r,zIe)=>{"use strict";var zDt=Zr(),PDt=JZ(),IDt=WZ().supplyIsoDefaults,DDt=OZ().opacityscaleDefaults;zIe.exports=function(t,r,n,i){function a(o,s){return zDt.coerce(t,r,PDt,o,s)}IDt(t,r,n,i,a),DDt(t,r,i,a)}});var FIe=Se((p0r,RIe)=>{"use strict";var RDt=Od().gl_mesh3d,FDt=$g().parseColorScale,qDt=Zr().isArrayOrTypedArray,BDt=Jg(),ODt=fc().extractOpts,IIe=GA(),$Z=nF().findNearestOnAxis,NDt=nF().generateIsoMeshes;function DIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var QZ=DIe.prototype;QZ.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=$Z(r,this.data._Xs).id,u=$Z(n,this.data._Ys).id,l=$Z(i,this.data._Zs).id,f=e.index=l+o*u+o*a*s;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var c=this.data.hovertext||this.data.text;return qDt(c)&&c[f]!==void 0?e.textLabel=c[f]:c&&(e.textLabel=c),!0}};QZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=NDt(e);function n(u,l,f,c){return l.map(function(h){return u.d2l(h,0,c)*f})}var i=IIe(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=IIe(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:BDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=ODt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=FDt(e),this.mesh.update(o)};QZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function UDt(e,t){var r=e.glplot.gl,n=RDt({gl:r}),i=new DIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}RIe.exports=UDt});var BIe=Se((v0r,qIe)=>{"use strict";qIe.exports={attributes:JZ(),supplyDefaults:PIe(),calc:XZ(),colorbar:{min:"cmin",max:"cmax"},plot:FIe(),moduleType:"trace",name:"volume",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var NIe=Se((y0r,OIe)=>{"use strict";OIe.exports=BIe()});var HIe=Se((m0r,VIe)=>{"use strict";var VDt=Ul(),UIe=Zr(),HDt=ed(),GDt=VA();VIe.exports=function(t,r,n,i){function a(f,c){return UIe.coerce(t,r,GDt,f,c)}function o(f){var c=f.map(function(h){var d=a(h);return d&&UIe.isArrayOrTypedArray(d)?d:null});return c.every(function(h){return h&&h.length===c[0].length})&&c}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 u=VDt.getComponentMethod("calendars","handleTraceDefaults");u(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(f){a(f)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),HDt(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("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var WIe=Se((g0r,GIe)=>{"use strict";var WDt=Rp();GIe.exports=function(t,r){r.intensity&&WDt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var KIe=Se((_0r,YIe)=>{"use strict";var jDt=Od().gl_mesh3d,ZDt=Od().delaunay_triangulate,XDt=Od().alpha_shape,YDt=Od().convex_hull,KDt=$g().parseColorScale,JDt=Zr().isArrayOrTypedArray,iX=Jg(),$Dt=fc().extractOpts,jIe=GA();function XIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var nX=XIe.prototype;nX.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 JDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function ZIe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}nX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=jIe(eX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),eX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),eX(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||!rX(e.i,n)||!rX(e.j,n)||!rX(e.k,n))return;a=jIe(tX(e.i),tX(e.j),tX(e.k))}else e.alphahull===0?a=YDt(i):e.alphahull>0?a=XDt(e.alphahull,i):a=QDt(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:iX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=$Dt(e);this.color="#fff";var u=e.intensitymode;o[u+"Intensity"]=e.intensity,o[u+"IntensityBounds"]=[s.min,s.max],o.colormap=KDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=ZIe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=ZIe(e.facecolor)):(this.color=e.color,o.meshColor=iX(e.color));this.mesh.update(o)};nX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function e6t(e,t){var r=e.glplot.gl,n=jDt({gl:r}),i=new XIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}YIe.exports=e6t});var $Ie=Se((x0r,JIe)=>{"use strict";JIe.exports={attributes:VA(),supplyDefaults:HIe(),calc:WIe(),colorbar:{min:"cmin",max:"cmax"},plot:KIe(),moduleType:"trace",name:"mesh3d",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var eDe=Se((b0r,QIe)=>{"use strict";QIe.exports=$Ie()});var oX=Se((w0r,rDe)=>{"use strict";var t6t=Xf(),WA=Gc().axisHoverFormat,r6t=Du().hovertemplateAttrs,i6t=VA(),tDe=zf(),aX=vu().extendFlat,oF={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:r6t({editType:"calc"},{keys:["norm"]}),uhoverformat:WA("u",1),vhoverformat:WA("v",1),whoverformat:WA("w",1),xhoverformat:WA("x"),yhoverformat:WA("y"),zhoverformat:WA("z"),showlegend:aX({},tDe.showlegend,{dflt:!1})};aX(oF,t6t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n6t=["opacity","lightposition","lighting"];n6t.forEach(function(e){oF[e]=i6t[e]});oF.hoverinfo=aX({},tDe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});rDe.exports=oF});var nDe=Se((T0r,iDe)=>{"use strict";var a6t=Zr(),o6t=ed(),s6t=oX();iDe.exports=function(t,r,n,i){function a(d,p){return a6t.coerce(t,r,s6t,d,p)}var o=a("u"),s=a("v"),u=a("w"),l=a("x"),f=a("y"),c=a("z");if(!o||!o.length||!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length||!c||!c.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"),o6t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var oDe=Se((A0r,aDe)=>{"use strict";var l6t=Rp();aDe.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,u=1/0,l=0;l{"use strict";var u6t=Od().gl_cone3d,f6t=Od().gl_cone3d.createConeMesh,c6t=Zr().simpleMap,h6t=$g().parseColorScale,d6t=fc().extractOpts,p6t=Zr().isArrayOrTypedArray,sDe=GA();function lDe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var sX=lDe.prototype;sX.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 u=this.data.hovertext||this.data.text;return p6t(u)&&u[t]!==void 0?e.textLabel=u[t]:u&&(e.textLabel=u),!0}};var v6t={xaxis:0,yaxis:1,zaxis:2},y6t={tip:1,tail:0,cm:.25,center:.5},m6t={tip:1,tail:1,cm:.75,center:.5};function uDe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(f,c){var h=r[c],d=n[v6t[c]];return c6t(f,function(p){return h.d2l(p)*d})}i.vectors=sDe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=sDe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=d6t(t);i.colormap=h6t(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=y6t[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 u=u6t(i),l=t.lightposition;return u.lightPosition=[l.x,l.y,l.z],u.ambient=t.lighting.ambient,u.diffuse=t.lighting.diffuse,u.specular=t.lighting.specular,u.roughness=t.lighting.roughness,u.fresnel=t.lighting.fresnel,u.opacity=t.opacity,t._pad=m6t[t.anchor]*u.vectorScale*u.coneScale*t._normMax,u}sX.update=function(e){this.data=e;var t=uDe(this.scene,e);this.mesh.update(t)};sX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g6t(e,t){var r=e.glplot.gl,n=uDe(e,t),i=f6t(r,n),a=new lDe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}fDe.exports=g6t});var dDe=Se((M0r,hDe)=>{"use strict";hDe.exports={moduleType:"trace",name:"cone",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:oX(),supplyDefaults:nDe(),colorbar:{min:"cmin",max:"cmax"},calc:oDe(),plot:cDe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var vDe=Se((E0r,pDe)=>{"use strict";pDe.exports=dDe()});var uX=Se((k0r,mDe)=>{"use strict";var _6t=Xf(),jA=Gc().axisHoverFormat,x6t=Du().hovertemplateAttrs,b6t=VA(),yDe=zf(),lX=vu().extendFlat,sF={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:x6t({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:jA("u",1),vhoverformat:jA("v",1),whoverformat:jA("w",1),xhoverformat:jA("x"),yhoverformat:jA("y"),zhoverformat:jA("z"),showlegend:lX({},yDe.showlegend,{dflt:!1})};lX(sF,_6t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var w6t=["opacity","lightposition","lighting"];w6t.forEach(function(e){sF[e]=b6t[e]});sF.hoverinfo=lX({},yDe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});mDe.exports=sF});var _De=Se((C0r,gDe)=>{"use strict";var T6t=Zr(),A6t=ed(),S6t=uX();gDe.exports=function(t,r,n,i){function a(h,d){return T6t.coerce(t,r,S6t,h,d)}var o=a("u"),s=a("v"),u=a("w"),l=a("x"),f=a("y"),c=a("z");if(!o||!o.length||!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length||!c||!c.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"),A6t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var EDe=Se((L0r,MDe)=>{"use strict";var wDe=Od().gl_streamtube3d,M6t=wDe.createTubeMesh,E6t=Zr(),k6t=$g().parseColorScale,C6t=fc().extractOpts,xDe=GA(),TDe={xaxis:0,yaxis:1,zaxis:2};function ADe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var cX=ADe.prototype;cX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var u=t[s],l=r[TDe[s]];return u.l2c(o)/l}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 bDe(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 fX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function SDe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(F,q){var U=r[q],H=n[TDe[q]];return E6t.simpleMap(F,function(j){return U.d2l(j)*H})}if(a.vectors=xDe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),u=o(t._Ys,"yaxis"),l=o(t._Zs,"zaxis");a.meshgrid=[s,u,l],a.gridFill=t._gridFill;var f=t._slen;if(f)a.startingPositions=xDe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var c=u[0],h=bDe(s),d=bDe(l),p=new Array(h.length*d.length),x=0,b=0;b{"use strict";kDe.exports={moduleType:"trace",name:"streamtube",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:uX(),supplyDefaults:_De(),colorbar:{min:"cmin",max:"cmax"},calc:rF().calc,plot:EDe(),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 zDe=Se((P0r,LDe)=>{"use strict";LDe.exports=CDe()});var H2=Se((I0r,DDe)=>{"use strict";var z6t=Du().hovertemplateAttrs,P6t=Du().texttemplateAttrs,I6t=Ey(),Wm=Zc(),D6t=zf(),PDe=Xf(),R6t=Id().dash,V2=vu().extendFlat,F6t=_c().overrideAll,ey=Wm.marker,IDe=Wm.line,q6t=ey.line;DDe.exports=F6t({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:V2({},Wm.mode,{dflt:"markers"}),text:V2({},Wm.text,{}),texttemplate:P6t({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:V2({},Wm.hovertext,{}),textfont:Wm.textfont,textposition:Wm.textposition,line:{color:IDe.color,width:IDe.width,dash:R6t},connectgaps:Wm.connectgaps,marker:V2({symbol:ey.symbol,opacity:ey.opacity,angle:ey.angle,angleref:V2({},ey.angleref,{values:["previous","up","north"]}),standoff:ey.standoff,size:ey.size,sizeref:ey.sizeref,sizemin:ey.sizemin,sizemode:ey.sizemode,colorbar:ey.colorbar,line:V2({width:q6t.width},PDe("marker.line")),gradient:ey.gradient},PDe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:I6t(),selected:Wm.selected,unselected:Wm.unselected,hoverinfo:V2({},D6t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:z6t()},"calc","nested")});var FDe=Se((D0r,RDe)=>{"use strict";var hX=Zr(),dX=ec(),B6t=$v(),O6t=I0(),N6t=D0(),U6t=Py(),V6t=H2();RDe.exports=function(t,r,n,i){function a(d,p){return hX.coerce(t,r,V6t,d,p)}var o=a("locations"),s;if(o&&o.length){var u=a("geojson"),l;(typeof u=="string"&&u!==""||hX.isPlainObject(u))&&(l="geojson-id");var f=a("locationmode",l);f==="geojson-id"&&a("featureidkey"),s=o.length}else{var c=a("lon")||[],h=a("lat")||[];s=Math.min(c.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("mode"),dX.hasMarkers(r)&&B6t(t,r,n,i,a,{gradient:!0}),dX.hasLines(r)&&(O6t(t,r,n,i,a),a("connectgaps")),dX.hasText(r)&&(a("texttemplate"),N6t(t,r,i,a)),a("fill"),r.fill!=="none"&&U6t(t,r,n,a),hX.coerceSelectionMarkerOpacity(r,a)}});var ODe=Se((R0r,BDe)=>{"use strict";var qDe=hu();BDe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=qDe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=qDe.tickText(o,o.c2l(s[1]),!0).text,i}});var lF=Se((F0r,HDe)=>{"use strict";var pX=_u(),NDe=ju().BADNUM,H6t=R0(),G6t=km(),W6t=F0(),j6t=Zr().isArrayOrTypedArray,UDe=Zr()._;function VDe(e){return e&&typeof e=="string"}HDe.exports=function(t,r){var n=j6t(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return VDe(h)||pX(h)}:o=VDe;for(var s=0;s{"use strict";Sp.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"};Sp.axesNames=["lonaxis","lataxis"];Sp.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Sp.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Sp.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]}};Sp.clipPad=.001;Sp.precision=.1;Sp.landColor="#F0DC82";Sp.waterColor="#3399FF";Sp.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Sp.sphereSVG={type:"Sphere"};Sp.fillLayers={ocean:1,land:1,lakes:1};Sp.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Sp.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Sp.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Sp.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var vX=Se((uF,GDe)=>{(function(e,t){typeof uF=="object"&&typeof GDe!="undefined"?t(uF):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(uF,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var A,L,_=k.scale[0],C=k.scale[1],M=k.translate[0],v=k.translate[1];return function(z,T){T||(A=L=0);var F=2,q=z.length,U=new Array(q);for(U[0]=(A+=z[0])*_+M,U[1]=(L+=z[1])*C+v;FM&&(M=F[0]),F[1]v&&(v=F[1])}function T(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(T);break;case"Point":z(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(z);break}}k.arcs.forEach(function(F){for(var q=-1,U=F.length,H;++qM&&(M=H[0]),H[1]v&&(v=H[1])});for(L in k.objects)T(k.objects[L]);return[_,C,M,v]}function i(k,A){for(var L,_=k.length,C=_-A;C<--_;)L=k[C],k[C++]=k[_],k[_]=L}function a(k,A){return typeof A=="string"&&(A=k.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(L){return o(k,L)})}:o(k,A)}function o(k,A){var L=A.id,_=A.bbox,C=A.properties==null?{}:A.properties,M=s(k,A);return L==null&&_==null?{type:"Feature",properties:C,geometry:M}:_==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:_,properties:C,geometry:M}}function s(k,A){var L=r(k.transform),_=k.arcs;function C(q,U){U.length&&U.pop();for(var H=_[q<0?~q:q],j=0,G=H.length;j1)_=c(k,A,L);else for(C=0,_=new Array(M=k.arcs.length);C1)for(var U=1,H=z(F[0]),j,G;UH&&(G=F[0],F[0]=F[U],F[U]=G,H=j);return F}).filter(function(T){return T.length>0})}}function x(k,A){for(var L=0,_=k.length;L<_;){var C=L+_>>>1;k[C]=2))throw new Error("n must be \u22652");T=k.bbox||n(k);var L=T[0],_=T[1],C=T[2],M=T[3],v;A={scale:[C-L?(C-L)/(v-1):1,M-_?(M-_)/(v-1):1],translate:[L,_]}}else T=k.bbox;var z=y(A),T,F,q=k.objects,U={};function H(O){return z(O)}function j(O){var W;switch(O.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:O.geometries.map(j)};break;case"Point":W={type:"Point",coordinates:H(O.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:O.coordinates.map(H)};break;default:return O}return O.id!=null&&(W.id=O.id),O.bbox!=null&&(W.bbox=O.bbox),O.properties!=null&&(W.properties=O.properties),W}function G(O){var W=0,re=1,ne=O.length,be,ze=new Array(ne);for(ze[0]=z(O[0],0);++W{"use strict";var yX=WDe.exports={},Z6t=XE().locationmodeToLayer,X6t=vX().feature;yX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};yX.getTopojsonPath=function(e,t){return e+t+".json"};yX.getTopojsonFeatures=function(e,t){var r=Z6t[e.locationmode],n=t.objects[r];return X6t(t,n).features}});var tx=Se(YE=>{"use strict";var Y6t=ju().BADNUM;YE.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};YE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};YE.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{jDe.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 dF=Se(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var qv=63710088e-1,gX={centimeters:qv*100,centimetres:qv*100,degrees:360/(2*Math.PI),feet:qv*3.28084,inches:qv*39.37,kilometers:qv/1e3,kilometres:qv/1e3,meters:qv,metres:qv,miles:qv/1609.344,millimeters:qv*1e3,millimetres:qv*1e3,nauticalmiles:qv/1852,radians:1,yards:qv*1.0936},mX={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 K6t(e,t,r={}){switch(e){case"Point":return _X(t).geometry;case"LineString":return bX(t).geometry;case"Polygon":return xX(t).geometry;case"MultiPoint":return YDe(t).geometry;case"MultiLineString":return XDe(t).geometry;case"MultiPolygon":return KDe(t).geometry;default:throw new Error(e+" is invalid")}}function _X(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(!cF(e[0])||!cF(e[1]))throw new Error("coordinates must contain numbers");return rx({type:"Point",coordinates:e},t,r)}function J6t(e,t,r={}){return hF(e.map(n=>_X(n,t)),r)}function xX(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;axX(n,t)),r)}function bX(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 Q6t(e,t,r={}){return hF(e.map(n=>bX(n,t)),r)}function hF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function XDe(e,t,r={}){return rx({type:"MultiLineString",coordinates:e},t,r)}function YDe(e,t,r={}){return rx({type:"MultiPoint",coordinates:e},t,r)}function KDe(e,t,r={}){return rx({type:"MultiPolygon",coordinates:e},t,r)}function eRt(e,t,r={}){return rx({type:"GeometryCollection",geometries:e},t,r)}function tRt(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 JDe(e,t="kilometers"){let r=gX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function wX(e,t="kilometers"){let r=gX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function rRt(e,t){return $De(wX(e,t))}function iRt(e){let t=e%360;return t<0&&(t+=360),t}function nRt(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function $De(e){return e%(2*Math.PI)*180/Math.PI}function aRt(e){return e%360*Math.PI/180}function oRt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return JDe(wX(e,t),r)}function sRt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=mX[t];if(!n)throw new Error("invalid original units");let i=mX[r];if(!i)throw new Error("invalid final units");return e/n*i}function cF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function lRt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function uRt(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(!cF(t))throw new Error("bbox must only contain numbers")})}function fRt(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")}hc.areaFactors=mX;hc.azimuthToBearing=nRt;hc.bearingToAzimuth=iRt;hc.convertArea=sRt;hc.convertLength=oRt;hc.degreesToRadians=aRt;hc.earthRadius=qv;hc.factors=gX;hc.feature=rx;hc.featureCollection=hF;hc.geometry=K6t;hc.geometryCollection=eRt;hc.isNumber=cF;hc.isObject=lRt;hc.lengthToDegrees=rRt;hc.lengthToRadians=wX;hc.lineString=bX;hc.lineStrings=Q6t;hc.multiLineString=XDe;hc.multiPoint=YDe;hc.multiPolygon=KDe;hc.point=_X;hc.points=J6t;hc.polygon=xX;hc.polygons=$6t;hc.radiansToDegrees=$De;hc.radiansToLength=JDe;hc.round=tRt;hc.validateBBox=uRt;hc.validateId=fRt});var vF=Se(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var Wp=dF();function KE(e,t,r){if(e!==null)for(var n,i,a,o,s,u,l,f=0,c=0,h,d=e.type,p=d==="FeatureCollection",x=d==="Feature",b=p?e.features.length:1,y=0;yu||p>l||x>f){s=c,u=n,l=p,f=x,a=0;return}var b=Wp.lineString.call(void 0,[s,c],r.properties);if(t(b,n,i,x,a)===!1)return!1;a++,s=c})===!1)return!1}}})}function mRt(e,t,r){var n=r,i=!1;return t6e(e,function(a,o,s,u,l){i===!1&&r===void 0?n=a:n=t(n,a,o,s,u,l),i=!0}),n}function r6e(e,t){if(!e)throw new Error("geojson is required");pF(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(yF,"__esModule",{value:!0});var i6e=dF(),bRt=vF();function o6e(e){return bRt.geomReduce.call(void 0,e,(t,r)=>t+wRt(r),0)}function wRt(e){let t=0,r;switch(e.type){case"Polygon":return n6e(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(a6e(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*AX,u=a[1]*AX,l=o[0]*AX;r+=(l-s)*Math.sin(u),n++}return r*TRt}var ARt=o6e;yF.area=o6e;yF.default=ARt});var u6e=Se(mF=>{"use strict";Object.defineProperty(mF,"__esModule",{value:!0});var SRt=dF(),MRt=vF();function l6e(e,t={}){let r=0,n=0,i=0;return MRt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),SRt.point.call(void 0,[r/i,n/i],t.properties)}var ERt=l6e;mF.centroid=l6e;mF.default=ERt});var c6e=Se(gF=>{"use strict";Object.defineProperty(gF,"__esModule",{value:!0});var kRt=vF();function f6e(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return kRt.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 LRt=Nl(),p6e=ZDe(),{area:zRt}=s6e(),{centroid:PRt}=u6e(),{bbox:IRt}=c6e(),h6e=BM(),ZA=H1(),DRt=yg(),RRt=EM(),_F=w5(),d6e=Object.keys(p6e),FRt={"ISO-3":h6e,"USA-states":h6e,"country names":qRt};function qRt(e){for(var t=0;t0&&f[c+1][0]<0)return c;return null}switch(n==="RUS"||n==="FJI"?a=function(f){var c;if(l(f)===null)c=f;else for(c=new Array(f.length),u=0;uc?h[d++]=[f[u][0]+360,f[u][1]]:u===c?(h[d++]=f[u],h[d++]=[f[u][0],-90]):h[d++]=f[u];var p=_F.tester(h);p.pts.pop(),i.push(p)}:a=function(f){i.push(_F.tester(f))},t.type){case"MultiPolygon":for(o=0;o0?p.properties.ct=URt(p):p.properties.ct=[NaN,NaN],h.fIn=f,h.fOut=p,i.push(p)}else ZA.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[c]}switch(r.type){case"FeatureCollection":var u=r.features;for(a=0;ai&&(i=s,r=o)}else r=t;return PRt(r).geometry.coordinates}function VRt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(u){return new Promise(function(l,f){LRt.json(u,function(c,h){if(c){delete t[u];var d=c.status===404?'GeoJSON at URL "'+u+'" does not exist.':"Unexpected error while fetching from "+u;return f(new Error(d))}return t[u]=h,l(h)})})}function i(u){return new Promise(function(l,f){var c=0,h=setInterval(function(){if(t[u]&&t[u]!=="pending")return clearInterval(h),l(t[u]);if(c>100)return clearInterval(h),f("Unexpected error while fetching from "+u);c++},50)})}for(var a=0;a{"use strict";var GRt=Nl(),WRt=yu(),m6e=Pl(),g6e=ov(),jRt=g6e.stylePoints,ZRt=g6e.styleText;_6e.exports=function(t,r){r&&XRt(t,r)};function XRt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),jRt(n,r,e),ZRt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=GRt.select(this),o=i.trace,s=o.line||{};a.call(m6e.stroke,s.color).call(WRt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(m6e.fill,o.fillcolor)})}});var CX=Se((X0r,w6e)=>{"use strict";var x6e=Nl(),bF=Zr(),YRt=fF().getTopojsonFeatures,MX=tx(),xF=ix(),b6e=wy().findExtremes,kX=ju().BADNUM,KRt=q0().calcMarkerSize,EX=ec(),JRt=SX();function $Rt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=bF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===kX&&x6e.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=x6e.select(this),u=o[0].trace;if(EX.hasLines(u)||u.fill!=="none"){var l=MX.calcTraceToLineCoords(o),f=u.fill!=="none"?MX.makePolygon(l):MX.makeLine(l);s.selectAll("path.js-line").data([{geojson:f,trace:u}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}EX.hasMarkers(u)&&s.selectAll("path.point").data(bF.identity).enter().append("path").classed("point",!0).each(function(c){a(c,this)}),EX.hasText(u)&&s.selectAll("g").data(bF.identity).enter().append("g").append("text").each(function(c){a(c,this)}),JRt(e,o)})}function QRt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(bF.isArrayOrTypedArray(r.locations)){var u=r.locationmode,l=u==="geojson-id"?xF.extractTraceFeature(e):YRt(r,i.topojson);for(o=0;o{"use strict";var eFt=jc(),tFt=ju().BADNUM,rFt=oT(),iFt=Zr().fillText,nFt=H2();T6e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,u=t.subplot,l=u.projection.isLonLatOverEdges,f=u.project;function c(E){var k=E.lonlat;if(k[0]===tFt||l(k))return 1/0;var A=f(k),L=f([r,n]),_=Math.abs(A[0]-L[0]),C=Math.abs(A[1]-L[1]),M=Math.max(3,E.mrc||0);return Math.max(Math.sqrt(_*_+C*C)-M,1-3/M)}if(eFt.getClosest(i,c,t),t.index!==!1){var h=i[t.index],d=h.lonlat,p=[o.c2p(d),s.c2p(d)],x=h.mrc||1;t.x0=p[0]-x,t.x1=p[0]+x,t.y0=p[1]-x,t.y1=p[1]+x,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:u};var y=a._module.formatLabels(h,a,b);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=rFt(a,h),t.extraText=aFt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function aFt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?nFt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,u=a.indexOf("lat")!==-1,l=a.indexOf("text")!==-1,f=[];function c(h){return h+"\xB0"}return o?f.push(t.loc):s&&u?f.push("("+c(r.latLabel)+", "+c(r.lonLabel)+")"):s?f.push(n.lon+c(r.lonLabel)):u&&f.push(n.lat+c(r.latLabel)),l&&iFt(t,e,f),f.join("
")}});var M6e=Se((K0r,S6e)=>{"use strict";S6e.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 C6e=Se((J0r,k6e)=>{"use strict";var E6e=ec(),oFt=ju().BADNUM;k6e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u,l,f,c,h,d=!E6e.hasMarkers(s)&&!E6e.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){typeof wF=="object"&&typeof L6e!="undefined"?t(wF):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(wF,function(e){"use strict";function t(Ee,Me){return EeMe?1:Ee>=Me?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Me,Oe,Re,me){for(Re==null&&(Re=0),me==null&&(me=Me.length);Re>>1;Ee(Me[Be],Oe)<0?Re=Be+1:me=Be}return Re},right:function(Me,Oe,Re,me){for(Re==null&&(Re=0),me==null&&(me=Me.length);Re>>1;Ee(Me[Be],Oe)>0?me=Be:Re=Be+1}return Re}}}function n(Ee){return function(Me,Oe){return t(Ee(Me),Oe)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Me){Me==null&&(Me=u);for(var Oe=0,Re=Ee.length-1,me=Ee[0],Be=new Array(Re<0?0:Re);OeEe?1:Me>=Ee?0:NaN}function c(Ee){return Ee===null?NaN:+Ee}function h(Ee,Me){var Oe=Ee.length,Re=0,me=-1,Be=0,fe,Ze,et=0;if(Me==null)for(;++me1)return et/(Re-1)}function d(Ee,Me){var Oe=h(Ee,Me);return Oe&&Math.sqrt(Oe)}function p(Ee,Me){var Oe=Ee.length,Re=-1,me,Be,fe;if(Me==null){for(;++Re=me)for(Be=fe=me;++Reme&&(Be=me),fe=me)for(Be=fe=me;++Reme&&(Be=me),fe0)return[Ee];if((Re=Me0)for(Ee=Math.ceil(Ee/Ze),Me=Math.floor(Me/Ze),fe=new Array(Be=Math.ceil(Me-Ee+1));++me=0?(Be>=L?10:Be>=_?5:Be>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(Be>=L?10:Be>=_?5:Be>=C?2:1)}function z(Ee,Me,Oe){var Re=Math.abs(Me-Ee)/Math.max(0,Oe),me=Math.pow(10,Math.floor(Math.log(Re)/Math.LN10)),Be=Re/me;return Be>=L?me*=10:Be>=_?me*=5:Be>=C&&(me*=2),MeQe;)Xe.pop(),--Tt;var xt=new Array(Tt+1),_t;for(Be=0;Be<=Tt;++Be)_t=xt[Be]=[],_t.x0=Be>0?Xe[Be-1]:Pt,_t.x1=Be=1)return+Oe(Ee[Re-1],Re-1,Ee);var Re,me=(Re-1)*Me,Be=Math.floor(me),fe=+Oe(Ee[Be],Be,Ee),Ze=+Oe(Ee[Be+1],Be+1,Ee);return fe+(Ze-fe)*(me-Be)}}function U(Ee,Me,Oe){return Ee=y.call(Ee,c).sort(t),Math.ceil((Oe-Me)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function H(Ee,Me,Oe){return Math.ceil((Oe-Me)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function j(Ee,Me){var Oe=Ee.length,Re=-1,me,Be;if(Me==null){for(;++Re=me)for(Be=me;++ReBe&&(Be=me)}else for(;++Re=me)for(Be=me;++ReBe&&(Be=me);return Be}function G(Ee,Me){var Oe=Ee.length,Re=Oe,me=-1,Be,fe=0;if(Me==null)for(;++me=0;)for(fe=Ee[Me],Oe=fe.length;--Oe>=0;)Be[--me]=fe[Oe];return Be}function re(Ee,Me){var Oe=Ee.length,Re=-1,me,Be;if(Me==null){for(;++Re=me)for(Be=me;++Reme&&(Be=me)}else for(;++Re=me)for(Be=me;++Reme&&(Be=me);return Be}function ne(Ee,Me){for(var Oe=Me.length,Re=new Array(Oe);Oe--;)Re[Oe]=Ee[Me[Oe]];return Re}function be(Ee,Me){if(Oe=Ee.length){var Oe,Re=0,me=0,Be,fe=Ee[me];for(Me==null&&(Me=t);++Re{(function(e,t){typeof TF=="object"&&typeof z6e!="undefined"?t(TF,JE()):typeof define=="function"&&define.amd?define(["exports","d3-array"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(TF,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(bt){a(i,bt,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(bt,Ft,hr){var nr=bt.s=Ft+hr,Sr=nr-Ft,li=nr-Sr;bt.t=Ft-li+(hr-Sr)}var o=1e-6,s=1e-12,u=Math.PI,l=u/2,f=u/4,c=u*2,h=180/u,d=u/180,p=Math.abs,x=Math.atan,b=Math.atan2,y=Math.cos,E=Math.ceil,k=Math.exp,A=Math.log,L=Math.pow,_=Math.sin,C=Math.sign||function(bt){return bt>0?1:bt<0?-1:0},M=Math.sqrt,v=Math.tan;function z(bt){return bt>1?0:bt<-1?u:Math.acos(bt)}function T(bt){return bt>1?l:bt<-1?-l:Math.asin(bt)}function F(bt){return(bt=_(bt/2))*bt}function q(){}function U(bt,Ft){bt&&j.hasOwnProperty(bt.type)&&j[bt.type](bt,Ft)}var H={Feature:function(bt,Ft){U(bt.geometry,Ft)},FeatureCollection:function(bt,Ft){for(var hr=bt.features,nr=-1,Sr=hr.length;++nr=0?1:-1,Sr=nr*hr,li=y(Ft),di=_(Ft),mi=te*di,Oi=he*li+mi*y(Sr),dn=mi*nr*_(Sr);re.add(b(dn,Oi)),Ce=bt,he=li,te=di}function me(bt){return ne.reset(),W(bt,ke),ne*2}function Be(bt){return[b(bt[1],bt[0]),T(bt[2])]}function fe(bt){var Ft=bt[0],hr=bt[1],nr=y(hr);return[nr*y(Ft),nr*_(Ft),_(hr)]}function Ze(bt,Ft){return bt[0]*Ft[0]+bt[1]*Ft[1]+bt[2]*Ft[2]}function et(bt,Ft){return[bt[1]*Ft[2]-bt[2]*Ft[1],bt[2]*Ft[0]-bt[0]*Ft[2],bt[0]*Ft[1]-bt[1]*Ft[0]]}function gt(bt,Ft){bt[0]+=Ft[0],bt[1]+=Ft[1],bt[2]+=Ft[2]}function Pt(bt,Ft){return[bt[0]*Ft,bt[1]*Ft,bt[2]*Ft]}function Qe(bt){var Ft=M(bt[0]*bt[0]+bt[1]*bt[1]+bt[2]*bt[2]);bt[0]/=Ft,bt[1]/=Ft,bt[2]/=Ft}var Xe,Tt,xt,_t,Ct,jt,At,Te,nt=r(),ut,ct,rt={point:je,lineStart:Je,lineEnd:Mt,polygonStart:function(){rt.point=Vt,rt.lineStart=Kt,rt.lineEnd=ir,nt.reset(),ke.polygonStart()},polygonEnd:function(){ke.polygonEnd(),rt.point=je,rt.lineStart=Je,rt.lineEnd=Mt,re<0?(Xe=-(xt=180),Tt=-(_t=90)):nt>o?_t=90:nt<-o&&(Tt=-90),ct[0]=Xe,ct[1]=xt},sphere:function(){Xe=-(xt=180),Tt=-(_t=90)}};function je(bt,Ft){ut.push(ct=[Xe=bt,xt=bt]),Ft_t&&(_t=Ft)}function tt(bt,Ft){var hr=fe([bt*d,Ft*d]);if(Te){var nr=et(Te,hr),Sr=[nr[1],-nr[0],0],li=et(Sr,nr);Qe(li),li=Be(li);var di=bt-Ct,mi=di>0?1:-1,Oi=li[0]*h*mi,dn,wi=p(di)>180;wi^(mi*Ct_t&&(_t=dn)):(Oi=(Oi+360)%360-180,wi^(mi*Ct_t&&(_t=Ft))),wi?btfr(Xe,xt)&&(xt=bt):fr(bt,xt)>fr(Xe,xt)&&(Xe=bt):xt>=Xe?(btxt&&(xt=bt)):bt>Ct?fr(Xe,bt)>fr(Xe,xt)&&(xt=bt):fr(bt,xt)>fr(Xe,xt)&&(Xe=bt)}else ut.push(ct=[Xe=bt,xt=bt]);Ft_t&&(_t=Ft),Te=hr,Ct=bt}function Je(){rt.point=tt}function Mt(){ct[0]=Xe,ct[1]=xt,rt.point=je,Te=null}function Vt(bt,Ft){if(Te){var hr=bt-Ct;nt.add(p(hr)>180?hr+(hr>0?360:-360):hr)}else jt=bt,At=Ft;ke.point(bt,Ft),tt(bt,Ft)}function Kt(){ke.lineStart()}function ir(){Vt(jt,At),ke.lineEnd(),p(nt)>o&&(Xe=-(xt=180)),ct[0]=Xe,ct[1]=xt,Te=null}function fr(bt,Ft){return(Ft-=bt)<0?Ft+360:Ft}function Ot(bt,Ft){return bt[0]-Ft[0]}function De(bt,Ft){return bt[0]<=bt[1]?bt[0]<=Ft&&Ft<=bt[1]:Ftfr(nr[0],nr[1])&&(nr[1]=Sr[1]),fr(Sr[0],nr[1])>fr(nr[0],nr[1])&&(nr[0]=Sr[0])):li.push(nr=Sr);for(di=-1/0,hr=li.length-1,Ft=0,nr=li[hr];Ft<=hr;nr=Sr,++Ft)Sr=li[Ft],(mi=fr(nr[1],Sr[0]))>di&&(di=mi,Xe=Sr[0],xt=nr[1])}return ut=ct=null,Xe===1/0||Tt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xe,Tt],[xt,_t]]}var Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei={sphere:q,point:Si,lineStart:Hi,lineEnd:Di,polygonStart:function(){Ei.lineStart=Lt,Ei.lineEnd=vt},polygonEnd:function(){Ei.lineStart=Hi,Ei.lineEnd=Di}};function Si(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft);xi(hr*y(bt),hr*_(bt),_(Ft))}function xi(bt,Ft,hr){++Fe,Ie+=(bt-Ie)/Fe,lt+=(Ft-lt)/Fe,ye+=(hr-ye)/Fe}function Hi(){Ei.point=Jr}function Jr(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft);vr=hr*y(bt),Er=hr*_(bt),si=_(Ft),Ei.point=ci,xi(vr,Er,si)}function ci(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft),nr=hr*y(bt),Sr=hr*_(bt),li=_(Ft),di=b(M((di=Er*li-si*Sr)*di+(di=si*nr-vr*li)*di+(di=vr*Sr-Er*nr)*di),vr*nr+Er*Sr+si*li);Pe+=di,ue+=di*(vr+(vr=nr)),de+=di*(Er+(Er=Sr)),ht+=di*(si+(si=li)),xi(vr,Er,si)}function Di(){Ei.point=Si}function Lt(){Ei.point=Dt}function vt(){Bt(qr,Lr),Ei.point=Si}function Dt(bt,Ft){qr=bt,Lr=Ft,bt*=d,Ft*=d,Ei.point=Bt;var hr=y(Ft);vr=hr*y(bt),Er=hr*_(bt),si=_(Ft),xi(vr,Er,si)}function Bt(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft),nr=hr*y(bt),Sr=hr*_(bt),li=_(Ft),di=Er*li-si*Sr,mi=si*nr-vr*li,Oi=vr*Sr-Er*nr,dn=M(di*di+mi*mi+Oi*Oi),wi=T(dn),ui=dn&&-wi/dn;Et+=ui*di,St+=ui*mi,Zt+=ui*Oi,Pe+=wi,ue+=wi*(vr+(vr=nr)),de+=wi*(Er+(Er=Sr)),ht+=wi*(si+(si=li)),xi(vr,Er,si)}function sr(bt){Fe=Pe=Ie=lt=ye=ue=de=ht=Et=St=Zt=0,W(bt,Ei);var Ft=Et,hr=St,nr=Zt,Sr=Ft*Ft+hr*hr+nr*nr;return Sru?bt+Math.round(-bt/c)*c:bt,Ft]}Tr.invert=Tr;function Rr(bt,Ft,hr){return(bt%=c)?Ft||hr?zr(oi(bt),vi(Ft,hr)):oi(bt):Ft||hr?vi(Ft,hr):Tr}function Br(bt){return function(Ft,hr){return Ft+=bt,[Ft>u?Ft-c:Ft<-u?Ft+c:Ft,hr]}}function oi(bt){var Ft=Br(bt);return Ft.invert=Br(-bt),Ft}function vi(bt,Ft){var hr=y(bt),nr=_(bt),Sr=y(Ft),li=_(Ft);function di(mi,Oi){var dn=y(Oi),wi=y(mi)*dn,ui=_(mi)*dn,Ai=_(Oi),gi=Ai*hr+wi*nr;return[b(ui*Sr-gi*li,wi*hr-Ai*nr),T(gi*Sr+ui*li)]}return di.invert=function(mi,Oi){var dn=y(Oi),wi=y(mi)*dn,ui=_(mi)*dn,Ai=_(Oi),gi=Ai*Sr-ui*li;return[b(ui*Sr+Ai*li,wi*hr+gi*nr),T(gi*hr-wi*nr)]},di}function Pi(bt){bt=Rr(bt[0]*d,bt[1]*d,bt.length>2?bt[2]*d:0);function Ft(hr){return hr=bt(hr[0]*d,hr[1]*d),hr[0]*=h,hr[1]*=h,hr}return Ft.invert=function(hr){return hr=bt.invert(hr[0]*d,hr[1]*d),hr[0]*=h,hr[1]*=h,hr},Ft}function Yr(bt,Ft,hr,nr,Sr,li){if(hr){var di=y(Ft),mi=_(Ft),Oi=nr*hr;Sr==null?(Sr=Ft+nr*c,li=Ft-Oi/2):(Sr=Ni(di,Sr),li=Ni(di,li),(nr>0?Srli)&&(Sr+=nr*c));for(var dn,wi=Sr;nr>0?wi>li:wi1&&bt.push(bt.pop().concat(bt.shift()))},result:function(){var hr=bt;return bt=[],Ft=null,hr}}}function ki(bt,Ft){return p(bt[0]-Ft[0])=0;--mi)Sr.point((ui=wi[mi])[0],ui[1]);else nr(Ai.x,Ai.p.x,-1,Sr);Ai=Ai.p}Ai=Ai.o,wi=Ai.z,gi=!gi}while(!Ai.v);Sr.lineEnd()}}}function zi(bt){if(Ft=bt.length){for(var Ft,hr=0,nr=bt[0],Sr;++hr=0?1:-1,ol=Js*Bs,Cl=ol>u,ul=In*Lo;if(Mi.add(b(ul*Js*_(ol),Vn*us+ul*y(ol))),di+=Cl?Bs+Js*c:Bs,Cl^gi>=hr^Gn>=hr){var Gl=et(fe(Ai),fe(Hn));Qe(Gl);var Vl=et(li,Gl);Qe(Vl);var Fl=(Cl^Bs>=0?-1:1)*T(Vl[2]);(nr>Fl||nr===Fl&&(Gl[0]||Gl[1]))&&(mi+=Cl^Bs>=0?1:-1)}}return(di<-o||di0){for(Oi||(Sr.polygonStart(),Oi=!0),Sr.lineStart(),us=0;us1&&pn&2&&Lo.push(Lo.pop().concat(Lo.shift())),wi.push(Lo.filter(st))}}return Ai}}function st(bt){return bt.length>1}function Wt(bt,Ft){return((bt=bt.x)[0]<0?bt[1]-l-o:l-bt[1])-((Ft=Ft.x)[0]<0?Ft[1]-l-o:l-Ft[1])}var tr=Or(function(){return!0},or,hi,[-u,-l]);function or(bt){var Ft=NaN,hr=NaN,nr=NaN,Sr;return{lineStart:function(){bt.lineStart(),Sr=1},point:function(li,di){var mi=li>0?u:-u,Oi=p(li-Ft);p(Oi-u)0?l:-l),bt.point(nr,hr),bt.lineEnd(),bt.lineStart(),bt.point(mi,hr),bt.point(li,hr),Sr=0):nr!==mi&&Oi>=u&&(p(Ft-nr)o?x((_(Ft)*(li=y(nr))*_(hr)-_(nr)*(Sr=y(Ft))*_(bt))/(Sr*li*di)):(Ft+nr)/2}function hi(bt,Ft,hr,nr){var Sr;if(bt==null)Sr=hr*l,nr.point(-u,Sr),nr.point(0,Sr),nr.point(u,Sr),nr.point(u,0),nr.point(u,-Sr),nr.point(0,-Sr),nr.point(-u,-Sr),nr.point(-u,0),nr.point(-u,Sr);else if(p(bt[0]-Ft[0])>o){var li=bt[0]0,Sr=p(Ft)>o;function li(wi,ui,Ai,gi){Yr(gi,bt,hr,Ai,wi,ui)}function di(wi,ui){return y(wi)*y(ui)>Ft}function mi(wi){var ui,Ai,gi,gn,In;return{lineStart:function(){gn=gi=!1,In=1},point:function(Vn,Rn){var Hn=[Vn,Rn],Gn,pn=di(Vn,Rn),Lo=nr?pn?0:dn(Vn,Rn):pn?dn(Vn+(Vn<0?u:-u),Rn):0;if(!ui&&(gn=gi=pn)&&wi.lineStart(),pn!==gi&&(Gn=Oi(ui,Hn),(!Gn||ki(ui,Gn)||ki(Hn,Gn))&&(Hn[2]=1)),pn!==gi)In=0,pn?(wi.lineStart(),Gn=Oi(Hn,ui),wi.point(Gn[0],Gn[1])):(Gn=Oi(ui,Hn),wi.point(Gn[0],Gn[1],2),wi.lineEnd()),ui=Gn;else if(Sr&&ui&&nr^pn){var us;!(Lo&Ai)&&(us=Oi(Hn,ui,!0))&&(In=0,nr?(wi.lineStart(),wi.point(us[0][0],us[0][1]),wi.point(us[1][0],us[1][1]),wi.lineEnd()):(wi.point(us[1][0],us[1][1]),wi.lineEnd(),wi.lineStart(),wi.point(us[0][0],us[0][1],3)))}pn&&(!ui||!ki(ui,Hn))&&wi.point(Hn[0],Hn[1]),ui=Hn,gi=pn,Ai=Lo},lineEnd:function(){gi&&wi.lineEnd(),ui=null},clean:function(){return In|(gn&&gi)<<1}}}function Oi(wi,ui,Ai){var gi=fe(wi),gn=fe(ui),In=[1,0,0],Vn=et(gi,gn),Rn=Ze(Vn,Vn),Hn=Vn[0],Gn=Rn-Hn*Hn;if(!Gn)return!Ai&&wi;var pn=Ft*Rn/Gn,Lo=-Ft*Hn/Gn,us=et(In,Vn),Bs=Pt(In,pn),Js=Pt(Vn,Lo);gt(Bs,Js);var ol=us,Cl=Ze(Bs,ol),ul=Ze(ol,ol),Gl=Cl*Cl-ul*(Ze(Bs,Bs)-1);if(!(Gl<0)){var Vl=M(Gl),Fl=Pt(ol,(-Cl-Vl)/ul);if(gt(Fl,Bs),Fl=Be(Fl),!Ai)return Fl;var ga=wi[0],ko=ui[0],zs=wi[1],Fo=ui[1],Ys;ko0^Fl[1]<(p(Fl[0]-ga)u^(ga<=Fl[0]&&Fl[0]<=ko)){var _l=Pt(ol,(-Cl+Vl)/ul);return gt(_l,Bs),[Fl,Be(_l)]}}}function dn(wi,ui){var Ai=nr?bt:u-bt,gi=0;return wi<-Ai?gi|=1:wi>Ai&&(gi|=2),ui<-Ai?gi|=4:ui>Ai&&(gi|=8),gi}return Or(di,mi,li,nr?[0,-bt]:[-u,bt-u])}function Qr(bt,Ft,hr,nr,Sr,li){var di=bt[0],mi=bt[1],Oi=Ft[0],dn=Ft[1],wi=0,ui=1,Ai=Oi-di,gi=dn-mi,gn;if(gn=hr-di,!(!Ai&&gn>0)){if(gn/=Ai,Ai<0){if(gn0){if(gn>ui)return;gn>wi&&(wi=gn)}if(gn=Sr-di,!(!Ai&&gn<0)){if(gn/=Ai,Ai<0){if(gn>ui)return;gn>wi&&(wi=gn)}else if(Ai>0){if(gn0)){if(gn/=gi,gi<0){if(gn0){if(gn>ui)return;gn>wi&&(wi=gn)}if(gn=li-mi,!(!gi&&gn<0)){if(gn/=gi,gi<0){if(gn>ui)return;gn>wi&&(wi=gn)}else if(gi>0){if(gn0&&(bt[0]=di+wi*Ai,bt[1]=mi+wi*gi),ui<1&&(Ft[0]=di+ui*Ai,Ft[1]=mi+ui*gi),!0}}}}}var Ui=1e9,zn=-Ui;function fn(bt,Ft,hr,nr){function Sr(dn,wi){return bt<=dn&&dn<=hr&&Ft<=wi&&wi<=nr}function li(dn,wi,ui,Ai){var gi=0,gn=0;if(dn==null||(gi=di(dn,ui))!==(gn=di(wi,ui))||Oi(dn,wi)<0^ui>0)do Ai.point(gi===0||gi===3?bt:hr,gi>1?nr:Ft);while((gi=(gi+ui+4)%4)!==gn);else Ai.point(wi[0],wi[1])}function di(dn,wi){return p(dn[0]-bt)0?0:3:p(dn[0]-hr)0?2:1:p(dn[1]-Ft)0?1:0:wi>0?3:2}function mi(dn,wi){return Oi(dn.x,wi.x)}function Oi(dn,wi){var ui=di(dn,1),Ai=di(wi,1);return ui!==Ai?ui-Ai:ui===0?wi[1]-dn[1]:ui===1?dn[0]-wi[0]:ui===2?dn[1]-wi[1]:wi[0]-dn[0]}return function(dn){var wi=dn,ui=ti(),Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs={point:Js,lineStart:Gl,lineEnd:Vl,polygonStart:Cl,polygonEnd:ul};function Js(ga,ko){Sr(ga,ko)&&wi.point(ga,ko)}function ol(){for(var ga=0,ko=0,zs=gi.length;konr&&(kl-Sl)*(nr-_l)>(cl-_l)*(bt-Sl)&&++ga:cl<=nr&&(kl-Sl)*(nr-_l)<(cl-_l)*(bt-Sl)&&--ga;return ga}function Cl(){wi=ui,Ai=[],gi=[],us=!0}function ul(){var ga=ol(),ko=us&&ga,zs=(Ai=t.merge(Ai)).length;(ko||zs)&&(dn.polygonStart(),ko&&(dn.lineStart(),li(null,null,1,dn),dn.lineEnd()),zs&&Vi(Ai,mi,ga,li,dn),dn.polygonEnd()),wi=dn,Ai=gi=gn=null}function Gl(){Bs.point=Fl,gi&&gi.push(gn=[]),Lo=!0,pn=!1,Hn=Gn=NaN}function Vl(){Ai&&(Fl(In,Vn),Rn&&pn&&ui.rejoin(),Ai.push(ui.result())),Bs.point=Js,pn&&wi.lineEnd()}function Fl(ga,ko){var zs=Sr(ga,ko);if(gi&&gn.push([ga,ko]),Lo)In=ga,Vn=ko,Rn=zs,Lo=!1,zs&&(wi.lineStart(),wi.point(ga,ko));else if(zs&&pn)wi.point(ga,ko);else{var Fo=[Hn=Math.max(zn,Math.min(Ui,Hn)),Gn=Math.max(zn,Math.min(Ui,Gn))],Ys=[ga=Math.max(zn,Math.min(Ui,ga)),ko=Math.max(zn,Math.min(Ui,ko))];Qr(Fo,Ys,bt,Ft,hr,nr)?(pn||(wi.lineStart(),wi.point(Fo[0],Fo[1])),wi.point(Ys[0],Ys[1]),zs||wi.lineEnd(),us=!1):zs&&(wi.lineStart(),wi.point(ga,ko),us=!1)}Hn=ga,Gn=ko,pn=zs}return Bs}}function xn(){var bt=0,Ft=0,hr=960,nr=500,Sr,li,di;return di={stream:function(mi){return Sr&&li===mi?Sr:Sr=fn(bt,Ft,hr,nr)(li=mi)},extent:function(mi){return arguments.length?(bt=+mi[0][0],Ft=+mi[0][1],hr=+mi[1][0],nr=+mi[1][1],Sr=li=null,di):[[bt,Ft],[hr,nr]]}}}var _a=r(),Wn,Fn,ia,za={sphere:q,point:q,lineStart:Hr,lineEnd:q,polygonStart:q,polygonEnd:q};function Hr(){za.point=go,za.lineEnd=na}function na(){za.point=za.lineEnd=q}function go(bt,Ft){bt*=d,Ft*=d,Wn=bt,Fn=_(Ft),ia=y(Ft),za.point=Dn}function Dn(bt,Ft){bt*=d,Ft*=d;var hr=_(Ft),nr=y(Ft),Sr=p(bt-Wn),li=y(Sr),di=_(Sr),mi=nr*di,Oi=ia*hr-Fn*nr*li,dn=Fn*hr+ia*nr*li;_a.add(b(M(mi*mi+Oi*Oi),dn)),Wn=bt,Fn=hr,ia=nr}function un(bt){return _a.reset(),W(bt,za),+_a}var Zn=[null,null],Wo={type:"LineString",coordinates:Zn};function Ba(bt,Ft){return Zn[0]=bt,Zn[1]=Ft,un(Wo)}var Bo={Feature:function(bt,Ft){return Ha(bt.geometry,Ft)},FeatureCollection:function(bt,Ft){for(var hr=bt.features,nr=-1,Sr=hr.length;++nr0&&(Sr=Ba(bt[li],bt[li-1]),Sr>0&&hr<=Sr&&nr<=Sr&&(hr+nr-Sr)*(1-Math.pow((hr-nr)/Sr,2))o}).map(Ai)).concat(t.range(E(li/dn)*dn,Sr,dn).filter(function(Gn){return p(Gn%ui)>o}).map(gi))}return Rn.lines=function(){return Hn().map(function(Gn){return{type:"LineString",coordinates:Gn}})},Rn.outline=function(){return{type:"Polygon",coordinates:[gn(nr).concat(In(di).slice(1),gn(hr).reverse().slice(1),In(mi).reverse().slice(1))]}},Rn.extent=function(Gn){return arguments.length?Rn.extentMajor(Gn).extentMinor(Gn):Rn.extentMinor()},Rn.extentMajor=function(Gn){return arguments.length?(nr=+Gn[0][0],hr=+Gn[1][0],mi=+Gn[0][1],di=+Gn[1][1],nr>hr&&(Gn=nr,nr=hr,hr=Gn),mi>di&&(Gn=mi,mi=di,di=Gn),Rn.precision(Vn)):[[nr,mi],[hr,di]]},Rn.extentMinor=function(Gn){return arguments.length?(Ft=+Gn[0][0],bt=+Gn[1][0],li=+Gn[0][1],Sr=+Gn[1][1],Ft>bt&&(Gn=Ft,Ft=bt,bt=Gn),li>Sr&&(Gn=li,li=Sr,Sr=Gn),Rn.precision(Vn)):[[Ft,li],[bt,Sr]]},Rn.step=function(Gn){return arguments.length?Rn.stepMajor(Gn).stepMinor(Gn):Rn.stepMinor()},Rn.stepMajor=function(Gn){return arguments.length?(wi=+Gn[0],ui=+Gn[1],Rn):[wi,ui]},Rn.stepMinor=function(Gn){return arguments.length?(Oi=+Gn[0],dn=+Gn[1],Rn):[Oi,dn]},Rn.precision=function(Gn){return arguments.length?(Vn=+Gn,Ai=Ri(li,Sr,90),gi=an(Ft,bt,Vn),gn=Ri(mi,di,90),In=an(nr,hr,Vn),Rn):Vn},Rn.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function pa(){return cs()()}function ln(bt,Ft){var hr=bt[0]*d,nr=bt[1]*d,Sr=Ft[0]*d,li=Ft[1]*d,di=y(nr),mi=_(nr),Oi=y(li),dn=_(li),wi=di*y(hr),ui=di*_(hr),Ai=Oi*y(Sr),gi=Oi*_(Sr),gn=2*T(M(F(li-nr)+di*Oi*F(Sr-hr))),In=_(gn),Vn=gn?function(Rn){var Hn=_(Rn*=gn)/In,Gn=_(gn-Rn)/In,pn=Gn*wi+Hn*Ai,Lo=Gn*ui+Hn*gi,us=Gn*mi+Hn*dn;return[b(Lo,pn)*h,b(us,M(pn*pn+Lo*Lo))*h]}:function(){return[hr*h,nr*h]};return Vn.distance=gn,Vn}function ka(bt){return bt}var va=r(),bo=r(),Co,Fi,Yn,xa,Qi={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Qi.lineStart=Nn,Qi.lineEnd=jo},polygonEnd:function(){Qi.lineStart=Qi.lineEnd=Qi.point=q,va.add(p(bo)),bo.reset()},result:function(){var bt=va/2;return va.reset(),bt}};function Nn(){Qi.point=Pn}function Pn(bt,Ft){Qi.point=qa,Co=Yn=bt,Fi=xa=Ft}function qa(bt,Ft){bo.add(xa*bt-Yn*Ft),Yn=bt,xa=Ft}function jo(){qa(Co,Fi)}var Vo=1/0,Pa=Vo,Oa=-Vo,co=Oa,An={point:_o,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var bt=[[Vo,Pa],[Oa,co]];return Oa=co=-(Pa=Vo=1/0),bt}};function _o(bt,Ft){btOa&&(Oa=bt),Ftco&&(co=Ft)}var ks=0,bs=0,ps=0,sa=0,Bn=0,ms=0,ya=0,on=0,mn=0,Ga,ca,bn,Xi,qn={point:Ia,lineStart:yn,lineEnd:Da,polygonStart:function(){qn.lineStart=Aa,qn.lineEnd=Ln},polygonEnd:function(){qn.point=Ia,qn.lineStart=yn,qn.lineEnd=Da},result:function(){var bt=mn?[ya/mn,on/mn]:ms?[sa/ms,Bn/ms]:ps?[ks/ps,bs/ps]:[NaN,NaN];return ks=bs=ps=sa=Bn=ms=ya=on=mn=0,bt}};function Ia(bt,Ft){ks+=bt,bs+=Ft,++ps}function yn(){qn.point=Ya}function Ya(bt,Ft){qn.point=ba,Ia(bn=bt,Xi=Ft)}function ba(bt,Ft){var hr=bt-bn,nr=Ft-Xi,Sr=M(hr*hr+nr*nr);sa+=Sr*(bn+bt)/2,Bn+=Sr*(Xi+Ft)/2,ms+=Sr,Ia(bn=bt,Xi=Ft)}function Da(){qn.point=Ia}function Aa(){qn.point=wo}function Ln(){wa(Ga,ca)}function wo(bt,Ft){qn.point=wa,Ia(Ga=bn=bt,ca=Xi=Ft)}function wa(bt,Ft){var hr=bt-bn,nr=Ft-Xi,Sr=M(hr*hr+nr*nr);sa+=Sr*(bn+bt)/2,Bn+=Sr*(Xi+Ft)/2,ms+=Sr,Sr=Xi*bt-bn*Ft,ya+=Sr*(bn+bt),on+=Sr*(Xi+Ft),mn+=Sr*3,Ia(bn=bt,Xi=Ft)}function $i(bt){this._context=bt}$i.prototype={_radius:4.5,pointRadius:function(bt){return this._radius=bt,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(bt,Ft){switch(this._point){case 0:{this._context.moveTo(bt,Ft),this._point=1;break}case 1:{this._context.lineTo(bt,Ft);break}default:{this._context.moveTo(bt+this._radius,Ft),this._context.arc(bt,Ft,this._radius,0,c);break}}},result:q};var ea=r(),Sa,Za,xo,Wa,hn,Un={point:q,lineStart:function(){Un.point=Ss},lineEnd:function(){Sa&&Kn(Za,xo),Un.point=q},polygonStart:function(){Sa=!0},polygonEnd:function(){Sa=null},result:function(){var bt=+ea;return ea.reset(),bt}};function Ss(bt,Ft){Un.point=Kn,Za=Wa=bt,xo=hn=Ft}function Kn(bt,Ft){Wa-=bt,hn-=Ft,ea.add(M(Wa*Wa+hn*hn)),Wa=bt,hn=Ft}function ns(){this._string=[]}ns.prototype={_radius:4.5,_circle:Jo(4.5),pointRadius:function(bt){return(bt=+bt)!==this._radius&&(this._radius=bt,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(bt,Ft){switch(this._point){case 0:{this._string.push("M",bt,",",Ft),this._point=1;break}case 1:{this._string.push("L",bt,",",Ft);break}default:{this._circle==null&&(this._circle=Jo(this._radius)),this._string.push("M",bt,",",Ft,this._circle);break}}},result:function(){if(this._string.length){var bt=this._string.join("");return this._string=[],bt}else return null}};function Jo(bt){return"m0,"+bt+"a"+bt+","+bt+" 0 1,1 0,"+-2*bt+"a"+bt+","+bt+" 0 1,1 0,"+2*bt+"z"}function vo(bt,Ft){var hr=4.5,nr,Sr;function li(di){return di&&(typeof hr=="function"&&Sr.pointRadius(+hr.apply(this,arguments)),W(di,nr(Sr))),Sr.result()}return li.area=function(di){return W(di,nr(Qi)),Qi.result()},li.measure=function(di){return W(di,nr(Un)),Un.result()},li.bounds=function(di){return W(di,nr(An)),An.result()},li.centroid=function(di){return W(di,nr(qn)),qn.result()},li.projection=function(di){return arguments.length?(nr=di==null?(bt=null,ka):(bt=di).stream,li):bt},li.context=function(di){return arguments.length?(Sr=di==null?(Ft=null,new ns):new $i(Ft=di),typeof hr!="function"&&Sr.pointRadius(hr),li):Ft},li.pointRadius=function(di){return arguments.length?(hr=typeof di=="function"?di:(Sr.pointRadius(+di),+di),li):hr},li.projection(bt).context(Ft)}function ma(bt){return{stream:ja(bt)}}function ja(bt){return function(Ft){var hr=new To;for(var nr in bt)hr[nr]=bt[nr];return hr.stream=Ft,hr}}function To(){}To.prototype={constructor:To,point:function(bt,Ft){this.stream.point(bt,Ft)},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 Ao(bt,Ft,hr){var nr=bt.clipExtent&&bt.clipExtent();return bt.scale(150).translate([0,0]),nr!=null&&bt.clipExtent(null),W(hr,bt.stream(An)),Ft(An.result()),nr!=null&&bt.clipExtent(nr),bt}function la(bt,Ft,hr){return Ao(bt,function(nr){var Sr=Ft[1][0]-Ft[0][0],li=Ft[1][1]-Ft[0][1],di=Math.min(Sr/(nr[1][0]-nr[0][0]),li/(nr[1][1]-nr[0][1])),mi=+Ft[0][0]+(Sr-di*(nr[1][0]+nr[0][0]))/2,Oi=+Ft[0][1]+(li-di*(nr[1][1]+nr[0][1]))/2;bt.scale(150*di).translate([mi,Oi])},hr)}function Ki(bt,Ft,hr){return la(bt,[[0,0],Ft],hr)}function ho(bt,Ft,hr){return Ao(bt,function(nr){var Sr=+Ft,li=Sr/(nr[1][0]-nr[0][0]),di=(Sr-li*(nr[1][0]+nr[0][0]))/2,mi=-li*nr[0][1];bt.scale(150*li).translate([di,mi])},hr)}function Ka(bt,Ft,hr){return Ao(bt,function(nr){var Sr=+Ft,li=Sr/(nr[1][1]-nr[0][1]),di=-li*nr[0][0],mi=(Sr-li*(nr[1][1]+nr[0][1]))/2;bt.scale(150*li).translate([di,mi])},hr)}var Ca=16,ta=y(30*d);function En(bt,Ft){return+Ft?Ds(bt,Ft):Mo(bt)}function Mo(bt){return ja({point:function(Ft,hr){Ft=bt(Ft,hr),this.stream.point(Ft[0],Ft[1])}})}function Ds(bt,Ft){function hr(nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn){var Rn=dn-nr,Hn=wi-Sr,Gn=Rn*Rn+Hn*Hn;if(Gn>4*Ft&&In--){var pn=di+Ai,Lo=mi+gi,us=Oi+gn,Bs=M(pn*pn+Lo*Lo+us*us),Js=T(us/=Bs),ol=p(p(us)-1)Ft||p((Rn*Vl+Hn*Fl)/Gn-.5)>.3||di*Ai+mi*gi+Oi*gn2?ga[2]%360*d:0,Vl()):[mi*h,Oi*h,dn*h]},ul.angle=function(ga){return arguments.length?(ui=ga%360*d,Vl()):ui*h},ul.reflectX=function(ga){return arguments.length?(Ai=ga?-1:1,Vl()):Ai<0},ul.reflectY=function(ga){return arguments.length?(gi=ga?-1:1,Vl()):gi<0},ul.precision=function(ga){return arguments.length?(us=En(Bs,Lo=ga*ga),Fl()):M(Lo)},ul.fitExtent=function(ga,ko){return la(ul,ga,ko)},ul.fitSize=function(ga,ko){return Ki(ul,ga,ko)},ul.fitWidth=function(ga,ko){return ho(ul,ga,ko)},ul.fitHeight=function(ga,ko){return Ka(ul,ga,ko)};function Vl(){var ga=as(hr,0,0,Ai,gi,ui).apply(null,Ft(li,di)),ko=(ui?as:Ks)(hr,nr-ga[0],Sr-ga[1],Ai,gi,ui);return wi=Rr(mi,Oi,dn),Bs=zr(Ft,ko),Js=zr(wi,Bs),us=En(Bs,Lo),Fl()}function Fl(){return ol=Cl=null,ul}return function(){return Ft=bt.apply(this,arguments),ul.invert=Ft.invert&&Gl,Vl()}}function Xa(bt){var Ft=0,hr=u/3,nr=Cs(bt),Sr=nr(Ft,hr);return Sr.parallels=function(li){return arguments.length?nr(Ft=li[0]*d,hr=li[1]*d):[Ft*h,hr*h]},Sr}function Zo(bt){var Ft=y(bt);function hr(nr,Sr){return[nr*Ft,_(Sr)/Ft]}return hr.invert=function(nr,Sr){return[nr/Ft,T(Sr*Ft)]},hr}function Eo(bt,Ft){var hr=_(bt),nr=(hr+_(Ft))/2;if(p(nr)=.12&&Vn<.234&&In>=-.425&&In<-.214?Sr:Vn>=.166&&Vn<.234&&In>=-.214&&In<-.115?di:hr).invert(Ai)},wi.stream=function(Ai){return bt&&Ft===Ai?bt:bt=Xo([hr.stream(Ft=Ai),Sr.stream(Ai),di.stream(Ai)])},wi.precision=function(Ai){return arguments.length?(hr.precision(Ai),Sr.precision(Ai),di.precision(Ai),ui()):hr.precision()},wi.scale=function(Ai){return arguments.length?(hr.scale(Ai),Sr.scale(Ai*.35),di.scale(Ai),wi.translate(hr.translate())):hr.scale()},wi.translate=function(Ai){if(!arguments.length)return hr.translate();var gi=hr.scale(),gn=+Ai[0],In=+Ai[1];return nr=hr.translate(Ai).clipExtent([[gn-.455*gi,In-.238*gi],[gn+.455*gi,In+.238*gi]]).stream(dn),li=Sr.translate([gn-.307*gi,In+.201*gi]).clipExtent([[gn-.425*gi+o,In+.12*gi+o],[gn-.214*gi-o,In+.234*gi-o]]).stream(dn),mi=di.translate([gn-.205*gi,In+.212*gi]).clipExtent([[gn-.214*gi+o,In+.166*gi+o],[gn-.115*gi-o,In+.234*gi-o]]).stream(dn),ui()},wi.fitExtent=function(Ai,gi){return la(wi,Ai,gi)},wi.fitSize=function(Ai,gi){return Ki(wi,Ai,gi)},wi.fitWidth=function(Ai,gi){return ho(wi,Ai,gi)},wi.fitHeight=function(Ai,gi){return Ka(wi,Ai,gi)};function ui(){return bt=Ft=null,wi}return wi.scale(1070)}function $n(bt){return function(Ft,hr){var nr=y(Ft),Sr=y(hr),li=bt(nr*Sr);return[li*Sr*_(Ft),li*_(hr)]}}function Sn(bt){return function(Ft,hr){var nr=M(Ft*Ft+hr*hr),Sr=bt(nr),li=_(Sr),di=y(Sr);return[b(Ft*li,nr*di),T(nr&&hr*li/nr)]}}var uo=$n(function(bt){return M(2/(1+bt))});uo.invert=Sn(function(bt){return 2*T(bt/2)});function Rs(){return Jn(uo).scale(124.75).clipAngle(180-.001)}var xs=$n(function(bt){return(bt=z(bt))&&bt/_(bt)});xs.invert=Sn(function(bt){return bt});function Go(){return Jn(xs).scale(79.4188).clipAngle(180-.001)}function os(bt,Ft){return[bt,A(v((l+Ft)/2))]}os.invert=function(bt,Ft){return[bt,2*x(k(Ft))-l]};function So(){return Qn(os).scale(961/c)}function Qn(bt){var Ft=Jn(bt),hr=Ft.center,nr=Ft.scale,Sr=Ft.translate,li=Ft.clipExtent,di=null,mi,Oi,dn;Ft.scale=function(ui){return arguments.length?(nr(ui),wi()):nr()},Ft.translate=function(ui){return arguments.length?(Sr(ui),wi()):Sr()},Ft.center=function(ui){return arguments.length?(hr(ui),wi()):hr()},Ft.clipExtent=function(ui){return arguments.length?(ui==null?di=mi=Oi=dn=null:(di=+ui[0][0],mi=+ui[0][1],Oi=+ui[1][0],dn=+ui[1][1]),wi()):di==null?null:[[di,mi],[Oi,dn]]};function wi(){var ui=u*nr(),Ai=Ft(Pi(Ft.rotate()).invert([0,0]));return li(di==null?[[Ai[0]-ui,Ai[1]-ui],[Ai[0]+ui,Ai[1]+ui]]:bt===os?[[Math.max(Ai[0]-ui,di),mi],[Math.min(Ai[0]+ui,Oi),dn]]:[[di,Math.max(Ai[1]-ui,mi)],[Oi,Math.min(Ai[1]+ui,dn)]])}return wi()}function zo(bt){return v((l+bt)/2)}function rl(bt,Ft){var hr=y(bt),nr=bt===Ft?_(bt):A(hr/y(Ft))/A(zo(Ft)/zo(bt)),Sr=hr*L(zo(bt),nr)/nr;if(!nr)return os;function li(di,mi){Sr>0?mi<-l+o&&(mi=-l+o):mi>l-o&&(mi=l-o);var Oi=Sr/L(zo(mi),nr);return[Oi*_(nr*di),Sr-Oi*y(nr*di)]}return li.invert=function(di,mi){var Oi=Sr-mi,dn=C(nr)*M(di*di+Oi*Oi),wi=b(di,p(Oi))*C(Oi);return Oi*nr<0&&(wi-=u*C(di)*C(Oi)),[wi/nr,2*x(L(Sr/dn,1/nr))-l]},li}function $o(){return Xa(rl).scale(109.5).parallels([30,30])}function Na(bt,Ft){return[bt,Ft]}Na.invert=Na;function Ua(){return Jn(Na).scale(152.63)}function Po(bt,Ft){var hr=y(bt),nr=bt===Ft?_(bt):(hr-y(Ft))/(Ft-bt),Sr=hr/nr+bt;if(p(nr)o&&--nr>0);return[bt/(.8707+(li=hr*hr)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),hr]};function Xs(){return Jn(ds).scale(175.295)}function oa(bt,Ft){return[y(Ft)*_(bt),_(Ft)]}oa.invert=Sn(T);function Yo(){return Jn(oa).scale(249.5).clipAngle(90+o)}function po(bt,Ft){var hr=y(Ft),nr=1+y(bt)*hr;return[hr*_(bt)/nr,_(Ft)/nr]}po.invert=Sn(function(bt){return 2*x(bt)});function ss(){return Jn(po).scale(250).clipAngle(142)}function ls(bt,Ft){return[A(v((l+Ft)/2)),-bt]}ls.invert=function(bt,Ft){return[-Ft,2*x(k(bt))-l]};function gs(){var bt=Qn(ls),Ft=bt.center,hr=bt.rotate;return bt.center=function(nr){return arguments.length?Ft([-nr[1],nr[0]]):(nr=Ft(),[nr[1],-nr[0]])},bt.rotate=function(nr){return arguments.length?hr([nr[0],nr[1],nr.length>2?nr[2]+90:90]):(nr=hr(),[nr[0],nr[1],nr[2]-90])},hr([0,0,90]).scale(159.155)}e.geoAlbers=$a,e.geoAlbersUsa=rs,e.geoArea=me,e.geoAzimuthalEqualArea=Rs,e.geoAzimuthalEqualAreaRaw=uo,e.geoAzimuthalEquidistant=Go,e.geoAzimuthalEquidistantRaw=xs,e.geoBounds=_e,e.geoCentroid=sr,e.geoCircle=Ur,e.geoClipAntimeridian=tr,e.geoClipCircle=Gi,e.geoClipExtent=xn,e.geoClipRectangle=fn,e.geoConicConformal=$o,e.geoConicConformalRaw=rl,e.geoConicEqualArea=lo,e.geoConicEqualAreaRaw=Eo,e.geoConicEquidistant=fo,e.geoConicEquidistantRaw=Po,e.geoContains=to,e.geoDistance=Ba,e.geoEqualEarth=Fs,e.geoEqualEarthRaw=Zs,e.geoEquirectangular=Ua,e.geoEquirectangularRaw=Na,e.geoGnomonic=no,e.geoGnomonicRaw=ws,e.geoGraticule=cs,e.geoGraticule10=pa,e.geoIdentity=Ls,e.geoInterpolate=ln,e.geoLength=un,e.geoMercator=So,e.geoMercatorRaw=os,e.geoNaturalEarth1=Xs,e.geoNaturalEarth1Raw=ds,e.geoOrthographic=Yo,e.geoOrthographicRaw=oa,e.geoPath=vo,e.geoProjection=Jn,e.geoProjectionMutator=Cs,e.geoRotation=Pi,e.geoStereographic=ss,e.geoStereographicRaw=po,e.geoStream=W,e.geoTransform=ma,e.geoTransverseMercator=gs,e.geoTransverseMercatorRaw=ls,Object.defineProperty(e,"__esModule",{value:!0})})});var I6e=Se((AF,P6e)=>{(function(e,t){typeof AF=="object"&&typeof P6e!="undefined"?t(AF,LX(),JE()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],t):t(e.d3=e.d3||{},e.d3,e.d3)})(AF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,u=Math.floor,l=Math.log,f=Math.max,c=Math.min,h=Math.pow,d=Math.round,p=Math.sign||function(ce){return ce>0?1:ce<0?-1:0},x=Math.sin,b=Math.tan,y=1e-6,E=1e-12,k=Math.PI,A=k/2,L=k/4,_=Math.SQRT1_2,C=H(2),M=H(k),v=k*2,z=180/k,T=k/180;function F(ce){return ce?ce/Math.sin(ce):1}function q(ce){return ce>1?A:ce<-1?-A:Math.asin(ce)}function U(ce){return ce>1?0:ce<-1?k:Math.acos(ce)}function H(ce){return ce>0?Math.sqrt(ce):0}function j(ce){return ce=s(2*ce),(ce-1)/(ce+1)}function G(ce){return(s(ce)-s(-ce))/2}function O(ce){return(s(ce)+s(-ce))/2}function W(ce){return l(ce+H(ce*ce+1))}function re(ce){return l(ce+H(ce*ce-1))}function ne(ce){var Ae=b(ce/2),qe=2*l(o(ce/2))/(Ae*Ae);function Ve(ot,Ke){var ft=o(ot),qt=o(Ke),Xt=x(Ke),$t=qt*ft,dr=-((1-$t?l((1+$t)/2)/(1-$t):-.5)+qe/(1+$t));return[dr*qt*x(ot),dr*Xt]}return Ve.invert=function(ot,Ke){var ft=H(ot*ot+Ke*Ke),qt=-ce/2,Xt=50,$t;if(!ft)return[0,0];do{var dr=qt/2,Mr=o(dr),$r=x(dr),ii=$r/Mr,pi=-l(n(Mr));qt-=$t=(2/ii*pi-qe*ii-ft)/(-pi/($r*$r)+1-qe/(2*Mr*Mr))*(Mr<0?.7:1)}while(n($t)>y&&--Xt>0);var Yi=x(qt);return[a(ot*Yi,ft*o(qt)),q(Ke*Yi/ft)]},Ve}function be(){var ce=A,Ae=t.geoProjectionMutator(ne),qe=Ae(ce);return qe.radius=function(Ve){return arguments.length?Ae(ce=Ve*T):ce*z},qe.scale(179.976).clipAngle(147)}function ze(ce,Ae){var qe=o(Ae),Ve=F(U(qe*o(ce/=2)));return[2*qe*x(ce)*Ve,x(Ae)*Ve]}ze.invert=function(ce,Ae){if(!(ce*ce+4*Ae*Ae>k*k+y)){var qe=ce,Ve=Ae,ot=25;do{var Ke=x(qe),ft=x(qe/2),qt=o(qe/2),Xt=x(Ve),$t=o(Ve),dr=x(2*Ve),Mr=Xt*Xt,$r=$t*$t,ii=ft*ft,pi=1-$r*qt*qt,Yi=pi?U($t*qt)*H(wn=1/pi):wn=0,wn,Tn=2*Yi*$t*ft-ce,ua=Yi*Xt-Ae,oo=wn*($r*ii+Yi*$t*qt*Mr),el=wn*(.5*Ke*dr-Yi*2*Xt*ft),ys=wn*.25*(dr*ft-Yi*Xt*$r*Ke),il=wn*(Mr*qt+Yi*ii*$t),$l=el*ys-il*oo;if(!$l)break;var pl=(ua*el-Tn*il)/$l,Hl=(Tn*ys-ua*oo)/$l;qe-=pl,Ve-=Hl}while((n(pl)>y||n(Hl)>y)&&--ot>0);return[qe,Ve]}};function Ce(){return t.geoProjection(ze).scale(152.63)}function he(ce){var Ae=x(ce),qe=o(ce),Ve=ce>=0?1:-1,ot=b(Ve*ce),Ke=(1+Ae-qe)/2;function ft(qt,Xt){var $t=o(Xt),dr=o(qt/=2);return[(1+$t)*x(qt),(Ve*Xt>-a(dr,ot)-.001?0:-Ve*10)+Ke+x(Xt)*qe-(1+$t)*Ae*dr]}return ft.invert=function(qt,Xt){var $t=0,dr=0,Mr=50;do{var $r=o($t),ii=x($t),pi=o(dr),Yi=x(dr),wn=1+pi,Tn=wn*ii-qt,ua=Ke+Yi*qe-wn*Ae*$r-Xt,oo=wn*$r/2,el=-ii*Yi,ys=Ae*wn*ii/2,il=qe*pi+Ae*$r*Yi,$l=el*ys-il*oo,pl=(ua*el-Tn*il)/$l/2,Hl=(Tn*ys-ua*oo)/$l;n(Hl)>2&&(Hl/=2),$t-=pl,dr-=Hl}while((n(pl)>y||n(Hl)>y)&&--Mr>0);return Ve*dr>-a(o($t),ot)-.001?[$t*2,dr]:null},ft}function te(){var ce=20*T,Ae=ce>=0?1:-1,qe=b(Ae*ce),Ve=t.geoProjectionMutator(he),ot=Ve(ce),Ke=ot.stream;return ot.parallel=function(ft){return arguments.length?(qe=b((Ae=(ce=ft*T)>=0?1:-1)*ce),Ve(ce)):ce*z},ot.stream=function(ft){var qt=ot.rotate(),Xt=Ke(ft),$t=(ot.rotate([0,0]),Ke(ft)),dr=ot.precision();return ot.rotate(qt),Xt.sphere=function(){$t.polygonStart(),$t.lineStart();for(var Mr=Ae*-180;Ae*Mr<180;Mr+=Ae*90)$t.point(Mr,Ae*90);if(ce)for(;Ae*(Mr-=3*Ae*dr)>=-180;)$t.point(Mr,Ae*-a(o(Mr*T/2),qe)*z);$t.lineEnd(),$t.polygonEnd()},Xt},ot.scale(218.695).center([0,28.0974])}function ke(ce,Ae){var qe=b(Ae/2),Ve=H(1-qe*qe),ot=1+Ve*o(ce/=2),Ke=x(ce)*Ve/ot,ft=qe/ot,qt=Ke*Ke,Xt=ft*ft;return[4/3*Ke*(3+qt-3*Xt),4/3*ft*(3+3*qt-Xt)]}ke.invert=function(ce,Ae){if(ce*=3/8,Ae*=3/8,!ce&&n(Ae)>1)return null;var qe=ce*ce,Ve=Ae*Ae,ot=1+qe+Ve,Ke=H((ot-H(ot*ot-4*Ae*Ae))/2),ft=q(Ke)/3,qt=Ke?re(n(Ae/Ke))/3:W(n(ce))/3,Xt=o(ft),$t=O(qt),dr=$t*$t-Xt*Xt;return[p(ce)*2*a(G(qt)*Xt,.25-dr),p(Ae)*2*a($t*x(ft),.25+dr)]};function Ee(){return t.geoProjection(ke).scale(66.1603)}var Me=H(8),Oe=l(1+C);function Re(ce,Ae){var qe=n(Ae);return qeE&&--Ve>0);return[ce/(o(qe)*(Me-1/x(qe))),p(Ae)*qe]};function me(){return t.geoProjection(Re).scale(112.314)}function Be(ce){var Ae=2*k/ce;function qe(Ve,ot){var Ke=t.geoAzimuthalEquidistantRaw(Ve,ot);if(n(Ve)>A){var ft=a(Ke[1],Ke[0]),qt=H(Ke[0]*Ke[0]+Ke[1]*Ke[1]),Xt=Ae*d((ft-A)/Ae)+A,$t=a(x(ft-=Xt),2-o(ft));ft=Xt+q(k/qt*x($t))-$t,Ke[0]=qt*o(ft),Ke[1]=qt*x(ft)}return Ke}return qe.invert=function(Ve,ot){var Ke=H(Ve*Ve+ot*ot);if(Ke>A){var ft=a(ot,Ve),qt=Ae*d((ft-A)/Ae)+A,Xt=ft>qt?-1:1,$t=Ke*o(qt-ft),dr=1/b(Xt*U(($t-k)/H(k*(k-2*$t)+Ke*Ke)));ft=qt+2*i((dr+Xt*H(dr*dr-3))/3),Ve=Ke*o(ft),ot=Ke*x(ft)}return t.geoAzimuthalEquidistantRaw.invert(Ve,ot)},qe}function fe(){var ce=5,Ae=t.geoProjectionMutator(Be),qe=Ae(ce),Ve=qe.stream,ot=.01,Ke=-o(ot*T),ft=x(ot*T);return qe.lobes=function(qt){return arguments.length?Ae(ce=+qt):ce},qe.stream=function(qt){var Xt=qe.rotate(),$t=Ve(qt),dr=(qe.rotate([0,0]),Ve(qt));return qe.rotate(Xt),$t.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Mr=0,$r=360/ce,ii=2*k/ce,pi=90-180/ce,Yi=A;Mr0&&n(ot)>y);return Ve<0?NaN:qe}function Qe(ce,Ae,qe){return Ae===void 0&&(Ae=40),qe===void 0&&(qe=E),function(Ve,ot,Ke,ft){var qt,Xt,$t;Ke=Ke===void 0?0:+Ke,ft=ft===void 0?0:+ft;for(var dr=0;drqt){Ke-=Xt/=2,ft-=$t/=2;continue}qt=pi;var Yi=(Ke>0?-1:1)*qe,wn=(ft>0?-1:1)*qe,Tn=ce(Ke+Yi,ft),ua=ce(Ke,ft+wn),oo=(Tn[0]-Mr[0])/Yi,el=(Tn[1]-Mr[1])/Yi,ys=(ua[0]-Mr[0])/wn,il=(ua[1]-Mr[1])/wn,$l=il*oo-el*ys,pl=(n($l)<.5?.5:1)/$l;if(Xt=(ii*ys-$r*il)*pl,$t=($r*el-ii*oo)*pl,Ke+=Xt,ft+=$t,n(Xt)0&&(qt[1]*=1+Xt/1.5*qt[0]*qt[0]),qt}return Ve.invert=Qe(Ve),Ve}function Tt(){return t.geoProjection(Xe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function xt(ce,Ae){var qe=ce*x(Ae),Ve=30,ot;do Ae-=ot=(Ae+x(Ae)-qe)/(1+o(Ae));while(n(ot)>y&&--Ve>0);return Ae/2}function _t(ce,Ae,qe){function Ve(ot,Ke){return[ce*ot*o(Ke=xt(qe,Ke)),Ae*x(Ke)]}return Ve.invert=function(ot,Ke){return Ke=q(Ke/Ae),[ot/(ce*o(Ke)),q((2*Ke+x(2*Ke))/qe)]},Ve}var Ct=_t(C/A,C,k);function jt(){return t.geoProjection(Ct).scale(169.529)}var At=2.00276,Te=1.11072;function nt(ce,Ae){var qe=xt(k,Ae);return[At*ce/(1/o(Ae)+Te/o(qe)),(Ae+C*x(qe))/At]}nt.invert=function(ce,Ae){var qe=At*Ae,Ve=Ae<0?-L:L,ot=25,Ke,ft;do ft=qe-C*x(Ve),Ve-=Ke=(x(2*Ve)+2*Ve-k*x(ft))/(2*o(2*Ve)+2+k*o(ft)*C*o(Ve));while(n(Ke)>y&&--ot>0);return ft=qe-C*x(Ve),[ce*(1/o(ft)+Te/o(Ve))/At,ft]};function ut(){return t.geoProjection(nt).scale(160.857)}function ct(ce){var Ae=0,qe=t.geoProjectionMutator(ce),Ve=qe(Ae);return Ve.parallel=function(ot){return arguments.length?qe(Ae=ot*T):Ae*z},Ve}function rt(ce,Ae){return[ce*o(Ae),Ae]}rt.invert=function(ce,Ae){return[ce/o(Ae),Ae]};function je(){return t.geoProjection(rt).scale(152.63)}function tt(ce){if(!ce)return rt;var Ae=1/b(ce);function qe(Ve,ot){var Ke=Ae+ce-ot,ft=Ke&&Ve*o(ot)/Ke;return[Ke*x(ft),Ae-Ke*o(ft)]}return qe.invert=function(Ve,ot){var Ke=H(Ve*Ve+(ot=Ae-ot)*ot),ft=Ae+ce-Ke;return[Ke/o(ft)*a(Ve,ot),ft]},qe}function Je(){return ct(tt).scale(123.082).center([0,26.1441]).parallel(45)}function Mt(ce){function Ae(qe,Ve){var ot=A-Ve,Ke=ot&&qe*ce*x(ot)/ot;return[ot*x(Ke)/ce,A-ot*o(Ke)]}return Ae.invert=function(qe,Ve){var ot=qe*ce,Ke=A-Ve,ft=H(ot*ot+Ke*Ke),qt=a(ot,Ke);return[(ft?ft/x(ft):1)*qt/ce,A-ft]},Ae}function Vt(){var ce=.5,Ae=t.geoProjectionMutator(Mt),qe=Ae(ce);return qe.fraction=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(158.837)}var Kt=_t(1,4/k,k);function ir(){return t.geoProjection(Kt).scale(152.63)}function fr(ce,Ae,qe,Ve,ot,Ke){var ft=o(Ke),qt;if(n(ce)>1||n(Ke)>1)qt=U(qe*ot+Ae*Ve*ft);else{var Xt=x(ce/2),$t=x(Ke/2);qt=2*q(H(Xt*Xt+Ae*Ve*$t*$t))}return n(qt)>y?[qt,a(Ve*x(Ke),Ae*ot-qe*Ve*ft)]:[0,0]}function Ot(ce,Ae,qe){return U((ce*ce+Ae*Ae-qe*qe)/(2*ce*Ae))}function De(ce){return ce-2*k*u((ce+k)/(2*k))}function _e(ce,Ae,qe){for(var Ve=[[ce[0],ce[1],x(ce[1]),o(ce[1])],[Ae[0],Ae[1],x(Ae[1]),o(Ae[1])],[qe[0],qe[1],x(qe[1]),o(qe[1])]],ot=Ve[2],Ke,ft=0;ft<3;++ft,ot=Ke)Ke=Ve[ft],ot.v=fr(Ke[1]-ot[1],ot[3],ot[2],Ke[3],Ke[2],Ke[0]-ot[0]),ot.point=[0,0];var qt=Ot(Ve[0].v[0],Ve[2].v[0],Ve[1].v[0]),Xt=Ot(Ve[0].v[0],Ve[1].v[0],Ve[2].v[0]),$t=k-qt;Ve[2].point[1]=0,Ve[0].point[0]=-(Ve[1].point[0]=Ve[0].v[0]/2);var dr=[Ve[2].point[0]=Ve[0].point[0]+Ve[2].v[0]*o(qt),2*(Ve[0].point[1]=Ve[1].point[1]=Ve[2].v[0]*x(qt))];function Mr($r,ii){var pi=x(ii),Yi=o(ii),wn=new Array(3),Tn;for(Tn=0;Tn<3;++Tn){var ua=Ve[Tn];if(wn[Tn]=fr(ii-ua[1],ua[3],ua[2],Yi,pi,$r-ua[0]),!wn[Tn][0])return ua.point;wn[Tn][1]=De(wn[Tn][1]-ua.v[1])}var oo=dr.slice();for(Tn=0;Tn<3;++Tn){var el=Tn==2?0:Tn+1,ys=Ot(Ve[Tn].v[0],wn[Tn][0],wn[el][0]);wn[Tn][1]<0&&(ys=-ys),Tn?Tn==1?(ys=Xt-ys,oo[0]-=wn[Tn][0]*o(ys),oo[1]-=wn[Tn][0]*x(ys)):(ys=$t-ys,oo[0]+=wn[Tn][0]*o(ys),oo[1]+=wn[Tn][0]*x(ys)):(oo[0]+=wn[Tn][0]*o(ys),oo[1]-=wn[Tn][0]*x(ys))}return oo[0]/=3,oo[1]/=3,oo}return Mr}function Fe(ce){return ce[0]*=T,ce[1]*=T,ce}function Pe(){return Ie([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ie(ce,Ae,qe){var Ve=t.geoCentroid({type:"MultiPoint",coordinates:[ce,Ae,qe]}),ot=[-Ve[0],-Ve[1]],Ke=t.geoRotation(ot),ft=_e(Fe(Ke(ce)),Fe(Ke(Ae)),Fe(Ke(qe)));ft.invert=Qe(ft);var qt=t.geoProjection(ft).rotate(ot),Xt=qt.center;return delete qt.rotate,qt.center=function($t){return arguments.length?Xt(Ke($t)):Ke.invert(Xt())},qt.clipAngle(90)}function lt(ce,Ae){var qe=H(1-x(Ae));return[2/M*ce*qe,M*(1-qe)]}lt.invert=function(ce,Ae){var qe=(qe=Ae/M-1)*qe;return[qe>0?ce*H(k/qe)/2:0,q(1-qe)]};function ye(){return t.geoProjection(lt).scale(95.6464).center([0,30])}function ue(ce){var Ae=b(ce);function qe(Ve,ot){return[Ve,(Ve?Ve/x(Ve):1)*(x(ot)*o(Ve)-Ae*o(ot))]}return qe.invert=Ae?function(Ve,ot){Ve&&(ot*=x(Ve)/Ve);var Ke=o(Ve);return[Ve,2*a(H(Ke*Ke+Ae*Ae-ot*ot)-Ke,Ae-ot)]}:function(Ve,ot){return[Ve,q(Ve?ot*b(Ve)/Ve:ot)]},qe}function de(){return ct(ue).scale(249.828).clipAngle(90)}var ht=H(3);function Et(ce,Ae){return[ht*ce*(2*o(2*Ae/3)-1)/M,ht*M*x(Ae/3)]}Et.invert=function(ce,Ae){var qe=3*q(Ae/(ht*M));return[M*ce/(ht*(2*o(2*qe/3)-1)),qe]};function St(){return t.geoProjection(Et).scale(156.19)}function Zt(ce){var Ae=o(ce);function qe(Ve,ot){return[Ve*Ae,x(ot)/Ae]}return qe.invert=function(Ve,ot){return[Ve/Ae,q(ot*Ae)]},qe}function qr(){return ct(Zt).parallel(38.58).scale(195.044)}function Lr(ce){var Ae=o(ce);function qe(Ve,ot){return[Ve*Ae,(1+Ae)*b(ot/2)]}return qe.invert=function(Ve,ot){return[Ve/Ae,i(ot/(1+Ae))*2]},qe}function vr(){return ct(Lr).scale(124.75)}function Er(ce,Ae){var qe=H(8/(3*k));return[qe*ce*(1-n(Ae)/k),qe*Ae]}Er.invert=function(ce,Ae){var qe=H(8/(3*k)),Ve=Ae/qe;return[ce/(qe*(1-n(Ve)/k)),Ve]};function si(){return t.geoProjection(Er).scale(165.664)}function Ei(ce,Ae){var qe=H(4-3*x(n(Ae)));return[2/H(6*k)*ce*qe,p(Ae)*H(2*k/3)*(2-qe)]}Ei.invert=function(ce,Ae){var qe=2-n(Ae)/H(2*k/3);return[ce*H(6*k)/(2*qe),p(Ae)*q((4-qe*qe)/3)]};function Si(){return t.geoProjection(Ei).scale(165.664)}function xi(ce,Ae){var qe=H(k*(4+k));return[2/qe*ce*(1+H(1-4*Ae*Ae/(k*k))),4/qe*Ae]}xi.invert=function(ce,Ae){var qe=H(k*(4+k))/2;return[ce*qe/(1+H(1-Ae*Ae*(4+k)/(4*k))),Ae*qe/2]};function Hi(){return t.geoProjection(xi).scale(180.739)}function Jr(ce,Ae){var qe=(2+A)*x(Ae);Ae/=2;for(var Ve=0,ot=1/0;Ve<10&&n(ot)>y;Ve++){var Ke=o(Ae);Ae-=ot=(Ae+x(Ae)*(Ke+2)-qe)/(2*Ke*(1+Ke))}return[2/H(k*(4+k))*ce*(1+o(Ae)),2*H(k/(4+k))*x(Ae)]}Jr.invert=function(ce,Ae){var qe=Ae*H((4+k)/k)/2,Ve=q(qe),ot=o(Ve);return[ce/(2/H(k*(4+k))*(1+ot)),q((Ve+qe*(ot+2))/(2+A))]};function ci(){return t.geoProjection(Jr).scale(180.739)}function Di(ce,Ae){return[ce*(1+o(Ae))/H(2+k),2*Ae/H(2+k)]}Di.invert=function(ce,Ae){var qe=H(2+k),Ve=Ae*qe/2;return[qe*ce/(1+o(Ve)),Ve]};function Lt(){return t.geoProjection(Di).scale(173.044)}function vt(ce,Ae){for(var qe=(1+A)*x(Ae),Ve=0,ot=1/0;Ve<10&&n(ot)>y;Ve++)Ae-=ot=(Ae+x(Ae)-qe)/(1+o(Ae));return qe=H(2+k),[ce*(1+o(Ae))/qe,2*Ae/qe]}vt.invert=function(ce,Ae){var qe=1+A,Ve=H(qe/2);return[ce*2*Ve/(1+o(Ae*=Ve)),q((Ae+x(Ae))/qe)]};function Dt(){return t.geoProjection(vt).scale(173.044)}var Bt=3+2*C;function sr(ce,Ae){var qe=x(ce/=2),Ve=o(ce),ot=H(o(Ae)),Ke=o(Ae/=2),ft=x(Ae)/(Ke+C*Ve*ot),qt=H(2/(1+ft*ft)),Xt=H((C*Ke+(Ve+qe)*ot)/(C*Ke+(Ve-qe)*ot));return[Bt*(qt*(Xt-1/Xt)-2*l(Xt)),Bt*(qt*ft*(Xt+1/Xt)-2*i(ft))]}sr.invert=function(ce,Ae){if(!(Ke=ke.invert(ce/1.2,Ae*1.065)))return null;var qe=Ke[0],Ve=Ke[1],ot=20,Ke;ce/=Bt,Ae/=Bt;do{var ft=qe/2,qt=Ve/2,Xt=x(ft),$t=o(ft),dr=x(qt),Mr=o(qt),$r=o(Ve),ii=H($r),pi=dr/(Mr+C*$t*ii),Yi=pi*pi,wn=H(2/(1+Yi)),Tn=C*Mr+($t+Xt)*ii,ua=C*Mr+($t-Xt)*ii,oo=Tn/ua,el=H(oo),ys=el-1/el,il=el+1/el,$l=wn*ys-2*l(el)-ce,pl=wn*pi*il-2*i(pi)-Ae,Hl=dr&&_*ii*Xt*Yi/dr,Ll=(C*$t*Mr+ii)/(2*(Mr+C*$t*ii)*(Mr+C*$t*ii)*ii),Ql=-.5*pi*wn*wn*wn,ku=Ql*Hl,Jl=Ql*Ll,Kl=(Kl=2*Mr+C*ii*($t-Xt))*Kl*el,Hu=(C*$t*Mr*ii+$r)/Kl,tf=-(C*Xt*dr)/(ii*Kl),Ku=ys*ku-2*Hu/el+wn*(Hu+Hu/oo),Gu=ys*Jl-2*tf/el+wn*(tf+tf/oo),Wu=pi*il*ku-2*Hl/(1+Yi)+wn*il*Hl+wn*pi*(Hu-Hu/oo),sf=pi*il*Jl-2*Ll/(1+Yi)+wn*il*Ll+wn*pi*(tf-tf/oo),gf=Gu*Wu-sf*Ku;if(!gf)break;var nf=(pl*Gu-$l*sf)/gf,af=($l*Wu-pl*Ku)/gf;qe-=nf,Ve=f(-A,c(A,Ve-af))}while((n(nf)>y||n(af)>y)&&--ot>0);return n(n(Ve)-A)Ve){var Mr=H(dr),$r=a($t,Xt),ii=qe*d($r/qe),pi=$r-ii,Yi=ce*o(pi),wn=(ce*x(pi)-pi*x(Yi))/(A-Yi),Tn=ki(pi,wn),ua=(k-ce)/ji(Tn,Yi,k);Xt=Mr;var oo=50,el;do Xt-=el=(ce+ji(Tn,Yi,Xt)*ua-Mr)/(Tn(Xt)*ua);while(n(el)>y&&--oo>0);$t=pi*x(Xt),XtVe){var Xt=H(qt),$t=a(ft,Ke),dr=qe*d($t/qe),Mr=$t-dr;Ke=Xt*o(Mr),ft=Xt*x(Mr);for(var $r=Ke-A,ii=x(Ke),pi=ft/ii,Yi=Key||n(pi)>y)&&--Yi>0);return[Mr,$r]},Xt}var Mi=zi(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function sn(){return t.geoProjection(Mi).scale(149.995)}var fi=zi(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Or(){return t.geoProjection(fi).scale(153.93)}var st=zi(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Wt(){return t.geoProjection(st).scale(130.945)}function tr(ce,Ae){var qe=ce*ce,Ve=Ae*Ae;return[ce*(1-.162388*Ve)*(.87-952426e-9*qe*qe),Ae*(1+Ve/12)]}tr.invert=function(ce,Ae){var qe=ce,Ve=Ae,ot=50,Ke;do{var ft=Ve*Ve;Ve-=Ke=(Ve*(1+ft/12)-Ae)/(1+ft/4)}while(n(Ke)>y&&--ot>0);ot=50,ce/=1-.162388*ft;do{var qt=(qt=qe*qe)*qt;qe-=Ke=(qe*(.87-952426e-9*qt)-ce)/(.87-.00476213*qt)}while(n(Ke)>y&&--ot>0);return[qe,Ve]};function or(){return t.geoProjection(tr).scale(131.747)}var Nr=zi(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function hi(){return t.geoProjection(Nr).scale(131.087)}function Gi(ce){var Ae=ce(A,0)[0]-ce(-A,0)[0];function qe(Ve,ot){var Ke=Ve>0?-.5:.5,ft=ce(Ve+Ke*k,ot);return ft[0]-=Ke*Ae,ft}return ce.invert&&(qe.invert=function(Ve,ot){var Ke=Ve>0?-.5:.5,ft=ce.invert(Ve+Ke*Ae,ot),qt=ft[0]-Ke*k;return qt<-k?qt+=2*k:qt>k&&(qt-=2*k),ft[0]=qt,ft}),qe}function Qr(ce,Ae){var qe=p(ce),Ve=p(Ae),ot=o(Ae),Ke=o(ce)*ot,ft=x(ce)*ot,qt=x(Ve*Ae);ce=n(a(ft,qt)),Ae=q(Ke),n(ce-A)>y&&(ce%=A);var Xt=Ui(ce>k/4?A-ce:ce,Ae);return ce>k/4&&(qt=Xt[0],Xt[0]=-Xt[1],Xt[1]=-qt),Xt[0]*=qe,Xt[1]*=-Ve,Xt}Qr.invert=function(ce,Ae){n(ce)>1&&(ce=p(ce)*2-ce),n(Ae)>1&&(Ae=p(Ae)*2-Ae);var qe=p(ce),Ve=p(Ae),ot=-qe*ce,Ke=-Ve*Ae,ft=Ke/ot<1,qt=zn(ft?Ke:ot,ft?ot:Ke),Xt=qt[0],$t=qt[1],dr=o($t);return ft&&(Xt=-A-Xt),[qe*(a(x(Xt)*dr,-x($t))+k),Ve*q(o(Xt)*dr)]};function Ui(ce,Ae){if(Ae===A)return[0,0];var qe=x(Ae),Ve=qe*qe,ot=Ve*Ve,Ke=1+ot,ft=1+3*ot,qt=1-ot,Xt=q(1/H(Ke)),$t=qt+Ve*Ke*Xt,dr=(1-qe)/$t,Mr=H(dr),$r=dr*Ke,ii=H($r),pi=Mr*qt,Yi,wn;if(ce===0)return[0,-(pi+Ve*ii)];var Tn=o(Ae),ua=1/Tn,oo=2*qe*Tn,el=(-3*Ve+Xt*ft)*oo,ys=(-$t*Tn-(1-qe)*el)/($t*$t),il=.5*ys/Mr,$l=qt*il-2*Ve*Mr*oo,pl=Ve*Ke*ys+dr*ft*oo,Hl=-ua*oo,Ll=-ua*pl,Ql=-2*ua*$l,ku=4*ce/k,Jl;if(ce>.222*k||Ae.175*k){if(Yi=(pi+Ve*H($r*(1+ot)-pi*pi))/(1+ot),ce>k/4)return[Yi,Yi];var Kl=Yi,Hu=.5*Yi;Yi=.5*(Hu+Kl),wn=50;do{var tf=H($r-Yi*Yi),Ku=Yi*(Ql+Hl*tf)+Ll*q(Yi/ii)-ku;if(!Ku)break;Ku<0?Hu=Yi:Kl=Yi,Yi=.5*(Hu+Kl)}while(n(Kl-Hu)>y&&--wn>0)}else{Yi=y,wn=25;do{var Gu=Yi*Yi,Wu=H($r-Gu),sf=Ql+Hl*Wu,gf=Yi*sf+Ll*q(Yi/ii)-ku,nf=sf+(Ll-Hl*Gu)/Wu;Yi-=Jl=Wu?gf/nf:0}while(n(Jl)>y&&--wn>0)}return[Yi,-pi-Ve*H($r-Yi*Yi)]}function zn(ce,Ae){for(var qe=0,Ve=1,ot=.5,Ke=50;;){var ft=ot*ot,qt=H(ot),Xt=q(1/H(1+ft)),$t=1-ft+ot*(1+ft)*Xt,dr=(1-qt)/$t,Mr=H(dr),$r=dr*(1+ft),ii=Mr*(1-ft),pi=$r-ce*ce,Yi=H(pi),wn=Ae+ii+ot*Yi;if(n(Ve-qe)0?qe=ot:Ve=ot,ot=.5*(qe+Ve)}if(!Ke)return null;var Tn=q(qt),ua=o(Tn),oo=1/ua,el=2*qt*ua,ys=(-3*ot+Xt*(1+3*ft))*el,il=(-$t*ua-(1-qt)*ys)/($t*$t),$l=.5*il/Mr,pl=(1-ft)*$l-2*ot*Mr*el,Hl=-2*oo*pl,Ll=-oo*el,Ql=-oo*(ot*(1+ft)*il+dr*(1+3*ft)*el);return[k/4*(ce*(Hl+Ll*Yi)+Ql*q(ce/H($r))),Tn]}function fn(){return t.geoProjection(Gi(Qr)).scale(239.75)}function xn(ce,Ae,qe){var Ve,ot,Ke;return ce?(Ve=_a(ce,qe),Ae?(ot=_a(Ae,1-qe),Ke=ot[1]*ot[1]+qe*Ve[0]*Ve[0]*ot[0]*ot[0],[[Ve[0]*ot[2]/Ke,Ve[1]*Ve[2]*ot[0]*ot[1]/Ke],[Ve[1]*ot[1]/Ke,-Ve[0]*Ve[2]*ot[0]*ot[2]/Ke],[Ve[2]*ot[1]*ot[2]/Ke,-qe*Ve[0]*Ve[1]*ot[0]/Ke]]):[[Ve[0],0],[Ve[1],0],[Ve[2],0]]):(ot=_a(Ae,1-qe),[[0,ot[0]/ot[1]],[1/ot[1],0],[ot[2]/ot[1],0]])}function _a(ce,Ae){var qe,Ve,ot,Ke,ft;if(Ae=1-y)return qe=(1-Ae)/4,Ve=O(ce),Ke=j(ce),ot=1/Ve,ft=Ve*G(ce),[Ke+qe*(ft-ce)/(Ve*Ve),ot-qe*Ke*ot*(ft-ce),ot+qe*Ke*ot*(ft+ce),2*i(s(ce))-A+qe*(ft-ce)/Ve];var qt=[1,0,0,0,0,0,0,0,0],Xt=[H(Ae),0,0,0,0,0,0,0,0],$t=0;for(Ve=H(1-Ae),ft=1;n(Xt[$t]/qt[$t])>y&&$t<8;)qe=qt[$t++],Xt[$t]=(qe-Ve)/2,qt[$t]=(qe+Ve)/2,Ve=H(qe*Ve),ft*=2;ot=ft*qt[$t]*ce;do Ke=Xt[$t]*x(Ve=ot)/qt[$t],ot=(q(Ke)+ot)/2;while(--$t);return[x(ot),Ke=o(ot),Ke/o(ot-Ve),ot]}function Wn(ce,Ae,qe){var Ve=n(ce),ot=n(Ae),Ke=G(ot);if(Ve){var ft=1/x(Ve),qt=1/(b(Ve)*b(Ve)),Xt=-(qt+qe*(Ke*Ke*ft*ft)-1+qe),$t=(qe-1)*qt,dr=(-Xt+H(Xt*Xt-4*$t))/2;return[Fn(i(1/H(dr)),qe)*p(ce),Fn(i(H((dr/qt-1)/qe)),1-qe)*p(Ae)]}return[0,Fn(i(Ke),1-qe)*p(Ae)]}function Fn(ce,Ae){if(!Ae)return ce;if(Ae===1)return l(b(ce/2+L));for(var qe=1,Ve=H(1-Ae),ot=H(Ae),Ke=0;n(ot)>y;Ke++){if(ce%k){var ft=i(Ve*b(ce)/qe);ft<0&&(ft+=k),ce+=ft+~~(ce/k)*k}else ce+=ce;ot=(qe+Ve)/2,Ve=H(qe*Ve),ot=((qe=ot)-Ve)/2}return ce/(h(2,Ke)*qe)}function ia(ce,Ae){var qe=(C-1)/(C+1),Ve=H(1-qe*qe),ot=Fn(A,Ve*Ve),Ke=-1,ft=l(b(k/4+n(Ae)/2)),qt=s(Ke*ft)/H(qe),Xt=za(qt*o(Ke*ce),qt*x(Ke*ce)),$t=Wn(Xt[0],Xt[1],Ve*Ve);return[-$t[1],(Ae>=0?1:-1)*(.5*ot-$t[0])]}function za(ce,Ae){var qe=ce*ce,Ve=Ae+1,ot=1-qe-Ae*Ae;return[.5*((ce>=0?A:-A)-a(ot,2*ce)),-.25*l(ot*ot+4*qe)+.5*l(Ve*Ve+qe)]}function Hr(ce,Ae){var qe=Ae[0]*Ae[0]+Ae[1]*Ae[1];return[(ce[0]*Ae[0]+ce[1]*Ae[1])/qe,(ce[1]*Ae[0]-ce[0]*Ae[1])/qe]}ia.invert=function(ce,Ae){var qe=(C-1)/(C+1),Ve=H(1-qe*qe),ot=Fn(A,Ve*Ve),Ke=-1,ft=xn(.5*ot-Ae,-ce,Ve*Ve),qt=Hr(ft[0],ft[1]),Xt=a(qt[1],qt[0])/Ke;return[Xt,2*i(s(.5/Ke*l(qe*qt[0]*qt[0]+qe*qt[1]*qt[1])))-A]};function na(){return t.geoProjection(Gi(ia)).scale(151.496)}function go(ce){var Ae=x(ce),qe=o(ce),Ve=Dn(ce);Ve.invert=Dn(-ce);function ot(Ke,ft){var qt=Ve(Ke,ft);Ke=qt[0],ft=qt[1];var Xt=x(ft),$t=o(ft),dr=o(Ke),Mr=U(Ae*Xt+qe*$t*dr),$r=x(Mr),ii=n($r)>y?Mr/$r:1;return[ii*qe*x(Ke),(n(Ke)>A?ii:-ii)*(Ae*$t-qe*Xt*dr)]}return ot.invert=function(Ke,ft){var qt=H(Ke*Ke+ft*ft),Xt=-x(qt),$t=o(qt),dr=qt*$t,Mr=-ft*Xt,$r=qt*Ae,ii=H(dr*dr+Mr*Mr-$r*$r),pi=a(dr*$r+Mr*ii,Mr*$r-dr*ii),Yi=(qt>A?-1:1)*a(Ke*Xt,qt*o(pi)*$t+ft*x(pi)*Xt);return Ve.invert(Yi,pi)},ot}function Dn(ce){var Ae=x(ce),qe=o(ce);return function(Ve,ot){var Ke=o(ot),ft=o(Ve)*Ke,qt=x(Ve)*Ke,Xt=x(ot);return[a(qt,ft*qe-Xt*Ae),q(Xt*qe+ft*Ae)]}}function un(){var ce=0,Ae=t.geoProjectionMutator(go),qe=Ae(ce),Ve=qe.rotate,ot=qe.stream,Ke=t.geoCircle();return qe.parallel=function(ft){if(!arguments.length)return ce*z;var qt=qe.rotate();return Ae(ce=ft*T).rotate(qt)},qe.rotate=function(ft){return arguments.length?(Ve.call(qe,[ft[0],ft[1]-ce*z]),Ke.center([-ft[0],-ft[1]]),qe):(ft=Ve.call(qe),ft[1]+=ce*z,ft)},qe.stream=function(ft){return ft=ot(ft),ft.sphere=function(){ft.polygonStart();var qt=.01,Xt=Ke.radius(90-qt)().coordinates[0],$t=Xt.length-1,dr=-1,Mr;for(ft.lineStart();++dr<$t;)ft.point((Mr=Xt[dr])[0],Mr[1]);for(ft.lineEnd(),Xt=Ke.radius(90+qt)().coordinates[0],$t=Xt.length-1,ft.lineStart();--dr>=0;)ft.point((Mr=Xt[dr])[0],Mr[1]);ft.lineEnd(),ft.polygonEnd()},ft},qe.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,Wo=q(1-1/Zn)*z,Ba=Zt(0);function Bo(ce){var Ae=Wo*T,qe=lt(k,Ae)[0]-lt(-k,Ae)[0],Ve=Ba(0,Ae)[1],ot=lt(0,Ae)[1],Ke=M-ot,ft=v/ce,qt=4/v,Xt=Ve+Ke*Ke*4/v;function $t(dr,Mr){var $r,ii=n(Mr);if(ii>Ae){var pi=c(ce-1,f(0,u((dr+k)/ft)));dr+=k*(ce-1)/ce-pi*ft,$r=lt(dr,ii),$r[0]=$r[0]*v/qe-v*(ce-1)/(2*ce)+pi*v/ce,$r[1]=Ve+($r[1]-ot)*4*Ke/v,Mr<0&&($r[1]=-$r[1])}else $r=Ba(dr,Mr);return $r[0]*=qt,$r[1]/=Xt,$r}return $t.invert=function(dr,Mr){dr/=qt,Mr*=Xt;var $r=n(Mr);if($r>Ve){var ii=c(ce-1,f(0,u((dr+k)/ft)));dr=(dr+k*(ce-1)/ce-ii*ft)*qe/v;var pi=lt.invert(dr,.25*($r-Ve)*v/Ke+ot);return pi[0]-=k*(ce-1)/ce-ii*ft,Mr<0&&(pi[1]=-pi[1]),pi}return Ba.invert(dr,Mr)},$t}function Ea(ce,Ae){return[ce,Ae&1?90-y:Wo]}function Ha(ce,Ae){return[ce,Ae&1?-90+y:-Wo]}function tn(ce){return[ce[0]*(1-y),ce[1]]}function Cn(ce){var Ae=[].concat(r.range(-180,180+ce/2,ce).map(Ea),r.range(180,-180-ce/2,-ce).map(Ha));return{type:"Polygon",coordinates:[ce===180?Ae.map(tn):Ae]}}function Xn(){var ce=4,Ae=t.geoProjectionMutator(Bo),qe=Ae(ce),Ve=qe.stream;return qe.lobes=function(ot){return arguments.length?Ae(ce=+ot):ce},qe.stream=function(ot){var Ke=qe.rotate(),ft=Ve(ot),qt=(qe.rotate([0,0]),Ve(ot));return qe.rotate(Ke),ft.sphere=function(){t.geoStream(Cn(180/ce),qt)},ft},qe.scale(239.75)}function ts(ce){var Ae=1+ce,qe=x(1/Ae),Ve=q(qe),ot=2*H(k/(Ke=k+4*Ve*Ae)),Ke,ft=.5*ot*(Ae+H(ce*(2+ce))),qt=ce*ce,Xt=Ae*Ae;function $t(dr,Mr){var $r=1-x(Mr),ii,pi;if($r&&$r<2){var Yi=A-Mr,wn=25,Tn;do{var ua=x(Yi),oo=o(Yi),el=Ve+a(ua,Ae-oo),ys=1+Xt-2*Ae*oo;Yi-=Tn=(Yi-qt*Ve-Ae*ua+ys*el-.5*$r*Ke)/(2*Ae*ua*el)}while(n(Tn)>E&&--wn>0);ii=ot*H(ys),pi=dr*el/k}else ii=ot*(ce+$r),pi=dr*Ve/k;return[ii*x(pi),ft-ii*o(pi)]}return $t.invert=function(dr,Mr){var $r=dr*dr+(Mr-=ft)*Mr,ii=(1+Xt-$r/(ot*ot))/(2*Ae),pi=U(ii),Yi=x(pi),wn=Ve+a(Yi,Ae-ii);return[q(dr/H($r))*k/wn,q(1-2*(pi-qt*Ve-Ae*Yi+(1+Xt-2*Ae*ii)*wn)/Ke)]},$t}function Ja(){var ce=1,Ae=t.geoProjectionMutator(ts),qe=Ae(ce);return qe.ratio=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(167.774).center([0,18.67])}var to=.7109889596207567,Ri=.0528035274542;function an(ce,Ae){return Ae>-to?(ce=Ct(ce,Ae),ce[1]+=Ri,ce):rt(ce,Ae)}an.invert=function(ce,Ae){return Ae>-to?Ct.invert(ce,Ae-Ri):rt.invert(ce,Ae)};function cs(){return t.geoProjection(an).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function pa(ce,Ae){return n(Ae)>to?(ce=Ct(ce,Ae),ce[1]-=Ae>0?Ri:-Ri,ce):rt(ce,Ae)}pa.invert=function(ce,Ae){return n(Ae)>to?Ct.invert(ce,Ae+(Ae>0?Ri:-Ri)):rt.invert(ce,Ae)};function ln(){return t.geoProjection(pa).scale(152.63)}function ka(ce,Ae,qe,Ve){var ot=H(4*k/(2*qe+(1+ce-Ae/2)*x(2*qe)+(ce+Ae)/2*x(4*qe)+Ae/2*x(6*qe))),Ke=H(Ve*x(qe)*H((1+ce*o(2*qe)+Ae*o(4*qe))/(1+ce+Ae))),ft=qe*Xt(1);function qt(Mr){return H(1+ce*o(2*Mr)+Ae*o(4*Mr))}function Xt(Mr){var $r=Mr*qe;return(2*$r+(1+ce-Ae/2)*x(2*$r)+(ce+Ae)/2*x(4*$r)+Ae/2*x(6*$r))/qe}function $t(Mr){return qt(Mr)*x(Mr)}var dr=function(Mr,$r){var ii=qe*Pt(Xt,ft*x($r)/qe,$r/k);isNaN(ii)&&(ii=qe*p($r));var pi=ot*qt(ii);return[pi*Ke*Mr/k*o(ii),pi/Ke*x(ii)]};return dr.invert=function(Mr,$r){var ii=Pt($t,$r*Ke/ot);return[Mr*k/(o(ii)*ot*Ke*qt(ii)),q(qe*Xt(ii/qe)/ft)]},qe===0&&(ot=H(Ve/k),dr=function(Mr,$r){return[Mr*ot,x($r)/ot]},dr.invert=function(Mr,$r){return[Mr/ot,q($r*ot)]}),dr}function va(){var ce=1,Ae=0,qe=45*T,Ve=2,ot=t.geoProjectionMutator(ka),Ke=ot(ce,Ae,qe,Ve);return Ke.a=function(ft){return arguments.length?ot(ce=+ft,Ae,qe,Ve):ce},Ke.b=function(ft){return arguments.length?ot(ce,Ae=+ft,qe,Ve):Ae},Ke.psiMax=function(ft){return arguments.length?ot(ce,Ae,qe=+ft*T,Ve):qe*z},Ke.ratio=function(ft){return arguments.length?ot(ce,Ae,qe,Ve=+ft):Ve},Ke.scale(180.739)}function bo(ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr){if(dr.nanEncountered)return NaN;var Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el;if(Mr=qe-Ae,$r=ce(Ae+Mr*.25),ii=ce(qe-Mr*.25),isNaN($r)){dr.nanEncountered=!0;return}if(isNaN(ii)){dr.nanEncountered=!0;return}return pi=Mr*(Ve+4*$r+ot)/12,Yi=Mr*(ot+4*ii+Ke)/12,wn=pi+Yi,el=(wn-ft)/15,$t>Xt?(dr.maxDepthCount++,wn+el):Math.abs(el)>1;do Xt[wn]>ii?Yi=wn:pi=wn,wn=pi+Yi>>1;while(wn>pi);var Tn=Xt[wn+1]-Xt[wn];return Tn&&(Tn=(ii-Xt[wn+1])/Tn),(wn+1+Tn)/ft}var Mr=2*dr(1)/k*Ke/qe,$r=function(ii,pi){var Yi=dr(n(x(pi))),wn=Ve(Yi)*ii;return Yi/=Mr,[wn,pi>=0?Yi:-Yi]};return $r.invert=function(ii,pi){var Yi;return pi*=Mr,n(pi)<1&&(Yi=p(pi)*q(ot(n(pi))*Ke)),[ii/Ve(n(pi)),Yi]},$r}function Yn(){var ce=0,Ae=2.5,qe=1.183136,Ve=t.geoProjectionMutator(Fi),ot=Ve(ce,Ae,qe);return ot.alpha=function(Ke){return arguments.length?Ve(ce=+Ke,Ae,qe):ce},ot.k=function(Ke){return arguments.length?Ve(ce,Ae=+Ke,qe):Ae},ot.gamma=function(Ke){return arguments.length?Ve(ce,Ae,qe=+Ke):qe},ot.scale(152.63)}function xa(ce,Ae){return n(ce[0]-Ae[0])=0;--Xt)qe=ce[1][Xt],Ve=qe[0][0],ot=qe[0][1],Ke=qe[1][1],ft=qe[2][0],qt=qe[2][1],Ae.push(Qi([[ft-y,qt-y],[ft-y,Ke+y],[Ve+y,Ke+y],[Ve+y,ot-y]],30));return{type:"Polygon",coordinates:[r.merge(Ae)]}}function Pn(ce,Ae,qe){var Ve,ot;function Ke(Xt,$t){for(var dr=$t<0?-1:1,Mr=Ae[+($t<0)],$r=0,ii=Mr.length-1;$rMr[$r][2][0];++$r);var pi=ce(Xt-Mr[$r][1][0],$t);return pi[0]+=ce(Mr[$r][1][0],dr*$t>dr*Mr[$r][0][1]?Mr[$r][0][1]:$t)[0],pi}qe?Ke.invert=qe(Ke):ce.invert&&(Ke.invert=function(Xt,$t){for(var dr=ot[+($t<0)],Mr=Ae[+($t<0)],$r=0,ii=dr.length;$rpi&&(Yi=ii,ii=pi,pi=Yi),[[Mr,ii],[$r,pi]]})}),ft):Ae.map(function($t){return $t.map(function(dr){return[[dr[0][0]*z,dr[0][1]*z],[dr[1][0]*z,dr[1][1]*z],[dr[2][0]*z,dr[2][1]*z]]})})},Ae!=null&&ft.lobes(Ae),ft}var qa=[[[[-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 jo(){return Pn(nt,qa).scale(160.857)}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Pa(){return Pn(pa,Vo).scale(152.63)}var Oa=[[[[-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 co(){return Pn(Ct,Oa).scale(169.529)}var An=[[[[-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 _o(){return Pn(Ct,An).scale(169.529).rotate([20,0])}var ks=[[[[-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 bs(){return Pn(an,ks,Qe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function sa(){return Pn(rt,ps).scale(152.63).rotate([-20,0])}function Bn(ce,Ae){return[3/v*ce*H(k*k/3-Ae*Ae),Ae]}Bn.invert=function(ce,Ae){return[v/3*ce/H(k*k/3-Ae*Ae),Ae]};function ms(){return t.geoProjection(Bn).scale(158.837)}function ya(ce){function Ae(qe,Ve){if(n(n(Ve)-A)2)return null;qe/=2,Ve/=2;var Ke=qe*qe,ft=Ve*Ve,qt=2*Ve/(1+Ke+ft);return qt=h((1+qt)/(1-qt),1/ce),[a(2*qe,1-Ke-ft)/ce,q((qt-1)/(qt+1))]},Ae}function on(){var ce=.5,Ae=t.geoProjectionMutator(ya),qe=Ae(ce);return qe.spacing=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(124.75)}var mn=k/C;function Ga(ce,Ae){return[ce*(1+H(o(Ae)))/2,Ae/(o(Ae/2)*o(ce/6))]}Ga.invert=function(ce,Ae){var qe=n(ce),Ve=n(Ae),ot=y,Ke=A;Vey||n(wn)>y)&&--ot>0);return ot&&[qe,Ve]};function Xi(){return t.geoProjection(bn).scale(139.98)}function qn(ce,Ae){return[x(ce)/o(Ae),b(Ae)*o(ce)]}qn.invert=function(ce,Ae){var qe=ce*ce,Ve=Ae*Ae,ot=Ve+1,Ke=qe+ot,ft=ce?_*H((Ke-H(Ke*Ke-4*qe))/qe):1/H(ot);return[q(ce*ft),p(Ae)*U(ft)]};function Ia(){return t.geoProjection(qn).scale(144.049).clipAngle(90-.001)}function yn(ce){var Ae=o(ce),qe=b(L+ce/2);function Ve(ot,Ke){var ft=Ke-ce,qt=n(ft)=0;)dr=ce[$t],Mr=dr[0]+qt*(ii=Mr)-Xt*$r,$r=dr[1]+qt*$r+Xt*ii;return Mr=qt*(ii=Mr)-Xt*$r,$r=qt*$r+Xt*ii,[Mr,$r]}return qe.invert=function(Ve,ot){var Ke=20,ft=Ve,qt=ot;do{for(var Xt=Ae,$t=ce[Xt],dr=$t[0],Mr=$t[1],$r=0,ii=0,pi;--Xt>=0;)$t=ce[Xt],$r=dr+ft*(pi=$r)-qt*ii,ii=Mr+ft*ii+qt*pi,dr=$t[0]+ft*(pi=dr)-qt*Mr,Mr=$t[1]+ft*Mr+qt*pi;$r=dr+ft*(pi=$r)-qt*ii,ii=Mr+ft*ii+qt*pi,dr=ft*(pi=dr)-qt*Mr-Ve,Mr=ft*Mr+qt*pi-ot;var Yi=$r*$r+ii*ii,wn,Tn;ft-=wn=(dr*$r+Mr*ii)/Yi,qt-=Tn=(Mr*$r-dr*ii)/Yi}while(n(wn)+n(Tn)>y*y&&--Ke>0);if(Ke){var ua=H(ft*ft+qt*qt),oo=2*i(ua*.5),el=x(oo);return[a(ft*el,ua*o(oo)),ua?q(qt*el/ua):0]}},qe}var Ln=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],wo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],wa=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],$i=[[.9245,0],[0,0],[.01943,0]],ea=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Sa(){return Un(Ln,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Za(){return Un(wo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function xo(){return Un(wa,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Wa(){return Un($i,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function hn(){return Un(ea,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Un(ce,Ae){var qe=t.geoProjection(Aa(ce)).rotate(Ae).clipAngle(90),Ve=t.geoRotation(Ae),ot=qe.center;return delete qe.rotate,qe.center=function(Ke){return arguments.length?ot(Ve(Ke)):Ve.invert(ot())},qe}var Ss=H(6),Kn=H(7);function ns(ce,Ae){var qe=q(7*x(Ae)/(3*Ss));return[Ss*ce*(2*o(2*qe/3)-1)/Kn,9*x(qe/3)/Kn]}ns.invert=function(ce,Ae){var qe=3*q(Ae*Kn/9);return[ce*Kn/(Ss*(2*o(2*qe/3)-1)),q(x(qe)*3*Ss/7)]};function Jo(){return t.geoProjection(ns).scale(164.859)}function vo(ce,Ae){for(var qe=(1+_)*x(Ae),Ve=Ae,ot=0,Ke;ot<25&&(Ve-=Ke=(x(Ve/2)+x(Ve)-qe)/(.5*o(Ve/2)+o(Ve)),!(n(Ke)E&&--Ve>0);return Ke=qe*qe,ft=Ke*Ke,qt=Ke*ft,[ce/(.84719-.13063*Ke+qt*qt*(-.04515+.05494*Ke-.02326*ft+.00331*qt)),qe]};function la(){return t.geoProjection(Ao).scale(175.295)}function Ki(ce,Ae){return[ce*(1+o(Ae))/2,2*(Ae-b(Ae/2))]}Ki.invert=function(ce,Ae){for(var qe=Ae/2,Ve=0,ot=1/0;Ve<10&&n(ot)>y;++Ve){var Ke=o(Ae/2);Ae-=ot=(Ae-b(Ae/2)-qe)/(1-.5/(Ke*Ke))}return[2*ce/(1+o(Ae)),Ae]};function ho(){return t.geoProjection(Ki).scale(152.63)}var Ka=[[[[-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 Ca(){return Pn(Ze(1/0),Ka).rotate([20,0]).scale(152.63)}function ta(ce,Ae){var qe=x(Ae),Ve=o(Ae),ot=p(ce);if(ce===0||n(Ae)===A)return[0,Ae];if(Ae===0)return[ce,0];if(n(ce)===A)return[ce*Ve,A*qe];var Ke=k/(2*ce)-2*ce/k,ft=2*Ae/k,qt=(1-ft*ft)/(qe-ft),Xt=Ke*Ke,$t=qt*qt,dr=1+Xt/$t,Mr=1+$t/Xt,$r=(Ke*qe/qt-Ke/2)/dr,ii=($t*qe/Xt+qt/2)/Mr,pi=$r*$r+Ve*Ve/dr,Yi=ii*ii-($t*qe*qe/Xt+qt*qe-1)/Mr;return[A*($r+H(pi)*ot),A*(ii+H(Yi<0?0:Yi)*p(-Ae*Ke)*ot)]}ta.invert=function(ce,Ae){ce/=A,Ae/=A;var qe=ce*ce,Ve=Ae*Ae,ot=qe+Ve,Ke=k*k;return[ce?(ot-1+H((1-ot)*(1-ot)+4*qe))/(2*ce)*A:0,Pt(function(ft){return ot*(k*x(ft)-2*ft)*k+4*ft*ft*(Ae-x(ft))+2*k*ft-Ke*Ae},0)]};function En(){return t.geoProjection(ta).scale(127.267)}var Mo=1.0148,Ds=.23185,Ro=-.14499,vs=.02406,Ks=Mo,as=5*Ds,Jn=7*Ro,Cs=9*vs,Xa=1.790857183;function Zo(ce,Ae){var qe=Ae*Ae;return[ce,Ae*(Mo+qe*qe*(Ds+qe*(Ro+vs*qe)))]}Zo.invert=function(ce,Ae){Ae>Xa?Ae=Xa:Ae<-Xa&&(Ae=-Xa);var qe=Ae,Ve;do{var ot=qe*qe;qe-=Ve=(qe*(Mo+ot*ot*(Ds+ot*(Ro+vs*ot)))-Ae)/(Ks+ot*ot*(as+ot*(Jn+Cs*ot)))}while(n(Ve)>y);return[ce,qe]};function Eo(){return t.geoProjection(Zo).scale(139.319)}function lo(ce,Ae){if(n(Ae)y&&--ot>0);return ft=b(Ve),[(n(Ae)=0;)if(Ve=Ae[qt],qe[0]===Ve[0]&&qe[1]===Ve[1]){if(Ke)return[Ke,qe];Ke=qe}}}function Qn(ce){for(var Ae=ce.length,qe=[],Ve=ce[Ae-1],ot=0;ot0?[-Ve[0],0]:[180-Ve[0],180])};var Ae=$o.map(function(qe){return{face:qe,project:ce(qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(qe,Ve){var ot=Ae[qe];ot&&(ot.children||(ot.children=[])).push(Ae[Ve])}),xs(Ae[0],function(qe,Ve){return Ae[qe<-k/2?Ve<0?6:4:qe<0?Ve<0?2:0:qeVe^ii>Ve&&qe<($r-$t)*(Ve-dr)/(ii-dr)+$t&&(ot=!ot)}return ot}function ws(ce,Ae){var qe=Ae.stream,Ve;if(!qe)throw new Error("invalid projection");switch(ce&&ce.type){case"Feature":Ve=Ls;break;case"FeatureCollection":Ve=no;break;default:Ve=Xs;break}return Ve(ce,qe)}function no(ce,Ae){return{type:"FeatureCollection",features:ce.features.map(function(qe){return Ls(qe,Ae)})}}function Ls(ce,Ae){return{type:"Feature",id:ce.id,properties:ce.properties,geometry:Xs(ce.geometry,Ae)}}function ds(ce,Ae){return{type:"GeometryCollection",geometries:ce.geometries.map(function(qe){return Xs(qe,Ae)})}}function Xs(ce,Ae){if(!ce)return null;if(ce.type==="GeometryCollection")return ds(ce,Ae);var qe;switch(ce.type){case"Point":qe=po;break;case"MultiPoint":qe=po;break;case"LineString":qe=ss;break;case"MultiLineString":qe=ss;break;case"Polygon":qe=ls;break;case"MultiPolygon":qe=ls;break;case"Sphere":qe=ls;break;default:return null}return t.geoStream(ce,Ae(qe)),qe.result()}var oa=[],Yo=[],po={point:function(ce,Ae){oa.push([ce,Ae])},result:function(){var ce=oa.length?oa.length<2?{type:"Point",coordinates:oa[0]}:{type:"MultiPoint",coordinates:oa}:null;return oa=[],ce}},ss={lineStart:No,point:function(ce,Ae){oa.push([ce,Ae])},lineEnd:function(){oa.length&&(Yo.push(oa),oa=[])},result:function(){var ce=Yo.length?Yo.length<2?{type:"LineString",coordinates:Yo[0]}:{type:"MultiLineString",coordinates:Yo}:null;return Yo=[],ce}},ls={polygonStart:No,lineStart:No,point:function(ce,Ae){oa.push([ce,Ae])},lineEnd:function(){var ce=oa.length;if(ce){do oa.push(oa[0].slice());while(++ce<4);Yo.push(oa),oa=[]}},polygonEnd:No,result:function(){if(!Yo.length)return null;var ce=[],Ae=[];return Yo.forEach(function(qe){Zs(qe)?ce.push([qe]):Ae.push(qe)}),Ae.forEach(function(qe){var Ve=qe[0];ce.some(function(ot){if(Fs(ot[0],Ve))return ot.push(qe),!0})||ce.push([qe])}),Yo=[],ce.length?ce.length>1?{type:"MultiPolygon",coordinates:ce}:{type:"Polygon",coordinates:ce[0]}:null}};function gs(ce){var Ae=ce(A,0)[0]-ce(-A,0)[0];function qe(Ve,ot){var Ke=n(Ve)0?Ve-k:Ve+k,ot),qt=(ft[0]-ft[1])*_,Xt=(ft[0]+ft[1])*_;if(Ke)return[qt,Xt];var $t=Ae*_,dr=qt>0^Xt>0?-1:1;return[dr*qt-p(Xt)*$t,dr*Xt-p(qt)*$t]}return ce.invert&&(qe.invert=function(Ve,ot){var Ke=(Ve+ot)*_,ft=(ot-Ve)*_,qt=n(Ke)<.5*Ae&&n(ft)<.5*Ae;if(!qt){var Xt=Ae*_,$t=Ke>0^ft>0?-1:1,dr=-$t*Ve+(ft>0?1:-1)*Xt,Mr=-$t*ot+(Ke>0?1:-1)*Xt;Ke=(-dr-Mr)*_,ft=(dr-Mr)*_}var $r=ce.invert(Ke,ft);return qt||($r[0]+=Ke>0?k:-k),$r}),t.geoProjection(qe).rotate([-90,-90,45]).clipAngle(180-.001)}function bt(){return gs(Qr).scale(176.423)}function Ft(){return gs(ia).scale(111.48)}function hr(ce,Ae){if(!(0<=(Ae=+Ae)&&Ae<=20))throw new Error("invalid digits");function qe($t){var dr=$t.length,Mr=2,$r=new Array(dr);for($r[0]=+$t[0].toFixed(Ae),$r[1]=+$t[1].toFixed(Ae);Mr2||ii[0]!=dr[0]||ii[1]!=dr[1])&&(Mr.push(ii),dr=ii)}return Mr.length===1&&$t.length>1&&Mr.push(qe($t[$t.length-1])),Mr}function Ke($t){return $t.map(ot)}function ft($t){if($t==null)return $t;var dr;switch($t.type){case"GeometryCollection":dr={type:"GeometryCollection",geometries:$t.geometries.map(ft)};break;case"Point":dr={type:"Point",coordinates:qe($t.coordinates)};break;case"MultiPoint":dr={type:$t.type,coordinates:Ve($t.coordinates)};break;case"LineString":dr={type:$t.type,coordinates:ot($t.coordinates)};break;case"MultiLineString":case"Polygon":dr={type:$t.type,coordinates:Ke($t.coordinates)};break;case"MultiPolygon":dr={type:"MultiPolygon",coordinates:$t.coordinates.map(Ke)};break;default:return $t}return $t.bbox!=null&&(dr.bbox=$t.bbox),dr}function qt($t){var dr={type:"Feature",properties:$t.properties,geometry:ft($t.geometry)};return $t.id!=null&&(dr.id=$t.id),$t.bbox!=null&&(dr.bbox=$t.bbox),dr}if(ce!=null)switch(ce.type){case"Feature":return qt(ce);case"FeatureCollection":{var Xt={type:"FeatureCollection",features:ce.features.map(qt)};return ce.bbox!=null&&(Xt.bbox=ce.bbox),Xt}default:return ft(ce)}return ce}function nr(ce){var Ae=x(ce);function qe(Ve,ot){var Ke=Ae?b(Ve*Ae/2)/Ae:Ve/2;if(!ot)return[2*Ke,-ce];var ft=2*i(Ke*x(ot)),qt=1/b(ot);return[x(ft)*qt,ot+(1-o(ft))*qt-ce]}return qe.invert=function(Ve,ot){if(n(ot+=ce)y&&--qt>0);var $r=Ve*($t=b(ft)),ii=b(n(ot)0?A:-A)*(Xt+ot*(dr-ft)/2+ot*ot*(dr-2*Xt+ft)/2)]}di.invert=function(ce,Ae){var qe=Ae/A,Ve=qe*90,ot=c(18,n(Ve/5)),Ke=f(0,u(ot));do{var ft=li[Ke][1],qt=li[Ke+1][1],Xt=li[c(19,Ke+2)][1],$t=Xt-ft,dr=Xt-2*qt+ft,Mr=2*(n(qe)-qt)/$t,$r=dr/$t,ii=Mr*(1-$r*Mr*(1-2*$r*Mr));if(ii>=0||Ke===1){Ve=(Ae>=0?5:-5)*(ii+ot);var pi=50,Yi;do ot=c(18,n(Ve)/5),Ke=u(ot),ii=ot-Ke,ft=li[Ke][1],qt=li[Ke+1][1],Xt=li[c(19,Ke+2)][1],Ve-=(Yi=(Ae>=0?A:-A)*(qt+ii*(Xt-ft)/2+ii*ii*(Xt-2*qt+ft)/2)-Ae)*z;while(n(Yi)>E&&--pi>0);break}}while(--Ke>=0);var wn=li[Ke][0],Tn=li[Ke+1][0],ua=li[c(19,Ke+2)][0];return[ce/(Tn+ii*(ua-wn)/2+ii*ii*(ua-2*Tn+wn)/2),Ve*T]};function mi(){return t.geoProjection(di).scale(152.63)}function Oi(ce){function Ae(qe,Ve){var ot=o(Ve),Ke=(ce-1)/(ce-ot*o(qe));return[Ke*ot*x(qe),Ke*x(Ve)]}return Ae.invert=function(qe,Ve){var ot=qe*qe+Ve*Ve,Ke=H(ot),ft=(ce-H(1-ot*(ce+1)/(ce-1)))/((ce-1)/Ke+Ke/(ce-1));return[a(qe*ft,Ke*H(1-ft*ft)),Ke?q(Ve*ft/Ke):0]},Ae}function dn(ce,Ae){var qe=Oi(ce);if(!Ae)return qe;var Ve=o(Ae),ot=x(Ae);function Ke(ft,qt){var Xt=qe(ft,qt),$t=Xt[1],dr=$t*ot/(ce-1)+Ve;return[Xt[0]*Ve/dr,$t/dr]}return Ke.invert=function(ft,qt){var Xt=(ce-1)/(ce-1-qt*ot);return qe.invert(Xt*ft,Xt*qt*Ve)},Ke}function wi(){var ce=2,Ae=0,qe=t.geoProjectionMutator(dn),Ve=qe(ce,Ae);return Ve.distance=function(ot){return arguments.length?qe(ce=+ot,Ae):ce},Ve.tilt=function(ot){return arguments.length?qe(ce,Ae=ot*T):Ae*z},Ve.scale(432.147).clipAngle(U(1/ce)*z-1e-6)}var ui=1e-4,Ai=1e4,gi=-180,gn=gi+ui,In=180,Vn=In-ui,Rn=-90,Hn=Rn+ui,Gn=90,pn=Gn-ui;function Lo(ce){return ce.length>0}function us(ce){return Math.floor(ce*Ai)/Ai}function Bs(ce){return ce===Rn||ce===Gn?[0,ce]:[gi,us(ce)]}function Js(ce){var Ae=ce[0],qe=ce[1],Ve=!1;return Ae<=gn?(Ae=gi,Ve=!0):Ae>=Vn&&(Ae=In,Ve=!0),qe<=Hn?(qe=Rn,Ve=!0):qe>=pn&&(qe=Gn,Ve=!0),Ve?[Ae,qe]:ce}function ol(ce){return ce.map(Js)}function Cl(ce,Ae,qe){for(var Ve=0,ot=ce.length;Ve=Vn||dr<=Hn||dr>=pn){Ke[ft]=Js(Xt);for(var Mr=ft+1;Mrgn&&iiHn&&pi=qt)break;qe.push({index:-1,polygon:Ae,ring:Ke=Ke.slice(Mr-1)}),Ke[0]=Bs(Ke[0][1]),ft=-1,qt=Ke.length}}}}function ul(ce){var Ae,qe=ce.length,Ve={},ot={},Ke,ft,qt,Xt,$t;for(Ae=0;Ae0?k-qt:qt)*z],$t=t.geoProjection(ce(ft)).rotate(Xt),dr=t.geoRotation(Xt),Mr=$t.center;return delete $t.rotate,$t.center=function($r){return arguments.length?Mr(dr($r)):dr.invert(Mr())},$t.clipAngle(90)}function Fo(ce){var Ae=o(ce);function qe(Ve,ot){var Ke=t.geoGnomonicRaw(Ve,ot);return Ke[0]*=Ae,Ke}return qe.invert=function(Ve,ot){return t.geoGnomonicRaw.invert(Ve/Ae,ot)},qe}function Ys(){return Gs([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Gs(ce,Ae){return zs(Fo,ce,Ae)}function Us(ce){if(!(ce*=2))return t.geoAzimuthalEquidistantRaw;var Ae=-ce/2,qe=-Ae,Ve=ce*ce,ot=b(qe),Ke=.5/x(qe);function ft(qt,Xt){var $t=U(o(Xt)*o(qt-Ae)),dr=U(o(Xt)*o(qt-qe)),Mr=Xt<0?-1:1;return $t*=$t,dr*=dr,[($t-dr)/(2*ce),Mr*H(4*Ve*dr-(Ve-$t+dr)*(Ve-$t+dr))/(2*ce)]}return ft.invert=function(qt,Xt){var $t=Xt*Xt,dr=o(H($t+($r=qt+Ae)*$r)),Mr=o(H($t+($r=qt+qe)*$r)),$r,ii;return[a(ii=dr-Mr,$r=(dr+Mr)*ot),(Xt<0?-1:1)*U(H($r*$r+ii*ii)*Ke)]},ft}function Sl(){return _l([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function _l(ce,Ae){return zs(Us,ce,Ae)}function kl(ce,Ae){if(n(Ae)y&&--qt>0);return[p(ce)*(H(ot*ot+4)+ot)*k/4,A*ft]};function Dl(){return t.geoProjection(Il).scale(127.16)}function oe(ce,Ae,qe,Ve,ot){function Ke(ft,qt){var Xt=qe*x(Ve*qt),$t=H(1-Xt*Xt),dr=H(2/(1+$t*o(ft*=ot)));return[ce*$t*dr*x(ft),Ae*Xt*dr]}return Ke.invert=function(ft,qt){var Xt=ft/ce,$t=qt/Ae,dr=H(Xt*Xt+$t*$t),Mr=2*q(dr/2);return[a(ft*b(Mr),ce*dr)/ot,dr&&q(qt*x(Mr)/(Ae*qe*dr))/Ve]},Ke}function w(ce,Ae,qe,Ve){var ot=k/3;ce=f(ce,y),Ae=f(Ae,y),ce=c(ce,A),Ae=c(Ae,k-y),qe=f(qe,0),qe=c(qe,100-y),Ve=f(Ve,y);var Ke=qe/100+1,ft=Ve/100,qt=U(Ke*o(ot))/ot,Xt=x(ce)/x(qt*A),$t=Ae/k,dr=H(ft*x(ce/2)/x(Ae/2)),Mr=dr/H($t*Xt*qt),$r=1/(dr*H($t*Xt*qt));return oe(Mr,$r,Xt,qt,$t)}function B(){var ce=65*T,Ae=60*T,qe=20,Ve=200,ot=t.geoProjectionMutator(w),Ke=ot(ce,Ae,qe,Ve);return Ke.poleline=function(ft){return arguments.length?ot(ce=+ft*T,Ae,qe,Ve):ce*z},Ke.parallels=function(ft){return arguments.length?ot(ce,Ae=+ft*T,qe,Ve):Ae*z},Ke.inflation=function(ft){return arguments.length?ot(ce,Ae,qe=+ft,Ve):qe},Ke.ratio=function(ft){return arguments.length?ot(ce,Ae,qe,Ve=+ft):Ve},Ke.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*k+3*H(3),le=2*H(2*k*H(3)/ee),Ne=_t(le*H(3)/k,le,ee/6);function $e(){return t.geoProjection(Ne).scale(176.84)}function pt(ce,Ae){return[ce*H(1-3*Ae*Ae/(k*k)),Ae]}pt.invert=function(ce,Ae){return[ce/H(1-3*Ae*Ae/(k*k)),Ae]};function zt(){return t.geoProjection(pt).scale(152.63)}function Yt(ce,Ae){var qe=o(Ae),Ve=o(ce)*qe,ot=1-Ve,Ke=o(ce=a(x(ce)*qe,-x(Ae))),ft=x(ce);return qe=H(1-Ve*Ve),[ft*qe-Ke*ot,-Ke*qe-ft*ot]}Yt.invert=function(ce,Ae){var qe=(ce*ce+Ae*Ae)/-2,Ve=H(-qe*(2+qe)),ot=Ae*qe+ce*Ve,Ke=ce*qe-Ae*Ve,ft=H(Ke*Ke+ot*ot);return[a(Ve*ot,ft*(1+qe)),ft?-q(Ve*Ke/ft):0]};function Jt(){return t.geoProjection(Yt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function yr(ce,Ae){var qe=ze(ce,Ae);return[(qe[0]+ce/A)/2,(qe[1]+Ae)/2]}yr.invert=function(ce,Ae){var qe=ce,Ve=Ae,ot=25;do{var Ke=o(Ve),ft=x(Ve),qt=x(2*Ve),Xt=ft*ft,$t=Ke*Ke,dr=x(qe),Mr=o(qe/2),$r=x(qe/2),ii=$r*$r,pi=1-$t*Mr*Mr,Yi=pi?U(Ke*Mr)*H(wn=1/pi):wn=0,wn,Tn=.5*(2*Yi*Ke*$r+qe/A)-ce,ua=.5*(Yi*ft+Ve)-Ae,oo=.5*wn*($t*ii+Yi*Ke*Mr*Xt)+.5/A,el=wn*(dr*qt/4-Yi*ft*$r),ys=.125*wn*(qt*$r-Yi*ft*$t*dr),il=.5*wn*(Xt*Mr+Yi*ii*Ke)+.5,$l=el*ys-il*oo,pl=(ua*el-Tn*il)/$l,Hl=(Tn*ys-ua*oo)/$l;qe-=pl,Ve-=Hl}while((n(pl)>y||n(Hl)>y)&&--ot>0);return[qe,Ve]};function Ir(){return t.geoProjection(yr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=be,e.geoAiryRaw=ne,e.geoAitoff=Ce,e.geoAitoffRaw=ze,e.geoArmadillo=te,e.geoArmadilloRaw=he,e.geoAugust=Ee,e.geoAugustRaw=ke,e.geoBaker=me,e.geoBakerRaw=Re,e.geoBerghaus=fe,e.geoBerghausRaw=Be,e.geoBertin1953=Tt,e.geoBertin1953Raw=Xe,e.geoBoggs=ut,e.geoBoggsRaw=nt,e.geoBonne=Je,e.geoBonneRaw=tt,e.geoBottomley=Vt,e.geoBottomleyRaw=Mt,e.geoBromley=ir,e.geoBromleyRaw=Kt,e.geoChamberlin=Ie,e.geoChamberlinRaw=_e,e.geoChamberlinAfrica=Pe,e.geoCollignon=ye,e.geoCollignonRaw=lt,e.geoCraig=de,e.geoCraigRaw=ue,e.geoCraster=St,e.geoCrasterRaw=Et,e.geoCylindricalEqualArea=qr,e.geoCylindricalEqualAreaRaw=Zt,e.geoCylindricalStereographic=vr,e.geoCylindricalStereographicRaw=Lr,e.geoEckert1=si,e.geoEckert1Raw=Er,e.geoEckert2=Si,e.geoEckert2Raw=Ei,e.geoEckert3=Hi,e.geoEckert3Raw=xi,e.geoEckert4=ci,e.geoEckert4Raw=Jr,e.geoEckert5=Lt,e.geoEckert5Raw=Di,e.geoEckert6=Dt,e.geoEckert6Raw=vt,e.geoEisenlohr=br,e.geoEisenlohrRaw=sr,e.geoFahey=Rr,e.geoFaheyRaw=Tr,e.geoFoucaut=oi,e.geoFoucautRaw=Br,e.geoFoucautSinusoidal=Pi,e.geoFoucautSinusoidalRaw=vi,e.geoGilbert=Ur,e.geoGingery=Vi,e.geoGingeryRaw=ti,e.geoGinzburg4=sn,e.geoGinzburg4Raw=Mi,e.geoGinzburg5=Or,e.geoGinzburg5Raw=fi,e.geoGinzburg6=Wt,e.geoGinzburg6Raw=st,e.geoGinzburg8=or,e.geoGinzburg8Raw=tr,e.geoGinzburg9=hi,e.geoGinzburg9Raw=Nr,e.geoGringorten=fn,e.geoGringortenRaw=Qr,e.geoGuyou=na,e.geoGuyouRaw=ia,e.geoHammer=gt,e.geoHammerRaw=Ze,e.geoHammerRetroazimuthal=un,e.geoHammerRetroazimuthalRaw=go,e.geoHealpix=Xn,e.geoHealpixRaw=Bo,e.geoHill=Ja,e.geoHillRaw=ts,e.geoHomolosine=ln,e.geoHomolosineRaw=pa,e.geoHufnagel=va,e.geoHufnagelRaw=ka,e.geoHyperelliptical=Yn,e.geoHyperellipticalRaw=Fi,e.geoInterrupt=Pn,e.geoInterruptedBoggs=jo,e.geoInterruptedHomolosine=Pa,e.geoInterruptedMollweide=co,e.geoInterruptedMollweideHemispheres=_o,e.geoInterruptedSinuMollweide=bs,e.geoInterruptedSinusoidal=sa,e.geoKavrayskiy7=ms,e.geoKavrayskiy7Raw=Bn,e.geoLagrange=on,e.geoLagrangeRaw=ya,e.geoLarrivee=ca,e.geoLarriveeRaw=Ga,e.geoLaskowski=Xi,e.geoLaskowskiRaw=bn,e.geoLittrow=Ia,e.geoLittrowRaw=qn,e.geoLoximuthal=Ya,e.geoLoximuthalRaw=yn,e.geoMiller=Da,e.geoMillerRaw=ba,e.geoModifiedStereographic=Un,e.geoModifiedStereographicRaw=Aa,e.geoModifiedStereographicAlaska=Sa,e.geoModifiedStereographicGs48=Za,e.geoModifiedStereographicGs50=xo,e.geoModifiedStereographicMiller=Wa,e.geoModifiedStereographicLee=hn,e.geoMollweide=jt,e.geoMollweideRaw=Ct,e.geoMtFlatPolarParabolic=Jo,e.geoMtFlatPolarParabolicRaw=ns,e.geoMtFlatPolarQuartic=ma,e.geoMtFlatPolarQuarticRaw=vo,e.geoMtFlatPolarSinusoidal=To,e.geoMtFlatPolarSinusoidalRaw=ja,e.geoNaturalEarth2=la,e.geoNaturalEarth2Raw=Ao,e.geoNellHammer=ho,e.geoNellHammerRaw=Ki,e.geoInterruptedQuarticAuthalic=Ca,e.geoNicolosi=En,e.geoNicolosiRaw=ta,e.geoPatterson=Eo,e.geoPattersonRaw=Zo,e.geoPolyconic=$a,e.geoPolyconicRaw=lo,e.geoPolyhedral=xs,e.geoPolyhedralButterfly=Na,e.geoPolyhedralCollignon=fo,e.geoPolyhedralWaterman=ro,e.geoProject=ws,e.geoGringortenQuincuncial=bt,e.geoPeirceQuincuncial=Ft,e.geoPierceQuincuncial=Ft,e.geoQuantize=hr,e.geoQuincuncial=gs,e.geoRectangularPolyconic=Sr,e.geoRectangularPolyconicRaw=nr,e.geoRobinson=mi,e.geoRobinsonRaw=di,e.geoSatellite=wi,e.geoSatelliteRaw=dn,e.geoSinuMollweide=cs,e.geoSinuMollweideRaw=an,e.geoSinusoidal=je,e.geoSinusoidalRaw=rt,e.geoStitch=Fl,e.geoTimes=ko,e.geoTimesRaw=ga,e.geoTwoPointAzimuthal=Gs,e.geoTwoPointAzimuthalRaw=Fo,e.geoTwoPointAzimuthalUsa=Ys,e.geoTwoPointEquidistant=_l,e.geoTwoPointEquidistantRaw=Us,e.geoTwoPointEquidistantUsa=Sl,e.geoVanDerGrinten=cl,e.geoVanDerGrintenRaw=kl,e.geoVanDerGrinten2=Uo,e.geoVanDerGrinten2Raw=xl,e.geoVanDerGrinten3=Bl,e.geoVanDerGrinten3Raw=_s,e.geoVanDerGrinten4=Dl,e.geoVanDerGrinten4Raw=Il,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=$e,e.geoWagner4Raw=Ne,e.geoWagner6=zt,e.geoWagner6Raw=pt,e.geoWiechel=Jt,e.geoWiechelRaw=Yt,e.geoWinkel3=Ir,e.geoWinkel3Raw=yr,Object.defineProperty(e,"__esModule",{value:!0})})});var B6e=Se(($0r,q6e)=>{"use strict";var od=Nl(),zX=Zr(),sFt=Ul(),XA=Math.PI/180,G2=180/Math.PI,IX={cursor:"pointer"},DX={cursor:"auto"};function lFt(e,t){var r=e.projection,n;return t._isScoped?n=uFt:t._isClipped?n=cFt:n=fFt,n(e,r)}q6e.exports=lFt;function RX(e,t){return od.behavior.zoom().translate(t.translate()).scale(t.scale())}function FX(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,u=s[n],l={},f={};function c(h,d){l[n+"."+h]=zX.nestedProperty(o,h).get(),sFt.call("_storeDirectGUIEdit",a,s._preGUI,l);var p=zX.nestedProperty(u,h);p.get()!==d&&(p.set(d),zX.nestedProperty(o,h).set(d),f[n+"."+h]=d)}r(c),c("projection.scale",t.scale()/e.fitScale),c("fitbounds",!1),i.emit("plotly_relayout",f)}function uFt(e,t){var r=RX(e,t);function n(){od.select(this).style(IX)}function i(){t.scale(od.event.scale).translate(od.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 u=t.invert(e.midPt);s("center.lon",u[0]),s("center.lat",u[1])}function o(){od.select(this).style(DX),FX(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function fFt(e,t){var r=RX(e,t),n=2,i,a,o,s,u,l,f,c,h;function d(k){return t.invert(k)}function p(k){var A=d(k);if(!A)return!0;var L=t(A);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function x(){od.select(this).style(IX),i=od.mouse(this),a=t.rotate(),o=t.translate(),s=a,u=d(i)}function b(){if(l=od.mouse(this),p(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(od.event.scale),t.translate([o[0],od.event.translate[1]]),u?d(l)&&(c=d(l),f=[s[0]+(c[0]-u[0]),a[1],a[2]],t.rotate(f),s=f):(i=l,u=d(i)),h=!0,e.render(!0);var k=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-k[0]})}function y(){od.select(this).style(DX),h&&FX(e,t,E)}function E(k){var A=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-A[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",b).on("zoomend",y),r}function cFt(e,t){var r={r:t.rotate(),k:t.scale()},n=RX(e,t),i=_Ft(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){od.select(this).style(IX);var h=od.mouse(this),d=t.rotate(),p=d,x=t.translate(),b=hFt(d);s=SF(t,h),o.call(n,"zoom",function(){var y=od.mouse(this);if(t.scale(r.k=od.event.scale),!s)h=y,s=SF(t,h);else if(SF(t,y)){t.rotate(d).translate(x);var E=SF(t,y),k=pFt(s,E),A=yFt(dFt(b,k)),L=r.r=vFt(A,s,p);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=p),t.rotate(L),p=L}l(i.of(this,arguments))}),u(i.of(this,arguments))}).on("zoomend",function(){od.select(this).style(DX),o.call(n,"zoom",null),f(i.of(this,arguments)),FX(e,t,c)}).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 u(h){a++||h({type:"zoomstart"})}function l(h){h({type:"zoom"})}function f(h){--a||h({type:"zoomend"})}function c(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return od.rebind(n,i,"on")}function SF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&mFt(r)}function hFt(e){var t=.5*e[0]*XA,r=.5*e[1]*XA,n=.5*e[2]*XA,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),u=Math.sin(n),l=Math.cos(n);return[a*s*l+i*o*u,i*s*l-a*o*u,a*o*l+i*s*u,a*s*u-i*o*l]}function dFt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],l=t[3];return[r*o-n*s-i*u-a*l,r*s+n*o+i*l-a*u,r*u-n*l+i*o+a*s,r*l+n*u-i*s+a*o]}function pFt(e,t){if(!(!e||!t)){var r=gFt(e,t),n=Math.sqrt(F6e(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,F6e(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function vFt(e,t,r){var n=PX(t,2,e[0]);n=PX(n,1,e[1]),n=PX(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],l=n[2],f=Math.atan2(a,i)*G2,c=Math.sqrt(i*i+a*a),h,d;Math.abs(u)>c?(d=(u>0?90:-90)-f,h=0):(d=Math.asin(u/c)*G2-f,h=Math.sqrt(c*c-u*u));var p=180-d-2*f,x=(Math.atan2(l,s)-Math.atan2(o,h))*G2,b=(Math.atan2(l,s)-Math.atan2(o,-h))*G2,y=D6e(r[0],r[1],d,x),E=D6e(r[0],r[1],p,b);return y<=E?[d,x,r[2]]:[p,b,r[2]]}function D6e(e,t,r,n){var i=R6e(r-e),a=R6e(n-t);return Math.sqrt(i*i+a*a)}function R6e(e){return(e%360+540)%360-180}function PX(e,t,r){var n=r*XA,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),u=Math.sin(n);return i[a]=e[a]*s-e[o]*u,i[o]=e[o]*s+e[a]*u,i}function yFt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*G2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*G2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*G2]}function mFt(e){var t=e[0]*XA,r=e[1]*XA,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function F6e(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var t1=Nl(),OX=LX(),xFt=OX.geoPath,bFt=OX.geoDistance,wFt=I6e(),TFt=Ul(),QE=Zr(),AFt=QE.strTranslate,MF=Pl(),$E=yu(),O6e=jc(),SFt=Sc(),BX=hu(),N6e=wy().getAutoRange,qX=gp(),MFt=nh().prepSelect,EFt=nh().clearOutline,kFt=nh().selectOnClick,CFt=B6e(),cv=XE(),LFt=ix(),V6e=fF(),zFt=vX().feature;function H6e(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 $y=H6e.prototype;G6e.exports=function(t){return new H6e(t)};$y.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 u in cv.layerNameToAdjective)if(u!=="frame"&&a["show"+u]){s=!0;break}for(var l=!1,f=0;f0&&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),SFt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var u=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=u.selectAll(".point"),this.dataPoints.text=u.selectAll("text"),this.dataPaths.line=u.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()};$y.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,u=n.lataxis,l=s._ax,f=u._ax,c=this.projection=PFt(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||{},p=o.rotation||{},x=s.range||[],b=u.range||[];if(n.fitbounds){l._length=h[1][0]-h[0][0],f._length=h[1][1]-h[0][1],l.range=N6e(r,l),f.range=N6e(r,f);var y=(l.range[0]+l.range[1])/2,E=(f.range[0]+f.range[1])/2;if(n._isScoped)d={lon:y,lat:E};else if(n._isClipped){d={lon:y,lat:E},p={lon:y,lat:E,roll:p.roll};var k=o.type,A=cv.lonaxisSpan[k]/2||180,L=cv.lataxisSpan[k]/2||90;x=[y-A,y+A],b=[E-L,E+L]}else d={lon:y,lat:E},p={lon:y,lat:p.lat,roll:p.roll}}c.center([d.lon-p.lon,d.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var _=U6e(x,b);c.fitExtent(h,_);var C=this.bounds=c.getBounds(_),M=this.fitScale=c.scale(),v=c.translate();if(n.fitbounds){var z=c.getBounds(U6e(l.range,f.range)),T=Math.min((C[1][0]-C[0][0])/(z[1][0]-z[0][0]),(C[1][1]-C[0][1])/(z[1][1]-z[0][1]));isFinite(T)?c.scale(T*M):QE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else c.scale(o.scale*M);var F=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(c.translate([v[0]+(F[0]-v[0]),v[1]+(F[1]-v[1])]).clipExtent(C),n._isAlbersUsa){var q=c([d.lon,d.lat]),U=c.translate();c.translate([U[0]-(q[0]-U[0]),U[1]-(q[1]-U[1])])}};$y.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!!cv.lineLayers[h]}function u(h){return!!cv.fillLayers[h]}var l=this.hasChoropleth?cv.layersForChoropleth:cv.layers,f=l.filter(function(h){return s(h)||u(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),c=r.framework.selectAll(".layer").data(f,String);c.exit().each(function(h){delete i[h],delete a[h],t1.select(this).remove()}),c.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):u(h)&&(a[h]=d.append("path").style("stroke","none"))}),c.order(),c.each(function(h){var d=a[h],p=cv.layerNameToAdjective[h];h==="frame"?d.datum(cv.sphereSVG):s(h)||u(h)?d.datum(zFt(n,n.objects[h])):o(h)&&d.datum(IFt(h,t,e)).call(MF.stroke,t[h].gridcolor).call($E.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(MF.stroke,t[p+"color"]).call($E.dashLine,"",t[p+"width"]):u(h)&&d.call(MF.fill,t[p+"color"])})};$y.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;$E.setRect(this.clipRect,i,a,o,s),this.bgRect.call($E.setRect,i,a,o,s).call(MF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};$y.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 c=r.viewInitial,h={};for(var d in c)h[r.id+"."+d]=c[d];TFt.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function u(c){return r.projection.invert([c[0]+r.xaxis._offset,c[1]+r.yaxis._offset])}var l=function(c,h){if(h.isRect){var d=c.range={};d[r.id]=[u([h.xmin,h.ymin]),u([h.xmax,h.ymax])]}else{var p=c.lassoPoints={};p[r.id]=h.map(u)}},f={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:l},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(c){c===2&&EFt(n)}};a==="pan"?(i.node().onmousedown=null,i.call(CFt(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),f.prepFn=function(c,h,d){MFt(c,h,d,f,a)},qX.init(f)),i.on("mousemove",function(){var c=r.projection.invert(QE.getPositionFromD3Event());if(!c)return qX.unhover(n,t1.event);r.xaxis.p2c=function(){return c[0]},r.yaxis.p2c=function(){return c[1]},O6e.hover(n,t1.event,r.id)}),i.on("mouseout",function(){n._dragging||qX.unhover(n,t1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&kFt(t1.event,n,[r.xaxis],[r.yaxis],r.id,f),o.indexOf("event")>-1&&O6e.click(n,t1.event))})};$y.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($E.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"},BX.setConvert(e.mockAxis,r)};$y.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},QE.extendFlat(this.viewInitial,i)};$y.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};$y._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?AFt(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 PFt(e){var t=e.projection,r=t.type,n=cv.projNames[r];n="geo"+QE.titleCase(n);for(var i=OX[n]||wFt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?cv.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],u=function(c){return c?a:[]},l=0;lp}else return!1},a.getPath=function(){return xFt().projection(a)},a.getBounds=function(c){return a.getPath().bounds(c)},a.precision(cv.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-cv.clipPad),a}function IFt(e,t,r){var n=1e-6,i=2.5,a=t[e],o=cv.scopeDefaults[t.scope],s,u,l;e==="lonaxis"?(s=o.lonaxisRange,u=o.lataxisRange,l=function(E,k){return[E,k]}):e==="lataxis"&&(s=o.lataxisRange,u=o.lonaxisRange,l=function(E,k){return[k,E]});var f={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};BX.setConvert(f,r);var c=BX.calcTicks(f);!t.isScoped&&e==="lonaxis"&&c.pop();for(var h=c.length,d=new Array(h),p=0;p0&&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 NX=Se((eyr,X6e)=>{"use strict";var KA=Ih(),DFt=Ec().attributes,RFt=Id().dash,YA=XE(),FFt=_c().overrideAll,j6e=X1(),Z6e={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:KA.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:RFt},qFt=X6e.exports=FFt({domain:DFt({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:j6e(YA.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:j6e(YA.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:KA.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:YA.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:YA.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:YA.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:YA.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:KA.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:KA.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:KA.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:KA.background},lonaxis:Z6e,lataxis:Z6e},"plot","from-root");qFt.uirevision={valType:"any",editType:"none"}});var J6e=Se((tyr,K6e)=>{"use strict";var EF=Zr(),BFt=k_(),OFt=Dd().getSubplotData,kF=XE(),NFt=NX(),Y6e=kF.axesNames;K6e.exports=function(t,r,n){BFt(t,r,n,{type:"geo",attributes:NFt,handleDefaults:UFt,fullData:n,partition:"y"})};function UFt(e,t,r,n){var i=OFt(n.fullData,"geo",n.id),a=i.map(function(ne){return ne.index}),o=r("resolution"),s=r("scope"),u=kF.scopeDefaults[s],l=r("projection.type",u.projType),f=t._isAlbersUsa=l==="albers usa";f&&(s=t.scope="usa");var c=t._isScoped=s!=="world",h=t._isSatellite=l==="satellite",d=t._isConic=l.indexOf("conic")!==-1||l==="albers",p=t._isClipped=!!kF.lonaxisSpan[l];if(e.visible===!1){var x=EF.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var b=r("visible"),y,E=0;E0&&q<0&&(q+=360);var U=(F+q)/2,H;if(!f){var j=c?u.projRotate:[U,0,0];H=r("projection.rotation.lon",j[0]),r("projection.rotation.lat",j[1]),r("projection.rotation.roll",j[2]),y=r("showcoastlines",!c&&b),y&&(r("coastlinecolor"),r("coastlinewidth")),y=r("showocean",b?void 0:!1),y&&r("oceancolor")}var G,O;if(f?(G=-96.6,O=38.7):(G=c?U:H,O=(T[0]+T[1])/2),r("center.lon",G),r("center.lat",O),h&&(r("projection.tilt"),r("projection.distance")),d){var W=u.projParallels||[0,60];r("projection.parallels",W)}r("projection.scale"),y=r("showland",b?void 0:!1),y&&r("landcolor"),y=r("showlakes",b?void 0:!1),y&&r("lakecolor"),y=r("showrivers",b?void 0:!1),y&&(r("rivercolor"),r("riverwidth")),y=r("showcountries",c&&s!=="usa"&&b),y&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),c||(y=r("showframe",b),y&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,c?(delete t.center.lon,delete t.center.lat):p?(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 UX=Se((ryr,eRe)=>{"use strict";var VFt=Dd().getSubplotCalcData,HFt=Zr().counterRegex,GFt=W6e(),jm="geo",$6e=HFt(jm),Q6e={};Q6e[jm]={valType:"subplotid",dflt:jm,editType:"calc"};function WFt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[jm],i=0;i{"use strict";tRe.exports={attributes:H2(),supplyDefaults:FDe(),colorbar:ep(),formatLabels:ODe(),calc:lF(),calcGeoJSON:CX().calcGeoJSON,plot:CX().plot,style:SX(),styleOnSelect:ov().styleOnSelect,hoverPoints:A6e(),eventData:M6e(),selectPoints:C6e(),moduleType:"trace",name:"scattergeo",basePlotModule:UX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var nRe=Se((nyr,iRe)=>{"use strict";iRe.exports=rRe()});var JA=Se((ayr,sRe)=>{"use strict";var XFt=Du().hovertemplateAttrs,ax=H2(),YFt=Xf(),aRe=zf(),KFt=Ih().defaultLine,nx=vu().extendFlat,oRe=ax.marker.line;sRe.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({},oRe.color,{dflt:KFt}),width:nx({},oRe.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({},aRe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:XFt(),showlegend:nx({},aRe.showlegend,{dflt:!1})},YFt("",{cLetter:"z",editTypeOverride:"calc"}))});var uRe=Se((oyr,lRe)=>{"use strict";var CF=Zr(),JFt=ed(),$Ft=JA();lRe.exports=function(t,r,n,i){function a(h,d){return CF.coerce(t,r,$Ft,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&CF.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var u=a("geojson"),l;(typeof u=="string"&&u!==""||CF.isPlainObject(u))&&(l="geojson-id");var f=a("locationmode",l);f==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate");var c=a("marker.line.width");c&&a("marker.line.color"),a("marker.opacity"),JFt(t,r,i,a,{prefix:"",cLetter:"z"}),CF.coerceSelectionMarkerOpacity(r,a)}});var LF=Se((syr,hRe)=>{"use strict";var fRe=_u(),QFt=ju().BADNUM,e9t=Rp(),t9t=km(),r9t=F0();function cRe(e){return e&&typeof e=="string"}hRe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(f){return cRe(f)||fRe(f)}:a=cRe;for(var o=0;o{"use strict";var i9t=Nl(),n9t=Pl(),VX=yu(),a9t=fc();function o9t(e,t){t&&dRe(e,t)}function dRe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=a9t.makeColorScaleFuncFromTrace(r);i.each(function(u){i9t.select(this).attr("fill",s(u.z)).call(n9t.stroke,u.mlc||o.color).call(VX.dashLine,"",u.mlw||o.width||0).style("opacity",a.opacity)}),VX.selectedPointStyle(i,r)}function s9t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?VX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):dRe(e,t)}pRe.exports={style:o9t,styleOnSelect:s9t}});var HX=Se((uyr,mRe)=>{"use strict";var l9t=Nl(),vRe=Zr(),$A=ix(),u9t=fF().getTopojsonFeatures,yRe=wy().findExtremes,f9t=zF().style;function c9t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");vRe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=l9t.select(this),o=a.selectAll("path.choroplethlocation").data(vRe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),f9t(e,i)})}function h9t(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"?$A.extractTraceFeature(e):u9t(r,i.topojson),u=[],l=[],f=0;f{"use strict";var d9t=hu(),p9t=JA(),v9t=Zr().fillText;gRe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,u,l,f,c=[r,n],h=[r+360,n];for(u=0;u")}}});var IF=Se((cyr,_Re)=>{"use strict";_Re.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 DF=Se((hyr,xRe)=>{"use strict";xRe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u,l,f,c;if(r===!1)for(s=0;s{"use strict";bRe.exports={attributes:JA(),supplyDefaults:uRe(),colorbar:S_(),calc:LF(),calcGeoJSON:HX().calcGeoJSON,plot:HX().plot,style:zF().style,styleOnSelect:zF().styleOnSelect,hoverPoints:PF(),eventData:IF(),selectPoints:DF(),moduleType:"trace",name:"choropleth",basePlotModule:UX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var ARe=Se((pyr,TRe)=>{"use strict";TRe.exports=wRe()});var RF=Se((vyr,MRe)=>{"use strict";var m9t=Ul(),s0=Zr(),g9t=oT();function _9t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,u=e.ya,l=a.x,f=a.y,c=s.c2p(t),h=u.c2p(r),d=e.distance,p;if(a.tree){var x=s.p2c(c-d),b=s.p2c(c+d),y=u.p2c(h-d),E=u.p2c(h+d);n==="x"?p=a.tree.range(Math.min(x,b),Math.min(u._rl[0],u._rl[1]),Math.max(x,b),Math.max(u._rl[0],u._rl[1])):p=a.tree.range(Math.min(x,b),Math.min(y,E),Math.max(x,b),Math.max(y,E))}else p=a.ids;var k,A,L,_,C,M,v,z,T,F=d;if(n==="x"){var q=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C=Math.min(H,j)&&c<=Math.max(H,j)?0:1/0}if(M=Math.min(G,O)&&h<=Math.max(G,O)?0:1/0}T=Math.sqrt(M*M+v*v),A=p[C]}}}else for(C=p.length-1;C>-1;C--)k=p[C],L=l[k],_=f[k],M=s.c2p(L)-c,v=u.c2p(_)-h,z=Math.sqrt(M*M+v*v),z{"use strict";var ERe=20;kRe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:ERe,SYMBOL_STROKE:ERe/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 ek=Se((myr,PRe)=>{"use strict";var x9t=zf(),b9t=uc(),w9t=Ey(),oh=Zc(),CRe=Gc().axisHoverFormat,LRe=Xf(),T9t=X1(),GX=vu().extendFlat,A9t=_c().overrideAll,S9t=ox().DASHES,zRe=oh.line,r1=oh.marker,M9t=r1.line,QA=PRe.exports=A9t({x:oh.x,x0:oh.x0,dx:oh.dx,y:oh.y,y0:oh.y0,dy:oh.dy,xperiod:oh.xperiod,yperiod:oh.yperiod,xperiod0:oh.xperiod0,yperiod0:oh.yperiod0,xperiodalignment:oh.xperiodalignment,yperiodalignment:oh.yperiodalignment,xhoverformat:CRe("x"),yhoverformat:CRe("y"),text:oh.text,hovertext:oh.hovertext,textposition:oh.textposition,textfont:b9t({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:zRe.color,width:zRe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:T9t(S9t),dflt:"solid"}},marker:GX({},LRe("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:GX({},LRe("marker.line"),{width:M9t.width})}),connectgaps:oh.connectgaps,fill:GX({},oh.fill,{dflt:"none"}),fillcolor:w9t(),selected:{marker:oh.selected.marker,textfont:oh.selected.textfont},unselected:{marker:oh.unselected.marker,textfont:oh.unselected.textfont},opacity:x9t.opacity},"calc","nested");QA.x.editType=QA.y.editType=QA.x0.editType=QA.y0.editType="calc+clearAxisTypes";QA.hovertemplate=oh.hovertemplate;QA.texttemplate=oh.texttemplate});var FF=Se(WX=>{"use strict";var IRe=ox();WX.isOpenSymbol=function(e){return typeof e=="string"?IRe.OPEN_RE.test(e):e%200>100};WX.isDotSymbol=function(e){return typeof e=="string"?IRe.DOT_RE.test(e):e>200}});var FRe=Se((_yr,RRe)=>{"use strict";var DRe=Zr(),E9t=Ul(),k9t=FF(),C9t=ek(),L9t=Sm(),qF=ec(),z9t=K3(),P9t=zy(),I9t=$v(),D9t=I0(),R9t=Py(),F9t=D0();RRe.exports=function(t,r,n,i){function a(d,p){return DRe.coerce(t,r,C9t,d,p)}var o=t.marker?k9t.isOpenSymbol(t.marker.symbol):!1,s=qF.isBubble(t),u=z9t(t,r,i,a);if(!u){r.visible=!1;return}P9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var l=u{"use strict";var q9t=JP();qRe.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]),q9t(t,r,n)}});var NRe=Se((byr,ORe)=>{"use strict";function B9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u>=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],u=r!==void 0?r(s,t):s-t;u>0?(a=o,i=o-1):n=o+1}return a}function N9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u<0?(a=o,n=o+1):i=o-1}return a}function U9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u<=0?(a=o,n=o+1):i=o-1}return a}function V9t(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 tk(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)}ORe.exports={ge:function(e,t,r,n,i){return tk(e,t,r,n,i,B9t)},gt:function(e,t,r,n,i){return tk(e,t,r,n,i,O9t)},lt:function(e,t,r,n,i){return tk(e,t,r,n,i,N9t)},le:function(e,t,r,n,i){return tk(e,t,r,n,i,U9t)},eq:function(e,t,r,n,i){return tk(e,t,r,n,i,V9t)}}});var Zm=Se((wyr,VRe)=>{"use strict";VRe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=URe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var H9t=Zm();HRe.exports=G9t;function G9t(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=H9t(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 W2=Se((Ayr,GRe)=>{"use strict";GRe.exports=W9t;function W9t(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]{WRe.exports=function(){for(var e=0;e{var ZRe=HR();XRe.exports=j9t;function j9t(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,u;(!t||typeof t=="string")&&(t=new(ZRe(t||"float32"))(i+r));var l=t.length-r;if(i!==l)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+l);for(a=0,s=r;a{"use strict";YRe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var $Re=Se((kyr,JRe)=>{"use strict";JRe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var aFe=Se((Cyr,nFe)=>{"use strict";var QRe=NRe(),eFe=BA(),Z9t=eS(),X9t=W2(),tFe=Zm(),ZX=jRe(),Y9t=j2(),K9t=KRe(),J9t=HR(),rFe=$Re(),$9t=1073741824;nFe.exports=function(t,r){r||(r={}),t=Y9t(t,"float64"),r=tFe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=ZX(r.maxDepth,255),i=ZX(r.bounds,X9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=iFe(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(J9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;yn||_>$9t){for(let O=0;Obe||v>ze||z=F||re===ne)return;let Ce=u[W];ne===void 0&&(ne=Ce.length);for(let Be=re;Be=A&&Ze<=_&&et>=L&&et<=C&&q.push(fe)}let he=l[W],te=he[re*4+0],ke=he[re*4+1],Ee=he[re*4+2],Me=he[re*4+3],Oe=H(he,re+1),Re=O*.5,me=W+1;U(j,G,Re,me,te,ke||Ee||Me||Oe),U(j,G+Re,Re,me,ke,Ee||Me||Oe),U(j+Re,G,Re,me,Ee,Me||Oe),U(j+Re,G+Re,Re,me,Me,Oe)}function H(j,G){let O=null,W=0;for(;O===null;)if(O=j[G*4+W],W++,W>j.length)return null;return O}return q}function x(y,E,k,A,L){let _=[];for(let C=0;C{"use strict";oFe.exports=aFe()});var XX=Se((zyr,sFe)=>{sFe.exports=Q9t;function Q9t(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 u=1;u{"use strict";Object.defineProperty(OF,"__esModule",{value:!0});var eqt=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),u;!(i=(u=s.next()).done)&&(n.push(u.value),!(r&&n.length===r));i=!0);}catch(l){a=!0,o=l}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")}}(),rk=Math.PI*2,YX=function(t,r,n,i,a,o,s){var u=t.x,l=t.y;u*=r,l*=n;var f=i*u-a*l,c=a*u+i*l;return{x:f+o,y:c+s}},tqt=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}]},lFe=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)},rqt=function(t,r,n,i,a,o,s,u,l,f,c,h){var d=Math.pow(a,2),p=Math.pow(o,2),x=Math.pow(c,2),b=Math.pow(h,2),y=d*p-d*b-p*x;y<0&&(y=0),y/=d*b+p*x,y=Math.sqrt(y)*(s===u?-1:1);var E=y*a/o*h,k=y*-o/a*c,A=f*E-l*k+(t+n)/2,L=l*E+f*k+(r+i)/2,_=(c-E)/a,C=(h-k)/o,M=(-c-E)/a,v=(-h-k)/o,z=lFe(1,0,_,C),T=lFe(_,C,M,v);return u===0&&T>0&&(T-=rk),u===1&&T<0&&(T+=rk),[A,L,z,T]},iqt=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,u=t.xAxisRotation,l=u===void 0?0:u,f=t.largeArcFlag,c=f===void 0?0:f,h=t.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||s===0)return[];var x=Math.sin(l*rk/360),b=Math.cos(l*rk/360),y=b*(r-i)/2+x*(n-a)/2,E=-x*(r-i)/2+b*(n-a)/2;if(y===0&&E===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(y,2)/Math.pow(o,2)+Math.pow(E,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var A=rqt(r,n,i,a,o,s,c,d,x,b,y,E),L=eqt(A,4),_=L[0],C=L[1],M=L[2],v=L[3],z=Math.abs(v)/(rk/4);Math.abs(1-z)<1e-7&&(z=1);var T=Math.max(Math.ceil(z),1);v/=T;for(var F=0;F{"use strict";hFe.exports=aqt;var nqt=fFe();function aqt(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,u=null,l=0,f=0,c=0,h=e.length;c4?(n=d[d.length-4],i=d[d.length-3]):(n=l,i=f),r.push(d)}return r}function NF(e,t,r,n){return["C",e,t,r,n,r,n]}function cFe(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 KX=Se((Iyr,pFe)=>{"use strict";pFe.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 mFe=Se((Dyr,yFe)=>{"use strict";var oqt=XM(),sqt=XX(),lqt=dFe(),uqt=KX(),vFe=tE();yFe.exports=fqt;function fqt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(vFe(uqt(e),"String is not an SVG path."),e=oqt(e)),vFe(Array.isArray(e),"Argument should be a string or an array of path segments."),e=sqt(e),e=lqt(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 TFe=Se((Ryr,wFe)=>{var Z2=Math.PI,gFe=bFe(120);wFe.exports=cqt;function cqt(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,u=null,l=0,f=0,c=0,h=e.length;c7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var x=l,b=f;(t=="C"||t=="S")&&(x+=x-n,b+=b-i),d=["C",x,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=l*2-s,u=f*2-u):(s=l,u=f),d=_Fe(l,f,s,u,d[1],d[2]);break;case"Q":s=d[1],u=d[2],d=_Fe(l,f,d[1],d[2],d[3],d[4]);break;case"L":d=UF(l,f,d[1],d[2]);break;case"H":d=UF(l,f,d[1],f);break;case"V":d=UF(l,f,l,d[1]);break;case"Z":d=UF(l,f,a,o);break}t=p,l=d[d.length-2],f=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=l,i=f),r.push(d)}return r}function UF(e,t,r,n){return["C",e,t,r,n,r,n]}function _Fe(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 xFe(e,t,r,n,i,a,o,s,u,l){if(l)k=l[0],A=l[1],y=l[2],E=l[3];else{var f=JX(e,t,-i);e=f.x,t=f.y,f=JX(s,u,-i),s=f.x,u=f.y;var c=(e-s)/2,h=(t-u)/2,d=c*c/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var p=r*r,x=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((p*x-p*h*h-x*c*c)/(p*h*h+x*c*c)));b==1/0&&(b=1);var y=b*r*h/n+(e+s)/2,E=b*-n*c/r+(t+u)/2,k=Math.asin(((t-E)/n).toFixed(9)),A=Math.asin(((u-E)/n).toFixed(9));k=eA&&(k=k-Z2*2),!o&&A>k&&(A=A-Z2*2)}if(Math.abs(A-k)>gFe){var L=A,_=s,C=u;A=k+gFe*(o&&A>k?1:-1),s=y+r*Math.cos(A),u=E+n*Math.sin(A);var M=xFe(s,u,r,n,i,0,o,_,C,[A,L,y,E])}var v=Math.tan((A-k)/4),z=4/3*r*v,T=4/3*n*v,F=[2*e-(e+z*Math.sin(k)),2*t-(t-T*Math.cos(k)),s+z*Math.sin(A),u-T*Math.cos(A),s,u];if(l)return F;M&&(F=F.concat(M));for(var q=0;q{var hqt=XX(),dqt=TFe(),pqt={M:"moveTo",C:"bezierCurveTo"};AFe.exports=function(e,t){e.beginPath(),dqt(hqt(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[pqt[n]].apply(e,i)}),e.closePath()}});var CFe=Se((qyr,kFe)=>{"use strict";var vqt=BA();kFe.exports=yqt;var ik=1e20;function yqt(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,u,l,f,c,h,d,p,x;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,u=e,t.stride?f=t.stride:f=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,c=h.getContext("2d"),a=h.width,o=h.height,d=c.getImageData(0,0,a,o),u=d.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,c=e,a=h.width,o=h.height,d=c.getImageData(0,0,a,o),u=d.data,f=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,u=d.data,f=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&u instanceof window.Uint8ClampedArray||window.Uint8Array&&u instanceof window.Uint8Array)for(l=u,u=Array(a*o),p=0,x=l.length;p{"use strict";var mqt=mFe(),gqt=XM(),_qt=SFe(),xqt=KX(),bqt=CFe(),$X=document.createElement("canvas"),hv=$X.getContext("2d");LFe.exports=wqt;function wqt(e,t){if(!xqt(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=$X.width=t.w||t.width||200,n=$X.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||mqt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],u=Math.min(s[0]||0,s[1]||0)/2;if(hv.fillStyle="black",hv.fillRect(0,0,r,n),hv.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?hv.strokeStyle="white":hv.strokeStyle="black",hv.lineWidth=Math.abs(a)),hv.translate(r*.5,n*.5),hv.scale(u,u),Tqt()){var l=new Path2D(e);hv.fill(l),a&&hv.stroke(l)}else{var f=gqt(e);_qt(hv,f),hv.fill(),a&&hv.stroke()}hv.setTransform(1,0,0,1,0,0);var c=bqt(hv,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return c}var VF;function Tqt(){if(VF!=null)return VF;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return VF=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return VF=r&&r.data&&r.data[3]===255}});var Y2=Se((Oyr,VFe)=>{"use strict";var GF=_u(),Aqt=zFe(),HF=J_(),Sqt=Ul(),iS=Zr(),Sh=iS.isArrayOrTypedArray,tS=yu(),PFe=$c(),IFe=$g().formatColor,rS=ec(),Mqt=S3(),eY=FF(),nk=ox(),Eqt=N1().DESELECTDIM,DFe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},kqt=rv().appendArrayPointValue;function Cqt(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(rS.hasText(t)&&(n.text=UFe(e,t),n.textSel=FFe(e,t,t.selected),n.textUnsel=FFe(e,t,t.unselected)),rS.hasMarkers(t)&&(n.marker=rY(e,t),n.markerSel=tY(e,t,t.selected),n.markerUnsel=tY(e,t,t.unselected),!t.unselected&&Sh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function rY(e,t){var r=t._length,n=t.marker,i={},a,o=Sh(n.symbol),s=Sh(n.angle),u=Sh(n.color),l=Sh(n.line.color),f=Sh(n.opacity),c=Sh(n.size),h=Sh(n.line.width),d;if(o||(d=eY.isOpenSymbol(n.symbol)),o||u||l||f||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var p=n.symbol,x=n.angle,b=IFe(n,n.opacity,r),y=IFe(n.line,n.opacity,r);if(!Sh(y[0])){var E=y;for(y=Array(r),a=0;ank.TOO_MANY_POINTS||rS.hasMarkers(t)?"rect":"round";if(l&&t.connectgaps){var c=a[0],h=a[1];for(o=0;o1?u[o]:u[0]:u,d=Sh(l)?l.length>1?l[o]:l[0]:l,p=DFe[h],x=DFe[d],b=f?f/.8+1:0,y=-x*b-x*.5;a.offset[o]=[p*b/c,y/c]}}return a}VFe.exports={style:Cqt,markerStyle:rY,markerSelection:tY,linePositions:zqt,errorBarPositions:Pqt,textPosition:Iqt}});var iY=Se((Nyr,HFe)=>{"use strict";var WF=Zr();HFe.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(){WF.extendFlat(n,a,i)},n.init(),n.update=function(s){var u=WF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(u),n.scatter2d&&n.scatter2d.update(u),n.line2d&&n.line2d.update(u),n.error2d&&n.error2d.update(u.concat(u)),n.select2d&&n.select2d.update(u),n.glText)for(var l=0;l{"use strict";var Dqt=BF(),nS=Zr(),GFe=$c(),Rqt=wy().findExtremes,WFe=Iy(),nY=q0(),Fqt=nY.calcMarkerSize,qqt=nY.calcAxisExpansion,Bqt=nY.setFirstScatter,Oqt=R0(),aS=Y2(),Nqt=iY(),jFe=ju().BADNUM,Uqt=ox().TOO_MANY_POINTS;XFe.exports=function(t,r){var n=t._fullLayout,i=r._xA=GFe.getFromId(t,r.xaxis,"x"),a=r._yA=GFe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,u=s>=Uqt,l=s*2,f={},c,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),p=WFe(r,i,"x",h),x=WFe(r,a,"y",d),b=p.vals,y=x.vals;r._x=b,r._y=y,r.xperiodalignment&&(r._origX=h,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=x.starts,r._yEnds=x.ends);var E=new Array(l),k=new Array(s);for(c=0;c1&&nS.extendFlat(o.line,aS.linePositions(e,r,n)),o.errorX||o.errorY){var s=aS.errorBarPositions(e,r,n,i,a);o.errorX&&nS.extendFlat(o.errorX,s.x),o.errorY&&nS.extendFlat(o.errorY,s.y)}return o.text&&(nS.extendFlat(o.text,{positions:n},aS.textPosition(e,r,o.text,o.marker)),nS.extendFlat(o.textSel,{positions:n},aS.textPosition(e,r,o.text,o.markerSel)),nS.extendFlat(o.textUnsel,{positions:n},aS.textPosition(e,r,o.text,o.markerUnsel))),o}});var aY=Se((Vyr,JFe)=>{"use strict";var KFe=Zr(),Hqt=Pl(),Gqt=N1().DESELECTDIM;function Wqt(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],u=i.textOptions[a],l=i.textSelectedOptions[a]||{},f=i.textUnselectedOptions[a]||{},c=KFe.extendFlat({},u),h,d;if(o.length||s.length){var p=l.color,x=f.color,b=u.color,y=KFe.isArrayOrTypedArray(b);for(c.color=new Array(r._length),h=0;h{"use strict";var $Fe=ec(),jqt=aY().styleTextSelection;QFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u=n[0].t,l=s._length,f=u.x,c=u.y,h=u._scene,d=u.index;if(!h)return o;var p=$Fe.hasText(s),x=$Fe.hasMarkers(s),b=!x&&!p;if(s.visible!==!0||b)return o;var y=[],E=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var Zqt=RF();e9e.exports={moduleType:"trace",name:"scattergl",basePlotModule:Th(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:ek(),supplyDefaults:FRe(),crossTraceDefaults:lU(),colorbar:ep(),formatLabels:BRe(),calc:YFe(),hoverPoints:Zqt.hoverPoints,selectPoints:oY(),meta:{}}});var i9e=Se((Wyr,ZF)=>{"use strict";var jF=BA();ZF.exports=r9e;ZF.exports.to=r9e;ZF.exports.from=Xqt;function r9e(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=jF(r,0,255)&255,n=jF(n,0,255)&255,i=jF(i,0,255)&255,a=jF(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function Xqt(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 Uh=Se((jyr,a9e)=>{"use strict";var n9e=Object.getOwnPropertySymbols,Yqt=Object.prototype.hasOwnProperty,Kqt=Object.prototype.propertyIsEnumerable;function Jqt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function $qt(){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}}a9e.exports=$qt()?Object.assign:function(e,t){for(var r,n=Jqt(e),i,a=1;a{o9e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";l9e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";u9e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var XF=Se((Kyr,oS)=>{"use strict";oS.exports=ak;oS.exports.float32=oS.exports.float=ak;oS.exports.fract32=oS.exports.fract=Qqt;var c9e=new Float32Array(1);function Qqt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=ak(e));for(var r=0,n=t.length;r{"use strict";function e8t(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function t8t(e,t){return n8t(e)||e8t(e,t)||d9e(e,t)||s8t()}function r8t(e){return i8t(e)||a8t(e)||d9e(e)||o8t()}function i8t(e){if(Array.isArray(e))return lY(e)}function n8t(e){if(Array.isArray(e))return e}function a8t(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function d9e(e,t){if(e){if(typeof e=="string")return lY(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 lY(e,t)}}function lY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rRe&&Be>0){var fe=(me[Be][0]-Re)/(me[Be][0]-me[Be-1][0]);return me[Be][1]*(1-fe)+fe*me[Be-1][1]}}return 1}var W=[0,0,0],re={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 ne(Re,me){var Be,fe,Ze,et=me.axes&&me.axes.lastCubeProps.axis||W,gt=me.showSurface,Pt=me.showContour;for(Be=0;Be<3;++Be)for(gt=gt||me.surfaceProject[Be],fe=0;fe<3;++fe)Pt=Pt||me.contourProject[Be][fe];for(Be=0;Be<3;++Be){var Qe=re.projections[Be];for(fe=0;fe<16;++fe)Qe[fe]=0;for(fe=0;fe<4;++fe)Qe[5*fe]=1;Qe[5*Be]=0,Qe[12+Be]=me.axesBounds[+(et[Be]>0)][Be],y(Qe,Re.model,Qe);var Xe=re.clipBounds[Be];for(Ze=0;Ze<2;++Ze)for(fe=0;fe<3;++fe)Xe[Ze][fe]=Re.clipBounds[Ze][fe];Xe[0][Be]=-1e8,Xe[1][Be]=1e8}return re.showSurface=gt,re.showContour=Pt,re}var be={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},ze=T.slice(),Ce=[1,0,0,0,1,0,0,0,1];function he(Re,me){Re=Re||{};var Be=this.gl;Be.disable(Be.CULL_FACE),this._colorMap.bind(0);var fe=be;fe.model=Re.model||T,fe.view=Re.view||T,fe.projection=Re.projection||T,fe.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],fe.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],fe.objectOffset=this.objectOffset,fe.contourColor=this.contourColor[0],fe.inverseModel=k(fe.inverseModel,fe.model);for(var Ze=0;Ze<2;++Ze)for(var et=fe.clipBounds[Ze],gt=0;gt<3;++gt)et[gt]=Math.min(Math.max(this.clipBounds[Ze][gt],-1e8),1e8);fe.kambient=this.ambientLight,fe.kdiffuse=this.diffuseLight,fe.kspecular=this.specularLight,fe.roughness=this.roughness,fe.fresnel=this.fresnel,fe.opacity=this.opacity,fe.height=0,fe.permutation=Ce,fe.vertexColor=this.vertexColor;var Pt=ze;for(y(Pt,fe.view,fe.model),y(Pt,fe.projection,Pt),k(Pt,Pt),Ze=0;Ze<3;++Ze)fe.eyePosition[Ze]=Pt[12+Ze]/Pt[15];var Qe=Pt[15];for(Ze=0;Ze<3;++Ze)Qe+=this.lightPosition[Ze]*Pt[4*Ze+3];for(Ze=0;Ze<3;++Ze){var Xe=Pt[12+Ze];for(gt=0;gt<3;++gt)Xe+=Pt[4*gt+Ze]*this.lightPosition[gt];fe.lightPosition[Ze]=Xe/Qe}var Tt=ne(fe,this);if(Tt.showSurface){for(this._shader.bind(),this._shader.uniforms=fe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Be.TRIANGLES,this._vertexCount),Ze=0;Ze<3;++Ze)!this.surfaceProject[Ze]||!this.vertexCount||(this._shader.uniforms.model=Tt.projections[Ze],this._shader.uniforms.clipBounds=Tt.clipBounds[Ze],this._vao.draw(Be.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Tt.showContour){var xt=this._contourShader;fe.kambient=1,fe.kdiffuse=0,fe.kspecular=0,fe.opacity=1,xt.bind(),xt.uniforms=fe;var _t=this._contourVAO;for(_t.bind(),Ze=0;Ze<3;++Ze)for(xt.uniforms.permutation=q[Ze],Be.lineWidth(this.contourWidth[Ze]*this.pixelRatio),gt=0;gt>4)/16)/255,Ze=Math.floor(fe),et=fe-Ze,gt=me[1]*(Re.value[1]+(Re.value[2]&15)/16)/255,Pt=Math.floor(gt),Qe=gt-Pt;Ze+=1,Pt+=1;var Xe=Be.position;Xe[0]=Xe[1]=Xe[2]=0;for(var Tt=0;Tt<2;++Tt)for(var xt=Tt?et:1-et,_t=0;_t<2;++_t)for(var Ct=_t?Qe:1-Qe,jt=Ze+Tt,At=Pt+_t,Te=xt*Ct,nt=0;nt<3;++nt)Xe[nt]+=this._field[nt].get(jt,At)*Te;for(var ut=this._pickResult.level,ct=0;ct<3;++ct)if(ut[ct]=E.le(this.contourLevels[ct],Xe[ct]),ut[ct]<0)this.contourLevels[ct].length>0&&(ut[ct]=0);else if(ut[ct]Math.abs(je-Xe[ct])&&(ut[ct]+=1)}for(Be.index[0]=et<.5?Ze:Ze+1,Be.index[1]=Qe<.5?Pt:Pt+1,Be.uv[0]=fe/me[0],Be.uv[1]=gt/me[1],nt=0;nt<3;++nt)Be.dataCoordinate[nt]=this._field[nt].get(Be.index[0],Be.index[1]);return Be},G.padField=function(Re,me){var Be=me.shape.slice(),fe=Re.shape.slice();d.assign(Re.lo(1,1).hi(Be[0],Be[1]),me),d.assign(Re.lo(1).hi(Be[0],1),me.hi(Be[0],1)),d.assign(Re.lo(1,fe[1]-1).hi(Be[0],1),me.lo(0,Be[1]-1).hi(Be[0],1)),d.assign(Re.lo(0,1).hi(1,Be[1]),me.hi(1)),d.assign(Re.lo(fe[0]-1,1).hi(1,Be[1]),me.lo(Be[0]-1)),Re.set(0,0,me.get(0,0)),Re.set(0,fe[1]-1,me.get(0,Be[1]-1)),Re.set(fe[0]-1,0,me.get(Be[0]-1,0)),Re.set(fe[0]-1,fe[1]-1,me.get(Be[0]-1,Be[1]-1))};function ke(Re,me){return Array.isArray(Re)?[me(Re[0]),me(Re[1]),me(Re[2])]:[me(Re),me(Re),me(Re)]}function Ee(Re){return Array.isArray(Re)?Re.length===3?[Re[0],Re[1],Re[2],1]:[Re[0],Re[1],Re[2],Re[3]]:[0,0,0,1]}function Me(Re){if(Array.isArray(Re)){if(Array.isArray(Re))return[Ee(Re[0]),Ee(Re[1]),Ee(Re[2])];var me=Ee(Re);return[me.slice(),me.slice(),me.slice()]}}G.update=function(Re){Re=Re||{},this.objectOffset=Re.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Re&&(this.contourWidth=ke(Re.contourWidth,Number)),"showContour"in Re&&(this.showContour=ke(Re.showContour,Boolean)),"showSurface"in Re&&(this.showSurface=!!Re.showSurface),"contourTint"in Re&&(this.contourTint=ke(Re.contourTint,Boolean)),"contourColor"in Re&&(this.contourColor=Me(Re.contourColor)),"contourProject"in Re&&(this.contourProject=ke(Re.contourProject,function(Pi){return ke(Pi,Boolean)})),"surfaceProject"in Re&&(this.surfaceProject=Re.surfaceProject),"dynamicColor"in Re&&(this.dynamicColor=Me(Re.dynamicColor)),"dynamicTint"in Re&&(this.dynamicTint=ke(Re.dynamicTint,Number)),"dynamicWidth"in Re&&(this.dynamicWidth=ke(Re.dynamicWidth,Number)),"opacity"in Re&&(this.opacity=Re.opacity),"opacityscale"in Re&&(this.opacityscale=Re.opacityscale),"colorBounds"in Re&&(this.colorBounds=Re.colorBounds),"vertexColor"in Re&&(this.vertexColor=Re.vertexColor?1:0),"colormap"in Re&&this._colorMap.setPixels(this.genColormap(Re.colormap,this.opacityscale));var me=Re.field||Re.coords&&Re.coords[2]||null,Be=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Re||"coords"in Re){var fe=(me.shape[0]+2)*(me.shape[1]+2);fe>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(s.nextPow2(fe))),this._field[2]=x(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var Ze=this.shape,et=0;et<2;++et)this._field[2].size>this._field[et].data.length&&(c.freeFloat(this._field[et].data),this._field[et].data=c.mallocFloat(this._field[2].size)),this._field[et]=x(this._field[et].data,[Ze[0]+2,Ze[1]+2]);if(Re.coords){var gt=Re.coords;if(!Array.isArray(gt)||gt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(et=0;et<2;++et){var Pt=gt[et];for(_t=0;_t<2;++_t)if(Pt.shape[_t]!==Ze[_t])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[et],Pt)}}else if(Re.ticks){var Qe=Re.ticks;if(!Array.isArray(Qe)||Qe.length!==2)throw new Error("gl-surface: invalid ticks");for(et=0;et<2;++et){var Xe=Qe[et];if((Array.isArray(Xe)||Xe.length)&&(Xe=x(Xe)),Xe.shape[0]!==Ze[et])throw new Error("gl-surface: invalid tick length");var Tt=x(Xe.data,Ze);Tt.stride[et]=Xe.stride[0],Tt.stride[et^1]=0,this.padField(this._field[et],Tt)}}else{for(et=0;et<2;++et){var xt=[0,0];xt[et]=1,this._field[et]=x(this._field[et].data,[Ze[0]+2,Ze[1]+2],xt,0)}this._field[0].set(0,0,0);for(var _t=0;_t0){for(var oi=0;oi<5;++oi)Lr.pop();Pe-=1}continue e}}}Ei.push(Pe)}this._contourOffsets[vr]=si,this._contourCounts[vr]=Ei}var vi=c.mallocFloat(Lr.length);for(et=0;etU||F<0||F>U)throw new Error("gl-texture2d: Invalid texture size");return z._shape=[T,F],z.bind(),q.texImage2D(q.TEXTURE_2D,0,z.format,T,F,0,z.format,z.type,null),z._mipLevels=[0],z}function y(z,T,F,q,U,H){this.gl=z,this.handle=T,this.format=U,this.type=H,this._shape=[F,q],this._mipLevels=[0],this._magFilter=z.NEAREST,this._minFilter=z.NEAREST,this._wrapS=z.CLAMP_TO_EDGE,this._wrapT=z.CLAMP_TO_EDGE,this._anisoSamples=1;var j=this,G=[this._wrapS,this._wrapT];Object.defineProperties(G,[{get:function(){return j._wrapS},set:function(W){return j.wrapS=W}},{get:function(){return j._wrapT},set:function(W){return j.wrapT=W}}]),this._wrapVector=G;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return j._shape[0]},set:function(W){return j.width=W}},{get:function(){return j._shape[1]},set:function(W){return j.height=W}}]),this._shapeVector=O}var k=y.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(z){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(z)>=0&&(T.getExtension("OES_texture_float_linear")||(z=T.NEAREST)),c.indexOf(z)<0)throw new Error("gl-texture2d: Unknown filter mode "+z);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,z),this._minFilter=z}},magFilter:{get:function(){return this._magFilter},set:function(z){this.bind();var T=this.gl;if(this.type===T.FLOAT&&f.indexOf(z)>=0&&(T.getExtension("OES_texture_float_linear")||(z=T.NEAREST)),c.indexOf(z)<0)throw new Error("gl-texture2d: Unknown filter mode "+z);return T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,z),this._magFilter=z}},mipSamples:{get:function(){return this._anisoSamples},set:function(z){var T=this._anisoSamples;if(this._anisoSamples=Math.max(z,1)|0,T!==this._anisoSamples){var F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(z){if(this.bind(),h.indexOf(z)<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,z),this._wrapS=z}},wrapT:{get:function(){return this._wrapT},set:function(z){if(this.bind(),h.indexOf(z)<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,z),this._wrapT=z}},wrap:{get:function(){return this._wrapVector},set:function(z){if(Array.isArray(z)||(z=[z,z]),z.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(z[T])<0)throw new Error("gl-texture2d: Unknown wrap mode "+z);this._wrapS=z[0],this._wrapT=z[1];var F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,this._wrapT),z}},shape:{get:function(){return this._shapeVector},set:function(z){if(!Array.isArray(z))z=[z|0,z|0];else if(z.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,z[0]|0,z[1]|0),[z[0]|0,z[1]|0]}},width:{get:function(){return this._shape[0]},set:function(z){return z=z|0,b(this,z,this._shape[1]),z}},height:{get:function(){return this._shape[1]},set:function(z){return z=z|0,b(this,this._shape[0],z),z}}}),k.bind=function(z){var T=this.gl;return z!==void 0&&T.activeTexture(T.TEXTURE0+(z|0)),T.bindTexture(T.TEXTURE_2D,this.handle),z!==void 0?z|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 z=Math.min(this._shape[0],this._shape[1]),T=0;z>0;++T,z>>>=1)this._mipLevels.indexOf(T)<0&&this._mipLevels.push(T)},k.setPixels=function(z,T,F,q){var U=this.gl;this.bind(),Array.isArray(T)?(q=F,F=T[1]|0,T=T[0]|0):(T=T||0,F=F||0),q=q||0;var H=p(z)?z:z.raw;if(H){var j=this._mipLevels.indexOf(q)<0;j?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,H),this._mipLevels.push(q)):U.texSubImage2D(U.TEXTURE_2D,q,T,F,this.format,this.type,H)}else if(z.shape&&z.stride&&z.data){if(z.shape.length<2||T+z.shape[1]>this._shape[1]>>>q||F+z.shape[0]>this._shape[0]>>>q||T<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(U,T,F,q,this.format,this.type,this._mipLevels,z)}else throw new Error("gl-texture2d: Unsupported data type")};function E(z,T){return z.length===3?T[2]===1&&T[1]===z[0]*z[2]&&T[0]===z[2]:T[0]===1&&T[1]===z[0]}function A(z,T,F,q,U,H,j,G){var O=G.dtype,W=G.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,ne=0,be=E(W,G.stride.slice());O==="float32"?re=z.FLOAT:O==="float64"?(re=z.FLOAT,be=!1,O="float32"):O==="uint8"?re=z.UNSIGNED_BYTE:(re=z.UNSIGNED_BYTE,be=!1,O="uint8");var ze=1;if(W.length===2)ne=z.LUMINANCE,W=[W[0],W[1],1],G=s(G.data,W,[G.stride[0],G.stride[1],1],G.offset);else if(W.length===3){if(W[2]===1)ne=z.ALPHA;else if(W[2]===2)ne=z.LUMINANCE_ALPHA;else if(W[2]===3)ne=z.RGB;else if(W[2]===4)ne=z.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ze=W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ne===z.LUMINANCE||ne===z.ALPHA)&&(U===z.LUMINANCE||U===z.ALPHA)&&(ne=U),ne!==U)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=G.size,he=j.indexOf(q)<0;if(he&&j.push(q),re===H&&be)G.offset===0&&G.data.length===Ce?he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,G.data):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,G.data):he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,G.data.subarray(G.offset,G.offset+Ce)):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,G.data.subarray(G.offset,G.offset+Ce));else{var te;H===z.FLOAT?te=l.mallocFloat32(Ce):te=l.mallocUint8(Ce);var ke=s(te,W,[W[2],W[2]*W[0],1]);re===z.FLOAT&&H===z.UNSIGNED_BYTE?x(ke,G):u.assign(ke,G),he?z.texImage2D(z.TEXTURE_2D,q,U,W[0],W[1],0,U,H,te.subarray(0,Ce)):z.texSubImage2D(z.TEXTURE_2D,q,T,F,W[0],W[1],U,H,te.subarray(0,Ce)),H===z.FLOAT?l.freeFloat32(te):l.freeUint8(te)}}function L(z){var T=z.createTexture();return z.bindTexture(z.TEXTURE_2D,T),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MIN_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_MAG_FILTER,z.NEAREST),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,z.CLAMP_TO_EDGE),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,z.CLAMP_TO_EDGE),T}function _(z,T,F,q,U){var H=z.getParameter(z.MAX_TEXTURE_SIZE);if(T<0||T>H||F<0||F>H)throw new Error("gl-texture2d: Invalid texture shape");if(U===z.FLOAT&&!z.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var j=L(z);return z.texImage2D(z.TEXTURE_2D,0,q,T,F,0,q,U,null),new y(z,j,T,F,q,U)}function C(z,T,F,q,U,H){var j=L(z);return z.texImage2D(z.TEXTURE_2D,0,U,U,H,T),new y(z,j,F,q,U,H)}function M(z,T){var F=T.dtype,q=T.shape.slice(),U=z.getParameter(z.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>U||q[1]<0||q[1]>U)throw new Error("gl-texture2d: Invalid texture size");var H=E(q,T.stride.slice()),j=0;F==="float32"?j=z.FLOAT:F==="float64"?(j=z.FLOAT,H=!1,F="float32"):F==="uint8"?j=z.UNSIGNED_BYTE:(j=z.UNSIGNED_BYTE,H=!1,F="uint8");var G=0;if(q.length===2)G=z.LUMINANCE,q=[q[0],q[1],1],T=s(T.data,q,[T.stride[0],T.stride[1],1],T.offset);else if(q.length===3)if(q[2]===1)G=z.ALPHA;else if(q[2]===2)G=z.LUMINANCE_ALPHA;else if(q[2]===3)G=z.RGB;else if(q[2]===4)G=z.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");j===z.FLOAT&&!z.getExtension("OES_texture_float")&&(j=z.UNSIGNED_BYTE,H=!1);var O,W,re=T.size;if(H)T.offset===0&&T.data.length===re?O=T.data:O=T.data.subarray(T.offset,T.offset+re);else{var ne=[q[2],q[2]*q[0],1];W=l.malloc(re,F);var be=s(W,q,ne,0);(F==="float32"||F==="float64")&&j===z.UNSIGNED_BYTE?x(be,T):u.assign(be,T),O=W.subarray(0,re)}var ze=L(z);return z.texImage2D(z.TEXTURE_2D,0,G,q[0],q[1],0,G,j,O),H||l.free(W),new y(z,ze,q[0],q[1],G,j)}function v(z){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||d(z),typeof arguments[1]=="number")return _(z,arguments[1],arguments[2],arguments[3]||z.RGBA,arguments[4]||z.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(z,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||z.RGBA,arguments[3]||z.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var T=arguments[1],F=p(T)?T:T.raw;if(F)return C(z,F,T.width|0,T.height|0,arguments[2]||z.RGBA,arguments[3]||z.UNSIGNED_BYTE);if(T.shape&&T.data&&T.stride)return M(z,T)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(i){"use strict";function a(o,s,u){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var l=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(u){if(u.length>l)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(x)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2];return o[0]=f*p-c*d,o[1]=c*h-l*p,o[2]=l*d-f*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2];return Math.sqrt(u*u+l*l+f*f)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]/u[0],o[1]=s[1]/u[1],o[2]=s[2]/u[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=u;var s=o(2613);function u(l,f){var c=l[0],h=l[1],d=l[2],p=f[0],x=f[1],b=f[2];return Math.abs(c-p)<=s*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(h-x)<=s*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=u;var s=o(1091)();function u(l,f,c,h,d,p){var x,b;for(f||(f=3),c||(c=0),h?b=Math.min(h*f+c,l.length):b=l.length,x=c;x0&&(c=1/Math.sqrt(c),o[0]=s[0]*c,o[1]=s[1]*c,o[2]=s[2]*c),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var u=Math.random()*2*Math.PI,l=Math.random()*2-1,f=Math.sqrt(1-l*l)*s;return o[0]=Math.cos(u)*f,o[1]=Math.sin(u)*f,o[2]=l*s,o}},6894:function(i){i.exports=a;function a(o,s,u,l){var f=u[1],c=u[2],h=s[1]-f,d=s[2]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=s[0],o[1]=f+h*x-d*p,o[2]=c+h*p+d*x,o}},109:function(i){i.exports=a;function a(o,s,u,l){var f=u[0],c=u[2],h=s[0]-f,d=s[2]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=f+d*p+h*x,o[1]=s[1],o[2]=c+d*x-h*p,o}},8692:function(i){i.exports=a;function a(o,s,u,l){var f=u[0],c=u[1],h=s[0]-f,d=s[1]-c,p=Math.sin(l),x=Math.cos(l);return o[0]=f+h*x-d*p,o[1]=c+h*p+d*x,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o}},8489:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s[0]+u[0]*l,o[1]=s[1]+u[1]*l,o[2]=s[2]+u[2]*l,o}},1463:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s,o[1]=u,o[2]=l,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2];return u*u+l*l+f*f}},3066:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2];return s*s+u*u+l*l}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]-u[0],o[1]=s[1]-u[1],o[2]=s[2]-u[2],o}},492:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2];return o[0]=l*u[0]+f*u[3]+c*u[6],o[1]=l*u[1]+f*u[4]+c*u[7],o[2]=l*u[2]+f*u[5]+c*u[8],o}},5673:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[3]*l+u[7]*f+u[11]*c+u[15];return h=h||1,o[0]=(u[0]*l+u[4]*f+u[8]*c+u[12])/h,o[1]=(u[1]*l+u[5]*f+u[9]*c+u[13])/h,o[2]=(u[2]*l+u[6]*f+u[10]*c+u[14])/h,o}},264:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2],x=u[3],b=x*l+d*c-p*f,y=x*f+p*l-h*c,k=x*c+h*f-d*l,E=-h*l-d*f-p*c;return o[0]=b*x+E*-h+y*-p-k*-d,o[1]=y*x+E*-d+k*-h-b*-p,o[2]=k*x+E*-p+b*-d-y*-h,o}},4361:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]+u[0],o[1]=s[1]+u[1],o[2]=s[2]+u[2],o[3]=s[3]+u[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2],c=s[3]-o[3];return Math.sqrt(u*u+l*l+f*f+c*c)}},1373:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]/u[0],o[1]=s[1]/u[1],o[2]=s[2]/u[2],o[3]=s[3]/u[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,u,l){var f=new Float32Array(4);return f[0]=o,f[1]=s,f[2]=u,f[3]=l,f}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3];return Math.sqrt(s*s+u*u+l*l+f*f)}},2573:function(i){i.exports=a;function a(o,s,u,l){var f=s[0],c=s[1],h=s[2],d=s[3];return o[0]=f+l*(u[0]-f),o[1]=c+l*(u[1]-c),o[2]=h+l*(u[2]-h),o[3]=d+l*(u[3]-d),o}},160:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.max(s[0],u[0]),o[1]=Math.max(s[1],u[1]),o[2]=Math.max(s[2],u[2]),o[3]=Math.max(s[3],u[3]),o}},2334:function(i){i.exports=a;function a(o,s,u){return o[0]=Math.min(s[0],u[0]),o[1]=Math.min(s[1],u[1]),o[2]=Math.min(s[2],u[2]),o[3]=Math.min(s[3],u[3]),o}},3576:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u[0],o[1]=s[1]*u[1],o[2]=s[2]*u[2],o[3]=s[3]*u[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var u=s[0],l=s[1],f=s[2],c=s[3],h=u*u+l*l+f*f+c*c;return h>0&&(h=1/Math.sqrt(h),o[0]=u*h,o[1]=l*h,o[2]=f*h,o[3]=c*h),o}},9131:function(i,a,o){var s=o(5177),u=o(9288);i.exports=l;function l(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),s(f,f),u(f,f,c),f}},9288:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o}},4844:function(i){i.exports=a;function a(o,s,u,l){return o[0]=s[0]+u[0]*l,o[1]=s[1]+u[1]*l,o[2]=s[2]+u[2]*l,o[3]=s[3]+u[3]*l,o}},4578:function(i){i.exports=a;function a(o,s,u,l,f){return o[0]=s,o[1]=u,o[2]=l,o[3]=f,o}},7960:function(i){i.exports=a;function a(o,s){var u=s[0]-o[0],l=s[1]-o[1],f=s[2]-o[2],c=s[3]-o[3];return u*u+l*l+f*f+c*c}},483:function(i){i.exports=a;function a(o){var s=o[0],u=o[1],l=o[2],f=o[3];return s*s+u*u+l*l+f*f}},6860:function(i){i.exports=a;function a(o,s,u){return o[0]=s[0]-u[0],o[1]=s[1]-u[1],o[2]=s[2]-u[2],o[3]=s[3]-u[3],o}},5352:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=s[3];return o[0]=u[0]*l+u[4]*f+u[8]*c+u[12]*h,o[1]=u[1]*l+u[5]*f+u[9]*c+u[13]*h,o[2]=u[2]*l+u[6]*f+u[10]*c+u[14]*h,o[3]=u[3]*l+u[7]*f+u[11]*c+u[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,u){var l=s[0],f=s[1],c=s[2],h=u[0],d=u[1],p=u[2],x=u[3],b=x*l+d*c-p*f,y=x*f+p*l-h*c,k=x*c+h*f-d*l,E=-h*l-d*f-p*c;return o[0]=b*x+E*-h+y*-p-k*-d,o[1]=y*x+E*-d+k*-h-b*-p,o[2]=k*x+E*-p+b*-d-y*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),u=o(6468);i.exports=l;function l(f){for(var c=Array.isArray(f)?f:s(f),h=0;h0)continue;ct=Te.slice(0,1).join("")}return Be(ct),Ce+=ct.length,O=O.slice(ct.length),O.length}while(!0)}function _t(){return/[^a-fA-F0-9]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function Ct(){return j==="."||/[eE]/.test(j)?(O.push(j),H=E,G=j,q+1):j==="x"&&O.length===1&&O[0]==="0"?(H=v,O.push(j),G=j,q+1):/[^\d]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function jt(){return j==="f"&&(O.push(j),G=j,q+=1),/[eE]/.test(j)||(j==="-"||j==="+")&&/[eE]/.test(G)?(O.push(j),G=j,q+1):/[^\d]/.test(j)?(Be(O.join("")),H=h,q):(O.push(j),G=j,q+1)}function At(){if(/[^\d\w_]/.test(j)){var Te=O.join("");return me[Te]?H=_:Re[Te]?H=L:H=A,Be(O.join("")),H=h,q}return O.push(j),G=j,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(u){return!/^(gl\_|texture)/.test(u)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(i){i.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=u;function u(l,f){var c=s(f),h=[];return h=h.concat(c(l)),h=h.concat(c(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],u=0;u>1,b=-7,y=u?f-1:0,k=u?-1:1,E=o[s+y];for(y+=k,c=E&(1<<-b)-1,E>>=-b,b+=d;b>0;c=c*256+o[s+y],y+=k,b-=8);for(h=c&(1<<-b)-1,c>>=-b,b+=l;b>0;h=h*256+o[s+y],y+=k,b-=8);if(c===0)c=1-x;else{if(c===p)return h?NaN:(E?-1:1)*(1/0);h=h+Math.pow(2,l),c=c-x}return(E?-1:1)*h*Math.pow(2,c-l)},a.write=function(o,s,u,l,f,c){var h,d,p,x=c*8-f-1,b=(1<>1,k=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=l?0:c-1,A=l?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*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+y>=1?s+=k/p:s+=k*Math.pow(2,1-y),s*p>=2&&(h++,p/=2),h+y>=b?(d=0,h=b):h+y>=1?(d=(s*p-1)*Math.pow(2,f),h=h+y):(d=s*Math.pow(2,y-1)*Math.pow(2,f),h=0));f>=8;o[u+E]=d&255,E+=A,d/=256,f-=8);for(h=h<0;o[u+E]=h&255,E+=A,h/=256,x-=8);o[u+E-A]|=L*128}},8954:function(i,a,o){"use strict";i.exports=y;var s=o(3250),u=o(6803).Fw;function l(k,E,A){this.vertices=k,this.adjacent=E,this.boundary=A,this.lastVisited=-1}l.prototype.flip=function(){var k=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=k;var E=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=E};function f(k,E,A){this.vertices=k,this.cell=E,this.index=A}function c(k,E){return u(k.vertices,E.vertices)}function h(k){return function(){var E=this.tuple;return k.apply(this,E)}}function d(k){var E=s[k+1];return E||(E=s),h(E)}var p=[];function x(k,E,A){this.dimension=k,this.vertices=E,this.simplices=A,this.interior=A.filter(function(C){return!C.boundary}),this.tuple=new Array(k+1);for(var L=0;L<=k;++L)this.tuple[L]=this.vertices[L];var _=p[k];_||(_=p[k]=d(k)),this.orient=_}var b=x.prototype;b.handleBoundaryDegeneracy=function(k,E){var A=this.dimension,L=this.vertices.length-1,_=this.tuple,C=this.vertices,M=[k];for(k.lastVisited=-L;M.length>0;){k=M.pop();for(var v=k.adjacent,z=0;z<=A;++z){var T=v[z];if(!(!T.boundary||T.lastVisited<=-L)){for(var F=T.vertices,q=0;q<=A;++q){var U=F[q];U<0?_[q]=E:_[q]=C[U]}var H=this.orient();if(H>0)return T;T.lastVisited=-L,H===0&&M.push(T)}}}return null},b.walk=function(k,E){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=E?this.interior.length*Math.random()|0:this.interior.length-1,v=this.interior[M];e:for(;!v.boundary;){for(var z=v.vertices,T=v.adjacent,F=0;F<=L;++F)C[F]=_[z[F]];v.lastVisited=A;for(var F=0;F<=L;++F){var q=T[F];if(!(q.lastVisited>=A)){var U=C[F];C[F]=k;var H=this.orient();if(C[F]=U,H<0){v=q;continue e}else q.boundary?q.lastVisited=-A:q.lastVisited=A}}return}return v},b.addPeaks=function(k,E){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=this.interior,v=this.simplices,z=[E];E.lastVisited=A,E.vertices[E.vertices.indexOf(-1)]=A,E.boundary=!1,M.push(E);for(var T=[];z.length>0;){var E=z.pop(),F=E.vertices,q=E.adjacent,U=F.indexOf(A);if(!(U<0)){for(var H=0;H<=L;++H)if(H!==U){var j=q[H];if(!(!j.boundary||j.lastVisited>=A)){var G=j.vertices;if(j.lastVisited!==-A){for(var O=0,W=0;W<=L;++W)G[W]<0?(O=W,C[W]=k):C[W]=_[G[W]];var re=this.orient();if(re>0){G[O]=A,j.boundary=!1,M.push(j),z.push(j),j.lastVisited=A;continue}else j.lastVisited=-A}var ne=j.adjacent,be=F.slice(),ze=q.slice(),Ce=new l(be,ze,!0);v.push(Ce);var he=ne.indexOf(E);if(!(he<0)){ne[he]=Ce,ze[U]=j,be[H]=-1,ze[H]=E,q[H]=Ce,Ce.flip();for(var W=0;W<=L;++W){var te=be[W];if(!(te<0||te===A)){for(var ke=new Array(L-1),Ee=0,Me=0;Me<=L;++Me){var Oe=be[Me];Oe<0||Me===W||(ke[Ee++]=Oe)}T.push(new f(ke,Ce,W))}}}}}}}T.sort(c);for(var H=0;H+1=0?M[z++]=v[F]:T=F&1;if(T===(k&1)){var q=M[0];M[0]=M[1],M[1]=q}E.push(M)}}return E};function y(k,E){var A=k.length;if(A===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(A<=L)throw new Error("Must input at least d+1 points");var _=k.slice(0,L+1),C=s.apply(void 0,_);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),v=0;v<=L;++v)M[v]=v;C<0&&(M[0]=1,M[1]=0);for(var z=new l(M,new Array(L+1),!1),T=z.adjacent,F=new Array(L+2),v=0;v<=L;++v){for(var q=M.slice(),U=0;U<=L;++U)U===v&&(q[U]=-1);var H=q[0];q[0]=q[1],q[1]=H;var j=new l(q,new Array(L+1),!0);T[v]=j,F[v]=j}F[L+1]=z;for(var v=0;v<=L;++v)for(var q=T[v].vertices,G=T[v].adjacent,U=0;U<=L;++U){var O=q[U];if(O<0){G[U]=z;continue}for(var W=0;W<=L;++W)T[W].vertices.indexOf(O)<0&&(G[U]=T[W])}for(var re=new x(L,_,F),ne=!!E,v=L+1;v3*(F+1)?x(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?x(this,T):this.right.insert(T):this.right=C([T]);else{var q=s.ge(this.leftPoints,T,L),U=s.ge(this.rightPoints,T,_);this.leftPoints.splice(q,0,T),this.rightPoints.splice(U,0,T)}},h.remove=function(T){var F=this.count-this.leftPoints;if(T[1]3*(F-1))return b(this,T);var U=this.left.remove(T);return U===f?(this.left=null,this.count-=1,l):(U===l&&(this.count-=1),U)}else if(T[0]>this.mid){if(!this.right)return u;var H=this.left?this.left.count:0;if(4*H>3*(F-1))return b(this,T);var U=this.right.remove(T);return U===f?(this.right=null,this.count-=1,l):(U===l&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===T?f:u;if(this.leftPoints.length===1&&this.leftPoints[0]===T){if(this.left&&this.right){for(var j=this,G=this.left;G.right;)j=G,G=G.right;if(j===this)G.right=this.right;else{var O=this.left,U=this.right;j.count-=G.count,j.right=G.left,G.left=O,G.right=U}d(this,G),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 l}for(var O=s.ge(this.leftPoints,T,L);O=0&&T[U][1]>=F;--U){var H=q(T[U]);if(H)return H}}function E(T,F){for(var q=0;qthis.mid){if(this.right){var q=this.right.queryPoint(T,F);if(q)return q}return k(this.rightPoints,T,F)}else return E(this.leftPoints,F)},h.queryInterval=function(T,F,q){if(Tthis.mid&&this.right){var U=this.right.queryInterval(T,F,q);if(U)return U}return Fthis.mid?k(this.rightPoints,T,q):E(this.leftPoints,q)};function A(T,F){return T-F}function L(T,F){var q=T[0]-F[0];return q||T[1]-F[1]}function _(T,F){var q=T[1]-F[1];return q||T[0]-F[0]}function C(T){if(T.length===0)return null;for(var F=[],q=0;q>1],H=[],j=[],G=[],q=0;q13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,u){return o*(1-u)+s*u}i.exports=a},2652:function(i,a,o){var s=o(4335),u=o(6864),l=o(1903),f=o(9921),c=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=u(),x=u(),b=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];i.exports=function(C,M,v,z,T,F){if(M||(M=[0,0,0]),v||(v=[0,0,0]),z||(z=[0,0,0]),T||(T=[0,0,0,1]),F||(F=[0,0,0,1]),!s(p,C)||(l(x,p),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(f(x)<1e-8)))return!1;var q=p[3],U=p[7],H=p[11],j=p[12],G=p[13],O=p[14],W=p[15];if(q!==0||U!==0||H!==0){b[0]=q,b[1]=U,b[2]=H,b[3]=W;var re=c(x,x);if(!re)return!1;h(x,x),E(T,b,x)}else T[0]=T[1]=T[2]=0,T[3]=1;if(M[0]=j,M[1]=G,M[2]=O,A(y,p),v[0]=d.length(y[0]),d.normalize(y[0],y[0]),z[0]=d.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-z[0]),v[1]=d.length(y[1]),d.normalize(y[1],y[1]),z[0]/=v[1],z[1]=d.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-z[1]),z[2]=d.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-z[2]),v[2]=d.length(y[2]),d.normalize(y[2],y[2]),z[1]/=v[2],z[2]/=v[2],d.cross(k,y[1],y[2]),d.dot(y[0],k)<0)for(var ne=0;ne<3;ne++)v[ne]*=-1,y[ne][0]*=-1,y[ne][1]*=-1,y[ne][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(F[0]=-F[0]),y[0][2]>y[2][0]&&(F[1]=-F[1]),y[1][0]>y[0][1]&&(F[2]=-F[2]),!0};function E(_,C,M){var v=C[0],z=C[1],T=C[2],F=C[3];return _[0]=M[0]*v+M[4]*z+M[8]*T+M[12]*F,_[1]=M[1]*v+M[5]*z+M[9]*T+M[13]*F,_[2]=M[2]*v+M[6]*z+M[10]*T+M[14]*F,_[3]=M[3]*v+M[7]*z+M[11]*T+M[15]*F,_}function A(_,C){_[0][0]=C[0],_[0][1]=C[1],_[0][2]=C[2],_[1][0]=C[4],_[1][1]=C[5],_[1][2]=C[6],_[2][0]=C[8],_[2][1]=C[9],_[2][2]=C[10]}function L(_,C,M,v,z){_[0]=C[0]*v+M[0]*z,_[1]=C[1]*v+M[1]*z,_[2]=C[2]*v+M[2]*z}},4335:function(i){i.exports=function(o,s){var u=s[15];if(u===0)return!1;for(var l=1/u,f=0;f<16;f++)o[f]=s[f]*l;return!0}},7442:function(i,a,o){var s=o(6658),u=o(7182),l=o(2652),f=o(9921),c=o(8648),h=b(),d=b(),p=b();i.exports=x;function x(E,A,L,_){if(f(A)===0||f(L)===0)return!1;var C=l(A,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=l(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!M?!1:(s(p.translate,h.translate,d.translate,_),s(p.skew,h.skew,d.skew,_),s(p.scale,h.scale,d.scale,_),s(p.perspective,h.perspective,d.perspective,_),c(p.quaternion,h.quaternion,d.quaternion,_),u(E,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function b(){return{translate:y(),scale:y(1),skew:y(),perspective:k(),quaternion:k()}}function y(E){return[E||0,E||0,E||0]}function k(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},u=s.create(),l=s.create();i.exports=function(c,h,d,p,x,b){return s.identity(c),s.fromRotationTranslation(c,b,h),c[3]=x[0],c[7]=x[1],c[11]=x[2],c[15]=x[3],s.identity(l),p[2]!==0&&(l[9]=p[2],s.multiply(c,c,l)),p[1]!==0&&(l[9]=0,l[8]=p[1],s.multiply(c,c,l)),p[0]!==0&&(l[8]=0,l[4]=p[0],s.multiply(c,c,l)),s.scale(c,c,d),c}},1811:function(i,a,o){"use strict";var s=o(2478),u=o(7442),l=o(7608),f=o(5567),c=o(2408),h=o(7089),d=o(6582),p=o(7656),x=o(2504),b=o(3536),y=[0,0,0];i.exports=L;function k(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var E=k.prototype;E.recalcMatrix=function(_){var C=this._time,M=s.le(C,_),v=this.computedMatrix;if(!(M<0)){var z=this._components;if(M===C.length-1)for(var T=16*M,F=0;F<16;++F)v[F]=z[T++];else{for(var q=C[M+1]-C[M],T=16*M,U=this.prevMatrix,H=!0,F=0;F<16;++F)U[F]=z[T++];for(var j=this.nextMatrix,F=0;F<16;++F)j[F]=z[T++],H=H&&U[F]===j[F];if(q<1e-6||H)for(var F=0;F<16;++F)v[F]=U[F];else u(v,U,j,(_-C[M])/q)}var G=this.computedUp;G[0]=v[1],G[1]=v[5],G[2]=v[9],b(G,G);var O=this.computedInverse;l(O,v);var W=this.computedEye,re=O[15];W[0]=O[12]/re,W[1]=O[13]/re,W[2]=O[14]/re;for(var ne=this.computedCenter,be=Math.exp(this.computedRadius[0]),F=0;F<3;++F)ne[F]=W[F]-v[2+4*F]*be}},E.idle=function(_){if(!(_1&&s(l[d[y-2]],l[d[y-1]],b)<=0;)y-=1,d.pop();for(d.push(x),y=p.length;y>1&&s(l[p[y-2]],l[p[y-1]],b)>=0;)y-=1,p.pop();p.push(x)}for(var k=new Array(p.length+d.length-2),E=0,c=0,A=d.length;c0;--L)k[E++]=p[L];return k}},351:function(i,a,o){"use strict";i.exports=u;var s=o(4687);function u(l,f){f||(f=l,l=window);var c=0,h=0,d=0,p={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function b(T){var F=!1;return"altKey"in T&&(F=F||T.altKey!==p.alt,p.alt=!!T.altKey),"shiftKey"in T&&(F=F||T.shiftKey!==p.shift,p.shift=!!T.shiftKey),"ctrlKey"in T&&(F=F||T.ctrlKey!==p.control,p.control=!!T.ctrlKey),"metaKey"in T&&(F=F||T.metaKey!==p.meta,p.meta=!!T.metaKey),F}function y(T,F){var q=s.x(F),U=s.y(F);"buttons"in F&&(T=F.buttons|0),(T!==c||q!==h||U!==d||b(F))&&(c=T|0,h=q||0,d=U||0,f&&f(c,h,d,p))}function k(T){y(0,T)}function E(){(c||h||d||p.shift||p.alt||p.meta||p.control)&&(h=d=0,c=0,p.shift=p.alt=p.control=p.meta=!1,f&&f(0,0,0,p))}function A(T){b(T)&&f&&f(c,h,d,p)}function L(T){s.buttons(T)===0?y(0,T):y(c,T)}function _(T){y(c|s.buttons(T),T)}function C(T){y(c&~s.buttons(T),T)}function M(){x||(x=!0,l.addEventListener("mousemove",L),l.addEventListener("mousedown",_),l.addEventListener("mouseup",C),l.addEventListener("mouseleave",k),l.addEventListener("mouseenter",k),l.addEventListener("mouseout",k),l.addEventListener("mouseover",k),l.addEventListener("blur",E),l.addEventListener("keyup",A),l.addEventListener("keydown",A),l.addEventListener("keypress",A),l!==window&&(window.addEventListener("blur",E),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function v(){x&&(x=!1,l.removeEventListener("mousemove",L),l.removeEventListener("mousedown",_),l.removeEventListener("mouseup",C),l.removeEventListener("mouseleave",k),l.removeEventListener("mouseenter",k),l.removeEventListener("mouseout",k),l.removeEventListener("mouseover",k),l.removeEventListener("blur",E),l.removeEventListener("keyup",A),l.removeEventListener("keydown",A),l.removeEventListener("keypress",A),l!==window&&(window.removeEventListener("blur",E),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}M();var z={element:l};return Object.defineProperties(z,{enabled:{get:function(){return x},set:function(T){T?M():v()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),z}},24:function(i){var a={left:0,top:0};i.exports=o;function o(u,l,f){l=l||u.currentTarget||u.srcElement,Array.isArray(f)||(f=[0,0]);var c=u.clientX||0,h=u.clientY||0,d=s(l);return f[0]=c-d.left,f[1]=h-d.top,f}function s(u){return u===window||u===document||u===document.body?a:u.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(ze=1,te[Ee++]=p(M[F],E,A,L),F+=re,_>0)for(be=1,q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++),Ee+=1,F+=re,be=2;be<_;++be)q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==me&&d(ke[Ee+Oe],Qe,W,H,Pt,me,E,A,L)),Ee+=1,F+=re;for(F+=ne,Ee=0,Xe=Oe,Oe=Re,Re=Xe,Xe=Be,Be=fe,fe=Xe,Xe=et,et=gt,gt=Xe,ze=2;ze0)for(be=1,q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,G,W,Ze,Pt,E,A,L)),Ee+=1,F+=re,be=2;be<_;++be)q=M[F],Me=te[Ee]=p(q,E,A,L),me=te[Ee+Oe],Ze=te[Ee+Be],Pt=te[Ee+et],(Me!==me||Me!==Ze||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,me,Ze,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,G,W,Ze,Pt,E,A,L),Pt!==me&&d(ke[Ee+Oe],Qe,W,H,Pt,me,E,A,L)),Ee+=1,F+=re;ze&1&&(Ee=0),Xe=Oe,Oe=Re,Re=Xe,Xe=Be,Be=fe,fe=Xe,Xe=et,et=gt,gt=Xe,F+=ne}}b(ke),b(te)}},"false,1,0":function(h,d,p,x,b){return function(k,E,A,L){var _=k.shape[0]|0,C=k.shape[1]|0,M=k.data,v=k.offset|0,z=k.stride[0]|0,T=k.stride[1]|0,F=v,q,U=-z|0,H=0,j=-T|0,G=0,O=-z-T|0,W=0,re=T|0,ne=z-T*C|0,be=0,ze=0,Ce=0,he=2*C|0,te=x(he),ke=x(he),Ee=0,Me=0,Oe=-1,Re=-1,me=0,Be=-C|0,fe=C|0,Ze=0,et=-C-1|0,gt=C-1|0,Pt=0,Qe=0,Xe=0;for(ze=0;ze0){if(be=1,te[Ee++]=p(M[F],E,A,L),F+=re,C>0)for(ze=1,q=M[F],Me=te[Ee]=p(q,E,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,E,A,L),Qe=ke[Ee]=Ce++),Ee+=1,F+=re,ze=2;ze0)for(ze=1,q=M[F],Me=te[Ee]=p(q,E,A,L),Ze=te[Ee+Be],me=te[Ee+Oe],Pt=te[Ee+et],(Me!==Ze||Me!==me||Me!==Pt)&&(H=M[F+U],G=M[F+j],W=M[F+O],h(be,ze,q,H,G,W,Me,Ze,me,Pt,E,A,L),Qe=ke[Ee]=Ce++,Pt!==Ze&&d(ke[Ee+Be],Qe,W,H,Pt,Ze,E,A,L)),Ee+=1,F+=re,ze=2;ze 0"),typeof c.vertex!="function"&&h("Must specify vertex creation function"),typeof c.cell!="function"&&h("Must specify cell creation function"),typeof c.phase!="function"&&h("Must specify phase function");for(var b=c.getters||[],y=new Array(p),k=0;k=0?y[k]=!0:y[k]=!1;return l(c.vertex,c.cell,c.phase,x,d,y)}},6199:function(i,a,o){"use strict";var s=o(1338),u={zero:function(L,_,C,M){var v=L[0],z=C[0];M|=0;var T=0,F=z;for(T=0;T2&&T[1]>2&&M(z.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),v.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),v.pick(-1,-1,1).lo(1,1).hi(T[0]-2,T[1]-2)),T[1]>2&&(C(z.pick(0,-1).lo(1).hi(T[1]-2),v.pick(0,-1,1).lo(1).hi(T[1]-2)),_(v.pick(0,-1,0).lo(1).hi(T[1]-2))),T[1]>2&&(C(z.pick(T[0]-1,-1).lo(1).hi(T[1]-2),v.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),_(v.pick(T[0]-1,-1,0).lo(1).hi(T[1]-2))),T[0]>2&&(C(z.pick(-1,0).lo(1).hi(T[0]-2),v.pick(-1,0,0).lo(1).hi(T[0]-2)),_(v.pick(-1,0,1).lo(1).hi(T[0]-2))),T[0]>2&&(C(z.pick(-1,T[1]-1).lo(1).hi(T[0]-2),v.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),_(v.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),v.set(0,0,0,0),v.set(0,0,1,0),v.set(T[0]-1,0,0,0),v.set(T[0]-1,0,1,0),v.set(0,T[1]-1,0,0),v.set(0,T[1]-1,1,0),v.set(T[0]-1,T[1]-1,0,0),v.set(T[0]-1,T[1]-1,1,0),v}}function A(L){var _=L.join(),T=p[_];if(T)return T;for(var C=L.length,M=[b,y],v=1;v<=C;++v)M.push(k(v));var z=E,T=z.apply(void 0,M);return p[_]=T,T}i.exports=function(_,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return _;if(C.dimension===0)return _.set(0),_;var v=A(M);return v(_,C)}},4317:function(i){"use strict";function a(f,c){var h=Math.floor(c),d=c-h,p=0<=h&&h0;){G<64?(_=G,G=0):(_=64,G-=64);for(var O=p[1]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),y=H+G*v+O*z,A=j+G*F+O*q;var W=0,re=0,ne=0,be=T,ze=v-M*T,Ce=z-_*v,he=U,te=F-M*U,ke=q-_*F;for(ne=0;ne0;){q<64?(_=q,q=0):(_=64,q-=64);for(var U=p[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),y=T+q*M+U*C,A=F+q*z+U*v;var H=0,j=0,G=M,O=C-_*M,W=z,re=v-_*z;for(j=0;j0;){j<64?(C=j,j=0):(C=64,j-=64);for(var G=p[0]|0;G>0;){G<64?(L=G,G=0):(L=64,G-=64);for(var O=p[1]|0;O>0;){O<64?(_=O,O=0):(_=64,O-=64),y=U+j*z+G*M+O*v,A=H+j*q+G*T+O*F;var W=0,re=0,ne=0,be=z,ze=M-C*z,Ce=v-L*M,he=q,te=T-C*q,ke=F-L*T;for(ne=0;ne<_;++ne){for(re=0;rek;){W=0,re=H-_;t:for(G=0;Gbe)break t;re+=T,W+=F}for(W=H,re=H-_,G=0;G>1,O=G-U,W=G+U,re=H,ne=O,be=G,ze=W,Ce=j,he=E+1,te=A-1,ke=!0,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt=0,Pt=0,Qe=0,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt=z,Kt=b(Vt),ir=b(Vt);Tt=C*re,xt=C*ne,Mt=_;e:for(Xe=0;Xe0){Me=re,re=ne,ne=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ze,xt=C*Ce,Mt=_;e:for(Xe=0;Xe0){Me=ze,ze=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*re,xt=C*be,Mt=_;e:for(Xe=0;Xe0){Me=re,re=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*be,Mt=_;e:for(Xe=0;Xe0){Me=ne,ne=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*re,xt=C*ze,Mt=_;e:for(Xe=0;Xe0){Me=re,re=ze,ze=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*be,xt=C*ze,Mt=_;e:for(Xe=0;Xe0){Me=be,be=ze,ze=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*Ce,Mt=_;e:for(Xe=0;Xe0){Me=ne,ne=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ne,xt=C*be,Mt=_;e:for(Xe=0;Xe0){Me=ne,ne=be,be=Me;break e}if(Qe<0)break e;Mt+=F}Tt=C*ze,xt=C*Ce,Mt=_;e:for(Xe=0;Xe0){Me=ze,ze=Ce,Ce=Me;break e}if(Qe<0)break e;Mt+=F}for(Tt=C*re,xt=C*ne,_t=C*be,Ct=C*ze,jt=C*Ce,At=C*H,Te=C*G,nt=C*j,Je=0,Mt=_,Xe=0;Xe0)te--;else if(Qe<0){for(Tt=C*Be,xt=C*he,_t=C*te,Mt=_,Xe=0;Xe0)for(;;){fe=_+te*C,Je=0;e:for(Xe=0;Xe0){if(--tej){e:for(;;){for(fe=_+he*C,Je=0,Mt=_,Xe=0;Xe1&&k?A(y,k[0],k[1]):A(y)}var d={"uint32,1,0":function(x,b){return function(y){var k=y.data,E=y.offset|0,A=y.shape,L=y.stride,_=L[0]|0,C=A[0]|0,M=L[1]|0,v=A[1]|0,z=M,T=M,F=1;C<=32?x(0,C-1,k,E,_,M,C,v,z,T,F):b(0,C-1,k,E,_,M,C,v,z,T,F)}}};function p(x,b){var y=[b,x].join(","),k=d[y],E=f(x,b),A=h(x,b,E);return k(E,A)}i.exports=p},446:function(i,a,o){"use strict";var s=o(7640),u={};function l(f){var c=f.order,h=f.dtype,d=[c,h],p=d.join(":"),x=u[p];return x||(u[p]=x=s(c,h)),x(f),f}i.exports=l},9618:function(i,a,o){var s=o(7163),u=typeof Float64Array!="undefined";function l(b,y){return b[0]-y[0]}function f(){var b=this.stride,y=new Array(b.length),k;for(k=0;k=0&&(M=_|0,C+=z*M,v-=M),new E(this.data,v,z,C)},A.step=function(_){var C=this.shape[0],M=this.stride[0],v=this.offset,z=0,T=Math.ceil;return typeof _=="number"&&(z=_|0,z<0?(v+=M*(C-1),C=T(-C/z)):C=T(C/z),M*=z),new E(this.data,C,M,v)},A.transpose=function(_){_=_===void 0?0:_|0;var C=this.shape,M=this.stride;return new E(this.data,C[_],M[_],this.offset)},A.pick=function(_){var C=[],M=[],v=this.offset;typeof _=="number"&&_>=0?v=v+this.stride[0]*_|0:(C.push(this.shape[0]),M.push(this.stride[0]));var z=y[C.length+1];return z(this.data,C,M,v)},function(_,C,M,v){return new E(_,C[0],M[0],v)}},2:function(b,y,k){function E(L,_,C,M,v,z){this.data=L,this.shape=[_,C],this.stride=[M,v],this.offset=z|0}var A=E.prototype;return A.dtype=b,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(_,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]=M},A.get=function(_,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]},A.index=function(_,C){return this.offset+this.stride[0]*_+this.stride[1]*C},A.hi=function(_,C){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(_,C){var M=this.offset,v=0,z=this.shape[0],T=this.shape[1],F=this.stride[0],q=this.stride[1];return typeof _=="number"&&_>=0&&(v=_|0,M+=F*v,z-=v),typeof C=="number"&&C>=0&&(v=C|0,M+=q*v,T-=v),new E(this.data,z,T,F,q,M)},A.step=function(_,C){var M=this.shape[0],v=this.shape[1],z=this.stride[0],T=this.stride[1],F=this.offset,q=0,U=Math.ceil;return typeof _=="number"&&(q=_|0,q<0?(F+=z*(M-1),M=U(-M/q)):M=U(M/q),z*=q),typeof C=="number"&&(q=C|0,q<0?(F+=T*(v-1),v=U(-v/q)):v=U(v/q),T*=q),new E(this.data,M,v,z,T,F)},A.transpose=function(_,C){_=_===void 0?0:_|0,C=C===void 0?1:C|0;var M=this.shape,v=this.stride;return new E(this.data,M[_],M[C],v[_],v[C],this.offset)},A.pick=function(_,C){var M=[],v=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(M.push(this.shape[0]),v.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(M.push(this.shape[1]),v.push(this.stride[1]));var T=y[M.length+1];return T(this.data,M,v,z)},function(_,C,M,v){return new E(_,C[0],C[1],M[0],M[1],v)}},3:function(b,y,k){function E(L,_,C,M,v,z,T,F){this.data=L,this.shape=[_,C,M],this.stride=[v,z,T],this.offset=F|0}var A=E.prototype;return A.dtype=b,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var _=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return _>C?C>M?[2,1,0]:_>M?[1,2,0]:[1,0,2]:_>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),A.set=function(_,C,M,v){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M,v):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]=v},A.get=function(_,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]},A.index=function(_,C,M){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M},A.hi=function(_,C,M){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|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)},A.lo=function(_,C,M){var v=this.offset,z=0,T=this.shape[0],F=this.shape[1],q=this.shape[2],U=this.stride[0],H=this.stride[1],j=this.stride[2];return typeof _=="number"&&_>=0&&(z=_|0,v+=U*z,T-=z),typeof C=="number"&&C>=0&&(z=C|0,v+=H*z,F-=z),typeof M=="number"&&M>=0&&(z=M|0,v+=j*z,q-=z),new E(this.data,T,F,q,U,H,j,v)},A.step=function(_,C,M){var v=this.shape[0],z=this.shape[1],T=this.shape[2],F=this.stride[0],q=this.stride[1],U=this.stride[2],H=this.offset,j=0,G=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(H+=F*(v-1),v=G(-v/j)):v=G(v/j),F*=j),typeof C=="number"&&(j=C|0,j<0?(H+=q*(z-1),z=G(-z/j)):z=G(z/j),q*=j),typeof M=="number"&&(j=M|0,j<0?(H+=U*(T-1),T=G(-T/j)):T=G(T/j),U*=j),new E(this.data,v,z,T,F,q,U,H)},A.transpose=function(_,C,M){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var v=this.shape,z=this.stride;return new E(this.data,v[_],v[C],v[M],z[_],z[C],z[M],this.offset)},A.pick=function(_,C,M){var v=[],z=[],T=this.offset;typeof _=="number"&&_>=0?T=T+this.stride[0]*_|0:(v.push(this.shape[0]),z.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(v.push(this.shape[1]),z.push(this.stride[1])),typeof M=="number"&&M>=0?T=T+this.stride[2]*M|0:(v.push(this.shape[2]),z.push(this.stride[2]));var F=y[v.length+1];return F(this.data,v,z,T)},function(_,C,M,v){return new E(_,C[0],C[1],C[2],M[0],M[1],M[2],v)}},4:function(b,y,k){function E(L,_,C,M,v,z,T,F,q,U){this.data=L,this.shape=[_,C,M,v],this.stride=[z,T,F,q],this.offset=U|0}var A=E.prototype;return A.dtype=b,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:k}),A.set=function(_,C,M,v,z){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v,z):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v]=z},A.get=function(_,C,M,v){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v]},A.index=function(_,C,M,v){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*v},A.hi=function(_,C,M,v){return new E(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof v!="number"||v<0?this.shape[3]:v|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(_,C,M,v){var z=this.offset,T=0,F=this.shape[0],q=this.shape[1],U=this.shape[2],H=this.shape[3],j=this.stride[0],G=this.stride[1],O=this.stride[2],W=this.stride[3];return typeof _=="number"&&_>=0&&(T=_|0,z+=j*T,F-=T),typeof C=="number"&&C>=0&&(T=C|0,z+=G*T,q-=T),typeof M=="number"&&M>=0&&(T=M|0,z+=O*T,U-=T),typeof v=="number"&&v>=0&&(T=v|0,z+=W*T,H-=T),new E(this.data,F,q,U,H,j,G,O,W,z)},A.step=function(_,C,M,v){var z=this.shape[0],T=this.shape[1],F=this.shape[2],q=this.shape[3],U=this.stride[0],H=this.stride[1],j=this.stride[2],G=this.stride[3],O=this.offset,W=0,re=Math.ceil;return typeof _=="number"&&(W=_|0,W<0?(O+=U*(z-1),z=re(-z/W)):z=re(z/W),U*=W),typeof C=="number"&&(W=C|0,W<0?(O+=H*(T-1),T=re(-T/W)):T=re(T/W),H*=W),typeof M=="number"&&(W=M|0,W<0?(O+=j*(F-1),F=re(-F/W)):F=re(F/W),j*=W),typeof v=="number"&&(W=v|0,W<0?(O+=G*(q-1),q=re(-q/W)):q=re(q/W),G*=W),new E(this.data,z,T,F,q,U,H,j,G,O)},A.transpose=function(_,C,M,v){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,v=v===void 0?3:v|0;var z=this.shape,T=this.stride;return new E(this.data,z[_],z[C],z[M],z[v],T[_],T[C],T[M],T[v],this.offset)},A.pick=function(_,C,M,v){var z=[],T=[],F=this.offset;typeof _=="number"&&_>=0?F=F+this.stride[0]*_|0:(z.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?F=F+this.stride[1]*C|0:(z.push(this.shape[1]),T.push(this.stride[1])),typeof M=="number"&&M>=0?F=F+this.stride[2]*M|0:(z.push(this.shape[2]),T.push(this.stride[2])),typeof v=="number"&&v>=0?F=F+this.stride[3]*v|0:(z.push(this.shape[3]),T.push(this.stride[3]));var q=y[z.length+1];return q(this.data,z,T,F)},function(_,C,M,v){return new E(_,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],v)}},5:function(y,k,E){function A(_,C,M,v,z,T,F,q,U,H,j,G){this.data=_,this.shape=[C,M,v,z,T],this.stride=[F,q,U,H,j],this.offset=G|0}var L=A.prototype;return L.dtype=y,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,v,z,T,F){return y==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T,F):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T]=F},L.get=function(C,M,v,z,T){return y==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T]},L.index=function(C,M,v,z,T){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*v+this.stride[3]*z+this.stride[4]*T},L.hi=function(C,M,v,z,T){return new A(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof v!="number"||v<0?this.shape[2]:v|0,typeof z!="number"||z<0?this.shape[3]:z|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,v,z,T){var F=this.offset,q=0,U=this.shape[0],H=this.shape[1],j=this.shape[2],G=this.shape[3],O=this.shape[4],W=this.stride[0],re=this.stride[1],ne=this.stride[2],be=this.stride[3],ze=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,F+=W*q,U-=q),typeof M=="number"&&M>=0&&(q=M|0,F+=re*q,H-=q),typeof v=="number"&&v>=0&&(q=v|0,F+=ne*q,j-=q),typeof z=="number"&&z>=0&&(q=z|0,F+=be*q,G-=q),typeof T=="number"&&T>=0&&(q=T|0,F+=ze*q,O-=q),new A(this.data,U,H,j,G,O,W,re,ne,be,ze,F)},L.step=function(C,M,v,z,T){var F=this.shape[0],q=this.shape[1],U=this.shape[2],H=this.shape[3],j=this.shape[4],G=this.stride[0],O=this.stride[1],W=this.stride[2],re=this.stride[3],ne=this.stride[4],be=this.offset,ze=0,Ce=Math.ceil;return typeof C=="number"&&(ze=C|0,ze<0?(be+=G*(F-1),F=Ce(-F/ze)):F=Ce(F/ze),G*=ze),typeof M=="number"&&(ze=M|0,ze<0?(be+=O*(q-1),q=Ce(-q/ze)):q=Ce(q/ze),O*=ze),typeof v=="number"&&(ze=v|0,ze<0?(be+=W*(U-1),U=Ce(-U/ze)):U=Ce(U/ze),W*=ze),typeof z=="number"&&(ze=z|0,ze<0?(be+=re*(H-1),H=Ce(-H/ze)):H=Ce(H/ze),re*=ze),typeof T=="number"&&(ze=T|0,ze<0?(be+=ne*(j-1),j=Ce(-j/ze)):j=Ce(j/ze),ne*=ze),new A(this.data,F,q,U,H,j,G,O,W,re,ne,be)},L.transpose=function(C,M,v,z,T){C=C===void 0?0:C|0,M=M===void 0?1:M|0,v=v===void 0?2:v|0,z=z===void 0?3:z|0,T=T===void 0?4:T|0;var F=this.shape,q=this.stride;return new A(this.data,F[C],F[M],F[v],F[z],F[T],q[C],q[M],q[v],q[z],q[T],this.offset)},L.pick=function(C,M,v,z,T){var F=[],q=[],U=this.offset;typeof C=="number"&&C>=0?U=U+this.stride[0]*C|0:(F.push(this.shape[0]),q.push(this.stride[0])),typeof M=="number"&&M>=0?U=U+this.stride[1]*M|0:(F.push(this.shape[1]),q.push(this.stride[1])),typeof v=="number"&&v>=0?U=U+this.stride[2]*v|0:(F.push(this.shape[2]),q.push(this.stride[2])),typeof z=="number"&&z>=0?U=U+this.stride[3]*z|0:(F.push(this.shape[3]),q.push(this.stride[3])),typeof T=="number"&&T>=0?U=U+this.stride[4]*T|0:(F.push(this.shape[4]),q.push(this.stride[4]));var H=k[F.length+1];return H(this.data,F,q,U)},function(C,M,v,z){return new A(C,M[0],M[1],M[2],M[3],M[4],v[0],v[1],v[2],v[3],v[4],z)}}};function h(b,y){var k=y===-1?"T":String(y),E=c[k];return y===-1?E(b):y===0?E(b,p[b][0]):E(b,p[b],f)}function d(b){if(s(b))return"buffer";if(u)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 p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(b,y,k,E){if(b===void 0){var v=p.array[0];return v([])}else typeof b=="number"&&(b=[b]);y===void 0&&(y=[b.length]);var A=y.length;if(k===void 0){k=new Array(A);for(var L=A-1,_=1;L>=0;--L)k[L]=_,_*=y[L]}if(E===void 0){E=0;for(var L=0;L>>0;i.exports=f;function f(c,h){if(isNaN(c)||isNaN(h))return NaN;if(c===h)return c;if(c===0)return h<0?-u:u;var d=s.hi(c),p=s.lo(c);return h>c==c>0?p===l?(d+=1,p=0):p+=1:p===0?(p=l,d-=1):p-=1,s.pack(p,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(u,l,f){for(var c=l.length,h=new Array(c),d=f===void 0?o:f,p=0;pd)for(var F=h[y],q=1/Math.sqrt(M*z),T=0;T<3;++T){var U=(T+1)%3,H=(T+2)%3;F[T]+=q*(v[U]*C[H]-v[H]*C[U])}}for(var p=0;pd)for(var q=1/Math.sqrt(j),T=0;T<3;++T)F[T]*=q;else for(var T=0;T<3;++T)F[T]=0}return h},a.faceNormals=function(u,l,f){for(var c=u.length,h=new Array(c),d=f===void 0?s:f,p=0;pd?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)A[y]*=L;h[p]=A}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,u,l,f,c,h,d,p,x){var b=s+c+x;if(y>0){var y=Math.sqrt(b+1);o[0]=.5*(h-p)/y,o[1]=.5*(d-l)/y,o[2]=.5*(u-c)/y,o[3]=.5*y}else{var k=Math.max(s,c,x),y=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*y,o[1]=.5*(f+u)/y,o[2]=.5*(d+l)/y,o[3]=.5*(h-p)/y):c>=k?(o[0]=.5*(u+f)/y,o[1]=.5*y,o[2]=.5*(p+h)/y,o[3]=.5*(d-l)/y):(o[0]=.5*(l+d)/y,o[1]=.5*(h+p)/y,o[2]=.5*y,o[3]=.5*(u-f)/y)}return o}},9977:function(i,a,o){"use strict";i.exports=y;var s=o(9215),u=o(6582),l=o(7399),f=o(7608),c=o(4081);function h(k,E,A){return Math.sqrt(Math.pow(k,2)+Math.pow(E,2)+Math.pow(A,2))}function d(k,E,A,L){return Math.sqrt(Math.pow(k,2)+Math.pow(E,2)+Math.pow(A,2)+Math.pow(L,2))}function p(k,E){var A=E[0],L=E[1],_=E[2],C=E[3],M=d(A,L,_,C);M>1e-6?(k[0]=A/M,k[1]=L/M,k[2]=_/M,k[3]=C/M):(k[0]=k[1]=k[2]=0,k[3]=1)}function x(k,E,A){this.radius=s([A]),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=x.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;p(E,E);var A=this.computedMatrix;l(A,E);var L=this.computedCenter,_=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);_[0]=L[0]+M*A[2],_[1]=L[1]+M*A[6],_[2]=L[2]+M*A[10],C[0]=A[1],C[1]=A[5],C[2]=A[9];for(var v=0;v<3;++v){for(var z=0,T=0;T<3;++T)z+=A[v+4*T]*_[T];A[12+v]=-z}},b.getMatrix=function(k,E){this.recalcMatrix(k);var A=this.computedMatrix;if(E){for(var L=0;L<16;++L)E[L]=A[L];return E}return A},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,A,L){E=E||0,A=A||0,L=L||0,this.recalcMatrix(k);var _=this.computedMatrix,C=_[1],M=_[5],v=_[9],z=h(C,M,v);C/=z,M/=z,v/=z;var T=_[0],F=_[4],q=_[8],U=T*C+F*M+q*v;T-=C*U,F-=M*U,q-=v*U;var H=h(T,F,q);T/=H,F/=H,q/=H;var j=_[2],G=_[6],O=_[10],W=j*C+G*M+O*v,re=j*T+G*F+O*q;j-=W*C+re*T,G-=W*M+re*F,O-=W*v+re*q;var ne=h(j,G,O);j/=ne,G/=ne,O/=ne;var be=T*E+C*A,ze=F*E+M*A,Ce=q*E+v*A;this.center.move(k,be,ze,Ce);var he=Math.exp(this.computedRadius[0]);he=Math.max(1e-4,he+L),this.radius.set(k,Math.log(he))},b.rotate=function(k,E,A,L){this.recalcMatrix(k),E=E||0,A=A||0;var _=this.computedMatrix,C=_[0],M=_[4],v=_[8],z=_[1],T=_[5],F=_[9],q=_[2],U=_[6],H=_[10],j=E*C+A*z,G=E*M+A*T,O=E*v+A*F,W=-(U*O-H*G),re=-(H*j-q*O),ne=-(q*G-U*j),be=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(re,2)-Math.pow(ne,2))),ze=d(W,re,ne,be);ze>1e-6?(W/=ze,re/=ze,ne/=ze,be/=ze):(W=re=ne=0,be=1);var Ce=this.computedRotation,he=Ce[0],te=Ce[1],ke=Ce[2],Ee=Ce[3],Me=he*be+Ee*W+te*ne-ke*re,Oe=te*be+Ee*re+ke*W-he*ne,Re=ke*be+Ee*ne+he*re-te*W,me=Ee*be-he*W-te*re-ke*ne;if(L){W=q,re=U,ne=H;var Be=Math.sin(L)/h(W,re,ne);W*=Be,re*=Be,ne*=Be,be=Math.cos(E),Me=Me*be+me*W+Oe*ne-Re*re,Oe=Oe*be+me*re+Re*W-Me*ne,Re=Re*be+me*ne+Me*re-Oe*W,me=me*be-Me*W-Oe*re-Re*ne}var fe=d(Me,Oe,Re,me);fe>1e-6?(Me/=fe,Oe/=fe,Re/=fe,me/=fe):(Me=Oe=Re=0,me=1),this.rotation.set(k,Me,Oe,Re,me)},b.lookAt=function(k,E,A,L){this.recalcMatrix(k),A=A||this.computedCenter,E=E||this.computedEye,L=L||this.computedUp;var _=this.computedMatrix;u(_,E,A,L);var C=this.computedRotation;c(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),p(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var M=0,v=0;v<3;++v)M+=Math.pow(A[v]-E[v],2);this.radius.set(k,.5*Math.log(Math.max(M,1e-6))),this.center.set(k,A[0],A[1],A[2])},b.translate=function(k,E,A,L){this.center.move(k,E||0,A||0,L||0)},b.setMatrix=function(k,E){var A=this.computedRotation;c(A,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),p(A,A),this.rotation.set(k,A[0],A[1],A[2],A[3]);var L=this.computedMatrix;f(L,E);var _=L[15];if(Math.abs(_)>1e-6){var C=L[12]/_,M=L[13]/_,v=L[14]/_;this.recalcMatrix(k);var z=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*z,M-L[6]*z,v-L[10]*z),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(),A=k.center;A&&this.center.set(E,A[0],A[1],A[2]);var L=k.rotation;L&&this.rotation.set(E,L[0],L[1],L[2],L[3]);var _=k.distance;_&&_>0&&this.radius.set(E,Math.log(_)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function y(k){k=k||{};var E=k.center||[0,0,0],A=k.rotation||[0,0,0,1],L=k.radius||1;E=[].slice.call(E,0,3),A=[].slice.call(A,0,4),p(A,A);var _=new x(A,E,Math.log(L));return _.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&_.lookAt(0,k.eye,k.center,k.up),_}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(l,f,c){return c=typeof c!="undefined"?c+"":" ",s(c,f)+l}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var u=parseFloat(o,10);return s[0]=u,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=u;var s=o(3140);function u(l,f){for(var c=f.length|0,h=l.length,d=[new Array(c),new Array(c)],p=0;p0){F=d[H][z][0],U=H;break}q=F[U^1];for(var j=0;j<2;++j)for(var G=d[j][z],O=0;O0&&(F=W,q=re,U=j)}return T||F&&y(F,U),q}function E(v,z){var T=d[z][v][0],F=[v];y(T,z);for(var q=T[z^1],U=z;;){for(;q!==v;)F.push(q),q=k(F[F.length-2],q,!1);if(d[0][v].length+d[1][v].length===0)break;var H=F[F.length-1],j=v,G=F[1],O=k(H,j,!0);if(s(f[H],f[j],f[G],f[O])<0)break;F.push(v),q=k(H,j)}return F}function A(v,z){return z[1]===z[z.length-1]}for(var p=0;p0;){var C=d[0][p].length,M=E(p,L);A(_,M)?_.push.apply(_,M):(_.length>0&&b.push(_),_=M)}_.length>0&&b.push(_)}return b}},5609:function(i,a,o){"use strict";i.exports=u;var s=o(3134);function u(l,f){for(var c=s(l,f.length),h=new Array(f.length),d=new Array(f.length),p=[],x=0;x0;){var y=p.pop();h[y]=!1;for(var k=c[y],x=0;x0}C=C.filter(M);for(var v=C.length,z=new Array(v),T=new Array(v),_=0;_0;){var fe=Re.pop(),Ze=ze[fe];h(Ze,function(Xe,Tt){return Xe-Tt});var et=Ze.length,gt=me[fe],Pt;if(gt===0){var G=C[fe];Pt=[G]}for(var _=0;_=0)&&(me[Qe]=gt^1,Re.push(Qe),gt===0)){var G=C[Qe];Oe(G)||(G.reverse(),Pt.push(G))}}gt===0&&Be.push(Pt)}return Be}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],u=o(4209),l=o(3352),f=o(2478);function c(){return!0}function h(E){return function(A,L){var _=E[A];return _?!!_.queryPoint(L,c):!1}}function d(E){for(var A={},L=0;L0&&A[_]===L[0])C=E[_-1];else return 1;for(var M=1;C;){var v=C.key,z=s(L,v[0],v[1]);if(v[0][0]0)M=-1,C=C.right;else return 0;else if(z>0)C=C.left;else if(z<0)M=1,C=C.right;else return 0}return M}}function x(E){return 1}function b(E){return function(L){return E(L[0],L[1])?0:1}}function y(E,A){return function(_){return E(_[0],_[1])?0:A(_)}}function k(E){for(var A=E.length,L=[],_=[],C=0,M=0;M=x?(v=1,T=x+2*k+A):(v=-k/x,T=k*v+A)):(v=0,E>=0?(z=0,T=A):-E>=y?(z=1,T=y+2*E+A):(z=-E/y,T=E*z+A));else if(z<0)z=0,k>=0?(v=0,T=A):-k>=x?(v=1,T=x+2*k+A):(v=-k/x,T=k*v+A);else{var F=1/M;v*=F,z*=F,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A}else{var q,U,H,j;v<0?(q=b+k,U=y+E,U>q?(H=U-q,j=x-2*b+y,H>=j?(v=1,z=0,T=x+2*k+A):(v=H/j,z=1-v,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A)):(v=0,U<=0?(z=1,T=y+2*E+A):E>=0?(z=0,T=A):(z=-E/y,T=E*z+A))):z<0?(q=b+E,U=x+k,U>q?(H=U-q,j=x-2*b+y,H>=j?(z=1,v=0,T=y+2*E+A):(z=H/j,v=1-z,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A)):(z=0,U<=0?(v=1,T=x+2*k+A):k>=0?(v=0,T=A):(v=-k/x,T=k*v+A))):(H=y+E-b-k,H<=0?(v=0,z=1,T=y+2*E+A):(j=x-2*b+y,H>=j?(v=1,z=0,T=x+2*k+A):(v=H/j,z=1-v,T=v*(x*v+b*z+2*k)+z*(b*v+y*z+2*E)+A)))}for(var G=1-v-z,p=0;p0){var y=c[d-1];if(s(x,y)===0&&l(y)!==b){d-=1;continue}}c[d++]=x}}return c.length=d,c}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(u,l){if(typeof u!="string")throw new TypeError("expected a string");if(l===1)return u;if(l===2)return u+u;var f=u.length*l;if(o!==u||typeof o=="undefined")o=u,a="";else if(a.length>=f)return a.substr(0,f);for(;f>a.length&&l>1;)l&1&&(a+=u),l>>=1,u+=u;return a+=u,a=a.substr(0,f),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,u=o[o.length-1],l=s,f=s-2;f>=0;--f){var c=u,h=o[f];u=c+h;var d=u-c,p=h-d;p&&(o[--l]=u,u=p)}for(var x=0,f=l;f0){if(U<=0)return H;j=q+U}else if(q<0){if(U>=0)return H;j=-(q+U)}else return H;var G=d*j;return H>=G||H<=-G?H:E(z,T,F)},function(z,T,F,q){var U=z[0]-q[0],H=T[0]-q[0],j=F[0]-q[0],G=z[1]-q[1],O=T[1]-q[1],W=F[1]-q[1],re=z[2]-q[2],ne=T[2]-q[2],be=F[2]-q[2],ze=H*W,Ce=j*O,he=j*G,te=U*W,ke=U*O,Ee=H*G,Me=re*(ze-Ce)+ne*(he-te)+be*(ke-Ee),Oe=(Math.abs(ze)+Math.abs(Ce))*Math.abs(re)+(Math.abs(he)+Math.abs(te))*Math.abs(ne)+(Math.abs(ke)+Math.abs(Ee))*Math.abs(be),Re=p*Oe;return Me>Re||-Me>Re?Me:A(z,T,F,q)}];function _(v){var z=L[v.length];return z||(z=L[v.length]=k(v.length)),z.apply(void 0,v)}function C(v,z,T,F,q,U,H){return function(G,O,W,re,ne){switch(arguments.length){case 0:case 1:return 0;case 2:return F(G,O);case 3:return q(G,O,W);case 4:return U(G,O,W,re);case 5:return H(G,O,W,re,ne)}for(var be=new Array(arguments.length),ze=0;ze0&&x>0||p<0&&x<0)return!1;var b=s(h,f,c),y=s(d,f,c);return b>0&&y>0||b<0&&y<0?!1:p===0&&x===0&&b===0&&y===0?u(f,c,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,u){var l=s+u,f=l-s,c=l-f,h=u-f,d=s-c,p=d+h;return p?[p,l]:[l]}function o(s,u){var l=s.length|0,f=u.length|0;if(l===1&&f===1)return a(s[0],-u[0]);var c=l+f,h=new Array(c),d=0,p=0,x=0,b=Math.abs,y=s[p],k=b(y),E=-u[x],A=b(E),L,_;k=f?(L=y,p+=1,p=f?(L=y,p+=1,p>1,E=c[2*k+1];if(E===x)return k;x>1,E=c[2*k+1];if(E===x)return k;x>1,E=c[2*k+1];if(E===x)return k;x>1,E=c[2*k+1];if(E===x)return k;x>1,j=d(z[H],T);j<=0?(j===0&&(U=H),F=H+1):j>0&&(q=H-1)}return U}s=y;function k(z,T){for(var F=new Array(z.length),q=0,U=F.length;q=z.length||d(z[ze],H)!==0););}return F}s=k;function E(z,T){if(!T)return k(b(L(z,0)),z,0);for(var F=new Array(T),q=0;q>>W&1&&O.push(U[W]);T.push(O)}return x(T)}s=A;function L(z,T){if(T<0)return[];for(var F=[],q=(1<0)-(l<0)},a.abs=function(l){var f=l>>o-1;return(l^f)-f},a.min=function(l,f){return f^(l^f)&-(l65535)<<4,l>>>=f,c=(l>255)<<3,l>>>=c,f|=c,c=(l>15)<<2,l>>>=c,f|=c,c=(l>3)<<1,l>>>=c,f|=c,f|l>>1},a.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},a.popCount=function(l){return l=l-(l>>>1&1431655765),l=(l&858993459)+(l>>>2&858993459),(l+(l>>>4)&252645135)*16843009>>>24};function s(l){var f=32;return l&=-l,l&&f--,l&65535&&(f-=16),l&16711935&&(f-=8),l&252645135&&(f-=4),l&858993459&&(f-=2),l&1431655765&&(f-=1),f}a.countTrailingZeros=s,a.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l+1},a.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l-(l>>>1)},a.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,l&=15,27030>>>l&1};var u=new Array(256);(function(l){for(var f=0;f<256;++f){var c=f,h=f,d=7;for(c>>>=1;c;c>>>=1)h<<=1,h|=c&1,--d;l[f]=h<>>8&255]<<16|u[l>>>16&255]<<8|u[l>>>24&255]},a.interleave2=function(l,f){return l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,l|f<<1},a.deinterleave2=function(l,f){return l=l>>>f&1431655765,l=(l|l>>>1)&858993459,l=(l|l>>>2)&252645135,l=(l|l>>>4)&16711935,l=(l|l>>>16)&65535,l<<16>>16},a.interleave3=function(l,f,c){return l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,l|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,l|c<<2},a.deinterleave3=function(l,f){return l=l>>>f&1227133513,l=(l|l>>>2)&3272356035,l=(l|l>>>4)&251719695,l=(l|l>>>8)&4278190335,l=(l|l>>>16)&1023,l<<22>>22},a.nextCombination=function(l){var f=l|l-1;return f+1|(~f&-~f)-1>>>s(l)+1}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),u=o(4623);function l(v){for(var z=0,T=Math.max,F=0,q=v.length;F>1,H=h(v[U],z);H<=0?(H===0&&(q=U),T=U+1):H>0&&(F=U-1)}return q}a.findCell=b;function y(v,z){for(var T=new Array(v.length),F=0,q=T.length;F=v.length||h(v[be],U)!==0););}return T}a.incidence=y;function k(v,z){if(!z)return y(x(A(v,0)),v,0);for(var T=new Array(z),F=0;F>>O&1&&G.push(q[O]);z.push(G)}return p(z)}a.explode=E;function A(v,z){if(z<0)return[];for(var T=[],F=(1<>1:(te>>1)-1}function F(te){for(var ke=z(te);;){var Ee=ke,Me=2*te+1,Oe=2*(te+1),Re=te;if(Me0;){var Ee=T(te);if(Ee>=0){var Me=z(Ee);if(ke0){var te=G[0];return v(0,re-1),re-=1,F(0),te}return-1}function H(te,ke){var Ee=G[te];return k[Ee]===ke?te:(k[Ee]=-1/0,q(te),U(),k[Ee]=ke,re+=1,q(re-1))}function j(te){if(!E[te]){E[te]=!0;var ke=b[te],Ee=y[te];b[Ee]>=0&&(b[Ee]=ke),y[ke]>=0&&(y[ke]=Ee),O[ke]>=0&&H(O[ke],M(ke)),O[Ee]>=0&&H(O[Ee],M(Ee))}}for(var G=[],O=new Array(p),A=0;A>1;A>=0;--A)F(A);for(;;){var ne=U();if(ne<0||k[ne]>d)break;j(ne)}for(var be=[],A=0;A=0&&Ee>=0&&ke!==Ee){var Me=O[ke],Oe=O[Ee];Me!==Oe&&he.push([Me,Oe])}}),u.unique(u.normalize(he)),{positions:be,edges:he}}},1303:function(i,a,o){"use strict";i.exports=l;var s=o(3250);function u(f,c){var h,d;if(c[0][0]c[1][0])h=c[1],d=c[0];else{var p=Math.min(f[0][1],f[1][1]),x=Math.max(f[0][1],f[1][1]),b=Math.min(c[0][1],c[1][1]),y=Math.max(c[0][1],c[1][1]);return xy?p-y:x-y}var k,E;f[0][1]c[1][0])h=c[1],d=c[0];else return u(c,f);var p,x;if(f[0][0]f[1][0])p=f[1],x=f[0];else return-u(f,c);var b=s(h,d,x),y=s(h,d,p);if(b<0){if(y<=0)return b}else if(b>0){if(y>=0)return b}else if(y)return y;if(b=s(x,p,d),y=s(x,p,h),b<0){if(y<=0)return b}else if(b>0){if(y>=0)return b}else if(y)return y;return d[0]-x[0]}},4209:function(i,a,o){"use strict";i.exports=y;var s=o(2478),u=o(3840),l=o(3250),f=o(1303);function c(k,E,A){this.slabs=k,this.coordinates=E,this.horizontal=A}var h=c.prototype;function d(k,E){return k.y-E}function p(k,E){for(var A=null;k;){var L=k.key,_,C;L[0][0]0)if(E[0]!==L[1][0])A=k,k=k.right;else{var v=p(k.right,E);if(v)return v;k=k.left}else{if(E[0]!==L[1][0])return k;var v=p(k.right,E);if(v)return v;k=k.left}}return A}h.castUp=function(k){var E=s.le(this.coordinates,k[0]);if(E<0)return-1;var A=this.slabs[E],L=p(this.slabs[E],k),_=-1;if(L&&(_=L.value),this.coordinates[E]===k[0]){var C=null;if(L&&(C=L.key),E>0){var M=p(this.slabs[E-1],k);M&&(C?f(M.key,C)>0&&(C=M.key,_=M.value):(_=M.value,C=M.key))}var v=this.horizontal[E];if(v.length>0){var z=s.ge(v,k[1],d);if(z=v.length)return _;T=v[z]}}if(T.start)if(C){var F=l(C[0],C[1],[k[0],T.y]);C[0][0]>C[1][0]&&(F=-F),F>0&&(_=T.index)}else _=T.index;else T.y!==k[1]&&(_=T.index)}}}return _};function x(k,E,A,L){this.y=k,this.index=E,this.start=A,this.closed=L}function b(k,E,A,L){this.x=k,this.segment=E,this.create=A,this.index=L}function y(k){for(var E=k.length,A=2*E,L=new Array(A),_=0;_1&&(E=1);for(var A=1-E,L=p.length,_=new Array(L),C=0;C0||k>0&&_<0){var C=f(E,_,A,k);b.push(C),y.push(C.slice())}_<0?y.push(A.slice()):_>0?b.push(A.slice()):(b.push(A.slice()),y.push(A.slice())),k=_}return{positive:b,negative:y}}function h(p,x){for(var b=[],y=l(p[p.length-1],x),k=p[p.length-1],E=p[0],A=0;A0||y>0&&L<0)&&b.push(f(k,L,E,y)),L>=0&&b.push(E.slice()),y=L}return b}function d(p,x){for(var b=[],y=l(p[p.length-1],x),k=p[p.length-1],E=p[0],A=0;A0||y>0&&L<0)&&b.push(f(k,L,E,y)),L<=0&&b.push(E.slice()),y=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var u={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(p){return c(d(p),arguments)}function f(p,x){return l.apply(null,[p].concat(x||[]))}function c(p,x){var b=1,y=p.length,k,E="",A,L,_,C,M,v,z,T;for(A=0;A=0),_.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,_.width?parseInt(_.width):0);break;case"e":k=_.precision?parseFloat(k).toExponential(_.precision):parseFloat(k).toExponential();break;case"f":k=_.precision?parseFloat(k).toFixed(_.precision):parseFloat(k);break;case"g":k=_.precision?String(Number(k.toPrecision(_.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=_.precision?k.substring(0,_.precision):k;break;case"t":k=String(!!k),k=_.precision?k.substring(0,_.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=_.precision?k.substring(0,_.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=_.precision?k.substring(0,_.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}u.json.test(_.type)?E+=k:(u.number.test(_.type)&&(!z||_.sign)?(T=z?"+":"-",k=k.toString().replace(u.sign,"")):T="",M=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",v=_.width-(T+k).length,C=_.width&&v>0?M.repeat(v):"",E+=_.align?T+k+C:M==="0"?T+C+k:C+T+k)}return E}var h=Object.create(null);function d(p){if(h[p])return h[p];for(var x=p,b,y=[],k=0;x;){if((b=u.text.exec(x))!==null)y.push(b[0]);else if((b=u.modulo.exec(x))!==null)y.push("%");else if((b=u.placeholder.exec(x))!==null){if(b[2]){k|=1;var E=[],A=b[2],L=[];if((L=u.key.exec(A))!==null)for(E.push(L[1]);(A=A.substring(L[0].length))!=="";)if((L=u.key_access.exec(A))!==null)E.push(L[1]);else if((L=u.index_access.exec(A))!==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");y.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");x=x.substring(b[0].length)}return h[p]=y}a.sprintf=l,a.vsprintf=f,typeof window!="undefined"&&(window.sprintf=l,window.vsprintf=f,s=function(){return{sprintf:l,vsprintf:f}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),u=o(781),l={"2d":function(p,x,b){var y=p({order:x,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(E,A,L,_){return E>_|0},vertex:function(E,A,L,_,C,M,v,z,T,F,q,U,H){var j=(v<<0)+(z<<1)+(T<<2)+(F<<3)|0;if(!(j===0||j===15))switch(j){case 0:q.push([E-.5,A-.5]);break;case 1:q.push([E-.25-.25*(_+L-2*H)/(L-_),A-.25-.25*(C+L-2*H)/(L-C)]);break;case 2:q.push([E-.75-.25*(-_-L+2*H)/(_-L),A-.25-.25*(M+_-2*H)/(_-M)]);break;case 3:q.push([E-.5,A-.5-.5*(C+L+M+_-4*H)/(L-C+_-M)]);break;case 4:q.push([E-.25-.25*(M+C-2*H)/(C-M),A-.75-.25*(-C-L+2*H)/(C-L)]);break;case 5:q.push([E-.5-.5*(_+L+M+C-4*H)/(L-_+C-M),A-.5]);break;case 6:q.push([E-.5-.25*(-_-L+M+C)/(_-L+C-M),A-.5-.25*(-C-L+M+_)/(C-L+_-M)]);break;case 7:q.push([E-.75-.25*(M+C-2*H)/(C-M),A-.75-.25*(M+_-2*H)/(_-M)]);break;case 8:q.push([E-.75-.25*(-M-C+2*H)/(M-C),A-.75-.25*(-M-_+2*H)/(M-_)]);break;case 9:q.push([E-.5-.25*(_+L+-M-C)/(L-_+M-C),A-.5-.25*(C+L+-M-_)/(L-C+M-_)]);break;case 10:q.push([E-.5-.5*(-_-L+-M-C+4*H)/(_-L+M-C),A-.5]);break;case 11:q.push([E-.25-.25*(-M-C+2*H)/(M-C),A-.75-.25*(C+L-2*H)/(L-C)]);break;case 12:q.push([E-.5,A-.5-.5*(-C-L+-M-_+4*H)/(C-L+M-_)]);break;case 13:q.push([E-.75-.25*(_+L-2*H)/(L-_),A-.25-.25*(-M-_+2*H)/(M-_)]);break;case 14:q.push([E-.25-.25*(-_-L+2*H)/(_-L),A-.25-.25*(-C-L+2*H)/(C-L)]);break;case 15:q.push([E-.5,A-.5]);break}},cell:function(E,A,L,_,C,M,v,z,T){C?z.push([E,A]):z.push([A,E])}});return function(k,E){var A=[],L=[];return y(k,A,L,E),{positions:A,cells:L}}}};function f(p,x){var b=p.length+"d",y=l[b];if(y)return y(s,p,x)}function c(p,x){for(var b=u(p,x),y=b.length,k=new Array(y),E=new Array(y),A=0;AMath.max(_,C)?M[2]=1:_>Math.max(L,C)?M[0]=1:M[1]=1;for(var v=0,z=0,T=0;T<3;++T)v+=A[T]*A[T],z+=M[T]*A[T];for(var T=0;T<3;++T)M[T]-=z/v*A[T];return c(M,M),M}function b(A,L,_,C,M,v,z,T){this.center=s(_),this.up=s(C),this.right=s(M),this.radius=s([v]),this.angle=s([z,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var y=b.prototype;y.setDistanceLimits=function(A,L){A>0?A=Math.log(A):A=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(A){var L=this.radius.bounds[0];return A?(A[0]=Math.exp(L[0][0]),A[1]=Math.exp(L[1][0]),A):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var L=this.computedUp,_=this.computedRight,C=0,M=0,v=0;v<3;++v)M+=L[v]*_[v],C+=L[v]*L[v];for(var z=Math.sqrt(C),T=0,v=0;v<3;++v)_[v]-=L[v]*M/C,T+=_[v]*_[v],L[v]/=z;for(var F=Math.sqrt(T),v=0;v<3;++v)_[v]/=F;var q=this.computedToward;f(q,L,_),c(q,q);for(var U=Math.exp(this.computedRadius[0]),H=this.computedAngle[0],j=this.computedAngle[1],G=Math.cos(H),O=Math.sin(H),W=Math.cos(j),re=Math.sin(j),ne=this.computedCenter,be=G*W,ze=O*W,Ce=re,he=-G*re,te=-O*re,ke=W,Ee=this.computedEye,Me=this.computedMatrix,v=0;v<3;++v){var Oe=be*_[v]+ze*q[v]+Ce*L[v];Me[4*v+1]=he*_[v]+te*q[v]+ke*L[v],Me[4*v+2]=Oe,Me[4*v+3]=0}var Re=Me[1],me=Me[5],Be=Me[9],fe=Me[2],Ze=Me[6],et=Me[10],gt=me*et-Be*Ze,Pt=Be*fe-Re*et,Qe=Re*Ze-me*fe,Xe=d(gt,Pt,Qe);gt/=Xe,Pt/=Xe,Qe/=Xe,Me[0]=gt,Me[4]=Pt,Me[8]=Qe;for(var v=0;v<3;++v)Ee[v]=ne[v]+Me[2+4*v]*U;for(var v=0;v<3;++v){for(var T=0,Tt=0;Tt<3;++Tt)T+=Me[v+4*Tt]*Ee[Tt];Me[12+v]=-T}Me[15]=1},y.getMatrix=function(A,L){this.recalcMatrix(A);var _=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=_[C];return L}return _};var k=[0,0,0];y.rotate=function(A,L,_,C){if(this.angle.move(A,L,_),C){this.recalcMatrix(A);var M=this.computedMatrix;k[0]=M[2],k[1]=M[6],k[2]=M[10];for(var v=this.computedUp,z=this.computedRight,T=this.computedToward,F=0;F<3;++F)M[4*F]=v[F],M[4*F+1]=z[F],M[4*F+2]=T[F];l(M,M,C,k);for(var F=0;F<3;++F)v[F]=M[4*F],z[F]=M[4*F+1];this.up.set(A,v[0],v[1],v[2]),this.right.set(A,z[0],z[1],z[2])}},y.pan=function(A,L,_,C){L=L||0,_=_||0,C=C||0,this.recalcMatrix(A);var M=this.computedMatrix,v=Math.exp(this.computedRadius[0]),z=M[1],T=M[5],F=M[9],q=d(z,T,F);z/=q,T/=q,F/=q;var U=M[0],H=M[4],j=M[8],G=U*z+H*T+j*F;U-=z*G,H-=T*G,j-=F*G;var O=d(U,H,j);U/=O,H/=O,j/=O;var W=U*L+z*_,re=H*L+T*_,ne=j*L+F*_;this.center.move(A,W,re,ne);var be=Math.exp(this.computedRadius[0]);be=Math.max(1e-4,be+C),this.radius.set(A,Math.log(be))},y.translate=function(A,L,_,C){this.center.move(A,L||0,_||0,C||0)},y.setMatrix=function(A,L,_,C){var M=1;typeof _=="number"&&(M=_|0),(M<0||M>3)&&(M=1);var v=(M+2)%3,z=(M+1)%3;L||(this.recalcMatrix(A),L=this.computedMatrix);var T=L[M],F=L[M+4],q=L[M+8];if(C){var H=Math.abs(T),j=Math.abs(F),G=Math.abs(q),O=Math.max(H,j,G);H===O?(T=T<0?-1:1,F=q=0):G===O?(q=q<0?-1:1,T=F=0):(F=F<0?-1:1,T=q=0)}else{var U=d(T,F,q);T/=U,F/=U,q/=U}var W=L[v],re=L[v+4],ne=L[v+8],be=W*T+re*F+ne*q;W-=T*be,re-=F*be,ne-=q*be;var ze=d(W,re,ne);W/=ze,re/=ze,ne/=ze;var Ce=F*ne-q*re,he=q*W-T*ne,te=T*re-F*W,ke=d(Ce,he,te);Ce/=ke,he/=ke,te/=ke,this.center.jump(A,At,Te,nt),this.radius.idle(A),this.up.jump(A,T,F,q),this.right.jump(A,W,re,ne);var Ee,Me;if(M===2){var Oe=L[1],Re=L[5],me=L[9],Be=Oe*W+Re*re+me*ne,fe=Oe*Ce+Re*he+me*te;Pt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Me=Math.atan2(fe,Be)}else{var Ze=L[2],et=L[6],gt=L[10],Pt=Ze*T+et*F+gt*q,Qe=Ze*W+et*re+gt*ne,Xe=Ze*Ce+et*he+gt*te;Ee=Math.asin(p(Pt)),Me=Math.atan2(Xe,Qe)}this.angle.jump(A,Me,Ee),this.recalcMatrix(A);var Tt=L[2],xt=L[6],_t=L[10],Ct=this.computedMatrix;u(Ct,L);var jt=Ct[15],At=Ct[12]/jt,Te=Ct[13]/jt,nt=Ct[14]/jt,ut=Math.exp(this.computedRadius[0]);this.center.jump(A,At-Tt*ut,Te-xt*ut,nt-_t*ut)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},y.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},y.setDistance=function(A,L){L>0&&this.radius.set(A,Math.log(L))},y.lookAt=function(A,L,_,C){this.recalcMatrix(A),L=L||this.computedEye,_=_||this.computedCenter,C=C||this.computedUp;var M=C[0],v=C[1],z=C[2],T=d(M,v,z);if(!(T<1e-6)){M/=T,v/=T,z/=T;var F=L[0]-_[0],q=L[1]-_[1],U=L[2]-_[2],H=d(F,q,U);if(!(H<1e-6)){F/=H,q/=H,U/=H;var j=this.computedRight,G=j[0],O=j[1],W=j[2],re=M*G+v*O+z*W;G-=re*M,O-=re*v,W-=re*z;var ne=d(G,O,W);if(!(ne<.01&&(G=v*U-z*q,O=z*F-M*U,W=M*q-v*F,ne=d(G,O,W),ne<1e-6))){G/=ne,O/=ne,W/=ne,this.up.set(A,M,v,z),this.right.set(A,G,O,W),this.center.set(A,_[0],_[1],_[2]),this.radius.set(A,Math.log(H));var be=v*W-z*O,ze=z*G-M*W,Ce=M*O-v*G,he=d(be,ze,Ce);be/=he,ze/=he,Ce/=he;var te=M*F+v*q+z*U,ke=G*F+O*q+W*U,Ee=be*F+ze*q+Ce*U,Me=Math.asin(p(te)),Oe=Math.atan2(Ee,ke),Re=this.angle._state,me=Re[Re.length-1],Be=Re[Re.length-2];me=me%(2*Math.PI);var fe=Math.abs(me+2*Math.PI-Oe),Ze=Math.abs(me-Oe),et=Math.abs(me-2*Math.PI-Oe);fe0?W.pop():new ArrayBuffer(G)}a.mallocArrayBuffer=k;function E(j){return new Uint8Array(k(j),0,j)}a.mallocUint8=E;function A(j){return new Uint16Array(k(2*j),0,j)}a.mallocUint16=A;function L(j){return new Uint32Array(k(4*j),0,j)}a.mallocUint32=L;function _(j){return new Int8Array(k(j),0,j)}a.mallocInt8=_;function C(j){return new Int16Array(k(2*j),0,j)}a.mallocInt16=C;function M(j){return new Int32Array(k(4*j),0,j)}a.mallocInt32=M;function v(j){return new Float32Array(k(4*j),0,j)}a.mallocFloat32=a.mallocFloat=v;function z(j){return new Float64Array(k(8*j),0,j)}a.mallocFloat64=a.mallocDouble=z;function T(j){return f?new Uint8ClampedArray(k(j),0,j):E(j)}a.mallocUint8Clamped=T;function F(j){return c?new BigUint64Array(k(8*j),0,j):null}a.mallocBigUint64=F;function q(j){return h?new BigInt64Array(k(8*j),0,j):null}a.mallocBigInt64=q;function U(j){return new DataView(k(j),0,j)}a.mallocDataView=U;function H(j){j=s.nextPow2(j);var G=s.log2(j),O=x[G];return O.length>0?O.pop():new l(j)}a.mallocBuffer=H,a.clearCache=function(){for(var G=0;G<32;++G)d.UINT8[G].length=0,d.UINT16[G].length=0,d.UINT32[G].length=0,d.INT8[G].length=0,d.INT16[G].length=0,d.INT32[G].length=0,d.FLOAT[G].length=0,d.DOUBLE[G].length=0,d.BIGUINT64[G].length=0,d.BIGINT64[G].length=0,d.UINT8C[G].length=0,p[G].length=0,x[G].length=0}},1755:function(i){"use strict";"use restrict";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var u=0;u",W="",re=O.length,ne=W.length,be=H[0]===k||H[0]===L,ze=0,Ce=-ne;ze>-1&&(ze=j.indexOf(O,ze),!(ze===-1||(Ce=j.indexOf(W,ze+re),Ce===-1)||Ce<=ze));){for(var he=ze;he=Ce)G[he]=null,j=j.substr(0,he)+" "+j.substr(he+1);else if(G[he]!==null){var te=G[he].indexOf(H[0]);te===-1?G[he]+=H:be&&(G[he]=G[he].substr(0,te+1)+(1+parseInt(G[he][te+1]))+G[he].substr(te+2))}var ke=ze+re,Ee=j.substr(ke,Ce-ke),Me=Ee.indexOf(O);Me!==-1?ze=Me:ze=Ce+ne}return G}function M(U,H,j){for(var G=H.textAlign||"start",O=H.textBaseline||"alphabetic",W=[1<<30,1<<30],re=[0,0],ne=U.length,be=0;be/g,` +`):j=j.replace(/\/g," ");var re="",ne=[];for(me=0;me-1?parseInt(Te[1+ct]):0,tt=rt>-1?parseInt(nt[1+rt]):0;je!==tt&&(ut=ut.replace(Qe(),"?px "),Ze*=Math.pow(.75,tt-je),ut=ut.replace("?px ",Qe())),fe+=.25*te*(tt-je)}if(W.superscripts===!0){var Je=Te.indexOf(k),Mt=nt.indexOf(k),Vt=Je>-1?parseInt(Te[1+Je]):0,Kt=Mt>-1?parseInt(nt[1+Mt]):0;Vt!==Kt&&(ut=ut.replace(Qe(),"?px "),Ze*=Math.pow(.75,Kt-Vt),ut=ut.replace("?px ",Qe())),fe-=.25*te*(Kt-Vt)}if(W.bolds===!0){var ir=Te.indexOf(p)>-1,fr=nt.indexOf(p)>-1;!ir&&fr&&(Ot?ut=ut.replace("italic ","italic bold "):ut="bold "+ut),ir&&!fr&&(ut=ut.replace("bold ",""))}if(W.italics===!0){var Ot=Te.indexOf(b)>-1,De=nt.indexOf(b)>-1;!Ot&&De&&(ut="italic "+ut),Ot&&!De&&(ut=ut.replace("italic ",""))}H.font=ut}for(Re=0;Re0&&(O=G.size),G.lineSpacing&&G.lineSpacing>0&&(W=G.lineSpacing),G.styletags&&G.styletags.breaklines&&(re.breaklines=!!G.styletags.breaklines),G.styletags&&G.styletags.bolds&&(re.bolds=!!G.styletags.bolds),G.styletags&&G.styletags.italics&&(re.italics=!!G.styletags.italics),G.styletags&&G.styletags.subscripts&&(re.subscripts=!!G.styletags.subscripts),G.styletags&&G.styletags.superscripts&&(re.superscripts=!!G.styletags.superscripts)),j.font=[G.fontStyle,G.fontVariant,G.fontWeight,O+"px",G.font].filter(function(be){return be}).join(" "),j.textAlign="start",j.textBaseline="alphabetic",j.direction="ltr";var ne=v(H,j,U,O,W,re);return F(ne,G,O)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(T){T.permitHostObjects___&&T.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var u=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var l=new u,f=Object.freeze({});if(l.set(f,1),l.get(f)!==1)s=!0;else{i.exports=WeakMap;return}}}var c=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,p=Object.isExtensible,x="weakmap:",b=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),k=new Uint8Array(y);crypto.getRandomValues(k),b=x+"rand:"+Array.prototype.map.call(k,function(T){return(T%36).toString(36)}).join("")+"___"}function E(T){return!(T.substr(0,x.length)==x&&T.substr(T.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(F){return h(F).filter(E)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(F){return A(F).filter(E)}})}function L(T){if(T!==Object(T))throw new TypeError("Not an object: "+T);var F=T[b];if(F&&F.key===T)return F;if(p(T)){F={key:T};try{return d(T,b,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch(q){return}}}(function(){var T=Object.freeze;d(Object,"freeze",{value:function(H){return L(H),T(H)}});var F=Object.seal;d(Object,"seal",{value:function(H){return L(H),F(H)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(H){return L(H),q(H)}})})();function _(T){return T.prototype=null,Object.freeze(T)}var C=!1;function M(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var v=0,z=function(){this instanceof z||M();var T=[],F=[],q=v++;function U(O,W){var re,ne=L(O);return ne?q in ne?ne[q]:W:(re=T.indexOf(O),re>=0?F[re]:W)}function H(O){var W=L(O);return W?q in W:T.indexOf(O)>=0}function j(O,W){var re,ne=L(O);return ne?ne[q]=W:(re=T.indexOf(O),re>=0?F[re]=W:(re=T.length,F[re]=W,T[re]=O)),this}function G(O){var W=L(O),re,ne;return W?q in W&&delete W[q]:(re=T.indexOf(O),re<0?!1:(ne=T.length-1,T[re]=void 0,F[re]=F[ne],T[re]=T[ne],T.length=ne,F.length=ne,!0))}return Object.create(z.prototype,{get___:{value:_(U)},has___:{value:_(H)},set___:{value:_(j)},delete___:{value:_(G)}})};z.prototype=Object.create(Object.prototype,{get:{value:function(F,q){return this.get___(F,q)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,q){return this.set___(F,q)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof u=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function T(){this instanceof z||M();var F=new u,q=void 0,U=!1;function H(W,re){return q?F.has(W)?F.get(W):q.get___(W,re):F.get(W,re)}function j(W){return F.has(W)||(q?q.has___(W):!1)}var G;s?G=function(W,re){return F.set(W,re),F.has(W)||(q||(q=new z),q.set(W,re)),this}:G=function(W,re){if(U)try{F.set(W,re)}catch(ne){q||(q=new z),q.set___(W,re)}else F.set(W,re);return this};function O(W){var re=!!F.delete(W);return q&&q.delete___(W)||re}return Object.create(z.prototype,{get___:{value:_(H)},has___:{value:_(j)},set___:{value:_(G)},delete___:{value:_(O)},permitHostObjects___:{value:_(function(W){if(W===o)U=!0;else throw new Error("bogus call to permitHostObjects___")})}})}T.prototype=z.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=z)})()},236:function(i,a,o){var s=o(8284);i.exports=u;function u(){var l={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(l);return c&&c.identity===l?c:s(f,l)}}},8284:function(i){i.exports=a;function a(o,s){var u={identity:s},l=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(f){return f!==s?l.apply(this,arguments):u},writable:!0}),u}},606:function(i,a,o){var s=o(236);i.exports=u;function u(){var l=s();return{get:function(f,c){var h=l(f);return h.hasOwnProperty("value")?h.value:c},set:function(f,c){return l(f).value=c,this},has:function(f){return"value"in l(f)},delete:function(f){return delete l(f).value}}}},3349:function(i){"use strict";function a(){return function(c,h,d,p,x,b){var y=c[0],k=d[0],E=[0],A=k;p|=0;var L=0,_=k;for(L=0;L=0!=M>=0&&x.push(E[0]+.5+.5*(C+M)/(C-M))}p+=_,++E[0]}}}function o(){return a()}var s=o;function u(c){var h={};return function(p,x,b){var y=p.dtype,k=p.order,E=[y,k.join()].join(),A=h[E];return A||(h[E]=A=c([y,k])),A(p.shape.slice(0),p.data,p.stride,p.offset|0,x,b)}}function l(c){return u(s.bind(void 0,c))}function f(c){return l({funcName:c.funcName})}i.exports=f({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=u;var s=o(3349);function u(l,f){var c=[];return f=+f||0,s(l.hi(l.shape[0]-1),c,f),c}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);gze.exports=n})()});var xze=Se((_vr,_ze)=>{"use strict";_ze.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 Aze=Se((xvr,Tze)=>{"use strict";var bze=xze();Tze.exports=Ozt;var wze={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Ozt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),bze[e])r=bze[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 u=t[1],l=u==="rgb",a=u.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(wze[h]!==void 0)return wze[h]}return parseFloat(h)}),u===a&&r.push(1),n=l||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(f){return parseFloat(f)}),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 Mze=Se((bvr,Sze)=>{"use strict";Sze.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var kze=Se((wvr,Eze)=>{"use strict";var Nzt=Mze();Eze.exports={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,u;if(r===0)return u=n*255,[u,u,u];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,s=[0,0,0];for(var l=0;l<3;l++)o=t+1/3*-(l-1),o<0?o++:o>1&&o--,6*o<1?u=i+(a-i)*6*o:2*o<1?u=a:3*o<2?u=i+(a-i)*(2/3-o)*6:u=i,s[l]=u*255;return s}};Nzt.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,u,l;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),l=(i+a)/2,a===i?u=0:l<=.5?u=o/(a+i):u=o/(2-a-i),[s,u*100,l*100]}});var BA=Se((Tvr,Cze)=>{Cze.exports=Uzt;function Uzt(e,t,r){return tr?r:e:et?t:e}});var hZ=Se((Avr,Lze)=>{"use strict";var Vzt=Aze(),Hzt=kze(),VR=BA();Lze.exports=function(t){var r,n,i,a=Vzt(t);return a.space?(r=Array(3),r[0]=VR(a.values[0],0,255),r[1]=VR(a.values[1],0,255),r[2]=VR(a.values[2],0,255),a.space[0]==="h"&&(r=Hzt.rgb(r)),r.push(VR(a.alpha,0,1)),r):[]}});var HR=Se((Svr,zze)=>{zze.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_=Se((Mvr,Pze)=>{"use strict";var Gzt=hZ(),GR=BA(),Wzt=HR();Pze.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=Wzt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=Gzt(t),t[0]/=255,t[1]/=255,t[2]/=255),jzt(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]=GR(Math.floor(t[0]*255),0,255),i[1]=GR(Math.floor(t[1]*255),0,255),i[2]=GR(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:GR(Math.floor(t[3]*255),0,255)),i)};function jzt(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 Jg=Se((Evr,Ize)=>{"use strict";var Zzt=J_();function Xzt(e){return e?Zzt(e):[0,0,0,1]}Ize.exports=Xzt});var $g=Se((kvr,Nze)=>{"use strict";var Bze=_u(),Yzt=cd(),WR=J_(),jR=fc(),Kzt=Ih().defaultLine,Dze=yp().isArrayOrTypedArray,dZ=WR(Kzt),Oze=1;function Rze(e,t){var r=e;return r[3]*=t,r}function Fze(e){if(Bze(e))return dZ;var t=WR(e);return t.length?t:dZ}function qze(e){return Bze(e)?e:Oze}function Jzt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=Dze(n),a=Dze(t),o=jR.extractOpts(e),s=[],u,l,f,c,h;if(o.colorscale!==void 0?u=jR.makeColorScaleFuncFromTrace(e):u=Fze,i?l=function(p,x){return p[x]===void 0?dZ:WR(u(p[x]))}:l=Fze,a?f=function(p,x){return p[x]===void 0?Oze:qze(p[x])}:f=qze,i||a)for(var d=0;d{"use strict";Uze.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 ZR=Se((Lvr,Vze)=>{"use strict";Vze.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var Gze=Se((zvr,Hze)=>{"use strict";var Qzt=Ul();function vZ(e,t,r,n){if(!t||!t.visible)return null;for(var i=Qzt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var c=n.c2l(l);n._lowerLogErrorBound||(n._lowerLogErrorBound=c),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,c)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function ePt(e){for(var t=0;t{"use strict";var rPt=Od().gl_line3d,Wze=Od().gl_scatter3d,iPt=Od().gl_error3d,nPt=Od().gl_mesh3d,aPt=Od().delaunay_triangulate,Qg=Zr(),Kze=Jg(),XR=$g().formatColor,oPt=S3(),yZ=pZ(),sPt=ZR(),lPt=hu(),uPt=rv().appendArrayPointValue,fPt=Gze();function Jze(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 gZ=Jze.prototype;gZ.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&&(Qg.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 cPt(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 Zze(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function dPt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var l=cPt(s.position,s.delaunayColor,s.delaunayAxis);l.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(l):(l.gl=t,this.delaunayMesh=nPt(l),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)};gZ.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 mPt(e,t){var r=new Jze(e,t.uid);return r.update(t),r}$ze.exports=mPt});var TZ=Se((Ivr,rPe)=>{"use strict";var e1=Zc(),gPt=uc(),wZ=Xf(),_Z=Gc().axisHoverFormat,_Pt=Du().hovertemplateAttrs,xPt=Du().texttemplateAttrs,ePe=zf(),bPt=pZ(),wPt=ZR(),Yy=vu().extendFlat,TPt=_c().overrideAll,tPe=X1(),APt=e1.line,N2=e1.marker,SPt=N2.line,MPt=Yy({width:APt.width,dash:{valType:"enumerated",values:tPe(bPt),dflt:"solid"}},wZ("line"));function xZ(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 bZ=rPe.exports=TPt({x:e1.x,y:e1.y,z:{valType:"data_array"},text:Yy({},e1.text,{}),texttemplate:xPt({},{}),hovertext:Yy({},e1.hovertext,{}),hovertemplate:_Pt(),xhoverformat:_Z("x"),yhoverformat:_Z("y"),zhoverformat:_Z("z"),mode:Yy({},e1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:xZ("x"),y:xZ("y"),z:xZ("z")},connectgaps:e1.connectgaps,line:MPt,marker:Yy({symbol:{valType:"enumerated",values:tPe(wPt),dflt:"circle",arrayOk:!0},size:Yy({},N2.size,{dflt:8}),sizeref:N2.sizeref,sizemin:N2.sizemin,sizemode:N2.sizemode,opacity:Yy({},N2.opacity,{arrayOk:!1}),colorbar:N2.colorbar,line:Yy({width:Yy({},SPt.width,{arrayOk:!1})},wZ("marker.line"))},wZ("marker")),textposition:Yy({},e1.textposition,{dflt:"top center"}),textfont:gPt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:ePe.opacity,hoverinfo:Yy({},ePe.hoverinfo)},"calc","nested");bZ.x.editType=bZ.y.editType=bZ.z.editType="calc+clearAxisTypes"});var aPe=Se((Dvr,nPe)=>{"use strict";var iPe=Ul(),EPt=Zr(),AZ=ec(),kPt=$v(),CPt=I0(),LPt=D0(),zPt=TZ();nPe.exports=function(t,r,n,i){function a(d,p){return EPt.coerce(t,r,zPt,d,p)}var o=PPt(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),AZ.hasMarkers(r)&&kPt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),AZ.hasLines(r)&&(a("connectgaps"),CPt(t,r,n,i,a)),AZ.hasText(r)&&(a("texttemplate"),LPt(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,u=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||u);for(var l=["x","y","z"],f=0;f<3;++f){var c="projection."+l[f];a(c+".show")&&(a(c+".opacity"),a(c+".scale"))}var h=iPe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||u||n,{axis:"z"}),h(t,r,s||u||n,{axis:"y",inherit:"z"}),h(t,r,s||u||n,{axis:"x",inherit:"z"})};function PPt(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),u=iPe.getComponentMethod("calendars","handleTraceDefaults");return u(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 sPe=Se((Rvr,oPe)=>{"use strict";var IPt=km(),DPt=R0();oPe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return IPt(n,r),DPt(t,r),n}});var uPe=Se((Fvr,lPe)=>{lPe.exports=RPt;function RPt(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 FPt=uPe();fPe.exports=function(t){return FPt("webgl",t)}});var SZ=Se((Bvr,dPe)=>{"use strict";var hPe=Pl(),qPt=function(){};dPe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=qPt);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=hPe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=hPe.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 yPe=Se((Ovr,vPe)=>{"use strict";var U2=Jg(),BPt=Zr(),OPt=["xaxis","yaxis","zaxis"];function pPe(){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 NPt=pPe.prototype;NPt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[OPt[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?BPt.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=U2(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]=U2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=U2(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]=U2(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]=U2(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]=U2(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]=U2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function UPt(e,t){var r=new pPe;return r.merge(e,t),r}vPe.exports=UPt});var _Pe=Se((Nvr,gPe)=>{"use strict";var VPt=Jg(),HPt=["xaxis","yaxis","zaxis"];function mPe(){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 GPt=mPe.prototype;GPt.merge=function(e){for(var t=0;t<3;++t){var r=e[HPt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=VPt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function WPt(e){var t=new mPe;return t.merge(e),t}gPe.exports=WPt});var wPe=Se((Uvr,bPe)=>{"use strict";bPe.exports=KPt;var xPe=hu(),jPt=Zr(),ZPt=["xaxis","yaxis","zaxis"],XPt=[0,0,0];function YPt(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]=l,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){XPt[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var f=0;f<2;++f)t.bounds[f][a]=e.glplot.bounds[f][a]}e.contourLevels=YPt(i)}});var CPe=Se((Vvr,kPe)=>{"use strict";var SPe=Od().gl_plot3d,JPt=SPe.createCamera,TPe=SPe.createScene,$Pt=cPe(),QPt=Ez(),JR=Ul(),uv=Zr(),KR=uv.preserveDrawingBuffer(),$R=hu(),Ky=jc(),eIt=Jg(),tIt=SZ(),rIt=GU(),iIt=yPe(),nIt=_Pe(),aIt=wPe(),oIt=wy().applyAutorangeOptions,VE,YR,MPe=!1;function EPe(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=iIt(t,t[this.id]),this.spikeOptions=nIt(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=JR.getComponentMethod("annotations3d","convert"),this.drawAnnotations=JR.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Ap=EPe.prototype;Ap.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:KR,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(!YR&&(VE=document.createElement("canvas"),YR=$Pt({canvas:VE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!YR))throw new Error("error creating static canvas/context for image server");t.gl=YR,t.canvas=VE}return t};var APe=!0;Ap.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=TPe(t)}catch(n){if(e.staticMode||!APe||KR)r=!1;else{uv.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{KR=t.glOptions.preserveDrawingBuffer=!0,e.glplot=TPe(t)}catch(i){KR=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return APe=!1,r};Ap.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=JPt(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"})};Ap.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return tIt(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(){MPe=!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,u=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*u.x,y:s*u.y,z:s*u.z})}a(e)}},QPt?{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};Ap.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,u=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+u),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",u),aIt(e),e.glplot.axes.update(e.axesOptions);for(var l=Object.keys(e.traces),f=null,c=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=$R.hoverLabelText(e._mockAxis,e._mockAxis.d2l(c.traceCoordinate[3]),r.valuehoverformat),_.push("value: "+y.valueLabel),c.textLabel&&_.push(c.textLabel),L=_.join("
")):L=c.textLabel;var C={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:b};Ky.appendArrayPointValue(C,x,b),r._module.eventData&&(C=x._module.eventData(C,c,x,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var v=[];Ky.loneHover({trace:x,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*u,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:f.name,color:Ky.castHoverOption(x,b,"bgcolor")||f.color,borderColor:Ky.castHoverOption(x,b,"bordercolor"),fontFamily:Ky.castHoverOption(x,b,"font.family"),fontSize:Ky.castHoverOption(x,b,"font.size"),fontColor:Ky.castHoverOption(x,b,"font.color"),nameLength:Ky.castHoverOption(x,b,"namelength"),textAlign:Ky.castHoverOption(x,b,"align"),hovertemplate:uv.castOption(x,b,"hovertemplate"),hovertemplateLabels:uv.extendFlat({},C,y),eventData:[C]},{container:n,gd:t,inOut_bbox:v}),C.bbox=v[0]}c.distance<5&&(c.buttons||MPe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Ky.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Ap.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){uv.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var HE=["xaxis","yaxis","zaxis"];function sIt(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=HE[i],o=a.charAt(0),s=n[a],u=t[o],l=t[o+"calendar"],f=t["_"+o+"length"];if(!uv.isArrayOrTypedArray(u))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],f-1);else for(var c,h=0;h<(f||u.length);h++)if(uv.isArrayOrTypedArray(u[h]))for(var d=0;dx[1][o])x[0][o]=-1,x[1][o]=1;else{var T=x[1][o]-x[0][o];x[0][o]-=T/32,x[1][o]+=T/32}if(k=[x[0][o],x[1][o]],k=oIt(k,u),x[0][o]=k[0],x[1][o]=k[1],u.isReversed()){var F=x[0][o];x[0][o]=x[1][o],x[1][o]=F}}else k=u.range,x[0][o]=u.r2l(k[0]),x[1][o]=u.r2l(k[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),b[o]=x[1][o]-x[0][o],u.range=[x[0][o],x[1][o]],u.limitRange(),n.glplot.setBounds(o,{min:u.range[0]*d[o],max:u.range[1]*d[o]})}var q,U=f.aspectmode;if(U==="cube")q=[1,1,1];else if(U==="manual"){var H=f.aspectratio;q=[H.x,H.y,H.z]}else if(U==="auto"||U==="data"){var j=[1,1,1];for(o=0;o<3;++o){u=f[HE[o]],l=u.type;var G=y[l];j[o]=Math.pow(G.acc,1/G.count)/d[o]}U==="data"||Math.max.apply(null,j)/Math.min.apply(null,j)<=4?q=j:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");f.aspectratio.x=c.aspectratio.x=q[0],f.aspectratio.y=c.aspectratio.y=q[1],f.aspectratio.z=c.aspectratio.z=q[2],n.glplot.setAspectratio(f.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:f.aspectratio.x,y:f.aspectratio.y,z:f.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=f.aspectmode);var O=f.domain||null,W=t._size||null;if(O&&W){var re=n.container.style;re.position="absolute",re.left=W.l+O.x[0]*W.w+"px",re.top=W.t+(1-O.y[1])*W.h+"px",re.width=W.w*(O.x[1]-O.x[0])+"px",re.height=W.h*(O.y[1]-O.y[0])+"px"}n.glplot.redraw()}};Ap.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 uIt(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 fIt(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"}}}Ap.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),fIt(e.camera)};Ap.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,uIt(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())};Ap.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=uv.nestedProperty(e,t.id+".camera"),i=n.get();function a(l,f,c,h){var d=["up","center","eye"],p=["x","y","z"];return f[d[c]]&&l[d[c]][p[h]]===f[d[c]][p[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var u=0;u<3;u++)if(!a(r,i,s,u)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Ap.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=uv.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Ap.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,u,l=t.isCameraChanged(e),f=t.isAspectChanged(e),c=l||f;if(c){var h={};if(l&&(n=t.getCamera(),i=uv.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),f&&(o=t.glplot.getAspectratio(),s=uv.nestedProperty(e,t.id+".aspectratio"),u=s.get(),h[t.id+".aspectratio"]=u),JR.call("_storeDirectGUIEdit",e,r._preGUI,h),l){i.set(n);var d=uv.nestedProperty(r,t.id+".camera");d.set(n)}if(f){s.set(o);var p=uv.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return c};Ap.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,u=o.up.y,l=o.up.z;if(l/Math.sqrt(s*s+u*u+l*l)<.999){var f=r.id+".camera.up",c={x:0,y:0,z:1},h={};h[f]=c;var d=i.layout;JR.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=c,uv.nestedProperty(d,f).set(c)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function cIt(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,u=0;u<3;++u)e[a+u]=Math.min(s*e[a+u],255)}}Ap.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(VE),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),cIt(a,n,i),hIt(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),u=s.createImageData(n,i);u.data.set(a),s.putImageData(u,0,0);var l;switch(e){case"jpeg":l=o.toDataURL("image/jpeg");break;case"webp":l=o.toDataURL("image/webp");break;default:l=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(VE),l};Ap.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[HE[t]];$R.setConvert(r,e.fullLayout),r.setScale=uv.noop}};Ap.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},$R.setConvert(e._mockAxis,r)};kPe.exports=EPe});var zPe=Se((Hvr,LPe)=>{"use strict";LPe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var EZ=Se((Gvr,PPe)=>{"use strict";var dIt=Pl(),ef=Rd(),MZ=vu().extendFlat,pIt=_c().overrideAll;PPe.exports=pIt({visible:ef.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:dIt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:ef.color,categoryorder:ef.categoryorder,categoryarray:ef.categoryarray,title:{text:ef.title.text,font:ef.title.font},type:MZ({},ef.type,{values:["-","linear","log","date","category"]}),autotypenumbers:ef.autotypenumbers,autorange:ef.autorange,autorangeoptions:{minallowed:ef.autorangeoptions.minallowed,maxallowed:ef.autorangeoptions.maxallowed,clipmin:ef.autorangeoptions.clipmin,clipmax:ef.autorangeoptions.clipmax,include:ef.autorangeoptions.include,editType:"plot"},rangemode:ef.rangemode,minallowed:ef.minallowed,maxallowed:ef.maxallowed,range:MZ({},ef.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:ef.minor.tickmode,nticks:ef.nticks,tick0:ef.tick0,dtick:ef.dtick,tickvals:ef.tickvals,ticktext:ef.ticktext,ticks:ef.ticks,mirror:ef.mirror,ticklen:ef.ticklen,tickwidth:ef.tickwidth,tickcolor:ef.tickcolor,showticklabels:ef.showticklabels,labelalias:ef.labelalias,tickfont:ef.tickfont,tickangle:ef.tickangle,tickprefix:ef.tickprefix,showtickprefix:ef.showtickprefix,ticksuffix:ef.ticksuffix,showticksuffix:ef.showticksuffix,showexponent:ef.showexponent,exponentformat:ef.exponentformat,minexponent:ef.minexponent,separatethousands:ef.separatethousands,tickformat:ef.tickformat,tickformatstops:ef.tickformatstops,hoverformat:ef.hoverformat,showline:ef.showline,linecolor:ef.linecolor,linewidth:ef.linewidth,showgrid:ef.showgrid,gridcolor:MZ({},ef.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:ef.gridwidth,zeroline:ef.zeroline,zerolinecolor:ef.zerolinecolor,zerolinewidth:ef.zerolinewidth},"plot","from-root")});var zZ=Se((Wvr,IPe)=>{"use strict";var kZ=EZ(),vIt=Ec().attributes,CZ=vu().extendFlat,yIt=Zr().counterRegex;function LZ(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"}}IPe.exports={_arrayAttrRegexps:[yIt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:CZ(LZ(0,0,1),{}),center:CZ(LZ(0,0,0),{}),eye:CZ(LZ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:vIt({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:kZ,yaxis:kZ,zaxis:kZ,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 qPe=Se((jvr,FPe)=>{"use strict";var mIt=cd().mix,DPe=Zr(),gIt=_f(),_It=EZ(),xIt=kU(),bIt=J5(),RPe=["xaxis","yaxis","zaxis"],wIt=100*136/187;FPe.exports=function(t,r,n){var i,a;function o(l,f){return DPe.coerce(i,a,_It,l,f)}for(var s=0;s{"use strict";var TIt=Zr(),AIt=Pl(),SIt=Ul(),MIt=k_(),EIt=qPe(),BPe=zZ(),kIt=Dd().getSubplotData,OPe="gl3d";NPe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=TIt.validate(t[o],BPe[o]);if(s)return t[o]}}MIt(t,r,n,{type:OPe,attributes:BPe,handleDefaults:CIt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function CIt(e,t,r,n){for(var i=r("bgcolor"),a=AIt.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 $_=Se(fv=>{"use strict";var LIt=_c().overrideAll,zIt=O1(),PIt=CPe(),IIt=Dd().getSubplotData,DIt=Zr(),RIt=Zv(),OA="gl3d",PZ="scene";fv.name=OA;fv.attr=PZ;fv.idRoot=PZ;fv.idRegex=fv.attrRegex=DIt.counterRegex("scene");fv.attributes=zPe();fv.layoutAttributes=zZ();fv.baseLayoutAttrOverrides=LIt({hoverlabel:zIt.hoverlabel},"plot","nested");fv.supplyLayoutDefaults=UPe();fv.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[OA],a=0;a{"use strict";VPe.exports={plot:Qze(),attributes:TZ(),markerSymbols:ZR(),supplyDefaults:aPe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:sPe(),moduleType:"trace",name:"scatter3d",basePlotModule:$_(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var WPe=Se((Kvr,GPe)=>{"use strict";GPe.exports=HPe()});var GE=Se((Jvr,XPe)=>{"use strict";var jPe=Pl(),FIt=Xf(),IZ=Gc().axisHoverFormat,qIt=Du().hovertemplateAttrs,ZPe=zf(),DZ=vu().extendFlat,BIt=_c().overrideAll;function RZ(e){return{valType:"boolean",dflt:!1}}function FZ(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:RZ("x"),y:RZ("y"),z:RZ("z")},color:{valType:"color",dflt:jPe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:jPe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var qZ=XPe.exports=BIt(DZ({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:qIt(),xhoverformat:IZ("x"),yhoverformat:IZ("y"),zhoverformat:IZ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},FIt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:FZ("x"),y:FZ("y"),z:FZ("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:DZ({},ZPe.hoverinfo),showlegend:DZ({},ZPe.showlegend,{dflt:!1})}),"calc","nested");qZ.x.editType=qZ.y.editType=qZ.z.editType="calc+clearAxisTypes"});var OZ=Se(($vr,JPe)=>{"use strict";var OIt=Ul(),YPe=Zr(),NIt=ed(),UIt=GE(),BZ=.1;function VIt(e,t){for(var r=[],n=32,i=0;i{"use strict";var $Pe=Rp();QPe.exports=function(t,r){r.surfacecolor?$Pe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):$Pe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var oIe=Se((e0r,aIe)=>{"use strict";var WIt=Od().gl_surface3d,NA=Od().ndarray,jIt=Od().ndarray_linear_interpolate.d2,ZIt=QI(),XIt=eD(),WE=Zr().isArrayOrTypedArray,YIt=$g().parseColorScale,tIe=Jg(),KIt=fc().extractOpts;function iIe(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 Jy=iIe.prototype;Jy.getXat=function(e,t,r,n){var i=WE(this.data.x)?WE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};Jy.getYat=function(e,t,r,n){var i=WE(this.data.y)?WE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};Jy.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)};Jy.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 WE(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 JIt(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 UA=[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 $It(e,t){if(e0){r=UA[n];break}return r}function eDt(e,t){if(!(e<1||t<1)){for(var r=NZ(e),n=NZ(t),i=1,a=0;aQR;)n--,n/=QIt(n),n++,n1?i:1};function rDt(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 iDt(e,t,r){return nDt(e,t,rDt,r),e}function nDt(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[l]=h),this.maxValues[l]{"use strict";sIe.exports={attributes:GE(),supplyDefaults:OZ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:eIe(),plot:oIe(),moduleType:"trace",name:"surface",basePlotModule:$_(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var fIe=Se((r0r,uIe)=>{"use strict";uIe.exports=lIe()});var VA=Se((i0r,hIe)=>{"use strict";var sDt=Xf(),UZ=Gc().axisHoverFormat,lDt=Du().hovertemplateAttrs,Q_=GE(),cIe=zf(),ex=vu().extendFlat;hIe.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:lDt({editType:"calc"}),xhoverformat:UZ("x"),yhoverformat:UZ("y"),zhoverformat:UZ("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"}},sDt("",{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"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},Q_.lighting),hoverinfo:ex({},cIe.hoverinfo,{editType:"calc"}),showlegend:ex({},cIe.showlegend,{dflt:!1})})});var tF=Se((n0r,pIe)=>{"use strict";var uDt=Xf(),eF=Gc().axisHoverFormat,fDt=Du().hovertemplateAttrs,jE=VA(),dIe=zf(),VZ=vu().extendFlat,cDt=_c().overrideAll;function HZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function GZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var HA=pIe.exports=cDt(VZ({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:HZ("x"),y:HZ("y"),z:HZ("z")},caps:{x:GZ("x"),y:GZ("y"),z:GZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:fDt(),xhoverformat:eF("x"),yhoverformat:eF("y"),zhoverformat:eF("z"),valuehoverformat:eF("value",1),showlegend:VZ({},dIe.showlegend,{dflt:!1})},uDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:jE.opacity,lightposition:jE.lightposition,lighting:jE.lighting,flatshading:jE.flatshading,contour:jE.contour,hoverinfo:VZ({},dIe.hoverinfo)}),"calc","nested");HA.flatshading.dflt=!0;HA.lighting.facenormalsepsilon.dflt=0;HA.x.editType=HA.y.editType=HA.z.editType=HA.value.editType="calc+clearAxisTypes"});var WZ=Se((a0r,yIe)=>{"use strict";var hDt=Zr(),dDt=Ul(),pDt=tF(),vDt=ed();function yDt(e,t,r,n){function i(a,o){return hDt.coerce(e,t,pDt,a,o)}vIe(e,t,r,n,i)}function vIe(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"),u=i("y"),l=i("z"),f=i("value");if(!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length){t.visible=!1;return}var c=dDt.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(x){i(x+"hoverformat");var b="caps."+x,y=i(b+".show");y&&i(b+".fill");var k="slices."+x,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 p=i("contour.show");p&&(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(x){i(x)}),vDt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}yIe.exports={supplyDefaults:yDt,supplyIsoDefaults:vIe}});var rF=Se((o0r,gIe)=>{"use strict";var ZZ=Zr(),mDt=Rp();function gDt(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=Gm(t.u,t._len),t._v=Gm(t.v,t._len),t._w=Gm(t.w,t._len),t._x=Gm(t.x,t._len),t._y=Gm(t.y,t._len),t._z=Gm(t.z,t._len);var r=mIe(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=Gm(t.starts.x||[]),a=Gm(t.starts.y||[]),o=Gm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,u=1/0,l;for(l=0;l1&&(E=t[i-1],L=r[i-1],C=n[i-1]),a=0;aE?"-":"+")+"x"),p=p.replace("y",(A>L?"-":"+")+"y"),p=p.replace("z",(_>C?"-":"+")+"z");var T=function(){i=0,M=[],v=[],z=[]};(!i||i{"use strict";var _Dt=Rp(),xDt=rF().processGrid,iF=rF().filter;_Ie.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=iF(r.x,r._len),r._y=iF(r.y,r._len),r._z=iF(r.z,r._len),r._value=iF(r.value,r._len);var n=xDt(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";xIe.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var bDt=Od().gl_mesh3d,wDt=$g().parseColorScale,TDt=Zr().isArrayOrTypedArray,ADt=Jg(),SDt=fc().extractOpts,bIe=GA(),ZE=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 ne(ut,ct){return ut===null?ct:ut}function be(ut,ct,rt){T();var je=[ct],tt=[rt];if(G>=1)je=[ct],tt=[rt];else if(G>0){var Je=W(ct,rt);je=Je.xyzv,tt=Je.abc}for(var Mt=0;Mt-1?rt[Kt]:z(ir,fr,Ot);_e>-1?Vt[Kt]=_e:Vt[Kt]=q(ir,fr,Ot,ne(ut,De))}U(Vt[0],Vt[1],Vt[2])}}function ze(ut,ct,rt){var je=function(tt,Je,Mt){be(ut,[ct[tt],ct[Je],ct[Mt]],[rt[tt],rt[Je],rt[Mt]])};je(0,1,2),je(2,3,0)}function Ce(ut,ct,rt){var je=function(tt,Je,Mt){be(ut,[ct[tt],ct[Je],ct[Mt]],[rt[tt],rt[Je],rt[Mt]])};je(0,1,2),je(3,0,1),je(2,3,0),je(1,2,3)}function he(ut,ct,rt,je){var tt=ut[3];ttje&&(tt=je);for(var Je=(ut[3]-tt)/(ut[3]-ct[3]+1e-9),Mt=[],Vt=0;Vt<4;Vt++)Mt[Vt]=(1-Je)*ut[Vt]+Je*ct[Vt];return Mt}function te(ut,ct,rt){return ut>=ct&&ut<=rt}function ke(ut){var ct=.001*(L-A);return ut>=A-ct&&ut<=L+ct}function Ee(ut){for(var ct=[],rt=0;rt<4;rt++){var je=ut[rt];ct.push([e._x[je],e._y[je],e._z[je],e._value[je]])}return ct}var Me=3;function Oe(ut,ct,rt,je,tt,Je){Je||(Je=1),rt=[-1,-1,-1];var Mt=!1,Vt=[te(ct[0][3],je,tt),te(ct[1][3],je,tt),te(ct[2][3],je,tt)];if(!Vt[0]&&!Vt[1]&&!Vt[2])return!1;var Kt=function(fr,Ot,De){return ke(Ot[0][3])&&ke(Ot[1][3])&&ke(Ot[2][3])?(be(fr,Ot,De),!0):JeVt?[k,Je]:[Je,E];xt(ct,Kt[0],Kt[1])}}var ir=[[Math.min(A,E),Math.max(A,E)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(fr){for(var Ot=[],De=0;De0&&(ye.push(ht.id),fr==="x"?ue.push([ht.distRatio,0,0]):fr==="y"?ue.push([0,ht.distRatio,0]):ue.push([0,0,ht.distRatio]))}else fr==="x"?lt=At(1,d-1):fr==="y"?lt=At(1,p-1):lt=At(1,x-1);ye.length>0&&(fr==="x"?Ot[_e]=_t(ut,ye,Fe,Pe,ue,Ot[_e]):fr==="y"?Ot[_e]=Ct(ut,ye,Fe,Pe,ue,Ot[_e]):Ot[_e]=jt(ut,ye,Fe,Pe,ue,Ot[_e]),_e++),lt.length>0&&(fr==="x"?Ot[_e]=gt(ut,lt,Fe,Pe,Ot[_e]):fr==="y"?Ot[_e]=Pt(ut,lt,Fe,Pe,Ot[_e]):Ot[_e]=Qe(ut,lt,Fe,Pe,Ot[_e]),_e++)}var Et=e.caps[fr];Et.show&&Et.fill&&(O(Et.fill),fr==="x"?Ot[_e]=gt(ut,[0,d-1],Fe,Pe,Ot[_e]):fr==="y"?Ot[_e]=Pt(ut,[0,p-1],Fe,Pe,Ot[_e]):Ot[_e]=Qe(ut,[0,x-1],Fe,Pe,Ot[_e]),_e++)}}),s===0&&F(),e._meshX=_,e._meshY=C,e._meshZ=M,e._meshIntensity=v,e._Xs=f,e._Ys=c,e._Zs=h}return nt(),e}function EDt(e,t){var r=e.glplot.gl,n=bDt({gl:r}),i=new wIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}AIe.exports={findNearestOnAxis:ZE,generateIsoMeshes:TIe,createIsosurfaceTrace:EDt}});var MIe=Se((f0r,SIe)=>{"use strict";SIe.exports={attributes:tF(),supplyDefaults:WZ().supplyDefaults,calc:XZ(),colorbar:{min:"cmin",max:"cmax"},plot:nF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var kIe=Se((c0r,EIe)=>{"use strict";EIe.exports=MIe()});var JZ=Se((h0r,LIe)=>{"use strict";var kDt=Xf(),Nh=tF(),CDt=GE(),CIe=zf(),KZ=vu().extendFlat,LDt=_c().overrideAll,aF=LIe.exports=LDt(KZ({x:Nh.x,y:Nh.y,z:Nh.z,value:Nh.value,isomin:Nh.isomin,isomax:Nh.isomax,surface:Nh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Nh.slices,caps:Nh.caps,text:Nh.text,hovertext:Nh.hovertext,xhoverformat:Nh.xhoverformat,yhoverformat:Nh.yhoverformat,zhoverformat:Nh.zhoverformat,valuehoverformat:Nh.valuehoverformat,hovertemplate:Nh.hovertemplate},kDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Nh.colorbar,opacity:Nh.opacity,opacityscale:CDt.opacityscale,lightposition:Nh.lightposition,lighting:Nh.lighting,flatshading:Nh.flatshading,contour:Nh.contour,hoverinfo:KZ({},CIe.hoverinfo),showlegend:KZ({},CIe.showlegend,{dflt:!1})}),"calc","nested");aF.x.editType=aF.y.editType=aF.z.editType=aF.value.editType="calc+clearAxisTypes"});var PIe=Se((d0r,zIe)=>{"use strict";var zDt=Zr(),PDt=JZ(),IDt=WZ().supplyIsoDefaults,DDt=OZ().opacityscaleDefaults;zIe.exports=function(t,r,n,i){function a(o,s){return zDt.coerce(t,r,PDt,o,s)}IDt(t,r,n,i,a),DDt(t,r,i,a)}});var FIe=Se((p0r,RIe)=>{"use strict";var RDt=Od().gl_mesh3d,FDt=$g().parseColorScale,qDt=Zr().isArrayOrTypedArray,BDt=Jg(),ODt=fc().extractOpts,IIe=GA(),$Z=nF().findNearestOnAxis,NDt=nF().generateIsoMeshes;function DIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var QZ=DIe.prototype;QZ.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=$Z(r,this.data._Xs).id,u=$Z(n,this.data._Ys).id,l=$Z(i,this.data._Zs).id,f=e.index=l+o*u+o*a*s;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var c=this.data.hovertext||this.data.text;return qDt(c)&&c[f]!==void 0?e.textLabel=c[f]:c&&(e.textLabel=c),!0}};QZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=NDt(e);function n(u,l,f,c){return l.map(function(h){return u.d2l(h,0,c)*f})}var i=IIe(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=IIe(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:BDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=ODt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=FDt(e),this.mesh.update(o)};QZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function UDt(e,t){var r=e.glplot.gl,n=RDt({gl:r}),i=new DIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}RIe.exports=UDt});var BIe=Se((v0r,qIe)=>{"use strict";qIe.exports={attributes:JZ(),supplyDefaults:PIe(),calc:XZ(),colorbar:{min:"cmin",max:"cmax"},plot:FIe(),moduleType:"trace",name:"volume",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var NIe=Se((y0r,OIe)=>{"use strict";OIe.exports=BIe()});var HIe=Se((m0r,VIe)=>{"use strict";var VDt=Ul(),UIe=Zr(),HDt=ed(),GDt=VA();VIe.exports=function(t,r,n,i){function a(f,c){return UIe.coerce(t,r,GDt,f,c)}function o(f){var c=f.map(function(h){var d=a(h);return d&&UIe.isArrayOrTypedArray(d)?d:null});return c.every(function(h){return h&&h.length===c[0].length})&&c}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 u=VDt.getComponentMethod("calendars","handleTraceDefaults");u(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(f){a(f)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),HDt(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("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var WIe=Se((g0r,GIe)=>{"use strict";var WDt=Rp();GIe.exports=function(t,r){r.intensity&&WDt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var KIe=Se((_0r,YIe)=>{"use strict";var jDt=Od().gl_mesh3d,ZDt=Od().delaunay_triangulate,XDt=Od().alpha_shape,YDt=Od().convex_hull,KDt=$g().parseColorScale,JDt=Zr().isArrayOrTypedArray,iX=Jg(),$Dt=fc().extractOpts,jIe=GA();function XIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var nX=XIe.prototype;nX.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 JDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function ZIe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}nX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=jIe(eX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),eX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),eX(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||!rX(e.i,n)||!rX(e.j,n)||!rX(e.k,n))return;a=jIe(tX(e.i),tX(e.j),tX(e.k))}else e.alphahull===0?a=YDt(i):e.alphahull>0?a=XDt(e.alphahull,i):a=QDt(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:iX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=$Dt(e);this.color="#fff";var u=e.intensitymode;o[u+"Intensity"]=e.intensity,o[u+"IntensityBounds"]=[s.min,s.max],o.colormap=KDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=ZIe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=ZIe(e.facecolor)):(this.color=e.color,o.meshColor=iX(e.color));this.mesh.update(o)};nX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function e6t(e,t){var r=e.glplot.gl,n=jDt({gl:r}),i=new XIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}YIe.exports=e6t});var $Ie=Se((x0r,JIe)=>{"use strict";JIe.exports={attributes:VA(),supplyDefaults:HIe(),calc:WIe(),colorbar:{min:"cmin",max:"cmax"},plot:KIe(),moduleType:"trace",name:"mesh3d",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var eDe=Se((b0r,QIe)=>{"use strict";QIe.exports=$Ie()});var oX=Se((w0r,rDe)=>{"use strict";var t6t=Xf(),WA=Gc().axisHoverFormat,r6t=Du().hovertemplateAttrs,i6t=VA(),tDe=zf(),aX=vu().extendFlat,oF={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:r6t({editType:"calc"},{keys:["norm"]}),uhoverformat:WA("u",1),vhoverformat:WA("v",1),whoverformat:WA("w",1),xhoverformat:WA("x"),yhoverformat:WA("y"),zhoverformat:WA("z"),showlegend:aX({},tDe.showlegend,{dflt:!1})};aX(oF,t6t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var n6t=["opacity","lightposition","lighting"];n6t.forEach(function(e){oF[e]=i6t[e]});oF.hoverinfo=aX({},tDe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});rDe.exports=oF});var nDe=Se((T0r,iDe)=>{"use strict";var a6t=Zr(),o6t=ed(),s6t=oX();iDe.exports=function(t,r,n,i){function a(d,p){return a6t.coerce(t,r,s6t,d,p)}var o=a("u"),s=a("v"),u=a("w"),l=a("x"),f=a("y"),c=a("z");if(!o||!o.length||!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length||!c||!c.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"),o6t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var oDe=Se((A0r,aDe)=>{"use strict";var l6t=Rp();aDe.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,u=1/0,l=0;l{"use strict";var u6t=Od().gl_cone3d,f6t=Od().gl_cone3d.createConeMesh,c6t=Zr().simpleMap,h6t=$g().parseColorScale,d6t=fc().extractOpts,p6t=Zr().isArrayOrTypedArray,sDe=GA();function lDe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var sX=lDe.prototype;sX.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 u=this.data.hovertext||this.data.text;return p6t(u)&&u[t]!==void 0?e.textLabel=u[t]:u&&(e.textLabel=u),!0}};var v6t={xaxis:0,yaxis:1,zaxis:2},y6t={tip:1,tail:0,cm:.25,center:.5},m6t={tip:1,tail:1,cm:.75,center:.5};function uDe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(f,c){var h=r[c],d=n[v6t[c]];return c6t(f,function(p){return h.d2l(p)*d})}i.vectors=sDe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=sDe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=d6t(t);i.colormap=h6t(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=y6t[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 u=u6t(i),l=t.lightposition;return u.lightPosition=[l.x,l.y,l.z],u.ambient=t.lighting.ambient,u.diffuse=t.lighting.diffuse,u.specular=t.lighting.specular,u.roughness=t.lighting.roughness,u.fresnel=t.lighting.fresnel,u.opacity=t.opacity,t._pad=m6t[t.anchor]*u.vectorScale*u.coneScale*t._normMax,u}sX.update=function(e){this.data=e;var t=uDe(this.scene,e);this.mesh.update(t)};sX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g6t(e,t){var r=e.glplot.gl,n=uDe(e,t),i=f6t(r,n),a=new lDe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}fDe.exports=g6t});var dDe=Se((M0r,hDe)=>{"use strict";hDe.exports={moduleType:"trace",name:"cone",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:oX(),supplyDefaults:nDe(),colorbar:{min:"cmin",max:"cmax"},calc:oDe(),plot:cDe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var vDe=Se((E0r,pDe)=>{"use strict";pDe.exports=dDe()});var uX=Se((k0r,mDe)=>{"use strict";var _6t=Xf(),jA=Gc().axisHoverFormat,x6t=Du().hovertemplateAttrs,b6t=VA(),yDe=zf(),lX=vu().extendFlat,sF={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:x6t({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:jA("u",1),vhoverformat:jA("v",1),whoverformat:jA("w",1),xhoverformat:jA("x"),yhoverformat:jA("y"),zhoverformat:jA("z"),showlegend:lX({},yDe.showlegend,{dflt:!1})};lX(sF,_6t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var w6t=["opacity","lightposition","lighting"];w6t.forEach(function(e){sF[e]=b6t[e]});sF.hoverinfo=lX({},yDe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});mDe.exports=sF});var _De=Se((C0r,gDe)=>{"use strict";var T6t=Zr(),A6t=ed(),S6t=uX();gDe.exports=function(t,r,n,i){function a(h,d){return T6t.coerce(t,r,S6t,h,d)}var o=a("u"),s=a("v"),u=a("w"),l=a("x"),f=a("y"),c=a("z");if(!o||!o.length||!s||!s.length||!u||!u.length||!l||!l.length||!f||!f.length||!c||!c.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"),A6t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var EDe=Se((L0r,MDe)=>{"use strict";var wDe=Od().gl_streamtube3d,M6t=wDe.createTubeMesh,E6t=Zr(),k6t=$g().parseColorScale,C6t=fc().extractOpts,xDe=GA(),TDe={xaxis:0,yaxis:1,zaxis:2};function ADe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var cX=ADe.prototype;cX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var u=t[s],l=r[TDe[s]];return u.l2c(o)/l}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 bDe(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 fX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function SDe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(F,q){var U=r[q],H=n[TDe[q]];return E6t.simpleMap(F,function(j){return U.d2l(j)*H})}if(a.vectors=xDe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),u=o(t._Ys,"yaxis"),l=o(t._Zs,"zaxis");a.meshgrid=[s,u,l],a.gridFill=t._gridFill;var f=t._slen;if(f)a.startingPositions=xDe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var c=u[0],h=bDe(s),d=bDe(l),p=new Array(h.length*d.length),x=0,b=0;b{"use strict";kDe.exports={moduleType:"trace",name:"streamtube",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:uX(),supplyDefaults:_De(),colorbar:{min:"cmin",max:"cmax"},calc:rF().calc,plot:EDe(),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 zDe=Se((P0r,LDe)=>{"use strict";LDe.exports=CDe()});var H2=Se((I0r,DDe)=>{"use strict";var z6t=Du().hovertemplateAttrs,P6t=Du().texttemplateAttrs,I6t=Ey(),Wm=Zc(),D6t=zf(),PDe=Xf(),R6t=Id().dash,V2=vu().extendFlat,F6t=_c().overrideAll,ey=Wm.marker,IDe=Wm.line,q6t=ey.line;DDe.exports=F6t({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:V2({},Wm.mode,{dflt:"markers"}),text:V2({},Wm.text,{}),texttemplate:P6t({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:V2({},Wm.hovertext,{}),textfont:Wm.textfont,textposition:Wm.textposition,line:{color:IDe.color,width:IDe.width,dash:R6t},connectgaps:Wm.connectgaps,marker:V2({symbol:ey.symbol,opacity:ey.opacity,angle:ey.angle,angleref:V2({},ey.angleref,{values:["previous","up","north"]}),standoff:ey.standoff,size:ey.size,sizeref:ey.sizeref,sizemin:ey.sizemin,sizemode:ey.sizemode,colorbar:ey.colorbar,line:V2({width:q6t.width},PDe("marker.line")),gradient:ey.gradient},PDe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:I6t(),selected:Wm.selected,unselected:Wm.unselected,hoverinfo:V2({},D6t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:z6t()},"calc","nested")});var FDe=Se((D0r,RDe)=>{"use strict";var hX=Zr(),dX=ec(),B6t=$v(),O6t=I0(),N6t=D0(),U6t=Py(),V6t=H2();RDe.exports=function(t,r,n,i){function a(d,p){return hX.coerce(t,r,V6t,d,p)}var o=a("locations"),s;if(o&&o.length){var u=a("geojson"),l;(typeof u=="string"&&u!==""||hX.isPlainObject(u))&&(l="geojson-id");var f=a("locationmode",l);f==="geojson-id"&&a("featureidkey"),s=o.length}else{var c=a("lon")||[],h=a("lat")||[];s=Math.min(c.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("mode"),dX.hasMarkers(r)&&B6t(t,r,n,i,a,{gradient:!0}),dX.hasLines(r)&&(O6t(t,r,n,i,a),a("connectgaps")),dX.hasText(r)&&(a("texttemplate"),N6t(t,r,i,a)),a("fill"),r.fill!=="none"&&U6t(t,r,n,a),hX.coerceSelectionMarkerOpacity(r,a)}});var ODe=Se((R0r,BDe)=>{"use strict";var qDe=hu();BDe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=qDe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=qDe.tickText(o,o.c2l(s[1]),!0).text,i}});var lF=Se((F0r,HDe)=>{"use strict";var pX=_u(),NDe=ju().BADNUM,H6t=R0(),G6t=km(),W6t=F0(),j6t=Zr().isArrayOrTypedArray,UDe=Zr()._;function VDe(e){return e&&typeof e=="string"}HDe.exports=function(t,r){var n=j6t(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return VDe(h)||pX(h)}:o=VDe;for(var s=0;s{"use strict";Sp.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"};Sp.axesNames=["lonaxis","lataxis"];Sp.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Sp.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Sp.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]}};Sp.clipPad=.001;Sp.precision=.1;Sp.landColor="#F0DC82";Sp.waterColor="#3399FF";Sp.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Sp.sphereSVG={type:"Sphere"};Sp.fillLayers={ocean:1,land:1,lakes:1};Sp.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Sp.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Sp.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Sp.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var vX=Se((uF,GDe)=>{(function(e,t){typeof uF=="object"&&typeof GDe!="undefined"?t(uF):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(uF,function(e){"use strict";function t(E){return E}function r(E){if(E==null)return t;var A,L,_=E.scale[0],C=E.scale[1],M=E.translate[0],v=E.translate[1];return function(z,T){T||(A=L=0);var F=2,q=z.length,U=new Array(q);for(U[0]=(A+=z[0])*_+M,U[1]=(L+=z[1])*C+v;FM&&(M=F[0]),F[1]v&&(v=F[1])}function T(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(T);break;case"Point":z(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(z);break}}E.arcs.forEach(function(F){for(var q=-1,U=F.length,H;++qM&&(M=H[0]),H[1]v&&(v=H[1])});for(L in E.objects)T(E.objects[L]);return[_,C,M,v]}function i(E,A){for(var L,_=E.length,C=_-A;C<--_;)L=E[C],E[C++]=E[_],E[_]=L}function a(E,A){return typeof A=="string"&&(A=E.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(L){return o(E,L)})}:o(E,A)}function o(E,A){var L=A.id,_=A.bbox,C=A.properties==null?{}:A.properties,M=s(E,A);return L==null&&_==null?{type:"Feature",properties:C,geometry:M}:_==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:_,properties:C,geometry:M}}function s(E,A){var L=r(E.transform),_=E.arcs;function C(q,U){U.length&&U.pop();for(var H=_[q<0?~q:q],j=0,G=H.length;j1)_=c(E,A,L);else for(C=0,_=new Array(M=E.arcs.length);C1)for(var U=1,H=z(F[0]),j,G;UH&&(G=F[0],F[0]=F[U],F[U]=G,H=j);return F}).filter(function(T){return T.length>0})}}function x(E,A){for(var L=0,_=E.length;L<_;){var C=L+_>>>1;E[C]=2))throw new Error("n must be \u22652");T=E.bbox||n(E);var L=T[0],_=T[1],C=T[2],M=T[3],v;A={scale:[C-L?(C-L)/(v-1):1,M-_?(M-_)/(v-1):1],translate:[L,_]}}else T=E.bbox;var z=y(A),T,F,q=E.objects,U={};function H(O){return z(O)}function j(O){var W;switch(O.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:O.geometries.map(j)};break;case"Point":W={type:"Point",coordinates:H(O.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:O.coordinates.map(H)};break;default:return O}return O.id!=null&&(W.id=O.id),O.bbox!=null&&(W.bbox=O.bbox),O.properties!=null&&(W.properties=O.properties),W}function G(O){var W=0,re=1,ne=O.length,be,ze=new Array(ne);for(ze[0]=z(O[0],0);++W{"use strict";var yX=WDe.exports={},Z6t=XE().locationmodeToLayer,X6t=vX().feature;yX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};yX.getTopojsonPath=function(e,t){return e+t+".json"};yX.getTopojsonFeatures=function(e,t){var r=Z6t[e.locationmode],n=t.objects[r];return X6t(t,n).features}});var tx=Se(YE=>{"use strict";var Y6t=ju().BADNUM;YE.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};YE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};YE.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{jDe.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 dF=Se(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var qv=63710088e-1,gX={centimeters:qv*100,centimetres:qv*100,degrees:360/(2*Math.PI),feet:qv*3.28084,inches:qv*39.37,kilometers:qv/1e3,kilometres:qv/1e3,meters:qv,metres:qv,miles:qv/1609.344,millimeters:qv*1e3,millimetres:qv*1e3,nauticalmiles:qv/1852,radians:1,yards:qv*1.0936},mX={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 K6t(e,t,r={}){switch(e){case"Point":return _X(t).geometry;case"LineString":return bX(t).geometry;case"Polygon":return xX(t).geometry;case"MultiPoint":return YDe(t).geometry;case"MultiLineString":return XDe(t).geometry;case"MultiPolygon":return KDe(t).geometry;default:throw new Error(e+" is invalid")}}function _X(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(!cF(e[0])||!cF(e[1]))throw new Error("coordinates must contain numbers");return rx({type:"Point",coordinates:e},t,r)}function J6t(e,t,r={}){return hF(e.map(n=>_X(n,t)),r)}function xX(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;axX(n,t)),r)}function bX(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 Q6t(e,t,r={}){return hF(e.map(n=>bX(n,t)),r)}function hF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function XDe(e,t,r={}){return rx({type:"MultiLineString",coordinates:e},t,r)}function YDe(e,t,r={}){return rx({type:"MultiPoint",coordinates:e},t,r)}function KDe(e,t,r={}){return rx({type:"MultiPolygon",coordinates:e},t,r)}function eRt(e,t,r={}){return rx({type:"GeometryCollection",geometries:e},t,r)}function tRt(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 JDe(e,t="kilometers"){let r=gX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function wX(e,t="kilometers"){let r=gX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function rRt(e,t){return $De(wX(e,t))}function iRt(e){let t=e%360;return t<0&&(t+=360),t}function nRt(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function $De(e){return e%(2*Math.PI)*180/Math.PI}function aRt(e){return e%360*Math.PI/180}function oRt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return JDe(wX(e,t),r)}function sRt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=mX[t];if(!n)throw new Error("invalid original units");let i=mX[r];if(!i)throw new Error("invalid final units");return e/n*i}function cF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function lRt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function uRt(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(!cF(t))throw new Error("bbox must only contain numbers")})}function fRt(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")}hc.areaFactors=mX;hc.azimuthToBearing=nRt;hc.bearingToAzimuth=iRt;hc.convertArea=sRt;hc.convertLength=oRt;hc.degreesToRadians=aRt;hc.earthRadius=qv;hc.factors=gX;hc.feature=rx;hc.featureCollection=hF;hc.geometry=K6t;hc.geometryCollection=eRt;hc.isNumber=cF;hc.isObject=lRt;hc.lengthToDegrees=rRt;hc.lengthToRadians=wX;hc.lineString=bX;hc.lineStrings=Q6t;hc.multiLineString=XDe;hc.multiPoint=YDe;hc.multiPolygon=KDe;hc.point=_X;hc.points=J6t;hc.polygon=xX;hc.polygons=$6t;hc.radiansToDegrees=$De;hc.radiansToLength=JDe;hc.round=tRt;hc.validateBBox=uRt;hc.validateId=fRt});var vF=Se(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});var Wp=dF();function KE(e,t,r){if(e!==null)for(var n,i,a,o,s,u,l,f=0,c=0,h,d=e.type,p=d==="FeatureCollection",x=d==="Feature",b=p?e.features.length:1,y=0;yu||p>l||x>f){s=c,u=n,l=p,f=x,a=0;return}var b=Wp.lineString.call(void 0,[s,c],r.properties);if(t(b,n,i,x,a)===!1)return!1;a++,s=c})===!1)return!1}}})}function mRt(e,t,r){var n=r,i=!1;return t6e(e,function(a,o,s,u,l){i===!1&&r===void 0?n=a:n=t(n,a,o,s,u,l),i=!0}),n}function r6e(e,t){if(!e)throw new Error("geojson is required");pF(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(yF,"__esModule",{value:!0});var i6e=dF(),bRt=vF();function o6e(e){return bRt.geomReduce.call(void 0,e,(t,r)=>t+wRt(r),0)}function wRt(e){let t=0,r;switch(e.type){case"Polygon":return n6e(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(a6e(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*AX,u=a[1]*AX,l=o[0]*AX;r+=(l-s)*Math.sin(u),n++}return r*TRt}var ARt=o6e;yF.area=o6e;yF.default=ARt});var u6e=Se(mF=>{"use strict";Object.defineProperty(mF,"__esModule",{value:!0});var SRt=dF(),MRt=vF();function l6e(e,t={}){let r=0,n=0,i=0;return MRt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),SRt.point.call(void 0,[r/i,n/i],t.properties)}var ERt=l6e;mF.centroid=l6e;mF.default=ERt});var c6e=Se(gF=>{"use strict";Object.defineProperty(gF,"__esModule",{value:!0});var kRt=vF();function f6e(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return kRt.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 LRt=Nl(),p6e=ZDe(),{area:zRt}=s6e(),{centroid:PRt}=u6e(),{bbox:IRt}=c6e(),h6e=BM(),ZA=H1(),DRt=yg(),RRt=EM(),_F=w5(),d6e=Object.keys(p6e),FRt={"ISO-3":h6e,"USA-states":h6e,"country names":qRt};function qRt(e){for(var t=0;t0&&f[c+1][0]<0)return c;return null}switch(n==="RUS"||n==="FJI"?a=function(f){var c;if(l(f)===null)c=f;else for(c=new Array(f.length),u=0;uc?h[d++]=[f[u][0]+360,f[u][1]]:u===c?(h[d++]=f[u],h[d++]=[f[u][0],-90]):h[d++]=f[u];var p=_F.tester(h);p.pts.pop(),i.push(p)}:a=function(f){i.push(_F.tester(f))},t.type){case"MultiPolygon":for(o=0;o0?p.properties.ct=URt(p):p.properties.ct=[NaN,NaN],h.fIn=f,h.fOut=p,i.push(p)}else ZA.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[c]}switch(r.type){case"FeatureCollection":var u=r.features;for(a=0;ai&&(i=s,r=o)}else r=t;return PRt(r).geometry.coordinates}function VRt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(u){return new Promise(function(l,f){LRt.json(u,function(c,h){if(c){delete t[u];var d=c.status===404?'GeoJSON at URL "'+u+'" does not exist.':"Unexpected error while fetching from "+u;return f(new Error(d))}return t[u]=h,l(h)})})}function i(u){return new Promise(function(l,f){var c=0,h=setInterval(function(){if(t[u]&&t[u]!=="pending")return clearInterval(h),l(t[u]);if(c>100)return clearInterval(h),f("Unexpected error while fetching from "+u);c++},50)})}for(var a=0;a{"use strict";var GRt=Nl(),WRt=yu(),m6e=Pl(),g6e=ov(),jRt=g6e.stylePoints,ZRt=g6e.styleText;_6e.exports=function(t,r){r&&XRt(t,r)};function XRt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),jRt(n,r,e),ZRt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=GRt.select(this),o=i.trace,s=o.line||{};a.call(m6e.stroke,s.color).call(WRt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(m6e.fill,o.fillcolor)})}});var CX=Se((X0r,w6e)=>{"use strict";var x6e=Nl(),bF=Zr(),YRt=fF().getTopojsonFeatures,MX=tx(),xF=ix(),b6e=wy().findExtremes,kX=ju().BADNUM,KRt=q0().calcMarkerSize,EX=ec(),JRt=SX();function $Rt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=bF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===kX&&x6e.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=x6e.select(this),u=o[0].trace;if(EX.hasLines(u)||u.fill!=="none"){var l=MX.calcTraceToLineCoords(o),f=u.fill!=="none"?MX.makePolygon(l):MX.makeLine(l);s.selectAll("path.js-line").data([{geojson:f,trace:u}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}EX.hasMarkers(u)&&s.selectAll("path.point").data(bF.identity).enter().append("path").classed("point",!0).each(function(c){a(c,this)}),EX.hasText(u)&&s.selectAll("g").data(bF.identity).enter().append("g").append("text").each(function(c){a(c,this)}),JRt(e,o)})}function QRt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(bF.isArrayOrTypedArray(r.locations)){var u=r.locationmode,l=u==="geojson-id"?xF.extractTraceFeature(e):YRt(r,i.topojson);for(o=0;o{"use strict";var eFt=jc(),tFt=ju().BADNUM,rFt=oT(),iFt=Zr().fillText,nFt=H2();T6e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,u=t.subplot,l=u.projection.isLonLatOverEdges,f=u.project;function c(k){var E=k.lonlat;if(E[0]===tFt||l(E))return 1/0;var A=f(E),L=f([r,n]),_=Math.abs(A[0]-L[0]),C=Math.abs(A[1]-L[1]),M=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(_*_+C*C)-M,1-3/M)}if(eFt.getClosest(i,c,t),t.index!==!1){var h=i[t.index],d=h.lonlat,p=[o.c2p(d),s.c2p(d)],x=h.mrc||1;t.x0=p[0]-x,t.x1=p[0]+x,t.y0=p[1]-x,t.y1=p[1]+x,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:u};var y=a._module.formatLabels(h,a,b);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=rFt(a,h),t.extraText=aFt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function aFt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?nFt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,u=a.indexOf("lat")!==-1,l=a.indexOf("text")!==-1,f=[];function c(h){return h+"\xB0"}return o?f.push(t.loc):s&&u?f.push("("+c(r.latLabel)+", "+c(r.lonLabel)+")"):s?f.push(n.lon+c(r.lonLabel)):u&&f.push(n.lat+c(r.latLabel)),l&&iFt(t,e,f),f.join("
")}});var M6e=Se((K0r,S6e)=>{"use strict";S6e.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 C6e=Se((J0r,k6e)=>{"use strict";var E6e=ec(),oFt=ju().BADNUM;k6e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u,l,f,c,h,d=!E6e.hasMarkers(s)&&!E6e.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){typeof wF=="object"&&typeof L6e!="undefined"?t(wF):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(wF,function(e){"use strict";function t(Ee,Me){return EeMe?1:Ee>=Me?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Me,Oe,Re,me){for(Re==null&&(Re=0),me==null&&(me=Me.length);Re>>1;Ee(Me[Be],Oe)<0?Re=Be+1:me=Be}return Re},right:function(Me,Oe,Re,me){for(Re==null&&(Re=0),me==null&&(me=Me.length);Re>>1;Ee(Me[Be],Oe)>0?me=Be:Re=Be+1}return Re}}}function n(Ee){return function(Me,Oe){return t(Ee(Me),Oe)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Me){Me==null&&(Me=u);for(var Oe=0,Re=Ee.length-1,me=Ee[0],Be=new Array(Re<0?0:Re);OeEe?1:Me>=Ee?0:NaN}function c(Ee){return Ee===null?NaN:+Ee}function h(Ee,Me){var Oe=Ee.length,Re=0,me=-1,Be=0,fe,Ze,et=0;if(Me==null)for(;++me1)return et/(Re-1)}function d(Ee,Me){var Oe=h(Ee,Me);return Oe&&Math.sqrt(Oe)}function p(Ee,Me){var Oe=Ee.length,Re=-1,me,Be,fe;if(Me==null){for(;++Re=me)for(Be=fe=me;++Reme&&(Be=me),fe=me)for(Be=fe=me;++Reme&&(Be=me),fe0)return[Ee];if((Re=Me0)for(Ee=Math.ceil(Ee/Ze),Me=Math.floor(Me/Ze),fe=new Array(Be=Math.ceil(Me-Ee+1));++me=0?(Be>=L?10:Be>=_?5:Be>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(Be>=L?10:Be>=_?5:Be>=C?2:1)}function z(Ee,Me,Oe){var Re=Math.abs(Me-Ee)/Math.max(0,Oe),me=Math.pow(10,Math.floor(Math.log(Re)/Math.LN10)),Be=Re/me;return Be>=L?me*=10:Be>=_?me*=5:Be>=C&&(me*=2),MeQe;)Xe.pop(),--Tt;var xt=new Array(Tt+1),_t;for(Be=0;Be<=Tt;++Be)_t=xt[Be]=[],_t.x0=Be>0?Xe[Be-1]:Pt,_t.x1=Be=1)return+Oe(Ee[Re-1],Re-1,Ee);var Re,me=(Re-1)*Me,Be=Math.floor(me),fe=+Oe(Ee[Be],Be,Ee),Ze=+Oe(Ee[Be+1],Be+1,Ee);return fe+(Ze-fe)*(me-Be)}}function U(Ee,Me,Oe){return Ee=y.call(Ee,c).sort(t),Math.ceil((Oe-Me)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function H(Ee,Me,Oe){return Math.ceil((Oe-Me)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function j(Ee,Me){var Oe=Ee.length,Re=-1,me,Be;if(Me==null){for(;++Re=me)for(Be=me;++ReBe&&(Be=me)}else for(;++Re=me)for(Be=me;++ReBe&&(Be=me);return Be}function G(Ee,Me){var Oe=Ee.length,Re=Oe,me=-1,Be,fe=0;if(Me==null)for(;++me=0;)for(fe=Ee[Me],Oe=fe.length;--Oe>=0;)Be[--me]=fe[Oe];return Be}function re(Ee,Me){var Oe=Ee.length,Re=-1,me,Be;if(Me==null){for(;++Re=me)for(Be=me;++Reme&&(Be=me)}else for(;++Re=me)for(Be=me;++Reme&&(Be=me);return Be}function ne(Ee,Me){for(var Oe=Me.length,Re=new Array(Oe);Oe--;)Re[Oe]=Ee[Me[Oe]];return Re}function be(Ee,Me){if(Oe=Ee.length){var Oe,Re=0,me=0,Be,fe=Ee[me];for(Me==null&&(Me=t);++Re{(function(e,t){typeof TF=="object"&&typeof z6e!="undefined"?t(TF,JE()):typeof define=="function"&&define.amd?define(["exports","d3-array"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(TF,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(bt){a(i,bt,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(bt,Ft,hr){var nr=bt.s=Ft+hr,Sr=nr-Ft,li=nr-Sr;bt.t=Ft-li+(hr-Sr)}var o=1e-6,s=1e-12,u=Math.PI,l=u/2,f=u/4,c=u*2,h=180/u,d=u/180,p=Math.abs,x=Math.atan,b=Math.atan2,y=Math.cos,k=Math.ceil,E=Math.exp,A=Math.log,L=Math.pow,_=Math.sin,C=Math.sign||function(bt){return bt>0?1:bt<0?-1:0},M=Math.sqrt,v=Math.tan;function z(bt){return bt>1?0:bt<-1?u:Math.acos(bt)}function T(bt){return bt>1?l:bt<-1?-l:Math.asin(bt)}function F(bt){return(bt=_(bt/2))*bt}function q(){}function U(bt,Ft){bt&&j.hasOwnProperty(bt.type)&&j[bt.type](bt,Ft)}var H={Feature:function(bt,Ft){U(bt.geometry,Ft)},FeatureCollection:function(bt,Ft){for(var hr=bt.features,nr=-1,Sr=hr.length;++nr=0?1:-1,Sr=nr*hr,li=y(Ft),di=_(Ft),mi=te*di,Oi=he*li+mi*y(Sr),dn=mi*nr*_(Sr);re.add(b(dn,Oi)),Ce=bt,he=li,te=di}function me(bt){return ne.reset(),W(bt,ke),ne*2}function Be(bt){return[b(bt[1],bt[0]),T(bt[2])]}function fe(bt){var Ft=bt[0],hr=bt[1],nr=y(hr);return[nr*y(Ft),nr*_(Ft),_(hr)]}function Ze(bt,Ft){return bt[0]*Ft[0]+bt[1]*Ft[1]+bt[2]*Ft[2]}function et(bt,Ft){return[bt[1]*Ft[2]-bt[2]*Ft[1],bt[2]*Ft[0]-bt[0]*Ft[2],bt[0]*Ft[1]-bt[1]*Ft[0]]}function gt(bt,Ft){bt[0]+=Ft[0],bt[1]+=Ft[1],bt[2]+=Ft[2]}function Pt(bt,Ft){return[bt[0]*Ft,bt[1]*Ft,bt[2]*Ft]}function Qe(bt){var Ft=M(bt[0]*bt[0]+bt[1]*bt[1]+bt[2]*bt[2]);bt[0]/=Ft,bt[1]/=Ft,bt[2]/=Ft}var Xe,Tt,xt,_t,Ct,jt,At,Te,nt=r(),ut,ct,rt={point:je,lineStart:Je,lineEnd:Mt,polygonStart:function(){rt.point=Vt,rt.lineStart=Kt,rt.lineEnd=ir,nt.reset(),ke.polygonStart()},polygonEnd:function(){ke.polygonEnd(),rt.point=je,rt.lineStart=Je,rt.lineEnd=Mt,re<0?(Xe=-(xt=180),Tt=-(_t=90)):nt>o?_t=90:nt<-o&&(Tt=-90),ct[0]=Xe,ct[1]=xt},sphere:function(){Xe=-(xt=180),Tt=-(_t=90)}};function je(bt,Ft){ut.push(ct=[Xe=bt,xt=bt]),Ft_t&&(_t=Ft)}function tt(bt,Ft){var hr=fe([bt*d,Ft*d]);if(Te){var nr=et(Te,hr),Sr=[nr[1],-nr[0],0],li=et(Sr,nr);Qe(li),li=Be(li);var di=bt-Ct,mi=di>0?1:-1,Oi=li[0]*h*mi,dn,wi=p(di)>180;wi^(mi*Ct_t&&(_t=dn)):(Oi=(Oi+360)%360-180,wi^(mi*Ct_t&&(_t=Ft))),wi?btfr(Xe,xt)&&(xt=bt):fr(bt,xt)>fr(Xe,xt)&&(Xe=bt):xt>=Xe?(btxt&&(xt=bt)):bt>Ct?fr(Xe,bt)>fr(Xe,xt)&&(xt=bt):fr(bt,xt)>fr(Xe,xt)&&(Xe=bt)}else ut.push(ct=[Xe=bt,xt=bt]);Ft_t&&(_t=Ft),Te=hr,Ct=bt}function Je(){rt.point=tt}function Mt(){ct[0]=Xe,ct[1]=xt,rt.point=je,Te=null}function Vt(bt,Ft){if(Te){var hr=bt-Ct;nt.add(p(hr)>180?hr+(hr>0?360:-360):hr)}else jt=bt,At=Ft;ke.point(bt,Ft),tt(bt,Ft)}function Kt(){ke.lineStart()}function ir(){Vt(jt,At),ke.lineEnd(),p(nt)>o&&(Xe=-(xt=180)),ct[0]=Xe,ct[1]=xt,Te=null}function fr(bt,Ft){return(Ft-=bt)<0?Ft+360:Ft}function Ot(bt,Ft){return bt[0]-Ft[0]}function De(bt,Ft){return bt[0]<=bt[1]?bt[0]<=Ft&&Ft<=bt[1]:Ftfr(nr[0],nr[1])&&(nr[1]=Sr[1]),fr(Sr[0],nr[1])>fr(nr[0],nr[1])&&(nr[0]=Sr[0])):li.push(nr=Sr);for(di=-1/0,hr=li.length-1,Ft=0,nr=li[hr];Ft<=hr;nr=Sr,++Ft)Sr=li[Ft],(mi=fr(nr[1],Sr[0]))>di&&(di=mi,Xe=Sr[0],xt=nr[1])}return ut=ct=null,Xe===1/0||Tt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xe,Tt],[xt,_t]]}var Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei={sphere:q,point:Si,lineStart:Hi,lineEnd:Di,polygonStart:function(){Ei.lineStart=Lt,Ei.lineEnd=vt},polygonEnd:function(){Ei.lineStart=Hi,Ei.lineEnd=Di}};function Si(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft);xi(hr*y(bt),hr*_(bt),_(Ft))}function xi(bt,Ft,hr){++Fe,Ie+=(bt-Ie)/Fe,lt+=(Ft-lt)/Fe,ye+=(hr-ye)/Fe}function Hi(){Ei.point=Jr}function Jr(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft);vr=hr*y(bt),Er=hr*_(bt),si=_(Ft),Ei.point=ci,xi(vr,Er,si)}function ci(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft),nr=hr*y(bt),Sr=hr*_(bt),li=_(Ft),di=b(M((di=Er*li-si*Sr)*di+(di=si*nr-vr*li)*di+(di=vr*Sr-Er*nr)*di),vr*nr+Er*Sr+si*li);Pe+=di,ue+=di*(vr+(vr=nr)),de+=di*(Er+(Er=Sr)),ht+=di*(si+(si=li)),xi(vr,Er,si)}function Di(){Ei.point=Si}function Lt(){Ei.point=Dt}function vt(){Bt(qr,Lr),Ei.point=Si}function Dt(bt,Ft){qr=bt,Lr=Ft,bt*=d,Ft*=d,Ei.point=Bt;var hr=y(Ft);vr=hr*y(bt),Er=hr*_(bt),si=_(Ft),xi(vr,Er,si)}function Bt(bt,Ft){bt*=d,Ft*=d;var hr=y(Ft),nr=hr*y(bt),Sr=hr*_(bt),li=_(Ft),di=Er*li-si*Sr,mi=si*nr-vr*li,Oi=vr*Sr-Er*nr,dn=M(di*di+mi*mi+Oi*Oi),wi=T(dn),ui=dn&&-wi/dn;Et+=ui*di,St+=ui*mi,Zt+=ui*Oi,Pe+=wi,ue+=wi*(vr+(vr=nr)),de+=wi*(Er+(Er=Sr)),ht+=wi*(si+(si=li)),xi(vr,Er,si)}function sr(bt){Fe=Pe=Ie=lt=ye=ue=de=ht=Et=St=Zt=0,W(bt,Ei);var Ft=Et,hr=St,nr=Zt,Sr=Ft*Ft+hr*hr+nr*nr;return Sru?bt+Math.round(-bt/c)*c:bt,Ft]}Tr.invert=Tr;function Rr(bt,Ft,hr){return(bt%=c)?Ft||hr?zr(oi(bt),vi(Ft,hr)):oi(bt):Ft||hr?vi(Ft,hr):Tr}function Br(bt){return function(Ft,hr){return Ft+=bt,[Ft>u?Ft-c:Ft<-u?Ft+c:Ft,hr]}}function oi(bt){var Ft=Br(bt);return Ft.invert=Br(-bt),Ft}function vi(bt,Ft){var hr=y(bt),nr=_(bt),Sr=y(Ft),li=_(Ft);function di(mi,Oi){var dn=y(Oi),wi=y(mi)*dn,ui=_(mi)*dn,Ai=_(Oi),gi=Ai*hr+wi*nr;return[b(ui*Sr-gi*li,wi*hr-Ai*nr),T(gi*Sr+ui*li)]}return di.invert=function(mi,Oi){var dn=y(Oi),wi=y(mi)*dn,ui=_(mi)*dn,Ai=_(Oi),gi=Ai*Sr-ui*li;return[b(ui*Sr+Ai*li,wi*hr+gi*nr),T(gi*hr-wi*nr)]},di}function Pi(bt){bt=Rr(bt[0]*d,bt[1]*d,bt.length>2?bt[2]*d:0);function Ft(hr){return hr=bt(hr[0]*d,hr[1]*d),hr[0]*=h,hr[1]*=h,hr}return Ft.invert=function(hr){return hr=bt.invert(hr[0]*d,hr[1]*d),hr[0]*=h,hr[1]*=h,hr},Ft}function Yr(bt,Ft,hr,nr,Sr,li){if(hr){var di=y(Ft),mi=_(Ft),Oi=nr*hr;Sr==null?(Sr=Ft+nr*c,li=Ft-Oi/2):(Sr=Ni(di,Sr),li=Ni(di,li),(nr>0?Srli)&&(Sr+=nr*c));for(var dn,wi=Sr;nr>0?wi>li:wi1&&bt.push(bt.pop().concat(bt.shift()))},result:function(){var hr=bt;return bt=[],Ft=null,hr}}}function ki(bt,Ft){return p(bt[0]-Ft[0])=0;--mi)Sr.point((ui=wi[mi])[0],ui[1]);else nr(Ai.x,Ai.p.x,-1,Sr);Ai=Ai.p}Ai=Ai.o,wi=Ai.z,gi=!gi}while(!Ai.v);Sr.lineEnd()}}}function zi(bt){if(Ft=bt.length){for(var Ft,hr=0,nr=bt[0],Sr;++hr=0?1:-1,ol=Js*Bs,Cl=ol>u,ul=In*Lo;if(Mi.add(b(ul*Js*_(ol),Vn*us+ul*y(ol))),di+=Cl?Bs+Js*c:Bs,Cl^gi>=hr^Gn>=hr){var Gl=et(fe(Ai),fe(Hn));Qe(Gl);var Vl=et(li,Gl);Qe(Vl);var Fl=(Cl^Bs>=0?-1:1)*T(Vl[2]);(nr>Fl||nr===Fl&&(Gl[0]||Gl[1]))&&(mi+=Cl^Bs>=0?1:-1)}}return(di<-o||di0){for(Oi||(Sr.polygonStart(),Oi=!0),Sr.lineStart(),us=0;us1&&pn&2&&Lo.push(Lo.pop().concat(Lo.shift())),wi.push(Lo.filter(st))}}return Ai}}function st(bt){return bt.length>1}function Wt(bt,Ft){return((bt=bt.x)[0]<0?bt[1]-l-o:l-bt[1])-((Ft=Ft.x)[0]<0?Ft[1]-l-o:l-Ft[1])}var tr=Or(function(){return!0},or,hi,[-u,-l]);function or(bt){var Ft=NaN,hr=NaN,nr=NaN,Sr;return{lineStart:function(){bt.lineStart(),Sr=1},point:function(li,di){var mi=li>0?u:-u,Oi=p(li-Ft);p(Oi-u)0?l:-l),bt.point(nr,hr),bt.lineEnd(),bt.lineStart(),bt.point(mi,hr),bt.point(li,hr),Sr=0):nr!==mi&&Oi>=u&&(p(Ft-nr)o?x((_(Ft)*(li=y(nr))*_(hr)-_(nr)*(Sr=y(Ft))*_(bt))/(Sr*li*di)):(Ft+nr)/2}function hi(bt,Ft,hr,nr){var Sr;if(bt==null)Sr=hr*l,nr.point(-u,Sr),nr.point(0,Sr),nr.point(u,Sr),nr.point(u,0),nr.point(u,-Sr),nr.point(0,-Sr),nr.point(-u,-Sr),nr.point(-u,0),nr.point(-u,Sr);else if(p(bt[0]-Ft[0])>o){var li=bt[0]0,Sr=p(Ft)>o;function li(wi,ui,Ai,gi){Yr(gi,bt,hr,Ai,wi,ui)}function di(wi,ui){return y(wi)*y(ui)>Ft}function mi(wi){var ui,Ai,gi,gn,In;return{lineStart:function(){gn=gi=!1,In=1},point:function(Vn,Rn){var Hn=[Vn,Rn],Gn,pn=di(Vn,Rn),Lo=nr?pn?0:dn(Vn,Rn):pn?dn(Vn+(Vn<0?u:-u),Rn):0;if(!ui&&(gn=gi=pn)&&wi.lineStart(),pn!==gi&&(Gn=Oi(ui,Hn),(!Gn||ki(ui,Gn)||ki(Hn,Gn))&&(Hn[2]=1)),pn!==gi)In=0,pn?(wi.lineStart(),Gn=Oi(Hn,ui),wi.point(Gn[0],Gn[1])):(Gn=Oi(ui,Hn),wi.point(Gn[0],Gn[1],2),wi.lineEnd()),ui=Gn;else if(Sr&&ui&&nr^pn){var us;!(Lo&Ai)&&(us=Oi(Hn,ui,!0))&&(In=0,nr?(wi.lineStart(),wi.point(us[0][0],us[0][1]),wi.point(us[1][0],us[1][1]),wi.lineEnd()):(wi.point(us[1][0],us[1][1]),wi.lineEnd(),wi.lineStart(),wi.point(us[0][0],us[0][1],3)))}pn&&(!ui||!ki(ui,Hn))&&wi.point(Hn[0],Hn[1]),ui=Hn,gi=pn,Ai=Lo},lineEnd:function(){gi&&wi.lineEnd(),ui=null},clean:function(){return In|(gn&&gi)<<1}}}function Oi(wi,ui,Ai){var gi=fe(wi),gn=fe(ui),In=[1,0,0],Vn=et(gi,gn),Rn=Ze(Vn,Vn),Hn=Vn[0],Gn=Rn-Hn*Hn;if(!Gn)return!Ai&&wi;var pn=Ft*Rn/Gn,Lo=-Ft*Hn/Gn,us=et(In,Vn),Bs=Pt(In,pn),Js=Pt(Vn,Lo);gt(Bs,Js);var ol=us,Cl=Ze(Bs,ol),ul=Ze(ol,ol),Gl=Cl*Cl-ul*(Ze(Bs,Bs)-1);if(!(Gl<0)){var Vl=M(Gl),Fl=Pt(ol,(-Cl-Vl)/ul);if(gt(Fl,Bs),Fl=Be(Fl),!Ai)return Fl;var ga=wi[0],ko=ui[0],zs=wi[1],Fo=ui[1],Ys;ko0^Fl[1]<(p(Fl[0]-ga)u^(ga<=Fl[0]&&Fl[0]<=ko)){var _l=Pt(ol,(-Cl+Vl)/ul);return gt(_l,Bs),[Fl,Be(_l)]}}}function dn(wi,ui){var Ai=nr?bt:u-bt,gi=0;return wi<-Ai?gi|=1:wi>Ai&&(gi|=2),ui<-Ai?gi|=4:ui>Ai&&(gi|=8),gi}return Or(di,mi,li,nr?[0,-bt]:[-u,bt-u])}function Qr(bt,Ft,hr,nr,Sr,li){var di=bt[0],mi=bt[1],Oi=Ft[0],dn=Ft[1],wi=0,ui=1,Ai=Oi-di,gi=dn-mi,gn;if(gn=hr-di,!(!Ai&&gn>0)){if(gn/=Ai,Ai<0){if(gn0){if(gn>ui)return;gn>wi&&(wi=gn)}if(gn=Sr-di,!(!Ai&&gn<0)){if(gn/=Ai,Ai<0){if(gn>ui)return;gn>wi&&(wi=gn)}else if(Ai>0){if(gn0)){if(gn/=gi,gi<0){if(gn0){if(gn>ui)return;gn>wi&&(wi=gn)}if(gn=li-mi,!(!gi&&gn<0)){if(gn/=gi,gi<0){if(gn>ui)return;gn>wi&&(wi=gn)}else if(gi>0){if(gn0&&(bt[0]=di+wi*Ai,bt[1]=mi+wi*gi),ui<1&&(Ft[0]=di+ui*Ai,Ft[1]=mi+ui*gi),!0}}}}}var Ui=1e9,zn=-Ui;function fn(bt,Ft,hr,nr){function Sr(dn,wi){return bt<=dn&&dn<=hr&&Ft<=wi&&wi<=nr}function li(dn,wi,ui,Ai){var gi=0,gn=0;if(dn==null||(gi=di(dn,ui))!==(gn=di(wi,ui))||Oi(dn,wi)<0^ui>0)do Ai.point(gi===0||gi===3?bt:hr,gi>1?nr:Ft);while((gi=(gi+ui+4)%4)!==gn);else Ai.point(wi[0],wi[1])}function di(dn,wi){return p(dn[0]-bt)0?0:3:p(dn[0]-hr)0?2:1:p(dn[1]-Ft)0?1:0:wi>0?3:2}function mi(dn,wi){return Oi(dn.x,wi.x)}function Oi(dn,wi){var ui=di(dn,1),Ai=di(wi,1);return ui!==Ai?ui-Ai:ui===0?wi[1]-dn[1]:ui===1?dn[0]-wi[0]:ui===2?dn[1]-wi[1]:wi[0]-dn[0]}return function(dn){var wi=dn,ui=ti(),Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs={point:Js,lineStart:Gl,lineEnd:Vl,polygonStart:Cl,polygonEnd:ul};function Js(ga,ko){Sr(ga,ko)&&wi.point(ga,ko)}function ol(){for(var ga=0,ko=0,zs=gi.length;konr&&(kl-Sl)*(nr-_l)>(cl-_l)*(bt-Sl)&&++ga:cl<=nr&&(kl-Sl)*(nr-_l)<(cl-_l)*(bt-Sl)&&--ga;return ga}function Cl(){wi=ui,Ai=[],gi=[],us=!0}function ul(){var ga=ol(),ko=us&&ga,zs=(Ai=t.merge(Ai)).length;(ko||zs)&&(dn.polygonStart(),ko&&(dn.lineStart(),li(null,null,1,dn),dn.lineEnd()),zs&&Vi(Ai,mi,ga,li,dn),dn.polygonEnd()),wi=dn,Ai=gi=gn=null}function Gl(){Bs.point=Fl,gi&&gi.push(gn=[]),Lo=!0,pn=!1,Hn=Gn=NaN}function Vl(){Ai&&(Fl(In,Vn),Rn&&pn&&ui.rejoin(),Ai.push(ui.result())),Bs.point=Js,pn&&wi.lineEnd()}function Fl(ga,ko){var zs=Sr(ga,ko);if(gi&&gn.push([ga,ko]),Lo)In=ga,Vn=ko,Rn=zs,Lo=!1,zs&&(wi.lineStart(),wi.point(ga,ko));else if(zs&&pn)wi.point(ga,ko);else{var Fo=[Hn=Math.max(zn,Math.min(Ui,Hn)),Gn=Math.max(zn,Math.min(Ui,Gn))],Ys=[ga=Math.max(zn,Math.min(Ui,ga)),ko=Math.max(zn,Math.min(Ui,ko))];Qr(Fo,Ys,bt,Ft,hr,nr)?(pn||(wi.lineStart(),wi.point(Fo[0],Fo[1])),wi.point(Ys[0],Ys[1]),zs||wi.lineEnd(),us=!1):zs&&(wi.lineStart(),wi.point(ga,ko),us=!1)}Hn=ga,Gn=ko,pn=zs}return Bs}}function xn(){var bt=0,Ft=0,hr=960,nr=500,Sr,li,di;return di={stream:function(mi){return Sr&&li===mi?Sr:Sr=fn(bt,Ft,hr,nr)(li=mi)},extent:function(mi){return arguments.length?(bt=+mi[0][0],Ft=+mi[0][1],hr=+mi[1][0],nr=+mi[1][1],Sr=li=null,di):[[bt,Ft],[hr,nr]]}}}var _a=r(),Wn,Fn,ia,za={sphere:q,point:q,lineStart:Hr,lineEnd:q,polygonStart:q,polygonEnd:q};function Hr(){za.point=go,za.lineEnd=na}function na(){za.point=za.lineEnd=q}function go(bt,Ft){bt*=d,Ft*=d,Wn=bt,Fn=_(Ft),ia=y(Ft),za.point=Dn}function Dn(bt,Ft){bt*=d,Ft*=d;var hr=_(Ft),nr=y(Ft),Sr=p(bt-Wn),li=y(Sr),di=_(Sr),mi=nr*di,Oi=ia*hr-Fn*nr*li,dn=Fn*hr+ia*nr*li;_a.add(b(M(mi*mi+Oi*Oi),dn)),Wn=bt,Fn=hr,ia=nr}function un(bt){return _a.reset(),W(bt,za),+_a}var Zn=[null,null],Wo={type:"LineString",coordinates:Zn};function Ba(bt,Ft){return Zn[0]=bt,Zn[1]=Ft,un(Wo)}var Bo={Feature:function(bt,Ft){return Ha(bt.geometry,Ft)},FeatureCollection:function(bt,Ft){for(var hr=bt.features,nr=-1,Sr=hr.length;++nr0&&(Sr=Ba(bt[li],bt[li-1]),Sr>0&&hr<=Sr&&nr<=Sr&&(hr+nr-Sr)*(1-Math.pow((hr-nr)/Sr,2))o}).map(Ai)).concat(t.range(k(li/dn)*dn,Sr,dn).filter(function(Gn){return p(Gn%ui)>o}).map(gi))}return Rn.lines=function(){return Hn().map(function(Gn){return{type:"LineString",coordinates:Gn}})},Rn.outline=function(){return{type:"Polygon",coordinates:[gn(nr).concat(In(di).slice(1),gn(hr).reverse().slice(1),In(mi).reverse().slice(1))]}},Rn.extent=function(Gn){return arguments.length?Rn.extentMajor(Gn).extentMinor(Gn):Rn.extentMinor()},Rn.extentMajor=function(Gn){return arguments.length?(nr=+Gn[0][0],hr=+Gn[1][0],mi=+Gn[0][1],di=+Gn[1][1],nr>hr&&(Gn=nr,nr=hr,hr=Gn),mi>di&&(Gn=mi,mi=di,di=Gn),Rn.precision(Vn)):[[nr,mi],[hr,di]]},Rn.extentMinor=function(Gn){return arguments.length?(Ft=+Gn[0][0],bt=+Gn[1][0],li=+Gn[0][1],Sr=+Gn[1][1],Ft>bt&&(Gn=Ft,Ft=bt,bt=Gn),li>Sr&&(Gn=li,li=Sr,Sr=Gn),Rn.precision(Vn)):[[Ft,li],[bt,Sr]]},Rn.step=function(Gn){return arguments.length?Rn.stepMajor(Gn).stepMinor(Gn):Rn.stepMinor()},Rn.stepMajor=function(Gn){return arguments.length?(wi=+Gn[0],ui=+Gn[1],Rn):[wi,ui]},Rn.stepMinor=function(Gn){return arguments.length?(Oi=+Gn[0],dn=+Gn[1],Rn):[Oi,dn]},Rn.precision=function(Gn){return arguments.length?(Vn=+Gn,Ai=Ri(li,Sr,90),gi=an(Ft,bt,Vn),gn=Ri(mi,di,90),In=an(nr,hr,Vn),Rn):Vn},Rn.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function pa(){return cs()()}function ln(bt,Ft){var hr=bt[0]*d,nr=bt[1]*d,Sr=Ft[0]*d,li=Ft[1]*d,di=y(nr),mi=_(nr),Oi=y(li),dn=_(li),wi=di*y(hr),ui=di*_(hr),Ai=Oi*y(Sr),gi=Oi*_(Sr),gn=2*T(M(F(li-nr)+di*Oi*F(Sr-hr))),In=_(gn),Vn=gn?function(Rn){var Hn=_(Rn*=gn)/In,Gn=_(gn-Rn)/In,pn=Gn*wi+Hn*Ai,Lo=Gn*ui+Hn*gi,us=Gn*mi+Hn*dn;return[b(Lo,pn)*h,b(us,M(pn*pn+Lo*Lo))*h]}:function(){return[hr*h,nr*h]};return Vn.distance=gn,Vn}function ka(bt){return bt}var va=r(),bo=r(),Co,Fi,Yn,xa,Qi={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Qi.lineStart=Nn,Qi.lineEnd=jo},polygonEnd:function(){Qi.lineStart=Qi.lineEnd=Qi.point=q,va.add(p(bo)),bo.reset()},result:function(){var bt=va/2;return va.reset(),bt}};function Nn(){Qi.point=Pn}function Pn(bt,Ft){Qi.point=qa,Co=Yn=bt,Fi=xa=Ft}function qa(bt,Ft){bo.add(xa*bt-Yn*Ft),Yn=bt,xa=Ft}function jo(){qa(Co,Fi)}var Vo=1/0,Pa=Vo,Oa=-Vo,co=Oa,An={point:_o,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var bt=[[Vo,Pa],[Oa,co]];return Oa=co=-(Pa=Vo=1/0),bt}};function _o(bt,Ft){btOa&&(Oa=bt),Ftco&&(co=Ft)}var ks=0,bs=0,ps=0,sa=0,Bn=0,ms=0,ya=0,on=0,mn=0,Ga,ca,bn,Xi,qn={point:Ia,lineStart:yn,lineEnd:Da,polygonStart:function(){qn.lineStart=Aa,qn.lineEnd=Ln},polygonEnd:function(){qn.point=Ia,qn.lineStart=yn,qn.lineEnd=Da},result:function(){var bt=mn?[ya/mn,on/mn]:ms?[sa/ms,Bn/ms]:ps?[ks/ps,bs/ps]:[NaN,NaN];return ks=bs=ps=sa=Bn=ms=ya=on=mn=0,bt}};function Ia(bt,Ft){ks+=bt,bs+=Ft,++ps}function yn(){qn.point=Ya}function Ya(bt,Ft){qn.point=ba,Ia(bn=bt,Xi=Ft)}function ba(bt,Ft){var hr=bt-bn,nr=Ft-Xi,Sr=M(hr*hr+nr*nr);sa+=Sr*(bn+bt)/2,Bn+=Sr*(Xi+Ft)/2,ms+=Sr,Ia(bn=bt,Xi=Ft)}function Da(){qn.point=Ia}function Aa(){qn.point=wo}function Ln(){wa(Ga,ca)}function wo(bt,Ft){qn.point=wa,Ia(Ga=bn=bt,ca=Xi=Ft)}function wa(bt,Ft){var hr=bt-bn,nr=Ft-Xi,Sr=M(hr*hr+nr*nr);sa+=Sr*(bn+bt)/2,Bn+=Sr*(Xi+Ft)/2,ms+=Sr,Sr=Xi*bt-bn*Ft,ya+=Sr*(bn+bt),on+=Sr*(Xi+Ft),mn+=Sr*3,Ia(bn=bt,Xi=Ft)}function $i(bt){this._context=bt}$i.prototype={_radius:4.5,pointRadius:function(bt){return this._radius=bt,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(bt,Ft){switch(this._point){case 0:{this._context.moveTo(bt,Ft),this._point=1;break}case 1:{this._context.lineTo(bt,Ft);break}default:{this._context.moveTo(bt+this._radius,Ft),this._context.arc(bt,Ft,this._radius,0,c);break}}},result:q};var ea=r(),Sa,Za,xo,Wa,hn,Un={point:q,lineStart:function(){Un.point=Ss},lineEnd:function(){Sa&&Kn(Za,xo),Un.point=q},polygonStart:function(){Sa=!0},polygonEnd:function(){Sa=null},result:function(){var bt=+ea;return ea.reset(),bt}};function Ss(bt,Ft){Un.point=Kn,Za=Wa=bt,xo=hn=Ft}function Kn(bt,Ft){Wa-=bt,hn-=Ft,ea.add(M(Wa*Wa+hn*hn)),Wa=bt,hn=Ft}function ns(){this._string=[]}ns.prototype={_radius:4.5,_circle:Jo(4.5),pointRadius:function(bt){return(bt=+bt)!==this._radius&&(this._radius=bt,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(bt,Ft){switch(this._point){case 0:{this._string.push("M",bt,",",Ft),this._point=1;break}case 1:{this._string.push("L",bt,",",Ft);break}default:{this._circle==null&&(this._circle=Jo(this._radius)),this._string.push("M",bt,",",Ft,this._circle);break}}},result:function(){if(this._string.length){var bt=this._string.join("");return this._string=[],bt}else return null}};function Jo(bt){return"m0,"+bt+"a"+bt+","+bt+" 0 1,1 0,"+-2*bt+"a"+bt+","+bt+" 0 1,1 0,"+2*bt+"z"}function vo(bt,Ft){var hr=4.5,nr,Sr;function li(di){return di&&(typeof hr=="function"&&Sr.pointRadius(+hr.apply(this,arguments)),W(di,nr(Sr))),Sr.result()}return li.area=function(di){return W(di,nr(Qi)),Qi.result()},li.measure=function(di){return W(di,nr(Un)),Un.result()},li.bounds=function(di){return W(di,nr(An)),An.result()},li.centroid=function(di){return W(di,nr(qn)),qn.result()},li.projection=function(di){return arguments.length?(nr=di==null?(bt=null,ka):(bt=di).stream,li):bt},li.context=function(di){return arguments.length?(Sr=di==null?(Ft=null,new ns):new $i(Ft=di),typeof hr!="function"&&Sr.pointRadius(hr),li):Ft},li.pointRadius=function(di){return arguments.length?(hr=typeof di=="function"?di:(Sr.pointRadius(+di),+di),li):hr},li.projection(bt).context(Ft)}function ma(bt){return{stream:ja(bt)}}function ja(bt){return function(Ft){var hr=new To;for(var nr in bt)hr[nr]=bt[nr];return hr.stream=Ft,hr}}function To(){}To.prototype={constructor:To,point:function(bt,Ft){this.stream.point(bt,Ft)},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 Ao(bt,Ft,hr){var nr=bt.clipExtent&&bt.clipExtent();return bt.scale(150).translate([0,0]),nr!=null&&bt.clipExtent(null),W(hr,bt.stream(An)),Ft(An.result()),nr!=null&&bt.clipExtent(nr),bt}function la(bt,Ft,hr){return Ao(bt,function(nr){var Sr=Ft[1][0]-Ft[0][0],li=Ft[1][1]-Ft[0][1],di=Math.min(Sr/(nr[1][0]-nr[0][0]),li/(nr[1][1]-nr[0][1])),mi=+Ft[0][0]+(Sr-di*(nr[1][0]+nr[0][0]))/2,Oi=+Ft[0][1]+(li-di*(nr[1][1]+nr[0][1]))/2;bt.scale(150*di).translate([mi,Oi])},hr)}function Ki(bt,Ft,hr){return la(bt,[[0,0],Ft],hr)}function ho(bt,Ft,hr){return Ao(bt,function(nr){var Sr=+Ft,li=Sr/(nr[1][0]-nr[0][0]),di=(Sr-li*(nr[1][0]+nr[0][0]))/2,mi=-li*nr[0][1];bt.scale(150*li).translate([di,mi])},hr)}function Ka(bt,Ft,hr){return Ao(bt,function(nr){var Sr=+Ft,li=Sr/(nr[1][1]-nr[0][1]),di=-li*nr[0][0],mi=(Sr-li*(nr[1][1]+nr[0][1]))/2;bt.scale(150*li).translate([di,mi])},hr)}var Ca=16,ta=y(30*d);function En(bt,Ft){return+Ft?Ds(bt,Ft):Mo(bt)}function Mo(bt){return ja({point:function(Ft,hr){Ft=bt(Ft,hr),this.stream.point(Ft[0],Ft[1])}})}function Ds(bt,Ft){function hr(nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn){var Rn=dn-nr,Hn=wi-Sr,Gn=Rn*Rn+Hn*Hn;if(Gn>4*Ft&&In--){var pn=di+Ai,Lo=mi+gi,us=Oi+gn,Bs=M(pn*pn+Lo*Lo+us*us),Js=T(us/=Bs),ol=p(p(us)-1)Ft||p((Rn*Vl+Hn*Fl)/Gn-.5)>.3||di*Ai+mi*gi+Oi*gn2?ga[2]%360*d:0,Vl()):[mi*h,Oi*h,dn*h]},ul.angle=function(ga){return arguments.length?(ui=ga%360*d,Vl()):ui*h},ul.reflectX=function(ga){return arguments.length?(Ai=ga?-1:1,Vl()):Ai<0},ul.reflectY=function(ga){return arguments.length?(gi=ga?-1:1,Vl()):gi<0},ul.precision=function(ga){return arguments.length?(us=En(Bs,Lo=ga*ga),Fl()):M(Lo)},ul.fitExtent=function(ga,ko){return la(ul,ga,ko)},ul.fitSize=function(ga,ko){return Ki(ul,ga,ko)},ul.fitWidth=function(ga,ko){return ho(ul,ga,ko)},ul.fitHeight=function(ga,ko){return Ka(ul,ga,ko)};function Vl(){var ga=as(hr,0,0,Ai,gi,ui).apply(null,Ft(li,di)),ko=(ui?as:Ks)(hr,nr-ga[0],Sr-ga[1],Ai,gi,ui);return wi=Rr(mi,Oi,dn),Bs=zr(Ft,ko),Js=zr(wi,Bs),us=En(Bs,Lo),Fl()}function Fl(){return ol=Cl=null,ul}return function(){return Ft=bt.apply(this,arguments),ul.invert=Ft.invert&&Gl,Vl()}}function Xa(bt){var Ft=0,hr=u/3,nr=Cs(bt),Sr=nr(Ft,hr);return Sr.parallels=function(li){return arguments.length?nr(Ft=li[0]*d,hr=li[1]*d):[Ft*h,hr*h]},Sr}function Zo(bt){var Ft=y(bt);function hr(nr,Sr){return[nr*Ft,_(Sr)/Ft]}return hr.invert=function(nr,Sr){return[nr/Ft,T(Sr*Ft)]},hr}function Eo(bt,Ft){var hr=_(bt),nr=(hr+_(Ft))/2;if(p(nr)=.12&&Vn<.234&&In>=-.425&&In<-.214?Sr:Vn>=.166&&Vn<.234&&In>=-.214&&In<-.115?di:hr).invert(Ai)},wi.stream=function(Ai){return bt&&Ft===Ai?bt:bt=Xo([hr.stream(Ft=Ai),Sr.stream(Ai),di.stream(Ai)])},wi.precision=function(Ai){return arguments.length?(hr.precision(Ai),Sr.precision(Ai),di.precision(Ai),ui()):hr.precision()},wi.scale=function(Ai){return arguments.length?(hr.scale(Ai),Sr.scale(Ai*.35),di.scale(Ai),wi.translate(hr.translate())):hr.scale()},wi.translate=function(Ai){if(!arguments.length)return hr.translate();var gi=hr.scale(),gn=+Ai[0],In=+Ai[1];return nr=hr.translate(Ai).clipExtent([[gn-.455*gi,In-.238*gi],[gn+.455*gi,In+.238*gi]]).stream(dn),li=Sr.translate([gn-.307*gi,In+.201*gi]).clipExtent([[gn-.425*gi+o,In+.12*gi+o],[gn-.214*gi-o,In+.234*gi-o]]).stream(dn),mi=di.translate([gn-.205*gi,In+.212*gi]).clipExtent([[gn-.214*gi+o,In+.166*gi+o],[gn-.115*gi-o,In+.234*gi-o]]).stream(dn),ui()},wi.fitExtent=function(Ai,gi){return la(wi,Ai,gi)},wi.fitSize=function(Ai,gi){return Ki(wi,Ai,gi)},wi.fitWidth=function(Ai,gi){return ho(wi,Ai,gi)},wi.fitHeight=function(Ai,gi){return Ka(wi,Ai,gi)};function ui(){return bt=Ft=null,wi}return wi.scale(1070)}function $n(bt){return function(Ft,hr){var nr=y(Ft),Sr=y(hr),li=bt(nr*Sr);return[li*Sr*_(Ft),li*_(hr)]}}function Sn(bt){return function(Ft,hr){var nr=M(Ft*Ft+hr*hr),Sr=bt(nr),li=_(Sr),di=y(Sr);return[b(Ft*li,nr*di),T(nr&&hr*li/nr)]}}var uo=$n(function(bt){return M(2/(1+bt))});uo.invert=Sn(function(bt){return 2*T(bt/2)});function Rs(){return Jn(uo).scale(124.75).clipAngle(180-.001)}var xs=$n(function(bt){return(bt=z(bt))&&bt/_(bt)});xs.invert=Sn(function(bt){return bt});function Go(){return Jn(xs).scale(79.4188).clipAngle(180-.001)}function os(bt,Ft){return[bt,A(v((l+Ft)/2))]}os.invert=function(bt,Ft){return[bt,2*x(E(Ft))-l]};function So(){return Qn(os).scale(961/c)}function Qn(bt){var Ft=Jn(bt),hr=Ft.center,nr=Ft.scale,Sr=Ft.translate,li=Ft.clipExtent,di=null,mi,Oi,dn;Ft.scale=function(ui){return arguments.length?(nr(ui),wi()):nr()},Ft.translate=function(ui){return arguments.length?(Sr(ui),wi()):Sr()},Ft.center=function(ui){return arguments.length?(hr(ui),wi()):hr()},Ft.clipExtent=function(ui){return arguments.length?(ui==null?di=mi=Oi=dn=null:(di=+ui[0][0],mi=+ui[0][1],Oi=+ui[1][0],dn=+ui[1][1]),wi()):di==null?null:[[di,mi],[Oi,dn]]};function wi(){var ui=u*nr(),Ai=Ft(Pi(Ft.rotate()).invert([0,0]));return li(di==null?[[Ai[0]-ui,Ai[1]-ui],[Ai[0]+ui,Ai[1]+ui]]:bt===os?[[Math.max(Ai[0]-ui,di),mi],[Math.min(Ai[0]+ui,Oi),dn]]:[[di,Math.max(Ai[1]-ui,mi)],[Oi,Math.min(Ai[1]+ui,dn)]])}return wi()}function zo(bt){return v((l+bt)/2)}function rl(bt,Ft){var hr=y(bt),nr=bt===Ft?_(bt):A(hr/y(Ft))/A(zo(Ft)/zo(bt)),Sr=hr*L(zo(bt),nr)/nr;if(!nr)return os;function li(di,mi){Sr>0?mi<-l+o&&(mi=-l+o):mi>l-o&&(mi=l-o);var Oi=Sr/L(zo(mi),nr);return[Oi*_(nr*di),Sr-Oi*y(nr*di)]}return li.invert=function(di,mi){var Oi=Sr-mi,dn=C(nr)*M(di*di+Oi*Oi),wi=b(di,p(Oi))*C(Oi);return Oi*nr<0&&(wi-=u*C(di)*C(Oi)),[wi/nr,2*x(L(Sr/dn,1/nr))-l]},li}function $o(){return Xa(rl).scale(109.5).parallels([30,30])}function Na(bt,Ft){return[bt,Ft]}Na.invert=Na;function Ua(){return Jn(Na).scale(152.63)}function Po(bt,Ft){var hr=y(bt),nr=bt===Ft?_(bt):(hr-y(Ft))/(Ft-bt),Sr=hr/nr+bt;if(p(nr)o&&--nr>0);return[bt/(.8707+(li=hr*hr)*(-.131979+li*(-.013791+li*li*li*(.003971-.001529*li)))),hr]};function Xs(){return Jn(ds).scale(175.295)}function oa(bt,Ft){return[y(Ft)*_(bt),_(Ft)]}oa.invert=Sn(T);function Yo(){return Jn(oa).scale(249.5).clipAngle(90+o)}function po(bt,Ft){var hr=y(Ft),nr=1+y(bt)*hr;return[hr*_(bt)/nr,_(Ft)/nr]}po.invert=Sn(function(bt){return 2*x(bt)});function ss(){return Jn(po).scale(250).clipAngle(142)}function ls(bt,Ft){return[A(v((l+Ft)/2)),-bt]}ls.invert=function(bt,Ft){return[-Ft,2*x(E(bt))-l]};function gs(){var bt=Qn(ls),Ft=bt.center,hr=bt.rotate;return bt.center=function(nr){return arguments.length?Ft([-nr[1],nr[0]]):(nr=Ft(),[nr[1],-nr[0]])},bt.rotate=function(nr){return arguments.length?hr([nr[0],nr[1],nr.length>2?nr[2]+90:90]):(nr=hr(),[nr[0],nr[1],nr[2]-90])},hr([0,0,90]).scale(159.155)}e.geoAlbers=$a,e.geoAlbersUsa=rs,e.geoArea=me,e.geoAzimuthalEqualArea=Rs,e.geoAzimuthalEqualAreaRaw=uo,e.geoAzimuthalEquidistant=Go,e.geoAzimuthalEquidistantRaw=xs,e.geoBounds=_e,e.geoCentroid=sr,e.geoCircle=Ur,e.geoClipAntimeridian=tr,e.geoClipCircle=Gi,e.geoClipExtent=xn,e.geoClipRectangle=fn,e.geoConicConformal=$o,e.geoConicConformalRaw=rl,e.geoConicEqualArea=lo,e.geoConicEqualAreaRaw=Eo,e.geoConicEquidistant=fo,e.geoConicEquidistantRaw=Po,e.geoContains=to,e.geoDistance=Ba,e.geoEqualEarth=Fs,e.geoEqualEarthRaw=Zs,e.geoEquirectangular=Ua,e.geoEquirectangularRaw=Na,e.geoGnomonic=no,e.geoGnomonicRaw=ws,e.geoGraticule=cs,e.geoGraticule10=pa,e.geoIdentity=Ls,e.geoInterpolate=ln,e.geoLength=un,e.geoMercator=So,e.geoMercatorRaw=os,e.geoNaturalEarth1=Xs,e.geoNaturalEarth1Raw=ds,e.geoOrthographic=Yo,e.geoOrthographicRaw=oa,e.geoPath=vo,e.geoProjection=Jn,e.geoProjectionMutator=Cs,e.geoRotation=Pi,e.geoStereographic=ss,e.geoStereographicRaw=po,e.geoStream=W,e.geoTransform=ma,e.geoTransverseMercator=gs,e.geoTransverseMercatorRaw=ls,Object.defineProperty(e,"__esModule",{value:!0})})});var I6e=Se((AF,P6e)=>{(function(e,t){typeof AF=="object"&&typeof P6e!="undefined"?t(AF,LX(),JE()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],t):t(e.d3=e.d3||{},e.d3,e.d3)})(AF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,u=Math.floor,l=Math.log,f=Math.max,c=Math.min,h=Math.pow,d=Math.round,p=Math.sign||function(ce){return ce>0?1:ce<0?-1:0},x=Math.sin,b=Math.tan,y=1e-6,k=1e-12,E=Math.PI,A=E/2,L=E/4,_=Math.SQRT1_2,C=H(2),M=H(E),v=E*2,z=180/E,T=E/180;function F(ce){return ce?ce/Math.sin(ce):1}function q(ce){return ce>1?A:ce<-1?-A:Math.asin(ce)}function U(ce){return ce>1?0:ce<-1?E:Math.acos(ce)}function H(ce){return ce>0?Math.sqrt(ce):0}function j(ce){return ce=s(2*ce),(ce-1)/(ce+1)}function G(ce){return(s(ce)-s(-ce))/2}function O(ce){return(s(ce)+s(-ce))/2}function W(ce){return l(ce+H(ce*ce+1))}function re(ce){return l(ce+H(ce*ce-1))}function ne(ce){var Ae=b(ce/2),qe=2*l(o(ce/2))/(Ae*Ae);function Ve(ot,Ke){var ft=o(ot),qt=o(Ke),Xt=x(Ke),$t=qt*ft,dr=-((1-$t?l((1+$t)/2)/(1-$t):-.5)+qe/(1+$t));return[dr*qt*x(ot),dr*Xt]}return Ve.invert=function(ot,Ke){var ft=H(ot*ot+Ke*Ke),qt=-ce/2,Xt=50,$t;if(!ft)return[0,0];do{var dr=qt/2,Mr=o(dr),$r=x(dr),ii=$r/Mr,pi=-l(n(Mr));qt-=$t=(2/ii*pi-qe*ii-ft)/(-pi/($r*$r)+1-qe/(2*Mr*Mr))*(Mr<0?.7:1)}while(n($t)>y&&--Xt>0);var Yi=x(qt);return[a(ot*Yi,ft*o(qt)),q(Ke*Yi/ft)]},Ve}function be(){var ce=A,Ae=t.geoProjectionMutator(ne),qe=Ae(ce);return qe.radius=function(Ve){return arguments.length?Ae(ce=Ve*T):ce*z},qe.scale(179.976).clipAngle(147)}function ze(ce,Ae){var qe=o(Ae),Ve=F(U(qe*o(ce/=2)));return[2*qe*x(ce)*Ve,x(Ae)*Ve]}ze.invert=function(ce,Ae){if(!(ce*ce+4*Ae*Ae>E*E+y)){var qe=ce,Ve=Ae,ot=25;do{var Ke=x(qe),ft=x(qe/2),qt=o(qe/2),Xt=x(Ve),$t=o(Ve),dr=x(2*Ve),Mr=Xt*Xt,$r=$t*$t,ii=ft*ft,pi=1-$r*qt*qt,Yi=pi?U($t*qt)*H(wn=1/pi):wn=0,wn,Tn=2*Yi*$t*ft-ce,ua=Yi*Xt-Ae,oo=wn*($r*ii+Yi*$t*qt*Mr),el=wn*(.5*Ke*dr-Yi*2*Xt*ft),ys=wn*.25*(dr*ft-Yi*Xt*$r*Ke),il=wn*(Mr*qt+Yi*ii*$t),$l=el*ys-il*oo;if(!$l)break;var pl=(ua*el-Tn*il)/$l,Hl=(Tn*ys-ua*oo)/$l;qe-=pl,Ve-=Hl}while((n(pl)>y||n(Hl)>y)&&--ot>0);return[qe,Ve]}};function Ce(){return t.geoProjection(ze).scale(152.63)}function he(ce){var Ae=x(ce),qe=o(ce),Ve=ce>=0?1:-1,ot=b(Ve*ce),Ke=(1+Ae-qe)/2;function ft(qt,Xt){var $t=o(Xt),dr=o(qt/=2);return[(1+$t)*x(qt),(Ve*Xt>-a(dr,ot)-.001?0:-Ve*10)+Ke+x(Xt)*qe-(1+$t)*Ae*dr]}return ft.invert=function(qt,Xt){var $t=0,dr=0,Mr=50;do{var $r=o($t),ii=x($t),pi=o(dr),Yi=x(dr),wn=1+pi,Tn=wn*ii-qt,ua=Ke+Yi*qe-wn*Ae*$r-Xt,oo=wn*$r/2,el=-ii*Yi,ys=Ae*wn*ii/2,il=qe*pi+Ae*$r*Yi,$l=el*ys-il*oo,pl=(ua*el-Tn*il)/$l/2,Hl=(Tn*ys-ua*oo)/$l;n(Hl)>2&&(Hl/=2),$t-=pl,dr-=Hl}while((n(pl)>y||n(Hl)>y)&&--Mr>0);return Ve*dr>-a(o($t),ot)-.001?[$t*2,dr]:null},ft}function te(){var ce=20*T,Ae=ce>=0?1:-1,qe=b(Ae*ce),Ve=t.geoProjectionMutator(he),ot=Ve(ce),Ke=ot.stream;return ot.parallel=function(ft){return arguments.length?(qe=b((Ae=(ce=ft*T)>=0?1:-1)*ce),Ve(ce)):ce*z},ot.stream=function(ft){var qt=ot.rotate(),Xt=Ke(ft),$t=(ot.rotate([0,0]),Ke(ft)),dr=ot.precision();return ot.rotate(qt),Xt.sphere=function(){$t.polygonStart(),$t.lineStart();for(var Mr=Ae*-180;Ae*Mr<180;Mr+=Ae*90)$t.point(Mr,Ae*90);if(ce)for(;Ae*(Mr-=3*Ae*dr)>=-180;)$t.point(Mr,Ae*-a(o(Mr*T/2),qe)*z);$t.lineEnd(),$t.polygonEnd()},Xt},ot.scale(218.695).center([0,28.0974])}function ke(ce,Ae){var qe=b(Ae/2),Ve=H(1-qe*qe),ot=1+Ve*o(ce/=2),Ke=x(ce)*Ve/ot,ft=qe/ot,qt=Ke*Ke,Xt=ft*ft;return[4/3*Ke*(3+qt-3*Xt),4/3*ft*(3+3*qt-Xt)]}ke.invert=function(ce,Ae){if(ce*=3/8,Ae*=3/8,!ce&&n(Ae)>1)return null;var qe=ce*ce,Ve=Ae*Ae,ot=1+qe+Ve,Ke=H((ot-H(ot*ot-4*Ae*Ae))/2),ft=q(Ke)/3,qt=Ke?re(n(Ae/Ke))/3:W(n(ce))/3,Xt=o(ft),$t=O(qt),dr=$t*$t-Xt*Xt;return[p(ce)*2*a(G(qt)*Xt,.25-dr),p(Ae)*2*a($t*x(ft),.25+dr)]};function Ee(){return t.geoProjection(ke).scale(66.1603)}var Me=H(8),Oe=l(1+C);function Re(ce,Ae){var qe=n(Ae);return qek&&--Ve>0);return[ce/(o(qe)*(Me-1/x(qe))),p(Ae)*qe]};function me(){return t.geoProjection(Re).scale(112.314)}function Be(ce){var Ae=2*E/ce;function qe(Ve,ot){var Ke=t.geoAzimuthalEquidistantRaw(Ve,ot);if(n(Ve)>A){var ft=a(Ke[1],Ke[0]),qt=H(Ke[0]*Ke[0]+Ke[1]*Ke[1]),Xt=Ae*d((ft-A)/Ae)+A,$t=a(x(ft-=Xt),2-o(ft));ft=Xt+q(E/qt*x($t))-$t,Ke[0]=qt*o(ft),Ke[1]=qt*x(ft)}return Ke}return qe.invert=function(Ve,ot){var Ke=H(Ve*Ve+ot*ot);if(Ke>A){var ft=a(ot,Ve),qt=Ae*d((ft-A)/Ae)+A,Xt=ft>qt?-1:1,$t=Ke*o(qt-ft),dr=1/b(Xt*U(($t-E)/H(E*(E-2*$t)+Ke*Ke)));ft=qt+2*i((dr+Xt*H(dr*dr-3))/3),Ve=Ke*o(ft),ot=Ke*x(ft)}return t.geoAzimuthalEquidistantRaw.invert(Ve,ot)},qe}function fe(){var ce=5,Ae=t.geoProjectionMutator(Be),qe=Ae(ce),Ve=qe.stream,ot=.01,Ke=-o(ot*T),ft=x(ot*T);return qe.lobes=function(qt){return arguments.length?Ae(ce=+qt):ce},qe.stream=function(qt){var Xt=qe.rotate(),$t=Ve(qt),dr=(qe.rotate([0,0]),Ve(qt));return qe.rotate(Xt),$t.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Mr=0,$r=360/ce,ii=2*E/ce,pi=90-180/ce,Yi=A;Mr0&&n(ot)>y);return Ve<0?NaN:qe}function Qe(ce,Ae,qe){return Ae===void 0&&(Ae=40),qe===void 0&&(qe=k),function(Ve,ot,Ke,ft){var qt,Xt,$t;Ke=Ke===void 0?0:+Ke,ft=ft===void 0?0:+ft;for(var dr=0;drqt){Ke-=Xt/=2,ft-=$t/=2;continue}qt=pi;var Yi=(Ke>0?-1:1)*qe,wn=(ft>0?-1:1)*qe,Tn=ce(Ke+Yi,ft),ua=ce(Ke,ft+wn),oo=(Tn[0]-Mr[0])/Yi,el=(Tn[1]-Mr[1])/Yi,ys=(ua[0]-Mr[0])/wn,il=(ua[1]-Mr[1])/wn,$l=il*oo-el*ys,pl=(n($l)<.5?.5:1)/$l;if(Xt=(ii*ys-$r*il)*pl,$t=($r*el-ii*oo)*pl,Ke+=Xt,ft+=$t,n(Xt)0&&(qt[1]*=1+Xt/1.5*qt[0]*qt[0]),qt}return Ve.invert=Qe(Ve),Ve}function Tt(){return t.geoProjection(Xe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function xt(ce,Ae){var qe=ce*x(Ae),Ve=30,ot;do Ae-=ot=(Ae+x(Ae)-qe)/(1+o(Ae));while(n(ot)>y&&--Ve>0);return Ae/2}function _t(ce,Ae,qe){function Ve(ot,Ke){return[ce*ot*o(Ke=xt(qe,Ke)),Ae*x(Ke)]}return Ve.invert=function(ot,Ke){return Ke=q(Ke/Ae),[ot/(ce*o(Ke)),q((2*Ke+x(2*Ke))/qe)]},Ve}var Ct=_t(C/A,C,E);function jt(){return t.geoProjection(Ct).scale(169.529)}var At=2.00276,Te=1.11072;function nt(ce,Ae){var qe=xt(E,Ae);return[At*ce/(1/o(Ae)+Te/o(qe)),(Ae+C*x(qe))/At]}nt.invert=function(ce,Ae){var qe=At*Ae,Ve=Ae<0?-L:L,ot=25,Ke,ft;do ft=qe-C*x(Ve),Ve-=Ke=(x(2*Ve)+2*Ve-E*x(ft))/(2*o(2*Ve)+2+E*o(ft)*C*o(Ve));while(n(Ke)>y&&--ot>0);return ft=qe-C*x(Ve),[ce*(1/o(ft)+Te/o(Ve))/At,ft]};function ut(){return t.geoProjection(nt).scale(160.857)}function ct(ce){var Ae=0,qe=t.geoProjectionMutator(ce),Ve=qe(Ae);return Ve.parallel=function(ot){return arguments.length?qe(Ae=ot*T):Ae*z},Ve}function rt(ce,Ae){return[ce*o(Ae),Ae]}rt.invert=function(ce,Ae){return[ce/o(Ae),Ae]};function je(){return t.geoProjection(rt).scale(152.63)}function tt(ce){if(!ce)return rt;var Ae=1/b(ce);function qe(Ve,ot){var Ke=Ae+ce-ot,ft=Ke&&Ve*o(ot)/Ke;return[Ke*x(ft),Ae-Ke*o(ft)]}return qe.invert=function(Ve,ot){var Ke=H(Ve*Ve+(ot=Ae-ot)*ot),ft=Ae+ce-Ke;return[Ke/o(ft)*a(Ve,ot),ft]},qe}function Je(){return ct(tt).scale(123.082).center([0,26.1441]).parallel(45)}function Mt(ce){function Ae(qe,Ve){var ot=A-Ve,Ke=ot&&qe*ce*x(ot)/ot;return[ot*x(Ke)/ce,A-ot*o(Ke)]}return Ae.invert=function(qe,Ve){var ot=qe*ce,Ke=A-Ve,ft=H(ot*ot+Ke*Ke),qt=a(ot,Ke);return[(ft?ft/x(ft):1)*qt/ce,A-ft]},Ae}function Vt(){var ce=.5,Ae=t.geoProjectionMutator(Mt),qe=Ae(ce);return qe.fraction=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(158.837)}var Kt=_t(1,4/E,E);function ir(){return t.geoProjection(Kt).scale(152.63)}function fr(ce,Ae,qe,Ve,ot,Ke){var ft=o(Ke),qt;if(n(ce)>1||n(Ke)>1)qt=U(qe*ot+Ae*Ve*ft);else{var Xt=x(ce/2),$t=x(Ke/2);qt=2*q(H(Xt*Xt+Ae*Ve*$t*$t))}return n(qt)>y?[qt,a(Ve*x(Ke),Ae*ot-qe*Ve*ft)]:[0,0]}function Ot(ce,Ae,qe){return U((ce*ce+Ae*Ae-qe*qe)/(2*ce*Ae))}function De(ce){return ce-2*E*u((ce+E)/(2*E))}function _e(ce,Ae,qe){for(var Ve=[[ce[0],ce[1],x(ce[1]),o(ce[1])],[Ae[0],Ae[1],x(Ae[1]),o(Ae[1])],[qe[0],qe[1],x(qe[1]),o(qe[1])]],ot=Ve[2],Ke,ft=0;ft<3;++ft,ot=Ke)Ke=Ve[ft],ot.v=fr(Ke[1]-ot[1],ot[3],ot[2],Ke[3],Ke[2],Ke[0]-ot[0]),ot.point=[0,0];var qt=Ot(Ve[0].v[0],Ve[2].v[0],Ve[1].v[0]),Xt=Ot(Ve[0].v[0],Ve[1].v[0],Ve[2].v[0]),$t=E-qt;Ve[2].point[1]=0,Ve[0].point[0]=-(Ve[1].point[0]=Ve[0].v[0]/2);var dr=[Ve[2].point[0]=Ve[0].point[0]+Ve[2].v[0]*o(qt),2*(Ve[0].point[1]=Ve[1].point[1]=Ve[2].v[0]*x(qt))];function Mr($r,ii){var pi=x(ii),Yi=o(ii),wn=new Array(3),Tn;for(Tn=0;Tn<3;++Tn){var ua=Ve[Tn];if(wn[Tn]=fr(ii-ua[1],ua[3],ua[2],Yi,pi,$r-ua[0]),!wn[Tn][0])return ua.point;wn[Tn][1]=De(wn[Tn][1]-ua.v[1])}var oo=dr.slice();for(Tn=0;Tn<3;++Tn){var el=Tn==2?0:Tn+1,ys=Ot(Ve[Tn].v[0],wn[Tn][0],wn[el][0]);wn[Tn][1]<0&&(ys=-ys),Tn?Tn==1?(ys=Xt-ys,oo[0]-=wn[Tn][0]*o(ys),oo[1]-=wn[Tn][0]*x(ys)):(ys=$t-ys,oo[0]+=wn[Tn][0]*o(ys),oo[1]+=wn[Tn][0]*x(ys)):(oo[0]+=wn[Tn][0]*o(ys),oo[1]-=wn[Tn][0]*x(ys))}return oo[0]/=3,oo[1]/=3,oo}return Mr}function Fe(ce){return ce[0]*=T,ce[1]*=T,ce}function Pe(){return Ie([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ie(ce,Ae,qe){var Ve=t.geoCentroid({type:"MultiPoint",coordinates:[ce,Ae,qe]}),ot=[-Ve[0],-Ve[1]],Ke=t.geoRotation(ot),ft=_e(Fe(Ke(ce)),Fe(Ke(Ae)),Fe(Ke(qe)));ft.invert=Qe(ft);var qt=t.geoProjection(ft).rotate(ot),Xt=qt.center;return delete qt.rotate,qt.center=function($t){return arguments.length?Xt(Ke($t)):Ke.invert(Xt())},qt.clipAngle(90)}function lt(ce,Ae){var qe=H(1-x(Ae));return[2/M*ce*qe,M*(1-qe)]}lt.invert=function(ce,Ae){var qe=(qe=Ae/M-1)*qe;return[qe>0?ce*H(E/qe)/2:0,q(1-qe)]};function ye(){return t.geoProjection(lt).scale(95.6464).center([0,30])}function ue(ce){var Ae=b(ce);function qe(Ve,ot){return[Ve,(Ve?Ve/x(Ve):1)*(x(ot)*o(Ve)-Ae*o(ot))]}return qe.invert=Ae?function(Ve,ot){Ve&&(ot*=x(Ve)/Ve);var Ke=o(Ve);return[Ve,2*a(H(Ke*Ke+Ae*Ae-ot*ot)-Ke,Ae-ot)]}:function(Ve,ot){return[Ve,q(Ve?ot*b(Ve)/Ve:ot)]},qe}function de(){return ct(ue).scale(249.828).clipAngle(90)}var ht=H(3);function Et(ce,Ae){return[ht*ce*(2*o(2*Ae/3)-1)/M,ht*M*x(Ae/3)]}Et.invert=function(ce,Ae){var qe=3*q(Ae/(ht*M));return[M*ce/(ht*(2*o(2*qe/3)-1)),qe]};function St(){return t.geoProjection(Et).scale(156.19)}function Zt(ce){var Ae=o(ce);function qe(Ve,ot){return[Ve*Ae,x(ot)/Ae]}return qe.invert=function(Ve,ot){return[Ve/Ae,q(ot*Ae)]},qe}function qr(){return ct(Zt).parallel(38.58).scale(195.044)}function Lr(ce){var Ae=o(ce);function qe(Ve,ot){return[Ve*Ae,(1+Ae)*b(ot/2)]}return qe.invert=function(Ve,ot){return[Ve/Ae,i(ot/(1+Ae))*2]},qe}function vr(){return ct(Lr).scale(124.75)}function Er(ce,Ae){var qe=H(8/(3*E));return[qe*ce*(1-n(Ae)/E),qe*Ae]}Er.invert=function(ce,Ae){var qe=H(8/(3*E)),Ve=Ae/qe;return[ce/(qe*(1-n(Ve)/E)),Ve]};function si(){return t.geoProjection(Er).scale(165.664)}function Ei(ce,Ae){var qe=H(4-3*x(n(Ae)));return[2/H(6*E)*ce*qe,p(Ae)*H(2*E/3)*(2-qe)]}Ei.invert=function(ce,Ae){var qe=2-n(Ae)/H(2*E/3);return[ce*H(6*E)/(2*qe),p(Ae)*q((4-qe*qe)/3)]};function Si(){return t.geoProjection(Ei).scale(165.664)}function xi(ce,Ae){var qe=H(E*(4+E));return[2/qe*ce*(1+H(1-4*Ae*Ae/(E*E))),4/qe*Ae]}xi.invert=function(ce,Ae){var qe=H(E*(4+E))/2;return[ce*qe/(1+H(1-Ae*Ae*(4+E)/(4*E))),Ae*qe/2]};function Hi(){return t.geoProjection(xi).scale(180.739)}function Jr(ce,Ae){var qe=(2+A)*x(Ae);Ae/=2;for(var Ve=0,ot=1/0;Ve<10&&n(ot)>y;Ve++){var Ke=o(Ae);Ae-=ot=(Ae+x(Ae)*(Ke+2)-qe)/(2*Ke*(1+Ke))}return[2/H(E*(4+E))*ce*(1+o(Ae)),2*H(E/(4+E))*x(Ae)]}Jr.invert=function(ce,Ae){var qe=Ae*H((4+E)/E)/2,Ve=q(qe),ot=o(Ve);return[ce/(2/H(E*(4+E))*(1+ot)),q((Ve+qe*(ot+2))/(2+A))]};function ci(){return t.geoProjection(Jr).scale(180.739)}function Di(ce,Ae){return[ce*(1+o(Ae))/H(2+E),2*Ae/H(2+E)]}Di.invert=function(ce,Ae){var qe=H(2+E),Ve=Ae*qe/2;return[qe*ce/(1+o(Ve)),Ve]};function Lt(){return t.geoProjection(Di).scale(173.044)}function vt(ce,Ae){for(var qe=(1+A)*x(Ae),Ve=0,ot=1/0;Ve<10&&n(ot)>y;Ve++)Ae-=ot=(Ae+x(Ae)-qe)/(1+o(Ae));return qe=H(2+E),[ce*(1+o(Ae))/qe,2*Ae/qe]}vt.invert=function(ce,Ae){var qe=1+A,Ve=H(qe/2);return[ce*2*Ve/(1+o(Ae*=Ve)),q((Ae+x(Ae))/qe)]};function Dt(){return t.geoProjection(vt).scale(173.044)}var Bt=3+2*C;function sr(ce,Ae){var qe=x(ce/=2),Ve=o(ce),ot=H(o(Ae)),Ke=o(Ae/=2),ft=x(Ae)/(Ke+C*Ve*ot),qt=H(2/(1+ft*ft)),Xt=H((C*Ke+(Ve+qe)*ot)/(C*Ke+(Ve-qe)*ot));return[Bt*(qt*(Xt-1/Xt)-2*l(Xt)),Bt*(qt*ft*(Xt+1/Xt)-2*i(ft))]}sr.invert=function(ce,Ae){if(!(Ke=ke.invert(ce/1.2,Ae*1.065)))return null;var qe=Ke[0],Ve=Ke[1],ot=20,Ke;ce/=Bt,Ae/=Bt;do{var ft=qe/2,qt=Ve/2,Xt=x(ft),$t=o(ft),dr=x(qt),Mr=o(qt),$r=o(Ve),ii=H($r),pi=dr/(Mr+C*$t*ii),Yi=pi*pi,wn=H(2/(1+Yi)),Tn=C*Mr+($t+Xt)*ii,ua=C*Mr+($t-Xt)*ii,oo=Tn/ua,el=H(oo),ys=el-1/el,il=el+1/el,$l=wn*ys-2*l(el)-ce,pl=wn*pi*il-2*i(pi)-Ae,Hl=dr&&_*ii*Xt*Yi/dr,Ll=(C*$t*Mr+ii)/(2*(Mr+C*$t*ii)*(Mr+C*$t*ii)*ii),Ql=-.5*pi*wn*wn*wn,ku=Ql*Hl,Jl=Ql*Ll,Kl=(Kl=2*Mr+C*ii*($t-Xt))*Kl*el,Hu=(C*$t*Mr*ii+$r)/Kl,tf=-(C*Xt*dr)/(ii*Kl),Ku=ys*ku-2*Hu/el+wn*(Hu+Hu/oo),Gu=ys*Jl-2*tf/el+wn*(tf+tf/oo),Wu=pi*il*ku-2*Hl/(1+Yi)+wn*il*Hl+wn*pi*(Hu-Hu/oo),sf=pi*il*Jl-2*Ll/(1+Yi)+wn*il*Ll+wn*pi*(tf-tf/oo),gf=Gu*Wu-sf*Ku;if(!gf)break;var nf=(pl*Gu-$l*sf)/gf,af=($l*Wu-pl*Ku)/gf;qe-=nf,Ve=f(-A,c(A,Ve-af))}while((n(nf)>y||n(af)>y)&&--ot>0);return n(n(Ve)-A)Ve){var Mr=H(dr),$r=a($t,Xt),ii=qe*d($r/qe),pi=$r-ii,Yi=ce*o(pi),wn=(ce*x(pi)-pi*x(Yi))/(A-Yi),Tn=ki(pi,wn),ua=(E-ce)/ji(Tn,Yi,E);Xt=Mr;var oo=50,el;do Xt-=el=(ce+ji(Tn,Yi,Xt)*ua-Mr)/(Tn(Xt)*ua);while(n(el)>y&&--oo>0);$t=pi*x(Xt),XtVe){var Xt=H(qt),$t=a(ft,Ke),dr=qe*d($t/qe),Mr=$t-dr;Ke=Xt*o(Mr),ft=Xt*x(Mr);for(var $r=Ke-A,ii=x(Ke),pi=ft/ii,Yi=Key||n(pi)>y)&&--Yi>0);return[Mr,$r]},Xt}var Mi=zi(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function sn(){return t.geoProjection(Mi).scale(149.995)}var fi=zi(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Or(){return t.geoProjection(fi).scale(153.93)}var st=zi(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Wt(){return t.geoProjection(st).scale(130.945)}function tr(ce,Ae){var qe=ce*ce,Ve=Ae*Ae;return[ce*(1-.162388*Ve)*(.87-952426e-9*qe*qe),Ae*(1+Ve/12)]}tr.invert=function(ce,Ae){var qe=ce,Ve=Ae,ot=50,Ke;do{var ft=Ve*Ve;Ve-=Ke=(Ve*(1+ft/12)-Ae)/(1+ft/4)}while(n(Ke)>y&&--ot>0);ot=50,ce/=1-.162388*ft;do{var qt=(qt=qe*qe)*qt;qe-=Ke=(qe*(.87-952426e-9*qt)-ce)/(.87-.00476213*qt)}while(n(Ke)>y&&--ot>0);return[qe,Ve]};function or(){return t.geoProjection(tr).scale(131.747)}var Nr=zi(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function hi(){return t.geoProjection(Nr).scale(131.087)}function Gi(ce){var Ae=ce(A,0)[0]-ce(-A,0)[0];function qe(Ve,ot){var Ke=Ve>0?-.5:.5,ft=ce(Ve+Ke*E,ot);return ft[0]-=Ke*Ae,ft}return ce.invert&&(qe.invert=function(Ve,ot){var Ke=Ve>0?-.5:.5,ft=ce.invert(Ve+Ke*Ae,ot),qt=ft[0]-Ke*E;return qt<-E?qt+=2*E:qt>E&&(qt-=2*E),ft[0]=qt,ft}),qe}function Qr(ce,Ae){var qe=p(ce),Ve=p(Ae),ot=o(Ae),Ke=o(ce)*ot,ft=x(ce)*ot,qt=x(Ve*Ae);ce=n(a(ft,qt)),Ae=q(Ke),n(ce-A)>y&&(ce%=A);var Xt=Ui(ce>E/4?A-ce:ce,Ae);return ce>E/4&&(qt=Xt[0],Xt[0]=-Xt[1],Xt[1]=-qt),Xt[0]*=qe,Xt[1]*=-Ve,Xt}Qr.invert=function(ce,Ae){n(ce)>1&&(ce=p(ce)*2-ce),n(Ae)>1&&(Ae=p(Ae)*2-Ae);var qe=p(ce),Ve=p(Ae),ot=-qe*ce,Ke=-Ve*Ae,ft=Ke/ot<1,qt=zn(ft?Ke:ot,ft?ot:Ke),Xt=qt[0],$t=qt[1],dr=o($t);return ft&&(Xt=-A-Xt),[qe*(a(x(Xt)*dr,-x($t))+E),Ve*q(o(Xt)*dr)]};function Ui(ce,Ae){if(Ae===A)return[0,0];var qe=x(Ae),Ve=qe*qe,ot=Ve*Ve,Ke=1+ot,ft=1+3*ot,qt=1-ot,Xt=q(1/H(Ke)),$t=qt+Ve*Ke*Xt,dr=(1-qe)/$t,Mr=H(dr),$r=dr*Ke,ii=H($r),pi=Mr*qt,Yi,wn;if(ce===0)return[0,-(pi+Ve*ii)];var Tn=o(Ae),ua=1/Tn,oo=2*qe*Tn,el=(-3*Ve+Xt*ft)*oo,ys=(-$t*Tn-(1-qe)*el)/($t*$t),il=.5*ys/Mr,$l=qt*il-2*Ve*Mr*oo,pl=Ve*Ke*ys+dr*ft*oo,Hl=-ua*oo,Ll=-ua*pl,Ql=-2*ua*$l,ku=4*ce/E,Jl;if(ce>.222*E||Ae.175*E){if(Yi=(pi+Ve*H($r*(1+ot)-pi*pi))/(1+ot),ce>E/4)return[Yi,Yi];var Kl=Yi,Hu=.5*Yi;Yi=.5*(Hu+Kl),wn=50;do{var tf=H($r-Yi*Yi),Ku=Yi*(Ql+Hl*tf)+Ll*q(Yi/ii)-ku;if(!Ku)break;Ku<0?Hu=Yi:Kl=Yi,Yi=.5*(Hu+Kl)}while(n(Kl-Hu)>y&&--wn>0)}else{Yi=y,wn=25;do{var Gu=Yi*Yi,Wu=H($r-Gu),sf=Ql+Hl*Wu,gf=Yi*sf+Ll*q(Yi/ii)-ku,nf=sf+(Ll-Hl*Gu)/Wu;Yi-=Jl=Wu?gf/nf:0}while(n(Jl)>y&&--wn>0)}return[Yi,-pi-Ve*H($r-Yi*Yi)]}function zn(ce,Ae){for(var qe=0,Ve=1,ot=.5,Ke=50;;){var ft=ot*ot,qt=H(ot),Xt=q(1/H(1+ft)),$t=1-ft+ot*(1+ft)*Xt,dr=(1-qt)/$t,Mr=H(dr),$r=dr*(1+ft),ii=Mr*(1-ft),pi=$r-ce*ce,Yi=H(pi),wn=Ae+ii+ot*Yi;if(n(Ve-qe)0?qe=ot:Ve=ot,ot=.5*(qe+Ve)}if(!Ke)return null;var Tn=q(qt),ua=o(Tn),oo=1/ua,el=2*qt*ua,ys=(-3*ot+Xt*(1+3*ft))*el,il=(-$t*ua-(1-qt)*ys)/($t*$t),$l=.5*il/Mr,pl=(1-ft)*$l-2*ot*Mr*el,Hl=-2*oo*pl,Ll=-oo*el,Ql=-oo*(ot*(1+ft)*il+dr*(1+3*ft)*el);return[E/4*(ce*(Hl+Ll*Yi)+Ql*q(ce/H($r))),Tn]}function fn(){return t.geoProjection(Gi(Qr)).scale(239.75)}function xn(ce,Ae,qe){var Ve,ot,Ke;return ce?(Ve=_a(ce,qe),Ae?(ot=_a(Ae,1-qe),Ke=ot[1]*ot[1]+qe*Ve[0]*Ve[0]*ot[0]*ot[0],[[Ve[0]*ot[2]/Ke,Ve[1]*Ve[2]*ot[0]*ot[1]/Ke],[Ve[1]*ot[1]/Ke,-Ve[0]*Ve[2]*ot[0]*ot[2]/Ke],[Ve[2]*ot[1]*ot[2]/Ke,-qe*Ve[0]*Ve[1]*ot[0]/Ke]]):[[Ve[0],0],[Ve[1],0],[Ve[2],0]]):(ot=_a(Ae,1-qe),[[0,ot[0]/ot[1]],[1/ot[1],0],[ot[2]/ot[1],0]])}function _a(ce,Ae){var qe,Ve,ot,Ke,ft;if(Ae=1-y)return qe=(1-Ae)/4,Ve=O(ce),Ke=j(ce),ot=1/Ve,ft=Ve*G(ce),[Ke+qe*(ft-ce)/(Ve*Ve),ot-qe*Ke*ot*(ft-ce),ot+qe*Ke*ot*(ft+ce),2*i(s(ce))-A+qe*(ft-ce)/Ve];var qt=[1,0,0,0,0,0,0,0,0],Xt=[H(Ae),0,0,0,0,0,0,0,0],$t=0;for(Ve=H(1-Ae),ft=1;n(Xt[$t]/qt[$t])>y&&$t<8;)qe=qt[$t++],Xt[$t]=(qe-Ve)/2,qt[$t]=(qe+Ve)/2,Ve=H(qe*Ve),ft*=2;ot=ft*qt[$t]*ce;do Ke=Xt[$t]*x(Ve=ot)/qt[$t],ot=(q(Ke)+ot)/2;while(--$t);return[x(ot),Ke=o(ot),Ke/o(ot-Ve),ot]}function Wn(ce,Ae,qe){var Ve=n(ce),ot=n(Ae),Ke=G(ot);if(Ve){var ft=1/x(Ve),qt=1/(b(Ve)*b(Ve)),Xt=-(qt+qe*(Ke*Ke*ft*ft)-1+qe),$t=(qe-1)*qt,dr=(-Xt+H(Xt*Xt-4*$t))/2;return[Fn(i(1/H(dr)),qe)*p(ce),Fn(i(H((dr/qt-1)/qe)),1-qe)*p(Ae)]}return[0,Fn(i(Ke),1-qe)*p(Ae)]}function Fn(ce,Ae){if(!Ae)return ce;if(Ae===1)return l(b(ce/2+L));for(var qe=1,Ve=H(1-Ae),ot=H(Ae),Ke=0;n(ot)>y;Ke++){if(ce%E){var ft=i(Ve*b(ce)/qe);ft<0&&(ft+=E),ce+=ft+~~(ce/E)*E}else ce+=ce;ot=(qe+Ve)/2,Ve=H(qe*Ve),ot=((qe=ot)-Ve)/2}return ce/(h(2,Ke)*qe)}function ia(ce,Ae){var qe=(C-1)/(C+1),Ve=H(1-qe*qe),ot=Fn(A,Ve*Ve),Ke=-1,ft=l(b(E/4+n(Ae)/2)),qt=s(Ke*ft)/H(qe),Xt=za(qt*o(Ke*ce),qt*x(Ke*ce)),$t=Wn(Xt[0],Xt[1],Ve*Ve);return[-$t[1],(Ae>=0?1:-1)*(.5*ot-$t[0])]}function za(ce,Ae){var qe=ce*ce,Ve=Ae+1,ot=1-qe-Ae*Ae;return[.5*((ce>=0?A:-A)-a(ot,2*ce)),-.25*l(ot*ot+4*qe)+.5*l(Ve*Ve+qe)]}function Hr(ce,Ae){var qe=Ae[0]*Ae[0]+Ae[1]*Ae[1];return[(ce[0]*Ae[0]+ce[1]*Ae[1])/qe,(ce[1]*Ae[0]-ce[0]*Ae[1])/qe]}ia.invert=function(ce,Ae){var qe=(C-1)/(C+1),Ve=H(1-qe*qe),ot=Fn(A,Ve*Ve),Ke=-1,ft=xn(.5*ot-Ae,-ce,Ve*Ve),qt=Hr(ft[0],ft[1]),Xt=a(qt[1],qt[0])/Ke;return[Xt,2*i(s(.5/Ke*l(qe*qt[0]*qt[0]+qe*qt[1]*qt[1])))-A]};function na(){return t.geoProjection(Gi(ia)).scale(151.496)}function go(ce){var Ae=x(ce),qe=o(ce),Ve=Dn(ce);Ve.invert=Dn(-ce);function ot(Ke,ft){var qt=Ve(Ke,ft);Ke=qt[0],ft=qt[1];var Xt=x(ft),$t=o(ft),dr=o(Ke),Mr=U(Ae*Xt+qe*$t*dr),$r=x(Mr),ii=n($r)>y?Mr/$r:1;return[ii*qe*x(Ke),(n(Ke)>A?ii:-ii)*(Ae*$t-qe*Xt*dr)]}return ot.invert=function(Ke,ft){var qt=H(Ke*Ke+ft*ft),Xt=-x(qt),$t=o(qt),dr=qt*$t,Mr=-ft*Xt,$r=qt*Ae,ii=H(dr*dr+Mr*Mr-$r*$r),pi=a(dr*$r+Mr*ii,Mr*$r-dr*ii),Yi=(qt>A?-1:1)*a(Ke*Xt,qt*o(pi)*$t+ft*x(pi)*Xt);return Ve.invert(Yi,pi)},ot}function Dn(ce){var Ae=x(ce),qe=o(ce);return function(Ve,ot){var Ke=o(ot),ft=o(Ve)*Ke,qt=x(Ve)*Ke,Xt=x(ot);return[a(qt,ft*qe-Xt*Ae),q(Xt*qe+ft*Ae)]}}function un(){var ce=0,Ae=t.geoProjectionMutator(go),qe=Ae(ce),Ve=qe.rotate,ot=qe.stream,Ke=t.geoCircle();return qe.parallel=function(ft){if(!arguments.length)return ce*z;var qt=qe.rotate();return Ae(ce=ft*T).rotate(qt)},qe.rotate=function(ft){return arguments.length?(Ve.call(qe,[ft[0],ft[1]-ce*z]),Ke.center([-ft[0],-ft[1]]),qe):(ft=Ve.call(qe),ft[1]+=ce*z,ft)},qe.stream=function(ft){return ft=ot(ft),ft.sphere=function(){ft.polygonStart();var qt=.01,Xt=Ke.radius(90-qt)().coordinates[0],$t=Xt.length-1,dr=-1,Mr;for(ft.lineStart();++dr<$t;)ft.point((Mr=Xt[dr])[0],Mr[1]);for(ft.lineEnd(),Xt=Ke.radius(90+qt)().coordinates[0],$t=Xt.length-1,ft.lineStart();--dr>=0;)ft.point((Mr=Xt[dr])[0],Mr[1]);ft.lineEnd(),ft.polygonEnd()},ft},qe.scale(79.4187).parallel(45).clipAngle(180-.001)}var Zn=3,Wo=q(1-1/Zn)*z,Ba=Zt(0);function Bo(ce){var Ae=Wo*T,qe=lt(E,Ae)[0]-lt(-E,Ae)[0],Ve=Ba(0,Ae)[1],ot=lt(0,Ae)[1],Ke=M-ot,ft=v/ce,qt=4/v,Xt=Ve+Ke*Ke*4/v;function $t(dr,Mr){var $r,ii=n(Mr);if(ii>Ae){var pi=c(ce-1,f(0,u((dr+E)/ft)));dr+=E*(ce-1)/ce-pi*ft,$r=lt(dr,ii),$r[0]=$r[0]*v/qe-v*(ce-1)/(2*ce)+pi*v/ce,$r[1]=Ve+($r[1]-ot)*4*Ke/v,Mr<0&&($r[1]=-$r[1])}else $r=Ba(dr,Mr);return $r[0]*=qt,$r[1]/=Xt,$r}return $t.invert=function(dr,Mr){dr/=qt,Mr*=Xt;var $r=n(Mr);if($r>Ve){var ii=c(ce-1,f(0,u((dr+E)/ft)));dr=(dr+E*(ce-1)/ce-ii*ft)*qe/v;var pi=lt.invert(dr,.25*($r-Ve)*v/Ke+ot);return pi[0]-=E*(ce-1)/ce-ii*ft,Mr<0&&(pi[1]=-pi[1]),pi}return Ba.invert(dr,Mr)},$t}function Ea(ce,Ae){return[ce,Ae&1?90-y:Wo]}function Ha(ce,Ae){return[ce,Ae&1?-90+y:-Wo]}function tn(ce){return[ce[0]*(1-y),ce[1]]}function Cn(ce){var Ae=[].concat(r.range(-180,180+ce/2,ce).map(Ea),r.range(180,-180-ce/2,-ce).map(Ha));return{type:"Polygon",coordinates:[ce===180?Ae.map(tn):Ae]}}function Xn(){var ce=4,Ae=t.geoProjectionMutator(Bo),qe=Ae(ce),Ve=qe.stream;return qe.lobes=function(ot){return arguments.length?Ae(ce=+ot):ce},qe.stream=function(ot){var Ke=qe.rotate(),ft=Ve(ot),qt=(qe.rotate([0,0]),Ve(ot));return qe.rotate(Ke),ft.sphere=function(){t.geoStream(Cn(180/ce),qt)},ft},qe.scale(239.75)}function ts(ce){var Ae=1+ce,qe=x(1/Ae),Ve=q(qe),ot=2*H(E/(Ke=E+4*Ve*Ae)),Ke,ft=.5*ot*(Ae+H(ce*(2+ce))),qt=ce*ce,Xt=Ae*Ae;function $t(dr,Mr){var $r=1-x(Mr),ii,pi;if($r&&$r<2){var Yi=A-Mr,wn=25,Tn;do{var ua=x(Yi),oo=o(Yi),el=Ve+a(ua,Ae-oo),ys=1+Xt-2*Ae*oo;Yi-=Tn=(Yi-qt*Ve-Ae*ua+ys*el-.5*$r*Ke)/(2*Ae*ua*el)}while(n(Tn)>k&&--wn>0);ii=ot*H(ys),pi=dr*el/E}else ii=ot*(ce+$r),pi=dr*Ve/E;return[ii*x(pi),ft-ii*o(pi)]}return $t.invert=function(dr,Mr){var $r=dr*dr+(Mr-=ft)*Mr,ii=(1+Xt-$r/(ot*ot))/(2*Ae),pi=U(ii),Yi=x(pi),wn=Ve+a(Yi,Ae-ii);return[q(dr/H($r))*E/wn,q(1-2*(pi-qt*Ve-Ae*Yi+(1+Xt-2*Ae*ii)*wn)/Ke)]},$t}function Ja(){var ce=1,Ae=t.geoProjectionMutator(ts),qe=Ae(ce);return qe.ratio=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(167.774).center([0,18.67])}var to=.7109889596207567,Ri=.0528035274542;function an(ce,Ae){return Ae>-to?(ce=Ct(ce,Ae),ce[1]+=Ri,ce):rt(ce,Ae)}an.invert=function(ce,Ae){return Ae>-to?Ct.invert(ce,Ae-Ri):rt.invert(ce,Ae)};function cs(){return t.geoProjection(an).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function pa(ce,Ae){return n(Ae)>to?(ce=Ct(ce,Ae),ce[1]-=Ae>0?Ri:-Ri,ce):rt(ce,Ae)}pa.invert=function(ce,Ae){return n(Ae)>to?Ct.invert(ce,Ae+(Ae>0?Ri:-Ri)):rt.invert(ce,Ae)};function ln(){return t.geoProjection(pa).scale(152.63)}function ka(ce,Ae,qe,Ve){var ot=H(4*E/(2*qe+(1+ce-Ae/2)*x(2*qe)+(ce+Ae)/2*x(4*qe)+Ae/2*x(6*qe))),Ke=H(Ve*x(qe)*H((1+ce*o(2*qe)+Ae*o(4*qe))/(1+ce+Ae))),ft=qe*Xt(1);function qt(Mr){return H(1+ce*o(2*Mr)+Ae*o(4*Mr))}function Xt(Mr){var $r=Mr*qe;return(2*$r+(1+ce-Ae/2)*x(2*$r)+(ce+Ae)/2*x(4*$r)+Ae/2*x(6*$r))/qe}function $t(Mr){return qt(Mr)*x(Mr)}var dr=function(Mr,$r){var ii=qe*Pt(Xt,ft*x($r)/qe,$r/E);isNaN(ii)&&(ii=qe*p($r));var pi=ot*qt(ii);return[pi*Ke*Mr/E*o(ii),pi/Ke*x(ii)]};return dr.invert=function(Mr,$r){var ii=Pt($t,$r*Ke/ot);return[Mr*E/(o(ii)*ot*Ke*qt(ii)),q(qe*Xt(ii/qe)/ft)]},qe===0&&(ot=H(Ve/E),dr=function(Mr,$r){return[Mr*ot,x($r)/ot]},dr.invert=function(Mr,$r){return[Mr/ot,q($r*ot)]}),dr}function va(){var ce=1,Ae=0,qe=45*T,Ve=2,ot=t.geoProjectionMutator(ka),Ke=ot(ce,Ae,qe,Ve);return Ke.a=function(ft){return arguments.length?ot(ce=+ft,Ae,qe,Ve):ce},Ke.b=function(ft){return arguments.length?ot(ce,Ae=+ft,qe,Ve):Ae},Ke.psiMax=function(ft){return arguments.length?ot(ce,Ae,qe=+ft*T,Ve):qe*z},Ke.ratio=function(ft){return arguments.length?ot(ce,Ae,qe,Ve=+ft):Ve},Ke.scale(180.739)}function bo(ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr){if(dr.nanEncountered)return NaN;var Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el;if(Mr=qe-Ae,$r=ce(Ae+Mr*.25),ii=ce(qe-Mr*.25),isNaN($r)){dr.nanEncountered=!0;return}if(isNaN(ii)){dr.nanEncountered=!0;return}return pi=Mr*(Ve+4*$r+ot)/12,Yi=Mr*(ot+4*ii+Ke)/12,wn=pi+Yi,el=(wn-ft)/15,$t>Xt?(dr.maxDepthCount++,wn+el):Math.abs(el)>1;do Xt[wn]>ii?Yi=wn:pi=wn,wn=pi+Yi>>1;while(wn>pi);var Tn=Xt[wn+1]-Xt[wn];return Tn&&(Tn=(ii-Xt[wn+1])/Tn),(wn+1+Tn)/ft}var Mr=2*dr(1)/E*Ke/qe,$r=function(ii,pi){var Yi=dr(n(x(pi))),wn=Ve(Yi)*ii;return Yi/=Mr,[wn,pi>=0?Yi:-Yi]};return $r.invert=function(ii,pi){var Yi;return pi*=Mr,n(pi)<1&&(Yi=p(pi)*q(ot(n(pi))*Ke)),[ii/Ve(n(pi)),Yi]},$r}function Yn(){var ce=0,Ae=2.5,qe=1.183136,Ve=t.geoProjectionMutator(Fi),ot=Ve(ce,Ae,qe);return ot.alpha=function(Ke){return arguments.length?Ve(ce=+Ke,Ae,qe):ce},ot.k=function(Ke){return arguments.length?Ve(ce,Ae=+Ke,qe):Ae},ot.gamma=function(Ke){return arguments.length?Ve(ce,Ae,qe=+Ke):qe},ot.scale(152.63)}function xa(ce,Ae){return n(ce[0]-Ae[0])=0;--Xt)qe=ce[1][Xt],Ve=qe[0][0],ot=qe[0][1],Ke=qe[1][1],ft=qe[2][0],qt=qe[2][1],Ae.push(Qi([[ft-y,qt-y],[ft-y,Ke+y],[Ve+y,Ke+y],[Ve+y,ot-y]],30));return{type:"Polygon",coordinates:[r.merge(Ae)]}}function Pn(ce,Ae,qe){var Ve,ot;function Ke(Xt,$t){for(var dr=$t<0?-1:1,Mr=Ae[+($t<0)],$r=0,ii=Mr.length-1;$rMr[$r][2][0];++$r);var pi=ce(Xt-Mr[$r][1][0],$t);return pi[0]+=ce(Mr[$r][1][0],dr*$t>dr*Mr[$r][0][1]?Mr[$r][0][1]:$t)[0],pi}qe?Ke.invert=qe(Ke):ce.invert&&(Ke.invert=function(Xt,$t){for(var dr=ot[+($t<0)],Mr=Ae[+($t<0)],$r=0,ii=dr.length;$rpi&&(Yi=ii,ii=pi,pi=Yi),[[Mr,ii],[$r,pi]]})}),ft):Ae.map(function($t){return $t.map(function(dr){return[[dr[0][0]*z,dr[0][1]*z],[dr[1][0]*z,dr[1][1]*z],[dr[2][0]*z,dr[2][1]*z]]})})},Ae!=null&&ft.lobes(Ae),ft}var qa=[[[[-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 jo(){return Pn(nt,qa).scale(160.857)}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Pa(){return Pn(pa,Vo).scale(152.63)}var Oa=[[[[-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 co(){return Pn(Ct,Oa).scale(169.529)}var An=[[[[-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 _o(){return Pn(Ct,An).scale(169.529).rotate([20,0])}var ks=[[[[-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 bs(){return Pn(an,ks,Qe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function sa(){return Pn(rt,ps).scale(152.63).rotate([-20,0])}function Bn(ce,Ae){return[3/v*ce*H(E*E/3-Ae*Ae),Ae]}Bn.invert=function(ce,Ae){return[v/3*ce/H(E*E/3-Ae*Ae),Ae]};function ms(){return t.geoProjection(Bn).scale(158.837)}function ya(ce){function Ae(qe,Ve){if(n(n(Ve)-A)2)return null;qe/=2,Ve/=2;var Ke=qe*qe,ft=Ve*Ve,qt=2*Ve/(1+Ke+ft);return qt=h((1+qt)/(1-qt),1/ce),[a(2*qe,1-Ke-ft)/ce,q((qt-1)/(qt+1))]},Ae}function on(){var ce=.5,Ae=t.geoProjectionMutator(ya),qe=Ae(ce);return qe.spacing=function(Ve){return arguments.length?Ae(ce=+Ve):ce},qe.scale(124.75)}var mn=E/C;function Ga(ce,Ae){return[ce*(1+H(o(Ae)))/2,Ae/(o(Ae/2)*o(ce/6))]}Ga.invert=function(ce,Ae){var qe=n(ce),Ve=n(Ae),ot=y,Ke=A;Vey||n(wn)>y)&&--ot>0);return ot&&[qe,Ve]};function Xi(){return t.geoProjection(bn).scale(139.98)}function qn(ce,Ae){return[x(ce)/o(Ae),b(Ae)*o(ce)]}qn.invert=function(ce,Ae){var qe=ce*ce,Ve=Ae*Ae,ot=Ve+1,Ke=qe+ot,ft=ce?_*H((Ke-H(Ke*Ke-4*qe))/qe):1/H(ot);return[q(ce*ft),p(Ae)*U(ft)]};function Ia(){return t.geoProjection(qn).scale(144.049).clipAngle(90-.001)}function yn(ce){var Ae=o(ce),qe=b(L+ce/2);function Ve(ot,Ke){var ft=Ke-ce,qt=n(ft)=0;)dr=ce[$t],Mr=dr[0]+qt*(ii=Mr)-Xt*$r,$r=dr[1]+qt*$r+Xt*ii;return Mr=qt*(ii=Mr)-Xt*$r,$r=qt*$r+Xt*ii,[Mr,$r]}return qe.invert=function(Ve,ot){var Ke=20,ft=Ve,qt=ot;do{for(var Xt=Ae,$t=ce[Xt],dr=$t[0],Mr=$t[1],$r=0,ii=0,pi;--Xt>=0;)$t=ce[Xt],$r=dr+ft*(pi=$r)-qt*ii,ii=Mr+ft*ii+qt*pi,dr=$t[0]+ft*(pi=dr)-qt*Mr,Mr=$t[1]+ft*Mr+qt*pi;$r=dr+ft*(pi=$r)-qt*ii,ii=Mr+ft*ii+qt*pi,dr=ft*(pi=dr)-qt*Mr-Ve,Mr=ft*Mr+qt*pi-ot;var Yi=$r*$r+ii*ii,wn,Tn;ft-=wn=(dr*$r+Mr*ii)/Yi,qt-=Tn=(Mr*$r-dr*ii)/Yi}while(n(wn)+n(Tn)>y*y&&--Ke>0);if(Ke){var ua=H(ft*ft+qt*qt),oo=2*i(ua*.5),el=x(oo);return[a(ft*el,ua*o(oo)),ua?q(qt*el/ua):0]}},qe}var Ln=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],wo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],wa=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],$i=[[.9245,0],[0,0],[.01943,0]],ea=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Sa(){return Un(Ln,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Za(){return Un(wo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function xo(){return Un(wa,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Wa(){return Un($i,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function hn(){return Un(ea,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Un(ce,Ae){var qe=t.geoProjection(Aa(ce)).rotate(Ae).clipAngle(90),Ve=t.geoRotation(Ae),ot=qe.center;return delete qe.rotate,qe.center=function(Ke){return arguments.length?ot(Ve(Ke)):Ve.invert(ot())},qe}var Ss=H(6),Kn=H(7);function ns(ce,Ae){var qe=q(7*x(Ae)/(3*Ss));return[Ss*ce*(2*o(2*qe/3)-1)/Kn,9*x(qe/3)/Kn]}ns.invert=function(ce,Ae){var qe=3*q(Ae*Kn/9);return[ce*Kn/(Ss*(2*o(2*qe/3)-1)),q(x(qe)*3*Ss/7)]};function Jo(){return t.geoProjection(ns).scale(164.859)}function vo(ce,Ae){for(var qe=(1+_)*x(Ae),Ve=Ae,ot=0,Ke;ot<25&&(Ve-=Ke=(x(Ve/2)+x(Ve)-qe)/(.5*o(Ve/2)+o(Ve)),!(n(Ke)k&&--Ve>0);return Ke=qe*qe,ft=Ke*Ke,qt=Ke*ft,[ce/(.84719-.13063*Ke+qt*qt*(-.04515+.05494*Ke-.02326*ft+.00331*qt)),qe]};function la(){return t.geoProjection(Ao).scale(175.295)}function Ki(ce,Ae){return[ce*(1+o(Ae))/2,2*(Ae-b(Ae/2))]}Ki.invert=function(ce,Ae){for(var qe=Ae/2,Ve=0,ot=1/0;Ve<10&&n(ot)>y;++Ve){var Ke=o(Ae/2);Ae-=ot=(Ae-b(Ae/2)-qe)/(1-.5/(Ke*Ke))}return[2*ce/(1+o(Ae)),Ae]};function ho(){return t.geoProjection(Ki).scale(152.63)}var Ka=[[[[-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 Ca(){return Pn(Ze(1/0),Ka).rotate([20,0]).scale(152.63)}function ta(ce,Ae){var qe=x(Ae),Ve=o(Ae),ot=p(ce);if(ce===0||n(Ae)===A)return[0,Ae];if(Ae===0)return[ce,0];if(n(ce)===A)return[ce*Ve,A*qe];var Ke=E/(2*ce)-2*ce/E,ft=2*Ae/E,qt=(1-ft*ft)/(qe-ft),Xt=Ke*Ke,$t=qt*qt,dr=1+Xt/$t,Mr=1+$t/Xt,$r=(Ke*qe/qt-Ke/2)/dr,ii=($t*qe/Xt+qt/2)/Mr,pi=$r*$r+Ve*Ve/dr,Yi=ii*ii-($t*qe*qe/Xt+qt*qe-1)/Mr;return[A*($r+H(pi)*ot),A*(ii+H(Yi<0?0:Yi)*p(-Ae*Ke)*ot)]}ta.invert=function(ce,Ae){ce/=A,Ae/=A;var qe=ce*ce,Ve=Ae*Ae,ot=qe+Ve,Ke=E*E;return[ce?(ot-1+H((1-ot)*(1-ot)+4*qe))/(2*ce)*A:0,Pt(function(ft){return ot*(E*x(ft)-2*ft)*E+4*ft*ft*(Ae-x(ft))+2*E*ft-Ke*Ae},0)]};function En(){return t.geoProjection(ta).scale(127.267)}var Mo=1.0148,Ds=.23185,Ro=-.14499,vs=.02406,Ks=Mo,as=5*Ds,Jn=7*Ro,Cs=9*vs,Xa=1.790857183;function Zo(ce,Ae){var qe=Ae*Ae;return[ce,Ae*(Mo+qe*qe*(Ds+qe*(Ro+vs*qe)))]}Zo.invert=function(ce,Ae){Ae>Xa?Ae=Xa:Ae<-Xa&&(Ae=-Xa);var qe=Ae,Ve;do{var ot=qe*qe;qe-=Ve=(qe*(Mo+ot*ot*(Ds+ot*(Ro+vs*ot)))-Ae)/(Ks+ot*ot*(as+ot*(Jn+Cs*ot)))}while(n(Ve)>y);return[ce,qe]};function Eo(){return t.geoProjection(Zo).scale(139.319)}function lo(ce,Ae){if(n(Ae)y&&--ot>0);return ft=b(Ve),[(n(Ae)=0;)if(Ve=Ae[qt],qe[0]===Ve[0]&&qe[1]===Ve[1]){if(Ke)return[Ke,qe];Ke=qe}}}function Qn(ce){for(var Ae=ce.length,qe=[],Ve=ce[Ae-1],ot=0;ot0?[-Ve[0],0]:[180-Ve[0],180])};var Ae=$o.map(function(qe){return{face:qe,project:ce(qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(qe,Ve){var ot=Ae[qe];ot&&(ot.children||(ot.children=[])).push(Ae[Ve])}),xs(Ae[0],function(qe,Ve){return Ae[qe<-E/2?Ve<0?6:4:qe<0?Ve<0?2:0:qeVe^ii>Ve&&qe<($r-$t)*(Ve-dr)/(ii-dr)+$t&&(ot=!ot)}return ot}function ws(ce,Ae){var qe=Ae.stream,Ve;if(!qe)throw new Error("invalid projection");switch(ce&&ce.type){case"Feature":Ve=Ls;break;case"FeatureCollection":Ve=no;break;default:Ve=Xs;break}return Ve(ce,qe)}function no(ce,Ae){return{type:"FeatureCollection",features:ce.features.map(function(qe){return Ls(qe,Ae)})}}function Ls(ce,Ae){return{type:"Feature",id:ce.id,properties:ce.properties,geometry:Xs(ce.geometry,Ae)}}function ds(ce,Ae){return{type:"GeometryCollection",geometries:ce.geometries.map(function(qe){return Xs(qe,Ae)})}}function Xs(ce,Ae){if(!ce)return null;if(ce.type==="GeometryCollection")return ds(ce,Ae);var qe;switch(ce.type){case"Point":qe=po;break;case"MultiPoint":qe=po;break;case"LineString":qe=ss;break;case"MultiLineString":qe=ss;break;case"Polygon":qe=ls;break;case"MultiPolygon":qe=ls;break;case"Sphere":qe=ls;break;default:return null}return t.geoStream(ce,Ae(qe)),qe.result()}var oa=[],Yo=[],po={point:function(ce,Ae){oa.push([ce,Ae])},result:function(){var ce=oa.length?oa.length<2?{type:"Point",coordinates:oa[0]}:{type:"MultiPoint",coordinates:oa}:null;return oa=[],ce}},ss={lineStart:No,point:function(ce,Ae){oa.push([ce,Ae])},lineEnd:function(){oa.length&&(Yo.push(oa),oa=[])},result:function(){var ce=Yo.length?Yo.length<2?{type:"LineString",coordinates:Yo[0]}:{type:"MultiLineString",coordinates:Yo}:null;return Yo=[],ce}},ls={polygonStart:No,lineStart:No,point:function(ce,Ae){oa.push([ce,Ae])},lineEnd:function(){var ce=oa.length;if(ce){do oa.push(oa[0].slice());while(++ce<4);Yo.push(oa),oa=[]}},polygonEnd:No,result:function(){if(!Yo.length)return null;var ce=[],Ae=[];return Yo.forEach(function(qe){Zs(qe)?ce.push([qe]):Ae.push(qe)}),Ae.forEach(function(qe){var Ve=qe[0];ce.some(function(ot){if(Fs(ot[0],Ve))return ot.push(qe),!0})||ce.push([qe])}),Yo=[],ce.length?ce.length>1?{type:"MultiPolygon",coordinates:ce}:{type:"Polygon",coordinates:ce[0]}:null}};function gs(ce){var Ae=ce(A,0)[0]-ce(-A,0)[0];function qe(Ve,ot){var Ke=n(Ve)0?Ve-E:Ve+E,ot),qt=(ft[0]-ft[1])*_,Xt=(ft[0]+ft[1])*_;if(Ke)return[qt,Xt];var $t=Ae*_,dr=qt>0^Xt>0?-1:1;return[dr*qt-p(Xt)*$t,dr*Xt-p(qt)*$t]}return ce.invert&&(qe.invert=function(Ve,ot){var Ke=(Ve+ot)*_,ft=(ot-Ve)*_,qt=n(Ke)<.5*Ae&&n(ft)<.5*Ae;if(!qt){var Xt=Ae*_,$t=Ke>0^ft>0?-1:1,dr=-$t*Ve+(ft>0?1:-1)*Xt,Mr=-$t*ot+(Ke>0?1:-1)*Xt;Ke=(-dr-Mr)*_,ft=(dr-Mr)*_}var $r=ce.invert(Ke,ft);return qt||($r[0]+=Ke>0?E:-E),$r}),t.geoProjection(qe).rotate([-90,-90,45]).clipAngle(180-.001)}function bt(){return gs(Qr).scale(176.423)}function Ft(){return gs(ia).scale(111.48)}function hr(ce,Ae){if(!(0<=(Ae=+Ae)&&Ae<=20))throw new Error("invalid digits");function qe($t){var dr=$t.length,Mr=2,$r=new Array(dr);for($r[0]=+$t[0].toFixed(Ae),$r[1]=+$t[1].toFixed(Ae);Mr2||ii[0]!=dr[0]||ii[1]!=dr[1])&&(Mr.push(ii),dr=ii)}return Mr.length===1&&$t.length>1&&Mr.push(qe($t[$t.length-1])),Mr}function Ke($t){return $t.map(ot)}function ft($t){if($t==null)return $t;var dr;switch($t.type){case"GeometryCollection":dr={type:"GeometryCollection",geometries:$t.geometries.map(ft)};break;case"Point":dr={type:"Point",coordinates:qe($t.coordinates)};break;case"MultiPoint":dr={type:$t.type,coordinates:Ve($t.coordinates)};break;case"LineString":dr={type:$t.type,coordinates:ot($t.coordinates)};break;case"MultiLineString":case"Polygon":dr={type:$t.type,coordinates:Ke($t.coordinates)};break;case"MultiPolygon":dr={type:"MultiPolygon",coordinates:$t.coordinates.map(Ke)};break;default:return $t}return $t.bbox!=null&&(dr.bbox=$t.bbox),dr}function qt($t){var dr={type:"Feature",properties:$t.properties,geometry:ft($t.geometry)};return $t.id!=null&&(dr.id=$t.id),$t.bbox!=null&&(dr.bbox=$t.bbox),dr}if(ce!=null)switch(ce.type){case"Feature":return qt(ce);case"FeatureCollection":{var Xt={type:"FeatureCollection",features:ce.features.map(qt)};return ce.bbox!=null&&(Xt.bbox=ce.bbox),Xt}default:return ft(ce)}return ce}function nr(ce){var Ae=x(ce);function qe(Ve,ot){var Ke=Ae?b(Ve*Ae/2)/Ae:Ve/2;if(!ot)return[2*Ke,-ce];var ft=2*i(Ke*x(ot)),qt=1/b(ot);return[x(ft)*qt,ot+(1-o(ft))*qt-ce]}return qe.invert=function(Ve,ot){if(n(ot+=ce)y&&--qt>0);var $r=Ve*($t=b(ft)),ii=b(n(ot)0?A:-A)*(Xt+ot*(dr-ft)/2+ot*ot*(dr-2*Xt+ft)/2)]}di.invert=function(ce,Ae){var qe=Ae/A,Ve=qe*90,ot=c(18,n(Ve/5)),Ke=f(0,u(ot));do{var ft=li[Ke][1],qt=li[Ke+1][1],Xt=li[c(19,Ke+2)][1],$t=Xt-ft,dr=Xt-2*qt+ft,Mr=2*(n(qe)-qt)/$t,$r=dr/$t,ii=Mr*(1-$r*Mr*(1-2*$r*Mr));if(ii>=0||Ke===1){Ve=(Ae>=0?5:-5)*(ii+ot);var pi=50,Yi;do ot=c(18,n(Ve)/5),Ke=u(ot),ii=ot-Ke,ft=li[Ke][1],qt=li[Ke+1][1],Xt=li[c(19,Ke+2)][1],Ve-=(Yi=(Ae>=0?A:-A)*(qt+ii*(Xt-ft)/2+ii*ii*(Xt-2*qt+ft)/2)-Ae)*z;while(n(Yi)>k&&--pi>0);break}}while(--Ke>=0);var wn=li[Ke][0],Tn=li[Ke+1][0],ua=li[c(19,Ke+2)][0];return[ce/(Tn+ii*(ua-wn)/2+ii*ii*(ua-2*Tn+wn)/2),Ve*T]};function mi(){return t.geoProjection(di).scale(152.63)}function Oi(ce){function Ae(qe,Ve){var ot=o(Ve),Ke=(ce-1)/(ce-ot*o(qe));return[Ke*ot*x(qe),Ke*x(Ve)]}return Ae.invert=function(qe,Ve){var ot=qe*qe+Ve*Ve,Ke=H(ot),ft=(ce-H(1-ot*(ce+1)/(ce-1)))/((ce-1)/Ke+Ke/(ce-1));return[a(qe*ft,Ke*H(1-ft*ft)),Ke?q(Ve*ft/Ke):0]},Ae}function dn(ce,Ae){var qe=Oi(ce);if(!Ae)return qe;var Ve=o(Ae),ot=x(Ae);function Ke(ft,qt){var Xt=qe(ft,qt),$t=Xt[1],dr=$t*ot/(ce-1)+Ve;return[Xt[0]*Ve/dr,$t/dr]}return Ke.invert=function(ft,qt){var Xt=(ce-1)/(ce-1-qt*ot);return qe.invert(Xt*ft,Xt*qt*Ve)},Ke}function wi(){var ce=2,Ae=0,qe=t.geoProjectionMutator(dn),Ve=qe(ce,Ae);return Ve.distance=function(ot){return arguments.length?qe(ce=+ot,Ae):ce},Ve.tilt=function(ot){return arguments.length?qe(ce,Ae=ot*T):Ae*z},Ve.scale(432.147).clipAngle(U(1/ce)*z-1e-6)}var ui=1e-4,Ai=1e4,gi=-180,gn=gi+ui,In=180,Vn=In-ui,Rn=-90,Hn=Rn+ui,Gn=90,pn=Gn-ui;function Lo(ce){return ce.length>0}function us(ce){return Math.floor(ce*Ai)/Ai}function Bs(ce){return ce===Rn||ce===Gn?[0,ce]:[gi,us(ce)]}function Js(ce){var Ae=ce[0],qe=ce[1],Ve=!1;return Ae<=gn?(Ae=gi,Ve=!0):Ae>=Vn&&(Ae=In,Ve=!0),qe<=Hn?(qe=Rn,Ve=!0):qe>=pn&&(qe=Gn,Ve=!0),Ve?[Ae,qe]:ce}function ol(ce){return ce.map(Js)}function Cl(ce,Ae,qe){for(var Ve=0,ot=ce.length;Ve=Vn||dr<=Hn||dr>=pn){Ke[ft]=Js(Xt);for(var Mr=ft+1;Mrgn&&iiHn&&pi=qt)break;qe.push({index:-1,polygon:Ae,ring:Ke=Ke.slice(Mr-1)}),Ke[0]=Bs(Ke[0][1]),ft=-1,qt=Ke.length}}}}function ul(ce){var Ae,qe=ce.length,Ve={},ot={},Ke,ft,qt,Xt,$t;for(Ae=0;Ae0?E-qt:qt)*z],$t=t.geoProjection(ce(ft)).rotate(Xt),dr=t.geoRotation(Xt),Mr=$t.center;return delete $t.rotate,$t.center=function($r){return arguments.length?Mr(dr($r)):dr.invert(Mr())},$t.clipAngle(90)}function Fo(ce){var Ae=o(ce);function qe(Ve,ot){var Ke=t.geoGnomonicRaw(Ve,ot);return Ke[0]*=Ae,Ke}return qe.invert=function(Ve,ot){return t.geoGnomonicRaw.invert(Ve/Ae,ot)},qe}function Ys(){return Gs([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Gs(ce,Ae){return zs(Fo,ce,Ae)}function Us(ce){if(!(ce*=2))return t.geoAzimuthalEquidistantRaw;var Ae=-ce/2,qe=-Ae,Ve=ce*ce,ot=b(qe),Ke=.5/x(qe);function ft(qt,Xt){var $t=U(o(Xt)*o(qt-Ae)),dr=U(o(Xt)*o(qt-qe)),Mr=Xt<0?-1:1;return $t*=$t,dr*=dr,[($t-dr)/(2*ce),Mr*H(4*Ve*dr-(Ve-$t+dr)*(Ve-$t+dr))/(2*ce)]}return ft.invert=function(qt,Xt){var $t=Xt*Xt,dr=o(H($t+($r=qt+Ae)*$r)),Mr=o(H($t+($r=qt+qe)*$r)),$r,ii;return[a(ii=dr-Mr,$r=(dr+Mr)*ot),(Xt<0?-1:1)*U(H($r*$r+ii*ii)*Ke)]},ft}function Sl(){return _l([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function _l(ce,Ae){return zs(Us,ce,Ae)}function kl(ce,Ae){if(n(Ae)y&&--qt>0);return[p(ce)*(H(ot*ot+4)+ot)*E/4,A*ft]};function Dl(){return t.geoProjection(Il).scale(127.16)}function oe(ce,Ae,qe,Ve,ot){function Ke(ft,qt){var Xt=qe*x(Ve*qt),$t=H(1-Xt*Xt),dr=H(2/(1+$t*o(ft*=ot)));return[ce*$t*dr*x(ft),Ae*Xt*dr]}return Ke.invert=function(ft,qt){var Xt=ft/ce,$t=qt/Ae,dr=H(Xt*Xt+$t*$t),Mr=2*q(dr/2);return[a(ft*b(Mr),ce*dr)/ot,dr&&q(qt*x(Mr)/(Ae*qe*dr))/Ve]},Ke}function w(ce,Ae,qe,Ve){var ot=E/3;ce=f(ce,y),Ae=f(Ae,y),ce=c(ce,A),Ae=c(Ae,E-y),qe=f(qe,0),qe=c(qe,100-y),Ve=f(Ve,y);var Ke=qe/100+1,ft=Ve/100,qt=U(Ke*o(ot))/ot,Xt=x(ce)/x(qt*A),$t=Ae/E,dr=H(ft*x(ce/2)/x(Ae/2)),Mr=dr/H($t*Xt*qt),$r=1/(dr*H($t*Xt*qt));return oe(Mr,$r,Xt,qt,$t)}function B(){var ce=65*T,Ae=60*T,qe=20,Ve=200,ot=t.geoProjectionMutator(w),Ke=ot(ce,Ae,qe,Ve);return Ke.poleline=function(ft){return arguments.length?ot(ce=+ft*T,Ae,qe,Ve):ce*z},Ke.parallels=function(ft){return arguments.length?ot(ce,Ae=+ft*T,qe,Ve):Ae*z},Ke.inflation=function(ft){return arguments.length?ot(ce,Ae,qe=+ft,Ve):qe},Ke.ratio=function(ft){return arguments.length?ot(ce,Ae,qe,Ve=+ft):Ve},Ke.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*E+3*H(3),le=2*H(2*E*H(3)/ee),Ne=_t(le*H(3)/E,le,ee/6);function $e(){return t.geoProjection(Ne).scale(176.84)}function pt(ce,Ae){return[ce*H(1-3*Ae*Ae/(E*E)),Ae]}pt.invert=function(ce,Ae){return[ce/H(1-3*Ae*Ae/(E*E)),Ae]};function zt(){return t.geoProjection(pt).scale(152.63)}function Yt(ce,Ae){var qe=o(Ae),Ve=o(ce)*qe,ot=1-Ve,Ke=o(ce=a(x(ce)*qe,-x(Ae))),ft=x(ce);return qe=H(1-Ve*Ve),[ft*qe-Ke*ot,-Ke*qe-ft*ot]}Yt.invert=function(ce,Ae){var qe=(ce*ce+Ae*Ae)/-2,Ve=H(-qe*(2+qe)),ot=Ae*qe+ce*Ve,Ke=ce*qe-Ae*Ve,ft=H(Ke*Ke+ot*ot);return[a(Ve*ot,ft*(1+qe)),ft?-q(Ve*Ke/ft):0]};function Jt(){return t.geoProjection(Yt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function yr(ce,Ae){var qe=ze(ce,Ae);return[(qe[0]+ce/A)/2,(qe[1]+Ae)/2]}yr.invert=function(ce,Ae){var qe=ce,Ve=Ae,ot=25;do{var Ke=o(Ve),ft=x(Ve),qt=x(2*Ve),Xt=ft*ft,$t=Ke*Ke,dr=x(qe),Mr=o(qe/2),$r=x(qe/2),ii=$r*$r,pi=1-$t*Mr*Mr,Yi=pi?U(Ke*Mr)*H(wn=1/pi):wn=0,wn,Tn=.5*(2*Yi*Ke*$r+qe/A)-ce,ua=.5*(Yi*ft+Ve)-Ae,oo=.5*wn*($t*ii+Yi*Ke*Mr*Xt)+.5/A,el=wn*(dr*qt/4-Yi*ft*$r),ys=.125*wn*(qt*$r-Yi*ft*$t*dr),il=.5*wn*(Xt*Mr+Yi*ii*Ke)+.5,$l=el*ys-il*oo,pl=(ua*el-Tn*il)/$l,Hl=(Tn*ys-ua*oo)/$l;qe-=pl,Ve-=Hl}while((n(pl)>y||n(Hl)>y)&&--ot>0);return[qe,Ve]};function Ir(){return t.geoProjection(yr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=be,e.geoAiryRaw=ne,e.geoAitoff=Ce,e.geoAitoffRaw=ze,e.geoArmadillo=te,e.geoArmadilloRaw=he,e.geoAugust=Ee,e.geoAugustRaw=ke,e.geoBaker=me,e.geoBakerRaw=Re,e.geoBerghaus=fe,e.geoBerghausRaw=Be,e.geoBertin1953=Tt,e.geoBertin1953Raw=Xe,e.geoBoggs=ut,e.geoBoggsRaw=nt,e.geoBonne=Je,e.geoBonneRaw=tt,e.geoBottomley=Vt,e.geoBottomleyRaw=Mt,e.geoBromley=ir,e.geoBromleyRaw=Kt,e.geoChamberlin=Ie,e.geoChamberlinRaw=_e,e.geoChamberlinAfrica=Pe,e.geoCollignon=ye,e.geoCollignonRaw=lt,e.geoCraig=de,e.geoCraigRaw=ue,e.geoCraster=St,e.geoCrasterRaw=Et,e.geoCylindricalEqualArea=qr,e.geoCylindricalEqualAreaRaw=Zt,e.geoCylindricalStereographic=vr,e.geoCylindricalStereographicRaw=Lr,e.geoEckert1=si,e.geoEckert1Raw=Er,e.geoEckert2=Si,e.geoEckert2Raw=Ei,e.geoEckert3=Hi,e.geoEckert3Raw=xi,e.geoEckert4=ci,e.geoEckert4Raw=Jr,e.geoEckert5=Lt,e.geoEckert5Raw=Di,e.geoEckert6=Dt,e.geoEckert6Raw=vt,e.geoEisenlohr=br,e.geoEisenlohrRaw=sr,e.geoFahey=Rr,e.geoFaheyRaw=Tr,e.geoFoucaut=oi,e.geoFoucautRaw=Br,e.geoFoucautSinusoidal=Pi,e.geoFoucautSinusoidalRaw=vi,e.geoGilbert=Ur,e.geoGingery=Vi,e.geoGingeryRaw=ti,e.geoGinzburg4=sn,e.geoGinzburg4Raw=Mi,e.geoGinzburg5=Or,e.geoGinzburg5Raw=fi,e.geoGinzburg6=Wt,e.geoGinzburg6Raw=st,e.geoGinzburg8=or,e.geoGinzburg8Raw=tr,e.geoGinzburg9=hi,e.geoGinzburg9Raw=Nr,e.geoGringorten=fn,e.geoGringortenRaw=Qr,e.geoGuyou=na,e.geoGuyouRaw=ia,e.geoHammer=gt,e.geoHammerRaw=Ze,e.geoHammerRetroazimuthal=un,e.geoHammerRetroazimuthalRaw=go,e.geoHealpix=Xn,e.geoHealpixRaw=Bo,e.geoHill=Ja,e.geoHillRaw=ts,e.geoHomolosine=ln,e.geoHomolosineRaw=pa,e.geoHufnagel=va,e.geoHufnagelRaw=ka,e.geoHyperelliptical=Yn,e.geoHyperellipticalRaw=Fi,e.geoInterrupt=Pn,e.geoInterruptedBoggs=jo,e.geoInterruptedHomolosine=Pa,e.geoInterruptedMollweide=co,e.geoInterruptedMollweideHemispheres=_o,e.geoInterruptedSinuMollweide=bs,e.geoInterruptedSinusoidal=sa,e.geoKavrayskiy7=ms,e.geoKavrayskiy7Raw=Bn,e.geoLagrange=on,e.geoLagrangeRaw=ya,e.geoLarrivee=ca,e.geoLarriveeRaw=Ga,e.geoLaskowski=Xi,e.geoLaskowskiRaw=bn,e.geoLittrow=Ia,e.geoLittrowRaw=qn,e.geoLoximuthal=Ya,e.geoLoximuthalRaw=yn,e.geoMiller=Da,e.geoMillerRaw=ba,e.geoModifiedStereographic=Un,e.geoModifiedStereographicRaw=Aa,e.geoModifiedStereographicAlaska=Sa,e.geoModifiedStereographicGs48=Za,e.geoModifiedStereographicGs50=xo,e.geoModifiedStereographicMiller=Wa,e.geoModifiedStereographicLee=hn,e.geoMollweide=jt,e.geoMollweideRaw=Ct,e.geoMtFlatPolarParabolic=Jo,e.geoMtFlatPolarParabolicRaw=ns,e.geoMtFlatPolarQuartic=ma,e.geoMtFlatPolarQuarticRaw=vo,e.geoMtFlatPolarSinusoidal=To,e.geoMtFlatPolarSinusoidalRaw=ja,e.geoNaturalEarth2=la,e.geoNaturalEarth2Raw=Ao,e.geoNellHammer=ho,e.geoNellHammerRaw=Ki,e.geoInterruptedQuarticAuthalic=Ca,e.geoNicolosi=En,e.geoNicolosiRaw=ta,e.geoPatterson=Eo,e.geoPattersonRaw=Zo,e.geoPolyconic=$a,e.geoPolyconicRaw=lo,e.geoPolyhedral=xs,e.geoPolyhedralButterfly=Na,e.geoPolyhedralCollignon=fo,e.geoPolyhedralWaterman=ro,e.geoProject=ws,e.geoGringortenQuincuncial=bt,e.geoPeirceQuincuncial=Ft,e.geoPierceQuincuncial=Ft,e.geoQuantize=hr,e.geoQuincuncial=gs,e.geoRectangularPolyconic=Sr,e.geoRectangularPolyconicRaw=nr,e.geoRobinson=mi,e.geoRobinsonRaw=di,e.geoSatellite=wi,e.geoSatelliteRaw=dn,e.geoSinuMollweide=cs,e.geoSinuMollweideRaw=an,e.geoSinusoidal=je,e.geoSinusoidalRaw=rt,e.geoStitch=Fl,e.geoTimes=ko,e.geoTimesRaw=ga,e.geoTwoPointAzimuthal=Gs,e.geoTwoPointAzimuthalRaw=Fo,e.geoTwoPointAzimuthalUsa=Ys,e.geoTwoPointEquidistant=_l,e.geoTwoPointEquidistantRaw=Us,e.geoTwoPointEquidistantUsa=Sl,e.geoVanDerGrinten=cl,e.geoVanDerGrintenRaw=kl,e.geoVanDerGrinten2=Uo,e.geoVanDerGrinten2Raw=xl,e.geoVanDerGrinten3=Bl,e.geoVanDerGrinten3Raw=_s,e.geoVanDerGrinten4=Dl,e.geoVanDerGrinten4Raw=Il,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=$e,e.geoWagner4Raw=Ne,e.geoWagner6=zt,e.geoWagner6Raw=pt,e.geoWiechel=Jt,e.geoWiechelRaw=Yt,e.geoWinkel3=Ir,e.geoWinkel3Raw=yr,Object.defineProperty(e,"__esModule",{value:!0})})});var B6e=Se(($0r,q6e)=>{"use strict";var od=Nl(),zX=Zr(),sFt=Ul(),XA=Math.PI/180,G2=180/Math.PI,IX={cursor:"pointer"},DX={cursor:"auto"};function lFt(e,t){var r=e.projection,n;return t._isScoped?n=uFt:t._isClipped?n=cFt:n=fFt,n(e,r)}q6e.exports=lFt;function RX(e,t){return od.behavior.zoom().translate(t.translate()).scale(t.scale())}function FX(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,u=s[n],l={},f={};function c(h,d){l[n+"."+h]=zX.nestedProperty(o,h).get(),sFt.call("_storeDirectGUIEdit",a,s._preGUI,l);var p=zX.nestedProperty(u,h);p.get()!==d&&(p.set(d),zX.nestedProperty(o,h).set(d),f[n+"."+h]=d)}r(c),c("projection.scale",t.scale()/e.fitScale),c("fitbounds",!1),i.emit("plotly_relayout",f)}function uFt(e,t){var r=RX(e,t);function n(){od.select(this).style(IX)}function i(){t.scale(od.event.scale).translate(od.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 u=t.invert(e.midPt);s("center.lon",u[0]),s("center.lat",u[1])}function o(){od.select(this).style(DX),FX(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function fFt(e,t){var r=RX(e,t),n=2,i,a,o,s,u,l,f,c,h;function d(E){return t.invert(E)}function p(E){var A=d(E);if(!A)return!0;var L=t(A);return Math.abs(L[0]-E[0])>n||Math.abs(L[1]-E[1])>n}function x(){od.select(this).style(IX),i=od.mouse(this),a=t.rotate(),o=t.translate(),s=a,u=d(i)}function b(){if(l=od.mouse(this),p(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(od.event.scale),t.translate([o[0],od.event.translate[1]]),u?d(l)&&(c=d(l),f=[s[0]+(c[0]-u[0]),a[1],a[2]],t.rotate(f),s=f):(i=l,u=d(i)),h=!0,e.render(!0);var E=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-E[0]})}function y(){od.select(this).style(DX),h&&FX(e,t,k)}function k(E){var A=t.rotate(),L=t.invert(e.midPt);E("projection.rotation.lon",-A[0]),E("center.lon",L[0]),E("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",b).on("zoomend",y),r}function cFt(e,t){var r={r:t.rotate(),k:t.scale()},n=RX(e,t),i=_Ft(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){od.select(this).style(IX);var h=od.mouse(this),d=t.rotate(),p=d,x=t.translate(),b=hFt(d);s=SF(t,h),o.call(n,"zoom",function(){var y=od.mouse(this);if(t.scale(r.k=od.event.scale),!s)h=y,s=SF(t,h);else if(SF(t,y)){t.rotate(d).translate(x);var k=SF(t,y),E=pFt(s,k),A=yFt(dFt(b,E)),L=r.r=vFt(A,s,p);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=p),t.rotate(L),p=L}l(i.of(this,arguments))}),u(i.of(this,arguments))}).on("zoomend",function(){od.select(this).style(DX),o.call(n,"zoom",null),f(i.of(this,arguments)),FX(e,t,c)}).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 u(h){a++||h({type:"zoomstart"})}function l(h){h({type:"zoom"})}function f(h){--a||h({type:"zoomend"})}function c(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return od.rebind(n,i,"on")}function SF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&mFt(r)}function hFt(e){var t=.5*e[0]*XA,r=.5*e[1]*XA,n=.5*e[2]*XA,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),u=Math.sin(n),l=Math.cos(n);return[a*s*l+i*o*u,i*s*l-a*o*u,a*o*l+i*s*u,a*s*u-i*o*l]}function dFt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],u=t[2],l=t[3];return[r*o-n*s-i*u-a*l,r*s+n*o+i*l-a*u,r*u-n*l+i*o+a*s,r*l+n*u-i*s+a*o]}function pFt(e,t){if(!(!e||!t)){var r=gFt(e,t),n=Math.sqrt(F6e(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,F6e(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function vFt(e,t,r){var n=PX(t,2,e[0]);n=PX(n,1,e[1]),n=PX(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],l=n[2],f=Math.atan2(a,i)*G2,c=Math.sqrt(i*i+a*a),h,d;Math.abs(u)>c?(d=(u>0?90:-90)-f,h=0):(d=Math.asin(u/c)*G2-f,h=Math.sqrt(c*c-u*u));var p=180-d-2*f,x=(Math.atan2(l,s)-Math.atan2(o,h))*G2,b=(Math.atan2(l,s)-Math.atan2(o,-h))*G2,y=D6e(r[0],r[1],d,x),k=D6e(r[0],r[1],p,b);return y<=k?[d,x,r[2]]:[p,b,r[2]]}function D6e(e,t,r,n){var i=R6e(r-e),a=R6e(n-t);return Math.sqrt(i*i+a*a)}function R6e(e){return(e%360+540)%360-180}function PX(e,t,r){var n=r*XA,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),u=Math.sin(n);return i[a]=e[a]*s-e[o]*u,i[o]=e[o]*s+e[a]*u,i}function yFt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*G2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*G2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*G2]}function mFt(e){var t=e[0]*XA,r=e[1]*XA,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function F6e(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var t1=Nl(),OX=LX(),xFt=OX.geoPath,bFt=OX.geoDistance,wFt=I6e(),TFt=Ul(),QE=Zr(),AFt=QE.strTranslate,MF=Pl(),$E=yu(),O6e=jc(),SFt=Sc(),BX=hu(),N6e=wy().getAutoRange,qX=gp(),MFt=nh().prepSelect,EFt=nh().clearOutline,kFt=nh().selectOnClick,CFt=B6e(),cv=XE(),LFt=ix(),V6e=fF(),zFt=vX().feature;function H6e(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 $y=H6e.prototype;G6e.exports=function(t){return new H6e(t)};$y.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 u in cv.layerNameToAdjective)if(u!=="frame"&&a["show"+u]){s=!0;break}for(var l=!1,f=0;f0&&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),SFt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var u=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=u.selectAll(".point"),this.dataPoints.text=u.selectAll("text"),this.dataPaths.line=u.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()};$y.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,u=n.lataxis,l=s._ax,f=u._ax,c=this.projection=PFt(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||{},p=o.rotation||{},x=s.range||[],b=u.range||[];if(n.fitbounds){l._length=h[1][0]-h[0][0],f._length=h[1][1]-h[0][1],l.range=N6e(r,l),f.range=N6e(r,f);var y=(l.range[0]+l.range[1])/2,k=(f.range[0]+f.range[1])/2;if(n._isScoped)d={lon:y,lat:k};else if(n._isClipped){d={lon:y,lat:k},p={lon:y,lat:k,roll:p.roll};var E=o.type,A=cv.lonaxisSpan[E]/2||180,L=cv.lataxisSpan[E]/2||90;x=[y-A,y+A],b=[k-L,k+L]}else d={lon:y,lat:k},p={lon:y,lat:p.lat,roll:p.roll}}c.center([d.lon-p.lon,d.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var _=U6e(x,b);c.fitExtent(h,_);var C=this.bounds=c.getBounds(_),M=this.fitScale=c.scale(),v=c.translate();if(n.fitbounds){var z=c.getBounds(U6e(l.range,f.range)),T=Math.min((C[1][0]-C[0][0])/(z[1][0]-z[0][0]),(C[1][1]-C[0][1])/(z[1][1]-z[0][1]));isFinite(T)?c.scale(T*M):QE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else c.scale(o.scale*M);var F=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(c.translate([v[0]+(F[0]-v[0]),v[1]+(F[1]-v[1])]).clipExtent(C),n._isAlbersUsa){var q=c([d.lon,d.lat]),U=c.translate();c.translate([U[0]-(q[0]-U[0]),U[1]-(q[1]-U[1])])}};$y.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!!cv.lineLayers[h]}function u(h){return!!cv.fillLayers[h]}var l=this.hasChoropleth?cv.layersForChoropleth:cv.layers,f=l.filter(function(h){return s(h)||u(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),c=r.framework.selectAll(".layer").data(f,String);c.exit().each(function(h){delete i[h],delete a[h],t1.select(this).remove()}),c.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):u(h)&&(a[h]=d.append("path").style("stroke","none"))}),c.order(),c.each(function(h){var d=a[h],p=cv.layerNameToAdjective[h];h==="frame"?d.datum(cv.sphereSVG):s(h)||u(h)?d.datum(zFt(n,n.objects[h])):o(h)&&d.datum(IFt(h,t,e)).call(MF.stroke,t[h].gridcolor).call($E.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(MF.stroke,t[p+"color"]).call($E.dashLine,"",t[p+"width"]):u(h)&&d.call(MF.fill,t[p+"color"])})};$y.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;$E.setRect(this.clipRect,i,a,o,s),this.bgRect.call($E.setRect,i,a,o,s).call(MF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};$y.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 c=r.viewInitial,h={};for(var d in c)h[r.id+"."+d]=c[d];TFt.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function u(c){return r.projection.invert([c[0]+r.xaxis._offset,c[1]+r.yaxis._offset])}var l=function(c,h){if(h.isRect){var d=c.range={};d[r.id]=[u([h.xmin,h.ymin]),u([h.xmax,h.ymax])]}else{var p=c.lassoPoints={};p[r.id]=h.map(u)}},f={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:l},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(c){c===2&&EFt(n)}};a==="pan"?(i.node().onmousedown=null,i.call(CFt(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),f.prepFn=function(c,h,d){MFt(c,h,d,f,a)},qX.init(f)),i.on("mousemove",function(){var c=r.projection.invert(QE.getPositionFromD3Event());if(!c)return qX.unhover(n,t1.event);r.xaxis.p2c=function(){return c[0]},r.yaxis.p2c=function(){return c[1]},O6e.hover(n,t1.event,r.id)}),i.on("mouseout",function(){n._dragging||qX.unhover(n,t1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&kFt(t1.event,n,[r.xaxis],[r.yaxis],r.id,f),o.indexOf("event")>-1&&O6e.click(n,t1.event))})};$y.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($E.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"},BX.setConvert(e.mockAxis,r)};$y.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},QE.extendFlat(this.viewInitial,i)};$y.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};$y._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?AFt(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 PFt(e){var t=e.projection,r=t.type,n=cv.projNames[r];n="geo"+QE.titleCase(n);for(var i=OX[n]||wFt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?cv.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],u=function(c){return c?a:[]},l=0;lp}else return!1},a.getPath=function(){return xFt().projection(a)},a.getBounds=function(c){return a.getPath().bounds(c)},a.precision(cv.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-cv.clipPad),a}function IFt(e,t,r){var n=1e-6,i=2.5,a=t[e],o=cv.scopeDefaults[t.scope],s,u,l;e==="lonaxis"?(s=o.lonaxisRange,u=o.lataxisRange,l=function(k,E){return[k,E]}):e==="lataxis"&&(s=o.lataxisRange,u=o.lonaxisRange,l=function(k,E){return[E,k]});var f={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};BX.setConvert(f,r);var c=BX.calcTicks(f);!t.isScoped&&e==="lonaxis"&&c.pop();for(var h=c.length,d=new Array(h),p=0;p0&&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 NX=Se((eyr,X6e)=>{"use strict";var KA=Ih(),DFt=Ec().attributes,RFt=Id().dash,YA=XE(),FFt=_c().overrideAll,j6e=X1(),Z6e={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:KA.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:RFt},qFt=X6e.exports=FFt({domain:DFt({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:j6e(YA.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:j6e(YA.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:KA.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:YA.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:YA.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:YA.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:YA.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:KA.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:KA.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:KA.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:KA.background},lonaxis:Z6e,lataxis:Z6e},"plot","from-root");qFt.uirevision={valType:"any",editType:"none"}});var J6e=Se((tyr,K6e)=>{"use strict";var EF=Zr(),BFt=k_(),OFt=Dd().getSubplotData,kF=XE(),NFt=NX(),Y6e=kF.axesNames;K6e.exports=function(t,r,n){BFt(t,r,n,{type:"geo",attributes:NFt,handleDefaults:UFt,fullData:n,partition:"y"})};function UFt(e,t,r,n){var i=OFt(n.fullData,"geo",n.id),a=i.map(function(ne){return ne.index}),o=r("resolution"),s=r("scope"),u=kF.scopeDefaults[s],l=r("projection.type",u.projType),f=t._isAlbersUsa=l==="albers usa";f&&(s=t.scope="usa");var c=t._isScoped=s!=="world",h=t._isSatellite=l==="satellite",d=t._isConic=l.indexOf("conic")!==-1||l==="albers",p=t._isClipped=!!kF.lonaxisSpan[l];if(e.visible===!1){var x=EF.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var b=r("visible"),y,k=0;k0&&q<0&&(q+=360);var U=(F+q)/2,H;if(!f){var j=c?u.projRotate:[U,0,0];H=r("projection.rotation.lon",j[0]),r("projection.rotation.lat",j[1]),r("projection.rotation.roll",j[2]),y=r("showcoastlines",!c&&b),y&&(r("coastlinecolor"),r("coastlinewidth")),y=r("showocean",b?void 0:!1),y&&r("oceancolor")}var G,O;if(f?(G=-96.6,O=38.7):(G=c?U:H,O=(T[0]+T[1])/2),r("center.lon",G),r("center.lat",O),h&&(r("projection.tilt"),r("projection.distance")),d){var W=u.projParallels||[0,60];r("projection.parallels",W)}r("projection.scale"),y=r("showland",b?void 0:!1),y&&r("landcolor"),y=r("showlakes",b?void 0:!1),y&&r("lakecolor"),y=r("showrivers",b?void 0:!1),y&&(r("rivercolor"),r("riverwidth")),y=r("showcountries",c&&s!=="usa"&&b),y&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),c||(y=r("showframe",b),y&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,c?(delete t.center.lon,delete t.center.lat):p?(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 UX=Se((ryr,eRe)=>{"use strict";var VFt=Dd().getSubplotCalcData,HFt=Zr().counterRegex,GFt=W6e(),jm="geo",$6e=HFt(jm),Q6e={};Q6e[jm]={valType:"subplotid",dflt:jm,editType:"calc"};function WFt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[jm],i=0;i{"use strict";tRe.exports={attributes:H2(),supplyDefaults:FDe(),colorbar:ep(),formatLabels:ODe(),calc:lF(),calcGeoJSON:CX().calcGeoJSON,plot:CX().plot,style:SX(),styleOnSelect:ov().styleOnSelect,hoverPoints:A6e(),eventData:M6e(),selectPoints:C6e(),moduleType:"trace",name:"scattergeo",basePlotModule:UX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var nRe=Se((nyr,iRe)=>{"use strict";iRe.exports=rRe()});var JA=Se((ayr,sRe)=>{"use strict";var XFt=Du().hovertemplateAttrs,ax=H2(),YFt=Xf(),aRe=zf(),KFt=Ih().defaultLine,nx=vu().extendFlat,oRe=ax.marker.line;sRe.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({},oRe.color,{dflt:KFt}),width:nx({},oRe.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({},aRe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:XFt(),showlegend:nx({},aRe.showlegend,{dflt:!1})},YFt("",{cLetter:"z",editTypeOverride:"calc"}))});var uRe=Se((oyr,lRe)=>{"use strict";var CF=Zr(),JFt=ed(),$Ft=JA();lRe.exports=function(t,r,n,i){function a(h,d){return CF.coerce(t,r,$Ft,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&CF.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var u=a("geojson"),l;(typeof u=="string"&&u!==""||CF.isPlainObject(u))&&(l="geojson-id");var f=a("locationmode",l);f==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate");var c=a("marker.line.width");c&&a("marker.line.color"),a("marker.opacity"),JFt(t,r,i,a,{prefix:"",cLetter:"z"}),CF.coerceSelectionMarkerOpacity(r,a)}});var LF=Se((syr,hRe)=>{"use strict";var fRe=_u(),QFt=ju().BADNUM,e9t=Rp(),t9t=km(),r9t=F0();function cRe(e){return e&&typeof e=="string"}hRe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(f){return cRe(f)||fRe(f)}:a=cRe;for(var o=0;o{"use strict";var i9t=Nl(),n9t=Pl(),VX=yu(),a9t=fc();function o9t(e,t){t&&dRe(e,t)}function dRe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=a9t.makeColorScaleFuncFromTrace(r);i.each(function(u){i9t.select(this).attr("fill",s(u.z)).call(n9t.stroke,u.mlc||o.color).call(VX.dashLine,"",u.mlw||o.width||0).style("opacity",a.opacity)}),VX.selectedPointStyle(i,r)}function s9t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?VX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):dRe(e,t)}pRe.exports={style:o9t,styleOnSelect:s9t}});var HX=Se((uyr,mRe)=>{"use strict";var l9t=Nl(),vRe=Zr(),$A=ix(),u9t=fF().getTopojsonFeatures,yRe=wy().findExtremes,f9t=zF().style;function c9t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");vRe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=l9t.select(this),o=a.selectAll("path.choroplethlocation").data(vRe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),f9t(e,i)})}function h9t(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"?$A.extractTraceFeature(e):u9t(r,i.topojson),u=[],l=[],f=0;f{"use strict";var d9t=hu(),p9t=JA(),v9t=Zr().fillText;gRe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,u,l,f,c=[r,n],h=[r+360,n];for(u=0;u")}}});var IF=Se((cyr,_Re)=>{"use strict";_Re.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 DF=Se((hyr,xRe)=>{"use strict";xRe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u,l,f,c;if(r===!1)for(s=0;s{"use strict";bRe.exports={attributes:JA(),supplyDefaults:uRe(),colorbar:S_(),calc:LF(),calcGeoJSON:HX().calcGeoJSON,plot:HX().plot,style:zF().style,styleOnSelect:zF().styleOnSelect,hoverPoints:PF(),eventData:IF(),selectPoints:DF(),moduleType:"trace",name:"choropleth",basePlotModule:UX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var ARe=Se((pyr,TRe)=>{"use strict";TRe.exports=wRe()});var RF=Se((vyr,MRe)=>{"use strict";var m9t=Ul(),s0=Zr(),g9t=oT();function _9t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,u=e.ya,l=a.x,f=a.y,c=s.c2p(t),h=u.c2p(r),d=e.distance,p;if(a.tree){var x=s.p2c(c-d),b=s.p2c(c+d),y=u.p2c(h-d),k=u.p2c(h+d);n==="x"?p=a.tree.range(Math.min(x,b),Math.min(u._rl[0],u._rl[1]),Math.max(x,b),Math.max(u._rl[0],u._rl[1])):p=a.tree.range(Math.min(x,b),Math.min(y,k),Math.max(x,b),Math.max(y,k))}else p=a.ids;var E,A,L,_,C,M,v,z,T,F=d;if(n==="x"){var q=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C=Math.min(H,j)&&c<=Math.max(H,j)?0:1/0}if(M=Math.min(G,O)&&h<=Math.max(G,O)?0:1/0}T=Math.sqrt(M*M+v*v),A=p[C]}}}else for(C=p.length-1;C>-1;C--)E=p[C],L=l[E],_=f[E],M=s.c2p(L)-c,v=u.c2p(_)-h,z=Math.sqrt(M*M+v*v),z{"use strict";var ERe=20;kRe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:ERe,SYMBOL_STROKE:ERe/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 ek=Se((myr,PRe)=>{"use strict";var x9t=zf(),b9t=uc(),w9t=Ey(),oh=Zc(),CRe=Gc().axisHoverFormat,LRe=Xf(),T9t=X1(),GX=vu().extendFlat,A9t=_c().overrideAll,S9t=ox().DASHES,zRe=oh.line,r1=oh.marker,M9t=r1.line,QA=PRe.exports=A9t({x:oh.x,x0:oh.x0,dx:oh.dx,y:oh.y,y0:oh.y0,dy:oh.dy,xperiod:oh.xperiod,yperiod:oh.yperiod,xperiod0:oh.xperiod0,yperiod0:oh.yperiod0,xperiodalignment:oh.xperiodalignment,yperiodalignment:oh.yperiodalignment,xhoverformat:CRe("x"),yhoverformat:CRe("y"),text:oh.text,hovertext:oh.hovertext,textposition:oh.textposition,textfont:b9t({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:zRe.color,width:zRe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:T9t(S9t),dflt:"solid"}},marker:GX({},LRe("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:GX({},LRe("marker.line"),{width:M9t.width})}),connectgaps:oh.connectgaps,fill:GX({},oh.fill,{dflt:"none"}),fillcolor:w9t(),selected:{marker:oh.selected.marker,textfont:oh.selected.textfont},unselected:{marker:oh.unselected.marker,textfont:oh.unselected.textfont},opacity:x9t.opacity},"calc","nested");QA.x.editType=QA.y.editType=QA.x0.editType=QA.y0.editType="calc+clearAxisTypes";QA.hovertemplate=oh.hovertemplate;QA.texttemplate=oh.texttemplate});var FF=Se(WX=>{"use strict";var IRe=ox();WX.isOpenSymbol=function(e){return typeof e=="string"?IRe.OPEN_RE.test(e):e%200>100};WX.isDotSymbol=function(e){return typeof e=="string"?IRe.DOT_RE.test(e):e>200}});var FRe=Se((_yr,RRe)=>{"use strict";var DRe=Zr(),E9t=Ul(),k9t=FF(),C9t=ek(),L9t=Sm(),qF=ec(),z9t=K3(),P9t=zy(),I9t=$v(),D9t=I0(),R9t=Py(),F9t=D0();RRe.exports=function(t,r,n,i){function a(d,p){return DRe.coerce(t,r,C9t,d,p)}var o=t.marker?k9t.isOpenSymbol(t.marker.symbol):!1,s=qF.isBubble(t),u=z9t(t,r,i,a);if(!u){r.visible=!1;return}P9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var l=u{"use strict";var q9t=JP();qRe.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]),q9t(t,r,n)}});var NRe=Se((byr,ORe)=>{"use strict";function B9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u>=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],u=r!==void 0?r(s,t):s-t;u>0?(a=o,i=o-1):n=o+1}return a}function N9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u<0?(a=o,n=o+1):i=o-1}return a}function U9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],u=r!==void 0?r(s,t):s-t;u<=0?(a=o,n=o+1):i=o-1}return a}function V9t(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 tk(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)}ORe.exports={ge:function(e,t,r,n,i){return tk(e,t,r,n,i,B9t)},gt:function(e,t,r,n,i){return tk(e,t,r,n,i,O9t)},lt:function(e,t,r,n,i){return tk(e,t,r,n,i,N9t)},le:function(e,t,r,n,i){return tk(e,t,r,n,i,U9t)},eq:function(e,t,r,n,i){return tk(e,t,r,n,i,V9t)}}});var Zm=Se((wyr,VRe)=>{"use strict";VRe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=URe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var H9t=Zm();HRe.exports=G9t;function G9t(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=H9t(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 W2=Se((Ayr,GRe)=>{"use strict";GRe.exports=W9t;function W9t(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]{WRe.exports=function(){for(var e=0;e{var ZRe=HR();XRe.exports=j9t;function j9t(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,u;(!t||typeof t=="string")&&(t=new(ZRe(t||"float32"))(i+r));var l=t.length-r;if(i!==l)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+l);for(a=0,s=r;a{"use strict";YRe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var $Re=Se((kyr,JRe)=>{"use strict";JRe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var aFe=Se((Cyr,nFe)=>{"use strict";var QRe=NRe(),eFe=BA(),Z9t=eS(),X9t=W2(),tFe=Zm(),ZX=jRe(),Y9t=j2(),K9t=KRe(),J9t=HR(),rFe=$Re(),$9t=1073741824;nFe.exports=function(t,r){r||(r={}),t=Y9t(t,"float64"),r=tFe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=ZX(r.maxDepth,255),i=ZX(r.bounds,X9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=iFe(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(J9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;yn||_>$9t){for(let O=0;Obe||v>ze||z=F||re===ne)return;let Ce=u[W];ne===void 0&&(ne=Ce.length);for(let Be=re;Be=A&&Ze<=_&&et>=L&&et<=C&&q.push(fe)}let he=l[W],te=he[re*4+0],ke=he[re*4+1],Ee=he[re*4+2],Me=he[re*4+3],Oe=H(he,re+1),Re=O*.5,me=W+1;U(j,G,Re,me,te,ke||Ee||Me||Oe),U(j,G+Re,Re,me,ke,Ee||Me||Oe),U(j+Re,G,Re,me,Ee,Me||Oe),U(j+Re,G+Re,Re,me,Me,Oe)}function H(j,G){let O=null,W=0;for(;O===null;)if(O=j[G*4+W],W++,W>j.length)return null;return O}return q}function x(y,k,E,A,L){let _=[];for(let C=0;C{"use strict";oFe.exports=aFe()});var XX=Se((zyr,sFe)=>{sFe.exports=Q9t;function Q9t(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 u=1;u{"use strict";Object.defineProperty(OF,"__esModule",{value:!0});var eqt=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),u;!(i=(u=s.next()).done)&&(n.push(u.value),!(r&&n.length===r));i=!0);}catch(l){a=!0,o=l}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")}}(),rk=Math.PI*2,YX=function(t,r,n,i,a,o,s){var u=t.x,l=t.y;u*=r,l*=n;var f=i*u-a*l,c=a*u+i*l;return{x:f+o,y:c+s}},tqt=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}]},lFe=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)},rqt=function(t,r,n,i,a,o,s,u,l,f,c,h){var d=Math.pow(a,2),p=Math.pow(o,2),x=Math.pow(c,2),b=Math.pow(h,2),y=d*p-d*b-p*x;y<0&&(y=0),y/=d*b+p*x,y=Math.sqrt(y)*(s===u?-1:1);var k=y*a/o*h,E=y*-o/a*c,A=f*k-l*E+(t+n)/2,L=l*k+f*E+(r+i)/2,_=(c-k)/a,C=(h-E)/o,M=(-c-k)/a,v=(-h-E)/o,z=lFe(1,0,_,C),T=lFe(_,C,M,v);return u===0&&T>0&&(T-=rk),u===1&&T<0&&(T+=rk),[A,L,z,T]},iqt=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,u=t.xAxisRotation,l=u===void 0?0:u,f=t.largeArcFlag,c=f===void 0?0:f,h=t.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||s===0)return[];var x=Math.sin(l*rk/360),b=Math.cos(l*rk/360),y=b*(r-i)/2+x*(n-a)/2,k=-x*(r-i)/2+b*(n-a)/2;if(y===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var E=Math.pow(y,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);E>1&&(o*=Math.sqrt(E),s*=Math.sqrt(E));var A=rqt(r,n,i,a,o,s,c,d,x,b,y,k),L=eqt(A,4),_=L[0],C=L[1],M=L[2],v=L[3],z=Math.abs(v)/(rk/4);Math.abs(1-z)<1e-7&&(z=1);var T=Math.max(Math.ceil(z),1);v/=T;for(var F=0;F{"use strict";hFe.exports=aqt;var nqt=fFe();function aqt(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,u=null,l=0,f=0,c=0,h=e.length;c4?(n=d[d.length-4],i=d[d.length-3]):(n=l,i=f),r.push(d)}return r}function NF(e,t,r,n){return["C",e,t,r,n,r,n]}function cFe(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 KX=Se((Iyr,pFe)=>{"use strict";pFe.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 mFe=Se((Dyr,yFe)=>{"use strict";var oqt=XM(),sqt=XX(),lqt=dFe(),uqt=KX(),vFe=tE();yFe.exports=fqt;function fqt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(vFe(uqt(e),"String is not an SVG path."),e=oqt(e)),vFe(Array.isArray(e),"Argument should be a string or an array of path segments."),e=sqt(e),e=lqt(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 TFe=Se((Ryr,wFe)=>{var Z2=Math.PI,gFe=bFe(120);wFe.exports=cqt;function cqt(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,u=null,l=0,f=0,c=0,h=e.length;c7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var x=l,b=f;(t=="C"||t=="S")&&(x+=x-n,b+=b-i),d=["C",x,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=l*2-s,u=f*2-u):(s=l,u=f),d=_Fe(l,f,s,u,d[1],d[2]);break;case"Q":s=d[1],u=d[2],d=_Fe(l,f,d[1],d[2],d[3],d[4]);break;case"L":d=UF(l,f,d[1],d[2]);break;case"H":d=UF(l,f,d[1],f);break;case"V":d=UF(l,f,l,d[1]);break;case"Z":d=UF(l,f,a,o);break}t=p,l=d[d.length-2],f=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=l,i=f),r.push(d)}return r}function UF(e,t,r,n){return["C",e,t,r,n,r,n]}function _Fe(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 xFe(e,t,r,n,i,a,o,s,u,l){if(l)E=l[0],A=l[1],y=l[2],k=l[3];else{var f=JX(e,t,-i);e=f.x,t=f.y,f=JX(s,u,-i),s=f.x,u=f.y;var c=(e-s)/2,h=(t-u)/2,d=c*c/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var p=r*r,x=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((p*x-p*h*h-x*c*c)/(p*h*h+x*c*c)));b==1/0&&(b=1);var y=b*r*h/n+(e+s)/2,k=b*-n*c/r+(t+u)/2,E=Math.asin(((t-k)/n).toFixed(9)),A=Math.asin(((u-k)/n).toFixed(9));E=eA&&(E=E-Z2*2),!o&&A>E&&(A=A-Z2*2)}if(Math.abs(A-E)>gFe){var L=A,_=s,C=u;A=E+gFe*(o&&A>E?1:-1),s=y+r*Math.cos(A),u=k+n*Math.sin(A);var M=xFe(s,u,r,n,i,0,o,_,C,[A,L,y,k])}var v=Math.tan((A-E)/4),z=4/3*r*v,T=4/3*n*v,F=[2*e-(e+z*Math.sin(E)),2*t-(t-T*Math.cos(E)),s+z*Math.sin(A),u-T*Math.cos(A),s,u];if(l)return F;M&&(F=F.concat(M));for(var q=0;q{var hqt=XX(),dqt=TFe(),pqt={M:"moveTo",C:"bezierCurveTo"};AFe.exports=function(e,t){e.beginPath(),dqt(hqt(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[pqt[n]].apply(e,i)}),e.closePath()}});var CFe=Se((qyr,kFe)=>{"use strict";var vqt=BA();kFe.exports=yqt;var ik=1e20;function yqt(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,u,l,f,c,h,d,p,x;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,u=e,t.stride?f=t.stride:f=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,c=h.getContext("2d"),a=h.width,o=h.height,d=c.getImageData(0,0,a,o),u=d.data,f=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,c=e,a=h.width,o=h.height,d=c.getImageData(0,0,a,o),u=d.data,f=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,u=d.data,f=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&u instanceof window.Uint8ClampedArray||window.Uint8Array&&u instanceof window.Uint8Array)for(l=u,u=Array(a*o),p=0,x=l.length;p{"use strict";var mqt=mFe(),gqt=XM(),_qt=SFe(),xqt=KX(),bqt=CFe(),$X=document.createElement("canvas"),hv=$X.getContext("2d");LFe.exports=wqt;function wqt(e,t){if(!xqt(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=$X.width=t.w||t.width||200,n=$X.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||mqt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],u=Math.min(s[0]||0,s[1]||0)/2;if(hv.fillStyle="black",hv.fillRect(0,0,r,n),hv.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?hv.strokeStyle="white":hv.strokeStyle="black",hv.lineWidth=Math.abs(a)),hv.translate(r*.5,n*.5),hv.scale(u,u),Tqt()){var l=new Path2D(e);hv.fill(l),a&&hv.stroke(l)}else{var f=gqt(e);_qt(hv,f),hv.fill(),a&&hv.stroke()}hv.setTransform(1,0,0,1,0,0);var c=bqt(hv,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return c}var VF;function Tqt(){if(VF!=null)return VF;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return VF=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return VF=r&&r.data&&r.data[3]===255}});var Y2=Se((Oyr,VFe)=>{"use strict";var GF=_u(),Aqt=zFe(),HF=J_(),Sqt=Ul(),iS=Zr(),Sh=iS.isArrayOrTypedArray,tS=yu(),PFe=$c(),IFe=$g().formatColor,rS=ec(),Mqt=S3(),eY=FF(),nk=ox(),Eqt=N1().DESELECTDIM,DFe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},kqt=rv().appendArrayPointValue;function Cqt(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(rS.hasText(t)&&(n.text=UFe(e,t),n.textSel=FFe(e,t,t.selected),n.textUnsel=FFe(e,t,t.unselected)),rS.hasMarkers(t)&&(n.marker=rY(e,t),n.markerSel=tY(e,t,t.selected),n.markerUnsel=tY(e,t,t.unselected),!t.unselected&&Sh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function rY(e,t){var r=t._length,n=t.marker,i={},a,o=Sh(n.symbol),s=Sh(n.angle),u=Sh(n.color),l=Sh(n.line.color),f=Sh(n.opacity),c=Sh(n.size),h=Sh(n.line.width),d;if(o||(d=eY.isOpenSymbol(n.symbol)),o||u||l||f||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var p=n.symbol,x=n.angle,b=IFe(n,n.opacity,r),y=IFe(n.line,n.opacity,r);if(!Sh(y[0])){var k=y;for(y=Array(r),a=0;ank.TOO_MANY_POINTS||rS.hasMarkers(t)?"rect":"round";if(l&&t.connectgaps){var c=a[0],h=a[1];for(o=0;o1?u[o]:u[0]:u,d=Sh(l)?l.length>1?l[o]:l[0]:l,p=DFe[h],x=DFe[d],b=f?f/.8+1:0,y=-x*b-x*.5;a.offset[o]=[p*b/c,y/c]}}return a}VFe.exports={style:Cqt,markerStyle:rY,markerSelection:tY,linePositions:zqt,errorBarPositions:Pqt,textPosition:Iqt}});var iY=Se((Nyr,HFe)=>{"use strict";var WF=Zr();HFe.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(){WF.extendFlat(n,a,i)},n.init(),n.update=function(s){var u=WF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(u),n.scatter2d&&n.scatter2d.update(u),n.line2d&&n.line2d.update(u),n.error2d&&n.error2d.update(u.concat(u)),n.select2d&&n.select2d.update(u),n.glText)for(var l=0;l{"use strict";var Dqt=BF(),nS=Zr(),GFe=$c(),Rqt=wy().findExtremes,WFe=Iy(),nY=q0(),Fqt=nY.calcMarkerSize,qqt=nY.calcAxisExpansion,Bqt=nY.setFirstScatter,Oqt=R0(),aS=Y2(),Nqt=iY(),jFe=ju().BADNUM,Uqt=ox().TOO_MANY_POINTS;XFe.exports=function(t,r){var n=t._fullLayout,i=r._xA=GFe.getFromId(t,r.xaxis,"x"),a=r._yA=GFe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,u=s>=Uqt,l=s*2,f={},c,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),p=WFe(r,i,"x",h),x=WFe(r,a,"y",d),b=p.vals,y=x.vals;r._x=b,r._y=y,r.xperiodalignment&&(r._origX=h,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=x.starts,r._yEnds=x.ends);var k=new Array(l),E=new Array(s);for(c=0;c1&&nS.extendFlat(o.line,aS.linePositions(e,r,n)),o.errorX||o.errorY){var s=aS.errorBarPositions(e,r,n,i,a);o.errorX&&nS.extendFlat(o.errorX,s.x),o.errorY&&nS.extendFlat(o.errorY,s.y)}return o.text&&(nS.extendFlat(o.text,{positions:n},aS.textPosition(e,r,o.text,o.marker)),nS.extendFlat(o.textSel,{positions:n},aS.textPosition(e,r,o.text,o.markerSel)),nS.extendFlat(o.textUnsel,{positions:n},aS.textPosition(e,r,o.text,o.markerUnsel))),o}});var aY=Se((Vyr,JFe)=>{"use strict";var KFe=Zr(),Hqt=Pl(),Gqt=N1().DESELECTDIM;function Wqt(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],u=i.textOptions[a],l=i.textSelectedOptions[a]||{},f=i.textUnselectedOptions[a]||{},c=KFe.extendFlat({},u),h,d;if(o.length||s.length){var p=l.color,x=f.color,b=u.color,y=KFe.isArrayOrTypedArray(b);for(c.color=new Array(r._length),h=0;h{"use strict";var $Fe=ec(),jqt=aY().styleTextSelection;QFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u=n[0].t,l=s._length,f=u.x,c=u.y,h=u._scene,d=u.index;if(!h)return o;var p=$Fe.hasText(s),x=$Fe.hasMarkers(s),b=!x&&!p;if(s.visible!==!0||b)return o;var y=[],k=[];if(r!==!1&&!r.degenerate)for(var E=0;E{"use strict";var Zqt=RF();e9e.exports={moduleType:"trace",name:"scattergl",basePlotModule:Th(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:ek(),supplyDefaults:FRe(),crossTraceDefaults:lU(),colorbar:ep(),formatLabels:BRe(),calc:YFe(),hoverPoints:Zqt.hoverPoints,selectPoints:oY(),meta:{}}});var i9e=Se((Wyr,ZF)=>{"use strict";var jF=BA();ZF.exports=r9e;ZF.exports.to=r9e;ZF.exports.from=Xqt;function r9e(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=jF(r,0,255)&255,n=jF(n,0,255)&255,i=jF(i,0,255)&255,a=jF(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function Xqt(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 Uh=Se((jyr,a9e)=>{"use strict";var n9e=Object.getOwnPropertySymbols,Yqt=Object.prototype.hasOwnProperty,Kqt=Object.prototype.propertyIsEnumerable;function Jqt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function $qt(){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}}a9e.exports=$qt()?Object.assign:function(e,t){for(var r,n=Jqt(e),i,a=1;a{o9e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";l9e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";u9e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var XF=Se((Kyr,oS)=>{"use strict";oS.exports=ak;oS.exports.float32=oS.exports.float=ak;oS.exports.fract32=oS.exports.fract=Qqt;var c9e=new Float32Array(1);function Qqt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=ak(e));for(var r=0,n=t.length;r{"use strict";function e8t(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function t8t(e,t){return n8t(e)||e8t(e,t)||d9e(e,t)||s8t()}function r8t(e){return i8t(e)||a8t(e)||d9e(e)||o8t()}function i8t(e){if(Array.isArray(e))return lY(e)}function n8t(e){if(Array.isArray(e))return e}function a8t(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function d9e(e,t){if(e){if(typeof e=="string")return lY(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 lY(e,t)}}function lY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rre)?O.tree=c8t(G,{bounds:he}):re&&re.length&&(O.tree=re),O.tree){var te={primitive:"points",usage:"static",data:O.tree,type:"uint32"};O.elements?O.elements(te):O.elements=o.elements(te)}var ke=KF.float32(G);ne({data:ke,usage:"dynamic"});var Ee=KF.fract32(G,ke);return be({data:Ee,usage:"dynamic"}),ze({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),G}},{marker:function(G,O,W){var re=O.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!G||typeof G[0]=="number"){var ne=e.addMarker(G);re[ne]=!0}else{for(var be=[],ze=0,Ce=Math.min(G.length,O.count);ze=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};op.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";dY.exports=QF;dY.exports.default=QF;function QF(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=y9e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,u,l,f,c,h,d;if(n&&(a=T8t(e,t,a,r)),e.length>80*r){s=l=e[0],u=f=e[1];for(var p=r;pl&&(l=c),h>f&&(f=h);d=Math.max(l-s,f-u),d=d!==0?32767/d:0}return ok(a,o,r,s,u,d,0),o}function y9e(e,t,r,n,i){var a,o;if(i===hY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=v9e(a,e[a],e[a+1],o);return o&&e9(o,o.next)&&(lk(o),o=o.next),o}function J2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(e9(r,r.next)||Mh(r.prev,r,r.next)===0)){if(lk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ok(e,t,r,n,i,a,o){if(e){!o&&a&&k8t(e,n,i,a);for(var s=e,u,l;e.prev!==e.next;){if(u=e.prev,l=e.next,a?x8t(e,n,i,a):_8t(e)){t.push(u.i/r|0),t.push(e.i/r|0),t.push(l.i/r|0),lk(e),e=l.next,s=l.next;continue}if(e=l,e===s){o?o===1?(e=b8t(J2(e),t,r),ok(e,t,r,n,i,a,2)):o===2&&w8t(e,t,r,n,i,a):ok(J2(e),t,r,n,i,a,1);break}}}}function _8t(e){var t=e.prev,r=e,n=e.next;if(Mh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,u=r.y,l=n.y,f=ia?i>o?i:o:a>o?a:o,d=s>u?s>l?s:l:u>l?u:l,p=n.next;p!==t;){if(p.x>=f&&p.x<=h&&p.y>=c&&p.y<=d&&sS(i,s,a,u,o,l,p.x,p.y)&&Mh(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function x8t(e,t,r,n){var i=e.prev,a=e,o=e.next;if(Mh(i,a,o)>=0)return!1;for(var s=i.x,u=a.x,l=o.x,f=i.y,c=a.y,h=o.y,d=su?s>l?s:l:u>l?u:l,b=f>c?f>h?f:h:c>h?c:h,y=fY(d,p,t,r,n),E=fY(x,b,t,r,n),k=e.prevZ,A=e.nextZ;k&&k.z>=y&&A&&A.z<=E;){if(k.x>=d&&k.x<=x&&k.y>=p&&k.y<=b&&k!==i&&k!==o&&sS(s,f,u,c,l,h,k.x,k.y)&&Mh(k.prev,k,k.next)>=0||(k=k.prevZ,A.x>=d&&A.x<=x&&A.y>=p&&A.y<=b&&A!==i&&A!==o&&sS(s,f,u,c,l,h,A.x,A.y)&&Mh(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;k&&k.z>=y;){if(k.x>=d&&k.x<=x&&k.y>=p&&k.y<=b&&k!==i&&k!==o&&sS(s,f,u,c,l,h,k.x,k.y)&&Mh(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;A&&A.z<=E;){if(A.x>=d&&A.x<=x&&A.y>=p&&A.y<=b&&A!==i&&A!==o&&sS(s,f,u,c,l,h,A.x,A.y)&&Mh(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function b8t(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!e9(i,a)&&m9e(i,n,n.next,a)&&sk(i,a)&&sk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),lk(n),lk(n.next),n=e=a),n=n.next}while(n!==e);return J2(n)}function w8t(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&z8t(o,s)){var u=g9e(o,s);o=J2(o,o.next),u=J2(u,u.next),ok(o,t,r,n,i,a,0),ok(u,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function T8t(e,t,r,n){var i=[],a,o,s,u,l;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>=l&&n!==r.x&&sS(io.x||r.x===o.x&&E8t(o,r)))&&(o=r,c=h)),r=r.next;while(r!==u);return o}function E8t(e,t){return Mh(e.prev,e,t.prev)<0&&Mh(t.next,e,e.next)<0}function k8t(e,t,r,n){var i=e;do i.z===0&&(i.z=fY(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,C8t(i)}function C8t(e){var t,r,n,i,a,o,s,u,l=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||u>0&&n;)s!==0&&(u===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1);return e}function fY(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 L8t(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 z8t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!P8t(e,t)&&(sk(e,t)&&sk(t,e)&&I8t(e,t)&&(Mh(e.prev,e,t.prev)||Mh(e,t.prev,t))||e9(e,t)&&Mh(e.prev,e,e.next)>0&&Mh(t.prev,t,t.next)>0)}function Mh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function e9(e,t){return e.x===t.x&&e.y===t.y}function m9e(e,t,r,n){var i=$F(Mh(e,t,r)),a=$F(Mh(e,t,n)),o=$F(Mh(r,n,e)),s=$F(Mh(r,n,t));return!!(i!==a&&o!==s||i===0&&JF(e,r,t)||a===0&&JF(e,n,t)||o===0&&JF(r,e,n)||s===0&&JF(r,t,n))}function JF(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 $F(e){return e>0?1:e<0?-1:0}function P8t(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&&m9e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function sk(e,t){return Mh(e.prev,e,e.next)<0?Mh(e,t,e.next)>=0&&Mh(e,e.prev,t)>=0:Mh(e,t,e.prev)<0||Mh(e,e.next,t)<0}function I8t(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 g9e(e,t){var r=new cY(e.i,e.x,e.y),n=new cY(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 v9e(e,t,r,n){var i=new cY(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 lk(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 cY(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}QF.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(hY(e,0,a,r));if(i)for(var s=0,u=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var b9e=Se((Qyr,x9e)=>{"use strict";var D8t=W2();x9e.exports=R8t;function R8t(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=D8t(e,t));for(var n=0;n{"use strict";w9e.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 S9e=Se((tmr,A9e)=>{"use strict";A9e.exports=function(){}});var sx=Se((rmr,M9e)=>{"use strict";var F8t=S9e()();M9e.exports=function(e){return e!==F8t&&e!==null}});var pY=Se((imr,k9e)=>{"use strict";var q8t=Object.create,B8t=Object.getPrototypeOf,E9e={};k9e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||q8t;return typeof e!="function"?!1:B8t(e(t(null),E9e))===E9e}});var vY=Se((nmr,C9e)=>{"use strict";var O8t=sx(),N8t={function:!0,object:!0};C9e.exports=function(e){return O8t(e)&&N8t[typeof e]||!1}});var i1=Se((amr,L9e)=>{"use strict";var U8t=sx();L9e.exports=function(e){if(!U8t(e))throw new TypeError("Cannot use null or undefined");return e}});var P9e=Se((omr,z9e)=>{"use strict";var yY=Object.create,t9;pY()()||(t9=mY());z9e.exports=function(){var e,t,r;return!t9||t9.level!==1?yY:(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(t9,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return yY(n===null?e:n,i)})}()});var mY=Se((smr,I9e)=>{"use strict";var V8t=vY(),H8t=i1(),G8t=Object.prototype.isPrototypeOf,W8t=Object.defineProperty,j8t={configurable:!0,enumerable:!1,writable:!0,value:void 0},r9;r9=function(e,t){if(H8t(e),t===null||V8t(t))return e;throw new TypeError("Prototype must be null or an object")};I9e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(r9(n,i),i),n}):t=function(n,i){return r9(n,i).__proto__=i,n}:t=function n(i,a){var o;return r9(i,a),o=G8t.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&W8t(n.nullPolyfill,"__proto__",j8t),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)}());P9e()});var i9=Se((lmr,D9e)=>{"use strict";D9e.exports=pY()()?Object.setPrototypeOf:mY()});var F9e=Se((umr,R9e)=>{"use strict";var Z8t=vY();R9e.exports=function(e){if(!Z8t(e))throw new TypeError(e+" is not an Object");return e}});var B9e=Se((fmr,q9e)=>{"use strict";var X8t=Object.create(null),Y8t=Math.random;q9e.exports=function(){var e;do e=Y8t().toString(36).slice(2);while(X8t[e]);return e}});var $2=Se((cmr,O9e)=>{"use strict";var K8t=void 0;O9e.exports=function(e){return e!==K8t&&e!==null}});var n9=Se((hmr,N9e)=>{"use strict";var J8t=$2(),$8t={object:!0,function:!0,undefined:!0};N9e.exports=function(e){return J8t(e)?hasOwnProperty.call($8t,typeof e):!1}});var V9e=Se((dmr,U9e)=>{"use strict";var Q8t=n9();U9e.exports=function(e){if(!Q8t(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var G9e=Se((pmr,H9e)=>{"use strict";var eBt=V9e();H9e.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!eBt(e)}});var gY=Se((vmr,W9e)=>{"use strict";var tBt=G9e(),rBt=/^\s*class[\s{/}]/,iBt=Function.prototype.toString;W9e.exports=function(e){return!(!tBt(e)||rBt.test(iBt.call(e)))}});var Z9e=Se((ymr,j9e)=>{"use strict";j9e.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 Y9e=Se((mmr,X9e)=>{"use strict";X9e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var J9e=Se((gmr,K9e)=>{"use strict";var nBt=sx(),aBt=Object.keys;K9e.exports=function(e){return aBt(nBt(e)?Object(e):e)}});var Q9e=Se((_mr,$9e)=>{"use strict";$9e.exports=Y9e()()?Object.keys:J9e()});var tqe=Se((xmr,eqe)=>{"use strict";var oBt=Q9e(),sBt=i1(),lBt=Math.max;eqe.exports=function(e,t){var r,n,i=lBt(arguments.length,2),a;for(e=Object(sBt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";rqe.exports=Z9e()()?Object.assign:tqe()});var _Y=Se((wmr,iqe)=>{"use strict";var uBt=sx(),fBt=Array.prototype.forEach,cBt=Object.create,hBt=function(e,t){var r;for(r in e)t[r]=e[r]};iqe.exports=function(e){var t=cBt(null);return fBt.call(arguments,function(r){uBt(r)&&hBt(Object(r),t)}),t}});var aqe=Se((Tmr,nqe)=>{"use strict";var xY="razdwatrzy";nqe.exports=function(){return typeof xY.contains!="function"?!1:xY.contains("dwa")===!0&&xY.contains("foo")===!1}});var sqe=Se((Amr,oqe)=>{"use strict";var dBt=String.prototype.indexOf;oqe.exports=function(e){return dBt.call(this,e,arguments[1])>-1}});var bY=Se((Smr,lqe)=>{"use strict";lqe.exports=aqe()()?String.prototype.contains:sqe()});var n1=Se((Mmr,hqe)=>{"use strict";var o9=$2(),uqe=gY(),fqe=a9(),cqe=_Y(),uk=bY(),pBt=hqe.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],o9(e)?(r=uk.call(e,"c"),n=uk.call(e,"e"),i=uk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?fqe(cqe(a),o):o};pBt.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],o9(t)?uqe(t)?o9(r)?uqe(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,o9(e)?(n=uk.call(e,"c"),i=uk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?fqe(cqe(a),o):o}});var fk=Se((Emr,pqe)=>{"use strict";var dqe=Object.prototype.toString,vBt=dqe.call(function(){return arguments}());pqe.exports=function(e){return dqe.call(e)===vBt}});var ck=Se((kmr,yqe)=>{"use strict";var vqe=Object.prototype.toString,yBt=vqe.call("");yqe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||vqe.call(e)===yBt)||!1}});var gqe=Se((Cmr,mqe)=>{"use strict";mqe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var bqe=Se((Lmr,xqe)=>{var _qe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};xqe.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return _qe()}try{return __global__||_qe()}finally{delete Object.prototype.__global__}}()});var hk=Se((zmr,wqe)=>{"use strict";wqe.exports=gqe()()?globalThis:bqe()});var Aqe=Se((Pmr,Tqe)=>{"use strict";var mBt=hk(),wY={object:!0,symbol:!0};Tqe.exports=function(){var e=mBt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!wY[typeof e.iterator]||!wY[typeof e.toPrimitive]||!wY[typeof e.toStringTag])}});var Mqe=Se((Imr,Sqe)=>{"use strict";Sqe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var TY=Se((Dmr,Eqe)=>{"use strict";var gBt=Mqe();Eqe.exports=function(e){if(!gBt(e))throw new TypeError(e+" is not a symbol");return e}});var Pqe=Se((Rmr,zqe)=>{"use strict";var kqe=n1(),_Bt=Object.create,Cqe=Object.defineProperty,xBt=Object.prototype,Lqe=_Bt(null);zqe.exports=function(e){for(var t=0,r,n;Lqe[e+(t||"")];)++t;return e+=t||"",Lqe[e]=!0,r="@@"+e,Cqe(xBt,r,kqe.gs(null,function(i){n||(n=!0,Cqe(this,r,kqe(i)),n=!1)})),r}});var Dqe=Se((Fmr,Iqe)=>{"use strict";var Qy=n1(),Vh=hk().Symbol;Iqe.exports=function(e){return Object.defineProperties(e,{hasInstance:Qy("",Vh&&Vh.hasInstance||e("hasInstance")),isConcatSpreadable:Qy("",Vh&&Vh.isConcatSpreadable||e("isConcatSpreadable")),iterator:Qy("",Vh&&Vh.iterator||e("iterator")),match:Qy("",Vh&&Vh.match||e("match")),replace:Qy("",Vh&&Vh.replace||e("replace")),search:Qy("",Vh&&Vh.search||e("search")),species:Qy("",Vh&&Vh.species||e("species")),split:Qy("",Vh&&Vh.split||e("split")),toPrimitive:Qy("",Vh&&Vh.toPrimitive||e("toPrimitive")),toStringTag:Qy("",Vh&&Vh.toStringTag||e("toStringTag")),unscopables:Qy("",Vh&&Vh.unscopables||e("unscopables"))})}});var qqe=Se((qmr,Fqe)=>{"use strict";var Rqe=n1(),bBt=TY(),dk=Object.create(null);Fqe.exports=function(e){return Object.defineProperties(e,{for:Rqe(function(t){return dk[t]?dk[t]:dk[t]=e(String(t))}),keyFor:Rqe(function(t){var r;bBt(t);for(r in dk)if(dk[r]===t)return r})})}});var Nqe=Se((Bmr,Oqe)=>{"use strict";var Xm=n1(),AY=TY(),s9=hk().Symbol,wBt=Pqe(),TBt=Dqe(),ABt=qqe(),SBt=Object.create,SY=Object.defineProperties,l9=Object.defineProperty,jp,lS,Bqe;if(typeof s9=="function")try{String(s9()),Bqe=!0}catch(e){}else s9=null;lS=function(t){if(this instanceof lS)throw new TypeError("Symbol is not a constructor");return jp(t)};Oqe.exports=jp=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return Bqe?s9(t):(r=SBt(lS.prototype),t=t===void 0?"":String(t),SY(r,{__description__:Xm("",t),__name__:Xm("",wBt(t))}))};TBt(jp);ABt(jp);SY(lS.prototype,{constructor:Xm(jp),toString:Xm("",function(){return this.__name__})});SY(jp.prototype,{toString:Xm(function(){return"Symbol ("+AY(this).__description__+")"}),valueOf:Xm(function(){return AY(this)})});l9(jp.prototype,jp.toPrimitive,Xm("",function(){var e=AY(this);return typeof e=="symbol"?e:e.toString()}));l9(jp.prototype,jp.toStringTag,Xm("c","Symbol"));l9(lS.prototype,jp.toStringTag,Xm("c",jp.prototype[jp.toStringTag]));l9(lS.prototype,jp.toPrimitive,Xm("c",jp.prototype[jp.toPrimitive]))});var lx=Se((Omr,Uqe)=>{"use strict";Uqe.exports=Aqe()()?hk().Symbol:Nqe()});var Hqe=Se((Nmr,Vqe)=>{"use strict";var MBt=i1();Vqe.exports=function(){return MBt(this).length=0,this}});var uS=Se((Umr,Gqe)=>{"use strict";Gqe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var jqe=Se((Vmr,Wqe)=>{"use strict";var EBt=$2(),kBt=n9(),CBt=Object.prototype.toString;Wqe.exports=function(e){if(!EBt(e))return null;if(kBt(e)){var t=e.toString;if(typeof t!="function"||t===CBt)return null}try{return""+e}catch(r){return null}}});var Xqe=Se((Hmr,Zqe)=>{"use strict";Zqe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var Kqe=Se((Gmr,Yqe)=>{"use strict";var LBt=Xqe(),zBt=/[\n\r\u2028\u2029]/g;Yqe.exports=function(e){var t=LBt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(zBt,function(r){switch(r){case` +`]),h9e&&(p.frag=p.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(p)}op.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};op.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};op.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nre)?O.tree=c8t(G,{bounds:he}):re&&re.length&&(O.tree=re),O.tree){var te={primitive:"points",usage:"static",data:O.tree,type:"uint32"};O.elements?O.elements(te):O.elements=o.elements(te)}var ke=KF.float32(G);ne({data:ke,usage:"dynamic"});var Ee=KF.fract32(G,ke);return be({data:Ee,usage:"dynamic"}),ze({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),G}},{marker:function(G,O,W){var re=O.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!G||typeof G[0]=="number"){var ne=e.addMarker(G);re[ne]=!0}else{for(var be=[],ze=0,Ce=Math.min(G.length,O.count);ze=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};op.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";dY.exports=QF;dY.exports.default=QF;function QF(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=y9e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,u,l,f,c,h,d;if(n&&(a=T8t(e,t,a,r)),e.length>80*r){s=l=e[0],u=f=e[1];for(var p=r;pl&&(l=c),h>f&&(f=h);d=Math.max(l-s,f-u),d=d!==0?32767/d:0}return ok(a,o,r,s,u,d,0),o}function y9e(e,t,r,n,i){var a,o;if(i===hY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=v9e(a,e[a],e[a+1],o);return o&&e9(o,o.next)&&(lk(o),o=o.next),o}function J2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(e9(r,r.next)||Mh(r.prev,r,r.next)===0)){if(lk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ok(e,t,r,n,i,a,o){if(e){!o&&a&&k8t(e,n,i,a);for(var s=e,u,l;e.prev!==e.next;){if(u=e.prev,l=e.next,a?x8t(e,n,i,a):_8t(e)){t.push(u.i/r|0),t.push(e.i/r|0),t.push(l.i/r|0),lk(e),e=l.next,s=l.next;continue}if(e=l,e===s){o?o===1?(e=b8t(J2(e),t,r),ok(e,t,r,n,i,a,2)):o===2&&w8t(e,t,r,n,i,a):ok(J2(e),t,r,n,i,a,1);break}}}}function _8t(e){var t=e.prev,r=e,n=e.next;if(Mh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,u=r.y,l=n.y,f=ia?i>o?i:o:a>o?a:o,d=s>u?s>l?s:l:u>l?u:l,p=n.next;p!==t;){if(p.x>=f&&p.x<=h&&p.y>=c&&p.y<=d&&sS(i,s,a,u,o,l,p.x,p.y)&&Mh(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function x8t(e,t,r,n){var i=e.prev,a=e,o=e.next;if(Mh(i,a,o)>=0)return!1;for(var s=i.x,u=a.x,l=o.x,f=i.y,c=a.y,h=o.y,d=su?s>l?s:l:u>l?u:l,b=f>c?f>h?f:h:c>h?c:h,y=fY(d,p,t,r,n),k=fY(x,b,t,r,n),E=e.prevZ,A=e.nextZ;E&&E.z>=y&&A&&A.z<=k;){if(E.x>=d&&E.x<=x&&E.y>=p&&E.y<=b&&E!==i&&E!==o&&sS(s,f,u,c,l,h,E.x,E.y)&&Mh(E.prev,E,E.next)>=0||(E=E.prevZ,A.x>=d&&A.x<=x&&A.y>=p&&A.y<=b&&A!==i&&A!==o&&sS(s,f,u,c,l,h,A.x,A.y)&&Mh(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;E&&E.z>=y;){if(E.x>=d&&E.x<=x&&E.y>=p&&E.y<=b&&E!==i&&E!==o&&sS(s,f,u,c,l,h,E.x,E.y)&&Mh(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;A&&A.z<=k;){if(A.x>=d&&A.x<=x&&A.y>=p&&A.y<=b&&A!==i&&A!==o&&sS(s,f,u,c,l,h,A.x,A.y)&&Mh(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function b8t(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!e9(i,a)&&m9e(i,n,n.next,a)&&sk(i,a)&&sk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),lk(n),lk(n.next),n=e=a),n=n.next}while(n!==e);return J2(n)}function w8t(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&z8t(o,s)){var u=g9e(o,s);o=J2(o,o.next),u=J2(u,u.next),ok(o,t,r,n,i,a,0),ok(u,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function T8t(e,t,r,n){var i=[],a,o,s,u,l;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>=l&&n!==r.x&&sS(io.x||r.x===o.x&&E8t(o,r)))&&(o=r,c=h)),r=r.next;while(r!==u);return o}function E8t(e,t){return Mh(e.prev,e,t.prev)<0&&Mh(t.next,e,e.next)<0}function k8t(e,t,r,n){var i=e;do i.z===0&&(i.z=fY(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,C8t(i)}function C8t(e){var t,r,n,i,a,o,s,u,l=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||u>0&&n;)s!==0&&(u===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,l*=2}while(o>1);return e}function fY(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 L8t(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 z8t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!P8t(e,t)&&(sk(e,t)&&sk(t,e)&&I8t(e,t)&&(Mh(e.prev,e,t.prev)||Mh(e,t.prev,t))||e9(e,t)&&Mh(e.prev,e,e.next)>0&&Mh(t.prev,t,t.next)>0)}function Mh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function e9(e,t){return e.x===t.x&&e.y===t.y}function m9e(e,t,r,n){var i=$F(Mh(e,t,r)),a=$F(Mh(e,t,n)),o=$F(Mh(r,n,e)),s=$F(Mh(r,n,t));return!!(i!==a&&o!==s||i===0&&JF(e,r,t)||a===0&&JF(e,n,t)||o===0&&JF(r,e,n)||s===0&&JF(r,t,n))}function JF(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 $F(e){return e>0?1:e<0?-1:0}function P8t(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&&m9e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function sk(e,t){return Mh(e.prev,e,e.next)<0?Mh(e,t,e.next)>=0&&Mh(e,e.prev,t)>=0:Mh(e,t,e.prev)<0||Mh(e,e.next,t)<0}function I8t(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 g9e(e,t){var r=new cY(e.i,e.x,e.y),n=new cY(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 v9e(e,t,r,n){var i=new cY(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 lk(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 cY(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}QF.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(hY(e,0,a,r));if(i)for(var s=0,u=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var b9e=Se((Qyr,x9e)=>{"use strict";var D8t=W2();x9e.exports=R8t;function R8t(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=D8t(e,t));for(var n=0;n{"use strict";w9e.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 S9e=Se((tmr,A9e)=>{"use strict";A9e.exports=function(){}});var sx=Se((rmr,M9e)=>{"use strict";var F8t=S9e()();M9e.exports=function(e){return e!==F8t&&e!==null}});var pY=Se((imr,k9e)=>{"use strict";var q8t=Object.create,B8t=Object.getPrototypeOf,E9e={};k9e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||q8t;return typeof e!="function"?!1:B8t(e(t(null),E9e))===E9e}});var vY=Se((nmr,C9e)=>{"use strict";var O8t=sx(),N8t={function:!0,object:!0};C9e.exports=function(e){return O8t(e)&&N8t[typeof e]||!1}});var i1=Se((amr,L9e)=>{"use strict";var U8t=sx();L9e.exports=function(e){if(!U8t(e))throw new TypeError("Cannot use null or undefined");return e}});var P9e=Se((omr,z9e)=>{"use strict";var yY=Object.create,t9;pY()()||(t9=mY());z9e.exports=function(){var e,t,r;return!t9||t9.level!==1?yY:(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(t9,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return yY(n===null?e:n,i)})}()});var mY=Se((smr,I9e)=>{"use strict";var V8t=vY(),H8t=i1(),G8t=Object.prototype.isPrototypeOf,W8t=Object.defineProperty,j8t={configurable:!0,enumerable:!1,writable:!0,value:void 0},r9;r9=function(e,t){if(H8t(e),t===null||V8t(t))return e;throw new TypeError("Prototype must be null or an object")};I9e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(r9(n,i),i),n}):t=function(n,i){return r9(n,i).__proto__=i,n}:t=function n(i,a){var o;return r9(i,a),o=G8t.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&W8t(n.nullPolyfill,"__proto__",j8t),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)}());P9e()});var i9=Se((lmr,D9e)=>{"use strict";D9e.exports=pY()()?Object.setPrototypeOf:mY()});var F9e=Se((umr,R9e)=>{"use strict";var Z8t=vY();R9e.exports=function(e){if(!Z8t(e))throw new TypeError(e+" is not an Object");return e}});var B9e=Se((fmr,q9e)=>{"use strict";var X8t=Object.create(null),Y8t=Math.random;q9e.exports=function(){var e;do e=Y8t().toString(36).slice(2);while(X8t[e]);return e}});var $2=Se((cmr,O9e)=>{"use strict";var K8t=void 0;O9e.exports=function(e){return e!==K8t&&e!==null}});var n9=Se((hmr,N9e)=>{"use strict";var J8t=$2(),$8t={object:!0,function:!0,undefined:!0};N9e.exports=function(e){return J8t(e)?hasOwnProperty.call($8t,typeof e):!1}});var V9e=Se((dmr,U9e)=>{"use strict";var Q8t=n9();U9e.exports=function(e){if(!Q8t(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var G9e=Se((pmr,H9e)=>{"use strict";var eBt=V9e();H9e.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!eBt(e)}});var gY=Se((vmr,W9e)=>{"use strict";var tBt=G9e(),rBt=/^\s*class[\s{/}]/,iBt=Function.prototype.toString;W9e.exports=function(e){return!(!tBt(e)||rBt.test(iBt.call(e)))}});var Z9e=Se((ymr,j9e)=>{"use strict";j9e.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 Y9e=Se((mmr,X9e)=>{"use strict";X9e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var J9e=Se((gmr,K9e)=>{"use strict";var nBt=sx(),aBt=Object.keys;K9e.exports=function(e){return aBt(nBt(e)?Object(e):e)}});var Q9e=Se((_mr,$9e)=>{"use strict";$9e.exports=Y9e()()?Object.keys:J9e()});var tqe=Se((xmr,eqe)=>{"use strict";var oBt=Q9e(),sBt=i1(),lBt=Math.max;eqe.exports=function(e,t){var r,n,i=lBt(arguments.length,2),a;for(e=Object(sBt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";rqe.exports=Z9e()()?Object.assign:tqe()});var _Y=Se((wmr,iqe)=>{"use strict";var uBt=sx(),fBt=Array.prototype.forEach,cBt=Object.create,hBt=function(e,t){var r;for(r in e)t[r]=e[r]};iqe.exports=function(e){var t=cBt(null);return fBt.call(arguments,function(r){uBt(r)&&hBt(Object(r),t)}),t}});var aqe=Se((Tmr,nqe)=>{"use strict";var xY="razdwatrzy";nqe.exports=function(){return typeof xY.contains!="function"?!1:xY.contains("dwa")===!0&&xY.contains("foo")===!1}});var sqe=Se((Amr,oqe)=>{"use strict";var dBt=String.prototype.indexOf;oqe.exports=function(e){return dBt.call(this,e,arguments[1])>-1}});var bY=Se((Smr,lqe)=>{"use strict";lqe.exports=aqe()()?String.prototype.contains:sqe()});var n1=Se((Mmr,hqe)=>{"use strict";var o9=$2(),uqe=gY(),fqe=a9(),cqe=_Y(),uk=bY(),pBt=hqe.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],o9(e)?(r=uk.call(e,"c"),n=uk.call(e,"e"),i=uk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?fqe(cqe(a),o):o};pBt.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],o9(t)?uqe(t)?o9(r)?uqe(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,o9(e)?(n=uk.call(e,"c"),i=uk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?fqe(cqe(a),o):o}});var fk=Se((Emr,pqe)=>{"use strict";var dqe=Object.prototype.toString,vBt=dqe.call(function(){return arguments}());pqe.exports=function(e){return dqe.call(e)===vBt}});var ck=Se((kmr,yqe)=>{"use strict";var vqe=Object.prototype.toString,yBt=vqe.call("");yqe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||vqe.call(e)===yBt)||!1}});var gqe=Se((Cmr,mqe)=>{"use strict";mqe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var bqe=Se((Lmr,xqe)=>{var _qe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};xqe.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return _qe()}try{return __global__||_qe()}finally{delete Object.prototype.__global__}}()});var hk=Se((zmr,wqe)=>{"use strict";wqe.exports=gqe()()?globalThis:bqe()});var Aqe=Se((Pmr,Tqe)=>{"use strict";var mBt=hk(),wY={object:!0,symbol:!0};Tqe.exports=function(){var e=mBt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!wY[typeof e.iterator]||!wY[typeof e.toPrimitive]||!wY[typeof e.toStringTag])}});var Mqe=Se((Imr,Sqe)=>{"use strict";Sqe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var TY=Se((Dmr,Eqe)=>{"use strict";var gBt=Mqe();Eqe.exports=function(e){if(!gBt(e))throw new TypeError(e+" is not a symbol");return e}});var Pqe=Se((Rmr,zqe)=>{"use strict";var kqe=n1(),_Bt=Object.create,Cqe=Object.defineProperty,xBt=Object.prototype,Lqe=_Bt(null);zqe.exports=function(e){for(var t=0,r,n;Lqe[e+(t||"")];)++t;return e+=t||"",Lqe[e]=!0,r="@@"+e,Cqe(xBt,r,kqe.gs(null,function(i){n||(n=!0,Cqe(this,r,kqe(i)),n=!1)})),r}});var Dqe=Se((Fmr,Iqe)=>{"use strict";var Qy=n1(),Vh=hk().Symbol;Iqe.exports=function(e){return Object.defineProperties(e,{hasInstance:Qy("",Vh&&Vh.hasInstance||e("hasInstance")),isConcatSpreadable:Qy("",Vh&&Vh.isConcatSpreadable||e("isConcatSpreadable")),iterator:Qy("",Vh&&Vh.iterator||e("iterator")),match:Qy("",Vh&&Vh.match||e("match")),replace:Qy("",Vh&&Vh.replace||e("replace")),search:Qy("",Vh&&Vh.search||e("search")),species:Qy("",Vh&&Vh.species||e("species")),split:Qy("",Vh&&Vh.split||e("split")),toPrimitive:Qy("",Vh&&Vh.toPrimitive||e("toPrimitive")),toStringTag:Qy("",Vh&&Vh.toStringTag||e("toStringTag")),unscopables:Qy("",Vh&&Vh.unscopables||e("unscopables"))})}});var qqe=Se((qmr,Fqe)=>{"use strict";var Rqe=n1(),bBt=TY(),dk=Object.create(null);Fqe.exports=function(e){return Object.defineProperties(e,{for:Rqe(function(t){return dk[t]?dk[t]:dk[t]=e(String(t))}),keyFor:Rqe(function(t){var r;bBt(t);for(r in dk)if(dk[r]===t)return r})})}});var Nqe=Se((Bmr,Oqe)=>{"use strict";var Xm=n1(),AY=TY(),s9=hk().Symbol,wBt=Pqe(),TBt=Dqe(),ABt=qqe(),SBt=Object.create,SY=Object.defineProperties,l9=Object.defineProperty,jp,lS,Bqe;if(typeof s9=="function")try{String(s9()),Bqe=!0}catch(e){}else s9=null;lS=function(t){if(this instanceof lS)throw new TypeError("Symbol is not a constructor");return jp(t)};Oqe.exports=jp=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return Bqe?s9(t):(r=SBt(lS.prototype),t=t===void 0?"":String(t),SY(r,{__description__:Xm("",t),__name__:Xm("",wBt(t))}))};TBt(jp);ABt(jp);SY(lS.prototype,{constructor:Xm(jp),toString:Xm("",function(){return this.__name__})});SY(jp.prototype,{toString:Xm(function(){return"Symbol ("+AY(this).__description__+")"}),valueOf:Xm(function(){return AY(this)})});l9(jp.prototype,jp.toPrimitive,Xm("",function(){var e=AY(this);return typeof e=="symbol"?e:e.toString()}));l9(jp.prototype,jp.toStringTag,Xm("c","Symbol"));l9(lS.prototype,jp.toStringTag,Xm("c",jp.prototype[jp.toStringTag]));l9(lS.prototype,jp.toPrimitive,Xm("c",jp.prototype[jp.toPrimitive]))});var lx=Se((Omr,Uqe)=>{"use strict";Uqe.exports=Aqe()()?hk().Symbol:Nqe()});var Hqe=Se((Nmr,Vqe)=>{"use strict";var MBt=i1();Vqe.exports=function(){return MBt(this).length=0,this}});var uS=Se((Umr,Gqe)=>{"use strict";Gqe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var jqe=Se((Vmr,Wqe)=>{"use strict";var EBt=$2(),kBt=n9(),CBt=Object.prototype.toString;Wqe.exports=function(e){if(!EBt(e))return null;if(kBt(e)){var t=e.toString;if(typeof t!="function"||t===CBt)return null}try{return""+e}catch(r){return null}}});var Xqe=Se((Hmr,Zqe)=>{"use strict";Zqe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var Kqe=Se((Gmr,Yqe)=>{"use strict";var LBt=Xqe(),zBt=/[\n\r\u2028\u2029]/g;Yqe.exports=function(e){var t=LBt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(zBt,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 MY=Se((Wmr,Qqe)=>{"use strict";var Jqe=$2(),PBt=n9(),IBt=jqe(),DBt=Kqe(),$qe=function(e,t){return e.replace("%v",DBt(t))};Qqe.exports=function(e,t,r){if(!PBt(r))throw new TypeError($qe(t,e));if(!Jqe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=IBt(r.errorMessage);throw Jqe(n)||(n=t),new TypeError($qe(n,e))}});var t8e=Se((jmr,e8e)=>{"use strict";var RBt=MY(),FBt=$2();e8e.exports=function(e){return FBt(e)?e:RBt(e,"Cannot use %v",arguments[1])}});var i8e=Se((Zmr,r8e)=>{"use strict";var qBt=MY(),BBt=gY();r8e.exports=function(e){return BBt(e)?e:qBt(e,"%v is not a plain function",arguments[1])}});var a8e=Se((Xmr,n8e)=>{"use strict";n8e.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 s8e=Se((Ymr,o8e)=>{"use strict";var OBt=Object.prototype.toString,NBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);o8e.exports=function(e){return typeof e=="function"&&NBt(OBt.call(e))}});var u8e=Se((Kmr,l8e)=>{"use strict";l8e.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var c8e=Se((Jmr,f8e)=>{"use strict";f8e.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var d8e=Se(($mr,h8e)=>{"use strict";h8e.exports=u8e()()?Math.sign:c8e()});var v8e=Se((Qmr,p8e)=>{"use strict";var UBt=d8e(),VBt=Math.abs,HBt=Math.floor;p8e.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:UBt(e)*HBt(VBt(e)))}});var m8e=Se((egr,y8e)=>{"use strict";var GBt=v8e(),WBt=Math.max;y8e.exports=function(e){return WBt(0,GBt(e))}});var b8e=Se((tgr,x8e)=>{"use strict";var jBt=lx().iterator,ZBt=fk(),XBt=s8e(),YBt=m8e(),g8e=uS(),KBt=i1(),JBt=sx(),$Bt=ck(),_8e=Array.isArray,EY=Function.prototype.call,Q2={configurable:!0,enumerable:!0,writable:!0,value:null},kY=Object.defineProperty;x8e.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,u,l,f,c,h;if(e=Object(KBt(e)),JBt(t)&&g8e(t),!this||this===Array||!XBt(this)){if(!t){if(ZBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(_8e(e)){for(o=new Array(s=e.length),i=0;i=55296&&u<=56319&&(h+=e[++i])),h=t?EY.call(t,r,h,a):h,n?(Q2.value=h,kY(o,a,Q2)):o[a]=h,++a;s=a}}if(s===void 0)for(s=YBt(e.length),n&&(o=new n(s)),i=0;i{"use strict";w8e.exports=a8e()()?Array.from:b8e()});var S8e=Se((igr,A8e)=>{"use strict";var QBt=T8e(),eOt=a9(),tOt=i1();A8e.exports=function(e){var t=Object(tOt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?QBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):eOt(i,e),i}});var k8e=Se((ngr,E8e)=>{"use strict";var rOt=uS(),iOt=i1(),nOt=Function.prototype.bind,M8e=Function.prototype.call,aOt=Object.keys,oOt=Object.prototype.propertyIsEnumerable;E8e.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(iOt(r)),rOt(n),i=aOt(r),o&&i.sort(typeof o=="function"?nOt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),M8e.call(e,i,function(s,u){return oOt.call(r,s)?M8e.call(n,a,r[s],s,r,u):t})}}});var L8e=Se((agr,C8e)=>{"use strict";C8e.exports=k8e()("forEach")});var P8e=Se((ogr,z8e)=>{"use strict";var sOt=uS(),lOt=L8e(),uOt=Function.prototype.call;z8e.exports=function(e,t){var r={},n=arguments[2];return sOt(t),lOt(e,function(i,a,o,s){r[a]=uOt.call(t,n,i,a,o,s)}),r}});var F8e=Se((sgr,R8e)=>{"use strict";var fOt=$2(),cOt=t8e(),I8e=i8e(),hOt=S8e(),dOt=_Y(),pOt=P8e(),vOt=Function.prototype.bind,yOt=Object.defineProperty,mOt=Object.prototype.hasOwnProperty,D8e;D8e=function(e,t,r){var n=cOt(t)&&I8e(t.value),i;return i=hOt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&mOt.call(this,e)?n:(t.value=vOt.call(n,r.resolveContext?r.resolveContext(this):this),yOt(this,e,t),this[e])},i};R8e.exports=function(e){var t=dOt(arguments[1]);return fOt(t.resolveContext)&&I8e(t.resolveContext),pOt(e,function(r,n){return D8e(n,r,t)})}});var CY=Se((lgr,N8e)=>{"use strict";var gOt=Hqe(),_Ot=a9(),xOt=uS(),bOt=i1(),Bv=n1(),wOt=F8e(),q8e=lx(),B8e=Object.defineProperty,O8e=Object.defineProperties,pk;N8e.exports=pk=function(e,t){if(!(this instanceof pk))throw new TypeError("Constructor requires 'new'");O8e(this,{__list__:Bv("w",bOt(e)),__context__:Bv("w",t),__nextIndex__:Bv("w",0)}),t&&(xOt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete pk.prototype.constructor;O8e(pk.prototype,_Ot({_next:Bv(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__){B8e(this,"__redo__",Bv("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Bv(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:Bv(function(){this.__redo__&&gOt.call(this.__redo__),this.__nextIndex__=0})})));B8e(pk.prototype,q8e.iterator,Bv(function(){return this}))});var W8e=Se((ugr,G8e)=>{"use strict";var U8e=i9(),V8e=bY(),LY=n1(),TOt=lx(),zY=CY(),H8e=Object.defineProperty,fS;fS=G8e.exports=function(e,t){if(!(this instanceof fS))throw new TypeError("Constructor requires 'new'");zY.call(this,e),t?V8e.call(t,"key+value")?t="key+value":V8e.call(t,"key")?t="key":t="value":t="value",H8e(this,"__kind__",LY("",t))};U8e&&U8e(fS,zY);delete fS.prototype.constructor;fS.prototype=Object.create(zY.prototype,{_resolve:LY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});H8e(fS.prototype,TOt.toStringTag,LY("c","Array Iterator"))});var Y8e=Se((fgr,X8e)=>{"use strict";var j8e=i9(),u9=n1(),AOt=lx(),PY=CY(),Z8e=Object.defineProperty,cS;cS=X8e.exports=function(e){if(!(this instanceof cS))throw new TypeError("Constructor requires 'new'");e=String(e),PY.call(this,e),Z8e(this,"__length__",u9("",e.length))};j8e&&j8e(cS,PY);delete cS.prototype.constructor;cS.prototype=Object.create(PY.prototype,{_next:u9(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});Z8e(cS.prototype,AOt.toStringTag,u9("c","String Iterator"))});var J8e=Se((cgr,K8e)=>{"use strict";var SOt=fk(),MOt=sx(),EOt=ck(),kOt=lx().iterator,COt=Array.isArray;K8e.exports=function(e){return MOt(e)?COt(e)||EOt(e)||SOt(e)?!0:typeof e[kOt]=="function":!1}});var Q8e=Se((hgr,$8e)=>{"use strict";var LOt=J8e();$8e.exports=function(e){if(!LOt(e))throw new TypeError(e+" is not iterable");return e}});var IY=Se((dgr,rBe)=>{"use strict";var zOt=fk(),POt=ck(),eBe=W8e(),IOt=Y8e(),DOt=Q8e(),tBe=lx().iterator;rBe.exports=function(e){return typeof DOt(e)[tBe]=="function"?e[tBe]():zOt(e)?new eBe(e):POt(e)?new IOt(e):new eBe(e)}});var nBe=Se((pgr,iBe)=>{"use strict";var ROt=fk(),FOt=uS(),qOt=ck(),BOt=IY(),OOt=Array.isArray,DY=Function.prototype.call,NOt=Array.prototype.some;iBe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,u,l,f;if(OOt(e)||ROt(e)?r="array":qOt(e)?r="string":e=BOt(e),FOt(t),a=function(){o=!0},r==="array"){NOt.call(e,function(c){return DY.call(t,n,c,a),o});return}if(r==="string"){for(u=e.length,s=0;s=55296&&f<=56319&&(l+=e[++s])),DY.call(t,n,l,a),!o);++s);return}for(i=e.next();!i.done;){if(DY.call(t,n,i.value,a),o)return;i=e.next()}}});var oBe=Se((vgr,aBe)=>{"use strict";aBe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var uBe=Se((ygr,lBe)=>{"use strict";var UOt=sx(),c9=i9(),f9=F9e(),VOt=i1(),HOt=B9e(),a1=n1(),GOt=IY(),WOt=nBe(),jOt=lx().toStringTag,sBe=oBe(),ZOt=Array.isArray,FY=Object.defineProperty,RY=Object.prototype.hasOwnProperty,XOt=Object.getPrototypeOf,ux;lBe.exports=ux=function(){var e=arguments[0],t;if(!(this instanceof ux))throw new TypeError("Constructor requires 'new'");return t=sBe&&c9&&WeakMap!==ux?c9(new WeakMap,XOt(this)):this,UOt(e)&&(ZOt(e)||(e=GOt(e))),FY(t,"__weakMapData__",a1("c","$weakMap$"+HOt())),e&&WOt(e,function(r){VOt(r),t.set(r[0],r[1])}),t};sBe&&(c9&&c9(ux,WeakMap),ux.prototype=Object.create(WeakMap.prototype,{constructor:a1(ux)}));Object.defineProperties(ux.prototype,{delete:a1(function(e){return RY.call(f9(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:a1(function(e){if(RY.call(f9(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:a1(function(e){return RY.call(f9(e),this.__weakMapData__)}),set:a1(function(e,t){return FY(f9(e),this.__weakMapData__,a1("c",t)),this}),toString:a1(function(){return"[object WeakMap]"})});FY(ux.prototype,jOt,a1("c","WeakMap"))});var qY=Se((mgr,fBe)=>{"use strict";fBe.exports=T9e()()?WeakMap:uBe()});var hBe=Se((ggr,cBe)=>{"use strict";cBe.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 h9=J_(),YOt=W2(),OY=Uh(),KOt=Zm(),JOt=j2(),dBe=_9e(),$Ot=b9e(),{float32:QOt,fract32:BY}=XF(),eNt=qY(),pBe=eS(),tNt=hBe(),rNt=` precision highp float; @@ -2584,7 +2584,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;vBe.exports=Rc;function Rc(e,t){if(!(this instanceof Rc))return new Rc(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=Rc.shaders.has(e)?Rc.shaders.get(e):Rc.shaders.set(e,Rc.createShaders(e)).get(e),this.update(t)}Rc.dashMult=2;Rc.maxPatternLength=256;Rc.precisionThreshold=3e6;Rc.maxPoints=1e4;Rc.maxLines=2048;Rc.shaders=new eNt;Rc.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(OY({vert:rNt,frag:iNt,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(OY({cull:{enable:!0,face:"back"},vert:oNt,frag:sNt,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:nNt,frag:aNt,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}};Rc.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};Rc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Rc.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>Rc.precisionThreshold||t.scale[1]*t.viewport.height>Rc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Rc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Rc.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=KOt(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=OY({},Rc.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-_),E=[],k=0,A=o.hole!=null?o.hole[0]:null;if(A!=null){let L=tNt(y,_=>_>=A);y=y.slice(0,L),y.push(A)}for(let L=0;Lv-A+(y[L]-k)),M=dBe(_,C);M=M.map(v=>v+k+(v+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var xBe=Se((xgr,_Be)=>{"use strict";var lNt=W2(),uNt=J_(),fNt=sY(),cNt=Zm(),yBe=Uh(),mBe=j2(),{float32:hNt,fract32:UY}=XF();_Be.exports=dNt;var gBe=[[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,u,l={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},f=[];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)}),u=e.buffer({usage:"static",type:"float",data:gBe}),p(t),n=e({vert:` +`;vBe.exports=Rc;function Rc(e,t){if(!(this instanceof Rc))return new Rc(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=Rc.shaders.has(e)?Rc.shaders.get(e):Rc.shaders.set(e,Rc.createShaders(e)).get(e),this.update(t)}Rc.dashMult=2;Rc.maxPatternLength=256;Rc.precisionThreshold=3e6;Rc.maxPoints=1e4;Rc.maxLines=2048;Rc.shaders=new eNt;Rc.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(OY({vert:rNt,frag:iNt,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(OY({cull:{enable:!0,face:"back"},vert:oNt,frag:sNt,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:nNt,frag:aNt,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}};Rc.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};Rc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Rc.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>Rc.precisionThreshold||t.scale[1]*t.viewport.height>Rc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Rc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Rc.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=KOt(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=OY({},Rc.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-_),k=[],E=0,A=o.hole!=null?o.hole[0]:null;if(A!=null){let L=tNt(y,_=>_>=A);y=y.slice(0,L),y.push(A)}for(let L=0;Lv-A+(y[L]-E)),M=dBe(_,C);M=M.map(v=>v+E+(v+E{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var xBe=Se((xgr,_Be)=>{"use strict";var lNt=W2(),uNt=J_(),fNt=sY(),cNt=Zm(),yBe=Uh(),mBe=j2(),{float32:hNt,fract32:UY}=XF();_Be.exports=dNt;var gBe=[[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,u,l={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},f=[];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)}),u=e.buffer({usage:"static",type:"float",data:gBe}),p(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2628,10 +2628,10 @@ 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,y)=>[y.viewport.x,y.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,y)=>y.offset*4,divisor:1},position:{buffer:i,offset:(b,y)=>y.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(b,y)=>y.offset*16,divisor:1},direction:{buffer:u,stride:24,offset:0},lineOffset:{buffer:u,stride:24,offset:8},capOffset:{buffer:u,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:gBe.length}),yBe(c,{update:p,draw:h,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:f}),c;function c(b){b?p(b):b===null&&x(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),f.forEach((y,E)=>{if(y){if(b&&(b[E]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}d(E)}})}function d(b){typeof b=="number"&&(b=f[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 p(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let y=0,E=0;if(c.groups=f=b.map((L,_)=>{let C=f[_];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=cNt(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||(f[_]=C={id:_,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=yBe({},l,L)),fNt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=mBe(M),E+=M.length,M),positions:(M,v)=>(M=mBe(M,"float64"),v.count=Math.floor(M.length/2),v.bounds=lNt(M,2),v.offset=y,y+=v.count,M)},{color:(M,v)=>{let z=v.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let F=M;M=Array(z);for(let q=0;q{let T=v.bounds;return M||(M=T),v.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],v.translate=[-M[0],-M[1]],v.scaleFract=UY(v.scale),v.translateFract=UY(v.translate),M},viewport:M=>{let v;return Array.isArray(M)?v={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(v={x:M.x||M.left||0,y:M.y||M.top||0},M.right?v.width=M.right-v.x:v.width=M.w||M.width||0,M.bottom?v.height=M.bottom-v.y:v.height=M.h||M.height||0):v={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},v}}]),C}),y||E){let L=f.reduce((v,z,T)=>v+(z?z.count:0),0),_=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);f.forEach((v,z)=>{if(!v)return;let{positions:T,count:F,offset:q,color:U,errors:H}=v;F&&(C.set(U,q*4),M.set(H,q*4),_.set(T,q*2))});var k=hNt(_);i(k);var A=UY(_,k);a(A),o(C),s(M)}}function x(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),u.destroy()}}});var TBe=Se((bgr,wBe)=>{var bBe=/[\'\"]/;wBe.exports=function(t){return t?(bBe.test(t.charAt(0))&&(t=t.substr(1)),bBe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var VY=Se(()=>{});var HY=Se(()=>{});var GY=Se(()=>{});var WY=Se(()=>{});var jY=Se(()=>{});var EBe=Se((Pgr,MBe)=>{"use strict";function ABe(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(u){var l=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),f=[];function c(h,d,p){var x=r.push(h.slice(u[0].length,-u[1].length))-1;return f.push(x),i+x+i}r.forEach(function(h,d){for(var p,x=0;h!=p;)if(p=h,h=h.replace(l,c),x++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),f=f.reverse(),r=r.map(function(h){return f.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),u[0]+"$1"+u[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(u,l,f){for(var c=[],h,d=0;h=o.exec(u);){if(d++>1e4)throw Error("Circular references in parenthesis");c.push(u.slice(0,h.index)),c.push(s(l[h[1]],l)),u=u.slice(h.index+h[0].length)}return c.push(u),c}return a?r:s(r[0],r)}function SBe(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 u(l,f){return Array.isArray(f)&&(f=f.reduce(u,"")),l+f},"");function s(u,l){if(e[l]==null)throw Error("Reference "+l+"is undefined");return e[l]}}function ZY(e,t){return Array.isArray(e)?SBe(e,t):ABe(e,t)}ZY.parse=ABe;ZY.stringify=SBe;MBe.exports=ZY});var LBe=Se((Igr,CBe)=>{"use strict";var kBe=EBe();CBe.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(c){return c.length===1&&(c=c+c),c}));var i=kBe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],u=0;u{});var XY=Se((Fgr,PBe)=>{"use strict";var pNt=zBe();PBe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||pNt.indexOf(t)!==-1}}});var FBe=Se((qgr,RBe)=>{"use strict";var vNt=TBe(),yNt=VY(),mNt=HY(),gNt=GY(),_Nt=WY(),xNt=jY(),YY=LBe(),bNt=XY().isSize;RBe.exports=DBe;var vk=DBe.cache={};function DBe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(vk[e])return vk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(mNt.indexOf(e)!==-1)return vk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=YY(e,/\s+/),n;n=r.shift();){if(yNt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),vk[e]=t;if(_Nt.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(gNt.indexOf(n)!==-1){t.weight=n;continue}if(bNt(n)){var i=YY(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=IBe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=IBe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=YY(r.join(" "),/\s*,\s*/).map(vNt),vk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function IBe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var JY=Se((Bgr,qBe)=>{"use strict";var wNt=Zm(),TNt=XY().isSize,ANt=mk(VY()),SNt=mk(HY()),MNt=mk(GY()),ENt=mk(WY()),kNt=mk(jY()),CNt={normal:1,"small-caps":1},LNt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},KY={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};qBe.exports=function(t){if(t=wNt(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&&yk(t.system,SNt),t.system;if(yk(t.style,ENt),yk(t.variant,CNt),yk(t.weight,MNt),yk(t.stretch,kNt),t.size==null&&(t.size=KY.size),typeof t.size=="number"&&(t.size+="px"),!TNt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=KY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[KY.family]),t.family=t.family.map(function(n){return LNt[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 yk(e,t){if(e&&!t[e]&&!ANt[e])throw Error("Unknown keyword `"+e+"`");return e}function mk(e){for(var t={},r=0;r{"use strict";BBe.exports={parse:FBe(),stringify:JY()}});var eK=Se(($Y,QY)=>{(function(e,t){typeof $Y=="object"&&typeof QY!="undefined"?QY.exports=t():typeof define=="function"&&define.amd?define(t):e.createREGL=t()})($Y,function(){"use strict";var e=function(Gt,jr){for(var _i=Object.keys(jr),Mn=0;Mn<_i.length;++Mn)Gt[_i[Mn]]=jr[_i[Mn]];return Gt},t=0,r=0,n=5,i=6;function a(Gt,jr){this.id=t++,this.type=Gt,this.data=jr}function o(Gt){return Gt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function s(Gt){if(Gt.length===0)return[];var jr=Gt.charAt(0),_i=Gt.charAt(Gt.length-1);if(Gt.length>1&&jr===_i&&(jr==='"'||jr==="'"))return['"'+o(Gt.substr(1,Gt.length-2))+'"'];var Mn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Gt);if(Mn)return s(Gt.substr(0,Mn.index)).concat(s(Mn[1])).concat(s(Gt.substr(Mn.index+Mn[0].length)));var Ta=Gt.split(".");if(Ta.length===1)return['"'+o(Gt)+'"'];for(var fa=[],ha=0;ha65535)<<4,Gt>>>=jr,_i=(Gt>255)<<3,Gt>>>=_i,jr|=_i,_i=(Gt>15)<<2,Gt>>>=_i,jr|=_i,_i=(Gt>3)<<1,Gt>>>=_i,jr|=_i,jr|Gt>>1}function O(){var Gt=M(8,function(){return[]});function jr(fa){var ha=j(fa),Io=Gt[G(ha)>>2];return Io.length>0?Io.pop():new ArrayBuffer(ha)}function _i(fa){Gt[G(fa.byteLength)>>2].push(fa)}function Mn(fa,ha){var Io=null;switch(fa){case v:Io=new Int8Array(jr(ha),0,ha);break;case z:Io=new Uint8Array(jr(ha),0,ha);break;case T:Io=new Int16Array(jr(2*ha),0,ha);break;case F:Io=new Uint16Array(jr(2*ha),0,ha);break;case q:Io=new Int32Array(jr(4*ha),0,ha);break;case U:Io=new Uint32Array(jr(4*ha),0,ha);break;case H:Io=new Float32Array(jr(4*ha),0,ha);break;default:return null}return Io.length!==ha?Io.subarray(0,ha):Io}function Ta(fa){_i(fa.buffer)}return{alloc:jr,free:_i,allocType:Mn,freeType:Ta}}var W=O();W.zero=O();var re=3408,ne=3410,be=3411,ze=3412,Ce=3413,he=3414,te=3415,ke=33901,Ee=33902,Me=3379,Oe=3386,Re=34921,me=36347,Be=36348,fe=35661,Ze=35660,et=34930,gt=36349,Pt=34076,Qe=34024,Xe=7936,Tt=7937,xt=7938,_t=35724,Ct=34047,jt=36063,At=34852,Te=3553,nt=34067,ut=34069,ct=33984,rt=6408,je=5126,tt=5121,Je=36160,Mt=36053,Vt=36064,Kt=16384,ir=function(Gt,jr){var _i=1;jr.ext_texture_filter_anisotropic&&(_i=Gt.getParameter(Ct));var Mn=1,Ta=1;jr.webgl_draw_buffers&&(Mn=Gt.getParameter(At),Ta=Gt.getParameter(jt));var fa=!!jr.oes_texture_float;if(fa){var ha=Gt.createTexture();Gt.bindTexture(Te,ha),Gt.texImage2D(Te,0,rt,1,1,0,rt,je,null);var Io=Gt.createFramebuffer();if(Gt.bindFramebuffer(Je,Io),Gt.framebufferTexture2D(Je,Vt,Te,ha,0),Gt.bindTexture(Te,null),Gt.checkFramebufferStatus(Je)!==Mt)fa=!1;else{Gt.viewport(0,0,1,1),Gt.clearColor(1,0,0,1),Gt.clear(Kt);var Vs=W.allocType(je,4);Gt.readPixels(0,0,1,1,rt,je,Vs),Gt.getError()?fa=!1:(Gt.deleteFramebuffer(Io),Gt.deleteTexture(ha),fa=Vs[0]===1),W.freeType(Vs)}}var Hs=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),is=!0;if(!Hs){var su=Gt.createTexture(),Ps=W.allocType(tt,36);Gt.activeTexture(ct),Gt.bindTexture(nt,su),Gt.texImage2D(ut,0,rt,3,3,0,rt,tt,Ps),W.freeType(Ps),Gt.bindTexture(nt,null),Gt.deleteTexture(su),is=!Gt.getError()}return{colorBits:[Gt.getParameter(ne),Gt.getParameter(be),Gt.getParameter(ze),Gt.getParameter(Ce)],depthBits:Gt.getParameter(he),stencilBits:Gt.getParameter(te),subpixelBits:Gt.getParameter(re),extensions:Object.keys(jr).filter(function(qs){return!!jr[qs]}),maxAnisotropic:_i,maxDrawbuffers:Mn,maxColorAttachments:Ta,pointSizeDims:Gt.getParameter(ke),lineWidthDims:Gt.getParameter(Ee),maxViewportDims:Gt.getParameter(Oe),maxCombinedTextureUnits:Gt.getParameter(fe),maxCubeMapSize:Gt.getParameter(Pt),maxRenderbufferSize:Gt.getParameter(Qe),maxTextureUnits:Gt.getParameter(et),maxTextureSize:Gt.getParameter(Me),maxAttributes:Gt.getParameter(Re),maxVertexUniforms:Gt.getParameter(me),maxVertexTextureUnits:Gt.getParameter(Ze),maxVaryingVectors:Gt.getParameter(Be),maxFragmentUniforms:Gt.getParameter(gt),glsl:Gt.getParameter(_t),renderer:Gt.getParameter(Tt),vendor:Gt.getParameter(Xe),version:Gt.getParameter(xt),readFloat:fa,npotTextureCube:is}},fr=function(Gt){return Gt instanceof Uint8Array||Gt instanceof Uint16Array||Gt instanceof Uint32Array||Gt instanceof Int8Array||Gt instanceof Int16Array||Gt instanceof Int32Array||Gt instanceof Float32Array||Gt instanceof Float64Array||Gt instanceof Uint8ClampedArray};function Ot(Gt){return!!Gt&&typeof Gt=="object"&&Array.isArray(Gt.shape)&&Array.isArray(Gt.stride)&&typeof Gt.offset=="number"&&Gt.shape.length===Gt.stride.length&&(Array.isArray(Gt.data)||fr(Gt.data))}var De=function(Gt){return Object.keys(Gt).map(function(jr){return Gt[jr]})},_e={shape:ue,flatten:ye};function Fe(Gt,jr,_i){for(var Mn=0;Mn0){var ru;if(Array.isArray(La[0])){nl=Jr(La);for(var hs=1,Ho=1;Ho0){if(typeof hs[0]=="number"){var tl=W.allocType(Qo.dtype,hs.length);sr(tl,hs),nl(tl,ql),W.freeType(tl)}else if(Array.isArray(hs[0])||fr(hs[0])){yl=Jr(hs);var js=Hi(hs,yl,Qo.dtype);nl(js,ql),W.freeType(js)}}}else if(Ot(hs)){yl=hs.shape;var zl=hs.stride,lu=0,bu=0,al=0,jl=0;yl.length===1?(lu=yl[0],bu=1,al=zl[0],jl=0):yl.length===2&&(lu=yl[0],bu=yl[1],al=zl[0],jl=zl[1]);var mu=Array.isArray(hs.data)?Qo.dtype:Bt(hs.data),Tu=W.allocType(mu,lu*bu);br(Tu,hs.data,lu,bu,al,jl,hs.offset),nl(Tu,ql),W.freeType(Tu)}return bl}return Es||bl(kn),bl._reglType="buffer",bl._buffer=Qo,bl.subdata=ru,_i.profile&&(bl.stats=Qo.stats),bl.destroy=function(){Ps(Qo)},bl}function Do(){De(fa).forEach(function(kn){kn.buffer=Gt.createBuffer(),Gt.bindBuffer(kn.type,kn.buffer),Gt.bufferData(kn.type,kn.persistentData||kn.byteLength,kn.usage)})}return _i.profile&&(jr.getTotalBufferSize=function(){var kn=0;return Object.keys(fa).forEach(function(La){kn+=fa[La].stats.size}),kn}),{create:qs,createStream:Vs,destroyStream:Hs,clear:function(){De(fa).forEach(Ps),Io.forEach(Ps)},getBuffer:function(kn){return kn&&kn._buffer instanceof ha?kn._buffer:null},restore:Do,_initBuffer:su}}var Tr=0,Rr=0,Br=1,oi=1,vi=4,Pi=4,Yr={points:Tr,point:Rr,lines:Br,line:oi,triangles:vi,triangle:Pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ni=0,Ur=1,ti=4,ki=5120,ji=5121,Vi=5122,zi=5123,Mi=5124,sn=5125,fi=34963,Or=35040,st=35044;function Wt(Gt,jr,_i,Mn){var Ta={},fa=0,ha={uint8:ji,uint16:zi};jr.oes_element_index_uint&&(ha.uint32=sn);function Io(Do){this.id=fa++,Ta[this.id]=this,this.buffer=Do,this.primType=ti,this.vertCount=0,this.type=0}Io.prototype.bind=function(){this.buffer.bind()};var Vs=[];function Hs(Do){var kn=Vs.pop();return kn||(kn=new Io(_i.create(null,fi,!0,!1)._buffer)),su(kn,Do,Or,-1,-1,0,0),kn}function is(Do){Vs.push(Do)}function su(Do,kn,La,Es,Ws,Qo,bl){Do.buffer.bind();var nl;if(kn){var ru=bl;!bl&&(!fr(kn)||Ot(kn)&&!fr(kn.data))&&(ru=jr.oes_element_index_uint?sn:zi),_i._initBuffer(Do.buffer,kn,La,ru,3)}else Gt.bufferData(fi,Qo,La),Do.buffer.dtype=nl||ji,Do.buffer.usage=La,Do.buffer.dimension=3,Do.buffer.byteLength=Qo;if(nl=bl,!bl){switch(Do.buffer.dtype){case ji:case ki:nl=ji;break;case zi:case Vi:nl=zi;break;case sn:case Mi:nl=sn;break;default:}Do.buffer.dtype=nl}Do.type=nl;var hs=Ws;hs<0&&(hs=Do.buffer.byteLength,nl===zi?hs>>=1:nl===sn&&(hs>>=2)),Do.vertCount=hs;var Ho=Es;if(Es<0){Ho=ti;var ql=Do.buffer.dimension;ql===1&&(Ho=Ni),ql===2&&(Ho=Ur),ql===3&&(Ho=ti)}Do.primType=Ho}function Ps(Do){Mn.elementsCount--,delete Ta[Do.id],Do.buffer.destroy(),Do.buffer=null}function qs(Do,kn){var La=_i.create(null,fi,!0),Es=new Io(La._buffer);Mn.elementsCount++;function Ws(Qo){if(!Qo)La(),Es.primType=ti,Es.vertCount=0,Es.type=ji;else if(typeof Qo=="number")La(Qo),Es.primType=ti,Es.vertCount=Qo|0,Es.type=ji;else{var bl=null,nl=st,ru=-1,hs=-1,Ho=0,ql=0;Array.isArray(Qo)||fr(Qo)||Ot(Qo)?bl=Qo:("data"in Qo&&(bl=Qo.data),"usage"in Qo&&(nl=xi[Qo.usage]),"primitive"in Qo&&(ru=Yr[Qo.primitive]),"count"in Qo&&(hs=Qo.count|0),"type"in Qo&&(ql=ha[Qo.type]),"length"in Qo?Ho=Qo.length|0:(Ho=hs,ql===zi||ql===Vi?Ho*=2:(ql===sn||ql===Mi)&&(Ho*=4))),su(Es,bl,nl,ru,hs,Ho,ql)}return Ws}return Ws(Do),Ws._reglType="elements",Ws._elements=Es,Ws.subdata=function(Qo,bl){return La.subdata(Qo,bl),Ws},Ws.destroy=function(){Ps(Es)},Ws}return{create:qs,createStream:Hs,destroyStream:is,getElements:function(Do){return typeof Do=="function"&&Do._elements instanceof Io?Do._elements:null},clear:function(){De(Ta).forEach(Ps)}}}var tr=new Float32Array(1),or=new Uint32Array(tr.buffer),Nr=5123;function hi(Gt){for(var jr=W.allocType(Nr,Gt.length),_i=0;_i>>31<<15,fa=(Mn<<1>>>24)-127,ha=Mn>>13&1023;if(fa<-24)jr[_i]=Ta;else if(fa<-14){var Io=-14-fa;jr[_i]=Ta+(ha+1024>>Io)}else fa>15?jr[_i]=Ta+31744:jr[_i]=Ta+(fa+15<<10)+ha}return jr}function Gi(Gt){return Array.isArray(Gt)||fr(Gt)}var Qr=34467,Ui=3553,zn=34067,fn=34069,xn=6408,_a=6406,Wn=6407,Fn=6409,ia=6410,za=32854,Hr=32855,na=36194,go=32819,Dn=32820,un=33635,Zn=34042,Wo=6402,Ba=34041,Bo=35904,Ea=35906,Ha=36193,tn=33776,Cn=33777,Xn=33778,ts=33779,Ja=35986,to=35987,Ri=34798,an=35840,cs=35841,pa=35842,ln=35843,ka=36196,va=5121,bo=5123,Co=5125,Fi=5126,Yn=10242,xa=10243,Qi=10497,Nn=33071,Pn=33648,qa=10240,jo=10241,Vo=9728,Pa=9729,Oa=9984,co=9985,An=9986,_o=9987,ks=33170,bs=4352,ps=4353,sa=4354,Bn=34046,ms=3317,ya=37440,on=37441,mn=37443,Ga=37444,ca=33984,bn=[Oa,An,co,_o],Xi=[0,Fn,ia,Wn,xn],qn={};qn[Fn]=qn[_a]=qn[Wo]=1,qn[Ba]=qn[ia]=2,qn[Wn]=qn[Bo]=3,qn[xn]=qn[Ea]=4;function Ia(Gt){return"[object "+Gt+"]"}var yn=Ia("HTMLCanvasElement"),Ya=Ia("OffscreenCanvas"),ba=Ia("CanvasRenderingContext2D"),Da=Ia("ImageBitmap"),Aa=Ia("HTMLImageElement"),Ln=Ia("HTMLVideoElement"),wo=Object.keys(de).concat([yn,Ya,ba,Da,Aa,Ln]),wa=[];wa[va]=1,wa[Fi]=4,wa[Ha]=2,wa[bo]=2,wa[Co]=4;var $i=[];$i[za]=2,$i[Hr]=2,$i[na]=2,$i[Ba]=4,$i[tn]=.5,$i[Cn]=.5,$i[Xn]=1,$i[ts]=1,$i[Ja]=.5,$i[to]=1,$i[Ri]=1,$i[an]=.5,$i[cs]=.25,$i[pa]=.5,$i[ln]=.25,$i[ka]=.5;function ea(Gt){return Array.isArray(Gt)&&(Gt.length===0||typeof Gt[0]=="number")}function Sa(Gt){if(!Array.isArray(Gt))return!1;var jr=Gt.length;return!(jr===0||!Gi(Gt[0]))}function Za(Gt){return Object.prototype.toString.call(Gt)}function xo(Gt){return Za(Gt)===yn}function Wa(Gt){return Za(Gt)===Ya}function hn(Gt){return Za(Gt)===ba}function Un(Gt){return Za(Gt)===Da}function Ss(Gt){return Za(Gt)===Aa}function Kn(Gt){return Za(Gt)===Ln}function ns(Gt){if(!Gt)return!1;var jr=Za(Gt);return wo.indexOf(jr)>=0?!0:ea(Gt)||Sa(Gt)||Ot(Gt)}function Jo(Gt){return de[Object.prototype.toString.call(Gt)]|0}function vo(Gt,jr){var _i=jr.length;switch(Gt.type){case va:case bo:case Co:case Fi:var Mn=W.allocType(Gt.type,_i);Mn.set(jr),Gt.data=Mn;break;case Ha:Gt.data=hi(jr);break;default:}}function ma(Gt,jr){return W.allocType(Gt.type===Ha?Fi:Gt.type,jr)}function ja(Gt,jr){Gt.type===Ha?(Gt.data=hi(jr),W.freeType(jr)):Gt.data=jr}function To(Gt,jr,_i,Mn,Ta,fa){for(var ha=Gt.width,Io=Gt.height,Vs=Gt.channels,Hs=ha*Io*Vs,is=ma(Gt,Hs),su=0,Ps=0;Ps=1;)Io+=ha*Vs*Vs,Vs/=2;return Io}else return ha*_i*Mn}function la(Gt,jr,_i,Mn,Ta,fa,ha){var Io={"don't care":bs,"dont care":bs,nice:sa,fast:ps},Vs={repeat:Qi,clamp:Nn,mirror:Pn},Hs={nearest:Vo,linear:Pa},is=e({mipmap:_o,"nearest mipmap nearest":Oa,"linear mipmap nearest":co,"nearest mipmap linear":An,"linear mipmap linear":_o},Hs),su={none:0,browser:Ga},Ps={uint8:va,rgba4:go,rgb565:un,"rgb5 a1":Dn},qs={alpha:_a,luminance:Fn,"luminance alpha":ia,rgb:Wn,rgba:xn,rgba4:za,"rgb5 a1":Hr,rgb565:na},Do={};jr.ext_srgb&&(qs.srgb=Bo,qs.srgba=Ea),jr.oes_texture_float&&(Ps.float32=Ps.float=Fi),jr.oes_texture_half_float&&(Ps.float16=Ps["half float"]=Ha),jr.webgl_depth_texture&&(e(qs,{depth:Wo,"depth stencil":Ba}),e(Ps,{uint16:bo,uint32:Co,"depth stencil":Zn})),jr.webgl_compressed_texture_s3tc&&e(Do,{"rgb s3tc dxt1":tn,"rgba s3tc dxt1":Cn,"rgba s3tc dxt3":Xn,"rgba s3tc dxt5":ts}),jr.webgl_compressed_texture_atc&&e(Do,{"rgb atc":Ja,"rgba atc explicit alpha":to,"rgba atc interpolated alpha":Ri}),jr.webgl_compressed_texture_pvrtc&&e(Do,{"rgb pvrtc 4bppv1":an,"rgb pvrtc 2bppv1":cs,"rgba pvrtc 4bppv1":pa,"rgba pvrtc 2bppv1":ln}),jr.webgl_compressed_texture_etc1&&(Do["rgb etc1"]=ka);var kn=Array.prototype.slice.call(Gt.getParameter(Qr));Object.keys(Do).forEach(function(ge){var Ue=Do[ge];kn.indexOf(Ue)>=0&&(qs[ge]=Ue)});var La=Object.keys(qs);_i.textureFormats=La;var Es=[];Object.keys(qs).forEach(function(ge){var Ue=qs[ge];Es[Ue]=ge});var Ws=[];Object.keys(Ps).forEach(function(ge){var Ue=Ps[ge];Ws[Ue]=ge});var Qo=[];Object.keys(Hs).forEach(function(ge){var Ue=Hs[ge];Qo[Ue]=ge});var bl=[];Object.keys(is).forEach(function(ge){var Ue=is[ge];bl[Ue]=ge});var nl=[];Object.keys(Vs).forEach(function(ge){var Ue=Vs[ge];nl[Ue]=ge});var ru=La.reduce(function(ge,Ue){var dt=qs[Ue];return dt===Fn||dt===_a||dt===Fn||dt===ia||dt===Wo||dt===Ba||jr.ext_srgb&&(dt===Bo||dt===Ea)?ge[dt]=dt:dt===Hr||Ue.indexOf("rgba")>=0?ge[dt]=xn:ge[dt]=Wn,ge},{});function hs(){this.internalformat=xn,this.format=xn,this.type=va,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Ga,this.width=0,this.height=0,this.channels=0}function Ho(ge,Ue){ge.internalformat=Ue.internalformat,ge.format=Ue.format,ge.type=Ue.type,ge.compressed=Ue.compressed,ge.premultiplyAlpha=Ue.premultiplyAlpha,ge.flipY=Ue.flipY,ge.unpackAlignment=Ue.unpackAlignment,ge.colorSpace=Ue.colorSpace,ge.width=Ue.width,ge.height=Ue.height,ge.channels=Ue.channels}function ql(ge,Ue){if(!(typeof Ue!="object"||!Ue)){if("premultiplyAlpha"in Ue&&(ge.premultiplyAlpha=Ue.premultiplyAlpha),"flipY"in Ue&&(ge.flipY=Ue.flipY),"alignment"in Ue&&(ge.unpackAlignment=Ue.alignment),"colorSpace"in Ue&&(ge.colorSpace=su[Ue.colorSpace]),"type"in Ue){var dt=Ue.type;ge.type=Ps[dt]}var Rt=ge.width,ur=ge.height,gr=ge.channels,cr=!1;"shape"in Ue?(Rt=Ue.shape[0],ur=Ue.shape[1],Ue.shape.length===3&&(gr=Ue.shape[2],cr=!0)):("radius"in Ue&&(Rt=ur=Ue.radius),"width"in Ue&&(Rt=Ue.width),"height"in Ue&&(ur=Ue.height),"channels"in Ue&&(gr=Ue.channels,cr=!0)),ge.width=Rt|0,ge.height=ur|0,ge.channels=gr|0;var It=!1;if("format"in Ue){var Qt=Ue.format,ar=ge.internalformat=qs[Qt];ge.format=ru[ar],Qt in Ps&&("type"in Ue||(ge.type=Ps[Qt])),Qt in Do&&(ge.compressed=!0),It=!0}!cr&&It?ge.channels=qn[ge.format]:cr&&!It&&ge.channels!==Xi[ge.format]&&(ge.format=ge.internalformat=Xi[ge.channels])}}function yl(ge){Gt.pixelStorei(ya,ge.flipY),Gt.pixelStorei(on,ge.premultiplyAlpha),Gt.pixelStorei(mn,ge.colorSpace),Gt.pixelStorei(ms,ge.unpackAlignment)}function tl(){hs.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function js(ge,Ue){var dt=null;if(ns(Ue)?dt=Ue:Ue&&(ql(ge,Ue),"x"in Ue&&(ge.xOffset=Ue.x|0),"y"in Ue&&(ge.yOffset=Ue.y|0),ns(Ue.data)&&(dt=Ue.data)),Ue.copy){var Rt=Ta.viewportWidth,ur=Ta.viewportHeight;ge.width=ge.width||Rt-ge.xOffset,ge.height=ge.height||ur-ge.yOffset,ge.needsCopy=!0}else if(!dt)ge.width=ge.width||1,ge.height=ge.height||1,ge.channels=ge.channels||4;else if(fr(dt))ge.channels=ge.channels||4,ge.data=dt,!("type"in Ue)&&ge.type===va&&(ge.type=Jo(dt));else if(ea(dt))ge.channels=ge.channels||4,vo(ge,dt),ge.alignment=1,ge.needsFree=!0;else if(Ot(dt)){var gr=dt.data;!Array.isArray(gr)&&ge.type===va&&(ge.type=Jo(gr));var cr=dt.shape,It=dt.stride,Qt,ar,mr,Pr,Dr,Xr;cr.length===3?(mr=cr[2],Xr=It[2]):(mr=1,Xr=1),Qt=cr[0],ar=cr[1],Pr=It[0],Dr=It[1],ge.alignment=1,ge.width=Qt,ge.height=ar,ge.channels=mr,ge.format=ge.internalformat=Xi[mr],ge.needsFree=!0,To(ge,gr,Pr,Dr,Xr,dt.offset)}else if(xo(dt)||Wa(dt)||hn(dt))xo(dt)||Wa(dt)?ge.element=dt:ge.element=dt.canvas,ge.width=ge.element.width,ge.height=ge.element.height,ge.channels=4;else if(Un(dt))ge.element=dt,ge.width=dt.width,ge.height=dt.height,ge.channels=4;else if(Ss(dt))ge.element=dt,ge.width=dt.naturalWidth,ge.height=dt.naturalHeight,ge.channels=4;else if(Kn(dt))ge.element=dt,ge.width=dt.videoWidth,ge.height=dt.videoHeight,ge.channels=4;else if(Sa(dt)){var Gr=ge.width||dt[0].length,Fr=ge.height||dt.length,Kr=ge.channels;Gi(dt[0][0])?Kr=Kr||dt[0][0].length:Kr=Kr||1;for(var Cr=_e.shape(dt),yi=1,qi=0;qi>=ur,dt.height>>=ur,js(dt,Rt[ur]),ge.mipmask|=1<=0&&!("faces"in Ue)&&(ge.genMipmaps=!0)}if("mag"in Ue){var Rt=Ue.mag;ge.magFilter=Hs[Rt]}var ur=ge.wrapS,gr=ge.wrapT;if("wrap"in Ue){var cr=Ue.wrap;typeof cr=="string"?ur=gr=Vs[cr]:Array.isArray(cr)&&(ur=Vs[cr[0]],gr=Vs[cr[1]])}else{if("wrapS"in Ue){var It=Ue.wrapS;ur=Vs[It]}if("wrapT"in Ue){var Qt=Ue.wrapT;gr=Vs[Qt]}}if(ge.wrapS=ur,ge.wrapT=gr,"anisotropic"in Ue){var ar=Ue.anisotropic;ge.anisotropic=Ue.anisotropic}if("mipmap"in Ue){var mr=!1;switch(typeof Ue.mipmap){case"string":ge.mipmapHint=Io[Ue.mipmap],ge.genMipmaps=!0,mr=!0;break;case"boolean":mr=ge.genMipmaps=Ue.mipmap;break;case"object":ge.genMipmaps=!1,mr=!0;break;default:}mr&&!("min"in Ue)&&(ge.minFilter=Oa)}}function vc(ge,Ue){Gt.texParameteri(Ue,jo,ge.minFilter),Gt.texParameteri(Ue,qa,ge.magFilter),Gt.texParameteri(Ue,Yn,ge.wrapS),Gt.texParameteri(Ue,xa,ge.wrapT),jr.ext_texture_filter_anisotropic&&Gt.texParameteri(Ue,Bn,ge.anisotropic),ge.genMipmaps&&(Gt.hint(ks,ge.mipmapHint),Gt.generateMipmap(Ue))}var qc=0,If={},Ac=_i.maxTextureUnits,zc=Array(Ac).map(function(){return null});function Vu(ge){hs.call(this),this.mipmask=0,this.internalformat=xn,this.id=qc++,this.refCount=1,this.target=ge,this.texture=Gt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new wf,ha.profile&&(this.stats={size:0})}function Bc(ge){Gt.activeTexture(ca),Gt.bindTexture(ge.target,ge.texture)}function Ou(){var ge=zc[0];ge?Gt.bindTexture(ge.target,ge.texture):Gt.bindTexture(Ui,null)}function Y(ge){var Ue=ge.texture,dt=ge.unit,Rt=ge.target;dt>=0&&(Gt.activeTexture(ca+dt),Gt.bindTexture(Rt,null),zc[dt]=null),Gt.deleteTexture(Ue),ge.texture=null,ge.params=null,ge.pixels=null,ge.refCount=0,delete If[ge.id],fa.textureCount--}e(Vu.prototype,{bind:function(){var ge=this;ge.bindCount+=1;var Ue=ge.unit;if(Ue<0){for(var dt=0;dt0)continue;Rt.unit=-1}zc[dt]=ge,Ue=dt;break}Ue>=Ac,ha.profile&&fa.maxTextureUnits>Dr)-mr,Xr.height=Xr.height||(dt.height>>Dr)-Pr,Bc(dt),lu(Xr,Ui,mr,Pr,Dr),Ou(),jl(Xr),Rt}function gr(cr,It){var Qt=cr|0,ar=It|0||Qt;if(Qt===dt.width&&ar===dt.height)return Rt;Rt.width=dt.width=Qt,Rt.height=dt.height=ar,Bc(dt);for(var mr=0;dt.mipmask>>mr;++mr){var Pr=Qt>>mr,Dr=ar>>mr;if(!Pr||!Dr)break;Gt.texImage2D(Ui,mr,dt.format,Pr,Dr,0,dt.format,dt.type,null)}return Ou(),ha.profile&&(dt.stats.size=Ao(dt.internalformat,dt.type,Qt,ar,!1,!1)),Rt}return Rt(ge,Ue),Rt.subimage=ur,Rt.resize=gr,Rt._reglType="texture2d",Rt._texture=dt,ha.profile&&(Rt.stats=dt.stats),Rt.destroy=function(){dt.decRef()},Rt}function K(ge,Ue,dt,Rt,ur,gr){var cr=new Vu(zn);If[cr.id]=cr,fa.cubeCount++;var It=new Array(6);function Qt(Pr,Dr,Xr,Gr,Fr,Kr){var Cr,yi=cr.texInfo;for(wf.call(yi),Cr=0;Cr<6;++Cr)It[Cr]=rf();if(typeof Pr=="number"||!Pr){var qi=Pr|0||1;for(Cr=0;Cr<6;++Cr)Tu(It[Cr],qi,qi)}else if(typeof Pr=="object")if(Dr)Ru(It[0],Pr),Ru(It[1],Dr),Ru(It[2],Xr),Ru(It[3],Gr),Ru(It[4],Fr),Ru(It[5],Kr);else if(pc(yi,Pr),ql(cr,Pr),"faces"in Pr){var vn=Pr.faces;for(Cr=0;Cr<6;++Cr)Ho(It[Cr],cr),Ru(It[Cr],vn[Cr])}else for(Cr=0;Cr<6;++Cr)Ru(It[Cr],Pr);for(Ho(cr,It[0]),yi.genMipmaps?cr.mipmask=(It[0].width<<1)-1:cr.mipmask=It[0].mipmask,cr.internalformat=It[0].internalformat,Qt.width=It[0].width,Qt.height=It[0].height,Bc(cr),Cr=0;Cr<6;++Cr)Rf(It[Cr],fn+Cr);for(vc(yi,zn),Ou(),ha.profile&&(cr.stats.size=Ao(cr.internalformat,cr.type,Qt.width,Qt.height,yi.genMipmaps,!0)),Qt.format=Es[cr.internalformat],Qt.type=Ws[cr.type],Qt.mag=Qo[yi.magFilter],Qt.min=bl[yi.minFilter],Qt.wrapS=nl[yi.wrapS],Qt.wrapT=nl[yi.wrapT],Cr=0;Cr<6;++Cr)Lc(It[Cr]);return Qt}function ar(Pr,Dr,Xr,Gr,Fr){var Kr=Xr|0,Cr=Gr|0,yi=Fr|0,qi=al();return Ho(qi,cr),qi.width=0,qi.height=0,js(qi,Dr),qi.width=qi.width||(cr.width>>yi)-Kr,qi.height=qi.height||(cr.height>>yi)-Cr,Bc(cr),lu(qi,fn+Pr,Kr,Cr,yi),Ou(),jl(qi),Qt}function mr(Pr){var Dr=Pr|0;if(Dr!==cr.width){Qt.width=cr.width=Dr,Qt.height=cr.height=Dr,Bc(cr);for(var Xr=0;Xr<6;++Xr)for(var Gr=0;cr.mipmask>>Gr;++Gr)Gt.texImage2D(fn+Xr,Gr,cr.format,Dr>>Gr,Dr>>Gr,0,cr.format,cr.type,null);return Ou(),ha.profile&&(cr.stats.size=Ao(cr.internalformat,cr.type,Qt.width,Qt.height,!1,!0)),Qt}}return Qt(ge,Ue,dt,Rt,ur,gr),Qt.subimage=ar,Qt.resize=mr,Qt._reglType="textureCube",Qt._texture=cr,ha.profile&&(Qt.stats=cr.stats),Qt.destroy=function(){cr.decRef()},Qt}function N(){for(var ge=0;ge>Rt,dt.height>>Rt,0,dt.internalformat,dt.type,null);else for(var ur=0;ur<6;++ur)Gt.texImage2D(fn+ur,Rt,dt.internalformat,dt.width>>Rt,dt.height>>Rt,0,dt.internalformat,dt.type,null);vc(dt.texInfo,dt.target)})}function we(){for(var ge=0;ge=0?Lc=!0:Vs.indexOf(wf)>=0&&(Lc=!1))),("depthTexture"in Vu||"depthStencilTexture"in Vu)&&(zc=!!(Vu.depthTexture||Vu.depthStencilTexture)),"depth"in Vu&&(typeof Vu.depth=="boolean"?Rf=Vu.depth:(qc=Vu.depth,Cc=!1)),"stencil"in Vu&&(typeof Vu.stencil=="boolean"?Cc=Vu.stencil:(If=Vu.stencil,Rf=!1)),"depthStencil"in Vu&&(typeof Vu.depthStencil=="boolean"?Rf=Cc=Vu.depthStencil:(Ac=Vu.depthStencil,Rf=!1,Cc=!1))}var Ou=null,Y=null,R=null,K=null;if(Array.isArray(rf))Ou=rf.map(Do);else if(rf)Ou=[Do(rf)];else for(Ou=new Array(vc),mu=0;mu0&&(jl.depth=js[0].depth,jl.stencil=js[0].stencil,jl.depthStencil=js[0].depthStencil),js[al]?js[al](jl):js[al]=Ho(jl)}return e(zl,{width:mu,height:mu,color:wf})}function lu(bu){var al,jl=bu|0;if(jl===zl.width)return zl;var mu=zl.color;for(al=0;al=mu.byteLength?Tu.subdata(mu):(Tu.destroy(),Ho.buffers[bu]=null)),Ho.buffers[bu]||(Tu=Ho.buffers[bu]=Ta.create(al,$o,!1,!0)),jl.buffer=Ta.getBuffer(Tu),jl.size=jl.buffer.dimension|0,jl.normalized=!1,jl.type=jl.buffer.dtype,jl.offset=0,jl.stride=0,jl.divisor=0,jl.state=1,zl[bu]=1}else Ta.getBuffer(al)?(jl.buffer=Ta.getBuffer(al),jl.size=jl.buffer.dimension|0,jl.normalized=!1,jl.type=jl.buffer.dtype,jl.offset=0,jl.stride=0,jl.divisor=0,jl.state=1):Ta.getBuffer(al.buffer)?(jl.buffer=Ta.getBuffer(al.buffer),jl.size=(+al.size||jl.buffer.dimension)|0,jl.normalized=!!al.normalized||!1,"type"in al?jl.type=si[al.type]:jl.type=jl.buffer.dtype,jl.offset=(al.offset||0)|0,jl.stride=(al.stride||0)|0,jl.divisor=(al.divisor||0)|0,jl.state=1):"x"in al&&(jl.x=+al.x||0,jl.y=+al.y||0,jl.z=+al.z||0,jl.w=+al.w||0,jl.state=2)}for(var Ru=0;Ru1)for(var yl=0;ylkn&&(kn=La.stats.uniformsCount)}),kn},_i.getMaxAttributesCount=function(){var kn=0;return is.forEach(function(La){La.stats.attributesCount>kn&&(kn=La.stats.attributesCount)}),kn});function Do(){Ta={},fa={};for(var kn=0;kn16&&(_i=wi(_i,Gt.length*8));for(var Mn=Array(16),Ta=Array(16),fa=0;fa<16;fa++)Mn[fa]=_i[fa]^909522486,Ta[fa]=_i[fa]^1549556828;var ha=wi(Mn.concat(gs(jr)),512+jr.length*8);return bt(wi(Ta.concat(ha),768))}function Yo(Gt){for(var jr=no?"0123456789ABCDEF":"0123456789abcdef",_i="",Mn,Ta=0;Ta>>4&15)+jr.charAt(Mn&15);return _i}function po(Gt){for(var jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_i="",Mn=Gt.length,Ta=0;TaGt.length*8?_i+=Ls:_i+=jr.charAt(fa>>>6*(3-ha)&63);return _i}function ss(Gt,jr){var _i=jr.length,Mn=Array(),Ta,fa,ha,Io,Vs=Array(Math.ceil(Gt.length/2));for(Ta=0;Ta0;){for(Io=Array(),ha=0,Ta=0;Ta0||fa>0)&&(Io[Io.length]=fa);Mn[Mn.length]=ha,Vs=Io}var Hs="";for(Ta=Mn.length-1;Ta>=0;Ta--)Hs+=jr.charAt(Mn[Ta]);var is=Math.ceil(Gt.length*8/(Math.log(jr.length)/Math.log(2)));for(Ta=Hs.length;Ta>>6&31,128|Mn&63):Mn<=65535?jr+=String.fromCharCode(224|Mn>>>12&15,128|Mn>>>6&63,128|Mn&63):Mn<=2097151&&(jr+=String.fromCharCode(240|Mn>>>18&7,128|Mn>>>12&63,128|Mn>>>6&63,128|Mn&63));return jr}function gs(Gt){for(var jr=Array(Gt.length>>2),_i=0;_i>5]|=(Gt.charCodeAt(_i/8)&255)<<24-_i%32;return jr}function bt(Gt){for(var jr="",_i=0;_i>5]>>>24-_i%32&255);return jr}function Ft(Gt,jr){return Gt>>>jr|Gt<<32-jr}function hr(Gt,jr){return Gt>>>jr}function nr(Gt,jr,_i){return Gt&jr^~Gt&_i}function Sr(Gt,jr,_i){return Gt&jr^Gt&_i^jr&_i}function li(Gt){return Ft(Gt,2)^Ft(Gt,13)^Ft(Gt,22)}function di(Gt){return Ft(Gt,6)^Ft(Gt,11)^Ft(Gt,25)}function mi(Gt){return Ft(Gt,7)^Ft(Gt,18)^hr(Gt,3)}function Oi(Gt){return Ft(Gt,17)^Ft(Gt,19)^hr(Gt,10)}var dn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function wi(Gt,jr){var _i=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Mn=new Array(64),Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn;for(Gt[jr>>5]|=128<<24-jr%32,Gt[(jr+64>>9<<4)+15]=jr,Ps=0;Ps>16)+(jr>>16)+(_i>>16);return Mn<<16|_i&65535}function Ai(Gt){return Array.prototype.slice.call(Gt)}function gi(Gt){return Ai(Gt).join("")}function gn(Gt){var jr=Gt&&Gt.cache,_i=0,Mn=[],Ta=[],fa=[];function ha(Do,kn){var La=kn&&kn.stable;if(!La){for(var Es=0;Es0&&(Do.push(Ws,"="),Do.push.apply(Do,Ai(arguments)),Do.push(";")),Ws}return e(kn,{def:Es,toString:function(){return gi([La.length>0?"var "+La.join(",")+";":"",gi(Do)])}})}function Vs(){var Do=Io(),kn=Io(),La=Do.toString,Es=kn.toString;function Ws(Qo,bl){kn(Qo,bl,"=",Do.def(Qo,bl),";")}return e(function(){Do.apply(Do,Ai(arguments))},{def:Do.def,entry:Do,exit:kn,save:Ws,set:function(Qo,bl,nl){Ws(Qo,bl),Do(Qo,bl,"=",nl,";")},toString:function(){return La()+Es()}})}function Hs(){var Do=gi(arguments),kn=Vs(),La=Vs(),Es=kn.toString,Ws=La.toString;return e(kn,{then:function(){return kn.apply(kn,Ai(arguments)),this},else:function(){return La.apply(La,Ai(arguments)),this},toString:function(){var Qo=Ws();return Qo&&(Qo="else{"+Qo+"}"),gi(["if(",Do,"){",Es(),"}",Qo])}})}var is=Io(),su={};function Ps(Do,kn){var La=[];function Es(){var ru="a"+La.length;return La.push(ru),ru}kn=kn||0;for(var Ws=0;Ws[y.viewport.x,y.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,y)=>y.offset*4,divisor:1},position:{buffer:i,offset:(b,y)=>y.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(b,y)=>y.offset*16,divisor:1},direction:{buffer:u,stride:24,offset:0},lineOffset:{buffer:u,stride:24,offset:8},capOffset:{buffer:u,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:gBe.length}),yBe(c,{update:p,draw:h,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:f}),c;function c(b){b?p(b):b===null&&x(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),f.forEach((y,k)=>{if(y){if(b&&(b[k]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=f[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 p(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let y=0,k=0;if(c.groups=f=b.map((L,_)=>{let C=f[_];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=cNt(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||(f[_]=C={id:_,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=yBe({},l,L)),fNt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=mBe(M),k+=M.length,M),positions:(M,v)=>(M=mBe(M,"float64"),v.count=Math.floor(M.length/2),v.bounds=lNt(M,2),v.offset=y,y+=v.count,M)},{color:(M,v)=>{let z=v.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let F=M;M=Array(z);for(let q=0;q{let T=v.bounds;return M||(M=T),v.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],v.translate=[-M[0],-M[1]],v.scaleFract=UY(v.scale),v.translateFract=UY(v.translate),M},viewport:M=>{let v;return Array.isArray(M)?v={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(v={x:M.x||M.left||0,y:M.y||M.top||0},M.right?v.width=M.right-v.x:v.width=M.w||M.width||0,M.bottom?v.height=M.bottom-v.y:v.height=M.h||M.height||0):v={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},v}}]),C}),y||k){let L=f.reduce((v,z,T)=>v+(z?z.count:0),0),_=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);f.forEach((v,z)=>{if(!v)return;let{positions:T,count:F,offset:q,color:U,errors:H}=v;F&&(C.set(U,q*4),M.set(H,q*4),_.set(T,q*2))});var E=hNt(_);i(E);var A=UY(_,E);a(A),o(C),s(M)}}function x(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),u.destroy()}}});var TBe=Se((bgr,wBe)=>{var bBe=/[\'\"]/;wBe.exports=function(t){return t?(bBe.test(t.charAt(0))&&(t=t.substr(1)),bBe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var VY=Se(()=>{});var HY=Se(()=>{});var GY=Se(()=>{});var WY=Se(()=>{});var jY=Se(()=>{});var EBe=Se((Pgr,MBe)=>{"use strict";function ABe(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(u){var l=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),f=[];function c(h,d,p){var x=r.push(h.slice(u[0].length,-u[1].length))-1;return f.push(x),i+x+i}r.forEach(function(h,d){for(var p,x=0;h!=p;)if(p=h,h=h.replace(l,c),x++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),f=f.reverse(),r=r.map(function(h){return f.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),u[0]+"$1"+u[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(u,l,f){for(var c=[],h,d=0;h=o.exec(u);){if(d++>1e4)throw Error("Circular references in parenthesis");c.push(u.slice(0,h.index)),c.push(s(l[h[1]],l)),u=u.slice(h.index+h[0].length)}return c.push(u),c}return a?r:s(r[0],r)}function SBe(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 u(l,f){return Array.isArray(f)&&(f=f.reduce(u,"")),l+f},"");function s(u,l){if(e[l]==null)throw Error("Reference "+l+"is undefined");return e[l]}}function ZY(e,t){return Array.isArray(e)?SBe(e,t):ABe(e,t)}ZY.parse=ABe;ZY.stringify=SBe;MBe.exports=ZY});var LBe=Se((Igr,CBe)=>{"use strict";var kBe=EBe();CBe.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(c){return c.length===1&&(c=c+c),c}));var i=kBe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],u=0;u{});var XY=Se((Fgr,PBe)=>{"use strict";var pNt=zBe();PBe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||pNt.indexOf(t)!==-1}}});var FBe=Se((qgr,RBe)=>{"use strict";var vNt=TBe(),yNt=VY(),mNt=HY(),gNt=GY(),_Nt=WY(),xNt=jY(),YY=LBe(),bNt=XY().isSize;RBe.exports=DBe;var vk=DBe.cache={};function DBe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(vk[e])return vk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(mNt.indexOf(e)!==-1)return vk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=YY(e,/\s+/),n;n=r.shift();){if(yNt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),vk[e]=t;if(_Nt.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(gNt.indexOf(n)!==-1){t.weight=n;continue}if(bNt(n)){var i=YY(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=IBe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=IBe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=YY(r.join(" "),/\s*,\s*/).map(vNt),vk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function IBe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var JY=Se((Bgr,qBe)=>{"use strict";var wNt=Zm(),TNt=XY().isSize,ANt=mk(VY()),SNt=mk(HY()),MNt=mk(GY()),ENt=mk(WY()),kNt=mk(jY()),CNt={normal:1,"small-caps":1},LNt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},KY={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};qBe.exports=function(t){if(t=wNt(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&&yk(t.system,SNt),t.system;if(yk(t.style,ENt),yk(t.variant,CNt),yk(t.weight,MNt),yk(t.stretch,kNt),t.size==null&&(t.size=KY.size),typeof t.size=="number"&&(t.size+="px"),!TNt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=KY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[KY.family]),t.family=t.family.map(function(n){return LNt[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 yk(e,t){if(e&&!t[e]&&!ANt[e])throw Error("Unknown keyword `"+e+"`");return e}function mk(e){for(var t={},r=0;r{"use strict";BBe.exports={parse:FBe(),stringify:JY()}});var eK=Se(($Y,QY)=>{(function(e,t){typeof $Y=="object"&&typeof QY!="undefined"?QY.exports=t():typeof define=="function"&&define.amd?define(t):e.createREGL=t()})($Y,function(){"use strict";var e=function(Gt,jr){for(var _i=Object.keys(jr),Mn=0;Mn<_i.length;++Mn)Gt[_i[Mn]]=jr[_i[Mn]];return Gt},t=0,r=0,n=5,i=6;function a(Gt,jr){this.id=t++,this.type=Gt,this.data=jr}function o(Gt){return Gt.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function s(Gt){if(Gt.length===0)return[];var jr=Gt.charAt(0),_i=Gt.charAt(Gt.length-1);if(Gt.length>1&&jr===_i&&(jr==='"'||jr==="'"))return['"'+o(Gt.substr(1,Gt.length-2))+'"'];var Mn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Gt);if(Mn)return s(Gt.substr(0,Mn.index)).concat(s(Mn[1])).concat(s(Gt.substr(Mn.index+Mn[0].length)));var Ta=Gt.split(".");if(Ta.length===1)return['"'+o(Gt)+'"'];for(var fa=[],ha=0;ha65535)<<4,Gt>>>=jr,_i=(Gt>255)<<3,Gt>>>=_i,jr|=_i,_i=(Gt>15)<<2,Gt>>>=_i,jr|=_i,_i=(Gt>3)<<1,Gt>>>=_i,jr|=_i,jr|Gt>>1}function O(){var Gt=M(8,function(){return[]});function jr(fa){var ha=j(fa),Io=Gt[G(ha)>>2];return Io.length>0?Io.pop():new ArrayBuffer(ha)}function _i(fa){Gt[G(fa.byteLength)>>2].push(fa)}function Mn(fa,ha){var Io=null;switch(fa){case v:Io=new Int8Array(jr(ha),0,ha);break;case z:Io=new Uint8Array(jr(ha),0,ha);break;case T:Io=new Int16Array(jr(2*ha),0,ha);break;case F:Io=new Uint16Array(jr(2*ha),0,ha);break;case q:Io=new Int32Array(jr(4*ha),0,ha);break;case U:Io=new Uint32Array(jr(4*ha),0,ha);break;case H:Io=new Float32Array(jr(4*ha),0,ha);break;default:return null}return Io.length!==ha?Io.subarray(0,ha):Io}function Ta(fa){_i(fa.buffer)}return{alloc:jr,free:_i,allocType:Mn,freeType:Ta}}var W=O();W.zero=O();var re=3408,ne=3410,be=3411,ze=3412,Ce=3413,he=3414,te=3415,ke=33901,Ee=33902,Me=3379,Oe=3386,Re=34921,me=36347,Be=36348,fe=35661,Ze=35660,et=34930,gt=36349,Pt=34076,Qe=34024,Xe=7936,Tt=7937,xt=7938,_t=35724,Ct=34047,jt=36063,At=34852,Te=3553,nt=34067,ut=34069,ct=33984,rt=6408,je=5126,tt=5121,Je=36160,Mt=36053,Vt=36064,Kt=16384,ir=function(Gt,jr){var _i=1;jr.ext_texture_filter_anisotropic&&(_i=Gt.getParameter(Ct));var Mn=1,Ta=1;jr.webgl_draw_buffers&&(Mn=Gt.getParameter(At),Ta=Gt.getParameter(jt));var fa=!!jr.oes_texture_float;if(fa){var ha=Gt.createTexture();Gt.bindTexture(Te,ha),Gt.texImage2D(Te,0,rt,1,1,0,rt,je,null);var Io=Gt.createFramebuffer();if(Gt.bindFramebuffer(Je,Io),Gt.framebufferTexture2D(Je,Vt,Te,ha,0),Gt.bindTexture(Te,null),Gt.checkFramebufferStatus(Je)!==Mt)fa=!1;else{Gt.viewport(0,0,1,1),Gt.clearColor(1,0,0,1),Gt.clear(Kt);var Vs=W.allocType(je,4);Gt.readPixels(0,0,1,1,rt,je,Vs),Gt.getError()?fa=!1:(Gt.deleteFramebuffer(Io),Gt.deleteTexture(ha),fa=Vs[0]===1),W.freeType(Vs)}}var Hs=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),is=!0;if(!Hs){var su=Gt.createTexture(),Ps=W.allocType(tt,36);Gt.activeTexture(ct),Gt.bindTexture(nt,su),Gt.texImage2D(ut,0,rt,3,3,0,rt,tt,Ps),W.freeType(Ps),Gt.bindTexture(nt,null),Gt.deleteTexture(su),is=!Gt.getError()}return{colorBits:[Gt.getParameter(ne),Gt.getParameter(be),Gt.getParameter(ze),Gt.getParameter(Ce)],depthBits:Gt.getParameter(he),stencilBits:Gt.getParameter(te),subpixelBits:Gt.getParameter(re),extensions:Object.keys(jr).filter(function(qs){return!!jr[qs]}),maxAnisotropic:_i,maxDrawbuffers:Mn,maxColorAttachments:Ta,pointSizeDims:Gt.getParameter(ke),lineWidthDims:Gt.getParameter(Ee),maxViewportDims:Gt.getParameter(Oe),maxCombinedTextureUnits:Gt.getParameter(fe),maxCubeMapSize:Gt.getParameter(Pt),maxRenderbufferSize:Gt.getParameter(Qe),maxTextureUnits:Gt.getParameter(et),maxTextureSize:Gt.getParameter(Me),maxAttributes:Gt.getParameter(Re),maxVertexUniforms:Gt.getParameter(me),maxVertexTextureUnits:Gt.getParameter(Ze),maxVaryingVectors:Gt.getParameter(Be),maxFragmentUniforms:Gt.getParameter(gt),glsl:Gt.getParameter(_t),renderer:Gt.getParameter(Tt),vendor:Gt.getParameter(Xe),version:Gt.getParameter(xt),readFloat:fa,npotTextureCube:is}},fr=function(Gt){return Gt instanceof Uint8Array||Gt instanceof Uint16Array||Gt instanceof Uint32Array||Gt instanceof Int8Array||Gt instanceof Int16Array||Gt instanceof Int32Array||Gt instanceof Float32Array||Gt instanceof Float64Array||Gt instanceof Uint8ClampedArray};function Ot(Gt){return!!Gt&&typeof Gt=="object"&&Array.isArray(Gt.shape)&&Array.isArray(Gt.stride)&&typeof Gt.offset=="number"&&Gt.shape.length===Gt.stride.length&&(Array.isArray(Gt.data)||fr(Gt.data))}var De=function(Gt){return Object.keys(Gt).map(function(jr){return Gt[jr]})},_e={shape:ue,flatten:ye};function Fe(Gt,jr,_i){for(var Mn=0;Mn0){var ru;if(Array.isArray(La[0])){nl=Jr(La);for(var hs=1,Ho=1;Ho0){if(typeof hs[0]=="number"){var tl=W.allocType(Qo.dtype,hs.length);sr(tl,hs),nl(tl,ql),W.freeType(tl)}else if(Array.isArray(hs[0])||fr(hs[0])){yl=Jr(hs);var js=Hi(hs,yl,Qo.dtype);nl(js,ql),W.freeType(js)}}}else if(Ot(hs)){yl=hs.shape;var zl=hs.stride,lu=0,bu=0,al=0,jl=0;yl.length===1?(lu=yl[0],bu=1,al=zl[0],jl=0):yl.length===2&&(lu=yl[0],bu=yl[1],al=zl[0],jl=zl[1]);var mu=Array.isArray(hs.data)?Qo.dtype:Bt(hs.data),Tu=W.allocType(mu,lu*bu);br(Tu,hs.data,lu,bu,al,jl,hs.offset),nl(Tu,ql),W.freeType(Tu)}return bl}return Es||bl(kn),bl._reglType="buffer",bl._buffer=Qo,bl.subdata=ru,_i.profile&&(bl.stats=Qo.stats),bl.destroy=function(){Ps(Qo)},bl}function Do(){De(fa).forEach(function(kn){kn.buffer=Gt.createBuffer(),Gt.bindBuffer(kn.type,kn.buffer),Gt.bufferData(kn.type,kn.persistentData||kn.byteLength,kn.usage)})}return _i.profile&&(jr.getTotalBufferSize=function(){var kn=0;return Object.keys(fa).forEach(function(La){kn+=fa[La].stats.size}),kn}),{create:qs,createStream:Vs,destroyStream:Hs,clear:function(){De(fa).forEach(Ps),Io.forEach(Ps)},getBuffer:function(kn){return kn&&kn._buffer instanceof ha?kn._buffer:null},restore:Do,_initBuffer:su}}var Tr=0,Rr=0,Br=1,oi=1,vi=4,Pi=4,Yr={points:Tr,point:Rr,lines:Br,line:oi,triangles:vi,triangle:Pi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ni=0,Ur=1,ti=4,ki=5120,ji=5121,Vi=5122,zi=5123,Mi=5124,sn=5125,fi=34963,Or=35040,st=35044;function Wt(Gt,jr,_i,Mn){var Ta={},fa=0,ha={uint8:ji,uint16:zi};jr.oes_element_index_uint&&(ha.uint32=sn);function Io(Do){this.id=fa++,Ta[this.id]=this,this.buffer=Do,this.primType=ti,this.vertCount=0,this.type=0}Io.prototype.bind=function(){this.buffer.bind()};var Vs=[];function Hs(Do){var kn=Vs.pop();return kn||(kn=new Io(_i.create(null,fi,!0,!1)._buffer)),su(kn,Do,Or,-1,-1,0,0),kn}function is(Do){Vs.push(Do)}function su(Do,kn,La,Es,Ws,Qo,bl){Do.buffer.bind();var nl;if(kn){var ru=bl;!bl&&(!fr(kn)||Ot(kn)&&!fr(kn.data))&&(ru=jr.oes_element_index_uint?sn:zi),_i._initBuffer(Do.buffer,kn,La,ru,3)}else Gt.bufferData(fi,Qo,La),Do.buffer.dtype=nl||ji,Do.buffer.usage=La,Do.buffer.dimension=3,Do.buffer.byteLength=Qo;if(nl=bl,!bl){switch(Do.buffer.dtype){case ji:case ki:nl=ji;break;case zi:case Vi:nl=zi;break;case sn:case Mi:nl=sn;break;default:}Do.buffer.dtype=nl}Do.type=nl;var hs=Ws;hs<0&&(hs=Do.buffer.byteLength,nl===zi?hs>>=1:nl===sn&&(hs>>=2)),Do.vertCount=hs;var Ho=Es;if(Es<0){Ho=ti;var ql=Do.buffer.dimension;ql===1&&(Ho=Ni),ql===2&&(Ho=Ur),ql===3&&(Ho=ti)}Do.primType=Ho}function Ps(Do){Mn.elementsCount--,delete Ta[Do.id],Do.buffer.destroy(),Do.buffer=null}function qs(Do,kn){var La=_i.create(null,fi,!0),Es=new Io(La._buffer);Mn.elementsCount++;function Ws(Qo){if(!Qo)La(),Es.primType=ti,Es.vertCount=0,Es.type=ji;else if(typeof Qo=="number")La(Qo),Es.primType=ti,Es.vertCount=Qo|0,Es.type=ji;else{var bl=null,nl=st,ru=-1,hs=-1,Ho=0,ql=0;Array.isArray(Qo)||fr(Qo)||Ot(Qo)?bl=Qo:("data"in Qo&&(bl=Qo.data),"usage"in Qo&&(nl=xi[Qo.usage]),"primitive"in Qo&&(ru=Yr[Qo.primitive]),"count"in Qo&&(hs=Qo.count|0),"type"in Qo&&(ql=ha[Qo.type]),"length"in Qo?Ho=Qo.length|0:(Ho=hs,ql===zi||ql===Vi?Ho*=2:(ql===sn||ql===Mi)&&(Ho*=4))),su(Es,bl,nl,ru,hs,Ho,ql)}return Ws}return Ws(Do),Ws._reglType="elements",Ws._elements=Es,Ws.subdata=function(Qo,bl){return La.subdata(Qo,bl),Ws},Ws.destroy=function(){Ps(Es)},Ws}return{create:qs,createStream:Hs,destroyStream:is,getElements:function(Do){return typeof Do=="function"&&Do._elements instanceof Io?Do._elements:null},clear:function(){De(Ta).forEach(Ps)}}}var tr=new Float32Array(1),or=new Uint32Array(tr.buffer),Nr=5123;function hi(Gt){for(var jr=W.allocType(Nr,Gt.length),_i=0;_i>>31<<15,fa=(Mn<<1>>>24)-127,ha=Mn>>13&1023;if(fa<-24)jr[_i]=Ta;else if(fa<-14){var Io=-14-fa;jr[_i]=Ta+(ha+1024>>Io)}else fa>15?jr[_i]=Ta+31744:jr[_i]=Ta+(fa+15<<10)+ha}return jr}function Gi(Gt){return Array.isArray(Gt)||fr(Gt)}var Qr=34467,Ui=3553,zn=34067,fn=34069,xn=6408,_a=6406,Wn=6407,Fn=6409,ia=6410,za=32854,Hr=32855,na=36194,go=32819,Dn=32820,un=33635,Zn=34042,Wo=6402,Ba=34041,Bo=35904,Ea=35906,Ha=36193,tn=33776,Cn=33777,Xn=33778,ts=33779,Ja=35986,to=35987,Ri=34798,an=35840,cs=35841,pa=35842,ln=35843,ka=36196,va=5121,bo=5123,Co=5125,Fi=5126,Yn=10242,xa=10243,Qi=10497,Nn=33071,Pn=33648,qa=10240,jo=10241,Vo=9728,Pa=9729,Oa=9984,co=9985,An=9986,_o=9987,ks=33170,bs=4352,ps=4353,sa=4354,Bn=34046,ms=3317,ya=37440,on=37441,mn=37443,Ga=37444,ca=33984,bn=[Oa,An,co,_o],Xi=[0,Fn,ia,Wn,xn],qn={};qn[Fn]=qn[_a]=qn[Wo]=1,qn[Ba]=qn[ia]=2,qn[Wn]=qn[Bo]=3,qn[xn]=qn[Ea]=4;function Ia(Gt){return"[object "+Gt+"]"}var yn=Ia("HTMLCanvasElement"),Ya=Ia("OffscreenCanvas"),ba=Ia("CanvasRenderingContext2D"),Da=Ia("ImageBitmap"),Aa=Ia("HTMLImageElement"),Ln=Ia("HTMLVideoElement"),wo=Object.keys(de).concat([yn,Ya,ba,Da,Aa,Ln]),wa=[];wa[va]=1,wa[Fi]=4,wa[Ha]=2,wa[bo]=2,wa[Co]=4;var $i=[];$i[za]=2,$i[Hr]=2,$i[na]=2,$i[Ba]=4,$i[tn]=.5,$i[Cn]=.5,$i[Xn]=1,$i[ts]=1,$i[Ja]=.5,$i[to]=1,$i[Ri]=1,$i[an]=.5,$i[cs]=.25,$i[pa]=.5,$i[ln]=.25,$i[ka]=.5;function ea(Gt){return Array.isArray(Gt)&&(Gt.length===0||typeof Gt[0]=="number")}function Sa(Gt){if(!Array.isArray(Gt))return!1;var jr=Gt.length;return!(jr===0||!Gi(Gt[0]))}function Za(Gt){return Object.prototype.toString.call(Gt)}function xo(Gt){return Za(Gt)===yn}function Wa(Gt){return Za(Gt)===Ya}function hn(Gt){return Za(Gt)===ba}function Un(Gt){return Za(Gt)===Da}function Ss(Gt){return Za(Gt)===Aa}function Kn(Gt){return Za(Gt)===Ln}function ns(Gt){if(!Gt)return!1;var jr=Za(Gt);return wo.indexOf(jr)>=0?!0:ea(Gt)||Sa(Gt)||Ot(Gt)}function Jo(Gt){return de[Object.prototype.toString.call(Gt)]|0}function vo(Gt,jr){var _i=jr.length;switch(Gt.type){case va:case bo:case Co:case Fi:var Mn=W.allocType(Gt.type,_i);Mn.set(jr),Gt.data=Mn;break;case Ha:Gt.data=hi(jr);break;default:}}function ma(Gt,jr){return W.allocType(Gt.type===Ha?Fi:Gt.type,jr)}function ja(Gt,jr){Gt.type===Ha?(Gt.data=hi(jr),W.freeType(jr)):Gt.data=jr}function To(Gt,jr,_i,Mn,Ta,fa){for(var ha=Gt.width,Io=Gt.height,Vs=Gt.channels,Hs=ha*Io*Vs,is=ma(Gt,Hs),su=0,Ps=0;Ps=1;)Io+=ha*Vs*Vs,Vs/=2;return Io}else return ha*_i*Mn}function la(Gt,jr,_i,Mn,Ta,fa,ha){var Io={"don't care":bs,"dont care":bs,nice:sa,fast:ps},Vs={repeat:Qi,clamp:Nn,mirror:Pn},Hs={nearest:Vo,linear:Pa},is=e({mipmap:_o,"nearest mipmap nearest":Oa,"linear mipmap nearest":co,"nearest mipmap linear":An,"linear mipmap linear":_o},Hs),su={none:0,browser:Ga},Ps={uint8:va,rgba4:go,rgb565:un,"rgb5 a1":Dn},qs={alpha:_a,luminance:Fn,"luminance alpha":ia,rgb:Wn,rgba:xn,rgba4:za,"rgb5 a1":Hr,rgb565:na},Do={};jr.ext_srgb&&(qs.srgb=Bo,qs.srgba=Ea),jr.oes_texture_float&&(Ps.float32=Ps.float=Fi),jr.oes_texture_half_float&&(Ps.float16=Ps["half float"]=Ha),jr.webgl_depth_texture&&(e(qs,{depth:Wo,"depth stencil":Ba}),e(Ps,{uint16:bo,uint32:Co,"depth stencil":Zn})),jr.webgl_compressed_texture_s3tc&&e(Do,{"rgb s3tc dxt1":tn,"rgba s3tc dxt1":Cn,"rgba s3tc dxt3":Xn,"rgba s3tc dxt5":ts}),jr.webgl_compressed_texture_atc&&e(Do,{"rgb atc":Ja,"rgba atc explicit alpha":to,"rgba atc interpolated alpha":Ri}),jr.webgl_compressed_texture_pvrtc&&e(Do,{"rgb pvrtc 4bppv1":an,"rgb pvrtc 2bppv1":cs,"rgba pvrtc 4bppv1":pa,"rgba pvrtc 2bppv1":ln}),jr.webgl_compressed_texture_etc1&&(Do["rgb etc1"]=ka);var kn=Array.prototype.slice.call(Gt.getParameter(Qr));Object.keys(Do).forEach(function(ge){var Ue=Do[ge];kn.indexOf(Ue)>=0&&(qs[ge]=Ue)});var La=Object.keys(qs);_i.textureFormats=La;var Es=[];Object.keys(qs).forEach(function(ge){var Ue=qs[ge];Es[Ue]=ge});var Ws=[];Object.keys(Ps).forEach(function(ge){var Ue=Ps[ge];Ws[Ue]=ge});var Qo=[];Object.keys(Hs).forEach(function(ge){var Ue=Hs[ge];Qo[Ue]=ge});var bl=[];Object.keys(is).forEach(function(ge){var Ue=is[ge];bl[Ue]=ge});var nl=[];Object.keys(Vs).forEach(function(ge){var Ue=Vs[ge];nl[Ue]=ge});var ru=La.reduce(function(ge,Ue){var dt=qs[Ue];return dt===Fn||dt===_a||dt===Fn||dt===ia||dt===Wo||dt===Ba||jr.ext_srgb&&(dt===Bo||dt===Ea)?ge[dt]=dt:dt===Hr||Ue.indexOf("rgba")>=0?ge[dt]=xn:ge[dt]=Wn,ge},{});function hs(){this.internalformat=xn,this.format=xn,this.type=va,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Ga,this.width=0,this.height=0,this.channels=0}function Ho(ge,Ue){ge.internalformat=Ue.internalformat,ge.format=Ue.format,ge.type=Ue.type,ge.compressed=Ue.compressed,ge.premultiplyAlpha=Ue.premultiplyAlpha,ge.flipY=Ue.flipY,ge.unpackAlignment=Ue.unpackAlignment,ge.colorSpace=Ue.colorSpace,ge.width=Ue.width,ge.height=Ue.height,ge.channels=Ue.channels}function ql(ge,Ue){if(!(typeof Ue!="object"||!Ue)){if("premultiplyAlpha"in Ue&&(ge.premultiplyAlpha=Ue.premultiplyAlpha),"flipY"in Ue&&(ge.flipY=Ue.flipY),"alignment"in Ue&&(ge.unpackAlignment=Ue.alignment),"colorSpace"in Ue&&(ge.colorSpace=su[Ue.colorSpace]),"type"in Ue){var dt=Ue.type;ge.type=Ps[dt]}var Rt=ge.width,ur=ge.height,gr=ge.channels,cr=!1;"shape"in Ue?(Rt=Ue.shape[0],ur=Ue.shape[1],Ue.shape.length===3&&(gr=Ue.shape[2],cr=!0)):("radius"in Ue&&(Rt=ur=Ue.radius),"width"in Ue&&(Rt=Ue.width),"height"in Ue&&(ur=Ue.height),"channels"in Ue&&(gr=Ue.channels,cr=!0)),ge.width=Rt|0,ge.height=ur|0,ge.channels=gr|0;var It=!1;if("format"in Ue){var Qt=Ue.format,ar=ge.internalformat=qs[Qt];ge.format=ru[ar],Qt in Ps&&("type"in Ue||(ge.type=Ps[Qt])),Qt in Do&&(ge.compressed=!0),It=!0}!cr&&It?ge.channels=qn[ge.format]:cr&&!It&&ge.channels!==Xi[ge.format]&&(ge.format=ge.internalformat=Xi[ge.channels])}}function yl(ge){Gt.pixelStorei(ya,ge.flipY),Gt.pixelStorei(on,ge.premultiplyAlpha),Gt.pixelStorei(mn,ge.colorSpace),Gt.pixelStorei(ms,ge.unpackAlignment)}function tl(){hs.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function js(ge,Ue){var dt=null;if(ns(Ue)?dt=Ue:Ue&&(ql(ge,Ue),"x"in Ue&&(ge.xOffset=Ue.x|0),"y"in Ue&&(ge.yOffset=Ue.y|0),ns(Ue.data)&&(dt=Ue.data)),Ue.copy){var Rt=Ta.viewportWidth,ur=Ta.viewportHeight;ge.width=ge.width||Rt-ge.xOffset,ge.height=ge.height||ur-ge.yOffset,ge.needsCopy=!0}else if(!dt)ge.width=ge.width||1,ge.height=ge.height||1,ge.channels=ge.channels||4;else if(fr(dt))ge.channels=ge.channels||4,ge.data=dt,!("type"in Ue)&&ge.type===va&&(ge.type=Jo(dt));else if(ea(dt))ge.channels=ge.channels||4,vo(ge,dt),ge.alignment=1,ge.needsFree=!0;else if(Ot(dt)){var gr=dt.data;!Array.isArray(gr)&&ge.type===va&&(ge.type=Jo(gr));var cr=dt.shape,It=dt.stride,Qt,ar,mr,Pr,Dr,Xr;cr.length===3?(mr=cr[2],Xr=It[2]):(mr=1,Xr=1),Qt=cr[0],ar=cr[1],Pr=It[0],Dr=It[1],ge.alignment=1,ge.width=Qt,ge.height=ar,ge.channels=mr,ge.format=ge.internalformat=Xi[mr],ge.needsFree=!0,To(ge,gr,Pr,Dr,Xr,dt.offset)}else if(xo(dt)||Wa(dt)||hn(dt))xo(dt)||Wa(dt)?ge.element=dt:ge.element=dt.canvas,ge.width=ge.element.width,ge.height=ge.element.height,ge.channels=4;else if(Un(dt))ge.element=dt,ge.width=dt.width,ge.height=dt.height,ge.channels=4;else if(Ss(dt))ge.element=dt,ge.width=dt.naturalWidth,ge.height=dt.naturalHeight,ge.channels=4;else if(Kn(dt))ge.element=dt,ge.width=dt.videoWidth,ge.height=dt.videoHeight,ge.channels=4;else if(Sa(dt)){var Gr=ge.width||dt[0].length,Fr=ge.height||dt.length,Kr=ge.channels;Gi(dt[0][0])?Kr=Kr||dt[0][0].length:Kr=Kr||1;for(var Cr=_e.shape(dt),yi=1,qi=0;qi>=ur,dt.height>>=ur,js(dt,Rt[ur]),ge.mipmask|=1<=0&&!("faces"in Ue)&&(ge.genMipmaps=!0)}if("mag"in Ue){var Rt=Ue.mag;ge.magFilter=Hs[Rt]}var ur=ge.wrapS,gr=ge.wrapT;if("wrap"in Ue){var cr=Ue.wrap;typeof cr=="string"?ur=gr=Vs[cr]:Array.isArray(cr)&&(ur=Vs[cr[0]],gr=Vs[cr[1]])}else{if("wrapS"in Ue){var It=Ue.wrapS;ur=Vs[It]}if("wrapT"in Ue){var Qt=Ue.wrapT;gr=Vs[Qt]}}if(ge.wrapS=ur,ge.wrapT=gr,"anisotropic"in Ue){var ar=Ue.anisotropic;ge.anisotropic=Ue.anisotropic}if("mipmap"in Ue){var mr=!1;switch(typeof Ue.mipmap){case"string":ge.mipmapHint=Io[Ue.mipmap],ge.genMipmaps=!0,mr=!0;break;case"boolean":mr=ge.genMipmaps=Ue.mipmap;break;case"object":ge.genMipmaps=!1,mr=!0;break;default:}mr&&!("min"in Ue)&&(ge.minFilter=Oa)}}function vc(ge,Ue){Gt.texParameteri(Ue,jo,ge.minFilter),Gt.texParameteri(Ue,qa,ge.magFilter),Gt.texParameteri(Ue,Yn,ge.wrapS),Gt.texParameteri(Ue,xa,ge.wrapT),jr.ext_texture_filter_anisotropic&&Gt.texParameteri(Ue,Bn,ge.anisotropic),ge.genMipmaps&&(Gt.hint(ks,ge.mipmapHint),Gt.generateMipmap(Ue))}var qc=0,If={},Ac=_i.maxTextureUnits,zc=Array(Ac).map(function(){return null});function Vu(ge){hs.call(this),this.mipmask=0,this.internalformat=xn,this.id=qc++,this.refCount=1,this.target=ge,this.texture=Gt.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new wf,ha.profile&&(this.stats={size:0})}function Bc(ge){Gt.activeTexture(ca),Gt.bindTexture(ge.target,ge.texture)}function Ou(){var ge=zc[0];ge?Gt.bindTexture(ge.target,ge.texture):Gt.bindTexture(Ui,null)}function Y(ge){var Ue=ge.texture,dt=ge.unit,Rt=ge.target;dt>=0&&(Gt.activeTexture(ca+dt),Gt.bindTexture(Rt,null),zc[dt]=null),Gt.deleteTexture(Ue),ge.texture=null,ge.params=null,ge.pixels=null,ge.refCount=0,delete If[ge.id],fa.textureCount--}e(Vu.prototype,{bind:function(){var ge=this;ge.bindCount+=1;var Ue=ge.unit;if(Ue<0){for(var dt=0;dt0)continue;Rt.unit=-1}zc[dt]=ge,Ue=dt;break}Ue>=Ac,ha.profile&&fa.maxTextureUnits>Dr)-mr,Xr.height=Xr.height||(dt.height>>Dr)-Pr,Bc(dt),lu(Xr,Ui,mr,Pr,Dr),Ou(),jl(Xr),Rt}function gr(cr,It){var Qt=cr|0,ar=It|0||Qt;if(Qt===dt.width&&ar===dt.height)return Rt;Rt.width=dt.width=Qt,Rt.height=dt.height=ar,Bc(dt);for(var mr=0;dt.mipmask>>mr;++mr){var Pr=Qt>>mr,Dr=ar>>mr;if(!Pr||!Dr)break;Gt.texImage2D(Ui,mr,dt.format,Pr,Dr,0,dt.format,dt.type,null)}return Ou(),ha.profile&&(dt.stats.size=Ao(dt.internalformat,dt.type,Qt,ar,!1,!1)),Rt}return Rt(ge,Ue),Rt.subimage=ur,Rt.resize=gr,Rt._reglType="texture2d",Rt._texture=dt,ha.profile&&(Rt.stats=dt.stats),Rt.destroy=function(){dt.decRef()},Rt}function K(ge,Ue,dt,Rt,ur,gr){var cr=new Vu(zn);If[cr.id]=cr,fa.cubeCount++;var It=new Array(6);function Qt(Pr,Dr,Xr,Gr,Fr,Kr){var Cr,yi=cr.texInfo;for(wf.call(yi),Cr=0;Cr<6;++Cr)It[Cr]=rf();if(typeof Pr=="number"||!Pr){var qi=Pr|0||1;for(Cr=0;Cr<6;++Cr)Tu(It[Cr],qi,qi)}else if(typeof Pr=="object")if(Dr)Ru(It[0],Pr),Ru(It[1],Dr),Ru(It[2],Xr),Ru(It[3],Gr),Ru(It[4],Fr),Ru(It[5],Kr);else if(pc(yi,Pr),ql(cr,Pr),"faces"in Pr){var vn=Pr.faces;for(Cr=0;Cr<6;++Cr)Ho(It[Cr],cr),Ru(It[Cr],vn[Cr])}else for(Cr=0;Cr<6;++Cr)Ru(It[Cr],Pr);for(Ho(cr,It[0]),yi.genMipmaps?cr.mipmask=(It[0].width<<1)-1:cr.mipmask=It[0].mipmask,cr.internalformat=It[0].internalformat,Qt.width=It[0].width,Qt.height=It[0].height,Bc(cr),Cr=0;Cr<6;++Cr)Rf(It[Cr],fn+Cr);for(vc(yi,zn),Ou(),ha.profile&&(cr.stats.size=Ao(cr.internalformat,cr.type,Qt.width,Qt.height,yi.genMipmaps,!0)),Qt.format=Es[cr.internalformat],Qt.type=Ws[cr.type],Qt.mag=Qo[yi.magFilter],Qt.min=bl[yi.minFilter],Qt.wrapS=nl[yi.wrapS],Qt.wrapT=nl[yi.wrapT],Cr=0;Cr<6;++Cr)Lc(It[Cr]);return Qt}function ar(Pr,Dr,Xr,Gr,Fr){var Kr=Xr|0,Cr=Gr|0,yi=Fr|0,qi=al();return Ho(qi,cr),qi.width=0,qi.height=0,js(qi,Dr),qi.width=qi.width||(cr.width>>yi)-Kr,qi.height=qi.height||(cr.height>>yi)-Cr,Bc(cr),lu(qi,fn+Pr,Kr,Cr,yi),Ou(),jl(qi),Qt}function mr(Pr){var Dr=Pr|0;if(Dr!==cr.width){Qt.width=cr.width=Dr,Qt.height=cr.height=Dr,Bc(cr);for(var Xr=0;Xr<6;++Xr)for(var Gr=0;cr.mipmask>>Gr;++Gr)Gt.texImage2D(fn+Xr,Gr,cr.format,Dr>>Gr,Dr>>Gr,0,cr.format,cr.type,null);return Ou(),ha.profile&&(cr.stats.size=Ao(cr.internalformat,cr.type,Qt.width,Qt.height,!1,!0)),Qt}}return Qt(ge,Ue,dt,Rt,ur,gr),Qt.subimage=ar,Qt.resize=mr,Qt._reglType="textureCube",Qt._texture=cr,ha.profile&&(Qt.stats=cr.stats),Qt.destroy=function(){cr.decRef()},Qt}function N(){for(var ge=0;ge>Rt,dt.height>>Rt,0,dt.internalformat,dt.type,null);else for(var ur=0;ur<6;++ur)Gt.texImage2D(fn+ur,Rt,dt.internalformat,dt.width>>Rt,dt.height>>Rt,0,dt.internalformat,dt.type,null);vc(dt.texInfo,dt.target)})}function we(){for(var ge=0;ge=0?Lc=!0:Vs.indexOf(wf)>=0&&(Lc=!1))),("depthTexture"in Vu||"depthStencilTexture"in Vu)&&(zc=!!(Vu.depthTexture||Vu.depthStencilTexture)),"depth"in Vu&&(typeof Vu.depth=="boolean"?Rf=Vu.depth:(qc=Vu.depth,Cc=!1)),"stencil"in Vu&&(typeof Vu.stencil=="boolean"?Cc=Vu.stencil:(If=Vu.stencil,Rf=!1)),"depthStencil"in Vu&&(typeof Vu.depthStencil=="boolean"?Rf=Cc=Vu.depthStencil:(Ac=Vu.depthStencil,Rf=!1,Cc=!1))}var Ou=null,Y=null,R=null,K=null;if(Array.isArray(rf))Ou=rf.map(Do);else if(rf)Ou=[Do(rf)];else for(Ou=new Array(vc),mu=0;mu0&&(jl.depth=js[0].depth,jl.stencil=js[0].stencil,jl.depthStencil=js[0].depthStencil),js[al]?js[al](jl):js[al]=Ho(jl)}return e(zl,{width:mu,height:mu,color:wf})}function lu(bu){var al,jl=bu|0;if(jl===zl.width)return zl;var mu=zl.color;for(al=0;al=mu.byteLength?Tu.subdata(mu):(Tu.destroy(),Ho.buffers[bu]=null)),Ho.buffers[bu]||(Tu=Ho.buffers[bu]=Ta.create(al,$o,!1,!0)),jl.buffer=Ta.getBuffer(Tu),jl.size=jl.buffer.dimension|0,jl.normalized=!1,jl.type=jl.buffer.dtype,jl.offset=0,jl.stride=0,jl.divisor=0,jl.state=1,zl[bu]=1}else Ta.getBuffer(al)?(jl.buffer=Ta.getBuffer(al),jl.size=jl.buffer.dimension|0,jl.normalized=!1,jl.type=jl.buffer.dtype,jl.offset=0,jl.stride=0,jl.divisor=0,jl.state=1):Ta.getBuffer(al.buffer)?(jl.buffer=Ta.getBuffer(al.buffer),jl.size=(+al.size||jl.buffer.dimension)|0,jl.normalized=!!al.normalized||!1,"type"in al?jl.type=si[al.type]:jl.type=jl.buffer.dtype,jl.offset=(al.offset||0)|0,jl.stride=(al.stride||0)|0,jl.divisor=(al.divisor||0)|0,jl.state=1):"x"in al&&(jl.x=+al.x||0,jl.y=+al.y||0,jl.z=+al.z||0,jl.w=+al.w||0,jl.state=2)}for(var Ru=0;Ru1)for(var yl=0;ylkn&&(kn=La.stats.uniformsCount)}),kn},_i.getMaxAttributesCount=function(){var kn=0;return is.forEach(function(La){La.stats.attributesCount>kn&&(kn=La.stats.attributesCount)}),kn});function Do(){Ta={},fa={};for(var kn=0;kn16&&(_i=wi(_i,Gt.length*8));for(var Mn=Array(16),Ta=Array(16),fa=0;fa<16;fa++)Mn[fa]=_i[fa]^909522486,Ta[fa]=_i[fa]^1549556828;var ha=wi(Mn.concat(gs(jr)),512+jr.length*8);return bt(wi(Ta.concat(ha),768))}function Yo(Gt){for(var jr=no?"0123456789ABCDEF":"0123456789abcdef",_i="",Mn,Ta=0;Ta>>4&15)+jr.charAt(Mn&15);return _i}function po(Gt){for(var jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_i="",Mn=Gt.length,Ta=0;TaGt.length*8?_i+=Ls:_i+=jr.charAt(fa>>>6*(3-ha)&63);return _i}function ss(Gt,jr){var _i=jr.length,Mn=Array(),Ta,fa,ha,Io,Vs=Array(Math.ceil(Gt.length/2));for(Ta=0;Ta0;){for(Io=Array(),ha=0,Ta=0;Ta0||fa>0)&&(Io[Io.length]=fa);Mn[Mn.length]=ha,Vs=Io}var Hs="";for(Ta=Mn.length-1;Ta>=0;Ta--)Hs+=jr.charAt(Mn[Ta]);var is=Math.ceil(Gt.length*8/(Math.log(jr.length)/Math.log(2)));for(Ta=Hs.length;Ta>>6&31,128|Mn&63):Mn<=65535?jr+=String.fromCharCode(224|Mn>>>12&15,128|Mn>>>6&63,128|Mn&63):Mn<=2097151&&(jr+=String.fromCharCode(240|Mn>>>18&7,128|Mn>>>12&63,128|Mn>>>6&63,128|Mn&63));return jr}function gs(Gt){for(var jr=Array(Gt.length>>2),_i=0;_i>5]|=(Gt.charCodeAt(_i/8)&255)<<24-_i%32;return jr}function bt(Gt){for(var jr="",_i=0;_i>5]>>>24-_i%32&255);return jr}function Ft(Gt,jr){return Gt>>>jr|Gt<<32-jr}function hr(Gt,jr){return Gt>>>jr}function nr(Gt,jr,_i){return Gt&jr^~Gt&_i}function Sr(Gt,jr,_i){return Gt&jr^Gt&_i^jr&_i}function li(Gt){return Ft(Gt,2)^Ft(Gt,13)^Ft(Gt,22)}function di(Gt){return Ft(Gt,6)^Ft(Gt,11)^Ft(Gt,25)}function mi(Gt){return Ft(Gt,7)^Ft(Gt,18)^hr(Gt,3)}function Oi(Gt){return Ft(Gt,17)^Ft(Gt,19)^hr(Gt,10)}var dn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function wi(Gt,jr){var _i=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Mn=new Array(64),Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn;for(Gt[jr>>5]|=128<<24-jr%32,Gt[(jr+64>>9<<4)+15]=jr,Ps=0;Ps>16)+(jr>>16)+(_i>>16);return Mn<<16|_i&65535}function Ai(Gt){return Array.prototype.slice.call(Gt)}function gi(Gt){return Ai(Gt).join("")}function gn(Gt){var jr=Gt&&Gt.cache,_i=0,Mn=[],Ta=[],fa=[];function ha(Do,kn){var La=kn&&kn.stable;if(!La){for(var Es=0;Es0&&(Do.push(Ws,"="),Do.push.apply(Do,Ai(arguments)),Do.push(";")),Ws}return e(kn,{def:Es,toString:function(){return gi([La.length>0?"var "+La.join(",")+";":"",gi(Do)])}})}function Vs(){var Do=Io(),kn=Io(),La=Do.toString,Es=kn.toString;function Ws(Qo,bl){kn(Qo,bl,"=",Do.def(Qo,bl),";")}return e(function(){Do.apply(Do,Ai(arguments))},{def:Do.def,entry:Do,exit:kn,save:Ws,set:function(Qo,bl,nl){Ws(Qo,bl),Do(Qo,bl,"=",nl,";")},toString:function(){return La()+Es()}})}function Hs(){var Do=gi(arguments),kn=Vs(),La=Vs(),Es=kn.toString,Ws=La.toString;return e(kn,{then:function(){return kn.apply(kn,Ai(arguments)),this},else:function(){return La.apply(La,Ai(arguments)),this},toString:function(){var Qo=Ws();return Qo&&(Qo="else{"+Qo+"}"),gi(["if(",Do,"){",Es(),"}",Qo])}})}var is=Io(),su={};function Ps(Do,kn){var La=[];function Es(){var ru="a"+La.length;return La.push(ru),ru}kn=kn||0;for(var Ws=0;Ws":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ti={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Bi={cw:Le,ccw:We};function en(Gt){return Array.isArray(Gt)||fr(Gt)||Ot(Gt)}function Wi(Gt){return Gt.sort(function(jr,_i){return jr===ee?-1:_i===ee?1:jr<_i?-1:1})}function bi(Gt,jr,_i,Mn){this.thisDep=Gt,this.contextDep=jr,this.propDep=_i,this.append=Mn}function ao(Gt){return Gt&&!(Gt.thisDep||Gt.contextDep||Gt.propDep)}function yo(Gt){return new bi(!1,!1,!1,Gt)}function Ko(Gt,jr){var _i=Gt.type;if(_i===Gn){var Mn=Gt.data.length;return new bi(!0,Mn>=1,Mn>=2,jr)}else if(_i===Bs){var Ta=Gt.data;return new bi(Ta.thisDep,Ta.contextDep,Ta.propDep,jr)}else{if(_i===Js)return new bi(!1,!1,!1,jr);if(_i===ol){for(var fa=!1,ha=!1,Io=!1,Vs=0;Vs=1&&(ha=!0),is>=2&&(Io=!0)}else Hs.type===Bs&&(fa=fa||Hs.data.thisDep,ha=ha||Hs.data.contextDep,Io=Io||Hs.data.propDep)}return new bi(fa,ha,Io,jr)}else return new bi(_i===us,_i===Lo,_i===pn,jr)}}var Ms=new bi(!1,!1,!1,function(){});function vl(Gt,jr,_i,Mn,Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn){var La=Hs.Record,Es={add:32774,subtract:32778,"reverse subtract":32779};_i.ext_blend_minmax&&(Es.min=Ye,Es.max=it);var Ws=_i.angle_instanced_arrays,Qo=_i.webgl_draw_buffers,bl=_i.oes_vertex_array_object,nl={dirty:!0,profile:kn.profile},ru={},hs=[],Ho={},ql={};function yl(It){return It.replace(".","_")}function tl(It,Qt,ar){var mr=yl(It);hs.push(It),ru[mr]=nl[mr]=!!ar,Ho[mr]=Qt}function js(It,Qt,ar){var mr=yl(It);hs.push(It),Array.isArray(ar)?(nl[mr]=ar.slice(),ru[mr]=ar.slice()):nl[mr]=ru[mr]=ar,ql[mr]=Qt}function zl(It){return!!isNaN(It)}tl(Cl,Yi),tl(ul,pi),js(Gl,"blendColor",[0,0,0,0]),js(Vl,"blendEquationSeparate",[wr,wr]),js(Fl,"blendFuncSeparate",[_r,er,_r,er]),tl(ga,Tn,!0),js(ko,"depthFunc",ni),js(zs,"depthRange",[0,1]),js(Fo,"depthMask",!0),js(Ys,Ys,[!0,!0,!0,!0]),tl(Gs,ii),js(Us,"cullFace",se),js(Sl,Sl,We),js(_l,_l,1),tl(kl,oo),js(cl,"polygonOffset",[0,0]),tl(xl,el),tl(Uo,ys),js(_s,"sampleCoverage",[1,!1]),tl(Bl,wn),js(Il,"stencilMask",-1),js(Dl,"stencilFunc",[Nt,0,-1]),js(oe,"stencilOpSeparate",[X,mt,mt,mt]),js(w,"stencilOpSeparate",[se,mt,mt,mt]),tl(B,ua),js(Q,"scissor",[0,0,Gt.drawingBufferWidth,Gt.drawingBufferHeight]),js(ee,ee,[0,0,Gt.drawingBufferWidth,Gt.drawingBufferHeight]);var lu={gl:Gt,context:Ps,strings:jr,next:ru,current:nl,draw:su,elements:fa,buffer:Ta,shader:is,attributes:Hs.state,vao:Hs,uniforms:Vs,framebuffer:Io,extensions:_i,timer:qs,isBufferArgs:en},bu={primTypes:Yr,compareFuncs:ai,blendFuncs:Ji,blendEquations:Es,stencilOps:Ti,glTypes:si,orientationType:Bi};Qo&&(bu.backBuffer=[se],bu.drawBuffer=M(Mn.maxDrawbuffers,function(It){return It===0?[0]:M(It,function(Qt){return Ci+Qt})}));var al=0;function jl(){var It=gn({cache:Do}),Qt=It.link,ar=It.global;It.id=al++,It.batchId="0";var mr=Qt(lu),Pr=It.shared={props:"a0"};Object.keys(lu).forEach(function(Kr){Pr[Kr]=ar.def(mr,".",Kr)});var Dr=It.next={},Xr=It.current={};Object.keys(ql).forEach(function(Kr){Array.isArray(nl[Kr])&&(Dr[Kr]=ar.def(Pr.next,".",Kr),Xr[Kr]=ar.def(Pr.current,".",Kr))});var Gr=It.constants={};Object.keys(bu).forEach(function(Kr){Gr[Kr]=ar.def(JSON.stringify(bu[Kr]))}),It.invoke=function(Kr,Cr){switch(Cr.type){case Gn:var yi=["this",Pr.context,Pr.props,It.batchId];return Kr.def(Qt(Cr.data),".call(",yi.slice(0,Math.max(Cr.data.length+1,4)),")");case pn:return Kr.def(Pr.props,Cr.data);case Lo:return Kr.def(Pr.context,Cr.data);case us:return Kr.def("this",Cr.data);case Bs:return Cr.data.append(It,Kr),Cr.data.ref;case Js:return Cr.data.toString();case ol:return Cr.data.map(function(qi){return It.invoke(Kr,qi)})}},It.attribCache={};var Fr={};return It.scopeAttrib=function(Kr){var Cr=jr.id(Kr);if(Cr in Fr)return Fr[Cr];var yi=Hs.scope[Cr];yi||(yi=Hs.scope[Cr]=new La);var qi=Fr[Cr]=Qt(yi);return qi},It}function mu(It){var Qt=It.static,ar=It.dynamic,mr;if(le in Qt){var Pr=!!Qt[le];mr=yo(function(Xr,Gr){return Pr}),mr.enable=Pr}else if(le in ar){var Dr=ar[le];mr=Ko(Dr,function(Xr,Gr){return Xr.invoke(Gr,Dr)})}return mr}function Tu(It,Qt){var ar=It.static,mr=It.dynamic;if(Ne in ar){var Pr=ar[Ne];return Pr?(Pr=Io.getFramebuffer(Pr),yo(function(Xr,Gr){var Fr=Xr.link(Pr),Kr=Xr.shared;Gr.set(Kr.framebuffer,".next",Fr);var Cr=Kr.context;return Gr.set(Cr,"."+Ve,Fr+".width"),Gr.set(Cr,"."+ot,Fr+".height"),Fr})):yo(function(Xr,Gr){var Fr=Xr.shared;Gr.set(Fr.framebuffer,".next","null");var Kr=Fr.context;return Gr.set(Kr,"."+Ve,Kr+"."+Xt),Gr.set(Kr,"."+ot,Kr+"."+$t),"null"})}else if(Ne in mr){var Dr=mr[Ne];return Ko(Dr,function(Xr,Gr){var Fr=Xr.invoke(Gr,Dr),Kr=Xr.shared,Cr=Kr.framebuffer,yi=Gr.def(Cr,".getFramebuffer(",Fr,")");Gr.set(Cr,".next",yi);var qi=Kr.context;return Gr.set(qi,"."+Ve,yi+"?"+yi+".width:"+qi+"."+Xt),Gr.set(qi,"."+ot,yi+"?"+yi+".height:"+qi+"."+$t),yi})}else return null}function Ru(It,Qt,ar){var mr=It.static,Pr=It.dynamic;function Dr(Fr){if(Fr in mr){var Kr=mr[Fr],Cr=!0,yi=Kr.x|0,qi=Kr.y|0,vn,Qa;return"width"in Kr?vn=Kr.width|0:Cr=!1,"height"in Kr?Qa=Kr.height|0:Cr=!1,new bi(!Cr&&Qt&&Qt.thisDep,!Cr&&Qt&&Qt.contextDep,!Cr&&Qt&&Qt.propDep,function(sl,Os){var eo=sl.shared.context,fs=vn;"width"in Kr||(fs=Os.def(eo,".",Ve,"-",yi));var es=Qa;return"height"in Kr||(es=Os.def(eo,".",ot,"-",qi)),[yi,qi,fs,es]})}else if(Fr in Pr){var ra=Pr[Fr],mo=Ko(ra,function(sl,Os){var eo=sl.invoke(Os,ra),fs=sl.shared.context,es=Os.def(eo,".x|0"),$s=Os.def(eo,".y|0"),Ml=Os.def('"width" in ',eo,"?",eo,".width|0:","(",fs,".",Ve,"-",es,")"),Mu=Os.def('"height" in ',eo,"?",eo,".height|0:","(",fs,".",ot,"-",$s,")");return[es,$s,Ml,Mu]});return Qt&&(mo.thisDep=mo.thisDep||Qt.thisDep,mo.contextDep=mo.contextDep||Qt.contextDep,mo.propDep=mo.propDep||Qt.propDep),mo}else return Qt?new bi(Qt.thisDep,Qt.contextDep,Qt.propDep,function(sl,Os){var eo=sl.shared.context;return[0,0,Os.def(eo,".",Ve),Os.def(eo,".",ot)]}):null}var Xr=Dr(ee);if(Xr){var Gr=Xr;Xr=new bi(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Fr,Kr){var Cr=Gr.append(Fr,Kr),yi=Fr.shared.context;return Kr.set(yi,"."+Ke,Cr[2]),Kr.set(yi,"."+ft,Cr[3]),Cr})}return{viewport:Xr,scissor_box:Dr(Q)}}function Rf(It,Qt){var ar=It.static,mr=typeof ar[pt]=="string"&&typeof ar[$e]=="string";if(mr){if(Object.keys(Qt.dynamic).length>0)return null;var Pr=Qt.static,Dr=Object.keys(Pr);if(Dr.length>0&&typeof Pr[Dr[0]]=="number"){for(var Xr=[],Gr=0;Gr"+es+"?"+Cr+".constant["+es+"]:0;"}).join(""),"}}else{","if(",vn,"(",Cr,".buffer)){",sl,"=",Qa,".createStream(",Mr,",",Cr,".buffer);","}else{",sl,"=",Qa,".getBuffer(",Cr,".buffer);","}",Os,'="type" in ',Cr,"?",qi.glTypes,"[",Cr,".type]:",sl,".dtype;",ra.normalized,"=!!",Cr,".normalized;");function eo(fs){Kr(ra[fs],"=",Cr,".",fs,"|0;")}return eo("size"),eo("offset"),eo("stride"),eo("divisor"),Kr("}}"),Kr.exit("if(",ra.isStream,"){",Qa,".destroyStream(",sl,");","}"),ra}Pr[Dr]=Ko(Xr,Gr)}),Pr}function vc(It){var Qt=It.static,ar=It.dynamic,mr={};return Object.keys(Qt).forEach(function(Pr){var Dr=Qt[Pr];mr[Pr]=yo(function(Xr,Gr){return typeof Dr=="number"||typeof Dr=="boolean"?""+Dr:Xr.link(Dr)})}),Object.keys(ar).forEach(function(Pr){var Dr=ar[Pr];mr[Pr]=Ko(Dr,function(Xr,Gr){return Xr.invoke(Gr,Dr)})}),mr}function qc(It,Qt,ar,mr,Pr){var Dr=It.static,Xr=It.dynamic,Gr=Rf(It,Qt),Fr=Tu(It,Pr),Kr=Ru(It,Fr,Pr),Cr=rf(It,Pr),yi=Lc(It,Pr),qi=Cc(It,Pr,Gr);function vn(eo){var fs=Kr[eo];fs&&(yi[eo]=fs)}vn(ee),vn(yl(Q));var Qa=Object.keys(yi).length>0,ra={framebuffer:Fr,draw:Cr,shader:qi,state:yi,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ra.profile=mu(It,Pr),ra.uniforms=wf(ar,Pr),ra.drawVAO=ra.scopeVAO=Cr.vao,!ra.drawVAO&&qi.program&&!Gr&&_i.angle_instanced_arrays&&Cr.static.elements){var mo=!0,sl=qi.program.attributes.map(function(eo){var fs=Qt.static[eo];return mo=mo&&!!fs,fs});if(mo&&sl.length>0){var Os=Hs.getVAO(Hs.createVAO({attributes:sl,elements:Cr.static.elements}));ra.drawVAO=new bi(null,null,null,function(eo,fs){return eo.link(Os)}),ra.useVAO=!0}}return Gr?ra.useVAO=!0:ra.attributes=pc(Qt,Pr),ra.context=vc(mr,Pr),ra}function If(It,Qt,ar){var mr=It.shared,Pr=mr.context,Dr=It.scope();Object.keys(ar).forEach(function(Xr){Qt.save(Pr,"."+Xr);var Gr=ar[Xr],Fr=Gr.append(It,Qt);Array.isArray(Fr)?Dr(Pr,".",Xr,"=[",Fr.join(),"];"):Dr(Pr,".",Xr,"=",Fr,";")}),Qt(Dr)}function Ac(It,Qt,ar,mr){var Pr=It.shared,Dr=Pr.gl,Xr=Pr.framebuffer,Gr;Qo&&(Gr=Qt.def(Pr.extensions,".webgl_draw_buffers"));var Fr=It.constants,Kr=Fr.drawBuffer,Cr=Fr.backBuffer,yi;ar?yi=ar.append(It,Qt):yi=Qt.def(Xr,".next"),mr||Qt("if(",yi,"!==",Xr,".cur){"),Qt("if(",yi,"){",Dr,".bindFramebuffer(",Wr,",",yi,".framebuffer);"),Qo&&Qt(Gr,".drawBuffersWEBGL(",Kr,"[",yi,".colorAttachments.length]);"),Qt("}else{",Dr,".bindFramebuffer(",Wr,",null);"),Qo&&Qt(Gr,".drawBuffersWEBGL(",Cr,");"),Qt("}",Xr,".cur=",yi,";"),mr||Qt("}")}function zc(It,Qt,ar){var mr=It.shared,Pr=mr.gl,Dr=It.current,Xr=It.next,Gr=mr.current,Fr=mr.next,Kr=It.cond(Gr,".dirty");hs.forEach(function(Cr){var yi=yl(Cr);if(!(yi in ar.state)){var qi,vn;if(yi in Xr){qi=Xr[yi],vn=Dr[yi];var Qa=M(nl[yi].length,function(mo){return Kr.def(qi,"[",mo,"]")});Kr(It.cond(Qa.map(function(mo,sl){return mo+"!=="+vn+"["+sl+"]"}).join("||")).then(Pr,".",ql[yi],"(",Qa,");",Qa.map(function(mo,sl){return vn+"["+sl+"]="+mo}).join(";"),";"))}else{qi=Kr.def(Fr,".",yi);var ra=It.cond(qi,"!==",Gr,".",yi);Kr(ra),yi in Ho?ra(It.cond(qi).then(Pr,".enable(",Ho[yi],");").else(Pr,".disable(",Ho[yi],");"),Gr,".",yi,"=",qi,";"):ra(Pr,".",ql[yi],"(",qi,");",Gr,".",yi,"=",qi,";")}}}),Object.keys(ar.state).length===0&&Kr(Gr,".dirty=false;"),Qt(Kr)}function Vu(It,Qt,ar,mr){var Pr=It.shared,Dr=It.current,Xr=Pr.current,Gr=Pr.gl,Fr;Wi(Object.keys(ar)).forEach(function(Kr){var Cr=ar[Kr];if(!(mr&&!mr(Cr))){var yi=Cr.append(It,Qt);if(Ho[Kr]){var qi=Ho[Kr];ao(Cr)?(Fr=It.link(yi,{stable:!0}),Qt(It.cond(Fr).then(Gr,".enable(",qi,");").else(Gr,".disable(",qi,");")),Qt(Xr,".",Kr,"=",Fr,";")):(Qt(It.cond(yi).then(Gr,".enable(",qi,");").else(Gr,".disable(",qi,");")),Qt(Xr,".",Kr,"=",yi,";"))}else if(Gi(yi)){var vn=Dr[Kr];Qt(Gr,".",ql[Kr],"(",yi,");",yi.map(function(Qa,ra){return vn+"["+ra+"]="+Qa}).join(";"),";")}else ao(Cr)?(Fr=It.link(yi,{stable:!0}),Qt(Gr,".",ql[Kr],"(",Fr,");",Xr,".",Kr,"=",Fr,";")):Qt(Gr,".",ql[Kr],"(",yi,");",Xr,".",Kr,"=",yi,";")}})}function Bc(It,Qt){Ws&&(It.instancing=Qt.def(It.shared.extensions,".angle_instanced_arrays"))}function Ou(It,Qt,ar,mr,Pr){var Dr=It.shared,Xr=It.stats,Gr=Dr.current,Fr=Dr.timer,Kr=ar.profile;function Cr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var yi,qi;function vn(eo){yi=Qt.def(),eo(yi,"=",Cr(),";"),typeof Pr=="string"?eo(Xr,".count+=",Pr,";"):eo(Xr,".count++;"),qs&&(mr?(qi=Qt.def(),eo(qi,"=",Fr,".getNumPendingQueries();")):eo(Fr,".beginQuery(",Xr,");"))}function Qa(eo){eo(Xr,".cpuTime+=",Cr(),"-",yi,";"),qs&&(mr?eo(Fr,".pushScopeStats(",qi,",",Fr,".getNumPendingQueries(),",Xr,");"):eo(Fr,".endQuery();"))}function ra(eo){var fs=Qt.def(Gr,".profile");Qt(Gr,".profile=",eo,";"),Qt.exit(Gr,".profile=",fs,";")}var mo;if(Kr){if(ao(Kr)){Kr.enable?(vn(Qt),Qa(Qt.exit),ra("true")):ra("false");return}mo=Kr.append(It,Qt),ra(mo)}else mo=Qt.def(Gr,".profile");var sl=It.block();vn(sl),Qt("if(",mo,"){",sl,"}");var Os=It.block();Qa(Os),Qt.exit("if(",mo,"){",Os,"}")}function Y(It,Qt,ar,mr,Pr){var Dr=It.shared;function Xr(Fr){switch(Fr){case $l:case Ql:case Hu:return 2;case pl:case ku:case tf:return 3;case Hl:case Jl:case Ku:return 4;default:return 1}}function Gr(Fr,Kr,Cr){var yi=Dr.gl,qi=Qt.def(Fr,".location"),vn=Qt.def(Dr.attributes,"[",qi,"]"),Qa=Cr.state,ra=Cr.buffer,mo=[Cr.x,Cr.y,Cr.z,Cr.w],sl=["buffer","normalized","offset","stride"];function Os(){Qt("if(!",vn,".buffer){",yi,".enableVertexAttribArray(",qi,");}");var fs=Cr.type,es;if(Cr.size?es=Qt.def(Cr.size,"||",Kr):es=Kr,Qt("if(",vn,".type!==",fs,"||",vn,".size!==",es,"||",sl.map(function(Ml){return vn+"."+Ml+"!=="+Cr[Ml]}).join("||"),"){",yi,".bindBuffer(",Mr,",",ra,".buffer);",yi,".vertexAttribPointer(",[qi,es,fs,Cr.normalized,Cr.stride,Cr.offset],");",vn,".type=",fs,";",vn,".size=",es,";",sl.map(function(Ml){return vn+"."+Ml+"="+Cr[Ml]+";"}).join(""),"}"),Ws){var $s=Cr.divisor;Qt("if(",vn,".divisor!==",$s,"){",It.instancing,".vertexAttribDivisorANGLE(",[qi,$s],");",vn,".divisor=",$s,";}")}}function eo(){Qt("if(",vn,".buffer){",yi,".disableVertexAttribArray(",qi,");",vn,".buffer=null;","}if(",In.map(function(fs,es){return vn+"."+fs+"!=="+mo[es]}).join("||"),"){",yi,".vertexAttrib4f(",qi,",",mo,");",In.map(function(fs,es){return vn+"."+fs+"="+mo[es]+";"}).join(""),"}")}Qa===Rn?Os():Qa===Hn?eo():(Qt("if(",Qa,"===",Rn,"){"),Os(),Qt("}else{"),eo(),Qt("}"))}mr.forEach(function(Fr){var Kr=Fr.name,Cr=ar.attributes[Kr],yi;if(Cr){if(!Pr(Cr))return;yi=Cr.append(It,Qt)}else{if(!Pr(Ms))return;var qi=It.scopeAttrib(Kr);yi={},Object.keys(new La).forEach(function(vn){yi[vn]=Qt.def(qi,".",vn)})}Gr(It.link(Fr),Xr(Fr.info.type),yi)})}function R(It,Qt,ar,mr,Pr,Dr){for(var Xr=It.shared,Gr=Xr.gl,Fr,Kr=0;Kr1){for(var Au=[],$u=[],du=0;du>1)",ra],");")}function $s(){ar(mo,".drawArraysInstancedANGLE(",[qi,vn,Qa,ra],");")}Cr&&Cr!=="null"?Os?es():(ar("if(",Cr,"){"),es(),ar("}else{"),$s(),ar("}")):$s()}function fs(){function es(){ar(Dr+".drawElements("+[qi,Qa,sl,vn+"<<(("+sl+"-"+Vn+")>>1)"]+");")}function $s(){ar(Dr+".drawArrays("+[qi,vn,Qa]+");")}Cr&&Cr!=="null"?Os?es():(ar("if(",Cr,"){"),es(),ar("}else{"),$s(),ar("}")):$s()}Ws&&(typeof ra!="number"||ra>=0)?typeof ra=="string"?(ar("if(",ra,">0){"),eo(),ar("}else if(",ra,"<0){"),fs(),ar("}")):eo():fs()}function N(It,Qt,ar,mr,Pr){var Dr=jl(),Xr=Dr.proc("body",Pr);return Ws&&(Dr.instancing=Xr.def(Dr.shared.extensions,".angle_instanced_arrays")),It(Dr,Xr,ar,mr),Dr.compile().body}function $(It,Qt,ar,mr){Bc(It,Qt),ar.useVAO?ar.drawVAO?Qt(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Qt),");"):Qt(It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"):(Qt(It.shared.vao,".setVAO(null);"),Y(It,Qt,ar,mr.attributes,function(){return!0})),R(It,Qt,ar,mr.uniforms,function(){return!0},!1),K(It,Qt,Qt,ar)}function we(It,Qt){var ar=It.proc("draw",1);Bc(It,ar),If(It,ar,Qt.context),Ac(It,ar,Qt.framebuffer),zc(It,ar,Qt),Vu(It,ar,Qt.state),Ou(It,ar,Qt,!1,!0);var mr=Qt.shader.progVar.append(It,ar);if(ar(It.shared.gl,".useProgram(",mr,".program);"),Qt.shader.program)$(It,ar,Qt,Qt.shader.program);else{ar(It.shared.vao,".setVAO(null);");var Pr=It.global.def("{}"),Dr=ar.def(mr,".id"),Xr=ar.def(Pr,"[",Dr,"]");ar(It.cond(Xr).then(Xr,".call(this,a0);").else(Xr,"=",Pr,"[",Dr,"]=",It.link(function(Gr){return N($,It,Qt,Gr,1)}),"(",mr,");",Xr,".call(this,a0);"))}Object.keys(Qt.state).length>0&&ar(It.shared.current,".dirty=true;"),It.shared.vao&&ar(It.shared.vao,".setVAO(null);")}function ge(It,Qt,ar,mr){It.batchId="a1",Bc(It,Qt);function Pr(){return!0}Y(It,Qt,ar,mr.attributes,Pr),R(It,Qt,ar,mr.uniforms,Pr,!1),K(It,Qt,Qt,ar)}function Ue(It,Qt,ar,mr){Bc(It,Qt);var Pr=ar.contextDep,Dr=Qt.def(),Xr="a0",Gr="a1",Fr=Qt.def();It.shared.props=Fr,It.batchId=Dr;var Kr=It.scope(),Cr=It.scope();Qt(Kr.entry,"for(",Dr,"=0;",Dr,"<",Gr,";++",Dr,"){",Fr,"=",Xr,"[",Dr,"];",Cr,"}",Kr.exit);function yi(sl){return sl.contextDep&&Pr||sl.propDep}function qi(sl){return!yi(sl)}if(ar.needsContext&&If(It,Cr,ar.context),ar.needsFramebuffer&&Ac(It,Cr,ar.framebuffer),Vu(It,Cr,ar.state,yi),ar.profile&&yi(ar.profile)&&Ou(It,Cr,ar,!1,!0),mr)ar.useVAO?ar.drawVAO?yi(ar.drawVAO)?Cr(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Cr),");"):Kr(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Kr),");"):Kr(It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"):(Kr(It.shared.vao,".setVAO(null);"),Y(It,Kr,ar,mr.attributes,qi),Y(It,Cr,ar,mr.attributes,yi)),R(It,Kr,ar,mr.uniforms,qi,!1),R(It,Cr,ar,mr.uniforms,yi,!0),K(It,Kr,Cr,ar);else{var vn=It.global.def("{}"),Qa=ar.shader.progVar.append(It,Cr),ra=Cr.def(Qa,".id"),mo=Cr.def(vn,"[",ra,"]");Cr(It.shared.gl,".useProgram(",Qa,".program);","if(!",mo,"){",mo,"=",vn,"[",ra,"]=",It.link(function(sl){return N(ge,It,ar,sl,2)}),"(",Qa,");}",mo,".call(this,a0[",Dr,"],",Dr,");")}}function dt(It,Qt){var ar=It.proc("batch",2);It.batchId="0",Bc(It,ar);var mr=!1,Pr=!0;Object.keys(Qt.context).forEach(function(vn){mr=mr||Qt.context[vn].propDep}),mr||(If(It,ar,Qt.context),Pr=!1);var Dr=Qt.framebuffer,Xr=!1;Dr?(Dr.propDep?mr=Xr=!0:Dr.contextDep&&mr&&(Xr=!0),Xr||Ac(It,ar,Dr)):Ac(It,ar,null),Qt.state.viewport&&Qt.state.viewport.propDep&&(mr=!0);function Gr(vn){return vn.contextDep&&mr||vn.propDep}zc(It,ar,Qt),Vu(It,ar,Qt.state,function(vn){return!Gr(vn)}),(!Qt.profile||!Gr(Qt.profile))&&Ou(It,ar,Qt,!1,"a1"),Qt.contextDep=mr,Qt.needsContext=Pr,Qt.needsFramebuffer=Xr;var Fr=Qt.shader.progVar;if(Fr.contextDep&&mr||Fr.propDep)Ue(It,ar,Qt,null);else{var Kr=Fr.append(It,ar);if(ar(It.shared.gl,".useProgram(",Kr,".program);"),Qt.shader.program)Ue(It,ar,Qt,Qt.shader.program);else{ar(It.shared.vao,".setVAO(null);");var Cr=It.global.def("{}"),yi=ar.def(Kr,".id"),qi=ar.def(Cr,"[",yi,"]");ar(It.cond(qi).then(qi,".call(this,a0,a1);").else(qi,"=",Cr,"[",yi,"]=",It.link(function(vn){return N(Ue,It,Qt,vn,2)}),"(",Kr,");",qi,".call(this,a0,a1);"))}}Object.keys(Qt.state).length>0&&ar(It.shared.current,".dirty=true;"),It.shared.vao&&ar(It.shared.vao,".setVAO(null);")}function Rt(It,Qt){var ar=It.proc("scope",3);It.batchId="a2";var mr=It.shared,Pr=mr.current;if(If(It,ar,Qt.context),Qt.framebuffer&&Qt.framebuffer.append(It,ar),Wi(Object.keys(Qt.state)).forEach(function(Gr){var Fr=Qt.state[Gr],Kr=Fr.append(It,ar);Gi(Kr)?Kr.forEach(function(Cr,yi){zl(Cr)?ar.set(It.next[Gr],"["+yi+"]",Cr):ar.set(It.next[Gr],"["+yi+"]",It.link(Cr,{stable:!0}))}):ao(Fr)?ar.set(mr.next,"."+Gr,It.link(Kr,{stable:!0})):ar.set(mr.next,"."+Gr,Kr)}),Ou(It,ar,Qt,!0,!0),[zt,yr,Jt,Ir,Yt].forEach(function(Gr){var Fr=Qt.draw[Gr];if(Fr){var Kr=Fr.append(It,ar);zl(Kr)?ar.set(mr.draw,"."+Gr,Kr):ar.set(mr.draw,"."+Gr,It.link(Kr),{stable:!0})}}),Object.keys(Qt.uniforms).forEach(function(Gr){var Fr=Qt.uniforms[Gr].append(It,ar);Array.isArray(Fr)&&(Fr="["+Fr.map(function(Kr){return zl(Kr)?Kr:It.link(Kr,{stable:!0})})+"]"),ar.set(mr.uniforms,"["+It.link(jr.id(Gr),{stable:!0})+"]",Fr)}),Object.keys(Qt.attributes).forEach(function(Gr){var Fr=Qt.attributes[Gr].append(It,ar),Kr=It.scopeAttrib(Gr);Object.keys(new La).forEach(function(Cr){ar.set(Kr,"."+Cr,Fr[Cr])})}),Qt.scopeVAO){var Dr=Qt.scopeVAO.append(It,ar);zl(Dr)?ar.set(mr.vao,".targetVAO",Dr):ar.set(mr.vao,".targetVAO",It.link(Dr,{stable:!0}))}function Xr(Gr){var Fr=Qt.shader[Gr];if(Fr){var Kr=Fr.append(It,ar);zl(Kr)?ar.set(mr.shader,"."+Gr,Kr):ar.set(mr.shader,"."+Gr,It.link(Kr,{stable:!0}))}}Xr($e),Xr(pt),Object.keys(Qt.state).length>0&&(ar(Pr,".dirty=true;"),ar.exit(Pr,".dirty=true;")),ar("a1(",It.shared.context,",a0,",It.batchId,");")}function ur(It){if(!(typeof It!="object"||Gi(It))){for(var Qt=Object.keys(It),ar=0;ar=0;--N){var $=lu[N];$&&$(Do,null,0)}_i.flush(),is&&is.update()}function Ru(){!mu&&lu.length>0&&(mu=d.next(Tu))}function Rf(){mu&&(d.cancel(Tu),mu=null)}function Cc(N){N.preventDefault(),Ta=!0,Rf(),bu.forEach(function($){$()})}function rf(N){_i.getError(),Ta=!1,fa.restore(),ru.restore(),Ws.restore(),hs.restore(),Ho.restore(),ql.restore(),bl.restore(),is&&is.restore(),yl.procs.refresh(),Ru(),al.forEach(function($){$()})}zl&&(zl.addEventListener(pu,Cc,!1),zl.addEventListener(xu,rf,!1));function Lc(){lu.length=0,Rf(),zl&&(zl.removeEventListener(pu,Cc),zl.removeEventListener(xu,rf)),ru.clear(),ql.clear(),Ho.clear(),bl.clear(),hs.clear(),Qo.clear(),Ws.clear(),is&&is.clear(),jl.forEach(function(N){N()})}function wf(N){function $(Dr){var Xr=e({},Dr);delete Xr.uniforms,delete Xr.attributes,delete Xr.context,delete Xr.vao,"stencil"in Xr&&Xr.stencil.op&&(Xr.stencil.opBack=Xr.stencil.opFront=Xr.stencil.op,delete Xr.stencil.op);function Gr(Fr){if(Fr in Xr){var Kr=Xr[Fr];delete Xr[Fr],Object.keys(Kr).forEach(function(Cr){Xr[Fr+"."+Cr]=Kr[Cr]})}}return Gr("blend"),Gr("depth"),Gr("cull"),Gr("stencil"),Gr("polygonOffset"),Gr("scissor"),Gr("sample"),"vao"in Dr&&(Xr.vao=Dr.vao),Xr}function we(Dr,Xr){var Gr={},Fr={};return Object.keys(Dr).forEach(function(Kr){var Cr=Dr[Kr];if(h.isDynamic(Cr)){Fr[Kr]=h.unbox(Cr,Kr);return}else if(Xr&&Array.isArray(Cr)){for(var yi=0;yi0)return It.call(this,mr(Dr|0),Dr|0)}else if(Array.isArray(Dr)){if(Dr.length)return It.call(this,Dr,Dr.length)}else return cr.call(this,Dr)}return e(Pr,{stats:ur,destroy:function(){gr.destroy()}})}var pc=ql.setFBO=wf({framebuffer:h.define.call(null,of,"framebuffer")});function vc(N,$){var we=0;yl.procs.poll();var ge=$.color;ge&&(_i.clearColor(+ge[0]||0,+ge[1]||0,+ge[2]||0,+ge[3]||0),we|=qu),"depth"in $&&(_i.clearDepth(+$.depth),we|=Ju),"stencil"in $&&(_i.clearStencil($.stencil|0),we|=qo),_i.clear(we)}function qc(N){if("framebuffer"in N)if(N.framebuffer&&N.framebuffer_reglType==="framebufferCube")for(var $=0;$<6;++$)pc(e({framebuffer:N.framebuffer.faces[$]},N),vc);else pc(N,vc);else vc(null,N)}function If(N){lu.push(N);function $(){var we=hf(lu,N);function ge(){var Ue=hf(lu,ge);lu[Ue]=lu[lu.length-1],lu.length-=1,lu.length<=0&&Rf()}lu[we]=ge}return Ru(),{cancel:$}}function Ac(){var N=js.viewport,$=js.scissor_box;N[0]=N[1]=$[0]=$[1]=0,Do.viewportWidth=Do.framebufferWidth=Do.drawingBufferWidth=N[2]=$[2]=_i.drawingBufferWidth,Do.viewportHeight=Do.framebufferHeight=Do.drawingBufferHeight=N[3]=$[3]=_i.drawingBufferHeight}function zc(){Do.tick+=1,Do.time=Bc(),Ac(),yl.procs.poll()}function Vu(){hs.refresh(),Ac(),yl.procs.refresh(),is&&is.update()}function Bc(){return(p()-su)/1e3}Vu();function Ou(N,$){var we;switch(N){case"frame":return If($);case"lost":we=bu;break;case"restore":we=al;break;case"destroy":we=jl;break;default:}return we.push($),{cancel:function(){for(var ge=0;ge=0},read:tl,destroy:Lc,_gl:_i,_refresh:Vu,poll:function(){zc(),is&&is.update()},now:Bc,stats:Io,getCachedCode:Y,preloadCachedCode:R});return jr.onDone(null,K),K}return dc})});var GBe=Se((Ngr,HBe)=>{"use strict";var zNt=Zm();HBe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},UBe(t)?t={container:t}:PNt(t)?t={container:t}:INt(t)?t={gl:t}:t=zNt(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}UBe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=VBe(),t.container.appendChild(t.canvas),NBe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=VBe(),t.container.appendChild(t.canvas),NBe(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 NBe(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 UBe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function PNt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function INt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function VBe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var jBe=Se((Ugr,WBe)=>{"use strict";var DNt=JY(),RNt=[32,126];WBe.exports=FNt;function FNt(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||RNt;if(n&&typeof n!="string"&&(n=DNt(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],u=0;s<=a[1];s++)o[u++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var l=r.getContext("2d");l.fillStyle="#000",l.fillRect(0,0,r.width,r.height),l.font=n,l.textAlign="center",l.textBaseline="middle",l.fillStyle="#fff";for(var f=i[0]/2,c=i[1]/2,s=0;st[0]-i[0]/2&&(f=i[0]/2,c+=i[1]);return r}});var rK=Se(Hh=>{"use strict";"use restrict";var tK=32;Hh.INT_BITS=tK;Hh.INT_MAX=2147483647;Hh.INT_MIN=-1<0)-(e<0)};Hh.abs=function(e){var t=e>>tK-1;return(e^t)-t};Hh.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};Hh.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};Hh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function ZBe(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}Hh.countTrailingZeros=ZBe;Hh.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};Hh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Hh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var gk=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|gk[e>>>16&255]<<8|gk[e>>>24&255]};Hh.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};Hh.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};Hh.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};Hh.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};Hh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>ZBe(e)+1}});var KBe=Se((Hgr,YBe)=>{"use strict";function XBe(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 qNt(e|0,t);break;case"object":if(typeof e.length=="number")return XBe(e,t,0);break}return[]}YBe.exports=BNt});var cOe=Se(jf=>{"use strict";var fx=rK(),Mp=KBe(),JBe=u2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Mp([32,0]),UINT16:Mp([32,0]),UINT32:Mp([32,0]),BIGUINT64:Mp([32,0]),INT8:Mp([32,0]),INT16:Mp([32,0]),INT32:Mp([32,0]),BIGINT64:Mp([32,0]),FLOAT:Mp([32,0]),DOUBLE:Mp([32,0]),DATA:Mp([32,0]),UINT8C:Mp([32,0]),BUFFER:Mp([32,0])});var ONt=typeof Uint8ClampedArray!="undefined",NNt=typeof BigUint64Array!="undefined",UNt=typeof BigInt64Array!="undefined",sd=window.__TYPEDARRAY_POOL;sd.UINT8C||(sd.UINT8C=Mp([32,0]));sd.BIGUINT64||(sd.BIGUINT64=Mp([32,0]));sd.BIGINT64||(sd.BIGINT64=Mp([32,0]));sd.BUFFER||(sd.BUFFER=Mp([32,0]));var d9=sd.DATA,p9=sd.BUFFER;jf.free=function(t){if(JBe.isBuffer(t))p9[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;d9[n].push(t)}};function $Be(e){if(e){var t=e.length||e.byteLength,r=fx.log2(t);d9[r].push(e)}}function VNt(e){$Be(e.buffer)}jf.freeUint8=jf.freeUint16=jf.freeUint32=jf.freeBigUint64=jf.freeInt8=jf.freeInt16=jf.freeInt32=jf.freeBigInt64=jf.freeFloat32=jf.freeFloat=jf.freeFloat64=jf.freeDouble=jf.freeUint8Clamped=jf.freeDataView=VNt;jf.freeArrayBuffer=$Be;jf.freeBuffer=function(t){p9[fx.log2(t.length)].push(t)};jf.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Ov(t);switch(r){case"uint8":return iK(t);case"uint16":return QBe(t);case"uint32":return eOe(t);case"int8":return tOe(t);case"int16":return rOe(t);case"int32":return iOe(t);case"float":case"float32":return nOe(t);case"double":case"float64":return aOe(t);case"uint8_clamped":return oOe(t);case"bigint64":return lOe(t);case"biguint64":return sOe(t);case"buffer":return fOe(t);case"data":case"dataview":return uOe(t);default:return null}return null};function Ov(t){var t=fx.nextPow2(t),r=fx.log2(t),n=d9[r];return n.length>0?n.pop():new ArrayBuffer(t)}jf.mallocArrayBuffer=Ov;function iK(e){return new Uint8Array(Ov(e),0,e)}jf.mallocUint8=iK;function QBe(e){return new Uint16Array(Ov(2*e),0,e)}jf.mallocUint16=QBe;function eOe(e){return new Uint32Array(Ov(4*e),0,e)}jf.mallocUint32=eOe;function tOe(e){return new Int8Array(Ov(e),0,e)}jf.mallocInt8=tOe;function rOe(e){return new Int16Array(Ov(2*e),0,e)}jf.mallocInt16=rOe;function iOe(e){return new Int32Array(Ov(4*e),0,e)}jf.mallocInt32=iOe;function nOe(e){return new Float32Array(Ov(4*e),0,e)}jf.mallocFloat32=jf.mallocFloat=nOe;function aOe(e){return new Float64Array(Ov(8*e),0,e)}jf.mallocFloat64=jf.mallocDouble=aOe;function oOe(e){return ONt?new Uint8ClampedArray(Ov(e),0,e):iK(e)}jf.mallocUint8Clamped=oOe;function sOe(e){return NNt?new BigUint64Array(Ov(8*e),0,e):null}jf.mallocBigUint64=sOe;function lOe(e){return UNt?new BigInt64Array(Ov(8*e),0,e):null}jf.mallocBigInt64=lOe;function uOe(e){return new DataView(Ov(e),0,e)}jf.mallocDataView=uOe;function fOe(e){e=fx.nextPow2(e);var t=fx.log2(e),r=p9[t];return r.length>0?r.pop():new JBe(e)}jf.mallocBuffer=fOe;jf.clearCache=function(){for(var t=0;t<32;++t)sd.UINT8[t].length=0,sd.UINT16[t].length=0,sd.UINT32[t].length=0,sd.INT8[t].length=0,sd.INT16[t].length=0,sd.INT32[t].length=0,sd.FLOAT[t].length=0,sd.DOUBLE[t].length=0,sd.BIGUINT64[t].length=0,sd.BIGINT64[t].length=0,sd.UINT8C[t].length=0,d9[t].length=0,p9[t].length=0}});var dOe=Se((Wgr,hOe)=>{"use strict";var HNt=Object.prototype.toString;hOe.exports=function(e){var t;return HNt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var nK=Se((jgr,pOe)=>{pOe.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 mOe=Se((Zgr,yOe)=>{"use strict";var GNt=nK();yOe.exports=vOe;var _k=96;function aK(e,t){var r=GNt(getComputedStyle(e).getPropertyValue(t));return r[0]*vOe(r[1],e)}function WNt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=aK(r,"font-size")/128;return t.removeChild(r),n}function vOe(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 WNt(e,t);case"em":return aK(t,"font-size");case"rem":return aK(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 _k;case"cm":return _k/2.54;case"mm":return _k/25.4;case"pt":return _k/72;case"pc":return _k/6}return 1}});var xOe=Se((Xgr,_Oe)=>{"use strict";_Oe.exports=m9;var jNt=m9.canvas=document.createElement("canvas"),v9=jNt.getContext("2d"),gOe=y9([32,126]);m9.createPairs=y9;m9.ascii=gOe;function m9(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=y9(t):Array.isArray(t)?n=t:(t.o?n=y9(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=gOe),v9.font=i+"px "+e;for(var o=0;oi*a){var f=(l-u)/i;r[s]=f*1e3}}return r}function y9(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";TOe.exports=cx;cx.canvas=document.createElement("canvas");cx.cache={};function cx(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(cx.cache[r]&&n<=cx.cache[r].em)return bOe(cx.cache[r],s);var u=t.canvas||cx.canvas,l=u.getContext("2d"),f={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"},c=Math.ceil(n*1.5);u.height=c,u.width=c*.5,l.font=o;var h="H",d={top:0};l.clearRect(0,0,c,c),l.textBaseline="top",l.fillStyle="black",l.fillText(h,0,0);var p=Ym(l.getImageData(0,0,c,c));l.clearRect(0,0,c,c),l.textBaseline="bottom",l.fillText(h,0,c);var x=Ym(l.getImageData(0,0,c,c));d.lineHeight=d.bottom=c-x+p,l.clearRect(0,0,c,c),l.textBaseline="alphabetic",l.fillText(h,0,c);var b=Ym(l.getImageData(0,0,c,c)),y=c-b-1+p;d.baseline=d.alphabetic=y,l.clearRect(0,0,c,c),l.textBaseline="middle",l.fillText(h,0,c*.5);var E=Ym(l.getImageData(0,0,c,c));d.median=d.middle=c-E-1+p-c*.5,l.clearRect(0,0,c,c),l.textBaseline="hanging",l.fillText(h,0,c*.5);var k=Ym(l.getImageData(0,0,c,c));d.hanging=c-k-1+p-c*.5,l.clearRect(0,0,c,c),l.textBaseline="ideographic",l.fillText(h,0,c);var A=Ym(l.getImageData(0,0,c,c));if(d.ideographic=c-A-1+p,f.upper&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.upper,0,0),d.upper=Ym(l.getImageData(0,0,c,c)),d.capHeight=d.baseline-d.upper),f.lower&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.lower,0,0),d.lower=Ym(l.getImageData(0,0,c,c)),d.xHeight=d.baseline-d.lower),f.tittle&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.tittle,0,0),d.tittle=Ym(l.getImageData(0,0,c,c))),f.ascent&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.ascent,0,0),d.ascent=Ym(l.getImageData(0,0,c,c))),f.descent&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.descent,0,0),d.descent=wOe(l.getImageData(0,0,c,c))),f.overshoot){l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.overshoot,0,0);var L=wOe(l.getImageData(0,0,c,c));d.overshoot=L-y}for(var _ in d)d[_]/=n;return d.em=n,cx.cache[r]=d,bOe(d,s)}function bOe(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 Ym(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 kOe=Se((Kgr,EOe)=>{"use strict";var hS=OBe(),ZNt=Zm(),XNt=eK(),YNt=GBe(),KNt=qY(),oK=J_(),JNt=jBe(),hx=cOe(),$Nt=eS(),QNt=dOe(),e7t=nK(),t7t=mOe(),r7t=xOe(),i7t=Uh(),n7t=AOe(),a7t=j2(),o7t=rK(),SOe=o7t.nextPow2,MOe=new KNt,_9=!1;document.body&&(g9=document.body.appendChild(document.createElement("div")),g9.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(g9).fontStretch&&(_9=!0),document.body.removeChild(g9));var g9,Tc=function(t){s7t(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=YNt(t),this.shader=MOe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||XNt({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(),MOe.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(QNt(t)?t:{})};Tc.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:` +`),La;if(jr&&(La=ds(kn),jr[La]))return jr[La].apply(null,Ta);var Es=Function.apply(null,Mn.concat(kn));return jr&&(jr[La]=Es),Es.apply(null,Ta)}return{global:is,link:ha,block:Io,proc:Ps,scope:Vs,cond:Hs,compile:qs}}var In="xyzw".split(""),Vn=5121,Rn=1,Hn=2,Gn=0,pn=1,Lo=2,us=3,Bs=4,Js=5,ol=6,Cl="dither",ul="blend.enable",Gl="blend.color",Vl="blend.equation",Fl="blend.func",ga="depth.enable",ko="depth.func",zs="depth.range",Fo="depth.mask",Ys="colorMask",Gs="cull.enable",Us="cull.face",Sl="frontFace",_l="lineWidth",kl="polygonOffset.enable",cl="polygonOffset.offset",xl="sample.alpha",Uo="sample.enable",_s="sample.coverage",Bl="stencil.enable",Il="stencil.mask",Dl="stencil.func",oe="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",le="profile",Ne="framebuffer",$e="vert",pt="frag",zt="elements",Yt="primitive",Jt="count",yr="offset",Ir="instances",ce="vao",Ae="Width",qe="Height",Ve=Ne+Ae,ot=Ne+qe,Ke=ee+Ae,ft=ee+qe,qt="drawingBuffer",Xt=qt+Ae,$t=qt+qe,dr=[Fl,Vl,Dl,oe,w,_s,ee,Q,cl],Mr=34962,$r=34963,ii=2884,pi=3042,Yi=3024,wn=2960,Tn=2929,ua=3089,oo=32823,el=32926,ys=32928,il=5126,$l=35664,pl=35665,Hl=35666,Ll=5124,Ql=35667,ku=35668,Jl=35669,Kl=35670,Hu=35671,tf=35672,Ku=35673,Gu=35674,Wu=35675,sf=35676,gf=35678,nf=35680,af=4,X=1028,se=1029,Le=2304,We=2305,Ye=32775,it=32776,Nt=519,mt=7680,er=0,_r=1,wr=32774,ni=513,Wr=36160,Ci=36064,Ji={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ai={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ti={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Bi={cw:Le,ccw:We};function en(Gt){return Array.isArray(Gt)||fr(Gt)||Ot(Gt)}function Wi(Gt){return Gt.sort(function(jr,_i){return jr===ee?-1:_i===ee?1:jr<_i?-1:1})}function bi(Gt,jr,_i,Mn){this.thisDep=Gt,this.contextDep=jr,this.propDep=_i,this.append=Mn}function ao(Gt){return Gt&&!(Gt.thisDep||Gt.contextDep||Gt.propDep)}function yo(Gt){return new bi(!1,!1,!1,Gt)}function Ko(Gt,jr){var _i=Gt.type;if(_i===Gn){var Mn=Gt.data.length;return new bi(!0,Mn>=1,Mn>=2,jr)}else if(_i===Bs){var Ta=Gt.data;return new bi(Ta.thisDep,Ta.contextDep,Ta.propDep,jr)}else{if(_i===Js)return new bi(!1,!1,!1,jr);if(_i===ol){for(var fa=!1,ha=!1,Io=!1,Vs=0;Vs=1&&(ha=!0),is>=2&&(Io=!0)}else Hs.type===Bs&&(fa=fa||Hs.data.thisDep,ha=ha||Hs.data.contextDep,Io=Io||Hs.data.propDep)}return new bi(fa,ha,Io,jr)}else return new bi(_i===us,_i===Lo,_i===pn,jr)}}var Ms=new bi(!1,!1,!1,function(){});function vl(Gt,jr,_i,Mn,Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn){var La=Hs.Record,Es={add:32774,subtract:32778,"reverse subtract":32779};_i.ext_blend_minmax&&(Es.min=Ye,Es.max=it);var Ws=_i.angle_instanced_arrays,Qo=_i.webgl_draw_buffers,bl=_i.oes_vertex_array_object,nl={dirty:!0,profile:kn.profile},ru={},hs=[],Ho={},ql={};function yl(It){return It.replace(".","_")}function tl(It,Qt,ar){var mr=yl(It);hs.push(It),ru[mr]=nl[mr]=!!ar,Ho[mr]=Qt}function js(It,Qt,ar){var mr=yl(It);hs.push(It),Array.isArray(ar)?(nl[mr]=ar.slice(),ru[mr]=ar.slice()):nl[mr]=ru[mr]=ar,ql[mr]=Qt}function zl(It){return!!isNaN(It)}tl(Cl,Yi),tl(ul,pi),js(Gl,"blendColor",[0,0,0,0]),js(Vl,"blendEquationSeparate",[wr,wr]),js(Fl,"blendFuncSeparate",[_r,er,_r,er]),tl(ga,Tn,!0),js(ko,"depthFunc",ni),js(zs,"depthRange",[0,1]),js(Fo,"depthMask",!0),js(Ys,Ys,[!0,!0,!0,!0]),tl(Gs,ii),js(Us,"cullFace",se),js(Sl,Sl,We),js(_l,_l,1),tl(kl,oo),js(cl,"polygonOffset",[0,0]),tl(xl,el),tl(Uo,ys),js(_s,"sampleCoverage",[1,!1]),tl(Bl,wn),js(Il,"stencilMask",-1),js(Dl,"stencilFunc",[Nt,0,-1]),js(oe,"stencilOpSeparate",[X,mt,mt,mt]),js(w,"stencilOpSeparate",[se,mt,mt,mt]),tl(B,ua),js(Q,"scissor",[0,0,Gt.drawingBufferWidth,Gt.drawingBufferHeight]),js(ee,ee,[0,0,Gt.drawingBufferWidth,Gt.drawingBufferHeight]);var lu={gl:Gt,context:Ps,strings:jr,next:ru,current:nl,draw:su,elements:fa,buffer:Ta,shader:is,attributes:Hs.state,vao:Hs,uniforms:Vs,framebuffer:Io,extensions:_i,timer:qs,isBufferArgs:en},bu={primTypes:Yr,compareFuncs:ai,blendFuncs:Ji,blendEquations:Es,stencilOps:Ti,glTypes:si,orientationType:Bi};Qo&&(bu.backBuffer=[se],bu.drawBuffer=M(Mn.maxDrawbuffers,function(It){return It===0?[0]:M(It,function(Qt){return Ci+Qt})}));var al=0;function jl(){var It=gn({cache:Do}),Qt=It.link,ar=It.global;It.id=al++,It.batchId="0";var mr=Qt(lu),Pr=It.shared={props:"a0"};Object.keys(lu).forEach(function(Kr){Pr[Kr]=ar.def(mr,".",Kr)});var Dr=It.next={},Xr=It.current={};Object.keys(ql).forEach(function(Kr){Array.isArray(nl[Kr])&&(Dr[Kr]=ar.def(Pr.next,".",Kr),Xr[Kr]=ar.def(Pr.current,".",Kr))});var Gr=It.constants={};Object.keys(bu).forEach(function(Kr){Gr[Kr]=ar.def(JSON.stringify(bu[Kr]))}),It.invoke=function(Kr,Cr){switch(Cr.type){case Gn:var yi=["this",Pr.context,Pr.props,It.batchId];return Kr.def(Qt(Cr.data),".call(",yi.slice(0,Math.max(Cr.data.length+1,4)),")");case pn:return Kr.def(Pr.props,Cr.data);case Lo:return Kr.def(Pr.context,Cr.data);case us:return Kr.def("this",Cr.data);case Bs:return Cr.data.append(It,Kr),Cr.data.ref;case Js:return Cr.data.toString();case ol:return Cr.data.map(function(qi){return It.invoke(Kr,qi)})}},It.attribCache={};var Fr={};return It.scopeAttrib=function(Kr){var Cr=jr.id(Kr);if(Cr in Fr)return Fr[Cr];var yi=Hs.scope[Cr];yi||(yi=Hs.scope[Cr]=new La);var qi=Fr[Cr]=Qt(yi);return qi},It}function mu(It){var Qt=It.static,ar=It.dynamic,mr;if(le in Qt){var Pr=!!Qt[le];mr=yo(function(Xr,Gr){return Pr}),mr.enable=Pr}else if(le in ar){var Dr=ar[le];mr=Ko(Dr,function(Xr,Gr){return Xr.invoke(Gr,Dr)})}return mr}function Tu(It,Qt){var ar=It.static,mr=It.dynamic;if(Ne in ar){var Pr=ar[Ne];return Pr?(Pr=Io.getFramebuffer(Pr),yo(function(Xr,Gr){var Fr=Xr.link(Pr),Kr=Xr.shared;Gr.set(Kr.framebuffer,".next",Fr);var Cr=Kr.context;return Gr.set(Cr,"."+Ve,Fr+".width"),Gr.set(Cr,"."+ot,Fr+".height"),Fr})):yo(function(Xr,Gr){var Fr=Xr.shared;Gr.set(Fr.framebuffer,".next","null");var Kr=Fr.context;return Gr.set(Kr,"."+Ve,Kr+"."+Xt),Gr.set(Kr,"."+ot,Kr+"."+$t),"null"})}else if(Ne in mr){var Dr=mr[Ne];return Ko(Dr,function(Xr,Gr){var Fr=Xr.invoke(Gr,Dr),Kr=Xr.shared,Cr=Kr.framebuffer,yi=Gr.def(Cr,".getFramebuffer(",Fr,")");Gr.set(Cr,".next",yi);var qi=Kr.context;return Gr.set(qi,"."+Ve,yi+"?"+yi+".width:"+qi+"."+Xt),Gr.set(qi,"."+ot,yi+"?"+yi+".height:"+qi+"."+$t),yi})}else return null}function Ru(It,Qt,ar){var mr=It.static,Pr=It.dynamic;function Dr(Fr){if(Fr in mr){var Kr=mr[Fr],Cr=!0,yi=Kr.x|0,qi=Kr.y|0,vn,Qa;return"width"in Kr?vn=Kr.width|0:Cr=!1,"height"in Kr?Qa=Kr.height|0:Cr=!1,new bi(!Cr&&Qt&&Qt.thisDep,!Cr&&Qt&&Qt.contextDep,!Cr&&Qt&&Qt.propDep,function(sl,Os){var eo=sl.shared.context,fs=vn;"width"in Kr||(fs=Os.def(eo,".",Ve,"-",yi));var es=Qa;return"height"in Kr||(es=Os.def(eo,".",ot,"-",qi)),[yi,qi,fs,es]})}else if(Fr in Pr){var ra=Pr[Fr],mo=Ko(ra,function(sl,Os){var eo=sl.invoke(Os,ra),fs=sl.shared.context,es=Os.def(eo,".x|0"),$s=Os.def(eo,".y|0"),Ml=Os.def('"width" in ',eo,"?",eo,".width|0:","(",fs,".",Ve,"-",es,")"),Mu=Os.def('"height" in ',eo,"?",eo,".height|0:","(",fs,".",ot,"-",$s,")");return[es,$s,Ml,Mu]});return Qt&&(mo.thisDep=mo.thisDep||Qt.thisDep,mo.contextDep=mo.contextDep||Qt.contextDep,mo.propDep=mo.propDep||Qt.propDep),mo}else return Qt?new bi(Qt.thisDep,Qt.contextDep,Qt.propDep,function(sl,Os){var eo=sl.shared.context;return[0,0,Os.def(eo,".",Ve),Os.def(eo,".",ot)]}):null}var Xr=Dr(ee);if(Xr){var Gr=Xr;Xr=new bi(Xr.thisDep,Xr.contextDep,Xr.propDep,function(Fr,Kr){var Cr=Gr.append(Fr,Kr),yi=Fr.shared.context;return Kr.set(yi,"."+Ke,Cr[2]),Kr.set(yi,"."+ft,Cr[3]),Cr})}return{viewport:Xr,scissor_box:Dr(Q)}}function Rf(It,Qt){var ar=It.static,mr=typeof ar[pt]=="string"&&typeof ar[$e]=="string";if(mr){if(Object.keys(Qt.dynamic).length>0)return null;var Pr=Qt.static,Dr=Object.keys(Pr);if(Dr.length>0&&typeof Pr[Dr[0]]=="number"){for(var Xr=[],Gr=0;Gr"+es+"?"+Cr+".constant["+es+"]:0;"}).join(""),"}}else{","if(",vn,"(",Cr,".buffer)){",sl,"=",Qa,".createStream(",Mr,",",Cr,".buffer);","}else{",sl,"=",Qa,".getBuffer(",Cr,".buffer);","}",Os,'="type" in ',Cr,"?",qi.glTypes,"[",Cr,".type]:",sl,".dtype;",ra.normalized,"=!!",Cr,".normalized;");function eo(fs){Kr(ra[fs],"=",Cr,".",fs,"|0;")}return eo("size"),eo("offset"),eo("stride"),eo("divisor"),Kr("}}"),Kr.exit("if(",ra.isStream,"){",Qa,".destroyStream(",sl,");","}"),ra}Pr[Dr]=Ko(Xr,Gr)}),Pr}function vc(It){var Qt=It.static,ar=It.dynamic,mr={};return Object.keys(Qt).forEach(function(Pr){var Dr=Qt[Pr];mr[Pr]=yo(function(Xr,Gr){return typeof Dr=="number"||typeof Dr=="boolean"?""+Dr:Xr.link(Dr)})}),Object.keys(ar).forEach(function(Pr){var Dr=ar[Pr];mr[Pr]=Ko(Dr,function(Xr,Gr){return Xr.invoke(Gr,Dr)})}),mr}function qc(It,Qt,ar,mr,Pr){var Dr=It.static,Xr=It.dynamic,Gr=Rf(It,Qt),Fr=Tu(It,Pr),Kr=Ru(It,Fr,Pr),Cr=rf(It,Pr),yi=Lc(It,Pr),qi=Cc(It,Pr,Gr);function vn(eo){var fs=Kr[eo];fs&&(yi[eo]=fs)}vn(ee),vn(yl(Q));var Qa=Object.keys(yi).length>0,ra={framebuffer:Fr,draw:Cr,shader:qi,state:yi,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ra.profile=mu(It,Pr),ra.uniforms=wf(ar,Pr),ra.drawVAO=ra.scopeVAO=Cr.vao,!ra.drawVAO&&qi.program&&!Gr&&_i.angle_instanced_arrays&&Cr.static.elements){var mo=!0,sl=qi.program.attributes.map(function(eo){var fs=Qt.static[eo];return mo=mo&&!!fs,fs});if(mo&&sl.length>0){var Os=Hs.getVAO(Hs.createVAO({attributes:sl,elements:Cr.static.elements}));ra.drawVAO=new bi(null,null,null,function(eo,fs){return eo.link(Os)}),ra.useVAO=!0}}return Gr?ra.useVAO=!0:ra.attributes=pc(Qt,Pr),ra.context=vc(mr,Pr),ra}function If(It,Qt,ar){var mr=It.shared,Pr=mr.context,Dr=It.scope();Object.keys(ar).forEach(function(Xr){Qt.save(Pr,"."+Xr);var Gr=ar[Xr],Fr=Gr.append(It,Qt);Array.isArray(Fr)?Dr(Pr,".",Xr,"=[",Fr.join(),"];"):Dr(Pr,".",Xr,"=",Fr,";")}),Qt(Dr)}function Ac(It,Qt,ar,mr){var Pr=It.shared,Dr=Pr.gl,Xr=Pr.framebuffer,Gr;Qo&&(Gr=Qt.def(Pr.extensions,".webgl_draw_buffers"));var Fr=It.constants,Kr=Fr.drawBuffer,Cr=Fr.backBuffer,yi;ar?yi=ar.append(It,Qt):yi=Qt.def(Xr,".next"),mr||Qt("if(",yi,"!==",Xr,".cur){"),Qt("if(",yi,"){",Dr,".bindFramebuffer(",Wr,",",yi,".framebuffer);"),Qo&&Qt(Gr,".drawBuffersWEBGL(",Kr,"[",yi,".colorAttachments.length]);"),Qt("}else{",Dr,".bindFramebuffer(",Wr,",null);"),Qo&&Qt(Gr,".drawBuffersWEBGL(",Cr,");"),Qt("}",Xr,".cur=",yi,";"),mr||Qt("}")}function zc(It,Qt,ar){var mr=It.shared,Pr=mr.gl,Dr=It.current,Xr=It.next,Gr=mr.current,Fr=mr.next,Kr=It.cond(Gr,".dirty");hs.forEach(function(Cr){var yi=yl(Cr);if(!(yi in ar.state)){var qi,vn;if(yi in Xr){qi=Xr[yi],vn=Dr[yi];var Qa=M(nl[yi].length,function(mo){return Kr.def(qi,"[",mo,"]")});Kr(It.cond(Qa.map(function(mo,sl){return mo+"!=="+vn+"["+sl+"]"}).join("||")).then(Pr,".",ql[yi],"(",Qa,");",Qa.map(function(mo,sl){return vn+"["+sl+"]="+mo}).join(";"),";"))}else{qi=Kr.def(Fr,".",yi);var ra=It.cond(qi,"!==",Gr,".",yi);Kr(ra),yi in Ho?ra(It.cond(qi).then(Pr,".enable(",Ho[yi],");").else(Pr,".disable(",Ho[yi],");"),Gr,".",yi,"=",qi,";"):ra(Pr,".",ql[yi],"(",qi,");",Gr,".",yi,"=",qi,";")}}}),Object.keys(ar.state).length===0&&Kr(Gr,".dirty=false;"),Qt(Kr)}function Vu(It,Qt,ar,mr){var Pr=It.shared,Dr=It.current,Xr=Pr.current,Gr=Pr.gl,Fr;Wi(Object.keys(ar)).forEach(function(Kr){var Cr=ar[Kr];if(!(mr&&!mr(Cr))){var yi=Cr.append(It,Qt);if(Ho[Kr]){var qi=Ho[Kr];ao(Cr)?(Fr=It.link(yi,{stable:!0}),Qt(It.cond(Fr).then(Gr,".enable(",qi,");").else(Gr,".disable(",qi,");")),Qt(Xr,".",Kr,"=",Fr,";")):(Qt(It.cond(yi).then(Gr,".enable(",qi,");").else(Gr,".disable(",qi,");")),Qt(Xr,".",Kr,"=",yi,";"))}else if(Gi(yi)){var vn=Dr[Kr];Qt(Gr,".",ql[Kr],"(",yi,");",yi.map(function(Qa,ra){return vn+"["+ra+"]="+Qa}).join(";"),";")}else ao(Cr)?(Fr=It.link(yi,{stable:!0}),Qt(Gr,".",ql[Kr],"(",Fr,");",Xr,".",Kr,"=",Fr,";")):Qt(Gr,".",ql[Kr],"(",yi,");",Xr,".",Kr,"=",yi,";")}})}function Bc(It,Qt){Ws&&(It.instancing=Qt.def(It.shared.extensions,".angle_instanced_arrays"))}function Ou(It,Qt,ar,mr,Pr){var Dr=It.shared,Xr=It.stats,Gr=Dr.current,Fr=Dr.timer,Kr=ar.profile;function Cr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var yi,qi;function vn(eo){yi=Qt.def(),eo(yi,"=",Cr(),";"),typeof Pr=="string"?eo(Xr,".count+=",Pr,";"):eo(Xr,".count++;"),qs&&(mr?(qi=Qt.def(),eo(qi,"=",Fr,".getNumPendingQueries();")):eo(Fr,".beginQuery(",Xr,");"))}function Qa(eo){eo(Xr,".cpuTime+=",Cr(),"-",yi,";"),qs&&(mr?eo(Fr,".pushScopeStats(",qi,",",Fr,".getNumPendingQueries(),",Xr,");"):eo(Fr,".endQuery();"))}function ra(eo){var fs=Qt.def(Gr,".profile");Qt(Gr,".profile=",eo,";"),Qt.exit(Gr,".profile=",fs,";")}var mo;if(Kr){if(ao(Kr)){Kr.enable?(vn(Qt),Qa(Qt.exit),ra("true")):ra("false");return}mo=Kr.append(It,Qt),ra(mo)}else mo=Qt.def(Gr,".profile");var sl=It.block();vn(sl),Qt("if(",mo,"){",sl,"}");var Os=It.block();Qa(Os),Qt.exit("if(",mo,"){",Os,"}")}function Y(It,Qt,ar,mr,Pr){var Dr=It.shared;function Xr(Fr){switch(Fr){case $l:case Ql:case Hu:return 2;case pl:case ku:case tf:return 3;case Hl:case Jl:case Ku:return 4;default:return 1}}function Gr(Fr,Kr,Cr){var yi=Dr.gl,qi=Qt.def(Fr,".location"),vn=Qt.def(Dr.attributes,"[",qi,"]"),Qa=Cr.state,ra=Cr.buffer,mo=[Cr.x,Cr.y,Cr.z,Cr.w],sl=["buffer","normalized","offset","stride"];function Os(){Qt("if(!",vn,".buffer){",yi,".enableVertexAttribArray(",qi,");}");var fs=Cr.type,es;if(Cr.size?es=Qt.def(Cr.size,"||",Kr):es=Kr,Qt("if(",vn,".type!==",fs,"||",vn,".size!==",es,"||",sl.map(function(Ml){return vn+"."+Ml+"!=="+Cr[Ml]}).join("||"),"){",yi,".bindBuffer(",Mr,",",ra,".buffer);",yi,".vertexAttribPointer(",[qi,es,fs,Cr.normalized,Cr.stride,Cr.offset],");",vn,".type=",fs,";",vn,".size=",es,";",sl.map(function(Ml){return vn+"."+Ml+"="+Cr[Ml]+";"}).join(""),"}"),Ws){var $s=Cr.divisor;Qt("if(",vn,".divisor!==",$s,"){",It.instancing,".vertexAttribDivisorANGLE(",[qi,$s],");",vn,".divisor=",$s,";}")}}function eo(){Qt("if(",vn,".buffer){",yi,".disableVertexAttribArray(",qi,");",vn,".buffer=null;","}if(",In.map(function(fs,es){return vn+"."+fs+"!=="+mo[es]}).join("||"),"){",yi,".vertexAttrib4f(",qi,",",mo,");",In.map(function(fs,es){return vn+"."+fs+"="+mo[es]+";"}).join(""),"}")}Qa===Rn?Os():Qa===Hn?eo():(Qt("if(",Qa,"===",Rn,"){"),Os(),Qt("}else{"),eo(),Qt("}"))}mr.forEach(function(Fr){var Kr=Fr.name,Cr=ar.attributes[Kr],yi;if(Cr){if(!Pr(Cr))return;yi=Cr.append(It,Qt)}else{if(!Pr(Ms))return;var qi=It.scopeAttrib(Kr);yi={},Object.keys(new La).forEach(function(vn){yi[vn]=Qt.def(qi,".",vn)})}Gr(It.link(Fr),Xr(Fr.info.type),yi)})}function R(It,Qt,ar,mr,Pr,Dr){for(var Xr=It.shared,Gr=Xr.gl,Fr,Kr=0;Kr1){for(var Au=[],$u=[],du=0;du>1)",ra],");")}function $s(){ar(mo,".drawArraysInstancedANGLE(",[qi,vn,Qa,ra],");")}Cr&&Cr!=="null"?Os?es():(ar("if(",Cr,"){"),es(),ar("}else{"),$s(),ar("}")):$s()}function fs(){function es(){ar(Dr+".drawElements("+[qi,Qa,sl,vn+"<<(("+sl+"-"+Vn+")>>1)"]+");")}function $s(){ar(Dr+".drawArrays("+[qi,vn,Qa]+");")}Cr&&Cr!=="null"?Os?es():(ar("if(",Cr,"){"),es(),ar("}else{"),$s(),ar("}")):$s()}Ws&&(typeof ra!="number"||ra>=0)?typeof ra=="string"?(ar("if(",ra,">0){"),eo(),ar("}else if(",ra,"<0){"),fs(),ar("}")):eo():fs()}function N(It,Qt,ar,mr,Pr){var Dr=jl(),Xr=Dr.proc("body",Pr);return Ws&&(Dr.instancing=Xr.def(Dr.shared.extensions,".angle_instanced_arrays")),It(Dr,Xr,ar,mr),Dr.compile().body}function $(It,Qt,ar,mr){Bc(It,Qt),ar.useVAO?ar.drawVAO?Qt(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Qt),");"):Qt(It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"):(Qt(It.shared.vao,".setVAO(null);"),Y(It,Qt,ar,mr.attributes,function(){return!0})),R(It,Qt,ar,mr.uniforms,function(){return!0},!1),K(It,Qt,Qt,ar)}function we(It,Qt){var ar=It.proc("draw",1);Bc(It,ar),If(It,ar,Qt.context),Ac(It,ar,Qt.framebuffer),zc(It,ar,Qt),Vu(It,ar,Qt.state),Ou(It,ar,Qt,!1,!0);var mr=Qt.shader.progVar.append(It,ar);if(ar(It.shared.gl,".useProgram(",mr,".program);"),Qt.shader.program)$(It,ar,Qt,Qt.shader.program);else{ar(It.shared.vao,".setVAO(null);");var Pr=It.global.def("{}"),Dr=ar.def(mr,".id"),Xr=ar.def(Pr,"[",Dr,"]");ar(It.cond(Xr).then(Xr,".call(this,a0);").else(Xr,"=",Pr,"[",Dr,"]=",It.link(function(Gr){return N($,It,Qt,Gr,1)}),"(",mr,");",Xr,".call(this,a0);"))}Object.keys(Qt.state).length>0&&ar(It.shared.current,".dirty=true;"),It.shared.vao&&ar(It.shared.vao,".setVAO(null);")}function ge(It,Qt,ar,mr){It.batchId="a1",Bc(It,Qt);function Pr(){return!0}Y(It,Qt,ar,mr.attributes,Pr),R(It,Qt,ar,mr.uniforms,Pr,!1),K(It,Qt,Qt,ar)}function Ue(It,Qt,ar,mr){Bc(It,Qt);var Pr=ar.contextDep,Dr=Qt.def(),Xr="a0",Gr="a1",Fr=Qt.def();It.shared.props=Fr,It.batchId=Dr;var Kr=It.scope(),Cr=It.scope();Qt(Kr.entry,"for(",Dr,"=0;",Dr,"<",Gr,";++",Dr,"){",Fr,"=",Xr,"[",Dr,"];",Cr,"}",Kr.exit);function yi(sl){return sl.contextDep&&Pr||sl.propDep}function qi(sl){return!yi(sl)}if(ar.needsContext&&If(It,Cr,ar.context),ar.needsFramebuffer&&Ac(It,Cr,ar.framebuffer),Vu(It,Cr,ar.state,yi),ar.profile&&yi(ar.profile)&&Ou(It,Cr,ar,!1,!0),mr)ar.useVAO?ar.drawVAO?yi(ar.drawVAO)?Cr(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Cr),");"):Kr(It.shared.vao,".setVAO(",ar.drawVAO.append(It,Kr),");"):Kr(It.shared.vao,".setVAO(",It.shared.vao,".targetVAO);"):(Kr(It.shared.vao,".setVAO(null);"),Y(It,Kr,ar,mr.attributes,qi),Y(It,Cr,ar,mr.attributes,yi)),R(It,Kr,ar,mr.uniforms,qi,!1),R(It,Cr,ar,mr.uniforms,yi,!0),K(It,Kr,Cr,ar);else{var vn=It.global.def("{}"),Qa=ar.shader.progVar.append(It,Cr),ra=Cr.def(Qa,".id"),mo=Cr.def(vn,"[",ra,"]");Cr(It.shared.gl,".useProgram(",Qa,".program);","if(!",mo,"){",mo,"=",vn,"[",ra,"]=",It.link(function(sl){return N(ge,It,ar,sl,2)}),"(",Qa,");}",mo,".call(this,a0[",Dr,"],",Dr,");")}}function dt(It,Qt){var ar=It.proc("batch",2);It.batchId="0",Bc(It,ar);var mr=!1,Pr=!0;Object.keys(Qt.context).forEach(function(vn){mr=mr||Qt.context[vn].propDep}),mr||(If(It,ar,Qt.context),Pr=!1);var Dr=Qt.framebuffer,Xr=!1;Dr?(Dr.propDep?mr=Xr=!0:Dr.contextDep&&mr&&(Xr=!0),Xr||Ac(It,ar,Dr)):Ac(It,ar,null),Qt.state.viewport&&Qt.state.viewport.propDep&&(mr=!0);function Gr(vn){return vn.contextDep&&mr||vn.propDep}zc(It,ar,Qt),Vu(It,ar,Qt.state,function(vn){return!Gr(vn)}),(!Qt.profile||!Gr(Qt.profile))&&Ou(It,ar,Qt,!1,"a1"),Qt.contextDep=mr,Qt.needsContext=Pr,Qt.needsFramebuffer=Xr;var Fr=Qt.shader.progVar;if(Fr.contextDep&&mr||Fr.propDep)Ue(It,ar,Qt,null);else{var Kr=Fr.append(It,ar);if(ar(It.shared.gl,".useProgram(",Kr,".program);"),Qt.shader.program)Ue(It,ar,Qt,Qt.shader.program);else{ar(It.shared.vao,".setVAO(null);");var Cr=It.global.def("{}"),yi=ar.def(Kr,".id"),qi=ar.def(Cr,"[",yi,"]");ar(It.cond(qi).then(qi,".call(this,a0,a1);").else(qi,"=",Cr,"[",yi,"]=",It.link(function(vn){return N(Ue,It,Qt,vn,2)}),"(",Kr,");",qi,".call(this,a0,a1);"))}}Object.keys(Qt.state).length>0&&ar(It.shared.current,".dirty=true;"),It.shared.vao&&ar(It.shared.vao,".setVAO(null);")}function Rt(It,Qt){var ar=It.proc("scope",3);It.batchId="a2";var mr=It.shared,Pr=mr.current;if(If(It,ar,Qt.context),Qt.framebuffer&&Qt.framebuffer.append(It,ar),Wi(Object.keys(Qt.state)).forEach(function(Gr){var Fr=Qt.state[Gr],Kr=Fr.append(It,ar);Gi(Kr)?Kr.forEach(function(Cr,yi){zl(Cr)?ar.set(It.next[Gr],"["+yi+"]",Cr):ar.set(It.next[Gr],"["+yi+"]",It.link(Cr,{stable:!0}))}):ao(Fr)?ar.set(mr.next,"."+Gr,It.link(Kr,{stable:!0})):ar.set(mr.next,"."+Gr,Kr)}),Ou(It,ar,Qt,!0,!0),[zt,yr,Jt,Ir,Yt].forEach(function(Gr){var Fr=Qt.draw[Gr];if(Fr){var Kr=Fr.append(It,ar);zl(Kr)?ar.set(mr.draw,"."+Gr,Kr):ar.set(mr.draw,"."+Gr,It.link(Kr),{stable:!0})}}),Object.keys(Qt.uniforms).forEach(function(Gr){var Fr=Qt.uniforms[Gr].append(It,ar);Array.isArray(Fr)&&(Fr="["+Fr.map(function(Kr){return zl(Kr)?Kr:It.link(Kr,{stable:!0})})+"]"),ar.set(mr.uniforms,"["+It.link(jr.id(Gr),{stable:!0})+"]",Fr)}),Object.keys(Qt.attributes).forEach(function(Gr){var Fr=Qt.attributes[Gr].append(It,ar),Kr=It.scopeAttrib(Gr);Object.keys(new La).forEach(function(Cr){ar.set(Kr,"."+Cr,Fr[Cr])})}),Qt.scopeVAO){var Dr=Qt.scopeVAO.append(It,ar);zl(Dr)?ar.set(mr.vao,".targetVAO",Dr):ar.set(mr.vao,".targetVAO",It.link(Dr,{stable:!0}))}function Xr(Gr){var Fr=Qt.shader[Gr];if(Fr){var Kr=Fr.append(It,ar);zl(Kr)?ar.set(mr.shader,"."+Gr,Kr):ar.set(mr.shader,"."+Gr,It.link(Kr,{stable:!0}))}}Xr($e),Xr(pt),Object.keys(Qt.state).length>0&&(ar(Pr,".dirty=true;"),ar.exit(Pr,".dirty=true;")),ar("a1(",It.shared.context,",a0,",It.batchId,");")}function ur(It){if(!(typeof It!="object"||Gi(It))){for(var Qt=Object.keys(It),ar=0;ar=0;--N){var $=lu[N];$&&$(Do,null,0)}_i.flush(),is&&is.update()}function Ru(){!mu&&lu.length>0&&(mu=d.next(Tu))}function Rf(){mu&&(d.cancel(Tu),mu=null)}function Cc(N){N.preventDefault(),Ta=!0,Rf(),bu.forEach(function($){$()})}function rf(N){_i.getError(),Ta=!1,fa.restore(),ru.restore(),Ws.restore(),hs.restore(),Ho.restore(),ql.restore(),bl.restore(),is&&is.restore(),yl.procs.refresh(),Ru(),al.forEach(function($){$()})}zl&&(zl.addEventListener(pu,Cc,!1),zl.addEventListener(xu,rf,!1));function Lc(){lu.length=0,Rf(),zl&&(zl.removeEventListener(pu,Cc),zl.removeEventListener(xu,rf)),ru.clear(),ql.clear(),Ho.clear(),bl.clear(),hs.clear(),Qo.clear(),Ws.clear(),is&&is.clear(),jl.forEach(function(N){N()})}function wf(N){function $(Dr){var Xr=e({},Dr);delete Xr.uniforms,delete Xr.attributes,delete Xr.context,delete Xr.vao,"stencil"in Xr&&Xr.stencil.op&&(Xr.stencil.opBack=Xr.stencil.opFront=Xr.stencil.op,delete Xr.stencil.op);function Gr(Fr){if(Fr in Xr){var Kr=Xr[Fr];delete Xr[Fr],Object.keys(Kr).forEach(function(Cr){Xr[Fr+"."+Cr]=Kr[Cr]})}}return Gr("blend"),Gr("depth"),Gr("cull"),Gr("stencil"),Gr("polygonOffset"),Gr("scissor"),Gr("sample"),"vao"in Dr&&(Xr.vao=Dr.vao),Xr}function we(Dr,Xr){var Gr={},Fr={};return Object.keys(Dr).forEach(function(Kr){var Cr=Dr[Kr];if(h.isDynamic(Cr)){Fr[Kr]=h.unbox(Cr,Kr);return}else if(Xr&&Array.isArray(Cr)){for(var yi=0;yi0)return It.call(this,mr(Dr|0),Dr|0)}else if(Array.isArray(Dr)){if(Dr.length)return It.call(this,Dr,Dr.length)}else return cr.call(this,Dr)}return e(Pr,{stats:ur,destroy:function(){gr.destroy()}})}var pc=ql.setFBO=wf({framebuffer:h.define.call(null,of,"framebuffer")});function vc(N,$){var we=0;yl.procs.poll();var ge=$.color;ge&&(_i.clearColor(+ge[0]||0,+ge[1]||0,+ge[2]||0,+ge[3]||0),we|=qu),"depth"in $&&(_i.clearDepth(+$.depth),we|=Ju),"stencil"in $&&(_i.clearStencil($.stencil|0),we|=qo),_i.clear(we)}function qc(N){if("framebuffer"in N)if(N.framebuffer&&N.framebuffer_reglType==="framebufferCube")for(var $=0;$<6;++$)pc(e({framebuffer:N.framebuffer.faces[$]},N),vc);else pc(N,vc);else vc(null,N)}function If(N){lu.push(N);function $(){var we=hf(lu,N);function ge(){var Ue=hf(lu,ge);lu[Ue]=lu[lu.length-1],lu.length-=1,lu.length<=0&&Rf()}lu[we]=ge}return Ru(),{cancel:$}}function Ac(){var N=js.viewport,$=js.scissor_box;N[0]=N[1]=$[0]=$[1]=0,Do.viewportWidth=Do.framebufferWidth=Do.drawingBufferWidth=N[2]=$[2]=_i.drawingBufferWidth,Do.viewportHeight=Do.framebufferHeight=Do.drawingBufferHeight=N[3]=$[3]=_i.drawingBufferHeight}function zc(){Do.tick+=1,Do.time=Bc(),Ac(),yl.procs.poll()}function Vu(){hs.refresh(),Ac(),yl.procs.refresh(),is&&is.update()}function Bc(){return(p()-su)/1e3}Vu();function Ou(N,$){var we;switch(N){case"frame":return If($);case"lost":we=bu;break;case"restore":we=al;break;case"destroy":we=jl;break;default:}return we.push($),{cancel:function(){for(var ge=0;ge=0},read:tl,destroy:Lc,_gl:_i,_refresh:Vu,poll:function(){zc(),is&&is.update()},now:Bc,stats:Io,getCachedCode:Y,preloadCachedCode:R});return jr.onDone(null,K),K}return dc})});var GBe=Se((Ngr,HBe)=>{"use strict";var zNt=Zm();HBe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},UBe(t)?t={container:t}:PNt(t)?t={container:t}:INt(t)?t={gl:t}:t=zNt(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}UBe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=VBe(),t.container.appendChild(t.canvas),NBe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=VBe(),t.container.appendChild(t.canvas),NBe(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 NBe(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 UBe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function PNt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function INt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function VBe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var jBe=Se((Ugr,WBe)=>{"use strict";var DNt=JY(),RNt=[32,126];WBe.exports=FNt;function FNt(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||RNt;if(n&&typeof n!="string"&&(n=DNt(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],u=0;s<=a[1];s++)o[u++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var l=r.getContext("2d");l.fillStyle="#000",l.fillRect(0,0,r.width,r.height),l.font=n,l.textAlign="center",l.textBaseline="middle",l.fillStyle="#fff";for(var f=i[0]/2,c=i[1]/2,s=0;st[0]-i[0]/2&&(f=i[0]/2,c+=i[1]);return r}});var rK=Se(Hh=>{"use strict";"use restrict";var tK=32;Hh.INT_BITS=tK;Hh.INT_MAX=2147483647;Hh.INT_MIN=-1<0)-(e<0)};Hh.abs=function(e){var t=e>>tK-1;return(e^t)-t};Hh.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};Hh.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};Hh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function ZBe(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}Hh.countTrailingZeros=ZBe;Hh.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};Hh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Hh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var gk=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|gk[e>>>16&255]<<8|gk[e>>>24&255]};Hh.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};Hh.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};Hh.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};Hh.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};Hh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>ZBe(e)+1}});var KBe=Se((Hgr,YBe)=>{"use strict";function XBe(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 qNt(e|0,t);break;case"object":if(typeof e.length=="number")return XBe(e,t,0);break}return[]}YBe.exports=BNt});var cOe=Se(jf=>{"use strict";var fx=rK(),Mp=KBe(),JBe=u2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Mp([32,0]),UINT16:Mp([32,0]),UINT32:Mp([32,0]),BIGUINT64:Mp([32,0]),INT8:Mp([32,0]),INT16:Mp([32,0]),INT32:Mp([32,0]),BIGINT64:Mp([32,0]),FLOAT:Mp([32,0]),DOUBLE:Mp([32,0]),DATA:Mp([32,0]),UINT8C:Mp([32,0]),BUFFER:Mp([32,0])});var ONt=typeof Uint8ClampedArray!="undefined",NNt=typeof BigUint64Array!="undefined",UNt=typeof BigInt64Array!="undefined",sd=window.__TYPEDARRAY_POOL;sd.UINT8C||(sd.UINT8C=Mp([32,0]));sd.BIGUINT64||(sd.BIGUINT64=Mp([32,0]));sd.BIGINT64||(sd.BIGINT64=Mp([32,0]));sd.BUFFER||(sd.BUFFER=Mp([32,0]));var d9=sd.DATA,p9=sd.BUFFER;jf.free=function(t){if(JBe.isBuffer(t))p9[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;d9[n].push(t)}};function $Be(e){if(e){var t=e.length||e.byteLength,r=fx.log2(t);d9[r].push(e)}}function VNt(e){$Be(e.buffer)}jf.freeUint8=jf.freeUint16=jf.freeUint32=jf.freeBigUint64=jf.freeInt8=jf.freeInt16=jf.freeInt32=jf.freeBigInt64=jf.freeFloat32=jf.freeFloat=jf.freeFloat64=jf.freeDouble=jf.freeUint8Clamped=jf.freeDataView=VNt;jf.freeArrayBuffer=$Be;jf.freeBuffer=function(t){p9[fx.log2(t.length)].push(t)};jf.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Ov(t);switch(r){case"uint8":return iK(t);case"uint16":return QBe(t);case"uint32":return eOe(t);case"int8":return tOe(t);case"int16":return rOe(t);case"int32":return iOe(t);case"float":case"float32":return nOe(t);case"double":case"float64":return aOe(t);case"uint8_clamped":return oOe(t);case"bigint64":return lOe(t);case"biguint64":return sOe(t);case"buffer":return fOe(t);case"data":case"dataview":return uOe(t);default:return null}return null};function Ov(t){var t=fx.nextPow2(t),r=fx.log2(t),n=d9[r];return n.length>0?n.pop():new ArrayBuffer(t)}jf.mallocArrayBuffer=Ov;function iK(e){return new Uint8Array(Ov(e),0,e)}jf.mallocUint8=iK;function QBe(e){return new Uint16Array(Ov(2*e),0,e)}jf.mallocUint16=QBe;function eOe(e){return new Uint32Array(Ov(4*e),0,e)}jf.mallocUint32=eOe;function tOe(e){return new Int8Array(Ov(e),0,e)}jf.mallocInt8=tOe;function rOe(e){return new Int16Array(Ov(2*e),0,e)}jf.mallocInt16=rOe;function iOe(e){return new Int32Array(Ov(4*e),0,e)}jf.mallocInt32=iOe;function nOe(e){return new Float32Array(Ov(4*e),0,e)}jf.mallocFloat32=jf.mallocFloat=nOe;function aOe(e){return new Float64Array(Ov(8*e),0,e)}jf.mallocFloat64=jf.mallocDouble=aOe;function oOe(e){return ONt?new Uint8ClampedArray(Ov(e),0,e):iK(e)}jf.mallocUint8Clamped=oOe;function sOe(e){return NNt?new BigUint64Array(Ov(8*e),0,e):null}jf.mallocBigUint64=sOe;function lOe(e){return UNt?new BigInt64Array(Ov(8*e),0,e):null}jf.mallocBigInt64=lOe;function uOe(e){return new DataView(Ov(e),0,e)}jf.mallocDataView=uOe;function fOe(e){e=fx.nextPow2(e);var t=fx.log2(e),r=p9[t];return r.length>0?r.pop():new JBe(e)}jf.mallocBuffer=fOe;jf.clearCache=function(){for(var t=0;t<32;++t)sd.UINT8[t].length=0,sd.UINT16[t].length=0,sd.UINT32[t].length=0,sd.INT8[t].length=0,sd.INT16[t].length=0,sd.INT32[t].length=0,sd.FLOAT[t].length=0,sd.DOUBLE[t].length=0,sd.BIGUINT64[t].length=0,sd.BIGINT64[t].length=0,sd.UINT8C[t].length=0,d9[t].length=0,p9[t].length=0}});var dOe=Se((Wgr,hOe)=>{"use strict";var HNt=Object.prototype.toString;hOe.exports=function(e){var t;return HNt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var nK=Se((jgr,pOe)=>{pOe.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 mOe=Se((Zgr,yOe)=>{"use strict";var GNt=nK();yOe.exports=vOe;var _k=96;function aK(e,t){var r=GNt(getComputedStyle(e).getPropertyValue(t));return r[0]*vOe(r[1],e)}function WNt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=aK(r,"font-size")/128;return t.removeChild(r),n}function vOe(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 WNt(e,t);case"em":return aK(t,"font-size");case"rem":return aK(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 _k;case"cm":return _k/2.54;case"mm":return _k/25.4;case"pt":return _k/72;case"pc":return _k/6}return 1}});var xOe=Se((Xgr,_Oe)=>{"use strict";_Oe.exports=m9;var jNt=m9.canvas=document.createElement("canvas"),v9=jNt.getContext("2d"),gOe=y9([32,126]);m9.createPairs=y9;m9.ascii=gOe;function m9(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=y9(t):Array.isArray(t)?n=t:(t.o?n=y9(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=gOe),v9.font=i+"px "+e;for(var o=0;oi*a){var f=(l-u)/i;r[s]=f*1e3}}return r}function y9(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";TOe.exports=cx;cx.canvas=document.createElement("canvas");cx.cache={};function cx(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(cx.cache[r]&&n<=cx.cache[r].em)return bOe(cx.cache[r],s);var u=t.canvas||cx.canvas,l=u.getContext("2d"),f={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"},c=Math.ceil(n*1.5);u.height=c,u.width=c*.5,l.font=o;var h="H",d={top:0};l.clearRect(0,0,c,c),l.textBaseline="top",l.fillStyle="black",l.fillText(h,0,0);var p=Ym(l.getImageData(0,0,c,c));l.clearRect(0,0,c,c),l.textBaseline="bottom",l.fillText(h,0,c);var x=Ym(l.getImageData(0,0,c,c));d.lineHeight=d.bottom=c-x+p,l.clearRect(0,0,c,c),l.textBaseline="alphabetic",l.fillText(h,0,c);var b=Ym(l.getImageData(0,0,c,c)),y=c-b-1+p;d.baseline=d.alphabetic=y,l.clearRect(0,0,c,c),l.textBaseline="middle",l.fillText(h,0,c*.5);var k=Ym(l.getImageData(0,0,c,c));d.median=d.middle=c-k-1+p-c*.5,l.clearRect(0,0,c,c),l.textBaseline="hanging",l.fillText(h,0,c*.5);var E=Ym(l.getImageData(0,0,c,c));d.hanging=c-E-1+p-c*.5,l.clearRect(0,0,c,c),l.textBaseline="ideographic",l.fillText(h,0,c);var A=Ym(l.getImageData(0,0,c,c));if(d.ideographic=c-A-1+p,f.upper&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.upper,0,0),d.upper=Ym(l.getImageData(0,0,c,c)),d.capHeight=d.baseline-d.upper),f.lower&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.lower,0,0),d.lower=Ym(l.getImageData(0,0,c,c)),d.xHeight=d.baseline-d.lower),f.tittle&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.tittle,0,0),d.tittle=Ym(l.getImageData(0,0,c,c))),f.ascent&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.ascent,0,0),d.ascent=Ym(l.getImageData(0,0,c,c))),f.descent&&(l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.descent,0,0),d.descent=wOe(l.getImageData(0,0,c,c))),f.overshoot){l.clearRect(0,0,c,c),l.textBaseline="top",l.fillText(f.overshoot,0,0);var L=wOe(l.getImageData(0,0,c,c));d.overshoot=L-y}for(var _ in d)d[_]/=n;return d.em=n,cx.cache[r]=d,bOe(d,s)}function bOe(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 Ym(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 kOe=Se((Kgr,EOe)=>{"use strict";var hS=OBe(),ZNt=Zm(),XNt=eK(),YNt=GBe(),KNt=qY(),oK=J_(),JNt=jBe(),hx=cOe(),$Nt=eS(),QNt=dOe(),e7t=nK(),t7t=mOe(),r7t=xOe(),i7t=Uh(),n7t=AOe(),a7t=j2(),o7t=rK(),SOe=o7t.nextPow2,MOe=new KNt,_9=!1;document.body&&(g9=document.body.appendChild(document.createElement("div")),g9.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(g9).fontStretch&&(_9=!0),document.body.removeChild(g9));var g9,Tc=function(t){s7t(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=YNt(t),this.shader=MOe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||XNt({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(),MOe.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(QNt(t)?t:{})};Tc.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; @@ -2705,14 +2705,14 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),n={};return{regl:t,draw:r,atlas:n}};Tc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=ZNt(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=$Nt(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=a7t(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=Tc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Ce,he){if(typeof Ce=="string")try{Ce=hS.parse(Ce)}catch(Ze){Ce=hS.parse(Tc.baseFontSize+"px "+Ce)}else{var te=Ce.style,ke=Ce.weight,Ee=Ce.stretch,Me=Ce.variant;Ce=hS.parse(hS.stringify(Ce)),te&&(Ce.style=te),ke&&(Ce.weight=ke),Ee&&(Ce.stretch=Ee),Me&&(Ce.variant=Me)}var Oe=hS.stringify({size:Tc.baseFontSize,family:Ce.family,stretch:_9?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style}),Re=e7t(Ce.size),me=Math.round(Re[0]*t7t(Re[1]));if(me!==r.fontSize[he]&&(i=!0,r.fontSize[he]=me),(!r.font[he]||Oe!=r.font[he].baseString)&&(n=!0,r.font[he]=Tc.fonts[Oe],!r.font[he])){var Be=Ce.family.join(", "),fe=[Ce.style];Ce.style!=Ce.variant&&fe.push(Ce.variant),Ce.variant!=Ce.weight&&fe.push(Ce.weight),_9&&Ce.weight!=Ce.stretch&&fe.push(Ce.stretch),r.font[he]={baseString:Oe,family:Be,weight:Ce.weight,stretch:Ce.stretch,style:Ce.style,variant:Ce.variant,width:{},kerning:{},metrics:n7t(Be,{origin:"top",fontSize:Tc.baseFontSize,fontStyle:fe.join(" ")})},Tc.fonts[Oe]=r.font[he]}}),(n||i)&&this.font.forEach(function(Ce,he){var te=hS.stringify({size:r.fontSize[he],family:Ce.family,stretch:_9?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style});if(r.fontAtlas[he]=r.shader.atlas[te],!r.fontAtlas[he]){var ke=Ce.metrics;r.shader.atlas[te]=r.fontAtlas[he]={fontString:te,step:Math.ceil(r.fontSize[he]*ke.bottom*.5)*2,em:r.fontSize[he],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 l=!t.position[0].length,f=hx.mallocFloat(this.count*2),c=0,h=0;c1?r.align[he]:r.align[0]:r.align;if(typeof te=="number")return te;switch(te){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,he){var te=(r.font[he]||r.font[0]).metrics,ke=0;return ke+=te.bottom*.5,typeof Ce=="number"?ke+=Ce-te.baseline:ke+=-te[Ce],ke*=-1,ke})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=oK(t.color,"uint8");else{var H;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var j=t.color.length;H=hx.mallocUint8(j);for(var G=(t.color.subarray||t.color.slice).bind(t.color),O=0;O4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ne){var be=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(be);for(var ze=0;ze1?this.counts[ze]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ze]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ze*4,ze*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ze]:this.opacity,baseline:this.baselineOffset[ze]!=null?this.baselineOffset[ze]:this.baselineOffset[0],align:this.align?this.alignOffset[ze]!=null?this.alignOffset[ze]:this.alignOffset[0]:0,atlas:this.fontAtlas[ze]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ze*2,ze*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=[]}};Tc.prototype.destroy=function(){};Tc.prototype.kerning=!0;Tc.prototype.position={constant:new Float32Array(2)};Tc.prototype.translate=null;Tc.prototype.scale=null;Tc.prototype.font=null;Tc.prototype.text="";Tc.prototype.positionOffset=[0,0];Tc.prototype.opacity=1;Tc.prototype.color=new Uint8Array([0,0,0,255]);Tc.prototype.alignOffset=[0,0];Tc.maxAtlasSize=1024;Tc.atlasCanvas=document.createElement("canvas");Tc.atlasContext=Tc.atlasCanvas.getContext("2d",{alpha:!1});Tc.baseFontSize=64;Tc.fonts={};function s7t(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}EOe.exports=Tc});var x9=Se((Jgr,COe)=>{"use strict";var l7t=SZ(),u7t=eK();COe.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=u7t({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||l7t({container:i._glcontainer.node()}),a}});var uK=Se((lK,DOe)=>{"use strict";var LOe=uY(),zOe=NY(),f7t=xBe(),POe=kOe(),sK=Zr(),c7t=Sy().selectMode,h7t=x9(),d7t=ec(),p7t=wU(),v7t=aY().styleTextSelection,IOe={};function y7t(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,u=i.b*n,l=i.r*n,f=i.t*n,c=i.w*n,h=i.h*n;return[s+t.domain[0]*c,u+r.domain[0]*h,a-l-(1-t.domain[1])*c,o-f-(1-r.domain[1])*h]}var lK=DOe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,u,l;if(a){var f=h7t(t,["ANGLE_instanced_arrays","OES_element_index_uint"],IOe);if(!f){a.init();return}var c=a.count,h=i._glcanvas.data()[0].regl;if(p7t(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({}),a.error2d===!0&&(a.error2d=f7t(h)),a.line2d===!0&&(a.line2d=zOe(h)),a.scatter2d===!0&&(a.scatter2d=LOe(h)),a.fill2d===!0&&(a.fill2d=zOe(h)),a.glText===!0)for(a.glText=new Array(c),u=0;ua.glText.length){var d=c-a.glText.length;for(u=0;une&&(isNaN(re[be])||isNaN(re[be+1]));)be-=2;W.positions=re.slice(ne,be+2)}return W}),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=sK.repeat(null,c),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(W,re){var ne=n[re];if(!(!W||!ne||!ne[0]||!ne[0].trace)){var be=ne[0],ze=be.trace,Ce=be.t,he=a.lineOptions[re],te,ke,Ee=[];ze._ownfill&&Ee.push(re),ze._nexttrace&&Ee.push(re+1),Ee.length&&(a.fillOrder[re]=Ee);var Me=[],Oe=he&&he.positions||Ce.positions,Re,me;if(ze.fill==="tozeroy"){for(Re=0;ReRe&&isNaN(Oe[me+1]);)me-=2;Oe[Re+1]!==0&&(Me=[Oe[Re],0]),Me=Me.concat(Oe.slice(Re,me+2)),Oe[me+1]!==0&&(Me=Me.concat([Oe[me],0]))}else if(ze.fill==="tozerox"){for(Re=0;ReRe&&isNaN(Oe[me]);)me-=2;Oe[Re]!==0&&(Me=[0,Oe[Re+1]]),Me=Me.concat(Oe.slice(Re,me+2)),Oe[me]!==0&&(Me=Me.concat([0,Oe[me+1]]))}else if(ze.fill==="toself"||ze.fill==="tonext"){for(Me=[],te=0,W.splitNull=!0,ke=0;ke-1;for(u=0;u{ROe.exports=function(t,r,n){"use strict";var i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir;return i=t.gl,a=t.context,o=t.strings,s=t.next,u=t.current,l=t.draw,f=t.elements,c=t.buffer,h=t.shader,d=t.attributes,p=t.vao,x=t.uniforms,b=t.framebuffer,y=t.extensions,E=t.timer,k=t.isBufferArgs,A=s.blend_color,L=u.blend_color,_=s.blend_equation,C=u.blend_equation,M=s.blend_func,v=u.blend_func,z=s.depth_range,T=u.depth_range,F=s.colorMask,q=u.colorMask,U=s.polygonOffset_offset,H=u.polygonOffset_offset,j=s.sample_coverage,G=u.sample_coverage,O=s.stencil_func,W=u.stencil_func,re=s.stencil_opFront,ne=u.stencil_opFront,be=s.stencil_opBack,ze=u.stencil_opBack,Ce=s.scissor_box,he=u.scissor_box,te=s.viewport,ke=u.viewport,Ee={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Me={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Oe={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Re={add:32774,subtract:32778,"reverse subtract":32779},me={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Be={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},fe={cw:2304,ccw:2305},Ze=s.blend_color,et=u.blend_color,gt=s.blend_equation,Pt=u.blend_equation,Qe=s.blend_func,Xe=u.blend_func,Tt=s.depth_range,xt=u.depth_range,_t=s.colorMask,Ct=u.colorMask,jt=s.polygonOffset_offset,At=u.polygonOffset_offset,Te=s.sample_coverage,nt=u.sample_coverage,ut=s.stencil_func,ct=u.stencil_func,rt=s.stencil_opFront,je=u.stencil_opFront,tt=s.stencil_opBack,Je=u.stencil_opBack,Mt=s.scissor_box,Vt=u.scissor_box,Kt=s.viewport,ir=u.viewport,{poll:function(){var fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si;u.dirty=!1,Ot=s.dither,De=s.blend_enable,_e=s.depth_enable,Fe=s.cull_enable,Pe=s.polygonOffset_enable,Ie=s.sample_alpha,lt=s.sample_enable,ye=s.stencil_enable,ue=s.scissor_enable,de=s.depth_func,ht=u.depth_func,Et=s.depth_mask,St=u.depth_mask,Zt=s.cull_face,qr=u.cull_face,Lr=s.frontFace,vr=u.frontFace,Er=s.lineWidth,si=u.lineWidth,Ei=s.stencil_mask,Si=u.stencil_mask,fr=b.next,fr!==b.cur&&(fr?i.bindFramebuffer(36160,fr.framebuffer):i.bindFramebuffer(36160,null),b.cur=fr),Ot!==u.dither&&(Ot?i.enable(3024):i.disable(3024),u.dither=Ot),De!==u.blend_enable&&(De?i.enable(3042):i.disable(3042),u.blend_enable=De),_e!==u.depth_enable&&(_e?i.enable(2929):i.disable(2929),u.depth_enable=_e),Fe!==u.cull_enable&&(Fe?i.enable(2884):i.disable(2884),u.cull_enable=Fe),Pe!==u.polygonOffset_enable&&(Pe?i.enable(32823):i.disable(32823),u.polygonOffset_enable=Pe),Ie!==u.sample_alpha&&(Ie?i.enable(32926):i.disable(32926),u.sample_alpha=Ie),lt!==u.sample_enable&&(lt?i.enable(32928):i.disable(32928),u.sample_enable=lt),ye!==u.stencil_enable&&(ye?i.enable(2960):i.disable(2960),u.stencil_enable=ye),ue!==u.scissor_enable&&(ue?i.enable(3089):i.disable(3089),u.scissor_enable=ue),(Ze[0]!==et[0]||Ze[1]!==et[1]||Ze[2]!==et[2]||Ze[3]!==et[3])&&(i.blendColor(Ze[0],Ze[1],Ze[2],Ze[3]),et[0]=Ze[0],et[1]=Ze[1],et[2]=Ze[2],et[3]=Ze[3]),(gt[0]!==Pt[0]||gt[1]!==Pt[1])&&(i.blendEquationSeparate(gt[0],gt[1]),Pt[0]=gt[0],Pt[1]=gt[1]),(Qe[0]!==Xe[0]||Qe[1]!==Xe[1]||Qe[2]!==Xe[2]||Qe[3]!==Xe[3])&&(i.blendFuncSeparate(Qe[0],Qe[1],Qe[2],Qe[3]),Xe[0]=Qe[0],Xe[1]=Qe[1],Xe[2]=Qe[2],Xe[3]=Qe[3]),de!==ht&&(i.depthFunc(de),u.depth_func=de),(Tt[0]!==xt[0]||Tt[1]!==xt[1])&&(i.depthRange(Tt[0],Tt[1]),xt[0]=Tt[0],xt[1]=Tt[1]),Et!==St&&(i.depthMask(Et),u.depth_mask=Et),(_t[0]!==Ct[0]||_t[1]!==Ct[1]||_t[2]!==Ct[2]||_t[3]!==Ct[3])&&(i.colorMask(_t[0],_t[1],_t[2],_t[3]),Ct[0]=_t[0],Ct[1]=_t[1],Ct[2]=_t[2],Ct[3]=_t[3]),Zt!==qr&&(i.cullFace(Zt),u.cull_face=Zt),Lr!==vr&&(i.frontFace(Lr),u.frontFace=Lr),Er!==si&&(i.lineWidth(Er),u.lineWidth=Er),(jt[0]!==At[0]||jt[1]!==At[1])&&(i.polygonOffset(jt[0],jt[1]),At[0]=jt[0],At[1]=jt[1]),(Te[0]!==nt[0]||Te[1]!==nt[1])&&(i.sampleCoverage(Te[0],Te[1]),nt[0]=Te[0],nt[1]=Te[1]),Ei!==Si&&(i.stencilMask(Ei),u.stencil_mask=Ei),(ut[0]!==ct[0]||ut[1]!==ct[1]||ut[2]!==ct[2])&&(i.stencilFunc(ut[0],ut[1],ut[2]),ct[0]=ut[0],ct[1]=ut[1],ct[2]=ut[2]),(rt[0]!==je[0]||rt[1]!==je[1]||rt[2]!==je[2]||rt[3]!==je[3])&&(i.stencilOpSeparate(rt[0],rt[1],rt[2],rt[3]),je[0]=rt[0],je[1]=rt[1],je[2]=rt[2],je[3]=rt[3]),(tt[0]!==Je[0]||tt[1]!==Je[1]||tt[2]!==Je[2]||tt[3]!==Je[3])&&(i.stencilOpSeparate(tt[0],tt[1],tt[2],tt[3]),Je[0]=tt[0],Je[1]=tt[1],Je[2]=tt[2],Je[3]=tt[3]),(Mt[0]!==Vt[0]||Mt[1]!==Vt[1]||Mt[2]!==Vt[2]||Mt[3]!==Vt[3])&&(i.scissor(Mt[0],Mt[1],Mt[2],Mt[3]),Vt[0]=Mt[0],Vt[1]=Mt[1],Vt[2]=Mt[2],Vt[3]=Mt[3]),(Kt[0]!==ir[0]||Kt[1]!==ir[1]||Kt[2]!==ir[2]||Kt[3]!==ir[3])&&(i.viewport(Kt[0],Kt[1],Kt[2],Kt[3]),ir[0]=Kt[0],ir[1]=Kt[1],ir[2]=Kt[2],ir[3]=Kt[3])},refresh:function(){var fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi;u.dirty=!1,_e=s.dither,Fe=s.blend_enable,Pe=s.depth_enable,Ie=s.cull_enable,lt=s.polygonOffset_enable,ye=s.sample_alpha,ue=s.sample_enable,de=s.stencil_enable,ht=s.scissor_enable,Et=s.depth_func,St=u.depth_func,Zt=s.depth_mask,qr=u.depth_mask,Lr=s.cull_face,vr=u.cull_face,Er=s.frontFace,si=u.frontFace,Ei=s.lineWidth,Si=u.lineWidth,xi=s.stencil_mask,Hi=u.stencil_mask,fr=b.next,fr?i.bindFramebuffer(36160,fr.framebuffer):i.bindFramebuffer(36160,null),b.cur=fr,Ot=d,De=0;for(var Jr=0;Jr{FOe.exports=function(t,r,n,i,a,o,s,u){"use strict";var l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt;return l=t.gl,f=t.context,c=t.strings,h=t.next,d=t.current,p=t.draw,x=t.elements,b=t.buffer,y=t.shader,E=t.attributes,k=t.vao,A=t.uniforms,L=t.framebuffer,_=t.extensions,C=t.timer,M=t.isBufferArgs,v=h.blend_color,z=d.blend_color,T=h.blend_equation,F=d.blend_equation,q=h.blend_func,U=d.blend_func,H=h.depth_range,j=d.depth_range,G=h.colorMask,O=d.colorMask,W=h.polygonOffset_offset,re=d.polygonOffset_offset,ne=h.sample_coverage,be=d.sample_coverage,ze=h.stencil_func,Ce=d.stencil_func,he=h.stencil_opFront,te=d.stencil_opFront,ke=h.stencil_opBack,Ee=d.stencil_opBack,Me=h.scissor_box,Oe=d.scissor_box,Re=h.viewport,me=d.viewport,Be={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ze={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},et={add:32774,subtract:32778,"reverse subtract":32779},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Qe={cw:2304,ccw:2305},Xe={},Tt={},{draw:function(xt){var _t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De;if(_t=_.angle_instanced_arrays,Ct=xt.framebuffer,jt=L.getFramebuffer(Ct),At=L.next,L.next=jt,Te=f.framebufferWidth,f.framebufferWidth=jt?jt.width:f.drawingBufferWidth,nt=f.framebufferHeight,f.framebufferHeight=jt?jt.height:f.drawingBufferHeight,jt!==L.cur&&(jt?l.bindFramebuffer(36160,jt.framebuffer):l.bindFramebuffer(36160,null),L.cur=jt),d.dirty){var _e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi;_e=h.dither,_e!==d.dither&&(_e?l.enable(3024):l.disable(3024),d.dither=_e),Fe=h.blend_enable,Fe!==d.blend_enable&&(Fe?l.enable(3042):l.disable(3042),d.blend_enable=Fe),Pe=v[0],Ie=v[1],lt=v[2],ye=v[3],(Pe!==z[0]||Ie!==z[1]||lt!==z[2]||ye!==z[3])&&(l.blendColor(Pe,Ie,lt,ye),z[0]=Pe,z[1]=Ie,z[2]=lt,z[3]=ye),ue=T[0],de=T[1],(ue!==F[0]||de!==F[1])&&(l.blendEquationSeparate(ue,de),F[0]=ue,F[1]=de),ht=q[0],Et=q[1],St=q[2],Zt=q[3],(ht!==U[0]||Et!==U[1]||St!==U[2]||Zt!==U[3])&&(l.blendFuncSeparate(ht,Et,St,Zt),U[0]=ht,U[1]=Et,U[2]=St,U[3]=Zt),qr=h.depth_enable,qr!==d.depth_enable&&(qr?l.enable(2929):l.disable(2929),d.depth_enable=qr),Lr=h.depth_func,Lr!==d.depth_func&&(l.depthFunc(Lr),d.depth_func=Lr),vr=H[0],Er=H[1],(vr!==j[0]||Er!==j[1])&&(l.depthRange(vr,Er),j[0]=vr,j[1]=Er),si=h.depth_mask,si!==d.depth_mask&&(l.depthMask(si),d.depth_mask=si),Ei=G[0],Si=G[1],xi=G[2],Hi=G[3],(Ei!==O[0]||Si!==O[1]||xi!==O[2]||Hi!==O[3])&&(l.colorMask(Ei,Si,xi,Hi),O[0]=Ei,O[1]=Si,O[2]=xi,O[3]=Hi),Jr=h.cull_enable,Jr!==d.cull_enable&&(Jr?l.enable(2884):l.disable(2884),d.cull_enable=Jr),ci=h.cull_face,ci!==d.cull_face&&(l.cullFace(ci),d.cull_face=ci),Di=h.frontFace,Di!==d.frontFace&&(l.frontFace(Di),d.frontFace=Di),Lt=h.lineWidth,Lt!==d.lineWidth&&(l.lineWidth(Lt),d.lineWidth=Lt),vt=h.polygonOffset_enable,vt!==d.polygonOffset_enable&&(vt?l.enable(32823):l.disable(32823),d.polygonOffset_enable=vt),Dt=W[0],Bt=W[1],(Dt!==re[0]||Bt!==re[1])&&(l.polygonOffset(Dt,Bt),re[0]=Dt,re[1]=Bt),sr=h.sample_alpha,sr!==d.sample_alpha&&(sr?l.enable(32926):l.disable(32926),d.sample_alpha=sr),br=h.sample_enable,br!==d.sample_enable&&(br?l.enable(32928):l.disable(32928),d.sample_enable=br),zr=ne[0],Tr=ne[1],(zr!==be[0]||Tr!==be[1])&&(l.sampleCoverage(zr,Tr),be[0]=zr,be[1]=Tr),Rr=h.stencil_enable,Rr!==d.stencil_enable&&(Rr?l.enable(2960):l.disable(2960),d.stencil_enable=Rr),Br=h.stencil_mask,Br!==d.stencil_mask&&(l.stencilMask(Br),d.stencil_mask=Br),oi=ze[0],vi=ze[1],Pi=ze[2],(oi!==Ce[0]||vi!==Ce[1]||Pi!==Ce[2])&&(l.stencilFunc(oi,vi,Pi),Ce[0]=oi,Ce[1]=vi,Ce[2]=Pi),Yr=he[0],Ni=he[1],Ur=he[2],ti=he[3],(Yr!==te[0]||Ni!==te[1]||Ur!==te[2]||ti!==te[3])&&(l.stencilOpSeparate(Yr,Ni,Ur,ti),te[0]=Yr,te[1]=Ni,te[2]=Ur,te[3]=ti),ki=ke[0],ji=ke[1],Vi=ke[2],zi=ke[3],(ki!==Ee[0]||ji!==Ee[1]||Vi!==Ee[2]||zi!==Ee[3])&&(l.stencilOpSeparate(ki,ji,Vi,zi),Ee[0]=ki,Ee[1]=ji,Ee[2]=Vi,Ee[3]=zi),Mi=h.scissor_enable,Mi!==d.scissor_enable&&(Mi?l.enable(3089):l.disable(3089),d.scissor_enable=Mi)}ut=f.framebufferWidth,ct=f.framebufferHeight,rt=f.viewportWidth,f.viewportWidth=ut,je=f.viewportHeight,f.viewportHeight=ct,l.viewport(0,0,ut,ct),me[0]=0,me[1]=0,me[2]=ut,me[3]=ct,tt=f.framebufferWidth,Je=f.framebufferHeight,l.scissor(0,0,tt,Je),Oe[0]=0,Oe[1]=0,Oe[2]=tt,Oe[3]=Je,Mt=d.profile,Mt&&(Vt=performance.now(),r.count++),Kt=y.frag,ir=y.vert,fr=y.program(ir,Kt),l.useProgram(fr.program),k.setVAO(null),Ot=fr.id,De=Xe[Ot],De?De.call(this,xt):(De=Xe[Ot]=n(fr),De.call(this,xt)),d.dirty=!0,k.setVAO(null),L.next=At,f.framebufferWidth=Te,f.framebufferHeight=nt,f.viewportWidth=rt,f.viewportHeight=je,Mt&&(r.cpuTime+=performance.now()-Vt)},scope:function(xt,_t,Ct){var jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie;jt=xt.framebuffer,At=L.getFramebuffer(jt),Te=L.next,L.next=At,nt=f.framebufferWidth,f.framebufferWidth=At?At.width:f.drawingBufferWidth,ut=f.framebufferHeight,f.framebufferHeight=At?At.height:f.drawingBufferHeight,ct=f.framebufferWidth,rt=f.framebufferHeight,je=f.viewportWidth,f.viewportWidth=ct,tt=f.viewportHeight,f.viewportHeight=rt,Je=Re[0],Re[0]=i,Mt=Re[1],Re[1]=a,Vt=Re[2],Re[2]=ct,Kt=Re[3],Re[3]=rt,ir=f.framebufferWidth,fr=f.framebufferHeight,Ot=Me[0],Me[0]=o,De=Me[1],Me[1]=s,_e=Me[2],Me[2]=ir,Fe=Me[3],Me[3]=fr,Pe=d.profile,Pe&&(Ie=performance.now(),r.count++),d.dirty=!0,_t(f,xt,Ct),L.next=Te,f.framebufferWidth=nt,f.framebufferHeight=ut,f.viewportWidth=je,f.viewportHeight=tt,Re[0]=Je,Re[1]=Mt,Re[2]=Vt,Re[3]=Kt,Me[0]=Ot,Me[1]=De,Me[2]=_e,Me[3]=Fe,Pe&&(r.cpuTime+=performance.now()-Ie),d.dirty=!0},batch:function(xt,_t){var Ct,jt,At,Te,nt,ut,ct,rt;if(Ct=_.angle_instanced_arrays,d.dirty){var je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi;je=h.dither,je!==d.dither&&(je?l.enable(3024):l.disable(3024),d.dither=je),tt=h.blend_enable,tt!==d.blend_enable&&(tt?l.enable(3042):l.disable(3042),d.blend_enable=tt),Je=v[0],Mt=v[1],Vt=v[2],Kt=v[3],(Je!==z[0]||Mt!==z[1]||Vt!==z[2]||Kt!==z[3])&&(l.blendColor(Je,Mt,Vt,Kt),z[0]=Je,z[1]=Mt,z[2]=Vt,z[3]=Kt),ir=T[0],fr=T[1],(ir!==F[0]||fr!==F[1])&&(l.blendEquationSeparate(ir,fr),F[0]=ir,F[1]=fr),Ot=q[0],De=q[1],_e=q[2],Fe=q[3],(Ot!==U[0]||De!==U[1]||_e!==U[2]||Fe!==U[3])&&(l.blendFuncSeparate(Ot,De,_e,Fe),U[0]=Ot,U[1]=De,U[2]=_e,U[3]=Fe),Pe=h.depth_enable,Pe!==d.depth_enable&&(Pe?l.enable(2929):l.disable(2929),d.depth_enable=Pe),Ie=h.depth_func,Ie!==d.depth_func&&(l.depthFunc(Ie),d.depth_func=Ie),lt=H[0],ye=H[1],(lt!==j[0]||ye!==j[1])&&(l.depthRange(lt,ye),j[0]=lt,j[1]=ye),ue=h.depth_mask,ue!==d.depth_mask&&(l.depthMask(ue),d.depth_mask=ue),de=G[0],ht=G[1],Et=G[2],St=G[3],(de!==O[0]||ht!==O[1]||Et!==O[2]||St!==O[3])&&(l.colorMask(de,ht,Et,St),O[0]=de,O[1]=ht,O[2]=Et,O[3]=St),Zt=h.cull_enable,Zt!==d.cull_enable&&(Zt?l.enable(2884):l.disable(2884),d.cull_enable=Zt),qr=h.cull_face,qr!==d.cull_face&&(l.cullFace(qr),d.cull_face=qr),Lr=h.frontFace,Lr!==d.frontFace&&(l.frontFace(Lr),d.frontFace=Lr),vr=h.lineWidth,vr!==d.lineWidth&&(l.lineWidth(vr),d.lineWidth=vr),Er=h.polygonOffset_enable,Er!==d.polygonOffset_enable&&(Er?l.enable(32823):l.disable(32823),d.polygonOffset_enable=Er),si=W[0],Ei=W[1],(si!==re[0]||Ei!==re[1])&&(l.polygonOffset(si,Ei),re[0]=si,re[1]=Ei),Si=h.sample_alpha,Si!==d.sample_alpha&&(Si?l.enable(32926):l.disable(32926),d.sample_alpha=Si),xi=h.sample_enable,xi!==d.sample_enable&&(xi?l.enable(32928):l.disable(32928),d.sample_enable=xi),Hi=ne[0],Jr=ne[1],(Hi!==be[0]||Jr!==be[1])&&(l.sampleCoverage(Hi,Jr),be[0]=Hi,be[1]=Jr),ci=h.stencil_enable,ci!==d.stencil_enable&&(ci?l.enable(2960):l.disable(2960),d.stencil_enable=ci),Di=h.stencil_mask,Di!==d.stencil_mask&&(l.stencilMask(Di),d.stencil_mask=Di),Lt=ze[0],vt=ze[1],Dt=ze[2],(Lt!==Ce[0]||vt!==Ce[1]||Dt!==Ce[2])&&(l.stencilFunc(Lt,vt,Dt),Ce[0]=Lt,Ce[1]=vt,Ce[2]=Dt),Bt=he[0],sr=he[1],br=he[2],zr=he[3],(Bt!==te[0]||sr!==te[1]||br!==te[2]||zr!==te[3])&&(l.stencilOpSeparate(Bt,sr,br,zr),te[0]=Bt,te[1]=sr,te[2]=br,te[3]=zr),Tr=ke[0],Rr=ke[1],Br=ke[2],oi=ke[3],(Tr!==Ee[0]||Rr!==Ee[1]||Br!==Ee[2]||oi!==Ee[3])&&(l.stencilOpSeparate(Tr,Rr,Br,oi),Ee[0]=Tr,Ee[1]=Rr,Ee[2]=Br,Ee[3]=oi),vi=h.scissor_enable,vi!==d.scissor_enable&&(vi?l.enable(3089):l.disable(3089),d.scissor_enable=vi)}jt=d.profile,jt&&(At=performance.now(),r.count+=_t),Te=y.frag,nt=y.vert,ut=y.program(nt,Te),l.useProgram(ut.program),k.setVAO(null),ct=ut.id,rt=Tt[ct],rt?rt.call(this,xt,_t):(rt=Tt[ct]=u(ut),rt.call(this,xt,_t)),d.dirty=!0,k.setVAO(null),jt&&(r.cpuTime+=performance.now()-At)}}}});var T9=Se((e1r,qOe)=>{qOe.exports=function(t,r,n,i){"use strict";var a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt;return a=t.gl,o=t.context,s=t.strings,u=t.next,l=t.current,f=t.draw,c=t.elements,h=t.buffer,d=t.shader,p=t.attributes,x=t.vao,b=t.uniforms,y=t.framebuffer,E=t.extensions,k=t.timer,A=t.isBufferArgs,L=u.blend_color,_=l.blend_color,C=u.blend_equation,M=l.blend_equation,v=u.blend_func,z=l.blend_func,T=u.depth_range,F=l.depth_range,q=u.colorMask,U=l.colorMask,H=u.polygonOffset_offset,j=l.polygonOffset_offset,G=u.sample_coverage,O=l.sample_coverage,W=u.stencil_func,re=l.stencil_func,ne=u.stencil_opFront,be=l.stencil_opFront,ze=u.stencil_opBack,Ce=l.stencil_opBack,he=u.scissor_box,te=l.scissor_box,ke=u.viewport,Ee=l.viewport,Me={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Oe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Re={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},me={add:32774,subtract:32778,"reverse subtract":32779},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ze={cw:2304,ccw:2305},et={},gt={},{draw:function(Pt){var Qe,Xe,Tt,xt,_t,Ct,jt,At,Te;if(Qe=E.angle_instanced_arrays,Xe=y.next,Xe!==y.cur&&(Xe?a.bindFramebuffer(36160,Xe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Xe),l.dirty){var nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur;nt=u.dither,nt!==l.dither&&(nt?a.enable(3024):a.disable(3024),l.dither=nt),ut=u.blend_enable,ut!==l.blend_enable&&(ut?a.enable(3042):a.disable(3042),l.blend_enable=ut),ct=L[0],rt=L[1],je=L[2],tt=L[3],(ct!==_[0]||rt!==_[1]||je!==_[2]||tt!==_[3])&&(a.blendColor(ct,rt,je,tt),_[0]=ct,_[1]=rt,_[2]=je,_[3]=tt),Je=C[0],Mt=C[1],(Je!==M[0]||Mt!==M[1])&&(a.blendEquationSeparate(Je,Mt),M[0]=Je,M[1]=Mt),Vt=v[0],Kt=v[1],ir=v[2],fr=v[3],(Vt!==z[0]||Kt!==z[1]||ir!==z[2]||fr!==z[3])&&(a.blendFuncSeparate(Vt,Kt,ir,fr),z[0]=Vt,z[1]=Kt,z[2]=ir,z[3]=fr),Ot=u.depth_enable,Ot!==l.depth_enable&&(Ot?a.enable(2929):a.disable(2929),l.depth_enable=Ot),De=u.depth_func,De!==l.depth_func&&(a.depthFunc(De),l.depth_func=De),_e=T[0],Fe=T[1],(_e!==F[0]||Fe!==F[1])&&(a.depthRange(_e,Fe),F[0]=_e,F[1]=Fe),Pe=u.depth_mask,Pe!==l.depth_mask&&(a.depthMask(Pe),l.depth_mask=Pe),Ie=q[0],lt=q[1],ye=q[2],ue=q[3],(Ie!==U[0]||lt!==U[1]||ye!==U[2]||ue!==U[3])&&(a.colorMask(Ie,lt,ye,ue),U[0]=Ie,U[1]=lt,U[2]=ye,U[3]=ue),de=u.cull_enable,de!==l.cull_enable&&(de?a.enable(2884):a.disable(2884),l.cull_enable=de),ht=u.cull_face,ht!==l.cull_face&&(a.cullFace(ht),l.cull_face=ht),Et=u.frontFace,Et!==l.frontFace&&(a.frontFace(Et),l.frontFace=Et),St=u.lineWidth,St!==l.lineWidth&&(a.lineWidth(St),l.lineWidth=St),Zt=u.polygonOffset_enable,Zt!==l.polygonOffset_enable&&(Zt?a.enable(32823):a.disable(32823),l.polygonOffset_enable=Zt),qr=H[0],Lr=H[1],(qr!==j[0]||Lr!==j[1])&&(a.polygonOffset(qr,Lr),j[0]=qr,j[1]=Lr),vr=u.sample_alpha,vr!==l.sample_alpha&&(vr?a.enable(32926):a.disable(32926),l.sample_alpha=vr),Er=u.sample_enable,Er!==l.sample_enable&&(Er?a.enable(32928):a.disable(32928),l.sample_enable=Er),si=G[0],Ei=G[1],(si!==O[0]||Ei!==O[1])&&(a.sampleCoverage(si,Ei),O[0]=si,O[1]=Ei),Si=u.stencil_enable,Si!==l.stencil_enable&&(Si?a.enable(2960):a.disable(2960),l.stencil_enable=Si),xi=u.stencil_mask,xi!==l.stencil_mask&&(a.stencilMask(xi),l.stencil_mask=xi),Hi=W[0],Jr=W[1],ci=W[2],(Hi!==re[0]||Jr!==re[1]||ci!==re[2])&&(a.stencilFunc(Hi,Jr,ci),re[0]=Hi,re[1]=Jr,re[2]=ci),Di=ne[0],Lt=ne[1],vt=ne[2],Dt=ne[3],(Di!==be[0]||Lt!==be[1]||vt!==be[2]||Dt!==be[3])&&(a.stencilOpSeparate(Di,Lt,vt,Dt),be[0]=Di,be[1]=Lt,be[2]=vt,be[3]=Dt),Bt=ze[0],sr=ze[1],br=ze[2],zr=ze[3],(Bt!==Ce[0]||sr!==Ce[1]||br!==Ce[2]||zr!==Ce[3])&&(a.stencilOpSeparate(Bt,sr,br,zr),Ce[0]=Bt,Ce[1]=sr,Ce[2]=br,Ce[3]=zr),Tr=u.scissor_enable,Tr!==l.scissor_enable&&(Tr?a.enable(3089):a.disable(3089),l.scissor_enable=Tr),Rr=he[0],Br=he[1],oi=he[2],vi=he[3],(Rr!==te[0]||Br!==te[1]||oi!==te[2]||vi!==te[3])&&(a.scissor(Rr,Br,oi,vi),te[0]=Rr,te[1]=Br,te[2]=oi,te[3]=vi),Pi=ke[0],Yr=ke[1],Ni=ke[2],Ur=ke[3],(Pi!==Ee[0]||Yr!==Ee[1]||Ni!==Ee[2]||Ur!==Ee[3])&&(a.viewport(Pi,Yr,Ni,Ur),Ee[0]=Pi,Ee[1]=Yr,Ee[2]=Ni,Ee[3]=Ur),l.dirty=!1}Tt=l.profile,Tt&&(xt=performance.now(),r.count++),_t=d.frag,Ct=d.vert,jt=d.program(Ct,_t),a.useProgram(jt.program),x.setVAO(null),At=jt.id,Te=et[At],Te?Te.call(this,Pt):(Te=et[At]=n(jt),Te.call(this,Pt)),x.setVAO(null),Tt&&(r.cpuTime+=performance.now()-xt)},scope:function(Pt,Qe,Xe){var Tt,xt;Tt=l.profile,Tt&&(xt=performance.now(),r.count++),Qe(o,Pt,Xe),Tt&&(r.cpuTime+=performance.now()-xt)},batch:function(Pt,Qe){var Xe,Tt,xt,_t,Ct,jt,At,Te,nt;if(Xe=E.angle_instanced_arrays,Tt=y.next,Tt!==y.cur&&(Tt?a.bindFramebuffer(36160,Tt.framebuffer):a.bindFramebuffer(36160,null),y.cur=Tt),l.dirty){var ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti;ut=u.dither,ut!==l.dither&&(ut?a.enable(3024):a.disable(3024),l.dither=ut),ct=u.blend_enable,ct!==l.blend_enable&&(ct?a.enable(3042):a.disable(3042),l.blend_enable=ct),rt=L[0],je=L[1],tt=L[2],Je=L[3],(rt!==_[0]||je!==_[1]||tt!==_[2]||Je!==_[3])&&(a.blendColor(rt,je,tt,Je),_[0]=rt,_[1]=je,_[2]=tt,_[3]=Je),Mt=C[0],Vt=C[1],(Mt!==M[0]||Vt!==M[1])&&(a.blendEquationSeparate(Mt,Vt),M[0]=Mt,M[1]=Vt),Kt=v[0],ir=v[1],fr=v[2],Ot=v[3],(Kt!==z[0]||ir!==z[1]||fr!==z[2]||Ot!==z[3])&&(a.blendFuncSeparate(Kt,ir,fr,Ot),z[0]=Kt,z[1]=ir,z[2]=fr,z[3]=Ot),De=u.depth_enable,De!==l.depth_enable&&(De?a.enable(2929):a.disable(2929),l.depth_enable=De),_e=u.depth_func,_e!==l.depth_func&&(a.depthFunc(_e),l.depth_func=_e),Fe=T[0],Pe=T[1],(Fe!==F[0]||Pe!==F[1])&&(a.depthRange(Fe,Pe),F[0]=Fe,F[1]=Pe),Ie=u.depth_mask,Ie!==l.depth_mask&&(a.depthMask(Ie),l.depth_mask=Ie),lt=q[0],ye=q[1],ue=q[2],de=q[3],(lt!==U[0]||ye!==U[1]||ue!==U[2]||de!==U[3])&&(a.colorMask(lt,ye,ue,de),U[0]=lt,U[1]=ye,U[2]=ue,U[3]=de),ht=u.cull_enable,ht!==l.cull_enable&&(ht?a.enable(2884):a.disable(2884),l.cull_enable=ht),Et=u.cull_face,Et!==l.cull_face&&(a.cullFace(Et),l.cull_face=Et),St=u.frontFace,St!==l.frontFace&&(a.frontFace(St),l.frontFace=St),Zt=u.lineWidth,Zt!==l.lineWidth&&(a.lineWidth(Zt),l.lineWidth=Zt),qr=u.polygonOffset_enable,qr!==l.polygonOffset_enable&&(qr?a.enable(32823):a.disable(32823),l.polygonOffset_enable=qr),Lr=H[0],vr=H[1],(Lr!==j[0]||vr!==j[1])&&(a.polygonOffset(Lr,vr),j[0]=Lr,j[1]=vr),Er=u.sample_alpha,Er!==l.sample_alpha&&(Er?a.enable(32926):a.disable(32926),l.sample_alpha=Er),si=u.sample_enable,si!==l.sample_enable&&(si?a.enable(32928):a.disable(32928),l.sample_enable=si),Ei=G[0],Si=G[1],(Ei!==O[0]||Si!==O[1])&&(a.sampleCoverage(Ei,Si),O[0]=Ei,O[1]=Si),xi=u.stencil_enable,xi!==l.stencil_enable&&(xi?a.enable(2960):a.disable(2960),l.stencil_enable=xi),Hi=u.stencil_mask,Hi!==l.stencil_mask&&(a.stencilMask(Hi),l.stencil_mask=Hi),Jr=W[0],ci=W[1],Di=W[2],(Jr!==re[0]||ci!==re[1]||Di!==re[2])&&(a.stencilFunc(Jr,ci,Di),re[0]=Jr,re[1]=ci,re[2]=Di),Lt=ne[0],vt=ne[1],Dt=ne[2],Bt=ne[3],(Lt!==be[0]||vt!==be[1]||Dt!==be[2]||Bt!==be[3])&&(a.stencilOpSeparate(Lt,vt,Dt,Bt),be[0]=Lt,be[1]=vt,be[2]=Dt,be[3]=Bt),sr=ze[0],br=ze[1],zr=ze[2],Tr=ze[3],(sr!==Ce[0]||br!==Ce[1]||zr!==Ce[2]||Tr!==Ce[3])&&(a.stencilOpSeparate(sr,br,zr,Tr),Ce[0]=sr,Ce[1]=br,Ce[2]=zr,Ce[3]=Tr),Rr=u.scissor_enable,Rr!==l.scissor_enable&&(Rr?a.enable(3089):a.disable(3089),l.scissor_enable=Rr),Br=he[0],oi=he[1],vi=he[2],Pi=he[3],(Br!==te[0]||oi!==te[1]||vi!==te[2]||Pi!==te[3])&&(a.scissor(Br,oi,vi,Pi),te[0]=Br,te[1]=oi,te[2]=vi,te[3]=Pi),Yr=ke[0],Ni=ke[1],Ur=ke[2],ti=ke[3],(Yr!==Ee[0]||Ni!==Ee[1]||Ur!==Ee[2]||ti!==Ee[3])&&(a.viewport(Yr,Ni,Ur,ti),Ee[0]=Yr,Ee[1]=Ni,Ee[2]=Ur,Ee[3]=ti),l.dirty=!1}xt=l.profile,xt&&(_t=performance.now(),r.count+=Qe),Ct=d.frag,jt=d.vert,At=d.program(jt,Ct),a.useProgram(At.program),x.setVAO(null),Te=At.id,nt=gt[Te],nt?nt.call(this,Pt,Qe):(nt=gt[Te]=i(At),nt.call(this,Pt,Qe)),x.setVAO(null),xt&&(r.cpuTime+=performance.now()-_t)}}}});var A9=Se((t1r,BOe)=>{BOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt){"use strict";var Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi;return Je=t.gl,Mt=t.context,Vt=t.strings,Kt=t.next,ir=t.current,fr=t.draw,Ot=t.elements,De=t.buffer,_e=t.shader,Fe=t.attributes,Pe=t.vao,Ie=t.uniforms,lt=t.framebuffer,ye=t.extensions,ue=t.timer,de=t.isBufferArgs,ht=Kt.blend_color,Et=ir.blend_color,St=Kt.blend_equation,Zt=ir.blend_equation,qr=Kt.blend_func,Lr=ir.blend_func,vr=Kt.depth_range,Er=ir.depth_range,si=Kt.colorMask,Ei=ir.colorMask,Si=Kt.polygonOffset_offset,xi=ir.polygonOffset_offset,Hi=Kt.sample_coverage,Jr=ir.sample_coverage,ci=Kt.stencil_func,Di=ir.stencil_func,Lt=Kt.stencil_opFront,vt=ir.stencil_opFront,Dt=Kt.stencil_opBack,Bt=ir.stencil_opBack,sr=Kt.scissor_box,br=ir.scissor_box,zr=Kt.viewport,Tr=ir.viewport,Rr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Br={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oi={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},vi={add:32774,subtract:32778,"reverse subtract":32779},Pi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Yr={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ni={cw:2304,ccw:2305},Ur={},Ur.stride=8,Ur.offset=8,Ur.divisor=1,ti={},ti.stride=8,ti.offset=16,ti.divisor=1,ki={},ki.stride=8,ki.offset=8,ki.divisor=1,ji={},ji.stride=8,ji.offset=16,ji.divisor=1,Vi={},Vi.stride=4,Vi.offset=0,Vi.divisor=1,{draw:function(zi){var Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn;if(Mi=ye.angle_instanced_arrays,sn=lt.next,sn!==lt.cur&&(sn?Je.bindFramebuffer(36160,sn.framebuffer):Je.bindFramebuffer(36160,null),lt.cur=sn),ir.dirty){var zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li;zo=Kt.dither,zo!==ir.dither&&(zo?Je.enable(3024):Je.disable(3024),ir.dither=zo),rl=Kt.depth_func,rl!==ir.depth_func&&(Je.depthFunc(rl),ir.depth_func=rl),$o=vr[0],Na=vr[1],($o!==Er[0]||Na!==Er[1])&&(Je.depthRange($o,Na),Er[0]=$o,Er[1]=Na),Ua=Kt.depth_mask,Ua!==ir.depth_mask&&(Je.depthMask(Ua),ir.depth_mask=Ua),Po=si[0],fo=si[1],ro=si[2],Ma=si[3],(Po!==Ei[0]||fo!==Ei[1]||ro!==Ei[2]||Ma!==Ei[3])&&(Je.colorMask(Po,fo,ro,Ma),Ei[0]=Po,Ei[1]=fo,Ei[2]=ro,Ei[3]=Ma),io=Kt.cull_enable,io!==ir.cull_enable&&(io?Je.enable(2884):Je.disable(2884),ir.cull_enable=io),aa=Kt.cull_face,aa!==ir.cull_face&&(Je.cullFace(aa),ir.cull_face=aa),Oo=Kt.frontFace,Oo!==ir.frontFace&&(Je.frontFace(Oo),ir.frontFace=Oo),No=Kt.lineWidth,No!==ir.lineWidth&&(Je.lineWidth(No),ir.lineWidth=No),Zs=Kt.polygonOffset_enable,Zs!==ir.polygonOffset_enable&&(Zs?Je.enable(32823):Je.disable(32823),ir.polygonOffset_enable=Zs),Fs=Si[0],ws=Si[1],(Fs!==xi[0]||ws!==xi[1])&&(Je.polygonOffset(Fs,ws),xi[0]=Fs,xi[1]=ws),no=Kt.sample_alpha,no!==ir.sample_alpha&&(no?Je.enable(32926):Je.disable(32926),ir.sample_alpha=no),Ls=Kt.sample_enable,Ls!==ir.sample_enable&&(Ls?Je.enable(32928):Je.disable(32928),ir.sample_enable=Ls),ds=Hi[0],Xs=Hi[1],(ds!==Jr[0]||Xs!==Jr[1])&&(Je.sampleCoverage(ds,Xs),Jr[0]=ds,Jr[1]=Xs),oa=Kt.stencil_mask,oa!==ir.stencil_mask&&(Je.stencilMask(oa),ir.stencil_mask=oa),Yo=ci[0],po=ci[1],ss=ci[2],(Yo!==Di[0]||po!==Di[1]||ss!==Di[2])&&(Je.stencilFunc(Yo,po,ss),Di[0]=Yo,Di[1]=po,Di[2]=ss),ls=Lt[0],gs=Lt[1],bt=Lt[2],Ft=Lt[3],(ls!==vt[0]||gs!==vt[1]||bt!==vt[2]||Ft!==vt[3])&&(Je.stencilOpSeparate(ls,gs,bt,Ft),vt[0]=ls,vt[1]=gs,vt[2]=bt,vt[3]=Ft),hr=Dt[0],nr=Dt[1],Sr=Dt[2],li=Dt[3],(hr!==Bt[0]||nr!==Bt[1]||Sr!==Bt[2]||li!==Bt[3])&&(Je.stencilOpSeparate(hr,nr,Sr,li),Bt[0]=hr,Bt[1]=nr,Bt[2]=Sr,Bt[3]=li)}fi=zi.viewport,Or=fi.x|0,st=fi.y|0,Wt="width"in fi?fi.width|0:Mt.framebufferWidth-Or,tr="height"in fi?fi.height|0:Mt.framebufferHeight-st,or=Mt.viewportWidth,Mt.viewportWidth=Wt,Nr=Mt.viewportHeight,Mt.viewportHeight=tr,Je.viewport(Or,st,Wt,tr),Tr[0]=Or,Tr[1]=st,Tr[2]=Wt,Tr[3]=tr,Je.blendColor(0,0,0,0),Et[0]=0,Et[1]=0,Et[2]=0,Et[3]=0,n?Je.enable(3042):Je.disable(3042),ir.blend_enable=n,Je.blendEquationSeparate(32774,32774),Zt[0]=32774,Zt[1]=32774,Je.blendFuncSeparate(770,771,773,1),Lr[0]=770,Lr[1]=771,Lr[2]=773,Lr[3]=1,hi=i.call(this,Mt,zi,0),hi?Je.enable(2929):Je.disable(2929),ir.depth_enable=hi,Gi=zi.viewport,Qr=Gi.x|0,Ui=Gi.y|0,zn="width"in Gi?Gi.width|0:Mt.framebufferWidth-Qr,fn="height"in Gi?Gi.height|0:Mt.framebufferHeight-Ui,Je.scissor(Qr,Ui,zn,fn),br[0]=Qr,br[1]=Ui,br[2]=zn,br[3]=fn,a?Je.enable(3089):Je.disable(3089),ir.scissor_enable=a,o?Je.enable(2960):Je.disable(2960),ir.stencil_enable=o,xn=ir.profile,xn&&(_a=performance.now(),r.count++),Je.useProgram(s.program),Wn=ye.angle_instanced_arrays,Pe.setVAO(null),Fn=zi.positionBuffer,Ur.buffer=Fn,ia=!1,za=1,Hr=0,na=0,go=0,Dn=0,un=null,Zn=0,Wo=!1,Ba=5126,Bo=0,Ea=0,Ha=0,de(Ur)?(ia=!0,un=De.createStream(34962,Ur),Ba=un.dtype):(un=De.getBuffer(Ur),un?Ba=un.dtype:"constant"in Ur?(za=2,typeof Ur.constant=="number"?(Hr=Ur.constant,na=go=Dn=0):(Hr=Ur.constant.length>0?Ur.constant[0]:0,na=Ur.constant.length>1?Ur.constant[1]:0,go=Ur.constant.length>2?Ur.constant[2]:0,Dn=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?un=De.createStream(34962,Ur.buffer):un=De.getBuffer(Ur.buffer),Ba="type"in Ur?Yr[Ur.type]:un.dtype,Wo=!!Ur.normalized,Zn=Ur.size|0,Bo=Ur.offset|0,Ea=Ur.stride|0,Ha=Ur.divisor|0)),tn=u.location,Cn=Fe[tn],za===1?(Cn.buffer||Je.enableVertexAttribArray(tn),Xn=Zn||2,(Cn.type!==Ba||Cn.size!==Xn||Cn.buffer!==un||Cn.normalized!==Wo||Cn.offset!==Bo||Cn.stride!==Ea)&&(Je.bindBuffer(34962,un.buffer),Je.vertexAttribPointer(tn,Xn,Ba,Wo,Ea,Bo),Cn.type=Ba,Cn.size=Xn,Cn.buffer=un,Cn.normalized=Wo,Cn.offset=Bo,Cn.stride=Ea),Cn.divisor!==Ha&&(Wn.vertexAttribDivisorANGLE(tn,Ha),Cn.divisor=Ha)):(Cn.buffer&&(Je.disableVertexAttribArray(tn),Cn.buffer=null),(Cn.x!==Hr||Cn.y!==na||Cn.z!==go||Cn.w!==Dn)&&(Je.vertexAttrib4f(tn,Hr,na,go,Dn),Cn.x=Hr,Cn.y=na,Cn.z=go,Cn.w=Dn)),ts=zi.positionFractBuffer,ki.buffer=ts,Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,de(ki)?(Ja=!0,ln=De.createStream(34962,ki),bo=ln.dtype):(ln=De.getBuffer(ki),ln?bo=ln.dtype:"constant"in ki?(to=2,typeof ki.constant=="number"?(Ri=ki.constant,an=cs=pa=0):(Ri=ki.constant.length>0?ki.constant[0]:0,an=ki.constant.length>1?ki.constant[1]:0,cs=ki.constant.length>2?ki.constant[2]:0,pa=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?ln=De.createStream(34962,ki.buffer):ln=De.getBuffer(ki.buffer),bo="type"in ki?Yr[ki.type]:ln.dtype,va=!!ki.normalized,ka=ki.size|0,Co=ki.offset|0,Fi=ki.stride|0,Yn=ki.divisor|0)),xa=l.location,Qi=Fe[xa],to===1?(Qi.buffer||Je.enableVertexAttribArray(xa),Nn=ka||2,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(Je.bindBuffer(34962,ln.buffer),Je.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(Wn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(Je.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(Je.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=zi.positionBuffer,ti.buffer=Pn,qa=!1,jo=1,Vo=0,Pa=0,Oa=0,co=0,An=null,_o=0,ks=!1,bs=5126,ps=0,sa=0,Bn=0,de(ti)?(qa=!0,An=De.createStream(34962,ti),bs=An.dtype):(An=De.getBuffer(ti),An?bs=An.dtype:"constant"in ti?(jo=2,typeof ti.constant=="number"?(Vo=ti.constant,Pa=Oa=co=0):(Vo=ti.constant.length>0?ti.constant[0]:0,Pa=ti.constant.length>1?ti.constant[1]:0,Oa=ti.constant.length>2?ti.constant[2]:0,co=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?An=De.createStream(34962,ti.buffer):An=De.getBuffer(ti.buffer),bs="type"in ti?Yr[ti.type]:An.dtype,ks=!!ti.normalized,_o=ti.size|0,ps=ti.offset|0,sa=ti.stride|0,Bn=ti.divisor|0)),ms=f.location,ya=Fe[ms],jo===1?(ya.buffer||Je.enableVertexAttribArray(ms),on=_o||2,(ya.type!==bs||ya.size!==on||ya.buffer!==An||ya.normalized!==ks||ya.offset!==ps||ya.stride!==sa)&&(Je.bindBuffer(34962,An.buffer),Je.vertexAttribPointer(ms,on,bs,ks,sa,ps),ya.type=bs,ya.size=on,ya.buffer=An,ya.normalized=ks,ya.offset=ps,ya.stride=sa),ya.divisor!==Bn&&(Wn.vertexAttribDivisorANGLE(ms,Bn),ya.divisor=Bn)):(ya.buffer&&(Je.disableVertexAttribArray(ms),ya.buffer=null),(ya.x!==Vo||ya.y!==Pa||ya.z!==Oa||ya.w!==co)&&(Je.vertexAttrib4f(ms,Vo,Pa,Oa,co),ya.x=Vo,ya.y=Pa,ya.z=Oa,ya.w=co)),mn=zi.positionFractBuffer,ji.buffer=mn,Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,de(ji)?(Ga=!0,yn=De.createStream(34962,ji),Da=yn.dtype):(yn=De.getBuffer(ji),yn?Da=yn.dtype:"constant"in ji?(ca=2,typeof ji.constant=="number"?(bn=ji.constant,Xi=qn=Ia=0):(bn=ji.constant.length>0?ji.constant[0]:0,Xi=ji.constant.length>1?ji.constant[1]:0,qn=ji.constant.length>2?ji.constant[2]:0,Ia=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?yn=De.createStream(34962,ji.buffer):yn=De.getBuffer(ji.buffer),Da="type"in ji?Yr[ji.type]:yn.dtype,ba=!!ji.normalized,Ya=ji.size|0,Aa=ji.offset|0,Ln=ji.stride|0,wo=ji.divisor|0)),wa=c.location,$i=Fe[wa],ca===1?($i.buffer||Je.enableVertexAttribArray(wa),ea=Ya||2,($i.type!==Da||$i.size!==ea||$i.buffer!==yn||$i.normalized!==ba||$i.offset!==Aa||$i.stride!==Ln)&&(Je.bindBuffer(34962,yn.buffer),Je.vertexAttribPointer(wa,ea,Da,ba,Ln,Aa),$i.type=Da,$i.size=ea,$i.buffer=yn,$i.normalized=ba,$i.offset=Aa,$i.stride=Ln),$i.divisor!==wo&&(Wn.vertexAttribDivisorANGLE(wa,wo),$i.divisor=wo)):($i.buffer&&(Je.disableVertexAttribArray(wa),$i.buffer=null),($i.x!==bn||$i.y!==Xi||$i.z!==qn||$i.w!==Ia)&&(Je.vertexAttrib4f(wa,bn,Xi,qn,Ia),$i.x=bn,$i.y=Xi,$i.z=qn,$i.w=Ia)),Sa=zi.colorBuffer,Vi.buffer=Sa,Za=!1,xo=1,Wa=0,hn=0,Un=0,Ss=0,Kn=null,ns=0,Jo=!1,vo=5126,ma=0,ja=0,To=0,de(Vi)?(Za=!0,Kn=De.createStream(34962,Vi),vo=Kn.dtype):(Kn=De.getBuffer(Vi),Kn?vo=Kn.dtype:"constant"in Vi?(xo=2,typeof Vi.constant=="number"?(Wa=Vi.constant,hn=Un=Ss=0):(Wa=Vi.constant.length>0?Vi.constant[0]:0,hn=Vi.constant.length>1?Vi.constant[1]:0,Un=Vi.constant.length>2?Vi.constant[2]:0,Ss=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?Kn=De.createStream(34962,Vi.buffer):Kn=De.getBuffer(Vi.buffer),vo="type"in Vi?Yr[Vi.type]:Kn.dtype,Jo=!!Vi.normalized,ns=Vi.size|0,ma=Vi.offset|0,ja=Vi.stride|0,To=Vi.divisor|0)),Ao=h.location,la=Fe[Ao],xo===1?(la.buffer||Je.enableVertexAttribArray(Ao),Ki=ns||4,(la.type!==vo||la.size!==Ki||la.buffer!==Kn||la.normalized!==Jo||la.offset!==ma||la.stride!==ja)&&(Je.bindBuffer(34962,Kn.buffer),Je.vertexAttribPointer(Ao,Ki,vo,Jo,ja,ma),la.type=vo,la.size=Ki,la.buffer=Kn,la.normalized=Jo,la.offset=ma,la.stride=ja),la.divisor!==To&&(Wn.vertexAttribDivisorANGLE(Ao,To),la.divisor=To)):(la.buffer&&(Je.disableVertexAttribArray(Ao),la.buffer=null),(la.x!==Wa||la.y!==hn||la.z!==Un||la.w!==Ss)&&(Je.vertexAttrib4f(Ao,Wa,hn,Un,Ss),la.x=Wa,la.y=hn,la.z=Un,la.w=Ss)),ho=p.location,Ka=Fe[ho],Ka.buffer||Je.enableVertexAttribArray(ho),(Ka.type!==5126||Ka.size!==1||Ka.buffer!==d||Ka.normalized!==!1||Ka.offset!==0||Ka.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(ho,1,5126,!1,8,0),Ka.type=5126,Ka.size=1,Ka.buffer=d,Ka.normalized=!1,Ka.offset=0,Ka.stride=8),Ka.divisor!==0&&(Wn.vertexAttribDivisorANGLE(ho,0),Ka.divisor=0),Ca=x.location,ta=Fe[Ca],ta.buffer||Je.enableVertexAttribArray(Ca),(ta.type!==5126||ta.size!==1||ta.buffer!==d||ta.normalized!==!1||ta.offset!==4||ta.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(Ca,1,5126,!1,8,4),ta.type=5126,ta.size=1,ta.buffer=d,ta.normalized=!1,ta.offset=4,ta.stride=8),ta.divisor!==0&&(Wn.vertexAttribDivisorANGLE(Ca,0),ta.divisor=0),En=zi.dashLength,Je.uniform1f(b.location,En),Mo=zi.dashTexture,Mo&&Mo._reglType==="framebuffer"&&(Mo=Mo.color[0]),Ds=Mo._texture,Je.uniform1i(y.location,Ds.bind()),Ro=zi.depth,Je.uniform1f(E.location,Ro),vs=zi.opacity,Je.uniform1f(k.location,vs),Ks=zi.scale,as=Ks[0],Jn=Ks[1],Je.uniform2f(A.location,as,Jn),Cs=zi.scaleFract,Xa=Cs[0],Zo=Cs[1],Je.uniform2f(L.location,Xa,Zo),Eo=zi.thickness,Je.uniform1f(_.location,Eo),lo=zi.translate,$a=lo[0],Xo=lo[1],Je.uniform2f(C.location,$a,Xo),rs=zi.translateFract,$n=rs[0],Sn=rs[1],Je.uniform2f(M.location,$n,Sn),uo=z.call(this,Mt,zi,0),Rs=uo[0],xs=uo[1],Go=uo[2],os=uo[3],Je.uniform4f(v.location,Rs,xs,Go,os),So=fr.elements,So?Je.bindBuffer(34963,So.buffer.buffer):Pe.currentVAO&&(So=Ot.getElements(Pe.currentVAO.elements),So&&Je.bindBuffer(34963,So.buffer.buffer)),Qn=zi.count,Qn>0?So?Wn.drawElementsInstancedANGLE(5,4,So.type,0<<(So.type-5121>>1),Qn):Wn.drawArraysInstancedANGLE(5,0,4,Qn):Qn<0&&(So?Je.drawElements(5,4,So.type,0<<(So.type-5121>>1)):Je.drawArrays(5,0,4)),ir.dirty=!0,Pe.setVAO(null),Mt.viewportWidth=or,Mt.viewportHeight=Nr,xn&&(r.cpuTime+=performance.now()-_a),ia&&De.destroyStream(un),Ja&&De.destroyStream(ln),qa&&De.destroyStream(An),Ga&&De.destroyStream(yn),Za&&De.destroyStream(Kn),Ds.unbind()},scope:function(zi,Mi,sn){var fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt;fi=zi.viewport,Or=fi.x|0,st=fi.y|0,Wt="width"in fi?fi.width|0:Mt.framebufferWidth-Or,tr="height"in fi?fi.height|0:Mt.framebufferHeight-st,or=Mt.viewportWidth,Mt.viewportWidth=Wt,Nr=Mt.viewportHeight,Mt.viewportHeight=tr,hi=zr[0],zr[0]=Or,Gi=zr[1],zr[1]=st,Qr=zr[2],zr[2]=Wt,Ui=zr[3],zr[3]=tr,zn=ht[0],ht[0]=T,fn=ht[1],ht[1]=F,xn=ht[2],ht[2]=q,_a=ht[3],ht[3]=U,Wn=Kt.blend_enable,Kt.blend_enable=H,Fn=St[0],St[0]=j,ia=St[1],St[1]=G,za=qr[0],qr[0]=O,Hr=qr[1],qr[1]=W,na=qr[2],qr[2]=re,go=qr[3],qr[3]=ne,Dn=i.call(this,Mt,zi,sn),un=Kt.depth_enable,Kt.depth_enable=Dn,Zn=zi.viewport,Wo=Zn.x|0,Ba=Zn.y|0,Bo="width"in Zn?Zn.width|0:Mt.framebufferWidth-Wo,Ea="height"in Zn?Zn.height|0:Mt.framebufferHeight-Ba,Ha=sr[0],sr[0]=Wo,tn=sr[1],sr[1]=Ba,Cn=sr[2],sr[2]=Bo,Xn=sr[3],sr[3]=Ea,ts=Kt.scissor_enable,Kt.scissor_enable=be,Ja=Kt.stencil_enable,Kt.stencil_enable=ze,to=ir.profile,to&&(Ri=performance.now(),r.count++),an=fr.offset,fr.offset=Ce,cs=fr.count,fr.count=he,pa=zi.count,ln=fr.instances,fr.instances=pa,ka=fr.primitive,fr.primitive=te,va=ke.call(this,Mt,zi,sn),bo=Ie[Ee],Ie[Ee]=va,Co=zi.miterLimit,Fi=Ie[Me],Ie[Me]=Co,Yn=zi.scale,xa=Ie[Oe],Ie[Oe]=Yn,Qi=zi.scaleFract,Nn=Ie[Re],Ie[Re]=Qi,Pn=zi.translateFract,qa=Ie[me],Ie[me]=Pn,jo=zi.translate,Vo=Ie[Be],Ie[Be]=jo,Pa=zi.thickness,Oa=Ie[fe],Ie[fe]=Pa,co=zi.dashTexture,An=Ie[Ze],Ie[Ze]=co,_o=zi.opacity,ks=Ie[et],Ie[et]=_o,bs=Mt.pixelRatio,ps=Ie[gt],Ie[gt]=bs,sa=zi.id,Bn=Ie[Pt],Ie[Pt]=sa,ms=zi.dashLength,ya=Ie[Qe],Ie[Qe]=ms,on=z.call(this,Mt,zi,sn),mn=Ie[Xe],Ie[Xe]=on,Ga=zi.depth,ca=Ie[Tt],Ie[Tt]=Ga,bn=xt.state,xt.state=1,Xi=xt.x,xt.x=0,qn=xt.y,xt.y=0,Ia=xt.z,xt.z=0,yn=xt.w,xt.w=0,Ya=xt.buffer,xt.buffer=d,ba=xt.size,xt.size=0,Da=xt.normalized,xt.normalized=!1,Aa=xt.type,xt.type=5126,Ln=xt.offset,xt.offset=0,wo=xt.stride,xt.stride=8,wa=xt.divisor,xt.divisor=0,$i=_t.state,_t.state=1,ea=_t.x,_t.x=0,Sa=_t.y,_t.y=0,Za=_t.z,_t.z=0,xo=_t.w,_t.w=0,Wa=_t.buffer,_t.buffer=d,hn=_t.size,_t.size=0,Un=_t.normalized,_t.normalized=!1,Ss=_t.type,_t.type=5126,Kn=_t.offset,_t.offset=4,ns=_t.stride,_t.stride=8,Jo=_t.divisor,_t.divisor=0,vo=zi.positionBuffer,Ur.buffer=vo,ma=!1,ja=1,To=0,Ao=0,la=0,Ki=0,ho=null,Ka=0,Ca=!1,ta=5126,En=0,Mo=0,Ds=0,de(Ur)?(ma=!0,ho=De.createStream(34962,Ur),ta=ho.dtype):(ho=De.getBuffer(Ur),ho?ta=ho.dtype:"constant"in Ur?(ja=2,typeof Ur.constant=="number"?(To=Ur.constant,Ao=la=Ki=0):(To=Ur.constant.length>0?Ur.constant[0]:0,Ao=Ur.constant.length>1?Ur.constant[1]:0,la=Ur.constant.length>2?Ur.constant[2]:0,Ki=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?ho=De.createStream(34962,Ur.buffer):ho=De.getBuffer(Ur.buffer),ta="type"in Ur?Yr[Ur.type]:ho.dtype,Ca=!!Ur.normalized,Ka=Ur.size|0,En=Ur.offset|0,Mo=Ur.stride|0,Ds=Ur.divisor|0)),Ro=Ct.state,Ct.state=ja,vs=Ct.x,Ct.x=To,Ks=Ct.y,Ct.y=Ao,as=Ct.z,Ct.z=la,Jn=Ct.w,Ct.w=Ki,Cs=Ct.buffer,Ct.buffer=ho,Xa=Ct.size,Ct.size=Ka,Zo=Ct.normalized,Ct.normalized=Ca,Eo=Ct.type,Ct.type=ta,lo=Ct.offset,Ct.offset=En,$a=Ct.stride,Ct.stride=Mo,Xo=Ct.divisor,Ct.divisor=Ds,rs=zi.positionBuffer,ti.buffer=rs,$n=!1,Sn=1,uo=0,Rs=0,xs=0,Go=0,os=null,So=0,Qn=!1,zo=5126,rl=0,$o=0,Na=0,de(ti)?($n=!0,os=De.createStream(34962,ti),zo=os.dtype):(os=De.getBuffer(ti),os?zo=os.dtype:"constant"in ti?(Sn=2,typeof ti.constant=="number"?(uo=ti.constant,Rs=xs=Go=0):(uo=ti.constant.length>0?ti.constant[0]:0,Rs=ti.constant.length>1?ti.constant[1]:0,xs=ti.constant.length>2?ti.constant[2]:0,Go=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?os=De.createStream(34962,ti.buffer):os=De.getBuffer(ti.buffer),zo="type"in ti?Yr[ti.type]:os.dtype,Qn=!!ti.normalized,So=ti.size|0,rl=ti.offset|0,$o=ti.stride|0,Na=ti.divisor|0)),Ua=jt.state,jt.state=Sn,Po=jt.x,jt.x=uo,fo=jt.y,jt.y=Rs,ro=jt.z,jt.z=xs,Ma=jt.w,jt.w=Go,io=jt.buffer,jt.buffer=os,aa=jt.size,jt.size=So,Oo=jt.normalized,jt.normalized=Qn,No=jt.type,jt.type=zo,Zs=jt.offset,jt.offset=rl,Fs=jt.stride,jt.stride=$o,ws=jt.divisor,jt.divisor=Na,no=zi.positionFractBuffer,ki.buffer=no,Ls=!1,ds=1,Xs=0,oa=0,Yo=0,po=0,ss=null,ls=0,gs=!1,bt=5126,Ft=0,hr=0,nr=0,de(ki)?(Ls=!0,ss=De.createStream(34962,ki),bt=ss.dtype):(ss=De.getBuffer(ki),ss?bt=ss.dtype:"constant"in ki?(ds=2,typeof ki.constant=="number"?(Xs=ki.constant,oa=Yo=po=0):(Xs=ki.constant.length>0?ki.constant[0]:0,oa=ki.constant.length>1?ki.constant[1]:0,Yo=ki.constant.length>2?ki.constant[2]:0,po=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?ss=De.createStream(34962,ki.buffer):ss=De.getBuffer(ki.buffer),bt="type"in ki?Yr[ki.type]:ss.dtype,gs=!!ki.normalized,ls=ki.size|0,Ft=ki.offset|0,hr=ki.stride|0,nr=ki.divisor|0)),Sr=At.state,At.state=ds,li=At.x,At.x=Xs,di=At.y,At.y=oa,mi=At.z,At.z=Yo,Oi=At.w,At.w=po,dn=At.buffer,At.buffer=ss,wi=At.size,At.size=ls,ui=At.normalized,At.normalized=gs,Ai=At.type,At.type=bt,gi=At.offset,At.offset=Ft,gn=At.stride,At.stride=hr,In=At.divisor,At.divisor=nr,Vn=zi.positionFractBuffer,ji.buffer=Vn,Rn=!1,Hn=1,Gn=0,pn=0,Lo=0,us=0,Bs=null,Js=0,ol=!1,Cl=5126,ul=0,Gl=0,Vl=0,de(ji)?(Rn=!0,Bs=De.createStream(34962,ji),Cl=Bs.dtype):(Bs=De.getBuffer(ji),Bs?Cl=Bs.dtype:"constant"in ji?(Hn=2,typeof ji.constant=="number"?(Gn=ji.constant,pn=Lo=us=0):(Gn=ji.constant.length>0?ji.constant[0]:0,pn=ji.constant.length>1?ji.constant[1]:0,Lo=ji.constant.length>2?ji.constant[2]:0,us=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?Bs=De.createStream(34962,ji.buffer):Bs=De.getBuffer(ji.buffer),Cl="type"in ji?Yr[ji.type]:Bs.dtype,ol=!!ji.normalized,Js=ji.size|0,ul=ji.offset|0,Gl=ji.stride|0,Vl=ji.divisor|0)),Fl=Te.state,Te.state=Hn,ga=Te.x,Te.x=Gn,ko=Te.y,Te.y=pn,zs=Te.z,Te.z=Lo,Fo=Te.w,Te.w=us,Ys=Te.buffer,Te.buffer=Bs,Gs=Te.size,Te.size=Js,Us=Te.normalized,Te.normalized=ol,Sl=Te.type,Te.type=Cl,_l=Te.offset,Te.offset=ul,kl=Te.stride,Te.stride=Gl,cl=Te.divisor,Te.divisor=Vl,xl=zi.colorBuffer,Vi.buffer=xl,Uo=!1,_s=1,Bl=0,Il=0,Dl=0,oe=0,w=null,B=0,Q=!1,ee=5126,le=0,Ne=0,$e=0,de(Vi)?(Uo=!0,w=De.createStream(34962,Vi),ee=w.dtype):(w=De.getBuffer(Vi),w?ee=w.dtype:"constant"in Vi?(_s=2,typeof Vi.constant=="number"?(Bl=Vi.constant,Il=Dl=oe=0):(Bl=Vi.constant.length>0?Vi.constant[0]:0,Il=Vi.constant.length>1?Vi.constant[1]:0,Dl=Vi.constant.length>2?Vi.constant[2]:0,oe=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?w=De.createStream(34962,Vi.buffer):w=De.getBuffer(Vi.buffer),ee="type"in Vi?Yr[Vi.type]:w.dtype,Q=!!Vi.normalized,B=Vi.size|0,le=Vi.offset|0,Ne=Vi.stride|0,$e=Vi.divisor|0)),pt=nt.state,nt.state=_s,zt=nt.x,nt.x=Bl,Yt=nt.y,nt.y=Il,Jt=nt.z,nt.z=Dl,yr=nt.w,nt.w=oe,Ir=nt.buffer,nt.buffer=w,ce=nt.size,nt.size=B,Ae=nt.normalized,nt.normalized=Q,qe=nt.type,nt.type=ee,Ve=nt.offset,nt.offset=le,ot=nt.stride,nt.stride=Ne,Ke=nt.divisor,nt.divisor=$e,ft=_e.vert,_e.vert=ut,qt=_e.frag,_e.frag=ct,ir.dirty=!0,Mi(Mt,zi,sn),Mt.viewportWidth=or,Mt.viewportHeight=Nr,zr[0]=hi,zr[1]=Gi,zr[2]=Qr,zr[3]=Ui,ht[0]=zn,ht[1]=fn,ht[2]=xn,ht[3]=_a,Kt.blend_enable=Wn,St[0]=Fn,St[1]=ia,qr[0]=za,qr[1]=Hr,qr[2]=na,qr[3]=go,Kt.depth_enable=un,sr[0]=Ha,sr[1]=tn,sr[2]=Cn,sr[3]=Xn,Kt.scissor_enable=ts,Kt.stencil_enable=Ja,to&&(r.cpuTime+=performance.now()-Ri),fr.offset=an,fr.count=cs,fr.instances=ln,fr.primitive=ka,Ie[Ee]=bo,Ie[Me]=Fi,Ie[Oe]=xa,Ie[Re]=Nn,Ie[me]=qa,Ie[Be]=Vo,Ie[fe]=Oa,Ie[Ze]=An,Ie[et]=ks,Ie[gt]=ps,Ie[Pt]=Bn,Ie[Qe]=ya,Ie[Xe]=mn,Ie[Tt]=ca,xt.state=bn,xt.x=Xi,xt.y=qn,xt.z=Ia,xt.w=yn,xt.buffer=Ya,xt.size=ba,xt.normalized=Da,xt.type=Aa,xt.offset=Ln,xt.stride=wo,xt.divisor=wa,_t.state=$i,_t.x=ea,_t.y=Sa,_t.z=Za,_t.w=xo,_t.buffer=Wa,_t.size=hn,_t.normalized=Un,_t.type=Ss,_t.offset=Kn,_t.stride=ns,_t.divisor=Jo,ma&&De.destroyStream(ho),Ct.state=Ro,Ct.x=vs,Ct.y=Ks,Ct.z=as,Ct.w=Jn,Ct.buffer=Cs,Ct.size=Xa,Ct.normalized=Zo,Ct.type=Eo,Ct.offset=lo,Ct.stride=$a,Ct.divisor=Xo,$n&&De.destroyStream(os),jt.state=Ua,jt.x=Po,jt.y=fo,jt.z=ro,jt.w=Ma,jt.buffer=io,jt.size=aa,jt.normalized=Oo,jt.type=No,jt.offset=Zs,jt.stride=Fs,jt.divisor=ws,Ls&&De.destroyStream(ss),At.state=Sr,At.x=li,At.y=di,At.z=mi,At.w=Oi,At.buffer=dn,At.size=wi,At.normalized=ui,At.type=Ai,At.offset=gi,At.stride=gn,At.divisor=In,Rn&&De.destroyStream(Bs),Te.state=Fl,Te.x=ga,Te.y=ko,Te.z=zs,Te.w=Fo,Te.buffer=Ys,Te.size=Gs,Te.normalized=Us,Te.type=Sl,Te.offset=_l,Te.stride=kl,Te.divisor=cl,Uo&&De.destroyStream(w),nt.state=pt,nt.x=zt,nt.y=Yt,nt.z=Jt,nt.w=yr,nt.buffer=Ir,nt.size=ce,nt.normalized=Ae,nt.type=qe,nt.offset=Ve,nt.stride=ot,nt.divisor=Ke,_e.vert=ft,_e.frag=qt,ir.dirty=!0},batch:function(zi,Mi){var sn,fi,Or,st,Wt,tr,or;if(sn=ye.angle_instanced_arrays,fi=lt.next,fi!==lt.cur&&(fi?Je.bindFramebuffer(36160,fi.framebuffer):Je.bindFramebuffer(36160,null),lt.cur=fi),ir.dirty){var Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an;Nr=Kt.dither,Nr!==ir.dither&&(Nr?Je.enable(3024):Je.disable(3024),ir.dither=Nr),hi=Kt.depth_func,hi!==ir.depth_func&&(Je.depthFunc(hi),ir.depth_func=hi),Gi=vr[0],Qr=vr[1],(Gi!==Er[0]||Qr!==Er[1])&&(Je.depthRange(Gi,Qr),Er[0]=Gi,Er[1]=Qr),Ui=Kt.depth_mask,Ui!==ir.depth_mask&&(Je.depthMask(Ui),ir.depth_mask=Ui),zn=si[0],fn=si[1],xn=si[2],_a=si[3],(zn!==Ei[0]||fn!==Ei[1]||xn!==Ei[2]||_a!==Ei[3])&&(Je.colorMask(zn,fn,xn,_a),Ei[0]=zn,Ei[1]=fn,Ei[2]=xn,Ei[3]=_a),Wn=Kt.cull_enable,Wn!==ir.cull_enable&&(Wn?Je.enable(2884):Je.disable(2884),ir.cull_enable=Wn),Fn=Kt.cull_face,Fn!==ir.cull_face&&(Je.cullFace(Fn),ir.cull_face=Fn),ia=Kt.frontFace,ia!==ir.frontFace&&(Je.frontFace(ia),ir.frontFace=ia),za=Kt.lineWidth,za!==ir.lineWidth&&(Je.lineWidth(za),ir.lineWidth=za),Hr=Kt.polygonOffset_enable,Hr!==ir.polygonOffset_enable&&(Hr?Je.enable(32823):Je.disable(32823),ir.polygonOffset_enable=Hr),na=Si[0],go=Si[1],(na!==xi[0]||go!==xi[1])&&(Je.polygonOffset(na,go),xi[0]=na,xi[1]=go),Dn=Kt.sample_alpha,Dn!==ir.sample_alpha&&(Dn?Je.enable(32926):Je.disable(32926),ir.sample_alpha=Dn),un=Kt.sample_enable,un!==ir.sample_enable&&(un?Je.enable(32928):Je.disable(32928),ir.sample_enable=un),Zn=Hi[0],Wo=Hi[1],(Zn!==Jr[0]||Wo!==Jr[1])&&(Je.sampleCoverage(Zn,Wo),Jr[0]=Zn,Jr[1]=Wo),Ba=Kt.stencil_mask,Ba!==ir.stencil_mask&&(Je.stencilMask(Ba),ir.stencil_mask=Ba),Bo=ci[0],Ea=ci[1],Ha=ci[2],(Bo!==Di[0]||Ea!==Di[1]||Ha!==Di[2])&&(Je.stencilFunc(Bo,Ea,Ha),Di[0]=Bo,Di[1]=Ea,Di[2]=Ha),tn=Lt[0],Cn=Lt[1],Xn=Lt[2],ts=Lt[3],(tn!==vt[0]||Cn!==vt[1]||Xn!==vt[2]||ts!==vt[3])&&(Je.stencilOpSeparate(tn,Cn,Xn,ts),vt[0]=tn,vt[1]=Cn,vt[2]=Xn,vt[3]=ts),Ja=Dt[0],to=Dt[1],Ri=Dt[2],an=Dt[3],(Ja!==Bt[0]||to!==Bt[1]||Ri!==Bt[2]||an!==Bt[3])&&(Je.stencilOpSeparate(Ja,to,Ri,an),Bt[0]=Ja,Bt[1]=to,Bt[2]=Ri,Bt[3]=an)}Je.blendColor(0,0,0,0),Et[0]=0,Et[1]=0,Et[2]=0,Et[3]=0,rt?Je.enable(3042):Je.disable(3042),ir.blend_enable=rt,Je.blendEquationSeparate(32774,32774),Zt[0]=32774,Zt[1]=32774,Je.blendFuncSeparate(770,771,773,1),Lr[0]=770,Lr[1]=771,Lr[2]=773,Lr[3]=1,je?Je.enable(3089):Je.disable(3089),ir.scissor_enable=je,tt?Je.enable(2960):Je.disable(2960),ir.stencil_enable=tt,Or=ir.profile,Or&&(st=performance.now(),r.count+=Mi),Je.useProgram(s.program),Wt=ye.angle_instanced_arrays;var cs,pa,ln,ka,va;for(Pe.setVAO(null),cs=p.location,pa=Fe[cs],pa.buffer||Je.enableVertexAttribArray(cs),(pa.type!==5126||pa.size!==1||pa.buffer!==d||pa.normalized!==!1||pa.offset!==0||pa.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(cs,1,5126,!1,8,0),pa.type=5126,pa.size=1,pa.buffer=d,pa.normalized=!1,pa.offset=0,pa.stride=8),pa.divisor!==0&&(Wt.vertexAttribDivisorANGLE(cs,0),pa.divisor=0),ln=x.location,ka=Fe[ln],ka.buffer||Je.enableVertexAttribArray(ln),(ka.type!==5126||ka.size!==1||ka.buffer!==d||ka.normalized!==!1||ka.offset!==4||ka.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(ln,1,5126,!1,8,4),ka.type=5126,ka.size=1,ka.buffer=d,ka.normalized=!1,ka.offset=4,ka.stride=8),ka.divisor!==0&&(Wt.vertexAttribDivisorANGLE(ln,0),ka.divisor=0),va=fr.elements,va?Je.bindBuffer(34963,va.buffer.buffer):Pe.currentVAO&&(va=Ot.getElements(Pe.currentVAO.elements),va&&Je.bindBuffer(34963,va.buffer.buffer)),tr=0;tr0?Ur.constant[0]:0,bs=Ur.constant.length>1?Ur.constant[1]:0,ps=Ur.constant.length>2?Ur.constant[2]:0,sa=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?Bn=De.createStream(34962,Ur.buffer):Bn=De.getBuffer(Ur.buffer),on="type"in Ur?Yr[Ur.type]:Bn.dtype,ya=!!Ur.normalized,ms=Ur.size|0,mn=Ur.offset|0,Ga=Ur.stride|0,ca=Ur.divisor|0)),bn=u.location,Xi=Fe[bn],_o===1?(Xi.buffer||Je.enableVertexAttribArray(bn),qn=ms||2,(Xi.type!==on||Xi.size!==qn||Xi.buffer!==Bn||Xi.normalized!==ya||Xi.offset!==mn||Xi.stride!==Ga)&&(Je.bindBuffer(34962,Bn.buffer),Je.vertexAttribPointer(bn,qn,on,ya,Ga,mn),Xi.type=on,Xi.size=qn,Xi.buffer=Bn,Xi.normalized=ya,Xi.offset=mn,Xi.stride=Ga),Xi.divisor!==ca&&(Wt.vertexAttribDivisorANGLE(bn,ca),Xi.divisor=ca)):(Xi.buffer&&(Je.disableVertexAttribArray(bn),Xi.buffer=null),(Xi.x!==ks||Xi.y!==bs||Xi.z!==ps||Xi.w!==sa)&&(Je.vertexAttrib4f(bn,ks,bs,ps,sa),Xi.x=ks,Xi.y=bs,Xi.z=ps,Xi.w=sa)),Ia=or.positionFractBuffer,ki.buffer=Ia,yn=!1,Ya=1,ba=0,Da=0,Aa=0,Ln=0,wo=null,wa=0,$i=!1,ea=5126,Sa=0,Za=0,xo=0,de(ki)?(yn=!0,wo=De.createStream(34962,ki),ea=wo.dtype):(wo=De.getBuffer(ki),wo?ea=wo.dtype:"constant"in ki?(Ya=2,typeof ki.constant=="number"?(ba=ki.constant,Da=Aa=Ln=0):(ba=ki.constant.length>0?ki.constant[0]:0,Da=ki.constant.length>1?ki.constant[1]:0,Aa=ki.constant.length>2?ki.constant[2]:0,Ln=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?wo=De.createStream(34962,ki.buffer):wo=De.getBuffer(ki.buffer),ea="type"in ki?Yr[ki.type]:wo.dtype,$i=!!ki.normalized,wa=ki.size|0,Sa=ki.offset|0,Za=ki.stride|0,xo=ki.divisor|0)),Wa=l.location,hn=Fe[Wa],Ya===1?(hn.buffer||Je.enableVertexAttribArray(Wa),Un=wa||2,(hn.type!==ea||hn.size!==Un||hn.buffer!==wo||hn.normalized!==$i||hn.offset!==Sa||hn.stride!==Za)&&(Je.bindBuffer(34962,wo.buffer),Je.vertexAttribPointer(Wa,Un,ea,$i,Za,Sa),hn.type=ea,hn.size=Un,hn.buffer=wo,hn.normalized=$i,hn.offset=Sa,hn.stride=Za),hn.divisor!==xo&&(Wt.vertexAttribDivisorANGLE(Wa,xo),hn.divisor=xo)):(hn.buffer&&(Je.disableVertexAttribArray(Wa),hn.buffer=null),(hn.x!==ba||hn.y!==Da||hn.z!==Aa||hn.w!==Ln)&&(Je.vertexAttrib4f(Wa,ba,Da,Aa,Ln),hn.x=ba,hn.y=Da,hn.z=Aa,hn.w=Ln)),Ss=or.positionBuffer,ti.buffer=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,de(ti)?(Kn=!0,To=De.createStream(34962,ti),Ki=To.dtype):(To=De.getBuffer(ti),To?Ki=To.dtype:"constant"in ti?(ns=2,typeof ti.constant=="number"?(Jo=ti.constant,vo=ma=ja=0):(Jo=ti.constant.length>0?ti.constant[0]:0,vo=ti.constant.length>1?ti.constant[1]:0,ma=ti.constant.length>2?ti.constant[2]:0,ja=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?To=De.createStream(34962,ti.buffer):To=De.getBuffer(ti.buffer),Ki="type"in ti?Yr[ti.type]:To.dtype,la=!!ti.normalized,Ao=ti.size|0,ho=ti.offset|0,Ka=ti.stride|0,Ca=ti.divisor|0)),ta=f.location,En=Fe[ta],ns===1?(En.buffer||Je.enableVertexAttribArray(ta),Mo=Ao||2,(En.type!==Ki||En.size!==Mo||En.buffer!==To||En.normalized!==la||En.offset!==ho||En.stride!==Ka)&&(Je.bindBuffer(34962,To.buffer),Je.vertexAttribPointer(ta,Mo,Ki,la,Ka,ho),En.type=Ki,En.size=Mo,En.buffer=To,En.normalized=la,En.offset=ho,En.stride=Ka),En.divisor!==Ca&&(Wt.vertexAttribDivisorANGLE(ta,Ca),En.divisor=Ca)):(En.buffer&&(Je.disableVertexAttribArray(ta),En.buffer=null),(En.x!==Jo||En.y!==vo||En.z!==ma||En.w!==ja)&&(Je.vertexAttrib4f(ta,Jo,vo,ma,ja),En.x=Jo,En.y=vo,En.z=ma,En.w=ja)),Ds=or.positionFractBuffer,ji.buffer=Ds,Ro=!1,vs=1,Ks=0,as=0,Jn=0,Cs=0,Xa=null,Zo=0,Eo=!1,lo=5126,$a=0,Xo=0,rs=0,de(ji)?(Ro=!0,Xa=De.createStream(34962,ji),lo=Xa.dtype):(Xa=De.getBuffer(ji),Xa?lo=Xa.dtype:"constant"in ji?(vs=2,typeof ji.constant=="number"?(Ks=ji.constant,as=Jn=Cs=0):(Ks=ji.constant.length>0?ji.constant[0]:0,as=ji.constant.length>1?ji.constant[1]:0,Jn=ji.constant.length>2?ji.constant[2]:0,Cs=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?Xa=De.createStream(34962,ji.buffer):Xa=De.getBuffer(ji.buffer),lo="type"in ji?Yr[ji.type]:Xa.dtype,Eo=!!ji.normalized,Zo=ji.size|0,$a=ji.offset|0,Xo=ji.stride|0,rs=ji.divisor|0)),$n=c.location,Sn=Fe[$n],vs===1?(Sn.buffer||Je.enableVertexAttribArray($n),uo=Zo||2,(Sn.type!==lo||Sn.size!==uo||Sn.buffer!==Xa||Sn.normalized!==Eo||Sn.offset!==$a||Sn.stride!==Xo)&&(Je.bindBuffer(34962,Xa.buffer),Je.vertexAttribPointer($n,uo,lo,Eo,Xo,$a),Sn.type=lo,Sn.size=uo,Sn.buffer=Xa,Sn.normalized=Eo,Sn.offset=$a,Sn.stride=Xo),Sn.divisor!==rs&&(Wt.vertexAttribDivisorANGLE($n,rs),Sn.divisor=rs)):(Sn.buffer&&(Je.disableVertexAttribArray($n),Sn.buffer=null),(Sn.x!==Ks||Sn.y!==as||Sn.z!==Jn||Sn.w!==Cs)&&(Je.vertexAttrib4f($n,Ks,as,Jn,Cs),Sn.x=Ks,Sn.y=as,Sn.z=Jn,Sn.w=Cs)),Rs=or.colorBuffer,Vi.buffer=Rs,xs=!1,Go=1,os=0,So=0,Qn=0,zo=0,rl=null,$o=0,Na=!1,Ua=5126,Po=0,fo=0,ro=0,de(Vi)?(xs=!0,rl=De.createStream(34962,Vi),Ua=rl.dtype):(rl=De.getBuffer(Vi),rl?Ua=rl.dtype:"constant"in Vi?(Go=2,typeof Vi.constant=="number"?(os=Vi.constant,So=Qn=zo=0):(os=Vi.constant.length>0?Vi.constant[0]:0,So=Vi.constant.length>1?Vi.constant[1]:0,Qn=Vi.constant.length>2?Vi.constant[2]:0,zo=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?rl=De.createStream(34962,Vi.buffer):rl=De.getBuffer(Vi.buffer),Ua="type"in Vi?Yr[Vi.type]:rl.dtype,Na=!!Vi.normalized,$o=Vi.size|0,Po=Vi.offset|0,fo=Vi.stride|0,ro=Vi.divisor|0)),Ma=h.location,io=Fe[Ma],Go===1?(io.buffer||Je.enableVertexAttribArray(Ma),aa=$o||4,(io.type!==Ua||io.size!==aa||io.buffer!==rl||io.normalized!==Na||io.offset!==Po||io.stride!==fo)&&(Je.bindBuffer(34962,rl.buffer),Je.vertexAttribPointer(Ma,aa,Ua,Na,fo,Po),io.type=Ua,io.size=aa,io.buffer=rl,io.normalized=Na,io.offset=Po,io.stride=fo),io.divisor!==ro&&(Wt.vertexAttribDivisorANGLE(Ma,ro),io.divisor=ro)):(io.buffer&&(Je.disableVertexAttribArray(Ma),io.buffer=null),(io.x!==os||io.y!==So||io.z!==Qn||io.w!==zo)&&(Je.vertexAttrib4f(Ma,os,So,Qn,zo),io.x=os,io.y=So,io.z=Qn,io.w=zo)),Oo=or.dashLength,(!tr||No!==Oo)&&(No=Oo,Je.uniform1f(b.location,Oo)),Zs=or.dashTexture,Zs&&Zs._reglType==="framebuffer"&&(Zs=Zs.color[0]),Fs=Zs._texture,Je.uniform1i(y.location,Fs.bind()),ws=or.depth,(!tr||no!==ws)&&(no=ws,Je.uniform1f(E.location,ws)),Ls=or.opacity,(!tr||ds!==Ls)&&(ds=Ls,Je.uniform1f(k.location,Ls)),Xs=or.scale,oa=Xs[0],po=Xs[1],(!tr||Yo!==oa||ss!==po)&&(Yo=oa,ss=po,Je.uniform2f(A.location,oa,po)),ls=or.scaleFract,gs=ls[0],Ft=ls[1],(!tr||bt!==gs||hr!==Ft)&&(bt=gs,hr=Ft,Je.uniform2f(L.location,gs,Ft)),nr=or.thickness,(!tr||Sr!==nr)&&(Sr=nr,Je.uniform1f(_.location,nr)),li=or.translate,di=li[0],Oi=li[1],(!tr||mi!==di||dn!==Oi)&&(mi=di,dn=Oi,Je.uniform2f(C.location,di,Oi)),wi=or.translateFract,ui=wi[0],gi=wi[1],(!tr||Ai!==ui||gn!==gi)&&(Ai=ui,gn=gi,Je.uniform2f(M.location,ui,gi)),In=z.call(this,Mt,or,tr),Vn=In[0],Hn=In[1],pn=In[2],us=In[3],(!tr||Rn!==Vn||Gn!==Hn||Lo!==pn||Bs!==us)&&(Rn=Vn,Gn=Hn,Lo=pn,Bs=us,Je.uniform4f(v.location,Vn,Hn,pn,us)),Js=or.count,Js>0?va?Wt.drawElementsInstancedANGLE(5,4,va.type,0<<(va.type-5121>>1),Js):Wt.drawArraysInstancedANGLE(5,0,4,Js):Js<0&&(va?Je.drawElements(5,4,va.type,0<<(va.type-5121>>1)):Je.drawArrays(5,0,4)),Mt.viewportWidth=Qi,Mt.viewportHeight=Nn,An&&De.destroyStream(Bn),yn&&De.destroyStream(wo),Kn&&De.destroyStream(To),Ro&&De.destroyStream(Xa),xs&&De.destroyStream(rl),Fs.unbind()}ir.dirty=!0,Pe.setVAO(null),Or&&(r.cpuTime+=performance.now()-st)}}}});var S9=Se((r1r,OOe)=>{OOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De){"use strict";var _e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or;return _e=t.gl,Fe=t.context,Pe=t.strings,Ie=t.next,lt=t.current,ye=t.draw,ue=t.elements,de=t.buffer,ht=t.shader,Et=t.attributes,St=t.vao,Zt=t.uniforms,qr=t.framebuffer,Lr=t.extensions,vr=t.timer,Er=t.isBufferArgs,si=Ie.blend_color,Ei=lt.blend_color,Si=Ie.blend_equation,xi=lt.blend_equation,Hi=Ie.blend_func,Jr=lt.blend_func,ci=Ie.depth_range,Di=lt.depth_range,Lt=Ie.colorMask,vt=lt.colorMask,Dt=Ie.polygonOffset_offset,Bt=lt.polygonOffset_offset,sr=Ie.sample_coverage,br=lt.sample_coverage,zr=Ie.stencil_func,Tr=lt.stencil_func,Rr=Ie.stencil_opFront,Br=lt.stencil_opFront,oi=Ie.stencil_opBack,vi=lt.stencil_opBack,Pi=Ie.scissor_box,Yr=lt.scissor_box,Ni=Ie.viewport,Ur=lt.viewport,ti={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ki={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ji={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Vi={add:32774,subtract:32778,"reverse subtract":32779},zi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Mi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},sn={cw:2304,ccw:2305},fi={},fi.stride=4,fi.offset=0,fi.divisor=1,Or={},Or.stride=4,Or.offset=4,Or.divisor=1,st={},st.stride=8,st.offset=0,st.divisor=1,Wt={},Wt.stride=8,Wt.offset=8,Wt.divisor=1,tr={},tr.stride=8,tr.offset=16,tr.divisor=1,or={},or.stride=8,or.offset=24,or.divisor=1,{draw:function(Nr){var hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo;if(hi=Lr.angle_instanced_arrays,Gi=qr.next,Gi!==qr.cur&&(Gi?_e.bindFramebuffer(36160,Gi.framebuffer):_e.bindFramebuffer(36160,null),qr.cur=Gi),lt.dirty){var po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol;po=Ie.dither,po!==lt.dither&&(po?_e.enable(3024):_e.disable(3024),lt.dither=po),ss=Ie.depth_func,ss!==lt.depth_func&&(_e.depthFunc(ss),lt.depth_func=ss),ls=ci[0],gs=ci[1],(ls!==Di[0]||gs!==Di[1])&&(_e.depthRange(ls,gs),Di[0]=ls,Di[1]=gs),bt=Ie.depth_mask,bt!==lt.depth_mask&&(_e.depthMask(bt),lt.depth_mask=bt),Ft=Lt[0],hr=Lt[1],nr=Lt[2],Sr=Lt[3],(Ft!==vt[0]||hr!==vt[1]||nr!==vt[2]||Sr!==vt[3])&&(_e.colorMask(Ft,hr,nr,Sr),vt[0]=Ft,vt[1]=hr,vt[2]=nr,vt[3]=Sr),li=Ie.frontFace,li!==lt.frontFace&&(_e.frontFace(li),lt.frontFace=li),di=Ie.lineWidth,di!==lt.lineWidth&&(_e.lineWidth(di),lt.lineWidth=di),mi=Ie.polygonOffset_enable,mi!==lt.polygonOffset_enable&&(mi?_e.enable(32823):_e.disable(32823),lt.polygonOffset_enable=mi),Oi=Dt[0],dn=Dt[1],(Oi!==Bt[0]||dn!==Bt[1])&&(_e.polygonOffset(Oi,dn),Bt[0]=Oi,Bt[1]=dn),wi=Ie.sample_alpha,wi!==lt.sample_alpha&&(wi?_e.enable(32926):_e.disable(32926),lt.sample_alpha=wi),ui=Ie.sample_enable,ui!==lt.sample_enable&&(ui?_e.enable(32928):_e.disable(32928),lt.sample_enable=ui),Ai=sr[0],gi=sr[1],(Ai!==br[0]||gi!==br[1])&&(_e.sampleCoverage(Ai,gi),br[0]=Ai,br[1]=gi),gn=Ie.stencil_mask,gn!==lt.stencil_mask&&(_e.stencilMask(gn),lt.stencil_mask=gn),In=zr[0],Vn=zr[1],Rn=zr[2],(In!==Tr[0]||Vn!==Tr[1]||Rn!==Tr[2])&&(_e.stencilFunc(In,Vn,Rn),Tr[0]=In,Tr[1]=Vn,Tr[2]=Rn),Hn=Rr[0],Gn=Rr[1],pn=Rr[2],Lo=Rr[3],(Hn!==Br[0]||Gn!==Br[1]||pn!==Br[2]||Lo!==Br[3])&&(_e.stencilOpSeparate(Hn,Gn,pn,Lo),Br[0]=Hn,Br[1]=Gn,Br[2]=pn,Br[3]=Lo),us=oi[0],Bs=oi[1],Js=oi[2],ol=oi[3],(us!==vi[0]||Bs!==vi[1]||Js!==vi[2]||ol!==vi[3])&&(_e.stencilOpSeparate(us,Bs,Js,ol),vi[0]=us,vi[1]=Bs,vi[2]=Js,vi[3]=ol)}Qr=Nr.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:Fe.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:Fe.framebufferHeight-zn,_a=Fe.viewportWidth,Fe.viewportWidth=fn,Wn=Fe.viewportHeight,Fe.viewportHeight=xn,_e.viewport(Ui,zn,fn,xn),Ur[0]=Ui,Ur[1]=zn,Ur[2]=fn,Ur[3]=xn,_e.blendColor(0,0,0,0),Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0,n?_e.enable(3042):_e.disable(3042),lt.blend_enable=n,_e.blendEquationSeparate(32774,32774),xi[0]=32774,xi[1]=32774,_e.blendFuncSeparate(770,771,773,1),Jr[0]=770,Jr[1]=771,Jr[2]=773,Jr[3]=1,i?_e.enable(2884):_e.disable(2884),lt.cull_enable=i,_e.cullFace(a),lt.cull_face=a,Fn=o.call(this,Fe,Nr,0),Fn?_e.enable(2929):_e.disable(2929),lt.depth_enable=Fn,ia=Nr.viewport,za=ia.x|0,Hr=ia.y|0,na="width"in ia?ia.width|0:Fe.framebufferWidth-za,go="height"in ia?ia.height|0:Fe.framebufferHeight-Hr,_e.scissor(za,Hr,na,go),Yr[0]=za,Yr[1]=Hr,Yr[2]=na,Yr[3]=go,s?_e.enable(3089):_e.disable(3089),lt.scissor_enable=s,u?_e.enable(2960):_e.disable(2960),lt.stencil_enable=u,Dn=lt.profile,Dn&&(un=performance.now(),r.count++),_e.useProgram(l.program),Zn=Lr.angle_instanced_arrays,St.setVAO(null),Wo=Nr.colorBuffer,fi.buffer=Wo,Ba=!1,Bo=1,Ea=0,Ha=0,tn=0,Cn=0,Xn=null,ts=0,Ja=!1,to=5126,Ri=0,an=0,cs=0,Er(fi)?(Ba=!0,Xn=de.createStream(34962,fi),to=Xn.dtype):(Xn=de.getBuffer(fi),Xn?to=Xn.dtype:"constant"in fi?(Bo=2,typeof fi.constant=="number"?(Ea=fi.constant,Ha=tn=Cn=0):(Ea=fi.constant.length>0?fi.constant[0]:0,Ha=fi.constant.length>1?fi.constant[1]:0,tn=fi.constant.length>2?fi.constant[2]:0,Cn=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?Xn=de.createStream(34962,fi.buffer):Xn=de.getBuffer(fi.buffer),to="type"in fi?Mi[fi.type]:Xn.dtype,Ja=!!fi.normalized,ts=fi.size|0,Ri=fi.offset|0,an=fi.stride|0,cs=fi.divisor|0)),pa=f.location,ln=Et[pa],Bo===1?(ln.buffer||_e.enableVertexAttribArray(pa),ka=ts||4,(ln.type!==to||ln.size!==ka||ln.buffer!==Xn||ln.normalized!==Ja||ln.offset!==Ri||ln.stride!==an)&&(_e.bindBuffer(34962,Xn.buffer),_e.vertexAttribPointer(pa,ka,to,Ja,an,Ri),ln.type=to,ln.size=ka,ln.buffer=Xn,ln.normalized=Ja,ln.offset=Ri,ln.stride=an),ln.divisor!==cs&&(Zn.vertexAttribDivisorANGLE(pa,cs),ln.divisor=cs)):(ln.buffer&&(_e.disableVertexAttribArray(pa),ln.buffer=null),(ln.x!==Ea||ln.y!==Ha||ln.z!==tn||ln.w!==Cn)&&(_e.vertexAttrib4f(pa,Ea,Ha,tn,Cn),ln.x=Ea,ln.y=Ha,ln.z=tn,ln.w=Cn)),va=Nr.positionBuffer,Wt.buffer=va,bo=!1,Co=1,Fi=0,Yn=0,xa=0,Qi=0,Nn=null,Pn=0,qa=!1,jo=5126,Vo=0,Pa=0,Oa=0,Er(Wt)?(bo=!0,Nn=de.createStream(34962,Wt),jo=Nn.dtype):(Nn=de.getBuffer(Wt),Nn?jo=Nn.dtype:"constant"in Wt?(Co=2,typeof Wt.constant=="number"?(Fi=Wt.constant,Yn=xa=Qi=0):(Fi=Wt.constant.length>0?Wt.constant[0]:0,Yn=Wt.constant.length>1?Wt.constant[1]:0,xa=Wt.constant.length>2?Wt.constant[2]:0,Qi=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Nn=de.createStream(34962,Wt.buffer):Nn=de.getBuffer(Wt.buffer),jo="type"in Wt?Mi[Wt.type]:Nn.dtype,qa=!!Wt.normalized,Pn=Wt.size|0,Vo=Wt.offset|0,Pa=Wt.stride|0,Oa=Wt.divisor|0)),co=c.location,An=Et[co],Co===1?(An.buffer||_e.enableVertexAttribArray(co),_o=Pn||2,(An.type!==jo||An.size!==_o||An.buffer!==Nn||An.normalized!==qa||An.offset!==Vo||An.stride!==Pa)&&(_e.bindBuffer(34962,Nn.buffer),_e.vertexAttribPointer(co,_o,jo,qa,Pa,Vo),An.type=jo,An.size=_o,An.buffer=Nn,An.normalized=qa,An.offset=Vo,An.stride=Pa),An.divisor!==Oa&&(Zn.vertexAttribDivisorANGLE(co,Oa),An.divisor=Oa)):(An.buffer&&(_e.disableVertexAttribArray(co),An.buffer=null),(An.x!==Fi||An.y!==Yn||An.z!==xa||An.w!==Qi)&&(_e.vertexAttrib4f(co,Fi,Yn,xa,Qi),An.x=Fi,An.y=Yn,An.z=xa,An.w=Qi)),ks=Nr.colorBuffer,Or.buffer=ks,bs=!1,ps=1,sa=0,Bn=0,ms=0,ya=0,on=null,mn=0,Ga=!1,ca=5126,bn=0,Xi=0,qn=0,Er(Or)?(bs=!0,on=de.createStream(34962,Or),ca=on.dtype):(on=de.getBuffer(Or),on?ca=on.dtype:"constant"in Or?(ps=2,typeof Or.constant=="number"?(sa=Or.constant,Bn=ms=ya=0):(sa=Or.constant.length>0?Or.constant[0]:0,Bn=Or.constant.length>1?Or.constant[1]:0,ms=Or.constant.length>2?Or.constant[2]:0,ya=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?on=de.createStream(34962,Or.buffer):on=de.getBuffer(Or.buffer),ca="type"in Or?Mi[Or.type]:on.dtype,Ga=!!Or.normalized,mn=Or.size|0,bn=Or.offset|0,Xi=Or.stride|0,qn=Or.divisor|0)),Ia=h.location,yn=Et[Ia],ps===1?(yn.buffer||_e.enableVertexAttribArray(Ia),Ya=mn||4,(yn.type!==ca||yn.size!==Ya||yn.buffer!==on||yn.normalized!==Ga||yn.offset!==bn||yn.stride!==Xi)&&(_e.bindBuffer(34962,on.buffer),_e.vertexAttribPointer(Ia,Ya,ca,Ga,Xi,bn),yn.type=ca,yn.size=Ya,yn.buffer=on,yn.normalized=Ga,yn.offset=bn,yn.stride=Xi),yn.divisor!==qn&&(Zn.vertexAttribDivisorANGLE(Ia,qn),yn.divisor=qn)):(yn.buffer&&(_e.disableVertexAttribArray(Ia),yn.buffer=null),(yn.x!==sa||yn.y!==Bn||yn.z!==ms||yn.w!==ya)&&(_e.vertexAttrib4f(Ia,sa,Bn,ms,ya),yn.x=sa,yn.y=Bn,yn.z=ms,yn.w=ya)),ba=Nr.positionBuffer,tr.buffer=ba,Da=!1,Aa=1,Ln=0,wo=0,wa=0,$i=0,ea=null,Sa=0,Za=!1,xo=5126,Wa=0,hn=0,Un=0,Er(tr)?(Da=!0,ea=de.createStream(34962,tr),xo=ea.dtype):(ea=de.getBuffer(tr),ea?xo=ea.dtype:"constant"in tr?(Aa=2,typeof tr.constant=="number"?(Ln=tr.constant,wo=wa=$i=0):(Ln=tr.constant.length>0?tr.constant[0]:0,wo=tr.constant.length>1?tr.constant[1]:0,wa=tr.constant.length>2?tr.constant[2]:0,$i=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?ea=de.createStream(34962,tr.buffer):ea=de.getBuffer(tr.buffer),xo="type"in tr?Mi[tr.type]:ea.dtype,Za=!!tr.normalized,Sa=tr.size|0,Wa=tr.offset|0,hn=tr.stride|0,Un=tr.divisor|0)),Ss=d.location,Kn=Et[Ss],Aa===1?(Kn.buffer||_e.enableVertexAttribArray(Ss),ns=Sa||2,(Kn.type!==xo||Kn.size!==ns||Kn.buffer!==ea||Kn.normalized!==Za||Kn.offset!==Wa||Kn.stride!==hn)&&(_e.bindBuffer(34962,ea.buffer),_e.vertexAttribPointer(Ss,ns,xo,Za,hn,Wa),Kn.type=xo,Kn.size=ns,Kn.buffer=ea,Kn.normalized=Za,Kn.offset=Wa,Kn.stride=hn),Kn.divisor!==Un&&(Zn.vertexAttribDivisorANGLE(Ss,Un),Kn.divisor=Un)):(Kn.buffer&&(_e.disableVertexAttribArray(Ss),Kn.buffer=null),(Kn.x!==Ln||Kn.y!==wo||Kn.z!==wa||Kn.w!==$i)&&(_e.vertexAttrib4f(Ss,Ln,wo,wa,$i),Kn.x=Ln,Kn.y=wo,Kn.z=wa,Kn.w=$i)),Jo=x.location,vo=Et[Jo],vo.buffer||_e.enableVertexAttribArray(Jo),(vo.type!==5126||vo.size!==1||vo.buffer!==p||vo.normalized!==!1||vo.offset!==0||vo.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(Jo,1,5126,!1,8,0),vo.type=5126,vo.size=1,vo.buffer=p,vo.normalized=!1,vo.offset=0,vo.stride=8),vo.divisor!==0&&(Zn.vertexAttribDivisorANGLE(Jo,0),vo.divisor=0),ma=b.location,ja=Et[ma],ja.buffer||_e.enableVertexAttribArray(ma),(ja.type!==5126||ja.size!==1||ja.buffer!==p||ja.normalized!==!1||ja.offset!==4||ja.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(ma,1,5126,!1,8,4),ja.type=5126,ja.size=1,ja.buffer=p,ja.normalized=!1,ja.offset=4,ja.stride=8),ja.divisor!==0&&(Zn.vertexAttribDivisorANGLE(ma,0),ja.divisor=0),To=Nr.positionBuffer,or.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,Er(or)?(Ao=!0,ta=de.createStream(34962,or),Ds=ta.dtype):(ta=de.getBuffer(or),ta?Ds=ta.dtype:"constant"in or?(la=2,typeof or.constant=="number"?(Ki=or.constant,ho=Ka=Ca=0):(Ki=or.constant.length>0?or.constant[0]:0,ho=or.constant.length>1?or.constant[1]:0,Ka=or.constant.length>2?or.constant[2]:0,Ca=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?ta=de.createStream(34962,or.buffer):ta=de.getBuffer(or.buffer),Ds="type"in or?Mi[or.type]:ta.dtype,Mo=!!or.normalized,En=or.size|0,Ro=or.offset|0,vs=or.stride|0,Ks=or.divisor|0)),as=y.location,Jn=Et[as],la===1?(Jn.buffer||_e.enableVertexAttribArray(as),Cs=En||2,(Jn.type!==Ds||Jn.size!==Cs||Jn.buffer!==ta||Jn.normalized!==Mo||Jn.offset!==Ro||Jn.stride!==vs)&&(_e.bindBuffer(34962,ta.buffer),_e.vertexAttribPointer(as,Cs,Ds,Mo,vs,Ro),Jn.type=Ds,Jn.size=Cs,Jn.buffer=ta,Jn.normalized=Mo,Jn.offset=Ro,Jn.stride=vs),Jn.divisor!==Ks&&(Zn.vertexAttribDivisorANGLE(as,Ks),Jn.divisor=Ks)):(Jn.buffer&&(_e.disableVertexAttribArray(as),Jn.buffer=null),(Jn.x!==Ki||Jn.y!==ho||Jn.z!==Ka||Jn.w!==Ca)&&(_e.vertexAttrib4f(as,Ki,ho,Ka,Ca),Jn.x=Ki,Jn.y=ho,Jn.z=Ka,Jn.w=Ca)),Xa=Nr.positionBuffer,st.buffer=Xa,Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Er(st)?(Zo=!0,$n=de.createStream(34962,st),Rs=$n.dtype):($n=de.getBuffer(st),$n?Rs=$n.dtype:"constant"in st?(Eo=2,typeof st.constant=="number"?(lo=st.constant,$a=Xo=rs=0):(lo=st.constant.length>0?st.constant[0]:0,$a=st.constant.length>1?st.constant[1]:0,Xo=st.constant.length>2?st.constant[2]:0,rs=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?$n=de.createStream(34962,st.buffer):$n=de.getBuffer(st.buffer),Rs="type"in st?Mi[st.type]:$n.dtype,uo=!!st.normalized,Sn=st.size|0,xs=st.offset|0,Go=st.stride|0,os=st.divisor|0)),So=E.location,Qn=Et[So],Eo===1?(Qn.buffer||_e.enableVertexAttribArray(So),zo=Sn||2,(Qn.type!==Rs||Qn.size!==zo||Qn.buffer!==$n||Qn.normalized!==uo||Qn.offset!==xs||Qn.stride!==Go)&&(_e.bindBuffer(34962,$n.buffer),_e.vertexAttribPointer(So,zo,Rs,uo,Go,xs),Qn.type=Rs,Qn.size=zo,Qn.buffer=$n,Qn.normalized=uo,Qn.offset=xs,Qn.stride=Go),Qn.divisor!==os&&(Zn.vertexAttribDivisorANGLE(So,os),Qn.divisor=os)):(Qn.buffer&&(_e.disableVertexAttribArray(So),Qn.buffer=null),(Qn.x!==lo||Qn.y!==$a||Qn.z!==Xo||Qn.w!==rs)&&(_e.vertexAttrib4f(So,lo,$a,Xo,rs),Qn.x=lo,Qn.y=$a,Qn.z=Xo,Qn.w=rs)),rl=Nr.dashLength,_e.uniform1f(k.location,rl),$o=Nr.dashTexture,$o&&$o._reglType==="framebuffer"&&($o=$o.color[0]),Na=$o._texture,_e.uniform1i(A.location,Na.bind()),Ua=Nr.depth,_e.uniform1f(L.location,Ua),Po=Nr.miterLimit,_e.uniform1f(_.location,Po),fo=M.call(this,Fe,Nr,0),_e.uniform1f(C.location,fo),ro=Nr.opacity,_e.uniform1f(v.location,ro),Ma=Nr.scale,io=Ma[0],aa=Ma[1],_e.uniform2f(z.location,io,aa),Oo=Nr.thickness,_e.uniform1f(T.location,Oo),No=Nr.translate,Zs=No[0],Fs=No[1],_e.uniform2f(F.location,Zs,Fs),ws=U.call(this,Fe,Nr,0),no=ws[0],Ls=ws[1],ds=ws[2],Xs=ws[3],_e.uniform4f(q.location,no,Ls,ds,Xs),oa=ye.elements,oa?_e.bindBuffer(34963,oa.buffer.buffer):St.currentVAO&&(oa=ue.getElements(St.currentVAO.elements),oa&&_e.bindBuffer(34963,oa.buffer.buffer)),Yo=Nr.count,Yo>0?oa?Zn.drawElementsInstancedANGLE(5,4,oa.type,0<<(oa.type-5121>>1),Yo):Zn.drawArraysInstancedANGLE(5,0,4,Yo):Yo<0&&(oa?_e.drawElements(5,4,oa.type,0<<(oa.type-5121>>1)):_e.drawArrays(5,0,4)),lt.dirty=!0,St.setVAO(null),Fe.viewportWidth=_a,Fe.viewportHeight=Wn,Dn&&(r.cpuTime+=performance.now()-un),Ba&&de.destroyStream(Xn),bo&&de.destroyStream(Nn),bs&&de.destroyStream(on),Da&&de.destroyStream(ea),Ao&&de.destroyStream(ta),Zo&&de.destroyStream($n),Na.unbind()},scope:function(Nr,hi,Gi){var Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye;Qr=Nr.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:Fe.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:Fe.framebufferHeight-zn,_a=Fe.viewportWidth,Fe.viewportWidth=fn,Wn=Fe.viewportHeight,Fe.viewportHeight=xn,Fn=Ni[0],Ni[0]=Ui,ia=Ni[1],Ni[1]=zn,za=Ni[2],Ni[2]=fn,Hr=Ni[3],Ni[3]=xn,na=si[0],si[0]=H,go=si[1],si[1]=j,Dn=si[2],si[2]=G,un=si[3],si[3]=O,Zn=Ie.blend_enable,Ie.blend_enable=W,Wo=Si[0],Si[0]=re,Ba=Si[1],Si[1]=ne,Bo=Hi[0],Hi[0]=be,Ea=Hi[1],Hi[1]=ze,Ha=Hi[2],Hi[2]=Ce,tn=Hi[3],Hi[3]=he,Cn=Ie.cull_enable,Ie.cull_enable=te,Xn=Ie.cull_face,Ie.cull_face=ke,ts=o.call(this,Fe,Nr,Gi),Ja=Ie.depth_enable,Ie.depth_enable=ts,to=Nr.viewport,Ri=to.x|0,an=to.y|0,cs="width"in to?to.width|0:Fe.framebufferWidth-Ri,pa="height"in to?to.height|0:Fe.framebufferHeight-an,ln=Pi[0],Pi[0]=Ri,ka=Pi[1],Pi[1]=an,va=Pi[2],Pi[2]=cs,bo=Pi[3],Pi[3]=pa,Co=Ie.scissor_enable,Ie.scissor_enable=Ee,Fi=Ie.stencil_enable,Ie.stencil_enable=Me,Yn=lt.profile,Yn&&(xa=performance.now(),r.count++),Qi=ye.offset,ye.offset=Oe,Nn=ye.count,ye.count=Re,Pn=Nr.count,qa=ye.instances,ye.instances=Pn,jo=ye.primitive,ye.primitive=me,Vo=M.call(this,Fe,Nr,Gi),Pa=Zt[Be],Zt[Be]=Vo,Oa=Nr.miterLimit,co=Zt[fe],Zt[fe]=Oa,An=Nr.scale,_o=Zt[Ze],Zt[Ze]=An,ks=Nr.scaleFract,bs=Zt[et],Zt[et]=ks,ps=Nr.translateFract,sa=Zt[gt],Zt[gt]=ps,Bn=Nr.translate,ms=Zt[Pt],Zt[Pt]=Bn,ya=Nr.thickness,on=Zt[Qe],Zt[Qe]=ya,mn=Nr.dashTexture,Ga=Zt[Xe],Zt[Xe]=mn,ca=Nr.opacity,bn=Zt[Tt],Zt[Tt]=ca,Xi=Fe.pixelRatio,qn=Zt[xt],Zt[xt]=Xi,Ia=Nr.id,yn=Zt[_t],Zt[_t]=Ia,Ya=Nr.dashLength,ba=Zt[Ct],Zt[Ct]=Ya,Da=U.call(this,Fe,Nr,Gi),Aa=Zt[jt],Zt[jt]=Da,Ln=Nr.depth,wo=Zt[At],Zt[At]=Ln,wa=Te.state,Te.state=1,$i=Te.x,Te.x=0,ea=Te.y,Te.y=0,Sa=Te.z,Te.z=0,Za=Te.w,Te.w=0,xo=Te.buffer,Te.buffer=p,Wa=Te.size,Te.size=0,hn=Te.normalized,Te.normalized=!1,Un=Te.type,Te.type=5126,Ss=Te.offset,Te.offset=0,Kn=Te.stride,Te.stride=8,ns=Te.divisor,Te.divisor=0,Jo=nt.state,nt.state=1,vo=nt.x,nt.x=0,ma=nt.y,nt.y=0,ja=nt.z,nt.z=0,To=nt.w,nt.w=0,Ao=nt.buffer,nt.buffer=p,la=nt.size,nt.size=0,Ki=nt.normalized,nt.normalized=!1,ho=nt.type,nt.type=5126,Ka=nt.offset,nt.offset=4,Ca=nt.stride,nt.stride=8,ta=nt.divisor,nt.divisor=0,En=Nr.colorBuffer,fi.buffer=En,Mo=!1,Ds=1,Ro=0,vs=0,Ks=0,as=0,Jn=null,Cs=0,Xa=!1,Zo=5126,Eo=0,lo=0,$a=0,Er(fi)?(Mo=!0,Jn=de.createStream(34962,fi),Zo=Jn.dtype):(Jn=de.getBuffer(fi),Jn?Zo=Jn.dtype:"constant"in fi?(Ds=2,typeof fi.constant=="number"?(Ro=fi.constant,vs=Ks=as=0):(Ro=fi.constant.length>0?fi.constant[0]:0,vs=fi.constant.length>1?fi.constant[1]:0,Ks=fi.constant.length>2?fi.constant[2]:0,as=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?Jn=de.createStream(34962,fi.buffer):Jn=de.getBuffer(fi.buffer),Zo="type"in fi?Mi[fi.type]:Jn.dtype,Xa=!!fi.normalized,Cs=fi.size|0,Eo=fi.offset|0,lo=fi.stride|0,$a=fi.divisor|0)),Xo=ut.state,ut.state=Ds,rs=ut.x,ut.x=Ro,$n=ut.y,ut.y=vs,Sn=ut.z,ut.z=Ks,uo=ut.w,ut.w=as,Rs=ut.buffer,ut.buffer=Jn,xs=ut.size,ut.size=Cs,Go=ut.normalized,ut.normalized=Xa,os=ut.type,ut.type=Zo,So=ut.offset,ut.offset=Eo,Qn=ut.stride,ut.stride=lo,zo=ut.divisor,ut.divisor=$a,rl=Nr.colorBuffer,Or.buffer=rl,$o=!1,Na=1,Ua=0,Po=0,fo=0,ro=0,Ma=null,io=0,aa=!1,Oo=5126,No=0,Zs=0,Fs=0,Er(Or)?($o=!0,Ma=de.createStream(34962,Or),Oo=Ma.dtype):(Ma=de.getBuffer(Or),Ma?Oo=Ma.dtype:"constant"in Or?(Na=2,typeof Or.constant=="number"?(Ua=Or.constant,Po=fo=ro=0):(Ua=Or.constant.length>0?Or.constant[0]:0,Po=Or.constant.length>1?Or.constant[1]:0,fo=Or.constant.length>2?Or.constant[2]:0,ro=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?Ma=de.createStream(34962,Or.buffer):Ma=de.getBuffer(Or.buffer),Oo="type"in Or?Mi[Or.type]:Ma.dtype,aa=!!Or.normalized,io=Or.size|0,No=Or.offset|0,Zs=Or.stride|0,Fs=Or.divisor|0)),ws=ct.state,ct.state=Na,no=ct.x,ct.x=Ua,Ls=ct.y,ct.y=Po,ds=ct.z,ct.z=fo,Xs=ct.w,ct.w=ro,oa=ct.buffer,ct.buffer=Ma,Yo=ct.size,ct.size=io,po=ct.normalized,ct.normalized=aa,ss=ct.type,ct.type=Oo,ls=ct.offset,ct.offset=No,gs=ct.stride,ct.stride=Zs,bt=ct.divisor,ct.divisor=Fs,Ft=Nr.positionBuffer,st.buffer=Ft,hr=!1,nr=1,Sr=0,li=0,di=0,mi=0,Oi=null,dn=0,wi=!1,ui=5126,Ai=0,gi=0,gn=0,Er(st)?(hr=!0,Oi=de.createStream(34962,st),ui=Oi.dtype):(Oi=de.getBuffer(st),Oi?ui=Oi.dtype:"constant"in st?(nr=2,typeof st.constant=="number"?(Sr=st.constant,li=di=mi=0):(Sr=st.constant.length>0?st.constant[0]:0,li=st.constant.length>1?st.constant[1]:0,di=st.constant.length>2?st.constant[2]:0,mi=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?Oi=de.createStream(34962,st.buffer):Oi=de.getBuffer(st.buffer),ui="type"in st?Mi[st.type]:Oi.dtype,wi=!!st.normalized,dn=st.size|0,Ai=st.offset|0,gi=st.stride|0,gn=st.divisor|0)),In=rt.state,rt.state=nr,Vn=rt.x,rt.x=Sr,Rn=rt.y,rt.y=li,Hn=rt.z,rt.z=di,Gn=rt.w,rt.w=mi,pn=rt.buffer,rt.buffer=Oi,Lo=rt.size,rt.size=dn,us=rt.normalized,rt.normalized=wi,Bs=rt.type,rt.type=ui,Js=rt.offset,rt.offset=Ai,ol=rt.stride,rt.stride=gi,Cl=rt.divisor,rt.divisor=gn,ul=Nr.positionBuffer,Wt.buffer=ul,Gl=!1,Vl=1,Fl=0,ga=0,ko=0,zs=0,Fo=null,Ys=0,Gs=!1,Us=5126,Sl=0,_l=0,kl=0,Er(Wt)?(Gl=!0,Fo=de.createStream(34962,Wt),Us=Fo.dtype):(Fo=de.getBuffer(Wt),Fo?Us=Fo.dtype:"constant"in Wt?(Vl=2,typeof Wt.constant=="number"?(Fl=Wt.constant,ga=ko=zs=0):(Fl=Wt.constant.length>0?Wt.constant[0]:0,ga=Wt.constant.length>1?Wt.constant[1]:0,ko=Wt.constant.length>2?Wt.constant[2]:0,zs=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Fo=de.createStream(34962,Wt.buffer):Fo=de.getBuffer(Wt.buffer),Us="type"in Wt?Mi[Wt.type]:Fo.dtype,Gs=!!Wt.normalized,Ys=Wt.size|0,Sl=Wt.offset|0,_l=Wt.stride|0,kl=Wt.divisor|0)),cl=je.state,je.state=Vl,xl=je.x,je.x=Fl,Uo=je.y,je.y=ga,_s=je.z,je.z=ko,Bl=je.w,je.w=zs,Il=je.buffer,je.buffer=Fo,Dl=je.size,je.size=Ys,oe=je.normalized,je.normalized=Gs,w=je.type,je.type=Us,B=je.offset,je.offset=Sl,Q=je.stride,je.stride=_l,ee=je.divisor,je.divisor=kl,le=Nr.positionBuffer,tr.buffer=le,Ne=!1,$e=1,pt=0,zt=0,Yt=0,Jt=0,yr=null,Ir=0,ce=!1,Ae=5126,qe=0,Ve=0,ot=0,Er(tr)?(Ne=!0,yr=de.createStream(34962,tr),Ae=yr.dtype):(yr=de.getBuffer(tr),yr?Ae=yr.dtype:"constant"in tr?($e=2,typeof tr.constant=="number"?(pt=tr.constant,zt=Yt=Jt=0):(pt=tr.constant.length>0?tr.constant[0]:0,zt=tr.constant.length>1?tr.constant[1]:0,Yt=tr.constant.length>2?tr.constant[2]:0,Jt=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?yr=de.createStream(34962,tr.buffer):yr=de.getBuffer(tr.buffer),Ae="type"in tr?Mi[tr.type]:yr.dtype,ce=!!tr.normalized,Ir=tr.size|0,qe=tr.offset|0,Ve=tr.stride|0,ot=tr.divisor|0)),Ke=tt.state,tt.state=$e,ft=tt.x,tt.x=pt,qt=tt.y,tt.y=zt,Xt=tt.z,tt.z=Yt,$t=tt.w,tt.w=Jt,dr=tt.buffer,tt.buffer=yr,Mr=tt.size,tt.size=Ir,$r=tt.normalized,tt.normalized=ce,ii=tt.type,tt.type=Ae,pi=tt.offset,tt.offset=qe,Yi=tt.stride,tt.stride=Ve,wn=tt.divisor,tt.divisor=ot,Tn=Nr.positionBuffer,or.buffer=Tn,ua=!1,oo=1,el=0,ys=0,il=0,$l=0,pl=null,Hl=0,Ll=!1,Ql=5126,ku=0,Jl=0,Kl=0,Er(or)?(ua=!0,pl=de.createStream(34962,or),Ql=pl.dtype):(pl=de.getBuffer(or),pl?Ql=pl.dtype:"constant"in or?(oo=2,typeof or.constant=="number"?(el=or.constant,ys=il=$l=0):(el=or.constant.length>0?or.constant[0]:0,ys=or.constant.length>1?or.constant[1]:0,il=or.constant.length>2?or.constant[2]:0,$l=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?pl=de.createStream(34962,or.buffer):pl=de.getBuffer(or.buffer),Ql="type"in or?Mi[or.type]:pl.dtype,Ll=!!or.normalized,Hl=or.size|0,ku=or.offset|0,Jl=or.stride|0,Kl=or.divisor|0)),Hu=Je.state,Je.state=oo,tf=Je.x,Je.x=el,Ku=Je.y,Je.y=ys,Gu=Je.z,Je.z=il,Wu=Je.w,Je.w=$l,sf=Je.buffer,Je.buffer=pl,gf=Je.size,Je.size=Hl,nf=Je.normalized,Je.normalized=Ll,af=Je.type,Je.type=Ql,X=Je.offset,Je.offset=ku,se=Je.stride,Je.stride=Jl,Le=Je.divisor,Je.divisor=Kl,We=ht.vert,ht.vert=Mt,Ye=ht.frag,ht.frag=Vt,lt.dirty=!0,hi(Fe,Nr,Gi),Fe.viewportWidth=_a,Fe.viewportHeight=Wn,Ni[0]=Fn,Ni[1]=ia,Ni[2]=za,Ni[3]=Hr,si[0]=na,si[1]=go,si[2]=Dn,si[3]=un,Ie.blend_enable=Zn,Si[0]=Wo,Si[1]=Ba,Hi[0]=Bo,Hi[1]=Ea,Hi[2]=Ha,Hi[3]=tn,Ie.cull_enable=Cn,Ie.cull_face=Xn,Ie.depth_enable=Ja,Pi[0]=ln,Pi[1]=ka,Pi[2]=va,Pi[3]=bo,Ie.scissor_enable=Co,Ie.stencil_enable=Fi,Yn&&(r.cpuTime+=performance.now()-xa),ye.offset=Qi,ye.count=Nn,ye.instances=qa,ye.primitive=jo,Zt[Be]=Pa,Zt[fe]=co,Zt[Ze]=_o,Zt[et]=bs,Zt[gt]=sa,Zt[Pt]=ms,Zt[Qe]=on,Zt[Xe]=Ga,Zt[Tt]=bn,Zt[xt]=qn,Zt[_t]=yn,Zt[Ct]=ba,Zt[jt]=Aa,Zt[At]=wo,Te.state=wa,Te.x=$i,Te.y=ea,Te.z=Sa,Te.w=Za,Te.buffer=xo,Te.size=Wa,Te.normalized=hn,Te.type=Un,Te.offset=Ss,Te.stride=Kn,Te.divisor=ns,nt.state=Jo,nt.x=vo,nt.y=ma,nt.z=ja,nt.w=To,nt.buffer=Ao,nt.size=la,nt.normalized=Ki,nt.type=ho,nt.offset=Ka,nt.stride=Ca,nt.divisor=ta,Mo&&de.destroyStream(Jn),ut.state=Xo,ut.x=rs,ut.y=$n,ut.z=Sn,ut.w=uo,ut.buffer=Rs,ut.size=xs,ut.normalized=Go,ut.type=os,ut.offset=So,ut.stride=Qn,ut.divisor=zo,$o&&de.destroyStream(Ma),ct.state=ws,ct.x=no,ct.y=Ls,ct.z=ds,ct.w=Xs,ct.buffer=oa,ct.size=Yo,ct.normalized=po,ct.type=ss,ct.offset=ls,ct.stride=gs,ct.divisor=bt,hr&&de.destroyStream(Oi),rt.state=In,rt.x=Vn,rt.y=Rn,rt.z=Hn,rt.w=Gn,rt.buffer=pn,rt.size=Lo,rt.normalized=us,rt.type=Bs,rt.offset=Js,rt.stride=ol,rt.divisor=Cl,Gl&&de.destroyStream(Fo),je.state=cl,je.x=xl,je.y=Uo,je.z=_s,je.w=Bl,je.buffer=Il,je.size=Dl,je.normalized=oe,je.type=w,je.offset=B,je.stride=Q,je.divisor=ee,Ne&&de.destroyStream(yr),tt.state=Ke,tt.x=ft,tt.y=qt,tt.z=Xt,tt.w=$t,tt.buffer=dr,tt.size=Mr,tt.normalized=$r,tt.type=ii,tt.offset=pi,tt.stride=Yi,tt.divisor=wn,ua&&de.destroyStream(pl),Je.state=Hu,Je.x=tf,Je.y=Ku,Je.z=Gu,Je.w=Wu,Je.buffer=sf,Je.size=gf,Je.normalized=nf,Je.type=af,Je.offset=X,Je.stride=se,Je.divisor=Le,ht.vert=We,ht.frag=Ye,lt.dirty=!0},batch:function(Nr,hi){var Gi,Qr,Ui,zn,fn,xn,_a;if(Gi=Lr.angle_instanced_arrays,Qr=qr.next,Qr!==qr.cur&&(Qr?_e.bindFramebuffer(36160,Qr.framebuffer):_e.bindFramebuffer(36160,null),qr.cur=Qr),lt.dirty){var Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co;Wn=Ie.dither,Wn!==lt.dither&&(Wn?_e.enable(3024):_e.disable(3024),lt.dither=Wn),Fn=Ie.depth_func,Fn!==lt.depth_func&&(_e.depthFunc(Fn),lt.depth_func=Fn),ia=ci[0],za=ci[1],(ia!==Di[0]||za!==Di[1])&&(_e.depthRange(ia,za),Di[0]=ia,Di[1]=za),Hr=Ie.depth_mask,Hr!==lt.depth_mask&&(_e.depthMask(Hr),lt.depth_mask=Hr),na=Lt[0],go=Lt[1],Dn=Lt[2],un=Lt[3],(na!==vt[0]||go!==vt[1]||Dn!==vt[2]||un!==vt[3])&&(_e.colorMask(na,go,Dn,un),vt[0]=na,vt[1]=go,vt[2]=Dn,vt[3]=un),Zn=Ie.frontFace,Zn!==lt.frontFace&&(_e.frontFace(Zn),lt.frontFace=Zn),Wo=Ie.lineWidth,Wo!==lt.lineWidth&&(_e.lineWidth(Wo),lt.lineWidth=Wo),Ba=Ie.polygonOffset_enable,Ba!==lt.polygonOffset_enable&&(Ba?_e.enable(32823):_e.disable(32823),lt.polygonOffset_enable=Ba),Bo=Dt[0],Ea=Dt[1],(Bo!==Bt[0]||Ea!==Bt[1])&&(_e.polygonOffset(Bo,Ea),Bt[0]=Bo,Bt[1]=Ea),Ha=Ie.sample_alpha,Ha!==lt.sample_alpha&&(Ha?_e.enable(32926):_e.disable(32926),lt.sample_alpha=Ha),tn=Ie.sample_enable,tn!==lt.sample_enable&&(tn?_e.enable(32928):_e.disable(32928),lt.sample_enable=tn),Cn=sr[0],Xn=sr[1],(Cn!==br[0]||Xn!==br[1])&&(_e.sampleCoverage(Cn,Xn),br[0]=Cn,br[1]=Xn),ts=Ie.stencil_mask,ts!==lt.stencil_mask&&(_e.stencilMask(ts),lt.stencil_mask=ts),Ja=zr[0],to=zr[1],Ri=zr[2],(Ja!==Tr[0]||to!==Tr[1]||Ri!==Tr[2])&&(_e.stencilFunc(Ja,to,Ri),Tr[0]=Ja,Tr[1]=to,Tr[2]=Ri),an=Rr[0],cs=Rr[1],pa=Rr[2],ln=Rr[3],(an!==Br[0]||cs!==Br[1]||pa!==Br[2]||ln!==Br[3])&&(_e.stencilOpSeparate(an,cs,pa,ln),Br[0]=an,Br[1]=cs,Br[2]=pa,Br[3]=ln),ka=oi[0],va=oi[1],bo=oi[2],Co=oi[3],(ka!==vi[0]||va!==vi[1]||bo!==vi[2]||Co!==vi[3])&&(_e.stencilOpSeparate(ka,va,bo,Co),vi[0]=ka,vi[1]=va,vi[2]=bo,vi[3]=Co)}_e.blendColor(0,0,0,0),Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0,Kt?_e.enable(3042):_e.disable(3042),lt.blend_enable=Kt,_e.blendEquationSeparate(32774,32774),xi[0]=32774,xi[1]=32774,_e.blendFuncSeparate(770,771,773,1),Jr[0]=770,Jr[1]=771,Jr[2]=773,Jr[3]=1,ir?_e.enable(2884):_e.disable(2884),lt.cull_enable=ir,_e.cullFace(fr),lt.cull_face=fr,Ot?_e.enable(3089):_e.disable(3089),lt.scissor_enable=Ot,De?_e.enable(2960):_e.disable(2960),lt.stencil_enable=De,Ui=lt.profile,Ui&&(zn=performance.now(),r.count+=hi),_e.useProgram(l.program),fn=Lr.angle_instanced_arrays;var Fi,Yn,xa,Qi,Nn;for(St.setVAO(null),Fi=x.location,Yn=Et[Fi],Yn.buffer||_e.enableVertexAttribArray(Fi),(Yn.type!==5126||Yn.size!==1||Yn.buffer!==p||Yn.normalized!==!1||Yn.offset!==0||Yn.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(Fi,1,5126,!1,8,0),Yn.type=5126,Yn.size=1,Yn.buffer=p,Yn.normalized=!1,Yn.offset=0,Yn.stride=8),Yn.divisor!==0&&(fn.vertexAttribDivisorANGLE(Fi,0),Yn.divisor=0),xa=b.location,Qi=Et[xa],Qi.buffer||_e.enableVertexAttribArray(xa),(Qi.type!==5126||Qi.size!==1||Qi.buffer!==p||Qi.normalized!==!1||Qi.offset!==4||Qi.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(xa,1,5126,!1,8,4),Qi.type=5126,Qi.size=1,Qi.buffer=p,Qi.normalized=!1,Qi.offset=4,Qi.stride=8),Qi.divisor!==0&&(fn.vertexAttribDivisorANGLE(xa,0),Qi.divisor=0),Nn=ye.elements,Nn?_e.bindBuffer(34963,Nn.buffer.buffer):St.currentVAO&&(Nn=ue.getElements(St.currentVAO.elements),Nn&&_e.bindBuffer(34963,Nn.buffer.buffer)),xn=0;xn0?fi.constant[0]:0,mn=fi.constant.length>1?fi.constant[1]:0,Ga=fi.constant.length>2?fi.constant[2]:0,ca=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?bn=de.createStream(34962,fi.buffer):bn=de.getBuffer(fi.buffer),Ia="type"in fi?Mi[fi.type]:bn.dtype,qn=!!fi.normalized,Xi=fi.size|0,yn=fi.offset|0,Ya=fi.stride|0,ba=fi.divisor|0)),Da=f.location,Aa=Et[Da],ya===1?(Aa.buffer||_e.enableVertexAttribArray(Da),Ln=Xi||4,(Aa.type!==Ia||Aa.size!==Ln||Aa.buffer!==bn||Aa.normalized!==qn||Aa.offset!==yn||Aa.stride!==Ya)&&(_e.bindBuffer(34962,bn.buffer),_e.vertexAttribPointer(Da,Ln,Ia,qn,Ya,yn),Aa.type=Ia,Aa.size=Ln,Aa.buffer=bn,Aa.normalized=qn,Aa.offset=yn,Aa.stride=Ya),Aa.divisor!==ba&&(fn.vertexAttribDivisorANGLE(Da,ba),Aa.divisor=ba)):(Aa.buffer&&(_e.disableVertexAttribArray(Da),Aa.buffer=null),(Aa.x!==on||Aa.y!==mn||Aa.z!==Ga||Aa.w!==ca)&&(_e.vertexAttrib4f(Da,on,mn,Ga,ca),Aa.x=on,Aa.y=mn,Aa.z=Ga,Aa.w=ca)),wo=_a.positionBuffer,Wt.buffer=wo,wa=!1,$i=1,ea=0,Sa=0,Za=0,xo=0,Wa=null,hn=0,Un=!1,Ss=5126,Kn=0,ns=0,Jo=0,Er(Wt)?(wa=!0,Wa=de.createStream(34962,Wt),Ss=Wa.dtype):(Wa=de.getBuffer(Wt),Wa?Ss=Wa.dtype:"constant"in Wt?($i=2,typeof Wt.constant=="number"?(ea=Wt.constant,Sa=Za=xo=0):(ea=Wt.constant.length>0?Wt.constant[0]:0,Sa=Wt.constant.length>1?Wt.constant[1]:0,Za=Wt.constant.length>2?Wt.constant[2]:0,xo=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Wa=de.createStream(34962,Wt.buffer):Wa=de.getBuffer(Wt.buffer),Ss="type"in Wt?Mi[Wt.type]:Wa.dtype,Un=!!Wt.normalized,hn=Wt.size|0,Kn=Wt.offset|0,ns=Wt.stride|0,Jo=Wt.divisor|0)),vo=c.location,ma=Et[vo],$i===1?(ma.buffer||_e.enableVertexAttribArray(vo),ja=hn||2,(ma.type!==Ss||ma.size!==ja||ma.buffer!==Wa||ma.normalized!==Un||ma.offset!==Kn||ma.stride!==ns)&&(_e.bindBuffer(34962,Wa.buffer),_e.vertexAttribPointer(vo,ja,Ss,Un,ns,Kn),ma.type=Ss,ma.size=ja,ma.buffer=Wa,ma.normalized=Un,ma.offset=Kn,ma.stride=ns),ma.divisor!==Jo&&(fn.vertexAttribDivisorANGLE(vo,Jo),ma.divisor=Jo)):(ma.buffer&&(_e.disableVertexAttribArray(vo),ma.buffer=null),(ma.x!==ea||ma.y!==Sa||ma.z!==Za||ma.w!==xo)&&(_e.vertexAttrib4f(vo,ea,Sa,Za,xo),ma.x=ea,ma.y=Sa,ma.z=Za,ma.w=xo)),To=_a.colorBuffer,Or.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,Er(Or)?(Ao=!0,ta=de.createStream(34962,Or),Ds=ta.dtype):(ta=de.getBuffer(Or),ta?Ds=ta.dtype:"constant"in Or?(la=2,typeof Or.constant=="number"?(Ki=Or.constant,ho=Ka=Ca=0):(Ki=Or.constant.length>0?Or.constant[0]:0,ho=Or.constant.length>1?Or.constant[1]:0,Ka=Or.constant.length>2?Or.constant[2]:0,Ca=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?ta=de.createStream(34962,Or.buffer):ta=de.getBuffer(Or.buffer),Ds="type"in Or?Mi[Or.type]:ta.dtype,Mo=!!Or.normalized,En=Or.size|0,Ro=Or.offset|0,vs=Or.stride|0,Ks=Or.divisor|0)),as=h.location,Jn=Et[as],la===1?(Jn.buffer||_e.enableVertexAttribArray(as),Cs=En||4,(Jn.type!==Ds||Jn.size!==Cs||Jn.buffer!==ta||Jn.normalized!==Mo||Jn.offset!==Ro||Jn.stride!==vs)&&(_e.bindBuffer(34962,ta.buffer),_e.vertexAttribPointer(as,Cs,Ds,Mo,vs,Ro),Jn.type=Ds,Jn.size=Cs,Jn.buffer=ta,Jn.normalized=Mo,Jn.offset=Ro,Jn.stride=vs),Jn.divisor!==Ks&&(fn.vertexAttribDivisorANGLE(as,Ks),Jn.divisor=Ks)):(Jn.buffer&&(_e.disableVertexAttribArray(as),Jn.buffer=null),(Jn.x!==Ki||Jn.y!==ho||Jn.z!==Ka||Jn.w!==Ca)&&(_e.vertexAttrib4f(as,Ki,ho,Ka,Ca),Jn.x=Ki,Jn.y=ho,Jn.z=Ka,Jn.w=Ca)),Xa=_a.positionBuffer,tr.buffer=Xa,Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Er(tr)?(Zo=!0,$n=de.createStream(34962,tr),Rs=$n.dtype):($n=de.getBuffer(tr),$n?Rs=$n.dtype:"constant"in tr?(Eo=2,typeof tr.constant=="number"?(lo=tr.constant,$a=Xo=rs=0):(lo=tr.constant.length>0?tr.constant[0]:0,$a=tr.constant.length>1?tr.constant[1]:0,Xo=tr.constant.length>2?tr.constant[2]:0,rs=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?$n=de.createStream(34962,tr.buffer):$n=de.getBuffer(tr.buffer),Rs="type"in tr?Mi[tr.type]:$n.dtype,uo=!!tr.normalized,Sn=tr.size|0,xs=tr.offset|0,Go=tr.stride|0,os=tr.divisor|0)),So=d.location,Qn=Et[So],Eo===1?(Qn.buffer||_e.enableVertexAttribArray(So),zo=Sn||2,(Qn.type!==Rs||Qn.size!==zo||Qn.buffer!==$n||Qn.normalized!==uo||Qn.offset!==xs||Qn.stride!==Go)&&(_e.bindBuffer(34962,$n.buffer),_e.vertexAttribPointer(So,zo,Rs,uo,Go,xs),Qn.type=Rs,Qn.size=zo,Qn.buffer=$n,Qn.normalized=uo,Qn.offset=xs,Qn.stride=Go),Qn.divisor!==os&&(fn.vertexAttribDivisorANGLE(So,os),Qn.divisor=os)):(Qn.buffer&&(_e.disableVertexAttribArray(So),Qn.buffer=null),(Qn.x!==lo||Qn.y!==$a||Qn.z!==Xo||Qn.w!==rs)&&(_e.vertexAttrib4f(So,lo,$a,Xo,rs),Qn.x=lo,Qn.y=$a,Qn.z=Xo,Qn.w=rs)),rl=_a.positionBuffer,or.buffer=rl,$o=!1,Na=1,Ua=0,Po=0,fo=0,ro=0,Ma=null,io=0,aa=!1,Oo=5126,No=0,Zs=0,Fs=0,Er(or)?($o=!0,Ma=de.createStream(34962,or),Oo=Ma.dtype):(Ma=de.getBuffer(or),Ma?Oo=Ma.dtype:"constant"in or?(Na=2,typeof or.constant=="number"?(Ua=or.constant,Po=fo=ro=0):(Ua=or.constant.length>0?or.constant[0]:0,Po=or.constant.length>1?or.constant[1]:0,fo=or.constant.length>2?or.constant[2]:0,ro=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?Ma=de.createStream(34962,or.buffer):Ma=de.getBuffer(or.buffer),Oo="type"in or?Mi[or.type]:Ma.dtype,aa=!!or.normalized,io=or.size|0,No=or.offset|0,Zs=or.stride|0,Fs=or.divisor|0)),ws=y.location,no=Et[ws],Na===1?(no.buffer||_e.enableVertexAttribArray(ws),Ls=io||2,(no.type!==Oo||no.size!==Ls||no.buffer!==Ma||no.normalized!==aa||no.offset!==No||no.stride!==Zs)&&(_e.bindBuffer(34962,Ma.buffer),_e.vertexAttribPointer(ws,Ls,Oo,aa,Zs,No),no.type=Oo,no.size=Ls,no.buffer=Ma,no.normalized=aa,no.offset=No,no.stride=Zs),no.divisor!==Fs&&(fn.vertexAttribDivisorANGLE(ws,Fs),no.divisor=Fs)):(no.buffer&&(_e.disableVertexAttribArray(ws),no.buffer=null),(no.x!==Ua||no.y!==Po||no.z!==fo||no.w!==ro)&&(_e.vertexAttrib4f(ws,Ua,Po,fo,ro),no.x=Ua,no.y=Po,no.z=fo,no.w=ro)),ds=_a.positionBuffer,st.buffer=ds,Xs=!1,oa=1,Yo=0,po=0,ss=0,ls=0,gs=null,bt=0,Ft=!1,hr=5126,nr=0,Sr=0,li=0,Er(st)?(Xs=!0,gs=de.createStream(34962,st),hr=gs.dtype):(gs=de.getBuffer(st),gs?hr=gs.dtype:"constant"in st?(oa=2,typeof st.constant=="number"?(Yo=st.constant,po=ss=ls=0):(Yo=st.constant.length>0?st.constant[0]:0,po=st.constant.length>1?st.constant[1]:0,ss=st.constant.length>2?st.constant[2]:0,ls=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?gs=de.createStream(34962,st.buffer):gs=de.getBuffer(st.buffer),hr="type"in st?Mi[st.type]:gs.dtype,Ft=!!st.normalized,bt=st.size|0,nr=st.offset|0,Sr=st.stride|0,li=st.divisor|0)),di=E.location,mi=Et[di],oa===1?(mi.buffer||_e.enableVertexAttribArray(di),Oi=bt||2,(mi.type!==hr||mi.size!==Oi||mi.buffer!==gs||mi.normalized!==Ft||mi.offset!==nr||mi.stride!==Sr)&&(_e.bindBuffer(34962,gs.buffer),_e.vertexAttribPointer(di,Oi,hr,Ft,Sr,nr),mi.type=hr,mi.size=Oi,mi.buffer=gs,mi.normalized=Ft,mi.offset=nr,mi.stride=Sr),mi.divisor!==li&&(fn.vertexAttribDivisorANGLE(di,li),mi.divisor=li)):(mi.buffer&&(_e.disableVertexAttribArray(di),mi.buffer=null),(mi.x!==Yo||mi.y!==po||mi.z!==ss||mi.w!==ls)&&(_e.vertexAttrib4f(di,Yo,po,ss,ls),mi.x=Yo,mi.y=po,mi.z=ss,mi.w=ls)),dn=_a.dashLength,(!xn||wi!==dn)&&(wi=dn,_e.uniform1f(k.location,dn)),ui=_a.dashTexture,ui&&ui._reglType==="framebuffer"&&(ui=ui.color[0]),Ai=ui._texture,_e.uniform1i(A.location,Ai.bind()),gi=_a.depth,(!xn||gn!==gi)&&(gn=gi,_e.uniform1f(L.location,gi)),In=_a.miterLimit,(!xn||Vn!==In)&&(Vn=In,_e.uniform1f(_.location,In)),Rn=M.call(this,Fe,_a,xn),(!xn||Hn!==Rn)&&(Hn=Rn,_e.uniform1f(C.location,Rn)),Gn=_a.opacity,(!xn||pn!==Gn)&&(pn=Gn,_e.uniform1f(v.location,Gn)),Lo=_a.scale,us=Lo[0],Js=Lo[1],(!xn||Bs!==us||ol!==Js)&&(Bs=us,ol=Js,_e.uniform2f(z.location,us,Js)),Cl=_a.thickness,(!xn||ul!==Cl)&&(ul=Cl,_e.uniform1f(T.location,Cl)),Gl=_a.translate,Vl=Gl[0],ga=Gl[1],(!xn||Fl!==Vl||ko!==ga)&&(Fl=Vl,ko=ga,_e.uniform2f(F.location,Vl,ga)),zs=U.call(this,Fe,_a,xn),Fo=zs[0],Gs=zs[1],Sl=zs[2],kl=zs[3],(!xn||Ys!==Fo||Us!==Gs||_l!==Sl||cl!==kl)&&(Ys=Fo,Us=Gs,_l=Sl,cl=kl,_e.uniform4f(q.location,Fo,Gs,Sl,kl)),xl=_a.count,xl>0?Nn?fn.drawElementsInstancedANGLE(5,4,Nn.type,0<<(Nn.type-5121>>1),xl):fn.drawArraysInstancedANGLE(5,0,4,xl):xl<0&&(Nn?_e.drawElements(5,4,Nn.type,0<<(Nn.type-5121>>1)):_e.drawArrays(5,0,4)),Fe.viewportWidth=Oa,Fe.viewportHeight=co,ms&&de.destroyStream(bn),wa&&de.destroyStream(Wa),Ao&&de.destroyStream(ta),Zo&&de.destroyStream($n),$o&&de.destroyStream(Ma),Xs&&de.destroyStream(gs),Ai.unbind()}lt.dirty=!0,St.setVAO(null),Ui&&(r.cpuTime+=performance.now()-zn)}}}});var M9=Se((i1r,NOe)=>{NOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze){"use strict";var et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci;return et=t.gl,gt=t.context,Pt=t.strings,Qe=t.next,Xe=t.current,Tt=t.draw,xt=t.elements,_t=t.buffer,Ct=t.shader,jt=t.attributes,At=t.vao,Te=t.uniforms,nt=t.framebuffer,ut=t.extensions,ct=t.timer,rt=t.isBufferArgs,je=Qe.blend_color,tt=Xe.blend_color,Je=Qe.blend_equation,Mt=Xe.blend_equation,Vt=Qe.blend_func,Kt=Xe.blend_func,ir=Qe.depth_range,fr=Xe.depth_range,Ot=Qe.colorMask,De=Xe.colorMask,_e=Qe.polygonOffset_offset,Fe=Xe.polygonOffset_offset,Pe=Qe.sample_coverage,Ie=Xe.sample_coverage,lt=Qe.stencil_func,ye=Xe.stencil_func,ue=Qe.stencil_opFront,de=Xe.stencil_opFront,ht=Qe.stencil_opBack,Et=Xe.stencil_opBack,St=Qe.scissor_box,Zt=Xe.scissor_box,qr=Qe.viewport,Lr=Xe.viewport,vr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Er={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},si={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ei={add:32774,subtract:32778,"reverse subtract":32779},Si={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Hi={cw:2304,ccw:2305},Jr={},Jr.stride=8,Jr.offset=8,ci={},ci.stride=8,ci.offset=8,{draw:function(Di){var Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa;if(Lt=ut.angle_instanced_arrays,vt=nt.next,vt!==nt.cur&&(vt?et.bindFramebuffer(36160,vt.framebuffer):et.bindFramebuffer(36160,null),nt.cur=vt),Xe.dirty){var jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea;jo=Qe.dither,jo!==Xe.dither&&(jo?et.enable(3024):et.disable(3024),Xe.dither=jo),Vo=Qe.depth_func,Vo!==Xe.depth_func&&(et.depthFunc(Vo),Xe.depth_func=Vo),Pa=ir[0],Oa=ir[1],(Pa!==fr[0]||Oa!==fr[1])&&(et.depthRange(Pa,Oa),fr[0]=Pa,fr[1]=Oa),co=Qe.depth_mask,co!==Xe.depth_mask&&(et.depthMask(co),Xe.depth_mask=co),An=Ot[0],_o=Ot[1],ks=Ot[2],bs=Ot[3],(An!==De[0]||_o!==De[1]||ks!==De[2]||bs!==De[3])&&(et.colorMask(An,_o,ks,bs),De[0]=An,De[1]=_o,De[2]=ks,De[3]=bs),ps=Qe.cull_enable,ps!==Xe.cull_enable&&(ps?et.enable(2884):et.disable(2884),Xe.cull_enable=ps),sa=Qe.cull_face,sa!==Xe.cull_face&&(et.cullFace(sa),Xe.cull_face=sa),Bn=Qe.frontFace,Bn!==Xe.frontFace&&(et.frontFace(Bn),Xe.frontFace=Bn),ms=Qe.lineWidth,ms!==Xe.lineWidth&&(et.lineWidth(ms),Xe.lineWidth=ms),ya=Qe.polygonOffset_enable,ya!==Xe.polygonOffset_enable&&(ya?et.enable(32823):et.disable(32823),Xe.polygonOffset_enable=ya),on=_e[0],mn=_e[1],(on!==Fe[0]||mn!==Fe[1])&&(et.polygonOffset(on,mn),Fe[0]=on,Fe[1]=mn),Ga=Qe.sample_alpha,Ga!==Xe.sample_alpha&&(Ga?et.enable(32926):et.disable(32926),Xe.sample_alpha=Ga),ca=Qe.sample_enable,ca!==Xe.sample_enable&&(ca?et.enable(32928):et.disable(32928),Xe.sample_enable=ca),bn=Pe[0],Xi=Pe[1],(bn!==Ie[0]||Xi!==Ie[1])&&(et.sampleCoverage(bn,Xi),Ie[0]=bn,Ie[1]=Xi),qn=Qe.stencil_mask,qn!==Xe.stencil_mask&&(et.stencilMask(qn),Xe.stencil_mask=qn),Ia=lt[0],yn=lt[1],Ya=lt[2],(Ia!==ye[0]||yn!==ye[1]||Ya!==ye[2])&&(et.stencilFunc(Ia,yn,Ya),ye[0]=Ia,ye[1]=yn,ye[2]=Ya),ba=ue[0],Da=ue[1],Aa=ue[2],Ln=ue[3],(ba!==de[0]||Da!==de[1]||Aa!==de[2]||Ln!==de[3])&&(et.stencilOpSeparate(ba,Da,Aa,Ln),de[0]=ba,de[1]=Da,de[2]=Aa,de[3]=Ln),wo=ht[0],wa=ht[1],$i=ht[2],ea=ht[3],(wo!==Et[0]||wa!==Et[1]||$i!==Et[2]||ea!==Et[3])&&(et.stencilOpSeparate(wo,wa,$i,ea),Et[0]=wo,Et[1]=wa,Et[2]=$i,Et[3]=ea)}Dt=Di.viewport,Bt=Dt.x|0,sr=Dt.y|0,br="width"in Dt?Dt.width|0:gt.framebufferWidth-Bt,zr="height"in Dt?Dt.height|0:gt.framebufferHeight-sr,Tr=gt.viewportWidth,gt.viewportWidth=br,Rr=gt.viewportHeight,gt.viewportHeight=zr,et.viewport(Bt,sr,br,zr),Lr[0]=Bt,Lr[1]=sr,Lr[2]=br,Lr[3]=zr,et.blendColor(0,0,0,0),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,n?et.enable(3042):et.disable(3042),Xe.blend_enable=n,et.blendEquationSeparate(32774,32774),Mt[0]=32774,Mt[1]=32774,et.blendFuncSeparate(770,771,773,1),Kt[0]=770,Kt[1]=771,Kt[2]=773,Kt[3]=1,i?et.enable(2929):et.disable(2929),Xe.depth_enable=i,Br=Di.viewport,oi=Br.x|0,vi=Br.y|0,Pi="width"in Br?Br.width|0:gt.framebufferWidth-oi,Yr="height"in Br?Br.height|0:gt.framebufferHeight-vi,et.scissor(oi,vi,Pi,Yr),Zt[0]=oi,Zt[1]=vi,Zt[2]=Pi,Zt[3]=Yr,a?et.enable(3089):et.disable(3089),Xe.scissor_enable=a,o?et.enable(2960):et.disable(2960),Xe.stencil_enable=o,Ni=Xe.profile,Ni&&(Ur=performance.now(),r.count++),et.useProgram(s.program),ti=ut.angle_instanced_arrays,At.setVAO(null),ki=Di.positionBuffer,Jr.buffer=ki,ji=!1,Vi=1,zi=0,Mi=0,sn=0,fi=0,Or=null,st=0,Wt=!1,tr=5126,or=0,Nr=0,hi=0,rt(Jr)?(ji=!0,Or=_t.createStream(34962,Jr),tr=Or.dtype):(Or=_t.getBuffer(Jr),Or?tr=Or.dtype:"constant"in Jr?(Vi=2,typeof Jr.constant=="number"?(zi=Jr.constant,Mi=sn=fi=0):(zi=Jr.constant.length>0?Jr.constant[0]:0,Mi=Jr.constant.length>1?Jr.constant[1]:0,sn=Jr.constant.length>2?Jr.constant[2]:0,fi=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?Or=_t.createStream(34962,Jr.buffer):Or=_t.getBuffer(Jr.buffer),tr="type"in Jr?xi[Jr.type]:Or.dtype,Wt=!!Jr.normalized,st=Jr.size|0,or=Jr.offset|0,Nr=Jr.stride|0,hi=Jr.divisor|0)),Gi=u.location,Qr=jt[Gi],Vi===1?(Qr.buffer||et.enableVertexAttribArray(Gi),Ui=st||2,(Qr.type!==tr||Qr.size!==Ui||Qr.buffer!==Or||Qr.normalized!==Wt||Qr.offset!==or||Qr.stride!==Nr)&&(et.bindBuffer(34962,Or.buffer),et.vertexAttribPointer(Gi,Ui,tr,Wt,Nr,or),Qr.type=tr,Qr.size=Ui,Qr.buffer=Or,Qr.normalized=Wt,Qr.offset=or,Qr.stride=Nr),Qr.divisor!==hi&&(ti.vertexAttribDivisorANGLE(Gi,hi),Qr.divisor=hi)):(Qr.buffer&&(et.disableVertexAttribArray(Gi),Qr.buffer=null),(Qr.x!==zi||Qr.y!==Mi||Qr.z!==sn||Qr.w!==fi)&&(et.vertexAttrib4f(Gi,zi,Mi,sn,fi),Qr.x=zi,Qr.y=Mi,Qr.z=sn,Qr.w=fi)),zn=Di.positionFractBuffer,ci.buffer=zn,fn=!1,xn=1,_a=0,Wn=0,Fn=0,ia=0,za=null,Hr=0,na=!1,go=5126,Dn=0,un=0,Zn=0,rt(ci)?(fn=!0,za=_t.createStream(34962,ci),go=za.dtype):(za=_t.getBuffer(ci),za?go=za.dtype:"constant"in ci?(xn=2,typeof ci.constant=="number"?(_a=ci.constant,Wn=Fn=ia=0):(_a=ci.constant.length>0?ci.constant[0]:0,Wn=ci.constant.length>1?ci.constant[1]:0,Fn=ci.constant.length>2?ci.constant[2]:0,ia=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?za=_t.createStream(34962,ci.buffer):za=_t.getBuffer(ci.buffer),go="type"in ci?xi[ci.type]:za.dtype,na=!!ci.normalized,Hr=ci.size|0,Dn=ci.offset|0,un=ci.stride|0,Zn=ci.divisor|0)),Wo=l.location,Ba=jt[Wo],xn===1?(Ba.buffer||et.enableVertexAttribArray(Wo),Bo=Hr||2,(Ba.type!==go||Ba.size!==Bo||Ba.buffer!==za||Ba.normalized!==na||Ba.offset!==Dn||Ba.stride!==un)&&(et.bindBuffer(34962,za.buffer),et.vertexAttribPointer(Wo,Bo,go,na,un,Dn),Ba.type=go,Ba.size=Bo,Ba.buffer=za,Ba.normalized=na,Ba.offset=Dn,Ba.stride=un),Ba.divisor!==Zn&&(ti.vertexAttribDivisorANGLE(Wo,Zn),Ba.divisor=Zn)):(Ba.buffer&&(et.disableVertexAttribArray(Wo),Ba.buffer=null),(Ba.x!==_a||Ba.y!==Wn||Ba.z!==Fn||Ba.w!==ia)&&(et.vertexAttrib4f(Wo,_a,Wn,Fn,ia),Ba.x=_a,Ba.y=Wn,Ba.z=Fn,Ba.w=ia)),Ea=Di.fill,Ha=Ea[0],tn=Ea[1],Cn=Ea[2],Xn=Ea[3],et.uniform4f(f.location,Ha,tn,Cn,Xn),ts=Di.id,et.uniform1f(c.location,ts),Ja=Di.opacity,et.uniform1f(h.location,Ja),to=Di.scale,Ri=to[0],an=to[1],et.uniform2f(d.location,Ri,an),cs=Di.scaleFract,pa=cs[0],ln=cs[1],et.uniform2f(p.location,pa,ln),ka=Di.translate,va=ka[0],bo=ka[1],et.uniform2f(x.location,va,bo),Co=Di.translateFract,Fi=Co[0],Yn=Co[1],et.uniform2f(b.location,Fi,Yn),xa=y.call(this,gt,Di,0),Qi=null,Nn=rt(xa),Nn?Qi=xt.createStream(xa):Qi=xt.getElements(xa),Qi&&et.bindBuffer(34963,Qi.buffer.buffer),Pn=Qi?Qi.vertCount:-1,Pn&&(qa=Tt.instances,qa>0?Qi?ti.drawElementsInstancedANGLE(4,Pn,Qi.type,0<<(Qi.type-5121>>1),qa):ti.drawArraysInstancedANGLE(4,0,Pn,qa):qa<0&&(Qi?et.drawElements(4,Pn,Qi.type,0<<(Qi.type-5121>>1)):et.drawArrays(4,0,Pn)),Xe.dirty=!0,At.setVAO(null),gt.viewportWidth=Tr,gt.viewportHeight=Rr,Ni&&(r.cpuTime+=performance.now()-Ur),ji&&_t.destroyStream(Or),fn&&_t.destroyStream(za),Nn&&xt.destroyStream(Qi))},scope:function(Di,Lt,vt){var Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo;Dt=Di.viewport,Bt=Dt.x|0,sr=Dt.y|0,br="width"in Dt?Dt.width|0:gt.framebufferWidth-Bt,zr="height"in Dt?Dt.height|0:gt.framebufferHeight-sr,Tr=gt.viewportWidth,gt.viewportWidth=br,Rr=gt.viewportHeight,gt.viewportHeight=zr,Br=qr[0],qr[0]=Bt,oi=qr[1],qr[1]=sr,vi=qr[2],qr[2]=br,Pi=qr[3],qr[3]=zr,Yr=je[0],je[0]=E,Ni=je[1],je[1]=k,Ur=je[2],je[2]=A,ti=je[3],je[3]=L,ki=Qe.blend_enable,Qe.blend_enable=_,ji=Je[0],Je[0]=C,Vi=Je[1],Je[1]=M,zi=Vt[0],Vt[0]=v,Mi=Vt[1],Vt[1]=z,sn=Vt[2],Vt[2]=T,fi=Vt[3],Vt[3]=F,Or=Qe.depth_enable,Qe.depth_enable=q,st=Di.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:gt.framebufferWidth-Wt,Nr="height"in st?st.height|0:gt.framebufferHeight-tr,hi=St[0],St[0]=Wt,Gi=St[1],St[1]=tr,Qr=St[2],St[2]=or,Ui=St[3],St[3]=Nr,zn=Qe.scissor_enable,Qe.scissor_enable=U,fn=Qe.stencil_enable,Qe.stencil_enable=H,xn=Xe.profile,xn&&(_a=performance.now(),r.count++),Wn=y.call(this,gt,Di,vt),Fn=null,ia=rt(Wn),ia?Fn=xt.createStream(Wn):Fn=xt.getElements(Wn),za=Tt.elements,Tt.elements=Fn,Hr=Tt.offset,Tt.offset=j,na=Fn?Fn.vertCount:-1,go=Tt.count,Tt.count=na,Dn=Tt.primitive,Tt.primitive=G,un=Di.scale,Zn=Te[O],Te[O]=un,Wo=Di.fill,Ba=Te[W],Te[W]=Wo,Bo=Di.scaleFract,Ea=Te[re],Te[re]=Bo,Ha=Di.translateFract,tn=Te[ne],Te[ne]=Ha,Cn=Di.translate,Xn=Te[be],Te[be]=Cn,ts=Di.opacity,Ja=Te[ze],Te[ze]=ts,to=gt.pixelRatio,Ri=Te[Ce],Te[Ce]=to,an=Di.id,cs=Te[he],Te[he]=an,pa=te.call(this,gt,Di,vt),ln=Te[ke],Te[ke]=pa,ka=Di.positionBuffer,Jr.buffer=ka,va=!1,bo=1,Co=0,Fi=0,Yn=0,xa=0,Qi=null,Nn=0,Pn=!1,qa=5126,jo=0,Vo=0,Pa=0,rt(Jr)?(va=!0,Qi=_t.createStream(34962,Jr),qa=Qi.dtype):(Qi=_t.getBuffer(Jr),Qi?qa=Qi.dtype:"constant"in Jr?(bo=2,typeof Jr.constant=="number"?(Co=Jr.constant,Fi=Yn=xa=0):(Co=Jr.constant.length>0?Jr.constant[0]:0,Fi=Jr.constant.length>1?Jr.constant[1]:0,Yn=Jr.constant.length>2?Jr.constant[2]:0,xa=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?Qi=_t.createStream(34962,Jr.buffer):Qi=_t.getBuffer(Jr.buffer),qa="type"in Jr?xi[Jr.type]:Qi.dtype,Pn=!!Jr.normalized,Nn=Jr.size|0,jo=Jr.offset|0,Vo=Jr.stride|0,Pa=Jr.divisor|0)),Oa=Ee.state,Ee.state=bo,co=Ee.x,Ee.x=Co,An=Ee.y,Ee.y=Fi,_o=Ee.z,Ee.z=Yn,ks=Ee.w,Ee.w=xa,bs=Ee.buffer,Ee.buffer=Qi,ps=Ee.size,Ee.size=Nn,sa=Ee.normalized,Ee.normalized=Pn,Bn=Ee.type,Ee.type=qa,ms=Ee.offset,Ee.offset=jo,ya=Ee.stride,Ee.stride=Vo,on=Ee.divisor,Ee.divisor=Pa,mn=Di.positionFractBuffer,ci.buffer=mn,Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,rt(ci)?(Ga=!0,yn=_t.createStream(34962,ci),Da=yn.dtype):(yn=_t.getBuffer(ci),yn?Da=yn.dtype:"constant"in ci?(ca=2,typeof ci.constant=="number"?(bn=ci.constant,Xi=qn=Ia=0):(bn=ci.constant.length>0?ci.constant[0]:0,Xi=ci.constant.length>1?ci.constant[1]:0,qn=ci.constant.length>2?ci.constant[2]:0,Ia=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?yn=_t.createStream(34962,ci.buffer):yn=_t.getBuffer(ci.buffer),Da="type"in ci?xi[ci.type]:yn.dtype,ba=!!ci.normalized,Ya=ci.size|0,Aa=ci.offset|0,Ln=ci.stride|0,wo=ci.divisor|0)),wa=Me.state,Me.state=ca,$i=Me.x,Me.x=bn,ea=Me.y,Me.y=Xi,Sa=Me.z,Me.z=qn,Za=Me.w,Me.w=Ia,xo=Me.buffer,Me.buffer=yn,Wa=Me.size,Me.size=Ya,hn=Me.normalized,Me.normalized=ba,Un=Me.type,Me.type=Da,Ss=Me.offset,Me.offset=Aa,Kn=Me.stride,Me.stride=Ln,ns=Me.divisor,Me.divisor=wo,Jo=Ct.vert,Ct.vert=Oe,vo=Ct.frag,Ct.frag=Re,Xe.dirty=!0,Lt(gt,Di,vt),gt.viewportWidth=Tr,gt.viewportHeight=Rr,qr[0]=Br,qr[1]=oi,qr[2]=vi,qr[3]=Pi,je[0]=Yr,je[1]=Ni,je[2]=Ur,je[3]=ti,Qe.blend_enable=ki,Je[0]=ji,Je[1]=Vi,Vt[0]=zi,Vt[1]=Mi,Vt[2]=sn,Vt[3]=fi,Qe.depth_enable=Or,St[0]=hi,St[1]=Gi,St[2]=Qr,St[3]=Ui,Qe.scissor_enable=zn,Qe.stencil_enable=fn,xn&&(r.cpuTime+=performance.now()-_a),ia&&xt.destroyStream(Fn),Tt.elements=za,Tt.offset=Hr,Tt.count=go,Tt.primitive=Dn,Te[O]=Zn,Te[W]=Ba,Te[re]=Ea,Te[ne]=tn,Te[be]=Xn,Te[ze]=Ja,Te[Ce]=Ri,Te[he]=cs,Te[ke]=ln,va&&_t.destroyStream(Qi),Ee.state=Oa,Ee.x=co,Ee.y=An,Ee.z=_o,Ee.w=ks,Ee.buffer=bs,Ee.size=ps,Ee.normalized=sa,Ee.type=Bn,Ee.offset=ms,Ee.stride=ya,Ee.divisor=on,Ga&&_t.destroyStream(yn),Me.state=wa,Me.x=$i,Me.y=ea,Me.z=Sa,Me.w=Za,Me.buffer=xo,Me.size=Wa,Me.normalized=hn,Me.type=Un,Me.offset=Ss,Me.stride=Kn,Me.divisor=ns,Ct.vert=Jo,Ct.frag=vo,Xe.dirty=!0},batch:function(Di,Lt){var vt,Dt,Bt,sr,br,zr,Tr;if(vt=ut.angle_instanced_arrays,Dt=nt.next,Dt!==nt.cur&&(Dt?et.bindFramebuffer(36160,Dt.framebuffer):et.bindFramebuffer(36160,null),nt.cur=Dt),Xe.dirty){var Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn;Rr=Qe.dither,Rr!==Xe.dither&&(Rr?et.enable(3024):et.disable(3024),Xe.dither=Rr),Br=Qe.depth_func,Br!==Xe.depth_func&&(et.depthFunc(Br),Xe.depth_func=Br),oi=ir[0],vi=ir[1],(oi!==fr[0]||vi!==fr[1])&&(et.depthRange(oi,vi),fr[0]=oi,fr[1]=vi),Pi=Qe.depth_mask,Pi!==Xe.depth_mask&&(et.depthMask(Pi),Xe.depth_mask=Pi),Yr=Ot[0],Ni=Ot[1],Ur=Ot[2],ti=Ot[3],(Yr!==De[0]||Ni!==De[1]||Ur!==De[2]||ti!==De[3])&&(et.colorMask(Yr,Ni,Ur,ti),De[0]=Yr,De[1]=Ni,De[2]=Ur,De[3]=ti),ki=Qe.cull_enable,ki!==Xe.cull_enable&&(ki?et.enable(2884):et.disable(2884),Xe.cull_enable=ki),ji=Qe.cull_face,ji!==Xe.cull_face&&(et.cullFace(ji),Xe.cull_face=ji),Vi=Qe.frontFace,Vi!==Xe.frontFace&&(et.frontFace(Vi),Xe.frontFace=Vi),zi=Qe.lineWidth,zi!==Xe.lineWidth&&(et.lineWidth(zi),Xe.lineWidth=zi),Mi=Qe.polygonOffset_enable,Mi!==Xe.polygonOffset_enable&&(Mi?et.enable(32823):et.disable(32823),Xe.polygonOffset_enable=Mi),sn=_e[0],fi=_e[1],(sn!==Fe[0]||fi!==Fe[1])&&(et.polygonOffset(sn,fi),Fe[0]=sn,Fe[1]=fi),Or=Qe.sample_alpha,Or!==Xe.sample_alpha&&(Or?et.enable(32926):et.disable(32926),Xe.sample_alpha=Or),st=Qe.sample_enable,st!==Xe.sample_enable&&(st?et.enable(32928):et.disable(32928),Xe.sample_enable=st),Wt=Pe[0],tr=Pe[1],(Wt!==Ie[0]||tr!==Ie[1])&&(et.sampleCoverage(Wt,tr),Ie[0]=Wt,Ie[1]=tr),or=Qe.stencil_mask,or!==Xe.stencil_mask&&(et.stencilMask(or),Xe.stencil_mask=or),Nr=lt[0],hi=lt[1],Gi=lt[2],(Nr!==ye[0]||hi!==ye[1]||Gi!==ye[2])&&(et.stencilFunc(Nr,hi,Gi),ye[0]=Nr,ye[1]=hi,ye[2]=Gi),Qr=ue[0],Ui=ue[1],zn=ue[2],fn=ue[3],(Qr!==de[0]||Ui!==de[1]||zn!==de[2]||fn!==de[3])&&(et.stencilOpSeparate(Qr,Ui,zn,fn),de[0]=Qr,de[1]=Ui,de[2]=zn,de[3]=fn),xn=ht[0],_a=ht[1],Wn=ht[2],Fn=ht[3],(xn!==Et[0]||_a!==Et[1]||Wn!==Et[2]||Fn!==Et[3])&&(et.stencilOpSeparate(xn,_a,Wn,Fn),Et[0]=xn,Et[1]=_a,Et[2]=Wn,Et[3]=Fn)}et.blendColor(0,0,0,0),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,me?et.enable(3042):et.disable(3042),Xe.blend_enable=me,et.blendEquationSeparate(32774,32774),Mt[0]=32774,Mt[1]=32774,et.blendFuncSeparate(770,771,773,1),Kt[0]=770,Kt[1]=771,Kt[2]=773,Kt[3]=1,Be?et.enable(2929):et.disable(2929),Xe.depth_enable=Be,fe?et.enable(3089):et.disable(3089),Xe.scissor_enable=fe,Ze?et.enable(2960):et.disable(2960),Xe.stencil_enable=Ze,Bt=Xe.profile,Bt&&(sr=performance.now(),r.count+=Lt),et.useProgram(s.program),br=ut.angle_instanced_arrays;var ia;for(At.setVAO(null),ia=Tt.instances,zr=0;zr0?Jr.constant[0]:0,Ja=Jr.constant.length>1?Jr.constant[1]:0,to=Jr.constant.length>2?Jr.constant[2]:0,Ri=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?an=_t.createStream(34962,Jr.buffer):an=_t.getBuffer(Jr.buffer),ln="type"in Jr?xi[Jr.type]:an.dtype,pa=!!Jr.normalized,cs=Jr.size|0,ka=Jr.offset|0,va=Jr.stride|0,bo=Jr.divisor|0)),Co=u.location,Fi=jt[Co],Xn===1?(Fi.buffer||et.enableVertexAttribArray(Co),Yn=cs||2,(Fi.type!==ln||Fi.size!==Yn||Fi.buffer!==an||Fi.normalized!==pa||Fi.offset!==ka||Fi.stride!==va)&&(et.bindBuffer(34962,an.buffer),et.vertexAttribPointer(Co,Yn,ln,pa,va,ka),Fi.type=ln,Fi.size=Yn,Fi.buffer=an,Fi.normalized=pa,Fi.offset=ka,Fi.stride=va),Fi.divisor!==bo&&(br.vertexAttribDivisorANGLE(Co,bo),Fi.divisor=bo)):(Fi.buffer&&(et.disableVertexAttribArray(Co),Fi.buffer=null),(Fi.x!==ts||Fi.y!==Ja||Fi.z!==to||Fi.w!==Ri)&&(et.vertexAttrib4f(Co,ts,Ja,to,Ri),Fi.x=ts,Fi.y=Ja,Fi.z=to,Fi.w=Ri)),xa=Tr.positionFractBuffer,ci.buffer=xa,Qi=!1,Nn=1,Pn=0,qa=0,jo=0,Vo=0,Pa=null,Oa=0,co=!1,An=5126,_o=0,ks=0,bs=0,rt(ci)?(Qi=!0,Pa=_t.createStream(34962,ci),An=Pa.dtype):(Pa=_t.getBuffer(ci),Pa?An=Pa.dtype:"constant"in ci?(Nn=2,typeof ci.constant=="number"?(Pn=ci.constant,qa=jo=Vo=0):(Pn=ci.constant.length>0?ci.constant[0]:0,qa=ci.constant.length>1?ci.constant[1]:0,jo=ci.constant.length>2?ci.constant[2]:0,Vo=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?Pa=_t.createStream(34962,ci.buffer):Pa=_t.getBuffer(ci.buffer),An="type"in ci?xi[ci.type]:Pa.dtype,co=!!ci.normalized,Oa=ci.size|0,_o=ci.offset|0,ks=ci.stride|0,bs=ci.divisor|0)),ps=l.location,sa=jt[ps],Nn===1?(sa.buffer||et.enableVertexAttribArray(ps),Bn=Oa||2,(sa.type!==An||sa.size!==Bn||sa.buffer!==Pa||sa.normalized!==co||sa.offset!==_o||sa.stride!==ks)&&(et.bindBuffer(34962,Pa.buffer),et.vertexAttribPointer(ps,Bn,An,co,ks,_o),sa.type=An,sa.size=Bn,sa.buffer=Pa,sa.normalized=co,sa.offset=_o,sa.stride=ks),sa.divisor!==bs&&(br.vertexAttribDivisorANGLE(ps,bs),sa.divisor=bs)):(sa.buffer&&(et.disableVertexAttribArray(ps),sa.buffer=null),(sa.x!==Pn||sa.y!==qa||sa.z!==jo||sa.w!==Vo)&&(et.vertexAttrib4f(ps,Pn,qa,jo,Vo),sa.x=Pn,sa.y=qa,sa.z=jo,sa.w=Vo)),ms=Tr.fill,ya=ms[0],mn=ms[1],ca=ms[2],Xi=ms[3],(!zr||on!==ya||Ga!==mn||bn!==ca||qn!==Xi)&&(on=ya,Ga=mn,bn=ca,qn=Xi,et.uniform4f(f.location,ya,mn,ca,Xi)),Ia=Tr.id,(!zr||yn!==Ia)&&(yn=Ia,et.uniform1f(c.location,Ia)),Ya=Tr.opacity,(!zr||ba!==Ya)&&(ba=Ya,et.uniform1f(h.location,Ya)),Da=Tr.scale,Aa=Da[0],wo=Da[1],(!zr||Ln!==Aa||wa!==wo)&&(Ln=Aa,wa=wo,et.uniform2f(d.location,Aa,wo)),$i=Tr.scaleFract,ea=$i[0],Za=$i[1],(!zr||Sa!==ea||xo!==Za)&&(Sa=ea,xo=Za,et.uniform2f(p.location,ea,Za)),Wa=Tr.translate,hn=Wa[0],Ss=Wa[1],(!zr||Un!==hn||Kn!==Ss)&&(Un=hn,Kn=Ss,et.uniform2f(x.location,hn,Ss)),ns=Tr.translateFract,Jo=ns[0],ma=ns[1],(!zr||vo!==Jo||ja!==ma)&&(vo=Jo,ja=ma,et.uniform2f(b.location,Jo,ma)),To=y.call(this,gt,Tr,zr),Ao=null,la=rt(To),la?Ao=xt.createStream(To):Ao=xt.getElements(To),Ao&&et.bindBuffer(34963,Ao.buffer.buffer),Ki=Ao?Ao.vertCount:-1,Ki&&(ia>0?Ao?br.drawElementsInstancedANGLE(4,Ki,Ao.type,0<<(Ao.type-5121>>1),ia):br.drawArraysInstancedANGLE(4,0,Ki,ia):ia<0&&(Ao?et.drawElements(4,Ki,Ao.type,0<<(Ao.type-5121>>1)):et.drawArrays(4,0,Ki)),gt.viewportWidth=un,gt.viewportHeight=Zn,Cn&&_t.destroyStream(an),Qi&&_t.destroyStream(Pa),la&&xt.destroyStream(Ao))}Xe.dirty=!0,At.setVAO(null),Bt&&(r.cpuTime+=performance.now()-sr)}}}});var E9=Se((n1r,UOe)=>{UOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot){"use strict";var De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi;return De=t.gl,_e=t.context,Fe=t.strings,Pe=t.next,Ie=t.current,lt=t.draw,ye=t.elements,ue=t.buffer,de=t.shader,ht=t.attributes,Et=t.vao,St=t.uniforms,Zt=t.framebuffer,qr=t.extensions,Lr=t.timer,vr=t.isBufferArgs,Er=Pe.blend_color,si=Ie.blend_color,Ei=Pe.blend_equation,Si=Ie.blend_equation,xi=Pe.blend_func,Hi=Ie.blend_func,Jr=Pe.depth_range,ci=Ie.depth_range,Di=Pe.colorMask,Lt=Ie.colorMask,vt=Pe.polygonOffset_offset,Dt=Ie.polygonOffset_offset,Bt=Pe.sample_coverage,sr=Ie.sample_coverage,br=Pe.stencil_func,zr=Ie.stencil_func,Tr=Pe.stencil_opFront,Rr=Ie.stencil_opFront,Br=Pe.stencil_opBack,oi=Ie.stencil_opBack,vi=Pe.scissor_box,Pi=Ie.scissor_box,Yr=Pe.viewport,Ni=Ie.viewport,Ur={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ti={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ki={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ji={add:32774,subtract:32778,"reverse subtract":32779},Vi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Mi={cw:2304,ccw:2305},{draw:function(sn){var fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl;if(fi=qr.angle_instanced_arrays,Or=Zt.next,Or!==Zt.cur&&(Or?De.bindFramebuffer(36160,Or.framebuffer):De.bindFramebuffer(36160,null),Zt.cur=Or),Ie.dirty){var _l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr;_l=Pe.dither,_l!==Ie.dither&&(_l?De.enable(3024):De.disable(3024),Ie.dither=_l),kl=Ei[0],cl=Ei[1],(kl!==Si[0]||cl!==Si[1])&&(De.blendEquationSeparate(kl,cl),Si[0]=kl,Si[1]=cl),xl=Pe.depth_func,xl!==Ie.depth_func&&(De.depthFunc(xl),Ie.depth_func=xl),Uo=Jr[0],_s=Jr[1],(Uo!==ci[0]||_s!==ci[1])&&(De.depthRange(Uo,_s),ci[0]=Uo,ci[1]=_s),Bl=Pe.depth_mask,Bl!==Ie.depth_mask&&(De.depthMask(Bl),Ie.depth_mask=Bl),Il=Di[0],Dl=Di[1],oe=Di[2],w=Di[3],(Il!==Lt[0]||Dl!==Lt[1]||oe!==Lt[2]||w!==Lt[3])&&(De.colorMask(Il,Dl,oe,w),Lt[0]=Il,Lt[1]=Dl,Lt[2]=oe,Lt[3]=w),B=Pe.cull_enable,B!==Ie.cull_enable&&(B?De.enable(2884):De.disable(2884),Ie.cull_enable=B),Q=Pe.cull_face,Q!==Ie.cull_face&&(De.cullFace(Q),Ie.cull_face=Q),ee=Pe.frontFace,ee!==Ie.frontFace&&(De.frontFace(ee),Ie.frontFace=ee),le=Pe.lineWidth,le!==Ie.lineWidth&&(De.lineWidth(le),Ie.lineWidth=le),Ne=Pe.polygonOffset_enable,Ne!==Ie.polygonOffset_enable&&(Ne?De.enable(32823):De.disable(32823),Ie.polygonOffset_enable=Ne),$e=vt[0],pt=vt[1],($e!==Dt[0]||pt!==Dt[1])&&(De.polygonOffset($e,pt),Dt[0]=$e,Dt[1]=pt),zt=Pe.sample_alpha,zt!==Ie.sample_alpha&&(zt?De.enable(32926):De.disable(32926),Ie.sample_alpha=zt),Yt=Pe.sample_enable,Yt!==Ie.sample_enable&&(Yt?De.enable(32928):De.disable(32928),Ie.sample_enable=Yt),Jt=Bt[0],yr=Bt[1],(Jt!==sr[0]||yr!==sr[1])&&(De.sampleCoverage(Jt,yr),sr[0]=Jt,sr[1]=yr),Ir=Pe.stencil_mask,Ir!==Ie.stencil_mask&&(De.stencilMask(Ir),Ie.stencil_mask=Ir),ce=br[0],Ae=br[1],qe=br[2],(ce!==zr[0]||Ae!==zr[1]||qe!==zr[2])&&(De.stencilFunc(ce,Ae,qe),zr[0]=ce,zr[1]=Ae,zr[2]=qe),Ve=Tr[0],ot=Tr[1],Ke=Tr[2],ft=Tr[3],(Ve!==Rr[0]||ot!==Rr[1]||Ke!==Rr[2]||ft!==Rr[3])&&(De.stencilOpSeparate(Ve,ot,Ke,ft),Rr[0]=Ve,Rr[1]=ot,Rr[2]=Ke,Rr[3]=ft),qt=Br[0],Xt=Br[1],$t=Br[2],dr=Br[3],(qt!==oi[0]||Xt!==oi[1]||$t!==oi[2]||dr!==oi[3])&&(De.stencilOpSeparate(qt,Xt,$t,dr),oi[0]=qt,oi[1]=Xt,oi[2]=$t,oi[3]=dr)}st=sn.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:_e.framebufferWidth-Wt,Nr="height"in st?st.height|0:_e.framebufferHeight-tr,hi=_e.viewportWidth,_e.viewportWidth=or,Gi=_e.viewportHeight,_e.viewportHeight=Nr,De.viewport(Wt,tr,or,Nr),Ni[0]=Wt,Ni[1]=tr,Ni[2]=or,Ni[3]=Nr,De.blendColor(0,0,0,1),si[0]=0,si[1]=0,si[2]=0,si[3]=1,n?De.enable(3042):De.disable(3042),Ie.blend_enable=n,De.blendFuncSeparate(770,771,773,1),Hi[0]=770,Hi[1]=771,Hi[2]=773,Hi[3]=1,i?De.enable(2929):De.disable(2929),Ie.depth_enable=i,Qr=sn.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:_e.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:_e.framebufferHeight-zn,De.scissor(Ui,zn,fn,xn),Pi[0]=Ui,Pi[1]=zn,Pi[2]=fn,Pi[3]=xn,a?De.enable(3089):De.disable(3089),Ie.scissor_enable=a,o?De.enable(2960):De.disable(2960),Ie.stencil_enable=o,_a=Ie.profile,_a&&(Wn=performance.now(),r.count++),De.useProgram(s.program),Fn=qr.angle_instanced_arrays,Et.setVAO(null),ia=u.call(this,_e,sn,0),za=!1,Hr=1,na=0,go=0,Dn=0,un=0,Zn=null,Wo=0,Ba=!1,Bo=5126,Ea=0,Ha=0,tn=0,vr(ia)?(za=!0,Zn=ue.createStream(34962,ia),Bo=Zn.dtype):(Zn=ue.getBuffer(ia),Zn?Bo=Zn.dtype:"constant"in ia?(Hr=2,typeof ia.constant=="number"?(na=ia.constant,go=Dn=un=0):(na=ia.constant.length>0?ia.constant[0]:0,go=ia.constant.length>1?ia.constant[1]:0,Dn=ia.constant.length>2?ia.constant[2]:0,un=ia.constant.length>3?ia.constant[3]:0)):(vr(ia.buffer)?Zn=ue.createStream(34962,ia.buffer):Zn=ue.getBuffer(ia.buffer),Bo="type"in ia?zi[ia.type]:Zn.dtype,Ba=!!ia.normalized,Wo=ia.size|0,Ea=ia.offset|0,Ha=ia.stride|0,tn=ia.divisor|0)),Cn=l.location,Xn=ht[Cn],Hr===1?(Xn.buffer||De.enableVertexAttribArray(Cn),ts=Wo||4,(Xn.type!==Bo||Xn.size!==ts||Xn.buffer!==Zn||Xn.normalized!==Ba||Xn.offset!==Ea||Xn.stride!==Ha)&&(De.bindBuffer(34962,Zn.buffer),De.vertexAttribPointer(Cn,ts,Bo,Ba,Ha,Ea),Xn.type=Bo,Xn.size=ts,Xn.buffer=Zn,Xn.normalized=Ba,Xn.offset=Ea,Xn.stride=Ha),Xn.divisor!==tn&&(Fn.vertexAttribDivisorANGLE(Cn,tn),Xn.divisor=tn)):(Xn.buffer&&(De.disableVertexAttribArray(Cn),Xn.buffer=null),(Xn.x!==na||Xn.y!==go||Xn.z!==Dn||Xn.w!==un)&&(De.vertexAttrib4f(Cn,na,go,Dn,un),Xn.x=na,Xn.y=go,Xn.z=Dn,Xn.w=un)),Ja=f.call(this,_e,sn,0),to=!1,Ri=1,an=0,cs=0,pa=0,ln=0,ka=null,va=0,bo=!1,Co=5126,Fi=0,Yn=0,xa=0,vr(Ja)?(to=!0,ka=ue.createStream(34962,Ja),Co=ka.dtype):(ka=ue.getBuffer(Ja),ka?Co=ka.dtype:"constant"in Ja?(Ri=2,typeof Ja.constant=="number"?(an=Ja.constant,cs=pa=ln=0):(an=Ja.constant.length>0?Ja.constant[0]:0,cs=Ja.constant.length>1?Ja.constant[1]:0,pa=Ja.constant.length>2?Ja.constant[2]:0,ln=Ja.constant.length>3?Ja.constant[3]:0)):(vr(Ja.buffer)?ka=ue.createStream(34962,Ja.buffer):ka=ue.getBuffer(Ja.buffer),Co="type"in Ja?zi[Ja.type]:ka.dtype,bo=!!Ja.normalized,va=Ja.size|0,Fi=Ja.offset|0,Yn=Ja.stride|0,xa=Ja.divisor|0)),Qi=c.location,Nn=ht[Qi],Ri===1?(Nn.buffer||De.enableVertexAttribArray(Qi),Pn=va||1,(Nn.type!==Co||Nn.size!==Pn||Nn.buffer!==ka||Nn.normalized!==bo||Nn.offset!==Fi||Nn.stride!==Yn)&&(De.bindBuffer(34962,ka.buffer),De.vertexAttribPointer(Qi,Pn,Co,bo,Yn,Fi),Nn.type=Co,Nn.size=Pn,Nn.buffer=ka,Nn.normalized=bo,Nn.offset=Fi,Nn.stride=Yn),Nn.divisor!==xa&&(Fn.vertexAttribDivisorANGLE(Qi,xa),Nn.divisor=xa)):(Nn.buffer&&(De.disableVertexAttribArray(Qi),Nn.buffer=null),(Nn.x!==an||Nn.y!==cs||Nn.z!==pa||Nn.w!==ln)&&(De.vertexAttrib4f(Qi,an,cs,pa,ln),Nn.x=an,Nn.y=cs,Nn.z=pa,Nn.w=ln)),qa=h.call(this,_e,sn,0),jo=!1,Vo=1,Pa=0,Oa=0,co=0,An=0,_o=null,ks=0,bs=!1,ps=5126,sa=0,Bn=0,ms=0,vr(qa)?(jo=!0,_o=ue.createStream(34962,qa),ps=_o.dtype):(_o=ue.getBuffer(qa),_o?ps=_o.dtype:"constant"in qa?(Vo=2,typeof qa.constant=="number"?(Pa=qa.constant,Oa=co=An=0):(Pa=qa.constant.length>0?qa.constant[0]:0,Oa=qa.constant.length>1?qa.constant[1]:0,co=qa.constant.length>2?qa.constant[2]:0,An=qa.constant.length>3?qa.constant[3]:0)):(vr(qa.buffer)?_o=ue.createStream(34962,qa.buffer):_o=ue.getBuffer(qa.buffer),ps="type"in qa?zi[qa.type]:_o.dtype,bs=!!qa.normalized,ks=qa.size|0,sa=qa.offset|0,Bn=qa.stride|0,ms=qa.divisor|0)),ya=d.location,on=ht[ya],Vo===1?(on.buffer||De.enableVertexAttribArray(ya),mn=ks||4,(on.type!==ps||on.size!==mn||on.buffer!==_o||on.normalized!==bs||on.offset!==sa||on.stride!==Bn)&&(De.bindBuffer(34962,_o.buffer),De.vertexAttribPointer(ya,mn,ps,bs,Bn,sa),on.type=ps,on.size=mn,on.buffer=_o,on.normalized=bs,on.offset=sa,on.stride=Bn),on.divisor!==ms&&(Fn.vertexAttribDivisorANGLE(ya,ms),on.divisor=ms)):(on.buffer&&(De.disableVertexAttribArray(ya),on.buffer=null),(on.x!==Pa||on.y!==Oa||on.z!==co||on.w!==An)&&(De.vertexAttrib4f(ya,Pa,Oa,co,An),on.x=Pa,on.y=Oa,on.z=co,on.w=An)),Ga=p.call(this,_e,sn,0),ca=!1,bn=1,Xi=0,qn=0,Ia=0,yn=0,Ya=null,ba=0,Da=!1,Aa=5126,Ln=0,wo=0,wa=0,vr(Ga)?(ca=!0,Ya=ue.createStream(34962,Ga),Aa=Ya.dtype):(Ya=ue.getBuffer(Ga),Ya?Aa=Ya.dtype:"constant"in Ga?(bn=2,typeof Ga.constant=="number"?(Xi=Ga.constant,qn=Ia=yn=0):(Xi=Ga.constant.length>0?Ga.constant[0]:0,qn=Ga.constant.length>1?Ga.constant[1]:0,Ia=Ga.constant.length>2?Ga.constant[2]:0,yn=Ga.constant.length>3?Ga.constant[3]:0)):(vr(Ga.buffer)?Ya=ue.createStream(34962,Ga.buffer):Ya=ue.getBuffer(Ga.buffer),Aa="type"in Ga?zi[Ga.type]:Ya.dtype,Da=!!Ga.normalized,ba=Ga.size|0,Ln=Ga.offset|0,wo=Ga.stride|0,wa=Ga.divisor|0)),$i=x.location,ea=ht[$i],bn===1?(ea.buffer||De.enableVertexAttribArray($i),Sa=ba||1,(ea.type!==Aa||ea.size!==Sa||ea.buffer!==Ya||ea.normalized!==Da||ea.offset!==Ln||ea.stride!==wo)&&(De.bindBuffer(34962,Ya.buffer),De.vertexAttribPointer($i,Sa,Aa,Da,wo,Ln),ea.type=Aa,ea.size=Sa,ea.buffer=Ya,ea.normalized=Da,ea.offset=Ln,ea.stride=wo),ea.divisor!==wa&&(Fn.vertexAttribDivisorANGLE($i,wa),ea.divisor=wa)):(ea.buffer&&(De.disableVertexAttribArray($i),ea.buffer=null),(ea.x!==Xi||ea.y!==qn||ea.z!==Ia||ea.w!==yn)&&(De.vertexAttrib4f($i,Xi,qn,Ia,yn),ea.x=Xi,ea.y=qn,ea.z=Ia,ea.w=yn)),Za=b.call(this,_e,sn,0),xo=!1,Wa=1,hn=0,Un=0,Ss=0,Kn=0,ns=null,Jo=0,vo=!1,ma=5126,ja=0,To=0,Ao=0,vr(Za)?(xo=!0,ns=ue.createStream(34962,Za),ma=ns.dtype):(ns=ue.getBuffer(Za),ns?ma=ns.dtype:"constant"in Za?(Wa=2,typeof Za.constant=="number"?(hn=Za.constant,Un=Ss=Kn=0):(hn=Za.constant.length>0?Za.constant[0]:0,Un=Za.constant.length>1?Za.constant[1]:0,Ss=Za.constant.length>2?Za.constant[2]:0,Kn=Za.constant.length>3?Za.constant[3]:0)):(vr(Za.buffer)?ns=ue.createStream(34962,Za.buffer):ns=ue.getBuffer(Za.buffer),ma="type"in Za?zi[Za.type]:ns.dtype,vo=!!Za.normalized,Jo=Za.size|0,ja=Za.offset|0,To=Za.stride|0,Ao=Za.divisor|0)),la=y.location,Ki=ht[la],Wa===1?(Ki.buffer||De.enableVertexAttribArray(la),ho=Jo||1,(Ki.type!==ma||Ki.size!==ho||Ki.buffer!==ns||Ki.normalized!==vo||Ki.offset!==ja||Ki.stride!==To)&&(De.bindBuffer(34962,ns.buffer),De.vertexAttribPointer(la,ho,ma,vo,To,ja),Ki.type=ma,Ki.size=ho,Ki.buffer=ns,Ki.normalized=vo,Ki.offset=ja,Ki.stride=To),Ki.divisor!==Ao&&(Fn.vertexAttribDivisorANGLE(la,Ao),Ki.divisor=Ao)):(Ki.buffer&&(De.disableVertexAttribArray(la),Ki.buffer=null),(Ki.x!==hn||Ki.y!==Un||Ki.z!==Ss||Ki.w!==Kn)&&(De.vertexAttrib4f(la,hn,Un,Ss,Kn),Ki.x=hn,Ki.y=Un,Ki.z=Ss,Ki.w=Kn)),Ka=E.call(this,_e,sn,0),Ca=!1,ta=1,En=0,Mo=0,Ds=0,Ro=0,vs=null,Ks=0,as=!1,Jn=5126,Cs=0,Xa=0,Zo=0,vr(Ka)?(Ca=!0,vs=ue.createStream(34962,Ka),Jn=vs.dtype):(vs=ue.getBuffer(Ka),vs?Jn=vs.dtype:"constant"in Ka?(ta=2,typeof Ka.constant=="number"?(En=Ka.constant,Mo=Ds=Ro=0):(En=Ka.constant.length>0?Ka.constant[0]:0,Mo=Ka.constant.length>1?Ka.constant[1]:0,Ds=Ka.constant.length>2?Ka.constant[2]:0,Ro=Ka.constant.length>3?Ka.constant[3]:0)):(vr(Ka.buffer)?vs=ue.createStream(34962,Ka.buffer):vs=ue.getBuffer(Ka.buffer),Jn="type"in Ka?zi[Ka.type]:vs.dtype,as=!!Ka.normalized,Ks=Ka.size|0,Cs=Ka.offset|0,Xa=Ka.stride|0,Zo=Ka.divisor|0)),Eo=k.location,lo=ht[Eo],ta===1?(lo.buffer||De.enableVertexAttribArray(Eo),$a=Ks||1,(lo.type!==Jn||lo.size!==$a||lo.buffer!==vs||lo.normalized!==as||lo.offset!==Cs||lo.stride!==Xa)&&(De.bindBuffer(34962,vs.buffer),De.vertexAttribPointer(Eo,$a,Jn,as,Xa,Cs),lo.type=Jn,lo.size=$a,lo.buffer=vs,lo.normalized=as,lo.offset=Cs,lo.stride=Xa),lo.divisor!==Zo&&(Fn.vertexAttribDivisorANGLE(Eo,Zo),lo.divisor=Zo)):(lo.buffer&&(De.disableVertexAttribArray(Eo),lo.buffer=null),(lo.x!==En||lo.y!==Mo||lo.z!==Ds||lo.w!==Ro)&&(De.vertexAttrib4f(Eo,En,Mo,Ds,Ro),lo.x=En,lo.y=Mo,lo.z=Ds,lo.w=Ro)),Xo=A.call(this,_e,sn,0),rs=!1,$n=1,Sn=0,uo=0,Rs=0,xs=0,Go=null,os=0,So=!1,Qn=5126,zo=0,rl=0,$o=0,vr(Xo)?(rs=!0,Go=ue.createStream(34962,Xo),Qn=Go.dtype):(Go=ue.getBuffer(Xo),Go?Qn=Go.dtype:"constant"in Xo?($n=2,typeof Xo.constant=="number"?(Sn=Xo.constant,uo=Rs=xs=0):(Sn=Xo.constant.length>0?Xo.constant[0]:0,uo=Xo.constant.length>1?Xo.constant[1]:0,Rs=Xo.constant.length>2?Xo.constant[2]:0,xs=Xo.constant.length>3?Xo.constant[3]:0)):(vr(Xo.buffer)?Go=ue.createStream(34962,Xo.buffer):Go=ue.getBuffer(Xo.buffer),Qn="type"in Xo?zi[Xo.type]:Go.dtype,So=!!Xo.normalized,os=Xo.size|0,zo=Xo.offset|0,rl=Xo.stride|0,$o=Xo.divisor|0)),Na=L.location,Ua=ht[Na],$n===1?(Ua.buffer||De.enableVertexAttribArray(Na),Po=os||1,(Ua.type!==Qn||Ua.size!==Po||Ua.buffer!==Go||Ua.normalized!==So||Ua.offset!==zo||Ua.stride!==rl)&&(De.bindBuffer(34962,Go.buffer),De.vertexAttribPointer(Na,Po,Qn,So,rl,zo),Ua.type=Qn,Ua.size=Po,Ua.buffer=Go,Ua.normalized=So,Ua.offset=zo,Ua.stride=rl),Ua.divisor!==$o&&(Fn.vertexAttribDivisorANGLE(Na,$o),Ua.divisor=$o)):(Ua.buffer&&(De.disableVertexAttribArray(Na),Ua.buffer=null),(Ua.x!==Sn||Ua.y!==uo||Ua.z!==Rs||Ua.w!==xs)&&(De.vertexAttrib4f(Na,Sn,uo,Rs,xs),Ua.x=Sn,Ua.y=uo,Ua.z=Rs,Ua.w=xs)),fo=_.call(this,_e,sn,0),ro=!1,Ma=1,io=0,aa=0,Oo=0,No=0,Zs=null,Fs=0,ws=!1,no=5126,Ls=0,ds=0,Xs=0,vr(fo)?(ro=!0,Zs=ue.createStream(34962,fo),no=Zs.dtype):(Zs=ue.getBuffer(fo),Zs?no=Zs.dtype:"constant"in fo?(Ma=2,typeof fo.constant=="number"?(io=fo.constant,aa=Oo=No=0):(io=fo.constant.length>0?fo.constant[0]:0,aa=fo.constant.length>1?fo.constant[1]:0,Oo=fo.constant.length>2?fo.constant[2]:0,No=fo.constant.length>3?fo.constant[3]:0)):(vr(fo.buffer)?Zs=ue.createStream(34962,fo.buffer):Zs=ue.getBuffer(fo.buffer),no="type"in fo?zi[fo.type]:Zs.dtype,ws=!!fo.normalized,Fs=fo.size|0,Ls=fo.offset|0,ds=fo.stride|0,Xs=fo.divisor|0)),oa=C.location,Yo=ht[oa],Ma===1?(Yo.buffer||De.enableVertexAttribArray(oa),po=Fs||1,(Yo.type!==no||Yo.size!==po||Yo.buffer!==Zs||Yo.normalized!==ws||Yo.offset!==Ls||Yo.stride!==ds)&&(De.bindBuffer(34962,Zs.buffer),De.vertexAttribPointer(oa,po,no,ws,ds,Ls),Yo.type=no,Yo.size=po,Yo.buffer=Zs,Yo.normalized=ws,Yo.offset=Ls,Yo.stride=ds),Yo.divisor!==Xs&&(Fn.vertexAttribDivisorANGLE(oa,Xs),Yo.divisor=Xs)):(Yo.buffer&&(De.disableVertexAttribArray(oa),Yo.buffer=null),(Yo.x!==io||Yo.y!==aa||Yo.z!==Oo||Yo.w!==No)&&(De.vertexAttrib4f(oa,io,aa,Oo,No),Yo.x=io,Yo.y=aa,Yo.z=Oo,Yo.w=No)),ss=M.call(this,_e,sn,0),ls=!1,gs=1,bt=0,Ft=0,hr=0,nr=0,Sr=null,li=0,di=!1,mi=5126,Oi=0,dn=0,wi=0,vr(ss)?(ls=!0,Sr=ue.createStream(34962,ss),mi=Sr.dtype):(Sr=ue.getBuffer(ss),Sr?mi=Sr.dtype:"constant"in ss?(gs=2,typeof ss.constant=="number"?(bt=ss.constant,Ft=hr=nr=0):(bt=ss.constant.length>0?ss.constant[0]:0,Ft=ss.constant.length>1?ss.constant[1]:0,hr=ss.constant.length>2?ss.constant[2]:0,nr=ss.constant.length>3?ss.constant[3]:0)):(vr(ss.buffer)?Sr=ue.createStream(34962,ss.buffer):Sr=ue.getBuffer(ss.buffer),mi="type"in ss?zi[ss.type]:Sr.dtype,di=!!ss.normalized,li=ss.size|0,Oi=ss.offset|0,dn=ss.stride|0,wi=ss.divisor|0)),ui=v.location,Ai=ht[ui],gs===1?(Ai.buffer||De.enableVertexAttribArray(ui),gi=li||1,(Ai.type!==mi||Ai.size!==gi||Ai.buffer!==Sr||Ai.normalized!==di||Ai.offset!==Oi||Ai.stride!==dn)&&(De.bindBuffer(34962,Sr.buffer),De.vertexAttribPointer(ui,gi,mi,di,dn,Oi),Ai.type=mi,Ai.size=gi,Ai.buffer=Sr,Ai.normalized=di,Ai.offset=Oi,Ai.stride=dn),Ai.divisor!==wi&&(Fn.vertexAttribDivisorANGLE(ui,wi),Ai.divisor=wi)):(Ai.buffer&&(De.disableVertexAttribArray(ui),Ai.buffer=null),(Ai.x!==bt||Ai.y!==Ft||Ai.z!==hr||Ai.w!==nr)&&(De.vertexAttrib4f(ui,bt,Ft,hr,nr),Ai.x=bt,Ai.y=Ft,Ai.z=hr,Ai.w=nr)),De.uniform1i(z.location,!1),gn=sn.markerTexture,gn&&gn._reglType==="framebuffer"&&(gn=gn.color[0]),In=gn._texture,De.uniform1i(T.location,In.bind()),Vn=sn.opacity,De.uniform1f(F.location,Vn),Rn=U.call(this,_e,sn,0),Hn=Rn[0],Gn=Rn[1],De.uniform2f(q.location,Hn,Gn),De.uniform1i(H.location,j.bind()),pn=_e.pixelRatio,De.uniform1f(G.location,pn),Lo=sn.scale,us=Lo[0],Bs=Lo[1],De.uniform2f(O.location,us,Bs),Js=sn.scaleFract,ol=Js[0],Cl=Js[1],De.uniform2f(W.location,ol,Cl),ul=sn.translate,Gl=ul[0],Vl=ul[1],De.uniform2f(re.location,Gl,Vl),Fl=sn.translateFract,ga=Fl[0],ko=Fl[1],De.uniform2f(ne.location,ga,ko),zs=sn.elements,Fo=null,Ys=vr(zs),Ys?Fo=ye.createStream(zs):Fo=ye.getElements(zs),Fo&&De.bindBuffer(34963,Fo.buffer.buffer),Gs=sn.offset,Us=sn.count,Us&&(Sl=lt.instances,Sl>0?Fo?Fn.drawElementsInstancedANGLE(0,Us,Fo.type,Gs<<(Fo.type-5121>>1),Sl):Fn.drawArraysInstancedANGLE(0,Gs,Us,Sl):Sl<0&&(Fo?De.drawElements(0,Us,Fo.type,Gs<<(Fo.type-5121>>1)):De.drawArrays(0,Gs,Us)),Ie.dirty=!0,Et.setVAO(null),_e.viewportWidth=hi,_e.viewportHeight=Gi,_a&&(r.cpuTime+=performance.now()-Wn),za&&ue.destroyStream(Zn),to&&ue.destroyStream(ka),jo&&ue.destroyStream(_o),ca&&ue.destroyStream(Ya),xo&&ue.destroyStream(ns),Ca&&ue.destroyStream(vs),rs&&ue.destroyStream(Go),ro&&ue.destroyStream(Zs),ls&&ue.destroyStream(Sr),In.unbind(),j.unbind(),Ys&&ye.destroyStream(Fo))},scope:function(sn,fi,Or){var st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf,hf;st=sn.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:_e.framebufferWidth-Wt,Nr="height"in st?st.height|0:_e.framebufferHeight-tr,hi=_e.viewportWidth,_e.viewportWidth=or,Gi=_e.viewportHeight,_e.viewportHeight=Nr,Qr=Yr[0],Yr[0]=Wt,Ui=Yr[1],Yr[1]=tr,zn=Yr[2],Yr[2]=or,fn=Yr[3],Yr[3]=Nr,xn=Er[0],Er[0]=be,_a=Er[1],Er[1]=ze,Wn=Er[2],Er[2]=Ce,Fn=Er[3],Er[3]=he,ia=Pe.blend_enable,Pe.blend_enable=te,za=xi[0],xi[0]=ke,Hr=xi[1],xi[1]=Ee,na=xi[2],xi[2]=Me,go=xi[3],xi[3]=Oe,Dn=Pe.depth_enable,Pe.depth_enable=Re,un=sn.viewport,Zn=un.x|0,Wo=un.y|0,Ba="width"in un?un.width|0:_e.framebufferWidth-Zn,Bo="height"in un?un.height|0:_e.framebufferHeight-Wo,Ea=vi[0],vi[0]=Zn,Ha=vi[1],vi[1]=Wo,tn=vi[2],vi[2]=Ba,Cn=vi[3],vi[3]=Bo,Xn=Pe.scissor_enable,Pe.scissor_enable=me,ts=Pe.stencil_enable,Pe.stencil_enable=Be,Ja=Ie.profile,Ja&&(to=performance.now(),r.count++),Ri=sn.elements,an=null,cs=vr(Ri),cs?an=ye.createStream(Ri):an=ye.getElements(Ri),pa=lt.elements,lt.elements=an,ln=sn.offset,ka=lt.offset,lt.offset=ln,va=sn.count,bo=lt.count,lt.count=va,Co=lt.primitive,lt.primitive=fe,Fi=St[Ze],St[Ze]=!1,Yn=St[gt],St[gt]=et,xa=sn.opacity,Qi=St[Pt],St[Pt]=xa,Nn=U.call(this,_e,sn,Or),Pn=St[Qe],St[Qe]=Nn,qa=_e.pixelRatio,jo=St[Xe],St[Xe]=qa,Vo=sn.scale,Pa=St[Tt],St[Tt]=Vo,Oa=sn.scaleFract,co=St[xt],St[xt]=Oa,An=sn.translate,_o=St[_t],St[_t]=An,ks=sn.translateFract,bs=St[Ct],St[Ct]=ks,ps=sn.markerTexture,sa=St[jt],St[jt]=ps,Bn=E.call(this,_e,sn,Or),ms=!1,ya=1,on=0,mn=0,Ga=0,ca=0,bn=null,Xi=0,qn=!1,Ia=5126,yn=0,Ya=0,ba=0,vr(Bn)?(ms=!0,bn=ue.createStream(34962,Bn),Ia=bn.dtype):(bn=ue.getBuffer(Bn),bn?Ia=bn.dtype:"constant"in Bn?(ya=2,typeof Bn.constant=="number"?(on=Bn.constant,mn=Ga=ca=0):(on=Bn.constant.length>0?Bn.constant[0]:0,mn=Bn.constant.length>1?Bn.constant[1]:0,Ga=Bn.constant.length>2?Bn.constant[2]:0,ca=Bn.constant.length>3?Bn.constant[3]:0)):(vr(Bn.buffer)?bn=ue.createStream(34962,Bn.buffer):bn=ue.getBuffer(Bn.buffer),Ia="type"in Bn?zi[Bn.type]:bn.dtype,qn=!!Bn.normalized,Xi=Bn.size|0,yn=Bn.offset|0,Ya=Bn.stride|0,ba=Bn.divisor|0)),Da=At.state,At.state=ya,Aa=At.x,At.x=on,Ln=At.y,At.y=mn,wo=At.z,At.z=Ga,wa=At.w,At.w=ca,$i=At.buffer,At.buffer=bn,ea=At.size,At.size=Xi,Sa=At.normalized,At.normalized=qn,Za=At.type,At.type=Ia,xo=At.offset,At.offset=yn,Wa=At.stride,At.stride=Ya,hn=At.divisor,At.divisor=ba,Un=_.call(this,_e,sn,Or),Ss=!1,Kn=1,ns=0,Jo=0,vo=0,ma=0,ja=null,To=0,Ao=!1,la=5126,Ki=0,ho=0,Ka=0,vr(Un)?(Ss=!0,ja=ue.createStream(34962,Un),la=ja.dtype):(ja=ue.getBuffer(Un),ja?la=ja.dtype:"constant"in Un?(Kn=2,typeof Un.constant=="number"?(ns=Un.constant,Jo=vo=ma=0):(ns=Un.constant.length>0?Un.constant[0]:0,Jo=Un.constant.length>1?Un.constant[1]:0,vo=Un.constant.length>2?Un.constant[2]:0,ma=Un.constant.length>3?Un.constant[3]:0)):(vr(Un.buffer)?ja=ue.createStream(34962,Un.buffer):ja=ue.getBuffer(Un.buffer),la="type"in Un?zi[Un.type]:ja.dtype,Ao=!!Un.normalized,To=Un.size|0,Ki=Un.offset|0,ho=Un.stride|0,Ka=Un.divisor|0)),Ca=Te.state,Te.state=Kn,ta=Te.x,Te.x=ns,En=Te.y,Te.y=Jo,Mo=Te.z,Te.z=vo,Ds=Te.w,Te.w=ma,Ro=Te.buffer,Te.buffer=ja,vs=Te.size,Te.size=To,Ks=Te.normalized,Te.normalized=Ao,as=Te.type,Te.type=la,Jn=Te.offset,Te.offset=Ki,Cs=Te.stride,Te.stride=ho,Xa=Te.divisor,Te.divisor=Ka,Zo=A.call(this,_e,sn,Or),Eo=!1,lo=1,$a=0,Xo=0,rs=0,$n=0,Sn=null,uo=0,Rs=!1,xs=5126,Go=0,os=0,So=0,vr(Zo)?(Eo=!0,Sn=ue.createStream(34962,Zo),xs=Sn.dtype):(Sn=ue.getBuffer(Zo),Sn?xs=Sn.dtype:"constant"in Zo?(lo=2,typeof Zo.constant=="number"?($a=Zo.constant,Xo=rs=$n=0):($a=Zo.constant.length>0?Zo.constant[0]:0,Xo=Zo.constant.length>1?Zo.constant[1]:0,rs=Zo.constant.length>2?Zo.constant[2]:0,$n=Zo.constant.length>3?Zo.constant[3]:0)):(vr(Zo.buffer)?Sn=ue.createStream(34962,Zo.buffer):Sn=ue.getBuffer(Zo.buffer),xs="type"in Zo?zi[Zo.type]:Sn.dtype,Rs=!!Zo.normalized,uo=Zo.size|0,Go=Zo.offset|0,os=Zo.stride|0,So=Zo.divisor|0)),Qn=nt.state,nt.state=lo,zo=nt.x,nt.x=$a,rl=nt.y,nt.y=Xo,$o=nt.z,nt.z=rs,Na=nt.w,nt.w=$n,Ua=nt.buffer,nt.buffer=Sn,Po=nt.size,nt.size=uo,fo=nt.normalized,nt.normalized=Rs,ro=nt.type,nt.type=xs,Ma=nt.offset,nt.offset=Go,io=nt.stride,nt.stride=os,aa=nt.divisor,nt.divisor=So,Oo=M.call(this,_e,sn,Or),No=!1,Zs=1,Fs=0,ws=0,no=0,Ls=0,ds=null,Xs=0,oa=!1,Yo=5126,po=0,ss=0,ls=0,vr(Oo)?(No=!0,ds=ue.createStream(34962,Oo),Yo=ds.dtype):(ds=ue.getBuffer(Oo),ds?Yo=ds.dtype:"constant"in Oo?(Zs=2,typeof Oo.constant=="number"?(Fs=Oo.constant,ws=no=Ls=0):(Fs=Oo.constant.length>0?Oo.constant[0]:0,ws=Oo.constant.length>1?Oo.constant[1]:0,no=Oo.constant.length>2?Oo.constant[2]:0,Ls=Oo.constant.length>3?Oo.constant[3]:0)):(vr(Oo.buffer)?ds=ue.createStream(34962,Oo.buffer):ds=ue.getBuffer(Oo.buffer),Yo="type"in Oo?zi[Oo.type]:ds.dtype,oa=!!Oo.normalized,Xs=Oo.size|0,po=Oo.offset|0,ss=Oo.stride|0,ls=Oo.divisor|0)),gs=ut.state,ut.state=Zs,bt=ut.x,ut.x=Fs,Ft=ut.y,ut.y=ws,hr=ut.z,ut.z=no,nr=ut.w,ut.w=Ls,Sr=ut.buffer,ut.buffer=ds,li=ut.size,ut.size=Xs,di=ut.normalized,ut.normalized=oa,mi=ut.type,ut.type=Yo,Oi=ut.offset,ut.offset=po,dn=ut.stride,ut.stride=ss,wi=ut.divisor,ut.divisor=ls,ui=b.call(this,_e,sn,Or),Ai=!1,gi=1,gn=0,In=0,Vn=0,Rn=0,Hn=null,Gn=0,pn=!1,Lo=5126,us=0,Bs=0,Js=0,vr(ui)?(Ai=!0,Hn=ue.createStream(34962,ui),Lo=Hn.dtype):(Hn=ue.getBuffer(ui),Hn?Lo=Hn.dtype:"constant"in ui?(gi=2,typeof ui.constant=="number"?(gn=ui.constant,In=Vn=Rn=0):(gn=ui.constant.length>0?ui.constant[0]:0,In=ui.constant.length>1?ui.constant[1]:0,Vn=ui.constant.length>2?ui.constant[2]:0,Rn=ui.constant.length>3?ui.constant[3]:0)):(vr(ui.buffer)?Hn=ue.createStream(34962,ui.buffer):Hn=ue.getBuffer(ui.buffer),Lo="type"in ui?zi[ui.type]:Hn.dtype,pn=!!ui.normalized,Gn=ui.size|0,us=ui.offset|0,Bs=ui.stride|0,Js=ui.divisor|0)),ol=ct.state,ct.state=gi,Cl=ct.x,ct.x=gn,ul=ct.y,ct.y=In,Gl=ct.z,ct.z=Vn,Vl=ct.w,ct.w=Rn,Fl=ct.buffer,ct.buffer=Hn,ga=ct.size,ct.size=Gn,ko=ct.normalized,ct.normalized=pn,zs=ct.type,ct.type=Lo,Fo=ct.offset,ct.offset=us,Ys=ct.stride,ct.stride=Bs,Gs=ct.divisor,ct.divisor=Js,Us=f.call(this,_e,sn,Or),Sl=!1,_l=1,kl=0,cl=0,xl=0,Uo=0,_s=null,Bl=0,Il=!1,Dl=5126,oe=0,w=0,B=0,vr(Us)?(Sl=!0,_s=ue.createStream(34962,Us),Dl=_s.dtype):(_s=ue.getBuffer(Us),_s?Dl=_s.dtype:"constant"in Us?(_l=2,typeof Us.constant=="number"?(kl=Us.constant,cl=xl=Uo=0):(kl=Us.constant.length>0?Us.constant[0]:0,cl=Us.constant.length>1?Us.constant[1]:0,xl=Us.constant.length>2?Us.constant[2]:0,Uo=Us.constant.length>3?Us.constant[3]:0)):(vr(Us.buffer)?_s=ue.createStream(34962,Us.buffer):_s=ue.getBuffer(Us.buffer),Dl="type"in Us?zi[Us.type]:_s.dtype,Il=!!Us.normalized,Bl=Us.size|0,oe=Us.offset|0,w=Us.stride|0,B=Us.divisor|0)),Q=rt.state,rt.state=_l,ee=rt.x,rt.x=kl,le=rt.y,rt.y=cl,Ne=rt.z,rt.z=xl,$e=rt.w,rt.w=Uo,pt=rt.buffer,rt.buffer=_s,zt=rt.size,rt.size=Bl,Yt=rt.normalized,rt.normalized=Il,Jt=rt.type,rt.type=Dl,yr=rt.offset,rt.offset=oe,Ir=rt.stride,rt.stride=w,ce=rt.divisor,rt.divisor=B,Ae=h.call(this,_e,sn,Or),qe=!1,Ve=1,ot=0,Ke=0,ft=0,qt=0,Xt=null,$t=0,dr=!1,Mr=5126,$r=0,ii=0,pi=0,vr(Ae)?(qe=!0,Xt=ue.createStream(34962,Ae),Mr=Xt.dtype):(Xt=ue.getBuffer(Ae),Xt?Mr=Xt.dtype:"constant"in Ae?(Ve=2,typeof Ae.constant=="number"?(ot=Ae.constant,Ke=ft=qt=0):(ot=Ae.constant.length>0?Ae.constant[0]:0,Ke=Ae.constant.length>1?Ae.constant[1]:0,ft=Ae.constant.length>2?Ae.constant[2]:0,qt=Ae.constant.length>3?Ae.constant[3]:0)):(vr(Ae.buffer)?Xt=ue.createStream(34962,Ae.buffer):Xt=ue.getBuffer(Ae.buffer),Mr="type"in Ae?zi[Ae.type]:Xt.dtype,dr=!!Ae.normalized,$t=Ae.size|0,$r=Ae.offset|0,ii=Ae.stride|0,pi=Ae.divisor|0)),Yi=je.state,je.state=Ve,wn=je.x,je.x=ot,Tn=je.y,je.y=Ke,ua=je.z,je.z=ft,oo=je.w,je.w=qt,el=je.buffer,je.buffer=Xt,ys=je.size,je.size=$t,il=je.normalized,je.normalized=dr,$l=je.type,je.type=Mr,pl=je.offset,je.offset=$r,Hl=je.stride,je.stride=ii,Ll=je.divisor,je.divisor=pi,Ql=u.call(this,_e,sn,Or),ku=!1,Jl=1,Kl=0,Hu=0,tf=0,Ku=0,Gu=null,Wu=0,sf=!1,gf=5126,nf=0,af=0,X=0,vr(Ql)?(ku=!0,Gu=ue.createStream(34962,Ql),gf=Gu.dtype):(Gu=ue.getBuffer(Ql),Gu?gf=Gu.dtype:"constant"in Ql?(Jl=2,typeof Ql.constant=="number"?(Kl=Ql.constant,Hu=tf=Ku=0):(Kl=Ql.constant.length>0?Ql.constant[0]:0,Hu=Ql.constant.length>1?Ql.constant[1]:0,tf=Ql.constant.length>2?Ql.constant[2]:0,Ku=Ql.constant.length>3?Ql.constant[3]:0)):(vr(Ql.buffer)?Gu=ue.createStream(34962,Ql.buffer):Gu=ue.getBuffer(Ql.buffer),gf="type"in Ql?zi[Ql.type]:Gu.dtype,sf=!!Ql.normalized,Wu=Ql.size|0,nf=Ql.offset|0,af=Ql.stride|0,X=Ql.divisor|0)),se=tt.state,tt.state=Jl,Le=tt.x,tt.x=Kl,We=tt.y,tt.y=Hu,Ye=tt.z,tt.z=tf,it=tt.w,tt.w=Ku,Nt=tt.buffer,tt.buffer=Gu,mt=tt.size,tt.size=Wu,er=tt.normalized,tt.normalized=sf,_r=tt.type,tt.type=gf,wr=tt.offset,tt.offset=nf,ni=tt.stride,tt.stride=af,Wr=tt.divisor,tt.divisor=X,Ci=p.call(this,_e,sn,Or),Ji=!1,ai=1,Ti=0,Bi=0,en=0,Wi=0,bi=null,ao=0,yo=!1,Ko=5126,Ms=0,vl=0,wl=0,vr(Ci)?(Ji=!0,bi=ue.createStream(34962,Ci),Ko=bi.dtype):(bi=ue.getBuffer(Ci),bi?Ko=bi.dtype:"constant"in Ci?(ai=2,typeof Ci.constant=="number"?(Ti=Ci.constant,Bi=en=Wi=0):(Ti=Ci.constant.length>0?Ci.constant[0]:0,Bi=Ci.constant.length>1?Ci.constant[1]:0,en=Ci.constant.length>2?Ci.constant[2]:0,Wi=Ci.constant.length>3?Ci.constant[3]:0)):(vr(Ci.buffer)?bi=ue.createStream(34962,Ci.buffer):bi=ue.getBuffer(Ci.buffer),Ko="type"in Ci?zi[Ci.type]:bi.dtype,yo=!!Ci.normalized,ao=Ci.size|0,Ms=Ci.offset|0,vl=Ci.stride|0,wl=Ci.divisor|0)),au=Je.state,Je.state=ai,Al=Je.x,Je.x=Ti,nu=Je.y,Je.y=Bi,Bu=Je.z,Je.z=en,qu=Je.w,Je.w=Wi,Ju=Je.buffer,Je.buffer=bi,qo=Je.size,Je.size=ao,Rl=Je.normalized,Je.normalized=yo,pu=Je.type,Je.type=Ko,xu=Je.offset,Je.offset=Ms,of=Je.stride,Je.stride=vl,ff=Je.divisor,Je.divisor=wl,xf=de.vert,de.vert=Mt,hf=de.frag,de.frag=Vt,Ie.dirty=!0,fi(_e,sn,Or),_e.viewportWidth=hi,_e.viewportHeight=Gi,Yr[0]=Qr,Yr[1]=Ui,Yr[2]=zn,Yr[3]=fn,Er[0]=xn,Er[1]=_a,Er[2]=Wn,Er[3]=Fn,Pe.blend_enable=ia,xi[0]=za,xi[1]=Hr,xi[2]=na,xi[3]=go,Pe.depth_enable=Dn,vi[0]=Ea,vi[1]=Ha,vi[2]=tn,vi[3]=Cn,Pe.scissor_enable=Xn,Pe.stencil_enable=ts,Ja&&(r.cpuTime+=performance.now()-to),cs&&ye.destroyStream(an),lt.elements=pa,lt.offset=ka,lt.count=bo,lt.primitive=Co,St[Ze]=Fi,St[gt]=Yn,St[Pt]=Qi,St[Qe]=Pn,St[Xe]=jo,St[Tt]=Pa,St[xt]=co,St[_t]=_o,St[Ct]=bs,St[jt]=sa,ms&&ue.destroyStream(bn),At.state=Da,At.x=Aa,At.y=Ln,At.z=wo,At.w=wa,At.buffer=$i,At.size=ea,At.normalized=Sa,At.type=Za,At.offset=xo,At.stride=Wa,At.divisor=hn,Ss&&ue.destroyStream(ja),Te.state=Ca,Te.x=ta,Te.y=En,Te.z=Mo,Te.w=Ds,Te.buffer=Ro,Te.size=vs,Te.normalized=Ks,Te.type=as,Te.offset=Jn,Te.stride=Cs,Te.divisor=Xa,Eo&&ue.destroyStream(Sn),nt.state=Qn,nt.x=zo,nt.y=rl,nt.z=$o,nt.w=Na,nt.buffer=Ua,nt.size=Po,nt.normalized=fo,nt.type=ro,nt.offset=Ma,nt.stride=io,nt.divisor=aa,No&&ue.destroyStream(ds),ut.state=gs,ut.x=bt,ut.y=Ft,ut.z=hr,ut.w=nr,ut.buffer=Sr,ut.size=li,ut.normalized=di,ut.type=mi,ut.offset=Oi,ut.stride=dn,ut.divisor=wi,Ai&&ue.destroyStream(Hn),ct.state=ol,ct.x=Cl,ct.y=ul,ct.z=Gl,ct.w=Vl,ct.buffer=Fl,ct.size=ga,ct.normalized=ko,ct.type=zs,ct.offset=Fo,ct.stride=Ys,ct.divisor=Gs,Sl&&ue.destroyStream(_s),rt.state=Q,rt.x=ee,rt.y=le,rt.z=Ne,rt.w=$e,rt.buffer=pt,rt.size=zt,rt.normalized=Yt,rt.type=Jt,rt.offset=yr,rt.stride=Ir,rt.divisor=ce,qe&&ue.destroyStream(Xt),je.state=Yi,je.x=wn,je.y=Tn,je.z=ua,je.w=oo,je.buffer=el,je.size=ys,je.normalized=il,je.type=$l,je.offset=pl,je.stride=Hl,je.divisor=Ll,ku&&ue.destroyStream(Gu),tt.state=se,tt.x=Le,tt.y=We,tt.z=Ye,tt.w=it,tt.buffer=Nt,tt.size=mt,tt.normalized=er,tt.type=_r,tt.offset=wr,tt.stride=ni,tt.divisor=Wr,Ji&&ue.destroyStream(bi),Je.state=au,Je.x=Al,Je.y=nu,Je.z=Bu,Je.w=qu,Je.buffer=Ju,Je.size=qo,Je.normalized=Rl,Je.type=pu,Je.offset=xu,Je.stride=of,Je.divisor=ff,de.vert=xf,de.frag=hf,Ie.dirty=!0},batch:function(sn,fi){var Or,st,Wt,tr,or,Nr,hi;if(Or=qr.angle_instanced_arrays,st=Zt.next,st!==Zt.cur&&(st?De.bindFramebuffer(36160,st.framebuffer):De.bindFramebuffer(36160,null),Zt.cur=st),Ie.dirty){var Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka;Gi=Pe.dither,Gi!==Ie.dither&&(Gi?De.enable(3024):De.disable(3024),Ie.dither=Gi),Qr=Ei[0],Ui=Ei[1],(Qr!==Si[0]||Ui!==Si[1])&&(De.blendEquationSeparate(Qr,Ui),Si[0]=Qr,Si[1]=Ui),zn=Pe.depth_func,zn!==Ie.depth_func&&(De.depthFunc(zn),Ie.depth_func=zn),fn=Jr[0],xn=Jr[1],(fn!==ci[0]||xn!==ci[1])&&(De.depthRange(fn,xn),ci[0]=fn,ci[1]=xn),_a=Pe.depth_mask,_a!==Ie.depth_mask&&(De.depthMask(_a),Ie.depth_mask=_a),Wn=Di[0],Fn=Di[1],ia=Di[2],za=Di[3],(Wn!==Lt[0]||Fn!==Lt[1]||ia!==Lt[2]||za!==Lt[3])&&(De.colorMask(Wn,Fn,ia,za),Lt[0]=Wn,Lt[1]=Fn,Lt[2]=ia,Lt[3]=za),Hr=Pe.cull_enable,Hr!==Ie.cull_enable&&(Hr?De.enable(2884):De.disable(2884),Ie.cull_enable=Hr),na=Pe.cull_face,na!==Ie.cull_face&&(De.cullFace(na),Ie.cull_face=na),go=Pe.frontFace,go!==Ie.frontFace&&(De.frontFace(go),Ie.frontFace=go),Dn=Pe.lineWidth,Dn!==Ie.lineWidth&&(De.lineWidth(Dn),Ie.lineWidth=Dn),un=Pe.polygonOffset_enable,un!==Ie.polygonOffset_enable&&(un?De.enable(32823):De.disable(32823),Ie.polygonOffset_enable=un),Zn=vt[0],Wo=vt[1],(Zn!==Dt[0]||Wo!==Dt[1])&&(De.polygonOffset(Zn,Wo),Dt[0]=Zn,Dt[1]=Wo),Ba=Pe.sample_alpha,Ba!==Ie.sample_alpha&&(Ba?De.enable(32926):De.disable(32926),Ie.sample_alpha=Ba),Bo=Pe.sample_enable,Bo!==Ie.sample_enable&&(Bo?De.enable(32928):De.disable(32928),Ie.sample_enable=Bo),Ea=Bt[0],Ha=Bt[1],(Ea!==sr[0]||Ha!==sr[1])&&(De.sampleCoverage(Ea,Ha),sr[0]=Ea,sr[1]=Ha),tn=Pe.stencil_mask,tn!==Ie.stencil_mask&&(De.stencilMask(tn),Ie.stencil_mask=tn),Cn=br[0],Xn=br[1],ts=br[2],(Cn!==zr[0]||Xn!==zr[1]||ts!==zr[2])&&(De.stencilFunc(Cn,Xn,ts),zr[0]=Cn,zr[1]=Xn,zr[2]=ts),Ja=Tr[0],to=Tr[1],Ri=Tr[2],an=Tr[3],(Ja!==Rr[0]||to!==Rr[1]||Ri!==Rr[2]||an!==Rr[3])&&(De.stencilOpSeparate(Ja,to,Ri,an),Rr[0]=Ja,Rr[1]=to,Rr[2]=Ri,Rr[3]=an),cs=Br[0],pa=Br[1],ln=Br[2],ka=Br[3],(cs!==oi[0]||pa!==oi[1]||ln!==oi[2]||ka!==oi[3])&&(De.stencilOpSeparate(cs,pa,ln,ka),oi[0]=cs,oi[1]=pa,oi[2]=ln,oi[3]=ka)}De.blendColor(0,0,0,1),si[0]=0,si[1]=0,si[2]=0,si[3]=1,Kt?De.enable(3042):De.disable(3042),Ie.blend_enable=Kt,De.blendFuncSeparate(770,771,773,1),Hi[0]=770,Hi[1]=771,Hi[2]=773,Hi[3]=1,ir?De.enable(2929):De.disable(2929),Ie.depth_enable=ir,fr?De.enable(3089):De.disable(3089),Ie.scissor_enable=fr,Ot?De.enable(2960):De.disable(2960),Ie.stencil_enable=Ot,Wt=Ie.profile,Wt&&(tr=performance.now(),r.count+=fi),De.useProgram(s.program),or=qr.angle_instanced_arrays;var va;for(Et.setVAO(null),De.uniform1i(z.location,!1),De.uniform1i(H.location,j.bind()),va=lt.instances,Nr=0;Nr0?Oa.constant[0]:0,ks=Oa.constant.length>1?Oa.constant[1]:0,bs=Oa.constant.length>2?Oa.constant[2]:0,ps=Oa.constant.length>3?Oa.constant[3]:0)):(vr(Oa.buffer)?sa=ue.createStream(34962,Oa.buffer):sa=ue.getBuffer(Oa.buffer),ya="type"in Oa?zi[Oa.type]:sa.dtype,ms=!!Oa.normalized,Bn=Oa.size|0,on=Oa.offset|0,mn=Oa.stride|0,Ga=Oa.divisor|0)),ca=l.location,bn=ht[ca],An===1?(bn.buffer||De.enableVertexAttribArray(ca),Xi=Bn||4,(bn.type!==ya||bn.size!==Xi||bn.buffer!==sa||bn.normalized!==ms||bn.offset!==on||bn.stride!==mn)&&(De.bindBuffer(34962,sa.buffer),De.vertexAttribPointer(ca,Xi,ya,ms,mn,on),bn.type=ya,bn.size=Xi,bn.buffer=sa,bn.normalized=ms,bn.offset=on,bn.stride=mn),bn.divisor!==Ga&&(or.vertexAttribDivisorANGLE(ca,Ga),bn.divisor=Ga)):(bn.buffer&&(De.disableVertexAttribArray(ca),bn.buffer=null),(bn.x!==_o||bn.y!==ks||bn.z!==bs||bn.w!==ps)&&(De.vertexAttrib4f(ca,_o,ks,bs,ps),bn.x=_o,bn.y=ks,bn.z=bs,bn.w=ps)),qn=f.call(this,_e,hi,Nr),Ia=!1,yn=1,Ya=0,ba=0,Da=0,Aa=0,Ln=null,wo=0,wa=!1,$i=5126,ea=0,Sa=0,Za=0,vr(qn)?(Ia=!0,Ln=ue.createStream(34962,qn),$i=Ln.dtype):(Ln=ue.getBuffer(qn),Ln?$i=Ln.dtype:"constant"in qn?(yn=2,typeof qn.constant=="number"?(Ya=qn.constant,ba=Da=Aa=0):(Ya=qn.constant.length>0?qn.constant[0]:0,ba=qn.constant.length>1?qn.constant[1]:0,Da=qn.constant.length>2?qn.constant[2]:0,Aa=qn.constant.length>3?qn.constant[3]:0)):(vr(qn.buffer)?Ln=ue.createStream(34962,qn.buffer):Ln=ue.getBuffer(qn.buffer),$i="type"in qn?zi[qn.type]:Ln.dtype,wa=!!qn.normalized,wo=qn.size|0,ea=qn.offset|0,Sa=qn.stride|0,Za=qn.divisor|0)),xo=c.location,Wa=ht[xo],yn===1?(Wa.buffer||De.enableVertexAttribArray(xo),hn=wo||1,(Wa.type!==$i||Wa.size!==hn||Wa.buffer!==Ln||Wa.normalized!==wa||Wa.offset!==ea||Wa.stride!==Sa)&&(De.bindBuffer(34962,Ln.buffer),De.vertexAttribPointer(xo,hn,$i,wa,Sa,ea),Wa.type=$i,Wa.size=hn,Wa.buffer=Ln,Wa.normalized=wa,Wa.offset=ea,Wa.stride=Sa),Wa.divisor!==Za&&(or.vertexAttribDivisorANGLE(xo,Za),Wa.divisor=Za)):(Wa.buffer&&(De.disableVertexAttribArray(xo),Wa.buffer=null),(Wa.x!==Ya||Wa.y!==ba||Wa.z!==Da||Wa.w!==Aa)&&(De.vertexAttrib4f(xo,Ya,ba,Da,Aa),Wa.x=Ya,Wa.y=ba,Wa.z=Da,Wa.w=Aa)),Un=h.call(this,_e,hi,Nr),Ss=!1,Kn=1,ns=0,Jo=0,vo=0,ma=0,ja=null,To=0,Ao=!1,la=5126,Ki=0,ho=0,Ka=0,vr(Un)?(Ss=!0,ja=ue.createStream(34962,Un),la=ja.dtype):(ja=ue.getBuffer(Un),ja?la=ja.dtype:"constant"in Un?(Kn=2,typeof Un.constant=="number"?(ns=Un.constant,Jo=vo=ma=0):(ns=Un.constant.length>0?Un.constant[0]:0,Jo=Un.constant.length>1?Un.constant[1]:0,vo=Un.constant.length>2?Un.constant[2]:0,ma=Un.constant.length>3?Un.constant[3]:0)):(vr(Un.buffer)?ja=ue.createStream(34962,Un.buffer):ja=ue.getBuffer(Un.buffer),la="type"in Un?zi[Un.type]:ja.dtype,Ao=!!Un.normalized,To=Un.size|0,Ki=Un.offset|0,ho=Un.stride|0,Ka=Un.divisor|0)),Ca=d.location,ta=ht[Ca],Kn===1?(ta.buffer||De.enableVertexAttribArray(Ca),En=To||4,(ta.type!==la||ta.size!==En||ta.buffer!==ja||ta.normalized!==Ao||ta.offset!==Ki||ta.stride!==ho)&&(De.bindBuffer(34962,ja.buffer),De.vertexAttribPointer(Ca,En,la,Ao,ho,Ki),ta.type=la,ta.size=En,ta.buffer=ja,ta.normalized=Ao,ta.offset=Ki,ta.stride=ho),ta.divisor!==Ka&&(or.vertexAttribDivisorANGLE(Ca,Ka),ta.divisor=Ka)):(ta.buffer&&(De.disableVertexAttribArray(Ca),ta.buffer=null),(ta.x!==ns||ta.y!==Jo||ta.z!==vo||ta.w!==ma)&&(De.vertexAttrib4f(Ca,ns,Jo,vo,ma),ta.x=ns,ta.y=Jo,ta.z=vo,ta.w=ma)),Mo=p.call(this,_e,hi,Nr),Ds=!1,Ro=1,vs=0,Ks=0,as=0,Jn=0,Cs=null,Xa=0,Zo=!1,Eo=5126,lo=0,$a=0,Xo=0,vr(Mo)?(Ds=!0,Cs=ue.createStream(34962,Mo),Eo=Cs.dtype):(Cs=ue.getBuffer(Mo),Cs?Eo=Cs.dtype:"constant"in Mo?(Ro=2,typeof Mo.constant=="number"?(vs=Mo.constant,Ks=as=Jn=0):(vs=Mo.constant.length>0?Mo.constant[0]:0,Ks=Mo.constant.length>1?Mo.constant[1]:0,as=Mo.constant.length>2?Mo.constant[2]:0,Jn=Mo.constant.length>3?Mo.constant[3]:0)):(vr(Mo.buffer)?Cs=ue.createStream(34962,Mo.buffer):Cs=ue.getBuffer(Mo.buffer),Eo="type"in Mo?zi[Mo.type]:Cs.dtype,Zo=!!Mo.normalized,Xa=Mo.size|0,lo=Mo.offset|0,$a=Mo.stride|0,Xo=Mo.divisor|0)),rs=x.location,$n=ht[rs],Ro===1?($n.buffer||De.enableVertexAttribArray(rs),Sn=Xa||1,($n.type!==Eo||$n.size!==Sn||$n.buffer!==Cs||$n.normalized!==Zo||$n.offset!==lo||$n.stride!==$a)&&(De.bindBuffer(34962,Cs.buffer),De.vertexAttribPointer(rs,Sn,Eo,Zo,$a,lo),$n.type=Eo,$n.size=Sn,$n.buffer=Cs,$n.normalized=Zo,$n.offset=lo,$n.stride=$a),$n.divisor!==Xo&&(or.vertexAttribDivisorANGLE(rs,Xo),$n.divisor=Xo)):($n.buffer&&(De.disableVertexAttribArray(rs),$n.buffer=null),($n.x!==vs||$n.y!==Ks||$n.z!==as||$n.w!==Jn)&&(De.vertexAttrib4f(rs,vs,Ks,as,Jn),$n.x=vs,$n.y=Ks,$n.z=as,$n.w=Jn)),uo=b.call(this,_e,hi,Nr),Rs=!1,xs=1,Go=0,os=0,So=0,Qn=0,zo=null,rl=0,$o=!1,Na=5126,Ua=0,Po=0,fo=0,vr(uo)?(Rs=!0,zo=ue.createStream(34962,uo),Na=zo.dtype):(zo=ue.getBuffer(uo),zo?Na=zo.dtype:"constant"in uo?(xs=2,typeof uo.constant=="number"?(Go=uo.constant,os=So=Qn=0):(Go=uo.constant.length>0?uo.constant[0]:0,os=uo.constant.length>1?uo.constant[1]:0,So=uo.constant.length>2?uo.constant[2]:0,Qn=uo.constant.length>3?uo.constant[3]:0)):(vr(uo.buffer)?zo=ue.createStream(34962,uo.buffer):zo=ue.getBuffer(uo.buffer),Na="type"in uo?zi[uo.type]:zo.dtype,$o=!!uo.normalized,rl=uo.size|0,Ua=uo.offset|0,Po=uo.stride|0,fo=uo.divisor|0)),ro=y.location,Ma=ht[ro],xs===1?(Ma.buffer||De.enableVertexAttribArray(ro),io=rl||1,(Ma.type!==Na||Ma.size!==io||Ma.buffer!==zo||Ma.normalized!==$o||Ma.offset!==Ua||Ma.stride!==Po)&&(De.bindBuffer(34962,zo.buffer),De.vertexAttribPointer(ro,io,Na,$o,Po,Ua),Ma.type=Na,Ma.size=io,Ma.buffer=zo,Ma.normalized=$o,Ma.offset=Ua,Ma.stride=Po),Ma.divisor!==fo&&(or.vertexAttribDivisorANGLE(ro,fo),Ma.divisor=fo)):(Ma.buffer&&(De.disableVertexAttribArray(ro),Ma.buffer=null),(Ma.x!==Go||Ma.y!==os||Ma.z!==So||Ma.w!==Qn)&&(De.vertexAttrib4f(ro,Go,os,So,Qn),Ma.x=Go,Ma.y=os,Ma.z=So,Ma.w=Qn)),aa=E.call(this,_e,hi,Nr),Oo=!1,No=1,Zs=0,Fs=0,ws=0,no=0,Ls=null,ds=0,Xs=!1,oa=5126,Yo=0,po=0,ss=0,vr(aa)?(Oo=!0,Ls=ue.createStream(34962,aa),oa=Ls.dtype):(Ls=ue.getBuffer(aa),Ls?oa=Ls.dtype:"constant"in aa?(No=2,typeof aa.constant=="number"?(Zs=aa.constant,Fs=ws=no=0):(Zs=aa.constant.length>0?aa.constant[0]:0,Fs=aa.constant.length>1?aa.constant[1]:0,ws=aa.constant.length>2?aa.constant[2]:0,no=aa.constant.length>3?aa.constant[3]:0)):(vr(aa.buffer)?Ls=ue.createStream(34962,aa.buffer):Ls=ue.getBuffer(aa.buffer),oa="type"in aa?zi[aa.type]:Ls.dtype,Xs=!!aa.normalized,ds=aa.size|0,Yo=aa.offset|0,po=aa.stride|0,ss=aa.divisor|0)),ls=k.location,gs=ht[ls],No===1?(gs.buffer||De.enableVertexAttribArray(ls),bt=ds||1,(gs.type!==oa||gs.size!==bt||gs.buffer!==Ls||gs.normalized!==Xs||gs.offset!==Yo||gs.stride!==po)&&(De.bindBuffer(34962,Ls.buffer),De.vertexAttribPointer(ls,bt,oa,Xs,po,Yo),gs.type=oa,gs.size=bt,gs.buffer=Ls,gs.normalized=Xs,gs.offset=Yo,gs.stride=po),gs.divisor!==ss&&(or.vertexAttribDivisorANGLE(ls,ss),gs.divisor=ss)):(gs.buffer&&(De.disableVertexAttribArray(ls),gs.buffer=null),(gs.x!==Zs||gs.y!==Fs||gs.z!==ws||gs.w!==no)&&(De.vertexAttrib4f(ls,Zs,Fs,ws,no),gs.x=Zs,gs.y=Fs,gs.z=ws,gs.w=no)),Ft=A.call(this,_e,hi,Nr),hr=!1,nr=1,Sr=0,li=0,di=0,mi=0,Oi=null,dn=0,wi=!1,ui=5126,Ai=0,gi=0,gn=0,vr(Ft)?(hr=!0,Oi=ue.createStream(34962,Ft),ui=Oi.dtype):(Oi=ue.getBuffer(Ft),Oi?ui=Oi.dtype:"constant"in Ft?(nr=2,typeof Ft.constant=="number"?(Sr=Ft.constant,li=di=mi=0):(Sr=Ft.constant.length>0?Ft.constant[0]:0,li=Ft.constant.length>1?Ft.constant[1]:0,di=Ft.constant.length>2?Ft.constant[2]:0,mi=Ft.constant.length>3?Ft.constant[3]:0)):(vr(Ft.buffer)?Oi=ue.createStream(34962,Ft.buffer):Oi=ue.getBuffer(Ft.buffer),ui="type"in Ft?zi[Ft.type]:Oi.dtype,wi=!!Ft.normalized,dn=Ft.size|0,Ai=Ft.offset|0,gi=Ft.stride|0,gn=Ft.divisor|0)),In=L.location,Vn=ht[In],nr===1?(Vn.buffer||De.enableVertexAttribArray(In),Rn=dn||1,(Vn.type!==ui||Vn.size!==Rn||Vn.buffer!==Oi||Vn.normalized!==wi||Vn.offset!==Ai||Vn.stride!==gi)&&(De.bindBuffer(34962,Oi.buffer),De.vertexAttribPointer(In,Rn,ui,wi,gi,Ai),Vn.type=ui,Vn.size=Rn,Vn.buffer=Oi,Vn.normalized=wi,Vn.offset=Ai,Vn.stride=gi),Vn.divisor!==gn&&(or.vertexAttribDivisorANGLE(In,gn),Vn.divisor=gn)):(Vn.buffer&&(De.disableVertexAttribArray(In),Vn.buffer=null),(Vn.x!==Sr||Vn.y!==li||Vn.z!==di||Vn.w!==mi)&&(De.vertexAttrib4f(In,Sr,li,di,mi),Vn.x=Sr,Vn.y=li,Vn.z=di,Vn.w=mi)),Hn=_.call(this,_e,hi,Nr),Gn=!1,pn=1,Lo=0,us=0,Bs=0,Js=0,ol=null,Cl=0,ul=!1,Gl=5126,Vl=0,Fl=0,ga=0,vr(Hn)?(Gn=!0,ol=ue.createStream(34962,Hn),Gl=ol.dtype):(ol=ue.getBuffer(Hn),ol?Gl=ol.dtype:"constant"in Hn?(pn=2,typeof Hn.constant=="number"?(Lo=Hn.constant,us=Bs=Js=0):(Lo=Hn.constant.length>0?Hn.constant[0]:0,us=Hn.constant.length>1?Hn.constant[1]:0,Bs=Hn.constant.length>2?Hn.constant[2]:0,Js=Hn.constant.length>3?Hn.constant[3]:0)):(vr(Hn.buffer)?ol=ue.createStream(34962,Hn.buffer):ol=ue.getBuffer(Hn.buffer),Gl="type"in Hn?zi[Hn.type]:ol.dtype,ul=!!Hn.normalized,Cl=Hn.size|0,Vl=Hn.offset|0,Fl=Hn.stride|0,ga=Hn.divisor|0)),ko=C.location,zs=ht[ko],pn===1?(zs.buffer||De.enableVertexAttribArray(ko),Fo=Cl||1,(zs.type!==Gl||zs.size!==Fo||zs.buffer!==ol||zs.normalized!==ul||zs.offset!==Vl||zs.stride!==Fl)&&(De.bindBuffer(34962,ol.buffer),De.vertexAttribPointer(ko,Fo,Gl,ul,Fl,Vl),zs.type=Gl,zs.size=Fo,zs.buffer=ol,zs.normalized=ul,zs.offset=Vl,zs.stride=Fl),zs.divisor!==ga&&(or.vertexAttribDivisorANGLE(ko,ga),zs.divisor=ga)):(zs.buffer&&(De.disableVertexAttribArray(ko),zs.buffer=null),(zs.x!==Lo||zs.y!==us||zs.z!==Bs||zs.w!==Js)&&(De.vertexAttrib4f(ko,Lo,us,Bs,Js),zs.x=Lo,zs.y=us,zs.z=Bs,zs.w=Js)),Ys=M.call(this,_e,hi,Nr),Gs=!1,Us=1,Sl=0,_l=0,kl=0,cl=0,xl=null,Uo=0,_s=!1,Bl=5126,Il=0,Dl=0,oe=0,vr(Ys)?(Gs=!0,xl=ue.createStream(34962,Ys),Bl=xl.dtype):(xl=ue.getBuffer(Ys),xl?Bl=xl.dtype:"constant"in Ys?(Us=2,typeof Ys.constant=="number"?(Sl=Ys.constant,_l=kl=cl=0):(Sl=Ys.constant.length>0?Ys.constant[0]:0,_l=Ys.constant.length>1?Ys.constant[1]:0,kl=Ys.constant.length>2?Ys.constant[2]:0,cl=Ys.constant.length>3?Ys.constant[3]:0)):(vr(Ys.buffer)?xl=ue.createStream(34962,Ys.buffer):xl=ue.getBuffer(Ys.buffer),Bl="type"in Ys?zi[Ys.type]:xl.dtype,_s=!!Ys.normalized,Uo=Ys.size|0,Il=Ys.offset|0,Dl=Ys.stride|0,oe=Ys.divisor|0)),w=v.location,B=ht[w],Us===1?(B.buffer||De.enableVertexAttribArray(w),Q=Uo||1,(B.type!==Bl||B.size!==Q||B.buffer!==xl||B.normalized!==_s||B.offset!==Il||B.stride!==Dl)&&(De.bindBuffer(34962,xl.buffer),De.vertexAttribPointer(w,Q,Bl,_s,Dl,Il),B.type=Bl,B.size=Q,B.buffer=xl,B.normalized=_s,B.offset=Il,B.stride=Dl),B.divisor!==oe&&(or.vertexAttribDivisorANGLE(w,oe),B.divisor=oe)):(B.buffer&&(De.disableVertexAttribArray(w),B.buffer=null),(B.x!==Sl||B.y!==_l||B.z!==kl||B.w!==cl)&&(De.vertexAttrib4f(w,Sl,_l,kl,cl),B.x=Sl,B.y=_l,B.z=kl,B.w=cl)),ee=hi.markerTexture,ee&&ee._reglType==="framebuffer"&&(ee=ee.color[0]),le=ee._texture,De.uniform1i(T.location,le.bind()),Ne=hi.opacity,(!Nr||$e!==Ne)&&($e=Ne,De.uniform1f(F.location,Ne)),pt=U.call(this,_e,hi,Nr),zt=pt[0],Jt=pt[1],(!Nr||Yt!==zt||yr!==Jt)&&(Yt=zt,yr=Jt,De.uniform2f(q.location,zt,Jt)),Ir=_e.pixelRatio,(!Nr||ce!==Ir)&&(ce=Ir,De.uniform1f(G.location,Ir)),Ae=hi.scale,qe=Ae[0],ot=Ae[1],(!Nr||Ve!==qe||Ke!==ot)&&(Ve=qe,Ke=ot,De.uniform2f(O.location,qe,ot)),ft=hi.scaleFract,qt=ft[0],$t=ft[1],(!Nr||Xt!==qt||dr!==$t)&&(Xt=qt,dr=$t,De.uniform2f(W.location,qt,$t)),Mr=hi.translate,$r=Mr[0],pi=Mr[1],(!Nr||ii!==$r||Yi!==pi)&&(ii=$r,Yi=pi,De.uniform2f(re.location,$r,pi)),wn=hi.translateFract,Tn=wn[0],oo=wn[1],(!Nr||ua!==Tn||el!==oo)&&(ua=Tn,el=oo,De.uniform2f(ne.location,Tn,oo)),ys=hi.elements,il=null,$l=vr(ys),$l?il=ye.createStream(ys):il=ye.getElements(ys),il&&De.bindBuffer(34963,il.buffer.buffer),pl=hi.offset,Hl=hi.count,Hl&&(va>0?il?or.drawElementsInstancedANGLE(0,Hl,il.type,pl<<(il.type-5121>>1),va):or.drawArraysInstancedANGLE(0,pl,Hl,va):va<0&&(il?De.drawElements(0,Hl,il.type,pl<<(il.type-5121>>1)):De.drawArrays(0,pl,Hl)),_e.viewportWidth=Qi,_e.viewportHeight=Nn,co&&ue.destroyStream(sa),Ia&&ue.destroyStream(Ln),Ss&&ue.destroyStream(ja),Ds&&ue.destroyStream(Cs),Rs&&ue.destroyStream(zo),Oo&&ue.destroyStream(Ls),hr&&ue.destroyStream(Oi),Gn&&ue.destroyStream(ol),Gs&&ue.destroyStream(xl),le.unbind(),$l&&ye.destroyStream(il))}j.unbind(),Ie.dirty=!0,Et.setVAO(null),Wt&&(r.cpuTime+=performance.now()-tr)}}}});var k9=Se((a1r,VOe)=>{VOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr){"use strict";var Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi;return Ot=t.gl,De=t.context,_e=t.strings,Fe=t.next,Pe=t.current,Ie=t.draw,lt=t.elements,ye=t.buffer,ue=t.shader,de=t.attributes,ht=t.vao,Et=t.uniforms,St=t.framebuffer,Zt=t.extensions,qr=t.timer,Lr=t.isBufferArgs,vr=Fe.blend_color,Er=Pe.blend_color,si=Fe.blend_equation,Ei=Pe.blend_equation,Si=Fe.blend_func,xi=Pe.blend_func,Hi=Fe.depth_range,Jr=Pe.depth_range,ci=Fe.colorMask,Di=Pe.colorMask,Lt=Fe.polygonOffset_offset,vt=Pe.polygonOffset_offset,Dt=Fe.sample_coverage,Bt=Pe.sample_coverage,sr=Fe.stencil_func,br=Pe.stencil_func,zr=Fe.stencil_opFront,Tr=Pe.stencil_opFront,Rr=Fe.stencil_opBack,Br=Pe.stencil_opBack,oi=Fe.scissor_box,vi=Pe.scissor_box,Pi=Fe.viewport,Yr=Pe.viewport,Ni={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ur={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ki={add:32774,subtract:32778,"reverse subtract":32779},ji={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Vi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},zi={cw:2304,ccw:2305},{draw:function(Mi){var sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys;if(sn=Zt.angle_instanced_arrays,fi=St.next,fi!==St.cur&&(fi?Ot.bindFramebuffer(36160,fi.framebuffer):Ot.bindFramebuffer(36160,null),St.cur=fi),Pe.dirty){var Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt;Gs=Fe.dither,Gs!==Pe.dither&&(Gs?Ot.enable(3024):Ot.disable(3024),Pe.dither=Gs),Us=si[0],Sl=si[1],(Us!==Ei[0]||Sl!==Ei[1])&&(Ot.blendEquationSeparate(Us,Sl),Ei[0]=Us,Ei[1]=Sl),_l=Fe.depth_func,_l!==Pe.depth_func&&(Ot.depthFunc(_l),Pe.depth_func=_l),kl=Hi[0],cl=Hi[1],(kl!==Jr[0]||cl!==Jr[1])&&(Ot.depthRange(kl,cl),Jr[0]=kl,Jr[1]=cl),xl=Fe.depth_mask,xl!==Pe.depth_mask&&(Ot.depthMask(xl),Pe.depth_mask=xl),Uo=ci[0],_s=ci[1],Bl=ci[2],Il=ci[3],(Uo!==Di[0]||_s!==Di[1]||Bl!==Di[2]||Il!==Di[3])&&(Ot.colorMask(Uo,_s,Bl,Il),Di[0]=Uo,Di[1]=_s,Di[2]=Bl,Di[3]=Il),Dl=Fe.cull_enable,Dl!==Pe.cull_enable&&(Dl?Ot.enable(2884):Ot.disable(2884),Pe.cull_enable=Dl),oe=Fe.cull_face,oe!==Pe.cull_face&&(Ot.cullFace(oe),Pe.cull_face=oe),w=Fe.frontFace,w!==Pe.frontFace&&(Ot.frontFace(w),Pe.frontFace=w),B=Fe.lineWidth,B!==Pe.lineWidth&&(Ot.lineWidth(B),Pe.lineWidth=B),Q=Fe.polygonOffset_enable,Q!==Pe.polygonOffset_enable&&(Q?Ot.enable(32823):Ot.disable(32823),Pe.polygonOffset_enable=Q),ee=Lt[0],le=Lt[1],(ee!==vt[0]||le!==vt[1])&&(Ot.polygonOffset(ee,le),vt[0]=ee,vt[1]=le),Ne=Fe.sample_alpha,Ne!==Pe.sample_alpha&&(Ne?Ot.enable(32926):Ot.disable(32926),Pe.sample_alpha=Ne),$e=Fe.sample_enable,$e!==Pe.sample_enable&&($e?Ot.enable(32928):Ot.disable(32928),Pe.sample_enable=$e),pt=Dt[0],zt=Dt[1],(pt!==Bt[0]||zt!==Bt[1])&&(Ot.sampleCoverage(pt,zt),Bt[0]=pt,Bt[1]=zt),Yt=Fe.stencil_mask,Yt!==Pe.stencil_mask&&(Ot.stencilMask(Yt),Pe.stencil_mask=Yt),Jt=sr[0],yr=sr[1],Ir=sr[2],(Jt!==br[0]||yr!==br[1]||Ir!==br[2])&&(Ot.stencilFunc(Jt,yr,Ir),br[0]=Jt,br[1]=yr,br[2]=Ir),ce=zr[0],Ae=zr[1],qe=zr[2],Ve=zr[3],(ce!==Tr[0]||Ae!==Tr[1]||qe!==Tr[2]||Ve!==Tr[3])&&(Ot.stencilOpSeparate(ce,Ae,qe,Ve),Tr[0]=ce,Tr[1]=Ae,Tr[2]=qe,Tr[3]=Ve),ot=Rr[0],Ke=Rr[1],ft=Rr[2],qt=Rr[3],(ot!==Br[0]||Ke!==Br[1]||ft!==Br[2]||qt!==Br[3])&&(Ot.stencilOpSeparate(ot,Ke,ft,qt),Br[0]=ot,Br[1]=Ke,Br[2]=ft,Br[3]=qt)}Or=Mi.viewport,st=Or.x|0,Wt=Or.y|0,tr="width"in Or?Or.width|0:De.framebufferWidth-st,or="height"in Or?Or.height|0:De.framebufferHeight-Wt,Nr=De.viewportWidth,De.viewportWidth=tr,hi=De.viewportHeight,De.viewportHeight=or,Ot.viewport(st,Wt,tr,or),Yr[0]=st,Yr[1]=Wt,Yr[2]=tr,Yr[3]=or,Ot.blendColor(0,0,0,1),Er[0]=0,Er[1]=0,Er[2]=0,Er[3]=1,n?Ot.enable(3042):Ot.disable(3042),Pe.blend_enable=n,Ot.blendFuncSeparate(770,771,773,1),xi[0]=770,xi[1]=771,xi[2]=773,xi[3]=1,i?Ot.enable(2929):Ot.disable(2929),Pe.depth_enable=i,Gi=Mi.viewport,Qr=Gi.x|0,Ui=Gi.y|0,zn="width"in Gi?Gi.width|0:De.framebufferWidth-Qr,fn="height"in Gi?Gi.height|0:De.framebufferHeight-Ui,Ot.scissor(Qr,Ui,zn,fn),vi[0]=Qr,vi[1]=Ui,vi[2]=zn,vi[3]=fn,a?Ot.enable(3089):Ot.disable(3089),Pe.scissor_enable=a,o?Ot.enable(2960):Ot.disable(2960),Pe.stencil_enable=o,xn=Pe.profile,xn&&(_a=performance.now(),r.count++),Ot.useProgram(s.program),Wn=Zt.angle_instanced_arrays,ht.setVAO(null),Fn=u.call(this,De,Mi,0),ia=!1,za=1,Hr=0,na=0,go=0,Dn=0,un=null,Zn=0,Wo=!1,Ba=5126,Bo=0,Ea=0,Ha=0,Lr(Fn)?(ia=!0,un=ye.createStream(34962,Fn),Ba=un.dtype):(un=ye.getBuffer(Fn),un?Ba=un.dtype:"constant"in Fn?(za=2,typeof Fn.constant=="number"?(Hr=Fn.constant,na=go=Dn=0):(Hr=Fn.constant.length>0?Fn.constant[0]:0,na=Fn.constant.length>1?Fn.constant[1]:0,go=Fn.constant.length>2?Fn.constant[2]:0,Dn=Fn.constant.length>3?Fn.constant[3]:0)):(Lr(Fn.buffer)?un=ye.createStream(34962,Fn.buffer):un=ye.getBuffer(Fn.buffer),Ba="type"in Fn?Vi[Fn.type]:un.dtype,Wo=!!Fn.normalized,Zn=Fn.size|0,Bo=Fn.offset|0,Ea=Fn.stride|0,Ha=Fn.divisor|0)),tn=l.location,Cn=de[tn],za===1?(Cn.buffer||Ot.enableVertexAttribArray(tn),Xn=Zn||4,(Cn.type!==Ba||Cn.size!==Xn||Cn.buffer!==un||Cn.normalized!==Wo||Cn.offset!==Bo||Cn.stride!==Ea)&&(Ot.bindBuffer(34962,un.buffer),Ot.vertexAttribPointer(tn,Xn,Ba,Wo,Ea,Bo),Cn.type=Ba,Cn.size=Xn,Cn.buffer=un,Cn.normalized=Wo,Cn.offset=Bo,Cn.stride=Ea),Cn.divisor!==Ha&&(Wn.vertexAttribDivisorANGLE(tn,Ha),Cn.divisor=Ha)):(Cn.buffer&&(Ot.disableVertexAttribArray(tn),Cn.buffer=null),(Cn.x!==Hr||Cn.y!==na||Cn.z!==go||Cn.w!==Dn)&&(Ot.vertexAttrib4f(tn,Hr,na,go,Dn),Cn.x=Hr,Cn.y=na,Cn.z=go,Cn.w=Dn)),ts=f.call(this,De,Mi,0),Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,Lr(ts)?(Ja=!0,ln=ye.createStream(34962,ts),bo=ln.dtype):(ln=ye.getBuffer(ts),ln?bo=ln.dtype:"constant"in ts?(to=2,typeof ts.constant=="number"?(Ri=ts.constant,an=cs=pa=0):(Ri=ts.constant.length>0?ts.constant[0]:0,an=ts.constant.length>1?ts.constant[1]:0,cs=ts.constant.length>2?ts.constant[2]:0,pa=ts.constant.length>3?ts.constant[3]:0)):(Lr(ts.buffer)?ln=ye.createStream(34962,ts.buffer):ln=ye.getBuffer(ts.buffer),bo="type"in ts?Vi[ts.type]:ln.dtype,va=!!ts.normalized,ka=ts.size|0,Co=ts.offset|0,Fi=ts.stride|0,Yn=ts.divisor|0)),xa=c.location,Qi=de[xa],to===1?(Qi.buffer||Ot.enableVertexAttribArray(xa),Nn=ka||1,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(Ot.bindBuffer(34962,ln.buffer),Ot.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(Wn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(Ot.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(Ot.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=h.call(this,De,Mi,0),qa=!1,jo=1,Vo=0,Pa=0,Oa=0,co=0,An=null,_o=0,ks=!1,bs=5126,ps=0,sa=0,Bn=0,Lr(Pn)?(qa=!0,An=ye.createStream(34962,Pn),bs=An.dtype):(An=ye.getBuffer(Pn),An?bs=An.dtype:"constant"in Pn?(jo=2,typeof Pn.constant=="number"?(Vo=Pn.constant,Pa=Oa=co=0):(Vo=Pn.constant.length>0?Pn.constant[0]:0,Pa=Pn.constant.length>1?Pn.constant[1]:0,Oa=Pn.constant.length>2?Pn.constant[2]:0,co=Pn.constant.length>3?Pn.constant[3]:0)):(Lr(Pn.buffer)?An=ye.createStream(34962,Pn.buffer):An=ye.getBuffer(Pn.buffer),bs="type"in Pn?Vi[Pn.type]:An.dtype,ks=!!Pn.normalized,_o=Pn.size|0,ps=Pn.offset|0,sa=Pn.stride|0,Bn=Pn.divisor|0)),ms=d.location,ya=de[ms],jo===1?(ya.buffer||Ot.enableVertexAttribArray(ms),on=_o||4,(ya.type!==bs||ya.size!==on||ya.buffer!==An||ya.normalized!==ks||ya.offset!==ps||ya.stride!==sa)&&(Ot.bindBuffer(34962,An.buffer),Ot.vertexAttribPointer(ms,on,bs,ks,sa,ps),ya.type=bs,ya.size=on,ya.buffer=An,ya.normalized=ks,ya.offset=ps,ya.stride=sa),ya.divisor!==Bn&&(Wn.vertexAttribDivisorANGLE(ms,Bn),ya.divisor=Bn)):(ya.buffer&&(Ot.disableVertexAttribArray(ms),ya.buffer=null),(ya.x!==Vo||ya.y!==Pa||ya.z!==Oa||ya.w!==co)&&(Ot.vertexAttrib4f(ms,Vo,Pa,Oa,co),ya.x=Vo,ya.y=Pa,ya.z=Oa,ya.w=co)),mn=p.call(this,De,Mi,0),Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,Lr(mn)?(Ga=!0,yn=ye.createStream(34962,mn),Da=yn.dtype):(yn=ye.getBuffer(mn),yn?Da=yn.dtype:"constant"in mn?(ca=2,typeof mn.constant=="number"?(bn=mn.constant,Xi=qn=Ia=0):(bn=mn.constant.length>0?mn.constant[0]:0,Xi=mn.constant.length>1?mn.constant[1]:0,qn=mn.constant.length>2?mn.constant[2]:0,Ia=mn.constant.length>3?mn.constant[3]:0)):(Lr(mn.buffer)?yn=ye.createStream(34962,mn.buffer):yn=ye.getBuffer(mn.buffer),Da="type"in mn?Vi[mn.type]:yn.dtype,ba=!!mn.normalized,Ya=mn.size|0,Aa=mn.offset|0,Ln=mn.stride|0,wo=mn.divisor|0)),wa=x.location,$i=de[wa],ca===1?($i.buffer||Ot.enableVertexAttribArray(wa),ea=Ya||1,($i.type!==Da||$i.size!==ea||$i.buffer!==yn||$i.normalized!==ba||$i.offset!==Aa||$i.stride!==Ln)&&(Ot.bindBuffer(34962,yn.buffer),Ot.vertexAttribPointer(wa,ea,Da,ba,Ln,Aa),$i.type=Da,$i.size=ea,$i.buffer=yn,$i.normalized=ba,$i.offset=Aa,$i.stride=Ln),$i.divisor!==wo&&(Wn.vertexAttribDivisorANGLE(wa,wo),$i.divisor=wo)):($i.buffer&&(Ot.disableVertexAttribArray(wa),$i.buffer=null),($i.x!==bn||$i.y!==Xi||$i.z!==qn||$i.w!==Ia)&&(Ot.vertexAttrib4f(wa,bn,Xi,qn,Ia),$i.x=bn,$i.y=Xi,$i.z=qn,$i.w=Ia)),Sa=b.call(this,De,Mi,0),Za=!1,xo=1,Wa=0,hn=0,Un=0,Ss=0,Kn=null,ns=0,Jo=!1,vo=5126,ma=0,ja=0,To=0,Lr(Sa)?(Za=!0,Kn=ye.createStream(34962,Sa),vo=Kn.dtype):(Kn=ye.getBuffer(Sa),Kn?vo=Kn.dtype:"constant"in Sa?(xo=2,typeof Sa.constant=="number"?(Wa=Sa.constant,hn=Un=Ss=0):(Wa=Sa.constant.length>0?Sa.constant[0]:0,hn=Sa.constant.length>1?Sa.constant[1]:0,Un=Sa.constant.length>2?Sa.constant[2]:0,Ss=Sa.constant.length>3?Sa.constant[3]:0)):(Lr(Sa.buffer)?Kn=ye.createStream(34962,Sa.buffer):Kn=ye.getBuffer(Sa.buffer),vo="type"in Sa?Vi[Sa.type]:Kn.dtype,Jo=!!Sa.normalized,ns=Sa.size|0,ma=Sa.offset|0,ja=Sa.stride|0,To=Sa.divisor|0)),Ao=y.location,la=de[Ao],xo===1?(la.buffer||Ot.enableVertexAttribArray(Ao),Ki=ns||1,(la.type!==vo||la.size!==Ki||la.buffer!==Kn||la.normalized!==Jo||la.offset!==ma||la.stride!==ja)&&(Ot.bindBuffer(34962,Kn.buffer),Ot.vertexAttribPointer(Ao,Ki,vo,Jo,ja,ma),la.type=vo,la.size=Ki,la.buffer=Kn,la.normalized=Jo,la.offset=ma,la.stride=ja),la.divisor!==To&&(Wn.vertexAttribDivisorANGLE(Ao,To),la.divisor=To)):(la.buffer&&(Ot.disableVertexAttribArray(Ao),la.buffer=null),(la.x!==Wa||la.y!==hn||la.z!==Un||la.w!==Ss)&&(Ot.vertexAttrib4f(Ao,Wa,hn,Un,Ss),la.x=Wa,la.y=hn,la.z=Un,la.w=Ss)),ho=E.call(this,De,Mi,0),Ka=!1,Ca=1,ta=0,En=0,Mo=0,Ds=0,Ro=null,vs=0,Ks=!1,as=5126,Jn=0,Cs=0,Xa=0,Lr(ho)?(Ka=!0,Ro=ye.createStream(34962,ho),as=Ro.dtype):(Ro=ye.getBuffer(ho),Ro?as=Ro.dtype:"constant"in ho?(Ca=2,typeof ho.constant=="number"?(ta=ho.constant,En=Mo=Ds=0):(ta=ho.constant.length>0?ho.constant[0]:0,En=ho.constant.length>1?ho.constant[1]:0,Mo=ho.constant.length>2?ho.constant[2]:0,Ds=ho.constant.length>3?ho.constant[3]:0)):(Lr(ho.buffer)?Ro=ye.createStream(34962,ho.buffer):Ro=ye.getBuffer(ho.buffer),as="type"in ho?Vi[ho.type]:Ro.dtype,Ks=!!ho.normalized,vs=ho.size|0,Jn=ho.offset|0,Cs=ho.stride|0,Xa=ho.divisor|0)),Zo=k.location,Eo=de[Zo],Ca===1?(Eo.buffer||Ot.enableVertexAttribArray(Zo),lo=vs||1,(Eo.type!==as||Eo.size!==lo||Eo.buffer!==Ro||Eo.normalized!==Ks||Eo.offset!==Jn||Eo.stride!==Cs)&&(Ot.bindBuffer(34962,Ro.buffer),Ot.vertexAttribPointer(Zo,lo,as,Ks,Cs,Jn),Eo.type=as,Eo.size=lo,Eo.buffer=Ro,Eo.normalized=Ks,Eo.offset=Jn,Eo.stride=Cs),Eo.divisor!==Xa&&(Wn.vertexAttribDivisorANGLE(Zo,Xa),Eo.divisor=Xa)):(Eo.buffer&&(Ot.disableVertexAttribArray(Zo),Eo.buffer=null),(Eo.x!==ta||Eo.y!==En||Eo.z!==Mo||Eo.w!==Ds)&&(Ot.vertexAttrib4f(Zo,ta,En,Mo,Ds),Eo.x=ta,Eo.y=En,Eo.z=Mo,Eo.w=Ds)),$a=A.call(this,De,Mi,0),Xo=!1,rs=1,$n=0,Sn=0,uo=0,Rs=0,xs=null,Go=0,os=!1,So=5126,Qn=0,zo=0,rl=0,Lr($a)?(Xo=!0,xs=ye.createStream(34962,$a),So=xs.dtype):(xs=ye.getBuffer($a),xs?So=xs.dtype:"constant"in $a?(rs=2,typeof $a.constant=="number"?($n=$a.constant,Sn=uo=Rs=0):($n=$a.constant.length>0?$a.constant[0]:0,Sn=$a.constant.length>1?$a.constant[1]:0,uo=$a.constant.length>2?$a.constant[2]:0,Rs=$a.constant.length>3?$a.constant[3]:0)):(Lr($a.buffer)?xs=ye.createStream(34962,$a.buffer):xs=ye.getBuffer($a.buffer),So="type"in $a?Vi[$a.type]:xs.dtype,os=!!$a.normalized,Go=$a.size|0,Qn=$a.offset|0,zo=$a.stride|0,rl=$a.divisor|0)),$o=L.location,Na=de[$o],rs===1?(Na.buffer||Ot.enableVertexAttribArray($o),Ua=Go||1,(Na.type!==So||Na.size!==Ua||Na.buffer!==xs||Na.normalized!==os||Na.offset!==Qn||Na.stride!==zo)&&(Ot.bindBuffer(34962,xs.buffer),Ot.vertexAttribPointer($o,Ua,So,os,zo,Qn),Na.type=So,Na.size=Ua,Na.buffer=xs,Na.normalized=os,Na.offset=Qn,Na.stride=zo),Na.divisor!==rl&&(Wn.vertexAttribDivisorANGLE($o,rl),Na.divisor=rl)):(Na.buffer&&(Ot.disableVertexAttribArray($o),Na.buffer=null),(Na.x!==$n||Na.y!==Sn||Na.z!==uo||Na.w!==Rs)&&(Ot.vertexAttrib4f($o,$n,Sn,uo,Rs),Na.x=$n,Na.y=Sn,Na.z=uo,Na.w=Rs)),Po=_.call(this,De,Mi,0),fo=!1,ro=1,Ma=0,io=0,aa=0,Oo=0,No=null,Zs=0,Fs=!1,ws=5126,no=0,Ls=0,ds=0,Lr(Po)?(fo=!0,No=ye.createStream(34962,Po),ws=No.dtype):(No=ye.getBuffer(Po),No?ws=No.dtype:"constant"in Po?(ro=2,typeof Po.constant=="number"?(Ma=Po.constant,io=aa=Oo=0):(Ma=Po.constant.length>0?Po.constant[0]:0,io=Po.constant.length>1?Po.constant[1]:0,aa=Po.constant.length>2?Po.constant[2]:0,Oo=Po.constant.length>3?Po.constant[3]:0)):(Lr(Po.buffer)?No=ye.createStream(34962,Po.buffer):No=ye.getBuffer(Po.buffer),ws="type"in Po?Vi[Po.type]:No.dtype,Fs=!!Po.normalized,Zs=Po.size|0,no=Po.offset|0,Ls=Po.stride|0,ds=Po.divisor|0)),Xs=C.location,oa=de[Xs],ro===1?(oa.buffer||Ot.enableVertexAttribArray(Xs),Yo=Zs||1,(oa.type!==ws||oa.size!==Yo||oa.buffer!==No||oa.normalized!==Fs||oa.offset!==no||oa.stride!==Ls)&&(Ot.bindBuffer(34962,No.buffer),Ot.vertexAttribPointer(Xs,Yo,ws,Fs,Ls,no),oa.type=ws,oa.size=Yo,oa.buffer=No,oa.normalized=Fs,oa.offset=no,oa.stride=Ls),oa.divisor!==ds&&(Wn.vertexAttribDivisorANGLE(Xs,ds),oa.divisor=ds)):(oa.buffer&&(Ot.disableVertexAttribArray(Xs),oa.buffer=null),(oa.x!==Ma||oa.y!==io||oa.z!==aa||oa.w!==Oo)&&(Ot.vertexAttrib4f(Xs,Ma,io,aa,Oo),oa.x=Ma,oa.y=io,oa.z=aa,oa.w=Oo)),po=M.call(this,De,Mi,0),ss=!1,ls=1,gs=0,bt=0,Ft=0,hr=0,nr=null,Sr=0,li=!1,di=5126,mi=0,Oi=0,dn=0,Lr(po)?(ss=!0,nr=ye.createStream(34962,po),di=nr.dtype):(nr=ye.getBuffer(po),nr?di=nr.dtype:"constant"in po?(ls=2,typeof po.constant=="number"?(gs=po.constant,bt=Ft=hr=0):(gs=po.constant.length>0?po.constant[0]:0,bt=po.constant.length>1?po.constant[1]:0,Ft=po.constant.length>2?po.constant[2]:0,hr=po.constant.length>3?po.constant[3]:0)):(Lr(po.buffer)?nr=ye.createStream(34962,po.buffer):nr=ye.getBuffer(po.buffer),di="type"in po?Vi[po.type]:nr.dtype,li=!!po.normalized,Sr=po.size|0,mi=po.offset|0,Oi=po.stride|0,dn=po.divisor|0)),wi=v.location,ui=de[wi],ls===1?(ui.buffer||Ot.enableVertexAttribArray(wi),Ai=Sr||1,(ui.type!==di||ui.size!==Ai||ui.buffer!==nr||ui.normalized!==li||ui.offset!==mi||ui.stride!==Oi)&&(Ot.bindBuffer(34962,nr.buffer),Ot.vertexAttribPointer(wi,Ai,di,li,Oi,mi),ui.type=di,ui.size=Ai,ui.buffer=nr,ui.normalized=li,ui.offset=mi,ui.stride=Oi),ui.divisor!==dn&&(Wn.vertexAttribDivisorANGLE(wi,dn),ui.divisor=dn)):(ui.buffer&&(Ot.disableVertexAttribArray(wi),ui.buffer=null),(ui.x!==gs||ui.y!==bt||ui.z!==Ft||ui.w!==hr)&&(Ot.vertexAttrib4f(wi,gs,bt,Ft,hr),ui.x=gs,ui.y=bt,ui.z=Ft,ui.w=hr)),Ot.uniform1i(z.location,!1),gi=Mi.opacity,Ot.uniform1f(T.location,gi),gn=q.call(this,De,Mi,0),In=gn[0],Vn=gn[1],Ot.uniform2f(F.location,In,Vn),Ot.uniform1i(U.location,H.bind()),Rn=De.pixelRatio,Ot.uniform1f(j.location,Rn),Hn=Mi.scale,Gn=Hn[0],pn=Hn[1],Ot.uniform2f(G.location,Gn,pn),Lo=Mi.scaleFract,us=Lo[0],Bs=Lo[1],Ot.uniform2f(O.location,us,Bs),Js=Mi.translate,ol=Js[0],Cl=Js[1],Ot.uniform2f(W.location,ol,Cl),ul=Mi.translateFract,Gl=ul[0],Vl=ul[1],Ot.uniform2f(re.location,Gl,Vl),Fl=Mi.elements,ga=null,ko=Lr(Fl),ko?ga=lt.createStream(Fl):ga=lt.getElements(Fl),ga&&Ot.bindBuffer(34963,ga.buffer.buffer),zs=Mi.offset,Fo=Mi.count,Fo&&(Ys=Ie.instances,Ys>0?ga?Wn.drawElementsInstancedANGLE(0,Fo,ga.type,zs<<(ga.type-5121>>1),Ys):Wn.drawArraysInstancedANGLE(0,zs,Fo,Ys):Ys<0&&(ga?Ot.drawElements(0,Fo,ga.type,zs<<(ga.type-5121>>1)):Ot.drawArrays(0,zs,Fo)),Pe.dirty=!0,ht.setVAO(null),De.viewportWidth=Nr,De.viewportHeight=hi,xn&&(r.cpuTime+=performance.now()-_a),ia&&ye.destroyStream(un),Ja&&ye.destroyStream(ln),qa&&ye.destroyStream(An),Ga&&ye.destroyStream(yn),Za&&ye.destroyStream(Kn),Ka&&ye.destroyStream(Ro),Xo&&ye.destroyStream(xs),fo&&ye.destroyStream(No),ss&&ye.destroyStream(nr),H.unbind(),ko&<.destroyStream(ga))},scope:function(Mi,sn,fi){var Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf;Or=Mi.viewport,st=Or.x|0,Wt=Or.y|0,tr="width"in Or?Or.width|0:De.framebufferWidth-st,or="height"in Or?Or.height|0:De.framebufferHeight-Wt,Nr=De.viewportWidth,De.viewportWidth=tr,hi=De.viewportHeight,De.viewportHeight=or,Gi=Pi[0],Pi[0]=st,Qr=Pi[1],Pi[1]=Wt,Ui=Pi[2],Pi[2]=tr,zn=Pi[3],Pi[3]=or,fn=vr[0],vr[0]=ne,xn=vr[1],vr[1]=be,_a=vr[2],vr[2]=ze,Wn=vr[3],vr[3]=Ce,Fn=Fe.blend_enable,Fe.blend_enable=he,ia=Si[0],Si[0]=te,za=Si[1],Si[1]=ke,Hr=Si[2],Si[2]=Ee,na=Si[3],Si[3]=Me,go=Fe.depth_enable,Fe.depth_enable=Oe,Dn=Mi.viewport,un=Dn.x|0,Zn=Dn.y|0,Wo="width"in Dn?Dn.width|0:De.framebufferWidth-un,Ba="height"in Dn?Dn.height|0:De.framebufferHeight-Zn,Bo=oi[0],oi[0]=un,Ea=oi[1],oi[1]=Zn,Ha=oi[2],oi[2]=Wo,tn=oi[3],oi[3]=Ba,Cn=Fe.scissor_enable,Fe.scissor_enable=Re,Xn=Fe.stencil_enable,Fe.stencil_enable=me,ts=Pe.profile,ts&&(Ja=performance.now(),r.count++),to=Mi.elements,Ri=null,an=Lr(to),an?Ri=lt.createStream(to):Ri=lt.getElements(to),cs=Ie.elements,Ie.elements=Ri,pa=Mi.offset,ln=Ie.offset,Ie.offset=pa,ka=Mi.count,va=Ie.count,Ie.count=ka,bo=Ie.primitive,Ie.primitive=Be,Co=Et[fe],Et[fe]=!1,Fi=Et[et],Et[et]=Ze,Yn=Mi.opacity,xa=Et[gt],Et[gt]=Yn,Qi=q.call(this,De,Mi,fi),Nn=Et[Pt],Et[Pt]=Qi,Pn=De.pixelRatio,qa=Et[Qe],Et[Qe]=Pn,jo=Mi.scale,Vo=Et[Xe],Et[Xe]=jo,Pa=Mi.scaleFract,Oa=Et[Tt],Et[Tt]=Pa,co=Mi.translate,An=Et[xt],Et[xt]=co,_o=Mi.translateFract,ks=Et[_t],Et[_t]=_o,bs=Mi.markerTexture,ps=Et[Ct],Et[Ct]=bs,sa=E.call(this,De,Mi,fi),Bn=!1,ms=1,ya=0,on=0,mn=0,Ga=0,ca=null,bn=0,Xi=!1,qn=5126,Ia=0,yn=0,Ya=0,Lr(sa)?(Bn=!0,ca=ye.createStream(34962,sa),qn=ca.dtype):(ca=ye.getBuffer(sa),ca?qn=ca.dtype:"constant"in sa?(ms=2,typeof sa.constant=="number"?(ya=sa.constant,on=mn=Ga=0):(ya=sa.constant.length>0?sa.constant[0]:0,on=sa.constant.length>1?sa.constant[1]:0,mn=sa.constant.length>2?sa.constant[2]:0,Ga=sa.constant.length>3?sa.constant[3]:0)):(Lr(sa.buffer)?ca=ye.createStream(34962,sa.buffer):ca=ye.getBuffer(sa.buffer),qn="type"in sa?Vi[sa.type]:ca.dtype,Xi=!!sa.normalized,bn=sa.size|0,Ia=sa.offset|0,yn=sa.stride|0,Ya=sa.divisor|0)),ba=jt.state,jt.state=ms,Da=jt.x,jt.x=ya,Aa=jt.y,jt.y=on,Ln=jt.z,jt.z=mn,wo=jt.w,jt.w=Ga,wa=jt.buffer,jt.buffer=ca,$i=jt.size,jt.size=bn,ea=jt.normalized,jt.normalized=Xi,Sa=jt.type,jt.type=qn,Za=jt.offset,jt.offset=Ia,xo=jt.stride,jt.stride=yn,Wa=jt.divisor,jt.divisor=Ya,hn=_.call(this,De,Mi,fi),Un=!1,Ss=1,Kn=0,ns=0,Jo=0,vo=0,ma=null,ja=0,To=!1,Ao=5126,la=0,Ki=0,ho=0,Lr(hn)?(Un=!0,ma=ye.createStream(34962,hn),Ao=ma.dtype):(ma=ye.getBuffer(hn),ma?Ao=ma.dtype:"constant"in hn?(Ss=2,typeof hn.constant=="number"?(Kn=hn.constant,ns=Jo=vo=0):(Kn=hn.constant.length>0?hn.constant[0]:0,ns=hn.constant.length>1?hn.constant[1]:0,Jo=hn.constant.length>2?hn.constant[2]:0,vo=hn.constant.length>3?hn.constant[3]:0)):(Lr(hn.buffer)?ma=ye.createStream(34962,hn.buffer):ma=ye.getBuffer(hn.buffer),Ao="type"in hn?Vi[hn.type]:ma.dtype,To=!!hn.normalized,ja=hn.size|0,la=hn.offset|0,Ki=hn.stride|0,ho=hn.divisor|0)),Ka=At.state,At.state=Ss,Ca=At.x,At.x=Kn,ta=At.y,At.y=ns,En=At.z,At.z=Jo,Mo=At.w,At.w=vo,Ds=At.buffer,At.buffer=ma,Ro=At.size,At.size=ja,vs=At.normalized,At.normalized=To,Ks=At.type,At.type=Ao,as=At.offset,At.offset=la,Jn=At.stride,At.stride=Ki,Cs=At.divisor,At.divisor=ho,Xa=A.call(this,De,Mi,fi),Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Lr(Xa)?(Zo=!0,$n=ye.createStream(34962,Xa),Rs=$n.dtype):($n=ye.getBuffer(Xa),$n?Rs=$n.dtype:"constant"in Xa?(Eo=2,typeof Xa.constant=="number"?(lo=Xa.constant,$a=Xo=rs=0):(lo=Xa.constant.length>0?Xa.constant[0]:0,$a=Xa.constant.length>1?Xa.constant[1]:0,Xo=Xa.constant.length>2?Xa.constant[2]:0,rs=Xa.constant.length>3?Xa.constant[3]:0)):(Lr(Xa.buffer)?$n=ye.createStream(34962,Xa.buffer):$n=ye.getBuffer(Xa.buffer),Rs="type"in Xa?Vi[Xa.type]:$n.dtype,uo=!!Xa.normalized,Sn=Xa.size|0,xs=Xa.offset|0,Go=Xa.stride|0,os=Xa.divisor|0)),So=Te.state,Te.state=Eo,Qn=Te.x,Te.x=lo,zo=Te.y,Te.y=$a,rl=Te.z,Te.z=Xo,$o=Te.w,Te.w=rs,Na=Te.buffer,Te.buffer=$n,Ua=Te.size,Te.size=Sn,Po=Te.normalized,Te.normalized=uo,fo=Te.type,Te.type=Rs,ro=Te.offset,Te.offset=xs,Ma=Te.stride,Te.stride=Go,io=Te.divisor,Te.divisor=os,aa=M.call(this,De,Mi,fi),Oo=!1,No=1,Zs=0,Fs=0,ws=0,no=0,Ls=null,ds=0,Xs=!1,oa=5126,Yo=0,po=0,ss=0,Lr(aa)?(Oo=!0,Ls=ye.createStream(34962,aa),oa=Ls.dtype):(Ls=ye.getBuffer(aa),Ls?oa=Ls.dtype:"constant"in aa?(No=2,typeof aa.constant=="number"?(Zs=aa.constant,Fs=ws=no=0):(Zs=aa.constant.length>0?aa.constant[0]:0,Fs=aa.constant.length>1?aa.constant[1]:0,ws=aa.constant.length>2?aa.constant[2]:0,no=aa.constant.length>3?aa.constant[3]:0)):(Lr(aa.buffer)?Ls=ye.createStream(34962,aa.buffer):Ls=ye.getBuffer(aa.buffer),oa="type"in aa?Vi[aa.type]:Ls.dtype,Xs=!!aa.normalized,ds=aa.size|0,Yo=aa.offset|0,po=aa.stride|0,ss=aa.divisor|0)),ls=nt.state,nt.state=No,gs=nt.x,nt.x=Zs,bt=nt.y,nt.y=Fs,Ft=nt.z,nt.z=ws,hr=nt.w,nt.w=no,nr=nt.buffer,nt.buffer=Ls,Sr=nt.size,nt.size=ds,li=nt.normalized,nt.normalized=Xs,di=nt.type,nt.type=oa,mi=nt.offset,nt.offset=Yo,Oi=nt.stride,nt.stride=po,dn=nt.divisor,nt.divisor=ss,wi=b.call(this,De,Mi,fi),ui=!1,Ai=1,gi=0,gn=0,In=0,Vn=0,Rn=null,Hn=0,Gn=!1,pn=5126,Lo=0,us=0,Bs=0,Lr(wi)?(ui=!0,Rn=ye.createStream(34962,wi),pn=Rn.dtype):(Rn=ye.getBuffer(wi),Rn?pn=Rn.dtype:"constant"in wi?(Ai=2,typeof wi.constant=="number"?(gi=wi.constant,gn=In=Vn=0):(gi=wi.constant.length>0?wi.constant[0]:0,gn=wi.constant.length>1?wi.constant[1]:0,In=wi.constant.length>2?wi.constant[2]:0,Vn=wi.constant.length>3?wi.constant[3]:0)):(Lr(wi.buffer)?Rn=ye.createStream(34962,wi.buffer):Rn=ye.getBuffer(wi.buffer),pn="type"in wi?Vi[wi.type]:Rn.dtype,Gn=!!wi.normalized,Hn=wi.size|0,Lo=wi.offset|0,us=wi.stride|0,Bs=wi.divisor|0)),Js=ut.state,ut.state=Ai,ol=ut.x,ut.x=gi,Cl=ut.y,ut.y=gn,ul=ut.z,ut.z=In,Gl=ut.w,ut.w=Vn,Vl=ut.buffer,ut.buffer=Rn,Fl=ut.size,ut.size=Hn,ga=ut.normalized,ut.normalized=Gn,ko=ut.type,ut.type=pn,zs=ut.offset,ut.offset=Lo,Fo=ut.stride,ut.stride=us,Ys=ut.divisor,ut.divisor=Bs,Gs=f.call(this,De,Mi,fi),Us=!1,Sl=1,_l=0,kl=0,cl=0,xl=0,Uo=null,_s=0,Bl=!1,Il=5126,Dl=0,oe=0,w=0,Lr(Gs)?(Us=!0,Uo=ye.createStream(34962,Gs),Il=Uo.dtype):(Uo=ye.getBuffer(Gs),Uo?Il=Uo.dtype:"constant"in Gs?(Sl=2,typeof Gs.constant=="number"?(_l=Gs.constant,kl=cl=xl=0):(_l=Gs.constant.length>0?Gs.constant[0]:0,kl=Gs.constant.length>1?Gs.constant[1]:0,cl=Gs.constant.length>2?Gs.constant[2]:0,xl=Gs.constant.length>3?Gs.constant[3]:0)):(Lr(Gs.buffer)?Uo=ye.createStream(34962,Gs.buffer):Uo=ye.getBuffer(Gs.buffer),Il="type"in Gs?Vi[Gs.type]:Uo.dtype,Bl=!!Gs.normalized,_s=Gs.size|0,Dl=Gs.offset|0,oe=Gs.stride|0,w=Gs.divisor|0)),B=ct.state,ct.state=Sl,Q=ct.x,ct.x=_l,ee=ct.y,ct.y=kl,le=ct.z,ct.z=cl,Ne=ct.w,ct.w=xl,$e=ct.buffer,ct.buffer=Uo,pt=ct.size,ct.size=_s,zt=ct.normalized,ct.normalized=Bl,Yt=ct.type,ct.type=Il,Jt=ct.offset,ct.offset=Dl,yr=ct.stride,ct.stride=oe,Ir=ct.divisor,ct.divisor=w,ce=h.call(this,De,Mi,fi),Ae=!1,qe=1,Ve=0,ot=0,Ke=0,ft=0,qt=null,Xt=0,$t=!1,dr=5126,Mr=0,$r=0,ii=0,Lr(ce)?(Ae=!0,qt=ye.createStream(34962,ce),dr=qt.dtype):(qt=ye.getBuffer(ce),qt?dr=qt.dtype:"constant"in ce?(qe=2,typeof ce.constant=="number"?(Ve=ce.constant,ot=Ke=ft=0):(Ve=ce.constant.length>0?ce.constant[0]:0,ot=ce.constant.length>1?ce.constant[1]:0,Ke=ce.constant.length>2?ce.constant[2]:0,ft=ce.constant.length>3?ce.constant[3]:0)):(Lr(ce.buffer)?qt=ye.createStream(34962,ce.buffer):qt=ye.getBuffer(ce.buffer),dr="type"in ce?Vi[ce.type]:qt.dtype,$t=!!ce.normalized,Xt=ce.size|0,Mr=ce.offset|0,$r=ce.stride|0,ii=ce.divisor|0)),pi=rt.state,rt.state=qe,Yi=rt.x,rt.x=Ve,wn=rt.y,rt.y=ot,Tn=rt.z,rt.z=Ke,ua=rt.w,rt.w=ft,oo=rt.buffer,rt.buffer=qt,el=rt.size,rt.size=Xt,ys=rt.normalized,rt.normalized=$t,il=rt.type,rt.type=dr,$l=rt.offset,rt.offset=Mr,pl=rt.stride,rt.stride=$r,Hl=rt.divisor,rt.divisor=ii,Ll=u.call(this,De,Mi,fi),Ql=!1,ku=1,Jl=0,Kl=0,Hu=0,tf=0,Ku=null,Gu=0,Wu=!1,sf=5126,gf=0,nf=0,af=0,Lr(Ll)?(Ql=!0,Ku=ye.createStream(34962,Ll),sf=Ku.dtype):(Ku=ye.getBuffer(Ll),Ku?sf=Ku.dtype:"constant"in Ll?(ku=2,typeof Ll.constant=="number"?(Jl=Ll.constant,Kl=Hu=tf=0):(Jl=Ll.constant.length>0?Ll.constant[0]:0,Kl=Ll.constant.length>1?Ll.constant[1]:0,Hu=Ll.constant.length>2?Ll.constant[2]:0,tf=Ll.constant.length>3?Ll.constant[3]:0)):(Lr(Ll.buffer)?Ku=ye.createStream(34962,Ll.buffer):Ku=ye.getBuffer(Ll.buffer),sf="type"in Ll?Vi[Ll.type]:Ku.dtype,Wu=!!Ll.normalized,Gu=Ll.size|0,gf=Ll.offset|0,nf=Ll.stride|0,af=Ll.divisor|0)),X=je.state,je.state=ku,se=je.x,je.x=Jl,Le=je.y,je.y=Kl,We=je.z,je.z=Hu,Ye=je.w,je.w=tf,it=je.buffer,je.buffer=Ku,Nt=je.size,je.size=Gu,mt=je.normalized,je.normalized=Wu,er=je.type,je.type=sf,_r=je.offset,je.offset=gf,wr=je.stride,je.stride=nf,ni=je.divisor,je.divisor=af,Wr=p.call(this,De,Mi,fi),Ci=!1,Ji=1,ai=0,Ti=0,Bi=0,en=0,Wi=null,bi=0,ao=!1,yo=5126,Ko=0,Ms=0,vl=0,Lr(Wr)?(Ci=!0,Wi=ye.createStream(34962,Wr),yo=Wi.dtype):(Wi=ye.getBuffer(Wr),Wi?yo=Wi.dtype:"constant"in Wr?(Ji=2,typeof Wr.constant=="number"?(ai=Wr.constant,Ti=Bi=en=0):(ai=Wr.constant.length>0?Wr.constant[0]:0,Ti=Wr.constant.length>1?Wr.constant[1]:0,Bi=Wr.constant.length>2?Wr.constant[2]:0,en=Wr.constant.length>3?Wr.constant[3]:0)):(Lr(Wr.buffer)?Wi=ye.createStream(34962,Wr.buffer):Wi=ye.getBuffer(Wr.buffer),yo="type"in Wr?Vi[Wr.type]:Wi.dtype,ao=!!Wr.normalized,bi=Wr.size|0,Ko=Wr.offset|0,Ms=Wr.stride|0,vl=Wr.divisor|0)),wl=tt.state,tt.state=Ji,au=tt.x,tt.x=ai,Al=tt.y,tt.y=Ti,nu=tt.z,tt.z=Bi,Bu=tt.w,tt.w=en,qu=tt.buffer,tt.buffer=Wi,Ju=tt.size,tt.size=bi,qo=tt.normalized,tt.normalized=ao,Rl=tt.type,tt.type=yo,pu=tt.offset,tt.offset=Ko,xu=tt.stride,tt.stride=Ms,of=tt.divisor,tt.divisor=vl,ff=ue.vert,ue.vert=Je,xf=ue.frag,ue.frag=Mt,Pe.dirty=!0,sn(De,Mi,fi),De.viewportWidth=Nr,De.viewportHeight=hi,Pi[0]=Gi,Pi[1]=Qr,Pi[2]=Ui,Pi[3]=zn,vr[0]=fn,vr[1]=xn,vr[2]=_a,vr[3]=Wn,Fe.blend_enable=Fn,Si[0]=ia,Si[1]=za,Si[2]=Hr,Si[3]=na,Fe.depth_enable=go,oi[0]=Bo,oi[1]=Ea,oi[2]=Ha,oi[3]=tn,Fe.scissor_enable=Cn,Fe.stencil_enable=Xn,ts&&(r.cpuTime+=performance.now()-Ja),an&<.destroyStream(Ri),Ie.elements=cs,Ie.offset=ln,Ie.count=va,Ie.primitive=bo,Et[fe]=Co,Et[et]=Fi,Et[gt]=xa,Et[Pt]=Nn,Et[Qe]=qa,Et[Xe]=Vo,Et[Tt]=Oa,Et[xt]=An,Et[_t]=ks,Et[Ct]=ps,Bn&&ye.destroyStream(ca),jt.state=ba,jt.x=Da,jt.y=Aa,jt.z=Ln,jt.w=wo,jt.buffer=wa,jt.size=$i,jt.normalized=ea,jt.type=Sa,jt.offset=Za,jt.stride=xo,jt.divisor=Wa,Un&&ye.destroyStream(ma),At.state=Ka,At.x=Ca,At.y=ta,At.z=En,At.w=Mo,At.buffer=Ds,At.size=Ro,At.normalized=vs,At.type=Ks,At.offset=as,At.stride=Jn,At.divisor=Cs,Zo&&ye.destroyStream($n),Te.state=So,Te.x=Qn,Te.y=zo,Te.z=rl,Te.w=$o,Te.buffer=Na,Te.size=Ua,Te.normalized=Po,Te.type=fo,Te.offset=ro,Te.stride=Ma,Te.divisor=io,Oo&&ye.destroyStream(Ls),nt.state=ls,nt.x=gs,nt.y=bt,nt.z=Ft,nt.w=hr,nt.buffer=nr,nt.size=Sr,nt.normalized=li,nt.type=di,nt.offset=mi,nt.stride=Oi,nt.divisor=dn,ui&&ye.destroyStream(Rn),ut.state=Js,ut.x=ol,ut.y=Cl,ut.z=ul,ut.w=Gl,ut.buffer=Vl,ut.size=Fl,ut.normalized=ga,ut.type=ko,ut.offset=zs,ut.stride=Fo,ut.divisor=Ys,Us&&ye.destroyStream(Uo),ct.state=B,ct.x=Q,ct.y=ee,ct.z=le,ct.w=Ne,ct.buffer=$e,ct.size=pt,ct.normalized=zt,ct.type=Yt,ct.offset=Jt,ct.stride=yr,ct.divisor=Ir,Ae&&ye.destroyStream(qt),rt.state=pi,rt.x=Yi,rt.y=wn,rt.z=Tn,rt.w=ua,rt.buffer=oo,rt.size=el,rt.normalized=ys,rt.type=il,rt.offset=$l,rt.stride=pl,rt.divisor=Hl,Ql&&ye.destroyStream(Ku),je.state=X,je.x=se,je.y=Le,je.z=We,je.w=Ye,je.buffer=it,je.size=Nt,je.normalized=mt,je.type=er,je.offset=_r,je.stride=wr,je.divisor=ni,Ci&&ye.destroyStream(Wi),tt.state=wl,tt.x=au,tt.y=Al,tt.z=nu,tt.w=Bu,tt.buffer=qu,tt.size=Ju,tt.normalized=qo,tt.type=Rl,tt.offset=pu,tt.stride=xu,tt.divisor=of,ue.vert=ff,ue.frag=xf,Pe.dirty=!0},batch:function(Mi,sn){var fi,Or,st,Wt,tr,or,Nr;if(fi=Zt.angle_instanced_arrays,Or=St.next,Or!==St.cur&&(Or?Ot.bindFramebuffer(36160,Or.framebuffer):Ot.bindFramebuffer(36160,null),St.cur=Or),Pe.dirty){var hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln;hi=Fe.dither,hi!==Pe.dither&&(hi?Ot.enable(3024):Ot.disable(3024),Pe.dither=hi),Gi=si[0],Qr=si[1],(Gi!==Ei[0]||Qr!==Ei[1])&&(Ot.blendEquationSeparate(Gi,Qr),Ei[0]=Gi,Ei[1]=Qr),Ui=Fe.depth_func,Ui!==Pe.depth_func&&(Ot.depthFunc(Ui),Pe.depth_func=Ui),zn=Hi[0],fn=Hi[1],(zn!==Jr[0]||fn!==Jr[1])&&(Ot.depthRange(zn,fn),Jr[0]=zn,Jr[1]=fn),xn=Fe.depth_mask,xn!==Pe.depth_mask&&(Ot.depthMask(xn),Pe.depth_mask=xn),_a=ci[0],Wn=ci[1],Fn=ci[2],ia=ci[3],(_a!==Di[0]||Wn!==Di[1]||Fn!==Di[2]||ia!==Di[3])&&(Ot.colorMask(_a,Wn,Fn,ia),Di[0]=_a,Di[1]=Wn,Di[2]=Fn,Di[3]=ia),za=Fe.cull_enable,za!==Pe.cull_enable&&(za?Ot.enable(2884):Ot.disable(2884),Pe.cull_enable=za),Hr=Fe.cull_face,Hr!==Pe.cull_face&&(Ot.cullFace(Hr),Pe.cull_face=Hr),na=Fe.frontFace,na!==Pe.frontFace&&(Ot.frontFace(na),Pe.frontFace=na),go=Fe.lineWidth,go!==Pe.lineWidth&&(Ot.lineWidth(go),Pe.lineWidth=go),Dn=Fe.polygonOffset_enable,Dn!==Pe.polygonOffset_enable&&(Dn?Ot.enable(32823):Ot.disable(32823),Pe.polygonOffset_enable=Dn),un=Lt[0],Zn=Lt[1],(un!==vt[0]||Zn!==vt[1])&&(Ot.polygonOffset(un,Zn),vt[0]=un,vt[1]=Zn),Wo=Fe.sample_alpha,Wo!==Pe.sample_alpha&&(Wo?Ot.enable(32926):Ot.disable(32926),Pe.sample_alpha=Wo),Ba=Fe.sample_enable,Ba!==Pe.sample_enable&&(Ba?Ot.enable(32928):Ot.disable(32928),Pe.sample_enable=Ba),Bo=Dt[0],Ea=Dt[1],(Bo!==Bt[0]||Ea!==Bt[1])&&(Ot.sampleCoverage(Bo,Ea),Bt[0]=Bo,Bt[1]=Ea),Ha=Fe.stencil_mask,Ha!==Pe.stencil_mask&&(Ot.stencilMask(Ha),Pe.stencil_mask=Ha),tn=sr[0],Cn=sr[1],Xn=sr[2],(tn!==br[0]||Cn!==br[1]||Xn!==br[2])&&(Ot.stencilFunc(tn,Cn,Xn),br[0]=tn,br[1]=Cn,br[2]=Xn),ts=zr[0],Ja=zr[1],to=zr[2],Ri=zr[3],(ts!==Tr[0]||Ja!==Tr[1]||to!==Tr[2]||Ri!==Tr[3])&&(Ot.stencilOpSeparate(ts,Ja,to,Ri),Tr[0]=ts,Tr[1]=Ja,Tr[2]=to,Tr[3]=Ri),an=Rr[0],cs=Rr[1],pa=Rr[2],ln=Rr[3],(an!==Br[0]||cs!==Br[1]||pa!==Br[2]||ln!==Br[3])&&(Ot.stencilOpSeparate(an,cs,pa,ln),Br[0]=an,Br[1]=cs,Br[2]=pa,Br[3]=ln)}Ot.blendColor(0,0,0,1),Er[0]=0,Er[1]=0,Er[2]=0,Er[3]=1,Vt?Ot.enable(3042):Ot.disable(3042),Pe.blend_enable=Vt,Ot.blendFuncSeparate(770,771,773,1),xi[0]=770,xi[1]=771,xi[2]=773,xi[3]=1,Kt?Ot.enable(2929):Ot.disable(2929),Pe.depth_enable=Kt,ir?Ot.enable(3089):Ot.disable(3089),Pe.scissor_enable=ir,fr?Ot.enable(2960):Ot.disable(2960),Pe.stencil_enable=fr,st=Pe.profile,st&&(Wt=performance.now(),r.count+=sn),Ot.useProgram(s.program),tr=Zt.angle_instanced_arrays;var ka;for(ht.setVAO(null),Ot.uniform1i(z.location,!1),Ot.uniform1i(U.location,H.bind()),ka=Ie.instances,or=0;or0?Pa.constant[0]:0,_o=Pa.constant.length>1?Pa.constant[1]:0,ks=Pa.constant.length>2?Pa.constant[2]:0,bs=Pa.constant.length>3?Pa.constant[3]:0)):(Lr(Pa.buffer)?ps=ye.createStream(34962,Pa.buffer):ps=ye.getBuffer(Pa.buffer),ms="type"in Pa?Vi[Pa.type]:ps.dtype,Bn=!!Pa.normalized,sa=Pa.size|0,ya=Pa.offset|0,on=Pa.stride|0,mn=Pa.divisor|0)),Ga=l.location,ca=de[Ga],co===1?(ca.buffer||Ot.enableVertexAttribArray(Ga),bn=sa||4,(ca.type!==ms||ca.size!==bn||ca.buffer!==ps||ca.normalized!==Bn||ca.offset!==ya||ca.stride!==on)&&(Ot.bindBuffer(34962,ps.buffer),Ot.vertexAttribPointer(Ga,bn,ms,Bn,on,ya),ca.type=ms,ca.size=bn,ca.buffer=ps,ca.normalized=Bn,ca.offset=ya,ca.stride=on),ca.divisor!==mn&&(tr.vertexAttribDivisorANGLE(Ga,mn),ca.divisor=mn)):(ca.buffer&&(Ot.disableVertexAttribArray(Ga),ca.buffer=null),(ca.x!==An||ca.y!==_o||ca.z!==ks||ca.w!==bs)&&(Ot.vertexAttrib4f(Ga,An,_o,ks,bs),ca.x=An,ca.y=_o,ca.z=ks,ca.w=bs)),Xi=f.call(this,De,Nr,or),qn=!1,Ia=1,yn=0,Ya=0,ba=0,Da=0,Aa=null,Ln=0,wo=!1,wa=5126,$i=0,ea=0,Sa=0,Lr(Xi)?(qn=!0,Aa=ye.createStream(34962,Xi),wa=Aa.dtype):(Aa=ye.getBuffer(Xi),Aa?wa=Aa.dtype:"constant"in Xi?(Ia=2,typeof Xi.constant=="number"?(yn=Xi.constant,Ya=ba=Da=0):(yn=Xi.constant.length>0?Xi.constant[0]:0,Ya=Xi.constant.length>1?Xi.constant[1]:0,ba=Xi.constant.length>2?Xi.constant[2]:0,Da=Xi.constant.length>3?Xi.constant[3]:0)):(Lr(Xi.buffer)?Aa=ye.createStream(34962,Xi.buffer):Aa=ye.getBuffer(Xi.buffer),wa="type"in Xi?Vi[Xi.type]:Aa.dtype,wo=!!Xi.normalized,Ln=Xi.size|0,$i=Xi.offset|0,ea=Xi.stride|0,Sa=Xi.divisor|0)),Za=c.location,xo=de[Za],Ia===1?(xo.buffer||Ot.enableVertexAttribArray(Za),Wa=Ln||1,(xo.type!==wa||xo.size!==Wa||xo.buffer!==Aa||xo.normalized!==wo||xo.offset!==$i||xo.stride!==ea)&&(Ot.bindBuffer(34962,Aa.buffer),Ot.vertexAttribPointer(Za,Wa,wa,wo,ea,$i),xo.type=wa,xo.size=Wa,xo.buffer=Aa,xo.normalized=wo,xo.offset=$i,xo.stride=ea),xo.divisor!==Sa&&(tr.vertexAttribDivisorANGLE(Za,Sa),xo.divisor=Sa)):(xo.buffer&&(Ot.disableVertexAttribArray(Za),xo.buffer=null),(xo.x!==yn||xo.y!==Ya||xo.z!==ba||xo.w!==Da)&&(Ot.vertexAttrib4f(Za,yn,Ya,ba,Da),xo.x=yn,xo.y=Ya,xo.z=ba,xo.w=Da)),hn=h.call(this,De,Nr,or),Un=!1,Ss=1,Kn=0,ns=0,Jo=0,vo=0,ma=null,ja=0,To=!1,Ao=5126,la=0,Ki=0,ho=0,Lr(hn)?(Un=!0,ma=ye.createStream(34962,hn),Ao=ma.dtype):(ma=ye.getBuffer(hn),ma?Ao=ma.dtype:"constant"in hn?(Ss=2,typeof hn.constant=="number"?(Kn=hn.constant,ns=Jo=vo=0):(Kn=hn.constant.length>0?hn.constant[0]:0,ns=hn.constant.length>1?hn.constant[1]:0,Jo=hn.constant.length>2?hn.constant[2]:0,vo=hn.constant.length>3?hn.constant[3]:0)):(Lr(hn.buffer)?ma=ye.createStream(34962,hn.buffer):ma=ye.getBuffer(hn.buffer),Ao="type"in hn?Vi[hn.type]:ma.dtype,To=!!hn.normalized,ja=hn.size|0,la=hn.offset|0,Ki=hn.stride|0,ho=hn.divisor|0)),Ka=d.location,Ca=de[Ka],Ss===1?(Ca.buffer||Ot.enableVertexAttribArray(Ka),ta=ja||4,(Ca.type!==Ao||Ca.size!==ta||Ca.buffer!==ma||Ca.normalized!==To||Ca.offset!==la||Ca.stride!==Ki)&&(Ot.bindBuffer(34962,ma.buffer),Ot.vertexAttribPointer(Ka,ta,Ao,To,Ki,la),Ca.type=Ao,Ca.size=ta,Ca.buffer=ma,Ca.normalized=To,Ca.offset=la,Ca.stride=Ki),Ca.divisor!==ho&&(tr.vertexAttribDivisorANGLE(Ka,ho),Ca.divisor=ho)):(Ca.buffer&&(Ot.disableVertexAttribArray(Ka),Ca.buffer=null),(Ca.x!==Kn||Ca.y!==ns||Ca.z!==Jo||Ca.w!==vo)&&(Ot.vertexAttrib4f(Ka,Kn,ns,Jo,vo),Ca.x=Kn,Ca.y=ns,Ca.z=Jo,Ca.w=vo)),En=p.call(this,De,Nr,or),Mo=!1,Ds=1,Ro=0,vs=0,Ks=0,as=0,Jn=null,Cs=0,Xa=!1,Zo=5126,Eo=0,lo=0,$a=0,Lr(En)?(Mo=!0,Jn=ye.createStream(34962,En),Zo=Jn.dtype):(Jn=ye.getBuffer(En),Jn?Zo=Jn.dtype:"constant"in En?(Ds=2,typeof En.constant=="number"?(Ro=En.constant,vs=Ks=as=0):(Ro=En.constant.length>0?En.constant[0]:0,vs=En.constant.length>1?En.constant[1]:0,Ks=En.constant.length>2?En.constant[2]:0,as=En.constant.length>3?En.constant[3]:0)):(Lr(En.buffer)?Jn=ye.createStream(34962,En.buffer):Jn=ye.getBuffer(En.buffer),Zo="type"in En?Vi[En.type]:Jn.dtype,Xa=!!En.normalized,Cs=En.size|0,Eo=En.offset|0,lo=En.stride|0,$a=En.divisor|0)),Xo=x.location,rs=de[Xo],Ds===1?(rs.buffer||Ot.enableVertexAttribArray(Xo),$n=Cs||1,(rs.type!==Zo||rs.size!==$n||rs.buffer!==Jn||rs.normalized!==Xa||rs.offset!==Eo||rs.stride!==lo)&&(Ot.bindBuffer(34962,Jn.buffer),Ot.vertexAttribPointer(Xo,$n,Zo,Xa,lo,Eo),rs.type=Zo,rs.size=$n,rs.buffer=Jn,rs.normalized=Xa,rs.offset=Eo,rs.stride=lo),rs.divisor!==$a&&(tr.vertexAttribDivisorANGLE(Xo,$a),rs.divisor=$a)):(rs.buffer&&(Ot.disableVertexAttribArray(Xo),rs.buffer=null),(rs.x!==Ro||rs.y!==vs||rs.z!==Ks||rs.w!==as)&&(Ot.vertexAttrib4f(Xo,Ro,vs,Ks,as),rs.x=Ro,rs.y=vs,rs.z=Ks,rs.w=as)),Sn=b.call(this,De,Nr,or),uo=!1,Rs=1,xs=0,Go=0,os=0,So=0,Qn=null,zo=0,rl=!1,$o=5126,Na=0,Ua=0,Po=0,Lr(Sn)?(uo=!0,Qn=ye.createStream(34962,Sn),$o=Qn.dtype):(Qn=ye.getBuffer(Sn),Qn?$o=Qn.dtype:"constant"in Sn?(Rs=2,typeof Sn.constant=="number"?(xs=Sn.constant,Go=os=So=0):(xs=Sn.constant.length>0?Sn.constant[0]:0,Go=Sn.constant.length>1?Sn.constant[1]:0,os=Sn.constant.length>2?Sn.constant[2]:0,So=Sn.constant.length>3?Sn.constant[3]:0)):(Lr(Sn.buffer)?Qn=ye.createStream(34962,Sn.buffer):Qn=ye.getBuffer(Sn.buffer),$o="type"in Sn?Vi[Sn.type]:Qn.dtype,rl=!!Sn.normalized,zo=Sn.size|0,Na=Sn.offset|0,Ua=Sn.stride|0,Po=Sn.divisor|0)),fo=y.location,ro=de[fo],Rs===1?(ro.buffer||Ot.enableVertexAttribArray(fo),Ma=zo||1,(ro.type!==$o||ro.size!==Ma||ro.buffer!==Qn||ro.normalized!==rl||ro.offset!==Na||ro.stride!==Ua)&&(Ot.bindBuffer(34962,Qn.buffer),Ot.vertexAttribPointer(fo,Ma,$o,rl,Ua,Na),ro.type=$o,ro.size=Ma,ro.buffer=Qn,ro.normalized=rl,ro.offset=Na,ro.stride=Ua),ro.divisor!==Po&&(tr.vertexAttribDivisorANGLE(fo,Po),ro.divisor=Po)):(ro.buffer&&(Ot.disableVertexAttribArray(fo),ro.buffer=null),(ro.x!==xs||ro.y!==Go||ro.z!==os||ro.w!==So)&&(Ot.vertexAttrib4f(fo,xs,Go,os,So),ro.x=xs,ro.y=Go,ro.z=os,ro.w=So)),io=E.call(this,De,Nr,or),aa=!1,Oo=1,No=0,Zs=0,Fs=0,ws=0,no=null,Ls=0,ds=!1,Xs=5126,oa=0,Yo=0,po=0,Lr(io)?(aa=!0,no=ye.createStream(34962,io),Xs=no.dtype):(no=ye.getBuffer(io),no?Xs=no.dtype:"constant"in io?(Oo=2,typeof io.constant=="number"?(No=io.constant,Zs=Fs=ws=0):(No=io.constant.length>0?io.constant[0]:0,Zs=io.constant.length>1?io.constant[1]:0,Fs=io.constant.length>2?io.constant[2]:0,ws=io.constant.length>3?io.constant[3]:0)):(Lr(io.buffer)?no=ye.createStream(34962,io.buffer):no=ye.getBuffer(io.buffer),Xs="type"in io?Vi[io.type]:no.dtype,ds=!!io.normalized,Ls=io.size|0,oa=io.offset|0,Yo=io.stride|0,po=io.divisor|0)),ss=k.location,ls=de[ss],Oo===1?(ls.buffer||Ot.enableVertexAttribArray(ss),gs=Ls||1,(ls.type!==Xs||ls.size!==gs||ls.buffer!==no||ls.normalized!==ds||ls.offset!==oa||ls.stride!==Yo)&&(Ot.bindBuffer(34962,no.buffer),Ot.vertexAttribPointer(ss,gs,Xs,ds,Yo,oa),ls.type=Xs,ls.size=gs,ls.buffer=no,ls.normalized=ds,ls.offset=oa,ls.stride=Yo),ls.divisor!==po&&(tr.vertexAttribDivisorANGLE(ss,po),ls.divisor=po)):(ls.buffer&&(Ot.disableVertexAttribArray(ss),ls.buffer=null),(ls.x!==No||ls.y!==Zs||ls.z!==Fs||ls.w!==ws)&&(Ot.vertexAttrib4f(ss,No,Zs,Fs,ws),ls.x=No,ls.y=Zs,ls.z=Fs,ls.w=ws)),bt=A.call(this,De,Nr,or),Ft=!1,hr=1,nr=0,Sr=0,li=0,di=0,mi=null,Oi=0,dn=!1,wi=5126,ui=0,Ai=0,gi=0,Lr(bt)?(Ft=!0,mi=ye.createStream(34962,bt),wi=mi.dtype):(mi=ye.getBuffer(bt),mi?wi=mi.dtype:"constant"in bt?(hr=2,typeof bt.constant=="number"?(nr=bt.constant,Sr=li=di=0):(nr=bt.constant.length>0?bt.constant[0]:0,Sr=bt.constant.length>1?bt.constant[1]:0,li=bt.constant.length>2?bt.constant[2]:0,di=bt.constant.length>3?bt.constant[3]:0)):(Lr(bt.buffer)?mi=ye.createStream(34962,bt.buffer):mi=ye.getBuffer(bt.buffer),wi="type"in bt?Vi[bt.type]:mi.dtype,dn=!!bt.normalized,Oi=bt.size|0,ui=bt.offset|0,Ai=bt.stride|0,gi=bt.divisor|0)),gn=L.location,In=de[gn],hr===1?(In.buffer||Ot.enableVertexAttribArray(gn),Vn=Oi||1,(In.type!==wi||In.size!==Vn||In.buffer!==mi||In.normalized!==dn||In.offset!==ui||In.stride!==Ai)&&(Ot.bindBuffer(34962,mi.buffer),Ot.vertexAttribPointer(gn,Vn,wi,dn,Ai,ui),In.type=wi,In.size=Vn,In.buffer=mi,In.normalized=dn,In.offset=ui,In.stride=Ai),In.divisor!==gi&&(tr.vertexAttribDivisorANGLE(gn,gi),In.divisor=gi)):(In.buffer&&(Ot.disableVertexAttribArray(gn),In.buffer=null),(In.x!==nr||In.y!==Sr||In.z!==li||In.w!==di)&&(Ot.vertexAttrib4f(gn,nr,Sr,li,di),In.x=nr,In.y=Sr,In.z=li,In.w=di)),Rn=_.call(this,De,Nr,or),Hn=!1,Gn=1,pn=0,Lo=0,us=0,Bs=0,Js=null,ol=0,Cl=!1,ul=5126,Gl=0,Vl=0,Fl=0,Lr(Rn)?(Hn=!0,Js=ye.createStream(34962,Rn),ul=Js.dtype):(Js=ye.getBuffer(Rn),Js?ul=Js.dtype:"constant"in Rn?(Gn=2,typeof Rn.constant=="number"?(pn=Rn.constant,Lo=us=Bs=0):(pn=Rn.constant.length>0?Rn.constant[0]:0,Lo=Rn.constant.length>1?Rn.constant[1]:0,us=Rn.constant.length>2?Rn.constant[2]:0,Bs=Rn.constant.length>3?Rn.constant[3]:0)):(Lr(Rn.buffer)?Js=ye.createStream(34962,Rn.buffer):Js=ye.getBuffer(Rn.buffer),ul="type"in Rn?Vi[Rn.type]:Js.dtype,Cl=!!Rn.normalized,ol=Rn.size|0,Gl=Rn.offset|0,Vl=Rn.stride|0,Fl=Rn.divisor|0)),ga=C.location,ko=de[ga],Gn===1?(ko.buffer||Ot.enableVertexAttribArray(ga),zs=ol||1,(ko.type!==ul||ko.size!==zs||ko.buffer!==Js||ko.normalized!==Cl||ko.offset!==Gl||ko.stride!==Vl)&&(Ot.bindBuffer(34962,Js.buffer),Ot.vertexAttribPointer(ga,zs,ul,Cl,Vl,Gl),ko.type=ul,ko.size=zs,ko.buffer=Js,ko.normalized=Cl,ko.offset=Gl,ko.stride=Vl),ko.divisor!==Fl&&(tr.vertexAttribDivisorANGLE(ga,Fl),ko.divisor=Fl)):(ko.buffer&&(Ot.disableVertexAttribArray(ga),ko.buffer=null),(ko.x!==pn||ko.y!==Lo||ko.z!==us||ko.w!==Bs)&&(Ot.vertexAttrib4f(ga,pn,Lo,us,Bs),ko.x=pn,ko.y=Lo,ko.z=us,ko.w=Bs)),Fo=M.call(this,De,Nr,or),Ys=!1,Gs=1,Us=0,Sl=0,_l=0,kl=0,cl=null,xl=0,Uo=!1,_s=5126,Bl=0,Il=0,Dl=0,Lr(Fo)?(Ys=!0,cl=ye.createStream(34962,Fo),_s=cl.dtype):(cl=ye.getBuffer(Fo),cl?_s=cl.dtype:"constant"in Fo?(Gs=2,typeof Fo.constant=="number"?(Us=Fo.constant,Sl=_l=kl=0):(Us=Fo.constant.length>0?Fo.constant[0]:0,Sl=Fo.constant.length>1?Fo.constant[1]:0,_l=Fo.constant.length>2?Fo.constant[2]:0,kl=Fo.constant.length>3?Fo.constant[3]:0)):(Lr(Fo.buffer)?cl=ye.createStream(34962,Fo.buffer):cl=ye.getBuffer(Fo.buffer),_s="type"in Fo?Vi[Fo.type]:cl.dtype,Uo=!!Fo.normalized,xl=Fo.size|0,Bl=Fo.offset|0,Il=Fo.stride|0,Dl=Fo.divisor|0)),oe=v.location,w=de[oe],Gs===1?(w.buffer||Ot.enableVertexAttribArray(oe),B=xl||1,(w.type!==_s||w.size!==B||w.buffer!==cl||w.normalized!==Uo||w.offset!==Bl||w.stride!==Il)&&(Ot.bindBuffer(34962,cl.buffer),Ot.vertexAttribPointer(oe,B,_s,Uo,Il,Bl),w.type=_s,w.size=B,w.buffer=cl,w.normalized=Uo,w.offset=Bl,w.stride=Il),w.divisor!==Dl&&(tr.vertexAttribDivisorANGLE(oe,Dl),w.divisor=Dl)):(w.buffer&&(Ot.disableVertexAttribArray(oe),w.buffer=null),(w.x!==Us||w.y!==Sl||w.z!==_l||w.w!==kl)&&(Ot.vertexAttrib4f(oe,Us,Sl,_l,kl),w.x=Us,w.y=Sl,w.z=_l,w.w=kl)),Q=Nr.opacity,(!or||ee!==Q)&&(ee=Q,Ot.uniform1f(T.location,Q)),le=q.call(this,De,Nr,or),Ne=le[0],pt=le[1],(!or||$e!==Ne||zt!==pt)&&($e=Ne,zt=pt,Ot.uniform2f(F.location,Ne,pt)),Yt=De.pixelRatio,(!or||Jt!==Yt)&&(Jt=Yt,Ot.uniform1f(j.location,Yt)),yr=Nr.scale,Ir=yr[0],Ae=yr[1],(!or||ce!==Ir||qe!==Ae)&&(ce=Ir,qe=Ae,Ot.uniform2f(G.location,Ir,Ae)),Ve=Nr.scaleFract,ot=Ve[0],ft=Ve[1],(!or||Ke!==ot||qt!==ft)&&(Ke=ot,qt=ft,Ot.uniform2f(O.location,ot,ft)),Xt=Nr.translate,$t=Xt[0],Mr=Xt[1],(!or||dr!==$t||$r!==Mr)&&(dr=$t,$r=Mr,Ot.uniform2f(W.location,$t,Mr)),ii=Nr.translateFract,pi=ii[0],wn=ii[1],(!or||Yi!==pi||Tn!==wn)&&(Yi=pi,Tn=wn,Ot.uniform2f(re.location,pi,wn)),ua=Nr.elements,oo=null,el=Lr(ua),el?oo=lt.createStream(ua):oo=lt.getElements(ua),oo&&Ot.bindBuffer(34963,oo.buffer.buffer),ys=Nr.offset,il=Nr.count,il&&(ka>0?oo?tr.drawElementsInstancedANGLE(0,il,oo.type,ys<<(oo.type-5121>>1),ka):tr.drawArraysInstancedANGLE(0,ys,il,ka):ka<0&&(oo?Ot.drawElements(0,il,oo.type,ys<<(oo.type-5121>>1)):Ot.drawArrays(0,ys,il)),De.viewportWidth=xa,De.viewportHeight=Qi,Oa&&ye.destroyStream(ps),qn&&ye.destroyStream(Aa),Un&&ye.destroyStream(ma),Mo&&ye.destroyStream(Jn),uo&&ye.destroyStream(Qn),aa&&ye.destroyStream(no),Ft&&ye.destroyStream(mi),Hn&&ye.destroyStream(Js),Ys&&ye.destroyStream(cl),el&<.destroyStream(oo))}H.unbind(),Pe.dirty=!0,ht.setVAO(null),st&&(r.cpuTime+=performance.now()-Wt)}}}});var C9=Se((o1r,HOe)=>{HOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt){"use strict";var je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti;return je=t.gl,tt=t.context,Je=t.strings,Mt=t.next,Vt=t.current,Kt=t.draw,ir=t.elements,fr=t.buffer,Ot=t.shader,De=t.attributes,_e=t.vao,Fe=t.uniforms,Pe=t.framebuffer,Ie=t.extensions,lt=t.timer,ye=t.isBufferArgs,ue=Mt.blend_color,de=Vt.blend_color,ht=Mt.blend_equation,Et=Vt.blend_equation,St=Mt.blend_func,Zt=Vt.blend_func,qr=Mt.depth_range,Lr=Vt.depth_range,vr=Mt.colorMask,Er=Vt.colorMask,si=Mt.polygonOffset_offset,Ei=Vt.polygonOffset_offset,Si=Mt.sample_coverage,xi=Vt.sample_coverage,Hi=Mt.stencil_func,Jr=Vt.stencil_func,ci=Mt.stencil_opFront,Di=Vt.stencil_opFront,Lt=Mt.stencil_opBack,vt=Vt.stencil_opBack,Dt=Mt.scissor_box,Bt=Vt.scissor_box,sr=Mt.viewport,br=Vt.viewport,zr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Tr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Rr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Br={add:32774,subtract:32778,"reverse subtract":32779},oi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},vi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Pi={cw:2304,ccw:2305},Yr={},Yr.buffer=n,Yr.divisor=1,Ni={},Ni.buffer=i,Ni.divisor=1,Ur={},Ur.buffer=a,Ur.divisor=1,ti={},ti.buffer=o,ti.divisor=1,{draw:function(ki){var ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro;if(ji=Ie.angle_instanced_arrays,Vi=Pe.next,Vi!==Pe.cur&&(Vi?je.bindFramebuffer(36160,Vi.framebuffer):je.bindFramebuffer(36160,null),Pe.cur=Vi),Vt.dirty){var vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo;vs=Mt.dither,vs!==Vt.dither&&(vs?je.enable(3024):je.disable(3024),Vt.dither=vs),Ks=Mt.depth_func,Ks!==Vt.depth_func&&(je.depthFunc(Ks),Vt.depth_func=Ks),as=qr[0],Jn=qr[1],(as!==Lr[0]||Jn!==Lr[1])&&(je.depthRange(as,Jn),Lr[0]=as,Lr[1]=Jn),Cs=Mt.depth_mask,Cs!==Vt.depth_mask&&(je.depthMask(Cs),Vt.depth_mask=Cs),Xa=vr[0],Zo=vr[1],Eo=vr[2],lo=vr[3],(Xa!==Er[0]||Zo!==Er[1]||Eo!==Er[2]||lo!==Er[3])&&(je.colorMask(Xa,Zo,Eo,lo),Er[0]=Xa,Er[1]=Zo,Er[2]=Eo,Er[3]=lo),$a=Mt.cull_enable,$a!==Vt.cull_enable&&($a?je.enable(2884):je.disable(2884),Vt.cull_enable=$a),Xo=Mt.cull_face,Xo!==Vt.cull_face&&(je.cullFace(Xo),Vt.cull_face=Xo),rs=Mt.frontFace,rs!==Vt.frontFace&&(je.frontFace(rs),Vt.frontFace=rs),$n=Mt.lineWidth,$n!==Vt.lineWidth&&(je.lineWidth($n),Vt.lineWidth=$n),Sn=Mt.polygonOffset_enable,Sn!==Vt.polygonOffset_enable&&(Sn?je.enable(32823):je.disable(32823),Vt.polygonOffset_enable=Sn),uo=si[0],Rs=si[1],(uo!==Ei[0]||Rs!==Ei[1])&&(je.polygonOffset(uo,Rs),Ei[0]=uo,Ei[1]=Rs),xs=Mt.sample_alpha,xs!==Vt.sample_alpha&&(xs?je.enable(32926):je.disable(32926),Vt.sample_alpha=xs),Go=Mt.sample_enable,Go!==Vt.sample_enable&&(Go?je.enable(32928):je.disable(32928),Vt.sample_enable=Go),os=Si[0],So=Si[1],(os!==xi[0]||So!==xi[1])&&(je.sampleCoverage(os,So),xi[0]=os,xi[1]=So),Qn=Mt.stencil_enable,Qn!==Vt.stencil_enable&&(Qn?je.enable(2960):je.disable(2960),Vt.stencil_enable=Qn),zo=Mt.stencil_mask,zo!==Vt.stencil_mask&&(je.stencilMask(zo),Vt.stencil_mask=zo),rl=Hi[0],$o=Hi[1],Na=Hi[2],(rl!==Jr[0]||$o!==Jr[1]||Na!==Jr[2])&&(je.stencilFunc(rl,$o,Na),Jr[0]=rl,Jr[1]=$o,Jr[2]=Na),Ua=ci[0],Po=ci[1],fo=ci[2],ro=ci[3],(Ua!==Di[0]||Po!==Di[1]||fo!==Di[2]||ro!==Di[3])&&(je.stencilOpSeparate(Ua,Po,fo,ro),Di[0]=Ua,Di[1]=Po,Di[2]=fo,Di[3]=ro),Ma=Lt[0],io=Lt[1],aa=Lt[2],Oo=Lt[3],(Ma!==vt[0]||io!==vt[1]||aa!==vt[2]||Oo!==vt[3])&&(je.stencilOpSeparate(Ma,io,aa,Oo),vt[0]=Ma,vt[1]=io,vt[2]=aa,vt[3]=Oo)}zi=ki.viewport,Mi=zi.x|0,sn=zi.y|0,fi="width"in zi?zi.width|0:tt.framebufferWidth-Mi,Or="height"in zi?zi.height|0:tt.framebufferHeight-sn,st=tt.viewportWidth,tt.viewportWidth=fi,Wt=tt.viewportHeight,tt.viewportHeight=Or,je.viewport(Mi,sn,fi,Or),br[0]=Mi,br[1]=sn,br[2]=fi,br[3]=Or,je.blendColor(0,0,0,0),de[0]=0,de[1]=0,de[2]=0,de[3]=0,s?je.enable(3042):je.disable(3042),Vt.blend_enable=s,je.blendEquationSeparate(32774,32774),Et[0]=32774,Et[1]=32774,je.blendFuncSeparate(770,771,773,1),Zt[0]=770,Zt[1]=771,Zt[2]=773,Zt[3]=1,u?je.enable(2929):je.disable(2929),Vt.depth_enable=u,tr=ki.viewport,or=tr.x|0,Nr=tr.y|0,hi="width"in tr?tr.width|0:tt.framebufferWidth-or,Gi="height"in tr?tr.height|0:tt.framebufferHeight-Nr,je.scissor(or,Nr,hi,Gi),Bt[0]=or,Bt[1]=Nr,Bt[2]=hi,Bt[3]=Gi,l?je.enable(3089):je.disable(3089),Vt.scissor_enable=l,Qr=Vt.profile,Qr&&(Ui=performance.now(),r.count++),je.useProgram(f.program),zn=Ie.angle_instanced_arrays,_e.setVAO(null),fn=h.location,xn=De[fn],xn.buffer||je.enableVertexAttribArray(fn),(xn.type!==5126||xn.size!==2||xn.buffer!==c||xn.normalized!==!1||xn.offset!==16||xn.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(fn,2,5126,!1,24,16),xn.type=5126,xn.size=2,xn.buffer=c,xn.normalized=!1,xn.offset=16,xn.stride=24),xn.divisor!==0&&(zn.vertexAttribDivisorANGLE(fn,0),xn.divisor=0),_a=d.call(this,tt,ki,0),Yr.offset=_a,Wn=!1,Fn=1,ia=0,za=0,Hr=0,na=0,go=null,Dn=0,un=!1,Zn=5126,Wo=0,Ba=0,Bo=0,ye(Yr)?(Wn=!0,go=fr.createStream(34962,Yr),Zn=go.dtype):(go=fr.getBuffer(Yr),go?Zn=go.dtype:"constant"in Yr?(Fn=2,typeof Yr.constant=="number"?(ia=Yr.constant,za=Hr=na=0):(ia=Yr.constant.length>0?Yr.constant[0]:0,za=Yr.constant.length>1?Yr.constant[1]:0,Hr=Yr.constant.length>2?Yr.constant[2]:0,na=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?go=fr.createStream(34962,Yr.buffer):go=fr.getBuffer(Yr.buffer),Zn="type"in Yr?vi[Yr.type]:go.dtype,un=!!Yr.normalized,Dn=Yr.size|0,Wo=Yr.offset|0,Ba=Yr.stride|0,Bo=Yr.divisor|0)),Ea=p.location,Ha=De[Ea],Fn===1?(Ha.buffer||je.enableVertexAttribArray(Ea),tn=Dn||4,(Ha.type!==Zn||Ha.size!==tn||Ha.buffer!==go||Ha.normalized!==un||Ha.offset!==Wo||Ha.stride!==Ba)&&(je.bindBuffer(34962,go.buffer),je.vertexAttribPointer(Ea,tn,Zn,un,Ba,Wo),Ha.type=Zn,Ha.size=tn,Ha.buffer=go,Ha.normalized=un,Ha.offset=Wo,Ha.stride=Ba),Ha.divisor!==Bo&&(zn.vertexAttribDivisorANGLE(Ea,Bo),Ha.divisor=Bo)):(Ha.buffer&&(je.disableVertexAttribArray(Ea),Ha.buffer=null),(Ha.x!==ia||Ha.y!==za||Ha.z!==Hr||Ha.w!==na)&&(je.vertexAttrib4f(Ea,ia,za,Hr,na),Ha.x=ia,Ha.y=za,Ha.z=Hr,Ha.w=na)),Cn=x.location,Xn=De[Cn],Xn.buffer||je.enableVertexAttribArray(Cn),(Xn.type!==5126||Xn.size!==2||Xn.buffer!==c||Xn.normalized!==!1||Xn.offset!==0||Xn.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Cn,2,5126,!1,24,0),Xn.type=5126,Xn.size=2,Xn.buffer=c,Xn.normalized=!1,Xn.offset=0,Xn.stride=24),Xn.divisor!==0&&(zn.vertexAttribDivisorANGLE(Cn,0),Xn.divisor=0),ts=b.call(this,tt,ki,0),ti.offset=ts,Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,ye(ti)?(Ja=!0,ln=fr.createStream(34962,ti),bo=ln.dtype):(ln=fr.getBuffer(ti),ln?bo=ln.dtype:"constant"in ti?(to=2,typeof ti.constant=="number"?(Ri=ti.constant,an=cs=pa=0):(Ri=ti.constant.length>0?ti.constant[0]:0,an=ti.constant.length>1?ti.constant[1]:0,cs=ti.constant.length>2?ti.constant[2]:0,pa=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?ln=fr.createStream(34962,ti.buffer):ln=fr.getBuffer(ti.buffer),bo="type"in ti?vi[ti.type]:ln.dtype,va=!!ti.normalized,ka=ti.size|0,Co=ti.offset|0,Fi=ti.stride|0,Yn=ti.divisor|0)),xa=y.location,Qi=De[xa],to===1?(Qi.buffer||je.enableVertexAttribArray(xa),Nn=ka||4,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(je.bindBuffer(34962,ln.buffer),je.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(zn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(je.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(je.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=E.location,qa=De[Pn],qa.buffer||je.enableVertexAttribArray(Pn),(qa.type!==5126||qa.size!==2||qa.buffer!==c||qa.normalized!==!1||qa.offset!==8||qa.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Pn,2,5126,!1,24,8),qa.type=5126,qa.size=2,qa.buffer=c,qa.normalized=!1,qa.offset=8,qa.stride=24),qa.divisor!==0&&(zn.vertexAttribDivisorANGLE(Pn,0),qa.divisor=0),jo=k.call(this,tt,ki,0),Ni.offset=jo,Vo=!1,Pa=1,Oa=0,co=0,An=0,_o=0,ks=null,bs=0,ps=!1,sa=5126,Bn=0,ms=0,ya=0,ye(Ni)?(Vo=!0,ks=fr.createStream(34962,Ni),sa=ks.dtype):(ks=fr.getBuffer(Ni),ks?sa=ks.dtype:"constant"in Ni?(Pa=2,typeof Ni.constant=="number"?(Oa=Ni.constant,co=An=_o=0):(Oa=Ni.constant.length>0?Ni.constant[0]:0,co=Ni.constant.length>1?Ni.constant[1]:0,An=Ni.constant.length>2?Ni.constant[2]:0,_o=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?ks=fr.createStream(34962,Ni.buffer):ks=fr.getBuffer(Ni.buffer),sa="type"in Ni?vi[Ni.type]:ks.dtype,ps=!!Ni.normalized,bs=Ni.size|0,Bn=Ni.offset|0,ms=Ni.stride|0,ya=Ni.divisor|0)),on=A.location,mn=De[on],Pa===1?(mn.buffer||je.enableVertexAttribArray(on),Ga=bs||2,(mn.type!==sa||mn.size!==Ga||mn.buffer!==ks||mn.normalized!==ps||mn.offset!==Bn||mn.stride!==ms)&&(je.bindBuffer(34962,ks.buffer),je.vertexAttribPointer(on,Ga,sa,ps,ms,Bn),mn.type=sa,mn.size=Ga,mn.buffer=ks,mn.normalized=ps,mn.offset=Bn,mn.stride=ms),mn.divisor!==ya&&(zn.vertexAttribDivisorANGLE(on,ya),mn.divisor=ya)):(mn.buffer&&(je.disableVertexAttribArray(on),mn.buffer=null),(mn.x!==Oa||mn.y!==co||mn.z!==An||mn.w!==_o)&&(je.vertexAttrib4f(on,Oa,co,An,_o),mn.x=Oa,mn.y=co,mn.z=An,mn.w=_o)),ca=L.call(this,tt,ki,0),Ur.offset=ca,bn=!1,Xi=1,qn=0,Ia=0,yn=0,Ya=0,ba=null,Da=0,Aa=!1,Ln=5126,wo=0,wa=0,$i=0,ye(Ur)?(bn=!0,ba=fr.createStream(34962,Ur),Ln=ba.dtype):(ba=fr.getBuffer(Ur),ba?Ln=ba.dtype:"constant"in Ur?(Xi=2,typeof Ur.constant=="number"?(qn=Ur.constant,Ia=yn=Ya=0):(qn=Ur.constant.length>0?Ur.constant[0]:0,Ia=Ur.constant.length>1?Ur.constant[1]:0,yn=Ur.constant.length>2?Ur.constant[2]:0,Ya=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?ba=fr.createStream(34962,Ur.buffer):ba=fr.getBuffer(Ur.buffer),Ln="type"in Ur?vi[Ur.type]:ba.dtype,Aa=!!Ur.normalized,Da=Ur.size|0,wo=Ur.offset|0,wa=Ur.stride|0,$i=Ur.divisor|0)),ea=_.location,Sa=De[ea],Xi===1?(Sa.buffer||je.enableVertexAttribArray(ea),Za=Da||2,(Sa.type!==Ln||Sa.size!==Za||Sa.buffer!==ba||Sa.normalized!==Aa||Sa.offset!==wo||Sa.stride!==wa)&&(je.bindBuffer(34962,ba.buffer),je.vertexAttribPointer(ea,Za,Ln,Aa,wa,wo),Sa.type=Ln,Sa.size=Za,Sa.buffer=ba,Sa.normalized=Aa,Sa.offset=wo,Sa.stride=wa),Sa.divisor!==$i&&(zn.vertexAttribDivisorANGLE(ea,$i),Sa.divisor=$i)):(Sa.buffer&&(je.disableVertexAttribArray(ea),Sa.buffer=null),(Sa.x!==qn||Sa.y!==Ia||Sa.z!==yn||Sa.w!==Ya)&&(je.vertexAttrib4f(ea,qn,Ia,yn,Ya),Sa.x=qn,Sa.y=Ia,Sa.z=yn,Sa.w=Ya)),xo=ki.capSize,je.uniform1f(C.location,xo),Wa=ki.lineWidth,je.uniform1f(M.location,Wa),hn=ki.opacity,je.uniform1f(v.location,hn),Un=ki.scale,Ss=Un[0],Kn=Un[1],je.uniform2f(z.location,Ss,Kn),ns=ki.scaleFract,Jo=ns[0],vo=ns[1],je.uniform2f(T.location,Jo,vo),ma=ki.translate,ja=ma[0],To=ma[1],je.uniform2f(F.location,ja,To),Ao=ki.translateFract,la=Ao[0],Ki=Ao[1],je.uniform2f(q.location,la,Ki),ho=H.call(this,tt,ki,0),Ka=ho[0],Ca=ho[1],ta=ho[2],En=ho[3],je.uniform4f(U.location,Ka,Ca,ta,En),Mo=Kt.elements,Mo?je.bindBuffer(34963,Mo.buffer.buffer):_e.currentVAO&&(Mo=ir.getElements(_e.currentVAO.elements),Mo&&je.bindBuffer(34963,Mo.buffer.buffer)),Ds=Kt.offset,Ro=ki.count,Ro>0?Mo?zn.drawElementsInstancedANGLE(4,36,Mo.type,Ds<<(Mo.type-5121>>1),Ro):zn.drawArraysInstancedANGLE(4,Ds,36,Ro):Ro<0&&(Mo?je.drawElements(4,36,Mo.type,Ds<<(Mo.type-5121>>1)):je.drawArrays(4,Ds,36)),Vt.dirty=!0,_e.setVAO(null),tt.viewportWidth=st,tt.viewportHeight=Wt,Qr&&(r.cpuTime+=performance.now()-Ui),Wn&&fr.destroyStream(go),Ja&&fr.destroyStream(ln),Vo&&fr.destroyStream(ks),bn&&fr.destroyStream(ba)},scope:function(ki,ji,Vi){var zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l;zi=ki.viewport,Mi=zi.x|0,sn=zi.y|0,fi="width"in zi?zi.width|0:tt.framebufferWidth-Mi,Or="height"in zi?zi.height|0:tt.framebufferHeight-sn,st=tt.viewportWidth,tt.viewportWidth=fi,Wt=tt.viewportHeight,tt.viewportHeight=Or,tr=sr[0],sr[0]=Mi,or=sr[1],sr[1]=sn,Nr=sr[2],sr[2]=fi,hi=sr[3],sr[3]=Or,Gi=ue[0],ue[0]=j,Qr=ue[1],ue[1]=G,Ui=ue[2],ue[2]=O,zn=ue[3],ue[3]=W,fn=Mt.blend_enable,Mt.blend_enable=re,xn=ht[0],ht[0]=ne,_a=ht[1],ht[1]=be,Wn=St[0],St[0]=ze,Fn=St[1],St[1]=Ce,ia=St[2],St[2]=he,za=St[3],St[3]=te,Hr=Mt.depth_enable,Mt.depth_enable=ke,na=ki.viewport,go=na.x|0,Dn=na.y|0,un="width"in na?na.width|0:tt.framebufferWidth-go,Zn="height"in na?na.height|0:tt.framebufferHeight-Dn,Wo=Dt[0],Dt[0]=go,Ba=Dt[1],Dt[1]=Dn,Bo=Dt[2],Dt[2]=un,Ea=Dt[3],Dt[3]=Zn,Ha=Mt.scissor_enable,Mt.scissor_enable=Ee,tn=Vt.profile,tn&&(Cn=performance.now(),r.count++),Xn=Kt.count,Kt.count=Me,ts=ki.count,Ja=Kt.instances,Kt.instances=ts,to=Kt.primitive,Kt.primitive=Oe,Ri=ki.range,an=Fe[Re],Fe[Re]=Ri,cs=ki.lineWidth,pa=Fe[me],Fe[me]=cs,ln=ki.capSize,ka=Fe[Be],Fe[Be]=ln,va=ki.opacity,bo=Fe[fe],Fe[fe]=va,Co=ki.scale,Fi=Fe[Ze],Fe[Ze]=Co,Yn=ki.translate,xa=Fe[et],Fe[et]=Yn,Qi=ki.scaleFract,Nn=Fe[gt],Fe[gt]=Qi,Pn=ki.translateFract,qa=Fe[Pt],Fe[Pt]=Pn,jo=H.call(this,tt,ki,Vi),Vo=Fe[Qe],Fe[Qe]=jo,Pa=Xe.state,Xe.state=1,Oa=Xe.x,Xe.x=0,co=Xe.y,Xe.y=0,An=Xe.z,Xe.z=0,_o=Xe.w,Xe.w=0,ks=Xe.buffer,Xe.buffer=c,bs=Xe.size,Xe.size=0,ps=Xe.normalized,Xe.normalized=!1,sa=Xe.type,Xe.type=5126,Bn=Xe.offset,Xe.offset=0,ms=Xe.stride,Xe.stride=24,ya=Xe.divisor,Xe.divisor=0,on=Tt.state,Tt.state=1,mn=Tt.x,Tt.x=0,Ga=Tt.y,Tt.y=0,ca=Tt.z,Tt.z=0,bn=Tt.w,Tt.w=0,Xi=Tt.buffer,Tt.buffer=c,qn=Tt.size,Tt.size=0,Ia=Tt.normalized,Tt.normalized=!1,yn=Tt.type,Tt.type=5126,Ya=Tt.offset,Tt.offset=8,ba=Tt.stride,Tt.stride=24,Da=Tt.divisor,Tt.divisor=0,Aa=xt.state,xt.state=1,Ln=xt.x,xt.x=0,wo=xt.y,xt.y=0,wa=xt.z,xt.z=0,$i=xt.w,xt.w=0,ea=xt.buffer,xt.buffer=c,Sa=xt.size,xt.size=0,Za=xt.normalized,xt.normalized=!1,xo=xt.type,xt.type=5126,Wa=xt.offset,xt.offset=16,hn=xt.stride,xt.stride=24,Un=xt.divisor,xt.divisor=0,Ss=d.call(this,tt,ki,Vi),Yr.offset=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,ye(Yr)?(Kn=!0,To=fr.createStream(34962,Yr),Ki=To.dtype):(To=fr.getBuffer(Yr),To?Ki=To.dtype:"constant"in Yr?(ns=2,typeof Yr.constant=="number"?(Jo=Yr.constant,vo=ma=ja=0):(Jo=Yr.constant.length>0?Yr.constant[0]:0,vo=Yr.constant.length>1?Yr.constant[1]:0,ma=Yr.constant.length>2?Yr.constant[2]:0,ja=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?To=fr.createStream(34962,Yr.buffer):To=fr.getBuffer(Yr.buffer),Ki="type"in Yr?vi[Yr.type]:To.dtype,la=!!Yr.normalized,Ao=Yr.size|0,ho=Yr.offset|0,Ka=Yr.stride|0,Ca=Yr.divisor|0)),ta=_t.state,_t.state=ns,En=_t.x,_t.x=Jo,Mo=_t.y,_t.y=vo,Ds=_t.z,_t.z=ma,Ro=_t.w,_t.w=ja,vs=_t.buffer,_t.buffer=To,Ks=_t.size,_t.size=Ao,as=_t.normalized,_t.normalized=la,Jn=_t.type,_t.type=Ki,Cs=_t.offset,_t.offset=ho,Xa=_t.stride,_t.stride=Ka,Zo=_t.divisor,_t.divisor=Ca,Eo=k.call(this,tt,ki,Vi),Ni.offset=Eo,lo=!1,$a=1,Xo=0,rs=0,$n=0,Sn=0,uo=null,Rs=0,xs=!1,Go=5126,os=0,So=0,Qn=0,ye(Ni)?(lo=!0,uo=fr.createStream(34962,Ni),Go=uo.dtype):(uo=fr.getBuffer(Ni),uo?Go=uo.dtype:"constant"in Ni?($a=2,typeof Ni.constant=="number"?(Xo=Ni.constant,rs=$n=Sn=0):(Xo=Ni.constant.length>0?Ni.constant[0]:0,rs=Ni.constant.length>1?Ni.constant[1]:0,$n=Ni.constant.length>2?Ni.constant[2]:0,Sn=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?uo=fr.createStream(34962,Ni.buffer):uo=fr.getBuffer(Ni.buffer),Go="type"in Ni?vi[Ni.type]:uo.dtype,xs=!!Ni.normalized,Rs=Ni.size|0,os=Ni.offset|0,So=Ni.stride|0,Qn=Ni.divisor|0)),zo=Ct.state,Ct.state=$a,rl=Ct.x,Ct.x=Xo,$o=Ct.y,Ct.y=rs,Na=Ct.z,Ct.z=$n,Ua=Ct.w,Ct.w=Sn,Po=Ct.buffer,Ct.buffer=uo,fo=Ct.size,Ct.size=Rs,ro=Ct.normalized,Ct.normalized=xs,Ma=Ct.type,Ct.type=Go,io=Ct.offset,Ct.offset=os,aa=Ct.stride,Ct.stride=So,Oo=Ct.divisor,Ct.divisor=Qn,No=L.call(this,tt,ki,Vi),Ur.offset=No,Zs=!1,Fs=1,ws=0,no=0,Ls=0,ds=0,Xs=null,oa=0,Yo=!1,po=5126,ss=0,ls=0,gs=0,ye(Ur)?(Zs=!0,Xs=fr.createStream(34962,Ur),po=Xs.dtype):(Xs=fr.getBuffer(Ur),Xs?po=Xs.dtype:"constant"in Ur?(Fs=2,typeof Ur.constant=="number"?(ws=Ur.constant,no=Ls=ds=0):(ws=Ur.constant.length>0?Ur.constant[0]:0,no=Ur.constant.length>1?Ur.constant[1]:0,Ls=Ur.constant.length>2?Ur.constant[2]:0,ds=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?Xs=fr.createStream(34962,Ur.buffer):Xs=fr.getBuffer(Ur.buffer),po="type"in Ur?vi[Ur.type]:Xs.dtype,Yo=!!Ur.normalized,oa=Ur.size|0,ss=Ur.offset|0,ls=Ur.stride|0,gs=Ur.divisor|0)),bt=jt.state,jt.state=Fs,Ft=jt.x,jt.x=ws,hr=jt.y,jt.y=no,nr=jt.z,jt.z=Ls,Sr=jt.w,jt.w=ds,li=jt.buffer,jt.buffer=Xs,di=jt.size,jt.size=oa,mi=jt.normalized,jt.normalized=Yo,Oi=jt.type,jt.type=po,dn=jt.offset,jt.offset=ss,wi=jt.stride,jt.stride=ls,ui=jt.divisor,jt.divisor=gs,Ai=b.call(this,tt,ki,Vi),ti.offset=Ai,gi=!1,gn=1,In=0,Vn=0,Rn=0,Hn=0,Gn=null,pn=0,Lo=!1,us=5126,Bs=0,Js=0,ol=0,ye(ti)?(gi=!0,Gn=fr.createStream(34962,ti),us=Gn.dtype):(Gn=fr.getBuffer(ti),Gn?us=Gn.dtype:"constant"in ti?(gn=2,typeof ti.constant=="number"?(In=ti.constant,Vn=Rn=Hn=0):(In=ti.constant.length>0?ti.constant[0]:0,Vn=ti.constant.length>1?ti.constant[1]:0,Rn=ti.constant.length>2?ti.constant[2]:0,Hn=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?Gn=fr.createStream(34962,ti.buffer):Gn=fr.getBuffer(ti.buffer),us="type"in ti?vi[ti.type]:Gn.dtype,Lo=!!ti.normalized,pn=ti.size|0,Bs=ti.offset|0,Js=ti.stride|0,ol=ti.divisor|0)),Cl=At.state,At.state=gn,ul=At.x,At.x=In,Gl=At.y,At.y=Vn,Vl=At.z,At.z=Rn,Fl=At.w,At.w=Hn,ga=At.buffer,At.buffer=Gn,ko=At.size,At.size=pn,zs=At.normalized,At.normalized=Lo,Fo=At.type,At.type=us,Ys=At.offset,At.offset=Bs,Gs=At.stride,At.stride=Js,Us=At.divisor,At.divisor=ol,Sl=Ot.vert,Ot.vert=Te,_l=Ot.frag,Ot.frag=nt,Vt.dirty=!0,ji(tt,ki,Vi),tt.viewportWidth=st,tt.viewportHeight=Wt,sr[0]=tr,sr[1]=or,sr[2]=Nr,sr[3]=hi,ue[0]=Gi,ue[1]=Qr,ue[2]=Ui,ue[3]=zn,Mt.blend_enable=fn,ht[0]=xn,ht[1]=_a,St[0]=Wn,St[1]=Fn,St[2]=ia,St[3]=za,Mt.depth_enable=Hr,Dt[0]=Wo,Dt[1]=Ba,Dt[2]=Bo,Dt[3]=Ea,Mt.scissor_enable=Ha,tn&&(r.cpuTime+=performance.now()-Cn),Kt.count=Xn,Kt.instances=Ja,Kt.primitive=to,Fe[Re]=an,Fe[me]=pa,Fe[Be]=ka,Fe[fe]=bo,Fe[Ze]=Fi,Fe[et]=xa,Fe[gt]=Nn,Fe[Pt]=qa,Fe[Qe]=Vo,Xe.state=Pa,Xe.x=Oa,Xe.y=co,Xe.z=An,Xe.w=_o,Xe.buffer=ks,Xe.size=bs,Xe.normalized=ps,Xe.type=sa,Xe.offset=Bn,Xe.stride=ms,Xe.divisor=ya,Tt.state=on,Tt.x=mn,Tt.y=Ga,Tt.z=ca,Tt.w=bn,Tt.buffer=Xi,Tt.size=qn,Tt.normalized=Ia,Tt.type=yn,Tt.offset=Ya,Tt.stride=ba,Tt.divisor=Da,xt.state=Aa,xt.x=Ln,xt.y=wo,xt.z=wa,xt.w=$i,xt.buffer=ea,xt.size=Sa,xt.normalized=Za,xt.type=xo,xt.offset=Wa,xt.stride=hn,xt.divisor=Un,Kn&&fr.destroyStream(To),_t.state=ta,_t.x=En,_t.y=Mo,_t.z=Ds,_t.w=Ro,_t.buffer=vs,_t.size=Ks,_t.normalized=as,_t.type=Jn,_t.offset=Cs,_t.stride=Xa,_t.divisor=Zo,lo&&fr.destroyStream(uo),Ct.state=zo,Ct.x=rl,Ct.y=$o,Ct.z=Na,Ct.w=Ua,Ct.buffer=Po,Ct.size=fo,Ct.normalized=ro,Ct.type=Ma,Ct.offset=io,Ct.stride=aa,Ct.divisor=Oo,Zs&&fr.destroyStream(Xs),jt.state=bt,jt.x=Ft,jt.y=hr,jt.z=nr,jt.w=Sr,jt.buffer=li,jt.size=di,jt.normalized=mi,jt.type=Oi,jt.offset=dn,jt.stride=wi,jt.divisor=ui,gi&&fr.destroyStream(Gn),At.state=Cl,At.x=ul,At.y=Gl,At.z=Vl,At.w=Fl,At.buffer=ga,At.size=ko,At.normalized=zs,At.type=Fo,At.offset=Ys,At.stride=Gs,At.divisor=Us,Ot.vert=Sl,Ot.frag=_l,Vt.dirty=!0},batch:function(ki,ji){var Vi,zi,Mi,sn,fi,Or,st;if(Vi=Ie.angle_instanced_arrays,zi=Pe.next,zi!==Pe.cur&&(zi?je.bindFramebuffer(36160,zi.framebuffer):je.bindFramebuffer(36160,null),Pe.cur=zi),Vt.dirty){var Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to;Wt=Mt.dither,Wt!==Vt.dither&&(Wt?je.enable(3024):je.disable(3024),Vt.dither=Wt),tr=Mt.depth_func,tr!==Vt.depth_func&&(je.depthFunc(tr),Vt.depth_func=tr),or=qr[0],Nr=qr[1],(or!==Lr[0]||Nr!==Lr[1])&&(je.depthRange(or,Nr),Lr[0]=or,Lr[1]=Nr),hi=Mt.depth_mask,hi!==Vt.depth_mask&&(je.depthMask(hi),Vt.depth_mask=hi),Gi=vr[0],Qr=vr[1],Ui=vr[2],zn=vr[3],(Gi!==Er[0]||Qr!==Er[1]||Ui!==Er[2]||zn!==Er[3])&&(je.colorMask(Gi,Qr,Ui,zn),Er[0]=Gi,Er[1]=Qr,Er[2]=Ui,Er[3]=zn),fn=Mt.cull_enable,fn!==Vt.cull_enable&&(fn?je.enable(2884):je.disable(2884),Vt.cull_enable=fn),xn=Mt.cull_face,xn!==Vt.cull_face&&(je.cullFace(xn),Vt.cull_face=xn),_a=Mt.frontFace,_a!==Vt.frontFace&&(je.frontFace(_a),Vt.frontFace=_a),Wn=Mt.lineWidth,Wn!==Vt.lineWidth&&(je.lineWidth(Wn),Vt.lineWidth=Wn),Fn=Mt.polygonOffset_enable,Fn!==Vt.polygonOffset_enable&&(Fn?je.enable(32823):je.disable(32823),Vt.polygonOffset_enable=Fn),ia=si[0],za=si[1],(ia!==Ei[0]||za!==Ei[1])&&(je.polygonOffset(ia,za),Ei[0]=ia,Ei[1]=za),Hr=Mt.sample_alpha,Hr!==Vt.sample_alpha&&(Hr?je.enable(32926):je.disable(32926),Vt.sample_alpha=Hr),na=Mt.sample_enable,na!==Vt.sample_enable&&(na?je.enable(32928):je.disable(32928),Vt.sample_enable=na),go=Si[0],Dn=Si[1],(go!==xi[0]||Dn!==xi[1])&&(je.sampleCoverage(go,Dn),xi[0]=go,xi[1]=Dn),un=Mt.stencil_enable,un!==Vt.stencil_enable&&(un?je.enable(2960):je.disable(2960),Vt.stencil_enable=un),Zn=Mt.stencil_mask,Zn!==Vt.stencil_mask&&(je.stencilMask(Zn),Vt.stencil_mask=Zn),Wo=Hi[0],Ba=Hi[1],Bo=Hi[2],(Wo!==Jr[0]||Ba!==Jr[1]||Bo!==Jr[2])&&(je.stencilFunc(Wo,Ba,Bo),Jr[0]=Wo,Jr[1]=Ba,Jr[2]=Bo),Ea=ci[0],Ha=ci[1],tn=ci[2],Cn=ci[3],(Ea!==Di[0]||Ha!==Di[1]||tn!==Di[2]||Cn!==Di[3])&&(je.stencilOpSeparate(Ea,Ha,tn,Cn),Di[0]=Ea,Di[1]=Ha,Di[2]=tn,Di[3]=Cn),Xn=Lt[0],ts=Lt[1],Ja=Lt[2],to=Lt[3],(Xn!==vt[0]||ts!==vt[1]||Ja!==vt[2]||to!==vt[3])&&(je.stencilOpSeparate(Xn,ts,Ja,to),vt[0]=Xn,vt[1]=ts,vt[2]=Ja,vt[3]=to)}je.blendColor(0,0,0,0),de[0]=0,de[1]=0,de[2]=0,de[3]=0,ut?je.enable(3042):je.disable(3042),Vt.blend_enable=ut,je.blendEquationSeparate(32774,32774),Et[0]=32774,Et[1]=32774,je.blendFuncSeparate(770,771,773,1),Zt[0]=770,Zt[1]=771,Zt[2]=773,Zt[3]=1,ct?je.enable(2929):je.disable(2929),Vt.depth_enable=ct,rt?je.enable(3089):je.disable(3089),Vt.scissor_enable=rt,Mi=Vt.profile,Mi&&(sn=performance.now(),r.count+=ji),je.useProgram(f.program),fi=Ie.angle_instanced_arrays;var Ri,an,cs,pa,ln,ka,va,bo;for(_e.setVAO(null),Ri=h.location,an=De[Ri],an.buffer||je.enableVertexAttribArray(Ri),(an.type!==5126||an.size!==2||an.buffer!==c||an.normalized!==!1||an.offset!==16||an.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Ri,2,5126,!1,24,16),an.type=5126,an.size=2,an.buffer=c,an.normalized=!1,an.offset=16,an.stride=24),an.divisor!==0&&(fi.vertexAttribDivisorANGLE(Ri,0),an.divisor=0),cs=x.location,pa=De[cs],pa.buffer||je.enableVertexAttribArray(cs),(pa.type!==5126||pa.size!==2||pa.buffer!==c||pa.normalized!==!1||pa.offset!==0||pa.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(cs,2,5126,!1,24,0),pa.type=5126,pa.size=2,pa.buffer=c,pa.normalized=!1,pa.offset=0,pa.stride=24),pa.divisor!==0&&(fi.vertexAttribDivisorANGLE(cs,0),pa.divisor=0),ln=E.location,ka=De[ln],ka.buffer||je.enableVertexAttribArray(ln),(ka.type!==5126||ka.size!==2||ka.buffer!==c||ka.normalized!==!1||ka.offset!==8||ka.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(ln,2,5126,!1,24,8),ka.type=5126,ka.size=2,ka.buffer=c,ka.normalized=!1,ka.offset=8,ka.stride=24),ka.divisor!==0&&(fi.vertexAttribDivisorANGLE(ln,0),ka.divisor=0),va=Kt.elements,va?je.bindBuffer(34963,va.buffer.buffer):_e.currentVAO&&(va=ir.getElements(_e.currentVAO.elements),va&&je.bindBuffer(34963,va.buffer.buffer)),bo=Kt.offset,Or=0;Or0?Yr.constant[0]:0,bs=Yr.constant.length>1?Yr.constant[1]:0,ps=Yr.constant.length>2?Yr.constant[2]:0,sa=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?Bn=fr.createStream(34962,Yr.buffer):Bn=fr.getBuffer(Yr.buffer),on="type"in Yr?vi[Yr.type]:Bn.dtype,ya=!!Yr.normalized,ms=Yr.size|0,mn=Yr.offset|0,Ga=Yr.stride|0,ca=Yr.divisor|0)),bn=p.location,Xi=De[bn],_o===1?(Xi.buffer||je.enableVertexAttribArray(bn),qn=ms||4,(Xi.type!==on||Xi.size!==qn||Xi.buffer!==Bn||Xi.normalized!==ya||Xi.offset!==mn||Xi.stride!==Ga)&&(je.bindBuffer(34962,Bn.buffer),je.vertexAttribPointer(bn,qn,on,ya,Ga,mn),Xi.type=on,Xi.size=qn,Xi.buffer=Bn,Xi.normalized=ya,Xi.offset=mn,Xi.stride=Ga),Xi.divisor!==ca&&(fi.vertexAttribDivisorANGLE(bn,ca),Xi.divisor=ca)):(Xi.buffer&&(je.disableVertexAttribArray(bn),Xi.buffer=null),(Xi.x!==ks||Xi.y!==bs||Xi.z!==ps||Xi.w!==sa)&&(je.vertexAttrib4f(bn,ks,bs,ps,sa),Xi.x=ks,Xi.y=bs,Xi.z=ps,Xi.w=sa)),Ia=b.call(this,tt,st,Or),ti.offset=Ia,yn=!1,Ya=1,ba=0,Da=0,Aa=0,Ln=0,wo=null,wa=0,$i=!1,ea=5126,Sa=0,Za=0,xo=0,ye(ti)?(yn=!0,wo=fr.createStream(34962,ti),ea=wo.dtype):(wo=fr.getBuffer(ti),wo?ea=wo.dtype:"constant"in ti?(Ya=2,typeof ti.constant=="number"?(ba=ti.constant,Da=Aa=Ln=0):(ba=ti.constant.length>0?ti.constant[0]:0,Da=ti.constant.length>1?ti.constant[1]:0,Aa=ti.constant.length>2?ti.constant[2]:0,Ln=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?wo=fr.createStream(34962,ti.buffer):wo=fr.getBuffer(ti.buffer),ea="type"in ti?vi[ti.type]:wo.dtype,$i=!!ti.normalized,wa=ti.size|0,Sa=ti.offset|0,Za=ti.stride|0,xo=ti.divisor|0)),Wa=y.location,hn=De[Wa],Ya===1?(hn.buffer||je.enableVertexAttribArray(Wa),Un=wa||4,(hn.type!==ea||hn.size!==Un||hn.buffer!==wo||hn.normalized!==$i||hn.offset!==Sa||hn.stride!==Za)&&(je.bindBuffer(34962,wo.buffer),je.vertexAttribPointer(Wa,Un,ea,$i,Za,Sa),hn.type=ea,hn.size=Un,hn.buffer=wo,hn.normalized=$i,hn.offset=Sa,hn.stride=Za),hn.divisor!==xo&&(fi.vertexAttribDivisorANGLE(Wa,xo),hn.divisor=xo)):(hn.buffer&&(je.disableVertexAttribArray(Wa),hn.buffer=null),(hn.x!==ba||hn.y!==Da||hn.z!==Aa||hn.w!==Ln)&&(je.vertexAttrib4f(Wa,ba,Da,Aa,Ln),hn.x=ba,hn.y=Da,hn.z=Aa,hn.w=Ln)),Ss=k.call(this,tt,st,Or),Ni.offset=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,ye(Ni)?(Kn=!0,To=fr.createStream(34962,Ni),Ki=To.dtype):(To=fr.getBuffer(Ni),To?Ki=To.dtype:"constant"in Ni?(ns=2,typeof Ni.constant=="number"?(Jo=Ni.constant,vo=ma=ja=0):(Jo=Ni.constant.length>0?Ni.constant[0]:0,vo=Ni.constant.length>1?Ni.constant[1]:0,ma=Ni.constant.length>2?Ni.constant[2]:0,ja=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?To=fr.createStream(34962,Ni.buffer):To=fr.getBuffer(Ni.buffer),Ki="type"in Ni?vi[Ni.type]:To.dtype,la=!!Ni.normalized,Ao=Ni.size|0,ho=Ni.offset|0,Ka=Ni.stride|0,Ca=Ni.divisor|0)),ta=A.location,En=De[ta],ns===1?(En.buffer||je.enableVertexAttribArray(ta),Mo=Ao||2,(En.type!==Ki||En.size!==Mo||En.buffer!==To||En.normalized!==la||En.offset!==ho||En.stride!==Ka)&&(je.bindBuffer(34962,To.buffer),je.vertexAttribPointer(ta,Mo,Ki,la,Ka,ho),En.type=Ki,En.size=Mo,En.buffer=To,En.normalized=la,En.offset=ho,En.stride=Ka),En.divisor!==Ca&&(fi.vertexAttribDivisorANGLE(ta,Ca),En.divisor=Ca)):(En.buffer&&(je.disableVertexAttribArray(ta),En.buffer=null),(En.x!==Jo||En.y!==vo||En.z!==ma||En.w!==ja)&&(je.vertexAttrib4f(ta,Jo,vo,ma,ja),En.x=Jo,En.y=vo,En.z=ma,En.w=ja)),Ds=L.call(this,tt,st,Or),Ur.offset=Ds,Ro=!1,vs=1,Ks=0,as=0,Jn=0,Cs=0,Xa=null,Zo=0,Eo=!1,lo=5126,$a=0,Xo=0,rs=0,ye(Ur)?(Ro=!0,Xa=fr.createStream(34962,Ur),lo=Xa.dtype):(Xa=fr.getBuffer(Ur),Xa?lo=Xa.dtype:"constant"in Ur?(vs=2,typeof Ur.constant=="number"?(Ks=Ur.constant,as=Jn=Cs=0):(Ks=Ur.constant.length>0?Ur.constant[0]:0,as=Ur.constant.length>1?Ur.constant[1]:0,Jn=Ur.constant.length>2?Ur.constant[2]:0,Cs=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?Xa=fr.createStream(34962,Ur.buffer):Xa=fr.getBuffer(Ur.buffer),lo="type"in Ur?vi[Ur.type]:Xa.dtype,Eo=!!Ur.normalized,Zo=Ur.size|0,$a=Ur.offset|0,Xo=Ur.stride|0,rs=Ur.divisor|0)),$n=_.location,Sn=De[$n],vs===1?(Sn.buffer||je.enableVertexAttribArray($n),uo=Zo||2,(Sn.type!==lo||Sn.size!==uo||Sn.buffer!==Xa||Sn.normalized!==Eo||Sn.offset!==$a||Sn.stride!==Xo)&&(je.bindBuffer(34962,Xa.buffer),je.vertexAttribPointer($n,uo,lo,Eo,Xo,$a),Sn.type=lo,Sn.size=uo,Sn.buffer=Xa,Sn.normalized=Eo,Sn.offset=$a,Sn.stride=Xo),Sn.divisor!==rs&&(fi.vertexAttribDivisorANGLE($n,rs),Sn.divisor=rs)):(Sn.buffer&&(je.disableVertexAttribArray($n),Sn.buffer=null),(Sn.x!==Ks||Sn.y!==as||Sn.z!==Jn||Sn.w!==Cs)&&(je.vertexAttrib4f($n,Ks,as,Jn,Cs),Sn.x=Ks,Sn.y=as,Sn.z=Jn,Sn.w=Cs)),Rs=st.capSize,(!Or||xs!==Rs)&&(xs=Rs,je.uniform1f(C.location,Rs)),Go=st.lineWidth,(!Or||os!==Go)&&(os=Go,je.uniform1f(M.location,Go)),So=st.opacity,(!Or||Qn!==So)&&(Qn=So,je.uniform1f(v.location,So)),zo=st.scale,rl=zo[0],Na=zo[1],(!Or||$o!==rl||Ua!==Na)&&($o=rl,Ua=Na,je.uniform2f(z.location,rl,Na)),Po=st.scaleFract,fo=Po[0],Ma=Po[1],(!Or||ro!==fo||io!==Ma)&&(ro=fo,io=Ma,je.uniform2f(T.location,fo,Ma)),aa=st.translate,Oo=aa[0],Zs=aa[1],(!Or||No!==Oo||Fs!==Zs)&&(No=Oo,Fs=Zs,je.uniform2f(F.location,Oo,Zs)),ws=st.translateFract,no=ws[0],ds=ws[1],(!Or||Ls!==no||Xs!==ds)&&(Ls=no,Xs=ds,je.uniform2f(q.location,no,ds)),oa=H.call(this,tt,st,Or),Yo=oa[0],ss=oa[1],gs=oa[2],Ft=oa[3],(!Or||po!==Yo||ls!==ss||bt!==gs||hr!==Ft)&&(po=Yo,ls=ss,bt=gs,hr=Ft,je.uniform4f(U.location,Yo,ss,gs,Ft)),nr=st.count,nr>0?va?fi.drawElementsInstancedANGLE(4,36,va.type,bo<<(va.type-5121>>1),nr):fi.drawArraysInstancedANGLE(4,bo,36,nr):nr<0&&(va?je.drawElements(4,36,va.type,bo<<(va.type-5121>>1)):je.drawArrays(4,bo,36)),tt.viewportWidth=Nn,tt.viewportHeight=Pn,An&&fr.destroyStream(Bn),yn&&fr.destroyStream(wo),Kn&&fr.destroyStream(To),Ro&&fr.destroyStream(Xa)}Vt.dirty=!0,_e.setVAO(null),Mi&&(r.cpuTime+=performance.now()-sn)}}}});var L9=Se((s1r,GOe)=>{GOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At){"use strict";var Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br;return Te=t.gl,nt=t.context,ut=t.strings,ct=t.next,rt=t.current,je=t.draw,tt=t.elements,Je=t.buffer,Mt=t.shader,Vt=t.attributes,Kt=t.vao,ir=t.uniforms,fr=t.framebuffer,Ot=t.extensions,De=t.timer,_e=t.isBufferArgs,Fe=ct.blend_color,Pe=rt.blend_color,Ie=ct.blend_equation,lt=rt.blend_equation,ye=ct.blend_func,ue=rt.blend_func,de=ct.depth_range,ht=rt.depth_range,Et=ct.colorMask,St=rt.colorMask,Zt=ct.polygonOffset_offset,qr=rt.polygonOffset_offset,Lr=ct.sample_coverage,vr=rt.sample_coverage,Er=ct.stencil_func,si=rt.stencil_func,Ei=ct.stencil_opFront,Si=rt.stencil_opFront,xi=ct.stencil_opBack,Hi=rt.stencil_opBack,Jr=ct.scissor_box,ci=rt.scissor_box,Di=ct.viewport,Lt=rt.viewport,vt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Dt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Bt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},sr={add:32774,subtract:32778,"reverse subtract":32779},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zr={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Tr={cw:2304,ccw:2305},Rr={},Rr.offset=4,Rr.stride=8,Br={},Br.offset=0,Br.stride=8,{draw:function(oi){var vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca;if(vi=Ot.angle_instanced_arrays,Pi=fr.next,Pi!==fr.cur&&(Pi?Te.bindFramebuffer(36160,Pi.framebuffer):Te.bindFramebuffer(36160,null),fr.cur=Pi),rt.dirty){var ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No;ta=ct.dither,ta!==rt.dither&&(ta?Te.enable(3024):Te.disable(3024),rt.dither=ta),En=Ie[0],Mo=Ie[1],(En!==lt[0]||Mo!==lt[1])&&(Te.blendEquationSeparate(En,Mo),lt[0]=En,lt[1]=Mo),Ds=ct.depth_func,Ds!==rt.depth_func&&(Te.depthFunc(Ds),rt.depth_func=Ds),Ro=de[0],vs=de[1],(Ro!==ht[0]||vs!==ht[1])&&(Te.depthRange(Ro,vs),ht[0]=Ro,ht[1]=vs),Ks=ct.depth_mask,Ks!==rt.depth_mask&&(Te.depthMask(Ks),rt.depth_mask=Ks),as=Et[0],Jn=Et[1],Cs=Et[2],Xa=Et[3],(as!==St[0]||Jn!==St[1]||Cs!==St[2]||Xa!==St[3])&&(Te.colorMask(as,Jn,Cs,Xa),St[0]=as,St[1]=Jn,St[2]=Cs,St[3]=Xa),Zo=ct.cull_enable,Zo!==rt.cull_enable&&(Zo?Te.enable(2884):Te.disable(2884),rt.cull_enable=Zo),Eo=ct.cull_face,Eo!==rt.cull_face&&(Te.cullFace(Eo),rt.cull_face=Eo),lo=ct.frontFace,lo!==rt.frontFace&&(Te.frontFace(lo),rt.frontFace=lo),$a=ct.lineWidth,$a!==rt.lineWidth&&(Te.lineWidth($a),rt.lineWidth=$a),Xo=ct.polygonOffset_enable,Xo!==rt.polygonOffset_enable&&(Xo?Te.enable(32823):Te.disable(32823),rt.polygonOffset_enable=Xo),rs=Zt[0],$n=Zt[1],(rs!==qr[0]||$n!==qr[1])&&(Te.polygonOffset(rs,$n),qr[0]=rs,qr[1]=$n),Sn=ct.sample_alpha,Sn!==rt.sample_alpha&&(Sn?Te.enable(32926):Te.disable(32926),rt.sample_alpha=Sn),uo=ct.sample_enable,uo!==rt.sample_enable&&(uo?Te.enable(32928):Te.disable(32928),rt.sample_enable=uo),Rs=Lr[0],xs=Lr[1],(Rs!==vr[0]||xs!==vr[1])&&(Te.sampleCoverage(Rs,xs),vr[0]=Rs,vr[1]=xs),Go=ct.stencil_mask,Go!==rt.stencil_mask&&(Te.stencilMask(Go),rt.stencil_mask=Go),os=Er[0],So=Er[1],Qn=Er[2],(os!==si[0]||So!==si[1]||Qn!==si[2])&&(Te.stencilFunc(os,So,Qn),si[0]=os,si[1]=So,si[2]=Qn),zo=Ei[0],rl=Ei[1],$o=Ei[2],Na=Ei[3],(zo!==Si[0]||rl!==Si[1]||$o!==Si[2]||Na!==Si[3])&&(Te.stencilOpSeparate(zo,rl,$o,Na),Si[0]=zo,Si[1]=rl,Si[2]=$o,Si[3]=Na),Ua=xi[0],Po=xi[1],fo=xi[2],ro=xi[3],(Ua!==Hi[0]||Po!==Hi[1]||fo!==Hi[2]||ro!==Hi[3])&&(Te.stencilOpSeparate(Ua,Po,fo,ro),Hi[0]=Ua,Hi[1]=Po,Hi[2]=fo,Hi[3]=ro),Ma=ct.scissor_enable,Ma!==rt.scissor_enable&&(Ma?Te.enable(3089):Te.disable(3089),rt.scissor_enable=Ma),io=Jr[0],aa=Jr[1],Oo=Jr[2],No=Jr[3],(io!==ci[0]||aa!==ci[1]||Oo!==ci[2]||No!==ci[3])&&(Te.scissor(io,aa,Oo,No),ci[0]=io,ci[1]=aa,ci[2]=Oo,ci[3]=No)}Yr=this.viewport,Ni=Yr.x|0,Ur=Yr.y|0,ti="width"in Yr?Yr.width|0:nt.framebufferWidth-Ni,ki="height"in Yr?Yr.height|0:nt.framebufferHeight-Ur,ji=nt.viewportWidth,nt.viewportWidth=ti,Vi=nt.viewportHeight,nt.viewportHeight=ki,Te.viewport(Ni,Ur,ti,ki),Lt[0]=Ni,Lt[1]=Ur,Lt[2]=ti,Lt[3]=ki,Te.blendColor(0,0,0,1),Pe[0]=0,Pe[1]=0,Pe[2]=0,Pe[3]=1,n?Te.enable(3042):Te.disable(3042),rt.blend_enable=n,Te.blendFuncSeparate(770,771,773,1),ue[0]=770,ue[1]=771,ue[2]=773,ue[3]=1,i?Te.enable(2929):Te.disable(2929),rt.depth_enable=i,a?Te.enable(2960):Te.disable(2960),rt.stencil_enable=a,zi=rt.profile,zi&&(Mi=performance.now(),r.count++),Te.useProgram(o.program),sn=Ot.angle_instanced_arrays,Kt.setVAO(null),fi=this.charBuffer,Or=!1,st=1,Wt=0,tr=0,or=0,Nr=0,hi=null,Gi=0,Qr=!1,Ui=5126,zn=0,fn=0,xn=0,_e(fi)?(Or=!0,hi=Je.createStream(34962,fi),Ui=hi.dtype):(hi=Je.getBuffer(fi),hi?Ui=hi.dtype:"constant"in fi?(st=2,typeof fi.constant=="number"?(Wt=fi.constant,tr=or=Nr=0):(Wt=fi.constant.length>0?fi.constant[0]:0,tr=fi.constant.length>1?fi.constant[1]:0,or=fi.constant.length>2?fi.constant[2]:0,Nr=fi.constant.length>3?fi.constant[3]:0)):(_e(fi.buffer)?hi=Je.createStream(34962,fi.buffer):hi=Je.getBuffer(fi.buffer),Ui="type"in fi?zr[fi.type]:hi.dtype,Qr=!!fi.normalized,Gi=fi.size|0,zn=fi.offset|0,fn=fi.stride|0,xn=fi.divisor|0)),_a=s.location,Wn=Vt[_a],st===1?(Wn.buffer||Te.enableVertexAttribArray(_a),Fn=Gi||1,(Wn.type!==Ui||Wn.size!==Fn||Wn.buffer!==hi||Wn.normalized!==Qr||Wn.offset!==zn||Wn.stride!==fn)&&(Te.bindBuffer(34962,hi.buffer),Te.vertexAttribPointer(_a,Fn,Ui,Qr,fn,zn),Wn.type=Ui,Wn.size=Fn,Wn.buffer=hi,Wn.normalized=Qr,Wn.offset=zn,Wn.stride=fn),Wn.divisor!==xn&&(sn.vertexAttribDivisorANGLE(_a,xn),Wn.divisor=xn)):(Wn.buffer&&(Te.disableVertexAttribArray(_a),Wn.buffer=null),(Wn.x!==Wt||Wn.y!==tr||Wn.z!==or||Wn.w!==Nr)&&(Te.vertexAttrib4f(_a,Wt,tr,or,Nr),Wn.x=Wt,Wn.y=tr,Wn.z=or,Wn.w=Nr)),ia=this.sizeBuffer,Rr.buffer=ia,za=!1,Hr=1,na=0,go=0,Dn=0,un=0,Zn=null,Wo=0,Ba=!1,Bo=5126,Ea=0,Ha=0,tn=0,_e(Rr)?(za=!0,Zn=Je.createStream(34962,Rr),Bo=Zn.dtype):(Zn=Je.getBuffer(Rr),Zn?Bo=Zn.dtype:"constant"in Rr?(Hr=2,typeof Rr.constant=="number"?(na=Rr.constant,go=Dn=un=0):(na=Rr.constant.length>0?Rr.constant[0]:0,go=Rr.constant.length>1?Rr.constant[1]:0,Dn=Rr.constant.length>2?Rr.constant[2]:0,un=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?Zn=Je.createStream(34962,Rr.buffer):Zn=Je.getBuffer(Rr.buffer),Bo="type"in Rr?zr[Rr.type]:Zn.dtype,Ba=!!Rr.normalized,Wo=Rr.size|0,Ea=Rr.offset|0,Ha=Rr.stride|0,tn=Rr.divisor|0)),Cn=u.location,Xn=Vt[Cn],Hr===1?(Xn.buffer||Te.enableVertexAttribArray(Cn),ts=Wo||1,(Xn.type!==Bo||Xn.size!==ts||Xn.buffer!==Zn||Xn.normalized!==Ba||Xn.offset!==Ea||Xn.stride!==Ha)&&(Te.bindBuffer(34962,Zn.buffer),Te.vertexAttribPointer(Cn,ts,Bo,Ba,Ha,Ea),Xn.type=Bo,Xn.size=ts,Xn.buffer=Zn,Xn.normalized=Ba,Xn.offset=Ea,Xn.stride=Ha),Xn.divisor!==tn&&(sn.vertexAttribDivisorANGLE(Cn,tn),Xn.divisor=tn)):(Xn.buffer&&(Te.disableVertexAttribArray(Cn),Xn.buffer=null),(Xn.x!==na||Xn.y!==go||Xn.z!==Dn||Xn.w!==un)&&(Te.vertexAttrib4f(Cn,na,go,Dn,un),Xn.x=na,Xn.y=go,Xn.z=Dn,Xn.w=un)),Ja=this.position,to=!1,Ri=1,an=0,cs=0,pa=0,ln=0,ka=null,va=0,bo=!1,Co=5126,Fi=0,Yn=0,xa=0,_e(Ja)?(to=!0,ka=Je.createStream(34962,Ja),Co=ka.dtype):(ka=Je.getBuffer(Ja),ka?Co=ka.dtype:"constant"in Ja?(Ri=2,typeof Ja.constant=="number"?(an=Ja.constant,cs=pa=ln=0):(an=Ja.constant.length>0?Ja.constant[0]:0,cs=Ja.constant.length>1?Ja.constant[1]:0,pa=Ja.constant.length>2?Ja.constant[2]:0,ln=Ja.constant.length>3?Ja.constant[3]:0)):(_e(Ja.buffer)?ka=Je.createStream(34962,Ja.buffer):ka=Je.getBuffer(Ja.buffer),Co="type"in Ja?zr[Ja.type]:ka.dtype,bo=!!Ja.normalized,va=Ja.size|0,Fi=Ja.offset|0,Yn=Ja.stride|0,xa=Ja.divisor|0)),Qi=l.location,Nn=Vt[Qi],Ri===1?(Nn.buffer||Te.enableVertexAttribArray(Qi),Pn=va||2,(Nn.type!==Co||Nn.size!==Pn||Nn.buffer!==ka||Nn.normalized!==bo||Nn.offset!==Fi||Nn.stride!==Yn)&&(Te.bindBuffer(34962,ka.buffer),Te.vertexAttribPointer(Qi,Pn,Co,bo,Yn,Fi),Nn.type=Co,Nn.size=Pn,Nn.buffer=ka,Nn.normalized=bo,Nn.offset=Fi,Nn.stride=Yn),Nn.divisor!==xa&&(sn.vertexAttribDivisorANGLE(Qi,xa),Nn.divisor=xa)):(Nn.buffer&&(Te.disableVertexAttribArray(Qi),Nn.buffer=null),(Nn.x!==an||Nn.y!==cs||Nn.z!==pa||Nn.w!==ln)&&(Te.vertexAttrib4f(Qi,an,cs,pa,ln),Nn.x=an,Nn.y=cs,Nn.z=pa,Nn.w=ln)),qa=this.sizeBuffer,Br.buffer=qa,jo=!1,Vo=1,Pa=0,Oa=0,co=0,An=0,_o=null,ks=0,bs=!1,ps=5126,sa=0,Bn=0,ms=0,_e(Br)?(jo=!0,_o=Je.createStream(34962,Br),ps=_o.dtype):(_o=Je.getBuffer(Br),_o?ps=_o.dtype:"constant"in Br?(Vo=2,typeof Br.constant=="number"?(Pa=Br.constant,Oa=co=An=0):(Pa=Br.constant.length>0?Br.constant[0]:0,Oa=Br.constant.length>1?Br.constant[1]:0,co=Br.constant.length>2?Br.constant[2]:0,An=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?_o=Je.createStream(34962,Br.buffer):_o=Je.getBuffer(Br.buffer),ps="type"in Br?zr[Br.type]:_o.dtype,bs=!!Br.normalized,ks=Br.size|0,sa=Br.offset|0,Bn=Br.stride|0,ms=Br.divisor|0)),ya=f.location,on=Vt[ya],Vo===1?(on.buffer||Te.enableVertexAttribArray(ya),mn=ks||1,(on.type!==ps||on.size!==mn||on.buffer!==_o||on.normalized!==bs||on.offset!==sa||on.stride!==Bn)&&(Te.bindBuffer(34962,_o.buffer),Te.vertexAttribPointer(ya,mn,ps,bs,Bn,sa),on.type=ps,on.size=mn,on.buffer=_o,on.normalized=bs,on.offset=sa,on.stride=Bn),on.divisor!==ms&&(sn.vertexAttribDivisorANGLE(ya,ms),on.divisor=ms)):(on.buffer&&(Te.disableVertexAttribArray(ya),on.buffer=null),(on.x!==Pa||on.y!==Oa||on.z!==co||on.w!==An)&&(Te.vertexAttrib4f(ya,Pa,Oa,co,An),on.x=Pa,on.y=Oa,on.z=co,on.w=An)),Ga=oi.align,Te.uniform1f(c.location,Ga),ca=d.call(this,nt,oi,0),ca&&ca._reglType==="framebuffer"&&(ca=ca.color[0]),bn=ca._texture,Te.uniform1i(h.location,bn.bind()),Xi=x.call(this,nt,oi,0),qn=Xi[0],Ia=Xi[1],Te.uniform2f(p.location,qn,Ia),yn=y.call(this,nt,oi,0),Ya=yn[0],ba=yn[1],Te.uniform2f(b.location,Ya,ba),Da=oi.baseline,Te.uniform1f(E.location,Da),Aa=A.call(this,nt,oi,0),Te.uniform1f(k.location,Aa),Ln=oi.color,wo=Ln[0],wa=Ln[1],$i=Ln[2],ea=Ln[3],Te.uniform4f(L.location,wo,wa,$i,ea),Sa=C.call(this,nt,oi,0),Te.uniform1f(_.location,Sa),Za=oi.opacity,Te.uniform1f(M.location,Za),xo=oi.positionOffset,Wa=xo[0],hn=xo[1],Te.uniform2f(v.location,Wa,hn),Un=this.scale,Ss=Un[0],Kn=Un[1],Te.uniform2f(z.location,Ss,Kn),ns=this.translate,Jo=ns[0],vo=ns[1],Te.uniform2f(T.location,Jo,vo),ma=this.viewportArray,ja=ma[0],To=ma[1],Ao=ma[2],la=ma[3],Te.uniform4f(F.location,ja,To,Ao,la),Ki=je.elements,Ki?Te.bindBuffer(34963,Ki.buffer.buffer):Kt.currentVAO&&(Ki=tt.getElements(Kt.currentVAO.elements),Ki&&Te.bindBuffer(34963,Ki.buffer.buffer)),ho=oi.offset,Ka=oi.count,Ka&&(Ca=je.instances,Ca>0?Ki?sn.drawElementsInstancedANGLE(0,Ka,Ki.type,ho<<(Ki.type-5121>>1),Ca):sn.drawArraysInstancedANGLE(0,ho,Ka,Ca):Ca<0&&(Ki?Te.drawElements(0,Ka,Ki.type,ho<<(Ki.type-5121>>1)):Te.drawArrays(0,ho,Ka)),rt.dirty=!0,Kt.setVAO(null),nt.viewportWidth=ji,nt.viewportHeight=Vi,zi&&(r.cpuTime+=performance.now()-Mi),Or&&Je.destroyStream(hi),za&&Je.destroyStream(Zn),to&&Je.destroyStream(ka),jo&&Je.destroyStream(_o),bn.unbind())},scope:function(oi,vi,Pi){var Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa;Yr=this.viewport,Ni=Yr.x|0,Ur=Yr.y|0,ti="width"in Yr?Yr.width|0:nt.framebufferWidth-Ni,ki="height"in Yr?Yr.height|0:nt.framebufferHeight-Ur,ji=nt.viewportWidth,nt.viewportWidth=ti,Vi=nt.viewportHeight,nt.viewportHeight=ki,zi=Di[0],Di[0]=Ni,Mi=Di[1],Di[1]=Ur,sn=Di[2],Di[2]=ti,fi=Di[3],Di[3]=ki,Or=Fe[0],Fe[0]=q,st=Fe[1],Fe[1]=U,Wt=Fe[2],Fe[2]=H,tr=Fe[3],Fe[3]=j,or=ct.blend_enable,ct.blend_enable=G,Nr=ye[0],ye[0]=O,hi=ye[1],ye[1]=W,Gi=ye[2],ye[2]=re,Qr=ye[3],ye[3]=ne,Ui=ct.depth_enable,ct.depth_enable=be,zn=ct.stencil_enable,ct.stencil_enable=ze,fn=rt.profile,fn&&(xn=performance.now(),r.count++),_a=oi.offset,Wn=je.offset,je.offset=_a,Fn=oi.count,ia=je.count,je.count=Fn,za=je.primitive,je.primitive=Ce,Hr=y.call(this,nt,oi,Pi),na=ir[he],ir[he]=Hr,go=x.call(this,nt,oi,Pi),Dn=ir[te],ir[te]=go,un=d.call(this,nt,oi,Pi),Zn=ir[ke],ir[ke]=un,Wo=A.call(this,nt,oi,Pi),Ba=ir[Ee],ir[Ee]=Wo,Bo=C.call(this,nt,oi,Pi),Ea=ir[Me],ir[Me]=Bo,Ha=oi.color,tn=ir[Oe],ir[Oe]=Ha,Cn=oi.opacity,Xn=ir[Re],ir[Re]=Cn,ts=this.viewportArray,Ja=ir[me],ir[me]=ts,to=this.scale,Ri=ir[Be],ir[Be]=to,an=oi.align,cs=ir[fe],ir[fe]=an,pa=oi.baseline,ln=ir[Ze],ir[Ze]=pa,ka=this.translate,va=ir[et],ir[et]=ka,bo=oi.positionOffset,Co=ir[gt],ir[gt]=bo,Fi=this.charBuffer,Yn=!1,xa=1,Qi=0,Nn=0,Pn=0,qa=0,jo=null,Vo=0,Pa=!1,Oa=5126,co=0,An=0,_o=0,_e(Fi)?(Yn=!0,jo=Je.createStream(34962,Fi),Oa=jo.dtype):(jo=Je.getBuffer(Fi),jo?Oa=jo.dtype:"constant"in Fi?(xa=2,typeof Fi.constant=="number"?(Qi=Fi.constant,Nn=Pn=qa=0):(Qi=Fi.constant.length>0?Fi.constant[0]:0,Nn=Fi.constant.length>1?Fi.constant[1]:0,Pn=Fi.constant.length>2?Fi.constant[2]:0,qa=Fi.constant.length>3?Fi.constant[3]:0)):(_e(Fi.buffer)?jo=Je.createStream(34962,Fi.buffer):jo=Je.getBuffer(Fi.buffer),Oa="type"in Fi?zr[Fi.type]:jo.dtype,Pa=!!Fi.normalized,Vo=Fi.size|0,co=Fi.offset|0,An=Fi.stride|0,_o=Fi.divisor|0)),ks=Pt.state,Pt.state=xa,bs=Pt.x,Pt.x=Qi,ps=Pt.y,Pt.y=Nn,sa=Pt.z,Pt.z=Pn,Bn=Pt.w,Pt.w=qa,ms=Pt.buffer,Pt.buffer=jo,ya=Pt.size,Pt.size=Vo,on=Pt.normalized,Pt.normalized=Pa,mn=Pt.type,Pt.type=Oa,Ga=Pt.offset,Pt.offset=co,ca=Pt.stride,Pt.stride=An,bn=Pt.divisor,Pt.divisor=_o,Xi=this.position,qn=!1,Ia=1,yn=0,Ya=0,ba=0,Da=0,Aa=null,Ln=0,wo=!1,wa=5126,$i=0,ea=0,Sa=0,_e(Xi)?(qn=!0,Aa=Je.createStream(34962,Xi),wa=Aa.dtype):(Aa=Je.getBuffer(Xi),Aa?wa=Aa.dtype:"constant"in Xi?(Ia=2,typeof Xi.constant=="number"?(yn=Xi.constant,Ya=ba=Da=0):(yn=Xi.constant.length>0?Xi.constant[0]:0,Ya=Xi.constant.length>1?Xi.constant[1]:0,ba=Xi.constant.length>2?Xi.constant[2]:0,Da=Xi.constant.length>3?Xi.constant[3]:0)):(_e(Xi.buffer)?Aa=Je.createStream(34962,Xi.buffer):Aa=Je.getBuffer(Xi.buffer),wa="type"in Xi?zr[Xi.type]:Aa.dtype,wo=!!Xi.normalized,Ln=Xi.size|0,$i=Xi.offset|0,ea=Xi.stride|0,Sa=Xi.divisor|0)),Za=Qe.state,Qe.state=Ia,xo=Qe.x,Qe.x=yn,Wa=Qe.y,Qe.y=Ya,hn=Qe.z,Qe.z=ba,Un=Qe.w,Qe.w=Da,Ss=Qe.buffer,Qe.buffer=Aa,Kn=Qe.size,Qe.size=Ln,ns=Qe.normalized,Qe.normalized=wo,Jo=Qe.type,Qe.type=wa,vo=Qe.offset,Qe.offset=$i,ma=Qe.stride,Qe.stride=ea,ja=Qe.divisor,Qe.divisor=Sa,To=this.sizeBuffer,Rr.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,_e(Rr)?(Ao=!0,ta=Je.createStream(34962,Rr),Ds=ta.dtype):(ta=Je.getBuffer(Rr),ta?Ds=ta.dtype:"constant"in Rr?(la=2,typeof Rr.constant=="number"?(Ki=Rr.constant,ho=Ka=Ca=0):(Ki=Rr.constant.length>0?Rr.constant[0]:0,ho=Rr.constant.length>1?Rr.constant[1]:0,Ka=Rr.constant.length>2?Rr.constant[2]:0,Ca=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?ta=Je.createStream(34962,Rr.buffer):ta=Je.getBuffer(Rr.buffer),Ds="type"in Rr?zr[Rr.type]:ta.dtype,Mo=!!Rr.normalized,En=Rr.size|0,Ro=Rr.offset|0,vs=Rr.stride|0,Ks=Rr.divisor|0)),as=Xe.state,Xe.state=la,Jn=Xe.x,Xe.x=Ki,Cs=Xe.y,Xe.y=ho,Xa=Xe.z,Xe.z=Ka,Zo=Xe.w,Xe.w=Ca,Eo=Xe.buffer,Xe.buffer=ta,lo=Xe.size,Xe.size=En,$a=Xe.normalized,Xe.normalized=Mo,Xo=Xe.type,Xe.type=Ds,rs=Xe.offset,Xe.offset=Ro,$n=Xe.stride,Xe.stride=vs,Sn=Xe.divisor,Xe.divisor=Ks,uo=this.sizeBuffer,Br.buffer=uo,Rs=!1,xs=1,Go=0,os=0,So=0,Qn=0,zo=null,rl=0,$o=!1,Na=5126,Ua=0,Po=0,fo=0,_e(Br)?(Rs=!0,zo=Je.createStream(34962,Br),Na=zo.dtype):(zo=Je.getBuffer(Br),zo?Na=zo.dtype:"constant"in Br?(xs=2,typeof Br.constant=="number"?(Go=Br.constant,os=So=Qn=0):(Go=Br.constant.length>0?Br.constant[0]:0,os=Br.constant.length>1?Br.constant[1]:0,So=Br.constant.length>2?Br.constant[2]:0,Qn=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?zo=Je.createStream(34962,Br.buffer):zo=Je.getBuffer(Br.buffer),Na="type"in Br?zr[Br.type]:zo.dtype,$o=!!Br.normalized,rl=Br.size|0,Ua=Br.offset|0,Po=Br.stride|0,fo=Br.divisor|0)),ro=Tt.state,Tt.state=xs,Ma=Tt.x,Tt.x=Go,io=Tt.y,Tt.y=os,aa=Tt.z,Tt.z=So,Oo=Tt.w,Tt.w=Qn,No=Tt.buffer,Tt.buffer=zo,Zs=Tt.size,Tt.size=rl,Fs=Tt.normalized,Tt.normalized=$o,ws=Tt.type,Tt.type=Na,no=Tt.offset,Tt.offset=Ua,Ls=Tt.stride,Tt.stride=Po,ds=Tt.divisor,Tt.divisor=fo,Xs=Mt.vert,Mt.vert=xt,oa=Mt.frag,Mt.frag=_t,rt.dirty=!0,vi(nt,oi,Pi),nt.viewportWidth=ji,nt.viewportHeight=Vi,Di[0]=zi,Di[1]=Mi,Di[2]=sn,Di[3]=fi,Fe[0]=Or,Fe[1]=st,Fe[2]=Wt,Fe[3]=tr,ct.blend_enable=or,ye[0]=Nr,ye[1]=hi,ye[2]=Gi,ye[3]=Qr,ct.depth_enable=Ui,ct.stencil_enable=zn,fn&&(r.cpuTime+=performance.now()-xn),je.offset=Wn,je.count=ia,je.primitive=za,ir[he]=na,ir[te]=Dn,ir[ke]=Zn,ir[Ee]=Ba,ir[Me]=Ea,ir[Oe]=tn,ir[Re]=Xn,ir[me]=Ja,ir[Be]=Ri,ir[fe]=cs,ir[Ze]=ln,ir[et]=va,ir[gt]=Co,Yn&&Je.destroyStream(jo),Pt.state=ks,Pt.x=bs,Pt.y=ps,Pt.z=sa,Pt.w=Bn,Pt.buffer=ms,Pt.size=ya,Pt.normalized=on,Pt.type=mn,Pt.offset=Ga,Pt.stride=ca,Pt.divisor=bn,qn&&Je.destroyStream(Aa),Qe.state=Za,Qe.x=xo,Qe.y=Wa,Qe.z=hn,Qe.w=Un,Qe.buffer=Ss,Qe.size=Kn,Qe.normalized=ns,Qe.type=Jo,Qe.offset=vo,Qe.stride=ma,Qe.divisor=ja,Ao&&Je.destroyStream(ta),Xe.state=as,Xe.x=Jn,Xe.y=Cs,Xe.z=Xa,Xe.w=Zo,Xe.buffer=Eo,Xe.size=lo,Xe.normalized=$a,Xe.type=Xo,Xe.offset=rs,Xe.stride=$n,Xe.divisor=Sn,Rs&&Je.destroyStream(zo),Tt.state=ro,Tt.x=Ma,Tt.y=io,Tt.z=aa,Tt.w=Oo,Tt.buffer=No,Tt.size=Zs,Tt.normalized=Fs,Tt.type=ws,Tt.offset=no,Tt.stride=Ls,Tt.divisor=ds,Mt.vert=Xs,Mt.frag=oa,rt.dirty=!0},batch:function(oi,vi){var Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st;if(Pi=Ot.angle_instanced_arrays,Yr=fr.next,Yr!==fr.cur&&(Yr?Te.bindFramebuffer(36160,Yr.framebuffer):Te.bindFramebuffer(36160,null),fr.cur=Yr),rt.dirty){var Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka;Wt=ct.dither,Wt!==rt.dither&&(Wt?Te.enable(3024):Te.disable(3024),rt.dither=Wt),tr=Ie[0],or=Ie[1],(tr!==lt[0]||or!==lt[1])&&(Te.blendEquationSeparate(tr,or),lt[0]=tr,lt[1]=or),Nr=ct.depth_func,Nr!==rt.depth_func&&(Te.depthFunc(Nr),rt.depth_func=Nr),hi=de[0],Gi=de[1],(hi!==ht[0]||Gi!==ht[1])&&(Te.depthRange(hi,Gi),ht[0]=hi,ht[1]=Gi),Qr=ct.depth_mask,Qr!==rt.depth_mask&&(Te.depthMask(Qr),rt.depth_mask=Qr),Ui=Et[0],zn=Et[1],fn=Et[2],xn=Et[3],(Ui!==St[0]||zn!==St[1]||fn!==St[2]||xn!==St[3])&&(Te.colorMask(Ui,zn,fn,xn),St[0]=Ui,St[1]=zn,St[2]=fn,St[3]=xn),_a=ct.cull_enable,_a!==rt.cull_enable&&(_a?Te.enable(2884):Te.disable(2884),rt.cull_enable=_a),Wn=ct.cull_face,Wn!==rt.cull_face&&(Te.cullFace(Wn),rt.cull_face=Wn),Fn=ct.frontFace,Fn!==rt.frontFace&&(Te.frontFace(Fn),rt.frontFace=Fn),ia=ct.lineWidth,ia!==rt.lineWidth&&(Te.lineWidth(ia),rt.lineWidth=ia),za=ct.polygonOffset_enable,za!==rt.polygonOffset_enable&&(za?Te.enable(32823):Te.disable(32823),rt.polygonOffset_enable=za),Hr=Zt[0],na=Zt[1],(Hr!==qr[0]||na!==qr[1])&&(Te.polygonOffset(Hr,na),qr[0]=Hr,qr[1]=na),go=ct.sample_alpha,go!==rt.sample_alpha&&(go?Te.enable(32926):Te.disable(32926),rt.sample_alpha=go),Dn=ct.sample_enable,Dn!==rt.sample_enable&&(Dn?Te.enable(32928):Te.disable(32928),rt.sample_enable=Dn),un=Lr[0],Zn=Lr[1],(un!==vr[0]||Zn!==vr[1])&&(Te.sampleCoverage(un,Zn),vr[0]=un,vr[1]=Zn),Wo=ct.stencil_mask,Wo!==rt.stencil_mask&&(Te.stencilMask(Wo),rt.stencil_mask=Wo),Ba=Er[0],Bo=Er[1],Ea=Er[2],(Ba!==si[0]||Bo!==si[1]||Ea!==si[2])&&(Te.stencilFunc(Ba,Bo,Ea),si[0]=Ba,si[1]=Bo,si[2]=Ea),Ha=Ei[0],tn=Ei[1],Cn=Ei[2],Xn=Ei[3],(Ha!==Si[0]||tn!==Si[1]||Cn!==Si[2]||Xn!==Si[3])&&(Te.stencilOpSeparate(Ha,tn,Cn,Xn),Si[0]=Ha,Si[1]=tn,Si[2]=Cn,Si[3]=Xn),ts=xi[0],Ja=xi[1],to=xi[2],Ri=xi[3],(ts!==Hi[0]||Ja!==Hi[1]||to!==Hi[2]||Ri!==Hi[3])&&(Te.stencilOpSeparate(ts,Ja,to,Ri),Hi[0]=ts,Hi[1]=Ja,Hi[2]=to,Hi[3]=Ri),an=ct.scissor_enable,an!==rt.scissor_enable&&(an?Te.enable(3089):Te.disable(3089),rt.scissor_enable=an),cs=Jr[0],pa=Jr[1],ln=Jr[2],ka=Jr[3],(cs!==ci[0]||pa!==ci[1]||ln!==ci[2]||ka!==ci[3])&&(Te.scissor(cs,pa,ln,ka),ci[0]=cs,ci[1]=pa,ci[2]=ln,ci[3]=ka)}Ni=this.viewport,Ur=Ni.x|0,ti=Ni.y|0,ki="width"in Ni?Ni.width|0:nt.framebufferWidth-Ur,ji="height"in Ni?Ni.height|0:nt.framebufferHeight-ti,Vi=nt.viewportWidth,nt.viewportWidth=ki,zi=nt.viewportHeight,nt.viewportHeight=ji,Te.viewport(Ur,ti,ki,ji),Lt[0]=Ur,Lt[1]=ti,Lt[2]=ki,Lt[3]=ji,Te.blendColor(0,0,0,1),Pe[0]=0,Pe[1]=0,Pe[2]=0,Pe[3]=1,Ct?Te.enable(3042):Te.disable(3042),rt.blend_enable=Ct,Te.blendFuncSeparate(770,771,773,1),ue[0]=770,ue[1]=771,ue[2]=773,ue[3]=1,jt?Te.enable(2929):Te.disable(2929),rt.depth_enable=jt,At?Te.enable(2960):Te.disable(2960),rt.stencil_enable=At,Mi=rt.profile,Mi&&(sn=performance.now(),r.count+=vi),Te.useProgram(o.program),fi=Ot.angle_instanced_arrays;var va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn;for(Kt.setVAO(null),va=this.charBuffer,bo=!1,Co=1,Fi=0,Yn=0,xa=0,Qi=0,Nn=null,Pn=0,qa=!1,jo=5126,Vo=0,Pa=0,Oa=0,_e(va)?(bo=!0,Nn=Je.createStream(34962,va),jo=Nn.dtype):(Nn=Je.getBuffer(va),Nn?jo=Nn.dtype:"constant"in va?(Co=2,typeof va.constant=="number"?(Fi=va.constant,Yn=xa=Qi=0):(Fi=va.constant.length>0?va.constant[0]:0,Yn=va.constant.length>1?va.constant[1]:0,xa=va.constant.length>2?va.constant[2]:0,Qi=va.constant.length>3?va.constant[3]:0)):(_e(va.buffer)?Nn=Je.createStream(34962,va.buffer):Nn=Je.getBuffer(va.buffer),jo="type"in va?zr[va.type]:Nn.dtype,qa=!!va.normalized,Pn=va.size|0,Vo=va.offset|0,Pa=va.stride|0,Oa=va.divisor|0)),co=s.location,An=Vt[co],Co===1?(An.buffer||Te.enableVertexAttribArray(co),_o=Pn||1,(An.type!==jo||An.size!==_o||An.buffer!==Nn||An.normalized!==qa||An.offset!==Vo||An.stride!==Pa)&&(Te.bindBuffer(34962,Nn.buffer),Te.vertexAttribPointer(co,_o,jo,qa,Pa,Vo),An.type=jo,An.size=_o,An.buffer=Nn,An.normalized=qa,An.offset=Vo,An.stride=Pa),An.divisor!==Oa&&(fi.vertexAttribDivisorANGLE(co,Oa),An.divisor=Oa)):(An.buffer&&(Te.disableVertexAttribArray(co),An.buffer=null),(An.x!==Fi||An.y!==Yn||An.z!==xa||An.w!==Qi)&&(Te.vertexAttrib4f(co,Fi,Yn,xa,Qi),An.x=Fi,An.y=Yn,An.z=xa,An.w=Qi)),ks=this.sizeBuffer,Rr.buffer=ks,bs=!1,ps=1,sa=0,Bn=0,ms=0,ya=0,on=null,mn=0,Ga=!1,ca=5126,bn=0,Xi=0,qn=0,_e(Rr)?(bs=!0,on=Je.createStream(34962,Rr),ca=on.dtype):(on=Je.getBuffer(Rr),on?ca=on.dtype:"constant"in Rr?(ps=2,typeof Rr.constant=="number"?(sa=Rr.constant,Bn=ms=ya=0):(sa=Rr.constant.length>0?Rr.constant[0]:0,Bn=Rr.constant.length>1?Rr.constant[1]:0,ms=Rr.constant.length>2?Rr.constant[2]:0,ya=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?on=Je.createStream(34962,Rr.buffer):on=Je.getBuffer(Rr.buffer),ca="type"in Rr?zr[Rr.type]:on.dtype,Ga=!!Rr.normalized,mn=Rr.size|0,bn=Rr.offset|0,Xi=Rr.stride|0,qn=Rr.divisor|0)),Ia=u.location,yn=Vt[Ia],ps===1?(yn.buffer||Te.enableVertexAttribArray(Ia),Ya=mn||1,(yn.type!==ca||yn.size!==Ya||yn.buffer!==on||yn.normalized!==Ga||yn.offset!==bn||yn.stride!==Xi)&&(Te.bindBuffer(34962,on.buffer),Te.vertexAttribPointer(Ia,Ya,ca,Ga,Xi,bn),yn.type=ca,yn.size=Ya,yn.buffer=on,yn.normalized=Ga,yn.offset=bn,yn.stride=Xi),yn.divisor!==qn&&(fi.vertexAttribDivisorANGLE(Ia,qn),yn.divisor=qn)):(yn.buffer&&(Te.disableVertexAttribArray(Ia),yn.buffer=null),(yn.x!==sa||yn.y!==Bn||yn.z!==ms||yn.w!==ya)&&(Te.vertexAttrib4f(Ia,sa,Bn,ms,ya),yn.x=sa,yn.y=Bn,yn.z=ms,yn.w=ya)),ba=this.position,Da=!1,Aa=1,Ln=0,wo=0,wa=0,$i=0,ea=null,Sa=0,Za=!1,xo=5126,Wa=0,hn=0,Un=0,_e(ba)?(Da=!0,ea=Je.createStream(34962,ba),xo=ea.dtype):(ea=Je.getBuffer(ba),ea?xo=ea.dtype:"constant"in ba?(Aa=2,typeof ba.constant=="number"?(Ln=ba.constant,wo=wa=$i=0):(Ln=ba.constant.length>0?ba.constant[0]:0,wo=ba.constant.length>1?ba.constant[1]:0,wa=ba.constant.length>2?ba.constant[2]:0,$i=ba.constant.length>3?ba.constant[3]:0)):(_e(ba.buffer)?ea=Je.createStream(34962,ba.buffer):ea=Je.getBuffer(ba.buffer),xo="type"in ba?zr[ba.type]:ea.dtype,Za=!!ba.normalized,Sa=ba.size|0,Wa=ba.offset|0,hn=ba.stride|0,Un=ba.divisor|0)),Ss=l.location,Kn=Vt[Ss],Aa===1?(Kn.buffer||Te.enableVertexAttribArray(Ss),ns=Sa||2,(Kn.type!==xo||Kn.size!==ns||Kn.buffer!==ea||Kn.normalized!==Za||Kn.offset!==Wa||Kn.stride!==hn)&&(Te.bindBuffer(34962,ea.buffer),Te.vertexAttribPointer(Ss,ns,xo,Za,hn,Wa),Kn.type=xo,Kn.size=ns,Kn.buffer=ea,Kn.normalized=Za,Kn.offset=Wa,Kn.stride=hn),Kn.divisor!==Un&&(fi.vertexAttribDivisorANGLE(Ss,Un),Kn.divisor=Un)):(Kn.buffer&&(Te.disableVertexAttribArray(Ss),Kn.buffer=null),(Kn.x!==Ln||Kn.y!==wo||Kn.z!==wa||Kn.w!==$i)&&(Te.vertexAttrib4f(Ss,Ln,wo,wa,$i),Kn.x=Ln,Kn.y=wo,Kn.z=wa,Kn.w=$i)),Jo=this.sizeBuffer,Br.buffer=Jo,vo=!1,ma=1,ja=0,To=0,Ao=0,la=0,Ki=null,ho=0,Ka=!1,Ca=5126,ta=0,En=0,Mo=0,_e(Br)?(vo=!0,Ki=Je.createStream(34962,Br),Ca=Ki.dtype):(Ki=Je.getBuffer(Br),Ki?Ca=Ki.dtype:"constant"in Br?(ma=2,typeof Br.constant=="number"?(ja=Br.constant,To=Ao=la=0):(ja=Br.constant.length>0?Br.constant[0]:0,To=Br.constant.length>1?Br.constant[1]:0,Ao=Br.constant.length>2?Br.constant[2]:0,la=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?Ki=Je.createStream(34962,Br.buffer):Ki=Je.getBuffer(Br.buffer),Ca="type"in Br?zr[Br.type]:Ki.dtype,Ka=!!Br.normalized,ho=Br.size|0,ta=Br.offset|0,En=Br.stride|0,Mo=Br.divisor|0)),Ds=f.location,Ro=Vt[Ds],ma===1?(Ro.buffer||Te.enableVertexAttribArray(Ds),vs=ho||1,(Ro.type!==Ca||Ro.size!==vs||Ro.buffer!==Ki||Ro.normalized!==Ka||Ro.offset!==ta||Ro.stride!==En)&&(Te.bindBuffer(34962,Ki.buffer),Te.vertexAttribPointer(Ds,vs,Ca,Ka,En,ta),Ro.type=Ca,Ro.size=vs,Ro.buffer=Ki,Ro.normalized=Ka,Ro.offset=ta,Ro.stride=En),Ro.divisor!==Mo&&(fi.vertexAttribDivisorANGLE(Ds,Mo),Ro.divisor=Mo)):(Ro.buffer&&(Te.disableVertexAttribArray(Ds),Ro.buffer=null),(Ro.x!==ja||Ro.y!==To||Ro.z!==Ao||Ro.w!==la)&&(Te.vertexAttrib4f(Ds,ja,To,Ao,la),Ro.x=ja,Ro.y=To,Ro.z=Ao,Ro.w=la)),Ks=this.scale,as=Ks[0],Jn=Ks[1],Te.uniform2f(z.location,as,Jn),Cs=this.translate,Xa=Cs[0],Zo=Cs[1],Te.uniform2f(T.location,Xa,Zo),Eo=this.viewportArray,lo=Eo[0],$a=Eo[1],Xo=Eo[2],rs=Eo[3],Te.uniform4f(F.location,lo,$a,Xo,rs),$n=je.elements,$n?Te.bindBuffer(34963,$n.buffer.buffer):Kt.currentVAO&&($n=tt.getElements(Kt.currentVAO.elements),$n&&Te.bindBuffer(34963,$n.buffer.buffer)),Sn=je.instances,Or=0;Or0?$n?fi.drawElementsInstancedANGLE(0,Sr,$n.type,nr<<($n.type-5121>>1),Sn):fi.drawArraysInstancedANGLE(0,nr,Sr,Sn):Sn<0&&($n?Te.drawElements(0,Sr,$n.type,nr<<($n.type-5121>>1)):Te.drawArrays(0,nr,Sr)),Go.unbind())}bo&&Je.destroyStream(Nn),bs&&Je.destroyStream(on),Da&&Je.destroyStream(ea),vo&&Je.destroyStream(Ki),rt.dirty=!0,Kt.setVAO(null),nt.viewportWidth=Vi,nt.viewportHeight=zi,Mi&&(r.cpuTime+=performance.now()-sn)}}}});var fK=Se((l1r,WOe)=>{"use strict";var m7t=b9(),g7t=w9(),_7t=T9(),x7t=A9(),b7t=S9(),w7t=M9(),T7t=E9(),A7t=k9(),S7t=C9(),M7t=L9();WOe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":m7t,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:g7t,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":_7t,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:x7t,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:b7t,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":w7t,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:T7t,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:A7t,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":S7t,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":M7t}});var XOe=Se((u1r,ZOe)=>{"use strict";var jOe=uK(),E7t=fK();Object.assign(jOe.reglPrecompiled,E7t);ZOe.exports=jOe});var JOe=Se((f1r,KOe)=>{"use strict";var YOe=t9e();YOe.plot=XOe();KOe.exports=YOe});var cK=Se((c1r,tNe)=>{"use strict";var k7t=Zc(),eNe=Xf(),$Oe=Gc().axisHoverFormat,C7t=Du().hovertemplateAttrs,xk=ek(),L7t=dd().idRegex,z7t=_f().templatedArray,dS=vu().extendFlat,o1=k7t.marker,P7t=o1.line,I7t=dS(eNe("marker.line",{editTypeOverride:"calc"}),{width:dS({},P7t.width,{editType:"calc"}),editType:"calc"}),z9=dS(eNe("marker"),{symbol:o1.symbol,angle:o1.angle,size:dS({},o1.size,{editType:"markerSize"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:I7t,editType:"calc"});z9.color.editType=z9.cmin.editType=z9.cmax.editType="style";function QOe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:L7t[e],editType:"plot"}}}tNe.exports={dimensions:z7t("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:dS({},xk.text,{}),hovertext:dS({},xk.hovertext,{}),hovertemplate:C7t(),xhoverformat:$Oe("x"),yhoverformat:$Oe("y"),marker:z9,xaxes:QOe("x"),yaxes:QOe("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:xk.selected.marker,editType:"calc"},unselected:{marker:xk.unselected.marker,editType:"calc"},opacity:xk.opacity}});var P9=Se((h1r,rNe)=>{"use strict";rNe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var hK=Zr(),D7t=Jd(),iNe=cK(),R7t=ec(),F7t=$v(),q7t=P9(),B7t=FF().isOpenSymbol;nNe.exports=function(t,r,n,i){function a(d,p){return hK.coerce(t,r,iNe,d,p)}var o=D7t(t,r,{name:"dimensions",handleItemDefaults:O7t}),s=a("diagonal.visible"),u=a("showupperhalf"),l=a("showlowerhalf"),f=q7t(r,o,"values");if(!f||!s&&!u&&!l){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),F7t(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var c=B7t(r.marker.symbol),h=R7t.isBubble(r);a("marker.line.width",c||h?1:0),N7t(t,r,i,a),hK.coerceSelectionMarkerOpacity(r,a)};function O7t(e,t){function r(i,a){return hK.coerce(e,t,iNe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function N7t(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,u=t.diagonal.visible,l,f,c=new Array(a),h=new Array(a);for(l=0;lf&&o||l{"use strict";var oNe=Zr();sNe.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:[]},u=a[r.uid];return u||(u=a[i]=oNe.extendFlat({},o,s),u.draw=function(){u.matrix&&u.matrix.draw&&(u.selectBatch.length||u.unselectBatch.length?u.matrix.draw(u.unselectBatch,u.selectBatch):u.matrix.draw()),u.dirty=!1},u.destroy=function(){u.matrix&&u.matrix.destroy&&u.matrix.destroy(),u.matrixOptions=null,u.selectBatch=null,u.unselectBatch=null,u=null}),u.dirty||oNe.extendFlat(u,o),u}});var cNe=Se((v1r,fNe)=>{"use strict";var dK=Zr(),I9=$c(),U7t=q0().calcMarkerSize,V7t=q0().calcAxisExpansion,H7t=R0(),uNe=Y2().markerSelection,G7t=Y2().markerStyle,W7t=lNe(),j7t=ju().BADNUM,Z7t=ox().TOO_MANY_POINTS;fNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],u=r._visibleDims=[],l,f,c,h,d;function p(k,A){for(var L=k.makeCalcdata({v:A.values,vcalendar:r.calendar},"v"),_=0;_Z7t,y;for(b?y=a.sizeAvg||Math.max(a.size,3):y=U7t(r,i),f=0;f{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?bk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(bk.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?(bk.exports=function(){return Date.now()-r},r=Date.now()):(bk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(hNe)});var vNe=Se((y1r,F9)=>{var X7t=dNe(),s1=window,D9=["moz","webkit"],vS="AnimationFrame",yS=s1["request"+vS],wk=s1["cancel"+vS]||s1["cancelRequest"+vS];for(pS=0;!yS&&pS{yNe.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,u=t;s{"use strict";var Y7t=uY(),K7t=Zm(),J7t=W2(),gNe=vNe(),$7t=mNe(),vK=eS(),Q7t=j2();xNe.exports=px;function px(e,t){if(!(this instanceof px))return new px(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=Y7t(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=gNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,gNe(()=>{this.dirty=!1})),this)};px.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&x{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 eUt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function q9(e,t,r){let n,i,a,o,s,u,l,f,c=e[t],h=e[r];return c.length>2?(n=c[0],a=c[2],i=c[1],o=c[3]):c.length?(n=i=c[0],a=o=c[1]):(n=c.x,i=c.y,a=c.x+c.width,o=c.y+c.height),h.length>2?(s=h[0],l=h[2],u=h[1],f=h[3]):h.length?(s=u=h[0],l=f=h[1]):(s=h.x,u=h.y,l=h.x+h.width,f=h.y+h.height),[s,i,l,o]}function _Ne(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=vK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var TNe=Se((_1r,wNe)=>{"use strict";var tUt=bNe(),yK=Zr(),B9=$c(),rUt=Sy().selectMode;wNe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,T=rUt(f)||!!i.selectedpoints||z,F=!0;if(T){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,H={};for(d=0;d{"use strict";ANe.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 SNe=mK(),nUt=RF().calcHover,MNe=hu().getFromId,aUt=vu().extendFlat;function oUt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ENe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var u=(a?e.xa:e.ya)._subplotsWith,l=i.gd,f=aUt({},e),c=0;c{"use strict";var INe=Zr(),LNe=INe.pushUnique,zNe=ec(),PNe=mK();DNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,u=t.xaxis,l=t.yaxis,f=[];if(!o)return f;var c=!zNe.hasMarkers(i)&&!zNe.hasText(i);if(i.visible!==!0||c)return f;var h=PNe.getDimIndex(i,u),d=PNe.getDimIndex(i,l);if(h===!1||d===!1)return f;var p=a.xpx[h],x=a.ypx[d],b=s[h],y=s[d],E=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var A=0;A{"use strict";var FNe=Zr(),sUt=R0(),lUt=Y2().markerStyle;qNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){sUt(t,n),FNe.extendFlat(i.matrixOptions,lUt(t,n));var a=FNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var NNe=Se((A1r,ONe)=>{"use strict";var uUt=Ul(),fUt=pV();ONe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:cK(),supplyDefaults:aNe(),colorbar:ep(),calc:cNe(),plot:TNe(),hoverPoints:CNe().hoverPoints,selectPoints:RNe(),editStyle:BNe(),meta:{}};uUt.register(fUt)});var jNe=Se((S1r,WNe)=>{"use strict";var cUt=NY(),hUt=Ul(),dUt=x9(),pUt=Dd().getModuleCalcData,vx=Th(),UNe=$c().getFromId,VNe=hu().shouldShowZeroLine,HNe="splom",GNe={};function vUt(e){var t=e._fullLayout,r=hUt.getModule(HNe),n=pUt(e.calcdata,r)[0],i=dUt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],GNe);i&&(t._hasOnlyLargeSploms&&gK(e),r.plot(e,{},n))}function yUt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&gK(e);for(var n=0;n{"use strict";var xUt=b9(),bUt=w9(),wUt=T9(),TUt=E9(),AUt=k9(),SUt=A9(),MUt=S9(),EUt=M9(),kUt=C9(),CUt=L9();ZNe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":xUt,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:bUt,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":wUt,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:TUt,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:AUt,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:SUt,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:MUt,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":EUt,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":kUt,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":CUt}});var JNe=Se((E1r,KNe)=>{"use strict";var YNe=jNe(),LUt=XNe();Object.assign(YNe.reglPrecompiled,LUt);KNe.exports=YNe});var e7e=Se((k1r,QNe)=>{"use strict";var $Ne=NNe();$Ne.basePlotModule=JNe(),QNe.exports=$Ne});var bK=Se((C1r,t7e)=>{"use strict";var zUt=Xf(),_K=Rd(),xK=uc(),PUt=Ec().attributes,O9=vu().extendFlat,IUt=_f().templatedArray;t7e.exports={domain:PUt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:xK({editType:"plot"}),tickfont:xK({autoShadowDflt:!0,editType:"plot"}),rangefont:xK({editType:"plot"}),dimensions:IUt("dimension",{label:{valType:"string",editType:"plot"},tickvals:O9({},_K.tickvals,{editType:"plot"}),ticktext:O9({},_K.ticktext,{editType:"plot"}),tickformat:O9({},_K.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:O9({editType:"calc"},zUt("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 Tk=Se((L1r,r7e)=>{"use strict";r7e.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 Km=Se((z1r,n7e)=>{"use strict";var DUt=BM();function i7e(e){return[e]}n7e.exports={keyFun:function(e){return e.key},repeat:i7e,descend:DUt,wrap:i7e,unwrap:function(e){return e[0]}}});var AK=Se((P1r,v7e)=>{"use strict";var Eh=Tk(),em=Nl(),RUt=Km().keyFun,N9=Km().repeat,mS=Zr().sorterAsc,FUt=Zr().strTranslate,a7e=Eh.bar.snapRatio;function o7e(e,t){return e*(1-a7e)+t*a7e}var s7e=Eh.bar.snapClose;function qUt(e,t){return e*(1-s7e)+t*s7e}function V9(e,t,r,n){if(BUt(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 u=t[a],l=u,f=a;i*f=t[r][0]&&e<=t[r][1])return!0;return!1}function OUt(e){e.attr("x",-Eh.bar.captureWidth/2).attr("width",Eh.bar.captureWidth)}function NUt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function UUt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=l7e(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 u7e(){em.select(document.body).style("cursor",null)}function TK(e){e.attr("stroke-dasharray",UUt)}function U9(e,t){var r=em.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Eh.bar.snapDuration).each("end",t):r;TK(n)}function f7e(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,u=r.filter.getConsolidated(),l=l7e(u,s),f=NaN,c=NaN,h=NaN;for(o=0;o<=l.length;o++){var d=l[o];if(d&&d[0]<=t&&t<=d[1]){f=o;break}else if(c=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=f,isNaN(i)&&(isNaN(c)||isNaN(h)?i=isNaN(c)?h:c:i=t-l[c][1]=E[0]&&y<=E[1]){a.clickableOrdinalRange=E;break}}}return a}function HUt(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*Eh.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=f7e(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var u=o.map(t.unitToPaddedPx);s.grabPoint=r-u[0]-Eh.verticalPadding,s.barLength=u[1]-u[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(l){return l[0]!==o[0]&&l[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function c7e(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*Eh.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(mS),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),U9(e.parentNode)}function GUt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(h7e(e,t),c7e(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=em.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,u7e(),!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&&wK(r)):wK(r),i.brushCallback(t),U9(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var u=t.unitTickvals;u[u.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(l?[i.newExtent]:[]),i.extent.length||wK(r),i.brushCallback(t),l?U9(e.parentNode,s):(s(),U9(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function h7e(e,t){var r=t.height-em.mouse(e)[1]-2*Eh.verticalPadding,n=f7e(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),em.select(document.body).style("cursor",i)}function WUt(e){e.on("mousemove",function(t){em.event.preventDefault(),t.parent.inBrushDrag||h7e(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||u7e()}).call(em.behavior.drag().on("dragstart",function(t){HUt(this,t)}).on("drag",function(t){c7e(this,t)}).on("dragend",function(t){GUt(this,t)}))}function d7e(e,t){return e[0]-t[0]}function jUt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(N9);i.enter().append("rect").classed("background",!0).call(OUt).call(NUt).style("pointer-events",n?"none":"auto").attr("transform",FUt(0,Eh.verticalPadding)),i.call(WUt).attr("height",function(s){return s.height-Eh.verticalPadding});var a=e.selectAll(".highlight-shadow").data(N9);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Eh.bar.width/2).attr("stroke-width",Eh.bar.width+Eh.bar.strokeWidth).attr("stroke",t).attr("opacity",Eh.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(TK);var o=e.selectAll(".highlight").data(N9);o.enter().append("line").classed("highlight",!0).attr("x",-Eh.bar.width/2).attr("stroke-width",Eh.bar.width-Eh.bar.strokeWidth).attr("stroke",Eh.bar.fillColor).attr("opacity",Eh.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(TK)}function ZUt(e,t,r){var n=e.selectAll("."+Eh.cn.axisBrush).data(N9,RUt);n.enter().append("g").classed(Eh.cn.axisBrush,!0),jUt(n,t,r)}function XUt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function wK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function YUt(e){return function(r){var n=r.brush,i=XUt(n),a=i.slice();n.filter.set(a),e()}}function p7e(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 KUt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(mS)}).sort(d7e),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=p7e(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 JUt(e,t,r,n,i,a){var o=KUt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:YUt(i),brushEndCallback:a}}}function $Ut(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(mS)}),t.multiselect?e=p7e(e.sort(d7e)):e=[e[0]]):e=[e.sort(mS)],t.tickvals){var r=t.tickvals.slice().sort(mS);if(e=e.map(function(n){var i=[V9(0,r,n[0],[]),V9(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]}v7e.exports={makeBrush:JUt,ensureAxisBrush:ZUt,cleanRanges:$Ut}});var g7e=Se((I1r,m7e)=>{"use strict";var yx=Zr(),QUt=Dp().hasColorscale,eVt=ed(),tVt=Ec().defaults,rVt=Jd(),iVt=hu(),y7e=bK(),nVt=AK(),SK=Tk().maxDimensionCount,aVt=P9();function oVt(e,t,r,n,i){var a=i("line.color",r);if(QUt(e,"line")&&yx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),eVt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function sVt(e,t,r,n){function i(l,f){return yx.coerce(e,t,y7e.dimensions,l,f)}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},iVt.setConvert(t._ax,n.layout),i("multiselect");var u=i("constraintrange");u&&(t.constraintrange=nVt.cleanRanges(u,t))}}m7e.exports=function(t,r,n,i){function a(f,c){return yx.coerce(t,r,y7e,f,c)}var o=t.dimensions;Array.isArray(o)&&o.length>SK&&(yx.log("parcoords traces support up to "+SK+" dimensions at the moment"),o.splice(SK));var s=rVt(t,r,{name:"dimensions",layout:i,handleItemDefaults:sVt}),u=oVt(t,r,n,i,a);tVt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),aVt(r,s,"values",u);var l=yx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});yx.coerceFont(a,"labelfont",l),yx.coerceFont(a,"tickfont",l,{autoShadowDflt:!0}),yx.coerceFont(a,"rangefont",l),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var x7e=Se((D1r,_7e)=>{"use strict";var lVt=Zr().isArrayOrTypedArray,MK=fc(),uVt=Km().wrap;_7e.exports=function(t,r){var n,i;return MK.hasColorscale(r,"line")&&lVt(r.line.color)?(n=r.line.color,i=MK.extractOpts(r.line).colorscale,MK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=fVt(r._length),i=[[0,r.line.color],[1,r.line.color]]),uVt({lineColor:n,cscale:i})};function fVt(e){for(var t=new Array(e),r=0;r{"use strict";var cVt=Zr().isTypedArray;H9.convertTypedArray=function(e){return cVt(e)?Array.prototype.slice.call(e):e};H9.isOrdinal=function(e){return!!e.tickvals};H9.isVisible=function(e){return e.visible||!("visible"in e)}});var L7e=Se((F1r,C7e)=>{"use strict";var hVt=["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(` + }`}),n={};return{regl:t,draw:r,atlas:n}};Tc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=ZNt(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=$Nt(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=a7t(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=Tc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Ce,he){if(typeof Ce=="string")try{Ce=hS.parse(Ce)}catch(Ze){Ce=hS.parse(Tc.baseFontSize+"px "+Ce)}else{var te=Ce.style,ke=Ce.weight,Ee=Ce.stretch,Me=Ce.variant;Ce=hS.parse(hS.stringify(Ce)),te&&(Ce.style=te),ke&&(Ce.weight=ke),Ee&&(Ce.stretch=Ee),Me&&(Ce.variant=Me)}var Oe=hS.stringify({size:Tc.baseFontSize,family:Ce.family,stretch:_9?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style}),Re=e7t(Ce.size),me=Math.round(Re[0]*t7t(Re[1]));if(me!==r.fontSize[he]&&(i=!0,r.fontSize[he]=me),(!r.font[he]||Oe!=r.font[he].baseString)&&(n=!0,r.font[he]=Tc.fonts[Oe],!r.font[he])){var Be=Ce.family.join(", "),fe=[Ce.style];Ce.style!=Ce.variant&&fe.push(Ce.variant),Ce.variant!=Ce.weight&&fe.push(Ce.weight),_9&&Ce.weight!=Ce.stretch&&fe.push(Ce.stretch),r.font[he]={baseString:Oe,family:Be,weight:Ce.weight,stretch:Ce.stretch,style:Ce.style,variant:Ce.variant,width:{},kerning:{},metrics:n7t(Be,{origin:"top",fontSize:Tc.baseFontSize,fontStyle:fe.join(" ")})},Tc.fonts[Oe]=r.font[he]}}),(n||i)&&this.font.forEach(function(Ce,he){var te=hS.stringify({size:r.fontSize[he],family:Ce.family,stretch:_9?Ce.stretch:void 0,variant:Ce.variant,weight:Ce.weight,style:Ce.style});if(r.fontAtlas[he]=r.shader.atlas[te],!r.fontAtlas[he]){var ke=Ce.metrics;r.shader.atlas[te]=r.fontAtlas[he]={fontString:te,step:Math.ceil(r.fontSize[he]*ke.bottom*.5)*2,em:r.fontSize[he],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 l=!t.position[0].length,f=hx.mallocFloat(this.count*2),c=0,h=0;c1?r.align[he]:r.align[0]:r.align;if(typeof te=="number")return te;switch(te){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,he){var te=(r.font[he]||r.font[0]).metrics,ke=0;return ke+=te.bottom*.5,typeof Ce=="number"?ke+=Ce-te.baseline:ke+=-te[Ce],ke*=-1,ke})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=oK(t.color,"uint8");else{var H;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var j=t.color.length;H=hx.mallocUint8(j);for(var G=(t.color.subarray||t.color.slice).bind(t.color),O=0;O4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ne){var be=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(be);for(var ze=0;ze1?this.counts[ze]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ze]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ze*4,ze*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ze]:this.opacity,baseline:this.baselineOffset[ze]!=null?this.baselineOffset[ze]:this.baselineOffset[0],align:this.align?this.alignOffset[ze]!=null?this.alignOffset[ze]:this.alignOffset[0]:0,atlas:this.fontAtlas[ze]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ze*2,ze*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=[]}};Tc.prototype.destroy=function(){};Tc.prototype.kerning=!0;Tc.prototype.position={constant:new Float32Array(2)};Tc.prototype.translate=null;Tc.prototype.scale=null;Tc.prototype.font=null;Tc.prototype.text="";Tc.prototype.positionOffset=[0,0];Tc.prototype.opacity=1;Tc.prototype.color=new Uint8Array([0,0,0,255]);Tc.prototype.alignOffset=[0,0];Tc.maxAtlasSize=1024;Tc.atlasCanvas=document.createElement("canvas");Tc.atlasContext=Tc.atlasCanvas.getContext("2d",{alpha:!1});Tc.baseFontSize=64;Tc.fonts={};function s7t(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}EOe.exports=Tc});var x9=Se((Jgr,COe)=>{"use strict";var l7t=SZ(),u7t=eK();COe.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=u7t({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||l7t({container:i._glcontainer.node()}),a}});var uK=Se((lK,DOe)=>{"use strict";var LOe=uY(),zOe=NY(),f7t=xBe(),POe=kOe(),sK=Zr(),c7t=Sy().selectMode,h7t=x9(),d7t=ec(),p7t=wU(),v7t=aY().styleTextSelection,IOe={};function y7t(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,u=i.b*n,l=i.r*n,f=i.t*n,c=i.w*n,h=i.h*n;return[s+t.domain[0]*c,u+r.domain[0]*h,a-l-(1-t.domain[1])*c,o-f-(1-r.domain[1])*h]}var lK=DOe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,u,l;if(a){var f=h7t(t,["ANGLE_instanced_arrays","OES_element_index_uint"],IOe);if(!f){a.init();return}var c=a.count,h=i._glcanvas.data()[0].regl;if(p7t(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({}),a.error2d===!0&&(a.error2d=f7t(h)),a.line2d===!0&&(a.line2d=zOe(h)),a.scatter2d===!0&&(a.scatter2d=LOe(h)),a.fill2d===!0&&(a.fill2d=zOe(h)),a.glText===!0)for(a.glText=new Array(c),u=0;ua.glText.length){var d=c-a.glText.length;for(u=0;une&&(isNaN(re[be])||isNaN(re[be+1]));)be-=2;W.positions=re.slice(ne,be+2)}return W}),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=sK.repeat(null,c),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(W,re){var ne=n[re];if(!(!W||!ne||!ne[0]||!ne[0].trace)){var be=ne[0],ze=be.trace,Ce=be.t,he=a.lineOptions[re],te,ke,Ee=[];ze._ownfill&&Ee.push(re),ze._nexttrace&&Ee.push(re+1),Ee.length&&(a.fillOrder[re]=Ee);var Me=[],Oe=he&&he.positions||Ce.positions,Re,me;if(ze.fill==="tozeroy"){for(Re=0;ReRe&&isNaN(Oe[me+1]);)me-=2;Oe[Re+1]!==0&&(Me=[Oe[Re],0]),Me=Me.concat(Oe.slice(Re,me+2)),Oe[me+1]!==0&&(Me=Me.concat([Oe[me],0]))}else if(ze.fill==="tozerox"){for(Re=0;ReRe&&isNaN(Oe[me]);)me-=2;Oe[Re]!==0&&(Me=[0,Oe[Re+1]]),Me=Me.concat(Oe.slice(Re,me+2)),Oe[me]!==0&&(Me=Me.concat([0,Oe[me+1]]))}else if(ze.fill==="toself"||ze.fill==="tonext"){for(Me=[],te=0,W.splitNull=!0,ke=0;ke-1;for(u=0;u{ROe.exports=function(t,r,n){"use strict";var i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir;return i=t.gl,a=t.context,o=t.strings,s=t.next,u=t.current,l=t.draw,f=t.elements,c=t.buffer,h=t.shader,d=t.attributes,p=t.vao,x=t.uniforms,b=t.framebuffer,y=t.extensions,k=t.timer,E=t.isBufferArgs,A=s.blend_color,L=u.blend_color,_=s.blend_equation,C=u.blend_equation,M=s.blend_func,v=u.blend_func,z=s.depth_range,T=u.depth_range,F=s.colorMask,q=u.colorMask,U=s.polygonOffset_offset,H=u.polygonOffset_offset,j=s.sample_coverage,G=u.sample_coverage,O=s.stencil_func,W=u.stencil_func,re=s.stencil_opFront,ne=u.stencil_opFront,be=s.stencil_opBack,ze=u.stencil_opBack,Ce=s.scissor_box,he=u.scissor_box,te=s.viewport,ke=u.viewport,Ee={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Me={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Oe={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Re={add:32774,subtract:32778,"reverse subtract":32779},me={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Be={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},fe={cw:2304,ccw:2305},Ze=s.blend_color,et=u.blend_color,gt=s.blend_equation,Pt=u.blend_equation,Qe=s.blend_func,Xe=u.blend_func,Tt=s.depth_range,xt=u.depth_range,_t=s.colorMask,Ct=u.colorMask,jt=s.polygonOffset_offset,At=u.polygonOffset_offset,Te=s.sample_coverage,nt=u.sample_coverage,ut=s.stencil_func,ct=u.stencil_func,rt=s.stencil_opFront,je=u.stencil_opFront,tt=s.stencil_opBack,Je=u.stencil_opBack,Mt=s.scissor_box,Vt=u.scissor_box,Kt=s.viewport,ir=u.viewport,{poll:function(){var fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si;u.dirty=!1,Ot=s.dither,De=s.blend_enable,_e=s.depth_enable,Fe=s.cull_enable,Pe=s.polygonOffset_enable,Ie=s.sample_alpha,lt=s.sample_enable,ye=s.stencil_enable,ue=s.scissor_enable,de=s.depth_func,ht=u.depth_func,Et=s.depth_mask,St=u.depth_mask,Zt=s.cull_face,qr=u.cull_face,Lr=s.frontFace,vr=u.frontFace,Er=s.lineWidth,si=u.lineWidth,Ei=s.stencil_mask,Si=u.stencil_mask,fr=b.next,fr!==b.cur&&(fr?i.bindFramebuffer(36160,fr.framebuffer):i.bindFramebuffer(36160,null),b.cur=fr),Ot!==u.dither&&(Ot?i.enable(3024):i.disable(3024),u.dither=Ot),De!==u.blend_enable&&(De?i.enable(3042):i.disable(3042),u.blend_enable=De),_e!==u.depth_enable&&(_e?i.enable(2929):i.disable(2929),u.depth_enable=_e),Fe!==u.cull_enable&&(Fe?i.enable(2884):i.disable(2884),u.cull_enable=Fe),Pe!==u.polygonOffset_enable&&(Pe?i.enable(32823):i.disable(32823),u.polygonOffset_enable=Pe),Ie!==u.sample_alpha&&(Ie?i.enable(32926):i.disable(32926),u.sample_alpha=Ie),lt!==u.sample_enable&&(lt?i.enable(32928):i.disable(32928),u.sample_enable=lt),ye!==u.stencil_enable&&(ye?i.enable(2960):i.disable(2960),u.stencil_enable=ye),ue!==u.scissor_enable&&(ue?i.enable(3089):i.disable(3089),u.scissor_enable=ue),(Ze[0]!==et[0]||Ze[1]!==et[1]||Ze[2]!==et[2]||Ze[3]!==et[3])&&(i.blendColor(Ze[0],Ze[1],Ze[2],Ze[3]),et[0]=Ze[0],et[1]=Ze[1],et[2]=Ze[2],et[3]=Ze[3]),(gt[0]!==Pt[0]||gt[1]!==Pt[1])&&(i.blendEquationSeparate(gt[0],gt[1]),Pt[0]=gt[0],Pt[1]=gt[1]),(Qe[0]!==Xe[0]||Qe[1]!==Xe[1]||Qe[2]!==Xe[2]||Qe[3]!==Xe[3])&&(i.blendFuncSeparate(Qe[0],Qe[1],Qe[2],Qe[3]),Xe[0]=Qe[0],Xe[1]=Qe[1],Xe[2]=Qe[2],Xe[3]=Qe[3]),de!==ht&&(i.depthFunc(de),u.depth_func=de),(Tt[0]!==xt[0]||Tt[1]!==xt[1])&&(i.depthRange(Tt[0],Tt[1]),xt[0]=Tt[0],xt[1]=Tt[1]),Et!==St&&(i.depthMask(Et),u.depth_mask=Et),(_t[0]!==Ct[0]||_t[1]!==Ct[1]||_t[2]!==Ct[2]||_t[3]!==Ct[3])&&(i.colorMask(_t[0],_t[1],_t[2],_t[3]),Ct[0]=_t[0],Ct[1]=_t[1],Ct[2]=_t[2],Ct[3]=_t[3]),Zt!==qr&&(i.cullFace(Zt),u.cull_face=Zt),Lr!==vr&&(i.frontFace(Lr),u.frontFace=Lr),Er!==si&&(i.lineWidth(Er),u.lineWidth=Er),(jt[0]!==At[0]||jt[1]!==At[1])&&(i.polygonOffset(jt[0],jt[1]),At[0]=jt[0],At[1]=jt[1]),(Te[0]!==nt[0]||Te[1]!==nt[1])&&(i.sampleCoverage(Te[0],Te[1]),nt[0]=Te[0],nt[1]=Te[1]),Ei!==Si&&(i.stencilMask(Ei),u.stencil_mask=Ei),(ut[0]!==ct[0]||ut[1]!==ct[1]||ut[2]!==ct[2])&&(i.stencilFunc(ut[0],ut[1],ut[2]),ct[0]=ut[0],ct[1]=ut[1],ct[2]=ut[2]),(rt[0]!==je[0]||rt[1]!==je[1]||rt[2]!==je[2]||rt[3]!==je[3])&&(i.stencilOpSeparate(rt[0],rt[1],rt[2],rt[3]),je[0]=rt[0],je[1]=rt[1],je[2]=rt[2],je[3]=rt[3]),(tt[0]!==Je[0]||tt[1]!==Je[1]||tt[2]!==Je[2]||tt[3]!==Je[3])&&(i.stencilOpSeparate(tt[0],tt[1],tt[2],tt[3]),Je[0]=tt[0],Je[1]=tt[1],Je[2]=tt[2],Je[3]=tt[3]),(Mt[0]!==Vt[0]||Mt[1]!==Vt[1]||Mt[2]!==Vt[2]||Mt[3]!==Vt[3])&&(i.scissor(Mt[0],Mt[1],Mt[2],Mt[3]),Vt[0]=Mt[0],Vt[1]=Mt[1],Vt[2]=Mt[2],Vt[3]=Mt[3]),(Kt[0]!==ir[0]||Kt[1]!==ir[1]||Kt[2]!==ir[2]||Kt[3]!==ir[3])&&(i.viewport(Kt[0],Kt[1],Kt[2],Kt[3]),ir[0]=Kt[0],ir[1]=Kt[1],ir[2]=Kt[2],ir[3]=Kt[3])},refresh:function(){var fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi;u.dirty=!1,_e=s.dither,Fe=s.blend_enable,Pe=s.depth_enable,Ie=s.cull_enable,lt=s.polygonOffset_enable,ye=s.sample_alpha,ue=s.sample_enable,de=s.stencil_enable,ht=s.scissor_enable,Et=s.depth_func,St=u.depth_func,Zt=s.depth_mask,qr=u.depth_mask,Lr=s.cull_face,vr=u.cull_face,Er=s.frontFace,si=u.frontFace,Ei=s.lineWidth,Si=u.lineWidth,xi=s.stencil_mask,Hi=u.stencil_mask,fr=b.next,fr?i.bindFramebuffer(36160,fr.framebuffer):i.bindFramebuffer(36160,null),b.cur=fr,Ot=d,De=0;for(var Jr=0;Jr{FOe.exports=function(t,r,n,i,a,o,s,u){"use strict";var l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt;return l=t.gl,f=t.context,c=t.strings,h=t.next,d=t.current,p=t.draw,x=t.elements,b=t.buffer,y=t.shader,k=t.attributes,E=t.vao,A=t.uniforms,L=t.framebuffer,_=t.extensions,C=t.timer,M=t.isBufferArgs,v=h.blend_color,z=d.blend_color,T=h.blend_equation,F=d.blend_equation,q=h.blend_func,U=d.blend_func,H=h.depth_range,j=d.depth_range,G=h.colorMask,O=d.colorMask,W=h.polygonOffset_offset,re=d.polygonOffset_offset,ne=h.sample_coverage,be=d.sample_coverage,ze=h.stencil_func,Ce=d.stencil_func,he=h.stencil_opFront,te=d.stencil_opFront,ke=h.stencil_opBack,Ee=d.stencil_opBack,Me=h.scissor_box,Oe=d.scissor_box,Re=h.viewport,me=d.viewport,Be={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ze={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},et={add:32774,subtract:32778,"reverse subtract":32779},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Qe={cw:2304,ccw:2305},Xe={},Tt={},{draw:function(xt){var _t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De;if(_t=_.angle_instanced_arrays,Ct=xt.framebuffer,jt=L.getFramebuffer(Ct),At=L.next,L.next=jt,Te=f.framebufferWidth,f.framebufferWidth=jt?jt.width:f.drawingBufferWidth,nt=f.framebufferHeight,f.framebufferHeight=jt?jt.height:f.drawingBufferHeight,jt!==L.cur&&(jt?l.bindFramebuffer(36160,jt.framebuffer):l.bindFramebuffer(36160,null),L.cur=jt),d.dirty){var _e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi;_e=h.dither,_e!==d.dither&&(_e?l.enable(3024):l.disable(3024),d.dither=_e),Fe=h.blend_enable,Fe!==d.blend_enable&&(Fe?l.enable(3042):l.disable(3042),d.blend_enable=Fe),Pe=v[0],Ie=v[1],lt=v[2],ye=v[3],(Pe!==z[0]||Ie!==z[1]||lt!==z[2]||ye!==z[3])&&(l.blendColor(Pe,Ie,lt,ye),z[0]=Pe,z[1]=Ie,z[2]=lt,z[3]=ye),ue=T[0],de=T[1],(ue!==F[0]||de!==F[1])&&(l.blendEquationSeparate(ue,de),F[0]=ue,F[1]=de),ht=q[0],Et=q[1],St=q[2],Zt=q[3],(ht!==U[0]||Et!==U[1]||St!==U[2]||Zt!==U[3])&&(l.blendFuncSeparate(ht,Et,St,Zt),U[0]=ht,U[1]=Et,U[2]=St,U[3]=Zt),qr=h.depth_enable,qr!==d.depth_enable&&(qr?l.enable(2929):l.disable(2929),d.depth_enable=qr),Lr=h.depth_func,Lr!==d.depth_func&&(l.depthFunc(Lr),d.depth_func=Lr),vr=H[0],Er=H[1],(vr!==j[0]||Er!==j[1])&&(l.depthRange(vr,Er),j[0]=vr,j[1]=Er),si=h.depth_mask,si!==d.depth_mask&&(l.depthMask(si),d.depth_mask=si),Ei=G[0],Si=G[1],xi=G[2],Hi=G[3],(Ei!==O[0]||Si!==O[1]||xi!==O[2]||Hi!==O[3])&&(l.colorMask(Ei,Si,xi,Hi),O[0]=Ei,O[1]=Si,O[2]=xi,O[3]=Hi),Jr=h.cull_enable,Jr!==d.cull_enable&&(Jr?l.enable(2884):l.disable(2884),d.cull_enable=Jr),ci=h.cull_face,ci!==d.cull_face&&(l.cullFace(ci),d.cull_face=ci),Di=h.frontFace,Di!==d.frontFace&&(l.frontFace(Di),d.frontFace=Di),Lt=h.lineWidth,Lt!==d.lineWidth&&(l.lineWidth(Lt),d.lineWidth=Lt),vt=h.polygonOffset_enable,vt!==d.polygonOffset_enable&&(vt?l.enable(32823):l.disable(32823),d.polygonOffset_enable=vt),Dt=W[0],Bt=W[1],(Dt!==re[0]||Bt!==re[1])&&(l.polygonOffset(Dt,Bt),re[0]=Dt,re[1]=Bt),sr=h.sample_alpha,sr!==d.sample_alpha&&(sr?l.enable(32926):l.disable(32926),d.sample_alpha=sr),br=h.sample_enable,br!==d.sample_enable&&(br?l.enable(32928):l.disable(32928),d.sample_enable=br),zr=ne[0],Tr=ne[1],(zr!==be[0]||Tr!==be[1])&&(l.sampleCoverage(zr,Tr),be[0]=zr,be[1]=Tr),Rr=h.stencil_enable,Rr!==d.stencil_enable&&(Rr?l.enable(2960):l.disable(2960),d.stencil_enable=Rr),Br=h.stencil_mask,Br!==d.stencil_mask&&(l.stencilMask(Br),d.stencil_mask=Br),oi=ze[0],vi=ze[1],Pi=ze[2],(oi!==Ce[0]||vi!==Ce[1]||Pi!==Ce[2])&&(l.stencilFunc(oi,vi,Pi),Ce[0]=oi,Ce[1]=vi,Ce[2]=Pi),Yr=he[0],Ni=he[1],Ur=he[2],ti=he[3],(Yr!==te[0]||Ni!==te[1]||Ur!==te[2]||ti!==te[3])&&(l.stencilOpSeparate(Yr,Ni,Ur,ti),te[0]=Yr,te[1]=Ni,te[2]=Ur,te[3]=ti),ki=ke[0],ji=ke[1],Vi=ke[2],zi=ke[3],(ki!==Ee[0]||ji!==Ee[1]||Vi!==Ee[2]||zi!==Ee[3])&&(l.stencilOpSeparate(ki,ji,Vi,zi),Ee[0]=ki,Ee[1]=ji,Ee[2]=Vi,Ee[3]=zi),Mi=h.scissor_enable,Mi!==d.scissor_enable&&(Mi?l.enable(3089):l.disable(3089),d.scissor_enable=Mi)}ut=f.framebufferWidth,ct=f.framebufferHeight,rt=f.viewportWidth,f.viewportWidth=ut,je=f.viewportHeight,f.viewportHeight=ct,l.viewport(0,0,ut,ct),me[0]=0,me[1]=0,me[2]=ut,me[3]=ct,tt=f.framebufferWidth,Je=f.framebufferHeight,l.scissor(0,0,tt,Je),Oe[0]=0,Oe[1]=0,Oe[2]=tt,Oe[3]=Je,Mt=d.profile,Mt&&(Vt=performance.now(),r.count++),Kt=y.frag,ir=y.vert,fr=y.program(ir,Kt),l.useProgram(fr.program),E.setVAO(null),Ot=fr.id,De=Xe[Ot],De?De.call(this,xt):(De=Xe[Ot]=n(fr),De.call(this,xt)),d.dirty=!0,E.setVAO(null),L.next=At,f.framebufferWidth=Te,f.framebufferHeight=nt,f.viewportWidth=rt,f.viewportHeight=je,Mt&&(r.cpuTime+=performance.now()-Vt)},scope:function(xt,_t,Ct){var jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie;jt=xt.framebuffer,At=L.getFramebuffer(jt),Te=L.next,L.next=At,nt=f.framebufferWidth,f.framebufferWidth=At?At.width:f.drawingBufferWidth,ut=f.framebufferHeight,f.framebufferHeight=At?At.height:f.drawingBufferHeight,ct=f.framebufferWidth,rt=f.framebufferHeight,je=f.viewportWidth,f.viewportWidth=ct,tt=f.viewportHeight,f.viewportHeight=rt,Je=Re[0],Re[0]=i,Mt=Re[1],Re[1]=a,Vt=Re[2],Re[2]=ct,Kt=Re[3],Re[3]=rt,ir=f.framebufferWidth,fr=f.framebufferHeight,Ot=Me[0],Me[0]=o,De=Me[1],Me[1]=s,_e=Me[2],Me[2]=ir,Fe=Me[3],Me[3]=fr,Pe=d.profile,Pe&&(Ie=performance.now(),r.count++),d.dirty=!0,_t(f,xt,Ct),L.next=Te,f.framebufferWidth=nt,f.framebufferHeight=ut,f.viewportWidth=je,f.viewportHeight=tt,Re[0]=Je,Re[1]=Mt,Re[2]=Vt,Re[3]=Kt,Me[0]=Ot,Me[1]=De,Me[2]=_e,Me[3]=Fe,Pe&&(r.cpuTime+=performance.now()-Ie),d.dirty=!0},batch:function(xt,_t){var Ct,jt,At,Te,nt,ut,ct,rt;if(Ct=_.angle_instanced_arrays,d.dirty){var je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi;je=h.dither,je!==d.dither&&(je?l.enable(3024):l.disable(3024),d.dither=je),tt=h.blend_enable,tt!==d.blend_enable&&(tt?l.enable(3042):l.disable(3042),d.blend_enable=tt),Je=v[0],Mt=v[1],Vt=v[2],Kt=v[3],(Je!==z[0]||Mt!==z[1]||Vt!==z[2]||Kt!==z[3])&&(l.blendColor(Je,Mt,Vt,Kt),z[0]=Je,z[1]=Mt,z[2]=Vt,z[3]=Kt),ir=T[0],fr=T[1],(ir!==F[0]||fr!==F[1])&&(l.blendEquationSeparate(ir,fr),F[0]=ir,F[1]=fr),Ot=q[0],De=q[1],_e=q[2],Fe=q[3],(Ot!==U[0]||De!==U[1]||_e!==U[2]||Fe!==U[3])&&(l.blendFuncSeparate(Ot,De,_e,Fe),U[0]=Ot,U[1]=De,U[2]=_e,U[3]=Fe),Pe=h.depth_enable,Pe!==d.depth_enable&&(Pe?l.enable(2929):l.disable(2929),d.depth_enable=Pe),Ie=h.depth_func,Ie!==d.depth_func&&(l.depthFunc(Ie),d.depth_func=Ie),lt=H[0],ye=H[1],(lt!==j[0]||ye!==j[1])&&(l.depthRange(lt,ye),j[0]=lt,j[1]=ye),ue=h.depth_mask,ue!==d.depth_mask&&(l.depthMask(ue),d.depth_mask=ue),de=G[0],ht=G[1],Et=G[2],St=G[3],(de!==O[0]||ht!==O[1]||Et!==O[2]||St!==O[3])&&(l.colorMask(de,ht,Et,St),O[0]=de,O[1]=ht,O[2]=Et,O[3]=St),Zt=h.cull_enable,Zt!==d.cull_enable&&(Zt?l.enable(2884):l.disable(2884),d.cull_enable=Zt),qr=h.cull_face,qr!==d.cull_face&&(l.cullFace(qr),d.cull_face=qr),Lr=h.frontFace,Lr!==d.frontFace&&(l.frontFace(Lr),d.frontFace=Lr),vr=h.lineWidth,vr!==d.lineWidth&&(l.lineWidth(vr),d.lineWidth=vr),Er=h.polygonOffset_enable,Er!==d.polygonOffset_enable&&(Er?l.enable(32823):l.disable(32823),d.polygonOffset_enable=Er),si=W[0],Ei=W[1],(si!==re[0]||Ei!==re[1])&&(l.polygonOffset(si,Ei),re[0]=si,re[1]=Ei),Si=h.sample_alpha,Si!==d.sample_alpha&&(Si?l.enable(32926):l.disable(32926),d.sample_alpha=Si),xi=h.sample_enable,xi!==d.sample_enable&&(xi?l.enable(32928):l.disable(32928),d.sample_enable=xi),Hi=ne[0],Jr=ne[1],(Hi!==be[0]||Jr!==be[1])&&(l.sampleCoverage(Hi,Jr),be[0]=Hi,be[1]=Jr),ci=h.stencil_enable,ci!==d.stencil_enable&&(ci?l.enable(2960):l.disable(2960),d.stencil_enable=ci),Di=h.stencil_mask,Di!==d.stencil_mask&&(l.stencilMask(Di),d.stencil_mask=Di),Lt=ze[0],vt=ze[1],Dt=ze[2],(Lt!==Ce[0]||vt!==Ce[1]||Dt!==Ce[2])&&(l.stencilFunc(Lt,vt,Dt),Ce[0]=Lt,Ce[1]=vt,Ce[2]=Dt),Bt=he[0],sr=he[1],br=he[2],zr=he[3],(Bt!==te[0]||sr!==te[1]||br!==te[2]||zr!==te[3])&&(l.stencilOpSeparate(Bt,sr,br,zr),te[0]=Bt,te[1]=sr,te[2]=br,te[3]=zr),Tr=ke[0],Rr=ke[1],Br=ke[2],oi=ke[3],(Tr!==Ee[0]||Rr!==Ee[1]||Br!==Ee[2]||oi!==Ee[3])&&(l.stencilOpSeparate(Tr,Rr,Br,oi),Ee[0]=Tr,Ee[1]=Rr,Ee[2]=Br,Ee[3]=oi),vi=h.scissor_enable,vi!==d.scissor_enable&&(vi?l.enable(3089):l.disable(3089),d.scissor_enable=vi)}jt=d.profile,jt&&(At=performance.now(),r.count+=_t),Te=y.frag,nt=y.vert,ut=y.program(nt,Te),l.useProgram(ut.program),E.setVAO(null),ct=ut.id,rt=Tt[ct],rt?rt.call(this,xt,_t):(rt=Tt[ct]=u(ut),rt.call(this,xt,_t)),d.dirty=!0,E.setVAO(null),jt&&(r.cpuTime+=performance.now()-At)}}}});var T9=Se((e1r,qOe)=>{qOe.exports=function(t,r,n,i){"use strict";var a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt;return a=t.gl,o=t.context,s=t.strings,u=t.next,l=t.current,f=t.draw,c=t.elements,h=t.buffer,d=t.shader,p=t.attributes,x=t.vao,b=t.uniforms,y=t.framebuffer,k=t.extensions,E=t.timer,A=t.isBufferArgs,L=u.blend_color,_=l.blend_color,C=u.blend_equation,M=l.blend_equation,v=u.blend_func,z=l.blend_func,T=u.depth_range,F=l.depth_range,q=u.colorMask,U=l.colorMask,H=u.polygonOffset_offset,j=l.polygonOffset_offset,G=u.sample_coverage,O=l.sample_coverage,W=u.stencil_func,re=l.stencil_func,ne=u.stencil_opFront,be=l.stencil_opFront,ze=u.stencil_opBack,Ce=l.stencil_opBack,he=u.scissor_box,te=l.scissor_box,ke=u.viewport,Ee=l.viewport,Me={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Oe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Re={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},me={add:32774,subtract:32778,"reverse subtract":32779},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ze={cw:2304,ccw:2305},et={},gt={},{draw:function(Pt){var Qe,Xe,Tt,xt,_t,Ct,jt,At,Te;if(Qe=k.angle_instanced_arrays,Xe=y.next,Xe!==y.cur&&(Xe?a.bindFramebuffer(36160,Xe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Xe),l.dirty){var nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur;nt=u.dither,nt!==l.dither&&(nt?a.enable(3024):a.disable(3024),l.dither=nt),ut=u.blend_enable,ut!==l.blend_enable&&(ut?a.enable(3042):a.disable(3042),l.blend_enable=ut),ct=L[0],rt=L[1],je=L[2],tt=L[3],(ct!==_[0]||rt!==_[1]||je!==_[2]||tt!==_[3])&&(a.blendColor(ct,rt,je,tt),_[0]=ct,_[1]=rt,_[2]=je,_[3]=tt),Je=C[0],Mt=C[1],(Je!==M[0]||Mt!==M[1])&&(a.blendEquationSeparate(Je,Mt),M[0]=Je,M[1]=Mt),Vt=v[0],Kt=v[1],ir=v[2],fr=v[3],(Vt!==z[0]||Kt!==z[1]||ir!==z[2]||fr!==z[3])&&(a.blendFuncSeparate(Vt,Kt,ir,fr),z[0]=Vt,z[1]=Kt,z[2]=ir,z[3]=fr),Ot=u.depth_enable,Ot!==l.depth_enable&&(Ot?a.enable(2929):a.disable(2929),l.depth_enable=Ot),De=u.depth_func,De!==l.depth_func&&(a.depthFunc(De),l.depth_func=De),_e=T[0],Fe=T[1],(_e!==F[0]||Fe!==F[1])&&(a.depthRange(_e,Fe),F[0]=_e,F[1]=Fe),Pe=u.depth_mask,Pe!==l.depth_mask&&(a.depthMask(Pe),l.depth_mask=Pe),Ie=q[0],lt=q[1],ye=q[2],ue=q[3],(Ie!==U[0]||lt!==U[1]||ye!==U[2]||ue!==U[3])&&(a.colorMask(Ie,lt,ye,ue),U[0]=Ie,U[1]=lt,U[2]=ye,U[3]=ue),de=u.cull_enable,de!==l.cull_enable&&(de?a.enable(2884):a.disable(2884),l.cull_enable=de),ht=u.cull_face,ht!==l.cull_face&&(a.cullFace(ht),l.cull_face=ht),Et=u.frontFace,Et!==l.frontFace&&(a.frontFace(Et),l.frontFace=Et),St=u.lineWidth,St!==l.lineWidth&&(a.lineWidth(St),l.lineWidth=St),Zt=u.polygonOffset_enable,Zt!==l.polygonOffset_enable&&(Zt?a.enable(32823):a.disable(32823),l.polygonOffset_enable=Zt),qr=H[0],Lr=H[1],(qr!==j[0]||Lr!==j[1])&&(a.polygonOffset(qr,Lr),j[0]=qr,j[1]=Lr),vr=u.sample_alpha,vr!==l.sample_alpha&&(vr?a.enable(32926):a.disable(32926),l.sample_alpha=vr),Er=u.sample_enable,Er!==l.sample_enable&&(Er?a.enable(32928):a.disable(32928),l.sample_enable=Er),si=G[0],Ei=G[1],(si!==O[0]||Ei!==O[1])&&(a.sampleCoverage(si,Ei),O[0]=si,O[1]=Ei),Si=u.stencil_enable,Si!==l.stencil_enable&&(Si?a.enable(2960):a.disable(2960),l.stencil_enable=Si),xi=u.stencil_mask,xi!==l.stencil_mask&&(a.stencilMask(xi),l.stencil_mask=xi),Hi=W[0],Jr=W[1],ci=W[2],(Hi!==re[0]||Jr!==re[1]||ci!==re[2])&&(a.stencilFunc(Hi,Jr,ci),re[0]=Hi,re[1]=Jr,re[2]=ci),Di=ne[0],Lt=ne[1],vt=ne[2],Dt=ne[3],(Di!==be[0]||Lt!==be[1]||vt!==be[2]||Dt!==be[3])&&(a.stencilOpSeparate(Di,Lt,vt,Dt),be[0]=Di,be[1]=Lt,be[2]=vt,be[3]=Dt),Bt=ze[0],sr=ze[1],br=ze[2],zr=ze[3],(Bt!==Ce[0]||sr!==Ce[1]||br!==Ce[2]||zr!==Ce[3])&&(a.stencilOpSeparate(Bt,sr,br,zr),Ce[0]=Bt,Ce[1]=sr,Ce[2]=br,Ce[3]=zr),Tr=u.scissor_enable,Tr!==l.scissor_enable&&(Tr?a.enable(3089):a.disable(3089),l.scissor_enable=Tr),Rr=he[0],Br=he[1],oi=he[2],vi=he[3],(Rr!==te[0]||Br!==te[1]||oi!==te[2]||vi!==te[3])&&(a.scissor(Rr,Br,oi,vi),te[0]=Rr,te[1]=Br,te[2]=oi,te[3]=vi),Pi=ke[0],Yr=ke[1],Ni=ke[2],Ur=ke[3],(Pi!==Ee[0]||Yr!==Ee[1]||Ni!==Ee[2]||Ur!==Ee[3])&&(a.viewport(Pi,Yr,Ni,Ur),Ee[0]=Pi,Ee[1]=Yr,Ee[2]=Ni,Ee[3]=Ur),l.dirty=!1}Tt=l.profile,Tt&&(xt=performance.now(),r.count++),_t=d.frag,Ct=d.vert,jt=d.program(Ct,_t),a.useProgram(jt.program),x.setVAO(null),At=jt.id,Te=et[At],Te?Te.call(this,Pt):(Te=et[At]=n(jt),Te.call(this,Pt)),x.setVAO(null),Tt&&(r.cpuTime+=performance.now()-xt)},scope:function(Pt,Qe,Xe){var Tt,xt;Tt=l.profile,Tt&&(xt=performance.now(),r.count++),Qe(o,Pt,Xe),Tt&&(r.cpuTime+=performance.now()-xt)},batch:function(Pt,Qe){var Xe,Tt,xt,_t,Ct,jt,At,Te,nt;if(Xe=k.angle_instanced_arrays,Tt=y.next,Tt!==y.cur&&(Tt?a.bindFramebuffer(36160,Tt.framebuffer):a.bindFramebuffer(36160,null),y.cur=Tt),l.dirty){var ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti;ut=u.dither,ut!==l.dither&&(ut?a.enable(3024):a.disable(3024),l.dither=ut),ct=u.blend_enable,ct!==l.blend_enable&&(ct?a.enable(3042):a.disable(3042),l.blend_enable=ct),rt=L[0],je=L[1],tt=L[2],Je=L[3],(rt!==_[0]||je!==_[1]||tt!==_[2]||Je!==_[3])&&(a.blendColor(rt,je,tt,Je),_[0]=rt,_[1]=je,_[2]=tt,_[3]=Je),Mt=C[0],Vt=C[1],(Mt!==M[0]||Vt!==M[1])&&(a.blendEquationSeparate(Mt,Vt),M[0]=Mt,M[1]=Vt),Kt=v[0],ir=v[1],fr=v[2],Ot=v[3],(Kt!==z[0]||ir!==z[1]||fr!==z[2]||Ot!==z[3])&&(a.blendFuncSeparate(Kt,ir,fr,Ot),z[0]=Kt,z[1]=ir,z[2]=fr,z[3]=Ot),De=u.depth_enable,De!==l.depth_enable&&(De?a.enable(2929):a.disable(2929),l.depth_enable=De),_e=u.depth_func,_e!==l.depth_func&&(a.depthFunc(_e),l.depth_func=_e),Fe=T[0],Pe=T[1],(Fe!==F[0]||Pe!==F[1])&&(a.depthRange(Fe,Pe),F[0]=Fe,F[1]=Pe),Ie=u.depth_mask,Ie!==l.depth_mask&&(a.depthMask(Ie),l.depth_mask=Ie),lt=q[0],ye=q[1],ue=q[2],de=q[3],(lt!==U[0]||ye!==U[1]||ue!==U[2]||de!==U[3])&&(a.colorMask(lt,ye,ue,de),U[0]=lt,U[1]=ye,U[2]=ue,U[3]=de),ht=u.cull_enable,ht!==l.cull_enable&&(ht?a.enable(2884):a.disable(2884),l.cull_enable=ht),Et=u.cull_face,Et!==l.cull_face&&(a.cullFace(Et),l.cull_face=Et),St=u.frontFace,St!==l.frontFace&&(a.frontFace(St),l.frontFace=St),Zt=u.lineWidth,Zt!==l.lineWidth&&(a.lineWidth(Zt),l.lineWidth=Zt),qr=u.polygonOffset_enable,qr!==l.polygonOffset_enable&&(qr?a.enable(32823):a.disable(32823),l.polygonOffset_enable=qr),Lr=H[0],vr=H[1],(Lr!==j[0]||vr!==j[1])&&(a.polygonOffset(Lr,vr),j[0]=Lr,j[1]=vr),Er=u.sample_alpha,Er!==l.sample_alpha&&(Er?a.enable(32926):a.disable(32926),l.sample_alpha=Er),si=u.sample_enable,si!==l.sample_enable&&(si?a.enable(32928):a.disable(32928),l.sample_enable=si),Ei=G[0],Si=G[1],(Ei!==O[0]||Si!==O[1])&&(a.sampleCoverage(Ei,Si),O[0]=Ei,O[1]=Si),xi=u.stencil_enable,xi!==l.stencil_enable&&(xi?a.enable(2960):a.disable(2960),l.stencil_enable=xi),Hi=u.stencil_mask,Hi!==l.stencil_mask&&(a.stencilMask(Hi),l.stencil_mask=Hi),Jr=W[0],ci=W[1],Di=W[2],(Jr!==re[0]||ci!==re[1]||Di!==re[2])&&(a.stencilFunc(Jr,ci,Di),re[0]=Jr,re[1]=ci,re[2]=Di),Lt=ne[0],vt=ne[1],Dt=ne[2],Bt=ne[3],(Lt!==be[0]||vt!==be[1]||Dt!==be[2]||Bt!==be[3])&&(a.stencilOpSeparate(Lt,vt,Dt,Bt),be[0]=Lt,be[1]=vt,be[2]=Dt,be[3]=Bt),sr=ze[0],br=ze[1],zr=ze[2],Tr=ze[3],(sr!==Ce[0]||br!==Ce[1]||zr!==Ce[2]||Tr!==Ce[3])&&(a.stencilOpSeparate(sr,br,zr,Tr),Ce[0]=sr,Ce[1]=br,Ce[2]=zr,Ce[3]=Tr),Rr=u.scissor_enable,Rr!==l.scissor_enable&&(Rr?a.enable(3089):a.disable(3089),l.scissor_enable=Rr),Br=he[0],oi=he[1],vi=he[2],Pi=he[3],(Br!==te[0]||oi!==te[1]||vi!==te[2]||Pi!==te[3])&&(a.scissor(Br,oi,vi,Pi),te[0]=Br,te[1]=oi,te[2]=vi,te[3]=Pi),Yr=ke[0],Ni=ke[1],Ur=ke[2],ti=ke[3],(Yr!==Ee[0]||Ni!==Ee[1]||Ur!==Ee[2]||ti!==Ee[3])&&(a.viewport(Yr,Ni,Ur,ti),Ee[0]=Yr,Ee[1]=Ni,Ee[2]=Ur,Ee[3]=ti),l.dirty=!1}xt=l.profile,xt&&(_t=performance.now(),r.count+=Qe),Ct=d.frag,jt=d.vert,At=d.program(jt,Ct),a.useProgram(At.program),x.setVAO(null),Te=At.id,nt=gt[Te],nt?nt.call(this,Pt,Qe):(nt=gt[Te]=i(At),nt.call(this,Pt,Qe)),x.setVAO(null),xt&&(r.cpuTime+=performance.now()-_t)}}}});var A9=Se((t1r,BOe)=>{BOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt){"use strict";var Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi;return Je=t.gl,Mt=t.context,Vt=t.strings,Kt=t.next,ir=t.current,fr=t.draw,Ot=t.elements,De=t.buffer,_e=t.shader,Fe=t.attributes,Pe=t.vao,Ie=t.uniforms,lt=t.framebuffer,ye=t.extensions,ue=t.timer,de=t.isBufferArgs,ht=Kt.blend_color,Et=ir.blend_color,St=Kt.blend_equation,Zt=ir.blend_equation,qr=Kt.blend_func,Lr=ir.blend_func,vr=Kt.depth_range,Er=ir.depth_range,si=Kt.colorMask,Ei=ir.colorMask,Si=Kt.polygonOffset_offset,xi=ir.polygonOffset_offset,Hi=Kt.sample_coverage,Jr=ir.sample_coverage,ci=Kt.stencil_func,Di=ir.stencil_func,Lt=Kt.stencil_opFront,vt=ir.stencil_opFront,Dt=Kt.stencil_opBack,Bt=ir.stencil_opBack,sr=Kt.scissor_box,br=ir.scissor_box,zr=Kt.viewport,Tr=ir.viewport,Rr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Br={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oi={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},vi={add:32774,subtract:32778,"reverse subtract":32779},Pi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Yr={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ni={cw:2304,ccw:2305},Ur={},Ur.stride=8,Ur.offset=8,Ur.divisor=1,ti={},ti.stride=8,ti.offset=16,ti.divisor=1,ki={},ki.stride=8,ki.offset=8,ki.divisor=1,ji={},ji.stride=8,ji.offset=16,ji.divisor=1,Vi={},Vi.stride=4,Vi.offset=0,Vi.divisor=1,{draw:function(zi){var Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn;if(Mi=ye.angle_instanced_arrays,sn=lt.next,sn!==lt.cur&&(sn?Je.bindFramebuffer(36160,sn.framebuffer):Je.bindFramebuffer(36160,null),lt.cur=sn),ir.dirty){var zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li;zo=Kt.dither,zo!==ir.dither&&(zo?Je.enable(3024):Je.disable(3024),ir.dither=zo),rl=Kt.depth_func,rl!==ir.depth_func&&(Je.depthFunc(rl),ir.depth_func=rl),$o=vr[0],Na=vr[1],($o!==Er[0]||Na!==Er[1])&&(Je.depthRange($o,Na),Er[0]=$o,Er[1]=Na),Ua=Kt.depth_mask,Ua!==ir.depth_mask&&(Je.depthMask(Ua),ir.depth_mask=Ua),Po=si[0],fo=si[1],ro=si[2],Ma=si[3],(Po!==Ei[0]||fo!==Ei[1]||ro!==Ei[2]||Ma!==Ei[3])&&(Je.colorMask(Po,fo,ro,Ma),Ei[0]=Po,Ei[1]=fo,Ei[2]=ro,Ei[3]=Ma),io=Kt.cull_enable,io!==ir.cull_enable&&(io?Je.enable(2884):Je.disable(2884),ir.cull_enable=io),aa=Kt.cull_face,aa!==ir.cull_face&&(Je.cullFace(aa),ir.cull_face=aa),Oo=Kt.frontFace,Oo!==ir.frontFace&&(Je.frontFace(Oo),ir.frontFace=Oo),No=Kt.lineWidth,No!==ir.lineWidth&&(Je.lineWidth(No),ir.lineWidth=No),Zs=Kt.polygonOffset_enable,Zs!==ir.polygonOffset_enable&&(Zs?Je.enable(32823):Je.disable(32823),ir.polygonOffset_enable=Zs),Fs=Si[0],ws=Si[1],(Fs!==xi[0]||ws!==xi[1])&&(Je.polygonOffset(Fs,ws),xi[0]=Fs,xi[1]=ws),no=Kt.sample_alpha,no!==ir.sample_alpha&&(no?Je.enable(32926):Je.disable(32926),ir.sample_alpha=no),Ls=Kt.sample_enable,Ls!==ir.sample_enable&&(Ls?Je.enable(32928):Je.disable(32928),ir.sample_enable=Ls),ds=Hi[0],Xs=Hi[1],(ds!==Jr[0]||Xs!==Jr[1])&&(Je.sampleCoverage(ds,Xs),Jr[0]=ds,Jr[1]=Xs),oa=Kt.stencil_mask,oa!==ir.stencil_mask&&(Je.stencilMask(oa),ir.stencil_mask=oa),Yo=ci[0],po=ci[1],ss=ci[2],(Yo!==Di[0]||po!==Di[1]||ss!==Di[2])&&(Je.stencilFunc(Yo,po,ss),Di[0]=Yo,Di[1]=po,Di[2]=ss),ls=Lt[0],gs=Lt[1],bt=Lt[2],Ft=Lt[3],(ls!==vt[0]||gs!==vt[1]||bt!==vt[2]||Ft!==vt[3])&&(Je.stencilOpSeparate(ls,gs,bt,Ft),vt[0]=ls,vt[1]=gs,vt[2]=bt,vt[3]=Ft),hr=Dt[0],nr=Dt[1],Sr=Dt[2],li=Dt[3],(hr!==Bt[0]||nr!==Bt[1]||Sr!==Bt[2]||li!==Bt[3])&&(Je.stencilOpSeparate(hr,nr,Sr,li),Bt[0]=hr,Bt[1]=nr,Bt[2]=Sr,Bt[3]=li)}fi=zi.viewport,Or=fi.x|0,st=fi.y|0,Wt="width"in fi?fi.width|0:Mt.framebufferWidth-Or,tr="height"in fi?fi.height|0:Mt.framebufferHeight-st,or=Mt.viewportWidth,Mt.viewportWidth=Wt,Nr=Mt.viewportHeight,Mt.viewportHeight=tr,Je.viewport(Or,st,Wt,tr),Tr[0]=Or,Tr[1]=st,Tr[2]=Wt,Tr[3]=tr,Je.blendColor(0,0,0,0),Et[0]=0,Et[1]=0,Et[2]=0,Et[3]=0,n?Je.enable(3042):Je.disable(3042),ir.blend_enable=n,Je.blendEquationSeparate(32774,32774),Zt[0]=32774,Zt[1]=32774,Je.blendFuncSeparate(770,771,773,1),Lr[0]=770,Lr[1]=771,Lr[2]=773,Lr[3]=1,hi=i.call(this,Mt,zi,0),hi?Je.enable(2929):Je.disable(2929),ir.depth_enable=hi,Gi=zi.viewport,Qr=Gi.x|0,Ui=Gi.y|0,zn="width"in Gi?Gi.width|0:Mt.framebufferWidth-Qr,fn="height"in Gi?Gi.height|0:Mt.framebufferHeight-Ui,Je.scissor(Qr,Ui,zn,fn),br[0]=Qr,br[1]=Ui,br[2]=zn,br[3]=fn,a?Je.enable(3089):Je.disable(3089),ir.scissor_enable=a,o?Je.enable(2960):Je.disable(2960),ir.stencil_enable=o,xn=ir.profile,xn&&(_a=performance.now(),r.count++),Je.useProgram(s.program),Wn=ye.angle_instanced_arrays,Pe.setVAO(null),Fn=zi.positionBuffer,Ur.buffer=Fn,ia=!1,za=1,Hr=0,na=0,go=0,Dn=0,un=null,Zn=0,Wo=!1,Ba=5126,Bo=0,Ea=0,Ha=0,de(Ur)?(ia=!0,un=De.createStream(34962,Ur),Ba=un.dtype):(un=De.getBuffer(Ur),un?Ba=un.dtype:"constant"in Ur?(za=2,typeof Ur.constant=="number"?(Hr=Ur.constant,na=go=Dn=0):(Hr=Ur.constant.length>0?Ur.constant[0]:0,na=Ur.constant.length>1?Ur.constant[1]:0,go=Ur.constant.length>2?Ur.constant[2]:0,Dn=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?un=De.createStream(34962,Ur.buffer):un=De.getBuffer(Ur.buffer),Ba="type"in Ur?Yr[Ur.type]:un.dtype,Wo=!!Ur.normalized,Zn=Ur.size|0,Bo=Ur.offset|0,Ea=Ur.stride|0,Ha=Ur.divisor|0)),tn=u.location,Cn=Fe[tn],za===1?(Cn.buffer||Je.enableVertexAttribArray(tn),Xn=Zn||2,(Cn.type!==Ba||Cn.size!==Xn||Cn.buffer!==un||Cn.normalized!==Wo||Cn.offset!==Bo||Cn.stride!==Ea)&&(Je.bindBuffer(34962,un.buffer),Je.vertexAttribPointer(tn,Xn,Ba,Wo,Ea,Bo),Cn.type=Ba,Cn.size=Xn,Cn.buffer=un,Cn.normalized=Wo,Cn.offset=Bo,Cn.stride=Ea),Cn.divisor!==Ha&&(Wn.vertexAttribDivisorANGLE(tn,Ha),Cn.divisor=Ha)):(Cn.buffer&&(Je.disableVertexAttribArray(tn),Cn.buffer=null),(Cn.x!==Hr||Cn.y!==na||Cn.z!==go||Cn.w!==Dn)&&(Je.vertexAttrib4f(tn,Hr,na,go,Dn),Cn.x=Hr,Cn.y=na,Cn.z=go,Cn.w=Dn)),ts=zi.positionFractBuffer,ki.buffer=ts,Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,de(ki)?(Ja=!0,ln=De.createStream(34962,ki),bo=ln.dtype):(ln=De.getBuffer(ki),ln?bo=ln.dtype:"constant"in ki?(to=2,typeof ki.constant=="number"?(Ri=ki.constant,an=cs=pa=0):(Ri=ki.constant.length>0?ki.constant[0]:0,an=ki.constant.length>1?ki.constant[1]:0,cs=ki.constant.length>2?ki.constant[2]:0,pa=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?ln=De.createStream(34962,ki.buffer):ln=De.getBuffer(ki.buffer),bo="type"in ki?Yr[ki.type]:ln.dtype,va=!!ki.normalized,ka=ki.size|0,Co=ki.offset|0,Fi=ki.stride|0,Yn=ki.divisor|0)),xa=l.location,Qi=Fe[xa],to===1?(Qi.buffer||Je.enableVertexAttribArray(xa),Nn=ka||2,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(Je.bindBuffer(34962,ln.buffer),Je.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(Wn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(Je.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(Je.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=zi.positionBuffer,ti.buffer=Pn,qa=!1,jo=1,Vo=0,Pa=0,Oa=0,co=0,An=null,_o=0,ks=!1,bs=5126,ps=0,sa=0,Bn=0,de(ti)?(qa=!0,An=De.createStream(34962,ti),bs=An.dtype):(An=De.getBuffer(ti),An?bs=An.dtype:"constant"in ti?(jo=2,typeof ti.constant=="number"?(Vo=ti.constant,Pa=Oa=co=0):(Vo=ti.constant.length>0?ti.constant[0]:0,Pa=ti.constant.length>1?ti.constant[1]:0,Oa=ti.constant.length>2?ti.constant[2]:0,co=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?An=De.createStream(34962,ti.buffer):An=De.getBuffer(ti.buffer),bs="type"in ti?Yr[ti.type]:An.dtype,ks=!!ti.normalized,_o=ti.size|0,ps=ti.offset|0,sa=ti.stride|0,Bn=ti.divisor|0)),ms=f.location,ya=Fe[ms],jo===1?(ya.buffer||Je.enableVertexAttribArray(ms),on=_o||2,(ya.type!==bs||ya.size!==on||ya.buffer!==An||ya.normalized!==ks||ya.offset!==ps||ya.stride!==sa)&&(Je.bindBuffer(34962,An.buffer),Je.vertexAttribPointer(ms,on,bs,ks,sa,ps),ya.type=bs,ya.size=on,ya.buffer=An,ya.normalized=ks,ya.offset=ps,ya.stride=sa),ya.divisor!==Bn&&(Wn.vertexAttribDivisorANGLE(ms,Bn),ya.divisor=Bn)):(ya.buffer&&(Je.disableVertexAttribArray(ms),ya.buffer=null),(ya.x!==Vo||ya.y!==Pa||ya.z!==Oa||ya.w!==co)&&(Je.vertexAttrib4f(ms,Vo,Pa,Oa,co),ya.x=Vo,ya.y=Pa,ya.z=Oa,ya.w=co)),mn=zi.positionFractBuffer,ji.buffer=mn,Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,de(ji)?(Ga=!0,yn=De.createStream(34962,ji),Da=yn.dtype):(yn=De.getBuffer(ji),yn?Da=yn.dtype:"constant"in ji?(ca=2,typeof ji.constant=="number"?(bn=ji.constant,Xi=qn=Ia=0):(bn=ji.constant.length>0?ji.constant[0]:0,Xi=ji.constant.length>1?ji.constant[1]:0,qn=ji.constant.length>2?ji.constant[2]:0,Ia=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?yn=De.createStream(34962,ji.buffer):yn=De.getBuffer(ji.buffer),Da="type"in ji?Yr[ji.type]:yn.dtype,ba=!!ji.normalized,Ya=ji.size|0,Aa=ji.offset|0,Ln=ji.stride|0,wo=ji.divisor|0)),wa=c.location,$i=Fe[wa],ca===1?($i.buffer||Je.enableVertexAttribArray(wa),ea=Ya||2,($i.type!==Da||$i.size!==ea||$i.buffer!==yn||$i.normalized!==ba||$i.offset!==Aa||$i.stride!==Ln)&&(Je.bindBuffer(34962,yn.buffer),Je.vertexAttribPointer(wa,ea,Da,ba,Ln,Aa),$i.type=Da,$i.size=ea,$i.buffer=yn,$i.normalized=ba,$i.offset=Aa,$i.stride=Ln),$i.divisor!==wo&&(Wn.vertexAttribDivisorANGLE(wa,wo),$i.divisor=wo)):($i.buffer&&(Je.disableVertexAttribArray(wa),$i.buffer=null),($i.x!==bn||$i.y!==Xi||$i.z!==qn||$i.w!==Ia)&&(Je.vertexAttrib4f(wa,bn,Xi,qn,Ia),$i.x=bn,$i.y=Xi,$i.z=qn,$i.w=Ia)),Sa=zi.colorBuffer,Vi.buffer=Sa,Za=!1,xo=1,Wa=0,hn=0,Un=0,Ss=0,Kn=null,ns=0,Jo=!1,vo=5126,ma=0,ja=0,To=0,de(Vi)?(Za=!0,Kn=De.createStream(34962,Vi),vo=Kn.dtype):(Kn=De.getBuffer(Vi),Kn?vo=Kn.dtype:"constant"in Vi?(xo=2,typeof Vi.constant=="number"?(Wa=Vi.constant,hn=Un=Ss=0):(Wa=Vi.constant.length>0?Vi.constant[0]:0,hn=Vi.constant.length>1?Vi.constant[1]:0,Un=Vi.constant.length>2?Vi.constant[2]:0,Ss=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?Kn=De.createStream(34962,Vi.buffer):Kn=De.getBuffer(Vi.buffer),vo="type"in Vi?Yr[Vi.type]:Kn.dtype,Jo=!!Vi.normalized,ns=Vi.size|0,ma=Vi.offset|0,ja=Vi.stride|0,To=Vi.divisor|0)),Ao=h.location,la=Fe[Ao],xo===1?(la.buffer||Je.enableVertexAttribArray(Ao),Ki=ns||4,(la.type!==vo||la.size!==Ki||la.buffer!==Kn||la.normalized!==Jo||la.offset!==ma||la.stride!==ja)&&(Je.bindBuffer(34962,Kn.buffer),Je.vertexAttribPointer(Ao,Ki,vo,Jo,ja,ma),la.type=vo,la.size=Ki,la.buffer=Kn,la.normalized=Jo,la.offset=ma,la.stride=ja),la.divisor!==To&&(Wn.vertexAttribDivisorANGLE(Ao,To),la.divisor=To)):(la.buffer&&(Je.disableVertexAttribArray(Ao),la.buffer=null),(la.x!==Wa||la.y!==hn||la.z!==Un||la.w!==Ss)&&(Je.vertexAttrib4f(Ao,Wa,hn,Un,Ss),la.x=Wa,la.y=hn,la.z=Un,la.w=Ss)),ho=p.location,Ka=Fe[ho],Ka.buffer||Je.enableVertexAttribArray(ho),(Ka.type!==5126||Ka.size!==1||Ka.buffer!==d||Ka.normalized!==!1||Ka.offset!==0||Ka.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(ho,1,5126,!1,8,0),Ka.type=5126,Ka.size=1,Ka.buffer=d,Ka.normalized=!1,Ka.offset=0,Ka.stride=8),Ka.divisor!==0&&(Wn.vertexAttribDivisorANGLE(ho,0),Ka.divisor=0),Ca=x.location,ta=Fe[Ca],ta.buffer||Je.enableVertexAttribArray(Ca),(ta.type!==5126||ta.size!==1||ta.buffer!==d||ta.normalized!==!1||ta.offset!==4||ta.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(Ca,1,5126,!1,8,4),ta.type=5126,ta.size=1,ta.buffer=d,ta.normalized=!1,ta.offset=4,ta.stride=8),ta.divisor!==0&&(Wn.vertexAttribDivisorANGLE(Ca,0),ta.divisor=0),En=zi.dashLength,Je.uniform1f(b.location,En),Mo=zi.dashTexture,Mo&&Mo._reglType==="framebuffer"&&(Mo=Mo.color[0]),Ds=Mo._texture,Je.uniform1i(y.location,Ds.bind()),Ro=zi.depth,Je.uniform1f(k.location,Ro),vs=zi.opacity,Je.uniform1f(E.location,vs),Ks=zi.scale,as=Ks[0],Jn=Ks[1],Je.uniform2f(A.location,as,Jn),Cs=zi.scaleFract,Xa=Cs[0],Zo=Cs[1],Je.uniform2f(L.location,Xa,Zo),Eo=zi.thickness,Je.uniform1f(_.location,Eo),lo=zi.translate,$a=lo[0],Xo=lo[1],Je.uniform2f(C.location,$a,Xo),rs=zi.translateFract,$n=rs[0],Sn=rs[1],Je.uniform2f(M.location,$n,Sn),uo=z.call(this,Mt,zi,0),Rs=uo[0],xs=uo[1],Go=uo[2],os=uo[3],Je.uniform4f(v.location,Rs,xs,Go,os),So=fr.elements,So?Je.bindBuffer(34963,So.buffer.buffer):Pe.currentVAO&&(So=Ot.getElements(Pe.currentVAO.elements),So&&Je.bindBuffer(34963,So.buffer.buffer)),Qn=zi.count,Qn>0?So?Wn.drawElementsInstancedANGLE(5,4,So.type,0<<(So.type-5121>>1),Qn):Wn.drawArraysInstancedANGLE(5,0,4,Qn):Qn<0&&(So?Je.drawElements(5,4,So.type,0<<(So.type-5121>>1)):Je.drawArrays(5,0,4)),ir.dirty=!0,Pe.setVAO(null),Mt.viewportWidth=or,Mt.viewportHeight=Nr,xn&&(r.cpuTime+=performance.now()-_a),ia&&De.destroyStream(un),Ja&&De.destroyStream(ln),qa&&De.destroyStream(An),Ga&&De.destroyStream(yn),Za&&De.destroyStream(Kn),Ds.unbind()},scope:function(zi,Mi,sn){var fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt;fi=zi.viewport,Or=fi.x|0,st=fi.y|0,Wt="width"in fi?fi.width|0:Mt.framebufferWidth-Or,tr="height"in fi?fi.height|0:Mt.framebufferHeight-st,or=Mt.viewportWidth,Mt.viewportWidth=Wt,Nr=Mt.viewportHeight,Mt.viewportHeight=tr,hi=zr[0],zr[0]=Or,Gi=zr[1],zr[1]=st,Qr=zr[2],zr[2]=Wt,Ui=zr[3],zr[3]=tr,zn=ht[0],ht[0]=T,fn=ht[1],ht[1]=F,xn=ht[2],ht[2]=q,_a=ht[3],ht[3]=U,Wn=Kt.blend_enable,Kt.blend_enable=H,Fn=St[0],St[0]=j,ia=St[1],St[1]=G,za=qr[0],qr[0]=O,Hr=qr[1],qr[1]=W,na=qr[2],qr[2]=re,go=qr[3],qr[3]=ne,Dn=i.call(this,Mt,zi,sn),un=Kt.depth_enable,Kt.depth_enable=Dn,Zn=zi.viewport,Wo=Zn.x|0,Ba=Zn.y|0,Bo="width"in Zn?Zn.width|0:Mt.framebufferWidth-Wo,Ea="height"in Zn?Zn.height|0:Mt.framebufferHeight-Ba,Ha=sr[0],sr[0]=Wo,tn=sr[1],sr[1]=Ba,Cn=sr[2],sr[2]=Bo,Xn=sr[3],sr[3]=Ea,ts=Kt.scissor_enable,Kt.scissor_enable=be,Ja=Kt.stencil_enable,Kt.stencil_enable=ze,to=ir.profile,to&&(Ri=performance.now(),r.count++),an=fr.offset,fr.offset=Ce,cs=fr.count,fr.count=he,pa=zi.count,ln=fr.instances,fr.instances=pa,ka=fr.primitive,fr.primitive=te,va=ke.call(this,Mt,zi,sn),bo=Ie[Ee],Ie[Ee]=va,Co=zi.miterLimit,Fi=Ie[Me],Ie[Me]=Co,Yn=zi.scale,xa=Ie[Oe],Ie[Oe]=Yn,Qi=zi.scaleFract,Nn=Ie[Re],Ie[Re]=Qi,Pn=zi.translateFract,qa=Ie[me],Ie[me]=Pn,jo=zi.translate,Vo=Ie[Be],Ie[Be]=jo,Pa=zi.thickness,Oa=Ie[fe],Ie[fe]=Pa,co=zi.dashTexture,An=Ie[Ze],Ie[Ze]=co,_o=zi.opacity,ks=Ie[et],Ie[et]=_o,bs=Mt.pixelRatio,ps=Ie[gt],Ie[gt]=bs,sa=zi.id,Bn=Ie[Pt],Ie[Pt]=sa,ms=zi.dashLength,ya=Ie[Qe],Ie[Qe]=ms,on=z.call(this,Mt,zi,sn),mn=Ie[Xe],Ie[Xe]=on,Ga=zi.depth,ca=Ie[Tt],Ie[Tt]=Ga,bn=xt.state,xt.state=1,Xi=xt.x,xt.x=0,qn=xt.y,xt.y=0,Ia=xt.z,xt.z=0,yn=xt.w,xt.w=0,Ya=xt.buffer,xt.buffer=d,ba=xt.size,xt.size=0,Da=xt.normalized,xt.normalized=!1,Aa=xt.type,xt.type=5126,Ln=xt.offset,xt.offset=0,wo=xt.stride,xt.stride=8,wa=xt.divisor,xt.divisor=0,$i=_t.state,_t.state=1,ea=_t.x,_t.x=0,Sa=_t.y,_t.y=0,Za=_t.z,_t.z=0,xo=_t.w,_t.w=0,Wa=_t.buffer,_t.buffer=d,hn=_t.size,_t.size=0,Un=_t.normalized,_t.normalized=!1,Ss=_t.type,_t.type=5126,Kn=_t.offset,_t.offset=4,ns=_t.stride,_t.stride=8,Jo=_t.divisor,_t.divisor=0,vo=zi.positionBuffer,Ur.buffer=vo,ma=!1,ja=1,To=0,Ao=0,la=0,Ki=0,ho=null,Ka=0,Ca=!1,ta=5126,En=0,Mo=0,Ds=0,de(Ur)?(ma=!0,ho=De.createStream(34962,Ur),ta=ho.dtype):(ho=De.getBuffer(Ur),ho?ta=ho.dtype:"constant"in Ur?(ja=2,typeof Ur.constant=="number"?(To=Ur.constant,Ao=la=Ki=0):(To=Ur.constant.length>0?Ur.constant[0]:0,Ao=Ur.constant.length>1?Ur.constant[1]:0,la=Ur.constant.length>2?Ur.constant[2]:0,Ki=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?ho=De.createStream(34962,Ur.buffer):ho=De.getBuffer(Ur.buffer),ta="type"in Ur?Yr[Ur.type]:ho.dtype,Ca=!!Ur.normalized,Ka=Ur.size|0,En=Ur.offset|0,Mo=Ur.stride|0,Ds=Ur.divisor|0)),Ro=Ct.state,Ct.state=ja,vs=Ct.x,Ct.x=To,Ks=Ct.y,Ct.y=Ao,as=Ct.z,Ct.z=la,Jn=Ct.w,Ct.w=Ki,Cs=Ct.buffer,Ct.buffer=ho,Xa=Ct.size,Ct.size=Ka,Zo=Ct.normalized,Ct.normalized=Ca,Eo=Ct.type,Ct.type=ta,lo=Ct.offset,Ct.offset=En,$a=Ct.stride,Ct.stride=Mo,Xo=Ct.divisor,Ct.divisor=Ds,rs=zi.positionBuffer,ti.buffer=rs,$n=!1,Sn=1,uo=0,Rs=0,xs=0,Go=0,os=null,So=0,Qn=!1,zo=5126,rl=0,$o=0,Na=0,de(ti)?($n=!0,os=De.createStream(34962,ti),zo=os.dtype):(os=De.getBuffer(ti),os?zo=os.dtype:"constant"in ti?(Sn=2,typeof ti.constant=="number"?(uo=ti.constant,Rs=xs=Go=0):(uo=ti.constant.length>0?ti.constant[0]:0,Rs=ti.constant.length>1?ti.constant[1]:0,xs=ti.constant.length>2?ti.constant[2]:0,Go=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?os=De.createStream(34962,ti.buffer):os=De.getBuffer(ti.buffer),zo="type"in ti?Yr[ti.type]:os.dtype,Qn=!!ti.normalized,So=ti.size|0,rl=ti.offset|0,$o=ti.stride|0,Na=ti.divisor|0)),Ua=jt.state,jt.state=Sn,Po=jt.x,jt.x=uo,fo=jt.y,jt.y=Rs,ro=jt.z,jt.z=xs,Ma=jt.w,jt.w=Go,io=jt.buffer,jt.buffer=os,aa=jt.size,jt.size=So,Oo=jt.normalized,jt.normalized=Qn,No=jt.type,jt.type=zo,Zs=jt.offset,jt.offset=rl,Fs=jt.stride,jt.stride=$o,ws=jt.divisor,jt.divisor=Na,no=zi.positionFractBuffer,ki.buffer=no,Ls=!1,ds=1,Xs=0,oa=0,Yo=0,po=0,ss=null,ls=0,gs=!1,bt=5126,Ft=0,hr=0,nr=0,de(ki)?(Ls=!0,ss=De.createStream(34962,ki),bt=ss.dtype):(ss=De.getBuffer(ki),ss?bt=ss.dtype:"constant"in ki?(ds=2,typeof ki.constant=="number"?(Xs=ki.constant,oa=Yo=po=0):(Xs=ki.constant.length>0?ki.constant[0]:0,oa=ki.constant.length>1?ki.constant[1]:0,Yo=ki.constant.length>2?ki.constant[2]:0,po=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?ss=De.createStream(34962,ki.buffer):ss=De.getBuffer(ki.buffer),bt="type"in ki?Yr[ki.type]:ss.dtype,gs=!!ki.normalized,ls=ki.size|0,Ft=ki.offset|0,hr=ki.stride|0,nr=ki.divisor|0)),Sr=At.state,At.state=ds,li=At.x,At.x=Xs,di=At.y,At.y=oa,mi=At.z,At.z=Yo,Oi=At.w,At.w=po,dn=At.buffer,At.buffer=ss,wi=At.size,At.size=ls,ui=At.normalized,At.normalized=gs,Ai=At.type,At.type=bt,gi=At.offset,At.offset=Ft,gn=At.stride,At.stride=hr,In=At.divisor,At.divisor=nr,Vn=zi.positionFractBuffer,ji.buffer=Vn,Rn=!1,Hn=1,Gn=0,pn=0,Lo=0,us=0,Bs=null,Js=0,ol=!1,Cl=5126,ul=0,Gl=0,Vl=0,de(ji)?(Rn=!0,Bs=De.createStream(34962,ji),Cl=Bs.dtype):(Bs=De.getBuffer(ji),Bs?Cl=Bs.dtype:"constant"in ji?(Hn=2,typeof ji.constant=="number"?(Gn=ji.constant,pn=Lo=us=0):(Gn=ji.constant.length>0?ji.constant[0]:0,pn=ji.constant.length>1?ji.constant[1]:0,Lo=ji.constant.length>2?ji.constant[2]:0,us=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?Bs=De.createStream(34962,ji.buffer):Bs=De.getBuffer(ji.buffer),Cl="type"in ji?Yr[ji.type]:Bs.dtype,ol=!!ji.normalized,Js=ji.size|0,ul=ji.offset|0,Gl=ji.stride|0,Vl=ji.divisor|0)),Fl=Te.state,Te.state=Hn,ga=Te.x,Te.x=Gn,ko=Te.y,Te.y=pn,zs=Te.z,Te.z=Lo,Fo=Te.w,Te.w=us,Ys=Te.buffer,Te.buffer=Bs,Gs=Te.size,Te.size=Js,Us=Te.normalized,Te.normalized=ol,Sl=Te.type,Te.type=Cl,_l=Te.offset,Te.offset=ul,kl=Te.stride,Te.stride=Gl,cl=Te.divisor,Te.divisor=Vl,xl=zi.colorBuffer,Vi.buffer=xl,Uo=!1,_s=1,Bl=0,Il=0,Dl=0,oe=0,w=null,B=0,Q=!1,ee=5126,le=0,Ne=0,$e=0,de(Vi)?(Uo=!0,w=De.createStream(34962,Vi),ee=w.dtype):(w=De.getBuffer(Vi),w?ee=w.dtype:"constant"in Vi?(_s=2,typeof Vi.constant=="number"?(Bl=Vi.constant,Il=Dl=oe=0):(Bl=Vi.constant.length>0?Vi.constant[0]:0,Il=Vi.constant.length>1?Vi.constant[1]:0,Dl=Vi.constant.length>2?Vi.constant[2]:0,oe=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?w=De.createStream(34962,Vi.buffer):w=De.getBuffer(Vi.buffer),ee="type"in Vi?Yr[Vi.type]:w.dtype,Q=!!Vi.normalized,B=Vi.size|0,le=Vi.offset|0,Ne=Vi.stride|0,$e=Vi.divisor|0)),pt=nt.state,nt.state=_s,zt=nt.x,nt.x=Bl,Yt=nt.y,nt.y=Il,Jt=nt.z,nt.z=Dl,yr=nt.w,nt.w=oe,Ir=nt.buffer,nt.buffer=w,ce=nt.size,nt.size=B,Ae=nt.normalized,nt.normalized=Q,qe=nt.type,nt.type=ee,Ve=nt.offset,nt.offset=le,ot=nt.stride,nt.stride=Ne,Ke=nt.divisor,nt.divisor=$e,ft=_e.vert,_e.vert=ut,qt=_e.frag,_e.frag=ct,ir.dirty=!0,Mi(Mt,zi,sn),Mt.viewportWidth=or,Mt.viewportHeight=Nr,zr[0]=hi,zr[1]=Gi,zr[2]=Qr,zr[3]=Ui,ht[0]=zn,ht[1]=fn,ht[2]=xn,ht[3]=_a,Kt.blend_enable=Wn,St[0]=Fn,St[1]=ia,qr[0]=za,qr[1]=Hr,qr[2]=na,qr[3]=go,Kt.depth_enable=un,sr[0]=Ha,sr[1]=tn,sr[2]=Cn,sr[3]=Xn,Kt.scissor_enable=ts,Kt.stencil_enable=Ja,to&&(r.cpuTime+=performance.now()-Ri),fr.offset=an,fr.count=cs,fr.instances=ln,fr.primitive=ka,Ie[Ee]=bo,Ie[Me]=Fi,Ie[Oe]=xa,Ie[Re]=Nn,Ie[me]=qa,Ie[Be]=Vo,Ie[fe]=Oa,Ie[Ze]=An,Ie[et]=ks,Ie[gt]=ps,Ie[Pt]=Bn,Ie[Qe]=ya,Ie[Xe]=mn,Ie[Tt]=ca,xt.state=bn,xt.x=Xi,xt.y=qn,xt.z=Ia,xt.w=yn,xt.buffer=Ya,xt.size=ba,xt.normalized=Da,xt.type=Aa,xt.offset=Ln,xt.stride=wo,xt.divisor=wa,_t.state=$i,_t.x=ea,_t.y=Sa,_t.z=Za,_t.w=xo,_t.buffer=Wa,_t.size=hn,_t.normalized=Un,_t.type=Ss,_t.offset=Kn,_t.stride=ns,_t.divisor=Jo,ma&&De.destroyStream(ho),Ct.state=Ro,Ct.x=vs,Ct.y=Ks,Ct.z=as,Ct.w=Jn,Ct.buffer=Cs,Ct.size=Xa,Ct.normalized=Zo,Ct.type=Eo,Ct.offset=lo,Ct.stride=$a,Ct.divisor=Xo,$n&&De.destroyStream(os),jt.state=Ua,jt.x=Po,jt.y=fo,jt.z=ro,jt.w=Ma,jt.buffer=io,jt.size=aa,jt.normalized=Oo,jt.type=No,jt.offset=Zs,jt.stride=Fs,jt.divisor=ws,Ls&&De.destroyStream(ss),At.state=Sr,At.x=li,At.y=di,At.z=mi,At.w=Oi,At.buffer=dn,At.size=wi,At.normalized=ui,At.type=Ai,At.offset=gi,At.stride=gn,At.divisor=In,Rn&&De.destroyStream(Bs),Te.state=Fl,Te.x=ga,Te.y=ko,Te.z=zs,Te.w=Fo,Te.buffer=Ys,Te.size=Gs,Te.normalized=Us,Te.type=Sl,Te.offset=_l,Te.stride=kl,Te.divisor=cl,Uo&&De.destroyStream(w),nt.state=pt,nt.x=zt,nt.y=Yt,nt.z=Jt,nt.w=yr,nt.buffer=Ir,nt.size=ce,nt.normalized=Ae,nt.type=qe,nt.offset=Ve,nt.stride=ot,nt.divisor=Ke,_e.vert=ft,_e.frag=qt,ir.dirty=!0},batch:function(zi,Mi){var sn,fi,Or,st,Wt,tr,or;if(sn=ye.angle_instanced_arrays,fi=lt.next,fi!==lt.cur&&(fi?Je.bindFramebuffer(36160,fi.framebuffer):Je.bindFramebuffer(36160,null),lt.cur=fi),ir.dirty){var Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an;Nr=Kt.dither,Nr!==ir.dither&&(Nr?Je.enable(3024):Je.disable(3024),ir.dither=Nr),hi=Kt.depth_func,hi!==ir.depth_func&&(Je.depthFunc(hi),ir.depth_func=hi),Gi=vr[0],Qr=vr[1],(Gi!==Er[0]||Qr!==Er[1])&&(Je.depthRange(Gi,Qr),Er[0]=Gi,Er[1]=Qr),Ui=Kt.depth_mask,Ui!==ir.depth_mask&&(Je.depthMask(Ui),ir.depth_mask=Ui),zn=si[0],fn=si[1],xn=si[2],_a=si[3],(zn!==Ei[0]||fn!==Ei[1]||xn!==Ei[2]||_a!==Ei[3])&&(Je.colorMask(zn,fn,xn,_a),Ei[0]=zn,Ei[1]=fn,Ei[2]=xn,Ei[3]=_a),Wn=Kt.cull_enable,Wn!==ir.cull_enable&&(Wn?Je.enable(2884):Je.disable(2884),ir.cull_enable=Wn),Fn=Kt.cull_face,Fn!==ir.cull_face&&(Je.cullFace(Fn),ir.cull_face=Fn),ia=Kt.frontFace,ia!==ir.frontFace&&(Je.frontFace(ia),ir.frontFace=ia),za=Kt.lineWidth,za!==ir.lineWidth&&(Je.lineWidth(za),ir.lineWidth=za),Hr=Kt.polygonOffset_enable,Hr!==ir.polygonOffset_enable&&(Hr?Je.enable(32823):Je.disable(32823),ir.polygonOffset_enable=Hr),na=Si[0],go=Si[1],(na!==xi[0]||go!==xi[1])&&(Je.polygonOffset(na,go),xi[0]=na,xi[1]=go),Dn=Kt.sample_alpha,Dn!==ir.sample_alpha&&(Dn?Je.enable(32926):Je.disable(32926),ir.sample_alpha=Dn),un=Kt.sample_enable,un!==ir.sample_enable&&(un?Je.enable(32928):Je.disable(32928),ir.sample_enable=un),Zn=Hi[0],Wo=Hi[1],(Zn!==Jr[0]||Wo!==Jr[1])&&(Je.sampleCoverage(Zn,Wo),Jr[0]=Zn,Jr[1]=Wo),Ba=Kt.stencil_mask,Ba!==ir.stencil_mask&&(Je.stencilMask(Ba),ir.stencil_mask=Ba),Bo=ci[0],Ea=ci[1],Ha=ci[2],(Bo!==Di[0]||Ea!==Di[1]||Ha!==Di[2])&&(Je.stencilFunc(Bo,Ea,Ha),Di[0]=Bo,Di[1]=Ea,Di[2]=Ha),tn=Lt[0],Cn=Lt[1],Xn=Lt[2],ts=Lt[3],(tn!==vt[0]||Cn!==vt[1]||Xn!==vt[2]||ts!==vt[3])&&(Je.stencilOpSeparate(tn,Cn,Xn,ts),vt[0]=tn,vt[1]=Cn,vt[2]=Xn,vt[3]=ts),Ja=Dt[0],to=Dt[1],Ri=Dt[2],an=Dt[3],(Ja!==Bt[0]||to!==Bt[1]||Ri!==Bt[2]||an!==Bt[3])&&(Je.stencilOpSeparate(Ja,to,Ri,an),Bt[0]=Ja,Bt[1]=to,Bt[2]=Ri,Bt[3]=an)}Je.blendColor(0,0,0,0),Et[0]=0,Et[1]=0,Et[2]=0,Et[3]=0,rt?Je.enable(3042):Je.disable(3042),ir.blend_enable=rt,Je.blendEquationSeparate(32774,32774),Zt[0]=32774,Zt[1]=32774,Je.blendFuncSeparate(770,771,773,1),Lr[0]=770,Lr[1]=771,Lr[2]=773,Lr[3]=1,je?Je.enable(3089):Je.disable(3089),ir.scissor_enable=je,tt?Je.enable(2960):Je.disable(2960),ir.stencil_enable=tt,Or=ir.profile,Or&&(st=performance.now(),r.count+=Mi),Je.useProgram(s.program),Wt=ye.angle_instanced_arrays;var cs,pa,ln,ka,va;for(Pe.setVAO(null),cs=p.location,pa=Fe[cs],pa.buffer||Je.enableVertexAttribArray(cs),(pa.type!==5126||pa.size!==1||pa.buffer!==d||pa.normalized!==!1||pa.offset!==0||pa.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(cs,1,5126,!1,8,0),pa.type=5126,pa.size=1,pa.buffer=d,pa.normalized=!1,pa.offset=0,pa.stride=8),pa.divisor!==0&&(Wt.vertexAttribDivisorANGLE(cs,0),pa.divisor=0),ln=x.location,ka=Fe[ln],ka.buffer||Je.enableVertexAttribArray(ln),(ka.type!==5126||ka.size!==1||ka.buffer!==d||ka.normalized!==!1||ka.offset!==4||ka.stride!==8)&&(Je.bindBuffer(34962,d.buffer),Je.vertexAttribPointer(ln,1,5126,!1,8,4),ka.type=5126,ka.size=1,ka.buffer=d,ka.normalized=!1,ka.offset=4,ka.stride=8),ka.divisor!==0&&(Wt.vertexAttribDivisorANGLE(ln,0),ka.divisor=0),va=fr.elements,va?Je.bindBuffer(34963,va.buffer.buffer):Pe.currentVAO&&(va=Ot.getElements(Pe.currentVAO.elements),va&&Je.bindBuffer(34963,va.buffer.buffer)),tr=0;tr0?Ur.constant[0]:0,bs=Ur.constant.length>1?Ur.constant[1]:0,ps=Ur.constant.length>2?Ur.constant[2]:0,sa=Ur.constant.length>3?Ur.constant[3]:0)):(de(Ur.buffer)?Bn=De.createStream(34962,Ur.buffer):Bn=De.getBuffer(Ur.buffer),on="type"in Ur?Yr[Ur.type]:Bn.dtype,ya=!!Ur.normalized,ms=Ur.size|0,mn=Ur.offset|0,Ga=Ur.stride|0,ca=Ur.divisor|0)),bn=u.location,Xi=Fe[bn],_o===1?(Xi.buffer||Je.enableVertexAttribArray(bn),qn=ms||2,(Xi.type!==on||Xi.size!==qn||Xi.buffer!==Bn||Xi.normalized!==ya||Xi.offset!==mn||Xi.stride!==Ga)&&(Je.bindBuffer(34962,Bn.buffer),Je.vertexAttribPointer(bn,qn,on,ya,Ga,mn),Xi.type=on,Xi.size=qn,Xi.buffer=Bn,Xi.normalized=ya,Xi.offset=mn,Xi.stride=Ga),Xi.divisor!==ca&&(Wt.vertexAttribDivisorANGLE(bn,ca),Xi.divisor=ca)):(Xi.buffer&&(Je.disableVertexAttribArray(bn),Xi.buffer=null),(Xi.x!==ks||Xi.y!==bs||Xi.z!==ps||Xi.w!==sa)&&(Je.vertexAttrib4f(bn,ks,bs,ps,sa),Xi.x=ks,Xi.y=bs,Xi.z=ps,Xi.w=sa)),Ia=or.positionFractBuffer,ki.buffer=Ia,yn=!1,Ya=1,ba=0,Da=0,Aa=0,Ln=0,wo=null,wa=0,$i=!1,ea=5126,Sa=0,Za=0,xo=0,de(ki)?(yn=!0,wo=De.createStream(34962,ki),ea=wo.dtype):(wo=De.getBuffer(ki),wo?ea=wo.dtype:"constant"in ki?(Ya=2,typeof ki.constant=="number"?(ba=ki.constant,Da=Aa=Ln=0):(ba=ki.constant.length>0?ki.constant[0]:0,Da=ki.constant.length>1?ki.constant[1]:0,Aa=ki.constant.length>2?ki.constant[2]:0,Ln=ki.constant.length>3?ki.constant[3]:0)):(de(ki.buffer)?wo=De.createStream(34962,ki.buffer):wo=De.getBuffer(ki.buffer),ea="type"in ki?Yr[ki.type]:wo.dtype,$i=!!ki.normalized,wa=ki.size|0,Sa=ki.offset|0,Za=ki.stride|0,xo=ki.divisor|0)),Wa=l.location,hn=Fe[Wa],Ya===1?(hn.buffer||Je.enableVertexAttribArray(Wa),Un=wa||2,(hn.type!==ea||hn.size!==Un||hn.buffer!==wo||hn.normalized!==$i||hn.offset!==Sa||hn.stride!==Za)&&(Je.bindBuffer(34962,wo.buffer),Je.vertexAttribPointer(Wa,Un,ea,$i,Za,Sa),hn.type=ea,hn.size=Un,hn.buffer=wo,hn.normalized=$i,hn.offset=Sa,hn.stride=Za),hn.divisor!==xo&&(Wt.vertexAttribDivisorANGLE(Wa,xo),hn.divisor=xo)):(hn.buffer&&(Je.disableVertexAttribArray(Wa),hn.buffer=null),(hn.x!==ba||hn.y!==Da||hn.z!==Aa||hn.w!==Ln)&&(Je.vertexAttrib4f(Wa,ba,Da,Aa,Ln),hn.x=ba,hn.y=Da,hn.z=Aa,hn.w=Ln)),Ss=or.positionBuffer,ti.buffer=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,de(ti)?(Kn=!0,To=De.createStream(34962,ti),Ki=To.dtype):(To=De.getBuffer(ti),To?Ki=To.dtype:"constant"in ti?(ns=2,typeof ti.constant=="number"?(Jo=ti.constant,vo=ma=ja=0):(Jo=ti.constant.length>0?ti.constant[0]:0,vo=ti.constant.length>1?ti.constant[1]:0,ma=ti.constant.length>2?ti.constant[2]:0,ja=ti.constant.length>3?ti.constant[3]:0)):(de(ti.buffer)?To=De.createStream(34962,ti.buffer):To=De.getBuffer(ti.buffer),Ki="type"in ti?Yr[ti.type]:To.dtype,la=!!ti.normalized,Ao=ti.size|0,ho=ti.offset|0,Ka=ti.stride|0,Ca=ti.divisor|0)),ta=f.location,En=Fe[ta],ns===1?(En.buffer||Je.enableVertexAttribArray(ta),Mo=Ao||2,(En.type!==Ki||En.size!==Mo||En.buffer!==To||En.normalized!==la||En.offset!==ho||En.stride!==Ka)&&(Je.bindBuffer(34962,To.buffer),Je.vertexAttribPointer(ta,Mo,Ki,la,Ka,ho),En.type=Ki,En.size=Mo,En.buffer=To,En.normalized=la,En.offset=ho,En.stride=Ka),En.divisor!==Ca&&(Wt.vertexAttribDivisorANGLE(ta,Ca),En.divisor=Ca)):(En.buffer&&(Je.disableVertexAttribArray(ta),En.buffer=null),(En.x!==Jo||En.y!==vo||En.z!==ma||En.w!==ja)&&(Je.vertexAttrib4f(ta,Jo,vo,ma,ja),En.x=Jo,En.y=vo,En.z=ma,En.w=ja)),Ds=or.positionFractBuffer,ji.buffer=Ds,Ro=!1,vs=1,Ks=0,as=0,Jn=0,Cs=0,Xa=null,Zo=0,Eo=!1,lo=5126,$a=0,Xo=0,rs=0,de(ji)?(Ro=!0,Xa=De.createStream(34962,ji),lo=Xa.dtype):(Xa=De.getBuffer(ji),Xa?lo=Xa.dtype:"constant"in ji?(vs=2,typeof ji.constant=="number"?(Ks=ji.constant,as=Jn=Cs=0):(Ks=ji.constant.length>0?ji.constant[0]:0,as=ji.constant.length>1?ji.constant[1]:0,Jn=ji.constant.length>2?ji.constant[2]:0,Cs=ji.constant.length>3?ji.constant[3]:0)):(de(ji.buffer)?Xa=De.createStream(34962,ji.buffer):Xa=De.getBuffer(ji.buffer),lo="type"in ji?Yr[ji.type]:Xa.dtype,Eo=!!ji.normalized,Zo=ji.size|0,$a=ji.offset|0,Xo=ji.stride|0,rs=ji.divisor|0)),$n=c.location,Sn=Fe[$n],vs===1?(Sn.buffer||Je.enableVertexAttribArray($n),uo=Zo||2,(Sn.type!==lo||Sn.size!==uo||Sn.buffer!==Xa||Sn.normalized!==Eo||Sn.offset!==$a||Sn.stride!==Xo)&&(Je.bindBuffer(34962,Xa.buffer),Je.vertexAttribPointer($n,uo,lo,Eo,Xo,$a),Sn.type=lo,Sn.size=uo,Sn.buffer=Xa,Sn.normalized=Eo,Sn.offset=$a,Sn.stride=Xo),Sn.divisor!==rs&&(Wt.vertexAttribDivisorANGLE($n,rs),Sn.divisor=rs)):(Sn.buffer&&(Je.disableVertexAttribArray($n),Sn.buffer=null),(Sn.x!==Ks||Sn.y!==as||Sn.z!==Jn||Sn.w!==Cs)&&(Je.vertexAttrib4f($n,Ks,as,Jn,Cs),Sn.x=Ks,Sn.y=as,Sn.z=Jn,Sn.w=Cs)),Rs=or.colorBuffer,Vi.buffer=Rs,xs=!1,Go=1,os=0,So=0,Qn=0,zo=0,rl=null,$o=0,Na=!1,Ua=5126,Po=0,fo=0,ro=0,de(Vi)?(xs=!0,rl=De.createStream(34962,Vi),Ua=rl.dtype):(rl=De.getBuffer(Vi),rl?Ua=rl.dtype:"constant"in Vi?(Go=2,typeof Vi.constant=="number"?(os=Vi.constant,So=Qn=zo=0):(os=Vi.constant.length>0?Vi.constant[0]:0,So=Vi.constant.length>1?Vi.constant[1]:0,Qn=Vi.constant.length>2?Vi.constant[2]:0,zo=Vi.constant.length>3?Vi.constant[3]:0)):(de(Vi.buffer)?rl=De.createStream(34962,Vi.buffer):rl=De.getBuffer(Vi.buffer),Ua="type"in Vi?Yr[Vi.type]:rl.dtype,Na=!!Vi.normalized,$o=Vi.size|0,Po=Vi.offset|0,fo=Vi.stride|0,ro=Vi.divisor|0)),Ma=h.location,io=Fe[Ma],Go===1?(io.buffer||Je.enableVertexAttribArray(Ma),aa=$o||4,(io.type!==Ua||io.size!==aa||io.buffer!==rl||io.normalized!==Na||io.offset!==Po||io.stride!==fo)&&(Je.bindBuffer(34962,rl.buffer),Je.vertexAttribPointer(Ma,aa,Ua,Na,fo,Po),io.type=Ua,io.size=aa,io.buffer=rl,io.normalized=Na,io.offset=Po,io.stride=fo),io.divisor!==ro&&(Wt.vertexAttribDivisorANGLE(Ma,ro),io.divisor=ro)):(io.buffer&&(Je.disableVertexAttribArray(Ma),io.buffer=null),(io.x!==os||io.y!==So||io.z!==Qn||io.w!==zo)&&(Je.vertexAttrib4f(Ma,os,So,Qn,zo),io.x=os,io.y=So,io.z=Qn,io.w=zo)),Oo=or.dashLength,(!tr||No!==Oo)&&(No=Oo,Je.uniform1f(b.location,Oo)),Zs=or.dashTexture,Zs&&Zs._reglType==="framebuffer"&&(Zs=Zs.color[0]),Fs=Zs._texture,Je.uniform1i(y.location,Fs.bind()),ws=or.depth,(!tr||no!==ws)&&(no=ws,Je.uniform1f(k.location,ws)),Ls=or.opacity,(!tr||ds!==Ls)&&(ds=Ls,Je.uniform1f(E.location,Ls)),Xs=or.scale,oa=Xs[0],po=Xs[1],(!tr||Yo!==oa||ss!==po)&&(Yo=oa,ss=po,Je.uniform2f(A.location,oa,po)),ls=or.scaleFract,gs=ls[0],Ft=ls[1],(!tr||bt!==gs||hr!==Ft)&&(bt=gs,hr=Ft,Je.uniform2f(L.location,gs,Ft)),nr=or.thickness,(!tr||Sr!==nr)&&(Sr=nr,Je.uniform1f(_.location,nr)),li=or.translate,di=li[0],Oi=li[1],(!tr||mi!==di||dn!==Oi)&&(mi=di,dn=Oi,Je.uniform2f(C.location,di,Oi)),wi=or.translateFract,ui=wi[0],gi=wi[1],(!tr||Ai!==ui||gn!==gi)&&(Ai=ui,gn=gi,Je.uniform2f(M.location,ui,gi)),In=z.call(this,Mt,or,tr),Vn=In[0],Hn=In[1],pn=In[2],us=In[3],(!tr||Rn!==Vn||Gn!==Hn||Lo!==pn||Bs!==us)&&(Rn=Vn,Gn=Hn,Lo=pn,Bs=us,Je.uniform4f(v.location,Vn,Hn,pn,us)),Js=or.count,Js>0?va?Wt.drawElementsInstancedANGLE(5,4,va.type,0<<(va.type-5121>>1),Js):Wt.drawArraysInstancedANGLE(5,0,4,Js):Js<0&&(va?Je.drawElements(5,4,va.type,0<<(va.type-5121>>1)):Je.drawArrays(5,0,4)),Mt.viewportWidth=Qi,Mt.viewportHeight=Nn,An&&De.destroyStream(Bn),yn&&De.destroyStream(wo),Kn&&De.destroyStream(To),Ro&&De.destroyStream(Xa),xs&&De.destroyStream(rl),Fs.unbind()}ir.dirty=!0,Pe.setVAO(null),Or&&(r.cpuTime+=performance.now()-st)}}}});var S9=Se((r1r,OOe)=>{OOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De){"use strict";var _e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or;return _e=t.gl,Fe=t.context,Pe=t.strings,Ie=t.next,lt=t.current,ye=t.draw,ue=t.elements,de=t.buffer,ht=t.shader,Et=t.attributes,St=t.vao,Zt=t.uniforms,qr=t.framebuffer,Lr=t.extensions,vr=t.timer,Er=t.isBufferArgs,si=Ie.blend_color,Ei=lt.blend_color,Si=Ie.blend_equation,xi=lt.blend_equation,Hi=Ie.blend_func,Jr=lt.blend_func,ci=Ie.depth_range,Di=lt.depth_range,Lt=Ie.colorMask,vt=lt.colorMask,Dt=Ie.polygonOffset_offset,Bt=lt.polygonOffset_offset,sr=Ie.sample_coverage,br=lt.sample_coverage,zr=Ie.stencil_func,Tr=lt.stencil_func,Rr=Ie.stencil_opFront,Br=lt.stencil_opFront,oi=Ie.stencil_opBack,vi=lt.stencil_opBack,Pi=Ie.scissor_box,Yr=lt.scissor_box,Ni=Ie.viewport,Ur=lt.viewport,ti={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ki={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ji={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Vi={add:32774,subtract:32778,"reverse subtract":32779},zi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Mi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},sn={cw:2304,ccw:2305},fi={},fi.stride=4,fi.offset=0,fi.divisor=1,Or={},Or.stride=4,Or.offset=4,Or.divisor=1,st={},st.stride=8,st.offset=0,st.divisor=1,Wt={},Wt.stride=8,Wt.offset=8,Wt.divisor=1,tr={},tr.stride=8,tr.offset=16,tr.divisor=1,or={},or.stride=8,or.offset=24,or.divisor=1,{draw:function(Nr){var hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo;if(hi=Lr.angle_instanced_arrays,Gi=qr.next,Gi!==qr.cur&&(Gi?_e.bindFramebuffer(36160,Gi.framebuffer):_e.bindFramebuffer(36160,null),qr.cur=Gi),lt.dirty){var po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol;po=Ie.dither,po!==lt.dither&&(po?_e.enable(3024):_e.disable(3024),lt.dither=po),ss=Ie.depth_func,ss!==lt.depth_func&&(_e.depthFunc(ss),lt.depth_func=ss),ls=ci[0],gs=ci[1],(ls!==Di[0]||gs!==Di[1])&&(_e.depthRange(ls,gs),Di[0]=ls,Di[1]=gs),bt=Ie.depth_mask,bt!==lt.depth_mask&&(_e.depthMask(bt),lt.depth_mask=bt),Ft=Lt[0],hr=Lt[1],nr=Lt[2],Sr=Lt[3],(Ft!==vt[0]||hr!==vt[1]||nr!==vt[2]||Sr!==vt[3])&&(_e.colorMask(Ft,hr,nr,Sr),vt[0]=Ft,vt[1]=hr,vt[2]=nr,vt[3]=Sr),li=Ie.frontFace,li!==lt.frontFace&&(_e.frontFace(li),lt.frontFace=li),di=Ie.lineWidth,di!==lt.lineWidth&&(_e.lineWidth(di),lt.lineWidth=di),mi=Ie.polygonOffset_enable,mi!==lt.polygonOffset_enable&&(mi?_e.enable(32823):_e.disable(32823),lt.polygonOffset_enable=mi),Oi=Dt[0],dn=Dt[1],(Oi!==Bt[0]||dn!==Bt[1])&&(_e.polygonOffset(Oi,dn),Bt[0]=Oi,Bt[1]=dn),wi=Ie.sample_alpha,wi!==lt.sample_alpha&&(wi?_e.enable(32926):_e.disable(32926),lt.sample_alpha=wi),ui=Ie.sample_enable,ui!==lt.sample_enable&&(ui?_e.enable(32928):_e.disable(32928),lt.sample_enable=ui),Ai=sr[0],gi=sr[1],(Ai!==br[0]||gi!==br[1])&&(_e.sampleCoverage(Ai,gi),br[0]=Ai,br[1]=gi),gn=Ie.stencil_mask,gn!==lt.stencil_mask&&(_e.stencilMask(gn),lt.stencil_mask=gn),In=zr[0],Vn=zr[1],Rn=zr[2],(In!==Tr[0]||Vn!==Tr[1]||Rn!==Tr[2])&&(_e.stencilFunc(In,Vn,Rn),Tr[0]=In,Tr[1]=Vn,Tr[2]=Rn),Hn=Rr[0],Gn=Rr[1],pn=Rr[2],Lo=Rr[3],(Hn!==Br[0]||Gn!==Br[1]||pn!==Br[2]||Lo!==Br[3])&&(_e.stencilOpSeparate(Hn,Gn,pn,Lo),Br[0]=Hn,Br[1]=Gn,Br[2]=pn,Br[3]=Lo),us=oi[0],Bs=oi[1],Js=oi[2],ol=oi[3],(us!==vi[0]||Bs!==vi[1]||Js!==vi[2]||ol!==vi[3])&&(_e.stencilOpSeparate(us,Bs,Js,ol),vi[0]=us,vi[1]=Bs,vi[2]=Js,vi[3]=ol)}Qr=Nr.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:Fe.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:Fe.framebufferHeight-zn,_a=Fe.viewportWidth,Fe.viewportWidth=fn,Wn=Fe.viewportHeight,Fe.viewportHeight=xn,_e.viewport(Ui,zn,fn,xn),Ur[0]=Ui,Ur[1]=zn,Ur[2]=fn,Ur[3]=xn,_e.blendColor(0,0,0,0),Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0,n?_e.enable(3042):_e.disable(3042),lt.blend_enable=n,_e.blendEquationSeparate(32774,32774),xi[0]=32774,xi[1]=32774,_e.blendFuncSeparate(770,771,773,1),Jr[0]=770,Jr[1]=771,Jr[2]=773,Jr[3]=1,i?_e.enable(2884):_e.disable(2884),lt.cull_enable=i,_e.cullFace(a),lt.cull_face=a,Fn=o.call(this,Fe,Nr,0),Fn?_e.enable(2929):_e.disable(2929),lt.depth_enable=Fn,ia=Nr.viewport,za=ia.x|0,Hr=ia.y|0,na="width"in ia?ia.width|0:Fe.framebufferWidth-za,go="height"in ia?ia.height|0:Fe.framebufferHeight-Hr,_e.scissor(za,Hr,na,go),Yr[0]=za,Yr[1]=Hr,Yr[2]=na,Yr[3]=go,s?_e.enable(3089):_e.disable(3089),lt.scissor_enable=s,u?_e.enable(2960):_e.disable(2960),lt.stencil_enable=u,Dn=lt.profile,Dn&&(un=performance.now(),r.count++),_e.useProgram(l.program),Zn=Lr.angle_instanced_arrays,St.setVAO(null),Wo=Nr.colorBuffer,fi.buffer=Wo,Ba=!1,Bo=1,Ea=0,Ha=0,tn=0,Cn=0,Xn=null,ts=0,Ja=!1,to=5126,Ri=0,an=0,cs=0,Er(fi)?(Ba=!0,Xn=de.createStream(34962,fi),to=Xn.dtype):(Xn=de.getBuffer(fi),Xn?to=Xn.dtype:"constant"in fi?(Bo=2,typeof fi.constant=="number"?(Ea=fi.constant,Ha=tn=Cn=0):(Ea=fi.constant.length>0?fi.constant[0]:0,Ha=fi.constant.length>1?fi.constant[1]:0,tn=fi.constant.length>2?fi.constant[2]:0,Cn=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?Xn=de.createStream(34962,fi.buffer):Xn=de.getBuffer(fi.buffer),to="type"in fi?Mi[fi.type]:Xn.dtype,Ja=!!fi.normalized,ts=fi.size|0,Ri=fi.offset|0,an=fi.stride|0,cs=fi.divisor|0)),pa=f.location,ln=Et[pa],Bo===1?(ln.buffer||_e.enableVertexAttribArray(pa),ka=ts||4,(ln.type!==to||ln.size!==ka||ln.buffer!==Xn||ln.normalized!==Ja||ln.offset!==Ri||ln.stride!==an)&&(_e.bindBuffer(34962,Xn.buffer),_e.vertexAttribPointer(pa,ka,to,Ja,an,Ri),ln.type=to,ln.size=ka,ln.buffer=Xn,ln.normalized=Ja,ln.offset=Ri,ln.stride=an),ln.divisor!==cs&&(Zn.vertexAttribDivisorANGLE(pa,cs),ln.divisor=cs)):(ln.buffer&&(_e.disableVertexAttribArray(pa),ln.buffer=null),(ln.x!==Ea||ln.y!==Ha||ln.z!==tn||ln.w!==Cn)&&(_e.vertexAttrib4f(pa,Ea,Ha,tn,Cn),ln.x=Ea,ln.y=Ha,ln.z=tn,ln.w=Cn)),va=Nr.positionBuffer,Wt.buffer=va,bo=!1,Co=1,Fi=0,Yn=0,xa=0,Qi=0,Nn=null,Pn=0,qa=!1,jo=5126,Vo=0,Pa=0,Oa=0,Er(Wt)?(bo=!0,Nn=de.createStream(34962,Wt),jo=Nn.dtype):(Nn=de.getBuffer(Wt),Nn?jo=Nn.dtype:"constant"in Wt?(Co=2,typeof Wt.constant=="number"?(Fi=Wt.constant,Yn=xa=Qi=0):(Fi=Wt.constant.length>0?Wt.constant[0]:0,Yn=Wt.constant.length>1?Wt.constant[1]:0,xa=Wt.constant.length>2?Wt.constant[2]:0,Qi=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Nn=de.createStream(34962,Wt.buffer):Nn=de.getBuffer(Wt.buffer),jo="type"in Wt?Mi[Wt.type]:Nn.dtype,qa=!!Wt.normalized,Pn=Wt.size|0,Vo=Wt.offset|0,Pa=Wt.stride|0,Oa=Wt.divisor|0)),co=c.location,An=Et[co],Co===1?(An.buffer||_e.enableVertexAttribArray(co),_o=Pn||2,(An.type!==jo||An.size!==_o||An.buffer!==Nn||An.normalized!==qa||An.offset!==Vo||An.stride!==Pa)&&(_e.bindBuffer(34962,Nn.buffer),_e.vertexAttribPointer(co,_o,jo,qa,Pa,Vo),An.type=jo,An.size=_o,An.buffer=Nn,An.normalized=qa,An.offset=Vo,An.stride=Pa),An.divisor!==Oa&&(Zn.vertexAttribDivisorANGLE(co,Oa),An.divisor=Oa)):(An.buffer&&(_e.disableVertexAttribArray(co),An.buffer=null),(An.x!==Fi||An.y!==Yn||An.z!==xa||An.w!==Qi)&&(_e.vertexAttrib4f(co,Fi,Yn,xa,Qi),An.x=Fi,An.y=Yn,An.z=xa,An.w=Qi)),ks=Nr.colorBuffer,Or.buffer=ks,bs=!1,ps=1,sa=0,Bn=0,ms=0,ya=0,on=null,mn=0,Ga=!1,ca=5126,bn=0,Xi=0,qn=0,Er(Or)?(bs=!0,on=de.createStream(34962,Or),ca=on.dtype):(on=de.getBuffer(Or),on?ca=on.dtype:"constant"in Or?(ps=2,typeof Or.constant=="number"?(sa=Or.constant,Bn=ms=ya=0):(sa=Or.constant.length>0?Or.constant[0]:0,Bn=Or.constant.length>1?Or.constant[1]:0,ms=Or.constant.length>2?Or.constant[2]:0,ya=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?on=de.createStream(34962,Or.buffer):on=de.getBuffer(Or.buffer),ca="type"in Or?Mi[Or.type]:on.dtype,Ga=!!Or.normalized,mn=Or.size|0,bn=Or.offset|0,Xi=Or.stride|0,qn=Or.divisor|0)),Ia=h.location,yn=Et[Ia],ps===1?(yn.buffer||_e.enableVertexAttribArray(Ia),Ya=mn||4,(yn.type!==ca||yn.size!==Ya||yn.buffer!==on||yn.normalized!==Ga||yn.offset!==bn||yn.stride!==Xi)&&(_e.bindBuffer(34962,on.buffer),_e.vertexAttribPointer(Ia,Ya,ca,Ga,Xi,bn),yn.type=ca,yn.size=Ya,yn.buffer=on,yn.normalized=Ga,yn.offset=bn,yn.stride=Xi),yn.divisor!==qn&&(Zn.vertexAttribDivisorANGLE(Ia,qn),yn.divisor=qn)):(yn.buffer&&(_e.disableVertexAttribArray(Ia),yn.buffer=null),(yn.x!==sa||yn.y!==Bn||yn.z!==ms||yn.w!==ya)&&(_e.vertexAttrib4f(Ia,sa,Bn,ms,ya),yn.x=sa,yn.y=Bn,yn.z=ms,yn.w=ya)),ba=Nr.positionBuffer,tr.buffer=ba,Da=!1,Aa=1,Ln=0,wo=0,wa=0,$i=0,ea=null,Sa=0,Za=!1,xo=5126,Wa=0,hn=0,Un=0,Er(tr)?(Da=!0,ea=de.createStream(34962,tr),xo=ea.dtype):(ea=de.getBuffer(tr),ea?xo=ea.dtype:"constant"in tr?(Aa=2,typeof tr.constant=="number"?(Ln=tr.constant,wo=wa=$i=0):(Ln=tr.constant.length>0?tr.constant[0]:0,wo=tr.constant.length>1?tr.constant[1]:0,wa=tr.constant.length>2?tr.constant[2]:0,$i=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?ea=de.createStream(34962,tr.buffer):ea=de.getBuffer(tr.buffer),xo="type"in tr?Mi[tr.type]:ea.dtype,Za=!!tr.normalized,Sa=tr.size|0,Wa=tr.offset|0,hn=tr.stride|0,Un=tr.divisor|0)),Ss=d.location,Kn=Et[Ss],Aa===1?(Kn.buffer||_e.enableVertexAttribArray(Ss),ns=Sa||2,(Kn.type!==xo||Kn.size!==ns||Kn.buffer!==ea||Kn.normalized!==Za||Kn.offset!==Wa||Kn.stride!==hn)&&(_e.bindBuffer(34962,ea.buffer),_e.vertexAttribPointer(Ss,ns,xo,Za,hn,Wa),Kn.type=xo,Kn.size=ns,Kn.buffer=ea,Kn.normalized=Za,Kn.offset=Wa,Kn.stride=hn),Kn.divisor!==Un&&(Zn.vertexAttribDivisorANGLE(Ss,Un),Kn.divisor=Un)):(Kn.buffer&&(_e.disableVertexAttribArray(Ss),Kn.buffer=null),(Kn.x!==Ln||Kn.y!==wo||Kn.z!==wa||Kn.w!==$i)&&(_e.vertexAttrib4f(Ss,Ln,wo,wa,$i),Kn.x=Ln,Kn.y=wo,Kn.z=wa,Kn.w=$i)),Jo=x.location,vo=Et[Jo],vo.buffer||_e.enableVertexAttribArray(Jo),(vo.type!==5126||vo.size!==1||vo.buffer!==p||vo.normalized!==!1||vo.offset!==0||vo.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(Jo,1,5126,!1,8,0),vo.type=5126,vo.size=1,vo.buffer=p,vo.normalized=!1,vo.offset=0,vo.stride=8),vo.divisor!==0&&(Zn.vertexAttribDivisorANGLE(Jo,0),vo.divisor=0),ma=b.location,ja=Et[ma],ja.buffer||_e.enableVertexAttribArray(ma),(ja.type!==5126||ja.size!==1||ja.buffer!==p||ja.normalized!==!1||ja.offset!==4||ja.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(ma,1,5126,!1,8,4),ja.type=5126,ja.size=1,ja.buffer=p,ja.normalized=!1,ja.offset=4,ja.stride=8),ja.divisor!==0&&(Zn.vertexAttribDivisorANGLE(ma,0),ja.divisor=0),To=Nr.positionBuffer,or.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,Er(or)?(Ao=!0,ta=de.createStream(34962,or),Ds=ta.dtype):(ta=de.getBuffer(or),ta?Ds=ta.dtype:"constant"in or?(la=2,typeof or.constant=="number"?(Ki=or.constant,ho=Ka=Ca=0):(Ki=or.constant.length>0?or.constant[0]:0,ho=or.constant.length>1?or.constant[1]:0,Ka=or.constant.length>2?or.constant[2]:0,Ca=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?ta=de.createStream(34962,or.buffer):ta=de.getBuffer(or.buffer),Ds="type"in or?Mi[or.type]:ta.dtype,Mo=!!or.normalized,En=or.size|0,Ro=or.offset|0,vs=or.stride|0,Ks=or.divisor|0)),as=y.location,Jn=Et[as],la===1?(Jn.buffer||_e.enableVertexAttribArray(as),Cs=En||2,(Jn.type!==Ds||Jn.size!==Cs||Jn.buffer!==ta||Jn.normalized!==Mo||Jn.offset!==Ro||Jn.stride!==vs)&&(_e.bindBuffer(34962,ta.buffer),_e.vertexAttribPointer(as,Cs,Ds,Mo,vs,Ro),Jn.type=Ds,Jn.size=Cs,Jn.buffer=ta,Jn.normalized=Mo,Jn.offset=Ro,Jn.stride=vs),Jn.divisor!==Ks&&(Zn.vertexAttribDivisorANGLE(as,Ks),Jn.divisor=Ks)):(Jn.buffer&&(_e.disableVertexAttribArray(as),Jn.buffer=null),(Jn.x!==Ki||Jn.y!==ho||Jn.z!==Ka||Jn.w!==Ca)&&(_e.vertexAttrib4f(as,Ki,ho,Ka,Ca),Jn.x=Ki,Jn.y=ho,Jn.z=Ka,Jn.w=Ca)),Xa=Nr.positionBuffer,st.buffer=Xa,Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Er(st)?(Zo=!0,$n=de.createStream(34962,st),Rs=$n.dtype):($n=de.getBuffer(st),$n?Rs=$n.dtype:"constant"in st?(Eo=2,typeof st.constant=="number"?(lo=st.constant,$a=Xo=rs=0):(lo=st.constant.length>0?st.constant[0]:0,$a=st.constant.length>1?st.constant[1]:0,Xo=st.constant.length>2?st.constant[2]:0,rs=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?$n=de.createStream(34962,st.buffer):$n=de.getBuffer(st.buffer),Rs="type"in st?Mi[st.type]:$n.dtype,uo=!!st.normalized,Sn=st.size|0,xs=st.offset|0,Go=st.stride|0,os=st.divisor|0)),So=k.location,Qn=Et[So],Eo===1?(Qn.buffer||_e.enableVertexAttribArray(So),zo=Sn||2,(Qn.type!==Rs||Qn.size!==zo||Qn.buffer!==$n||Qn.normalized!==uo||Qn.offset!==xs||Qn.stride!==Go)&&(_e.bindBuffer(34962,$n.buffer),_e.vertexAttribPointer(So,zo,Rs,uo,Go,xs),Qn.type=Rs,Qn.size=zo,Qn.buffer=$n,Qn.normalized=uo,Qn.offset=xs,Qn.stride=Go),Qn.divisor!==os&&(Zn.vertexAttribDivisorANGLE(So,os),Qn.divisor=os)):(Qn.buffer&&(_e.disableVertexAttribArray(So),Qn.buffer=null),(Qn.x!==lo||Qn.y!==$a||Qn.z!==Xo||Qn.w!==rs)&&(_e.vertexAttrib4f(So,lo,$a,Xo,rs),Qn.x=lo,Qn.y=$a,Qn.z=Xo,Qn.w=rs)),rl=Nr.dashLength,_e.uniform1f(E.location,rl),$o=Nr.dashTexture,$o&&$o._reglType==="framebuffer"&&($o=$o.color[0]),Na=$o._texture,_e.uniform1i(A.location,Na.bind()),Ua=Nr.depth,_e.uniform1f(L.location,Ua),Po=Nr.miterLimit,_e.uniform1f(_.location,Po),fo=M.call(this,Fe,Nr,0),_e.uniform1f(C.location,fo),ro=Nr.opacity,_e.uniform1f(v.location,ro),Ma=Nr.scale,io=Ma[0],aa=Ma[1],_e.uniform2f(z.location,io,aa),Oo=Nr.thickness,_e.uniform1f(T.location,Oo),No=Nr.translate,Zs=No[0],Fs=No[1],_e.uniform2f(F.location,Zs,Fs),ws=U.call(this,Fe,Nr,0),no=ws[0],Ls=ws[1],ds=ws[2],Xs=ws[3],_e.uniform4f(q.location,no,Ls,ds,Xs),oa=ye.elements,oa?_e.bindBuffer(34963,oa.buffer.buffer):St.currentVAO&&(oa=ue.getElements(St.currentVAO.elements),oa&&_e.bindBuffer(34963,oa.buffer.buffer)),Yo=Nr.count,Yo>0?oa?Zn.drawElementsInstancedANGLE(5,4,oa.type,0<<(oa.type-5121>>1),Yo):Zn.drawArraysInstancedANGLE(5,0,4,Yo):Yo<0&&(oa?_e.drawElements(5,4,oa.type,0<<(oa.type-5121>>1)):_e.drawArrays(5,0,4)),lt.dirty=!0,St.setVAO(null),Fe.viewportWidth=_a,Fe.viewportHeight=Wn,Dn&&(r.cpuTime+=performance.now()-un),Ba&&de.destroyStream(Xn),bo&&de.destroyStream(Nn),bs&&de.destroyStream(on),Da&&de.destroyStream(ea),Ao&&de.destroyStream(ta),Zo&&de.destroyStream($n),Na.unbind()},scope:function(Nr,hi,Gi){var Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye;Qr=Nr.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:Fe.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:Fe.framebufferHeight-zn,_a=Fe.viewportWidth,Fe.viewportWidth=fn,Wn=Fe.viewportHeight,Fe.viewportHeight=xn,Fn=Ni[0],Ni[0]=Ui,ia=Ni[1],Ni[1]=zn,za=Ni[2],Ni[2]=fn,Hr=Ni[3],Ni[3]=xn,na=si[0],si[0]=H,go=si[1],si[1]=j,Dn=si[2],si[2]=G,un=si[3],si[3]=O,Zn=Ie.blend_enable,Ie.blend_enable=W,Wo=Si[0],Si[0]=re,Ba=Si[1],Si[1]=ne,Bo=Hi[0],Hi[0]=be,Ea=Hi[1],Hi[1]=ze,Ha=Hi[2],Hi[2]=Ce,tn=Hi[3],Hi[3]=he,Cn=Ie.cull_enable,Ie.cull_enable=te,Xn=Ie.cull_face,Ie.cull_face=ke,ts=o.call(this,Fe,Nr,Gi),Ja=Ie.depth_enable,Ie.depth_enable=ts,to=Nr.viewport,Ri=to.x|0,an=to.y|0,cs="width"in to?to.width|0:Fe.framebufferWidth-Ri,pa="height"in to?to.height|0:Fe.framebufferHeight-an,ln=Pi[0],Pi[0]=Ri,ka=Pi[1],Pi[1]=an,va=Pi[2],Pi[2]=cs,bo=Pi[3],Pi[3]=pa,Co=Ie.scissor_enable,Ie.scissor_enable=Ee,Fi=Ie.stencil_enable,Ie.stencil_enable=Me,Yn=lt.profile,Yn&&(xa=performance.now(),r.count++),Qi=ye.offset,ye.offset=Oe,Nn=ye.count,ye.count=Re,Pn=Nr.count,qa=ye.instances,ye.instances=Pn,jo=ye.primitive,ye.primitive=me,Vo=M.call(this,Fe,Nr,Gi),Pa=Zt[Be],Zt[Be]=Vo,Oa=Nr.miterLimit,co=Zt[fe],Zt[fe]=Oa,An=Nr.scale,_o=Zt[Ze],Zt[Ze]=An,ks=Nr.scaleFract,bs=Zt[et],Zt[et]=ks,ps=Nr.translateFract,sa=Zt[gt],Zt[gt]=ps,Bn=Nr.translate,ms=Zt[Pt],Zt[Pt]=Bn,ya=Nr.thickness,on=Zt[Qe],Zt[Qe]=ya,mn=Nr.dashTexture,Ga=Zt[Xe],Zt[Xe]=mn,ca=Nr.opacity,bn=Zt[Tt],Zt[Tt]=ca,Xi=Fe.pixelRatio,qn=Zt[xt],Zt[xt]=Xi,Ia=Nr.id,yn=Zt[_t],Zt[_t]=Ia,Ya=Nr.dashLength,ba=Zt[Ct],Zt[Ct]=Ya,Da=U.call(this,Fe,Nr,Gi),Aa=Zt[jt],Zt[jt]=Da,Ln=Nr.depth,wo=Zt[At],Zt[At]=Ln,wa=Te.state,Te.state=1,$i=Te.x,Te.x=0,ea=Te.y,Te.y=0,Sa=Te.z,Te.z=0,Za=Te.w,Te.w=0,xo=Te.buffer,Te.buffer=p,Wa=Te.size,Te.size=0,hn=Te.normalized,Te.normalized=!1,Un=Te.type,Te.type=5126,Ss=Te.offset,Te.offset=0,Kn=Te.stride,Te.stride=8,ns=Te.divisor,Te.divisor=0,Jo=nt.state,nt.state=1,vo=nt.x,nt.x=0,ma=nt.y,nt.y=0,ja=nt.z,nt.z=0,To=nt.w,nt.w=0,Ao=nt.buffer,nt.buffer=p,la=nt.size,nt.size=0,Ki=nt.normalized,nt.normalized=!1,ho=nt.type,nt.type=5126,Ka=nt.offset,nt.offset=4,Ca=nt.stride,nt.stride=8,ta=nt.divisor,nt.divisor=0,En=Nr.colorBuffer,fi.buffer=En,Mo=!1,Ds=1,Ro=0,vs=0,Ks=0,as=0,Jn=null,Cs=0,Xa=!1,Zo=5126,Eo=0,lo=0,$a=0,Er(fi)?(Mo=!0,Jn=de.createStream(34962,fi),Zo=Jn.dtype):(Jn=de.getBuffer(fi),Jn?Zo=Jn.dtype:"constant"in fi?(Ds=2,typeof fi.constant=="number"?(Ro=fi.constant,vs=Ks=as=0):(Ro=fi.constant.length>0?fi.constant[0]:0,vs=fi.constant.length>1?fi.constant[1]:0,Ks=fi.constant.length>2?fi.constant[2]:0,as=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?Jn=de.createStream(34962,fi.buffer):Jn=de.getBuffer(fi.buffer),Zo="type"in fi?Mi[fi.type]:Jn.dtype,Xa=!!fi.normalized,Cs=fi.size|0,Eo=fi.offset|0,lo=fi.stride|0,$a=fi.divisor|0)),Xo=ut.state,ut.state=Ds,rs=ut.x,ut.x=Ro,$n=ut.y,ut.y=vs,Sn=ut.z,ut.z=Ks,uo=ut.w,ut.w=as,Rs=ut.buffer,ut.buffer=Jn,xs=ut.size,ut.size=Cs,Go=ut.normalized,ut.normalized=Xa,os=ut.type,ut.type=Zo,So=ut.offset,ut.offset=Eo,Qn=ut.stride,ut.stride=lo,zo=ut.divisor,ut.divisor=$a,rl=Nr.colorBuffer,Or.buffer=rl,$o=!1,Na=1,Ua=0,Po=0,fo=0,ro=0,Ma=null,io=0,aa=!1,Oo=5126,No=0,Zs=0,Fs=0,Er(Or)?($o=!0,Ma=de.createStream(34962,Or),Oo=Ma.dtype):(Ma=de.getBuffer(Or),Ma?Oo=Ma.dtype:"constant"in Or?(Na=2,typeof Or.constant=="number"?(Ua=Or.constant,Po=fo=ro=0):(Ua=Or.constant.length>0?Or.constant[0]:0,Po=Or.constant.length>1?Or.constant[1]:0,fo=Or.constant.length>2?Or.constant[2]:0,ro=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?Ma=de.createStream(34962,Or.buffer):Ma=de.getBuffer(Or.buffer),Oo="type"in Or?Mi[Or.type]:Ma.dtype,aa=!!Or.normalized,io=Or.size|0,No=Or.offset|0,Zs=Or.stride|0,Fs=Or.divisor|0)),ws=ct.state,ct.state=Na,no=ct.x,ct.x=Ua,Ls=ct.y,ct.y=Po,ds=ct.z,ct.z=fo,Xs=ct.w,ct.w=ro,oa=ct.buffer,ct.buffer=Ma,Yo=ct.size,ct.size=io,po=ct.normalized,ct.normalized=aa,ss=ct.type,ct.type=Oo,ls=ct.offset,ct.offset=No,gs=ct.stride,ct.stride=Zs,bt=ct.divisor,ct.divisor=Fs,Ft=Nr.positionBuffer,st.buffer=Ft,hr=!1,nr=1,Sr=0,li=0,di=0,mi=0,Oi=null,dn=0,wi=!1,ui=5126,Ai=0,gi=0,gn=0,Er(st)?(hr=!0,Oi=de.createStream(34962,st),ui=Oi.dtype):(Oi=de.getBuffer(st),Oi?ui=Oi.dtype:"constant"in st?(nr=2,typeof st.constant=="number"?(Sr=st.constant,li=di=mi=0):(Sr=st.constant.length>0?st.constant[0]:0,li=st.constant.length>1?st.constant[1]:0,di=st.constant.length>2?st.constant[2]:0,mi=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?Oi=de.createStream(34962,st.buffer):Oi=de.getBuffer(st.buffer),ui="type"in st?Mi[st.type]:Oi.dtype,wi=!!st.normalized,dn=st.size|0,Ai=st.offset|0,gi=st.stride|0,gn=st.divisor|0)),In=rt.state,rt.state=nr,Vn=rt.x,rt.x=Sr,Rn=rt.y,rt.y=li,Hn=rt.z,rt.z=di,Gn=rt.w,rt.w=mi,pn=rt.buffer,rt.buffer=Oi,Lo=rt.size,rt.size=dn,us=rt.normalized,rt.normalized=wi,Bs=rt.type,rt.type=ui,Js=rt.offset,rt.offset=Ai,ol=rt.stride,rt.stride=gi,Cl=rt.divisor,rt.divisor=gn,ul=Nr.positionBuffer,Wt.buffer=ul,Gl=!1,Vl=1,Fl=0,ga=0,ko=0,zs=0,Fo=null,Ys=0,Gs=!1,Us=5126,Sl=0,_l=0,kl=0,Er(Wt)?(Gl=!0,Fo=de.createStream(34962,Wt),Us=Fo.dtype):(Fo=de.getBuffer(Wt),Fo?Us=Fo.dtype:"constant"in Wt?(Vl=2,typeof Wt.constant=="number"?(Fl=Wt.constant,ga=ko=zs=0):(Fl=Wt.constant.length>0?Wt.constant[0]:0,ga=Wt.constant.length>1?Wt.constant[1]:0,ko=Wt.constant.length>2?Wt.constant[2]:0,zs=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Fo=de.createStream(34962,Wt.buffer):Fo=de.getBuffer(Wt.buffer),Us="type"in Wt?Mi[Wt.type]:Fo.dtype,Gs=!!Wt.normalized,Ys=Wt.size|0,Sl=Wt.offset|0,_l=Wt.stride|0,kl=Wt.divisor|0)),cl=je.state,je.state=Vl,xl=je.x,je.x=Fl,Uo=je.y,je.y=ga,_s=je.z,je.z=ko,Bl=je.w,je.w=zs,Il=je.buffer,je.buffer=Fo,Dl=je.size,je.size=Ys,oe=je.normalized,je.normalized=Gs,w=je.type,je.type=Us,B=je.offset,je.offset=Sl,Q=je.stride,je.stride=_l,ee=je.divisor,je.divisor=kl,le=Nr.positionBuffer,tr.buffer=le,Ne=!1,$e=1,pt=0,zt=0,Yt=0,Jt=0,yr=null,Ir=0,ce=!1,Ae=5126,qe=0,Ve=0,ot=0,Er(tr)?(Ne=!0,yr=de.createStream(34962,tr),Ae=yr.dtype):(yr=de.getBuffer(tr),yr?Ae=yr.dtype:"constant"in tr?($e=2,typeof tr.constant=="number"?(pt=tr.constant,zt=Yt=Jt=0):(pt=tr.constant.length>0?tr.constant[0]:0,zt=tr.constant.length>1?tr.constant[1]:0,Yt=tr.constant.length>2?tr.constant[2]:0,Jt=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?yr=de.createStream(34962,tr.buffer):yr=de.getBuffer(tr.buffer),Ae="type"in tr?Mi[tr.type]:yr.dtype,ce=!!tr.normalized,Ir=tr.size|0,qe=tr.offset|0,Ve=tr.stride|0,ot=tr.divisor|0)),Ke=tt.state,tt.state=$e,ft=tt.x,tt.x=pt,qt=tt.y,tt.y=zt,Xt=tt.z,tt.z=Yt,$t=tt.w,tt.w=Jt,dr=tt.buffer,tt.buffer=yr,Mr=tt.size,tt.size=Ir,$r=tt.normalized,tt.normalized=ce,ii=tt.type,tt.type=Ae,pi=tt.offset,tt.offset=qe,Yi=tt.stride,tt.stride=Ve,wn=tt.divisor,tt.divisor=ot,Tn=Nr.positionBuffer,or.buffer=Tn,ua=!1,oo=1,el=0,ys=0,il=0,$l=0,pl=null,Hl=0,Ll=!1,Ql=5126,ku=0,Jl=0,Kl=0,Er(or)?(ua=!0,pl=de.createStream(34962,or),Ql=pl.dtype):(pl=de.getBuffer(or),pl?Ql=pl.dtype:"constant"in or?(oo=2,typeof or.constant=="number"?(el=or.constant,ys=il=$l=0):(el=or.constant.length>0?or.constant[0]:0,ys=or.constant.length>1?or.constant[1]:0,il=or.constant.length>2?or.constant[2]:0,$l=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?pl=de.createStream(34962,or.buffer):pl=de.getBuffer(or.buffer),Ql="type"in or?Mi[or.type]:pl.dtype,Ll=!!or.normalized,Hl=or.size|0,ku=or.offset|0,Jl=or.stride|0,Kl=or.divisor|0)),Hu=Je.state,Je.state=oo,tf=Je.x,Je.x=el,Ku=Je.y,Je.y=ys,Gu=Je.z,Je.z=il,Wu=Je.w,Je.w=$l,sf=Je.buffer,Je.buffer=pl,gf=Je.size,Je.size=Hl,nf=Je.normalized,Je.normalized=Ll,af=Je.type,Je.type=Ql,X=Je.offset,Je.offset=ku,se=Je.stride,Je.stride=Jl,Le=Je.divisor,Je.divisor=Kl,We=ht.vert,ht.vert=Mt,Ye=ht.frag,ht.frag=Vt,lt.dirty=!0,hi(Fe,Nr,Gi),Fe.viewportWidth=_a,Fe.viewportHeight=Wn,Ni[0]=Fn,Ni[1]=ia,Ni[2]=za,Ni[3]=Hr,si[0]=na,si[1]=go,si[2]=Dn,si[3]=un,Ie.blend_enable=Zn,Si[0]=Wo,Si[1]=Ba,Hi[0]=Bo,Hi[1]=Ea,Hi[2]=Ha,Hi[3]=tn,Ie.cull_enable=Cn,Ie.cull_face=Xn,Ie.depth_enable=Ja,Pi[0]=ln,Pi[1]=ka,Pi[2]=va,Pi[3]=bo,Ie.scissor_enable=Co,Ie.stencil_enable=Fi,Yn&&(r.cpuTime+=performance.now()-xa),ye.offset=Qi,ye.count=Nn,ye.instances=qa,ye.primitive=jo,Zt[Be]=Pa,Zt[fe]=co,Zt[Ze]=_o,Zt[et]=bs,Zt[gt]=sa,Zt[Pt]=ms,Zt[Qe]=on,Zt[Xe]=Ga,Zt[Tt]=bn,Zt[xt]=qn,Zt[_t]=yn,Zt[Ct]=ba,Zt[jt]=Aa,Zt[At]=wo,Te.state=wa,Te.x=$i,Te.y=ea,Te.z=Sa,Te.w=Za,Te.buffer=xo,Te.size=Wa,Te.normalized=hn,Te.type=Un,Te.offset=Ss,Te.stride=Kn,Te.divisor=ns,nt.state=Jo,nt.x=vo,nt.y=ma,nt.z=ja,nt.w=To,nt.buffer=Ao,nt.size=la,nt.normalized=Ki,nt.type=ho,nt.offset=Ka,nt.stride=Ca,nt.divisor=ta,Mo&&de.destroyStream(Jn),ut.state=Xo,ut.x=rs,ut.y=$n,ut.z=Sn,ut.w=uo,ut.buffer=Rs,ut.size=xs,ut.normalized=Go,ut.type=os,ut.offset=So,ut.stride=Qn,ut.divisor=zo,$o&&de.destroyStream(Ma),ct.state=ws,ct.x=no,ct.y=Ls,ct.z=ds,ct.w=Xs,ct.buffer=oa,ct.size=Yo,ct.normalized=po,ct.type=ss,ct.offset=ls,ct.stride=gs,ct.divisor=bt,hr&&de.destroyStream(Oi),rt.state=In,rt.x=Vn,rt.y=Rn,rt.z=Hn,rt.w=Gn,rt.buffer=pn,rt.size=Lo,rt.normalized=us,rt.type=Bs,rt.offset=Js,rt.stride=ol,rt.divisor=Cl,Gl&&de.destroyStream(Fo),je.state=cl,je.x=xl,je.y=Uo,je.z=_s,je.w=Bl,je.buffer=Il,je.size=Dl,je.normalized=oe,je.type=w,je.offset=B,je.stride=Q,je.divisor=ee,Ne&&de.destroyStream(yr),tt.state=Ke,tt.x=ft,tt.y=qt,tt.z=Xt,tt.w=$t,tt.buffer=dr,tt.size=Mr,tt.normalized=$r,tt.type=ii,tt.offset=pi,tt.stride=Yi,tt.divisor=wn,ua&&de.destroyStream(pl),Je.state=Hu,Je.x=tf,Je.y=Ku,Je.z=Gu,Je.w=Wu,Je.buffer=sf,Je.size=gf,Je.normalized=nf,Je.type=af,Je.offset=X,Je.stride=se,Je.divisor=Le,ht.vert=We,ht.frag=Ye,lt.dirty=!0},batch:function(Nr,hi){var Gi,Qr,Ui,zn,fn,xn,_a;if(Gi=Lr.angle_instanced_arrays,Qr=qr.next,Qr!==qr.cur&&(Qr?_e.bindFramebuffer(36160,Qr.framebuffer):_e.bindFramebuffer(36160,null),qr.cur=Qr),lt.dirty){var Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co;Wn=Ie.dither,Wn!==lt.dither&&(Wn?_e.enable(3024):_e.disable(3024),lt.dither=Wn),Fn=Ie.depth_func,Fn!==lt.depth_func&&(_e.depthFunc(Fn),lt.depth_func=Fn),ia=ci[0],za=ci[1],(ia!==Di[0]||za!==Di[1])&&(_e.depthRange(ia,za),Di[0]=ia,Di[1]=za),Hr=Ie.depth_mask,Hr!==lt.depth_mask&&(_e.depthMask(Hr),lt.depth_mask=Hr),na=Lt[0],go=Lt[1],Dn=Lt[2],un=Lt[3],(na!==vt[0]||go!==vt[1]||Dn!==vt[2]||un!==vt[3])&&(_e.colorMask(na,go,Dn,un),vt[0]=na,vt[1]=go,vt[2]=Dn,vt[3]=un),Zn=Ie.frontFace,Zn!==lt.frontFace&&(_e.frontFace(Zn),lt.frontFace=Zn),Wo=Ie.lineWidth,Wo!==lt.lineWidth&&(_e.lineWidth(Wo),lt.lineWidth=Wo),Ba=Ie.polygonOffset_enable,Ba!==lt.polygonOffset_enable&&(Ba?_e.enable(32823):_e.disable(32823),lt.polygonOffset_enable=Ba),Bo=Dt[0],Ea=Dt[1],(Bo!==Bt[0]||Ea!==Bt[1])&&(_e.polygonOffset(Bo,Ea),Bt[0]=Bo,Bt[1]=Ea),Ha=Ie.sample_alpha,Ha!==lt.sample_alpha&&(Ha?_e.enable(32926):_e.disable(32926),lt.sample_alpha=Ha),tn=Ie.sample_enable,tn!==lt.sample_enable&&(tn?_e.enable(32928):_e.disable(32928),lt.sample_enable=tn),Cn=sr[0],Xn=sr[1],(Cn!==br[0]||Xn!==br[1])&&(_e.sampleCoverage(Cn,Xn),br[0]=Cn,br[1]=Xn),ts=Ie.stencil_mask,ts!==lt.stencil_mask&&(_e.stencilMask(ts),lt.stencil_mask=ts),Ja=zr[0],to=zr[1],Ri=zr[2],(Ja!==Tr[0]||to!==Tr[1]||Ri!==Tr[2])&&(_e.stencilFunc(Ja,to,Ri),Tr[0]=Ja,Tr[1]=to,Tr[2]=Ri),an=Rr[0],cs=Rr[1],pa=Rr[2],ln=Rr[3],(an!==Br[0]||cs!==Br[1]||pa!==Br[2]||ln!==Br[3])&&(_e.stencilOpSeparate(an,cs,pa,ln),Br[0]=an,Br[1]=cs,Br[2]=pa,Br[3]=ln),ka=oi[0],va=oi[1],bo=oi[2],Co=oi[3],(ka!==vi[0]||va!==vi[1]||bo!==vi[2]||Co!==vi[3])&&(_e.stencilOpSeparate(ka,va,bo,Co),vi[0]=ka,vi[1]=va,vi[2]=bo,vi[3]=Co)}_e.blendColor(0,0,0,0),Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0,Kt?_e.enable(3042):_e.disable(3042),lt.blend_enable=Kt,_e.blendEquationSeparate(32774,32774),xi[0]=32774,xi[1]=32774,_e.blendFuncSeparate(770,771,773,1),Jr[0]=770,Jr[1]=771,Jr[2]=773,Jr[3]=1,ir?_e.enable(2884):_e.disable(2884),lt.cull_enable=ir,_e.cullFace(fr),lt.cull_face=fr,Ot?_e.enable(3089):_e.disable(3089),lt.scissor_enable=Ot,De?_e.enable(2960):_e.disable(2960),lt.stencil_enable=De,Ui=lt.profile,Ui&&(zn=performance.now(),r.count+=hi),_e.useProgram(l.program),fn=Lr.angle_instanced_arrays;var Fi,Yn,xa,Qi,Nn;for(St.setVAO(null),Fi=x.location,Yn=Et[Fi],Yn.buffer||_e.enableVertexAttribArray(Fi),(Yn.type!==5126||Yn.size!==1||Yn.buffer!==p||Yn.normalized!==!1||Yn.offset!==0||Yn.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(Fi,1,5126,!1,8,0),Yn.type=5126,Yn.size=1,Yn.buffer=p,Yn.normalized=!1,Yn.offset=0,Yn.stride=8),Yn.divisor!==0&&(fn.vertexAttribDivisorANGLE(Fi,0),Yn.divisor=0),xa=b.location,Qi=Et[xa],Qi.buffer||_e.enableVertexAttribArray(xa),(Qi.type!==5126||Qi.size!==1||Qi.buffer!==p||Qi.normalized!==!1||Qi.offset!==4||Qi.stride!==8)&&(_e.bindBuffer(34962,p.buffer),_e.vertexAttribPointer(xa,1,5126,!1,8,4),Qi.type=5126,Qi.size=1,Qi.buffer=p,Qi.normalized=!1,Qi.offset=4,Qi.stride=8),Qi.divisor!==0&&(fn.vertexAttribDivisorANGLE(xa,0),Qi.divisor=0),Nn=ye.elements,Nn?_e.bindBuffer(34963,Nn.buffer.buffer):St.currentVAO&&(Nn=ue.getElements(St.currentVAO.elements),Nn&&_e.bindBuffer(34963,Nn.buffer.buffer)),xn=0;xn0?fi.constant[0]:0,mn=fi.constant.length>1?fi.constant[1]:0,Ga=fi.constant.length>2?fi.constant[2]:0,ca=fi.constant.length>3?fi.constant[3]:0)):(Er(fi.buffer)?bn=de.createStream(34962,fi.buffer):bn=de.getBuffer(fi.buffer),Ia="type"in fi?Mi[fi.type]:bn.dtype,qn=!!fi.normalized,Xi=fi.size|0,yn=fi.offset|0,Ya=fi.stride|0,ba=fi.divisor|0)),Da=f.location,Aa=Et[Da],ya===1?(Aa.buffer||_e.enableVertexAttribArray(Da),Ln=Xi||4,(Aa.type!==Ia||Aa.size!==Ln||Aa.buffer!==bn||Aa.normalized!==qn||Aa.offset!==yn||Aa.stride!==Ya)&&(_e.bindBuffer(34962,bn.buffer),_e.vertexAttribPointer(Da,Ln,Ia,qn,Ya,yn),Aa.type=Ia,Aa.size=Ln,Aa.buffer=bn,Aa.normalized=qn,Aa.offset=yn,Aa.stride=Ya),Aa.divisor!==ba&&(fn.vertexAttribDivisorANGLE(Da,ba),Aa.divisor=ba)):(Aa.buffer&&(_e.disableVertexAttribArray(Da),Aa.buffer=null),(Aa.x!==on||Aa.y!==mn||Aa.z!==Ga||Aa.w!==ca)&&(_e.vertexAttrib4f(Da,on,mn,Ga,ca),Aa.x=on,Aa.y=mn,Aa.z=Ga,Aa.w=ca)),wo=_a.positionBuffer,Wt.buffer=wo,wa=!1,$i=1,ea=0,Sa=0,Za=0,xo=0,Wa=null,hn=0,Un=!1,Ss=5126,Kn=0,ns=0,Jo=0,Er(Wt)?(wa=!0,Wa=de.createStream(34962,Wt),Ss=Wa.dtype):(Wa=de.getBuffer(Wt),Wa?Ss=Wa.dtype:"constant"in Wt?($i=2,typeof Wt.constant=="number"?(ea=Wt.constant,Sa=Za=xo=0):(ea=Wt.constant.length>0?Wt.constant[0]:0,Sa=Wt.constant.length>1?Wt.constant[1]:0,Za=Wt.constant.length>2?Wt.constant[2]:0,xo=Wt.constant.length>3?Wt.constant[3]:0)):(Er(Wt.buffer)?Wa=de.createStream(34962,Wt.buffer):Wa=de.getBuffer(Wt.buffer),Ss="type"in Wt?Mi[Wt.type]:Wa.dtype,Un=!!Wt.normalized,hn=Wt.size|0,Kn=Wt.offset|0,ns=Wt.stride|0,Jo=Wt.divisor|0)),vo=c.location,ma=Et[vo],$i===1?(ma.buffer||_e.enableVertexAttribArray(vo),ja=hn||2,(ma.type!==Ss||ma.size!==ja||ma.buffer!==Wa||ma.normalized!==Un||ma.offset!==Kn||ma.stride!==ns)&&(_e.bindBuffer(34962,Wa.buffer),_e.vertexAttribPointer(vo,ja,Ss,Un,ns,Kn),ma.type=Ss,ma.size=ja,ma.buffer=Wa,ma.normalized=Un,ma.offset=Kn,ma.stride=ns),ma.divisor!==Jo&&(fn.vertexAttribDivisorANGLE(vo,Jo),ma.divisor=Jo)):(ma.buffer&&(_e.disableVertexAttribArray(vo),ma.buffer=null),(ma.x!==ea||ma.y!==Sa||ma.z!==Za||ma.w!==xo)&&(_e.vertexAttrib4f(vo,ea,Sa,Za,xo),ma.x=ea,ma.y=Sa,ma.z=Za,ma.w=xo)),To=_a.colorBuffer,Or.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,Er(Or)?(Ao=!0,ta=de.createStream(34962,Or),Ds=ta.dtype):(ta=de.getBuffer(Or),ta?Ds=ta.dtype:"constant"in Or?(la=2,typeof Or.constant=="number"?(Ki=Or.constant,ho=Ka=Ca=0):(Ki=Or.constant.length>0?Or.constant[0]:0,ho=Or.constant.length>1?Or.constant[1]:0,Ka=Or.constant.length>2?Or.constant[2]:0,Ca=Or.constant.length>3?Or.constant[3]:0)):(Er(Or.buffer)?ta=de.createStream(34962,Or.buffer):ta=de.getBuffer(Or.buffer),Ds="type"in Or?Mi[Or.type]:ta.dtype,Mo=!!Or.normalized,En=Or.size|0,Ro=Or.offset|0,vs=Or.stride|0,Ks=Or.divisor|0)),as=h.location,Jn=Et[as],la===1?(Jn.buffer||_e.enableVertexAttribArray(as),Cs=En||4,(Jn.type!==Ds||Jn.size!==Cs||Jn.buffer!==ta||Jn.normalized!==Mo||Jn.offset!==Ro||Jn.stride!==vs)&&(_e.bindBuffer(34962,ta.buffer),_e.vertexAttribPointer(as,Cs,Ds,Mo,vs,Ro),Jn.type=Ds,Jn.size=Cs,Jn.buffer=ta,Jn.normalized=Mo,Jn.offset=Ro,Jn.stride=vs),Jn.divisor!==Ks&&(fn.vertexAttribDivisorANGLE(as,Ks),Jn.divisor=Ks)):(Jn.buffer&&(_e.disableVertexAttribArray(as),Jn.buffer=null),(Jn.x!==Ki||Jn.y!==ho||Jn.z!==Ka||Jn.w!==Ca)&&(_e.vertexAttrib4f(as,Ki,ho,Ka,Ca),Jn.x=Ki,Jn.y=ho,Jn.z=Ka,Jn.w=Ca)),Xa=_a.positionBuffer,tr.buffer=Xa,Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Er(tr)?(Zo=!0,$n=de.createStream(34962,tr),Rs=$n.dtype):($n=de.getBuffer(tr),$n?Rs=$n.dtype:"constant"in tr?(Eo=2,typeof tr.constant=="number"?(lo=tr.constant,$a=Xo=rs=0):(lo=tr.constant.length>0?tr.constant[0]:0,$a=tr.constant.length>1?tr.constant[1]:0,Xo=tr.constant.length>2?tr.constant[2]:0,rs=tr.constant.length>3?tr.constant[3]:0)):(Er(tr.buffer)?$n=de.createStream(34962,tr.buffer):$n=de.getBuffer(tr.buffer),Rs="type"in tr?Mi[tr.type]:$n.dtype,uo=!!tr.normalized,Sn=tr.size|0,xs=tr.offset|0,Go=tr.stride|0,os=tr.divisor|0)),So=d.location,Qn=Et[So],Eo===1?(Qn.buffer||_e.enableVertexAttribArray(So),zo=Sn||2,(Qn.type!==Rs||Qn.size!==zo||Qn.buffer!==$n||Qn.normalized!==uo||Qn.offset!==xs||Qn.stride!==Go)&&(_e.bindBuffer(34962,$n.buffer),_e.vertexAttribPointer(So,zo,Rs,uo,Go,xs),Qn.type=Rs,Qn.size=zo,Qn.buffer=$n,Qn.normalized=uo,Qn.offset=xs,Qn.stride=Go),Qn.divisor!==os&&(fn.vertexAttribDivisorANGLE(So,os),Qn.divisor=os)):(Qn.buffer&&(_e.disableVertexAttribArray(So),Qn.buffer=null),(Qn.x!==lo||Qn.y!==$a||Qn.z!==Xo||Qn.w!==rs)&&(_e.vertexAttrib4f(So,lo,$a,Xo,rs),Qn.x=lo,Qn.y=$a,Qn.z=Xo,Qn.w=rs)),rl=_a.positionBuffer,or.buffer=rl,$o=!1,Na=1,Ua=0,Po=0,fo=0,ro=0,Ma=null,io=0,aa=!1,Oo=5126,No=0,Zs=0,Fs=0,Er(or)?($o=!0,Ma=de.createStream(34962,or),Oo=Ma.dtype):(Ma=de.getBuffer(or),Ma?Oo=Ma.dtype:"constant"in or?(Na=2,typeof or.constant=="number"?(Ua=or.constant,Po=fo=ro=0):(Ua=or.constant.length>0?or.constant[0]:0,Po=or.constant.length>1?or.constant[1]:0,fo=or.constant.length>2?or.constant[2]:0,ro=or.constant.length>3?or.constant[3]:0)):(Er(or.buffer)?Ma=de.createStream(34962,or.buffer):Ma=de.getBuffer(or.buffer),Oo="type"in or?Mi[or.type]:Ma.dtype,aa=!!or.normalized,io=or.size|0,No=or.offset|0,Zs=or.stride|0,Fs=or.divisor|0)),ws=y.location,no=Et[ws],Na===1?(no.buffer||_e.enableVertexAttribArray(ws),Ls=io||2,(no.type!==Oo||no.size!==Ls||no.buffer!==Ma||no.normalized!==aa||no.offset!==No||no.stride!==Zs)&&(_e.bindBuffer(34962,Ma.buffer),_e.vertexAttribPointer(ws,Ls,Oo,aa,Zs,No),no.type=Oo,no.size=Ls,no.buffer=Ma,no.normalized=aa,no.offset=No,no.stride=Zs),no.divisor!==Fs&&(fn.vertexAttribDivisorANGLE(ws,Fs),no.divisor=Fs)):(no.buffer&&(_e.disableVertexAttribArray(ws),no.buffer=null),(no.x!==Ua||no.y!==Po||no.z!==fo||no.w!==ro)&&(_e.vertexAttrib4f(ws,Ua,Po,fo,ro),no.x=Ua,no.y=Po,no.z=fo,no.w=ro)),ds=_a.positionBuffer,st.buffer=ds,Xs=!1,oa=1,Yo=0,po=0,ss=0,ls=0,gs=null,bt=0,Ft=!1,hr=5126,nr=0,Sr=0,li=0,Er(st)?(Xs=!0,gs=de.createStream(34962,st),hr=gs.dtype):(gs=de.getBuffer(st),gs?hr=gs.dtype:"constant"in st?(oa=2,typeof st.constant=="number"?(Yo=st.constant,po=ss=ls=0):(Yo=st.constant.length>0?st.constant[0]:0,po=st.constant.length>1?st.constant[1]:0,ss=st.constant.length>2?st.constant[2]:0,ls=st.constant.length>3?st.constant[3]:0)):(Er(st.buffer)?gs=de.createStream(34962,st.buffer):gs=de.getBuffer(st.buffer),hr="type"in st?Mi[st.type]:gs.dtype,Ft=!!st.normalized,bt=st.size|0,nr=st.offset|0,Sr=st.stride|0,li=st.divisor|0)),di=k.location,mi=Et[di],oa===1?(mi.buffer||_e.enableVertexAttribArray(di),Oi=bt||2,(mi.type!==hr||mi.size!==Oi||mi.buffer!==gs||mi.normalized!==Ft||mi.offset!==nr||mi.stride!==Sr)&&(_e.bindBuffer(34962,gs.buffer),_e.vertexAttribPointer(di,Oi,hr,Ft,Sr,nr),mi.type=hr,mi.size=Oi,mi.buffer=gs,mi.normalized=Ft,mi.offset=nr,mi.stride=Sr),mi.divisor!==li&&(fn.vertexAttribDivisorANGLE(di,li),mi.divisor=li)):(mi.buffer&&(_e.disableVertexAttribArray(di),mi.buffer=null),(mi.x!==Yo||mi.y!==po||mi.z!==ss||mi.w!==ls)&&(_e.vertexAttrib4f(di,Yo,po,ss,ls),mi.x=Yo,mi.y=po,mi.z=ss,mi.w=ls)),dn=_a.dashLength,(!xn||wi!==dn)&&(wi=dn,_e.uniform1f(E.location,dn)),ui=_a.dashTexture,ui&&ui._reglType==="framebuffer"&&(ui=ui.color[0]),Ai=ui._texture,_e.uniform1i(A.location,Ai.bind()),gi=_a.depth,(!xn||gn!==gi)&&(gn=gi,_e.uniform1f(L.location,gi)),In=_a.miterLimit,(!xn||Vn!==In)&&(Vn=In,_e.uniform1f(_.location,In)),Rn=M.call(this,Fe,_a,xn),(!xn||Hn!==Rn)&&(Hn=Rn,_e.uniform1f(C.location,Rn)),Gn=_a.opacity,(!xn||pn!==Gn)&&(pn=Gn,_e.uniform1f(v.location,Gn)),Lo=_a.scale,us=Lo[0],Js=Lo[1],(!xn||Bs!==us||ol!==Js)&&(Bs=us,ol=Js,_e.uniform2f(z.location,us,Js)),Cl=_a.thickness,(!xn||ul!==Cl)&&(ul=Cl,_e.uniform1f(T.location,Cl)),Gl=_a.translate,Vl=Gl[0],ga=Gl[1],(!xn||Fl!==Vl||ko!==ga)&&(Fl=Vl,ko=ga,_e.uniform2f(F.location,Vl,ga)),zs=U.call(this,Fe,_a,xn),Fo=zs[0],Gs=zs[1],Sl=zs[2],kl=zs[3],(!xn||Ys!==Fo||Us!==Gs||_l!==Sl||cl!==kl)&&(Ys=Fo,Us=Gs,_l=Sl,cl=kl,_e.uniform4f(q.location,Fo,Gs,Sl,kl)),xl=_a.count,xl>0?Nn?fn.drawElementsInstancedANGLE(5,4,Nn.type,0<<(Nn.type-5121>>1),xl):fn.drawArraysInstancedANGLE(5,0,4,xl):xl<0&&(Nn?_e.drawElements(5,4,Nn.type,0<<(Nn.type-5121>>1)):_e.drawArrays(5,0,4)),Fe.viewportWidth=Oa,Fe.viewportHeight=co,ms&&de.destroyStream(bn),wa&&de.destroyStream(Wa),Ao&&de.destroyStream(ta),Zo&&de.destroyStream($n),$o&&de.destroyStream(Ma),Xs&&de.destroyStream(gs),Ai.unbind()}lt.dirty=!0,St.setVAO(null),Ui&&(r.cpuTime+=performance.now()-zn)}}}});var M9=Se((i1r,NOe)=>{NOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze){"use strict";var et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci;return et=t.gl,gt=t.context,Pt=t.strings,Qe=t.next,Xe=t.current,Tt=t.draw,xt=t.elements,_t=t.buffer,Ct=t.shader,jt=t.attributes,At=t.vao,Te=t.uniforms,nt=t.framebuffer,ut=t.extensions,ct=t.timer,rt=t.isBufferArgs,je=Qe.blend_color,tt=Xe.blend_color,Je=Qe.blend_equation,Mt=Xe.blend_equation,Vt=Qe.blend_func,Kt=Xe.blend_func,ir=Qe.depth_range,fr=Xe.depth_range,Ot=Qe.colorMask,De=Xe.colorMask,_e=Qe.polygonOffset_offset,Fe=Xe.polygonOffset_offset,Pe=Qe.sample_coverage,Ie=Xe.sample_coverage,lt=Qe.stencil_func,ye=Xe.stencil_func,ue=Qe.stencil_opFront,de=Xe.stencil_opFront,ht=Qe.stencil_opBack,Et=Xe.stencil_opBack,St=Qe.scissor_box,Zt=Xe.scissor_box,qr=Qe.viewport,Lr=Xe.viewport,vr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Er={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},si={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ei={add:32774,subtract:32778,"reverse subtract":32779},Si={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Hi={cw:2304,ccw:2305},Jr={},Jr.stride=8,Jr.offset=8,ci={},ci.stride=8,ci.offset=8,{draw:function(Di){var Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa;if(Lt=ut.angle_instanced_arrays,vt=nt.next,vt!==nt.cur&&(vt?et.bindFramebuffer(36160,vt.framebuffer):et.bindFramebuffer(36160,null),nt.cur=vt),Xe.dirty){var jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea;jo=Qe.dither,jo!==Xe.dither&&(jo?et.enable(3024):et.disable(3024),Xe.dither=jo),Vo=Qe.depth_func,Vo!==Xe.depth_func&&(et.depthFunc(Vo),Xe.depth_func=Vo),Pa=ir[0],Oa=ir[1],(Pa!==fr[0]||Oa!==fr[1])&&(et.depthRange(Pa,Oa),fr[0]=Pa,fr[1]=Oa),co=Qe.depth_mask,co!==Xe.depth_mask&&(et.depthMask(co),Xe.depth_mask=co),An=Ot[0],_o=Ot[1],ks=Ot[2],bs=Ot[3],(An!==De[0]||_o!==De[1]||ks!==De[2]||bs!==De[3])&&(et.colorMask(An,_o,ks,bs),De[0]=An,De[1]=_o,De[2]=ks,De[3]=bs),ps=Qe.cull_enable,ps!==Xe.cull_enable&&(ps?et.enable(2884):et.disable(2884),Xe.cull_enable=ps),sa=Qe.cull_face,sa!==Xe.cull_face&&(et.cullFace(sa),Xe.cull_face=sa),Bn=Qe.frontFace,Bn!==Xe.frontFace&&(et.frontFace(Bn),Xe.frontFace=Bn),ms=Qe.lineWidth,ms!==Xe.lineWidth&&(et.lineWidth(ms),Xe.lineWidth=ms),ya=Qe.polygonOffset_enable,ya!==Xe.polygonOffset_enable&&(ya?et.enable(32823):et.disable(32823),Xe.polygonOffset_enable=ya),on=_e[0],mn=_e[1],(on!==Fe[0]||mn!==Fe[1])&&(et.polygonOffset(on,mn),Fe[0]=on,Fe[1]=mn),Ga=Qe.sample_alpha,Ga!==Xe.sample_alpha&&(Ga?et.enable(32926):et.disable(32926),Xe.sample_alpha=Ga),ca=Qe.sample_enable,ca!==Xe.sample_enable&&(ca?et.enable(32928):et.disable(32928),Xe.sample_enable=ca),bn=Pe[0],Xi=Pe[1],(bn!==Ie[0]||Xi!==Ie[1])&&(et.sampleCoverage(bn,Xi),Ie[0]=bn,Ie[1]=Xi),qn=Qe.stencil_mask,qn!==Xe.stencil_mask&&(et.stencilMask(qn),Xe.stencil_mask=qn),Ia=lt[0],yn=lt[1],Ya=lt[2],(Ia!==ye[0]||yn!==ye[1]||Ya!==ye[2])&&(et.stencilFunc(Ia,yn,Ya),ye[0]=Ia,ye[1]=yn,ye[2]=Ya),ba=ue[0],Da=ue[1],Aa=ue[2],Ln=ue[3],(ba!==de[0]||Da!==de[1]||Aa!==de[2]||Ln!==de[3])&&(et.stencilOpSeparate(ba,Da,Aa,Ln),de[0]=ba,de[1]=Da,de[2]=Aa,de[3]=Ln),wo=ht[0],wa=ht[1],$i=ht[2],ea=ht[3],(wo!==Et[0]||wa!==Et[1]||$i!==Et[2]||ea!==Et[3])&&(et.stencilOpSeparate(wo,wa,$i,ea),Et[0]=wo,Et[1]=wa,Et[2]=$i,Et[3]=ea)}Dt=Di.viewport,Bt=Dt.x|0,sr=Dt.y|0,br="width"in Dt?Dt.width|0:gt.framebufferWidth-Bt,zr="height"in Dt?Dt.height|0:gt.framebufferHeight-sr,Tr=gt.viewportWidth,gt.viewportWidth=br,Rr=gt.viewportHeight,gt.viewportHeight=zr,et.viewport(Bt,sr,br,zr),Lr[0]=Bt,Lr[1]=sr,Lr[2]=br,Lr[3]=zr,et.blendColor(0,0,0,0),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,n?et.enable(3042):et.disable(3042),Xe.blend_enable=n,et.blendEquationSeparate(32774,32774),Mt[0]=32774,Mt[1]=32774,et.blendFuncSeparate(770,771,773,1),Kt[0]=770,Kt[1]=771,Kt[2]=773,Kt[3]=1,i?et.enable(2929):et.disable(2929),Xe.depth_enable=i,Br=Di.viewport,oi=Br.x|0,vi=Br.y|0,Pi="width"in Br?Br.width|0:gt.framebufferWidth-oi,Yr="height"in Br?Br.height|0:gt.framebufferHeight-vi,et.scissor(oi,vi,Pi,Yr),Zt[0]=oi,Zt[1]=vi,Zt[2]=Pi,Zt[3]=Yr,a?et.enable(3089):et.disable(3089),Xe.scissor_enable=a,o?et.enable(2960):et.disable(2960),Xe.stencil_enable=o,Ni=Xe.profile,Ni&&(Ur=performance.now(),r.count++),et.useProgram(s.program),ti=ut.angle_instanced_arrays,At.setVAO(null),ki=Di.positionBuffer,Jr.buffer=ki,ji=!1,Vi=1,zi=0,Mi=0,sn=0,fi=0,Or=null,st=0,Wt=!1,tr=5126,or=0,Nr=0,hi=0,rt(Jr)?(ji=!0,Or=_t.createStream(34962,Jr),tr=Or.dtype):(Or=_t.getBuffer(Jr),Or?tr=Or.dtype:"constant"in Jr?(Vi=2,typeof Jr.constant=="number"?(zi=Jr.constant,Mi=sn=fi=0):(zi=Jr.constant.length>0?Jr.constant[0]:0,Mi=Jr.constant.length>1?Jr.constant[1]:0,sn=Jr.constant.length>2?Jr.constant[2]:0,fi=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?Or=_t.createStream(34962,Jr.buffer):Or=_t.getBuffer(Jr.buffer),tr="type"in Jr?xi[Jr.type]:Or.dtype,Wt=!!Jr.normalized,st=Jr.size|0,or=Jr.offset|0,Nr=Jr.stride|0,hi=Jr.divisor|0)),Gi=u.location,Qr=jt[Gi],Vi===1?(Qr.buffer||et.enableVertexAttribArray(Gi),Ui=st||2,(Qr.type!==tr||Qr.size!==Ui||Qr.buffer!==Or||Qr.normalized!==Wt||Qr.offset!==or||Qr.stride!==Nr)&&(et.bindBuffer(34962,Or.buffer),et.vertexAttribPointer(Gi,Ui,tr,Wt,Nr,or),Qr.type=tr,Qr.size=Ui,Qr.buffer=Or,Qr.normalized=Wt,Qr.offset=or,Qr.stride=Nr),Qr.divisor!==hi&&(ti.vertexAttribDivisorANGLE(Gi,hi),Qr.divisor=hi)):(Qr.buffer&&(et.disableVertexAttribArray(Gi),Qr.buffer=null),(Qr.x!==zi||Qr.y!==Mi||Qr.z!==sn||Qr.w!==fi)&&(et.vertexAttrib4f(Gi,zi,Mi,sn,fi),Qr.x=zi,Qr.y=Mi,Qr.z=sn,Qr.w=fi)),zn=Di.positionFractBuffer,ci.buffer=zn,fn=!1,xn=1,_a=0,Wn=0,Fn=0,ia=0,za=null,Hr=0,na=!1,go=5126,Dn=0,un=0,Zn=0,rt(ci)?(fn=!0,za=_t.createStream(34962,ci),go=za.dtype):(za=_t.getBuffer(ci),za?go=za.dtype:"constant"in ci?(xn=2,typeof ci.constant=="number"?(_a=ci.constant,Wn=Fn=ia=0):(_a=ci.constant.length>0?ci.constant[0]:0,Wn=ci.constant.length>1?ci.constant[1]:0,Fn=ci.constant.length>2?ci.constant[2]:0,ia=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?za=_t.createStream(34962,ci.buffer):za=_t.getBuffer(ci.buffer),go="type"in ci?xi[ci.type]:za.dtype,na=!!ci.normalized,Hr=ci.size|0,Dn=ci.offset|0,un=ci.stride|0,Zn=ci.divisor|0)),Wo=l.location,Ba=jt[Wo],xn===1?(Ba.buffer||et.enableVertexAttribArray(Wo),Bo=Hr||2,(Ba.type!==go||Ba.size!==Bo||Ba.buffer!==za||Ba.normalized!==na||Ba.offset!==Dn||Ba.stride!==un)&&(et.bindBuffer(34962,za.buffer),et.vertexAttribPointer(Wo,Bo,go,na,un,Dn),Ba.type=go,Ba.size=Bo,Ba.buffer=za,Ba.normalized=na,Ba.offset=Dn,Ba.stride=un),Ba.divisor!==Zn&&(ti.vertexAttribDivisorANGLE(Wo,Zn),Ba.divisor=Zn)):(Ba.buffer&&(et.disableVertexAttribArray(Wo),Ba.buffer=null),(Ba.x!==_a||Ba.y!==Wn||Ba.z!==Fn||Ba.w!==ia)&&(et.vertexAttrib4f(Wo,_a,Wn,Fn,ia),Ba.x=_a,Ba.y=Wn,Ba.z=Fn,Ba.w=ia)),Ea=Di.fill,Ha=Ea[0],tn=Ea[1],Cn=Ea[2],Xn=Ea[3],et.uniform4f(f.location,Ha,tn,Cn,Xn),ts=Di.id,et.uniform1f(c.location,ts),Ja=Di.opacity,et.uniform1f(h.location,Ja),to=Di.scale,Ri=to[0],an=to[1],et.uniform2f(d.location,Ri,an),cs=Di.scaleFract,pa=cs[0],ln=cs[1],et.uniform2f(p.location,pa,ln),ka=Di.translate,va=ka[0],bo=ka[1],et.uniform2f(x.location,va,bo),Co=Di.translateFract,Fi=Co[0],Yn=Co[1],et.uniform2f(b.location,Fi,Yn),xa=y.call(this,gt,Di,0),Qi=null,Nn=rt(xa),Nn?Qi=xt.createStream(xa):Qi=xt.getElements(xa),Qi&&et.bindBuffer(34963,Qi.buffer.buffer),Pn=Qi?Qi.vertCount:-1,Pn&&(qa=Tt.instances,qa>0?Qi?ti.drawElementsInstancedANGLE(4,Pn,Qi.type,0<<(Qi.type-5121>>1),qa):ti.drawArraysInstancedANGLE(4,0,Pn,qa):qa<0&&(Qi?et.drawElements(4,Pn,Qi.type,0<<(Qi.type-5121>>1)):et.drawArrays(4,0,Pn)),Xe.dirty=!0,At.setVAO(null),gt.viewportWidth=Tr,gt.viewportHeight=Rr,Ni&&(r.cpuTime+=performance.now()-Ur),ji&&_t.destroyStream(Or),fn&&_t.destroyStream(za),Nn&&xt.destroyStream(Qi))},scope:function(Di,Lt,vt){var Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo;Dt=Di.viewport,Bt=Dt.x|0,sr=Dt.y|0,br="width"in Dt?Dt.width|0:gt.framebufferWidth-Bt,zr="height"in Dt?Dt.height|0:gt.framebufferHeight-sr,Tr=gt.viewportWidth,gt.viewportWidth=br,Rr=gt.viewportHeight,gt.viewportHeight=zr,Br=qr[0],qr[0]=Bt,oi=qr[1],qr[1]=sr,vi=qr[2],qr[2]=br,Pi=qr[3],qr[3]=zr,Yr=je[0],je[0]=k,Ni=je[1],je[1]=E,Ur=je[2],je[2]=A,ti=je[3],je[3]=L,ki=Qe.blend_enable,Qe.blend_enable=_,ji=Je[0],Je[0]=C,Vi=Je[1],Je[1]=M,zi=Vt[0],Vt[0]=v,Mi=Vt[1],Vt[1]=z,sn=Vt[2],Vt[2]=T,fi=Vt[3],Vt[3]=F,Or=Qe.depth_enable,Qe.depth_enable=q,st=Di.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:gt.framebufferWidth-Wt,Nr="height"in st?st.height|0:gt.framebufferHeight-tr,hi=St[0],St[0]=Wt,Gi=St[1],St[1]=tr,Qr=St[2],St[2]=or,Ui=St[3],St[3]=Nr,zn=Qe.scissor_enable,Qe.scissor_enable=U,fn=Qe.stencil_enable,Qe.stencil_enable=H,xn=Xe.profile,xn&&(_a=performance.now(),r.count++),Wn=y.call(this,gt,Di,vt),Fn=null,ia=rt(Wn),ia?Fn=xt.createStream(Wn):Fn=xt.getElements(Wn),za=Tt.elements,Tt.elements=Fn,Hr=Tt.offset,Tt.offset=j,na=Fn?Fn.vertCount:-1,go=Tt.count,Tt.count=na,Dn=Tt.primitive,Tt.primitive=G,un=Di.scale,Zn=Te[O],Te[O]=un,Wo=Di.fill,Ba=Te[W],Te[W]=Wo,Bo=Di.scaleFract,Ea=Te[re],Te[re]=Bo,Ha=Di.translateFract,tn=Te[ne],Te[ne]=Ha,Cn=Di.translate,Xn=Te[be],Te[be]=Cn,ts=Di.opacity,Ja=Te[ze],Te[ze]=ts,to=gt.pixelRatio,Ri=Te[Ce],Te[Ce]=to,an=Di.id,cs=Te[he],Te[he]=an,pa=te.call(this,gt,Di,vt),ln=Te[ke],Te[ke]=pa,ka=Di.positionBuffer,Jr.buffer=ka,va=!1,bo=1,Co=0,Fi=0,Yn=0,xa=0,Qi=null,Nn=0,Pn=!1,qa=5126,jo=0,Vo=0,Pa=0,rt(Jr)?(va=!0,Qi=_t.createStream(34962,Jr),qa=Qi.dtype):(Qi=_t.getBuffer(Jr),Qi?qa=Qi.dtype:"constant"in Jr?(bo=2,typeof Jr.constant=="number"?(Co=Jr.constant,Fi=Yn=xa=0):(Co=Jr.constant.length>0?Jr.constant[0]:0,Fi=Jr.constant.length>1?Jr.constant[1]:0,Yn=Jr.constant.length>2?Jr.constant[2]:0,xa=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?Qi=_t.createStream(34962,Jr.buffer):Qi=_t.getBuffer(Jr.buffer),qa="type"in Jr?xi[Jr.type]:Qi.dtype,Pn=!!Jr.normalized,Nn=Jr.size|0,jo=Jr.offset|0,Vo=Jr.stride|0,Pa=Jr.divisor|0)),Oa=Ee.state,Ee.state=bo,co=Ee.x,Ee.x=Co,An=Ee.y,Ee.y=Fi,_o=Ee.z,Ee.z=Yn,ks=Ee.w,Ee.w=xa,bs=Ee.buffer,Ee.buffer=Qi,ps=Ee.size,Ee.size=Nn,sa=Ee.normalized,Ee.normalized=Pn,Bn=Ee.type,Ee.type=qa,ms=Ee.offset,Ee.offset=jo,ya=Ee.stride,Ee.stride=Vo,on=Ee.divisor,Ee.divisor=Pa,mn=Di.positionFractBuffer,ci.buffer=mn,Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,rt(ci)?(Ga=!0,yn=_t.createStream(34962,ci),Da=yn.dtype):(yn=_t.getBuffer(ci),yn?Da=yn.dtype:"constant"in ci?(ca=2,typeof ci.constant=="number"?(bn=ci.constant,Xi=qn=Ia=0):(bn=ci.constant.length>0?ci.constant[0]:0,Xi=ci.constant.length>1?ci.constant[1]:0,qn=ci.constant.length>2?ci.constant[2]:0,Ia=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?yn=_t.createStream(34962,ci.buffer):yn=_t.getBuffer(ci.buffer),Da="type"in ci?xi[ci.type]:yn.dtype,ba=!!ci.normalized,Ya=ci.size|0,Aa=ci.offset|0,Ln=ci.stride|0,wo=ci.divisor|0)),wa=Me.state,Me.state=ca,$i=Me.x,Me.x=bn,ea=Me.y,Me.y=Xi,Sa=Me.z,Me.z=qn,Za=Me.w,Me.w=Ia,xo=Me.buffer,Me.buffer=yn,Wa=Me.size,Me.size=Ya,hn=Me.normalized,Me.normalized=ba,Un=Me.type,Me.type=Da,Ss=Me.offset,Me.offset=Aa,Kn=Me.stride,Me.stride=Ln,ns=Me.divisor,Me.divisor=wo,Jo=Ct.vert,Ct.vert=Oe,vo=Ct.frag,Ct.frag=Re,Xe.dirty=!0,Lt(gt,Di,vt),gt.viewportWidth=Tr,gt.viewportHeight=Rr,qr[0]=Br,qr[1]=oi,qr[2]=vi,qr[3]=Pi,je[0]=Yr,je[1]=Ni,je[2]=Ur,je[3]=ti,Qe.blend_enable=ki,Je[0]=ji,Je[1]=Vi,Vt[0]=zi,Vt[1]=Mi,Vt[2]=sn,Vt[3]=fi,Qe.depth_enable=Or,St[0]=hi,St[1]=Gi,St[2]=Qr,St[3]=Ui,Qe.scissor_enable=zn,Qe.stencil_enable=fn,xn&&(r.cpuTime+=performance.now()-_a),ia&&xt.destroyStream(Fn),Tt.elements=za,Tt.offset=Hr,Tt.count=go,Tt.primitive=Dn,Te[O]=Zn,Te[W]=Ba,Te[re]=Ea,Te[ne]=tn,Te[be]=Xn,Te[ze]=Ja,Te[Ce]=Ri,Te[he]=cs,Te[ke]=ln,va&&_t.destroyStream(Qi),Ee.state=Oa,Ee.x=co,Ee.y=An,Ee.z=_o,Ee.w=ks,Ee.buffer=bs,Ee.size=ps,Ee.normalized=sa,Ee.type=Bn,Ee.offset=ms,Ee.stride=ya,Ee.divisor=on,Ga&&_t.destroyStream(yn),Me.state=wa,Me.x=$i,Me.y=ea,Me.z=Sa,Me.w=Za,Me.buffer=xo,Me.size=Wa,Me.normalized=hn,Me.type=Un,Me.offset=Ss,Me.stride=Kn,Me.divisor=ns,Ct.vert=Jo,Ct.frag=vo,Xe.dirty=!0},batch:function(Di,Lt){var vt,Dt,Bt,sr,br,zr,Tr;if(vt=ut.angle_instanced_arrays,Dt=nt.next,Dt!==nt.cur&&(Dt?et.bindFramebuffer(36160,Dt.framebuffer):et.bindFramebuffer(36160,null),nt.cur=Dt),Xe.dirty){var Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn;Rr=Qe.dither,Rr!==Xe.dither&&(Rr?et.enable(3024):et.disable(3024),Xe.dither=Rr),Br=Qe.depth_func,Br!==Xe.depth_func&&(et.depthFunc(Br),Xe.depth_func=Br),oi=ir[0],vi=ir[1],(oi!==fr[0]||vi!==fr[1])&&(et.depthRange(oi,vi),fr[0]=oi,fr[1]=vi),Pi=Qe.depth_mask,Pi!==Xe.depth_mask&&(et.depthMask(Pi),Xe.depth_mask=Pi),Yr=Ot[0],Ni=Ot[1],Ur=Ot[2],ti=Ot[3],(Yr!==De[0]||Ni!==De[1]||Ur!==De[2]||ti!==De[3])&&(et.colorMask(Yr,Ni,Ur,ti),De[0]=Yr,De[1]=Ni,De[2]=Ur,De[3]=ti),ki=Qe.cull_enable,ki!==Xe.cull_enable&&(ki?et.enable(2884):et.disable(2884),Xe.cull_enable=ki),ji=Qe.cull_face,ji!==Xe.cull_face&&(et.cullFace(ji),Xe.cull_face=ji),Vi=Qe.frontFace,Vi!==Xe.frontFace&&(et.frontFace(Vi),Xe.frontFace=Vi),zi=Qe.lineWidth,zi!==Xe.lineWidth&&(et.lineWidth(zi),Xe.lineWidth=zi),Mi=Qe.polygonOffset_enable,Mi!==Xe.polygonOffset_enable&&(Mi?et.enable(32823):et.disable(32823),Xe.polygonOffset_enable=Mi),sn=_e[0],fi=_e[1],(sn!==Fe[0]||fi!==Fe[1])&&(et.polygonOffset(sn,fi),Fe[0]=sn,Fe[1]=fi),Or=Qe.sample_alpha,Or!==Xe.sample_alpha&&(Or?et.enable(32926):et.disable(32926),Xe.sample_alpha=Or),st=Qe.sample_enable,st!==Xe.sample_enable&&(st?et.enable(32928):et.disable(32928),Xe.sample_enable=st),Wt=Pe[0],tr=Pe[1],(Wt!==Ie[0]||tr!==Ie[1])&&(et.sampleCoverage(Wt,tr),Ie[0]=Wt,Ie[1]=tr),or=Qe.stencil_mask,or!==Xe.stencil_mask&&(et.stencilMask(or),Xe.stencil_mask=or),Nr=lt[0],hi=lt[1],Gi=lt[2],(Nr!==ye[0]||hi!==ye[1]||Gi!==ye[2])&&(et.stencilFunc(Nr,hi,Gi),ye[0]=Nr,ye[1]=hi,ye[2]=Gi),Qr=ue[0],Ui=ue[1],zn=ue[2],fn=ue[3],(Qr!==de[0]||Ui!==de[1]||zn!==de[2]||fn!==de[3])&&(et.stencilOpSeparate(Qr,Ui,zn,fn),de[0]=Qr,de[1]=Ui,de[2]=zn,de[3]=fn),xn=ht[0],_a=ht[1],Wn=ht[2],Fn=ht[3],(xn!==Et[0]||_a!==Et[1]||Wn!==Et[2]||Fn!==Et[3])&&(et.stencilOpSeparate(xn,_a,Wn,Fn),Et[0]=xn,Et[1]=_a,Et[2]=Wn,Et[3]=Fn)}et.blendColor(0,0,0,0),tt[0]=0,tt[1]=0,tt[2]=0,tt[3]=0,me?et.enable(3042):et.disable(3042),Xe.blend_enable=me,et.blendEquationSeparate(32774,32774),Mt[0]=32774,Mt[1]=32774,et.blendFuncSeparate(770,771,773,1),Kt[0]=770,Kt[1]=771,Kt[2]=773,Kt[3]=1,Be?et.enable(2929):et.disable(2929),Xe.depth_enable=Be,fe?et.enable(3089):et.disable(3089),Xe.scissor_enable=fe,Ze?et.enable(2960):et.disable(2960),Xe.stencil_enable=Ze,Bt=Xe.profile,Bt&&(sr=performance.now(),r.count+=Lt),et.useProgram(s.program),br=ut.angle_instanced_arrays;var ia;for(At.setVAO(null),ia=Tt.instances,zr=0;zr0?Jr.constant[0]:0,Ja=Jr.constant.length>1?Jr.constant[1]:0,to=Jr.constant.length>2?Jr.constant[2]:0,Ri=Jr.constant.length>3?Jr.constant[3]:0)):(rt(Jr.buffer)?an=_t.createStream(34962,Jr.buffer):an=_t.getBuffer(Jr.buffer),ln="type"in Jr?xi[Jr.type]:an.dtype,pa=!!Jr.normalized,cs=Jr.size|0,ka=Jr.offset|0,va=Jr.stride|0,bo=Jr.divisor|0)),Co=u.location,Fi=jt[Co],Xn===1?(Fi.buffer||et.enableVertexAttribArray(Co),Yn=cs||2,(Fi.type!==ln||Fi.size!==Yn||Fi.buffer!==an||Fi.normalized!==pa||Fi.offset!==ka||Fi.stride!==va)&&(et.bindBuffer(34962,an.buffer),et.vertexAttribPointer(Co,Yn,ln,pa,va,ka),Fi.type=ln,Fi.size=Yn,Fi.buffer=an,Fi.normalized=pa,Fi.offset=ka,Fi.stride=va),Fi.divisor!==bo&&(br.vertexAttribDivisorANGLE(Co,bo),Fi.divisor=bo)):(Fi.buffer&&(et.disableVertexAttribArray(Co),Fi.buffer=null),(Fi.x!==ts||Fi.y!==Ja||Fi.z!==to||Fi.w!==Ri)&&(et.vertexAttrib4f(Co,ts,Ja,to,Ri),Fi.x=ts,Fi.y=Ja,Fi.z=to,Fi.w=Ri)),xa=Tr.positionFractBuffer,ci.buffer=xa,Qi=!1,Nn=1,Pn=0,qa=0,jo=0,Vo=0,Pa=null,Oa=0,co=!1,An=5126,_o=0,ks=0,bs=0,rt(ci)?(Qi=!0,Pa=_t.createStream(34962,ci),An=Pa.dtype):(Pa=_t.getBuffer(ci),Pa?An=Pa.dtype:"constant"in ci?(Nn=2,typeof ci.constant=="number"?(Pn=ci.constant,qa=jo=Vo=0):(Pn=ci.constant.length>0?ci.constant[0]:0,qa=ci.constant.length>1?ci.constant[1]:0,jo=ci.constant.length>2?ci.constant[2]:0,Vo=ci.constant.length>3?ci.constant[3]:0)):(rt(ci.buffer)?Pa=_t.createStream(34962,ci.buffer):Pa=_t.getBuffer(ci.buffer),An="type"in ci?xi[ci.type]:Pa.dtype,co=!!ci.normalized,Oa=ci.size|0,_o=ci.offset|0,ks=ci.stride|0,bs=ci.divisor|0)),ps=l.location,sa=jt[ps],Nn===1?(sa.buffer||et.enableVertexAttribArray(ps),Bn=Oa||2,(sa.type!==An||sa.size!==Bn||sa.buffer!==Pa||sa.normalized!==co||sa.offset!==_o||sa.stride!==ks)&&(et.bindBuffer(34962,Pa.buffer),et.vertexAttribPointer(ps,Bn,An,co,ks,_o),sa.type=An,sa.size=Bn,sa.buffer=Pa,sa.normalized=co,sa.offset=_o,sa.stride=ks),sa.divisor!==bs&&(br.vertexAttribDivisorANGLE(ps,bs),sa.divisor=bs)):(sa.buffer&&(et.disableVertexAttribArray(ps),sa.buffer=null),(sa.x!==Pn||sa.y!==qa||sa.z!==jo||sa.w!==Vo)&&(et.vertexAttrib4f(ps,Pn,qa,jo,Vo),sa.x=Pn,sa.y=qa,sa.z=jo,sa.w=Vo)),ms=Tr.fill,ya=ms[0],mn=ms[1],ca=ms[2],Xi=ms[3],(!zr||on!==ya||Ga!==mn||bn!==ca||qn!==Xi)&&(on=ya,Ga=mn,bn=ca,qn=Xi,et.uniform4f(f.location,ya,mn,ca,Xi)),Ia=Tr.id,(!zr||yn!==Ia)&&(yn=Ia,et.uniform1f(c.location,Ia)),Ya=Tr.opacity,(!zr||ba!==Ya)&&(ba=Ya,et.uniform1f(h.location,Ya)),Da=Tr.scale,Aa=Da[0],wo=Da[1],(!zr||Ln!==Aa||wa!==wo)&&(Ln=Aa,wa=wo,et.uniform2f(d.location,Aa,wo)),$i=Tr.scaleFract,ea=$i[0],Za=$i[1],(!zr||Sa!==ea||xo!==Za)&&(Sa=ea,xo=Za,et.uniform2f(p.location,ea,Za)),Wa=Tr.translate,hn=Wa[0],Ss=Wa[1],(!zr||Un!==hn||Kn!==Ss)&&(Un=hn,Kn=Ss,et.uniform2f(x.location,hn,Ss)),ns=Tr.translateFract,Jo=ns[0],ma=ns[1],(!zr||vo!==Jo||ja!==ma)&&(vo=Jo,ja=ma,et.uniform2f(b.location,Jo,ma)),To=y.call(this,gt,Tr,zr),Ao=null,la=rt(To),la?Ao=xt.createStream(To):Ao=xt.getElements(To),Ao&&et.bindBuffer(34963,Ao.buffer.buffer),Ki=Ao?Ao.vertCount:-1,Ki&&(ia>0?Ao?br.drawElementsInstancedANGLE(4,Ki,Ao.type,0<<(Ao.type-5121>>1),ia):br.drawArraysInstancedANGLE(4,0,Ki,ia):ia<0&&(Ao?et.drawElements(4,Ki,Ao.type,0<<(Ao.type-5121>>1)):et.drawArrays(4,0,Ki)),gt.viewportWidth=un,gt.viewportHeight=Zn,Cn&&_t.destroyStream(an),Qi&&_t.destroyStream(Pa),la&&xt.destroyStream(Ao))}Xe.dirty=!0,At.setVAO(null),Bt&&(r.cpuTime+=performance.now()-sr)}}}});var E9=Se((n1r,UOe)=>{UOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot){"use strict";var De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi;return De=t.gl,_e=t.context,Fe=t.strings,Pe=t.next,Ie=t.current,lt=t.draw,ye=t.elements,ue=t.buffer,de=t.shader,ht=t.attributes,Et=t.vao,St=t.uniforms,Zt=t.framebuffer,qr=t.extensions,Lr=t.timer,vr=t.isBufferArgs,Er=Pe.blend_color,si=Ie.blend_color,Ei=Pe.blend_equation,Si=Ie.blend_equation,xi=Pe.blend_func,Hi=Ie.blend_func,Jr=Pe.depth_range,ci=Ie.depth_range,Di=Pe.colorMask,Lt=Ie.colorMask,vt=Pe.polygonOffset_offset,Dt=Ie.polygonOffset_offset,Bt=Pe.sample_coverage,sr=Ie.sample_coverage,br=Pe.stencil_func,zr=Ie.stencil_func,Tr=Pe.stencil_opFront,Rr=Ie.stencil_opFront,Br=Pe.stencil_opBack,oi=Ie.stencil_opBack,vi=Pe.scissor_box,Pi=Ie.scissor_box,Yr=Pe.viewport,Ni=Ie.viewport,Ur={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ti={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ki={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ji={add:32774,subtract:32778,"reverse subtract":32779},Vi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Mi={cw:2304,ccw:2305},{draw:function(sn){var fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl;if(fi=qr.angle_instanced_arrays,Or=Zt.next,Or!==Zt.cur&&(Or?De.bindFramebuffer(36160,Or.framebuffer):De.bindFramebuffer(36160,null),Zt.cur=Or),Ie.dirty){var _l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr;_l=Pe.dither,_l!==Ie.dither&&(_l?De.enable(3024):De.disable(3024),Ie.dither=_l),kl=Ei[0],cl=Ei[1],(kl!==Si[0]||cl!==Si[1])&&(De.blendEquationSeparate(kl,cl),Si[0]=kl,Si[1]=cl),xl=Pe.depth_func,xl!==Ie.depth_func&&(De.depthFunc(xl),Ie.depth_func=xl),Uo=Jr[0],_s=Jr[1],(Uo!==ci[0]||_s!==ci[1])&&(De.depthRange(Uo,_s),ci[0]=Uo,ci[1]=_s),Bl=Pe.depth_mask,Bl!==Ie.depth_mask&&(De.depthMask(Bl),Ie.depth_mask=Bl),Il=Di[0],Dl=Di[1],oe=Di[2],w=Di[3],(Il!==Lt[0]||Dl!==Lt[1]||oe!==Lt[2]||w!==Lt[3])&&(De.colorMask(Il,Dl,oe,w),Lt[0]=Il,Lt[1]=Dl,Lt[2]=oe,Lt[3]=w),B=Pe.cull_enable,B!==Ie.cull_enable&&(B?De.enable(2884):De.disable(2884),Ie.cull_enable=B),Q=Pe.cull_face,Q!==Ie.cull_face&&(De.cullFace(Q),Ie.cull_face=Q),ee=Pe.frontFace,ee!==Ie.frontFace&&(De.frontFace(ee),Ie.frontFace=ee),le=Pe.lineWidth,le!==Ie.lineWidth&&(De.lineWidth(le),Ie.lineWidth=le),Ne=Pe.polygonOffset_enable,Ne!==Ie.polygonOffset_enable&&(Ne?De.enable(32823):De.disable(32823),Ie.polygonOffset_enable=Ne),$e=vt[0],pt=vt[1],($e!==Dt[0]||pt!==Dt[1])&&(De.polygonOffset($e,pt),Dt[0]=$e,Dt[1]=pt),zt=Pe.sample_alpha,zt!==Ie.sample_alpha&&(zt?De.enable(32926):De.disable(32926),Ie.sample_alpha=zt),Yt=Pe.sample_enable,Yt!==Ie.sample_enable&&(Yt?De.enable(32928):De.disable(32928),Ie.sample_enable=Yt),Jt=Bt[0],yr=Bt[1],(Jt!==sr[0]||yr!==sr[1])&&(De.sampleCoverage(Jt,yr),sr[0]=Jt,sr[1]=yr),Ir=Pe.stencil_mask,Ir!==Ie.stencil_mask&&(De.stencilMask(Ir),Ie.stencil_mask=Ir),ce=br[0],Ae=br[1],qe=br[2],(ce!==zr[0]||Ae!==zr[1]||qe!==zr[2])&&(De.stencilFunc(ce,Ae,qe),zr[0]=ce,zr[1]=Ae,zr[2]=qe),Ve=Tr[0],ot=Tr[1],Ke=Tr[2],ft=Tr[3],(Ve!==Rr[0]||ot!==Rr[1]||Ke!==Rr[2]||ft!==Rr[3])&&(De.stencilOpSeparate(Ve,ot,Ke,ft),Rr[0]=Ve,Rr[1]=ot,Rr[2]=Ke,Rr[3]=ft),qt=Br[0],Xt=Br[1],$t=Br[2],dr=Br[3],(qt!==oi[0]||Xt!==oi[1]||$t!==oi[2]||dr!==oi[3])&&(De.stencilOpSeparate(qt,Xt,$t,dr),oi[0]=qt,oi[1]=Xt,oi[2]=$t,oi[3]=dr)}st=sn.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:_e.framebufferWidth-Wt,Nr="height"in st?st.height|0:_e.framebufferHeight-tr,hi=_e.viewportWidth,_e.viewportWidth=or,Gi=_e.viewportHeight,_e.viewportHeight=Nr,De.viewport(Wt,tr,or,Nr),Ni[0]=Wt,Ni[1]=tr,Ni[2]=or,Ni[3]=Nr,De.blendColor(0,0,0,1),si[0]=0,si[1]=0,si[2]=0,si[3]=1,n?De.enable(3042):De.disable(3042),Ie.blend_enable=n,De.blendFuncSeparate(770,771,773,1),Hi[0]=770,Hi[1]=771,Hi[2]=773,Hi[3]=1,i?De.enable(2929):De.disable(2929),Ie.depth_enable=i,Qr=sn.viewport,Ui=Qr.x|0,zn=Qr.y|0,fn="width"in Qr?Qr.width|0:_e.framebufferWidth-Ui,xn="height"in Qr?Qr.height|0:_e.framebufferHeight-zn,De.scissor(Ui,zn,fn,xn),Pi[0]=Ui,Pi[1]=zn,Pi[2]=fn,Pi[3]=xn,a?De.enable(3089):De.disable(3089),Ie.scissor_enable=a,o?De.enable(2960):De.disable(2960),Ie.stencil_enable=o,_a=Ie.profile,_a&&(Wn=performance.now(),r.count++),De.useProgram(s.program),Fn=qr.angle_instanced_arrays,Et.setVAO(null),ia=u.call(this,_e,sn,0),za=!1,Hr=1,na=0,go=0,Dn=0,un=0,Zn=null,Wo=0,Ba=!1,Bo=5126,Ea=0,Ha=0,tn=0,vr(ia)?(za=!0,Zn=ue.createStream(34962,ia),Bo=Zn.dtype):(Zn=ue.getBuffer(ia),Zn?Bo=Zn.dtype:"constant"in ia?(Hr=2,typeof ia.constant=="number"?(na=ia.constant,go=Dn=un=0):(na=ia.constant.length>0?ia.constant[0]:0,go=ia.constant.length>1?ia.constant[1]:0,Dn=ia.constant.length>2?ia.constant[2]:0,un=ia.constant.length>3?ia.constant[3]:0)):(vr(ia.buffer)?Zn=ue.createStream(34962,ia.buffer):Zn=ue.getBuffer(ia.buffer),Bo="type"in ia?zi[ia.type]:Zn.dtype,Ba=!!ia.normalized,Wo=ia.size|0,Ea=ia.offset|0,Ha=ia.stride|0,tn=ia.divisor|0)),Cn=l.location,Xn=ht[Cn],Hr===1?(Xn.buffer||De.enableVertexAttribArray(Cn),ts=Wo||4,(Xn.type!==Bo||Xn.size!==ts||Xn.buffer!==Zn||Xn.normalized!==Ba||Xn.offset!==Ea||Xn.stride!==Ha)&&(De.bindBuffer(34962,Zn.buffer),De.vertexAttribPointer(Cn,ts,Bo,Ba,Ha,Ea),Xn.type=Bo,Xn.size=ts,Xn.buffer=Zn,Xn.normalized=Ba,Xn.offset=Ea,Xn.stride=Ha),Xn.divisor!==tn&&(Fn.vertexAttribDivisorANGLE(Cn,tn),Xn.divisor=tn)):(Xn.buffer&&(De.disableVertexAttribArray(Cn),Xn.buffer=null),(Xn.x!==na||Xn.y!==go||Xn.z!==Dn||Xn.w!==un)&&(De.vertexAttrib4f(Cn,na,go,Dn,un),Xn.x=na,Xn.y=go,Xn.z=Dn,Xn.w=un)),Ja=f.call(this,_e,sn,0),to=!1,Ri=1,an=0,cs=0,pa=0,ln=0,ka=null,va=0,bo=!1,Co=5126,Fi=0,Yn=0,xa=0,vr(Ja)?(to=!0,ka=ue.createStream(34962,Ja),Co=ka.dtype):(ka=ue.getBuffer(Ja),ka?Co=ka.dtype:"constant"in Ja?(Ri=2,typeof Ja.constant=="number"?(an=Ja.constant,cs=pa=ln=0):(an=Ja.constant.length>0?Ja.constant[0]:0,cs=Ja.constant.length>1?Ja.constant[1]:0,pa=Ja.constant.length>2?Ja.constant[2]:0,ln=Ja.constant.length>3?Ja.constant[3]:0)):(vr(Ja.buffer)?ka=ue.createStream(34962,Ja.buffer):ka=ue.getBuffer(Ja.buffer),Co="type"in Ja?zi[Ja.type]:ka.dtype,bo=!!Ja.normalized,va=Ja.size|0,Fi=Ja.offset|0,Yn=Ja.stride|0,xa=Ja.divisor|0)),Qi=c.location,Nn=ht[Qi],Ri===1?(Nn.buffer||De.enableVertexAttribArray(Qi),Pn=va||1,(Nn.type!==Co||Nn.size!==Pn||Nn.buffer!==ka||Nn.normalized!==bo||Nn.offset!==Fi||Nn.stride!==Yn)&&(De.bindBuffer(34962,ka.buffer),De.vertexAttribPointer(Qi,Pn,Co,bo,Yn,Fi),Nn.type=Co,Nn.size=Pn,Nn.buffer=ka,Nn.normalized=bo,Nn.offset=Fi,Nn.stride=Yn),Nn.divisor!==xa&&(Fn.vertexAttribDivisorANGLE(Qi,xa),Nn.divisor=xa)):(Nn.buffer&&(De.disableVertexAttribArray(Qi),Nn.buffer=null),(Nn.x!==an||Nn.y!==cs||Nn.z!==pa||Nn.w!==ln)&&(De.vertexAttrib4f(Qi,an,cs,pa,ln),Nn.x=an,Nn.y=cs,Nn.z=pa,Nn.w=ln)),qa=h.call(this,_e,sn,0),jo=!1,Vo=1,Pa=0,Oa=0,co=0,An=0,_o=null,ks=0,bs=!1,ps=5126,sa=0,Bn=0,ms=0,vr(qa)?(jo=!0,_o=ue.createStream(34962,qa),ps=_o.dtype):(_o=ue.getBuffer(qa),_o?ps=_o.dtype:"constant"in qa?(Vo=2,typeof qa.constant=="number"?(Pa=qa.constant,Oa=co=An=0):(Pa=qa.constant.length>0?qa.constant[0]:0,Oa=qa.constant.length>1?qa.constant[1]:0,co=qa.constant.length>2?qa.constant[2]:0,An=qa.constant.length>3?qa.constant[3]:0)):(vr(qa.buffer)?_o=ue.createStream(34962,qa.buffer):_o=ue.getBuffer(qa.buffer),ps="type"in qa?zi[qa.type]:_o.dtype,bs=!!qa.normalized,ks=qa.size|0,sa=qa.offset|0,Bn=qa.stride|0,ms=qa.divisor|0)),ya=d.location,on=ht[ya],Vo===1?(on.buffer||De.enableVertexAttribArray(ya),mn=ks||4,(on.type!==ps||on.size!==mn||on.buffer!==_o||on.normalized!==bs||on.offset!==sa||on.stride!==Bn)&&(De.bindBuffer(34962,_o.buffer),De.vertexAttribPointer(ya,mn,ps,bs,Bn,sa),on.type=ps,on.size=mn,on.buffer=_o,on.normalized=bs,on.offset=sa,on.stride=Bn),on.divisor!==ms&&(Fn.vertexAttribDivisorANGLE(ya,ms),on.divisor=ms)):(on.buffer&&(De.disableVertexAttribArray(ya),on.buffer=null),(on.x!==Pa||on.y!==Oa||on.z!==co||on.w!==An)&&(De.vertexAttrib4f(ya,Pa,Oa,co,An),on.x=Pa,on.y=Oa,on.z=co,on.w=An)),Ga=p.call(this,_e,sn,0),ca=!1,bn=1,Xi=0,qn=0,Ia=0,yn=0,Ya=null,ba=0,Da=!1,Aa=5126,Ln=0,wo=0,wa=0,vr(Ga)?(ca=!0,Ya=ue.createStream(34962,Ga),Aa=Ya.dtype):(Ya=ue.getBuffer(Ga),Ya?Aa=Ya.dtype:"constant"in Ga?(bn=2,typeof Ga.constant=="number"?(Xi=Ga.constant,qn=Ia=yn=0):(Xi=Ga.constant.length>0?Ga.constant[0]:0,qn=Ga.constant.length>1?Ga.constant[1]:0,Ia=Ga.constant.length>2?Ga.constant[2]:0,yn=Ga.constant.length>3?Ga.constant[3]:0)):(vr(Ga.buffer)?Ya=ue.createStream(34962,Ga.buffer):Ya=ue.getBuffer(Ga.buffer),Aa="type"in Ga?zi[Ga.type]:Ya.dtype,Da=!!Ga.normalized,ba=Ga.size|0,Ln=Ga.offset|0,wo=Ga.stride|0,wa=Ga.divisor|0)),$i=x.location,ea=ht[$i],bn===1?(ea.buffer||De.enableVertexAttribArray($i),Sa=ba||1,(ea.type!==Aa||ea.size!==Sa||ea.buffer!==Ya||ea.normalized!==Da||ea.offset!==Ln||ea.stride!==wo)&&(De.bindBuffer(34962,Ya.buffer),De.vertexAttribPointer($i,Sa,Aa,Da,wo,Ln),ea.type=Aa,ea.size=Sa,ea.buffer=Ya,ea.normalized=Da,ea.offset=Ln,ea.stride=wo),ea.divisor!==wa&&(Fn.vertexAttribDivisorANGLE($i,wa),ea.divisor=wa)):(ea.buffer&&(De.disableVertexAttribArray($i),ea.buffer=null),(ea.x!==Xi||ea.y!==qn||ea.z!==Ia||ea.w!==yn)&&(De.vertexAttrib4f($i,Xi,qn,Ia,yn),ea.x=Xi,ea.y=qn,ea.z=Ia,ea.w=yn)),Za=b.call(this,_e,sn,0),xo=!1,Wa=1,hn=0,Un=0,Ss=0,Kn=0,ns=null,Jo=0,vo=!1,ma=5126,ja=0,To=0,Ao=0,vr(Za)?(xo=!0,ns=ue.createStream(34962,Za),ma=ns.dtype):(ns=ue.getBuffer(Za),ns?ma=ns.dtype:"constant"in Za?(Wa=2,typeof Za.constant=="number"?(hn=Za.constant,Un=Ss=Kn=0):(hn=Za.constant.length>0?Za.constant[0]:0,Un=Za.constant.length>1?Za.constant[1]:0,Ss=Za.constant.length>2?Za.constant[2]:0,Kn=Za.constant.length>3?Za.constant[3]:0)):(vr(Za.buffer)?ns=ue.createStream(34962,Za.buffer):ns=ue.getBuffer(Za.buffer),ma="type"in Za?zi[Za.type]:ns.dtype,vo=!!Za.normalized,Jo=Za.size|0,ja=Za.offset|0,To=Za.stride|0,Ao=Za.divisor|0)),la=y.location,Ki=ht[la],Wa===1?(Ki.buffer||De.enableVertexAttribArray(la),ho=Jo||1,(Ki.type!==ma||Ki.size!==ho||Ki.buffer!==ns||Ki.normalized!==vo||Ki.offset!==ja||Ki.stride!==To)&&(De.bindBuffer(34962,ns.buffer),De.vertexAttribPointer(la,ho,ma,vo,To,ja),Ki.type=ma,Ki.size=ho,Ki.buffer=ns,Ki.normalized=vo,Ki.offset=ja,Ki.stride=To),Ki.divisor!==Ao&&(Fn.vertexAttribDivisorANGLE(la,Ao),Ki.divisor=Ao)):(Ki.buffer&&(De.disableVertexAttribArray(la),Ki.buffer=null),(Ki.x!==hn||Ki.y!==Un||Ki.z!==Ss||Ki.w!==Kn)&&(De.vertexAttrib4f(la,hn,Un,Ss,Kn),Ki.x=hn,Ki.y=Un,Ki.z=Ss,Ki.w=Kn)),Ka=k.call(this,_e,sn,0),Ca=!1,ta=1,En=0,Mo=0,Ds=0,Ro=0,vs=null,Ks=0,as=!1,Jn=5126,Cs=0,Xa=0,Zo=0,vr(Ka)?(Ca=!0,vs=ue.createStream(34962,Ka),Jn=vs.dtype):(vs=ue.getBuffer(Ka),vs?Jn=vs.dtype:"constant"in Ka?(ta=2,typeof Ka.constant=="number"?(En=Ka.constant,Mo=Ds=Ro=0):(En=Ka.constant.length>0?Ka.constant[0]:0,Mo=Ka.constant.length>1?Ka.constant[1]:0,Ds=Ka.constant.length>2?Ka.constant[2]:0,Ro=Ka.constant.length>3?Ka.constant[3]:0)):(vr(Ka.buffer)?vs=ue.createStream(34962,Ka.buffer):vs=ue.getBuffer(Ka.buffer),Jn="type"in Ka?zi[Ka.type]:vs.dtype,as=!!Ka.normalized,Ks=Ka.size|0,Cs=Ka.offset|0,Xa=Ka.stride|0,Zo=Ka.divisor|0)),Eo=E.location,lo=ht[Eo],ta===1?(lo.buffer||De.enableVertexAttribArray(Eo),$a=Ks||1,(lo.type!==Jn||lo.size!==$a||lo.buffer!==vs||lo.normalized!==as||lo.offset!==Cs||lo.stride!==Xa)&&(De.bindBuffer(34962,vs.buffer),De.vertexAttribPointer(Eo,$a,Jn,as,Xa,Cs),lo.type=Jn,lo.size=$a,lo.buffer=vs,lo.normalized=as,lo.offset=Cs,lo.stride=Xa),lo.divisor!==Zo&&(Fn.vertexAttribDivisorANGLE(Eo,Zo),lo.divisor=Zo)):(lo.buffer&&(De.disableVertexAttribArray(Eo),lo.buffer=null),(lo.x!==En||lo.y!==Mo||lo.z!==Ds||lo.w!==Ro)&&(De.vertexAttrib4f(Eo,En,Mo,Ds,Ro),lo.x=En,lo.y=Mo,lo.z=Ds,lo.w=Ro)),Xo=A.call(this,_e,sn,0),rs=!1,$n=1,Sn=0,uo=0,Rs=0,xs=0,Go=null,os=0,So=!1,Qn=5126,zo=0,rl=0,$o=0,vr(Xo)?(rs=!0,Go=ue.createStream(34962,Xo),Qn=Go.dtype):(Go=ue.getBuffer(Xo),Go?Qn=Go.dtype:"constant"in Xo?($n=2,typeof Xo.constant=="number"?(Sn=Xo.constant,uo=Rs=xs=0):(Sn=Xo.constant.length>0?Xo.constant[0]:0,uo=Xo.constant.length>1?Xo.constant[1]:0,Rs=Xo.constant.length>2?Xo.constant[2]:0,xs=Xo.constant.length>3?Xo.constant[3]:0)):(vr(Xo.buffer)?Go=ue.createStream(34962,Xo.buffer):Go=ue.getBuffer(Xo.buffer),Qn="type"in Xo?zi[Xo.type]:Go.dtype,So=!!Xo.normalized,os=Xo.size|0,zo=Xo.offset|0,rl=Xo.stride|0,$o=Xo.divisor|0)),Na=L.location,Ua=ht[Na],$n===1?(Ua.buffer||De.enableVertexAttribArray(Na),Po=os||1,(Ua.type!==Qn||Ua.size!==Po||Ua.buffer!==Go||Ua.normalized!==So||Ua.offset!==zo||Ua.stride!==rl)&&(De.bindBuffer(34962,Go.buffer),De.vertexAttribPointer(Na,Po,Qn,So,rl,zo),Ua.type=Qn,Ua.size=Po,Ua.buffer=Go,Ua.normalized=So,Ua.offset=zo,Ua.stride=rl),Ua.divisor!==$o&&(Fn.vertexAttribDivisorANGLE(Na,$o),Ua.divisor=$o)):(Ua.buffer&&(De.disableVertexAttribArray(Na),Ua.buffer=null),(Ua.x!==Sn||Ua.y!==uo||Ua.z!==Rs||Ua.w!==xs)&&(De.vertexAttrib4f(Na,Sn,uo,Rs,xs),Ua.x=Sn,Ua.y=uo,Ua.z=Rs,Ua.w=xs)),fo=_.call(this,_e,sn,0),ro=!1,Ma=1,io=0,aa=0,Oo=0,No=0,Zs=null,Fs=0,ws=!1,no=5126,Ls=0,ds=0,Xs=0,vr(fo)?(ro=!0,Zs=ue.createStream(34962,fo),no=Zs.dtype):(Zs=ue.getBuffer(fo),Zs?no=Zs.dtype:"constant"in fo?(Ma=2,typeof fo.constant=="number"?(io=fo.constant,aa=Oo=No=0):(io=fo.constant.length>0?fo.constant[0]:0,aa=fo.constant.length>1?fo.constant[1]:0,Oo=fo.constant.length>2?fo.constant[2]:0,No=fo.constant.length>3?fo.constant[3]:0)):(vr(fo.buffer)?Zs=ue.createStream(34962,fo.buffer):Zs=ue.getBuffer(fo.buffer),no="type"in fo?zi[fo.type]:Zs.dtype,ws=!!fo.normalized,Fs=fo.size|0,Ls=fo.offset|0,ds=fo.stride|0,Xs=fo.divisor|0)),oa=C.location,Yo=ht[oa],Ma===1?(Yo.buffer||De.enableVertexAttribArray(oa),po=Fs||1,(Yo.type!==no||Yo.size!==po||Yo.buffer!==Zs||Yo.normalized!==ws||Yo.offset!==Ls||Yo.stride!==ds)&&(De.bindBuffer(34962,Zs.buffer),De.vertexAttribPointer(oa,po,no,ws,ds,Ls),Yo.type=no,Yo.size=po,Yo.buffer=Zs,Yo.normalized=ws,Yo.offset=Ls,Yo.stride=ds),Yo.divisor!==Xs&&(Fn.vertexAttribDivisorANGLE(oa,Xs),Yo.divisor=Xs)):(Yo.buffer&&(De.disableVertexAttribArray(oa),Yo.buffer=null),(Yo.x!==io||Yo.y!==aa||Yo.z!==Oo||Yo.w!==No)&&(De.vertexAttrib4f(oa,io,aa,Oo,No),Yo.x=io,Yo.y=aa,Yo.z=Oo,Yo.w=No)),ss=M.call(this,_e,sn,0),ls=!1,gs=1,bt=0,Ft=0,hr=0,nr=0,Sr=null,li=0,di=!1,mi=5126,Oi=0,dn=0,wi=0,vr(ss)?(ls=!0,Sr=ue.createStream(34962,ss),mi=Sr.dtype):(Sr=ue.getBuffer(ss),Sr?mi=Sr.dtype:"constant"in ss?(gs=2,typeof ss.constant=="number"?(bt=ss.constant,Ft=hr=nr=0):(bt=ss.constant.length>0?ss.constant[0]:0,Ft=ss.constant.length>1?ss.constant[1]:0,hr=ss.constant.length>2?ss.constant[2]:0,nr=ss.constant.length>3?ss.constant[3]:0)):(vr(ss.buffer)?Sr=ue.createStream(34962,ss.buffer):Sr=ue.getBuffer(ss.buffer),mi="type"in ss?zi[ss.type]:Sr.dtype,di=!!ss.normalized,li=ss.size|0,Oi=ss.offset|0,dn=ss.stride|0,wi=ss.divisor|0)),ui=v.location,Ai=ht[ui],gs===1?(Ai.buffer||De.enableVertexAttribArray(ui),gi=li||1,(Ai.type!==mi||Ai.size!==gi||Ai.buffer!==Sr||Ai.normalized!==di||Ai.offset!==Oi||Ai.stride!==dn)&&(De.bindBuffer(34962,Sr.buffer),De.vertexAttribPointer(ui,gi,mi,di,dn,Oi),Ai.type=mi,Ai.size=gi,Ai.buffer=Sr,Ai.normalized=di,Ai.offset=Oi,Ai.stride=dn),Ai.divisor!==wi&&(Fn.vertexAttribDivisorANGLE(ui,wi),Ai.divisor=wi)):(Ai.buffer&&(De.disableVertexAttribArray(ui),Ai.buffer=null),(Ai.x!==bt||Ai.y!==Ft||Ai.z!==hr||Ai.w!==nr)&&(De.vertexAttrib4f(ui,bt,Ft,hr,nr),Ai.x=bt,Ai.y=Ft,Ai.z=hr,Ai.w=nr)),De.uniform1i(z.location,!1),gn=sn.markerTexture,gn&&gn._reglType==="framebuffer"&&(gn=gn.color[0]),In=gn._texture,De.uniform1i(T.location,In.bind()),Vn=sn.opacity,De.uniform1f(F.location,Vn),Rn=U.call(this,_e,sn,0),Hn=Rn[0],Gn=Rn[1],De.uniform2f(q.location,Hn,Gn),De.uniform1i(H.location,j.bind()),pn=_e.pixelRatio,De.uniform1f(G.location,pn),Lo=sn.scale,us=Lo[0],Bs=Lo[1],De.uniform2f(O.location,us,Bs),Js=sn.scaleFract,ol=Js[0],Cl=Js[1],De.uniform2f(W.location,ol,Cl),ul=sn.translate,Gl=ul[0],Vl=ul[1],De.uniform2f(re.location,Gl,Vl),Fl=sn.translateFract,ga=Fl[0],ko=Fl[1],De.uniform2f(ne.location,ga,ko),zs=sn.elements,Fo=null,Ys=vr(zs),Ys?Fo=ye.createStream(zs):Fo=ye.getElements(zs),Fo&&De.bindBuffer(34963,Fo.buffer.buffer),Gs=sn.offset,Us=sn.count,Us&&(Sl=lt.instances,Sl>0?Fo?Fn.drawElementsInstancedANGLE(0,Us,Fo.type,Gs<<(Fo.type-5121>>1),Sl):Fn.drawArraysInstancedANGLE(0,Gs,Us,Sl):Sl<0&&(Fo?De.drawElements(0,Us,Fo.type,Gs<<(Fo.type-5121>>1)):De.drawArrays(0,Gs,Us)),Ie.dirty=!0,Et.setVAO(null),_e.viewportWidth=hi,_e.viewportHeight=Gi,_a&&(r.cpuTime+=performance.now()-Wn),za&&ue.destroyStream(Zn),to&&ue.destroyStream(ka),jo&&ue.destroyStream(_o),ca&&ue.destroyStream(Ya),xo&&ue.destroyStream(ns),Ca&&ue.destroyStream(vs),rs&&ue.destroyStream(Go),ro&&ue.destroyStream(Zs),ls&&ue.destroyStream(Sr),In.unbind(),j.unbind(),Ys&&ye.destroyStream(Fo))},scope:function(sn,fi,Or){var st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf,hf;st=sn.viewport,Wt=st.x|0,tr=st.y|0,or="width"in st?st.width|0:_e.framebufferWidth-Wt,Nr="height"in st?st.height|0:_e.framebufferHeight-tr,hi=_e.viewportWidth,_e.viewportWidth=or,Gi=_e.viewportHeight,_e.viewportHeight=Nr,Qr=Yr[0],Yr[0]=Wt,Ui=Yr[1],Yr[1]=tr,zn=Yr[2],Yr[2]=or,fn=Yr[3],Yr[3]=Nr,xn=Er[0],Er[0]=be,_a=Er[1],Er[1]=ze,Wn=Er[2],Er[2]=Ce,Fn=Er[3],Er[3]=he,ia=Pe.blend_enable,Pe.blend_enable=te,za=xi[0],xi[0]=ke,Hr=xi[1],xi[1]=Ee,na=xi[2],xi[2]=Me,go=xi[3],xi[3]=Oe,Dn=Pe.depth_enable,Pe.depth_enable=Re,un=sn.viewport,Zn=un.x|0,Wo=un.y|0,Ba="width"in un?un.width|0:_e.framebufferWidth-Zn,Bo="height"in un?un.height|0:_e.framebufferHeight-Wo,Ea=vi[0],vi[0]=Zn,Ha=vi[1],vi[1]=Wo,tn=vi[2],vi[2]=Ba,Cn=vi[3],vi[3]=Bo,Xn=Pe.scissor_enable,Pe.scissor_enable=me,ts=Pe.stencil_enable,Pe.stencil_enable=Be,Ja=Ie.profile,Ja&&(to=performance.now(),r.count++),Ri=sn.elements,an=null,cs=vr(Ri),cs?an=ye.createStream(Ri):an=ye.getElements(Ri),pa=lt.elements,lt.elements=an,ln=sn.offset,ka=lt.offset,lt.offset=ln,va=sn.count,bo=lt.count,lt.count=va,Co=lt.primitive,lt.primitive=fe,Fi=St[Ze],St[Ze]=!1,Yn=St[gt],St[gt]=et,xa=sn.opacity,Qi=St[Pt],St[Pt]=xa,Nn=U.call(this,_e,sn,Or),Pn=St[Qe],St[Qe]=Nn,qa=_e.pixelRatio,jo=St[Xe],St[Xe]=qa,Vo=sn.scale,Pa=St[Tt],St[Tt]=Vo,Oa=sn.scaleFract,co=St[xt],St[xt]=Oa,An=sn.translate,_o=St[_t],St[_t]=An,ks=sn.translateFract,bs=St[Ct],St[Ct]=ks,ps=sn.markerTexture,sa=St[jt],St[jt]=ps,Bn=k.call(this,_e,sn,Or),ms=!1,ya=1,on=0,mn=0,Ga=0,ca=0,bn=null,Xi=0,qn=!1,Ia=5126,yn=0,Ya=0,ba=0,vr(Bn)?(ms=!0,bn=ue.createStream(34962,Bn),Ia=bn.dtype):(bn=ue.getBuffer(Bn),bn?Ia=bn.dtype:"constant"in Bn?(ya=2,typeof Bn.constant=="number"?(on=Bn.constant,mn=Ga=ca=0):(on=Bn.constant.length>0?Bn.constant[0]:0,mn=Bn.constant.length>1?Bn.constant[1]:0,Ga=Bn.constant.length>2?Bn.constant[2]:0,ca=Bn.constant.length>3?Bn.constant[3]:0)):(vr(Bn.buffer)?bn=ue.createStream(34962,Bn.buffer):bn=ue.getBuffer(Bn.buffer),Ia="type"in Bn?zi[Bn.type]:bn.dtype,qn=!!Bn.normalized,Xi=Bn.size|0,yn=Bn.offset|0,Ya=Bn.stride|0,ba=Bn.divisor|0)),Da=At.state,At.state=ya,Aa=At.x,At.x=on,Ln=At.y,At.y=mn,wo=At.z,At.z=Ga,wa=At.w,At.w=ca,$i=At.buffer,At.buffer=bn,ea=At.size,At.size=Xi,Sa=At.normalized,At.normalized=qn,Za=At.type,At.type=Ia,xo=At.offset,At.offset=yn,Wa=At.stride,At.stride=Ya,hn=At.divisor,At.divisor=ba,Un=_.call(this,_e,sn,Or),Ss=!1,Kn=1,ns=0,Jo=0,vo=0,ma=0,ja=null,To=0,Ao=!1,la=5126,Ki=0,ho=0,Ka=0,vr(Un)?(Ss=!0,ja=ue.createStream(34962,Un),la=ja.dtype):(ja=ue.getBuffer(Un),ja?la=ja.dtype:"constant"in Un?(Kn=2,typeof Un.constant=="number"?(ns=Un.constant,Jo=vo=ma=0):(ns=Un.constant.length>0?Un.constant[0]:0,Jo=Un.constant.length>1?Un.constant[1]:0,vo=Un.constant.length>2?Un.constant[2]:0,ma=Un.constant.length>3?Un.constant[3]:0)):(vr(Un.buffer)?ja=ue.createStream(34962,Un.buffer):ja=ue.getBuffer(Un.buffer),la="type"in Un?zi[Un.type]:ja.dtype,Ao=!!Un.normalized,To=Un.size|0,Ki=Un.offset|0,ho=Un.stride|0,Ka=Un.divisor|0)),Ca=Te.state,Te.state=Kn,ta=Te.x,Te.x=ns,En=Te.y,Te.y=Jo,Mo=Te.z,Te.z=vo,Ds=Te.w,Te.w=ma,Ro=Te.buffer,Te.buffer=ja,vs=Te.size,Te.size=To,Ks=Te.normalized,Te.normalized=Ao,as=Te.type,Te.type=la,Jn=Te.offset,Te.offset=Ki,Cs=Te.stride,Te.stride=ho,Xa=Te.divisor,Te.divisor=Ka,Zo=A.call(this,_e,sn,Or),Eo=!1,lo=1,$a=0,Xo=0,rs=0,$n=0,Sn=null,uo=0,Rs=!1,xs=5126,Go=0,os=0,So=0,vr(Zo)?(Eo=!0,Sn=ue.createStream(34962,Zo),xs=Sn.dtype):(Sn=ue.getBuffer(Zo),Sn?xs=Sn.dtype:"constant"in Zo?(lo=2,typeof Zo.constant=="number"?($a=Zo.constant,Xo=rs=$n=0):($a=Zo.constant.length>0?Zo.constant[0]:0,Xo=Zo.constant.length>1?Zo.constant[1]:0,rs=Zo.constant.length>2?Zo.constant[2]:0,$n=Zo.constant.length>3?Zo.constant[3]:0)):(vr(Zo.buffer)?Sn=ue.createStream(34962,Zo.buffer):Sn=ue.getBuffer(Zo.buffer),xs="type"in Zo?zi[Zo.type]:Sn.dtype,Rs=!!Zo.normalized,uo=Zo.size|0,Go=Zo.offset|0,os=Zo.stride|0,So=Zo.divisor|0)),Qn=nt.state,nt.state=lo,zo=nt.x,nt.x=$a,rl=nt.y,nt.y=Xo,$o=nt.z,nt.z=rs,Na=nt.w,nt.w=$n,Ua=nt.buffer,nt.buffer=Sn,Po=nt.size,nt.size=uo,fo=nt.normalized,nt.normalized=Rs,ro=nt.type,nt.type=xs,Ma=nt.offset,nt.offset=Go,io=nt.stride,nt.stride=os,aa=nt.divisor,nt.divisor=So,Oo=M.call(this,_e,sn,Or),No=!1,Zs=1,Fs=0,ws=0,no=0,Ls=0,ds=null,Xs=0,oa=!1,Yo=5126,po=0,ss=0,ls=0,vr(Oo)?(No=!0,ds=ue.createStream(34962,Oo),Yo=ds.dtype):(ds=ue.getBuffer(Oo),ds?Yo=ds.dtype:"constant"in Oo?(Zs=2,typeof Oo.constant=="number"?(Fs=Oo.constant,ws=no=Ls=0):(Fs=Oo.constant.length>0?Oo.constant[0]:0,ws=Oo.constant.length>1?Oo.constant[1]:0,no=Oo.constant.length>2?Oo.constant[2]:0,Ls=Oo.constant.length>3?Oo.constant[3]:0)):(vr(Oo.buffer)?ds=ue.createStream(34962,Oo.buffer):ds=ue.getBuffer(Oo.buffer),Yo="type"in Oo?zi[Oo.type]:ds.dtype,oa=!!Oo.normalized,Xs=Oo.size|0,po=Oo.offset|0,ss=Oo.stride|0,ls=Oo.divisor|0)),gs=ut.state,ut.state=Zs,bt=ut.x,ut.x=Fs,Ft=ut.y,ut.y=ws,hr=ut.z,ut.z=no,nr=ut.w,ut.w=Ls,Sr=ut.buffer,ut.buffer=ds,li=ut.size,ut.size=Xs,di=ut.normalized,ut.normalized=oa,mi=ut.type,ut.type=Yo,Oi=ut.offset,ut.offset=po,dn=ut.stride,ut.stride=ss,wi=ut.divisor,ut.divisor=ls,ui=b.call(this,_e,sn,Or),Ai=!1,gi=1,gn=0,In=0,Vn=0,Rn=0,Hn=null,Gn=0,pn=!1,Lo=5126,us=0,Bs=0,Js=0,vr(ui)?(Ai=!0,Hn=ue.createStream(34962,ui),Lo=Hn.dtype):(Hn=ue.getBuffer(ui),Hn?Lo=Hn.dtype:"constant"in ui?(gi=2,typeof ui.constant=="number"?(gn=ui.constant,In=Vn=Rn=0):(gn=ui.constant.length>0?ui.constant[0]:0,In=ui.constant.length>1?ui.constant[1]:0,Vn=ui.constant.length>2?ui.constant[2]:0,Rn=ui.constant.length>3?ui.constant[3]:0)):(vr(ui.buffer)?Hn=ue.createStream(34962,ui.buffer):Hn=ue.getBuffer(ui.buffer),Lo="type"in ui?zi[ui.type]:Hn.dtype,pn=!!ui.normalized,Gn=ui.size|0,us=ui.offset|0,Bs=ui.stride|0,Js=ui.divisor|0)),ol=ct.state,ct.state=gi,Cl=ct.x,ct.x=gn,ul=ct.y,ct.y=In,Gl=ct.z,ct.z=Vn,Vl=ct.w,ct.w=Rn,Fl=ct.buffer,ct.buffer=Hn,ga=ct.size,ct.size=Gn,ko=ct.normalized,ct.normalized=pn,zs=ct.type,ct.type=Lo,Fo=ct.offset,ct.offset=us,Ys=ct.stride,ct.stride=Bs,Gs=ct.divisor,ct.divisor=Js,Us=f.call(this,_e,sn,Or),Sl=!1,_l=1,kl=0,cl=0,xl=0,Uo=0,_s=null,Bl=0,Il=!1,Dl=5126,oe=0,w=0,B=0,vr(Us)?(Sl=!0,_s=ue.createStream(34962,Us),Dl=_s.dtype):(_s=ue.getBuffer(Us),_s?Dl=_s.dtype:"constant"in Us?(_l=2,typeof Us.constant=="number"?(kl=Us.constant,cl=xl=Uo=0):(kl=Us.constant.length>0?Us.constant[0]:0,cl=Us.constant.length>1?Us.constant[1]:0,xl=Us.constant.length>2?Us.constant[2]:0,Uo=Us.constant.length>3?Us.constant[3]:0)):(vr(Us.buffer)?_s=ue.createStream(34962,Us.buffer):_s=ue.getBuffer(Us.buffer),Dl="type"in Us?zi[Us.type]:_s.dtype,Il=!!Us.normalized,Bl=Us.size|0,oe=Us.offset|0,w=Us.stride|0,B=Us.divisor|0)),Q=rt.state,rt.state=_l,ee=rt.x,rt.x=kl,le=rt.y,rt.y=cl,Ne=rt.z,rt.z=xl,$e=rt.w,rt.w=Uo,pt=rt.buffer,rt.buffer=_s,zt=rt.size,rt.size=Bl,Yt=rt.normalized,rt.normalized=Il,Jt=rt.type,rt.type=Dl,yr=rt.offset,rt.offset=oe,Ir=rt.stride,rt.stride=w,ce=rt.divisor,rt.divisor=B,Ae=h.call(this,_e,sn,Or),qe=!1,Ve=1,ot=0,Ke=0,ft=0,qt=0,Xt=null,$t=0,dr=!1,Mr=5126,$r=0,ii=0,pi=0,vr(Ae)?(qe=!0,Xt=ue.createStream(34962,Ae),Mr=Xt.dtype):(Xt=ue.getBuffer(Ae),Xt?Mr=Xt.dtype:"constant"in Ae?(Ve=2,typeof Ae.constant=="number"?(ot=Ae.constant,Ke=ft=qt=0):(ot=Ae.constant.length>0?Ae.constant[0]:0,Ke=Ae.constant.length>1?Ae.constant[1]:0,ft=Ae.constant.length>2?Ae.constant[2]:0,qt=Ae.constant.length>3?Ae.constant[3]:0)):(vr(Ae.buffer)?Xt=ue.createStream(34962,Ae.buffer):Xt=ue.getBuffer(Ae.buffer),Mr="type"in Ae?zi[Ae.type]:Xt.dtype,dr=!!Ae.normalized,$t=Ae.size|0,$r=Ae.offset|0,ii=Ae.stride|0,pi=Ae.divisor|0)),Yi=je.state,je.state=Ve,wn=je.x,je.x=ot,Tn=je.y,je.y=Ke,ua=je.z,je.z=ft,oo=je.w,je.w=qt,el=je.buffer,je.buffer=Xt,ys=je.size,je.size=$t,il=je.normalized,je.normalized=dr,$l=je.type,je.type=Mr,pl=je.offset,je.offset=$r,Hl=je.stride,je.stride=ii,Ll=je.divisor,je.divisor=pi,Ql=u.call(this,_e,sn,Or),ku=!1,Jl=1,Kl=0,Hu=0,tf=0,Ku=0,Gu=null,Wu=0,sf=!1,gf=5126,nf=0,af=0,X=0,vr(Ql)?(ku=!0,Gu=ue.createStream(34962,Ql),gf=Gu.dtype):(Gu=ue.getBuffer(Ql),Gu?gf=Gu.dtype:"constant"in Ql?(Jl=2,typeof Ql.constant=="number"?(Kl=Ql.constant,Hu=tf=Ku=0):(Kl=Ql.constant.length>0?Ql.constant[0]:0,Hu=Ql.constant.length>1?Ql.constant[1]:0,tf=Ql.constant.length>2?Ql.constant[2]:0,Ku=Ql.constant.length>3?Ql.constant[3]:0)):(vr(Ql.buffer)?Gu=ue.createStream(34962,Ql.buffer):Gu=ue.getBuffer(Ql.buffer),gf="type"in Ql?zi[Ql.type]:Gu.dtype,sf=!!Ql.normalized,Wu=Ql.size|0,nf=Ql.offset|0,af=Ql.stride|0,X=Ql.divisor|0)),se=tt.state,tt.state=Jl,Le=tt.x,tt.x=Kl,We=tt.y,tt.y=Hu,Ye=tt.z,tt.z=tf,it=tt.w,tt.w=Ku,Nt=tt.buffer,tt.buffer=Gu,mt=tt.size,tt.size=Wu,er=tt.normalized,tt.normalized=sf,_r=tt.type,tt.type=gf,wr=tt.offset,tt.offset=nf,ni=tt.stride,tt.stride=af,Wr=tt.divisor,tt.divisor=X,Ci=p.call(this,_e,sn,Or),Ji=!1,ai=1,Ti=0,Bi=0,en=0,Wi=0,bi=null,ao=0,yo=!1,Ko=5126,Ms=0,vl=0,wl=0,vr(Ci)?(Ji=!0,bi=ue.createStream(34962,Ci),Ko=bi.dtype):(bi=ue.getBuffer(Ci),bi?Ko=bi.dtype:"constant"in Ci?(ai=2,typeof Ci.constant=="number"?(Ti=Ci.constant,Bi=en=Wi=0):(Ti=Ci.constant.length>0?Ci.constant[0]:0,Bi=Ci.constant.length>1?Ci.constant[1]:0,en=Ci.constant.length>2?Ci.constant[2]:0,Wi=Ci.constant.length>3?Ci.constant[3]:0)):(vr(Ci.buffer)?bi=ue.createStream(34962,Ci.buffer):bi=ue.getBuffer(Ci.buffer),Ko="type"in Ci?zi[Ci.type]:bi.dtype,yo=!!Ci.normalized,ao=Ci.size|0,Ms=Ci.offset|0,vl=Ci.stride|0,wl=Ci.divisor|0)),au=Je.state,Je.state=ai,Al=Je.x,Je.x=Ti,nu=Je.y,Je.y=Bi,Bu=Je.z,Je.z=en,qu=Je.w,Je.w=Wi,Ju=Je.buffer,Je.buffer=bi,qo=Je.size,Je.size=ao,Rl=Je.normalized,Je.normalized=yo,pu=Je.type,Je.type=Ko,xu=Je.offset,Je.offset=Ms,of=Je.stride,Je.stride=vl,ff=Je.divisor,Je.divisor=wl,xf=de.vert,de.vert=Mt,hf=de.frag,de.frag=Vt,Ie.dirty=!0,fi(_e,sn,Or),_e.viewportWidth=hi,_e.viewportHeight=Gi,Yr[0]=Qr,Yr[1]=Ui,Yr[2]=zn,Yr[3]=fn,Er[0]=xn,Er[1]=_a,Er[2]=Wn,Er[3]=Fn,Pe.blend_enable=ia,xi[0]=za,xi[1]=Hr,xi[2]=na,xi[3]=go,Pe.depth_enable=Dn,vi[0]=Ea,vi[1]=Ha,vi[2]=tn,vi[3]=Cn,Pe.scissor_enable=Xn,Pe.stencil_enable=ts,Ja&&(r.cpuTime+=performance.now()-to),cs&&ye.destroyStream(an),lt.elements=pa,lt.offset=ka,lt.count=bo,lt.primitive=Co,St[Ze]=Fi,St[gt]=Yn,St[Pt]=Qi,St[Qe]=Pn,St[Xe]=jo,St[Tt]=Pa,St[xt]=co,St[_t]=_o,St[Ct]=bs,St[jt]=sa,ms&&ue.destroyStream(bn),At.state=Da,At.x=Aa,At.y=Ln,At.z=wo,At.w=wa,At.buffer=$i,At.size=ea,At.normalized=Sa,At.type=Za,At.offset=xo,At.stride=Wa,At.divisor=hn,Ss&&ue.destroyStream(ja),Te.state=Ca,Te.x=ta,Te.y=En,Te.z=Mo,Te.w=Ds,Te.buffer=Ro,Te.size=vs,Te.normalized=Ks,Te.type=as,Te.offset=Jn,Te.stride=Cs,Te.divisor=Xa,Eo&&ue.destroyStream(Sn),nt.state=Qn,nt.x=zo,nt.y=rl,nt.z=$o,nt.w=Na,nt.buffer=Ua,nt.size=Po,nt.normalized=fo,nt.type=ro,nt.offset=Ma,nt.stride=io,nt.divisor=aa,No&&ue.destroyStream(ds),ut.state=gs,ut.x=bt,ut.y=Ft,ut.z=hr,ut.w=nr,ut.buffer=Sr,ut.size=li,ut.normalized=di,ut.type=mi,ut.offset=Oi,ut.stride=dn,ut.divisor=wi,Ai&&ue.destroyStream(Hn),ct.state=ol,ct.x=Cl,ct.y=ul,ct.z=Gl,ct.w=Vl,ct.buffer=Fl,ct.size=ga,ct.normalized=ko,ct.type=zs,ct.offset=Fo,ct.stride=Ys,ct.divisor=Gs,Sl&&ue.destroyStream(_s),rt.state=Q,rt.x=ee,rt.y=le,rt.z=Ne,rt.w=$e,rt.buffer=pt,rt.size=zt,rt.normalized=Yt,rt.type=Jt,rt.offset=yr,rt.stride=Ir,rt.divisor=ce,qe&&ue.destroyStream(Xt),je.state=Yi,je.x=wn,je.y=Tn,je.z=ua,je.w=oo,je.buffer=el,je.size=ys,je.normalized=il,je.type=$l,je.offset=pl,je.stride=Hl,je.divisor=Ll,ku&&ue.destroyStream(Gu),tt.state=se,tt.x=Le,tt.y=We,tt.z=Ye,tt.w=it,tt.buffer=Nt,tt.size=mt,tt.normalized=er,tt.type=_r,tt.offset=wr,tt.stride=ni,tt.divisor=Wr,Ji&&ue.destroyStream(bi),Je.state=au,Je.x=Al,Je.y=nu,Je.z=Bu,Je.w=qu,Je.buffer=Ju,Je.size=qo,Je.normalized=Rl,Je.type=pu,Je.offset=xu,Je.stride=of,Je.divisor=ff,de.vert=xf,de.frag=hf,Ie.dirty=!0},batch:function(sn,fi){var Or,st,Wt,tr,or,Nr,hi;if(Or=qr.angle_instanced_arrays,st=Zt.next,st!==Zt.cur&&(st?De.bindFramebuffer(36160,st.framebuffer):De.bindFramebuffer(36160,null),Zt.cur=st),Ie.dirty){var Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka;Gi=Pe.dither,Gi!==Ie.dither&&(Gi?De.enable(3024):De.disable(3024),Ie.dither=Gi),Qr=Ei[0],Ui=Ei[1],(Qr!==Si[0]||Ui!==Si[1])&&(De.blendEquationSeparate(Qr,Ui),Si[0]=Qr,Si[1]=Ui),zn=Pe.depth_func,zn!==Ie.depth_func&&(De.depthFunc(zn),Ie.depth_func=zn),fn=Jr[0],xn=Jr[1],(fn!==ci[0]||xn!==ci[1])&&(De.depthRange(fn,xn),ci[0]=fn,ci[1]=xn),_a=Pe.depth_mask,_a!==Ie.depth_mask&&(De.depthMask(_a),Ie.depth_mask=_a),Wn=Di[0],Fn=Di[1],ia=Di[2],za=Di[3],(Wn!==Lt[0]||Fn!==Lt[1]||ia!==Lt[2]||za!==Lt[3])&&(De.colorMask(Wn,Fn,ia,za),Lt[0]=Wn,Lt[1]=Fn,Lt[2]=ia,Lt[3]=za),Hr=Pe.cull_enable,Hr!==Ie.cull_enable&&(Hr?De.enable(2884):De.disable(2884),Ie.cull_enable=Hr),na=Pe.cull_face,na!==Ie.cull_face&&(De.cullFace(na),Ie.cull_face=na),go=Pe.frontFace,go!==Ie.frontFace&&(De.frontFace(go),Ie.frontFace=go),Dn=Pe.lineWidth,Dn!==Ie.lineWidth&&(De.lineWidth(Dn),Ie.lineWidth=Dn),un=Pe.polygonOffset_enable,un!==Ie.polygonOffset_enable&&(un?De.enable(32823):De.disable(32823),Ie.polygonOffset_enable=un),Zn=vt[0],Wo=vt[1],(Zn!==Dt[0]||Wo!==Dt[1])&&(De.polygonOffset(Zn,Wo),Dt[0]=Zn,Dt[1]=Wo),Ba=Pe.sample_alpha,Ba!==Ie.sample_alpha&&(Ba?De.enable(32926):De.disable(32926),Ie.sample_alpha=Ba),Bo=Pe.sample_enable,Bo!==Ie.sample_enable&&(Bo?De.enable(32928):De.disable(32928),Ie.sample_enable=Bo),Ea=Bt[0],Ha=Bt[1],(Ea!==sr[0]||Ha!==sr[1])&&(De.sampleCoverage(Ea,Ha),sr[0]=Ea,sr[1]=Ha),tn=Pe.stencil_mask,tn!==Ie.stencil_mask&&(De.stencilMask(tn),Ie.stencil_mask=tn),Cn=br[0],Xn=br[1],ts=br[2],(Cn!==zr[0]||Xn!==zr[1]||ts!==zr[2])&&(De.stencilFunc(Cn,Xn,ts),zr[0]=Cn,zr[1]=Xn,zr[2]=ts),Ja=Tr[0],to=Tr[1],Ri=Tr[2],an=Tr[3],(Ja!==Rr[0]||to!==Rr[1]||Ri!==Rr[2]||an!==Rr[3])&&(De.stencilOpSeparate(Ja,to,Ri,an),Rr[0]=Ja,Rr[1]=to,Rr[2]=Ri,Rr[3]=an),cs=Br[0],pa=Br[1],ln=Br[2],ka=Br[3],(cs!==oi[0]||pa!==oi[1]||ln!==oi[2]||ka!==oi[3])&&(De.stencilOpSeparate(cs,pa,ln,ka),oi[0]=cs,oi[1]=pa,oi[2]=ln,oi[3]=ka)}De.blendColor(0,0,0,1),si[0]=0,si[1]=0,si[2]=0,si[3]=1,Kt?De.enable(3042):De.disable(3042),Ie.blend_enable=Kt,De.blendFuncSeparate(770,771,773,1),Hi[0]=770,Hi[1]=771,Hi[2]=773,Hi[3]=1,ir?De.enable(2929):De.disable(2929),Ie.depth_enable=ir,fr?De.enable(3089):De.disable(3089),Ie.scissor_enable=fr,Ot?De.enable(2960):De.disable(2960),Ie.stencil_enable=Ot,Wt=Ie.profile,Wt&&(tr=performance.now(),r.count+=fi),De.useProgram(s.program),or=qr.angle_instanced_arrays;var va;for(Et.setVAO(null),De.uniform1i(z.location,!1),De.uniform1i(H.location,j.bind()),va=lt.instances,Nr=0;Nr0?Oa.constant[0]:0,ks=Oa.constant.length>1?Oa.constant[1]:0,bs=Oa.constant.length>2?Oa.constant[2]:0,ps=Oa.constant.length>3?Oa.constant[3]:0)):(vr(Oa.buffer)?sa=ue.createStream(34962,Oa.buffer):sa=ue.getBuffer(Oa.buffer),ya="type"in Oa?zi[Oa.type]:sa.dtype,ms=!!Oa.normalized,Bn=Oa.size|0,on=Oa.offset|0,mn=Oa.stride|0,Ga=Oa.divisor|0)),ca=l.location,bn=ht[ca],An===1?(bn.buffer||De.enableVertexAttribArray(ca),Xi=Bn||4,(bn.type!==ya||bn.size!==Xi||bn.buffer!==sa||bn.normalized!==ms||bn.offset!==on||bn.stride!==mn)&&(De.bindBuffer(34962,sa.buffer),De.vertexAttribPointer(ca,Xi,ya,ms,mn,on),bn.type=ya,bn.size=Xi,bn.buffer=sa,bn.normalized=ms,bn.offset=on,bn.stride=mn),bn.divisor!==Ga&&(or.vertexAttribDivisorANGLE(ca,Ga),bn.divisor=Ga)):(bn.buffer&&(De.disableVertexAttribArray(ca),bn.buffer=null),(bn.x!==_o||bn.y!==ks||bn.z!==bs||bn.w!==ps)&&(De.vertexAttrib4f(ca,_o,ks,bs,ps),bn.x=_o,bn.y=ks,bn.z=bs,bn.w=ps)),qn=f.call(this,_e,hi,Nr),Ia=!1,yn=1,Ya=0,ba=0,Da=0,Aa=0,Ln=null,wo=0,wa=!1,$i=5126,ea=0,Sa=0,Za=0,vr(qn)?(Ia=!0,Ln=ue.createStream(34962,qn),$i=Ln.dtype):(Ln=ue.getBuffer(qn),Ln?$i=Ln.dtype:"constant"in qn?(yn=2,typeof qn.constant=="number"?(Ya=qn.constant,ba=Da=Aa=0):(Ya=qn.constant.length>0?qn.constant[0]:0,ba=qn.constant.length>1?qn.constant[1]:0,Da=qn.constant.length>2?qn.constant[2]:0,Aa=qn.constant.length>3?qn.constant[3]:0)):(vr(qn.buffer)?Ln=ue.createStream(34962,qn.buffer):Ln=ue.getBuffer(qn.buffer),$i="type"in qn?zi[qn.type]:Ln.dtype,wa=!!qn.normalized,wo=qn.size|0,ea=qn.offset|0,Sa=qn.stride|0,Za=qn.divisor|0)),xo=c.location,Wa=ht[xo],yn===1?(Wa.buffer||De.enableVertexAttribArray(xo),hn=wo||1,(Wa.type!==$i||Wa.size!==hn||Wa.buffer!==Ln||Wa.normalized!==wa||Wa.offset!==ea||Wa.stride!==Sa)&&(De.bindBuffer(34962,Ln.buffer),De.vertexAttribPointer(xo,hn,$i,wa,Sa,ea),Wa.type=$i,Wa.size=hn,Wa.buffer=Ln,Wa.normalized=wa,Wa.offset=ea,Wa.stride=Sa),Wa.divisor!==Za&&(or.vertexAttribDivisorANGLE(xo,Za),Wa.divisor=Za)):(Wa.buffer&&(De.disableVertexAttribArray(xo),Wa.buffer=null),(Wa.x!==Ya||Wa.y!==ba||Wa.z!==Da||Wa.w!==Aa)&&(De.vertexAttrib4f(xo,Ya,ba,Da,Aa),Wa.x=Ya,Wa.y=ba,Wa.z=Da,Wa.w=Aa)),Un=h.call(this,_e,hi,Nr),Ss=!1,Kn=1,ns=0,Jo=0,vo=0,ma=0,ja=null,To=0,Ao=!1,la=5126,Ki=0,ho=0,Ka=0,vr(Un)?(Ss=!0,ja=ue.createStream(34962,Un),la=ja.dtype):(ja=ue.getBuffer(Un),ja?la=ja.dtype:"constant"in Un?(Kn=2,typeof Un.constant=="number"?(ns=Un.constant,Jo=vo=ma=0):(ns=Un.constant.length>0?Un.constant[0]:0,Jo=Un.constant.length>1?Un.constant[1]:0,vo=Un.constant.length>2?Un.constant[2]:0,ma=Un.constant.length>3?Un.constant[3]:0)):(vr(Un.buffer)?ja=ue.createStream(34962,Un.buffer):ja=ue.getBuffer(Un.buffer),la="type"in Un?zi[Un.type]:ja.dtype,Ao=!!Un.normalized,To=Un.size|0,Ki=Un.offset|0,ho=Un.stride|0,Ka=Un.divisor|0)),Ca=d.location,ta=ht[Ca],Kn===1?(ta.buffer||De.enableVertexAttribArray(Ca),En=To||4,(ta.type!==la||ta.size!==En||ta.buffer!==ja||ta.normalized!==Ao||ta.offset!==Ki||ta.stride!==ho)&&(De.bindBuffer(34962,ja.buffer),De.vertexAttribPointer(Ca,En,la,Ao,ho,Ki),ta.type=la,ta.size=En,ta.buffer=ja,ta.normalized=Ao,ta.offset=Ki,ta.stride=ho),ta.divisor!==Ka&&(or.vertexAttribDivisorANGLE(Ca,Ka),ta.divisor=Ka)):(ta.buffer&&(De.disableVertexAttribArray(Ca),ta.buffer=null),(ta.x!==ns||ta.y!==Jo||ta.z!==vo||ta.w!==ma)&&(De.vertexAttrib4f(Ca,ns,Jo,vo,ma),ta.x=ns,ta.y=Jo,ta.z=vo,ta.w=ma)),Mo=p.call(this,_e,hi,Nr),Ds=!1,Ro=1,vs=0,Ks=0,as=0,Jn=0,Cs=null,Xa=0,Zo=!1,Eo=5126,lo=0,$a=0,Xo=0,vr(Mo)?(Ds=!0,Cs=ue.createStream(34962,Mo),Eo=Cs.dtype):(Cs=ue.getBuffer(Mo),Cs?Eo=Cs.dtype:"constant"in Mo?(Ro=2,typeof Mo.constant=="number"?(vs=Mo.constant,Ks=as=Jn=0):(vs=Mo.constant.length>0?Mo.constant[0]:0,Ks=Mo.constant.length>1?Mo.constant[1]:0,as=Mo.constant.length>2?Mo.constant[2]:0,Jn=Mo.constant.length>3?Mo.constant[3]:0)):(vr(Mo.buffer)?Cs=ue.createStream(34962,Mo.buffer):Cs=ue.getBuffer(Mo.buffer),Eo="type"in Mo?zi[Mo.type]:Cs.dtype,Zo=!!Mo.normalized,Xa=Mo.size|0,lo=Mo.offset|0,$a=Mo.stride|0,Xo=Mo.divisor|0)),rs=x.location,$n=ht[rs],Ro===1?($n.buffer||De.enableVertexAttribArray(rs),Sn=Xa||1,($n.type!==Eo||$n.size!==Sn||$n.buffer!==Cs||$n.normalized!==Zo||$n.offset!==lo||$n.stride!==$a)&&(De.bindBuffer(34962,Cs.buffer),De.vertexAttribPointer(rs,Sn,Eo,Zo,$a,lo),$n.type=Eo,$n.size=Sn,$n.buffer=Cs,$n.normalized=Zo,$n.offset=lo,$n.stride=$a),$n.divisor!==Xo&&(or.vertexAttribDivisorANGLE(rs,Xo),$n.divisor=Xo)):($n.buffer&&(De.disableVertexAttribArray(rs),$n.buffer=null),($n.x!==vs||$n.y!==Ks||$n.z!==as||$n.w!==Jn)&&(De.vertexAttrib4f(rs,vs,Ks,as,Jn),$n.x=vs,$n.y=Ks,$n.z=as,$n.w=Jn)),uo=b.call(this,_e,hi,Nr),Rs=!1,xs=1,Go=0,os=0,So=0,Qn=0,zo=null,rl=0,$o=!1,Na=5126,Ua=0,Po=0,fo=0,vr(uo)?(Rs=!0,zo=ue.createStream(34962,uo),Na=zo.dtype):(zo=ue.getBuffer(uo),zo?Na=zo.dtype:"constant"in uo?(xs=2,typeof uo.constant=="number"?(Go=uo.constant,os=So=Qn=0):(Go=uo.constant.length>0?uo.constant[0]:0,os=uo.constant.length>1?uo.constant[1]:0,So=uo.constant.length>2?uo.constant[2]:0,Qn=uo.constant.length>3?uo.constant[3]:0)):(vr(uo.buffer)?zo=ue.createStream(34962,uo.buffer):zo=ue.getBuffer(uo.buffer),Na="type"in uo?zi[uo.type]:zo.dtype,$o=!!uo.normalized,rl=uo.size|0,Ua=uo.offset|0,Po=uo.stride|0,fo=uo.divisor|0)),ro=y.location,Ma=ht[ro],xs===1?(Ma.buffer||De.enableVertexAttribArray(ro),io=rl||1,(Ma.type!==Na||Ma.size!==io||Ma.buffer!==zo||Ma.normalized!==$o||Ma.offset!==Ua||Ma.stride!==Po)&&(De.bindBuffer(34962,zo.buffer),De.vertexAttribPointer(ro,io,Na,$o,Po,Ua),Ma.type=Na,Ma.size=io,Ma.buffer=zo,Ma.normalized=$o,Ma.offset=Ua,Ma.stride=Po),Ma.divisor!==fo&&(or.vertexAttribDivisorANGLE(ro,fo),Ma.divisor=fo)):(Ma.buffer&&(De.disableVertexAttribArray(ro),Ma.buffer=null),(Ma.x!==Go||Ma.y!==os||Ma.z!==So||Ma.w!==Qn)&&(De.vertexAttrib4f(ro,Go,os,So,Qn),Ma.x=Go,Ma.y=os,Ma.z=So,Ma.w=Qn)),aa=k.call(this,_e,hi,Nr),Oo=!1,No=1,Zs=0,Fs=0,ws=0,no=0,Ls=null,ds=0,Xs=!1,oa=5126,Yo=0,po=0,ss=0,vr(aa)?(Oo=!0,Ls=ue.createStream(34962,aa),oa=Ls.dtype):(Ls=ue.getBuffer(aa),Ls?oa=Ls.dtype:"constant"in aa?(No=2,typeof aa.constant=="number"?(Zs=aa.constant,Fs=ws=no=0):(Zs=aa.constant.length>0?aa.constant[0]:0,Fs=aa.constant.length>1?aa.constant[1]:0,ws=aa.constant.length>2?aa.constant[2]:0,no=aa.constant.length>3?aa.constant[3]:0)):(vr(aa.buffer)?Ls=ue.createStream(34962,aa.buffer):Ls=ue.getBuffer(aa.buffer),oa="type"in aa?zi[aa.type]:Ls.dtype,Xs=!!aa.normalized,ds=aa.size|0,Yo=aa.offset|0,po=aa.stride|0,ss=aa.divisor|0)),ls=E.location,gs=ht[ls],No===1?(gs.buffer||De.enableVertexAttribArray(ls),bt=ds||1,(gs.type!==oa||gs.size!==bt||gs.buffer!==Ls||gs.normalized!==Xs||gs.offset!==Yo||gs.stride!==po)&&(De.bindBuffer(34962,Ls.buffer),De.vertexAttribPointer(ls,bt,oa,Xs,po,Yo),gs.type=oa,gs.size=bt,gs.buffer=Ls,gs.normalized=Xs,gs.offset=Yo,gs.stride=po),gs.divisor!==ss&&(or.vertexAttribDivisorANGLE(ls,ss),gs.divisor=ss)):(gs.buffer&&(De.disableVertexAttribArray(ls),gs.buffer=null),(gs.x!==Zs||gs.y!==Fs||gs.z!==ws||gs.w!==no)&&(De.vertexAttrib4f(ls,Zs,Fs,ws,no),gs.x=Zs,gs.y=Fs,gs.z=ws,gs.w=no)),Ft=A.call(this,_e,hi,Nr),hr=!1,nr=1,Sr=0,li=0,di=0,mi=0,Oi=null,dn=0,wi=!1,ui=5126,Ai=0,gi=0,gn=0,vr(Ft)?(hr=!0,Oi=ue.createStream(34962,Ft),ui=Oi.dtype):(Oi=ue.getBuffer(Ft),Oi?ui=Oi.dtype:"constant"in Ft?(nr=2,typeof Ft.constant=="number"?(Sr=Ft.constant,li=di=mi=0):(Sr=Ft.constant.length>0?Ft.constant[0]:0,li=Ft.constant.length>1?Ft.constant[1]:0,di=Ft.constant.length>2?Ft.constant[2]:0,mi=Ft.constant.length>3?Ft.constant[3]:0)):(vr(Ft.buffer)?Oi=ue.createStream(34962,Ft.buffer):Oi=ue.getBuffer(Ft.buffer),ui="type"in Ft?zi[Ft.type]:Oi.dtype,wi=!!Ft.normalized,dn=Ft.size|0,Ai=Ft.offset|0,gi=Ft.stride|0,gn=Ft.divisor|0)),In=L.location,Vn=ht[In],nr===1?(Vn.buffer||De.enableVertexAttribArray(In),Rn=dn||1,(Vn.type!==ui||Vn.size!==Rn||Vn.buffer!==Oi||Vn.normalized!==wi||Vn.offset!==Ai||Vn.stride!==gi)&&(De.bindBuffer(34962,Oi.buffer),De.vertexAttribPointer(In,Rn,ui,wi,gi,Ai),Vn.type=ui,Vn.size=Rn,Vn.buffer=Oi,Vn.normalized=wi,Vn.offset=Ai,Vn.stride=gi),Vn.divisor!==gn&&(or.vertexAttribDivisorANGLE(In,gn),Vn.divisor=gn)):(Vn.buffer&&(De.disableVertexAttribArray(In),Vn.buffer=null),(Vn.x!==Sr||Vn.y!==li||Vn.z!==di||Vn.w!==mi)&&(De.vertexAttrib4f(In,Sr,li,di,mi),Vn.x=Sr,Vn.y=li,Vn.z=di,Vn.w=mi)),Hn=_.call(this,_e,hi,Nr),Gn=!1,pn=1,Lo=0,us=0,Bs=0,Js=0,ol=null,Cl=0,ul=!1,Gl=5126,Vl=0,Fl=0,ga=0,vr(Hn)?(Gn=!0,ol=ue.createStream(34962,Hn),Gl=ol.dtype):(ol=ue.getBuffer(Hn),ol?Gl=ol.dtype:"constant"in Hn?(pn=2,typeof Hn.constant=="number"?(Lo=Hn.constant,us=Bs=Js=0):(Lo=Hn.constant.length>0?Hn.constant[0]:0,us=Hn.constant.length>1?Hn.constant[1]:0,Bs=Hn.constant.length>2?Hn.constant[2]:0,Js=Hn.constant.length>3?Hn.constant[3]:0)):(vr(Hn.buffer)?ol=ue.createStream(34962,Hn.buffer):ol=ue.getBuffer(Hn.buffer),Gl="type"in Hn?zi[Hn.type]:ol.dtype,ul=!!Hn.normalized,Cl=Hn.size|0,Vl=Hn.offset|0,Fl=Hn.stride|0,ga=Hn.divisor|0)),ko=C.location,zs=ht[ko],pn===1?(zs.buffer||De.enableVertexAttribArray(ko),Fo=Cl||1,(zs.type!==Gl||zs.size!==Fo||zs.buffer!==ol||zs.normalized!==ul||zs.offset!==Vl||zs.stride!==Fl)&&(De.bindBuffer(34962,ol.buffer),De.vertexAttribPointer(ko,Fo,Gl,ul,Fl,Vl),zs.type=Gl,zs.size=Fo,zs.buffer=ol,zs.normalized=ul,zs.offset=Vl,zs.stride=Fl),zs.divisor!==ga&&(or.vertexAttribDivisorANGLE(ko,ga),zs.divisor=ga)):(zs.buffer&&(De.disableVertexAttribArray(ko),zs.buffer=null),(zs.x!==Lo||zs.y!==us||zs.z!==Bs||zs.w!==Js)&&(De.vertexAttrib4f(ko,Lo,us,Bs,Js),zs.x=Lo,zs.y=us,zs.z=Bs,zs.w=Js)),Ys=M.call(this,_e,hi,Nr),Gs=!1,Us=1,Sl=0,_l=0,kl=0,cl=0,xl=null,Uo=0,_s=!1,Bl=5126,Il=0,Dl=0,oe=0,vr(Ys)?(Gs=!0,xl=ue.createStream(34962,Ys),Bl=xl.dtype):(xl=ue.getBuffer(Ys),xl?Bl=xl.dtype:"constant"in Ys?(Us=2,typeof Ys.constant=="number"?(Sl=Ys.constant,_l=kl=cl=0):(Sl=Ys.constant.length>0?Ys.constant[0]:0,_l=Ys.constant.length>1?Ys.constant[1]:0,kl=Ys.constant.length>2?Ys.constant[2]:0,cl=Ys.constant.length>3?Ys.constant[3]:0)):(vr(Ys.buffer)?xl=ue.createStream(34962,Ys.buffer):xl=ue.getBuffer(Ys.buffer),Bl="type"in Ys?zi[Ys.type]:xl.dtype,_s=!!Ys.normalized,Uo=Ys.size|0,Il=Ys.offset|0,Dl=Ys.stride|0,oe=Ys.divisor|0)),w=v.location,B=ht[w],Us===1?(B.buffer||De.enableVertexAttribArray(w),Q=Uo||1,(B.type!==Bl||B.size!==Q||B.buffer!==xl||B.normalized!==_s||B.offset!==Il||B.stride!==Dl)&&(De.bindBuffer(34962,xl.buffer),De.vertexAttribPointer(w,Q,Bl,_s,Dl,Il),B.type=Bl,B.size=Q,B.buffer=xl,B.normalized=_s,B.offset=Il,B.stride=Dl),B.divisor!==oe&&(or.vertexAttribDivisorANGLE(w,oe),B.divisor=oe)):(B.buffer&&(De.disableVertexAttribArray(w),B.buffer=null),(B.x!==Sl||B.y!==_l||B.z!==kl||B.w!==cl)&&(De.vertexAttrib4f(w,Sl,_l,kl,cl),B.x=Sl,B.y=_l,B.z=kl,B.w=cl)),ee=hi.markerTexture,ee&&ee._reglType==="framebuffer"&&(ee=ee.color[0]),le=ee._texture,De.uniform1i(T.location,le.bind()),Ne=hi.opacity,(!Nr||$e!==Ne)&&($e=Ne,De.uniform1f(F.location,Ne)),pt=U.call(this,_e,hi,Nr),zt=pt[0],Jt=pt[1],(!Nr||Yt!==zt||yr!==Jt)&&(Yt=zt,yr=Jt,De.uniform2f(q.location,zt,Jt)),Ir=_e.pixelRatio,(!Nr||ce!==Ir)&&(ce=Ir,De.uniform1f(G.location,Ir)),Ae=hi.scale,qe=Ae[0],ot=Ae[1],(!Nr||Ve!==qe||Ke!==ot)&&(Ve=qe,Ke=ot,De.uniform2f(O.location,qe,ot)),ft=hi.scaleFract,qt=ft[0],$t=ft[1],(!Nr||Xt!==qt||dr!==$t)&&(Xt=qt,dr=$t,De.uniform2f(W.location,qt,$t)),Mr=hi.translate,$r=Mr[0],pi=Mr[1],(!Nr||ii!==$r||Yi!==pi)&&(ii=$r,Yi=pi,De.uniform2f(re.location,$r,pi)),wn=hi.translateFract,Tn=wn[0],oo=wn[1],(!Nr||ua!==Tn||el!==oo)&&(ua=Tn,el=oo,De.uniform2f(ne.location,Tn,oo)),ys=hi.elements,il=null,$l=vr(ys),$l?il=ye.createStream(ys):il=ye.getElements(ys),il&&De.bindBuffer(34963,il.buffer.buffer),pl=hi.offset,Hl=hi.count,Hl&&(va>0?il?or.drawElementsInstancedANGLE(0,Hl,il.type,pl<<(il.type-5121>>1),va):or.drawArraysInstancedANGLE(0,pl,Hl,va):va<0&&(il?De.drawElements(0,Hl,il.type,pl<<(il.type-5121>>1)):De.drawArrays(0,pl,Hl)),_e.viewportWidth=Qi,_e.viewportHeight=Nn,co&&ue.destroyStream(sa),Ia&&ue.destroyStream(Ln),Ss&&ue.destroyStream(ja),Ds&&ue.destroyStream(Cs),Rs&&ue.destroyStream(zo),Oo&&ue.destroyStream(Ls),hr&&ue.destroyStream(Oi),Gn&&ue.destroyStream(ol),Gs&&ue.destroyStream(xl),le.unbind(),$l&&ye.destroyStream(il))}j.unbind(),Ie.dirty=!0,Et.setVAO(null),Wt&&(r.cpuTime+=performance.now()-tr)}}}});var k9=Se((a1r,VOe)=>{VOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr){"use strict";var Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi;return Ot=t.gl,De=t.context,_e=t.strings,Fe=t.next,Pe=t.current,Ie=t.draw,lt=t.elements,ye=t.buffer,ue=t.shader,de=t.attributes,ht=t.vao,Et=t.uniforms,St=t.framebuffer,Zt=t.extensions,qr=t.timer,Lr=t.isBufferArgs,vr=Fe.blend_color,Er=Pe.blend_color,si=Fe.blend_equation,Ei=Pe.blend_equation,Si=Fe.blend_func,xi=Pe.blend_func,Hi=Fe.depth_range,Jr=Pe.depth_range,ci=Fe.colorMask,Di=Pe.colorMask,Lt=Fe.polygonOffset_offset,vt=Pe.polygonOffset_offset,Dt=Fe.sample_coverage,Bt=Pe.sample_coverage,sr=Fe.stencil_func,br=Pe.stencil_func,zr=Fe.stencil_opFront,Tr=Pe.stencil_opFront,Rr=Fe.stencil_opBack,Br=Pe.stencil_opBack,oi=Fe.scissor_box,vi=Pe.scissor_box,Pi=Fe.viewport,Yr=Pe.viewport,Ni={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ur={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ti={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ki={add:32774,subtract:32778,"reverse subtract":32779},ji={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Vi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},zi={cw:2304,ccw:2305},{draw:function(Mi){var sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys;if(sn=Zt.angle_instanced_arrays,fi=St.next,fi!==St.cur&&(fi?Ot.bindFramebuffer(36160,fi.framebuffer):Ot.bindFramebuffer(36160,null),St.cur=fi),Pe.dirty){var Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt;Gs=Fe.dither,Gs!==Pe.dither&&(Gs?Ot.enable(3024):Ot.disable(3024),Pe.dither=Gs),Us=si[0],Sl=si[1],(Us!==Ei[0]||Sl!==Ei[1])&&(Ot.blendEquationSeparate(Us,Sl),Ei[0]=Us,Ei[1]=Sl),_l=Fe.depth_func,_l!==Pe.depth_func&&(Ot.depthFunc(_l),Pe.depth_func=_l),kl=Hi[0],cl=Hi[1],(kl!==Jr[0]||cl!==Jr[1])&&(Ot.depthRange(kl,cl),Jr[0]=kl,Jr[1]=cl),xl=Fe.depth_mask,xl!==Pe.depth_mask&&(Ot.depthMask(xl),Pe.depth_mask=xl),Uo=ci[0],_s=ci[1],Bl=ci[2],Il=ci[3],(Uo!==Di[0]||_s!==Di[1]||Bl!==Di[2]||Il!==Di[3])&&(Ot.colorMask(Uo,_s,Bl,Il),Di[0]=Uo,Di[1]=_s,Di[2]=Bl,Di[3]=Il),Dl=Fe.cull_enable,Dl!==Pe.cull_enable&&(Dl?Ot.enable(2884):Ot.disable(2884),Pe.cull_enable=Dl),oe=Fe.cull_face,oe!==Pe.cull_face&&(Ot.cullFace(oe),Pe.cull_face=oe),w=Fe.frontFace,w!==Pe.frontFace&&(Ot.frontFace(w),Pe.frontFace=w),B=Fe.lineWidth,B!==Pe.lineWidth&&(Ot.lineWidth(B),Pe.lineWidth=B),Q=Fe.polygonOffset_enable,Q!==Pe.polygonOffset_enable&&(Q?Ot.enable(32823):Ot.disable(32823),Pe.polygonOffset_enable=Q),ee=Lt[0],le=Lt[1],(ee!==vt[0]||le!==vt[1])&&(Ot.polygonOffset(ee,le),vt[0]=ee,vt[1]=le),Ne=Fe.sample_alpha,Ne!==Pe.sample_alpha&&(Ne?Ot.enable(32926):Ot.disable(32926),Pe.sample_alpha=Ne),$e=Fe.sample_enable,$e!==Pe.sample_enable&&($e?Ot.enable(32928):Ot.disable(32928),Pe.sample_enable=$e),pt=Dt[0],zt=Dt[1],(pt!==Bt[0]||zt!==Bt[1])&&(Ot.sampleCoverage(pt,zt),Bt[0]=pt,Bt[1]=zt),Yt=Fe.stencil_mask,Yt!==Pe.stencil_mask&&(Ot.stencilMask(Yt),Pe.stencil_mask=Yt),Jt=sr[0],yr=sr[1],Ir=sr[2],(Jt!==br[0]||yr!==br[1]||Ir!==br[2])&&(Ot.stencilFunc(Jt,yr,Ir),br[0]=Jt,br[1]=yr,br[2]=Ir),ce=zr[0],Ae=zr[1],qe=zr[2],Ve=zr[3],(ce!==Tr[0]||Ae!==Tr[1]||qe!==Tr[2]||Ve!==Tr[3])&&(Ot.stencilOpSeparate(ce,Ae,qe,Ve),Tr[0]=ce,Tr[1]=Ae,Tr[2]=qe,Tr[3]=Ve),ot=Rr[0],Ke=Rr[1],ft=Rr[2],qt=Rr[3],(ot!==Br[0]||Ke!==Br[1]||ft!==Br[2]||qt!==Br[3])&&(Ot.stencilOpSeparate(ot,Ke,ft,qt),Br[0]=ot,Br[1]=Ke,Br[2]=ft,Br[3]=qt)}Or=Mi.viewport,st=Or.x|0,Wt=Or.y|0,tr="width"in Or?Or.width|0:De.framebufferWidth-st,or="height"in Or?Or.height|0:De.framebufferHeight-Wt,Nr=De.viewportWidth,De.viewportWidth=tr,hi=De.viewportHeight,De.viewportHeight=or,Ot.viewport(st,Wt,tr,or),Yr[0]=st,Yr[1]=Wt,Yr[2]=tr,Yr[3]=or,Ot.blendColor(0,0,0,1),Er[0]=0,Er[1]=0,Er[2]=0,Er[3]=1,n?Ot.enable(3042):Ot.disable(3042),Pe.blend_enable=n,Ot.blendFuncSeparate(770,771,773,1),xi[0]=770,xi[1]=771,xi[2]=773,xi[3]=1,i?Ot.enable(2929):Ot.disable(2929),Pe.depth_enable=i,Gi=Mi.viewport,Qr=Gi.x|0,Ui=Gi.y|0,zn="width"in Gi?Gi.width|0:De.framebufferWidth-Qr,fn="height"in Gi?Gi.height|0:De.framebufferHeight-Ui,Ot.scissor(Qr,Ui,zn,fn),vi[0]=Qr,vi[1]=Ui,vi[2]=zn,vi[3]=fn,a?Ot.enable(3089):Ot.disable(3089),Pe.scissor_enable=a,o?Ot.enable(2960):Ot.disable(2960),Pe.stencil_enable=o,xn=Pe.profile,xn&&(_a=performance.now(),r.count++),Ot.useProgram(s.program),Wn=Zt.angle_instanced_arrays,ht.setVAO(null),Fn=u.call(this,De,Mi,0),ia=!1,za=1,Hr=0,na=0,go=0,Dn=0,un=null,Zn=0,Wo=!1,Ba=5126,Bo=0,Ea=0,Ha=0,Lr(Fn)?(ia=!0,un=ye.createStream(34962,Fn),Ba=un.dtype):(un=ye.getBuffer(Fn),un?Ba=un.dtype:"constant"in Fn?(za=2,typeof Fn.constant=="number"?(Hr=Fn.constant,na=go=Dn=0):(Hr=Fn.constant.length>0?Fn.constant[0]:0,na=Fn.constant.length>1?Fn.constant[1]:0,go=Fn.constant.length>2?Fn.constant[2]:0,Dn=Fn.constant.length>3?Fn.constant[3]:0)):(Lr(Fn.buffer)?un=ye.createStream(34962,Fn.buffer):un=ye.getBuffer(Fn.buffer),Ba="type"in Fn?Vi[Fn.type]:un.dtype,Wo=!!Fn.normalized,Zn=Fn.size|0,Bo=Fn.offset|0,Ea=Fn.stride|0,Ha=Fn.divisor|0)),tn=l.location,Cn=de[tn],za===1?(Cn.buffer||Ot.enableVertexAttribArray(tn),Xn=Zn||4,(Cn.type!==Ba||Cn.size!==Xn||Cn.buffer!==un||Cn.normalized!==Wo||Cn.offset!==Bo||Cn.stride!==Ea)&&(Ot.bindBuffer(34962,un.buffer),Ot.vertexAttribPointer(tn,Xn,Ba,Wo,Ea,Bo),Cn.type=Ba,Cn.size=Xn,Cn.buffer=un,Cn.normalized=Wo,Cn.offset=Bo,Cn.stride=Ea),Cn.divisor!==Ha&&(Wn.vertexAttribDivisorANGLE(tn,Ha),Cn.divisor=Ha)):(Cn.buffer&&(Ot.disableVertexAttribArray(tn),Cn.buffer=null),(Cn.x!==Hr||Cn.y!==na||Cn.z!==go||Cn.w!==Dn)&&(Ot.vertexAttrib4f(tn,Hr,na,go,Dn),Cn.x=Hr,Cn.y=na,Cn.z=go,Cn.w=Dn)),ts=f.call(this,De,Mi,0),Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,Lr(ts)?(Ja=!0,ln=ye.createStream(34962,ts),bo=ln.dtype):(ln=ye.getBuffer(ts),ln?bo=ln.dtype:"constant"in ts?(to=2,typeof ts.constant=="number"?(Ri=ts.constant,an=cs=pa=0):(Ri=ts.constant.length>0?ts.constant[0]:0,an=ts.constant.length>1?ts.constant[1]:0,cs=ts.constant.length>2?ts.constant[2]:0,pa=ts.constant.length>3?ts.constant[3]:0)):(Lr(ts.buffer)?ln=ye.createStream(34962,ts.buffer):ln=ye.getBuffer(ts.buffer),bo="type"in ts?Vi[ts.type]:ln.dtype,va=!!ts.normalized,ka=ts.size|0,Co=ts.offset|0,Fi=ts.stride|0,Yn=ts.divisor|0)),xa=c.location,Qi=de[xa],to===1?(Qi.buffer||Ot.enableVertexAttribArray(xa),Nn=ka||1,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(Ot.bindBuffer(34962,ln.buffer),Ot.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(Wn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(Ot.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(Ot.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=h.call(this,De,Mi,0),qa=!1,jo=1,Vo=0,Pa=0,Oa=0,co=0,An=null,_o=0,ks=!1,bs=5126,ps=0,sa=0,Bn=0,Lr(Pn)?(qa=!0,An=ye.createStream(34962,Pn),bs=An.dtype):(An=ye.getBuffer(Pn),An?bs=An.dtype:"constant"in Pn?(jo=2,typeof Pn.constant=="number"?(Vo=Pn.constant,Pa=Oa=co=0):(Vo=Pn.constant.length>0?Pn.constant[0]:0,Pa=Pn.constant.length>1?Pn.constant[1]:0,Oa=Pn.constant.length>2?Pn.constant[2]:0,co=Pn.constant.length>3?Pn.constant[3]:0)):(Lr(Pn.buffer)?An=ye.createStream(34962,Pn.buffer):An=ye.getBuffer(Pn.buffer),bs="type"in Pn?Vi[Pn.type]:An.dtype,ks=!!Pn.normalized,_o=Pn.size|0,ps=Pn.offset|0,sa=Pn.stride|0,Bn=Pn.divisor|0)),ms=d.location,ya=de[ms],jo===1?(ya.buffer||Ot.enableVertexAttribArray(ms),on=_o||4,(ya.type!==bs||ya.size!==on||ya.buffer!==An||ya.normalized!==ks||ya.offset!==ps||ya.stride!==sa)&&(Ot.bindBuffer(34962,An.buffer),Ot.vertexAttribPointer(ms,on,bs,ks,sa,ps),ya.type=bs,ya.size=on,ya.buffer=An,ya.normalized=ks,ya.offset=ps,ya.stride=sa),ya.divisor!==Bn&&(Wn.vertexAttribDivisorANGLE(ms,Bn),ya.divisor=Bn)):(ya.buffer&&(Ot.disableVertexAttribArray(ms),ya.buffer=null),(ya.x!==Vo||ya.y!==Pa||ya.z!==Oa||ya.w!==co)&&(Ot.vertexAttrib4f(ms,Vo,Pa,Oa,co),ya.x=Vo,ya.y=Pa,ya.z=Oa,ya.w=co)),mn=p.call(this,De,Mi,0),Ga=!1,ca=1,bn=0,Xi=0,qn=0,Ia=0,yn=null,Ya=0,ba=!1,Da=5126,Aa=0,Ln=0,wo=0,Lr(mn)?(Ga=!0,yn=ye.createStream(34962,mn),Da=yn.dtype):(yn=ye.getBuffer(mn),yn?Da=yn.dtype:"constant"in mn?(ca=2,typeof mn.constant=="number"?(bn=mn.constant,Xi=qn=Ia=0):(bn=mn.constant.length>0?mn.constant[0]:0,Xi=mn.constant.length>1?mn.constant[1]:0,qn=mn.constant.length>2?mn.constant[2]:0,Ia=mn.constant.length>3?mn.constant[3]:0)):(Lr(mn.buffer)?yn=ye.createStream(34962,mn.buffer):yn=ye.getBuffer(mn.buffer),Da="type"in mn?Vi[mn.type]:yn.dtype,ba=!!mn.normalized,Ya=mn.size|0,Aa=mn.offset|0,Ln=mn.stride|0,wo=mn.divisor|0)),wa=x.location,$i=de[wa],ca===1?($i.buffer||Ot.enableVertexAttribArray(wa),ea=Ya||1,($i.type!==Da||$i.size!==ea||$i.buffer!==yn||$i.normalized!==ba||$i.offset!==Aa||$i.stride!==Ln)&&(Ot.bindBuffer(34962,yn.buffer),Ot.vertexAttribPointer(wa,ea,Da,ba,Ln,Aa),$i.type=Da,$i.size=ea,$i.buffer=yn,$i.normalized=ba,$i.offset=Aa,$i.stride=Ln),$i.divisor!==wo&&(Wn.vertexAttribDivisorANGLE(wa,wo),$i.divisor=wo)):($i.buffer&&(Ot.disableVertexAttribArray(wa),$i.buffer=null),($i.x!==bn||$i.y!==Xi||$i.z!==qn||$i.w!==Ia)&&(Ot.vertexAttrib4f(wa,bn,Xi,qn,Ia),$i.x=bn,$i.y=Xi,$i.z=qn,$i.w=Ia)),Sa=b.call(this,De,Mi,0),Za=!1,xo=1,Wa=0,hn=0,Un=0,Ss=0,Kn=null,ns=0,Jo=!1,vo=5126,ma=0,ja=0,To=0,Lr(Sa)?(Za=!0,Kn=ye.createStream(34962,Sa),vo=Kn.dtype):(Kn=ye.getBuffer(Sa),Kn?vo=Kn.dtype:"constant"in Sa?(xo=2,typeof Sa.constant=="number"?(Wa=Sa.constant,hn=Un=Ss=0):(Wa=Sa.constant.length>0?Sa.constant[0]:0,hn=Sa.constant.length>1?Sa.constant[1]:0,Un=Sa.constant.length>2?Sa.constant[2]:0,Ss=Sa.constant.length>3?Sa.constant[3]:0)):(Lr(Sa.buffer)?Kn=ye.createStream(34962,Sa.buffer):Kn=ye.getBuffer(Sa.buffer),vo="type"in Sa?Vi[Sa.type]:Kn.dtype,Jo=!!Sa.normalized,ns=Sa.size|0,ma=Sa.offset|0,ja=Sa.stride|0,To=Sa.divisor|0)),Ao=y.location,la=de[Ao],xo===1?(la.buffer||Ot.enableVertexAttribArray(Ao),Ki=ns||1,(la.type!==vo||la.size!==Ki||la.buffer!==Kn||la.normalized!==Jo||la.offset!==ma||la.stride!==ja)&&(Ot.bindBuffer(34962,Kn.buffer),Ot.vertexAttribPointer(Ao,Ki,vo,Jo,ja,ma),la.type=vo,la.size=Ki,la.buffer=Kn,la.normalized=Jo,la.offset=ma,la.stride=ja),la.divisor!==To&&(Wn.vertexAttribDivisorANGLE(Ao,To),la.divisor=To)):(la.buffer&&(Ot.disableVertexAttribArray(Ao),la.buffer=null),(la.x!==Wa||la.y!==hn||la.z!==Un||la.w!==Ss)&&(Ot.vertexAttrib4f(Ao,Wa,hn,Un,Ss),la.x=Wa,la.y=hn,la.z=Un,la.w=Ss)),ho=k.call(this,De,Mi,0),Ka=!1,Ca=1,ta=0,En=0,Mo=0,Ds=0,Ro=null,vs=0,Ks=!1,as=5126,Jn=0,Cs=0,Xa=0,Lr(ho)?(Ka=!0,Ro=ye.createStream(34962,ho),as=Ro.dtype):(Ro=ye.getBuffer(ho),Ro?as=Ro.dtype:"constant"in ho?(Ca=2,typeof ho.constant=="number"?(ta=ho.constant,En=Mo=Ds=0):(ta=ho.constant.length>0?ho.constant[0]:0,En=ho.constant.length>1?ho.constant[1]:0,Mo=ho.constant.length>2?ho.constant[2]:0,Ds=ho.constant.length>3?ho.constant[3]:0)):(Lr(ho.buffer)?Ro=ye.createStream(34962,ho.buffer):Ro=ye.getBuffer(ho.buffer),as="type"in ho?Vi[ho.type]:Ro.dtype,Ks=!!ho.normalized,vs=ho.size|0,Jn=ho.offset|0,Cs=ho.stride|0,Xa=ho.divisor|0)),Zo=E.location,Eo=de[Zo],Ca===1?(Eo.buffer||Ot.enableVertexAttribArray(Zo),lo=vs||1,(Eo.type!==as||Eo.size!==lo||Eo.buffer!==Ro||Eo.normalized!==Ks||Eo.offset!==Jn||Eo.stride!==Cs)&&(Ot.bindBuffer(34962,Ro.buffer),Ot.vertexAttribPointer(Zo,lo,as,Ks,Cs,Jn),Eo.type=as,Eo.size=lo,Eo.buffer=Ro,Eo.normalized=Ks,Eo.offset=Jn,Eo.stride=Cs),Eo.divisor!==Xa&&(Wn.vertexAttribDivisorANGLE(Zo,Xa),Eo.divisor=Xa)):(Eo.buffer&&(Ot.disableVertexAttribArray(Zo),Eo.buffer=null),(Eo.x!==ta||Eo.y!==En||Eo.z!==Mo||Eo.w!==Ds)&&(Ot.vertexAttrib4f(Zo,ta,En,Mo,Ds),Eo.x=ta,Eo.y=En,Eo.z=Mo,Eo.w=Ds)),$a=A.call(this,De,Mi,0),Xo=!1,rs=1,$n=0,Sn=0,uo=0,Rs=0,xs=null,Go=0,os=!1,So=5126,Qn=0,zo=0,rl=0,Lr($a)?(Xo=!0,xs=ye.createStream(34962,$a),So=xs.dtype):(xs=ye.getBuffer($a),xs?So=xs.dtype:"constant"in $a?(rs=2,typeof $a.constant=="number"?($n=$a.constant,Sn=uo=Rs=0):($n=$a.constant.length>0?$a.constant[0]:0,Sn=$a.constant.length>1?$a.constant[1]:0,uo=$a.constant.length>2?$a.constant[2]:0,Rs=$a.constant.length>3?$a.constant[3]:0)):(Lr($a.buffer)?xs=ye.createStream(34962,$a.buffer):xs=ye.getBuffer($a.buffer),So="type"in $a?Vi[$a.type]:xs.dtype,os=!!$a.normalized,Go=$a.size|0,Qn=$a.offset|0,zo=$a.stride|0,rl=$a.divisor|0)),$o=L.location,Na=de[$o],rs===1?(Na.buffer||Ot.enableVertexAttribArray($o),Ua=Go||1,(Na.type!==So||Na.size!==Ua||Na.buffer!==xs||Na.normalized!==os||Na.offset!==Qn||Na.stride!==zo)&&(Ot.bindBuffer(34962,xs.buffer),Ot.vertexAttribPointer($o,Ua,So,os,zo,Qn),Na.type=So,Na.size=Ua,Na.buffer=xs,Na.normalized=os,Na.offset=Qn,Na.stride=zo),Na.divisor!==rl&&(Wn.vertexAttribDivisorANGLE($o,rl),Na.divisor=rl)):(Na.buffer&&(Ot.disableVertexAttribArray($o),Na.buffer=null),(Na.x!==$n||Na.y!==Sn||Na.z!==uo||Na.w!==Rs)&&(Ot.vertexAttrib4f($o,$n,Sn,uo,Rs),Na.x=$n,Na.y=Sn,Na.z=uo,Na.w=Rs)),Po=_.call(this,De,Mi,0),fo=!1,ro=1,Ma=0,io=0,aa=0,Oo=0,No=null,Zs=0,Fs=!1,ws=5126,no=0,Ls=0,ds=0,Lr(Po)?(fo=!0,No=ye.createStream(34962,Po),ws=No.dtype):(No=ye.getBuffer(Po),No?ws=No.dtype:"constant"in Po?(ro=2,typeof Po.constant=="number"?(Ma=Po.constant,io=aa=Oo=0):(Ma=Po.constant.length>0?Po.constant[0]:0,io=Po.constant.length>1?Po.constant[1]:0,aa=Po.constant.length>2?Po.constant[2]:0,Oo=Po.constant.length>3?Po.constant[3]:0)):(Lr(Po.buffer)?No=ye.createStream(34962,Po.buffer):No=ye.getBuffer(Po.buffer),ws="type"in Po?Vi[Po.type]:No.dtype,Fs=!!Po.normalized,Zs=Po.size|0,no=Po.offset|0,Ls=Po.stride|0,ds=Po.divisor|0)),Xs=C.location,oa=de[Xs],ro===1?(oa.buffer||Ot.enableVertexAttribArray(Xs),Yo=Zs||1,(oa.type!==ws||oa.size!==Yo||oa.buffer!==No||oa.normalized!==Fs||oa.offset!==no||oa.stride!==Ls)&&(Ot.bindBuffer(34962,No.buffer),Ot.vertexAttribPointer(Xs,Yo,ws,Fs,Ls,no),oa.type=ws,oa.size=Yo,oa.buffer=No,oa.normalized=Fs,oa.offset=no,oa.stride=Ls),oa.divisor!==ds&&(Wn.vertexAttribDivisorANGLE(Xs,ds),oa.divisor=ds)):(oa.buffer&&(Ot.disableVertexAttribArray(Xs),oa.buffer=null),(oa.x!==Ma||oa.y!==io||oa.z!==aa||oa.w!==Oo)&&(Ot.vertexAttrib4f(Xs,Ma,io,aa,Oo),oa.x=Ma,oa.y=io,oa.z=aa,oa.w=Oo)),po=M.call(this,De,Mi,0),ss=!1,ls=1,gs=0,bt=0,Ft=0,hr=0,nr=null,Sr=0,li=!1,di=5126,mi=0,Oi=0,dn=0,Lr(po)?(ss=!0,nr=ye.createStream(34962,po),di=nr.dtype):(nr=ye.getBuffer(po),nr?di=nr.dtype:"constant"in po?(ls=2,typeof po.constant=="number"?(gs=po.constant,bt=Ft=hr=0):(gs=po.constant.length>0?po.constant[0]:0,bt=po.constant.length>1?po.constant[1]:0,Ft=po.constant.length>2?po.constant[2]:0,hr=po.constant.length>3?po.constant[3]:0)):(Lr(po.buffer)?nr=ye.createStream(34962,po.buffer):nr=ye.getBuffer(po.buffer),di="type"in po?Vi[po.type]:nr.dtype,li=!!po.normalized,Sr=po.size|0,mi=po.offset|0,Oi=po.stride|0,dn=po.divisor|0)),wi=v.location,ui=de[wi],ls===1?(ui.buffer||Ot.enableVertexAttribArray(wi),Ai=Sr||1,(ui.type!==di||ui.size!==Ai||ui.buffer!==nr||ui.normalized!==li||ui.offset!==mi||ui.stride!==Oi)&&(Ot.bindBuffer(34962,nr.buffer),Ot.vertexAttribPointer(wi,Ai,di,li,Oi,mi),ui.type=di,ui.size=Ai,ui.buffer=nr,ui.normalized=li,ui.offset=mi,ui.stride=Oi),ui.divisor!==dn&&(Wn.vertexAttribDivisorANGLE(wi,dn),ui.divisor=dn)):(ui.buffer&&(Ot.disableVertexAttribArray(wi),ui.buffer=null),(ui.x!==gs||ui.y!==bt||ui.z!==Ft||ui.w!==hr)&&(Ot.vertexAttrib4f(wi,gs,bt,Ft,hr),ui.x=gs,ui.y=bt,ui.z=Ft,ui.w=hr)),Ot.uniform1i(z.location,!1),gi=Mi.opacity,Ot.uniform1f(T.location,gi),gn=q.call(this,De,Mi,0),In=gn[0],Vn=gn[1],Ot.uniform2f(F.location,In,Vn),Ot.uniform1i(U.location,H.bind()),Rn=De.pixelRatio,Ot.uniform1f(j.location,Rn),Hn=Mi.scale,Gn=Hn[0],pn=Hn[1],Ot.uniform2f(G.location,Gn,pn),Lo=Mi.scaleFract,us=Lo[0],Bs=Lo[1],Ot.uniform2f(O.location,us,Bs),Js=Mi.translate,ol=Js[0],Cl=Js[1],Ot.uniform2f(W.location,ol,Cl),ul=Mi.translateFract,Gl=ul[0],Vl=ul[1],Ot.uniform2f(re.location,Gl,Vl),Fl=Mi.elements,ga=null,ko=Lr(Fl),ko?ga=lt.createStream(Fl):ga=lt.getElements(Fl),ga&&Ot.bindBuffer(34963,ga.buffer.buffer),zs=Mi.offset,Fo=Mi.count,Fo&&(Ys=Ie.instances,Ys>0?ga?Wn.drawElementsInstancedANGLE(0,Fo,ga.type,zs<<(ga.type-5121>>1),Ys):Wn.drawArraysInstancedANGLE(0,zs,Fo,Ys):Ys<0&&(ga?Ot.drawElements(0,Fo,ga.type,zs<<(ga.type-5121>>1)):Ot.drawArrays(0,zs,Fo)),Pe.dirty=!0,ht.setVAO(null),De.viewportWidth=Nr,De.viewportHeight=hi,xn&&(r.cpuTime+=performance.now()-_a),ia&&ye.destroyStream(un),Ja&&ye.destroyStream(ln),qa&&ye.destroyStream(An),Ga&&ye.destroyStream(yn),Za&&ye.destroyStream(Kn),Ka&&ye.destroyStream(Ro),Xo&&ye.destroyStream(xs),fo&&ye.destroyStream(No),ss&&ye.destroyStream(nr),H.unbind(),ko&<.destroyStream(ga))},scope:function(Mi,sn,fi){var Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf;Or=Mi.viewport,st=Or.x|0,Wt=Or.y|0,tr="width"in Or?Or.width|0:De.framebufferWidth-st,or="height"in Or?Or.height|0:De.framebufferHeight-Wt,Nr=De.viewportWidth,De.viewportWidth=tr,hi=De.viewportHeight,De.viewportHeight=or,Gi=Pi[0],Pi[0]=st,Qr=Pi[1],Pi[1]=Wt,Ui=Pi[2],Pi[2]=tr,zn=Pi[3],Pi[3]=or,fn=vr[0],vr[0]=ne,xn=vr[1],vr[1]=be,_a=vr[2],vr[2]=ze,Wn=vr[3],vr[3]=Ce,Fn=Fe.blend_enable,Fe.blend_enable=he,ia=Si[0],Si[0]=te,za=Si[1],Si[1]=ke,Hr=Si[2],Si[2]=Ee,na=Si[3],Si[3]=Me,go=Fe.depth_enable,Fe.depth_enable=Oe,Dn=Mi.viewport,un=Dn.x|0,Zn=Dn.y|0,Wo="width"in Dn?Dn.width|0:De.framebufferWidth-un,Ba="height"in Dn?Dn.height|0:De.framebufferHeight-Zn,Bo=oi[0],oi[0]=un,Ea=oi[1],oi[1]=Zn,Ha=oi[2],oi[2]=Wo,tn=oi[3],oi[3]=Ba,Cn=Fe.scissor_enable,Fe.scissor_enable=Re,Xn=Fe.stencil_enable,Fe.stencil_enable=me,ts=Pe.profile,ts&&(Ja=performance.now(),r.count++),to=Mi.elements,Ri=null,an=Lr(to),an?Ri=lt.createStream(to):Ri=lt.getElements(to),cs=Ie.elements,Ie.elements=Ri,pa=Mi.offset,ln=Ie.offset,Ie.offset=pa,ka=Mi.count,va=Ie.count,Ie.count=ka,bo=Ie.primitive,Ie.primitive=Be,Co=Et[fe],Et[fe]=!1,Fi=Et[et],Et[et]=Ze,Yn=Mi.opacity,xa=Et[gt],Et[gt]=Yn,Qi=q.call(this,De,Mi,fi),Nn=Et[Pt],Et[Pt]=Qi,Pn=De.pixelRatio,qa=Et[Qe],Et[Qe]=Pn,jo=Mi.scale,Vo=Et[Xe],Et[Xe]=jo,Pa=Mi.scaleFract,Oa=Et[Tt],Et[Tt]=Pa,co=Mi.translate,An=Et[xt],Et[xt]=co,_o=Mi.translateFract,ks=Et[_t],Et[_t]=_o,bs=Mi.markerTexture,ps=Et[Ct],Et[Ct]=bs,sa=k.call(this,De,Mi,fi),Bn=!1,ms=1,ya=0,on=0,mn=0,Ga=0,ca=null,bn=0,Xi=!1,qn=5126,Ia=0,yn=0,Ya=0,Lr(sa)?(Bn=!0,ca=ye.createStream(34962,sa),qn=ca.dtype):(ca=ye.getBuffer(sa),ca?qn=ca.dtype:"constant"in sa?(ms=2,typeof sa.constant=="number"?(ya=sa.constant,on=mn=Ga=0):(ya=sa.constant.length>0?sa.constant[0]:0,on=sa.constant.length>1?sa.constant[1]:0,mn=sa.constant.length>2?sa.constant[2]:0,Ga=sa.constant.length>3?sa.constant[3]:0)):(Lr(sa.buffer)?ca=ye.createStream(34962,sa.buffer):ca=ye.getBuffer(sa.buffer),qn="type"in sa?Vi[sa.type]:ca.dtype,Xi=!!sa.normalized,bn=sa.size|0,Ia=sa.offset|0,yn=sa.stride|0,Ya=sa.divisor|0)),ba=jt.state,jt.state=ms,Da=jt.x,jt.x=ya,Aa=jt.y,jt.y=on,Ln=jt.z,jt.z=mn,wo=jt.w,jt.w=Ga,wa=jt.buffer,jt.buffer=ca,$i=jt.size,jt.size=bn,ea=jt.normalized,jt.normalized=Xi,Sa=jt.type,jt.type=qn,Za=jt.offset,jt.offset=Ia,xo=jt.stride,jt.stride=yn,Wa=jt.divisor,jt.divisor=Ya,hn=_.call(this,De,Mi,fi),Un=!1,Ss=1,Kn=0,ns=0,Jo=0,vo=0,ma=null,ja=0,To=!1,Ao=5126,la=0,Ki=0,ho=0,Lr(hn)?(Un=!0,ma=ye.createStream(34962,hn),Ao=ma.dtype):(ma=ye.getBuffer(hn),ma?Ao=ma.dtype:"constant"in hn?(Ss=2,typeof hn.constant=="number"?(Kn=hn.constant,ns=Jo=vo=0):(Kn=hn.constant.length>0?hn.constant[0]:0,ns=hn.constant.length>1?hn.constant[1]:0,Jo=hn.constant.length>2?hn.constant[2]:0,vo=hn.constant.length>3?hn.constant[3]:0)):(Lr(hn.buffer)?ma=ye.createStream(34962,hn.buffer):ma=ye.getBuffer(hn.buffer),Ao="type"in hn?Vi[hn.type]:ma.dtype,To=!!hn.normalized,ja=hn.size|0,la=hn.offset|0,Ki=hn.stride|0,ho=hn.divisor|0)),Ka=At.state,At.state=Ss,Ca=At.x,At.x=Kn,ta=At.y,At.y=ns,En=At.z,At.z=Jo,Mo=At.w,At.w=vo,Ds=At.buffer,At.buffer=ma,Ro=At.size,At.size=ja,vs=At.normalized,At.normalized=To,Ks=At.type,At.type=Ao,as=At.offset,At.offset=la,Jn=At.stride,At.stride=Ki,Cs=At.divisor,At.divisor=ho,Xa=A.call(this,De,Mi,fi),Zo=!1,Eo=1,lo=0,$a=0,Xo=0,rs=0,$n=null,Sn=0,uo=!1,Rs=5126,xs=0,Go=0,os=0,Lr(Xa)?(Zo=!0,$n=ye.createStream(34962,Xa),Rs=$n.dtype):($n=ye.getBuffer(Xa),$n?Rs=$n.dtype:"constant"in Xa?(Eo=2,typeof Xa.constant=="number"?(lo=Xa.constant,$a=Xo=rs=0):(lo=Xa.constant.length>0?Xa.constant[0]:0,$a=Xa.constant.length>1?Xa.constant[1]:0,Xo=Xa.constant.length>2?Xa.constant[2]:0,rs=Xa.constant.length>3?Xa.constant[3]:0)):(Lr(Xa.buffer)?$n=ye.createStream(34962,Xa.buffer):$n=ye.getBuffer(Xa.buffer),Rs="type"in Xa?Vi[Xa.type]:$n.dtype,uo=!!Xa.normalized,Sn=Xa.size|0,xs=Xa.offset|0,Go=Xa.stride|0,os=Xa.divisor|0)),So=Te.state,Te.state=Eo,Qn=Te.x,Te.x=lo,zo=Te.y,Te.y=$a,rl=Te.z,Te.z=Xo,$o=Te.w,Te.w=rs,Na=Te.buffer,Te.buffer=$n,Ua=Te.size,Te.size=Sn,Po=Te.normalized,Te.normalized=uo,fo=Te.type,Te.type=Rs,ro=Te.offset,Te.offset=xs,Ma=Te.stride,Te.stride=Go,io=Te.divisor,Te.divisor=os,aa=M.call(this,De,Mi,fi),Oo=!1,No=1,Zs=0,Fs=0,ws=0,no=0,Ls=null,ds=0,Xs=!1,oa=5126,Yo=0,po=0,ss=0,Lr(aa)?(Oo=!0,Ls=ye.createStream(34962,aa),oa=Ls.dtype):(Ls=ye.getBuffer(aa),Ls?oa=Ls.dtype:"constant"in aa?(No=2,typeof aa.constant=="number"?(Zs=aa.constant,Fs=ws=no=0):(Zs=aa.constant.length>0?aa.constant[0]:0,Fs=aa.constant.length>1?aa.constant[1]:0,ws=aa.constant.length>2?aa.constant[2]:0,no=aa.constant.length>3?aa.constant[3]:0)):(Lr(aa.buffer)?Ls=ye.createStream(34962,aa.buffer):Ls=ye.getBuffer(aa.buffer),oa="type"in aa?Vi[aa.type]:Ls.dtype,Xs=!!aa.normalized,ds=aa.size|0,Yo=aa.offset|0,po=aa.stride|0,ss=aa.divisor|0)),ls=nt.state,nt.state=No,gs=nt.x,nt.x=Zs,bt=nt.y,nt.y=Fs,Ft=nt.z,nt.z=ws,hr=nt.w,nt.w=no,nr=nt.buffer,nt.buffer=Ls,Sr=nt.size,nt.size=ds,li=nt.normalized,nt.normalized=Xs,di=nt.type,nt.type=oa,mi=nt.offset,nt.offset=Yo,Oi=nt.stride,nt.stride=po,dn=nt.divisor,nt.divisor=ss,wi=b.call(this,De,Mi,fi),ui=!1,Ai=1,gi=0,gn=0,In=0,Vn=0,Rn=null,Hn=0,Gn=!1,pn=5126,Lo=0,us=0,Bs=0,Lr(wi)?(ui=!0,Rn=ye.createStream(34962,wi),pn=Rn.dtype):(Rn=ye.getBuffer(wi),Rn?pn=Rn.dtype:"constant"in wi?(Ai=2,typeof wi.constant=="number"?(gi=wi.constant,gn=In=Vn=0):(gi=wi.constant.length>0?wi.constant[0]:0,gn=wi.constant.length>1?wi.constant[1]:0,In=wi.constant.length>2?wi.constant[2]:0,Vn=wi.constant.length>3?wi.constant[3]:0)):(Lr(wi.buffer)?Rn=ye.createStream(34962,wi.buffer):Rn=ye.getBuffer(wi.buffer),pn="type"in wi?Vi[wi.type]:Rn.dtype,Gn=!!wi.normalized,Hn=wi.size|0,Lo=wi.offset|0,us=wi.stride|0,Bs=wi.divisor|0)),Js=ut.state,ut.state=Ai,ol=ut.x,ut.x=gi,Cl=ut.y,ut.y=gn,ul=ut.z,ut.z=In,Gl=ut.w,ut.w=Vn,Vl=ut.buffer,ut.buffer=Rn,Fl=ut.size,ut.size=Hn,ga=ut.normalized,ut.normalized=Gn,ko=ut.type,ut.type=pn,zs=ut.offset,ut.offset=Lo,Fo=ut.stride,ut.stride=us,Ys=ut.divisor,ut.divisor=Bs,Gs=f.call(this,De,Mi,fi),Us=!1,Sl=1,_l=0,kl=0,cl=0,xl=0,Uo=null,_s=0,Bl=!1,Il=5126,Dl=0,oe=0,w=0,Lr(Gs)?(Us=!0,Uo=ye.createStream(34962,Gs),Il=Uo.dtype):(Uo=ye.getBuffer(Gs),Uo?Il=Uo.dtype:"constant"in Gs?(Sl=2,typeof Gs.constant=="number"?(_l=Gs.constant,kl=cl=xl=0):(_l=Gs.constant.length>0?Gs.constant[0]:0,kl=Gs.constant.length>1?Gs.constant[1]:0,cl=Gs.constant.length>2?Gs.constant[2]:0,xl=Gs.constant.length>3?Gs.constant[3]:0)):(Lr(Gs.buffer)?Uo=ye.createStream(34962,Gs.buffer):Uo=ye.getBuffer(Gs.buffer),Il="type"in Gs?Vi[Gs.type]:Uo.dtype,Bl=!!Gs.normalized,_s=Gs.size|0,Dl=Gs.offset|0,oe=Gs.stride|0,w=Gs.divisor|0)),B=ct.state,ct.state=Sl,Q=ct.x,ct.x=_l,ee=ct.y,ct.y=kl,le=ct.z,ct.z=cl,Ne=ct.w,ct.w=xl,$e=ct.buffer,ct.buffer=Uo,pt=ct.size,ct.size=_s,zt=ct.normalized,ct.normalized=Bl,Yt=ct.type,ct.type=Il,Jt=ct.offset,ct.offset=Dl,yr=ct.stride,ct.stride=oe,Ir=ct.divisor,ct.divisor=w,ce=h.call(this,De,Mi,fi),Ae=!1,qe=1,Ve=0,ot=0,Ke=0,ft=0,qt=null,Xt=0,$t=!1,dr=5126,Mr=0,$r=0,ii=0,Lr(ce)?(Ae=!0,qt=ye.createStream(34962,ce),dr=qt.dtype):(qt=ye.getBuffer(ce),qt?dr=qt.dtype:"constant"in ce?(qe=2,typeof ce.constant=="number"?(Ve=ce.constant,ot=Ke=ft=0):(Ve=ce.constant.length>0?ce.constant[0]:0,ot=ce.constant.length>1?ce.constant[1]:0,Ke=ce.constant.length>2?ce.constant[2]:0,ft=ce.constant.length>3?ce.constant[3]:0)):(Lr(ce.buffer)?qt=ye.createStream(34962,ce.buffer):qt=ye.getBuffer(ce.buffer),dr="type"in ce?Vi[ce.type]:qt.dtype,$t=!!ce.normalized,Xt=ce.size|0,Mr=ce.offset|0,$r=ce.stride|0,ii=ce.divisor|0)),pi=rt.state,rt.state=qe,Yi=rt.x,rt.x=Ve,wn=rt.y,rt.y=ot,Tn=rt.z,rt.z=Ke,ua=rt.w,rt.w=ft,oo=rt.buffer,rt.buffer=qt,el=rt.size,rt.size=Xt,ys=rt.normalized,rt.normalized=$t,il=rt.type,rt.type=dr,$l=rt.offset,rt.offset=Mr,pl=rt.stride,rt.stride=$r,Hl=rt.divisor,rt.divisor=ii,Ll=u.call(this,De,Mi,fi),Ql=!1,ku=1,Jl=0,Kl=0,Hu=0,tf=0,Ku=null,Gu=0,Wu=!1,sf=5126,gf=0,nf=0,af=0,Lr(Ll)?(Ql=!0,Ku=ye.createStream(34962,Ll),sf=Ku.dtype):(Ku=ye.getBuffer(Ll),Ku?sf=Ku.dtype:"constant"in Ll?(ku=2,typeof Ll.constant=="number"?(Jl=Ll.constant,Kl=Hu=tf=0):(Jl=Ll.constant.length>0?Ll.constant[0]:0,Kl=Ll.constant.length>1?Ll.constant[1]:0,Hu=Ll.constant.length>2?Ll.constant[2]:0,tf=Ll.constant.length>3?Ll.constant[3]:0)):(Lr(Ll.buffer)?Ku=ye.createStream(34962,Ll.buffer):Ku=ye.getBuffer(Ll.buffer),sf="type"in Ll?Vi[Ll.type]:Ku.dtype,Wu=!!Ll.normalized,Gu=Ll.size|0,gf=Ll.offset|0,nf=Ll.stride|0,af=Ll.divisor|0)),X=je.state,je.state=ku,se=je.x,je.x=Jl,Le=je.y,je.y=Kl,We=je.z,je.z=Hu,Ye=je.w,je.w=tf,it=je.buffer,je.buffer=Ku,Nt=je.size,je.size=Gu,mt=je.normalized,je.normalized=Wu,er=je.type,je.type=sf,_r=je.offset,je.offset=gf,wr=je.stride,je.stride=nf,ni=je.divisor,je.divisor=af,Wr=p.call(this,De,Mi,fi),Ci=!1,Ji=1,ai=0,Ti=0,Bi=0,en=0,Wi=null,bi=0,ao=!1,yo=5126,Ko=0,Ms=0,vl=0,Lr(Wr)?(Ci=!0,Wi=ye.createStream(34962,Wr),yo=Wi.dtype):(Wi=ye.getBuffer(Wr),Wi?yo=Wi.dtype:"constant"in Wr?(Ji=2,typeof Wr.constant=="number"?(ai=Wr.constant,Ti=Bi=en=0):(ai=Wr.constant.length>0?Wr.constant[0]:0,Ti=Wr.constant.length>1?Wr.constant[1]:0,Bi=Wr.constant.length>2?Wr.constant[2]:0,en=Wr.constant.length>3?Wr.constant[3]:0)):(Lr(Wr.buffer)?Wi=ye.createStream(34962,Wr.buffer):Wi=ye.getBuffer(Wr.buffer),yo="type"in Wr?Vi[Wr.type]:Wi.dtype,ao=!!Wr.normalized,bi=Wr.size|0,Ko=Wr.offset|0,Ms=Wr.stride|0,vl=Wr.divisor|0)),wl=tt.state,tt.state=Ji,au=tt.x,tt.x=ai,Al=tt.y,tt.y=Ti,nu=tt.z,tt.z=Bi,Bu=tt.w,tt.w=en,qu=tt.buffer,tt.buffer=Wi,Ju=tt.size,tt.size=bi,qo=tt.normalized,tt.normalized=ao,Rl=tt.type,tt.type=yo,pu=tt.offset,tt.offset=Ko,xu=tt.stride,tt.stride=Ms,of=tt.divisor,tt.divisor=vl,ff=ue.vert,ue.vert=Je,xf=ue.frag,ue.frag=Mt,Pe.dirty=!0,sn(De,Mi,fi),De.viewportWidth=Nr,De.viewportHeight=hi,Pi[0]=Gi,Pi[1]=Qr,Pi[2]=Ui,Pi[3]=zn,vr[0]=fn,vr[1]=xn,vr[2]=_a,vr[3]=Wn,Fe.blend_enable=Fn,Si[0]=ia,Si[1]=za,Si[2]=Hr,Si[3]=na,Fe.depth_enable=go,oi[0]=Bo,oi[1]=Ea,oi[2]=Ha,oi[3]=tn,Fe.scissor_enable=Cn,Fe.stencil_enable=Xn,ts&&(r.cpuTime+=performance.now()-Ja),an&<.destroyStream(Ri),Ie.elements=cs,Ie.offset=ln,Ie.count=va,Ie.primitive=bo,Et[fe]=Co,Et[et]=Fi,Et[gt]=xa,Et[Pt]=Nn,Et[Qe]=qa,Et[Xe]=Vo,Et[Tt]=Oa,Et[xt]=An,Et[_t]=ks,Et[Ct]=ps,Bn&&ye.destroyStream(ca),jt.state=ba,jt.x=Da,jt.y=Aa,jt.z=Ln,jt.w=wo,jt.buffer=wa,jt.size=$i,jt.normalized=ea,jt.type=Sa,jt.offset=Za,jt.stride=xo,jt.divisor=Wa,Un&&ye.destroyStream(ma),At.state=Ka,At.x=Ca,At.y=ta,At.z=En,At.w=Mo,At.buffer=Ds,At.size=Ro,At.normalized=vs,At.type=Ks,At.offset=as,At.stride=Jn,At.divisor=Cs,Zo&&ye.destroyStream($n),Te.state=So,Te.x=Qn,Te.y=zo,Te.z=rl,Te.w=$o,Te.buffer=Na,Te.size=Ua,Te.normalized=Po,Te.type=fo,Te.offset=ro,Te.stride=Ma,Te.divisor=io,Oo&&ye.destroyStream(Ls),nt.state=ls,nt.x=gs,nt.y=bt,nt.z=Ft,nt.w=hr,nt.buffer=nr,nt.size=Sr,nt.normalized=li,nt.type=di,nt.offset=mi,nt.stride=Oi,nt.divisor=dn,ui&&ye.destroyStream(Rn),ut.state=Js,ut.x=ol,ut.y=Cl,ut.z=ul,ut.w=Gl,ut.buffer=Vl,ut.size=Fl,ut.normalized=ga,ut.type=ko,ut.offset=zs,ut.stride=Fo,ut.divisor=Ys,Us&&ye.destroyStream(Uo),ct.state=B,ct.x=Q,ct.y=ee,ct.z=le,ct.w=Ne,ct.buffer=$e,ct.size=pt,ct.normalized=zt,ct.type=Yt,ct.offset=Jt,ct.stride=yr,ct.divisor=Ir,Ae&&ye.destroyStream(qt),rt.state=pi,rt.x=Yi,rt.y=wn,rt.z=Tn,rt.w=ua,rt.buffer=oo,rt.size=el,rt.normalized=ys,rt.type=il,rt.offset=$l,rt.stride=pl,rt.divisor=Hl,Ql&&ye.destroyStream(Ku),je.state=X,je.x=se,je.y=Le,je.z=We,je.w=Ye,je.buffer=it,je.size=Nt,je.normalized=mt,je.type=er,je.offset=_r,je.stride=wr,je.divisor=ni,Ci&&ye.destroyStream(Wi),tt.state=wl,tt.x=au,tt.y=Al,tt.z=nu,tt.w=Bu,tt.buffer=qu,tt.size=Ju,tt.normalized=qo,tt.type=Rl,tt.offset=pu,tt.stride=xu,tt.divisor=of,ue.vert=ff,ue.frag=xf,Pe.dirty=!0},batch:function(Mi,sn){var fi,Or,st,Wt,tr,or,Nr;if(fi=Zt.angle_instanced_arrays,Or=St.next,Or!==St.cur&&(Or?Ot.bindFramebuffer(36160,Or.framebuffer):Ot.bindFramebuffer(36160,null),St.cur=Or),Pe.dirty){var hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln;hi=Fe.dither,hi!==Pe.dither&&(hi?Ot.enable(3024):Ot.disable(3024),Pe.dither=hi),Gi=si[0],Qr=si[1],(Gi!==Ei[0]||Qr!==Ei[1])&&(Ot.blendEquationSeparate(Gi,Qr),Ei[0]=Gi,Ei[1]=Qr),Ui=Fe.depth_func,Ui!==Pe.depth_func&&(Ot.depthFunc(Ui),Pe.depth_func=Ui),zn=Hi[0],fn=Hi[1],(zn!==Jr[0]||fn!==Jr[1])&&(Ot.depthRange(zn,fn),Jr[0]=zn,Jr[1]=fn),xn=Fe.depth_mask,xn!==Pe.depth_mask&&(Ot.depthMask(xn),Pe.depth_mask=xn),_a=ci[0],Wn=ci[1],Fn=ci[2],ia=ci[3],(_a!==Di[0]||Wn!==Di[1]||Fn!==Di[2]||ia!==Di[3])&&(Ot.colorMask(_a,Wn,Fn,ia),Di[0]=_a,Di[1]=Wn,Di[2]=Fn,Di[3]=ia),za=Fe.cull_enable,za!==Pe.cull_enable&&(za?Ot.enable(2884):Ot.disable(2884),Pe.cull_enable=za),Hr=Fe.cull_face,Hr!==Pe.cull_face&&(Ot.cullFace(Hr),Pe.cull_face=Hr),na=Fe.frontFace,na!==Pe.frontFace&&(Ot.frontFace(na),Pe.frontFace=na),go=Fe.lineWidth,go!==Pe.lineWidth&&(Ot.lineWidth(go),Pe.lineWidth=go),Dn=Fe.polygonOffset_enable,Dn!==Pe.polygonOffset_enable&&(Dn?Ot.enable(32823):Ot.disable(32823),Pe.polygonOffset_enable=Dn),un=Lt[0],Zn=Lt[1],(un!==vt[0]||Zn!==vt[1])&&(Ot.polygonOffset(un,Zn),vt[0]=un,vt[1]=Zn),Wo=Fe.sample_alpha,Wo!==Pe.sample_alpha&&(Wo?Ot.enable(32926):Ot.disable(32926),Pe.sample_alpha=Wo),Ba=Fe.sample_enable,Ba!==Pe.sample_enable&&(Ba?Ot.enable(32928):Ot.disable(32928),Pe.sample_enable=Ba),Bo=Dt[0],Ea=Dt[1],(Bo!==Bt[0]||Ea!==Bt[1])&&(Ot.sampleCoverage(Bo,Ea),Bt[0]=Bo,Bt[1]=Ea),Ha=Fe.stencil_mask,Ha!==Pe.stencil_mask&&(Ot.stencilMask(Ha),Pe.stencil_mask=Ha),tn=sr[0],Cn=sr[1],Xn=sr[2],(tn!==br[0]||Cn!==br[1]||Xn!==br[2])&&(Ot.stencilFunc(tn,Cn,Xn),br[0]=tn,br[1]=Cn,br[2]=Xn),ts=zr[0],Ja=zr[1],to=zr[2],Ri=zr[3],(ts!==Tr[0]||Ja!==Tr[1]||to!==Tr[2]||Ri!==Tr[3])&&(Ot.stencilOpSeparate(ts,Ja,to,Ri),Tr[0]=ts,Tr[1]=Ja,Tr[2]=to,Tr[3]=Ri),an=Rr[0],cs=Rr[1],pa=Rr[2],ln=Rr[3],(an!==Br[0]||cs!==Br[1]||pa!==Br[2]||ln!==Br[3])&&(Ot.stencilOpSeparate(an,cs,pa,ln),Br[0]=an,Br[1]=cs,Br[2]=pa,Br[3]=ln)}Ot.blendColor(0,0,0,1),Er[0]=0,Er[1]=0,Er[2]=0,Er[3]=1,Vt?Ot.enable(3042):Ot.disable(3042),Pe.blend_enable=Vt,Ot.blendFuncSeparate(770,771,773,1),xi[0]=770,xi[1]=771,xi[2]=773,xi[3]=1,Kt?Ot.enable(2929):Ot.disable(2929),Pe.depth_enable=Kt,ir?Ot.enable(3089):Ot.disable(3089),Pe.scissor_enable=ir,fr?Ot.enable(2960):Ot.disable(2960),Pe.stencil_enable=fr,st=Pe.profile,st&&(Wt=performance.now(),r.count+=sn),Ot.useProgram(s.program),tr=Zt.angle_instanced_arrays;var ka;for(ht.setVAO(null),Ot.uniform1i(z.location,!1),Ot.uniform1i(U.location,H.bind()),ka=Ie.instances,or=0;or0?Pa.constant[0]:0,_o=Pa.constant.length>1?Pa.constant[1]:0,ks=Pa.constant.length>2?Pa.constant[2]:0,bs=Pa.constant.length>3?Pa.constant[3]:0)):(Lr(Pa.buffer)?ps=ye.createStream(34962,Pa.buffer):ps=ye.getBuffer(Pa.buffer),ms="type"in Pa?Vi[Pa.type]:ps.dtype,Bn=!!Pa.normalized,sa=Pa.size|0,ya=Pa.offset|0,on=Pa.stride|0,mn=Pa.divisor|0)),Ga=l.location,ca=de[Ga],co===1?(ca.buffer||Ot.enableVertexAttribArray(Ga),bn=sa||4,(ca.type!==ms||ca.size!==bn||ca.buffer!==ps||ca.normalized!==Bn||ca.offset!==ya||ca.stride!==on)&&(Ot.bindBuffer(34962,ps.buffer),Ot.vertexAttribPointer(Ga,bn,ms,Bn,on,ya),ca.type=ms,ca.size=bn,ca.buffer=ps,ca.normalized=Bn,ca.offset=ya,ca.stride=on),ca.divisor!==mn&&(tr.vertexAttribDivisorANGLE(Ga,mn),ca.divisor=mn)):(ca.buffer&&(Ot.disableVertexAttribArray(Ga),ca.buffer=null),(ca.x!==An||ca.y!==_o||ca.z!==ks||ca.w!==bs)&&(Ot.vertexAttrib4f(Ga,An,_o,ks,bs),ca.x=An,ca.y=_o,ca.z=ks,ca.w=bs)),Xi=f.call(this,De,Nr,or),qn=!1,Ia=1,yn=0,Ya=0,ba=0,Da=0,Aa=null,Ln=0,wo=!1,wa=5126,$i=0,ea=0,Sa=0,Lr(Xi)?(qn=!0,Aa=ye.createStream(34962,Xi),wa=Aa.dtype):(Aa=ye.getBuffer(Xi),Aa?wa=Aa.dtype:"constant"in Xi?(Ia=2,typeof Xi.constant=="number"?(yn=Xi.constant,Ya=ba=Da=0):(yn=Xi.constant.length>0?Xi.constant[0]:0,Ya=Xi.constant.length>1?Xi.constant[1]:0,ba=Xi.constant.length>2?Xi.constant[2]:0,Da=Xi.constant.length>3?Xi.constant[3]:0)):(Lr(Xi.buffer)?Aa=ye.createStream(34962,Xi.buffer):Aa=ye.getBuffer(Xi.buffer),wa="type"in Xi?Vi[Xi.type]:Aa.dtype,wo=!!Xi.normalized,Ln=Xi.size|0,$i=Xi.offset|0,ea=Xi.stride|0,Sa=Xi.divisor|0)),Za=c.location,xo=de[Za],Ia===1?(xo.buffer||Ot.enableVertexAttribArray(Za),Wa=Ln||1,(xo.type!==wa||xo.size!==Wa||xo.buffer!==Aa||xo.normalized!==wo||xo.offset!==$i||xo.stride!==ea)&&(Ot.bindBuffer(34962,Aa.buffer),Ot.vertexAttribPointer(Za,Wa,wa,wo,ea,$i),xo.type=wa,xo.size=Wa,xo.buffer=Aa,xo.normalized=wo,xo.offset=$i,xo.stride=ea),xo.divisor!==Sa&&(tr.vertexAttribDivisorANGLE(Za,Sa),xo.divisor=Sa)):(xo.buffer&&(Ot.disableVertexAttribArray(Za),xo.buffer=null),(xo.x!==yn||xo.y!==Ya||xo.z!==ba||xo.w!==Da)&&(Ot.vertexAttrib4f(Za,yn,Ya,ba,Da),xo.x=yn,xo.y=Ya,xo.z=ba,xo.w=Da)),hn=h.call(this,De,Nr,or),Un=!1,Ss=1,Kn=0,ns=0,Jo=0,vo=0,ma=null,ja=0,To=!1,Ao=5126,la=0,Ki=0,ho=0,Lr(hn)?(Un=!0,ma=ye.createStream(34962,hn),Ao=ma.dtype):(ma=ye.getBuffer(hn),ma?Ao=ma.dtype:"constant"in hn?(Ss=2,typeof hn.constant=="number"?(Kn=hn.constant,ns=Jo=vo=0):(Kn=hn.constant.length>0?hn.constant[0]:0,ns=hn.constant.length>1?hn.constant[1]:0,Jo=hn.constant.length>2?hn.constant[2]:0,vo=hn.constant.length>3?hn.constant[3]:0)):(Lr(hn.buffer)?ma=ye.createStream(34962,hn.buffer):ma=ye.getBuffer(hn.buffer),Ao="type"in hn?Vi[hn.type]:ma.dtype,To=!!hn.normalized,ja=hn.size|0,la=hn.offset|0,Ki=hn.stride|0,ho=hn.divisor|0)),Ka=d.location,Ca=de[Ka],Ss===1?(Ca.buffer||Ot.enableVertexAttribArray(Ka),ta=ja||4,(Ca.type!==Ao||Ca.size!==ta||Ca.buffer!==ma||Ca.normalized!==To||Ca.offset!==la||Ca.stride!==Ki)&&(Ot.bindBuffer(34962,ma.buffer),Ot.vertexAttribPointer(Ka,ta,Ao,To,Ki,la),Ca.type=Ao,Ca.size=ta,Ca.buffer=ma,Ca.normalized=To,Ca.offset=la,Ca.stride=Ki),Ca.divisor!==ho&&(tr.vertexAttribDivisorANGLE(Ka,ho),Ca.divisor=ho)):(Ca.buffer&&(Ot.disableVertexAttribArray(Ka),Ca.buffer=null),(Ca.x!==Kn||Ca.y!==ns||Ca.z!==Jo||Ca.w!==vo)&&(Ot.vertexAttrib4f(Ka,Kn,ns,Jo,vo),Ca.x=Kn,Ca.y=ns,Ca.z=Jo,Ca.w=vo)),En=p.call(this,De,Nr,or),Mo=!1,Ds=1,Ro=0,vs=0,Ks=0,as=0,Jn=null,Cs=0,Xa=!1,Zo=5126,Eo=0,lo=0,$a=0,Lr(En)?(Mo=!0,Jn=ye.createStream(34962,En),Zo=Jn.dtype):(Jn=ye.getBuffer(En),Jn?Zo=Jn.dtype:"constant"in En?(Ds=2,typeof En.constant=="number"?(Ro=En.constant,vs=Ks=as=0):(Ro=En.constant.length>0?En.constant[0]:0,vs=En.constant.length>1?En.constant[1]:0,Ks=En.constant.length>2?En.constant[2]:0,as=En.constant.length>3?En.constant[3]:0)):(Lr(En.buffer)?Jn=ye.createStream(34962,En.buffer):Jn=ye.getBuffer(En.buffer),Zo="type"in En?Vi[En.type]:Jn.dtype,Xa=!!En.normalized,Cs=En.size|0,Eo=En.offset|0,lo=En.stride|0,$a=En.divisor|0)),Xo=x.location,rs=de[Xo],Ds===1?(rs.buffer||Ot.enableVertexAttribArray(Xo),$n=Cs||1,(rs.type!==Zo||rs.size!==$n||rs.buffer!==Jn||rs.normalized!==Xa||rs.offset!==Eo||rs.stride!==lo)&&(Ot.bindBuffer(34962,Jn.buffer),Ot.vertexAttribPointer(Xo,$n,Zo,Xa,lo,Eo),rs.type=Zo,rs.size=$n,rs.buffer=Jn,rs.normalized=Xa,rs.offset=Eo,rs.stride=lo),rs.divisor!==$a&&(tr.vertexAttribDivisorANGLE(Xo,$a),rs.divisor=$a)):(rs.buffer&&(Ot.disableVertexAttribArray(Xo),rs.buffer=null),(rs.x!==Ro||rs.y!==vs||rs.z!==Ks||rs.w!==as)&&(Ot.vertexAttrib4f(Xo,Ro,vs,Ks,as),rs.x=Ro,rs.y=vs,rs.z=Ks,rs.w=as)),Sn=b.call(this,De,Nr,or),uo=!1,Rs=1,xs=0,Go=0,os=0,So=0,Qn=null,zo=0,rl=!1,$o=5126,Na=0,Ua=0,Po=0,Lr(Sn)?(uo=!0,Qn=ye.createStream(34962,Sn),$o=Qn.dtype):(Qn=ye.getBuffer(Sn),Qn?$o=Qn.dtype:"constant"in Sn?(Rs=2,typeof Sn.constant=="number"?(xs=Sn.constant,Go=os=So=0):(xs=Sn.constant.length>0?Sn.constant[0]:0,Go=Sn.constant.length>1?Sn.constant[1]:0,os=Sn.constant.length>2?Sn.constant[2]:0,So=Sn.constant.length>3?Sn.constant[3]:0)):(Lr(Sn.buffer)?Qn=ye.createStream(34962,Sn.buffer):Qn=ye.getBuffer(Sn.buffer),$o="type"in Sn?Vi[Sn.type]:Qn.dtype,rl=!!Sn.normalized,zo=Sn.size|0,Na=Sn.offset|0,Ua=Sn.stride|0,Po=Sn.divisor|0)),fo=y.location,ro=de[fo],Rs===1?(ro.buffer||Ot.enableVertexAttribArray(fo),Ma=zo||1,(ro.type!==$o||ro.size!==Ma||ro.buffer!==Qn||ro.normalized!==rl||ro.offset!==Na||ro.stride!==Ua)&&(Ot.bindBuffer(34962,Qn.buffer),Ot.vertexAttribPointer(fo,Ma,$o,rl,Ua,Na),ro.type=$o,ro.size=Ma,ro.buffer=Qn,ro.normalized=rl,ro.offset=Na,ro.stride=Ua),ro.divisor!==Po&&(tr.vertexAttribDivisorANGLE(fo,Po),ro.divisor=Po)):(ro.buffer&&(Ot.disableVertexAttribArray(fo),ro.buffer=null),(ro.x!==xs||ro.y!==Go||ro.z!==os||ro.w!==So)&&(Ot.vertexAttrib4f(fo,xs,Go,os,So),ro.x=xs,ro.y=Go,ro.z=os,ro.w=So)),io=k.call(this,De,Nr,or),aa=!1,Oo=1,No=0,Zs=0,Fs=0,ws=0,no=null,Ls=0,ds=!1,Xs=5126,oa=0,Yo=0,po=0,Lr(io)?(aa=!0,no=ye.createStream(34962,io),Xs=no.dtype):(no=ye.getBuffer(io),no?Xs=no.dtype:"constant"in io?(Oo=2,typeof io.constant=="number"?(No=io.constant,Zs=Fs=ws=0):(No=io.constant.length>0?io.constant[0]:0,Zs=io.constant.length>1?io.constant[1]:0,Fs=io.constant.length>2?io.constant[2]:0,ws=io.constant.length>3?io.constant[3]:0)):(Lr(io.buffer)?no=ye.createStream(34962,io.buffer):no=ye.getBuffer(io.buffer),Xs="type"in io?Vi[io.type]:no.dtype,ds=!!io.normalized,Ls=io.size|0,oa=io.offset|0,Yo=io.stride|0,po=io.divisor|0)),ss=E.location,ls=de[ss],Oo===1?(ls.buffer||Ot.enableVertexAttribArray(ss),gs=Ls||1,(ls.type!==Xs||ls.size!==gs||ls.buffer!==no||ls.normalized!==ds||ls.offset!==oa||ls.stride!==Yo)&&(Ot.bindBuffer(34962,no.buffer),Ot.vertexAttribPointer(ss,gs,Xs,ds,Yo,oa),ls.type=Xs,ls.size=gs,ls.buffer=no,ls.normalized=ds,ls.offset=oa,ls.stride=Yo),ls.divisor!==po&&(tr.vertexAttribDivisorANGLE(ss,po),ls.divisor=po)):(ls.buffer&&(Ot.disableVertexAttribArray(ss),ls.buffer=null),(ls.x!==No||ls.y!==Zs||ls.z!==Fs||ls.w!==ws)&&(Ot.vertexAttrib4f(ss,No,Zs,Fs,ws),ls.x=No,ls.y=Zs,ls.z=Fs,ls.w=ws)),bt=A.call(this,De,Nr,or),Ft=!1,hr=1,nr=0,Sr=0,li=0,di=0,mi=null,Oi=0,dn=!1,wi=5126,ui=0,Ai=0,gi=0,Lr(bt)?(Ft=!0,mi=ye.createStream(34962,bt),wi=mi.dtype):(mi=ye.getBuffer(bt),mi?wi=mi.dtype:"constant"in bt?(hr=2,typeof bt.constant=="number"?(nr=bt.constant,Sr=li=di=0):(nr=bt.constant.length>0?bt.constant[0]:0,Sr=bt.constant.length>1?bt.constant[1]:0,li=bt.constant.length>2?bt.constant[2]:0,di=bt.constant.length>3?bt.constant[3]:0)):(Lr(bt.buffer)?mi=ye.createStream(34962,bt.buffer):mi=ye.getBuffer(bt.buffer),wi="type"in bt?Vi[bt.type]:mi.dtype,dn=!!bt.normalized,Oi=bt.size|0,ui=bt.offset|0,Ai=bt.stride|0,gi=bt.divisor|0)),gn=L.location,In=de[gn],hr===1?(In.buffer||Ot.enableVertexAttribArray(gn),Vn=Oi||1,(In.type!==wi||In.size!==Vn||In.buffer!==mi||In.normalized!==dn||In.offset!==ui||In.stride!==Ai)&&(Ot.bindBuffer(34962,mi.buffer),Ot.vertexAttribPointer(gn,Vn,wi,dn,Ai,ui),In.type=wi,In.size=Vn,In.buffer=mi,In.normalized=dn,In.offset=ui,In.stride=Ai),In.divisor!==gi&&(tr.vertexAttribDivisorANGLE(gn,gi),In.divisor=gi)):(In.buffer&&(Ot.disableVertexAttribArray(gn),In.buffer=null),(In.x!==nr||In.y!==Sr||In.z!==li||In.w!==di)&&(Ot.vertexAttrib4f(gn,nr,Sr,li,di),In.x=nr,In.y=Sr,In.z=li,In.w=di)),Rn=_.call(this,De,Nr,or),Hn=!1,Gn=1,pn=0,Lo=0,us=0,Bs=0,Js=null,ol=0,Cl=!1,ul=5126,Gl=0,Vl=0,Fl=0,Lr(Rn)?(Hn=!0,Js=ye.createStream(34962,Rn),ul=Js.dtype):(Js=ye.getBuffer(Rn),Js?ul=Js.dtype:"constant"in Rn?(Gn=2,typeof Rn.constant=="number"?(pn=Rn.constant,Lo=us=Bs=0):(pn=Rn.constant.length>0?Rn.constant[0]:0,Lo=Rn.constant.length>1?Rn.constant[1]:0,us=Rn.constant.length>2?Rn.constant[2]:0,Bs=Rn.constant.length>3?Rn.constant[3]:0)):(Lr(Rn.buffer)?Js=ye.createStream(34962,Rn.buffer):Js=ye.getBuffer(Rn.buffer),ul="type"in Rn?Vi[Rn.type]:Js.dtype,Cl=!!Rn.normalized,ol=Rn.size|0,Gl=Rn.offset|0,Vl=Rn.stride|0,Fl=Rn.divisor|0)),ga=C.location,ko=de[ga],Gn===1?(ko.buffer||Ot.enableVertexAttribArray(ga),zs=ol||1,(ko.type!==ul||ko.size!==zs||ko.buffer!==Js||ko.normalized!==Cl||ko.offset!==Gl||ko.stride!==Vl)&&(Ot.bindBuffer(34962,Js.buffer),Ot.vertexAttribPointer(ga,zs,ul,Cl,Vl,Gl),ko.type=ul,ko.size=zs,ko.buffer=Js,ko.normalized=Cl,ko.offset=Gl,ko.stride=Vl),ko.divisor!==Fl&&(tr.vertexAttribDivisorANGLE(ga,Fl),ko.divisor=Fl)):(ko.buffer&&(Ot.disableVertexAttribArray(ga),ko.buffer=null),(ko.x!==pn||ko.y!==Lo||ko.z!==us||ko.w!==Bs)&&(Ot.vertexAttrib4f(ga,pn,Lo,us,Bs),ko.x=pn,ko.y=Lo,ko.z=us,ko.w=Bs)),Fo=M.call(this,De,Nr,or),Ys=!1,Gs=1,Us=0,Sl=0,_l=0,kl=0,cl=null,xl=0,Uo=!1,_s=5126,Bl=0,Il=0,Dl=0,Lr(Fo)?(Ys=!0,cl=ye.createStream(34962,Fo),_s=cl.dtype):(cl=ye.getBuffer(Fo),cl?_s=cl.dtype:"constant"in Fo?(Gs=2,typeof Fo.constant=="number"?(Us=Fo.constant,Sl=_l=kl=0):(Us=Fo.constant.length>0?Fo.constant[0]:0,Sl=Fo.constant.length>1?Fo.constant[1]:0,_l=Fo.constant.length>2?Fo.constant[2]:0,kl=Fo.constant.length>3?Fo.constant[3]:0)):(Lr(Fo.buffer)?cl=ye.createStream(34962,Fo.buffer):cl=ye.getBuffer(Fo.buffer),_s="type"in Fo?Vi[Fo.type]:cl.dtype,Uo=!!Fo.normalized,xl=Fo.size|0,Bl=Fo.offset|0,Il=Fo.stride|0,Dl=Fo.divisor|0)),oe=v.location,w=de[oe],Gs===1?(w.buffer||Ot.enableVertexAttribArray(oe),B=xl||1,(w.type!==_s||w.size!==B||w.buffer!==cl||w.normalized!==Uo||w.offset!==Bl||w.stride!==Il)&&(Ot.bindBuffer(34962,cl.buffer),Ot.vertexAttribPointer(oe,B,_s,Uo,Il,Bl),w.type=_s,w.size=B,w.buffer=cl,w.normalized=Uo,w.offset=Bl,w.stride=Il),w.divisor!==Dl&&(tr.vertexAttribDivisorANGLE(oe,Dl),w.divisor=Dl)):(w.buffer&&(Ot.disableVertexAttribArray(oe),w.buffer=null),(w.x!==Us||w.y!==Sl||w.z!==_l||w.w!==kl)&&(Ot.vertexAttrib4f(oe,Us,Sl,_l,kl),w.x=Us,w.y=Sl,w.z=_l,w.w=kl)),Q=Nr.opacity,(!or||ee!==Q)&&(ee=Q,Ot.uniform1f(T.location,Q)),le=q.call(this,De,Nr,or),Ne=le[0],pt=le[1],(!or||$e!==Ne||zt!==pt)&&($e=Ne,zt=pt,Ot.uniform2f(F.location,Ne,pt)),Yt=De.pixelRatio,(!or||Jt!==Yt)&&(Jt=Yt,Ot.uniform1f(j.location,Yt)),yr=Nr.scale,Ir=yr[0],Ae=yr[1],(!or||ce!==Ir||qe!==Ae)&&(ce=Ir,qe=Ae,Ot.uniform2f(G.location,Ir,Ae)),Ve=Nr.scaleFract,ot=Ve[0],ft=Ve[1],(!or||Ke!==ot||qt!==ft)&&(Ke=ot,qt=ft,Ot.uniform2f(O.location,ot,ft)),Xt=Nr.translate,$t=Xt[0],Mr=Xt[1],(!or||dr!==$t||$r!==Mr)&&(dr=$t,$r=Mr,Ot.uniform2f(W.location,$t,Mr)),ii=Nr.translateFract,pi=ii[0],wn=ii[1],(!or||Yi!==pi||Tn!==wn)&&(Yi=pi,Tn=wn,Ot.uniform2f(re.location,pi,wn)),ua=Nr.elements,oo=null,el=Lr(ua),el?oo=lt.createStream(ua):oo=lt.getElements(ua),oo&&Ot.bindBuffer(34963,oo.buffer.buffer),ys=Nr.offset,il=Nr.count,il&&(ka>0?oo?tr.drawElementsInstancedANGLE(0,il,oo.type,ys<<(oo.type-5121>>1),ka):tr.drawArraysInstancedANGLE(0,ys,il,ka):ka<0&&(oo?Ot.drawElements(0,il,oo.type,ys<<(oo.type-5121>>1)):Ot.drawArrays(0,ys,il)),De.viewportWidth=xa,De.viewportHeight=Qi,Oa&&ye.destroyStream(ps),qn&&ye.destroyStream(Aa),Un&&ye.destroyStream(ma),Mo&&ye.destroyStream(Jn),uo&&ye.destroyStream(Qn),aa&&ye.destroyStream(no),Ft&&ye.destroyStream(mi),Hn&&ye.destroyStream(Js),Ys&&ye.destroyStream(cl),el&<.destroyStream(oo))}H.unbind(),Pe.dirty=!0,ht.setVAO(null),st&&(r.cpuTime+=performance.now()-Wt)}}}});var C9=Se((o1r,HOe)=>{HOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt){"use strict";var je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti;return je=t.gl,tt=t.context,Je=t.strings,Mt=t.next,Vt=t.current,Kt=t.draw,ir=t.elements,fr=t.buffer,Ot=t.shader,De=t.attributes,_e=t.vao,Fe=t.uniforms,Pe=t.framebuffer,Ie=t.extensions,lt=t.timer,ye=t.isBufferArgs,ue=Mt.blend_color,de=Vt.blend_color,ht=Mt.blend_equation,Et=Vt.blend_equation,St=Mt.blend_func,Zt=Vt.blend_func,qr=Mt.depth_range,Lr=Vt.depth_range,vr=Mt.colorMask,Er=Vt.colorMask,si=Mt.polygonOffset_offset,Ei=Vt.polygonOffset_offset,Si=Mt.sample_coverage,xi=Vt.sample_coverage,Hi=Mt.stencil_func,Jr=Vt.stencil_func,ci=Mt.stencil_opFront,Di=Vt.stencil_opFront,Lt=Mt.stencil_opBack,vt=Vt.stencil_opBack,Dt=Mt.scissor_box,Bt=Vt.scissor_box,sr=Mt.viewport,br=Vt.viewport,zr={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Tr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Rr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Br={add:32774,subtract:32778,"reverse subtract":32779},oi={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},vi={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Pi={cw:2304,ccw:2305},Yr={},Yr.buffer=n,Yr.divisor=1,Ni={},Ni.buffer=i,Ni.divisor=1,Ur={},Ur.buffer=a,Ur.divisor=1,ti={},ti.buffer=o,ti.divisor=1,{draw:function(ki){var ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro;if(ji=Ie.angle_instanced_arrays,Vi=Pe.next,Vi!==Pe.cur&&(Vi?je.bindFramebuffer(36160,Vi.framebuffer):je.bindFramebuffer(36160,null),Pe.cur=Vi),Vt.dirty){var vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo;vs=Mt.dither,vs!==Vt.dither&&(vs?je.enable(3024):je.disable(3024),Vt.dither=vs),Ks=Mt.depth_func,Ks!==Vt.depth_func&&(je.depthFunc(Ks),Vt.depth_func=Ks),as=qr[0],Jn=qr[1],(as!==Lr[0]||Jn!==Lr[1])&&(je.depthRange(as,Jn),Lr[0]=as,Lr[1]=Jn),Cs=Mt.depth_mask,Cs!==Vt.depth_mask&&(je.depthMask(Cs),Vt.depth_mask=Cs),Xa=vr[0],Zo=vr[1],Eo=vr[2],lo=vr[3],(Xa!==Er[0]||Zo!==Er[1]||Eo!==Er[2]||lo!==Er[3])&&(je.colorMask(Xa,Zo,Eo,lo),Er[0]=Xa,Er[1]=Zo,Er[2]=Eo,Er[3]=lo),$a=Mt.cull_enable,$a!==Vt.cull_enable&&($a?je.enable(2884):je.disable(2884),Vt.cull_enable=$a),Xo=Mt.cull_face,Xo!==Vt.cull_face&&(je.cullFace(Xo),Vt.cull_face=Xo),rs=Mt.frontFace,rs!==Vt.frontFace&&(je.frontFace(rs),Vt.frontFace=rs),$n=Mt.lineWidth,$n!==Vt.lineWidth&&(je.lineWidth($n),Vt.lineWidth=$n),Sn=Mt.polygonOffset_enable,Sn!==Vt.polygonOffset_enable&&(Sn?je.enable(32823):je.disable(32823),Vt.polygonOffset_enable=Sn),uo=si[0],Rs=si[1],(uo!==Ei[0]||Rs!==Ei[1])&&(je.polygonOffset(uo,Rs),Ei[0]=uo,Ei[1]=Rs),xs=Mt.sample_alpha,xs!==Vt.sample_alpha&&(xs?je.enable(32926):je.disable(32926),Vt.sample_alpha=xs),Go=Mt.sample_enable,Go!==Vt.sample_enable&&(Go?je.enable(32928):je.disable(32928),Vt.sample_enable=Go),os=Si[0],So=Si[1],(os!==xi[0]||So!==xi[1])&&(je.sampleCoverage(os,So),xi[0]=os,xi[1]=So),Qn=Mt.stencil_enable,Qn!==Vt.stencil_enable&&(Qn?je.enable(2960):je.disable(2960),Vt.stencil_enable=Qn),zo=Mt.stencil_mask,zo!==Vt.stencil_mask&&(je.stencilMask(zo),Vt.stencil_mask=zo),rl=Hi[0],$o=Hi[1],Na=Hi[2],(rl!==Jr[0]||$o!==Jr[1]||Na!==Jr[2])&&(je.stencilFunc(rl,$o,Na),Jr[0]=rl,Jr[1]=$o,Jr[2]=Na),Ua=ci[0],Po=ci[1],fo=ci[2],ro=ci[3],(Ua!==Di[0]||Po!==Di[1]||fo!==Di[2]||ro!==Di[3])&&(je.stencilOpSeparate(Ua,Po,fo,ro),Di[0]=Ua,Di[1]=Po,Di[2]=fo,Di[3]=ro),Ma=Lt[0],io=Lt[1],aa=Lt[2],Oo=Lt[3],(Ma!==vt[0]||io!==vt[1]||aa!==vt[2]||Oo!==vt[3])&&(je.stencilOpSeparate(Ma,io,aa,Oo),vt[0]=Ma,vt[1]=io,vt[2]=aa,vt[3]=Oo)}zi=ki.viewport,Mi=zi.x|0,sn=zi.y|0,fi="width"in zi?zi.width|0:tt.framebufferWidth-Mi,Or="height"in zi?zi.height|0:tt.framebufferHeight-sn,st=tt.viewportWidth,tt.viewportWidth=fi,Wt=tt.viewportHeight,tt.viewportHeight=Or,je.viewport(Mi,sn,fi,Or),br[0]=Mi,br[1]=sn,br[2]=fi,br[3]=Or,je.blendColor(0,0,0,0),de[0]=0,de[1]=0,de[2]=0,de[3]=0,s?je.enable(3042):je.disable(3042),Vt.blend_enable=s,je.blendEquationSeparate(32774,32774),Et[0]=32774,Et[1]=32774,je.blendFuncSeparate(770,771,773,1),Zt[0]=770,Zt[1]=771,Zt[2]=773,Zt[3]=1,u?je.enable(2929):je.disable(2929),Vt.depth_enable=u,tr=ki.viewport,or=tr.x|0,Nr=tr.y|0,hi="width"in tr?tr.width|0:tt.framebufferWidth-or,Gi="height"in tr?tr.height|0:tt.framebufferHeight-Nr,je.scissor(or,Nr,hi,Gi),Bt[0]=or,Bt[1]=Nr,Bt[2]=hi,Bt[3]=Gi,l?je.enable(3089):je.disable(3089),Vt.scissor_enable=l,Qr=Vt.profile,Qr&&(Ui=performance.now(),r.count++),je.useProgram(f.program),zn=Ie.angle_instanced_arrays,_e.setVAO(null),fn=h.location,xn=De[fn],xn.buffer||je.enableVertexAttribArray(fn),(xn.type!==5126||xn.size!==2||xn.buffer!==c||xn.normalized!==!1||xn.offset!==16||xn.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(fn,2,5126,!1,24,16),xn.type=5126,xn.size=2,xn.buffer=c,xn.normalized=!1,xn.offset=16,xn.stride=24),xn.divisor!==0&&(zn.vertexAttribDivisorANGLE(fn,0),xn.divisor=0),_a=d.call(this,tt,ki,0),Yr.offset=_a,Wn=!1,Fn=1,ia=0,za=0,Hr=0,na=0,go=null,Dn=0,un=!1,Zn=5126,Wo=0,Ba=0,Bo=0,ye(Yr)?(Wn=!0,go=fr.createStream(34962,Yr),Zn=go.dtype):(go=fr.getBuffer(Yr),go?Zn=go.dtype:"constant"in Yr?(Fn=2,typeof Yr.constant=="number"?(ia=Yr.constant,za=Hr=na=0):(ia=Yr.constant.length>0?Yr.constant[0]:0,za=Yr.constant.length>1?Yr.constant[1]:0,Hr=Yr.constant.length>2?Yr.constant[2]:0,na=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?go=fr.createStream(34962,Yr.buffer):go=fr.getBuffer(Yr.buffer),Zn="type"in Yr?vi[Yr.type]:go.dtype,un=!!Yr.normalized,Dn=Yr.size|0,Wo=Yr.offset|0,Ba=Yr.stride|0,Bo=Yr.divisor|0)),Ea=p.location,Ha=De[Ea],Fn===1?(Ha.buffer||je.enableVertexAttribArray(Ea),tn=Dn||4,(Ha.type!==Zn||Ha.size!==tn||Ha.buffer!==go||Ha.normalized!==un||Ha.offset!==Wo||Ha.stride!==Ba)&&(je.bindBuffer(34962,go.buffer),je.vertexAttribPointer(Ea,tn,Zn,un,Ba,Wo),Ha.type=Zn,Ha.size=tn,Ha.buffer=go,Ha.normalized=un,Ha.offset=Wo,Ha.stride=Ba),Ha.divisor!==Bo&&(zn.vertexAttribDivisorANGLE(Ea,Bo),Ha.divisor=Bo)):(Ha.buffer&&(je.disableVertexAttribArray(Ea),Ha.buffer=null),(Ha.x!==ia||Ha.y!==za||Ha.z!==Hr||Ha.w!==na)&&(je.vertexAttrib4f(Ea,ia,za,Hr,na),Ha.x=ia,Ha.y=za,Ha.z=Hr,Ha.w=na)),Cn=x.location,Xn=De[Cn],Xn.buffer||je.enableVertexAttribArray(Cn),(Xn.type!==5126||Xn.size!==2||Xn.buffer!==c||Xn.normalized!==!1||Xn.offset!==0||Xn.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Cn,2,5126,!1,24,0),Xn.type=5126,Xn.size=2,Xn.buffer=c,Xn.normalized=!1,Xn.offset=0,Xn.stride=24),Xn.divisor!==0&&(zn.vertexAttribDivisorANGLE(Cn,0),Xn.divisor=0),ts=b.call(this,tt,ki,0),ti.offset=ts,Ja=!1,to=1,Ri=0,an=0,cs=0,pa=0,ln=null,ka=0,va=!1,bo=5126,Co=0,Fi=0,Yn=0,ye(ti)?(Ja=!0,ln=fr.createStream(34962,ti),bo=ln.dtype):(ln=fr.getBuffer(ti),ln?bo=ln.dtype:"constant"in ti?(to=2,typeof ti.constant=="number"?(Ri=ti.constant,an=cs=pa=0):(Ri=ti.constant.length>0?ti.constant[0]:0,an=ti.constant.length>1?ti.constant[1]:0,cs=ti.constant.length>2?ti.constant[2]:0,pa=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?ln=fr.createStream(34962,ti.buffer):ln=fr.getBuffer(ti.buffer),bo="type"in ti?vi[ti.type]:ln.dtype,va=!!ti.normalized,ka=ti.size|0,Co=ti.offset|0,Fi=ti.stride|0,Yn=ti.divisor|0)),xa=y.location,Qi=De[xa],to===1?(Qi.buffer||je.enableVertexAttribArray(xa),Nn=ka||4,(Qi.type!==bo||Qi.size!==Nn||Qi.buffer!==ln||Qi.normalized!==va||Qi.offset!==Co||Qi.stride!==Fi)&&(je.bindBuffer(34962,ln.buffer),je.vertexAttribPointer(xa,Nn,bo,va,Fi,Co),Qi.type=bo,Qi.size=Nn,Qi.buffer=ln,Qi.normalized=va,Qi.offset=Co,Qi.stride=Fi),Qi.divisor!==Yn&&(zn.vertexAttribDivisorANGLE(xa,Yn),Qi.divisor=Yn)):(Qi.buffer&&(je.disableVertexAttribArray(xa),Qi.buffer=null),(Qi.x!==Ri||Qi.y!==an||Qi.z!==cs||Qi.w!==pa)&&(je.vertexAttrib4f(xa,Ri,an,cs,pa),Qi.x=Ri,Qi.y=an,Qi.z=cs,Qi.w=pa)),Pn=k.location,qa=De[Pn],qa.buffer||je.enableVertexAttribArray(Pn),(qa.type!==5126||qa.size!==2||qa.buffer!==c||qa.normalized!==!1||qa.offset!==8||qa.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Pn,2,5126,!1,24,8),qa.type=5126,qa.size=2,qa.buffer=c,qa.normalized=!1,qa.offset=8,qa.stride=24),qa.divisor!==0&&(zn.vertexAttribDivisorANGLE(Pn,0),qa.divisor=0),jo=E.call(this,tt,ki,0),Ni.offset=jo,Vo=!1,Pa=1,Oa=0,co=0,An=0,_o=0,ks=null,bs=0,ps=!1,sa=5126,Bn=0,ms=0,ya=0,ye(Ni)?(Vo=!0,ks=fr.createStream(34962,Ni),sa=ks.dtype):(ks=fr.getBuffer(Ni),ks?sa=ks.dtype:"constant"in Ni?(Pa=2,typeof Ni.constant=="number"?(Oa=Ni.constant,co=An=_o=0):(Oa=Ni.constant.length>0?Ni.constant[0]:0,co=Ni.constant.length>1?Ni.constant[1]:0,An=Ni.constant.length>2?Ni.constant[2]:0,_o=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?ks=fr.createStream(34962,Ni.buffer):ks=fr.getBuffer(Ni.buffer),sa="type"in Ni?vi[Ni.type]:ks.dtype,ps=!!Ni.normalized,bs=Ni.size|0,Bn=Ni.offset|0,ms=Ni.stride|0,ya=Ni.divisor|0)),on=A.location,mn=De[on],Pa===1?(mn.buffer||je.enableVertexAttribArray(on),Ga=bs||2,(mn.type!==sa||mn.size!==Ga||mn.buffer!==ks||mn.normalized!==ps||mn.offset!==Bn||mn.stride!==ms)&&(je.bindBuffer(34962,ks.buffer),je.vertexAttribPointer(on,Ga,sa,ps,ms,Bn),mn.type=sa,mn.size=Ga,mn.buffer=ks,mn.normalized=ps,mn.offset=Bn,mn.stride=ms),mn.divisor!==ya&&(zn.vertexAttribDivisorANGLE(on,ya),mn.divisor=ya)):(mn.buffer&&(je.disableVertexAttribArray(on),mn.buffer=null),(mn.x!==Oa||mn.y!==co||mn.z!==An||mn.w!==_o)&&(je.vertexAttrib4f(on,Oa,co,An,_o),mn.x=Oa,mn.y=co,mn.z=An,mn.w=_o)),ca=L.call(this,tt,ki,0),Ur.offset=ca,bn=!1,Xi=1,qn=0,Ia=0,yn=0,Ya=0,ba=null,Da=0,Aa=!1,Ln=5126,wo=0,wa=0,$i=0,ye(Ur)?(bn=!0,ba=fr.createStream(34962,Ur),Ln=ba.dtype):(ba=fr.getBuffer(Ur),ba?Ln=ba.dtype:"constant"in Ur?(Xi=2,typeof Ur.constant=="number"?(qn=Ur.constant,Ia=yn=Ya=0):(qn=Ur.constant.length>0?Ur.constant[0]:0,Ia=Ur.constant.length>1?Ur.constant[1]:0,yn=Ur.constant.length>2?Ur.constant[2]:0,Ya=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?ba=fr.createStream(34962,Ur.buffer):ba=fr.getBuffer(Ur.buffer),Ln="type"in Ur?vi[Ur.type]:ba.dtype,Aa=!!Ur.normalized,Da=Ur.size|0,wo=Ur.offset|0,wa=Ur.stride|0,$i=Ur.divisor|0)),ea=_.location,Sa=De[ea],Xi===1?(Sa.buffer||je.enableVertexAttribArray(ea),Za=Da||2,(Sa.type!==Ln||Sa.size!==Za||Sa.buffer!==ba||Sa.normalized!==Aa||Sa.offset!==wo||Sa.stride!==wa)&&(je.bindBuffer(34962,ba.buffer),je.vertexAttribPointer(ea,Za,Ln,Aa,wa,wo),Sa.type=Ln,Sa.size=Za,Sa.buffer=ba,Sa.normalized=Aa,Sa.offset=wo,Sa.stride=wa),Sa.divisor!==$i&&(zn.vertexAttribDivisorANGLE(ea,$i),Sa.divisor=$i)):(Sa.buffer&&(je.disableVertexAttribArray(ea),Sa.buffer=null),(Sa.x!==qn||Sa.y!==Ia||Sa.z!==yn||Sa.w!==Ya)&&(je.vertexAttrib4f(ea,qn,Ia,yn,Ya),Sa.x=qn,Sa.y=Ia,Sa.z=yn,Sa.w=Ya)),xo=ki.capSize,je.uniform1f(C.location,xo),Wa=ki.lineWidth,je.uniform1f(M.location,Wa),hn=ki.opacity,je.uniform1f(v.location,hn),Un=ki.scale,Ss=Un[0],Kn=Un[1],je.uniform2f(z.location,Ss,Kn),ns=ki.scaleFract,Jo=ns[0],vo=ns[1],je.uniform2f(T.location,Jo,vo),ma=ki.translate,ja=ma[0],To=ma[1],je.uniform2f(F.location,ja,To),Ao=ki.translateFract,la=Ao[0],Ki=Ao[1],je.uniform2f(q.location,la,Ki),ho=H.call(this,tt,ki,0),Ka=ho[0],Ca=ho[1],ta=ho[2],En=ho[3],je.uniform4f(U.location,Ka,Ca,ta,En),Mo=Kt.elements,Mo?je.bindBuffer(34963,Mo.buffer.buffer):_e.currentVAO&&(Mo=ir.getElements(_e.currentVAO.elements),Mo&&je.bindBuffer(34963,Mo.buffer.buffer)),Ds=Kt.offset,Ro=ki.count,Ro>0?Mo?zn.drawElementsInstancedANGLE(4,36,Mo.type,Ds<<(Mo.type-5121>>1),Ro):zn.drawArraysInstancedANGLE(4,Ds,36,Ro):Ro<0&&(Mo?je.drawElements(4,36,Mo.type,Ds<<(Mo.type-5121>>1)):je.drawArrays(4,Ds,36)),Vt.dirty=!0,_e.setVAO(null),tt.viewportWidth=st,tt.viewportHeight=Wt,Qr&&(r.cpuTime+=performance.now()-Ui),Wn&&fr.destroyStream(go),Ja&&fr.destroyStream(ln),Vo&&fr.destroyStream(ks),bn&&fr.destroyStream(ba)},scope:function(ki,ji,Vi){var zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l;zi=ki.viewport,Mi=zi.x|0,sn=zi.y|0,fi="width"in zi?zi.width|0:tt.framebufferWidth-Mi,Or="height"in zi?zi.height|0:tt.framebufferHeight-sn,st=tt.viewportWidth,tt.viewportWidth=fi,Wt=tt.viewportHeight,tt.viewportHeight=Or,tr=sr[0],sr[0]=Mi,or=sr[1],sr[1]=sn,Nr=sr[2],sr[2]=fi,hi=sr[3],sr[3]=Or,Gi=ue[0],ue[0]=j,Qr=ue[1],ue[1]=G,Ui=ue[2],ue[2]=O,zn=ue[3],ue[3]=W,fn=Mt.blend_enable,Mt.blend_enable=re,xn=ht[0],ht[0]=ne,_a=ht[1],ht[1]=be,Wn=St[0],St[0]=ze,Fn=St[1],St[1]=Ce,ia=St[2],St[2]=he,za=St[3],St[3]=te,Hr=Mt.depth_enable,Mt.depth_enable=ke,na=ki.viewport,go=na.x|0,Dn=na.y|0,un="width"in na?na.width|0:tt.framebufferWidth-go,Zn="height"in na?na.height|0:tt.framebufferHeight-Dn,Wo=Dt[0],Dt[0]=go,Ba=Dt[1],Dt[1]=Dn,Bo=Dt[2],Dt[2]=un,Ea=Dt[3],Dt[3]=Zn,Ha=Mt.scissor_enable,Mt.scissor_enable=Ee,tn=Vt.profile,tn&&(Cn=performance.now(),r.count++),Xn=Kt.count,Kt.count=Me,ts=ki.count,Ja=Kt.instances,Kt.instances=ts,to=Kt.primitive,Kt.primitive=Oe,Ri=ki.range,an=Fe[Re],Fe[Re]=Ri,cs=ki.lineWidth,pa=Fe[me],Fe[me]=cs,ln=ki.capSize,ka=Fe[Be],Fe[Be]=ln,va=ki.opacity,bo=Fe[fe],Fe[fe]=va,Co=ki.scale,Fi=Fe[Ze],Fe[Ze]=Co,Yn=ki.translate,xa=Fe[et],Fe[et]=Yn,Qi=ki.scaleFract,Nn=Fe[gt],Fe[gt]=Qi,Pn=ki.translateFract,qa=Fe[Pt],Fe[Pt]=Pn,jo=H.call(this,tt,ki,Vi),Vo=Fe[Qe],Fe[Qe]=jo,Pa=Xe.state,Xe.state=1,Oa=Xe.x,Xe.x=0,co=Xe.y,Xe.y=0,An=Xe.z,Xe.z=0,_o=Xe.w,Xe.w=0,ks=Xe.buffer,Xe.buffer=c,bs=Xe.size,Xe.size=0,ps=Xe.normalized,Xe.normalized=!1,sa=Xe.type,Xe.type=5126,Bn=Xe.offset,Xe.offset=0,ms=Xe.stride,Xe.stride=24,ya=Xe.divisor,Xe.divisor=0,on=Tt.state,Tt.state=1,mn=Tt.x,Tt.x=0,Ga=Tt.y,Tt.y=0,ca=Tt.z,Tt.z=0,bn=Tt.w,Tt.w=0,Xi=Tt.buffer,Tt.buffer=c,qn=Tt.size,Tt.size=0,Ia=Tt.normalized,Tt.normalized=!1,yn=Tt.type,Tt.type=5126,Ya=Tt.offset,Tt.offset=8,ba=Tt.stride,Tt.stride=24,Da=Tt.divisor,Tt.divisor=0,Aa=xt.state,xt.state=1,Ln=xt.x,xt.x=0,wo=xt.y,xt.y=0,wa=xt.z,xt.z=0,$i=xt.w,xt.w=0,ea=xt.buffer,xt.buffer=c,Sa=xt.size,xt.size=0,Za=xt.normalized,xt.normalized=!1,xo=xt.type,xt.type=5126,Wa=xt.offset,xt.offset=16,hn=xt.stride,xt.stride=24,Un=xt.divisor,xt.divisor=0,Ss=d.call(this,tt,ki,Vi),Yr.offset=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,ye(Yr)?(Kn=!0,To=fr.createStream(34962,Yr),Ki=To.dtype):(To=fr.getBuffer(Yr),To?Ki=To.dtype:"constant"in Yr?(ns=2,typeof Yr.constant=="number"?(Jo=Yr.constant,vo=ma=ja=0):(Jo=Yr.constant.length>0?Yr.constant[0]:0,vo=Yr.constant.length>1?Yr.constant[1]:0,ma=Yr.constant.length>2?Yr.constant[2]:0,ja=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?To=fr.createStream(34962,Yr.buffer):To=fr.getBuffer(Yr.buffer),Ki="type"in Yr?vi[Yr.type]:To.dtype,la=!!Yr.normalized,Ao=Yr.size|0,ho=Yr.offset|0,Ka=Yr.stride|0,Ca=Yr.divisor|0)),ta=_t.state,_t.state=ns,En=_t.x,_t.x=Jo,Mo=_t.y,_t.y=vo,Ds=_t.z,_t.z=ma,Ro=_t.w,_t.w=ja,vs=_t.buffer,_t.buffer=To,Ks=_t.size,_t.size=Ao,as=_t.normalized,_t.normalized=la,Jn=_t.type,_t.type=Ki,Cs=_t.offset,_t.offset=ho,Xa=_t.stride,_t.stride=Ka,Zo=_t.divisor,_t.divisor=Ca,Eo=E.call(this,tt,ki,Vi),Ni.offset=Eo,lo=!1,$a=1,Xo=0,rs=0,$n=0,Sn=0,uo=null,Rs=0,xs=!1,Go=5126,os=0,So=0,Qn=0,ye(Ni)?(lo=!0,uo=fr.createStream(34962,Ni),Go=uo.dtype):(uo=fr.getBuffer(Ni),uo?Go=uo.dtype:"constant"in Ni?($a=2,typeof Ni.constant=="number"?(Xo=Ni.constant,rs=$n=Sn=0):(Xo=Ni.constant.length>0?Ni.constant[0]:0,rs=Ni.constant.length>1?Ni.constant[1]:0,$n=Ni.constant.length>2?Ni.constant[2]:0,Sn=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?uo=fr.createStream(34962,Ni.buffer):uo=fr.getBuffer(Ni.buffer),Go="type"in Ni?vi[Ni.type]:uo.dtype,xs=!!Ni.normalized,Rs=Ni.size|0,os=Ni.offset|0,So=Ni.stride|0,Qn=Ni.divisor|0)),zo=Ct.state,Ct.state=$a,rl=Ct.x,Ct.x=Xo,$o=Ct.y,Ct.y=rs,Na=Ct.z,Ct.z=$n,Ua=Ct.w,Ct.w=Sn,Po=Ct.buffer,Ct.buffer=uo,fo=Ct.size,Ct.size=Rs,ro=Ct.normalized,Ct.normalized=xs,Ma=Ct.type,Ct.type=Go,io=Ct.offset,Ct.offset=os,aa=Ct.stride,Ct.stride=So,Oo=Ct.divisor,Ct.divisor=Qn,No=L.call(this,tt,ki,Vi),Ur.offset=No,Zs=!1,Fs=1,ws=0,no=0,Ls=0,ds=0,Xs=null,oa=0,Yo=!1,po=5126,ss=0,ls=0,gs=0,ye(Ur)?(Zs=!0,Xs=fr.createStream(34962,Ur),po=Xs.dtype):(Xs=fr.getBuffer(Ur),Xs?po=Xs.dtype:"constant"in Ur?(Fs=2,typeof Ur.constant=="number"?(ws=Ur.constant,no=Ls=ds=0):(ws=Ur.constant.length>0?Ur.constant[0]:0,no=Ur.constant.length>1?Ur.constant[1]:0,Ls=Ur.constant.length>2?Ur.constant[2]:0,ds=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?Xs=fr.createStream(34962,Ur.buffer):Xs=fr.getBuffer(Ur.buffer),po="type"in Ur?vi[Ur.type]:Xs.dtype,Yo=!!Ur.normalized,oa=Ur.size|0,ss=Ur.offset|0,ls=Ur.stride|0,gs=Ur.divisor|0)),bt=jt.state,jt.state=Fs,Ft=jt.x,jt.x=ws,hr=jt.y,jt.y=no,nr=jt.z,jt.z=Ls,Sr=jt.w,jt.w=ds,li=jt.buffer,jt.buffer=Xs,di=jt.size,jt.size=oa,mi=jt.normalized,jt.normalized=Yo,Oi=jt.type,jt.type=po,dn=jt.offset,jt.offset=ss,wi=jt.stride,jt.stride=ls,ui=jt.divisor,jt.divisor=gs,Ai=b.call(this,tt,ki,Vi),ti.offset=Ai,gi=!1,gn=1,In=0,Vn=0,Rn=0,Hn=0,Gn=null,pn=0,Lo=!1,us=5126,Bs=0,Js=0,ol=0,ye(ti)?(gi=!0,Gn=fr.createStream(34962,ti),us=Gn.dtype):(Gn=fr.getBuffer(ti),Gn?us=Gn.dtype:"constant"in ti?(gn=2,typeof ti.constant=="number"?(In=ti.constant,Vn=Rn=Hn=0):(In=ti.constant.length>0?ti.constant[0]:0,Vn=ti.constant.length>1?ti.constant[1]:0,Rn=ti.constant.length>2?ti.constant[2]:0,Hn=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?Gn=fr.createStream(34962,ti.buffer):Gn=fr.getBuffer(ti.buffer),us="type"in ti?vi[ti.type]:Gn.dtype,Lo=!!ti.normalized,pn=ti.size|0,Bs=ti.offset|0,Js=ti.stride|0,ol=ti.divisor|0)),Cl=At.state,At.state=gn,ul=At.x,At.x=In,Gl=At.y,At.y=Vn,Vl=At.z,At.z=Rn,Fl=At.w,At.w=Hn,ga=At.buffer,At.buffer=Gn,ko=At.size,At.size=pn,zs=At.normalized,At.normalized=Lo,Fo=At.type,At.type=us,Ys=At.offset,At.offset=Bs,Gs=At.stride,At.stride=Js,Us=At.divisor,At.divisor=ol,Sl=Ot.vert,Ot.vert=Te,_l=Ot.frag,Ot.frag=nt,Vt.dirty=!0,ji(tt,ki,Vi),tt.viewportWidth=st,tt.viewportHeight=Wt,sr[0]=tr,sr[1]=or,sr[2]=Nr,sr[3]=hi,ue[0]=Gi,ue[1]=Qr,ue[2]=Ui,ue[3]=zn,Mt.blend_enable=fn,ht[0]=xn,ht[1]=_a,St[0]=Wn,St[1]=Fn,St[2]=ia,St[3]=za,Mt.depth_enable=Hr,Dt[0]=Wo,Dt[1]=Ba,Dt[2]=Bo,Dt[3]=Ea,Mt.scissor_enable=Ha,tn&&(r.cpuTime+=performance.now()-Cn),Kt.count=Xn,Kt.instances=Ja,Kt.primitive=to,Fe[Re]=an,Fe[me]=pa,Fe[Be]=ka,Fe[fe]=bo,Fe[Ze]=Fi,Fe[et]=xa,Fe[gt]=Nn,Fe[Pt]=qa,Fe[Qe]=Vo,Xe.state=Pa,Xe.x=Oa,Xe.y=co,Xe.z=An,Xe.w=_o,Xe.buffer=ks,Xe.size=bs,Xe.normalized=ps,Xe.type=sa,Xe.offset=Bn,Xe.stride=ms,Xe.divisor=ya,Tt.state=on,Tt.x=mn,Tt.y=Ga,Tt.z=ca,Tt.w=bn,Tt.buffer=Xi,Tt.size=qn,Tt.normalized=Ia,Tt.type=yn,Tt.offset=Ya,Tt.stride=ba,Tt.divisor=Da,xt.state=Aa,xt.x=Ln,xt.y=wo,xt.z=wa,xt.w=$i,xt.buffer=ea,xt.size=Sa,xt.normalized=Za,xt.type=xo,xt.offset=Wa,xt.stride=hn,xt.divisor=Un,Kn&&fr.destroyStream(To),_t.state=ta,_t.x=En,_t.y=Mo,_t.z=Ds,_t.w=Ro,_t.buffer=vs,_t.size=Ks,_t.normalized=as,_t.type=Jn,_t.offset=Cs,_t.stride=Xa,_t.divisor=Zo,lo&&fr.destroyStream(uo),Ct.state=zo,Ct.x=rl,Ct.y=$o,Ct.z=Na,Ct.w=Ua,Ct.buffer=Po,Ct.size=fo,Ct.normalized=ro,Ct.type=Ma,Ct.offset=io,Ct.stride=aa,Ct.divisor=Oo,Zs&&fr.destroyStream(Xs),jt.state=bt,jt.x=Ft,jt.y=hr,jt.z=nr,jt.w=Sr,jt.buffer=li,jt.size=di,jt.normalized=mi,jt.type=Oi,jt.offset=dn,jt.stride=wi,jt.divisor=ui,gi&&fr.destroyStream(Gn),At.state=Cl,At.x=ul,At.y=Gl,At.z=Vl,At.w=Fl,At.buffer=ga,At.size=ko,At.normalized=zs,At.type=Fo,At.offset=Ys,At.stride=Gs,At.divisor=Us,Ot.vert=Sl,Ot.frag=_l,Vt.dirty=!0},batch:function(ki,ji){var Vi,zi,Mi,sn,fi,Or,st;if(Vi=Ie.angle_instanced_arrays,zi=Pe.next,zi!==Pe.cur&&(zi?je.bindFramebuffer(36160,zi.framebuffer):je.bindFramebuffer(36160,null),Pe.cur=zi),Vt.dirty){var Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to;Wt=Mt.dither,Wt!==Vt.dither&&(Wt?je.enable(3024):je.disable(3024),Vt.dither=Wt),tr=Mt.depth_func,tr!==Vt.depth_func&&(je.depthFunc(tr),Vt.depth_func=tr),or=qr[0],Nr=qr[1],(or!==Lr[0]||Nr!==Lr[1])&&(je.depthRange(or,Nr),Lr[0]=or,Lr[1]=Nr),hi=Mt.depth_mask,hi!==Vt.depth_mask&&(je.depthMask(hi),Vt.depth_mask=hi),Gi=vr[0],Qr=vr[1],Ui=vr[2],zn=vr[3],(Gi!==Er[0]||Qr!==Er[1]||Ui!==Er[2]||zn!==Er[3])&&(je.colorMask(Gi,Qr,Ui,zn),Er[0]=Gi,Er[1]=Qr,Er[2]=Ui,Er[3]=zn),fn=Mt.cull_enable,fn!==Vt.cull_enable&&(fn?je.enable(2884):je.disable(2884),Vt.cull_enable=fn),xn=Mt.cull_face,xn!==Vt.cull_face&&(je.cullFace(xn),Vt.cull_face=xn),_a=Mt.frontFace,_a!==Vt.frontFace&&(je.frontFace(_a),Vt.frontFace=_a),Wn=Mt.lineWidth,Wn!==Vt.lineWidth&&(je.lineWidth(Wn),Vt.lineWidth=Wn),Fn=Mt.polygonOffset_enable,Fn!==Vt.polygonOffset_enable&&(Fn?je.enable(32823):je.disable(32823),Vt.polygonOffset_enable=Fn),ia=si[0],za=si[1],(ia!==Ei[0]||za!==Ei[1])&&(je.polygonOffset(ia,za),Ei[0]=ia,Ei[1]=za),Hr=Mt.sample_alpha,Hr!==Vt.sample_alpha&&(Hr?je.enable(32926):je.disable(32926),Vt.sample_alpha=Hr),na=Mt.sample_enable,na!==Vt.sample_enable&&(na?je.enable(32928):je.disable(32928),Vt.sample_enable=na),go=Si[0],Dn=Si[1],(go!==xi[0]||Dn!==xi[1])&&(je.sampleCoverage(go,Dn),xi[0]=go,xi[1]=Dn),un=Mt.stencil_enable,un!==Vt.stencil_enable&&(un?je.enable(2960):je.disable(2960),Vt.stencil_enable=un),Zn=Mt.stencil_mask,Zn!==Vt.stencil_mask&&(je.stencilMask(Zn),Vt.stencil_mask=Zn),Wo=Hi[0],Ba=Hi[1],Bo=Hi[2],(Wo!==Jr[0]||Ba!==Jr[1]||Bo!==Jr[2])&&(je.stencilFunc(Wo,Ba,Bo),Jr[0]=Wo,Jr[1]=Ba,Jr[2]=Bo),Ea=ci[0],Ha=ci[1],tn=ci[2],Cn=ci[3],(Ea!==Di[0]||Ha!==Di[1]||tn!==Di[2]||Cn!==Di[3])&&(je.stencilOpSeparate(Ea,Ha,tn,Cn),Di[0]=Ea,Di[1]=Ha,Di[2]=tn,Di[3]=Cn),Xn=Lt[0],ts=Lt[1],Ja=Lt[2],to=Lt[3],(Xn!==vt[0]||ts!==vt[1]||Ja!==vt[2]||to!==vt[3])&&(je.stencilOpSeparate(Xn,ts,Ja,to),vt[0]=Xn,vt[1]=ts,vt[2]=Ja,vt[3]=to)}je.blendColor(0,0,0,0),de[0]=0,de[1]=0,de[2]=0,de[3]=0,ut?je.enable(3042):je.disable(3042),Vt.blend_enable=ut,je.blendEquationSeparate(32774,32774),Et[0]=32774,Et[1]=32774,je.blendFuncSeparate(770,771,773,1),Zt[0]=770,Zt[1]=771,Zt[2]=773,Zt[3]=1,ct?je.enable(2929):je.disable(2929),Vt.depth_enable=ct,rt?je.enable(3089):je.disable(3089),Vt.scissor_enable=rt,Mi=Vt.profile,Mi&&(sn=performance.now(),r.count+=ji),je.useProgram(f.program),fi=Ie.angle_instanced_arrays;var Ri,an,cs,pa,ln,ka,va,bo;for(_e.setVAO(null),Ri=h.location,an=De[Ri],an.buffer||je.enableVertexAttribArray(Ri),(an.type!==5126||an.size!==2||an.buffer!==c||an.normalized!==!1||an.offset!==16||an.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(Ri,2,5126,!1,24,16),an.type=5126,an.size=2,an.buffer=c,an.normalized=!1,an.offset=16,an.stride=24),an.divisor!==0&&(fi.vertexAttribDivisorANGLE(Ri,0),an.divisor=0),cs=x.location,pa=De[cs],pa.buffer||je.enableVertexAttribArray(cs),(pa.type!==5126||pa.size!==2||pa.buffer!==c||pa.normalized!==!1||pa.offset!==0||pa.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(cs,2,5126,!1,24,0),pa.type=5126,pa.size=2,pa.buffer=c,pa.normalized=!1,pa.offset=0,pa.stride=24),pa.divisor!==0&&(fi.vertexAttribDivisorANGLE(cs,0),pa.divisor=0),ln=k.location,ka=De[ln],ka.buffer||je.enableVertexAttribArray(ln),(ka.type!==5126||ka.size!==2||ka.buffer!==c||ka.normalized!==!1||ka.offset!==8||ka.stride!==24)&&(je.bindBuffer(34962,c.buffer),je.vertexAttribPointer(ln,2,5126,!1,24,8),ka.type=5126,ka.size=2,ka.buffer=c,ka.normalized=!1,ka.offset=8,ka.stride=24),ka.divisor!==0&&(fi.vertexAttribDivisorANGLE(ln,0),ka.divisor=0),va=Kt.elements,va?je.bindBuffer(34963,va.buffer.buffer):_e.currentVAO&&(va=ir.getElements(_e.currentVAO.elements),va&&je.bindBuffer(34963,va.buffer.buffer)),bo=Kt.offset,Or=0;Or0?Yr.constant[0]:0,bs=Yr.constant.length>1?Yr.constant[1]:0,ps=Yr.constant.length>2?Yr.constant[2]:0,sa=Yr.constant.length>3?Yr.constant[3]:0)):(ye(Yr.buffer)?Bn=fr.createStream(34962,Yr.buffer):Bn=fr.getBuffer(Yr.buffer),on="type"in Yr?vi[Yr.type]:Bn.dtype,ya=!!Yr.normalized,ms=Yr.size|0,mn=Yr.offset|0,Ga=Yr.stride|0,ca=Yr.divisor|0)),bn=p.location,Xi=De[bn],_o===1?(Xi.buffer||je.enableVertexAttribArray(bn),qn=ms||4,(Xi.type!==on||Xi.size!==qn||Xi.buffer!==Bn||Xi.normalized!==ya||Xi.offset!==mn||Xi.stride!==Ga)&&(je.bindBuffer(34962,Bn.buffer),je.vertexAttribPointer(bn,qn,on,ya,Ga,mn),Xi.type=on,Xi.size=qn,Xi.buffer=Bn,Xi.normalized=ya,Xi.offset=mn,Xi.stride=Ga),Xi.divisor!==ca&&(fi.vertexAttribDivisorANGLE(bn,ca),Xi.divisor=ca)):(Xi.buffer&&(je.disableVertexAttribArray(bn),Xi.buffer=null),(Xi.x!==ks||Xi.y!==bs||Xi.z!==ps||Xi.w!==sa)&&(je.vertexAttrib4f(bn,ks,bs,ps,sa),Xi.x=ks,Xi.y=bs,Xi.z=ps,Xi.w=sa)),Ia=b.call(this,tt,st,Or),ti.offset=Ia,yn=!1,Ya=1,ba=0,Da=0,Aa=0,Ln=0,wo=null,wa=0,$i=!1,ea=5126,Sa=0,Za=0,xo=0,ye(ti)?(yn=!0,wo=fr.createStream(34962,ti),ea=wo.dtype):(wo=fr.getBuffer(ti),wo?ea=wo.dtype:"constant"in ti?(Ya=2,typeof ti.constant=="number"?(ba=ti.constant,Da=Aa=Ln=0):(ba=ti.constant.length>0?ti.constant[0]:0,Da=ti.constant.length>1?ti.constant[1]:0,Aa=ti.constant.length>2?ti.constant[2]:0,Ln=ti.constant.length>3?ti.constant[3]:0)):(ye(ti.buffer)?wo=fr.createStream(34962,ti.buffer):wo=fr.getBuffer(ti.buffer),ea="type"in ti?vi[ti.type]:wo.dtype,$i=!!ti.normalized,wa=ti.size|0,Sa=ti.offset|0,Za=ti.stride|0,xo=ti.divisor|0)),Wa=y.location,hn=De[Wa],Ya===1?(hn.buffer||je.enableVertexAttribArray(Wa),Un=wa||4,(hn.type!==ea||hn.size!==Un||hn.buffer!==wo||hn.normalized!==$i||hn.offset!==Sa||hn.stride!==Za)&&(je.bindBuffer(34962,wo.buffer),je.vertexAttribPointer(Wa,Un,ea,$i,Za,Sa),hn.type=ea,hn.size=Un,hn.buffer=wo,hn.normalized=$i,hn.offset=Sa,hn.stride=Za),hn.divisor!==xo&&(fi.vertexAttribDivisorANGLE(Wa,xo),hn.divisor=xo)):(hn.buffer&&(je.disableVertexAttribArray(Wa),hn.buffer=null),(hn.x!==ba||hn.y!==Da||hn.z!==Aa||hn.w!==Ln)&&(je.vertexAttrib4f(Wa,ba,Da,Aa,Ln),hn.x=ba,hn.y=Da,hn.z=Aa,hn.w=Ln)),Ss=E.call(this,tt,st,Or),Ni.offset=Ss,Kn=!1,ns=1,Jo=0,vo=0,ma=0,ja=0,To=null,Ao=0,la=!1,Ki=5126,ho=0,Ka=0,Ca=0,ye(Ni)?(Kn=!0,To=fr.createStream(34962,Ni),Ki=To.dtype):(To=fr.getBuffer(Ni),To?Ki=To.dtype:"constant"in Ni?(ns=2,typeof Ni.constant=="number"?(Jo=Ni.constant,vo=ma=ja=0):(Jo=Ni.constant.length>0?Ni.constant[0]:0,vo=Ni.constant.length>1?Ni.constant[1]:0,ma=Ni.constant.length>2?Ni.constant[2]:0,ja=Ni.constant.length>3?Ni.constant[3]:0)):(ye(Ni.buffer)?To=fr.createStream(34962,Ni.buffer):To=fr.getBuffer(Ni.buffer),Ki="type"in Ni?vi[Ni.type]:To.dtype,la=!!Ni.normalized,Ao=Ni.size|0,ho=Ni.offset|0,Ka=Ni.stride|0,Ca=Ni.divisor|0)),ta=A.location,En=De[ta],ns===1?(En.buffer||je.enableVertexAttribArray(ta),Mo=Ao||2,(En.type!==Ki||En.size!==Mo||En.buffer!==To||En.normalized!==la||En.offset!==ho||En.stride!==Ka)&&(je.bindBuffer(34962,To.buffer),je.vertexAttribPointer(ta,Mo,Ki,la,Ka,ho),En.type=Ki,En.size=Mo,En.buffer=To,En.normalized=la,En.offset=ho,En.stride=Ka),En.divisor!==Ca&&(fi.vertexAttribDivisorANGLE(ta,Ca),En.divisor=Ca)):(En.buffer&&(je.disableVertexAttribArray(ta),En.buffer=null),(En.x!==Jo||En.y!==vo||En.z!==ma||En.w!==ja)&&(je.vertexAttrib4f(ta,Jo,vo,ma,ja),En.x=Jo,En.y=vo,En.z=ma,En.w=ja)),Ds=L.call(this,tt,st,Or),Ur.offset=Ds,Ro=!1,vs=1,Ks=0,as=0,Jn=0,Cs=0,Xa=null,Zo=0,Eo=!1,lo=5126,$a=0,Xo=0,rs=0,ye(Ur)?(Ro=!0,Xa=fr.createStream(34962,Ur),lo=Xa.dtype):(Xa=fr.getBuffer(Ur),Xa?lo=Xa.dtype:"constant"in Ur?(vs=2,typeof Ur.constant=="number"?(Ks=Ur.constant,as=Jn=Cs=0):(Ks=Ur.constant.length>0?Ur.constant[0]:0,as=Ur.constant.length>1?Ur.constant[1]:0,Jn=Ur.constant.length>2?Ur.constant[2]:0,Cs=Ur.constant.length>3?Ur.constant[3]:0)):(ye(Ur.buffer)?Xa=fr.createStream(34962,Ur.buffer):Xa=fr.getBuffer(Ur.buffer),lo="type"in Ur?vi[Ur.type]:Xa.dtype,Eo=!!Ur.normalized,Zo=Ur.size|0,$a=Ur.offset|0,Xo=Ur.stride|0,rs=Ur.divisor|0)),$n=_.location,Sn=De[$n],vs===1?(Sn.buffer||je.enableVertexAttribArray($n),uo=Zo||2,(Sn.type!==lo||Sn.size!==uo||Sn.buffer!==Xa||Sn.normalized!==Eo||Sn.offset!==$a||Sn.stride!==Xo)&&(je.bindBuffer(34962,Xa.buffer),je.vertexAttribPointer($n,uo,lo,Eo,Xo,$a),Sn.type=lo,Sn.size=uo,Sn.buffer=Xa,Sn.normalized=Eo,Sn.offset=$a,Sn.stride=Xo),Sn.divisor!==rs&&(fi.vertexAttribDivisorANGLE($n,rs),Sn.divisor=rs)):(Sn.buffer&&(je.disableVertexAttribArray($n),Sn.buffer=null),(Sn.x!==Ks||Sn.y!==as||Sn.z!==Jn||Sn.w!==Cs)&&(je.vertexAttrib4f($n,Ks,as,Jn,Cs),Sn.x=Ks,Sn.y=as,Sn.z=Jn,Sn.w=Cs)),Rs=st.capSize,(!Or||xs!==Rs)&&(xs=Rs,je.uniform1f(C.location,Rs)),Go=st.lineWidth,(!Or||os!==Go)&&(os=Go,je.uniform1f(M.location,Go)),So=st.opacity,(!Or||Qn!==So)&&(Qn=So,je.uniform1f(v.location,So)),zo=st.scale,rl=zo[0],Na=zo[1],(!Or||$o!==rl||Ua!==Na)&&($o=rl,Ua=Na,je.uniform2f(z.location,rl,Na)),Po=st.scaleFract,fo=Po[0],Ma=Po[1],(!Or||ro!==fo||io!==Ma)&&(ro=fo,io=Ma,je.uniform2f(T.location,fo,Ma)),aa=st.translate,Oo=aa[0],Zs=aa[1],(!Or||No!==Oo||Fs!==Zs)&&(No=Oo,Fs=Zs,je.uniform2f(F.location,Oo,Zs)),ws=st.translateFract,no=ws[0],ds=ws[1],(!Or||Ls!==no||Xs!==ds)&&(Ls=no,Xs=ds,je.uniform2f(q.location,no,ds)),oa=H.call(this,tt,st,Or),Yo=oa[0],ss=oa[1],gs=oa[2],Ft=oa[3],(!Or||po!==Yo||ls!==ss||bt!==gs||hr!==Ft)&&(po=Yo,ls=ss,bt=gs,hr=Ft,je.uniform4f(U.location,Yo,ss,gs,Ft)),nr=st.count,nr>0?va?fi.drawElementsInstancedANGLE(4,36,va.type,bo<<(va.type-5121>>1),nr):fi.drawArraysInstancedANGLE(4,bo,36,nr):nr<0&&(va?je.drawElements(4,36,va.type,bo<<(va.type-5121>>1)):je.drawArrays(4,bo,36)),tt.viewportWidth=Nn,tt.viewportHeight=Pn,An&&fr.destroyStream(Bn),yn&&fr.destroyStream(wo),Kn&&fr.destroyStream(To),Ro&&fr.destroyStream(Xa)}Vt.dirty=!0,_e.setVAO(null),Mi&&(r.cpuTime+=performance.now()-sn)}}}});var L9=Se((s1r,GOe)=>{GOe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At){"use strict";var Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br;return Te=t.gl,nt=t.context,ut=t.strings,ct=t.next,rt=t.current,je=t.draw,tt=t.elements,Je=t.buffer,Mt=t.shader,Vt=t.attributes,Kt=t.vao,ir=t.uniforms,fr=t.framebuffer,Ot=t.extensions,De=t.timer,_e=t.isBufferArgs,Fe=ct.blend_color,Pe=rt.blend_color,Ie=ct.blend_equation,lt=rt.blend_equation,ye=ct.blend_func,ue=rt.blend_func,de=ct.depth_range,ht=rt.depth_range,Et=ct.colorMask,St=rt.colorMask,Zt=ct.polygonOffset_offset,qr=rt.polygonOffset_offset,Lr=ct.sample_coverage,vr=rt.sample_coverage,Er=ct.stencil_func,si=rt.stencil_func,Ei=ct.stencil_opFront,Si=rt.stencil_opFront,xi=ct.stencil_opBack,Hi=rt.stencil_opBack,Jr=ct.scissor_box,ci=rt.scissor_box,Di=ct.viewport,Lt=rt.viewport,vt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Dt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Bt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},sr={add:32774,subtract:32778,"reverse subtract":32779},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zr={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Tr={cw:2304,ccw:2305},Rr={},Rr.offset=4,Rr.stride=8,Br={},Br.offset=0,Br.stride=8,{draw:function(oi){var vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca;if(vi=Ot.angle_instanced_arrays,Pi=fr.next,Pi!==fr.cur&&(Pi?Te.bindFramebuffer(36160,Pi.framebuffer):Te.bindFramebuffer(36160,null),fr.cur=Pi),rt.dirty){var ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No;ta=ct.dither,ta!==rt.dither&&(ta?Te.enable(3024):Te.disable(3024),rt.dither=ta),En=Ie[0],Mo=Ie[1],(En!==lt[0]||Mo!==lt[1])&&(Te.blendEquationSeparate(En,Mo),lt[0]=En,lt[1]=Mo),Ds=ct.depth_func,Ds!==rt.depth_func&&(Te.depthFunc(Ds),rt.depth_func=Ds),Ro=de[0],vs=de[1],(Ro!==ht[0]||vs!==ht[1])&&(Te.depthRange(Ro,vs),ht[0]=Ro,ht[1]=vs),Ks=ct.depth_mask,Ks!==rt.depth_mask&&(Te.depthMask(Ks),rt.depth_mask=Ks),as=Et[0],Jn=Et[1],Cs=Et[2],Xa=Et[3],(as!==St[0]||Jn!==St[1]||Cs!==St[2]||Xa!==St[3])&&(Te.colorMask(as,Jn,Cs,Xa),St[0]=as,St[1]=Jn,St[2]=Cs,St[3]=Xa),Zo=ct.cull_enable,Zo!==rt.cull_enable&&(Zo?Te.enable(2884):Te.disable(2884),rt.cull_enable=Zo),Eo=ct.cull_face,Eo!==rt.cull_face&&(Te.cullFace(Eo),rt.cull_face=Eo),lo=ct.frontFace,lo!==rt.frontFace&&(Te.frontFace(lo),rt.frontFace=lo),$a=ct.lineWidth,$a!==rt.lineWidth&&(Te.lineWidth($a),rt.lineWidth=$a),Xo=ct.polygonOffset_enable,Xo!==rt.polygonOffset_enable&&(Xo?Te.enable(32823):Te.disable(32823),rt.polygonOffset_enable=Xo),rs=Zt[0],$n=Zt[1],(rs!==qr[0]||$n!==qr[1])&&(Te.polygonOffset(rs,$n),qr[0]=rs,qr[1]=$n),Sn=ct.sample_alpha,Sn!==rt.sample_alpha&&(Sn?Te.enable(32926):Te.disable(32926),rt.sample_alpha=Sn),uo=ct.sample_enable,uo!==rt.sample_enable&&(uo?Te.enable(32928):Te.disable(32928),rt.sample_enable=uo),Rs=Lr[0],xs=Lr[1],(Rs!==vr[0]||xs!==vr[1])&&(Te.sampleCoverage(Rs,xs),vr[0]=Rs,vr[1]=xs),Go=ct.stencil_mask,Go!==rt.stencil_mask&&(Te.stencilMask(Go),rt.stencil_mask=Go),os=Er[0],So=Er[1],Qn=Er[2],(os!==si[0]||So!==si[1]||Qn!==si[2])&&(Te.stencilFunc(os,So,Qn),si[0]=os,si[1]=So,si[2]=Qn),zo=Ei[0],rl=Ei[1],$o=Ei[2],Na=Ei[3],(zo!==Si[0]||rl!==Si[1]||$o!==Si[2]||Na!==Si[3])&&(Te.stencilOpSeparate(zo,rl,$o,Na),Si[0]=zo,Si[1]=rl,Si[2]=$o,Si[3]=Na),Ua=xi[0],Po=xi[1],fo=xi[2],ro=xi[3],(Ua!==Hi[0]||Po!==Hi[1]||fo!==Hi[2]||ro!==Hi[3])&&(Te.stencilOpSeparate(Ua,Po,fo,ro),Hi[0]=Ua,Hi[1]=Po,Hi[2]=fo,Hi[3]=ro),Ma=ct.scissor_enable,Ma!==rt.scissor_enable&&(Ma?Te.enable(3089):Te.disable(3089),rt.scissor_enable=Ma),io=Jr[0],aa=Jr[1],Oo=Jr[2],No=Jr[3],(io!==ci[0]||aa!==ci[1]||Oo!==ci[2]||No!==ci[3])&&(Te.scissor(io,aa,Oo,No),ci[0]=io,ci[1]=aa,ci[2]=Oo,ci[3]=No)}Yr=this.viewport,Ni=Yr.x|0,Ur=Yr.y|0,ti="width"in Yr?Yr.width|0:nt.framebufferWidth-Ni,ki="height"in Yr?Yr.height|0:nt.framebufferHeight-Ur,ji=nt.viewportWidth,nt.viewportWidth=ti,Vi=nt.viewportHeight,nt.viewportHeight=ki,Te.viewport(Ni,Ur,ti,ki),Lt[0]=Ni,Lt[1]=Ur,Lt[2]=ti,Lt[3]=ki,Te.blendColor(0,0,0,1),Pe[0]=0,Pe[1]=0,Pe[2]=0,Pe[3]=1,n?Te.enable(3042):Te.disable(3042),rt.blend_enable=n,Te.blendFuncSeparate(770,771,773,1),ue[0]=770,ue[1]=771,ue[2]=773,ue[3]=1,i?Te.enable(2929):Te.disable(2929),rt.depth_enable=i,a?Te.enable(2960):Te.disable(2960),rt.stencil_enable=a,zi=rt.profile,zi&&(Mi=performance.now(),r.count++),Te.useProgram(o.program),sn=Ot.angle_instanced_arrays,Kt.setVAO(null),fi=this.charBuffer,Or=!1,st=1,Wt=0,tr=0,or=0,Nr=0,hi=null,Gi=0,Qr=!1,Ui=5126,zn=0,fn=0,xn=0,_e(fi)?(Or=!0,hi=Je.createStream(34962,fi),Ui=hi.dtype):(hi=Je.getBuffer(fi),hi?Ui=hi.dtype:"constant"in fi?(st=2,typeof fi.constant=="number"?(Wt=fi.constant,tr=or=Nr=0):(Wt=fi.constant.length>0?fi.constant[0]:0,tr=fi.constant.length>1?fi.constant[1]:0,or=fi.constant.length>2?fi.constant[2]:0,Nr=fi.constant.length>3?fi.constant[3]:0)):(_e(fi.buffer)?hi=Je.createStream(34962,fi.buffer):hi=Je.getBuffer(fi.buffer),Ui="type"in fi?zr[fi.type]:hi.dtype,Qr=!!fi.normalized,Gi=fi.size|0,zn=fi.offset|0,fn=fi.stride|0,xn=fi.divisor|0)),_a=s.location,Wn=Vt[_a],st===1?(Wn.buffer||Te.enableVertexAttribArray(_a),Fn=Gi||1,(Wn.type!==Ui||Wn.size!==Fn||Wn.buffer!==hi||Wn.normalized!==Qr||Wn.offset!==zn||Wn.stride!==fn)&&(Te.bindBuffer(34962,hi.buffer),Te.vertexAttribPointer(_a,Fn,Ui,Qr,fn,zn),Wn.type=Ui,Wn.size=Fn,Wn.buffer=hi,Wn.normalized=Qr,Wn.offset=zn,Wn.stride=fn),Wn.divisor!==xn&&(sn.vertexAttribDivisorANGLE(_a,xn),Wn.divisor=xn)):(Wn.buffer&&(Te.disableVertexAttribArray(_a),Wn.buffer=null),(Wn.x!==Wt||Wn.y!==tr||Wn.z!==or||Wn.w!==Nr)&&(Te.vertexAttrib4f(_a,Wt,tr,or,Nr),Wn.x=Wt,Wn.y=tr,Wn.z=or,Wn.w=Nr)),ia=this.sizeBuffer,Rr.buffer=ia,za=!1,Hr=1,na=0,go=0,Dn=0,un=0,Zn=null,Wo=0,Ba=!1,Bo=5126,Ea=0,Ha=0,tn=0,_e(Rr)?(za=!0,Zn=Je.createStream(34962,Rr),Bo=Zn.dtype):(Zn=Je.getBuffer(Rr),Zn?Bo=Zn.dtype:"constant"in Rr?(Hr=2,typeof Rr.constant=="number"?(na=Rr.constant,go=Dn=un=0):(na=Rr.constant.length>0?Rr.constant[0]:0,go=Rr.constant.length>1?Rr.constant[1]:0,Dn=Rr.constant.length>2?Rr.constant[2]:0,un=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?Zn=Je.createStream(34962,Rr.buffer):Zn=Je.getBuffer(Rr.buffer),Bo="type"in Rr?zr[Rr.type]:Zn.dtype,Ba=!!Rr.normalized,Wo=Rr.size|0,Ea=Rr.offset|0,Ha=Rr.stride|0,tn=Rr.divisor|0)),Cn=u.location,Xn=Vt[Cn],Hr===1?(Xn.buffer||Te.enableVertexAttribArray(Cn),ts=Wo||1,(Xn.type!==Bo||Xn.size!==ts||Xn.buffer!==Zn||Xn.normalized!==Ba||Xn.offset!==Ea||Xn.stride!==Ha)&&(Te.bindBuffer(34962,Zn.buffer),Te.vertexAttribPointer(Cn,ts,Bo,Ba,Ha,Ea),Xn.type=Bo,Xn.size=ts,Xn.buffer=Zn,Xn.normalized=Ba,Xn.offset=Ea,Xn.stride=Ha),Xn.divisor!==tn&&(sn.vertexAttribDivisorANGLE(Cn,tn),Xn.divisor=tn)):(Xn.buffer&&(Te.disableVertexAttribArray(Cn),Xn.buffer=null),(Xn.x!==na||Xn.y!==go||Xn.z!==Dn||Xn.w!==un)&&(Te.vertexAttrib4f(Cn,na,go,Dn,un),Xn.x=na,Xn.y=go,Xn.z=Dn,Xn.w=un)),Ja=this.position,to=!1,Ri=1,an=0,cs=0,pa=0,ln=0,ka=null,va=0,bo=!1,Co=5126,Fi=0,Yn=0,xa=0,_e(Ja)?(to=!0,ka=Je.createStream(34962,Ja),Co=ka.dtype):(ka=Je.getBuffer(Ja),ka?Co=ka.dtype:"constant"in Ja?(Ri=2,typeof Ja.constant=="number"?(an=Ja.constant,cs=pa=ln=0):(an=Ja.constant.length>0?Ja.constant[0]:0,cs=Ja.constant.length>1?Ja.constant[1]:0,pa=Ja.constant.length>2?Ja.constant[2]:0,ln=Ja.constant.length>3?Ja.constant[3]:0)):(_e(Ja.buffer)?ka=Je.createStream(34962,Ja.buffer):ka=Je.getBuffer(Ja.buffer),Co="type"in Ja?zr[Ja.type]:ka.dtype,bo=!!Ja.normalized,va=Ja.size|0,Fi=Ja.offset|0,Yn=Ja.stride|0,xa=Ja.divisor|0)),Qi=l.location,Nn=Vt[Qi],Ri===1?(Nn.buffer||Te.enableVertexAttribArray(Qi),Pn=va||2,(Nn.type!==Co||Nn.size!==Pn||Nn.buffer!==ka||Nn.normalized!==bo||Nn.offset!==Fi||Nn.stride!==Yn)&&(Te.bindBuffer(34962,ka.buffer),Te.vertexAttribPointer(Qi,Pn,Co,bo,Yn,Fi),Nn.type=Co,Nn.size=Pn,Nn.buffer=ka,Nn.normalized=bo,Nn.offset=Fi,Nn.stride=Yn),Nn.divisor!==xa&&(sn.vertexAttribDivisorANGLE(Qi,xa),Nn.divisor=xa)):(Nn.buffer&&(Te.disableVertexAttribArray(Qi),Nn.buffer=null),(Nn.x!==an||Nn.y!==cs||Nn.z!==pa||Nn.w!==ln)&&(Te.vertexAttrib4f(Qi,an,cs,pa,ln),Nn.x=an,Nn.y=cs,Nn.z=pa,Nn.w=ln)),qa=this.sizeBuffer,Br.buffer=qa,jo=!1,Vo=1,Pa=0,Oa=0,co=0,An=0,_o=null,ks=0,bs=!1,ps=5126,sa=0,Bn=0,ms=0,_e(Br)?(jo=!0,_o=Je.createStream(34962,Br),ps=_o.dtype):(_o=Je.getBuffer(Br),_o?ps=_o.dtype:"constant"in Br?(Vo=2,typeof Br.constant=="number"?(Pa=Br.constant,Oa=co=An=0):(Pa=Br.constant.length>0?Br.constant[0]:0,Oa=Br.constant.length>1?Br.constant[1]:0,co=Br.constant.length>2?Br.constant[2]:0,An=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?_o=Je.createStream(34962,Br.buffer):_o=Je.getBuffer(Br.buffer),ps="type"in Br?zr[Br.type]:_o.dtype,bs=!!Br.normalized,ks=Br.size|0,sa=Br.offset|0,Bn=Br.stride|0,ms=Br.divisor|0)),ya=f.location,on=Vt[ya],Vo===1?(on.buffer||Te.enableVertexAttribArray(ya),mn=ks||1,(on.type!==ps||on.size!==mn||on.buffer!==_o||on.normalized!==bs||on.offset!==sa||on.stride!==Bn)&&(Te.bindBuffer(34962,_o.buffer),Te.vertexAttribPointer(ya,mn,ps,bs,Bn,sa),on.type=ps,on.size=mn,on.buffer=_o,on.normalized=bs,on.offset=sa,on.stride=Bn),on.divisor!==ms&&(sn.vertexAttribDivisorANGLE(ya,ms),on.divisor=ms)):(on.buffer&&(Te.disableVertexAttribArray(ya),on.buffer=null),(on.x!==Pa||on.y!==Oa||on.z!==co||on.w!==An)&&(Te.vertexAttrib4f(ya,Pa,Oa,co,An),on.x=Pa,on.y=Oa,on.z=co,on.w=An)),Ga=oi.align,Te.uniform1f(c.location,Ga),ca=d.call(this,nt,oi,0),ca&&ca._reglType==="framebuffer"&&(ca=ca.color[0]),bn=ca._texture,Te.uniform1i(h.location,bn.bind()),Xi=x.call(this,nt,oi,0),qn=Xi[0],Ia=Xi[1],Te.uniform2f(p.location,qn,Ia),yn=y.call(this,nt,oi,0),Ya=yn[0],ba=yn[1],Te.uniform2f(b.location,Ya,ba),Da=oi.baseline,Te.uniform1f(k.location,Da),Aa=A.call(this,nt,oi,0),Te.uniform1f(E.location,Aa),Ln=oi.color,wo=Ln[0],wa=Ln[1],$i=Ln[2],ea=Ln[3],Te.uniform4f(L.location,wo,wa,$i,ea),Sa=C.call(this,nt,oi,0),Te.uniform1f(_.location,Sa),Za=oi.opacity,Te.uniform1f(M.location,Za),xo=oi.positionOffset,Wa=xo[0],hn=xo[1],Te.uniform2f(v.location,Wa,hn),Un=this.scale,Ss=Un[0],Kn=Un[1],Te.uniform2f(z.location,Ss,Kn),ns=this.translate,Jo=ns[0],vo=ns[1],Te.uniform2f(T.location,Jo,vo),ma=this.viewportArray,ja=ma[0],To=ma[1],Ao=ma[2],la=ma[3],Te.uniform4f(F.location,ja,To,Ao,la),Ki=je.elements,Ki?Te.bindBuffer(34963,Ki.buffer.buffer):Kt.currentVAO&&(Ki=tt.getElements(Kt.currentVAO.elements),Ki&&Te.bindBuffer(34963,Ki.buffer.buffer)),ho=oi.offset,Ka=oi.count,Ka&&(Ca=je.instances,Ca>0?Ki?sn.drawElementsInstancedANGLE(0,Ka,Ki.type,ho<<(Ki.type-5121>>1),Ca):sn.drawArraysInstancedANGLE(0,ho,Ka,Ca):Ca<0&&(Ki?Te.drawElements(0,Ka,Ki.type,ho<<(Ki.type-5121>>1)):Te.drawArrays(0,ho,Ka)),rt.dirty=!0,Kt.setVAO(null),nt.viewportWidth=ji,nt.viewportHeight=Vi,zi&&(r.cpuTime+=performance.now()-Mi),Or&&Je.destroyStream(hi),za&&Je.destroyStream(Zn),to&&Je.destroyStream(ka),jo&&Je.destroyStream(_o),bn.unbind())},scope:function(oi,vi,Pi){var Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa;Yr=this.viewport,Ni=Yr.x|0,Ur=Yr.y|0,ti="width"in Yr?Yr.width|0:nt.framebufferWidth-Ni,ki="height"in Yr?Yr.height|0:nt.framebufferHeight-Ur,ji=nt.viewportWidth,nt.viewportWidth=ti,Vi=nt.viewportHeight,nt.viewportHeight=ki,zi=Di[0],Di[0]=Ni,Mi=Di[1],Di[1]=Ur,sn=Di[2],Di[2]=ti,fi=Di[3],Di[3]=ki,Or=Fe[0],Fe[0]=q,st=Fe[1],Fe[1]=U,Wt=Fe[2],Fe[2]=H,tr=Fe[3],Fe[3]=j,or=ct.blend_enable,ct.blend_enable=G,Nr=ye[0],ye[0]=O,hi=ye[1],ye[1]=W,Gi=ye[2],ye[2]=re,Qr=ye[3],ye[3]=ne,Ui=ct.depth_enable,ct.depth_enable=be,zn=ct.stencil_enable,ct.stencil_enable=ze,fn=rt.profile,fn&&(xn=performance.now(),r.count++),_a=oi.offset,Wn=je.offset,je.offset=_a,Fn=oi.count,ia=je.count,je.count=Fn,za=je.primitive,je.primitive=Ce,Hr=y.call(this,nt,oi,Pi),na=ir[he],ir[he]=Hr,go=x.call(this,nt,oi,Pi),Dn=ir[te],ir[te]=go,un=d.call(this,nt,oi,Pi),Zn=ir[ke],ir[ke]=un,Wo=A.call(this,nt,oi,Pi),Ba=ir[Ee],ir[Ee]=Wo,Bo=C.call(this,nt,oi,Pi),Ea=ir[Me],ir[Me]=Bo,Ha=oi.color,tn=ir[Oe],ir[Oe]=Ha,Cn=oi.opacity,Xn=ir[Re],ir[Re]=Cn,ts=this.viewportArray,Ja=ir[me],ir[me]=ts,to=this.scale,Ri=ir[Be],ir[Be]=to,an=oi.align,cs=ir[fe],ir[fe]=an,pa=oi.baseline,ln=ir[Ze],ir[Ze]=pa,ka=this.translate,va=ir[et],ir[et]=ka,bo=oi.positionOffset,Co=ir[gt],ir[gt]=bo,Fi=this.charBuffer,Yn=!1,xa=1,Qi=0,Nn=0,Pn=0,qa=0,jo=null,Vo=0,Pa=!1,Oa=5126,co=0,An=0,_o=0,_e(Fi)?(Yn=!0,jo=Je.createStream(34962,Fi),Oa=jo.dtype):(jo=Je.getBuffer(Fi),jo?Oa=jo.dtype:"constant"in Fi?(xa=2,typeof Fi.constant=="number"?(Qi=Fi.constant,Nn=Pn=qa=0):(Qi=Fi.constant.length>0?Fi.constant[0]:0,Nn=Fi.constant.length>1?Fi.constant[1]:0,Pn=Fi.constant.length>2?Fi.constant[2]:0,qa=Fi.constant.length>3?Fi.constant[3]:0)):(_e(Fi.buffer)?jo=Je.createStream(34962,Fi.buffer):jo=Je.getBuffer(Fi.buffer),Oa="type"in Fi?zr[Fi.type]:jo.dtype,Pa=!!Fi.normalized,Vo=Fi.size|0,co=Fi.offset|0,An=Fi.stride|0,_o=Fi.divisor|0)),ks=Pt.state,Pt.state=xa,bs=Pt.x,Pt.x=Qi,ps=Pt.y,Pt.y=Nn,sa=Pt.z,Pt.z=Pn,Bn=Pt.w,Pt.w=qa,ms=Pt.buffer,Pt.buffer=jo,ya=Pt.size,Pt.size=Vo,on=Pt.normalized,Pt.normalized=Pa,mn=Pt.type,Pt.type=Oa,Ga=Pt.offset,Pt.offset=co,ca=Pt.stride,Pt.stride=An,bn=Pt.divisor,Pt.divisor=_o,Xi=this.position,qn=!1,Ia=1,yn=0,Ya=0,ba=0,Da=0,Aa=null,Ln=0,wo=!1,wa=5126,$i=0,ea=0,Sa=0,_e(Xi)?(qn=!0,Aa=Je.createStream(34962,Xi),wa=Aa.dtype):(Aa=Je.getBuffer(Xi),Aa?wa=Aa.dtype:"constant"in Xi?(Ia=2,typeof Xi.constant=="number"?(yn=Xi.constant,Ya=ba=Da=0):(yn=Xi.constant.length>0?Xi.constant[0]:0,Ya=Xi.constant.length>1?Xi.constant[1]:0,ba=Xi.constant.length>2?Xi.constant[2]:0,Da=Xi.constant.length>3?Xi.constant[3]:0)):(_e(Xi.buffer)?Aa=Je.createStream(34962,Xi.buffer):Aa=Je.getBuffer(Xi.buffer),wa="type"in Xi?zr[Xi.type]:Aa.dtype,wo=!!Xi.normalized,Ln=Xi.size|0,$i=Xi.offset|0,ea=Xi.stride|0,Sa=Xi.divisor|0)),Za=Qe.state,Qe.state=Ia,xo=Qe.x,Qe.x=yn,Wa=Qe.y,Qe.y=Ya,hn=Qe.z,Qe.z=ba,Un=Qe.w,Qe.w=Da,Ss=Qe.buffer,Qe.buffer=Aa,Kn=Qe.size,Qe.size=Ln,ns=Qe.normalized,Qe.normalized=wo,Jo=Qe.type,Qe.type=wa,vo=Qe.offset,Qe.offset=$i,ma=Qe.stride,Qe.stride=ea,ja=Qe.divisor,Qe.divisor=Sa,To=this.sizeBuffer,Rr.buffer=To,Ao=!1,la=1,Ki=0,ho=0,Ka=0,Ca=0,ta=null,En=0,Mo=!1,Ds=5126,Ro=0,vs=0,Ks=0,_e(Rr)?(Ao=!0,ta=Je.createStream(34962,Rr),Ds=ta.dtype):(ta=Je.getBuffer(Rr),ta?Ds=ta.dtype:"constant"in Rr?(la=2,typeof Rr.constant=="number"?(Ki=Rr.constant,ho=Ka=Ca=0):(Ki=Rr.constant.length>0?Rr.constant[0]:0,ho=Rr.constant.length>1?Rr.constant[1]:0,Ka=Rr.constant.length>2?Rr.constant[2]:0,Ca=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?ta=Je.createStream(34962,Rr.buffer):ta=Je.getBuffer(Rr.buffer),Ds="type"in Rr?zr[Rr.type]:ta.dtype,Mo=!!Rr.normalized,En=Rr.size|0,Ro=Rr.offset|0,vs=Rr.stride|0,Ks=Rr.divisor|0)),as=Xe.state,Xe.state=la,Jn=Xe.x,Xe.x=Ki,Cs=Xe.y,Xe.y=ho,Xa=Xe.z,Xe.z=Ka,Zo=Xe.w,Xe.w=Ca,Eo=Xe.buffer,Xe.buffer=ta,lo=Xe.size,Xe.size=En,$a=Xe.normalized,Xe.normalized=Mo,Xo=Xe.type,Xe.type=Ds,rs=Xe.offset,Xe.offset=Ro,$n=Xe.stride,Xe.stride=vs,Sn=Xe.divisor,Xe.divisor=Ks,uo=this.sizeBuffer,Br.buffer=uo,Rs=!1,xs=1,Go=0,os=0,So=0,Qn=0,zo=null,rl=0,$o=!1,Na=5126,Ua=0,Po=0,fo=0,_e(Br)?(Rs=!0,zo=Je.createStream(34962,Br),Na=zo.dtype):(zo=Je.getBuffer(Br),zo?Na=zo.dtype:"constant"in Br?(xs=2,typeof Br.constant=="number"?(Go=Br.constant,os=So=Qn=0):(Go=Br.constant.length>0?Br.constant[0]:0,os=Br.constant.length>1?Br.constant[1]:0,So=Br.constant.length>2?Br.constant[2]:0,Qn=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?zo=Je.createStream(34962,Br.buffer):zo=Je.getBuffer(Br.buffer),Na="type"in Br?zr[Br.type]:zo.dtype,$o=!!Br.normalized,rl=Br.size|0,Ua=Br.offset|0,Po=Br.stride|0,fo=Br.divisor|0)),ro=Tt.state,Tt.state=xs,Ma=Tt.x,Tt.x=Go,io=Tt.y,Tt.y=os,aa=Tt.z,Tt.z=So,Oo=Tt.w,Tt.w=Qn,No=Tt.buffer,Tt.buffer=zo,Zs=Tt.size,Tt.size=rl,Fs=Tt.normalized,Tt.normalized=$o,ws=Tt.type,Tt.type=Na,no=Tt.offset,Tt.offset=Ua,Ls=Tt.stride,Tt.stride=Po,ds=Tt.divisor,Tt.divisor=fo,Xs=Mt.vert,Mt.vert=xt,oa=Mt.frag,Mt.frag=_t,rt.dirty=!0,vi(nt,oi,Pi),nt.viewportWidth=ji,nt.viewportHeight=Vi,Di[0]=zi,Di[1]=Mi,Di[2]=sn,Di[3]=fi,Fe[0]=Or,Fe[1]=st,Fe[2]=Wt,Fe[3]=tr,ct.blend_enable=or,ye[0]=Nr,ye[1]=hi,ye[2]=Gi,ye[3]=Qr,ct.depth_enable=Ui,ct.stencil_enable=zn,fn&&(r.cpuTime+=performance.now()-xn),je.offset=Wn,je.count=ia,je.primitive=za,ir[he]=na,ir[te]=Dn,ir[ke]=Zn,ir[Ee]=Ba,ir[Me]=Ea,ir[Oe]=tn,ir[Re]=Xn,ir[me]=Ja,ir[Be]=Ri,ir[fe]=cs,ir[Ze]=ln,ir[et]=va,ir[gt]=Co,Yn&&Je.destroyStream(jo),Pt.state=ks,Pt.x=bs,Pt.y=ps,Pt.z=sa,Pt.w=Bn,Pt.buffer=ms,Pt.size=ya,Pt.normalized=on,Pt.type=mn,Pt.offset=Ga,Pt.stride=ca,Pt.divisor=bn,qn&&Je.destroyStream(Aa),Qe.state=Za,Qe.x=xo,Qe.y=Wa,Qe.z=hn,Qe.w=Un,Qe.buffer=Ss,Qe.size=Kn,Qe.normalized=ns,Qe.type=Jo,Qe.offset=vo,Qe.stride=ma,Qe.divisor=ja,Ao&&Je.destroyStream(ta),Xe.state=as,Xe.x=Jn,Xe.y=Cs,Xe.z=Xa,Xe.w=Zo,Xe.buffer=Eo,Xe.size=lo,Xe.normalized=$a,Xe.type=Xo,Xe.offset=rs,Xe.stride=$n,Xe.divisor=Sn,Rs&&Je.destroyStream(zo),Tt.state=ro,Tt.x=Ma,Tt.y=io,Tt.z=aa,Tt.w=Oo,Tt.buffer=No,Tt.size=Zs,Tt.normalized=Fs,Tt.type=ws,Tt.offset=no,Tt.stride=Ls,Tt.divisor=ds,Mt.vert=Xs,Mt.frag=oa,rt.dirty=!0},batch:function(oi,vi){var Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st;if(Pi=Ot.angle_instanced_arrays,Yr=fr.next,Yr!==fr.cur&&(Yr?Te.bindFramebuffer(36160,Yr.framebuffer):Te.bindFramebuffer(36160,null),fr.cur=Yr),rt.dirty){var Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za,Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka;Wt=ct.dither,Wt!==rt.dither&&(Wt?Te.enable(3024):Te.disable(3024),rt.dither=Wt),tr=Ie[0],or=Ie[1],(tr!==lt[0]||or!==lt[1])&&(Te.blendEquationSeparate(tr,or),lt[0]=tr,lt[1]=or),Nr=ct.depth_func,Nr!==rt.depth_func&&(Te.depthFunc(Nr),rt.depth_func=Nr),hi=de[0],Gi=de[1],(hi!==ht[0]||Gi!==ht[1])&&(Te.depthRange(hi,Gi),ht[0]=hi,ht[1]=Gi),Qr=ct.depth_mask,Qr!==rt.depth_mask&&(Te.depthMask(Qr),rt.depth_mask=Qr),Ui=Et[0],zn=Et[1],fn=Et[2],xn=Et[3],(Ui!==St[0]||zn!==St[1]||fn!==St[2]||xn!==St[3])&&(Te.colorMask(Ui,zn,fn,xn),St[0]=Ui,St[1]=zn,St[2]=fn,St[3]=xn),_a=ct.cull_enable,_a!==rt.cull_enable&&(_a?Te.enable(2884):Te.disable(2884),rt.cull_enable=_a),Wn=ct.cull_face,Wn!==rt.cull_face&&(Te.cullFace(Wn),rt.cull_face=Wn),Fn=ct.frontFace,Fn!==rt.frontFace&&(Te.frontFace(Fn),rt.frontFace=Fn),ia=ct.lineWidth,ia!==rt.lineWidth&&(Te.lineWidth(ia),rt.lineWidth=ia),za=ct.polygonOffset_enable,za!==rt.polygonOffset_enable&&(za?Te.enable(32823):Te.disable(32823),rt.polygonOffset_enable=za),Hr=Zt[0],na=Zt[1],(Hr!==qr[0]||na!==qr[1])&&(Te.polygonOffset(Hr,na),qr[0]=Hr,qr[1]=na),go=ct.sample_alpha,go!==rt.sample_alpha&&(go?Te.enable(32926):Te.disable(32926),rt.sample_alpha=go),Dn=ct.sample_enable,Dn!==rt.sample_enable&&(Dn?Te.enable(32928):Te.disable(32928),rt.sample_enable=Dn),un=Lr[0],Zn=Lr[1],(un!==vr[0]||Zn!==vr[1])&&(Te.sampleCoverage(un,Zn),vr[0]=un,vr[1]=Zn),Wo=ct.stencil_mask,Wo!==rt.stencil_mask&&(Te.stencilMask(Wo),rt.stencil_mask=Wo),Ba=Er[0],Bo=Er[1],Ea=Er[2],(Ba!==si[0]||Bo!==si[1]||Ea!==si[2])&&(Te.stencilFunc(Ba,Bo,Ea),si[0]=Ba,si[1]=Bo,si[2]=Ea),Ha=Ei[0],tn=Ei[1],Cn=Ei[2],Xn=Ei[3],(Ha!==Si[0]||tn!==Si[1]||Cn!==Si[2]||Xn!==Si[3])&&(Te.stencilOpSeparate(Ha,tn,Cn,Xn),Si[0]=Ha,Si[1]=tn,Si[2]=Cn,Si[3]=Xn),ts=xi[0],Ja=xi[1],to=xi[2],Ri=xi[3],(ts!==Hi[0]||Ja!==Hi[1]||to!==Hi[2]||Ri!==Hi[3])&&(Te.stencilOpSeparate(ts,Ja,to,Ri),Hi[0]=ts,Hi[1]=Ja,Hi[2]=to,Hi[3]=Ri),an=ct.scissor_enable,an!==rt.scissor_enable&&(an?Te.enable(3089):Te.disable(3089),rt.scissor_enable=an),cs=Jr[0],pa=Jr[1],ln=Jr[2],ka=Jr[3],(cs!==ci[0]||pa!==ci[1]||ln!==ci[2]||ka!==ci[3])&&(Te.scissor(cs,pa,ln,ka),ci[0]=cs,ci[1]=pa,ci[2]=ln,ci[3]=ka)}Ni=this.viewport,Ur=Ni.x|0,ti=Ni.y|0,ki="width"in Ni?Ni.width|0:nt.framebufferWidth-Ur,ji="height"in Ni?Ni.height|0:nt.framebufferHeight-ti,Vi=nt.viewportWidth,nt.viewportWidth=ki,zi=nt.viewportHeight,nt.viewportHeight=ji,Te.viewport(Ur,ti,ki,ji),Lt[0]=Ur,Lt[1]=ti,Lt[2]=ki,Lt[3]=ji,Te.blendColor(0,0,0,1),Pe[0]=0,Pe[1]=0,Pe[2]=0,Pe[3]=1,Ct?Te.enable(3042):Te.disable(3042),rt.blend_enable=Ct,Te.blendFuncSeparate(770,771,773,1),ue[0]=770,ue[1]=771,ue[2]=773,ue[3]=1,jt?Te.enable(2929):Te.disable(2929),rt.depth_enable=jt,At?Te.enable(2960):Te.disable(2960),rt.stencil_enable=At,Mi=rt.profile,Mi&&(sn=performance.now(),r.count+=vi),Te.useProgram(o.program),fi=Ot.angle_instanced_arrays;var va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la,Ki,ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn;for(Kt.setVAO(null),va=this.charBuffer,bo=!1,Co=1,Fi=0,Yn=0,xa=0,Qi=0,Nn=null,Pn=0,qa=!1,jo=5126,Vo=0,Pa=0,Oa=0,_e(va)?(bo=!0,Nn=Je.createStream(34962,va),jo=Nn.dtype):(Nn=Je.getBuffer(va),Nn?jo=Nn.dtype:"constant"in va?(Co=2,typeof va.constant=="number"?(Fi=va.constant,Yn=xa=Qi=0):(Fi=va.constant.length>0?va.constant[0]:0,Yn=va.constant.length>1?va.constant[1]:0,xa=va.constant.length>2?va.constant[2]:0,Qi=va.constant.length>3?va.constant[3]:0)):(_e(va.buffer)?Nn=Je.createStream(34962,va.buffer):Nn=Je.getBuffer(va.buffer),jo="type"in va?zr[va.type]:Nn.dtype,qa=!!va.normalized,Pn=va.size|0,Vo=va.offset|0,Pa=va.stride|0,Oa=va.divisor|0)),co=s.location,An=Vt[co],Co===1?(An.buffer||Te.enableVertexAttribArray(co),_o=Pn||1,(An.type!==jo||An.size!==_o||An.buffer!==Nn||An.normalized!==qa||An.offset!==Vo||An.stride!==Pa)&&(Te.bindBuffer(34962,Nn.buffer),Te.vertexAttribPointer(co,_o,jo,qa,Pa,Vo),An.type=jo,An.size=_o,An.buffer=Nn,An.normalized=qa,An.offset=Vo,An.stride=Pa),An.divisor!==Oa&&(fi.vertexAttribDivisorANGLE(co,Oa),An.divisor=Oa)):(An.buffer&&(Te.disableVertexAttribArray(co),An.buffer=null),(An.x!==Fi||An.y!==Yn||An.z!==xa||An.w!==Qi)&&(Te.vertexAttrib4f(co,Fi,Yn,xa,Qi),An.x=Fi,An.y=Yn,An.z=xa,An.w=Qi)),ks=this.sizeBuffer,Rr.buffer=ks,bs=!1,ps=1,sa=0,Bn=0,ms=0,ya=0,on=null,mn=0,Ga=!1,ca=5126,bn=0,Xi=0,qn=0,_e(Rr)?(bs=!0,on=Je.createStream(34962,Rr),ca=on.dtype):(on=Je.getBuffer(Rr),on?ca=on.dtype:"constant"in Rr?(ps=2,typeof Rr.constant=="number"?(sa=Rr.constant,Bn=ms=ya=0):(sa=Rr.constant.length>0?Rr.constant[0]:0,Bn=Rr.constant.length>1?Rr.constant[1]:0,ms=Rr.constant.length>2?Rr.constant[2]:0,ya=Rr.constant.length>3?Rr.constant[3]:0)):(_e(Rr.buffer)?on=Je.createStream(34962,Rr.buffer):on=Je.getBuffer(Rr.buffer),ca="type"in Rr?zr[Rr.type]:on.dtype,Ga=!!Rr.normalized,mn=Rr.size|0,bn=Rr.offset|0,Xi=Rr.stride|0,qn=Rr.divisor|0)),Ia=u.location,yn=Vt[Ia],ps===1?(yn.buffer||Te.enableVertexAttribArray(Ia),Ya=mn||1,(yn.type!==ca||yn.size!==Ya||yn.buffer!==on||yn.normalized!==Ga||yn.offset!==bn||yn.stride!==Xi)&&(Te.bindBuffer(34962,on.buffer),Te.vertexAttribPointer(Ia,Ya,ca,Ga,Xi,bn),yn.type=ca,yn.size=Ya,yn.buffer=on,yn.normalized=Ga,yn.offset=bn,yn.stride=Xi),yn.divisor!==qn&&(fi.vertexAttribDivisorANGLE(Ia,qn),yn.divisor=qn)):(yn.buffer&&(Te.disableVertexAttribArray(Ia),yn.buffer=null),(yn.x!==sa||yn.y!==Bn||yn.z!==ms||yn.w!==ya)&&(Te.vertexAttrib4f(Ia,sa,Bn,ms,ya),yn.x=sa,yn.y=Bn,yn.z=ms,yn.w=ya)),ba=this.position,Da=!1,Aa=1,Ln=0,wo=0,wa=0,$i=0,ea=null,Sa=0,Za=!1,xo=5126,Wa=0,hn=0,Un=0,_e(ba)?(Da=!0,ea=Je.createStream(34962,ba),xo=ea.dtype):(ea=Je.getBuffer(ba),ea?xo=ea.dtype:"constant"in ba?(Aa=2,typeof ba.constant=="number"?(Ln=ba.constant,wo=wa=$i=0):(Ln=ba.constant.length>0?ba.constant[0]:0,wo=ba.constant.length>1?ba.constant[1]:0,wa=ba.constant.length>2?ba.constant[2]:0,$i=ba.constant.length>3?ba.constant[3]:0)):(_e(ba.buffer)?ea=Je.createStream(34962,ba.buffer):ea=Je.getBuffer(ba.buffer),xo="type"in ba?zr[ba.type]:ea.dtype,Za=!!ba.normalized,Sa=ba.size|0,Wa=ba.offset|0,hn=ba.stride|0,Un=ba.divisor|0)),Ss=l.location,Kn=Vt[Ss],Aa===1?(Kn.buffer||Te.enableVertexAttribArray(Ss),ns=Sa||2,(Kn.type!==xo||Kn.size!==ns||Kn.buffer!==ea||Kn.normalized!==Za||Kn.offset!==Wa||Kn.stride!==hn)&&(Te.bindBuffer(34962,ea.buffer),Te.vertexAttribPointer(Ss,ns,xo,Za,hn,Wa),Kn.type=xo,Kn.size=ns,Kn.buffer=ea,Kn.normalized=Za,Kn.offset=Wa,Kn.stride=hn),Kn.divisor!==Un&&(fi.vertexAttribDivisorANGLE(Ss,Un),Kn.divisor=Un)):(Kn.buffer&&(Te.disableVertexAttribArray(Ss),Kn.buffer=null),(Kn.x!==Ln||Kn.y!==wo||Kn.z!==wa||Kn.w!==$i)&&(Te.vertexAttrib4f(Ss,Ln,wo,wa,$i),Kn.x=Ln,Kn.y=wo,Kn.z=wa,Kn.w=$i)),Jo=this.sizeBuffer,Br.buffer=Jo,vo=!1,ma=1,ja=0,To=0,Ao=0,la=0,Ki=null,ho=0,Ka=!1,Ca=5126,ta=0,En=0,Mo=0,_e(Br)?(vo=!0,Ki=Je.createStream(34962,Br),Ca=Ki.dtype):(Ki=Je.getBuffer(Br),Ki?Ca=Ki.dtype:"constant"in Br?(ma=2,typeof Br.constant=="number"?(ja=Br.constant,To=Ao=la=0):(ja=Br.constant.length>0?Br.constant[0]:0,To=Br.constant.length>1?Br.constant[1]:0,Ao=Br.constant.length>2?Br.constant[2]:0,la=Br.constant.length>3?Br.constant[3]:0)):(_e(Br.buffer)?Ki=Je.createStream(34962,Br.buffer):Ki=Je.getBuffer(Br.buffer),Ca="type"in Br?zr[Br.type]:Ki.dtype,Ka=!!Br.normalized,ho=Br.size|0,ta=Br.offset|0,En=Br.stride|0,Mo=Br.divisor|0)),Ds=f.location,Ro=Vt[Ds],ma===1?(Ro.buffer||Te.enableVertexAttribArray(Ds),vs=ho||1,(Ro.type!==Ca||Ro.size!==vs||Ro.buffer!==Ki||Ro.normalized!==Ka||Ro.offset!==ta||Ro.stride!==En)&&(Te.bindBuffer(34962,Ki.buffer),Te.vertexAttribPointer(Ds,vs,Ca,Ka,En,ta),Ro.type=Ca,Ro.size=vs,Ro.buffer=Ki,Ro.normalized=Ka,Ro.offset=ta,Ro.stride=En),Ro.divisor!==Mo&&(fi.vertexAttribDivisorANGLE(Ds,Mo),Ro.divisor=Mo)):(Ro.buffer&&(Te.disableVertexAttribArray(Ds),Ro.buffer=null),(Ro.x!==ja||Ro.y!==To||Ro.z!==Ao||Ro.w!==la)&&(Te.vertexAttrib4f(Ds,ja,To,Ao,la),Ro.x=ja,Ro.y=To,Ro.z=Ao,Ro.w=la)),Ks=this.scale,as=Ks[0],Jn=Ks[1],Te.uniform2f(z.location,as,Jn),Cs=this.translate,Xa=Cs[0],Zo=Cs[1],Te.uniform2f(T.location,Xa,Zo),Eo=this.viewportArray,lo=Eo[0],$a=Eo[1],Xo=Eo[2],rs=Eo[3],Te.uniform4f(F.location,lo,$a,Xo,rs),$n=je.elements,$n?Te.bindBuffer(34963,$n.buffer.buffer):Kt.currentVAO&&($n=tt.getElements(Kt.currentVAO.elements),$n&&Te.bindBuffer(34963,$n.buffer.buffer)),Sn=je.instances,Or=0;Or0?$n?fi.drawElementsInstancedANGLE(0,Sr,$n.type,nr<<($n.type-5121>>1),Sn):fi.drawArraysInstancedANGLE(0,nr,Sr,Sn):Sn<0&&($n?Te.drawElements(0,Sr,$n.type,nr<<($n.type-5121>>1)):Te.drawArrays(0,nr,Sr)),Go.unbind())}bo&&Je.destroyStream(Nn),bs&&Je.destroyStream(on),Da&&Je.destroyStream(ea),vo&&Je.destroyStream(Ki),rt.dirty=!0,Kt.setVAO(null),nt.viewportWidth=Vi,nt.viewportHeight=zi,Mi&&(r.cpuTime+=performance.now()-sn)}}}});var fK=Se((l1r,WOe)=>{"use strict";var m7t=b9(),g7t=w9(),_7t=T9(),x7t=A9(),b7t=S9(),w7t=M9(),T7t=E9(),A7t=k9(),S7t=C9(),M7t=L9();WOe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":m7t,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:g7t,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":_7t,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:x7t,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:b7t,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":w7t,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:T7t,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:A7t,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":S7t,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":M7t}});var XOe=Se((u1r,ZOe)=>{"use strict";var jOe=uK(),E7t=fK();Object.assign(jOe.reglPrecompiled,E7t);ZOe.exports=jOe});var JOe=Se((f1r,KOe)=>{"use strict";var YOe=t9e();YOe.plot=XOe();KOe.exports=YOe});var cK=Se((c1r,tNe)=>{"use strict";var k7t=Zc(),eNe=Xf(),$Oe=Gc().axisHoverFormat,C7t=Du().hovertemplateAttrs,xk=ek(),L7t=dd().idRegex,z7t=_f().templatedArray,dS=vu().extendFlat,o1=k7t.marker,P7t=o1.line,I7t=dS(eNe("marker.line",{editTypeOverride:"calc"}),{width:dS({},P7t.width,{editType:"calc"}),editType:"calc"}),z9=dS(eNe("marker"),{symbol:o1.symbol,angle:o1.angle,size:dS({},o1.size,{editType:"markerSize"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:I7t,editType:"calc"});z9.color.editType=z9.cmin.editType=z9.cmax.editType="style";function QOe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:L7t[e],editType:"plot"}}}tNe.exports={dimensions:z7t("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:dS({},xk.text,{}),hovertext:dS({},xk.hovertext,{}),hovertemplate:C7t(),xhoverformat:$Oe("x"),yhoverformat:$Oe("y"),marker:z9,xaxes:QOe("x"),yaxes:QOe("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:xk.selected.marker,editType:"calc"},unselected:{marker:xk.unselected.marker,editType:"calc"},opacity:xk.opacity}});var P9=Se((h1r,rNe)=>{"use strict";rNe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var hK=Zr(),D7t=Jd(),iNe=cK(),R7t=ec(),F7t=$v(),q7t=P9(),B7t=FF().isOpenSymbol;nNe.exports=function(t,r,n,i){function a(d,p){return hK.coerce(t,r,iNe,d,p)}var o=D7t(t,r,{name:"dimensions",handleItemDefaults:O7t}),s=a("diagonal.visible"),u=a("showupperhalf"),l=a("showlowerhalf"),f=q7t(r,o,"values");if(!f||!s&&!u&&!l){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),F7t(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var c=B7t(r.marker.symbol),h=R7t.isBubble(r);a("marker.line.width",c||h?1:0),N7t(t,r,i,a),hK.coerceSelectionMarkerOpacity(r,a)};function O7t(e,t){function r(i,a){return hK.coerce(e,t,iNe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function N7t(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,u=t.diagonal.visible,l,f,c=new Array(a),h=new Array(a);for(l=0;lf&&o||l{"use strict";var oNe=Zr();sNe.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:[]},u=a[r.uid];return u||(u=a[i]=oNe.extendFlat({},o,s),u.draw=function(){u.matrix&&u.matrix.draw&&(u.selectBatch.length||u.unselectBatch.length?u.matrix.draw(u.unselectBatch,u.selectBatch):u.matrix.draw()),u.dirty=!1},u.destroy=function(){u.matrix&&u.matrix.destroy&&u.matrix.destroy(),u.matrixOptions=null,u.selectBatch=null,u.unselectBatch=null,u=null}),u.dirty||oNe.extendFlat(u,o),u}});var cNe=Se((v1r,fNe)=>{"use strict";var dK=Zr(),I9=$c(),U7t=q0().calcMarkerSize,V7t=q0().calcAxisExpansion,H7t=R0(),uNe=Y2().markerSelection,G7t=Y2().markerStyle,W7t=lNe(),j7t=ju().BADNUM,Z7t=ox().TOO_MANY_POINTS;fNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],u=r._visibleDims=[],l,f,c,h,d;function p(E,A){for(var L=E.makeCalcdata({v:A.values,vcalendar:r.calendar},"v"),_=0;_Z7t,y;for(b?y=a.sizeAvg||Math.max(a.size,3):y=U7t(r,i),f=0;f{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?bk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(bk.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?(bk.exports=function(){return Date.now()-r},r=Date.now()):(bk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(hNe)});var vNe=Se((y1r,F9)=>{var X7t=dNe(),s1=window,D9=["moz","webkit"],vS="AnimationFrame",yS=s1["request"+vS],wk=s1["cancel"+vS]||s1["cancelRequest"+vS];for(pS=0;!yS&&pS{yNe.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,u=t;s{"use strict";var Y7t=uY(),K7t=Zm(),J7t=W2(),gNe=vNe(),$7t=mNe(),vK=eS(),Q7t=j2();xNe.exports=px;function px(e,t){if(!(this instanceof px))return new px(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=Y7t(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=gNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,gNe(()=>{this.dirty=!1})),this)};px.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&x{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 eUt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function q9(e,t,r){let n,i,a,o,s,u,l,f,c=e[t],h=e[r];return c.length>2?(n=c[0],a=c[2],i=c[1],o=c[3]):c.length?(n=i=c[0],a=o=c[1]):(n=c.x,i=c.y,a=c.x+c.width,o=c.y+c.height),h.length>2?(s=h[0],l=h[2],u=h[1],f=h[3]):h.length?(s=u=h[0],l=f=h[1]):(s=h.x,u=h.y,l=h.x+h.width,f=h.y+h.height),[s,i,l,o]}function _Ne(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=vK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var TNe=Se((_1r,wNe)=>{"use strict";var tUt=bNe(),yK=Zr(),B9=$c(),rUt=Sy().selectMode;wNe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,T=rUt(f)||!!i.selectedpoints||z,F=!0;if(T){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,H={};for(d=0;d{"use strict";ANe.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 SNe=mK(),nUt=RF().calcHover,MNe=hu().getFromId,aUt=vu().extendFlat;function oUt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ENe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var u=(a?e.xa:e.ya)._subplotsWith,l=i.gd,f=aUt({},e),c=0;c{"use strict";var INe=Zr(),LNe=INe.pushUnique,zNe=ec(),PNe=mK();DNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,u=t.xaxis,l=t.yaxis,f=[];if(!o)return f;var c=!zNe.hasMarkers(i)&&!zNe.hasText(i);if(i.visible!==!0||c)return f;var h=PNe.getDimIndex(i,u),d=PNe.getDimIndex(i,l);if(h===!1||d===!1)return f;var p=a.xpx[h],x=a.ypx[d],b=s[h],y=s[d],k=(t.scene.selectBatch||[]).slice(),E=[];if(r!==!1&&!r.degenerate)for(var A=0;A{"use strict";var FNe=Zr(),sUt=R0(),lUt=Y2().markerStyle;qNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){sUt(t,n),FNe.extendFlat(i.matrixOptions,lUt(t,n));var a=FNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var NNe=Se((A1r,ONe)=>{"use strict";var uUt=Ul(),fUt=pV();ONe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:cK(),supplyDefaults:aNe(),colorbar:ep(),calc:cNe(),plot:TNe(),hoverPoints:CNe().hoverPoints,selectPoints:RNe(),editStyle:BNe(),meta:{}};uUt.register(fUt)});var jNe=Se((S1r,WNe)=>{"use strict";var cUt=NY(),hUt=Ul(),dUt=x9(),pUt=Dd().getModuleCalcData,vx=Th(),UNe=$c().getFromId,VNe=hu().shouldShowZeroLine,HNe="splom",GNe={};function vUt(e){var t=e._fullLayout,r=hUt.getModule(HNe),n=pUt(e.calcdata,r)[0],i=dUt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],GNe);i&&(t._hasOnlyLargeSploms&&gK(e),r.plot(e,{},n))}function yUt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&gK(e);for(var n=0;n{"use strict";var xUt=b9(),bUt=w9(),wUt=T9(),TUt=E9(),AUt=k9(),SUt=A9(),MUt=S9(),EUt=M9(),kUt=C9(),CUt=L9();ZNe.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":xUt,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:bUt,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":wUt,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:TUt,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:AUt,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:SUt,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:MUt,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":EUt,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":kUt,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":CUt}});var JNe=Se((E1r,KNe)=>{"use strict";var YNe=jNe(),LUt=XNe();Object.assign(YNe.reglPrecompiled,LUt);KNe.exports=YNe});var e7e=Se((k1r,QNe)=>{"use strict";var $Ne=NNe();$Ne.basePlotModule=JNe(),QNe.exports=$Ne});var bK=Se((C1r,t7e)=>{"use strict";var zUt=Xf(),_K=Rd(),xK=uc(),PUt=Ec().attributes,O9=vu().extendFlat,IUt=_f().templatedArray;t7e.exports={domain:PUt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:xK({editType:"plot"}),tickfont:xK({autoShadowDflt:!0,editType:"plot"}),rangefont:xK({editType:"plot"}),dimensions:IUt("dimension",{label:{valType:"string",editType:"plot"},tickvals:O9({},_K.tickvals,{editType:"plot"}),ticktext:O9({},_K.ticktext,{editType:"plot"}),tickformat:O9({},_K.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:O9({editType:"calc"},zUt("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 Tk=Se((L1r,r7e)=>{"use strict";r7e.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 Km=Se((z1r,n7e)=>{"use strict";var DUt=BM();function i7e(e){return[e]}n7e.exports={keyFun:function(e){return e.key},repeat:i7e,descend:DUt,wrap:i7e,unwrap:function(e){return e[0]}}});var AK=Se((P1r,v7e)=>{"use strict";var Eh=Tk(),em=Nl(),RUt=Km().keyFun,N9=Km().repeat,mS=Zr().sorterAsc,FUt=Zr().strTranslate,a7e=Eh.bar.snapRatio;function o7e(e,t){return e*(1-a7e)+t*a7e}var s7e=Eh.bar.snapClose;function qUt(e,t){return e*(1-s7e)+t*s7e}function V9(e,t,r,n){if(BUt(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 u=t[a],l=u,f=a;i*f=t[r][0]&&e<=t[r][1])return!0;return!1}function OUt(e){e.attr("x",-Eh.bar.captureWidth/2).attr("width",Eh.bar.captureWidth)}function NUt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function UUt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=l7e(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 u7e(){em.select(document.body).style("cursor",null)}function TK(e){e.attr("stroke-dasharray",UUt)}function U9(e,t){var r=em.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Eh.bar.snapDuration).each("end",t):r;TK(n)}function f7e(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,u=r.filter.getConsolidated(),l=l7e(u,s),f=NaN,c=NaN,h=NaN;for(o=0;o<=l.length;o++){var d=l[o];if(d&&d[0]<=t&&t<=d[1]){f=o;break}else if(c=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=f,isNaN(i)&&(isNaN(c)||isNaN(h)?i=isNaN(c)?h:c:i=t-l[c][1]=k[0]&&y<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function HUt(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*Eh.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=f7e(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var u=o.map(t.unitToPaddedPx);s.grabPoint=r-u[0]-Eh.verticalPadding,s.barLength=u[1]-u[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(l){return l[0]!==o[0]&&l[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function c7e(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*Eh.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(mS),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),U9(e.parentNode)}function GUt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(h7e(e,t),c7e(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=em.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,u7e(),!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&&wK(r)):wK(r),i.brushCallback(t),U9(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var u=t.unitTickvals;u[u.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(l?[i.newExtent]:[]),i.extent.length||wK(r),i.brushCallback(t),l?U9(e.parentNode,s):(s(),U9(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function h7e(e,t){var r=t.height-em.mouse(e)[1]-2*Eh.verticalPadding,n=f7e(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),em.select(document.body).style("cursor",i)}function WUt(e){e.on("mousemove",function(t){em.event.preventDefault(),t.parent.inBrushDrag||h7e(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||u7e()}).call(em.behavior.drag().on("dragstart",function(t){HUt(this,t)}).on("drag",function(t){c7e(this,t)}).on("dragend",function(t){GUt(this,t)}))}function d7e(e,t){return e[0]-t[0]}function jUt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(N9);i.enter().append("rect").classed("background",!0).call(OUt).call(NUt).style("pointer-events",n?"none":"auto").attr("transform",FUt(0,Eh.verticalPadding)),i.call(WUt).attr("height",function(s){return s.height-Eh.verticalPadding});var a=e.selectAll(".highlight-shadow").data(N9);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Eh.bar.width/2).attr("stroke-width",Eh.bar.width+Eh.bar.strokeWidth).attr("stroke",t).attr("opacity",Eh.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(TK);var o=e.selectAll(".highlight").data(N9);o.enter().append("line").classed("highlight",!0).attr("x",-Eh.bar.width/2).attr("stroke-width",Eh.bar.width-Eh.bar.strokeWidth).attr("stroke",Eh.bar.fillColor).attr("opacity",Eh.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(TK)}function ZUt(e,t,r){var n=e.selectAll("."+Eh.cn.axisBrush).data(N9,RUt);n.enter().append("g").classed(Eh.cn.axisBrush,!0),jUt(n,t,r)}function XUt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function wK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function YUt(e){return function(r){var n=r.brush,i=XUt(n),a=i.slice();n.filter.set(a),e()}}function p7e(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 KUt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(mS)}).sort(d7e),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=p7e(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 JUt(e,t,r,n,i,a){var o=KUt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:YUt(i),brushEndCallback:a}}}function $Ut(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(mS)}),t.multiselect?e=p7e(e.sort(d7e)):e=[e[0]]):e=[e.sort(mS)],t.tickvals){var r=t.tickvals.slice().sort(mS);if(e=e.map(function(n){var i=[V9(0,r,n[0],[]),V9(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]}v7e.exports={makeBrush:JUt,ensureAxisBrush:ZUt,cleanRanges:$Ut}});var g7e=Se((I1r,m7e)=>{"use strict";var yx=Zr(),QUt=Dp().hasColorscale,eVt=ed(),tVt=Ec().defaults,rVt=Jd(),iVt=hu(),y7e=bK(),nVt=AK(),SK=Tk().maxDimensionCount,aVt=P9();function oVt(e,t,r,n,i){var a=i("line.color",r);if(QUt(e,"line")&&yx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),eVt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function sVt(e,t,r,n){function i(l,f){return yx.coerce(e,t,y7e.dimensions,l,f)}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},iVt.setConvert(t._ax,n.layout),i("multiselect");var u=i("constraintrange");u&&(t.constraintrange=nVt.cleanRanges(u,t))}}m7e.exports=function(t,r,n,i){function a(f,c){return yx.coerce(t,r,y7e,f,c)}var o=t.dimensions;Array.isArray(o)&&o.length>SK&&(yx.log("parcoords traces support up to "+SK+" dimensions at the moment"),o.splice(SK));var s=rVt(t,r,{name:"dimensions",layout:i,handleItemDefaults:sVt}),u=oVt(t,r,n,i,a);tVt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),aVt(r,s,"values",u);var l=yx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});yx.coerceFont(a,"labelfont",l),yx.coerceFont(a,"tickfont",l,{autoShadowDflt:!0}),yx.coerceFont(a,"rangefont",l),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var x7e=Se((D1r,_7e)=>{"use strict";var lVt=Zr().isArrayOrTypedArray,MK=fc(),uVt=Km().wrap;_7e.exports=function(t,r){var n,i;return MK.hasColorscale(r,"line")&&lVt(r.line.color)?(n=r.line.color,i=MK.extractOpts(r.line).colorscale,MK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=fVt(r._length),i=[[0,r.line.color],[1,r.line.color]]),uVt({lineColor:n,cscale:i})};function fVt(e){for(var t=new Array(e),r=0;r{"use strict";var cVt=Zr().isTypedArray;H9.convertTypedArray=function(e){return cVt(e)?Array.prototype.slice.call(e):e};H9.isOrdinal=function(e){return!!e.tickvals};H9.isVisible=function(e){return e.visible||!("visible"in e)}});var L7e=Se((F1r,C7e)=>{"use strict";var hVt=["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(` `),dVt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),Ak=Tk().maxDimensionCount,M7e=Zr(),b7e=1e-6,G9=2048,pVt=new Uint8Array(4),w7e=new Uint8Array(4),T7e={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function vVt(e){e.read({x:0,y:0,width:1,height:1,data:pVt})}function E7e(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 yVt(e,t,r,n,i,a){var o=a.key;function s(u){var l=Math.min(n,i-u*n);u===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],E7e(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*l,a.offset=2*u*n,t(a),u*n+l>>8*t)%256/255}function _Vt(e,t,r){for(var n=new Array(e*(Ak+4)),i=0,a=0;aj&&(j=M[F].dim1.canvasX,U=F);T===0&&E7e(i,0,0,l.canvasWidth,l.canvasHeight);var G=k(r);for(F=0;F{"use strict";var Ud=Nl(),l1=Zr(),CK=l1.isArrayOrTypedArray,F7e=l1.numberFormat,q7e=hZ(),B7e=hu(),AVt=l1.strRotate,Jm=l1.strTranslate,SVt=Bf(),W9=yu(),z7e=fc(),PK=Km(),ty=PK.keyFun,$m=PK.repeat,O7e=PK.unwrap,gS=EK(),Cf=Tk(),N7e=AK(),MVt=L7e();function P7e(e,t,r){return l1.aggNums(e,null,t,r)}function U7e(e,t){return IK(P7e(Math.min,e,t),P7e(Math.max,e,t))}function j9(e){var t=e.range;return t?IK(t[0],t[1]):U7e(e.values,e._length)}function IK(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 EVt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function kVt(e,t,r,n,i){var a=j9(r);return n?Ud.scale.ordinal().domain(n.map(EVt(F7e(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Ud.scale.linear().domain(a).range([e-t,t])}function CVt(e,t){return Ud.scale.linear().range([t,e-t])}function LVt(e,t){return Ud.scale.linear().domain(j9(e)).range([t,1-t])}function zVt(e){if(e.tickvals){var t=j9(e);return Ud.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function PVt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=q7e(a[1]);return Ud.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Ud.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 IVt(e,t,r){var n=O7e(t),i=n.trace,a=gS.convertTypedArray(n.lineColor),o=i.line,s={color:q7e(i.unselected.line.color),opacity:i.unselected.line.opacity},u=z7e.extractOpts(o),l=u.reversescale?z7e.flipScale(n.cscale):n.cscale,f=i.domain,c=i.dimensions,h=e.width,d=i.labelangle,p=i.labelside,x=i.labelfont,b=i.tickfont,y=i.rangefont,E=l1.extendDeepNoArrays({},o,{color:a.map(Ud.scale.linear().domain(j9({values:a,range:[u.min,u.max],_length:i._length}))),blockLineCount:Cf.blockLineCount,canvasOverdrag:Cf.overdrag*Cf.canvasPixelRatio}),k=Math.floor(h*(f.x[1]-f.x[0])),A=Math.floor(e.height*(f.y[1]-f.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},_=k,C=A;return{key:r,colCount:c.filter(gS.isVisible).length,dimensions:c,tickDistance:Cf.tickDistance,unitToColor:PVt(l),lines:E,deselectedLines:s,labelAngle:d,labelSide:p,labelFont:x,tickFont:b,rangeFont:y,layoutWidth:h,layoutHeight:e.height,domain:f,translateX:f.x[0]*h,translateY:e.height-f.y[1]*e.height,pad:L,canvasWidth:_*Cf.canvasPixelRatio+2*E.canvasOverdrag,canvasHeight:C*Cf.canvasPixelRatio,width:_,height:C,canvasPixelRatio:Cf.canvasPixelRatio}}function DVt(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)},u=Cf.verticalPadding/i,l=CVt(i,Cf.verticalPadding),f={key:r.key,xScale:s,model:r,inBrushDrag:!1},c={};return f.dimensions=a.filter(gS.isVisible).map(function(h,d){var p=LVt(h,u),x=c[h.label];c[h.label]=(x||0)+1;var b=h.label+(x?"__"+x:""),y=h.constraintrange,E=y&&y.length;E&&!CK(y[0])&&(y=[y]);var k=E?y.map(function(q){return q.map(p)}):[[-1/0,1/0]],A=function(){var q=f;q.focusLayer&&q.focusLayer.render(q.panels,!0);var U=zK(q);!e.contextShown()&&U?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var _=h.tickvals,C;function M(q,U){return{val:q,text:C[U]}}function v(q,U){return q.val-U.val}if(CK(_)&&_.length){l1.isTypedArray(_)&&(_=Array.from(_)),C=h.ticktext,!CK(C)||!C.length?C=_.map(F7e(h.tickformat)):C.length>_.length?C=C.slice(0,_.length):_.length>C.length&&(_=_.slice(0,C.length));for(var z=1;z<_.length;z++)if(_[z]<_[z-1]){for(var T=_.map(M).sort(v),F=0;F<_.length;F++)_[F]=T[F].val,C[F]=T[F].text;break}}else _=void 0;return L=gS.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:_,ticktext:C,ordinal:gS.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(p),unitTickvals:_&&_.map(p),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:l,domainScale:kVt(i,Cf.verticalPadding,h,_,C),ordinalScale:zVt(h),parent:f,model:r,brush:N7e.makeBrush(e,E,k,function(){e.linePickActive(!1)},A,function(q){if(f.focusLayer.render(f.panels,!0),f.pickLayer&&f.pickLayer.render(f.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var U=p.invert,H=q.map(function(j){return j.map(U).sort(l1.sorterAsc)}).sort(function(j,G){return j[0]-G[0]});t.filterChanged(f.key,h._index,H)}})}}),f}function I7e(e){e.classed(Cf.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function RVt(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function D7e(e,t){var r=t==="top"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function LK(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a=U||O>=H)return;var W=F.lineLayer.readPixel(G,H-1-O),re=W[3]!==0,ne=re?W[2]+256*(W[1]+256*W[0]):null,be={x:G,y:O,clientX:q.clientX,clientY:q.clientY,dataIndex:F.model.key,curveNumber:ne};ne!==p&&(re?i.hover(be):i.unhover&&i.unhover(be),p=ne)}}),d.style("opacity",function(F){return F.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Cf.cn.parcoords).data(h,ty);b.exit().remove(),b.enter().append("g").classed(Cf.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(F){return Jm(F.model.translateX,F.model.translateY)});var y=b.selectAll("."+Cf.cn.parcoordsControlView).data($m,ty);y.enter().append("g").classed(Cf.cn.parcoordsControlView,!0),y.attr("transform",function(F){return Jm(F.model.pad.l,F.model.pad.t)});var E=y.selectAll("."+Cf.cn.yAxis).data(function(F){return F.dimensions},ty);E.enter().append("g").classed(Cf.cn.yAxis,!0),y.each(function(F){LK(E,F,l)}),d.each(function(F){if(F.viewModel){!F.lineLayer||i?F.lineLayer=MVt(this,F):F.lineLayer.update(F),(F.key||F.key===0)&&(F.viewModel[F.key]=F.lineLayer);var q=!F.context||i;F.lineLayer.render(F.viewModel.panels,q)}}),E.attr("transform",function(F){return Jm(F.xScale(F.xIndex),0)}),E.call(Ud.behavior.drag().origin(function(F){return F}).on("drag",function(F){var q=F.parent;c.linePickActive(!1),F.x=Math.max(-Cf.overdrag,Math.min(F.model.width+Cf.overdrag,Ud.event.x)),F.canvasX=F.x*F.model.canvasPixelRatio,E.sort(function(U,H){return U.x-H.x}).each(function(U,H){U.xIndex=H,U.x=F===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),LK(E,q,l),E.filter(function(U){return Math.abs(F.xIndex-U.xIndex)!==0}).attr("transform",function(U){return Jm(U.xScale(U.xIndex),0)}),Ud.select(this).attr("transform",Jm(F.x,0)),E.each(function(U,H,j){j===F.parent.key&&(q.dimensions[H]=U)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!zK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(F){var q=F.parent;F.x=F.xScale(F.xIndex),F.canvasX=F.x*F.model.canvasPixelRatio,LK(E,q,l),Ud.select(this).attr("transform",function(U){return Jm(U.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!zK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),c.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),E.exit().remove();var k=E.selectAll("."+Cf.cn.axisOverlays).data($m,ty);k.enter().append("g").classed(Cf.cn.axisOverlays,!0),k.selectAll("."+Cf.cn.axis).remove();var A=k.selectAll("."+Cf.cn.axis).data($m,ty);A.enter().append("g").classed(Cf.cn.axis,!0),A.each(function(F){var q=F.model.height/F.model.tickDistance,U=F.domainScale,H=U.domain();Ud.select(this).call(Ud.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,F.tickFormat).tickValues(F.ordinal?H:null).tickFormat(function(j){return gS.isOrdinal(F)?j:V7e(F.model.dimensions[F.visibleIndex],j)}).scale(U)),W9.font(A.selectAll("text"),F.model.tickFont)}),A.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),A.selectAll("text").style("cursor","default");var L=k.selectAll("."+Cf.cn.axisHeading).data($m,ty);L.enter().append("g").classed(Cf.cn.axisHeading,!0);var _=L.selectAll("."+Cf.cn.axisTitle).data($m,ty);_.enter().append("text").classed(Cf.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),_.text(function(F){return F.label}).each(function(F){var q=Ud.select(this);W9.font(q,F.model.labelFont),SVt.convertToTspans(q,t)}).attr("transform",function(F){var q=D7e(F.model.labelAngle,F.model.labelSide),U=Cf.axisTitleOffset;return(q.dir>0?"":Jm(0,2*U+F.model.height))+AVt(q.degrees)+Jm(-U*q.dx,-U*q.dy)}).attr("text-anchor",function(F){var q=D7e(F.model.labelAngle,F.model.labelSide),U=Math.abs(q.dx),H=Math.abs(q.dy);return 2*U>H?q.dir*q.dx<0?"start":"end":"middle"});var C=k.selectAll("."+Cf.cn.axisExtent).data($m,ty);C.enter().append("g").classed(Cf.cn.axisExtent,!0);var M=C.selectAll("."+Cf.cn.axisExtentTop).data($m,ty);M.enter().append("g").classed(Cf.cn.axisExtentTop,!0),M.attr("transform",Jm(0,-Cf.axisExtentOffset));var v=M.selectAll("."+Cf.cn.axisExtentTopText).data($m,ty);v.enter().append("text").classed(Cf.cn.axisExtentTopText,!0).call(I7e),v.text(function(F){return R7e(F,!0)}).each(function(F){W9.font(Ud.select(this),F.model.rangeFont)});var z=C.selectAll("."+Cf.cn.axisExtentBottom).data($m,ty);z.enter().append("g").classed(Cf.cn.axisExtentBottom,!0),z.attr("transform",function(F){return Jm(0,F.model.height+Cf.axisExtentOffset)});var T=z.selectAll("."+Cf.cn.axisExtentBottomText).data($m,ty);T.enter().append("text").classed(Cf.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(I7e),T.text(function(F){return R7e(F,!1)}).each(function(F){W9.font(Ud.select(this),F.model.rangeFont)}),N7e.ensureAxisBrush(k,f,t)}});var RK=Se((DK,X7e)=>{"use strict";var qVt=G7e(),BVt=x9(),W7e=EK().isVisible,Z7e={};function j7e(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function OVt(e,t){return function(n,i){return j7e(e,t,n)-j7e(e,t,i)}}var DK=X7e.exports=function(t,r){var n=t._fullLayout,i=BVt(t,[],Z7e);if(i){var a={},o={},s={},u={},l=n._size;r.forEach(function(p,x){var b=p[0].trace;s[x]=b.index;var y=u[x]=b.index;a[x]=t.data[y].dimensions,o[x]=t.data[y].dimensions.slice()});var f=function(p,x,b){var y=o[p][x],E=b.map(function(M){return M.slice()}),k="dimensions["+x+"].constraintrange",A=n._tracePreGUI[t._fullData[s[p]]._fullInput.uid];if(A[k]===void 0){var L=y.constraintrange;A[k]=L||null}var _=t._fullData[s[p]].dimensions[x];E.length?(E.length===1&&(E=E[0]),y.constraintrange=E,_.constraintrange=E.slice(),E=[E]):(delete y.constraintrange,delete _.constraintrange,E=null);var C={};C[k]=E,t.emit("plotly_restyle",[C,[u[p]]])},c=function(p){t.emit("plotly_hover",p)},h=function(p){t.emit("plotly_unhover",p)},d=function(p,x){var b=OVt(x,o[p].filter(W7e));a[p].sort(b),o[p].filter(function(y){return!W7e(y)}).sort(function(y){return o[p].indexOf(y)}).forEach(function(y){a[p].splice(a[p].indexOf(y),1),a[p].splice(o[p].indexOf(y),0,y)}),t.emit("plotly_restyle",[{dimensions:[a[p]]},[u[p]]])};qVt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:f,hover:c,unhover:h,axesMoved:d})}};DK.reglPrecompiled=Z7e});var K7e=Se(Sk=>{"use strict";var Y7e=Nl(),NVt=Dd().getModuleCalcData,UVt=RK(),VVt=Zv();Sk.name="parcoords";Sk.plot=function(e){var t=NVt(e.calcdata,"parcoords")[0];t.length&&UVt(e,t)};Sk.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())};Sk.toSVG=function(e){var t=e._fullLayout._glimages,r=Y7e.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:VVt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){Y7e.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var $7e=Se((O1r,J7e)=>{"use strict";J7e.exports={attributes:bK(),supplyDefaults:g7e(),calc:x7e(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:K7e(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var eUe=Se((N1r,Q7e)=>{Q7e.exports=function(t,r){"use strict";var n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt;return n=t.gl,i=t.context,a=t.strings,o=t.next,s=t.current,u=t.draw,l=t.elements,f=t.buffer,c=t.shader,h=t.attributes,d=t.vao,p=t.uniforms,x=t.framebuffer,b=t.extensions,y=t.timer,E=t.isBufferArgs,k=o.blend_color,A=s.blend_color,L=o.blend_equation,_=s.blend_equation,C=o.blend_func,M=s.blend_func,v=o.depth_range,z=s.depth_range,T=o.colorMask,F=s.colorMask,q=o.polygonOffset_offset,U=s.polygonOffset_offset,H=o.sample_coverage,j=s.sample_coverage,G=o.stencil_func,O=s.stencil_func,W=o.stencil_opFront,re=s.stencil_opFront,ne=o.stencil_opBack,be=s.stencil_opBack,ze=o.scissor_box,Ce=s.scissor_box,he=o.viewport,te=s.viewport,ke={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ee={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Me={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Oe={add:32774,subtract:32778,"reverse subtract":32779},Re={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},me={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Be={cw:2304,ccw:2305},fe=o.blend_color,Ze=s.blend_color,et=o.blend_equation,gt=s.blend_equation,Pt=o.blend_func,Qe=s.blend_func,Xe=o.depth_range,Tt=s.depth_range,xt=o.colorMask,_t=s.colorMask,Ct=o.polygonOffset_offset,jt=s.polygonOffset_offset,At=o.sample_coverage,Te=s.sample_coverage,nt=o.stencil_func,ut=s.stencil_func,ct=o.stencil_opFront,rt=s.stencil_opFront,je=o.stencil_opBack,tt=s.stencil_opBack,Je=o.scissor_box,Mt=s.scissor_box,Vt=o.viewport,Kt=s.viewport,{poll:function(){var ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei;s.dirty=!1,fr=o.dither,Ot=o.blend_enable,De=o.depth_enable,_e=o.cull_enable,Fe=o.polygonOffset_enable,Pe=o.sample_alpha,Ie=o.sample_enable,lt=o.stencil_enable,ye=o.scissor_enable,ue=o.depth_func,de=s.depth_func,ht=o.depth_mask,Et=s.depth_mask,St=o.cull_face,Zt=s.cull_face,qr=o.frontFace,Lr=s.frontFace,vr=o.lineWidth,Er=s.lineWidth,si=o.stencil_mask,Ei=s.stencil_mask,ir=x.next,ir!==x.cur&&(ir?n.bindFramebuffer(36160,ir.framebuffer):n.bindFramebuffer(36160,null),x.cur=ir),fr!==s.dither&&(fr?n.enable(3024):n.disable(3024),s.dither=fr),Ot!==s.blend_enable&&(Ot?n.enable(3042):n.disable(3042),s.blend_enable=Ot),De!==s.depth_enable&&(De?n.enable(2929):n.disable(2929),s.depth_enable=De),_e!==s.cull_enable&&(_e?n.enable(2884):n.disable(2884),s.cull_enable=_e),Fe!==s.polygonOffset_enable&&(Fe?n.enable(32823):n.disable(32823),s.polygonOffset_enable=Fe),Pe!==s.sample_alpha&&(Pe?n.enable(32926):n.disable(32926),s.sample_alpha=Pe),Ie!==s.sample_enable&&(Ie?n.enable(32928):n.disable(32928),s.sample_enable=Ie),lt!==s.stencil_enable&&(lt?n.enable(2960):n.disable(2960),s.stencil_enable=lt),ye!==s.scissor_enable&&(ye?n.enable(3089):n.disable(3089),s.scissor_enable=ye),(fe[0]!==Ze[0]||fe[1]!==Ze[1]||fe[2]!==Ze[2]||fe[3]!==Ze[3])&&(n.blendColor(fe[0],fe[1],fe[2],fe[3]),Ze[0]=fe[0],Ze[1]=fe[1],Ze[2]=fe[2],Ze[3]=fe[3]),(et[0]!==gt[0]||et[1]!==gt[1])&&(n.blendEquationSeparate(et[0],et[1]),gt[0]=et[0],gt[1]=et[1]),(Pt[0]!==Qe[0]||Pt[1]!==Qe[1]||Pt[2]!==Qe[2]||Pt[3]!==Qe[3])&&(n.blendFuncSeparate(Pt[0],Pt[1],Pt[2],Pt[3]),Qe[0]=Pt[0],Qe[1]=Pt[1],Qe[2]=Pt[2],Qe[3]=Pt[3]),ue!==de&&(n.depthFunc(ue),s.depth_func=ue),(Xe[0]!==Tt[0]||Xe[1]!==Tt[1])&&(n.depthRange(Xe[0],Xe[1]),Tt[0]=Xe[0],Tt[1]=Xe[1]),ht!==Et&&(n.depthMask(ht),s.depth_mask=ht),(xt[0]!==_t[0]||xt[1]!==_t[1]||xt[2]!==_t[2]||xt[3]!==_t[3])&&(n.colorMask(xt[0],xt[1],xt[2],xt[3]),_t[0]=xt[0],_t[1]=xt[1],_t[2]=xt[2],_t[3]=xt[3]),St!==Zt&&(n.cullFace(St),s.cull_face=St),qr!==Lr&&(n.frontFace(qr),s.frontFace=qr),vr!==Er&&(n.lineWidth(vr),s.lineWidth=vr),(Ct[0]!==jt[0]||Ct[1]!==jt[1])&&(n.polygonOffset(Ct[0],Ct[1]),jt[0]=Ct[0],jt[1]=Ct[1]),(At[0]!==Te[0]||At[1]!==Te[1])&&(n.sampleCoverage(At[0],At[1]),Te[0]=At[0],Te[1]=At[1]),si!==Ei&&(n.stencilMask(si),s.stencil_mask=si),(nt[0]!==ut[0]||nt[1]!==ut[1]||nt[2]!==ut[2])&&(n.stencilFunc(nt[0],nt[1],nt[2]),ut[0]=nt[0],ut[1]=nt[1],ut[2]=nt[2]),(ct[0]!==rt[0]||ct[1]!==rt[1]||ct[2]!==rt[2]||ct[3]!==rt[3])&&(n.stencilOpSeparate(ct[0],ct[1],ct[2],ct[3]),rt[0]=ct[0],rt[1]=ct[1],rt[2]=ct[2],rt[3]=ct[3]),(je[0]!==tt[0]||je[1]!==tt[1]||je[2]!==tt[2]||je[3]!==tt[3])&&(n.stencilOpSeparate(je[0],je[1],je[2],je[3]),tt[0]=je[0],tt[1]=je[1],tt[2]=je[2],tt[3]=je[3]),(Je[0]!==Mt[0]||Je[1]!==Mt[1]||Je[2]!==Mt[2]||Je[3]!==Mt[3])&&(n.scissor(Je[0],Je[1],Je[2],Je[3]),Mt[0]=Je[0],Mt[1]=Je[1],Mt[2]=Je[2],Mt[3]=Je[3]),(Vt[0]!==Kt[0]||Vt[1]!==Kt[1]||Vt[2]!==Kt[2]||Vt[3]!==Kt[3])&&(n.viewport(Vt[0],Vt[1],Vt[2],Vt[3]),Kt[0]=Vt[0],Kt[1]=Vt[1],Kt[2]=Vt[2],Kt[3]=Vt[3])},refresh:function(){var ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi;s.dirty=!1,De=o.dither,_e=o.blend_enable,Fe=o.depth_enable,Pe=o.cull_enable,Ie=o.polygonOffset_enable,lt=o.sample_alpha,ye=o.sample_enable,ue=o.stencil_enable,de=o.scissor_enable,ht=o.depth_func,Et=s.depth_func,St=o.depth_mask,Zt=s.depth_mask,qr=o.cull_face,Lr=s.cull_face,vr=o.frontFace,Er=s.frontFace,si=o.lineWidth,Ei=s.lineWidth,Si=o.stencil_mask,xi=s.stencil_mask,ir=x.next,ir?n.bindFramebuffer(36160,ir.framebuffer):n.bindFramebuffer(36160,null),x.cur=ir,fr=h,Ot=0;for(var Hi=0;Hi{tUe.exports=function(t,r,n,i,a,o,s,u){"use strict";var l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt;return l=t.gl,f=t.context,c=t.strings,h=t.next,d=t.current,p=t.draw,x=t.elements,b=t.buffer,y=t.shader,E=t.attributes,k=t.vao,A=t.uniforms,L=t.framebuffer,_=t.extensions,C=t.timer,M=t.isBufferArgs,v=h.blend_color,z=d.blend_color,T=h.blend_equation,F=d.blend_equation,q=h.blend_func,U=d.blend_func,H=h.depth_range,j=d.depth_range,G=h.colorMask,O=d.colorMask,W=h.polygonOffset_offset,re=d.polygonOffset_offset,ne=h.sample_coverage,be=d.sample_coverage,ze=h.stencil_func,Ce=d.stencil_func,he=h.stencil_opFront,te=d.stencil_opFront,ke=h.stencil_opBack,Ee=d.stencil_opBack,Me=h.scissor_box,Oe=d.scissor_box,Re=h.viewport,me=d.viewport,Be={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ze={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},et={add:32774,subtract:32778,"reverse subtract":32779},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Qe={cw:2304,ccw:2305},Xe={},Tt={},{draw:function(xt){var _t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot;if(_t=xt.framebuffer,Ct=L.getFramebuffer(_t),jt=L.next,L.next=Ct,At=f.framebufferWidth,f.framebufferWidth=Ct?Ct.width:f.drawingBufferWidth,Te=f.framebufferHeight,f.framebufferHeight=Ct?Ct.height:f.drawingBufferHeight,Ct!==L.cur&&(Ct?l.bindFramebuffer(36160,Ct.framebuffer):l.bindFramebuffer(36160,null),L.cur=Ct),d.dirty){var De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi;De=h.dither,De!==d.dither&&(De?l.enable(3024):l.disable(3024),d.dither=De),_e=h.blend_enable,_e!==d.blend_enable&&(_e?l.enable(3042):l.disable(3042),d.blend_enable=_e),Fe=v[0],Pe=v[1],Ie=v[2],lt=v[3],(Fe!==z[0]||Pe!==z[1]||Ie!==z[2]||lt!==z[3])&&(l.blendColor(Fe,Pe,Ie,lt),z[0]=Fe,z[1]=Pe,z[2]=Ie,z[3]=lt),ye=T[0],ue=T[1],(ye!==F[0]||ue!==F[1])&&(l.blendEquationSeparate(ye,ue),F[0]=ye,F[1]=ue),de=q[0],ht=q[1],Et=q[2],St=q[3],(de!==U[0]||ht!==U[1]||Et!==U[2]||St!==U[3])&&(l.blendFuncSeparate(de,ht,Et,St),U[0]=de,U[1]=ht,U[2]=Et,U[3]=St),Zt=h.depth_enable,Zt!==d.depth_enable&&(Zt?l.enable(2929):l.disable(2929),d.depth_enable=Zt),qr=h.depth_func,qr!==d.depth_func&&(l.depthFunc(qr),d.depth_func=qr),Lr=H[0],vr=H[1],(Lr!==j[0]||vr!==j[1])&&(l.depthRange(Lr,vr),j[0]=Lr,j[1]=vr),Er=h.depth_mask,Er!==d.depth_mask&&(l.depthMask(Er),d.depth_mask=Er),si=G[0],Ei=G[1],Si=G[2],xi=G[3],(si!==O[0]||Ei!==O[1]||Si!==O[2]||xi!==O[3])&&(l.colorMask(si,Ei,Si,xi),O[0]=si,O[1]=Ei,O[2]=Si,O[3]=xi),Hi=h.cull_enable,Hi!==d.cull_enable&&(Hi?l.enable(2884):l.disable(2884),d.cull_enable=Hi),Jr=h.cull_face,Jr!==d.cull_face&&(l.cullFace(Jr),d.cull_face=Jr),ci=h.frontFace,ci!==d.frontFace&&(l.frontFace(ci),d.frontFace=ci),Di=h.lineWidth,Di!==d.lineWidth&&(l.lineWidth(Di),d.lineWidth=Di),Lt=h.polygonOffset_enable,Lt!==d.polygonOffset_enable&&(Lt?l.enable(32823):l.disable(32823),d.polygonOffset_enable=Lt),vt=W[0],Dt=W[1],(vt!==re[0]||Dt!==re[1])&&(l.polygonOffset(vt,Dt),re[0]=vt,re[1]=Dt),Bt=h.sample_alpha,Bt!==d.sample_alpha&&(Bt?l.enable(32926):l.disable(32926),d.sample_alpha=Bt),sr=h.sample_enable,sr!==d.sample_enable&&(sr?l.enable(32928):l.disable(32928),d.sample_enable=sr),br=ne[0],zr=ne[1],(br!==be[0]||zr!==be[1])&&(l.sampleCoverage(br,zr),be[0]=br,be[1]=zr),Tr=h.stencil_enable,Tr!==d.stencil_enable&&(Tr?l.enable(2960):l.disable(2960),d.stencil_enable=Tr),Rr=h.stencil_mask,Rr!==d.stencil_mask&&(l.stencilMask(Rr),d.stencil_mask=Rr),Br=ze[0],oi=ze[1],vi=ze[2],(Br!==Ce[0]||oi!==Ce[1]||vi!==Ce[2])&&(l.stencilFunc(Br,oi,vi),Ce[0]=Br,Ce[1]=oi,Ce[2]=vi),Pi=he[0],Yr=he[1],Ni=he[2],Ur=he[3],(Pi!==te[0]||Yr!==te[1]||Ni!==te[2]||Ur!==te[3])&&(l.stencilOpSeparate(Pi,Yr,Ni,Ur),te[0]=Pi,te[1]=Yr,te[2]=Ni,te[3]=Ur),ti=ke[0],ki=ke[1],ji=ke[2],Vi=ke[3],(ti!==Ee[0]||ki!==Ee[1]||ji!==Ee[2]||Vi!==Ee[3])&&(l.stencilOpSeparate(ti,ki,ji,Vi),Ee[0]=ti,Ee[1]=ki,Ee[2]=ji,Ee[3]=Vi),zi=h.scissor_enable,zi!==d.scissor_enable&&(zi?l.enable(3089):l.disable(3089),d.scissor_enable=zi)}nt=f.framebufferWidth,ut=f.framebufferHeight,ct=f.viewportWidth,f.viewportWidth=nt,rt=f.viewportHeight,f.viewportHeight=ut,l.viewport(0,0,nt,ut),me[0]=0,me[1]=0,me[2]=nt,me[3]=ut,je=f.framebufferWidth,tt=f.framebufferHeight,l.scissor(0,0,je,tt),Oe[0]=0,Oe[1]=0,Oe[2]=je,Oe[3]=tt,Je=d.profile,Je&&(Mt=performance.now(),r.count++),Vt=y.frag,Kt=y.vert,ir=y.program(Kt,Vt),l.useProgram(ir.program),k.setVAO(null),fr=ir.id,Ot=Xe[fr],Ot?Ot.call(this,xt):(Ot=Xe[fr]=n(ir),Ot.call(this,xt)),d.dirty=!0,k.setVAO(null),L.next=jt,f.framebufferWidth=At,f.framebufferHeight=Te,f.viewportWidth=ct,f.viewportHeight=rt,Je&&(r.cpuTime+=performance.now()-Mt)},scope:function(xt,_t,Ct){var jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie;jt=xt.framebuffer,At=L.getFramebuffer(jt),Te=L.next,L.next=At,nt=f.framebufferWidth,f.framebufferWidth=At?At.width:f.drawingBufferWidth,ut=f.framebufferHeight,f.framebufferHeight=At?At.height:f.drawingBufferHeight,ct=f.framebufferWidth,rt=f.framebufferHeight,je=f.viewportWidth,f.viewportWidth=ct,tt=f.viewportHeight,f.viewportHeight=rt,Je=Re[0],Re[0]=i,Mt=Re[1],Re[1]=a,Vt=Re[2],Re[2]=ct,Kt=Re[3],Re[3]=rt,ir=f.framebufferWidth,fr=f.framebufferHeight,Ot=Me[0],Me[0]=o,De=Me[1],Me[1]=s,_e=Me[2],Me[2]=ir,Fe=Me[3],Me[3]=fr,Pe=d.profile,Pe&&(Ie=performance.now(),r.count++),d.dirty=!0,_t(f,xt,Ct),L.next=Te,f.framebufferWidth=nt,f.framebufferHeight=ut,f.viewportWidth=je,f.viewportHeight=tt,Re[0]=Je,Re[1]=Mt,Re[2]=Vt,Re[3]=Kt,Me[0]=Ot,Me[1]=De,Me[2]=_e,Me[3]=Fe,Pe&&(r.cpuTime+=performance.now()-Ie),d.dirty=!0},batch:function(xt,_t){var Ct,jt,At,Te,nt,ut,ct;if(d.dirty){var rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi;rt=h.dither,rt!==d.dither&&(rt?l.enable(3024):l.disable(3024),d.dither=rt),je=h.blend_enable,je!==d.blend_enable&&(je?l.enable(3042):l.disable(3042),d.blend_enable=je),tt=v[0],Je=v[1],Mt=v[2],Vt=v[3],(tt!==z[0]||Je!==z[1]||Mt!==z[2]||Vt!==z[3])&&(l.blendColor(tt,Je,Mt,Vt),z[0]=tt,z[1]=Je,z[2]=Mt,z[3]=Vt),Kt=T[0],ir=T[1],(Kt!==F[0]||ir!==F[1])&&(l.blendEquationSeparate(Kt,ir),F[0]=Kt,F[1]=ir),fr=q[0],Ot=q[1],De=q[2],_e=q[3],(fr!==U[0]||Ot!==U[1]||De!==U[2]||_e!==U[3])&&(l.blendFuncSeparate(fr,Ot,De,_e),U[0]=fr,U[1]=Ot,U[2]=De,U[3]=_e),Fe=h.depth_enable,Fe!==d.depth_enable&&(Fe?l.enable(2929):l.disable(2929),d.depth_enable=Fe),Pe=h.depth_func,Pe!==d.depth_func&&(l.depthFunc(Pe),d.depth_func=Pe),Ie=H[0],lt=H[1],(Ie!==j[0]||lt!==j[1])&&(l.depthRange(Ie,lt),j[0]=Ie,j[1]=lt),ye=h.depth_mask,ye!==d.depth_mask&&(l.depthMask(ye),d.depth_mask=ye),ue=G[0],de=G[1],ht=G[2],Et=G[3],(ue!==O[0]||de!==O[1]||ht!==O[2]||Et!==O[3])&&(l.colorMask(ue,de,ht,Et),O[0]=ue,O[1]=de,O[2]=ht,O[3]=Et),St=h.cull_enable,St!==d.cull_enable&&(St?l.enable(2884):l.disable(2884),d.cull_enable=St),Zt=h.cull_face,Zt!==d.cull_face&&(l.cullFace(Zt),d.cull_face=Zt),qr=h.frontFace,qr!==d.frontFace&&(l.frontFace(qr),d.frontFace=qr),Lr=h.lineWidth,Lr!==d.lineWidth&&(l.lineWidth(Lr),d.lineWidth=Lr),vr=h.polygonOffset_enable,vr!==d.polygonOffset_enable&&(vr?l.enable(32823):l.disable(32823),d.polygonOffset_enable=vr),Er=W[0],si=W[1],(Er!==re[0]||si!==re[1])&&(l.polygonOffset(Er,si),re[0]=Er,re[1]=si),Ei=h.sample_alpha,Ei!==d.sample_alpha&&(Ei?l.enable(32926):l.disable(32926),d.sample_alpha=Ei),Si=h.sample_enable,Si!==d.sample_enable&&(Si?l.enable(32928):l.disable(32928),d.sample_enable=Si),xi=ne[0],Hi=ne[1],(xi!==be[0]||Hi!==be[1])&&(l.sampleCoverage(xi,Hi),be[0]=xi,be[1]=Hi),Jr=h.stencil_enable,Jr!==d.stencil_enable&&(Jr?l.enable(2960):l.disable(2960),d.stencil_enable=Jr),ci=h.stencil_mask,ci!==d.stencil_mask&&(l.stencilMask(ci),d.stencil_mask=ci),Di=ze[0],Lt=ze[1],vt=ze[2],(Di!==Ce[0]||Lt!==Ce[1]||vt!==Ce[2])&&(l.stencilFunc(Di,Lt,vt),Ce[0]=Di,Ce[1]=Lt,Ce[2]=vt),Dt=he[0],Bt=he[1],sr=he[2],br=he[3],(Dt!==te[0]||Bt!==te[1]||sr!==te[2]||br!==te[3])&&(l.stencilOpSeparate(Dt,Bt,sr,br),te[0]=Dt,te[1]=Bt,te[2]=sr,te[3]=br),zr=ke[0],Tr=ke[1],Rr=ke[2],Br=ke[3],(zr!==Ee[0]||Tr!==Ee[1]||Rr!==Ee[2]||Br!==Ee[3])&&(l.stencilOpSeparate(zr,Tr,Rr,Br),Ee[0]=zr,Ee[1]=Tr,Ee[2]=Rr,Ee[3]=Br),oi=h.scissor_enable,oi!==d.scissor_enable&&(oi?l.enable(3089):l.disable(3089),d.scissor_enable=oi)}Ct=d.profile,Ct&&(jt=performance.now(),r.count+=_t),At=y.frag,Te=y.vert,nt=y.program(Te,At),l.useProgram(nt.program),k.setVAO(null),ut=nt.id,ct=Tt[ut],ct?ct.call(this,xt,_t):(ct=Tt[ut]=u(nt),ct.call(this,xt,_t)),d.dirty=!0,k.setVAO(null),Ct&&(r.cpuTime+=performance.now()-jt)}}}});var nUe=Se((V1r,iUe)=>{iUe.exports=function(t,r,n,i){"use strict";var a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt;return a=t.gl,o=t.context,s=t.strings,u=t.next,l=t.current,f=t.draw,c=t.elements,h=t.buffer,d=t.shader,p=t.attributes,x=t.vao,b=t.uniforms,y=t.framebuffer,E=t.extensions,k=t.timer,A=t.isBufferArgs,L=u.blend_color,_=l.blend_color,C=u.blend_equation,M=l.blend_equation,v=u.blend_func,z=l.blend_func,T=u.depth_range,F=l.depth_range,q=u.colorMask,U=l.colorMask,H=u.polygonOffset_offset,j=l.polygonOffset_offset,G=u.sample_coverage,O=l.sample_coverage,W=u.stencil_func,re=l.stencil_func,ne=u.stencil_opFront,be=l.stencil_opFront,ze=u.stencil_opBack,Ce=l.stencil_opBack,he=u.scissor_box,te=l.scissor_box,ke=u.viewport,Ee=l.viewport,Me={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Oe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Re={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},me={add:32774,subtract:32778,"reverse subtract":32779},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ze={cw:2304,ccw:2305},et={},gt={},{draw:function(Pt){var Qe,Xe,Tt,xt,_t,Ct,jt,At;if(Qe=y.next,Qe!==y.cur&&(Qe?a.bindFramebuffer(36160,Qe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Qe),l.dirty){var Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni;Te=u.dither,Te!==l.dither&&(Te?a.enable(3024):a.disable(3024),l.dither=Te),nt=u.blend_enable,nt!==l.blend_enable&&(nt?a.enable(3042):a.disable(3042),l.blend_enable=nt),ut=L[0],ct=L[1],rt=L[2],je=L[3],(ut!==_[0]||ct!==_[1]||rt!==_[2]||je!==_[3])&&(a.blendColor(ut,ct,rt,je),_[0]=ut,_[1]=ct,_[2]=rt,_[3]=je),tt=C[0],Je=C[1],(tt!==M[0]||Je!==M[1])&&(a.blendEquationSeparate(tt,Je),M[0]=tt,M[1]=Je),Mt=v[0],Vt=v[1],Kt=v[2],ir=v[3],(Mt!==z[0]||Vt!==z[1]||Kt!==z[2]||ir!==z[3])&&(a.blendFuncSeparate(Mt,Vt,Kt,ir),z[0]=Mt,z[1]=Vt,z[2]=Kt,z[3]=ir),fr=u.depth_enable,fr!==l.depth_enable&&(fr?a.enable(2929):a.disable(2929),l.depth_enable=fr),Ot=u.depth_func,Ot!==l.depth_func&&(a.depthFunc(Ot),l.depth_func=Ot),De=T[0],_e=T[1],(De!==F[0]||_e!==F[1])&&(a.depthRange(De,_e),F[0]=De,F[1]=_e),Fe=u.depth_mask,Fe!==l.depth_mask&&(a.depthMask(Fe),l.depth_mask=Fe),Pe=q[0],Ie=q[1],lt=q[2],ye=q[3],(Pe!==U[0]||Ie!==U[1]||lt!==U[2]||ye!==U[3])&&(a.colorMask(Pe,Ie,lt,ye),U[0]=Pe,U[1]=Ie,U[2]=lt,U[3]=ye),ue=u.cull_enable,ue!==l.cull_enable&&(ue?a.enable(2884):a.disable(2884),l.cull_enable=ue),de=u.cull_face,de!==l.cull_face&&(a.cullFace(de),l.cull_face=de),ht=u.frontFace,ht!==l.frontFace&&(a.frontFace(ht),l.frontFace=ht),Et=u.lineWidth,Et!==l.lineWidth&&(a.lineWidth(Et),l.lineWidth=Et),St=u.polygonOffset_enable,St!==l.polygonOffset_enable&&(St?a.enable(32823):a.disable(32823),l.polygonOffset_enable=St),Zt=H[0],qr=H[1],(Zt!==j[0]||qr!==j[1])&&(a.polygonOffset(Zt,qr),j[0]=Zt,j[1]=qr),Lr=u.sample_alpha,Lr!==l.sample_alpha&&(Lr?a.enable(32926):a.disable(32926),l.sample_alpha=Lr),vr=u.sample_enable,vr!==l.sample_enable&&(vr?a.enable(32928):a.disable(32928),l.sample_enable=vr),Er=G[0],si=G[1],(Er!==O[0]||si!==O[1])&&(a.sampleCoverage(Er,si),O[0]=Er,O[1]=si),Ei=u.stencil_enable,Ei!==l.stencil_enable&&(Ei?a.enable(2960):a.disable(2960),l.stencil_enable=Ei),Si=u.stencil_mask,Si!==l.stencil_mask&&(a.stencilMask(Si),l.stencil_mask=Si),xi=W[0],Hi=W[1],Jr=W[2],(xi!==re[0]||Hi!==re[1]||Jr!==re[2])&&(a.stencilFunc(xi,Hi,Jr),re[0]=xi,re[1]=Hi,re[2]=Jr),ci=ne[0],Di=ne[1],Lt=ne[2],vt=ne[3],(ci!==be[0]||Di!==be[1]||Lt!==be[2]||vt!==be[3])&&(a.stencilOpSeparate(ci,Di,Lt,vt),be[0]=ci,be[1]=Di,be[2]=Lt,be[3]=vt),Dt=ze[0],Bt=ze[1],sr=ze[2],br=ze[3],(Dt!==Ce[0]||Bt!==Ce[1]||sr!==Ce[2]||br!==Ce[3])&&(a.stencilOpSeparate(Dt,Bt,sr,br),Ce[0]=Dt,Ce[1]=Bt,Ce[2]=sr,Ce[3]=br),zr=u.scissor_enable,zr!==l.scissor_enable&&(zr?a.enable(3089):a.disable(3089),l.scissor_enable=zr),Tr=he[0],Rr=he[1],Br=he[2],oi=he[3],(Tr!==te[0]||Rr!==te[1]||Br!==te[2]||oi!==te[3])&&(a.scissor(Tr,Rr,Br,oi),te[0]=Tr,te[1]=Rr,te[2]=Br,te[3]=oi),vi=ke[0],Pi=ke[1],Yr=ke[2],Ni=ke[3],(vi!==Ee[0]||Pi!==Ee[1]||Yr!==Ee[2]||Ni!==Ee[3])&&(a.viewport(vi,Pi,Yr,Ni),Ee[0]=vi,Ee[1]=Pi,Ee[2]=Yr,Ee[3]=Ni),l.dirty=!1}Xe=l.profile,Xe&&(Tt=performance.now(),r.count++),xt=d.frag,_t=d.vert,Ct=d.program(_t,xt),a.useProgram(Ct.program),x.setVAO(null),jt=Ct.id,At=et[jt],At?At.call(this,Pt):(At=et[jt]=n(Ct),At.call(this,Pt)),x.setVAO(null),Xe&&(r.cpuTime+=performance.now()-Tt)},scope:function(Pt,Qe,Xe){var Tt,xt;Tt=l.profile,Tt&&(xt=performance.now(),r.count++),Qe(o,Pt,Xe),Tt&&(r.cpuTime+=performance.now()-xt)},batch:function(Pt,Qe){var Xe,Tt,xt,_t,Ct,jt,At,Te;if(Xe=y.next,Xe!==y.cur&&(Xe?a.bindFramebuffer(36160,Xe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Xe),l.dirty){var nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur;nt=u.dither,nt!==l.dither&&(nt?a.enable(3024):a.disable(3024),l.dither=nt),ut=u.blend_enable,ut!==l.blend_enable&&(ut?a.enable(3042):a.disable(3042),l.blend_enable=ut),ct=L[0],rt=L[1],je=L[2],tt=L[3],(ct!==_[0]||rt!==_[1]||je!==_[2]||tt!==_[3])&&(a.blendColor(ct,rt,je,tt),_[0]=ct,_[1]=rt,_[2]=je,_[3]=tt),Je=C[0],Mt=C[1],(Je!==M[0]||Mt!==M[1])&&(a.blendEquationSeparate(Je,Mt),M[0]=Je,M[1]=Mt),Vt=v[0],Kt=v[1],ir=v[2],fr=v[3],(Vt!==z[0]||Kt!==z[1]||ir!==z[2]||fr!==z[3])&&(a.blendFuncSeparate(Vt,Kt,ir,fr),z[0]=Vt,z[1]=Kt,z[2]=ir,z[3]=fr),Ot=u.depth_enable,Ot!==l.depth_enable&&(Ot?a.enable(2929):a.disable(2929),l.depth_enable=Ot),De=u.depth_func,De!==l.depth_func&&(a.depthFunc(De),l.depth_func=De),_e=T[0],Fe=T[1],(_e!==F[0]||Fe!==F[1])&&(a.depthRange(_e,Fe),F[0]=_e,F[1]=Fe),Pe=u.depth_mask,Pe!==l.depth_mask&&(a.depthMask(Pe),l.depth_mask=Pe),Ie=q[0],lt=q[1],ye=q[2],ue=q[3],(Ie!==U[0]||lt!==U[1]||ye!==U[2]||ue!==U[3])&&(a.colorMask(Ie,lt,ye,ue),U[0]=Ie,U[1]=lt,U[2]=ye,U[3]=ue),de=u.cull_enable,de!==l.cull_enable&&(de?a.enable(2884):a.disable(2884),l.cull_enable=de),ht=u.cull_face,ht!==l.cull_face&&(a.cullFace(ht),l.cull_face=ht),Et=u.frontFace,Et!==l.frontFace&&(a.frontFace(Et),l.frontFace=Et),St=u.lineWidth,St!==l.lineWidth&&(a.lineWidth(St),l.lineWidth=St),Zt=u.polygonOffset_enable,Zt!==l.polygonOffset_enable&&(Zt?a.enable(32823):a.disable(32823),l.polygonOffset_enable=Zt),qr=H[0],Lr=H[1],(qr!==j[0]||Lr!==j[1])&&(a.polygonOffset(qr,Lr),j[0]=qr,j[1]=Lr),vr=u.sample_alpha,vr!==l.sample_alpha&&(vr?a.enable(32926):a.disable(32926),l.sample_alpha=vr),Er=u.sample_enable,Er!==l.sample_enable&&(Er?a.enable(32928):a.disable(32928),l.sample_enable=Er),si=G[0],Ei=G[1],(si!==O[0]||Ei!==O[1])&&(a.sampleCoverage(si,Ei),O[0]=si,O[1]=Ei),Si=u.stencil_enable,Si!==l.stencil_enable&&(Si?a.enable(2960):a.disable(2960),l.stencil_enable=Si),xi=u.stencil_mask,xi!==l.stencil_mask&&(a.stencilMask(xi),l.stencil_mask=xi),Hi=W[0],Jr=W[1],ci=W[2],(Hi!==re[0]||Jr!==re[1]||ci!==re[2])&&(a.stencilFunc(Hi,Jr,ci),re[0]=Hi,re[1]=Jr,re[2]=ci),Di=ne[0],Lt=ne[1],vt=ne[2],Dt=ne[3],(Di!==be[0]||Lt!==be[1]||vt!==be[2]||Dt!==be[3])&&(a.stencilOpSeparate(Di,Lt,vt,Dt),be[0]=Di,be[1]=Lt,be[2]=vt,be[3]=Dt),Bt=ze[0],sr=ze[1],br=ze[2],zr=ze[3],(Bt!==Ce[0]||sr!==Ce[1]||br!==Ce[2]||zr!==Ce[3])&&(a.stencilOpSeparate(Bt,sr,br,zr),Ce[0]=Bt,Ce[1]=sr,Ce[2]=br,Ce[3]=zr),Tr=u.scissor_enable,Tr!==l.scissor_enable&&(Tr?a.enable(3089):a.disable(3089),l.scissor_enable=Tr),Rr=he[0],Br=he[1],oi=he[2],vi=he[3],(Rr!==te[0]||Br!==te[1]||oi!==te[2]||vi!==te[3])&&(a.scissor(Rr,Br,oi,vi),te[0]=Rr,te[1]=Br,te[2]=oi,te[3]=vi),Pi=ke[0],Yr=ke[1],Ni=ke[2],Ur=ke[3],(Pi!==Ee[0]||Yr!==Ee[1]||Ni!==Ee[2]||Ur!==Ee[3])&&(a.viewport(Pi,Yr,Ni,Ur),Ee[0]=Pi,Ee[1]=Yr,Ee[2]=Ni,Ee[3]=Ur),l.dirty=!1}Tt=l.profile,Tt&&(xt=performance.now(),r.count+=Qe),_t=d.frag,Ct=d.vert,jt=d.program(Ct,_t),a.useProgram(jt.program),x.setVAO(null),At=jt.id,Te=gt[At],Te?Te.call(this,Pt,Qe):(Te=gt[At]=i(jt),Te.call(this,Pt,Qe)),x.setVAO(null),Tt&&(r.cpuTime+=performance.now()-xt)}}}});var oUe=Se((H1r,aUe)=>{aUe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,E,k,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za){"use strict";var Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la;return Hr=t.gl,na=t.context,go=t.strings,Dn=t.next,un=t.current,Zn=t.draw,Wo=t.elements,Ba=t.buffer,Bo=t.shader,Ea=t.attributes,Ha=t.vao,tn=t.uniforms,Cn=t.framebuffer,Xn=t.extensions,ts=t.timer,Ja=t.isBufferArgs,to=Dn.blend_color,Ri=un.blend_color,an=Dn.blend_equation,cs=un.blend_equation,pa=Dn.blend_func,ln=un.blend_func,ka=Dn.depth_range,va=un.depth_range,bo=Dn.colorMask,Co=un.colorMask,Fi=Dn.polygonOffset_offset,Yn=un.polygonOffset_offset,xa=Dn.sample_coverage,Qi=un.sample_coverage,Nn=Dn.stencil_func,Pn=un.stencil_func,qa=Dn.stencil_opFront,jo=un.stencil_opFront,Vo=Dn.stencil_opBack,Pa=un.stencil_opBack,Oa=Dn.scissor_box,co=un.scissor_box,An=Dn.viewport,_o=un.viewport,ks={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},bs={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ps={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},sa={add:32774,subtract:32778,"reverse subtract":32779},Bn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ms={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},ya={cw:2304,ccw:2305},on={},mn={},Ga=new Float32Array(16),ca=new Float32Array(16),bn=new Float32Array(16),Xi=new Float32Array(16),qn=new Float32Array(16),Ia=new Float32Array(16),yn=new Float32Array(16),Ya=new Float32Array(16),ba=new Float32Array(16),Da=new Float32Array(16),Aa=new Float32Array(16),Ln=new Float32Array(16),wo=new Float32Array(16),wa=new Float32Array(16),$i=new Float32Array(16),ea=new Float32Array(16),Sa=new Float32Array(16),Za=new Float32Array(16),xo=new Float32Array(16),Wa=new Float32Array(16),hn=new Float32Array(16),Un=new Float32Array(16),Ss=new Float32Array(16),Kn=new Float32Array(16),ns=new Float32Array(16),Jo=new Float32Array(16),vo=new Float32Array(16),ma=new Float32Array(16),ja=new Float32Array(16),To=new Float32Array(16),Ao=new Float32Array(16),la=new Float32Array(16),{draw:function(Ki){var ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs;if(ho=Cn.next,ho!==Cn.cur&&(ho?Hr.bindFramebuffer(36160,ho.framebuffer):Hr.bindFramebuffer(36160,null),Cn.cur=ho),un.dirty){var Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt;Fo=bo[0],Ys=bo[1],Gs=bo[2],Us=bo[3],(Fo!==Co[0]||Ys!==Co[1]||Gs!==Co[2]||Us!==Co[3])&&(Hr.colorMask(Fo,Ys,Gs,Us),Co[0]=Fo,Co[1]=Ys,Co[2]=Gs,Co[3]=Us),Sl=Dn.frontFace,Sl!==un.frontFace&&(Hr.frontFace(Sl),un.frontFace=Sl),_l=Dn.polygonOffset_enable,_l!==un.polygonOffset_enable&&(_l?Hr.enable(32823):Hr.disable(32823),un.polygonOffset_enable=_l),kl=Fi[0],cl=Fi[1],(kl!==Yn[0]||cl!==Yn[1])&&(Hr.polygonOffset(kl,cl),Yn[0]=kl,Yn[1]=cl),xl=Dn.sample_alpha,xl!==un.sample_alpha&&(xl?Hr.enable(32926):Hr.disable(32926),un.sample_alpha=xl),Uo=Dn.sample_enable,Uo!==un.sample_enable&&(Uo?Hr.enable(32928):Hr.disable(32928),un.sample_enable=Uo),_s=xa[0],Bl=xa[1],(_s!==Qi[0]||Bl!==Qi[1])&&(Hr.sampleCoverage(_s,Bl),Qi[0]=_s,Qi[1]=Bl),Il=Dn.stencil_enable,Il!==un.stencil_enable&&(Il?Hr.enable(2960):Hr.disable(2960),un.stencil_enable=Il),Dl=Dn.stencil_mask,Dl!==un.stencil_mask&&(Hr.stencilMask(Dl),un.stencil_mask=Dl),oe=Nn[0],w=Nn[1],B=Nn[2],(oe!==Pn[0]||w!==Pn[1]||B!==Pn[2])&&(Hr.stencilFunc(oe,w,B),Pn[0]=oe,Pn[1]=w,Pn[2]=B),Q=qa[0],ee=qa[1],le=qa[2],Ne=qa[3],(Q!==jo[0]||ee!==jo[1]||le!==jo[2]||Ne!==jo[3])&&(Hr.stencilOpSeparate(Q,ee,le,Ne),jo[0]=Q,jo[1]=ee,jo[2]=le,jo[3]=Ne),$e=Vo[0],pt=Vo[1],zt=Vo[2],Yt=Vo[3],($e!==Pa[0]||pt!==Pa[1]||zt!==Pa[2]||Yt!==Pa[3])&&(Hr.stencilOpSeparate($e,pt,zt,Yt),Pa[0]=$e,Pa[1]=pt,Pa[2]=zt,Pa[3]=Yt)}Ka=Ki.viewportX,on.x=Ka,Ca=Ki.viewportY,on.y=Ca,ta=Ki.viewportWidth,on.width=ta,En=Ki.viewportHeight,on.height=En,Mo=on.x|0,Ds=on.y|0,Ro="width"in on?on.width|0:na.framebufferWidth-Mo,vs="height"in on?on.height|0:na.framebufferHeight-Ds,Ks=na.viewportWidth,na.viewportWidth=Ro,as=na.viewportHeight,na.viewportHeight=vs,Hr.viewport(Mo,Ds,Ro,vs),_o[0]=Mo,_o[1]=Ds,_o[2]=Ro,_o[3]=vs,Hr.blendColor(0,0,0,0),Ri[0]=0,Ri[1]=0,Ri[2]=0,Ri[3]=0,n?Hr.enable(3042):Hr.disable(3042),un.blend_enable=n,Hr.blendEquationSeparate(32774,32774),cs[0]=32774,cs[1]=32774,Hr.blendFuncSeparate(770,771,1,1),ln[0]=770,ln[1]=771,ln[2]=1,ln[3]=1,i?Hr.enable(2884):Hr.disable(2884),un.cull_enable=i,Hr.cullFace(a),un.cull_face=a,o?Hr.enable(2929):Hr.disable(2929),un.depth_enable=o,Hr.depthFunc(s),un.depth_func=s,Hr.depthMask(u),un.depth_mask=u,Hr.depthRange(0,1),va[0]=0,va[1]=1,l?Hr.enable(3024):Hr.disable(3024),un.dither=l,Hr.lineWidth(f),un.lineWidth=f,Jn=Ki.scissorX,mn.x=Jn,Cs=Ki.scissorY,mn.y=Cs,Xa=Ki.scissorWidth,mn.width=Xa,Zo=Ki.scissorHeight,mn.height=Zo,Eo=mn.x|0,lo=mn.y|0,$a="width"in mn?mn.width|0:na.framebufferWidth-Eo,Xo="height"in mn?mn.height|0:na.framebufferHeight-lo,Hr.scissor(Eo,lo,$a,Xo),co[0]=Eo,co[1]=lo,co[2]=$a,co[3]=Xo,c?Hr.enable(3089):Hr.disable(3089),un.scissor_enable=c,rs=un.profile,un.profile=!1,Hr.useProgram(h.program),Ha.setVAO(null),$n=p.location,Sn=Ea[$n],Sn.buffer||Hr.enableVertexAttribArray($n),(Sn.type!==d.dtype||Sn.size!==4||Sn.buffer!==d||Sn.normalized!==!1||Sn.offset!==0||Sn.stride!==0)&&(Hr.bindBuffer(34962,d.buffer),Hr.vertexAttribPointer($n,4,d.dtype,!1,0,0),Sn.type=d.dtype,Sn.size=4,Sn.buffer=d,Sn.normalized=!1,Sn.offset=0,Sn.stride=0),uo=b.location,Rs=Ea[uo],Rs.buffer||Hr.enableVertexAttribArray(uo),(Rs.type!==x.dtype||Rs.size!==4||Rs.buffer!==x||Rs.normalized!==!1||Rs.offset!==0||Rs.stride!==0)&&(Hr.bindBuffer(34962,x.buffer),Hr.vertexAttribPointer(uo,4,x.dtype,!1,0,0),Rs.type=x.dtype,Rs.size=4,Rs.buffer=x,Rs.normalized=!1,Rs.offset=0,Rs.stride=0),xs=E.location,Go=Ea[xs],Go.buffer||Hr.enableVertexAttribArray(xs),(Go.type!==y.dtype||Go.size!==4||Go.buffer!==y||Go.normalized!==!1||Go.offset!==0||Go.stride!==0)&&(Hr.bindBuffer(34962,y.buffer),Hr.vertexAttribPointer(xs,4,y.dtype,!1,0,0),Go.type=y.dtype,Go.size=4,Go.buffer=y,Go.normalized=!1,Go.offset=0,Go.stride=0),os=A.location,So=Ea[os],So.buffer||Hr.enableVertexAttribArray(os),(So.type!==k.dtype||So.size!==4||So.buffer!==k||So.normalized!==!1||So.offset!==0||So.stride!==0)&&(Hr.bindBuffer(34962,k.buffer),Hr.vertexAttribPointer(os,4,k.dtype,!1,0,0),So.type=k.dtype,So.size=4,So.buffer=k,So.normalized=!1,So.offset=0,So.stride=0),Qn=_.location,zo=Ea[Qn],zo.buffer||Hr.enableVertexAttribArray(Qn),(zo.type!==L.dtype||zo.size!==4||zo.buffer!==L||zo.normalized!==!1||zo.offset!==0||zo.stride!==0)&&(Hr.bindBuffer(34962,L.buffer),Hr.vertexAttribPointer(Qn,4,L.dtype,!1,0,0),zo.type=L.dtype,zo.size=4,zo.buffer=L,zo.normalized=!1,zo.offset=0,zo.stride=0),rl=M.location,$o=Ea[rl],$o.buffer||Hr.enableVertexAttribArray(rl),($o.type!==C.dtype||$o.size!==4||$o.buffer!==C||$o.normalized!==!1||$o.offset!==0||$o.stride!==0)&&(Hr.bindBuffer(34962,C.buffer),Hr.vertexAttribPointer(rl,4,C.dtype,!1,0,0),$o.type=C.dtype,$o.size=4,$o.buffer=C,$o.normalized=!1,$o.offset=0,$o.stride=0),Na=z.location,Ua=Ea[Na],Ua.buffer||Hr.enableVertexAttribArray(Na),(Ua.type!==v.dtype||Ua.size!==4||Ua.buffer!==v||Ua.normalized!==!1||Ua.offset!==0||Ua.stride!==0)&&(Hr.bindBuffer(34962,v.buffer),Hr.vertexAttribPointer(Na,4,v.dtype,!1,0,0),Ua.type=v.dtype,Ua.size=4,Ua.buffer=v,Ua.normalized=!1,Ua.offset=0,Ua.stride=0),Po=F.location,fo=Ea[Po],fo.buffer||Hr.enableVertexAttribArray(Po),(fo.type!==T.dtype||fo.size!==4||fo.buffer!==T||fo.normalized!==!1||fo.offset!==0||fo.stride!==0)&&(Hr.bindBuffer(34962,T.buffer),Hr.vertexAttribPointer(Po,4,T.dtype,!1,0,0),fo.type=T.dtype,fo.size=4,fo.buffer=T,fo.normalized=!1,fo.offset=0,fo.stride=0),ro=U.location,Ma=Ea[ro],Ma.buffer||Hr.enableVertexAttribArray(ro),(Ma.type!==q.dtype||Ma.size!==4||Ma.buffer!==q||Ma.normalized!==!1||Ma.offset!==0||Ma.stride!==0)&&(Hr.bindBuffer(34962,q.buffer),Hr.vertexAttribPointer(ro,4,q.dtype,!1,0,0),Ma.type=q.dtype,Ma.size=4,Ma.buffer=q,Ma.normalized=!1,Ma.offset=0,Ma.stride=0),io=j.location,aa=Ea[io],aa.buffer||Hr.enableVertexAttribArray(io),(aa.type!==H.dtype||aa.size!==4||aa.buffer!==H||aa.normalized!==!1||aa.offset!==0||aa.stride!==0)&&(Hr.bindBuffer(34962,H.buffer),Hr.vertexAttribPointer(io,4,H.dtype,!1,0,0),aa.type=H.dtype,aa.size=4,aa.buffer=H,aa.normalized=!1,aa.offset=0,aa.stride=0),Oo=O.location,No=Ea[Oo],No.buffer||Hr.enableVertexAttribArray(Oo),(No.type!==G.dtype||No.size!==4||No.buffer!==G||No.normalized!==!1||No.offset!==0||No.stride!==0)&&(Hr.bindBuffer(34962,G.buffer),Hr.vertexAttribPointer(Oo,4,G.dtype,!1,0,0),No.type=G.dtype,No.size=4,No.buffer=G,No.normalized=!1,No.offset=0,No.stride=0),Zs=re.location,Fs=Ea[Zs],Fs.buffer||Hr.enableVertexAttribArray(Zs),(Fs.type!==W.dtype||Fs.size!==4||Fs.buffer!==W||Fs.normalized!==!1||Fs.offset!==0||Fs.stride!==0)&&(Hr.bindBuffer(34962,W.buffer),Hr.vertexAttribPointer(Zs,4,W.dtype,!1,0,0),Fs.type=W.dtype,Fs.size=4,Fs.buffer=W,Fs.normalized=!1,Fs.offset=0,Fs.stride=0),ws=be.location,no=Ea[ws],no.buffer||Hr.enableVertexAttribArray(ws),(no.type!==ne.dtype||no.size!==4||no.buffer!==ne||no.normalized!==!1||no.offset!==0||no.stride!==0)&&(Hr.bindBuffer(34962,ne.buffer),Hr.vertexAttribPointer(ws,4,ne.dtype,!1,0,0),no.type=ne.dtype,no.size=4,no.buffer=ne,no.normalized=!1,no.offset=0,no.stride=0),Ls=Ce.location,ds=Ea[Ls],ds.buffer||Hr.enableVertexAttribArray(Ls),(ds.type!==ze.dtype||ds.size!==4||ds.buffer!==ze||ds.normalized!==!1||ds.offset!==0||ds.stride!==0)&&(Hr.bindBuffer(34962,ze.buffer),Hr.vertexAttribPointer(Ls,4,ze.dtype,!1,0,0),ds.type=ze.dtype,ds.size=4,ds.buffer=ze,ds.normalized=!1,ds.offset=0,ds.stride=0),Xs=te.location,oa=Ea[Xs],oa.buffer||Hr.enableVertexAttribArray(Xs),(oa.type!==he.dtype||oa.size!==4||oa.buffer!==he||oa.normalized!==!1||oa.offset!==0||oa.stride!==0)&&(Hr.bindBuffer(34962,he.buffer),Hr.vertexAttribPointer(Xs,4,he.dtype,!1,0,0),oa.type=he.dtype,oa.size=4,oa.buffer=he,oa.normalized=!1,oa.offset=0,oa.stride=0),Yo=Ee.location,po=Ea[Yo],po.buffer||Hr.enableVertexAttribArray(Yo),(po.type!==ke.dtype||po.size!==4||po.buffer!==ke||po.normalized!==!1||po.offset!==0||po.stride!==0)&&(Hr.bindBuffer(34962,ke.buffer),Hr.vertexAttribPointer(Yo,4,ke.dtype,!1,0,0),po.type=ke.dtype,po.size=4,po.buffer=ke,po.normalized=!1,po.offset=0,po.stride=0),ss=Ki.contextColor,ls=ss[0],gs=ss[1],bt=ss[2],Ft=ss[3],Hr.uniform4f(Me.location,ls,gs,bt,Ft),hr=Ki.dim0A,Hr.uniformMatrix4fv(Oe.location,!1,Array.isArray(hr)||hr instanceof Float32Array?hr:(Ga[0]=hr[0],Ga[1]=hr[1],Ga[2]=hr[2],Ga[3]=hr[3],Ga[4]=hr[4],Ga[5]=hr[5],Ga[6]=hr[6],Ga[7]=hr[7],Ga[8]=hr[8],Ga[9]=hr[9],Ga[10]=hr[10],Ga[11]=hr[11],Ga[12]=hr[12],Ga[13]=hr[13],Ga[14]=hr[14],Ga[15]=hr[15],Ga)),nr=Ki.dim0B,Hr.uniformMatrix4fv(Re.location,!1,Array.isArray(nr)||nr instanceof Float32Array?nr:(ca[0]=nr[0],ca[1]=nr[1],ca[2]=nr[2],ca[3]=nr[3],ca[4]=nr[4],ca[5]=nr[5],ca[6]=nr[6],ca[7]=nr[7],ca[8]=nr[8],ca[9]=nr[9],ca[10]=nr[10],ca[11]=nr[11],ca[12]=nr[12],ca[13]=nr[13],ca[14]=nr[14],ca[15]=nr[15],ca)),Sr=Ki.dim0C,Hr.uniformMatrix4fv(me.location,!1,Array.isArray(Sr)||Sr instanceof Float32Array?Sr:(bn[0]=Sr[0],bn[1]=Sr[1],bn[2]=Sr[2],bn[3]=Sr[3],bn[4]=Sr[4],bn[5]=Sr[5],bn[6]=Sr[6],bn[7]=Sr[7],bn[8]=Sr[8],bn[9]=Sr[9],bn[10]=Sr[10],bn[11]=Sr[11],bn[12]=Sr[12],bn[13]=Sr[13],bn[14]=Sr[14],bn[15]=Sr[15],bn)),li=Ki.dim0D,Hr.uniformMatrix4fv(Be.location,!1,Array.isArray(li)||li instanceof Float32Array?li:(Xi[0]=li[0],Xi[1]=li[1],Xi[2]=li[2],Xi[3]=li[3],Xi[4]=li[4],Xi[5]=li[5],Xi[6]=li[6],Xi[7]=li[7],Xi[8]=li[8],Xi[9]=li[9],Xi[10]=li[10],Xi[11]=li[11],Xi[12]=li[12],Xi[13]=li[13],Xi[14]=li[14],Xi[15]=li[15],Xi)),di=Ki.dim1A,Hr.uniformMatrix4fv(fe.location,!1,Array.isArray(di)||di instanceof Float32Array?di:(qn[0]=di[0],qn[1]=di[1],qn[2]=di[2],qn[3]=di[3],qn[4]=di[4],qn[5]=di[5],qn[6]=di[6],qn[7]=di[7],qn[8]=di[8],qn[9]=di[9],qn[10]=di[10],qn[11]=di[11],qn[12]=di[12],qn[13]=di[13],qn[14]=di[14],qn[15]=di[15],qn)),mi=Ki.dim1B,Hr.uniformMatrix4fv(Ze.location,!1,Array.isArray(mi)||mi instanceof Float32Array?mi:(Ia[0]=mi[0],Ia[1]=mi[1],Ia[2]=mi[2],Ia[3]=mi[3],Ia[4]=mi[4],Ia[5]=mi[5],Ia[6]=mi[6],Ia[7]=mi[7],Ia[8]=mi[8],Ia[9]=mi[9],Ia[10]=mi[10],Ia[11]=mi[11],Ia[12]=mi[12],Ia[13]=mi[13],Ia[14]=mi[14],Ia[15]=mi[15],Ia)),Oi=Ki.dim1C,Hr.uniformMatrix4fv(et.location,!1,Array.isArray(Oi)||Oi instanceof Float32Array?Oi:(yn[0]=Oi[0],yn[1]=Oi[1],yn[2]=Oi[2],yn[3]=Oi[3],yn[4]=Oi[4],yn[5]=Oi[5],yn[6]=Oi[6],yn[7]=Oi[7],yn[8]=Oi[8],yn[9]=Oi[9],yn[10]=Oi[10],yn[11]=Oi[11],yn[12]=Oi[12],yn[13]=Oi[13],yn[14]=Oi[14],yn[15]=Oi[15],yn)),dn=Ki.dim1D,Hr.uniformMatrix4fv(gt.location,!1,Array.isArray(dn)||dn instanceof Float32Array?dn:(Ya[0]=dn[0],Ya[1]=dn[1],Ya[2]=dn[2],Ya[3]=dn[3],Ya[4]=dn[4],Ya[5]=dn[5],Ya[6]=dn[6],Ya[7]=dn[7],Ya[8]=dn[8],Ya[9]=dn[9],Ya[10]=dn[10],Ya[11]=dn[11],Ya[12]=dn[12],Ya[13]=dn[13],Ya[14]=dn[14],Ya[15]=dn[15],Ya)),wi=Ki.drwLayer,Hr.uniform1f(Pt.location,wi),ui=Ki.hiA,Hr.uniformMatrix4fv(Qe.location,!1,Array.isArray(ui)||ui instanceof Float32Array?ui:(ba[0]=ui[0],ba[1]=ui[1],ba[2]=ui[2],ba[3]=ui[3],ba[4]=ui[4],ba[5]=ui[5],ba[6]=ui[6],ba[7]=ui[7],ba[8]=ui[8],ba[9]=ui[9],ba[10]=ui[10],ba[11]=ui[11],ba[12]=ui[12],ba[13]=ui[13],ba[14]=ui[14],ba[15]=ui[15],ba)),Ai=Ki.hiB,Hr.uniformMatrix4fv(Xe.location,!1,Array.isArray(Ai)||Ai instanceof Float32Array?Ai:(Da[0]=Ai[0],Da[1]=Ai[1],Da[2]=Ai[2],Da[3]=Ai[3],Da[4]=Ai[4],Da[5]=Ai[5],Da[6]=Ai[6],Da[7]=Ai[7],Da[8]=Ai[8],Da[9]=Ai[9],Da[10]=Ai[10],Da[11]=Ai[11],Da[12]=Ai[12],Da[13]=Ai[13],Da[14]=Ai[14],Da[15]=Ai[15],Da)),gi=Ki.hiC,Hr.uniformMatrix4fv(Tt.location,!1,Array.isArray(gi)||gi instanceof Float32Array?gi:(Aa[0]=gi[0],Aa[1]=gi[1],Aa[2]=gi[2],Aa[3]=gi[3],Aa[4]=gi[4],Aa[5]=gi[5],Aa[6]=gi[6],Aa[7]=gi[7],Aa[8]=gi[8],Aa[9]=gi[9],Aa[10]=gi[10],Aa[11]=gi[11],Aa[12]=gi[12],Aa[13]=gi[13],Aa[14]=gi[14],Aa[15]=gi[15],Aa)),gn=Ki.hiD,Hr.uniformMatrix4fv(xt.location,!1,Array.isArray(gn)||gn instanceof Float32Array?gn:(Ln[0]=gn[0],Ln[1]=gn[1],Ln[2]=gn[2],Ln[3]=gn[3],Ln[4]=gn[4],Ln[5]=gn[5],Ln[6]=gn[6],Ln[7]=gn[7],Ln[8]=gn[8],Ln[9]=gn[9],Ln[10]=gn[10],Ln[11]=gn[11],Ln[12]=gn[12],Ln[13]=gn[13],Ln[14]=gn[14],Ln[15]=gn[15],Ln)),In=Ki.loA,Hr.uniformMatrix4fv(_t.location,!1,Array.isArray(In)||In instanceof Float32Array?In:(wo[0]=In[0],wo[1]=In[1],wo[2]=In[2],wo[3]=In[3],wo[4]=In[4],wo[5]=In[5],wo[6]=In[6],wo[7]=In[7],wo[8]=In[8],wo[9]=In[9],wo[10]=In[10],wo[11]=In[11],wo[12]=In[12],wo[13]=In[13],wo[14]=In[14],wo[15]=In[15],wo)),Vn=Ki.loB,Hr.uniformMatrix4fv(Ct.location,!1,Array.isArray(Vn)||Vn instanceof Float32Array?Vn:(wa[0]=Vn[0],wa[1]=Vn[1],wa[2]=Vn[2],wa[3]=Vn[3],wa[4]=Vn[4],wa[5]=Vn[5],wa[6]=Vn[6],wa[7]=Vn[7],wa[8]=Vn[8],wa[9]=Vn[9],wa[10]=Vn[10],wa[11]=Vn[11],wa[12]=Vn[12],wa[13]=Vn[13],wa[14]=Vn[14],wa[15]=Vn[15],wa)),Rn=Ki.loC,Hr.uniformMatrix4fv(jt.location,!1,Array.isArray(Rn)||Rn instanceof Float32Array?Rn:($i[0]=Rn[0],$i[1]=Rn[1],$i[2]=Rn[2],$i[3]=Rn[3],$i[4]=Rn[4],$i[5]=Rn[5],$i[6]=Rn[6],$i[7]=Rn[7],$i[8]=Rn[8],$i[9]=Rn[9],$i[10]=Rn[10],$i[11]=Rn[11],$i[12]=Rn[12],$i[13]=Rn[13],$i[14]=Rn[14],$i[15]=Rn[15],$i)),Hn=Ki.loD,Hr.uniformMatrix4fv(At.location,!1,Array.isArray(Hn)||Hn instanceof Float32Array?Hn:(ea[0]=Hn[0],ea[1]=Hn[1],ea[2]=Hn[2],ea[3]=Hn[3],ea[4]=Hn[4],ea[5]=Hn[5],ea[6]=Hn[6],ea[7]=Hn[7],ea[8]=Hn[8],ea[9]=Hn[9],ea[10]=Hn[10],ea[11]=Hn[11],ea[12]=Hn[12],ea[13]=Hn[13],ea[14]=Hn[14],ea[15]=Hn[15],ea)),Gn=Ki.maskHeight,Hr.uniform1f(Te.location,Gn),pn=Ki.maskTexture,pn&&pn._reglType==="framebuffer"&&(pn=pn.color[0]),Lo=pn._texture,Hr.uniform1i(nt.location,Lo.bind()),Hr.uniform1i(ut.location,ct.bind()),us=Ki.resolution,Bs=us[0],Js=us[1],Hr.uniform2f(rt.location,Bs,Js),ol=Ki.viewBoxPos,Cl=ol[0],ul=ol[1],Hr.uniform2f(je.location,Cl,ul),Gl=Ki.viewBoxSize,Vl=Gl[0],Fl=Gl[1],Hr.uniform2f(tt.location,Vl,Fl),ga=Zn.elements,ga?Hr.bindBuffer(34963,ga.buffer.buffer):Ha.currentVAO&&(ga=Wo.getElements(Ha.currentVAO.elements),ga&&Hr.bindBuffer(34963,ga.buffer.buffer)),ko=Ki.offset,zs=Ki.count,zs&&(ga?Hr.drawElements(1,zs,ga.type,ko<<(ga.type-5121>>1)):Hr.drawArrays(1,ko,zs),un.dirty=!0,Ha.setVAO(null),na.viewportWidth=Ks,na.viewportHeight=as,un.profile=rs,Lo.unbind(),ct.unbind())},scope:function(Ki,ho,Ka){var Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf,hf,dc,Gt,jr,_i,Mn,Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn,La,Es,Ws,Qo,bl,nl,ru,hs,Ho,ql,yl,tl,js,zl,lu,bu,al,jl,mu,Tu,Ru,Rf,Cc,rf,Lc,wf,pc,vc,qc,If,Ac,zc,Vu,Bc,Ou,Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It,Qt,ar,mr,Pr,Dr,Xr,Gr,Fr,Kr,Cr,yi,qi,vn,Qa,ra,mo,sl,Os,eo,fs,es,$s,Ml,Mu,Au,$u,du,Nu,yf,Kf,wd,Td;Ca=Ki.viewportX,on.x=Ca,ta=Ki.viewportY,on.y=ta,En=Ki.viewportWidth,on.width=En,Mo=Ki.viewportHeight,on.height=Mo,Ds=on.x|0,Ro=on.y|0,vs="width"in on?on.width|0:na.framebufferWidth-Ds,Ks="height"in on?on.height|0:na.framebufferHeight-Ro,as=na.viewportWidth,na.viewportWidth=vs,Jn=na.viewportHeight,na.viewportHeight=Ks,Cs=An[0],An[0]=Ds,Xa=An[1],An[1]=Ro,Zo=An[2],An[2]=vs,Eo=An[3],An[3]=Ks,lo=to[0],to[0]=Je,$a=to[1],to[1]=Mt,Xo=to[2],to[2]=Vt,rs=to[3],to[3]=Kt,$n=Dn.blend_enable,Dn.blend_enable=ir,Sn=an[0],an[0]=fr,uo=an[1],an[1]=Ot,Rs=pa[0],pa[0]=De,xs=pa[1],pa[1]=_e,Go=pa[2],pa[2]=Fe,os=pa[3],pa[3]=Pe,So=Dn.cull_enable,Dn.cull_enable=Ie,Qn=Dn.cull_face,Dn.cull_face=lt,zo=Dn.depth_enable,Dn.depth_enable=ye,rl=Dn.depth_func,Dn.depth_func=ue,$o=Dn.depth_mask,Dn.depth_mask=de,Na=ka[0],ka[0]=ht,Ua=ka[1],ka[1]=Et,Po=Dn.dither,Dn.dither=St,fo=Dn.lineWidth,Dn.lineWidth=Zt,ro=Ki.scissorX,mn.x=ro,Ma=Ki.scissorY,mn.y=Ma,io=Ki.scissorWidth,mn.width=io,aa=Ki.scissorHeight,mn.height=aa,Oo=mn.x|0,No=mn.y|0,Zs="width"in mn?mn.width|0:na.framebufferWidth-Oo,Fs="height"in mn?mn.height|0:na.framebufferHeight-No,ws=Oa[0],Oa[0]=Oo,no=Oa[1],Oa[1]=No,Ls=Oa[2],Oa[2]=Zs,ds=Oa[3],Oa[3]=Fs,Xs=Dn.scissor_enable,Dn.scissor_enable=qr,oa=un.profile,un.profile=!1,Yo=Ki.offset,po=Zn.offset,Zn.offset=Yo,ss=Ki.count,ls=Zn.count,Zn.count=ss,gs=Zn.primitive,Zn.primitive=Lr,bt=tn[Er],tn[Er]=vr,Ft=Ki.resolution,hr=tn[si],tn[si]=Ft,nr=Ki.viewBoxPos,Sr=tn[Ei],tn[Ei]=nr,li=Ki.viewBoxSize,di=tn[Si],tn[Si]=li,mi=Ki.dim0A,Oi=tn[xi],tn[xi]=mi,dn=Ki.dim1A,wi=tn[Hi],tn[Hi]=dn,ui=Ki.dim0B,Ai=tn[Jr],tn[Jr]=ui,gi=Ki.dim1B,gn=tn[ci],tn[ci]=gi,In=Ki.dim0C,Vn=tn[Di],tn[Di]=In,Rn=Ki.dim1C,Hn=tn[Lt],tn[Lt]=Rn,Gn=Ki.dim0D,pn=tn[vt],tn[vt]=Gn,Lo=Ki.dim1D,us=tn[Dt],tn[Dt]=Lo,Bs=Ki.loA,Js=tn[Bt],tn[Bt]=Bs,ol=Ki.hiA,Cl=tn[sr],tn[sr]=ol,ul=Ki.loB,Gl=tn[br],tn[br]=ul,Vl=Ki.hiB,Fl=tn[zr],tn[zr]=Vl,ga=Ki.loC,ko=tn[Tr],tn[Tr]=ga,zs=Ki.hiC,Fo=tn[Rr],tn[Rr]=zs,Ys=Ki.loD,Gs=tn[Br],tn[Br]=Ys,Us=Ki.hiD,Sl=tn[oi],tn[oi]=Us,_l=Ki.contextColor,kl=tn[vi],tn[vi]=_l,cl=Ki.maskTexture,xl=tn[Pi],tn[Pi]=cl,Uo=Ki.drwLayer,_s=tn[Yr],tn[Yr]=Uo,Bl=Ki.maskHeight,Il=tn[Ni],tn[Ni]=Bl,Dl=Ur.state,Ur.state=1,oe=Ur.x,Ur.x=0,w=Ur.y,Ur.y=0,B=Ur.z,Ur.z=0,Q=Ur.w,Ur.w=0,ee=Ur.buffer,Ur.buffer=x,le=Ur.size,Ur.size=0,Ne=Ur.normalized,Ur.normalized=!1,$e=Ur.type,Ur.type=x.dtype,pt=Ur.offset,Ur.offset=0,zt=Ur.stride,Ur.stride=0,Yt=Ur.divisor,Ur.divisor=0,Jt=ti.state,ti.state=1,yr=ti.x,ti.x=0,Ir=ti.y,ti.y=0,ce=ti.z,ti.z=0,Ae=ti.w,ti.w=0,qe=ti.buffer,ti.buffer=y,Ve=ti.size,ti.size=0,ot=ti.normalized,ti.normalized=!1,Ke=ti.type,ti.type=y.dtype,ft=ti.offset,ti.offset=0,qt=ti.stride,ti.stride=0,Xt=ti.divisor,ti.divisor=0,$t=ki.state,ki.state=1,dr=ki.x,ki.x=0,Mr=ki.y,ki.y=0,$r=ki.z,ki.z=0,ii=ki.w,ki.w=0,pi=ki.buffer,ki.buffer=k,Yi=ki.size,ki.size=0,wn=ki.normalized,ki.normalized=!1,Tn=ki.type,ki.type=k.dtype,ua=ki.offset,ki.offset=0,oo=ki.stride,ki.stride=0,el=ki.divisor,ki.divisor=0,ys=ji.state,ji.state=1,il=ji.x,ji.x=0,$l=ji.y,ji.y=0,pl=ji.z,ji.z=0,Hl=ji.w,ji.w=0,Ll=ji.buffer,ji.buffer=L,Ql=ji.size,ji.size=0,ku=ji.normalized,ji.normalized=!1,Jl=ji.type,ji.type=L.dtype,Kl=ji.offset,ji.offset=0,Hu=ji.stride,ji.stride=0,tf=ji.divisor,ji.divisor=0,Ku=Vi.state,Vi.state=1,Gu=Vi.x,Vi.x=0,Wu=Vi.y,Vi.y=0,sf=Vi.z,Vi.z=0,gf=Vi.w,Vi.w=0,nf=Vi.buffer,Vi.buffer=C,af=Vi.size,Vi.size=0,X=Vi.normalized,Vi.normalized=!1,se=Vi.type,Vi.type=C.dtype,Le=Vi.offset,Vi.offset=0,We=Vi.stride,Vi.stride=0,Ye=Vi.divisor,Vi.divisor=0,it=zi.state,zi.state=1,Nt=zi.x,zi.x=0,mt=zi.y,zi.y=0,er=zi.z,zi.z=0,_r=zi.w,zi.w=0,wr=zi.buffer,zi.buffer=v,ni=zi.size,zi.size=0,Wr=zi.normalized,zi.normalized=!1,Ci=zi.type,zi.type=v.dtype,Ji=zi.offset,zi.offset=0,ai=zi.stride,zi.stride=0,Ti=zi.divisor,zi.divisor=0,Bi=Mi.state,Mi.state=1,en=Mi.x,Mi.x=0,Wi=Mi.y,Mi.y=0,bi=Mi.z,Mi.z=0,ao=Mi.w,Mi.w=0,yo=Mi.buffer,Mi.buffer=T,Ko=Mi.size,Mi.size=0,Ms=Mi.normalized,Mi.normalized=!1,vl=Mi.type,Mi.type=T.dtype,wl=Mi.offset,Mi.offset=0,au=Mi.stride,Mi.stride=0,Al=Mi.divisor,Mi.divisor=0,nu=sn.state,sn.state=1,Bu=sn.x,sn.x=0,qu=sn.y,sn.y=0,Ju=sn.z,sn.z=0,qo=sn.w,sn.w=0,Rl=sn.buffer,sn.buffer=q,pu=sn.size,sn.size=0,xu=sn.normalized,sn.normalized=!1,of=sn.type,sn.type=q.dtype,ff=sn.offset,sn.offset=0,xf=sn.stride,sn.stride=0,hf=sn.divisor,sn.divisor=0,dc=fi.state,fi.state=1,Gt=fi.x,fi.x=0,jr=fi.y,fi.y=0,_i=fi.z,fi.z=0,Mn=fi.w,fi.w=0,Ta=fi.buffer,fi.buffer=H,fa=fi.size,fi.size=0,ha=fi.normalized,fi.normalized=!1,Io=fi.type,fi.type=H.dtype,Vs=fi.offset,fi.offset=0,Hs=fi.stride,fi.stride=0,is=fi.divisor,fi.divisor=0,su=Or.state,Or.state=1,Ps=Or.x,Or.x=0,qs=Or.y,Or.y=0,Do=Or.z,Or.z=0,kn=Or.w,Or.w=0,La=Or.buffer,Or.buffer=G,Es=Or.size,Or.size=0,Ws=Or.normalized,Or.normalized=!1,Qo=Or.type,Or.type=G.dtype,bl=Or.offset,Or.offset=0,nl=Or.stride,Or.stride=0,ru=Or.divisor,Or.divisor=0,hs=st.state,st.state=1,Ho=st.x,st.x=0,ql=st.y,st.y=0,yl=st.z,st.z=0,tl=st.w,st.w=0,js=st.buffer,st.buffer=W,zl=st.size,st.size=0,lu=st.normalized,st.normalized=!1,bu=st.type,st.type=W.dtype,al=st.offset,st.offset=0,jl=st.stride,st.stride=0,mu=st.divisor,st.divisor=0,Tu=Wt.state,Wt.state=1,Ru=Wt.x,Wt.x=0,Rf=Wt.y,Wt.y=0,Cc=Wt.z,Wt.z=0,rf=Wt.w,Wt.w=0,Lc=Wt.buffer,Wt.buffer=ne,wf=Wt.size,Wt.size=0,pc=Wt.normalized,Wt.normalized=!1,vc=Wt.type,Wt.type=ne.dtype,qc=Wt.offset,Wt.offset=0,If=Wt.stride,Wt.stride=0,Ac=Wt.divisor,Wt.divisor=0,zc=tr.state,tr.state=1,Vu=tr.x,tr.x=0,Bc=tr.y,tr.y=0,Ou=tr.z,tr.z=0,Y=tr.w,tr.w=0,R=tr.buffer,tr.buffer=ze,K=tr.size,tr.size=0,N=tr.normalized,tr.normalized=!1,$=tr.type,tr.type=ze.dtype,we=tr.offset,tr.offset=0,ge=tr.stride,tr.stride=0,Ue=tr.divisor,tr.divisor=0,dt=or.state,or.state=1,Rt=or.x,or.x=0,ur=or.y,or.y=0,gr=or.z,or.z=0,cr=or.w,or.w=0,It=or.buffer,or.buffer=he,Qt=or.size,or.size=0,ar=or.normalized,or.normalized=!1,mr=or.type,or.type=he.dtype,Pr=or.offset,or.offset=0,Dr=or.stride,or.stride=0,Xr=or.divisor,or.divisor=0,Gr=Nr.state,Nr.state=1,Fr=Nr.x,Nr.x=0,Kr=Nr.y,Nr.y=0,Cr=Nr.z,Nr.z=0,yi=Nr.w,Nr.w=0,qi=Nr.buffer,Nr.buffer=ke,vn=Nr.size,Nr.size=0,Qa=Nr.normalized,Nr.normalized=!1,ra=Nr.type,Nr.type=ke.dtype,mo=Nr.offset,Nr.offset=0,sl=Nr.stride,Nr.stride=0,Os=Nr.divisor,Nr.divisor=0,eo=hi.state,hi.state=1,fs=hi.x,hi.x=0,es=hi.y,hi.y=0,$s=hi.z,hi.z=0,Ml=hi.w,hi.w=0,Mu=hi.buffer,hi.buffer=d,Au=hi.size,hi.size=0,$u=hi.normalized,hi.normalized=!1,du=hi.type,hi.type=d.dtype,Nu=hi.offset,hi.offset=0,yf=hi.stride,hi.stride=0,Kf=hi.divisor,hi.divisor=0,wd=Bo.vert,Bo.vert=Gi,Td=Bo.frag,Bo.frag=Qr,un.dirty=!0,ho(na,Ki,Ka),na.viewportWidth=as,na.viewportHeight=Jn,An[0]=Cs,An[1]=Xa,An[2]=Zo,An[3]=Eo,to[0]=lo,to[1]=$a,to[2]=Xo,to[3]=rs,Dn.blend_enable=$n,an[0]=Sn,an[1]=uo,pa[0]=Rs,pa[1]=xs,pa[2]=Go,pa[3]=os,Dn.cull_enable=So,Dn.cull_face=Qn,Dn.depth_enable=zo,Dn.depth_func=rl,Dn.depth_mask=$o,ka[0]=Na,ka[1]=Ua,Dn.dither=Po,Dn.lineWidth=fo,Oa[0]=ws,Oa[1]=no,Oa[2]=Ls,Oa[3]=ds,Dn.scissor_enable=Xs,un.profile=oa,Zn.offset=po,Zn.count=ls,Zn.primitive=gs,tn[Er]=bt,tn[si]=hr,tn[Ei]=Sr,tn[Si]=di,tn[xi]=Oi,tn[Hi]=wi,tn[Jr]=Ai,tn[ci]=gn,tn[Di]=Vn,tn[Lt]=Hn,tn[vt]=pn,tn[Dt]=us,tn[Bt]=Js,tn[sr]=Cl,tn[br]=Gl,tn[zr]=Fl,tn[Tr]=ko,tn[Rr]=Fo,tn[Br]=Gs,tn[oi]=Sl,tn[vi]=kl,tn[Pi]=xl,tn[Yr]=_s,tn[Ni]=Il,Ur.state=Dl,Ur.x=oe,Ur.y=w,Ur.z=B,Ur.w=Q,Ur.buffer=ee,Ur.size=le,Ur.normalized=Ne,Ur.type=$e,Ur.offset=pt,Ur.stride=zt,Ur.divisor=Yt,ti.state=Jt,ti.x=yr,ti.y=Ir,ti.z=ce,ti.w=Ae,ti.buffer=qe,ti.size=Ve,ti.normalized=ot,ti.type=Ke,ti.offset=ft,ti.stride=qt,ti.divisor=Xt,ki.state=$t,ki.x=dr,ki.y=Mr,ki.z=$r,ki.w=ii,ki.buffer=pi,ki.size=Yi,ki.normalized=wn,ki.type=Tn,ki.offset=ua,ki.stride=oo,ki.divisor=el,ji.state=ys,ji.x=il,ji.y=$l,ji.z=pl,ji.w=Hl,ji.buffer=Ll,ji.size=Ql,ji.normalized=ku,ji.type=Jl,ji.offset=Kl,ji.stride=Hu,ji.divisor=tf,Vi.state=Ku,Vi.x=Gu,Vi.y=Wu,Vi.z=sf,Vi.w=gf,Vi.buffer=nf,Vi.size=af,Vi.normalized=X,Vi.type=se,Vi.offset=Le,Vi.stride=We,Vi.divisor=Ye,zi.state=it,zi.x=Nt,zi.y=mt,zi.z=er,zi.w=_r,zi.buffer=wr,zi.size=ni,zi.normalized=Wr,zi.type=Ci,zi.offset=Ji,zi.stride=ai,zi.divisor=Ti,Mi.state=Bi,Mi.x=en,Mi.y=Wi,Mi.z=bi,Mi.w=ao,Mi.buffer=yo,Mi.size=Ko,Mi.normalized=Ms,Mi.type=vl,Mi.offset=wl,Mi.stride=au,Mi.divisor=Al,sn.state=nu,sn.x=Bu,sn.y=qu,sn.z=Ju,sn.w=qo,sn.buffer=Rl,sn.size=pu,sn.normalized=xu,sn.type=of,sn.offset=ff,sn.stride=xf,sn.divisor=hf,fi.state=dc,fi.x=Gt,fi.y=jr,fi.z=_i,fi.w=Mn,fi.buffer=Ta,fi.size=fa,fi.normalized=ha,fi.type=Io,fi.offset=Vs,fi.stride=Hs,fi.divisor=is,Or.state=su,Or.x=Ps,Or.y=qs,Or.z=Do,Or.w=kn,Or.buffer=La,Or.size=Es,Or.normalized=Ws,Or.type=Qo,Or.offset=bl,Or.stride=nl,Or.divisor=ru,st.state=hs,st.x=Ho,st.y=ql,st.z=yl,st.w=tl,st.buffer=js,st.size=zl,st.normalized=lu,st.type=bu,st.offset=al,st.stride=jl,st.divisor=mu,Wt.state=Tu,Wt.x=Ru,Wt.y=Rf,Wt.z=Cc,Wt.w=rf,Wt.buffer=Lc,Wt.size=wf,Wt.normalized=pc,Wt.type=vc,Wt.offset=qc,Wt.stride=If,Wt.divisor=Ac,tr.state=zc,tr.x=Vu,tr.y=Bc,tr.z=Ou,tr.w=Y,tr.buffer=R,tr.size=K,tr.normalized=N,tr.type=$,tr.offset=we,tr.stride=ge,tr.divisor=Ue,or.state=dt,or.x=Rt,or.y=ur,or.z=gr,or.w=cr,or.buffer=It,or.size=Qt,or.normalized=ar,or.type=mr,or.offset=Pr,or.stride=Dr,or.divisor=Xr,Nr.state=Gr,Nr.x=Fr,Nr.y=Kr,Nr.z=Cr,Nr.w=yi,Nr.buffer=qi,Nr.size=vn,Nr.normalized=Qa,Nr.type=ra,Nr.offset=mo,Nr.stride=sl,Nr.divisor=Os,hi.state=eo,hi.x=fs,hi.y=es,hi.z=$s,hi.w=Ml,hi.buffer=Mu,hi.size=Au,hi.normalized=$u,hi.type=du,hi.offset=Nu,hi.stride=yf,hi.divisor=Kf,Bo.vert=wd,Bo.frag=Td,un.dirty=!0},batch:function(Ki,ho){var Ka,Ca,ta,En;if(Ka=Cn.next,Ka!==Cn.cur&&(Ka?Hr.bindFramebuffer(36160,Ka.framebuffer):Hr.bindFramebuffer(36160,null),Cn.cur=Ka),un.dirty){var Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo;Mo=bo[0],Ds=bo[1],Ro=bo[2],vs=bo[3],(Mo!==Co[0]||Ds!==Co[1]||Ro!==Co[2]||vs!==Co[3])&&(Hr.colorMask(Mo,Ds,Ro,vs),Co[0]=Mo,Co[1]=Ds,Co[2]=Ro,Co[3]=vs),Ks=Dn.frontFace,Ks!==un.frontFace&&(Hr.frontFace(Ks),un.frontFace=Ks),as=Dn.polygonOffset_enable,as!==un.polygonOffset_enable&&(as?Hr.enable(32823):Hr.disable(32823),un.polygonOffset_enable=as),Jn=Fi[0],Cs=Fi[1],(Jn!==Yn[0]||Cs!==Yn[1])&&(Hr.polygonOffset(Jn,Cs),Yn[0]=Jn,Yn[1]=Cs),Xa=Dn.sample_alpha,Xa!==un.sample_alpha&&(Xa?Hr.enable(32926):Hr.disable(32926),un.sample_alpha=Xa),Zo=Dn.sample_enable,Zo!==un.sample_enable&&(Zo?Hr.enable(32928):Hr.disable(32928),un.sample_enable=Zo),Eo=xa[0],lo=xa[1],(Eo!==Qi[0]||lo!==Qi[1])&&(Hr.sampleCoverage(Eo,lo),Qi[0]=Eo,Qi[1]=lo),$a=Dn.stencil_enable,$a!==un.stencil_enable&&($a?Hr.enable(2960):Hr.disable(2960),un.stencil_enable=$a),Xo=Dn.stencil_mask,Xo!==un.stencil_mask&&(Hr.stencilMask(Xo),un.stencil_mask=Xo),rs=Nn[0],$n=Nn[1],Sn=Nn[2],(rs!==Pn[0]||$n!==Pn[1]||Sn!==Pn[2])&&(Hr.stencilFunc(rs,$n,Sn),Pn[0]=rs,Pn[1]=$n,Pn[2]=Sn),uo=qa[0],Rs=qa[1],xs=qa[2],Go=qa[3],(uo!==jo[0]||Rs!==jo[1]||xs!==jo[2]||Go!==jo[3])&&(Hr.stencilOpSeparate(uo,Rs,xs,Go),jo[0]=uo,jo[1]=Rs,jo[2]=xs,jo[3]=Go),os=Vo[0],So=Vo[1],Qn=Vo[2],zo=Vo[3],(os!==Pa[0]||So!==Pa[1]||Qn!==Pa[2]||zo!==Pa[3])&&(Hr.stencilOpSeparate(os,So,Qn,zo),Pa[0]=os,Pa[1]=So,Pa[2]=Qn,Pa[3]=zo)}Hr.blendColor(0,0,0,0),Ri[0]=0,Ri[1]=0,Ri[2]=0,Ri[3]=0,Ui?Hr.enable(3042):Hr.disable(3042),un.blend_enable=Ui,Hr.blendEquationSeparate(32774,32774),cs[0]=32774,cs[1]=32774,Hr.blendFuncSeparate(770,771,1,1),ln[0]=770,ln[1]=771,ln[2]=1,ln[3]=1,zn?Hr.enable(2884):Hr.disable(2884),un.cull_enable=zn,Hr.cullFace(fn),un.cull_face=fn,xn?Hr.enable(2929):Hr.disable(2929),un.depth_enable=xn,Hr.depthFunc(_a),un.depth_func=_a,Hr.depthMask(Wn),un.depth_mask=Wn,Hr.depthRange(0,1),va[0]=0,va[1]=1,Fn?Hr.enable(3024):Hr.disable(3024),un.dither=Fn,Hr.lineWidth(ia),un.lineWidth=ia,za?Hr.enable(3089):Hr.disable(3089),un.scissor_enable=za,Ca=un.profile,un.profile=!1,Hr.useProgram(h.program);var rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi;for(Ha.setVAO(null),rl=p.location,$o=Ea[rl],$o.buffer||Hr.enableVertexAttribArray(rl),($o.type!==d.dtype||$o.size!==4||$o.buffer!==d||$o.normalized!==!1||$o.offset!==0||$o.stride!==0)&&(Hr.bindBuffer(34962,d.buffer),Hr.vertexAttribPointer(rl,4,d.dtype,!1,0,0),$o.type=d.dtype,$o.size=4,$o.buffer=d,$o.normalized=!1,$o.offset=0,$o.stride=0),Na=b.location,Ua=Ea[Na],Ua.buffer||Hr.enableVertexAttribArray(Na),(Ua.type!==x.dtype||Ua.size!==4||Ua.buffer!==x||Ua.normalized!==!1||Ua.offset!==0||Ua.stride!==0)&&(Hr.bindBuffer(34962,x.buffer),Hr.vertexAttribPointer(Na,4,x.dtype,!1,0,0),Ua.type=x.dtype,Ua.size=4,Ua.buffer=x,Ua.normalized=!1,Ua.offset=0,Ua.stride=0),Po=E.location,fo=Ea[Po],fo.buffer||Hr.enableVertexAttribArray(Po),(fo.type!==y.dtype||fo.size!==4||fo.buffer!==y||fo.normalized!==!1||fo.offset!==0||fo.stride!==0)&&(Hr.bindBuffer(34962,y.buffer),Hr.vertexAttribPointer(Po,4,y.dtype,!1,0,0),fo.type=y.dtype,fo.size=4,fo.buffer=y,fo.normalized=!1,fo.offset=0,fo.stride=0),ro=A.location,Ma=Ea[ro],Ma.buffer||Hr.enableVertexAttribArray(ro),(Ma.type!==k.dtype||Ma.size!==4||Ma.buffer!==k||Ma.normalized!==!1||Ma.offset!==0||Ma.stride!==0)&&(Hr.bindBuffer(34962,k.buffer),Hr.vertexAttribPointer(ro,4,k.dtype,!1,0,0),Ma.type=k.dtype,Ma.size=4,Ma.buffer=k,Ma.normalized=!1,Ma.offset=0,Ma.stride=0),io=_.location,aa=Ea[io],aa.buffer||Hr.enableVertexAttribArray(io),(aa.type!==L.dtype||aa.size!==4||aa.buffer!==L||aa.normalized!==!1||aa.offset!==0||aa.stride!==0)&&(Hr.bindBuffer(34962,L.buffer),Hr.vertexAttribPointer(io,4,L.dtype,!1,0,0),aa.type=L.dtype,aa.size=4,aa.buffer=L,aa.normalized=!1,aa.offset=0,aa.stride=0),Oo=M.location,No=Ea[Oo],No.buffer||Hr.enableVertexAttribArray(Oo),(No.type!==C.dtype||No.size!==4||No.buffer!==C||No.normalized!==!1||No.offset!==0||No.stride!==0)&&(Hr.bindBuffer(34962,C.buffer),Hr.vertexAttribPointer(Oo,4,C.dtype,!1,0,0),No.type=C.dtype,No.size=4,No.buffer=C,No.normalized=!1,No.offset=0,No.stride=0),Zs=z.location,Fs=Ea[Zs],Fs.buffer||Hr.enableVertexAttribArray(Zs),(Fs.type!==v.dtype||Fs.size!==4||Fs.buffer!==v||Fs.normalized!==!1||Fs.offset!==0||Fs.stride!==0)&&(Hr.bindBuffer(34962,v.buffer),Hr.vertexAttribPointer(Zs,4,v.dtype,!1,0,0),Fs.type=v.dtype,Fs.size=4,Fs.buffer=v,Fs.normalized=!1,Fs.offset=0,Fs.stride=0),ws=F.location,no=Ea[ws],no.buffer||Hr.enableVertexAttribArray(ws),(no.type!==T.dtype||no.size!==4||no.buffer!==T||no.normalized!==!1||no.offset!==0||no.stride!==0)&&(Hr.bindBuffer(34962,T.buffer),Hr.vertexAttribPointer(ws,4,T.dtype,!1,0,0),no.type=T.dtype,no.size=4,no.buffer=T,no.normalized=!1,no.offset=0,no.stride=0),Ls=U.location,ds=Ea[Ls],ds.buffer||Hr.enableVertexAttribArray(Ls),(ds.type!==q.dtype||ds.size!==4||ds.buffer!==q||ds.normalized!==!1||ds.offset!==0||ds.stride!==0)&&(Hr.bindBuffer(34962,q.buffer),Hr.vertexAttribPointer(Ls,4,q.dtype,!1,0,0),ds.type=q.dtype,ds.size=4,ds.buffer=q,ds.normalized=!1,ds.offset=0,ds.stride=0),Xs=j.location,oa=Ea[Xs],oa.buffer||Hr.enableVertexAttribArray(Xs),(oa.type!==H.dtype||oa.size!==4||oa.buffer!==H||oa.normalized!==!1||oa.offset!==0||oa.stride!==0)&&(Hr.bindBuffer(34962,H.buffer),Hr.vertexAttribPointer(Xs,4,H.dtype,!1,0,0),oa.type=H.dtype,oa.size=4,oa.buffer=H,oa.normalized=!1,oa.offset=0,oa.stride=0),Yo=O.location,po=Ea[Yo],po.buffer||Hr.enableVertexAttribArray(Yo),(po.type!==G.dtype||po.size!==4||po.buffer!==G||po.normalized!==!1||po.offset!==0||po.stride!==0)&&(Hr.bindBuffer(34962,G.buffer),Hr.vertexAttribPointer(Yo,4,G.dtype,!1,0,0),po.type=G.dtype,po.size=4,po.buffer=G,po.normalized=!1,po.offset=0,po.stride=0),ss=re.location,ls=Ea[ss],ls.buffer||Hr.enableVertexAttribArray(ss),(ls.type!==W.dtype||ls.size!==4||ls.buffer!==W||ls.normalized!==!1||ls.offset!==0||ls.stride!==0)&&(Hr.bindBuffer(34962,W.buffer),Hr.vertexAttribPointer(ss,4,W.dtype,!1,0,0),ls.type=W.dtype,ls.size=4,ls.buffer=W,ls.normalized=!1,ls.offset=0,ls.stride=0),gs=be.location,bt=Ea[gs],bt.buffer||Hr.enableVertexAttribArray(gs),(bt.type!==ne.dtype||bt.size!==4||bt.buffer!==ne||bt.normalized!==!1||bt.offset!==0||bt.stride!==0)&&(Hr.bindBuffer(34962,ne.buffer),Hr.vertexAttribPointer(gs,4,ne.dtype,!1,0,0),bt.type=ne.dtype,bt.size=4,bt.buffer=ne,bt.normalized=!1,bt.offset=0,bt.stride=0),Ft=Ce.location,hr=Ea[Ft],hr.buffer||Hr.enableVertexAttribArray(Ft),(hr.type!==ze.dtype||hr.size!==4||hr.buffer!==ze||hr.normalized!==!1||hr.offset!==0||hr.stride!==0)&&(Hr.bindBuffer(34962,ze.buffer),Hr.vertexAttribPointer(Ft,4,ze.dtype,!1,0,0),hr.type=ze.dtype,hr.size=4,hr.buffer=ze,hr.normalized=!1,hr.offset=0,hr.stride=0),nr=te.location,Sr=Ea[nr],Sr.buffer||Hr.enableVertexAttribArray(nr),(Sr.type!==he.dtype||Sr.size!==4||Sr.buffer!==he||Sr.normalized!==!1||Sr.offset!==0||Sr.stride!==0)&&(Hr.bindBuffer(34962,he.buffer),Hr.vertexAttribPointer(nr,4,he.dtype,!1,0,0),Sr.type=he.dtype,Sr.size=4,Sr.buffer=he,Sr.normalized=!1,Sr.offset=0,Sr.stride=0),li=Ee.location,di=Ea[li],di.buffer||Hr.enableVertexAttribArray(li),(di.type!==ke.dtype||di.size!==4||di.buffer!==ke||di.normalized!==!1||di.offset!==0||di.stride!==0)&&(Hr.bindBuffer(34962,ke.buffer),Hr.vertexAttribPointer(li,4,ke.dtype,!1,0,0),di.type=ke.dtype,di.size=4,di.buffer=ke,di.normalized=!1,di.offset=0,di.stride=0),Hr.uniform1i(ut.location,ct.bind()),mi=Zn.elements,mi?Hr.bindBuffer(34963,mi.buffer.buffer):Ha.currentVAO&&(mi=Wo.getElements(Ha.currentVAO.elements),mi&&Hr.bindBuffer(34963,mi.buffer.buffer)),ta=0;ta>1)):Hr.drawArrays(1,dr,Mr),na.viewportWidth=Vn,na.viewportHeight=Rn,pt.unbind())}ct.unbind(),un.dirty=!0,Ha.setVAO(null),un.profile=Ca}}}});var lUe=Se((G1r,sUe)=>{"use strict";var HVt=eUe(),GVt=rUe(),WVt=nUe(),jVt=oUe();sUe.exports={"453a70fefa48db31713162aeb1ac438cb8579f54504f3b23acf32128df3dfd45":HVt,"30680f8f6712ef1af5cf7547e0af35b036fb300c67b07967cf448492ff4de4d0":GVt,a3970baf1d8cac9305ee830c7026550387343d4dde2353dd86a4d082c97d3470:WVt,"3fd666968f3ce90d1c048b7a9aab515f3ce387a5401a10f8b66121c9469d1c0d":jVt}});var cUe=Se((W1r,fUe)=>{"use strict";var uUe=RK(),ZVt=lUe();Object.assign(uUe.reglPrecompiled,ZVt);fUe.exports=uUe});var pUe=Se((j1r,dUe)=>{"use strict";var hUe=$7e();hUe.plot=cUe();dUe.exports=hUe});var FK=Se((Z1r,gUe)=>{"use strict";var yUe=vu().extendFlat,XVt=zf(),vUe=uc(),YVt=Xf(),mUe=Du().hovertemplateAttrs,KVt=Ec().attributes,JVt=yUe({editType:"calc"},YVt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:mUe({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});gUe.exports={domain:KVt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:yUe({},XVt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:mUe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:vUe({editType:"calc"}),tickfont:vUe({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:JVt,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 bUe=Se((X1r,xUe)=>{"use strict";var _S=Zr(),$Vt=Dp().hasColorscale,QVt=ed(),eHt=Ec().defaults,tHt=Jd(),_Ue=FK(),rHt=P9(),iHt=yp().isTypedArraySpec;function nHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate");var a=i("line.color",n.colorway[0]);if($Vt(e,"line")&&_S.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),QVt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function aHt(e,t){function r(l,f){return _S.coerce(e,t,_Ue.dimensions,l,f)}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=_S.isArrayOrTypedArray(a)&&a.length>0||iHt(a),s;o&&(s="array");var u=r("categoryorder",s);u==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&u==="array"&&(t.categoryorder="trace")}}xUe.exports=function(t,r,n,i){function a(l,f){return _S.coerce(t,r,_Ue,l,f)}var o=tHt(t,r,{name:"dimensions",handleItemDefaults:aHt}),s=nHt(t,r,n,i,a);eHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),rHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var u=i.font;_S.coerceFont(a,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),_S.coerceFont(a,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}});var TUe=Se((Y1r,wUe)=>{"use strict";var oHt=Km().wrap,sHt=Dp().hasColorscale,lHt=Rp(),uHt=eO(),fHt=yu(),Mk=Zr(),cHt=_u();wUe.exports=function(t,r){var n=Mk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(v){var z;if(v.categoryorder==="trace")z=null;else if(v.categoryorder==="array")z=v.categoryarray;else{z=uHt(v.values);for(var T=!0,F=0;F=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var PUe=Se((K1r,zUe)=>{"use strict";var Lf=Nl(),wHt=(I2(),ab(P2)).interpolateNumber,THt=qP(),Ck=jc(),mx=Zr(),Ek=mx.strTranslate,AUe=yu(),qK=cd(),AHt=Bf();function SHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(NHt.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),u=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(E){return Ek(E.x,E.y)}),u.append("g").attr("class","paths");var l=s.select("g.paths"),f=l.selectAll("path.path").data(function(E){return E.paths},u1);f.attr("fill",function(E){return E.model.color});var c=f.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(E){return E.model.color}).attr("fill-opacity",0);NK(c),f.attr("d",function(E){return E.svgD}),c.empty()||f.sort(BK),f.exit().remove(),f.on("mouseover",MHt).on("mouseout",EHt).on("click",kHt),u.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(E){return E.dimensions},u1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(E){return Ek(E.x,0)}),d.exit().remove();var p=d.selectAll("g.category").data(function(E){return E.categories},u1),x=p.enter().append("g").attr("class","category");p.attr("transform",function(E){return Ek(0,E.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),MUe(x);var b=p.selectAll("rect.bandrect").data(function(E){return E.bands},u1);b.each(function(){mx.raiseToTop(this)}),b.attr("fill",function(E){return E.color});var y=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(E){return E.color}).attr("fill-opacity",0);b.attr("fill",function(E){return E.color}).attr("width",function(E){return E.width}).attr("height",function(E){return E.height}).attr("y",function(E){return E.y}).attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":E.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),VK(y),b.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(E){return kk(E)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(E){return kk(E)?E.width+5:-5}).attr("y",function(E){return E.height/2}).text(function(E){return E.model.categoryLabel}).each(function(E){AUe.font(Lf.select(this),E.parcatsViewModel.categorylabelfont),AHt.convertToTspans(Lf.select(this),t)}),x.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(E){return E.width/2}).attr("y",-5).text(function(E,k){return k===0?E.parcatsViewModel.model.dimensions[E.model.dimensionInd].dimensionLabel:null}).each(function(E){AUe.font(Lf.select(this),E.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",RHt).on("mouseout",FHt),p.exit().remove(),d.call(Lf.behavior.drag().origin(function(E){return{x:E.x,y:0}}).on("dragstart",qHt).on("drag",BHt).on("dragend",OHt)),s.each(function(E){E.traceSelection=Lf.select(this),E.pathSelection=Lf.select(this).selectAll("g.paths").selectAll("path.path"),E.dimensionSelection=Lf.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}zUe.exports=function(e,t,r,n){SHt(r,e,n,t)};function u1(e){return e.key}function kk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function BK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),_=Lf.mouse(i)[0];Ck.loneHover({trace:a,x:p-s.left+u.left,y:x-s.top+u.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:_1&&l.displayInd===u.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var p=s.model.count,x=s.model.categoryLabel,b=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:x,probabilityLabel:b.toFixed(3)},E=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&E.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&E.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var k=E.join("
");return{trace:f,x:n*(h-t.left),y:i*(c-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:f.hovertemplate,hovertemplateLabels:y,eventData:[{data:f._input,fullData:f,count:p,category:x,probability:b}]}}function IHt(e,t,r){var n=[];return Lf.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(EUe(e,t,i))}),n}function DHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Lf.select(r).datum(),s=o.categoryViewModel,u=s.parcatsViewModel,l=u.model.dimensions[s.model.dimensionInd],f=u.trace,c=a.y+a.height/2,h,d;u.dimensions.length>1&&l.displayInd===u.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var p=s.model.categoryLabel,x=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(z){z.color===o.color&&(b+=z.count)});var y=s.model.count,E=0;u.pathSelection.each(function(z){z.model.color===o.color&&(E+=z.model.count)});var k=b/x,A=b/E,L=b/y,_={countLabel:b,categoryLabel:p,probabilityLabel:k.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",_.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+p+"): "+_.probabilityLabel),C.push("P("+p+" | color): "+A.toFixed(3)),C.push("P(color | "+p+"): "+L.toFixed(3)));var M=C.join("
"),v=qK.mostReadable(o.color,["black","white"]);return{trace:f,x:n*(h-t.left),y:i*(c-t.top),text:M,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:v,fontSize:10,idealAlign:d,hovertemplate:f.hovertemplate,hovertemplateLabels:_,eventData:[{data:f._input,fullData:f,category:p,count:x,probability:k,categorycount:y,colorcount:E,bandcolorcount:b}]}}function RHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Lf.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"?(PHt(o),GK(o,"plotly_hover",Lf.event)):(zHt(o),HK(o,"plotly_hover",Lf.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=EUe(r,i,o):a==="color"?s=DHt(r,i,o):a==="dimension"&&(s=IHt(r,i,o)),s&&Ck.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function FHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(NK(t.pathSelection),MUe(t.dimensionSelection.selectAll("g.category")),VK(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Ck.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(BK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?GK(n,"plotly_unhover",Lf.event):HK(n,"plotly_unhover",Lf.event)}}function qHt(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,Lf.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Lf.mouse(this)[0],n=Lf.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,mx.raiseToTop(this.parentNode),Lf.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.yf.y+f.height/2&&(a.model.displayInd=f.model.displayInd,f.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Lf.event.x;var c=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];c!==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),WK(e.parcatsViewModel),LUe(e.parcatsViewModel),CUe(e.parcatsViewModel)}}function OHt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Lf.select(this).selectAll("text").attr("font-weight","normal");var t={},r=kUe(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 p=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+p+"].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}),u=s.map(function(h){return h.categoryValue}),l=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[l],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?GK(e.potentialClickBand,"plotly_click",Lf.event.sourceEvent):HK(e.potentialClickBand,"plotly_click",Lf.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var f=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];f.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,jK(e.parcatsViewModel),WK(e.parcatsViewModel);var c=Lf.transition().duration(300).ease("cubic-in-out");c.each(function(){LUe(e.parcatsViewModel,!0),CUe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&THt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function kUe(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;u--)l+="C"+o[u]+","+(t[u+1]+n)+" "+a[u]+","+(t[u]+n)+" "+(e[u]+r[u])+","+(t[u]+n),l+="l-"+r[u]+",0 ";return l+="Z",l}function WK(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(U){return U.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(U){return U.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),u=t.map(function(q){return q.width}),l=[];for(var f in r.paths)r.paths.hasOwnProperty(f)&&l.push(r.paths[f]);function c(q){var U=q.categoryInds.map(function(j,G){return i[G][j]}),H=o.map(function(j){return U[j]});return H}l.sort(function(q,U){var H=c(q),j=c(U);return e.sortpaths==="backward"&&(H.reverse(),j.reverse()),H.push(q.valueInds[0]),j.push(U.valueInds[0]),e.bundlecolors&&(H.unshift(q.rawColor),j.unshift(U.rawColor)),Hj?1:0});for(var h=new Array(l.length),d=t[0].model.count,p=t[0].categories.map(function(q){return q.height}).reduce(function(q,U){return q+U}),x=0;x0?y=p*(b.count/d):y=0;for(var E=new Array(n.length),k=0;k1?o=(e.width-2*r-n)/(i-1):o=0,s=r,u=s+o*a;var l=[],f=e.model.maxCats,c=t.categories.length,h=8,d=t.count,p=e.height-h*(f-1),x,b,y,E,k,A=(f-c)*h/2,L=t.categories.map(function(_){return{displayInd:_.displayInd,categoryInd:_.categoryInd}});for(L.sort(function(_,C){return _.displayInd-C.displayInd}),k=0;k0?x=b.count/d*p:x=0,y={key:b.valueInds[0],model:b,width:n,height:x,y:b.dragY!==null?b.dragY:A,bands:[],parcatsViewModel:e},A=A+x+h,l.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:u,y:0,width:n,model:t,categories:l,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var ZK=Se((J1r,IUe)=>{"use strict";var VHt=PUe();IUe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;VHt(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 RUe=Se(X9=>{"use strict";var HHt=Dd().getModuleCalcData,GHt=ZK(),DUe="parcats";X9.name=DUe;X9.plot=function(e,t,r,n){var i=HHt(e.calcdata,DUe);if(i.length){var a=i[0];GHt(e,a,r,n)}};X9.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 qUe=Se((Q1r,FUe)=>{"use strict";FUe.exports={attributes:FK(),supplyDefaults:bUe(),calc:TUe(),plot:ZK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:RUe(),categories:["noOpacity"],meta:{}}});var OUe=Se((e_r,BUe)=>{"use strict";BUe.exports=qUe()});var f1=Se((t_r,jUe)=>{"use strict";var WHt=X1(),NUe="1.13.4",GUe='\xA9 OpenStreetMap contributors',UUe=['\xA9 Carto',GUe].join(" "),VUe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),jHt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),WUe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:GUe,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:UUe,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:UUe,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:VUe,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:VUe,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:jHt,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"}},HUe=WHt(WUe);jUe.exports={requiredVersion:NUe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:WUe,styleValuesNonMapbox:HUe,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@"+NUe+"."].join(` +`),Ak=Tk().maxDimensionCount,M7e=Zr(),b7e=1e-6,G9=2048,pVt=new Uint8Array(4),w7e=new Uint8Array(4),T7e={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function vVt(e){e.read({x:0,y:0,width:1,height:1,data:pVt})}function E7e(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 yVt(e,t,r,n,i,a){var o=a.key;function s(u){var l=Math.min(n,i-u*n);u===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],E7e(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*l,a.offset=2*u*n,t(a),u*n+l>>8*t)%256/255}function _Vt(e,t,r){for(var n=new Array(e*(Ak+4)),i=0,a=0;aj&&(j=M[F].dim1.canvasX,U=F);T===0&&E7e(i,0,0,l.canvasWidth,l.canvasHeight);var G=E(r);for(F=0;F{"use strict";var Ud=Nl(),l1=Zr(),CK=l1.isArrayOrTypedArray,F7e=l1.numberFormat,q7e=hZ(),B7e=hu(),AVt=l1.strRotate,Jm=l1.strTranslate,SVt=Bf(),W9=yu(),z7e=fc(),PK=Km(),ty=PK.keyFun,$m=PK.repeat,O7e=PK.unwrap,gS=EK(),Cf=Tk(),N7e=AK(),MVt=L7e();function P7e(e,t,r){return l1.aggNums(e,null,t,r)}function U7e(e,t){return IK(P7e(Math.min,e,t),P7e(Math.max,e,t))}function j9(e){var t=e.range;return t?IK(t[0],t[1]):U7e(e.values,e._length)}function IK(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 EVt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function kVt(e,t,r,n,i){var a=j9(r);return n?Ud.scale.ordinal().domain(n.map(EVt(F7e(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Ud.scale.linear().domain(a).range([e-t,t])}function CVt(e,t){return Ud.scale.linear().range([t,e-t])}function LVt(e,t){return Ud.scale.linear().domain(j9(e)).range([t,1-t])}function zVt(e){if(e.tickvals){var t=j9(e);return Ud.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function PVt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=q7e(a[1]);return Ud.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Ud.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 IVt(e,t,r){var n=O7e(t),i=n.trace,a=gS.convertTypedArray(n.lineColor),o=i.line,s={color:q7e(i.unselected.line.color),opacity:i.unselected.line.opacity},u=z7e.extractOpts(o),l=u.reversescale?z7e.flipScale(n.cscale):n.cscale,f=i.domain,c=i.dimensions,h=e.width,d=i.labelangle,p=i.labelside,x=i.labelfont,b=i.tickfont,y=i.rangefont,k=l1.extendDeepNoArrays({},o,{color:a.map(Ud.scale.linear().domain(j9({values:a,range:[u.min,u.max],_length:i._length}))),blockLineCount:Cf.blockLineCount,canvasOverdrag:Cf.overdrag*Cf.canvasPixelRatio}),E=Math.floor(h*(f.x[1]-f.x[0])),A=Math.floor(e.height*(f.y[1]-f.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},_=E,C=A;return{key:r,colCount:c.filter(gS.isVisible).length,dimensions:c,tickDistance:Cf.tickDistance,unitToColor:PVt(l),lines:k,deselectedLines:s,labelAngle:d,labelSide:p,labelFont:x,tickFont:b,rangeFont:y,layoutWidth:h,layoutHeight:e.height,domain:f,translateX:f.x[0]*h,translateY:e.height-f.y[1]*e.height,pad:L,canvasWidth:_*Cf.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Cf.canvasPixelRatio,width:_,height:C,canvasPixelRatio:Cf.canvasPixelRatio}}function DVt(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)},u=Cf.verticalPadding/i,l=CVt(i,Cf.verticalPadding),f={key:r.key,xScale:s,model:r,inBrushDrag:!1},c={};return f.dimensions=a.filter(gS.isVisible).map(function(h,d){var p=LVt(h,u),x=c[h.label];c[h.label]=(x||0)+1;var b=h.label+(x?"__"+x:""),y=h.constraintrange,k=y&&y.length;k&&!CK(y[0])&&(y=[y]);var E=k?y.map(function(q){return q.map(p)}):[[-1/0,1/0]],A=function(){var q=f;q.focusLayer&&q.focusLayer.render(q.panels,!0);var U=zK(q);!e.contextShown()&&U?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var _=h.tickvals,C;function M(q,U){return{val:q,text:C[U]}}function v(q,U){return q.val-U.val}if(CK(_)&&_.length){l1.isTypedArray(_)&&(_=Array.from(_)),C=h.ticktext,!CK(C)||!C.length?C=_.map(F7e(h.tickformat)):C.length>_.length?C=C.slice(0,_.length):_.length>C.length&&(_=_.slice(0,C.length));for(var z=1;z<_.length;z++)if(_[z]<_[z-1]){for(var T=_.map(M).sort(v),F=0;F<_.length;F++)_[F]=T[F].val,C[F]=T[F].text;break}}else _=void 0;return L=gS.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:_,ticktext:C,ordinal:gS.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(p),unitTickvals:_&&_.map(p),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:l,domainScale:kVt(i,Cf.verticalPadding,h,_,C),ordinalScale:zVt(h),parent:f,model:r,brush:N7e.makeBrush(e,k,E,function(){e.linePickActive(!1)},A,function(q){if(f.focusLayer.render(f.panels,!0),f.pickLayer&&f.pickLayer.render(f.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var U=p.invert,H=q.map(function(j){return j.map(U).sort(l1.sorterAsc)}).sort(function(j,G){return j[0]-G[0]});t.filterChanged(f.key,h._index,H)}})}}),f}function I7e(e){e.classed(Cf.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function RVt(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function D7e(e,t){var r=t==="top"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function LK(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a=U||O>=H)return;var W=F.lineLayer.readPixel(G,H-1-O),re=W[3]!==0,ne=re?W[2]+256*(W[1]+256*W[0]):null,be={x:G,y:O,clientX:q.clientX,clientY:q.clientY,dataIndex:F.model.key,curveNumber:ne};ne!==p&&(re?i.hover(be):i.unhover&&i.unhover(be),p=ne)}}),d.style("opacity",function(F){return F.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Cf.cn.parcoords).data(h,ty);b.exit().remove(),b.enter().append("g").classed(Cf.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(F){return Jm(F.model.translateX,F.model.translateY)});var y=b.selectAll("."+Cf.cn.parcoordsControlView).data($m,ty);y.enter().append("g").classed(Cf.cn.parcoordsControlView,!0),y.attr("transform",function(F){return Jm(F.model.pad.l,F.model.pad.t)});var k=y.selectAll("."+Cf.cn.yAxis).data(function(F){return F.dimensions},ty);k.enter().append("g").classed(Cf.cn.yAxis,!0),y.each(function(F){LK(k,F,l)}),d.each(function(F){if(F.viewModel){!F.lineLayer||i?F.lineLayer=MVt(this,F):F.lineLayer.update(F),(F.key||F.key===0)&&(F.viewModel[F.key]=F.lineLayer);var q=!F.context||i;F.lineLayer.render(F.viewModel.panels,q)}}),k.attr("transform",function(F){return Jm(F.xScale(F.xIndex),0)}),k.call(Ud.behavior.drag().origin(function(F){return F}).on("drag",function(F){var q=F.parent;c.linePickActive(!1),F.x=Math.max(-Cf.overdrag,Math.min(F.model.width+Cf.overdrag,Ud.event.x)),F.canvasX=F.x*F.model.canvasPixelRatio,k.sort(function(U,H){return U.x-H.x}).each(function(U,H){U.xIndex=H,U.x=F===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),LK(k,q,l),k.filter(function(U){return Math.abs(F.xIndex-U.xIndex)!==0}).attr("transform",function(U){return Jm(U.xScale(U.xIndex),0)}),Ud.select(this).attr("transform",Jm(F.x,0)),k.each(function(U,H,j){j===F.parent.key&&(q.dimensions[H]=U)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!zK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(F){var q=F.parent;F.x=F.xScale(F.xIndex),F.canvasX=F.x*F.model.canvasPixelRatio,LK(k,q,l),Ud.select(this).attr("transform",function(U){return Jm(U.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!zK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),c.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),k.exit().remove();var E=k.selectAll("."+Cf.cn.axisOverlays).data($m,ty);E.enter().append("g").classed(Cf.cn.axisOverlays,!0),E.selectAll("."+Cf.cn.axis).remove();var A=E.selectAll("."+Cf.cn.axis).data($m,ty);A.enter().append("g").classed(Cf.cn.axis,!0),A.each(function(F){var q=F.model.height/F.model.tickDistance,U=F.domainScale,H=U.domain();Ud.select(this).call(Ud.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,F.tickFormat).tickValues(F.ordinal?H:null).tickFormat(function(j){return gS.isOrdinal(F)?j:V7e(F.model.dimensions[F.visibleIndex],j)}).scale(U)),W9.font(A.selectAll("text"),F.model.tickFont)}),A.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),A.selectAll("text").style("cursor","default");var L=E.selectAll("."+Cf.cn.axisHeading).data($m,ty);L.enter().append("g").classed(Cf.cn.axisHeading,!0);var _=L.selectAll("."+Cf.cn.axisTitle).data($m,ty);_.enter().append("text").classed(Cf.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),_.text(function(F){return F.label}).each(function(F){var q=Ud.select(this);W9.font(q,F.model.labelFont),SVt.convertToTspans(q,t)}).attr("transform",function(F){var q=D7e(F.model.labelAngle,F.model.labelSide),U=Cf.axisTitleOffset;return(q.dir>0?"":Jm(0,2*U+F.model.height))+AVt(q.degrees)+Jm(-U*q.dx,-U*q.dy)}).attr("text-anchor",function(F){var q=D7e(F.model.labelAngle,F.model.labelSide),U=Math.abs(q.dx),H=Math.abs(q.dy);return 2*U>H?q.dir*q.dx<0?"start":"end":"middle"});var C=E.selectAll("."+Cf.cn.axisExtent).data($m,ty);C.enter().append("g").classed(Cf.cn.axisExtent,!0);var M=C.selectAll("."+Cf.cn.axisExtentTop).data($m,ty);M.enter().append("g").classed(Cf.cn.axisExtentTop,!0),M.attr("transform",Jm(0,-Cf.axisExtentOffset));var v=M.selectAll("."+Cf.cn.axisExtentTopText).data($m,ty);v.enter().append("text").classed(Cf.cn.axisExtentTopText,!0).call(I7e),v.text(function(F){return R7e(F,!0)}).each(function(F){W9.font(Ud.select(this),F.model.rangeFont)});var z=C.selectAll("."+Cf.cn.axisExtentBottom).data($m,ty);z.enter().append("g").classed(Cf.cn.axisExtentBottom,!0),z.attr("transform",function(F){return Jm(0,F.model.height+Cf.axisExtentOffset)});var T=z.selectAll("."+Cf.cn.axisExtentBottomText).data($m,ty);T.enter().append("text").classed(Cf.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(I7e),T.text(function(F){return R7e(F,!1)}).each(function(F){W9.font(Ud.select(this),F.model.rangeFont)}),N7e.ensureAxisBrush(E,f,t)}});var RK=Se((DK,X7e)=>{"use strict";var qVt=G7e(),BVt=x9(),W7e=EK().isVisible,Z7e={};function j7e(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function OVt(e,t){return function(n,i){return j7e(e,t,n)-j7e(e,t,i)}}var DK=X7e.exports=function(t,r){var n=t._fullLayout,i=BVt(t,[],Z7e);if(i){var a={},o={},s={},u={},l=n._size;r.forEach(function(p,x){var b=p[0].trace;s[x]=b.index;var y=u[x]=b.index;a[x]=t.data[y].dimensions,o[x]=t.data[y].dimensions.slice()});var f=function(p,x,b){var y=o[p][x],k=b.map(function(M){return M.slice()}),E="dimensions["+x+"].constraintrange",A=n._tracePreGUI[t._fullData[s[p]]._fullInput.uid];if(A[E]===void 0){var L=y.constraintrange;A[E]=L||null}var _=t._fullData[s[p]].dimensions[x];k.length?(k.length===1&&(k=k[0]),y.constraintrange=k,_.constraintrange=k.slice(),k=[k]):(delete y.constraintrange,delete _.constraintrange,k=null);var C={};C[E]=k,t.emit("plotly_restyle",[C,[u[p]]])},c=function(p){t.emit("plotly_hover",p)},h=function(p){t.emit("plotly_unhover",p)},d=function(p,x){var b=OVt(x,o[p].filter(W7e));a[p].sort(b),o[p].filter(function(y){return!W7e(y)}).sort(function(y){return o[p].indexOf(y)}).forEach(function(y){a[p].splice(a[p].indexOf(y),1),a[p].splice(o[p].indexOf(y),0,y)}),t.emit("plotly_restyle",[{dimensions:[a[p]]},[u[p]]])};qVt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:f,hover:c,unhover:h,axesMoved:d})}};DK.reglPrecompiled=Z7e});var K7e=Se(Sk=>{"use strict";var Y7e=Nl(),NVt=Dd().getModuleCalcData,UVt=RK(),VVt=Zv();Sk.name="parcoords";Sk.plot=function(e){var t=NVt(e.calcdata,"parcoords")[0];t.length&&UVt(e,t)};Sk.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())};Sk.toSVG=function(e){var t=e._fullLayout._glimages,r=Y7e.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:VVt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){Y7e.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var $7e=Se((O1r,J7e)=>{"use strict";J7e.exports={attributes:bK(),supplyDefaults:g7e(),calc:x7e(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:K7e(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var eUe=Se((N1r,Q7e)=>{Q7e.exports=function(t,r){"use strict";var n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt;return n=t.gl,i=t.context,a=t.strings,o=t.next,s=t.current,u=t.draw,l=t.elements,f=t.buffer,c=t.shader,h=t.attributes,d=t.vao,p=t.uniforms,x=t.framebuffer,b=t.extensions,y=t.timer,k=t.isBufferArgs,E=o.blend_color,A=s.blend_color,L=o.blend_equation,_=s.blend_equation,C=o.blend_func,M=s.blend_func,v=o.depth_range,z=s.depth_range,T=o.colorMask,F=s.colorMask,q=o.polygonOffset_offset,U=s.polygonOffset_offset,H=o.sample_coverage,j=s.sample_coverage,G=o.stencil_func,O=s.stencil_func,W=o.stencil_opFront,re=s.stencil_opFront,ne=o.stencil_opBack,be=s.stencil_opBack,ze=o.scissor_box,Ce=s.scissor_box,he=o.viewport,te=s.viewport,ke={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ee={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Me={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Oe={add:32774,subtract:32778,"reverse subtract":32779},Re={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},me={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Be={cw:2304,ccw:2305},fe=o.blend_color,Ze=s.blend_color,et=o.blend_equation,gt=s.blend_equation,Pt=o.blend_func,Qe=s.blend_func,Xe=o.depth_range,Tt=s.depth_range,xt=o.colorMask,_t=s.colorMask,Ct=o.polygonOffset_offset,jt=s.polygonOffset_offset,At=o.sample_coverage,Te=s.sample_coverage,nt=o.stencil_func,ut=s.stencil_func,ct=o.stencil_opFront,rt=s.stencil_opFront,je=o.stencil_opBack,tt=s.stencil_opBack,Je=o.scissor_box,Mt=s.scissor_box,Vt=o.viewport,Kt=s.viewport,{poll:function(){var ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei;s.dirty=!1,fr=o.dither,Ot=o.blend_enable,De=o.depth_enable,_e=o.cull_enable,Fe=o.polygonOffset_enable,Pe=o.sample_alpha,Ie=o.sample_enable,lt=o.stencil_enable,ye=o.scissor_enable,ue=o.depth_func,de=s.depth_func,ht=o.depth_mask,Et=s.depth_mask,St=o.cull_face,Zt=s.cull_face,qr=o.frontFace,Lr=s.frontFace,vr=o.lineWidth,Er=s.lineWidth,si=o.stencil_mask,Ei=s.stencil_mask,ir=x.next,ir!==x.cur&&(ir?n.bindFramebuffer(36160,ir.framebuffer):n.bindFramebuffer(36160,null),x.cur=ir),fr!==s.dither&&(fr?n.enable(3024):n.disable(3024),s.dither=fr),Ot!==s.blend_enable&&(Ot?n.enable(3042):n.disable(3042),s.blend_enable=Ot),De!==s.depth_enable&&(De?n.enable(2929):n.disable(2929),s.depth_enable=De),_e!==s.cull_enable&&(_e?n.enable(2884):n.disable(2884),s.cull_enable=_e),Fe!==s.polygonOffset_enable&&(Fe?n.enable(32823):n.disable(32823),s.polygonOffset_enable=Fe),Pe!==s.sample_alpha&&(Pe?n.enable(32926):n.disable(32926),s.sample_alpha=Pe),Ie!==s.sample_enable&&(Ie?n.enable(32928):n.disable(32928),s.sample_enable=Ie),lt!==s.stencil_enable&&(lt?n.enable(2960):n.disable(2960),s.stencil_enable=lt),ye!==s.scissor_enable&&(ye?n.enable(3089):n.disable(3089),s.scissor_enable=ye),(fe[0]!==Ze[0]||fe[1]!==Ze[1]||fe[2]!==Ze[2]||fe[3]!==Ze[3])&&(n.blendColor(fe[0],fe[1],fe[2],fe[3]),Ze[0]=fe[0],Ze[1]=fe[1],Ze[2]=fe[2],Ze[3]=fe[3]),(et[0]!==gt[0]||et[1]!==gt[1])&&(n.blendEquationSeparate(et[0],et[1]),gt[0]=et[0],gt[1]=et[1]),(Pt[0]!==Qe[0]||Pt[1]!==Qe[1]||Pt[2]!==Qe[2]||Pt[3]!==Qe[3])&&(n.blendFuncSeparate(Pt[0],Pt[1],Pt[2],Pt[3]),Qe[0]=Pt[0],Qe[1]=Pt[1],Qe[2]=Pt[2],Qe[3]=Pt[3]),ue!==de&&(n.depthFunc(ue),s.depth_func=ue),(Xe[0]!==Tt[0]||Xe[1]!==Tt[1])&&(n.depthRange(Xe[0],Xe[1]),Tt[0]=Xe[0],Tt[1]=Xe[1]),ht!==Et&&(n.depthMask(ht),s.depth_mask=ht),(xt[0]!==_t[0]||xt[1]!==_t[1]||xt[2]!==_t[2]||xt[3]!==_t[3])&&(n.colorMask(xt[0],xt[1],xt[2],xt[3]),_t[0]=xt[0],_t[1]=xt[1],_t[2]=xt[2],_t[3]=xt[3]),St!==Zt&&(n.cullFace(St),s.cull_face=St),qr!==Lr&&(n.frontFace(qr),s.frontFace=qr),vr!==Er&&(n.lineWidth(vr),s.lineWidth=vr),(Ct[0]!==jt[0]||Ct[1]!==jt[1])&&(n.polygonOffset(Ct[0],Ct[1]),jt[0]=Ct[0],jt[1]=Ct[1]),(At[0]!==Te[0]||At[1]!==Te[1])&&(n.sampleCoverage(At[0],At[1]),Te[0]=At[0],Te[1]=At[1]),si!==Ei&&(n.stencilMask(si),s.stencil_mask=si),(nt[0]!==ut[0]||nt[1]!==ut[1]||nt[2]!==ut[2])&&(n.stencilFunc(nt[0],nt[1],nt[2]),ut[0]=nt[0],ut[1]=nt[1],ut[2]=nt[2]),(ct[0]!==rt[0]||ct[1]!==rt[1]||ct[2]!==rt[2]||ct[3]!==rt[3])&&(n.stencilOpSeparate(ct[0],ct[1],ct[2],ct[3]),rt[0]=ct[0],rt[1]=ct[1],rt[2]=ct[2],rt[3]=ct[3]),(je[0]!==tt[0]||je[1]!==tt[1]||je[2]!==tt[2]||je[3]!==tt[3])&&(n.stencilOpSeparate(je[0],je[1],je[2],je[3]),tt[0]=je[0],tt[1]=je[1],tt[2]=je[2],tt[3]=je[3]),(Je[0]!==Mt[0]||Je[1]!==Mt[1]||Je[2]!==Mt[2]||Je[3]!==Mt[3])&&(n.scissor(Je[0],Je[1],Je[2],Je[3]),Mt[0]=Je[0],Mt[1]=Je[1],Mt[2]=Je[2],Mt[3]=Je[3]),(Vt[0]!==Kt[0]||Vt[1]!==Kt[1]||Vt[2]!==Kt[2]||Vt[3]!==Kt[3])&&(n.viewport(Vt[0],Vt[1],Vt[2],Vt[3]),Kt[0]=Vt[0],Kt[1]=Vt[1],Kt[2]=Vt[2],Kt[3]=Vt[3])},refresh:function(){var ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi;s.dirty=!1,De=o.dither,_e=o.blend_enable,Fe=o.depth_enable,Pe=o.cull_enable,Ie=o.polygonOffset_enable,lt=o.sample_alpha,ye=o.sample_enable,ue=o.stencil_enable,de=o.scissor_enable,ht=o.depth_func,Et=s.depth_func,St=o.depth_mask,Zt=s.depth_mask,qr=o.cull_face,Lr=s.cull_face,vr=o.frontFace,Er=s.frontFace,si=o.lineWidth,Ei=s.lineWidth,Si=o.stencil_mask,xi=s.stencil_mask,ir=x.next,ir?n.bindFramebuffer(36160,ir.framebuffer):n.bindFramebuffer(36160,null),x.cur=ir,fr=h,Ot=0;for(var Hi=0;Hi{tUe.exports=function(t,r,n,i,a,o,s,u){"use strict";var l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt;return l=t.gl,f=t.context,c=t.strings,h=t.next,d=t.current,p=t.draw,x=t.elements,b=t.buffer,y=t.shader,k=t.attributes,E=t.vao,A=t.uniforms,L=t.framebuffer,_=t.extensions,C=t.timer,M=t.isBufferArgs,v=h.blend_color,z=d.blend_color,T=h.blend_equation,F=d.blend_equation,q=h.blend_func,U=d.blend_func,H=h.depth_range,j=d.depth_range,G=h.colorMask,O=d.colorMask,W=h.polygonOffset_offset,re=d.polygonOffset_offset,ne=h.sample_coverage,be=d.sample_coverage,ze=h.stencil_func,Ce=d.stencil_func,he=h.stencil_opFront,te=d.stencil_opFront,ke=h.stencil_opBack,Ee=d.stencil_opBack,Me=h.scissor_box,Oe=d.scissor_box,Re=h.viewport,me=d.viewport,Be={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ze={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},et={add:32774,subtract:32778,"reverse subtract":32779},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Qe={cw:2304,ccw:2305},Xe={},Tt={},{draw:function(xt){var _t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot;if(_t=xt.framebuffer,Ct=L.getFramebuffer(_t),jt=L.next,L.next=Ct,At=f.framebufferWidth,f.framebufferWidth=Ct?Ct.width:f.drawingBufferWidth,Te=f.framebufferHeight,f.framebufferHeight=Ct?Ct.height:f.drawingBufferHeight,Ct!==L.cur&&(Ct?l.bindFramebuffer(36160,Ct.framebuffer):l.bindFramebuffer(36160,null),L.cur=Ct),d.dirty){var De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi;De=h.dither,De!==d.dither&&(De?l.enable(3024):l.disable(3024),d.dither=De),_e=h.blend_enable,_e!==d.blend_enable&&(_e?l.enable(3042):l.disable(3042),d.blend_enable=_e),Fe=v[0],Pe=v[1],Ie=v[2],lt=v[3],(Fe!==z[0]||Pe!==z[1]||Ie!==z[2]||lt!==z[3])&&(l.blendColor(Fe,Pe,Ie,lt),z[0]=Fe,z[1]=Pe,z[2]=Ie,z[3]=lt),ye=T[0],ue=T[1],(ye!==F[0]||ue!==F[1])&&(l.blendEquationSeparate(ye,ue),F[0]=ye,F[1]=ue),de=q[0],ht=q[1],Et=q[2],St=q[3],(de!==U[0]||ht!==U[1]||Et!==U[2]||St!==U[3])&&(l.blendFuncSeparate(de,ht,Et,St),U[0]=de,U[1]=ht,U[2]=Et,U[3]=St),Zt=h.depth_enable,Zt!==d.depth_enable&&(Zt?l.enable(2929):l.disable(2929),d.depth_enable=Zt),qr=h.depth_func,qr!==d.depth_func&&(l.depthFunc(qr),d.depth_func=qr),Lr=H[0],vr=H[1],(Lr!==j[0]||vr!==j[1])&&(l.depthRange(Lr,vr),j[0]=Lr,j[1]=vr),Er=h.depth_mask,Er!==d.depth_mask&&(l.depthMask(Er),d.depth_mask=Er),si=G[0],Ei=G[1],Si=G[2],xi=G[3],(si!==O[0]||Ei!==O[1]||Si!==O[2]||xi!==O[3])&&(l.colorMask(si,Ei,Si,xi),O[0]=si,O[1]=Ei,O[2]=Si,O[3]=xi),Hi=h.cull_enable,Hi!==d.cull_enable&&(Hi?l.enable(2884):l.disable(2884),d.cull_enable=Hi),Jr=h.cull_face,Jr!==d.cull_face&&(l.cullFace(Jr),d.cull_face=Jr),ci=h.frontFace,ci!==d.frontFace&&(l.frontFace(ci),d.frontFace=ci),Di=h.lineWidth,Di!==d.lineWidth&&(l.lineWidth(Di),d.lineWidth=Di),Lt=h.polygonOffset_enable,Lt!==d.polygonOffset_enable&&(Lt?l.enable(32823):l.disable(32823),d.polygonOffset_enable=Lt),vt=W[0],Dt=W[1],(vt!==re[0]||Dt!==re[1])&&(l.polygonOffset(vt,Dt),re[0]=vt,re[1]=Dt),Bt=h.sample_alpha,Bt!==d.sample_alpha&&(Bt?l.enable(32926):l.disable(32926),d.sample_alpha=Bt),sr=h.sample_enable,sr!==d.sample_enable&&(sr?l.enable(32928):l.disable(32928),d.sample_enable=sr),br=ne[0],zr=ne[1],(br!==be[0]||zr!==be[1])&&(l.sampleCoverage(br,zr),be[0]=br,be[1]=zr),Tr=h.stencil_enable,Tr!==d.stencil_enable&&(Tr?l.enable(2960):l.disable(2960),d.stencil_enable=Tr),Rr=h.stencil_mask,Rr!==d.stencil_mask&&(l.stencilMask(Rr),d.stencil_mask=Rr),Br=ze[0],oi=ze[1],vi=ze[2],(Br!==Ce[0]||oi!==Ce[1]||vi!==Ce[2])&&(l.stencilFunc(Br,oi,vi),Ce[0]=Br,Ce[1]=oi,Ce[2]=vi),Pi=he[0],Yr=he[1],Ni=he[2],Ur=he[3],(Pi!==te[0]||Yr!==te[1]||Ni!==te[2]||Ur!==te[3])&&(l.stencilOpSeparate(Pi,Yr,Ni,Ur),te[0]=Pi,te[1]=Yr,te[2]=Ni,te[3]=Ur),ti=ke[0],ki=ke[1],ji=ke[2],Vi=ke[3],(ti!==Ee[0]||ki!==Ee[1]||ji!==Ee[2]||Vi!==Ee[3])&&(l.stencilOpSeparate(ti,ki,ji,Vi),Ee[0]=ti,Ee[1]=ki,Ee[2]=ji,Ee[3]=Vi),zi=h.scissor_enable,zi!==d.scissor_enable&&(zi?l.enable(3089):l.disable(3089),d.scissor_enable=zi)}nt=f.framebufferWidth,ut=f.framebufferHeight,ct=f.viewportWidth,f.viewportWidth=nt,rt=f.viewportHeight,f.viewportHeight=ut,l.viewport(0,0,nt,ut),me[0]=0,me[1]=0,me[2]=nt,me[3]=ut,je=f.framebufferWidth,tt=f.framebufferHeight,l.scissor(0,0,je,tt),Oe[0]=0,Oe[1]=0,Oe[2]=je,Oe[3]=tt,Je=d.profile,Je&&(Mt=performance.now(),r.count++),Vt=y.frag,Kt=y.vert,ir=y.program(Kt,Vt),l.useProgram(ir.program),E.setVAO(null),fr=ir.id,Ot=Xe[fr],Ot?Ot.call(this,xt):(Ot=Xe[fr]=n(ir),Ot.call(this,xt)),d.dirty=!0,E.setVAO(null),L.next=jt,f.framebufferWidth=At,f.framebufferHeight=Te,f.viewportWidth=ct,f.viewportHeight=rt,Je&&(r.cpuTime+=performance.now()-Mt)},scope:function(xt,_t,Ct){var jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie;jt=xt.framebuffer,At=L.getFramebuffer(jt),Te=L.next,L.next=At,nt=f.framebufferWidth,f.framebufferWidth=At?At.width:f.drawingBufferWidth,ut=f.framebufferHeight,f.framebufferHeight=At?At.height:f.drawingBufferHeight,ct=f.framebufferWidth,rt=f.framebufferHeight,je=f.viewportWidth,f.viewportWidth=ct,tt=f.viewportHeight,f.viewportHeight=rt,Je=Re[0],Re[0]=i,Mt=Re[1],Re[1]=a,Vt=Re[2],Re[2]=ct,Kt=Re[3],Re[3]=rt,ir=f.framebufferWidth,fr=f.framebufferHeight,Ot=Me[0],Me[0]=o,De=Me[1],Me[1]=s,_e=Me[2],Me[2]=ir,Fe=Me[3],Me[3]=fr,Pe=d.profile,Pe&&(Ie=performance.now(),r.count++),d.dirty=!0,_t(f,xt,Ct),L.next=Te,f.framebufferWidth=nt,f.framebufferHeight=ut,f.viewportWidth=je,f.viewportHeight=tt,Re[0]=Je,Re[1]=Mt,Re[2]=Vt,Re[3]=Kt,Me[0]=Ot,Me[1]=De,Me[2]=_e,Me[3]=Fe,Pe&&(r.cpuTime+=performance.now()-Ie),d.dirty=!0},batch:function(xt,_t){var Ct,jt,At,Te,nt,ut,ct;if(d.dirty){var rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi;rt=h.dither,rt!==d.dither&&(rt?l.enable(3024):l.disable(3024),d.dither=rt),je=h.blend_enable,je!==d.blend_enable&&(je?l.enable(3042):l.disable(3042),d.blend_enable=je),tt=v[0],Je=v[1],Mt=v[2],Vt=v[3],(tt!==z[0]||Je!==z[1]||Mt!==z[2]||Vt!==z[3])&&(l.blendColor(tt,Je,Mt,Vt),z[0]=tt,z[1]=Je,z[2]=Mt,z[3]=Vt),Kt=T[0],ir=T[1],(Kt!==F[0]||ir!==F[1])&&(l.blendEquationSeparate(Kt,ir),F[0]=Kt,F[1]=ir),fr=q[0],Ot=q[1],De=q[2],_e=q[3],(fr!==U[0]||Ot!==U[1]||De!==U[2]||_e!==U[3])&&(l.blendFuncSeparate(fr,Ot,De,_e),U[0]=fr,U[1]=Ot,U[2]=De,U[3]=_e),Fe=h.depth_enable,Fe!==d.depth_enable&&(Fe?l.enable(2929):l.disable(2929),d.depth_enable=Fe),Pe=h.depth_func,Pe!==d.depth_func&&(l.depthFunc(Pe),d.depth_func=Pe),Ie=H[0],lt=H[1],(Ie!==j[0]||lt!==j[1])&&(l.depthRange(Ie,lt),j[0]=Ie,j[1]=lt),ye=h.depth_mask,ye!==d.depth_mask&&(l.depthMask(ye),d.depth_mask=ye),ue=G[0],de=G[1],ht=G[2],Et=G[3],(ue!==O[0]||de!==O[1]||ht!==O[2]||Et!==O[3])&&(l.colorMask(ue,de,ht,Et),O[0]=ue,O[1]=de,O[2]=ht,O[3]=Et),St=h.cull_enable,St!==d.cull_enable&&(St?l.enable(2884):l.disable(2884),d.cull_enable=St),Zt=h.cull_face,Zt!==d.cull_face&&(l.cullFace(Zt),d.cull_face=Zt),qr=h.frontFace,qr!==d.frontFace&&(l.frontFace(qr),d.frontFace=qr),Lr=h.lineWidth,Lr!==d.lineWidth&&(l.lineWidth(Lr),d.lineWidth=Lr),vr=h.polygonOffset_enable,vr!==d.polygonOffset_enable&&(vr?l.enable(32823):l.disable(32823),d.polygonOffset_enable=vr),Er=W[0],si=W[1],(Er!==re[0]||si!==re[1])&&(l.polygonOffset(Er,si),re[0]=Er,re[1]=si),Ei=h.sample_alpha,Ei!==d.sample_alpha&&(Ei?l.enable(32926):l.disable(32926),d.sample_alpha=Ei),Si=h.sample_enable,Si!==d.sample_enable&&(Si?l.enable(32928):l.disable(32928),d.sample_enable=Si),xi=ne[0],Hi=ne[1],(xi!==be[0]||Hi!==be[1])&&(l.sampleCoverage(xi,Hi),be[0]=xi,be[1]=Hi),Jr=h.stencil_enable,Jr!==d.stencil_enable&&(Jr?l.enable(2960):l.disable(2960),d.stencil_enable=Jr),ci=h.stencil_mask,ci!==d.stencil_mask&&(l.stencilMask(ci),d.stencil_mask=ci),Di=ze[0],Lt=ze[1],vt=ze[2],(Di!==Ce[0]||Lt!==Ce[1]||vt!==Ce[2])&&(l.stencilFunc(Di,Lt,vt),Ce[0]=Di,Ce[1]=Lt,Ce[2]=vt),Dt=he[0],Bt=he[1],sr=he[2],br=he[3],(Dt!==te[0]||Bt!==te[1]||sr!==te[2]||br!==te[3])&&(l.stencilOpSeparate(Dt,Bt,sr,br),te[0]=Dt,te[1]=Bt,te[2]=sr,te[3]=br),zr=ke[0],Tr=ke[1],Rr=ke[2],Br=ke[3],(zr!==Ee[0]||Tr!==Ee[1]||Rr!==Ee[2]||Br!==Ee[3])&&(l.stencilOpSeparate(zr,Tr,Rr,Br),Ee[0]=zr,Ee[1]=Tr,Ee[2]=Rr,Ee[3]=Br),oi=h.scissor_enable,oi!==d.scissor_enable&&(oi?l.enable(3089):l.disable(3089),d.scissor_enable=oi)}Ct=d.profile,Ct&&(jt=performance.now(),r.count+=_t),At=y.frag,Te=y.vert,nt=y.program(Te,At),l.useProgram(nt.program),E.setVAO(null),ut=nt.id,ct=Tt[ut],ct?ct.call(this,xt,_t):(ct=Tt[ut]=u(nt),ct.call(this,xt,_t)),d.dirty=!0,E.setVAO(null),Ct&&(r.cpuTime+=performance.now()-jt)}}}});var nUe=Se((V1r,iUe)=>{iUe.exports=function(t,r,n,i){"use strict";var a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt;return a=t.gl,o=t.context,s=t.strings,u=t.next,l=t.current,f=t.draw,c=t.elements,h=t.buffer,d=t.shader,p=t.attributes,x=t.vao,b=t.uniforms,y=t.framebuffer,k=t.extensions,E=t.timer,A=t.isBufferArgs,L=u.blend_color,_=l.blend_color,C=u.blend_equation,M=l.blend_equation,v=u.blend_func,z=l.blend_func,T=u.depth_range,F=l.depth_range,q=u.colorMask,U=l.colorMask,H=u.polygonOffset_offset,j=l.polygonOffset_offset,G=u.sample_coverage,O=l.sample_coverage,W=u.stencil_func,re=l.stencil_func,ne=u.stencil_opFront,be=l.stencil_opFront,ze=u.stencil_opBack,Ce=l.stencil_opBack,he=u.scissor_box,te=l.scissor_box,ke=u.viewport,Ee=l.viewport,Me={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Oe={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Re={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},me={add:32774,subtract:32778,"reverse subtract":32779},Be={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Ze={cw:2304,ccw:2305},et={},gt={},{draw:function(Pt){var Qe,Xe,Tt,xt,_t,Ct,jt,At;if(Qe=y.next,Qe!==y.cur&&(Qe?a.bindFramebuffer(36160,Qe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Qe),l.dirty){var Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni;Te=u.dither,Te!==l.dither&&(Te?a.enable(3024):a.disable(3024),l.dither=Te),nt=u.blend_enable,nt!==l.blend_enable&&(nt?a.enable(3042):a.disable(3042),l.blend_enable=nt),ut=L[0],ct=L[1],rt=L[2],je=L[3],(ut!==_[0]||ct!==_[1]||rt!==_[2]||je!==_[3])&&(a.blendColor(ut,ct,rt,je),_[0]=ut,_[1]=ct,_[2]=rt,_[3]=je),tt=C[0],Je=C[1],(tt!==M[0]||Je!==M[1])&&(a.blendEquationSeparate(tt,Je),M[0]=tt,M[1]=Je),Mt=v[0],Vt=v[1],Kt=v[2],ir=v[3],(Mt!==z[0]||Vt!==z[1]||Kt!==z[2]||ir!==z[3])&&(a.blendFuncSeparate(Mt,Vt,Kt,ir),z[0]=Mt,z[1]=Vt,z[2]=Kt,z[3]=ir),fr=u.depth_enable,fr!==l.depth_enable&&(fr?a.enable(2929):a.disable(2929),l.depth_enable=fr),Ot=u.depth_func,Ot!==l.depth_func&&(a.depthFunc(Ot),l.depth_func=Ot),De=T[0],_e=T[1],(De!==F[0]||_e!==F[1])&&(a.depthRange(De,_e),F[0]=De,F[1]=_e),Fe=u.depth_mask,Fe!==l.depth_mask&&(a.depthMask(Fe),l.depth_mask=Fe),Pe=q[0],Ie=q[1],lt=q[2],ye=q[3],(Pe!==U[0]||Ie!==U[1]||lt!==U[2]||ye!==U[3])&&(a.colorMask(Pe,Ie,lt,ye),U[0]=Pe,U[1]=Ie,U[2]=lt,U[3]=ye),ue=u.cull_enable,ue!==l.cull_enable&&(ue?a.enable(2884):a.disable(2884),l.cull_enable=ue),de=u.cull_face,de!==l.cull_face&&(a.cullFace(de),l.cull_face=de),ht=u.frontFace,ht!==l.frontFace&&(a.frontFace(ht),l.frontFace=ht),Et=u.lineWidth,Et!==l.lineWidth&&(a.lineWidth(Et),l.lineWidth=Et),St=u.polygonOffset_enable,St!==l.polygonOffset_enable&&(St?a.enable(32823):a.disable(32823),l.polygonOffset_enable=St),Zt=H[0],qr=H[1],(Zt!==j[0]||qr!==j[1])&&(a.polygonOffset(Zt,qr),j[0]=Zt,j[1]=qr),Lr=u.sample_alpha,Lr!==l.sample_alpha&&(Lr?a.enable(32926):a.disable(32926),l.sample_alpha=Lr),vr=u.sample_enable,vr!==l.sample_enable&&(vr?a.enable(32928):a.disable(32928),l.sample_enable=vr),Er=G[0],si=G[1],(Er!==O[0]||si!==O[1])&&(a.sampleCoverage(Er,si),O[0]=Er,O[1]=si),Ei=u.stencil_enable,Ei!==l.stencil_enable&&(Ei?a.enable(2960):a.disable(2960),l.stencil_enable=Ei),Si=u.stencil_mask,Si!==l.stencil_mask&&(a.stencilMask(Si),l.stencil_mask=Si),xi=W[0],Hi=W[1],Jr=W[2],(xi!==re[0]||Hi!==re[1]||Jr!==re[2])&&(a.stencilFunc(xi,Hi,Jr),re[0]=xi,re[1]=Hi,re[2]=Jr),ci=ne[0],Di=ne[1],Lt=ne[2],vt=ne[3],(ci!==be[0]||Di!==be[1]||Lt!==be[2]||vt!==be[3])&&(a.stencilOpSeparate(ci,Di,Lt,vt),be[0]=ci,be[1]=Di,be[2]=Lt,be[3]=vt),Dt=ze[0],Bt=ze[1],sr=ze[2],br=ze[3],(Dt!==Ce[0]||Bt!==Ce[1]||sr!==Ce[2]||br!==Ce[3])&&(a.stencilOpSeparate(Dt,Bt,sr,br),Ce[0]=Dt,Ce[1]=Bt,Ce[2]=sr,Ce[3]=br),zr=u.scissor_enable,zr!==l.scissor_enable&&(zr?a.enable(3089):a.disable(3089),l.scissor_enable=zr),Tr=he[0],Rr=he[1],Br=he[2],oi=he[3],(Tr!==te[0]||Rr!==te[1]||Br!==te[2]||oi!==te[3])&&(a.scissor(Tr,Rr,Br,oi),te[0]=Tr,te[1]=Rr,te[2]=Br,te[3]=oi),vi=ke[0],Pi=ke[1],Yr=ke[2],Ni=ke[3],(vi!==Ee[0]||Pi!==Ee[1]||Yr!==Ee[2]||Ni!==Ee[3])&&(a.viewport(vi,Pi,Yr,Ni),Ee[0]=vi,Ee[1]=Pi,Ee[2]=Yr,Ee[3]=Ni),l.dirty=!1}Xe=l.profile,Xe&&(Tt=performance.now(),r.count++),xt=d.frag,_t=d.vert,Ct=d.program(_t,xt),a.useProgram(Ct.program),x.setVAO(null),jt=Ct.id,At=et[jt],At?At.call(this,Pt):(At=et[jt]=n(Ct),At.call(this,Pt)),x.setVAO(null),Xe&&(r.cpuTime+=performance.now()-Tt)},scope:function(Pt,Qe,Xe){var Tt,xt;Tt=l.profile,Tt&&(xt=performance.now(),r.count++),Qe(o,Pt,Xe),Tt&&(r.cpuTime+=performance.now()-xt)},batch:function(Pt,Qe){var Xe,Tt,xt,_t,Ct,jt,At,Te;if(Xe=y.next,Xe!==y.cur&&(Xe?a.bindFramebuffer(36160,Xe.framebuffer):a.bindFramebuffer(36160,null),y.cur=Xe),l.dirty){var nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur;nt=u.dither,nt!==l.dither&&(nt?a.enable(3024):a.disable(3024),l.dither=nt),ut=u.blend_enable,ut!==l.blend_enable&&(ut?a.enable(3042):a.disable(3042),l.blend_enable=ut),ct=L[0],rt=L[1],je=L[2],tt=L[3],(ct!==_[0]||rt!==_[1]||je!==_[2]||tt!==_[3])&&(a.blendColor(ct,rt,je,tt),_[0]=ct,_[1]=rt,_[2]=je,_[3]=tt),Je=C[0],Mt=C[1],(Je!==M[0]||Mt!==M[1])&&(a.blendEquationSeparate(Je,Mt),M[0]=Je,M[1]=Mt),Vt=v[0],Kt=v[1],ir=v[2],fr=v[3],(Vt!==z[0]||Kt!==z[1]||ir!==z[2]||fr!==z[3])&&(a.blendFuncSeparate(Vt,Kt,ir,fr),z[0]=Vt,z[1]=Kt,z[2]=ir,z[3]=fr),Ot=u.depth_enable,Ot!==l.depth_enable&&(Ot?a.enable(2929):a.disable(2929),l.depth_enable=Ot),De=u.depth_func,De!==l.depth_func&&(a.depthFunc(De),l.depth_func=De),_e=T[0],Fe=T[1],(_e!==F[0]||Fe!==F[1])&&(a.depthRange(_e,Fe),F[0]=_e,F[1]=Fe),Pe=u.depth_mask,Pe!==l.depth_mask&&(a.depthMask(Pe),l.depth_mask=Pe),Ie=q[0],lt=q[1],ye=q[2],ue=q[3],(Ie!==U[0]||lt!==U[1]||ye!==U[2]||ue!==U[3])&&(a.colorMask(Ie,lt,ye,ue),U[0]=Ie,U[1]=lt,U[2]=ye,U[3]=ue),de=u.cull_enable,de!==l.cull_enable&&(de?a.enable(2884):a.disable(2884),l.cull_enable=de),ht=u.cull_face,ht!==l.cull_face&&(a.cullFace(ht),l.cull_face=ht),Et=u.frontFace,Et!==l.frontFace&&(a.frontFace(Et),l.frontFace=Et),St=u.lineWidth,St!==l.lineWidth&&(a.lineWidth(St),l.lineWidth=St),Zt=u.polygonOffset_enable,Zt!==l.polygonOffset_enable&&(Zt?a.enable(32823):a.disable(32823),l.polygonOffset_enable=Zt),qr=H[0],Lr=H[1],(qr!==j[0]||Lr!==j[1])&&(a.polygonOffset(qr,Lr),j[0]=qr,j[1]=Lr),vr=u.sample_alpha,vr!==l.sample_alpha&&(vr?a.enable(32926):a.disable(32926),l.sample_alpha=vr),Er=u.sample_enable,Er!==l.sample_enable&&(Er?a.enable(32928):a.disable(32928),l.sample_enable=Er),si=G[0],Ei=G[1],(si!==O[0]||Ei!==O[1])&&(a.sampleCoverage(si,Ei),O[0]=si,O[1]=Ei),Si=u.stencil_enable,Si!==l.stencil_enable&&(Si?a.enable(2960):a.disable(2960),l.stencil_enable=Si),xi=u.stencil_mask,xi!==l.stencil_mask&&(a.stencilMask(xi),l.stencil_mask=xi),Hi=W[0],Jr=W[1],ci=W[2],(Hi!==re[0]||Jr!==re[1]||ci!==re[2])&&(a.stencilFunc(Hi,Jr,ci),re[0]=Hi,re[1]=Jr,re[2]=ci),Di=ne[0],Lt=ne[1],vt=ne[2],Dt=ne[3],(Di!==be[0]||Lt!==be[1]||vt!==be[2]||Dt!==be[3])&&(a.stencilOpSeparate(Di,Lt,vt,Dt),be[0]=Di,be[1]=Lt,be[2]=vt,be[3]=Dt),Bt=ze[0],sr=ze[1],br=ze[2],zr=ze[3],(Bt!==Ce[0]||sr!==Ce[1]||br!==Ce[2]||zr!==Ce[3])&&(a.stencilOpSeparate(Bt,sr,br,zr),Ce[0]=Bt,Ce[1]=sr,Ce[2]=br,Ce[3]=zr),Tr=u.scissor_enable,Tr!==l.scissor_enable&&(Tr?a.enable(3089):a.disable(3089),l.scissor_enable=Tr),Rr=he[0],Br=he[1],oi=he[2],vi=he[3],(Rr!==te[0]||Br!==te[1]||oi!==te[2]||vi!==te[3])&&(a.scissor(Rr,Br,oi,vi),te[0]=Rr,te[1]=Br,te[2]=oi,te[3]=vi),Pi=ke[0],Yr=ke[1],Ni=ke[2],Ur=ke[3],(Pi!==Ee[0]||Yr!==Ee[1]||Ni!==Ee[2]||Ur!==Ee[3])&&(a.viewport(Pi,Yr,Ni,Ur),Ee[0]=Pi,Ee[1]=Yr,Ee[2]=Ni,Ee[3]=Ur),l.dirty=!1}Tt=l.profile,Tt&&(xt=performance.now(),r.count+=Qe),_t=d.frag,Ct=d.vert,jt=d.program(Ct,_t),a.useProgram(jt.program),x.setVAO(null),At=jt.id,Te=gt[At],Te?Te.call(this,Pt,Qe):(Te=gt[At]=i(jt),Te.call(this,Pt,Qe)),x.setVAO(null),Tt&&(r.cpuTime+=performance.now()-xt)}}}});var oUe=Se((H1r,aUe)=>{aUe.exports=function(t,r,n,i,a,o,s,u,l,f,c,h,d,p,x,b,y,k,E,A,L,_,C,M,v,z,T,F,q,U,H,j,G,O,W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re,me,Be,fe,Ze,et,gt,Pt,Qe,Xe,Tt,xt,_t,Ct,jt,At,Te,nt,ut,ct,rt,je,tt,Je,Mt,Vt,Kt,ir,fr,Ot,De,_e,Fe,Pe,Ie,lt,ye,ue,de,ht,Et,St,Zt,qr,Lr,vr,Er,si,Ei,Si,xi,Hi,Jr,ci,Di,Lt,vt,Dt,Bt,sr,br,zr,Tr,Rr,Br,oi,vi,Pi,Yr,Ni,Ur,ti,ki,ji,Vi,zi,Mi,sn,fi,Or,st,Wt,tr,or,Nr,hi,Gi,Qr,Ui,zn,fn,xn,_a,Wn,Fn,ia,za){"use strict";var Hr,na,go,Dn,un,Zn,Wo,Ba,Bo,Ea,Ha,tn,Cn,Xn,ts,Ja,to,Ri,an,cs,pa,ln,ka,va,bo,Co,Fi,Yn,xa,Qi,Nn,Pn,qa,jo,Vo,Pa,Oa,co,An,_o,ks,bs,ps,sa,Bn,ms,ya,on,mn,Ga,ca,bn,Xi,qn,Ia,yn,Ya,ba,Da,Aa,Ln,wo,wa,$i,ea,Sa,Za,xo,Wa,hn,Un,Ss,Kn,ns,Jo,vo,ma,ja,To,Ao,la;return Hr=t.gl,na=t.context,go=t.strings,Dn=t.next,un=t.current,Zn=t.draw,Wo=t.elements,Ba=t.buffer,Bo=t.shader,Ea=t.attributes,Ha=t.vao,tn=t.uniforms,Cn=t.framebuffer,Xn=t.extensions,ts=t.timer,Ja=t.isBufferArgs,to=Dn.blend_color,Ri=un.blend_color,an=Dn.blend_equation,cs=un.blend_equation,pa=Dn.blend_func,ln=un.blend_func,ka=Dn.depth_range,va=un.depth_range,bo=Dn.colorMask,Co=un.colorMask,Fi=Dn.polygonOffset_offset,Yn=un.polygonOffset_offset,xa=Dn.sample_coverage,Qi=un.sample_coverage,Nn=Dn.stencil_func,Pn=un.stencil_func,qa=Dn.stencil_opFront,jo=un.stencil_opFront,Vo=Dn.stencil_opBack,Pa=un.stencil_opBack,Oa=Dn.scissor_box,co=un.scissor_box,An=Dn.viewport,_o=un.viewport,ks={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},bs={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ps={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},sa={add:32774,subtract:32778,"reverse subtract":32779},Bn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ms={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},ya={cw:2304,ccw:2305},on={},mn={},Ga=new Float32Array(16),ca=new Float32Array(16),bn=new Float32Array(16),Xi=new Float32Array(16),qn=new Float32Array(16),Ia=new Float32Array(16),yn=new Float32Array(16),Ya=new Float32Array(16),ba=new Float32Array(16),Da=new Float32Array(16),Aa=new Float32Array(16),Ln=new Float32Array(16),wo=new Float32Array(16),wa=new Float32Array(16),$i=new Float32Array(16),ea=new Float32Array(16),Sa=new Float32Array(16),Za=new Float32Array(16),xo=new Float32Array(16),Wa=new Float32Array(16),hn=new Float32Array(16),Un=new Float32Array(16),Ss=new Float32Array(16),Kn=new Float32Array(16),ns=new Float32Array(16),Jo=new Float32Array(16),vo=new Float32Array(16),ma=new Float32Array(16),ja=new Float32Array(16),To=new Float32Array(16),Ao=new Float32Array(16),la=new Float32Array(16),{draw:function(Ki){var ho,Ka,Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs;if(ho=Cn.next,ho!==Cn.cur&&(ho?Hr.bindFramebuffer(36160,ho.framebuffer):Hr.bindFramebuffer(36160,null),Cn.cur=ho),un.dirty){var Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt;Fo=bo[0],Ys=bo[1],Gs=bo[2],Us=bo[3],(Fo!==Co[0]||Ys!==Co[1]||Gs!==Co[2]||Us!==Co[3])&&(Hr.colorMask(Fo,Ys,Gs,Us),Co[0]=Fo,Co[1]=Ys,Co[2]=Gs,Co[3]=Us),Sl=Dn.frontFace,Sl!==un.frontFace&&(Hr.frontFace(Sl),un.frontFace=Sl),_l=Dn.polygonOffset_enable,_l!==un.polygonOffset_enable&&(_l?Hr.enable(32823):Hr.disable(32823),un.polygonOffset_enable=_l),kl=Fi[0],cl=Fi[1],(kl!==Yn[0]||cl!==Yn[1])&&(Hr.polygonOffset(kl,cl),Yn[0]=kl,Yn[1]=cl),xl=Dn.sample_alpha,xl!==un.sample_alpha&&(xl?Hr.enable(32926):Hr.disable(32926),un.sample_alpha=xl),Uo=Dn.sample_enable,Uo!==un.sample_enable&&(Uo?Hr.enable(32928):Hr.disable(32928),un.sample_enable=Uo),_s=xa[0],Bl=xa[1],(_s!==Qi[0]||Bl!==Qi[1])&&(Hr.sampleCoverage(_s,Bl),Qi[0]=_s,Qi[1]=Bl),Il=Dn.stencil_enable,Il!==un.stencil_enable&&(Il?Hr.enable(2960):Hr.disable(2960),un.stencil_enable=Il),Dl=Dn.stencil_mask,Dl!==un.stencil_mask&&(Hr.stencilMask(Dl),un.stencil_mask=Dl),oe=Nn[0],w=Nn[1],B=Nn[2],(oe!==Pn[0]||w!==Pn[1]||B!==Pn[2])&&(Hr.stencilFunc(oe,w,B),Pn[0]=oe,Pn[1]=w,Pn[2]=B),Q=qa[0],ee=qa[1],le=qa[2],Ne=qa[3],(Q!==jo[0]||ee!==jo[1]||le!==jo[2]||Ne!==jo[3])&&(Hr.stencilOpSeparate(Q,ee,le,Ne),jo[0]=Q,jo[1]=ee,jo[2]=le,jo[3]=Ne),$e=Vo[0],pt=Vo[1],zt=Vo[2],Yt=Vo[3],($e!==Pa[0]||pt!==Pa[1]||zt!==Pa[2]||Yt!==Pa[3])&&(Hr.stencilOpSeparate($e,pt,zt,Yt),Pa[0]=$e,Pa[1]=pt,Pa[2]=zt,Pa[3]=Yt)}Ka=Ki.viewportX,on.x=Ka,Ca=Ki.viewportY,on.y=Ca,ta=Ki.viewportWidth,on.width=ta,En=Ki.viewportHeight,on.height=En,Mo=on.x|0,Ds=on.y|0,Ro="width"in on?on.width|0:na.framebufferWidth-Mo,vs="height"in on?on.height|0:na.framebufferHeight-Ds,Ks=na.viewportWidth,na.viewportWidth=Ro,as=na.viewportHeight,na.viewportHeight=vs,Hr.viewport(Mo,Ds,Ro,vs),_o[0]=Mo,_o[1]=Ds,_o[2]=Ro,_o[3]=vs,Hr.blendColor(0,0,0,0),Ri[0]=0,Ri[1]=0,Ri[2]=0,Ri[3]=0,n?Hr.enable(3042):Hr.disable(3042),un.blend_enable=n,Hr.blendEquationSeparate(32774,32774),cs[0]=32774,cs[1]=32774,Hr.blendFuncSeparate(770,771,1,1),ln[0]=770,ln[1]=771,ln[2]=1,ln[3]=1,i?Hr.enable(2884):Hr.disable(2884),un.cull_enable=i,Hr.cullFace(a),un.cull_face=a,o?Hr.enable(2929):Hr.disable(2929),un.depth_enable=o,Hr.depthFunc(s),un.depth_func=s,Hr.depthMask(u),un.depth_mask=u,Hr.depthRange(0,1),va[0]=0,va[1]=1,l?Hr.enable(3024):Hr.disable(3024),un.dither=l,Hr.lineWidth(f),un.lineWidth=f,Jn=Ki.scissorX,mn.x=Jn,Cs=Ki.scissorY,mn.y=Cs,Xa=Ki.scissorWidth,mn.width=Xa,Zo=Ki.scissorHeight,mn.height=Zo,Eo=mn.x|0,lo=mn.y|0,$a="width"in mn?mn.width|0:na.framebufferWidth-Eo,Xo="height"in mn?mn.height|0:na.framebufferHeight-lo,Hr.scissor(Eo,lo,$a,Xo),co[0]=Eo,co[1]=lo,co[2]=$a,co[3]=Xo,c?Hr.enable(3089):Hr.disable(3089),un.scissor_enable=c,rs=un.profile,un.profile=!1,Hr.useProgram(h.program),Ha.setVAO(null),$n=p.location,Sn=Ea[$n],Sn.buffer||Hr.enableVertexAttribArray($n),(Sn.type!==d.dtype||Sn.size!==4||Sn.buffer!==d||Sn.normalized!==!1||Sn.offset!==0||Sn.stride!==0)&&(Hr.bindBuffer(34962,d.buffer),Hr.vertexAttribPointer($n,4,d.dtype,!1,0,0),Sn.type=d.dtype,Sn.size=4,Sn.buffer=d,Sn.normalized=!1,Sn.offset=0,Sn.stride=0),uo=b.location,Rs=Ea[uo],Rs.buffer||Hr.enableVertexAttribArray(uo),(Rs.type!==x.dtype||Rs.size!==4||Rs.buffer!==x||Rs.normalized!==!1||Rs.offset!==0||Rs.stride!==0)&&(Hr.bindBuffer(34962,x.buffer),Hr.vertexAttribPointer(uo,4,x.dtype,!1,0,0),Rs.type=x.dtype,Rs.size=4,Rs.buffer=x,Rs.normalized=!1,Rs.offset=0,Rs.stride=0),xs=k.location,Go=Ea[xs],Go.buffer||Hr.enableVertexAttribArray(xs),(Go.type!==y.dtype||Go.size!==4||Go.buffer!==y||Go.normalized!==!1||Go.offset!==0||Go.stride!==0)&&(Hr.bindBuffer(34962,y.buffer),Hr.vertexAttribPointer(xs,4,y.dtype,!1,0,0),Go.type=y.dtype,Go.size=4,Go.buffer=y,Go.normalized=!1,Go.offset=0,Go.stride=0),os=A.location,So=Ea[os],So.buffer||Hr.enableVertexAttribArray(os),(So.type!==E.dtype||So.size!==4||So.buffer!==E||So.normalized!==!1||So.offset!==0||So.stride!==0)&&(Hr.bindBuffer(34962,E.buffer),Hr.vertexAttribPointer(os,4,E.dtype,!1,0,0),So.type=E.dtype,So.size=4,So.buffer=E,So.normalized=!1,So.offset=0,So.stride=0),Qn=_.location,zo=Ea[Qn],zo.buffer||Hr.enableVertexAttribArray(Qn),(zo.type!==L.dtype||zo.size!==4||zo.buffer!==L||zo.normalized!==!1||zo.offset!==0||zo.stride!==0)&&(Hr.bindBuffer(34962,L.buffer),Hr.vertexAttribPointer(Qn,4,L.dtype,!1,0,0),zo.type=L.dtype,zo.size=4,zo.buffer=L,zo.normalized=!1,zo.offset=0,zo.stride=0),rl=M.location,$o=Ea[rl],$o.buffer||Hr.enableVertexAttribArray(rl),($o.type!==C.dtype||$o.size!==4||$o.buffer!==C||$o.normalized!==!1||$o.offset!==0||$o.stride!==0)&&(Hr.bindBuffer(34962,C.buffer),Hr.vertexAttribPointer(rl,4,C.dtype,!1,0,0),$o.type=C.dtype,$o.size=4,$o.buffer=C,$o.normalized=!1,$o.offset=0,$o.stride=0),Na=z.location,Ua=Ea[Na],Ua.buffer||Hr.enableVertexAttribArray(Na),(Ua.type!==v.dtype||Ua.size!==4||Ua.buffer!==v||Ua.normalized!==!1||Ua.offset!==0||Ua.stride!==0)&&(Hr.bindBuffer(34962,v.buffer),Hr.vertexAttribPointer(Na,4,v.dtype,!1,0,0),Ua.type=v.dtype,Ua.size=4,Ua.buffer=v,Ua.normalized=!1,Ua.offset=0,Ua.stride=0),Po=F.location,fo=Ea[Po],fo.buffer||Hr.enableVertexAttribArray(Po),(fo.type!==T.dtype||fo.size!==4||fo.buffer!==T||fo.normalized!==!1||fo.offset!==0||fo.stride!==0)&&(Hr.bindBuffer(34962,T.buffer),Hr.vertexAttribPointer(Po,4,T.dtype,!1,0,0),fo.type=T.dtype,fo.size=4,fo.buffer=T,fo.normalized=!1,fo.offset=0,fo.stride=0),ro=U.location,Ma=Ea[ro],Ma.buffer||Hr.enableVertexAttribArray(ro),(Ma.type!==q.dtype||Ma.size!==4||Ma.buffer!==q||Ma.normalized!==!1||Ma.offset!==0||Ma.stride!==0)&&(Hr.bindBuffer(34962,q.buffer),Hr.vertexAttribPointer(ro,4,q.dtype,!1,0,0),Ma.type=q.dtype,Ma.size=4,Ma.buffer=q,Ma.normalized=!1,Ma.offset=0,Ma.stride=0),io=j.location,aa=Ea[io],aa.buffer||Hr.enableVertexAttribArray(io),(aa.type!==H.dtype||aa.size!==4||aa.buffer!==H||aa.normalized!==!1||aa.offset!==0||aa.stride!==0)&&(Hr.bindBuffer(34962,H.buffer),Hr.vertexAttribPointer(io,4,H.dtype,!1,0,0),aa.type=H.dtype,aa.size=4,aa.buffer=H,aa.normalized=!1,aa.offset=0,aa.stride=0),Oo=O.location,No=Ea[Oo],No.buffer||Hr.enableVertexAttribArray(Oo),(No.type!==G.dtype||No.size!==4||No.buffer!==G||No.normalized!==!1||No.offset!==0||No.stride!==0)&&(Hr.bindBuffer(34962,G.buffer),Hr.vertexAttribPointer(Oo,4,G.dtype,!1,0,0),No.type=G.dtype,No.size=4,No.buffer=G,No.normalized=!1,No.offset=0,No.stride=0),Zs=re.location,Fs=Ea[Zs],Fs.buffer||Hr.enableVertexAttribArray(Zs),(Fs.type!==W.dtype||Fs.size!==4||Fs.buffer!==W||Fs.normalized!==!1||Fs.offset!==0||Fs.stride!==0)&&(Hr.bindBuffer(34962,W.buffer),Hr.vertexAttribPointer(Zs,4,W.dtype,!1,0,0),Fs.type=W.dtype,Fs.size=4,Fs.buffer=W,Fs.normalized=!1,Fs.offset=0,Fs.stride=0),ws=be.location,no=Ea[ws],no.buffer||Hr.enableVertexAttribArray(ws),(no.type!==ne.dtype||no.size!==4||no.buffer!==ne||no.normalized!==!1||no.offset!==0||no.stride!==0)&&(Hr.bindBuffer(34962,ne.buffer),Hr.vertexAttribPointer(ws,4,ne.dtype,!1,0,0),no.type=ne.dtype,no.size=4,no.buffer=ne,no.normalized=!1,no.offset=0,no.stride=0),Ls=Ce.location,ds=Ea[Ls],ds.buffer||Hr.enableVertexAttribArray(Ls),(ds.type!==ze.dtype||ds.size!==4||ds.buffer!==ze||ds.normalized!==!1||ds.offset!==0||ds.stride!==0)&&(Hr.bindBuffer(34962,ze.buffer),Hr.vertexAttribPointer(Ls,4,ze.dtype,!1,0,0),ds.type=ze.dtype,ds.size=4,ds.buffer=ze,ds.normalized=!1,ds.offset=0,ds.stride=0),Xs=te.location,oa=Ea[Xs],oa.buffer||Hr.enableVertexAttribArray(Xs),(oa.type!==he.dtype||oa.size!==4||oa.buffer!==he||oa.normalized!==!1||oa.offset!==0||oa.stride!==0)&&(Hr.bindBuffer(34962,he.buffer),Hr.vertexAttribPointer(Xs,4,he.dtype,!1,0,0),oa.type=he.dtype,oa.size=4,oa.buffer=he,oa.normalized=!1,oa.offset=0,oa.stride=0),Yo=Ee.location,po=Ea[Yo],po.buffer||Hr.enableVertexAttribArray(Yo),(po.type!==ke.dtype||po.size!==4||po.buffer!==ke||po.normalized!==!1||po.offset!==0||po.stride!==0)&&(Hr.bindBuffer(34962,ke.buffer),Hr.vertexAttribPointer(Yo,4,ke.dtype,!1,0,0),po.type=ke.dtype,po.size=4,po.buffer=ke,po.normalized=!1,po.offset=0,po.stride=0),ss=Ki.contextColor,ls=ss[0],gs=ss[1],bt=ss[2],Ft=ss[3],Hr.uniform4f(Me.location,ls,gs,bt,Ft),hr=Ki.dim0A,Hr.uniformMatrix4fv(Oe.location,!1,Array.isArray(hr)||hr instanceof Float32Array?hr:(Ga[0]=hr[0],Ga[1]=hr[1],Ga[2]=hr[2],Ga[3]=hr[3],Ga[4]=hr[4],Ga[5]=hr[5],Ga[6]=hr[6],Ga[7]=hr[7],Ga[8]=hr[8],Ga[9]=hr[9],Ga[10]=hr[10],Ga[11]=hr[11],Ga[12]=hr[12],Ga[13]=hr[13],Ga[14]=hr[14],Ga[15]=hr[15],Ga)),nr=Ki.dim0B,Hr.uniformMatrix4fv(Re.location,!1,Array.isArray(nr)||nr instanceof Float32Array?nr:(ca[0]=nr[0],ca[1]=nr[1],ca[2]=nr[2],ca[3]=nr[3],ca[4]=nr[4],ca[5]=nr[5],ca[6]=nr[6],ca[7]=nr[7],ca[8]=nr[8],ca[9]=nr[9],ca[10]=nr[10],ca[11]=nr[11],ca[12]=nr[12],ca[13]=nr[13],ca[14]=nr[14],ca[15]=nr[15],ca)),Sr=Ki.dim0C,Hr.uniformMatrix4fv(me.location,!1,Array.isArray(Sr)||Sr instanceof Float32Array?Sr:(bn[0]=Sr[0],bn[1]=Sr[1],bn[2]=Sr[2],bn[3]=Sr[3],bn[4]=Sr[4],bn[5]=Sr[5],bn[6]=Sr[6],bn[7]=Sr[7],bn[8]=Sr[8],bn[9]=Sr[9],bn[10]=Sr[10],bn[11]=Sr[11],bn[12]=Sr[12],bn[13]=Sr[13],bn[14]=Sr[14],bn[15]=Sr[15],bn)),li=Ki.dim0D,Hr.uniformMatrix4fv(Be.location,!1,Array.isArray(li)||li instanceof Float32Array?li:(Xi[0]=li[0],Xi[1]=li[1],Xi[2]=li[2],Xi[3]=li[3],Xi[4]=li[4],Xi[5]=li[5],Xi[6]=li[6],Xi[7]=li[7],Xi[8]=li[8],Xi[9]=li[9],Xi[10]=li[10],Xi[11]=li[11],Xi[12]=li[12],Xi[13]=li[13],Xi[14]=li[14],Xi[15]=li[15],Xi)),di=Ki.dim1A,Hr.uniformMatrix4fv(fe.location,!1,Array.isArray(di)||di instanceof Float32Array?di:(qn[0]=di[0],qn[1]=di[1],qn[2]=di[2],qn[3]=di[3],qn[4]=di[4],qn[5]=di[5],qn[6]=di[6],qn[7]=di[7],qn[8]=di[8],qn[9]=di[9],qn[10]=di[10],qn[11]=di[11],qn[12]=di[12],qn[13]=di[13],qn[14]=di[14],qn[15]=di[15],qn)),mi=Ki.dim1B,Hr.uniformMatrix4fv(Ze.location,!1,Array.isArray(mi)||mi instanceof Float32Array?mi:(Ia[0]=mi[0],Ia[1]=mi[1],Ia[2]=mi[2],Ia[3]=mi[3],Ia[4]=mi[4],Ia[5]=mi[5],Ia[6]=mi[6],Ia[7]=mi[7],Ia[8]=mi[8],Ia[9]=mi[9],Ia[10]=mi[10],Ia[11]=mi[11],Ia[12]=mi[12],Ia[13]=mi[13],Ia[14]=mi[14],Ia[15]=mi[15],Ia)),Oi=Ki.dim1C,Hr.uniformMatrix4fv(et.location,!1,Array.isArray(Oi)||Oi instanceof Float32Array?Oi:(yn[0]=Oi[0],yn[1]=Oi[1],yn[2]=Oi[2],yn[3]=Oi[3],yn[4]=Oi[4],yn[5]=Oi[5],yn[6]=Oi[6],yn[7]=Oi[7],yn[8]=Oi[8],yn[9]=Oi[9],yn[10]=Oi[10],yn[11]=Oi[11],yn[12]=Oi[12],yn[13]=Oi[13],yn[14]=Oi[14],yn[15]=Oi[15],yn)),dn=Ki.dim1D,Hr.uniformMatrix4fv(gt.location,!1,Array.isArray(dn)||dn instanceof Float32Array?dn:(Ya[0]=dn[0],Ya[1]=dn[1],Ya[2]=dn[2],Ya[3]=dn[3],Ya[4]=dn[4],Ya[5]=dn[5],Ya[6]=dn[6],Ya[7]=dn[7],Ya[8]=dn[8],Ya[9]=dn[9],Ya[10]=dn[10],Ya[11]=dn[11],Ya[12]=dn[12],Ya[13]=dn[13],Ya[14]=dn[14],Ya[15]=dn[15],Ya)),wi=Ki.drwLayer,Hr.uniform1f(Pt.location,wi),ui=Ki.hiA,Hr.uniformMatrix4fv(Qe.location,!1,Array.isArray(ui)||ui instanceof Float32Array?ui:(ba[0]=ui[0],ba[1]=ui[1],ba[2]=ui[2],ba[3]=ui[3],ba[4]=ui[4],ba[5]=ui[5],ba[6]=ui[6],ba[7]=ui[7],ba[8]=ui[8],ba[9]=ui[9],ba[10]=ui[10],ba[11]=ui[11],ba[12]=ui[12],ba[13]=ui[13],ba[14]=ui[14],ba[15]=ui[15],ba)),Ai=Ki.hiB,Hr.uniformMatrix4fv(Xe.location,!1,Array.isArray(Ai)||Ai instanceof Float32Array?Ai:(Da[0]=Ai[0],Da[1]=Ai[1],Da[2]=Ai[2],Da[3]=Ai[3],Da[4]=Ai[4],Da[5]=Ai[5],Da[6]=Ai[6],Da[7]=Ai[7],Da[8]=Ai[8],Da[9]=Ai[9],Da[10]=Ai[10],Da[11]=Ai[11],Da[12]=Ai[12],Da[13]=Ai[13],Da[14]=Ai[14],Da[15]=Ai[15],Da)),gi=Ki.hiC,Hr.uniformMatrix4fv(Tt.location,!1,Array.isArray(gi)||gi instanceof Float32Array?gi:(Aa[0]=gi[0],Aa[1]=gi[1],Aa[2]=gi[2],Aa[3]=gi[3],Aa[4]=gi[4],Aa[5]=gi[5],Aa[6]=gi[6],Aa[7]=gi[7],Aa[8]=gi[8],Aa[9]=gi[9],Aa[10]=gi[10],Aa[11]=gi[11],Aa[12]=gi[12],Aa[13]=gi[13],Aa[14]=gi[14],Aa[15]=gi[15],Aa)),gn=Ki.hiD,Hr.uniformMatrix4fv(xt.location,!1,Array.isArray(gn)||gn instanceof Float32Array?gn:(Ln[0]=gn[0],Ln[1]=gn[1],Ln[2]=gn[2],Ln[3]=gn[3],Ln[4]=gn[4],Ln[5]=gn[5],Ln[6]=gn[6],Ln[7]=gn[7],Ln[8]=gn[8],Ln[9]=gn[9],Ln[10]=gn[10],Ln[11]=gn[11],Ln[12]=gn[12],Ln[13]=gn[13],Ln[14]=gn[14],Ln[15]=gn[15],Ln)),In=Ki.loA,Hr.uniformMatrix4fv(_t.location,!1,Array.isArray(In)||In instanceof Float32Array?In:(wo[0]=In[0],wo[1]=In[1],wo[2]=In[2],wo[3]=In[3],wo[4]=In[4],wo[5]=In[5],wo[6]=In[6],wo[7]=In[7],wo[8]=In[8],wo[9]=In[9],wo[10]=In[10],wo[11]=In[11],wo[12]=In[12],wo[13]=In[13],wo[14]=In[14],wo[15]=In[15],wo)),Vn=Ki.loB,Hr.uniformMatrix4fv(Ct.location,!1,Array.isArray(Vn)||Vn instanceof Float32Array?Vn:(wa[0]=Vn[0],wa[1]=Vn[1],wa[2]=Vn[2],wa[3]=Vn[3],wa[4]=Vn[4],wa[5]=Vn[5],wa[6]=Vn[6],wa[7]=Vn[7],wa[8]=Vn[8],wa[9]=Vn[9],wa[10]=Vn[10],wa[11]=Vn[11],wa[12]=Vn[12],wa[13]=Vn[13],wa[14]=Vn[14],wa[15]=Vn[15],wa)),Rn=Ki.loC,Hr.uniformMatrix4fv(jt.location,!1,Array.isArray(Rn)||Rn instanceof Float32Array?Rn:($i[0]=Rn[0],$i[1]=Rn[1],$i[2]=Rn[2],$i[3]=Rn[3],$i[4]=Rn[4],$i[5]=Rn[5],$i[6]=Rn[6],$i[7]=Rn[7],$i[8]=Rn[8],$i[9]=Rn[9],$i[10]=Rn[10],$i[11]=Rn[11],$i[12]=Rn[12],$i[13]=Rn[13],$i[14]=Rn[14],$i[15]=Rn[15],$i)),Hn=Ki.loD,Hr.uniformMatrix4fv(At.location,!1,Array.isArray(Hn)||Hn instanceof Float32Array?Hn:(ea[0]=Hn[0],ea[1]=Hn[1],ea[2]=Hn[2],ea[3]=Hn[3],ea[4]=Hn[4],ea[5]=Hn[5],ea[6]=Hn[6],ea[7]=Hn[7],ea[8]=Hn[8],ea[9]=Hn[9],ea[10]=Hn[10],ea[11]=Hn[11],ea[12]=Hn[12],ea[13]=Hn[13],ea[14]=Hn[14],ea[15]=Hn[15],ea)),Gn=Ki.maskHeight,Hr.uniform1f(Te.location,Gn),pn=Ki.maskTexture,pn&&pn._reglType==="framebuffer"&&(pn=pn.color[0]),Lo=pn._texture,Hr.uniform1i(nt.location,Lo.bind()),Hr.uniform1i(ut.location,ct.bind()),us=Ki.resolution,Bs=us[0],Js=us[1],Hr.uniform2f(rt.location,Bs,Js),ol=Ki.viewBoxPos,Cl=ol[0],ul=ol[1],Hr.uniform2f(je.location,Cl,ul),Gl=Ki.viewBoxSize,Vl=Gl[0],Fl=Gl[1],Hr.uniform2f(tt.location,Vl,Fl),ga=Zn.elements,ga?Hr.bindBuffer(34963,ga.buffer.buffer):Ha.currentVAO&&(ga=Wo.getElements(Ha.currentVAO.elements),ga&&Hr.bindBuffer(34963,ga.buffer.buffer)),ko=Ki.offset,zs=Ki.count,zs&&(ga?Hr.drawElements(1,zs,ga.type,ko<<(ga.type-5121>>1)):Hr.drawArrays(1,ko,zs),un.dirty=!0,Ha.setVAO(null),na.viewportWidth=Ks,na.viewportHeight=as,un.profile=rs,Lo.unbind(),ct.unbind())},scope:function(Ki,ho,Ka){var Ca,ta,En,Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo,rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi,Oi,dn,wi,ui,Ai,gi,gn,In,Vn,Rn,Hn,Gn,pn,Lo,us,Bs,Js,ol,Cl,ul,Gl,Vl,Fl,ga,ko,zs,Fo,Ys,Gs,Us,Sl,_l,kl,cl,xl,Uo,_s,Bl,Il,Dl,oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft,qt,Xt,$t,dr,Mr,$r,ii,pi,Yi,wn,Tn,ua,oo,el,ys,il,$l,pl,Hl,Ll,Ql,ku,Jl,Kl,Hu,tf,Ku,Gu,Wu,sf,gf,nf,af,X,se,Le,We,Ye,it,Nt,mt,er,_r,wr,ni,Wr,Ci,Ji,ai,Ti,Bi,en,Wi,bi,ao,yo,Ko,Ms,vl,wl,au,Al,nu,Bu,qu,Ju,qo,Rl,pu,xu,of,ff,xf,hf,dc,Gt,jr,_i,Mn,Ta,fa,ha,Io,Vs,Hs,is,su,Ps,qs,Do,kn,La,Es,Ws,Qo,bl,nl,ru,hs,Ho,ql,yl,tl,js,zl,lu,bu,al,jl,mu,Tu,Ru,Rf,Cc,rf,Lc,wf,pc,vc,qc,If,Ac,zc,Vu,Bc,Ou,Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It,Qt,ar,mr,Pr,Dr,Xr,Gr,Fr,Kr,Cr,yi,qi,vn,Qa,ra,mo,sl,Os,eo,fs,es,$s,Ml,Mu,Au,$u,du,Nu,yf,Kf,wd,Td;Ca=Ki.viewportX,on.x=Ca,ta=Ki.viewportY,on.y=ta,En=Ki.viewportWidth,on.width=En,Mo=Ki.viewportHeight,on.height=Mo,Ds=on.x|0,Ro=on.y|0,vs="width"in on?on.width|0:na.framebufferWidth-Ds,Ks="height"in on?on.height|0:na.framebufferHeight-Ro,as=na.viewportWidth,na.viewportWidth=vs,Jn=na.viewportHeight,na.viewportHeight=Ks,Cs=An[0],An[0]=Ds,Xa=An[1],An[1]=Ro,Zo=An[2],An[2]=vs,Eo=An[3],An[3]=Ks,lo=to[0],to[0]=Je,$a=to[1],to[1]=Mt,Xo=to[2],to[2]=Vt,rs=to[3],to[3]=Kt,$n=Dn.blend_enable,Dn.blend_enable=ir,Sn=an[0],an[0]=fr,uo=an[1],an[1]=Ot,Rs=pa[0],pa[0]=De,xs=pa[1],pa[1]=_e,Go=pa[2],pa[2]=Fe,os=pa[3],pa[3]=Pe,So=Dn.cull_enable,Dn.cull_enable=Ie,Qn=Dn.cull_face,Dn.cull_face=lt,zo=Dn.depth_enable,Dn.depth_enable=ye,rl=Dn.depth_func,Dn.depth_func=ue,$o=Dn.depth_mask,Dn.depth_mask=de,Na=ka[0],ka[0]=ht,Ua=ka[1],ka[1]=Et,Po=Dn.dither,Dn.dither=St,fo=Dn.lineWidth,Dn.lineWidth=Zt,ro=Ki.scissorX,mn.x=ro,Ma=Ki.scissorY,mn.y=Ma,io=Ki.scissorWidth,mn.width=io,aa=Ki.scissorHeight,mn.height=aa,Oo=mn.x|0,No=mn.y|0,Zs="width"in mn?mn.width|0:na.framebufferWidth-Oo,Fs="height"in mn?mn.height|0:na.framebufferHeight-No,ws=Oa[0],Oa[0]=Oo,no=Oa[1],Oa[1]=No,Ls=Oa[2],Oa[2]=Zs,ds=Oa[3],Oa[3]=Fs,Xs=Dn.scissor_enable,Dn.scissor_enable=qr,oa=un.profile,un.profile=!1,Yo=Ki.offset,po=Zn.offset,Zn.offset=Yo,ss=Ki.count,ls=Zn.count,Zn.count=ss,gs=Zn.primitive,Zn.primitive=Lr,bt=tn[Er],tn[Er]=vr,Ft=Ki.resolution,hr=tn[si],tn[si]=Ft,nr=Ki.viewBoxPos,Sr=tn[Ei],tn[Ei]=nr,li=Ki.viewBoxSize,di=tn[Si],tn[Si]=li,mi=Ki.dim0A,Oi=tn[xi],tn[xi]=mi,dn=Ki.dim1A,wi=tn[Hi],tn[Hi]=dn,ui=Ki.dim0B,Ai=tn[Jr],tn[Jr]=ui,gi=Ki.dim1B,gn=tn[ci],tn[ci]=gi,In=Ki.dim0C,Vn=tn[Di],tn[Di]=In,Rn=Ki.dim1C,Hn=tn[Lt],tn[Lt]=Rn,Gn=Ki.dim0D,pn=tn[vt],tn[vt]=Gn,Lo=Ki.dim1D,us=tn[Dt],tn[Dt]=Lo,Bs=Ki.loA,Js=tn[Bt],tn[Bt]=Bs,ol=Ki.hiA,Cl=tn[sr],tn[sr]=ol,ul=Ki.loB,Gl=tn[br],tn[br]=ul,Vl=Ki.hiB,Fl=tn[zr],tn[zr]=Vl,ga=Ki.loC,ko=tn[Tr],tn[Tr]=ga,zs=Ki.hiC,Fo=tn[Rr],tn[Rr]=zs,Ys=Ki.loD,Gs=tn[Br],tn[Br]=Ys,Us=Ki.hiD,Sl=tn[oi],tn[oi]=Us,_l=Ki.contextColor,kl=tn[vi],tn[vi]=_l,cl=Ki.maskTexture,xl=tn[Pi],tn[Pi]=cl,Uo=Ki.drwLayer,_s=tn[Yr],tn[Yr]=Uo,Bl=Ki.maskHeight,Il=tn[Ni],tn[Ni]=Bl,Dl=Ur.state,Ur.state=1,oe=Ur.x,Ur.x=0,w=Ur.y,Ur.y=0,B=Ur.z,Ur.z=0,Q=Ur.w,Ur.w=0,ee=Ur.buffer,Ur.buffer=x,le=Ur.size,Ur.size=0,Ne=Ur.normalized,Ur.normalized=!1,$e=Ur.type,Ur.type=x.dtype,pt=Ur.offset,Ur.offset=0,zt=Ur.stride,Ur.stride=0,Yt=Ur.divisor,Ur.divisor=0,Jt=ti.state,ti.state=1,yr=ti.x,ti.x=0,Ir=ti.y,ti.y=0,ce=ti.z,ti.z=0,Ae=ti.w,ti.w=0,qe=ti.buffer,ti.buffer=y,Ve=ti.size,ti.size=0,ot=ti.normalized,ti.normalized=!1,Ke=ti.type,ti.type=y.dtype,ft=ti.offset,ti.offset=0,qt=ti.stride,ti.stride=0,Xt=ti.divisor,ti.divisor=0,$t=ki.state,ki.state=1,dr=ki.x,ki.x=0,Mr=ki.y,ki.y=0,$r=ki.z,ki.z=0,ii=ki.w,ki.w=0,pi=ki.buffer,ki.buffer=E,Yi=ki.size,ki.size=0,wn=ki.normalized,ki.normalized=!1,Tn=ki.type,ki.type=E.dtype,ua=ki.offset,ki.offset=0,oo=ki.stride,ki.stride=0,el=ki.divisor,ki.divisor=0,ys=ji.state,ji.state=1,il=ji.x,ji.x=0,$l=ji.y,ji.y=0,pl=ji.z,ji.z=0,Hl=ji.w,ji.w=0,Ll=ji.buffer,ji.buffer=L,Ql=ji.size,ji.size=0,ku=ji.normalized,ji.normalized=!1,Jl=ji.type,ji.type=L.dtype,Kl=ji.offset,ji.offset=0,Hu=ji.stride,ji.stride=0,tf=ji.divisor,ji.divisor=0,Ku=Vi.state,Vi.state=1,Gu=Vi.x,Vi.x=0,Wu=Vi.y,Vi.y=0,sf=Vi.z,Vi.z=0,gf=Vi.w,Vi.w=0,nf=Vi.buffer,Vi.buffer=C,af=Vi.size,Vi.size=0,X=Vi.normalized,Vi.normalized=!1,se=Vi.type,Vi.type=C.dtype,Le=Vi.offset,Vi.offset=0,We=Vi.stride,Vi.stride=0,Ye=Vi.divisor,Vi.divisor=0,it=zi.state,zi.state=1,Nt=zi.x,zi.x=0,mt=zi.y,zi.y=0,er=zi.z,zi.z=0,_r=zi.w,zi.w=0,wr=zi.buffer,zi.buffer=v,ni=zi.size,zi.size=0,Wr=zi.normalized,zi.normalized=!1,Ci=zi.type,zi.type=v.dtype,Ji=zi.offset,zi.offset=0,ai=zi.stride,zi.stride=0,Ti=zi.divisor,zi.divisor=0,Bi=Mi.state,Mi.state=1,en=Mi.x,Mi.x=0,Wi=Mi.y,Mi.y=0,bi=Mi.z,Mi.z=0,ao=Mi.w,Mi.w=0,yo=Mi.buffer,Mi.buffer=T,Ko=Mi.size,Mi.size=0,Ms=Mi.normalized,Mi.normalized=!1,vl=Mi.type,Mi.type=T.dtype,wl=Mi.offset,Mi.offset=0,au=Mi.stride,Mi.stride=0,Al=Mi.divisor,Mi.divisor=0,nu=sn.state,sn.state=1,Bu=sn.x,sn.x=0,qu=sn.y,sn.y=0,Ju=sn.z,sn.z=0,qo=sn.w,sn.w=0,Rl=sn.buffer,sn.buffer=q,pu=sn.size,sn.size=0,xu=sn.normalized,sn.normalized=!1,of=sn.type,sn.type=q.dtype,ff=sn.offset,sn.offset=0,xf=sn.stride,sn.stride=0,hf=sn.divisor,sn.divisor=0,dc=fi.state,fi.state=1,Gt=fi.x,fi.x=0,jr=fi.y,fi.y=0,_i=fi.z,fi.z=0,Mn=fi.w,fi.w=0,Ta=fi.buffer,fi.buffer=H,fa=fi.size,fi.size=0,ha=fi.normalized,fi.normalized=!1,Io=fi.type,fi.type=H.dtype,Vs=fi.offset,fi.offset=0,Hs=fi.stride,fi.stride=0,is=fi.divisor,fi.divisor=0,su=Or.state,Or.state=1,Ps=Or.x,Or.x=0,qs=Or.y,Or.y=0,Do=Or.z,Or.z=0,kn=Or.w,Or.w=0,La=Or.buffer,Or.buffer=G,Es=Or.size,Or.size=0,Ws=Or.normalized,Or.normalized=!1,Qo=Or.type,Or.type=G.dtype,bl=Or.offset,Or.offset=0,nl=Or.stride,Or.stride=0,ru=Or.divisor,Or.divisor=0,hs=st.state,st.state=1,Ho=st.x,st.x=0,ql=st.y,st.y=0,yl=st.z,st.z=0,tl=st.w,st.w=0,js=st.buffer,st.buffer=W,zl=st.size,st.size=0,lu=st.normalized,st.normalized=!1,bu=st.type,st.type=W.dtype,al=st.offset,st.offset=0,jl=st.stride,st.stride=0,mu=st.divisor,st.divisor=0,Tu=Wt.state,Wt.state=1,Ru=Wt.x,Wt.x=0,Rf=Wt.y,Wt.y=0,Cc=Wt.z,Wt.z=0,rf=Wt.w,Wt.w=0,Lc=Wt.buffer,Wt.buffer=ne,wf=Wt.size,Wt.size=0,pc=Wt.normalized,Wt.normalized=!1,vc=Wt.type,Wt.type=ne.dtype,qc=Wt.offset,Wt.offset=0,If=Wt.stride,Wt.stride=0,Ac=Wt.divisor,Wt.divisor=0,zc=tr.state,tr.state=1,Vu=tr.x,tr.x=0,Bc=tr.y,tr.y=0,Ou=tr.z,tr.z=0,Y=tr.w,tr.w=0,R=tr.buffer,tr.buffer=ze,K=tr.size,tr.size=0,N=tr.normalized,tr.normalized=!1,$=tr.type,tr.type=ze.dtype,we=tr.offset,tr.offset=0,ge=tr.stride,tr.stride=0,Ue=tr.divisor,tr.divisor=0,dt=or.state,or.state=1,Rt=or.x,or.x=0,ur=or.y,or.y=0,gr=or.z,or.z=0,cr=or.w,or.w=0,It=or.buffer,or.buffer=he,Qt=or.size,or.size=0,ar=or.normalized,or.normalized=!1,mr=or.type,or.type=he.dtype,Pr=or.offset,or.offset=0,Dr=or.stride,or.stride=0,Xr=or.divisor,or.divisor=0,Gr=Nr.state,Nr.state=1,Fr=Nr.x,Nr.x=0,Kr=Nr.y,Nr.y=0,Cr=Nr.z,Nr.z=0,yi=Nr.w,Nr.w=0,qi=Nr.buffer,Nr.buffer=ke,vn=Nr.size,Nr.size=0,Qa=Nr.normalized,Nr.normalized=!1,ra=Nr.type,Nr.type=ke.dtype,mo=Nr.offset,Nr.offset=0,sl=Nr.stride,Nr.stride=0,Os=Nr.divisor,Nr.divisor=0,eo=hi.state,hi.state=1,fs=hi.x,hi.x=0,es=hi.y,hi.y=0,$s=hi.z,hi.z=0,Ml=hi.w,hi.w=0,Mu=hi.buffer,hi.buffer=d,Au=hi.size,hi.size=0,$u=hi.normalized,hi.normalized=!1,du=hi.type,hi.type=d.dtype,Nu=hi.offset,hi.offset=0,yf=hi.stride,hi.stride=0,Kf=hi.divisor,hi.divisor=0,wd=Bo.vert,Bo.vert=Gi,Td=Bo.frag,Bo.frag=Qr,un.dirty=!0,ho(na,Ki,Ka),na.viewportWidth=as,na.viewportHeight=Jn,An[0]=Cs,An[1]=Xa,An[2]=Zo,An[3]=Eo,to[0]=lo,to[1]=$a,to[2]=Xo,to[3]=rs,Dn.blend_enable=$n,an[0]=Sn,an[1]=uo,pa[0]=Rs,pa[1]=xs,pa[2]=Go,pa[3]=os,Dn.cull_enable=So,Dn.cull_face=Qn,Dn.depth_enable=zo,Dn.depth_func=rl,Dn.depth_mask=$o,ka[0]=Na,ka[1]=Ua,Dn.dither=Po,Dn.lineWidth=fo,Oa[0]=ws,Oa[1]=no,Oa[2]=Ls,Oa[3]=ds,Dn.scissor_enable=Xs,un.profile=oa,Zn.offset=po,Zn.count=ls,Zn.primitive=gs,tn[Er]=bt,tn[si]=hr,tn[Ei]=Sr,tn[Si]=di,tn[xi]=Oi,tn[Hi]=wi,tn[Jr]=Ai,tn[ci]=gn,tn[Di]=Vn,tn[Lt]=Hn,tn[vt]=pn,tn[Dt]=us,tn[Bt]=Js,tn[sr]=Cl,tn[br]=Gl,tn[zr]=Fl,tn[Tr]=ko,tn[Rr]=Fo,tn[Br]=Gs,tn[oi]=Sl,tn[vi]=kl,tn[Pi]=xl,tn[Yr]=_s,tn[Ni]=Il,Ur.state=Dl,Ur.x=oe,Ur.y=w,Ur.z=B,Ur.w=Q,Ur.buffer=ee,Ur.size=le,Ur.normalized=Ne,Ur.type=$e,Ur.offset=pt,Ur.stride=zt,Ur.divisor=Yt,ti.state=Jt,ti.x=yr,ti.y=Ir,ti.z=ce,ti.w=Ae,ti.buffer=qe,ti.size=Ve,ti.normalized=ot,ti.type=Ke,ti.offset=ft,ti.stride=qt,ti.divisor=Xt,ki.state=$t,ki.x=dr,ki.y=Mr,ki.z=$r,ki.w=ii,ki.buffer=pi,ki.size=Yi,ki.normalized=wn,ki.type=Tn,ki.offset=ua,ki.stride=oo,ki.divisor=el,ji.state=ys,ji.x=il,ji.y=$l,ji.z=pl,ji.w=Hl,ji.buffer=Ll,ji.size=Ql,ji.normalized=ku,ji.type=Jl,ji.offset=Kl,ji.stride=Hu,ji.divisor=tf,Vi.state=Ku,Vi.x=Gu,Vi.y=Wu,Vi.z=sf,Vi.w=gf,Vi.buffer=nf,Vi.size=af,Vi.normalized=X,Vi.type=se,Vi.offset=Le,Vi.stride=We,Vi.divisor=Ye,zi.state=it,zi.x=Nt,zi.y=mt,zi.z=er,zi.w=_r,zi.buffer=wr,zi.size=ni,zi.normalized=Wr,zi.type=Ci,zi.offset=Ji,zi.stride=ai,zi.divisor=Ti,Mi.state=Bi,Mi.x=en,Mi.y=Wi,Mi.z=bi,Mi.w=ao,Mi.buffer=yo,Mi.size=Ko,Mi.normalized=Ms,Mi.type=vl,Mi.offset=wl,Mi.stride=au,Mi.divisor=Al,sn.state=nu,sn.x=Bu,sn.y=qu,sn.z=Ju,sn.w=qo,sn.buffer=Rl,sn.size=pu,sn.normalized=xu,sn.type=of,sn.offset=ff,sn.stride=xf,sn.divisor=hf,fi.state=dc,fi.x=Gt,fi.y=jr,fi.z=_i,fi.w=Mn,fi.buffer=Ta,fi.size=fa,fi.normalized=ha,fi.type=Io,fi.offset=Vs,fi.stride=Hs,fi.divisor=is,Or.state=su,Or.x=Ps,Or.y=qs,Or.z=Do,Or.w=kn,Or.buffer=La,Or.size=Es,Or.normalized=Ws,Or.type=Qo,Or.offset=bl,Or.stride=nl,Or.divisor=ru,st.state=hs,st.x=Ho,st.y=ql,st.z=yl,st.w=tl,st.buffer=js,st.size=zl,st.normalized=lu,st.type=bu,st.offset=al,st.stride=jl,st.divisor=mu,Wt.state=Tu,Wt.x=Ru,Wt.y=Rf,Wt.z=Cc,Wt.w=rf,Wt.buffer=Lc,Wt.size=wf,Wt.normalized=pc,Wt.type=vc,Wt.offset=qc,Wt.stride=If,Wt.divisor=Ac,tr.state=zc,tr.x=Vu,tr.y=Bc,tr.z=Ou,tr.w=Y,tr.buffer=R,tr.size=K,tr.normalized=N,tr.type=$,tr.offset=we,tr.stride=ge,tr.divisor=Ue,or.state=dt,or.x=Rt,or.y=ur,or.z=gr,or.w=cr,or.buffer=It,or.size=Qt,or.normalized=ar,or.type=mr,or.offset=Pr,or.stride=Dr,or.divisor=Xr,Nr.state=Gr,Nr.x=Fr,Nr.y=Kr,Nr.z=Cr,Nr.w=yi,Nr.buffer=qi,Nr.size=vn,Nr.normalized=Qa,Nr.type=ra,Nr.offset=mo,Nr.stride=sl,Nr.divisor=Os,hi.state=eo,hi.x=fs,hi.y=es,hi.z=$s,hi.w=Ml,hi.buffer=Mu,hi.size=Au,hi.normalized=$u,hi.type=du,hi.offset=Nu,hi.stride=yf,hi.divisor=Kf,Bo.vert=wd,Bo.frag=Td,un.dirty=!0},batch:function(Ki,ho){var Ka,Ca,ta,En;if(Ka=Cn.next,Ka!==Cn.cur&&(Ka?Hr.bindFramebuffer(36160,Ka.framebuffer):Hr.bindFramebuffer(36160,null),Cn.cur=Ka),un.dirty){var Mo,Ds,Ro,vs,Ks,as,Jn,Cs,Xa,Zo,Eo,lo,$a,Xo,rs,$n,Sn,uo,Rs,xs,Go,os,So,Qn,zo;Mo=bo[0],Ds=bo[1],Ro=bo[2],vs=bo[3],(Mo!==Co[0]||Ds!==Co[1]||Ro!==Co[2]||vs!==Co[3])&&(Hr.colorMask(Mo,Ds,Ro,vs),Co[0]=Mo,Co[1]=Ds,Co[2]=Ro,Co[3]=vs),Ks=Dn.frontFace,Ks!==un.frontFace&&(Hr.frontFace(Ks),un.frontFace=Ks),as=Dn.polygonOffset_enable,as!==un.polygonOffset_enable&&(as?Hr.enable(32823):Hr.disable(32823),un.polygonOffset_enable=as),Jn=Fi[0],Cs=Fi[1],(Jn!==Yn[0]||Cs!==Yn[1])&&(Hr.polygonOffset(Jn,Cs),Yn[0]=Jn,Yn[1]=Cs),Xa=Dn.sample_alpha,Xa!==un.sample_alpha&&(Xa?Hr.enable(32926):Hr.disable(32926),un.sample_alpha=Xa),Zo=Dn.sample_enable,Zo!==un.sample_enable&&(Zo?Hr.enable(32928):Hr.disable(32928),un.sample_enable=Zo),Eo=xa[0],lo=xa[1],(Eo!==Qi[0]||lo!==Qi[1])&&(Hr.sampleCoverage(Eo,lo),Qi[0]=Eo,Qi[1]=lo),$a=Dn.stencil_enable,$a!==un.stencil_enable&&($a?Hr.enable(2960):Hr.disable(2960),un.stencil_enable=$a),Xo=Dn.stencil_mask,Xo!==un.stencil_mask&&(Hr.stencilMask(Xo),un.stencil_mask=Xo),rs=Nn[0],$n=Nn[1],Sn=Nn[2],(rs!==Pn[0]||$n!==Pn[1]||Sn!==Pn[2])&&(Hr.stencilFunc(rs,$n,Sn),Pn[0]=rs,Pn[1]=$n,Pn[2]=Sn),uo=qa[0],Rs=qa[1],xs=qa[2],Go=qa[3],(uo!==jo[0]||Rs!==jo[1]||xs!==jo[2]||Go!==jo[3])&&(Hr.stencilOpSeparate(uo,Rs,xs,Go),jo[0]=uo,jo[1]=Rs,jo[2]=xs,jo[3]=Go),os=Vo[0],So=Vo[1],Qn=Vo[2],zo=Vo[3],(os!==Pa[0]||So!==Pa[1]||Qn!==Pa[2]||zo!==Pa[3])&&(Hr.stencilOpSeparate(os,So,Qn,zo),Pa[0]=os,Pa[1]=So,Pa[2]=Qn,Pa[3]=zo)}Hr.blendColor(0,0,0,0),Ri[0]=0,Ri[1]=0,Ri[2]=0,Ri[3]=0,Ui?Hr.enable(3042):Hr.disable(3042),un.blend_enable=Ui,Hr.blendEquationSeparate(32774,32774),cs[0]=32774,cs[1]=32774,Hr.blendFuncSeparate(770,771,1,1),ln[0]=770,ln[1]=771,ln[2]=1,ln[3]=1,zn?Hr.enable(2884):Hr.disable(2884),un.cull_enable=zn,Hr.cullFace(fn),un.cull_face=fn,xn?Hr.enable(2929):Hr.disable(2929),un.depth_enable=xn,Hr.depthFunc(_a),un.depth_func=_a,Hr.depthMask(Wn),un.depth_mask=Wn,Hr.depthRange(0,1),va[0]=0,va[1]=1,Fn?Hr.enable(3024):Hr.disable(3024),un.dither=Fn,Hr.lineWidth(ia),un.lineWidth=ia,za?Hr.enable(3089):Hr.disable(3089),un.scissor_enable=za,Ca=un.profile,un.profile=!1,Hr.useProgram(h.program);var rl,$o,Na,Ua,Po,fo,ro,Ma,io,aa,Oo,No,Zs,Fs,ws,no,Ls,ds,Xs,oa,Yo,po,ss,ls,gs,bt,Ft,hr,nr,Sr,li,di,mi;for(Ha.setVAO(null),rl=p.location,$o=Ea[rl],$o.buffer||Hr.enableVertexAttribArray(rl),($o.type!==d.dtype||$o.size!==4||$o.buffer!==d||$o.normalized!==!1||$o.offset!==0||$o.stride!==0)&&(Hr.bindBuffer(34962,d.buffer),Hr.vertexAttribPointer(rl,4,d.dtype,!1,0,0),$o.type=d.dtype,$o.size=4,$o.buffer=d,$o.normalized=!1,$o.offset=0,$o.stride=0),Na=b.location,Ua=Ea[Na],Ua.buffer||Hr.enableVertexAttribArray(Na),(Ua.type!==x.dtype||Ua.size!==4||Ua.buffer!==x||Ua.normalized!==!1||Ua.offset!==0||Ua.stride!==0)&&(Hr.bindBuffer(34962,x.buffer),Hr.vertexAttribPointer(Na,4,x.dtype,!1,0,0),Ua.type=x.dtype,Ua.size=4,Ua.buffer=x,Ua.normalized=!1,Ua.offset=0,Ua.stride=0),Po=k.location,fo=Ea[Po],fo.buffer||Hr.enableVertexAttribArray(Po),(fo.type!==y.dtype||fo.size!==4||fo.buffer!==y||fo.normalized!==!1||fo.offset!==0||fo.stride!==0)&&(Hr.bindBuffer(34962,y.buffer),Hr.vertexAttribPointer(Po,4,y.dtype,!1,0,0),fo.type=y.dtype,fo.size=4,fo.buffer=y,fo.normalized=!1,fo.offset=0,fo.stride=0),ro=A.location,Ma=Ea[ro],Ma.buffer||Hr.enableVertexAttribArray(ro),(Ma.type!==E.dtype||Ma.size!==4||Ma.buffer!==E||Ma.normalized!==!1||Ma.offset!==0||Ma.stride!==0)&&(Hr.bindBuffer(34962,E.buffer),Hr.vertexAttribPointer(ro,4,E.dtype,!1,0,0),Ma.type=E.dtype,Ma.size=4,Ma.buffer=E,Ma.normalized=!1,Ma.offset=0,Ma.stride=0),io=_.location,aa=Ea[io],aa.buffer||Hr.enableVertexAttribArray(io),(aa.type!==L.dtype||aa.size!==4||aa.buffer!==L||aa.normalized!==!1||aa.offset!==0||aa.stride!==0)&&(Hr.bindBuffer(34962,L.buffer),Hr.vertexAttribPointer(io,4,L.dtype,!1,0,0),aa.type=L.dtype,aa.size=4,aa.buffer=L,aa.normalized=!1,aa.offset=0,aa.stride=0),Oo=M.location,No=Ea[Oo],No.buffer||Hr.enableVertexAttribArray(Oo),(No.type!==C.dtype||No.size!==4||No.buffer!==C||No.normalized!==!1||No.offset!==0||No.stride!==0)&&(Hr.bindBuffer(34962,C.buffer),Hr.vertexAttribPointer(Oo,4,C.dtype,!1,0,0),No.type=C.dtype,No.size=4,No.buffer=C,No.normalized=!1,No.offset=0,No.stride=0),Zs=z.location,Fs=Ea[Zs],Fs.buffer||Hr.enableVertexAttribArray(Zs),(Fs.type!==v.dtype||Fs.size!==4||Fs.buffer!==v||Fs.normalized!==!1||Fs.offset!==0||Fs.stride!==0)&&(Hr.bindBuffer(34962,v.buffer),Hr.vertexAttribPointer(Zs,4,v.dtype,!1,0,0),Fs.type=v.dtype,Fs.size=4,Fs.buffer=v,Fs.normalized=!1,Fs.offset=0,Fs.stride=0),ws=F.location,no=Ea[ws],no.buffer||Hr.enableVertexAttribArray(ws),(no.type!==T.dtype||no.size!==4||no.buffer!==T||no.normalized!==!1||no.offset!==0||no.stride!==0)&&(Hr.bindBuffer(34962,T.buffer),Hr.vertexAttribPointer(ws,4,T.dtype,!1,0,0),no.type=T.dtype,no.size=4,no.buffer=T,no.normalized=!1,no.offset=0,no.stride=0),Ls=U.location,ds=Ea[Ls],ds.buffer||Hr.enableVertexAttribArray(Ls),(ds.type!==q.dtype||ds.size!==4||ds.buffer!==q||ds.normalized!==!1||ds.offset!==0||ds.stride!==0)&&(Hr.bindBuffer(34962,q.buffer),Hr.vertexAttribPointer(Ls,4,q.dtype,!1,0,0),ds.type=q.dtype,ds.size=4,ds.buffer=q,ds.normalized=!1,ds.offset=0,ds.stride=0),Xs=j.location,oa=Ea[Xs],oa.buffer||Hr.enableVertexAttribArray(Xs),(oa.type!==H.dtype||oa.size!==4||oa.buffer!==H||oa.normalized!==!1||oa.offset!==0||oa.stride!==0)&&(Hr.bindBuffer(34962,H.buffer),Hr.vertexAttribPointer(Xs,4,H.dtype,!1,0,0),oa.type=H.dtype,oa.size=4,oa.buffer=H,oa.normalized=!1,oa.offset=0,oa.stride=0),Yo=O.location,po=Ea[Yo],po.buffer||Hr.enableVertexAttribArray(Yo),(po.type!==G.dtype||po.size!==4||po.buffer!==G||po.normalized!==!1||po.offset!==0||po.stride!==0)&&(Hr.bindBuffer(34962,G.buffer),Hr.vertexAttribPointer(Yo,4,G.dtype,!1,0,0),po.type=G.dtype,po.size=4,po.buffer=G,po.normalized=!1,po.offset=0,po.stride=0),ss=re.location,ls=Ea[ss],ls.buffer||Hr.enableVertexAttribArray(ss),(ls.type!==W.dtype||ls.size!==4||ls.buffer!==W||ls.normalized!==!1||ls.offset!==0||ls.stride!==0)&&(Hr.bindBuffer(34962,W.buffer),Hr.vertexAttribPointer(ss,4,W.dtype,!1,0,0),ls.type=W.dtype,ls.size=4,ls.buffer=W,ls.normalized=!1,ls.offset=0,ls.stride=0),gs=be.location,bt=Ea[gs],bt.buffer||Hr.enableVertexAttribArray(gs),(bt.type!==ne.dtype||bt.size!==4||bt.buffer!==ne||bt.normalized!==!1||bt.offset!==0||bt.stride!==0)&&(Hr.bindBuffer(34962,ne.buffer),Hr.vertexAttribPointer(gs,4,ne.dtype,!1,0,0),bt.type=ne.dtype,bt.size=4,bt.buffer=ne,bt.normalized=!1,bt.offset=0,bt.stride=0),Ft=Ce.location,hr=Ea[Ft],hr.buffer||Hr.enableVertexAttribArray(Ft),(hr.type!==ze.dtype||hr.size!==4||hr.buffer!==ze||hr.normalized!==!1||hr.offset!==0||hr.stride!==0)&&(Hr.bindBuffer(34962,ze.buffer),Hr.vertexAttribPointer(Ft,4,ze.dtype,!1,0,0),hr.type=ze.dtype,hr.size=4,hr.buffer=ze,hr.normalized=!1,hr.offset=0,hr.stride=0),nr=te.location,Sr=Ea[nr],Sr.buffer||Hr.enableVertexAttribArray(nr),(Sr.type!==he.dtype||Sr.size!==4||Sr.buffer!==he||Sr.normalized!==!1||Sr.offset!==0||Sr.stride!==0)&&(Hr.bindBuffer(34962,he.buffer),Hr.vertexAttribPointer(nr,4,he.dtype,!1,0,0),Sr.type=he.dtype,Sr.size=4,Sr.buffer=he,Sr.normalized=!1,Sr.offset=0,Sr.stride=0),li=Ee.location,di=Ea[li],di.buffer||Hr.enableVertexAttribArray(li),(di.type!==ke.dtype||di.size!==4||di.buffer!==ke||di.normalized!==!1||di.offset!==0||di.stride!==0)&&(Hr.bindBuffer(34962,ke.buffer),Hr.vertexAttribPointer(li,4,ke.dtype,!1,0,0),di.type=ke.dtype,di.size=4,di.buffer=ke,di.normalized=!1,di.offset=0,di.stride=0),Hr.uniform1i(ut.location,ct.bind()),mi=Zn.elements,mi?Hr.bindBuffer(34963,mi.buffer.buffer):Ha.currentVAO&&(mi=Wo.getElements(Ha.currentVAO.elements),mi&&Hr.bindBuffer(34963,mi.buffer.buffer)),ta=0;ta>1)):Hr.drawArrays(1,dr,Mr),na.viewportWidth=Vn,na.viewportHeight=Rn,pt.unbind())}ct.unbind(),un.dirty=!0,Ha.setVAO(null),un.profile=Ca}}}});var lUe=Se((G1r,sUe)=>{"use strict";var HVt=eUe(),GVt=rUe(),WVt=nUe(),jVt=oUe();sUe.exports={"453a70fefa48db31713162aeb1ac438cb8579f54504f3b23acf32128df3dfd45":HVt,"30680f8f6712ef1af5cf7547e0af35b036fb300c67b07967cf448492ff4de4d0":GVt,a3970baf1d8cac9305ee830c7026550387343d4dde2353dd86a4d082c97d3470:WVt,"3fd666968f3ce90d1c048b7a9aab515f3ce387a5401a10f8b66121c9469d1c0d":jVt}});var cUe=Se((W1r,fUe)=>{"use strict";var uUe=RK(),ZVt=lUe();Object.assign(uUe.reglPrecompiled,ZVt);fUe.exports=uUe});var pUe=Se((j1r,dUe)=>{"use strict";var hUe=$7e();hUe.plot=cUe();dUe.exports=hUe});var FK=Se((Z1r,gUe)=>{"use strict";var yUe=vu().extendFlat,XVt=zf(),vUe=uc(),YVt=Xf(),mUe=Du().hovertemplateAttrs,KVt=Ec().attributes,JVt=yUe({editType:"calc"},YVt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:mUe({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});gUe.exports={domain:KVt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:yUe({},XVt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:mUe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:vUe({editType:"calc"}),tickfont:vUe({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:JVt,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 bUe=Se((X1r,xUe)=>{"use strict";var _S=Zr(),$Vt=Dp().hasColorscale,QVt=ed(),eHt=Ec().defaults,tHt=Jd(),_Ue=FK(),rHt=P9(),iHt=yp().isTypedArraySpec;function nHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate");var a=i("line.color",n.colorway[0]);if($Vt(e,"line")&&_S.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),QVt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function aHt(e,t){function r(l,f){return _S.coerce(e,t,_Ue.dimensions,l,f)}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=_S.isArrayOrTypedArray(a)&&a.length>0||iHt(a),s;o&&(s="array");var u=r("categoryorder",s);u==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&u==="array"&&(t.categoryorder="trace")}}xUe.exports=function(t,r,n,i){function a(l,f){return _S.coerce(t,r,_Ue,l,f)}var o=tHt(t,r,{name:"dimensions",handleItemDefaults:aHt}),s=nHt(t,r,n,i,a);eHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),rHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var u=i.font;_S.coerceFont(a,"labelfont",u,{overrideDflt:{size:Math.round(u.size)}}),_S.coerceFont(a,"tickfont",u,{autoShadowDflt:!0,overrideDflt:{size:Math.round(u.size/1.2)}})}});var TUe=Se((Y1r,wUe)=>{"use strict";var oHt=Km().wrap,sHt=Dp().hasColorscale,lHt=Rp(),uHt=eO(),fHt=yu(),Mk=Zr(),cHt=_u();wUe.exports=function(t,r){var n=Mk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(v){var z;if(v.categoryorder==="trace")z=null;else if(v.categoryorder==="array")z=v.categoryarray;else{z=uHt(v.values);for(var T=!0,F=0;F=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var PUe=Se((K1r,zUe)=>{"use strict";var Lf=Nl(),wHt=(I2(),ab(P2)).interpolateNumber,THt=qP(),Ck=jc(),mx=Zr(),Ek=mx.strTranslate,AUe=yu(),qK=cd(),AHt=Bf();function SHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(NHt.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),u=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return Ek(k.x,k.y)}),u.append("g").attr("class","paths");var l=s.select("g.paths"),f=l.selectAll("path.path").data(function(k){return k.paths},u1);f.attr("fill",function(k){return k.model.color});var c=f.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);NK(c),f.attr("d",function(k){return k.svgD}),c.empty()||f.sort(BK),f.exit().remove(),f.on("mouseover",MHt).on("mouseout",EHt).on("click",kHt),u.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 Ek(k.x,0)}),d.exit().remove();var p=d.selectAll("g.category").data(function(k){return k.categories},u1),x=p.enter().append("g").attr("class","category");p.attr("transform",function(k){return Ek(0,k.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),MUe(x);var b=p.selectAll("rect.bandrect").data(function(k){return k.bands},u1);b.each(function(){mx.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var y=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"}),VK(y),b.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(k){return kk(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return kk(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){AUe.font(Lf.select(this),k.parcatsViewModel.categorylabelfont),AHt.convertToTspans(Lf.select(this),t)}),x.append("text").attr("class","dimlabel"),p.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){AUe.font(Lf.select(this),k.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",RHt).on("mouseout",FHt),p.exit().remove(),d.call(Lf.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",qHt).on("drag",BHt).on("dragend",OHt)),s.each(function(k){k.traceSelection=Lf.select(this),k.pathSelection=Lf.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Lf.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}zUe.exports=function(e,t,r,n){SHt(r,e,n,t)};function u1(e){return e.key}function kk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function BK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),_=Lf.mouse(i)[0];Ck.loneHover({trace:a,x:p-s.left+u.left,y:x-s.top+u.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:_1&&l.displayInd===u.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var p=s.model.count,x=s.model.categoryLabel,b=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:x,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var E=k.join("
");return{trace:f,x:n*(h-t.left),y:i*(c-t.top),text:E,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:f.hovertemplate,hovertemplateLabels:y,eventData:[{data:f._input,fullData:f,count:p,category:x,probability:b}]}}function IHt(e,t,r){var n=[];return Lf.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(EUe(e,t,i))}),n}function DHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Lf.select(r).datum(),s=o.categoryViewModel,u=s.parcatsViewModel,l=u.model.dimensions[s.model.dimensionInd],f=u.trace,c=a.y+a.height/2,h,d;u.dimensions.length>1&&l.displayInd===u.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var p=s.model.categoryLabel,x=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(z){z.color===o.color&&(b+=z.count)});var y=s.model.count,k=0;u.pathSelection.each(function(z){z.model.color===o.color&&(k+=z.model.count)});var E=b/x,A=b/k,L=b/y,_={countLabel:b,categoryLabel:p,probabilityLabel:E.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",_.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+p+"): "+_.probabilityLabel),C.push("P("+p+" | color): "+A.toFixed(3)),C.push("P(color | "+p+"): "+L.toFixed(3)));var M=C.join("
"),v=qK.mostReadable(o.color,["black","white"]);return{trace:f,x:n*(h-t.left),y:i*(c-t.top),text:M,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:v,fontSize:10,idealAlign:d,hovertemplate:f.hovertemplate,hovertemplateLabels:_,eventData:[{data:f._input,fullData:f,category:p,count:x,probability:E,categorycount:y,colorcount:k,bandcolorcount:b}]}}function RHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Lf.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"?(PHt(o),GK(o,"plotly_hover",Lf.event)):(zHt(o),HK(o,"plotly_hover",Lf.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=EUe(r,i,o):a==="color"?s=DHt(r,i,o):a==="dimension"&&(s=IHt(r,i,o)),s&&Ck.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function FHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(NK(t.pathSelection),MUe(t.dimensionSelection.selectAll("g.category")),VK(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Ck.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(BK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?GK(n,"plotly_unhover",Lf.event):HK(n,"plotly_unhover",Lf.event)}}function qHt(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,Lf.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Lf.mouse(this)[0],n=Lf.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,mx.raiseToTop(this.parentNode),Lf.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.yf.y+f.height/2&&(a.model.displayInd=f.model.displayInd,f.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Lf.event.x;var c=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];c!==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),WK(e.parcatsViewModel),LUe(e.parcatsViewModel),CUe(e.parcatsViewModel)}}function OHt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Lf.select(this).selectAll("text").attr("font-weight","normal");var t={},r=kUe(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 p=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+p+"].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}),u=s.map(function(h){return h.categoryValue}),l=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[l],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?GK(e.potentialClickBand,"plotly_click",Lf.event.sourceEvent):HK(e.potentialClickBand,"plotly_click",Lf.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var f=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];f.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,jK(e.parcatsViewModel),WK(e.parcatsViewModel);var c=Lf.transition().duration(300).ease("cubic-in-out");c.each(function(){LUe(e.parcatsViewModel,!0),CUe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&THt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function kUe(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;u--)l+="C"+o[u]+","+(t[u+1]+n)+" "+a[u]+","+(t[u]+n)+" "+(e[u]+r[u])+","+(t[u]+n),l+="l-"+r[u]+",0 ";return l+="Z",l}function WK(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(U){return U.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(U){return U.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),u=t.map(function(q){return q.width}),l=[];for(var f in r.paths)r.paths.hasOwnProperty(f)&&l.push(r.paths[f]);function c(q){var U=q.categoryInds.map(function(j,G){return i[G][j]}),H=o.map(function(j){return U[j]});return H}l.sort(function(q,U){var H=c(q),j=c(U);return e.sortpaths==="backward"&&(H.reverse(),j.reverse()),H.push(q.valueInds[0]),j.push(U.valueInds[0]),e.bundlecolors&&(H.unshift(q.rawColor),j.unshift(U.rawColor)),Hj?1:0});for(var h=new Array(l.length),d=t[0].model.count,p=t[0].categories.map(function(q){return q.height}).reduce(function(q,U){return q+U}),x=0;x0?y=p*(b.count/d):y=0;for(var k=new Array(n.length),E=0;E1?o=(e.width-2*r-n)/(i-1):o=0,s=r,u=s+o*a;var l=[],f=e.model.maxCats,c=t.categories.length,h=8,d=t.count,p=e.height-h*(f-1),x,b,y,k,E,A=(f-c)*h/2,L=t.categories.map(function(_){return{displayInd:_.displayInd,categoryInd:_.categoryInd}});for(L.sort(function(_,C){return _.displayInd-C.displayInd}),E=0;E0?x=b.count/d*p:x=0,y={key:b.valueInds[0],model:b,width:n,height:x,y:b.dragY!==null?b.dragY:A,bands:[],parcatsViewModel:e},A=A+x+h,l.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:u,y:0,width:n,model:t,categories:l,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var ZK=Se((J1r,IUe)=>{"use strict";var VHt=PUe();IUe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;VHt(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 RUe=Se(X9=>{"use strict";var HHt=Dd().getModuleCalcData,GHt=ZK(),DUe="parcats";X9.name=DUe;X9.plot=function(e,t,r,n){var i=HHt(e.calcdata,DUe);if(i.length){var a=i[0];GHt(e,a,r,n)}};X9.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 qUe=Se((Q1r,FUe)=>{"use strict";FUe.exports={attributes:FK(),supplyDefaults:bUe(),calc:TUe(),plot:ZK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:RUe(),categories:["noOpacity"],meta:{}}});var OUe=Se((e_r,BUe)=>{"use strict";BUe.exports=qUe()});var f1=Se((t_r,jUe)=>{"use strict";var WHt=X1(),NUe="1.13.4",GUe='\xA9 OpenStreetMap contributors',UUe=['\xA9 Carto',GUe].join(" "),VUe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),jHt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),WUe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:GUe,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:UUe,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:UUe,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:VUe,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:VUe,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:jHt,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"}},HUe=WHt(WUe);jUe.exports={requiredVersion:NUe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:WUe,styleValuesNonMapbox:HUe,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@"+NUe+"."].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:",HUe.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` -`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}});var zk=Se((r_r,KUe)=>{"use strict";var ZUe=Zr(),XUe=Pl().defaultLine,ZHt=Ec().attributes,XHt=uc(),YHt=Zc().textposition,KHt=_c().overrideAll,JHt=_f().templatedArray,XK=f1(),YUe=XHt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});YUe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var $Ht=KUe.exports=KHt({_arrayAttrRegexps:[ZUe.counterRegex("mapbox",".layers",!0)],domain:ZHt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:XK.styleValuesMapbox.concat(XK.styleValuesNonMapbox),dflt:XK.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:JHt("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:XUe},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:XUe}},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:YUe,textposition:ZUe.extendFlat({},YHt,{arrayOk:!1})}})},"plot","from-root");$Ht.uirevision={valType:"any",editType:"none"}});var Y9=Se((i_r,QUe)=>{"use strict";var QHt=Du().hovertemplateAttrs,eGt=Du().texttemplateAttrs,tGt=Ey(),Pk=H2(),xS=Zc(),JUe=zk(),rGt=zf(),iGt=Xf(),ew=vu().extendFlat,nGt=_c().overrideAll,aGt=zk(),$Ue=Pk.line,bS=Pk.marker;QUe.exports=nGt({lon:Pk.lon,lat:Pk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:ew({},aGt.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:ew({},bS.opacity,{dflt:1})},mode:ew({},xS.mode,{dflt:"markers"}),text:ew({},xS.text,{}),texttemplate:eGt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:ew({},xS.hovertext,{}),line:{color:$Ue.color,width:$Ue.width},connectgaps:xS.connectgaps,marker:ew({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:bS.opacity,size:bS.size,sizeref:bS.sizeref,sizemin:bS.sizemin,sizemode:bS.sizemode},iGt("marker")),fill:Pk.fill,fillcolor:tGt(),textfont:JUe.layers.symbol.textfont,textposition:JUe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:xS.selected.marker},unselected:{marker:xS.unselected.marker},hoverinfo:ew({},rGt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:QHt()},"calc","nested")});var YK=Se((n_r,eVe)=>{"use strict";var oGt=["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"];eVe.exports={isSupportedFont:function(e){return oGt.indexOf(e)!==-1}}});var iVe=Se((a_r,rVe)=>{"use strict";var Ik=Zr(),KK=ec(),sGt=$v(),lGt=I0(),uGt=D0(),fGt=Py(),tVe=Y9(),cGt=YK().isSupportedFont;rVe.exports=function(t,r,n,i){function a(y,E){return Ik.coerce(t,r,tVe,y,E)}function o(y,E){return Ik.coerce2(t,r,tVe,y,E)}var s=hGt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),KK.hasMarkers(r)){sGt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(Ik.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),Ik.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}KK.hasLines(r)&&(lGt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var l=o("cluster.maxzoom"),f=o("cluster.step"),c=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),p=l!==!1||f!==!1||c!==!1||h!==!1||d!==!1,x=a("cluster.enabled",p);if(x||KK.hasText(r)){var b=i.font.family;uGt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:cGt(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"&&fGt(t,r,n,a),Ik.coerceSelectionMarkerOpacity(r,a)};function hGt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var JK=Se((o_r,aVe)=>{"use strict";var nVe=hu();aVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=nVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=nVe.tickText(o,o.c2l(s[1]),!0).text,i}});var $K=Se((s_r,sVe)=>{"use strict";var oVe=Zr();sVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=oVe.isArrayOrTypedArray(r)?oVe.mean(r):r,s=.5+o/100,u=1.5+o/100,l=["",""],f=[0,0];switch(i){case"top":l[0]="top",f[1]=-u;break;case"bottom":l[0]="bottom",f[1]=u;break}switch(a){case"left":l[1]="right",f[0]=-s;break;case"right":l[1]="left",f[0]=s;break}var c;return l[0]&&l[1]?c=l.join("-"):l[0]?c=l[0]:l[1]?c=l[1]:c="center",{anchor:c,offset:f}}});var dVe=Se((l_r,hVe)=>{"use strict";var fVe=_u(),sp=Zr(),dGt=ju().BADNUM,J9=tx(),lVe=fc(),pGt=yu(),vGt=S3(),$9=ec(),yGt=YK().isSupportedFont,mGt=$K(),gGt=rv().appendArrayPointValue,_Gt=Bf().NEWLINES,xGt=Bf().BR_TAG_ALL;hVe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=$9.hasLines(n),s=$9.hasMarkers(n),u=$9.hasText(n),l=s&&n.marker.symbol==="circle",f=s&&n.marker.symbol!=="circle",c=n.cluster&&n.cluster.enabled,h=K9("fill"),d=K9("line"),p=K9("circle"),x=K9("symbol"),b={fill:h,line:d,circle:p,symbol:x};if(!i)return b;var y;if((a||o)&&(y=J9.calcTraceToLineCoords(r)),a&&(h.geojson=J9.makePolygon(y),h.layout.visibility="visible",sp.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=J9.makeLine(y),d.layout.visibility="visible",sp.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),l){var E=bGt(r);p.geojson=E.geojson,p.layout.visibility="visible",c&&(p.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":uVe(n),"text-size":12}}),sp.extendFlat(p.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(l&&c&&(p.filter=["!",["has","point_count"]]),(f||u)&&(x.geojson=wGt(r,t),sp.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),f&&(sp.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&sp.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,sp.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),u)){var k=(n.marker||{}).size,A=mGt(n.textposition,k);sp.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":uVe(n)}),sp.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function K9(e){return{type:e,geojson:J9.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function bGt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=sp.isArrayOrTypedArray(r.color),a=sp.isArrayOrTypedArray(r.size),o=sp.isArrayOrTypedArray(r.opacity),s;function u(k){return t.opacity*k}function l(k){return k/2}var f;i&&(lVe.hasColorscale(t,"marker")?f=lVe.makeColorScaleFuncFromTrace(r):f=sp.identity);var c;a&&(c=vGt(t));var h;o&&(h=function(k){var A=fVe(k)?+sp.constrain(k,0,1):0;return u(A)});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"),yGt(s)||(s=r);var u=s.split(", ");return u}});var mVe=Se((u_r,yVe)=>{"use strict";var TGt=Zr(),pVe=dVe(),wS=f1().traceLayerPrefix,ry={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function vVe(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:wS+t+"-fill",line:wS+t+"-line",circle:wS+t+"-circle",symbol:wS+t+"-symbol",cluster:wS+t+"-cluster",clusterCount:wS+t+"-cluster-count"},this.below=null}var Dk=vVe.prototype;Dk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&TGt.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)};Dk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Dk.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 _=A[L];i.removeLayer(l.layerIds[_])}k||i.removeSource(l.sourceIds.circle)}function h(k){for(var A=ry.nonCluster,L=0;L=0;L--){var _=A[L];i.removeLayer(l.layerIds[_]),k||i.removeSource(l.sourceIds[_])}}function p(k){u?c(k):d(k)}function x(k){s?f(k):h(k)}function b(){for(var k=s?ry.cluster:ry.nonCluster,A=0;A=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};yVe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new vVe(t,n.uid,i,a),s=pVe(t.gd,r),u=o.below=t.belowLookup["trace-"+n.uid],l,f,c;if(i)for(o.addSource("circle",s.circle,n.cluster),l=0;l{"use strict";var AGt=jc(),tJ=Zr(),SGt=oT(),MGt=tJ.fillText,EGt=ju().BADNUM,kGt=f1().traceLayerPrefix;function CGt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,u=[],l=kGt+i.uid+"-circle",f=i.cluster&&i.cluster.enabled;if(f){var c=s.map.queryRenderedFeatures(null,{layers:[l]});u=c.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function x(M){var v=M.lonlat;if(v[0]===EGt||f&&u.indexOf(M.i+1)===-1)return 1/0;var z=tJ.modHalf(v[0],360),T=v[1],F=s.project([z,T]),q=F.x-a.c2p([p,T]),U=F.y-o.c2p([z,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-H,1-3/H)}if(AGt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],y=b.lonlat,E=[tJ.modHalf(y[0],360)+d,y[1]],k=a.c2p(E),A=o.c2p(E),L=b.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=SGt(i,b),e.extraText=gVe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function gVe(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,u=t.lonlat,l=[];function f(c){return c+"\xB0"}return a||o&&s?l.push("("+f(u[1])+", "+f(u[0])+")"):o?l.push(r.lon+f(u[0])):s&&l.push(r.lat+f(u[1])),(a||i.indexOf("text")!==-1)&&MGt(t,e,l),l.join("
")}_Ve.exports={hoverPoints:CGt,getExtraText:gVe}});var bVe=Se((c_r,xVe)=>{"use strict";xVe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var TVe=Se((h_r,wVe)=>{"use strict";var LGt=Zr(),zGt=ec(),PGt=ju().BADNUM;wVe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u;if(!zGt.hasMarkers(s))return[];if(r===!1)for(u=0;u{(function(e,t){typeof rJ=="object"&&typeof iJ!="undefined"?iJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(rJ,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,g){return g={exports:{}},m(g,g.exports),g.exports}var o="1.13.4",s=u;function u(m,g,P,V){this.cx=3*m,this.bx=3*(P-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*g,this.by=3*(V-g)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=V,this.p2x=P,this.p2y=V}u.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},u.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},u.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},u.prototype.solveCurveX=function(m,g){typeof g=="undefined"&&(g=1e-6);var P,V,J,ae,ve;for(J=m,ve=0;ve<8;ve++){if(ae=this.sampleCurveX(J)-m,Math.abs(ae)V)return V;for(;Pae?P=J:V=J,J=(V-P)*.5+P}return J},u.prototype.solve=function(m,g){return this.sampleCurveY(this.solveCurveX(m,g))};var l=f;function f(m,g){this.x=m,this.y=g}f.prototype={clone:function(){return new f(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,g){return this.clone()._rotateAround(m,g)},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 g=m.x-this.x,P=m.y-this.y;return g*g+P*P},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,g){return Math.atan2(this.x*g-this.y*m,this.x*m+this.y*g)},_matMult:function(m){var g=m[0]*this.x+m[1]*this.y,P=m[2]*this.x+m[3]*this.y;return this.x=g,this.y=P,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 g=Math.cos(m),P=Math.sin(m),V=g*this.x-P*this.y,J=P*this.x+g*this.y;return this.x=V,this.y=J,this},_rotateAround:function(m,g){var P=Math.cos(m),V=Math.sin(m),J=g.x+P*(this.x-g.x)-V*(this.y-g.y),ae=g.y+V*(this.x-g.x)+P*(this.y-g.y);return this.x=J,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(m){return m instanceof f?m:Array.isArray(m)?new f(m[0],m[1]):m};var c=typeof self!="undefined"?self:{};function h(m,g){if(Array.isArray(m)){if(!Array.isArray(g)||m.length!==g.length)return!1;for(var P=0;P=1)return 1;var g=m*m,P=g*m;return 4*(m<.5?P:3*(m-g)+P-.75)}function x(m,g,P,V){var J=new s(m,g,P,V);return function(ae){return J.solve(ae)}}var b=x(.25,.1,.25,1);function y(m,g,P){return Math.min(P,Math.max(g,m))}function E(m,g,P){var V=P-g,J=((m-g)%V+V)%V+g;return J===g?P:J}function k(m,g,P){if(!m.length)return P(null,[]);var V=m.length,J=new Array(m.length),ae=null;m.forEach(function(ve,Ge){g(ve,function(yt,kt){yt&&(ae=yt),J[Ge]=kt,--V===0&&P(ae,J)})})}function A(m){var g=[];for(var P in m)g.push(m[P]);return g}function L(m,g){var P=[];for(var V in m)V in g||P.push(V);return P}function _(m){for(var g=[],P=arguments.length-1;P-- >0;)g[P]=arguments[P+1];for(var V=0,J=g;V>g/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 F(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 q(m,g){m.forEach(function(P){g[P]&&(g[P]=g[P].bind(g))})}function U(m,g){return m.indexOf(g,m.length-g.length)!==-1}function H(m,g,P){var V={};for(var J in m)V[J]=g.call(P||this,m[J],J,m);return V}function j(m,g,P){var V={};for(var J in m)g.call(P||this,m[J],J,m)&&(V[J]=m[J]);return V}function G(m){return Array.isArray(m)?m.map(G):typeof m=="object"&&m?H(m,G):m}function O(m,g){for(var P=0;P=0)return!0;return!1}var W={};function re(m){W[m]||(typeof console!="undefined"&&console.warn(m),W[m]=!0)}function ne(m,g,P){return(P.y-m.y)*(g.x-m.x)>(g.y-m.y)*(P.x-m.x)}function be(m){for(var g=0,P=0,V=m.length,J=V-1,ae=void 0,ve=void 0;P@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,P={};if(m.replace(g,function(J,ae,ve,Ge){var yt=ve||Ge;return P[ae]=yt?yt.toLowerCase():!0,""}),P["max-age"]){var V=parseInt(P["max-age"],10);isNaN(V)?delete P["max-age"]:P["max-age"]=V}return P}var te=null;function ke(m){if(te==null){var g=m.navigator?m.navigator.userAgent:null;te=!!m.safari||!!(g&&(/\b(iPad|iPhone|iPod)\b/.test(g)||g.match("Safari")&&!g.match("Chrome")))}return te}function Ee(m){try{var g=c[m];return g.setItem("_mapbox_test_",1),g.removeItem("_mapbox_test_"),!0}catch(P){return!1}}function Me(m){return c.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(g,P){return String.fromCharCode(+("0x"+P))}))}function Oe(m){return decodeURIComponent(c.atob(m).split("").map(function(g){return"%"+("00"+g.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Re=c.performance&&c.performance.now?c.performance.now.bind(c.performance):Date.now.bind(Date),me=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,Be=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame,fe,Ze,et={now:Re,frame:function(g){var P=me(g);return{cancel:function(){return Be(P)}}},getImageData:function(g,P){P===void 0&&(P=0);var V=c.document.createElement("canvas"),J=V.getContext("2d");if(!J)throw new Error("failed to create canvas 2d context");return V.width=g.width,V.height=g.height,J.drawImage(g,0,0,g.width,g.height),J.getImageData(-P,-P,g.width+2*P,g.height+2*P)},resolveURL:function(g){return fe||(fe=c.document.createElement("a")),fe.href=g,fe.href},hardwareConcurrency:c.navigator&&c.navigator.hardwareConcurrency||4,get devicePixelRatio(){return c.devicePixelRatio},get prefersReducedMotion(){return c.matchMedia?(Ze==null&&(Ze=c.matchMedia("(prefers-reduced-motion: reduce)")),Ze.matches):!1}},gt={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},Pt={supported:!1,testSupport:_t},Qe,Xe=!1,Tt,xt=!1;c.document&&(Tt=c.document.createElement("img"),Tt.onload=function(){Qe&&Ct(Qe),Qe=null,xt=!0},Tt.onerror=function(){Xe=!0,Qe=null},Tt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function _t(m){Xe||!Tt||(xt?Ct(m):Qe=m)}function Ct(m){var g=m.createTexture();m.bindTexture(m.TEXTURE_2D,g);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Tt),m.isContextLost())return;Pt.supported=!0}catch(P){}m.deleteTexture(g),Xe=!0}var jt="01";function At(){for(var m="1",g="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",P="",V=0;V<10;V++)P+=g[Math.floor(Math.random()*62)];var J=12*60*60*1e3,ae=[m,jt,P].join(""),ve=Date.now()+J;return{token:ae,tokenExpiresAt:ve}}var Te=function(g,P){this._transformRequestFn=g,this._customAccessToken=P,this._createSkuToken()};Te.prototype._createSkuToken=function(){var g=At();this._skuToken=g.token,this._skuTokenExpiresAt=g.tokenExpiresAt},Te.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Te.prototype.transformRequest=function(g,P){return this._transformRequestFn?this._transformRequestFn(g,P)||{url:g}:{url:g}},Te.prototype.normalizeStyleURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/styles/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeGlyphsURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/fonts/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeSourceURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/v4/"+V.authority+".json",V.params.push("secure"),this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeSpriteURL=function(g,P,V,J){var ae=Je(g);return nt(g)?(ae.path="/styles/v1"+ae.path+"/sprite"+P+V,this._makeAPIURL(ae,this._customAccessToken||J)):(ae.path+=""+P+V,Mt(ae))},Te.prototype.normalizeTileURL=function(g,P){if(this._isSkuTokenExpired()&&this._createSkuToken(),g&&!nt(g))return g;var V=Je(g),J=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,ve=et.devicePixelRatio>=2||P===512?"@2x":"",Ge=Pt.supported?".webp":"$1";V.path=V.path.replace(J,""+ve+Ge),V.path=V.path.replace(ae,"/"),V.path="/v4"+V.path;var yt=this._customAccessToken||je(V.params)||gt.ACCESS_TOKEN;return gt.REQUIRE_ACCESS_TOKEN&&yt&&this._skuToken&&V.params.push("sku="+this._skuToken),this._makeAPIURL(V,yt)},Te.prototype.canonicalizeTileURL=function(g,P){var V="/v4/",J=/\.[\w]+$/,ae=Je(g);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match(J))return g;var ve="mapbox://tiles/";ve+=ae.path.replace(V,"");var Ge=ae.params;return P&&(Ge=Ge.filter(function(yt){return!yt.match(/^access_token=/)})),Ge.length&&(ve+="?"+Ge.join("&")),ve},Te.prototype.canonicalizeTileset=function(g,P){for(var V=P?nt(P):!1,J=[],ae=0,ve=g.tiles||[];ae=0&&g.params.splice(ae,1)}if(J.path!=="/"&&(g.path=""+J.path+g.path),!gt.REQUIRE_ACCESS_TOKEN)return Mt(g);if(P=P||gt.ACCESS_TOKEN,!P)throw new Error("An API access token is required to use Mapbox GL. "+V);if(P[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+V);return g.params=g.params.filter(function(ve){return ve.indexOf("access_token")===-1}),g.params.push("access_token="+P),Mt(g)};function nt(m){return m.indexOf("mapbox:")===0}var ut=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ct(m){return ut.test(m)}function rt(m){return m.indexOf("sku=")>0&&ct(m)}function je(m){for(var g=0,P=m;g=1&&c.localStorage.setItem(P,JSON.stringify(this.eventData))}catch(J){re("Unable to write to LocalStorage")}},ir.prototype.processRequests=function(g){},ir.prototype.postEvent=function(g,P,V,J){var ae=this;if(gt.EVENTS_URL){var ve=Je(gt.EVENTS_URL);ve.params.push("access_token="+(J||gt.ACCESS_TOKEN||""));var Ge={event:this.type,created:new Date(g).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:jt,userId:this.anonId},yt=P?_(Ge,P):Ge,kt={url:Mt(ve),headers:{"Content-Type":"text/plain"},body:JSON.stringify([yt])};this.pendingRequest=Tr(kt,function(Ut){ae.pendingRequest=null,V(Ut),ae.saveEventData(),ae.processRequests(J)})}},ir.prototype.queueRequest=function(g,P){this.queue.push(g),this.processRequests(P)};var fr=function(m){function g(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.postMapLoadEvent=function(V,J,ae,ve){this.skuToken=ae,(gt.EVENTS_URL&&ve||gt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(Ge){return nt(Ge)||ct(Ge)}))&&this.queueRequest({id:J,timestamp:Date.now()},ve)},g.prototype.processRequests=function(V){var J=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),ve=ae.id,Ge=ae.timestamp;ve&&this.success[ve]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=z()),this.postEvent(Ge,{skuToken:this.skuToken},function(yt){yt||ve&&(J.success[ve]=!0)},V))}},g}(ir),Ot=function(m){function g(P){m.call(this,"appUserTurnstile"),this._customAccessToken=P}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.postTurnstileEvent=function(V,J){gt.EVENTS_URL&>.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return nt(ae)||ct(ae)})&&this.queueRequest(Date.now(),J)},g.prototype.processRequests=function(V){var J=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Kt(gt.ACCESS_TOKEN),ve=ae?ae.u:gt.ACCESS_TOKEN,Ge=ve!==this.eventData.tokenU;F(this.anonId)||(this.anonId=z(),Ge=!0);var yt=this.queue.shift();if(this.eventData.lastSuccess){var kt=new Date(this.eventData.lastSuccess),Ut=new Date(yt),lr=(yt-this.eventData.lastSuccess)/(24*60*60*1e3);Ge=Ge||lr>=1||lr<-1||kt.getDate()!==Ut.getDate()}else Ge=!0;if(!Ge)return this.processRequests();this.postEvent(yt,{"enabled.telemetry":!1},function(kr){kr||(J.eventData.lastSuccess=yt,J.eventData.tokenU=ve)},V)}},g}(ir),De=new Ot,_e=De.postTurnstileEvent.bind(De),Fe=new fr,Pe=Fe.postMapLoadEvent.bind(Fe),Ie="mapbox-tiles",lt=500,ye=50,ue=1e3*60*7,de;function ht(){c.caches&&!de&&(de=c.caches.open(Ie))}var Et;function St(m,g){if(Et===void 0)try{new Response(new ReadableStream),Et=!0}catch(P){Et=!1}Et?g(m.body):m.blob().then(g)}function Zt(m,g,P){if(ht(),!!de){var V={status:g.status,statusText:g.statusText,headers:new c.Headers};g.headers.forEach(function(ve,Ge){return V.headers.set(Ge,ve)});var J=he(g.headers.get("Cache-Control")||"");if(!J["no-store"]){J["max-age"]&&V.headers.set("Expires",new Date(P+J["max-age"]*1e3).toUTCString());var ae=new Date(V.headers.get("Expires")).getTime()-P;aeDate.now()&&!P["no-cache"]}var Er=1/0;function si(m){Er++,Er>ye&&(m.getActor().send("enforceCacheSizeLimit",lt),Er=0)}function Ei(m){ht(),de&&de.then(function(g){g.keys().then(function(P){for(var V=0;V=200&&P.status<300||P.status===0)&&P.response!==null){var J=P.response;if(m.type==="json")try{J=JSON.parse(P.response)}catch(ae){return g(ae)}g(null,J,P.getResponseHeader("Cache-Control"),P.getResponseHeader("Expires"))}else g(new Di(P.statusText,P.status,m.url))},P.send(m.body),{cancel:function(){return P.abort()}}}var sr=function(m,g){if(!vt(m.url)){if(c.fetch&&c.Request&&c.AbortController&&c.Request.prototype.hasOwnProperty("signal"))return Dt(m,g);if(Ce()&&self.worker&&self.worker.actor){var P=!0;return self.worker.actor.send("getResource",m,g,void 0,P)}}return Bt(m,g)},br=function(m,g){return sr(_(m,{type:"json"}),g)},zr=function(m,g){return sr(_(m,{type:"arrayBuffer"}),g)},Tr=function(m,g){return sr(_(m,{method:"POST"}),g)};function Rr(m){var g=c.document.createElement("a");return g.href=m,g.protocol===c.document.location.protocol&&g.host===c.document.location.host}var Br="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function oi(m,g,P,V){var J=new c.Image,ae=c.URL;J.onload=function(){g(null,J),ae.revokeObjectURL(J.src),J.onload=null,c.requestAnimationFrame(function(){J.src=Br})},J.onerror=function(){return g(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ve=new c.Blob([new Uint8Array(m)],{type:"image/png"});J.cacheControl=P,J.expires=V,J.src=m.byteLength?ae.createObjectURL(ve):Br}function vi(m,g){var P=new c.Blob([new Uint8Array(m)],{type:"image/png"});c.createImageBitmap(P).then(function(V){g(null,V)}).catch(function(V){g(new Error("Could not load image because of "+V.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Pi,Yr,Ni=function(){Pi=[],Yr=0};Ni();var Ur=function(m,g){if(Pt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Yr>=gt.MAX_PARALLEL_IMAGE_REQUESTS){var P={requestParameters:m,callback:g,cancelled:!1,cancel:function(){this.cancelled=!0}};return Pi.push(P),P}Yr++;var V=!1,J=function(){if(!V)for(V=!0,Yr--;Pi.length&&Yr0||this._oneTimeListeners&&this._oneTimeListeners[g]&&this._oneTimeListeners[g].length>0||this._eventedParent&&this._eventedParent.listens(g)},Mi.prototype.setEventedParent=function(g,P){return this._eventedParent=g,this._eventedParentData=P,this};var sn=8,fi={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"}},Or={"*":{type:"source"}},st=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Wt={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:"*"}},tr={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:"*"}},or={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:"*"}},Nr={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"}},hi={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"}}},Gi={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"}}},Qr={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"}},Ui=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],zn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},fn={"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"}},xn={"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"}},_a={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fn={"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"}},ia={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},za={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hr={type:"array",value:"*"},na={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},go={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Dn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},un={type:"array",value:"*",minimum:1},Zn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},Wo=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Ba={"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"}},Bo={"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"}},Ea={"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"}},Ha={"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"}},tn={"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"}},Cn={"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"}},Xn={"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"}},ts={"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"}},Ja={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},to={"*":{type:"string"}},Ri={$version:sn,$root:fi,sources:Or,source:st,source_vector:Wt,source_raster:tr,source_raster_dem:or,source_geojson:Nr,source_video:hi,source_image:Gi,layer:Qr,layout:Ui,layout_background:zn,layout_fill:fn,layout_circle:xn,layout_heatmap:_a,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Wn,layout_symbol:Fn,layout_raster:ia,layout_hillshade:za,filter:Hr,filter_operator:na,geometry_type:go,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:Dn,expression:un,light:Zn,paint:Wo,paint_fill:Ba,"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:Bo,paint_circle:Ea,paint_heatmap:Ha,paint_symbol:tn,paint_raster:Cn,paint_hillshade:Xn,paint_background:ts,transition:Ja,"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:to},an=function(g,P,V,J){this.message=(g?g+": ":"")+V,J&&(this.identifier=J),P!=null&&P.__line__&&(this.line=P.__line__)};function cs(m){var g=m.key,P=m.value;return P?[new an(g,P,"constants have been deprecated as of v8")]:[]}function pa(m){for(var g=[],P=arguments.length-1;P-- >0;)g[P]=arguments[P+1];for(var V=0,J=g;V":m.itemType.kind==="value"?"array":"array<"+g+">"}else return m.kind}var An=[Co,Fi,Yn,xa,Qi,Vo,Nn,Oa(Pn),Pa];function _o(m,g){if(g.kind==="error")return null;if(m.kind==="array"){if(g.kind==="array"&&(g.N===0&&g.itemType.kind==="value"||!_o(m.itemType,g.itemType))&&(typeof m.N!="number"||m.N===g.N))return null}else{if(m.kind===g.kind)return null;if(m.kind==="value")for(var P=0,V=An;P255?255:kt}function J(kt){return kt<0?0:kt>1?1:kt}function ae(kt){return kt[kt.length-1]==="%"?V(parseFloat(kt)/100*255):V(parseInt(kt))}function ve(kt){return kt[kt.length-1]==="%"?J(parseFloat(kt)/100):J(parseFloat(kt))}function Ge(kt,Ut,lr){return lr<0?lr+=1:lr>1&&(lr-=1),lr*6<1?kt+(Ut-kt)*lr*6:lr*2<1?Ut:lr*3<2?kt+(Ut-kt)*(2/3-lr)*6:kt}function yt(kt){var Ut=kt.replace(/ /g,"").toLowerCase();if(Ut in P)return P[Ut].slice();if(Ut[0]==="#"){if(Ut.length===4){var lr=parseInt(Ut.substr(1),16);return lr>=0&&lr<=4095?[(lr&3840)>>4|(lr&3840)>>8,lr&240|(lr&240)>>4,lr&15|(lr&15)<<4,1]:null}else if(Ut.length===7){var lr=parseInt(Ut.substr(1),16);return lr>=0&&lr<=16777215?[(lr&16711680)>>16,(lr&65280)>>8,lr&255,1]:null}return null}var kr=Ut.indexOf("("),xr=Ut.indexOf(")");if(kr!==-1&&xr+1===Ut.length){var ei=Ut.substr(0,kr),Li=Ut.substr(kr+1,xr-(kr+1)).split(","),_n=1;switch(ei){case"rgba":if(Li.length!==4)return null;_n=ve(Li.pop());case"rgb":return Li.length!==3?null:[ae(Li[0]),ae(Li[1]),ae(Li[2]),_n];case"hsla":if(Li.length!==4)return null;_n=ve(Li.pop());case"hsl":if(Li.length!==3)return null;var rn=(parseFloat(Li[0])%360+360)%360/360,Fa=ve(Li[1]),On=ve(Li[2]),Ra=On<=.5?On*(Fa+1):On+Fa-On*Fa,so=On*2-Ra;return[V(Ge(so,Ra,rn+1/3)*255),V(Ge(so,Ra,rn)*255),V(Ge(so,Ra,rn-1/3)*255),_n];default:return null}}return null}try{g.parseCSSColor=yt}catch(kt){}}),sa=ps.parseCSSColor,Bn=function(g,P,V,J){J===void 0&&(J=1),this.r=g,this.g=P,this.b=V,this.a=J};Bn.parse=function(g){if(g){if(g instanceof Bn)return g;if(typeof g=="string"){var P=sa(g);if(P)return new Bn(P[0]/255*P[3],P[1]/255*P[3],P[2]/255*P[3],P[3])}}},Bn.prototype.toString=function(){var g=this.toArray(),P=g[0],V=g[1],J=g[2],ae=g[3];return"rgba("+Math.round(P)+","+Math.round(V)+","+Math.round(J)+","+ae+")"},Bn.prototype.toArray=function(){var g=this,P=g.r,V=g.g,J=g.b,ae=g.a;return ae===0?[0,0,0,0]:[P*255/ae,V*255/ae,J*255/ae,ae]},Bn.black=new Bn(0,0,0,1),Bn.white=new Bn(1,1,1,1),Bn.transparent=new Bn(0,0,0,0),Bn.red=new Bn(1,0,0,1);var ms=function(g,P,V){g?this.sensitivity=P?"variant":"case":this.sensitivity=P?"accent":"base",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ms.prototype.compare=function(g,P){return this.collator.compare(g,P)},ms.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ya=function(g,P,V,J,ae){this.text=g,this.image=P,this.scale=V,this.fontStack=J,this.textColor=ae},on=function(g){this.sections=g};on.fromString=function(g){return new on([new ya(g,null,null,null,null)])},on.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(g){return g.text.length!==0||g.image&&g.image.name.length!==0})},on.factory=function(g){return g instanceof on?g:on.fromString(g)},on.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(g){return g.text}).join("")},on.prototype.serialize=function(){for(var g=["format"],P=0,V=this.sections;P=0&&m<=255&&typeof g=="number"&&g>=0&&g<=255&&typeof P=="number"&&P>=0&&P<=255)){var J=typeof V=="number"?[m,g,P,V]:[m,g,P];return"Invalid rgba value ["+J.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof V=="undefined"||typeof V=="number"&&V>=0&&V<=1?null:"Invalid rgba value ["+[m,g,P,V].join(", ")+"]: 'a' must be between 0 and 1."}function ca(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 Bn)return!0;if(m instanceof ms)return!0;if(m instanceof on)return!0;if(m instanceof mn)return!0;if(Array.isArray(m)){for(var g=0,P=m;g2){var Ge=g[1];if(typeof Ge!="string"||!(Ge in yn)||Ge==="object")return P.error('The item type argument of "array" must be one of string, number, boolean',1);ve=yn[Ge],V++}else ve=Pn;var yt;if(g.length>3){if(g[2]!==null&&(typeof g[2]!="number"||g[2]<0||g[2]!==Math.floor(g[2])))return P.error('The length argument to "array" must be a positive integer literal',2);yt=g[2],V++}J=Oa(ve,yt)}else J=yn[ae];for(var kt=[];V1)&&P.push(J)}}return P.concat(this.args.map(function(ae){return ae.serialize()}))};var ba=function(g){this.type=Vo,this.sections=g};ba.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=g[1];if(!Array.isArray(V)&&typeof V=="object")return P.error("First argument must be an image or text section.");for(var J=[],ae=!1,ve=1;ve<=g.length-1;++ve){var Ge=g[ve];if(ae&&typeof Ge=="object"&&!Array.isArray(Ge)){ae=!1;var yt=null;if(Ge["font-scale"]&&(yt=P.parse(Ge["font-scale"],1,Fi),!yt))return null;var kt=null;if(Ge["text-font"]&&(kt=P.parse(Ge["text-font"],1,Oa(Yn)),!kt))return null;var Ut=null;if(Ge["text-color"]&&(Ut=P.parse(Ge["text-color"],1,Qi),!Ut))return null;var lr=J[J.length-1];lr.scale=yt,lr.font=kt,lr.textColor=Ut}else{var kr=P.parse(g[ve],1,Pn);if(!kr)return null;var xr=kr.type.kind;if(xr!=="string"&&xr!=="value"&&xr!=="null"&&xr!=="resolvedImage")return P.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,J.push({content:kr,scale:null,font:null,textColor:null})}}return new ba(J)},ba.prototype.evaluate=function(g){var P=function(V){var J=V.content.evaluate(g);return bn(J)===Pa?new ya("",J,null,null,null):new ya(Xi(J),null,V.scale?V.scale.evaluate(g):null,V.font?V.font.evaluate(g).join(","):null,V.textColor?V.textColor.evaluate(g):null)};return new on(this.sections.map(P))},ba.prototype.eachChild=function(g){for(var P=0,V=this.sections;P-1),V},Da.prototype.eachChild=function(g){g(this.input)},Da.prototype.outputDefined=function(){return!1},Da.prototype.serialize=function(){return["image",this.input.serialize()]};var Aa={"to-boolean":xa,"to-color":Qi,"to-number":Fi,"to-string":Yn},Ln=function(g,P){this.type=g,this.args=P};Ln.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=g[0];if((V==="to-boolean"||V==="to-string")&&g.length!==2)return P.error("Expected one argument.");for(var J=Aa[V],ae=[],ve=1;ve4?V="Invalid rbga value "+JSON.stringify(P)+": expected an array containing either three or four numeric values.":V=Ga(P[0],P[1],P[2],P[3]),!V))return new Bn(P[0]/255,P[1]/255,P[2]/255,P[3])}throw new Ia(V||"Could not parse color from value '"+(typeof P=="string"?P:String(JSON.stringify(P)))+"'")}else if(this.type.kind==="number"){for(var yt=null,kt=0,Ut=this.args;kt=g[2]||m[1]<=g[1]||m[3]>=g[3])}function Ss(m,g){var P=Wa(m[0]),V=hn(m[1]),J=Math.pow(2,g.z);return[Math.round(P*J*Za),Math.round(V*J*Za)]}function Kn(m,g,P){var V=m[0]-g[0],J=m[1]-g[1],ae=m[0]-P[0],ve=m[1]-P[1];return V*ve-ae*J===0&&V*ae<=0&&J*ve<=0}function ns(m,g,P){return g[1]>m[1]!=P[1]>m[1]&&m[0]<(P[0]-g[0])*(m[1]-g[1])/(P[1]-g[1])+g[0]}function Jo(m,g){for(var P=!1,V=0,J=g.length;V0&&lr<0||Ut<0&&lr>0}function To(m,g,P,V){var J=[g[0]-m[0],g[1]-m[1]],ae=[V[0]-P[0],V[1]-P[1]];return ma(ae,J)===0?!1:!!(ja(m,g,P,V)&&ja(P,V,m,g))}function Ao(m,g,P){for(var V=0,J=P;VP[2]){var J=V*.5,ae=m[0]-P[0]>J?-V:P[0]-m[0]>J?V:0;ae===0&&(ae=m[0]-P[2]>J?-V:P[2]-m[0]>J?V:0),m[0]+=ae}xo(g,m)}function ta(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function En(m,g,P,V){for(var J=Math.pow(2,V.z)*Za,ae=[V.x*Za,V.y*Za],ve=[],Ge=0,yt=m;Ge=0)return!1;var P=!0;return m.eachChild(function(V){P&&!Jn(V,g)&&(P=!1)}),P}var Cs=function(g,P){this.type=P.type,this.name=g,this.boundExpression=P};Cs.parse=function(g,P){if(g.length!==2||typeof g[1]!="string")return P.error("'var' expression requires exactly one string literal argument.");var V=g[1];return P.scope.has(V)?new Cs(V,P.scope.get(V)):P.error('Unknown variable "'+V+'". Make sure "'+V+'" has been bound in an enclosing "let" expression before using it.',1)},Cs.prototype.evaluate=function(g){return this.boundExpression.evaluate(g)},Cs.prototype.eachChild=function(){},Cs.prototype.outputDefined=function(){return!1},Cs.prototype.serialize=function(){return["var",this.name]};var Xa=function(g,P,V,J,ae){P===void 0&&(P=[]),J===void 0&&(J=new bo),ae===void 0&&(ae=[]),this.registry=g,this.path=P,this.key=P.map(function(ve){return"["+ve+"]"}).join(""),this.scope=J,this.errors=ae,this.expectedType=V};Xa.prototype.parse=function(g,P,V,J,ae){return ae===void 0&&(ae={}),P?this.concat(P,V,J)._parse(g,ae):this._parse(g,ae)},Xa.prototype._parse=function(g,P){(g===null||typeof g=="string"||typeof g=="boolean"||typeof g=="number")&&(g=["literal",g]);function V(Ut,lr,kr){return kr==="assert"?new Ya(lr,[Ut]):kr==="coerce"?new Ln(lr,[Ut]):Ut}if(Array.isArray(g)){if(g.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var J=g[0];if(typeof J!="string")return this.error("Expression name must be a string, but found "+typeof J+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[J];if(ae){var ve=ae.parse(g,this);if(!ve)return null;if(this.expectedType){var Ge=this.expectedType,yt=ve.type;if((Ge.kind==="string"||Ge.kind==="number"||Ge.kind==="boolean"||Ge.kind==="object"||Ge.kind==="array")&&yt.kind==="value")ve=V(ve,Ge,P.typeAnnotation||"assert");else if((Ge.kind==="color"||Ge.kind==="formatted"||Ge.kind==="resolvedImage")&&(yt.kind==="value"||yt.kind==="string"))ve=V(ve,Ge,P.typeAnnotation||"coerce");else if(this.checkSubtype(Ge,yt))return null}if(!(ve instanceof qn)&&ve.type.kind!=="resolvedImage"&&Zo(ve)){var kt=new wa;try{ve=new qn(ve.type,ve.evaluate(kt))}catch(Ut){return this.error(Ut.message),null}}return ve}return this.error('Unknown expression "'+J+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof g=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof g=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof g+" instead.")},Xa.prototype.concat=function(g,P,V){var J=typeof g=="number"?this.path.concat(g):this.path,ae=V?this.scope.concat(V):this.scope;return new Xa(this.registry,J,P||null,ae,this.errors)},Xa.prototype.error=function(g){for(var P=[],V=arguments.length-1;V-- >0;)P[V]=arguments[V+1];var J=""+this.key+P.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new va(J,g))},Xa.prototype.checkSubtype=function(g,P){var V=_o(g,P);return V&&this.error(V),V};function Zo(m){if(m instanceof Cs)return Zo(m.boundExpression);if(m instanceof $i&&m.name==="error")return!1;if(m instanceof Sa)return!1;if(m instanceof vs)return!1;var g=m instanceof Ln||m instanceof Ya,P=!0;return m.eachChild(function(V){g?P=P&&Zo(V):P=P&&V instanceof qn}),P?Ks(m)&&Jn(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Eo(m,g){for(var P=m.length-1,V=0,J=P,ae=0,ve,Ge;V<=J;)if(ae=Math.floor((V+J)/2),ve=m[ae],Ge=m[ae+1],ve<=g){if(ae===P||gg)J=ae-1;else throw new Ia("Input is not a number.");return 0}var lo=function(g,P,V){this.type=g,this.input=P,this.labels=[],this.outputs=[];for(var J=0,ae=V;J=Ge)return P.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',kt);var lr=P.parse(yt,Ut,ae);if(!lr)return null;ae=ae||lr.type,J.push([Ge,lr])}return new lo(ae,V,J)},lo.prototype.evaluate=function(g){var P=this.labels,V=this.outputs;if(P.length===1)return V[0].evaluate(g);var J=this.input.evaluate(g);if(J<=P[0])return V[0].evaluate(g);var ae=P.length;if(J>=P[ae-1])return V[ae-1].evaluate(g);var ve=Eo(P,J);return V[ve].evaluate(g)},lo.prototype.eachChild=function(g){g(this.input);for(var P=0,V=this.outputs;P0&&g.push(this.labels[P]),g.push(this.outputs[P].serialize());return g};function $a(m,g,P){return m*(1-P)+g*P}function Xo(m,g,P){return new Bn($a(m.r,g.r,P),$a(m.g,g.g,P),$a(m.b,g.b,P),$a(m.a,g.a,P))}function rs(m,g,P){return m.map(function(V,J){return $a(V,g[J],P)})}var $n=Object.freeze({__proto__:null,number:$a,color:Xo,array:rs}),Sn=.95047,uo=1,Rs=1.08883,xs=4/29,Go=6/29,os=3*Go*Go,So=Go*Go*Go,Qn=Math.PI/180,zo=180/Math.PI;function rl(m){return m>So?Math.pow(m,1/3):m/os+xs}function $o(m){return m>Go?m*m*m:os*(m-xs)}function Na(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Ua(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Po(m){var g=Ua(m.r),P=Ua(m.g),V=Ua(m.b),J=rl((.4124564*g+.3575761*P+.1804375*V)/Sn),ae=rl((.2126729*g+.7151522*P+.072175*V)/uo),ve=rl((.0193339*g+.119192*P+.9503041*V)/Rs);return{l:116*ae-16,a:500*(J-ae),b:200*(ae-ve),alpha:m.a}}function fo(m){var g=(m.l+16)/116,P=isNaN(m.a)?g:g+m.a/500,V=isNaN(m.b)?g:g-m.b/200;return g=uo*$o(g),P=Sn*$o(P),V=Rs*$o(V),new Bn(Na(3.2404542*P-1.5371385*g-.4985314*V),Na(-.969266*P+1.8760108*g+.041556*V),Na(.0556434*P-.2040259*g+1.0572252*V),m.alpha)}function ro(m,g,P){return{l:$a(m.l,g.l,P),a:$a(m.a,g.a,P),b:$a(m.b,g.b,P),alpha:$a(m.alpha,g.alpha,P)}}function Ma(m){var g=Po(m),P=g.l,V=g.a,J=g.b,ae=Math.atan2(J,V)*zo;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+J*J),l:P,alpha:m.a}}function io(m){var g=m.h*Qn,P=m.c,V=m.l;return fo({l:V,a:Math.cos(g)*P,b:Math.sin(g)*P,alpha:m.alpha})}function aa(m,g,P){var V=g-m;return m+P*(V>180||V<-180?V-360*Math.round(V/360):V)}function Oo(m,g,P){return{h:aa(m.h,g.h,P),c:$a(m.c,g.c,P),l:$a(m.l,g.l,P),alpha:$a(m.alpha,g.alpha,P)}}var No={forward:Po,reverse:fo,interpolate:ro},Zs={forward:Ma,reverse:io,interpolate:Oo},Fs=Object.freeze({__proto__:null,lab:No,hcl:Zs}),ws=function(g,P,V,J,ae){this.type=g,this.operator=P,this.interpolation=V,this.input=J,this.labels=[],this.outputs=[];for(var ve=0,Ge=ae;ve1}))return P.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);J={name:"cubic-bezier",controlPoints:yt}}else return P.error("Unknown interpolation type "+String(J[0]),1,0);if(g.length-1<4)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if((g.length-1)%2!==0)return P.error("Expected an even number of arguments.");if(ae=P.parse(ae,2,Fi),!ae)return null;var kt=[],Ut=null;V==="interpolate-hcl"||V==="interpolate-lab"?Ut=Qi:P.expectedType&&P.expectedType.kind!=="value"&&(Ut=P.expectedType);for(var lr=0;lr=kr)return P.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ei);var _n=P.parse(xr,Li,Ut);if(!_n)return null;Ut=Ut||_n.type,kt.push([kr,_n])}return Ut.kind!=="number"&&Ut.kind!=="color"&&!(Ut.kind==="array"&&Ut.itemType.kind==="number"&&typeof Ut.N=="number")?P.error("Type "+co(Ut)+" is not interpolatable."):new ws(Ut,V,J,ae,kt)},ws.prototype.evaluate=function(g){var P=this.labels,V=this.outputs;if(P.length===1)return V[0].evaluate(g);var J=this.input.evaluate(g);if(J<=P[0])return V[0].evaluate(g);var ae=P.length;if(J>=P[ae-1])return V[ae-1].evaluate(g);var ve=Eo(P,J),Ge=P[ve],yt=P[ve+1],kt=ws.interpolationFactor(this.interpolation,J,Ge,yt),Ut=V[ve].evaluate(g),lr=V[ve+1].evaluate(g);return this.operator==="interpolate"?$n[this.type.kind.toLowerCase()](Ut,lr,kt):this.operator==="interpolate-hcl"?Zs.reverse(Zs.interpolate(Zs.forward(Ut),Zs.forward(lr),kt)):No.reverse(No.interpolate(No.forward(Ut),No.forward(lr),kt))},ws.prototype.eachChild=function(g){g(this.input);for(var P=0,V=this.outputs;P=V.length)throw new Ia("Array index out of bounds: "+P+" > "+(V.length-1)+".");if(P!==Math.floor(P))throw new Ia("Array index must be an integer, but found "+P+" instead.");return V[P]},Xs.prototype.eachChild=function(g){g(this.index),g(this.input)},Xs.prototype.outputDefined=function(){return!1},Xs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var oa=function(g,P){this.type=xa,this.needle=g,this.haystack=P};oa.parse=function(g,P){if(g.length!==3)return P.error("Expected 2 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Pn);return!V||!J?null:ks(V.type,[xa,Yn,Fi,Co,Pn])?new oa(V,J):P.error("Expected first argument to be of type boolean, string, number or null, but found "+co(V.type)+" instead")},oa.prototype.evaluate=function(g){var P=this.needle.evaluate(g),V=this.haystack.evaluate(g);if(!V)return!1;if(!bs(P,["boolean","string","number","null"]))throw new Ia("Expected first argument to be of type boolean, string, number or null, but found "+co(bn(P))+" instead.");if(!bs(V,["string","array"]))throw new Ia("Expected second argument to be of type array or string, but found "+co(bn(V))+" instead.");return V.indexOf(P)>=0},oa.prototype.eachChild=function(g){g(this.needle),g(this.haystack)},oa.prototype.outputDefined=function(){return!0},oa.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Yo=function(g,P,V){this.type=Fi,this.needle=g,this.haystack=P,this.fromIndex=V};Yo.parse=function(g,P){if(g.length<=2||g.length>=5)return P.error("Expected 3 or 4 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Pn);if(!V||!J)return null;if(!ks(V.type,[xa,Yn,Fi,Co,Pn]))return P.error("Expected first argument to be of type boolean, string, number or null, but found "+co(V.type)+" instead");if(g.length===4){var ae=P.parse(g[3],3,Fi);return ae?new Yo(V,J,ae):null}else return new Yo(V,J)},Yo.prototype.evaluate=function(g){var P=this.needle.evaluate(g),V=this.haystack.evaluate(g);if(!bs(P,["boolean","string","number","null"]))throw new Ia("Expected first argument to be of type boolean, string, number or null, but found "+co(bn(P))+" instead.");if(!bs(V,["string","array"]))throw new Ia("Expected second argument to be of type array or string, but found "+co(bn(V))+" instead.");if(this.fromIndex){var J=this.fromIndex.evaluate(g);return V.indexOf(P,J)}return V.indexOf(P)},Yo.prototype.eachChild=function(g){g(this.needle),g(this.haystack),this.fromIndex&&g(this.fromIndex)},Yo.prototype.outputDefined=function(){return!1},Yo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var g=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),g]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var po=function(g,P,V,J,ae,ve){this.inputType=g,this.type=P,this.input=V,this.cases=J,this.outputs=ae,this.otherwise=ve};po.parse=function(g,P){if(g.length<5)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if(g.length%2!==1)return P.error("Expected an even number of arguments.");var V,J;P.expectedType&&P.expectedType.kind!=="value"&&(J=P.expectedType);for(var ae={},ve=[],Ge=2;GeNumber.MAX_SAFE_INTEGER)return Ut.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof xr=="number"&&Math.floor(xr)!==xr)return Ut.error("Numeric branch labels must be integer values.");if(!V)V=bn(xr);else if(Ut.checkSubtype(V,bn(xr)))return null;if(typeof ae[String(xr)]!="undefined")return Ut.error("Branch labels must be unique.");ae[String(xr)]=ve.length}var ei=P.parse(kt,Ge,J);if(!ei)return null;J=J||ei.type,ve.push(ei)}var Li=P.parse(g[1],1,Pn);if(!Li)return null;var _n=P.parse(g[g.length-1],g.length-1,J);return!_n||Li.type.kind!=="value"&&P.concat(1).checkSubtype(V,Li.type)?null:new po(V,J,Li,ae,ve,_n)},po.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=bn(P)===this.inputType&&this.outputs[this.cases[P]]||this.otherwise;return V.evaluate(g)},po.prototype.eachChild=function(g){g(this.input),this.outputs.forEach(g),g(this.otherwise)},po.prototype.outputDefined=function(){return this.outputs.every(function(g){return g.outputDefined()})&&this.otherwise.outputDefined()},po.prototype.serialize=function(){for(var g=this,P=["match",this.input.serialize()],V=Object.keys(this.cases).sort(),J=[],ae={},ve=0,Ge=V;ve=5)return P.error("Expected 3 or 4 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Fi);if(!V||!J)return null;if(!ks(V.type,[Oa(Pn),Yn,Pn]))return P.error("Expected first argument to be of type array or string, but found "+co(V.type)+" instead");if(g.length===4){var ae=P.parse(g[3],3,Fi);return ae?new ls(V.type,V,J,ae):null}else return new ls(V.type,V,J)},ls.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=this.beginIndex.evaluate(g);if(!bs(P,["string","array"]))throw new Ia("Expected first argument to be of type array or string, but found "+co(bn(P))+" instead.");if(this.endIndex){var J=this.endIndex.evaluate(g);return P.slice(V,J)}return P.slice(V)},ls.prototype.eachChild=function(g){g(this.input),g(this.beginIndex),this.endIndex&&g(this.endIndex)},ls.prototype.outputDefined=function(){return!1},ls.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var g=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),g]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function gs(m,g){return m==="=="||m==="!="?g.kind==="boolean"||g.kind==="string"||g.kind==="number"||g.kind==="null"||g.kind==="value":g.kind==="string"||g.kind==="number"||g.kind==="value"}function bt(m,g,P){return g===P}function Ft(m,g,P){return g!==P}function hr(m,g,P){return gP}function Sr(m,g,P){return g<=P}function li(m,g,P){return g>=P}function di(m,g,P,V){return V.compare(g,P)===0}function mi(m,g,P,V){return!di(m,g,P,V)}function Oi(m,g,P,V){return V.compare(g,P)<0}function dn(m,g,P,V){return V.compare(g,P)>0}function wi(m,g,P,V){return V.compare(g,P)<=0}function ui(m,g,P,V){return V.compare(g,P)>=0}function Ai(m,g,P){var V=m!=="=="&&m!=="!=";return function(){function J(ae,ve,Ge){this.type=xa,this.lhs=ae,this.rhs=ve,this.collator=Ge,this.hasUntypedArgument=ae.type.kind==="value"||ve.type.kind==="value"}return J.parse=function(ve,Ge){if(ve.length!==3&&ve.length!==4)return Ge.error("Expected two or three arguments.");var yt=ve[0],kt=Ge.parse(ve[1],1,Pn);if(!kt)return null;if(!gs(yt,kt.type))return Ge.concat(1).error('"'+yt+`" comparisons are not supported for type '`+co(kt.type)+"'.");var Ut=Ge.parse(ve[2],2,Pn);if(!Ut)return null;if(!gs(yt,Ut.type))return Ge.concat(2).error('"'+yt+`" comparisons are not supported for type '`+co(Ut.type)+"'.");if(kt.type.kind!==Ut.type.kind&&kt.type.kind!=="value"&&Ut.type.kind!=="value")return Ge.error("Cannot compare types '"+co(kt.type)+"' and '"+co(Ut.type)+"'.");V&&(kt.type.kind==="value"&&Ut.type.kind!=="value"?kt=new Ya(Ut.type,[kt]):kt.type.kind!=="value"&&Ut.type.kind==="value"&&(Ut=new Ya(kt.type,[Ut])));var lr=null;if(ve.length===4){if(kt.type.kind!=="string"&&Ut.type.kind!=="string"&&kt.type.kind!=="value"&&Ut.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(lr=Ge.parse(ve[3],3,jo),!lr)return null}return new J(kt,Ut,lr)},J.prototype.evaluate=function(ve){var Ge=this.lhs.evaluate(ve),yt=this.rhs.evaluate(ve);if(V&&this.hasUntypedArgument){var kt=bn(Ge),Ut=bn(yt);if(kt.kind!==Ut.kind||!(kt.kind==="string"||kt.kind==="number"))throw new Ia('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+kt.kind+", "+Ut.kind+") instead.")}if(this.collator&&!V&&this.hasUntypedArgument){var lr=bn(Ge),kr=bn(yt);if(lr.kind!=="string"||kr.kind!=="string")return g(ve,Ge,yt)}return this.collator?P(ve,Ge,yt,this.collator.evaluate(ve)):g(ve,Ge,yt)},J.prototype.eachChild=function(ve){ve(this.lhs),ve(this.rhs),this.collator&&ve(this.collator)},J.prototype.outputDefined=function(){return!0},J.prototype.serialize=function(){var ve=[m];return this.eachChild(function(Ge){ve.push(Ge.serialize())}),ve},J}()}var gi=Ai("==",bt,di),gn=Ai("!=",Ft,mi),In=Ai("<",hr,Oi),Vn=Ai(">",nr,dn),Rn=Ai("<=",Sr,wi),Hn=Ai(">=",li,ui),Gn=function(g,P,V,J,ae){this.type=Yn,this.number=g,this.locale=P,this.currency=V,this.minFractionDigits=J,this.maxFractionDigits=ae};Gn.parse=function(g,P){if(g.length!==3)return P.error("Expected two arguments.");var V=P.parse(g[1],1,Fi);if(!V)return null;var J=g[2];if(typeof J!="object"||Array.isArray(J))return P.error("NumberFormat options argument must be an object.");var ae=null;if(J.locale&&(ae=P.parse(J.locale,1,Yn),!ae))return null;var ve=null;if(J.currency&&(ve=P.parse(J.currency,1,Yn),!ve))return null;var Ge=null;if(J["min-fraction-digits"]&&(Ge=P.parse(J["min-fraction-digits"],1,Fi),!Ge))return null;var yt=null;return J["max-fraction-digits"]&&(yt=P.parse(J["max-fraction-digits"],1,Fi),!yt)?null:new Gn(V,ae,ve,Ge,yt)},Gn.prototype.evaluate=function(g){return new Intl.NumberFormat(this.locale?this.locale.evaluate(g):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(g):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(g):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(g):void 0}).format(this.number.evaluate(g))},Gn.prototype.eachChild=function(g){g(this.number),this.locale&&g(this.locale),this.currency&&g(this.currency),this.minFractionDigits&&g(this.minFractionDigits),this.maxFractionDigits&&g(this.maxFractionDigits)},Gn.prototype.outputDefined=function(){return!1},Gn.prototype.serialize=function(){var g={};return this.locale&&(g.locale=this.locale.serialize()),this.currency&&(g.currency=this.currency.serialize()),this.minFractionDigits&&(g["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(g["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),g]};var pn=function(g){this.type=Fi,this.input=g};pn.parse=function(g,P){if(g.length!==2)return P.error("Expected 1 argument, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1);return V?V.type.kind!=="array"&&V.type.kind!=="string"&&V.type.kind!=="value"?P.error("Expected argument of type string or array, but found "+co(V.type)+" instead."):new pn(V):null},pn.prototype.evaluate=function(g){var P=this.input.evaluate(g);if(typeof P=="string")return P.length;if(Array.isArray(P))return P.length;throw new Ia("Expected value to be of type string or array, but found "+co(bn(P))+" instead.")},pn.prototype.eachChild=function(g){g(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){var g=["length"];return this.eachChild(function(P){g.push(P.serialize())}),g};var Lo={"==":gi,"!=":gn,">":Vn,"<":In,">=":Hn,"<=":Rn,array:Ya,at:Xs,boolean:Ya,case:ss,coalesce:Ls,collator:Sa,format:ba,image:Da,in:oa,"index-of":Yo,interpolate:ws,"interpolate-hcl":ws,"interpolate-lab":ws,length:pn,let:ds,literal:qn,match:po,number:Ya,"number-format":Gn,object:Ya,slice:ls,step:lo,string:Ya,"to-boolean":Ln,"to-color":Ln,"to-number":Ln,"to-string":Ln,var:Cs,within:vs};function us(m,g){var P=g[0],V=g[1],J=g[2],ae=g[3];P=P.evaluate(m),V=V.evaluate(m),J=J.evaluate(m);var ve=ae?ae.evaluate(m):1,Ge=Ga(P,V,J,ve);if(Ge)throw new Ia(Ge);return new Bn(P/255*ve,V/255*ve,J/255*ve,ve)}function Bs(m,g){return m in g}function Js(m,g){var P=g[m];return typeof P=="undefined"?null:P}function ol(m,g,P,V){for(;P<=V;){var J=P+V>>1;if(g[J]===m)return!0;g[J]>m?V=J-1:P=J+1}return!1}function Cl(m){return{type:m}}$i.register(Lo,{error:[qa,[Yn],function(m,g){var P=g[0];throw new Ia(P.evaluate(m))}],typeof:[Yn,[Pn],function(m,g){var P=g[0];return co(bn(P.evaluate(m)))}],"to-rgba":[Oa(Fi,4),[Qi],function(m,g){var P=g[0];return P.evaluate(m).toArray()}],rgb:[Qi,[Fi,Fi,Fi],us],rgba:[Qi,[Fi,Fi,Fi,Fi],us],has:{type:xa,overloads:[[[Yn],function(m,g){var P=g[0];return Bs(P.evaluate(m),m.properties())}],[[Yn,Nn],function(m,g){var P=g[0],V=g[1];return Bs(P.evaluate(m),V.evaluate(m))}]]},get:{type:Pn,overloads:[[[Yn],function(m,g){var P=g[0];return Js(P.evaluate(m),m.properties())}],[[Yn,Nn],function(m,g){var P=g[0],V=g[1];return Js(P.evaluate(m),V.evaluate(m))}]]},"feature-state":[Pn,[Yn],function(m,g){var P=g[0];return Js(P.evaluate(m),m.featureState||{})}],properties:[Nn,[],function(m){return m.properties()}],"geometry-type":[Yn,[],function(m){return m.geometryType()}],id:[Pn,[],function(m){return m.id()}],zoom:[Fi,[],function(m){return m.globals.zoom}],"heatmap-density":[Fi,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[Fi,[],function(m){return m.globals.lineProgress||0}],accumulated:[Pn,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[Fi,Cl(Fi),function(m,g){for(var P=0,V=0,J=g;V":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J>ae}],"filter-id->":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V>J}],"filter-<=":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J<=ae}],"filter-id-<=":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V<=J}],"filter->=":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J>=ae}],"filter-id->=":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V>=J}],"filter-has":[xa,[Pn],function(m,g){var P=g[0];return P.value in m.properties()}],"filter-has-id":[xa,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[xa,[Oa(Yn)],function(m,g){var P=g[0];return P.value.indexOf(m.geometryType())>=0}],"filter-id-in":[xa,[Oa(Pn)],function(m,g){var P=g[0];return P.value.indexOf(m.id())>=0}],"filter-in-small":[xa,[Yn,Oa(Pn)],function(m,g){var P=g[0],V=g[1];return V.value.indexOf(m.properties()[P.value])>=0}],"filter-in-large":[xa,[Yn,Oa(Pn)],function(m,g){var P=g[0],V=g[1];return ol(m.properties()[P.value],V.value,0,V.value.length-1)}],all:{type:xa,overloads:[[[xa,xa],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)&&V.evaluate(m)}],[Cl(xa),function(m,g){for(var P=0,V=g;P-1}function ga(m){return!!m.expression&&m.expression.interpolated}function ko(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function zs(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Fo(m){return m}function Ys(m,g){var P=g.type==="color",V=m.stops&&typeof m.stops[0][0]=="object",J=V||m.property!==void 0,ae=V||!J,ve=m.type||(ga(g)?"exponential":"interval");if(P&&(m=pa({},m),m.stops&&(m.stops=m.stops.map(function(fl){return[fl[0],Bn.parse(fl[1])]})),m.default?m.default=Bn.parse(m.default):m.default=Bn.parse(g.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Fs[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Ge,yt,kt;if(ve==="exponential")Ge=_l;else if(ve==="interval")Ge=Sl;else if(ve==="categorical"){Ge=Us,yt=Object.create(null);for(var Ut=0,lr=m.stops;Ut=m.stops[V-1][0])return m.stops[V-1][1];var J=Eo(m.stops.map(function(ae){return ae[0]}),P);return m.stops[J][1]}function _l(m,g,P){var V=m.base!==void 0?m.base:1;if(ko(P)!=="number")return Gs(m.default,g.default);var J=m.stops.length;if(J===1||P<=m.stops[0][0])return m.stops[0][1];if(P>=m.stops[J-1][0])return m.stops[J-1][1];var ae=Eo(m.stops.map(function(lr){return lr[0]}),P),ve=cl(P,V,m.stops[ae][0],m.stops[ae+1][0]),Ge=m.stops[ae][1],yt=m.stops[ae+1][1],kt=$n[g.type]||Fo;if(m.colorSpace&&m.colorSpace!=="rgb"){var Ut=Fs[m.colorSpace];kt=function(lr,kr){return Ut.reverse(Ut.interpolate(Ut.forward(lr),Ut.forward(kr),ve))}}return typeof Ge.evaluate=="function"?{evaluate:function(){for(var kr=[],xr=arguments.length;xr--;)kr[xr]=arguments[xr];var ei=Ge.evaluate.apply(void 0,kr),Li=yt.evaluate.apply(void 0,kr);if(!(ei===void 0||Li===void 0))return kt(ei,Li,ve)}}:kt(Ge,yt,ve)}function kl(m,g,P){return g.type==="color"?P=Bn.parse(P):g.type==="formatted"?P=on.fromString(P.toString()):g.type==="resolvedImage"?P=mn.fromString(P.toString()):ko(P)!==g.type&&(g.type!=="enum"||!g.values[P])&&(P=void 0),Gs(P,m.default,g.default)}function cl(m,g,P,V){var J=V-P,ae=m-P;return J===0?0:g===1?ae/J:(Math.pow(g,ae)-1)/(Math.pow(g,J)-1)}var xl=function(g,P){this.expression=g,this._warningHistory={},this._evaluator=new wa,this._defaultValue=P?ee(P):null,this._enumValues=P&&P.type==="enum"?P.values:null};xl.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._evaluator.globals=g,this._evaluator.feature=P,this._evaluator.featureState=V,this._evaluator.canonical=J,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=ve,this.expression.evaluate(this._evaluator)},xl.prototype.evaluate=function(g,P,V,J,ae,ve){this._evaluator.globals=g,this._evaluator.feature=P||null,this._evaluator.featureState=V||null,this._evaluator.canonical=J,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=ve||null;try{var Ge=this.expression.evaluate(this._evaluator);if(Ge==null||typeof Ge=="number"&&Ge!==Ge)return this._defaultValue;if(this._enumValues&&!(Ge in this._enumValues))throw new Ia("Expected value to be one of "+Object.keys(this._enumValues).map(function(yt){return JSON.stringify(yt)}).join(", ")+", but found "+JSON.stringify(Ge)+" instead.");return Ge}catch(yt){return this._warningHistory[yt.message]||(this._warningHistory[yt.message]=!0,typeof console!="undefined"&&console.warn(yt.message)),this._defaultValue}};function Uo(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Lo}function _s(m,g){var P=new Xa(Lo,[],g?Q(g):void 0),V=P.parse(m,void 0,void 0,void 0,g&&g.type==="string"?{typeAnnotation:"coerce"}:void 0);return V?ul(new xl(V,g)):Gl(P.errors)}var Bl=function(g,P){this.kind=g,this._styleExpression=P,this.isStateDependent=g!=="constant"&&!as(P.expression)};Bl.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._styleExpression.evaluateWithoutErrorHandling(g,P,V,J,ae,ve)},Bl.prototype.evaluate=function(g,P,V,J,ae,ve){return this._styleExpression.evaluate(g,P,V,J,ae,ve)};var Il=function(g,P,V,J){this.kind=g,this.zoomStops=V,this._styleExpression=P,this.isStateDependent=g!=="camera"&&!as(P.expression),this.interpolationType=J};Il.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._styleExpression.evaluateWithoutErrorHandling(g,P,V,J,ae,ve)},Il.prototype.evaluate=function(g,P,V,J,ae,ve){return this._styleExpression.evaluate(g,P,V,J,ae,ve)},Il.prototype.interpolationFactor=function(g,P,V){return this.interpolationType?ws.interpolationFactor(this.interpolationType,g,P,V):0};function Dl(m,g){if(m=_s(m,g),m.result==="error")return m;var P=m.value.expression,V=Ks(P);if(!V&&!Vl(g))return Gl([new va("","data expressions not supported")]);var J=Jn(P,["zoom"]);if(!J&&!Fl(g))return Gl([new va("","zoom expressions not supported")]);var ae=B(P);if(!ae&&!J)return Gl([new va("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof va)return Gl([ae]);if(ae instanceof ws&&!ga(g))return Gl([new va("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return ul(V?new Bl("constant",m.value):new Bl("source",m.value));var ve=ae instanceof ws?ae.interpolation:void 0;return ul(V?new Il("camera",m.value,ae.labels,ve):new Il("composite",m.value,ae.labels,ve))}var oe=function(g,P){this._parameters=g,this._specification=P,pa(this,Ys(this._parameters,this._specification))};oe.deserialize=function(g){return new oe(g._parameters,g._specification)},oe.serialize=function(g){return{_parameters:g._parameters,_specification:g._specification}};function w(m,g){if(zs(m))return new oe(m,g);if(Uo(m)){var P=Dl(m,g);if(P.result==="error")throw new Error(P.value.map(function(J){return J.key+": "+J.message}).join(", "));return P.value}else{var V=m;return typeof m=="string"&&g.type==="color"&&(V=Bn.parse(m)),{kind:"constant",evaluate:function(){return V}}}}function B(m){var g=null;if(m instanceof ds)g=B(m.result);else if(m instanceof Ls)for(var P=0,V=m.args;PV.maximum?[new an(g,P,P+" is greater than the maximum value "+V.maximum)]:[]}function pt(m){var g=m.valueSpec,P=ln(m.value.type),V,J={},ae,ve,Ge=P!=="categorical"&&m.value.property===void 0,yt=!Ge,kt=ko(m.value.stops)==="array"&&ko(m.value.stops[0])==="array"&&ko(m.value.stops[0][0])==="object",Ut=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:lr,default:ei}});return P==="identity"&&Ge&&Ut.push(new an(m.key,m.value,'missing required property "property"')),P!=="identity"&&!m.value.stops&&Ut.push(new an(m.key,m.value,'missing required property "stops"')),P==="exponential"&&m.valueSpec.expression&&!ga(m.valueSpec)&&Ut.push(new an(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(yt&&!Vl(m.valueSpec)?Ut.push(new an(m.key,m.value,"property functions not supported")):Ge&&!Fl(m.valueSpec)&&Ut.push(new an(m.key,m.value,"zoom functions not supported"))),(P==="categorical"||kt)&&m.value.property===void 0&&Ut.push(new an(m.key,m.value,'"property" property is required')),Ut;function lr(Li){if(P==="identity")return[new an(Li.key,Li.value,'identity function may not have a "stops" property')];var _n=[],rn=Li.value;return _n=_n.concat(Ne({key:Li.key,value:rn,valueSpec:Li.valueSpec,style:Li.style,styleSpec:Li.styleSpec,arrayElementValidator:kr})),ko(rn)==="array"&&rn.length===0&&_n.push(new an(Li.key,rn,"array must have at least one stop")),_n}function kr(Li){var _n=[],rn=Li.value,Fa=Li.key;if(ko(rn)!=="array")return[new an(Fa,rn,"array expected, "+ko(rn)+" found")];if(rn.length!==2)return[new an(Fa,rn,"array length 2 expected, length "+rn.length+" found")];if(kt){if(ko(rn[0])!=="object")return[new an(Fa,rn,"object expected, "+ko(rn[0])+" found")];if(rn[0].zoom===void 0)return[new an(Fa,rn,"object stop key must have zoom")];if(rn[0].value===void 0)return[new an(Fa,rn,"object stop key must have value")];if(ve&&ve>ln(rn[0].zoom))return[new an(Fa,rn[0].zoom,"stop zoom values must appear in ascending order")];ln(rn[0].zoom)!==ve&&(ve=ln(rn[0].zoom),ae=void 0,J={}),_n=_n.concat(le({key:Fa+"[0]",value:rn[0],valueSpec:{zoom:{}},style:Li.style,styleSpec:Li.styleSpec,objectElementValidators:{zoom:$e,value:xr}}))}else _n=_n.concat(xr({key:Fa+"[0]",value:rn[0],valueSpec:{},style:Li.style,styleSpec:Li.styleSpec},rn));return Uo(ka(rn[1]))?_n.concat([new an(Fa+"[1]",rn[1],"expressions are not allowed in function stops.")]):_n.concat(pl({key:Fa+"[1]",value:rn[1],valueSpec:g,style:Li.style,styleSpec:Li.styleSpec}))}function xr(Li,_n){var rn=ko(Li.value),Fa=ln(Li.value),On=Li.value!==null?Li.value:_n;if(!V)V=rn;else if(rn!==V)return[new an(Li.key,On,rn+" stop domain type must match previous stop domain type "+V)];if(rn!=="number"&&rn!=="string"&&rn!=="boolean")return[new an(Li.key,On,"stop domain value must be a number, string, or boolean")];if(rn!=="number"&&P!=="categorical"){var Ra="number expected, "+rn+" found";return Vl(g)&&P===void 0&&(Ra+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new an(Li.key,On,Ra)]}return P==="categorical"&&rn==="number"&&(!isFinite(Fa)||Math.floor(Fa)!==Fa)?[new an(Li.key,On,"integer expected, found "+Fa)]:P!=="categorical"&&rn==="number"&&ae!==void 0&&Fa=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 g=0,P=m.slice(1);gg?1:0}function Ve(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var g=1;g"||g==="<="||g===">="?Ke(m[1],m[2],g):g==="any"?ft(m.slice(1)):g==="all"?["all"].concat(m.slice(1).map(ot)):g==="none"?["all"].concat(m.slice(1).map(ot).map($t)):g==="in"?qt(m[1],m.slice(2)):g==="!in"?$t(qt(m[1],m.slice(2))):g==="has"?Xt(m[1]):g==="!has"?$t(Xt(m[1])):g==="within"?m:!0;return P}function Ke(m,g,P){switch(m){case"$type":return["filter-type-"+P,g];case"$id":return["filter-id-"+P,g];default:return["filter-"+P,m,g]}}function ft(m){return["any"].concat(m.map(ot))}function qt(m,g){if(g.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",g]];case"$id":return["filter-id-in",["literal",g]];default:return g.length>200&&!g.some(function(P){return typeof P!=typeof g[0]})?["filter-in-large",m,["literal",g.sort(qe)]]:["filter-in-small",m,["literal",g]]}}function Xt(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function $t(m){return["!",m]}function dr(m){return Ir(ka(m.value))?zt(pa({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Mr(m)}function Mr(m){var g=m.value,P=m.key;if(ko(g)!=="array")return[new an(P,g,"array expected, "+ko(g)+" found")];var V=m.styleSpec,J,ae=[];if(g.length<1)return[new an(P,g,"filter array must have at least 1 element")];switch(ae=ae.concat(yr({key:P+"[0]",value:g[0],valueSpec:V.filter_operator,style:m.style,styleSpec:m.styleSpec})),ln(g[0])){case"<":case"<=":case">":case">=":g.length>=2&&ln(g[1])==="$type"&&ae.push(new an(P,g,'"$type" cannot be use with operator "'+g[0]+'"'));case"==":case"!=":g.length!==3&&ae.push(new an(P,g,'filter array for operator "'+g[0]+'" must have 3 elements'));case"in":case"!in":g.length>=2&&(J=ko(g[1]),J!=="string"&&ae.push(new an(P+"[1]",g[1],"string expected, "+J+" found")));for(var ve=2;ve=Ut[xr+0]&&V>=Ut[xr+1])?(ve[kr]=!0,ae.push(kt[kr])):ve[kr]=!1}}},sf.prototype._forEachCell=function(m,g,P,V,J,ae,ve,Ge){for(var yt=this._convertToCellCoord(m),kt=this._convertToCellCoord(g),Ut=this._convertToCellCoord(P),lr=this._convertToCellCoord(V),kr=yt;kr<=Ut;kr++)for(var xr=kt;xr<=lr;xr++){var ei=this.d*xr+kr;if(!(Ge&&!Ge(this._convertFromCellCoord(kr),this._convertFromCellCoord(xr),this._convertFromCellCoord(kr+1),this._convertFromCellCoord(xr+1)))&&J.call(this,m,g,P,V,ei,ae,ve,Ge))return}},sf.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},sf.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},sf.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,g=Wu+this.cells.length+1+1,P=0,V=0;V=0)){var lr=m[Ut];kt[Ut]=af[yt].shallow.indexOf(Ut)>=0?lr:Ye(lr,g)}m instanceof Error&&(kt.message=m.message)}if(kt.$name)throw new Error("$name property is reserved for worker serialization logic.");return yt!=="Object"&&(kt.$name=yt),kt}throw new Error("can't serialize object of type "+typeof m)}function it(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||Le(m)||We(m)||ArrayBuffer.isView(m)||m instanceof gf)return m;if(Array.isArray(m))return m.map(it);if(typeof m=="object"){var g=m.$name||"Object",P=af[g],V=P.klass;if(!V)throw new Error("can't deserialize unregistered class "+g);if(V.deserialize)return V.deserialize(m);for(var J=Object.create(V.prototype),ae=0,ve=Object.keys(m);ae=0?yt:it(yt)}}return J}throw new Error("can't deserialize object of type "+typeof m)}var Nt=function(){this.first=!0};Nt.prototype.update=function(g,P){var V=Math.floor(g);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=g,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=P):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 er(m){for(var g=0,P=m;g=65097&&m<=65103)||mt["CJK Compatibility Ideographs"](m)||mt["CJK Compatibility"](m)||mt["CJK Radicals Supplement"](m)||mt["CJK Strokes"](m)||mt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||mt["CJK Unified Ideographs Extension A"](m)||mt["CJK Unified Ideographs"](m)||mt["Enclosed CJK Letters and Months"](m)||mt["Hangul Compatibility Jamo"](m)||mt["Hangul Jamo Extended-A"](m)||mt["Hangul Jamo Extended-B"](m)||mt["Hangul Jamo"](m)||mt["Hangul Syllables"](m)||mt.Hiragana(m)||mt["Ideographic Description Characters"](m)||mt.Kanbun(m)||mt["Kangxi Radicals"](m)||mt["Katakana Phonetic Extensions"](m)||mt.Katakana(m)&&m!==12540||mt["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)||mt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||mt["Unified Canadian Aboriginal Syllabics"](m)||mt["Unified Canadian Aboriginal Syllabics Extended"](m)||mt["Vertical Forms"](m)||mt["Yijing Hexagram Symbols"](m)||mt["Yi Syllables"](m)||mt["Yi Radicals"](m))}function Ci(m){return!!(mt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||mt["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)||mt["Letterlike Symbols"](m)||mt["Number Forms"](m)||mt["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)||mt["Control Pictures"](m)&&m!==9251||mt["Optical Character Recognition"](m)||mt["Enclosed Alphanumerics"](m)||mt["Geometric Shapes"](m)||mt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||mt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||mt["CJK Symbols and Punctuation"](m)||mt.Katakana(m)||mt["Private Use Area"](m)||mt["CJK Compatibility Forms"](m)||mt["Small Form Variants"](m)||mt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Ji(m){return!(Wr(m)||Ci(m))}function ai(m){return mt.Arabic(m)||mt["Arabic Supplement"](m)||mt["Arabic Extended-A"](m)||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m)}function Ti(m){return m>=1424&&m<=2303||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m)}function Bi(m,g){return!(!g&&Ti(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||mt.Khmer(m))}function en(m){for(var g=0,P=m;g-1&&(yo=bi.error),ao&&ao(m)};function vl(){wl.fire(new Vi("pluginStateChange",{pluginStatus:yo,pluginURL:Ko}))}var wl=new Mi,au=function(){return yo},Al=function(m){return m({pluginStatus:yo,pluginURL:Ko}),wl.on("pluginStateChange",m),m},nu=function(m,g,P){if(P===void 0&&(P=!1),yo===bi.deferred||yo===bi.loading||yo===bi.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ko=et.resolveURL(m),yo=bi.deferred,ao=g,vl(),P||Bu()},Bu=function(){if(yo!==bi.deferred||!Ko)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");yo=bi.loading,vl(),Ko&&zr({url:Ko},function(m){m?Ms(m):(yo=bi.loaded,vl())})},qu={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return yo===bi.loaded||qu.applyArabicShaping!=null},isLoading:function(){return yo===bi.loading},setState:function(g){yo=g.pluginStatus,Ko=g.pluginURL},isParsed:function(){return qu.applyArabicShaping!=null&&qu.processBidirectionalText!=null&&qu.processStyledBidirectionalText!=null},getPluginURL:function(){return Ko}},Ju=function(){!qu.isLoading()&&!qu.isLoaded()&&au()==="deferred"&&Bu()},qo=function(g,P){this.zoom=g,P?(this.now=P.now,this.fadeDuration=P.fadeDuration,this.zoomHistory=P.zoomHistory,this.transition=P.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})};qo.prototype.isSupportedScript=function(g){return Wi(g,qu.isLoaded())},qo.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},qo.prototype.getCrossfadeParameters=function(){var g=this.zoom,P=g-Math.floor(g),V=this.crossFadingFactor();return g>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:P+(1-P)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*P}};var Rl=function(g,P){this.property=g,this.value=P,this.expression=w(P===void 0?g.specification.default:P,g.specification)};Rl.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Rl.prototype.possiblyEvaluate=function(g,P,V){return this.property.possiblyEvaluate(this,g,P,V)};var pu=function(g){this.property=g,this.value=new Rl(g,void 0)};pu.prototype.transitioned=function(g,P){return new of(this.property,this.value,P,_({},g.transition,this.transition),g.now)},pu.prototype.untransitioned=function(){return new of(this.property,this.value,null,{},0)};var xu=function(g){this._properties=g,this._values=Object.create(g.defaultTransitionablePropertyValues)};xu.prototype.getValue=function(g){return G(this._values[g].value.value)},xu.prototype.setValue=function(g,P){this._values.hasOwnProperty(g)||(this._values[g]=new pu(this._values[g].property)),this._values[g].value=new Rl(this._values[g].property,P===null?void 0:G(P))},xu.prototype.getTransition=function(g){return G(this._values[g].transition)},xu.prototype.setTransition=function(g,P){this._values.hasOwnProperty(g)||(this._values[g]=new pu(this._values[g].property)),this._values[g].transition=G(P)||void 0},xu.prototype.serialize=function(){for(var g={},P=0,V=Object.keys(this._values);Pthis.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if(Jve.zoomHistory.lastIntegerZoom?{from:V,to:J}:{from:ae,to:J}},g.prototype.interpolate=function(V){return V},g}(jr),Mn=function(g){this.specification=g};Mn.prototype.possiblyEvaluate=function(g,P,V,J){if(g.value!==void 0)if(g.expression.kind==="constant"){var ae=g.expression.evaluate(P,null,{},V,J);return this._calculate(ae,ae,ae,P)}else return this._calculate(g.expression.evaluate(new qo(Math.floor(P.zoom-1),P)),g.expression.evaluate(new qo(Math.floor(P.zoom),P)),g.expression.evaluate(new qo(Math.floor(P.zoom+1),P)),P)},Mn.prototype._calculate=function(g,P,V,J){var ae=J.zoom;return ae>J.zoomHistory.lastIntegerZoom?{from:g,to:P}:{from:V,to:P}},Mn.prototype.interpolate=function(g){return g};var Ta=function(g){this.specification=g};Ta.prototype.possiblyEvaluate=function(g,P,V,J){return!!g.expression.evaluate(P,null,{},V,J)},Ta.prototype.interpolate=function(){return!1};var fa=function(g){this.properties=g,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var P in g){var V=g[P];V.specification.overridable&&this.overridableProperties.push(P);var J=this.defaultPropertyValues[P]=new Rl(V,void 0),ae=this.defaultTransitionablePropertyValues[P]=new pu(V);this.defaultTransitioningPropertyValues[P]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[P]=J.possiblyEvaluate({})}};X("DataDrivenProperty",jr),X("DataConstantProperty",Gt),X("CrossFadedDataDrivenProperty",_i),X("CrossFadedProperty",Mn),X("ColorRampProperty",Ta);var ha="-transition",Io=function(m){function g(P,V){if(m.call(this),this.id=P.id,this.type=P.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},P.type!=="custom"&&(P=P,this.metadata=P.metadata,this.minzoom=P.minzoom,this.maxzoom=P.maxzoom,P.type!=="background"&&(this.source=P.source,this.sourceLayer=P["source-layer"],this.filter=P.filter),V.layout&&(this._unevaluatedLayout=new xf(V.layout)),V.paint)){this._transitionablePaint=new xu(V.paint);for(var J in P.paint)this.setPaintProperty(J,P.paint[J],{validate:!1});for(var ae in P.layout)this.setLayoutProperty(ae,P.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new dc(V.paint)}}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},g.prototype.getLayoutProperty=function(V){return V==="visibility"?this.visibility:this._unevaluatedLayout.getValue(V)},g.prototype.setLayoutProperty=function(V,J,ae){if(ae===void 0&&(ae={}),J!=null){var ve="layers."+this.id+".layout."+V;if(this._validate(tf,ve,V,J,ae))return}if(V==="visibility"){this.visibility=J;return}this._unevaluatedLayout.setValue(V,J)},g.prototype.getPaintProperty=function(V){return U(V,ha)?this._transitionablePaint.getTransition(V.slice(0,-ha.length)):this._transitionablePaint.getValue(V)},g.prototype.setPaintProperty=function(V,J,ae){if(ae===void 0&&(ae={}),J!=null){var ve="layers."+this.id+".paint."+V;if(this._validate(Hu,ve,V,J,ae))return!1}if(U(V,ha))return this._transitionablePaint.setTransition(V.slice(0,-ha.length),J||void 0),!1;var Ge=this._transitionablePaint._values[V],yt=Ge.property.specification["property-type"]==="cross-faded-data-driven",kt=Ge.value.isDataDriven(),Ut=Ge.value;this._transitionablePaint.setValue(V,J),this._handleSpecialPaintPropertyUpdate(V);var lr=this._transitionablePaint._values[V].value,kr=lr.isDataDriven();return kr||kt||yt||this._handleOverridablePaintPropertyUpdate(V,Ut,lr)},g.prototype._handleSpecialPaintPropertyUpdate=function(V){},g.prototype._handleOverridablePaintPropertyUpdate=function(V,J,ae){return!1},g.prototype.isHidden=function(V){return this.minzoom&&V=this.maxzoom?!0:this.visibility==="none"},g.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},g.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},g.prototype.recalculate=function(V,J){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,J)},g.prototype.serialize=function(){var V={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(V.layout=V.layout||{},V.layout.visibility=this.visibility),j(V,function(J,ae){return J!==void 0&&!(ae==="layout"&&!Object.keys(J).length)&&!(ae==="paint"&&!Object.keys(J).length)})},g.prototype._validate=function(V,J,ae,ve,Ge){return Ge===void 0&&(Ge={}),Ge&&Ge.validate===!1?!1:Ku(this,V.call(Jl,{key:J,layerType:this.type,objectKey:ae,value:ve,styleSpec:Ri,style:{glyphs:!0,sprite:!0}}))},g.prototype.is3D=function(){return!1},g.prototype.isTileClipped=function(){return!1},g.prototype.hasOffscreenPass=function(){return!1},g.prototype.resize=function(){},g.prototype.isStateDependent=function(){for(var V in this.paint._values){var J=this.paint.get(V);if(!(!(J instanceof hf)||!Vl(J.property.specification))&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1},g}(Mi),Vs={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Hs=function(g,P){this._structArray=g,this._pos1=P*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},is=128,su=5,Ps=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Ps.serialize=function(g,P){return g._trim(),P&&(g.isTransferred=!0,P.push(g.arrayBuffer)),{length:g.length,arrayBuffer:g.arrayBuffer}},Ps.deserialize=function(g){var P=Object.create(this.prototype);return P.arrayBuffer=g.arrayBuffer,P.length=g.length,P.capacity=g.arrayBuffer.byteLength/P.bytesPerElement,P._refreshViews(),P},Ps.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ps.prototype.clear=function(){this.length=0},Ps.prototype.resize=function(g){this.reserve(g),this.length=g},Ps.prototype.reserve=function(g){if(g>this.capacity){this.capacity=Math.max(g,Math.floor(this.capacity*su),is),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var P=this.uint8;this._refreshViews(),P&&this.uint8.set(P)}},Ps.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function qs(m,g){g===void 0&&(g=1);var P=0,V=0,J=m.map(function(ve){var Ge=Do(ve.type),yt=P=kn(P,Math.max(g,Ge)),kt=ve.components||1;return V=Math.max(V,Ge),P+=Ge*kt,{name:ve.name,type:ve.type,components:kt,offset:yt}}),ae=kn(P,Math.max(V,g));return{members:J,size:ae,alignment:g}}function Do(m){return Vs[m].BYTES_PER_ELEMENT}function kn(m,g){return Math.ceil(m/g)*g}var La=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.int16[ve+0]=J,this.int16[ve+1]=ae,V},g}(Ps);La.prototype.bytesPerElement=4,X("StructArrayLayout2i4",La);var Es=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*4;return this.int16[yt+0]=J,this.int16[yt+1]=ae,this.int16[yt+2]=ve,this.int16[yt+3]=Ge,V},g}(Ps);Es.prototype.bytesPerElement=8,X("StructArrayLayout4i8",Es);var Ws=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*6;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.int16[Ut+2]=ve,this.int16[Ut+3]=Ge,this.int16[Ut+4]=yt,this.int16[Ut+5]=kt,V},g}(Ps);Ws.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ws);var Qo=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*4,lr=V*8;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.uint8[lr+4]=ve,this.uint8[lr+5]=Ge,this.uint8[lr+6]=yt,this.uint8[lr+7]=kt,V},g}(Ps);Qo.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",Qo);var bl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.float32[ve+0]=J,this.float32[ve+1]=ae,V},g}(Ps);bl.prototype.bytesPerElement=8,X("StructArrayLayout2f8",bl);var nl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=this.length;return this.resize(xr+1),this.emplace(xr,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr){var ei=V*10;return this.uint16[ei+0]=J,this.uint16[ei+1]=ae,this.uint16[ei+2]=ve,this.uint16[ei+3]=Ge,this.uint16[ei+4]=yt,this.uint16[ei+5]=kt,this.uint16[ei+6]=Ut,this.uint16[ei+7]=lr,this.uint16[ei+8]=kr,this.uint16[ei+9]=xr,V},g}(Ps);nl.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",nl);var ru=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei){var Li=this.length;return this.resize(Li+1),this.emplace(Li,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li){var _n=V*12;return this.int16[_n+0]=J,this.int16[_n+1]=ae,this.int16[_n+2]=ve,this.int16[_n+3]=Ge,this.uint16[_n+4]=yt,this.uint16[_n+5]=kt,this.uint16[_n+6]=Ut,this.uint16[_n+7]=lr,this.int16[_n+8]=kr,this.int16[_n+9]=xr,this.int16[_n+10]=ei,this.int16[_n+11]=Li,V},g}(Ps);ru.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",ru);var hs=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.float32[Ge+0]=J,this.float32[Ge+1]=ae,this.float32[Ge+2]=ve,V},g}(Ps);hs.prototype.bytesPerElement=12,X("StructArrayLayout3f12",hs);var Ho=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.uint32[ae+0]=J,V},g}(Ps);Ho.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",Ho);var ql=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr){var kr=this.length;return this.resize(kr+1),this.emplace(kr,V,J,ae,ve,Ge,yt,kt,Ut,lr)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=V*10,ei=V*5;return this.int16[xr+0]=J,this.int16[xr+1]=ae,this.int16[xr+2]=ve,this.int16[xr+3]=Ge,this.int16[xr+4]=yt,this.int16[xr+5]=kt,this.uint32[ei+3]=Ut,this.uint16[xr+8]=lr,this.uint16[xr+9]=kr,V},g}(Ps);ql.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",ql);var yl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*6;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.int16[Ut+2]=ve,this.int16[Ut+3]=Ge,this.int16[Ut+4]=yt,this.int16[Ut+5]=kt,V},g}(Ps);yl.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",yl);var tl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,J,ae,ve,Ge)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt){var kt=V*4,Ut=V*8;return this.float32[kt+0]=J,this.float32[kt+1]=ae,this.float32[kt+2]=ve,this.int16[Ut+6]=Ge,this.int16[Ut+7]=yt,V},g}(Ps);tl.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",tl);var js=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*12,kt=V*3;return this.uint8[yt+0]=J,this.uint8[yt+1]=ae,this.float32[kt+1]=ve,this.float32[kt+2]=Ge,V},g}(Ps);js.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",js);var zl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.uint16[Ge+0]=J,this.uint16[Ge+1]=ae,this.uint16[Ge+2]=ve,V},g}(Ps);zl.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",zl);var lu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On){var Ra=this.length;return this.resize(Ra+1),this.emplace(Ra,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra){var so=V*24,As=V*12,dl=V*48;return this.int16[so+0]=J,this.int16[so+1]=ae,this.uint16[so+2]=ve,this.uint16[so+3]=Ge,this.uint32[As+2]=yt,this.uint32[As+3]=kt,this.uint32[As+4]=Ut,this.uint16[so+10]=lr,this.uint16[so+11]=kr,this.uint16[so+12]=xr,this.float32[As+7]=ei,this.float32[As+8]=Li,this.uint8[dl+36]=_n,this.uint8[dl+37]=rn,this.uint8[dl+38]=Fa,this.uint32[As+10]=On,this.int16[so+22]=Ra,V},g}(Ps);lu.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",lu);var bu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou){var Qu=this.length;return this.resize(Qu+1),this.emplace(Qu,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou,Qu){var Eu=V*34,Tf=V*17;return this.int16[Eu+0]=J,this.int16[Eu+1]=ae,this.int16[Eu+2]=ve,this.int16[Eu+3]=Ge,this.int16[Eu+4]=yt,this.int16[Eu+5]=kt,this.int16[Eu+6]=Ut,this.int16[Eu+7]=lr,this.uint16[Eu+8]=kr,this.uint16[Eu+9]=xr,this.uint16[Eu+10]=ei,this.uint16[Eu+11]=Li,this.uint16[Eu+12]=_n,this.uint16[Eu+13]=rn,this.uint16[Eu+14]=Fa,this.uint16[Eu+15]=On,this.uint16[Eu+16]=Ra,this.uint16[Eu+17]=so,this.uint16[Eu+18]=As,this.uint16[Eu+19]=dl,this.uint16[Eu+20]=fl,this.uint16[Eu+21]=eu,this.uint16[Eu+22]=Ol,this.uint32[Tf+12]=Xl,this.float32[Tf+13]=Cu,this.float32[Tf+14]=tu,this.float32[Tf+15]=ou,this.float32[Tf+16]=Qu,V},g}(Ps);bu.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",bu);var al=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.float32[ae+0]=J,V},g}(Ps);al.prototype.bytesPerElement=4,X("StructArrayLayout1f4",al);var jl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.int16[Ge+0]=J,this.int16[Ge+1]=ae,this.int16[Ge+2]=ve,V},g}(Ps);jl.prototype.bytesPerElement=6,X("StructArrayLayout3i6",jl);var mu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*2,yt=V*4;return this.uint32[Ge+0]=J,this.uint16[yt+2]=ae,this.uint16[yt+3]=ve,V},g}(Ps);mu.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",mu);var Tu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.uint16[ve+0]=J,this.uint16[ve+1]=ae,V},g}(Ps);Tu.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",Tu);var Ru=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.uint16[ae+0]=J,V},g}(Ps);Ru.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",Ru);var Rf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*4;return this.float32[yt+0]=J,this.float32[yt+1]=ae,this.float32[yt+2]=ve,this.float32[yt+3]=Ge,V},g}(Ps);Rf.prototype.bytesPerElement=16,X("StructArrayLayout4f16",Rf);var Cc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},P.x1.get=function(){return this._structArray.int16[this._pos2+2]},P.y1.get=function(){return this._structArray.int16[this._pos2+3]},P.x2.get=function(){return this._structArray.int16[this._pos2+4]},P.y2.get=function(){return this._structArray.int16[this._pos2+5]},P.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},P.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},P.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},P.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(g.prototype,P),g}(Hs);Cc.prototype.size=20;var rf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Cc(this,V)},g}(ql);X("CollisionBoxArray",rf);var Lc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},P.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},P.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},P.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},P.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},P.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},P.segment.get=function(){return this._structArray.uint16[this._pos2+10]},P.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},P.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},P.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},P.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},P.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},P.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},P.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},P.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},P.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},P.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},P.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},P.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(g.prototype,P),g}(Hs);Lc.prototype.size=48;var wf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Lc(this,V)},g}(lu);X("PlacedSymbolArray",wf);var pc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},P.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},P.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},P.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},P.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},P.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},P.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},P.key.get=function(){return this._structArray.uint16[this._pos2+8]},P.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},P.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},P.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},P.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},P.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},P.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},P.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},P.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},P.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},P.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},P.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},P.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},P.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},P.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},P.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},P.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},P.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},P.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},P.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},P.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(g.prototype,P),g}(Hs);pc.prototype.size=68;var vc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new pc(this,V)},g}(bu);X("SymbolInstanceArray",vc);var qc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getoffsetX=function(V){return this.float32[V*1+0]},g}(al);X("GlyphOffsetArray",qc);var If=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getx=function(V){return this.int16[V*3+0]},g.prototype.gety=function(V){return this.int16[V*3+1]},g.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},g}(jl);X("SymbolLineVertexArray",If);var Ac=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return P.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},P.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},P.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(g.prototype,P),g}(Hs);Ac.prototype.size=8;var zc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Ac(this,V)},g}(mu);X("FeatureIndexArray",zc);var Vu=qs([{name:"a_pos",components:2,type:"Int16"}],4),Bc=Vu.members,Ou=function(g){g===void 0&&(g=[]),this.segments=g};Ou.prototype.prepareSegment=function(g,P,V,J){var ae=this.segments[this.segments.length-1];return g>Ou.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+Ou.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+g),(!ae||ae.vertexLength+g>Ou.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==J)&&(ae={vertexOffset:P.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},J!==void 0&&(ae.sortKey=J),this.segments.push(ae)),ae},Ou.prototype.get=function(){return this.segments},Ou.prototype.destroy=function(){for(var g=0,P=this.segments;g>>16)*yt&65535)<<16)&4294967295,Ut=Ut<<15|Ut>>>17,Ut=(Ut&65535)*kt+(((Ut>>>16)*kt&65535)<<16)&4294967295,ve^=Ut,ve=ve<<13|ve>>>19,Ge=(ve&65535)*5+(((ve>>>16)*5&65535)<<16)&4294967295,ve=(Ge&65535)+27492+(((Ge>>>16)+58964&65535)<<16);switch(Ut=0,J){case 3:Ut^=(P.charCodeAt(lr+2)&255)<<16;case 2:Ut^=(P.charCodeAt(lr+1)&255)<<8;case 1:Ut^=P.charCodeAt(lr)&255,Ut=(Ut&65535)*yt+(((Ut>>>16)*yt&65535)<<16)&4294967295,Ut=Ut<<15|Ut>>>17,Ut=(Ut&65535)*kt+(((Ut>>>16)*kt&65535)<<16)&4294967295,ve^=Ut}return ve^=P.length,ve^=ve>>>16,ve=(ve&65535)*2246822507+(((ve>>>16)*2246822507&65535)<<16)&4294967295,ve^=ve>>>13,ve=(ve&65535)*3266489909+(((ve>>>16)*3266489909&65535)<<16)&4294967295,ve^=ve>>>16,ve>>>0}m.exports=g}),N=a(function(m){function g(P,V){for(var J=P.length,ae=V^J,ve=0,Ge;J>=4;)Ge=P.charCodeAt(ve)&255|(P.charCodeAt(++ve)&255)<<8|(P.charCodeAt(++ve)&255)<<16|(P.charCodeAt(++ve)&255)<<24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),Ge^=Ge>>>24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Ge,J-=4,++ve;switch(J){case 3:ae^=(P.charCodeAt(ve+2)&255)<<16;case 2:ae^=(P.charCodeAt(ve+1)&255)<<8;case 1:ae^=P.charCodeAt(ve)&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=g}),$=K,we=K,ge=N;$.murmur3=we,$.murmur2=ge;var Ue=function(){this.ids=[],this.positions=[],this.indexed=!1};Ue.prototype.add=function(g,P,V,J){this.ids.push(Rt(g)),this.positions.push(P,V,J)},Ue.prototype.getPositions=function(g){for(var P=Rt(g),V=0,J=this.ids.length-1;V>1;this.ids[ae]>=P?J=ae:V=ae+1}for(var ve=[];this.ids[V]===P;){var Ge=this.positions[3*V],yt=this.positions[3*V+1],kt=this.positions[3*V+2];ve.push({index:Ge,start:yt,end:kt}),V++}return ve},Ue.serialize=function(g,P){var V=new Float64Array(g.ids),J=new Uint32Array(g.positions);return ur(V,J,0,V.length-1),P&&P.push(V.buffer,J.buffer),{ids:V,positions:J}},Ue.deserialize=function(g){var P=new Ue;return P.ids=g.ids,P.positions=g.positions,P.indexed=!0,P};var dt=Math.pow(2,53)-1;function Rt(m){var g=+m;return!isNaN(g)&&g<=dt?g:$(String(m))}function ur(m,g,P,V){for(;P>1],ae=P-1,ve=V+1;;){do ae++;while(m[ae]J);if(ae>=ve)break;gr(m,ae,ve),gr(g,3*ae,3*ve),gr(g,3*ae+1,3*ve+1),gr(g,3*ae+2,3*ve+2)}ve-Pve.x+1||ytve.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return P}function Mu(m,g){return{type:m.type,id:m.id,properties:m.properties,geometry:g?Ml(m):[]}}function Au(m,g,P,V,J){m.emplaceBack(g*2+(V+1)/2,P*2+(J+1)/2)}var $u=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.layoutVertexArray=new La,this.indexArray=new zl,this.segments=new Ou,this.programConfigurations=new ra(g.layers,g.zoom),this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};$u.prototype.populate=function(g,P,V){var J=this.layers[0],ae=[],ve=null;J.type==="circle"&&(ve=J.layout.get("circle-sort-key"));for(var Ge=0,yt=g;Ge=eo||kr<0||kr>=eo)){var xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,g.sortKey),ei=xr.vertexLength;Au(this.layoutVertexArray,lr,kr,-1,-1),Au(this.layoutVertexArray,lr,kr,1,-1),Au(this.layoutVertexArray,lr,kr,1,1),Au(this.layoutVertexArray,lr,kr,-1,1),this.indexArray.emplaceBack(ei,ei+1,ei+2),this.indexArray.emplaceBack(ei,ei+3,ei+2),xr.vertexLength+=4,xr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,V,{},J)},X("CircleBucket",$u,{omit:["layers"]});function du(m,g){for(var P=0;P=3){for(var ae=0;ae1){if(Td(m,g))return!0;for(var V=0;V1?m.distSqr(P):m.distSqr(P.sub(g)._mult(J)._add(g))}function pv(m,g){for(var P=!1,V,J,ae,ve=0;veg.y!=ae.y>g.y&&g.x<(ae.x-J.x)*(g.y-J.y)/(ae.y-J.y)+J.x&&(P=!P)}return P}function Sd(m,g){for(var P=!1,V=0,J=m.length-1;Vg.y!=ve.y>g.y&&g.x<(ve.x-ae.x)*(g.y-ae.y)/(ve.y-ae.y)+ae.x&&(P=!P)}return P}function vv(m,g,P,V,J){for(var ae=0,ve=m;ae=Ge.x&&J>=Ge.y)return!0}var yt=[new l(g,P),new l(g,J),new l(V,J),new l(V,P)];if(m.length>2)for(var kt=0,Ut=yt;ktJ.x&&g.x>J.x||m.yJ.y&&g.y>J.y)return!1;var ae=ne(m,g,P[0]);return ae!==ne(m,g,P[1])||ae!==ne(m,g,P[2])||ae!==ne(m,g,P[3])}function Md(m,g,P){var V=g.paint.get(m).value;return V.kind==="constant"?V.value:P.programConfigurations.get(g.id).getMaxValue(m)}function kp(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Kp(m,g,P,V,J){if(!g[0]&&!g[1])return m;var ae=l.convert(g)._mult(J);P==="viewport"&&ae._rotate(-V);for(var ve=[],Ge=0;Ge0&&(ae=1/Math.sqrt(ae)),m[0]=g[0]*ae,m[1]=g[1]*ae,m[2]=g[2]*ae,m}function N8(m,g){return m[0]*g[0]+m[1]*g[1]+m[2]*g[2]}function U8(m,g,P){var V=g[0],J=g[1],ae=g[2],ve=P[0],Ge=P[1],yt=P[2];return m[0]=J*yt-ae*Ge,m[1]=ae*ve-V*yt,m[2]=V*Ge-J*ve,m}function V8(m,g,P){var V=g[0],J=g[1],ae=g[2];return m[0]=V*P[0]+J*P[3]+ae*P[6],m[1]=V*P[1]+J*P[4]+ae*P[7],m[2]=V*P[2]+J*P[5]+ae*P[8],m}var H8=om,EQ=function(){var m=am();return function(g,P,V,J,ae,ve){var Ge,yt;for(P||(P=3),V||(V=0),J?yt=Math.min(J*P+V,g.length):yt=g.length,Ge=V;Gem.width||J.height>m.height||P.x>m.width-J.width||P.y>m.height-J.height)throw new RangeError("out of range source coordinates for image copy");if(J.width>g.width||J.height>g.height||V.x>g.width-J.width||V.y>g.height-J.height)throw new RangeError("out of range destination coordinates for image copy");for(var ve=m.data,Ge=g.data,yt=0;yt80*P){Ge=kt=m[0],yt=Ut=m[1];for(var ei=P;eikt&&(kt=lr),kr>Ut&&(Ut=kr);xr=Math.max(kt-Ge,Ut-yt),xr=xr!==0?1/xr:0}return Gx(ae,ve,P,Ge,yt,xr),ve}function Pw(m,g,P,V,J){var ae,ve;if(J===fM(m,g,P,V)>0)for(ae=g;ae=g;ae-=V)ve=gC(ae,m[ae],m[ae+1],ve);return ve&&jx(ve,ve.next)&&(Yx(ve),ve=ve.next),ve}function sm(m,g){if(!m)return m;g||(g=m);var P=m,V;do if(V=!1,!P.steiner&&(jx(P,P.next)||Yc(P.prev,P,P.next)===0)){if(Yx(P),P=g=P.prev,P===P.next)break;V=!0}else P=P.next;while(V||P!==g);return g}function Gx(m,g,P,V,J,ae,ve){if(m){!ve&&ae&&Iw(m,V,J,ae);for(var Ge=m,yt,kt;m.prev!==m.next;){if(yt=m.prev,kt=m.next,ae?vC(m,V,J,ae):pC(m)){g.push(yt.i/P),g.push(m.i/P),g.push(kt.i/P),Yx(m),m=kt.next,Ge=kt.next;continue}if(m=kt,m===Ge){ve?ve===1?(m=Wx(sm(m),g,P),Gx(m,g,P,V,J,ae,2)):ve===2&&p0(m,g,P,V,J,ae):Gx(sm(m),g,P,V,J,ae,1);break}}}}function pC(m){var g=m.prev,P=m,V=m.next;if(Yc(g,P,V)>=0)return!1;for(var J=m.next.next;J!==m.prev;){if(um(g.x,g.y,P.x,P.y,V.x,V.y,J.x,J.y)&&Yc(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function vC(m,g,P,V){var J=m.prev,ae=m,ve=m.next;if(Yc(J,ae,ve)>=0)return!1;for(var Ge=J.xae.x?J.x>ve.x?J.x:ve.x:ae.x>ve.x?ae.x:ve.x,Ut=J.y>ae.y?J.y>ve.y?J.y:ve.y:ae.y>ve.y?ae.y:ve.y,lr=oM(Ge,yt,g,P,V),kr=oM(kt,Ut,g,P,V),xr=m.prevZ,ei=m.nextZ;xr&&xr.z>=lr&&ei&&ei.z<=kr;){if(xr!==m.prev&&xr!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,xr.x,xr.y)&&Yc(xr.prev,xr,xr.next)>=0||(xr=xr.prevZ,ei!==m.prev&&ei!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,ei.x,ei.y)&&Yc(ei.prev,ei,ei.next)>=0))return!1;ei=ei.nextZ}for(;xr&&xr.z>=lr;){if(xr!==m.prev&&xr!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,xr.x,xr.y)&&Yc(xr.prev,xr,xr.next)>=0)return!1;xr=xr.prevZ}for(;ei&&ei.z<=kr;){if(ei!==m.prev&&ei!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,ei.x,ei.y)&&Yc(ei.prev,ei,ei.next)>=0)return!1;ei=ei.nextZ}return!0}function Wx(m,g,P){var V=m;do{var J=V.prev,ae=V.next.next;!jx(J,ae)&&Dw(J,V,V.next,ae)&&Xx(J,ae)&&Xx(ae,J)&&(g.push(J.i/P),g.push(V.i/P),g.push(ae.i/P),Yx(V),Yx(V.next),V=m=ae),V=V.next}while(V!==m);return sm(V)}function p0(m,g,P,V,J,ae){var ve=m;do{for(var Ge=ve.next.next;Ge!==ve.prev;){if(ve.i!==Ge.i&&E1(ve,Ge)){var yt=lM(ve,Ge);ve=sm(ve,ve.next),yt=sm(yt,yt.next),Gx(ve,g,P,V,J,ae),Gx(yt,g,P,V,J,ae);return}Ge=Ge.next}ve=ve.next}while(ve!==m)}function lm(m,g,P,V){var J=[],ae,ve,Ge,yt,kt;for(ae=0,ve=g.length;ae=P.next.y&&P.next.y!==P.y){var Ge=P.x+(J-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(Ge<=V&&Ge>ae){if(ae=Ge,Ge===V){if(J===P.y)return P;if(J===P.next.y)return P.next}ve=P.x=P.x&&P.x>=kt&&V!==P.x&&um(Jve.x||P.x===ve.x&&$8(ve,P)))&&(ve=P,lr=kr)),P=P.next;while(P!==yt);return ve}function $8(m,g){return Yc(m.prev,m,g.prev)<0&&Yc(g.next,m,m.next)<0}function Iw(m,g,P,V){var J=m;do J.z===null&&(J.z=oM(J.x,J.y,g,P,V)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next;while(J!==m);J.prevZ.nextZ=null,J.prevZ=null,aM(J)}function aM(m){var g,P,V,J,ae,ve,Ge,yt,kt=1;do{for(P=m,m=null,ae=null,ve=0;P;){for(ve++,V=P,Ge=0,g=0;g0||yt>0&&V;)Ge!==0&&(yt===0||!V||P.z<=V.z)?(J=P,P=P.nextZ,Ge--):(J=V,V=V.nextZ,yt--),ae?ae.nextZ=J:m=J,J.prevZ=ae,ae=J;P=V}ae.nextZ=null,kt*=2}while(ve>1);return m}function oM(m,g,P,V,J){return m=32767*(m-P)*J,g=32767*(g-V)*J,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,m|g<<1}function sM(m){var g=m,P=m;do(g.x=0&&(m-ve)*(V-Ge)-(P-ve)*(g-Ge)>=0&&(P-ve)*(ae-Ge)-(J-ve)*(V-Ge)>=0}function E1(m,g){return m.next.i!==g.i&&m.prev.i!==g.i&&!mC(m,g)&&(Xx(m,g)&&Xx(g,m)&&Q8(m,g)&&(Yc(m.prev,m,g.prev)||Yc(m,g.prev,g))||jx(m,g)&&Yc(m.prev,m,m.next)>0&&Yc(g.prev,g,g.next)>0)}function Yc(m,g,P){return(g.y-m.y)*(P.x-g.x)-(g.x-m.x)*(P.y-g.y)}function jx(m,g){return m.x===g.x&&m.y===g.y}function Dw(m,g,P,V){var J=ug(Yc(m,g,P)),ae=ug(Yc(m,g,V)),ve=ug(Yc(P,V,m)),Ge=ug(Yc(P,V,g));return!!(J!==ae&&ve!==Ge||J===0&&Zx(m,P,g)||ae===0&&Zx(m,V,g)||ve===0&&Zx(P,m,V)||Ge===0&&Zx(P,g,V))}function Zx(m,g,P){return g.x<=Math.max(m.x,P.x)&&g.x>=Math.min(m.x,P.x)&&g.y<=Math.max(m.y,P.y)&&g.y>=Math.min(m.y,P.y)}function ug(m){return m>0?1:m<0?-1:0}function mC(m,g){var P=m;do{if(P.i!==m.i&&P.next.i!==m.i&&P.i!==g.i&&P.next.i!==g.i&&Dw(P,P.next,m,g))return!0;P=P.next}while(P!==m);return!1}function Xx(m,g){return Yc(m.prev,m,m.next)<0?Yc(m,g,m.next)>=0&&Yc(m,m.prev,g)>=0:Yc(m,g,m.prev)<0||Yc(m,m.next,g)<0}function Q8(m,g){var P=m,V=!1,J=(m.x+g.x)/2,ae=(m.y+g.y)/2;do P.y>ae!=P.next.y>ae&&P.next.y!==P.y&&J<(P.next.x-P.x)*(ae-P.y)/(P.next.y-P.y)+P.x&&(V=!V),P=P.next;while(P!==m);return V}function lM(m,g){var P=new uM(m.i,m.x,m.y),V=new uM(g.i,g.x,g.y),J=m.next,ae=g.prev;return m.next=g,g.prev=m,P.next=J,J.prev=P,V.next=P,P.prev=V,ae.next=V,V.prev=ae,V}function gC(m,g,P,V){var J=new uM(m,g,P);return V?(J.next=V.next,J.prev=V,V.next.prev=J,V.next=J):(J.prev=J,J.next=J),J}function Yx(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 uM(m,g,P){this.i=m,this.x=g,this.y=P,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}M1.deviation=function(m,g,P,V){var J=g&&g.length,ae=J?g[0]*P:m.length,ve=Math.abs(fM(m,0,ae,P));if(J)for(var Ge=0,yt=g.length;Ge0&&(V+=m[J-1].length,P.holes.push(V))}return P},zw.default=dC;function cM(m,g,P,V,J){dy(m,g,P||0,V||m.length-1,J||_C)}function dy(m,g,P,V,J){for(;V>P;){if(V-P>600){var ae=V-P+1,ve=g-P+1,Ge=Math.log(ae),yt=.5*Math.exp(2*Ge/3),kt=.5*Math.sqrt(Ge*yt*(ae-yt)/ae)*(ve-ae/2<0?-1:1),Ut=Math.max(P,Math.floor(g-ve*yt/ae+kt)),lr=Math.min(V,Math.floor(g+(ae-ve)*yt/ae+kt));dy(m,g,Ut,lr,J)}var kr=m[g],xr=P,ei=V;for(k1(m,P,g),J(m[V],kr)>0&&k1(m,P,V);xr0;)ei--}J(m[P],kr)===0?k1(m,P,ei):(ei++,k1(m,ei,V)),ei<=g&&(P=ei+1),g<=ei&&(V=ei-1)}}function k1(m,g,P){var V=m[g];m[g]=m[P],m[P]=V}function _C(m,g){return mg?1:0}function Rw(m,g){var P=m.length;if(P<=1)return[m];for(var V=[],J,ae,ve=0;ve1)for(var yt=0;yt>3}if(V--,P===1||P===2)J+=m.readSVarint(),ae+=m.readSVarint(),P===1&&(Ge&&ve.push(Ge),Ge=[]),Ge.push(new l(J,ae));else if(P===7)Ge&&Ge.push(Ge[0].clone());else throw new Error("unknown command "+P)}return Ge&&ve.push(Ge),ve},fg.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var g=m.readVarint()+m.pos,P=1,V=0,J=0,ae=0,ve=1/0,Ge=-1/0,yt=1/0,kt=-1/0;m.pos>3}if(V--,P===1||P===2)J+=m.readSVarint(),ae+=m.readSVarint(),JGe&&(Ge=J),aekt&&(kt=ae);else if(P!==7)throw new Error("unknown command "+P)}return[ve,yt,Ge,kt]},fg.prototype.toGeoJSON=function(m,g,P){var V=this.extent*Math.pow(2,P),J=this.extent*m,ae=this.extent*g,ve=this.loadGeometry(),Ge=fg.types[this.type],yt,kt;function Ut(xr){for(var ei=0;ei>3;g=V===1?m.readString():V===2?m.readFloat():V===3?m.readDouble():V===4?m.readVarint64():V===5?m.readVarint():V===6?m.readSVarint():V===7?m.readBoolean():null}return g}pM.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 g=this._pbf.readVarint()+this._pbf.pos;return new dM(this._pbf,g,this.extent,this._keys,this._values)};var CC=tB;function tB(m,g){this.layers=m.readFields(rB,{},g)}function rB(m,g,P){if(m===3){var V=new py(P,P.readVarint()+P.pos);V.length&&(g[V.name]=V)}}var LC=CC,C1=dM,zC=py,vy={VectorTile:LC,VectorTileFeature:C1,VectorTileLayer:zC},PC=vy.VectorTileFeature.types,qw=500,L1=Math.pow(2,13);function fm(m,g,P,V,J,ae,ve,Ge){m.emplaceBack(g,P,Math.floor(V*L1)*2+ve,J*L1*2,ae*L1*2,Math.round(Ge))}var Hv=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.layoutVertexArray=new Ws,this.indexArray=new zl,this.programConfigurations=new ra(g.layers,g.zoom),this.segments=new Ou,this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};Hv.prototype.populate=function(g,P,V){this.features=[],this.hasPattern=Fw("fill-extrusion",this.layers,P);for(var J=0,ae=g;J=1){var Ra=_n[Fa-1];if(!iB(On,Ra)){xr.vertexLength+4>Ou.MAX_VERTEX_ARRAY_LENGTH&&(xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var so=On.sub(Ra)._perp()._unit(),As=Ra.dist(On);rn+As>32768&&(rn=0),fm(this.layoutVertexArray,On.x,On.y,so.x,so.y,0,0,rn),fm(this.layoutVertexArray,On.x,On.y,so.x,so.y,0,1,rn),rn+=As,fm(this.layoutVertexArray,Ra.x,Ra.y,so.x,so.y,0,0,rn),fm(this.layoutVertexArray,Ra.x,Ra.y,so.x,so.y,0,1,rn);var dl=xr.vertexLength;this.indexArray.emplaceBack(dl,dl+2,dl+1),this.indexArray.emplaceBack(dl+1,dl+2,dl+3),xr.vertexLength+=4,xr.primitiveLength+=2}}}}if(xr.vertexLength+kt>Ou.MAX_VERTEX_ARRAY_LENGTH&&(xr=this.segments.prepareSegment(kt,this.layoutVertexArray,this.indexArray)),PC[g.type]==="Polygon"){for(var fl=[],eu=[],Ol=xr.vertexLength,Xl=0,Cu=yt;Xleo)||m.y===g.y&&(m.y<0||m.y>eo)}function nB(m){return m.every(function(g){return g.x<0})||m.every(function(g){return g.x>eo})||m.every(function(g){return g.y<0})||m.every(function(g){return g.y>eo})}var z1=new fa({"fill-extrusion-opacity":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _i(Ri["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:z1},cm=function(m){function g(P){m.call(this,P,ld)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.createBucket=function(V){return new Hv(V)},g.prototype.queryRadius=function(){return kp(this.paint.get("fill-extrusion-translate"))},g.prototype.is3D=function(){return!0},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt,Ut){var lr=Kp(V,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),yt.angle,kt),kr=this.paint.get("fill-extrusion-height").evaluate(J,ae),xr=this.paint.get("fill-extrusion-base").evaluate(J,ae),ei=aB(lr,Ut,yt,0),Li=yM(ve,xr,kr,Ut),_n=Li[0],rn=Li[1];return IC(_n,rn,ei)},g}(Io);function cg(m,g){return m.x*g.x+m.y*g.y}function vM(m,g){if(m.length===1){for(var P=0,V=g[P++],J;!J||V.equals(J);)if(J=g[P++],!J)return 1/0;for(;P=2&&g[kt-1].equals(g[kt-2]);)kt--;for(var Ut=0;Ut0;if(fl&&Fa>Ut){var Ol=xr.dist(ei);if(Ol>2*lr){var Xl=xr.sub(xr.sub(ei)._mult(lr/Ol)._round());this.updateDistance(ei,Xl),this.addCurrentVertex(Xl,_n,0,0,kr),ei=Xl}}var Cu=ei&&Li,tu=Cu?V:yt?"butt":J;if(Cu&&tu==="round"&&(Asae&&(tu="bevel"),tu==="bevel"&&(As>2&&(tu="flipbevel"),As100)On=rn.mult(-1);else{var ou=As*_n.add(rn).mag()/_n.sub(rn).mag();On._perp()._mult(ou*(eu?-1:1))}this.addCurrentVertex(xr,On,0,0,kr),this.addCurrentVertex(xr,On.mult(-1),0,0,kr)}else if(tu==="bevel"||tu==="fakeround"){var Qu=-Math.sqrt(As*As-1),Eu=eu?Qu:0,Tf=eu?0:Qu;if(ei&&this.addCurrentVertex(xr,_n,Eu,Tf,kr),tu==="fakeround")for(var $f=Math.round(dl*180/Math.PI/gM),Af=1;Af<$f;Af++){var Sf=Af/$f;if(Sf!==.5){var bf=Sf-.5,lc=1.0904+Ra*(-3.2452+Ra*(3.55645-Ra*1.43519)),gc=.848013+Ra*(-1.06021+Ra*.215638);Sf=Sf+Sf*bf*(Sf-1)*(lc*bf*bf+gc)}var Jc=rn.sub(_n)._mult(Sf)._add(_n)._unit()._mult(eu?-1:1);this.addHalfVertex(xr,Jc.x,Jc.y,!1,eu,0,kr)}Li&&this.addCurrentVertex(xr,rn,-Eu,-Tf,kr)}else if(tu==="butt")this.addCurrentVertex(xr,On,0,0,kr);else if(tu==="square"){var ih=ei?1:-1;this.addCurrentVertex(xr,On,ih,ih,kr)}else tu==="round"&&(ei&&(this.addCurrentVertex(xr,_n,0,0,kr),this.addCurrentVertex(xr,_n,1,1,kr,!0)),Li&&(this.addCurrentVertex(xr,rn,-1,-1,kr,!0),this.addCurrentVertex(xr,rn,0,0,kr)));if(fl&&Fa2*lr){var _h=xr.add(Li.sub(xr)._mult(lr/Kh)._round());this.updateDistance(xr,_h),this.addCurrentVertex(_h,rn,0,0,kr),xr=_h}}}}},yh.prototype.addCurrentVertex=function(g,P,V,J,ae,ve){ve===void 0&&(ve=!1);var Ge=P.x+P.y*V,yt=P.y-P.x*V,kt=-P.x+P.y*J,Ut=-P.y-P.x*J;this.addHalfVertex(g,Ge,yt,ve,!1,V,ae),this.addHalfVertex(g,kt,Ut,ve,!0,-J,ae),this.distance>eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(g,P,V,J,ae,ve))},yh.prototype.addHalfVertex=function(g,P,V,J,ae,ve,Ge){var yt=g.x,kt=g.y,Ut=this.lineClips?this.scaledDistance*(eb-1):this.scaledDistance,lr=Ut*Ow;if(this.layoutVertexArray.emplaceBack((yt<<1)+(J?1:0),(kt<<1)+(ae?1:0),Math.round(Bw*P)+128,Math.round(Bw*V)+128,(ve===0?0:ve<0?-1:1)+1|(lr&63)<<2,lr>>6),this.lineClips){var kr=this.scaledDistance-this.lineClips.start,xr=this.lineClips.end-this.lineClips.start,ei=kr/xr;this.layoutVertexArray2.emplaceBack(ei,this.lineClipsArray.length)}var Li=Ge.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Li),Ge.primitiveLength++),ae?this.e2=Li:this.e1=Li},yh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},yh.prototype.updateDistance=function(g,P){this.distance+=g.dist(P),this.updateScaledDistance()},X("LineBucket",yh,{omit:["layers","patternFeatures"]});var _M=new fa({"line-cap":new Gt(Ri.layout_line["line-cap"]),"line-join":new jr(Ri.layout_line["line-join"]),"line-miter-limit":new Gt(Ri.layout_line["line-miter-limit"]),"line-round-limit":new Gt(Ri.layout_line["line-round-limit"]),"line-sort-key":new jr(Ri.layout_line["line-sort-key"])}),xM=new fa({"line-opacity":new jr(Ri.paint_line["line-opacity"]),"line-color":new jr(Ri.paint_line["line-color"]),"line-translate":new Gt(Ri.paint_line["line-translate"]),"line-translate-anchor":new Gt(Ri.paint_line["line-translate-anchor"]),"line-width":new jr(Ri.paint_line["line-width"]),"line-gap-width":new jr(Ri.paint_line["line-gap-width"]),"line-offset":new jr(Ri.paint_line["line-offset"]),"line-blur":new jr(Ri.paint_line["line-blur"]),"line-dasharray":new Mn(Ri.paint_line["line-dasharray"]),"line-pattern":new _i(Ri.paint_line["line-pattern"]),"line-gradient":new Ta(Ri.paint_line["line-gradient"])}),Nw={paint:xM,layout:_M},sB=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.possiblyEvaluate=function(V,J){return J=new qo(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),m.prototype.possiblyEvaluate.call(this,V,J)},g.prototype.evaluate=function(V,J,ae,ve){return J=_({},J,{zoom:Math.floor(J.zoom)}),m.prototype.evaluate.call(this,V,J,ae,ve)},g}(jr),I=new sB(Nw.paint.properties["line-width"].specification);I.useIntegerZoom=!0;var S=function(m){function g(P){m.call(this,P,Nw),this.gradientVersion=0}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V==="line-gradient"){var J=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=J._styleExpression.expression instanceof lo,this.gradientVersion=(this.gradientVersion+1)%d}},g.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},g.prototype.recalculate=function(V,J){m.prototype.recalculate.call(this,V,J),this.paint._values["line-floorwidth"]=I.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,V)},g.prototype.createBucket=function(V){return new yh(V)},g.prototype.queryRadius=function(V){var J=V,ae=D(Md("line-width",this,J),Md("line-gap-width",this,J)),ve=Md("line-offset",this,J);return ae/2+Math.abs(ve)+kp(this.paint.get("line-translate"))},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt){var Ut=Kp(V,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),yt.angle,kt),lr=kt/2*D(this.paint.get("line-width").evaluate(J,ae),this.paint.get("line-gap-width").evaluate(J,ae)),kr=this.paint.get("line-offset").evaluate(J,ae);return kr&&(ve=Z(ve,kr*kt)),Kf(Ut,ve,lr)},g.prototype.isTileClipped=function(){return!0},g}(Io);function D(m,g){return g>0?g+2*m:m}function Z(m,g){for(var P=[],V=new l(0,0),J=0;J":"\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 jn(m){for(var g="",P=0;P>1,Ut=-7,lr=P?J-1:0,kr=P?-1:1,xr=m[g+lr];for(lr+=kr,ae=xr&(1<<-Ut)-1,xr>>=-Ut,Ut+=Ge;Ut>0;ae=ae*256+m[g+lr],lr+=kr,Ut-=8);for(ve=ae&(1<<-Ut)-1,ae>>=-Ut,Ut+=V;Ut>0;ve=ve*256+m[g+lr],lr+=kr,Ut-=8);if(ae===0)ae=1-kt;else{if(ae===yt)return ve?NaN:(xr?-1:1)*(1/0);ve=ve+Math.pow(2,V),ae=ae-kt}return(xr?-1:1)*ve*Math.pow(2,ae-V)},iu=function(m,g,P,V,J,ae){var ve,Ge,yt,kt=ae*8-J-1,Ut=(1<>1,kr=J===23?Math.pow(2,-24)-Math.pow(2,-77):0,xr=V?0:ae-1,ei=V?1:-1,Li=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(Ge=isNaN(g)?1:0,ve=Ut):(ve=Math.floor(Math.log(g)/Math.LN2),g*(yt=Math.pow(2,-ve))<1&&(ve--,yt*=2),ve+lr>=1?g+=kr/yt:g+=kr*Math.pow(2,1-lr),g*yt>=2&&(ve++,yt/=2),ve+lr>=Ut?(Ge=0,ve=Ut):ve+lr>=1?(Ge=(g*yt-1)*Math.pow(2,J),ve=ve+lr):(Ge=g*Math.pow(2,lr-1)*Math.pow(2,J),ve=0));J>=8;m[P+xr]=Ge&255,xr+=ei,Ge/=256,J-=8);for(ve=ve<0;m[P+xr]=ve&255,xr+=ei,ve/=256,kt-=8);m[P+xr-ei]|=Li*128},Su={read:hl,write:iu},Zl=Qs;function Qs(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Qs.Varint=0,Qs.Fixed64=1,Qs.Bytes=2,Qs.Fixed32=5;var gu=65536*65536,cu=1/gu,uu=12,Ts=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Qs.prototype={destroy:function(){this.buf=null},readFields:function(m,g,P){for(P=P||this.length;this.pos>3,ae=this.pos;this.type=V&7,m(J,g,this),this.pos===ae&&this.skip(V)}return g},readMessage:function(m,g){return this.readFields(m,g,this.readVarint()+this.pos)},readFixed32:function(){var m=Zh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Pp(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Zh(this.buf,this.pos)+Zh(this.buf,this.pos+4)*gu;return this.pos+=8,m},readSFixed64:function(){var m=Zh(this.buf,this.pos)+Pp(this.buf,this.pos+4)*gu;return this.pos+=8,m},readFloat:function(){var m=Su.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Su.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var g=this.buf,P,V;return V=g[this.pos++],P=V&127,V<128||(V=g[this.pos++],P|=(V&127)<<7,V<128)||(V=g[this.pos++],P|=(V&127)<<14,V<128)||(V=g[this.pos++],P|=(V&127)<<21,V<128)?P:(V=g[this.pos],P|=(V&15)<<28,wu(P,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,g=this.pos;return this.pos=m,m-g>=uu&&Ts?qf(this.buf,g,m):fp(this.buf,g,m)},readBytes:function(){var m=this.readVarint()+this.pos,g=this.buf.subarray(this.pos,m);return this.pos=m,g},readPackedVarint:function(m,g){if(this.type!==Qs.Bytes)return m.push(this.readVarint(g));var P=fu(this);for(m=m||[];this.pos127;);else if(g===Qs.Bytes)this.pos=this.readVarint()+this.pos;else if(g===Qs.Fixed32)this.pos+=4;else if(g===Qs.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+g)},writeTag:function(m,g){this.writeVarint(m<<3|g)},realloc:function(m){for(var g=this.length||16;g268435455||m<0){oc(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 g=this.pos;this.pos=mc(this.buf,m,this.pos);var P=this.pos-g;P>=128&&$p(g,P,this),this.pos=g-1,this.writeVarint(P),this.pos+=P},writeFloat:function(m){this.realloc(4),Su.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Su.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var g=m.length;this.writeVarint(g),this.realloc(g);for(var P=0;P=128&&$p(P,V,this),this.pos=P-1,this.writeVarint(V),this.pos+=V},writeMessage:function(m,g,P){this.writeTag(m,Qs.Bytes),this.writeRawMessage(g,P)},writePackedVarint:function(m,g){g.length&&this.writeMessage(m,ud,g)},writePackedSVarint:function(m,g){g.length&&this.writeMessage(m,Lh,g)},writePackedBoolean:function(m,g){g.length&&this.writeMessage(m,Zd,g)},writePackedFloat:function(m,g){g.length&&this.writeMessage(m,Wd,g)},writePackedDouble:function(m,g){g.length&&this.writeMessage(m,jd,g)},writePackedFixed32:function(m,g){g.length&&this.writeMessage(m,Kc,g)},writePackedSFixed32:function(m,g){g.length&&this.writeMessage(m,zh,g)},writePackedFixed64:function(m,g){g.length&&this.writeMessage(m,Cd,g)},writePackedSFixed64:function(m,g){g.length&&this.writeMessage(m,fd,g)},writeBytesField:function(m,g){this.writeTag(m,Qs.Bytes),this.writeBytes(g)},writeFixed32Field:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeFixed32(g)},writeSFixed32Field:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeSFixed32(g)},writeFixed64Field:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeFixed64(g)},writeSFixed64Field:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeSFixed64(g)},writeVarintField:function(m,g){this.writeTag(m,Qs.Varint),this.writeVarint(g)},writeSVarintField:function(m,g){this.writeTag(m,Qs.Varint),this.writeSVarint(g)},writeStringField:function(m,g){this.writeTag(m,Qs.Bytes),this.writeString(g)},writeFloatField:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeFloat(g)},writeDoubleField:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeDouble(g)},writeBooleanField:function(m,g){this.writeVarintField(m,!!g)}};function wu(m,g,P){var V=P.buf,J,ae;if(ae=V[P.pos++],J=(ae&112)>>4,ae<128||(ae=V[P.pos++],J|=(ae&127)<<3,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<10,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<17,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<24,ae<128)||(ae=V[P.pos++],J|=(ae&1)<<31,ae<128))return Lu(m,J,g);throw new Error("Expected varint not more than 10 bytes")}function fu(m){return m.type===Qs.Bytes?m.readVarint()+m.pos:m.pos+1}function Lu(m,g,P){return P?g*4294967296+(m>>>0):(g>>>0)*4294967296+(m>>>0)}function oc(m,g){var P,V;if(m>=0?(P=m%4294967296|0,V=m/4294967296|0):(P=~(-m%4294967296),V=~(-m/4294967296),P^4294967295?P=P+1|0:(P=0,V=V+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");g.realloc(10),tc(P,V,g),Ch(V,g)}function tc(m,g,P){P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos]=m&127}function Ch(m,g){var P=(m&7)<<4;g.buf[g.pos++]|=P|((m>>>=3)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127)))))}function $p(m,g,P){var V=g<=16383?1:g<=2097151?2:g<=268435455?3:Math.floor(Math.log(g)/(Math.LN2*7));P.realloc(V);for(var J=P.pos-1;J>=m;J--)P.buf[J+V]=P.buf[J]}function ud(m,g){for(var P=0;P>>8,m[P+2]=g>>>16,m[P+3]=g>>>24}function Pp(m,g){return(m[g]|m[g+1]<<8|m[g+2]<<16)+(m[g+3]<<24)}function fp(m,g,P){for(var V="",J=g;J239?4:ae>223?3:ae>191?2:1;if(J+Ge>P)break;var yt,kt,Ut;Ge===1?ae<128&&(ve=ae):Ge===2?(yt=m[J+1],(yt&192)===128&&(ve=(ae&31)<<6|yt&63,ve<=127&&(ve=null))):Ge===3?(yt=m[J+1],kt=m[J+2],(yt&192)===128&&(kt&192)===128&&(ve=(ae&15)<<12|(yt&63)<<6|kt&63,(ve<=2047||ve>=55296&&ve<=57343)&&(ve=null))):Ge===4&&(yt=m[J+1],kt=m[J+2],Ut=m[J+3],(yt&192)===128&&(kt&192)===128&&(Ut&192)===128&&(ve=(ae&15)<<18|(yt&63)<<12|(kt&63)<<6|Ut&63,(ve<=65535||ve>=1114112)&&(ve=null))),ve===null?(ve=65533,Ge=1):ve>65535&&(ve-=65536,V+=String.fromCharCode(ve>>>10&1023|55296),ve=56320|ve&1023),V+=String.fromCharCode(ve),J+=Ge}return V}function qf(m,g,P){return Ts.decode(m.subarray(g,P))}function mc(m,g,P){for(var V=0,J,ae;V55295&&J<57344)if(ae)if(J<56320){m[P++]=239,m[P++]=191,m[P++]=189,ae=J;continue}else J=ae-55296<<10|J-56320|65536,ae=null;else{J>56319||V+1===g.length?(m[P++]=239,m[P++]=191,m[P++]=189):ae=J;continue}else ae&&(m[P++]=239,m[P++]=191,m[P++]=189,ae=null);J<128?m[P++]=J:(J<2048?m[P++]=J>>6|192:(J<65536?m[P++]=J>>12|224:(m[P++]=J>>18|240,m[P++]=J>>12&63|128),m[P++]=J>>6&63|128),m[P++]=J&63|128)}return P}var sc=3;function Ip(m,g,P){m===1&&P.readMessage(Hc,g)}function Hc(m,g,P){if(m===3){var V=P.readMessage(P1,{}),J=V.id,ae=V.bitmap,ve=V.width,Ge=V.height,yt=V.left,kt=V.top,Ut=V.advance;g.push({id:J,bitmap:new zp({width:ve+2*sc,height:Ge+2*sc},ae),metrics:{width:ve,height:Ge,left:yt,top:kt,advance:Ut}})}}function P1(m,g,P){m===1?g.id=P.readVarint():m===2?g.bitmap=P.readBytes():m===3?g.width=P.readVarint():m===4?g.height=P.readVarint():m===5?g.left=P.readSVarint():m===6?g.top=P.readSVarint():m===7&&(g.advance=P.readVarint())}function v0(m){return new Zl(m).readFields(Ip,[])}var Gv=sc;function Qp(m){for(var g=0,P=0,V=0,J=m;V=0;xr--){var ei=Ge[xr];if(!(kr.w>ei.w||kr.h>ei.h)){if(kr.x=ei.x,kr.y=ei.y,kt=Math.max(kt,kr.y+kr.h),yt=Math.max(yt,kr.x+kr.w),kr.w===ei.w&&kr.h===ei.h){var Li=Ge.pop();xr=0&&J>=g&&m0[this.text.charCodeAt(J)];J--)V--;this.text=this.text.substring(g,V),this.sectionIndex=this.sectionIndex.slice(g,V)},Xh.prototype.substring=function(g,P){var V=new Xh;return V.text=this.text.substring(g,P),V.sectionIndex=this.sectionIndex.slice(g,P),V.sections=this.sections,V},Xh.prototype.toString=function(){return this.text},Xh.prototype.getMaxScale=function(){var g=this;return this.sectionIndex.reduce(function(P,V){return Math.max(P,g.sections[V].scale)},0)},Xh.prototype.addTextSection=function(g,P){this.text+=g.text,this.sections.push(hg.forText(g.scale,g.fontStack||P));for(var V=this.sections.length-1,J=0;J=y0?null:++this.imageSectionID:(this.imageSectionID=Uw,this.imageSectionID)};function lB(m,g){for(var P=[],V=m.text,J=0,ae=0,ve=g;ae=0,Ut=0,lr=0;lr0&&_h>eu&&(eu=_h)}else{var Sf=P[Xl.fontStack],bf=Sf&&Sf[tu];if(bf&&bf.rect)Eu=bf.rect,Qu=bf.metrics;else{var lc=g[Xl.fontStack],gc=lc&&lc[tu];if(!gc)continue;Qu=gc.metrics}ou=(so-Xl.scale)*Va}Af?(m.verticalizable=!0,fl.push({glyph:tu,imageName:Tf,x:kr,y:xr+ou,vertical:Af,scale:Xl.scale,fontStack:Xl.fontStack,sectionIndex:Cu,metrics:Qu,rect:Eu}),kr+=$f*Xl.scale+kt):(fl.push({glyph:tu,imageName:Tf,x:kr,y:xr+ou,vertical:Af,scale:Xl.scale,fontStack:Xl.fontStack,sectionIndex:Cu,metrics:Qu,rect:Eu}),kr+=Qu.advance*Xl.scale+kt)}if(fl.length!==0){var Yd=kr-kt;ei=Math.max(Yd,ei),hB(fl,0,fl.length-1,_n,eu)}kr=0;var Kd=ae*so+eu;dl.lineOffset=Math.max(eu,As),xr+=Kd,Li=Math.max(Kd,Li),++rn}var Jh=xr-I1,dp=wM(ve),pp=dp.horizontalAlign,Ph=dp.verticalAlign;Ld(m.positionedLines,_n,pp,Ph,ei,Li,ae,Jh,J.length),m.top+=-Ph*Jh,m.bottom=m.top+Jh,m.left+=-pp*ei,m.right=m.left+ei}function hB(m,g,P,V,J){if(!(!V&&!J))for(var ae=m[P],ve=ae.metrics.advance*ae.scale,Ge=(m[P].x+ve)*V,yt=g;yt<=P;yt++)m[yt].x-=Ge,m[yt].y+=J}function Ld(m,g,P,V,J,ae,ve,Ge,yt){var kt=(g-P)*J,Ut=0;ae!==ve?Ut=-Ge*V-I1:Ut=(-V*yt+.5)*ve;for(var lr=0,kr=m;lr-P/2;){if(ve--,ve<0)return!1;Ge-=m[ve].dist(ae),ae=m[ve]}Ge+=m[ve].dist(m[ve+1]),ve++;for(var yt=[],kt=0;Ge

V;)kt-=yt.shift().angleDelta;if(kt>J)return!1;ve++,Ge+=lr.dist(kr)}return!0}function PQ(m){for(var g=0,P=0;Pkt){var ei=(kt-yt)/xr,Li=$a(lr.x,kr.x,ei),_n=$a(lr.y,kr.y,ei),rn=new Xd(Li,_n,kr.angleTo(lr),Ut);return rn._round(),!ve||zQ(m,rn,Ge,ve,g)?rn:void 0}yt+=xr}}function BQe(m,g,P,V,J,ae,ve,Ge,yt){var kt=IQ(V,ae,ve),Ut=DQ(V,J),lr=Ut*ve,kr=m[0].x===0||m[0].x===yt||m[0].y===0||m[0].y===yt;g-lr=0&&Ra=0&&so=0&&kr+kt<=Ut){var As=new Xd(Ra,so,Fa,ei);As._round(),(!V||zQ(m,As,ae,V,J))&&xr.push(As)}}lr+=rn}return!Ge&&!xr.length&&!ve&&(xr=RQ(m,lr/2,P,V,J,ae,ve,!0,yt)),xr}function FQ(m,g,P,V,J){for(var ae=[],ve=0;ve=V&&lr.x>=V)&&(Ut.x>=V?Ut=new l(V,Ut.y+(lr.y-Ut.y)*((V-Ut.x)/(lr.x-Ut.x)))._round():lr.x>=V&&(lr=new l(V,Ut.y+(lr.y-Ut.y)*((V-Ut.x)/(lr.x-Ut.x)))._round()),!(Ut.y>=J&&lr.y>=J)&&(Ut.y>=J?Ut=new l(Ut.x+(lr.x-Ut.x)*((J-Ut.y)/(lr.y-Ut.y)),J)._round():lr.y>=J&&(lr=new l(Ut.x+(lr.x-Ut.x)*((J-Ut.y)/(lr.y-Ut.y)),J)._round()),(!yt||!Ut.equals(yt[yt.length-1]))&&(yt=[Ut],ae.push(yt)),yt.push(lr)))))}return ae}var Gw=Pc;function qQ(m,g,P,V){var J=[],ae=m.image,ve=ae.pixelRatio,Ge=ae.paddedRect.w-2*Gw,yt=ae.paddedRect.h-2*Gw,kt=m.right-m.left,Ut=m.bottom-m.top,lr=ae.stretchX||[[0,Ge]],kr=ae.stretchY||[[0,yt]],xr=function(Sf,bf){return Sf+bf[1]-bf[0]},ei=lr.reduce(xr,0),Li=kr.reduce(xr,0),_n=Ge-ei,rn=yt-Li,Fa=0,On=ei,Ra=0,so=Li,As=0,dl=_n,fl=0,eu=rn;if(ae.content&&V){var Ol=ae.content;Fa=UC(lr,0,Ol[0]),Ra=UC(kr,0,Ol[1]),On=UC(lr,Ol[0],Ol[2]),so=UC(kr,Ol[1],Ol[3]),As=Ol[0]-Fa,fl=Ol[1]-Ra,dl=Ol[2]-Ol[0]-On,eu=Ol[3]-Ol[1]-so}var Xl=function(Sf,bf,lc,gc){var Jc=VC(Sf.stretch-Fa,On,kt,m.left),ih=HC(Sf.fixed-As,dl,Sf.stretch,ei),Kh=VC(bf.stretch-Ra,so,Ut,m.top),_h=HC(bf.fixed-fl,eu,bf.stretch,Li),Yd=VC(lc.stretch-Fa,On,kt,m.left),Kd=HC(lc.fixed-As,dl,lc.stretch,ei),Jh=VC(gc.stretch-Ra,so,Ut,m.top),dp=HC(gc.fixed-fl,eu,gc.stretch,Li),pp=new l(Jc,Kh),Ph=new l(Yd,Kh),vp=new l(Yd,Jh),_v=new l(Jc,Jh),vg=new l(ih/ve,_h/ve),F1=new l(Kd/ve,dp/ve),q1=g*Math.PI/180;if(q1){var B1=Math.sin(q1),$w=Math.cos(q1),g0=[$w,-B1,B1,$w];pp._matMult(g0),Ph._matMult(g0),_v._matMult(g0),vp._matMult(g0)}var YC=Sf.stretch+Sf.fixed,xB=lc.stretch+lc.fixed,KC=bf.stretch+bf.fixed,bB=gc.stretch+gc.fixed,Wv={x:ae.paddedRect.x+Gw+YC,y:ae.paddedRect.y+Gw+KC,w:xB-YC,h:bB-KC},Qw=dl/ve/kt,JC=eu/ve/Ut;return{tl:pp,tr:Ph,bl:_v,br:vp,tex:Wv,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:vg,pixelOffsetBR:F1,minFontScaleX:Qw,minFontScaleY:JC,isSDF:P}};if(!V||!ae.stretchX&&!ae.stretchY)J.push(Xl({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ge+1},{fixed:0,stretch:yt+1}));else for(var Cu=BQ(lr,_n,ei),tu=BQ(kr,rn,Li),ou=0;ou0&&(ei=Math.max(10,ei),this.circleDiameter=ei)}else{var Li=ve.top*Ge-yt,_n=ve.bottom*Ge+yt,rn=ve.left*Ge-yt,Fa=ve.right*Ge+yt,On=ve.collisionPadding;if(On&&(rn-=On[0]*Ge,Li-=On[1]*Ge,Fa+=On[2]*Ge,_n+=On[3]*Ge),Ut){var Ra=new l(rn,Li),so=new l(Fa,Li),As=new l(rn,_n),dl=new l(Fa,_n),fl=Ut*Math.PI/180;Ra._rotate(fl),so._rotate(fl),As._rotate(fl),dl._rotate(fl),rn=Math.min(Ra.x,so.x,As.x,dl.x),Fa=Math.max(Ra.x,so.x,As.x,dl.x),Li=Math.min(Ra.y,so.y,As.y,dl.y),_n=Math.max(Ra.y,so.y,As.y,dl.y)}g.emplaceBack(P.x,P.y,rn,Li,Fa,_n,V,J,ae)}this.boxEndIndex=g.length},Ww=function(g,P){if(g===void 0&&(g=[]),P===void 0&&(P=NQe),this.data=g,this.length=this.data.length,this.compare=P,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};Ww.prototype.push=function(g){this.data.push(g),this.length++,this._up(this.length-1)},Ww.prototype.pop=function(){if(this.length!==0){var g=this.data[0],P=this.data.pop();return this.length--,this.length>0&&(this.data[0]=P,this._down(0)),g}},Ww.prototype.peek=function(){return this.data[0]},Ww.prototype._up=function(g){for(var P=this,V=P.data,J=P.compare,ae=V[g];g>0;){var ve=g-1>>1,Ge=V[ve];if(J(ae,Ge)>=0)break;V[g]=Ge,g=ve}V[g]=ae},Ww.prototype._down=function(g){for(var P=this,V=P.data,J=P.compare,ae=this.length>>1,ve=V[g];g=0)break;V[g]=yt,g=Ge}V[g]=ve};function NQe(m,g){return mg?1:0}function UQe(m,g,P){g===void 0&&(g=1),P===void 0&&(P=!1);for(var V=1/0,J=1/0,ae=-1/0,ve=-1/0,Ge=m[0],yt=0;ytae)&&(ae=kt.x),(!yt||kt.y>ve)&&(ve=kt.y)}var Ut=ae-V,lr=ve-J,kr=Math.min(Ut,lr),xr=kr/2,ei=new Ww([],VQe);if(kr===0)return new l(V,J);for(var Li=V;Lirn.d||!rn.d)&&(rn=On,P&&console.log("found best %d after %d probes",Math.round(1e4*On.d)/1e4,Fa)),!(On.max-rn.d<=g)&&(xr=On.h/2,ei.push(new jw(On.p.x-xr,On.p.y-xr,xr,m)),ei.push(new jw(On.p.x+xr,On.p.y-xr,xr,m)),ei.push(new jw(On.p.x-xr,On.p.y+xr,xr,m)),ei.push(new jw(On.p.x+xr,On.p.y+xr,xr,m)),Fa+=4)}return P&&(console.log("num probes: "+Fa),console.log("best distance: "+rn.d)),rn.p}function VQe(m,g){return g.max-m.max}function jw(m,g,P,V){this.p=new l(m,g),this.h=P,this.d=HQe(this.p,V),this.max=this.d+this.h*Math.SQRT2}function HQe(m,g){for(var P=!1,V=1/0,J=0;Jm.y!=Ut.y>m.y&&m.x<(Ut.x-kt.x)*(m.y-kt.y)/(Ut.y-kt.y)+kt.x&&(P=!P),V=Math.min(V,fy(m,kt,Ut))}return(P?1:-1)*Math.sqrt(V)}function GQe(m){for(var g=0,P=0,V=0,J=m[0],ae=0,ve=J.length,Ge=ve-1;ae=eo||g0.y<0||g0.y>=eo||ZQe(m,g0,$w,P,V,J,tu,m.layers[0],m.collisionBoxArray,g.index,g.sourceLayerIndex,m.index,rn,so,fl,yt,On,As,eu,xr,g,ae,kt,Ut,ve)};if(Ol==="line")for(var Qu=0,Eu=FQ(g.geometry,0,0,eo,eo);Qu1){var Kh=qQe(ih,dl,P.vertical||ei,V,Li,Fa);Kh&&ou(ih,Kh)}}else if(g.type==="Polygon")for(var _h=0,Yd=Rw(g.geometry,0);_hD1&&re(m.layerIds[0]+': Value for "text-size" is >= '+TM+'. Reduce your "text-size".')):_n.kind==="composite"&&(rn=[zd*xr.compositeTextSizes[0].evaluate(ve,{},ei),zd*xr.compositeTextSizes[1].evaluate(ve,{},ei)],(rn[0]>D1||rn[1]>D1)&&re(m.layerIds[0]+': Value for "text-size" is >= '+TM+'. Reduce your "text-size".')),m.addSymbols(m.text,Li,rn,Ge,ae,ve,kt,g,yt.lineStartIndex,yt.lineLength,kr,ei);for(var Fa=0,On=Ut;FaD1&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TM+'. Reduce your "icon-size".')):pp.kind==="composite"&&(Ph=[zd*so.compositeIconSizes[0].evaluate(Ra,{},dl),zd*so.compositeIconSizes[1].evaluate(Ra,{},dl)],(Ph[0]>D1||Ph[1]>D1)&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TM+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Jh,Ph,On,Fa,Ra,!1,g,Ol.lineStartIndex,Ol.lineLength,-1,dl),Af=m.icon.placedSymbolArray.length-1,dp&&(Eu=dp.length*4,m.addSymbols(m.icon,dp,Ph,On,Fa,Ra,cp.vertical,g,Ol.lineStartIndex,Ol.lineLength,-1,dl),Sf=m.icon.placedSymbolArray.length-1)}for(var vp in V.horizontal){var _v=V.horizontal[vp];if(!Xl){lc=$(_v.text);var vg=Ge.layout.get("text-rotate").evaluate(Ra,{},dl);Xl=new GC(yt,g,kt,Ut,lr,_v,kr,xr,ei,vg)}var F1=_v.positionedLines.length===1;if(Tf+=NQ(m,g,_v,ae,Ge,ei,Ra,Li,Ol,V.vertical?cp.horizontal:cp.horizontalOnly,F1?Object.keys(V.horizontal):[vp],bf,Af,so,dl),F1)break}V.vertical&&($f+=NQ(m,g,V.vertical,ae,Ge,ei,Ra,Li,Ol,cp.vertical,["vertical"],bf,Sf,so,dl));var q1=Xl?Xl.boxStartIndex:m.collisionBoxArray.length,B1=Xl?Xl.boxEndIndex:m.collisionBoxArray.length,$w=tu?tu.boxStartIndex:m.collisionBoxArray.length,g0=tu?tu.boxEndIndex:m.collisionBoxArray.length,YC=Cu?Cu.boxStartIndex:m.collisionBoxArray.length,xB=Cu?Cu.boxEndIndex:m.collisionBoxArray.length,KC=ou?ou.boxStartIndex:m.collisionBoxArray.length,bB=ou?ou.boxEndIndex:m.collisionBoxArray.length,Wv=-1,Qw=function(MM,iee){return MM&&MM.circleDiameter?Math.max(MM.circleDiameter,iee):iee};Wv=Qw(Xl,Wv),Wv=Qw(tu,Wv),Wv=Qw(Cu,Wv),Wv=Qw(ou,Wv);var JC=Wv>-1?1:0;JC&&(Wv*=fl/Va),m.glyphOffsetArray.length>=Jf.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ra.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,Ra.sortKey),m.symbolInstances.emplaceBack(g.x,g.y,bf.right>=0?bf.right:-1,bf.center>=0?bf.center:-1,bf.left>=0?bf.left:-1,bf.vertical||-1,Af,Sf,lc,q1,B1,$w,g0,YC,xB,KC,bB,kt,Tf,$f,Qu,Eu,JC,0,kr,gc,Jc,Wv)}function XQe(m,g,P,V){var J=m.compareText;if(!(g in J))J[g]=[];else for(var ae=J[g],ve=ae.length-1;ve>=0;ve--)if(V.dist(ae[ve])0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),Ut=yt.value.kind!=="constant"||!!yt.value.value||Object.keys(yt.parameters).length>0,lr=ae.get("symbol-sort-key");if(this.features=[],!(!kt&&!Ut)){for(var kr=P.iconDependencies,xr=P.glyphDependencies,ei=P.availableImages,Li=new qo(this.zoom),_n=0,rn=g;_n=0;for(var $f=0,Af=eu.sections;$f=0;yt--)ve[yt]={x:P[yt].x,y:P[yt].y,tileUnitDistanceFromAnchor:ae},yt>0&&(ae+=P[yt-1].dist(P[yt]));for(var kt=0;kt0},Jf.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Jf.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Jf.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Jf.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Jf.prototype.addIndicesForPlacedSymbol=function(g,P){for(var V=g.placedSymbolArray.get(P),J=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(g),this.sortedAngle=g,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,J=this.symbolInstanceIndexes;V=0&&kt.indexOf(Ge)===yt&&P.addIndicesForPlacedSymbol(P.text,Ge)}),ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,ve.verticalPlacedTextSymbolIndex),ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.placedIconSymbolIndex),ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Jf,{omit:["layers","collisionBoxArray","features","compareText"]}),Jf.MAX_GLYPHS=65535,Jf.addDynamicAttributes=vB;function $Qe(m,g){return g.replace(/{([^{}]+)}/g,function(P,V){return V in m?String(m[V]):""})}var QQe=new fa({"symbol-placement":new Gt(Ri.layout_symbol["symbol-placement"]),"symbol-spacing":new Gt(Ri.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Gt(Ri.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new jr(Ri.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Gt(Ri.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Gt(Ri.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Gt(Ri.layout_symbol["icon-ignore-placement"]),"icon-optional":new Gt(Ri.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Gt(Ri.layout_symbol["icon-rotation-alignment"]),"icon-size":new jr(Ri.layout_symbol["icon-size"]),"icon-text-fit":new Gt(Ri.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Gt(Ri.layout_symbol["icon-text-fit-padding"]),"icon-image":new jr(Ri.layout_symbol["icon-image"]),"icon-rotate":new jr(Ri.layout_symbol["icon-rotate"]),"icon-padding":new Gt(Ri.layout_symbol["icon-padding"]),"icon-keep-upright":new Gt(Ri.layout_symbol["icon-keep-upright"]),"icon-offset":new jr(Ri.layout_symbol["icon-offset"]),"icon-anchor":new jr(Ri.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Gt(Ri.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Gt(Ri.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Gt(Ri.layout_symbol["text-rotation-alignment"]),"text-field":new jr(Ri.layout_symbol["text-field"]),"text-font":new jr(Ri.layout_symbol["text-font"]),"text-size":new jr(Ri.layout_symbol["text-size"]),"text-max-width":new jr(Ri.layout_symbol["text-max-width"]),"text-line-height":new Gt(Ri.layout_symbol["text-line-height"]),"text-letter-spacing":new jr(Ri.layout_symbol["text-letter-spacing"]),"text-justify":new jr(Ri.layout_symbol["text-justify"]),"text-radial-offset":new jr(Ri.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Gt(Ri.layout_symbol["text-variable-anchor"]),"text-anchor":new jr(Ri.layout_symbol["text-anchor"]),"text-max-angle":new Gt(Ri.layout_symbol["text-max-angle"]),"text-writing-mode":new Gt(Ri.layout_symbol["text-writing-mode"]),"text-rotate":new jr(Ri.layout_symbol["text-rotate"]),"text-padding":new Gt(Ri.layout_symbol["text-padding"]),"text-keep-upright":new Gt(Ri.layout_symbol["text-keep-upright"]),"text-transform":new jr(Ri.layout_symbol["text-transform"]),"text-offset":new jr(Ri.layout_symbol["text-offset"]),"text-allow-overlap":new Gt(Ri.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Gt(Ri.layout_symbol["text-ignore-placement"]),"text-optional":new Gt(Ri.layout_symbol["text-optional"])}),eet=new fa({"icon-opacity":new jr(Ri.paint_symbol["icon-opacity"]),"icon-color":new jr(Ri.paint_symbol["icon-color"]),"icon-halo-color":new jr(Ri.paint_symbol["icon-halo-color"]),"icon-halo-width":new jr(Ri.paint_symbol["icon-halo-width"]),"icon-halo-blur":new jr(Ri.paint_symbol["icon-halo-blur"]),"icon-translate":new Gt(Ri.paint_symbol["icon-translate"]),"icon-translate-anchor":new Gt(Ri.paint_symbol["icon-translate-anchor"]),"text-opacity":new jr(Ri.paint_symbol["text-opacity"]),"text-color":new jr(Ri.paint_symbol["text-color"],{runtimeType:Qi,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new jr(Ri.paint_symbol["text-halo-color"]),"text-halo-width":new jr(Ri.paint_symbol["text-halo-width"]),"text-halo-blur":new jr(Ri.paint_symbol["text-halo-blur"]),"text-translate":new Gt(Ri.paint_symbol["text-translate"]),"text-translate-anchor":new Gt(Ri.paint_symbol["text-translate-anchor"])}),yB={paint:eet,layout:QQe},Yw=function(g){this.type=g.property.overrides?g.property.overrides.runtimeType:Co,this.defaultValue=g};Yw.prototype.evaluate=function(g){if(g.formattedSection){var P=this.defaultValue.property.overrides;if(P&&P.hasOverride(g.formattedSection))return P.getOverride(g.formattedSection)}return g.feature&&g.featureState?this.defaultValue.evaluate(g.feature,g.featureState):this.defaultValue.property.specification.default},Yw.prototype.eachChild=function(g){if(!this.defaultValue.isConstant()){var P=this.defaultValue.value;g(P._styleExpression.expression)}},Yw.prototype.outputDefined=function(){return!1},Yw.prototype.serialize=function(){return null},X("FormatSectionOverride",Yw,{omit:["defaultValue"]});var tet=function(m){function g(P){m.call(this,P,yB)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.recalculate=function(V,J){if(m.prototype.recalculate.call(this,V,J),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 ve=[],Ge=0,yt=ae;Ge",targetMapId:J,sourceMapId:ve.mapId})}}},Kw.prototype.receive=function(g){var P=g.data,V=P.id;if(V&&!(P.targetMapId&&this.mapId!==P.targetMapId))if(P.type===""){delete this.tasks[V];var J=this.cancelCallbacks[V];delete this.cancelCallbacks[V],J&&J()}else Ce()||P.mustQueue?(this.tasks[V]=P,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,P)},Kw.prototype.process=function(){if(this.taskQueue.length){var g=this.taskQueue.shift(),P=this.tasks[g];delete this.tasks[g],this.taskQueue.length&&this.invoker.trigger(),P&&this.processTask(g,P)}},Kw.prototype.processTask=function(g,P){var V=this;if(P.type===""){var J=this.callbacks[g];delete this.callbacks[g],J&&(P.error?J(it(P.error)):J(null,it(P.data)))}else{var ae=!1,ve=ke(this.globalScope)?void 0:[],Ge=P.hasCallback?function(kr,xr){ae=!0,delete V.cancelCallbacks[g],V.target.postMessage({id:g,type:"",sourceMapId:V.mapId,error:kr?Ye(kr):null,data:Ye(xr,ve)},ve)}:function(kr){ae=!0},yt=null,kt=it(P.data);if(this.parent[P.type])yt=this.parent[P.type](P.sourceMapId,kt,Ge);else if(this.parent.getWorkerSource){var Ut=P.type.split("."),lr=this.parent.getWorkerSource(P.sourceMapId,Ut[0],kt.source);yt=lr[Ut[1]](kt,Ge)}else Ge(new Error("Could not find function "+P.type));!ae&&yt&&yt.cancel&&(this.cancelCallbacks[g]=yt.cancel)}},Kw.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function det(m,g,P){g=Math.pow(2,P)-g-1;var V=jQ(m*256,g*256,P),J=jQ((m+1)*256,(g+1)*256,P);return V[0]+","+V[1]+","+J[0]+","+J[1]}function jQ(m,g,P){var V=2*Math.PI*6378137/256/Math.pow(2,P),J=m*V-2*Math.PI*6378137/2,ae=g*V-2*Math.PI*6378137/2;return[J,ae]}var mh=function(g,P){g&&(P?this.setSouthWest(g).setNorthEast(P):g.length===4?this.setSouthWest([g[0],g[1]]).setNorthEast([g[2],g[3]]):this.setSouthWest(g[0]).setNorthEast(g[1]))};mh.prototype.setNorthEast=function(g){return this._ne=g instanceof Ic?new Ic(g.lng,g.lat):Ic.convert(g),this},mh.prototype.setSouthWest=function(g){return this._sw=g instanceof Ic?new Ic(g.lng,g.lat):Ic.convert(g),this},mh.prototype.extend=function(g){var P=this._sw,V=this._ne,J,ae;if(g instanceof Ic)J=g,ae=g;else if(g instanceof mh){if(J=g._sw,ae=g._ne,!J||!ae)return this}else{if(Array.isArray(g))if(g.length===4||g.every(Array.isArray)){var ve=g;return this.extend(mh.convert(ve))}else{var Ge=g;return this.extend(Ic.convert(Ge))}return this}return!P&&!V?(this._sw=new Ic(J.lng,J.lat),this._ne=new Ic(ae.lng,ae.lat)):(P.lng=Math.min(J.lng,P.lng),P.lat=Math.min(J.lat,P.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},mh.prototype.getCenter=function(){return new Ic((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},mh.prototype.getSouthWest=function(){return this._sw},mh.prototype.getNorthEast=function(){return this._ne},mh.prototype.getNorthWest=function(){return new Ic(this.getWest(),this.getNorth())},mh.prototype.getSouthEast=function(){return new Ic(this.getEast(),this.getSouth())},mh.prototype.getWest=function(){return this._sw.lng},mh.prototype.getSouth=function(){return this._sw.lat},mh.prototype.getEast=function(){return this._ne.lng},mh.prototype.getNorth=function(){return this._ne.lat},mh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},mh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},mh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},mh.prototype.contains=function(g){var P=Ic.convert(g),V=P.lng,J=P.lat,ae=this._sw.lat<=J&&J<=this._ne.lat,ve=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ve=this._sw.lng>=V&&V>=this._ne.lng),ae&&ve},mh.convert=function(g){return!g||g instanceof mh?g:new mh(g)};var ZQ=63710088e-1,Ic=function(g,P){if(isNaN(g)||isNaN(P))throw new Error("Invalid LngLat object: ("+g+", "+P+")");if(this.lng=+g,this.lat=+P,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ic.prototype.wrap=function(){return new Ic(E(this.lng,-180,180),this.lat)},Ic.prototype.toArray=function(){return[this.lng,this.lat]},Ic.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ic.prototype.distanceTo=function(g){var P=Math.PI/180,V=this.lat*P,J=g.lat*P,ae=Math.sin(V)*Math.sin(J)+Math.cos(V)*Math.cos(J)*Math.cos((g.lng-this.lng)*P),ve=ZQ*Math.acos(Math.min(ae,1));return ve},Ic.prototype.toBounds=function(g){g===void 0&&(g=0);var P=40075017,V=360*g/P,J=V/Math.cos(Math.PI/180*this.lat);return new mh(new Ic(this.lng-J,this.lat-V),new Ic(this.lng+J,this.lat+V))},Ic.convert=function(g){if(g instanceof Ic)return g;if(Array.isArray(g)&&(g.length===2||g.length===3))return new Ic(Number(g[0]),Number(g[1]));if(!Array.isArray(g)&&typeof g=="object"&&g!==null)return new Ic(Number("lng"in g?g.lng:g.lon),Number(g.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 XQ=2*Math.PI*ZQ;function YQ(m){return XQ*Math.cos(m*Math.PI/180)}function KQ(m){return(180+m)/360}function JQ(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function $Q(m,g){return m/YQ(g)}function pet(m){return m*360-180}function gB(m){var g=180-m*360;return 360/Math.PI*Math.atan(Math.exp(g*Math.PI/180))-90}function vet(m,g){return m*YQ(gB(g))}function yet(m){return 1/Math.cos(m*Math.PI/180)}var ib=function(g,P,V){V===void 0&&(V=0),this.x=+g,this.y=+P,this.z=+V};ib.fromLngLat=function(g,P){P===void 0&&(P=0);var V=Ic.convert(g);return new ib(KQ(V.lng),JQ(V.lat),$Q(P,V.lat))},ib.prototype.toLngLat=function(){return new Ic(pet(this.x),gB(this.y))},ib.prototype.toAltitude=function(){return vet(this.z,this.y)},ib.prototype.meterInMercatorCoordinateUnits=function(){return 1/XQ*yet(gB(this.y))};var nb=function(g,P,V){this.z=g,this.x=P,this.y=V,this.key=SM(0,g,g,P,V)};nb.prototype.equals=function(g){return this.z===g.z&&this.x===g.x&&this.y===g.y},nb.prototype.url=function(g,P){var V=det(this.x,this.y,this.z),J=met(this.z,this.x,this.y);return g[(this.x+this.y)%g.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(P==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",J).replace("{bbox-epsg-3857}",V)},nb.prototype.getTilePoint=function(g){var P=Math.pow(2,this.z);return new l((g.x*P-this.x)*eo,(g.y*P-this.y)*eo)},nb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var QQ=function(g,P){this.wrap=g,this.canonical=P,this.key=SM(g,P.z,P.z,P.x,P.y)},gh=function(g,P,V,J,ae){this.overscaledZ=g,this.wrap=P,this.canonical=new nb(V,+J,+ae),this.key=SM(P,g,V,J,ae)};gh.prototype.equals=function(g){return this.overscaledZ===g.overscaledZ&&this.wrap===g.wrap&&this.canonical.equals(g.canonical)},gh.prototype.scaledTo=function(g){var P=this.canonical.z-g;return g>this.canonical.z?new gh(g,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new gh(g,this.wrap,g,this.canonical.x>>P,this.canonical.y>>P)},gh.prototype.calculateScaledKey=function(g,P){var V=this.canonical.z-g;return g>this.canonical.z?SM(this.wrap*+P,g,this.canonical.z,this.canonical.x,this.canonical.y):SM(this.wrap*+P,g,g,this.canonical.x>>V,this.canonical.y>>V)},gh.prototype.isChildOf=function(g){if(g.wrap!==this.wrap)return!1;var P=this.canonical.z-g.canonical.z;return g.overscaledZ===0||g.overscaledZ>P&&g.canonical.y===this.canonical.y>>P},gh.prototype.children=function(g){if(this.overscaledZ>=g)return[new gh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var P=this.canonical.z+1,V=this.canonical.x*2,J=this.canonical.y*2;return[new gh(P,this.wrap,P,V,J),new gh(P,this.wrap,P,V+1,J),new gh(P,this.wrap,P,V,J+1),new gh(P,this.wrap,P,V+1,J+1)]},gh.prototype.isLessThan=function(g){return this.wrapg.wrap?!1:this.overscaledZg.overscaledZ?!1:this.canonical.xg.canonical.x?!1:this.canonical.y0;ae--)J=1<=this.dim+1||P<-1||P>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(P+1)*this.stride+(g+1)},dg.prototype._unpackMapbox=function(g,P,V){return(g*256*256+P*256+V)/10-1e4},dg.prototype._unpackTerrarium=function(g,P,V){return g*256+P+V/256-32768},dg.prototype.getPixels=function(){return new kh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},dg.prototype.backfillBorder=function(g,P,V){if(this.dim!==g.dim)throw new Error("dem dimension mismatch");var J=P*this.dim,ae=P*this.dim+this.dim,ve=V*this.dim,Ge=V*this.dim+this.dim;switch(P){case-1:J=ae-1;break;case 1:ae=J+1;break}switch(V){case-1:ve=Ge-1;break;case 1:Ge=ve+1;break}for(var yt=-P*this.dim,kt=-V*this.dim,Ut=ve;Ut=0&&lr[3]>=0&&yt.insert(Ge,lr[0],lr[1],lr[2],lr[3])}},pg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vy.VectorTile(new Zl(this.rawTileData)).layers,this.sourceLayerCoder=new ZC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},pg.prototype.query=function(g,P,V,J){var ae=this;this.loadVTLayers();for(var ve=g.params||{},Ge=eo/g.tileSize/g.scale,yt=Ae(ve.filter),kt=g.queryGeometry,Ut=g.queryPadding*Ge,lr=tee(kt),kr=this.grid.query(lr.minX-Ut,lr.minY-Ut,lr.maxX+Ut,lr.maxY+Ut),xr=tee(g.cameraQueryGeometry),ei=this.grid3D.query(xr.minX-Ut,xr.minY-Ut,xr.maxX+Ut,xr.maxY+Ut,function(As,dl,fl,eu){return vv(g.cameraQueryGeometry,As-Ut,dl-Ut,fl+Ut,eu+Ut)}),Li=0,_n=ei;Li<_n.length;Li+=1){var rn=_n[Li];kr.push(rn)}kr.sort(_et);for(var Fa={},On,Ra=function(As){var dl=kr[As];if(dl!==On){On=dl;var fl=ae.featureIndexArray.get(dl),eu=null;ae.loadMatchingFeature(Fa,fl.bucketIndex,fl.sourceLayerIndex,fl.featureIndex,yt,ve.layers,ve.availableImages,P,V,J,function(Ol,Xl,Cu){return eu||(eu=Ml(Ol)),Xl.queryIntersectsFeature(kt,Ol,Cu,eu,ae.z,g.transform,Ge,g.pixelPosMatrix)})}},so=0;soJ)ae=!1;else if(!P)ae=!0;else if(this.expirationTime=sn.maxzoom)&&sn.visibility!=="none"){h(Mi,this.zoom,Bt);var fi=Br[sn.id]=sn.createBucket({index:Rr.bucketLayerIDs.length,layers:Mi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ni,sourceID:this.source});fi.populate(Ur,oi,this.tileID.canonical),Rr.bucketLayerIDs.push(Mi.map(function(Qr){return Qr.id}))}}}}var Or,st,Wt,tr,or=i.mapObject(oi.glyphDependencies,function(Qr){return Object.keys(Qr).map(Number)});Object.keys(or).length?sr.send("getGlyphs",{uid:this.uid,stacks:or},function(Qr,Ui){Or||(Or=Qr,st=Ui,Gi.call(zr))}):st={};var Nr=Object.keys(oi.iconDependencies);Nr.length?sr.send("getImages",{icons:Nr,source:this.source,tileID:this.tileID,type:"icons"},function(Qr,Ui){Or||(Or=Qr,Wt=Ui,Gi.call(zr))}):Wt={};var hi=Object.keys(oi.patternDependencies);hi.length?sr.send("getImages",{icons:hi,source:this.source,tileID:this.tileID,type:"patterns"},function(Qr,Ui){Or||(Or=Qr,tr=Ui,Gi.call(zr))}):tr={},Gi.call(this);function Gi(){if(Or)return br(Or);if(st&&Wt&&tr){var Qr=new f(st),Ui=new i.ImageAtlas(Wt,tr);for(var zn in Br){var fn=Br[zn];fn instanceof i.SymbolBucket?(h(fn.layers,this.zoom,Bt),i.performSymbolLayout(fn,st,Qr.positions,Wt,Ui.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):fn.hasPattern&&(fn instanceof i.LineBucket||fn instanceof i.FillBucket||fn instanceof i.FillExtrusionBucket)&&(h(fn.layers,this.zoom,Bt),fn.addFeatures(oi,this.tileID.canonical,Ui.patternPositions))}this.status="done",br(null,{buckets:i.values(Br).filter(function(xn){return!xn.isEmpty()}),featureIndex:Rr,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Qr.image,imageAtlas:Ui,glyphMap:this.returnDependencies?st:null,iconMap:this.returnDependencies?Wt:null,glyphPositions:this.returnDependencies?Qr.positions:null})}}};function h(Lt,vt,Dt){for(var Bt=new i.EvaluationParameters(vt),sr=0,br=Lt;sr=0!=!!vt&&Lt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(vt){this._feature=vt,this.extent=i.EXTENT,this.type=vt.type,this.properties=vt.tags,"id"in vt&&!isNaN(vt.id)&&(this.id=parseInt(vt.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var vt=[],Dt=0,Bt=this._feature.geometry;Dt>31}function Ce(Lt,vt){for(var Dt=Lt.loadGeometry(),Bt=Lt.type,sr=0,br=0,zr=Dt.length,Tr=0;Tr>1;ke(Lt,vt,zr,Bt,sr,br%2),te(Lt,vt,Dt,Bt,zr-1,br+1),te(Lt,vt,Dt,zr+1,sr,br+1)}}function ke(Lt,vt,Dt,Bt,sr,br){for(;sr>Bt;){if(sr-Bt>600){var zr=sr-Bt+1,Tr=Dt-Bt+1,Rr=Math.log(zr),Br=.5*Math.exp(2*Rr/3),oi=.5*Math.sqrt(Rr*Br*(zr-Br)/zr)*(Tr-zr/2<0?-1:1),vi=Math.max(Bt,Math.floor(Dt-Tr*Br/zr+oi)),Pi=Math.min(sr,Math.floor(Dt+(zr-Tr)*Br/zr+oi));ke(Lt,vt,Dt,vi,Pi,br)}var Yr=vt[2*Dt+br],Ni=Bt,Ur=sr;for(Ee(Lt,vt,Bt,Dt),vt[2*sr+br]>Yr&&Ee(Lt,vt,Bt,sr);NiYr;)Ur--}vt[2*Bt+br]===Yr?Ee(Lt,vt,Bt,Ur):(Ur++,Ee(Lt,vt,Ur,sr)),Ur<=Dt&&(Bt=Ur+1),Dt<=Ur&&(sr=Ur-1)}}function Ee(Lt,vt,Dt,Bt){Me(Lt,Dt,Bt),Me(vt,2*Dt,2*Bt),Me(vt,2*Dt+1,2*Bt+1)}function Me(Lt,vt,Dt){var Bt=Lt[vt];Lt[vt]=Lt[Dt],Lt[Dt]=Bt}function Oe(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=[0,Lt.length-1,0],Rr=[],Br,oi;Tr.length;){var vi=Tr.pop(),Pi=Tr.pop(),Yr=Tr.pop();if(Pi-Yr<=zr){for(var Ni=Yr;Ni<=Pi;Ni++)Br=vt[2*Ni],oi=vt[2*Ni+1],Br>=Dt&&Br<=sr&&oi>=Bt&&oi<=br&&Rr.push(Lt[Ni]);continue}var Ur=Math.floor((Yr+Pi)/2);Br=vt[2*Ur],oi=vt[2*Ur+1],Br>=Dt&&Br<=sr&&oi>=Bt&&oi<=br&&Rr.push(Lt[Ur]);var ti=(vi+1)%2;(vi===0?Dt<=Br:Bt<=oi)&&(Tr.push(Yr),Tr.push(Ur-1),Tr.push(ti)),(vi===0?sr>=Br:br>=oi)&&(Tr.push(Ur+1),Tr.push(Pi),Tr.push(ti))}return Rr}function Re(Lt,vt,Dt,Bt,sr,br){for(var zr=[0,Lt.length-1,0],Tr=[],Rr=sr*sr;zr.length;){var Br=zr.pop(),oi=zr.pop(),vi=zr.pop();if(oi-vi<=br){for(var Pi=vi;Pi<=oi;Pi++)me(vt[2*Pi],vt[2*Pi+1],Dt,Bt)<=Rr&&Tr.push(Lt[Pi]);continue}var Yr=Math.floor((vi+oi)/2),Ni=vt[2*Yr],Ur=vt[2*Yr+1];me(Ni,Ur,Dt,Bt)<=Rr&&Tr.push(Lt[Yr]);var ti=(Br+1)%2;(Br===0?Dt-sr<=Ni:Bt-sr<=Ur)&&(zr.push(vi),zr.push(Yr-1),zr.push(ti)),(Br===0?Dt+sr>=Ni:Bt+sr>=Ur)&&(zr.push(Yr+1),zr.push(oi),zr.push(ti))}return Tr}function me(Lt,vt,Dt,Bt){var sr=Lt-Dt,br=vt-Bt;return sr*sr+br*br}var Be=function(Lt){return Lt[0]},fe=function(Lt){return Lt[1]},Ze=function(vt,Dt,Bt,sr,br){Dt===void 0&&(Dt=Be),Bt===void 0&&(Bt=fe),sr===void 0&&(sr=64),br===void 0&&(br=Float64Array),this.nodeSize=sr,this.points=vt;for(var zr=vt.length<65536?Uint16Array:Uint32Array,Tr=this.ids=new zr(vt.length),Rr=this.coords=new br(vt.length*2),Br=0;Br=sr;oi--){var vi=+Date.now();Rr=this._cluster(Rr,oi),this.trees[oi]=new Ze(Rr,Te,nt,zr,Float32Array),Bt&&console.log("z%d: %d clusters in %dms",oi,Rr.length,+Date.now()-vi)}return Bt&&console.timeEnd("total time"),this},gt.prototype.getClusters=function(vt,Dt){var Bt=((vt[0]+180)%360+360)%360-180,sr=Math.max(-90,Math.min(90,vt[1])),br=vt[2]===180?180:((vt[2]+180)%360+360)%360-180,zr=Math.max(-90,Math.min(90,vt[3]));if(vt[2]-vt[0]>=360)Bt=-180,br=180;else if(Bt>br){var Tr=this.getClusters([Bt,sr,180,zr],Dt),Rr=this.getClusters([-180,sr,br,zr],Dt);return Tr.concat(Rr)}for(var Br=this.trees[this._limitZoom(Dt)],oi=Br.range(xt(Bt),_t(zr),xt(br),_t(sr)),vi=[],Pi=0,Yr=oi;PiDt&&(Ur+=Vi.numPoints||1)}if(Ur>=Rr){for(var zi=vi.x*Ni,Mi=vi.y*Ni,sn=Tr&&Ni>1?this._map(vi,!0):null,fi=(oi<<5)+(Dt+1)+this.points.length,Or=0,st=Yr;Or1)for(var Nr=0,hi=Yr;Nr>5},gt.prototype._getOriginZoom=function(vt){return(vt-this.points.length)%32},gt.prototype._map=function(vt,Dt){if(vt.numPoints)return Dt?At({},vt.properties):vt.properties;var Bt=this.points[vt.index].properties,sr=this.options.map(Bt);return Dt&&sr===Bt?At({},sr):sr};function Pt(Lt,vt,Dt,Bt,sr){return{x:Lt,y:vt,zoom:1/0,id:Dt,parentId:-1,numPoints:Bt,properties:sr}}function Qe(Lt,vt){var Dt=Lt.geometry.coordinates,Bt=Dt[0],sr=Dt[1];return{x:xt(Bt),y:_t(sr),zoom:1/0,index:vt,parentId:-1}}function Xe(Lt){return{type:"Feature",id:Lt.id,properties:Tt(Lt),geometry:{type:"Point",coordinates:[Ct(Lt.x),jt(Lt.y)]}}}function Tt(Lt){var vt=Lt.numPoints,Dt=vt>=1e4?Math.round(vt/1e3)+"k":vt>=1e3?Math.round(vt/100)/10+"k":vt;return At(At({},Lt.properties),{cluster:!0,cluster_id:Lt.id,point_count:vt,point_count_abbreviated:Dt})}function xt(Lt){return Lt/360+.5}function _t(Lt){var vt=Math.sin(Lt*Math.PI/180),Dt=.5-.25*Math.log((1+vt)/(1-vt))/Math.PI;return Dt<0?0:Dt>1?1:Dt}function Ct(Lt){return(Lt-.5)*360}function jt(Lt){var vt=(180-Lt*360)*Math.PI/180;return 360*Math.atan(Math.exp(vt))/Math.PI-90}function At(Lt,vt){for(var Dt in vt)Lt[Dt]=vt[Dt];return Lt}function Te(Lt){return Lt.x}function nt(Lt){return Lt.y}function ut(Lt,vt,Dt,Bt){for(var sr=Bt,br=Dt-vt>>1,zr=Dt-vt,Tr,Rr=Lt[vt],Br=Lt[vt+1],oi=Lt[Dt],vi=Lt[Dt+1],Pi=vt+3;Pisr)Tr=Pi,sr=Yr;else if(Yr===sr){var Ni=Math.abs(Pi-br);NiBt&&(Tr-vt>3&&ut(Lt,vt,Tr,Bt),Lt[Tr+2]=sr,Dt-Tr>3&&ut(Lt,Tr,Dt,Bt))}function ct(Lt,vt,Dt,Bt,sr,br){var zr=sr-Dt,Tr=br-Bt;if(zr!==0||Tr!==0){var Rr=((Lt-Dt)*zr+(vt-Bt)*Tr)/(zr*zr+Tr*Tr);Rr>1?(Dt=sr,Bt=br):Rr>0&&(Dt+=zr*Rr,Bt+=Tr*Rr)}return zr=Lt-Dt,Tr=vt-Bt,zr*zr+Tr*Tr}function rt(Lt,vt,Dt,Bt){var sr={id:typeof Lt=="undefined"?null:Lt,type:vt,geometry:Dt,tags:Bt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return je(sr),sr}function je(Lt){var vt=Lt.geometry,Dt=Lt.type;if(Dt==="Point"||Dt==="MultiPoint"||Dt==="LineString")tt(Lt,vt);else if(Dt==="Polygon"||Dt==="MultiLineString")for(var Bt=0;Bt0&&(Bt?zr+=(sr*Br-Rr*br)/2:zr+=Math.sqrt(Math.pow(Rr-sr,2)+Math.pow(Br-br,2))),sr=Rr,br=Br}var oi=vt.length-3;vt[2]=1,ut(vt,0,oi,Dt),vt[oi+2]=1,vt.size=Math.abs(zr),vt.start=0,vt.end=vt.size}function ir(Lt,vt,Dt,Bt){for(var sr=0;sr1?1:Dt}function De(Lt,vt,Dt,Bt,sr,br,zr,Tr){if(Dt/=vt,Bt/=vt,br>=Dt&&zr=Bt)return null;for(var Rr=[],Br=0;Br=Dt&&Ni=Bt)continue;var Ur=[];if(Pi==="Point"||Pi==="MultiPoint")_e(vi,Ur,Dt,Bt,sr);else if(Pi==="LineString")Fe(vi,Ur,Dt,Bt,sr,!1,Tr.lineMetrics);else if(Pi==="MultiLineString")Ie(vi,Ur,Dt,Bt,sr,!1);else if(Pi==="Polygon")Ie(vi,Ur,Dt,Bt,sr,!0);else if(Pi==="MultiPolygon")for(var ti=0;ti=Dt&&zr<=Bt&&(vt.push(Lt[br]),vt.push(Lt[br+1]),vt.push(Lt[br+2]))}}function Fe(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=Pe(Lt),Rr=sr===0?ye:ue,Br=Lt.start,oi,vi,Pi=0;PiDt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Dt),zr&&(Tr.start=Br+oi*vi)):ji>Bt?Vi=Dt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Dt),zi=!0),Vi>Bt&&ji<=Bt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Bt),zi=!0),!br&&zi&&(zr&&(Tr.end=Br+oi*vi),vt.push(Tr),Tr=Pe(Lt)),zr&&(Br+=oi)}var Mi=Lt.length-3;Yr=Lt[Mi],Ni=Lt[Mi+1],Ur=Lt[Mi+2],ji=sr===0?Yr:Ni,ji>=Dt&&ji<=Bt&<(Tr,Yr,Ni,Ur),Mi=Tr.length-3,br&&Mi>=3&&(Tr[Mi]!==Tr[0]||Tr[Mi+1]!==Tr[1])&<(Tr,Tr[0],Tr[1],Tr[2]),Tr.length&&vt.push(Tr)}function Pe(Lt){var vt=[];return vt.size=Lt.size,vt.start=Lt.start,vt.end=Lt.end,vt}function Ie(Lt,vt,Dt,Bt,sr,br){for(var zr=0;zrzr.maxX&&(zr.maxX=oi),vi>zr.maxY&&(zr.maxY=vi)}return zr}function Lr(Lt,vt,Dt,Bt){var sr=vt.geometry,br=vt.type,zr=[];if(br==="Point"||br==="MultiPoint")for(var Tr=0;Tr0&&vt.size<(sr?zr:Bt)){Dt.numPoints+=vt.length/3;return}for(var Tr=[],Rr=0;Rrzr)&&(Dt.numSimplified++,Tr.push(vt[Rr]),Tr.push(vt[Rr+1])),Dt.numPoints++;sr&&Er(Tr,br),Lt.push(Tr)}function Er(Lt,vt){for(var Dt=0,Bt=0,sr=Lt.length,br=sr-2;Bt0===vt)for(Bt=0,sr=Lt.length;Bt24)throw new Error("maxZoom should be in the 0-24 range");if(vt.promoteId&&vt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Bt=Je(Lt,vt);this.tiles={},this.tileCoords=[],Dt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",vt.indexMaxZoom,vt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Bt=de(Bt,vt),Bt.length&&this.splitTile(Bt,0,0,0),Dt&&(Bt.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)))}Ei.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ei.prototype.splitTile=function(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=[Lt,vt,Dt,Bt],Rr=this.options,Br=Rr.debug;Tr.length;){Bt=Tr.pop(),Dt=Tr.pop(),vt=Tr.pop(),Lt=Tr.pop();var oi=1<1&&console.time("creation"),Pi=this.tiles[vi]=qr(Lt,vt,Dt,Bt,Rr),this.tileCoords.push({z:vt,x:Dt,y:Bt}),Br)){Br>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",vt,Dt,Bt,Pi.numFeatures,Pi.numPoints,Pi.numSimplified),console.timeEnd("creation"));var Yr="z"+vt;this.stats[Yr]=(this.stats[Yr]||0)+1,this.total++}if(Pi.source=Lt,sr){if(vt===Rr.maxZoom||vt===sr)continue;var Ni=1<1&&console.time("clipping");var Ur=.5*Rr.buffer/Rr.extent,ti=.5-Ur,ki=.5+Ur,ji=1+Ur,Vi,zi,Mi,sn,fi,Or;Vi=zi=Mi=sn=null,fi=De(Lt,oi,Dt-Ur,Dt+ki,0,Pi.minX,Pi.maxX,Rr),Or=De(Lt,oi,Dt+ti,Dt+ji,0,Pi.minX,Pi.maxX,Rr),Lt=null,fi&&(Vi=De(fi,oi,Bt-Ur,Bt+ki,1,Pi.minY,Pi.maxY,Rr),zi=De(fi,oi,Bt+ti,Bt+ji,1,Pi.minY,Pi.maxY,Rr),fi=null),Or&&(Mi=De(Or,oi,Bt-Ur,Bt+ki,1,Pi.minY,Pi.maxY,Rr),sn=De(Or,oi,Bt+ti,Bt+ji,1,Pi.minY,Pi.maxY,Rr),Or=null),Br>1&&console.timeEnd("clipping"),Tr.push(Vi||[],vt+1,Dt*2,Bt*2),Tr.push(zi||[],vt+1,Dt*2,Bt*2+1),Tr.push(Mi||[],vt+1,Dt*2+1,Bt*2),Tr.push(sn||[],vt+1,Dt*2+1,Bt*2+1)}}},Ei.prototype.getTile=function(Lt,vt,Dt){var Bt=this.options,sr=Bt.extent,br=Bt.debug;if(Lt<0||Lt>24)return null;var zr=1<1&&console.log("drilling down to z%d-%d-%d",Lt,vt,Dt);for(var Rr=Lt,Br=vt,oi=Dt,vi;!vi&&Rr>0;)Rr--,Br=Math.floor(Br/2),oi=Math.floor(oi/2),vi=this.tiles[Si(Rr,Br,oi)];return!vi||!vi.source?null:(br>1&&console.log("found parent tile z%d-%d-%d",Rr,Br,oi),br>1&&console.time("drilling down"),this.splitTile(vi.source,Rr,Br,oi,Lt,vt,Dt),br>1&&console.timeEnd("drilling down"),this.tiles[Tr]?St(this.tiles[Tr],sr):null)};function Si(Lt,vt,Dt){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function x(Y,R,K){var N,$,we,ge=i.browser.devicePixelRatio>1?"@2x":"",Ue=i.getJSON(R.transformRequest(R.normalizeSpriteURL(Y,ge,".json"),i.ResourceType.SpriteJSON),function(ur,gr){Ue=null,we||(we=ur,N=gr,Rt())}),dt=i.getImage(R.transformRequest(R.normalizeSpriteURL(Y,ge,".png"),i.ResourceType.SpriteImage),function(ur,gr){dt=null,we||(we=ur,$=gr,Rt())});function Rt(){if(we)K(we);else if(N&&$){var ur=i.browser.getImageData($),gr={};for(var cr in N){var It=N[cr],Qt=It.width,ar=It.height,mr=It.x,Pr=It.y,Dr=It.sdf,Xr=It.pixelRatio,Gr=It.stretchX,Fr=It.stretchY,Kr=It.content,Cr=new i.RGBAImage({width:Qt,height:ar});i.RGBAImage.copy(ur,Cr,{x:mr,y:Pr},{x:0,y:0},{width:Qt,height:ar}),gr[cr]={data:Cr,pixelRatio:Xr,sdf:Dr,stretchX:Gr,stretchY:Fr,content:Kr}}K(null,gr)}}return{cancel:function(){Ue&&(Ue.cancel(),Ue=null),dt&&(dt.cancel(),dt=null)}}}function b(Y){var R=Y.userImage;if(R&&R.render){var K=R.render();if(K)return Y.data.replace(new Uint8Array(R.data.buffer)),!0}return!1}var y=1,E=function(Y){function R(){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&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.isLoaded=function(){return this.loaded},R.prototype.setLoaded=function(N){if(this.loaded!==N&&(this.loaded=N,N)){for(var $=0,we=this.requestors;$=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 R=this.ctx.getImageData(0,0,this.size,this.size),K=new Uint8ClampedArray(this.size*this.size),N=0;N65535){ur(new Error("glyphs > 65535 not supported"));return}if(It.ranges[ar]){ur(null,{stack:gr,id:cr,glyph:Qt});return}var mr=It.requests[ar];mr||(mr=It.requests[ar]=[],z.loadGlyphRange(gr,ar,N.url,N.requestManager,function(Pr,Dr){if(Dr){for(var Xr in Dr)N._doesCharSupportLocalGlyph(+Xr)||(It.glyphs[+Xr]=Dr[+Xr]);It.ranges[ar]=!0}for(var Gr=0,Fr=mr;Gr1&&(Rt=R[++dt]);var gr=Math.abs(ur-Rt.left),cr=Math.abs(ur-Rt.right),It=Math.min(gr,cr),Qt=void 0,ar=we/N*($+1);if(Rt.isDash){var mr=$-Math.abs(ar);Qt=Math.sqrt(It*It+mr*mr)}else Qt=$-Math.sqrt(It*It+ar*ar);this.data[Ue+ur]=Math.max(0,Math.min(255,Qt+128))}},H.prototype.addRegularDash=function(R){for(var K=R.length-1;K>=0;--K){var N=R[K],$=R[K+1];N.zeroLength?R.splice(K,1):$&&$.isDash===N.isDash&&($.left=N.left,R.splice(K,1))}var we=R[0],ge=R[R.length-1];we.isDash===ge.isDash&&(we.left=ge.left-this.width,ge.right=we.right+this.width);for(var Ue=this.width*this.nextRow,dt=0,Rt=R[dt],ur=0;ur1&&(Rt=R[++dt]);var gr=Math.abs(ur-Rt.left),cr=Math.abs(ur-Rt.right),It=Math.min(gr,cr),Qt=Rt.isDash?It:-It;this.data[Ue+ur]=Math.max(0,Math.min(255,Qt+128))}},H.prototype.addDash=function(R,K){var N=K?7:0,$=2*N+1;if(this.nextRow+$>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var we=0,ge=0;ge=N.minX&&R.x=N.minY&&R.y0&&(ur[new i.OverscaledTileID(N.overscaledZ,Ue,$.z,ge,$.y-1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,N.wrap,$.z,$.x,$.y-1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,Rt,$.z,dt,$.y-1).key]={backfilled:!1}),$.y+10&&(we.resourceTiming=N._resourceTiming,N._resourceTiming=[]),N.fire(new i.Event("data",we))})},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setData=function(N){var $=this;return this._data=N,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(we){if(we){$.fire(new i.ErrorEvent(we));return}var ge={dataType:"source",sourceDataType:"content"};$._collectResourceTiming&&$._resourceTiming&&$._resourceTiming.length>0&&(ge.resourceTiming=$._resourceTiming,$._resourceTiming=[]),$.fire(new i.Event("data",ge))}),this},R.prototype.getClusterExpansionZoom=function(N,$){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:N,source:this.id},$),this},R.prototype.getClusterChildren=function(N,$){return this.actor.send("geojson.getClusterChildren",{clusterId:N,source:this.id},$),this},R.prototype.getClusterLeaves=function(N,$,we,ge){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:N,limit:$,offset:we},ge),this},R.prototype._updateWorkerData=function(N){var $=this;this._loaded=!1;var we=i.extend({},this.workerOptions),ge=this._data;typeof ge=="string"?(we.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ge),i.ResourceType.Source),we.request.collectResourceTiming=this._collectResourceTiming):we.data=JSON.stringify(ge),this.actor.send(this.type+".loadData",we,function(Ue,dt){$._removed||dt&&dt.abandoned||($._loaded=!0,dt&&dt.resourceTiming&&dt.resourceTiming[$.id]&&($._resourceTiming=dt.resourceTiming[$.id].slice(0)),$.actor.send($.type+".coalesce",{source:we.source},null),N(Ue))})},R.prototype.loaded=function(){return this._loaded},R.prototype.loadTile=function(N,$){var we=this,ge=N.actor?"reloadTile":"loadTile";N.actor=this.actor;var Ue={type:this.type,uid:N.uid,tileID:N.tileID,zoom:N.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};N.request=this.actor.send(ge,Ue,function(dt,Rt){return delete N.request,N.unloadVectorData(),N.aborted?$(null):dt?$(dt):(N.loadVectorData(Rt,we.map.painter,ge==="reloadTile"),$(null))})},R.prototype.abortTile=function(N){N.request&&(N.request.cancel(),delete N.request),N.aborted=!0},R.prototype.unloadTile=function(N){N.unloadVectorData(),this.actor.send("removeTile",{uid:N.uid,type:this.type,source:this.id})},R.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},R.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},R.prototype.hasTransition=function(){return!1},R}(i.Evented),ze=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function R(K,N,$,we){Y.call(this),this.id=K,this.dispatcher=$,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(we),this.options=N}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(N,$){var we=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(ge,Ue){we._loaded=!0,ge?we.fire(new i.ErrorEvent(ge)):Ue&&(we.image=Ue,N&&(we.coordinates=N),$&&$(),we._finishLoading())})},R.prototype.loaded=function(){return this._loaded},R.prototype.updateImage=function(N){var $=this;return!this.image||!N.url?this:(this.options.url=N.url,this.load(N.coordinates,function(){$.texture=null}),this)},R.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setCoordinates=function(N){var $=this;this.coordinates=N;var we=N.map(i.MercatorCoordinate.fromLngLat);this.tileID=he(we),this.minzoom=this.maxzoom=this.tileID.z;var ge=we.map(function(Ue){return $.tileID.getTilePoint(Ue)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ge[0].x,ge[0].y,0,0),this._boundsArray.emplaceBack(ge[1].x,ge[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ge[3].x,ge[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ge[2].x,ge[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},R.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var N=this.map.painter.context,$=N.gl;this.boundsBuffer||(this.boundsBuffer=N.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(N,this.image,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var we in this.tiles){var ge=this.tiles[we];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},R.prototype.loadTile=function(N,$){this.tileID&&this.tileID.equals(N.tileID.canonical)?(this.tiles[String(N.tileID.wrap)]=N,N.buckets={},$(null)):(N.state="errored",$(null))},R.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},R.prototype.hasTransition=function(){return!1},R}(i.Evented);function he(Y){for(var R=1/0,K=1/0,N=-1/0,$=-1/0,we=0,ge=Y;we$.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+$.start(0)+" and "+$.end(0)+"-second mark."))):this.video.currentTime=N}},R.prototype.getVideo=function(){return this.video},R.prototype.onAdd=function(N){this.map||(this.map=N,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},R.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var N=this.map.painter.context,$=N.gl;this.boundsBuffer||(this.boundsBuffer=N.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE),$.texSubImage2D($.TEXTURE_2D,0,0,0,$.RGBA,$.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(N,this.video,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var we in this.tiles){var ge=this.tiles[we];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},R.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},R.prototype.hasTransition=function(){return this.video&&!this.video.paused},R}(Ce),ke=function(Y){function R(K,N,$,we){Y.call(this,K,N,$,we),N.coordinates?(!Array.isArray(N.coordinates)||N.coordinates.length!==4||N.coordinates.some(function(ge){return!Array.isArray(ge)||ge.length!==2||ge.some(function(Ue){return typeof Ue!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas!="string"&&!(N.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,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."+K,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate!==void 0?N.animate:!0}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.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()},R.prototype.getCanvas=function(){return this.canvas},R.prototype.onAdd=function(N){this.map=N,this.load(),this.canvas&&this.animate&&this.play()},R.prototype.onRemove=function(){this.pause()},R.prototype.prepare=function(){var N=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,N=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,N=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var $=this.map.painter.context,we=$.gl;this.boundsBuffer||(this.boundsBuffer=$.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(N||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture($,this.canvas,we.RGBA,{premultiply:!0});for(var ge in this.tiles){var Ue=this.tiles[ge];Ue.state!=="loaded"&&(Ue.state="loaded",Ue.texture=this.texture)}}},R.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},R.prototype.hasTransition=function(){return this._playing},R.prototype._hasInvalidDimensions=function(){for(var N=0,$=[this.canvas.width,this.canvas.height];N<$.length;N+=1){var we=$[N];if(isNaN(we)||we<=0)return!0}return!1},R}(Ce),Ee={vector:W,raster:re,"raster-dem":ne,geojson:be,video:te,image:Ce,canvas:ke},Me=function(Y,R,K,N){var $=new Ee[R.type](Y,R,K,N);if($.id!==Y)throw new Error("Expected Source id to be "+Y+" instead of "+$.id);return i.bindAll(["load","abort","unload","serialize","prepare"],$),$},Oe=function(Y){return Ee[Y]},Re=function(Y,R){Ee[Y]=R};function me(Y,R){var K=i.identity([]);return i.translate(K,K,[1,1,0]),i.scale(K,K,[Y.width*.5,Y.height*.5,1]),i.multiply(K,K,Y.calculatePosMatrix(R.toUnwrapped()))}function Be(Y,R,K){if(Y)for(var N=0,$=Y;N<$.length;N+=1){var we=$[N],ge=R[we];if(ge&&ge.source===K&&ge.type==="fill-extrusion")return!0}else for(var Ue in R){var dt=R[Ue];if(dt.source===K&&dt.type==="fill-extrusion")return!0}return!1}function fe(Y,R,K,N,$,we){var ge=Be($&&$.layers,R,Y.id),Ue=we.maxPitchScaleFactor(),dt=Y.tilesIn(N,Ue,ge);dt.sort(gt);for(var Rt=[],ur=0,gr=dt;urthis.max){var Ue=this._getAndRemoveByKey(this.order[0]);Ue&&this.onRemove(Ue)}return this},Qe.prototype.has=function(R){return R.wrapped().key in this.data},Qe.prototype.getAndRemove=function(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null},Qe.prototype._getAndRemoveByKey=function(R){var K=this.data[R].shift();return K.timeout&&clearTimeout(K.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),K.value},Qe.prototype.getByKey=function(R){var K=this.data[R];return K?K[0].value:null},Qe.prototype.get=function(R){if(!this.has(R))return null;var K=this.data[R.wrapped().key][0];return K.value},Qe.prototype.remove=function(R,K){if(!this.has(R))return this;var N=R.wrapped().key,$=K===void 0?0:this.data[N].indexOf(K),we=this.data[N][$];return this.data[N].splice($,1),we.timeout&&clearTimeout(we.timeout),this.data[N].length===0&&delete this.data[N],this.onRemove(we.value),this.order.splice(this.order.indexOf(N),1),this},Qe.prototype.setMaxSize=function(R){for(this.max=R;this.order.length>this.max;){var K=this._getAndRemoveByKey(this.order[0]);K&&this.onRemove(K)}return this},Qe.prototype.filter=function(R){var K=[];for(var N in this.data)for(var $=0,we=this.data[N];$1||(Math.abs(gr)>1&&(Math.abs(gr+It)===1?gr+=It:Math.abs(gr-It)===1&&(gr-=It)),!(!ur.dem||!Rt.dem)&&(Rt.dem.backfillBorder(ur.dem,gr,cr),Rt.neighboringTiles&&Rt.neighboringTiles[Qt]&&(Rt.neighboringTiles[Qt].backfilled=!0)))}},R.prototype.getTile=function(N){return this.getTileByID(N.key)},R.prototype.getTileByID=function(N){return this._tiles[N]},R.prototype._retainLoadedChildren=function(N,$,we,ge){for(var Ue in this._tiles){var dt=this._tiles[Ue];if(!(ge[Ue]||!dt.hasData()||dt.tileID.overscaledZ<=$||dt.tileID.overscaledZ>we)){for(var Rt=dt.tileID;dt&&dt.tileID.overscaledZ>$+1;){var ur=dt.tileID.scaledTo(dt.tileID.overscaledZ-1);dt=this._tiles[ur.key],dt&&dt.hasData()&&(Rt=ur)}for(var gr=Rt;gr.overscaledZ>$;)if(gr=gr.scaledTo(gr.overscaledZ-1),N[gr.key]){ge[Rt.key]=Rt;break}}}},R.prototype.findLoadedParent=function(N,$){if(N.key in this._loadedParentTiles){var we=this._loadedParentTiles[N.key];return we&&we.tileID.overscaledZ>=$?we:null}for(var ge=N.overscaledZ-1;ge>=$;ge--){var Ue=N.scaledTo(ge),dt=this._getLoadedTile(Ue);if(dt)return dt}},R.prototype._getLoadedTile=function(N){var $=this._tiles[N.key];if($&&$.hasData())return $;var we=this._cache.getByKey(N.wrapped().key);return we},R.prototype.updateCacheSize=function(N){var $=Math.ceil(N.width/this._source.tileSize)+1,we=Math.ceil(N.height/this._source.tileSize)+1,ge=$*we,Ue=5,dt=Math.floor(ge*Ue),Rt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,dt):dt;this._cache.setMaxSize(Rt)},R.prototype.handleWrapJump=function(N){var $=this._prevLng===void 0?N:this._prevLng,we=N-$,ge=we/360,Ue=Math.round(ge);if(this._prevLng=N,Ue){var dt={};for(var Rt in this._tiles){var ur=this._tiles[Rt];ur.tileID=ur.tileID.unwrapTo(ur.tileID.wrap+Ue),dt[ur.tileID.key]=ur}this._tiles=dt;for(var gr in this._timers)clearTimeout(this._timers[gr]),delete this._timers[gr];for(var cr in this._tiles){var It=this._tiles[cr];this._setTileReloadTimer(cr,It)}}},R.prototype.update=function(N){var $=this;if(this.transform=N,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(N),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var we;this.used?this._source.tileID?we=N.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(vn){return new i.OverscaledTileID(vn.canonical.z,vn.wrap,vn.canonical.z,vn.canonical.x,vn.canonical.y)}):(we=N.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(we=we.filter(function(vn){return $._source.hasTile(vn)}))):we=[];var ge=N.coveringZoomLevel(this._source),Ue=Math.max(ge-R.maxOverzooming,this._source.minzoom),dt=Math.max(ge+R.maxUnderzooming,this._source.minzoom),Rt=this._updateRetainedTiles(we,ge);if(Rr(this._source.type)){for(var ur={},gr={},cr=Object.keys(Rt),It=0,Qt=cr;Itthis._source.maxzoom){var Dr=mr.children(this._source.maxzoom)[0],Xr=this.getTile(Dr);if(Xr&&Xr.hasData()){we[Dr.key]=Dr;continue}}else{var Gr=mr.children(this._source.maxzoom);if(we[Gr[0].key]&&we[Gr[1].key]&&we[Gr[2].key]&&we[Gr[3].key])continue}for(var Fr=Pr.wasRequested(),Kr=mr.overscaledZ-1;Kr>=Ue;--Kr){var Cr=mr.scaledTo(Kr);if(ge[Cr.key]||(ge[Cr.key]=!0,Pr=this.getTile(Cr),!Pr&&Fr&&(Pr=this._addTile(Cr)),Pr&&(we[Cr.key]=Cr,Fr=Pr.wasRequested(),Pr.hasData())))break}}}return we},R.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var N in this._tiles){for(var $=[],we=void 0,ge=this._tiles[N].tileID;ge.overscaledZ>0;){if(ge.key in this._loadedParentTiles){we=this._loadedParentTiles[ge.key];break}$.push(ge.key);var Ue=ge.scaledTo(ge.overscaledZ-1);if(we=this._getLoadedTile(Ue),we)break;ge=Ue}for(var dt=0,Rt=$;dt0)&&($.hasData()&&$.state!=="reloading"?this._cache.add($.tileID,$,$.getExpiryTimeout()):($.aborted=!0,this._abortTile($),this._unloadTile($))))},R.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var N in this._tiles)this._removeTile(N);this._cache.reset()},R.prototype.tilesIn=function(N,$,we){var ge=this,Ue=[],dt=this.transform;if(!dt)return Ue;for(var Rt=we?dt.getCameraQueryGeometry(N):N,ur=N.map(function(Kr){return dt.pointCoordinate(Kr)}),gr=Rt.map(function(Kr){return dt.pointCoordinate(Kr)}),cr=this.getIds(),It=1/0,Qt=1/0,ar=-1/0,mr=-1/0,Pr=0,Dr=gr;Pr=0&&Qa[1].y+vn>=0){var ra=ur.map(function(sl){return yi.getTilePoint(sl)}),mo=gr.map(function(sl){return yi.getTilePoint(sl)});Ue.push({tile:Cr,tileID:yi,queryGeometry:ra,cameraQueryGeometry:mo,scale:qi})}}},Fr=0;Fr=i.browser.now())return!0}return!1},R.prototype.setFeatureState=function(N,$,we){N=N||"_geojsonTileLayer",this._state.updateState(N,$,we)},R.prototype.removeFeatureState=function(N,$,we){N=N||"_geojsonTileLayer",this._state.removeFeatureState(N,$,we)},R.prototype.getFeatureState=function(N,$){return N=N||"_geojsonTileLayer",this._state.getState(N,$)},R.prototype.setDependencies=function(N,$,we){var ge=this._tiles[N];ge&&ge.setDependencies($,we)},R.prototype.reloadTilesForDependencies=function(N,$){for(var we in this._tiles){var ge=this._tiles[we];ge.hasDependency(N,$)&&this._reloadTile(we,"reloading")}this._cache.filter(function(Ue){return!Ue.hasDependency(N,$)})},R}(i.Evented);zr.maxOverzooming=10,zr.maxUnderzooming=3;function Tr(Y,R){var K=Math.abs(Y.wrap*2)-+(Y.wrap<0),N=Math.abs(R.wrap*2)-+(R.wrap<0);return Y.overscaledZ-R.overscaledZ||N-K||R.canonical.y-Y.canonical.y||R.canonical.x-Y.canonical.x}function Rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function Br(){return new i.window.Worker(Ou.workerUrl)}var oi="mapboxgl_preloaded_worker_pool",vi=function(){this.active={}};vi.prototype.acquire=function(R){if(!this.workers)for(this.workers=[];this.workers.length0?($-ge)/Ue:0;return this.points[we].mult(1-dt).add(this.points[K].mult(dt))};var Qr=function(R,K,N){var $=this.boxCells=[],we=this.circleCells=[];this.xCellCount=Math.ceil(R/N),this.yCellCount=Math.ceil(K/N);for(var ge=0;gethis.width||$<0||K>this.height)return we?!1:[];var Ue=[];if(R<=0&&K<=0&&this.width<=N&&this.height<=$){if(we)return!0;for(var dt=0;dt0:Ue}},Qr.prototype._queryCircle=function(R,K,N,$,we){var ge=R-N,Ue=R+N,dt=K-N,Rt=K+N;if(Ue<0||ge>this.width||Rt<0||dt>this.height)return $?!1:[];var ur=[],gr={hitTest:$,circle:{x:R,y:K,radius:N},seenUids:{box:{},circle:{}}};return this._forEachCell(ge,dt,Ue,Rt,this._queryCellCircle,ur,gr,we),$?ur.length>0:ur},Qr.prototype.query=function(R,K,N,$,we){return this._query(R,K,N,$,!1,we)},Qr.prototype.hitTest=function(R,K,N,$,we){return this._query(R,K,N,$,!0,we)},Qr.prototype.hitTestCircle=function(R,K,N,$){return this._queryCircle(R,K,N,!0,$)},Qr.prototype._queryCell=function(R,K,N,$,we,ge,Ue,dt){var Rt=Ue.seenUids,ur=this.boxCells[we];if(ur!==null)for(var gr=this.bboxes,cr=0,It=ur;cr=gr[ar+0]&&$>=gr[ar+1]&&(!dt||dt(this.boxKeys[Qt]))){if(Ue.hitTest)return ge.push(!0),!0;ge.push({key:this.boxKeys[Qt],x1:gr[ar],y1:gr[ar+1],x2:gr[ar+2],y2:gr[ar+3]})}}}var mr=this.circleCells[we];if(mr!==null)for(var Pr=this.circles,Dr=0,Xr=mr;DrUe*Ue+dt*dt},Qr.prototype._circleAndRectCollide=function(R,K,N,$,we,ge,Ue){var dt=(ge-$)/2,Rt=Math.abs(R-($+dt));if(Rt>dt+N)return!1;var ur=(Ue-we)/2,gr=Math.abs(K-(we+ur));if(gr>ur+N)return!1;if(Rt<=dt||gr<=ur)return!0;var cr=Rt-dt,It=gr-ur;return cr*cr+It*It<=N*N};function Ui(Y,R,K,N,$){var we=i.create();return R?(i.scale(we,we,[1/$,1/$,1]),K||i.rotateZ(we,we,N.angle)):i.multiply(we,N.labelPlaneMatrix,Y),we}function zn(Y,R,K,N,$){if(R){var we=i.clone(Y);return i.scale(we,we,[$,$,1]),K||i.rotateZ(we,we,-N.angle),we}else return N.glCoordMatrix}function fn(Y,R){var K=[Y.x,Y.y,0,1];un(K,K,R);var N=K[3];return{point:new i.Point(K[0]/N,K[1]/N),signedDistanceFromCamera:N}}function xn(Y,R){return .5+.5*(Y/R)}function _a(Y,R){var K=Y[0]/Y[3],N=Y[1]/Y[3],$=K>=-R[0]&&K<=R[0]&&N>=-R[1]&&N<=R[1];return $}function Wn(Y,R,K,N,$,we,ge,Ue){var dt=N?Y.textSizeData:Y.iconSizeData,Rt=i.evaluateSizeForZoom(dt,K.transform.zoom),ur=[256/K.width*2+1,256/K.height*2+1],gr=N?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;gr.clear();for(var cr=Y.lineVertexArray,It=N?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Qt=K.transform.width/K.transform.height,ar=!1,mr=0;mrwe)return{useVertical:!0}}return(Y===i.WritingMode.vertical?R.yK.x)?{needsFlipping:!0}:null}function za(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It){var Qt=R/24,ar=Y.lineOffsetX*Qt,mr=Y.lineOffsetY*Qt,Pr;if(Y.numGlyphs>1){var Dr=Y.glyphStartIndex+Y.numGlyphs,Xr=Y.lineStartIndex,Gr=Y.lineStartIndex+Y.lineLength,Fr=Fn(Qt,Ue,ar,mr,K,ur,gr,Y,dt,we,cr);if(!Fr)return{notEnoughRoom:!0};var Kr=fn(Fr.first.point,ge).point,Cr=fn(Fr.last.point,ge).point;if(N&&!K){var yi=ia(Y.writingMode,Kr,Cr,It);if(yi)return yi}Pr=[Fr.first];for(var qi=Y.glyphStartIndex+1;qi0?mo.point:Hr(gr,ra,vn,1,$),Os=ia(Y.writingMode,vn,sl,It);if(Os)return Os}var eo=na(Qt*Ue.getoffsetX(Y.glyphStartIndex),ar,mr,K,ur,gr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,dt,we,cr);if(!eo)return{notEnoughRoom:!0};Pr=[eo]}for(var fs=0,es=Pr;fs0?1:-1,Qt=0;N&&(It*=-1,Qt=Math.PI),It<0&&(Qt+=Math.PI);for(var ar=It>0?Ue+ge:Ue+ge+1,mr=$,Pr=$,Dr=0,Xr=0,Gr=Math.abs(cr),Fr=[];Dr+Xr<=Gr;){if(ar+=It,ar=dt)return null;if(Pr=mr,Fr.push(mr),mr=gr[ar],mr===void 0){var Kr=new i.Point(Rt.getx(ar),Rt.gety(ar)),Cr=fn(Kr,ur);if(Cr.signedDistanceFromCamera>0)mr=gr[ar]=Cr.point;else{var yi=ar-It,qi=Dr===0?we:new i.Point(Rt.getx(yi),Rt.gety(yi));mr=Hr(qi,Kr,Pr,Gr-Dr+1,ur)}}Dr+=Xr,Xr=Pr.dist(mr)}var vn=(Gr-Dr)/Xr,Qa=mr.sub(Pr),ra=Qa.mult(vn)._add(Pr);ra._add(Qa._unit()._perp()._mult(K*It));var mo=Qt+Math.atan2(mr.y-Pr.y,mr.x-Pr.x);return Fr.push(ra),{point:ra,angle:mo,path:Fr}}var go=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Dn(Y,R){for(var K=0;K=1;$s--)es.push(eo.path[$s]);for(var Ml=1;Ml0){for(var du=es[0].clone(),Nu=es[0].clone(),yf=1;yf=mo.x&&Nu.x<=sl.x&&du.y>=mo.y&&Nu.y<=sl.y?$u=[es]:Nu.xsl.x||Nu.ysl.y?$u=[]:$u=i.clipLine([es],mo.x,mo.y,sl.x,sl.y)}for(var Kf=0,wd=$u;Kf=this.screenRightBoundary||$this.screenBottomBoundary},Wo.prototype.isInsideGrid=function(R,K,N,$){return N>=0&&R=0&&K0){var Gr;return this.prevPlacement&&this.prevPlacement.variableOffsets[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID].text&&(Gr=this.prevPlacement.variableOffsets[cr.crossTileID].anchor),this.variableOffsets[cr.crossTileID]={textOffset:mr,width:N,height:$,anchor:R,textBoxScale:we,prevAnchor:Gr},this.markUsedJustification(It,R,cr,Qt),It.allowVerticalPlacement&&(this.markUsedOrientation(It,Qt,cr),this.placedOrientations[cr.crossTileID]=Qt),{shift:Pr,placedGlyphBoxes:Dr}}},to.prototype.placeLayerBucketPart=function(R,K,N){var $=this,we=R.parameters,ge=we.bucket,Ue=we.layout,dt=we.posMatrix,Rt=we.textLabelPlaneMatrix,ur=we.labelToScreenMatrix,gr=we.textPixelRatio,cr=we.holdingForFade,It=we.collisionBoxArray,Qt=we.partiallyEvaluatedTextSize,ar=we.collisionGroup,mr=Ue.get("text-optional"),Pr=Ue.get("icon-optional"),Dr=Ue.get("text-allow-overlap"),Xr=Ue.get("icon-allow-overlap"),Gr=Ue.get("text-rotation-alignment")==="map",Fr=Ue.get("text-pitch-alignment")==="map",Kr=Ue.get("icon-text-fit")!=="none",Cr=Ue.get("symbol-z-order")==="viewport-y",yi=Dr&&(Xr||!ge.hasIconData()||Pr),qi=Xr&&(Dr||!ge.hasTextData()||mr);!ge.collisionArrays&&It&&ge.deserializeCollisionBoxes(It);var vn=function(eo,fs){if(!K[eo.crossTileID]){if(cr){$.placements[eo.crossTileID]=new Ha(!1,!1,!1);return}var es=!1,$s=!1,Ml=!0,Mu=null,Au={box:null,offscreen:null},$u={box:null,offscreen:null},du=null,Nu=null,yf=null,Kf=0,wd=0,Td=0;fs.textFeatureIndex?Kf=fs.textFeatureIndex:eo.useRuntimeCollisionCircles&&(Kf=eo.featureIndex),fs.verticalTextFeatureIndex&&(wd=fs.verticalTextFeatureIndex);var Ad=fs.textBox;if(Ad){var Yp=function(yc){var Ff=i.WritingMode.horizontal;if(ge.allowVerticalPlacement&&!yc&&$.prevPlacement){var Ed=$.prevPlacement.placedOrientations[eo.crossTileID];Ed&&($.placedOrientations[eo.crossTileID]=Ed,Ff=Ed,$.markUsedOrientation(ge,Ff,eo))}return Ff},fy=function(yc,Ff){if(ge.allowVerticalPlacement&&eo.numVerticalGlyphVertices>0&&fs.verticalTextBox)for(var Ed=0,sg=ge.writingModes;Ed0&&(Gd=Gd.filter(function(yc){return yc!==Md.anchor}),Gd.unshift(Md.anchor))}var kp=function(yc,Ff,Ed){for(var sg=yc.x2-yc.x1,A1=yc.y2-yc.y1,Zf=eo.textBoxScale,Ox=Kr&&!Xr?Ff:null,am={box:[],offscreen:!1},Mw=Dr?Gd.length*2:Gd.length,Lp=0;Lp=Gd.length,Nx=$.attemptAnchorPlacement(om,yc,sg,A1,Zf,Gr,Fr,gr,dt,ar,Ew,eo,ge,Ed,Ox);if(Nx&&(am=Nx.placedGlyphBoxes,am&&am.box&&am.box.length)){es=!0,Mu=Nx.shift;break}}return am},Kp=function(){return kp(Ad,fs.iconBox,i.WritingMode.horizontal)},Cp=function(){var yc=fs.verticalTextBox,Ff=Au&&Au.box&&Au.box.length;return ge.allowVerticalPlacement&&!Ff&&eo.numVerticalGlyphVertices>0&&yc?kp(yc,fs.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};fy(Kp,Cp),Au&&(es=Au.box,Ml=Au.offscreen);var ng=Yp(Au&&Au.box);if(!es&&$.prevPlacement){var cy=$.prevPlacement.variableOffsets[eo.crossTileID];cy&&($.variableOffsets[eo.crossTileID]=cy,$.markUsedJustification(ge,cy.anchor,eo,ng))}}else{var pv=function(yc,Ff){var Ed=$.collisionIndex.placeCollisionBox(yc,Dr,gr,dt,ar.predicate);return Ed&&Ed.box&&Ed.box.length&&($.markUsedOrientation(ge,Ff,eo),$.placedOrientations[eo.crossTileID]=Ff),Ed},Sd=function(){return pv(Ad,i.WritingMode.horizontal)},vv=function(){var yc=fs.verticalTextBox;return ge.allowVerticalPlacement&&eo.numVerticalGlyphVertices>0&&yc?pv(yc,i.WritingMode.vertical):{box:null,offscreen:null}};fy(Sd,vv),Yp(Au&&Au.box&&Au.box.length)}}if(du=Au,es=du&&du.box&&du.box.length>0,Ml=du&&du.offscreen,eo.useRuntimeCollisionCircles){var vh=ge.text.placedSymbolArray.get(eo.centerJustifiedTextSymbolIndex),hy=i.evaluateSizeForFeature(ge.textSizeData,Qt,vh),ag=Ue.get("text-padding"),jh=eo.collisionCircleDiameter;Nu=$.collisionIndex.placeCollisionCircles(Dr,vh,ge.lineVertexArray,ge.glyphOffsetArray,hy,dt,Rt,ur,N,Fr,ar.predicate,jh,ag),es=Dr||Nu.circles.length>0&&!Nu.collisionDetected,Ml=Ml&&Nu.offscreen}if(fs.iconFeatureIndex&&(Td=fs.iconFeatureIndex),fs.iconBox){var rm=function(yc){var Ff=Kr&&Mu?Ja(yc,Mu.x,Mu.y,Gr,Fr,$.transform.angle):yc;return $.collisionIndex.placeCollisionBox(Ff,Xr,gr,dt,ar.predicate)};$u&&$u.box&&$u.box.length&&fs.verticalIconBox?(yf=rm(fs.verticalIconBox),$s=yf.box.length>0):(yf=rm(fs.iconBox),$s=yf.box.length>0),Ml=Ml&&yf.offscreen}var w1=mr||eo.numHorizontalGlyphVertices===0&&eo.numVerticalGlyphVertices===0,T1=Pr||eo.numIconVertices===0;if(!w1&&!T1?$s=es=$s&&es:T1?w1||($s=$s&&es):es=$s&&es,es&&du&&du.box&&($u&&$u.box&&wd?$.collisionIndex.insertCollisionBox(du.box,Ue.get("text-ignore-placement"),ge.bucketInstanceId,wd,ar.ID):$.collisionIndex.insertCollisionBox(du.box,Ue.get("text-ignore-placement"),ge.bucketInstanceId,Kf,ar.ID)),$s&&yf&&$.collisionIndex.insertCollisionBox(yf.box,Ue.get("icon-ignore-placement"),ge.bucketInstanceId,Td,ar.ID),Nu&&(es&&$.collisionIndex.insertCollisionCircles(Nu.circles,Ue.get("text-ignore-placement"),ge.bucketInstanceId,Kf,ar.ID),N)){var og=ge.bucketInstanceId,im=$.collisionCircleArrays[og];im===void 0&&(im=$.collisionCircleArrays[og]=new tn);for(var nm=0;nm=0;--ra){var mo=Qa[ra];vn(ge.symbolInstances.get(mo),ge.collisionArrays[mo])}else for(var sl=R.symbolInstanceStart;sl=0&&(ge>=0&&ur!==ge?R.text.placedSymbolArray.get(ur).crossTileID=0:R.text.placedSymbolArray.get(ur).crossTileID=N.crossTileID)}},to.prototype.markUsedOrientation=function(R,K,N){for(var $=K===i.WritingMode.horizontal||K===i.WritingMode.horizontalOnly?K:0,we=K===i.WritingMode.vertical?K:0,ge=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex],Ue=0,dt=ge;Ue0||Fr>0,vn=Xr.numIconVertices>0,Qa=$.placedOrientations[Xr.crossTileID],ra=Qa===i.WritingMode.vertical,mo=Qa===i.WritingMode.horizontal||Qa===i.WritingMode.horizontalOnly;if(qi){var sl=Co(yi.text),Os=ra?Fi:sl;Qt(R.text,Gr,Os);var eo=mo?Fi:sl;Qt(R.text,Fr,eo);var fs=yi.text.isHidden();[Xr.rightJustifiedTextSymbolIndex,Xr.centerJustifiedTextSymbolIndex,Xr.leftJustifiedTextSymbolIndex].forEach(function(Td){Td>=0&&(R.text.placedSymbolArray.get(Td).hidden=fs||ra?1:0)}),Xr.verticalPlacedTextSymbolIndex>=0&&(R.text.placedSymbolArray.get(Xr.verticalPlacedTextSymbolIndex).hidden=fs||mo?1:0);var es=$.variableOffsets[Xr.crossTileID];es&&$.markUsedJustification(R,es.anchor,Xr,Qa);var $s=$.placedOrientations[Xr.crossTileID];$s&&($.markUsedJustification(R,"left",Xr,$s),$.markUsedOrientation(R,$s,Xr))}if(vn){var Ml=Co(yi.icon),Mu=!(cr&&Xr.verticalPlacedIconSymbolIndex&&ra);if(Xr.placedIconSymbolIndex>=0){var Au=Mu?Ml:Fi;Qt(R.icon,Xr.numIconVertices,Au),R.icon.placedSymbolArray.get(Xr.placedIconSymbolIndex).hidden=yi.icon.isHidden()}if(Xr.verticalPlacedIconSymbolIndex>=0){var $u=Mu?Fi:Ml;Qt(R.icon,Xr.numVerticalIconVertices,$u),R.icon.placedSymbolArray.get(Xr.verticalPlacedIconSymbolIndex).hidden=yi.icon.isHidden()}}if(R.hasIconCollisionBoxData()||R.hasTextCollisionBoxData()){var du=R.collisionArrays[Dr];if(du){var Nu=new i.Point(0,0);if(du.textBox||du.verticalTextBox){var yf=!0;if(Rt){var Kf=$.variableOffsets[Kr];Kf?(Nu=ts(Kf.anchor,Kf.width,Kf.height,Kf.textOffset,Kf.textBoxScale),ur&&Nu._rotate(gr?$.transform.angle:-$.transform.angle)):yf=!1}du.textBox&&Ri(R.textCollisionBox.collisionVertexArray,yi.text.placed,!yf||ra,Nu.x,Nu.y),du.verticalTextBox&&Ri(R.textCollisionBox.collisionVertexArray,yi.text.placed,!yf||mo,Nu.x,Nu.y)}var wd=!!(!mo&&du.verticalIconBox);du.iconBox&&Ri(R.iconCollisionBox.collisionVertexArray,yi.icon.placed,wd,cr?Nu.x:0,cr?Nu.y:0),du.verticalIconBox&&Ri(R.iconCollisionBox.collisionVertexArray,yi.icon.placed,!wd,cr?Nu.x:0,cr?Nu.y:0)}}},mr=0;mrR},to.prototype.setStale=function(){this.stale=!0};function Ri(Y,R,K,N,$){Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0)}var an=Math.pow(2,25),cs=Math.pow(2,24),pa=Math.pow(2,17),ln=Math.pow(2,16),ka=Math.pow(2,9),va=Math.pow(2,8),bo=Math.pow(2,1);function Co(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var R=Y.placed?1:0,K=Math.floor(Y.opacity*127);return K*an+R*cs+K*pa+R*ln+K*ka+R*va+K*bo+R}var Fi=0,Yn=function(R){this._sortAcrossTiles=R.layout.get("symbol-z-order")!=="viewport-y"&&R.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Yn.prototype.continuePlacement=function(R,K,N,$,we){for(var ge=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Ue=R[this._currentPlacementIndex],dt=K[Ue],Rt=this.placement.collisionIndex.transform.zoom;if(dt.type==="symbol"&&(!dt.minzoom||dt.minzoom<=Rt)&&(!dt.maxzoom||dt.maxzoom>Rt)){this._inProgressLayer||(this._inProgressLayer=new Yn(dt));var ur=this._inProgressLayer.continuePlacement(N[dt.source],this.placement,this._showCollisionBoxes,dt,ge);if(ur)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},xa.prototype.commit=function(R){return this.placement.commit(R),this.placement};var Qi=512/i.EXTENT/2,Nn=function(R,K,N){this.tileID=R,this.indexedSymbolInstances={},this.bucketInstanceId=N;for(var $=0;$R.overscaledZ)for(var Rt in dt){var ur=dt[Rt];ur.tileID.isChildOf(R)&&ur.findMatches(K.symbolInstances,R,ge)}else{var gr=R.scaledTo(Number(Ue)),cr=dt[gr.key];cr&&cr.findMatches(K.symbolInstances,R,ge)}}for(var It=0;It0)throw new Error("Unimplemented: "+ge.map(function(Ue){return Ue.command}).join(", ")+".");return we.forEach(function(Ue){Ue.command!=="setTransition"&&$[Ue.command].apply($,Ue.args)}),this.stylesheet=N,!0},R.prototype.addImage=function(N,$){if(this.getImage(N))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(N,$),this._afterImageUpdated(N)},R.prototype.updateImage=function(N,$){this.imageManager.updateImage(N,$)},R.prototype.getImage=function(N){return this.imageManager.getImage(N)},R.prototype.removeImage=function(N){if(!this.getImage(N))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(N),this._afterImageUpdated(N)},R.prototype._afterImageUpdated=function(N){this._availableImages=this.imageManager.listImages(),this._changedImages[N]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},R.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},R.prototype.addSource=function(N,$,we){var ge=this;if(we===void 0&&(we={}),this._checkLoaded(),this.sourceCaches[N]!==void 0)throw new Error("There is already a source with this ID");if(!$.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys($).join(", ")+".");var Ue=["vector","raster","geojson","video","image"],dt=Ue.indexOf($.type)>=0;if(!(dt&&this._validate(i.validateStyle.source,"sources."+N,$,null,we))){this.map&&this.map._collectResourceTiming&&($.collectResourceTiming=!0);var Rt=this.sourceCaches[N]=new zr(N,$,this.dispatcher);Rt.style=this,Rt.setEventedParent(this,function(){return{isSourceLoaded:ge.loaded(),source:Rt.serialize(),sourceId:N}}),Rt.onAdd(this.map),this._changed=!0}},R.prototype.removeSource=function(N){if(this._checkLoaded(),this.sourceCaches[N]===void 0)throw new Error("There is no source with this ID");for(var $ in this._layers)if(this._layers[$].source===N)return this.fire(new i.ErrorEvent(new Error('Source "'+N+'" cannot be removed while layer "'+$+'" is using it.')));var we=this.sourceCaches[N];delete this.sourceCaches[N],delete this._updatedSources[N],we.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:N})),we.setEventedParent(null),we.clearTiles(),we.onRemove&&we.onRemove(this.map),this._changed=!0},R.prototype.setGeoJSONSourceData=function(N,$){this._checkLoaded();var we=this.sourceCaches[N].getSource();we.setData($),this._changed=!0},R.prototype.getSource=function(N){return this.sourceCaches[N]&&this.sourceCaches[N].getSource()},R.prototype.addLayer=function(N,$,we){we===void 0&&(we={}),this._checkLoaded();var ge=N.id;if(this.getLayer(ge)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ge+'" already exists on this map')));return}var Ue;if(N.type==="custom"){if(Vo(this,i.validateCustomStyleLayer(N)))return;Ue=i.createStyleLayer(N)}else{if(typeof N.source=="object"&&(this.addSource(ge,N.source),N=i.clone$1(N),N=i.extend(N,{source:ge})),this._validate(i.validateStyle.layer,"layers."+ge,N,{arrayIndex:-1},we))return;Ue=i.createStyleLayer(N),this._validateLayer(Ue),Ue.setEventedParent(this,{layer:{id:ge}}),this._serializedLayers[Ue.id]=Ue.serialize()}var dt=$?this._order.indexOf($):this._order.length;if($&&dt===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}if(this._order.splice(dt,0,ge),this._layerOrderChanged=!0,this._layers[ge]=Ue,this._removedLayers[ge]&&Ue.source&&Ue.type!=="custom"){var Rt=this._removedLayers[ge];delete this._removedLayers[ge],Rt.type!==Ue.type?this._updatedSources[Ue.source]="clear":(this._updatedSources[Ue.source]="reload",this.sourceCaches[Ue.source].pause())}this._updateLayer(Ue),Ue.onAdd&&Ue.onAdd(this.map)},R.prototype.moveLayer=function(N,$){this._checkLoaded(),this._changed=!0;var we=this._layers[N];if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be moved.")));return}if(N!==$){var ge=this._order.indexOf(N);this._order.splice(ge,1);var Ue=$?this._order.indexOf($):this._order.length;if($&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}this._order.splice(Ue,0,N),this._layerOrderChanged=!0}},R.prototype.removeLayer=function(N){this._checkLoaded();var $=this._layers[N];if(!$){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be removed.")));return}$.setEventedParent(null);var we=this._order.indexOf(N);this._order.splice(we,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[N]=$,delete this._layers[N],delete this._serializedLayers[N],delete this._updatedLayers[N],delete this._updatedPaintProps[N],$.onRemove&&$.onRemove(this.map)},R.prototype.getLayer=function(N){return this._layers[N]},R.prototype.hasLayer=function(N){return N in this._layers},R.prototype.setLayerZoomRange=function(N,$,we){this._checkLoaded();var ge=this.getLayer(N);if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot have zoom extent.")));return}ge.minzoom===$&&ge.maxzoom===we||($!=null&&(ge.minzoom=$),we!=null&&(ge.maxzoom=we),this._updateLayer(ge))},R.prototype.setFilter=function(N,$,we){we===void 0&&(we={}),this._checkLoaded();var ge=this.getLayer(N);if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ge.filter,$)){if($==null){ge.filter=void 0,this._updateLayer(ge);return}this._validate(i.validateStyle.filter,"layers."+ge.id+".filter",$,null,we)||(ge.filter=i.clone$1($),this._updateLayer(ge))}},R.prototype.getFilter=function(N){return i.clone$1(this.getLayer(N).filter)},R.prototype.setLayoutProperty=function(N,$,we,ge){ge===void 0&&(ge={}),this._checkLoaded();var Ue=this.getLayer(N);if(!Ue){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(Ue.getLayoutProperty($),we)||(Ue.setLayoutProperty($,we,ge),this._updateLayer(Ue))},R.prototype.getLayoutProperty=function(N,$){var we=this.getLayer(N);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style.")));return}return we.getLayoutProperty($)},R.prototype.setPaintProperty=function(N,$,we,ge){ge===void 0&&(ge={}),this._checkLoaded();var Ue=this.getLayer(N);if(!Ue){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(Ue.getPaintProperty($),we)){var dt=Ue.setPaintProperty($,we,ge);dt&&this._updateLayer(Ue),this._changed=!0,this._updatedPaintProps[N]=!0}},R.prototype.getPaintProperty=function(N,$){return this.getLayer(N).getPaintProperty($)},R.prototype.setFeatureState=function(N,$){this._checkLoaded();var we=N.source,ge=N.sourceLayer,Ue=this.sourceCaches[we];if(Ue===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+we+"' does not exist in the map's style.")));return}var dt=Ue.getSource().type;if(dt==="geojson"&&ge){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(dt==="vector"&&!ge){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}N.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Ue.setFeatureState(ge,N.id,$)},R.prototype.removeFeatureState=function(N,$){this._checkLoaded();var we=N.source,ge=this.sourceCaches[we];if(ge===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+we+"' does not exist in the map's style.")));return}var Ue=ge.getSource().type,dt=Ue==="vector"?N.sourceLayer:void 0;if(Ue==="vector"&&!dt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if($&&typeof N.id!="string"&&typeof N.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ge.removeFeatureState(dt,N.id,$)},R.prototype.getFeatureState=function(N){this._checkLoaded();var $=N.source,we=N.sourceLayer,ge=this.sourceCaches[$];if(ge===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+$+"' does not exist in the map's style.")));return}var Ue=ge.getSource().type;if(Ue==="vector"&&!we){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return N.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ge.getFeatureState(we,N.id)},R.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},R.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(N){return N.serialize()}),layers:this._serializeLayers(this._order)},function(N){return N!==void 0})},R.prototype._updateLayer=function(N){this._updatedLayers[N.id]=!0,N.source&&!this._updatedSources[N.source]&&this.sourceCaches[N.source].getSource().type!=="raster"&&(this._updatedSources[N.source]="reload",this.sourceCaches[N.source].pause()),this._changed=!0},R.prototype._flattenAndSortRenderedFeatures=function(N){for(var $=this,we=function(mo){return $._layers[mo].type==="fill-extrusion"},ge={},Ue=[],dt=this._order.length-1;dt>=0;dt--){var Rt=this._order[dt];if(we(Rt)){ge[Rt]=dt;for(var ur=0,gr=N;ur=0;Dr--){var Xr=this._order[Dr];if(we(Xr))for(var Gr=Ue.length-1;Gr>=0;Gr--){var Fr=Ue[Gr].feature;if(ge[Fr.layer.id] .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}});var zk=Se((r_r,KUe)=>{"use strict";var ZUe=Zr(),XUe=Pl().defaultLine,ZHt=Ec().attributes,XHt=uc(),YHt=Zc().textposition,KHt=_c().overrideAll,JHt=_f().templatedArray,XK=f1(),YUe=XHt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});YUe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var $Ht=KUe.exports=KHt({_arrayAttrRegexps:[ZUe.counterRegex("mapbox",".layers",!0)],domain:ZHt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:XK.styleValuesMapbox.concat(XK.styleValuesNonMapbox),dflt:XK.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:JHt("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:XUe},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:XUe}},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:YUe,textposition:ZUe.extendFlat({},YHt,{arrayOk:!1})}})},"plot","from-root");$Ht.uirevision={valType:"any",editType:"none"}});var Y9=Se((i_r,QUe)=>{"use strict";var QHt=Du().hovertemplateAttrs,eGt=Du().texttemplateAttrs,tGt=Ey(),Pk=H2(),xS=Zc(),JUe=zk(),rGt=zf(),iGt=Xf(),ew=vu().extendFlat,nGt=_c().overrideAll,aGt=zk(),$Ue=Pk.line,bS=Pk.marker;QUe.exports=nGt({lon:Pk.lon,lat:Pk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:ew({},aGt.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:ew({},bS.opacity,{dflt:1})},mode:ew({},xS.mode,{dflt:"markers"}),text:ew({},xS.text,{}),texttemplate:eGt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:ew({},xS.hovertext,{}),line:{color:$Ue.color,width:$Ue.width},connectgaps:xS.connectgaps,marker:ew({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:bS.opacity,size:bS.size,sizeref:bS.sizeref,sizemin:bS.sizemin,sizemode:bS.sizemode},iGt("marker")),fill:Pk.fill,fillcolor:tGt(),textfont:JUe.layers.symbol.textfont,textposition:JUe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:xS.selected.marker},unselected:{marker:xS.unselected.marker},hoverinfo:ew({},rGt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:QHt()},"calc","nested")});var YK=Se((n_r,eVe)=>{"use strict";var oGt=["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"];eVe.exports={isSupportedFont:function(e){return oGt.indexOf(e)!==-1}}});var iVe=Se((a_r,rVe)=>{"use strict";var Ik=Zr(),KK=ec(),sGt=$v(),lGt=I0(),uGt=D0(),fGt=Py(),tVe=Y9(),cGt=YK().isSupportedFont;rVe.exports=function(t,r,n,i){function a(y,k){return Ik.coerce(t,r,tVe,y,k)}function o(y,k){return Ik.coerce2(t,r,tVe,y,k)}var s=hGt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),KK.hasMarkers(r)){sGt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(Ik.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),Ik.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}KK.hasLines(r)&&(lGt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var l=o("cluster.maxzoom"),f=o("cluster.step"),c=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),p=l!==!1||f!==!1||c!==!1||h!==!1||d!==!1,x=a("cluster.enabled",p);if(x||KK.hasText(r)){var b=i.font.family;uGt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:cGt(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"&&fGt(t,r,n,a),Ik.coerceSelectionMarkerOpacity(r,a)};function hGt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var JK=Se((o_r,aVe)=>{"use strict";var nVe=hu();aVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=nVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=nVe.tickText(o,o.c2l(s[1]),!0).text,i}});var $K=Se((s_r,sVe)=>{"use strict";var oVe=Zr();sVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=oVe.isArrayOrTypedArray(r)?oVe.mean(r):r,s=.5+o/100,u=1.5+o/100,l=["",""],f=[0,0];switch(i){case"top":l[0]="top",f[1]=-u;break;case"bottom":l[0]="bottom",f[1]=u;break}switch(a){case"left":l[1]="right",f[0]=-s;break;case"right":l[1]="left",f[0]=s;break}var c;return l[0]&&l[1]?c=l.join("-"):l[0]?c=l[0]:l[1]?c=l[1]:c="center",{anchor:c,offset:f}}});var dVe=Se((l_r,hVe)=>{"use strict";var fVe=_u(),sp=Zr(),dGt=ju().BADNUM,J9=tx(),lVe=fc(),pGt=yu(),vGt=S3(),$9=ec(),yGt=YK().isSupportedFont,mGt=$K(),gGt=rv().appendArrayPointValue,_Gt=Bf().NEWLINES,xGt=Bf().BR_TAG_ALL;hVe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=$9.hasLines(n),s=$9.hasMarkers(n),u=$9.hasText(n),l=s&&n.marker.symbol==="circle",f=s&&n.marker.symbol!=="circle",c=n.cluster&&n.cluster.enabled,h=K9("fill"),d=K9("line"),p=K9("circle"),x=K9("symbol"),b={fill:h,line:d,circle:p,symbol:x};if(!i)return b;var y;if((a||o)&&(y=J9.calcTraceToLineCoords(r)),a&&(h.geojson=J9.makePolygon(y),h.layout.visibility="visible",sp.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=J9.makeLine(y),d.layout.visibility="visible",sp.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),l){var k=bGt(r);p.geojson=k.geojson,p.layout.visibility="visible",c&&(p.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":uVe(n),"text-size":12}}),sp.extendFlat(p.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(l&&c&&(p.filter=["!",["has","point_count"]]),(f||u)&&(x.geojson=wGt(r,t),sp.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),f&&(sp.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&sp.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,sp.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),u)){var E=(n.marker||{}).size,A=mGt(n.textposition,E);sp.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":uVe(n)}),sp.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function K9(e){return{type:e,geojson:J9.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function bGt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=sp.isArrayOrTypedArray(r.color),a=sp.isArrayOrTypedArray(r.size),o=sp.isArrayOrTypedArray(r.opacity),s;function u(E){return t.opacity*E}function l(E){return E/2}var f;i&&(lVe.hasColorscale(t,"marker")?f=lVe.makeColorScaleFuncFromTrace(r):f=sp.identity);var c;a&&(c=vGt(t));var h;o&&(h=function(E){var A=fVe(E)?+sp.constrain(E,0,1):0;return u(A)});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"),yGt(s)||(s=r);var u=s.split(", ");return u}});var mVe=Se((u_r,yVe)=>{"use strict";var TGt=Zr(),pVe=dVe(),wS=f1().traceLayerPrefix,ry={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function vVe(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:wS+t+"-fill",line:wS+t+"-line",circle:wS+t+"-circle",symbol:wS+t+"-symbol",cluster:wS+t+"-cluster",clusterCount:wS+t+"-cluster-count"},this.below=null}var Dk=vVe.prototype;Dk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&TGt.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)};Dk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Dk.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 _=A[L];i.removeLayer(l.layerIds[_])}E||i.removeSource(l.sourceIds.circle)}function h(E){for(var A=ry.nonCluster,L=0;L=0;L--){var _=A[L];i.removeLayer(l.layerIds[_]),E||i.removeSource(l.sourceIds[_])}}function p(E){u?c(E):d(E)}function x(E){s?f(E):h(E)}function b(){for(var E=s?ry.cluster:ry.nonCluster,A=0;A=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};yVe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new vVe(t,n.uid,i,a),s=pVe(t.gd,r),u=o.below=t.belowLookup["trace-"+n.uid],l,f,c;if(i)for(o.addSource("circle",s.circle,n.cluster),l=0;l{"use strict";var AGt=jc(),tJ=Zr(),SGt=oT(),MGt=tJ.fillText,EGt=ju().BADNUM,kGt=f1().traceLayerPrefix;function CGt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,u=[],l=kGt+i.uid+"-circle",f=i.cluster&&i.cluster.enabled;if(f){var c=s.map.queryRenderedFeatures(null,{layers:[l]});u=c.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function x(M){var v=M.lonlat;if(v[0]===EGt||f&&u.indexOf(M.i+1)===-1)return 1/0;var z=tJ.modHalf(v[0],360),T=v[1],F=s.project([z,T]),q=F.x-a.c2p([p,T]),U=F.y-o.c2p([z,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-H,1-3/H)}if(AGt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],y=b.lonlat,k=[tJ.modHalf(y[0],360)+d,y[1]],E=a.c2p(k),A=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=SGt(i,b),e.extraText=gVe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function gVe(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,u=t.lonlat,l=[];function f(c){return c+"\xB0"}return a||o&&s?l.push("("+f(u[1])+", "+f(u[0])+")"):o?l.push(r.lon+f(u[0])):s&&l.push(r.lat+f(u[1])),(a||i.indexOf("text")!==-1)&&MGt(t,e,l),l.join("
")}_Ve.exports={hoverPoints:CGt,getExtraText:gVe}});var bVe=Se((c_r,xVe)=>{"use strict";xVe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var TVe=Se((h_r,wVe)=>{"use strict";var LGt=Zr(),zGt=ec(),PGt=ju().BADNUM;wVe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u;if(!zGt.hasMarkers(s))return[];if(r===!1)for(u=0;u{(function(e,t){typeof rJ=="object"&&typeof iJ!="undefined"?iJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(rJ,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,g){return g={exports:{}},m(g,g.exports),g.exports}var o="1.13.4",s=u;function u(m,g,P,V){this.cx=3*m,this.bx=3*(P-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*g,this.by=3*(V-g)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=V,this.p2x=P,this.p2y=V}u.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},u.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},u.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},u.prototype.solveCurveX=function(m,g){typeof g=="undefined"&&(g=1e-6);var P,V,J,ae,ve;for(J=m,ve=0;ve<8;ve++){if(ae=this.sampleCurveX(J)-m,Math.abs(ae)V)return V;for(;Pae?P=J:V=J,J=(V-P)*.5+P}return J},u.prototype.solve=function(m,g){return this.sampleCurveY(this.solveCurveX(m,g))};var l=f;function f(m,g){this.x=m,this.y=g}f.prototype={clone:function(){return new f(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,g){return this.clone()._rotateAround(m,g)},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 g=m.x-this.x,P=m.y-this.y;return g*g+P*P},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,g){return Math.atan2(this.x*g-this.y*m,this.x*m+this.y*g)},_matMult:function(m){var g=m[0]*this.x+m[1]*this.y,P=m[2]*this.x+m[3]*this.y;return this.x=g,this.y=P,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 g=Math.cos(m),P=Math.sin(m),V=g*this.x-P*this.y,J=P*this.x+g*this.y;return this.x=V,this.y=J,this},_rotateAround:function(m,g){var P=Math.cos(m),V=Math.sin(m),J=g.x+P*(this.x-g.x)-V*(this.y-g.y),ae=g.y+V*(this.x-g.x)+P*(this.y-g.y);return this.x=J,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(m){return m instanceof f?m:Array.isArray(m)?new f(m[0],m[1]):m};var c=typeof self!="undefined"?self:{};function h(m,g){if(Array.isArray(m)){if(!Array.isArray(g)||m.length!==g.length)return!1;for(var P=0;P=1)return 1;var g=m*m,P=g*m;return 4*(m<.5?P:3*(m-g)+P-.75)}function x(m,g,P,V){var J=new s(m,g,P,V);return function(ae){return J.solve(ae)}}var b=x(.25,.1,.25,1);function y(m,g,P){return Math.min(P,Math.max(g,m))}function k(m,g,P){var V=P-g,J=((m-g)%V+V)%V+g;return J===g?P:J}function E(m,g,P){if(!m.length)return P(null,[]);var V=m.length,J=new Array(m.length),ae=null;m.forEach(function(ve,Ge){g(ve,function(yt,kt){yt&&(ae=yt),J[Ge]=kt,--V===0&&P(ae,J)})})}function A(m){var g=[];for(var P in m)g.push(m[P]);return g}function L(m,g){var P=[];for(var V in m)V in g||P.push(V);return P}function _(m){for(var g=[],P=arguments.length-1;P-- >0;)g[P]=arguments[P+1];for(var V=0,J=g;V>g/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 F(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 q(m,g){m.forEach(function(P){g[P]&&(g[P]=g[P].bind(g))})}function U(m,g){return m.indexOf(g,m.length-g.length)!==-1}function H(m,g,P){var V={};for(var J in m)V[J]=g.call(P||this,m[J],J,m);return V}function j(m,g,P){var V={};for(var J in m)g.call(P||this,m[J],J,m)&&(V[J]=m[J]);return V}function G(m){return Array.isArray(m)?m.map(G):typeof m=="object"&&m?H(m,G):m}function O(m,g){for(var P=0;P=0)return!0;return!1}var W={};function re(m){W[m]||(typeof console!="undefined"&&console.warn(m),W[m]=!0)}function ne(m,g,P){return(P.y-m.y)*(g.x-m.x)>(g.y-m.y)*(P.x-m.x)}function be(m){for(var g=0,P=0,V=m.length,J=V-1,ae=void 0,ve=void 0;P@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,P={};if(m.replace(g,function(J,ae,ve,Ge){var yt=ve||Ge;return P[ae]=yt?yt.toLowerCase():!0,""}),P["max-age"]){var V=parseInt(P["max-age"],10);isNaN(V)?delete P["max-age"]:P["max-age"]=V}return P}var te=null;function ke(m){if(te==null){var g=m.navigator?m.navigator.userAgent:null;te=!!m.safari||!!(g&&(/\b(iPad|iPhone|iPod)\b/.test(g)||g.match("Safari")&&!g.match("Chrome")))}return te}function Ee(m){try{var g=c[m];return g.setItem("_mapbox_test_",1),g.removeItem("_mapbox_test_"),!0}catch(P){return!1}}function Me(m){return c.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(g,P){return String.fromCharCode(+("0x"+P))}))}function Oe(m){return decodeURIComponent(c.atob(m).split("").map(function(g){return"%"+("00"+g.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Re=c.performance&&c.performance.now?c.performance.now.bind(c.performance):Date.now.bind(Date),me=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,Be=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame,fe,Ze,et={now:Re,frame:function(g){var P=me(g);return{cancel:function(){return Be(P)}}},getImageData:function(g,P){P===void 0&&(P=0);var V=c.document.createElement("canvas"),J=V.getContext("2d");if(!J)throw new Error("failed to create canvas 2d context");return V.width=g.width,V.height=g.height,J.drawImage(g,0,0,g.width,g.height),J.getImageData(-P,-P,g.width+2*P,g.height+2*P)},resolveURL:function(g){return fe||(fe=c.document.createElement("a")),fe.href=g,fe.href},hardwareConcurrency:c.navigator&&c.navigator.hardwareConcurrency||4,get devicePixelRatio(){return c.devicePixelRatio},get prefersReducedMotion(){return c.matchMedia?(Ze==null&&(Ze=c.matchMedia("(prefers-reduced-motion: reduce)")),Ze.matches):!1}},gt={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},Pt={supported:!1,testSupport:_t},Qe,Xe=!1,Tt,xt=!1;c.document&&(Tt=c.document.createElement("img"),Tt.onload=function(){Qe&&Ct(Qe),Qe=null,xt=!0},Tt.onerror=function(){Xe=!0,Qe=null},Tt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function _t(m){Xe||!Tt||(xt?Ct(m):Qe=m)}function Ct(m){var g=m.createTexture();m.bindTexture(m.TEXTURE_2D,g);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Tt),m.isContextLost())return;Pt.supported=!0}catch(P){}m.deleteTexture(g),Xe=!0}var jt="01";function At(){for(var m="1",g="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",P="",V=0;V<10;V++)P+=g[Math.floor(Math.random()*62)];var J=12*60*60*1e3,ae=[m,jt,P].join(""),ve=Date.now()+J;return{token:ae,tokenExpiresAt:ve}}var Te=function(g,P){this._transformRequestFn=g,this._customAccessToken=P,this._createSkuToken()};Te.prototype._createSkuToken=function(){var g=At();this._skuToken=g.token,this._skuTokenExpiresAt=g.tokenExpiresAt},Te.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Te.prototype.transformRequest=function(g,P){return this._transformRequestFn?this._transformRequestFn(g,P)||{url:g}:{url:g}},Te.prototype.normalizeStyleURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/styles/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeGlyphsURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/fonts/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeSourceURL=function(g,P){if(!nt(g))return g;var V=Je(g);return V.path="/v4/"+V.authority+".json",V.params.push("secure"),this._makeAPIURL(V,this._customAccessToken||P)},Te.prototype.normalizeSpriteURL=function(g,P,V,J){var ae=Je(g);return nt(g)?(ae.path="/styles/v1"+ae.path+"/sprite"+P+V,this._makeAPIURL(ae,this._customAccessToken||J)):(ae.path+=""+P+V,Mt(ae))},Te.prototype.normalizeTileURL=function(g,P){if(this._isSkuTokenExpired()&&this._createSkuToken(),g&&!nt(g))return g;var V=Je(g),J=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,ve=et.devicePixelRatio>=2||P===512?"@2x":"",Ge=Pt.supported?".webp":"$1";V.path=V.path.replace(J,""+ve+Ge),V.path=V.path.replace(ae,"/"),V.path="/v4"+V.path;var yt=this._customAccessToken||je(V.params)||gt.ACCESS_TOKEN;return gt.REQUIRE_ACCESS_TOKEN&&yt&&this._skuToken&&V.params.push("sku="+this._skuToken),this._makeAPIURL(V,yt)},Te.prototype.canonicalizeTileURL=function(g,P){var V="/v4/",J=/\.[\w]+$/,ae=Je(g);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match(J))return g;var ve="mapbox://tiles/";ve+=ae.path.replace(V,"");var Ge=ae.params;return P&&(Ge=Ge.filter(function(yt){return!yt.match(/^access_token=/)})),Ge.length&&(ve+="?"+Ge.join("&")),ve},Te.prototype.canonicalizeTileset=function(g,P){for(var V=P?nt(P):!1,J=[],ae=0,ve=g.tiles||[];ae=0&&g.params.splice(ae,1)}if(J.path!=="/"&&(g.path=""+J.path+g.path),!gt.REQUIRE_ACCESS_TOKEN)return Mt(g);if(P=P||gt.ACCESS_TOKEN,!P)throw new Error("An API access token is required to use Mapbox GL. "+V);if(P[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+V);return g.params=g.params.filter(function(ve){return ve.indexOf("access_token")===-1}),g.params.push("access_token="+P),Mt(g)};function nt(m){return m.indexOf("mapbox:")===0}var ut=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ct(m){return ut.test(m)}function rt(m){return m.indexOf("sku=")>0&&ct(m)}function je(m){for(var g=0,P=m;g=1&&c.localStorage.setItem(P,JSON.stringify(this.eventData))}catch(J){re("Unable to write to LocalStorage")}},ir.prototype.processRequests=function(g){},ir.prototype.postEvent=function(g,P,V,J){var ae=this;if(gt.EVENTS_URL){var ve=Je(gt.EVENTS_URL);ve.params.push("access_token="+(J||gt.ACCESS_TOKEN||""));var Ge={event:this.type,created:new Date(g).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:jt,userId:this.anonId},yt=P?_(Ge,P):Ge,kt={url:Mt(ve),headers:{"Content-Type":"text/plain"},body:JSON.stringify([yt])};this.pendingRequest=Tr(kt,function(Ut){ae.pendingRequest=null,V(Ut),ae.saveEventData(),ae.processRequests(J)})}},ir.prototype.queueRequest=function(g,P){this.queue.push(g),this.processRequests(P)};var fr=function(m){function g(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.postMapLoadEvent=function(V,J,ae,ve){this.skuToken=ae,(gt.EVENTS_URL&&ve||gt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(Ge){return nt(Ge)||ct(Ge)}))&&this.queueRequest({id:J,timestamp:Date.now()},ve)},g.prototype.processRequests=function(V){var J=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),ve=ae.id,Ge=ae.timestamp;ve&&this.success[ve]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=z()),this.postEvent(Ge,{skuToken:this.skuToken},function(yt){yt||ve&&(J.success[ve]=!0)},V))}},g}(ir),Ot=function(m){function g(P){m.call(this,"appUserTurnstile"),this._customAccessToken=P}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.postTurnstileEvent=function(V,J){gt.EVENTS_URL&>.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return nt(ae)||ct(ae)})&&this.queueRequest(Date.now(),J)},g.prototype.processRequests=function(V){var J=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Kt(gt.ACCESS_TOKEN),ve=ae?ae.u:gt.ACCESS_TOKEN,Ge=ve!==this.eventData.tokenU;F(this.anonId)||(this.anonId=z(),Ge=!0);var yt=this.queue.shift();if(this.eventData.lastSuccess){var kt=new Date(this.eventData.lastSuccess),Ut=new Date(yt),lr=(yt-this.eventData.lastSuccess)/(24*60*60*1e3);Ge=Ge||lr>=1||lr<-1||kt.getDate()!==Ut.getDate()}else Ge=!0;if(!Ge)return this.processRequests();this.postEvent(yt,{"enabled.telemetry":!1},function(kr){kr||(J.eventData.lastSuccess=yt,J.eventData.tokenU=ve)},V)}},g}(ir),De=new Ot,_e=De.postTurnstileEvent.bind(De),Fe=new fr,Pe=Fe.postMapLoadEvent.bind(Fe),Ie="mapbox-tiles",lt=500,ye=50,ue=1e3*60*7,de;function ht(){c.caches&&!de&&(de=c.caches.open(Ie))}var Et;function St(m,g){if(Et===void 0)try{new Response(new ReadableStream),Et=!0}catch(P){Et=!1}Et?g(m.body):m.blob().then(g)}function Zt(m,g,P){if(ht(),!!de){var V={status:g.status,statusText:g.statusText,headers:new c.Headers};g.headers.forEach(function(ve,Ge){return V.headers.set(Ge,ve)});var J=he(g.headers.get("Cache-Control")||"");if(!J["no-store"]){J["max-age"]&&V.headers.set("Expires",new Date(P+J["max-age"]*1e3).toUTCString());var ae=new Date(V.headers.get("Expires")).getTime()-P;aeDate.now()&&!P["no-cache"]}var Er=1/0;function si(m){Er++,Er>ye&&(m.getActor().send("enforceCacheSizeLimit",lt),Er=0)}function Ei(m){ht(),de&&de.then(function(g){g.keys().then(function(P){for(var V=0;V=200&&P.status<300||P.status===0)&&P.response!==null){var J=P.response;if(m.type==="json")try{J=JSON.parse(P.response)}catch(ae){return g(ae)}g(null,J,P.getResponseHeader("Cache-Control"),P.getResponseHeader("Expires"))}else g(new Di(P.statusText,P.status,m.url))},P.send(m.body),{cancel:function(){return P.abort()}}}var sr=function(m,g){if(!vt(m.url)){if(c.fetch&&c.Request&&c.AbortController&&c.Request.prototype.hasOwnProperty("signal"))return Dt(m,g);if(Ce()&&self.worker&&self.worker.actor){var P=!0;return self.worker.actor.send("getResource",m,g,void 0,P)}}return Bt(m,g)},br=function(m,g){return sr(_(m,{type:"json"}),g)},zr=function(m,g){return sr(_(m,{type:"arrayBuffer"}),g)},Tr=function(m,g){return sr(_(m,{method:"POST"}),g)};function Rr(m){var g=c.document.createElement("a");return g.href=m,g.protocol===c.document.location.protocol&&g.host===c.document.location.host}var Br="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function oi(m,g,P,V){var J=new c.Image,ae=c.URL;J.onload=function(){g(null,J),ae.revokeObjectURL(J.src),J.onload=null,c.requestAnimationFrame(function(){J.src=Br})},J.onerror=function(){return g(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var ve=new c.Blob([new Uint8Array(m)],{type:"image/png"});J.cacheControl=P,J.expires=V,J.src=m.byteLength?ae.createObjectURL(ve):Br}function vi(m,g){var P=new c.Blob([new Uint8Array(m)],{type:"image/png"});c.createImageBitmap(P).then(function(V){g(null,V)}).catch(function(V){g(new Error("Could not load image because of "+V.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Pi,Yr,Ni=function(){Pi=[],Yr=0};Ni();var Ur=function(m,g){if(Pt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Yr>=gt.MAX_PARALLEL_IMAGE_REQUESTS){var P={requestParameters:m,callback:g,cancelled:!1,cancel:function(){this.cancelled=!0}};return Pi.push(P),P}Yr++;var V=!1,J=function(){if(!V)for(V=!0,Yr--;Pi.length&&Yr0||this._oneTimeListeners&&this._oneTimeListeners[g]&&this._oneTimeListeners[g].length>0||this._eventedParent&&this._eventedParent.listens(g)},Mi.prototype.setEventedParent=function(g,P){return this._eventedParent=g,this._eventedParentData=P,this};var sn=8,fi={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"}},Or={"*":{type:"source"}},st=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Wt={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:"*"}},tr={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:"*"}},or={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:"*"}},Nr={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"}},hi={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"}}},Gi={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"}}},Qr={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"}},Ui=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],zn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},fn={"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"}},xn={"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"}},_a={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fn={"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"}},ia={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},za={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hr={type:"array",value:"*"},na={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},go={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Dn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},un={type:"array",value:"*",minimum:1},Zn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},Wo=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Ba={"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"}},Bo={"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"}},Ea={"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"}},Ha={"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"}},tn={"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"}},Cn={"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"}},Xn={"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"}},ts={"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"}},Ja={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},to={"*":{type:"string"}},Ri={$version:sn,$root:fi,sources:Or,source:st,source_vector:Wt,source_raster:tr,source_raster_dem:or,source_geojson:Nr,source_video:hi,source_image:Gi,layer:Qr,layout:Ui,layout_background:zn,layout_fill:fn,layout_circle:xn,layout_heatmap:_a,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Wn,layout_symbol:Fn,layout_raster:ia,layout_hillshade:za,filter:Hr,filter_operator:na,geometry_type:go,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:Dn,expression:un,light:Zn,paint:Wo,paint_fill:Ba,"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:Bo,paint_circle:Ea,paint_heatmap:Ha,paint_symbol:tn,paint_raster:Cn,paint_hillshade:Xn,paint_background:ts,transition:Ja,"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:to},an=function(g,P,V,J){this.message=(g?g+": ":"")+V,J&&(this.identifier=J),P!=null&&P.__line__&&(this.line=P.__line__)};function cs(m){var g=m.key,P=m.value;return P?[new an(g,P,"constants have been deprecated as of v8")]:[]}function pa(m){for(var g=[],P=arguments.length-1;P-- >0;)g[P]=arguments[P+1];for(var V=0,J=g;V":m.itemType.kind==="value"?"array":"array<"+g+">"}else return m.kind}var An=[Co,Fi,Yn,xa,Qi,Vo,Nn,Oa(Pn),Pa];function _o(m,g){if(g.kind==="error")return null;if(m.kind==="array"){if(g.kind==="array"&&(g.N===0&&g.itemType.kind==="value"||!_o(m.itemType,g.itemType))&&(typeof m.N!="number"||m.N===g.N))return null}else{if(m.kind===g.kind)return null;if(m.kind==="value")for(var P=0,V=An;P255?255:kt}function J(kt){return kt<0?0:kt>1?1:kt}function ae(kt){return kt[kt.length-1]==="%"?V(parseFloat(kt)/100*255):V(parseInt(kt))}function ve(kt){return kt[kt.length-1]==="%"?J(parseFloat(kt)/100):J(parseFloat(kt))}function Ge(kt,Ut,lr){return lr<0?lr+=1:lr>1&&(lr-=1),lr*6<1?kt+(Ut-kt)*lr*6:lr*2<1?Ut:lr*3<2?kt+(Ut-kt)*(2/3-lr)*6:kt}function yt(kt){var Ut=kt.replace(/ /g,"").toLowerCase();if(Ut in P)return P[Ut].slice();if(Ut[0]==="#"){if(Ut.length===4){var lr=parseInt(Ut.substr(1),16);return lr>=0&&lr<=4095?[(lr&3840)>>4|(lr&3840)>>8,lr&240|(lr&240)>>4,lr&15|(lr&15)<<4,1]:null}else if(Ut.length===7){var lr=parseInt(Ut.substr(1),16);return lr>=0&&lr<=16777215?[(lr&16711680)>>16,(lr&65280)>>8,lr&255,1]:null}return null}var kr=Ut.indexOf("("),xr=Ut.indexOf(")");if(kr!==-1&&xr+1===Ut.length){var ei=Ut.substr(0,kr),Li=Ut.substr(kr+1,xr-(kr+1)).split(","),_n=1;switch(ei){case"rgba":if(Li.length!==4)return null;_n=ve(Li.pop());case"rgb":return Li.length!==3?null:[ae(Li[0]),ae(Li[1]),ae(Li[2]),_n];case"hsla":if(Li.length!==4)return null;_n=ve(Li.pop());case"hsl":if(Li.length!==3)return null;var rn=(parseFloat(Li[0])%360+360)%360/360,Fa=ve(Li[1]),On=ve(Li[2]),Ra=On<=.5?On*(Fa+1):On+Fa-On*Fa,so=On*2-Ra;return[V(Ge(so,Ra,rn+1/3)*255),V(Ge(so,Ra,rn)*255),V(Ge(so,Ra,rn-1/3)*255),_n];default:return null}}return null}try{g.parseCSSColor=yt}catch(kt){}}),sa=ps.parseCSSColor,Bn=function(g,P,V,J){J===void 0&&(J=1),this.r=g,this.g=P,this.b=V,this.a=J};Bn.parse=function(g){if(g){if(g instanceof Bn)return g;if(typeof g=="string"){var P=sa(g);if(P)return new Bn(P[0]/255*P[3],P[1]/255*P[3],P[2]/255*P[3],P[3])}}},Bn.prototype.toString=function(){var g=this.toArray(),P=g[0],V=g[1],J=g[2],ae=g[3];return"rgba("+Math.round(P)+","+Math.round(V)+","+Math.round(J)+","+ae+")"},Bn.prototype.toArray=function(){var g=this,P=g.r,V=g.g,J=g.b,ae=g.a;return ae===0?[0,0,0,0]:[P*255/ae,V*255/ae,J*255/ae,ae]},Bn.black=new Bn(0,0,0,1),Bn.white=new Bn(1,1,1,1),Bn.transparent=new Bn(0,0,0,0),Bn.red=new Bn(1,0,0,1);var ms=function(g,P,V){g?this.sensitivity=P?"variant":"case":this.sensitivity=P?"accent":"base",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ms.prototype.compare=function(g,P){return this.collator.compare(g,P)},ms.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ya=function(g,P,V,J,ae){this.text=g,this.image=P,this.scale=V,this.fontStack=J,this.textColor=ae},on=function(g){this.sections=g};on.fromString=function(g){return new on([new ya(g,null,null,null,null)])},on.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(g){return g.text.length!==0||g.image&&g.image.name.length!==0})},on.factory=function(g){return g instanceof on?g:on.fromString(g)},on.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(g){return g.text}).join("")},on.prototype.serialize=function(){for(var g=["format"],P=0,V=this.sections;P=0&&m<=255&&typeof g=="number"&&g>=0&&g<=255&&typeof P=="number"&&P>=0&&P<=255)){var J=typeof V=="number"?[m,g,P,V]:[m,g,P];return"Invalid rgba value ["+J.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof V=="undefined"||typeof V=="number"&&V>=0&&V<=1?null:"Invalid rgba value ["+[m,g,P,V].join(", ")+"]: 'a' must be between 0 and 1."}function ca(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 Bn)return!0;if(m instanceof ms)return!0;if(m instanceof on)return!0;if(m instanceof mn)return!0;if(Array.isArray(m)){for(var g=0,P=m;g2){var Ge=g[1];if(typeof Ge!="string"||!(Ge in yn)||Ge==="object")return P.error('The item type argument of "array" must be one of string, number, boolean',1);ve=yn[Ge],V++}else ve=Pn;var yt;if(g.length>3){if(g[2]!==null&&(typeof g[2]!="number"||g[2]<0||g[2]!==Math.floor(g[2])))return P.error('The length argument to "array" must be a positive integer literal',2);yt=g[2],V++}J=Oa(ve,yt)}else J=yn[ae];for(var kt=[];V1)&&P.push(J)}}return P.concat(this.args.map(function(ae){return ae.serialize()}))};var ba=function(g){this.type=Vo,this.sections=g};ba.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=g[1];if(!Array.isArray(V)&&typeof V=="object")return P.error("First argument must be an image or text section.");for(var J=[],ae=!1,ve=1;ve<=g.length-1;++ve){var Ge=g[ve];if(ae&&typeof Ge=="object"&&!Array.isArray(Ge)){ae=!1;var yt=null;if(Ge["font-scale"]&&(yt=P.parse(Ge["font-scale"],1,Fi),!yt))return null;var kt=null;if(Ge["text-font"]&&(kt=P.parse(Ge["text-font"],1,Oa(Yn)),!kt))return null;var Ut=null;if(Ge["text-color"]&&(Ut=P.parse(Ge["text-color"],1,Qi),!Ut))return null;var lr=J[J.length-1];lr.scale=yt,lr.font=kt,lr.textColor=Ut}else{var kr=P.parse(g[ve],1,Pn);if(!kr)return null;var xr=kr.type.kind;if(xr!=="string"&&xr!=="value"&&xr!=="null"&&xr!=="resolvedImage")return P.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,J.push({content:kr,scale:null,font:null,textColor:null})}}return new ba(J)},ba.prototype.evaluate=function(g){var P=function(V){var J=V.content.evaluate(g);return bn(J)===Pa?new ya("",J,null,null,null):new ya(Xi(J),null,V.scale?V.scale.evaluate(g):null,V.font?V.font.evaluate(g).join(","):null,V.textColor?V.textColor.evaluate(g):null)};return new on(this.sections.map(P))},ba.prototype.eachChild=function(g){for(var P=0,V=this.sections;P-1),V},Da.prototype.eachChild=function(g){g(this.input)},Da.prototype.outputDefined=function(){return!1},Da.prototype.serialize=function(){return["image",this.input.serialize()]};var Aa={"to-boolean":xa,"to-color":Qi,"to-number":Fi,"to-string":Yn},Ln=function(g,P){this.type=g,this.args=P};Ln.parse=function(g,P){if(g.length<2)return P.error("Expected at least one argument.");var V=g[0];if((V==="to-boolean"||V==="to-string")&&g.length!==2)return P.error("Expected one argument.");for(var J=Aa[V],ae=[],ve=1;ve4?V="Invalid rbga value "+JSON.stringify(P)+": expected an array containing either three or four numeric values.":V=Ga(P[0],P[1],P[2],P[3]),!V))return new Bn(P[0]/255,P[1]/255,P[2]/255,P[3])}throw new Ia(V||"Could not parse color from value '"+(typeof P=="string"?P:String(JSON.stringify(P)))+"'")}else if(this.type.kind==="number"){for(var yt=null,kt=0,Ut=this.args;kt=g[2]||m[1]<=g[1]||m[3]>=g[3])}function Ss(m,g){var P=Wa(m[0]),V=hn(m[1]),J=Math.pow(2,g.z);return[Math.round(P*J*Za),Math.round(V*J*Za)]}function Kn(m,g,P){var V=m[0]-g[0],J=m[1]-g[1],ae=m[0]-P[0],ve=m[1]-P[1];return V*ve-ae*J===0&&V*ae<=0&&J*ve<=0}function ns(m,g,P){return g[1]>m[1]!=P[1]>m[1]&&m[0]<(P[0]-g[0])*(m[1]-g[1])/(P[1]-g[1])+g[0]}function Jo(m,g){for(var P=!1,V=0,J=g.length;V0&&lr<0||Ut<0&&lr>0}function To(m,g,P,V){var J=[g[0]-m[0],g[1]-m[1]],ae=[V[0]-P[0],V[1]-P[1]];return ma(ae,J)===0?!1:!!(ja(m,g,P,V)&&ja(P,V,m,g))}function Ao(m,g,P){for(var V=0,J=P;VP[2]){var J=V*.5,ae=m[0]-P[0]>J?-V:P[0]-m[0]>J?V:0;ae===0&&(ae=m[0]-P[2]>J?-V:P[2]-m[0]>J?V:0),m[0]+=ae}xo(g,m)}function ta(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function En(m,g,P,V){for(var J=Math.pow(2,V.z)*Za,ae=[V.x*Za,V.y*Za],ve=[],Ge=0,yt=m;Ge=0)return!1;var P=!0;return m.eachChild(function(V){P&&!Jn(V,g)&&(P=!1)}),P}var Cs=function(g,P){this.type=P.type,this.name=g,this.boundExpression=P};Cs.parse=function(g,P){if(g.length!==2||typeof g[1]!="string")return P.error("'var' expression requires exactly one string literal argument.");var V=g[1];return P.scope.has(V)?new Cs(V,P.scope.get(V)):P.error('Unknown variable "'+V+'". Make sure "'+V+'" has been bound in an enclosing "let" expression before using it.',1)},Cs.prototype.evaluate=function(g){return this.boundExpression.evaluate(g)},Cs.prototype.eachChild=function(){},Cs.prototype.outputDefined=function(){return!1},Cs.prototype.serialize=function(){return["var",this.name]};var Xa=function(g,P,V,J,ae){P===void 0&&(P=[]),J===void 0&&(J=new bo),ae===void 0&&(ae=[]),this.registry=g,this.path=P,this.key=P.map(function(ve){return"["+ve+"]"}).join(""),this.scope=J,this.errors=ae,this.expectedType=V};Xa.prototype.parse=function(g,P,V,J,ae){return ae===void 0&&(ae={}),P?this.concat(P,V,J)._parse(g,ae):this._parse(g,ae)},Xa.prototype._parse=function(g,P){(g===null||typeof g=="string"||typeof g=="boolean"||typeof g=="number")&&(g=["literal",g]);function V(Ut,lr,kr){return kr==="assert"?new Ya(lr,[Ut]):kr==="coerce"?new Ln(lr,[Ut]):Ut}if(Array.isArray(g)){if(g.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var J=g[0];if(typeof J!="string")return this.error("Expression name must be a string, but found "+typeof J+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[J];if(ae){var ve=ae.parse(g,this);if(!ve)return null;if(this.expectedType){var Ge=this.expectedType,yt=ve.type;if((Ge.kind==="string"||Ge.kind==="number"||Ge.kind==="boolean"||Ge.kind==="object"||Ge.kind==="array")&&yt.kind==="value")ve=V(ve,Ge,P.typeAnnotation||"assert");else if((Ge.kind==="color"||Ge.kind==="formatted"||Ge.kind==="resolvedImage")&&(yt.kind==="value"||yt.kind==="string"))ve=V(ve,Ge,P.typeAnnotation||"coerce");else if(this.checkSubtype(Ge,yt))return null}if(!(ve instanceof qn)&&ve.type.kind!=="resolvedImage"&&Zo(ve)){var kt=new wa;try{ve=new qn(ve.type,ve.evaluate(kt))}catch(Ut){return this.error(Ut.message),null}}return ve}return this.error('Unknown expression "'+J+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof g=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof g=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof g+" instead.")},Xa.prototype.concat=function(g,P,V){var J=typeof g=="number"?this.path.concat(g):this.path,ae=V?this.scope.concat(V):this.scope;return new Xa(this.registry,J,P||null,ae,this.errors)},Xa.prototype.error=function(g){for(var P=[],V=arguments.length-1;V-- >0;)P[V]=arguments[V+1];var J=""+this.key+P.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new va(J,g))},Xa.prototype.checkSubtype=function(g,P){var V=_o(g,P);return V&&this.error(V),V};function Zo(m){if(m instanceof Cs)return Zo(m.boundExpression);if(m instanceof $i&&m.name==="error")return!1;if(m instanceof Sa)return!1;if(m instanceof vs)return!1;var g=m instanceof Ln||m instanceof Ya,P=!0;return m.eachChild(function(V){g?P=P&&Zo(V):P=P&&V instanceof qn}),P?Ks(m)&&Jn(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function Eo(m,g){for(var P=m.length-1,V=0,J=P,ae=0,ve,Ge;V<=J;)if(ae=Math.floor((V+J)/2),ve=m[ae],Ge=m[ae+1],ve<=g){if(ae===P||gg)J=ae-1;else throw new Ia("Input is not a number.");return 0}var lo=function(g,P,V){this.type=g,this.input=P,this.labels=[],this.outputs=[];for(var J=0,ae=V;J=Ge)return P.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',kt);var lr=P.parse(yt,Ut,ae);if(!lr)return null;ae=ae||lr.type,J.push([Ge,lr])}return new lo(ae,V,J)},lo.prototype.evaluate=function(g){var P=this.labels,V=this.outputs;if(P.length===1)return V[0].evaluate(g);var J=this.input.evaluate(g);if(J<=P[0])return V[0].evaluate(g);var ae=P.length;if(J>=P[ae-1])return V[ae-1].evaluate(g);var ve=Eo(P,J);return V[ve].evaluate(g)},lo.prototype.eachChild=function(g){g(this.input);for(var P=0,V=this.outputs;P0&&g.push(this.labels[P]),g.push(this.outputs[P].serialize());return g};function $a(m,g,P){return m*(1-P)+g*P}function Xo(m,g,P){return new Bn($a(m.r,g.r,P),$a(m.g,g.g,P),$a(m.b,g.b,P),$a(m.a,g.a,P))}function rs(m,g,P){return m.map(function(V,J){return $a(V,g[J],P)})}var $n=Object.freeze({__proto__:null,number:$a,color:Xo,array:rs}),Sn=.95047,uo=1,Rs=1.08883,xs=4/29,Go=6/29,os=3*Go*Go,So=Go*Go*Go,Qn=Math.PI/180,zo=180/Math.PI;function rl(m){return m>So?Math.pow(m,1/3):m/os+xs}function $o(m){return m>Go?m*m*m:os*(m-xs)}function Na(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function Ua(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function Po(m){var g=Ua(m.r),P=Ua(m.g),V=Ua(m.b),J=rl((.4124564*g+.3575761*P+.1804375*V)/Sn),ae=rl((.2126729*g+.7151522*P+.072175*V)/uo),ve=rl((.0193339*g+.119192*P+.9503041*V)/Rs);return{l:116*ae-16,a:500*(J-ae),b:200*(ae-ve),alpha:m.a}}function fo(m){var g=(m.l+16)/116,P=isNaN(m.a)?g:g+m.a/500,V=isNaN(m.b)?g:g-m.b/200;return g=uo*$o(g),P=Sn*$o(P),V=Rs*$o(V),new Bn(Na(3.2404542*P-1.5371385*g-.4985314*V),Na(-.969266*P+1.8760108*g+.041556*V),Na(.0556434*P-.2040259*g+1.0572252*V),m.alpha)}function ro(m,g,P){return{l:$a(m.l,g.l,P),a:$a(m.a,g.a,P),b:$a(m.b,g.b,P),alpha:$a(m.alpha,g.alpha,P)}}function Ma(m){var g=Po(m),P=g.l,V=g.a,J=g.b,ae=Math.atan2(J,V)*zo;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+J*J),l:P,alpha:m.a}}function io(m){var g=m.h*Qn,P=m.c,V=m.l;return fo({l:V,a:Math.cos(g)*P,b:Math.sin(g)*P,alpha:m.alpha})}function aa(m,g,P){var V=g-m;return m+P*(V>180||V<-180?V-360*Math.round(V/360):V)}function Oo(m,g,P){return{h:aa(m.h,g.h,P),c:$a(m.c,g.c,P),l:$a(m.l,g.l,P),alpha:$a(m.alpha,g.alpha,P)}}var No={forward:Po,reverse:fo,interpolate:ro},Zs={forward:Ma,reverse:io,interpolate:Oo},Fs=Object.freeze({__proto__:null,lab:No,hcl:Zs}),ws=function(g,P,V,J,ae){this.type=g,this.operator=P,this.interpolation=V,this.input=J,this.labels=[],this.outputs=[];for(var ve=0,Ge=ae;ve1}))return P.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);J={name:"cubic-bezier",controlPoints:yt}}else return P.error("Unknown interpolation type "+String(J[0]),1,0);if(g.length-1<4)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if((g.length-1)%2!==0)return P.error("Expected an even number of arguments.");if(ae=P.parse(ae,2,Fi),!ae)return null;var kt=[],Ut=null;V==="interpolate-hcl"||V==="interpolate-lab"?Ut=Qi:P.expectedType&&P.expectedType.kind!=="value"&&(Ut=P.expectedType);for(var lr=0;lr=kr)return P.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ei);var _n=P.parse(xr,Li,Ut);if(!_n)return null;Ut=Ut||_n.type,kt.push([kr,_n])}return Ut.kind!=="number"&&Ut.kind!=="color"&&!(Ut.kind==="array"&&Ut.itemType.kind==="number"&&typeof Ut.N=="number")?P.error("Type "+co(Ut)+" is not interpolatable."):new ws(Ut,V,J,ae,kt)},ws.prototype.evaluate=function(g){var P=this.labels,V=this.outputs;if(P.length===1)return V[0].evaluate(g);var J=this.input.evaluate(g);if(J<=P[0])return V[0].evaluate(g);var ae=P.length;if(J>=P[ae-1])return V[ae-1].evaluate(g);var ve=Eo(P,J),Ge=P[ve],yt=P[ve+1],kt=ws.interpolationFactor(this.interpolation,J,Ge,yt),Ut=V[ve].evaluate(g),lr=V[ve+1].evaluate(g);return this.operator==="interpolate"?$n[this.type.kind.toLowerCase()](Ut,lr,kt):this.operator==="interpolate-hcl"?Zs.reverse(Zs.interpolate(Zs.forward(Ut),Zs.forward(lr),kt)):No.reverse(No.interpolate(No.forward(Ut),No.forward(lr),kt))},ws.prototype.eachChild=function(g){g(this.input);for(var P=0,V=this.outputs;P=V.length)throw new Ia("Array index out of bounds: "+P+" > "+(V.length-1)+".");if(P!==Math.floor(P))throw new Ia("Array index must be an integer, but found "+P+" instead.");return V[P]},Xs.prototype.eachChild=function(g){g(this.index),g(this.input)},Xs.prototype.outputDefined=function(){return!1},Xs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var oa=function(g,P){this.type=xa,this.needle=g,this.haystack=P};oa.parse=function(g,P){if(g.length!==3)return P.error("Expected 2 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Pn);return!V||!J?null:ks(V.type,[xa,Yn,Fi,Co,Pn])?new oa(V,J):P.error("Expected first argument to be of type boolean, string, number or null, but found "+co(V.type)+" instead")},oa.prototype.evaluate=function(g){var P=this.needle.evaluate(g),V=this.haystack.evaluate(g);if(!V)return!1;if(!bs(P,["boolean","string","number","null"]))throw new Ia("Expected first argument to be of type boolean, string, number or null, but found "+co(bn(P))+" instead.");if(!bs(V,["string","array"]))throw new Ia("Expected second argument to be of type array or string, but found "+co(bn(V))+" instead.");return V.indexOf(P)>=0},oa.prototype.eachChild=function(g){g(this.needle),g(this.haystack)},oa.prototype.outputDefined=function(){return!0},oa.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Yo=function(g,P,V){this.type=Fi,this.needle=g,this.haystack=P,this.fromIndex=V};Yo.parse=function(g,P){if(g.length<=2||g.length>=5)return P.error("Expected 3 or 4 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Pn);if(!V||!J)return null;if(!ks(V.type,[xa,Yn,Fi,Co,Pn]))return P.error("Expected first argument to be of type boolean, string, number or null, but found "+co(V.type)+" instead");if(g.length===4){var ae=P.parse(g[3],3,Fi);return ae?new Yo(V,J,ae):null}else return new Yo(V,J)},Yo.prototype.evaluate=function(g){var P=this.needle.evaluate(g),V=this.haystack.evaluate(g);if(!bs(P,["boolean","string","number","null"]))throw new Ia("Expected first argument to be of type boolean, string, number or null, but found "+co(bn(P))+" instead.");if(!bs(V,["string","array"]))throw new Ia("Expected second argument to be of type array or string, but found "+co(bn(V))+" instead.");if(this.fromIndex){var J=this.fromIndex.evaluate(g);return V.indexOf(P,J)}return V.indexOf(P)},Yo.prototype.eachChild=function(g){g(this.needle),g(this.haystack),this.fromIndex&&g(this.fromIndex)},Yo.prototype.outputDefined=function(){return!1},Yo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var g=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),g]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var po=function(g,P,V,J,ae,ve){this.inputType=g,this.type=P,this.input=V,this.cases=J,this.outputs=ae,this.otherwise=ve};po.parse=function(g,P){if(g.length<5)return P.error("Expected at least 4 arguments, but found only "+(g.length-1)+".");if(g.length%2!==1)return P.error("Expected an even number of arguments.");var V,J;P.expectedType&&P.expectedType.kind!=="value"&&(J=P.expectedType);for(var ae={},ve=[],Ge=2;GeNumber.MAX_SAFE_INTEGER)return Ut.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof xr=="number"&&Math.floor(xr)!==xr)return Ut.error("Numeric branch labels must be integer values.");if(!V)V=bn(xr);else if(Ut.checkSubtype(V,bn(xr)))return null;if(typeof ae[String(xr)]!="undefined")return Ut.error("Branch labels must be unique.");ae[String(xr)]=ve.length}var ei=P.parse(kt,Ge,J);if(!ei)return null;J=J||ei.type,ve.push(ei)}var Li=P.parse(g[1],1,Pn);if(!Li)return null;var _n=P.parse(g[g.length-1],g.length-1,J);return!_n||Li.type.kind!=="value"&&P.concat(1).checkSubtype(V,Li.type)?null:new po(V,J,Li,ae,ve,_n)},po.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=bn(P)===this.inputType&&this.outputs[this.cases[P]]||this.otherwise;return V.evaluate(g)},po.prototype.eachChild=function(g){g(this.input),this.outputs.forEach(g),g(this.otherwise)},po.prototype.outputDefined=function(){return this.outputs.every(function(g){return g.outputDefined()})&&this.otherwise.outputDefined()},po.prototype.serialize=function(){for(var g=this,P=["match",this.input.serialize()],V=Object.keys(this.cases).sort(),J=[],ae={},ve=0,Ge=V;ve=5)return P.error("Expected 3 or 4 arguments, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1,Pn),J=P.parse(g[2],2,Fi);if(!V||!J)return null;if(!ks(V.type,[Oa(Pn),Yn,Pn]))return P.error("Expected first argument to be of type array or string, but found "+co(V.type)+" instead");if(g.length===4){var ae=P.parse(g[3],3,Fi);return ae?new ls(V.type,V,J,ae):null}else return new ls(V.type,V,J)},ls.prototype.evaluate=function(g){var P=this.input.evaluate(g),V=this.beginIndex.evaluate(g);if(!bs(P,["string","array"]))throw new Ia("Expected first argument to be of type array or string, but found "+co(bn(P))+" instead.");if(this.endIndex){var J=this.endIndex.evaluate(g);return P.slice(V,J)}return P.slice(V)},ls.prototype.eachChild=function(g){g(this.input),g(this.beginIndex),this.endIndex&&g(this.endIndex)},ls.prototype.outputDefined=function(){return!1},ls.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var g=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),g]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function gs(m,g){return m==="=="||m==="!="?g.kind==="boolean"||g.kind==="string"||g.kind==="number"||g.kind==="null"||g.kind==="value":g.kind==="string"||g.kind==="number"||g.kind==="value"}function bt(m,g,P){return g===P}function Ft(m,g,P){return g!==P}function hr(m,g,P){return gP}function Sr(m,g,P){return g<=P}function li(m,g,P){return g>=P}function di(m,g,P,V){return V.compare(g,P)===0}function mi(m,g,P,V){return!di(m,g,P,V)}function Oi(m,g,P,V){return V.compare(g,P)<0}function dn(m,g,P,V){return V.compare(g,P)>0}function wi(m,g,P,V){return V.compare(g,P)<=0}function ui(m,g,P,V){return V.compare(g,P)>=0}function Ai(m,g,P){var V=m!=="=="&&m!=="!=";return function(){function J(ae,ve,Ge){this.type=xa,this.lhs=ae,this.rhs=ve,this.collator=Ge,this.hasUntypedArgument=ae.type.kind==="value"||ve.type.kind==="value"}return J.parse=function(ve,Ge){if(ve.length!==3&&ve.length!==4)return Ge.error("Expected two or three arguments.");var yt=ve[0],kt=Ge.parse(ve[1],1,Pn);if(!kt)return null;if(!gs(yt,kt.type))return Ge.concat(1).error('"'+yt+`" comparisons are not supported for type '`+co(kt.type)+"'.");var Ut=Ge.parse(ve[2],2,Pn);if(!Ut)return null;if(!gs(yt,Ut.type))return Ge.concat(2).error('"'+yt+`" comparisons are not supported for type '`+co(Ut.type)+"'.");if(kt.type.kind!==Ut.type.kind&&kt.type.kind!=="value"&&Ut.type.kind!=="value")return Ge.error("Cannot compare types '"+co(kt.type)+"' and '"+co(Ut.type)+"'.");V&&(kt.type.kind==="value"&&Ut.type.kind!=="value"?kt=new Ya(Ut.type,[kt]):kt.type.kind!=="value"&&Ut.type.kind==="value"&&(Ut=new Ya(kt.type,[Ut])));var lr=null;if(ve.length===4){if(kt.type.kind!=="string"&&Ut.type.kind!=="string"&&kt.type.kind!=="value"&&Ut.type.kind!=="value")return Ge.error("Cannot use collator to compare non-string types.");if(lr=Ge.parse(ve[3],3,jo),!lr)return null}return new J(kt,Ut,lr)},J.prototype.evaluate=function(ve){var Ge=this.lhs.evaluate(ve),yt=this.rhs.evaluate(ve);if(V&&this.hasUntypedArgument){var kt=bn(Ge),Ut=bn(yt);if(kt.kind!==Ut.kind||!(kt.kind==="string"||kt.kind==="number"))throw new Ia('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+kt.kind+", "+Ut.kind+") instead.")}if(this.collator&&!V&&this.hasUntypedArgument){var lr=bn(Ge),kr=bn(yt);if(lr.kind!=="string"||kr.kind!=="string")return g(ve,Ge,yt)}return this.collator?P(ve,Ge,yt,this.collator.evaluate(ve)):g(ve,Ge,yt)},J.prototype.eachChild=function(ve){ve(this.lhs),ve(this.rhs),this.collator&&ve(this.collator)},J.prototype.outputDefined=function(){return!0},J.prototype.serialize=function(){var ve=[m];return this.eachChild(function(Ge){ve.push(Ge.serialize())}),ve},J}()}var gi=Ai("==",bt,di),gn=Ai("!=",Ft,mi),In=Ai("<",hr,Oi),Vn=Ai(">",nr,dn),Rn=Ai("<=",Sr,wi),Hn=Ai(">=",li,ui),Gn=function(g,P,V,J,ae){this.type=Yn,this.number=g,this.locale=P,this.currency=V,this.minFractionDigits=J,this.maxFractionDigits=ae};Gn.parse=function(g,P){if(g.length!==3)return P.error("Expected two arguments.");var V=P.parse(g[1],1,Fi);if(!V)return null;var J=g[2];if(typeof J!="object"||Array.isArray(J))return P.error("NumberFormat options argument must be an object.");var ae=null;if(J.locale&&(ae=P.parse(J.locale,1,Yn),!ae))return null;var ve=null;if(J.currency&&(ve=P.parse(J.currency,1,Yn),!ve))return null;var Ge=null;if(J["min-fraction-digits"]&&(Ge=P.parse(J["min-fraction-digits"],1,Fi),!Ge))return null;var yt=null;return J["max-fraction-digits"]&&(yt=P.parse(J["max-fraction-digits"],1,Fi),!yt)?null:new Gn(V,ae,ve,Ge,yt)},Gn.prototype.evaluate=function(g){return new Intl.NumberFormat(this.locale?this.locale.evaluate(g):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(g):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(g):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(g):void 0}).format(this.number.evaluate(g))},Gn.prototype.eachChild=function(g){g(this.number),this.locale&&g(this.locale),this.currency&&g(this.currency),this.minFractionDigits&&g(this.minFractionDigits),this.maxFractionDigits&&g(this.maxFractionDigits)},Gn.prototype.outputDefined=function(){return!1},Gn.prototype.serialize=function(){var g={};return this.locale&&(g.locale=this.locale.serialize()),this.currency&&(g.currency=this.currency.serialize()),this.minFractionDigits&&(g["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(g["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),g]};var pn=function(g){this.type=Fi,this.input=g};pn.parse=function(g,P){if(g.length!==2)return P.error("Expected 1 argument, but found "+(g.length-1)+" instead.");var V=P.parse(g[1],1);return V?V.type.kind!=="array"&&V.type.kind!=="string"&&V.type.kind!=="value"?P.error("Expected argument of type string or array, but found "+co(V.type)+" instead."):new pn(V):null},pn.prototype.evaluate=function(g){var P=this.input.evaluate(g);if(typeof P=="string")return P.length;if(Array.isArray(P))return P.length;throw new Ia("Expected value to be of type string or array, but found "+co(bn(P))+" instead.")},pn.prototype.eachChild=function(g){g(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){var g=["length"];return this.eachChild(function(P){g.push(P.serialize())}),g};var Lo={"==":gi,"!=":gn,">":Vn,"<":In,">=":Hn,"<=":Rn,array:Ya,at:Xs,boolean:Ya,case:ss,coalesce:Ls,collator:Sa,format:ba,image:Da,in:oa,"index-of":Yo,interpolate:ws,"interpolate-hcl":ws,"interpolate-lab":ws,length:pn,let:ds,literal:qn,match:po,number:Ya,"number-format":Gn,object:Ya,slice:ls,step:lo,string:Ya,"to-boolean":Ln,"to-color":Ln,"to-number":Ln,"to-string":Ln,var:Cs,within:vs};function us(m,g){var P=g[0],V=g[1],J=g[2],ae=g[3];P=P.evaluate(m),V=V.evaluate(m),J=J.evaluate(m);var ve=ae?ae.evaluate(m):1,Ge=Ga(P,V,J,ve);if(Ge)throw new Ia(Ge);return new Bn(P/255*ve,V/255*ve,J/255*ve,ve)}function Bs(m,g){return m in g}function Js(m,g){var P=g[m];return typeof P=="undefined"?null:P}function ol(m,g,P,V){for(;P<=V;){var J=P+V>>1;if(g[J]===m)return!0;g[J]>m?V=J-1:P=J+1}return!1}function Cl(m){return{type:m}}$i.register(Lo,{error:[qa,[Yn],function(m,g){var P=g[0];throw new Ia(P.evaluate(m))}],typeof:[Yn,[Pn],function(m,g){var P=g[0];return co(bn(P.evaluate(m)))}],"to-rgba":[Oa(Fi,4),[Qi],function(m,g){var P=g[0];return P.evaluate(m).toArray()}],rgb:[Qi,[Fi,Fi,Fi],us],rgba:[Qi,[Fi,Fi,Fi,Fi],us],has:{type:xa,overloads:[[[Yn],function(m,g){var P=g[0];return Bs(P.evaluate(m),m.properties())}],[[Yn,Nn],function(m,g){var P=g[0],V=g[1];return Bs(P.evaluate(m),V.evaluate(m))}]]},get:{type:Pn,overloads:[[[Yn],function(m,g){var P=g[0];return Js(P.evaluate(m),m.properties())}],[[Yn,Nn],function(m,g){var P=g[0],V=g[1];return Js(P.evaluate(m),V.evaluate(m))}]]},"feature-state":[Pn,[Yn],function(m,g){var P=g[0];return Js(P.evaluate(m),m.featureState||{})}],properties:[Nn,[],function(m){return m.properties()}],"geometry-type":[Yn,[],function(m){return m.geometryType()}],id:[Pn,[],function(m){return m.id()}],zoom:[Fi,[],function(m){return m.globals.zoom}],"heatmap-density":[Fi,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[Fi,[],function(m){return m.globals.lineProgress||0}],accumulated:[Pn,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[Fi,Cl(Fi),function(m,g){for(var P=0,V=0,J=g;V":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J>ae}],"filter-id->":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V>J}],"filter-<=":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J<=ae}],"filter-id-<=":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V<=J}],"filter->=":[xa,[Yn,Pn],function(m,g){var P=g[0],V=g[1],J=m.properties()[P.value],ae=V.value;return typeof J==typeof ae&&J>=ae}],"filter-id->=":[xa,[Pn],function(m,g){var P=g[0],V=m.id(),J=P.value;return typeof V==typeof J&&V>=J}],"filter-has":[xa,[Pn],function(m,g){var P=g[0];return P.value in m.properties()}],"filter-has-id":[xa,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[xa,[Oa(Yn)],function(m,g){var P=g[0];return P.value.indexOf(m.geometryType())>=0}],"filter-id-in":[xa,[Oa(Pn)],function(m,g){var P=g[0];return P.value.indexOf(m.id())>=0}],"filter-in-small":[xa,[Yn,Oa(Pn)],function(m,g){var P=g[0],V=g[1];return V.value.indexOf(m.properties()[P.value])>=0}],"filter-in-large":[xa,[Yn,Oa(Pn)],function(m,g){var P=g[0],V=g[1];return ol(m.properties()[P.value],V.value,0,V.value.length-1)}],all:{type:xa,overloads:[[[xa,xa],function(m,g){var P=g[0],V=g[1];return P.evaluate(m)&&V.evaluate(m)}],[Cl(xa),function(m,g){for(var P=0,V=g;P-1}function ga(m){return!!m.expression&&m.expression.interpolated}function ko(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function zs(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Fo(m){return m}function Ys(m,g){var P=g.type==="color",V=m.stops&&typeof m.stops[0][0]=="object",J=V||m.property!==void 0,ae=V||!J,ve=m.type||(ga(g)?"exponential":"interval");if(P&&(m=pa({},m),m.stops&&(m.stops=m.stops.map(function(fl){return[fl[0],Bn.parse(fl[1])]})),m.default?m.default=Bn.parse(m.default):m.default=Bn.parse(g.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Fs[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Ge,yt,kt;if(ve==="exponential")Ge=_l;else if(ve==="interval")Ge=Sl;else if(ve==="categorical"){Ge=Us,yt=Object.create(null);for(var Ut=0,lr=m.stops;Ut=m.stops[V-1][0])return m.stops[V-1][1];var J=Eo(m.stops.map(function(ae){return ae[0]}),P);return m.stops[J][1]}function _l(m,g,P){var V=m.base!==void 0?m.base:1;if(ko(P)!=="number")return Gs(m.default,g.default);var J=m.stops.length;if(J===1||P<=m.stops[0][0])return m.stops[0][1];if(P>=m.stops[J-1][0])return m.stops[J-1][1];var ae=Eo(m.stops.map(function(lr){return lr[0]}),P),ve=cl(P,V,m.stops[ae][0],m.stops[ae+1][0]),Ge=m.stops[ae][1],yt=m.stops[ae+1][1],kt=$n[g.type]||Fo;if(m.colorSpace&&m.colorSpace!=="rgb"){var Ut=Fs[m.colorSpace];kt=function(lr,kr){return Ut.reverse(Ut.interpolate(Ut.forward(lr),Ut.forward(kr),ve))}}return typeof Ge.evaluate=="function"?{evaluate:function(){for(var kr=[],xr=arguments.length;xr--;)kr[xr]=arguments[xr];var ei=Ge.evaluate.apply(void 0,kr),Li=yt.evaluate.apply(void 0,kr);if(!(ei===void 0||Li===void 0))return kt(ei,Li,ve)}}:kt(Ge,yt,ve)}function kl(m,g,P){return g.type==="color"?P=Bn.parse(P):g.type==="formatted"?P=on.fromString(P.toString()):g.type==="resolvedImage"?P=mn.fromString(P.toString()):ko(P)!==g.type&&(g.type!=="enum"||!g.values[P])&&(P=void 0),Gs(P,m.default,g.default)}function cl(m,g,P,V){var J=V-P,ae=m-P;return J===0?0:g===1?ae/J:(Math.pow(g,ae)-1)/(Math.pow(g,J)-1)}var xl=function(g,P){this.expression=g,this._warningHistory={},this._evaluator=new wa,this._defaultValue=P?ee(P):null,this._enumValues=P&&P.type==="enum"?P.values:null};xl.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._evaluator.globals=g,this._evaluator.feature=P,this._evaluator.featureState=V,this._evaluator.canonical=J,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=ve,this.expression.evaluate(this._evaluator)},xl.prototype.evaluate=function(g,P,V,J,ae,ve){this._evaluator.globals=g,this._evaluator.feature=P||null,this._evaluator.featureState=V||null,this._evaluator.canonical=J,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=ve||null;try{var Ge=this.expression.evaluate(this._evaluator);if(Ge==null||typeof Ge=="number"&&Ge!==Ge)return this._defaultValue;if(this._enumValues&&!(Ge in this._enumValues))throw new Ia("Expected value to be one of "+Object.keys(this._enumValues).map(function(yt){return JSON.stringify(yt)}).join(", ")+", but found "+JSON.stringify(Ge)+" instead.");return Ge}catch(yt){return this._warningHistory[yt.message]||(this._warningHistory[yt.message]=!0,typeof console!="undefined"&&console.warn(yt.message)),this._defaultValue}};function Uo(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Lo}function _s(m,g){var P=new Xa(Lo,[],g?Q(g):void 0),V=P.parse(m,void 0,void 0,void 0,g&&g.type==="string"?{typeAnnotation:"coerce"}:void 0);return V?ul(new xl(V,g)):Gl(P.errors)}var Bl=function(g,P){this.kind=g,this._styleExpression=P,this.isStateDependent=g!=="constant"&&!as(P.expression)};Bl.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._styleExpression.evaluateWithoutErrorHandling(g,P,V,J,ae,ve)},Bl.prototype.evaluate=function(g,P,V,J,ae,ve){return this._styleExpression.evaluate(g,P,V,J,ae,ve)};var Il=function(g,P,V,J){this.kind=g,this.zoomStops=V,this._styleExpression=P,this.isStateDependent=g!=="camera"&&!as(P.expression),this.interpolationType=J};Il.prototype.evaluateWithoutErrorHandling=function(g,P,V,J,ae,ve){return this._styleExpression.evaluateWithoutErrorHandling(g,P,V,J,ae,ve)},Il.prototype.evaluate=function(g,P,V,J,ae,ve){return this._styleExpression.evaluate(g,P,V,J,ae,ve)},Il.prototype.interpolationFactor=function(g,P,V){return this.interpolationType?ws.interpolationFactor(this.interpolationType,g,P,V):0};function Dl(m,g){if(m=_s(m,g),m.result==="error")return m;var P=m.value.expression,V=Ks(P);if(!V&&!Vl(g))return Gl([new va("","data expressions not supported")]);var J=Jn(P,["zoom"]);if(!J&&!Fl(g))return Gl([new va("","zoom expressions not supported")]);var ae=B(P);if(!ae&&!J)return Gl([new va("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof va)return Gl([ae]);if(ae instanceof ws&&!ga(g))return Gl([new va("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return ul(V?new Bl("constant",m.value):new Bl("source",m.value));var ve=ae instanceof ws?ae.interpolation:void 0;return ul(V?new Il("camera",m.value,ae.labels,ve):new Il("composite",m.value,ae.labels,ve))}var oe=function(g,P){this._parameters=g,this._specification=P,pa(this,Ys(this._parameters,this._specification))};oe.deserialize=function(g){return new oe(g._parameters,g._specification)},oe.serialize=function(g){return{_parameters:g._parameters,_specification:g._specification}};function w(m,g){if(zs(m))return new oe(m,g);if(Uo(m)){var P=Dl(m,g);if(P.result==="error")throw new Error(P.value.map(function(J){return J.key+": "+J.message}).join(", "));return P.value}else{var V=m;return typeof m=="string"&&g.type==="color"&&(V=Bn.parse(m)),{kind:"constant",evaluate:function(){return V}}}}function B(m){var g=null;if(m instanceof ds)g=B(m.result);else if(m instanceof Ls)for(var P=0,V=m.args;PV.maximum?[new an(g,P,P+" is greater than the maximum value "+V.maximum)]:[]}function pt(m){var g=m.valueSpec,P=ln(m.value.type),V,J={},ae,ve,Ge=P!=="categorical"&&m.value.property===void 0,yt=!Ge,kt=ko(m.value.stops)==="array"&&ko(m.value.stops[0])==="array"&&ko(m.value.stops[0][0])==="object",Ut=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:lr,default:ei}});return P==="identity"&&Ge&&Ut.push(new an(m.key,m.value,'missing required property "property"')),P!=="identity"&&!m.value.stops&&Ut.push(new an(m.key,m.value,'missing required property "stops"')),P==="exponential"&&m.valueSpec.expression&&!ga(m.valueSpec)&&Ut.push(new an(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(yt&&!Vl(m.valueSpec)?Ut.push(new an(m.key,m.value,"property functions not supported")):Ge&&!Fl(m.valueSpec)&&Ut.push(new an(m.key,m.value,"zoom functions not supported"))),(P==="categorical"||kt)&&m.value.property===void 0&&Ut.push(new an(m.key,m.value,'"property" property is required')),Ut;function lr(Li){if(P==="identity")return[new an(Li.key,Li.value,'identity function may not have a "stops" property')];var _n=[],rn=Li.value;return _n=_n.concat(Ne({key:Li.key,value:rn,valueSpec:Li.valueSpec,style:Li.style,styleSpec:Li.styleSpec,arrayElementValidator:kr})),ko(rn)==="array"&&rn.length===0&&_n.push(new an(Li.key,rn,"array must have at least one stop")),_n}function kr(Li){var _n=[],rn=Li.value,Fa=Li.key;if(ko(rn)!=="array")return[new an(Fa,rn,"array expected, "+ko(rn)+" found")];if(rn.length!==2)return[new an(Fa,rn,"array length 2 expected, length "+rn.length+" found")];if(kt){if(ko(rn[0])!=="object")return[new an(Fa,rn,"object expected, "+ko(rn[0])+" found")];if(rn[0].zoom===void 0)return[new an(Fa,rn,"object stop key must have zoom")];if(rn[0].value===void 0)return[new an(Fa,rn,"object stop key must have value")];if(ve&&ve>ln(rn[0].zoom))return[new an(Fa,rn[0].zoom,"stop zoom values must appear in ascending order")];ln(rn[0].zoom)!==ve&&(ve=ln(rn[0].zoom),ae=void 0,J={}),_n=_n.concat(le({key:Fa+"[0]",value:rn[0],valueSpec:{zoom:{}},style:Li.style,styleSpec:Li.styleSpec,objectElementValidators:{zoom:$e,value:xr}}))}else _n=_n.concat(xr({key:Fa+"[0]",value:rn[0],valueSpec:{},style:Li.style,styleSpec:Li.styleSpec},rn));return Uo(ka(rn[1]))?_n.concat([new an(Fa+"[1]",rn[1],"expressions are not allowed in function stops.")]):_n.concat(pl({key:Fa+"[1]",value:rn[1],valueSpec:g,style:Li.style,styleSpec:Li.styleSpec}))}function xr(Li,_n){var rn=ko(Li.value),Fa=ln(Li.value),On=Li.value!==null?Li.value:_n;if(!V)V=rn;else if(rn!==V)return[new an(Li.key,On,rn+" stop domain type must match previous stop domain type "+V)];if(rn!=="number"&&rn!=="string"&&rn!=="boolean")return[new an(Li.key,On,"stop domain value must be a number, string, or boolean")];if(rn!=="number"&&P!=="categorical"){var Ra="number expected, "+rn+" found";return Vl(g)&&P===void 0&&(Ra+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new an(Li.key,On,Ra)]}return P==="categorical"&&rn==="number"&&(!isFinite(Fa)||Math.floor(Fa)!==Fa)?[new an(Li.key,On,"integer expected, found "+Fa)]:P!=="categorical"&&rn==="number"&&ae!==void 0&&Fa=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 g=0,P=m.slice(1);gg?1:0}function Ve(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var g=1;g"||g==="<="||g===">="?Ke(m[1],m[2],g):g==="any"?ft(m.slice(1)):g==="all"?["all"].concat(m.slice(1).map(ot)):g==="none"?["all"].concat(m.slice(1).map(ot).map($t)):g==="in"?qt(m[1],m.slice(2)):g==="!in"?$t(qt(m[1],m.slice(2))):g==="has"?Xt(m[1]):g==="!has"?$t(Xt(m[1])):g==="within"?m:!0;return P}function Ke(m,g,P){switch(m){case"$type":return["filter-type-"+P,g];case"$id":return["filter-id-"+P,g];default:return["filter-"+P,m,g]}}function ft(m){return["any"].concat(m.map(ot))}function qt(m,g){if(g.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",g]];case"$id":return["filter-id-in",["literal",g]];default:return g.length>200&&!g.some(function(P){return typeof P!=typeof g[0]})?["filter-in-large",m,["literal",g.sort(qe)]]:["filter-in-small",m,["literal",g]]}}function Xt(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function $t(m){return["!",m]}function dr(m){return Ir(ka(m.value))?zt(pa({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Mr(m)}function Mr(m){var g=m.value,P=m.key;if(ko(g)!=="array")return[new an(P,g,"array expected, "+ko(g)+" found")];var V=m.styleSpec,J,ae=[];if(g.length<1)return[new an(P,g,"filter array must have at least 1 element")];switch(ae=ae.concat(yr({key:P+"[0]",value:g[0],valueSpec:V.filter_operator,style:m.style,styleSpec:m.styleSpec})),ln(g[0])){case"<":case"<=":case">":case">=":g.length>=2&&ln(g[1])==="$type"&&ae.push(new an(P,g,'"$type" cannot be use with operator "'+g[0]+'"'));case"==":case"!=":g.length!==3&&ae.push(new an(P,g,'filter array for operator "'+g[0]+'" must have 3 elements'));case"in":case"!in":g.length>=2&&(J=ko(g[1]),J!=="string"&&ae.push(new an(P+"[1]",g[1],"string expected, "+J+" found")));for(var ve=2;ve=Ut[xr+0]&&V>=Ut[xr+1])?(ve[kr]=!0,ae.push(kt[kr])):ve[kr]=!1}}},sf.prototype._forEachCell=function(m,g,P,V,J,ae,ve,Ge){for(var yt=this._convertToCellCoord(m),kt=this._convertToCellCoord(g),Ut=this._convertToCellCoord(P),lr=this._convertToCellCoord(V),kr=yt;kr<=Ut;kr++)for(var xr=kt;xr<=lr;xr++){var ei=this.d*xr+kr;if(!(Ge&&!Ge(this._convertFromCellCoord(kr),this._convertFromCellCoord(xr),this._convertFromCellCoord(kr+1),this._convertFromCellCoord(xr+1)))&&J.call(this,m,g,P,V,ei,ae,ve,Ge))return}},sf.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},sf.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},sf.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,g=Wu+this.cells.length+1+1,P=0,V=0;V=0)){var lr=m[Ut];kt[Ut]=af[yt].shallow.indexOf(Ut)>=0?lr:Ye(lr,g)}m instanceof Error&&(kt.message=m.message)}if(kt.$name)throw new Error("$name property is reserved for worker serialization logic.");return yt!=="Object"&&(kt.$name=yt),kt}throw new Error("can't serialize object of type "+typeof m)}function it(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||Le(m)||We(m)||ArrayBuffer.isView(m)||m instanceof gf)return m;if(Array.isArray(m))return m.map(it);if(typeof m=="object"){var g=m.$name||"Object",P=af[g],V=P.klass;if(!V)throw new Error("can't deserialize unregistered class "+g);if(V.deserialize)return V.deserialize(m);for(var J=Object.create(V.prototype),ae=0,ve=Object.keys(m);ae=0?yt:it(yt)}}return J}throw new Error("can't deserialize object of type "+typeof m)}var Nt=function(){this.first=!0};Nt.prototype.update=function(g,P){var V=Math.floor(g);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=g,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=P):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 er(m){for(var g=0,P=m;g=65097&&m<=65103)||mt["CJK Compatibility Ideographs"](m)||mt["CJK Compatibility"](m)||mt["CJK Radicals Supplement"](m)||mt["CJK Strokes"](m)||mt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||mt["CJK Unified Ideographs Extension A"](m)||mt["CJK Unified Ideographs"](m)||mt["Enclosed CJK Letters and Months"](m)||mt["Hangul Compatibility Jamo"](m)||mt["Hangul Jamo Extended-A"](m)||mt["Hangul Jamo Extended-B"](m)||mt["Hangul Jamo"](m)||mt["Hangul Syllables"](m)||mt.Hiragana(m)||mt["Ideographic Description Characters"](m)||mt.Kanbun(m)||mt["Kangxi Radicals"](m)||mt["Katakana Phonetic Extensions"](m)||mt.Katakana(m)&&m!==12540||mt["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)||mt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||mt["Unified Canadian Aboriginal Syllabics"](m)||mt["Unified Canadian Aboriginal Syllabics Extended"](m)||mt["Vertical Forms"](m)||mt["Yijing Hexagram Symbols"](m)||mt["Yi Syllables"](m)||mt["Yi Radicals"](m))}function Ci(m){return!!(mt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||mt["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)||mt["Letterlike Symbols"](m)||mt["Number Forms"](m)||mt["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)||mt["Control Pictures"](m)&&m!==9251||mt["Optical Character Recognition"](m)||mt["Enclosed Alphanumerics"](m)||mt["Geometric Shapes"](m)||mt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||mt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||mt["CJK Symbols and Punctuation"](m)||mt.Katakana(m)||mt["Private Use Area"](m)||mt["CJK Compatibility Forms"](m)||mt["Small Form Variants"](m)||mt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function Ji(m){return!(Wr(m)||Ci(m))}function ai(m){return mt.Arabic(m)||mt["Arabic Supplement"](m)||mt["Arabic Extended-A"](m)||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m)}function Ti(m){return m>=1424&&m<=2303||mt["Arabic Presentation Forms-A"](m)||mt["Arabic Presentation Forms-B"](m)}function Bi(m,g){return!(!g&&Ti(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||mt.Khmer(m))}function en(m){for(var g=0,P=m;g-1&&(yo=bi.error),ao&&ao(m)};function vl(){wl.fire(new Vi("pluginStateChange",{pluginStatus:yo,pluginURL:Ko}))}var wl=new Mi,au=function(){return yo},Al=function(m){return m({pluginStatus:yo,pluginURL:Ko}),wl.on("pluginStateChange",m),m},nu=function(m,g,P){if(P===void 0&&(P=!1),yo===bi.deferred||yo===bi.loading||yo===bi.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ko=et.resolveURL(m),yo=bi.deferred,ao=g,vl(),P||Bu()},Bu=function(){if(yo!==bi.deferred||!Ko)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");yo=bi.loading,vl(),Ko&&zr({url:Ko},function(m){m?Ms(m):(yo=bi.loaded,vl())})},qu={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return yo===bi.loaded||qu.applyArabicShaping!=null},isLoading:function(){return yo===bi.loading},setState:function(g){yo=g.pluginStatus,Ko=g.pluginURL},isParsed:function(){return qu.applyArabicShaping!=null&&qu.processBidirectionalText!=null&&qu.processStyledBidirectionalText!=null},getPluginURL:function(){return Ko}},Ju=function(){!qu.isLoading()&&!qu.isLoaded()&&au()==="deferred"&&Bu()},qo=function(g,P){this.zoom=g,P?(this.now=P.now,this.fadeDuration=P.fadeDuration,this.zoomHistory=P.zoomHistory,this.transition=P.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})};qo.prototype.isSupportedScript=function(g){return Wi(g,qu.isLoaded())},qo.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},qo.prototype.getCrossfadeParameters=function(){var g=this.zoom,P=g-Math.floor(g),V=this.crossFadingFactor();return g>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:P+(1-P)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*P}};var Rl=function(g,P){this.property=g,this.value=P,this.expression=w(P===void 0?g.specification.default:P,g.specification)};Rl.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Rl.prototype.possiblyEvaluate=function(g,P,V){return this.property.possiblyEvaluate(this,g,P,V)};var pu=function(g){this.property=g,this.value=new Rl(g,void 0)};pu.prototype.transitioned=function(g,P){return new of(this.property,this.value,P,_({},g.transition,this.transition),g.now)},pu.prototype.untransitioned=function(){return new of(this.property,this.value,null,{},0)};var xu=function(g){this._properties=g,this._values=Object.create(g.defaultTransitionablePropertyValues)};xu.prototype.getValue=function(g){return G(this._values[g].value.value)},xu.prototype.setValue=function(g,P){this._values.hasOwnProperty(g)||(this._values[g]=new pu(this._values[g].property)),this._values[g].value=new Rl(this._values[g].property,P===null?void 0:G(P))},xu.prototype.getTransition=function(g){return G(this._values[g].transition)},xu.prototype.setTransition=function(g,P){this._values.hasOwnProperty(g)||(this._values[g]=new pu(this._values[g].property)),this._values[g].transition=G(P)||void 0},xu.prototype.serialize=function(){for(var g={},P=0,V=Object.keys(this._values);Pthis.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if(Jve.zoomHistory.lastIntegerZoom?{from:V,to:J}:{from:ae,to:J}},g.prototype.interpolate=function(V){return V},g}(jr),Mn=function(g){this.specification=g};Mn.prototype.possiblyEvaluate=function(g,P,V,J){if(g.value!==void 0)if(g.expression.kind==="constant"){var ae=g.expression.evaluate(P,null,{},V,J);return this._calculate(ae,ae,ae,P)}else return this._calculate(g.expression.evaluate(new qo(Math.floor(P.zoom-1),P)),g.expression.evaluate(new qo(Math.floor(P.zoom),P)),g.expression.evaluate(new qo(Math.floor(P.zoom+1),P)),P)},Mn.prototype._calculate=function(g,P,V,J){var ae=J.zoom;return ae>J.zoomHistory.lastIntegerZoom?{from:g,to:P}:{from:V,to:P}},Mn.prototype.interpolate=function(g){return g};var Ta=function(g){this.specification=g};Ta.prototype.possiblyEvaluate=function(g,P,V,J){return!!g.expression.evaluate(P,null,{},V,J)},Ta.prototype.interpolate=function(){return!1};var fa=function(g){this.properties=g,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var P in g){var V=g[P];V.specification.overridable&&this.overridableProperties.push(P);var J=this.defaultPropertyValues[P]=new Rl(V,void 0),ae=this.defaultTransitionablePropertyValues[P]=new pu(V);this.defaultTransitioningPropertyValues[P]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[P]=J.possiblyEvaluate({})}};X("DataDrivenProperty",jr),X("DataConstantProperty",Gt),X("CrossFadedDataDrivenProperty",_i),X("CrossFadedProperty",Mn),X("ColorRampProperty",Ta);var ha="-transition",Io=function(m){function g(P,V){if(m.call(this),this.id=P.id,this.type=P.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},P.type!=="custom"&&(P=P,this.metadata=P.metadata,this.minzoom=P.minzoom,this.maxzoom=P.maxzoom,P.type!=="background"&&(this.source=P.source,this.sourceLayer=P["source-layer"],this.filter=P.filter),V.layout&&(this._unevaluatedLayout=new xf(V.layout)),V.paint)){this._transitionablePaint=new xu(V.paint);for(var J in P.paint)this.setPaintProperty(J,P.paint[J],{validate:!1});for(var ae in P.layout)this.setLayoutProperty(ae,P.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new dc(V.paint)}}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},g.prototype.getLayoutProperty=function(V){return V==="visibility"?this.visibility:this._unevaluatedLayout.getValue(V)},g.prototype.setLayoutProperty=function(V,J,ae){if(ae===void 0&&(ae={}),J!=null){var ve="layers."+this.id+".layout."+V;if(this._validate(tf,ve,V,J,ae))return}if(V==="visibility"){this.visibility=J;return}this._unevaluatedLayout.setValue(V,J)},g.prototype.getPaintProperty=function(V){return U(V,ha)?this._transitionablePaint.getTransition(V.slice(0,-ha.length)):this._transitionablePaint.getValue(V)},g.prototype.setPaintProperty=function(V,J,ae){if(ae===void 0&&(ae={}),J!=null){var ve="layers."+this.id+".paint."+V;if(this._validate(Hu,ve,V,J,ae))return!1}if(U(V,ha))return this._transitionablePaint.setTransition(V.slice(0,-ha.length),J||void 0),!1;var Ge=this._transitionablePaint._values[V],yt=Ge.property.specification["property-type"]==="cross-faded-data-driven",kt=Ge.value.isDataDriven(),Ut=Ge.value;this._transitionablePaint.setValue(V,J),this._handleSpecialPaintPropertyUpdate(V);var lr=this._transitionablePaint._values[V].value,kr=lr.isDataDriven();return kr||kt||yt||this._handleOverridablePaintPropertyUpdate(V,Ut,lr)},g.prototype._handleSpecialPaintPropertyUpdate=function(V){},g.prototype._handleOverridablePaintPropertyUpdate=function(V,J,ae){return!1},g.prototype.isHidden=function(V){return this.minzoom&&V=this.maxzoom?!0:this.visibility==="none"},g.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},g.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},g.prototype.recalculate=function(V,J){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,J)},g.prototype.serialize=function(){var V={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(V.layout=V.layout||{},V.layout.visibility=this.visibility),j(V,function(J,ae){return J!==void 0&&!(ae==="layout"&&!Object.keys(J).length)&&!(ae==="paint"&&!Object.keys(J).length)})},g.prototype._validate=function(V,J,ae,ve,Ge){return Ge===void 0&&(Ge={}),Ge&&Ge.validate===!1?!1:Ku(this,V.call(Jl,{key:J,layerType:this.type,objectKey:ae,value:ve,styleSpec:Ri,style:{glyphs:!0,sprite:!0}}))},g.prototype.is3D=function(){return!1},g.prototype.isTileClipped=function(){return!1},g.prototype.hasOffscreenPass=function(){return!1},g.prototype.resize=function(){},g.prototype.isStateDependent=function(){for(var V in this.paint._values){var J=this.paint.get(V);if(!(!(J instanceof hf)||!Vl(J.property.specification))&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1},g}(Mi),Vs={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Hs=function(g,P){this._structArray=g,this._pos1=P*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},is=128,su=5,Ps=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Ps.serialize=function(g,P){return g._trim(),P&&(g.isTransferred=!0,P.push(g.arrayBuffer)),{length:g.length,arrayBuffer:g.arrayBuffer}},Ps.deserialize=function(g){var P=Object.create(this.prototype);return P.arrayBuffer=g.arrayBuffer,P.length=g.length,P.capacity=g.arrayBuffer.byteLength/P.bytesPerElement,P._refreshViews(),P},Ps.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ps.prototype.clear=function(){this.length=0},Ps.prototype.resize=function(g){this.reserve(g),this.length=g},Ps.prototype.reserve=function(g){if(g>this.capacity){this.capacity=Math.max(g,Math.floor(this.capacity*su),is),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var P=this.uint8;this._refreshViews(),P&&this.uint8.set(P)}},Ps.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function qs(m,g){g===void 0&&(g=1);var P=0,V=0,J=m.map(function(ve){var Ge=Do(ve.type),yt=P=kn(P,Math.max(g,Ge)),kt=ve.components||1;return V=Math.max(V,Ge),P+=Ge*kt,{name:ve.name,type:ve.type,components:kt,offset:yt}}),ae=kn(P,Math.max(V,g));return{members:J,size:ae,alignment:g}}function Do(m){return Vs[m].BYTES_PER_ELEMENT}function kn(m,g){return Math.ceil(m/g)*g}var La=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.int16[ve+0]=J,this.int16[ve+1]=ae,V},g}(Ps);La.prototype.bytesPerElement=4,X("StructArrayLayout2i4",La);var Es=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*4;return this.int16[yt+0]=J,this.int16[yt+1]=ae,this.int16[yt+2]=ve,this.int16[yt+3]=Ge,V},g}(Ps);Es.prototype.bytesPerElement=8,X("StructArrayLayout4i8",Es);var Ws=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*6;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.int16[Ut+2]=ve,this.int16[Ut+3]=Ge,this.int16[Ut+4]=yt,this.int16[Ut+5]=kt,V},g}(Ps);Ws.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ws);var Qo=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*4,lr=V*8;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.uint8[lr+4]=ve,this.uint8[lr+5]=Ge,this.uint8[lr+6]=yt,this.uint8[lr+7]=kt,V},g}(Ps);Qo.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",Qo);var bl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.float32[ve+0]=J,this.float32[ve+1]=ae,V},g}(Ps);bl.prototype.bytesPerElement=8,X("StructArrayLayout2f8",bl);var nl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=this.length;return this.resize(xr+1),this.emplace(xr,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr){var ei=V*10;return this.uint16[ei+0]=J,this.uint16[ei+1]=ae,this.uint16[ei+2]=ve,this.uint16[ei+3]=Ge,this.uint16[ei+4]=yt,this.uint16[ei+5]=kt,this.uint16[ei+6]=Ut,this.uint16[ei+7]=lr,this.uint16[ei+8]=kr,this.uint16[ei+9]=xr,V},g}(Ps);nl.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",nl);var ru=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei){var Li=this.length;return this.resize(Li+1),this.emplace(Li,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li){var _n=V*12;return this.int16[_n+0]=J,this.int16[_n+1]=ae,this.int16[_n+2]=ve,this.int16[_n+3]=Ge,this.uint16[_n+4]=yt,this.uint16[_n+5]=kt,this.uint16[_n+6]=Ut,this.uint16[_n+7]=lr,this.int16[_n+8]=kr,this.int16[_n+9]=xr,this.int16[_n+10]=ei,this.int16[_n+11]=Li,V},g}(Ps);ru.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",ru);var hs=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.float32[Ge+0]=J,this.float32[Ge+1]=ae,this.float32[Ge+2]=ve,V},g}(Ps);hs.prototype.bytesPerElement=12,X("StructArrayLayout3f12",hs);var Ho=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.uint32[ae+0]=J,V},g}(Ps);Ho.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",Ho);var ql=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr){var kr=this.length;return this.resize(kr+1),this.emplace(kr,V,J,ae,ve,Ge,yt,kt,Ut,lr)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr){var xr=V*10,ei=V*5;return this.int16[xr+0]=J,this.int16[xr+1]=ae,this.int16[xr+2]=ve,this.int16[xr+3]=Ge,this.int16[xr+4]=yt,this.int16[xr+5]=kt,this.uint32[ei+3]=Ut,this.uint16[xr+8]=lr,this.uint16[xr+9]=kr,V},g}(Ps);ql.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",ql);var yl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt){var kt=this.length;return this.resize(kt+1),this.emplace(kt,V,J,ae,ve,Ge,yt)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt){var Ut=V*6;return this.int16[Ut+0]=J,this.int16[Ut+1]=ae,this.int16[Ut+2]=ve,this.int16[Ut+3]=Ge,this.int16[Ut+4]=yt,this.int16[Ut+5]=kt,V},g}(Ps);yl.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",yl);var tl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,J,ae,ve,Ge)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt){var kt=V*4,Ut=V*8;return this.float32[kt+0]=J,this.float32[kt+1]=ae,this.float32[kt+2]=ve,this.int16[Ut+6]=Ge,this.int16[Ut+7]=yt,V},g}(Ps);tl.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",tl);var js=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*12,kt=V*3;return this.uint8[yt+0]=J,this.uint8[yt+1]=ae,this.float32[kt+1]=ve,this.float32[kt+2]=Ge,V},g}(Ps);js.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",js);var zl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.uint16[Ge+0]=J,this.uint16[Ge+1]=ae,this.uint16[Ge+2]=ve,V},g}(Ps);zl.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",zl);var lu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On){var Ra=this.length;return this.resize(Ra+1),this.emplace(Ra,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra){var so=V*24,As=V*12,dl=V*48;return this.int16[so+0]=J,this.int16[so+1]=ae,this.uint16[so+2]=ve,this.uint16[so+3]=Ge,this.uint32[As+2]=yt,this.uint32[As+3]=kt,this.uint32[As+4]=Ut,this.uint16[so+10]=lr,this.uint16[so+11]=kr,this.uint16[so+12]=xr,this.float32[As+7]=ei,this.float32[As+8]=Li,this.uint8[dl+36]=_n,this.uint8[dl+37]=rn,this.uint8[dl+38]=Fa,this.uint32[As+10]=On,this.int16[so+22]=Ra,V},g}(Ps);lu.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",lu);var bu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.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)},g.prototype.emplaceBack=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou){var Qu=this.length;return this.resize(Qu+1),this.emplace(Qu,V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou)},g.prototype.emplace=function(V,J,ae,ve,Ge,yt,kt,Ut,lr,kr,xr,ei,Li,_n,rn,Fa,On,Ra,so,As,dl,fl,eu,Ol,Xl,Cu,tu,ou,Qu){var Eu=V*34,Tf=V*17;return this.int16[Eu+0]=J,this.int16[Eu+1]=ae,this.int16[Eu+2]=ve,this.int16[Eu+3]=Ge,this.int16[Eu+4]=yt,this.int16[Eu+5]=kt,this.int16[Eu+6]=Ut,this.int16[Eu+7]=lr,this.uint16[Eu+8]=kr,this.uint16[Eu+9]=xr,this.uint16[Eu+10]=ei,this.uint16[Eu+11]=Li,this.uint16[Eu+12]=_n,this.uint16[Eu+13]=rn,this.uint16[Eu+14]=Fa,this.uint16[Eu+15]=On,this.uint16[Eu+16]=Ra,this.uint16[Eu+17]=so,this.uint16[Eu+18]=As,this.uint16[Eu+19]=dl,this.uint16[Eu+20]=fl,this.uint16[Eu+21]=eu,this.uint16[Eu+22]=Ol,this.uint32[Tf+12]=Xl,this.float32[Tf+13]=Cu,this.float32[Tf+14]=tu,this.float32[Tf+15]=ou,this.float32[Tf+16]=Qu,V},g}(Ps);bu.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",bu);var al=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.float32[ae+0]=J,V},g}(Ps);al.prototype.bytesPerElement=4,X("StructArrayLayout1f4",al);var jl=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*3;return this.int16[Ge+0]=J,this.int16[Ge+1]=ae,this.int16[Ge+2]=ve,V},g}(Ps);jl.prototype.bytesPerElement=6,X("StructArrayLayout3i6",jl);var mu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,V,J,ae)},g.prototype.emplace=function(V,J,ae,ve){var Ge=V*2,yt=V*4;return this.uint32[Ge+0]=J,this.uint16[yt+2]=ae,this.uint16[yt+3]=ve,V},g}(Ps);mu.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",mu);var Tu=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,J)},g.prototype.emplace=function(V,J,ae){var ve=V*2;return this.uint16[ve+0]=J,this.uint16[ve+1]=ae,V},g}(Ps);Tu.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",Tu);var Ru=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V){var J=this.length;return this.resize(J+1),this.emplace(J,V)},g.prototype.emplace=function(V,J){var ae=V*1;return this.uint16[ae+0]=J,V},g}(Ps);Ru.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",Ru);var Rf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},g.prototype.emplaceBack=function(V,J,ae,ve){var Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,V,J,ae,ve)},g.prototype.emplace=function(V,J,ae,ve,Ge){var yt=V*4;return this.float32[yt+0]=J,this.float32[yt+1]=ae,this.float32[yt+2]=ve,this.float32[yt+3]=Ge,V},g}(Ps);Rf.prototype.bytesPerElement=16,X("StructArrayLayout4f16",Rf);var Cc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},P.x1.get=function(){return this._structArray.int16[this._pos2+2]},P.y1.get=function(){return this._structArray.int16[this._pos2+3]},P.x2.get=function(){return this._structArray.int16[this._pos2+4]},P.y2.get=function(){return this._structArray.int16[this._pos2+5]},P.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},P.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},P.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},P.anchorPoint.get=function(){return new l(this.anchorPointX,this.anchorPointY)},Object.defineProperties(g.prototype,P),g}(Hs);Cc.prototype.size=20;var rf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Cc(this,V)},g}(ql);X("CollisionBoxArray",rf);var Lc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},P.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},P.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},P.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},P.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},P.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},P.segment.get=function(){return this._structArray.uint16[this._pos2+10]},P.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},P.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},P.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},P.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},P.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},P.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},P.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},P.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},P.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},P.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},P.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},P.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(g.prototype,P),g}(Hs);Lc.prototype.size=48;var wf=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Lc(this,V)},g}(lu);X("PlacedSymbolArray",wf);var pc=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={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 P.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},P.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},P.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},P.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},P.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},P.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},P.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},P.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},P.key.get=function(){return this._structArray.uint16[this._pos2+8]},P.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},P.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},P.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},P.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},P.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},P.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},P.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},P.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},P.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},P.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},P.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},P.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},P.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},P.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},P.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},P.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},P.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},P.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},P.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},P.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(g.prototype,P),g}(Hs);pc.prototype.size=68;var vc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new pc(this,V)},g}(bu);X("SymbolInstanceArray",vc);var qc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getoffsetX=function(V){return this.float32[V*1+0]},g}(al);X("GlyphOffsetArray",qc);var If=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.getx=function(V){return this.int16[V*3+0]},g.prototype.gety=function(V){return this.int16[V*3+1]},g.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},g}(jl);X("SymbolLineVertexArray",If);var Ac=function(m){function g(){m.apply(this,arguments)}m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g;var P={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return P.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},P.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},P.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(g.prototype,P),g}(Hs);Ac.prototype.size=8;var zc=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.get=function(V){return new Ac(this,V)},g}(mu);X("FeatureIndexArray",zc);var Vu=qs([{name:"a_pos",components:2,type:"Int16"}],4),Bc=Vu.members,Ou=function(g){g===void 0&&(g=[]),this.segments=g};Ou.prototype.prepareSegment=function(g,P,V,J){var ae=this.segments[this.segments.length-1];return g>Ou.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+Ou.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+g),(!ae||ae.vertexLength+g>Ou.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==J)&&(ae={vertexOffset:P.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},J!==void 0&&(ae.sortKey=J),this.segments.push(ae)),ae},Ou.prototype.get=function(){return this.segments},Ou.prototype.destroy=function(){for(var g=0,P=this.segments;g>>16)*yt&65535)<<16)&4294967295,Ut=Ut<<15|Ut>>>17,Ut=(Ut&65535)*kt+(((Ut>>>16)*kt&65535)<<16)&4294967295,ve^=Ut,ve=ve<<13|ve>>>19,Ge=(ve&65535)*5+(((ve>>>16)*5&65535)<<16)&4294967295,ve=(Ge&65535)+27492+(((Ge>>>16)+58964&65535)<<16);switch(Ut=0,J){case 3:Ut^=(P.charCodeAt(lr+2)&255)<<16;case 2:Ut^=(P.charCodeAt(lr+1)&255)<<8;case 1:Ut^=P.charCodeAt(lr)&255,Ut=(Ut&65535)*yt+(((Ut>>>16)*yt&65535)<<16)&4294967295,Ut=Ut<<15|Ut>>>17,Ut=(Ut&65535)*kt+(((Ut>>>16)*kt&65535)<<16)&4294967295,ve^=Ut}return ve^=P.length,ve^=ve>>>16,ve=(ve&65535)*2246822507+(((ve>>>16)*2246822507&65535)<<16)&4294967295,ve^=ve>>>13,ve=(ve&65535)*3266489909+(((ve>>>16)*3266489909&65535)<<16)&4294967295,ve^=ve>>>16,ve>>>0}m.exports=g}),N=a(function(m){function g(P,V){for(var J=P.length,ae=V^J,ve=0,Ge;J>=4;)Ge=P.charCodeAt(ve)&255|(P.charCodeAt(++ve)&255)<<8|(P.charCodeAt(++ve)&255)<<16|(P.charCodeAt(++ve)&255)<<24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),Ge^=Ge>>>24,Ge=(Ge&65535)*1540483477+(((Ge>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Ge,J-=4,++ve;switch(J){case 3:ae^=(P.charCodeAt(ve+2)&255)<<16;case 2:ae^=(P.charCodeAt(ve+1)&255)<<8;case 1:ae^=P.charCodeAt(ve)&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=g}),$=K,we=K,ge=N;$.murmur3=we,$.murmur2=ge;var Ue=function(){this.ids=[],this.positions=[],this.indexed=!1};Ue.prototype.add=function(g,P,V,J){this.ids.push(Rt(g)),this.positions.push(P,V,J)},Ue.prototype.getPositions=function(g){for(var P=Rt(g),V=0,J=this.ids.length-1;V>1;this.ids[ae]>=P?J=ae:V=ae+1}for(var ve=[];this.ids[V]===P;){var Ge=this.positions[3*V],yt=this.positions[3*V+1],kt=this.positions[3*V+2];ve.push({index:Ge,start:yt,end:kt}),V++}return ve},Ue.serialize=function(g,P){var V=new Float64Array(g.ids),J=new Uint32Array(g.positions);return ur(V,J,0,V.length-1),P&&P.push(V.buffer,J.buffer),{ids:V,positions:J}},Ue.deserialize=function(g){var P=new Ue;return P.ids=g.ids,P.positions=g.positions,P.indexed=!0,P};var dt=Math.pow(2,53)-1;function Rt(m){var g=+m;return!isNaN(g)&&g<=dt?g:$(String(m))}function ur(m,g,P,V){for(;P>1],ae=P-1,ve=V+1;;){do ae++;while(m[ae]J);if(ae>=ve)break;gr(m,ae,ve),gr(g,3*ae,3*ve),gr(g,3*ae+1,3*ve+1),gr(g,3*ae+2,3*ve+2)}ve-Pve.x+1||ytve.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return P}function Mu(m,g){return{type:m.type,id:m.id,properties:m.properties,geometry:g?Ml(m):[]}}function Au(m,g,P,V,J){m.emplaceBack(g*2+(V+1)/2,P*2+(J+1)/2)}var $u=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.layoutVertexArray=new La,this.indexArray=new zl,this.segments=new Ou,this.programConfigurations=new ra(g.layers,g.zoom),this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};$u.prototype.populate=function(g,P,V){var J=this.layers[0],ae=[],ve=null;J.type==="circle"&&(ve=J.layout.get("circle-sort-key"));for(var Ge=0,yt=g;Ge=eo||kr<0||kr>=eo)){var xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,g.sortKey),ei=xr.vertexLength;Au(this.layoutVertexArray,lr,kr,-1,-1),Au(this.layoutVertexArray,lr,kr,1,-1),Au(this.layoutVertexArray,lr,kr,1,1),Au(this.layoutVertexArray,lr,kr,-1,1),this.indexArray.emplaceBack(ei,ei+1,ei+2),this.indexArray.emplaceBack(ei,ei+3,ei+2),xr.vertexLength+=4,xr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,g,V,{},J)},X("CircleBucket",$u,{omit:["layers"]});function du(m,g){for(var P=0;P=3){for(var ae=0;ae1){if(Td(m,g))return!0;for(var V=0;V1?m.distSqr(P):m.distSqr(P.sub(g)._mult(J)._add(g))}function pv(m,g){for(var P=!1,V,J,ae,ve=0;veg.y!=ae.y>g.y&&g.x<(ae.x-J.x)*(g.y-J.y)/(ae.y-J.y)+J.x&&(P=!P)}return P}function Sd(m,g){for(var P=!1,V=0,J=m.length-1;Vg.y!=ve.y>g.y&&g.x<(ve.x-ae.x)*(g.y-ae.y)/(ve.y-ae.y)+ae.x&&(P=!P)}return P}function vv(m,g,P,V,J){for(var ae=0,ve=m;ae=Ge.x&&J>=Ge.y)return!0}var yt=[new l(g,P),new l(g,J),new l(V,J),new l(V,P)];if(m.length>2)for(var kt=0,Ut=yt;ktJ.x&&g.x>J.x||m.yJ.y&&g.y>J.y)return!1;var ae=ne(m,g,P[0]);return ae!==ne(m,g,P[1])||ae!==ne(m,g,P[2])||ae!==ne(m,g,P[3])}function Md(m,g,P){var V=g.paint.get(m).value;return V.kind==="constant"?V.value:P.programConfigurations.get(g.id).getMaxValue(m)}function kp(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Kp(m,g,P,V,J){if(!g[0]&&!g[1])return m;var ae=l.convert(g)._mult(J);P==="viewport"&&ae._rotate(-V);for(var ve=[],Ge=0;Ge0&&(ae=1/Math.sqrt(ae)),m[0]=g[0]*ae,m[1]=g[1]*ae,m[2]=g[2]*ae,m}function N8(m,g){return m[0]*g[0]+m[1]*g[1]+m[2]*g[2]}function U8(m,g,P){var V=g[0],J=g[1],ae=g[2],ve=P[0],Ge=P[1],yt=P[2];return m[0]=J*yt-ae*Ge,m[1]=ae*ve-V*yt,m[2]=V*Ge-J*ve,m}function V8(m,g,P){var V=g[0],J=g[1],ae=g[2];return m[0]=V*P[0]+J*P[3]+ae*P[6],m[1]=V*P[1]+J*P[4]+ae*P[7],m[2]=V*P[2]+J*P[5]+ae*P[8],m}var H8=om,EQ=function(){var m=am();return function(g,P,V,J,ae,ve){var Ge,yt;for(P||(P=3),V||(V=0),J?yt=Math.min(J*P+V,g.length):yt=g.length,Ge=V;Gem.width||J.height>m.height||P.x>m.width-J.width||P.y>m.height-J.height)throw new RangeError("out of range source coordinates for image copy");if(J.width>g.width||J.height>g.height||V.x>g.width-J.width||V.y>g.height-J.height)throw new RangeError("out of range destination coordinates for image copy");for(var ve=m.data,Ge=g.data,yt=0;yt80*P){Ge=kt=m[0],yt=Ut=m[1];for(var ei=P;eikt&&(kt=lr),kr>Ut&&(Ut=kr);xr=Math.max(kt-Ge,Ut-yt),xr=xr!==0?1/xr:0}return Gx(ae,ve,P,Ge,yt,xr),ve}function Pw(m,g,P,V,J){var ae,ve;if(J===fM(m,g,P,V)>0)for(ae=g;ae=g;ae-=V)ve=gC(ae,m[ae],m[ae+1],ve);return ve&&jx(ve,ve.next)&&(Yx(ve),ve=ve.next),ve}function sm(m,g){if(!m)return m;g||(g=m);var P=m,V;do if(V=!1,!P.steiner&&(jx(P,P.next)||Yc(P.prev,P,P.next)===0)){if(Yx(P),P=g=P.prev,P===P.next)break;V=!0}else P=P.next;while(V||P!==g);return g}function Gx(m,g,P,V,J,ae,ve){if(m){!ve&&ae&&Iw(m,V,J,ae);for(var Ge=m,yt,kt;m.prev!==m.next;){if(yt=m.prev,kt=m.next,ae?vC(m,V,J,ae):pC(m)){g.push(yt.i/P),g.push(m.i/P),g.push(kt.i/P),Yx(m),m=kt.next,Ge=kt.next;continue}if(m=kt,m===Ge){ve?ve===1?(m=Wx(sm(m),g,P),Gx(m,g,P,V,J,ae,2)):ve===2&&p0(m,g,P,V,J,ae):Gx(sm(m),g,P,V,J,ae,1);break}}}}function pC(m){var g=m.prev,P=m,V=m.next;if(Yc(g,P,V)>=0)return!1;for(var J=m.next.next;J!==m.prev;){if(um(g.x,g.y,P.x,P.y,V.x,V.y,J.x,J.y)&&Yc(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function vC(m,g,P,V){var J=m.prev,ae=m,ve=m.next;if(Yc(J,ae,ve)>=0)return!1;for(var Ge=J.xae.x?J.x>ve.x?J.x:ve.x:ae.x>ve.x?ae.x:ve.x,Ut=J.y>ae.y?J.y>ve.y?J.y:ve.y:ae.y>ve.y?ae.y:ve.y,lr=oM(Ge,yt,g,P,V),kr=oM(kt,Ut,g,P,V),xr=m.prevZ,ei=m.nextZ;xr&&xr.z>=lr&&ei&&ei.z<=kr;){if(xr!==m.prev&&xr!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,xr.x,xr.y)&&Yc(xr.prev,xr,xr.next)>=0||(xr=xr.prevZ,ei!==m.prev&&ei!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,ei.x,ei.y)&&Yc(ei.prev,ei,ei.next)>=0))return!1;ei=ei.nextZ}for(;xr&&xr.z>=lr;){if(xr!==m.prev&&xr!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,xr.x,xr.y)&&Yc(xr.prev,xr,xr.next)>=0)return!1;xr=xr.prevZ}for(;ei&&ei.z<=kr;){if(ei!==m.prev&&ei!==m.next&&um(J.x,J.y,ae.x,ae.y,ve.x,ve.y,ei.x,ei.y)&&Yc(ei.prev,ei,ei.next)>=0)return!1;ei=ei.nextZ}return!0}function Wx(m,g,P){var V=m;do{var J=V.prev,ae=V.next.next;!jx(J,ae)&&Dw(J,V,V.next,ae)&&Xx(J,ae)&&Xx(ae,J)&&(g.push(J.i/P),g.push(V.i/P),g.push(ae.i/P),Yx(V),Yx(V.next),V=m=ae),V=V.next}while(V!==m);return sm(V)}function p0(m,g,P,V,J,ae){var ve=m;do{for(var Ge=ve.next.next;Ge!==ve.prev;){if(ve.i!==Ge.i&&E1(ve,Ge)){var yt=lM(ve,Ge);ve=sm(ve,ve.next),yt=sm(yt,yt.next),Gx(ve,g,P,V,J,ae),Gx(yt,g,P,V,J,ae);return}Ge=Ge.next}ve=ve.next}while(ve!==m)}function lm(m,g,P,V){var J=[],ae,ve,Ge,yt,kt;for(ae=0,ve=g.length;ae=P.next.y&&P.next.y!==P.y){var Ge=P.x+(J-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(Ge<=V&&Ge>ae){if(ae=Ge,Ge===V){if(J===P.y)return P;if(J===P.next.y)return P.next}ve=P.x=P.x&&P.x>=kt&&V!==P.x&&um(Jve.x||P.x===ve.x&&$8(ve,P)))&&(ve=P,lr=kr)),P=P.next;while(P!==yt);return ve}function $8(m,g){return Yc(m.prev,m,g.prev)<0&&Yc(g.next,m,m.next)<0}function Iw(m,g,P,V){var J=m;do J.z===null&&(J.z=oM(J.x,J.y,g,P,V)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next;while(J!==m);J.prevZ.nextZ=null,J.prevZ=null,aM(J)}function aM(m){var g,P,V,J,ae,ve,Ge,yt,kt=1;do{for(P=m,m=null,ae=null,ve=0;P;){for(ve++,V=P,Ge=0,g=0;g0||yt>0&&V;)Ge!==0&&(yt===0||!V||P.z<=V.z)?(J=P,P=P.nextZ,Ge--):(J=V,V=V.nextZ,yt--),ae?ae.nextZ=J:m=J,J.prevZ=ae,ae=J;P=V}ae.nextZ=null,kt*=2}while(ve>1);return m}function oM(m,g,P,V,J){return m=32767*(m-P)*J,g=32767*(g-V)*J,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,m|g<<1}function sM(m){var g=m,P=m;do(g.x=0&&(m-ve)*(V-Ge)-(P-ve)*(g-Ge)>=0&&(P-ve)*(ae-Ge)-(J-ve)*(V-Ge)>=0}function E1(m,g){return m.next.i!==g.i&&m.prev.i!==g.i&&!mC(m,g)&&(Xx(m,g)&&Xx(g,m)&&Q8(m,g)&&(Yc(m.prev,m,g.prev)||Yc(m,g.prev,g))||jx(m,g)&&Yc(m.prev,m,m.next)>0&&Yc(g.prev,g,g.next)>0)}function Yc(m,g,P){return(g.y-m.y)*(P.x-g.x)-(g.x-m.x)*(P.y-g.y)}function jx(m,g){return m.x===g.x&&m.y===g.y}function Dw(m,g,P,V){var J=ug(Yc(m,g,P)),ae=ug(Yc(m,g,V)),ve=ug(Yc(P,V,m)),Ge=ug(Yc(P,V,g));return!!(J!==ae&&ve!==Ge||J===0&&Zx(m,P,g)||ae===0&&Zx(m,V,g)||ve===0&&Zx(P,m,V)||Ge===0&&Zx(P,g,V))}function Zx(m,g,P){return g.x<=Math.max(m.x,P.x)&&g.x>=Math.min(m.x,P.x)&&g.y<=Math.max(m.y,P.y)&&g.y>=Math.min(m.y,P.y)}function ug(m){return m>0?1:m<0?-1:0}function mC(m,g){var P=m;do{if(P.i!==m.i&&P.next.i!==m.i&&P.i!==g.i&&P.next.i!==g.i&&Dw(P,P.next,m,g))return!0;P=P.next}while(P!==m);return!1}function Xx(m,g){return Yc(m.prev,m,m.next)<0?Yc(m,g,m.next)>=0&&Yc(m,m.prev,g)>=0:Yc(m,g,m.prev)<0||Yc(m,m.next,g)<0}function Q8(m,g){var P=m,V=!1,J=(m.x+g.x)/2,ae=(m.y+g.y)/2;do P.y>ae!=P.next.y>ae&&P.next.y!==P.y&&J<(P.next.x-P.x)*(ae-P.y)/(P.next.y-P.y)+P.x&&(V=!V),P=P.next;while(P!==m);return V}function lM(m,g){var P=new uM(m.i,m.x,m.y),V=new uM(g.i,g.x,g.y),J=m.next,ae=g.prev;return m.next=g,g.prev=m,P.next=J,J.prev=P,V.next=P,P.prev=V,ae.next=V,V.prev=ae,V}function gC(m,g,P,V){var J=new uM(m,g,P);return V?(J.next=V.next,J.prev=V,V.next.prev=J,V.next=J):(J.prev=J,J.next=J),J}function Yx(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 uM(m,g,P){this.i=m,this.x=g,this.y=P,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}M1.deviation=function(m,g,P,V){var J=g&&g.length,ae=J?g[0]*P:m.length,ve=Math.abs(fM(m,0,ae,P));if(J)for(var Ge=0,yt=g.length;Ge0&&(V+=m[J-1].length,P.holes.push(V))}return P},zw.default=dC;function cM(m,g,P,V,J){dy(m,g,P||0,V||m.length-1,J||_C)}function dy(m,g,P,V,J){for(;V>P;){if(V-P>600){var ae=V-P+1,ve=g-P+1,Ge=Math.log(ae),yt=.5*Math.exp(2*Ge/3),kt=.5*Math.sqrt(Ge*yt*(ae-yt)/ae)*(ve-ae/2<0?-1:1),Ut=Math.max(P,Math.floor(g-ve*yt/ae+kt)),lr=Math.min(V,Math.floor(g+(ae-ve)*yt/ae+kt));dy(m,g,Ut,lr,J)}var kr=m[g],xr=P,ei=V;for(k1(m,P,g),J(m[V],kr)>0&&k1(m,P,V);xr0;)ei--}J(m[P],kr)===0?k1(m,P,ei):(ei++,k1(m,ei,V)),ei<=g&&(P=ei+1),g<=ei&&(V=ei-1)}}function k1(m,g,P){var V=m[g];m[g]=m[P],m[P]=V}function _C(m,g){return mg?1:0}function Rw(m,g){var P=m.length;if(P<=1)return[m];for(var V=[],J,ae,ve=0;ve1)for(var yt=0;yt>3}if(V--,P===1||P===2)J+=m.readSVarint(),ae+=m.readSVarint(),P===1&&(Ge&&ve.push(Ge),Ge=[]),Ge.push(new l(J,ae));else if(P===7)Ge&&Ge.push(Ge[0].clone());else throw new Error("unknown command "+P)}return Ge&&ve.push(Ge),ve},fg.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var g=m.readVarint()+m.pos,P=1,V=0,J=0,ae=0,ve=1/0,Ge=-1/0,yt=1/0,kt=-1/0;m.pos>3}if(V--,P===1||P===2)J+=m.readSVarint(),ae+=m.readSVarint(),JGe&&(Ge=J),aekt&&(kt=ae);else if(P!==7)throw new Error("unknown command "+P)}return[ve,yt,Ge,kt]},fg.prototype.toGeoJSON=function(m,g,P){var V=this.extent*Math.pow(2,P),J=this.extent*m,ae=this.extent*g,ve=this.loadGeometry(),Ge=fg.types[this.type],yt,kt;function Ut(xr){for(var ei=0;ei>3;g=V===1?m.readString():V===2?m.readFloat():V===3?m.readDouble():V===4?m.readVarint64():V===5?m.readVarint():V===6?m.readSVarint():V===7?m.readBoolean():null}return g}pM.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 g=this._pbf.readVarint()+this._pbf.pos;return new dM(this._pbf,g,this.extent,this._keys,this._values)};var CC=tB;function tB(m,g){this.layers=m.readFields(rB,{},g)}function rB(m,g,P){if(m===3){var V=new py(P,P.readVarint()+P.pos);V.length&&(g[V.name]=V)}}var LC=CC,C1=dM,zC=py,vy={VectorTile:LC,VectorTileFeature:C1,VectorTileLayer:zC},PC=vy.VectorTileFeature.types,qw=500,L1=Math.pow(2,13);function fm(m,g,P,V,J,ae,ve,Ge){m.emplaceBack(g,P,Math.floor(V*L1)*2+ve,J*L1*2,ae*L1*2,Math.round(Ge))}var Hv=function(g){this.zoom=g.zoom,this.overscaling=g.overscaling,this.layers=g.layers,this.layerIds=this.layers.map(function(P){return P.id}),this.index=g.index,this.hasPattern=!1,this.layoutVertexArray=new Ws,this.indexArray=new zl,this.programConfigurations=new ra(g.layers,g.zoom),this.segments=new Ou,this.stateDependentLayerIds=this.layers.filter(function(P){return P.isStateDependent()}).map(function(P){return P.id})};Hv.prototype.populate=function(g,P,V){this.features=[],this.hasPattern=Fw("fill-extrusion",this.layers,P);for(var J=0,ae=g;J=1){var Ra=_n[Fa-1];if(!iB(On,Ra)){xr.vertexLength+4>Ou.MAX_VERTEX_ARRAY_LENGTH&&(xr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var so=On.sub(Ra)._perp()._unit(),As=Ra.dist(On);rn+As>32768&&(rn=0),fm(this.layoutVertexArray,On.x,On.y,so.x,so.y,0,0,rn),fm(this.layoutVertexArray,On.x,On.y,so.x,so.y,0,1,rn),rn+=As,fm(this.layoutVertexArray,Ra.x,Ra.y,so.x,so.y,0,0,rn),fm(this.layoutVertexArray,Ra.x,Ra.y,so.x,so.y,0,1,rn);var dl=xr.vertexLength;this.indexArray.emplaceBack(dl,dl+2,dl+1),this.indexArray.emplaceBack(dl+1,dl+2,dl+3),xr.vertexLength+=4,xr.primitiveLength+=2}}}}if(xr.vertexLength+kt>Ou.MAX_VERTEX_ARRAY_LENGTH&&(xr=this.segments.prepareSegment(kt,this.layoutVertexArray,this.indexArray)),PC[g.type]==="Polygon"){for(var fl=[],eu=[],Ol=xr.vertexLength,Xl=0,Cu=yt;Xleo)||m.y===g.y&&(m.y<0||m.y>eo)}function nB(m){return m.every(function(g){return g.x<0})||m.every(function(g){return g.x>eo})||m.every(function(g){return g.y<0})||m.every(function(g){return g.y>eo})}var z1=new fa({"fill-extrusion-opacity":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new _i(Ri["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new jr(Ri["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Gt(Ri["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:z1},cm=function(m){function g(P){m.call(this,P,ld)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.createBucket=function(V){return new Hv(V)},g.prototype.queryRadius=function(){return kp(this.paint.get("fill-extrusion-translate"))},g.prototype.is3D=function(){return!0},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt,Ut){var lr=Kp(V,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),yt.angle,kt),kr=this.paint.get("fill-extrusion-height").evaluate(J,ae),xr=this.paint.get("fill-extrusion-base").evaluate(J,ae),ei=aB(lr,Ut,yt,0),Li=yM(ve,xr,kr,Ut),_n=Li[0],rn=Li[1];return IC(_n,rn,ei)},g}(Io);function cg(m,g){return m.x*g.x+m.y*g.y}function vM(m,g){if(m.length===1){for(var P=0,V=g[P++],J;!J||V.equals(J);)if(J=g[P++],!J)return 1/0;for(;P=2&&g[kt-1].equals(g[kt-2]);)kt--;for(var Ut=0;Ut0;if(fl&&Fa>Ut){var Ol=xr.dist(ei);if(Ol>2*lr){var Xl=xr.sub(xr.sub(ei)._mult(lr/Ol)._round());this.updateDistance(ei,Xl),this.addCurrentVertex(Xl,_n,0,0,kr),ei=Xl}}var Cu=ei&&Li,tu=Cu?V:yt?"butt":J;if(Cu&&tu==="round"&&(Asae&&(tu="bevel"),tu==="bevel"&&(As>2&&(tu="flipbevel"),As100)On=rn.mult(-1);else{var ou=As*_n.add(rn).mag()/_n.sub(rn).mag();On._perp()._mult(ou*(eu?-1:1))}this.addCurrentVertex(xr,On,0,0,kr),this.addCurrentVertex(xr,On.mult(-1),0,0,kr)}else if(tu==="bevel"||tu==="fakeround"){var Qu=-Math.sqrt(As*As-1),Eu=eu?Qu:0,Tf=eu?0:Qu;if(ei&&this.addCurrentVertex(xr,_n,Eu,Tf,kr),tu==="fakeround")for(var $f=Math.round(dl*180/Math.PI/gM),Af=1;Af<$f;Af++){var Sf=Af/$f;if(Sf!==.5){var bf=Sf-.5,lc=1.0904+Ra*(-3.2452+Ra*(3.55645-Ra*1.43519)),gc=.848013+Ra*(-1.06021+Ra*.215638);Sf=Sf+Sf*bf*(Sf-1)*(lc*bf*bf+gc)}var Jc=rn.sub(_n)._mult(Sf)._add(_n)._unit()._mult(eu?-1:1);this.addHalfVertex(xr,Jc.x,Jc.y,!1,eu,0,kr)}Li&&this.addCurrentVertex(xr,rn,-Eu,-Tf,kr)}else if(tu==="butt")this.addCurrentVertex(xr,On,0,0,kr);else if(tu==="square"){var ih=ei?1:-1;this.addCurrentVertex(xr,On,ih,ih,kr)}else tu==="round"&&(ei&&(this.addCurrentVertex(xr,_n,0,0,kr),this.addCurrentVertex(xr,_n,1,1,kr,!0)),Li&&(this.addCurrentVertex(xr,rn,-1,-1,kr,!0),this.addCurrentVertex(xr,rn,0,0,kr)));if(fl&&Fa2*lr){var _h=xr.add(Li.sub(xr)._mult(lr/Kh)._round());this.updateDistance(xr,_h),this.addCurrentVertex(_h,rn,0,0,kr),xr=_h}}}}},yh.prototype.addCurrentVertex=function(g,P,V,J,ae,ve){ve===void 0&&(ve=!1);var Ge=P.x+P.y*V,yt=P.y-P.x*V,kt=-P.x+P.y*J,Ut=-P.y-P.x*J;this.addHalfVertex(g,Ge,yt,ve,!1,V,ae),this.addHalfVertex(g,kt,Ut,ve,!0,-J,ae),this.distance>eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(g,P,V,J,ae,ve))},yh.prototype.addHalfVertex=function(g,P,V,J,ae,ve,Ge){var yt=g.x,kt=g.y,Ut=this.lineClips?this.scaledDistance*(eb-1):this.scaledDistance,lr=Ut*Ow;if(this.layoutVertexArray.emplaceBack((yt<<1)+(J?1:0),(kt<<1)+(ae?1:0),Math.round(Bw*P)+128,Math.round(Bw*V)+128,(ve===0?0:ve<0?-1:1)+1|(lr&63)<<2,lr>>6),this.lineClips){var kr=this.scaledDistance-this.lineClips.start,xr=this.lineClips.end-this.lineClips.start,ei=kr/xr;this.layoutVertexArray2.emplaceBack(ei,this.lineClipsArray.length)}var Li=Ge.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Li),Ge.primitiveLength++),ae?this.e2=Li:this.e1=Li},yh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},yh.prototype.updateDistance=function(g,P){this.distance+=g.dist(P),this.updateScaledDistance()},X("LineBucket",yh,{omit:["layers","patternFeatures"]});var _M=new fa({"line-cap":new Gt(Ri.layout_line["line-cap"]),"line-join":new jr(Ri.layout_line["line-join"]),"line-miter-limit":new Gt(Ri.layout_line["line-miter-limit"]),"line-round-limit":new Gt(Ri.layout_line["line-round-limit"]),"line-sort-key":new jr(Ri.layout_line["line-sort-key"])}),xM=new fa({"line-opacity":new jr(Ri.paint_line["line-opacity"]),"line-color":new jr(Ri.paint_line["line-color"]),"line-translate":new Gt(Ri.paint_line["line-translate"]),"line-translate-anchor":new Gt(Ri.paint_line["line-translate-anchor"]),"line-width":new jr(Ri.paint_line["line-width"]),"line-gap-width":new jr(Ri.paint_line["line-gap-width"]),"line-offset":new jr(Ri.paint_line["line-offset"]),"line-blur":new jr(Ri.paint_line["line-blur"]),"line-dasharray":new Mn(Ri.paint_line["line-dasharray"]),"line-pattern":new _i(Ri.paint_line["line-pattern"]),"line-gradient":new Ta(Ri.paint_line["line-gradient"])}),Nw={paint:xM,layout:_M},sB=function(m){function g(){m.apply(this,arguments)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.possiblyEvaluate=function(V,J){return J=new qo(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),m.prototype.possiblyEvaluate.call(this,V,J)},g.prototype.evaluate=function(V,J,ae,ve){return J=_({},J,{zoom:Math.floor(J.zoom)}),m.prototype.evaluate.call(this,V,J,ae,ve)},g}(jr),I=new sB(Nw.paint.properties["line-width"].specification);I.useIntegerZoom=!0;var S=function(m){function g(P){m.call(this,P,Nw),this.gradientVersion=0}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V==="line-gradient"){var J=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=J._styleExpression.expression instanceof lo,this.gradientVersion=(this.gradientVersion+1)%d}},g.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},g.prototype.recalculate=function(V,J){m.prototype.recalculate.call(this,V,J),this.paint._values["line-floorwidth"]=I.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,V)},g.prototype.createBucket=function(V){return new yh(V)},g.prototype.queryRadius=function(V){var J=V,ae=D(Md("line-width",this,J),Md("line-gap-width",this,J)),ve=Md("line-offset",this,J);return ae/2+Math.abs(ve)+kp(this.paint.get("line-translate"))},g.prototype.queryIntersectsFeature=function(V,J,ae,ve,Ge,yt,kt){var Ut=Kp(V,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),yt.angle,kt),lr=kt/2*D(this.paint.get("line-width").evaluate(J,ae),this.paint.get("line-gap-width").evaluate(J,ae)),kr=this.paint.get("line-offset").evaluate(J,ae);return kr&&(ve=Z(ve,kr*kt)),Kf(Ut,ve,lr)},g.prototype.isTileClipped=function(){return!0},g}(Io);function D(m,g){return g>0?g+2*m:m}function Z(m,g){for(var P=[],V=new l(0,0),J=0;J":"\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 jn(m){for(var g="",P=0;P>1,Ut=-7,lr=P?J-1:0,kr=P?-1:1,xr=m[g+lr];for(lr+=kr,ae=xr&(1<<-Ut)-1,xr>>=-Ut,Ut+=Ge;Ut>0;ae=ae*256+m[g+lr],lr+=kr,Ut-=8);for(ve=ae&(1<<-Ut)-1,ae>>=-Ut,Ut+=V;Ut>0;ve=ve*256+m[g+lr],lr+=kr,Ut-=8);if(ae===0)ae=1-kt;else{if(ae===yt)return ve?NaN:(xr?-1:1)*(1/0);ve=ve+Math.pow(2,V),ae=ae-kt}return(xr?-1:1)*ve*Math.pow(2,ae-V)},iu=function(m,g,P,V,J,ae){var ve,Ge,yt,kt=ae*8-J-1,Ut=(1<>1,kr=J===23?Math.pow(2,-24)-Math.pow(2,-77):0,xr=V?0:ae-1,ei=V?1:-1,Li=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(Ge=isNaN(g)?1:0,ve=Ut):(ve=Math.floor(Math.log(g)/Math.LN2),g*(yt=Math.pow(2,-ve))<1&&(ve--,yt*=2),ve+lr>=1?g+=kr/yt:g+=kr*Math.pow(2,1-lr),g*yt>=2&&(ve++,yt/=2),ve+lr>=Ut?(Ge=0,ve=Ut):ve+lr>=1?(Ge=(g*yt-1)*Math.pow(2,J),ve=ve+lr):(Ge=g*Math.pow(2,lr-1)*Math.pow(2,J),ve=0));J>=8;m[P+xr]=Ge&255,xr+=ei,Ge/=256,J-=8);for(ve=ve<0;m[P+xr]=ve&255,xr+=ei,ve/=256,kt-=8);m[P+xr-ei]|=Li*128},Su={read:hl,write:iu},Zl=Qs;function Qs(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Qs.Varint=0,Qs.Fixed64=1,Qs.Bytes=2,Qs.Fixed32=5;var gu=65536*65536,cu=1/gu,uu=12,Ts=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Qs.prototype={destroy:function(){this.buf=null},readFields:function(m,g,P){for(P=P||this.length;this.pos>3,ae=this.pos;this.type=V&7,m(J,g,this),this.pos===ae&&this.skip(V)}return g},readMessage:function(m,g){return this.readFields(m,g,this.readVarint()+this.pos)},readFixed32:function(){var m=Zh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Pp(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Zh(this.buf,this.pos)+Zh(this.buf,this.pos+4)*gu;return this.pos+=8,m},readSFixed64:function(){var m=Zh(this.buf,this.pos)+Pp(this.buf,this.pos+4)*gu;return this.pos+=8,m},readFloat:function(){var m=Su.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Su.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var g=this.buf,P,V;return V=g[this.pos++],P=V&127,V<128||(V=g[this.pos++],P|=(V&127)<<7,V<128)||(V=g[this.pos++],P|=(V&127)<<14,V<128)||(V=g[this.pos++],P|=(V&127)<<21,V<128)?P:(V=g[this.pos],P|=(V&15)<<28,wu(P,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,g=this.pos;return this.pos=m,m-g>=uu&&Ts?qf(this.buf,g,m):fp(this.buf,g,m)},readBytes:function(){var m=this.readVarint()+this.pos,g=this.buf.subarray(this.pos,m);return this.pos=m,g},readPackedVarint:function(m,g){if(this.type!==Qs.Bytes)return m.push(this.readVarint(g));var P=fu(this);for(m=m||[];this.pos127;);else if(g===Qs.Bytes)this.pos=this.readVarint()+this.pos;else if(g===Qs.Fixed32)this.pos+=4;else if(g===Qs.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+g)},writeTag:function(m,g){this.writeVarint(m<<3|g)},realloc:function(m){for(var g=this.length||16;g268435455||m<0){oc(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 g=this.pos;this.pos=mc(this.buf,m,this.pos);var P=this.pos-g;P>=128&&$p(g,P,this),this.pos=g-1,this.writeVarint(P),this.pos+=P},writeFloat:function(m){this.realloc(4),Su.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Su.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var g=m.length;this.writeVarint(g),this.realloc(g);for(var P=0;P=128&&$p(P,V,this),this.pos=P-1,this.writeVarint(V),this.pos+=V},writeMessage:function(m,g,P){this.writeTag(m,Qs.Bytes),this.writeRawMessage(g,P)},writePackedVarint:function(m,g){g.length&&this.writeMessage(m,ud,g)},writePackedSVarint:function(m,g){g.length&&this.writeMessage(m,Lh,g)},writePackedBoolean:function(m,g){g.length&&this.writeMessage(m,Zd,g)},writePackedFloat:function(m,g){g.length&&this.writeMessage(m,Wd,g)},writePackedDouble:function(m,g){g.length&&this.writeMessage(m,jd,g)},writePackedFixed32:function(m,g){g.length&&this.writeMessage(m,Kc,g)},writePackedSFixed32:function(m,g){g.length&&this.writeMessage(m,zh,g)},writePackedFixed64:function(m,g){g.length&&this.writeMessage(m,Cd,g)},writePackedSFixed64:function(m,g){g.length&&this.writeMessage(m,fd,g)},writeBytesField:function(m,g){this.writeTag(m,Qs.Bytes),this.writeBytes(g)},writeFixed32Field:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeFixed32(g)},writeSFixed32Field:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeSFixed32(g)},writeFixed64Field:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeFixed64(g)},writeSFixed64Field:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeSFixed64(g)},writeVarintField:function(m,g){this.writeTag(m,Qs.Varint),this.writeVarint(g)},writeSVarintField:function(m,g){this.writeTag(m,Qs.Varint),this.writeSVarint(g)},writeStringField:function(m,g){this.writeTag(m,Qs.Bytes),this.writeString(g)},writeFloatField:function(m,g){this.writeTag(m,Qs.Fixed32),this.writeFloat(g)},writeDoubleField:function(m,g){this.writeTag(m,Qs.Fixed64),this.writeDouble(g)},writeBooleanField:function(m,g){this.writeVarintField(m,!!g)}};function wu(m,g,P){var V=P.buf,J,ae;if(ae=V[P.pos++],J=(ae&112)>>4,ae<128||(ae=V[P.pos++],J|=(ae&127)<<3,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<10,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<17,ae<128)||(ae=V[P.pos++],J|=(ae&127)<<24,ae<128)||(ae=V[P.pos++],J|=(ae&1)<<31,ae<128))return Lu(m,J,g);throw new Error("Expected varint not more than 10 bytes")}function fu(m){return m.type===Qs.Bytes?m.readVarint()+m.pos:m.pos+1}function Lu(m,g,P){return P?g*4294967296+(m>>>0):(g>>>0)*4294967296+(m>>>0)}function oc(m,g){var P,V;if(m>=0?(P=m%4294967296|0,V=m/4294967296|0):(P=~(-m%4294967296),V=~(-m/4294967296),P^4294967295?P=P+1|0:(P=0,V=V+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");g.realloc(10),tc(P,V,g),Ch(V,g)}function tc(m,g,P){P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos++]=m&127|128,m>>>=7,P.buf[P.pos]=m&127}function Ch(m,g){var P=(m&7)<<4;g.buf[g.pos++]|=P|((m>>>=3)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127|((m>>>=7)?128:0),m&&(g.buf[g.pos++]=m&127)))))}function $p(m,g,P){var V=g<=16383?1:g<=2097151?2:g<=268435455?3:Math.floor(Math.log(g)/(Math.LN2*7));P.realloc(V);for(var J=P.pos-1;J>=m;J--)P.buf[J+V]=P.buf[J]}function ud(m,g){for(var P=0;P>>8,m[P+2]=g>>>16,m[P+3]=g>>>24}function Pp(m,g){return(m[g]|m[g+1]<<8|m[g+2]<<16)+(m[g+3]<<24)}function fp(m,g,P){for(var V="",J=g;J239?4:ae>223?3:ae>191?2:1;if(J+Ge>P)break;var yt,kt,Ut;Ge===1?ae<128&&(ve=ae):Ge===2?(yt=m[J+1],(yt&192)===128&&(ve=(ae&31)<<6|yt&63,ve<=127&&(ve=null))):Ge===3?(yt=m[J+1],kt=m[J+2],(yt&192)===128&&(kt&192)===128&&(ve=(ae&15)<<12|(yt&63)<<6|kt&63,(ve<=2047||ve>=55296&&ve<=57343)&&(ve=null))):Ge===4&&(yt=m[J+1],kt=m[J+2],Ut=m[J+3],(yt&192)===128&&(kt&192)===128&&(Ut&192)===128&&(ve=(ae&15)<<18|(yt&63)<<12|(kt&63)<<6|Ut&63,(ve<=65535||ve>=1114112)&&(ve=null))),ve===null?(ve=65533,Ge=1):ve>65535&&(ve-=65536,V+=String.fromCharCode(ve>>>10&1023|55296),ve=56320|ve&1023),V+=String.fromCharCode(ve),J+=Ge}return V}function qf(m,g,P){return Ts.decode(m.subarray(g,P))}function mc(m,g,P){for(var V=0,J,ae;V55295&&J<57344)if(ae)if(J<56320){m[P++]=239,m[P++]=191,m[P++]=189,ae=J;continue}else J=ae-55296<<10|J-56320|65536,ae=null;else{J>56319||V+1===g.length?(m[P++]=239,m[P++]=191,m[P++]=189):ae=J;continue}else ae&&(m[P++]=239,m[P++]=191,m[P++]=189,ae=null);J<128?m[P++]=J:(J<2048?m[P++]=J>>6|192:(J<65536?m[P++]=J>>12|224:(m[P++]=J>>18|240,m[P++]=J>>12&63|128),m[P++]=J>>6&63|128),m[P++]=J&63|128)}return P}var sc=3;function Ip(m,g,P){m===1&&P.readMessage(Hc,g)}function Hc(m,g,P){if(m===3){var V=P.readMessage(P1,{}),J=V.id,ae=V.bitmap,ve=V.width,Ge=V.height,yt=V.left,kt=V.top,Ut=V.advance;g.push({id:J,bitmap:new zp({width:ve+2*sc,height:Ge+2*sc},ae),metrics:{width:ve,height:Ge,left:yt,top:kt,advance:Ut}})}}function P1(m,g,P){m===1?g.id=P.readVarint():m===2?g.bitmap=P.readBytes():m===3?g.width=P.readVarint():m===4?g.height=P.readVarint():m===5?g.left=P.readSVarint():m===6?g.top=P.readSVarint():m===7&&(g.advance=P.readVarint())}function v0(m){return new Zl(m).readFields(Ip,[])}var Gv=sc;function Qp(m){for(var g=0,P=0,V=0,J=m;V=0;xr--){var ei=Ge[xr];if(!(kr.w>ei.w||kr.h>ei.h)){if(kr.x=ei.x,kr.y=ei.y,kt=Math.max(kt,kr.y+kr.h),yt=Math.max(yt,kr.x+kr.w),kr.w===ei.w&&kr.h===ei.h){var Li=Ge.pop();xr=0&&J>=g&&m0[this.text.charCodeAt(J)];J--)V--;this.text=this.text.substring(g,V),this.sectionIndex=this.sectionIndex.slice(g,V)},Xh.prototype.substring=function(g,P){var V=new Xh;return V.text=this.text.substring(g,P),V.sectionIndex=this.sectionIndex.slice(g,P),V.sections=this.sections,V},Xh.prototype.toString=function(){return this.text},Xh.prototype.getMaxScale=function(){var g=this;return this.sectionIndex.reduce(function(P,V){return Math.max(P,g.sections[V].scale)},0)},Xh.prototype.addTextSection=function(g,P){this.text+=g.text,this.sections.push(hg.forText(g.scale,g.fontStack||P));for(var V=this.sections.length-1,J=0;J=y0?null:++this.imageSectionID:(this.imageSectionID=Uw,this.imageSectionID)};function lB(m,g){for(var P=[],V=m.text,J=0,ae=0,ve=g;ae=0,Ut=0,lr=0;lr0&&_h>eu&&(eu=_h)}else{var Sf=P[Xl.fontStack],bf=Sf&&Sf[tu];if(bf&&bf.rect)Eu=bf.rect,Qu=bf.metrics;else{var lc=g[Xl.fontStack],gc=lc&&lc[tu];if(!gc)continue;Qu=gc.metrics}ou=(so-Xl.scale)*Va}Af?(m.verticalizable=!0,fl.push({glyph:tu,imageName:Tf,x:kr,y:xr+ou,vertical:Af,scale:Xl.scale,fontStack:Xl.fontStack,sectionIndex:Cu,metrics:Qu,rect:Eu}),kr+=$f*Xl.scale+kt):(fl.push({glyph:tu,imageName:Tf,x:kr,y:xr+ou,vertical:Af,scale:Xl.scale,fontStack:Xl.fontStack,sectionIndex:Cu,metrics:Qu,rect:Eu}),kr+=Qu.advance*Xl.scale+kt)}if(fl.length!==0){var Yd=kr-kt;ei=Math.max(Yd,ei),hB(fl,0,fl.length-1,_n,eu)}kr=0;var Kd=ae*so+eu;dl.lineOffset=Math.max(eu,As),xr+=Kd,Li=Math.max(Kd,Li),++rn}var Jh=xr-I1,dp=wM(ve),pp=dp.horizontalAlign,Ph=dp.verticalAlign;Ld(m.positionedLines,_n,pp,Ph,ei,Li,ae,Jh,J.length),m.top+=-Ph*Jh,m.bottom=m.top+Jh,m.left+=-pp*ei,m.right=m.left+ei}function hB(m,g,P,V,J){if(!(!V&&!J))for(var ae=m[P],ve=ae.metrics.advance*ae.scale,Ge=(m[P].x+ve)*V,yt=g;yt<=P;yt++)m[yt].x-=Ge,m[yt].y+=J}function Ld(m,g,P,V,J,ae,ve,Ge,yt){var kt=(g-P)*J,Ut=0;ae!==ve?Ut=-Ge*V-I1:Ut=(-V*yt+.5)*ve;for(var lr=0,kr=m;lr-P/2;){if(ve--,ve<0)return!1;Ge-=m[ve].dist(ae),ae=m[ve]}Ge+=m[ve].dist(m[ve+1]),ve++;for(var yt=[],kt=0;Ge

V;)kt-=yt.shift().angleDelta;if(kt>J)return!1;ve++,Ge+=lr.dist(kr)}return!0}function PQ(m){for(var g=0,P=0;Pkt){var ei=(kt-yt)/xr,Li=$a(lr.x,kr.x,ei),_n=$a(lr.y,kr.y,ei),rn=new Xd(Li,_n,kr.angleTo(lr),Ut);return rn._round(),!ve||zQ(m,rn,Ge,ve,g)?rn:void 0}yt+=xr}}function BQe(m,g,P,V,J,ae,ve,Ge,yt){var kt=IQ(V,ae,ve),Ut=DQ(V,J),lr=Ut*ve,kr=m[0].x===0||m[0].x===yt||m[0].y===0||m[0].y===yt;g-lr=0&&Ra=0&&so=0&&kr+kt<=Ut){var As=new Xd(Ra,so,Fa,ei);As._round(),(!V||zQ(m,As,ae,V,J))&&xr.push(As)}}lr+=rn}return!Ge&&!xr.length&&!ve&&(xr=RQ(m,lr/2,P,V,J,ae,ve,!0,yt)),xr}function FQ(m,g,P,V,J){for(var ae=[],ve=0;ve=V&&lr.x>=V)&&(Ut.x>=V?Ut=new l(V,Ut.y+(lr.y-Ut.y)*((V-Ut.x)/(lr.x-Ut.x)))._round():lr.x>=V&&(lr=new l(V,Ut.y+(lr.y-Ut.y)*((V-Ut.x)/(lr.x-Ut.x)))._round()),!(Ut.y>=J&&lr.y>=J)&&(Ut.y>=J?Ut=new l(Ut.x+(lr.x-Ut.x)*((J-Ut.y)/(lr.y-Ut.y)),J)._round():lr.y>=J&&(lr=new l(Ut.x+(lr.x-Ut.x)*((J-Ut.y)/(lr.y-Ut.y)),J)._round()),(!yt||!Ut.equals(yt[yt.length-1]))&&(yt=[Ut],ae.push(yt)),yt.push(lr)))))}return ae}var Gw=Pc;function qQ(m,g,P,V){var J=[],ae=m.image,ve=ae.pixelRatio,Ge=ae.paddedRect.w-2*Gw,yt=ae.paddedRect.h-2*Gw,kt=m.right-m.left,Ut=m.bottom-m.top,lr=ae.stretchX||[[0,Ge]],kr=ae.stretchY||[[0,yt]],xr=function(Sf,bf){return Sf+bf[1]-bf[0]},ei=lr.reduce(xr,0),Li=kr.reduce(xr,0),_n=Ge-ei,rn=yt-Li,Fa=0,On=ei,Ra=0,so=Li,As=0,dl=_n,fl=0,eu=rn;if(ae.content&&V){var Ol=ae.content;Fa=UC(lr,0,Ol[0]),Ra=UC(kr,0,Ol[1]),On=UC(lr,Ol[0],Ol[2]),so=UC(kr,Ol[1],Ol[3]),As=Ol[0]-Fa,fl=Ol[1]-Ra,dl=Ol[2]-Ol[0]-On,eu=Ol[3]-Ol[1]-so}var Xl=function(Sf,bf,lc,gc){var Jc=VC(Sf.stretch-Fa,On,kt,m.left),ih=HC(Sf.fixed-As,dl,Sf.stretch,ei),Kh=VC(bf.stretch-Ra,so,Ut,m.top),_h=HC(bf.fixed-fl,eu,bf.stretch,Li),Yd=VC(lc.stretch-Fa,On,kt,m.left),Kd=HC(lc.fixed-As,dl,lc.stretch,ei),Jh=VC(gc.stretch-Ra,so,Ut,m.top),dp=HC(gc.fixed-fl,eu,gc.stretch,Li),pp=new l(Jc,Kh),Ph=new l(Yd,Kh),vp=new l(Yd,Jh),_v=new l(Jc,Jh),vg=new l(ih/ve,_h/ve),F1=new l(Kd/ve,dp/ve),q1=g*Math.PI/180;if(q1){var B1=Math.sin(q1),$w=Math.cos(q1),g0=[$w,-B1,B1,$w];pp._matMult(g0),Ph._matMult(g0),_v._matMult(g0),vp._matMult(g0)}var YC=Sf.stretch+Sf.fixed,xB=lc.stretch+lc.fixed,KC=bf.stretch+bf.fixed,bB=gc.stretch+gc.fixed,Wv={x:ae.paddedRect.x+Gw+YC,y:ae.paddedRect.y+Gw+KC,w:xB-YC,h:bB-KC},Qw=dl/ve/kt,JC=eu/ve/Ut;return{tl:pp,tr:Ph,bl:_v,br:vp,tex:Wv,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:vg,pixelOffsetBR:F1,minFontScaleX:Qw,minFontScaleY:JC,isSDF:P}};if(!V||!ae.stretchX&&!ae.stretchY)J.push(Xl({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ge+1},{fixed:0,stretch:yt+1}));else for(var Cu=BQ(lr,_n,ei),tu=BQ(kr,rn,Li),ou=0;ou0&&(ei=Math.max(10,ei),this.circleDiameter=ei)}else{var Li=ve.top*Ge-yt,_n=ve.bottom*Ge+yt,rn=ve.left*Ge-yt,Fa=ve.right*Ge+yt,On=ve.collisionPadding;if(On&&(rn-=On[0]*Ge,Li-=On[1]*Ge,Fa+=On[2]*Ge,_n+=On[3]*Ge),Ut){var Ra=new l(rn,Li),so=new l(Fa,Li),As=new l(rn,_n),dl=new l(Fa,_n),fl=Ut*Math.PI/180;Ra._rotate(fl),so._rotate(fl),As._rotate(fl),dl._rotate(fl),rn=Math.min(Ra.x,so.x,As.x,dl.x),Fa=Math.max(Ra.x,so.x,As.x,dl.x),Li=Math.min(Ra.y,so.y,As.y,dl.y),_n=Math.max(Ra.y,so.y,As.y,dl.y)}g.emplaceBack(P.x,P.y,rn,Li,Fa,_n,V,J,ae)}this.boxEndIndex=g.length},Ww=function(g,P){if(g===void 0&&(g=[]),P===void 0&&(P=NQe),this.data=g,this.length=this.data.length,this.compare=P,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};Ww.prototype.push=function(g){this.data.push(g),this.length++,this._up(this.length-1)},Ww.prototype.pop=function(){if(this.length!==0){var g=this.data[0],P=this.data.pop();return this.length--,this.length>0&&(this.data[0]=P,this._down(0)),g}},Ww.prototype.peek=function(){return this.data[0]},Ww.prototype._up=function(g){for(var P=this,V=P.data,J=P.compare,ae=V[g];g>0;){var ve=g-1>>1,Ge=V[ve];if(J(ae,Ge)>=0)break;V[g]=Ge,g=ve}V[g]=ae},Ww.prototype._down=function(g){for(var P=this,V=P.data,J=P.compare,ae=this.length>>1,ve=V[g];g=0)break;V[g]=yt,g=Ge}V[g]=ve};function NQe(m,g){return mg?1:0}function UQe(m,g,P){g===void 0&&(g=1),P===void 0&&(P=!1);for(var V=1/0,J=1/0,ae=-1/0,ve=-1/0,Ge=m[0],yt=0;ytae)&&(ae=kt.x),(!yt||kt.y>ve)&&(ve=kt.y)}var Ut=ae-V,lr=ve-J,kr=Math.min(Ut,lr),xr=kr/2,ei=new Ww([],VQe);if(kr===0)return new l(V,J);for(var Li=V;Lirn.d||!rn.d)&&(rn=On,P&&console.log("found best %d after %d probes",Math.round(1e4*On.d)/1e4,Fa)),!(On.max-rn.d<=g)&&(xr=On.h/2,ei.push(new jw(On.p.x-xr,On.p.y-xr,xr,m)),ei.push(new jw(On.p.x+xr,On.p.y-xr,xr,m)),ei.push(new jw(On.p.x-xr,On.p.y+xr,xr,m)),ei.push(new jw(On.p.x+xr,On.p.y+xr,xr,m)),Fa+=4)}return P&&(console.log("num probes: "+Fa),console.log("best distance: "+rn.d)),rn.p}function VQe(m,g){return g.max-m.max}function jw(m,g,P,V){this.p=new l(m,g),this.h=P,this.d=HQe(this.p,V),this.max=this.d+this.h*Math.SQRT2}function HQe(m,g){for(var P=!1,V=1/0,J=0;Jm.y!=Ut.y>m.y&&m.x<(Ut.x-kt.x)*(m.y-kt.y)/(Ut.y-kt.y)+kt.x&&(P=!P),V=Math.min(V,fy(m,kt,Ut))}return(P?1:-1)*Math.sqrt(V)}function GQe(m){for(var g=0,P=0,V=0,J=m[0],ae=0,ve=J.length,Ge=ve-1;ae=eo||g0.y<0||g0.y>=eo||ZQe(m,g0,$w,P,V,J,tu,m.layers[0],m.collisionBoxArray,g.index,g.sourceLayerIndex,m.index,rn,so,fl,yt,On,As,eu,xr,g,ae,kt,Ut,ve)};if(Ol==="line")for(var Qu=0,Eu=FQ(g.geometry,0,0,eo,eo);Qu1){var Kh=qQe(ih,dl,P.vertical||ei,V,Li,Fa);Kh&&ou(ih,Kh)}}else if(g.type==="Polygon")for(var _h=0,Yd=Rw(g.geometry,0);_hD1&&re(m.layerIds[0]+': Value for "text-size" is >= '+TM+'. Reduce your "text-size".')):_n.kind==="composite"&&(rn=[zd*xr.compositeTextSizes[0].evaluate(ve,{},ei),zd*xr.compositeTextSizes[1].evaluate(ve,{},ei)],(rn[0]>D1||rn[1]>D1)&&re(m.layerIds[0]+': Value for "text-size" is >= '+TM+'. Reduce your "text-size".')),m.addSymbols(m.text,Li,rn,Ge,ae,ve,kt,g,yt.lineStartIndex,yt.lineLength,kr,ei);for(var Fa=0,On=Ut;FaD1&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TM+'. Reduce your "icon-size".')):pp.kind==="composite"&&(Ph=[zd*so.compositeIconSizes[0].evaluate(Ra,{},dl),zd*so.compositeIconSizes[1].evaluate(Ra,{},dl)],(Ph[0]>D1||Ph[1]>D1)&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TM+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Jh,Ph,On,Fa,Ra,!1,g,Ol.lineStartIndex,Ol.lineLength,-1,dl),Af=m.icon.placedSymbolArray.length-1,dp&&(Eu=dp.length*4,m.addSymbols(m.icon,dp,Ph,On,Fa,Ra,cp.vertical,g,Ol.lineStartIndex,Ol.lineLength,-1,dl),Sf=m.icon.placedSymbolArray.length-1)}for(var vp in V.horizontal){var _v=V.horizontal[vp];if(!Xl){lc=$(_v.text);var vg=Ge.layout.get("text-rotate").evaluate(Ra,{},dl);Xl=new GC(yt,g,kt,Ut,lr,_v,kr,xr,ei,vg)}var F1=_v.positionedLines.length===1;if(Tf+=NQ(m,g,_v,ae,Ge,ei,Ra,Li,Ol,V.vertical?cp.horizontal:cp.horizontalOnly,F1?Object.keys(V.horizontal):[vp],bf,Af,so,dl),F1)break}V.vertical&&($f+=NQ(m,g,V.vertical,ae,Ge,ei,Ra,Li,Ol,cp.vertical,["vertical"],bf,Sf,so,dl));var q1=Xl?Xl.boxStartIndex:m.collisionBoxArray.length,B1=Xl?Xl.boxEndIndex:m.collisionBoxArray.length,$w=tu?tu.boxStartIndex:m.collisionBoxArray.length,g0=tu?tu.boxEndIndex:m.collisionBoxArray.length,YC=Cu?Cu.boxStartIndex:m.collisionBoxArray.length,xB=Cu?Cu.boxEndIndex:m.collisionBoxArray.length,KC=ou?ou.boxStartIndex:m.collisionBoxArray.length,bB=ou?ou.boxEndIndex:m.collisionBoxArray.length,Wv=-1,Qw=function(MM,iee){return MM&&MM.circleDiameter?Math.max(MM.circleDiameter,iee):iee};Wv=Qw(Xl,Wv),Wv=Qw(tu,Wv),Wv=Qw(Cu,Wv),Wv=Qw(ou,Wv);var JC=Wv>-1?1:0;JC&&(Wv*=fl/Va),m.glyphOffsetArray.length>=Jf.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ra.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,Ra.sortKey),m.symbolInstances.emplaceBack(g.x,g.y,bf.right>=0?bf.right:-1,bf.center>=0?bf.center:-1,bf.left>=0?bf.left:-1,bf.vertical||-1,Af,Sf,lc,q1,B1,$w,g0,YC,xB,KC,bB,kt,Tf,$f,Qu,Eu,JC,0,kr,gc,Jc,Wv)}function XQe(m,g,P,V){var J=m.compareText;if(!(g in J))J[g]=[];else for(var ae=J[g],ve=ae.length-1;ve>=0;ve--)if(V.dist(ae[ve])0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),Ut=yt.value.kind!=="constant"||!!yt.value.value||Object.keys(yt.parameters).length>0,lr=ae.get("symbol-sort-key");if(this.features=[],!(!kt&&!Ut)){for(var kr=P.iconDependencies,xr=P.glyphDependencies,ei=P.availableImages,Li=new qo(this.zoom),_n=0,rn=g;_n=0;for(var $f=0,Af=eu.sections;$f=0;yt--)ve[yt]={x:P[yt].x,y:P[yt].y,tileUnitDistanceFromAnchor:ae},yt>0&&(ae+=P[yt-1].dist(P[yt]));for(var kt=0;kt0},Jf.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Jf.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Jf.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Jf.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Jf.prototype.addIndicesForPlacedSymbol=function(g,P){for(var V=g.placedSymbolArray.get(P),J=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(g),this.sortedAngle=g,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,J=this.symbolInstanceIndexes;V=0&&kt.indexOf(Ge)===yt&&P.addIndicesForPlacedSymbol(P.text,Ge)}),ve.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,ve.verticalPlacedTextSymbolIndex),ve.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.placedIconSymbolIndex),ve.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,ve.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Jf,{omit:["layers","collisionBoxArray","features","compareText"]}),Jf.MAX_GLYPHS=65535,Jf.addDynamicAttributes=vB;function $Qe(m,g){return g.replace(/{([^{}]+)}/g,function(P,V){return V in m?String(m[V]):""})}var QQe=new fa({"symbol-placement":new Gt(Ri.layout_symbol["symbol-placement"]),"symbol-spacing":new Gt(Ri.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Gt(Ri.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new jr(Ri.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Gt(Ri.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Gt(Ri.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Gt(Ri.layout_symbol["icon-ignore-placement"]),"icon-optional":new Gt(Ri.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Gt(Ri.layout_symbol["icon-rotation-alignment"]),"icon-size":new jr(Ri.layout_symbol["icon-size"]),"icon-text-fit":new Gt(Ri.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Gt(Ri.layout_symbol["icon-text-fit-padding"]),"icon-image":new jr(Ri.layout_symbol["icon-image"]),"icon-rotate":new jr(Ri.layout_symbol["icon-rotate"]),"icon-padding":new Gt(Ri.layout_symbol["icon-padding"]),"icon-keep-upright":new Gt(Ri.layout_symbol["icon-keep-upright"]),"icon-offset":new jr(Ri.layout_symbol["icon-offset"]),"icon-anchor":new jr(Ri.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Gt(Ri.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Gt(Ri.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Gt(Ri.layout_symbol["text-rotation-alignment"]),"text-field":new jr(Ri.layout_symbol["text-field"]),"text-font":new jr(Ri.layout_symbol["text-font"]),"text-size":new jr(Ri.layout_symbol["text-size"]),"text-max-width":new jr(Ri.layout_symbol["text-max-width"]),"text-line-height":new Gt(Ri.layout_symbol["text-line-height"]),"text-letter-spacing":new jr(Ri.layout_symbol["text-letter-spacing"]),"text-justify":new jr(Ri.layout_symbol["text-justify"]),"text-radial-offset":new jr(Ri.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Gt(Ri.layout_symbol["text-variable-anchor"]),"text-anchor":new jr(Ri.layout_symbol["text-anchor"]),"text-max-angle":new Gt(Ri.layout_symbol["text-max-angle"]),"text-writing-mode":new Gt(Ri.layout_symbol["text-writing-mode"]),"text-rotate":new jr(Ri.layout_symbol["text-rotate"]),"text-padding":new Gt(Ri.layout_symbol["text-padding"]),"text-keep-upright":new Gt(Ri.layout_symbol["text-keep-upright"]),"text-transform":new jr(Ri.layout_symbol["text-transform"]),"text-offset":new jr(Ri.layout_symbol["text-offset"]),"text-allow-overlap":new Gt(Ri.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Gt(Ri.layout_symbol["text-ignore-placement"]),"text-optional":new Gt(Ri.layout_symbol["text-optional"])}),eet=new fa({"icon-opacity":new jr(Ri.paint_symbol["icon-opacity"]),"icon-color":new jr(Ri.paint_symbol["icon-color"]),"icon-halo-color":new jr(Ri.paint_symbol["icon-halo-color"]),"icon-halo-width":new jr(Ri.paint_symbol["icon-halo-width"]),"icon-halo-blur":new jr(Ri.paint_symbol["icon-halo-blur"]),"icon-translate":new Gt(Ri.paint_symbol["icon-translate"]),"icon-translate-anchor":new Gt(Ri.paint_symbol["icon-translate-anchor"]),"text-opacity":new jr(Ri.paint_symbol["text-opacity"]),"text-color":new jr(Ri.paint_symbol["text-color"],{runtimeType:Qi,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new jr(Ri.paint_symbol["text-halo-color"]),"text-halo-width":new jr(Ri.paint_symbol["text-halo-width"]),"text-halo-blur":new jr(Ri.paint_symbol["text-halo-blur"]),"text-translate":new Gt(Ri.paint_symbol["text-translate"]),"text-translate-anchor":new Gt(Ri.paint_symbol["text-translate-anchor"])}),yB={paint:eet,layout:QQe},Yw=function(g){this.type=g.property.overrides?g.property.overrides.runtimeType:Co,this.defaultValue=g};Yw.prototype.evaluate=function(g){if(g.formattedSection){var P=this.defaultValue.property.overrides;if(P&&P.hasOverride(g.formattedSection))return P.getOverride(g.formattedSection)}return g.feature&&g.featureState?this.defaultValue.evaluate(g.feature,g.featureState):this.defaultValue.property.specification.default},Yw.prototype.eachChild=function(g){if(!this.defaultValue.isConstant()){var P=this.defaultValue.value;g(P._styleExpression.expression)}},Yw.prototype.outputDefined=function(){return!1},Yw.prototype.serialize=function(){return null},X("FormatSectionOverride",Yw,{omit:["defaultValue"]});var tet=function(m){function g(P){m.call(this,P,yB)}return m&&(g.__proto__=m),g.prototype=Object.create(m&&m.prototype),g.prototype.constructor=g,g.prototype.recalculate=function(V,J){if(m.prototype.recalculate.call(this,V,J),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 ve=[],Ge=0,yt=ae;Ge",targetMapId:J,sourceMapId:ve.mapId})}}},Kw.prototype.receive=function(g){var P=g.data,V=P.id;if(V&&!(P.targetMapId&&this.mapId!==P.targetMapId))if(P.type===""){delete this.tasks[V];var J=this.cancelCallbacks[V];delete this.cancelCallbacks[V],J&&J()}else Ce()||P.mustQueue?(this.tasks[V]=P,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,P)},Kw.prototype.process=function(){if(this.taskQueue.length){var g=this.taskQueue.shift(),P=this.tasks[g];delete this.tasks[g],this.taskQueue.length&&this.invoker.trigger(),P&&this.processTask(g,P)}},Kw.prototype.processTask=function(g,P){var V=this;if(P.type===""){var J=this.callbacks[g];delete this.callbacks[g],J&&(P.error?J(it(P.error)):J(null,it(P.data)))}else{var ae=!1,ve=ke(this.globalScope)?void 0:[],Ge=P.hasCallback?function(kr,xr){ae=!0,delete V.cancelCallbacks[g],V.target.postMessage({id:g,type:"",sourceMapId:V.mapId,error:kr?Ye(kr):null,data:Ye(xr,ve)},ve)}:function(kr){ae=!0},yt=null,kt=it(P.data);if(this.parent[P.type])yt=this.parent[P.type](P.sourceMapId,kt,Ge);else if(this.parent.getWorkerSource){var Ut=P.type.split("."),lr=this.parent.getWorkerSource(P.sourceMapId,Ut[0],kt.source);yt=lr[Ut[1]](kt,Ge)}else Ge(new Error("Could not find function "+P.type));!ae&&yt&&yt.cancel&&(this.cancelCallbacks[g]=yt.cancel)}},Kw.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function det(m,g,P){g=Math.pow(2,P)-g-1;var V=jQ(m*256,g*256,P),J=jQ((m+1)*256,(g+1)*256,P);return V[0]+","+V[1]+","+J[0]+","+J[1]}function jQ(m,g,P){var V=2*Math.PI*6378137/256/Math.pow(2,P),J=m*V-2*Math.PI*6378137/2,ae=g*V-2*Math.PI*6378137/2;return[J,ae]}var mh=function(g,P){g&&(P?this.setSouthWest(g).setNorthEast(P):g.length===4?this.setSouthWest([g[0],g[1]]).setNorthEast([g[2],g[3]]):this.setSouthWest(g[0]).setNorthEast(g[1]))};mh.prototype.setNorthEast=function(g){return this._ne=g instanceof Ic?new Ic(g.lng,g.lat):Ic.convert(g),this},mh.prototype.setSouthWest=function(g){return this._sw=g instanceof Ic?new Ic(g.lng,g.lat):Ic.convert(g),this},mh.prototype.extend=function(g){var P=this._sw,V=this._ne,J,ae;if(g instanceof Ic)J=g,ae=g;else if(g instanceof mh){if(J=g._sw,ae=g._ne,!J||!ae)return this}else{if(Array.isArray(g))if(g.length===4||g.every(Array.isArray)){var ve=g;return this.extend(mh.convert(ve))}else{var Ge=g;return this.extend(Ic.convert(Ge))}return this}return!P&&!V?(this._sw=new Ic(J.lng,J.lat),this._ne=new Ic(ae.lng,ae.lat)):(P.lng=Math.min(J.lng,P.lng),P.lat=Math.min(J.lat,P.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},mh.prototype.getCenter=function(){return new Ic((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},mh.prototype.getSouthWest=function(){return this._sw},mh.prototype.getNorthEast=function(){return this._ne},mh.prototype.getNorthWest=function(){return new Ic(this.getWest(),this.getNorth())},mh.prototype.getSouthEast=function(){return new Ic(this.getEast(),this.getSouth())},mh.prototype.getWest=function(){return this._sw.lng},mh.prototype.getSouth=function(){return this._sw.lat},mh.prototype.getEast=function(){return this._ne.lng},mh.prototype.getNorth=function(){return this._ne.lat},mh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},mh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},mh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},mh.prototype.contains=function(g){var P=Ic.convert(g),V=P.lng,J=P.lat,ae=this._sw.lat<=J&&J<=this._ne.lat,ve=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ve=this._sw.lng>=V&&V>=this._ne.lng),ae&&ve},mh.convert=function(g){return!g||g instanceof mh?g:new mh(g)};var ZQ=63710088e-1,Ic=function(g,P){if(isNaN(g)||isNaN(P))throw new Error("Invalid LngLat object: ("+g+", "+P+")");if(this.lng=+g,this.lat=+P,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ic.prototype.wrap=function(){return new Ic(k(this.lng,-180,180),this.lat)},Ic.prototype.toArray=function(){return[this.lng,this.lat]},Ic.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ic.prototype.distanceTo=function(g){var P=Math.PI/180,V=this.lat*P,J=g.lat*P,ae=Math.sin(V)*Math.sin(J)+Math.cos(V)*Math.cos(J)*Math.cos((g.lng-this.lng)*P),ve=ZQ*Math.acos(Math.min(ae,1));return ve},Ic.prototype.toBounds=function(g){g===void 0&&(g=0);var P=40075017,V=360*g/P,J=V/Math.cos(Math.PI/180*this.lat);return new mh(new Ic(this.lng-J,this.lat-V),new Ic(this.lng+J,this.lat+V))},Ic.convert=function(g){if(g instanceof Ic)return g;if(Array.isArray(g)&&(g.length===2||g.length===3))return new Ic(Number(g[0]),Number(g[1]));if(!Array.isArray(g)&&typeof g=="object"&&g!==null)return new Ic(Number("lng"in g?g.lng:g.lon),Number(g.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 XQ=2*Math.PI*ZQ;function YQ(m){return XQ*Math.cos(m*Math.PI/180)}function KQ(m){return(180+m)/360}function JQ(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function $Q(m,g){return m/YQ(g)}function pet(m){return m*360-180}function gB(m){var g=180-m*360;return 360/Math.PI*Math.atan(Math.exp(g*Math.PI/180))-90}function vet(m,g){return m*YQ(gB(g))}function yet(m){return 1/Math.cos(m*Math.PI/180)}var ib=function(g,P,V){V===void 0&&(V=0),this.x=+g,this.y=+P,this.z=+V};ib.fromLngLat=function(g,P){P===void 0&&(P=0);var V=Ic.convert(g);return new ib(KQ(V.lng),JQ(V.lat),$Q(P,V.lat))},ib.prototype.toLngLat=function(){return new Ic(pet(this.x),gB(this.y))},ib.prototype.toAltitude=function(){return vet(this.z,this.y)},ib.prototype.meterInMercatorCoordinateUnits=function(){return 1/XQ*yet(gB(this.y))};var nb=function(g,P,V){this.z=g,this.x=P,this.y=V,this.key=SM(0,g,g,P,V)};nb.prototype.equals=function(g){return this.z===g.z&&this.x===g.x&&this.y===g.y},nb.prototype.url=function(g,P){var V=det(this.x,this.y,this.z),J=met(this.z,this.x,this.y);return g[(this.x+this.y)%g.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(P==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",J).replace("{bbox-epsg-3857}",V)},nb.prototype.getTilePoint=function(g){var P=Math.pow(2,this.z);return new l((g.x*P-this.x)*eo,(g.y*P-this.y)*eo)},nb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var QQ=function(g,P){this.wrap=g,this.canonical=P,this.key=SM(g,P.z,P.z,P.x,P.y)},gh=function(g,P,V,J,ae){this.overscaledZ=g,this.wrap=P,this.canonical=new nb(V,+J,+ae),this.key=SM(P,g,V,J,ae)};gh.prototype.equals=function(g){return this.overscaledZ===g.overscaledZ&&this.wrap===g.wrap&&this.canonical.equals(g.canonical)},gh.prototype.scaledTo=function(g){var P=this.canonical.z-g;return g>this.canonical.z?new gh(g,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new gh(g,this.wrap,g,this.canonical.x>>P,this.canonical.y>>P)},gh.prototype.calculateScaledKey=function(g,P){var V=this.canonical.z-g;return g>this.canonical.z?SM(this.wrap*+P,g,this.canonical.z,this.canonical.x,this.canonical.y):SM(this.wrap*+P,g,g,this.canonical.x>>V,this.canonical.y>>V)},gh.prototype.isChildOf=function(g){if(g.wrap!==this.wrap)return!1;var P=this.canonical.z-g.canonical.z;return g.overscaledZ===0||g.overscaledZ>P&&g.canonical.y===this.canonical.y>>P},gh.prototype.children=function(g){if(this.overscaledZ>=g)return[new gh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var P=this.canonical.z+1,V=this.canonical.x*2,J=this.canonical.y*2;return[new gh(P,this.wrap,P,V,J),new gh(P,this.wrap,P,V+1,J),new gh(P,this.wrap,P,V,J+1),new gh(P,this.wrap,P,V+1,J+1)]},gh.prototype.isLessThan=function(g){return this.wrapg.wrap?!1:this.overscaledZg.overscaledZ?!1:this.canonical.xg.canonical.x?!1:this.canonical.y0;ae--)J=1<=this.dim+1||P<-1||P>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(P+1)*this.stride+(g+1)},dg.prototype._unpackMapbox=function(g,P,V){return(g*256*256+P*256+V)/10-1e4},dg.prototype._unpackTerrarium=function(g,P,V){return g*256+P+V/256-32768},dg.prototype.getPixels=function(){return new kh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},dg.prototype.backfillBorder=function(g,P,V){if(this.dim!==g.dim)throw new Error("dem dimension mismatch");var J=P*this.dim,ae=P*this.dim+this.dim,ve=V*this.dim,Ge=V*this.dim+this.dim;switch(P){case-1:J=ae-1;break;case 1:ae=J+1;break}switch(V){case-1:ve=Ge-1;break;case 1:Ge=ve+1;break}for(var yt=-P*this.dim,kt=-V*this.dim,Ut=ve;Ut=0&&lr[3]>=0&&yt.insert(Ge,lr[0],lr[1],lr[2],lr[3])}},pg.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vy.VectorTile(new Zl(this.rawTileData)).layers,this.sourceLayerCoder=new ZC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},pg.prototype.query=function(g,P,V,J){var ae=this;this.loadVTLayers();for(var ve=g.params||{},Ge=eo/g.tileSize/g.scale,yt=Ae(ve.filter),kt=g.queryGeometry,Ut=g.queryPadding*Ge,lr=tee(kt),kr=this.grid.query(lr.minX-Ut,lr.minY-Ut,lr.maxX+Ut,lr.maxY+Ut),xr=tee(g.cameraQueryGeometry),ei=this.grid3D.query(xr.minX-Ut,xr.minY-Ut,xr.maxX+Ut,xr.maxY+Ut,function(As,dl,fl,eu){return vv(g.cameraQueryGeometry,As-Ut,dl-Ut,fl+Ut,eu+Ut)}),Li=0,_n=ei;Li<_n.length;Li+=1){var rn=_n[Li];kr.push(rn)}kr.sort(_et);for(var Fa={},On,Ra=function(As){var dl=kr[As];if(dl!==On){On=dl;var fl=ae.featureIndexArray.get(dl),eu=null;ae.loadMatchingFeature(Fa,fl.bucketIndex,fl.sourceLayerIndex,fl.featureIndex,yt,ve.layers,ve.availableImages,P,V,J,function(Ol,Xl,Cu){return eu||(eu=Ml(Ol)),Xl.queryIntersectsFeature(kt,Ol,Cu,eu,ae.z,g.transform,Ge,g.pixelPosMatrix)})}},so=0;soJ)ae=!1;else if(!P)ae=!0;else if(this.expirationTime=sn.maxzoom)&&sn.visibility!=="none"){h(Mi,this.zoom,Bt);var fi=Br[sn.id]=sn.createBucket({index:Rr.bucketLayerIDs.length,layers:Mi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ni,sourceID:this.source});fi.populate(Ur,oi,this.tileID.canonical),Rr.bucketLayerIDs.push(Mi.map(function(Qr){return Qr.id}))}}}}var Or,st,Wt,tr,or=i.mapObject(oi.glyphDependencies,function(Qr){return Object.keys(Qr).map(Number)});Object.keys(or).length?sr.send("getGlyphs",{uid:this.uid,stacks:or},function(Qr,Ui){Or||(Or=Qr,st=Ui,Gi.call(zr))}):st={};var Nr=Object.keys(oi.iconDependencies);Nr.length?sr.send("getImages",{icons:Nr,source:this.source,tileID:this.tileID,type:"icons"},function(Qr,Ui){Or||(Or=Qr,Wt=Ui,Gi.call(zr))}):Wt={};var hi=Object.keys(oi.patternDependencies);hi.length?sr.send("getImages",{icons:hi,source:this.source,tileID:this.tileID,type:"patterns"},function(Qr,Ui){Or||(Or=Qr,tr=Ui,Gi.call(zr))}):tr={},Gi.call(this);function Gi(){if(Or)return br(Or);if(st&&Wt&&tr){var Qr=new f(st),Ui=new i.ImageAtlas(Wt,tr);for(var zn in Br){var fn=Br[zn];fn instanceof i.SymbolBucket?(h(fn.layers,this.zoom,Bt),i.performSymbolLayout(fn,st,Qr.positions,Wt,Ui.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):fn.hasPattern&&(fn instanceof i.LineBucket||fn instanceof i.FillBucket||fn instanceof i.FillExtrusionBucket)&&(h(fn.layers,this.zoom,Bt),fn.addFeatures(oi,this.tileID.canonical,Ui.patternPositions))}this.status="done",br(null,{buckets:i.values(Br).filter(function(xn){return!xn.isEmpty()}),featureIndex:Rr,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Qr.image,imageAtlas:Ui,glyphMap:this.returnDependencies?st:null,iconMap:this.returnDependencies?Wt:null,glyphPositions:this.returnDependencies?Qr.positions:null})}}};function h(Lt,vt,Dt){for(var Bt=new i.EvaluationParameters(vt),sr=0,br=Lt;sr=0!=!!vt&&Lt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(vt){this._feature=vt,this.extent=i.EXTENT,this.type=vt.type,this.properties=vt.tags,"id"in vt&&!isNaN(vt.id)&&(this.id=parseInt(vt.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var vt=[],Dt=0,Bt=this._feature.geometry;Dt>31}function Ce(Lt,vt){for(var Dt=Lt.loadGeometry(),Bt=Lt.type,sr=0,br=0,zr=Dt.length,Tr=0;Tr>1;ke(Lt,vt,zr,Bt,sr,br%2),te(Lt,vt,Dt,Bt,zr-1,br+1),te(Lt,vt,Dt,zr+1,sr,br+1)}}function ke(Lt,vt,Dt,Bt,sr,br){for(;sr>Bt;){if(sr-Bt>600){var zr=sr-Bt+1,Tr=Dt-Bt+1,Rr=Math.log(zr),Br=.5*Math.exp(2*Rr/3),oi=.5*Math.sqrt(Rr*Br*(zr-Br)/zr)*(Tr-zr/2<0?-1:1),vi=Math.max(Bt,Math.floor(Dt-Tr*Br/zr+oi)),Pi=Math.min(sr,Math.floor(Dt+(zr-Tr)*Br/zr+oi));ke(Lt,vt,Dt,vi,Pi,br)}var Yr=vt[2*Dt+br],Ni=Bt,Ur=sr;for(Ee(Lt,vt,Bt,Dt),vt[2*sr+br]>Yr&&Ee(Lt,vt,Bt,sr);NiYr;)Ur--}vt[2*Bt+br]===Yr?Ee(Lt,vt,Bt,Ur):(Ur++,Ee(Lt,vt,Ur,sr)),Ur<=Dt&&(Bt=Ur+1),Dt<=Ur&&(sr=Ur-1)}}function Ee(Lt,vt,Dt,Bt){Me(Lt,Dt,Bt),Me(vt,2*Dt,2*Bt),Me(vt,2*Dt+1,2*Bt+1)}function Me(Lt,vt,Dt){var Bt=Lt[vt];Lt[vt]=Lt[Dt],Lt[Dt]=Bt}function Oe(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=[0,Lt.length-1,0],Rr=[],Br,oi;Tr.length;){var vi=Tr.pop(),Pi=Tr.pop(),Yr=Tr.pop();if(Pi-Yr<=zr){for(var Ni=Yr;Ni<=Pi;Ni++)Br=vt[2*Ni],oi=vt[2*Ni+1],Br>=Dt&&Br<=sr&&oi>=Bt&&oi<=br&&Rr.push(Lt[Ni]);continue}var Ur=Math.floor((Yr+Pi)/2);Br=vt[2*Ur],oi=vt[2*Ur+1],Br>=Dt&&Br<=sr&&oi>=Bt&&oi<=br&&Rr.push(Lt[Ur]);var ti=(vi+1)%2;(vi===0?Dt<=Br:Bt<=oi)&&(Tr.push(Yr),Tr.push(Ur-1),Tr.push(ti)),(vi===0?sr>=Br:br>=oi)&&(Tr.push(Ur+1),Tr.push(Pi),Tr.push(ti))}return Rr}function Re(Lt,vt,Dt,Bt,sr,br){for(var zr=[0,Lt.length-1,0],Tr=[],Rr=sr*sr;zr.length;){var Br=zr.pop(),oi=zr.pop(),vi=zr.pop();if(oi-vi<=br){for(var Pi=vi;Pi<=oi;Pi++)me(vt[2*Pi],vt[2*Pi+1],Dt,Bt)<=Rr&&Tr.push(Lt[Pi]);continue}var Yr=Math.floor((vi+oi)/2),Ni=vt[2*Yr],Ur=vt[2*Yr+1];me(Ni,Ur,Dt,Bt)<=Rr&&Tr.push(Lt[Yr]);var ti=(Br+1)%2;(Br===0?Dt-sr<=Ni:Bt-sr<=Ur)&&(zr.push(vi),zr.push(Yr-1),zr.push(ti)),(Br===0?Dt+sr>=Ni:Bt+sr>=Ur)&&(zr.push(Yr+1),zr.push(oi),zr.push(ti))}return Tr}function me(Lt,vt,Dt,Bt){var sr=Lt-Dt,br=vt-Bt;return sr*sr+br*br}var Be=function(Lt){return Lt[0]},fe=function(Lt){return Lt[1]},Ze=function(vt,Dt,Bt,sr,br){Dt===void 0&&(Dt=Be),Bt===void 0&&(Bt=fe),sr===void 0&&(sr=64),br===void 0&&(br=Float64Array),this.nodeSize=sr,this.points=vt;for(var zr=vt.length<65536?Uint16Array:Uint32Array,Tr=this.ids=new zr(vt.length),Rr=this.coords=new br(vt.length*2),Br=0;Br=sr;oi--){var vi=+Date.now();Rr=this._cluster(Rr,oi),this.trees[oi]=new Ze(Rr,Te,nt,zr,Float32Array),Bt&&console.log("z%d: %d clusters in %dms",oi,Rr.length,+Date.now()-vi)}return Bt&&console.timeEnd("total time"),this},gt.prototype.getClusters=function(vt,Dt){var Bt=((vt[0]+180)%360+360)%360-180,sr=Math.max(-90,Math.min(90,vt[1])),br=vt[2]===180?180:((vt[2]+180)%360+360)%360-180,zr=Math.max(-90,Math.min(90,vt[3]));if(vt[2]-vt[0]>=360)Bt=-180,br=180;else if(Bt>br){var Tr=this.getClusters([Bt,sr,180,zr],Dt),Rr=this.getClusters([-180,sr,br,zr],Dt);return Tr.concat(Rr)}for(var Br=this.trees[this._limitZoom(Dt)],oi=Br.range(xt(Bt),_t(zr),xt(br),_t(sr)),vi=[],Pi=0,Yr=oi;PiDt&&(Ur+=Vi.numPoints||1)}if(Ur>=Rr){for(var zi=vi.x*Ni,Mi=vi.y*Ni,sn=Tr&&Ni>1?this._map(vi,!0):null,fi=(oi<<5)+(Dt+1)+this.points.length,Or=0,st=Yr;Or1)for(var Nr=0,hi=Yr;Nr>5},gt.prototype._getOriginZoom=function(vt){return(vt-this.points.length)%32},gt.prototype._map=function(vt,Dt){if(vt.numPoints)return Dt?At({},vt.properties):vt.properties;var Bt=this.points[vt.index].properties,sr=this.options.map(Bt);return Dt&&sr===Bt?At({},sr):sr};function Pt(Lt,vt,Dt,Bt,sr){return{x:Lt,y:vt,zoom:1/0,id:Dt,parentId:-1,numPoints:Bt,properties:sr}}function Qe(Lt,vt){var Dt=Lt.geometry.coordinates,Bt=Dt[0],sr=Dt[1];return{x:xt(Bt),y:_t(sr),zoom:1/0,index:vt,parentId:-1}}function Xe(Lt){return{type:"Feature",id:Lt.id,properties:Tt(Lt),geometry:{type:"Point",coordinates:[Ct(Lt.x),jt(Lt.y)]}}}function Tt(Lt){var vt=Lt.numPoints,Dt=vt>=1e4?Math.round(vt/1e3)+"k":vt>=1e3?Math.round(vt/100)/10+"k":vt;return At(At({},Lt.properties),{cluster:!0,cluster_id:Lt.id,point_count:vt,point_count_abbreviated:Dt})}function xt(Lt){return Lt/360+.5}function _t(Lt){var vt=Math.sin(Lt*Math.PI/180),Dt=.5-.25*Math.log((1+vt)/(1-vt))/Math.PI;return Dt<0?0:Dt>1?1:Dt}function Ct(Lt){return(Lt-.5)*360}function jt(Lt){var vt=(180-Lt*360)*Math.PI/180;return 360*Math.atan(Math.exp(vt))/Math.PI-90}function At(Lt,vt){for(var Dt in vt)Lt[Dt]=vt[Dt];return Lt}function Te(Lt){return Lt.x}function nt(Lt){return Lt.y}function ut(Lt,vt,Dt,Bt){for(var sr=Bt,br=Dt-vt>>1,zr=Dt-vt,Tr,Rr=Lt[vt],Br=Lt[vt+1],oi=Lt[Dt],vi=Lt[Dt+1],Pi=vt+3;Pisr)Tr=Pi,sr=Yr;else if(Yr===sr){var Ni=Math.abs(Pi-br);NiBt&&(Tr-vt>3&&ut(Lt,vt,Tr,Bt),Lt[Tr+2]=sr,Dt-Tr>3&&ut(Lt,Tr,Dt,Bt))}function ct(Lt,vt,Dt,Bt,sr,br){var zr=sr-Dt,Tr=br-Bt;if(zr!==0||Tr!==0){var Rr=((Lt-Dt)*zr+(vt-Bt)*Tr)/(zr*zr+Tr*Tr);Rr>1?(Dt=sr,Bt=br):Rr>0&&(Dt+=zr*Rr,Bt+=Tr*Rr)}return zr=Lt-Dt,Tr=vt-Bt,zr*zr+Tr*Tr}function rt(Lt,vt,Dt,Bt){var sr={id:typeof Lt=="undefined"?null:Lt,type:vt,geometry:Dt,tags:Bt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return je(sr),sr}function je(Lt){var vt=Lt.geometry,Dt=Lt.type;if(Dt==="Point"||Dt==="MultiPoint"||Dt==="LineString")tt(Lt,vt);else if(Dt==="Polygon"||Dt==="MultiLineString")for(var Bt=0;Bt0&&(Bt?zr+=(sr*Br-Rr*br)/2:zr+=Math.sqrt(Math.pow(Rr-sr,2)+Math.pow(Br-br,2))),sr=Rr,br=Br}var oi=vt.length-3;vt[2]=1,ut(vt,0,oi,Dt),vt[oi+2]=1,vt.size=Math.abs(zr),vt.start=0,vt.end=vt.size}function ir(Lt,vt,Dt,Bt){for(var sr=0;sr1?1:Dt}function De(Lt,vt,Dt,Bt,sr,br,zr,Tr){if(Dt/=vt,Bt/=vt,br>=Dt&&zr=Bt)return null;for(var Rr=[],Br=0;Br=Dt&&Ni=Bt)continue;var Ur=[];if(Pi==="Point"||Pi==="MultiPoint")_e(vi,Ur,Dt,Bt,sr);else if(Pi==="LineString")Fe(vi,Ur,Dt,Bt,sr,!1,Tr.lineMetrics);else if(Pi==="MultiLineString")Ie(vi,Ur,Dt,Bt,sr,!1);else if(Pi==="Polygon")Ie(vi,Ur,Dt,Bt,sr,!0);else if(Pi==="MultiPolygon")for(var ti=0;ti=Dt&&zr<=Bt&&(vt.push(Lt[br]),vt.push(Lt[br+1]),vt.push(Lt[br+2]))}}function Fe(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=Pe(Lt),Rr=sr===0?ye:ue,Br=Lt.start,oi,vi,Pi=0;PiDt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Dt),zr&&(Tr.start=Br+oi*vi)):ji>Bt?Vi=Dt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Dt),zi=!0),Vi>Bt&&ji<=Bt&&(vi=Rr(Tr,Yr,Ni,ti,ki,Bt),zi=!0),!br&&zi&&(zr&&(Tr.end=Br+oi*vi),vt.push(Tr),Tr=Pe(Lt)),zr&&(Br+=oi)}var Mi=Lt.length-3;Yr=Lt[Mi],Ni=Lt[Mi+1],Ur=Lt[Mi+2],ji=sr===0?Yr:Ni,ji>=Dt&&ji<=Bt&<(Tr,Yr,Ni,Ur),Mi=Tr.length-3,br&&Mi>=3&&(Tr[Mi]!==Tr[0]||Tr[Mi+1]!==Tr[1])&<(Tr,Tr[0],Tr[1],Tr[2]),Tr.length&&vt.push(Tr)}function Pe(Lt){var vt=[];return vt.size=Lt.size,vt.start=Lt.start,vt.end=Lt.end,vt}function Ie(Lt,vt,Dt,Bt,sr,br){for(var zr=0;zrzr.maxX&&(zr.maxX=oi),vi>zr.maxY&&(zr.maxY=vi)}return zr}function Lr(Lt,vt,Dt,Bt){var sr=vt.geometry,br=vt.type,zr=[];if(br==="Point"||br==="MultiPoint")for(var Tr=0;Tr0&&vt.size<(sr?zr:Bt)){Dt.numPoints+=vt.length/3;return}for(var Tr=[],Rr=0;Rrzr)&&(Dt.numSimplified++,Tr.push(vt[Rr]),Tr.push(vt[Rr+1])),Dt.numPoints++;sr&&Er(Tr,br),Lt.push(Tr)}function Er(Lt,vt){for(var Dt=0,Bt=0,sr=Lt.length,br=sr-2;Bt0===vt)for(Bt=0,sr=Lt.length;Bt24)throw new Error("maxZoom should be in the 0-24 range");if(vt.promoteId&&vt.generateId)throw new Error("promoteId and generateId cannot be used together.");var Bt=Je(Lt,vt);this.tiles={},this.tileCoords=[],Dt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",vt.indexMaxZoom,vt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Bt=de(Bt,vt),Bt.length&&this.splitTile(Bt,0,0,0),Dt&&(Bt.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)))}Ei.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ei.prototype.splitTile=function(Lt,vt,Dt,Bt,sr,br,zr){for(var Tr=[Lt,vt,Dt,Bt],Rr=this.options,Br=Rr.debug;Tr.length;){Bt=Tr.pop(),Dt=Tr.pop(),vt=Tr.pop(),Lt=Tr.pop();var oi=1<1&&console.time("creation"),Pi=this.tiles[vi]=qr(Lt,vt,Dt,Bt,Rr),this.tileCoords.push({z:vt,x:Dt,y:Bt}),Br)){Br>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",vt,Dt,Bt,Pi.numFeatures,Pi.numPoints,Pi.numSimplified),console.timeEnd("creation"));var Yr="z"+vt;this.stats[Yr]=(this.stats[Yr]||0)+1,this.total++}if(Pi.source=Lt,sr){if(vt===Rr.maxZoom||vt===sr)continue;var Ni=1<1&&console.time("clipping");var Ur=.5*Rr.buffer/Rr.extent,ti=.5-Ur,ki=.5+Ur,ji=1+Ur,Vi,zi,Mi,sn,fi,Or;Vi=zi=Mi=sn=null,fi=De(Lt,oi,Dt-Ur,Dt+ki,0,Pi.minX,Pi.maxX,Rr),Or=De(Lt,oi,Dt+ti,Dt+ji,0,Pi.minX,Pi.maxX,Rr),Lt=null,fi&&(Vi=De(fi,oi,Bt-Ur,Bt+ki,1,Pi.minY,Pi.maxY,Rr),zi=De(fi,oi,Bt+ti,Bt+ji,1,Pi.minY,Pi.maxY,Rr),fi=null),Or&&(Mi=De(Or,oi,Bt-Ur,Bt+ki,1,Pi.minY,Pi.maxY,Rr),sn=De(Or,oi,Bt+ti,Bt+ji,1,Pi.minY,Pi.maxY,Rr),Or=null),Br>1&&console.timeEnd("clipping"),Tr.push(Vi||[],vt+1,Dt*2,Bt*2),Tr.push(zi||[],vt+1,Dt*2,Bt*2+1),Tr.push(Mi||[],vt+1,Dt*2+1,Bt*2),Tr.push(sn||[],vt+1,Dt*2+1,Bt*2+1)}}},Ei.prototype.getTile=function(Lt,vt,Dt){var Bt=this.options,sr=Bt.extent,br=Bt.debug;if(Lt<0||Lt>24)return null;var zr=1<1&&console.log("drilling down to z%d-%d-%d",Lt,vt,Dt);for(var Rr=Lt,Br=vt,oi=Dt,vi;!vi&&Rr>0;)Rr--,Br=Math.floor(Br/2),oi=Math.floor(oi/2),vi=this.tiles[Si(Rr,Br,oi)];return!vi||!vi.source?null:(br>1&&console.log("found parent tile z%d-%d-%d",Rr,Br,oi),br>1&&console.time("drilling down"),this.splitTile(vi.source,Rr,Br,oi,Lt,vt,Dt),br>1&&console.timeEnd("drilling down"),this.tiles[Tr]?St(this.tiles[Tr],sr):null)};function Si(Lt,vt,Dt){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function x(Y,R,K){var N,$,we,ge=i.browser.devicePixelRatio>1?"@2x":"",Ue=i.getJSON(R.transformRequest(R.normalizeSpriteURL(Y,ge,".json"),i.ResourceType.SpriteJSON),function(ur,gr){Ue=null,we||(we=ur,N=gr,Rt())}),dt=i.getImage(R.transformRequest(R.normalizeSpriteURL(Y,ge,".png"),i.ResourceType.SpriteImage),function(ur,gr){dt=null,we||(we=ur,$=gr,Rt())});function Rt(){if(we)K(we);else if(N&&$){var ur=i.browser.getImageData($),gr={};for(var cr in N){var It=N[cr],Qt=It.width,ar=It.height,mr=It.x,Pr=It.y,Dr=It.sdf,Xr=It.pixelRatio,Gr=It.stretchX,Fr=It.stretchY,Kr=It.content,Cr=new i.RGBAImage({width:Qt,height:ar});i.RGBAImage.copy(ur,Cr,{x:mr,y:Pr},{x:0,y:0},{width:Qt,height:ar}),gr[cr]={data:Cr,pixelRatio:Xr,sdf:Dr,stretchX:Gr,stretchY:Fr,content:Kr}}K(null,gr)}}return{cancel:function(){Ue&&(Ue.cancel(),Ue=null),dt&&(dt.cancel(),dt=null)}}}function b(Y){var R=Y.userImage;if(R&&R.render){var K=R.render();if(K)return Y.data.replace(new Uint8Array(R.data.buffer)),!0}return!1}var y=1,k=function(Y){function R(){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&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.isLoaded=function(){return this.loaded},R.prototype.setLoaded=function(N){if(this.loaded!==N&&(this.loaded=N,N)){for(var $=0,we=this.requestors;$=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 R=this.ctx.getImageData(0,0,this.size,this.size),K=new Uint8ClampedArray(this.size*this.size),N=0;N65535){ur(new Error("glyphs > 65535 not supported"));return}if(It.ranges[ar]){ur(null,{stack:gr,id:cr,glyph:Qt});return}var mr=It.requests[ar];mr||(mr=It.requests[ar]=[],z.loadGlyphRange(gr,ar,N.url,N.requestManager,function(Pr,Dr){if(Dr){for(var Xr in Dr)N._doesCharSupportLocalGlyph(+Xr)||(It.glyphs[+Xr]=Dr[+Xr]);It.ranges[ar]=!0}for(var Gr=0,Fr=mr;Gr1&&(Rt=R[++dt]);var gr=Math.abs(ur-Rt.left),cr=Math.abs(ur-Rt.right),It=Math.min(gr,cr),Qt=void 0,ar=we/N*($+1);if(Rt.isDash){var mr=$-Math.abs(ar);Qt=Math.sqrt(It*It+mr*mr)}else Qt=$-Math.sqrt(It*It+ar*ar);this.data[Ue+ur]=Math.max(0,Math.min(255,Qt+128))}},H.prototype.addRegularDash=function(R){for(var K=R.length-1;K>=0;--K){var N=R[K],$=R[K+1];N.zeroLength?R.splice(K,1):$&&$.isDash===N.isDash&&($.left=N.left,R.splice(K,1))}var we=R[0],ge=R[R.length-1];we.isDash===ge.isDash&&(we.left=ge.left-this.width,ge.right=we.right+this.width);for(var Ue=this.width*this.nextRow,dt=0,Rt=R[dt],ur=0;ur1&&(Rt=R[++dt]);var gr=Math.abs(ur-Rt.left),cr=Math.abs(ur-Rt.right),It=Math.min(gr,cr),Qt=Rt.isDash?It:-It;this.data[Ue+ur]=Math.max(0,Math.min(255,Qt+128))}},H.prototype.addDash=function(R,K){var N=K?7:0,$=2*N+1;if(this.nextRow+$>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var we=0,ge=0;ge=N.minX&&R.x=N.minY&&R.y0&&(ur[new i.OverscaledTileID(N.overscaledZ,Ue,$.z,ge,$.y-1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,N.wrap,$.z,$.x,$.y-1).key]={backfilled:!1},ur[new i.OverscaledTileID(N.overscaledZ,Rt,$.z,dt,$.y-1).key]={backfilled:!1}),$.y+10&&(we.resourceTiming=N._resourceTiming,N._resourceTiming=[]),N.fire(new i.Event("data",we))})},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setData=function(N){var $=this;return this._data=N,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(we){if(we){$.fire(new i.ErrorEvent(we));return}var ge={dataType:"source",sourceDataType:"content"};$._collectResourceTiming&&$._resourceTiming&&$._resourceTiming.length>0&&(ge.resourceTiming=$._resourceTiming,$._resourceTiming=[]),$.fire(new i.Event("data",ge))}),this},R.prototype.getClusterExpansionZoom=function(N,$){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:N,source:this.id},$),this},R.prototype.getClusterChildren=function(N,$){return this.actor.send("geojson.getClusterChildren",{clusterId:N,source:this.id},$),this},R.prototype.getClusterLeaves=function(N,$,we,ge){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:N,limit:$,offset:we},ge),this},R.prototype._updateWorkerData=function(N){var $=this;this._loaded=!1;var we=i.extend({},this.workerOptions),ge=this._data;typeof ge=="string"?(we.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ge),i.ResourceType.Source),we.request.collectResourceTiming=this._collectResourceTiming):we.data=JSON.stringify(ge),this.actor.send(this.type+".loadData",we,function(Ue,dt){$._removed||dt&&dt.abandoned||($._loaded=!0,dt&&dt.resourceTiming&&dt.resourceTiming[$.id]&&($._resourceTiming=dt.resourceTiming[$.id].slice(0)),$.actor.send($.type+".coalesce",{source:we.source},null),N(Ue))})},R.prototype.loaded=function(){return this._loaded},R.prototype.loadTile=function(N,$){var we=this,ge=N.actor?"reloadTile":"loadTile";N.actor=this.actor;var Ue={type:this.type,uid:N.uid,tileID:N.tileID,zoom:N.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};N.request=this.actor.send(ge,Ue,function(dt,Rt){return delete N.request,N.unloadVectorData(),N.aborted?$(null):dt?$(dt):(N.loadVectorData(Rt,we.map.painter,ge==="reloadTile"),$(null))})},R.prototype.abortTile=function(N){N.request&&(N.request.cancel(),delete N.request),N.aborted=!0},R.prototype.unloadTile=function(N){N.unloadVectorData(),this.actor.send("removeTile",{uid:N.uid,type:this.type,source:this.id})},R.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},R.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},R.prototype.hasTransition=function(){return!1},R}(i.Evented),ze=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function R(K,N,$,we){Y.call(this),this.id=K,this.dispatcher=$,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(we),this.options=N}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.load=function(N,$){var we=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(ge,Ue){we._loaded=!0,ge?we.fire(new i.ErrorEvent(ge)):Ue&&(we.image=Ue,N&&(we.coordinates=N),$&&$(),we._finishLoading())})},R.prototype.loaded=function(){return this._loaded},R.prototype.updateImage=function(N){var $=this;return!this.image||!N.url?this:(this.options.url=N.url,this.load(N.coordinates,function(){$.texture=null}),this)},R.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},R.prototype.onAdd=function(N){this.map=N,this.load()},R.prototype.setCoordinates=function(N){var $=this;this.coordinates=N;var we=N.map(i.MercatorCoordinate.fromLngLat);this.tileID=he(we),this.minzoom=this.maxzoom=this.tileID.z;var ge=we.map(function(Ue){return $.tileID.getTilePoint(Ue)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ge[0].x,ge[0].y,0,0),this._boundsArray.emplaceBack(ge[1].x,ge[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ge[3].x,ge[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ge[2].x,ge[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},R.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var N=this.map.painter.context,$=N.gl;this.boundsBuffer||(this.boundsBuffer=N.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(N,this.image,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var we in this.tiles){var ge=this.tiles[we];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},R.prototype.loadTile=function(N,$){this.tileID&&this.tileID.equals(N.tileID.canonical)?(this.tiles[String(N.tileID.wrap)]=N,N.buckets={},$(null)):(N.state="errored",$(null))},R.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},R.prototype.hasTransition=function(){return!1},R}(i.Evented);function he(Y){for(var R=1/0,K=1/0,N=-1/0,$=-1/0,we=0,ge=Y;we$.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+$.start(0)+" and "+$.end(0)+"-second mark."))):this.video.currentTime=N}},R.prototype.getVideo=function(){return this.video},R.prototype.onAdd=function(N){this.map||(this.map=N,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},R.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var N=this.map.painter.context,$=N.gl;this.boundsBuffer||(this.boundsBuffer=N.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE),$.texSubImage2D($.TEXTURE_2D,0,0,0,$.RGBA,$.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(N,this.video,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var we in this.tiles){var ge=this.tiles[we];ge.state!=="loaded"&&(ge.state="loaded",ge.texture=this.texture)}}},R.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},R.prototype.hasTransition=function(){return this.video&&!this.video.paused},R}(Ce),ke=function(Y){function R(K,N,$,we){Y.call(this,K,N,$,we),N.coordinates?(!Array.isArray(N.coordinates)||N.coordinates.length!==4||N.coordinates.some(function(ge){return!Array.isArray(ge)||ge.length!==2||ge.some(function(Ue){return typeof Ue!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas!="string"&&!(N.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,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."+K,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate!==void 0?N.animate:!0}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.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()},R.prototype.getCanvas=function(){return this.canvas},R.prototype.onAdd=function(N){this.map=N,this.load(),this.canvas&&this.animate&&this.play()},R.prototype.onRemove=function(){this.pause()},R.prototype.prepare=function(){var N=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,N=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,N=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var $=this.map.painter.context,we=$.gl;this.boundsBuffer||(this.boundsBuffer=$.createVertexBuffer(this._boundsArray,ze.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(N||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture($,this.canvas,we.RGBA,{premultiply:!0});for(var ge in this.tiles){var Ue=this.tiles[ge];Ue.state!=="loaded"&&(Ue.state="loaded",Ue.texture=this.texture)}}},R.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},R.prototype.hasTransition=function(){return this._playing},R.prototype._hasInvalidDimensions=function(){for(var N=0,$=[this.canvas.width,this.canvas.height];N<$.length;N+=1){var we=$[N];if(isNaN(we)||we<=0)return!0}return!1},R}(Ce),Ee={vector:W,raster:re,"raster-dem":ne,geojson:be,video:te,image:Ce,canvas:ke},Me=function(Y,R,K,N){var $=new Ee[R.type](Y,R,K,N);if($.id!==Y)throw new Error("Expected Source id to be "+Y+" instead of "+$.id);return i.bindAll(["load","abort","unload","serialize","prepare"],$),$},Oe=function(Y){return Ee[Y]},Re=function(Y,R){Ee[Y]=R};function me(Y,R){var K=i.identity([]);return i.translate(K,K,[1,1,0]),i.scale(K,K,[Y.width*.5,Y.height*.5,1]),i.multiply(K,K,Y.calculatePosMatrix(R.toUnwrapped()))}function Be(Y,R,K){if(Y)for(var N=0,$=Y;N<$.length;N+=1){var we=$[N],ge=R[we];if(ge&&ge.source===K&&ge.type==="fill-extrusion")return!0}else for(var Ue in R){var dt=R[Ue];if(dt.source===K&&dt.type==="fill-extrusion")return!0}return!1}function fe(Y,R,K,N,$,we){var ge=Be($&&$.layers,R,Y.id),Ue=we.maxPitchScaleFactor(),dt=Y.tilesIn(N,Ue,ge);dt.sort(gt);for(var Rt=[],ur=0,gr=dt;urthis.max){var Ue=this._getAndRemoveByKey(this.order[0]);Ue&&this.onRemove(Ue)}return this},Qe.prototype.has=function(R){return R.wrapped().key in this.data},Qe.prototype.getAndRemove=function(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null},Qe.prototype._getAndRemoveByKey=function(R){var K=this.data[R].shift();return K.timeout&&clearTimeout(K.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),K.value},Qe.prototype.getByKey=function(R){var K=this.data[R];return K?K[0].value:null},Qe.prototype.get=function(R){if(!this.has(R))return null;var K=this.data[R.wrapped().key][0];return K.value},Qe.prototype.remove=function(R,K){if(!this.has(R))return this;var N=R.wrapped().key,$=K===void 0?0:this.data[N].indexOf(K),we=this.data[N][$];return this.data[N].splice($,1),we.timeout&&clearTimeout(we.timeout),this.data[N].length===0&&delete this.data[N],this.onRemove(we.value),this.order.splice(this.order.indexOf(N),1),this},Qe.prototype.setMaxSize=function(R){for(this.max=R;this.order.length>this.max;){var K=this._getAndRemoveByKey(this.order[0]);K&&this.onRemove(K)}return this},Qe.prototype.filter=function(R){var K=[];for(var N in this.data)for(var $=0,we=this.data[N];$1||(Math.abs(gr)>1&&(Math.abs(gr+It)===1?gr+=It:Math.abs(gr-It)===1&&(gr-=It)),!(!ur.dem||!Rt.dem)&&(Rt.dem.backfillBorder(ur.dem,gr,cr),Rt.neighboringTiles&&Rt.neighboringTiles[Qt]&&(Rt.neighboringTiles[Qt].backfilled=!0)))}},R.prototype.getTile=function(N){return this.getTileByID(N.key)},R.prototype.getTileByID=function(N){return this._tiles[N]},R.prototype._retainLoadedChildren=function(N,$,we,ge){for(var Ue in this._tiles){var dt=this._tiles[Ue];if(!(ge[Ue]||!dt.hasData()||dt.tileID.overscaledZ<=$||dt.tileID.overscaledZ>we)){for(var Rt=dt.tileID;dt&&dt.tileID.overscaledZ>$+1;){var ur=dt.tileID.scaledTo(dt.tileID.overscaledZ-1);dt=this._tiles[ur.key],dt&&dt.hasData()&&(Rt=ur)}for(var gr=Rt;gr.overscaledZ>$;)if(gr=gr.scaledTo(gr.overscaledZ-1),N[gr.key]){ge[Rt.key]=Rt;break}}}},R.prototype.findLoadedParent=function(N,$){if(N.key in this._loadedParentTiles){var we=this._loadedParentTiles[N.key];return we&&we.tileID.overscaledZ>=$?we:null}for(var ge=N.overscaledZ-1;ge>=$;ge--){var Ue=N.scaledTo(ge),dt=this._getLoadedTile(Ue);if(dt)return dt}},R.prototype._getLoadedTile=function(N){var $=this._tiles[N.key];if($&&$.hasData())return $;var we=this._cache.getByKey(N.wrapped().key);return we},R.prototype.updateCacheSize=function(N){var $=Math.ceil(N.width/this._source.tileSize)+1,we=Math.ceil(N.height/this._source.tileSize)+1,ge=$*we,Ue=5,dt=Math.floor(ge*Ue),Rt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,dt):dt;this._cache.setMaxSize(Rt)},R.prototype.handleWrapJump=function(N){var $=this._prevLng===void 0?N:this._prevLng,we=N-$,ge=we/360,Ue=Math.round(ge);if(this._prevLng=N,Ue){var dt={};for(var Rt in this._tiles){var ur=this._tiles[Rt];ur.tileID=ur.tileID.unwrapTo(ur.tileID.wrap+Ue),dt[ur.tileID.key]=ur}this._tiles=dt;for(var gr in this._timers)clearTimeout(this._timers[gr]),delete this._timers[gr];for(var cr in this._tiles){var It=this._tiles[cr];this._setTileReloadTimer(cr,It)}}},R.prototype.update=function(N){var $=this;if(this.transform=N,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(N),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var we;this.used?this._source.tileID?we=N.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(vn){return new i.OverscaledTileID(vn.canonical.z,vn.wrap,vn.canonical.z,vn.canonical.x,vn.canonical.y)}):(we=N.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(we=we.filter(function(vn){return $._source.hasTile(vn)}))):we=[];var ge=N.coveringZoomLevel(this._source),Ue=Math.max(ge-R.maxOverzooming,this._source.minzoom),dt=Math.max(ge+R.maxUnderzooming,this._source.minzoom),Rt=this._updateRetainedTiles(we,ge);if(Rr(this._source.type)){for(var ur={},gr={},cr=Object.keys(Rt),It=0,Qt=cr;Itthis._source.maxzoom){var Dr=mr.children(this._source.maxzoom)[0],Xr=this.getTile(Dr);if(Xr&&Xr.hasData()){we[Dr.key]=Dr;continue}}else{var Gr=mr.children(this._source.maxzoom);if(we[Gr[0].key]&&we[Gr[1].key]&&we[Gr[2].key]&&we[Gr[3].key])continue}for(var Fr=Pr.wasRequested(),Kr=mr.overscaledZ-1;Kr>=Ue;--Kr){var Cr=mr.scaledTo(Kr);if(ge[Cr.key]||(ge[Cr.key]=!0,Pr=this.getTile(Cr),!Pr&&Fr&&(Pr=this._addTile(Cr)),Pr&&(we[Cr.key]=Cr,Fr=Pr.wasRequested(),Pr.hasData())))break}}}return we},R.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var N in this._tiles){for(var $=[],we=void 0,ge=this._tiles[N].tileID;ge.overscaledZ>0;){if(ge.key in this._loadedParentTiles){we=this._loadedParentTiles[ge.key];break}$.push(ge.key);var Ue=ge.scaledTo(ge.overscaledZ-1);if(we=this._getLoadedTile(Ue),we)break;ge=Ue}for(var dt=0,Rt=$;dt0)&&($.hasData()&&$.state!=="reloading"?this._cache.add($.tileID,$,$.getExpiryTimeout()):($.aborted=!0,this._abortTile($),this._unloadTile($))))},R.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var N in this._tiles)this._removeTile(N);this._cache.reset()},R.prototype.tilesIn=function(N,$,we){var ge=this,Ue=[],dt=this.transform;if(!dt)return Ue;for(var Rt=we?dt.getCameraQueryGeometry(N):N,ur=N.map(function(Kr){return dt.pointCoordinate(Kr)}),gr=Rt.map(function(Kr){return dt.pointCoordinate(Kr)}),cr=this.getIds(),It=1/0,Qt=1/0,ar=-1/0,mr=-1/0,Pr=0,Dr=gr;Pr=0&&Qa[1].y+vn>=0){var ra=ur.map(function(sl){return yi.getTilePoint(sl)}),mo=gr.map(function(sl){return yi.getTilePoint(sl)});Ue.push({tile:Cr,tileID:yi,queryGeometry:ra,cameraQueryGeometry:mo,scale:qi})}}},Fr=0;Fr=i.browser.now())return!0}return!1},R.prototype.setFeatureState=function(N,$,we){N=N||"_geojsonTileLayer",this._state.updateState(N,$,we)},R.prototype.removeFeatureState=function(N,$,we){N=N||"_geojsonTileLayer",this._state.removeFeatureState(N,$,we)},R.prototype.getFeatureState=function(N,$){return N=N||"_geojsonTileLayer",this._state.getState(N,$)},R.prototype.setDependencies=function(N,$,we){var ge=this._tiles[N];ge&&ge.setDependencies($,we)},R.prototype.reloadTilesForDependencies=function(N,$){for(var we in this._tiles){var ge=this._tiles[we];ge.hasDependency(N,$)&&this._reloadTile(we,"reloading")}this._cache.filter(function(Ue){return!Ue.hasDependency(N,$)})},R}(i.Evented);zr.maxOverzooming=10,zr.maxUnderzooming=3;function Tr(Y,R){var K=Math.abs(Y.wrap*2)-+(Y.wrap<0),N=Math.abs(R.wrap*2)-+(R.wrap<0);return Y.overscaledZ-R.overscaledZ||N-K||R.canonical.y-Y.canonical.y||R.canonical.x-Y.canonical.x}function Rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function Br(){return new i.window.Worker(Ou.workerUrl)}var oi="mapboxgl_preloaded_worker_pool",vi=function(){this.active={}};vi.prototype.acquire=function(R){if(!this.workers)for(this.workers=[];this.workers.length0?($-ge)/Ue:0;return this.points[we].mult(1-dt).add(this.points[K].mult(dt))};var Qr=function(R,K,N){var $=this.boxCells=[],we=this.circleCells=[];this.xCellCount=Math.ceil(R/N),this.yCellCount=Math.ceil(K/N);for(var ge=0;gethis.width||$<0||K>this.height)return we?!1:[];var Ue=[];if(R<=0&&K<=0&&this.width<=N&&this.height<=$){if(we)return!0;for(var dt=0;dt0:Ue}},Qr.prototype._queryCircle=function(R,K,N,$,we){var ge=R-N,Ue=R+N,dt=K-N,Rt=K+N;if(Ue<0||ge>this.width||Rt<0||dt>this.height)return $?!1:[];var ur=[],gr={hitTest:$,circle:{x:R,y:K,radius:N},seenUids:{box:{},circle:{}}};return this._forEachCell(ge,dt,Ue,Rt,this._queryCellCircle,ur,gr,we),$?ur.length>0:ur},Qr.prototype.query=function(R,K,N,$,we){return this._query(R,K,N,$,!1,we)},Qr.prototype.hitTest=function(R,K,N,$,we){return this._query(R,K,N,$,!0,we)},Qr.prototype.hitTestCircle=function(R,K,N,$){return this._queryCircle(R,K,N,!0,$)},Qr.prototype._queryCell=function(R,K,N,$,we,ge,Ue,dt){var Rt=Ue.seenUids,ur=this.boxCells[we];if(ur!==null)for(var gr=this.bboxes,cr=0,It=ur;cr=gr[ar+0]&&$>=gr[ar+1]&&(!dt||dt(this.boxKeys[Qt]))){if(Ue.hitTest)return ge.push(!0),!0;ge.push({key:this.boxKeys[Qt],x1:gr[ar],y1:gr[ar+1],x2:gr[ar+2],y2:gr[ar+3]})}}}var mr=this.circleCells[we];if(mr!==null)for(var Pr=this.circles,Dr=0,Xr=mr;DrUe*Ue+dt*dt},Qr.prototype._circleAndRectCollide=function(R,K,N,$,we,ge,Ue){var dt=(ge-$)/2,Rt=Math.abs(R-($+dt));if(Rt>dt+N)return!1;var ur=(Ue-we)/2,gr=Math.abs(K-(we+ur));if(gr>ur+N)return!1;if(Rt<=dt||gr<=ur)return!0;var cr=Rt-dt,It=gr-ur;return cr*cr+It*It<=N*N};function Ui(Y,R,K,N,$){var we=i.create();return R?(i.scale(we,we,[1/$,1/$,1]),K||i.rotateZ(we,we,N.angle)):i.multiply(we,N.labelPlaneMatrix,Y),we}function zn(Y,R,K,N,$){if(R){var we=i.clone(Y);return i.scale(we,we,[$,$,1]),K||i.rotateZ(we,we,-N.angle),we}else return N.glCoordMatrix}function fn(Y,R){var K=[Y.x,Y.y,0,1];un(K,K,R);var N=K[3];return{point:new i.Point(K[0]/N,K[1]/N),signedDistanceFromCamera:N}}function xn(Y,R){return .5+.5*(Y/R)}function _a(Y,R){var K=Y[0]/Y[3],N=Y[1]/Y[3],$=K>=-R[0]&&K<=R[0]&&N>=-R[1]&&N<=R[1];return $}function Wn(Y,R,K,N,$,we,ge,Ue){var dt=N?Y.textSizeData:Y.iconSizeData,Rt=i.evaluateSizeForZoom(dt,K.transform.zoom),ur=[256/K.width*2+1,256/K.height*2+1],gr=N?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;gr.clear();for(var cr=Y.lineVertexArray,It=N?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Qt=K.transform.width/K.transform.height,ar=!1,mr=0;mrwe)return{useVertical:!0}}return(Y===i.WritingMode.vertical?R.yK.x)?{needsFlipping:!0}:null}function za(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur,gr,cr,It){var Qt=R/24,ar=Y.lineOffsetX*Qt,mr=Y.lineOffsetY*Qt,Pr;if(Y.numGlyphs>1){var Dr=Y.glyphStartIndex+Y.numGlyphs,Xr=Y.lineStartIndex,Gr=Y.lineStartIndex+Y.lineLength,Fr=Fn(Qt,Ue,ar,mr,K,ur,gr,Y,dt,we,cr);if(!Fr)return{notEnoughRoom:!0};var Kr=fn(Fr.first.point,ge).point,Cr=fn(Fr.last.point,ge).point;if(N&&!K){var yi=ia(Y.writingMode,Kr,Cr,It);if(yi)return yi}Pr=[Fr.first];for(var qi=Y.glyphStartIndex+1;qi0?mo.point:Hr(gr,ra,vn,1,$),Os=ia(Y.writingMode,vn,sl,It);if(Os)return Os}var eo=na(Qt*Ue.getoffsetX(Y.glyphStartIndex),ar,mr,K,ur,gr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,dt,we,cr);if(!eo)return{notEnoughRoom:!0};Pr=[eo]}for(var fs=0,es=Pr;fs0?1:-1,Qt=0;N&&(It*=-1,Qt=Math.PI),It<0&&(Qt+=Math.PI);for(var ar=It>0?Ue+ge:Ue+ge+1,mr=$,Pr=$,Dr=0,Xr=0,Gr=Math.abs(cr),Fr=[];Dr+Xr<=Gr;){if(ar+=It,ar=dt)return null;if(Pr=mr,Fr.push(mr),mr=gr[ar],mr===void 0){var Kr=new i.Point(Rt.getx(ar),Rt.gety(ar)),Cr=fn(Kr,ur);if(Cr.signedDistanceFromCamera>0)mr=gr[ar]=Cr.point;else{var yi=ar-It,qi=Dr===0?we:new i.Point(Rt.getx(yi),Rt.gety(yi));mr=Hr(qi,Kr,Pr,Gr-Dr+1,ur)}}Dr+=Xr,Xr=Pr.dist(mr)}var vn=(Gr-Dr)/Xr,Qa=mr.sub(Pr),ra=Qa.mult(vn)._add(Pr);ra._add(Qa._unit()._perp()._mult(K*It));var mo=Qt+Math.atan2(mr.y-Pr.y,mr.x-Pr.x);return Fr.push(ra),{point:ra,angle:mo,path:Fr}}var go=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Dn(Y,R){for(var K=0;K=1;$s--)es.push(eo.path[$s]);for(var Ml=1;Ml0){for(var du=es[0].clone(),Nu=es[0].clone(),yf=1;yf=mo.x&&Nu.x<=sl.x&&du.y>=mo.y&&Nu.y<=sl.y?$u=[es]:Nu.xsl.x||Nu.ysl.y?$u=[]:$u=i.clipLine([es],mo.x,mo.y,sl.x,sl.y)}for(var Kf=0,wd=$u;Kf=this.screenRightBoundary||$this.screenBottomBoundary},Wo.prototype.isInsideGrid=function(R,K,N,$){return N>=0&&R=0&&K0){var Gr;return this.prevPlacement&&this.prevPlacement.variableOffsets[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID]&&this.prevPlacement.placements[cr.crossTileID].text&&(Gr=this.prevPlacement.variableOffsets[cr.crossTileID].anchor),this.variableOffsets[cr.crossTileID]={textOffset:mr,width:N,height:$,anchor:R,textBoxScale:we,prevAnchor:Gr},this.markUsedJustification(It,R,cr,Qt),It.allowVerticalPlacement&&(this.markUsedOrientation(It,Qt,cr),this.placedOrientations[cr.crossTileID]=Qt),{shift:Pr,placedGlyphBoxes:Dr}}},to.prototype.placeLayerBucketPart=function(R,K,N){var $=this,we=R.parameters,ge=we.bucket,Ue=we.layout,dt=we.posMatrix,Rt=we.textLabelPlaneMatrix,ur=we.labelToScreenMatrix,gr=we.textPixelRatio,cr=we.holdingForFade,It=we.collisionBoxArray,Qt=we.partiallyEvaluatedTextSize,ar=we.collisionGroup,mr=Ue.get("text-optional"),Pr=Ue.get("icon-optional"),Dr=Ue.get("text-allow-overlap"),Xr=Ue.get("icon-allow-overlap"),Gr=Ue.get("text-rotation-alignment")==="map",Fr=Ue.get("text-pitch-alignment")==="map",Kr=Ue.get("icon-text-fit")!=="none",Cr=Ue.get("symbol-z-order")==="viewport-y",yi=Dr&&(Xr||!ge.hasIconData()||Pr),qi=Xr&&(Dr||!ge.hasTextData()||mr);!ge.collisionArrays&&It&&ge.deserializeCollisionBoxes(It);var vn=function(eo,fs){if(!K[eo.crossTileID]){if(cr){$.placements[eo.crossTileID]=new Ha(!1,!1,!1);return}var es=!1,$s=!1,Ml=!0,Mu=null,Au={box:null,offscreen:null},$u={box:null,offscreen:null},du=null,Nu=null,yf=null,Kf=0,wd=0,Td=0;fs.textFeatureIndex?Kf=fs.textFeatureIndex:eo.useRuntimeCollisionCircles&&(Kf=eo.featureIndex),fs.verticalTextFeatureIndex&&(wd=fs.verticalTextFeatureIndex);var Ad=fs.textBox;if(Ad){var Yp=function(yc){var Ff=i.WritingMode.horizontal;if(ge.allowVerticalPlacement&&!yc&&$.prevPlacement){var Ed=$.prevPlacement.placedOrientations[eo.crossTileID];Ed&&($.placedOrientations[eo.crossTileID]=Ed,Ff=Ed,$.markUsedOrientation(ge,Ff,eo))}return Ff},fy=function(yc,Ff){if(ge.allowVerticalPlacement&&eo.numVerticalGlyphVertices>0&&fs.verticalTextBox)for(var Ed=0,sg=ge.writingModes;Ed0&&(Gd=Gd.filter(function(yc){return yc!==Md.anchor}),Gd.unshift(Md.anchor))}var kp=function(yc,Ff,Ed){for(var sg=yc.x2-yc.x1,A1=yc.y2-yc.y1,Zf=eo.textBoxScale,Ox=Kr&&!Xr?Ff:null,am={box:[],offscreen:!1},Mw=Dr?Gd.length*2:Gd.length,Lp=0;Lp=Gd.length,Nx=$.attemptAnchorPlacement(om,yc,sg,A1,Zf,Gr,Fr,gr,dt,ar,Ew,eo,ge,Ed,Ox);if(Nx&&(am=Nx.placedGlyphBoxes,am&&am.box&&am.box.length)){es=!0,Mu=Nx.shift;break}}return am},Kp=function(){return kp(Ad,fs.iconBox,i.WritingMode.horizontal)},Cp=function(){var yc=fs.verticalTextBox,Ff=Au&&Au.box&&Au.box.length;return ge.allowVerticalPlacement&&!Ff&&eo.numVerticalGlyphVertices>0&&yc?kp(yc,fs.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};fy(Kp,Cp),Au&&(es=Au.box,Ml=Au.offscreen);var ng=Yp(Au&&Au.box);if(!es&&$.prevPlacement){var cy=$.prevPlacement.variableOffsets[eo.crossTileID];cy&&($.variableOffsets[eo.crossTileID]=cy,$.markUsedJustification(ge,cy.anchor,eo,ng))}}else{var pv=function(yc,Ff){var Ed=$.collisionIndex.placeCollisionBox(yc,Dr,gr,dt,ar.predicate);return Ed&&Ed.box&&Ed.box.length&&($.markUsedOrientation(ge,Ff,eo),$.placedOrientations[eo.crossTileID]=Ff),Ed},Sd=function(){return pv(Ad,i.WritingMode.horizontal)},vv=function(){var yc=fs.verticalTextBox;return ge.allowVerticalPlacement&&eo.numVerticalGlyphVertices>0&&yc?pv(yc,i.WritingMode.vertical):{box:null,offscreen:null}};fy(Sd,vv),Yp(Au&&Au.box&&Au.box.length)}}if(du=Au,es=du&&du.box&&du.box.length>0,Ml=du&&du.offscreen,eo.useRuntimeCollisionCircles){var vh=ge.text.placedSymbolArray.get(eo.centerJustifiedTextSymbolIndex),hy=i.evaluateSizeForFeature(ge.textSizeData,Qt,vh),ag=Ue.get("text-padding"),jh=eo.collisionCircleDiameter;Nu=$.collisionIndex.placeCollisionCircles(Dr,vh,ge.lineVertexArray,ge.glyphOffsetArray,hy,dt,Rt,ur,N,Fr,ar.predicate,jh,ag),es=Dr||Nu.circles.length>0&&!Nu.collisionDetected,Ml=Ml&&Nu.offscreen}if(fs.iconFeatureIndex&&(Td=fs.iconFeatureIndex),fs.iconBox){var rm=function(yc){var Ff=Kr&&Mu?Ja(yc,Mu.x,Mu.y,Gr,Fr,$.transform.angle):yc;return $.collisionIndex.placeCollisionBox(Ff,Xr,gr,dt,ar.predicate)};$u&&$u.box&&$u.box.length&&fs.verticalIconBox?(yf=rm(fs.verticalIconBox),$s=yf.box.length>0):(yf=rm(fs.iconBox),$s=yf.box.length>0),Ml=Ml&&yf.offscreen}var w1=mr||eo.numHorizontalGlyphVertices===0&&eo.numVerticalGlyphVertices===0,T1=Pr||eo.numIconVertices===0;if(!w1&&!T1?$s=es=$s&&es:T1?w1||($s=$s&&es):es=$s&&es,es&&du&&du.box&&($u&&$u.box&&wd?$.collisionIndex.insertCollisionBox(du.box,Ue.get("text-ignore-placement"),ge.bucketInstanceId,wd,ar.ID):$.collisionIndex.insertCollisionBox(du.box,Ue.get("text-ignore-placement"),ge.bucketInstanceId,Kf,ar.ID)),$s&&yf&&$.collisionIndex.insertCollisionBox(yf.box,Ue.get("icon-ignore-placement"),ge.bucketInstanceId,Td,ar.ID),Nu&&(es&&$.collisionIndex.insertCollisionCircles(Nu.circles,Ue.get("text-ignore-placement"),ge.bucketInstanceId,Kf,ar.ID),N)){var og=ge.bucketInstanceId,im=$.collisionCircleArrays[og];im===void 0&&(im=$.collisionCircleArrays[og]=new tn);for(var nm=0;nm=0;--ra){var mo=Qa[ra];vn(ge.symbolInstances.get(mo),ge.collisionArrays[mo])}else for(var sl=R.symbolInstanceStart;sl=0&&(ge>=0&&ur!==ge?R.text.placedSymbolArray.get(ur).crossTileID=0:R.text.placedSymbolArray.get(ur).crossTileID=N.crossTileID)}},to.prototype.markUsedOrientation=function(R,K,N){for(var $=K===i.WritingMode.horizontal||K===i.WritingMode.horizontalOnly?K:0,we=K===i.WritingMode.vertical?K:0,ge=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex],Ue=0,dt=ge;Ue0||Fr>0,vn=Xr.numIconVertices>0,Qa=$.placedOrientations[Xr.crossTileID],ra=Qa===i.WritingMode.vertical,mo=Qa===i.WritingMode.horizontal||Qa===i.WritingMode.horizontalOnly;if(qi){var sl=Co(yi.text),Os=ra?Fi:sl;Qt(R.text,Gr,Os);var eo=mo?Fi:sl;Qt(R.text,Fr,eo);var fs=yi.text.isHidden();[Xr.rightJustifiedTextSymbolIndex,Xr.centerJustifiedTextSymbolIndex,Xr.leftJustifiedTextSymbolIndex].forEach(function(Td){Td>=0&&(R.text.placedSymbolArray.get(Td).hidden=fs||ra?1:0)}),Xr.verticalPlacedTextSymbolIndex>=0&&(R.text.placedSymbolArray.get(Xr.verticalPlacedTextSymbolIndex).hidden=fs||mo?1:0);var es=$.variableOffsets[Xr.crossTileID];es&&$.markUsedJustification(R,es.anchor,Xr,Qa);var $s=$.placedOrientations[Xr.crossTileID];$s&&($.markUsedJustification(R,"left",Xr,$s),$.markUsedOrientation(R,$s,Xr))}if(vn){var Ml=Co(yi.icon),Mu=!(cr&&Xr.verticalPlacedIconSymbolIndex&&ra);if(Xr.placedIconSymbolIndex>=0){var Au=Mu?Ml:Fi;Qt(R.icon,Xr.numIconVertices,Au),R.icon.placedSymbolArray.get(Xr.placedIconSymbolIndex).hidden=yi.icon.isHidden()}if(Xr.verticalPlacedIconSymbolIndex>=0){var $u=Mu?Fi:Ml;Qt(R.icon,Xr.numVerticalIconVertices,$u),R.icon.placedSymbolArray.get(Xr.verticalPlacedIconSymbolIndex).hidden=yi.icon.isHidden()}}if(R.hasIconCollisionBoxData()||R.hasTextCollisionBoxData()){var du=R.collisionArrays[Dr];if(du){var Nu=new i.Point(0,0);if(du.textBox||du.verticalTextBox){var yf=!0;if(Rt){var Kf=$.variableOffsets[Kr];Kf?(Nu=ts(Kf.anchor,Kf.width,Kf.height,Kf.textOffset,Kf.textBoxScale),ur&&Nu._rotate(gr?$.transform.angle:-$.transform.angle)):yf=!1}du.textBox&&Ri(R.textCollisionBox.collisionVertexArray,yi.text.placed,!yf||ra,Nu.x,Nu.y),du.verticalTextBox&&Ri(R.textCollisionBox.collisionVertexArray,yi.text.placed,!yf||mo,Nu.x,Nu.y)}var wd=!!(!mo&&du.verticalIconBox);du.iconBox&&Ri(R.iconCollisionBox.collisionVertexArray,yi.icon.placed,wd,cr?Nu.x:0,cr?Nu.y:0),du.verticalIconBox&&Ri(R.iconCollisionBox.collisionVertexArray,yi.icon.placed,!wd,cr?Nu.x:0,cr?Nu.y:0)}}},mr=0;mrR},to.prototype.setStale=function(){this.stale=!0};function Ri(Y,R,K,N,$){Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0),Y.emplaceBack(R?1:0,K?1:0,N||0,$||0)}var an=Math.pow(2,25),cs=Math.pow(2,24),pa=Math.pow(2,17),ln=Math.pow(2,16),ka=Math.pow(2,9),va=Math.pow(2,8),bo=Math.pow(2,1);function Co(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var R=Y.placed?1:0,K=Math.floor(Y.opacity*127);return K*an+R*cs+K*pa+R*ln+K*ka+R*va+K*bo+R}var Fi=0,Yn=function(R){this._sortAcrossTiles=R.layout.get("symbol-z-order")!=="viewport-y"&&R.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Yn.prototype.continuePlacement=function(R,K,N,$,we){for(var ge=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Ue=R[this._currentPlacementIndex],dt=K[Ue],Rt=this.placement.collisionIndex.transform.zoom;if(dt.type==="symbol"&&(!dt.minzoom||dt.minzoom<=Rt)&&(!dt.maxzoom||dt.maxzoom>Rt)){this._inProgressLayer||(this._inProgressLayer=new Yn(dt));var ur=this._inProgressLayer.continuePlacement(N[dt.source],this.placement,this._showCollisionBoxes,dt,ge);if(ur)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},xa.prototype.commit=function(R){return this.placement.commit(R),this.placement};var Qi=512/i.EXTENT/2,Nn=function(R,K,N){this.tileID=R,this.indexedSymbolInstances={},this.bucketInstanceId=N;for(var $=0;$R.overscaledZ)for(var Rt in dt){var ur=dt[Rt];ur.tileID.isChildOf(R)&&ur.findMatches(K.symbolInstances,R,ge)}else{var gr=R.scaledTo(Number(Ue)),cr=dt[gr.key];cr&&cr.findMatches(K.symbolInstances,R,ge)}}for(var It=0;It0)throw new Error("Unimplemented: "+ge.map(function(Ue){return Ue.command}).join(", ")+".");return we.forEach(function(Ue){Ue.command!=="setTransition"&&$[Ue.command].apply($,Ue.args)}),this.stylesheet=N,!0},R.prototype.addImage=function(N,$){if(this.getImage(N))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(N,$),this._afterImageUpdated(N)},R.prototype.updateImage=function(N,$){this.imageManager.updateImage(N,$)},R.prototype.getImage=function(N){return this.imageManager.getImage(N)},R.prototype.removeImage=function(N){if(!this.getImage(N))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(N),this._afterImageUpdated(N)},R.prototype._afterImageUpdated=function(N){this._availableImages=this.imageManager.listImages(),this._changedImages[N]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},R.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},R.prototype.addSource=function(N,$,we){var ge=this;if(we===void 0&&(we={}),this._checkLoaded(),this.sourceCaches[N]!==void 0)throw new Error("There is already a source with this ID");if(!$.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys($).join(", ")+".");var Ue=["vector","raster","geojson","video","image"],dt=Ue.indexOf($.type)>=0;if(!(dt&&this._validate(i.validateStyle.source,"sources."+N,$,null,we))){this.map&&this.map._collectResourceTiming&&($.collectResourceTiming=!0);var Rt=this.sourceCaches[N]=new zr(N,$,this.dispatcher);Rt.style=this,Rt.setEventedParent(this,function(){return{isSourceLoaded:ge.loaded(),source:Rt.serialize(),sourceId:N}}),Rt.onAdd(this.map),this._changed=!0}},R.prototype.removeSource=function(N){if(this._checkLoaded(),this.sourceCaches[N]===void 0)throw new Error("There is no source with this ID");for(var $ in this._layers)if(this._layers[$].source===N)return this.fire(new i.ErrorEvent(new Error('Source "'+N+'" cannot be removed while layer "'+$+'" is using it.')));var we=this.sourceCaches[N];delete this.sourceCaches[N],delete this._updatedSources[N],we.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:N})),we.setEventedParent(null),we.clearTiles(),we.onRemove&&we.onRemove(this.map),this._changed=!0},R.prototype.setGeoJSONSourceData=function(N,$){this._checkLoaded();var we=this.sourceCaches[N].getSource();we.setData($),this._changed=!0},R.prototype.getSource=function(N){return this.sourceCaches[N]&&this.sourceCaches[N].getSource()},R.prototype.addLayer=function(N,$,we){we===void 0&&(we={}),this._checkLoaded();var ge=N.id;if(this.getLayer(ge)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ge+'" already exists on this map')));return}var Ue;if(N.type==="custom"){if(Vo(this,i.validateCustomStyleLayer(N)))return;Ue=i.createStyleLayer(N)}else{if(typeof N.source=="object"&&(this.addSource(ge,N.source),N=i.clone$1(N),N=i.extend(N,{source:ge})),this._validate(i.validateStyle.layer,"layers."+ge,N,{arrayIndex:-1},we))return;Ue=i.createStyleLayer(N),this._validateLayer(Ue),Ue.setEventedParent(this,{layer:{id:ge}}),this._serializedLayers[Ue.id]=Ue.serialize()}var dt=$?this._order.indexOf($):this._order.length;if($&&dt===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}if(this._order.splice(dt,0,ge),this._layerOrderChanged=!0,this._layers[ge]=Ue,this._removedLayers[ge]&&Ue.source&&Ue.type!=="custom"){var Rt=this._removedLayers[ge];delete this._removedLayers[ge],Rt.type!==Ue.type?this._updatedSources[Ue.source]="clear":(this._updatedSources[Ue.source]="reload",this.sourceCaches[Ue.source].pause())}this._updateLayer(Ue),Ue.onAdd&&Ue.onAdd(this.map)},R.prototype.moveLayer=function(N,$){this._checkLoaded(),this._changed=!0;var we=this._layers[N];if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be moved.")));return}if(N!==$){var ge=this._order.indexOf(N);this._order.splice(ge,1);var Ue=$?this._order.indexOf($):this._order.length;if($&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}this._order.splice(Ue,0,N),this._layerOrderChanged=!0}},R.prototype.removeLayer=function(N){this._checkLoaded();var $=this._layers[N];if(!$){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be removed.")));return}$.setEventedParent(null);var we=this._order.indexOf(N);this._order.splice(we,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[N]=$,delete this._layers[N],delete this._serializedLayers[N],delete this._updatedLayers[N],delete this._updatedPaintProps[N],$.onRemove&&$.onRemove(this.map)},R.prototype.getLayer=function(N){return this._layers[N]},R.prototype.hasLayer=function(N){return N in this._layers},R.prototype.setLayerZoomRange=function(N,$,we){this._checkLoaded();var ge=this.getLayer(N);if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot have zoom extent.")));return}ge.minzoom===$&&ge.maxzoom===we||($!=null&&(ge.minzoom=$),we!=null&&(ge.maxzoom=we),this._updateLayer(ge))},R.prototype.setFilter=function(N,$,we){we===void 0&&(we={}),this._checkLoaded();var ge=this.getLayer(N);if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ge.filter,$)){if($==null){ge.filter=void 0,this._updateLayer(ge);return}this._validate(i.validateStyle.filter,"layers."+ge.id+".filter",$,null,we)||(ge.filter=i.clone$1($),this._updateLayer(ge))}},R.prototype.getFilter=function(N){return i.clone$1(this.getLayer(N).filter)},R.prototype.setLayoutProperty=function(N,$,we,ge){ge===void 0&&(ge={}),this._checkLoaded();var Ue=this.getLayer(N);if(!Ue){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(Ue.getLayoutProperty($),we)||(Ue.setLayoutProperty($,we,ge),this._updateLayer(Ue))},R.prototype.getLayoutProperty=function(N,$){var we=this.getLayer(N);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style.")));return}return we.getLayoutProperty($)},R.prototype.setPaintProperty=function(N,$,we,ge){ge===void 0&&(ge={}),this._checkLoaded();var Ue=this.getLayer(N);if(!Ue){this.fire(new i.ErrorEvent(new Error("The layer '"+N+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(Ue.getPaintProperty($),we)){var dt=Ue.setPaintProperty($,we,ge);dt&&this._updateLayer(Ue),this._changed=!0,this._updatedPaintProps[N]=!0}},R.prototype.getPaintProperty=function(N,$){return this.getLayer(N).getPaintProperty($)},R.prototype.setFeatureState=function(N,$){this._checkLoaded();var we=N.source,ge=N.sourceLayer,Ue=this.sourceCaches[we];if(Ue===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+we+"' does not exist in the map's style.")));return}var dt=Ue.getSource().type;if(dt==="geojson"&&ge){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(dt==="vector"&&!ge){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}N.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Ue.setFeatureState(ge,N.id,$)},R.prototype.removeFeatureState=function(N,$){this._checkLoaded();var we=N.source,ge=this.sourceCaches[we];if(ge===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+we+"' does not exist in the map's style.")));return}var Ue=ge.getSource().type,dt=Ue==="vector"?N.sourceLayer:void 0;if(Ue==="vector"&&!dt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if($&&typeof N.id!="string"&&typeof N.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ge.removeFeatureState(dt,N.id,$)},R.prototype.getFeatureState=function(N){this._checkLoaded();var $=N.source,we=N.sourceLayer,ge=this.sourceCaches[$];if(ge===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+$+"' does not exist in the map's style.")));return}var Ue=ge.getSource().type;if(Ue==="vector"&&!we){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return N.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ge.getFeatureState(we,N.id)},R.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},R.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(N){return N.serialize()}),layers:this._serializeLayers(this._order)},function(N){return N!==void 0})},R.prototype._updateLayer=function(N){this._updatedLayers[N.id]=!0,N.source&&!this._updatedSources[N.source]&&this.sourceCaches[N.source].getSource().type!=="raster"&&(this._updatedSources[N.source]="reload",this.sourceCaches[N.source].pause()),this._changed=!0},R.prototype._flattenAndSortRenderedFeatures=function(N){for(var $=this,we=function(mo){return $._layers[mo].type==="fill-extrusion"},ge={},Ue=[],dt=this._order.length-1;dt>=0;dt--){var Rt=this._order[dt];if(we(Rt)){ge[Rt]=dt;for(var ur=0,gr=N;ur=0;Dr--){var Xr=this._order[Dr];if(we(Xr))for(var Gr=Ue.length-1;Gr>=0;Gr--){var Fr=Ue[Gr].feature;if(ge[Fr.layer.id]>16,Ue>>16],u_pixel_coord_lower:[ge&65535,Ue&65535]}}function Zs(Y,R,K,N){var $=K.imageManager.getPattern(Y.from.toString()),we=K.imageManager.getPattern(Y.to.toString()),ge=K.imageManager.getPixelSize(),Ue=ge.width,dt=ge.height,Rt=Math.pow(2,N.tileID.overscaledZ),ur=N.tileSize*Math.pow(2,K.transform.tileZoom)/Rt,gr=ur*(N.tileID.canonical.x+N.tileID.wrap*Rt),cr=ur*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:$.tl,u_pattern_br_a:$.br,u_pattern_tl_b:we.tl,u_pattern_br_b:we.br,u_texsize:[Ue,dt],u_mix:R.t,u_pattern_size_a:$.displaySize,u_pattern_size_b:we.displaySize,u_scale_a:R.fromScale,u_scale_b:R.toScale,u_tile_units_to_pixels:1/Ba(N,1,K.transform.tileZoom),u_pixel_coord_upper:[gr>>16,cr>>16],u_pixel_coord_lower:[gr&65535,cr&65535]}}var Fs=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_lightpos:new i.Uniform3f(Y,R.u_lightpos),u_lightintensity:new i.Uniform1f(Y,R.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,R.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,R.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},ws=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_lightpos:new i.Uniform3f(Y,R.u_lightpos),u_lightintensity:new i.Uniform1f(Y,R.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,R.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,R.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,R.u_height_factor),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},no=function(Y,R,K,N){var $=R.style.light,we=$.properties.get("position"),ge=[we.x,we.y,we.z],Ue=i.create$1();$.properties.get("anchor")==="viewport"&&i.fromRotation(Ue,-R.transform.angle),i.transformMat3(ge,ge,Ue);var dt=$.properties.get("color");return{u_matrix:Y,u_lightpos:ge,u_lightintensity:$.properties.get("intensity"),u_lightcolor:[dt.r,dt.g,dt.b],u_vertical_gradient:+K,u_opacity:N}},Ls=function(Y,R,K,N,$,we,ge){return i.extend(no(Y,R,K,N),No(we,R,ge),{u_height_factor:-Math.pow(2,$.overscaledZ)/ge.tileSize/8})},ds=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},Xs=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},oa=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world)}},Yo=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},po=function(Y){return{u_matrix:Y}},ss=function(Y,R,K,N){return i.extend(po(Y),No(K,R,N))},ls=function(Y,R){return{u_matrix:Y,u_world:R}},gs=function(Y,R,K,N,$){return i.extend(ss(Y,R,K,N),{u_world:$})},bt=function(Y,R){return{u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,R.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,R.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},Ft=function(Y,R,K,N){var $=Y.transform,we,ge;if(N.paint.get("circle-pitch-alignment")==="map"){var Ue=Ba(K,1,$.zoom);we=!0,ge=[Ue,Ue]}else we=!1,ge=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(R.posMatrix,K,N.paint.get("circle-translate"),N.paint.get("circle-translate-anchor")),u_pitch_with_map:+we,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ge}},hr=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,R.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,R.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,R.u_overscale_factor)}},nr=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,R.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,R.u_viewport_size)}},Sr=function(Y,R,K){var N=Ba(K,1,R.zoom),$=Math.pow(2,R.zoom-K.tileID.overscaledZ),we=K.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:R.cameraToCenterDistance,u_pixels_to_tile_units:N,u_extrude_scale:[R.pixelsToGLUnits[0]/(N*$),R.pixelsToGLUnits[1]/(N*$)],u_overscale_factor:we}},li=function(Y,R,K){return{u_matrix:Y,u_inv_matrix:R,u_camera_to_center_distance:K.cameraToCenterDistance,u_viewport_size:[K.width,K.height]}},di=function(Y,R){return{u_color:new i.UniformColor(Y,R.u_color),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_overlay:new i.Uniform1i(Y,R.u_overlay),u_overlay_scale:new i.Uniform1f(Y,R.u_overlay_scale)}},mi=function(Y,R,K){return K===void 0&&(K=1),{u_matrix:Y,u_color:R,u_overlay:0,u_overlay_scale:K}},Oi=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},dn=function(Y){return{u_matrix:Y}},wi=function(Y,R){return{u_extrude_scale:new i.Uniform1f(Y,R.u_extrude_scale),u_intensity:new i.Uniform1f(Y,R.u_intensity),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},ui=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world),u_image:new i.Uniform1i(Y,R.u_image),u_color_ramp:new i.Uniform1i(Y,R.u_color_ramp),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},Ai=function(Y,R,K,N){return{u_matrix:Y,u_extrude_scale:Ba(R,1,K),u_intensity:N}},gi=function(Y,R,K,N){var $=i.create();i.ortho($,0,Y.width,Y.height,0,0,1);var we=Y.context.gl;return{u_matrix:$,u_world:[we.drawingBufferWidth,we.drawingBufferHeight],u_image:K,u_color_ramp:N,u_opacity:R.paint.get("heatmap-opacity")}},gn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_latrange:new i.Uniform2f(Y,R.u_latrange),u_light:new i.Uniform2f(Y,R.u_light),u_shadow:new i.UniformColor(Y,R.u_shadow),u_highlight:new i.UniformColor(Y,R.u_highlight),u_accent:new i.UniformColor(Y,R.u_accent)}},In=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_dimension:new i.Uniform2f(Y,R.u_dimension),u_zoom:new i.Uniform1f(Y,R.u_zoom),u_unpack:new i.Uniform4f(Y,R.u_unpack)}},Vn=function(Y,R,K){var N=K.paint.get("hillshade-shadow-color"),$=K.paint.get("hillshade-highlight-color"),we=K.paint.get("hillshade-accent-color"),ge=K.paint.get("hillshade-illumination-direction")*(Math.PI/180);K.paint.get("hillshade-illumination-anchor")==="viewport"&&(ge-=Y.transform.angle);var Ue=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(R.tileID.toUnwrapped(),Ue),u_image:0,u_latrange:Hn(Y,R.tileID),u_light:[K.paint.get("hillshade-exaggeration"),ge],u_shadow:N,u_highlight:$,u_accent:we}},Rn=function(Y,R){var K=R.stride,N=i.create();return i.ortho(N,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(N,N,[0,-i.EXTENT,0]),{u_matrix:N,u_image:1,u_dimension:[K,K],u_zoom:Y.overscaledZ,u_unpack:R.getUnpackVector()}};function Hn(Y,R){var K=Math.pow(2,R.canonical.z),N=R.canonical.y;return[new i.MercatorCoordinate(0,N/K).toLngLat().lat,new i.MercatorCoordinate(0,(N+1)/K).toLngLat().lat]}var Gn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels)}},pn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_image:new i.Uniform1i(Y,R.u_image),u_image_height:new i.Uniform1f(Y,R.u_image_height)}},Lo=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,R.u_image),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},us=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,R.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,R.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,R.u_sdfgamma),u_image:new i.Uniform1i(Y,R.u_image),u_tex_y_a:new i.Uniform1f(Y,R.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,R.u_tex_y_b),u_mix:new i.Uniform1f(Y,R.u_mix)}},Bs=function(Y,R,K){var N=Y.transform;return{u_matrix:Gl(Y,R,K),u_ratio:1/Ba(R,1,N.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/N.pixelsToGLUnits[0],1/N.pixelsToGLUnits[1]]}},Js=function(Y,R,K,N){return i.extend(Bs(Y,R,K),{u_image:0,u_image_height:N})},ol=function(Y,R,K,N){var $=Y.transform,we=ul(R,$);return{u_matrix:Gl(Y,R,K),u_texsize:R.imageAtlasTexture.size,u_ratio:1/Ba(R,1,$.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[we,N.fromScale,N.toScale],u_fade:N.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},Cl=function(Y,R,K,N,$){var we=Y.transform,ge=Y.lineAtlas,Ue=ul(R,we),dt=K.layout.get("line-cap")==="round",Rt=ge.getDash(N.from,dt),ur=ge.getDash(N.to,dt),gr=Rt.width*$.fromScale,cr=ur.width*$.toScale;return i.extend(Bs(Y,R,K),{u_patternscale_a:[Ue/gr,-Rt.height/2],u_patternscale_b:[Ue/cr,-ur.height/2],u_sdfgamma:ge.width/(Math.min(gr,cr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Rt.y,u_tex_y_b:ur.y,u_mix:$.t})};function ul(Y,R){return 1/Ba(Y,1,R.tileZoom)}function Gl(Y,R,K){return Y.translatePosMatrix(R.tileID.posMatrix,R,K.paint.get("line-translate"),K.paint.get("line-translate-anchor"))}var Vl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_tl_parent:new i.Uniform2f(Y,R.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,R.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,R.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,R.u_fade_t),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_image0:new i.Uniform1i(Y,R.u_image0),u_image1:new i.Uniform1i(Y,R.u_image1),u_brightness_low:new i.Uniform1f(Y,R.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,R.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,R.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,R.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,R.u_spin_weights)}},Fl=function(Y,R,K,N,$){return{u_matrix:Y,u_tl_parent:R,u_scale_parent:K,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*$.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:$.paint.get("raster-brightness-min"),u_brightness_high:$.paint.get("raster-brightness-max"),u_saturation_factor:zs($.paint.get("raster-saturation")),u_contrast_factor:ko($.paint.get("raster-contrast")),u_spin_weights:ga($.paint.get("raster-hue-rotate"))}};function ga(Y){Y*=Math.PI/180;var R=Math.sin(Y),K=Math.cos(Y);return[(2*K+1)/3,(-Math.sqrt(3)*R-K+1)/3,(Math.sqrt(3)*R-K+1)/3]}function ko(Y){return Y>0?1/(1-Y):1+Y}function zs(Y){return Y>0?1-1/(1.001-Y):-Y}var Fo=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texture:new i.Uniform1i(Y,R.u_texture)}},Ys=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texture:new i.Uniform1i(Y,R.u_texture),u_gamma_scale:new i.Uniform1f(Y,R.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,R.u_is_halo)}},Gs=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texsize_icon:new i.Uniform2f(Y,R.u_texsize_icon),u_texture:new i.Uniform1i(Y,R.u_texture),u_texture_icon:new i.Uniform1i(Y,R.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,R.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,R.u_is_halo)}},Us=function(Y,R,K,N,$,we,ge,Ue,dt,Rt){var ur=$.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:R?R.uSizeT:0,u_size:R?R.uSize:0,u_camera_to_center_distance:ur.cameraToCenterDistance,u_pitch:ur.pitch/360*2*Math.PI,u_rotate_symbol:+K,u_aspect_ratio:ur.width/ur.height,u_fade_change:$.options.fadeDuration?$.symbolFadeChange:1,u_matrix:we,u_label_plane_matrix:ge,u_coord_matrix:Ue,u_is_text:+dt,u_pitch_with_map:+N,u_texsize:Rt,u_texture:0}},Sl=function(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur){var gr=$.transform;return i.extend(Us(Y,R,K,N,$,we,ge,Ue,dt,Rt),{u_gamma_scale:N?Math.cos(gr._pitch)*gr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+ur})},_l=function(Y,R,K,N,$,we,ge,Ue,dt,Rt){return i.extend(Sl(Y,R,K,N,$,we,ge,Ue,!0,dt,!0),{u_texsize_icon:Rt,u_texture_icon:1})},kl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_color:new i.UniformColor(Y,R.u_color)}},cl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_image:new i.Uniform1i(Y,R.u_image),u_pattern_tl_a:new i.Uniform2f(Y,R.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,R.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,R.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,R.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_mix:new i.Uniform1f(Y,R.u_mix),u_pattern_size_a:new i.Uniform2f(Y,R.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,R.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,R.u_scale_a),u_scale_b:new i.Uniform1f(Y,R.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,R.u_tile_units_to_pixels)}},xl=function(Y,R,K){return{u_matrix:Y,u_opacity:R,u_color:K}},Uo=function(Y,R,K,N,$,we){return i.extend(Zs(N,we,K,$),{u_matrix:Y,u_opacity:R})},_s={fillExtrusion:Fs,fillExtrusionPattern:ws,fill:ds,fillPattern:Xs,fillOutline:oa,fillOutlinePattern:Yo,circle:bt,collisionBox:hr,collisionCircle:nr,debug:di,clippingMask:Oi,heatmap:wi,heatmapTexture:ui,hillshade:gn,hillshadePrepare:In,line:Gn,lineGradient:pn,linePattern:Lo,lineSDF:us,raster:Vl,symbolIcon:Fo,symbolSDF:Ys,symbolTextAndIcon:Gs,background:kl,backgroundPattern:cl},Bl;function Il(Y,R,K,N,$,we,ge){for(var Ue=Y.context,dt=Ue.gl,Rt=Y.useProgram("collisionBox"),ur=[],gr=0,cr=0,It=0;It0){var Gr=i.create(),Fr=Pr;i.mul(Gr,mr.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Gr,Gr,mr.placementViewportMatrix),ur.push({circleArray:Xr,circleOffset:cr,transform:Fr,invTransform:Gr}),gr+=Xr.length/4,cr=gr}Dr&&Rt.draw(Ue,dt.LINES,Si.disabled,Jr.disabled,Y.colorModeForRenderPass(),sr.disabled,Sr(Pr,Y.transform,ar),K.id,Dr.layoutVertexBuffer,Dr.indexBuffer,Dr.segments,null,Y.transform.zoom,null,null,Dr.collisionVertexBuffer)}}if(!(!ge||!ur.length)){var Kr=Y.useProgram("collisionCircle"),Cr=new i.StructArrayLayout2f1f2i16;Cr.resize(gr*4),Cr._trim();for(var yi=0,qi=0,vn=ur;qi=0&&(Qt[mr.associatedIconIndex]={shiftedAnchor:mo,angle:sl})}}if(ur){It.clear();for(var eo=Y.icon.placedSymbolArray,fs=0;fs0){var ge=i.browser.now(),Ue=(ge-Y.timeAdded)/we,dt=R?(ge-R.timeAdded)/we:-1,Rt=K.getSource(),ur=$.coveringZoomLevel({tileSize:Rt.tileSize,roundZoom:Rt.roundZoom}),gr=!R||Math.abs(R.tileID.overscaledZ-ur)>Math.abs(Y.tileID.overscaledZ-ur),cr=gr&&Y.refreshedUponExpiration?1:i.clamp(gr?Ue:1-dt,0,1);return Y.refreshedUponExpiration&&Ue>=1&&(Y.refreshedUponExpiration=!1),R?{opacity:1,mix:1-cr}:{opacity:cr,mix:0}}else return{opacity:1,mix:0}}function $t(Y,R,K){var N=K.paint.get("background-color"),$=K.paint.get("background-opacity");if($!==0){var we=Y.context,ge=we.gl,Ue=Y.transform,dt=Ue.tileSize,Rt=K.paint.get("background-pattern");if(!Y.isPatternMissing(Rt)){var ur=!Rt&&N.a===1&&$===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===ur){var gr=Jr.disabled,cr=Y.depthModeForSublayer(0,ur==="opaque"?Si.ReadWrite:Si.ReadOnly),It=Y.colorModeForRenderPass(),Qt=Y.useProgram(Rt?"backgroundPattern":"background"),ar=Ue.coveringTiles({tileSize:dt});Rt&&(we.activeTexture.set(ge.TEXTURE0),Y.imageManager.bind(Y.context));for(var mr=K.getCrossfadeParameters(),Pr=0,Dr=ar;Pr "+K.overscaledZ);var Pr=mr+" "+It+"kb";il(Y,Pr),ge.draw(N,$.TRIANGLES,Ue,dt,vt.alphaBlended,sr.disabled,mi(we,i.Color.transparent,ar),ur,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function il(Y,R){Y.initDebugOverlayCanvas();var K=Y.debugOverlayCanvas,N=Y.context.gl,$=Y.debugOverlayCanvas.getContext("2d");$.clearRect(0,0,K.width,K.height),$.shadowColor="white",$.shadowBlur=2,$.lineWidth=1.5,$.strokeStyle="white",$.textBaseline="top",$.font="bold 36px Open Sans, sans-serif",$.fillText(R,5,5),$.strokeText(R,5,5),Y.debugOverlayTexture.update(K),Y.debugOverlayTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}function $l(Y,R,K){var N=Y.context,$=K.implementation;if(Y.renderPass==="offscreen"){var we=$.prerender;we&&(Y.setCustomLayerDefaults(),N.setColorMode(Y.colorModeForRenderPass()),we.call($,N.gl,Y.transform.customLayerMatrix()),N.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),N.setColorMode(Y.colorModeForRenderPass()),N.setStencilMode(Jr.disabled);var ge=$.renderingMode==="3d"?new Si(Y.context.gl.LEQUAL,Si.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,Si.ReadOnly);N.setDepthMode(ge),$.render(N.gl,Y.transform.customLayerMatrix()),N.setDirty(),Y.setBaseState(),N.bindFramebuffer.set(null)}}var pl={symbol:w,circle:pt,heatmap:zt,line:Ir,fill:ce,"fill-extrusion":qe,hillshade:ot,raster:qt,background:$t,debug:el,custom:$l},Hl=function(R,K){this.context=new br(R),this.transform=K,this._tileTextures={},this.setup(),this.numSublayers=zr.maxUnderzooming+zr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jo,this.gpuTimers={}};Hl.prototype.resize=function(R,K){if(this.width=R*i.browser.devicePixelRatio,this.height=K*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var N=0,$=this.style._order;N<$.length;N+=1){var we=$[N];this.style._layers[we].resize()}},Hl.prototype.setup=function(){var R=this.context,K=new i.StructArrayLayout2i4;K.emplaceBack(0,0),K.emplaceBack(i.EXTENT,0),K.emplaceBack(0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=R.createVertexBuffer(K,_o.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var N=new i.StructArrayLayout2i4;N.emplaceBack(0,0),N.emplaceBack(i.EXTENT,0),N.emplaceBack(0,i.EXTENT),N.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=R.createVertexBuffer(N,_o.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var $=new i.StructArrayLayout4i8;$.emplaceBack(0,0,0,0),$.emplaceBack(i.EXTENT,0,i.EXTENT,0),$.emplaceBack(0,i.EXTENT,0,i.EXTENT),$.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=R.createVertexBuffer($,ze.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var we=new i.StructArrayLayout2i4;we.emplaceBack(0,0),we.emplaceBack(1,0),we.emplaceBack(0,1),we.emplaceBack(1,1),this.viewportBuffer=R.createVertexBuffer(we,_o.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ge=new i.StructArrayLayout1ui2;ge.emplaceBack(0),ge.emplaceBack(1),ge.emplaceBack(3),ge.emplaceBack(2),ge.emplaceBack(0),this.tileBorderIndexBuffer=R.createIndexBuffer(ge);var Ue=new i.StructArrayLayout3ui6;Ue.emplaceBack(0,1,2),Ue.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=R.createIndexBuffer(Ue),this.emptyTexture=new i.Texture(R,{width:1,height:1,data:new Uint8Array([0,0,0,0])},R.gl.RGBA);var dt=this.context.gl;this.stencilClearMode=new Jr({func:dt.ALWAYS,mask:0},0,255,dt.ZERO,dt.ZERO,dt.ZERO)},Hl.prototype.clearStencil=function(){var R=this.context,K=R.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var N=i.create();i.ortho(N,0,this.width,this.height,0,0,1),i.scale(N,N,[K.drawingBufferWidth,K.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(R,K.TRIANGLES,Si.disabled,this.stencilClearMode,vt.disabled,sr.disabled,dn(N),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Hl.prototype._renderTileClippingMasks=function(R,K){if(!(this.currentStencilSource===R.source||!R.isTileClipped()||!K||!K.length)){this.currentStencilSource=R.source;var N=this.context,$=N.gl;this.nextStencilID+K.length>256&&this.clearStencil(),N.setColorMode(vt.disabled),N.setDepthMode(Si.disabled);var we=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ge=0,Ue=K;ge256&&this.clearStencil();var R=this.nextStencilID++,K=this.context.gl;return new Jr({func:K.NOTEQUAL,mask:255},R,255,K.KEEP,K.KEEP,K.REPLACE)},Hl.prototype.stencilModeForClipping=function(R){var K=this.context.gl;return new Jr({func:K.EQUAL,mask:255},this._tileClippingMaskIDs[R.key],0,K.KEEP,K.KEEP,K.REPLACE)},Hl.prototype.stencilConfigForOverlap=function(R){var K,N=this.context.gl,$=R.sort(function(Rt,ur){return ur.overscaledZ-Rt.overscaledZ}),we=$[$.length-1].overscaledZ,ge=$[0].overscaledZ-we+1;if(ge>1){this.currentStencilSource=void 0,this.nextStencilID+ge>256&&this.clearStencil();for(var Ue={},dt=0;dt=0;this.currentLayer--){var Gr=this.style._layers[$[this.currentLayer]],Fr=we[Gr.source],Kr=dt[Gr.source];this._renderTileClippingMasks(Gr,Kr),this.renderLayer(this,Fr,Gr,Kr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<$.length;this.currentLayer++){var Cr=this.style._layers[$[this.currentLayer]],yi=we[Cr.source],qi=(Cr.type==="symbol"?ur:Rt)[Cr.source];this._renderTileClippingMasks(Cr,dt[Cr.source]),this.renderLayer(this,yi,Cr,qi)}if(this.options.showTileBoundaries){var vn,Qa,ra=i.values(this.style._layers);ra.forEach(function(mo){mo.source&&!mo.isHidden(N.transform.zoom)&&(mo.source!==(Qa&&Qa.id)&&(Qa=N.style.sourceCaches[mo.source]),(!vn||vn.getSource().maxzoom0?K.pop():null},Hl.prototype.isPatternMissing=function(R){if(!R)return!1;if(!R.from||!R.to)return!0;var K=this.imageManager.getPattern(R.from.toString()),N=this.imageManager.getPattern(R.to.toString());return!K||!N},Hl.prototype.useProgram=function(R,K){this.cache=this.cache||{};var N=""+R+(K?K.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[N]||(this.cache[N]=new Oo(this.context,R,Ma[R],K,_s[R],this._showOverdrawInspector)),this.cache[N]},Hl.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()},Hl.prototype.setBaseState=function(){var R=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(R.FUNC_ADD)},Hl.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var R=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,R.RGBA)}},Hl.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ll=function(R,K){this.points=R,this.planes=K};Ll.fromInvProjectionMatrix=function(R,K,N){var $=[[-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]],we=Math.pow(2,N),ge=$.map(function(Rt){return i.transformMat4([],Rt,R)}).map(function(Rt){return i.scale$1([],Rt,1/Rt[3]/K*we)}),Ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],dt=Ue.map(function(Rt){var ur=i.sub([],ge[Rt[0]],ge[Rt[1]]),gr=i.sub([],ge[Rt[2]],ge[Rt[1]]),cr=i.normalize([],i.cross([],ur,gr)),It=-i.dot(cr,ge[Rt[1]]);return cr.concat(It)});return new Ll(ge,dt)};var Ql=function(R,K){this.min=R,this.max=K,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ql.prototype.quadrant=function(R){for(var K=[R%2===0,R<2],N=i.clone$2(this.min),$=i.clone$2(this.max),we=0;we=0;if(ge===0)return 0;ge!==K.length&&(N=!1)}if(N)return 2;for(var dt=0;dt<3;dt++){for(var Rt=Number.MAX_VALUE,ur=-Number.MAX_VALUE,gr=0;grthis.max[dt]-this.min[dt])return 0}return 1};var ku=function(R,K,N,$){if(R===void 0&&(R=0),K===void 0&&(K=0),N===void 0&&(N=0),$===void 0&&($=0),isNaN(R)||R<0||isNaN(K)||K<0||isNaN(N)||N<0||isNaN($)||$<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=R,this.bottom=K,this.left=N,this.right=$};ku.prototype.interpolate=function(R,K,N){return K.top!=null&&R.top!=null&&(this.top=i.number(R.top,K.top,N)),K.bottom!=null&&R.bottom!=null&&(this.bottom=i.number(R.bottom,K.bottom,N)),K.left!=null&&R.left!=null&&(this.left=i.number(R.left,K.left,N)),K.right!=null&&R.right!=null&&(this.right=i.number(R.right,K.right,N)),this},ku.prototype.getCenter=function(R,K){var N=i.clamp((this.left+R-this.right)/2,0,R),$=i.clamp((this.top+K-this.bottom)/2,0,K);return new i.Point(N,$)},ku.prototype.equals=function(R){return this.top===R.top&&this.bottom===R.bottom&&this.left===R.left&&this.right===R.right},ku.prototype.clone=function(){return new ku(this.top,this.bottom,this.left,this.right)},ku.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Jl=function(R,K,N,$,we){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=we===void 0?!0:we,this._minZoom=R||0,this._maxZoom=K||22,this._minPitch=N==null?0:N,this._maxPitch=$==null?60:$,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 ku,this._posMatrixCache={},this._alignedPosMatrixCache={}},Kl={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}};Jl.prototype.clone=function(){var R=new Jl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return R.tileSize=this.tileSize,R.latRange=this.latRange,R.width=this.width,R.height=this.height,R._center=this._center,R.zoom=this.zoom,R.angle=this.angle,R._fov=this._fov,R._pitch=this._pitch,R._unmodified=this._unmodified,R._edgeInsets=this._edgeInsets.clone(),R._calcMatrices(),R},Kl.minZoom.get=function(){return this._minZoom},Kl.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},Kl.maxZoom.get=function(){return this._maxZoom},Kl.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},Kl.minPitch.get=function(){return this._minPitch},Kl.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},Kl.maxPitch.get=function(){return this._maxPitch},Kl.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},Kl.renderWorldCopies.get=function(){return this._renderWorldCopies},Kl.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},Kl.worldSize.get=function(){return this.tileSize*this.scale},Kl.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Kl.size.get=function(){return new i.Point(this.width,this.height)},Kl.bearing.get=function(){return-this.angle/Math.PI*180},Kl.bearing.set=function(Y){var R=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==R&&(this._unmodified=!1,this.angle=R,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Kl.pitch.get=function(){return this._pitch/Math.PI*180},Kl.pitch.set=function(Y){var R=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==R&&(this._unmodified=!1,this._pitch=R,this._calcMatrices())},Kl.fov.get=function(){return this._fov/Math.PI*180},Kl.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())},Kl.zoom.get=function(){return this._zoom},Kl.zoom.set=function(Y){var R=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==R&&(this._unmodified=!1,this._zoom=R,this.scale=this.zoomScale(R),this.tileZoom=Math.floor(R),this.zoomFraction=R-this.tileZoom,this._constrain(),this._calcMatrices())},Kl.center.get=function(){return this._center},Kl.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},Kl.padding.get=function(){return this._edgeInsets.toJSON()},Kl.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},Kl.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Jl.prototype.isPaddingEqual=function(R){return this._edgeInsets.equals(R)},Jl.prototype.interpolatePadding=function(R,K,N){this._unmodified=!1,this._edgeInsets.interpolate(R,K,N),this._constrain(),this._calcMatrices()},Jl.prototype.coveringZoomLevel=function(R){var K=(R.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/R.tileSize));return Math.max(0,K)},Jl.prototype.getVisibleUnwrappedCoordinates=function(R){var K=[new i.UnwrappedTileID(0,R)];if(this._renderWorldCopies)for(var N=this.pointCoordinate(new i.Point(0,0)),$=this.pointCoordinate(new i.Point(this.width,0)),we=this.pointCoordinate(new i.Point(this.width,this.height)),ge=this.pointCoordinate(new i.Point(0,this.height)),Ue=Math.floor(Math.min(N.x,$.x,we.x,ge.x)),dt=Math.floor(Math.max(N.x,$.x,we.x,ge.x)),Rt=1,ur=Ue-Rt;ur<=dt+Rt;ur++)ur!==0&&K.push(new i.UnwrappedTileID(ur,R));return K},Jl.prototype.coveringTiles=function(R){var K=this.coveringZoomLevel(R),N=K;if(R.minzoom!==void 0&&KR.maxzoom&&(K=R.maxzoom);var $=i.MercatorCoordinate.fromLngLat(this.center),we=Math.pow(2,K),ge=[we*$.x,we*$.y,0],Ue=Ll.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,K),dt=R.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(dt=K);var Rt=3,ur=function(ra){return{aabb:new Ql([ra*we,0,0],[(ra+1)*we,we,0]),zoom:0,x:0,y:0,wrap:ra,fullyVisible:!1}},gr=[],cr=[],It=K,Qt=R.reparseOverscaled?N:K;if(this._renderWorldCopies)for(var ar=1;ar<=3;ar++)gr.push(ur(-ar)),gr.push(ur(ar));for(gr.push(ur(0));gr.length>0;){var mr=gr.pop(),Pr=mr.x,Dr=mr.y,Xr=mr.fullyVisible;if(!Xr){var Gr=mr.aabb.intersects(Ue);if(Gr===0)continue;Xr=Gr===2}var Fr=mr.aabb.distanceX(ge),Kr=mr.aabb.distanceY(ge),Cr=Math.max(Math.abs(Fr),Math.abs(Kr)),yi=Rt+(1<yi&&mr.zoom>=dt){cr.push({tileID:new i.OverscaledTileID(mr.zoom===It?Qt:mr.zoom,mr.wrap,mr.zoom,Pr,Dr),distanceSq:i.sqrLen([ge[0]-.5-Pr,ge[1]-.5-Dr])});continue}for(var qi=0;qi<4;qi++){var vn=(Pr<<1)+qi%2,Qa=(Dr<<1)+(qi>>1);gr.push({aabb:mr.aabb.quadrant(qi),zoom:mr.zoom+1,x:vn,y:Qa,wrap:mr.wrap,fullyVisible:Xr})}}return cr.sort(function(ra,mo){return ra.distanceSq-mo.distanceSq}).map(function(ra){return ra.tileID})},Jl.prototype.resize=function(R,K){this.width=R,this.height=K,this.pixelsToGLUnits=[2/R,-2/K],this._constrain(),this._calcMatrices()},Kl.unmodified.get=function(){return this._unmodified},Jl.prototype.zoomScale=function(R){return Math.pow(2,R)},Jl.prototype.scaleZoom=function(R){return Math.log(R)/Math.LN2},Jl.prototype.project=function(R){var K=i.clamp(R.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(R.lng)*this.worldSize,i.mercatorYfromLat(K)*this.worldSize)},Jl.prototype.unproject=function(R){return new i.MercatorCoordinate(R.x/this.worldSize,R.y/this.worldSize).toLngLat()},Kl.point.get=function(){return this.project(this.center)},Jl.prototype.setLocationAtPoint=function(R,K){var N=this.pointCoordinate(K),$=this.pointCoordinate(this.centerPoint),we=this.locationCoordinate(R),ge=new i.MercatorCoordinate(we.x-(N.x-$.x),we.y-(N.y-$.y));this.center=this.coordinateLocation(ge),this._renderWorldCopies&&(this.center=this.center.wrap())},Jl.prototype.locationPoint=function(R){return this.coordinatePoint(this.locationCoordinate(R))},Jl.prototype.pointLocation=function(R){return this.coordinateLocation(this.pointCoordinate(R))},Jl.prototype.locationCoordinate=function(R){return i.MercatorCoordinate.fromLngLat(R)},Jl.prototype.coordinateLocation=function(R){return R.toLngLat()},Jl.prototype.pointCoordinate=function(R){var K=0,N=[R.x,R.y,0,1],$=[R.x,R.y,1,1];i.transformMat4(N,N,this.pixelMatrixInverse),i.transformMat4($,$,this.pixelMatrixInverse);var we=N[3],ge=$[3],Ue=N[0]/we,dt=$[0]/ge,Rt=N[1]/we,ur=$[1]/ge,gr=N[2]/we,cr=$[2]/ge,It=gr===cr?0:(K-gr)/(cr-gr);return new i.MercatorCoordinate(i.number(Ue,dt,It)/this.worldSize,i.number(Rt,ur,It)/this.worldSize)},Jl.prototype.coordinatePoint=function(R){var K=[R.x*this.worldSize,R.y*this.worldSize,0,1];return i.transformMat4(K,K,this.pixelMatrix),new i.Point(K[0]/K[3],K[1]/K[3])},Jl.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)))},Jl.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]])},Jl.prototype.setMaxBounds=function(R){R?(this.lngRange=[R.getWest(),R.getEast()],this.latRange=[R.getSouth(),R.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Jl.prototype.calculatePosMatrix=function(R,K){K===void 0&&(K=!1);var N=R.key,$=K?this._alignedPosMatrixCache:this._posMatrixCache;if($[N])return $[N];var we=R.canonical,ge=this.worldSize/this.zoomScale(we.z),Ue=we.x+Math.pow(2,we.z)*R.wrap,dt=i.identity(new Float64Array(16));return i.translate(dt,dt,[Ue*ge,we.y*ge,0]),i.scale(dt,dt,[ge/i.EXTENT,ge/i.EXTENT,1]),i.multiply(dt,K?this.alignedProjMatrix:this.projMatrix,dt),$[N]=new Float32Array(dt),$[N]},Jl.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Jl.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var R=-90,K=90,N=-180,$=180,we,ge,Ue,dt,Rt=this.size,ur=this._unmodified;if(this.latRange){var gr=this.latRange;R=i.mercatorYfromLat(gr[1])*this.worldSize,K=i.mercatorYfromLat(gr[0])*this.worldSize,we=K-RK&&(dt=K-mr)}if(this.lngRange){var Pr=It.x,Dr=Rt.x/2;Pr-Dr$&&(Ue=$-Dr)}(Ue!==void 0||dt!==void 0)&&(this.center=this.unproject(new i.Point(Ue!==void 0?Ue:It.x,dt!==void 0?dt:It.y))),this._unmodified=ur,this._constraining=!1}},Jl.prototype._calcMatrices=function(){if(this.height){var R=this._fov/2,K=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(R)*this.height;var N=Math.PI/2+this._pitch,$=this._fov*(.5+K.y/this.height),we=Math.sin($)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-N-$,.01,Math.PI-.01)),ge=this.point,Ue=ge.x,dt=ge.y,Rt=Math.cos(Math.PI/2-this._pitch)*we+this.cameraToCenterDistance,ur=Rt*1.01,gr=this.height/50,cr=new Float64Array(16);i.perspective(cr,this._fov,this.width/this.height,gr,ur),cr[8]=-K.x*2/this.width,cr[9]=K.y*2/this.height,i.scale(cr,cr,[1,-1,1]),i.translate(cr,cr,[0,0,-this.cameraToCenterDistance]),i.rotateX(cr,cr,this._pitch),i.rotateZ(cr,cr,this.angle),i.translate(cr,cr,[-Ue,-dt,0]),this.mercatorMatrix=i.scale([],cr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(cr,cr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=cr,this.invProjMatrix=i.invert([],this.projMatrix);var It=this.width%2/2,Qt=this.height%2/2,ar=Math.cos(this.angle),mr=Math.sin(this.angle),Pr=Ue-Math.round(Ue)+ar*It+mr*Qt,Dr=dt-Math.round(dt)+ar*Qt+mr*It,Xr=new Float64Array(cr);if(i.translate(Xr,Xr,[Pr>.5?Pr-1:Pr,Dr>.5?Dr-1:Dr,0]),this.alignedProjMatrix=Xr,cr=i.create(),i.scale(cr,cr,[this.width/2,-this.height/2,1]),i.translate(cr,cr,[1,-1,0]),this.labelPlaneMatrix=cr,cr=i.create(),i.scale(cr,cr,[1,-1,1]),i.translate(cr,cr,[-1,-1,0]),i.scale(cr,cr,[2/this.width,2/this.height,1]),this.glCoordMatrix=cr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),cr=i.invert(new Float64Array(16),this.pixelMatrix),!cr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=cr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Jl.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var R=this.pointCoordinate(new i.Point(0,0)),K=[R.x*this.worldSize,R.y*this.worldSize,0,1],N=i.transformMat4(K,K,this.pixelMatrix);return N[3]/this.cameraToCenterDistance},Jl.prototype.getCameraPoint=function(){var R=this._pitch,K=Math.tan(R)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,K))},Jl.prototype.getCameraQueryGeometry=function(R){var K=this.getCameraPoint();if(R.length===1)return[R[0],K];for(var N=K.x,$=K.y,we=K.x,ge=K.y,Ue=0,dt=R;Ue=3&&!R.some(function(N){return isNaN(N)})){var K=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(R[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+R[2],+R[1]],zoom:+R[0],bearing:K,pitch:+(R[4]||0)}),!0}return!1},tf.prototype._updateHashUnthrottled=function(){var R=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,R)}catch(K){}};var Ku={linearity:.3,easing:i.bezier(0,0,.3,1)},Gu=i.extend({deceleration:2500,maxSpeed:1400},Ku),Wu=i.extend({deceleration:20,maxSpeed:1400},Ku),sf=i.extend({deceleration:1e3,maxSpeed:360},Ku),gf=i.extend({deceleration:1e3,maxSpeed:90},Ku),nf=function(R){this._map=R,this.clear()};nf.prototype.clear=function(){this._inertiaBuffer=[]},nf.prototype.record=function(R){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:R})},nf.prototype._drainInertiaBuffer=function(){for(var R=this._inertiaBuffer,K=i.browser.now(),N=160;R.length>0&&K-R[0].time>N;)R.shift()},nf.prototype._onMoveEnd=function(R){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var K={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},N=0,$=this._inertiaBuffer;N<$.length;N+=1){var we=$[N],ge=we.settings;K.zoom+=ge.zoomDelta||0,K.bearing+=ge.bearingDelta||0,K.pitch+=ge.pitchDelta||0,ge.panDelta&&K.pan._add(ge.panDelta),ge.around&&(K.around=ge.around),ge.pinchAround&&(K.pinchAround=ge.pinchAround)}var Ue=this._inertiaBuffer[this._inertiaBuffer.length-1],dt=Ue.time-this._inertiaBuffer[0].time,Rt={};if(K.pan.mag()){var ur=X(K.pan.mag(),dt,i.extend({},Gu,R||{}));Rt.offset=K.pan.mult(ur.amount/K.pan.mag()),Rt.center=this._map.transform.center,af(Rt,ur)}if(K.zoom){var gr=X(K.zoom,dt,Wu);Rt.zoom=this._map.transform.zoom+gr.amount,af(Rt,gr)}if(K.bearing){var cr=X(K.bearing,dt,sf);Rt.bearing=this._map.transform.bearing+i.clamp(cr.amount,-179,179),af(Rt,cr)}if(K.pitch){var It=X(K.pitch,dt,gf);Rt.pitch=this._map.transform.pitch+It.amount,af(Rt,It)}if(Rt.zoom||Rt.bearing){var Qt=K.pinchAround===void 0?K.around:K.pinchAround;Rt.around=Qt?this._map.unproject(Qt):this._map.getCenter()}return this.clear(),i.extend(Rt,{noMoveStart:!0})}};function af(Y,R){(!Y.duration||Y.duration=this._clickTolerance||this._map.fire(new se(R.type,this._map,R))},Ye.prototype.dblclick=function(R){return this._firePreventable(new se(R.type,this._map,R))},Ye.prototype.mouseover=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.mouseout=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.touchstart=function(R){return this._firePreventable(new Le(R.type,this._map,R))},Ye.prototype.touchmove=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype.touchend=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype.touchcancel=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype._firePreventable=function(R){if(this._map.fire(R),R.defaultPrevented)return{}},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var it=function(R){this._map=R};it.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},it.prototype.mousemove=function(R){this._map.fire(new se(R.type,this._map,R))},it.prototype.mousedown=function(){this._delayContextMenu=!0},it.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},it.prototype.contextmenu=function(R){this._delayContextMenu?this._contextMenuEvent=R:this._map.fire(new se(R.type,this._map,R)),this._map.listens("contextmenu")&&R.preventDefault()},it.prototype.isEnabled=function(){return!0},it.prototype.isActive=function(){return!1},it.prototype.enable=function(){},it.prototype.disable=function(){};var Nt=function(R,K){this._map=R,this._el=R.getCanvasContainer(),this._container=R.getContainer(),this._clickTolerance=K.clickTolerance||1};Nt.prototype.isEnabled=function(){return!!this._enabled},Nt.prototype.isActive=function(){return!!this._active},Nt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Nt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Nt.prototype.mousedown=function(R,K){this.isEnabled()&&R.shiftKey&&R.button===0&&(o.disableDrag(),this._startPos=this._lastPos=K,this._active=!0)},Nt.prototype.mousemoveWindow=function(R,K){if(this._active){var N=K;if(!(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=R.timeStamp),N.length===this.numTouches&&(this.centroid=er(K),this.touches=mt(N,K)))},Wr.prototype.touchmove=function(R,K,N){if(!(this.aborted||!this.centroid)){var $=mt(N,K);for(var we in this.touches){var ge=this.touches[we],Ue=$[we];(!Ue||Ue.dist(ge)>ni)&&(this.aborted=!0)}}},Wr.prototype.touchend=function(R,K,N){if((!this.centroid||R.timeStamp-this.startTime>wr)&&(this.aborted=!0),N.length===0){var $=!this.aborted&&this.centroid;if(this.reset(),$)return $}};var Ci=function(R){this.singleTap=new Wr(R),this.numTaps=R.numTaps,this.reset()};Ci.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ci.prototype.touchstart=function(R,K,N){this.singleTap.touchstart(R,K,N)},Ci.prototype.touchmove=function(R,K,N){this.singleTap.touchmove(R,K,N)},Ci.prototype.touchend=function(R,K,N){var $=this.singleTap.touchend(R,K,N);if($){var we=R.timeStamp-this.lastTime<_r,ge=!this.lastTap||this.lastTap.dist($)0&&(this._active=!0);var $=mt(N,K),we=new i.Point(0,0),ge=new i.Point(0,0),Ue=0;for(var dt in $){var Rt=$[dt],ur=this._touches[dt];ur&&(we._add(Rt),ge._add(Rt.sub(ur)),Ue++,$[dt]=Rt)}if(this._touches=$,!(UeMath.abs(Y.x)}var qo=100,Rl=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},R.prototype._start=function(N){this._lastPoints=N,Ju(N[0].sub(N[1]))&&(this._valid=!1)},R.prototype._move=function(N,$,we){var ge=N[0].sub(this._lastPoints[0]),Ue=N[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ge,Ue,we.timeStamp),!!this._valid){this._lastPoints=N,this._active=!0;var dt=(ge.y+Ue.y)/2,Rt=-.5;return{pitchDelta:dt*Rt}}},R.prototype.gestureBeginsVertically=function(N,$,we){if(this._valid!==void 0)return this._valid;var ge=2,Ue=N.mag()>=ge,dt=$.mag()>=ge;if(!(!Ue&&!dt)){if(!Ue||!dt)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove0==$.y>0;return Ju(N)&&Ju($)&&Rt}},R}(Ms),pu={panStep:100,bearingStep:15,pitchStep:10},xu=function(){var R=pu;this._panStep=R.panStep,this._bearingStep=R.bearingStep,this._pitchStep=R.pitchStep,this._rotationDisabled=!1};xu.prototype.reset=function(){this._active=!1},xu.prototype.keydown=function(R){var K=this;if(!(R.altKey||R.ctrlKey||R.metaKey)){var N=0,$=0,we=0,ge=0,Ue=0;switch(R.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:R.shiftKey?$=-1:(R.preventDefault(),ge=-1);break;case 39:R.shiftKey?$=1:(R.preventDefault(),ge=1);break;case 38:R.shiftKey?we=1:(R.preventDefault(),Ue=-1);break;case 40:R.shiftKey?we=-1:(R.preventDefault(),Ue=1);break;default:return}return this._rotationDisabled&&($=0,we=0),{cameraAnimation:function(dt){var Rt=dt.getZoom();dt.easeTo({duration:300,easeId:"keyboardHandler",easing:of,zoom:N?Math.round(Rt)+N*(R.shiftKey?2:1):Rt,bearing:dt.getBearing()+$*K._bearingStep,pitch:dt.getPitch()+we*K._pitchStep,offset:[-ge*K._panStep,-Ue*K._panStep],center:dt.getCenter()},{originalEvent:R})}}}},xu.prototype.enable=function(){this._enabled=!0},xu.prototype.disable=function(){this._enabled=!1,this.reset()},xu.prototype.isEnabled=function(){return this._enabled},xu.prototype.isActive=function(){return this._active},xu.prototype.disableRotation=function(){this._rotationDisabled=!0},xu.prototype.enableRotation=function(){this._rotationDisabled=!1};function of(Y){return Y*(2-Y)}var ff=4.000244140625,xf=1/100,hf=1/450,dc=2,Gt=function(R,K){this._map=R,this._el=R.getCanvasContainer(),this._handler=K,this._delta=0,this._defaultZoomRate=xf,this._wheelZoomRate=hf,i.bindAll(["_onTimeout"],this)};Gt.prototype.setZoomRate=function(R){this._defaultZoomRate=R},Gt.prototype.setWheelZoomRate=function(R){this._wheelZoomRate=R},Gt.prototype.isEnabled=function(){return!!this._enabled},Gt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Gt.prototype.isZooming=function(){return!!this._zooming},Gt.prototype.enable=function(R){this.isEnabled()||(this._enabled=!0,this._aroundCenter=R&&R.around==="center")},Gt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Gt.prototype.wheel=function(R){if(this.isEnabled()){var K=R.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?R.deltaY*40:R.deltaY,N=i.browser.now(),$=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,K!==0&&K%ff===0?this._type="wheel":K!==0&&Math.abs(K)<4?this._type="trackpad":$>400?(this._type=null,this._lastValue=K,this._timeout=setTimeout(this._onTimeout,40,R)):this._type||(this._type=Math.abs($*K)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,K+=this._lastValue)),R.shiftKey&&K&&(K=K/4),this._type&&(this._lastWheelEvent=R,this._delta-=K,this._active||this._start(R)),R.preventDefault()}},Gt.prototype._onTimeout=function(R){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(R)},Gt.prototype._start=function(R){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 K=o.mousePos(this._el,R);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(K)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Gt.prototype.renderFrame=function(){var R=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var K=this._map.transform;if(this._delta!==0){var N=this._type==="wheel"&&Math.abs(this._delta)>ff?this._wheelZoomRate:this._defaultZoomRate,$=dc/(1+Math.exp(-Math.abs(this._delta*N)));this._delta<0&&$!==0&&($=1/$);var we=typeof this._targetZoom=="number"?K.zoomScale(this._targetZoom):K.scale;this._targetZoom=Math.min(K.maxZoom,Math.max(K.minZoom,K.scaleZoom(we*$))),this._type==="wheel"&&(this._startZoom=K.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ge=typeof this._targetZoom=="number"?this._targetZoom:K.zoom,Ue=this._startZoom,dt=this._easing,Rt=!1,ur;if(this._type==="wheel"&&Ue&&dt){var gr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),cr=dt(gr);ur=i.number(Ue,ge,cr),gr<1?this._frameId||(this._frameId=!0):Rt=!0}else ur=ge,Rt=!0;return this._active=!0,Rt&&(this._active=!1,this._finishTimeout=setTimeout(function(){R._zooming=!1,R._handler._triggerRenderFrame(),delete R._targetZoom,delete R._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Rt,zoomDelta:ur-K.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Gt.prototype._smoothOutEasing=function(R){var K=i.ease;if(this._prevEase){var N=this._prevEase,$=(i.browser.now()-N.start)/N.duration,we=N.easing($+.01)-N.easing($),ge=.27/Math.sqrt(we*we+1e-4)*.01,Ue=Math.sqrt(.27*.27-ge*ge);K=i.bezier(ge,Ue,.25,1)}return this._prevEase={start:i.browser.now(),duration:R,easing:K},K},Gt.prototype.reset=function(){this._active=!1};var jr=function(R,K){this._clickZoom=R,this._tapZoom=K};jr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},jr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},jr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},jr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var _i=function(){this.reset()};_i.prototype.reset=function(){this._active=!1},_i.prototype.dblclick=function(R,K){return R.preventDefault(),{cameraAnimation:function(N){N.easeTo({duration:300,zoom:N.getZoom()+(R.shiftKey?-1:1),around:N.unproject(K)},{originalEvent:R})}}},_i.prototype.enable=function(){this._enabled=!0},_i.prototype.disable=function(){this._enabled=!1,this.reset()},_i.prototype.isEnabled=function(){return this._enabled},_i.prototype.isActive=function(){return this._active};var Mn=function(){this._tap=new Ci({numTouches:1,numTaps:1}),this.reset()};Mn.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Mn.prototype.touchstart=function(R,K,N){this._swipePoint||(this._tapTime&&R.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?N.length>0&&(this._swipePoint=K[0],this._swipeTouch=N[0].identifier):this._tap.touchstart(R,K,N))},Mn.prototype.touchmove=function(R,K,N){if(!this._tapTime)this._tap.touchmove(R,K,N);else if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;var $=K[0],we=$.y-this._swipePoint.y;return this._swipePoint=$,R.preventDefault(),this._active=!0,{zoomDelta:we/128}}},Mn.prototype.touchend=function(R,K,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{var $=this._tap.touchend(R,K,N);$&&(this._tapTime=R.timeStamp)}},Mn.prototype.touchcancel=function(){this.reset()},Mn.prototype.enable=function(){this._enabled=!0},Mn.prototype.disable=function(){this._enabled=!1,this.reset()},Mn.prototype.isEnabled=function(){return this._enabled},Mn.prototype.isActive=function(){return this._active};var Ta=function(R,K,N){this._el=R,this._mousePan=K,this._touchPan=N};Ta.prototype.enable=function(R){this._inertiaOptions=R||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var fa=function(R,K,N){this._pitchWithRotate=R.pitchWithRotate,this._mouseRotate=K,this._mousePitch=N};fa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},fa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},fa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},fa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ha=function(R,K,N,$){this._el=R,this._touchZoom=K,this._touchRotate=N,this._tapDragZoom=$,this._rotationDisabled=!1,this._enabled=!0};ha.prototype.enable=function(R){this._touchZoom.enable(R),this._rotationDisabled||this._touchRotate.enable(R),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ha.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ha.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ha.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ha.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ha.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Io=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Vs=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R}(i.Event);function Hs(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var is=function(R,K){this._map=R,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new nf(R),this._bearingSnap=K.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(K),i.bindAll(["handleEvent","handleWindowEvent"],this);var N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[i.window,"blur",void 0]];for(var $=0,we=this._listeners;$Ue?Math.min(2,Fr):Math.max(.5,Fr),ra=Math.pow(Qa,1-qi),mo=ge.unproject(Xr.add(Gr.mult(qi*ra)).mult(vn));ge.setLocationAtPoint(ge.renderWorldCopies?mo.wrap():mo,mr)}we._fireMoveEvents($)},function(qi){we._afterEase($,qi)},N),this},R.prototype._prepareEase=function(N,$,we){we===void 0&&(we={}),this._moving=!0,!$&&!we.moving&&this.fire(new i.Event("movestart",N)),this._zooming&&!we.zooming&&this.fire(new i.Event("zoomstart",N)),this._rotating&&!we.rotating&&this.fire(new i.Event("rotatestart",N)),this._pitching&&!we.pitching&&this.fire(new i.Event("pitchstart",N))},R.prototype._fireMoveEvents=function(N){this.fire(new i.Event("move",N)),this._zooming&&this.fire(new i.Event("zoom",N)),this._rotating&&this.fire(new i.Event("rotate",N)),this._pitching&&this.fire(new i.Event("pitch",N))},R.prototype._afterEase=function(N,$){if(!(this._easeId&&$&&this._easeId===$)){delete this._easeId;var we=this._zooming,ge=this._rotating,Ue=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new i.Event("zoomend",N)),ge&&this.fire(new i.Event("rotateend",N)),Ue&&this.fire(new i.Event("pitchend",N)),this.fire(new i.Event("moveend",N))}},R.prototype.flyTo=function(N,$){var we=this;if(!N.essential&&i.browser.prefersReducedMotion){var ge=i.pick(N,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ge,$)}this.stop(),N=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},N);var Ue=this.transform,dt=this.getZoom(),Rt=this.getBearing(),ur=this.getPitch(),gr=this.getPadding(),cr="zoom"in N?i.clamp(+N.zoom,Ue.minZoom,Ue.maxZoom):dt,It="bearing"in N?this._normalizeBearing(N.bearing,Rt):Rt,Qt="pitch"in N?+N.pitch:ur,ar="padding"in N?N.padding:Ue.padding,mr=Ue.zoomScale(cr-dt),Pr=i.Point.convert(N.offset),Dr=Ue.centerPoint.add(Pr),Xr=Ue.pointLocation(Dr),Gr=i.LngLat.convert(N.center||Xr);this._normalizeCenter(Gr);var Fr=Ue.project(Xr),Kr=Ue.project(Gr).sub(Fr),Cr=N.curve,yi=Math.max(Ue.width,Ue.height),qi=yi/mr,vn=Kr.mag();if("minZoom"in N){var Qa=i.clamp(Math.min(N.minZoom,dt,cr),Ue.minZoom,Ue.maxZoom),ra=yi/Ue.zoomScale(Qa-dt);Cr=Math.sqrt(ra/vn*2)}var mo=Cr*Cr;function sl(du){var Nu=(qi*qi-yi*yi+(du?-1:1)*mo*mo*vn*vn)/(2*(du?qi:yi)*mo*vn);return Math.log(Math.sqrt(Nu*Nu+1)-Nu)}function Os(du){return(Math.exp(du)-Math.exp(-du))/2}function eo(du){return(Math.exp(du)+Math.exp(-du))/2}function fs(du){return Os(du)/eo(du)}var es=sl(0),$s=function(du){return eo(es)/eo(es+Cr*du)},Ml=function(du){return yi*((eo(es)*fs(es+Cr*du)-Os(es))/mo)/vn},Mu=(sl(1)-es)/Cr;if(Math.abs(vn)<1e-6||!isFinite(Mu)){if(Math.abs(yi-qi)<1e-6)return this.easeTo(N,$);var Au=qiN.maxDuration&&(N.duration=0),this._zooming=!0,this._rotating=Rt!==It,this._pitching=Qt!==ur,this._padding=!Ue.isPaddingEqual(ar),this._prepareEase($,!1),this._ease(function(du){var Nu=du*Mu,yf=1/$s(Nu);Ue.zoom=du===1?cr:dt+Ue.scaleZoom(yf),we._rotating&&(Ue.bearing=i.number(Rt,It,du)),we._pitching&&(Ue.pitch=i.number(ur,Qt,du)),we._padding&&(Ue.interpolatePadding(gr,ar,du),Dr=Ue.centerPoint.add(Pr));var Kf=du===1?Gr:Ue.unproject(Fr.add(Kr.mult(Ml(Nu))).mult(yf));Ue.setLocationAtPoint(Ue.renderWorldCopies?Kf.wrap():Kf,Dr),we._fireMoveEvents($)},function(){return we._afterEase($)},N),this},R.prototype.isEasing=function(){return!!this._easeFrameId},R.prototype.stop=function(){return this._stop()},R.prototype._stop=function(N,$){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var we=this._onEaseEnd;delete this._onEaseEnd,we.call(this,$)}if(!N){var ge=this.handlers;ge&&ge.stop(!1)}return this},R.prototype._ease=function(N,$,we){we.animate===!1||we.duration===0?(N(1),$()):(this._easeStart=i.browser.now(),this._easeOptions=we,this._onEaseFrame=N,this._onEaseEnd=$,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},R.prototype._renderFrameCallback=function(){var N=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(N)),N<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},R.prototype._normalizeBearing=function(N,$){N=i.wrap(N,-180,180);var we=Math.abs(N-$);return Math.abs(N-360-$)180?-360:we<-180?360:0}},R}(i.Evented),Ps=function(R){R===void 0&&(R={}),this.options=R,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ps.prototype.getDefaultPosition=function(){return"bottom-right"},Ps.prototype.onAdd=function(R){var K=this.options&&this.options.compact;return this._map=R,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"),K&&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),K===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ps.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},Ps.prototype._setElementTitle=function(R,K){var N=this._map._getUIString("AttributionControl."+K);R.title=N,R.setAttribute("aria-label",N)},Ps.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"))},Ps.prototype._updateEditLink=function(){var R=this._editLink;R||(R=this._editLink=this._container.querySelector(".mapbox-improve-map"));var K=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(R){var N=K.reduce(function($,we,ge){return we.value&&($+=we.key+"="+we.value+(ge=0)return!1;return!0});var Ue=R.join(" | ");Ue!==this._attribHTML&&(this._attribHTML=Ue,R.length?(this._innerContainer.innerHTML=Ue,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ps.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var qs=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};qs.prototype.onAdd=function(R){this._map=R,this._container=o.create("div","mapboxgl-ctrl");var K=o.create("a","mapboxgl-ctrl-logo");return K.target="_blank",K.rel="noopener nofollow",K.href="https://www.mapbox.com/",K.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),K.setAttribute("rel","noopener nofollow"),this._container.appendChild(K),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},qs.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},qs.prototype.getDefaultPosition=function(){return"bottom-left"},qs.prototype._updateLogo=function(R){(!R||R.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},qs.prototype._logoRequired=function(){if(this._map.style){var R=this._map.style.sourceCaches;for(var K in R){var N=R[K].getSource();if(N.mapbox_logo)return!0}return!1}},qs.prototype._updateCompact=function(){var R=this._container.children;if(R.length){var K=R[0];this._map.getCanvasContainer().offsetWidth<250?K.classList.add("mapboxgl-compact"):K.classList.remove("mapboxgl-compact")}};var Do=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Do.prototype.add=function(R){var K=++this._id,N=this._queue;return N.push({callback:R,id:K,cancelled:!1}),K},Do.prototype.remove=function(R){for(var K=this._currentlyRunning,N=K?this._queue.concat(K):this._queue,$=0,we=N;$N.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(N.minPitch!=null&&N.maxPitch!=null&&N.minPitch>N.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(N.minPitch!=null&&N.minPitchru)throw new Error("maxPitch must be less than or equal to "+ru);var we=new Jl(N.minZoom,N.maxZoom,N.minPitch,N.maxPitch,N.renderWorldCopies);if(Y.call(this,we,N),this._interactive=N.interactive,this._maxTileCacheSize=N.maxTileCacheSize,this._failIfMajorPerformanceCaveat=N.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=N.preserveDrawingBuffer,this._antialias=N.antialias,this._trackResize=N.trackResize,this._bearingSnap=N.bearingSnap,this._refreshExpiredTiles=N.refreshExpiredTiles,this._fadeDuration=N.fadeDuration,this._crossSourceCollisions=N.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=N.collectResourceTiming,this._renderTaskQueue=new Do,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},kn,N.locale),this._clickTolerance=N.clickTolerance,this._requestManager=new i.RequestManager(N.transformRequest,N.accessToken),typeof N.container=="string"){if(this._container=i.window.document.getElementById(N.container),!this._container)throw new Error("Container '"+N.container+"' not found.")}else if(N.container instanceof Es)this._container=N.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(N.maxBounds&&this.setMaxBounds(N.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 $._update(!1)}),this.on("moveend",function(){return $._update(!1)}),this.on("zoom",function(){return $._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 is(this,N);var ge=typeof N.hash=="string"&&N.hash||void 0;this._hash=N.hash&&new tf(ge).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:N.center,zoom:N.zoom,bearing:N.bearing,pitch:N.pitch}),N.bounds&&(this.resize(),this.fitBounds(N.bounds,i.extend({},N.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=N.localIdeographFontFamily,N.style&&this.setStyle(N.style,{localIdeographFontFamily:N.localIdeographFontFamily}),N.attributionControl&&this.addControl(new Ps({customAttribution:N.customAttribution})),this.addControl(new qs,N.logoPosition),this.on("style.load",function(){$.transform.unmodified&&$.jumpTo($.style.stylesheet)}),this.on("data",function(Ue){$._update(Ue.dataType==="style"),$.fire(new i.Event(Ue.dataType+"data",Ue))}),this.on("dataloading",function(Ue){$.fire(new i.Event(Ue.dataType+"dataloading",Ue))})}Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R;var K={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return R.prototype._getMapId=function(){return this._mapId},R.prototype.addControl=function($,we){if(we===void 0&&($.getDefaultPosition?we=$.getDefaultPosition():we="top-right"),!$||!$.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 ge=$.onAdd(this);this._controls.push($);var Ue=this._controlPositions[we];return we.indexOf("bottom")!==-1?Ue.insertBefore(ge,Ue.firstChild):Ue.appendChild(ge),this},R.prototype.removeControl=function($){if(!$||!$.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 we=this._controls.indexOf($);return we>-1&&this._controls.splice(we,1),$.onRemove(this),this},R.prototype.hasControl=function($){return this._controls.indexOf($)>-1},R.prototype.resize=function($){var we=this._containerDimensions(),ge=we[0],Ue=we[1];this._resizeCanvas(ge,Ue),this.transform.resize(ge,Ue),this.painter.resize(ge,Ue);var dt=!this._moving;return dt&&(this.stop(),this.fire(new i.Event("movestart",$)).fire(new i.Event("move",$))),this.fire(new i.Event("resize",$)),dt&&this.fire(new i.Event("moveend",$)),this},R.prototype.getBounds=function(){return this.transform.getBounds()},R.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},R.prototype.setMaxBounds=function($){return this.transform.setMaxBounds(i.LngLatBounds.convert($)),this._update()},R.prototype.setMinZoom=function($){if($=$==null?Qo:$,$>=Qo&&$<=this.transform.maxZoom)return this.transform.minZoom=$,this._update(),this.getZoom()<$&&this.setZoom($),this;throw new Error("minZoom must be between "+Qo+" and the current maxZoom, inclusive")},R.prototype.getMinZoom=function(){return this.transform.minZoom},R.prototype.setMaxZoom=function($){if($=$==null?bl:$,$>=this.transform.minZoom)return this.transform.maxZoom=$,this._update(),this.getZoom()>$&&this.setZoom($),this;throw new Error("maxZoom must be greater than the current minZoom")},R.prototype.getMaxZoom=function(){return this.transform.maxZoom},R.prototype.setMinPitch=function($){if($=$==null?nl:$,$=nl&&$<=this.transform.maxPitch)return this.transform.minPitch=$,this._update(),this.getPitch()<$&&this.setPitch($),this;throw new Error("minPitch must be between "+nl+" and the current maxPitch, inclusive")},R.prototype.getMinPitch=function(){return this.transform.minPitch},R.prototype.setMaxPitch=function($){if($=$==null?ru:$,$>ru)throw new Error("maxPitch must be less than or equal to "+ru);if($>=this.transform.minPitch)return this.transform.maxPitch=$,this._update(),this.getPitch()>$&&this.setPitch($),this;throw new Error("maxPitch must be greater than the current minPitch")},R.prototype.getMaxPitch=function(){return this.transform.maxPitch},R.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},R.prototype.setRenderWorldCopies=function($){return this.transform.renderWorldCopies=$,this._update()},R.prototype.project=function($){return this.transform.locationPoint(i.LngLat.convert($))},R.prototype.unproject=function($){return this.transform.pointLocation(i.Point.convert($))},R.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},R.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},R.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},R.prototype._createDelegatedListener=function($,we,ge){var Ue=this,dt;if($==="mouseenter"||$==="mouseover"){var Rt=!1,ur=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length?Rt||(Rt=!0,ge.call(Ue,new se($,Ue,mr.originalEvent,{features:Pr}))):Rt=!1},gr=function(){Rt=!1};return{layer:we,listener:ge,delegates:{mousemove:ur,mouseout:gr}}}else if($==="mouseleave"||$==="mouseout"){var cr=!1,It=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length?cr=!0:cr&&(cr=!1,ge.call(Ue,new se($,Ue,mr.originalEvent)))},Qt=function(mr){cr&&(cr=!1,ge.call(Ue,new se($,Ue,mr.originalEvent)))};return{layer:we,listener:ge,delegates:{mousemove:It,mouseout:Qt}}}else{var ar=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length&&(mr.features=Pr,ge.call(Ue,mr),delete mr.features)};return{layer:we,listener:ge,delegates:(dt={},dt[$]=ar,dt)}}},R.prototype.on=function($,we,ge){if(ge===void 0)return Y.prototype.on.call(this,$,we);var Ue=this._createDelegatedListener($,we,ge);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$]=this._delegatedListeners[$]||[],this._delegatedListeners[$].push(Ue);for(var dt in Ue.delegates)this.on(dt,Ue.delegates[dt]);return this},R.prototype.once=function($,we,ge){if(ge===void 0)return Y.prototype.once.call(this,$,we);var Ue=this._createDelegatedListener($,we,ge);for(var dt in Ue.delegates)this.once(dt,Ue.delegates[dt]);return this},R.prototype.off=function($,we,ge){var Ue=this;if(ge===void 0)return Y.prototype.off.call(this,$,we);var dt=function(Rt){for(var ur=Rt[$],gr=0;gr180;){var ge=K.locationPoint(Y);if(ge.x>=0&&ge.y>=0&&ge.x<=K.width&&ge.y<=K.height)break;Y.lng>K.center.lng?Y.lng-=360:Y.lng+=360}return Y}var lu={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 bu(Y,R,K){var N=Y.classList;for(var $ in lu)N.remove("mapboxgl-"+K+"-anchor-"+$);N.add("mapboxgl-"+K+"-anchor-"+R)}var al=function(Y){function R(K,N){if(Y.call(this),(K instanceof i.window.HTMLElement||N)&&(K=i.extend({element:K},N)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=K&&K.anchor||"center",this._color=K&&K.color||"#3FB1CE",this._scale=K&&K.scale||1,this._draggable=K&&K.draggable||!1,this._clickTolerance=K&&K.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=K&&K.rotation||0,this._rotationAlignment=K&&K.rotationAlignment||"auto",this._pitchAlignment=K&&K.pitchAlignment&&K.pitchAlignment!=="auto"?K.pitchAlignment:this._rotationAlignment,!K||!K.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var $=o.createNS("http://www.w3.org/2000/svg","svg"),we=41,ge=27;$.setAttributeNS(null,"display","block"),$.setAttributeNS(null,"height",we+"px"),$.setAttributeNS(null,"width",ge+"px"),$.setAttributeNS(null,"viewBox","0 0 "+ge+" "+we);var Ue=o.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"stroke","none"),Ue.setAttributeNS(null,"stroke-width","1"),Ue.setAttributeNS(null,"fill","none"),Ue.setAttributeNS(null,"fill-rule","evenodd");var dt=o.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"fill-rule","nonzero");var Rt=o.createNS("http://www.w3.org/2000/svg","g");Rt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Rt.setAttributeNS(null,"fill","#000000");for(var ur=[{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"}],gr=0,cr=ur;gr=$}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},R.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"},R.prototype._addDragHandler=function(N){this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},R.prototype.setDraggable=function(N){return this._draggable=!!N,this._map&&(N?(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},R.prototype.isDraggable=function(){return this._draggable},R.prototype.setRotation=function(N){return this._rotation=N||0,this._update(),this},R.prototype.getRotation=function(){return this._rotation},R.prototype.setRotationAlignment=function(N){return this._rotationAlignment=N||"auto",this._update(),this},R.prototype.getRotationAlignment=function(){return this._rotationAlignment},R.prototype.setPitchAlignment=function(N){return this._pitchAlignment=N&&N!=="auto"?N:this._rotationAlignment,this._update(),this},R.prototype.getPitchAlignment=function(){return this._pitchAlignment},R}(i.Evented),jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},mu;function Tu(Y){mu!==void 0?Y(mu):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(R){mu=R.state!=="denied",Y(mu)}):(mu=!!i.window.navigator.geolocation,Y(mu))}var Ru=0,Rf=!1,Cc=function(Y){function R(K){Y.call(this),this.options=i.extend({},jl,K),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.onAdd=function(N){return this._map=N,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Tu(this._setupUI),this._container},R.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,Ru=0,Rf=!1},R.prototype._isOutOfMapMaxBounds=function(N){var $=this._map.getMaxBounds(),we=N.coords;return $&&(we.longitude<$.getWest()||we.longitude>$.getEast()||we.latitude<$.getSouth()||we.latitude>$.getNorth())},R.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}},R.prototype._onSuccess=function(N){if(this._map){if(this._isOutOfMapMaxBounds(N)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",N)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=N,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(N),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(N),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",N)),this._finish()}},R.prototype._updateCamera=function(N){var $=new i.LngLat(N.coords.longitude,N.coords.latitude),we=N.coords.accuracy,ge=this._map.getBearing(),Ue=i.extend({bearing:ge},this.options.fitBoundsOptions);this._map.fitBounds($.toBounds(we),Ue,{geolocateSource:!0})},R.prototype._updateMarker=function(N){if(N){var $=new i.LngLat(N.coords.longitude,N.coords.latitude);this._accuracyCircleMarker.setLngLat($).addTo(this._map),this._userLocationDotMarker.setLngLat($).addTo(this._map),this._accuracy=N.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},R.prototype._updateCircleRadius=function(){var N=this._map._container.clientHeight/2,$=this._map.unproject([0,N]),we=this._map.unproject([1,N]),ge=$.distanceTo(we),Ue=Math.ceil(2*this._accuracy/ge);this._circleElement.style.width=Ue+"px",this._circleElement.style.height=Ue+"px"},R.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},R.prototype._onError=function(N){if(this._map){if(this.options.trackUserLocation)if(N.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 $=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=$,this._geolocateButton.setAttribute("aria-label",$),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(N.code===3&&Rf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",N)),this._finish()}},R.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},R.prototype._setupUI=function(N){var $=this;if(this._container.addEventListener("contextmenu",function(Ue){return Ue.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",N===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var we=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=we,this._geolocateButton.setAttribute("aria-label",we)}else{var ge=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ge,this._geolocateButton.setAttribute("aria-label",ge)}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 al(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new al({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(Ue){var dt=Ue.originalEvent&&Ue.originalEvent.type==="resize";!Ue.geolocateSource&&$._watchState==="ACTIVE_LOCK"&&!dt&&($._watchState="BACKGROUND",$._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),$._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),$.fire(new i.Event("trackuserlocationend")))})},R.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":Ru--,Rf=!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"),Ru++;var N;Ru>1?(N={maximumAge:6e5,timeout:0},Rf=!0):(N=this.options.positionOptions,Rf=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,N)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},R.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)},R}(i.Evented),rf={maxWidth:100,unit:"metric"},Lc=function(R){this.options=i.extend({},rf,R),i.bindAll(["_onMove","setUnit"],this)};Lc.prototype.getDefaultPosition=function(){return"bottom-left"},Lc.prototype._onMove=function(){wf(this._map,this._container,this.options)},Lc.prototype.onAdd=function(R){return this._map=R,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Lc.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Lc.prototype.setUnit=function(R){this.options.unit=R,wf(this._map,this._container,this.options)};function wf(Y,R,K){var N=K&&K.maxWidth||100,$=Y._container.clientHeight/2,we=Y.unproject([0,$]),ge=Y.unproject([N,$]),Ue=we.distanceTo(ge);if(K&&K.unit==="imperial"){var dt=3.2808*Ue;if(dt>5280){var Rt=dt/5280;pc(R,N,Rt,Y._getUIString("ScaleControl.Miles"))}else pc(R,N,dt,Y._getUIString("ScaleControl.Feet"))}else if(K&&K.unit==="nautical"){var ur=Ue/1852;pc(R,N,ur,Y._getUIString("ScaleControl.NauticalMiles"))}else Ue>=1e3?pc(R,N,Ue/1e3,Y._getUIString("ScaleControl.Kilometers")):pc(R,N,Ue,Y._getUIString("ScaleControl.Meters"))}function pc(Y,R,K,N){var $=qc(K),we=$/K;Y.style.width=R*we+"px",Y.innerHTML=$+" "+N}function vc(Y){var R=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*R)/R}function qc(Y){var R=Math.pow(10,(""+Math.floor(Y)).length-1),K=Y/R;return K=K>=10?10:K>=5?5:K>=3?3:K>=2?2:K>=1?1:vc(K),R*K}var If=function(R){this._fullscreen=!1,R&&R.container&&(R.container instanceof i.window.HTMLElement?this._container=R.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")};If.prototype.onAdd=function(R){return this._map=R,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},If.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},If.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},If.prototype._setupUI=function(){var R=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",R).setAttribute("aria-hidden",!0),R.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},If.prototype._updateTitle=function(){var R=this._getTitle();this._fullscreenButton.setAttribute("aria-label",R),this._fullscreenButton.title=R},If.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},If.prototype._isFullscreen=function(){return this._fullscreen},If.prototype._changeIcon=function(){var R=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;R===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},If.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 Ac={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},zc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Vu=function(Y){function R(K){Y.call(this),this.options=i.extend(Object.create(Ac),K),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.addTo=function(N){return this._map&&this.remove(),this._map=N,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},R.prototype.isOpen=function(){return!!this._map},R.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},R.prototype.getLngLat=function(){return this._lngLat},R.prototype.setLngLat=function(N){return this._lngLat=i.LngLat.convert(N),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},R.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},R.prototype.getElement=function(){return this._container},R.prototype.setText=function(N){return this.setDOMContent(i.window.document.createTextNode(N))},R.prototype.setHTML=function(N){var $=i.window.document.createDocumentFragment(),we=i.window.document.createElement("body"),ge;for(we.innerHTML=N;ge=we.firstChild,!!ge;)$.appendChild(ge);return this.setDOMContent($)},R.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},R.prototype.setMaxWidth=function(N){return this.options.maxWidth=N,this._update(),this},R.prototype.setDOMContent=function(N){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(N),this._createCloseButton(),this._update(),this._focusFirstElement(),this},R.prototype.addClassName=function(N){this._container&&this._container.classList.add(N)},R.prototype.removeClassName=function(N){this._container&&this._container.classList.remove(N)},R.prototype.setOffset=function(N){return this.options.offset=N,this._update(),this},R.prototype.toggleClassName=function(N){if(this._container)return this._container.classList.toggle(N)},R.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))},R.prototype._onMouseUp=function(N){this._update(N.point)},R.prototype._onMouseMove=function(N){this._update(N.point)},R.prototype._onDrag=function(N){this._update(N.point)},R.prototype._update=function(N){var $=this,we=this._lngLat||this._trackPointer;if(!(!this._map||!we||!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(It){return $._container.classList.add(It)}),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=zl(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!N))){var ge=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat),Ue=this.options.anchor,dt=Bc(this.options.offset);if(!Ue){var Rt=this._container.offsetWidth,ur=this._container.offsetHeight,gr;ge.y+dt.bottom.ythis._map.transform.height-ur?gr=["bottom"]:gr=[],ge.xthis._map.transform.width-Rt/2&&gr.push("right"),gr.length===0?Ue="bottom":Ue=gr.join("-")}var cr=ge.add(dt[Ue]).round();o.setTransform(this._container,lu[Ue]+" translate("+cr.x+"px,"+cr.y+"px)"),bu(this._container,Ue,"popup")}},R.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var N=this._container.querySelector(zc);N&&N.focus()}},R.prototype._onClose=function(){this.remove()},R}(i.Evented);function Bc(Y){if(Y)if(typeof Y=="number"){var R=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(R,R),"top-right":new i.Point(-R,R),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(R,-R),"bottom-right":new i.Point(-R,-R),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var K=i.Point.convert(Y);return{center:K,top:K,"top-left":K,"top-right":K,bottom:K,"bottom-left":K,"bottom-right":K,left:K,right:K}}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 Bc(new i.Point(0,0))}var Ou={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:Ho,NavigationControl:tl,GeolocateControl:Cc,AttributionControl:Ps,ScaleControl:Lc,FullscreenControl:If,Popup:Vu,Marker:al,Style:An,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Ur,clearPrewarmedResources:ti,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 vi.workerCount},set workerCount(Y){vi.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(R){i.clearTileCache(R)},workerUrl:""};return Ou}),r})});var kVe=Se((d_r,EVe)=>{"use strict";var tw=Zr(),IGt=Bf().sanitizeHTML,DGt=$K(),AVe=f1();function SVe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=AVe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var iy=SVe.prototype;iy.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=tq(t)};iy.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))};iy.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};iy.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};iy.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};iy.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)};iy.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,!!tq(e)){var r=RGt(e);t.addSource(this.idSource,r)}};iy.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function MVe(e){var t={},r={};switch(e.type){case"circle":tw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":tw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":tw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=DGt(n.textposition,n.iconsize);tw.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}),tw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":tw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function RGt(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=IGt(e.sourceattribution)),n}EVe.exports=function(t,r,n){var i=new SVe(t,r);return i.update(n),i}});var qVe=Se((p_r,FVe)=>{"use strict";var aJ=nJ(),oJ=Zr(),PVe=ix(),CVe=Ul(),FGt=hu(),qGt=gp(),rq=jc(),IVe=Sy(),BGt=IVe.drawMode,OGt=IVe.selectMode,NGt=nh().prepSelect,UGt=nh().clearOutline,VGt=nh().clearSelectionsCache,HGt=nh().selectOnClick,gx=f1(),GGt=kVe();function DVe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=DVe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=RVe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,u=s?[[s.west,s.south],[s.east,s.north]]:null,l=i.map=new aJ.Map({container:i.div,style:o.style,center:sJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:u,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new aJ.AttributionControl({compact:!0}));l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(c){l.once("load",c)})),f=f.concat(PVe.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],u=RVe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,a.setStyle(u.style),i.traceHash={},s.push(new Promise(function(l){a.once("styledata",l)}))),s=s.concat(PVe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&HGt(u.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),l.indexOf("event")>-1&&rq.click(n,u.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(u){var l=t.map.unproject(u);return[l.lng,l.lat]}var a=e.dragmode,o;o=function(u,l){if(l.isRect){var f=u.range={};f[t.id]=[i([l.xmin,l.ymin]),i([l.xmax,l.ymax])]}else{var c=u.lassoPoints={};c[t.id]=l.map(i)}};var s=t.dragOptions;t.dragOptions=oJ.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),OGt(a)||BGt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(u,l,f){NGt(u,l,f,t.dragOptions,a)},qGt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var lJ=Zr(),WGt=k_(),jGt=Jd(),BVe=zk();OVe.exports=function(t,r,n){WGt(t,r,n,{type:"mapbox",attributes:BVe,handleDefaults:ZGt,partition:"y",accessToken:r._mapboxAccessToken})};function ZGt(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,jGt(e,t,{name:"layers",handleItemDefaults:XGt}),t._input=e}function XGt(e,t){function r(u,l){return lJ.coerce(e,t,BVe.layers,u,l)}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",lJ.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"),lJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var iq=Se(Nv=>{"use strict";var UVe=nJ(),tm=Zr(),uJ=tm.strTranslate,YGt=tm.strScale,KGt=Dd().getSubplotCalcData,JGt=Zv(),$Gt=Nl(),VVe=yu(),QGt=Bf(),eWt=qVe(),_x="mapbox",Qm=Nv.constants=f1();Nv.name=_x;Nv.attr="subplot";Nv.idRoot=_x;Nv.idRegex=Nv.attrRegex=tm.counterRegex(_x);var tWt=["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(" ");Nv.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Nv.layoutAttributes=zk();Nv.supplyLayoutDefaults=NVe();var HVe=!0;Nv.plot=function(t){HVe&&(HVe=!1,tm.warn(tWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[_x];if(UVe.version!==Qm.requiredVersion)throw new Error(Qm.wrongVersionErrorMsg);var a=rWt(t,i);UVe.accessToken=a;for(var o=0;oy/2){var E=d.split("|").join("
");x.text(E).attr("data-unformatted",E).call(QGt.convertToTspans,e),b=VVe.bBox(x.node())}x.attr("transform",uJ(-3,-b.height+8)),p.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 k=1;b.width+6>y&&(k=y/(b.width+6));var A=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];p.attr("transform",uJ(A[0],A[1])+YGt(k))}};function rWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,u=0;u1&&tm.warn(Qm.multipleTokensErrorMsg),i[0]):(a.length&&tm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function GVe(e){return typeof e=="string"&&(Qm.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Nv.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=0;n{"use strict";var m_r=["*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(" ");WVe.exports={attributes:Y9(),supplyDefaults:iVe(),colorbar:ep(),formatLabels:JK(),calc:lF(),plot:mVe(),hoverPoints:eq().hoverPoints,eventData:bVe(),selectPoints:TVe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:iq(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var XVe=Se((__r,ZVe)=>{"use strict";ZVe.exports=jVe()});var fJ=Se((x_r,YVe)=>{"use strict";var c1=JA(),iWt=Xf(),nWt=Du().hovertemplateAttrs,aWt=zf(),xx=vu().extendFlat;YVe.exports=xx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:xx({},c1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c1.text,hovertext:c1.hovertext,marker:{line:{color:xx({},c1.marker.line.color,{editType:"plot"}),width:xx({},c1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:xx({},c1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:xx({},c1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:xx({},c1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c1.hoverinfo,hovertemplate:nWt({},{keys:["properties"]}),showlegend:xx({},aWt.showlegend,{dflt:!1})},iWt("",{cLetter:"z",editTypeOverride:"calc"}))});var JVe=Se((b_r,KVe)=>{"use strict";var Rk=Zr(),oWt=ed(),sWt=fJ();KVe.exports=function(t,r,n,i){function a(f,c){return Rk.coerce(t,r,sWt,f,c)}var o=a("locations"),s=a("z"),u=a("geojson");if(!Rk.isArrayOrTypedArray(o)||!o.length||!Rk.isArrayOrTypedArray(s)||!s.length||!(typeof u=="string"&&u!==""||Rk.isPlainObject(u))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),oWt(t,r,i,a,{prefix:"",cLetter:"z"}),Rk.coerceSelectionMarkerOpacity(r,a)}});var cJ=Se((w_r,eHe)=>{"use strict";var lWt=_u(),h1=Zr(),uWt=fc(),fWt=yu(),cWt=tx().makeBlank,$Ve=ix();function hWt(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:cWt()};if(!r)return a;var o=$Ve.extractTraceFeature(e);if(!o)return a;var s=uWt.makeColorScaleFuncFromTrace(t),u=t.marker,l=u.line||{},f;h1.isArrayOrTypedArray(u.opacity)&&(f=function(E){var k=E.mo;return lWt(k)?+h1.constrain(k,0,1):0});var c;h1.isArrayOrTypedArray(l.color)&&(c=function(E){return E.mlc});var h;h1.isArrayOrTypedArray(l.width)&&(h=function(E){return E.mlw});for(var d=0;d{"use strict";var rHe=cJ().convert,dWt=cJ().convertOnSelect,tHe=f1().traceLayerPrefix;function iHe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",tHe+t+"-fill"],["line",tHe+t+"-line"]],this.below=null}var TS=iHe.prototype;TS.update=function(e){this._update(rHe(e)),e[0].trace._glTrace=this};TS.updateOnSelect=function(e){this._update(dWt(e))};TS._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])};TS.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};nHe.exports=function(t,r){var n=r[0].trace,i=new iHe(t,n.uid),a=i.sourceId,o=rHe(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 sHe=Se((S_r,oHe)=>{"use strict";var A_r=["*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(" ");oHe.exports={attributes:fJ(),supplyDefaults:JVe(),colorbar:S_(),calc:LF(),plot:aHe(),hoverPoints:PF(),eventData:IF(),selectPoints:DF(),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";lHe.exports=sHe()});var dJ=Se((E_r,cHe)=>{"use strict";var pWt=Xf(),vWt=Du().hovertemplateAttrs,fHe=zf(),nq=Y9(),hJ=vu().extendFlat;cHe.exports=hJ({lon:nq.lon,lat:nq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:nq.text,hovertext:nq.hovertext,hoverinfo:hJ({},fHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:vWt(),showlegend:hJ({},fHe.showlegend,{dflt:!1})},pWt("",{cLetter:"z",editTypeOverride:"calc"}))});var dHe=Se((k_r,hHe)=>{"use strict";var yWt=Zr(),mWt=ed(),gWt=dJ();hHe.exports=function(t,r,n,i){function a(l,f){return yWt.coerce(t,r,gWt,l,f)}var o=a("lon")||[],s=a("lat")||[],u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),mWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var yHe=Se((C_r,vHe)=>{"use strict";var pJ=_u(),_Wt=Zr().isArrayOrTypedArray,vJ=ju().BADNUM,xWt=Rp(),pHe=Zr()._;vHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=_Wt(a)&&a.length,s=0;s{"use strict";var bWt=_u(),yJ=Zr(),mHe=Pl(),gHe=fc(),_He=ju().BADNUM,wWt=tx().makeBlank;xHe.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:wWt()};if(!n)return a;var o=[],s,u=r.z,l=r.radius,f=yJ.isArrayOrTypedArray(u)&&u.length,c=yJ.isArrayOrTypedArray(l);for(s=0;s0?+l[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var b=gHe.extractOpts(r),y=b.reversescale?gHe.flipScale(b.colorscale):b.colorscale,E=y[0][1],k=mHe.opacity(E)<1?E:mHe.addOpacity(E,0),A=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var wHe=bHe(),TWt=f1().traceLayerPrefix;function THe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",TWt+t+"-heatmap"]],this.below=null}var aq=THe.prototype;aq.update=function(e){var t=this.subplot,r=this.layerList,n=wHe(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])};aq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};AHe.exports=function(t,r){var n=r[0].trace,i=new THe(t,n.uid),a=i.sourceId,o=wHe(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 EHe=Se((P_r,MHe)=>{"use strict";var AWt=hu(),SWt=eq().hoverPoints,MWt=eq().getExtraText;MHe.exports=function(t,r,n){var i=SWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,u=o[a.index];if(delete a.color,"z"in u){var l=a.subplot.mockAxis;a.z=u.z,a.zLabel=AWt.tickText(l,l.c2l(u.z),"hover").text}return a.extraText=MWt(s,u,o[0].t.labels),[a]}}});var CHe=Se((I_r,kHe)=>{"use strict";kHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var zHe=Se((R_r,LHe)=>{"use strict";var D_r=["*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(" ");LHe.exports={attributes:dJ(),supplyDefaults:dHe(),colorbar:S_(),formatLabels:JK(),calc:yHe(),plot:SHe(),hoverPoints:EHe(),eventData:CHe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";PHe.exports=zHe()});var RHe=Se((q_r,DHe)=>{DHe.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} +`),Fr=Ue.createShader(Ue.FRAGMENT_SHADER);if(Ue.isContextLost()){this.failedToCreate=!0;return}Ue.shaderSource(Fr,Xr),Ue.compileShader(Fr),Ue.attachShader(this.program,Fr);var Kr=Ue.createShader(Ue.VERTEX_SHADER);if(Ue.isContextLost()){this.failedToCreate=!0;return}Ue.shaderSource(Kr,Gr),Ue.compileShader(Kr),Ue.attachShader(this.program,Kr),this.attributes={};var Cr={};this.numAttributes=ur.length;for(var yi=0;yi>16,Ue>>16],u_pixel_coord_lower:[ge&65535,Ue&65535]}}function Zs(Y,R,K,N){var $=K.imageManager.getPattern(Y.from.toString()),we=K.imageManager.getPattern(Y.to.toString()),ge=K.imageManager.getPixelSize(),Ue=ge.width,dt=ge.height,Rt=Math.pow(2,N.tileID.overscaledZ),ur=N.tileSize*Math.pow(2,K.transform.tileZoom)/Rt,gr=ur*(N.tileID.canonical.x+N.tileID.wrap*Rt),cr=ur*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:$.tl,u_pattern_br_a:$.br,u_pattern_tl_b:we.tl,u_pattern_br_b:we.br,u_texsize:[Ue,dt],u_mix:R.t,u_pattern_size_a:$.displaySize,u_pattern_size_b:we.displaySize,u_scale_a:R.fromScale,u_scale_b:R.toScale,u_tile_units_to_pixels:1/Ba(N,1,K.transform.tileZoom),u_pixel_coord_upper:[gr>>16,cr>>16],u_pixel_coord_lower:[gr&65535,cr&65535]}}var Fs=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_lightpos:new i.Uniform3f(Y,R.u_lightpos),u_lightintensity:new i.Uniform1f(Y,R.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,R.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,R.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},ws=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_lightpos:new i.Uniform3f(Y,R.u_lightpos),u_lightintensity:new i.Uniform1f(Y,R.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,R.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,R.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,R.u_height_factor),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},no=function(Y,R,K,N){var $=R.style.light,we=$.properties.get("position"),ge=[we.x,we.y,we.z],Ue=i.create$1();$.properties.get("anchor")==="viewport"&&i.fromRotation(Ue,-R.transform.angle),i.transformMat3(ge,ge,Ue);var dt=$.properties.get("color");return{u_matrix:Y,u_lightpos:ge,u_lightintensity:$.properties.get("intensity"),u_lightcolor:[dt.r,dt.g,dt.b],u_vertical_gradient:+K,u_opacity:N}},Ls=function(Y,R,K,N,$,we,ge){return i.extend(no(Y,R,K,N),No(we,R,ge),{u_height_factor:-Math.pow(2,$.overscaledZ)/ge.tileSize/8})},ds=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},Xs=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},oa=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world)}},Yo=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world),u_image:new i.Uniform1i(Y,R.u_image),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},po=function(Y){return{u_matrix:Y}},ss=function(Y,R,K,N){return i.extend(po(Y),No(K,R,N))},ls=function(Y,R){return{u_matrix:Y,u_world:R}},gs=function(Y,R,K,N,$){return i.extend(ss(Y,R,K,N),{u_world:$})},bt=function(Y,R){return{u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,R.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,R.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},Ft=function(Y,R,K,N){var $=Y.transform,we,ge;if(N.paint.get("circle-pitch-alignment")==="map"){var Ue=Ba(K,1,$.zoom);we=!0,ge=[Ue,Ue]}else we=!1,ge=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(R.posMatrix,K,N.paint.get("circle-translate"),N.paint.get("circle-translate-anchor")),u_pitch_with_map:+we,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ge}},hr=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,R.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,R.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,R.u_overscale_factor)}},nr=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,R.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,R.u_viewport_size)}},Sr=function(Y,R,K){var N=Ba(K,1,R.zoom),$=Math.pow(2,R.zoom-K.tileID.overscaledZ),we=K.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:R.cameraToCenterDistance,u_pixels_to_tile_units:N,u_extrude_scale:[R.pixelsToGLUnits[0]/(N*$),R.pixelsToGLUnits[1]/(N*$)],u_overscale_factor:we}},li=function(Y,R,K){return{u_matrix:Y,u_inv_matrix:R,u_camera_to_center_distance:K.cameraToCenterDistance,u_viewport_size:[K.width,K.height]}},di=function(Y,R){return{u_color:new i.UniformColor(Y,R.u_color),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_overlay:new i.Uniform1i(Y,R.u_overlay),u_overlay_scale:new i.Uniform1f(Y,R.u_overlay_scale)}},mi=function(Y,R,K){return K===void 0&&(K=1),{u_matrix:Y,u_color:R,u_overlay:0,u_overlay_scale:K}},Oi=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},dn=function(Y){return{u_matrix:Y}},wi=function(Y,R){return{u_extrude_scale:new i.Uniform1f(Y,R.u_extrude_scale),u_intensity:new i.Uniform1f(Y,R.u_intensity),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix)}},ui=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_world:new i.Uniform2f(Y,R.u_world),u_image:new i.Uniform1i(Y,R.u_image),u_color_ramp:new i.Uniform1i(Y,R.u_color_ramp),u_opacity:new i.Uniform1f(Y,R.u_opacity)}},Ai=function(Y,R,K,N){return{u_matrix:Y,u_extrude_scale:Ba(R,1,K),u_intensity:N}},gi=function(Y,R,K,N){var $=i.create();i.ortho($,0,Y.width,Y.height,0,0,1);var we=Y.context.gl;return{u_matrix:$,u_world:[we.drawingBufferWidth,we.drawingBufferHeight],u_image:K,u_color_ramp:N,u_opacity:R.paint.get("heatmap-opacity")}},gn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_latrange:new i.Uniform2f(Y,R.u_latrange),u_light:new i.Uniform2f(Y,R.u_light),u_shadow:new i.UniformColor(Y,R.u_shadow),u_highlight:new i.UniformColor(Y,R.u_highlight),u_accent:new i.UniformColor(Y,R.u_accent)}},In=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_image:new i.Uniform1i(Y,R.u_image),u_dimension:new i.Uniform2f(Y,R.u_dimension),u_zoom:new i.Uniform1f(Y,R.u_zoom),u_unpack:new i.Uniform4f(Y,R.u_unpack)}},Vn=function(Y,R,K){var N=K.paint.get("hillshade-shadow-color"),$=K.paint.get("hillshade-highlight-color"),we=K.paint.get("hillshade-accent-color"),ge=K.paint.get("hillshade-illumination-direction")*(Math.PI/180);K.paint.get("hillshade-illumination-anchor")==="viewport"&&(ge-=Y.transform.angle);var Ue=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(R.tileID.toUnwrapped(),Ue),u_image:0,u_latrange:Hn(Y,R.tileID),u_light:[K.paint.get("hillshade-exaggeration"),ge],u_shadow:N,u_highlight:$,u_accent:we}},Rn=function(Y,R){var K=R.stride,N=i.create();return i.ortho(N,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(N,N,[0,-i.EXTENT,0]),{u_matrix:N,u_image:1,u_dimension:[K,K],u_zoom:Y.overscaledZ,u_unpack:R.getUnpackVector()}};function Hn(Y,R){var K=Math.pow(2,R.canonical.z),N=R.canonical.y;return[new i.MercatorCoordinate(0,N/K).toLngLat().lat,new i.MercatorCoordinate(0,(N+1)/K).toLngLat().lat]}var Gn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels)}},pn=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_image:new i.Uniform1i(Y,R.u_image),u_image_height:new i.Uniform1f(Y,R.u_image_height)}},Lo=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,R.u_image),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_scale:new i.Uniform3f(Y,R.u_scale),u_fade:new i.Uniform1f(Y,R.u_fade)}},us=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_ratio:new i.Uniform1f(Y,R.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,R.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,R.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,R.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,R.u_sdfgamma),u_image:new i.Uniform1i(Y,R.u_image),u_tex_y_a:new i.Uniform1f(Y,R.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,R.u_tex_y_b),u_mix:new i.Uniform1f(Y,R.u_mix)}},Bs=function(Y,R,K){var N=Y.transform;return{u_matrix:Gl(Y,R,K),u_ratio:1/Ba(R,1,N.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/N.pixelsToGLUnits[0],1/N.pixelsToGLUnits[1]]}},Js=function(Y,R,K,N){return i.extend(Bs(Y,R,K),{u_image:0,u_image_height:N})},ol=function(Y,R,K,N){var $=Y.transform,we=ul(R,$);return{u_matrix:Gl(Y,R,K),u_texsize:R.imageAtlasTexture.size,u_ratio:1/Ba(R,1,$.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[we,N.fromScale,N.toScale],u_fade:N.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},Cl=function(Y,R,K,N,$){var we=Y.transform,ge=Y.lineAtlas,Ue=ul(R,we),dt=K.layout.get("line-cap")==="round",Rt=ge.getDash(N.from,dt),ur=ge.getDash(N.to,dt),gr=Rt.width*$.fromScale,cr=ur.width*$.toScale;return i.extend(Bs(Y,R,K),{u_patternscale_a:[Ue/gr,-Rt.height/2],u_patternscale_b:[Ue/cr,-ur.height/2],u_sdfgamma:ge.width/(Math.min(gr,cr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Rt.y,u_tex_y_b:ur.y,u_mix:$.t})};function ul(Y,R){return 1/Ba(Y,1,R.tileZoom)}function Gl(Y,R,K){return Y.translatePosMatrix(R.tileID.posMatrix,R,K.paint.get("line-translate"),K.paint.get("line-translate-anchor"))}var Vl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_tl_parent:new i.Uniform2f(Y,R.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,R.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,R.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,R.u_fade_t),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_image0:new i.Uniform1i(Y,R.u_image0),u_image1:new i.Uniform1i(Y,R.u_image1),u_brightness_low:new i.Uniform1f(Y,R.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,R.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,R.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,R.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,R.u_spin_weights)}},Fl=function(Y,R,K,N,$){return{u_matrix:Y,u_tl_parent:R,u_scale_parent:K,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*$.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:$.paint.get("raster-brightness-min"),u_brightness_high:$.paint.get("raster-brightness-max"),u_saturation_factor:zs($.paint.get("raster-saturation")),u_contrast_factor:ko($.paint.get("raster-contrast")),u_spin_weights:ga($.paint.get("raster-hue-rotate"))}};function ga(Y){Y*=Math.PI/180;var R=Math.sin(Y),K=Math.cos(Y);return[(2*K+1)/3,(-Math.sqrt(3)*R-K+1)/3,(Math.sqrt(3)*R-K+1)/3]}function ko(Y){return Y>0?1/(1-Y):1+Y}function zs(Y){return Y>0?1-1/(1.001-Y):-Y}var Fo=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texture:new i.Uniform1i(Y,R.u_texture)}},Ys=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texture:new i.Uniform1i(Y,R.u_texture),u_gamma_scale:new i.Uniform1f(Y,R.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,R.u_is_halo)}},Gs=function(Y,R){return{u_is_size_zoom_constant:new i.Uniform1i(Y,R.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,R.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,R.u_size_t),u_size:new i.Uniform1f(Y,R.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,R.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,R.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,R.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,R.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,R.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,R.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,R.u_coord_matrix),u_is_text:new i.Uniform1i(Y,R.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,R.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_texsize_icon:new i.Uniform2f(Y,R.u_texsize_icon),u_texture:new i.Uniform1i(Y,R.u_texture),u_texture_icon:new i.Uniform1i(Y,R.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,R.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,R.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,R.u_is_halo)}},Us=function(Y,R,K,N,$,we,ge,Ue,dt,Rt){var ur=$.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:R?R.uSizeT:0,u_size:R?R.uSize:0,u_camera_to_center_distance:ur.cameraToCenterDistance,u_pitch:ur.pitch/360*2*Math.PI,u_rotate_symbol:+K,u_aspect_ratio:ur.width/ur.height,u_fade_change:$.options.fadeDuration?$.symbolFadeChange:1,u_matrix:we,u_label_plane_matrix:ge,u_coord_matrix:Ue,u_is_text:+dt,u_pitch_with_map:+N,u_texsize:Rt,u_texture:0}},Sl=function(Y,R,K,N,$,we,ge,Ue,dt,Rt,ur){var gr=$.transform;return i.extend(Us(Y,R,K,N,$,we,ge,Ue,dt,Rt),{u_gamma_scale:N?Math.cos(gr._pitch)*gr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+ur})},_l=function(Y,R,K,N,$,we,ge,Ue,dt,Rt){return i.extend(Sl(Y,R,K,N,$,we,ge,Ue,!0,dt,!0),{u_texsize_icon:Rt,u_texture_icon:1})},kl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_color:new i.UniformColor(Y,R.u_color)}},cl=function(Y,R){return{u_matrix:new i.UniformMatrix4f(Y,R.u_matrix),u_opacity:new i.Uniform1f(Y,R.u_opacity),u_image:new i.Uniform1i(Y,R.u_image),u_pattern_tl_a:new i.Uniform2f(Y,R.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,R.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,R.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,R.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,R.u_texsize),u_mix:new i.Uniform1f(Y,R.u_mix),u_pattern_size_a:new i.Uniform2f(Y,R.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,R.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,R.u_scale_a),u_scale_b:new i.Uniform1f(Y,R.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,R.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,R.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,R.u_tile_units_to_pixels)}},xl=function(Y,R,K){return{u_matrix:Y,u_opacity:R,u_color:K}},Uo=function(Y,R,K,N,$,we){return i.extend(Zs(N,we,K,$),{u_matrix:Y,u_opacity:R})},_s={fillExtrusion:Fs,fillExtrusionPattern:ws,fill:ds,fillPattern:Xs,fillOutline:oa,fillOutlinePattern:Yo,circle:bt,collisionBox:hr,collisionCircle:nr,debug:di,clippingMask:Oi,heatmap:wi,heatmapTexture:ui,hillshade:gn,hillshadePrepare:In,line:Gn,lineGradient:pn,linePattern:Lo,lineSDF:us,raster:Vl,symbolIcon:Fo,symbolSDF:Ys,symbolTextAndIcon:Gs,background:kl,backgroundPattern:cl},Bl;function Il(Y,R,K,N,$,we,ge){for(var Ue=Y.context,dt=Ue.gl,Rt=Y.useProgram("collisionBox"),ur=[],gr=0,cr=0,It=0;It0){var Gr=i.create(),Fr=Pr;i.mul(Gr,mr.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Gr,Gr,mr.placementViewportMatrix),ur.push({circleArray:Xr,circleOffset:cr,transform:Fr,invTransform:Gr}),gr+=Xr.length/4,cr=gr}Dr&&Rt.draw(Ue,dt.LINES,Si.disabled,Jr.disabled,Y.colorModeForRenderPass(),sr.disabled,Sr(Pr,Y.transform,ar),K.id,Dr.layoutVertexBuffer,Dr.indexBuffer,Dr.segments,null,Y.transform.zoom,null,null,Dr.collisionVertexBuffer)}}if(!(!ge||!ur.length)){var Kr=Y.useProgram("collisionCircle"),Cr=new i.StructArrayLayout2f1f2i16;Cr.resize(gr*4),Cr._trim();for(var yi=0,qi=0,vn=ur;qi=0&&(Qt[mr.associatedIconIndex]={shiftedAnchor:mo,angle:sl})}}if(ur){It.clear();for(var eo=Y.icon.placedSymbolArray,fs=0;fs0){var ge=i.browser.now(),Ue=(ge-Y.timeAdded)/we,dt=R?(ge-R.timeAdded)/we:-1,Rt=K.getSource(),ur=$.coveringZoomLevel({tileSize:Rt.tileSize,roundZoom:Rt.roundZoom}),gr=!R||Math.abs(R.tileID.overscaledZ-ur)>Math.abs(Y.tileID.overscaledZ-ur),cr=gr&&Y.refreshedUponExpiration?1:i.clamp(gr?Ue:1-dt,0,1);return Y.refreshedUponExpiration&&Ue>=1&&(Y.refreshedUponExpiration=!1),R?{opacity:1,mix:1-cr}:{opacity:cr,mix:0}}else return{opacity:1,mix:0}}function $t(Y,R,K){var N=K.paint.get("background-color"),$=K.paint.get("background-opacity");if($!==0){var we=Y.context,ge=we.gl,Ue=Y.transform,dt=Ue.tileSize,Rt=K.paint.get("background-pattern");if(!Y.isPatternMissing(Rt)){var ur=!Rt&&N.a===1&&$===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===ur){var gr=Jr.disabled,cr=Y.depthModeForSublayer(0,ur==="opaque"?Si.ReadWrite:Si.ReadOnly),It=Y.colorModeForRenderPass(),Qt=Y.useProgram(Rt?"backgroundPattern":"background"),ar=Ue.coveringTiles({tileSize:dt});Rt&&(we.activeTexture.set(ge.TEXTURE0),Y.imageManager.bind(Y.context));for(var mr=K.getCrossfadeParameters(),Pr=0,Dr=ar;Pr "+K.overscaledZ);var Pr=mr+" "+It+"kb";il(Y,Pr),ge.draw(N,$.TRIANGLES,Ue,dt,vt.alphaBlended,sr.disabled,mi(we,i.Color.transparent,ar),ur,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function il(Y,R){Y.initDebugOverlayCanvas();var K=Y.debugOverlayCanvas,N=Y.context.gl,$=Y.debugOverlayCanvas.getContext("2d");$.clearRect(0,0,K.width,K.height),$.shadowColor="white",$.shadowBlur=2,$.lineWidth=1.5,$.strokeStyle="white",$.textBaseline="top",$.font="bold 36px Open Sans, sans-serif",$.fillText(R,5,5),$.strokeText(R,5,5),Y.debugOverlayTexture.update(K),Y.debugOverlayTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}function $l(Y,R,K){var N=Y.context,$=K.implementation;if(Y.renderPass==="offscreen"){var we=$.prerender;we&&(Y.setCustomLayerDefaults(),N.setColorMode(Y.colorModeForRenderPass()),we.call($,N.gl,Y.transform.customLayerMatrix()),N.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),N.setColorMode(Y.colorModeForRenderPass()),N.setStencilMode(Jr.disabled);var ge=$.renderingMode==="3d"?new Si(Y.context.gl.LEQUAL,Si.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,Si.ReadOnly);N.setDepthMode(ge),$.render(N.gl,Y.transform.customLayerMatrix()),N.setDirty(),Y.setBaseState(),N.bindFramebuffer.set(null)}}var pl={symbol:w,circle:pt,heatmap:zt,line:Ir,fill:ce,"fill-extrusion":qe,hillshade:ot,raster:qt,background:$t,debug:el,custom:$l},Hl=function(R,K){this.context=new br(R),this.transform=K,this._tileTextures={},this.setup(),this.numSublayers=zr.maxUnderzooming+zr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jo,this.gpuTimers={}};Hl.prototype.resize=function(R,K){if(this.width=R*i.browser.devicePixelRatio,this.height=K*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var N=0,$=this.style._order;N<$.length;N+=1){var we=$[N];this.style._layers[we].resize()}},Hl.prototype.setup=function(){var R=this.context,K=new i.StructArrayLayout2i4;K.emplaceBack(0,0),K.emplaceBack(i.EXTENT,0),K.emplaceBack(0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=R.createVertexBuffer(K,_o.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var N=new i.StructArrayLayout2i4;N.emplaceBack(0,0),N.emplaceBack(i.EXTENT,0),N.emplaceBack(0,i.EXTENT),N.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=R.createVertexBuffer(N,_o.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var $=new i.StructArrayLayout4i8;$.emplaceBack(0,0,0,0),$.emplaceBack(i.EXTENT,0,i.EXTENT,0),$.emplaceBack(0,i.EXTENT,0,i.EXTENT),$.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=R.createVertexBuffer($,ze.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var we=new i.StructArrayLayout2i4;we.emplaceBack(0,0),we.emplaceBack(1,0),we.emplaceBack(0,1),we.emplaceBack(1,1),this.viewportBuffer=R.createVertexBuffer(we,_o.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ge=new i.StructArrayLayout1ui2;ge.emplaceBack(0),ge.emplaceBack(1),ge.emplaceBack(3),ge.emplaceBack(2),ge.emplaceBack(0),this.tileBorderIndexBuffer=R.createIndexBuffer(ge);var Ue=new i.StructArrayLayout3ui6;Ue.emplaceBack(0,1,2),Ue.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=R.createIndexBuffer(Ue),this.emptyTexture=new i.Texture(R,{width:1,height:1,data:new Uint8Array([0,0,0,0])},R.gl.RGBA);var dt=this.context.gl;this.stencilClearMode=new Jr({func:dt.ALWAYS,mask:0},0,255,dt.ZERO,dt.ZERO,dt.ZERO)},Hl.prototype.clearStencil=function(){var R=this.context,K=R.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var N=i.create();i.ortho(N,0,this.width,this.height,0,0,1),i.scale(N,N,[K.drawingBufferWidth,K.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(R,K.TRIANGLES,Si.disabled,this.stencilClearMode,vt.disabled,sr.disabled,dn(N),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Hl.prototype._renderTileClippingMasks=function(R,K){if(!(this.currentStencilSource===R.source||!R.isTileClipped()||!K||!K.length)){this.currentStencilSource=R.source;var N=this.context,$=N.gl;this.nextStencilID+K.length>256&&this.clearStencil(),N.setColorMode(vt.disabled),N.setDepthMode(Si.disabled);var we=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ge=0,Ue=K;ge256&&this.clearStencil();var R=this.nextStencilID++,K=this.context.gl;return new Jr({func:K.NOTEQUAL,mask:255},R,255,K.KEEP,K.KEEP,K.REPLACE)},Hl.prototype.stencilModeForClipping=function(R){var K=this.context.gl;return new Jr({func:K.EQUAL,mask:255},this._tileClippingMaskIDs[R.key],0,K.KEEP,K.KEEP,K.REPLACE)},Hl.prototype.stencilConfigForOverlap=function(R){var K,N=this.context.gl,$=R.sort(function(Rt,ur){return ur.overscaledZ-Rt.overscaledZ}),we=$[$.length-1].overscaledZ,ge=$[0].overscaledZ-we+1;if(ge>1){this.currentStencilSource=void 0,this.nextStencilID+ge>256&&this.clearStencil();for(var Ue={},dt=0;dt=0;this.currentLayer--){var Gr=this.style._layers[$[this.currentLayer]],Fr=we[Gr.source],Kr=dt[Gr.source];this._renderTileClippingMasks(Gr,Kr),this.renderLayer(this,Fr,Gr,Kr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<$.length;this.currentLayer++){var Cr=this.style._layers[$[this.currentLayer]],yi=we[Cr.source],qi=(Cr.type==="symbol"?ur:Rt)[Cr.source];this._renderTileClippingMasks(Cr,dt[Cr.source]),this.renderLayer(this,yi,Cr,qi)}if(this.options.showTileBoundaries){var vn,Qa,ra=i.values(this.style._layers);ra.forEach(function(mo){mo.source&&!mo.isHidden(N.transform.zoom)&&(mo.source!==(Qa&&Qa.id)&&(Qa=N.style.sourceCaches[mo.source]),(!vn||vn.getSource().maxzoom0?K.pop():null},Hl.prototype.isPatternMissing=function(R){if(!R)return!1;if(!R.from||!R.to)return!0;var K=this.imageManager.getPattern(R.from.toString()),N=this.imageManager.getPattern(R.to.toString());return!K||!N},Hl.prototype.useProgram=function(R,K){this.cache=this.cache||{};var N=""+R+(K?K.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[N]||(this.cache[N]=new Oo(this.context,R,Ma[R],K,_s[R],this._showOverdrawInspector)),this.cache[N]},Hl.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()},Hl.prototype.setBaseState=function(){var R=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(R.FUNC_ADD)},Hl.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var R=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,R.RGBA)}},Hl.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ll=function(R,K){this.points=R,this.planes=K};Ll.fromInvProjectionMatrix=function(R,K,N){var $=[[-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]],we=Math.pow(2,N),ge=$.map(function(Rt){return i.transformMat4([],Rt,R)}).map(function(Rt){return i.scale$1([],Rt,1/Rt[3]/K*we)}),Ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],dt=Ue.map(function(Rt){var ur=i.sub([],ge[Rt[0]],ge[Rt[1]]),gr=i.sub([],ge[Rt[2]],ge[Rt[1]]),cr=i.normalize([],i.cross([],ur,gr)),It=-i.dot(cr,ge[Rt[1]]);return cr.concat(It)});return new Ll(ge,dt)};var Ql=function(R,K){this.min=R,this.max=K,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ql.prototype.quadrant=function(R){for(var K=[R%2===0,R<2],N=i.clone$2(this.min),$=i.clone$2(this.max),we=0;we=0;if(ge===0)return 0;ge!==K.length&&(N=!1)}if(N)return 2;for(var dt=0;dt<3;dt++){for(var Rt=Number.MAX_VALUE,ur=-Number.MAX_VALUE,gr=0;grthis.max[dt]-this.min[dt])return 0}return 1};var ku=function(R,K,N,$){if(R===void 0&&(R=0),K===void 0&&(K=0),N===void 0&&(N=0),$===void 0&&($=0),isNaN(R)||R<0||isNaN(K)||K<0||isNaN(N)||N<0||isNaN($)||$<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=R,this.bottom=K,this.left=N,this.right=$};ku.prototype.interpolate=function(R,K,N){return K.top!=null&&R.top!=null&&(this.top=i.number(R.top,K.top,N)),K.bottom!=null&&R.bottom!=null&&(this.bottom=i.number(R.bottom,K.bottom,N)),K.left!=null&&R.left!=null&&(this.left=i.number(R.left,K.left,N)),K.right!=null&&R.right!=null&&(this.right=i.number(R.right,K.right,N)),this},ku.prototype.getCenter=function(R,K){var N=i.clamp((this.left+R-this.right)/2,0,R),$=i.clamp((this.top+K-this.bottom)/2,0,K);return new i.Point(N,$)},ku.prototype.equals=function(R){return this.top===R.top&&this.bottom===R.bottom&&this.left===R.left&&this.right===R.right},ku.prototype.clone=function(){return new ku(this.top,this.bottom,this.left,this.right)},ku.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Jl=function(R,K,N,$,we){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=we===void 0?!0:we,this._minZoom=R||0,this._maxZoom=K||22,this._minPitch=N==null?0:N,this._maxPitch=$==null?60:$,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 ku,this._posMatrixCache={},this._alignedPosMatrixCache={}},Kl={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}};Jl.prototype.clone=function(){var R=new Jl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return R.tileSize=this.tileSize,R.latRange=this.latRange,R.width=this.width,R.height=this.height,R._center=this._center,R.zoom=this.zoom,R.angle=this.angle,R._fov=this._fov,R._pitch=this._pitch,R._unmodified=this._unmodified,R._edgeInsets=this._edgeInsets.clone(),R._calcMatrices(),R},Kl.minZoom.get=function(){return this._minZoom},Kl.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},Kl.maxZoom.get=function(){return this._maxZoom},Kl.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},Kl.minPitch.get=function(){return this._minPitch},Kl.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},Kl.maxPitch.get=function(){return this._maxPitch},Kl.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},Kl.renderWorldCopies.get=function(){return this._renderWorldCopies},Kl.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},Kl.worldSize.get=function(){return this.tileSize*this.scale},Kl.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Kl.size.get=function(){return new i.Point(this.width,this.height)},Kl.bearing.get=function(){return-this.angle/Math.PI*180},Kl.bearing.set=function(Y){var R=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==R&&(this._unmodified=!1,this.angle=R,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Kl.pitch.get=function(){return this._pitch/Math.PI*180},Kl.pitch.set=function(Y){var R=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==R&&(this._unmodified=!1,this._pitch=R,this._calcMatrices())},Kl.fov.get=function(){return this._fov/Math.PI*180},Kl.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())},Kl.zoom.get=function(){return this._zoom},Kl.zoom.set=function(Y){var R=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==R&&(this._unmodified=!1,this._zoom=R,this.scale=this.zoomScale(R),this.tileZoom=Math.floor(R),this.zoomFraction=R-this.tileZoom,this._constrain(),this._calcMatrices())},Kl.center.get=function(){return this._center},Kl.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},Kl.padding.get=function(){return this._edgeInsets.toJSON()},Kl.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},Kl.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Jl.prototype.isPaddingEqual=function(R){return this._edgeInsets.equals(R)},Jl.prototype.interpolatePadding=function(R,K,N){this._unmodified=!1,this._edgeInsets.interpolate(R,K,N),this._constrain(),this._calcMatrices()},Jl.prototype.coveringZoomLevel=function(R){var K=(R.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/R.tileSize));return Math.max(0,K)},Jl.prototype.getVisibleUnwrappedCoordinates=function(R){var K=[new i.UnwrappedTileID(0,R)];if(this._renderWorldCopies)for(var N=this.pointCoordinate(new i.Point(0,0)),$=this.pointCoordinate(new i.Point(this.width,0)),we=this.pointCoordinate(new i.Point(this.width,this.height)),ge=this.pointCoordinate(new i.Point(0,this.height)),Ue=Math.floor(Math.min(N.x,$.x,we.x,ge.x)),dt=Math.floor(Math.max(N.x,$.x,we.x,ge.x)),Rt=1,ur=Ue-Rt;ur<=dt+Rt;ur++)ur!==0&&K.push(new i.UnwrappedTileID(ur,R));return K},Jl.prototype.coveringTiles=function(R){var K=this.coveringZoomLevel(R),N=K;if(R.minzoom!==void 0&&KR.maxzoom&&(K=R.maxzoom);var $=i.MercatorCoordinate.fromLngLat(this.center),we=Math.pow(2,K),ge=[we*$.x,we*$.y,0],Ue=Ll.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,K),dt=R.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(dt=K);var Rt=3,ur=function(ra){return{aabb:new Ql([ra*we,0,0],[(ra+1)*we,we,0]),zoom:0,x:0,y:0,wrap:ra,fullyVisible:!1}},gr=[],cr=[],It=K,Qt=R.reparseOverscaled?N:K;if(this._renderWorldCopies)for(var ar=1;ar<=3;ar++)gr.push(ur(-ar)),gr.push(ur(ar));for(gr.push(ur(0));gr.length>0;){var mr=gr.pop(),Pr=mr.x,Dr=mr.y,Xr=mr.fullyVisible;if(!Xr){var Gr=mr.aabb.intersects(Ue);if(Gr===0)continue;Xr=Gr===2}var Fr=mr.aabb.distanceX(ge),Kr=mr.aabb.distanceY(ge),Cr=Math.max(Math.abs(Fr),Math.abs(Kr)),yi=Rt+(1<yi&&mr.zoom>=dt){cr.push({tileID:new i.OverscaledTileID(mr.zoom===It?Qt:mr.zoom,mr.wrap,mr.zoom,Pr,Dr),distanceSq:i.sqrLen([ge[0]-.5-Pr,ge[1]-.5-Dr])});continue}for(var qi=0;qi<4;qi++){var vn=(Pr<<1)+qi%2,Qa=(Dr<<1)+(qi>>1);gr.push({aabb:mr.aabb.quadrant(qi),zoom:mr.zoom+1,x:vn,y:Qa,wrap:mr.wrap,fullyVisible:Xr})}}return cr.sort(function(ra,mo){return ra.distanceSq-mo.distanceSq}).map(function(ra){return ra.tileID})},Jl.prototype.resize=function(R,K){this.width=R,this.height=K,this.pixelsToGLUnits=[2/R,-2/K],this._constrain(),this._calcMatrices()},Kl.unmodified.get=function(){return this._unmodified},Jl.prototype.zoomScale=function(R){return Math.pow(2,R)},Jl.prototype.scaleZoom=function(R){return Math.log(R)/Math.LN2},Jl.prototype.project=function(R){var K=i.clamp(R.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(R.lng)*this.worldSize,i.mercatorYfromLat(K)*this.worldSize)},Jl.prototype.unproject=function(R){return new i.MercatorCoordinate(R.x/this.worldSize,R.y/this.worldSize).toLngLat()},Kl.point.get=function(){return this.project(this.center)},Jl.prototype.setLocationAtPoint=function(R,K){var N=this.pointCoordinate(K),$=this.pointCoordinate(this.centerPoint),we=this.locationCoordinate(R),ge=new i.MercatorCoordinate(we.x-(N.x-$.x),we.y-(N.y-$.y));this.center=this.coordinateLocation(ge),this._renderWorldCopies&&(this.center=this.center.wrap())},Jl.prototype.locationPoint=function(R){return this.coordinatePoint(this.locationCoordinate(R))},Jl.prototype.pointLocation=function(R){return this.coordinateLocation(this.pointCoordinate(R))},Jl.prototype.locationCoordinate=function(R){return i.MercatorCoordinate.fromLngLat(R)},Jl.prototype.coordinateLocation=function(R){return R.toLngLat()},Jl.prototype.pointCoordinate=function(R){var K=0,N=[R.x,R.y,0,1],$=[R.x,R.y,1,1];i.transformMat4(N,N,this.pixelMatrixInverse),i.transformMat4($,$,this.pixelMatrixInverse);var we=N[3],ge=$[3],Ue=N[0]/we,dt=$[0]/ge,Rt=N[1]/we,ur=$[1]/ge,gr=N[2]/we,cr=$[2]/ge,It=gr===cr?0:(K-gr)/(cr-gr);return new i.MercatorCoordinate(i.number(Ue,dt,It)/this.worldSize,i.number(Rt,ur,It)/this.worldSize)},Jl.prototype.coordinatePoint=function(R){var K=[R.x*this.worldSize,R.y*this.worldSize,0,1];return i.transformMat4(K,K,this.pixelMatrix),new i.Point(K[0]/K[3],K[1]/K[3])},Jl.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)))},Jl.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]])},Jl.prototype.setMaxBounds=function(R){R?(this.lngRange=[R.getWest(),R.getEast()],this.latRange=[R.getSouth(),R.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Jl.prototype.calculatePosMatrix=function(R,K){K===void 0&&(K=!1);var N=R.key,$=K?this._alignedPosMatrixCache:this._posMatrixCache;if($[N])return $[N];var we=R.canonical,ge=this.worldSize/this.zoomScale(we.z),Ue=we.x+Math.pow(2,we.z)*R.wrap,dt=i.identity(new Float64Array(16));return i.translate(dt,dt,[Ue*ge,we.y*ge,0]),i.scale(dt,dt,[ge/i.EXTENT,ge/i.EXTENT,1]),i.multiply(dt,K?this.alignedProjMatrix:this.projMatrix,dt),$[N]=new Float32Array(dt),$[N]},Jl.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Jl.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var R=-90,K=90,N=-180,$=180,we,ge,Ue,dt,Rt=this.size,ur=this._unmodified;if(this.latRange){var gr=this.latRange;R=i.mercatorYfromLat(gr[1])*this.worldSize,K=i.mercatorYfromLat(gr[0])*this.worldSize,we=K-RK&&(dt=K-mr)}if(this.lngRange){var Pr=It.x,Dr=Rt.x/2;Pr-Dr$&&(Ue=$-Dr)}(Ue!==void 0||dt!==void 0)&&(this.center=this.unproject(new i.Point(Ue!==void 0?Ue:It.x,dt!==void 0?dt:It.y))),this._unmodified=ur,this._constraining=!1}},Jl.prototype._calcMatrices=function(){if(this.height){var R=this._fov/2,K=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(R)*this.height;var N=Math.PI/2+this._pitch,$=this._fov*(.5+K.y/this.height),we=Math.sin($)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-N-$,.01,Math.PI-.01)),ge=this.point,Ue=ge.x,dt=ge.y,Rt=Math.cos(Math.PI/2-this._pitch)*we+this.cameraToCenterDistance,ur=Rt*1.01,gr=this.height/50,cr=new Float64Array(16);i.perspective(cr,this._fov,this.width/this.height,gr,ur),cr[8]=-K.x*2/this.width,cr[9]=K.y*2/this.height,i.scale(cr,cr,[1,-1,1]),i.translate(cr,cr,[0,0,-this.cameraToCenterDistance]),i.rotateX(cr,cr,this._pitch),i.rotateZ(cr,cr,this.angle),i.translate(cr,cr,[-Ue,-dt,0]),this.mercatorMatrix=i.scale([],cr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(cr,cr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=cr,this.invProjMatrix=i.invert([],this.projMatrix);var It=this.width%2/2,Qt=this.height%2/2,ar=Math.cos(this.angle),mr=Math.sin(this.angle),Pr=Ue-Math.round(Ue)+ar*It+mr*Qt,Dr=dt-Math.round(dt)+ar*Qt+mr*It,Xr=new Float64Array(cr);if(i.translate(Xr,Xr,[Pr>.5?Pr-1:Pr,Dr>.5?Dr-1:Dr,0]),this.alignedProjMatrix=Xr,cr=i.create(),i.scale(cr,cr,[this.width/2,-this.height/2,1]),i.translate(cr,cr,[1,-1,0]),this.labelPlaneMatrix=cr,cr=i.create(),i.scale(cr,cr,[1,-1,1]),i.translate(cr,cr,[-1,-1,0]),i.scale(cr,cr,[2/this.width,2/this.height,1]),this.glCoordMatrix=cr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),cr=i.invert(new Float64Array(16),this.pixelMatrix),!cr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=cr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Jl.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var R=this.pointCoordinate(new i.Point(0,0)),K=[R.x*this.worldSize,R.y*this.worldSize,0,1],N=i.transformMat4(K,K,this.pixelMatrix);return N[3]/this.cameraToCenterDistance},Jl.prototype.getCameraPoint=function(){var R=this._pitch,K=Math.tan(R)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,K))},Jl.prototype.getCameraQueryGeometry=function(R){var K=this.getCameraPoint();if(R.length===1)return[R[0],K];for(var N=K.x,$=K.y,we=K.x,ge=K.y,Ue=0,dt=R;Ue=3&&!R.some(function(N){return isNaN(N)})){var K=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(R[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+R[2],+R[1]],zoom:+R[0],bearing:K,pitch:+(R[4]||0)}),!0}return!1},tf.prototype._updateHashUnthrottled=function(){var R=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,R)}catch(K){}};var Ku={linearity:.3,easing:i.bezier(0,0,.3,1)},Gu=i.extend({deceleration:2500,maxSpeed:1400},Ku),Wu=i.extend({deceleration:20,maxSpeed:1400},Ku),sf=i.extend({deceleration:1e3,maxSpeed:360},Ku),gf=i.extend({deceleration:1e3,maxSpeed:90},Ku),nf=function(R){this._map=R,this.clear()};nf.prototype.clear=function(){this._inertiaBuffer=[]},nf.prototype.record=function(R){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:R})},nf.prototype._drainInertiaBuffer=function(){for(var R=this._inertiaBuffer,K=i.browser.now(),N=160;R.length>0&&K-R[0].time>N;)R.shift()},nf.prototype._onMoveEnd=function(R){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var K={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},N=0,$=this._inertiaBuffer;N<$.length;N+=1){var we=$[N],ge=we.settings;K.zoom+=ge.zoomDelta||0,K.bearing+=ge.bearingDelta||0,K.pitch+=ge.pitchDelta||0,ge.panDelta&&K.pan._add(ge.panDelta),ge.around&&(K.around=ge.around),ge.pinchAround&&(K.pinchAround=ge.pinchAround)}var Ue=this._inertiaBuffer[this._inertiaBuffer.length-1],dt=Ue.time-this._inertiaBuffer[0].time,Rt={};if(K.pan.mag()){var ur=X(K.pan.mag(),dt,i.extend({},Gu,R||{}));Rt.offset=K.pan.mult(ur.amount/K.pan.mag()),Rt.center=this._map.transform.center,af(Rt,ur)}if(K.zoom){var gr=X(K.zoom,dt,Wu);Rt.zoom=this._map.transform.zoom+gr.amount,af(Rt,gr)}if(K.bearing){var cr=X(K.bearing,dt,sf);Rt.bearing=this._map.transform.bearing+i.clamp(cr.amount,-179,179),af(Rt,cr)}if(K.pitch){var It=X(K.pitch,dt,gf);Rt.pitch=this._map.transform.pitch+It.amount,af(Rt,It)}if(Rt.zoom||Rt.bearing){var Qt=K.pinchAround===void 0?K.around:K.pinchAround;Rt.around=Qt?this._map.unproject(Qt):this._map.getCenter()}return this.clear(),i.extend(Rt,{noMoveStart:!0})}};function af(Y,R){(!Y.duration||Y.duration=this._clickTolerance||this._map.fire(new se(R.type,this._map,R))},Ye.prototype.dblclick=function(R){return this._firePreventable(new se(R.type,this._map,R))},Ye.prototype.mouseover=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.mouseout=function(R){this._map.fire(new se(R.type,this._map,R))},Ye.prototype.touchstart=function(R){return this._firePreventable(new Le(R.type,this._map,R))},Ye.prototype.touchmove=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype.touchend=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype.touchcancel=function(R){this._map.fire(new Le(R.type,this._map,R))},Ye.prototype._firePreventable=function(R){if(this._map.fire(R),R.defaultPrevented)return{}},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var it=function(R){this._map=R};it.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},it.prototype.mousemove=function(R){this._map.fire(new se(R.type,this._map,R))},it.prototype.mousedown=function(){this._delayContextMenu=!0},it.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},it.prototype.contextmenu=function(R){this._delayContextMenu?this._contextMenuEvent=R:this._map.fire(new se(R.type,this._map,R)),this._map.listens("contextmenu")&&R.preventDefault()},it.prototype.isEnabled=function(){return!0},it.prototype.isActive=function(){return!1},it.prototype.enable=function(){},it.prototype.disable=function(){};var Nt=function(R,K){this._map=R,this._el=R.getCanvasContainer(),this._container=R.getContainer(),this._clickTolerance=K.clickTolerance||1};Nt.prototype.isEnabled=function(){return!!this._enabled},Nt.prototype.isActive=function(){return!!this._active},Nt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Nt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Nt.prototype.mousedown=function(R,K){this.isEnabled()&&R.shiftKey&&R.button===0&&(o.disableDrag(),this._startPos=this._lastPos=K,this._active=!0)},Nt.prototype.mousemoveWindow=function(R,K){if(this._active){var N=K;if(!(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=R.timeStamp),N.length===this.numTouches&&(this.centroid=er(K),this.touches=mt(N,K)))},Wr.prototype.touchmove=function(R,K,N){if(!(this.aborted||!this.centroid)){var $=mt(N,K);for(var we in this.touches){var ge=this.touches[we],Ue=$[we];(!Ue||Ue.dist(ge)>ni)&&(this.aborted=!0)}}},Wr.prototype.touchend=function(R,K,N){if((!this.centroid||R.timeStamp-this.startTime>wr)&&(this.aborted=!0),N.length===0){var $=!this.aborted&&this.centroid;if(this.reset(),$)return $}};var Ci=function(R){this.singleTap=new Wr(R),this.numTaps=R.numTaps,this.reset()};Ci.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ci.prototype.touchstart=function(R,K,N){this.singleTap.touchstart(R,K,N)},Ci.prototype.touchmove=function(R,K,N){this.singleTap.touchmove(R,K,N)},Ci.prototype.touchend=function(R,K,N){var $=this.singleTap.touchend(R,K,N);if($){var we=R.timeStamp-this.lastTime<_r,ge=!this.lastTap||this.lastTap.dist($)0&&(this._active=!0);var $=mt(N,K),we=new i.Point(0,0),ge=new i.Point(0,0),Ue=0;for(var dt in $){var Rt=$[dt],ur=this._touches[dt];ur&&(we._add(Rt),ge._add(Rt.sub(ur)),Ue++,$[dt]=Rt)}if(this._touches=$,!(UeMath.abs(Y.x)}var qo=100,Rl=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},R.prototype._start=function(N){this._lastPoints=N,Ju(N[0].sub(N[1]))&&(this._valid=!1)},R.prototype._move=function(N,$,we){var ge=N[0].sub(this._lastPoints[0]),Ue=N[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ge,Ue,we.timeStamp),!!this._valid){this._lastPoints=N,this._active=!0;var dt=(ge.y+Ue.y)/2,Rt=-.5;return{pitchDelta:dt*Rt}}},R.prototype.gestureBeginsVertically=function(N,$,we){if(this._valid!==void 0)return this._valid;var ge=2,Ue=N.mag()>=ge,dt=$.mag()>=ge;if(!(!Ue&&!dt)){if(!Ue||!dt)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove0==$.y>0;return Ju(N)&&Ju($)&&Rt}},R}(Ms),pu={panStep:100,bearingStep:15,pitchStep:10},xu=function(){var R=pu;this._panStep=R.panStep,this._bearingStep=R.bearingStep,this._pitchStep=R.pitchStep,this._rotationDisabled=!1};xu.prototype.reset=function(){this._active=!1},xu.prototype.keydown=function(R){var K=this;if(!(R.altKey||R.ctrlKey||R.metaKey)){var N=0,$=0,we=0,ge=0,Ue=0;switch(R.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:R.shiftKey?$=-1:(R.preventDefault(),ge=-1);break;case 39:R.shiftKey?$=1:(R.preventDefault(),ge=1);break;case 38:R.shiftKey?we=1:(R.preventDefault(),Ue=-1);break;case 40:R.shiftKey?we=-1:(R.preventDefault(),Ue=1);break;default:return}return this._rotationDisabled&&($=0,we=0),{cameraAnimation:function(dt){var Rt=dt.getZoom();dt.easeTo({duration:300,easeId:"keyboardHandler",easing:of,zoom:N?Math.round(Rt)+N*(R.shiftKey?2:1):Rt,bearing:dt.getBearing()+$*K._bearingStep,pitch:dt.getPitch()+we*K._pitchStep,offset:[-ge*K._panStep,-Ue*K._panStep],center:dt.getCenter()},{originalEvent:R})}}}},xu.prototype.enable=function(){this._enabled=!0},xu.prototype.disable=function(){this._enabled=!1,this.reset()},xu.prototype.isEnabled=function(){return this._enabled},xu.prototype.isActive=function(){return this._active},xu.prototype.disableRotation=function(){this._rotationDisabled=!0},xu.prototype.enableRotation=function(){this._rotationDisabled=!1};function of(Y){return Y*(2-Y)}var ff=4.000244140625,xf=1/100,hf=1/450,dc=2,Gt=function(R,K){this._map=R,this._el=R.getCanvasContainer(),this._handler=K,this._delta=0,this._defaultZoomRate=xf,this._wheelZoomRate=hf,i.bindAll(["_onTimeout"],this)};Gt.prototype.setZoomRate=function(R){this._defaultZoomRate=R},Gt.prototype.setWheelZoomRate=function(R){this._wheelZoomRate=R},Gt.prototype.isEnabled=function(){return!!this._enabled},Gt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Gt.prototype.isZooming=function(){return!!this._zooming},Gt.prototype.enable=function(R){this.isEnabled()||(this._enabled=!0,this._aroundCenter=R&&R.around==="center")},Gt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Gt.prototype.wheel=function(R){if(this.isEnabled()){var K=R.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?R.deltaY*40:R.deltaY,N=i.browser.now(),$=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,K!==0&&K%ff===0?this._type="wheel":K!==0&&Math.abs(K)<4?this._type="trackpad":$>400?(this._type=null,this._lastValue=K,this._timeout=setTimeout(this._onTimeout,40,R)):this._type||(this._type=Math.abs($*K)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,K+=this._lastValue)),R.shiftKey&&K&&(K=K/4),this._type&&(this._lastWheelEvent=R,this._delta-=K,this._active||this._start(R)),R.preventDefault()}},Gt.prototype._onTimeout=function(R){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(R)},Gt.prototype._start=function(R){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 K=o.mousePos(this._el,R);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(K)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Gt.prototype.renderFrame=function(){var R=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var K=this._map.transform;if(this._delta!==0){var N=this._type==="wheel"&&Math.abs(this._delta)>ff?this._wheelZoomRate:this._defaultZoomRate,$=dc/(1+Math.exp(-Math.abs(this._delta*N)));this._delta<0&&$!==0&&($=1/$);var we=typeof this._targetZoom=="number"?K.zoomScale(this._targetZoom):K.scale;this._targetZoom=Math.min(K.maxZoom,Math.max(K.minZoom,K.scaleZoom(we*$))),this._type==="wheel"&&(this._startZoom=K.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ge=typeof this._targetZoom=="number"?this._targetZoom:K.zoom,Ue=this._startZoom,dt=this._easing,Rt=!1,ur;if(this._type==="wheel"&&Ue&&dt){var gr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),cr=dt(gr);ur=i.number(Ue,ge,cr),gr<1?this._frameId||(this._frameId=!0):Rt=!0}else ur=ge,Rt=!0;return this._active=!0,Rt&&(this._active=!1,this._finishTimeout=setTimeout(function(){R._zooming=!1,R._handler._triggerRenderFrame(),delete R._targetZoom,delete R._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Rt,zoomDelta:ur-K.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Gt.prototype._smoothOutEasing=function(R){var K=i.ease;if(this._prevEase){var N=this._prevEase,$=(i.browser.now()-N.start)/N.duration,we=N.easing($+.01)-N.easing($),ge=.27/Math.sqrt(we*we+1e-4)*.01,Ue=Math.sqrt(.27*.27-ge*ge);K=i.bezier(ge,Ue,.25,1)}return this._prevEase={start:i.browser.now(),duration:R,easing:K},K},Gt.prototype.reset=function(){this._active=!1};var jr=function(R,K){this._clickZoom=R,this._tapZoom=K};jr.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},jr.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},jr.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},jr.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var _i=function(){this.reset()};_i.prototype.reset=function(){this._active=!1},_i.prototype.dblclick=function(R,K){return R.preventDefault(),{cameraAnimation:function(N){N.easeTo({duration:300,zoom:N.getZoom()+(R.shiftKey?-1:1),around:N.unproject(K)},{originalEvent:R})}}},_i.prototype.enable=function(){this._enabled=!0},_i.prototype.disable=function(){this._enabled=!1,this.reset()},_i.prototype.isEnabled=function(){return this._enabled},_i.prototype.isActive=function(){return this._active};var Mn=function(){this._tap=new Ci({numTouches:1,numTaps:1}),this.reset()};Mn.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Mn.prototype.touchstart=function(R,K,N){this._swipePoint||(this._tapTime&&R.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?N.length>0&&(this._swipePoint=K[0],this._swipeTouch=N[0].identifier):this._tap.touchstart(R,K,N))},Mn.prototype.touchmove=function(R,K,N){if(!this._tapTime)this._tap.touchmove(R,K,N);else if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;var $=K[0],we=$.y-this._swipePoint.y;return this._swipePoint=$,R.preventDefault(),this._active=!0,{zoomDelta:we/128}}},Mn.prototype.touchend=function(R,K,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{var $=this._tap.touchend(R,K,N);$&&(this._tapTime=R.timeStamp)}},Mn.prototype.touchcancel=function(){this.reset()},Mn.prototype.enable=function(){this._enabled=!0},Mn.prototype.disable=function(){this._enabled=!1,this.reset()},Mn.prototype.isEnabled=function(){return this._enabled},Mn.prototype.isActive=function(){return this._active};var Ta=function(R,K,N){this._el=R,this._mousePan=K,this._touchPan=N};Ta.prototype.enable=function(R){this._inertiaOptions=R||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ta.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ta.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ta.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var fa=function(R,K,N){this._pitchWithRotate=R.pitchWithRotate,this._mouseRotate=K,this._mousePitch=N};fa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},fa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},fa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},fa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ha=function(R,K,N,$){this._el=R,this._touchZoom=K,this._touchRotate=N,this._tapDragZoom=$,this._rotationDisabled=!1,this._enabled=!0};ha.prototype.enable=function(R){this._touchZoom.enable(R),this._rotationDisabled||this._touchRotate.enable(R),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ha.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ha.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ha.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ha.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ha.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Io=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Vs=function(Y){function R(){Y.apply(this,arguments)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R}(i.Event);function Hs(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var is=function(R,K){this._map=R,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new nf(R),this._bearingSnap=K.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(K),i.bindAll(["handleEvent","handleWindowEvent"],this);var N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[i.window,"blur",void 0]];for(var $=0,we=this._listeners;$Ue?Math.min(2,Fr):Math.max(.5,Fr),ra=Math.pow(Qa,1-qi),mo=ge.unproject(Xr.add(Gr.mult(qi*ra)).mult(vn));ge.setLocationAtPoint(ge.renderWorldCopies?mo.wrap():mo,mr)}we._fireMoveEvents($)},function(qi){we._afterEase($,qi)},N),this},R.prototype._prepareEase=function(N,$,we){we===void 0&&(we={}),this._moving=!0,!$&&!we.moving&&this.fire(new i.Event("movestart",N)),this._zooming&&!we.zooming&&this.fire(new i.Event("zoomstart",N)),this._rotating&&!we.rotating&&this.fire(new i.Event("rotatestart",N)),this._pitching&&!we.pitching&&this.fire(new i.Event("pitchstart",N))},R.prototype._fireMoveEvents=function(N){this.fire(new i.Event("move",N)),this._zooming&&this.fire(new i.Event("zoom",N)),this._rotating&&this.fire(new i.Event("rotate",N)),this._pitching&&this.fire(new i.Event("pitch",N))},R.prototype._afterEase=function(N,$){if(!(this._easeId&&$&&this._easeId===$)){delete this._easeId;var we=this._zooming,ge=this._rotating,Ue=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new i.Event("zoomend",N)),ge&&this.fire(new i.Event("rotateend",N)),Ue&&this.fire(new i.Event("pitchend",N)),this.fire(new i.Event("moveend",N))}},R.prototype.flyTo=function(N,$){var we=this;if(!N.essential&&i.browser.prefersReducedMotion){var ge=i.pick(N,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ge,$)}this.stop(),N=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},N);var Ue=this.transform,dt=this.getZoom(),Rt=this.getBearing(),ur=this.getPitch(),gr=this.getPadding(),cr="zoom"in N?i.clamp(+N.zoom,Ue.minZoom,Ue.maxZoom):dt,It="bearing"in N?this._normalizeBearing(N.bearing,Rt):Rt,Qt="pitch"in N?+N.pitch:ur,ar="padding"in N?N.padding:Ue.padding,mr=Ue.zoomScale(cr-dt),Pr=i.Point.convert(N.offset),Dr=Ue.centerPoint.add(Pr),Xr=Ue.pointLocation(Dr),Gr=i.LngLat.convert(N.center||Xr);this._normalizeCenter(Gr);var Fr=Ue.project(Xr),Kr=Ue.project(Gr).sub(Fr),Cr=N.curve,yi=Math.max(Ue.width,Ue.height),qi=yi/mr,vn=Kr.mag();if("minZoom"in N){var Qa=i.clamp(Math.min(N.minZoom,dt,cr),Ue.minZoom,Ue.maxZoom),ra=yi/Ue.zoomScale(Qa-dt);Cr=Math.sqrt(ra/vn*2)}var mo=Cr*Cr;function sl(du){var Nu=(qi*qi-yi*yi+(du?-1:1)*mo*mo*vn*vn)/(2*(du?qi:yi)*mo*vn);return Math.log(Math.sqrt(Nu*Nu+1)-Nu)}function Os(du){return(Math.exp(du)-Math.exp(-du))/2}function eo(du){return(Math.exp(du)+Math.exp(-du))/2}function fs(du){return Os(du)/eo(du)}var es=sl(0),$s=function(du){return eo(es)/eo(es+Cr*du)},Ml=function(du){return yi*((eo(es)*fs(es+Cr*du)-Os(es))/mo)/vn},Mu=(sl(1)-es)/Cr;if(Math.abs(vn)<1e-6||!isFinite(Mu)){if(Math.abs(yi-qi)<1e-6)return this.easeTo(N,$);var Au=qiN.maxDuration&&(N.duration=0),this._zooming=!0,this._rotating=Rt!==It,this._pitching=Qt!==ur,this._padding=!Ue.isPaddingEqual(ar),this._prepareEase($,!1),this._ease(function(du){var Nu=du*Mu,yf=1/$s(Nu);Ue.zoom=du===1?cr:dt+Ue.scaleZoom(yf),we._rotating&&(Ue.bearing=i.number(Rt,It,du)),we._pitching&&(Ue.pitch=i.number(ur,Qt,du)),we._padding&&(Ue.interpolatePadding(gr,ar,du),Dr=Ue.centerPoint.add(Pr));var Kf=du===1?Gr:Ue.unproject(Fr.add(Kr.mult(Ml(Nu))).mult(yf));Ue.setLocationAtPoint(Ue.renderWorldCopies?Kf.wrap():Kf,Dr),we._fireMoveEvents($)},function(){return we._afterEase($)},N),this},R.prototype.isEasing=function(){return!!this._easeFrameId},R.prototype.stop=function(){return this._stop()},R.prototype._stop=function(N,$){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var we=this._onEaseEnd;delete this._onEaseEnd,we.call(this,$)}if(!N){var ge=this.handlers;ge&&ge.stop(!1)}return this},R.prototype._ease=function(N,$,we){we.animate===!1||we.duration===0?(N(1),$()):(this._easeStart=i.browser.now(),this._easeOptions=we,this._onEaseFrame=N,this._onEaseEnd=$,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},R.prototype._renderFrameCallback=function(){var N=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(N)),N<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},R.prototype._normalizeBearing=function(N,$){N=i.wrap(N,-180,180);var we=Math.abs(N-$);return Math.abs(N-360-$)180?-360:we<-180?360:0}},R}(i.Evented),Ps=function(R){R===void 0&&(R={}),this.options=R,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ps.prototype.getDefaultPosition=function(){return"bottom-right"},Ps.prototype.onAdd=function(R){var K=this.options&&this.options.compact;return this._map=R,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"),K&&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),K===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ps.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},Ps.prototype._setElementTitle=function(R,K){var N=this._map._getUIString("AttributionControl."+K);R.title=N,R.setAttribute("aria-label",N)},Ps.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"))},Ps.prototype._updateEditLink=function(){var R=this._editLink;R||(R=this._editLink=this._container.querySelector(".mapbox-improve-map"));var K=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(R){var N=K.reduce(function($,we,ge){return we.value&&($+=we.key+"="+we.value+(ge=0)return!1;return!0});var Ue=R.join(" | ");Ue!==this._attribHTML&&(this._attribHTML=Ue,R.length?(this._innerContainer.innerHTML=Ue,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ps.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var qs=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};qs.prototype.onAdd=function(R){this._map=R,this._container=o.create("div","mapboxgl-ctrl");var K=o.create("a","mapboxgl-ctrl-logo");return K.target="_blank",K.rel="noopener nofollow",K.href="https://www.mapbox.com/",K.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),K.setAttribute("rel","noopener nofollow"),this._container.appendChild(K),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},qs.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},qs.prototype.getDefaultPosition=function(){return"bottom-left"},qs.prototype._updateLogo=function(R){(!R||R.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},qs.prototype._logoRequired=function(){if(this._map.style){var R=this._map.style.sourceCaches;for(var K in R){var N=R[K].getSource();if(N.mapbox_logo)return!0}return!1}},qs.prototype._updateCompact=function(){var R=this._container.children;if(R.length){var K=R[0];this._map.getCanvasContainer().offsetWidth<250?K.classList.add("mapboxgl-compact"):K.classList.remove("mapboxgl-compact")}};var Do=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Do.prototype.add=function(R){var K=++this._id,N=this._queue;return N.push({callback:R,id:K,cancelled:!1}),K},Do.prototype.remove=function(R){for(var K=this._currentlyRunning,N=K?this._queue.concat(K):this._queue,$=0,we=N;$N.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(N.minPitch!=null&&N.maxPitch!=null&&N.minPitch>N.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(N.minPitch!=null&&N.minPitchru)throw new Error("maxPitch must be less than or equal to "+ru);var we=new Jl(N.minZoom,N.maxZoom,N.minPitch,N.maxPitch,N.renderWorldCopies);if(Y.call(this,we,N),this._interactive=N.interactive,this._maxTileCacheSize=N.maxTileCacheSize,this._failIfMajorPerformanceCaveat=N.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=N.preserveDrawingBuffer,this._antialias=N.antialias,this._trackResize=N.trackResize,this._bearingSnap=N.bearingSnap,this._refreshExpiredTiles=N.refreshExpiredTiles,this._fadeDuration=N.fadeDuration,this._crossSourceCollisions=N.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=N.collectResourceTiming,this._renderTaskQueue=new Do,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},kn,N.locale),this._clickTolerance=N.clickTolerance,this._requestManager=new i.RequestManager(N.transformRequest,N.accessToken),typeof N.container=="string"){if(this._container=i.window.document.getElementById(N.container),!this._container)throw new Error("Container '"+N.container+"' not found.")}else if(N.container instanceof Es)this._container=N.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(N.maxBounds&&this.setMaxBounds(N.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 $._update(!1)}),this.on("moveend",function(){return $._update(!1)}),this.on("zoom",function(){return $._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 is(this,N);var ge=typeof N.hash=="string"&&N.hash||void 0;this._hash=N.hash&&new tf(ge).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:N.center,zoom:N.zoom,bearing:N.bearing,pitch:N.pitch}),N.bounds&&(this.resize(),this.fitBounds(N.bounds,i.extend({},N.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=N.localIdeographFontFamily,N.style&&this.setStyle(N.style,{localIdeographFontFamily:N.localIdeographFontFamily}),N.attributionControl&&this.addControl(new Ps({customAttribution:N.customAttribution})),this.addControl(new qs,N.logoPosition),this.on("style.load",function(){$.transform.unmodified&&$.jumpTo($.style.stylesheet)}),this.on("data",function(Ue){$._update(Ue.dataType==="style"),$.fire(new i.Event(Ue.dataType+"data",Ue))}),this.on("dataloading",function(Ue){$.fire(new i.Event(Ue.dataType+"dataloading",Ue))})}Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R;var K={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return R.prototype._getMapId=function(){return this._mapId},R.prototype.addControl=function($,we){if(we===void 0&&($.getDefaultPosition?we=$.getDefaultPosition():we="top-right"),!$||!$.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 ge=$.onAdd(this);this._controls.push($);var Ue=this._controlPositions[we];return we.indexOf("bottom")!==-1?Ue.insertBefore(ge,Ue.firstChild):Ue.appendChild(ge),this},R.prototype.removeControl=function($){if(!$||!$.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 we=this._controls.indexOf($);return we>-1&&this._controls.splice(we,1),$.onRemove(this),this},R.prototype.hasControl=function($){return this._controls.indexOf($)>-1},R.prototype.resize=function($){var we=this._containerDimensions(),ge=we[0],Ue=we[1];this._resizeCanvas(ge,Ue),this.transform.resize(ge,Ue),this.painter.resize(ge,Ue);var dt=!this._moving;return dt&&(this.stop(),this.fire(new i.Event("movestart",$)).fire(new i.Event("move",$))),this.fire(new i.Event("resize",$)),dt&&this.fire(new i.Event("moveend",$)),this},R.prototype.getBounds=function(){return this.transform.getBounds()},R.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},R.prototype.setMaxBounds=function($){return this.transform.setMaxBounds(i.LngLatBounds.convert($)),this._update()},R.prototype.setMinZoom=function($){if($=$==null?Qo:$,$>=Qo&&$<=this.transform.maxZoom)return this.transform.minZoom=$,this._update(),this.getZoom()<$&&this.setZoom($),this;throw new Error("minZoom must be between "+Qo+" and the current maxZoom, inclusive")},R.prototype.getMinZoom=function(){return this.transform.minZoom},R.prototype.setMaxZoom=function($){if($=$==null?bl:$,$>=this.transform.minZoom)return this.transform.maxZoom=$,this._update(),this.getZoom()>$&&this.setZoom($),this;throw new Error("maxZoom must be greater than the current minZoom")},R.prototype.getMaxZoom=function(){return this.transform.maxZoom},R.prototype.setMinPitch=function($){if($=$==null?nl:$,$=nl&&$<=this.transform.maxPitch)return this.transform.minPitch=$,this._update(),this.getPitch()<$&&this.setPitch($),this;throw new Error("minPitch must be between "+nl+" and the current maxPitch, inclusive")},R.prototype.getMinPitch=function(){return this.transform.minPitch},R.prototype.setMaxPitch=function($){if($=$==null?ru:$,$>ru)throw new Error("maxPitch must be less than or equal to "+ru);if($>=this.transform.minPitch)return this.transform.maxPitch=$,this._update(),this.getPitch()>$&&this.setPitch($),this;throw new Error("maxPitch must be greater than the current minPitch")},R.prototype.getMaxPitch=function(){return this.transform.maxPitch},R.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},R.prototype.setRenderWorldCopies=function($){return this.transform.renderWorldCopies=$,this._update()},R.prototype.project=function($){return this.transform.locationPoint(i.LngLat.convert($))},R.prototype.unproject=function($){return this.transform.pointLocation(i.Point.convert($))},R.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},R.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},R.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},R.prototype._createDelegatedListener=function($,we,ge){var Ue=this,dt;if($==="mouseenter"||$==="mouseover"){var Rt=!1,ur=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length?Rt||(Rt=!0,ge.call(Ue,new se($,Ue,mr.originalEvent,{features:Pr}))):Rt=!1},gr=function(){Rt=!1};return{layer:we,listener:ge,delegates:{mousemove:ur,mouseout:gr}}}else if($==="mouseleave"||$==="mouseout"){var cr=!1,It=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length?cr=!0:cr&&(cr=!1,ge.call(Ue,new se($,Ue,mr.originalEvent)))},Qt=function(mr){cr&&(cr=!1,ge.call(Ue,new se($,Ue,mr.originalEvent)))};return{layer:we,listener:ge,delegates:{mousemove:It,mouseout:Qt}}}else{var ar=function(mr){var Pr=Ue.getLayer(we)?Ue.queryRenderedFeatures(mr.point,{layers:[we]}):[];Pr.length&&(mr.features=Pr,ge.call(Ue,mr),delete mr.features)};return{layer:we,listener:ge,delegates:(dt={},dt[$]=ar,dt)}}},R.prototype.on=function($,we,ge){if(ge===void 0)return Y.prototype.on.call(this,$,we);var Ue=this._createDelegatedListener($,we,ge);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$]=this._delegatedListeners[$]||[],this._delegatedListeners[$].push(Ue);for(var dt in Ue.delegates)this.on(dt,Ue.delegates[dt]);return this},R.prototype.once=function($,we,ge){if(ge===void 0)return Y.prototype.once.call(this,$,we);var Ue=this._createDelegatedListener($,we,ge);for(var dt in Ue.delegates)this.once(dt,Ue.delegates[dt]);return this},R.prototype.off=function($,we,ge){var Ue=this;if(ge===void 0)return Y.prototype.off.call(this,$,we);var dt=function(Rt){for(var ur=Rt[$],gr=0;gr180;){var ge=K.locationPoint(Y);if(ge.x>=0&&ge.y>=0&&ge.x<=K.width&&ge.y<=K.height)break;Y.lng>K.center.lng?Y.lng-=360:Y.lng+=360}return Y}var lu={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 bu(Y,R,K){var N=Y.classList;for(var $ in lu)N.remove("mapboxgl-"+K+"-anchor-"+$);N.add("mapboxgl-"+K+"-anchor-"+R)}var al=function(Y){function R(K,N){if(Y.call(this),(K instanceof i.window.HTMLElement||N)&&(K=i.extend({element:K},N)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=K&&K.anchor||"center",this._color=K&&K.color||"#3FB1CE",this._scale=K&&K.scale||1,this._draggable=K&&K.draggable||!1,this._clickTolerance=K&&K.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=K&&K.rotation||0,this._rotationAlignment=K&&K.rotationAlignment||"auto",this._pitchAlignment=K&&K.pitchAlignment&&K.pitchAlignment!=="auto"?K.pitchAlignment:this._rotationAlignment,!K||!K.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var $=o.createNS("http://www.w3.org/2000/svg","svg"),we=41,ge=27;$.setAttributeNS(null,"display","block"),$.setAttributeNS(null,"height",we+"px"),$.setAttributeNS(null,"width",ge+"px"),$.setAttributeNS(null,"viewBox","0 0 "+ge+" "+we);var Ue=o.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"stroke","none"),Ue.setAttributeNS(null,"stroke-width","1"),Ue.setAttributeNS(null,"fill","none"),Ue.setAttributeNS(null,"fill-rule","evenodd");var dt=o.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"fill-rule","nonzero");var Rt=o.createNS("http://www.w3.org/2000/svg","g");Rt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Rt.setAttributeNS(null,"fill","#000000");for(var ur=[{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"}],gr=0,cr=ur;gr=$}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},R.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"},R.prototype._addDragHandler=function(N){this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},R.prototype.setDraggable=function(N){return this._draggable=!!N,this._map&&(N?(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},R.prototype.isDraggable=function(){return this._draggable},R.prototype.setRotation=function(N){return this._rotation=N||0,this._update(),this},R.prototype.getRotation=function(){return this._rotation},R.prototype.setRotationAlignment=function(N){return this._rotationAlignment=N||"auto",this._update(),this},R.prototype.getRotationAlignment=function(){return this._rotationAlignment},R.prototype.setPitchAlignment=function(N){return this._pitchAlignment=N&&N!=="auto"?N:this._rotationAlignment,this._update(),this},R.prototype.getPitchAlignment=function(){return this._pitchAlignment},R}(i.Evented),jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},mu;function Tu(Y){mu!==void 0?Y(mu):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(R){mu=R.state!=="denied",Y(mu)}):(mu=!!i.window.navigator.geolocation,Y(mu))}var Ru=0,Rf=!1,Cc=function(Y){function R(K){Y.call(this),this.options=i.extend({},jl,K),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.onAdd=function(N){return this._map=N,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Tu(this._setupUI),this._container},R.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,Ru=0,Rf=!1},R.prototype._isOutOfMapMaxBounds=function(N){var $=this._map.getMaxBounds(),we=N.coords;return $&&(we.longitude<$.getWest()||we.longitude>$.getEast()||we.latitude<$.getSouth()||we.latitude>$.getNorth())},R.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}},R.prototype._onSuccess=function(N){if(this._map){if(this._isOutOfMapMaxBounds(N)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",N)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=N,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(N),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(N),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",N)),this._finish()}},R.prototype._updateCamera=function(N){var $=new i.LngLat(N.coords.longitude,N.coords.latitude),we=N.coords.accuracy,ge=this._map.getBearing(),Ue=i.extend({bearing:ge},this.options.fitBoundsOptions);this._map.fitBounds($.toBounds(we),Ue,{geolocateSource:!0})},R.prototype._updateMarker=function(N){if(N){var $=new i.LngLat(N.coords.longitude,N.coords.latitude);this._accuracyCircleMarker.setLngLat($).addTo(this._map),this._userLocationDotMarker.setLngLat($).addTo(this._map),this._accuracy=N.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},R.prototype._updateCircleRadius=function(){var N=this._map._container.clientHeight/2,$=this._map.unproject([0,N]),we=this._map.unproject([1,N]),ge=$.distanceTo(we),Ue=Math.ceil(2*this._accuracy/ge);this._circleElement.style.width=Ue+"px",this._circleElement.style.height=Ue+"px"},R.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},R.prototype._onError=function(N){if(this._map){if(this.options.trackUserLocation)if(N.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 $=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=$,this._geolocateButton.setAttribute("aria-label",$),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(N.code===3&&Rf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",N)),this._finish()}},R.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},R.prototype._setupUI=function(N){var $=this;if(this._container.addEventListener("contextmenu",function(Ue){return Ue.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",N===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var we=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=we,this._geolocateButton.setAttribute("aria-label",we)}else{var ge=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ge,this._geolocateButton.setAttribute("aria-label",ge)}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 al(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new al({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(Ue){var dt=Ue.originalEvent&&Ue.originalEvent.type==="resize";!Ue.geolocateSource&&$._watchState==="ACTIVE_LOCK"&&!dt&&($._watchState="BACKGROUND",$._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),$._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),$.fire(new i.Event("trackuserlocationend")))})},R.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":Ru--,Rf=!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"),Ru++;var N;Ru>1?(N={maximumAge:6e5,timeout:0},Rf=!0):(N=this.options.positionOptions,Rf=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,N)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},R.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)},R}(i.Evented),rf={maxWidth:100,unit:"metric"},Lc=function(R){this.options=i.extend({},rf,R),i.bindAll(["_onMove","setUnit"],this)};Lc.prototype.getDefaultPosition=function(){return"bottom-left"},Lc.prototype._onMove=function(){wf(this._map,this._container,this.options)},Lc.prototype.onAdd=function(R){return this._map=R,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Lc.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Lc.prototype.setUnit=function(R){this.options.unit=R,wf(this._map,this._container,this.options)};function wf(Y,R,K){var N=K&&K.maxWidth||100,$=Y._container.clientHeight/2,we=Y.unproject([0,$]),ge=Y.unproject([N,$]),Ue=we.distanceTo(ge);if(K&&K.unit==="imperial"){var dt=3.2808*Ue;if(dt>5280){var Rt=dt/5280;pc(R,N,Rt,Y._getUIString("ScaleControl.Miles"))}else pc(R,N,dt,Y._getUIString("ScaleControl.Feet"))}else if(K&&K.unit==="nautical"){var ur=Ue/1852;pc(R,N,ur,Y._getUIString("ScaleControl.NauticalMiles"))}else Ue>=1e3?pc(R,N,Ue/1e3,Y._getUIString("ScaleControl.Kilometers")):pc(R,N,Ue,Y._getUIString("ScaleControl.Meters"))}function pc(Y,R,K,N){var $=qc(K),we=$/K;Y.style.width=R*we+"px",Y.innerHTML=$+" "+N}function vc(Y){var R=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*R)/R}function qc(Y){var R=Math.pow(10,(""+Math.floor(Y)).length-1),K=Y/R;return K=K>=10?10:K>=5?5:K>=3?3:K>=2?2:K>=1?1:vc(K),R*K}var If=function(R){this._fullscreen=!1,R&&R.container&&(R.container instanceof i.window.HTMLElement?this._container=R.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")};If.prototype.onAdd=function(R){return this._map=R,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},If.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},If.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},If.prototype._setupUI=function(){var R=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",R).setAttribute("aria-hidden",!0),R.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},If.prototype._updateTitle=function(){var R=this._getTitle();this._fullscreenButton.setAttribute("aria-label",R),this._fullscreenButton.title=R},If.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},If.prototype._isFullscreen=function(){return this._fullscreen},If.prototype._changeIcon=function(){var R=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;R===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},If.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 Ac={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},zc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Vu=function(Y){function R(K){Y.call(this),this.options=i.extend(Object.create(Ac),K),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(R.__proto__=Y),R.prototype=Object.create(Y&&Y.prototype),R.prototype.constructor=R,R.prototype.addTo=function(N){return this._map&&this.remove(),this._map=N,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},R.prototype.isOpen=function(){return!!this._map},R.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},R.prototype.getLngLat=function(){return this._lngLat},R.prototype.setLngLat=function(N){return this._lngLat=i.LngLat.convert(N),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},R.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},R.prototype.getElement=function(){return this._container},R.prototype.setText=function(N){return this.setDOMContent(i.window.document.createTextNode(N))},R.prototype.setHTML=function(N){var $=i.window.document.createDocumentFragment(),we=i.window.document.createElement("body"),ge;for(we.innerHTML=N;ge=we.firstChild,!!ge;)$.appendChild(ge);return this.setDOMContent($)},R.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},R.prototype.setMaxWidth=function(N){return this.options.maxWidth=N,this._update(),this},R.prototype.setDOMContent=function(N){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(N),this._createCloseButton(),this._update(),this._focusFirstElement(),this},R.prototype.addClassName=function(N){this._container&&this._container.classList.add(N)},R.prototype.removeClassName=function(N){this._container&&this._container.classList.remove(N)},R.prototype.setOffset=function(N){return this.options.offset=N,this._update(),this},R.prototype.toggleClassName=function(N){if(this._container)return this._container.classList.toggle(N)},R.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))},R.prototype._onMouseUp=function(N){this._update(N.point)},R.prototype._onMouseMove=function(N){this._update(N.point)},R.prototype._onDrag=function(N){this._update(N.point)},R.prototype._update=function(N){var $=this,we=this._lngLat||this._trackPointer;if(!(!this._map||!we||!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(It){return $._container.classList.add(It)}),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=zl(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!N))){var ge=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat),Ue=this.options.anchor,dt=Bc(this.options.offset);if(!Ue){var Rt=this._container.offsetWidth,ur=this._container.offsetHeight,gr;ge.y+dt.bottom.ythis._map.transform.height-ur?gr=["bottom"]:gr=[],ge.xthis._map.transform.width-Rt/2&&gr.push("right"),gr.length===0?Ue="bottom":Ue=gr.join("-")}var cr=ge.add(dt[Ue]).round();o.setTransform(this._container,lu[Ue]+" translate("+cr.x+"px,"+cr.y+"px)"),bu(this._container,Ue,"popup")}},R.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var N=this._container.querySelector(zc);N&&N.focus()}},R.prototype._onClose=function(){this.remove()},R}(i.Evented);function Bc(Y){if(Y)if(typeof Y=="number"){var R=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(R,R),"top-right":new i.Point(-R,R),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(R,-R),"bottom-right":new i.Point(-R,-R),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var K=i.Point.convert(Y);return{center:K,top:K,"top-left":K,"top-right":K,bottom:K,"bottom-left":K,"bottom-right":K,left:K,right:K}}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 Bc(new i.Point(0,0))}var Ou={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:Ho,NavigationControl:tl,GeolocateControl:Cc,AttributionControl:Ps,ScaleControl:Lc,FullscreenControl:If,Popup:Vu,Marker:al,Style:An,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Ur,clearPrewarmedResources:ti,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 vi.workerCount},set workerCount(Y){vi.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(R){i.clearTileCache(R)},workerUrl:""};return Ou}),r})});var kVe=Se((d_r,EVe)=>{"use strict";var tw=Zr(),IGt=Bf().sanitizeHTML,DGt=$K(),AVe=f1();function SVe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=AVe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var iy=SVe.prototype;iy.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=tq(t)};iy.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))};iy.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};iy.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};iy.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};iy.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)};iy.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,!!tq(e)){var r=RGt(e);t.addSource(this.idSource,r)}};iy.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function MVe(e){var t={},r={};switch(e.type){case"circle":tw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":tw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":tw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=DGt(n.textposition,n.iconsize);tw.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}),tw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":tw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function RGt(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=IGt(e.sourceattribution)),n}EVe.exports=function(t,r,n){var i=new SVe(t,r);return i.update(n),i}});var qVe=Se((p_r,FVe)=>{"use strict";var aJ=nJ(),oJ=Zr(),PVe=ix(),CVe=Ul(),FGt=hu(),qGt=gp(),rq=jc(),IVe=Sy(),BGt=IVe.drawMode,OGt=IVe.selectMode,NGt=nh().prepSelect,UGt=nh().clearOutline,VGt=nh().clearSelectionsCache,HGt=nh().selectOnClick,gx=f1(),GGt=kVe();function DVe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=DVe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=RVe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,u=s?[[s.west,s.south],[s.east,s.north]]:null,l=i.map=new aJ.Map({container:i.div,style:o.style,center:sJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:u,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new aJ.AttributionControl({compact:!0}));l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(c){l.once("load",c)})),f=f.concat(PVe.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],u=RVe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,a.setStyle(u.style),i.traceHash={},s.push(new Promise(function(l){a.once("styledata",l)}))),s=s.concat(PVe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&HGt(u.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),l.indexOf("event")>-1&&rq.click(n,u.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(u){var l=t.map.unproject(u);return[l.lng,l.lat]}var a=e.dragmode,o;o=function(u,l){if(l.isRect){var f=u.range={};f[t.id]=[i([l.xmin,l.ymin]),i([l.xmax,l.ymax])]}else{var c=u.lassoPoints={};c[t.id]=l.map(i)}};var s=t.dragOptions;t.dragOptions=oJ.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),OGt(a)||BGt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(u,l,f){NGt(u,l,f,t.dragOptions,a)},qGt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var lJ=Zr(),WGt=k_(),jGt=Jd(),BVe=zk();OVe.exports=function(t,r,n){WGt(t,r,n,{type:"mapbox",attributes:BVe,handleDefaults:ZGt,partition:"y",accessToken:r._mapboxAccessToken})};function ZGt(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,jGt(e,t,{name:"layers",handleItemDefaults:XGt}),t._input=e}function XGt(e,t){function r(u,l){return lJ.coerce(e,t,BVe.layers,u,l)}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",lJ.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"),lJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var iq=Se(Nv=>{"use strict";var UVe=nJ(),tm=Zr(),uJ=tm.strTranslate,YGt=tm.strScale,KGt=Dd().getSubplotCalcData,JGt=Zv(),$Gt=Nl(),VVe=yu(),QGt=Bf(),eWt=qVe(),_x="mapbox",Qm=Nv.constants=f1();Nv.name=_x;Nv.attr="subplot";Nv.idRoot=_x;Nv.idRegex=Nv.attrRegex=tm.counterRegex(_x);var tWt=["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(" ");Nv.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Nv.layoutAttributes=zk();Nv.supplyLayoutDefaults=NVe();var HVe=!0;Nv.plot=function(t){HVe&&(HVe=!1,tm.warn(tWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[_x];if(UVe.version!==Qm.requiredVersion)throw new Error(Qm.wrongVersionErrorMsg);var a=rWt(t,i);UVe.accessToken=a;for(var o=0;oy/2){var k=d.split("|").join("
");x.text(k).attr("data-unformatted",k).call(QGt.convertToTspans,e),b=VVe.bBox(x.node())}x.attr("transform",uJ(-3,-b.height+8)),p.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>y&&(E=y/(b.width+6));var A=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];p.attr("transform",uJ(A[0],A[1])+YGt(E))}};function rWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,u=0;u1&&tm.warn(Qm.multipleTokensErrorMsg),i[0]):(a.length&&tm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function GVe(e){return typeof e=="string"&&(Qm.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Nv.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=0;n{"use strict";var m_r=["*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(" ");WVe.exports={attributes:Y9(),supplyDefaults:iVe(),colorbar:ep(),formatLabels:JK(),calc:lF(),plot:mVe(),hoverPoints:eq().hoverPoints,eventData:bVe(),selectPoints:TVe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:iq(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var XVe=Se((__r,ZVe)=>{"use strict";ZVe.exports=jVe()});var fJ=Se((x_r,YVe)=>{"use strict";var c1=JA(),iWt=Xf(),nWt=Du().hovertemplateAttrs,aWt=zf(),xx=vu().extendFlat;YVe.exports=xx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:xx({},c1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:c1.text,hovertext:c1.hovertext,marker:{line:{color:xx({},c1.marker.line.color,{editType:"plot"}),width:xx({},c1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:xx({},c1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:xx({},c1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:xx({},c1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:c1.hoverinfo,hovertemplate:nWt({},{keys:["properties"]}),showlegend:xx({},aWt.showlegend,{dflt:!1})},iWt("",{cLetter:"z",editTypeOverride:"calc"}))});var JVe=Se((b_r,KVe)=>{"use strict";var Rk=Zr(),oWt=ed(),sWt=fJ();KVe.exports=function(t,r,n,i){function a(f,c){return Rk.coerce(t,r,sWt,f,c)}var o=a("locations"),s=a("z"),u=a("geojson");if(!Rk.isArrayOrTypedArray(o)||!o.length||!Rk.isArrayOrTypedArray(s)||!s.length||!(typeof u=="string"&&u!==""||Rk.isPlainObject(u))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),oWt(t,r,i,a,{prefix:"",cLetter:"z"}),Rk.coerceSelectionMarkerOpacity(r,a)}});var cJ=Se((w_r,eHe)=>{"use strict";var lWt=_u(),h1=Zr(),uWt=fc(),fWt=yu(),cWt=tx().makeBlank,$Ve=ix();function hWt(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:cWt()};if(!r)return a;var o=$Ve.extractTraceFeature(e);if(!o)return a;var s=uWt.makeColorScaleFuncFromTrace(t),u=t.marker,l=u.line||{},f;h1.isArrayOrTypedArray(u.opacity)&&(f=function(k){var E=k.mo;return lWt(E)?+h1.constrain(E,0,1):0});var c;h1.isArrayOrTypedArray(l.color)&&(c=function(k){return k.mlc});var h;h1.isArrayOrTypedArray(l.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var rHe=cJ().convert,dWt=cJ().convertOnSelect,tHe=f1().traceLayerPrefix;function iHe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",tHe+t+"-fill"],["line",tHe+t+"-line"]],this.below=null}var TS=iHe.prototype;TS.update=function(e){this._update(rHe(e)),e[0].trace._glTrace=this};TS.updateOnSelect=function(e){this._update(dWt(e))};TS._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])};TS.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};nHe.exports=function(t,r){var n=r[0].trace,i=new iHe(t,n.uid),a=i.sourceId,o=rHe(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 sHe=Se((S_r,oHe)=>{"use strict";var A_r=["*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(" ");oHe.exports={attributes:fJ(),supplyDefaults:JVe(),colorbar:S_(),calc:LF(),plot:aHe(),hoverPoints:PF(),eventData:IF(),selectPoints:DF(),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";lHe.exports=sHe()});var dJ=Se((E_r,cHe)=>{"use strict";var pWt=Xf(),vWt=Du().hovertemplateAttrs,fHe=zf(),nq=Y9(),hJ=vu().extendFlat;cHe.exports=hJ({lon:nq.lon,lat:nq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:nq.text,hovertext:nq.hovertext,hoverinfo:hJ({},fHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:vWt(),showlegend:hJ({},fHe.showlegend,{dflt:!1})},pWt("",{cLetter:"z",editTypeOverride:"calc"}))});var dHe=Se((k_r,hHe)=>{"use strict";var yWt=Zr(),mWt=ed(),gWt=dJ();hHe.exports=function(t,r,n,i){function a(l,f){return yWt.coerce(t,r,gWt,l,f)}var o=a("lon")||[],s=a("lat")||[],u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),mWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var yHe=Se((C_r,vHe)=>{"use strict";var pJ=_u(),_Wt=Zr().isArrayOrTypedArray,vJ=ju().BADNUM,xWt=Rp(),pHe=Zr()._;vHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=_Wt(a)&&a.length,s=0;s{"use strict";var bWt=_u(),yJ=Zr(),mHe=Pl(),gHe=fc(),_He=ju().BADNUM,wWt=tx().makeBlank;xHe.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:wWt()};if(!n)return a;var o=[],s,u=r.z,l=r.radius,f=yJ.isArrayOrTypedArray(u)&&u.length,c=yJ.isArrayOrTypedArray(l);for(s=0;s0?+l[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var b=gHe.extractOpts(r),y=b.reversescale?gHe.flipScale(b.colorscale):b.colorscale,k=y[0][1],E=mHe.opacity(k)<1?k:mHe.addOpacity(k,0),A=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s{"use strict";var wHe=bHe(),TWt=f1().traceLayerPrefix;function THe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",TWt+t+"-heatmap"]],this.below=null}var aq=THe.prototype;aq.update=function(e){var t=this.subplot,r=this.layerList,n=wHe(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])};aq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};AHe.exports=function(t,r){var n=r[0].trace,i=new THe(t,n.uid),a=i.sourceId,o=wHe(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 EHe=Se((P_r,MHe)=>{"use strict";var AWt=hu(),SWt=eq().hoverPoints,MWt=eq().getExtraText;MHe.exports=function(t,r,n){var i=SWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,u=o[a.index];if(delete a.color,"z"in u){var l=a.subplot.mockAxis;a.z=u.z,a.zLabel=AWt.tickText(l,l.c2l(u.z),"hover").text}return a.extraText=MWt(s,u,o[0].t.labels),[a]}}});var CHe=Se((I_r,kHe)=>{"use strict";kHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var zHe=Se((R_r,LHe)=>{"use strict";var D_r=["*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(" ");LHe.exports={attributes:dJ(),supplyDefaults:dHe(),colorbar:S_(),formatLabels:JK(),calc:yHe(),plot:SHe(),hoverPoints:EHe(),eventData:CHe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";PHe.exports=zHe()});var RHe=Se((q_r,DHe)=>{DHe.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} @@ -3220,9 +3220,9 @@ uniform `+ur+" "+gr+" u_"+cr+`; {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 qHe=Se((B_r,FHe)=>{FHe.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 bx=Se((O_r,VHe)=>{"use strict";var EWt=X1(),kWt=RHe(),CWt=qHe(),LWt='\xA9 OpenStreetMap contributors',BHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",OHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",oq="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",zWt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",PWt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",IWt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",UHe={basic:oq,streets:oq,outdoors:oq,light:BHe,dark:OHe,satellite:CWt,"satellite-streets":kWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:LWt,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":OHe,"carto-voyager":oq,"carto-positron-nolabels":zWt,"carto-darkmatter-nolabels":PWt,"carto-voyager-nolabels":IWt},NHe=EWt(UHe);VHe.exports={styleValueDflt:"basic",stylesMap:UHe,styleValuesMap:NHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",NHe.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error."}});var Fk=Se((N_r,ZHe)=>{"use strict";var HHe=Zr(),GHe=Pl().defaultLine,DWt=Ec().attributes,RWt=uc(),FWt=Zc().textposition,qWt=_c().overrideAll,BWt=_f().templatedArray,WHe=bx(),jHe=RWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});jHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var OWt=ZHe.exports=qWt({_arrayAttrRegexps:[HHe.counterRegex("map",".layers",!0)],domain:DWt({name:"map"}),style:{valType:"any",values:WHe.styleValuesMap,dflt:WHe.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:BWt("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:GHe},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:GHe}},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:jHe,textposition:HHe.extendFlat({},FWt,{arrayOk:!1})}})},"plot","from-root");OWt.uirevision={valType:"any",editType:"none"}});var sq=Se((U_r,KHe)=>{"use strict";var NWt=Du().hovertemplateAttrs,UWt=Du().texttemplateAttrs,VWt=Ey(),qk=H2(),AS=Zc(),XHe=Fk(),HWt=zf(),GWt=Xf(),rw=vu().extendFlat,WWt=_c().overrideAll,jWt=Fk(),YHe=qk.line,SS=qk.marker;KHe.exports=WWt({lon:qk.lon,lat:qk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:rw({},jWt.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({},SS.opacity,{dflt:1})},mode:rw({},AS.mode,{dflt:"markers"}),text:rw({},AS.text,{}),texttemplate:UWt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:rw({},AS.hovertext,{}),line:{color:YHe.color,width:YHe.width},connectgaps:AS.connectgaps,marker:rw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:SS.opacity,size:SS.size,sizeref:SS.sizeref,sizemin:SS.sizemin,sizemode:SS.sizemode},GWt("marker")),fill:qk.fill,fillcolor:VWt(),textfont:XHe.layers.symbol.textfont,textposition:XHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:AS.selected.marker},unselected:{marker:AS.unselected.marker},hoverinfo:rw({},HWt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:NWt()},"calc","nested")});var mJ=Se((V_r,JHe)=>{"use strict";var ZWt=["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"];JHe.exports={isSupportedFont:function(e){return ZWt.indexOf(e)!==-1}}});var eGe=Se((H_r,QHe)=>{"use strict";var Bk=Zr(),gJ=ec(),XWt=$v(),YWt=I0(),KWt=D0(),JWt=Py(),$He=sq(),$Wt=mJ().isSupportedFont;QHe.exports=function(t,r,n,i){function a(y,E){return Bk.coerce(t,r,$He,y,E)}function o(y,E){return Bk.coerce2(t,r,$He,y,E)}var s=QWt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),gJ.hasMarkers(r)){XWt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(Bk.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),Bk.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}gJ.hasLines(r)&&(YWt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var l=o("cluster.maxzoom"),f=o("cluster.step"),c=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),p=l!==!1||f!==!1||c!==!1||h!==!1||d!==!1,x=a("cluster.enabled",p);if(x||gJ.hasText(r)){var b=i.font.family;KWt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:$Wt(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"&&JWt(t,r,n,a),Bk.coerceSelectionMarkerOpacity(r,a)};function QWt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var _J=Se((G_r,rGe)=>{"use strict";var tGe=hu();rGe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=tGe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=tGe.tickText(o,o.c2l(s[1]),!0).text,i}});var xJ=Se((W_r,nGe)=>{"use strict";var iGe=Zr();nGe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=iGe.isArrayOrTypedArray(r)?iGe.mean(r):r,s=.5+o/100,u=1.5+o/100,l=["",""],f=[0,0];switch(i){case"top":l[0]="top",f[1]=-u;break;case"bottom":l[0]="bottom",f[1]=u;break}switch(a){case"left":l[1]="right",f[0]=-s;break;case"right":l[1]="left",f[0]=s;break}var c;return l[0]&&l[1]?c=l.join("-"):l[0]?c=l[0]:l[1]?c=l[1]:c="center",{anchor:c,offset:f}}});var fGe=Se((j_r,uGe)=>{"use strict";var sGe=_u(),lp=Zr(),ejt=ju().BADNUM,uq=tx(),aGe=fc(),tjt=yu(),rjt=S3(),fq=ec(),ijt=mJ().isSupportedFont,njt=xJ(),ajt=rv().appendArrayPointValue,ojt=Bf().NEWLINES,sjt=Bf().BR_TAG_ALL;uGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=fq.hasLines(n),s=fq.hasMarkers(n),u=fq.hasText(n),l=s&&n.marker.symbol==="circle",f=s&&n.marker.symbol!=="circle",c=n.cluster&&n.cluster.enabled,h=lq("fill"),d=lq("line"),p=lq("circle"),x=lq("symbol"),b={fill:h,line:d,circle:p,symbol:x};if(!i)return b;var y;if((a||o)&&(y=uq.calcTraceToLineCoords(r)),a&&(h.geojson=uq.makePolygon(y),h.layout.visibility="visible",lp.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=uq.makeLine(y),d.layout.visibility="visible",lp.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),l){var E=ljt(r);p.geojson=E.geojson,p.layout.visibility="visible",c&&(p.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":wJ(n.cluster.color,n.cluster.step),"circle-radius":wJ(n.cluster.size,n.cluster.step),"circle-opacity":wJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":oGe(n),"text-size":12}}),lp.extendFlat(p.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(l&&c&&(p.filter=["!",["has","point_count"]]),(f||u)&&(x.geojson=ujt(r,t),lp.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),f&&(lp.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&lp.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,lp.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),u)){var k=(n.marker||{}).size,A=njt(n.textposition,k);lp.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":oGe(n)}),lp.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function lq(e){return{type:e,geojson:uq.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function ljt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=lp.isArrayOrTypedArray(r.color),a=lp.isArrayOrTypedArray(r.size),o=lp.isArrayOrTypedArray(r.opacity),s;function u(k){return t.opacity*k}function l(k){return k/2}var f;i&&(aGe.hasColorscale(t,"marker")?f=aGe.makeColorScaleFuncFromTrace(r):f=lp.identity);var c;a&&(c=rjt(t));var h;o&&(h=function(k){var A=sGe(k)?+lp.constrain(k,0,1):0;return u(A)});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"),ijt(s)||(s=r);var u=s.split(", ");return u}});var pGe=Se((Z_r,dGe)=>{"use strict";var fjt=Zr(),cGe=fGe(),MS=bx().traceLayerPrefix,ny={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function hGe(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:MS+t+"-fill",line:MS+t+"-line",circle:MS+t+"-circle",symbol:MS+t+"-symbol",cluster:MS+t+"-cluster",clusterCount:MS+t+"-cluster-count"},this.below=null}var Ok=hGe.prototype;Ok.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&fjt.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)};Ok.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Ok.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 _=A[L];i.removeLayer(l.layerIds[_])}k||i.removeSource(l.sourceIds.circle)}function h(k){for(var A=ny.nonCluster,L=0;L=0;L--){var _=A[L];i.removeLayer(l.layerIds[_]),k||i.removeSource(l.sourceIds[_])}}function p(k){u?c(k):d(k)}function x(k){s?f(k):h(k)}function b(){for(var k=s?ny.cluster:ny.nonCluster,A=0;A=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};dGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new hGe(t,n.uid,i,a),s=cGe(t.gd,r),u=o.below=t.belowLookup["trace-"+n.uid],l,f,c;if(i)for(o.addSource("circle",s.circle,n.cluster),l=0;l{"use strict";var cjt=jc(),TJ=Zr(),hjt=oT(),djt=TJ.fillText,pjt=ju().BADNUM,vjt=bx().traceLayerPrefix;function yjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,u=[],l=vjt+i.uid+"-circle",f=i.cluster&&i.cluster.enabled;if(f){var c=s.map.queryRenderedFeatures(null,{layers:[l]});u=c.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function x(M){var v=M.lonlat;if(v[0]===pjt||f&&u.indexOf(M.i+1)===-1)return 1/0;var z=TJ.modHalf(v[0],360),T=v[1],F=s.project([z,T]),q=F.x-a.c2p([p,T]),U=F.y-o.c2p([z,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-H,1-3/H)}if(cjt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],y=b.lonlat,E=[TJ.modHalf(y[0],360)+d,y[1]],k=a.c2p(E),A=o.c2p(E),L=b.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=hjt(i,b),e.extraText=vGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function vGe(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,u=t.lonlat,l=[];function f(c){return c+"\xB0"}return a||o&&s?l.push("("+f(u[1])+", "+f(u[0])+")"):o?l.push(r.lon+f(u[0])):s&&l.push(r.lat+f(u[1])),(a||i.indexOf("text")!==-1)&&djt(t,e,l),l.join("
")}yGe.exports={hoverPoints:yjt,getExtraText:vGe}});var gGe=Se((Y_r,mGe)=>{"use strict";mGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var xGe=Se((K_r,_Ge)=>{"use strict";var mjt=Zr(),gjt=ec(),_jt=ju().BADNUM;_Ge.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u;if(!gjt.hasMarkers(s))return[];if(r===!1)for(u=0;u{(function(e,t){typeof AJ=="object"&&typeof SJ!="undefined"?SJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(AJ,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);",u={};return t.shared(u),t.index(e,u),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(I,S,D,Z){return new(D||(D=Promise))(function(ie,pe){function xe(wt){try{at(Z.next(wt))}catch(Ht){pe(Ht)}}function He(wt){try{at(Z.throw(wt))}catch(Ht){pe(Ht)}}function at(wt){var Ht;wt.done?ie(wt.value):(Ht=wt.value,Ht instanceof D?Ht:new D(function(rr){rr(Ht)})).then(xe,He)}at((Z=Z.apply(I,S||[])).next())})}function o(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}typeof SuppressedError=="function"&&SuppressedError;var s=u;function u(I,S){this.x=I,this.y=S}u.prototype={clone:function(){return new u(this.x,this.y)},add:function(I){return this.clone()._add(I)},sub:function(I){return this.clone()._sub(I)},multByPoint:function(I){return this.clone()._multByPoint(I)},divByPoint:function(I){return this.clone()._divByPoint(I)},mult:function(I){return this.clone()._mult(I)},div:function(I){return this.clone()._div(I)},rotate:function(I){return this.clone()._rotate(I)},rotateAround:function(I,S){return this.clone()._rotateAround(I,S)},matMult:function(I){return this.clone()._matMult(I)},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(I){return this.x===I.x&&this.y===I.y},dist:function(I){return Math.sqrt(this.distSqr(I))},distSqr:function(I){var S=I.x-this.x,D=I.y-this.y;return S*S+D*D},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(I){return Math.atan2(this.y-I.y,this.x-I.x)},angleWith:function(I){return this.angleWithSep(I.x,I.y)},angleWithSep:function(I,S){return Math.atan2(this.x*S-this.y*I,this.x*I+this.y*S)},_matMult:function(I){var S=I[2]*this.x+I[3]*this.y;return this.x=I[0]*this.x+I[1]*this.y,this.y=S,this},_add:function(I){return this.x+=I.x,this.y+=I.y,this},_sub:function(I){return this.x-=I.x,this.y-=I.y,this},_mult:function(I){return this.x*=I,this.y*=I,this},_div:function(I){return this.x/=I,this.y/=I,this},_multByPoint:function(I){return this.x*=I.x,this.y*=I.y,this},_divByPoint:function(I){return this.x/=I.x,this.y/=I.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var I=this.y;return this.y=this.x,this.x=-I,this},_rotate:function(I){var S=Math.cos(I),D=Math.sin(I),Z=D*this.x+S*this.y;return this.x=S*this.x-D*this.y,this.y=Z,this},_rotateAround:function(I,S){var D=Math.cos(I),Z=Math.sin(I),ie=S.y+Z*(this.x-S.x)+D*(this.y-S.y);return this.x=S.x+D*(this.x-S.x)-Z*(this.y-S.y),this.y=ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},u.convert=function(I){return I instanceof u?I:Array.isArray(I)?new u(I[0],I[1]):I};var l=o(s),f=c;function c(I,S,D,Z){this.cx=3*I,this.bx=3*(D-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(Z-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=S,this.p2x=D,this.p2y=Z}c.prototype={sampleCurveX:function(I){return((this.ax*I+this.bx)*I+this.cx)*I},sampleCurveY:function(I){return((this.ay*I+this.by)*I+this.cy)*I},sampleCurveDerivativeX:function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},solveCurveX:function(I,S){if(S===void 0&&(S=1e-6),I<0)return 0;if(I>1)return 1;for(var D=I,Z=0;Z<8;Z++){var ie=this.sampleCurveX(D)-I;if(Math.abs(ie)ie?xe=D:He=D,D=.5*(He-xe)+xe;return D},solve:function(I,S){return this.sampleCurveY(this.solveCurveX(I,S))}};var h=o(f);let d,p;function x(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(p==null&&(p=!1,x())){let S=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(S){for(let Z=0;Z<5*5;Z++){let ie=4*Z;S.fillStyle=`rgb(${ie},${ie+1},${ie+2})`,S.fillRect(Z%5,Math.floor(Z/5),1,1)}let D=S.getImageData(0,0,5,5).data;for(let Z=0;Z<5*5*4;Z++)if(Z%4!=3&&D[Z]!==Z){p=!0;break}}}return p||!1}function y(I,S,D,Z){let ie=new h(I,S,D,Z);return pe=>ie.solve(pe)}let E=y(.25,.1,.25,1);function k(I,S,D){return Math.min(D,Math.max(S,I))}function A(I,S,D){let Z=D-S,ie=((I-S)%Z+Z)%Z+S;return ie===S?D:ie}function L(I,...S){for(let D of S)for(let Z in D)I[Z]=D[Z];return I}let _=1;function C(I,S,D){let Z={};for(let ie in I)Z[ie]=S.call(this,I[ie],ie,I);return Z}function M(I,S,D){let Z={};for(let ie in I)S.call(this,I[ie],ie,I)&&(Z[ie]=I[ie]);return Z}function v(I){return Array.isArray(I)?I.map(v):typeof I=="object"&&I?C(I,v):I}let z={};function T(I){z[I]||(typeof console!="undefined"&&console.warn(I),z[I]=!0)}function F(I,S,D){return(D.y-I.y)*(S.x-I.x)>(S.y-I.y)*(D.x-I.x)}function q(I){return typeof WorkerGlobalScope!="undefined"&&I!==void 0&&I instanceof WorkerGlobalScope}let U=null;function H(I){return typeof ImageBitmap!="undefined"&&I instanceof ImageBitmap}let j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function G(I,S,D,Z,ie){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let pe=new VideoFrame(I,{timestamp:0});try{let xe=pe==null?void 0:pe.format;if(!xe||!xe.startsWith("BGR")&&!xe.startsWith("RGB"))throw new Error(`Unrecognized format ${xe}`);let He=xe.startsWith("BGR"),at=new Uint8ClampedArray(Z*ie*4);if(yield pe.copyTo(at,function(wt,Ht,rr,pr,Ar){let Vr=4*Math.max(-Ht,0),ri=(Math.max(0,rr)-rr)*pr*4+Vr,Ii=4*pr,Zi=Math.max(0,Ht),da=Math.max(0,rr);return{rect:{x:Zi,y:da,width:Math.min(wt.width,Ht+pr)-Zi,height:Math.min(wt.height,rr+Ar)-da},layout:[{offset:ri,stride:Ii}]}}(I,S,D,Z,ie)),He)for(let wt=0;wtq(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ke=function(I,S){if(/:\/\//.test(I.url)&&!/^https?:|^file:/.test(I.url)){let Z=ze(I.url);if(Z)return Z(I,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:I,targetMapId:Ce},S)}if(!(/^file:/.test(D=I.url)||/^file:/.test(te())&&!/^\w+:/.test(D))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(Z,ie){return a(this,void 0,void 0,function*(){let pe=new Request(Z.url,{method:Z.method||"GET",body:Z.body,credentials:Z.credentials,headers:Z.headers,cache:Z.cache,referrer:te(),signal:ie.signal});Z.type!=="json"||pe.headers.has("Accept")||pe.headers.set("Accept","application/json");let xe=yield fetch(pe);if(!xe.ok){let wt=yield xe.blob();throw new he(xe.status,xe.statusText,Z.url,wt)}let He;He=Z.type==="arrayBuffer"||Z.type==="image"?xe.arrayBuffer():Z.type==="json"?xe.json():xe.text();let at=yield He;if(ie.signal.aborted)throw ne();return{data:at,cacheControl:xe.headers.get("Cache-Control"),expires:xe.headers.get("Expires")}})}(I,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:I,mustQueue:!0,targetMapId:Ce},S)}var D;return function(Z,ie){return new Promise((pe,xe)=>{var He;let at=new XMLHttpRequest;at.open(Z.method||"GET",Z.url,!0),Z.type!=="arrayBuffer"&&Z.type!=="image"||(at.responseType="arraybuffer");for(let wt in Z.headers)at.setRequestHeader(wt,Z.headers[wt]);Z.type==="json"&&(at.responseType="text",!((He=Z.headers)===null||He===void 0)&&He.Accept||at.setRequestHeader("Accept","application/json")),at.withCredentials=Z.credentials==="include",at.onerror=()=>{xe(new Error(at.statusText))},at.onload=()=>{if(!ie.signal.aborted)if((at.status>=200&&at.status<300||at.status===0)&&at.response!==null){let wt=at.response;if(Z.type==="json")try{wt=JSON.parse(at.response)}catch(Ht){return void xe(Ht)}pe({data:wt,cacheControl:at.getResponseHeader("Cache-Control"),expires:at.getResponseHeader("Expires")})}else{let wt=new Blob([at.response],{type:at.getResponseHeader("Content-Type")});xe(new he(at.status,at.statusText,Z.url,wt))}},ie.signal.addEventListener("abort",()=>{at.abort(),xe(ne())}),at.send(Z.body)})}(I,S)};function Ee(I){if(!I||I.indexOf("://")<=0||I.indexOf("data:image/")===0||I.indexOf("blob:")===0)return!0;let S=new URL(I),D=window.location;return S.protocol===D.protocol&&S.host===D.host}function Me(I,S,D){D[I]&&D[I].indexOf(S)!==-1||(D[I]=D[I]||[],D[I].push(S))}function Oe(I,S,D){if(D&&D[I]){let Z=D[I].indexOf(S);Z!==-1&&D[I].splice(Z,1)}}class Re{constructor(S,D={}){L(this,D),this.type=S}}class me extends Re{constructor(S,D={}){super("error",L({error:S},D))}}class Be{on(S,D){return this._listeners=this._listeners||{},Me(S,D,this._listeners),this}off(S,D){return Oe(S,D,this._listeners),Oe(S,D,this._oneTimeListeners),this}once(S,D){return D?(this._oneTimeListeners=this._oneTimeListeners||{},Me(S,D,this._oneTimeListeners),this):new Promise(Z=>this.once(S,Z))}fire(S,D){typeof S=="string"&&(S=new Re(S,D||{}));let Z=S.type;if(this.listens(Z)){S.target=this;let ie=this._listeners&&this._listeners[Z]?this._listeners[Z].slice():[];for(let He of ie)He.call(this,S);let pe=this._oneTimeListeners&&this._oneTimeListeners[Z]?this._oneTimeListeners[Z].slice():[];for(let He of pe)Oe(Z,He,this._oneTimeListeners),He.call(this,S);let xe=this._eventedParent;xe&&(L(S,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),xe.fire(S))}else S instanceof me&&console.error(S.error);return this}listens(S){return this._listeners&&this._listeners[S]&&this._listeners[S].length>0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)}setEventedParent(S,D){return this._eventedParent=S,this._eventedParentData=D,this}}var fe={$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 et(I,S){let D={};for(let Z in I)Z!=="ref"&&(D[Z]=I[Z]);return Ze.forEach(Z=>{Z in S&&(D[Z]=S[Z])}),D}function gt(I,S){if(Array.isArray(I)){if(!Array.isArray(S)||I.length!==S.length)return!1;for(let D=0;D`:I.itemType.kind==="value"?"array":`array<${S}>`}return I.kind}let Pe=[ct,rt,je,tt,Je,ir,Mt,_e(Vt),fr,Ot,De];function Ie(I,S){if(S.kind==="error")return null;if(I.kind==="array"){if(S.kind==="array"&&(S.N===0&&S.itemType.kind==="value"||!Ie(I.itemType,S.itemType))&&(typeof I.N!="number"||I.N===S.N))return null}else{if(I.kind===S.kind)return null;if(I.kind==="value"){for(let D of Pe)if(!Ie(D,S))return null}}return`Expected ${Fe(I)} but found ${Fe(S)} instead.`}function lt(I,S){return S.some(D=>D.kind===I.kind)}function ye(I,S){return S.some(D=>D==="null"?I===null:D==="array"?Array.isArray(I):D==="object"?I&&!Array.isArray(I)&&typeof I=="object":D===typeof I)}function ue(I,S){return I.kind==="array"&&S.kind==="array"?I.itemType.kind===S.itemType.kind&&typeof I.N=="number":I.kind===S.kind}let de=.96422,ht=.82521,Et=4/29,St=6/29,Zt=3*St*St,qr=St*St*St,Lr=Math.PI/180,vr=180/Math.PI;function Er(I){return(I%=360)<0&&(I+=360),I}function si([I,S,D,Z]){let ie,pe,xe=Si((.2225045*(I=Ei(I))+.7168786*(S=Ei(S))+.0606169*(D=Ei(D)))/1);I===S&&S===D?ie=pe=xe:(ie=Si((.4360747*I+.3850649*S+.1430804*D)/de),pe=Si((.0139322*I+.0971045*S+.7141733*D)/ht));let He=116*xe-16;return[He<0?0:He,500*(ie-xe),200*(xe-pe),Z]}function Ei(I){return I<=.04045?I/12.92:Math.pow((I+.055)/1.055,2.4)}function Si(I){return I>qr?Math.pow(I,1/3):I/Zt+Et}function xi([I,S,D,Z]){let ie=(I+16)/116,pe=isNaN(S)?ie:ie+S/500,xe=isNaN(D)?ie:ie-D/200;return ie=1*Jr(ie),pe=de*Jr(pe),xe=ht*Jr(xe),[Hi(3.1338561*pe-1.6168667*ie-.4906146*xe),Hi(-.9787684*pe+1.9161415*ie+.033454*xe),Hi(.0719453*pe-.2289914*ie+1.4052427*xe),Z]}function Hi(I){return(I=I<=.00304?12.92*I:1.055*Math.pow(I,1/2.4)-.055)<0?0:I>1?1:I}function Jr(I){return I>St?I*I*I:Zt*(I-Et)}function ci(I){return parseInt(I.padEnd(2,I),16)/255}function Di(I,S){return Lt(S?I/100:I,0,1)}function Lt(I,S,D){return Math.min(Math.max(S,I),D)}function vt(I){return!I.some(Number.isNaN)}let Dt={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 Bt{constructor(S,D,Z,ie=1,pe=!0){this.r=S,this.g=D,this.b=Z,this.a=ie,pe||(this.r*=ie,this.g*=ie,this.b*=ie,ie||this.overwriteGetter("rgb",[S,D,Z,ie]))}static parse(S){if(S instanceof Bt)return S;if(typeof S!="string")return;let D=function(Z){if((Z=Z.toLowerCase().trim())==="transparent")return[0,0,0,0];let ie=Dt[Z];if(ie){let[xe,He,at]=ie;return[xe/255,He/255,at/255,1]}if(Z.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(Z)){let xe=Z.length<6?1:2,He=1;return[ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+xe)||"ff")]}if(Z.startsWith("rgb")){let xe=Z.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(xe){let[He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da]=xe,cn=[Ht||" ",Ar||" ",Ii].join("");if(cn===" "||cn===" /"||cn===",,"||cn===",,,"){let jn=[wt,pr,ri].join(""),Va=jn==="%%%"?100:jn===""?255:0;if(Va){let hl=[Lt(+at/Va,0,1),Lt(+rr/Va,0,1),Lt(+Vr/Va,0,1),Zi?Di(+Zi,da):1];if(vt(hl))return hl}}return}}let pe=Z.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[xe,He,at,wt,Ht,rr,pr,Ar,Vr]=pe,ri=[at||" ",Ht||" ",pr].join("");if(ri===" "||ri===" /"||ri===",,"||ri===",,,"){let Ii=[+He,Lt(+wt,0,100),Lt(+rr,0,100),Ar?Di(+Ar,Vr):1];if(vt(Ii))return function([Zi,da,cn,jn]){function Va(hl){let iu=(hl+Zi/30)%12,Su=da*Math.min(cn,1-cn);return cn-Su*Math.max(-1,Math.min(iu-3,9-iu,1))}return Zi=Er(Zi),da/=100,cn/=100,[Va(0),Va(8),Va(4),jn]}(Ii)}}}(S);return D?new Bt(...D,!1):void 0}get rgb(){let{r:S,g:D,b:Z,a:ie}=this,pe=ie||1/0;return this.overwriteGetter("rgb",[S/pe,D/pe,Z/pe,ie])}get hcl(){return this.overwriteGetter("hcl",function(S){let[D,Z,ie,pe]=si(S),xe=Math.sqrt(Z*Z+ie*ie);return[Math.round(1e4*xe)?Er(Math.atan2(ie,Z)*vr):NaN,xe,D,pe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",si(this.rgb))}overwriteGetter(S,D){return Object.defineProperty(this,S,{value:D}),D}toString(){let[S,D,Z,ie]=this.rgb;return`rgba(${[S,D,Z].map(pe=>Math.round(255*pe)).join(",")},${ie})`}}Bt.black=new Bt(0,0,0,1),Bt.white=new Bt(1,1,1,1),Bt.transparent=new Bt(0,0,0,0),Bt.red=new Bt(1,0,0,1);class sr{constructor(S,D,Z){this.sensitivity=S?D?"variant":"case":D?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(S,D){return this.collator.compare(S,D)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class br{constructor(S,D,Z,ie,pe){this.text=S,this.image=D,this.scale=Z,this.fontStack=ie,this.textColor=pe}}class zr{constructor(S){this.sections=S}static fromString(S){return new zr([new br(S,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(S=>S.text.length!==0||S.image&&S.image.name.length!==0)}static factory(S){return S instanceof zr?S:zr.fromString(S)}toString(){return this.sections.length===0?"":this.sections.map(S=>S.text).join("")}}class Tr{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Tr)return S;if(typeof S=="number")return new Tr([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let D of S)if(typeof D!="number")return;switch(S.length){case 1:S=[S[0],S[0],S[0],S[0]];break;case 2:S=[S[0],S[1],S[0],S[1]];break;case 3:S=[S[0],S[1],S[2],S[1]]}return new Tr(S)}}toString(){return JSON.stringify(this.values)}}let Rr=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Br{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Br)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let D=0;D=0&&I<=255&&typeof S=="number"&&S>=0&&S<=255&&typeof D=="number"&&D>=0&&D<=255?Z===void 0||typeof Z=="number"&&Z>=0&&Z<=1?null:`Invalid rgba value [${[I,S,D,Z].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof Z=="number"?[I,S,D,Z]:[I,S,D]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Pi(I){if(I===null||typeof I=="string"||typeof I=="boolean"||typeof I=="number"||I instanceof Bt||I instanceof sr||I instanceof zr||I instanceof Tr||I instanceof Br||I instanceof oi)return!0;if(Array.isArray(I)){for(let S of I)if(!Pi(S))return!1;return!0}if(typeof I=="object"){for(let S in I)if(!Pi(I[S]))return!1;return!0}return!1}function Yr(I){if(I===null)return ct;if(typeof I=="string")return je;if(typeof I=="boolean")return tt;if(typeof I=="number")return rt;if(I instanceof Bt)return Je;if(I instanceof sr)return Kt;if(I instanceof zr)return ir;if(I instanceof Tr)return fr;if(I instanceof Br)return De;if(I instanceof oi)return Ot;if(Array.isArray(I)){let S=I.length,D;for(let Z of I){let ie=Yr(Z);if(D){if(D===ie)continue;D=Vt;break}D=ie}return _e(D||Vt,S)}return Mt}function Ni(I){let S=typeof I;return I===null?"":S==="string"||S==="number"||S==="boolean"?String(I):I instanceof Bt||I instanceof zr||I instanceof Tr||I instanceof Br||I instanceof oi?I.toString():JSON.stringify(I)}class Ur{constructor(S,D){this.type=S,this.value=D}static parse(S,D){if(S.length!==2)return D.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!Pi(S[1]))return D.error("invalid value");let Z=S[1],ie=Yr(Z),pe=D.expectedType;return ie.kind!=="array"||ie.N!==0||!pe||pe.kind!=="array"||typeof pe.N=="number"&&pe.N!==0||(ie=pe),new Ur(ie,Z)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ti{constructor(S){this.name="ExpressionEvaluationError",this.message=S}toJSON(){return this.message}}let ki={string:je,number:rt,boolean:tt,object:Mt};class ji{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z,ie=1,pe=S[0];if(pe==="array"){let He,at;if(S.length>2){let wt=S[1];if(typeof wt!="string"||!(wt in ki)||wt==="object")return D.error('The item type argument of "array" must be one of string, number, boolean',1);He=ki[wt],ie++}else He=Vt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return D.error('The length argument to "array" must be a positive integer literal',2);at=S[2],ie++}Z=_e(He,at)}else{if(!ki[pe])throw new Error(`Types doesn't contain name = ${pe}`);Z=ki[pe]}let xe=[];for(;ieS.outputDefined())}}let Vi={"to-boolean":tt,"to-color":Je,"to-number":rt,"to-string":je};class zi{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z=S[0];if(!Vi[Z])throw new Error(`Can't parse ${Z} as it is not part of the known types`);if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return D.error("Expected one argument.");let ie=Vi[Z],pe=[];for(let xe=1;xe4?`Invalid rbga value ${JSON.stringify(D)}: expected an array containing either three or four numeric values.`:vi(D[0],D[1],D[2],D[3]),!Z))return new Bt(D[0]/255,D[1]/255,D[2]/255,D[3])}throw new ti(Z||`Could not parse color from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"padding":{let D;for(let Z of this.args){D=Z.evaluate(S);let ie=Tr.parse(D);if(ie)return ie}throw new ti(`Could not parse padding from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"variableAnchorOffsetCollection":{let D;for(let Z of this.args){D=Z.evaluate(S);let ie=Br.parse(D);if(ie)return ie}throw new ti(`Could not parse variableAnchorOffsetCollection from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"number":{let D=null;for(let Z of this.args){if(D=Z.evaluate(S),D===null)return 0;let ie=Number(D);if(!isNaN(ie))return ie}throw new ti(`Could not convert ${JSON.stringify(D)} to number.`)}case"formatted":return zr.fromString(Ni(this.args[0].evaluate(S)));case"resolvedImage":return oi.fromString(Ni(this.args[0].evaluate(S)));default:return Ni(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Mi=["Unknown","Point","LineString","Polygon"];class sn{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"?Mi[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(S){let D=this._parseColorCache[S];return D||(D=this._parseColorCache[S]=Bt.parse(S)),D}}class fi{constructor(S,D,Z=[],ie,pe=new ut,xe=[]){this.registry=S,this.path=Z,this.key=Z.map(He=>`[${He}]`).join(""),this.scope=pe,this.errors=xe,this.expectedType=ie,this._isConstant=D}parse(S,D,Z,ie,pe={}){return D?this.concat(D,Z,ie)._parse(S,pe):this._parse(S,pe)}_parse(S,D){function Z(ie,pe,xe){return xe==="assert"?new ji(pe,[ie]):xe==="coerce"?new zi(pe,[ie]):ie}if(S!==null&&typeof S!="string"&&typeof S!="boolean"&&typeof S!="number"||(S=["literal",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let ie=S[0];if(typeof ie!="string")return this.error(`Expression name must be a string, but found ${typeof ie} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let pe=this.registry[ie];if(pe){let xe=pe.parse(S,this);if(!xe)return null;if(this.expectedType){let He=this.expectedType,at=xe.type;if(He.kind!=="string"&&He.kind!=="number"&&He.kind!=="boolean"&&He.kind!=="object"&&He.kind!=="array"||at.kind!=="value")if(He.kind!=="color"&&He.kind!=="formatted"&&He.kind!=="resolvedImage"||at.kind!=="value"&&at.kind!=="string")if(He.kind!=="padding"||at.kind!=="value"&&at.kind!=="number"&&at.kind!=="array")if(He.kind!=="variableAnchorOffsetCollection"||at.kind!=="value"&&at.kind!=="array"){if(this.checkSubtype(He,at))return null}else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"assert")}if(!(xe instanceof Ur)&&xe.type.kind!=="resolvedImage"&&this._isConstant(xe)){let He=new sn;try{xe=new Ur(xe.type,xe.evaluate(He))}catch(at){return this.error(at.message),null}}return xe}return this.error(`Unknown expression "${ie}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(S===void 0?"'undefined' value invalid. Use null instead.":typeof S=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof S} instead.`)}concat(S,D,Z){let ie=typeof S=="number"?this.path.concat(S):this.path,pe=Z?this.scope.concat(Z):this.scope;return new fi(this.registry,this._isConstant,ie,D||null,pe,this.errors)}error(S,...D){let Z=`${this.key}${D.map(ie=>`[${ie}]`).join("")}`;this.errors.push(new nt(Z,S))}checkSubtype(S,D){let Z=Ie(S,D);return Z&&this.error(Z),Z}}class Or{constructor(S,D){this.type=D.type,this.bindings=[].concat(S),this.result=D}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let D of this.bindings)S(D[1]);S(this.result)}static parse(S,D){if(S.length<4)return D.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let Z=[];for(let pe=1;pe=Z.length)throw new ti(`Array index out of bounds: ${D} > ${Z.length-1}.`);if(D!==Math.floor(D))throw new ti(`Array index must be an integer, but found ${D} instead.`);return Z[D]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class tr{constructor(S,D){this.type=tt,this.needle=S,this.haystack=D}static parse(S,D){if(S.length!==3)return D.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,Vt);return Z&&ie?lt(Z.type,[tt,je,rt,ct,Vt])?new tr(Z,ie):D.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Z.type)} instead`):null}evaluate(S){let D=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!ye(D,["boolean","string","number","null"]))throw new ti(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Yr(D))} instead.`);if(!ye(Z,["string","array"]))throw new ti(`Expected second argument to be of type array or string, but found ${Fe(Yr(Z))} instead.`);return Z.indexOf(D)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class or{constructor(S,D,Z){this.type=rt,this.needle=S,this.haystack=D,this.fromIndex=Z}static parse(S,D){if(S.length<=2||S.length>=5)return D.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,Vt);if(!Z||!ie)return null;if(!lt(Z.type,[tt,je,rt,ct,Vt]))return D.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Z.type)} instead`);if(S.length===4){let pe=D.parse(S[3],3,rt);return pe?new or(Z,ie,pe):null}return new or(Z,ie)}evaluate(S){let D=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!ye(D,["boolean","string","number","null"]))throw new ti(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Yr(D))} instead.`);let ie;if(this.fromIndex&&(ie=this.fromIndex.evaluate(S)),ye(Z,["string"])){let pe=Z.indexOf(D,ie);return pe===-1?-1:[...Z.slice(0,pe)].length}if(ye(Z,["array"]))return Z.indexOf(D,ie);throw new ti(`Expected second argument to be of type array or string, but found ${Fe(Yr(Z))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class Nr{constructor(S,D,Z,ie,pe,xe){this.inputType=S,this.type=D,this.input=Z,this.cases=ie,this.outputs=pe,this.otherwise=xe}static parse(S,D){if(S.length<5)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return D.error("Expected an even number of arguments.");let Z,ie;D.expectedType&&D.expectedType.kind!=="value"&&(ie=D.expectedType);let pe={},xe=[];for(let wt=2;wtNumber.MAX_SAFE_INTEGER)return pr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return pr.error("Numeric branch labels must be integer values.");if(Z){if(pr.checkSubtype(Z,Yr(Vr)))return null}else Z=Yr(Vr);if(pe[String(Vr)]!==void 0)return pr.error("Branch labels must be unique.");pe[String(Vr)]=xe.length}let Ar=D.parse(rr,wt,ie);if(!Ar)return null;ie=ie||Ar.type,xe.push(Ar)}let He=D.parse(S[1],1,Vt);if(!He)return null;let at=D.parse(S[S.length-1],S.length-1,ie);return at?He.type.kind!=="value"&&D.concat(1).checkSubtype(Z,He.type)?null:new Nr(Z,ie,He,pe,xe,at):null}evaluate(S){let D=this.input.evaluate(S);return(Yr(D)===this.inputType&&this.outputs[this.cases[D]]||this.otherwise).evaluate(S)}eachChild(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)}outputDefined(){return this.outputs.every(S=>S.outputDefined())&&this.otherwise.outputDefined()}}class hi{constructor(S,D,Z){this.type=S,this.branches=D,this.otherwise=Z}static parse(S,D){if(S.length<4)return D.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return D.error("Expected an odd number of arguments.");let Z;D.expectedType&&D.expectedType.kind!=="value"&&(Z=D.expectedType);let ie=[];for(let xe=1;xeD.outputDefined())&&this.otherwise.outputDefined()}}class Gi{constructor(S,D,Z,ie){this.type=S,this.input=D,this.beginIndex=Z,this.endIndex=ie}static parse(S,D){if(S.length<=2||S.length>=5)return D.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,rt);if(!Z||!ie)return null;if(!lt(Z.type,[_e(Vt),je,Vt]))return D.error(`Expected first argument to be of type array or string, but found ${Fe(Z.type)} instead`);if(S.length===4){let pe=D.parse(S[3],3,rt);return pe?new Gi(Z.type,Z,ie,pe):null}return new Gi(Z.type,Z,ie)}evaluate(S){let D=this.input.evaluate(S),Z=this.beginIndex.evaluate(S),ie;if(this.endIndex&&(ie=this.endIndex.evaluate(S)),ye(D,["string"]))return[...D].slice(Z,ie).join("");if(ye(D,["array"]))return D.slice(Z,ie);throw new ti(`Expected first argument to be of type array or string, but found ${Fe(Yr(D))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function Qr(I,S){let D=I.length-1,Z,ie,pe=0,xe=D,He=0;for(;pe<=xe;)if(He=Math.floor((pe+xe)/2),Z=I[He],ie=I[He+1],Z<=S){if(He===D||SS))throw new ti("Input is not a number.");xe=He-1}return 0}class Ui{constructor(S,D,Z){this.type=S,this.input=D,this.labels=[],this.outputs=[];for(let[ie,pe]of Z)this.labels.push(ie),this.outputs.push(pe)}static parse(S,D){if(S.length-1<4)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return D.error("Expected an even number of arguments.");let Z=D.parse(S[1],1,rt);if(!Z)return null;let ie=[],pe=null;D.expectedType&&D.expectedType.kind!=="value"&&(pe=D.expectedType);for(let xe=1;xe=He)return D.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',wt);let rr=D.parse(at,Ht,pe);if(!rr)return null;pe=pe||rr.type,ie.push([He,rr])}return new Ui(pe,Z,ie)}evaluate(S){let D=this.labels,Z=this.outputs;if(D.length===1)return Z[0].evaluate(S);let ie=this.input.evaluate(S);if(ie<=D[0])return Z[0].evaluate(S);let pe=D.length;return ie>=D[pe-1]?Z[pe-1].evaluate(S):Z[Qr(D,ie)].evaluate(S)}eachChild(S){S(this.input);for(let D of this.outputs)S(D)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function zn(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}var fn=xn;function xn(I,S,D,Z){this.cx=3*I,this.bx=3*(D-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(Z-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=S,this.p2x=D,this.p2y=Z}xn.prototype={sampleCurveX:function(I){return((this.ax*I+this.bx)*I+this.cx)*I},sampleCurveY:function(I){return((this.ay*I+this.by)*I+this.cy)*I},sampleCurveDerivativeX:function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},solveCurveX:function(I,S){if(S===void 0&&(S=1e-6),I<0)return 0;if(I>1)return 1;for(var D=I,Z=0;Z<8;Z++){var ie=this.sampleCurveX(D)-I;if(Math.abs(ie)ie?xe=D:He=D,D=.5*(He-xe)+xe;return D},solve:function(I,S){return this.sampleCurveY(this.solveCurveX(I,S))}};var _a=zn(fn);function Wn(I,S,D){return I+D*(S-I)}function Fn(I,S,D){return I.map((Z,ie)=>Wn(Z,S[ie],D))}let ia={number:Wn,color:function(I,S,D,Z="rgb"){switch(Z){case"rgb":{let[ie,pe,xe,He]=Fn(I.rgb,S.rgb,D);return new Bt(ie,pe,xe,He,!1)}case"hcl":{let[ie,pe,xe,He]=I.hcl,[at,wt,Ht,rr]=S.hcl,pr,Ar;if(isNaN(ie)||isNaN(at))isNaN(ie)?isNaN(at)?pr=NaN:(pr=at,xe!==1&&xe!==0||(Ar=wt)):(pr=ie,Ht!==1&&Ht!==0||(Ar=pe));else{let da=at-ie;at>ie&&da>180?da-=360:at180&&(da+=360),pr=ie+D*da}let[Vr,ri,Ii,Zi]=function([da,cn,jn,Va]){return da=isNaN(da)?0:da*Lr,xi([jn,Math.cos(da)*cn,Math.sin(da)*cn,Va])}([pr,Ar!=null?Ar:Wn(pe,wt,D),Wn(xe,Ht,D),Wn(He,rr,D)]);return new Bt(Vr,ri,Ii,Zi,!1)}case"lab":{let[ie,pe,xe,He]=xi(Fn(I.lab,S.lab,D));return new Bt(ie,pe,xe,He,!1)}}},array:Fn,padding:function(I,S,D){return new Tr(Fn(I.values,S.values,D))},variableAnchorOffsetCollection:function(I,S,D){let Z=I.values,ie=S.values;if(Z.length!==ie.length)throw new ti(`Cannot interpolate values of different length. from: ${I.toString()}, to: ${S.toString()}`);let pe=[];for(let xe=0;xetypeof Ht!="number"||Ht<0||Ht>1))return D.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ie={name:"cubic-bezier",controlPoints:wt}}}if(S.length-1<4)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return D.error("Expected an even number of arguments.");if(pe=D.parse(pe,2,rt),!pe)return null;let He=[],at=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?at=Je:D.expectedType&&D.expectedType.kind!=="value"&&(at=D.expectedType);for(let wt=0;wt=Ht)return D.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',pr);let Vr=D.parse(rr,Ar,at);if(!Vr)return null;at=at||Vr.type,He.push([Ht,Vr])}return ue(at,rt)||ue(at,Je)||ue(at,fr)||ue(at,De)||ue(at,_e(rt))?new za(at,Z,ie,pe,He):D.error(`Type ${Fe(at)} is not interpolatable.`)}evaluate(S){let D=this.labels,Z=this.outputs;if(D.length===1)return Z[0].evaluate(S);let ie=this.input.evaluate(S);if(ie<=D[0])return Z[0].evaluate(S);let pe=D.length;if(ie>=D[pe-1])return Z[pe-1].evaluate(S);let xe=Qr(D,ie),He=za.interpolationFactor(this.interpolation,ie,D[xe],D[xe+1]),at=Z[xe].evaluate(S),wt=Z[xe+1].evaluate(S);switch(this.operator){case"interpolate":return ia[this.type.kind](at,wt,He);case"interpolate-hcl":return ia.color(at,wt,He,"hcl");case"interpolate-lab":return ia.color(at,wt,He,"lab")}}eachChild(S){S(this.input);for(let D of this.outputs)S(D)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function Hr(I,S,D,Z){let ie=Z-D,pe=I-D;return ie===0?0:S===1?pe/ie:(Math.pow(S,pe)-1)/(Math.pow(S,ie)-1)}class na{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expectected at least one argument.");let Z=null,ie=D.expectedType;ie&&ie.kind!=="value"&&(Z=ie);let pe=[];for(let He of S.slice(1)){let at=D.parse(He,1+pe.length,Z,void 0,{typeAnnotation:"omit"});if(!at)return null;Z=Z||at.type,pe.push(at)}if(!Z)throw new Error("No output type");let xe=ie&&pe.some(He=>Ie(ie,He.type));return new na(xe?Vt:Z,pe)}evaluate(S){let D,Z=null,ie=0;for(let pe of this.args)if(ie++,Z=pe.evaluate(S),Z&&Z instanceof oi&&!Z.available&&(D||(D=Z.name),Z=null,ie===this.args.length&&(Z=D)),Z!==null)break;return Z}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function go(I,S){return I==="=="||I==="!="?S.kind==="boolean"||S.kind==="string"||S.kind==="number"||S.kind==="null"||S.kind==="value":S.kind==="string"||S.kind==="number"||S.kind==="value"}function Dn(I,S,D,Z){return Z.compare(S,D)===0}function un(I,S,D){let Z=I!=="=="&&I!=="!=";return class bGe{constructor(pe,xe,He){this.type=tt,this.lhs=pe,this.rhs=xe,this.collator=He,this.hasUntypedArgument=pe.type.kind==="value"||xe.type.kind==="value"}static parse(pe,xe){if(pe.length!==3&&pe.length!==4)return xe.error("Expected two or three arguments.");let He=pe[0],at=xe.parse(pe[1],1,Vt);if(!at)return null;if(!go(He,at.type))return xe.concat(1).error(`"${He}" comparisons are not supported for type '${Fe(at.type)}'.`);let wt=xe.parse(pe[2],2,Vt);if(!wt)return null;if(!go(He,wt.type))return xe.concat(2).error(`"${He}" comparisons are not supported for type '${Fe(wt.type)}'.`);if(at.type.kind!==wt.type.kind&&at.type.kind!=="value"&&wt.type.kind!=="value")return xe.error(`Cannot compare types '${Fe(at.type)}' and '${Fe(wt.type)}'.`);Z&&(at.type.kind==="value"&&wt.type.kind!=="value"?at=new ji(wt.type,[at]):at.type.kind!=="value"&&wt.type.kind==="value"&&(wt=new ji(at.type,[wt])));let Ht=null;if(pe.length===4){if(at.type.kind!=="string"&&wt.type.kind!=="string"&&at.type.kind!=="value"&&wt.type.kind!=="value")return xe.error("Cannot use collator to compare non-string types.");if(Ht=xe.parse(pe[3],3,Kt),!Ht)return null}return new bGe(at,wt,Ht)}evaluate(pe){let xe=this.lhs.evaluate(pe),He=this.rhs.evaluate(pe);if(Z&&this.hasUntypedArgument){let at=Yr(xe),wt=Yr(He);if(at.kind!==wt.kind||at.kind!=="string"&&at.kind!=="number")throw new ti(`Expected arguments for "${I}" to be (string, string) or (number, number), but found (${at.kind}, ${wt.kind}) instead.`)}if(this.collator&&!Z&&this.hasUntypedArgument){let at=Yr(xe),wt=Yr(He);if(at.kind!=="string"||wt.kind!=="string")return S(pe,xe,He)}return this.collator?D(pe,xe,He,this.collator.evaluate(pe)):S(pe,xe,He)}eachChild(pe){pe(this.lhs),pe(this.rhs),this.collator&&pe(this.collator)}outputDefined(){return!0}}}let Zn=un("==",function(I,S,D){return S===D},Dn),Wo=un("!=",function(I,S,D){return S!==D},function(I,S,D,Z){return!Dn(0,S,D,Z)}),Ba=un("<",function(I,S,D){return S",function(I,S,D){return S>D},function(I,S,D,Z){return Z.compare(S,D)>0}),Ea=un("<=",function(I,S,D){return S<=D},function(I,S,D,Z){return Z.compare(S,D)<=0}),Ha=un(">=",function(I,S,D){return S>=D},function(I,S,D,Z){return Z.compare(S,D)>=0});class tn{constructor(S,D,Z){this.type=Kt,this.locale=Z,this.caseSensitive=S,this.diacriticSensitive=D}static parse(S,D){if(S.length!==2)return D.error("Expected one argument.");let Z=S[1];if(typeof Z!="object"||Array.isArray(Z))return D.error("Collator options argument must be an object.");let ie=D.parse(Z["case-sensitive"]!==void 0&&Z["case-sensitive"],1,tt);if(!ie)return null;let pe=D.parse(Z["diacritic-sensitive"]!==void 0&&Z["diacritic-sensitive"],1,tt);if(!pe)return null;let xe=null;return Z.locale&&(xe=D.parse(Z.locale,1,je),!xe)?null:new tn(ie,pe,xe)}evaluate(S){return new sr(this.caseSensitive.evaluate(S),this.diacriticSensitive.evaluate(S),this.locale?this.locale.evaluate(S):null)}eachChild(S){S(this.caseSensitive),S(this.diacriticSensitive),this.locale&&S(this.locale)}outputDefined(){return!1}}class Cn{constructor(S,D,Z,ie,pe){this.type=je,this.number=S,this.locale=D,this.currency=Z,this.minFractionDigits=ie,this.maxFractionDigits=pe}static parse(S,D){if(S.length!==3)return D.error("Expected two arguments.");let Z=D.parse(S[1],1,rt);if(!Z)return null;let ie=S[2];if(typeof ie!="object"||Array.isArray(ie))return D.error("NumberFormat options argument must be an object.");let pe=null;if(ie.locale&&(pe=D.parse(ie.locale,1,je),!pe))return null;let xe=null;if(ie.currency&&(xe=D.parse(ie.currency,1,je),!xe))return null;let He=null;if(ie["min-fraction-digits"]&&(He=D.parse(ie["min-fraction-digits"],1,rt),!He))return null;let at=null;return ie["max-fraction-digits"]&&(at=D.parse(ie["max-fraction-digits"],1,rt),!at)?null:new Cn(Z,pe,xe,He,at)}evaluate(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))}eachChild(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)}outputDefined(){return!1}}class Xn{constructor(S){this.type=ir,this.sections=S}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return D.error("First argument must be an image or text section.");let ie=[],pe=!1;for(let xe=1;xe<=S.length-1;++xe){let He=S[xe];if(pe&&typeof He=="object"&&!Array.isArray(He)){pe=!1;let at=null;if(He["font-scale"]&&(at=D.parse(He["font-scale"],1,rt),!at))return null;let wt=null;if(He["text-font"]&&(wt=D.parse(He["text-font"],1,_e(je)),!wt))return null;let Ht=null;if(He["text-color"]&&(Ht=D.parse(He["text-color"],1,Je),!Ht))return null;let rr=ie[ie.length-1];rr.scale=at,rr.font=wt,rr.textColor=Ht}else{let at=D.parse(S[xe],1,Vt);if(!at)return null;let wt=at.type.kind;if(wt!=="string"&&wt!=="value"&&wt!=="null"&&wt!=="resolvedImage")return D.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");pe=!0,ie.push({content:at,scale:null,font:null,textColor:null})}}return new Xn(ie)}evaluate(S){return new zr(this.sections.map(D=>{let Z=D.content.evaluate(S);return Yr(Z)===Ot?new br("",Z,null,null,null):new br(Ni(Z),null,D.scale?D.scale.evaluate(S):null,D.font?D.font.evaluate(S).join(","):null,D.textColor?D.textColor.evaluate(S):null)}))}eachChild(S){for(let D of this.sections)S(D.content),D.scale&&S(D.scale),D.font&&S(D.font),D.textColor&&S(D.textColor)}outputDefined(){return!1}}class ts{constructor(S){this.type=Ot,this.input=S}static parse(S,D){if(S.length!==2)return D.error("Expected two arguments.");let Z=D.parse(S[1],1,je);return Z?new ts(Z):D.error("No image name provided.")}evaluate(S){let D=this.input.evaluate(S),Z=oi.fromString(D);return Z&&S.availableImages&&(Z.available=S.availableImages.indexOf(D)>-1),Z}eachChild(S){S(this.input)}outputDefined(){return!1}}class Ja{constructor(S){this.type=rt,this.input=S}static parse(S,D){if(S.length!==2)return D.error(`Expected 1 argument, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?D.error(`Expected argument of type string or array, but found ${Fe(Z.type)} instead.`):new Ja(Z):null}evaluate(S){let D=this.input.evaluate(S);if(typeof D=="string")return[...D].length;if(Array.isArray(D))return D.length;throw new ti(`Expected value to be of type string or array, but found ${Fe(Yr(D))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let to=8192;function Ri(I,S){let D=(180+I[0])/360,Z=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I[1]*Math.PI/360)))/360,ie=Math.pow(2,S.z);return[Math.round(D*ie*to),Math.round(Z*ie*to)]}function an(I,S){let D=Math.pow(2,S.z);return[(ie=(I[0]/to+S.x)/D,360*ie-180),(Z=(I[1]/to+S.y)/D,360/Math.PI*Math.atan(Math.exp((180-360*Z)*Math.PI/180))-90)];var Z,ie}function cs(I,S){I[0]=Math.min(I[0],S[0]),I[1]=Math.min(I[1],S[1]),I[2]=Math.max(I[2],S[0]),I[3]=Math.max(I[3],S[1])}function pa(I,S){return!(I[0]<=S[0]||I[2]>=S[2]||I[1]<=S[1]||I[3]>=S[3])}function ln(I,S,D){let Z=I[0]-S[0],ie=I[1]-S[1],pe=I[0]-D[0],xe=I[1]-D[1];return Z*xe-pe*ie==0&&Z*pe<=0&&ie*xe<=0}function ka(I,S,D,Z){return(ie=[Z[0]-D[0],Z[1]-D[1]])[0]*(pe=[S[0]-I[0],S[1]-I[1]])[1]-ie[1]*pe[0]!=0&&!(!xa(I,S,D,Z)||!xa(D,Z,I,S));var ie,pe}function va(I,S,D){for(let Z of D)for(let ie=0;ie(ie=I)[1]!=(xe=He[at+1])[1]>ie[1]&&ie[0]<(xe[0]-pe[0])*(ie[1]-pe[1])/(xe[1]-pe[1])+pe[0]&&(Z=!Z)}var ie,pe,xe;return Z}function Co(I,S){for(let D of S)if(bo(I,D))return!0;return!1}function Fi(I,S){for(let D of I)if(!bo(D,S))return!1;for(let D=0;D0&&He<0||xe<0&&He>0}function Qi(I,S,D){let Z=[];for(let ie=0;ieD[2]){let ie=.5*Z,pe=I[0]-D[0]>ie?-Z:D[0]-I[0]>ie?Z:0;pe===0&&(pe=I[0]-D[2]>ie?-Z:D[2]-I[0]>ie?Z:0),I[0]+=pe}cs(S,I)}function qa(I,S,D,Z){let ie=Math.pow(2,Z.z)*to,pe=[Z.x*to,Z.y*to],xe=[];for(let He of I)for(let at of He){let wt=[at.x+pe[0],at.y+pe[1]];Pn(wt,S,D,ie),xe.push(wt)}return xe}function jo(I,S,D,Z){let ie=Math.pow(2,Z.z)*to,pe=[Z.x*to,Z.y*to],xe=[];for(let at of I){let wt=[];for(let Ht of at){let rr=[Ht.x+pe[0],Ht.y+pe[1]];cs(S,rr),wt.push(rr)}xe.push(wt)}if(S[2]-S[0]<=ie/2){(He=S)[0]=He[1]=1/0,He[2]=He[3]=-1/0;for(let at of xe)for(let wt of at)Pn(wt,S,D,ie)}var He;return xe}class Vo{constructor(S,D){this.type=tt,this.geojson=S,this.geometries=D}static parse(S,D){if(S.length!==2)return D.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Pi(S[1])){let Z=S[1];if(Z.type==="FeatureCollection"){let ie=[];for(let pe of Z.features){let{type:xe,coordinates:He}=pe.geometry;xe==="Polygon"&&ie.push(He),xe==="MultiPolygon"&&ie.push(...He)}if(ie.length)return new Vo(Z,{type:"MultiPolygon",coordinates:ie})}else if(Z.type==="Feature"){let ie=Z.geometry.type;if(ie==="Polygon"||ie==="MultiPolygon")return new Vo(Z,Z.geometry)}else if(Z.type==="Polygon"||Z.type==="MultiPolygon")return new Vo(Z,Z)}return D.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(D,Z){let ie=[1/0,1/0,-1/0,-1/0],pe=[1/0,1/0,-1/0,-1/0],xe=D.canonicalID();if(Z.type==="Polygon"){let He=Qi(Z.coordinates,pe,xe),at=qa(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!bo(wt,He))return!1}if(Z.type==="MultiPolygon"){let He=Nn(Z.coordinates,pe,xe),at=qa(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Co(wt,He))return!1}return!0}(S,this.geometries);if(S.geometryType()==="LineString")return function(D,Z){let ie=[1/0,1/0,-1/0,-1/0],pe=[1/0,1/0,-1/0,-1/0],xe=D.canonicalID();if(Z.type==="Polygon"){let He=Qi(Z.coordinates,pe,xe),at=jo(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Fi(wt,He))return!1}if(Z.type==="MultiPolygon"){let He=Nn(Z.coordinates,pe,xe),at=jo(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Yn(wt,He))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Pa=class{constructor(I=[],S=(D,Z)=>DZ?1:0){if(this.data=I,this.length=this.data.length,this.compare=S,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(I){this.data.push(I),this._up(this.length++)}pop(){if(this.length===0)return;let I=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),I}peek(){return this.data[0]}_up(I){let{data:S,compare:D}=this,Z=S[I];for(;I>0;){let ie=I-1>>1,pe=S[ie];if(D(Z,pe)>=0)break;S[I]=pe,I=ie}S[I]=Z}_down(I){let{data:S,compare:D}=this,Z=this.length>>1,ie=S[I];for(;I=0)break;S[I]=S[pe],I=pe}S[I]=ie}};function Oa(I,S,D,Z,ie){co(I,S,D,Z||I.length-1,ie||_o)}function co(I,S,D,Z,ie){for(;Z>D;){if(Z-D>600){var pe=Z-D+1,xe=S-D+1,He=Math.log(pe),at=.5*Math.exp(2*He/3),wt=.5*Math.sqrt(He*at*(pe-at)/pe)*(xe-pe/2<0?-1:1);co(I,S,Math.max(D,Math.floor(S-xe*at/pe+wt)),Math.min(Z,Math.floor(S+(pe-xe)*at/pe+wt)),ie)}var Ht=I[S],rr=D,pr=Z;for(An(I,D,S),ie(I[Z],Ht)>0&&An(I,D,Z);rr0;)pr--}ie(I[D],Ht)===0?An(I,D,pr):An(I,++pr,Z),pr<=S&&(D=pr+1),S<=pr&&(Z=pr-1)}}function An(I,S,D){var Z=I[S];I[S]=I[D],I[D]=Z}function _o(I,S){return IS?1:0}function ks(I,S){if(I.length<=1)return[I];let D=[],Z,ie;for(let pe of I){let xe=ps(pe);xe!==0&&(pe.area=Math.abs(xe),ie===void 0&&(ie=xe<0),ie===xe<0?(Z&&D.push(Z),Z=[pe]):Z.push(pe))}if(Z&&D.push(Z),S>1)for(let pe=0;pe1?(wt=S[at+1][0],Ht=S[at+1][1]):Ar>0&&(wt+=rr/this.kx*Ar,Ht+=pr/this.ky*Ar)),rr=this.wrap(D[0]-wt)*this.kx,pr=(D[1]-Ht)*this.ky;let Vr=rr*rr+pr*pr;Vr180;)S-=360;return S}}function on(I,S){return S[0]-I[0]}function mn(I){return I[1]-I[0]+1}function Ga(I,S){return I[1]>=I[0]&&I[1]I[1])return[null,null];let D=mn(I);if(S){if(D===2)return[I,null];let ie=Math.floor(D/2);return[[I[0],I[0]+ie],[I[0]+ie,I[1]]]}if(D===1)return[I,null];let Z=Math.floor(D/2)-1;return[[I[0],I[0]+Z],[I[0]+Z+1,I[1]]]}function bn(I,S){if(!Ga(S,I.length))return[1/0,1/0,-1/0,-1/0];let D=[1/0,1/0,-1/0,-1/0];for(let Z=S[0];Z<=S[1];++Z)cs(D,I[Z]);return D}function Xi(I){let S=[1/0,1/0,-1/0,-1/0];for(let D of I)for(let Z of D)cs(S,Z);return S}function qn(I){return I[0]!==-1/0&&I[1]!==-1/0&&I[2]!==1/0&&I[3]!==1/0}function Ia(I,S,D){if(!qn(I)||!qn(S))return NaN;let Z=0,ie=0;return I[2]S[2]&&(Z=I[0]-S[2]),I[1]>S[3]&&(ie=I[1]-S[3]),I[3]=Z)return Z;if(pa(ie,pe)){if(wo(I,S))return 0}else if(wo(S,I))return 0;let xe=1/0;for(let He of I)for(let at=0,wt=He.length,Ht=wt-1;at0;){let at=xe.pop();if(at[0]>=pe)continue;let wt=at[1],Ht=S?50:100;if(mn(wt)<=Ht){if(!Ga(wt,I.length))return NaN;if(S){let rr=Ln(I,wt,D,Z);if(isNaN(rr)||rr===0)return rr;pe=Math.min(pe,rr)}else for(let rr=wt[0];rr<=wt[1];++rr){let pr=Aa(I[rr],D,Z);if(pe=Math.min(pe,pr),pe===0)return 0}}else{let rr=ca(wt,S);$i(xe,pe,Z,I,He,rr[0]),$i(xe,pe,Z,I,He,rr[1])}}return pe}function Za(I,S,D,Z,ie,pe=1/0){let xe=Math.min(pe,ie.distance(I[0],D[0]));if(xe===0)return xe;let He=new Pa([[0,[0,I.length-1],[0,D.length-1]]],on);for(;He.length>0;){let at=He.pop();if(at[0]>=xe)continue;let wt=at[1],Ht=at[2],rr=S?50:100,pr=Z?50:100;if(mn(wt)<=rr&&mn(Ht)<=pr){if(!Ga(wt,I.length)&&Ga(Ht,D.length))return NaN;let Ar;if(S&&Z)Ar=ba(I,wt,D,Ht,ie),xe=Math.min(xe,Ar);else if(S&&!Z){let Vr=I.slice(wt[0],wt[1]+1);for(let ri=Ht[0];ri<=Ht[1];++ri)if(Ar=yn(D[ri],Vr,ie),xe=Math.min(xe,Ar),xe===0)return xe}else if(!S&&Z){let Vr=D.slice(Ht[0],Ht[1]+1);for(let ri=wt[0];ri<=wt[1];++ri)if(Ar=yn(I[ri],Vr,ie),xe=Math.min(xe,Ar),xe===0)return xe}else Ar=Da(I,wt,D,Ht,ie),xe=Math.min(xe,Ar)}else{let Ar=ca(wt,S),Vr=ca(Ht,Z);ea(He,xe,ie,I,D,Ar[0],Vr[0]),ea(He,xe,ie,I,D,Ar[0],Vr[1]),ea(He,xe,ie,I,D,Ar[1],Vr[0]),ea(He,xe,ie,I,D,Ar[1],Vr[1])}}return xe}function xo(I){return I.type==="MultiPolygon"?I.coordinates.map(S=>({type:"Polygon",coordinates:S})):I.type==="MultiLineString"?I.coordinates.map(S=>({type:"LineString",coordinates:S})):I.type==="MultiPoint"?I.coordinates.map(S=>({type:"Point",coordinates:S})):[I]}class Wa{constructor(S,D){this.type=rt,this.geojson=S,this.geometries=D}static parse(S,D){if(S.length!==2)return D.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Pi(S[1])){let Z=S[1];if(Z.type==="FeatureCollection")return new Wa(Z,Z.features.map(ie=>xo(ie.geometry)).flat());if(Z.type==="Feature")return new Wa(Z,xo(Z.geometry));if("type"in Z&&"coordinates"in Z)return new Wa(Z,xo(Z))}return D.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(D,Z){let ie=D.geometry(),pe=ie.flat().map(at=>an([at.x,at.y],D.canonical));if(ie.length===0)return NaN;let xe=new ya(pe[0][1]),He=1/0;for(let at of Z){switch(at.type){case"Point":He=Math.min(He,Za(pe,!1,[at.coordinates],!1,xe,He));break;case"LineString":He=Math.min(He,Za(pe,!1,at.coordinates,!0,xe,He));break;case"Polygon":He=Math.min(He,Sa(pe,!1,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries);if(S.geometryType()==="LineString")return function(D,Z){let ie=D.geometry(),pe=ie.flat().map(at=>an([at.x,at.y],D.canonical));if(ie.length===0)return NaN;let xe=new ya(pe[0][1]),He=1/0;for(let at of Z){switch(at.type){case"Point":He=Math.min(He,Za(pe,!0,[at.coordinates],!1,xe,He));break;case"LineString":He=Math.min(He,Za(pe,!0,at.coordinates,!0,xe,He));break;case"Polygon":He=Math.min(He,Sa(pe,!0,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries);if(S.geometryType()==="Polygon")return function(D,Z){let ie=D.geometry();if(ie.length===0||ie[0].length===0)return NaN;let pe=ks(ie,0).map(at=>at.map(wt=>wt.map(Ht=>an([Ht.x,Ht.y],D.canonical)))),xe=new ya(pe[0][0][0][1]),He=1/0;for(let at of Z)for(let wt of pe){switch(at.type){case"Point":He=Math.min(He,Sa([at.coordinates],!1,wt,xe,He));break;case"LineString":He=Math.min(He,Sa(at.coordinates,!0,wt,xe,He));break;case"Polygon":He=Math.min(He,wa(wt,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let hn={"==":Zn,"!=":Wo,">":Bo,"<":Ba,">=":Ha,"<=":Ea,array:ji,at:Wt,boolean:ji,case:hi,coalesce:na,collator:tn,format:Xn,image:ts,in:tr,"index-of":or,interpolate:za,"interpolate-hcl":za,"interpolate-lab":za,length:Ja,let:Or,literal:Ur,match:Nr,number:ji,"number-format":Cn,object:ji,slice:Gi,step:Ui,string:ji,"to-boolean":zi,"to-color":zi,"to-number":zi,"to-string":zi,var:st,within:Vo,distance:Wa};class Un{constructor(S,D,Z,ie){this.name=S,this.type=D,this._evaluate=Z,this.args=ie}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,D){let Z=S[0],ie=Un.definitions[Z];if(!ie)return D.error(`Unknown expression "${Z}". If you wanted a literal array, use ["literal", [...]].`,0);let pe=Array.isArray(ie)?ie[0]:ie.type,xe=Array.isArray(ie)?[[ie[1],ie[2]]]:ie.overloads,He=xe.filter(([wt])=>!Array.isArray(wt)||wt.length===S.length-1),at=null;for(let[wt,Ht]of He){at=new fi(D.registry,vo,D.path,null,D.scope);let rr=[],pr=!1;for(let Ar=1;Ar{return pr=rr,Array.isArray(pr)?`(${pr.map(Fe).join(", ")})`:`(${Fe(pr.type)}...)`;var pr}).join(" | "),Ht=[];for(let rr=1;rr{D=S?D&&vo(Z):D&&Z instanceof Ur}),!!D&&ma(I)&&To(I,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ma(I){if(I instanceof Un&&(I.name==="get"&&I.args.length===1||I.name==="feature-state"||I.name==="has"&&I.args.length===1||I.name==="properties"||I.name==="geometry-type"||I.name==="id"||/^filter-/.test(I.name))||I instanceof Vo||I instanceof Wa)return!1;let S=!0;return I.eachChild(D=>{S&&!ma(D)&&(S=!1)}),S}function ja(I){if(I instanceof Un&&I.name==="feature-state")return!1;let S=!0;return I.eachChild(D=>{S&&!ja(D)&&(S=!1)}),S}function To(I,S){if(I instanceof Un&&S.indexOf(I.name)>=0)return!1;let D=!0;return I.eachChild(Z=>{D&&!To(Z,S)&&(D=!1)}),D}function Ao(I){return{result:"success",value:I}}function la(I){return{result:"error",value:I}}function Ki(I){return I["property-type"]==="data-driven"||I["property-type"]==="cross-faded-data-driven"}function ho(I){return!!I.expression&&I.expression.parameters.indexOf("zoom")>-1}function Ka(I){return!!I.expression&&I.expression.interpolated}function Ca(I){return I instanceof Number?"number":I instanceof String?"string":I instanceof Boolean?"boolean":Array.isArray(I)?"array":I===null?"null":typeof I}function ta(I){return typeof I=="object"&&I!==null&&!Array.isArray(I)}function En(I){return I}function Mo(I,S){let D=S.type==="color",Z=I.stops&&typeof I.stops[0][0]=="object",ie=Z||!(Z||I.property!==void 0),pe=I.type||(Ka(S)?"exponential":"interval");if(D||S.type==="padding"){let Ht=D?Bt.parse:Tr.parse;(I=Te({},I)).stops&&(I.stops=I.stops.map(rr=>[rr[0],Ht(rr[1])])),I.default=Ht(I.default?I.default:S.default)}if(I.colorSpace&&(xe=I.colorSpace)!=="rgb"&&xe!=="hcl"&&xe!=="lab")throw new Error(`Unknown color space: "${I.colorSpace}"`);var xe;let He,at,wt;if(pe==="exponential")He=Ks;else if(pe==="interval")He=vs;else if(pe==="categorical"){He=Ro,at=Object.create(null);for(let Ht of I.stops)at[Ht[0]]=Ht[1];wt=typeof I.stops[0][0]}else{if(pe!=="identity")throw new Error(`Unknown function type "${pe}"`);He=as}if(Z){let Ht={},rr=[];for(let Vr=0;VrVr[0]),evaluate:({zoom:Vr},ri)=>Ks({stops:pr,base:I.base},S,Vr).evaluate(Vr,ri)}}if(ie){let Ht=pe==="exponential"?{name:"exponential",base:I.base!==void 0?I.base:1}:null;return{kind:"camera",interpolationType:Ht,interpolationFactor:za.interpolationFactor.bind(void 0,Ht),zoomStops:I.stops.map(rr=>rr[0]),evaluate:({zoom:rr})=>He(I,S,rr,at,wt)}}return{kind:"source",evaluate(Ht,rr){let pr=rr&&rr.properties?rr.properties[I.property]:void 0;return pr===void 0?Ds(I.default,S.default):He(I,S,pr,at,wt)}}}function Ds(I,S,D){return I!==void 0?I:S!==void 0?S:D!==void 0?D:void 0}function Ro(I,S,D,Z,ie){return Ds(typeof D===ie?Z[D]:void 0,I.default,S.default)}function vs(I,S,D){if(Ca(D)!=="number")return Ds(I.default,S.default);let Z=I.stops.length;if(Z===1||D<=I.stops[0][0])return I.stops[0][1];if(D>=I.stops[Z-1][0])return I.stops[Z-1][1];let ie=Qr(I.stops.map(pe=>pe[0]),D);return I.stops[ie][1]}function Ks(I,S,D){let Z=I.base!==void 0?I.base:1;if(Ca(D)!=="number")return Ds(I.default,S.default);let ie=I.stops.length;if(ie===1||D<=I.stops[0][0])return I.stops[0][1];if(D>=I.stops[ie-1][0])return I.stops[ie-1][1];let pe=Qr(I.stops.map(Ht=>Ht[0]),D),xe=function(Ht,rr,pr,Ar){let Vr=Ar-pr,ri=Ht-pr;return Vr===0?0:rr===1?ri/Vr:(Math.pow(rr,ri)-1)/(Math.pow(rr,Vr)-1)}(D,Z,I.stops[pe][0],I.stops[pe+1][0]),He=I.stops[pe][1],at=I.stops[pe+1][1],wt=ia[S.type]||En;return typeof He.evaluate=="function"?{evaluate(...Ht){let rr=He.evaluate.apply(void 0,Ht),pr=at.evaluate.apply(void 0,Ht);if(rr!==void 0&&pr!==void 0)return wt(rr,pr,xe,I.colorSpace)}}:wt(He,at,xe,I.colorSpace)}function as(I,S,D){switch(S.type){case"color":D=Bt.parse(D);break;case"formatted":D=zr.fromString(D.toString());break;case"resolvedImage":D=oi.fromString(D.toString());break;case"padding":D=Tr.parse(D);break;default:Ca(D)===S.type||S.type==="enum"&&S.values[D]||(D=void 0)}return Ds(D,I.default,S.default)}Un.register(hn,{error:[{kind:"error"},[je],(I,[S])=>{throw new ti(S.evaluate(I))}],typeof:[je,[Vt],(I,[S])=>Fe(Yr(S.evaluate(I)))],"to-rgba":[_e(rt,4),[Je],(I,[S])=>{let[D,Z,ie,pe]=S.evaluate(I).rgb;return[255*D,255*Z,255*ie,pe]}],rgb:[Je,[rt,rt,rt],Ss],rgba:[Je,[rt,rt,rt,rt],Ss],has:{type:tt,overloads:[[[je],(I,[S])=>Kn(S.evaluate(I),I.properties())],[[je,Mt],(I,[S,D])=>Kn(S.evaluate(I),D.evaluate(I))]]},get:{type:Vt,overloads:[[[je],(I,[S])=>ns(S.evaluate(I),I.properties())],[[je,Mt],(I,[S,D])=>ns(S.evaluate(I),D.evaluate(I))]]},"feature-state":[Vt,[je],(I,[S])=>ns(S.evaluate(I),I.featureState||{})],properties:[Mt,[],I=>I.properties()],"geometry-type":[je,[],I=>I.geometryType()],id:[Vt,[],I=>I.id()],zoom:[rt,[],I=>I.globals.zoom],"heatmap-density":[rt,[],I=>I.globals.heatmapDensity||0],"line-progress":[rt,[],I=>I.globals.lineProgress||0],accumulated:[Vt,[],I=>I.globals.accumulated===void 0?null:I.globals.accumulated],"+":[rt,Jo(rt),(I,S)=>{let D=0;for(let Z of S)D+=Z.evaluate(I);return D}],"*":[rt,Jo(rt),(I,S)=>{let D=1;for(let Z of S)D*=Z.evaluate(I);return D}],"-":{type:rt,overloads:[[[rt,rt],(I,[S,D])=>S.evaluate(I)-D.evaluate(I)],[[rt],(I,[S])=>-S.evaluate(I)]]},"/":[rt,[rt,rt],(I,[S,D])=>S.evaluate(I)/D.evaluate(I)],"%":[rt,[rt,rt],(I,[S,D])=>S.evaluate(I)%D.evaluate(I)],ln2:[rt,[],()=>Math.LN2],pi:[rt,[],()=>Math.PI],e:[rt,[],()=>Math.E],"^":[rt,[rt,rt],(I,[S,D])=>Math.pow(S.evaluate(I),D.evaluate(I))],sqrt:[rt,[rt],(I,[S])=>Math.sqrt(S.evaluate(I))],log10:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))/Math.LN10],ln:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))],log2:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))/Math.LN2],sin:[rt,[rt],(I,[S])=>Math.sin(S.evaluate(I))],cos:[rt,[rt],(I,[S])=>Math.cos(S.evaluate(I))],tan:[rt,[rt],(I,[S])=>Math.tan(S.evaluate(I))],asin:[rt,[rt],(I,[S])=>Math.asin(S.evaluate(I))],acos:[rt,[rt],(I,[S])=>Math.acos(S.evaluate(I))],atan:[rt,[rt],(I,[S])=>Math.atan(S.evaluate(I))],min:[rt,Jo(rt),(I,S)=>Math.min(...S.map(D=>D.evaluate(I)))],max:[rt,Jo(rt),(I,S)=>Math.max(...S.map(D=>D.evaluate(I)))],abs:[rt,[rt],(I,[S])=>Math.abs(S.evaluate(I))],round:[rt,[rt],(I,[S])=>{let D=S.evaluate(I);return D<0?-Math.round(-D):Math.round(D)}],floor:[rt,[rt],(I,[S])=>Math.floor(S.evaluate(I))],ceil:[rt,[rt],(I,[S])=>Math.ceil(S.evaluate(I))],"filter-==":[tt,[je,Vt],(I,[S,D])=>I.properties()[S.value]===D.value],"filter-id-==":[tt,[Vt],(I,[S])=>I.id()===S.value],"filter-type-==":[tt,[je],(I,[S])=>I.geometryType()===S.value],"filter-<":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z>ie}],"filter-id->":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D>Z}],"filter-<=":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z<=ie}],"filter-id-<=":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D<=Z}],"filter->=":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z>=ie}],"filter-id->=":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D>=Z}],"filter-has":[tt,[Vt],(I,[S])=>S.value in I.properties()],"filter-has-id":[tt,[],I=>I.id()!==null&&I.id()!==void 0],"filter-type-in":[tt,[_e(je)],(I,[S])=>S.value.indexOf(I.geometryType())>=0],"filter-id-in":[tt,[_e(Vt)],(I,[S])=>S.value.indexOf(I.id())>=0],"filter-in-small":[tt,[je,_e(Vt)],(I,[S,D])=>D.value.indexOf(I.properties()[S.value])>=0],"filter-in-large":[tt,[je,_e(Vt)],(I,[S,D])=>function(Z,ie,pe,xe){for(;pe<=xe;){let He=pe+xe>>1;if(ie[He]===Z)return!0;ie[He]>Z?xe=He-1:pe=He+1}return!1}(I.properties()[S.value],D.value,0,D.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(I,[S,D])=>S.evaluate(I)&&D.evaluate(I)],[Jo(tt),(I,S)=>{for(let D of S)if(!D.evaluate(I))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(I,[S,D])=>S.evaluate(I)||D.evaluate(I)],[Jo(tt),(I,S)=>{for(let D of S)if(D.evaluate(I))return!0;return!1}]]},"!":[tt,[tt],(I,[S])=>!S.evaluate(I)],"is-supported-script":[tt,[je],(I,[S])=>{let D=I.globals&&I.globals.isSupportedScript;return!D||D(S.evaluate(I))}],upcase:[je,[je],(I,[S])=>S.evaluate(I).toUpperCase()],downcase:[je,[je],(I,[S])=>S.evaluate(I).toLowerCase()],concat:[je,Jo(Vt),(I,S)=>S.map(D=>Ni(D.evaluate(I))).join("")],"resolved-locale":[je,[Kt],(I,[S])=>S.evaluate(I).resolvedLocale()]});class Jn{constructor(S,D){var Z;this.expression=S,this._warningHistory={},this._evaluator=new sn,this._defaultValue=D?(Z=D).type==="color"&&ta(Z.default)?new Bt(0,0,0,0):Z.type==="color"?Bt.parse(Z.default)||null:Z.type==="padding"?Tr.parse(Z.default)||null:Z.type==="variableAnchorOffsetCollection"?Br.parse(Z.default)||null:Z.default===void 0?null:Z.default:null,this._enumValues=D&&D.type==="enum"?D.values:null}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._evaluator.globals=S,this._evaluator.feature=D,this._evaluator.featureState=Z,this._evaluator.canonical=ie,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe,this.expression.evaluate(this._evaluator)}evaluate(S,D,Z,ie,pe,xe){this._evaluator.globals=S,this._evaluator.feature=D||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=ie,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe||null;try{let He=this.expression.evaluate(this._evaluator);if(He==null||typeof He=="number"&&He!=He)return this._defaultValue;if(this._enumValues&&!(He in this._enumValues))throw new ti(`Expected value to be one of ${Object.keys(this._enumValues).map(at=>JSON.stringify(at)).join(", ")}, but found ${JSON.stringify(He)} instead.`);return He}catch(He){return this._warningHistory[He.message]||(this._warningHistory[He.message]=!0,typeof console!="undefined"&&console.warn(He.message)),this._defaultValue}}}function Cs(I){return Array.isArray(I)&&I.length>0&&typeof I[0]=="string"&&I[0]in hn}function Xa(I,S){let D=new fi(hn,vo,[],S?function(ie){let pe={color:Je,string:je,number:rt,enum:je,boolean:tt,formatted:ir,padding:fr,resolvedImage:Ot,variableAnchorOffsetCollection:De};return ie.type==="array"?_e(pe[ie.value]||Vt,ie.length):pe[ie.type]}(S):void 0),Z=D.parse(I,void 0,void 0,void 0,S&&S.type==="string"?{typeAnnotation:"coerce"}:void 0);return Z?Ao(new Jn(Z,S)):la(D.errors)}class Zo{constructor(S,D){this.kind=S,this._styleExpression=D,this.isStateDependent=S!=="constant"&&!ja(D.expression)}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe)}evaluate(S,D,Z,ie,pe,xe){return this._styleExpression.evaluate(S,D,Z,ie,pe,xe)}}class Eo{constructor(S,D,Z,ie){this.kind=S,this.zoomStops=Z,this._styleExpression=D,this.isStateDependent=S!=="camera"&&!ja(D.expression),this.interpolationType=ie}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe)}evaluate(S,D,Z,ie,pe,xe){return this._styleExpression.evaluate(S,D,Z,ie,pe,xe)}interpolationFactor(S,D,Z){return this.interpolationType?za.interpolationFactor(this.interpolationType,S,D,Z):0}}function lo(I,S){let D=Xa(I,S);if(D.result==="error")return D;let Z=D.value.expression,ie=ma(Z);if(!ie&&!Ki(S))return la([new nt("","data expressions not supported")]);let pe=To(Z,["zoom"]);if(!pe&&!ho(S))return la([new nt("","zoom expressions not supported")]);let xe=Xo(Z);return xe||pe?xe instanceof nt?la([xe]):xe instanceof za&&!Ka(S)?la([new nt("",'"interpolate" expressions cannot be used with this property')]):Ao(xe?new Eo(ie?"camera":"composite",D.value,xe.labels,xe instanceof za?xe.interpolation:void 0):new Zo(ie?"constant":"source",D.value)):la([new nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class $a{constructor(S,D){this._parameters=S,this._specification=D,Te(this,Mo(this._parameters,this._specification))}static deserialize(S){return new $a(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function Xo(I){let S=null;if(I instanceof Or)S=Xo(I.result);else if(I instanceof na){for(let D of I.args)if(S=Xo(D),S)break}else(I instanceof Ui||I instanceof za)&&I.input instanceof Un&&I.input.name==="zoom"&&(S=I);return S instanceof nt||I.eachChild(D=>{let Z=Xo(D);Z instanceof nt?S=Z:!S&&Z?S=new nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):S&&Z&&S!==Z&&(S=new nt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),S}function rs(I){if(I===!0||I===!1)return!0;if(!Array.isArray(I)||I.length===0)return!1;switch(I[0]){case"has":return I.length>=2&&I[1]!=="$id"&&I[1]!=="$type";case"in":return I.length>=3&&(typeof I[1]!="string"||Array.isArray(I[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return I.length!==3||Array.isArray(I[1])||Array.isArray(I[2]);case"any":case"all":for(let S of I.slice(1))if(!rs(S)&&typeof S!="boolean")return!1;return!0;default:return!0}}let $n={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Sn(I){if(I==null)return{filter:()=>!0,needGeometry:!1};rs(I)||(I=xs(I));let S=Xa(I,$n);if(S.result==="error")throw new Error(S.value.map(D=>`${D.key}: ${D.message}`).join(", "));return{filter:(D,Z,ie)=>S.value.evaluate(D,Z,{},ie),needGeometry:Rs(I)}}function uo(I,S){return IS?1:0}function Rs(I){if(!Array.isArray(I))return!1;if(I[0]==="within"||I[0]==="distance")return!0;for(let S=1;S"||S==="<="||S===">="?Go(I[1],I[2],S):S==="any"?(D=I.slice(1),["any"].concat(D.map(xs))):S==="all"?["all"].concat(I.slice(1).map(xs)):S==="none"?["all"].concat(I.slice(1).map(xs).map(Qn)):S==="in"?os(I[1],I.slice(2)):S==="!in"?Qn(os(I[1],I.slice(2))):S==="has"?So(I[1]):S!=="!has"||Qn(So(I[1]));var D}function Go(I,S,D){switch(I){case"$type":return[`filter-type-${D}`,S];case"$id":return[`filter-id-${D}`,S];default:return[`filter-${D}`,I,S]}}function os(I,S){if(S.length===0)return!1;switch(I){case"$type":return["filter-type-in",["literal",S]];case"$id":return["filter-id-in",["literal",S]];default:return S.length>200&&!S.some(D=>typeof D!=typeof S[0])?["filter-in-large",I,["literal",S.sort(uo)]]:["filter-in-small",I,["literal",S]]}}function So(I){switch(I){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",I]}}function Qn(I){return["!",I]}function zo(I){let S=typeof I;if(S==="number"||S==="boolean"||S==="string"||I==null)return JSON.stringify(I);if(Array.isArray(I)){let ie="[";for(let pe of I)ie+=`${zo(pe)},`;return`${ie}]`}let D=Object.keys(I).sort(),Z="{";for(let ie=0;ieZ.maximum?[new At(S,D,`${D} is greater than the maximum value ${Z.maximum}`)]:[]}function Ma(I){let S=I.valueSpec,D=Na(I.value.type),Z,ie,pe,xe={},He=D!=="categorical"&&I.value.property===void 0,at=!He,wt=Ca(I.value.stops)==="array"&&Ca(I.value.stops[0])==="array"&&Ca(I.value.stops[0][0])==="object",Ht=Po({key:I.key,value:I.value,valueSpec:I.styleSpec.function,validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{stops:function(Ar){if(D==="identity")return[new At(Ar.key,Ar.value,'identity function may not have a "stops" property')];let Vr=[],ri=Ar.value;return Vr=Vr.concat(fo({key:Ar.key,value:ri,valueSpec:Ar.valueSpec,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec,arrayElementValidator:rr})),Ca(ri)==="array"&&ri.length===0&&Vr.push(new At(Ar.key,ri,"array must have at least one stop")),Vr},default:function(Ar){return Ar.validateSpec({key:Ar.key,value:Ar.value,valueSpec:S,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec})}}});return D==="identity"&&He&&Ht.push(new At(I.key,I.value,'missing required property "property"')),D==="identity"||I.value.stops||Ht.push(new At(I.key,I.value,'missing required property "stops"')),D==="exponential"&&I.valueSpec.expression&&!Ka(I.valueSpec)&&Ht.push(new At(I.key,I.value,"exponential functions not supported")),I.styleSpec.$version>=8&&(at&&!Ki(I.valueSpec)?Ht.push(new At(I.key,I.value,"property functions not supported")):He&&!ho(I.valueSpec)&&Ht.push(new At(I.key,I.value,"zoom functions not supported"))),D!=="categorical"&&!wt||I.value.property!==void 0||Ht.push(new At(I.key,I.value,'"property" property is required')),Ht;function rr(Ar){let Vr=[],ri=Ar.value,Ii=Ar.key;if(Ca(ri)!=="array")return[new At(Ii,ri,`array expected, ${Ca(ri)} found`)];if(ri.length!==2)return[new At(Ii,ri,`array length 2 expected, length ${ri.length} found`)];if(wt){if(Ca(ri[0])!=="object")return[new At(Ii,ri,`object expected, ${Ca(ri[0])} found`)];if(ri[0].zoom===void 0)return[new At(Ii,ri,"object stop key must have zoom")];if(ri[0].value===void 0)return[new At(Ii,ri,"object stop key must have value")];if(pe&&pe>Na(ri[0].zoom))return[new At(Ii,ri[0].zoom,"stop zoom values must appear in ascending order")];Na(ri[0].zoom)!==pe&&(pe=Na(ri[0].zoom),ie=void 0,xe={}),Vr=Vr.concat(Po({key:`${Ii}[0]`,value:ri[0],valueSpec:{zoom:{}},validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec,objectElementValidators:{zoom:ro,value:pr}}))}else Vr=Vr.concat(pr({key:`${Ii}[0]`,value:ri[0],valueSpec:{},validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec},ri));return Cs(Ua(ri[1]))?Vr.concat([new At(`${Ii}[1]`,ri[1],"expressions are not allowed in function stops.")]):Vr.concat(Ar.validateSpec({key:`${Ii}[1]`,value:ri[1],valueSpec:S,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec}))}function pr(Ar,Vr){let ri=Ca(Ar.value),Ii=Na(Ar.value),Zi=Ar.value!==null?Ar.value:Vr;if(Z){if(ri!==Z)return[new At(Ar.key,Zi,`${ri} stop domain type must match previous stop domain type ${Z}`)]}else Z=ri;if(ri!=="number"&&ri!=="string"&&ri!=="boolean")return[new At(Ar.key,Zi,"stop domain value must be a number, string, or boolean")];if(ri!=="number"&&D!=="categorical"){let da=`number expected, ${ri} found`;return Ki(S)&&D===void 0&&(da+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(Ar.key,Zi,da)]}return D!=="categorical"||ri!=="number"||isFinite(Ii)&&Math.floor(Ii)===Ii?D!=="categorical"&&ri==="number"&&ie!==void 0&&Iinew At(`${I.key}${Z.key}`,I.value,Z.message));let D=S.value.expression||S.value._styleExpression.expression;if(I.expressionContext==="property"&&I.propertyKey==="text-font"&&!D.outputDefined())return[new At(I.key,I.value,`Invalid data expression for "${I.propertyKey}". Output values must be contained as literals within the expression.`)];if(I.expressionContext==="property"&&I.propertyType==="layout"&&!ja(D))return[new At(I.key,I.value,'"feature-state" data expressions are not supported with layout properties.')];if(I.expressionContext==="filter"&&!ja(D))return[new At(I.key,I.value,'"feature-state" data expressions are not supported with filters.')];if(I.expressionContext&&I.expressionContext.indexOf("cluster")===0){if(!To(D,["zoom","feature-state"]))return[new At(I.key,I.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(I.expressionContext==="cluster-initial"&&!ma(D))return[new At(I.key,I.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function aa(I){let S=I.key,D=I.value,Z=I.valueSpec,ie=[];return Array.isArray(Z.values)?Z.values.indexOf(Na(D))===-1&&ie.push(new At(S,D,`expected one of [${Z.values.join(", ")}], ${JSON.stringify(D)} found`)):Object.keys(Z.values).indexOf(Na(D))===-1&&ie.push(new At(S,D,`expected one of [${Object.keys(Z.values).join(", ")}], ${JSON.stringify(D)} found`)),ie}function Oo(I){return rs(Ua(I.value))?io(Te({},I,{expressionContext:"filter",valueSpec:{value:"boolean"}})):No(I)}function No(I){let S=I.value,D=I.key;if(Ca(S)!=="array")return[new At(D,S,`array expected, ${Ca(S)} found`)];let Z=I.styleSpec,ie,pe=[];if(S.length<1)return[new At(D,S,"filter array must have at least 1 element")];switch(pe=pe.concat(aa({key:`${D}[0]`,value:S[0],valueSpec:Z.filter_operator,style:I.style,styleSpec:I.styleSpec})),Na(S[0])){case"<":case"<=":case">":case">=":S.length>=2&&Na(S[1])==="$type"&&pe.push(new At(D,S,`"$type" cannot be use with operator "${S[0]}"`));case"==":case"!=":S.length!==3&&pe.push(new At(D,S,`filter array for operator "${S[0]}" must have 3 elements`));case"in":case"!in":S.length>=2&&(ie=Ca(S[1]),ie!=="string"&&pe.push(new At(`${D}[1]`,S[1],`string expected, ${ie} found`)));for(let xe=2;xe{wt in D&&S.push(new At(Z,D[wt],`"${wt}" is prohibited for ref layers`))}),ie.layers.forEach(wt=>{Na(wt.id)===He&&(at=wt)}),at?at.ref?S.push(new At(Z,D.ref,"ref cannot reference another ref layer")):xe=Na(at.type):S.push(new At(Z,D.ref,`ref layer "${He}" not found`))}else if(xe!=="background")if(D.source){let at=ie.sources&&ie.sources[D.source],wt=at&&Na(at.type);at?wt==="vector"&&xe==="raster"?S.push(new At(Z,D.source,`layer "${D.id}" requires a raster source`)):wt!=="raster-dem"&&xe==="hillshade"?S.push(new At(Z,D.source,`layer "${D.id}" requires a raster-dem source`)):wt==="raster"&&xe!=="raster"?S.push(new At(Z,D.source,`layer "${D.id}" requires a vector source`)):wt!=="vector"||D["source-layer"]?wt==="raster-dem"&&xe!=="hillshade"?S.push(new At(Z,D.source,"raster-dem source can only be used with layer type 'hillshade'.")):xe!=="line"||!D.paint||!D.paint["line-gradient"]||wt==="geojson"&&at.lineMetrics||S.push(new At(Z,D,`layer "${D.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):S.push(new At(Z,D,`layer "${D.id}" must specify a "source-layer"`)):S.push(new At(Z,D.source,`source "${D.source}" not found`))}else S.push(new At(Z,D,'missing required property "source"'));return S=S.concat(Po({key:Z,value:D,valueSpec:pe.layer,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,objectElementValidators:{"*":()=>[],type:()=>I.validateSpec({key:`${Z}.type`,value:D.type,valueSpec:pe.layer.type,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,object:D,objectKey:"type"}),filter:Oo,layout:at=>Po({layer:D,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":wt=>ws(Te({layerType:xe},wt))}}),paint:at=>Po({layer:D,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":wt=>Fs(Te({layerType:xe},wt))}})}})),S}function Ls(I){let S=I.value,D=I.key,Z=Ca(S);return Z!=="string"?[new At(D,S,`string expected, ${Z} found`)]:[]}let ds={promoteId:function({key:I,value:S}){if(Ca(S)==="string")return Ls({key:I,value:S});{let D=[];for(let Z in S)D.push(...Ls({key:`${I}.${Z}`,value:S[Z]}));return D}}};function Xs(I){let S=I.value,D=I.key,Z=I.styleSpec,ie=I.style,pe=I.validateSpec;if(!S.type)return[new At(D,S,'"type" is required')];let xe=Na(S.type),He;switch(xe){case"vector":case"raster":return He=Po({key:D,value:S,valueSpec:Z[`source_${xe.replace("-","_")}`],style:I.style,styleSpec:Z,objectElementValidators:ds,validateSpec:pe}),He;case"raster-dem":return He=function(at){var wt;let Ht=(wt=at.sourceName)!==null&&wt!==void 0?wt:"",rr=at.value,pr=at.styleSpec,Ar=pr.source_raster_dem,Vr=at.style,ri=[],Ii=Ca(rr);if(rr===void 0)return ri;if(Ii!=="object")return ri.push(new At("source_raster_dem",rr,`object expected, ${Ii} found`)),ri;let Zi=Na(rr.encoding)==="custom",da=["redFactor","greenFactor","blueFactor","baseShift"],cn=at.value.encoding?`"${at.value.encoding}"`:"Default";for(let jn in rr)!Zi&&da.includes(jn)?ri.push(new At(jn,rr[jn],`In "${Ht}": "${jn}" is only valid when "encoding" is set to "custom". ${cn} encoding found`)):Ar[jn]?ri=ri.concat(at.validateSpec({key:jn,value:rr[jn],valueSpec:Ar[jn],validateSpec:at.validateSpec,style:Vr,styleSpec:pr})):ri.push(new At(jn,rr[jn],`unknown property "${jn}"`));return ri}({sourceName:D,value:S,style:I.style,styleSpec:Z,validateSpec:pe}),He;case"geojson":if(He=Po({key:D,value:S,valueSpec:Z.source_geojson,style:ie,styleSpec:Z,validateSpec:pe,objectElementValidators:ds}),S.cluster)for(let at in S.clusterProperties){let[wt,Ht]=S.clusterProperties[at],rr=typeof wt=="string"?[wt,["accumulated"],["get",at]]:wt;He.push(...io({key:`${D}.${at}.map`,value:Ht,validateSpec:pe,expressionContext:"cluster-map"})),He.push(...io({key:`${D}.${at}.reduce`,value:rr,validateSpec:pe,expressionContext:"cluster-reduce"}))}return He;case"video":return Po({key:D,value:S,valueSpec:Z.source_video,style:ie,validateSpec:pe,styleSpec:Z});case"image":return Po({key:D,value:S,valueSpec:Z.source_image,style:ie,validateSpec:pe,styleSpec:Z});case"canvas":return[new At(D,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return aa({key:`${D}.type`,value:S.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ie,validateSpec:pe,styleSpec:Z})}}function oa(I){let S=I.value,D=I.styleSpec,Z=D.light,ie=I.style,pe=[],xe=Ca(S);if(S===void 0)return pe;if(xe!=="object")return pe=pe.concat([new At("light",S,`object expected, ${xe} found`)]),pe;for(let He in S){let at=He.match(/^(.*)-transition$/);pe=pe.concat(at&&Z[at[1]]&&Z[at[1]].transition?I.validateSpec({key:He,value:S[He],valueSpec:D.transition,validateSpec:I.validateSpec,style:ie,styleSpec:D}):Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],validateSpec:I.validateSpec,style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)])}return pe}function Yo(I){let S=I.value,D=I.styleSpec,Z=D.sky,ie=I.style,pe=Ca(S);if(S===void 0)return[];if(pe!=="object")return[new At("sky",S,`object expected, ${pe} found`)];let xe=[];for(let He in S)xe=xe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return xe}function po(I){let S=I.value,D=I.styleSpec,Z=D.terrain,ie=I.style,pe=[],xe=Ca(S);if(S===void 0)return pe;if(xe!=="object")return pe=pe.concat([new At("terrain",S,`object expected, ${xe} found`)]),pe;for(let He in S)pe=pe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],validateSpec:I.validateSpec,style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return pe}function ss(I){let S=[],D=I.value,Z=I.key;if(Array.isArray(D)){let ie=[],pe=[];for(let xe in D)D[xe].id&&ie.includes(D[xe].id)&&S.push(new At(Z,D,`all the sprites' ids must be unique, but ${D[xe].id} is duplicated`)),ie.push(D[xe].id),D[xe].url&&pe.includes(D[xe].url)&&S.push(new At(Z,D,`all the sprites' URLs must be unique, but ${D[xe].url} is duplicated`)),pe.push(D[xe].url),S=S.concat(Po({key:`${Z}[${xe}]`,value:D[xe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:I.validateSpec}));return S}return Ls({key:Z,value:D})}let ls={"*":()=>[],array:fo,boolean:function(I){let S=I.value,D=I.key,Z=Ca(S);return Z!=="boolean"?[new At(D,S,`boolean expected, ${Z} found`)]:[]},number:ro,color:function(I){let S=I.key,D=I.value,Z=Ca(D);return Z!=="string"?[new At(S,D,`color expected, ${Z} found`)]:Bt.parse(String(D))?[]:[new At(S,D,`color expected, "${D}" found`)]},constants:$o,enum:aa,filter:Oo,function:Ma,layer:no,object:Po,source:Xs,light:oa,sky:Yo,terrain:po,projection:function(I){let S=I.value,D=I.styleSpec,Z=D.projection,ie=I.style,pe=Ca(S);if(S===void 0)return[];if(pe!=="object")return[new At("projection",S,`object expected, ${pe} found`)];let xe=[];for(let He in S)xe=xe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return xe},string:Ls,formatted:function(I){return Ls(I).length===0?[]:io(I)},resolvedImage:function(I){return Ls(I).length===0?[]:io(I)},padding:function(I){let S=I.key,D=I.value;if(Ca(D)==="array"){if(D.length<1||D.length>4)return[new At(S,D,`padding requires 1 to 4 values; ${D.length} values found`)];let Z={type:"number"},ie=[];for(let pe=0;pe[]}})),I.constants&&(D=D.concat($o({key:"constants",value:I.constants,style:I,styleSpec:S,validateSpec:gs}))),nr(D)}function hr(I){return function(S){return I(lee(see({},S),{validateSpec:gs}))}}function nr(I){return[].concat(I).sort((S,D)=>S.line-D.line)}function Sr(I){return function(...S){return nr(I.apply(this,S))}}Ft.source=Sr(hr(Xs)),Ft.sprite=Sr(hr(ss)),Ft.glyphs=Sr(hr(bt)),Ft.light=Sr(hr(oa)),Ft.sky=Sr(hr(Yo)),Ft.terrain=Sr(hr(po)),Ft.layer=Sr(hr(no)),Ft.filter=Sr(hr(Oo)),Ft.paintProperty=Sr(hr(Fs)),Ft.layoutProperty=Sr(hr(ws));let li=Ft,di=li.light,mi=li.sky,Oi=li.paintProperty,dn=li.layoutProperty;function wi(I,S){let D=!1;if(S&&S.length)for(let Z of S)I.fire(new me(new Error(Z.message))),D=!0;return D}class ui{constructor(S,D,Z){let ie=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let xe=new Int32Array(this.arrayBuffer);S=xe[0],this.d=(D=xe[1])+2*(Z=xe[2]);for(let at=0;at=rr[Vr+0]&&ie>=rr[Vr+1])?(He[Ar]=!0,xe.push(Ht[Ar])):He[Ar]=!1}}}}_forEachCell(S,D,Z,ie,pe,xe,He,at){let wt=this._convertToCellCoord(S),Ht=this._convertToCellCoord(D),rr=this._convertToCellCoord(Z),pr=this._convertToCellCoord(ie);for(let Ar=wt;Ar<=rr;Ar++)for(let Vr=Ht;Vr<=pr;Vr++){let ri=this.d*Vr+Ar;if((!at||at(this._convertFromCellCoord(Ar),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Ar+1),this._convertFromCellCoord(Vr+1)))&&pe.call(this,S,D,Z,ie,ri,xe,He,at))return}}_convertFromCellCoord(S){return(S-this.padding)/this.scale}_convertToCellCoord(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let S=this.cells,D=3+this.cells.length+1+1,Z=0;for(let xe=0;xe=0)continue;let xe=I[pe];ie[pe]=Ai[D].shallow.indexOf(pe)>=0?xe:Rn(xe,S)}I instanceof Error&&(ie.message=I.message)}if(ie.$name)throw new Error("$name property is reserved for worker serialization logic.");return D!=="Object"&&(ie.$name=D),ie}function Hn(I){if(Vn(I))return I;if(Array.isArray(I))return I.map(Hn);if(typeof I!="object")throw new Error("can't deserialize object of type "+typeof I);let S=In(I)||"Object";if(!Ai[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:D}=Ai[S];if(!D)throw new Error(`can't deserialize unregistered class ${S}`);if(D.deserialize)return D.deserialize(I);let Z=Object.create(D.prototype);for(let ie of Object.keys(I)){if(ie==="$name")continue;let pe=I[ie];Z[ie]=Ai[S].shallow.indexOf(ie)>=0?pe:Hn(pe)}return Z}class Gn{constructor(){this.first=!0}update(S,D){let Z=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=Z,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=Z,!0):(this.lastFloorZoom>Z?(this.lastIntegerZoom=Z+1,this.lastIntegerZoomTime=D):this.lastFloorZoomI>=128&&I<=255,"Hangul Jamo":I=>I>=4352&&I<=4607,Khmer:I=>I>=6016&&I<=6143,"General Punctuation":I=>I>=8192&&I<=8303,"Letterlike Symbols":I=>I>=8448&&I<=8527,"Number Forms":I=>I>=8528&&I<=8591,"Miscellaneous Technical":I=>I>=8960&&I<=9215,"Control Pictures":I=>I>=9216&&I<=9279,"Optical Character Recognition":I=>I>=9280&&I<=9311,"Enclosed Alphanumerics":I=>I>=9312&&I<=9471,"Geometric Shapes":I=>I>=9632&&I<=9727,"Miscellaneous Symbols":I=>I>=9728&&I<=9983,"Miscellaneous Symbols and Arrows":I=>I>=11008&&I<=11263,"Ideographic Description Characters":I=>I>=12272&&I<=12287,"CJK Symbols and Punctuation":I=>I>=12288&&I<=12351,Katakana:I=>I>=12448&&I<=12543,Kanbun:I=>I>=12688&&I<=12703,"CJK Strokes":I=>I>=12736&&I<=12783,"Enclosed CJK Letters and Months":I=>I>=12800&&I<=13055,"CJK Compatibility":I=>I>=13056&&I<=13311,"Yijing Hexagram Symbols":I=>I>=19904&&I<=19967,"Private Use Area":I=>I>=57344&&I<=63743,"Vertical Forms":I=>I>=65040&&I<=65055,"CJK Compatibility Forms":I=>I>=65072&&I<=65103,"Small Form Variants":I=>I>=65104&&I<=65135,"Halfwidth and Fullwidth Forms":I=>I>=65280&&I<=65519};function Lo(I){for(let S of I)if(ul(S.charCodeAt(0)))return!0;return!1}function us(I){for(let S of I)if(!ol(S.charCodeAt(0)))return!1;return!0}function Bs(I){let S=I.map(D=>{try{return new RegExp(`\\p{sc=${D}}`,"u").source}catch(Z){return null}}).filter(D=>D);return new RegExp(S.join("|"),"u")}let Js=Bs(["Arab","Dupl","Mong","Ougr","Syrc"]);function ol(I){return!Js.test(String.fromCodePoint(I))}let Cl=Bs(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ul(I){return!(I!==746&&I!==747&&(I<4352||!(pn["CJK Compatibility Forms"](I)&&!(I>=65097&&I<=65103)||pn["CJK Compatibility"](I)||pn["CJK Strokes"](I)||!(!pn["CJK Symbols and Punctuation"](I)||I>=12296&&I<=12305||I>=12308&&I<=12319||I===12336)||pn["Enclosed CJK Letters and Months"](I)||pn["Ideographic Description Characters"](I)||pn.Kanbun(I)||pn.Katakana(I)&&I!==12540||!(!pn["Halfwidth and Fullwidth Forms"](I)||I===65288||I===65289||I===65293||I>=65306&&I<=65310||I===65339||I===65341||I===65343||I>=65371&&I<=65503||I===65507||I>=65512&&I<=65519)||!(!pn["Small Form Variants"](I)||I>=65112&&I<=65118||I>=65123&&I<=65126)||pn["Vertical Forms"](I)||pn["Yijing Hexagram Symbols"](I)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(I))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(I))||Cl.test(String.fromCodePoint(I)))))}function Gl(I){return!(ul(I)||function(S){return!!(pn["Latin-1 Supplement"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||pn["General Punctuation"](S)&&(S===8214||S===8224||S===8225||S===8240||S===8241||S===8251||S===8252||S===8258||S===8263||S===8264||S===8265||S===8273)||pn["Letterlike Symbols"](S)||pn["Number Forms"](S)||pn["Miscellaneous Technical"](S)&&(S>=8960&&S<=8967||S>=8972&&S<=8991||S>=8996&&S<=9e3||S===9003||S>=9085&&S<=9114||S>=9150&&S<=9165||S===9167||S>=9169&&S<=9179||S>=9186&&S<=9215)||pn["Control Pictures"](S)&&S!==9251||pn["Optical Character Recognition"](S)||pn["Enclosed Alphanumerics"](S)||pn["Geometric Shapes"](S)||pn["Miscellaneous Symbols"](S)&&!(S>=9754&&S<=9759)||pn["Miscellaneous Symbols and Arrows"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||pn["CJK Symbols and Punctuation"](S)||pn.Katakana(S)||pn["Private Use Area"](S)||pn["CJK Compatibility Forms"](S)||pn["Small Form Variants"](S)||pn["Halfwidth and Fullwidth Forms"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(I))}let Vl=Bs(["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 Fl(I){return Vl.test(String.fromCodePoint(I))}function ga(I,S){return!(!S&&Fl(I)||I>=2304&&I<=3583||I>=3840&&I<=4255||pn.Khmer(I))}function ko(I){for(let S of I)if(Fl(S.charCodeAt(0)))return!0;return!1}let zs=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(I){this.pluginStatus=I.pluginStatus,this.pluginURL=I.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(I){this.applyArabicShaping=I.applyArabicShaping,this.processBidirectionalText=I.processBidirectionalText,this.processStyledBidirectionalText=I.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Fo{constructor(S,D){this.zoom=S,D?(this.now=D.now,this.fadeDuration=D.fadeDuration,this.zoomHistory=D.zoomHistory,this.transition=D.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Gn,this.transition={})}isSupportedScript(S){return function(D,Z){for(let ie of D)if(!ga(ie.charCodeAt(0),Z))return!1;return!0}(S,zs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,D=S-Math.floor(S),Z=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:D+(1-D)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*D}}}class Ys{constructor(S,D){this.property=S,this.value=D,this.expression=function(Z,ie){if(ta(Z))return new $a(Z,ie);if(Cs(Z)){let pe=lo(Z,ie);if(pe.result==="error")throw new Error(pe.value.map(xe=>`${xe.key}: ${xe.message}`).join(", "));return pe.value}{let pe=Z;return ie.type==="color"&&typeof Z=="string"?pe=Bt.parse(Z):ie.type!=="padding"||typeof Z!="number"&&!Array.isArray(Z)?ie.type==="variableAnchorOffsetCollection"&&Array.isArray(Z)&&(pe=Br.parse(Z)):pe=Tr.parse(Z),{kind:"constant",evaluate:()=>pe}}}(D===void 0?S.specification.default:D,S.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(S,D,Z){return this.property.possiblyEvaluate(this,S,D,Z)}}class Gs{constructor(S){this.property=S,this.value=new Ys(S,void 0)}transitioned(S,D){return new Sl(this.property,this.value,D,L({},S.transition,this.transition),S.now)}untransitioned(){return new Sl(this.property,this.value,null,{},0)}}class Us{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return v(this._values[S].value.value)}setValue(S,D){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Gs(this._values[S].property)),this._values[S].value=new Ys(this._values[S].property,D===null?void 0:v(D))}getTransition(S){return v(this._values[S].transition)}setTransition(S,D){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Gs(this._values[S].property)),this._values[S].transition=v(D)||void 0}serialize(){let S={};for(let D of Object.keys(this._values)){let Z=this.getValue(D);Z!==void 0&&(S[D]=Z);let ie=this.getTransition(D);ie!==void 0&&(S[`${D}-transition`]=ie)}return S}transitioned(S,D){let Z=new _l(this._properties);for(let ie of Object.keys(this._values))Z._values[ie]=this._values[ie].transitioned(S,D._values[ie]);return Z}untransitioned(){let S=new _l(this._properties);for(let D of Object.keys(this._values))S._values[D]=this._values[D].untransitioned();return S}}class Sl{constructor(S,D,Z,ie,pe){this.property=S,this.value=D,this.begin=pe+ie.delay||0,this.end=this.begin+ie.duration||0,S.specification.transition&&(ie.delay||ie.duration)&&(this.prior=Z)}possiblyEvaluate(S,D,Z){let ie=S.now||0,pe=this.value.possiblyEvaluate(S,D,Z),xe=this.prior;if(xe){if(ie>this.end)return this.prior=null,pe;if(this.value.isDataDriven())return this.prior=null,pe;if(ie=1)return 1;let wt=at*at,Ht=wt*at;return 4*(at<.5?Ht:3*(at-wt)+Ht-.75)}(He))}}return pe}}class _l{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,D,Z){let ie=new xl(this._properties);for(let pe of Object.keys(this._values))ie._values[pe]=this._values[pe].possiblyEvaluate(S,D,Z);return ie}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class kl{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return v(this._values[S].value)}setValue(S,D){this._values[S]=new Ys(this._values[S].property,D===null?void 0:v(D))}serialize(){let S={};for(let D of Object.keys(this._values)){let Z=this.getValue(D);Z!==void 0&&(S[D]=Z)}return S}possiblyEvaluate(S,D,Z){let ie=new xl(this._properties);for(let pe of Object.keys(this._values))ie._values[pe]=this._values[pe].possiblyEvaluate(S,D,Z);return ie}}class cl{constructor(S,D,Z){this.property=S,this.value=D,this.parameters=Z}isConstant(){return this.value.kind==="constant"}constantOr(S){return this.value.kind==="constant"?this.value.value:S}evaluate(S,D,Z,ie){return this.property.evaluate(this.value,this.parameters,S,D,Z,ie)}}class xl{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Uo{constructor(S){this.specification=S}possiblyEvaluate(S,D){if(S.isDataDriven())throw new Error("Value should not be data driven");return S.expression.evaluate(D)}interpolate(S,D,Z){let ie=ia[this.specification.type];return ie?ie(S,D,Z):S}}class _s{constructor(S,D){this.specification=S,this.overrides=D}possiblyEvaluate(S,D,Z,ie){return new cl(this,S.expression.kind==="constant"||S.expression.kind==="camera"?{kind:"constant",value:S.expression.evaluate(D,null,{},Z,ie)}:S.expression,D)}interpolate(S,D,Z){if(S.value.kind!=="constant"||D.value.kind!=="constant")return S;if(S.value.value===void 0||D.value.value===void 0)return new cl(this,{kind:"constant",value:void 0},S.parameters);let ie=ia[this.specification.type];if(ie){let pe=ie(S.value.value,D.value.value,Z);return new cl(this,{kind:"constant",value:pe},S.parameters)}return S}evaluate(S,D,Z,ie,pe,xe){return S.kind==="constant"?S.value:S.evaluate(D,Z,ie,pe,xe)}}class Bl extends _s{possiblyEvaluate(S,D,Z,ie){if(S.value===void 0)return new cl(this,{kind:"constant",value:void 0},D);if(S.expression.kind==="constant"){let pe=S.expression.evaluate(D,null,{},Z,ie),xe=S.property.specification.type==="resolvedImage"&&typeof pe!="string"?pe.name:pe,He=this._calculate(xe,xe,xe,D);return new cl(this,{kind:"constant",value:He},D)}if(S.expression.kind==="camera"){let pe=this._calculate(S.expression.evaluate({zoom:D.zoom-1}),S.expression.evaluate({zoom:D.zoom}),S.expression.evaluate({zoom:D.zoom+1}),D);return new cl(this,{kind:"constant",value:pe},D)}return new cl(this,S.expression,D)}evaluate(S,D,Z,ie,pe,xe){if(S.kind==="source"){let He=S.evaluate(D,Z,ie,pe,xe);return this._calculate(He,He,He,D)}return S.kind==="composite"?this._calculate(S.evaluate({zoom:Math.floor(D.zoom)-1},Z,ie),S.evaluate({zoom:Math.floor(D.zoom)},Z,ie),S.evaluate({zoom:Math.floor(D.zoom)+1},Z,ie),D):S.value}_calculate(S,D,Z,ie){return ie.zoom>ie.zoomHistory.lastIntegerZoom?{from:S,to:D}:{from:Z,to:D}}interpolate(S){return S}}class Il{constructor(S){this.specification=S}possiblyEvaluate(S,D,Z,ie){if(S.value!==void 0){if(S.expression.kind==="constant"){let pe=S.expression.evaluate(D,null,{},Z,ie);return this._calculate(pe,pe,pe,D)}return this._calculate(S.expression.evaluate(new Fo(Math.floor(D.zoom-1),D)),S.expression.evaluate(new Fo(Math.floor(D.zoom),D)),S.expression.evaluate(new Fo(Math.floor(D.zoom+1),D)),D)}}_calculate(S,D,Z,ie){return ie.zoom>ie.zoomHistory.lastIntegerZoom?{from:S,to:D}:{from:Z,to:D}}interpolate(S){return S}}class Dl{constructor(S){this.specification=S}possiblyEvaluate(S,D,Z,ie){return!!S.expression.evaluate(D,null,{},Z,ie)}interpolate(){return!1}}class oe{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let D in S){let Z=S[D];Z.specification.overridable&&this.overridableProperties.push(D);let ie=this.defaultPropertyValues[D]=new Ys(Z,void 0),pe=this.defaultTransitionablePropertyValues[D]=new Gs(Z);this.defaultTransitioningPropertyValues[D]=pe.untransitioned(),this.defaultPossiblyEvaluatedValues[D]=ie.possiblyEvaluate({})}}}gi("DataDrivenProperty",_s),gi("DataConstantProperty",Uo),gi("CrossFadedDataDrivenProperty",Bl),gi("CrossFadedProperty",Il),gi("ColorRampProperty",Dl);let w="-transition";class B extends Be{constructor(S,D){if(super(),this.id=S.id,this.type=S.type,this._featureFilter={filter:()=>!0,needGeometry:!1},S.type!=="custom"&&(this.metadata=S.metadata,this.minzoom=S.minzoom,this.maxzoom=S.maxzoom,S.type!=="background"&&(this.source=S.source,this.sourceLayer=S["source-layer"],this.filter=S.filter),D.layout&&(this._unevaluatedLayout=new kl(D.layout)),D.paint)){this._transitionablePaint=new Us(D.paint);for(let Z in S.paint)this.setPaintProperty(Z,S.paint[Z],{validate:!1});for(let Z in S.layout)this.setLayoutProperty(Z,S.layout[Z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xl(D.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S==="visibility"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,D,Z={}){D!=null&&this._validate(dn,`layers.${this.id}.layout.${S}`,S,D,Z)||(S!=="visibility"?this._unevaluatedLayout.setValue(S,D):this.visibility=D)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,D,Z={}){if(D!=null&&this._validate(Oi,`layers.${this.id}.paint.${S}`,S,D,Z))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),D||void 0),!1;{let ie=this._transitionablePaint._values[S],pe=ie.property.specification["property-type"]==="cross-faded-data-driven",xe=ie.value.isDataDriven(),He=ie.value;this._transitionablePaint.setValue(S,D),this._handleSpecialPaintPropertyUpdate(S);let at=this._transitionablePaint._values[S].value;return at.isDataDriven()||xe||pe||this._handleOverridablePaintPropertyUpdate(S,He,at)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,D,Z){return!1}isHidden(S){return!!(this.minzoom&&S=this.maxzoom)||this.visibility==="none"}updateTransitions(S){this._transitioningPaint=this._transitionablePaint.transitioned(S,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(S,D){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,D)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,D)}serialize(){let S={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&&(S.layout=S.layout||{},S.layout.visibility=this.visibility),M(S,(D,Z)=>!(D===void 0||Z==="layout"&&!Object.keys(D).length||Z==="paint"&&!Object.keys(D).length))}_validate(S,D,Z,ie,pe={}){return(!pe||pe.validate!==!1)&&wi(this,S.call(li,{key:D,layerType:this.type,objectKey:Z,value:ie,styleSpec:fe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let D=this.paint.get(S);if(D instanceof cl&&Ki(D.property.specification)&&(D.value.kind==="source"||D.value.kind==="composite")&&D.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(S,D){this._structArray=S,this._pos1=D*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(S,D){return S._trim(),D&&(S.isTransferred=!0,D.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let D=Object.create(this.prototype);return D.arrayBuffer=S.arrayBuffer,D.length=S.length,D.capacity=S.arrayBuffer.byteLength/D.bytesPerElement,D._refreshViews(),D}_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(S){this.reserve(S),this.length=S}reserve(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let D=this.uint8;this._refreshViews(),D&&this.uint8.set(D)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ne(I,S=1){let D=0,Z=0;return{members:I.map(ie=>{let pe=Q[ie.type].BYTES_PER_ELEMENT,xe=D=$e(D,Math.max(S,pe)),He=ie.components||1;return Z=Math.max(Z,pe),D+=pe*He,{name:ie.name,type:ie.type,components:He,offset:xe}}),size:$e(D,Math.max(Z,S)),alignment:S}}function $e(I,S){return Math.ceil(I/S)*S}class pt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.int16[ie+0]=D,this.int16[ie+1]=Z,S}}pt.prototype.bytesPerElement=4,gi("StructArrayLayout2i4",pt);class zt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.int16[pe+0]=D,this.int16[pe+1]=Z,this.int16[pe+2]=ie,S}}zt.prototype.bytesPerElement=6,gi("StructArrayLayout3i6",zt);class Yt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,D,Z,ie)}emplace(S,D,Z,ie,pe){let xe=4*S;return this.int16[xe+0]=D,this.int16[xe+1]=Z,this.int16[xe+2]=ie,this.int16[xe+3]=pe,S}}Yt.prototype.bytesPerElement=8,gi("StructArrayLayout4i8",Yt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=6*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.int16[at+2]=ie,this.int16[at+3]=pe,this.int16[at+4]=xe,this.int16[at+5]=He,S}}Jt.prototype.bytesPerElement=12,gi("StructArrayLayout2i4i12",Jt);class yr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=4*S,wt=8*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.uint8[wt+4]=ie,this.uint8[wt+5]=pe,this.uint8[wt+6]=xe,this.uint8[wt+7]=He,S}}yr.prototype.bytesPerElement=8,gi("StructArrayLayout2i4ub8",yr);class Ir extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.float32[ie+0]=D,this.float32[ie+1]=Z,S}}Ir.prototype.bytesPerElement=8,gi("StructArrayLayout2f8",Ir);class ce extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=this.length;return this.resize(rr+1),this.emplace(rr,S,D,Z,ie,pe,xe,He,at,wt,Ht)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr){let pr=10*S;return this.uint16[pr+0]=D,this.uint16[pr+1]=Z,this.uint16[pr+2]=ie,this.uint16[pr+3]=pe,this.uint16[pr+4]=xe,this.uint16[pr+5]=He,this.uint16[pr+6]=at,this.uint16[pr+7]=wt,this.uint16[pr+8]=Ht,this.uint16[pr+9]=rr,S}}ce.prototype.bytesPerElement=20,gi("StructArrayLayout10ui20",ce);class Ae extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr){let Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar){let Vr=12*S;return this.int16[Vr+0]=D,this.int16[Vr+1]=Z,this.int16[Vr+2]=ie,this.int16[Vr+3]=pe,this.uint16[Vr+4]=xe,this.uint16[Vr+5]=He,this.uint16[Vr+6]=at,this.uint16[Vr+7]=wt,this.int16[Vr+8]=Ht,this.int16[Vr+9]=rr,this.int16[Vr+10]=pr,this.int16[Vr+11]=Ar,S}}Ae.prototype.bytesPerElement=24,gi("StructArrayLayout4i4ui4i24",Ae);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.float32[pe+0]=D,this.float32[pe+1]=Z,this.float32[pe+2]=ie,S}}qe.prototype.bytesPerElement=12,gi("StructArrayLayout3f12",qe);class Ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.uint32[1*S+0]=D,S}}Ve.prototype.bytesPerElement=4,gi("StructArrayLayout1ul4",Ve);class ot 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(S,D,Z,ie,pe,xe,He,at,wt){let Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,S,D,Z,ie,pe,xe,He,at,wt)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=10*S,pr=5*S;return this.int16[rr+0]=D,this.int16[rr+1]=Z,this.int16[rr+2]=ie,this.int16[rr+3]=pe,this.int16[rr+4]=xe,this.int16[rr+5]=He,this.uint32[pr+3]=at,this.uint16[rr+8]=wt,this.uint16[rr+9]=Ht,S}}ot.prototype.bytesPerElement=20,gi("StructArrayLayout6i1ul2ui20",ot);class Ke extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=6*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.int16[at+2]=ie,this.int16[at+3]=pe,this.int16[at+4]=xe,this.int16[at+5]=He,S}}Ke.prototype.bytesPerElement=12,gi("StructArrayLayout2i2i2i12",Ke);class ft extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe){let xe=this.length;return this.resize(xe+1),this.emplace(xe,S,D,Z,ie,pe)}emplace(S,D,Z,ie,pe,xe){let He=4*S,at=8*S;return this.float32[He+0]=D,this.float32[He+1]=Z,this.float32[He+2]=ie,this.int16[at+6]=pe,this.int16[at+7]=xe,S}}ft.prototype.bytesPerElement=16,gi("StructArrayLayout2f1f2i16",ft);class qt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=16*S,wt=4*S,Ht=8*S;return this.uint8[at+0]=D,this.uint8[at+1]=Z,this.float32[wt+1]=ie,this.float32[wt+2]=pe,this.int16[Ht+6]=xe,this.int16[Ht+7]=He,S}}qt.prototype.bytesPerElement=16,gi("StructArrayLayout2ub2f2i16",qt);class Xt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.uint16[pe+0]=D,this.uint16[pe+1]=Z,this.uint16[pe+2]=ie,S}}Xt.prototype.bytesPerElement=6,gi("StructArrayLayout3ui6",Xt);class $t 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(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi){let da=this.length;return this.resize(da+1),this.emplace(da,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da){let cn=24*S,jn=12*S,Va=48*S;return this.int16[cn+0]=D,this.int16[cn+1]=Z,this.uint16[cn+2]=ie,this.uint16[cn+3]=pe,this.uint32[jn+2]=xe,this.uint32[jn+3]=He,this.uint32[jn+4]=at,this.uint16[cn+10]=wt,this.uint16[cn+11]=Ht,this.uint16[cn+12]=rr,this.float32[jn+7]=pr,this.float32[jn+8]=Ar,this.uint8[Va+36]=Vr,this.uint8[Va+37]=ri,this.uint8[Va+38]=Ii,this.uint32[jn+10]=Zi,this.int16[cn+22]=da,S}}$t.prototype.bytesPerElement=48,gi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$t);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(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu){let uu=this.length;return this.resize(uu+1),this.emplace(uu,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu,uu){let Ts=32*S,wu=16*S;return this.int16[Ts+0]=D,this.int16[Ts+1]=Z,this.int16[Ts+2]=ie,this.int16[Ts+3]=pe,this.int16[Ts+4]=xe,this.int16[Ts+5]=He,this.int16[Ts+6]=at,this.int16[Ts+7]=wt,this.uint16[Ts+8]=Ht,this.uint16[Ts+9]=rr,this.uint16[Ts+10]=pr,this.uint16[Ts+11]=Ar,this.uint16[Ts+12]=Vr,this.uint16[Ts+13]=ri,this.uint16[Ts+14]=Ii,this.uint16[Ts+15]=Zi,this.uint16[Ts+16]=da,this.uint16[Ts+17]=cn,this.uint16[Ts+18]=jn,this.uint16[Ts+19]=Va,this.uint16[Ts+20]=hl,this.uint16[Ts+21]=iu,this.uint16[Ts+22]=Su,this.uint32[wu+12]=Zl,this.float32[wu+13]=Qs,this.float32[wu+14]=gu,this.uint16[Ts+30]=cu,this.uint16[Ts+31]=uu,S}}dr.prototype.bytesPerElement=64,gi("StructArrayLayout8i15ui1ul2f2ui64",dr);class Mr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.float32[1*S+0]=D,S}}Mr.prototype.bytesPerElement=4,gi("StructArrayLayout1f4",Mr);class $r extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.uint16[6*S+0]=D,this.float32[pe+1]=Z,this.float32[pe+2]=ie,S}}$r.prototype.bytesPerElement=12,gi("StructArrayLayout1ui2f12",$r);class ii extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=4*S;return this.uint32[2*S+0]=D,this.uint16[pe+2]=Z,this.uint16[pe+3]=ie,S}}ii.prototype.bytesPerElement=8,gi("StructArrayLayout1ul2ui8",ii);class pi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.uint16[ie+0]=D,this.uint16[ie+1]=Z,S}}pi.prototype.bytesPerElement=4,gi("StructArrayLayout2ui4",pi);class Yi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.uint16[1*S+0]=D,S}}Yi.prototype.bytesPerElement=2,gi("StructArrayLayout1ui2",Yi);class wn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,D,Z,ie)}emplace(S,D,Z,ie,pe){let xe=4*S;return this.float32[xe+0]=D,this.float32[xe+1]=Z,this.float32[xe+2]=ie,this.float32[xe+3]=pe,S}}wn.prototype.bytesPerElement=16,gi("StructArrayLayout4f16",wn);class Tn 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 l(this.anchorPointX,this.anchorPointY)}}Tn.prototype.size=20;class ua extends ot{get(S){return new Tn(this,S)}}gi("CollisionBoxArray",ua);class oo 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(S){this._structArray.uint8[this._pos1+37]=S}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(S){this._structArray.uint8[this._pos1+38]=S}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(S){this._structArray.uint32[this._pos4+10]=S}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}oo.prototype.size=48;class el extends $t{get(S){return new oo(this,S)}}gi("PlacedSymbolArray",el);class ys 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(S){this._structArray.uint32[this._pos4+12]=S}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]}}ys.prototype.size=64;class il extends dr{get(S){return new ys(this,S)}}gi("SymbolInstanceArray",il);class $l extends Mr{getoffsetX(S){return this.float32[1*S+0]}}gi("GlyphOffsetArray",$l);class pl extends zt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}gi("SymbolLineVertexArray",pl);class Hl 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]}}Hl.prototype.size=12;class Ll extends $r{get(S){return new Hl(this,S)}}gi("TextAnchorOffsetArray",Ll);class Ql 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]}}Ql.prototype.size=8;class ku extends ii{get(S){return new Ql(this,S)}}gi("FeatureIndexArray",ku);class Jl extends pt{}class Kl extends pt{}class Hu extends pt{}class tf extends Jt{}class Ku extends yr{}class Gu extends Ir{}class Wu extends ce{}class sf extends Ae{}class gf extends qe{}class nf extends Ve{}class af extends Ke{}class X extends qt{}class se extends Xt{}class Le extends pi{}let We=Ne([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ye}=We;class it{constructor(S=[]){this.segments=S}prepareSegment(S,D,Z,ie){let pe=this.segments[this.segments.length-1];return S>it.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${it.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!pe||pe.vertexLength+S>it.MAX_VERTEX_ARRAY_LENGTH||pe.sortKey!==ie)&&(pe={vertexOffset:D.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},ie!==void 0&&(pe.sortKey=ie),this.segments.push(pe)),pe}get(){return this.segments}destroy(){for(let S of this.segments)for(let D in S.vaos)S.vaos[D].destroy()}static simpleSegment(S,D,Z,ie){return new it([{vertexOffset:S,primitiveOffset:D,vertexLength:Z,primitiveLength:ie,vaos:{},sortKey:0}])}}function Nt(I,S){return 256*(I=k(Math.floor(I),0,255))+k(Math.floor(S),0,255)}it.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,gi("SegmentVector",it);let mt=Ne([{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 er={exports:{}},_r={exports:{}};_r.exports=function(I,S){var D,Z,ie,pe,xe,He,at,wt;for(Z=I.length-(D=3&I.length),ie=S,xe=3432918353,He=461845907,wt=0;wt>>16)*xe&65535)<<16)&4294967295)<<15|at>>>17))*He+(((at>>>16)*He&65535)<<16)&4294967295)<<13|ie>>>19))+((5*(ie>>>16)&65535)<<16)&4294967295))+((58964+(pe>>>16)&65535)<<16);switch(at=0,D){case 3:at^=(255&I.charCodeAt(wt+2))<<16;case 2:at^=(255&I.charCodeAt(wt+1))<<8;case 1:ie^=at=(65535&(at=(at=(65535&(at^=255&I.charCodeAt(wt)))*xe+(((at>>>16)*xe&65535)<<16)&4294967295)<<15|at>>>17))*He+(((at>>>16)*He&65535)<<16)&4294967295}return ie^=I.length,ie=2246822507*(65535&(ie^=ie>>>16))+((2246822507*(ie>>>16)&65535)<<16)&4294967295,ie=3266489909*(65535&(ie^=ie>>>13))+((3266489909*(ie>>>16)&65535)<<16)&4294967295,(ie^=ie>>>16)>>>0};var wr=_r.exports,ni={exports:{}};ni.exports=function(I,S){for(var D,Z=I.length,ie=S^Z,pe=0;Z>=4;)D=1540483477*(65535&(D=255&I.charCodeAt(pe)|(255&I.charCodeAt(++pe))<<8|(255&I.charCodeAt(++pe))<<16|(255&I.charCodeAt(++pe))<<24))+((1540483477*(D>>>16)&65535)<<16),ie=1540483477*(65535&ie)+((1540483477*(ie>>>16)&65535)<<16)^(D=1540483477*(65535&(D^=D>>>24))+((1540483477*(D>>>16)&65535)<<16)),Z-=4,++pe;switch(Z){case 3:ie^=(255&I.charCodeAt(pe+2))<<16;case 2:ie^=(255&I.charCodeAt(pe+1))<<8;case 1:ie=1540483477*(65535&(ie^=255&I.charCodeAt(pe)))+((1540483477*(ie>>>16)&65535)<<16)}return ie=1540483477*(65535&(ie^=ie>>>13))+((1540483477*(ie>>>16)&65535)<<16),(ie^=ie>>>15)>>>0};var Wr=wr,Ci=ni.exports;er.exports=Wr,er.exports.murmur3=Wr,er.exports.murmur2=Ci;var Ji=o(er.exports);class ai{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,D,Z,ie){this.ids.push(Ti(S)),this.positions.push(D,Z,ie)}getPositions(S){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let D=Ti(S),Z=0,ie=this.ids.length-1;for(;Z>1;this.ids[xe]>=D?ie=xe:Z=xe+1}let pe=[];for(;this.ids[Z]===D;)pe.push({index:this.positions[3*Z],start:this.positions[3*Z+1],end:this.positions[3*Z+2]}),Z++;return pe}static serialize(S,D){let Z=new Float64Array(S.ids),ie=new Uint32Array(S.positions);return Bi(Z,ie,0,Z.length-1),D&&D.push(Z.buffer,ie.buffer),{ids:Z,positions:ie}}static deserialize(S){let D=new ai;return D.ids=S.ids,D.positions=S.positions,D.indexed=!0,D}}function Ti(I){let S=+I;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:Ji(String(I))}function Bi(I,S,D,Z){for(;D>1],pe=D-1,xe=Z+1;for(;;){do pe++;while(I[pe]ie);if(pe>=xe)break;en(I,pe,xe),en(S,3*pe,3*xe),en(S,3*pe+1,3*xe+1),en(S,3*pe+2,3*xe+2)}xe-D`u_${ie}`),this.type=Z}setUniform(S,D,Z){S.set(Z.constantOr(this.value))}getBinding(S,D,Z){return this.type==="color"?new yo(S,D):new bi(S,D)}}class wl{constructor(S,D){this.uniformNames=D.map(Z=>`u_${Z}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,D){this.pixelRatioFrom=D.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=D.tlbr,this.patternTo=S.tlbr}setUniform(S,D,Z,ie){let pe=ie==="u_pattern_to"?this.patternTo:ie==="u_pattern_from"?this.patternFrom:ie==="u_pixel_ratio_to"?this.pixelRatioTo:ie==="u_pixel_ratio_from"?this.pixelRatioFrom:null;pe&&S.set(pe)}getBinding(S,D,Z){return Z.substr(0,9)==="u_pattern"?new ao(S,D):new bi(S,D)}}class au{constructor(S,D,Z,ie){this.expression=S,this.type=Z,this.maxValue=0,this.paintVertexAttributes=D.map(pe=>({name:`a_${pe}`,type:"Float32",components:Z==="color"?2:1,offset:0})),this.paintVertexArray=new ie}populatePaintArray(S,D,Z,ie,pe){let xe=this.paintVertexArray.length,He=this.expression.evaluate(new Fo(0),D,{},ie,[],pe);this.paintVertexArray.resize(S),this._setPaintValue(xe,S,He)}updatePaintArray(S,D,Z,ie){let pe=this.expression.evaluate({zoom:0},Z,ie);this._setPaintValue(S,D,pe)}_setPaintValue(S,D,Z){if(this.type==="color"){let ie=Ms(Z);for(let pe=S;pe`u_${He}_t`),this.type=Z,this.useIntegerZoom=ie,this.zoom=pe,this.maxValue=0,this.paintVertexAttributes=D.map(He=>({name:`a_${He}`,type:"Float32",components:Z==="color"?4:2,offset:0})),this.paintVertexArray=new xe}populatePaintArray(S,D,Z,ie,pe){let xe=this.expression.evaluate(new Fo(this.zoom),D,{},ie,[],pe),He=this.expression.evaluate(new Fo(this.zoom+1),D,{},ie,[],pe),at=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(at,S,xe,He)}updatePaintArray(S,D,Z,ie){let pe=this.expression.evaluate({zoom:this.zoom},Z,ie),xe=this.expression.evaluate({zoom:this.zoom+1},Z,ie);this._setPaintValue(S,D,pe,xe)}_setPaintValue(S,D,Z,ie){if(this.type==="color"){let pe=Ms(Z),xe=Ms(ie);for(let He=S;He`#define HAS_UNIFORM_${ie}`))}return S}getBinderAttributes(){let S=[];for(let D in this.binders){let Z=this.binders[D];if(Z instanceof au||Z instanceof Al)for(let ie=0;ie!0){this.programConfigurations={};for(let ie of S)this.programConfigurations[ie.id]=new Bu(ie,D,Z);this.needsUpload=!1,this._featureMap=new ai,this._bufferOffset=0}populatePaintArrays(S,D,Z,ie,pe,xe){for(let He in this.programConfigurations)this.programConfigurations[He].populatePaintArrays(S,D,ie,pe,xe);D.id!==void 0&&this._featureMap.add(D.id,Z,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,D,Z,ie){for(let pe of Z)this.needsUpload=this.programConfigurations[pe.id].updatePaintArrays(S,this._featureMap,D,pe,ie)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let D in this.programConfigurations)this.programConfigurations[D].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Ju(I,S){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"]}[I]||[I.replace(`${S}-`,"").replace(/-/g,"_")]}function qo(I,S,D){let Z={color:{source:Ir,composite:wn},number:{source:Mr,composite:Ir}},ie=function(pe){return{"line-pattern":{source:Wu,composite:Wu},"fill-pattern":{source:Wu,composite:Wu},"fill-extrusion-pattern":{source:Wu,composite:Wu}}[pe]}(I);return ie&&ie[D]||Z[S][D]}gi("ConstantBinder",vl),gi("CrossFadedConstantBinder",wl),gi("SourceExpressionBinder",au),gi("CrossFadedCompositeBinder",nu),gi("CompositeExpressionBinder",Al),gi("ProgramConfiguration",Bu,{omit:["_buffers"]}),gi("ProgramConfigurationSet",qu);let Rl=8192,pu=Math.pow(2,14)-1,xu=-pu-1;function of(I){let S=Rl/I.extent,D=I.loadGeometry();for(let Z=0;Zxe.x+1||atxe.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return D}function ff(I,S){return{type:I.type,id:I.id,properties:I.properties,geometry:S?of(I):[]}}function xf(I,S,D,Z,ie){I.emplaceBack(2*S+(Z+1)/2,2*D+(ie+1)/2)}class hf{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Kl,this.indexArray=new se,this.segments=new it,this.programConfigurations=new qu(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){let ie=this.layers[0],pe=[],xe=null,He=!1;ie.type==="circle"&&(xe=ie.layout.get("circle-sort-key"),He=!xe.isConstant());for(let{feature:at,id:wt,index:Ht,sourceLayerIndex:rr}of S){let pr=this.layers[0]._featureFilter.needGeometry,Ar=ff(at,pr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),Ar,Z))continue;let Vr=He?xe.evaluate(Ar,{},Z):void 0,ri={id:wt,properties:at.properties,type:at.type,sourceLayerIndex:rr,index:Ht,geometry:pr?Ar.geometry:of(at),patterns:{},sortKey:Vr};pe.push(ri)}He&&pe.sort((at,wt)=>at.sortKey-wt.sortKey);for(let at of pe){let{geometry:wt,index:Ht,sourceLayerIndex:rr}=at,pr=S[Ht].feature;this.addFeature(at,wt,Ht,Z),D.featureIndex.insert(pr,wt,Ht,rr,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Ye),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(S,D,Z,ie){for(let pe of D)for(let xe of pe){let He=xe.x,at=xe.y;if(He<0||He>=Rl||at<0||at>=Rl)continue;let wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Ht=wt.vertexLength;xf(this.layoutVertexArray,He,at,-1,-1),xf(this.layoutVertexArray,He,at,1,-1),xf(this.layoutVertexArray,He,at,1,1),xf(this.layoutVertexArray,He,at,-1,1),this.indexArray.emplaceBack(Ht,Ht+1,Ht+2),this.indexArray.emplaceBack(Ht,Ht+3,Ht+2),wt.vertexLength+=4,wt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},ie)}}function dc(I,S){for(let D=0;D1){if(Mn(I,S))return!0;for(let Z=0;Z1?D:D.sub(S)._mult(ie)._add(S))}function Io(I,S){let D,Z,ie,pe=!1;for(let xe=0;xeS.y!=ie.y>S.y&&S.x<(ie.x-Z.x)*(S.y-Z.y)/(ie.y-Z.y)+Z.x&&(pe=!pe)}return pe}function Vs(I,S){let D=!1;for(let Z=0,ie=I.length-1;ZS.y!=xe.y>S.y&&S.x<(xe.x-pe.x)*(S.y-pe.y)/(xe.y-pe.y)+pe.x&&(D=!D)}return D}function Hs(I,S,D){let Z=D[0],ie=D[2];if(I.xie.x&&S.x>ie.x||I.yie.y&&S.y>ie.y)return!1;let pe=F(I,S,D[0]);return pe!==F(I,S,D[1])||pe!==F(I,S,D[2])||pe!==F(I,S,D[3])}function is(I,S,D){let Z=S.paint.get(I).value;return Z.kind==="constant"?Z.value:D.programConfigurations.get(S.id).getMaxValue(I)}function su(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])}function Ps(I,S,D,Z,ie){if(!S[0]&&!S[1])return I;let pe=l.convert(S)._mult(ie);D==="viewport"&&pe._rotate(-Z);let xe=[];for(let He=0;HeHo(Ii,ri))}(wt,at),Ar=rr?Ht*He:Ht;for(let Vr of ie)for(let ri of Vr){let Ii=rr?ri:Ho(ri,at),Zi=Ar,da=ru([],[ri.x,ri.y,0,1],at);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Zi*=da[3]/xe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Zi*=xe.cameraToCenterDistance/da[3]),Gt(pr,Ii,Zi))return!0}return!1}}function Ho(I,S){let D=ru([],[I.x,I.y,0,1],S);return new l(D[0]/D[3],D[1]/D[3])}class ql extends hf{}let yl;gi("HeatmapBucket",ql,{omit:["layers"]});var tl={get paint(){return yl=yl||new oe({"heatmap-radius":new _s(fe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new _s(fe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Uo(fe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Dl(fe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Uo(fe.paint_heatmap["heatmap-opacity"])})}};function js(I,{width:S,height:D},Z,ie){if(ie){if(ie instanceof Uint8ClampedArray)ie=new Uint8Array(ie.buffer);else if(ie.length!==S*D*Z)throw new RangeError(`mismatched image size. expected: ${ie.length} but got: ${S*D*Z}`)}else ie=new Uint8Array(S*D*Z);return I.width=S,I.height=D,I.data=ie,I}function zl(I,{width:S,height:D},Z){if(S===I.width&&D===I.height)return;let ie=js({},{width:S,height:D},Z);lu(I,ie,{x:0,y:0},{x:0,y:0},{width:Math.min(I.width,S),height:Math.min(I.height,D)},Z),I.width=S,I.height=D,I.data=ie.data}function lu(I,S,D,Z,ie,pe){if(ie.width===0||ie.height===0)return S;if(ie.width>I.width||ie.height>I.height||D.x>I.width-ie.width||D.y>I.height-ie.height)throw new RangeError("out of range source coordinates for image copy");if(ie.width>S.width||ie.height>S.height||Z.x>S.width-ie.width||Z.y>S.height-ie.height)throw new RangeError("out of range destination coordinates for image copy");let xe=I.data,He=S.data;if(xe===He)throw new Error("srcData equals dstData, so image is already copied");for(let at=0;at{S[I.evaluationKey]=at;let wt=I.expression.evaluate(S);ie.data[xe+He+0]=Math.floor(255*wt.r/wt.a),ie.data[xe+He+1]=Math.floor(255*wt.g/wt.a),ie.data[xe+He+2]=Math.floor(255*wt.b/wt.a),ie.data[xe+He+3]=Math.floor(255*wt.a)};if(I.clips)for(let xe=0,He=0;xe80*D){He=1/0,at=1/0;let Ht=-1/0,rr=-1/0;for(let pr=D;prHt&&(Ht=Ar),Vr>rr&&(rr=Vr)}wt=Math.max(Ht-He,rr-at),wt=wt!==0?32767/wt:0}return qc(pe,xe,D,He,at,wt,0),xe}function pc(I,S,D,Z,ie){let pe;if(ie===function(xe,He,at,wt){let Ht=0;for(let rr=He,pr=at-wt;rr0)for(let xe=S;xe=S;xe-=Z)pe=cr(xe/Z|0,I[xe],I[xe+1],pe);return pe&&ge(pe,pe.next)&&(It(pe),pe=pe.next),pe}function vc(I,S){if(!I)return I;S||(S=I);let D,Z=I;do if(D=!1,Z.steiner||!ge(Z,Z.next)&&we(Z.prev,Z,Z.next)!==0)Z=Z.next;else{if(It(Z),Z=S=Z.prev,Z===Z.next)break;D=!0}while(D||Z!==S);return S}function qc(I,S,D,Z,ie,pe,xe){if(!I)return;!xe&&pe&&function(at,wt,Ht,rr){let pr=at;do pr.z===0&&(pr.z=R(pr.x,pr.y,wt,Ht,rr)),pr.prevZ=pr.prev,pr.nextZ=pr.next,pr=pr.next;while(pr!==at);pr.prevZ.nextZ=null,pr.prevZ=null,function(Ar){let Vr,ri=1;do{let Ii,Zi=Ar;Ar=null;let da=null;for(Vr=0;Zi;){Vr++;let cn=Zi,jn=0;for(let hl=0;hl0||Va>0&&cn;)jn!==0&&(Va===0||!cn||Zi.z<=cn.z)?(Ii=Zi,Zi=Zi.nextZ,jn--):(Ii=cn,cn=cn.nextZ,Va--),da?da.nextZ=Ii:Ar=Ii,Ii.prevZ=da,da=Ii;Zi=cn}da.nextZ=null,ri*=2}while(Vr>1)}(pr)}(I,Z,ie,pe);let He=I;for(;I.prev!==I.next;){let at=I.prev,wt=I.next;if(pe?Ac(I,Z,ie,pe):If(I))S.push(at.i,I.i,wt.i),It(I),I=wt.next,He=wt.next;else if((I=wt)===He){xe?xe===1?qc(I=zc(vc(I),S),S,D,Z,ie,pe,2):xe===2&&Vu(I,S,D,Z,ie,pe):qc(vc(I),S,D,Z,ie,pe,1);break}}}function If(I){let S=I.prev,D=I,Z=I.next;if(we(S,D,Z)>=0)return!1;let ie=S.x,pe=D.x,xe=Z.x,He=S.y,at=D.y,wt=Z.y,Ht=iepe?ie>xe?ie:xe:pe>xe?pe:xe,Ar=He>at?He>wt?He:wt:at>wt?at:wt,Vr=Z.next;for(;Vr!==S;){if(Vr.x>=Ht&&Vr.x<=pr&&Vr.y>=rr&&Vr.y<=Ar&&N(ie,He,pe,at,xe,wt,Vr.x,Vr.y)&&we(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.next}return!0}function Ac(I,S,D,Z){let ie=I.prev,pe=I,xe=I.next;if(we(ie,pe,xe)>=0)return!1;let He=ie.x,at=pe.x,wt=xe.x,Ht=ie.y,rr=pe.y,pr=xe.y,Ar=Heat?He>wt?He:wt:at>wt?at:wt,Ii=Ht>rr?Ht>pr?Ht:pr:rr>pr?rr:pr,Zi=R(Ar,Vr,S,D,Z),da=R(ri,Ii,S,D,Z),cn=I.prevZ,jn=I.nextZ;for(;cn&&cn.z>=Zi&&jn&&jn.z<=da;){if(cn.x>=Ar&&cn.x<=ri&&cn.y>=Vr&&cn.y<=Ii&&cn!==ie&&cn!==xe&&N(He,Ht,at,rr,wt,pr,cn.x,cn.y)&&we(cn.prev,cn,cn.next)>=0||(cn=cn.prevZ,jn.x>=Ar&&jn.x<=ri&&jn.y>=Vr&&jn.y<=Ii&&jn!==ie&&jn!==xe&&N(He,Ht,at,rr,wt,pr,jn.x,jn.y)&&we(jn.prev,jn,jn.next)>=0))return!1;jn=jn.nextZ}for(;cn&&cn.z>=Zi;){if(cn.x>=Ar&&cn.x<=ri&&cn.y>=Vr&&cn.y<=Ii&&cn!==ie&&cn!==xe&&N(He,Ht,at,rr,wt,pr,cn.x,cn.y)&&we(cn.prev,cn,cn.next)>=0)return!1;cn=cn.prevZ}for(;jn&&jn.z<=da;){if(jn.x>=Ar&&jn.x<=ri&&jn.y>=Vr&&jn.y<=Ii&&jn!==ie&&jn!==xe&&N(He,Ht,at,rr,wt,pr,jn.x,jn.y)&&we(jn.prev,jn,jn.next)>=0)return!1;jn=jn.nextZ}return!0}function zc(I,S){let D=I;do{let Z=D.prev,ie=D.next.next;!ge(Z,ie)&&Ue(Z,D,D.next,ie)&&ur(Z,ie)&&ur(ie,Z)&&(S.push(Z.i,D.i,ie.i),It(D),It(D.next),D=I=ie),D=D.next}while(D!==I);return vc(D)}function Vu(I,S,D,Z,ie,pe){let xe=I;do{let He=xe.next.next;for(;He!==xe.prev;){if(xe.i!==He.i&&$(xe,He)){let at=gr(xe,He);return xe=vc(xe,xe.next),at=vc(at,at.next),qc(xe,S,D,Z,ie,pe,0),void qc(at,S,D,Z,ie,pe,0)}He=He.next}xe=xe.next}while(xe!==I)}function Bc(I,S){return I.x-S.x}function Ou(I,S){let D=function(ie,pe){let xe=pe,He=ie.x,at=ie.y,wt,Ht=-1/0;do{if(at<=xe.y&&at>=xe.next.y&&xe.next.y!==xe.y){let ri=xe.x+(at-xe.y)*(xe.next.x-xe.x)/(xe.next.y-xe.y);if(ri<=He&&ri>Ht&&(Ht=ri,wt=xe.x=xe.x&&xe.x>=pr&&He!==xe.x&&N(atwt.x||xe.x===wt.x&&Y(wt,xe)))&&(wt=xe,Vr=ri)}xe=xe.next}while(xe!==rr);return wt}(I,S);if(!D)return S;let Z=gr(D,I);return vc(Z,Z.next),vc(D,D.next)}function Y(I,S){return we(I.prev,I,S.prev)<0&&we(S.next,I,I.next)<0}function R(I,S,D,Z,ie){return(I=1431655765&((I=858993459&((I=252645135&((I=16711935&((I=(I-D)*ie|0)|I<<8))|I<<4))|I<<2))|I<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-Z)*ie|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function K(I){let S=I,D=I;do(S.x=(I-xe)*(pe-He)&&(I-xe)*(Z-He)>=(D-xe)*(S-He)&&(D-xe)*(pe-He)>=(ie-xe)*(Z-He)}function $(I,S){return I.next.i!==S.i&&I.prev.i!==S.i&&!function(D,Z){let ie=D;do{if(ie.i!==D.i&&ie.next.i!==D.i&&ie.i!==Z.i&&ie.next.i!==Z.i&&Ue(ie,ie.next,D,Z))return!0;ie=ie.next}while(ie!==D);return!1}(I,S)&&(ur(I,S)&&ur(S,I)&&function(D,Z){let ie=D,pe=!1,xe=(D.x+Z.x)/2,He=(D.y+Z.y)/2;do ie.y>He!=ie.next.y>He&&ie.next.y!==ie.y&&xe<(ie.next.x-ie.x)*(He-ie.y)/(ie.next.y-ie.y)+ie.x&&(pe=!pe),ie=ie.next;while(ie!==D);return pe}(I,S)&&(we(I.prev,I,S.prev)||we(I,S.prev,S))||ge(I,S)&&we(I.prev,I,I.next)>0&&we(S.prev,S,S.next)>0)}function we(I,S,D){return(S.y-I.y)*(D.x-S.x)-(S.x-I.x)*(D.y-S.y)}function ge(I,S){return I.x===S.x&&I.y===S.y}function Ue(I,S,D,Z){let ie=Rt(we(I,S,D)),pe=Rt(we(I,S,Z)),xe=Rt(we(D,Z,I)),He=Rt(we(D,Z,S));return ie!==pe&&xe!==He||!(ie!==0||!dt(I,D,S))||!(pe!==0||!dt(I,Z,S))||!(xe!==0||!dt(D,I,Z))||!(He!==0||!dt(D,S,Z))}function dt(I,S,D){return S.x<=Math.max(I.x,D.x)&&S.x>=Math.min(I.x,D.x)&&S.y<=Math.max(I.y,D.y)&&S.y>=Math.min(I.y,D.y)}function Rt(I){return I>0?1:I<0?-1:0}function ur(I,S){return we(I.prev,I,I.next)<0?we(I,S,I.next)>=0&&we(I,I.prev,S)>=0:we(I,S,I.prev)<0||we(I,I.next,S)<0}function gr(I,S){let D=Qt(I.i,I.x,I.y),Z=Qt(S.i,S.x,S.y),ie=I.next,pe=S.prev;return I.next=S,S.prev=I,D.next=ie,ie.prev=D,Z.next=D,D.prev=Z,pe.next=Z,Z.prev=pe,Z}function cr(I,S,D,Z){let ie=Qt(I,S,D);return Z?(ie.next=Z.next,ie.prev=Z,Z.next.prev=ie,Z.next=ie):(ie.prev=ie,ie.next=ie),ie}function It(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function Qt(I,S,D){return{i:I,x:S,y:D,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ar(I,S,D){let Z=D.patternDependencies,ie=!1;for(let pe of S){let xe=pe.paint.get(`${I}-pattern`);xe.isConstant()||(ie=!0);let He=xe.constantOr(null);He&&(ie=!0,Z[He.to]=!0,Z[He.from]=!0)}return ie}function mr(I,S,D,Z,ie){let pe=ie.patternDependencies;for(let xe of S){let He=xe.paint.get(`${I}-pattern`).value;if(He.kind!=="constant"){let at=He.evaluate({zoom:Z-1},D,{},ie.availableImages),wt=He.evaluate({zoom:Z},D,{},ie.availableImages),Ht=He.evaluate({zoom:Z+1},D,{},ie.availableImages);at=at&&at.name?at.name:at,wt=wt&&wt.name?wt.name:wt,Ht=Ht&&Ht.name?Ht.name:Ht,pe[at]=!0,pe[wt]=!0,pe[Ht]=!0,D.patterns[xe.id]={min:at,mid:wt,max:Ht}}}return D}class Pr{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Hu,this.indexArray=new se,this.indexArray2=new Le,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.segments2=new it,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.hasPattern=ar("fill",this.layers,D);let ie=this.layers[0].layout.get("fill-sort-key"),pe=!ie.isConstant(),xe=[];for(let{feature:He,id:at,index:wt,sourceLayerIndex:Ht}of S){let rr=this.layers[0]._featureFilter.needGeometry,pr=ff(He,rr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),pr,Z))continue;let Ar=pe?ie.evaluate(pr,{},Z,D.availableImages):void 0,Vr={id:at,properties:He.properties,type:He.type,sourceLayerIndex:Ht,index:wt,geometry:rr?pr.geometry:of(He),patterns:{},sortKey:Ar};xe.push(Vr)}pe&&xe.sort((He,at)=>He.sortKey-at.sortKey);for(let He of xe){let{geometry:at,index:wt,sourceLayerIndex:Ht}=He;if(this.hasPattern){let rr=mr("fill",this.layers,He,this.zoom,D);this.patternFeatures.push(rr)}else this.addFeature(He,at,wt,Z,{});D.featureIndex.insert(S[wt].feature,at,wt,Ht,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}addFeatures(S,D,Z){for(let ie of this.patternFeatures)this.addFeature(ie,ie.geometry,ie.index,D,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Lc),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.indexBuffer2=S.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(S),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(S,D,Z,ie,pe){for(let xe of ks(D,500)){let He=0;for(let Ar of xe)He+=Ar.length;let at=this.segments.prepareSegment(He,this.layoutVertexArray,this.indexArray),wt=at.vertexLength,Ht=[],rr=[];for(let Ar of xe){if(Ar.length===0)continue;Ar!==xe[0]&&rr.push(Ht.length/2);let Vr=this.segments2.prepareSegment(Ar.length,this.layoutVertexArray,this.indexArray2),ri=Vr.vertexLength;this.layoutVertexArray.emplaceBack(Ar[0].x,Ar[0].y),this.indexArray2.emplaceBack(ri+Ar.length-1,ri),Ht.push(Ar[0].x),Ht.push(Ar[0].y);for(let Ii=1;Ii>3}if(ie--,Z===1||Z===2)pe+=I.readSVarint(),xe+=I.readSVarint(),Z===1&&(S&&He.push(S),S=[]),S.push(new vn(pe,xe));else{if(Z!==7)throw new Error("unknown command "+Z);S&&S.push(S[0].clone())}}return S&&He.push(S),He},ra.prototype.bbox=function(){var I=this._pbf;I.pos=this._geometry;for(var S=I.readVarint()+I.pos,D=1,Z=0,ie=0,pe=0,xe=1/0,He=-1/0,at=1/0,wt=-1/0;I.pos>3}if(Z--,D===1||D===2)(ie+=I.readSVarint())He&&(He=ie),(pe+=I.readSVarint())wt&&(wt=pe);else if(D!==7)throw new Error("unknown command "+D)}return[xe,at,He,wt]},ra.prototype.toGeoJSON=function(I,S,D){var Z,ie,pe=this.extent*Math.pow(2,D),xe=this.extent*I,He=this.extent*S,at=this.loadGeometry(),wt=ra.types[this.type];function Ht(Ar){for(var Vr=0;Vr>3;ie=xe===1?Z.readString():xe===2?Z.readFloat():xe===3?Z.readDouble():xe===4?Z.readVarint64():xe===5?Z.readVarint():xe===6?Z.readSVarint():xe===7?Z.readBoolean():null}return ie}(D))}fs.prototype.feature=function(I){if(I<0||I>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[I];var S=this._pbf.readVarint()+this._pbf.pos;return new Os(this._pbf,S,this.extent,this._keys,this._values)};var $s=eo;function Ml(I,S,D){if(I===3){var Z=new $s(D,D.readVarint()+D.pos);Z.length&&(S[Z.name]=Z)}}qi.VectorTile=function(I,S){this.layers=I.readFields(Ml,{},S)},qi.VectorTileFeature=Qa,qi.VectorTileLayer=eo;let Mu=qi.VectorTileFeature.types,Au=Math.pow(2,13);function $u(I,S,D,Z,ie,pe,xe,He){I.emplaceBack(S,D,2*Math.floor(Z*Au)+xe,ie*Au*2,pe*Au*2,Math.round(He))}class du{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new tf,this.centroidVertexArray=new Jl,this.indexArray=new se,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.features=[],this.hasPattern=ar("fill-extrusion",this.layers,D);for(let{feature:ie,id:pe,index:xe,sourceLayerIndex:He}of S){let at=this.layers[0]._featureFilter.needGeometry,wt=ff(ie,at);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),wt,Z))continue;let Ht={id:pe,sourceLayerIndex:He,index:xe,geometry:at?wt.geometry:of(ie),properties:ie.properties,type:ie.type,patterns:{}};this.hasPattern?this.features.push(mr("fill-extrusion",this.layers,Ht,this.zoom,D)):this.addFeature(Ht,Ht.geometry,xe,Z,{}),D.featureIndex.insert(ie,Ht.geometry,xe,He,this.index,!0)}}addFeatures(S,D,Z){for(let ie of this.features){let{geometry:pe}=ie;this.addFeature(ie,pe,ie.index,D,Z)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,yi),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,Cr.members,!0),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(S,D,Z,ie,pe){for(let xe of ks(D,500)){let He={x:0,y:0,vertexCount:0},at=0;for(let Vr of xe)at+=Vr.length;let wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Vr of xe){if(Vr.length===0||yf(Vr))continue;let ri=0;for(let Ii=0;Ii=1){let da=Vr[Ii-1];if(!Nu(Zi,da)){wt.vertexLength+4>it.MAX_VERTEX_ARRAY_LENGTH&&(wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let cn=Zi.sub(da)._perp()._unit(),jn=da.dist(Zi);ri+jn>32768&&(ri=0),$u(this.layoutVertexArray,Zi.x,Zi.y,cn.x,cn.y,0,0,ri),$u(this.layoutVertexArray,Zi.x,Zi.y,cn.x,cn.y,0,1,ri),He.x+=2*Zi.x,He.y+=2*Zi.y,He.vertexCount+=2,ri+=jn,$u(this.layoutVertexArray,da.x,da.y,cn.x,cn.y,0,0,ri),$u(this.layoutVertexArray,da.x,da.y,cn.x,cn.y,0,1,ri),He.x+=2*da.x,He.y+=2*da.y,He.vertexCount+=2;let Va=wt.vertexLength;this.indexArray.emplaceBack(Va,Va+2,Va+1),this.indexArray.emplaceBack(Va+1,Va+2,Va+3),wt.vertexLength+=4,wt.primitiveLength+=2}}}}if(wt.vertexLength+at>it.MAX_VERTEX_ARRAY_LENGTH&&(wt=this.segments.prepareSegment(at,this.layoutVertexArray,this.indexArray)),Mu[S.type]!=="Polygon")continue;let Ht=[],rr=[],pr=wt.vertexLength;for(let Vr of xe)if(Vr.length!==0){Vr!==xe[0]&&rr.push(Ht.length/2);for(let ri=0;riRl)||I.y===S.y&&(I.y<0||I.y>Rl)}function yf(I){return I.every(S=>S.x<0)||I.every(S=>S.x>Rl)||I.every(S=>S.y<0)||I.every(S=>S.y>Rl)}let Kf;gi("FillExtrusionBucket",du,{omit:["layers","features"]});var wd={get paint(){return Kf=Kf||new oe({"fill-extrusion-opacity":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new _s(fe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Bl(fe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new _s(fe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new _s(fe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Td extends B{constructor(S){super(S,wd)}createBucket(S){return new du(S)}queryRadius(){return su(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(S,D,Z,ie,pe,xe,He,at){let wt=Ps(S,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),xe.angle,He),Ht=this.paint.get("fill-extrusion-height").evaluate(D,Z),rr=this.paint.get("fill-extrusion-base").evaluate(D,Z),pr=function(Vr,ri,Ii,Zi){let da=[];for(let cn of Vr){let jn=[cn.x,cn.y,0,1];ru(jn,jn,ri),da.push(new l(jn[0]/jn[3],jn[1]/jn[3]))}return da}(wt,at),Ar=function(Vr,ri,Ii,Zi){let da=[],cn=[],jn=Zi[8]*ri,Va=Zi[9]*ri,hl=Zi[10]*ri,iu=Zi[11]*ri,Su=Zi[8]*Ii,Zl=Zi[9]*Ii,Qs=Zi[10]*Ii,gu=Zi[11]*Ii;for(let cu of Vr){let uu=[],Ts=[];for(let wu of cu){let fu=wu.x,Lu=wu.y,oc=Zi[0]*fu+Zi[4]*Lu+Zi[12],tc=Zi[1]*fu+Zi[5]*Lu+Zi[13],Ch=Zi[2]*fu+Zi[6]*Lu+Zi[14],$p=Zi[3]*fu+Zi[7]*Lu+Zi[15],ud=Ch+hl,Lh=$p+iu,Wd=oc+Su,jd=tc+Zl,Zd=Ch+Qs,Kc=$p+gu,zh=new l((oc+jn)/Lh,(tc+Va)/Lh);zh.z=ud/Lh,uu.push(zh);let Cd=new l(Wd/Kc,jd/Kc);Cd.z=Zd/Kc,Ts.push(Cd)}da.push(uu),cn.push(Ts)}return[da,cn]}(ie,rr,Ht,at);return function(Vr,ri,Ii){let Zi=1/0;jr(Ii,ri)&&(Zi=Yp(Ii,ri[0]));for(let da=0;daD.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(D=>{this.gradients[D.id]={}}),this.layoutVertexArray=new Ku,this.layoutVertexArray2=new Gu,this.indexArray=new se,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.hasPattern=ar("line",this.layers,D);let ie=this.layers[0].layout.get("line-sort-key"),pe=!ie.isConstant(),xe=[];for(let{feature:He,id:at,index:wt,sourceLayerIndex:Ht}of S){let rr=this.layers[0]._featureFilter.needGeometry,pr=ff(He,rr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),pr,Z))continue;let Ar=pe?ie.evaluate(pr,{},Z):void 0,Vr={id:at,properties:He.properties,type:He.type,sourceLayerIndex:Ht,index:wt,geometry:rr?pr.geometry:of(He),patterns:{},sortKey:Ar};xe.push(Vr)}pe&&xe.sort((He,at)=>He.sortKey-at.sortKey);for(let He of xe){let{geometry:at,index:wt,sourceLayerIndex:Ht}=He;if(this.hasPattern){let rr=mr("line",this.layers,He,this.zoom,D);this.patternFeatures.push(rr)}else this.addFeature(He,at,wt,Z,{});D.featureIndex.insert(S[wt].feature,at,wt,Ht,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}addFeatures(S,D,Z){for(let ie of this.patternFeatures)this.addFeature(ie,ie.geometry,ie.index,D,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=S.createVertexBuffer(this.layoutVertexArray2,vv)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,pv),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(S){if(S.properties&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_end"))return{start:+S.properties.mapbox_clip_start,end:+S.properties.mapbox_clip_end}}addFeature(S,D,Z,ie,pe){let xe=this.layers[0].layout,He=xe.get("line-join").evaluate(S,{}),at=xe.get("line-cap"),wt=xe.get("line-miter-limit"),Ht=xe.get("line-round-limit");this.lineClips=this.lineFeatureClips(S);for(let rr of D)this.addLine(rr,S,He,at,wt,Ht);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,pe,ie)}addLine(S,D,Z,ie,pe,xe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Zi=0;Zi=2&&S[at-1].equals(S[at-2]);)at--;let wt=0;for(;wt0;if(iu&&Zi>wt){let gu=pr.dist(Ar);if(gu>2*Ht){let cu=pr.sub(pr.sub(Ar)._mult(Ht/gu)._round());this.updateDistance(Ar,cu),this.addCurrentVertex(cu,ri,0,0,rr),Ar=cu}}let Zl=Ar&&Vr,Qs=Zl?Z:He?"butt":ie;if(Zl&&Qs==="round"&&(Vape&&(Qs="bevel"),Qs==="bevel"&&(Va>2&&(Qs="flipbevel"),Va100)da=Ii.mult(-1);else{let gu=Va*ri.add(Ii).mag()/ri.sub(Ii).mag();da._perp()._mult(gu*(Su?-1:1))}this.addCurrentVertex(pr,da,0,0,rr),this.addCurrentVertex(pr,da.mult(-1),0,0,rr)}else if(Qs==="bevel"||Qs==="fakeround"){let gu=-Math.sqrt(Va*Va-1),cu=Su?gu:0,uu=Su?0:gu;if(Ar&&this.addCurrentVertex(pr,ri,cu,uu,rr),Qs==="fakeround"){let Ts=Math.round(180*hl/Math.PI/20);for(let wu=1;wu2*Ht){let cu=pr.add(Vr.sub(pr)._mult(Ht/gu)._round());this.updateDistance(pr,cu),this.addCurrentVertex(cu,Ii,0,0,rr),pr=cu}}}}addCurrentVertex(S,D,Z,ie,pe,xe=!1){let He=D.y*ie-D.x,at=-D.y-D.x*ie;this.addHalfVertex(S,D.x+D.y*Z,D.y-D.x*Z,xe,!1,Z,pe),this.addHalfVertex(S,He,at,xe,!0,-ie,pe),this.distance>kp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,D,Z,ie,pe,xe))}addHalfVertex({x:S,y:D},Z,ie,pe,xe,He,at){let wt=.5*(this.lineClips?this.scaledDistance*(kp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(pe?1:0),(D<<1)+(xe?1:0),Math.round(63*Z)+128,Math.round(63*ie)+128,1+(He===0?0:He<0?-1:1)|(63&wt)<<2,wt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Ht=at.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Ht),at.primitiveLength++),xe?this.e2=Ht:this.e1=Ht}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,D){this.distance+=S.dist(D),this.updateScaledDistance()}}let Cp,ng;gi("LineBucket",Kp,{omit:["layers","patternFeatures"]});var cy={get paint(){return ng=ng||new oe({"line-opacity":new _s(fe.paint_line["line-opacity"]),"line-color":new _s(fe.paint_line["line-color"]),"line-translate":new Uo(fe.paint_line["line-translate"]),"line-translate-anchor":new Uo(fe.paint_line["line-translate-anchor"]),"line-width":new _s(fe.paint_line["line-width"]),"line-gap-width":new _s(fe.paint_line["line-gap-width"]),"line-offset":new _s(fe.paint_line["line-offset"]),"line-blur":new _s(fe.paint_line["line-blur"]),"line-dasharray":new Il(fe.paint_line["line-dasharray"]),"line-pattern":new Bl(fe.paint_line["line-pattern"]),"line-gradient":new Dl(fe.paint_line["line-gradient"])})},get layout(){return Cp=Cp||new oe({"line-cap":new Uo(fe.layout_line["line-cap"]),"line-join":new _s(fe.layout_line["line-join"]),"line-miter-limit":new Uo(fe.layout_line["line-miter-limit"]),"line-round-limit":new Uo(fe.layout_line["line-round-limit"]),"line-sort-key":new _s(fe.layout_line["line-sort-key"])})}};class vh extends _s{possiblyEvaluate(S,D){return D=new Fo(Math.floor(D.zoom),{now:D.now,fadeDuration:D.fadeDuration,zoomHistory:D.zoomHistory,transition:D.transition}),super.possiblyEvaluate(S,D)}evaluate(S,D,Z,ie){return D=L({},D,{zoom:Math.floor(D.zoom)}),super.evaluate(S,D,Z,ie)}}let hy;class ag extends B{constructor(S){super(S,cy),this.gradientVersion=0,hy||(hy=new vh(cy.paint.properties["line-width"].specification),hy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S==="line-gradient"){let D=this.gradientExpression();this.stepInterpolant=!!function(Z){return Z._styleExpression!==void 0}(D)&&D._styleExpression.expression instanceof Ui,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(S,D){super.recalculate(S,D),this.paint._values["line-floorwidth"]=hy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,S)}createBucket(S){return new Kp(S)}queryRadius(S){let D=S,Z=jh(is("line-width",this,D),is("line-gap-width",this,D)),ie=is("line-offset",this,D);return Z/2+Math.abs(ie)+su(this.paint.get("line-translate"))}queryIntersectsFeature(S,D,Z,ie,pe,xe,He){let at=Ps(S,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),xe.angle,He),wt=He/2*jh(this.paint.get("line-width").evaluate(D,Z),this.paint.get("line-gap-width").evaluate(D,Z)),Ht=this.paint.get("line-offset").evaluate(D,Z);return Ht&&(ie=function(rr,pr){let Ar=[];for(let Vr=0;Vr=3){for(let Ii=0;Ii0?S+2*I:I}let rm=Ne([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),w1=Ne([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ne([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let T1=Ne([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Ne([{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 og=Ne([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),im=Ne([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function nm(I,S,D){return I.sections.forEach(Z=>{Z.text=function(ie,pe,xe){let He=pe.layout.get("text-transform").evaluate(xe,{});return He==="uppercase"?ie=ie.toLocaleUpperCase():He==="lowercase"&&(ie=ie.toLocaleLowerCase()),zs.applyArabicShaping&&(ie=zs.applyArabicShaping(ie)),ie}(Z.text,S,D)}),I}Ne([{name:"triangle",components:3,type:"Uint16"}]),Ne([{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"}]),Ne([{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"}]),Ne([{type:"Float32",name:"offsetX"}]),Ne([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Ne([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let yc={"!":"\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 Ff=24,Ed=Zf,sg=function(I,S,D,Z,ie){var pe,xe,He=8*ie-Z-1,at=(1<>1,Ht=-7,rr=D?ie-1:0,pr=D?-1:1,Ar=I[S+rr];for(rr+=pr,pe=Ar&(1<<-Ht)-1,Ar>>=-Ht,Ht+=He;Ht>0;pe=256*pe+I[S+rr],rr+=pr,Ht-=8);for(xe=pe&(1<<-Ht)-1,pe>>=-Ht,Ht+=Z;Ht>0;xe=256*xe+I[S+rr],rr+=pr,Ht-=8);if(pe===0)pe=1-wt;else{if(pe===at)return xe?NaN:1/0*(Ar?-1:1);xe+=Math.pow(2,Z),pe-=wt}return(Ar?-1:1)*xe*Math.pow(2,pe-Z)},A1=function(I,S,D,Z,ie,pe){var xe,He,at,wt=8*pe-ie-1,Ht=(1<>1,pr=ie===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ar=Z?0:pe-1,Vr=Z?1:-1,ri=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(He=isNaN(S)?1:0,xe=Ht):(xe=Math.floor(Math.log(S)/Math.LN2),S*(at=Math.pow(2,-xe))<1&&(xe--,at*=2),(S+=xe+rr>=1?pr/at:pr*Math.pow(2,1-rr))*at>=2&&(xe++,at/=2),xe+rr>=Ht?(He=0,xe=Ht):xe+rr>=1?(He=(S*at-1)*Math.pow(2,ie),xe+=rr):(He=S*Math.pow(2,rr-1)*Math.pow(2,ie),xe=0));ie>=8;I[D+Ar]=255&He,Ar+=Vr,He/=256,ie-=8);for(xe=xe<0;I[D+Ar]=255&xe,Ar+=Vr,xe/=256,wt-=8);I[D+Ar-Vr]|=128*ri};function Zf(I){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(I)?I:new Uint8Array(I||0),this.pos=0,this.type=0,this.length=this.buf.length}Zf.Varint=0,Zf.Fixed64=1,Zf.Bytes=2,Zf.Fixed32=5;var Ox=4294967296,am=1/Ox,Mw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Lp(I){return I.type===Zf.Bytes?I.readVarint()+I.pos:I.pos+1}function om(I,S,D){return D?4294967296*S+(I>>>0):4294967296*(S>>>0)+(I>>>0)}function Ew(I,S,D){var Z=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));D.realloc(Z);for(var ie=D.pos-1;ie>=I;ie--)D.buf[ie+Z]=D.buf[ie]}function Nx(I,S){for(var D=0;D>>8,I[D+2]=S>>>16,I[D+3]=S>>>24}function lC(I,S){return(I[S]|I[S+1]<<8|I[S+2]<<16)+(I[S+3]<<24)}Zf.prototype={destroy:function(){this.buf=null},readFields:function(I,S,D){for(D=D||this.length;this.pos>3,pe=this.pos;this.type=7&Z,I(ie,S,this),this.pos===pe&&this.skip(Z)}return S},readMessage:function(I,S){return this.readFields(I,S,this.readVarint()+this.pos)},readFixed32:function(){var I=lg(this.buf,this.pos);return this.pos+=4,I},readSFixed32:function(){var I=lC(this.buf,this.pos);return this.pos+=4,I},readFixed64:function(){var I=lg(this.buf,this.pos)+lg(this.buf,this.pos+4)*Ox;return this.pos+=8,I},readSFixed64:function(){var I=lg(this.buf,this.pos)+lC(this.buf,this.pos+4)*Ox;return this.pos+=8,I},readFloat:function(){var I=sg(this.buf,this.pos,!0,23,4);return this.pos+=4,I},readDouble:function(){var I=sg(this.buf,this.pos,!0,52,8);return this.pos+=8,I},readVarint:function(I){var S,D,Z=this.buf;return S=127&(D=Z[this.pos++]),D<128?S:(S|=(127&(D=Z[this.pos++]))<<7,D<128?S:(S|=(127&(D=Z[this.pos++]))<<14,D<128?S:(S|=(127&(D=Z[this.pos++]))<<21,D<128?S:function(ie,pe,xe){var He,at,wt=xe.buf;if(He=(112&(at=wt[xe.pos++]))>>4,at<128||(He|=(127&(at=wt[xe.pos++]))<<3,at<128)||(He|=(127&(at=wt[xe.pos++]))<<10,at<128)||(He|=(127&(at=wt[xe.pos++]))<<17,at<128)||(He|=(127&(at=wt[xe.pos++]))<<24,at<128)||(He|=(1&(at=wt[xe.pos++]))<<31,at<128))return om(ie,He,pe);throw new Error("Expected varint not more than 10 bytes")}(S|=(15&(D=Z[this.pos]))<<28,I,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var I=this.readVarint();return I%2==1?(I+1)/-2:I/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var I=this.readVarint()+this.pos,S=this.pos;return this.pos=I,I-S>=12&&Mw?function(D,Z,ie){return Mw.decode(D.subarray(Z,ie))}(this.buf,S,I):function(D,Z,ie){for(var pe="",xe=Z;xe239?4:Ht>223?3:Ht>191?2:1;if(xe+pr>ie)break;pr===1?Ht<128&&(rr=Ht):pr===2?(192&(He=D[xe+1]))==128&&(rr=(31&Ht)<<6|63&He)<=127&&(rr=null):pr===3?(at=D[xe+2],(192&(He=D[xe+1]))==128&&(192&at)==128&&((rr=(15&Ht)<<12|(63&He)<<6|63&at)<=2047||rr>=55296&&rr<=57343)&&(rr=null)):pr===4&&(at=D[xe+2],wt=D[xe+3],(192&(He=D[xe+1]))==128&&(192&at)==128&&(192&wt)==128&&((rr=(15&Ht)<<18|(63&He)<<12|(63&at)<<6|63&wt)<=65535||rr>=1114112)&&(rr=null)),rr===null?(rr=65533,pr=1):rr>65535&&(rr-=65536,pe+=String.fromCharCode(rr>>>10&1023|55296),rr=56320|1023&rr),pe+=String.fromCharCode(rr),xe+=pr}return pe}(this.buf,S,I)},readBytes:function(){var I=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,I);return this.pos=I,S},readPackedVarint:function(I,S){if(this.type!==Zf.Bytes)return I.push(this.readVarint(S));var D=Lp(this);for(I=I||[];this.pos127;);else if(S===Zf.Bytes)this.pos=this.readVarint()+this.pos;else if(S===Zf.Fixed32)this.pos+=4;else{if(S!==Zf.Fixed64)throw new Error("Unimplemented type: "+S);this.pos+=8}},writeTag:function(I,S){this.writeVarint(I<<3|S)},realloc:function(I){for(var S=this.length||16;S268435455||I<0?function(S,D){var Z,ie;if(S>=0?(Z=S%4294967296|0,ie=S/4294967296|0):(ie=~(-S/4294967296),4294967295^(Z=~(-S%4294967296))?Z=Z+1|0:(Z=0,ie=ie+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),function(pe,xe,He){He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,He.buf[He.pos]=127&(pe>>>=7)}(Z,0,D),function(pe,xe){var He=(7&pe)<<4;xe.buf[xe.pos++]|=He|((pe>>>=3)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe)))))}(ie,D)}(I,this):(this.realloc(4),this.buf[this.pos++]=127&I|(I>127?128:0),I<=127||(this.buf[this.pos++]=127&(I>>>=7)|(I>127?128:0),I<=127||(this.buf[this.pos++]=127&(I>>>=7)|(I>127?128:0),I<=127||(this.buf[this.pos++]=I>>>7&127))))},writeSVarint:function(I){this.writeVarint(I<0?2*-I-1:2*I)},writeBoolean:function(I){this.writeVarint(!!I)},writeString:function(I){I=String(I),this.realloc(4*I.length),this.pos++;var S=this.pos;this.pos=function(Z,ie,pe){for(var xe,He,at=0;at55295&&xe<57344){if(!He){xe>56319||at+1===ie.length?(Z[pe++]=239,Z[pe++]=191,Z[pe++]=189):He=xe;continue}if(xe<56320){Z[pe++]=239,Z[pe++]=191,Z[pe++]=189,He=xe;continue}xe=He-55296<<10|xe-56320|65536,He=null}else He&&(Z[pe++]=239,Z[pe++]=191,Z[pe++]=189,He=null);xe<128?Z[pe++]=xe:(xe<2048?Z[pe++]=xe>>6|192:(xe<65536?Z[pe++]=xe>>12|224:(Z[pe++]=xe>>18|240,Z[pe++]=xe>>12&63|128),Z[pe++]=xe>>6&63|128),Z[pe++]=63&xe|128)}return pe}(this.buf,I,this.pos);var D=this.pos-S;D>=128&&Ew(S,D,this),this.pos=S-1,this.writeVarint(D),this.pos+=D},writeFloat:function(I){this.realloc(4),A1(this.buf,I,this.pos,!0,23,4),this.pos+=4},writeDouble:function(I){this.realloc(8),A1(this.buf,I,this.pos,!0,52,8),this.pos+=8},writeBytes:function(I){var S=I.length;this.writeVarint(S),this.realloc(S);for(var D=0;D=128&&Ew(D,Z,this),this.pos=D-1,this.writeVarint(Z),this.pos+=Z},writeMessage:function(I,S,D){this.writeTag(I,Zf.Bytes),this.writeRawMessage(S,D)},writePackedVarint:function(I,S){S.length&&this.writeMessage(I,Nx,S)},writePackedSVarint:function(I,S){S.length&&this.writeMessage(I,N8,S)},writePackedBoolean:function(I,S){S.length&&this.writeMessage(I,H8,S)},writePackedFloat:function(I,S){S.length&&this.writeMessage(I,U8,S)},writePackedDouble:function(I,S){S.length&&this.writeMessage(I,V8,S)},writePackedFixed32:function(I,S){S.length&&this.writeMessage(I,EQ,S)},writePackedSFixed32:function(I,S){S.length&&this.writeMessage(I,G8,S)},writePackedFixed64:function(I,S){S.length&&this.writeMessage(I,W8,S)},writePackedSFixed64:function(I,S){S.length&&this.writeMessage(I,j8,S)},writeBytesField:function(I,S){this.writeTag(I,Zf.Bytes),this.writeBytes(S)},writeFixed32Field:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeSFixed64(S)},writeVarintField:function(I,S){this.writeTag(I,Zf.Varint),this.writeVarint(S)},writeSVarintField:function(I,S){this.writeTag(I,Zf.Varint),this.writeSVarint(S)},writeStringField:function(I,S){this.writeTag(I,Zf.Bytes),this.writeString(S)},writeFloatField:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeFloat(S)},writeDoubleField:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeDouble(S)},writeBooleanField:function(I,S){this.writeVarintField(I,!!S)}};var tM=o(Ed);let rM=3;function kQ(I,S,D){I===1&&D.readMessage(Z8,S)}function Z8(I,S,D){if(I===3){let{id:Z,bitmap:ie,width:pe,height:xe,left:He,top:at,advance:wt}=D.readMessage(uC,{});S.push({id:Z,bitmap:new bu({width:pe+2*rM,height:xe+2*rM},ie),metrics:{width:pe,height:xe,left:He,top:at,advance:wt}})}}function uC(I,S,D){I===1?S.id=D.readVarint():I===2?S.bitmap=D.readBytes():I===3?S.width=D.readVarint():I===4?S.height=D.readVarint():I===5?S.left=D.readSVarint():I===6?S.top=D.readSVarint():I===7&&(S.advance=D.readVarint())}let fC=rM;function iM(I){let S=0,D=0;for(let xe of I)S+=xe.w*xe.h,D=Math.max(D,xe.w);I.sort((xe,He)=>He.h-xe.h);let Z=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),D),h:1/0}],ie=0,pe=0;for(let xe of I)for(let He=Z.length-1;He>=0;He--){let at=Z[He];if(!(xe.w>at.w||xe.h>at.h)){if(xe.x=at.x,xe.y=at.y,pe=Math.max(pe,xe.y+xe.h),ie=Math.max(ie,xe.x+xe.w),xe.w===at.w&&xe.h===at.h){let wt=Z.pop();He=0&&Z>=S&&Lw[this.text.charCodeAt(Z)];Z--)D--;this.text=this.text.substring(S,D),this.sectionIndex=this.sectionIndex.slice(S,D)}substring(S,D){let Z=new S1;return Z.text=this.text.substring(S,D),Z.sectionIndex=this.sectionIndex.slice(S,D),Z.sections=this.sections,Z}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,D)=>Math.max(S,this.sections[D].scale),0)}addTextSection(S,D){this.text+=S.text,this.sections.push(Vx.forText(S.scale,S.fontStack||D));let Z=this.sections.length-1;for(let ie=0;ie=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hx(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr){let ri=S1.fromFeature(I,ie),Ii;rr===i.ah.vertical&&ri.verticalizePunctuation();let{processBidirectionalText:Zi,processStyledBidirectionalText:da}=zs;if(Zi&&ri.sections.length===1){Ii=[];let Va=Zi(ri.toString(),M1(ri,wt,pe,S,Z,Ar));for(let hl of Va){let iu=new S1;iu.text=hl,iu.sections=ri.sections;for(let Su=0;Su0&&ev>rh&&(rh=ev)}else{let Pc=iu[qf.fontStack],uh=Pc&&Pc[sc];if(uh&&uh.rect)P1=uh.rect,Hc=uh.metrics;else{let ev=hl[qf.fontStack],yy=ev&&ev[sc];if(!yy)continue;Hc=yy.metrics}Ip=(zh-qf.scale)*Ff}Qp?(Va.verticalizable=!0,Zh.push({glyph:sc,imageName:v0,x:Lu,y:oc+Ip,vertical:Qp,scale:qf.scale,fontStack:qf.fontStack,sectionIndex:mc,metrics:Hc,rect:P1}),Lu+=Gv*qf.scale+Ts):(Zh.push({glyph:sc,imageName:v0,x:Lu,y:oc+Ip,vertical:Qp,scale:qf.scale,fontStack:qf.fontStack,sectionIndex:mc,metrics:Hc,rect:P1}),Lu+=Hc.advance*qf.scale+Ts)}Zh.length!==0&&(tc=Math.max(Lu-Ts,tc),sm(Zh,0,Zh.length-1,$p,rh)),Lu=0;let Pp=Qs*zh+rh;fd.lineOffset=Math.max(rh,Cd),oc+=Pp,Ch=Math.max(Pp,Ch),++ud}var Lh;let Wd=oc-kh,{horizontalAlign:jd,verticalAlign:Zd}=Pw(gu);(function(Kc,zh,Cd,fd,Zh,rh,Pp,fp,qf){let mc=(zh-Cd)*Zh,sc=0;sc=rh!==Pp?-fp*fd-kh:(-fd*qf+.5)*Pp;for(let Ip of Kc)for(let Hc of Ip.positionedGlyphs)Hc.x+=mc,Hc.y+=sc})(Va.positionedLines,$p,jd,Zd,tc,Ch,Qs,Wd,Zl.length),Va.top+=-Zd*Wd,Va.bottom=Va.top+Wd,Va.left+=-jd*tc,Va.right=Va.left+tc}(jn,S,D,Z,Ii,xe,He,at,rr,wt,pr,Vr),!function(Va){for(let hl of Va)if(hl.positionedGlyphs.length!==0)return!1;return!0}(cn)&&jn}let Lw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},X8={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},Y8={40:!0};function cC(I,S,D,Z,ie,pe){if(S.imageName){let xe=Z[S.imageName];return xe?xe.displaySize[0]*S.scale*Ff/pe+ie:0}{let xe=D[S.fontStack],He=xe&&xe[I];return He?He.metrics.advance*S.scale+ie:0}}function hC(I,S,D,Z){let ie=Math.pow(I-S,2);return Z?I=0,wt=0;for(let rr=0;rrwt){let Ht=Math.ceil(pe/wt);ie*=Ht/xe,xe=Ht}return{x1:Z,y1:ie,x2:Z+pe,y2:ie+xe}}function vC(I,S,D,Z,ie,pe){let xe=I.image,He;if(xe.content){let Ii=xe.content,Zi=xe.pixelRatio||1;He=[Ii[0]/Zi,Ii[1]/Zi,xe.displaySize[0]-Ii[2]/Zi,xe.displaySize[1]-Ii[3]/Zi]}let at=S.left*pe,wt=S.right*pe,Ht,rr,pr,Ar;D==="width"||D==="both"?(Ar=ie[0]+at-Z[3],rr=ie[0]+wt+Z[1]):(Ar=ie[0]+(at+wt-xe.displaySize[0])/2,rr=Ar+xe.displaySize[0]);let Vr=S.top*pe,ri=S.bottom*pe;return D==="height"||D==="both"?(Ht=ie[1]+Vr-Z[0],pr=ie[1]+ri+Z[2]):(Ht=ie[1]+(Vr+ri-xe.displaySize[1])/2,pr=Ht+xe.displaySize[1]),{image:xe,top:Ht,right:rr,bottom:pr,left:Ar,collisionPadding:He}}let Wx=255,p0=128,lm=Wx*p0;function yC(I,S){let{expression:D}=S;if(D.kind==="constant")return{kind:"constant",layoutSize:D.evaluate(new Fo(I+1))};if(D.kind==="source")return{kind:"source"};{let{zoomStops:Z,interpolationType:ie}=D,pe=0;for(;pexe.id),this.index=S.index,this.pixelRatio=S.pixelRatio,this.sourceLayerIndex=S.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ws([]),this.placementViewportMatrix=Ws([]);let D=this.layers[0]._unevaluatedLayout._values;this.textSizeData=yC(this.zoom,D["text-size"]),this.iconSizeData=yC(this.zoom,D["icon-size"]);let Z=this.layers[0].layout,ie=Z.get("symbol-sort-key"),pe=Z.get("symbol-z-order");this.canOverlap=nM(Z,"text-overlap","text-allow-overlap")!=="never"||nM(Z,"icon-overlap","icon-allow-overlap")!=="never"||Z.get("text-ignore-placement")||Z.get("icon-ignore-placement"),this.sortFeaturesByKey=pe!=="viewport-y"&&!ie.isConstant(),this.sortFeaturesByY=(pe==="viewport-y"||pe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,Z.get("symbol-placement")==="point"&&(this.writingModes=Z.get("text-writing-mode").map(xe=>i.ah[xe])),this.stateDependentLayerIds=this.layers.filter(xe=>xe.isStateDependent()).map(xe=>xe.id),this.sourceID=S.sourceID}createArrays(){this.text=new sM(new qu(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new sM(new qu(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new $l,this.lineVertexArray=new pl,this.symbolInstances=new il,this.textAnchorOffsets=new Ll}calculateGlyphDependencies(S,D,Z,ie,pe){for(let xe=0;xe0)&&(xe.value.kind!=="constant"||xe.value.value.length>0),Ht=at.value.kind!=="constant"||!!at.value.value||Object.keys(at.parameters).length>0,rr=pe.get("symbol-sort-key");if(this.features=[],!wt&&!Ht)return;let pr=D.iconDependencies,Ar=D.glyphDependencies,Vr=D.availableImages,ri=new Fo(this.zoom);for(let{feature:Ii,id:Zi,index:da,sourceLayerIndex:cn}of S){let jn=ie._featureFilter.needGeometry,Va=ff(Ii,jn);if(!ie._featureFilter.filter(ri,Va,Z))continue;let hl,iu;if(jn||(Va.geometry=of(Ii)),wt){let Zl=ie.getValueAndResolveTokens("text-field",Va,Z,Vr),Qs=zr.factory(Zl),gu=this.hasRTLText=this.hasRTLText||oM(Qs);(!gu||zs.getRTLTextPluginStatus()==="unavailable"||gu&&zs.isParsed())&&(hl=nm(Qs,ie,Va))}if(Ht){let Zl=ie.getValueAndResolveTokens("icon-image",Va,Z,Vr);iu=Zl instanceof oi?Zl:oi.fromString(Zl)}if(!hl&&!iu)continue;let Su=this.sortFeaturesByKey?rr.evaluate(Va,{},Z):void 0;if(this.features.push({id:Zi,text:hl,icon:iu,index:da,sourceLayerIndex:cn,geometry:Va.geometry,properties:Ii.properties,type:J8[Ii.type],sortKey:Su}),iu&&(pr[iu.name]=!0),hl){let Zl=xe.evaluate(Va,{},Z).join(","),Qs=pe.get("text-rotation-alignment")!=="viewport"&&pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let gu of hl.sections)if(gu.image)pr[gu.image.name]=!0;else{let cu=Lo(hl.toString()),uu=gu.fontStack||Zl,Ts=Ar[uu]=Ar[uu]||{};this.calculateGlyphDependencies(gu.text,Ts,Qs,this.allowVerticalPlacement,cu)}}}pe.get("symbol-placement")==="line"&&(this.features=function(Ii){let Zi={},da={},cn=[],jn=0;function Va(Zl){cn.push(Ii[Zl]),jn++}function hl(Zl,Qs,gu){let cu=da[Zl];return delete da[Zl],da[Qs]=cu,cn[cu].geometry[0].pop(),cn[cu].geometry[0]=cn[cu].geometry[0].concat(gu[0]),cu}function iu(Zl,Qs,gu){let cu=Zi[Qs];return delete Zi[Qs],Zi[Zl]=cu,cn[cu].geometry[0].shift(),cn[cu].geometry[0]=gu[0].concat(cn[cu].geometry[0]),cu}function Su(Zl,Qs,gu){let cu=gu?Qs[0][Qs[0].length-1]:Qs[0][0];return`${Zl}:${cu.x}:${cu.y}`}for(let Zl=0;ZlZl.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ii,Zi)=>Ii.sortKey-Zi.sortKey)}update(S,D,Z){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,D,this.layers,Z),this.icon.programConfigurations.updatePaintArrays(S,D,this.layers,Z))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(S){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(S),this.iconCollisionBox.upload(S)),this.text.upload(S,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(S,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(S,D){let Z=this.lineVertexArray.length;if(S.segment!==void 0){let ie=S.dist(D[S.segment+1]),pe=S.dist(D[S.segment]),xe={};for(let He=S.segment+1;He=0;He--)xe[He]={x:D[He].x,y:D[He].y,tileUnitDistanceFromAnchor:pe},He>0&&(pe+=D[He-1].dist(D[He]));for(let He=0;He0}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(S,D){let Z=S.placedSymbolArray.get(D),ie=Z.vertexStartIndex+4*Z.numGlyphs;for(let pe=Z.vertexStartIndex;peie[He]-ie[at]||pe[at]-pe[He]),xe}addToSortKeyRanges(S,D){let Z=this.sortKeyRanges[this.sortKeyRanges.length-1];Z&&Z.sortKey===D?Z.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:D,symbolInstanceStart:S,symbolInstanceEnd:S+1})}sortFeatures(S){if(this.sortFeaturesByY&&this.sortedAngle!==S&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let D of this.symbolInstanceIndexes){let Z=this.symbolInstances.get(D);this.featureSortOrder.push(Z.featureIndex),[Z.rightJustifiedTextSymbolIndex,Z.centerJustifiedTextSymbolIndex,Z.leftJustifiedTextSymbolIndex].forEach((ie,pe,xe)=>{ie>=0&&xe.indexOf(ie)===pe&&this.addIndicesForPlacedSymbol(this.text,ie)}),Z.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Z.verticalPlacedTextSymbolIndex),Z.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Z.placedIconSymbolIndex),Z.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Z.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Yc,jx;gi("SymbolBucket",E1,{omit:["layers","collisionBoxArray","features","compareText"]}),E1.MAX_GLYPHS=65535,E1.addDynamicAttributes=aM;var Dw={get paint(){return jx=jx||new oe({"icon-opacity":new _s(fe.paint_symbol["icon-opacity"]),"icon-color":new _s(fe.paint_symbol["icon-color"]),"icon-halo-color":new _s(fe.paint_symbol["icon-halo-color"]),"icon-halo-width":new _s(fe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _s(fe.paint_symbol["icon-halo-blur"]),"icon-translate":new Uo(fe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Uo(fe.paint_symbol["icon-translate-anchor"]),"text-opacity":new _s(fe.paint_symbol["text-opacity"]),"text-color":new _s(fe.paint_symbol["text-color"],{runtimeType:Je,getOverride:I=>I.textColor,hasOverride:I=>!!I.textColor}),"text-halo-color":new _s(fe.paint_symbol["text-halo-color"]),"text-halo-width":new _s(fe.paint_symbol["text-halo-width"]),"text-halo-blur":new _s(fe.paint_symbol["text-halo-blur"]),"text-translate":new Uo(fe.paint_symbol["text-translate"]),"text-translate-anchor":new Uo(fe.paint_symbol["text-translate-anchor"])})},get layout(){return Yc=Yc||new oe({"symbol-placement":new Uo(fe.layout_symbol["symbol-placement"]),"symbol-spacing":new Uo(fe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Uo(fe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _s(fe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Uo(fe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Uo(fe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Uo(fe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Uo(fe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Uo(fe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Uo(fe.layout_symbol["icon-rotation-alignment"]),"icon-size":new _s(fe.layout_symbol["icon-size"]),"icon-text-fit":new Uo(fe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Uo(fe.layout_symbol["icon-text-fit-padding"]),"icon-image":new _s(fe.layout_symbol["icon-image"]),"icon-rotate":new _s(fe.layout_symbol["icon-rotate"]),"icon-padding":new _s(fe.layout_symbol["icon-padding"]),"icon-keep-upright":new Uo(fe.layout_symbol["icon-keep-upright"]),"icon-offset":new _s(fe.layout_symbol["icon-offset"]),"icon-anchor":new _s(fe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Uo(fe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Uo(fe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Uo(fe.layout_symbol["text-rotation-alignment"]),"text-field":new _s(fe.layout_symbol["text-field"]),"text-font":new _s(fe.layout_symbol["text-font"]),"text-size":new _s(fe.layout_symbol["text-size"]),"text-max-width":new _s(fe.layout_symbol["text-max-width"]),"text-line-height":new Uo(fe.layout_symbol["text-line-height"]),"text-letter-spacing":new _s(fe.layout_symbol["text-letter-spacing"]),"text-justify":new _s(fe.layout_symbol["text-justify"]),"text-radial-offset":new _s(fe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Uo(fe.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new _s(fe.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new _s(fe.layout_symbol["text-anchor"]),"text-max-angle":new Uo(fe.layout_symbol["text-max-angle"]),"text-writing-mode":new Uo(fe.layout_symbol["text-writing-mode"]),"text-rotate":new _s(fe.layout_symbol["text-rotate"]),"text-padding":new Uo(fe.layout_symbol["text-padding"]),"text-keep-upright":new Uo(fe.layout_symbol["text-keep-upright"]),"text-transform":new _s(fe.layout_symbol["text-transform"]),"text-offset":new _s(fe.layout_symbol["text-offset"]),"text-allow-overlap":new Uo(fe.layout_symbol["text-allow-overlap"]),"text-overlap":new Uo(fe.layout_symbol["text-overlap"]),"text-ignore-placement":new Uo(fe.layout_symbol["text-ignore-placement"]),"text-optional":new Uo(fe.layout_symbol["text-optional"])})}};class Zx{constructor(S){if(S.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=S.property.overrides?S.property.overrides.runtimeType:ct,this.defaultValue=S}evaluate(S){if(S.formattedSection){let D=this.defaultValue.property.overrides;if(D&&D.hasOverride(S.formattedSection))return D.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default}eachChild(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}gi("FormatSectionOverride",Zx,{omit:["defaultValue"]});class ug extends B{constructor(S){super(S,Dw)}recalculate(S,D){if(super.recalculate(S,D),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 Z=this.layout.get("text-writing-mode");if(Z){let ie=[];for(let pe of Z)ie.indexOf(pe)<0&&ie.push(pe);this.layout._values["text-writing-mode"]=ie}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(S,D,Z,ie){let pe=this.layout.get(S).evaluate(D,{},Z,ie),xe=this._unevaluatedLayout._values[S];return xe.isDataDriven()||Cs(xe.value)||!pe?pe:function(He,at){return at.replace(/{([^{}]+)}/g,(wt,Ht)=>He&&Ht in He?String(He[Ht]):"")}(D.properties,pe)}createBucket(S){return new E1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let S of Dw.paint.overridableProperties){if(!ug.hasPaintOverride(this.layout,S))continue;let D=this.paint.get(S),Z=new Zx(D),ie=new Jn(Z,D.property.specification),pe=null;pe=D.value.kind==="constant"||D.value.kind==="source"?new Zo("source",ie):new Eo("composite",ie,D.value.zoomStops),this.paint._values[S]=new cl(D.property,pe,D.parameters)}}_handleOverridablePaintPropertyUpdate(S,D,Z){return!(!this.layout||D.isDataDriven()||Z.isDataDriven())&&ug.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,D){let Z=S.get("text-field"),ie=Dw.paint.properties[D],pe=!1,xe=He=>{for(let at of He)if(ie.overrides&&ie.overrides.hasOverride(at))return void(pe=!0)};if(Z.value.kind==="constant"&&Z.value.value instanceof zr)xe(Z.value.value.sections);else if(Z.value.kind==="source"){let He=wt=>{pe||(wt instanceof Ur&&Yr(wt.value)===ir?xe(wt.value.sections):wt instanceof Xn?xe(wt.sections):wt.eachChild(He))},at=Z.value;at._styleExpression&&He(at._styleExpression.expression)}return pe}}let mC;var Xx={get paint(){return mC=mC||new oe({"background-color":new Uo(fe.paint_background["background-color"]),"background-pattern":new Il(fe.paint_background["background-pattern"]),"background-opacity":new Uo(fe.paint_background["background-opacity"])})}};class Q8 extends B{constructor(S){super(S,Xx)}}let lM;var gC={get paint(){return lM=lM||new oe({"raster-opacity":new Uo(fe.paint_raster["raster-opacity"]),"raster-hue-rotate":new Uo(fe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Uo(fe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Uo(fe.paint_raster["raster-brightness-max"]),"raster-saturation":new Uo(fe.paint_raster["raster-saturation"]),"raster-contrast":new Uo(fe.paint_raster["raster-contrast"]),"raster-resampling":new Uo(fe.paint_raster["raster-resampling"]),"raster-fade-duration":new Uo(fe.paint_raster["raster-fade-duration"])})}};class Yx extends B{constructor(S){super(S,gC)}}class uM extends B{constructor(S){super(S,{}),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.painter.context.gl)},this.implementation=S}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 fM{constructor(S){this._methodToThrottle=S,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 cM=63710088e-1;class dy{constructor(S,D){if(isNaN(S)||isNaN(D))throw new Error(`Invalid LngLat object: (${S}, ${D})`);if(this.lng=+S,this.lat=+D,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dy(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let D=Math.PI/180,Z=this.lat*D,ie=S.lat*D,pe=Math.sin(Z)*Math.sin(ie)+Math.cos(Z)*Math.cos(ie)*Math.cos((S.lng-this.lng)*D);return cM*Math.acos(Math.min(pe,1))}static convert(S){if(S instanceof dy)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new dy(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new dy(Number("lng"in S?S.lng:S.lon),Number(S.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 k1=2*Math.PI*cM;function _C(I){return k1*Math.cos(I*Math.PI/180)}function Rw(I){return(180+I)/360}function xC(I){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I*Math.PI/360)))/360}function Fw(I,S){return I/_C(S)}function Kx(I){return 360/Math.PI*Math.atan(Math.exp((180-360*I)*Math.PI/180))-90}class Jx{constructor(S,D,Z=0){this.x=+S,this.y=+D,this.z=+Z}static fromLngLat(S,D=0){let Z=dy.convert(S);return new Jx(Rw(Z.lng),xC(Z.lat),Fw(D,Z.lat))}toLngLat(){return new dy(360*this.x-180,Kx(this.y))}toAltitude(){return this.z*_C(Kx(this.y))}meterInMercatorCoordinateUnits(){return 1/k1*(S=Kx(this.y),1/Math.cos(S*Math.PI/180));var S}}function yv(I,S,D){var Z=2*Math.PI*6378137/256/Math.pow(2,D);return[I*Z-2*Math.PI*6378137/2,S*Z-2*Math.PI*6378137/2]}class hM{constructor(S,D,Z){if(!function(ie,pe,xe){return!(ie<0||ie>25||xe<0||xe>=Math.pow(2,ie)||pe<0||pe>=Math.pow(2,ie))}(S,D,Z))throw new Error(`x=${D}, y=${Z}, z=${S} outside of bounds. 0<=x<${Math.pow(2,S)}, 0<=y<${Math.pow(2,S)} 0<=z<=25 `);this.z=S,this.x=D,this.y=Z,this.key=$x(0,S,S,D,Z)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,D,Z){let ie=(xe=this.y,He=this.z,at=yv(256*(pe=this.x),256*(xe=Math.pow(2,He)-xe-1),He),wt=yv(256*(pe+1),256*(xe+1),He),at[0]+","+at[1]+","+wt[0]+","+wt[1]);var pe,xe,He,at,wt;let Ht=function(rr,pr,Ar){let Vr,ri="";for(let Ii=rr;Ii>0;Ii--)Vr=1<1?"@2x":"").replace(/{quadkey}/g,Ht).replace(/{bbox-epsg-3857}/g,ie)}isChildOf(S){let D=this.z-S.z;return D>0&&S.x===this.x>>D&&S.y===this.y>>D}getTilePoint(S){let D=Math.pow(2,this.z);return new l((S.x*D-this.x)*Rl,(S.y*D-this.y)*Rl)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bC{constructor(S,D){this.wrap=S,this.canonical=D,this.key=$x(S,D.z,D.z,D.x,D.y)}}class Jp{constructor(S,D,Z,ie,pe){if(S= z; overscaledZ = ${S}; z = ${Z}`);this.overscaledZ=S,this.wrap=D,this.canonical=new hM(Z,+ie,+pe),this.key=$x(D,S,Z,ie,pe)}clone(){return new Jp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(S){return this.overscaledZ===S.overscaledZ&&this.wrap===S.wrap&&this.canonical.equals(S.canonical)}scaledTo(S){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let D=this.canonical.z-S;return S>this.canonical.z?new Jp(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jp(S,this.wrap,S,this.canonical.x>>D,this.canonical.y>>D)}calculateScaledKey(S,D){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let Z=this.canonical.z-S;return S>this.canonical.z?$x(this.wrap*+D,S,this.canonical.z,this.canonical.x,this.canonical.y):$x(this.wrap*+D,S,S,this.canonical.x>>Z,this.canonical.y>>Z)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let D=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>D&&S.canonical.y===this.canonical.y>>D}children(S){if(this.overscaledZ>=S)return[new Jp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let D=this.canonical.z+1,Z=2*this.canonical.x,ie=2*this.canonical.y;return[new Jp(D,this.wrap,D,Z,ie),new Jp(D,this.wrap,D,Z+1,ie),new Jp(D,this.wrap,D,Z,ie+1),new Jp(D,this.wrap,D,Z+1,ie+1)]}isLessThan(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.ythis.max&&(this.max=rr),rr=this.dim+1||D<-1||D>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(D+1)*this.stride+(S+1)}unpack(S,D,Z){return S*this.redFactor+D*this.greenFactor+Z*this.blueFactor-this.baseShift}getPixels(){return new al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,D,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");let ie=D*this.dim,pe=D*this.dim+this.dim,xe=Z*this.dim,He=Z*this.dim+this.dim;switch(D){case-1:ie=pe-1;break;case 1:pe=ie+1}switch(Z){case-1:xe=He-1;break;case 1:He=xe+1}let at=-D*this.dim,wt=-Z*this.dim;for(let Ht=xe;Ht=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${S} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[S]}}class dM{constructor(S,D,Z,ie,pe){this.type="Feature",this._vectorTileFeature=S,S._z=D,S._x=Z,S._y=ie,this.properties=S.properties,this.id=pe}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(S){this._geometry=S}toJSON(){let S={geometry:this.geometry};for(let D in this)D!=="_geometry"&&D!=="_vectorTileFeature"&&(S[D]=this[D]);return S}}class fg{constructor(S,D){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new ui(Rl,16,0),this.grid3D=new ui(Rl,16,0),this.featureIndexArray=new ku,this.promoteId=D}insert(S,D,Z,ie,pe,xe){let He=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Z,ie,pe);let at=xe?this.grid3D:this.grid;for(let wt=0;wt=0&&rr[3]>=0&&at.insert(He,rr[0],rr[1],rr[2],rr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new qi.VectorTile(new tM(this.rawTileData)).layers,this.sourceLayerCoder=new TC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(S,D,Z,ie){this.loadVTLayers();let pe=S.params||{},xe=Rl/S.tileSize/S.scale,He=Sn(pe.filter),at=S.queryGeometry,wt=S.queryPadding*xe,Ht=SC(at),rr=this.grid.query(Ht.minX-wt,Ht.minY-wt,Ht.maxX+wt,Ht.maxY+wt),pr=SC(S.cameraQueryGeometry),Ar=this.grid3D.query(pr.minX-wt,pr.minY-wt,pr.maxX+wt,pr.maxY+wt,(Ii,Zi,da,cn)=>function(jn,Va,hl,iu,Su){for(let Qs of jn)if(Va<=Qs.x&&hl<=Qs.y&&iu>=Qs.x&&Su>=Qs.y)return!0;let Zl=[new l(Va,hl),new l(Va,Su),new l(iu,Su),new l(iu,hl)];if(jn.length>2){for(let Qs of Zl)if(Vs(jn,Qs))return!0}for(let Qs=0;Qs(cn||(cn=of(jn)),Va.queryIntersectsFeature(at,jn,hl,cn,this.z,S.transform,xe,S.pixelPosMatrix)))}return Vr}loadMatchingFeature(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr){let pr=this.bucketLayerIDs[D];if(xe&&!function(Ii,Zi){for(let da=0;da=0)return!0;return!1}(xe,pr))return;let Ar=this.sourceLayerCoder.decode(Z),Vr=this.vtLayers[Ar].feature(ie);if(pe.needGeometry){let Ii=ff(Vr,!0);if(!pe.filter(new Fo(this.tileID.overscaledZ),Ii,this.tileID.canonical))return}else if(!pe.filter(new Fo(this.tileID.overscaledZ),Vr))return;let ri=this.getId(Vr,Ar);for(let Ii=0;Ii{let He=S instanceof xl?S.get(xe):null;return He&&He.evaluate?He.evaluate(D,Z,ie):He})}function SC(I){let S=1/0,D=1/0,Z=-1/0,ie=-1/0;for(let pe of I)S=Math.min(S,pe.x),D=Math.min(D,pe.y),Z=Math.max(Z,pe.x),ie=Math.max(ie,pe.y);return{minX:S,minY:D,maxX:Z,maxY:ie}}function eB(I,S){return S-I}function MC(I,S,D,Z,ie){let pe=[];for(let xe=0;xe=Z&&rr.x>=Z||(Ht.x>=Z?Ht=new l(Z,Ht.y+(Z-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round():rr.x>=Z&&(rr=new l(Z,Ht.y+(Z-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round()),Ht.y>=ie&&rr.y>=ie||(Ht.y>=ie?Ht=new l(Ht.x+(ie-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),ie)._round():rr.y>=ie&&(rr=new l(Ht.x+(ie-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),ie)._round()),at&&Ht.equals(at[at.length-1])||(at=[Ht],pe.push(at)),at.push(rr)))))}}return pe}gi("FeatureIndex",fg,{omit:["rawTileData","sourceLayerCoder"]});class py extends l{constructor(S,D,Z,ie){super(S,D),this.angle=Z,ie!==void 0&&(this.segment=ie)}clone(){return new py(this.x,this.y,this.angle,this.segment)}}function pM(I,S,D,Z,ie){if(S.segment===void 0||D===0)return!0;let pe=S,xe=S.segment+1,He=0;for(;He>-D/2;){if(xe--,xe<0)return!1;He-=I[xe].dist(pe),pe=I[xe]}He+=I[xe].dist(I[xe+1]),xe++;let at=[],wt=0;for(;HeZ;)wt-=at.shift().angleDelta;if(wt>ie)return!1;xe++,He+=Ht.dist(rr)}return!0}function EC(I){let S=0;for(let D=0;Dwt){let Vr=(wt-at)/Ar,ri=ia.number(rr.x,pr.x,Vr),Ii=ia.number(rr.y,pr.y,Vr),Zi=new py(ri,Ii,pr.angleTo(rr),Ht);return Zi._round(),!xe||pM(I,Zi,He,xe,S)?Zi:void 0}at+=Ar}}function rB(I,S,D,Z,ie,pe,xe,He,at){let wt=kC(Z,pe,xe),Ht=CC(Z,ie),rr=Ht*xe,pr=I[0].x===0||I[0].x===at||I[0].y===0||I[0].y===at;return S-rr=0&&jn=0&&Va=0&&pr+wt<=Ht){let hl=new py(jn,Va,da,Vr);hl._round(),Z&&!pM(I,hl,pe,Z,ie)||Ar.push(hl)}}rr+=Zi}return He||Ar.length||xe||(Ar=LC(I,rr/2,D,Z,ie,pe,xe,!0,at)),Ar}gi("Anchor",py);let C1=kd;function zC(I,S,D,Z){let ie=[],pe=I.image,xe=pe.pixelRatio,He=pe.paddedRect.w-2*C1,at=pe.paddedRect.h-2*C1,wt={x1:I.left,y1:I.top,x2:I.right,y2:I.bottom},Ht=pe.stretchX||[[0,He]],rr=pe.stretchY||[[0,at]],pr=(Ts,wu)=>Ts+wu[1]-wu[0],Ar=Ht.reduce(pr,0),Vr=rr.reduce(pr,0),ri=He-Ar,Ii=at-Vr,Zi=0,da=Ar,cn=0,jn=Vr,Va=0,hl=ri,iu=0,Su=Ii;if(pe.content&&Z){let Ts=pe.content,wu=Ts[2]-Ts[0],fu=Ts[3]-Ts[1];(pe.textFitWidth||pe.textFitHeight)&&(wt=pC(I)),Zi=vy(Ht,0,Ts[0]),cn=vy(rr,0,Ts[1]),da=vy(Ht,Ts[0],Ts[2]),jn=vy(rr,Ts[1],Ts[3]),Va=Ts[0]-Zi,iu=Ts[1]-cn,hl=wu-da,Su=fu-jn}let Zl=wt.x1,Qs=wt.y1,gu=wt.x2-Zl,cu=wt.y2-Qs,uu=(Ts,wu,fu,Lu)=>{let oc=qw(Ts.stretch-Zi,da,gu,Zl),tc=L1(Ts.fixed-Va,hl,Ts.stretch,Ar),Ch=qw(wu.stretch-cn,jn,cu,Qs),$p=L1(wu.fixed-iu,Su,wu.stretch,Vr),ud=qw(fu.stretch-Zi,da,gu,Zl),Lh=L1(fu.fixed-Va,hl,fu.stretch,Ar),Wd=qw(Lu.stretch-cn,jn,cu,Qs),jd=L1(Lu.fixed-iu,Su,Lu.stretch,Vr),Zd=new l(oc,Ch),Kc=new l(ud,Ch),zh=new l(ud,Wd),Cd=new l(oc,Wd),fd=new l(tc/xe,$p/xe),Zh=new l(Lh/xe,jd/xe),rh=S*Math.PI/180;if(rh){let qf=Math.sin(rh),mc=Math.cos(rh),sc=[mc,-qf,qf,mc];Zd._matMult(sc),Kc._matMult(sc),Cd._matMult(sc),zh._matMult(sc)}let Pp=Ts.stretch+Ts.fixed,fp=wu.stretch+wu.fixed;return{tl:Zd,tr:Kc,bl:Cd,br:zh,tex:{x:pe.paddedRect.x+C1+Pp,y:pe.paddedRect.y+C1+fp,w:fu.stretch+fu.fixed-Pp,h:Lu.stretch+Lu.fixed-fp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fd,pixelOffsetBR:Zh,minFontScaleX:hl/xe/gu,minFontScaleY:Su/xe/cu,isSDF:D}};if(Z&&(pe.stretchX||pe.stretchY)){let Ts=PC(Ht,ri,Ar),wu=PC(rr,Ii,Vr);for(let fu=0;fu0&&(ri=Math.max(10,ri),this.circleDiameter=ri)}else{let pr=!((rr=xe.image)===null||rr===void 0)&&rr.content&&(xe.image.textFitWidth||xe.image.textFitHeight)?pC(xe):{x1:xe.left,y1:xe.top,x2:xe.right,y2:xe.bottom};pr.y1=pr.y1*He-at[0],pr.y2=pr.y2*He+at[2],pr.x1=pr.x1*He-at[3],pr.x2=pr.x2*He+at[1];let Ar=xe.collisionPadding;if(Ar&&(pr.x1-=Ar[0]*He,pr.y1-=Ar[1]*He,pr.x2+=Ar[2]*He,pr.y2+=Ar[3]*He),Ht){let Vr=new l(pr.x1,pr.y1),ri=new l(pr.x2,pr.y1),Ii=new l(pr.x1,pr.y2),Zi=new l(pr.x2,pr.y2),da=Ht*Math.PI/180;Vr._rotate(da),ri._rotate(da),Ii._rotate(da),Zi._rotate(da),pr.x1=Math.min(Vr.x,ri.x,Ii.x,Zi.x),pr.x2=Math.max(Vr.x,ri.x,Ii.x,Zi.x),pr.y1=Math.min(Vr.y,ri.y,Ii.y,Zi.y),pr.y2=Math.max(Vr.y,ri.y,Ii.y,Zi.y)}S.emplaceBack(D.x,D.y,pr.x1,pr.y1,pr.x2,pr.y2,Z,ie,pe)}this.boxEndIndex=S.length}}class Hv{constructor(S=[],D=(Z,ie)=>Zie?1:0){if(this.data=S,this.length=this.data.length,this.compare=D,this.length>0)for(let Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:D,compare:Z}=this,ie=D[S];for(;S>0;){let pe=S-1>>1,xe=D[pe];if(Z(ie,xe)>=0)break;D[S]=xe,S=pe}D[S]=ie}_down(S){let{data:D,compare:Z}=this,ie=this.length>>1,pe=D[S];for(;S=0)break;D[S]=D[xe],S=xe}D[S]=pe}}function iB(I,S=1,D=!1){let Z=1/0,ie=1/0,pe=-1/0,xe=-1/0,He=I[0];for(let Ar=0;Arpe)&&(pe=Vr.x),(!Ar||Vr.y>xe)&&(xe=Vr.y)}let at=Math.min(pe-Z,xe-ie),wt=at/2,Ht=new Hv([],nB);if(at===0)return new l(Z,ie);for(let Ar=Z;Arrr.d||!rr.d)&&(rr=Ar,D&&console.log("found best %d after %d probes",Math.round(1e4*Ar.d)/1e4,pr)),Ar.max-rr.d<=S||(wt=Ar.h/2,Ht.push(new z1(Ar.p.x-wt,Ar.p.y-wt,wt,I)),Ht.push(new z1(Ar.p.x+wt,Ar.p.y-wt,wt,I)),Ht.push(new z1(Ar.p.x-wt,Ar.p.y+wt,wt,I)),Ht.push(new z1(Ar.p.x+wt,Ar.p.y+wt,wt,I)),pr+=4)}return D&&(console.log(`num probes: ${pr}`),console.log(`best distance: ${rr.d}`)),rr.p}function nB(I,S){return S.max-I.max}function z1(I,S,D,Z){this.p=new l(I,S),this.h=D,this.d=function(ie,pe){let xe=!1,He=1/0;for(let at=0;atie.y!=Vr.y>ie.y&&ie.x<(Vr.x-Ar.x)*(ie.y-Ar.y)/(Vr.y-Ar.y)+Ar.x&&(xe=!xe),He=Math.min(He,ha(ie,Ar,Vr))}}return(xe?1:-1)*Math.sqrt(He)}(this.p,Z),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]="center",ld[ld.left=2]="left",ld[ld.right=3]="right",ld[ld.top=4]="top",ld[ld.bottom=5]="bottom",ld[ld["top-left"]=6]="top-left",ld[ld["top-right"]=7]="top-right",ld[ld["bottom-left"]=8]="bottom-left",ld[ld["bottom-right"]=9]="bottom-right";let cm=7,cg=Number.POSITIVE_INFINITY;function vM(I,S){return S[1]!==cg?function(D,Z,ie){let pe=0,xe=0;switch(Z=Math.abs(Z),ie=Math.abs(ie),D){case"top-right":case"top-left":case"top":xe=ie-cm;break;case"bottom-right":case"bottom-left":case"bottom":xe=-ie+cm}switch(D){case"top-right":case"bottom-right":case"right":pe=-Z;break;case"top-left":case"bottom-left":case"left":pe=Z}return[pe,xe]}(I,S[0],S[1]):function(D,Z){let ie=0,pe=0;Z<0&&(Z=0);let xe=Z/Math.SQRT2;switch(D){case"top-right":case"top-left":pe=xe-cm;break;case"bottom-right":case"bottom-left":pe=-xe+cm;break;case"bottom":pe=-Z+cm;break;case"top":pe=Z-cm}switch(D){case"top-right":case"bottom-right":ie=-xe;break;case"top-left":case"bottom-left":ie=xe;break;case"left":ie=Z;break;case"right":ie=-Z}return[ie,pe]}(I,S[0])}function IC(I,S,D){var Z;let ie=I.layout,pe=(Z=ie.get("text-variable-anchor-offset"))===null||Z===void 0?void 0:Z.evaluate(S,{},D);if(pe){let He=pe.values,at=[];for(let wt=0;wtpr*Ff);Ht.startsWith("top")?rr[1]-=cm:Ht.startsWith("bottom")&&(rr[1]+=cm),at[wt+1]=rr}return new Br(at)}let xe=ie.get("text-variable-anchor");if(xe){let He;He=I._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ie.get("text-radial-offset").evaluate(S,{},D)*Ff,cg]:ie.get("text-offset").evaluate(S,{},D).map(wt=>wt*Ff);let at=[];for(let wt of xe)at.push(wt,vM(wt,He));return new Br(at)}return null}function yM(I){switch(I){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function aB(I,S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=pe.textMaxSize.evaluate(S,{});rr===void 0&&(rr=xe);let pr=I.layers[0].layout,Ar=pr.get("icon-offset").evaluate(S,{},Ht),Vr=RC(D.horizontal),ri=xe/24,Ii=I.tilePixelRatio*ri,Zi=I.tilePixelRatio*rr/24,da=I.tilePixelRatio*He,cn=I.tilePixelRatio*pr.get("symbol-spacing"),jn=pr.get("text-padding")*I.tilePixelRatio,Va=function(Ts,wu,fu,Lu=1){let oc=Ts.get("icon-padding").evaluate(wu,{},fu),tc=oc&&oc.values;return[tc[0]*Lu,tc[1]*Lu,tc[2]*Lu,tc[3]*Lu]}(pr,S,Ht,I.tilePixelRatio),hl=pr.get("text-max-angle")/180*Math.PI,iu=pr.get("text-rotation-alignment")!=="viewport"&&pr.get("symbol-placement")!=="point",Su=pr.get("icon-rotation-alignment")==="map"&&pr.get("symbol-placement")!=="point",Zl=pr.get("symbol-placement"),Qs=cn/2,gu=pr.get("icon-text-fit"),cu;Z&&gu!=="none"&&(I.allowVerticalPlacement&&D.vertical&&(cu=vC(Z,D.vertical,gu,pr.get("icon-text-fit-padding"),Ar,ri)),Vr&&(Z=vC(Z,Vr,gu,pr.get("icon-text-fit-padding"),Ar,ri)));let uu=(Ts,wu)=>{wu.x<0||wu.x>=Rl||wu.y<0||wu.y>=Rl||function(fu,Lu,oc,tc,Ch,$p,ud,Lh,Wd,jd,Zd,Kc,zh,Cd,fd,Zh,rh,Pp,fp,qf,mc,sc,Ip,Hc,P1){let v0=fu.addToLineVertexArray(Lu,oc),Gv,Qp,Pc,uh,ev=0,yy=0,cp=0,I1=0,bM=-1,Uw=-1,y0={},hg=Ji("");if(fu.allowVerticalPlacement&&tc.vertical){let Ld=Lh.layout.get("text-rotate").evaluate(mc,{},Hc)+90;Pc=new fm(Wd,Lu,jd,Zd,Kc,tc.vertical,zh,Cd,fd,Ld),ud&&(uh=new fm(Wd,Lu,jd,Zd,Kc,ud,rh,Pp,fd,Ld))}if(Ch){let Ld=Lh.layout.get("icon-rotate").evaluate(mc,{}),tv=Lh.layout.get("icon-text-fit")!=="none",hm=zC(Ch,Ld,Ip,tv),Xd=ud?zC(ud,Ld,Ip,tv):void 0;Qp=new fm(Wd,Lu,jd,Zd,Kc,Ch,rh,Pp,!1,Ld),ev=4*hm.length;let zd=fu.iconSizeData,gv=null;zd.kind==="source"?(gv=[p0*Lh.layout.get("icon-size").evaluate(mc,{})],gv[0]>lm&&T(`${fu.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)):zd.kind==="composite"&&(gv=[p0*sc.compositeIconSizes[0].evaluate(mc,{},Hc),p0*sc.compositeIconSizes[1].evaluate(mc,{},Hc)],(gv[0]>lm||gv[1]>lm)&&T(`${fu.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)),fu.addSymbols(fu.icon,hm,gv,qf,fp,mc,i.ah.none,Lu,v0.lineStartIndex,v0.lineLength,-1,Hc),bM=fu.icon.placedSymbolArray.length-1,Xd&&(yy=4*Xd.length,fu.addSymbols(fu.icon,Xd,gv,qf,fp,mc,i.ah.vertical,Lu,v0.lineStartIndex,v0.lineLength,-1,Hc),Uw=fu.icon.placedSymbolArray.length-1)}let Xh=Object.keys(tc.horizontal);for(let Ld of Xh){let tv=tc.horizontal[Ld];if(!Gv){hg=Ji(tv.text);let Xd=Lh.layout.get("text-rotate").evaluate(mc,{},Hc);Gv=new fm(Wd,Lu,jd,Zd,Kc,tv,zh,Cd,fd,Xd)}let hm=tv.positionedLines.length===1;if(cp+=DC(fu,Lu,tv,$p,Lh,fd,mc,Zh,v0,tc.vertical?i.ah.horizontal:i.ah.horizontalOnly,hm?Xh:[Ld],y0,bM,sc,Hc),hm)break}tc.vertical&&(I1+=DC(fu,Lu,tc.vertical,$p,Lh,fd,mc,Zh,v0,i.ah.vertical,["vertical"],y0,Uw,sc,Hc));let lB=Gv?Gv.boxStartIndex:fu.collisionBoxArray.length,Vw=Gv?Gv.boxEndIndex:fu.collisionBoxArray.length,m0=Pc?Pc.boxStartIndex:fu.collisionBoxArray.length,hp=Pc?Pc.boxEndIndex:fu.collisionBoxArray.length,OC=Qp?Qp.boxStartIndex:fu.collisionBoxArray.length,uB=Qp?Qp.boxEndIndex:fu.collisionBoxArray.length,NC=uh?uh.boxStartIndex:fu.collisionBoxArray.length,fB=uh?uh.boxEndIndex:fu.collisionBoxArray.length,mv=-1,tb=(Ld,tv)=>Ld&&Ld.circleDiameter?Math.max(Ld.circleDiameter,tv):tv;mv=tb(Gv,mv),mv=tb(Pc,mv),mv=tb(Qp,mv),mv=tb(uh,mv);let Hw=mv>-1?1:0;Hw&&(mv*=P1/Ff),fu.glyphOffsetArray.length>=E1.MAX_GLYPHS&&T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mc.sortKey!==void 0&&fu.addToSortKeyRanges(fu.symbolInstances.length,mc.sortKey);let wM=IC(Lh,mc,Hc),[cB,hB]=function(Ld,tv){let hm=Ld.length,Xd=tv==null?void 0:tv.values;if((Xd==null?void 0:Xd.length)>0)for(let zd=0;zd=0?y0.right:-1,y0.center>=0?y0.center:-1,y0.left>=0?y0.left:-1,y0.vertical||-1,bM,Uw,hg,lB,Vw,m0,hp,OC,uB,NC,fB,jd,cp,I1,ev,yy,Hw,0,zh,mv,cB,hB)}(I,wu,Ts,D,Z,ie,cu,I.layers[0],I.collisionBoxArray,S.index,S.sourceLayerIndex,I.index,Ii,[jn,jn,jn,jn],iu,at,da,Va,Su,Ar,S,pe,wt,Ht,xe)};if(Zl==="line")for(let Ts of MC(S.geometry,0,0,Rl,Rl)){let wu=rB(Ts,cn,hl,D.vertical||Vr,Z,24,Zi,I.overscaling,Rl);for(let fu of wu)Vr&&oB(I,Vr.text,Qs,fu)||uu(Ts,fu)}else if(Zl==="line-center"){for(let Ts of S.geometry)if(Ts.length>1){let wu=tB(Ts,hl,D.vertical||Vr,Z,24,Zi);wu&&uu(Ts,wu)}}else if(S.type==="Polygon")for(let Ts of ks(S.geometry,0)){let wu=iB(Ts,16);uu(Ts[0],new py(wu.x,wu.y,0))}else if(S.type==="LineString")for(let Ts of S.geometry)uu(Ts,new py(Ts[0].x,Ts[0].y,0));else if(S.type==="Point")for(let Ts of S.geometry)for(let wu of Ts)uu([wu],new py(wu.x,wu.y,0))}function DC(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr){let ri=function(da,cn,jn,Va,hl,iu,Su,Zl){let Qs=Va.layout.get("text-rotate").evaluate(iu,{})*Math.PI/180,gu=[];for(let cu of cn.positionedLines)for(let uu of cu.positionedGlyphs){if(!uu.rect)continue;let Ts=uu.rect||{},wu=fC+1,fu=!0,Lu=1,oc=0,tc=(hl||Zl)&&uu.vertical,Ch=uu.metrics.advance*uu.scale/2;if(Zl&&cn.verticalizable&&(oc=cu.lineOffset/2-(uu.imageName?-(Ff-uu.metrics.width*uu.scale)/2:(uu.scale-1)*Ff)),uu.imageName){let qf=Su[uu.imageName];fu=qf.sdf,Lu=qf.pixelRatio,wu=kd/Lu}let $p=hl?[uu.x+Ch,uu.y]:[0,0],ud=hl?[0,0]:[uu.x+Ch+jn[0],uu.y+jn[1]-oc],Lh=[0,0];tc&&(Lh=ud,ud=[0,0]);let Wd=uu.metrics.isDoubleResolution?2:1,jd=(uu.metrics.left-wu)*uu.scale-Ch+ud[0],Zd=(-uu.metrics.top-wu)*uu.scale+ud[1],Kc=jd+Ts.w/Wd*uu.scale/Lu,zh=Zd+Ts.h/Wd*uu.scale/Lu,Cd=new l(jd,Zd),fd=new l(Kc,Zd),Zh=new l(jd,zh),rh=new l(Kc,zh);if(tc){let qf=new l(-Ch,Ch-kh),mc=-Math.PI/2,sc=Ff/2-Ch,Ip=new l(5-kh-sc,-(uu.imageName?sc:0)),Hc=new l(...Lh);Cd._rotateAround(mc,qf)._add(Ip)._add(Hc),fd._rotateAround(mc,qf)._add(Ip)._add(Hc),Zh._rotateAround(mc,qf)._add(Ip)._add(Hc),rh._rotateAround(mc,qf)._add(Ip)._add(Hc)}if(Qs){let qf=Math.sin(Qs),mc=Math.cos(Qs),sc=[mc,-qf,qf,mc];Cd._matMult(sc),fd._matMult(sc),Zh._matMult(sc),rh._matMult(sc)}let Pp=new l(0,0),fp=new l(0,0);gu.push({tl:Cd,tr:fd,bl:Zh,br:rh,tex:Ts,writingMode:cn.writingMode,glyphOffset:$p,sectionIndex:uu.sectionIndex,isSDF:fu,pixelOffsetTL:Pp,pixelOffsetBR:fp,minFontScaleX:0,minFontScaleY:0})}return gu}(0,D,He,ie,pe,xe,Z,I.allowVerticalPlacement),Ii=I.textSizeData,Zi=null;Ii.kind==="source"?(Zi=[p0*ie.layout.get("text-size").evaluate(xe,{})],Zi[0]>lm&&T(`${I.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)):Ii.kind==="composite"&&(Zi=[p0*Ar.compositeTextSizes[0].evaluate(xe,{},Vr),p0*Ar.compositeTextSizes[1].evaluate(xe,{},Vr)],(Zi[0]>lm||Zi[1]>lm)&&T(`${I.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)),I.addSymbols(I.text,ri,Zi,He,pe,xe,wt,S,at.lineStartIndex,at.lineLength,pr,Vr);for(let da of Ht)rr[da]=I.text.placedSymbolArray.length-1;return 4*ri.length}function RC(I){for(let S in I)return I[S];return null}function oB(I,S,D,Z){let ie=I.compareText;if(S in ie){let pe=ie[S];for(let xe=pe.length-1;xe>=0;xe--)if(Z.dist(pe[xe])>4;if(ie!==1)throw new Error(`Got v${ie} data when expected v1.`);let pe=FC[15&Z];if(!pe)throw new Error("Unrecognized array type.");let[xe]=new Uint16Array(S,2,1),[He]=new Uint32Array(S,4,1);return new mM(He,xe,pe,S)}constructor(S,D=64,Z=Float64Array,ie){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+D,2),65535),this.ArrayType=Z,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let pe=FC.indexOf(this.ArrayType),xe=2*S*this.ArrayType.BYTES_PER_ELEMENT,He=S*this.IndexArrayType.BYTES_PER_ELEMENT,at=(8-He%8)%8;if(pe<0)throw new Error(`Unexpected typed array class: ${Z}.`);ie&&ie instanceof ArrayBuffer?(this.data=ie,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+He+at,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+xe+He+at),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+He+at,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+pe]),new Uint16Array(this.data,2,1)[0]=D,new Uint32Array(this.data,4,1)[0]=S)}add(S,D){let Z=this._pos>>1;return this.ids[Z]=Z,this.coords[this._pos++]=S,this.coords[this._pos++]=D,Z}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return Bw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,D,Z,ie){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:pe,coords:xe,nodeSize:He}=this,at=[0,pe.length-1,0],wt=[];for(;at.length;){let Ht=at.pop()||0,rr=at.pop()||0,pr=at.pop()||0;if(rr-pr<=He){for(let Ii=pr;Ii<=rr;Ii++){let Zi=xe[2*Ii],da=xe[2*Ii+1];Zi>=S&&Zi<=Z&&da>=D&&da<=ie&&wt.push(pe[Ii])}continue}let Ar=pr+rr>>1,Vr=xe[2*Ar],ri=xe[2*Ar+1];Vr>=S&&Vr<=Z&&ri>=D&&ri<=ie&&wt.push(pe[Ar]),(Ht===0?S<=Vr:D<=ri)&&(at.push(pr),at.push(Ar-1),at.push(1-Ht)),(Ht===0?Z>=Vr:ie>=ri)&&(at.push(Ar+1),at.push(rr),at.push(1-Ht))}return wt}within(S,D,Z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ie,coords:pe,nodeSize:xe}=this,He=[0,ie.length-1,0],at=[],wt=Z*Z;for(;He.length;){let Ht=He.pop()||0,rr=He.pop()||0,pr=He.pop()||0;if(rr-pr<=xe){for(let Ii=pr;Ii<=rr;Ii++)BC(pe[2*Ii],pe[2*Ii+1],S,D)<=wt&&at.push(ie[Ii]);continue}let Ar=pr+rr>>1,Vr=pe[2*Ar],ri=pe[2*Ar+1];BC(Vr,ri,S,D)<=wt&&at.push(ie[Ar]),(Ht===0?S-Z<=Vr:D-Z<=ri)&&(He.push(pr),He.push(Ar-1),He.push(1-Ht)),(Ht===0?S+Z>=Vr:D+Z>=ri)&&(He.push(Ar+1),He.push(rr),He.push(1-Ht))}return at}}function Bw(I,S,D,Z,ie,pe){if(ie-Z<=D)return;let xe=Z+ie>>1;qC(I,S,xe,Z,ie,pe),Bw(I,S,D,Z,xe-1,1-pe),Bw(I,S,D,xe+1,ie,1-pe)}function qC(I,S,D,Z,ie,pe){for(;ie>Z;){if(ie-Z>600){let wt=ie-Z+1,Ht=D-Z+1,rr=Math.log(wt),pr=.5*Math.exp(2*rr/3),Ar=.5*Math.sqrt(rr*pr*(wt-pr)/wt)*(Ht-wt/2<0?-1:1);qC(I,S,D,Math.max(Z,Math.floor(D-Ht*pr/wt+Ar)),Math.min(ie,Math.floor(D+(wt-Ht)*pr/wt+Ar)),pe)}let xe=S[2*D+pe],He=Z,at=ie;for(Qx(I,S,Z,D),S[2*ie+pe]>xe&&Qx(I,S,Z,ie);Hexe;)at--}S[2*Z+pe]===xe?Qx(I,S,Z,at):(at++,Qx(I,S,at,ie)),at<=D&&(Z=at+1),D<=at&&(ie=at-1)}}function Qx(I,S,D,Z){gM(I,D,Z),gM(S,2*D,2*Z),gM(S,2*D+1,2*Z+1)}function gM(I,S,D){let Z=I[S];I[S]=I[D],I[D]=Z}function BC(I,S,D,Z){let ie=I-D,pe=S-Z;return ie*ie+pe*pe}var Ow;i.bg=void 0,(Ow=i.bg||(i.bg={})).create="create",Ow.load="load",Ow.fullLoad="fullLoad";let eb=null,yh=[],_M=1e3/60,xM="loadTime",Nw="fullLoadTime",sB={mark(I){performance.mark(I)},frame(I){let S=I;eb!=null&&yh.push(S-eb),eb=S},clearMetrics(){eb=null,yh=[],performance.clearMeasures(xM),performance.clearMeasures(Nw);for(let I in i.bg)performance.clearMarks(i.bg[I])},getPerformanceMetrics(){performance.measure(xM,i.bg.create,i.bg.load),performance.measure(Nw,i.bg.create,i.bg.fullLoad);let I=performance.getEntriesByName(xM)[0].duration,S=performance.getEntriesByName(Nw)[0].duration,D=yh.length,Z=1/(yh.reduce((pe,xe)=>pe+xe,0)/D/1e3),ie=yh.filter(pe=>pe>_M).reduce((pe,xe)=>pe+(xe-_M)/_M,0);return{loadTime:I,fullLoadTime:S,fps:Z,percentDroppedFrames:ie/(D+ie)*100,totalFrames:D}}};i.$=class extends Yt{},i.A=Es,i.B=mi,i.C=function(I){if(U==null){let S=I.navigator?I.navigator.userAgent:null;U=!!I.safari||!(!S||!(/\b(iPad|iPhone|iPod)\b/.test(S)||S.match("Safari")&&!S.match("Chrome")))}return U},i.D=Uo,i.E=Be,i.F=class{constructor(I,S){this.target=I,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new fM(()=>this.process()),this.subscription=function(D,Z,ie,pe){return D.addEventListener(Z,ie,!1),{unsubscribe:()=>{D.removeEventListener(Z,ie,!1)}}}(this.target,"message",D=>this.receive(D)),this.globalScope=q(self)?I:window}registerMessageHandler(I,S){this.messageHandlers[I]=S}sendAsync(I,S){return new Promise((D,Z)=>{let ie=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ie]={resolve:D,reject:Z},S&&S.signal.addEventListener("abort",()=>{delete this.resolveRejects[ie];let He={id:ie,type:"",origin:location.origin,targetMapId:I.targetMapId,sourceMapId:this.mapId};this.target.postMessage(He)},{once:!0});let pe=[],xe=Object.assign(Object.assign({},I),{id:ie,sourceMapId:this.mapId,origin:location.origin,data:Rn(I.data,pe)});this.target.postMessage(xe,{transfer:pe})})}receive(I){let S=I.data,D=S.id;if(!(S.origin!=="file://"&&location.origin!=="file://"&&S.origin!=="resource://android"&&location.origin!=="resource://android"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type===""){delete this.tasks[D];let Z=this.abortControllers[D];return delete this.abortControllers[D],void(Z&&Z.abort())}if(q(self)||S.mustQueue)return this.tasks[D]=S,this.taskQueue.push(D),void this.invoker.trigger();this.processTask(D,S)}}process(){if(this.taskQueue.length===0)return;let I=this.taskQueue.shift(),S=this.tasks[I];delete this.tasks[I],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(I,S)}processTask(I,S){return a(this,void 0,void 0,function*(){if(S.type===""){let ie=this.resolveRejects[I];return delete this.resolveRejects[I],ie?void(S.error?ie.reject(Hn(S.error)):ie.resolve(Hn(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(I,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let D=Hn(S.data),Z=new AbortController;this.abortControllers[I]=Z;try{let ie=yield this.messageHandlers[S.type](S.sourceMapId,D,Z);this.completeTask(I,null,ie)}catch(ie){this.completeTask(I,ie)}})}completeTask(I,S,D){let Z=[];delete this.abortControllers[I];let ie={id:I,type:"",sourceMapId:this.mapId,origin:location.origin,error:S?Rn(S):null,data:Rn(D,Z)};this.target.postMessage(ie,{transfer:Z})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var I=new Es(16);return Es!=Float32Array&&(I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[11]=0,I[12]=0,I[13]=0,I[14]=0),I[0]=1,I[5]=1,I[10]=1,I[15]=1,I},i.I=kw,i.J=function(I,S,D){var Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri=D[0],Ii=D[1],Zi=D[2];return S===I?(I[12]=S[0]*ri+S[4]*Ii+S[8]*Zi+S[12],I[13]=S[1]*ri+S[5]*Ii+S[9]*Zi+S[13],I[14]=S[2]*ri+S[6]*Ii+S[10]*Zi+S[14],I[15]=S[3]*ri+S[7]*Ii+S[11]*Zi+S[15]):(ie=S[1],pe=S[2],xe=S[3],He=S[4],at=S[5],wt=S[6],Ht=S[7],rr=S[8],pr=S[9],Ar=S[10],Vr=S[11],I[0]=Z=S[0],I[1]=ie,I[2]=pe,I[3]=xe,I[4]=He,I[5]=at,I[6]=wt,I[7]=Ht,I[8]=rr,I[9]=pr,I[10]=Ar,I[11]=Vr,I[12]=Z*ri+He*Ii+rr*Zi+S[12],I[13]=ie*ri+at*Ii+pr*Zi+S[13],I[14]=pe*ri+wt*Ii+Ar*Zi+S[14],I[15]=xe*ri+Ht*Ii+Vr*Zi+S[15]),I},i.K=function(I,S,D){var Z=D[0],ie=D[1],pe=D[2];return I[0]=S[0]*Z,I[1]=S[1]*Z,I[2]=S[2]*Z,I[3]=S[3]*Z,I[4]=S[4]*ie,I[5]=S[5]*ie,I[6]=S[6]*ie,I[7]=S[7]*ie,I[8]=S[8]*pe,I[9]=S[9]*pe,I[10]=S[10]*pe,I[11]=S[11]*pe,I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15],I},i.L=Qo,i.M=function(I,S){let D={};for(let Z=0;Z{let S=window.document.createElement("video");return S.muted=!0,new Promise(D=>{S.onloadstart=()=>{D(S)};for(let Z of I){let ie=window.document.createElement("source");Ee(Z)||(S.crossOrigin="Anonymous"),ie.src=Z,S.appendChild(ie)}})},i.a4=function(){return _++},i.a5=ua,i.a6=E1,i.a7=Sn,i.a8=ff,i.a9=dM,i.aA=function(I){if(I.type==="custom")return new uM(I);switch(I.type){case"background":return new Q8(I);case"circle":return new hs(I);case"fill":return new Fr(I);case"fill-extrusion":return new Td(I);case"heatmap":return new Tu(I);case"hillshade":return new Cc(I);case"line":return new ag(I);case"raster":return new Yx(I);case"symbol":return new ug(I)}},i.aB=v,i.aC=function(I,S){if(!I)return[{command:"setStyle",args:[S]}];let D=[];try{if(!gt(I.version,S.version))return[{command:"setStyle",args:[S]}];gt(I.center,S.center)||D.push({command:"setCenter",args:[S.center]}),gt(I.zoom,S.zoom)||D.push({command:"setZoom",args:[S.zoom]}),gt(I.bearing,S.bearing)||D.push({command:"setBearing",args:[S.bearing]}),gt(I.pitch,S.pitch)||D.push({command:"setPitch",args:[S.pitch]}),gt(I.sprite,S.sprite)||D.push({command:"setSprite",args:[S.sprite]}),gt(I.glyphs,S.glyphs)||D.push({command:"setGlyphs",args:[S.glyphs]}),gt(I.transition,S.transition)||D.push({command:"setTransition",args:[S.transition]}),gt(I.light,S.light)||D.push({command:"setLight",args:[S.light]}),gt(I.terrain,S.terrain)||D.push({command:"setTerrain",args:[S.terrain]}),gt(I.sky,S.sky)||D.push({command:"setSky",args:[S.sky]}),gt(I.projection,S.projection)||D.push({command:"setProjection",args:[S.projection]});let Z={},ie=[];(function(xe,He,at,wt){let Ht;for(Ht in He=He||{},xe=xe||{})Object.prototype.hasOwnProperty.call(xe,Ht)&&(Object.prototype.hasOwnProperty.call(He,Ht)||Xe(Ht,at,wt));for(Ht in He)Object.prototype.hasOwnProperty.call(He,Ht)&&(Object.prototype.hasOwnProperty.call(xe,Ht)?gt(xe[Ht],He[Ht])||(xe[Ht].type==="geojson"&&He[Ht].type==="geojson"&&xt(xe,He,Ht)?Pt(at,{command:"setGeoJSONSourceData",args:[Ht,He[Ht].data]}):Tt(Ht,He,at,wt)):Qe(Ht,He,at))})(I.sources,S.sources,ie,Z);let pe=[];I.layers&&I.layers.forEach(xe=>{"source"in xe&&Z[xe.source]?D.push({command:"removeLayer",args:[xe.id]}):pe.push(xe)}),D=D.concat(ie),function(xe,He,at){He=He||[];let wt=(xe=xe||[]).map(Ct),Ht=He.map(Ct),rr=xe.reduce(jt,{}),pr=He.reduce(jt,{}),Ar=wt.slice(),Vr=Object.create(null),ri,Ii,Zi,da,cn;for(let jn=0,Va=0;jn@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(D,Z,ie,pe)=>{let xe=ie||pe;return S[Z]=!xe||xe.toLowerCase(),""}),S["max-age"]){let D=parseInt(S["max-age"],10);isNaN(D)?delete S["max-age"]:S["max-age"]=D}return S},i.ab=function(I,S){let D=[];for(let Z in I)Z in S||D.push(Z);return D},i.ac=k,i.ad=function(I,S,D){var Z=Math.sin(D),ie=Math.cos(D),pe=S[0],xe=S[1],He=S[2],at=S[3],wt=S[4],Ht=S[5],rr=S[6],pr=S[7];return S!==I&&(I[8]=S[8],I[9]=S[9],I[10]=S[10],I[11]=S[11],I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15]),I[0]=pe*ie+wt*Z,I[1]=xe*ie+Ht*Z,I[2]=He*ie+rr*Z,I[3]=at*ie+pr*Z,I[4]=wt*ie-pe*Z,I[5]=Ht*ie-xe*Z,I[6]=rr*ie-He*Z,I[7]=pr*ie-at*Z,I},i.ae=function(I){var S=new Es(16);return S[0]=I[0],S[1]=I[1],S[2]=I[2],S[3]=I[3],S[4]=I[4],S[5]=I[5],S[6]=I[6],S[7]=I[7],S[8]=I[8],S[9]=I[9],S[10]=I[10],S[11]=I[11],S[12]=I[12],S[13]=I[13],S[14]=I[14],S[15]=I[15],S},i.af=ru,i.ag=function(I,S){let D=0,Z=0;if(I.kind==="constant")Z=I.layoutSize;else if(I.kind!=="source"){let{interpolationType:ie,minZoom:pe,maxZoom:xe}=I,He=ie?k(za.interpolationFactor(ie,S,pe,xe),0,1):0;I.kind==="camera"?Z=ia.number(I.minSize,I.maxSize,He):D=He}return{uSizeT:D,uSize:Z}},i.ai=function(I,{uSize:S,uSizeT:D},{lowerSize:Z,upperSize:ie}){return I.kind==="source"?Z/p0:I.kind==="composite"?ia.number(Z/p0,ie/p0,D):S},i.aj=aM,i.ak=function(I,S,D,Z){let ie=S.y-I.y,pe=S.x-I.x,xe=Z.y-D.y,He=Z.x-D.x,at=xe*pe-He*ie;if(at===0)return null;let wt=(He*(I.y-D.y)-xe*(I.x-D.x))/at;return new l(I.x+wt*pe,I.y+wt*ie)},i.al=MC,i.am=dc,i.an=Ws,i.ao=function(I){let S=1/0,D=1/0,Z=-1/0,ie=-1/0;for(let pe of I)S=Math.min(S,pe.x),D=Math.min(D,pe.y),Z=Math.max(Z,pe.x),ie=Math.max(ie,pe.y);return[S,D,Z,ie]},i.ap=Ff,i.ar=nM,i.as=function(I,S){var D=S[0],Z=S[1],ie=S[2],pe=S[3],xe=S[4],He=S[5],at=S[6],wt=S[7],Ht=S[8],rr=S[9],pr=S[10],Ar=S[11],Vr=S[12],ri=S[13],Ii=S[14],Zi=S[15],da=D*He-Z*xe,cn=D*at-ie*xe,jn=D*wt-pe*xe,Va=Z*at-ie*He,hl=Z*wt-pe*He,iu=ie*wt-pe*at,Su=Ht*ri-rr*Vr,Zl=Ht*Ii-pr*Vr,Qs=Ht*Zi-Ar*Vr,gu=rr*Ii-pr*ri,cu=rr*Zi-Ar*ri,uu=pr*Zi-Ar*Ii,Ts=da*uu-cn*cu+jn*gu+Va*Qs-hl*Zl+iu*Su;return Ts?(I[0]=(He*uu-at*cu+wt*gu)*(Ts=1/Ts),I[1]=(ie*cu-Z*uu-pe*gu)*Ts,I[2]=(ri*iu-Ii*hl+Zi*Va)*Ts,I[3]=(pr*hl-rr*iu-Ar*Va)*Ts,I[4]=(at*Qs-xe*uu-wt*Zl)*Ts,I[5]=(D*uu-ie*Qs+pe*Zl)*Ts,I[6]=(Ii*jn-Vr*iu-Zi*cn)*Ts,I[7]=(Ht*iu-pr*jn+Ar*cn)*Ts,I[8]=(xe*cu-He*Qs+wt*Su)*Ts,I[9]=(Z*Qs-D*cu-pe*Su)*Ts,I[10]=(Vr*hl-ri*jn+Zi*da)*Ts,I[11]=(rr*jn-Ht*hl-Ar*da)*Ts,I[12]=(He*Zl-xe*gu-at*Su)*Ts,I[13]=(D*gu-Z*Zl+ie*Su)*Ts,I[14]=(ri*cn-Vr*Va-Ii*da)*Ts,I[15]=(Ht*Va-rr*cn+pr*da)*Ts,I):null},i.at=yM,i.au=Pw,i.av=mM,i.aw=function(){let I={},S=fe.$version;for(let D in fe.$root){let Z=fe.$root[D];if(Z.required){let ie=null;ie=D==="version"?S:Z.type==="array"?[]:{},ie!=null&&(I[D]=ie)}}return I},i.ax=Gn,i.ay=te,i.az=function(I){I=I.slice();let S=Object.create(null);for(let D=0;D25||Z<0||Z>=1||D<0||D>=1)},i.bc=function(I,S){return I[0]=S[0],I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=S[1],I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=S[2],I[11]=0,I[12]=0,I[13]=0,I[14]=0,I[15]=1,I},i.bd=class extends zt{},i.be=cM,i.bf=sB,i.bh=he,i.bi=function(I,S){be.REGISTERED_PROTOCOLS[I]=S},i.bj=function(I){delete be.REGISTERED_PROTOCOLS[I]},i.bk=function(I,S){let D={};for(let ie=0;ieuu*Ff)}let Zl=xe?"center":D.get("text-justify").evaluate(wt,{},I.canonical),Qs=D.get("symbol-placement")==="point"?D.get("text-max-width").evaluate(wt,{},I.canonical)*Ff:1/0,gu=()=>{I.bucket.allowVerticalPlacement&&Lo(jn)&&(Vr.vertical=Hx(ri,I.glyphMap,I.glyphPositions,I.imagePositions,Ht,Qs,pe,iu,"left",hl,Zi,i.ah.vertical,!0,pr,rr))};if(!xe&&Su){let cu=new Set;if(Zl==="auto")for(let Ts=0;Tsa(void 0,void 0,void 0,function*(){if(I.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(I)],{type:"image/png"});try{return createImageBitmap(S)}catch(D){throw new Error(`Could not load image because of ${D.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=I=>new Promise((S,D)=>{let Z=new Image;Z.onload=()=>{S(Z),URL.revokeObjectURL(Z.src),Z.onload=null,window.requestAnimationFrame(()=>{Z.src=j})},Z.onerror=()=>D(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 ie=new Blob([new Uint8Array(I)],{type:"image/png"});Z.src=I.byteLength?URL.createObjectURL(ie):j}),i.g=ze,i.h=(I,S)=>ke(L(I,{type:"json"}),S),i.i=q,i.j=me,i.k=Re,i.l=(I,S)=>ke(L(I,{type:"arrayBuffer"}),S),i.m=ke,i.n=function(I){return new tM(I).readFields(kQ,[])},i.o=bu,i.p=iM,i.q=oe,i.r=di,i.s=Ee,i.t=wi,i.u=li,i.v=fe,i.w=T,i.x=function([I,S,D]){return S+=90,S*=Math.PI/180,D*=Math.PI/180,{x:I*Math.cos(S)*Math.sin(D),y:I*Math.sin(S)*Math.sin(D),z:I*Math.cos(D)}},i.y=ia,i.z=Fo}),r("worker",["./shared"],function(i){"use strict";class a{constructor(_e){this.keyCache={},_e&&this.replace(_e)}replace(_e){this._layerConfigs={},this._layers={},this.update(_e,[])}update(_e,Fe){for(let Ie of _e){this._layerConfigs[Ie.id]=Ie;let lt=this._layers[Ie.id]=i.aA(Ie);lt._featureFilter=i.a7(lt.filter),this.keyCache[Ie.id]&&delete this.keyCache[Ie.id]}for(let Ie of Fe)delete this.keyCache[Ie],delete this._layerConfigs[Ie],delete this._layers[Ie];this.familiesBySource={};let Pe=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let Ie of Pe){let lt=Ie.map(St=>this._layers[St.id]),ye=lt[0];if(ye.visibility==="none")continue;let ue=ye.source||"",de=this.familiesBySource[ue];de||(de=this.familiesBySource[ue]={});let ht=ye.sourceLayer||"_geojsonTileLayer",Et=de[ht];Et||(Et=de[ht]=[]),Et.push(lt)}}}class o{constructor(_e){let Fe={},Pe=[];for(let ue in _e){let de=_e[ue],ht=Fe[ue]={};for(let Et in de){let St=de[+Et];if(!St||St.bitmap.width===0||St.bitmap.height===0)continue;let Zt={x:0,y:0,w:St.bitmap.width+2,h:St.bitmap.height+2};Pe.push(Zt),ht[Et]={rect:Zt,metrics:St.metrics}}}let{w:Ie,h:lt}=i.p(Pe),ye=new i.o({width:Ie||1,height:lt||1});for(let ue in _e){let de=_e[ue];for(let ht in de){let Et=de[+ht];if(!Et||Et.bitmap.width===0||Et.bitmap.height===0)continue;let St=Fe[ue][ht].rect;i.o.copy(Et.bitmap,ye,{x:0,y:0},{x:St.x+1,y:St.y+1},Et.bitmap)}}this.image=ye,this.positions=Fe}}i.bl("GlyphAtlas",o);class s{constructor(_e){this.tileID=new i.S(_e.tileID.overscaledZ,_e.tileID.wrap,_e.tileID.canonical.z,_e.tileID.canonical.x,_e.tileID.canonical.y),this.uid=_e.uid,this.zoom=_e.zoom,this.pixelRatio=_e.pixelRatio,this.tileSize=_e.tileSize,this.source=_e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=_e.showCollisionBoxes,this.collectResourceTiming=!!_e.collectResourceTiming,this.returnDependencies=!!_e.returnDependencies,this.promoteId=_e.promoteId,this.inFlightDependencies=[]}parse(_e,Fe,Pe,Ie){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=_e,this.collisionBoxArray=new i.a5;let lt=new i.bm(Object.keys(_e.layers).sort()),ye=new i.bn(this.tileID,this.promoteId);ye.bucketLayerIDs=[];let ue={},de={featureIndex:ye,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Pe},ht=Fe.familiesBySource[this.source];for(let Hi in ht){let Jr=_e.layers[Hi];if(!Jr)continue;Jr.version===1&&i.w(`Vector tile source "${this.source}" layer "${Hi}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ci=lt.encode(Hi),Di=[];for(let Lt=0;Lt=vt.maxzoom||vt.visibility!=="none"&&(u(Lt,this.zoom,Pe),(ue[vt.id]=vt.createBucket({index:ye.bucketLayerIDs.length,layers:Lt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ci,sourceID:this.source})).populate(Di,de,this.tileID.canonical),ye.bucketLayerIDs.push(Lt.map(Dt=>Dt.id)))}}let Et=i.aF(de.glyphDependencies,Hi=>Object.keys(Hi).map(Number));this.inFlightDependencies.forEach(Hi=>Hi==null?void 0:Hi.abort()),this.inFlightDependencies=[];let St=Promise.resolve({});if(Object.keys(Et).length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),St=Ie.sendAsync({type:"GG",data:{stacks:Et,source:this.source,tileID:this.tileID,type:"glyphs"}},Hi)}let Zt=Object.keys(de.iconDependencies),qr=Promise.resolve({});if(Zt.length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),qr=Ie.sendAsync({type:"GI",data:{icons:Zt,source:this.source,tileID:this.tileID,type:"icons"}},Hi)}let Lr=Object.keys(de.patternDependencies),vr=Promise.resolve({});if(Lr.length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),vr=Ie.sendAsync({type:"GI",data:{icons:Lr,source:this.source,tileID:this.tileID,type:"patterns"}},Hi)}let[Er,si,Ei]=yield Promise.all([St,qr,vr]),Si=new o(Er),xi=new i.bo(si,Ei);for(let Hi in ue){let Jr=ue[Hi];Jr instanceof i.a6?(u(Jr.layers,this.zoom,Pe),i.bp({bucket:Jr,glyphMap:Er,glyphPositions:Si.positions,imageMap:si,imagePositions:xi.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Jr.hasPattern&&(Jr instanceof i.bq||Jr instanceof i.br||Jr instanceof i.bs)&&(u(Jr.layers,this.zoom,Pe),Jr.addFeatures(de,this.tileID.canonical,xi.patternPositions))}return this.status="done",{buckets:Object.values(ue).filter(Hi=>!Hi.isEmpty()),featureIndex:ye,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Si.image,imageAtlas:xi,glyphMap:this.returnDependencies?Er:null,iconMap:this.returnDependencies?si:null,glyphPositions:this.returnDependencies?Si.positions:null}})}}function u(De,_e,Fe){let Pe=new i.z(_e);for(let Ie of De)Ie.recalculate(Pe,Fe)}class l{constructor(_e,Fe,Pe){this.actor=_e,this.layerIndex=Fe,this.availableImages=Pe,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=yield i.l(_e.request,Fe);try{return{vectorTile:new i.bt.VectorTile(new i.bu(Pe.data)),rawData:Pe.data,cacheControl:Pe.cacheControl,expires:Pe.expires}}catch(Ie){let lt=new Uint8Array(Pe.data),ye=`Unable to parse the tile at ${_e.request.url}, `;throw ye+=lt[0]===31&<[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ie.message}`,new Error(ye)}})}loadTile(_e){return i._(this,void 0,void 0,function*(){let Fe=_e.uid,Pe=!!(_e&&_e.request&&_e.request.collectResourceTiming)&&new i.bv(_e.request),Ie=new s(_e);this.loading[Fe]=Ie;let lt=new AbortController;Ie.abort=lt;try{let ye=yield this.loadVectorTile(_e,lt);if(delete this.loading[Fe],!ye)return null;let ue=ye.rawData,de={};ye.expires&&(de.expires=ye.expires),ye.cacheControl&&(de.cacheControl=ye.cacheControl);let ht={};if(Pe){let St=Pe.finish();St&&(ht.resourceTiming=JSON.parse(JSON.stringify(St)))}Ie.vectorTile=ye.vectorTile;let Et=Ie.parse(ye.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Fe]=Ie,this.fetching[Fe]={rawTileData:ue,cacheControl:de,resourceTiming:ht};try{let St=yield Et;return i.e({rawTileData:ue.slice(0)},St,de,ht)}finally{delete this.fetching[Fe]}}catch(ye){throw delete this.loading[Fe],Ie.status="done",this.loaded[Fe]=Ie,ye}})}reloadTile(_e){return i._(this,void 0,void 0,function*(){let Fe=_e.uid;if(!this.loaded||!this.loaded[Fe])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Pe=this.loaded[Fe];if(Pe.showCollisionBoxes=_e.showCollisionBoxes,Pe.status==="parsing"){let Ie=yield Pe.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor),lt;if(this.fetching[Fe]){let{rawTileData:ye,cacheControl:ue,resourceTiming:de}=this.fetching[Fe];delete this.fetching[Fe],lt=i.e({rawTileData:ye.slice(0)},Ie,ue,de)}else lt=Ie;return lt}if(Pe.status==="done"&&Pe.vectorTile)return Pe.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(_e){return i._(this,void 0,void 0,function*(){let Fe=this.loading,Pe=_e.uid;Fe&&Fe[Pe]&&Fe[Pe].abort&&(Fe[Pe].abort.abort(),delete Fe[Pe])})}removeTile(_e){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[_e.uid]&&delete this.loaded[_e.uid]})}}class f{constructor(){this.loaded={}}loadTile(_e){return i._(this,void 0,void 0,function*(){let{uid:Fe,encoding:Pe,rawImageData:Ie,redFactor:lt,greenFactor:ye,blueFactor:ue,baseShift:de}=_e,ht=Ie.width+2,Et=Ie.height+2,St=i.b(Ie)?new i.R({width:ht,height:Et},yield i.bw(Ie,-1,-1,ht,Et)):Ie,Zt=new i.bx(Fe,St,Pe,lt,ye,ue,de);return this.loaded=this.loaded||{},this.loaded[Fe]=Zt,Zt})}removeTile(_e){let Fe=this.loaded,Pe=_e.uid;Fe&&Fe[Pe]&&delete Fe[Pe]}}function c(De,_e){if(De.length!==0){h(De[0],_e);for(var Fe=1;Fe=Math.abs(ue)?Fe-de+ue:ue-de+Fe,Fe=de}Fe+Pe>=0!=!!_e&&De.reverse()}var d=i.by(function De(_e,Fe){var Pe,Ie=_e&&_e.type;if(Ie==="FeatureCollection")for(Pe=0;Pe<_e.features.length;Pe++)De(_e.features[Pe],Fe);else if(Ie==="GeometryCollection")for(Pe=0;Pe<_e.geometries.length;Pe++)De(_e.geometries[Pe],Fe);else if(Ie==="Feature")De(_e.geometry,Fe);else if(Ie==="Polygon")c(_e.coordinates,Fe);else if(Ie==="MultiPolygon")for(Pe=0;Pe<_e.coordinates.length;Pe++)c(_e.coordinates[Pe],Fe);return _e});let p=i.bt.VectorTileFeature.prototype.toGeoJSON;var x={exports:{}},b=i.bz,y=i.bt.VectorTileFeature,E=k;function k(De,_e){this.options=_e||{},this.features=De,this.length=De.length}function A(De,_e){this.id=typeof De.id=="number"?De.id:void 0,this.type=De.type,this.rawGeometry=De.type===1?[De.geometry]:De.geometry,this.properties=De.tags,this.extent=_e||4096}k.prototype.feature=function(De){return new A(this.features[De],this.options.extent)},A.prototype.loadGeometry=function(){var De=this.rawGeometry;this.geometry=[];for(var _e=0;_e>31}function q(De,_e){for(var Fe=De.loadGeometry(),Pe=De.type,Ie=0,lt=0,ye=Fe.length,ue=0;ueDe},G=Math.fround||(O=new Float32Array(1),De=>(O[0]=+De,O[0]));var O;let W=3,re=5,ne=6;class be{constructor(_e){this.options=Object.assign(Object.create(j),_e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(_e){let{log:Fe,minZoom:Pe,maxZoom:Ie}=this.options;Fe&&console.time("total time");let lt=`prepare ${_e.length} points`;Fe&&console.time(lt),this.points=_e;let ye=[];for(let de=0;de<_e.length;de++){let ht=_e[de];if(!ht.geometry)continue;let[Et,St]=ht.geometry.coordinates,Zt=G(he(Et)),qr=G(te(St));ye.push(Zt,qr,1/0,de,-1,1),this.options.reduce&&ye.push(0)}let ue=this.trees[Ie+1]=this._createTree(ye);Fe&&console.timeEnd(lt);for(let de=Ie;de>=Pe;de--){let ht=+Date.now();ue=this.trees[de]=this._createTree(this._cluster(ue,de)),Fe&&console.log("z%d: %d clusters in %dms",de,ue.numItems,+Date.now()-ht)}return Fe&&console.timeEnd("total time"),this}getClusters(_e,Fe){let Pe=((_e[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,_e[1])),lt=_e[2]===180?180:((_e[2]+180)%360+360)%360-180,ye=Math.max(-90,Math.min(90,_e[3]));if(_e[2]-_e[0]>=360)Pe=-180,lt=180;else if(Pe>lt){let St=this.getClusters([Pe,Ie,180,ye],Fe),Zt=this.getClusters([-180,Ie,lt,ye],Fe);return St.concat(Zt)}let ue=this.trees[this._limitZoom(Fe)],de=ue.range(he(Pe),te(ye),he(lt),te(Ie)),ht=ue.data,Et=[];for(let St of de){let Zt=this.stride*St;Et.push(ht[Zt+re]>1?ze(ht,Zt,this.clusterProps):this.points[ht[Zt+W]])}return Et}getChildren(_e){let Fe=this._getOriginId(_e),Pe=this._getOriginZoom(_e),Ie="No cluster with the specified id.",lt=this.trees[Pe];if(!lt)throw new Error(Ie);let ye=lt.data;if(Fe*this.stride>=ye.length)throw new Error(Ie);let ue=this.options.radius/(this.options.extent*Math.pow(2,Pe-1)),de=lt.within(ye[Fe*this.stride],ye[Fe*this.stride+1],ue),ht=[];for(let Et of de){let St=Et*this.stride;ye[St+4]===_e&&ht.push(ye[St+re]>1?ze(ye,St,this.clusterProps):this.points[ye[St+W]])}if(ht.length===0)throw new Error(Ie);return ht}getLeaves(_e,Fe,Pe){let Ie=[];return this._appendLeaves(Ie,_e,Fe=Fe||10,Pe=Pe||0,0),Ie}getTile(_e,Fe,Pe){let Ie=this.trees[this._limitZoom(_e)],lt=Math.pow(2,_e),{extent:ye,radius:ue}=this.options,de=ue/ye,ht=(Pe-de)/lt,Et=(Pe+1+de)/lt,St={features:[]};return this._addTileFeatures(Ie.range((Fe-de)/lt,ht,(Fe+1+de)/lt,Et),Ie.data,Fe,Pe,lt,St),Fe===0&&this._addTileFeatures(Ie.range(1-de/lt,ht,1,Et),Ie.data,lt,Pe,lt,St),Fe===lt-1&&this._addTileFeatures(Ie.range(0,ht,de/lt,Et),Ie.data,-1,Pe,lt,St),St.features.length?St:null}getClusterExpansionZoom(_e){let Fe=this._getOriginZoom(_e)-1;for(;Fe<=this.options.maxZoom;){let Pe=this.getChildren(_e);if(Fe++,Pe.length!==1)break;_e=Pe[0].properties.cluster_id}return Fe}_appendLeaves(_e,Fe,Pe,Ie,lt){let ye=this.getChildren(Fe);for(let ue of ye){let de=ue.properties;if(de&&de.cluster?lt+de.point_count<=Ie?lt+=de.point_count:lt=this._appendLeaves(_e,de.cluster_id,Pe,Ie,lt):lt1,Et,St,Zt;if(ht)Et=Ce(Fe,de,this.clusterProps),St=Fe[de],Zt=Fe[de+1];else{let vr=this.points[Fe[de+W]];Et=vr.properties;let[Er,si]=vr.geometry.coordinates;St=he(Er),Zt=te(si)}let qr={type:1,geometry:[[Math.round(this.options.extent*(St*lt-Pe)),Math.round(this.options.extent*(Zt*lt-Ie))]],tags:Et},Lr;Lr=ht||this.options.generateId?Fe[de+W]:this.points[Fe[de+W]].id,Lr!==void 0&&(qr.id=Lr),ye.features.push(qr)}}_limitZoom(_e){return Math.max(this.options.minZoom,Math.min(Math.floor(+_e),this.options.maxZoom+1))}_cluster(_e,Fe){let{radius:Pe,extent:Ie,reduce:lt,minPoints:ye}=this.options,ue=Pe/(Ie*Math.pow(2,Fe)),de=_e.data,ht=[],Et=this.stride;for(let St=0;StFe&&(Er+=de[Ei+re])}if(Er>vr&&Er>=ye){let si,Ei=Zt*vr,Si=qr*vr,xi=-1,Hi=((St/Et|0)<<5)+(Fe+1)+this.points.length;for(let Jr of Lr){let ci=Jr*Et;if(de[ci+2]<=Fe)continue;de[ci+2]=Fe;let Di=de[ci+re];Ei+=de[ci]*Di,Si+=de[ci+1]*Di,de[ci+4]=Hi,lt&&(si||(si=this._map(de,St,!0),xi=this.clusterProps.length,this.clusterProps.push(si)),lt(si,this._map(de,ci)))}de[St+4]=Hi,ht.push(Ei/Er,Si/Er,1/0,Hi,-1,Er),lt&&ht.push(xi)}else{for(let si=0;si1)for(let si of Lr){let Ei=si*Et;if(!(de[Ei+2]<=Fe)){de[Ei+2]=Fe;for(let Si=0;Si>5}_getOriginZoom(_e){return(_e-this.points.length)%32}_map(_e,Fe,Pe){if(_e[Fe+re]>1){let ye=this.clusterProps[_e[Fe+ne]];return Pe?Object.assign({},ye):ye}let Ie=this.points[_e[Fe+W]].properties,lt=this.options.map(Ie);return Pe&<===Ie?Object.assign({},lt):lt}}function ze(De,_e,Fe){return{type:"Feature",id:De[_e+W],properties:Ce(De,_e,Fe),geometry:{type:"Point",coordinates:[(Pe=De[_e],360*(Pe-.5)),ke(De[_e+1])]}};var Pe}function Ce(De,_e,Fe){let Pe=De[_e+re],Ie=Pe>=1e4?`${Math.round(Pe/1e3)}k`:Pe>=1e3?Math.round(Pe/100)/10+"k":Pe,lt=De[_e+ne],ye=lt===-1?{}:Object.assign({},Fe[lt]);return Object.assign(ye,{cluster:!0,cluster_id:De[_e+W],point_count:Pe,point_count_abbreviated:Ie})}function he(De){return De/360+.5}function te(De){let _e=Math.sin(De*Math.PI/180),Fe=.5-.25*Math.log((1+_e)/(1-_e))/Math.PI;return Fe<0?0:Fe>1?1:Fe}function ke(De){let _e=(180-360*De)*Math.PI/180;return 360*Math.atan(Math.exp(_e))/Math.PI-90}function Ee(De,_e,Fe,Pe){let Ie=Pe,lt=_e+(Fe-_e>>1),ye,ue=Fe-_e,de=De[_e],ht=De[_e+1],Et=De[Fe],St=De[Fe+1];for(let Zt=_e+3;ZtIe)ye=Zt,Ie=qr;else if(qr===Ie){let Lr=Math.abs(Zt-lt);LrPe&&(ye-_e>3&&Ee(De,_e,ye,Pe),De[ye+2]=Ie,Fe-ye>3&&Ee(De,ye,Fe,Pe))}function Me(De,_e,Fe,Pe,Ie,lt){let ye=Ie-Fe,ue=lt-Pe;if(ye!==0||ue!==0){let de=((De-Fe)*ye+(_e-Pe)*ue)/(ye*ye+ue*ue);de>1?(Fe=Ie,Pe=lt):de>0&&(Fe+=ye*de,Pe+=ue*de)}return ye=De-Fe,ue=_e-Pe,ye*ye+ue*ue}function Oe(De,_e,Fe,Pe){let Ie={id:De==null?null:De,type:_e,geometry:Fe,tags:Pe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(_e==="Point"||_e==="MultiPoint"||_e==="LineString")Re(Ie,Fe);else if(_e==="Polygon")Re(Ie,Fe[0]);else if(_e==="MultiLineString")for(let lt of Fe)Re(Ie,lt);else if(_e==="MultiPolygon")for(let lt of Fe)Re(Ie,lt[0]);return Ie}function Re(De,_e){for(let Fe=0;Fe<_e.length;Fe+=3)De.minX=Math.min(De.minX,_e[Fe]),De.minY=Math.min(De.minY,_e[Fe+1]),De.maxX=Math.max(De.maxX,_e[Fe]),De.maxY=Math.max(De.maxY,_e[Fe+1])}function me(De,_e,Fe,Pe){if(!_e.geometry)return;let Ie=_e.geometry.coordinates;if(Ie&&Ie.length===0)return;let lt=_e.geometry.type,ye=Math.pow(Fe.tolerance/((1<0&&(ye+=Pe?(Ie*Et-ht*lt)/2:Math.sqrt(Math.pow(ht-Ie,2)+Math.pow(Et-lt,2))),Ie=ht,lt=Et}let ue=_e.length-3;_e[2]=1,Ee(_e,0,ue,Fe),_e[ue+2]=1,_e.size=Math.abs(ye),_e.start=0,_e.end=_e.size}function Ze(De,_e,Fe,Pe){for(let Ie=0;Ie1?1:Fe}function Pt(De,_e,Fe,Pe,Ie,lt,ye,ue){if(Pe/=_e,lt>=(Fe/=_e)&&ye=Pe)return null;let de=[];for(let ht of De){let Et=ht.geometry,St=ht.type,Zt=Ie===0?ht.minX:ht.minY,qr=Ie===0?ht.maxX:ht.maxY;if(Zt>=Fe&&qr=Pe)continue;let Lr=[];if(St==="Point"||St==="MultiPoint")Qe(Et,Lr,Fe,Pe,Ie);else if(St==="LineString")Xe(Et,Lr,Fe,Pe,Ie,!1,ue.lineMetrics);else if(St==="MultiLineString")xt(Et,Lr,Fe,Pe,Ie,!1);else if(St==="Polygon")xt(Et,Lr,Fe,Pe,Ie,!0);else if(St==="MultiPolygon")for(let vr of Et){let Er=[];xt(vr,Er,Fe,Pe,Ie,!0),Er.length&&Lr.push(Er)}if(Lr.length){if(ue.lineMetrics&&St==="LineString"){for(let vr of Lr)de.push(Oe(ht.id,St,vr,ht.tags));continue}St!=="LineString"&&St!=="MultiLineString"||(Lr.length===1?(St="LineString",Lr=Lr[0]):St="MultiLineString"),St!=="Point"&&St!=="MultiPoint"||(St=Lr.length===3?"Point":"MultiPoint"),de.push(Oe(ht.id,St,Lr,ht.tags))}}return de.length?de:null}function Qe(De,_e,Fe,Pe,Ie){for(let lt=0;lt=Fe&&ye<=Pe&&_t(_e,De[lt],De[lt+1],De[lt+2])}}function Xe(De,_e,Fe,Pe,Ie,lt,ye){let ue=Tt(De),de=Ie===0?Ct:jt,ht,Et,St=De.start;for(let Er=0;ErFe&&(Et=de(ue,si,Ei,xi,Hi,Fe),ye&&(ue.start=St+ht*Et)):Jr>Pe?ci=Fe&&(Et=de(ue,si,Ei,xi,Hi,Fe),Di=!0),ci>Pe&&Jr<=Pe&&(Et=de(ue,si,Ei,xi,Hi,Pe),Di=!0),!lt&&Di&&(ye&&(ue.end=St+ht*Et),_e.push(ue),ue=Tt(De)),ye&&(St+=ht)}let Zt=De.length-3,qr=De[Zt],Lr=De[Zt+1],vr=Ie===0?qr:Lr;vr>=Fe&&vr<=Pe&&_t(ue,qr,Lr,De[Zt+2]),Zt=ue.length-3,lt&&Zt>=3&&(ue[Zt]!==ue[0]||ue[Zt+1]!==ue[1])&&_t(ue,ue[0],ue[1],ue[2]),ue.length&&_e.push(ue)}function Tt(De){let _e=[];return _e.size=De.size,_e.start=De.start,_e.end=De.end,_e}function xt(De,_e,Fe,Pe,Ie,lt){for(let ye of De)Xe(ye,_e,Fe,Pe,Ie,lt,!1)}function _t(De,_e,Fe,Pe){De.push(_e,Fe,Pe)}function Ct(De,_e,Fe,Pe,Ie,lt){let ye=(lt-_e)/(Pe-_e);return _t(De,lt,Fe+(Ie-Fe)*ye,1),ye}function jt(De,_e,Fe,Pe,Ie,lt){let ye=(lt-Fe)/(Ie-Fe);return _t(De,_e+(Pe-_e)*ye,lt,1),ye}function At(De,_e){let Fe=[];for(let Pe=0;Pe0&&_e.size<(Ie?ye:Pe))return void(Fe.numPoints+=_e.length/3);let ue=[];for(let de=0;de<_e.length;de+=3)(Pe===0||_e[de+2]>ye)&&(Fe.numSimplified++,ue.push(_e[de],_e[de+1])),Fe.numPoints++;Ie&&function(de,ht){let Et=0;for(let St=0,Zt=de.length,qr=Zt-2;St0===ht)for(let St=0,Zt=de.length;St24)throw new Error("maxZoom should be in the 0-24 range");if(Fe.promoteId&&Fe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ie=function(lt,ye){let ue=[];if(lt.type==="FeatureCollection")for(let de=0;de1&&console.time("creation"),qr=this.tiles[Zt]=ct(_e,Fe,Pe,Ie,ht),this.tileCoords.push({z:Fe,x:Pe,y:Ie}),Et)){Et>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Fe,Pe,Ie,qr.numFeatures,qr.numPoints,qr.numSimplified),console.timeEnd("creation"));let Di=`z${Fe}`;this.stats[Di]=(this.stats[Di]||0)+1,this.total++}if(qr.source=_e,lt==null){if(Fe===ht.indexMaxZoom||qr.numPoints<=ht.indexMaxPoints)continue}else{if(Fe===ht.maxZoom||Fe===lt)continue;if(lt!=null){let Di=lt-Fe;if(Pe!==ye>>Di||Ie!==ue>>Di)continue}}if(qr.source=null,_e.length===0)continue;Et>1&&console.time("clipping");let Lr=.5*ht.buffer/ht.extent,vr=.5-Lr,Er=.5+Lr,si=1+Lr,Ei=null,Si=null,xi=null,Hi=null,Jr=Pt(_e,St,Pe-Lr,Pe+Er,0,qr.minX,qr.maxX,ht),ci=Pt(_e,St,Pe+vr,Pe+si,0,qr.minX,qr.maxX,ht);_e=null,Jr&&(Ei=Pt(Jr,St,Ie-Lr,Ie+Er,1,qr.minY,qr.maxY,ht),Si=Pt(Jr,St,Ie+vr,Ie+si,1,qr.minY,qr.maxY,ht),Jr=null),ci&&(xi=Pt(ci,St,Ie-Lr,Ie+Er,1,qr.minY,qr.maxY,ht),Hi=Pt(ci,St,Ie+vr,Ie+si,1,qr.minY,qr.maxY,ht),ci=null),Et>1&&console.timeEnd("clipping"),de.push(Ei||[],Fe+1,2*Pe,2*Ie),de.push(Si||[],Fe+1,2*Pe,2*Ie+1),de.push(xi||[],Fe+1,2*Pe+1,2*Ie),de.push(Hi||[],Fe+1,2*Pe+1,2*Ie+1)}}getTile(_e,Fe,Pe){_e=+_e,Fe=+Fe,Pe=+Pe;let Ie=this.options,{extent:lt,debug:ye}=Ie;if(_e<0||_e>24)return null;let ue=1<<_e,de=Mt(_e,Fe=Fe+ue&ue-1,Pe);if(this.tiles[de])return nt(this.tiles[de],lt);ye>1&&console.log("drilling down to z%d-%d-%d",_e,Fe,Pe);let ht,Et=_e,St=Fe,Zt=Pe;for(;!ht&&Et>0;)Et--,St>>=1,Zt>>=1,ht=this.tiles[Mt(Et,St,Zt)];return ht&&ht.source?(ye>1&&(console.log("found parent tile z%d-%d-%d",Et,St,Zt),console.time("drilling down")),this.splitTile(ht.source,Et,St,Zt,_e,Fe,Pe),ye>1&&console.timeEnd("drilling down"),this.tiles[de]?nt(this.tiles[de],lt):null):null}}function Mt(De,_e,Fe){return 32*((1<{St.properties=qr;let Lr={};for(let vr of Zt)Lr[vr]=de[vr].evaluate(Et,St);return Lr},ye.reduce=(qr,Lr)=>{St.properties=Lr;for(let vr of Zt)Et.accumulated=qr[vr],qr[vr]=ht[vr].evaluate(Et,St)},ye}(_e)).load((yield this._pendingData).features):(Ie=yield this._pendingData,new Je(Ie,_e.geojsonVtOptions)),this.loaded={};let lt={};if(Pe){let ye=Pe.finish();ye&&(lt.resourceTiming={},lt.resourceTiming[_e.source]=JSON.parse(JSON.stringify(ye)))}return lt}catch(lt){if(delete this._pendingRequest,i.bB(lt))return{abandoned:!0};throw lt}var Ie})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(_e){let Fe=this.loaded;return Fe&&Fe[_e.uid]?super.reloadTile(_e):this.loadTile(_e)}loadAndProcessGeoJSON(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=yield this.loadGeoJSON(_e,Fe);if(delete this._pendingRequest,typeof Pe!="object")throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`);if(d(Pe,!0),_e.filter){let Ie=i.bC(_e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ie.result==="error")throw new Error(Ie.value.map(ye=>`${ye.key}: ${ye.message}`).join(", "));Pe={type:"FeatureCollection",features:Pe.features.filter(ye=>Ie.value.evaluate({zoom:0},ye))}}return Pe})}loadGeoJSON(_e,Fe){return i._(this,void 0,void 0,function*(){let{promoteId:Pe}=_e;if(_e.request){let Ie=yield i.h(_e.request,Fe);return this._dataUpdateable=Kt(Ie.data,Pe)?ir(Ie.data,Pe):void 0,Ie.data}if(typeof _e.data=="string")try{let Ie=JSON.parse(_e.data);return this._dataUpdateable=Kt(Ie,Pe)?ir(Ie,Pe):void 0,Ie}catch(Ie){throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`)}if(!_e.dataDiff)throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${_e.source}`);return function(Ie,lt,ye){var ue,de,ht,Et;if(lt.removeAll&&Ie.clear(),lt.remove)for(let St of lt.remove)Ie.delete(St);if(lt.add)for(let St of lt.add){let Zt=Vt(St,ye);Zt!=null&&Ie.set(Zt,St)}if(lt.update)for(let St of lt.update){let Zt=Ie.get(St.id);if(Zt==null)continue;let qr=!St.removeAllProperties&&(((ue=St.removeProperties)===null||ue===void 0?void 0:ue.length)>0||((de=St.addOrUpdateProperties)===null||de===void 0?void 0:de.length)>0);if((St.newGeometry||St.removeAllProperties||qr)&&(Zt=Object.assign({},Zt),Ie.set(St.id,Zt),qr&&(Zt.properties=Object.assign({},Zt.properties))),St.newGeometry&&(Zt.geometry=St.newGeometry),St.removeAllProperties)Zt.properties={};else if(((ht=St.removeProperties)===null||ht===void 0?void 0:ht.length)>0)for(let Lr of St.removeProperties)Object.prototype.hasOwnProperty.call(Zt.properties,Lr)&&delete Zt.properties[Lr];if(((Et=St.addOrUpdateProperties)===null||Et===void 0?void 0:Et.length)>0)for(let{key:Lr,value:vr}of St.addOrUpdateProperties)Zt.properties[Lr]=vr}}(this._dataUpdateable,_e.dataDiff,Pe),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(_e){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(_e){return this._geoJSONIndex.getClusterExpansionZoom(_e.clusterId)}getClusterChildren(_e){return this._geoJSONIndex.getChildren(_e.clusterId)}getClusterLeaves(_e){return this._geoJSONIndex.getLeaves(_e.clusterId,_e.limit,_e.offset)}}class Ot{constructor(_e){this.self=_e,this.actor=new i.F(_e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Fe,Pe)=>{if(this.externalWorkerSourceTypes[Fe])throw new Error(`Worker source with name "${Fe}" already registered.`);this.externalWorkerSourceTypes[Fe]=Pe},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Fe=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Fe)},this.actor.registerMessageHandler("LDT",(Fe,Pe)=>this._getDEMWorkerSource(Fe,Pe.source).loadTile(Pe)),this.actor.registerMessageHandler("RDT",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Fe,Pe.source).removeTile(Pe)})),this.actor.registerMessageHandler("GCEZ",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterExpansionZoom(Pe)})),this.actor.registerMessageHandler("GCC",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterChildren(Pe)})),this.actor.registerMessageHandler("GCL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterLeaves(Pe)})),this.actor.registerMessageHandler("LD",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).loadData(Pe)),this.actor.registerMessageHandler("GD",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).getData()),this.actor.registerMessageHandler("LT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).loadTile(Pe)),this.actor.registerMessageHandler("RT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).reloadTile(Pe)),this.actor.registerMessageHandler("AT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).abortTile(Pe)),this.actor.registerMessageHandler("RMT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).removeTile(Pe)),this.actor.registerMessageHandler("RS",(Fe,Pe)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Fe]||!this.workerSources[Fe][Pe.type]||!this.workerSources[Fe][Pe.type][Pe.source])return;let Ie=this.workerSources[Fe][Pe.type][Pe.source];delete this.workerSources[Fe][Pe.type][Pe.source],Ie.removeSource!==void 0&&Ie.removeSource(Pe)})),this.actor.registerMessageHandler("RM",Fe=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Fe],delete this.availableImages[Fe],delete this.workerSources[Fe],delete this.demWorkerSources[Fe]})),this.actor.registerMessageHandler("SR",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this.referrer=Pe})),this.actor.registerMessageHandler("SRPS",(Fe,Pe)=>this._syncRTLPluginState(Fe,Pe)),this.actor.registerMessageHandler("IS",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this.self.importScripts(Pe)})),this.actor.registerMessageHandler("SI",(Fe,Pe)=>this._setImages(Fe,Pe)),this.actor.registerMessageHandler("UL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Fe).update(Pe.layers,Pe.removedIds)})),this.actor.registerMessageHandler("SL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Fe).replace(Pe)}))}_setImages(_e,Fe){return i._(this,void 0,void 0,function*(){this.availableImages[_e]=Fe;for(let Pe in this.workerSources[_e]){let Ie=this.workerSources[_e][Pe];for(let lt in Ie)Ie[lt].availableImages=Fe}})}_syncRTLPluginState(_e,Fe){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Fe.pluginStatus!=="loading")return i.bD.setState(Fe),Fe;let Pe=Fe.pluginURL;if(this.self.importScripts(Pe),i.bD.isParsed()){let Ie={pluginStatus:"loaded",pluginURL:Pe};return i.bD.setState(Ie),Ie}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Pe}`)})}_getAvailableImages(_e){let Fe=this.availableImages[_e];return Fe||(Fe=[]),Fe}_getLayerIndex(_e){let Fe=this.layerIndexes[_e];return Fe||(Fe=this.layerIndexes[_e]=new a),Fe}_getWorkerSource(_e,Fe,Pe){if(this.workerSources[_e]||(this.workerSources[_e]={}),this.workerSources[_e][Fe]||(this.workerSources[_e][Fe]={}),!this.workerSources[_e][Fe][Pe]){let Ie={sendAsync:(lt,ye)=>(lt.targetMapId=_e,this.actor.sendAsync(lt,ye))};switch(Fe){case"vector":this.workerSources[_e][Fe][Pe]=new l(Ie,this._getLayerIndex(_e),this._getAvailableImages(_e));break;case"geojson":this.workerSources[_e][Fe][Pe]=new fr(Ie,this._getLayerIndex(_e),this._getAvailableImages(_e));break;default:this.workerSources[_e][Fe][Pe]=new this.externalWorkerSourceTypes[Fe](Ie,this._getLayerIndex(_e),this._getAvailableImages(_e))}}return this.workerSources[_e][Fe][Pe]}_getDEMWorkerSource(_e,Fe){return this.demWorkerSources[_e]||(this.demWorkerSources[_e]={}),this.demWorkerSources[_e][Fe]||(this.demWorkerSources[_e][Fe]=new f),this.demWorkerSources[_e][Fe]}}return i.i(self)&&(self.worker=new Ot(self)),Ot}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,u,l={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:oe=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(oe,w=0){return this.getImageCanvasContext(oe).getImageData(-w,-w,oe.width+2*w,oe.height+2*w)},getImageCanvasContext(oe){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=oe.width,w.height=oe.height,B.drawImage(oe,0,0,oe.width,oe.height),B},resolveURL:oe=>(s||(s=document.createElement("a")),s.href=oe,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(u==null&&(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)}};class f{static testProp(w){if(!f.docStyle)return w[0];for(let B=0;B{window.removeEventListener("click",f.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=f.getScale(w);return f.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=f.getScale(w);for(let le=0;le{h&&b(h),h=null,x=!0},d.onerror=()=>{p=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(oe){let w,B,Q,ee;oe.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},oe.addThrottleControl=pt=>{let zt=Q++;return ee[zt]=pt,zt},oe.removeThrottleControl=pt=>{delete ee[pt],Ne()},oe.getImage=(pt,zt,Yt=!0)=>new Promise((Jt,yr)=>{c.supported&&(pt.headers||(pt.headers={}),pt.headers.accept="image/webp,*/*"),a.e(pt,{type:"image"}),w.push({abortController:zt,requestParameters:pt,supportImageRefresh:Yt,state:"queued",onError:Ir=>{yr(Ir)},onSuccess:Ir=>{Jt(Ir)}}),Ne()});let le=pt=>a._(this,void 0,void 0,function*(){pt.state="running";let{requestParameters:zt,supportImageRefresh:Yt,onError:Jt,onSuccess:yr,abortController:Ir}=pt,ce=Yt===!1&&!a.i(self)&&!a.g(zt.url)&&(!zt.headers||Object.keys(zt.headers).reduce((Ve,ot)=>Ve&&ot==="accept",!0));B++;let Ae=ce?$e(zt,Ir):a.m(zt,Ir);try{let Ve=yield Ae;delete pt.abortController,pt.state="completed",Ve.data instanceof HTMLImageElement||a.b(Ve.data)?yr(Ve):Ve.data&&yr({data:yield(qe=Ve.data,typeof createImageBitmap=="function"?a.d(qe):a.f(qe)),cacheControl:Ve.cacheControl,expires:Ve.expires})}catch(Ve){delete pt.abortController,Jt(Ve)}finally{B--,Ne()}var qe}),Ne=()=>{let pt=(()=>{for(let zt of Object.keys(ee))if(ee[zt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let zt=B;zt0;zt++){let Yt=w.shift();Yt.abortController.signal.aborted?zt--:le(Yt)}},$e=(pt,zt)=>new Promise((Yt,Jt)=>{let yr=new Image,Ir=pt.url,ce=pt.credentials;ce&&ce==="include"?yr.crossOrigin="use-credentials":(ce&&ce==="same-origin"||!a.s(Ir))&&(yr.crossOrigin="anonymous"),zt.signal.addEventListener("abort",()=>{yr.src="",Jt(a.c())}),yr.fetchPriority="high",yr.onload=()=>{yr.onerror=yr.onload=null,Yt({data:yr})},yr.onerror=()=>{yr.onerror=yr.onload=null,zt.signal.aborted||Jt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},yr.src=Ir})}(y||(y={})),y.resetRequestQueue();class E{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function k(oe){var w=new a.A(3);return w[0]=oe[0],w[1]=oe[1],w[2]=oe[2],w}var A,L=function(oe,w,B){return oe[0]=w[0]-B[0],oe[1]=w[1]-B[1],oe[2]=w[2]-B[2],oe};A=new a.A(3),a.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var _=function(oe){var w=oe[0],B=oe[1];return w*w+B*B};function C(oe){let w=[];if(typeof oe=="string")w.push({id:"default",url:oe});else if(oe&&oe.length>0){let B=[];for(let{id:Q,url:ee}of oe){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(oe,w,B){let Q=oe.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var oe=new a.A(2);a.A!=Float32Array&&(oe[0]=0,oe[1]=0)})();class v{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,Ne=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:$e}=this,{gl:pt}=$e;if(this.useMipmap=!!(B&&B.useMipmap),pt.bindTexture(pt.TEXTURE_2D,this.texture),$e.pixelStoreUnpackFlipY.set(!1),$e.pixelStoreUnpack.set(1),$e.pixelStoreUnpackPremultiplyAlpha.set(this.format===pt.RGBA&&(!B||B.premultiply!==!1)),Ne)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?pt.texImage2D(pt.TEXTURE_2D,0,this.format,this.format,pt.UNSIGNED_BYTE,w):pt.texImage2D(pt.TEXTURE_2D,0,this.format,ee,le,0,this.format,pt.UNSIGNED_BYTE,w.data);else{let{x:zt,y:Yt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?pt.texSubImage2D(pt.TEXTURE_2D,0,zt,Yt,pt.RGBA,pt.UNSIGNED_BYTE,w):pt.texSubImage2D(pt.TEXTURE_2D,0,zt,Yt,ee,le,pt.RGBA,pt.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&pt.generateMipmap(pt.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 z(oe){let{userImage:w}=oe;return!!(w&&w.render&&w.render())&&(oe.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 v(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:Ne}=this.patterns[le],$e=Ne.x+1,pt=Ne.y+1,zt=this.getImage(le).data,Yt=zt.width,Jt=zt.height;a.R.copy(zt,ee,{x:0,y:0},{x:$e,y:pt},{width:Yt,height:Jt}),a.R.copy(zt,ee,{x:0,y:Jt-1},{x:$e,y:pt-1},{width:Yt,height:1}),a.R.copy(zt,ee,{x:0,y:0},{x:$e,y:pt+Jt},{width:Yt,height:1}),a.R.copy(zt,ee,{x:Yt-1,y:0},{x:$e-1,y:pt},{width:1,height:Jt}),a.R.copy(zt,ee,{x:0,y:0},{x:$e+Yt,y:pt},{width:1,height:Jt})}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`),z(Q)&&this.updateImage(B,Q)}}}let F=1e20;function q(oe,w,B,Q,ee,le,Ne,$e,pt){for(let zt=w;zt-1);pt++,le[pt]=$e,Ne[pt]=zt,Ne[pt+1]=F}for(let $e=0,pt=0;$e65535)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 $e=H.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=$e}let Ne=yield Q.requests[le];for(let $e in Ne)this._doesCharSupportLocalGlyph(+$e)||(Q.glyphs[+$e]=Ne[+$e]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:Ne[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 $e="400";/bold/i.test(B)?$e="900":/medium/i.test(B)?$e="500":/light/i.test(B)&&($e="200"),le=w.tinySDF=new H.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:$e})}let Ne=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:Ne.width||60,height:Ne.height||60},Ne.data),metrics:{width:Ne.glyphWidth/2||24,height:Ne.glyphHeight/2||24,left:Ne.glyphLeft/2+.5||0,top:Ne.glyphTop/2-27.5||-8,advance:Ne.glyphAdvance/2||24,isDoubleResolution:!0}}}}H.loadGlyphRange=function(oe,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,Ne=Q.transformRequest(B.replace("{fontstack}",oe).replace("{range}",`${ee}-${le}`),"Glyphs"),$e=yield a.l(Ne,new AbortController);if(!$e||!$e.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let pt={};for(let zt of a.n($e.data))pt[zt.id]=zt;return pt})},H.TinySDF=class{constructor({fontSize:oe=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:Ne="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let $e=this.size=oe+4*w,pt=this._createCanvas($e),zt=this.ctx=pt.getContext("2d",{willReadFrequently:!0});zt.font=`${Ne} ${le} ${oe}px ${ee}`,zt.textBaseline="alphabetic",zt.textAlign="left",zt.fillStyle="black",this.gridOuter=new Float64Array($e*$e),this.gridInner=new Float64Array($e*$e),this.f=new Float64Array($e),this.z=new Float64Array($e+1),this.v=new Uint16Array($e)}_createCanvas(oe){let w=document.createElement("canvas");return w.width=w.height=oe,w}draw(oe){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(oe),Ne=Math.ceil(B),$e=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),pt=Math.min(this.size-this.buffer,Ne+Math.ceil(Q)),zt=$e+2*this.buffer,Yt=pt+2*this.buffer,Jt=Math.max(zt*Yt,0),yr=new Uint8ClampedArray(Jt),Ir={data:yr,width:zt,height:Yt,glyphWidth:$e,glyphHeight:pt,glyphTop:Ne,glyphLeft:0,glyphAdvance:w};if($e===0||pt===0)return Ir;let{ctx:ce,buffer:Ae,gridInner:qe,gridOuter:Ve}=this;ce.clearRect(Ae,Ae,$e,pt),ce.fillText(oe,Ae,Ae+Ne);let ot=ce.getImageData(Ae,Ae,$e,pt);Ve.fill(F,0,Jt),qe.fill(0,0,Jt);for(let Ke=0;Ke0?$t*$t:0,qe[Xt]=$t<0?$t*$t:0}}q(Ve,0,0,zt,Yt,zt,this.f,this.v,this.z),q(qe,Ae,Ae,$e,pt,zt,this.f,this.v,this.z);for(let Ke=0;Ke1&&(pt=w[++$e]);let Yt=Math.abs(zt-pt.left),Jt=Math.abs(zt-pt.right),yr=Math.min(Yt,Jt),Ir,ce=le/Q*(ee+1);if(pt.isDash){let Ae=ee-Math.abs(ce);Ir=Math.sqrt(yr*yr+Ae*Ae)}else Ir=ee-Math.sqrt(yr*yr+ce*ce);this.data[Ne+zt]=Math.max(0,Math.min(255,Ir+128))}}}addRegularDash(w){for(let $e=w.length-1;$e>=0;--$e){let pt=w[$e],zt=w[$e+1];pt.zeroLength?w.splice($e,1):zt&&zt.isDash===pt.isDash&&(zt.left=pt.left,w.splice($e,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,Ne=w[le];for(let $e=0;$e1&&(Ne=w[++le]);let pt=Math.abs($e-Ne.left),zt=Math.abs($e-Ne.right),Yt=Math.min(pt,zt);this.data[ee+$e]=Math.max(0,Math.min(255,(Ne.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 $e=0;$e{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[be]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(l.hardwareConcurrency/2),he,te;function ke(){return he||(he=new ze),he}ze.workerCount=a.C(globalThis)?Math.max(Math.min(Ce,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function Me(){return te||(te=new Ee(ke(),a.G),te.registerMessageHandler("GR",(oe,w,B)=>a.m(w,B))),te}function Oe(oe,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*oe.width,.5*oe.height,1]),a.L(B,B,oe.calculatePosMatrix(w.toUnwrapped()))}function Re(oe,w,B,Q,ee,le){let Ne=function(Jt,yr,Ir){if(Jt)for(let ce of Jt){let Ae=yr[ce];if(Ae&&Ae.source===Ir&&Ae.type==="fill-extrusion")return!0}else for(let ce in yr){let Ae=yr[ce];if(Ae.source===Ir&&Ae.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,oe.id),$e=le.maxPitchScaleFactor(),pt=oe.tilesIn(Q,$e,Ne);pt.sort(me);let zt=[];for(let Jt of pt)zt.push({wrappedTileID:Jt.tileID.wrapped().key,queryResults:Jt.tile.queryRenderedFeatures(w,B,oe._state,Jt.queryGeometry,Jt.cameraQueryGeometry,Jt.scale,ee,le,$e,Oe(oe.transform,Jt.tileID))});let Yt=function(Jt){let yr={},Ir={};for(let ce of Jt){let Ae=ce.queryResults,qe=ce.wrappedTileID,Ve=Ir[qe]=Ir[qe]||{};for(let ot in Ae){let Ke=Ae[ot],ft=Ve[ot]=Ve[ot]||{},qt=yr[ot]=yr[ot]||[];for(let Xt of Ke)ft[Xt.featureIndex]||(ft[Xt.featureIndex]=!0,qt.push(Xt))}}return yr}(zt);for(let Jt in Yt)Yt[Jt].forEach(yr=>{let Ir=yr.feature,ce=oe.getFeatureState(Ir.layer["source-layer"],Ir.id);Ir.source=Ir.layer.source,Ir.layer["source-layer"]&&(Ir.sourceLayer=Ir.layer["source-layer"]),Ir.state=ce});return Yt}function me(oe,w){let B=oe.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 Be(oe,w,B){return a._(this,void 0,void 0,function*(){let Q=oe;if(oe.url?Q=(yield a.h(w.transformRequest(oe.url,"Source"),B)).data:yield l.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,oe),["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 fe{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 fe))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(fe.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 fe?w:w&&new fe(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new fe(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 fe(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class Ze{constructor(w,B,Q){this.bounds=fe.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),Ne=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,Ne)=>{w.reloadPromise={resolve:le,reject:Ne}})}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 gt 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 Be(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 y.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,Ne=Q.data;w.texture=this.map.painter.getTileTexture(Ne.width),w.texture?w.texture.update(Ne,{useMipmap:!0}):(w.texture=new v(ee,Ne,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 Pt extends gt{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 y.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 Ne=a.b(le)&&a.U()?le:yield this.readImageNow(le),$e={type:this.type,uid:w.uid,source:this.id,rawImageData:Ne,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 pt=yield w.actor.sendAsync({type:"LDT",data:$e});w.dem=pt,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 l.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,Ne=(B.x+1+Q)%Q,$e=B.x+1===Q?w.wrap+1:w.wrap,pt={};return pt[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,B.y).key]={backfilled:!1},B.y>0&&(pt[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,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 Xe=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Tt 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 y.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,Ne=1/0,$e=-1/0,pt=-1/0;for(let yr of ee)le=Math.min(le,yr.x),Ne=Math.min(Ne,yr.y),$e=Math.max($e,yr.x),pt=Math.max(pt,yr.y);let zt=Math.max($e-le,pt-Ne),Yt=Math.max(0,Math.floor(-Math.log(zt)/Math.LN2)),Jt=Math.pow(2,Yt);return new a.a1(Yt,Math.floor((le+$e)/2*Jt),Math.floor((Ne+pt)/2*Jt))}(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,Xe.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new v(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 xt extends Tt{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,Xe.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 v(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 _t extends Tt{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(Ne=>typeof Ne!="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,Xe.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 v(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let Ne=this.tiles[le];Ne.state!=="loaded"&&(Ne.state="loaded",Ne.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 Ct={},jt=oe=>{switch(oe){case"geojson":return Qe;case"image":return Tt;case"raster":return gt;case"raster-dem":return Pt;case"vector":return et;case"video":return xt;case"canvas":return _t}return Ct[oe]},At="RTLPluginLoaded";class Te extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Me()}_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=l.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(At))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let nt=null;function ut(){return nt||(nt=new Te),nt}class ct{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(zt)).filter(Boolean);if(pt.length!==0){$e.layers=pt,$e.stateDependentLayerIds&&($e.stateDependentLayers=$e.stateDependentLayerIds.map(zt=>pt.filter(Yt=>Yt.id===zt)[0]));for(let zt of pt)Ne[zt.id]=$e}}return Ne}(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,ut().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 v(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new v(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,Ne,$e,pt,zt,Yt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:Ne,tileSize:this.tileSize,pixelPosMatrix:Yt,transform:pt,params:$e,queryPadding:this.queryPadding*zt},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:"",Ne=ee._geojsonTileLayer||ee[le];if(!Ne)return;let $e=a.a7(B&&B.filter),{z:pt,x:zt,y:Yt}=this.tileID.canonical,Jt={z:pt,x:zt,y:Yt};for(let yr=0;yrQ)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 Ne=this._getAndRemoveByKey(this.order[0]);Ne&&this.onRemove(Ne)}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 je{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 Ne in le)delete ee[Ne]}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 Ne in this.stateChanges[ee])this.state[ee][Ne]||(this.state[ee][Ne]={}),a.e(this.state[ee][Ne],this.stateChanges[ee][Ne]),le[Ne]=this.state[ee][Ne];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let Ne in this.state[ee])le[Ne]={},this.state[ee][Ne]={};else for(let Ne in this.deletedStates[ee]){if(this.deletedStates[ee][Ne]===null)this.state[ee][Ne]={};else for(let $e of Object.keys(this.deletedStates[ee][Ne]))delete this.state[ee][Ne][$e];le[Ne]=this.state[ee][Ne]}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 tt 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,Ne,$e)=>{let pt=new(jt(le.type))(ee,le,Ne,$e);if(pt.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${pt.id}`);return pt})(w,B,Q,this),this._tiles={},this._cache=new rt(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new je,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(Je).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,Ne=ee.tileID,$e=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),pt=new a.P(Ne.canonical.x,Ne.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-Ne.overscaledZ||pt.y-$e.y||pt.x-$e.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Je).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=l.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(Ne)>1&&(Math.abs(Ne+pt)===1?Ne+=pt:Math.abs(Ne-pt)===1&&(Ne-=pt)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,Ne,$e),ee.neighboringTiles&&ee.neighboringTiles[zt]&&(ee.neighboringTiles[zt].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 Ne=this._tiles[le];if(ee[le]||!Ne.hasData()||Ne.tileID.overscaledZ<=B||Ne.tileID.overscaledZ>Q)continue;let $e=Ne.tileID;for(;Ne&&Ne.tileID.overscaledZ>B+1;){let zt=Ne.tileID.scaledTo(Ne.tileID.overscaledZ-1);Ne=this._tiles[zt.key],Ne&&Ne.hasData()&&($e=zt)}let pt=$e;for(;pt.overscaledZ>B;)if(pt=pt.scaledTo(pt.overscaledZ-1),w[pt.key]){ee[$e.key]=$e;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,Ne){let $e={},pt={},zt=Object.keys(w),Yt=l.now();for(let Jt of zt){let yr=w[Jt],Ir=this._tiles[Jt];if(!Ir||Ir.fadeEndTime!==0&&Ir.fadeEndTime<=Yt)continue;let ce=this.findLoadedParent(yr,B),Ae=this.findLoadedSibling(yr),qe=ce||Ae||null;qe&&(this._addTile(qe.tileID),$e[qe.tileID.key]=qe.tileID),pt[Jt]=yr}this._retainLoadedChildren(pt,ee,Q,w);for(let Jt in $e)w[Jt]||(this._coveredTiles[Jt]=!0,w[Jt]=$e[Jt]);if(Ne){let Jt={},yr={};for(let Ir of le)this._tiles[Ir.key].hasData()?Jt[Ir.key]=Ir:yr[Ir.key]=Ir;for(let Ir in yr){let ce=yr[Ir].children(this._source.maxzoom);this._tiles[ce[0].key]&&this._tiles[ce[1].key]&&this._tiles[ce[2].key]&&this._tiles[ce[3].key]&&(Jt[ce[0].key]=w[ce[0].key]=ce[0],Jt[ce[1].key]=w[ce[1].key]=ce[1],Jt[ce[2].key]=w[ce[2].key]=ce[2],Jt[ce[3].key]=w[ce[3].key]=ce[3],delete yr[Ir])}for(let Ir in yr){let ce=yr[Ir],Ae=this.findLoadedParent(ce,this._source.minzoom),qe=this.findLoadedSibling(ce),Ve=Ae||qe||null;if(Ve){Jt[Ve.tileID.key]=w[Ve.tileID.key]=Ve.tileID;for(let ot in Jt)Jt[ot].isChildOf(Ve.tileID)&&delete Jt[ot]}}for(let Ir in this._tiles)Jt[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-tt.maxOverzooming,this._source.minzoom),Ne=Math.max(ee+tt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Yt={};for(let Jt of Q)if(Jt.canonical.z>this._source.minzoom){let yr=Jt.scaledTo(Jt.canonical.z-1);Yt[yr.key]=yr;let Ir=Jt.scaledTo(Math.max(this._source.minzoom,Math.min(Jt.canonical.z,5)));Yt[Ir.key]=Ir}Q=Q.concat(Object.values(Yt))}let $e=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,$e&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let pt=this._updateRetainedTiles(Q,ee);Mt(this._source.type)&&this._updateCoveredAndRetainedTiles(pt,le,Ne,ee,Q,B);for(let Yt in pt)this._tiles[Yt].clearFadeHold();let zt=a.ab(this._tiles,pt);for(let Yt of zt){let Jt=this._tiles[Yt];Jt.hasSymbolBuckets&&!Jt.holdingForFade()?Jt.setHoldDuration(this.map._fadeDuration):Jt.hasSymbolBuckets&&!Jt.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={},Ne=Math.max(B-tt.maxOverzooming,this._source.minzoom),$e=Math.max(B+tt.maxUnderzooming,this._source.minzoom),pt={};for(let zt of w){let Yt=this._addTile(zt);ee[zt.key]=zt,Yt.hasData()||Bthis._source.maxzoom){let yr=zt.children(this._source.maxzoom)[0],Ir=this.getTile(yr);if(Ir&&Ir.hasData()){ee[yr.key]=yr;continue}}else{let yr=zt.children(this._source.maxzoom);if(ee[yr[0].key]&&ee[yr[1].key]&&ee[yr[2].key]&&ee[yr[3].key])continue}let Jt=Yt.wasRequested();for(let yr=zt.overscaledZ-1;yr>=Ne;--yr){let Ir=zt.scaledTo(yr);if(le[Ir.key])break;if(le[Ir.key]=!0,Yt=this.getTile(Ir),!Yt&&Jt&&(Yt=this._addTile(Ir)),Yt){let ce=Yt.hasData();if((ce||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Jt)&&(ee[Ir.key]=Ir),Jt=Yt.wasRequested(),ce)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 ct(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 Ne=Q?le.getCameraQueryGeometry(w):w,$e=w.map(ce=>le.pointCoordinate(ce,this.terrain)),pt=Ne.map(ce=>le.pointCoordinate(ce,this.terrain)),zt=this.getIds(),Yt=1/0,Jt=1/0,yr=-1/0,Ir=-1/0;for(let ce of pt)Yt=Math.min(Yt,ce.x),Jt=Math.min(Jt,ce.y),yr=Math.max(yr,ce.x),Ir=Math.max(Ir,ce.y);for(let ce=0;ce=0&&Ke[1].y+ot>=0){let ft=$e.map(Xt=>qe.getTilePoint(Xt)),qt=pt.map(Xt=>qe.getTilePoint(Xt));ee.push({tile:Ae,tileID:qe,queryGeometry:ft,cameraQueryGeometry:qt,scale:Ve})}}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(Mt(this._source.type)){let w=l.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 Je(oe,w){let B=Math.abs(2*oe.wrap)-+(oe.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return oe.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-oe.canonical.y||w.canonical.x-oe.canonical.x}function Mt(oe){return oe==="raster"||oe==="image"||oe==="video"}tt.maxOverzooming=10,tt.maxUnderzooming=3;class Vt{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-Ne)/$e:0;return this.points[le].mult(1-pt).add(this.points[B].mult(pt))}}function Kt(oe,w){let B=!0;return oe==="always"||oe!=="never"&&w!=="never"||(B=!1),B}class ir{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 Ne=0;Nethis.width||ee<0||B>this.height)return[];let pt=[];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 zt=0;zt0}hitTestCircle(w,B,Q,ee,le){let Ne=w-Q,$e=w+Q,pt=B-Q,zt=B+Q;if($e<0||Ne>this.width||zt<0||pt>this.height)return!1;let Yt=[];return this._forEachCell(Ne,pt,$e,zt,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,Ne,$e,pt){let{seenUids:zt,hitTest:Yt,overlapMode:Jt}=$e,yr=this.boxCells[le];if(yr!==null){let ce=this.bboxes;for(let Ae of yr)if(!zt.box[Ae]){zt.box[Ae]=!0;let qe=4*Ae,Ve=this.boxKeys[Ae];if(w<=ce[qe+2]&&B<=ce[qe+3]&&Q>=ce[qe+0]&&ee>=ce[qe+1]&&(!pt||pt(Ve))&&(!Yt||!Kt(Jt,Ve.overlapMode))&&(Ne.push({key:Ve,x1:ce[qe],y1:ce[qe+1],x2:ce[qe+2],y2:ce[qe+3]}),Yt))return!0}}let Ir=this.circleCells[le];if(Ir!==null){let ce=this.circles;for(let Ae of Ir)if(!zt.circle[Ae]){zt.circle[Ae]=!0;let qe=3*Ae,Ve=this.circleKeys[Ae];if(this._circleAndRectCollide(ce[qe],ce[qe+1],ce[qe+2],w,B,Q,ee)&&(!pt||pt(Ve))&&(!Yt||!Kt(Jt,Ve.overlapMode))){let ot=ce[qe],Ke=ce[qe+1],ft=ce[qe+2];if(Ne.push({key:Ve,x1:ot-ft,y1:Ke-ft,x2:ot+ft,y2:Ke+ft}),Yt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,Ne,$e,pt){let{circle:zt,seenUids:Yt,overlapMode:Jt}=$e,yr=this.boxCells[le];if(yr!==null){let ce=this.bboxes;for(let Ae of yr)if(!Yt.box[Ae]){Yt.box[Ae]=!0;let qe=4*Ae,Ve=this.boxKeys[Ae];if(this._circleAndRectCollide(zt.x,zt.y,zt.radius,ce[qe+0],ce[qe+1],ce[qe+2],ce[qe+3])&&(!pt||pt(Ve))&&!Kt(Jt,Ve.overlapMode))return Ne.push(!0),!0}}let Ir=this.circleCells[le];if(Ir!==null){let ce=this.circles;for(let Ae of Ir)if(!Yt.circle[Ae]){Yt.circle[Ae]=!0;let qe=3*Ae,Ve=this.circleKeys[Ae];if(this._circlesCollide(ce[qe],ce[qe+1],ce[qe+2],zt.x,zt.y,zt.radius)&&(!pt||pt(Ve))&&!Kt(Jt,Ve.overlapMode))return Ne.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,Ne,$e,pt){let zt=this._convertToXCellCoord(w),Yt=this._convertToYCellCoord(B),Jt=this._convertToXCellCoord(Q),yr=this._convertToYCellCoord(ee);for(let Ir=zt;Ir<=Jt;Ir++)for(let ce=Yt;ce<=yr;ce++)if(le.call(this,w,B,Q,ee,this.xCellCount*ce+Ir,Ne,$e,pt))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,Ne){let $e=ee-w,pt=le-B,zt=Q+Ne;return zt*zt>$e*$e+pt*pt}_circleAndRectCollide(w,B,Q,ee,le,Ne,$e){let pt=(Ne-ee)/2,zt=Math.abs(w-(ee+pt));if(zt>pt+Q)return!1;let Yt=($e-le)/2,Jt=Math.abs(B-(le+Yt));if(Jt>Yt+Q)return!1;if(zt<=pt||Jt<=Yt)return!0;let yr=zt-pt,Ir=Jt-Yt;return yr*yr+Ir*Ir<=Q*Q}}function fr(oe,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,oe),le}function Ot(oe,w,B,Q,ee){if(w){let le=a.ae(oe);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function De(oe,w,B,Q){let ee;Q?(ee=[oe,w,Q(oe,w),1],a.af(ee,ee,B)):(ee=[oe,w,0,1],vr(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function _e(oe,w){return .5+oe/w*.5}function Fe(oe,w){return oe.x>=-w[0]&&oe.x<=w[0]&&oe.y>=-w[1]&&oe.y<=w[1]}function Pe(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce){let Ae=Q?oe.textSizeData:oe.iconSizeData,qe=a.ag(Ae,B.transform.zoom),Ve=[256/B.width*2+1,256/B.height*2+1],ot=Q?oe.text.dynamicLayoutVertexArray:oe.icon.dynamicLayoutVertexArray;ot.clear();let Ke=oe.lineVertexArray,ft=Q?oe.text.placedSymbolArray:oe.icon.placedSymbolArray,qt=B.transform.width/B.transform.height,Xt=!1;for(let $t=0;$tMath.abs(B.x-w.x)*Q?{useVertical:!0}:(oe===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function ye(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt){let Jt=B/24,yr=w.lineOffsetX*Jt,Ir=w.lineOffsetY*Jt,ce;if(w.numGlyphs>1){let Ae=w.glyphStartIndex+w.numGlyphs,qe=w.lineStartIndex,Ve=w.lineStartIndex+w.lineLength,ot=Ie(Jt,$e,yr,Ir,Q,w,Yt,oe);if(!ot)return{notEnoughRoom:!0};let Ke=De(ot.first.point.x,ot.first.point.y,Ne,oe.getElevation).point,ft=De(ot.last.point.x,ot.last.point.y,Ne,oe.getElevation).point;if(ee&&!Q){let qt=lt(w.writingMode,Ke,ft,zt);if(qt)return qt}ce=[ot.first];for(let qt=w.glyphStartIndex+1;qt0?Ke.point:function(Xt,$t,dr,Mr,$r,ii){return ue(Xt,$t,dr,1,$r,ii)}(oe.tileAnchorPoint,ot,qe,0,le,oe),qt=lt(w.writingMode,qe,ft,zt);if(qt)return qt}let Ae=Zt(Jt*$e.getoffsetX(w.glyphStartIndex),yr,Ir,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,oe,Yt);if(!Ae||oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ce=[Ae]}for(let Ae of ce)a.aj(pt,Ae.point,Ae.angle);return{}}function ue(oe,w,B,Q,ee,le){let Ne=oe.add(oe.sub(w)._unit()),$e=ee!==void 0?De(Ne.x,Ne.y,ee,le.getElevation).point:ht(Ne.x,Ne.y,le).point,pt=B.sub($e);return B.add(pt._mult(Q/pt.mag()))}function de(oe,w,B){let Q=w.projectionCache;if(Q.projections[oe])return Q.projections[oe];let ee=new a.P(w.lineVertexArray.getx(oe),w.lineVertexArray.gety(oe)),le=ht(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[oe]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let Ne=oe-B.direction;return function($e,pt,zt,Yt,Jt){return ue($e,pt,zt,Yt,void 0,Jt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(Ne),w.lineVertexArray.gety(Ne)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function ht(oe,w,B){let Q=oe+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=De(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function Et(oe,w,B){return oe._unit()._perp()._mult(w*B)}function St(oe,w,B,Q,ee,le,Ne,$e,pt){if($e.projectionCache.offsets[oe])return $e.projectionCache.offsets[oe];let zt=B.add(w);if(oe+pt.direction=ee)return $e.projectionCache.offsets[oe]=zt,zt;let Yt=de(oe+pt.direction,$e,pt),Jt=Et(Yt.sub(B),Ne,pt.direction),yr=B.add(Jt),Ir=Yt.add(Jt);return $e.projectionCache.offsets[oe]=a.ak(le,zt,yr,Ir)||zt,$e.projectionCache.offsets[oe]}function Zt(oe,w,B,Q,ee,le,Ne,$e,pt){let zt=Q?oe-w:oe+w,Yt=zt>0?1:-1,Jt=0;Q&&(Yt*=-1,Jt=Math.PI),Yt<0&&(Jt+=Math.PI);let yr,Ir=Yt>0?le+ee:le+ee+1;$e.projectionCache.cachedAnchorPoint?yr=$e.projectionCache.cachedAnchorPoint:(yr=ht($e.tileAnchorPoint.x,$e.tileAnchorPoint.y,$e).point,$e.projectionCache.cachedAnchorPoint=yr);let ce,Ae,qe=yr,Ve=yr,ot=0,Ke=0,ft=Math.abs(zt),qt=[],Xt;for(;ot+Ke<=ft;){if(Ir+=Yt,Ir=Ne)return null;ot+=Ke,Ve=qe,Ae=ce;let Mr={absOffsetX:ft,direction:Yt,distanceFromAnchor:ot,previousVertex:Ve};if(qe=de(Ir,$e,Mr),B===0)qt.push(Ve),Xt=qe.sub(Ve);else{let $r,ii=qe.sub(Ve);$r=ii.mag()===0?Et(de(Ir+Yt,$e,Mr).sub(qe),B,Yt):Et(ii,B,Yt),Ae||(Ae=Ve.add($r)),ce=St(Ir,$r,qe,le,Ne,Ae,B,$e,Mr),qt.push(Ae),Xt=ce.sub(Ae)}Ke=Xt.mag()}let $t=Xt._mult((ft-ot)/Ke)._add(Ae||Ve),dr=Jt+Math.atan2(qe.y-Ve.y,qe.x-Ve.x);return qt.push($t),{point:$t,angle:pt?dr:0,path:qt}}let qr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Lr(oe,w){for(let B=0;B=1;ys--)ua.push(wn.path[ys]);for(let ys=1;ysil.signedDistanceFromCamera<=0)?[]:ys.map(il=>il.point)}let el=[];if(ua.length>0){let ys=ua[0].clone(),il=ua[0].clone();for(let $l=1;$l=ii.x&&il.x<=pi.x&&ys.y>=ii.y&&il.y<=pi.y?[ua]:il.xpi.x||il.ypi.y?[]:a.al([ua],ii.x,ii.y,pi.x,pi.y)}for(let ys of el){Yi.reset(ys,.25*$r);let il=0;il=Yi.length<=.5*$r?1:Math.ceil(Yi.paddedLength/oo)+1;for(let $l=0;$lDe(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,Ne=-1/0;for(let Yt of w){let Jt=new a.P(Yt.x+Er,Yt.y+Er);Q=Math.min(Q,Jt.x),ee=Math.min(ee,Jt.y),le=Math.max(le,Jt.x),Ne=Math.max(Ne,Jt.y),B.push(Jt)}let $e=this.grid.query(Q,ee,le,Ne).concat(this.ignoredGrid.query(Q,ee,le,Ne)),pt={},zt={};for(let Yt of $e){let Jt=Yt.key;if(pt[Jt.bucketInstanceId]===void 0&&(pt[Jt.bucketInstanceId]={}),pt[Jt.bucketInstanceId][Jt.featureIndex])continue;let yr=[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,yr)&&(pt[Jt.bucketInstanceId][Jt.featureIndex]=!0,zt[Jt.bucketInstanceId]===void 0&&(zt[Jt.bucketInstanceId]=[]),zt[Jt.bucketInstanceId].push(Jt.featureIndex))}return zt}insertCollisionBox(w,B,Q,ee,le,Ne){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:Ne,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,Ne){let $e=Q?this.ignoredGrid:this.grid,pt={bucketInstanceId:ee,featureIndex:le,collisionGroupID:Ne,overlapMode:B};for(let zt=0;zt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,$r.x,$r.y,ee,zt));dr=Mr.some($r=>!$r.isOccluded),$t=Mr.map($r=>$r.point)}else dr=!0;return{box:a.ao($t),allPointsOccluded:!dr}}}function Ei(oe,w,B){return w*(a.X/(oe.tileSize*Math.pow(2,B-oe.tileID.overscaledZ)))}class Si{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 xi{constructor(w,B,Q,ee,le){this.text=new Si(w?w.text:null,B,Q,le),this.icon=new Si(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Hi{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Jr{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ci{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class Di{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 Lt(oe,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:Ne}=a.au(oe);return new a.P(-(le-.5)*w+Q[0]*ee,-(Ne-.5)*B+Q[1]*ee)}class vt{constructor(w,B,Q,ee,le,Ne){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new si(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Di(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Ne,Ne&&(Ne.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),Ne=Q.latestFeatureIndex;if(!le||!Ne||B.id!==le.layerIds[0])return;let $e=Q.collisionBoxArray,pt=le.layers[0].layout,zt=le.layers[0].paint,Yt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Jt=Q.tileSize/a.X,yr=Q.tileID.toUnwrapped(),Ir=this.transform.calculatePosMatrix(yr),ce=pt.get("text-pitch-alignment")==="map",Ae=pt.get("text-rotation-alignment")==="map",qe=Ei(Q,1,this.transform.zoom),Ve=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,zt.get("text-translate"),zt.get("text-translate-anchor")),ot=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,zt.get("icon-translate"),zt.get("icon-translate-anchor")),Ke=fr(Ir,ce,Ae,this.transform,qe),ft=null;if(ce){let Xt=Ot(Ir,ce,Ae,this.transform,qe);ft=a.L([],this.transform.labelPlaneMatrix,Xt)}this.retainedQueryData[le.bucketInstanceId]=new ci(le.bucketInstanceId,Ne,le.sourceLayerIndex,le.index,Q.tileID);let qt={bucket:le,layout:pt,translationText:Ve,translationIcon:ot,posMatrix:Ir,unwrappedTileID:yr,textLabelPlaneMatrix:Ke,labelToScreenMatrix:ft,scale:Yt,textPixelRatio:Jt,holdingForFade:Q.holdingForFade(),collisionBoxArray:$e,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Xt of le.sortKeyRanges){let{sortKey:$t,symbolInstanceStart:dr,symbolInstanceEnd:Mr}=Xt;w.push({sortKey:$t,symbolInstanceStart:dr,symbolInstanceEnd:Mr,parameters:qt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke){let ft=a.aq[w.textAnchor],qt=[w.textOffset0,w.textOffset1],Xt=Lt(ft,Q,ee,qt,le),$t=this.collisionIndex.placeCollisionBox(B,yr,pt,zt,Yt,$e,Ne,qe,Jt.predicate,Ke,Xt);if((!ot||this.collisionIndex.placeCollisionBox(ot,yr,pt,zt,Yt,$e,Ne,Ve,Jt.predicate,Ke,Xt).placeable)&&$t.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:qt,width:Q,height:ee,anchor:ft,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ce,ft,Ir,Ae),ce.allowVerticalPlacement&&(this.markUsedOrientation(ce,Ae,Ir),this.placedOrientations[Ir.crossTileID]=Ae),{shift:Xt,placedGlyphBoxes:$t}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:Ne,translationIcon:$e,posMatrix:pt,unwrappedTileID:zt,textLabelPlaneMatrix:Yt,labelToScreenMatrix:Jt,textPixelRatio:yr,holdingForFade:Ir,collisionBoxArray:ce,partiallyEvaluatedTextSize:Ae,collisionGroup:qe}=w.parameters,Ve=le.get("text-optional"),ot=le.get("icon-optional"),Ke=a.ar(le,"text-overlap","text-allow-overlap"),ft=Ke==="always",qt=a.ar(le,"icon-overlap","icon-allow-overlap"),Xt=qt==="always",$t=le.get("text-rotation-alignment")==="map",dr=le.get("text-pitch-alignment")==="map",Mr=le.get("icon-text-fit")!=="none",$r=le.get("symbol-z-order")==="viewport-y",ii=ft&&(Xt||!ee.hasIconData()||ot),pi=Xt&&(ft||!ee.hasTextData()||Ve);!ee.collisionArrays&&ce&&ee.deserializeCollisionBoxes(ce);let Yi=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),wn=(Tn,ua,oo)=>{var el,ys;if(B[Tn.crossTileID])return;if(Ir)return void(this.placements[Tn.crossTileID]=new Hi(!1,!1,!1));let il=!1,$l=!1,pl=!0,Hl=null,Ll={box:null,placeable:!1,offscreen:null},Ql={box:null,placeable:!1,offscreen:null},ku=null,Jl=null,Kl=null,Hu=0,tf=0,Ku=0;ua.textFeatureIndex?Hu=ua.textFeatureIndex:Tn.useRuntimeCollisionCircles&&(Hu=Tn.featureIndex),ua.verticalTextFeatureIndex&&(tf=ua.verticalTextFeatureIndex);let Gu=ua.textBox;if(Gu){let nf=Le=>{let We=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Le&&this.prevPlacement){let Ye=this.prevPlacement.placedOrientations[Tn.crossTileID];Ye&&(this.placedOrientations[Tn.crossTileID]=Ye,We=Ye,this.markUsedOrientation(ee,We,Tn))}return We},af=(Le,We)=>{if(ee.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&ua.verticalTextBox){for(let Ye of ee.writingModes)if(Ye===a.ah.vertical?(Ll=We(),Ql=Ll):Ll=Le(),Ll&&Ll.placeable)break}else Ll=Le()},X=Tn.textAnchorOffsetStartIndex,se=Tn.textAnchorOffsetEndIndex;if(se===X){let Le=(We,Ye)=>{let it=this.collisionIndex.placeCollisionBox(We,Ke,yr,pt,zt,dr,$t,Ne,qe.predicate,Yi);return it&&it.placeable&&(this.markUsedOrientation(ee,Ye,Tn),this.placedOrientations[Tn.crossTileID]=Ye),it};af(()=>Le(Gu,a.ah.horizontal),()=>{let We=ua.verticalTextBox;return ee.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&We?Le(We,a.ah.vertical):{box:null,offscreen:null}}),nf(Ll&&Ll.placeable)}else{let Le=a.aq[(ys=(el=this.prevPlacement)===null||el===void 0?void 0:el.variableOffsets[Tn.crossTileID])===null||ys===void 0?void 0:ys.anchor],We=(it,Nt,mt)=>{let er=it.x2-it.x1,_r=it.y2-it.y1,wr=Tn.textBoxScale,ni=Mr&&qt==="never"?Nt:null,Wr=null,Ci=Ke==="never"?1:2,Ji="never";Le&&Ci++;for(let ai=0;aiWe(Gu,ua.iconBox,a.ah.horizontal),()=>{let it=ua.verticalTextBox;return ee.allowVerticalPlacement&&(!Ll||!Ll.placeable)&&Tn.numVerticalGlyphVertices>0&&it?We(it,ua.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Ll&&(il=Ll.placeable,pl=Ll.offscreen);let Ye=nf(Ll&&Ll.placeable);if(!il&&this.prevPlacement){let it=this.prevPlacement.variableOffsets[Tn.crossTileID];it&&(this.variableOffsets[Tn.crossTileID]=it,this.markUsedJustification(ee,it.anchor,Tn,Ye))}}}if(ku=Ll,il=ku&&ku.placeable,pl=ku&&ku.offscreen,Tn.useRuntimeCollisionCircles){let nf=ee.text.placedSymbolArray.get(Tn.centerJustifiedTextSymbolIndex),af=a.ai(ee.textSizeData,Ae,nf),X=le.get("text-padding");Jl=this.collisionIndex.placeCollisionCircles(Ke,nf,ee.lineVertexArray,ee.glyphOffsetArray,af,pt,zt,Yt,Jt,Q,dr,qe.predicate,Tn.collisionCircleDiameter,X,Ne,Yi),Jl.circles.length&&Jl.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),il=ft||Jl.circles.length>0&&!Jl.collisionDetected,pl=pl&&Jl.offscreen}if(ua.iconFeatureIndex&&(Ku=ua.iconFeatureIndex),ua.iconBox){let nf=af=>this.collisionIndex.placeCollisionBox(af,qt,yr,pt,zt,dr,$t,$e,qe.predicate,Yi,Mr&&Hl?Hl:void 0);Ql&&Ql.placeable&&ua.verticalIconBox?(Kl=nf(ua.verticalIconBox),$l=Kl.placeable):(Kl=nf(ua.iconBox),$l=Kl.placeable),pl=pl&&Kl.offscreen}let Wu=Ve||Tn.numHorizontalGlyphVertices===0&&Tn.numVerticalGlyphVertices===0,sf=ot||Tn.numIconVertices===0;Wu||sf?sf?Wu||($l=$l&&il):il=$l&&il:$l=il=$l&&il;let gf=$l&&Kl.placeable;if(il&&ku.placeable&&this.collisionIndex.insertCollisionBox(ku.box,Ke,le.get("text-ignore-placement"),ee.bucketInstanceId,Ql&&Ql.placeable&&tf?tf:Hu,qe.ID),gf&&this.collisionIndex.insertCollisionBox(Kl.box,qt,le.get("icon-ignore-placement"),ee.bucketInstanceId,Ku,qe.ID),Jl&&il&&this.collisionIndex.insertCollisionCircles(Jl.circles,Ke,le.get("text-ignore-placement"),ee.bucketInstanceId,Hu,qe.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,oo,ua,ku,Kl,Jl),Tn.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[Tn.crossTileID]=new Hi(il||ii,$l||pi,pl||ee.justReloaded),B[Tn.crossTileID]=!0};if($r){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Tn=ee.getSortedSymbolIndexes(this.transform.angle);for(let ua=Tn.length-1;ua>=0;--ua){let oo=Tn[ua];wn(ee.symbolInstances.get(oo),ee.collisionArrays[oo],oo)}}else for(let Tn=w.symbolInstanceStart;Tn=0&&(w.text.placedSymbolArray.get($e).crossTileID=le>=0&&$e!==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,Ne=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let $e of Ne)w.text.placedSymbolArray.get($e).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:{},Ne=B?B.variableOffsets:{},$e=B?B.placedOrientations:{};for(let pt in this.placements){let zt=this.placements[pt],Yt=le[pt];Yt?(this.opacities[pt]=new xi(Yt,ee,zt.text,zt.icon),Q=Q||zt.text!==Yt.text.placed||zt.icon!==Yt.icon.placed):(this.opacities[pt]=new xi(null,ee,zt.text,zt.icon,zt.skipFade),Q=Q||zt.text||zt.icon)}for(let pt in le){let zt=le[pt];if(!this.opacities[pt]){let Yt=new xi(zt,ee,!1,!1);Yt.isHidden()||(this.opacities[pt]=Yt,Q=Q||zt.text.placed||zt.icon.placed)}}for(let pt in Ne)this.variableOffsets[pt]||!this.opacities[pt]||this.opacities[pt].isHidden()||(this.variableOffsets[pt]=Ne[pt]);for(let pt in $e)this.placedOrientations[pt]||!this.opacities[pt]||this.opacities[pt].isHidden()||(this.placedOrientations[pt]=$e[pt]);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],Ne=le.layout,$e=new xi(null,0,!1,!1,!0),pt=Ne.get("text-allow-overlap"),zt=Ne.get("icon-allow-overlap"),Yt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Jt=Ne.get("text-rotation-alignment")==="map",yr=Ne.get("text-pitch-alignment")==="map",Ir=Ne.get("icon-text-fit")!=="none",ce=new xi(null,0,pt&&(zt||!w.hasIconData()||Ne.get("icon-optional")),zt&&(pt||!w.hasTextData()||Ne.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let Ae=(Ve,ot,Ke)=>{for(let ft=0;ft0,dr=this.placedOrientations[ot.crossTileID],Mr=dr===a.ah.vertical,$r=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(Ke>0||ft>0){let pi=oi(Xt.text);Ae(w.text,Ke,Mr?vi:pi),Ae(w.text,ft,$r?vi:pi);let Yi=Xt.text.isHidden();[ot.rightJustifiedTextSymbolIndex,ot.centerJustifiedTextSymbolIndex,ot.leftJustifiedTextSymbolIndex].forEach(ua=>{ua>=0&&(w.text.placedSymbolArray.get(ua).hidden=Yi||Mr?1:0)}),ot.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(ot.verticalPlacedTextSymbolIndex).hidden=Yi||$r?1:0);let wn=this.variableOffsets[ot.crossTileID];wn&&this.markUsedJustification(w,wn.anchor,ot,dr);let Tn=this.placedOrientations[ot.crossTileID];Tn&&(this.markUsedJustification(w,"left",ot,Tn),this.markUsedOrientation(w,Tn,ot))}if($t){let pi=oi(Xt.icon),Yi=!(Ir&&ot.verticalPlacedIconSymbolIndex&&Mr);ot.placedIconSymbolIndex>=0&&(Ae(w.icon,ot.numIconVertices,Yi?pi:vi),w.icon.placedSymbolArray.get(ot.placedIconSymbolIndex).hidden=Xt.icon.isHidden()),ot.verticalPlacedIconSymbolIndex>=0&&(Ae(w.icon,ot.numVerticalIconVertices,Yi?vi:pi),w.icon.placedSymbolArray.get(ot.verticalPlacedIconSymbolIndex).hidden=Xt.icon.isHidden())}let ii=qe&&qe.has(Ve)?qe.get(Ve):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let pi=w.collisionArrays[Ve];if(pi){let Yi=new a.P(0,0);if(pi.textBox||pi.verticalTextBox){let wn=!0;if(Yt){let Tn=this.variableOffsets[qt];Tn?(Yi=Lt(Tn.anchor,Tn.width,Tn.height,Tn.textOffset,Tn.textBoxScale),Jt&&Yi._rotate(yr?this.transform.angle:-this.transform.angle)):wn=!1}if(pi.textBox||pi.verticalTextBox){let Tn;pi.textBox&&(Tn=Mr),pi.verticalTextBox&&(Tn=$r),Dt(w.textCollisionBox.collisionVertexArray,Xt.text.placed,!wn||Tn,ii.text,Yi.x,Yi.y)}}if(pi.iconBox||pi.verticalIconBox){let wn=!!(!$r&&pi.verticalIconBox),Tn;pi.iconBox&&(Tn=wn),pi.verticalIconBox&&(Tn=!wn),Dt(w.iconCollisionBox.collisionVertexArray,Xt.icon.placed,Tn,ii.icon,Ir?Yi.x:0,Ir?Yi.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 Ve=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Ve.invProjMatrix,w.placementViewportMatrix=Ve.viewportMatrix,w.collisionCircleArray=Ve.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 Dt(oe,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let Ne=Q[0]-Er,$e=Q[1]-Er,pt=Q[2]-Er,zt=Q[3]-Er;oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Ne,$e),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,pt,$e),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,pt,zt),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Ne,zt)}let Bt=Math.pow(2,25),sr=Math.pow(2,24),br=Math.pow(2,17),zr=Math.pow(2,16),Tr=Math.pow(2,9),Rr=Math.pow(2,8),Br=Math.pow(2,1);function oi(oe){if(oe.opacity===0&&!oe.placed)return 0;if(oe.opacity===1&&oe.placed)return 4294967295;let w=oe.placed?1:0,B=Math.floor(127*oe.opacity);return B*Bt+w*sr+B*br+w*zr+B*Tr+w*Rr+B*Br+w}let vi=0;function Pi(){return{isOccluded:(oe,w,B)=>!1,getPitchedTextCorrection:(oe,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(oe,w,B,Q){throw new Error("Not implemented.")},translatePosition:(oe,w,B,Q)=>function(ee,le,Ne,$e,pt=!1){if(!Ne[0]&&!Ne[1])return[0,0];let zt=pt?$e==="map"?ee.angle:0:$e==="viewport"?-ee.angle:0;if(zt){let Yt=Math.sin(zt),Jt=Math.cos(zt);Ne=[Ne[0]*Jt-Ne[1]*Yt,Ne[0]*Yt+Ne[1]*Jt]}return[pt?Ne[0]:Ei(le,Ne[0],ee.zoom),pt?Ne[1]:Ei(le,Ne[1],ee.zoom)]}(oe,w,B,Q),getCircleRadiusCorrection:oe=>1}}class Yr{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 Ne=this._bucketParts;for(;this._currentTileIndex$e.sortKey-pt.sortKey));this._currentPartIndex!this._forceFullPlacement&&l.now()-ee>2;for(;this._currentPlacementIndex>=0;){let Ne=B[w[this._currentPlacementIndex]],$e=this.placement.collisionIndex.transform.zoom;if(Ne.type==="symbol"&&(!Ne.minzoom||Ne.minzoom<=$e)&&(!Ne.maxzoom||Ne.maxzoom>$e)){if(this._inProgressLayer||(this._inProgressLayer=new Yr(Ne)),this._inProgressLayer.continuePlacement(Q[Ne.source],this.placement,this._showCollisionBoxes,Ne,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let Ur=512/a.X/2;class ti{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le({x:Math.floor(pt.anchorX*Ur),y:Math.floor(pt.anchorY*Ur)})),crossTileIDs:Ne.map(pt=>pt.crossTileID)};if($e.positions.length>128){let pt=new a.av($e.positions.length,16,Uint16Array);for(let{x:zt,y:Yt}of $e.positions)pt.add(zt,Yt);pt.finish(),delete $e.positions,$e.index=pt}this._symbolsByKey[le]=$e}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:Ne,y:$e,z:pt}=B.canonical,zt=Ur/Math.pow(2,pt-le),Yt=($e*a.X+w.anchorY)*zt,Jt=ee*a.X*Ur;return{x:Math.floor((Ne*a.X+w.anchorX)*zt-Q*a.X*Ur),y:Math.floor(Yt-Jt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class ki{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ji{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 Ne in ee){let $e=ee[Ne];$e.tileID=$e.tileID.unwrapTo($e.tileID.wrap+B),le[$e.tileID.key]=$e}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 $e in Ne){let pt=Ne[$e];pt.tileID.isChildOf(w)&&pt.findMatches(B.symbolInstances,w,ee)}else{let $e=Ne[w.scaledTo(Number(le)).key];$e&&$e.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 zi=(oe,w)=>a.t(oe,w&&w.filter(B=>B.identifier!=="source.canvas")),Mi=a.aw();class sn extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(ke(),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 H(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new ne(256,512),this.crossTileSymbolIndex=new Vi,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()),ut().on(At,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 Ne in this._layers){let $e=this._layers[Ne];$e.source===le.id&&this._validateLayer($e)}})}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(Ne=>{this._loadStyleRequest=null,this._load(Ne.data,B,Q)}).catch(Ne=>{this._loadStyleRequest=null,Ne&&!le.signal.aborted&&this.fire(new a.j(Ne))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,l.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(Mi,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!zi(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let Ne in le.sources)this.addSource(Ne,le.sources[Ne],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,Ne,$e,pt){return a._(this,void 0,void 0,function*(){let zt=C(le),Yt=$e>1?"@2x":"",Jt={},yr={};for(let{id:Ir,url:ce}of zt){let Ae=Ne.transformRequest(M(ce,Yt,".json"),"SpriteJSON");Jt[Ir]=a.h(Ae,pt);let qe=Ne.transformRequest(M(ce,Yt,".png"),"SpriteImage");yr[Ir]=y.getImage(qe,pt)}return yield Promise.all([...Object.values(Jt),...Object.values(yr)]),function(Ir,ce){return a._(this,void 0,void 0,function*(){let Ae={};for(let qe in Ir){Ae[qe]={};let Ve=l.getImageCanvasContext((yield ce[qe]).data),ot=(yield Ir[qe]).data;for(let Ke in ot){let{width:ft,height:qt,x:Xt,y:$t,sdf:dr,pixelRatio:Mr,stretchX:$r,stretchY:ii,content:pi,textFitWidth:Yi,textFitHeight:wn}=ot[Ke];Ae[qe][Ke]={data:null,pixelRatio:Mr,sdf:dr,stretchX:$r,stretchY:ii,content:pi,textFitWidth:Yi,textFitHeight:wn,spriteData:{width:ft,height:qt,x:Xt,y:$t,context:Ve}}}}return Ae})}(Jt,yr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let Ne in le){this._spritesImagesIds[Ne]=[];let $e=this._spritesImagesIds[Ne]?this._spritesImagesIds[Ne].filter(pt=>!(pt in le)):[];for(let pt of $e)this.imageManager.removeImage(pt),this._changedImages[pt]=!0;for(let pt in le[Ne]){let zt=Ne==="default"?pt:`${Ne}:${pt}`;this._spritesImagesIds[Ne].push(zt),zt in this.imageManager.images?this.imageManager.updateImage(zt,le[Ne][pt],!1):this.imageManager.addImage(zt,le[Ne][pt]),B&&(this._changedImages[zt]=!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 Ne=B?a.aB(Q[le]):Q[le];ee.push(Ne)}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 Ne in this._updatedSources){let $e=this._updatedSources[Ne];if($e==="reload")this._reloadSource(Ne);else{if($e!=="clear")throw new Error(`Invalid action ${$e}`);this._clearSource(Ne)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Ne in this._updatedPaintProps)this._layers[Ne].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)&&zi(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),Ne=this._getOperationsToPerform(le);if(Ne.unimplemented.length>0)throw new Error(`Unimplemented: ${Ne.unimplemented.join(", ")}.`);if(Ne.operations.length===0)return!1;for(let $e of Ne.operations)$e();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 tt(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(zi(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 Ne=B?this._order.indexOf(B):this._order.length;if(B&&Ne===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(Ne,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let $e=this._removedLayers[ee];delete this._removedLayers[ee],$e.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 Ne=le.getSource().type;Ne==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Ne!=="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,Ne=le==="vector"?w.sourceLayer:void 0;le!=="vector"||Ne?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(Ne,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=Ne=>this._layers[Ne].type==="fill-extrusion",Q={},ee=[];for(let Ne=this._order.length-1;Ne>=0;Ne--){let $e=this._order[Ne];if(B($e)){Q[$e]=Ne;for(let pt of w){let zt=pt[$e];if(zt)for(let Yt of zt)ee.push(Yt)}}}ee.sort((Ne,$e)=>$e.intersectionZ-Ne.intersectionZ);let le=[];for(let Ne=this._order.length-1;Ne>=0;Ne--){let $e=this._order[Ne];if(B($e))for(let pt=ee.length-1;pt>=0;pt--){let zt=ee[pt].feature;if(Q[zt.layer.id]{let dr=Ve.featureSortOrder;if(dr){let Mr=dr.indexOf(Xt.featureIndex);return dr.indexOf($t.featureIndex)-Mr}return $t.featureIndex-Xt.featureIndex});for(let Xt of qt)ft.push(Xt)}}for(let Ve in ce)ce[Ve].forEach(ot=>{let Ke=ot.feature,ft=zt[$e[Ve].source].getFeatureState(Ke.layer["source-layer"],Ke.id);Ke.source=Ke.layer.source,Ke.layer["source-layer"]&&(Ke.sourceLayer=Ke.layer["source-layer"]),Ke.state=ft});return ce}(this._layers,Ne,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 Ne=ee.getRenderableIds().map(zt=>ee.getTileByID(zt)),$e=[],pt={};for(let zt=0;ztyr.getTileByID(Ir)).sort((Ir,ce)=>ce.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan(ce.tileID)?-1:1))}let Jt=this.crossTileSymbolIndex.addLayer(Yt,pt[Yt.source],w.center.lng);Ne=Ne||Jt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(l.now(),w.zoom))&&(this.pauseablePlacement=new Ni(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,pt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(l.now()),$e=!0),Ne&&this.pauseablePlacement.placement.setStale()),$e||Ne)for(let zt of this._order){let Yt=this._layers[zt];Yt.type==="symbol"&&this.placement.updateLayerOpacities(Yt,pt[Yt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(l.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}],Ne=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",Ne,null,Q)||(this.stylesheet.sprite=Ne,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 fi=a.Y([{name:"a_pos",type:"Int16",components:2}]);let Or={prelude:st(`#ifdef GL_ES +`),mapOnErrorMsg:"Map error."}});var Fk=Se((N_r,ZHe)=>{"use strict";var HHe=Zr(),GHe=Pl().defaultLine,DWt=Ec().attributes,RWt=uc(),FWt=Zc().textposition,qWt=_c().overrideAll,BWt=_f().templatedArray,WHe=bx(),jHe=RWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});jHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var OWt=ZHe.exports=qWt({_arrayAttrRegexps:[HHe.counterRegex("map",".layers",!0)],domain:DWt({name:"map"}),style:{valType:"any",values:WHe.styleValuesMap,dflt:WHe.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:BWt("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:GHe},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:GHe}},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:jHe,textposition:HHe.extendFlat({},FWt,{arrayOk:!1})}})},"plot","from-root");OWt.uirevision={valType:"any",editType:"none"}});var sq=Se((U_r,KHe)=>{"use strict";var NWt=Du().hovertemplateAttrs,UWt=Du().texttemplateAttrs,VWt=Ey(),qk=H2(),AS=Zc(),XHe=Fk(),HWt=zf(),GWt=Xf(),rw=vu().extendFlat,WWt=_c().overrideAll,jWt=Fk(),YHe=qk.line,SS=qk.marker;KHe.exports=WWt({lon:qk.lon,lat:qk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:rw({},jWt.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({},SS.opacity,{dflt:1})},mode:rw({},AS.mode,{dflt:"markers"}),text:rw({},AS.text,{}),texttemplate:UWt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:rw({},AS.hovertext,{}),line:{color:YHe.color,width:YHe.width},connectgaps:AS.connectgaps,marker:rw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:SS.opacity,size:SS.size,sizeref:SS.sizeref,sizemin:SS.sizemin,sizemode:SS.sizemode},GWt("marker")),fill:qk.fill,fillcolor:VWt(),textfont:XHe.layers.symbol.textfont,textposition:XHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:AS.selected.marker},unselected:{marker:AS.unselected.marker},hoverinfo:rw({},HWt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:NWt()},"calc","nested")});var mJ=Se((V_r,JHe)=>{"use strict";var ZWt=["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"];JHe.exports={isSupportedFont:function(e){return ZWt.indexOf(e)!==-1}}});var eGe=Se((H_r,QHe)=>{"use strict";var Bk=Zr(),gJ=ec(),XWt=$v(),YWt=I0(),KWt=D0(),JWt=Py(),$He=sq(),$Wt=mJ().isSupportedFont;QHe.exports=function(t,r,n,i){function a(y,k){return Bk.coerce(t,r,$He,y,k)}function o(y,k){return Bk.coerce2(t,r,$He,y,k)}var s=QWt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),gJ.hasMarkers(r)){XWt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var u=r.marker;u.symbol!=="circle"&&(Bk.isArrayOrTypedArray(u.size)&&(u.size=u.size[0]),Bk.isArrayOrTypedArray(u.color)&&(u.color=u.color[0]))}gJ.hasLines(r)&&(YWt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var l=o("cluster.maxzoom"),f=o("cluster.step"),c=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),p=l!==!1||f!==!1||c!==!1||h!==!1||d!==!1,x=a("cluster.enabled",p);if(x||gJ.hasText(r)){var b=i.font.family;KWt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:$Wt(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"&&JWt(t,r,n,a),Bk.coerceSelectionMarkerOpacity(r,a)};function QWt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var _J=Se((G_r,rGe)=>{"use strict";var tGe=hu();rGe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=tGe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=tGe.tickText(o,o.c2l(s[1]),!0).text,i}});var xJ=Se((W_r,nGe)=>{"use strict";var iGe=Zr();nGe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=iGe.isArrayOrTypedArray(r)?iGe.mean(r):r,s=.5+o/100,u=1.5+o/100,l=["",""],f=[0,0];switch(i){case"top":l[0]="top",f[1]=-u;break;case"bottom":l[0]="bottom",f[1]=u;break}switch(a){case"left":l[1]="right",f[0]=-s;break;case"right":l[1]="left",f[0]=s;break}var c;return l[0]&&l[1]?c=l.join("-"):l[0]?c=l[0]:l[1]?c=l[1]:c="center",{anchor:c,offset:f}}});var fGe=Se((j_r,uGe)=>{"use strict";var sGe=_u(),lp=Zr(),ejt=ju().BADNUM,uq=tx(),aGe=fc(),tjt=yu(),rjt=S3(),fq=ec(),ijt=mJ().isSupportedFont,njt=xJ(),ajt=rv().appendArrayPointValue,ojt=Bf().NEWLINES,sjt=Bf().BR_TAG_ALL;uGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=fq.hasLines(n),s=fq.hasMarkers(n),u=fq.hasText(n),l=s&&n.marker.symbol==="circle",f=s&&n.marker.symbol!=="circle",c=n.cluster&&n.cluster.enabled,h=lq("fill"),d=lq("line"),p=lq("circle"),x=lq("symbol"),b={fill:h,line:d,circle:p,symbol:x};if(!i)return b;var y;if((a||o)&&(y=uq.calcTraceToLineCoords(r)),a&&(h.geojson=uq.makePolygon(y),h.layout.visibility="visible",lp.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=uq.makeLine(y),d.layout.visibility="visible",lp.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),l){var k=ljt(r);p.geojson=k.geojson,p.layout.visibility="visible",c&&(p.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":wJ(n.cluster.color,n.cluster.step),"circle-radius":wJ(n.cluster.size,n.cluster.step),"circle-opacity":wJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":oGe(n),"text-size":12}}),lp.extendFlat(p.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(l&&c&&(p.filter=["!",["has","point_count"]]),(f||u)&&(x.geojson=ujt(r,t),lp.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),f&&(lp.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&lp.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,lp.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),u)){var E=(n.marker||{}).size,A=njt(n.textposition,E);lp.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":oGe(n)}),lp.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function lq(e){return{type:e,geojson:uq.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function ljt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=lp.isArrayOrTypedArray(r.color),a=lp.isArrayOrTypedArray(r.size),o=lp.isArrayOrTypedArray(r.opacity),s;function u(E){return t.opacity*E}function l(E){return E/2}var f;i&&(aGe.hasColorscale(t,"marker")?f=aGe.makeColorScaleFuncFromTrace(r):f=lp.identity);var c;a&&(c=rjt(t));var h;o&&(h=function(E){var A=sGe(E)?+lp.constrain(E,0,1):0;return u(A)});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"),ijt(s)||(s=r);var u=s.split(", ");return u}});var pGe=Se((Z_r,dGe)=>{"use strict";var fjt=Zr(),cGe=fGe(),MS=bx().traceLayerPrefix,ny={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function hGe(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:MS+t+"-fill",line:MS+t+"-line",circle:MS+t+"-circle",symbol:MS+t+"-symbol",cluster:MS+t+"-cluster",clusterCount:MS+t+"-cluster-count"},this.below=null}var Ok=hGe.prototype;Ok.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&fjt.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)};Ok.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Ok.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 _=A[L];i.removeLayer(l.layerIds[_])}E||i.removeSource(l.sourceIds.circle)}function h(E){for(var A=ny.nonCluster,L=0;L=0;L--){var _=A[L];i.removeLayer(l.layerIds[_]),E||i.removeSource(l.sourceIds[_])}}function p(E){u?c(E):d(E)}function x(E){s?f(E):h(E)}function b(){for(var E=s?ny.cluster:ny.nonCluster,A=0;A=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};dGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new hGe(t,n.uid,i,a),s=cGe(t.gd,r),u=o.below=t.belowLookup["trace-"+n.uid],l,f,c;if(i)for(o.addSource("circle",s.circle,n.cluster),l=0;l{"use strict";var cjt=jc(),TJ=Zr(),hjt=oT(),djt=TJ.fillText,pjt=ju().BADNUM,vjt=bx().traceLayerPrefix;function yjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,u=[],l=vjt+i.uid+"-circle",f=i.cluster&&i.cluster.enabled;if(f){var c=s.map.queryRenderedFeatures(null,{layers:[l]});u=c.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function x(M){var v=M.lonlat;if(v[0]===pjt||f&&u.indexOf(M.i+1)===-1)return 1/0;var z=TJ.modHalf(v[0],360),T=v[1],F=s.project([z,T]),q=F.x-a.c2p([p,T]),U=F.y-o.c2p([z,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-H,1-3/H)}if(cjt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],y=b.lonlat,k=[TJ.modHalf(y[0],360)+d,y[1]],E=a.c2p(k),A=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=hjt(i,b),e.extraText=vGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function vGe(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,u=t.lonlat,l=[];function f(c){return c+"\xB0"}return a||o&&s?l.push("("+f(u[1])+", "+f(u[0])+")"):o?l.push(r.lon+f(u[0])):s&&l.push(r.lat+f(u[1])),(a||i.indexOf("text")!==-1)&&djt(t,e,l),l.join("
")}yGe.exports={hoverPoints:yjt,getExtraText:vGe}});var gGe=Se((Y_r,mGe)=>{"use strict";mGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var xGe=Se((K_r,_Ge)=>{"use strict";var mjt=Zr(),gjt=ec(),_jt=ju().BADNUM;_Ge.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,u;if(!gjt.hasMarkers(s))return[];if(r===!1)for(u=0;u{(function(e,t){typeof AJ=="object"&&typeof SJ!="undefined"?SJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(AJ,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);",u={};return t.shared(u),t.index(e,u),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(I,S,D,Z){return new(D||(D=Promise))(function(ie,pe){function xe(wt){try{at(Z.next(wt))}catch(Ht){pe(Ht)}}function He(wt){try{at(Z.throw(wt))}catch(Ht){pe(Ht)}}function at(wt){var Ht;wt.done?ie(wt.value):(Ht=wt.value,Ht instanceof D?Ht:new D(function(rr){rr(Ht)})).then(xe,He)}at((Z=Z.apply(I,S||[])).next())})}function o(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}typeof SuppressedError=="function"&&SuppressedError;var s=u;function u(I,S){this.x=I,this.y=S}u.prototype={clone:function(){return new u(this.x,this.y)},add:function(I){return this.clone()._add(I)},sub:function(I){return this.clone()._sub(I)},multByPoint:function(I){return this.clone()._multByPoint(I)},divByPoint:function(I){return this.clone()._divByPoint(I)},mult:function(I){return this.clone()._mult(I)},div:function(I){return this.clone()._div(I)},rotate:function(I){return this.clone()._rotate(I)},rotateAround:function(I,S){return this.clone()._rotateAround(I,S)},matMult:function(I){return this.clone()._matMult(I)},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(I){return this.x===I.x&&this.y===I.y},dist:function(I){return Math.sqrt(this.distSqr(I))},distSqr:function(I){var S=I.x-this.x,D=I.y-this.y;return S*S+D*D},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(I){return Math.atan2(this.y-I.y,this.x-I.x)},angleWith:function(I){return this.angleWithSep(I.x,I.y)},angleWithSep:function(I,S){return Math.atan2(this.x*S-this.y*I,this.x*I+this.y*S)},_matMult:function(I){var S=I[2]*this.x+I[3]*this.y;return this.x=I[0]*this.x+I[1]*this.y,this.y=S,this},_add:function(I){return this.x+=I.x,this.y+=I.y,this},_sub:function(I){return this.x-=I.x,this.y-=I.y,this},_mult:function(I){return this.x*=I,this.y*=I,this},_div:function(I){return this.x/=I,this.y/=I,this},_multByPoint:function(I){return this.x*=I.x,this.y*=I.y,this},_divByPoint:function(I){return this.x/=I.x,this.y/=I.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var I=this.y;return this.y=this.x,this.x=-I,this},_rotate:function(I){var S=Math.cos(I),D=Math.sin(I),Z=D*this.x+S*this.y;return this.x=S*this.x-D*this.y,this.y=Z,this},_rotateAround:function(I,S){var D=Math.cos(I),Z=Math.sin(I),ie=S.y+Z*(this.x-S.x)+D*(this.y-S.y);return this.x=S.x+D*(this.x-S.x)-Z*(this.y-S.y),this.y=ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},u.convert=function(I){return I instanceof u?I:Array.isArray(I)?new u(I[0],I[1]):I};var l=o(s),f=c;function c(I,S,D,Z){this.cx=3*I,this.bx=3*(D-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(Z-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=S,this.p2x=D,this.p2y=Z}c.prototype={sampleCurveX:function(I){return((this.ax*I+this.bx)*I+this.cx)*I},sampleCurveY:function(I){return((this.ay*I+this.by)*I+this.cy)*I},sampleCurveDerivativeX:function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},solveCurveX:function(I,S){if(S===void 0&&(S=1e-6),I<0)return 0;if(I>1)return 1;for(var D=I,Z=0;Z<8;Z++){var ie=this.sampleCurveX(D)-I;if(Math.abs(ie)ie?xe=D:He=D,D=.5*(He-xe)+xe;return D},solve:function(I,S){return this.sampleCurveY(this.solveCurveX(I,S))}};var h=o(f);let d,p;function x(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(p==null&&(p=!1,x())){let S=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(S){for(let Z=0;Z<5*5;Z++){let ie=4*Z;S.fillStyle=`rgb(${ie},${ie+1},${ie+2})`,S.fillRect(Z%5,Math.floor(Z/5),1,1)}let D=S.getImageData(0,0,5,5).data;for(let Z=0;Z<5*5*4;Z++)if(Z%4!=3&&D[Z]!==Z){p=!0;break}}}return p||!1}function y(I,S,D,Z){let ie=new h(I,S,D,Z);return pe=>ie.solve(pe)}let k=y(.25,.1,.25,1);function E(I,S,D){return Math.min(D,Math.max(S,I))}function A(I,S,D){let Z=D-S,ie=((I-S)%Z+Z)%Z+S;return ie===S?D:ie}function L(I,...S){for(let D of S)for(let Z in D)I[Z]=D[Z];return I}let _=1;function C(I,S,D){let Z={};for(let ie in I)Z[ie]=S.call(this,I[ie],ie,I);return Z}function M(I,S,D){let Z={};for(let ie in I)S.call(this,I[ie],ie,I)&&(Z[ie]=I[ie]);return Z}function v(I){return Array.isArray(I)?I.map(v):typeof I=="object"&&I?C(I,v):I}let z={};function T(I){z[I]||(typeof console!="undefined"&&console.warn(I),z[I]=!0)}function F(I,S,D){return(D.y-I.y)*(S.x-I.x)>(S.y-I.y)*(D.x-I.x)}function q(I){return typeof WorkerGlobalScope!="undefined"&&I!==void 0&&I instanceof WorkerGlobalScope}let U=null;function H(I){return typeof ImageBitmap!="undefined"&&I instanceof ImageBitmap}let j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function G(I,S,D,Z,ie){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let pe=new VideoFrame(I,{timestamp:0});try{let xe=pe==null?void 0:pe.format;if(!xe||!xe.startsWith("BGR")&&!xe.startsWith("RGB"))throw new Error(`Unrecognized format ${xe}`);let He=xe.startsWith("BGR"),at=new Uint8ClampedArray(Z*ie*4);if(yield pe.copyTo(at,function(wt,Ht,rr,pr,Ar){let Vr=4*Math.max(-Ht,0),ri=(Math.max(0,rr)-rr)*pr*4+Vr,Ii=4*pr,Zi=Math.max(0,Ht),da=Math.max(0,rr);return{rect:{x:Zi,y:da,width:Math.min(wt.width,Ht+pr)-Zi,height:Math.min(wt.height,rr+Ar)-da},layout:[{offset:ri,stride:Ii}]}}(I,S,D,Z,ie)),He)for(let wt=0;wtq(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ke=function(I,S){if(/:\/\//.test(I.url)&&!/^https?:|^file:/.test(I.url)){let Z=ze(I.url);if(Z)return Z(I,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:I,targetMapId:Ce},S)}if(!(/^file:/.test(D=I.url)||/^file:/.test(te())&&!/^\w+:/.test(D))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(Z,ie){return a(this,void 0,void 0,function*(){let pe=new Request(Z.url,{method:Z.method||"GET",body:Z.body,credentials:Z.credentials,headers:Z.headers,cache:Z.cache,referrer:te(),signal:ie.signal});Z.type!=="json"||pe.headers.has("Accept")||pe.headers.set("Accept","application/json");let xe=yield fetch(pe);if(!xe.ok){let wt=yield xe.blob();throw new he(xe.status,xe.statusText,Z.url,wt)}let He;He=Z.type==="arrayBuffer"||Z.type==="image"?xe.arrayBuffer():Z.type==="json"?xe.json():xe.text();let at=yield He;if(ie.signal.aborted)throw ne();return{data:at,cacheControl:xe.headers.get("Cache-Control"),expires:xe.headers.get("Expires")}})}(I,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:I,mustQueue:!0,targetMapId:Ce},S)}var D;return function(Z,ie){return new Promise((pe,xe)=>{var He;let at=new XMLHttpRequest;at.open(Z.method||"GET",Z.url,!0),Z.type!=="arrayBuffer"&&Z.type!=="image"||(at.responseType="arraybuffer");for(let wt in Z.headers)at.setRequestHeader(wt,Z.headers[wt]);Z.type==="json"&&(at.responseType="text",!((He=Z.headers)===null||He===void 0)&&He.Accept||at.setRequestHeader("Accept","application/json")),at.withCredentials=Z.credentials==="include",at.onerror=()=>{xe(new Error(at.statusText))},at.onload=()=>{if(!ie.signal.aborted)if((at.status>=200&&at.status<300||at.status===0)&&at.response!==null){let wt=at.response;if(Z.type==="json")try{wt=JSON.parse(at.response)}catch(Ht){return void xe(Ht)}pe({data:wt,cacheControl:at.getResponseHeader("Cache-Control"),expires:at.getResponseHeader("Expires")})}else{let wt=new Blob([at.response],{type:at.getResponseHeader("Content-Type")});xe(new he(at.status,at.statusText,Z.url,wt))}},ie.signal.addEventListener("abort",()=>{at.abort(),xe(ne())}),at.send(Z.body)})}(I,S)};function Ee(I){if(!I||I.indexOf("://")<=0||I.indexOf("data:image/")===0||I.indexOf("blob:")===0)return!0;let S=new URL(I),D=window.location;return S.protocol===D.protocol&&S.host===D.host}function Me(I,S,D){D[I]&&D[I].indexOf(S)!==-1||(D[I]=D[I]||[],D[I].push(S))}function Oe(I,S,D){if(D&&D[I]){let Z=D[I].indexOf(S);Z!==-1&&D[I].splice(Z,1)}}class Re{constructor(S,D={}){L(this,D),this.type=S}}class me extends Re{constructor(S,D={}){super("error",L({error:S},D))}}class Be{on(S,D){return this._listeners=this._listeners||{},Me(S,D,this._listeners),this}off(S,D){return Oe(S,D,this._listeners),Oe(S,D,this._oneTimeListeners),this}once(S,D){return D?(this._oneTimeListeners=this._oneTimeListeners||{},Me(S,D,this._oneTimeListeners),this):new Promise(Z=>this.once(S,Z))}fire(S,D){typeof S=="string"&&(S=new Re(S,D||{}));let Z=S.type;if(this.listens(Z)){S.target=this;let ie=this._listeners&&this._listeners[Z]?this._listeners[Z].slice():[];for(let He of ie)He.call(this,S);let pe=this._oneTimeListeners&&this._oneTimeListeners[Z]?this._oneTimeListeners[Z].slice():[];for(let He of pe)Oe(Z,He,this._oneTimeListeners),He.call(this,S);let xe=this._eventedParent;xe&&(L(S,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),xe.fire(S))}else S instanceof me&&console.error(S.error);return this}listens(S){return this._listeners&&this._listeners[S]&&this._listeners[S].length>0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)}setEventedParent(S,D){return this._eventedParent=S,this._eventedParentData=D,this}}var fe={$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 et(I,S){let D={};for(let Z in I)Z!=="ref"&&(D[Z]=I[Z]);return Ze.forEach(Z=>{Z in S&&(D[Z]=S[Z])}),D}function gt(I,S){if(Array.isArray(I)){if(!Array.isArray(S)||I.length!==S.length)return!1;for(let D=0;D`:I.itemType.kind==="value"?"array":`array<${S}>`}return I.kind}let Pe=[ct,rt,je,tt,Je,ir,Mt,_e(Vt),fr,Ot,De];function Ie(I,S){if(S.kind==="error")return null;if(I.kind==="array"){if(S.kind==="array"&&(S.N===0&&S.itemType.kind==="value"||!Ie(I.itemType,S.itemType))&&(typeof I.N!="number"||I.N===S.N))return null}else{if(I.kind===S.kind)return null;if(I.kind==="value"){for(let D of Pe)if(!Ie(D,S))return null}}return`Expected ${Fe(I)} but found ${Fe(S)} instead.`}function lt(I,S){return S.some(D=>D.kind===I.kind)}function ye(I,S){return S.some(D=>D==="null"?I===null:D==="array"?Array.isArray(I):D==="object"?I&&!Array.isArray(I)&&typeof I=="object":D===typeof I)}function ue(I,S){return I.kind==="array"&&S.kind==="array"?I.itemType.kind===S.itemType.kind&&typeof I.N=="number":I.kind===S.kind}let de=.96422,ht=.82521,Et=4/29,St=6/29,Zt=3*St*St,qr=St*St*St,Lr=Math.PI/180,vr=180/Math.PI;function Er(I){return(I%=360)<0&&(I+=360),I}function si([I,S,D,Z]){let ie,pe,xe=Si((.2225045*(I=Ei(I))+.7168786*(S=Ei(S))+.0606169*(D=Ei(D)))/1);I===S&&S===D?ie=pe=xe:(ie=Si((.4360747*I+.3850649*S+.1430804*D)/de),pe=Si((.0139322*I+.0971045*S+.7141733*D)/ht));let He=116*xe-16;return[He<0?0:He,500*(ie-xe),200*(xe-pe),Z]}function Ei(I){return I<=.04045?I/12.92:Math.pow((I+.055)/1.055,2.4)}function Si(I){return I>qr?Math.pow(I,1/3):I/Zt+Et}function xi([I,S,D,Z]){let ie=(I+16)/116,pe=isNaN(S)?ie:ie+S/500,xe=isNaN(D)?ie:ie-D/200;return ie=1*Jr(ie),pe=de*Jr(pe),xe=ht*Jr(xe),[Hi(3.1338561*pe-1.6168667*ie-.4906146*xe),Hi(-.9787684*pe+1.9161415*ie+.033454*xe),Hi(.0719453*pe-.2289914*ie+1.4052427*xe),Z]}function Hi(I){return(I=I<=.00304?12.92*I:1.055*Math.pow(I,1/2.4)-.055)<0?0:I>1?1:I}function Jr(I){return I>St?I*I*I:Zt*(I-Et)}function ci(I){return parseInt(I.padEnd(2,I),16)/255}function Di(I,S){return Lt(S?I/100:I,0,1)}function Lt(I,S,D){return Math.min(Math.max(S,I),D)}function vt(I){return!I.some(Number.isNaN)}let Dt={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 Bt{constructor(S,D,Z,ie=1,pe=!0){this.r=S,this.g=D,this.b=Z,this.a=ie,pe||(this.r*=ie,this.g*=ie,this.b*=ie,ie||this.overwriteGetter("rgb",[S,D,Z,ie]))}static parse(S){if(S instanceof Bt)return S;if(typeof S!="string")return;let D=function(Z){if((Z=Z.toLowerCase().trim())==="transparent")return[0,0,0,0];let ie=Dt[Z];if(ie){let[xe,He,at]=ie;return[xe/255,He/255,at/255,1]}if(Z.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(Z)){let xe=Z.length<6?1:2,He=1;return[ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+=xe)),ci(Z.slice(He,He+xe)||"ff")]}if(Z.startsWith("rgb")){let xe=Z.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(xe){let[He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da]=xe,cn=[Ht||" ",Ar||" ",Ii].join("");if(cn===" "||cn===" /"||cn===",,"||cn===",,,"){let jn=[wt,pr,ri].join(""),Va=jn==="%%%"?100:jn===""?255:0;if(Va){let hl=[Lt(+at/Va,0,1),Lt(+rr/Va,0,1),Lt(+Vr/Va,0,1),Zi?Di(+Zi,da):1];if(vt(hl))return hl}}return}}let pe=Z.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[xe,He,at,wt,Ht,rr,pr,Ar,Vr]=pe,ri=[at||" ",Ht||" ",pr].join("");if(ri===" "||ri===" /"||ri===",,"||ri===",,,"){let Ii=[+He,Lt(+wt,0,100),Lt(+rr,0,100),Ar?Di(+Ar,Vr):1];if(vt(Ii))return function([Zi,da,cn,jn]){function Va(hl){let iu=(hl+Zi/30)%12,Su=da*Math.min(cn,1-cn);return cn-Su*Math.max(-1,Math.min(iu-3,9-iu,1))}return Zi=Er(Zi),da/=100,cn/=100,[Va(0),Va(8),Va(4),jn]}(Ii)}}}(S);return D?new Bt(...D,!1):void 0}get rgb(){let{r:S,g:D,b:Z,a:ie}=this,pe=ie||1/0;return this.overwriteGetter("rgb",[S/pe,D/pe,Z/pe,ie])}get hcl(){return this.overwriteGetter("hcl",function(S){let[D,Z,ie,pe]=si(S),xe=Math.sqrt(Z*Z+ie*ie);return[Math.round(1e4*xe)?Er(Math.atan2(ie,Z)*vr):NaN,xe,D,pe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",si(this.rgb))}overwriteGetter(S,D){return Object.defineProperty(this,S,{value:D}),D}toString(){let[S,D,Z,ie]=this.rgb;return`rgba(${[S,D,Z].map(pe=>Math.round(255*pe)).join(",")},${ie})`}}Bt.black=new Bt(0,0,0,1),Bt.white=new Bt(1,1,1,1),Bt.transparent=new Bt(0,0,0,0),Bt.red=new Bt(1,0,0,1);class sr{constructor(S,D,Z){this.sensitivity=S?D?"variant":"case":D?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(S,D){return this.collator.compare(S,D)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class br{constructor(S,D,Z,ie,pe){this.text=S,this.image=D,this.scale=Z,this.fontStack=ie,this.textColor=pe}}class zr{constructor(S){this.sections=S}static fromString(S){return new zr([new br(S,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(S=>S.text.length!==0||S.image&&S.image.name.length!==0)}static factory(S){return S instanceof zr?S:zr.fromString(S)}toString(){return this.sections.length===0?"":this.sections.map(S=>S.text).join("")}}class Tr{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Tr)return S;if(typeof S=="number")return new Tr([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let D of S)if(typeof D!="number")return;switch(S.length){case 1:S=[S[0],S[0],S[0],S[0]];break;case 2:S=[S[0],S[1],S[0],S[1]];break;case 3:S=[S[0],S[1],S[2],S[1]]}return new Tr(S)}}toString(){return JSON.stringify(this.values)}}let Rr=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Br{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Br)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let D=0;D=0&&I<=255&&typeof S=="number"&&S>=0&&S<=255&&typeof D=="number"&&D>=0&&D<=255?Z===void 0||typeof Z=="number"&&Z>=0&&Z<=1?null:`Invalid rgba value [${[I,S,D,Z].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof Z=="number"?[I,S,D,Z]:[I,S,D]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Pi(I){if(I===null||typeof I=="string"||typeof I=="boolean"||typeof I=="number"||I instanceof Bt||I instanceof sr||I instanceof zr||I instanceof Tr||I instanceof Br||I instanceof oi)return!0;if(Array.isArray(I)){for(let S of I)if(!Pi(S))return!1;return!0}if(typeof I=="object"){for(let S in I)if(!Pi(I[S]))return!1;return!0}return!1}function Yr(I){if(I===null)return ct;if(typeof I=="string")return je;if(typeof I=="boolean")return tt;if(typeof I=="number")return rt;if(I instanceof Bt)return Je;if(I instanceof sr)return Kt;if(I instanceof zr)return ir;if(I instanceof Tr)return fr;if(I instanceof Br)return De;if(I instanceof oi)return Ot;if(Array.isArray(I)){let S=I.length,D;for(let Z of I){let ie=Yr(Z);if(D){if(D===ie)continue;D=Vt;break}D=ie}return _e(D||Vt,S)}return Mt}function Ni(I){let S=typeof I;return I===null?"":S==="string"||S==="number"||S==="boolean"?String(I):I instanceof Bt||I instanceof zr||I instanceof Tr||I instanceof Br||I instanceof oi?I.toString():JSON.stringify(I)}class Ur{constructor(S,D){this.type=S,this.value=D}static parse(S,D){if(S.length!==2)return D.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!Pi(S[1]))return D.error("invalid value");let Z=S[1],ie=Yr(Z),pe=D.expectedType;return ie.kind!=="array"||ie.N!==0||!pe||pe.kind!=="array"||typeof pe.N=="number"&&pe.N!==0||(ie=pe),new Ur(ie,Z)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ti{constructor(S){this.name="ExpressionEvaluationError",this.message=S}toJSON(){return this.message}}let ki={string:je,number:rt,boolean:tt,object:Mt};class ji{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z,ie=1,pe=S[0];if(pe==="array"){let He,at;if(S.length>2){let wt=S[1];if(typeof wt!="string"||!(wt in ki)||wt==="object")return D.error('The item type argument of "array" must be one of string, number, boolean',1);He=ki[wt],ie++}else He=Vt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return D.error('The length argument to "array" must be a positive integer literal',2);at=S[2],ie++}Z=_e(He,at)}else{if(!ki[pe])throw new Error(`Types doesn't contain name = ${pe}`);Z=ki[pe]}let xe=[];for(;ieS.outputDefined())}}let Vi={"to-boolean":tt,"to-color":Je,"to-number":rt,"to-string":je};class zi{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z=S[0];if(!Vi[Z])throw new Error(`Can't parse ${Z} as it is not part of the known types`);if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return D.error("Expected one argument.");let ie=Vi[Z],pe=[];for(let xe=1;xe4?`Invalid rbga value ${JSON.stringify(D)}: expected an array containing either three or four numeric values.`:vi(D[0],D[1],D[2],D[3]),!Z))return new Bt(D[0]/255,D[1]/255,D[2]/255,D[3])}throw new ti(Z||`Could not parse color from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"padding":{let D;for(let Z of this.args){D=Z.evaluate(S);let ie=Tr.parse(D);if(ie)return ie}throw new ti(`Could not parse padding from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"variableAnchorOffsetCollection":{let D;for(let Z of this.args){D=Z.evaluate(S);let ie=Br.parse(D);if(ie)return ie}throw new ti(`Could not parse variableAnchorOffsetCollection from value '${typeof D=="string"?D:JSON.stringify(D)}'`)}case"number":{let D=null;for(let Z of this.args){if(D=Z.evaluate(S),D===null)return 0;let ie=Number(D);if(!isNaN(ie))return ie}throw new ti(`Could not convert ${JSON.stringify(D)} to number.`)}case"formatted":return zr.fromString(Ni(this.args[0].evaluate(S)));case"resolvedImage":return oi.fromString(Ni(this.args[0].evaluate(S)));default:return Ni(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Mi=["Unknown","Point","LineString","Polygon"];class sn{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"?Mi[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(S){let D=this._parseColorCache[S];return D||(D=this._parseColorCache[S]=Bt.parse(S)),D}}class fi{constructor(S,D,Z=[],ie,pe=new ut,xe=[]){this.registry=S,this.path=Z,this.key=Z.map(He=>`[${He}]`).join(""),this.scope=pe,this.errors=xe,this.expectedType=ie,this._isConstant=D}parse(S,D,Z,ie,pe={}){return D?this.concat(D,Z,ie)._parse(S,pe):this._parse(S,pe)}_parse(S,D){function Z(ie,pe,xe){return xe==="assert"?new ji(pe,[ie]):xe==="coerce"?new zi(pe,[ie]):ie}if(S!==null&&typeof S!="string"&&typeof S!="boolean"&&typeof S!="number"||(S=["literal",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let ie=S[0];if(typeof ie!="string")return this.error(`Expression name must be a string, but found ${typeof ie} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let pe=this.registry[ie];if(pe){let xe=pe.parse(S,this);if(!xe)return null;if(this.expectedType){let He=this.expectedType,at=xe.type;if(He.kind!=="string"&&He.kind!=="number"&&He.kind!=="boolean"&&He.kind!=="object"&&He.kind!=="array"||at.kind!=="value")if(He.kind!=="color"&&He.kind!=="formatted"&&He.kind!=="resolvedImage"||at.kind!=="value"&&at.kind!=="string")if(He.kind!=="padding"||at.kind!=="value"&&at.kind!=="number"&&at.kind!=="array")if(He.kind!=="variableAnchorOffsetCollection"||at.kind!=="value"&&at.kind!=="array"){if(this.checkSubtype(He,at))return null}else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"coerce");else xe=Z(xe,He,D.typeAnnotation||"assert")}if(!(xe instanceof Ur)&&xe.type.kind!=="resolvedImage"&&this._isConstant(xe)){let He=new sn;try{xe=new Ur(xe.type,xe.evaluate(He))}catch(at){return this.error(at.message),null}}return xe}return this.error(`Unknown expression "${ie}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(S===void 0?"'undefined' value invalid. Use null instead.":typeof S=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof S} instead.`)}concat(S,D,Z){let ie=typeof S=="number"?this.path.concat(S):this.path,pe=Z?this.scope.concat(Z):this.scope;return new fi(this.registry,this._isConstant,ie,D||null,pe,this.errors)}error(S,...D){let Z=`${this.key}${D.map(ie=>`[${ie}]`).join("")}`;this.errors.push(new nt(Z,S))}checkSubtype(S,D){let Z=Ie(S,D);return Z&&this.error(Z),Z}}class Or{constructor(S,D){this.type=D.type,this.bindings=[].concat(S),this.result=D}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let D of this.bindings)S(D[1]);S(this.result)}static parse(S,D){if(S.length<4)return D.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let Z=[];for(let pe=1;pe=Z.length)throw new ti(`Array index out of bounds: ${D} > ${Z.length-1}.`);if(D!==Math.floor(D))throw new ti(`Array index must be an integer, but found ${D} instead.`);return Z[D]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class tr{constructor(S,D){this.type=tt,this.needle=S,this.haystack=D}static parse(S,D){if(S.length!==3)return D.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,Vt);return Z&&ie?lt(Z.type,[tt,je,rt,ct,Vt])?new tr(Z,ie):D.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Z.type)} instead`):null}evaluate(S){let D=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!ye(D,["boolean","string","number","null"]))throw new ti(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Yr(D))} instead.`);if(!ye(Z,["string","array"]))throw new ti(`Expected second argument to be of type array or string, but found ${Fe(Yr(Z))} instead.`);return Z.indexOf(D)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class or{constructor(S,D,Z){this.type=rt,this.needle=S,this.haystack=D,this.fromIndex=Z}static parse(S,D){if(S.length<=2||S.length>=5)return D.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,Vt);if(!Z||!ie)return null;if(!lt(Z.type,[tt,je,rt,ct,Vt]))return D.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Z.type)} instead`);if(S.length===4){let pe=D.parse(S[3],3,rt);return pe?new or(Z,ie,pe):null}return new or(Z,ie)}evaluate(S){let D=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!ye(D,["boolean","string","number","null"]))throw new ti(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(Yr(D))} instead.`);let ie;if(this.fromIndex&&(ie=this.fromIndex.evaluate(S)),ye(Z,["string"])){let pe=Z.indexOf(D,ie);return pe===-1?-1:[...Z.slice(0,pe)].length}if(ye(Z,["array"]))return Z.indexOf(D,ie);throw new ti(`Expected second argument to be of type array or string, but found ${Fe(Yr(Z))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class Nr{constructor(S,D,Z,ie,pe,xe){this.inputType=S,this.type=D,this.input=Z,this.cases=ie,this.outputs=pe,this.otherwise=xe}static parse(S,D){if(S.length<5)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return D.error("Expected an even number of arguments.");let Z,ie;D.expectedType&&D.expectedType.kind!=="value"&&(ie=D.expectedType);let pe={},xe=[];for(let wt=2;wtNumber.MAX_SAFE_INTEGER)return pr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Vr=="number"&&Math.floor(Vr)!==Vr)return pr.error("Numeric branch labels must be integer values.");if(Z){if(pr.checkSubtype(Z,Yr(Vr)))return null}else Z=Yr(Vr);if(pe[String(Vr)]!==void 0)return pr.error("Branch labels must be unique.");pe[String(Vr)]=xe.length}let Ar=D.parse(rr,wt,ie);if(!Ar)return null;ie=ie||Ar.type,xe.push(Ar)}let He=D.parse(S[1],1,Vt);if(!He)return null;let at=D.parse(S[S.length-1],S.length-1,ie);return at?He.type.kind!=="value"&&D.concat(1).checkSubtype(Z,He.type)?null:new Nr(Z,ie,He,pe,xe,at):null}evaluate(S){let D=this.input.evaluate(S);return(Yr(D)===this.inputType&&this.outputs[this.cases[D]]||this.otherwise).evaluate(S)}eachChild(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)}outputDefined(){return this.outputs.every(S=>S.outputDefined())&&this.otherwise.outputDefined()}}class hi{constructor(S,D,Z){this.type=S,this.branches=D,this.otherwise=Z}static parse(S,D){if(S.length<4)return D.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return D.error("Expected an odd number of arguments.");let Z;D.expectedType&&D.expectedType.kind!=="value"&&(Z=D.expectedType);let ie=[];for(let xe=1;xeD.outputDefined())&&this.otherwise.outputDefined()}}class Gi{constructor(S,D,Z,ie){this.type=S,this.input=D,this.beginIndex=Z,this.endIndex=ie}static parse(S,D){if(S.length<=2||S.length>=5)return D.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1,Vt),ie=D.parse(S[2],2,rt);if(!Z||!ie)return null;if(!lt(Z.type,[_e(Vt),je,Vt]))return D.error(`Expected first argument to be of type array or string, but found ${Fe(Z.type)} instead`);if(S.length===4){let pe=D.parse(S[3],3,rt);return pe?new Gi(Z.type,Z,ie,pe):null}return new Gi(Z.type,Z,ie)}evaluate(S){let D=this.input.evaluate(S),Z=this.beginIndex.evaluate(S),ie;if(this.endIndex&&(ie=this.endIndex.evaluate(S)),ye(D,["string"]))return[...D].slice(Z,ie).join("");if(ye(D,["array"]))return D.slice(Z,ie);throw new ti(`Expected first argument to be of type array or string, but found ${Fe(Yr(D))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function Qr(I,S){let D=I.length-1,Z,ie,pe=0,xe=D,He=0;for(;pe<=xe;)if(He=Math.floor((pe+xe)/2),Z=I[He],ie=I[He+1],Z<=S){if(He===D||SS))throw new ti("Input is not a number.");xe=He-1}return 0}class Ui{constructor(S,D,Z){this.type=S,this.input=D,this.labels=[],this.outputs=[];for(let[ie,pe]of Z)this.labels.push(ie),this.outputs.push(pe)}static parse(S,D){if(S.length-1<4)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return D.error("Expected an even number of arguments.");let Z=D.parse(S[1],1,rt);if(!Z)return null;let ie=[],pe=null;D.expectedType&&D.expectedType.kind!=="value"&&(pe=D.expectedType);for(let xe=1;xe=He)return D.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',wt);let rr=D.parse(at,Ht,pe);if(!rr)return null;pe=pe||rr.type,ie.push([He,rr])}return new Ui(pe,Z,ie)}evaluate(S){let D=this.labels,Z=this.outputs;if(D.length===1)return Z[0].evaluate(S);let ie=this.input.evaluate(S);if(ie<=D[0])return Z[0].evaluate(S);let pe=D.length;return ie>=D[pe-1]?Z[pe-1].evaluate(S):Z[Qr(D,ie)].evaluate(S)}eachChild(S){S(this.input);for(let D of this.outputs)S(D)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function zn(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}var fn=xn;function xn(I,S,D,Z){this.cx=3*I,this.bx=3*(D-I)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(Z-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=I,this.p1y=S,this.p2x=D,this.p2y=Z}xn.prototype={sampleCurveX:function(I){return((this.ax*I+this.bx)*I+this.cx)*I},sampleCurveY:function(I){return((this.ay*I+this.by)*I+this.cy)*I},sampleCurveDerivativeX:function(I){return(3*this.ax*I+2*this.bx)*I+this.cx},solveCurveX:function(I,S){if(S===void 0&&(S=1e-6),I<0)return 0;if(I>1)return 1;for(var D=I,Z=0;Z<8;Z++){var ie=this.sampleCurveX(D)-I;if(Math.abs(ie)ie?xe=D:He=D,D=.5*(He-xe)+xe;return D},solve:function(I,S){return this.sampleCurveY(this.solveCurveX(I,S))}};var _a=zn(fn);function Wn(I,S,D){return I+D*(S-I)}function Fn(I,S,D){return I.map((Z,ie)=>Wn(Z,S[ie],D))}let ia={number:Wn,color:function(I,S,D,Z="rgb"){switch(Z){case"rgb":{let[ie,pe,xe,He]=Fn(I.rgb,S.rgb,D);return new Bt(ie,pe,xe,He,!1)}case"hcl":{let[ie,pe,xe,He]=I.hcl,[at,wt,Ht,rr]=S.hcl,pr,Ar;if(isNaN(ie)||isNaN(at))isNaN(ie)?isNaN(at)?pr=NaN:(pr=at,xe!==1&&xe!==0||(Ar=wt)):(pr=ie,Ht!==1&&Ht!==0||(Ar=pe));else{let da=at-ie;at>ie&&da>180?da-=360:at180&&(da+=360),pr=ie+D*da}let[Vr,ri,Ii,Zi]=function([da,cn,jn,Va]){return da=isNaN(da)?0:da*Lr,xi([jn,Math.cos(da)*cn,Math.sin(da)*cn,Va])}([pr,Ar!=null?Ar:Wn(pe,wt,D),Wn(xe,Ht,D),Wn(He,rr,D)]);return new Bt(Vr,ri,Ii,Zi,!1)}case"lab":{let[ie,pe,xe,He]=xi(Fn(I.lab,S.lab,D));return new Bt(ie,pe,xe,He,!1)}}},array:Fn,padding:function(I,S,D){return new Tr(Fn(I.values,S.values,D))},variableAnchorOffsetCollection:function(I,S,D){let Z=I.values,ie=S.values;if(Z.length!==ie.length)throw new ti(`Cannot interpolate values of different length. from: ${I.toString()}, to: ${S.toString()}`);let pe=[];for(let xe=0;xetypeof Ht!="number"||Ht<0||Ht>1))return D.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ie={name:"cubic-bezier",controlPoints:wt}}}if(S.length-1<4)return D.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return D.error("Expected an even number of arguments.");if(pe=D.parse(pe,2,rt),!pe)return null;let He=[],at=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?at=Je:D.expectedType&&D.expectedType.kind!=="value"&&(at=D.expectedType);for(let wt=0;wt=Ht)return D.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',pr);let Vr=D.parse(rr,Ar,at);if(!Vr)return null;at=at||Vr.type,He.push([Ht,Vr])}return ue(at,rt)||ue(at,Je)||ue(at,fr)||ue(at,De)||ue(at,_e(rt))?new za(at,Z,ie,pe,He):D.error(`Type ${Fe(at)} is not interpolatable.`)}evaluate(S){let D=this.labels,Z=this.outputs;if(D.length===1)return Z[0].evaluate(S);let ie=this.input.evaluate(S);if(ie<=D[0])return Z[0].evaluate(S);let pe=D.length;if(ie>=D[pe-1])return Z[pe-1].evaluate(S);let xe=Qr(D,ie),He=za.interpolationFactor(this.interpolation,ie,D[xe],D[xe+1]),at=Z[xe].evaluate(S),wt=Z[xe+1].evaluate(S);switch(this.operator){case"interpolate":return ia[this.type.kind](at,wt,He);case"interpolate-hcl":return ia.color(at,wt,He,"hcl");case"interpolate-lab":return ia.color(at,wt,He,"lab")}}eachChild(S){S(this.input);for(let D of this.outputs)S(D)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function Hr(I,S,D,Z){let ie=Z-D,pe=I-D;return ie===0?0:S===1?pe/ie:(Math.pow(S,pe)-1)/(Math.pow(S,ie)-1)}class na{constructor(S,D){this.type=S,this.args=D}static parse(S,D){if(S.length<2)return D.error("Expectected at least one argument.");let Z=null,ie=D.expectedType;ie&&ie.kind!=="value"&&(Z=ie);let pe=[];for(let He of S.slice(1)){let at=D.parse(He,1+pe.length,Z,void 0,{typeAnnotation:"omit"});if(!at)return null;Z=Z||at.type,pe.push(at)}if(!Z)throw new Error("No output type");let xe=ie&&pe.some(He=>Ie(ie,He.type));return new na(xe?Vt:Z,pe)}evaluate(S){let D,Z=null,ie=0;for(let pe of this.args)if(ie++,Z=pe.evaluate(S),Z&&Z instanceof oi&&!Z.available&&(D||(D=Z.name),Z=null,ie===this.args.length&&(Z=D)),Z!==null)break;return Z}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function go(I,S){return I==="=="||I==="!="?S.kind==="boolean"||S.kind==="string"||S.kind==="number"||S.kind==="null"||S.kind==="value":S.kind==="string"||S.kind==="number"||S.kind==="value"}function Dn(I,S,D,Z){return Z.compare(S,D)===0}function un(I,S,D){let Z=I!=="=="&&I!=="!=";return class bGe{constructor(pe,xe,He){this.type=tt,this.lhs=pe,this.rhs=xe,this.collator=He,this.hasUntypedArgument=pe.type.kind==="value"||xe.type.kind==="value"}static parse(pe,xe){if(pe.length!==3&&pe.length!==4)return xe.error("Expected two or three arguments.");let He=pe[0],at=xe.parse(pe[1],1,Vt);if(!at)return null;if(!go(He,at.type))return xe.concat(1).error(`"${He}" comparisons are not supported for type '${Fe(at.type)}'.`);let wt=xe.parse(pe[2],2,Vt);if(!wt)return null;if(!go(He,wt.type))return xe.concat(2).error(`"${He}" comparisons are not supported for type '${Fe(wt.type)}'.`);if(at.type.kind!==wt.type.kind&&at.type.kind!=="value"&&wt.type.kind!=="value")return xe.error(`Cannot compare types '${Fe(at.type)}' and '${Fe(wt.type)}'.`);Z&&(at.type.kind==="value"&&wt.type.kind!=="value"?at=new ji(wt.type,[at]):at.type.kind!=="value"&&wt.type.kind==="value"&&(wt=new ji(at.type,[wt])));let Ht=null;if(pe.length===4){if(at.type.kind!=="string"&&wt.type.kind!=="string"&&at.type.kind!=="value"&&wt.type.kind!=="value")return xe.error("Cannot use collator to compare non-string types.");if(Ht=xe.parse(pe[3],3,Kt),!Ht)return null}return new bGe(at,wt,Ht)}evaluate(pe){let xe=this.lhs.evaluate(pe),He=this.rhs.evaluate(pe);if(Z&&this.hasUntypedArgument){let at=Yr(xe),wt=Yr(He);if(at.kind!==wt.kind||at.kind!=="string"&&at.kind!=="number")throw new ti(`Expected arguments for "${I}" to be (string, string) or (number, number), but found (${at.kind}, ${wt.kind}) instead.`)}if(this.collator&&!Z&&this.hasUntypedArgument){let at=Yr(xe),wt=Yr(He);if(at.kind!=="string"||wt.kind!=="string")return S(pe,xe,He)}return this.collator?D(pe,xe,He,this.collator.evaluate(pe)):S(pe,xe,He)}eachChild(pe){pe(this.lhs),pe(this.rhs),this.collator&&pe(this.collator)}outputDefined(){return!0}}}let Zn=un("==",function(I,S,D){return S===D},Dn),Wo=un("!=",function(I,S,D){return S!==D},function(I,S,D,Z){return!Dn(0,S,D,Z)}),Ba=un("<",function(I,S,D){return S",function(I,S,D){return S>D},function(I,S,D,Z){return Z.compare(S,D)>0}),Ea=un("<=",function(I,S,D){return S<=D},function(I,S,D,Z){return Z.compare(S,D)<=0}),Ha=un(">=",function(I,S,D){return S>=D},function(I,S,D,Z){return Z.compare(S,D)>=0});class tn{constructor(S,D,Z){this.type=Kt,this.locale=Z,this.caseSensitive=S,this.diacriticSensitive=D}static parse(S,D){if(S.length!==2)return D.error("Expected one argument.");let Z=S[1];if(typeof Z!="object"||Array.isArray(Z))return D.error("Collator options argument must be an object.");let ie=D.parse(Z["case-sensitive"]!==void 0&&Z["case-sensitive"],1,tt);if(!ie)return null;let pe=D.parse(Z["diacritic-sensitive"]!==void 0&&Z["diacritic-sensitive"],1,tt);if(!pe)return null;let xe=null;return Z.locale&&(xe=D.parse(Z.locale,1,je),!xe)?null:new tn(ie,pe,xe)}evaluate(S){return new sr(this.caseSensitive.evaluate(S),this.diacriticSensitive.evaluate(S),this.locale?this.locale.evaluate(S):null)}eachChild(S){S(this.caseSensitive),S(this.diacriticSensitive),this.locale&&S(this.locale)}outputDefined(){return!1}}class Cn{constructor(S,D,Z,ie,pe){this.type=je,this.number=S,this.locale=D,this.currency=Z,this.minFractionDigits=ie,this.maxFractionDigits=pe}static parse(S,D){if(S.length!==3)return D.error("Expected two arguments.");let Z=D.parse(S[1],1,rt);if(!Z)return null;let ie=S[2];if(typeof ie!="object"||Array.isArray(ie))return D.error("NumberFormat options argument must be an object.");let pe=null;if(ie.locale&&(pe=D.parse(ie.locale,1,je),!pe))return null;let xe=null;if(ie.currency&&(xe=D.parse(ie.currency,1,je),!xe))return null;let He=null;if(ie["min-fraction-digits"]&&(He=D.parse(ie["min-fraction-digits"],1,rt),!He))return null;let at=null;return ie["max-fraction-digits"]&&(at=D.parse(ie["max-fraction-digits"],1,rt),!at)?null:new Cn(Z,pe,xe,He,at)}evaluate(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))}eachChild(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)}outputDefined(){return!1}}class Xn{constructor(S){this.type=ir,this.sections=S}static parse(S,D){if(S.length<2)return D.error("Expected at least one argument.");let Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return D.error("First argument must be an image or text section.");let ie=[],pe=!1;for(let xe=1;xe<=S.length-1;++xe){let He=S[xe];if(pe&&typeof He=="object"&&!Array.isArray(He)){pe=!1;let at=null;if(He["font-scale"]&&(at=D.parse(He["font-scale"],1,rt),!at))return null;let wt=null;if(He["text-font"]&&(wt=D.parse(He["text-font"],1,_e(je)),!wt))return null;let Ht=null;if(He["text-color"]&&(Ht=D.parse(He["text-color"],1,Je),!Ht))return null;let rr=ie[ie.length-1];rr.scale=at,rr.font=wt,rr.textColor=Ht}else{let at=D.parse(S[xe],1,Vt);if(!at)return null;let wt=at.type.kind;if(wt!=="string"&&wt!=="value"&&wt!=="null"&&wt!=="resolvedImage")return D.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");pe=!0,ie.push({content:at,scale:null,font:null,textColor:null})}}return new Xn(ie)}evaluate(S){return new zr(this.sections.map(D=>{let Z=D.content.evaluate(S);return Yr(Z)===Ot?new br("",Z,null,null,null):new br(Ni(Z),null,D.scale?D.scale.evaluate(S):null,D.font?D.font.evaluate(S).join(","):null,D.textColor?D.textColor.evaluate(S):null)}))}eachChild(S){for(let D of this.sections)S(D.content),D.scale&&S(D.scale),D.font&&S(D.font),D.textColor&&S(D.textColor)}outputDefined(){return!1}}class ts{constructor(S){this.type=Ot,this.input=S}static parse(S,D){if(S.length!==2)return D.error("Expected two arguments.");let Z=D.parse(S[1],1,je);return Z?new ts(Z):D.error("No image name provided.")}evaluate(S){let D=this.input.evaluate(S),Z=oi.fromString(D);return Z&&S.availableImages&&(Z.available=S.availableImages.indexOf(D)>-1),Z}eachChild(S){S(this.input)}outputDefined(){return!1}}class Ja{constructor(S){this.type=rt,this.input=S}static parse(S,D){if(S.length!==2)return D.error(`Expected 1 argument, but found ${S.length-1} instead.`);let Z=D.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?D.error(`Expected argument of type string or array, but found ${Fe(Z.type)} instead.`):new Ja(Z):null}evaluate(S){let D=this.input.evaluate(S);if(typeof D=="string")return[...D].length;if(Array.isArray(D))return D.length;throw new ti(`Expected value to be of type string or array, but found ${Fe(Yr(D))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let to=8192;function Ri(I,S){let D=(180+I[0])/360,Z=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I[1]*Math.PI/360)))/360,ie=Math.pow(2,S.z);return[Math.round(D*ie*to),Math.round(Z*ie*to)]}function an(I,S){let D=Math.pow(2,S.z);return[(ie=(I[0]/to+S.x)/D,360*ie-180),(Z=(I[1]/to+S.y)/D,360/Math.PI*Math.atan(Math.exp((180-360*Z)*Math.PI/180))-90)];var Z,ie}function cs(I,S){I[0]=Math.min(I[0],S[0]),I[1]=Math.min(I[1],S[1]),I[2]=Math.max(I[2],S[0]),I[3]=Math.max(I[3],S[1])}function pa(I,S){return!(I[0]<=S[0]||I[2]>=S[2]||I[1]<=S[1]||I[3]>=S[3])}function ln(I,S,D){let Z=I[0]-S[0],ie=I[1]-S[1],pe=I[0]-D[0],xe=I[1]-D[1];return Z*xe-pe*ie==0&&Z*pe<=0&&ie*xe<=0}function ka(I,S,D,Z){return(ie=[Z[0]-D[0],Z[1]-D[1]])[0]*(pe=[S[0]-I[0],S[1]-I[1]])[1]-ie[1]*pe[0]!=0&&!(!xa(I,S,D,Z)||!xa(D,Z,I,S));var ie,pe}function va(I,S,D){for(let Z of D)for(let ie=0;ie(ie=I)[1]!=(xe=He[at+1])[1]>ie[1]&&ie[0]<(xe[0]-pe[0])*(ie[1]-pe[1])/(xe[1]-pe[1])+pe[0]&&(Z=!Z)}var ie,pe,xe;return Z}function Co(I,S){for(let D of S)if(bo(I,D))return!0;return!1}function Fi(I,S){for(let D of I)if(!bo(D,S))return!1;for(let D=0;D0&&He<0||xe<0&&He>0}function Qi(I,S,D){let Z=[];for(let ie=0;ieD[2]){let ie=.5*Z,pe=I[0]-D[0]>ie?-Z:D[0]-I[0]>ie?Z:0;pe===0&&(pe=I[0]-D[2]>ie?-Z:D[2]-I[0]>ie?Z:0),I[0]+=pe}cs(S,I)}function qa(I,S,D,Z){let ie=Math.pow(2,Z.z)*to,pe=[Z.x*to,Z.y*to],xe=[];for(let He of I)for(let at of He){let wt=[at.x+pe[0],at.y+pe[1]];Pn(wt,S,D,ie),xe.push(wt)}return xe}function jo(I,S,D,Z){let ie=Math.pow(2,Z.z)*to,pe=[Z.x*to,Z.y*to],xe=[];for(let at of I){let wt=[];for(let Ht of at){let rr=[Ht.x+pe[0],Ht.y+pe[1]];cs(S,rr),wt.push(rr)}xe.push(wt)}if(S[2]-S[0]<=ie/2){(He=S)[0]=He[1]=1/0,He[2]=He[3]=-1/0;for(let at of xe)for(let wt of at)Pn(wt,S,D,ie)}var He;return xe}class Vo{constructor(S,D){this.type=tt,this.geojson=S,this.geometries=D}static parse(S,D){if(S.length!==2)return D.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Pi(S[1])){let Z=S[1];if(Z.type==="FeatureCollection"){let ie=[];for(let pe of Z.features){let{type:xe,coordinates:He}=pe.geometry;xe==="Polygon"&&ie.push(He),xe==="MultiPolygon"&&ie.push(...He)}if(ie.length)return new Vo(Z,{type:"MultiPolygon",coordinates:ie})}else if(Z.type==="Feature"){let ie=Z.geometry.type;if(ie==="Polygon"||ie==="MultiPolygon")return new Vo(Z,Z.geometry)}else if(Z.type==="Polygon"||Z.type==="MultiPolygon")return new Vo(Z,Z)}return D.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(D,Z){let ie=[1/0,1/0,-1/0,-1/0],pe=[1/0,1/0,-1/0,-1/0],xe=D.canonicalID();if(Z.type==="Polygon"){let He=Qi(Z.coordinates,pe,xe),at=qa(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!bo(wt,He))return!1}if(Z.type==="MultiPolygon"){let He=Nn(Z.coordinates,pe,xe),at=qa(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Co(wt,He))return!1}return!0}(S,this.geometries);if(S.geometryType()==="LineString")return function(D,Z){let ie=[1/0,1/0,-1/0,-1/0],pe=[1/0,1/0,-1/0,-1/0],xe=D.canonicalID();if(Z.type==="Polygon"){let He=Qi(Z.coordinates,pe,xe),at=jo(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Fi(wt,He))return!1}if(Z.type==="MultiPolygon"){let He=Nn(Z.coordinates,pe,xe),at=jo(D.geometry(),ie,pe,xe);if(!pa(ie,pe))return!1;for(let wt of at)if(!Yn(wt,He))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Pa=class{constructor(I=[],S=(D,Z)=>DZ?1:0){if(this.data=I,this.length=this.data.length,this.compare=S,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(I){this.data.push(I),this._up(this.length++)}pop(){if(this.length===0)return;let I=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),I}peek(){return this.data[0]}_up(I){let{data:S,compare:D}=this,Z=S[I];for(;I>0;){let ie=I-1>>1,pe=S[ie];if(D(Z,pe)>=0)break;S[I]=pe,I=ie}S[I]=Z}_down(I){let{data:S,compare:D}=this,Z=this.length>>1,ie=S[I];for(;I=0)break;S[I]=S[pe],I=pe}S[I]=ie}};function Oa(I,S,D,Z,ie){co(I,S,D,Z||I.length-1,ie||_o)}function co(I,S,D,Z,ie){for(;Z>D;){if(Z-D>600){var pe=Z-D+1,xe=S-D+1,He=Math.log(pe),at=.5*Math.exp(2*He/3),wt=.5*Math.sqrt(He*at*(pe-at)/pe)*(xe-pe/2<0?-1:1);co(I,S,Math.max(D,Math.floor(S-xe*at/pe+wt)),Math.min(Z,Math.floor(S+(pe-xe)*at/pe+wt)),ie)}var Ht=I[S],rr=D,pr=Z;for(An(I,D,S),ie(I[Z],Ht)>0&&An(I,D,Z);rr0;)pr--}ie(I[D],Ht)===0?An(I,D,pr):An(I,++pr,Z),pr<=S&&(D=pr+1),S<=pr&&(Z=pr-1)}}function An(I,S,D){var Z=I[S];I[S]=I[D],I[D]=Z}function _o(I,S){return IS?1:0}function ks(I,S){if(I.length<=1)return[I];let D=[],Z,ie;for(let pe of I){let xe=ps(pe);xe!==0&&(pe.area=Math.abs(xe),ie===void 0&&(ie=xe<0),ie===xe<0?(Z&&D.push(Z),Z=[pe]):Z.push(pe))}if(Z&&D.push(Z),S>1)for(let pe=0;pe1?(wt=S[at+1][0],Ht=S[at+1][1]):Ar>0&&(wt+=rr/this.kx*Ar,Ht+=pr/this.ky*Ar)),rr=this.wrap(D[0]-wt)*this.kx,pr=(D[1]-Ht)*this.ky;let Vr=rr*rr+pr*pr;Vr180;)S-=360;return S}}function on(I,S){return S[0]-I[0]}function mn(I){return I[1]-I[0]+1}function Ga(I,S){return I[1]>=I[0]&&I[1]I[1])return[null,null];let D=mn(I);if(S){if(D===2)return[I,null];let ie=Math.floor(D/2);return[[I[0],I[0]+ie],[I[0]+ie,I[1]]]}if(D===1)return[I,null];let Z=Math.floor(D/2)-1;return[[I[0],I[0]+Z],[I[0]+Z+1,I[1]]]}function bn(I,S){if(!Ga(S,I.length))return[1/0,1/0,-1/0,-1/0];let D=[1/0,1/0,-1/0,-1/0];for(let Z=S[0];Z<=S[1];++Z)cs(D,I[Z]);return D}function Xi(I){let S=[1/0,1/0,-1/0,-1/0];for(let D of I)for(let Z of D)cs(S,Z);return S}function qn(I){return I[0]!==-1/0&&I[1]!==-1/0&&I[2]!==1/0&&I[3]!==1/0}function Ia(I,S,D){if(!qn(I)||!qn(S))return NaN;let Z=0,ie=0;return I[2]S[2]&&(Z=I[0]-S[2]),I[1]>S[3]&&(ie=I[1]-S[3]),I[3]=Z)return Z;if(pa(ie,pe)){if(wo(I,S))return 0}else if(wo(S,I))return 0;let xe=1/0;for(let He of I)for(let at=0,wt=He.length,Ht=wt-1;at0;){let at=xe.pop();if(at[0]>=pe)continue;let wt=at[1],Ht=S?50:100;if(mn(wt)<=Ht){if(!Ga(wt,I.length))return NaN;if(S){let rr=Ln(I,wt,D,Z);if(isNaN(rr)||rr===0)return rr;pe=Math.min(pe,rr)}else for(let rr=wt[0];rr<=wt[1];++rr){let pr=Aa(I[rr],D,Z);if(pe=Math.min(pe,pr),pe===0)return 0}}else{let rr=ca(wt,S);$i(xe,pe,Z,I,He,rr[0]),$i(xe,pe,Z,I,He,rr[1])}}return pe}function Za(I,S,D,Z,ie,pe=1/0){let xe=Math.min(pe,ie.distance(I[0],D[0]));if(xe===0)return xe;let He=new Pa([[0,[0,I.length-1],[0,D.length-1]]],on);for(;He.length>0;){let at=He.pop();if(at[0]>=xe)continue;let wt=at[1],Ht=at[2],rr=S?50:100,pr=Z?50:100;if(mn(wt)<=rr&&mn(Ht)<=pr){if(!Ga(wt,I.length)&&Ga(Ht,D.length))return NaN;let Ar;if(S&&Z)Ar=ba(I,wt,D,Ht,ie),xe=Math.min(xe,Ar);else if(S&&!Z){let Vr=I.slice(wt[0],wt[1]+1);for(let ri=Ht[0];ri<=Ht[1];++ri)if(Ar=yn(D[ri],Vr,ie),xe=Math.min(xe,Ar),xe===0)return xe}else if(!S&&Z){let Vr=D.slice(Ht[0],Ht[1]+1);for(let ri=wt[0];ri<=wt[1];++ri)if(Ar=yn(I[ri],Vr,ie),xe=Math.min(xe,Ar),xe===0)return xe}else Ar=Da(I,wt,D,Ht,ie),xe=Math.min(xe,Ar)}else{let Ar=ca(wt,S),Vr=ca(Ht,Z);ea(He,xe,ie,I,D,Ar[0],Vr[0]),ea(He,xe,ie,I,D,Ar[0],Vr[1]),ea(He,xe,ie,I,D,Ar[1],Vr[0]),ea(He,xe,ie,I,D,Ar[1],Vr[1])}}return xe}function xo(I){return I.type==="MultiPolygon"?I.coordinates.map(S=>({type:"Polygon",coordinates:S})):I.type==="MultiLineString"?I.coordinates.map(S=>({type:"LineString",coordinates:S})):I.type==="MultiPoint"?I.coordinates.map(S=>({type:"Point",coordinates:S})):[I]}class Wa{constructor(S,D){this.type=rt,this.geojson=S,this.geometries=D}static parse(S,D){if(S.length!==2)return D.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Pi(S[1])){let Z=S[1];if(Z.type==="FeatureCollection")return new Wa(Z,Z.features.map(ie=>xo(ie.geometry)).flat());if(Z.type==="Feature")return new Wa(Z,xo(Z.geometry));if("type"in Z&&"coordinates"in Z)return new Wa(Z,xo(Z))}return D.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(D,Z){let ie=D.geometry(),pe=ie.flat().map(at=>an([at.x,at.y],D.canonical));if(ie.length===0)return NaN;let xe=new ya(pe[0][1]),He=1/0;for(let at of Z){switch(at.type){case"Point":He=Math.min(He,Za(pe,!1,[at.coordinates],!1,xe,He));break;case"LineString":He=Math.min(He,Za(pe,!1,at.coordinates,!0,xe,He));break;case"Polygon":He=Math.min(He,Sa(pe,!1,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries);if(S.geometryType()==="LineString")return function(D,Z){let ie=D.geometry(),pe=ie.flat().map(at=>an([at.x,at.y],D.canonical));if(ie.length===0)return NaN;let xe=new ya(pe[0][1]),He=1/0;for(let at of Z){switch(at.type){case"Point":He=Math.min(He,Za(pe,!0,[at.coordinates],!1,xe,He));break;case"LineString":He=Math.min(He,Za(pe,!0,at.coordinates,!0,xe,He));break;case"Polygon":He=Math.min(He,Sa(pe,!0,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries);if(S.geometryType()==="Polygon")return function(D,Z){let ie=D.geometry();if(ie.length===0||ie[0].length===0)return NaN;let pe=ks(ie,0).map(at=>at.map(wt=>wt.map(Ht=>an([Ht.x,Ht.y],D.canonical)))),xe=new ya(pe[0][0][0][1]),He=1/0;for(let at of Z)for(let wt of pe){switch(at.type){case"Point":He=Math.min(He,Sa([at.coordinates],!1,wt,xe,He));break;case"LineString":He=Math.min(He,Sa(at.coordinates,!0,wt,xe,He));break;case"Polygon":He=Math.min(He,wa(wt,at.coordinates,xe,He))}if(He===0)return He}return He}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let hn={"==":Zn,"!=":Wo,">":Bo,"<":Ba,">=":Ha,"<=":Ea,array:ji,at:Wt,boolean:ji,case:hi,coalesce:na,collator:tn,format:Xn,image:ts,in:tr,"index-of":or,interpolate:za,"interpolate-hcl":za,"interpolate-lab":za,length:Ja,let:Or,literal:Ur,match:Nr,number:ji,"number-format":Cn,object:ji,slice:Gi,step:Ui,string:ji,"to-boolean":zi,"to-color":zi,"to-number":zi,"to-string":zi,var:st,within:Vo,distance:Wa};class Un{constructor(S,D,Z,ie){this.name=S,this.type=D,this._evaluate=Z,this.args=ie}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,D){let Z=S[0],ie=Un.definitions[Z];if(!ie)return D.error(`Unknown expression "${Z}". If you wanted a literal array, use ["literal", [...]].`,0);let pe=Array.isArray(ie)?ie[0]:ie.type,xe=Array.isArray(ie)?[[ie[1],ie[2]]]:ie.overloads,He=xe.filter(([wt])=>!Array.isArray(wt)||wt.length===S.length-1),at=null;for(let[wt,Ht]of He){at=new fi(D.registry,vo,D.path,null,D.scope);let rr=[],pr=!1;for(let Ar=1;Ar{return pr=rr,Array.isArray(pr)?`(${pr.map(Fe).join(", ")})`:`(${Fe(pr.type)}...)`;var pr}).join(" | "),Ht=[];for(let rr=1;rr{D=S?D&&vo(Z):D&&Z instanceof Ur}),!!D&&ma(I)&&To(I,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ma(I){if(I instanceof Un&&(I.name==="get"&&I.args.length===1||I.name==="feature-state"||I.name==="has"&&I.args.length===1||I.name==="properties"||I.name==="geometry-type"||I.name==="id"||/^filter-/.test(I.name))||I instanceof Vo||I instanceof Wa)return!1;let S=!0;return I.eachChild(D=>{S&&!ma(D)&&(S=!1)}),S}function ja(I){if(I instanceof Un&&I.name==="feature-state")return!1;let S=!0;return I.eachChild(D=>{S&&!ja(D)&&(S=!1)}),S}function To(I,S){if(I instanceof Un&&S.indexOf(I.name)>=0)return!1;let D=!0;return I.eachChild(Z=>{D&&!To(Z,S)&&(D=!1)}),D}function Ao(I){return{result:"success",value:I}}function la(I){return{result:"error",value:I}}function Ki(I){return I["property-type"]==="data-driven"||I["property-type"]==="cross-faded-data-driven"}function ho(I){return!!I.expression&&I.expression.parameters.indexOf("zoom")>-1}function Ka(I){return!!I.expression&&I.expression.interpolated}function Ca(I){return I instanceof Number?"number":I instanceof String?"string":I instanceof Boolean?"boolean":Array.isArray(I)?"array":I===null?"null":typeof I}function ta(I){return typeof I=="object"&&I!==null&&!Array.isArray(I)}function En(I){return I}function Mo(I,S){let D=S.type==="color",Z=I.stops&&typeof I.stops[0][0]=="object",ie=Z||!(Z||I.property!==void 0),pe=I.type||(Ka(S)?"exponential":"interval");if(D||S.type==="padding"){let Ht=D?Bt.parse:Tr.parse;(I=Te({},I)).stops&&(I.stops=I.stops.map(rr=>[rr[0],Ht(rr[1])])),I.default=Ht(I.default?I.default:S.default)}if(I.colorSpace&&(xe=I.colorSpace)!=="rgb"&&xe!=="hcl"&&xe!=="lab")throw new Error(`Unknown color space: "${I.colorSpace}"`);var xe;let He,at,wt;if(pe==="exponential")He=Ks;else if(pe==="interval")He=vs;else if(pe==="categorical"){He=Ro,at=Object.create(null);for(let Ht of I.stops)at[Ht[0]]=Ht[1];wt=typeof I.stops[0][0]}else{if(pe!=="identity")throw new Error(`Unknown function type "${pe}"`);He=as}if(Z){let Ht={},rr=[];for(let Vr=0;VrVr[0]),evaluate:({zoom:Vr},ri)=>Ks({stops:pr,base:I.base},S,Vr).evaluate(Vr,ri)}}if(ie){let Ht=pe==="exponential"?{name:"exponential",base:I.base!==void 0?I.base:1}:null;return{kind:"camera",interpolationType:Ht,interpolationFactor:za.interpolationFactor.bind(void 0,Ht),zoomStops:I.stops.map(rr=>rr[0]),evaluate:({zoom:rr})=>He(I,S,rr,at,wt)}}return{kind:"source",evaluate(Ht,rr){let pr=rr&&rr.properties?rr.properties[I.property]:void 0;return pr===void 0?Ds(I.default,S.default):He(I,S,pr,at,wt)}}}function Ds(I,S,D){return I!==void 0?I:S!==void 0?S:D!==void 0?D:void 0}function Ro(I,S,D,Z,ie){return Ds(typeof D===ie?Z[D]:void 0,I.default,S.default)}function vs(I,S,D){if(Ca(D)!=="number")return Ds(I.default,S.default);let Z=I.stops.length;if(Z===1||D<=I.stops[0][0])return I.stops[0][1];if(D>=I.stops[Z-1][0])return I.stops[Z-1][1];let ie=Qr(I.stops.map(pe=>pe[0]),D);return I.stops[ie][1]}function Ks(I,S,D){let Z=I.base!==void 0?I.base:1;if(Ca(D)!=="number")return Ds(I.default,S.default);let ie=I.stops.length;if(ie===1||D<=I.stops[0][0])return I.stops[0][1];if(D>=I.stops[ie-1][0])return I.stops[ie-1][1];let pe=Qr(I.stops.map(Ht=>Ht[0]),D),xe=function(Ht,rr,pr,Ar){let Vr=Ar-pr,ri=Ht-pr;return Vr===0?0:rr===1?ri/Vr:(Math.pow(rr,ri)-1)/(Math.pow(rr,Vr)-1)}(D,Z,I.stops[pe][0],I.stops[pe+1][0]),He=I.stops[pe][1],at=I.stops[pe+1][1],wt=ia[S.type]||En;return typeof He.evaluate=="function"?{evaluate(...Ht){let rr=He.evaluate.apply(void 0,Ht),pr=at.evaluate.apply(void 0,Ht);if(rr!==void 0&&pr!==void 0)return wt(rr,pr,xe,I.colorSpace)}}:wt(He,at,xe,I.colorSpace)}function as(I,S,D){switch(S.type){case"color":D=Bt.parse(D);break;case"formatted":D=zr.fromString(D.toString());break;case"resolvedImage":D=oi.fromString(D.toString());break;case"padding":D=Tr.parse(D);break;default:Ca(D)===S.type||S.type==="enum"&&S.values[D]||(D=void 0)}return Ds(D,I.default,S.default)}Un.register(hn,{error:[{kind:"error"},[je],(I,[S])=>{throw new ti(S.evaluate(I))}],typeof:[je,[Vt],(I,[S])=>Fe(Yr(S.evaluate(I)))],"to-rgba":[_e(rt,4),[Je],(I,[S])=>{let[D,Z,ie,pe]=S.evaluate(I).rgb;return[255*D,255*Z,255*ie,pe]}],rgb:[Je,[rt,rt,rt],Ss],rgba:[Je,[rt,rt,rt,rt],Ss],has:{type:tt,overloads:[[[je],(I,[S])=>Kn(S.evaluate(I),I.properties())],[[je,Mt],(I,[S,D])=>Kn(S.evaluate(I),D.evaluate(I))]]},get:{type:Vt,overloads:[[[je],(I,[S])=>ns(S.evaluate(I),I.properties())],[[je,Mt],(I,[S,D])=>ns(S.evaluate(I),D.evaluate(I))]]},"feature-state":[Vt,[je],(I,[S])=>ns(S.evaluate(I),I.featureState||{})],properties:[Mt,[],I=>I.properties()],"geometry-type":[je,[],I=>I.geometryType()],id:[Vt,[],I=>I.id()],zoom:[rt,[],I=>I.globals.zoom],"heatmap-density":[rt,[],I=>I.globals.heatmapDensity||0],"line-progress":[rt,[],I=>I.globals.lineProgress||0],accumulated:[Vt,[],I=>I.globals.accumulated===void 0?null:I.globals.accumulated],"+":[rt,Jo(rt),(I,S)=>{let D=0;for(let Z of S)D+=Z.evaluate(I);return D}],"*":[rt,Jo(rt),(I,S)=>{let D=1;for(let Z of S)D*=Z.evaluate(I);return D}],"-":{type:rt,overloads:[[[rt,rt],(I,[S,D])=>S.evaluate(I)-D.evaluate(I)],[[rt],(I,[S])=>-S.evaluate(I)]]},"/":[rt,[rt,rt],(I,[S,D])=>S.evaluate(I)/D.evaluate(I)],"%":[rt,[rt,rt],(I,[S,D])=>S.evaluate(I)%D.evaluate(I)],ln2:[rt,[],()=>Math.LN2],pi:[rt,[],()=>Math.PI],e:[rt,[],()=>Math.E],"^":[rt,[rt,rt],(I,[S,D])=>Math.pow(S.evaluate(I),D.evaluate(I))],sqrt:[rt,[rt],(I,[S])=>Math.sqrt(S.evaluate(I))],log10:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))/Math.LN10],ln:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))],log2:[rt,[rt],(I,[S])=>Math.log(S.evaluate(I))/Math.LN2],sin:[rt,[rt],(I,[S])=>Math.sin(S.evaluate(I))],cos:[rt,[rt],(I,[S])=>Math.cos(S.evaluate(I))],tan:[rt,[rt],(I,[S])=>Math.tan(S.evaluate(I))],asin:[rt,[rt],(I,[S])=>Math.asin(S.evaluate(I))],acos:[rt,[rt],(I,[S])=>Math.acos(S.evaluate(I))],atan:[rt,[rt],(I,[S])=>Math.atan(S.evaluate(I))],min:[rt,Jo(rt),(I,S)=>Math.min(...S.map(D=>D.evaluate(I)))],max:[rt,Jo(rt),(I,S)=>Math.max(...S.map(D=>D.evaluate(I)))],abs:[rt,[rt],(I,[S])=>Math.abs(S.evaluate(I))],round:[rt,[rt],(I,[S])=>{let D=S.evaluate(I);return D<0?-Math.round(-D):Math.round(D)}],floor:[rt,[rt],(I,[S])=>Math.floor(S.evaluate(I))],ceil:[rt,[rt],(I,[S])=>Math.ceil(S.evaluate(I))],"filter-==":[tt,[je,Vt],(I,[S,D])=>I.properties()[S.value]===D.value],"filter-id-==":[tt,[Vt],(I,[S])=>I.id()===S.value],"filter-type-==":[tt,[je],(I,[S])=>I.geometryType()===S.value],"filter-<":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z>ie}],"filter-id->":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D>Z}],"filter-<=":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z<=ie}],"filter-id-<=":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D<=Z}],"filter->=":[tt,[je,Vt],(I,[S,D])=>{let Z=I.properties()[S.value],ie=D.value;return typeof Z==typeof ie&&Z>=ie}],"filter-id->=":[tt,[Vt],(I,[S])=>{let D=I.id(),Z=S.value;return typeof D==typeof Z&&D>=Z}],"filter-has":[tt,[Vt],(I,[S])=>S.value in I.properties()],"filter-has-id":[tt,[],I=>I.id()!==null&&I.id()!==void 0],"filter-type-in":[tt,[_e(je)],(I,[S])=>S.value.indexOf(I.geometryType())>=0],"filter-id-in":[tt,[_e(Vt)],(I,[S])=>S.value.indexOf(I.id())>=0],"filter-in-small":[tt,[je,_e(Vt)],(I,[S,D])=>D.value.indexOf(I.properties()[S.value])>=0],"filter-in-large":[tt,[je,_e(Vt)],(I,[S,D])=>function(Z,ie,pe,xe){for(;pe<=xe;){let He=pe+xe>>1;if(ie[He]===Z)return!0;ie[He]>Z?xe=He-1:pe=He+1}return!1}(I.properties()[S.value],D.value,0,D.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(I,[S,D])=>S.evaluate(I)&&D.evaluate(I)],[Jo(tt),(I,S)=>{for(let D of S)if(!D.evaluate(I))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(I,[S,D])=>S.evaluate(I)||D.evaluate(I)],[Jo(tt),(I,S)=>{for(let D of S)if(D.evaluate(I))return!0;return!1}]]},"!":[tt,[tt],(I,[S])=>!S.evaluate(I)],"is-supported-script":[tt,[je],(I,[S])=>{let D=I.globals&&I.globals.isSupportedScript;return!D||D(S.evaluate(I))}],upcase:[je,[je],(I,[S])=>S.evaluate(I).toUpperCase()],downcase:[je,[je],(I,[S])=>S.evaluate(I).toLowerCase()],concat:[je,Jo(Vt),(I,S)=>S.map(D=>Ni(D.evaluate(I))).join("")],"resolved-locale":[je,[Kt],(I,[S])=>S.evaluate(I).resolvedLocale()]});class Jn{constructor(S,D){var Z;this.expression=S,this._warningHistory={},this._evaluator=new sn,this._defaultValue=D?(Z=D).type==="color"&&ta(Z.default)?new Bt(0,0,0,0):Z.type==="color"?Bt.parse(Z.default)||null:Z.type==="padding"?Tr.parse(Z.default)||null:Z.type==="variableAnchorOffsetCollection"?Br.parse(Z.default)||null:Z.default===void 0?null:Z.default:null,this._enumValues=D&&D.type==="enum"?D.values:null}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._evaluator.globals=S,this._evaluator.feature=D,this._evaluator.featureState=Z,this._evaluator.canonical=ie,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe,this.expression.evaluate(this._evaluator)}evaluate(S,D,Z,ie,pe,xe){this._evaluator.globals=S,this._evaluator.feature=D||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=ie,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe||null;try{let He=this.expression.evaluate(this._evaluator);if(He==null||typeof He=="number"&&He!=He)return this._defaultValue;if(this._enumValues&&!(He in this._enumValues))throw new ti(`Expected value to be one of ${Object.keys(this._enumValues).map(at=>JSON.stringify(at)).join(", ")}, but found ${JSON.stringify(He)} instead.`);return He}catch(He){return this._warningHistory[He.message]||(this._warningHistory[He.message]=!0,typeof console!="undefined"&&console.warn(He.message)),this._defaultValue}}}function Cs(I){return Array.isArray(I)&&I.length>0&&typeof I[0]=="string"&&I[0]in hn}function Xa(I,S){let D=new fi(hn,vo,[],S?function(ie){let pe={color:Je,string:je,number:rt,enum:je,boolean:tt,formatted:ir,padding:fr,resolvedImage:Ot,variableAnchorOffsetCollection:De};return ie.type==="array"?_e(pe[ie.value]||Vt,ie.length):pe[ie.type]}(S):void 0),Z=D.parse(I,void 0,void 0,void 0,S&&S.type==="string"?{typeAnnotation:"coerce"}:void 0);return Z?Ao(new Jn(Z,S)):la(D.errors)}class Zo{constructor(S,D){this.kind=S,this._styleExpression=D,this.isStateDependent=S!=="constant"&&!ja(D.expression)}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe)}evaluate(S,D,Z,ie,pe,xe){return this._styleExpression.evaluate(S,D,Z,ie,pe,xe)}}class Eo{constructor(S,D,Z,ie){this.kind=S,this.zoomStops=Z,this._styleExpression=D,this.isStateDependent=S!=="camera"&&!ja(D.expression),this.interpolationType=ie}evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(S,D,Z,ie,pe,xe)}evaluate(S,D,Z,ie,pe,xe){return this._styleExpression.evaluate(S,D,Z,ie,pe,xe)}interpolationFactor(S,D,Z){return this.interpolationType?za.interpolationFactor(this.interpolationType,S,D,Z):0}}function lo(I,S){let D=Xa(I,S);if(D.result==="error")return D;let Z=D.value.expression,ie=ma(Z);if(!ie&&!Ki(S))return la([new nt("","data expressions not supported")]);let pe=To(Z,["zoom"]);if(!pe&&!ho(S))return la([new nt("","zoom expressions not supported")]);let xe=Xo(Z);return xe||pe?xe instanceof nt?la([xe]):xe instanceof za&&!Ka(S)?la([new nt("",'"interpolate" expressions cannot be used with this property')]):Ao(xe?new Eo(ie?"camera":"composite",D.value,xe.labels,xe instanceof za?xe.interpolation:void 0):new Zo(ie?"constant":"source",D.value)):la([new nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class $a{constructor(S,D){this._parameters=S,this._specification=D,Te(this,Mo(this._parameters,this._specification))}static deserialize(S){return new $a(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function Xo(I){let S=null;if(I instanceof Or)S=Xo(I.result);else if(I instanceof na){for(let D of I.args)if(S=Xo(D),S)break}else(I instanceof Ui||I instanceof za)&&I.input instanceof Un&&I.input.name==="zoom"&&(S=I);return S instanceof nt||I.eachChild(D=>{let Z=Xo(D);Z instanceof nt?S=Z:!S&&Z?S=new nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):S&&Z&&S!==Z&&(S=new nt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),S}function rs(I){if(I===!0||I===!1)return!0;if(!Array.isArray(I)||I.length===0)return!1;switch(I[0]){case"has":return I.length>=2&&I[1]!=="$id"&&I[1]!=="$type";case"in":return I.length>=3&&(typeof I[1]!="string"||Array.isArray(I[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return I.length!==3||Array.isArray(I[1])||Array.isArray(I[2]);case"any":case"all":for(let S of I.slice(1))if(!rs(S)&&typeof S!="boolean")return!1;return!0;default:return!0}}let $n={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Sn(I){if(I==null)return{filter:()=>!0,needGeometry:!1};rs(I)||(I=xs(I));let S=Xa(I,$n);if(S.result==="error")throw new Error(S.value.map(D=>`${D.key}: ${D.message}`).join(", "));return{filter:(D,Z,ie)=>S.value.evaluate(D,Z,{},ie),needGeometry:Rs(I)}}function uo(I,S){return IS?1:0}function Rs(I){if(!Array.isArray(I))return!1;if(I[0]==="within"||I[0]==="distance")return!0;for(let S=1;S"||S==="<="||S===">="?Go(I[1],I[2],S):S==="any"?(D=I.slice(1),["any"].concat(D.map(xs))):S==="all"?["all"].concat(I.slice(1).map(xs)):S==="none"?["all"].concat(I.slice(1).map(xs).map(Qn)):S==="in"?os(I[1],I.slice(2)):S==="!in"?Qn(os(I[1],I.slice(2))):S==="has"?So(I[1]):S!=="!has"||Qn(So(I[1]));var D}function Go(I,S,D){switch(I){case"$type":return[`filter-type-${D}`,S];case"$id":return[`filter-id-${D}`,S];default:return[`filter-${D}`,I,S]}}function os(I,S){if(S.length===0)return!1;switch(I){case"$type":return["filter-type-in",["literal",S]];case"$id":return["filter-id-in",["literal",S]];default:return S.length>200&&!S.some(D=>typeof D!=typeof S[0])?["filter-in-large",I,["literal",S.sort(uo)]]:["filter-in-small",I,["literal",S]]}}function So(I){switch(I){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",I]}}function Qn(I){return["!",I]}function zo(I){let S=typeof I;if(S==="number"||S==="boolean"||S==="string"||I==null)return JSON.stringify(I);if(Array.isArray(I)){let ie="[";for(let pe of I)ie+=`${zo(pe)},`;return`${ie}]`}let D=Object.keys(I).sort(),Z="{";for(let ie=0;ieZ.maximum?[new At(S,D,`${D} is greater than the maximum value ${Z.maximum}`)]:[]}function Ma(I){let S=I.valueSpec,D=Na(I.value.type),Z,ie,pe,xe={},He=D!=="categorical"&&I.value.property===void 0,at=!He,wt=Ca(I.value.stops)==="array"&&Ca(I.value.stops[0])==="array"&&Ca(I.value.stops[0][0])==="object",Ht=Po({key:I.key,value:I.value,valueSpec:I.styleSpec.function,validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{stops:function(Ar){if(D==="identity")return[new At(Ar.key,Ar.value,'identity function may not have a "stops" property')];let Vr=[],ri=Ar.value;return Vr=Vr.concat(fo({key:Ar.key,value:ri,valueSpec:Ar.valueSpec,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec,arrayElementValidator:rr})),Ca(ri)==="array"&&ri.length===0&&Vr.push(new At(Ar.key,ri,"array must have at least one stop")),Vr},default:function(Ar){return Ar.validateSpec({key:Ar.key,value:Ar.value,valueSpec:S,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec})}}});return D==="identity"&&He&&Ht.push(new At(I.key,I.value,'missing required property "property"')),D==="identity"||I.value.stops||Ht.push(new At(I.key,I.value,'missing required property "stops"')),D==="exponential"&&I.valueSpec.expression&&!Ka(I.valueSpec)&&Ht.push(new At(I.key,I.value,"exponential functions not supported")),I.styleSpec.$version>=8&&(at&&!Ki(I.valueSpec)?Ht.push(new At(I.key,I.value,"property functions not supported")):He&&!ho(I.valueSpec)&&Ht.push(new At(I.key,I.value,"zoom functions not supported"))),D!=="categorical"&&!wt||I.value.property!==void 0||Ht.push(new At(I.key,I.value,'"property" property is required')),Ht;function rr(Ar){let Vr=[],ri=Ar.value,Ii=Ar.key;if(Ca(ri)!=="array")return[new At(Ii,ri,`array expected, ${Ca(ri)} found`)];if(ri.length!==2)return[new At(Ii,ri,`array length 2 expected, length ${ri.length} found`)];if(wt){if(Ca(ri[0])!=="object")return[new At(Ii,ri,`object expected, ${Ca(ri[0])} found`)];if(ri[0].zoom===void 0)return[new At(Ii,ri,"object stop key must have zoom")];if(ri[0].value===void 0)return[new At(Ii,ri,"object stop key must have value")];if(pe&&pe>Na(ri[0].zoom))return[new At(Ii,ri[0].zoom,"stop zoom values must appear in ascending order")];Na(ri[0].zoom)!==pe&&(pe=Na(ri[0].zoom),ie=void 0,xe={}),Vr=Vr.concat(Po({key:`${Ii}[0]`,value:ri[0],valueSpec:{zoom:{}},validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec,objectElementValidators:{zoom:ro,value:pr}}))}else Vr=Vr.concat(pr({key:`${Ii}[0]`,value:ri[0],valueSpec:{},validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec},ri));return Cs(Ua(ri[1]))?Vr.concat([new At(`${Ii}[1]`,ri[1],"expressions are not allowed in function stops.")]):Vr.concat(Ar.validateSpec({key:`${Ii}[1]`,value:ri[1],valueSpec:S,validateSpec:Ar.validateSpec,style:Ar.style,styleSpec:Ar.styleSpec}))}function pr(Ar,Vr){let ri=Ca(Ar.value),Ii=Na(Ar.value),Zi=Ar.value!==null?Ar.value:Vr;if(Z){if(ri!==Z)return[new At(Ar.key,Zi,`${ri} stop domain type must match previous stop domain type ${Z}`)]}else Z=ri;if(ri!=="number"&&ri!=="string"&&ri!=="boolean")return[new At(Ar.key,Zi,"stop domain value must be a number, string, or boolean")];if(ri!=="number"&&D!=="categorical"){let da=`number expected, ${ri} found`;return Ki(S)&&D===void 0&&(da+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(Ar.key,Zi,da)]}return D!=="categorical"||ri!=="number"||isFinite(Ii)&&Math.floor(Ii)===Ii?D!=="categorical"&&ri==="number"&&ie!==void 0&&Iinew At(`${I.key}${Z.key}`,I.value,Z.message));let D=S.value.expression||S.value._styleExpression.expression;if(I.expressionContext==="property"&&I.propertyKey==="text-font"&&!D.outputDefined())return[new At(I.key,I.value,`Invalid data expression for "${I.propertyKey}". Output values must be contained as literals within the expression.`)];if(I.expressionContext==="property"&&I.propertyType==="layout"&&!ja(D))return[new At(I.key,I.value,'"feature-state" data expressions are not supported with layout properties.')];if(I.expressionContext==="filter"&&!ja(D))return[new At(I.key,I.value,'"feature-state" data expressions are not supported with filters.')];if(I.expressionContext&&I.expressionContext.indexOf("cluster")===0){if(!To(D,["zoom","feature-state"]))return[new At(I.key,I.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(I.expressionContext==="cluster-initial"&&!ma(D))return[new At(I.key,I.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function aa(I){let S=I.key,D=I.value,Z=I.valueSpec,ie=[];return Array.isArray(Z.values)?Z.values.indexOf(Na(D))===-1&&ie.push(new At(S,D,`expected one of [${Z.values.join(", ")}], ${JSON.stringify(D)} found`)):Object.keys(Z.values).indexOf(Na(D))===-1&&ie.push(new At(S,D,`expected one of [${Object.keys(Z.values).join(", ")}], ${JSON.stringify(D)} found`)),ie}function Oo(I){return rs(Ua(I.value))?io(Te({},I,{expressionContext:"filter",valueSpec:{value:"boolean"}})):No(I)}function No(I){let S=I.value,D=I.key;if(Ca(S)!=="array")return[new At(D,S,`array expected, ${Ca(S)} found`)];let Z=I.styleSpec,ie,pe=[];if(S.length<1)return[new At(D,S,"filter array must have at least 1 element")];switch(pe=pe.concat(aa({key:`${D}[0]`,value:S[0],valueSpec:Z.filter_operator,style:I.style,styleSpec:I.styleSpec})),Na(S[0])){case"<":case"<=":case">":case">=":S.length>=2&&Na(S[1])==="$type"&&pe.push(new At(D,S,`"$type" cannot be use with operator "${S[0]}"`));case"==":case"!=":S.length!==3&&pe.push(new At(D,S,`filter array for operator "${S[0]}" must have 3 elements`));case"in":case"!in":S.length>=2&&(ie=Ca(S[1]),ie!=="string"&&pe.push(new At(`${D}[1]`,S[1],`string expected, ${ie} found`)));for(let xe=2;xe{wt in D&&S.push(new At(Z,D[wt],`"${wt}" is prohibited for ref layers`))}),ie.layers.forEach(wt=>{Na(wt.id)===He&&(at=wt)}),at?at.ref?S.push(new At(Z,D.ref,"ref cannot reference another ref layer")):xe=Na(at.type):S.push(new At(Z,D.ref,`ref layer "${He}" not found`))}else if(xe!=="background")if(D.source){let at=ie.sources&&ie.sources[D.source],wt=at&&Na(at.type);at?wt==="vector"&&xe==="raster"?S.push(new At(Z,D.source,`layer "${D.id}" requires a raster source`)):wt!=="raster-dem"&&xe==="hillshade"?S.push(new At(Z,D.source,`layer "${D.id}" requires a raster-dem source`)):wt==="raster"&&xe!=="raster"?S.push(new At(Z,D.source,`layer "${D.id}" requires a vector source`)):wt!=="vector"||D["source-layer"]?wt==="raster-dem"&&xe!=="hillshade"?S.push(new At(Z,D.source,"raster-dem source can only be used with layer type 'hillshade'.")):xe!=="line"||!D.paint||!D.paint["line-gradient"]||wt==="geojson"&&at.lineMetrics||S.push(new At(Z,D,`layer "${D.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):S.push(new At(Z,D,`layer "${D.id}" must specify a "source-layer"`)):S.push(new At(Z,D.source,`source "${D.source}" not found`))}else S.push(new At(Z,D,'missing required property "source"'));return S=S.concat(Po({key:Z,value:D,valueSpec:pe.layer,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,objectElementValidators:{"*":()=>[],type:()=>I.validateSpec({key:`${Z}.type`,value:D.type,valueSpec:pe.layer.type,style:I.style,styleSpec:I.styleSpec,validateSpec:I.validateSpec,object:D,objectKey:"type"}),filter:Oo,layout:at=>Po({layer:D,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":wt=>ws(Te({layerType:xe},wt))}}),paint:at=>Po({layer:D,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":wt=>Fs(Te({layerType:xe},wt))}})}})),S}function Ls(I){let S=I.value,D=I.key,Z=Ca(S);return Z!=="string"?[new At(D,S,`string expected, ${Z} found`)]:[]}let ds={promoteId:function({key:I,value:S}){if(Ca(S)==="string")return Ls({key:I,value:S});{let D=[];for(let Z in S)D.push(...Ls({key:`${I}.${Z}`,value:S[Z]}));return D}}};function Xs(I){let S=I.value,D=I.key,Z=I.styleSpec,ie=I.style,pe=I.validateSpec;if(!S.type)return[new At(D,S,'"type" is required')];let xe=Na(S.type),He;switch(xe){case"vector":case"raster":return He=Po({key:D,value:S,valueSpec:Z[`source_${xe.replace("-","_")}`],style:I.style,styleSpec:Z,objectElementValidators:ds,validateSpec:pe}),He;case"raster-dem":return He=function(at){var wt;let Ht=(wt=at.sourceName)!==null&&wt!==void 0?wt:"",rr=at.value,pr=at.styleSpec,Ar=pr.source_raster_dem,Vr=at.style,ri=[],Ii=Ca(rr);if(rr===void 0)return ri;if(Ii!=="object")return ri.push(new At("source_raster_dem",rr,`object expected, ${Ii} found`)),ri;let Zi=Na(rr.encoding)==="custom",da=["redFactor","greenFactor","blueFactor","baseShift"],cn=at.value.encoding?`"${at.value.encoding}"`:"Default";for(let jn in rr)!Zi&&da.includes(jn)?ri.push(new At(jn,rr[jn],`In "${Ht}": "${jn}" is only valid when "encoding" is set to "custom". ${cn} encoding found`)):Ar[jn]?ri=ri.concat(at.validateSpec({key:jn,value:rr[jn],valueSpec:Ar[jn],validateSpec:at.validateSpec,style:Vr,styleSpec:pr})):ri.push(new At(jn,rr[jn],`unknown property "${jn}"`));return ri}({sourceName:D,value:S,style:I.style,styleSpec:Z,validateSpec:pe}),He;case"geojson":if(He=Po({key:D,value:S,valueSpec:Z.source_geojson,style:ie,styleSpec:Z,validateSpec:pe,objectElementValidators:ds}),S.cluster)for(let at in S.clusterProperties){let[wt,Ht]=S.clusterProperties[at],rr=typeof wt=="string"?[wt,["accumulated"],["get",at]]:wt;He.push(...io({key:`${D}.${at}.map`,value:Ht,validateSpec:pe,expressionContext:"cluster-map"})),He.push(...io({key:`${D}.${at}.reduce`,value:rr,validateSpec:pe,expressionContext:"cluster-reduce"}))}return He;case"video":return Po({key:D,value:S,valueSpec:Z.source_video,style:ie,validateSpec:pe,styleSpec:Z});case"image":return Po({key:D,value:S,valueSpec:Z.source_image,style:ie,validateSpec:pe,styleSpec:Z});case"canvas":return[new At(D,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return aa({key:`${D}.type`,value:S.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ie,validateSpec:pe,styleSpec:Z})}}function oa(I){let S=I.value,D=I.styleSpec,Z=D.light,ie=I.style,pe=[],xe=Ca(S);if(S===void 0)return pe;if(xe!=="object")return pe=pe.concat([new At("light",S,`object expected, ${xe} found`)]),pe;for(let He in S){let at=He.match(/^(.*)-transition$/);pe=pe.concat(at&&Z[at[1]]&&Z[at[1]].transition?I.validateSpec({key:He,value:S[He],valueSpec:D.transition,validateSpec:I.validateSpec,style:ie,styleSpec:D}):Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],validateSpec:I.validateSpec,style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)])}return pe}function Yo(I){let S=I.value,D=I.styleSpec,Z=D.sky,ie=I.style,pe=Ca(S);if(S===void 0)return[];if(pe!=="object")return[new At("sky",S,`object expected, ${pe} found`)];let xe=[];for(let He in S)xe=xe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return xe}function po(I){let S=I.value,D=I.styleSpec,Z=D.terrain,ie=I.style,pe=[],xe=Ca(S);if(S===void 0)return pe;if(xe!=="object")return pe=pe.concat([new At("terrain",S,`object expected, ${xe} found`)]),pe;for(let He in S)pe=pe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],validateSpec:I.validateSpec,style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return pe}function ss(I){let S=[],D=I.value,Z=I.key;if(Array.isArray(D)){let ie=[],pe=[];for(let xe in D)D[xe].id&&ie.includes(D[xe].id)&&S.push(new At(Z,D,`all the sprites' ids must be unique, but ${D[xe].id} is duplicated`)),ie.push(D[xe].id),D[xe].url&&pe.includes(D[xe].url)&&S.push(new At(Z,D,`all the sprites' URLs must be unique, but ${D[xe].url} is duplicated`)),pe.push(D[xe].url),S=S.concat(Po({key:`${Z}[${xe}]`,value:D[xe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:I.validateSpec}));return S}return Ls({key:Z,value:D})}let ls={"*":()=>[],array:fo,boolean:function(I){let S=I.value,D=I.key,Z=Ca(S);return Z!=="boolean"?[new At(D,S,`boolean expected, ${Z} found`)]:[]},number:ro,color:function(I){let S=I.key,D=I.value,Z=Ca(D);return Z!=="string"?[new At(S,D,`color expected, ${Z} found`)]:Bt.parse(String(D))?[]:[new At(S,D,`color expected, "${D}" found`)]},constants:$o,enum:aa,filter:Oo,function:Ma,layer:no,object:Po,source:Xs,light:oa,sky:Yo,terrain:po,projection:function(I){let S=I.value,D=I.styleSpec,Z=D.projection,ie=I.style,pe=Ca(S);if(S===void 0)return[];if(pe!=="object")return[new At("projection",S,`object expected, ${pe} found`)];let xe=[];for(let He in S)xe=xe.concat(Z[He]?I.validateSpec({key:He,value:S[He],valueSpec:Z[He],style:ie,styleSpec:D}):[new At(He,S[He],`unknown property "${He}"`)]);return xe},string:Ls,formatted:function(I){return Ls(I).length===0?[]:io(I)},resolvedImage:function(I){return Ls(I).length===0?[]:io(I)},padding:function(I){let S=I.key,D=I.value;if(Ca(D)==="array"){if(D.length<1||D.length>4)return[new At(S,D,`padding requires 1 to 4 values; ${D.length} values found`)];let Z={type:"number"},ie=[];for(let pe=0;pe[]}})),I.constants&&(D=D.concat($o({key:"constants",value:I.constants,style:I,styleSpec:S,validateSpec:gs}))),nr(D)}function hr(I){return function(S){return I(lee(see({},S),{validateSpec:gs}))}}function nr(I){return[].concat(I).sort((S,D)=>S.line-D.line)}function Sr(I){return function(...S){return nr(I.apply(this,S))}}Ft.source=Sr(hr(Xs)),Ft.sprite=Sr(hr(ss)),Ft.glyphs=Sr(hr(bt)),Ft.light=Sr(hr(oa)),Ft.sky=Sr(hr(Yo)),Ft.terrain=Sr(hr(po)),Ft.layer=Sr(hr(no)),Ft.filter=Sr(hr(Oo)),Ft.paintProperty=Sr(hr(Fs)),Ft.layoutProperty=Sr(hr(ws));let li=Ft,di=li.light,mi=li.sky,Oi=li.paintProperty,dn=li.layoutProperty;function wi(I,S){let D=!1;if(S&&S.length)for(let Z of S)I.fire(new me(new Error(Z.message))),D=!0;return D}class ui{constructor(S,D,Z){let ie=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let xe=new Int32Array(this.arrayBuffer);S=xe[0],this.d=(D=xe[1])+2*(Z=xe[2]);for(let at=0;at=rr[Vr+0]&&ie>=rr[Vr+1])?(He[Ar]=!0,xe.push(Ht[Ar])):He[Ar]=!1}}}}_forEachCell(S,D,Z,ie,pe,xe,He,at){let wt=this._convertToCellCoord(S),Ht=this._convertToCellCoord(D),rr=this._convertToCellCoord(Z),pr=this._convertToCellCoord(ie);for(let Ar=wt;Ar<=rr;Ar++)for(let Vr=Ht;Vr<=pr;Vr++){let ri=this.d*Vr+Ar;if((!at||at(this._convertFromCellCoord(Ar),this._convertFromCellCoord(Vr),this._convertFromCellCoord(Ar+1),this._convertFromCellCoord(Vr+1)))&&pe.call(this,S,D,Z,ie,ri,xe,He,at))return}}_convertFromCellCoord(S){return(S-this.padding)/this.scale}_convertToCellCoord(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let S=this.cells,D=3+this.cells.length+1+1,Z=0;for(let xe=0;xe=0)continue;let xe=I[pe];ie[pe]=Ai[D].shallow.indexOf(pe)>=0?xe:Rn(xe,S)}I instanceof Error&&(ie.message=I.message)}if(ie.$name)throw new Error("$name property is reserved for worker serialization logic.");return D!=="Object"&&(ie.$name=D),ie}function Hn(I){if(Vn(I))return I;if(Array.isArray(I))return I.map(Hn);if(typeof I!="object")throw new Error("can't deserialize object of type "+typeof I);let S=In(I)||"Object";if(!Ai[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:D}=Ai[S];if(!D)throw new Error(`can't deserialize unregistered class ${S}`);if(D.deserialize)return D.deserialize(I);let Z=Object.create(D.prototype);for(let ie of Object.keys(I)){if(ie==="$name")continue;let pe=I[ie];Z[ie]=Ai[S].shallow.indexOf(ie)>=0?pe:Hn(pe)}return Z}class Gn{constructor(){this.first=!0}update(S,D){let Z=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=Z,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=Z,!0):(this.lastFloorZoom>Z?(this.lastIntegerZoom=Z+1,this.lastIntegerZoomTime=D):this.lastFloorZoomI>=128&&I<=255,"Hangul Jamo":I=>I>=4352&&I<=4607,Khmer:I=>I>=6016&&I<=6143,"General Punctuation":I=>I>=8192&&I<=8303,"Letterlike Symbols":I=>I>=8448&&I<=8527,"Number Forms":I=>I>=8528&&I<=8591,"Miscellaneous Technical":I=>I>=8960&&I<=9215,"Control Pictures":I=>I>=9216&&I<=9279,"Optical Character Recognition":I=>I>=9280&&I<=9311,"Enclosed Alphanumerics":I=>I>=9312&&I<=9471,"Geometric Shapes":I=>I>=9632&&I<=9727,"Miscellaneous Symbols":I=>I>=9728&&I<=9983,"Miscellaneous Symbols and Arrows":I=>I>=11008&&I<=11263,"Ideographic Description Characters":I=>I>=12272&&I<=12287,"CJK Symbols and Punctuation":I=>I>=12288&&I<=12351,Katakana:I=>I>=12448&&I<=12543,Kanbun:I=>I>=12688&&I<=12703,"CJK Strokes":I=>I>=12736&&I<=12783,"Enclosed CJK Letters and Months":I=>I>=12800&&I<=13055,"CJK Compatibility":I=>I>=13056&&I<=13311,"Yijing Hexagram Symbols":I=>I>=19904&&I<=19967,"Private Use Area":I=>I>=57344&&I<=63743,"Vertical Forms":I=>I>=65040&&I<=65055,"CJK Compatibility Forms":I=>I>=65072&&I<=65103,"Small Form Variants":I=>I>=65104&&I<=65135,"Halfwidth and Fullwidth Forms":I=>I>=65280&&I<=65519};function Lo(I){for(let S of I)if(ul(S.charCodeAt(0)))return!0;return!1}function us(I){for(let S of I)if(!ol(S.charCodeAt(0)))return!1;return!0}function Bs(I){let S=I.map(D=>{try{return new RegExp(`\\p{sc=${D}}`,"u").source}catch(Z){return null}}).filter(D=>D);return new RegExp(S.join("|"),"u")}let Js=Bs(["Arab","Dupl","Mong","Ougr","Syrc"]);function ol(I){return!Js.test(String.fromCodePoint(I))}let Cl=Bs(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ul(I){return!(I!==746&&I!==747&&(I<4352||!(pn["CJK Compatibility Forms"](I)&&!(I>=65097&&I<=65103)||pn["CJK Compatibility"](I)||pn["CJK Strokes"](I)||!(!pn["CJK Symbols and Punctuation"](I)||I>=12296&&I<=12305||I>=12308&&I<=12319||I===12336)||pn["Enclosed CJK Letters and Months"](I)||pn["Ideographic Description Characters"](I)||pn.Kanbun(I)||pn.Katakana(I)&&I!==12540||!(!pn["Halfwidth and Fullwidth Forms"](I)||I===65288||I===65289||I===65293||I>=65306&&I<=65310||I===65339||I===65341||I===65343||I>=65371&&I<=65503||I===65507||I>=65512&&I<=65519)||!(!pn["Small Form Variants"](I)||I>=65112&&I<=65118||I>=65123&&I<=65126)||pn["Vertical Forms"](I)||pn["Yijing Hexagram Symbols"](I)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(I))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(I))||Cl.test(String.fromCodePoint(I)))))}function Gl(I){return!(ul(I)||function(S){return!!(pn["Latin-1 Supplement"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||pn["General Punctuation"](S)&&(S===8214||S===8224||S===8225||S===8240||S===8241||S===8251||S===8252||S===8258||S===8263||S===8264||S===8265||S===8273)||pn["Letterlike Symbols"](S)||pn["Number Forms"](S)||pn["Miscellaneous Technical"](S)&&(S>=8960&&S<=8967||S>=8972&&S<=8991||S>=8996&&S<=9e3||S===9003||S>=9085&&S<=9114||S>=9150&&S<=9165||S===9167||S>=9169&&S<=9179||S>=9186&&S<=9215)||pn["Control Pictures"](S)&&S!==9251||pn["Optical Character Recognition"](S)||pn["Enclosed Alphanumerics"](S)||pn["Geometric Shapes"](S)||pn["Miscellaneous Symbols"](S)&&!(S>=9754&&S<=9759)||pn["Miscellaneous Symbols and Arrows"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||pn["CJK Symbols and Punctuation"](S)||pn.Katakana(S)||pn["Private Use Area"](S)||pn["CJK Compatibility Forms"](S)||pn["Small Form Variants"](S)||pn["Halfwidth and Fullwidth Forms"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(I))}let Vl=Bs(["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 Fl(I){return Vl.test(String.fromCodePoint(I))}function ga(I,S){return!(!S&&Fl(I)||I>=2304&&I<=3583||I>=3840&&I<=4255||pn.Khmer(I))}function ko(I){for(let S of I)if(Fl(S.charCodeAt(0)))return!0;return!1}let zs=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(I){this.pluginStatus=I.pluginStatus,this.pluginURL=I.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(I){this.applyArabicShaping=I.applyArabicShaping,this.processBidirectionalText=I.processBidirectionalText,this.processStyledBidirectionalText=I.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Fo{constructor(S,D){this.zoom=S,D?(this.now=D.now,this.fadeDuration=D.fadeDuration,this.zoomHistory=D.zoomHistory,this.transition=D.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Gn,this.transition={})}isSupportedScript(S){return function(D,Z){for(let ie of D)if(!ga(ie.charCodeAt(0),Z))return!1;return!0}(S,zs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,D=S-Math.floor(S),Z=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:D+(1-D)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*D}}}class Ys{constructor(S,D){this.property=S,this.value=D,this.expression=function(Z,ie){if(ta(Z))return new $a(Z,ie);if(Cs(Z)){let pe=lo(Z,ie);if(pe.result==="error")throw new Error(pe.value.map(xe=>`${xe.key}: ${xe.message}`).join(", "));return pe.value}{let pe=Z;return ie.type==="color"&&typeof Z=="string"?pe=Bt.parse(Z):ie.type!=="padding"||typeof Z!="number"&&!Array.isArray(Z)?ie.type==="variableAnchorOffsetCollection"&&Array.isArray(Z)&&(pe=Br.parse(Z)):pe=Tr.parse(Z),{kind:"constant",evaluate:()=>pe}}}(D===void 0?S.specification.default:D,S.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(S,D,Z){return this.property.possiblyEvaluate(this,S,D,Z)}}class Gs{constructor(S){this.property=S,this.value=new Ys(S,void 0)}transitioned(S,D){return new Sl(this.property,this.value,D,L({},S.transition,this.transition),S.now)}untransitioned(){return new Sl(this.property,this.value,null,{},0)}}class Us{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return v(this._values[S].value.value)}setValue(S,D){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Gs(this._values[S].property)),this._values[S].value=new Ys(this._values[S].property,D===null?void 0:v(D))}getTransition(S){return v(this._values[S].transition)}setTransition(S,D){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Gs(this._values[S].property)),this._values[S].transition=v(D)||void 0}serialize(){let S={};for(let D of Object.keys(this._values)){let Z=this.getValue(D);Z!==void 0&&(S[D]=Z);let ie=this.getTransition(D);ie!==void 0&&(S[`${D}-transition`]=ie)}return S}transitioned(S,D){let Z=new _l(this._properties);for(let ie of Object.keys(this._values))Z._values[ie]=this._values[ie].transitioned(S,D._values[ie]);return Z}untransitioned(){let S=new _l(this._properties);for(let D of Object.keys(this._values))S._values[D]=this._values[D].untransitioned();return S}}class Sl{constructor(S,D,Z,ie,pe){this.property=S,this.value=D,this.begin=pe+ie.delay||0,this.end=this.begin+ie.duration||0,S.specification.transition&&(ie.delay||ie.duration)&&(this.prior=Z)}possiblyEvaluate(S,D,Z){let ie=S.now||0,pe=this.value.possiblyEvaluate(S,D,Z),xe=this.prior;if(xe){if(ie>this.end)return this.prior=null,pe;if(this.value.isDataDriven())return this.prior=null,pe;if(ie=1)return 1;let wt=at*at,Ht=wt*at;return 4*(at<.5?Ht:3*(at-wt)+Ht-.75)}(He))}}return pe}}class _l{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,D,Z){let ie=new xl(this._properties);for(let pe of Object.keys(this._values))ie._values[pe]=this._values[pe].possiblyEvaluate(S,D,Z);return ie}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class kl{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return v(this._values[S].value)}setValue(S,D){this._values[S]=new Ys(this._values[S].property,D===null?void 0:v(D))}serialize(){let S={};for(let D of Object.keys(this._values)){let Z=this.getValue(D);Z!==void 0&&(S[D]=Z)}return S}possiblyEvaluate(S,D,Z){let ie=new xl(this._properties);for(let pe of Object.keys(this._values))ie._values[pe]=this._values[pe].possiblyEvaluate(S,D,Z);return ie}}class cl{constructor(S,D,Z){this.property=S,this.value=D,this.parameters=Z}isConstant(){return this.value.kind==="constant"}constantOr(S){return this.value.kind==="constant"?this.value.value:S}evaluate(S,D,Z,ie){return this.property.evaluate(this.value,this.parameters,S,D,Z,ie)}}class xl{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Uo{constructor(S){this.specification=S}possiblyEvaluate(S,D){if(S.isDataDriven())throw new Error("Value should not be data driven");return S.expression.evaluate(D)}interpolate(S,D,Z){let ie=ia[this.specification.type];return ie?ie(S,D,Z):S}}class _s{constructor(S,D){this.specification=S,this.overrides=D}possiblyEvaluate(S,D,Z,ie){return new cl(this,S.expression.kind==="constant"||S.expression.kind==="camera"?{kind:"constant",value:S.expression.evaluate(D,null,{},Z,ie)}:S.expression,D)}interpolate(S,D,Z){if(S.value.kind!=="constant"||D.value.kind!=="constant")return S;if(S.value.value===void 0||D.value.value===void 0)return new cl(this,{kind:"constant",value:void 0},S.parameters);let ie=ia[this.specification.type];if(ie){let pe=ie(S.value.value,D.value.value,Z);return new cl(this,{kind:"constant",value:pe},S.parameters)}return S}evaluate(S,D,Z,ie,pe,xe){return S.kind==="constant"?S.value:S.evaluate(D,Z,ie,pe,xe)}}class Bl extends _s{possiblyEvaluate(S,D,Z,ie){if(S.value===void 0)return new cl(this,{kind:"constant",value:void 0},D);if(S.expression.kind==="constant"){let pe=S.expression.evaluate(D,null,{},Z,ie),xe=S.property.specification.type==="resolvedImage"&&typeof pe!="string"?pe.name:pe,He=this._calculate(xe,xe,xe,D);return new cl(this,{kind:"constant",value:He},D)}if(S.expression.kind==="camera"){let pe=this._calculate(S.expression.evaluate({zoom:D.zoom-1}),S.expression.evaluate({zoom:D.zoom}),S.expression.evaluate({zoom:D.zoom+1}),D);return new cl(this,{kind:"constant",value:pe},D)}return new cl(this,S.expression,D)}evaluate(S,D,Z,ie,pe,xe){if(S.kind==="source"){let He=S.evaluate(D,Z,ie,pe,xe);return this._calculate(He,He,He,D)}return S.kind==="composite"?this._calculate(S.evaluate({zoom:Math.floor(D.zoom)-1},Z,ie),S.evaluate({zoom:Math.floor(D.zoom)},Z,ie),S.evaluate({zoom:Math.floor(D.zoom)+1},Z,ie),D):S.value}_calculate(S,D,Z,ie){return ie.zoom>ie.zoomHistory.lastIntegerZoom?{from:S,to:D}:{from:Z,to:D}}interpolate(S){return S}}class Il{constructor(S){this.specification=S}possiblyEvaluate(S,D,Z,ie){if(S.value!==void 0){if(S.expression.kind==="constant"){let pe=S.expression.evaluate(D,null,{},Z,ie);return this._calculate(pe,pe,pe,D)}return this._calculate(S.expression.evaluate(new Fo(Math.floor(D.zoom-1),D)),S.expression.evaluate(new Fo(Math.floor(D.zoom),D)),S.expression.evaluate(new Fo(Math.floor(D.zoom+1),D)),D)}}_calculate(S,D,Z,ie){return ie.zoom>ie.zoomHistory.lastIntegerZoom?{from:S,to:D}:{from:Z,to:D}}interpolate(S){return S}}class Dl{constructor(S){this.specification=S}possiblyEvaluate(S,D,Z,ie){return!!S.expression.evaluate(D,null,{},Z,ie)}interpolate(){return!1}}class oe{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let D in S){let Z=S[D];Z.specification.overridable&&this.overridableProperties.push(D);let ie=this.defaultPropertyValues[D]=new Ys(Z,void 0),pe=this.defaultTransitionablePropertyValues[D]=new Gs(Z);this.defaultTransitioningPropertyValues[D]=pe.untransitioned(),this.defaultPossiblyEvaluatedValues[D]=ie.possiblyEvaluate({})}}}gi("DataDrivenProperty",_s),gi("DataConstantProperty",Uo),gi("CrossFadedDataDrivenProperty",Bl),gi("CrossFadedProperty",Il),gi("ColorRampProperty",Dl);let w="-transition";class B extends Be{constructor(S,D){if(super(),this.id=S.id,this.type=S.type,this._featureFilter={filter:()=>!0,needGeometry:!1},S.type!=="custom"&&(this.metadata=S.metadata,this.minzoom=S.minzoom,this.maxzoom=S.maxzoom,S.type!=="background"&&(this.source=S.source,this.sourceLayer=S["source-layer"],this.filter=S.filter),D.layout&&(this._unevaluatedLayout=new kl(D.layout)),D.paint)){this._transitionablePaint=new Us(D.paint);for(let Z in S.paint)this.setPaintProperty(Z,S.paint[Z],{validate:!1});for(let Z in S.layout)this.setLayoutProperty(Z,S.layout[Z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xl(D.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S==="visibility"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,D,Z={}){D!=null&&this._validate(dn,`layers.${this.id}.layout.${S}`,S,D,Z)||(S!=="visibility"?this._unevaluatedLayout.setValue(S,D):this.visibility=D)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,D,Z={}){if(D!=null&&this._validate(Oi,`layers.${this.id}.paint.${S}`,S,D,Z))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),D||void 0),!1;{let ie=this._transitionablePaint._values[S],pe=ie.property.specification["property-type"]==="cross-faded-data-driven",xe=ie.value.isDataDriven(),He=ie.value;this._transitionablePaint.setValue(S,D),this._handleSpecialPaintPropertyUpdate(S);let at=this._transitionablePaint._values[S].value;return at.isDataDriven()||xe||pe||this._handleOverridablePaintPropertyUpdate(S,He,at)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,D,Z){return!1}isHidden(S){return!!(this.minzoom&&S=this.maxzoom)||this.visibility==="none"}updateTransitions(S){this._transitioningPaint=this._transitionablePaint.transitioned(S,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(S,D){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,D)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,D)}serialize(){let S={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&&(S.layout=S.layout||{},S.layout.visibility=this.visibility),M(S,(D,Z)=>!(D===void 0||Z==="layout"&&!Object.keys(D).length||Z==="paint"&&!Object.keys(D).length))}_validate(S,D,Z,ie,pe={}){return(!pe||pe.validate!==!1)&&wi(this,S.call(li,{key:D,layerType:this.type,objectKey:Z,value:ie,styleSpec:fe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let D=this.paint.get(S);if(D instanceof cl&&Ki(D.property.specification)&&(D.value.kind==="source"||D.value.kind==="composite")&&D.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(S,D){this._structArray=S,this._pos1=D*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(S,D){return S._trim(),D&&(S.isTransferred=!0,D.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let D=Object.create(this.prototype);return D.arrayBuffer=S.arrayBuffer,D.length=S.length,D.capacity=S.arrayBuffer.byteLength/D.bytesPerElement,D._refreshViews(),D}_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(S){this.reserve(S),this.length=S}reserve(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let D=this.uint8;this._refreshViews(),D&&this.uint8.set(D)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ne(I,S=1){let D=0,Z=0;return{members:I.map(ie=>{let pe=Q[ie.type].BYTES_PER_ELEMENT,xe=D=$e(D,Math.max(S,pe)),He=ie.components||1;return Z=Math.max(Z,pe),D+=pe*He,{name:ie.name,type:ie.type,components:He,offset:xe}}),size:$e(D,Math.max(Z,S)),alignment:S}}function $e(I,S){return Math.ceil(I/S)*S}class pt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.int16[ie+0]=D,this.int16[ie+1]=Z,S}}pt.prototype.bytesPerElement=4,gi("StructArrayLayout2i4",pt);class zt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.int16[pe+0]=D,this.int16[pe+1]=Z,this.int16[pe+2]=ie,S}}zt.prototype.bytesPerElement=6,gi("StructArrayLayout3i6",zt);class Yt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,D,Z,ie)}emplace(S,D,Z,ie,pe){let xe=4*S;return this.int16[xe+0]=D,this.int16[xe+1]=Z,this.int16[xe+2]=ie,this.int16[xe+3]=pe,S}}Yt.prototype.bytesPerElement=8,gi("StructArrayLayout4i8",Yt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=6*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.int16[at+2]=ie,this.int16[at+3]=pe,this.int16[at+4]=xe,this.int16[at+5]=He,S}}Jt.prototype.bytesPerElement=12,gi("StructArrayLayout2i4i12",Jt);class yr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=4*S,wt=8*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.uint8[wt+4]=ie,this.uint8[wt+5]=pe,this.uint8[wt+6]=xe,this.uint8[wt+7]=He,S}}yr.prototype.bytesPerElement=8,gi("StructArrayLayout2i4ub8",yr);class Ir extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.float32[ie+0]=D,this.float32[ie+1]=Z,S}}Ir.prototype.bytesPerElement=8,gi("StructArrayLayout2f8",Ir);class ce extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=this.length;return this.resize(rr+1),this.emplace(rr,S,D,Z,ie,pe,xe,He,at,wt,Ht)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr){let pr=10*S;return this.uint16[pr+0]=D,this.uint16[pr+1]=Z,this.uint16[pr+2]=ie,this.uint16[pr+3]=pe,this.uint16[pr+4]=xe,this.uint16[pr+5]=He,this.uint16[pr+6]=at,this.uint16[pr+7]=wt,this.uint16[pr+8]=Ht,this.uint16[pr+9]=rr,S}}ce.prototype.bytesPerElement=20,gi("StructArrayLayout10ui20",ce);class Ae extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr){let Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar){let Vr=12*S;return this.int16[Vr+0]=D,this.int16[Vr+1]=Z,this.int16[Vr+2]=ie,this.int16[Vr+3]=pe,this.uint16[Vr+4]=xe,this.uint16[Vr+5]=He,this.uint16[Vr+6]=at,this.uint16[Vr+7]=wt,this.int16[Vr+8]=Ht,this.int16[Vr+9]=rr,this.int16[Vr+10]=pr,this.int16[Vr+11]=Ar,S}}Ae.prototype.bytesPerElement=24,gi("StructArrayLayout4i4ui4i24",Ae);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.float32[pe+0]=D,this.float32[pe+1]=Z,this.float32[pe+2]=ie,S}}qe.prototype.bytesPerElement=12,gi("StructArrayLayout3f12",qe);class Ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.uint32[1*S+0]=D,S}}Ve.prototype.bytesPerElement=4,gi("StructArrayLayout1ul4",Ve);class ot 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(S,D,Z,ie,pe,xe,He,at,wt){let Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,S,D,Z,ie,pe,xe,He,at,wt)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=10*S,pr=5*S;return this.int16[rr+0]=D,this.int16[rr+1]=Z,this.int16[rr+2]=ie,this.int16[rr+3]=pe,this.int16[rr+4]=xe,this.int16[rr+5]=He,this.uint32[pr+3]=at,this.uint16[rr+8]=wt,this.uint16[rr+9]=Ht,S}}ot.prototype.bytesPerElement=20,gi("StructArrayLayout6i1ul2ui20",ot);class Ke extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=6*S;return this.int16[at+0]=D,this.int16[at+1]=Z,this.int16[at+2]=ie,this.int16[at+3]=pe,this.int16[at+4]=xe,this.int16[at+5]=He,S}}Ke.prototype.bytesPerElement=12,gi("StructArrayLayout2i2i2i12",Ke);class ft extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe){let xe=this.length;return this.resize(xe+1),this.emplace(xe,S,D,Z,ie,pe)}emplace(S,D,Z,ie,pe,xe){let He=4*S,at=8*S;return this.float32[He+0]=D,this.float32[He+1]=Z,this.float32[He+2]=ie,this.int16[at+6]=pe,this.int16[at+7]=xe,S}}ft.prototype.bytesPerElement=16,gi("StructArrayLayout2f1f2i16",ft);class qt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie,pe,xe){let He=this.length;return this.resize(He+1),this.emplace(He,S,D,Z,ie,pe,xe)}emplace(S,D,Z,ie,pe,xe,He){let at=16*S,wt=4*S,Ht=8*S;return this.uint8[at+0]=D,this.uint8[at+1]=Z,this.float32[wt+1]=ie,this.float32[wt+2]=pe,this.int16[Ht+6]=xe,this.int16[Ht+7]=He,S}}qt.prototype.bytesPerElement=16,gi("StructArrayLayout2ub2f2i16",qt);class Xt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.uint16[pe+0]=D,this.uint16[pe+1]=Z,this.uint16[pe+2]=ie,S}}Xt.prototype.bytesPerElement=6,gi("StructArrayLayout3ui6",Xt);class $t 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(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi){let da=this.length;return this.resize(da+1),this.emplace(da,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da){let cn=24*S,jn=12*S,Va=48*S;return this.int16[cn+0]=D,this.int16[cn+1]=Z,this.uint16[cn+2]=ie,this.uint16[cn+3]=pe,this.uint32[jn+2]=xe,this.uint32[jn+3]=He,this.uint32[jn+4]=at,this.uint16[cn+10]=wt,this.uint16[cn+11]=Ht,this.uint16[cn+12]=rr,this.float32[jn+7]=pr,this.float32[jn+8]=Ar,this.uint8[Va+36]=Vr,this.uint8[Va+37]=ri,this.uint8[Va+38]=Ii,this.uint32[jn+10]=Zi,this.int16[cn+22]=da,S}}$t.prototype.bytesPerElement=48,gi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$t);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(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu){let uu=this.length;return this.resize(uu+1),this.emplace(uu,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu)}emplace(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri,Ii,Zi,da,cn,jn,Va,hl,iu,Su,Zl,Qs,gu,cu,uu){let Ts=32*S,wu=16*S;return this.int16[Ts+0]=D,this.int16[Ts+1]=Z,this.int16[Ts+2]=ie,this.int16[Ts+3]=pe,this.int16[Ts+4]=xe,this.int16[Ts+5]=He,this.int16[Ts+6]=at,this.int16[Ts+7]=wt,this.uint16[Ts+8]=Ht,this.uint16[Ts+9]=rr,this.uint16[Ts+10]=pr,this.uint16[Ts+11]=Ar,this.uint16[Ts+12]=Vr,this.uint16[Ts+13]=ri,this.uint16[Ts+14]=Ii,this.uint16[Ts+15]=Zi,this.uint16[Ts+16]=da,this.uint16[Ts+17]=cn,this.uint16[Ts+18]=jn,this.uint16[Ts+19]=Va,this.uint16[Ts+20]=hl,this.uint16[Ts+21]=iu,this.uint16[Ts+22]=Su,this.uint32[wu+12]=Zl,this.float32[wu+13]=Qs,this.float32[wu+14]=gu,this.uint16[Ts+30]=cu,this.uint16[Ts+31]=uu,S}}dr.prototype.bytesPerElement=64,gi("StructArrayLayout8i15ui1ul2f2ui64",dr);class Mr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.float32[1*S+0]=D,S}}Mr.prototype.bytesPerElement=4,gi("StructArrayLayout1f4",Mr);class $r extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=3*S;return this.uint16[6*S+0]=D,this.float32[pe+1]=Z,this.float32[pe+2]=ie,S}}$r.prototype.bytesPerElement=12,gi("StructArrayLayout1ui2f12",$r);class ii extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D,Z){let ie=this.length;return this.resize(ie+1),this.emplace(ie,S,D,Z)}emplace(S,D,Z,ie){let pe=4*S;return this.uint32[2*S+0]=D,this.uint16[pe+2]=Z,this.uint16[pe+3]=ie,S}}ii.prototype.bytesPerElement=8,gi("StructArrayLayout1ul2ui8",ii);class pi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,D){let Z=this.length;return this.resize(Z+1),this.emplace(Z,S,D)}emplace(S,D,Z){let ie=2*S;return this.uint16[ie+0]=D,this.uint16[ie+1]=Z,S}}pi.prototype.bytesPerElement=4,gi("StructArrayLayout2ui4",pi);class Yi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let D=this.length;return this.resize(D+1),this.emplace(D,S)}emplace(S,D){return this.uint16[1*S+0]=D,S}}Yi.prototype.bytesPerElement=2,gi("StructArrayLayout1ui2",Yi);class wn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,D,Z,ie){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,D,Z,ie)}emplace(S,D,Z,ie,pe){let xe=4*S;return this.float32[xe+0]=D,this.float32[xe+1]=Z,this.float32[xe+2]=ie,this.float32[xe+3]=pe,S}}wn.prototype.bytesPerElement=16,gi("StructArrayLayout4f16",wn);class Tn 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 l(this.anchorPointX,this.anchorPointY)}}Tn.prototype.size=20;class ua extends ot{get(S){return new Tn(this,S)}}gi("CollisionBoxArray",ua);class oo 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(S){this._structArray.uint8[this._pos1+37]=S}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(S){this._structArray.uint8[this._pos1+38]=S}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(S){this._structArray.uint32[this._pos4+10]=S}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}oo.prototype.size=48;class el extends $t{get(S){return new oo(this,S)}}gi("PlacedSymbolArray",el);class ys 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(S){this._structArray.uint32[this._pos4+12]=S}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]}}ys.prototype.size=64;class il extends dr{get(S){return new ys(this,S)}}gi("SymbolInstanceArray",il);class $l extends Mr{getoffsetX(S){return this.float32[1*S+0]}}gi("GlyphOffsetArray",$l);class pl extends zt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}gi("SymbolLineVertexArray",pl);class Hl 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]}}Hl.prototype.size=12;class Ll extends $r{get(S){return new Hl(this,S)}}gi("TextAnchorOffsetArray",Ll);class Ql 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]}}Ql.prototype.size=8;class ku extends ii{get(S){return new Ql(this,S)}}gi("FeatureIndexArray",ku);class Jl extends pt{}class Kl extends pt{}class Hu extends pt{}class tf extends Jt{}class Ku extends yr{}class Gu extends Ir{}class Wu extends ce{}class sf extends Ae{}class gf extends qe{}class nf extends Ve{}class af extends Ke{}class X extends qt{}class se extends Xt{}class Le extends pi{}let We=Ne([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ye}=We;class it{constructor(S=[]){this.segments=S}prepareSegment(S,D,Z,ie){let pe=this.segments[this.segments.length-1];return S>it.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${it.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!pe||pe.vertexLength+S>it.MAX_VERTEX_ARRAY_LENGTH||pe.sortKey!==ie)&&(pe={vertexOffset:D.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},ie!==void 0&&(pe.sortKey=ie),this.segments.push(pe)),pe}get(){return this.segments}destroy(){for(let S of this.segments)for(let D in S.vaos)S.vaos[D].destroy()}static simpleSegment(S,D,Z,ie){return new it([{vertexOffset:S,primitiveOffset:D,vertexLength:Z,primitiveLength:ie,vaos:{},sortKey:0}])}}function Nt(I,S){return 256*(I=E(Math.floor(I),0,255))+E(Math.floor(S),0,255)}it.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,gi("SegmentVector",it);let mt=Ne([{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 er={exports:{}},_r={exports:{}};_r.exports=function(I,S){var D,Z,ie,pe,xe,He,at,wt;for(Z=I.length-(D=3&I.length),ie=S,xe=3432918353,He=461845907,wt=0;wt>>16)*xe&65535)<<16)&4294967295)<<15|at>>>17))*He+(((at>>>16)*He&65535)<<16)&4294967295)<<13|ie>>>19))+((5*(ie>>>16)&65535)<<16)&4294967295))+((58964+(pe>>>16)&65535)<<16);switch(at=0,D){case 3:at^=(255&I.charCodeAt(wt+2))<<16;case 2:at^=(255&I.charCodeAt(wt+1))<<8;case 1:ie^=at=(65535&(at=(at=(65535&(at^=255&I.charCodeAt(wt)))*xe+(((at>>>16)*xe&65535)<<16)&4294967295)<<15|at>>>17))*He+(((at>>>16)*He&65535)<<16)&4294967295}return ie^=I.length,ie=2246822507*(65535&(ie^=ie>>>16))+((2246822507*(ie>>>16)&65535)<<16)&4294967295,ie=3266489909*(65535&(ie^=ie>>>13))+((3266489909*(ie>>>16)&65535)<<16)&4294967295,(ie^=ie>>>16)>>>0};var wr=_r.exports,ni={exports:{}};ni.exports=function(I,S){for(var D,Z=I.length,ie=S^Z,pe=0;Z>=4;)D=1540483477*(65535&(D=255&I.charCodeAt(pe)|(255&I.charCodeAt(++pe))<<8|(255&I.charCodeAt(++pe))<<16|(255&I.charCodeAt(++pe))<<24))+((1540483477*(D>>>16)&65535)<<16),ie=1540483477*(65535&ie)+((1540483477*(ie>>>16)&65535)<<16)^(D=1540483477*(65535&(D^=D>>>24))+((1540483477*(D>>>16)&65535)<<16)),Z-=4,++pe;switch(Z){case 3:ie^=(255&I.charCodeAt(pe+2))<<16;case 2:ie^=(255&I.charCodeAt(pe+1))<<8;case 1:ie=1540483477*(65535&(ie^=255&I.charCodeAt(pe)))+((1540483477*(ie>>>16)&65535)<<16)}return ie=1540483477*(65535&(ie^=ie>>>13))+((1540483477*(ie>>>16)&65535)<<16),(ie^=ie>>>15)>>>0};var Wr=wr,Ci=ni.exports;er.exports=Wr,er.exports.murmur3=Wr,er.exports.murmur2=Ci;var Ji=o(er.exports);class ai{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,D,Z,ie){this.ids.push(Ti(S)),this.positions.push(D,Z,ie)}getPositions(S){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let D=Ti(S),Z=0,ie=this.ids.length-1;for(;Z>1;this.ids[xe]>=D?ie=xe:Z=xe+1}let pe=[];for(;this.ids[Z]===D;)pe.push({index:this.positions[3*Z],start:this.positions[3*Z+1],end:this.positions[3*Z+2]}),Z++;return pe}static serialize(S,D){let Z=new Float64Array(S.ids),ie=new Uint32Array(S.positions);return Bi(Z,ie,0,Z.length-1),D&&D.push(Z.buffer,ie.buffer),{ids:Z,positions:ie}}static deserialize(S){let D=new ai;return D.ids=S.ids,D.positions=S.positions,D.indexed=!0,D}}function Ti(I){let S=+I;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:Ji(String(I))}function Bi(I,S,D,Z){for(;D>1],pe=D-1,xe=Z+1;for(;;){do pe++;while(I[pe]ie);if(pe>=xe)break;en(I,pe,xe),en(S,3*pe,3*xe),en(S,3*pe+1,3*xe+1),en(S,3*pe+2,3*xe+2)}xe-D`u_${ie}`),this.type=Z}setUniform(S,D,Z){S.set(Z.constantOr(this.value))}getBinding(S,D,Z){return this.type==="color"?new yo(S,D):new bi(S,D)}}class wl{constructor(S,D){this.uniformNames=D.map(Z=>`u_${Z}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,D){this.pixelRatioFrom=D.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=D.tlbr,this.patternTo=S.tlbr}setUniform(S,D,Z,ie){let pe=ie==="u_pattern_to"?this.patternTo:ie==="u_pattern_from"?this.patternFrom:ie==="u_pixel_ratio_to"?this.pixelRatioTo:ie==="u_pixel_ratio_from"?this.pixelRatioFrom:null;pe&&S.set(pe)}getBinding(S,D,Z){return Z.substr(0,9)==="u_pattern"?new ao(S,D):new bi(S,D)}}class au{constructor(S,D,Z,ie){this.expression=S,this.type=Z,this.maxValue=0,this.paintVertexAttributes=D.map(pe=>({name:`a_${pe}`,type:"Float32",components:Z==="color"?2:1,offset:0})),this.paintVertexArray=new ie}populatePaintArray(S,D,Z,ie,pe){let xe=this.paintVertexArray.length,He=this.expression.evaluate(new Fo(0),D,{},ie,[],pe);this.paintVertexArray.resize(S),this._setPaintValue(xe,S,He)}updatePaintArray(S,D,Z,ie){let pe=this.expression.evaluate({zoom:0},Z,ie);this._setPaintValue(S,D,pe)}_setPaintValue(S,D,Z){if(this.type==="color"){let ie=Ms(Z);for(let pe=S;pe`u_${He}_t`),this.type=Z,this.useIntegerZoom=ie,this.zoom=pe,this.maxValue=0,this.paintVertexAttributes=D.map(He=>({name:`a_${He}`,type:"Float32",components:Z==="color"?4:2,offset:0})),this.paintVertexArray=new xe}populatePaintArray(S,D,Z,ie,pe){let xe=this.expression.evaluate(new Fo(this.zoom),D,{},ie,[],pe),He=this.expression.evaluate(new Fo(this.zoom+1),D,{},ie,[],pe),at=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(at,S,xe,He)}updatePaintArray(S,D,Z,ie){let pe=this.expression.evaluate({zoom:this.zoom},Z,ie),xe=this.expression.evaluate({zoom:this.zoom+1},Z,ie);this._setPaintValue(S,D,pe,xe)}_setPaintValue(S,D,Z,ie){if(this.type==="color"){let pe=Ms(Z),xe=Ms(ie);for(let He=S;He`#define HAS_UNIFORM_${ie}`))}return S}getBinderAttributes(){let S=[];for(let D in this.binders){let Z=this.binders[D];if(Z instanceof au||Z instanceof Al)for(let ie=0;ie!0){this.programConfigurations={};for(let ie of S)this.programConfigurations[ie.id]=new Bu(ie,D,Z);this.needsUpload=!1,this._featureMap=new ai,this._bufferOffset=0}populatePaintArrays(S,D,Z,ie,pe,xe){for(let He in this.programConfigurations)this.programConfigurations[He].populatePaintArrays(S,D,ie,pe,xe);D.id!==void 0&&this._featureMap.add(D.id,Z,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,D,Z,ie){for(let pe of Z)this.needsUpload=this.programConfigurations[pe.id].updatePaintArrays(S,this._featureMap,D,pe,ie)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let D in this.programConfigurations)this.programConfigurations[D].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Ju(I,S){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"]}[I]||[I.replace(`${S}-`,"").replace(/-/g,"_")]}function qo(I,S,D){let Z={color:{source:Ir,composite:wn},number:{source:Mr,composite:Ir}},ie=function(pe){return{"line-pattern":{source:Wu,composite:Wu},"fill-pattern":{source:Wu,composite:Wu},"fill-extrusion-pattern":{source:Wu,composite:Wu}}[pe]}(I);return ie&&ie[D]||Z[S][D]}gi("ConstantBinder",vl),gi("CrossFadedConstantBinder",wl),gi("SourceExpressionBinder",au),gi("CrossFadedCompositeBinder",nu),gi("CompositeExpressionBinder",Al),gi("ProgramConfiguration",Bu,{omit:["_buffers"]}),gi("ProgramConfigurationSet",qu);let Rl=8192,pu=Math.pow(2,14)-1,xu=-pu-1;function of(I){let S=Rl/I.extent,D=I.loadGeometry();for(let Z=0;Zxe.x+1||atxe.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return D}function ff(I,S){return{type:I.type,id:I.id,properties:I.properties,geometry:S?of(I):[]}}function xf(I,S,D,Z,ie){I.emplaceBack(2*S+(Z+1)/2,2*D+(ie+1)/2)}class hf{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Kl,this.indexArray=new se,this.segments=new it,this.programConfigurations=new qu(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){let ie=this.layers[0],pe=[],xe=null,He=!1;ie.type==="circle"&&(xe=ie.layout.get("circle-sort-key"),He=!xe.isConstant());for(let{feature:at,id:wt,index:Ht,sourceLayerIndex:rr}of S){let pr=this.layers[0]._featureFilter.needGeometry,Ar=ff(at,pr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),Ar,Z))continue;let Vr=He?xe.evaluate(Ar,{},Z):void 0,ri={id:wt,properties:at.properties,type:at.type,sourceLayerIndex:rr,index:Ht,geometry:pr?Ar.geometry:of(at),patterns:{},sortKey:Vr};pe.push(ri)}He&&pe.sort((at,wt)=>at.sortKey-wt.sortKey);for(let at of pe){let{geometry:wt,index:Ht,sourceLayerIndex:rr}=at,pr=S[Ht].feature;this.addFeature(at,wt,Ht,Z),D.featureIndex.insert(pr,wt,Ht,rr,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Ye),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(S,D,Z,ie){for(let pe of D)for(let xe of pe){let He=xe.x,at=xe.y;if(He<0||He>=Rl||at<0||at>=Rl)continue;let wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Ht=wt.vertexLength;xf(this.layoutVertexArray,He,at,-1,-1),xf(this.layoutVertexArray,He,at,1,-1),xf(this.layoutVertexArray,He,at,1,1),xf(this.layoutVertexArray,He,at,-1,1),this.indexArray.emplaceBack(Ht,Ht+1,Ht+2),this.indexArray.emplaceBack(Ht,Ht+3,Ht+2),wt.vertexLength+=4,wt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},ie)}}function dc(I,S){for(let D=0;D1){if(Mn(I,S))return!0;for(let Z=0;Z1?D:D.sub(S)._mult(ie)._add(S))}function Io(I,S){let D,Z,ie,pe=!1;for(let xe=0;xeS.y!=ie.y>S.y&&S.x<(ie.x-Z.x)*(S.y-Z.y)/(ie.y-Z.y)+Z.x&&(pe=!pe)}return pe}function Vs(I,S){let D=!1;for(let Z=0,ie=I.length-1;ZS.y!=xe.y>S.y&&S.x<(xe.x-pe.x)*(S.y-pe.y)/(xe.y-pe.y)+pe.x&&(D=!D)}return D}function Hs(I,S,D){let Z=D[0],ie=D[2];if(I.xie.x&&S.x>ie.x||I.yie.y&&S.y>ie.y)return!1;let pe=F(I,S,D[0]);return pe!==F(I,S,D[1])||pe!==F(I,S,D[2])||pe!==F(I,S,D[3])}function is(I,S,D){let Z=S.paint.get(I).value;return Z.kind==="constant"?Z.value:D.programConfigurations.get(S.id).getMaxValue(I)}function su(I){return Math.sqrt(I[0]*I[0]+I[1]*I[1])}function Ps(I,S,D,Z,ie){if(!S[0]&&!S[1])return I;let pe=l.convert(S)._mult(ie);D==="viewport"&&pe._rotate(-Z);let xe=[];for(let He=0;HeHo(Ii,ri))}(wt,at),Ar=rr?Ht*He:Ht;for(let Vr of ie)for(let ri of Vr){let Ii=rr?ri:Ho(ri,at),Zi=Ar,da=ru([],[ri.x,ri.y,0,1],at);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Zi*=da[3]/xe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Zi*=xe.cameraToCenterDistance/da[3]),Gt(pr,Ii,Zi))return!0}return!1}}function Ho(I,S){let D=ru([],[I.x,I.y,0,1],S);return new l(D[0]/D[3],D[1]/D[3])}class ql extends hf{}let yl;gi("HeatmapBucket",ql,{omit:["layers"]});var tl={get paint(){return yl=yl||new oe({"heatmap-radius":new _s(fe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new _s(fe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Uo(fe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Dl(fe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Uo(fe.paint_heatmap["heatmap-opacity"])})}};function js(I,{width:S,height:D},Z,ie){if(ie){if(ie instanceof Uint8ClampedArray)ie=new Uint8Array(ie.buffer);else if(ie.length!==S*D*Z)throw new RangeError(`mismatched image size. expected: ${ie.length} but got: ${S*D*Z}`)}else ie=new Uint8Array(S*D*Z);return I.width=S,I.height=D,I.data=ie,I}function zl(I,{width:S,height:D},Z){if(S===I.width&&D===I.height)return;let ie=js({},{width:S,height:D},Z);lu(I,ie,{x:0,y:0},{x:0,y:0},{width:Math.min(I.width,S),height:Math.min(I.height,D)},Z),I.width=S,I.height=D,I.data=ie.data}function lu(I,S,D,Z,ie,pe){if(ie.width===0||ie.height===0)return S;if(ie.width>I.width||ie.height>I.height||D.x>I.width-ie.width||D.y>I.height-ie.height)throw new RangeError("out of range source coordinates for image copy");if(ie.width>S.width||ie.height>S.height||Z.x>S.width-ie.width||Z.y>S.height-ie.height)throw new RangeError("out of range destination coordinates for image copy");let xe=I.data,He=S.data;if(xe===He)throw new Error("srcData equals dstData, so image is already copied");for(let at=0;at{S[I.evaluationKey]=at;let wt=I.expression.evaluate(S);ie.data[xe+He+0]=Math.floor(255*wt.r/wt.a),ie.data[xe+He+1]=Math.floor(255*wt.g/wt.a),ie.data[xe+He+2]=Math.floor(255*wt.b/wt.a),ie.data[xe+He+3]=Math.floor(255*wt.a)};if(I.clips)for(let xe=0,He=0;xe80*D){He=1/0,at=1/0;let Ht=-1/0,rr=-1/0;for(let pr=D;prHt&&(Ht=Ar),Vr>rr&&(rr=Vr)}wt=Math.max(Ht-He,rr-at),wt=wt!==0?32767/wt:0}return qc(pe,xe,D,He,at,wt,0),xe}function pc(I,S,D,Z,ie){let pe;if(ie===function(xe,He,at,wt){let Ht=0;for(let rr=He,pr=at-wt;rr0)for(let xe=S;xe=S;xe-=Z)pe=cr(xe/Z|0,I[xe],I[xe+1],pe);return pe&&ge(pe,pe.next)&&(It(pe),pe=pe.next),pe}function vc(I,S){if(!I)return I;S||(S=I);let D,Z=I;do if(D=!1,Z.steiner||!ge(Z,Z.next)&&we(Z.prev,Z,Z.next)!==0)Z=Z.next;else{if(It(Z),Z=S=Z.prev,Z===Z.next)break;D=!0}while(D||Z!==S);return S}function qc(I,S,D,Z,ie,pe,xe){if(!I)return;!xe&&pe&&function(at,wt,Ht,rr){let pr=at;do pr.z===0&&(pr.z=R(pr.x,pr.y,wt,Ht,rr)),pr.prevZ=pr.prev,pr.nextZ=pr.next,pr=pr.next;while(pr!==at);pr.prevZ.nextZ=null,pr.prevZ=null,function(Ar){let Vr,ri=1;do{let Ii,Zi=Ar;Ar=null;let da=null;for(Vr=0;Zi;){Vr++;let cn=Zi,jn=0;for(let hl=0;hl0||Va>0&&cn;)jn!==0&&(Va===0||!cn||Zi.z<=cn.z)?(Ii=Zi,Zi=Zi.nextZ,jn--):(Ii=cn,cn=cn.nextZ,Va--),da?da.nextZ=Ii:Ar=Ii,Ii.prevZ=da,da=Ii;Zi=cn}da.nextZ=null,ri*=2}while(Vr>1)}(pr)}(I,Z,ie,pe);let He=I;for(;I.prev!==I.next;){let at=I.prev,wt=I.next;if(pe?Ac(I,Z,ie,pe):If(I))S.push(at.i,I.i,wt.i),It(I),I=wt.next,He=wt.next;else if((I=wt)===He){xe?xe===1?qc(I=zc(vc(I),S),S,D,Z,ie,pe,2):xe===2&&Vu(I,S,D,Z,ie,pe):qc(vc(I),S,D,Z,ie,pe,1);break}}}function If(I){let S=I.prev,D=I,Z=I.next;if(we(S,D,Z)>=0)return!1;let ie=S.x,pe=D.x,xe=Z.x,He=S.y,at=D.y,wt=Z.y,Ht=iepe?ie>xe?ie:xe:pe>xe?pe:xe,Ar=He>at?He>wt?He:wt:at>wt?at:wt,Vr=Z.next;for(;Vr!==S;){if(Vr.x>=Ht&&Vr.x<=pr&&Vr.y>=rr&&Vr.y<=Ar&&N(ie,He,pe,at,xe,wt,Vr.x,Vr.y)&&we(Vr.prev,Vr,Vr.next)>=0)return!1;Vr=Vr.next}return!0}function Ac(I,S,D,Z){let ie=I.prev,pe=I,xe=I.next;if(we(ie,pe,xe)>=0)return!1;let He=ie.x,at=pe.x,wt=xe.x,Ht=ie.y,rr=pe.y,pr=xe.y,Ar=Heat?He>wt?He:wt:at>wt?at:wt,Ii=Ht>rr?Ht>pr?Ht:pr:rr>pr?rr:pr,Zi=R(Ar,Vr,S,D,Z),da=R(ri,Ii,S,D,Z),cn=I.prevZ,jn=I.nextZ;for(;cn&&cn.z>=Zi&&jn&&jn.z<=da;){if(cn.x>=Ar&&cn.x<=ri&&cn.y>=Vr&&cn.y<=Ii&&cn!==ie&&cn!==xe&&N(He,Ht,at,rr,wt,pr,cn.x,cn.y)&&we(cn.prev,cn,cn.next)>=0||(cn=cn.prevZ,jn.x>=Ar&&jn.x<=ri&&jn.y>=Vr&&jn.y<=Ii&&jn!==ie&&jn!==xe&&N(He,Ht,at,rr,wt,pr,jn.x,jn.y)&&we(jn.prev,jn,jn.next)>=0))return!1;jn=jn.nextZ}for(;cn&&cn.z>=Zi;){if(cn.x>=Ar&&cn.x<=ri&&cn.y>=Vr&&cn.y<=Ii&&cn!==ie&&cn!==xe&&N(He,Ht,at,rr,wt,pr,cn.x,cn.y)&&we(cn.prev,cn,cn.next)>=0)return!1;cn=cn.prevZ}for(;jn&&jn.z<=da;){if(jn.x>=Ar&&jn.x<=ri&&jn.y>=Vr&&jn.y<=Ii&&jn!==ie&&jn!==xe&&N(He,Ht,at,rr,wt,pr,jn.x,jn.y)&&we(jn.prev,jn,jn.next)>=0)return!1;jn=jn.nextZ}return!0}function zc(I,S){let D=I;do{let Z=D.prev,ie=D.next.next;!ge(Z,ie)&&Ue(Z,D,D.next,ie)&&ur(Z,ie)&&ur(ie,Z)&&(S.push(Z.i,D.i,ie.i),It(D),It(D.next),D=I=ie),D=D.next}while(D!==I);return vc(D)}function Vu(I,S,D,Z,ie,pe){let xe=I;do{let He=xe.next.next;for(;He!==xe.prev;){if(xe.i!==He.i&&$(xe,He)){let at=gr(xe,He);return xe=vc(xe,xe.next),at=vc(at,at.next),qc(xe,S,D,Z,ie,pe,0),void qc(at,S,D,Z,ie,pe,0)}He=He.next}xe=xe.next}while(xe!==I)}function Bc(I,S){return I.x-S.x}function Ou(I,S){let D=function(ie,pe){let xe=pe,He=ie.x,at=ie.y,wt,Ht=-1/0;do{if(at<=xe.y&&at>=xe.next.y&&xe.next.y!==xe.y){let ri=xe.x+(at-xe.y)*(xe.next.x-xe.x)/(xe.next.y-xe.y);if(ri<=He&&ri>Ht&&(Ht=ri,wt=xe.x=xe.x&&xe.x>=pr&&He!==xe.x&&N(atwt.x||xe.x===wt.x&&Y(wt,xe)))&&(wt=xe,Vr=ri)}xe=xe.next}while(xe!==rr);return wt}(I,S);if(!D)return S;let Z=gr(D,I);return vc(Z,Z.next),vc(D,D.next)}function Y(I,S){return we(I.prev,I,S.prev)<0&&we(S.next,I,I.next)<0}function R(I,S,D,Z,ie){return(I=1431655765&((I=858993459&((I=252645135&((I=16711935&((I=(I-D)*ie|0)|I<<8))|I<<4))|I<<2))|I<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-Z)*ie|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function K(I){let S=I,D=I;do(S.x=(I-xe)*(pe-He)&&(I-xe)*(Z-He)>=(D-xe)*(S-He)&&(D-xe)*(pe-He)>=(ie-xe)*(Z-He)}function $(I,S){return I.next.i!==S.i&&I.prev.i!==S.i&&!function(D,Z){let ie=D;do{if(ie.i!==D.i&&ie.next.i!==D.i&&ie.i!==Z.i&&ie.next.i!==Z.i&&Ue(ie,ie.next,D,Z))return!0;ie=ie.next}while(ie!==D);return!1}(I,S)&&(ur(I,S)&&ur(S,I)&&function(D,Z){let ie=D,pe=!1,xe=(D.x+Z.x)/2,He=(D.y+Z.y)/2;do ie.y>He!=ie.next.y>He&&ie.next.y!==ie.y&&xe<(ie.next.x-ie.x)*(He-ie.y)/(ie.next.y-ie.y)+ie.x&&(pe=!pe),ie=ie.next;while(ie!==D);return pe}(I,S)&&(we(I.prev,I,S.prev)||we(I,S.prev,S))||ge(I,S)&&we(I.prev,I,I.next)>0&&we(S.prev,S,S.next)>0)}function we(I,S,D){return(S.y-I.y)*(D.x-S.x)-(S.x-I.x)*(D.y-S.y)}function ge(I,S){return I.x===S.x&&I.y===S.y}function Ue(I,S,D,Z){let ie=Rt(we(I,S,D)),pe=Rt(we(I,S,Z)),xe=Rt(we(D,Z,I)),He=Rt(we(D,Z,S));return ie!==pe&&xe!==He||!(ie!==0||!dt(I,D,S))||!(pe!==0||!dt(I,Z,S))||!(xe!==0||!dt(D,I,Z))||!(He!==0||!dt(D,S,Z))}function dt(I,S,D){return S.x<=Math.max(I.x,D.x)&&S.x>=Math.min(I.x,D.x)&&S.y<=Math.max(I.y,D.y)&&S.y>=Math.min(I.y,D.y)}function Rt(I){return I>0?1:I<0?-1:0}function ur(I,S){return we(I.prev,I,I.next)<0?we(I,S,I.next)>=0&&we(I,I.prev,S)>=0:we(I,S,I.prev)<0||we(I,I.next,S)<0}function gr(I,S){let D=Qt(I.i,I.x,I.y),Z=Qt(S.i,S.x,S.y),ie=I.next,pe=S.prev;return I.next=S,S.prev=I,D.next=ie,ie.prev=D,Z.next=D,D.prev=Z,pe.next=Z,Z.prev=pe,Z}function cr(I,S,D,Z){let ie=Qt(I,S,D);return Z?(ie.next=Z.next,ie.prev=Z,Z.next.prev=ie,Z.next=ie):(ie.prev=ie,ie.next=ie),ie}function It(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function Qt(I,S,D){return{i:I,x:S,y:D,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ar(I,S,D){let Z=D.patternDependencies,ie=!1;for(let pe of S){let xe=pe.paint.get(`${I}-pattern`);xe.isConstant()||(ie=!0);let He=xe.constantOr(null);He&&(ie=!0,Z[He.to]=!0,Z[He.from]=!0)}return ie}function mr(I,S,D,Z,ie){let pe=ie.patternDependencies;for(let xe of S){let He=xe.paint.get(`${I}-pattern`).value;if(He.kind!=="constant"){let at=He.evaluate({zoom:Z-1},D,{},ie.availableImages),wt=He.evaluate({zoom:Z},D,{},ie.availableImages),Ht=He.evaluate({zoom:Z+1},D,{},ie.availableImages);at=at&&at.name?at.name:at,wt=wt&&wt.name?wt.name:wt,Ht=Ht&&Ht.name?Ht.name:Ht,pe[at]=!0,pe[wt]=!0,pe[Ht]=!0,D.patterns[xe.id]={min:at,mid:wt,max:Ht}}}return D}class Pr{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Hu,this.indexArray=new se,this.indexArray2=new Le,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.segments2=new it,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.hasPattern=ar("fill",this.layers,D);let ie=this.layers[0].layout.get("fill-sort-key"),pe=!ie.isConstant(),xe=[];for(let{feature:He,id:at,index:wt,sourceLayerIndex:Ht}of S){let rr=this.layers[0]._featureFilter.needGeometry,pr=ff(He,rr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),pr,Z))continue;let Ar=pe?ie.evaluate(pr,{},Z,D.availableImages):void 0,Vr={id:at,properties:He.properties,type:He.type,sourceLayerIndex:Ht,index:wt,geometry:rr?pr.geometry:of(He),patterns:{},sortKey:Ar};xe.push(Vr)}pe&&xe.sort((He,at)=>He.sortKey-at.sortKey);for(let He of xe){let{geometry:at,index:wt,sourceLayerIndex:Ht}=He;if(this.hasPattern){let rr=mr("fill",this.layers,He,this.zoom,D);this.patternFeatures.push(rr)}else this.addFeature(He,at,wt,Z,{});D.featureIndex.insert(S[wt].feature,at,wt,Ht,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}addFeatures(S,D,Z){for(let ie of this.patternFeatures)this.addFeature(ie,ie.geometry,ie.index,D,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Lc),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.indexBuffer2=S.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(S),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(S,D,Z,ie,pe){for(let xe of ks(D,500)){let He=0;for(let Ar of xe)He+=Ar.length;let at=this.segments.prepareSegment(He,this.layoutVertexArray,this.indexArray),wt=at.vertexLength,Ht=[],rr=[];for(let Ar of xe){if(Ar.length===0)continue;Ar!==xe[0]&&rr.push(Ht.length/2);let Vr=this.segments2.prepareSegment(Ar.length,this.layoutVertexArray,this.indexArray2),ri=Vr.vertexLength;this.layoutVertexArray.emplaceBack(Ar[0].x,Ar[0].y),this.indexArray2.emplaceBack(ri+Ar.length-1,ri),Ht.push(Ar[0].x),Ht.push(Ar[0].y);for(let Ii=1;Ii>3}if(ie--,Z===1||Z===2)pe+=I.readSVarint(),xe+=I.readSVarint(),Z===1&&(S&&He.push(S),S=[]),S.push(new vn(pe,xe));else{if(Z!==7)throw new Error("unknown command "+Z);S&&S.push(S[0].clone())}}return S&&He.push(S),He},ra.prototype.bbox=function(){var I=this._pbf;I.pos=this._geometry;for(var S=I.readVarint()+I.pos,D=1,Z=0,ie=0,pe=0,xe=1/0,He=-1/0,at=1/0,wt=-1/0;I.pos>3}if(Z--,D===1||D===2)(ie+=I.readSVarint())He&&(He=ie),(pe+=I.readSVarint())wt&&(wt=pe);else if(D!==7)throw new Error("unknown command "+D)}return[xe,at,He,wt]},ra.prototype.toGeoJSON=function(I,S,D){var Z,ie,pe=this.extent*Math.pow(2,D),xe=this.extent*I,He=this.extent*S,at=this.loadGeometry(),wt=ra.types[this.type];function Ht(Ar){for(var Vr=0;Vr>3;ie=xe===1?Z.readString():xe===2?Z.readFloat():xe===3?Z.readDouble():xe===4?Z.readVarint64():xe===5?Z.readVarint():xe===6?Z.readSVarint():xe===7?Z.readBoolean():null}return ie}(D))}fs.prototype.feature=function(I){if(I<0||I>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[I];var S=this._pbf.readVarint()+this._pbf.pos;return new Os(this._pbf,S,this.extent,this._keys,this._values)};var $s=eo;function Ml(I,S,D){if(I===3){var Z=new $s(D,D.readVarint()+D.pos);Z.length&&(S[Z.name]=Z)}}qi.VectorTile=function(I,S){this.layers=I.readFields(Ml,{},S)},qi.VectorTileFeature=Qa,qi.VectorTileLayer=eo;let Mu=qi.VectorTileFeature.types,Au=Math.pow(2,13);function $u(I,S,D,Z,ie,pe,xe,He){I.emplaceBack(S,D,2*Math.floor(Z*Au)+xe,ie*Au*2,pe*Au*2,Math.round(He))}class du{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(D=>D.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new tf,this.centroidVertexArray=new Jl,this.indexArray=new se,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.features=[],this.hasPattern=ar("fill-extrusion",this.layers,D);for(let{feature:ie,id:pe,index:xe,sourceLayerIndex:He}of S){let at=this.layers[0]._featureFilter.needGeometry,wt=ff(ie,at);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),wt,Z))continue;let Ht={id:pe,sourceLayerIndex:He,index:xe,geometry:at?wt.geometry:of(ie),properties:ie.properties,type:ie.type,patterns:{}};this.hasPattern?this.features.push(mr("fill-extrusion",this.layers,Ht,this.zoom,D)):this.addFeature(Ht,Ht.geometry,xe,Z,{}),D.featureIndex.insert(ie,Ht.geometry,xe,He,this.index,!0)}}addFeatures(S,D,Z){for(let ie of this.features){let{geometry:pe}=ie;this.addFeature(ie,pe,ie.index,D,Z)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,yi),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,Cr.members,!0),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(S,D,Z,ie,pe){for(let xe of ks(D,500)){let He={x:0,y:0,vertexCount:0},at=0;for(let Vr of xe)at+=Vr.length;let wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Vr of xe){if(Vr.length===0||yf(Vr))continue;let ri=0;for(let Ii=0;Ii=1){let da=Vr[Ii-1];if(!Nu(Zi,da)){wt.vertexLength+4>it.MAX_VERTEX_ARRAY_LENGTH&&(wt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let cn=Zi.sub(da)._perp()._unit(),jn=da.dist(Zi);ri+jn>32768&&(ri=0),$u(this.layoutVertexArray,Zi.x,Zi.y,cn.x,cn.y,0,0,ri),$u(this.layoutVertexArray,Zi.x,Zi.y,cn.x,cn.y,0,1,ri),He.x+=2*Zi.x,He.y+=2*Zi.y,He.vertexCount+=2,ri+=jn,$u(this.layoutVertexArray,da.x,da.y,cn.x,cn.y,0,0,ri),$u(this.layoutVertexArray,da.x,da.y,cn.x,cn.y,0,1,ri),He.x+=2*da.x,He.y+=2*da.y,He.vertexCount+=2;let Va=wt.vertexLength;this.indexArray.emplaceBack(Va,Va+2,Va+1),this.indexArray.emplaceBack(Va+1,Va+2,Va+3),wt.vertexLength+=4,wt.primitiveLength+=2}}}}if(wt.vertexLength+at>it.MAX_VERTEX_ARRAY_LENGTH&&(wt=this.segments.prepareSegment(at,this.layoutVertexArray,this.indexArray)),Mu[S.type]!=="Polygon")continue;let Ht=[],rr=[],pr=wt.vertexLength;for(let Vr of xe)if(Vr.length!==0){Vr!==xe[0]&&rr.push(Ht.length/2);for(let ri=0;riRl)||I.y===S.y&&(I.y<0||I.y>Rl)}function yf(I){return I.every(S=>S.x<0)||I.every(S=>S.x>Rl)||I.every(S=>S.y<0)||I.every(S=>S.y>Rl)}let Kf;gi("FillExtrusionBucket",du,{omit:["layers","features"]});var wd={get paint(){return Kf=Kf||new oe({"fill-extrusion-opacity":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new _s(fe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Bl(fe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new _s(fe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new _s(fe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Uo(fe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Td extends B{constructor(S){super(S,wd)}createBucket(S){return new du(S)}queryRadius(){return su(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(S,D,Z,ie,pe,xe,He,at){let wt=Ps(S,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),xe.angle,He),Ht=this.paint.get("fill-extrusion-height").evaluate(D,Z),rr=this.paint.get("fill-extrusion-base").evaluate(D,Z),pr=function(Vr,ri,Ii,Zi){let da=[];for(let cn of Vr){let jn=[cn.x,cn.y,0,1];ru(jn,jn,ri),da.push(new l(jn[0]/jn[3],jn[1]/jn[3]))}return da}(wt,at),Ar=function(Vr,ri,Ii,Zi){let da=[],cn=[],jn=Zi[8]*ri,Va=Zi[9]*ri,hl=Zi[10]*ri,iu=Zi[11]*ri,Su=Zi[8]*Ii,Zl=Zi[9]*Ii,Qs=Zi[10]*Ii,gu=Zi[11]*Ii;for(let cu of Vr){let uu=[],Ts=[];for(let wu of cu){let fu=wu.x,Lu=wu.y,oc=Zi[0]*fu+Zi[4]*Lu+Zi[12],tc=Zi[1]*fu+Zi[5]*Lu+Zi[13],Ch=Zi[2]*fu+Zi[6]*Lu+Zi[14],$p=Zi[3]*fu+Zi[7]*Lu+Zi[15],ud=Ch+hl,Lh=$p+iu,Wd=oc+Su,jd=tc+Zl,Zd=Ch+Qs,Kc=$p+gu,zh=new l((oc+jn)/Lh,(tc+Va)/Lh);zh.z=ud/Lh,uu.push(zh);let Cd=new l(Wd/Kc,jd/Kc);Cd.z=Zd/Kc,Ts.push(Cd)}da.push(uu),cn.push(Ts)}return[da,cn]}(ie,rr,Ht,at);return function(Vr,ri,Ii){let Zi=1/0;jr(Ii,ri)&&(Zi=Yp(Ii,ri[0]));for(let da=0;daD.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(D=>{this.gradients[D.id]={}}),this.layoutVertexArray=new Ku,this.layoutVertexArray2=new Gu,this.indexArray=new se,this.programConfigurations=new qu(S.layers,S.zoom),this.segments=new it,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id)}populate(S,D,Z){this.hasPattern=ar("line",this.layers,D);let ie=this.layers[0].layout.get("line-sort-key"),pe=!ie.isConstant(),xe=[];for(let{feature:He,id:at,index:wt,sourceLayerIndex:Ht}of S){let rr=this.layers[0]._featureFilter.needGeometry,pr=ff(He,rr);if(!this.layers[0]._featureFilter.filter(new Fo(this.zoom),pr,Z))continue;let Ar=pe?ie.evaluate(pr,{},Z):void 0,Vr={id:at,properties:He.properties,type:He.type,sourceLayerIndex:Ht,index:wt,geometry:rr?pr.geometry:of(He),patterns:{},sortKey:Ar};xe.push(Vr)}pe&&xe.sort((He,at)=>He.sortKey-at.sortKey);for(let He of xe){let{geometry:at,index:wt,sourceLayerIndex:Ht}=He;if(this.hasPattern){let rr=mr("line",this.layers,He,this.zoom,D);this.patternFeatures.push(rr)}else this.addFeature(He,at,wt,Z,{});D.featureIndex.insert(S[wt].feature,at,wt,Ht,this.index)}}update(S,D,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,D,this.stateDependentLayers,Z)}addFeatures(S,D,Z){for(let ie of this.patternFeatures)this.addFeature(ie,ie.geometry,ie.index,D,Z)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=S.createVertexBuffer(this.layoutVertexArray2,vv)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,pv),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(S){if(S.properties&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_end"))return{start:+S.properties.mapbox_clip_start,end:+S.properties.mapbox_clip_end}}addFeature(S,D,Z,ie,pe){let xe=this.layers[0].layout,He=xe.get("line-join").evaluate(S,{}),at=xe.get("line-cap"),wt=xe.get("line-miter-limit"),Ht=xe.get("line-round-limit");this.lineClips=this.lineFeatureClips(S);for(let rr of D)this.addLine(rr,S,He,at,wt,Ht);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,pe,ie)}addLine(S,D,Z,ie,pe,xe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Zi=0;Zi=2&&S[at-1].equals(S[at-2]);)at--;let wt=0;for(;wt0;if(iu&&Zi>wt){let gu=pr.dist(Ar);if(gu>2*Ht){let cu=pr.sub(pr.sub(Ar)._mult(Ht/gu)._round());this.updateDistance(Ar,cu),this.addCurrentVertex(cu,ri,0,0,rr),Ar=cu}}let Zl=Ar&&Vr,Qs=Zl?Z:He?"butt":ie;if(Zl&&Qs==="round"&&(Vape&&(Qs="bevel"),Qs==="bevel"&&(Va>2&&(Qs="flipbevel"),Va100)da=Ii.mult(-1);else{let gu=Va*ri.add(Ii).mag()/ri.sub(Ii).mag();da._perp()._mult(gu*(Su?-1:1))}this.addCurrentVertex(pr,da,0,0,rr),this.addCurrentVertex(pr,da.mult(-1),0,0,rr)}else if(Qs==="bevel"||Qs==="fakeround"){let gu=-Math.sqrt(Va*Va-1),cu=Su?gu:0,uu=Su?0:gu;if(Ar&&this.addCurrentVertex(pr,ri,cu,uu,rr),Qs==="fakeround"){let Ts=Math.round(180*hl/Math.PI/20);for(let wu=1;wu2*Ht){let cu=pr.add(Vr.sub(pr)._mult(Ht/gu)._round());this.updateDistance(pr,cu),this.addCurrentVertex(cu,Ii,0,0,rr),pr=cu}}}}addCurrentVertex(S,D,Z,ie,pe,xe=!1){let He=D.y*ie-D.x,at=-D.y-D.x*ie;this.addHalfVertex(S,D.x+D.y*Z,D.y-D.x*Z,xe,!1,Z,pe),this.addHalfVertex(S,He,at,xe,!0,-ie,pe),this.distance>kp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,D,Z,ie,pe,xe))}addHalfVertex({x:S,y:D},Z,ie,pe,xe,He,at){let wt=.5*(this.lineClips?this.scaledDistance*(kp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(pe?1:0),(D<<1)+(xe?1:0),Math.round(63*Z)+128,Math.round(63*ie)+128,1+(He===0?0:He<0?-1:1)|(63&wt)<<2,wt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Ht=at.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Ht),at.primitiveLength++),xe?this.e2=Ht:this.e1=Ht}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,D){this.distance+=S.dist(D),this.updateScaledDistance()}}let Cp,ng;gi("LineBucket",Kp,{omit:["layers","patternFeatures"]});var cy={get paint(){return ng=ng||new oe({"line-opacity":new _s(fe.paint_line["line-opacity"]),"line-color":new _s(fe.paint_line["line-color"]),"line-translate":new Uo(fe.paint_line["line-translate"]),"line-translate-anchor":new Uo(fe.paint_line["line-translate-anchor"]),"line-width":new _s(fe.paint_line["line-width"]),"line-gap-width":new _s(fe.paint_line["line-gap-width"]),"line-offset":new _s(fe.paint_line["line-offset"]),"line-blur":new _s(fe.paint_line["line-blur"]),"line-dasharray":new Il(fe.paint_line["line-dasharray"]),"line-pattern":new Bl(fe.paint_line["line-pattern"]),"line-gradient":new Dl(fe.paint_line["line-gradient"])})},get layout(){return Cp=Cp||new oe({"line-cap":new Uo(fe.layout_line["line-cap"]),"line-join":new _s(fe.layout_line["line-join"]),"line-miter-limit":new Uo(fe.layout_line["line-miter-limit"]),"line-round-limit":new Uo(fe.layout_line["line-round-limit"]),"line-sort-key":new _s(fe.layout_line["line-sort-key"])})}};class vh extends _s{possiblyEvaluate(S,D){return D=new Fo(Math.floor(D.zoom),{now:D.now,fadeDuration:D.fadeDuration,zoomHistory:D.zoomHistory,transition:D.transition}),super.possiblyEvaluate(S,D)}evaluate(S,D,Z,ie){return D=L({},D,{zoom:Math.floor(D.zoom)}),super.evaluate(S,D,Z,ie)}}let hy;class ag extends B{constructor(S){super(S,cy),this.gradientVersion=0,hy||(hy=new vh(cy.paint.properties["line-width"].specification),hy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S==="line-gradient"){let D=this.gradientExpression();this.stepInterpolant=!!function(Z){return Z._styleExpression!==void 0}(D)&&D._styleExpression.expression instanceof Ui,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(S,D){super.recalculate(S,D),this.paint._values["line-floorwidth"]=hy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,S)}createBucket(S){return new Kp(S)}queryRadius(S){let D=S,Z=jh(is("line-width",this,D),is("line-gap-width",this,D)),ie=is("line-offset",this,D);return Z/2+Math.abs(ie)+su(this.paint.get("line-translate"))}queryIntersectsFeature(S,D,Z,ie,pe,xe,He){let at=Ps(S,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),xe.angle,He),wt=He/2*jh(this.paint.get("line-width").evaluate(D,Z),this.paint.get("line-gap-width").evaluate(D,Z)),Ht=this.paint.get("line-offset").evaluate(D,Z);return Ht&&(ie=function(rr,pr){let Ar=[];for(let Vr=0;Vr=3){for(let Ii=0;Ii0?S+2*I:I}let rm=Ne([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),w1=Ne([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ne([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let T1=Ne([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Ne([{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 og=Ne([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),im=Ne([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function nm(I,S,D){return I.sections.forEach(Z=>{Z.text=function(ie,pe,xe){let He=pe.layout.get("text-transform").evaluate(xe,{});return He==="uppercase"?ie=ie.toLocaleUpperCase():He==="lowercase"&&(ie=ie.toLocaleLowerCase()),zs.applyArabicShaping&&(ie=zs.applyArabicShaping(ie)),ie}(Z.text,S,D)}),I}Ne([{name:"triangle",components:3,type:"Uint16"}]),Ne([{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"}]),Ne([{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"}]),Ne([{type:"Float32",name:"offsetX"}]),Ne([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Ne([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let yc={"!":"\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 Ff=24,Ed=Zf,sg=function(I,S,D,Z,ie){var pe,xe,He=8*ie-Z-1,at=(1<>1,Ht=-7,rr=D?ie-1:0,pr=D?-1:1,Ar=I[S+rr];for(rr+=pr,pe=Ar&(1<<-Ht)-1,Ar>>=-Ht,Ht+=He;Ht>0;pe=256*pe+I[S+rr],rr+=pr,Ht-=8);for(xe=pe&(1<<-Ht)-1,pe>>=-Ht,Ht+=Z;Ht>0;xe=256*xe+I[S+rr],rr+=pr,Ht-=8);if(pe===0)pe=1-wt;else{if(pe===at)return xe?NaN:1/0*(Ar?-1:1);xe+=Math.pow(2,Z),pe-=wt}return(Ar?-1:1)*xe*Math.pow(2,pe-Z)},A1=function(I,S,D,Z,ie,pe){var xe,He,at,wt=8*pe-ie-1,Ht=(1<>1,pr=ie===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ar=Z?0:pe-1,Vr=Z?1:-1,ri=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(He=isNaN(S)?1:0,xe=Ht):(xe=Math.floor(Math.log(S)/Math.LN2),S*(at=Math.pow(2,-xe))<1&&(xe--,at*=2),(S+=xe+rr>=1?pr/at:pr*Math.pow(2,1-rr))*at>=2&&(xe++,at/=2),xe+rr>=Ht?(He=0,xe=Ht):xe+rr>=1?(He=(S*at-1)*Math.pow(2,ie),xe+=rr):(He=S*Math.pow(2,rr-1)*Math.pow(2,ie),xe=0));ie>=8;I[D+Ar]=255&He,Ar+=Vr,He/=256,ie-=8);for(xe=xe<0;I[D+Ar]=255&xe,Ar+=Vr,xe/=256,wt-=8);I[D+Ar-Vr]|=128*ri};function Zf(I){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(I)?I:new Uint8Array(I||0),this.pos=0,this.type=0,this.length=this.buf.length}Zf.Varint=0,Zf.Fixed64=1,Zf.Bytes=2,Zf.Fixed32=5;var Ox=4294967296,am=1/Ox,Mw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Lp(I){return I.type===Zf.Bytes?I.readVarint()+I.pos:I.pos+1}function om(I,S,D){return D?4294967296*S+(I>>>0):4294967296*(S>>>0)+(I>>>0)}function Ew(I,S,D){var Z=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));D.realloc(Z);for(var ie=D.pos-1;ie>=I;ie--)D.buf[ie+Z]=D.buf[ie]}function Nx(I,S){for(var D=0;D>>8,I[D+2]=S>>>16,I[D+3]=S>>>24}function lC(I,S){return(I[S]|I[S+1]<<8|I[S+2]<<16)+(I[S+3]<<24)}Zf.prototype={destroy:function(){this.buf=null},readFields:function(I,S,D){for(D=D||this.length;this.pos>3,pe=this.pos;this.type=7&Z,I(ie,S,this),this.pos===pe&&this.skip(Z)}return S},readMessage:function(I,S){return this.readFields(I,S,this.readVarint()+this.pos)},readFixed32:function(){var I=lg(this.buf,this.pos);return this.pos+=4,I},readSFixed32:function(){var I=lC(this.buf,this.pos);return this.pos+=4,I},readFixed64:function(){var I=lg(this.buf,this.pos)+lg(this.buf,this.pos+4)*Ox;return this.pos+=8,I},readSFixed64:function(){var I=lg(this.buf,this.pos)+lC(this.buf,this.pos+4)*Ox;return this.pos+=8,I},readFloat:function(){var I=sg(this.buf,this.pos,!0,23,4);return this.pos+=4,I},readDouble:function(){var I=sg(this.buf,this.pos,!0,52,8);return this.pos+=8,I},readVarint:function(I){var S,D,Z=this.buf;return S=127&(D=Z[this.pos++]),D<128?S:(S|=(127&(D=Z[this.pos++]))<<7,D<128?S:(S|=(127&(D=Z[this.pos++]))<<14,D<128?S:(S|=(127&(D=Z[this.pos++]))<<21,D<128?S:function(ie,pe,xe){var He,at,wt=xe.buf;if(He=(112&(at=wt[xe.pos++]))>>4,at<128||(He|=(127&(at=wt[xe.pos++]))<<3,at<128)||(He|=(127&(at=wt[xe.pos++]))<<10,at<128)||(He|=(127&(at=wt[xe.pos++]))<<17,at<128)||(He|=(127&(at=wt[xe.pos++]))<<24,at<128)||(He|=(1&(at=wt[xe.pos++]))<<31,at<128))return om(ie,He,pe);throw new Error("Expected varint not more than 10 bytes")}(S|=(15&(D=Z[this.pos]))<<28,I,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var I=this.readVarint();return I%2==1?(I+1)/-2:I/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var I=this.readVarint()+this.pos,S=this.pos;return this.pos=I,I-S>=12&&Mw?function(D,Z,ie){return Mw.decode(D.subarray(Z,ie))}(this.buf,S,I):function(D,Z,ie){for(var pe="",xe=Z;xe239?4:Ht>223?3:Ht>191?2:1;if(xe+pr>ie)break;pr===1?Ht<128&&(rr=Ht):pr===2?(192&(He=D[xe+1]))==128&&(rr=(31&Ht)<<6|63&He)<=127&&(rr=null):pr===3?(at=D[xe+2],(192&(He=D[xe+1]))==128&&(192&at)==128&&((rr=(15&Ht)<<12|(63&He)<<6|63&at)<=2047||rr>=55296&&rr<=57343)&&(rr=null)):pr===4&&(at=D[xe+2],wt=D[xe+3],(192&(He=D[xe+1]))==128&&(192&at)==128&&(192&wt)==128&&((rr=(15&Ht)<<18|(63&He)<<12|(63&at)<<6|63&wt)<=65535||rr>=1114112)&&(rr=null)),rr===null?(rr=65533,pr=1):rr>65535&&(rr-=65536,pe+=String.fromCharCode(rr>>>10&1023|55296),rr=56320|1023&rr),pe+=String.fromCharCode(rr),xe+=pr}return pe}(this.buf,S,I)},readBytes:function(){var I=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,I);return this.pos=I,S},readPackedVarint:function(I,S){if(this.type!==Zf.Bytes)return I.push(this.readVarint(S));var D=Lp(this);for(I=I||[];this.pos127;);else if(S===Zf.Bytes)this.pos=this.readVarint()+this.pos;else if(S===Zf.Fixed32)this.pos+=4;else{if(S!==Zf.Fixed64)throw new Error("Unimplemented type: "+S);this.pos+=8}},writeTag:function(I,S){this.writeVarint(I<<3|S)},realloc:function(I){for(var S=this.length||16;S268435455||I<0?function(S,D){var Z,ie;if(S>=0?(Z=S%4294967296|0,ie=S/4294967296|0):(ie=~(-S/4294967296),4294967295^(Z=~(-S%4294967296))?Z=Z+1|0:(Z=0,ie=ie+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),function(pe,xe,He){He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,pe>>>=7,He.buf[He.pos++]=127&pe|128,He.buf[He.pos]=127&(pe>>>=7)}(Z,0,D),function(pe,xe){var He=(7&pe)<<4;xe.buf[xe.pos++]|=He|((pe>>>=3)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(xe.buf[xe.pos++]=127&pe)))))}(ie,D)}(I,this):(this.realloc(4),this.buf[this.pos++]=127&I|(I>127?128:0),I<=127||(this.buf[this.pos++]=127&(I>>>=7)|(I>127?128:0),I<=127||(this.buf[this.pos++]=127&(I>>>=7)|(I>127?128:0),I<=127||(this.buf[this.pos++]=I>>>7&127))))},writeSVarint:function(I){this.writeVarint(I<0?2*-I-1:2*I)},writeBoolean:function(I){this.writeVarint(!!I)},writeString:function(I){I=String(I),this.realloc(4*I.length),this.pos++;var S=this.pos;this.pos=function(Z,ie,pe){for(var xe,He,at=0;at55295&&xe<57344){if(!He){xe>56319||at+1===ie.length?(Z[pe++]=239,Z[pe++]=191,Z[pe++]=189):He=xe;continue}if(xe<56320){Z[pe++]=239,Z[pe++]=191,Z[pe++]=189,He=xe;continue}xe=He-55296<<10|xe-56320|65536,He=null}else He&&(Z[pe++]=239,Z[pe++]=191,Z[pe++]=189,He=null);xe<128?Z[pe++]=xe:(xe<2048?Z[pe++]=xe>>6|192:(xe<65536?Z[pe++]=xe>>12|224:(Z[pe++]=xe>>18|240,Z[pe++]=xe>>12&63|128),Z[pe++]=xe>>6&63|128),Z[pe++]=63&xe|128)}return pe}(this.buf,I,this.pos);var D=this.pos-S;D>=128&&Ew(S,D,this),this.pos=S-1,this.writeVarint(D),this.pos+=D},writeFloat:function(I){this.realloc(4),A1(this.buf,I,this.pos,!0,23,4),this.pos+=4},writeDouble:function(I){this.realloc(8),A1(this.buf,I,this.pos,!0,52,8),this.pos+=8},writeBytes:function(I){var S=I.length;this.writeVarint(S),this.realloc(S);for(var D=0;D=128&&Ew(D,Z,this),this.pos=D-1,this.writeVarint(Z),this.pos+=Z},writeMessage:function(I,S,D){this.writeTag(I,Zf.Bytes),this.writeRawMessage(S,D)},writePackedVarint:function(I,S){S.length&&this.writeMessage(I,Nx,S)},writePackedSVarint:function(I,S){S.length&&this.writeMessage(I,N8,S)},writePackedBoolean:function(I,S){S.length&&this.writeMessage(I,H8,S)},writePackedFloat:function(I,S){S.length&&this.writeMessage(I,U8,S)},writePackedDouble:function(I,S){S.length&&this.writeMessage(I,V8,S)},writePackedFixed32:function(I,S){S.length&&this.writeMessage(I,EQ,S)},writePackedSFixed32:function(I,S){S.length&&this.writeMessage(I,G8,S)},writePackedFixed64:function(I,S){S.length&&this.writeMessage(I,W8,S)},writePackedSFixed64:function(I,S){S.length&&this.writeMessage(I,j8,S)},writeBytesField:function(I,S){this.writeTag(I,Zf.Bytes),this.writeBytes(S)},writeFixed32Field:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeSFixed64(S)},writeVarintField:function(I,S){this.writeTag(I,Zf.Varint),this.writeVarint(S)},writeSVarintField:function(I,S){this.writeTag(I,Zf.Varint),this.writeSVarint(S)},writeStringField:function(I,S){this.writeTag(I,Zf.Bytes),this.writeString(S)},writeFloatField:function(I,S){this.writeTag(I,Zf.Fixed32),this.writeFloat(S)},writeDoubleField:function(I,S){this.writeTag(I,Zf.Fixed64),this.writeDouble(S)},writeBooleanField:function(I,S){this.writeVarintField(I,!!S)}};var tM=o(Ed);let rM=3;function kQ(I,S,D){I===1&&D.readMessage(Z8,S)}function Z8(I,S,D){if(I===3){let{id:Z,bitmap:ie,width:pe,height:xe,left:He,top:at,advance:wt}=D.readMessage(uC,{});S.push({id:Z,bitmap:new bu({width:pe+2*rM,height:xe+2*rM},ie),metrics:{width:pe,height:xe,left:He,top:at,advance:wt}})}}function uC(I,S,D){I===1?S.id=D.readVarint():I===2?S.bitmap=D.readBytes():I===3?S.width=D.readVarint():I===4?S.height=D.readVarint():I===5?S.left=D.readSVarint():I===6?S.top=D.readSVarint():I===7&&(S.advance=D.readVarint())}let fC=rM;function iM(I){let S=0,D=0;for(let xe of I)S+=xe.w*xe.h,D=Math.max(D,xe.w);I.sort((xe,He)=>He.h-xe.h);let Z=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),D),h:1/0}],ie=0,pe=0;for(let xe of I)for(let He=Z.length-1;He>=0;He--){let at=Z[He];if(!(xe.w>at.w||xe.h>at.h)){if(xe.x=at.x,xe.y=at.y,pe=Math.max(pe,xe.y+xe.h),ie=Math.max(ie,xe.x+xe.w),xe.w===at.w&&xe.h===at.h){let wt=Z.pop();He=0&&Z>=S&&Lw[this.text.charCodeAt(Z)];Z--)D--;this.text=this.text.substring(S,D),this.sectionIndex=this.sectionIndex.slice(S,D)}substring(S,D){let Z=new S1;return Z.text=this.text.substring(S,D),Z.sectionIndex=this.sectionIndex.slice(S,D),Z.sections=this.sections,Z}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,D)=>Math.max(S,this.sections[D].scale),0)}addTextSection(S,D){this.text+=S.text,this.sections.push(Vx.forText(S.scale,S.fontStack||D));let Z=this.sections.length-1;for(let ie=0;ie=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hx(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr){let ri=S1.fromFeature(I,ie),Ii;rr===i.ah.vertical&&ri.verticalizePunctuation();let{processBidirectionalText:Zi,processStyledBidirectionalText:da}=zs;if(Zi&&ri.sections.length===1){Ii=[];let Va=Zi(ri.toString(),M1(ri,wt,pe,S,Z,Ar));for(let hl of Va){let iu=new S1;iu.text=hl,iu.sections=ri.sections;for(let Su=0;Su0&&ev>rh&&(rh=ev)}else{let Pc=iu[qf.fontStack],uh=Pc&&Pc[sc];if(uh&&uh.rect)P1=uh.rect,Hc=uh.metrics;else{let ev=hl[qf.fontStack],yy=ev&&ev[sc];if(!yy)continue;Hc=yy.metrics}Ip=(zh-qf.scale)*Ff}Qp?(Va.verticalizable=!0,Zh.push({glyph:sc,imageName:v0,x:Lu,y:oc+Ip,vertical:Qp,scale:qf.scale,fontStack:qf.fontStack,sectionIndex:mc,metrics:Hc,rect:P1}),Lu+=Gv*qf.scale+Ts):(Zh.push({glyph:sc,imageName:v0,x:Lu,y:oc+Ip,vertical:Qp,scale:qf.scale,fontStack:qf.fontStack,sectionIndex:mc,metrics:Hc,rect:P1}),Lu+=Hc.advance*qf.scale+Ts)}Zh.length!==0&&(tc=Math.max(Lu-Ts,tc),sm(Zh,0,Zh.length-1,$p,rh)),Lu=0;let Pp=Qs*zh+rh;fd.lineOffset=Math.max(rh,Cd),oc+=Pp,Ch=Math.max(Pp,Ch),++ud}var Lh;let Wd=oc-kh,{horizontalAlign:jd,verticalAlign:Zd}=Pw(gu);(function(Kc,zh,Cd,fd,Zh,rh,Pp,fp,qf){let mc=(zh-Cd)*Zh,sc=0;sc=rh!==Pp?-fp*fd-kh:(-fd*qf+.5)*Pp;for(let Ip of Kc)for(let Hc of Ip.positionedGlyphs)Hc.x+=mc,Hc.y+=sc})(Va.positionedLines,$p,jd,Zd,tc,Ch,Qs,Wd,Zl.length),Va.top+=-Zd*Wd,Va.bottom=Va.top+Wd,Va.left+=-jd*tc,Va.right=Va.left+tc}(jn,S,D,Z,Ii,xe,He,at,rr,wt,pr,Vr),!function(Va){for(let hl of Va)if(hl.positionedGlyphs.length!==0)return!1;return!0}(cn)&&jn}let Lw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},X8={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},Y8={40:!0};function cC(I,S,D,Z,ie,pe){if(S.imageName){let xe=Z[S.imageName];return xe?xe.displaySize[0]*S.scale*Ff/pe+ie:0}{let xe=D[S.fontStack],He=xe&&xe[I];return He?He.metrics.advance*S.scale+ie:0}}function hC(I,S,D,Z){let ie=Math.pow(I-S,2);return Z?I=0,wt=0;for(let rr=0;rrwt){let Ht=Math.ceil(pe/wt);ie*=Ht/xe,xe=Ht}return{x1:Z,y1:ie,x2:Z+pe,y2:ie+xe}}function vC(I,S,D,Z,ie,pe){let xe=I.image,He;if(xe.content){let Ii=xe.content,Zi=xe.pixelRatio||1;He=[Ii[0]/Zi,Ii[1]/Zi,xe.displaySize[0]-Ii[2]/Zi,xe.displaySize[1]-Ii[3]/Zi]}let at=S.left*pe,wt=S.right*pe,Ht,rr,pr,Ar;D==="width"||D==="both"?(Ar=ie[0]+at-Z[3],rr=ie[0]+wt+Z[1]):(Ar=ie[0]+(at+wt-xe.displaySize[0])/2,rr=Ar+xe.displaySize[0]);let Vr=S.top*pe,ri=S.bottom*pe;return D==="height"||D==="both"?(Ht=ie[1]+Vr-Z[0],pr=ie[1]+ri+Z[2]):(Ht=ie[1]+(Vr+ri-xe.displaySize[1])/2,pr=Ht+xe.displaySize[1]),{image:xe,top:Ht,right:rr,bottom:pr,left:Ar,collisionPadding:He}}let Wx=255,p0=128,lm=Wx*p0;function yC(I,S){let{expression:D}=S;if(D.kind==="constant")return{kind:"constant",layoutSize:D.evaluate(new Fo(I+1))};if(D.kind==="source")return{kind:"source"};{let{zoomStops:Z,interpolationType:ie}=D,pe=0;for(;pexe.id),this.index=S.index,this.pixelRatio=S.pixelRatio,this.sourceLayerIndex=S.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ws([]),this.placementViewportMatrix=Ws([]);let D=this.layers[0]._unevaluatedLayout._values;this.textSizeData=yC(this.zoom,D["text-size"]),this.iconSizeData=yC(this.zoom,D["icon-size"]);let Z=this.layers[0].layout,ie=Z.get("symbol-sort-key"),pe=Z.get("symbol-z-order");this.canOverlap=nM(Z,"text-overlap","text-allow-overlap")!=="never"||nM(Z,"icon-overlap","icon-allow-overlap")!=="never"||Z.get("text-ignore-placement")||Z.get("icon-ignore-placement"),this.sortFeaturesByKey=pe!=="viewport-y"&&!ie.isConstant(),this.sortFeaturesByY=(pe==="viewport-y"||pe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,Z.get("symbol-placement")==="point"&&(this.writingModes=Z.get("text-writing-mode").map(xe=>i.ah[xe])),this.stateDependentLayerIds=this.layers.filter(xe=>xe.isStateDependent()).map(xe=>xe.id),this.sourceID=S.sourceID}createArrays(){this.text=new sM(new qu(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new sM(new qu(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new $l,this.lineVertexArray=new pl,this.symbolInstances=new il,this.textAnchorOffsets=new Ll}calculateGlyphDependencies(S,D,Z,ie,pe){for(let xe=0;xe0)&&(xe.value.kind!=="constant"||xe.value.value.length>0),Ht=at.value.kind!=="constant"||!!at.value.value||Object.keys(at.parameters).length>0,rr=pe.get("symbol-sort-key");if(this.features=[],!wt&&!Ht)return;let pr=D.iconDependencies,Ar=D.glyphDependencies,Vr=D.availableImages,ri=new Fo(this.zoom);for(let{feature:Ii,id:Zi,index:da,sourceLayerIndex:cn}of S){let jn=ie._featureFilter.needGeometry,Va=ff(Ii,jn);if(!ie._featureFilter.filter(ri,Va,Z))continue;let hl,iu;if(jn||(Va.geometry=of(Ii)),wt){let Zl=ie.getValueAndResolveTokens("text-field",Va,Z,Vr),Qs=zr.factory(Zl),gu=this.hasRTLText=this.hasRTLText||oM(Qs);(!gu||zs.getRTLTextPluginStatus()==="unavailable"||gu&&zs.isParsed())&&(hl=nm(Qs,ie,Va))}if(Ht){let Zl=ie.getValueAndResolveTokens("icon-image",Va,Z,Vr);iu=Zl instanceof oi?Zl:oi.fromString(Zl)}if(!hl&&!iu)continue;let Su=this.sortFeaturesByKey?rr.evaluate(Va,{},Z):void 0;if(this.features.push({id:Zi,text:hl,icon:iu,index:da,sourceLayerIndex:cn,geometry:Va.geometry,properties:Ii.properties,type:J8[Ii.type],sortKey:Su}),iu&&(pr[iu.name]=!0),hl){let Zl=xe.evaluate(Va,{},Z).join(","),Qs=pe.get("text-rotation-alignment")!=="viewport"&&pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let gu of hl.sections)if(gu.image)pr[gu.image.name]=!0;else{let cu=Lo(hl.toString()),uu=gu.fontStack||Zl,Ts=Ar[uu]=Ar[uu]||{};this.calculateGlyphDependencies(gu.text,Ts,Qs,this.allowVerticalPlacement,cu)}}}pe.get("symbol-placement")==="line"&&(this.features=function(Ii){let Zi={},da={},cn=[],jn=0;function Va(Zl){cn.push(Ii[Zl]),jn++}function hl(Zl,Qs,gu){let cu=da[Zl];return delete da[Zl],da[Qs]=cu,cn[cu].geometry[0].pop(),cn[cu].geometry[0]=cn[cu].geometry[0].concat(gu[0]),cu}function iu(Zl,Qs,gu){let cu=Zi[Qs];return delete Zi[Qs],Zi[Zl]=cu,cn[cu].geometry[0].shift(),cn[cu].geometry[0]=gu[0].concat(cn[cu].geometry[0]),cu}function Su(Zl,Qs,gu){let cu=gu?Qs[0][Qs[0].length-1]:Qs[0][0];return`${Zl}:${cu.x}:${cu.y}`}for(let Zl=0;ZlZl.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ii,Zi)=>Ii.sortKey-Zi.sortKey)}update(S,D,Z){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,D,this.layers,Z),this.icon.programConfigurations.updatePaintArrays(S,D,this.layers,Z))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(S){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(S),this.iconCollisionBox.upload(S)),this.text.upload(S,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(S,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(S,D){let Z=this.lineVertexArray.length;if(S.segment!==void 0){let ie=S.dist(D[S.segment+1]),pe=S.dist(D[S.segment]),xe={};for(let He=S.segment+1;He=0;He--)xe[He]={x:D[He].x,y:D[He].y,tileUnitDistanceFromAnchor:pe},He>0&&(pe+=D[He-1].dist(D[He]));for(let He=0;He0}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(S,D){let Z=S.placedSymbolArray.get(D),ie=Z.vertexStartIndex+4*Z.numGlyphs;for(let pe=Z.vertexStartIndex;peie[He]-ie[at]||pe[at]-pe[He]),xe}addToSortKeyRanges(S,D){let Z=this.sortKeyRanges[this.sortKeyRanges.length-1];Z&&Z.sortKey===D?Z.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:D,symbolInstanceStart:S,symbolInstanceEnd:S+1})}sortFeatures(S){if(this.sortFeaturesByY&&this.sortedAngle!==S&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let D of this.symbolInstanceIndexes){let Z=this.symbolInstances.get(D);this.featureSortOrder.push(Z.featureIndex),[Z.rightJustifiedTextSymbolIndex,Z.centerJustifiedTextSymbolIndex,Z.leftJustifiedTextSymbolIndex].forEach((ie,pe,xe)=>{ie>=0&&xe.indexOf(ie)===pe&&this.addIndicesForPlacedSymbol(this.text,ie)}),Z.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Z.verticalPlacedTextSymbolIndex),Z.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Z.placedIconSymbolIndex),Z.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Z.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Yc,jx;gi("SymbolBucket",E1,{omit:["layers","collisionBoxArray","features","compareText"]}),E1.MAX_GLYPHS=65535,E1.addDynamicAttributes=aM;var Dw={get paint(){return jx=jx||new oe({"icon-opacity":new _s(fe.paint_symbol["icon-opacity"]),"icon-color":new _s(fe.paint_symbol["icon-color"]),"icon-halo-color":new _s(fe.paint_symbol["icon-halo-color"]),"icon-halo-width":new _s(fe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _s(fe.paint_symbol["icon-halo-blur"]),"icon-translate":new Uo(fe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Uo(fe.paint_symbol["icon-translate-anchor"]),"text-opacity":new _s(fe.paint_symbol["text-opacity"]),"text-color":new _s(fe.paint_symbol["text-color"],{runtimeType:Je,getOverride:I=>I.textColor,hasOverride:I=>!!I.textColor}),"text-halo-color":new _s(fe.paint_symbol["text-halo-color"]),"text-halo-width":new _s(fe.paint_symbol["text-halo-width"]),"text-halo-blur":new _s(fe.paint_symbol["text-halo-blur"]),"text-translate":new Uo(fe.paint_symbol["text-translate"]),"text-translate-anchor":new Uo(fe.paint_symbol["text-translate-anchor"])})},get layout(){return Yc=Yc||new oe({"symbol-placement":new Uo(fe.layout_symbol["symbol-placement"]),"symbol-spacing":new Uo(fe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Uo(fe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _s(fe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Uo(fe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Uo(fe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Uo(fe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Uo(fe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Uo(fe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Uo(fe.layout_symbol["icon-rotation-alignment"]),"icon-size":new _s(fe.layout_symbol["icon-size"]),"icon-text-fit":new Uo(fe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Uo(fe.layout_symbol["icon-text-fit-padding"]),"icon-image":new _s(fe.layout_symbol["icon-image"]),"icon-rotate":new _s(fe.layout_symbol["icon-rotate"]),"icon-padding":new _s(fe.layout_symbol["icon-padding"]),"icon-keep-upright":new Uo(fe.layout_symbol["icon-keep-upright"]),"icon-offset":new _s(fe.layout_symbol["icon-offset"]),"icon-anchor":new _s(fe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Uo(fe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Uo(fe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Uo(fe.layout_symbol["text-rotation-alignment"]),"text-field":new _s(fe.layout_symbol["text-field"]),"text-font":new _s(fe.layout_symbol["text-font"]),"text-size":new _s(fe.layout_symbol["text-size"]),"text-max-width":new _s(fe.layout_symbol["text-max-width"]),"text-line-height":new Uo(fe.layout_symbol["text-line-height"]),"text-letter-spacing":new _s(fe.layout_symbol["text-letter-spacing"]),"text-justify":new _s(fe.layout_symbol["text-justify"]),"text-radial-offset":new _s(fe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Uo(fe.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new _s(fe.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new _s(fe.layout_symbol["text-anchor"]),"text-max-angle":new Uo(fe.layout_symbol["text-max-angle"]),"text-writing-mode":new Uo(fe.layout_symbol["text-writing-mode"]),"text-rotate":new _s(fe.layout_symbol["text-rotate"]),"text-padding":new Uo(fe.layout_symbol["text-padding"]),"text-keep-upright":new Uo(fe.layout_symbol["text-keep-upright"]),"text-transform":new _s(fe.layout_symbol["text-transform"]),"text-offset":new _s(fe.layout_symbol["text-offset"]),"text-allow-overlap":new Uo(fe.layout_symbol["text-allow-overlap"]),"text-overlap":new Uo(fe.layout_symbol["text-overlap"]),"text-ignore-placement":new Uo(fe.layout_symbol["text-ignore-placement"]),"text-optional":new Uo(fe.layout_symbol["text-optional"])})}};class Zx{constructor(S){if(S.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=S.property.overrides?S.property.overrides.runtimeType:ct,this.defaultValue=S}evaluate(S){if(S.formattedSection){let D=this.defaultValue.property.overrides;if(D&&D.hasOverride(S.formattedSection))return D.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default}eachChild(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}gi("FormatSectionOverride",Zx,{omit:["defaultValue"]});class ug extends B{constructor(S){super(S,Dw)}recalculate(S,D){if(super.recalculate(S,D),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 Z=this.layout.get("text-writing-mode");if(Z){let ie=[];for(let pe of Z)ie.indexOf(pe)<0&&ie.push(pe);this.layout._values["text-writing-mode"]=ie}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(S,D,Z,ie){let pe=this.layout.get(S).evaluate(D,{},Z,ie),xe=this._unevaluatedLayout._values[S];return xe.isDataDriven()||Cs(xe.value)||!pe?pe:function(He,at){return at.replace(/{([^{}]+)}/g,(wt,Ht)=>He&&Ht in He?String(He[Ht]):"")}(D.properties,pe)}createBucket(S){return new E1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let S of Dw.paint.overridableProperties){if(!ug.hasPaintOverride(this.layout,S))continue;let D=this.paint.get(S),Z=new Zx(D),ie=new Jn(Z,D.property.specification),pe=null;pe=D.value.kind==="constant"||D.value.kind==="source"?new Zo("source",ie):new Eo("composite",ie,D.value.zoomStops),this.paint._values[S]=new cl(D.property,pe,D.parameters)}}_handleOverridablePaintPropertyUpdate(S,D,Z){return!(!this.layout||D.isDataDriven()||Z.isDataDriven())&&ug.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,D){let Z=S.get("text-field"),ie=Dw.paint.properties[D],pe=!1,xe=He=>{for(let at of He)if(ie.overrides&&ie.overrides.hasOverride(at))return void(pe=!0)};if(Z.value.kind==="constant"&&Z.value.value instanceof zr)xe(Z.value.value.sections);else if(Z.value.kind==="source"){let He=wt=>{pe||(wt instanceof Ur&&Yr(wt.value)===ir?xe(wt.value.sections):wt instanceof Xn?xe(wt.sections):wt.eachChild(He))},at=Z.value;at._styleExpression&&He(at._styleExpression.expression)}return pe}}let mC;var Xx={get paint(){return mC=mC||new oe({"background-color":new Uo(fe.paint_background["background-color"]),"background-pattern":new Il(fe.paint_background["background-pattern"]),"background-opacity":new Uo(fe.paint_background["background-opacity"])})}};class Q8 extends B{constructor(S){super(S,Xx)}}let lM;var gC={get paint(){return lM=lM||new oe({"raster-opacity":new Uo(fe.paint_raster["raster-opacity"]),"raster-hue-rotate":new Uo(fe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Uo(fe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Uo(fe.paint_raster["raster-brightness-max"]),"raster-saturation":new Uo(fe.paint_raster["raster-saturation"]),"raster-contrast":new Uo(fe.paint_raster["raster-contrast"]),"raster-resampling":new Uo(fe.paint_raster["raster-resampling"]),"raster-fade-duration":new Uo(fe.paint_raster["raster-fade-duration"])})}};class Yx extends B{constructor(S){super(S,gC)}}class uM extends B{constructor(S){super(S,{}),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.painter.context.gl)},this.implementation=S}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 fM{constructor(S){this._methodToThrottle=S,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 cM=63710088e-1;class dy{constructor(S,D){if(isNaN(S)||isNaN(D))throw new Error(`Invalid LngLat object: (${S}, ${D})`);if(this.lng=+S,this.lat=+D,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dy(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let D=Math.PI/180,Z=this.lat*D,ie=S.lat*D,pe=Math.sin(Z)*Math.sin(ie)+Math.cos(Z)*Math.cos(ie)*Math.cos((S.lng-this.lng)*D);return cM*Math.acos(Math.min(pe,1))}static convert(S){if(S instanceof dy)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new dy(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new dy(Number("lng"in S?S.lng:S.lon),Number(S.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 k1=2*Math.PI*cM;function _C(I){return k1*Math.cos(I*Math.PI/180)}function Rw(I){return(180+I)/360}function xC(I){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+I*Math.PI/360)))/360}function Fw(I,S){return I/_C(S)}function Kx(I){return 360/Math.PI*Math.atan(Math.exp((180-360*I)*Math.PI/180))-90}class Jx{constructor(S,D,Z=0){this.x=+S,this.y=+D,this.z=+Z}static fromLngLat(S,D=0){let Z=dy.convert(S);return new Jx(Rw(Z.lng),xC(Z.lat),Fw(D,Z.lat))}toLngLat(){return new dy(360*this.x-180,Kx(this.y))}toAltitude(){return this.z*_C(Kx(this.y))}meterInMercatorCoordinateUnits(){return 1/k1*(S=Kx(this.y),1/Math.cos(S*Math.PI/180));var S}}function yv(I,S,D){var Z=2*Math.PI*6378137/256/Math.pow(2,D);return[I*Z-2*Math.PI*6378137/2,S*Z-2*Math.PI*6378137/2]}class hM{constructor(S,D,Z){if(!function(ie,pe,xe){return!(ie<0||ie>25||xe<0||xe>=Math.pow(2,ie)||pe<0||pe>=Math.pow(2,ie))}(S,D,Z))throw new Error(`x=${D}, y=${Z}, z=${S} outside of bounds. 0<=x<${Math.pow(2,S)}, 0<=y<${Math.pow(2,S)} 0<=z<=25 `);this.z=S,this.x=D,this.y=Z,this.key=$x(0,S,S,D,Z)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,D,Z){let ie=(xe=this.y,He=this.z,at=yv(256*(pe=this.x),256*(xe=Math.pow(2,He)-xe-1),He),wt=yv(256*(pe+1),256*(xe+1),He),at[0]+","+at[1]+","+wt[0]+","+wt[1]);var pe,xe,He,at,wt;let Ht=function(rr,pr,Ar){let Vr,ri="";for(let Ii=rr;Ii>0;Ii--)Vr=1<1?"@2x":"").replace(/{quadkey}/g,Ht).replace(/{bbox-epsg-3857}/g,ie)}isChildOf(S){let D=this.z-S.z;return D>0&&S.x===this.x>>D&&S.y===this.y>>D}getTilePoint(S){let D=Math.pow(2,this.z);return new l((S.x*D-this.x)*Rl,(S.y*D-this.y)*Rl)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bC{constructor(S,D){this.wrap=S,this.canonical=D,this.key=$x(S,D.z,D.z,D.x,D.y)}}class Jp{constructor(S,D,Z,ie,pe){if(S= z; overscaledZ = ${S}; z = ${Z}`);this.overscaledZ=S,this.wrap=D,this.canonical=new hM(Z,+ie,+pe),this.key=$x(D,S,Z,ie,pe)}clone(){return new Jp(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(S){return this.overscaledZ===S.overscaledZ&&this.wrap===S.wrap&&this.canonical.equals(S.canonical)}scaledTo(S){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let D=this.canonical.z-S;return S>this.canonical.z?new Jp(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jp(S,this.wrap,S,this.canonical.x>>D,this.canonical.y>>D)}calculateScaledKey(S,D){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let Z=this.canonical.z-S;return S>this.canonical.z?$x(this.wrap*+D,S,this.canonical.z,this.canonical.x,this.canonical.y):$x(this.wrap*+D,S,S,this.canonical.x>>Z,this.canonical.y>>Z)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let D=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>D&&S.canonical.y===this.canonical.y>>D}children(S){if(this.overscaledZ>=S)return[new Jp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let D=this.canonical.z+1,Z=2*this.canonical.x,ie=2*this.canonical.y;return[new Jp(D,this.wrap,D,Z,ie),new Jp(D,this.wrap,D,Z+1,ie),new Jp(D,this.wrap,D,Z,ie+1),new Jp(D,this.wrap,D,Z+1,ie+1)]}isLessThan(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.ythis.max&&(this.max=rr),rr=this.dim+1||D<-1||D>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(D+1)*this.stride+(S+1)}unpack(S,D,Z){return S*this.redFactor+D*this.greenFactor+Z*this.blueFactor-this.baseShift}getPixels(){return new al({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,D,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");let ie=D*this.dim,pe=D*this.dim+this.dim,xe=Z*this.dim,He=Z*this.dim+this.dim;switch(D){case-1:ie=pe-1;break;case 1:pe=ie+1}switch(Z){case-1:xe=He-1;break;case 1:He=xe+1}let at=-D*this.dim,wt=-Z*this.dim;for(let Ht=xe;Ht=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${S} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[S]}}class dM{constructor(S,D,Z,ie,pe){this.type="Feature",this._vectorTileFeature=S,S._z=D,S._x=Z,S._y=ie,this.properties=S.properties,this.id=pe}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(S){this._geometry=S}toJSON(){let S={geometry:this.geometry};for(let D in this)D!=="_geometry"&&D!=="_vectorTileFeature"&&(S[D]=this[D]);return S}}class fg{constructor(S,D){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new ui(Rl,16,0),this.grid3D=new ui(Rl,16,0),this.featureIndexArray=new ku,this.promoteId=D}insert(S,D,Z,ie,pe,xe){let He=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Z,ie,pe);let at=xe?this.grid3D:this.grid;for(let wt=0;wt=0&&rr[3]>=0&&at.insert(He,rr[0],rr[1],rr[2],rr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new qi.VectorTile(new tM(this.rawTileData)).layers,this.sourceLayerCoder=new TC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(S,D,Z,ie){this.loadVTLayers();let pe=S.params||{},xe=Rl/S.tileSize/S.scale,He=Sn(pe.filter),at=S.queryGeometry,wt=S.queryPadding*xe,Ht=SC(at),rr=this.grid.query(Ht.minX-wt,Ht.minY-wt,Ht.maxX+wt,Ht.maxY+wt),pr=SC(S.cameraQueryGeometry),Ar=this.grid3D.query(pr.minX-wt,pr.minY-wt,pr.maxX+wt,pr.maxY+wt,(Ii,Zi,da,cn)=>function(jn,Va,hl,iu,Su){for(let Qs of jn)if(Va<=Qs.x&&hl<=Qs.y&&iu>=Qs.x&&Su>=Qs.y)return!0;let Zl=[new l(Va,hl),new l(Va,Su),new l(iu,Su),new l(iu,hl)];if(jn.length>2){for(let Qs of Zl)if(Vs(jn,Qs))return!0}for(let Qs=0;Qs(cn||(cn=of(jn)),Va.queryIntersectsFeature(at,jn,hl,cn,this.z,S.transform,xe,S.pixelPosMatrix)))}return Vr}loadMatchingFeature(S,D,Z,ie,pe,xe,He,at,wt,Ht,rr){let pr=this.bucketLayerIDs[D];if(xe&&!function(Ii,Zi){for(let da=0;da=0)return!0;return!1}(xe,pr))return;let Ar=this.sourceLayerCoder.decode(Z),Vr=this.vtLayers[Ar].feature(ie);if(pe.needGeometry){let Ii=ff(Vr,!0);if(!pe.filter(new Fo(this.tileID.overscaledZ),Ii,this.tileID.canonical))return}else if(!pe.filter(new Fo(this.tileID.overscaledZ),Vr))return;let ri=this.getId(Vr,Ar);for(let Ii=0;Ii{let He=S instanceof xl?S.get(xe):null;return He&&He.evaluate?He.evaluate(D,Z,ie):He})}function SC(I){let S=1/0,D=1/0,Z=-1/0,ie=-1/0;for(let pe of I)S=Math.min(S,pe.x),D=Math.min(D,pe.y),Z=Math.max(Z,pe.x),ie=Math.max(ie,pe.y);return{minX:S,minY:D,maxX:Z,maxY:ie}}function eB(I,S){return S-I}function MC(I,S,D,Z,ie){let pe=[];for(let xe=0;xe=Z&&rr.x>=Z||(Ht.x>=Z?Ht=new l(Z,Ht.y+(Z-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round():rr.x>=Z&&(rr=new l(Z,Ht.y+(Z-Ht.x)/(rr.x-Ht.x)*(rr.y-Ht.y))._round()),Ht.y>=ie&&rr.y>=ie||(Ht.y>=ie?Ht=new l(Ht.x+(ie-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),ie)._round():rr.y>=ie&&(rr=new l(Ht.x+(ie-Ht.y)/(rr.y-Ht.y)*(rr.x-Ht.x),ie)._round()),at&&Ht.equals(at[at.length-1])||(at=[Ht],pe.push(at)),at.push(rr)))))}}return pe}gi("FeatureIndex",fg,{omit:["rawTileData","sourceLayerCoder"]});class py extends l{constructor(S,D,Z,ie){super(S,D),this.angle=Z,ie!==void 0&&(this.segment=ie)}clone(){return new py(this.x,this.y,this.angle,this.segment)}}function pM(I,S,D,Z,ie){if(S.segment===void 0||D===0)return!0;let pe=S,xe=S.segment+1,He=0;for(;He>-D/2;){if(xe--,xe<0)return!1;He-=I[xe].dist(pe),pe=I[xe]}He+=I[xe].dist(I[xe+1]),xe++;let at=[],wt=0;for(;HeZ;)wt-=at.shift().angleDelta;if(wt>ie)return!1;xe++,He+=Ht.dist(rr)}return!0}function EC(I){let S=0;for(let D=0;Dwt){let Vr=(wt-at)/Ar,ri=ia.number(rr.x,pr.x,Vr),Ii=ia.number(rr.y,pr.y,Vr),Zi=new py(ri,Ii,pr.angleTo(rr),Ht);return Zi._round(),!xe||pM(I,Zi,He,xe,S)?Zi:void 0}at+=Ar}}function rB(I,S,D,Z,ie,pe,xe,He,at){let wt=kC(Z,pe,xe),Ht=CC(Z,ie),rr=Ht*xe,pr=I[0].x===0||I[0].x===at||I[0].y===0||I[0].y===at;return S-rr=0&&jn=0&&Va=0&&pr+wt<=Ht){let hl=new py(jn,Va,da,Vr);hl._round(),Z&&!pM(I,hl,pe,Z,ie)||Ar.push(hl)}}rr+=Zi}return He||Ar.length||xe||(Ar=LC(I,rr/2,D,Z,ie,pe,xe,!0,at)),Ar}gi("Anchor",py);let C1=kd;function zC(I,S,D,Z){let ie=[],pe=I.image,xe=pe.pixelRatio,He=pe.paddedRect.w-2*C1,at=pe.paddedRect.h-2*C1,wt={x1:I.left,y1:I.top,x2:I.right,y2:I.bottom},Ht=pe.stretchX||[[0,He]],rr=pe.stretchY||[[0,at]],pr=(Ts,wu)=>Ts+wu[1]-wu[0],Ar=Ht.reduce(pr,0),Vr=rr.reduce(pr,0),ri=He-Ar,Ii=at-Vr,Zi=0,da=Ar,cn=0,jn=Vr,Va=0,hl=ri,iu=0,Su=Ii;if(pe.content&&Z){let Ts=pe.content,wu=Ts[2]-Ts[0],fu=Ts[3]-Ts[1];(pe.textFitWidth||pe.textFitHeight)&&(wt=pC(I)),Zi=vy(Ht,0,Ts[0]),cn=vy(rr,0,Ts[1]),da=vy(Ht,Ts[0],Ts[2]),jn=vy(rr,Ts[1],Ts[3]),Va=Ts[0]-Zi,iu=Ts[1]-cn,hl=wu-da,Su=fu-jn}let Zl=wt.x1,Qs=wt.y1,gu=wt.x2-Zl,cu=wt.y2-Qs,uu=(Ts,wu,fu,Lu)=>{let oc=qw(Ts.stretch-Zi,da,gu,Zl),tc=L1(Ts.fixed-Va,hl,Ts.stretch,Ar),Ch=qw(wu.stretch-cn,jn,cu,Qs),$p=L1(wu.fixed-iu,Su,wu.stretch,Vr),ud=qw(fu.stretch-Zi,da,gu,Zl),Lh=L1(fu.fixed-Va,hl,fu.stretch,Ar),Wd=qw(Lu.stretch-cn,jn,cu,Qs),jd=L1(Lu.fixed-iu,Su,Lu.stretch,Vr),Zd=new l(oc,Ch),Kc=new l(ud,Ch),zh=new l(ud,Wd),Cd=new l(oc,Wd),fd=new l(tc/xe,$p/xe),Zh=new l(Lh/xe,jd/xe),rh=S*Math.PI/180;if(rh){let qf=Math.sin(rh),mc=Math.cos(rh),sc=[mc,-qf,qf,mc];Zd._matMult(sc),Kc._matMult(sc),Cd._matMult(sc),zh._matMult(sc)}let Pp=Ts.stretch+Ts.fixed,fp=wu.stretch+wu.fixed;return{tl:Zd,tr:Kc,bl:Cd,br:zh,tex:{x:pe.paddedRect.x+C1+Pp,y:pe.paddedRect.y+C1+fp,w:fu.stretch+fu.fixed-Pp,h:Lu.stretch+Lu.fixed-fp},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fd,pixelOffsetBR:Zh,minFontScaleX:hl/xe/gu,minFontScaleY:Su/xe/cu,isSDF:D}};if(Z&&(pe.stretchX||pe.stretchY)){let Ts=PC(Ht,ri,Ar),wu=PC(rr,Ii,Vr);for(let fu=0;fu0&&(ri=Math.max(10,ri),this.circleDiameter=ri)}else{let pr=!((rr=xe.image)===null||rr===void 0)&&rr.content&&(xe.image.textFitWidth||xe.image.textFitHeight)?pC(xe):{x1:xe.left,y1:xe.top,x2:xe.right,y2:xe.bottom};pr.y1=pr.y1*He-at[0],pr.y2=pr.y2*He+at[2],pr.x1=pr.x1*He-at[3],pr.x2=pr.x2*He+at[1];let Ar=xe.collisionPadding;if(Ar&&(pr.x1-=Ar[0]*He,pr.y1-=Ar[1]*He,pr.x2+=Ar[2]*He,pr.y2+=Ar[3]*He),Ht){let Vr=new l(pr.x1,pr.y1),ri=new l(pr.x2,pr.y1),Ii=new l(pr.x1,pr.y2),Zi=new l(pr.x2,pr.y2),da=Ht*Math.PI/180;Vr._rotate(da),ri._rotate(da),Ii._rotate(da),Zi._rotate(da),pr.x1=Math.min(Vr.x,ri.x,Ii.x,Zi.x),pr.x2=Math.max(Vr.x,ri.x,Ii.x,Zi.x),pr.y1=Math.min(Vr.y,ri.y,Ii.y,Zi.y),pr.y2=Math.max(Vr.y,ri.y,Ii.y,Zi.y)}S.emplaceBack(D.x,D.y,pr.x1,pr.y1,pr.x2,pr.y2,Z,ie,pe)}this.boxEndIndex=S.length}}class Hv{constructor(S=[],D=(Z,ie)=>Zie?1:0){if(this.data=S,this.length=this.data.length,this.compare=D,this.length>0)for(let Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],D=this.data.pop();return--this.length>0&&(this.data[0]=D,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:D,compare:Z}=this,ie=D[S];for(;S>0;){let pe=S-1>>1,xe=D[pe];if(Z(ie,xe)>=0)break;D[S]=xe,S=pe}D[S]=ie}_down(S){let{data:D,compare:Z}=this,ie=this.length>>1,pe=D[S];for(;S=0)break;D[S]=D[xe],S=xe}D[S]=pe}}function iB(I,S=1,D=!1){let Z=1/0,ie=1/0,pe=-1/0,xe=-1/0,He=I[0];for(let Ar=0;Arpe)&&(pe=Vr.x),(!Ar||Vr.y>xe)&&(xe=Vr.y)}let at=Math.min(pe-Z,xe-ie),wt=at/2,Ht=new Hv([],nB);if(at===0)return new l(Z,ie);for(let Ar=Z;Arrr.d||!rr.d)&&(rr=Ar,D&&console.log("found best %d after %d probes",Math.round(1e4*Ar.d)/1e4,pr)),Ar.max-rr.d<=S||(wt=Ar.h/2,Ht.push(new z1(Ar.p.x-wt,Ar.p.y-wt,wt,I)),Ht.push(new z1(Ar.p.x+wt,Ar.p.y-wt,wt,I)),Ht.push(new z1(Ar.p.x-wt,Ar.p.y+wt,wt,I)),Ht.push(new z1(Ar.p.x+wt,Ar.p.y+wt,wt,I)),pr+=4)}return D&&(console.log(`num probes: ${pr}`),console.log(`best distance: ${rr.d}`)),rr.p}function nB(I,S){return S.max-I.max}function z1(I,S,D,Z){this.p=new l(I,S),this.h=D,this.d=function(ie,pe){let xe=!1,He=1/0;for(let at=0;atie.y!=Vr.y>ie.y&&ie.x<(Vr.x-Ar.x)*(ie.y-Ar.y)/(Vr.y-Ar.y)+Ar.x&&(xe=!xe),He=Math.min(He,ha(ie,Ar,Vr))}}return(xe?1:-1)*Math.sqrt(He)}(this.p,Z),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]="center",ld[ld.left=2]="left",ld[ld.right=3]="right",ld[ld.top=4]="top",ld[ld.bottom=5]="bottom",ld[ld["top-left"]=6]="top-left",ld[ld["top-right"]=7]="top-right",ld[ld["bottom-left"]=8]="bottom-left",ld[ld["bottom-right"]=9]="bottom-right";let cm=7,cg=Number.POSITIVE_INFINITY;function vM(I,S){return S[1]!==cg?function(D,Z,ie){let pe=0,xe=0;switch(Z=Math.abs(Z),ie=Math.abs(ie),D){case"top-right":case"top-left":case"top":xe=ie-cm;break;case"bottom-right":case"bottom-left":case"bottom":xe=-ie+cm}switch(D){case"top-right":case"bottom-right":case"right":pe=-Z;break;case"top-left":case"bottom-left":case"left":pe=Z}return[pe,xe]}(I,S[0],S[1]):function(D,Z){let ie=0,pe=0;Z<0&&(Z=0);let xe=Z/Math.SQRT2;switch(D){case"top-right":case"top-left":pe=xe-cm;break;case"bottom-right":case"bottom-left":pe=-xe+cm;break;case"bottom":pe=-Z+cm;break;case"top":pe=Z-cm}switch(D){case"top-right":case"bottom-right":ie=-xe;break;case"top-left":case"bottom-left":ie=xe;break;case"left":ie=Z;break;case"right":ie=-Z}return[ie,pe]}(I,S[0])}function IC(I,S,D){var Z;let ie=I.layout,pe=(Z=ie.get("text-variable-anchor-offset"))===null||Z===void 0?void 0:Z.evaluate(S,{},D);if(pe){let He=pe.values,at=[];for(let wt=0;wtpr*Ff);Ht.startsWith("top")?rr[1]-=cm:Ht.startsWith("bottom")&&(rr[1]+=cm),at[wt+1]=rr}return new Br(at)}let xe=ie.get("text-variable-anchor");if(xe){let He;He=I._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ie.get("text-radial-offset").evaluate(S,{},D)*Ff,cg]:ie.get("text-offset").evaluate(S,{},D).map(wt=>wt*Ff);let at=[];for(let wt of xe)at.push(wt,vM(wt,He));return new Br(at)}return null}function yM(I){switch(I){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function aB(I,S,D,Z,ie,pe,xe,He,at,wt,Ht){let rr=pe.textMaxSize.evaluate(S,{});rr===void 0&&(rr=xe);let pr=I.layers[0].layout,Ar=pr.get("icon-offset").evaluate(S,{},Ht),Vr=RC(D.horizontal),ri=xe/24,Ii=I.tilePixelRatio*ri,Zi=I.tilePixelRatio*rr/24,da=I.tilePixelRatio*He,cn=I.tilePixelRatio*pr.get("symbol-spacing"),jn=pr.get("text-padding")*I.tilePixelRatio,Va=function(Ts,wu,fu,Lu=1){let oc=Ts.get("icon-padding").evaluate(wu,{},fu),tc=oc&&oc.values;return[tc[0]*Lu,tc[1]*Lu,tc[2]*Lu,tc[3]*Lu]}(pr,S,Ht,I.tilePixelRatio),hl=pr.get("text-max-angle")/180*Math.PI,iu=pr.get("text-rotation-alignment")!=="viewport"&&pr.get("symbol-placement")!=="point",Su=pr.get("icon-rotation-alignment")==="map"&&pr.get("symbol-placement")!=="point",Zl=pr.get("symbol-placement"),Qs=cn/2,gu=pr.get("icon-text-fit"),cu;Z&&gu!=="none"&&(I.allowVerticalPlacement&&D.vertical&&(cu=vC(Z,D.vertical,gu,pr.get("icon-text-fit-padding"),Ar,ri)),Vr&&(Z=vC(Z,Vr,gu,pr.get("icon-text-fit-padding"),Ar,ri)));let uu=(Ts,wu)=>{wu.x<0||wu.x>=Rl||wu.y<0||wu.y>=Rl||function(fu,Lu,oc,tc,Ch,$p,ud,Lh,Wd,jd,Zd,Kc,zh,Cd,fd,Zh,rh,Pp,fp,qf,mc,sc,Ip,Hc,P1){let v0=fu.addToLineVertexArray(Lu,oc),Gv,Qp,Pc,uh,ev=0,yy=0,cp=0,I1=0,bM=-1,Uw=-1,y0={},hg=Ji("");if(fu.allowVerticalPlacement&&tc.vertical){let Ld=Lh.layout.get("text-rotate").evaluate(mc,{},Hc)+90;Pc=new fm(Wd,Lu,jd,Zd,Kc,tc.vertical,zh,Cd,fd,Ld),ud&&(uh=new fm(Wd,Lu,jd,Zd,Kc,ud,rh,Pp,fd,Ld))}if(Ch){let Ld=Lh.layout.get("icon-rotate").evaluate(mc,{}),tv=Lh.layout.get("icon-text-fit")!=="none",hm=zC(Ch,Ld,Ip,tv),Xd=ud?zC(ud,Ld,Ip,tv):void 0;Qp=new fm(Wd,Lu,jd,Zd,Kc,Ch,rh,Pp,!1,Ld),ev=4*hm.length;let zd=fu.iconSizeData,gv=null;zd.kind==="source"?(gv=[p0*Lh.layout.get("icon-size").evaluate(mc,{})],gv[0]>lm&&T(`${fu.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)):zd.kind==="composite"&&(gv=[p0*sc.compositeIconSizes[0].evaluate(mc,{},Hc),p0*sc.compositeIconSizes[1].evaluate(mc,{},Hc)],(gv[0]>lm||gv[1]>lm)&&T(`${fu.layerIds[0]}: Value for "icon-size" is >= ${Wx}. Reduce your "icon-size".`)),fu.addSymbols(fu.icon,hm,gv,qf,fp,mc,i.ah.none,Lu,v0.lineStartIndex,v0.lineLength,-1,Hc),bM=fu.icon.placedSymbolArray.length-1,Xd&&(yy=4*Xd.length,fu.addSymbols(fu.icon,Xd,gv,qf,fp,mc,i.ah.vertical,Lu,v0.lineStartIndex,v0.lineLength,-1,Hc),Uw=fu.icon.placedSymbolArray.length-1)}let Xh=Object.keys(tc.horizontal);for(let Ld of Xh){let tv=tc.horizontal[Ld];if(!Gv){hg=Ji(tv.text);let Xd=Lh.layout.get("text-rotate").evaluate(mc,{},Hc);Gv=new fm(Wd,Lu,jd,Zd,Kc,tv,zh,Cd,fd,Xd)}let hm=tv.positionedLines.length===1;if(cp+=DC(fu,Lu,tv,$p,Lh,fd,mc,Zh,v0,tc.vertical?i.ah.horizontal:i.ah.horizontalOnly,hm?Xh:[Ld],y0,bM,sc,Hc),hm)break}tc.vertical&&(I1+=DC(fu,Lu,tc.vertical,$p,Lh,fd,mc,Zh,v0,i.ah.vertical,["vertical"],y0,Uw,sc,Hc));let lB=Gv?Gv.boxStartIndex:fu.collisionBoxArray.length,Vw=Gv?Gv.boxEndIndex:fu.collisionBoxArray.length,m0=Pc?Pc.boxStartIndex:fu.collisionBoxArray.length,hp=Pc?Pc.boxEndIndex:fu.collisionBoxArray.length,OC=Qp?Qp.boxStartIndex:fu.collisionBoxArray.length,uB=Qp?Qp.boxEndIndex:fu.collisionBoxArray.length,NC=uh?uh.boxStartIndex:fu.collisionBoxArray.length,fB=uh?uh.boxEndIndex:fu.collisionBoxArray.length,mv=-1,tb=(Ld,tv)=>Ld&&Ld.circleDiameter?Math.max(Ld.circleDiameter,tv):tv;mv=tb(Gv,mv),mv=tb(Pc,mv),mv=tb(Qp,mv),mv=tb(uh,mv);let Hw=mv>-1?1:0;Hw&&(mv*=P1/Ff),fu.glyphOffsetArray.length>=E1.MAX_GLYPHS&&T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mc.sortKey!==void 0&&fu.addToSortKeyRanges(fu.symbolInstances.length,mc.sortKey);let wM=IC(Lh,mc,Hc),[cB,hB]=function(Ld,tv){let hm=Ld.length,Xd=tv==null?void 0:tv.values;if((Xd==null?void 0:Xd.length)>0)for(let zd=0;zd=0?y0.right:-1,y0.center>=0?y0.center:-1,y0.left>=0?y0.left:-1,y0.vertical||-1,bM,Uw,hg,lB,Vw,m0,hp,OC,uB,NC,fB,jd,cp,I1,ev,yy,Hw,0,zh,mv,cB,hB)}(I,wu,Ts,D,Z,ie,cu,I.layers[0],I.collisionBoxArray,S.index,S.sourceLayerIndex,I.index,Ii,[jn,jn,jn,jn],iu,at,da,Va,Su,Ar,S,pe,wt,Ht,xe)};if(Zl==="line")for(let Ts of MC(S.geometry,0,0,Rl,Rl)){let wu=rB(Ts,cn,hl,D.vertical||Vr,Z,24,Zi,I.overscaling,Rl);for(let fu of wu)Vr&&oB(I,Vr.text,Qs,fu)||uu(Ts,fu)}else if(Zl==="line-center"){for(let Ts of S.geometry)if(Ts.length>1){let wu=tB(Ts,hl,D.vertical||Vr,Z,24,Zi);wu&&uu(Ts,wu)}}else if(S.type==="Polygon")for(let Ts of ks(S.geometry,0)){let wu=iB(Ts,16);uu(Ts[0],new py(wu.x,wu.y,0))}else if(S.type==="LineString")for(let Ts of S.geometry)uu(Ts,new py(Ts[0].x,Ts[0].y,0));else if(S.type==="Point")for(let Ts of S.geometry)for(let wu of Ts)uu([wu],new py(wu.x,wu.y,0))}function DC(I,S,D,Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr){let ri=function(da,cn,jn,Va,hl,iu,Su,Zl){let Qs=Va.layout.get("text-rotate").evaluate(iu,{})*Math.PI/180,gu=[];for(let cu of cn.positionedLines)for(let uu of cu.positionedGlyphs){if(!uu.rect)continue;let Ts=uu.rect||{},wu=fC+1,fu=!0,Lu=1,oc=0,tc=(hl||Zl)&&uu.vertical,Ch=uu.metrics.advance*uu.scale/2;if(Zl&&cn.verticalizable&&(oc=cu.lineOffset/2-(uu.imageName?-(Ff-uu.metrics.width*uu.scale)/2:(uu.scale-1)*Ff)),uu.imageName){let qf=Su[uu.imageName];fu=qf.sdf,Lu=qf.pixelRatio,wu=kd/Lu}let $p=hl?[uu.x+Ch,uu.y]:[0,0],ud=hl?[0,0]:[uu.x+Ch+jn[0],uu.y+jn[1]-oc],Lh=[0,0];tc&&(Lh=ud,ud=[0,0]);let Wd=uu.metrics.isDoubleResolution?2:1,jd=(uu.metrics.left-wu)*uu.scale-Ch+ud[0],Zd=(-uu.metrics.top-wu)*uu.scale+ud[1],Kc=jd+Ts.w/Wd*uu.scale/Lu,zh=Zd+Ts.h/Wd*uu.scale/Lu,Cd=new l(jd,Zd),fd=new l(Kc,Zd),Zh=new l(jd,zh),rh=new l(Kc,zh);if(tc){let qf=new l(-Ch,Ch-kh),mc=-Math.PI/2,sc=Ff/2-Ch,Ip=new l(5-kh-sc,-(uu.imageName?sc:0)),Hc=new l(...Lh);Cd._rotateAround(mc,qf)._add(Ip)._add(Hc),fd._rotateAround(mc,qf)._add(Ip)._add(Hc),Zh._rotateAround(mc,qf)._add(Ip)._add(Hc),rh._rotateAround(mc,qf)._add(Ip)._add(Hc)}if(Qs){let qf=Math.sin(Qs),mc=Math.cos(Qs),sc=[mc,-qf,qf,mc];Cd._matMult(sc),fd._matMult(sc),Zh._matMult(sc),rh._matMult(sc)}let Pp=new l(0,0),fp=new l(0,0);gu.push({tl:Cd,tr:fd,bl:Zh,br:rh,tex:Ts,writingMode:cn.writingMode,glyphOffset:$p,sectionIndex:uu.sectionIndex,isSDF:fu,pixelOffsetTL:Pp,pixelOffsetBR:fp,minFontScaleX:0,minFontScaleY:0})}return gu}(0,D,He,ie,pe,xe,Z,I.allowVerticalPlacement),Ii=I.textSizeData,Zi=null;Ii.kind==="source"?(Zi=[p0*ie.layout.get("text-size").evaluate(xe,{})],Zi[0]>lm&&T(`${I.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)):Ii.kind==="composite"&&(Zi=[p0*Ar.compositeTextSizes[0].evaluate(xe,{},Vr),p0*Ar.compositeTextSizes[1].evaluate(xe,{},Vr)],(Zi[0]>lm||Zi[1]>lm)&&T(`${I.layerIds[0]}: Value for "text-size" is >= ${Wx}. Reduce your "text-size".`)),I.addSymbols(I.text,ri,Zi,He,pe,xe,wt,S,at.lineStartIndex,at.lineLength,pr,Vr);for(let da of Ht)rr[da]=I.text.placedSymbolArray.length-1;return 4*ri.length}function RC(I){for(let S in I)return I[S];return null}function oB(I,S,D,Z){let ie=I.compareText;if(S in ie){let pe=ie[S];for(let xe=pe.length-1;xe>=0;xe--)if(Z.dist(pe[xe])>4;if(ie!==1)throw new Error(`Got v${ie} data when expected v1.`);let pe=FC[15&Z];if(!pe)throw new Error("Unrecognized array type.");let[xe]=new Uint16Array(S,2,1),[He]=new Uint32Array(S,4,1);return new mM(He,xe,pe,S)}constructor(S,D=64,Z=Float64Array,ie){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+D,2),65535),this.ArrayType=Z,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let pe=FC.indexOf(this.ArrayType),xe=2*S*this.ArrayType.BYTES_PER_ELEMENT,He=S*this.IndexArrayType.BYTES_PER_ELEMENT,at=(8-He%8)%8;if(pe<0)throw new Error(`Unexpected typed array class: ${Z}.`);ie&&ie instanceof ArrayBuffer?(this.data=ie,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+He+at,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+xe+He+at),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+He+at,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+pe]),new Uint16Array(this.data,2,1)[0]=D,new Uint32Array(this.data,4,1)[0]=S)}add(S,D){let Z=this._pos>>1;return this.ids[Z]=Z,this.coords[this._pos++]=S,this.coords[this._pos++]=D,Z}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return Bw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,D,Z,ie){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:pe,coords:xe,nodeSize:He}=this,at=[0,pe.length-1,0],wt=[];for(;at.length;){let Ht=at.pop()||0,rr=at.pop()||0,pr=at.pop()||0;if(rr-pr<=He){for(let Ii=pr;Ii<=rr;Ii++){let Zi=xe[2*Ii],da=xe[2*Ii+1];Zi>=S&&Zi<=Z&&da>=D&&da<=ie&&wt.push(pe[Ii])}continue}let Ar=pr+rr>>1,Vr=xe[2*Ar],ri=xe[2*Ar+1];Vr>=S&&Vr<=Z&&ri>=D&&ri<=ie&&wt.push(pe[Ar]),(Ht===0?S<=Vr:D<=ri)&&(at.push(pr),at.push(Ar-1),at.push(1-Ht)),(Ht===0?Z>=Vr:ie>=ri)&&(at.push(Ar+1),at.push(rr),at.push(1-Ht))}return wt}within(S,D,Z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ie,coords:pe,nodeSize:xe}=this,He=[0,ie.length-1,0],at=[],wt=Z*Z;for(;He.length;){let Ht=He.pop()||0,rr=He.pop()||0,pr=He.pop()||0;if(rr-pr<=xe){for(let Ii=pr;Ii<=rr;Ii++)BC(pe[2*Ii],pe[2*Ii+1],S,D)<=wt&&at.push(ie[Ii]);continue}let Ar=pr+rr>>1,Vr=pe[2*Ar],ri=pe[2*Ar+1];BC(Vr,ri,S,D)<=wt&&at.push(ie[Ar]),(Ht===0?S-Z<=Vr:D-Z<=ri)&&(He.push(pr),He.push(Ar-1),He.push(1-Ht)),(Ht===0?S+Z>=Vr:D+Z>=ri)&&(He.push(Ar+1),He.push(rr),He.push(1-Ht))}return at}}function Bw(I,S,D,Z,ie,pe){if(ie-Z<=D)return;let xe=Z+ie>>1;qC(I,S,xe,Z,ie,pe),Bw(I,S,D,Z,xe-1,1-pe),Bw(I,S,D,xe+1,ie,1-pe)}function qC(I,S,D,Z,ie,pe){for(;ie>Z;){if(ie-Z>600){let wt=ie-Z+1,Ht=D-Z+1,rr=Math.log(wt),pr=.5*Math.exp(2*rr/3),Ar=.5*Math.sqrt(rr*pr*(wt-pr)/wt)*(Ht-wt/2<0?-1:1);qC(I,S,D,Math.max(Z,Math.floor(D-Ht*pr/wt+Ar)),Math.min(ie,Math.floor(D+(wt-Ht)*pr/wt+Ar)),pe)}let xe=S[2*D+pe],He=Z,at=ie;for(Qx(I,S,Z,D),S[2*ie+pe]>xe&&Qx(I,S,Z,ie);Hexe;)at--}S[2*Z+pe]===xe?Qx(I,S,Z,at):(at++,Qx(I,S,at,ie)),at<=D&&(Z=at+1),D<=at&&(ie=at-1)}}function Qx(I,S,D,Z){gM(I,D,Z),gM(S,2*D,2*Z),gM(S,2*D+1,2*Z+1)}function gM(I,S,D){let Z=I[S];I[S]=I[D],I[D]=Z}function BC(I,S,D,Z){let ie=I-D,pe=S-Z;return ie*ie+pe*pe}var Ow;i.bg=void 0,(Ow=i.bg||(i.bg={})).create="create",Ow.load="load",Ow.fullLoad="fullLoad";let eb=null,yh=[],_M=1e3/60,xM="loadTime",Nw="fullLoadTime",sB={mark(I){performance.mark(I)},frame(I){let S=I;eb!=null&&yh.push(S-eb),eb=S},clearMetrics(){eb=null,yh=[],performance.clearMeasures(xM),performance.clearMeasures(Nw);for(let I in i.bg)performance.clearMarks(i.bg[I])},getPerformanceMetrics(){performance.measure(xM,i.bg.create,i.bg.load),performance.measure(Nw,i.bg.create,i.bg.fullLoad);let I=performance.getEntriesByName(xM)[0].duration,S=performance.getEntriesByName(Nw)[0].duration,D=yh.length,Z=1/(yh.reduce((pe,xe)=>pe+xe,0)/D/1e3),ie=yh.filter(pe=>pe>_M).reduce((pe,xe)=>pe+(xe-_M)/_M,0);return{loadTime:I,fullLoadTime:S,fps:Z,percentDroppedFrames:ie/(D+ie)*100,totalFrames:D}}};i.$=class extends Yt{},i.A=Es,i.B=mi,i.C=function(I){if(U==null){let S=I.navigator?I.navigator.userAgent:null;U=!!I.safari||!(!S||!(/\b(iPad|iPhone|iPod)\b/.test(S)||S.match("Safari")&&!S.match("Chrome")))}return U},i.D=Uo,i.E=Be,i.F=class{constructor(I,S){this.target=I,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new fM(()=>this.process()),this.subscription=function(D,Z,ie,pe){return D.addEventListener(Z,ie,!1),{unsubscribe:()=>{D.removeEventListener(Z,ie,!1)}}}(this.target,"message",D=>this.receive(D)),this.globalScope=q(self)?I:window}registerMessageHandler(I,S){this.messageHandlers[I]=S}sendAsync(I,S){return new Promise((D,Z)=>{let ie=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ie]={resolve:D,reject:Z},S&&S.signal.addEventListener("abort",()=>{delete this.resolveRejects[ie];let He={id:ie,type:"",origin:location.origin,targetMapId:I.targetMapId,sourceMapId:this.mapId};this.target.postMessage(He)},{once:!0});let pe=[],xe=Object.assign(Object.assign({},I),{id:ie,sourceMapId:this.mapId,origin:location.origin,data:Rn(I.data,pe)});this.target.postMessage(xe,{transfer:pe})})}receive(I){let S=I.data,D=S.id;if(!(S.origin!=="file://"&&location.origin!=="file://"&&S.origin!=="resource://android"&&location.origin!=="resource://android"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type===""){delete this.tasks[D];let Z=this.abortControllers[D];return delete this.abortControllers[D],void(Z&&Z.abort())}if(q(self)||S.mustQueue)return this.tasks[D]=S,this.taskQueue.push(D),void this.invoker.trigger();this.processTask(D,S)}}process(){if(this.taskQueue.length===0)return;let I=this.taskQueue.shift(),S=this.tasks[I];delete this.tasks[I],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(I,S)}processTask(I,S){return a(this,void 0,void 0,function*(){if(S.type===""){let ie=this.resolveRejects[I];return delete this.resolveRejects[I],ie?void(S.error?ie.reject(Hn(S.error)):ie.resolve(Hn(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(I,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let D=Hn(S.data),Z=new AbortController;this.abortControllers[I]=Z;try{let ie=yield this.messageHandlers[S.type](S.sourceMapId,D,Z);this.completeTask(I,null,ie)}catch(ie){this.completeTask(I,ie)}})}completeTask(I,S,D){let Z=[];delete this.abortControllers[I];let ie={id:I,type:"",sourceMapId:this.mapId,origin:location.origin,error:S?Rn(S):null,data:Rn(D,Z)};this.target.postMessage(ie,{transfer:Z})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var I=new Es(16);return Es!=Float32Array&&(I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[11]=0,I[12]=0,I[13]=0,I[14]=0),I[0]=1,I[5]=1,I[10]=1,I[15]=1,I},i.I=kw,i.J=function(I,S,D){var Z,ie,pe,xe,He,at,wt,Ht,rr,pr,Ar,Vr,ri=D[0],Ii=D[1],Zi=D[2];return S===I?(I[12]=S[0]*ri+S[4]*Ii+S[8]*Zi+S[12],I[13]=S[1]*ri+S[5]*Ii+S[9]*Zi+S[13],I[14]=S[2]*ri+S[6]*Ii+S[10]*Zi+S[14],I[15]=S[3]*ri+S[7]*Ii+S[11]*Zi+S[15]):(ie=S[1],pe=S[2],xe=S[3],He=S[4],at=S[5],wt=S[6],Ht=S[7],rr=S[8],pr=S[9],Ar=S[10],Vr=S[11],I[0]=Z=S[0],I[1]=ie,I[2]=pe,I[3]=xe,I[4]=He,I[5]=at,I[6]=wt,I[7]=Ht,I[8]=rr,I[9]=pr,I[10]=Ar,I[11]=Vr,I[12]=Z*ri+He*Ii+rr*Zi+S[12],I[13]=ie*ri+at*Ii+pr*Zi+S[13],I[14]=pe*ri+wt*Ii+Ar*Zi+S[14],I[15]=xe*ri+Ht*Ii+Vr*Zi+S[15]),I},i.K=function(I,S,D){var Z=D[0],ie=D[1],pe=D[2];return I[0]=S[0]*Z,I[1]=S[1]*Z,I[2]=S[2]*Z,I[3]=S[3]*Z,I[4]=S[4]*ie,I[5]=S[5]*ie,I[6]=S[6]*ie,I[7]=S[7]*ie,I[8]=S[8]*pe,I[9]=S[9]*pe,I[10]=S[10]*pe,I[11]=S[11]*pe,I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15],I},i.L=Qo,i.M=function(I,S){let D={};for(let Z=0;Z{let S=window.document.createElement("video");return S.muted=!0,new Promise(D=>{S.onloadstart=()=>{D(S)};for(let Z of I){let ie=window.document.createElement("source");Ee(Z)||(S.crossOrigin="Anonymous"),ie.src=Z,S.appendChild(ie)}})},i.a4=function(){return _++},i.a5=ua,i.a6=E1,i.a7=Sn,i.a8=ff,i.a9=dM,i.aA=function(I){if(I.type==="custom")return new uM(I);switch(I.type){case"background":return new Q8(I);case"circle":return new hs(I);case"fill":return new Fr(I);case"fill-extrusion":return new Td(I);case"heatmap":return new Tu(I);case"hillshade":return new Cc(I);case"line":return new ag(I);case"raster":return new Yx(I);case"symbol":return new ug(I)}},i.aB=v,i.aC=function(I,S){if(!I)return[{command:"setStyle",args:[S]}];let D=[];try{if(!gt(I.version,S.version))return[{command:"setStyle",args:[S]}];gt(I.center,S.center)||D.push({command:"setCenter",args:[S.center]}),gt(I.zoom,S.zoom)||D.push({command:"setZoom",args:[S.zoom]}),gt(I.bearing,S.bearing)||D.push({command:"setBearing",args:[S.bearing]}),gt(I.pitch,S.pitch)||D.push({command:"setPitch",args:[S.pitch]}),gt(I.sprite,S.sprite)||D.push({command:"setSprite",args:[S.sprite]}),gt(I.glyphs,S.glyphs)||D.push({command:"setGlyphs",args:[S.glyphs]}),gt(I.transition,S.transition)||D.push({command:"setTransition",args:[S.transition]}),gt(I.light,S.light)||D.push({command:"setLight",args:[S.light]}),gt(I.terrain,S.terrain)||D.push({command:"setTerrain",args:[S.terrain]}),gt(I.sky,S.sky)||D.push({command:"setSky",args:[S.sky]}),gt(I.projection,S.projection)||D.push({command:"setProjection",args:[S.projection]});let Z={},ie=[];(function(xe,He,at,wt){let Ht;for(Ht in He=He||{},xe=xe||{})Object.prototype.hasOwnProperty.call(xe,Ht)&&(Object.prototype.hasOwnProperty.call(He,Ht)||Xe(Ht,at,wt));for(Ht in He)Object.prototype.hasOwnProperty.call(He,Ht)&&(Object.prototype.hasOwnProperty.call(xe,Ht)?gt(xe[Ht],He[Ht])||(xe[Ht].type==="geojson"&&He[Ht].type==="geojson"&&xt(xe,He,Ht)?Pt(at,{command:"setGeoJSONSourceData",args:[Ht,He[Ht].data]}):Tt(Ht,He,at,wt)):Qe(Ht,He,at))})(I.sources,S.sources,ie,Z);let pe=[];I.layers&&I.layers.forEach(xe=>{"source"in xe&&Z[xe.source]?D.push({command:"removeLayer",args:[xe.id]}):pe.push(xe)}),D=D.concat(ie),function(xe,He,at){He=He||[];let wt=(xe=xe||[]).map(Ct),Ht=He.map(Ct),rr=xe.reduce(jt,{}),pr=He.reduce(jt,{}),Ar=wt.slice(),Vr=Object.create(null),ri,Ii,Zi,da,cn;for(let jn=0,Va=0;jn@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(D,Z,ie,pe)=>{let xe=ie||pe;return S[Z]=!xe||xe.toLowerCase(),""}),S["max-age"]){let D=parseInt(S["max-age"],10);isNaN(D)?delete S["max-age"]:S["max-age"]=D}return S},i.ab=function(I,S){let D=[];for(let Z in I)Z in S||D.push(Z);return D},i.ac=E,i.ad=function(I,S,D){var Z=Math.sin(D),ie=Math.cos(D),pe=S[0],xe=S[1],He=S[2],at=S[3],wt=S[4],Ht=S[5],rr=S[6],pr=S[7];return S!==I&&(I[8]=S[8],I[9]=S[9],I[10]=S[10],I[11]=S[11],I[12]=S[12],I[13]=S[13],I[14]=S[14],I[15]=S[15]),I[0]=pe*ie+wt*Z,I[1]=xe*ie+Ht*Z,I[2]=He*ie+rr*Z,I[3]=at*ie+pr*Z,I[4]=wt*ie-pe*Z,I[5]=Ht*ie-xe*Z,I[6]=rr*ie-He*Z,I[7]=pr*ie-at*Z,I},i.ae=function(I){var S=new Es(16);return S[0]=I[0],S[1]=I[1],S[2]=I[2],S[3]=I[3],S[4]=I[4],S[5]=I[5],S[6]=I[6],S[7]=I[7],S[8]=I[8],S[9]=I[9],S[10]=I[10],S[11]=I[11],S[12]=I[12],S[13]=I[13],S[14]=I[14],S[15]=I[15],S},i.af=ru,i.ag=function(I,S){let D=0,Z=0;if(I.kind==="constant")Z=I.layoutSize;else if(I.kind!=="source"){let{interpolationType:ie,minZoom:pe,maxZoom:xe}=I,He=ie?E(za.interpolationFactor(ie,S,pe,xe),0,1):0;I.kind==="camera"?Z=ia.number(I.minSize,I.maxSize,He):D=He}return{uSizeT:D,uSize:Z}},i.ai=function(I,{uSize:S,uSizeT:D},{lowerSize:Z,upperSize:ie}){return I.kind==="source"?Z/p0:I.kind==="composite"?ia.number(Z/p0,ie/p0,D):S},i.aj=aM,i.ak=function(I,S,D,Z){let ie=S.y-I.y,pe=S.x-I.x,xe=Z.y-D.y,He=Z.x-D.x,at=xe*pe-He*ie;if(at===0)return null;let wt=(He*(I.y-D.y)-xe*(I.x-D.x))/at;return new l(I.x+wt*pe,I.y+wt*ie)},i.al=MC,i.am=dc,i.an=Ws,i.ao=function(I){let S=1/0,D=1/0,Z=-1/0,ie=-1/0;for(let pe of I)S=Math.min(S,pe.x),D=Math.min(D,pe.y),Z=Math.max(Z,pe.x),ie=Math.max(ie,pe.y);return[S,D,Z,ie]},i.ap=Ff,i.ar=nM,i.as=function(I,S){var D=S[0],Z=S[1],ie=S[2],pe=S[3],xe=S[4],He=S[5],at=S[6],wt=S[7],Ht=S[8],rr=S[9],pr=S[10],Ar=S[11],Vr=S[12],ri=S[13],Ii=S[14],Zi=S[15],da=D*He-Z*xe,cn=D*at-ie*xe,jn=D*wt-pe*xe,Va=Z*at-ie*He,hl=Z*wt-pe*He,iu=ie*wt-pe*at,Su=Ht*ri-rr*Vr,Zl=Ht*Ii-pr*Vr,Qs=Ht*Zi-Ar*Vr,gu=rr*Ii-pr*ri,cu=rr*Zi-Ar*ri,uu=pr*Zi-Ar*Ii,Ts=da*uu-cn*cu+jn*gu+Va*Qs-hl*Zl+iu*Su;return Ts?(I[0]=(He*uu-at*cu+wt*gu)*(Ts=1/Ts),I[1]=(ie*cu-Z*uu-pe*gu)*Ts,I[2]=(ri*iu-Ii*hl+Zi*Va)*Ts,I[3]=(pr*hl-rr*iu-Ar*Va)*Ts,I[4]=(at*Qs-xe*uu-wt*Zl)*Ts,I[5]=(D*uu-ie*Qs+pe*Zl)*Ts,I[6]=(Ii*jn-Vr*iu-Zi*cn)*Ts,I[7]=(Ht*iu-pr*jn+Ar*cn)*Ts,I[8]=(xe*cu-He*Qs+wt*Su)*Ts,I[9]=(Z*Qs-D*cu-pe*Su)*Ts,I[10]=(Vr*hl-ri*jn+Zi*da)*Ts,I[11]=(rr*jn-Ht*hl-Ar*da)*Ts,I[12]=(He*Zl-xe*gu-at*Su)*Ts,I[13]=(D*gu-Z*Zl+ie*Su)*Ts,I[14]=(ri*cn-Vr*Va-Ii*da)*Ts,I[15]=(Ht*Va-rr*cn+pr*da)*Ts,I):null},i.at=yM,i.au=Pw,i.av=mM,i.aw=function(){let I={},S=fe.$version;for(let D in fe.$root){let Z=fe.$root[D];if(Z.required){let ie=null;ie=D==="version"?S:Z.type==="array"?[]:{},ie!=null&&(I[D]=ie)}}return I},i.ax=Gn,i.ay=te,i.az=function(I){I=I.slice();let S=Object.create(null);for(let D=0;D25||Z<0||Z>=1||D<0||D>=1)},i.bc=function(I,S){return I[0]=S[0],I[1]=0,I[2]=0,I[3]=0,I[4]=0,I[5]=S[1],I[6]=0,I[7]=0,I[8]=0,I[9]=0,I[10]=S[2],I[11]=0,I[12]=0,I[13]=0,I[14]=0,I[15]=1,I},i.bd=class extends zt{},i.be=cM,i.bf=sB,i.bh=he,i.bi=function(I,S){be.REGISTERED_PROTOCOLS[I]=S},i.bj=function(I){delete be.REGISTERED_PROTOCOLS[I]},i.bk=function(I,S){let D={};for(let ie=0;ieuu*Ff)}let Zl=xe?"center":D.get("text-justify").evaluate(wt,{},I.canonical),Qs=D.get("symbol-placement")==="point"?D.get("text-max-width").evaluate(wt,{},I.canonical)*Ff:1/0,gu=()=>{I.bucket.allowVerticalPlacement&&Lo(jn)&&(Vr.vertical=Hx(ri,I.glyphMap,I.glyphPositions,I.imagePositions,Ht,Qs,pe,iu,"left",hl,Zi,i.ah.vertical,!0,pr,rr))};if(!xe&&Su){let cu=new Set;if(Zl==="auto")for(let Ts=0;Tsa(void 0,void 0,void 0,function*(){if(I.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(I)],{type:"image/png"});try{return createImageBitmap(S)}catch(D){throw new Error(`Could not load image because of ${D.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=I=>new Promise((S,D)=>{let Z=new Image;Z.onload=()=>{S(Z),URL.revokeObjectURL(Z.src),Z.onload=null,window.requestAnimationFrame(()=>{Z.src=j})},Z.onerror=()=>D(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 ie=new Blob([new Uint8Array(I)],{type:"image/png"});Z.src=I.byteLength?URL.createObjectURL(ie):j}),i.g=ze,i.h=(I,S)=>ke(L(I,{type:"json"}),S),i.i=q,i.j=me,i.k=Re,i.l=(I,S)=>ke(L(I,{type:"arrayBuffer"}),S),i.m=ke,i.n=function(I){return new tM(I).readFields(kQ,[])},i.o=bu,i.p=iM,i.q=oe,i.r=di,i.s=Ee,i.t=wi,i.u=li,i.v=fe,i.w=T,i.x=function([I,S,D]){return S+=90,S*=Math.PI/180,D*=Math.PI/180,{x:I*Math.cos(S)*Math.sin(D),y:I*Math.sin(S)*Math.sin(D),z:I*Math.cos(D)}},i.y=ia,i.z=Fo}),r("worker",["./shared"],function(i){"use strict";class a{constructor(_e){this.keyCache={},_e&&this.replace(_e)}replace(_e){this._layerConfigs={},this._layers={},this.update(_e,[])}update(_e,Fe){for(let Ie of _e){this._layerConfigs[Ie.id]=Ie;let lt=this._layers[Ie.id]=i.aA(Ie);lt._featureFilter=i.a7(lt.filter),this.keyCache[Ie.id]&&delete this.keyCache[Ie.id]}for(let Ie of Fe)delete this.keyCache[Ie],delete this._layerConfigs[Ie],delete this._layers[Ie];this.familiesBySource={};let Pe=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let Ie of Pe){let lt=Ie.map(St=>this._layers[St.id]),ye=lt[0];if(ye.visibility==="none")continue;let ue=ye.source||"",de=this.familiesBySource[ue];de||(de=this.familiesBySource[ue]={});let ht=ye.sourceLayer||"_geojsonTileLayer",Et=de[ht];Et||(Et=de[ht]=[]),Et.push(lt)}}}class o{constructor(_e){let Fe={},Pe=[];for(let ue in _e){let de=_e[ue],ht=Fe[ue]={};for(let Et in de){let St=de[+Et];if(!St||St.bitmap.width===0||St.bitmap.height===0)continue;let Zt={x:0,y:0,w:St.bitmap.width+2,h:St.bitmap.height+2};Pe.push(Zt),ht[Et]={rect:Zt,metrics:St.metrics}}}let{w:Ie,h:lt}=i.p(Pe),ye=new i.o({width:Ie||1,height:lt||1});for(let ue in _e){let de=_e[ue];for(let ht in de){let Et=de[+ht];if(!Et||Et.bitmap.width===0||Et.bitmap.height===0)continue;let St=Fe[ue][ht].rect;i.o.copy(Et.bitmap,ye,{x:0,y:0},{x:St.x+1,y:St.y+1},Et.bitmap)}}this.image=ye,this.positions=Fe}}i.bl("GlyphAtlas",o);class s{constructor(_e){this.tileID=new i.S(_e.tileID.overscaledZ,_e.tileID.wrap,_e.tileID.canonical.z,_e.tileID.canonical.x,_e.tileID.canonical.y),this.uid=_e.uid,this.zoom=_e.zoom,this.pixelRatio=_e.pixelRatio,this.tileSize=_e.tileSize,this.source=_e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=_e.showCollisionBoxes,this.collectResourceTiming=!!_e.collectResourceTiming,this.returnDependencies=!!_e.returnDependencies,this.promoteId=_e.promoteId,this.inFlightDependencies=[]}parse(_e,Fe,Pe,Ie){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=_e,this.collisionBoxArray=new i.a5;let lt=new i.bm(Object.keys(_e.layers).sort()),ye=new i.bn(this.tileID,this.promoteId);ye.bucketLayerIDs=[];let ue={},de={featureIndex:ye,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Pe},ht=Fe.familiesBySource[this.source];for(let Hi in ht){let Jr=_e.layers[Hi];if(!Jr)continue;Jr.version===1&&i.w(`Vector tile source "${this.source}" layer "${Hi}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ci=lt.encode(Hi),Di=[];for(let Lt=0;Lt=vt.maxzoom||vt.visibility!=="none"&&(u(Lt,this.zoom,Pe),(ue[vt.id]=vt.createBucket({index:ye.bucketLayerIDs.length,layers:Lt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ci,sourceID:this.source})).populate(Di,de,this.tileID.canonical),ye.bucketLayerIDs.push(Lt.map(Dt=>Dt.id)))}}let Et=i.aF(de.glyphDependencies,Hi=>Object.keys(Hi).map(Number));this.inFlightDependencies.forEach(Hi=>Hi==null?void 0:Hi.abort()),this.inFlightDependencies=[];let St=Promise.resolve({});if(Object.keys(Et).length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),St=Ie.sendAsync({type:"GG",data:{stacks:Et,source:this.source,tileID:this.tileID,type:"glyphs"}},Hi)}let Zt=Object.keys(de.iconDependencies),qr=Promise.resolve({});if(Zt.length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),qr=Ie.sendAsync({type:"GI",data:{icons:Zt,source:this.source,tileID:this.tileID,type:"icons"}},Hi)}let Lr=Object.keys(de.patternDependencies),vr=Promise.resolve({});if(Lr.length){let Hi=new AbortController;this.inFlightDependencies.push(Hi),vr=Ie.sendAsync({type:"GI",data:{icons:Lr,source:this.source,tileID:this.tileID,type:"patterns"}},Hi)}let[Er,si,Ei]=yield Promise.all([St,qr,vr]),Si=new o(Er),xi=new i.bo(si,Ei);for(let Hi in ue){let Jr=ue[Hi];Jr instanceof i.a6?(u(Jr.layers,this.zoom,Pe),i.bp({bucket:Jr,glyphMap:Er,glyphPositions:Si.positions,imageMap:si,imagePositions:xi.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Jr.hasPattern&&(Jr instanceof i.bq||Jr instanceof i.br||Jr instanceof i.bs)&&(u(Jr.layers,this.zoom,Pe),Jr.addFeatures(de,this.tileID.canonical,xi.patternPositions))}return this.status="done",{buckets:Object.values(ue).filter(Hi=>!Hi.isEmpty()),featureIndex:ye,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Si.image,imageAtlas:xi,glyphMap:this.returnDependencies?Er:null,iconMap:this.returnDependencies?si:null,glyphPositions:this.returnDependencies?Si.positions:null}})}}function u(De,_e,Fe){let Pe=new i.z(_e);for(let Ie of De)Ie.recalculate(Pe,Fe)}class l{constructor(_e,Fe,Pe){this.actor=_e,this.layerIndex=Fe,this.availableImages=Pe,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=yield i.l(_e.request,Fe);try{return{vectorTile:new i.bt.VectorTile(new i.bu(Pe.data)),rawData:Pe.data,cacheControl:Pe.cacheControl,expires:Pe.expires}}catch(Ie){let lt=new Uint8Array(Pe.data),ye=`Unable to parse the tile at ${_e.request.url}, `;throw ye+=lt[0]===31&<[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ie.message}`,new Error(ye)}})}loadTile(_e){return i._(this,void 0,void 0,function*(){let Fe=_e.uid,Pe=!!(_e&&_e.request&&_e.request.collectResourceTiming)&&new i.bv(_e.request),Ie=new s(_e);this.loading[Fe]=Ie;let lt=new AbortController;Ie.abort=lt;try{let ye=yield this.loadVectorTile(_e,lt);if(delete this.loading[Fe],!ye)return null;let ue=ye.rawData,de={};ye.expires&&(de.expires=ye.expires),ye.cacheControl&&(de.cacheControl=ye.cacheControl);let ht={};if(Pe){let St=Pe.finish();St&&(ht.resourceTiming=JSON.parse(JSON.stringify(St)))}Ie.vectorTile=ye.vectorTile;let Et=Ie.parse(ye.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Fe]=Ie,this.fetching[Fe]={rawTileData:ue,cacheControl:de,resourceTiming:ht};try{let St=yield Et;return i.e({rawTileData:ue.slice(0)},St,de,ht)}finally{delete this.fetching[Fe]}}catch(ye){throw delete this.loading[Fe],Ie.status="done",this.loaded[Fe]=Ie,ye}})}reloadTile(_e){return i._(this,void 0,void 0,function*(){let Fe=_e.uid;if(!this.loaded||!this.loaded[Fe])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Pe=this.loaded[Fe];if(Pe.showCollisionBoxes=_e.showCollisionBoxes,Pe.status==="parsing"){let Ie=yield Pe.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor),lt;if(this.fetching[Fe]){let{rawTileData:ye,cacheControl:ue,resourceTiming:de}=this.fetching[Fe];delete this.fetching[Fe],lt=i.e({rawTileData:ye.slice(0)},Ie,ue,de)}else lt=Ie;return lt}if(Pe.status==="done"&&Pe.vectorTile)return Pe.parse(Pe.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(_e){return i._(this,void 0,void 0,function*(){let Fe=this.loading,Pe=_e.uid;Fe&&Fe[Pe]&&Fe[Pe].abort&&(Fe[Pe].abort.abort(),delete Fe[Pe])})}removeTile(_e){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[_e.uid]&&delete this.loaded[_e.uid]})}}class f{constructor(){this.loaded={}}loadTile(_e){return i._(this,void 0,void 0,function*(){let{uid:Fe,encoding:Pe,rawImageData:Ie,redFactor:lt,greenFactor:ye,blueFactor:ue,baseShift:de}=_e,ht=Ie.width+2,Et=Ie.height+2,St=i.b(Ie)?new i.R({width:ht,height:Et},yield i.bw(Ie,-1,-1,ht,Et)):Ie,Zt=new i.bx(Fe,St,Pe,lt,ye,ue,de);return this.loaded=this.loaded||{},this.loaded[Fe]=Zt,Zt})}removeTile(_e){let Fe=this.loaded,Pe=_e.uid;Fe&&Fe[Pe]&&delete Fe[Pe]}}function c(De,_e){if(De.length!==0){h(De[0],_e);for(var Fe=1;Fe=Math.abs(ue)?Fe-de+ue:ue-de+Fe,Fe=de}Fe+Pe>=0!=!!_e&&De.reverse()}var d=i.by(function De(_e,Fe){var Pe,Ie=_e&&_e.type;if(Ie==="FeatureCollection")for(Pe=0;Pe<_e.features.length;Pe++)De(_e.features[Pe],Fe);else if(Ie==="GeometryCollection")for(Pe=0;Pe<_e.geometries.length;Pe++)De(_e.geometries[Pe],Fe);else if(Ie==="Feature")De(_e.geometry,Fe);else if(Ie==="Polygon")c(_e.coordinates,Fe);else if(Ie==="MultiPolygon")for(Pe=0;Pe<_e.coordinates.length;Pe++)c(_e.coordinates[Pe],Fe);return _e});let p=i.bt.VectorTileFeature.prototype.toGeoJSON;var x={exports:{}},b=i.bz,y=i.bt.VectorTileFeature,k=E;function E(De,_e){this.options=_e||{},this.features=De,this.length=De.length}function A(De,_e){this.id=typeof De.id=="number"?De.id:void 0,this.type=De.type,this.rawGeometry=De.type===1?[De.geometry]:De.geometry,this.properties=De.tags,this.extent=_e||4096}E.prototype.feature=function(De){return new A(this.features[De],this.options.extent)},A.prototype.loadGeometry=function(){var De=this.rawGeometry;this.geometry=[];for(var _e=0;_e>31}function q(De,_e){for(var Fe=De.loadGeometry(),Pe=De.type,Ie=0,lt=0,ye=Fe.length,ue=0;ueDe},G=Math.fround||(O=new Float32Array(1),De=>(O[0]=+De,O[0]));var O;let W=3,re=5,ne=6;class be{constructor(_e){this.options=Object.assign(Object.create(j),_e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(_e){let{log:Fe,minZoom:Pe,maxZoom:Ie}=this.options;Fe&&console.time("total time");let lt=`prepare ${_e.length} points`;Fe&&console.time(lt),this.points=_e;let ye=[];for(let de=0;de<_e.length;de++){let ht=_e[de];if(!ht.geometry)continue;let[Et,St]=ht.geometry.coordinates,Zt=G(he(Et)),qr=G(te(St));ye.push(Zt,qr,1/0,de,-1,1),this.options.reduce&&ye.push(0)}let ue=this.trees[Ie+1]=this._createTree(ye);Fe&&console.timeEnd(lt);for(let de=Ie;de>=Pe;de--){let ht=+Date.now();ue=this.trees[de]=this._createTree(this._cluster(ue,de)),Fe&&console.log("z%d: %d clusters in %dms",de,ue.numItems,+Date.now()-ht)}return Fe&&console.timeEnd("total time"),this}getClusters(_e,Fe){let Pe=((_e[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,_e[1])),lt=_e[2]===180?180:((_e[2]+180)%360+360)%360-180,ye=Math.max(-90,Math.min(90,_e[3]));if(_e[2]-_e[0]>=360)Pe=-180,lt=180;else if(Pe>lt){let St=this.getClusters([Pe,Ie,180,ye],Fe),Zt=this.getClusters([-180,Ie,lt,ye],Fe);return St.concat(Zt)}let ue=this.trees[this._limitZoom(Fe)],de=ue.range(he(Pe),te(ye),he(lt),te(Ie)),ht=ue.data,Et=[];for(let St of de){let Zt=this.stride*St;Et.push(ht[Zt+re]>1?ze(ht,Zt,this.clusterProps):this.points[ht[Zt+W]])}return Et}getChildren(_e){let Fe=this._getOriginId(_e),Pe=this._getOriginZoom(_e),Ie="No cluster with the specified id.",lt=this.trees[Pe];if(!lt)throw new Error(Ie);let ye=lt.data;if(Fe*this.stride>=ye.length)throw new Error(Ie);let ue=this.options.radius/(this.options.extent*Math.pow(2,Pe-1)),de=lt.within(ye[Fe*this.stride],ye[Fe*this.stride+1],ue),ht=[];for(let Et of de){let St=Et*this.stride;ye[St+4]===_e&&ht.push(ye[St+re]>1?ze(ye,St,this.clusterProps):this.points[ye[St+W]])}if(ht.length===0)throw new Error(Ie);return ht}getLeaves(_e,Fe,Pe){let Ie=[];return this._appendLeaves(Ie,_e,Fe=Fe||10,Pe=Pe||0,0),Ie}getTile(_e,Fe,Pe){let Ie=this.trees[this._limitZoom(_e)],lt=Math.pow(2,_e),{extent:ye,radius:ue}=this.options,de=ue/ye,ht=(Pe-de)/lt,Et=(Pe+1+de)/lt,St={features:[]};return this._addTileFeatures(Ie.range((Fe-de)/lt,ht,(Fe+1+de)/lt,Et),Ie.data,Fe,Pe,lt,St),Fe===0&&this._addTileFeatures(Ie.range(1-de/lt,ht,1,Et),Ie.data,lt,Pe,lt,St),Fe===lt-1&&this._addTileFeatures(Ie.range(0,ht,de/lt,Et),Ie.data,-1,Pe,lt,St),St.features.length?St:null}getClusterExpansionZoom(_e){let Fe=this._getOriginZoom(_e)-1;for(;Fe<=this.options.maxZoom;){let Pe=this.getChildren(_e);if(Fe++,Pe.length!==1)break;_e=Pe[0].properties.cluster_id}return Fe}_appendLeaves(_e,Fe,Pe,Ie,lt){let ye=this.getChildren(Fe);for(let ue of ye){let de=ue.properties;if(de&&de.cluster?lt+de.point_count<=Ie?lt+=de.point_count:lt=this._appendLeaves(_e,de.cluster_id,Pe,Ie,lt):lt1,Et,St,Zt;if(ht)Et=Ce(Fe,de,this.clusterProps),St=Fe[de],Zt=Fe[de+1];else{let vr=this.points[Fe[de+W]];Et=vr.properties;let[Er,si]=vr.geometry.coordinates;St=he(Er),Zt=te(si)}let qr={type:1,geometry:[[Math.round(this.options.extent*(St*lt-Pe)),Math.round(this.options.extent*(Zt*lt-Ie))]],tags:Et},Lr;Lr=ht||this.options.generateId?Fe[de+W]:this.points[Fe[de+W]].id,Lr!==void 0&&(qr.id=Lr),ye.features.push(qr)}}_limitZoom(_e){return Math.max(this.options.minZoom,Math.min(Math.floor(+_e),this.options.maxZoom+1))}_cluster(_e,Fe){let{radius:Pe,extent:Ie,reduce:lt,minPoints:ye}=this.options,ue=Pe/(Ie*Math.pow(2,Fe)),de=_e.data,ht=[],Et=this.stride;for(let St=0;StFe&&(Er+=de[Ei+re])}if(Er>vr&&Er>=ye){let si,Ei=Zt*vr,Si=qr*vr,xi=-1,Hi=((St/Et|0)<<5)+(Fe+1)+this.points.length;for(let Jr of Lr){let ci=Jr*Et;if(de[ci+2]<=Fe)continue;de[ci+2]=Fe;let Di=de[ci+re];Ei+=de[ci]*Di,Si+=de[ci+1]*Di,de[ci+4]=Hi,lt&&(si||(si=this._map(de,St,!0),xi=this.clusterProps.length,this.clusterProps.push(si)),lt(si,this._map(de,ci)))}de[St+4]=Hi,ht.push(Ei/Er,Si/Er,1/0,Hi,-1,Er),lt&&ht.push(xi)}else{for(let si=0;si1)for(let si of Lr){let Ei=si*Et;if(!(de[Ei+2]<=Fe)){de[Ei+2]=Fe;for(let Si=0;Si>5}_getOriginZoom(_e){return(_e-this.points.length)%32}_map(_e,Fe,Pe){if(_e[Fe+re]>1){let ye=this.clusterProps[_e[Fe+ne]];return Pe?Object.assign({},ye):ye}let Ie=this.points[_e[Fe+W]].properties,lt=this.options.map(Ie);return Pe&<===Ie?Object.assign({},lt):lt}}function ze(De,_e,Fe){return{type:"Feature",id:De[_e+W],properties:Ce(De,_e,Fe),geometry:{type:"Point",coordinates:[(Pe=De[_e],360*(Pe-.5)),ke(De[_e+1])]}};var Pe}function Ce(De,_e,Fe){let Pe=De[_e+re],Ie=Pe>=1e4?`${Math.round(Pe/1e3)}k`:Pe>=1e3?Math.round(Pe/100)/10+"k":Pe,lt=De[_e+ne],ye=lt===-1?{}:Object.assign({},Fe[lt]);return Object.assign(ye,{cluster:!0,cluster_id:De[_e+W],point_count:Pe,point_count_abbreviated:Ie})}function he(De){return De/360+.5}function te(De){let _e=Math.sin(De*Math.PI/180),Fe=.5-.25*Math.log((1+_e)/(1-_e))/Math.PI;return Fe<0?0:Fe>1?1:Fe}function ke(De){let _e=(180-360*De)*Math.PI/180;return 360*Math.atan(Math.exp(_e))/Math.PI-90}function Ee(De,_e,Fe,Pe){let Ie=Pe,lt=_e+(Fe-_e>>1),ye,ue=Fe-_e,de=De[_e],ht=De[_e+1],Et=De[Fe],St=De[Fe+1];for(let Zt=_e+3;ZtIe)ye=Zt,Ie=qr;else if(qr===Ie){let Lr=Math.abs(Zt-lt);LrPe&&(ye-_e>3&&Ee(De,_e,ye,Pe),De[ye+2]=Ie,Fe-ye>3&&Ee(De,ye,Fe,Pe))}function Me(De,_e,Fe,Pe,Ie,lt){let ye=Ie-Fe,ue=lt-Pe;if(ye!==0||ue!==0){let de=((De-Fe)*ye+(_e-Pe)*ue)/(ye*ye+ue*ue);de>1?(Fe=Ie,Pe=lt):de>0&&(Fe+=ye*de,Pe+=ue*de)}return ye=De-Fe,ue=_e-Pe,ye*ye+ue*ue}function Oe(De,_e,Fe,Pe){let Ie={id:De==null?null:De,type:_e,geometry:Fe,tags:Pe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(_e==="Point"||_e==="MultiPoint"||_e==="LineString")Re(Ie,Fe);else if(_e==="Polygon")Re(Ie,Fe[0]);else if(_e==="MultiLineString")for(let lt of Fe)Re(Ie,lt);else if(_e==="MultiPolygon")for(let lt of Fe)Re(Ie,lt[0]);return Ie}function Re(De,_e){for(let Fe=0;Fe<_e.length;Fe+=3)De.minX=Math.min(De.minX,_e[Fe]),De.minY=Math.min(De.minY,_e[Fe+1]),De.maxX=Math.max(De.maxX,_e[Fe]),De.maxY=Math.max(De.maxY,_e[Fe+1])}function me(De,_e,Fe,Pe){if(!_e.geometry)return;let Ie=_e.geometry.coordinates;if(Ie&&Ie.length===0)return;let lt=_e.geometry.type,ye=Math.pow(Fe.tolerance/((1<0&&(ye+=Pe?(Ie*Et-ht*lt)/2:Math.sqrt(Math.pow(ht-Ie,2)+Math.pow(Et-lt,2))),Ie=ht,lt=Et}let ue=_e.length-3;_e[2]=1,Ee(_e,0,ue,Fe),_e[ue+2]=1,_e.size=Math.abs(ye),_e.start=0,_e.end=_e.size}function Ze(De,_e,Fe,Pe){for(let Ie=0;Ie1?1:Fe}function Pt(De,_e,Fe,Pe,Ie,lt,ye,ue){if(Pe/=_e,lt>=(Fe/=_e)&&ye=Pe)return null;let de=[];for(let ht of De){let Et=ht.geometry,St=ht.type,Zt=Ie===0?ht.minX:ht.minY,qr=Ie===0?ht.maxX:ht.maxY;if(Zt>=Fe&&qr=Pe)continue;let Lr=[];if(St==="Point"||St==="MultiPoint")Qe(Et,Lr,Fe,Pe,Ie);else if(St==="LineString")Xe(Et,Lr,Fe,Pe,Ie,!1,ue.lineMetrics);else if(St==="MultiLineString")xt(Et,Lr,Fe,Pe,Ie,!1);else if(St==="Polygon")xt(Et,Lr,Fe,Pe,Ie,!0);else if(St==="MultiPolygon")for(let vr of Et){let Er=[];xt(vr,Er,Fe,Pe,Ie,!0),Er.length&&Lr.push(Er)}if(Lr.length){if(ue.lineMetrics&&St==="LineString"){for(let vr of Lr)de.push(Oe(ht.id,St,vr,ht.tags));continue}St!=="LineString"&&St!=="MultiLineString"||(Lr.length===1?(St="LineString",Lr=Lr[0]):St="MultiLineString"),St!=="Point"&&St!=="MultiPoint"||(St=Lr.length===3?"Point":"MultiPoint"),de.push(Oe(ht.id,St,Lr,ht.tags))}}return de.length?de:null}function Qe(De,_e,Fe,Pe,Ie){for(let lt=0;lt=Fe&&ye<=Pe&&_t(_e,De[lt],De[lt+1],De[lt+2])}}function Xe(De,_e,Fe,Pe,Ie,lt,ye){let ue=Tt(De),de=Ie===0?Ct:jt,ht,Et,St=De.start;for(let Er=0;ErFe&&(Et=de(ue,si,Ei,xi,Hi,Fe),ye&&(ue.start=St+ht*Et)):Jr>Pe?ci=Fe&&(Et=de(ue,si,Ei,xi,Hi,Fe),Di=!0),ci>Pe&&Jr<=Pe&&(Et=de(ue,si,Ei,xi,Hi,Pe),Di=!0),!lt&&Di&&(ye&&(ue.end=St+ht*Et),_e.push(ue),ue=Tt(De)),ye&&(St+=ht)}let Zt=De.length-3,qr=De[Zt],Lr=De[Zt+1],vr=Ie===0?qr:Lr;vr>=Fe&&vr<=Pe&&_t(ue,qr,Lr,De[Zt+2]),Zt=ue.length-3,lt&&Zt>=3&&(ue[Zt]!==ue[0]||ue[Zt+1]!==ue[1])&&_t(ue,ue[0],ue[1],ue[2]),ue.length&&_e.push(ue)}function Tt(De){let _e=[];return _e.size=De.size,_e.start=De.start,_e.end=De.end,_e}function xt(De,_e,Fe,Pe,Ie,lt){for(let ye of De)Xe(ye,_e,Fe,Pe,Ie,lt,!1)}function _t(De,_e,Fe,Pe){De.push(_e,Fe,Pe)}function Ct(De,_e,Fe,Pe,Ie,lt){let ye=(lt-_e)/(Pe-_e);return _t(De,lt,Fe+(Ie-Fe)*ye,1),ye}function jt(De,_e,Fe,Pe,Ie,lt){let ye=(lt-Fe)/(Ie-Fe);return _t(De,_e+(Pe-_e)*ye,lt,1),ye}function At(De,_e){let Fe=[];for(let Pe=0;Pe0&&_e.size<(Ie?ye:Pe))return void(Fe.numPoints+=_e.length/3);let ue=[];for(let de=0;de<_e.length;de+=3)(Pe===0||_e[de+2]>ye)&&(Fe.numSimplified++,ue.push(_e[de],_e[de+1])),Fe.numPoints++;Ie&&function(de,ht){let Et=0;for(let St=0,Zt=de.length,qr=Zt-2;St0===ht)for(let St=0,Zt=de.length;St24)throw new Error("maxZoom should be in the 0-24 range");if(Fe.promoteId&&Fe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ie=function(lt,ye){let ue=[];if(lt.type==="FeatureCollection")for(let de=0;de1&&console.time("creation"),qr=this.tiles[Zt]=ct(_e,Fe,Pe,Ie,ht),this.tileCoords.push({z:Fe,x:Pe,y:Ie}),Et)){Et>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Fe,Pe,Ie,qr.numFeatures,qr.numPoints,qr.numSimplified),console.timeEnd("creation"));let Di=`z${Fe}`;this.stats[Di]=(this.stats[Di]||0)+1,this.total++}if(qr.source=_e,lt==null){if(Fe===ht.indexMaxZoom||qr.numPoints<=ht.indexMaxPoints)continue}else{if(Fe===ht.maxZoom||Fe===lt)continue;if(lt!=null){let Di=lt-Fe;if(Pe!==ye>>Di||Ie!==ue>>Di)continue}}if(qr.source=null,_e.length===0)continue;Et>1&&console.time("clipping");let Lr=.5*ht.buffer/ht.extent,vr=.5-Lr,Er=.5+Lr,si=1+Lr,Ei=null,Si=null,xi=null,Hi=null,Jr=Pt(_e,St,Pe-Lr,Pe+Er,0,qr.minX,qr.maxX,ht),ci=Pt(_e,St,Pe+vr,Pe+si,0,qr.minX,qr.maxX,ht);_e=null,Jr&&(Ei=Pt(Jr,St,Ie-Lr,Ie+Er,1,qr.minY,qr.maxY,ht),Si=Pt(Jr,St,Ie+vr,Ie+si,1,qr.minY,qr.maxY,ht),Jr=null),ci&&(xi=Pt(ci,St,Ie-Lr,Ie+Er,1,qr.minY,qr.maxY,ht),Hi=Pt(ci,St,Ie+vr,Ie+si,1,qr.minY,qr.maxY,ht),ci=null),Et>1&&console.timeEnd("clipping"),de.push(Ei||[],Fe+1,2*Pe,2*Ie),de.push(Si||[],Fe+1,2*Pe,2*Ie+1),de.push(xi||[],Fe+1,2*Pe+1,2*Ie),de.push(Hi||[],Fe+1,2*Pe+1,2*Ie+1)}}getTile(_e,Fe,Pe){_e=+_e,Fe=+Fe,Pe=+Pe;let Ie=this.options,{extent:lt,debug:ye}=Ie;if(_e<0||_e>24)return null;let ue=1<<_e,de=Mt(_e,Fe=Fe+ue&ue-1,Pe);if(this.tiles[de])return nt(this.tiles[de],lt);ye>1&&console.log("drilling down to z%d-%d-%d",_e,Fe,Pe);let ht,Et=_e,St=Fe,Zt=Pe;for(;!ht&&Et>0;)Et--,St>>=1,Zt>>=1,ht=this.tiles[Mt(Et,St,Zt)];return ht&&ht.source?(ye>1&&(console.log("found parent tile z%d-%d-%d",Et,St,Zt),console.time("drilling down")),this.splitTile(ht.source,Et,St,Zt,_e,Fe,Pe),ye>1&&console.timeEnd("drilling down"),this.tiles[de]?nt(this.tiles[de],lt):null):null}}function Mt(De,_e,Fe){return 32*((1<{St.properties=qr;let Lr={};for(let vr of Zt)Lr[vr]=de[vr].evaluate(Et,St);return Lr},ye.reduce=(qr,Lr)=>{St.properties=Lr;for(let vr of Zt)Et.accumulated=qr[vr],qr[vr]=ht[vr].evaluate(Et,St)},ye}(_e)).load((yield this._pendingData).features):(Ie=yield this._pendingData,new Je(Ie,_e.geojsonVtOptions)),this.loaded={};let lt={};if(Pe){let ye=Pe.finish();ye&&(lt.resourceTiming={},lt.resourceTiming[_e.source]=JSON.parse(JSON.stringify(ye)))}return lt}catch(lt){if(delete this._pendingRequest,i.bB(lt))return{abandoned:!0};throw lt}var Ie})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(_e){let Fe=this.loaded;return Fe&&Fe[_e.uid]?super.reloadTile(_e):this.loadTile(_e)}loadAndProcessGeoJSON(_e,Fe){return i._(this,void 0,void 0,function*(){let Pe=yield this.loadGeoJSON(_e,Fe);if(delete this._pendingRequest,typeof Pe!="object")throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`);if(d(Pe,!0),_e.filter){let Ie=i.bC(_e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ie.result==="error")throw new Error(Ie.value.map(ye=>`${ye.key}: ${ye.message}`).join(", "));Pe={type:"FeatureCollection",features:Pe.features.filter(ye=>Ie.value.evaluate({zoom:0},ye))}}return Pe})}loadGeoJSON(_e,Fe){return i._(this,void 0,void 0,function*(){let{promoteId:Pe}=_e;if(_e.request){let Ie=yield i.h(_e.request,Fe);return this._dataUpdateable=Kt(Ie.data,Pe)?ir(Ie.data,Pe):void 0,Ie.data}if(typeof _e.data=="string")try{let Ie=JSON.parse(_e.data);return this._dataUpdateable=Kt(Ie,Pe)?ir(Ie,Pe):void 0,Ie}catch(Ie){throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`)}if(!_e.dataDiff)throw new Error(`Input data given to '${_e.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${_e.source}`);return function(Ie,lt,ye){var ue,de,ht,Et;if(lt.removeAll&&Ie.clear(),lt.remove)for(let St of lt.remove)Ie.delete(St);if(lt.add)for(let St of lt.add){let Zt=Vt(St,ye);Zt!=null&&Ie.set(Zt,St)}if(lt.update)for(let St of lt.update){let Zt=Ie.get(St.id);if(Zt==null)continue;let qr=!St.removeAllProperties&&(((ue=St.removeProperties)===null||ue===void 0?void 0:ue.length)>0||((de=St.addOrUpdateProperties)===null||de===void 0?void 0:de.length)>0);if((St.newGeometry||St.removeAllProperties||qr)&&(Zt=Object.assign({},Zt),Ie.set(St.id,Zt),qr&&(Zt.properties=Object.assign({},Zt.properties))),St.newGeometry&&(Zt.geometry=St.newGeometry),St.removeAllProperties)Zt.properties={};else if(((ht=St.removeProperties)===null||ht===void 0?void 0:ht.length)>0)for(let Lr of St.removeProperties)Object.prototype.hasOwnProperty.call(Zt.properties,Lr)&&delete Zt.properties[Lr];if(((Et=St.addOrUpdateProperties)===null||Et===void 0?void 0:Et.length)>0)for(let{key:Lr,value:vr}of St.addOrUpdateProperties)Zt.properties[Lr]=vr}}(this._dataUpdateable,_e.dataDiff,Pe),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(_e){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(_e){return this._geoJSONIndex.getClusterExpansionZoom(_e.clusterId)}getClusterChildren(_e){return this._geoJSONIndex.getChildren(_e.clusterId)}getClusterLeaves(_e){return this._geoJSONIndex.getLeaves(_e.clusterId,_e.limit,_e.offset)}}class Ot{constructor(_e){this.self=_e,this.actor=new i.F(_e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Fe,Pe)=>{if(this.externalWorkerSourceTypes[Fe])throw new Error(`Worker source with name "${Fe}" already registered.`);this.externalWorkerSourceTypes[Fe]=Pe},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Fe=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Fe)},this.actor.registerMessageHandler("LDT",(Fe,Pe)=>this._getDEMWorkerSource(Fe,Pe.source).loadTile(Pe)),this.actor.registerMessageHandler("RDT",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Fe,Pe.source).removeTile(Pe)})),this.actor.registerMessageHandler("GCEZ",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterExpansionZoom(Pe)})),this.actor.registerMessageHandler("GCC",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterChildren(Pe)})),this.actor.registerMessageHandler("GCL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Fe,Pe.type,Pe.source).getClusterLeaves(Pe)})),this.actor.registerMessageHandler("LD",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).loadData(Pe)),this.actor.registerMessageHandler("GD",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).getData()),this.actor.registerMessageHandler("LT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).loadTile(Pe)),this.actor.registerMessageHandler("RT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).reloadTile(Pe)),this.actor.registerMessageHandler("AT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).abortTile(Pe)),this.actor.registerMessageHandler("RMT",(Fe,Pe)=>this._getWorkerSource(Fe,Pe.type,Pe.source).removeTile(Pe)),this.actor.registerMessageHandler("RS",(Fe,Pe)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Fe]||!this.workerSources[Fe][Pe.type]||!this.workerSources[Fe][Pe.type][Pe.source])return;let Ie=this.workerSources[Fe][Pe.type][Pe.source];delete this.workerSources[Fe][Pe.type][Pe.source],Ie.removeSource!==void 0&&Ie.removeSource(Pe)})),this.actor.registerMessageHandler("RM",Fe=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Fe],delete this.availableImages[Fe],delete this.workerSources[Fe],delete this.demWorkerSources[Fe]})),this.actor.registerMessageHandler("SR",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this.referrer=Pe})),this.actor.registerMessageHandler("SRPS",(Fe,Pe)=>this._syncRTLPluginState(Fe,Pe)),this.actor.registerMessageHandler("IS",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this.self.importScripts(Pe)})),this.actor.registerMessageHandler("SI",(Fe,Pe)=>this._setImages(Fe,Pe)),this.actor.registerMessageHandler("UL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Fe).update(Pe.layers,Pe.removedIds)})),this.actor.registerMessageHandler("SL",(Fe,Pe)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Fe).replace(Pe)}))}_setImages(_e,Fe){return i._(this,void 0,void 0,function*(){this.availableImages[_e]=Fe;for(let Pe in this.workerSources[_e]){let Ie=this.workerSources[_e][Pe];for(let lt in Ie)Ie[lt].availableImages=Fe}})}_syncRTLPluginState(_e,Fe){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Fe.pluginStatus!=="loading")return i.bD.setState(Fe),Fe;let Pe=Fe.pluginURL;if(this.self.importScripts(Pe),i.bD.isParsed()){let Ie={pluginStatus:"loaded",pluginURL:Pe};return i.bD.setState(Ie),Ie}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Pe}`)})}_getAvailableImages(_e){let Fe=this.availableImages[_e];return Fe||(Fe=[]),Fe}_getLayerIndex(_e){let Fe=this.layerIndexes[_e];return Fe||(Fe=this.layerIndexes[_e]=new a),Fe}_getWorkerSource(_e,Fe,Pe){if(this.workerSources[_e]||(this.workerSources[_e]={}),this.workerSources[_e][Fe]||(this.workerSources[_e][Fe]={}),!this.workerSources[_e][Fe][Pe]){let Ie={sendAsync:(lt,ye)=>(lt.targetMapId=_e,this.actor.sendAsync(lt,ye))};switch(Fe){case"vector":this.workerSources[_e][Fe][Pe]=new l(Ie,this._getLayerIndex(_e),this._getAvailableImages(_e));break;case"geojson":this.workerSources[_e][Fe][Pe]=new fr(Ie,this._getLayerIndex(_e),this._getAvailableImages(_e));break;default:this.workerSources[_e][Fe][Pe]=new this.externalWorkerSourceTypes[Fe](Ie,this._getLayerIndex(_e),this._getAvailableImages(_e))}}return this.workerSources[_e][Fe][Pe]}_getDEMWorkerSource(_e,Fe){return this.demWorkerSources[_e]||(this.demWorkerSources[_e]={}),this.demWorkerSources[_e][Fe]||(this.demWorkerSources[_e][Fe]=new f),this.demWorkerSources[_e][Fe]}}return i.i(self)&&(self.worker=new Ot(self)),Ot}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,u,l={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:oe=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);oe.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(oe,w=0){return this.getImageCanvasContext(oe).getImageData(-w,-w,oe.width+2*w,oe.height+2*w)},getImageCanvasContext(oe){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=oe.width,w.height=oe.height,B.drawImage(oe,0,0,oe.width,oe.height),B},resolveURL:oe=>(s||(s=document.createElement("a")),s.href=oe,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(u==null&&(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)}};class f{static testProp(w){if(!f.docStyle)return w[0];for(let B=0;B{window.removeEventListener("click",f.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=f.getScale(w);return f.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=f.getScale(w);for(let le=0;le{h&&b(h),h=null,x=!0},d.onerror=()=>{p=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(oe){let w,B,Q,ee;oe.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},oe.addThrottleControl=pt=>{let zt=Q++;return ee[zt]=pt,zt},oe.removeThrottleControl=pt=>{delete ee[pt],Ne()},oe.getImage=(pt,zt,Yt=!0)=>new Promise((Jt,yr)=>{c.supported&&(pt.headers||(pt.headers={}),pt.headers.accept="image/webp,*/*"),a.e(pt,{type:"image"}),w.push({abortController:zt,requestParameters:pt,supportImageRefresh:Yt,state:"queued",onError:Ir=>{yr(Ir)},onSuccess:Ir=>{Jt(Ir)}}),Ne()});let le=pt=>a._(this,void 0,void 0,function*(){pt.state="running";let{requestParameters:zt,supportImageRefresh:Yt,onError:Jt,onSuccess:yr,abortController:Ir}=pt,ce=Yt===!1&&!a.i(self)&&!a.g(zt.url)&&(!zt.headers||Object.keys(zt.headers).reduce((Ve,ot)=>Ve&&ot==="accept",!0));B++;let Ae=ce?$e(zt,Ir):a.m(zt,Ir);try{let Ve=yield Ae;delete pt.abortController,pt.state="completed",Ve.data instanceof HTMLImageElement||a.b(Ve.data)?yr(Ve):Ve.data&&yr({data:yield(qe=Ve.data,typeof createImageBitmap=="function"?a.d(qe):a.f(qe)),cacheControl:Ve.cacheControl,expires:Ve.expires})}catch(Ve){delete pt.abortController,Jt(Ve)}finally{B--,Ne()}var qe}),Ne=()=>{let pt=(()=>{for(let zt of Object.keys(ee))if(ee[zt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let zt=B;zt0;zt++){let Yt=w.shift();Yt.abortController.signal.aborted?zt--:le(Yt)}},$e=(pt,zt)=>new Promise((Yt,Jt)=>{let yr=new Image,Ir=pt.url,ce=pt.credentials;ce&&ce==="include"?yr.crossOrigin="use-credentials":(ce&&ce==="same-origin"||!a.s(Ir))&&(yr.crossOrigin="anonymous"),zt.signal.addEventListener("abort",()=>{yr.src="",Jt(a.c())}),yr.fetchPriority="high",yr.onload=()=>{yr.onerror=yr.onload=null,Yt({data:yr})},yr.onerror=()=>{yr.onerror=yr.onload=null,zt.signal.aborted||Jt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},yr.src=Ir})}(y||(y={})),y.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(oe){var w=new a.A(3);return w[0]=oe[0],w[1]=oe[1],w[2]=oe[2],w}var A,L=function(oe,w,B){return oe[0]=w[0]-B[0],oe[1]=w[1]-B[1],oe[2]=w[2]-B[2],oe};A=new a.A(3),a.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var _=function(oe){var w=oe[0],B=oe[1];return w*w+B*B};function C(oe){let w=[];if(typeof oe=="string")w.push({id:"default",url:oe});else if(oe&&oe.length>0){let B=[];for(let{id:Q,url:ee}of oe){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(oe,w,B){let Q=oe.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var oe=new a.A(2);a.A!=Float32Array&&(oe[0]=0,oe[1]=0)})();class v{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,Ne=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:$e}=this,{gl:pt}=$e;if(this.useMipmap=!!(B&&B.useMipmap),pt.bindTexture(pt.TEXTURE_2D,this.texture),$e.pixelStoreUnpackFlipY.set(!1),$e.pixelStoreUnpack.set(1),$e.pixelStoreUnpackPremultiplyAlpha.set(this.format===pt.RGBA&&(!B||B.premultiply!==!1)),Ne)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?pt.texImage2D(pt.TEXTURE_2D,0,this.format,this.format,pt.UNSIGNED_BYTE,w):pt.texImage2D(pt.TEXTURE_2D,0,this.format,ee,le,0,this.format,pt.UNSIGNED_BYTE,w.data);else{let{x:zt,y:Yt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?pt.texSubImage2D(pt.TEXTURE_2D,0,zt,Yt,pt.RGBA,pt.UNSIGNED_BYTE,w):pt.texSubImage2D(pt.TEXTURE_2D,0,zt,Yt,ee,le,pt.RGBA,pt.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&pt.generateMipmap(pt.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 z(oe){let{userImage:w}=oe;return!!(w&&w.render&&w.render())&&(oe.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 v(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:Ne}=this.patterns[le],$e=Ne.x+1,pt=Ne.y+1,zt=this.getImage(le).data,Yt=zt.width,Jt=zt.height;a.R.copy(zt,ee,{x:0,y:0},{x:$e,y:pt},{width:Yt,height:Jt}),a.R.copy(zt,ee,{x:0,y:Jt-1},{x:$e,y:pt-1},{width:Yt,height:1}),a.R.copy(zt,ee,{x:0,y:0},{x:$e,y:pt+Jt},{width:Yt,height:1}),a.R.copy(zt,ee,{x:Yt-1,y:0},{x:$e-1,y:pt},{width:1,height:Jt}),a.R.copy(zt,ee,{x:0,y:0},{x:$e+Yt,y:pt},{width:1,height:Jt})}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`),z(Q)&&this.updateImage(B,Q)}}}let F=1e20;function q(oe,w,B,Q,ee,le,Ne,$e,pt){for(let zt=w;zt-1);pt++,le[pt]=$e,Ne[pt]=zt,Ne[pt+1]=F}for(let $e=0,pt=0;$e65535)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 $e=H.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=$e}let Ne=yield Q.requests[le];for(let $e in Ne)this._doesCharSupportLocalGlyph(+$e)||(Q.glyphs[+$e]=Ne[+$e]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:Ne[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 $e="400";/bold/i.test(B)?$e="900":/medium/i.test(B)?$e="500":/light/i.test(B)&&($e="200"),le=w.tinySDF=new H.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:$e})}let Ne=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:Ne.width||60,height:Ne.height||60},Ne.data),metrics:{width:Ne.glyphWidth/2||24,height:Ne.glyphHeight/2||24,left:Ne.glyphLeft/2+.5||0,top:Ne.glyphTop/2-27.5||-8,advance:Ne.glyphAdvance/2||24,isDoubleResolution:!0}}}}H.loadGlyphRange=function(oe,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,Ne=Q.transformRequest(B.replace("{fontstack}",oe).replace("{range}",`${ee}-${le}`),"Glyphs"),$e=yield a.l(Ne,new AbortController);if(!$e||!$e.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let pt={};for(let zt of a.n($e.data))pt[zt.id]=zt;return pt})},H.TinySDF=class{constructor({fontSize:oe=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:Ne="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let $e=this.size=oe+4*w,pt=this._createCanvas($e),zt=this.ctx=pt.getContext("2d",{willReadFrequently:!0});zt.font=`${Ne} ${le} ${oe}px ${ee}`,zt.textBaseline="alphabetic",zt.textAlign="left",zt.fillStyle="black",this.gridOuter=new Float64Array($e*$e),this.gridInner=new Float64Array($e*$e),this.f=new Float64Array($e),this.z=new Float64Array($e+1),this.v=new Uint16Array($e)}_createCanvas(oe){let w=document.createElement("canvas");return w.width=w.height=oe,w}draw(oe){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(oe),Ne=Math.ceil(B),$e=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),pt=Math.min(this.size-this.buffer,Ne+Math.ceil(Q)),zt=$e+2*this.buffer,Yt=pt+2*this.buffer,Jt=Math.max(zt*Yt,0),yr=new Uint8ClampedArray(Jt),Ir={data:yr,width:zt,height:Yt,glyphWidth:$e,glyphHeight:pt,glyphTop:Ne,glyphLeft:0,glyphAdvance:w};if($e===0||pt===0)return Ir;let{ctx:ce,buffer:Ae,gridInner:qe,gridOuter:Ve}=this;ce.clearRect(Ae,Ae,$e,pt),ce.fillText(oe,Ae,Ae+Ne);let ot=ce.getImageData(Ae,Ae,$e,pt);Ve.fill(F,0,Jt),qe.fill(0,0,Jt);for(let Ke=0;Ke0?$t*$t:0,qe[Xt]=$t<0?$t*$t:0}}q(Ve,0,0,zt,Yt,zt,this.f,this.v,this.z),q(qe,Ae,Ae,$e,pt,zt,this.f,this.v,this.z);for(let Ke=0;Ke1&&(pt=w[++$e]);let Yt=Math.abs(zt-pt.left),Jt=Math.abs(zt-pt.right),yr=Math.min(Yt,Jt),Ir,ce=le/Q*(ee+1);if(pt.isDash){let Ae=ee-Math.abs(ce);Ir=Math.sqrt(yr*yr+Ae*Ae)}else Ir=ee-Math.sqrt(yr*yr+ce*ce);this.data[Ne+zt]=Math.max(0,Math.min(255,Ir+128))}}}addRegularDash(w){for(let $e=w.length-1;$e>=0;--$e){let pt=w[$e],zt=w[$e+1];pt.zeroLength?w.splice($e,1):zt&&zt.isDash===pt.isDash&&(zt.left=pt.left,w.splice($e,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,Ne=w[le];for(let $e=0;$e1&&(Ne=w[++le]);let pt=Math.abs($e-Ne.left),zt=Math.abs($e-Ne.right),Yt=Math.min(pt,zt);this.data[ee+$e]=Math.max(0,Math.min(255,(Ne.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 $e=0;$e{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[be]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(l.hardwareConcurrency/2),he,te;function ke(){return he||(he=new ze),he}ze.workerCount=a.C(globalThis)?Math.max(Math.min(Ce,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function Me(){return te||(te=new Ee(ke(),a.G),te.registerMessageHandler("GR",(oe,w,B)=>a.m(w,B))),te}function Oe(oe,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*oe.width,.5*oe.height,1]),a.L(B,B,oe.calculatePosMatrix(w.toUnwrapped()))}function Re(oe,w,B,Q,ee,le){let Ne=function(Jt,yr,Ir){if(Jt)for(let ce of Jt){let Ae=yr[ce];if(Ae&&Ae.source===Ir&&Ae.type==="fill-extrusion")return!0}else for(let ce in yr){let Ae=yr[ce];if(Ae.source===Ir&&Ae.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,oe.id),$e=le.maxPitchScaleFactor(),pt=oe.tilesIn(Q,$e,Ne);pt.sort(me);let zt=[];for(let Jt of pt)zt.push({wrappedTileID:Jt.tileID.wrapped().key,queryResults:Jt.tile.queryRenderedFeatures(w,B,oe._state,Jt.queryGeometry,Jt.cameraQueryGeometry,Jt.scale,ee,le,$e,Oe(oe.transform,Jt.tileID))});let Yt=function(Jt){let yr={},Ir={};for(let ce of Jt){let Ae=ce.queryResults,qe=ce.wrappedTileID,Ve=Ir[qe]=Ir[qe]||{};for(let ot in Ae){let Ke=Ae[ot],ft=Ve[ot]=Ve[ot]||{},qt=yr[ot]=yr[ot]||[];for(let Xt of Ke)ft[Xt.featureIndex]||(ft[Xt.featureIndex]=!0,qt.push(Xt))}}return yr}(zt);for(let Jt in Yt)Yt[Jt].forEach(yr=>{let Ir=yr.feature,ce=oe.getFeatureState(Ir.layer["source-layer"],Ir.id);Ir.source=Ir.layer.source,Ir.layer["source-layer"]&&(Ir.sourceLayer=Ir.layer["source-layer"]),Ir.state=ce});return Yt}function me(oe,w){let B=oe.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 Be(oe,w,B){return a._(this,void 0,void 0,function*(){let Q=oe;if(oe.url?Q=(yield a.h(w.transformRequest(oe.url,"Source"),B)).data:yield l.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,oe),["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 fe{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 fe))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(fe.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 fe?w:w&&new fe(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new fe(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 fe(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class Ze{constructor(w,B,Q){this.bounds=fe.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),Ne=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,Ne)=>{w.reloadPromise={resolve:le,reject:Ne}})}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 gt 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 Be(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 y.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,Ne=Q.data;w.texture=this.map.painter.getTileTexture(Ne.width),w.texture?w.texture.update(Ne,{useMipmap:!0}):(w.texture=new v(ee,Ne,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 Pt extends gt{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 y.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 Ne=a.b(le)&&a.U()?le:yield this.readImageNow(le),$e={type:this.type,uid:w.uid,source:this.id,rawImageData:Ne,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 pt=yield w.actor.sendAsync({type:"LDT",data:$e});w.dem=pt,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 l.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,Ne=(B.x+1+Q)%Q,$e=B.x+1===Q?w.wrap+1:w.wrap,pt={};return pt[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,B.y).key]={backfilled:!1},B.y>0&&(pt[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},pt[new a.S(w.overscaledZ,$e,B.z,Ne,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 Xe=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Tt 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 y.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,Ne=1/0,$e=-1/0,pt=-1/0;for(let yr of ee)le=Math.min(le,yr.x),Ne=Math.min(Ne,yr.y),$e=Math.max($e,yr.x),pt=Math.max(pt,yr.y);let zt=Math.max($e-le,pt-Ne),Yt=Math.max(0,Math.floor(-Math.log(zt)/Math.LN2)),Jt=Math.pow(2,Yt);return new a.a1(Yt,Math.floor((le+$e)/2*Jt),Math.floor((Ne+pt)/2*Jt))}(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,Xe.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new v(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 xt extends Tt{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,Xe.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 v(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 _t extends Tt{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(Ne=>typeof Ne!="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,Xe.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 v(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let Ne=this.tiles[le];Ne.state!=="loaded"&&(Ne.state="loaded",Ne.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 Ct={},jt=oe=>{switch(oe){case"geojson":return Qe;case"image":return Tt;case"raster":return gt;case"raster-dem":return Pt;case"vector":return et;case"video":return xt;case"canvas":return _t}return Ct[oe]},At="RTLPluginLoaded";class Te extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Me()}_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=l.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(At))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let nt=null;function ut(){return nt||(nt=new Te),nt}class ct{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(zt)).filter(Boolean);if(pt.length!==0){$e.layers=pt,$e.stateDependentLayerIds&&($e.stateDependentLayers=$e.stateDependentLayerIds.map(zt=>pt.filter(Yt=>Yt.id===zt)[0]));for(let zt of pt)Ne[zt.id]=$e}}return Ne}(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,ut().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 v(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new v(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,Ne,$e,pt,zt,Yt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:Ne,tileSize:this.tileSize,pixelPosMatrix:Yt,transform:pt,params:$e,queryPadding:this.queryPadding*zt},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:"",Ne=ee._geojsonTileLayer||ee[le];if(!Ne)return;let $e=a.a7(B&&B.filter),{z:pt,x:zt,y:Yt}=this.tileID.canonical,Jt={z:pt,x:zt,y:Yt};for(let yr=0;yrQ)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 Ne=this._getAndRemoveByKey(this.order[0]);Ne&&this.onRemove(Ne)}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 je{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 Ne in le)delete ee[Ne]}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 Ne in this.stateChanges[ee])this.state[ee][Ne]||(this.state[ee][Ne]={}),a.e(this.state[ee][Ne],this.stateChanges[ee][Ne]),le[Ne]=this.state[ee][Ne];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let Ne in this.state[ee])le[Ne]={},this.state[ee][Ne]={};else for(let Ne in this.deletedStates[ee]){if(this.deletedStates[ee][Ne]===null)this.state[ee][Ne]={};else for(let $e of Object.keys(this.deletedStates[ee][Ne]))delete this.state[ee][Ne][$e];le[Ne]=this.state[ee][Ne]}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 tt 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,Ne,$e)=>{let pt=new(jt(le.type))(ee,le,Ne,$e);if(pt.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${pt.id}`);return pt})(w,B,Q,this),this._tiles={},this._cache=new rt(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new je,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(Je).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,Ne=ee.tileID,$e=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),pt=new a.P(Ne.canonical.x,Ne.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-Ne.overscaledZ||pt.y-$e.y||pt.x-$e.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Je).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=l.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(Ne)>1&&(Math.abs(Ne+pt)===1?Ne+=pt:Math.abs(Ne-pt)===1&&(Ne-=pt)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,Ne,$e),ee.neighboringTiles&&ee.neighboringTiles[zt]&&(ee.neighboringTiles[zt].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 Ne=this._tiles[le];if(ee[le]||!Ne.hasData()||Ne.tileID.overscaledZ<=B||Ne.tileID.overscaledZ>Q)continue;let $e=Ne.tileID;for(;Ne&&Ne.tileID.overscaledZ>B+1;){let zt=Ne.tileID.scaledTo(Ne.tileID.overscaledZ-1);Ne=this._tiles[zt.key],Ne&&Ne.hasData()&&($e=zt)}let pt=$e;for(;pt.overscaledZ>B;)if(pt=pt.scaledTo(pt.overscaledZ-1),w[pt.key]){ee[$e.key]=$e;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,Ne){let $e={},pt={},zt=Object.keys(w),Yt=l.now();for(let Jt of zt){let yr=w[Jt],Ir=this._tiles[Jt];if(!Ir||Ir.fadeEndTime!==0&&Ir.fadeEndTime<=Yt)continue;let ce=this.findLoadedParent(yr,B),Ae=this.findLoadedSibling(yr),qe=ce||Ae||null;qe&&(this._addTile(qe.tileID),$e[qe.tileID.key]=qe.tileID),pt[Jt]=yr}this._retainLoadedChildren(pt,ee,Q,w);for(let Jt in $e)w[Jt]||(this._coveredTiles[Jt]=!0,w[Jt]=$e[Jt]);if(Ne){let Jt={},yr={};for(let Ir of le)this._tiles[Ir.key].hasData()?Jt[Ir.key]=Ir:yr[Ir.key]=Ir;for(let Ir in yr){let ce=yr[Ir].children(this._source.maxzoom);this._tiles[ce[0].key]&&this._tiles[ce[1].key]&&this._tiles[ce[2].key]&&this._tiles[ce[3].key]&&(Jt[ce[0].key]=w[ce[0].key]=ce[0],Jt[ce[1].key]=w[ce[1].key]=ce[1],Jt[ce[2].key]=w[ce[2].key]=ce[2],Jt[ce[3].key]=w[ce[3].key]=ce[3],delete yr[Ir])}for(let Ir in yr){let ce=yr[Ir],Ae=this.findLoadedParent(ce,this._source.minzoom),qe=this.findLoadedSibling(ce),Ve=Ae||qe||null;if(Ve){Jt[Ve.tileID.key]=w[Ve.tileID.key]=Ve.tileID;for(let ot in Jt)Jt[ot].isChildOf(Ve.tileID)&&delete Jt[ot]}}for(let Ir in this._tiles)Jt[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-tt.maxOverzooming,this._source.minzoom),Ne=Math.max(ee+tt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Yt={};for(let Jt of Q)if(Jt.canonical.z>this._source.minzoom){let yr=Jt.scaledTo(Jt.canonical.z-1);Yt[yr.key]=yr;let Ir=Jt.scaledTo(Math.max(this._source.minzoom,Math.min(Jt.canonical.z,5)));Yt[Ir.key]=Ir}Q=Q.concat(Object.values(Yt))}let $e=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,$e&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let pt=this._updateRetainedTiles(Q,ee);Mt(this._source.type)&&this._updateCoveredAndRetainedTiles(pt,le,Ne,ee,Q,B);for(let Yt in pt)this._tiles[Yt].clearFadeHold();let zt=a.ab(this._tiles,pt);for(let Yt of zt){let Jt=this._tiles[Yt];Jt.hasSymbolBuckets&&!Jt.holdingForFade()?Jt.setHoldDuration(this.map._fadeDuration):Jt.hasSymbolBuckets&&!Jt.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={},Ne=Math.max(B-tt.maxOverzooming,this._source.minzoom),$e=Math.max(B+tt.maxUnderzooming,this._source.minzoom),pt={};for(let zt of w){let Yt=this._addTile(zt);ee[zt.key]=zt,Yt.hasData()||Bthis._source.maxzoom){let yr=zt.children(this._source.maxzoom)[0],Ir=this.getTile(yr);if(Ir&&Ir.hasData()){ee[yr.key]=yr;continue}}else{let yr=zt.children(this._source.maxzoom);if(ee[yr[0].key]&&ee[yr[1].key]&&ee[yr[2].key]&&ee[yr[3].key])continue}let Jt=Yt.wasRequested();for(let yr=zt.overscaledZ-1;yr>=Ne;--yr){let Ir=zt.scaledTo(yr);if(le[Ir.key])break;if(le[Ir.key]=!0,Yt=this.getTile(Ir),!Yt&&Jt&&(Yt=this._addTile(Ir)),Yt){let ce=Yt.hasData();if((ce||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Jt)&&(ee[Ir.key]=Ir),Jt=Yt.wasRequested(),ce)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 ct(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 Ne=Q?le.getCameraQueryGeometry(w):w,$e=w.map(ce=>le.pointCoordinate(ce,this.terrain)),pt=Ne.map(ce=>le.pointCoordinate(ce,this.terrain)),zt=this.getIds(),Yt=1/0,Jt=1/0,yr=-1/0,Ir=-1/0;for(let ce of pt)Yt=Math.min(Yt,ce.x),Jt=Math.min(Jt,ce.y),yr=Math.max(yr,ce.x),Ir=Math.max(Ir,ce.y);for(let ce=0;ce=0&&Ke[1].y+ot>=0){let ft=$e.map(Xt=>qe.getTilePoint(Xt)),qt=pt.map(Xt=>qe.getTilePoint(Xt));ee.push({tile:Ae,tileID:qe,queryGeometry:ft,cameraQueryGeometry:qt,scale:Ve})}}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(Mt(this._source.type)){let w=l.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 Je(oe,w){let B=Math.abs(2*oe.wrap)-+(oe.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return oe.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-oe.canonical.y||w.canonical.x-oe.canonical.x}function Mt(oe){return oe==="raster"||oe==="image"||oe==="video"}tt.maxOverzooming=10,tt.maxUnderzooming=3;class Vt{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-Ne)/$e:0;return this.points[le].mult(1-pt).add(this.points[B].mult(pt))}}function Kt(oe,w){let B=!0;return oe==="always"||oe!=="never"&&w!=="never"||(B=!1),B}class ir{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 Ne=0;Nethis.width||ee<0||B>this.height)return[];let pt=[];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 zt=0;zt0}hitTestCircle(w,B,Q,ee,le){let Ne=w-Q,$e=w+Q,pt=B-Q,zt=B+Q;if($e<0||Ne>this.width||zt<0||pt>this.height)return!1;let Yt=[];return this._forEachCell(Ne,pt,$e,zt,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,Ne,$e,pt){let{seenUids:zt,hitTest:Yt,overlapMode:Jt}=$e,yr=this.boxCells[le];if(yr!==null){let ce=this.bboxes;for(let Ae of yr)if(!zt.box[Ae]){zt.box[Ae]=!0;let qe=4*Ae,Ve=this.boxKeys[Ae];if(w<=ce[qe+2]&&B<=ce[qe+3]&&Q>=ce[qe+0]&&ee>=ce[qe+1]&&(!pt||pt(Ve))&&(!Yt||!Kt(Jt,Ve.overlapMode))&&(Ne.push({key:Ve,x1:ce[qe],y1:ce[qe+1],x2:ce[qe+2],y2:ce[qe+3]}),Yt))return!0}}let Ir=this.circleCells[le];if(Ir!==null){let ce=this.circles;for(let Ae of Ir)if(!zt.circle[Ae]){zt.circle[Ae]=!0;let qe=3*Ae,Ve=this.circleKeys[Ae];if(this._circleAndRectCollide(ce[qe],ce[qe+1],ce[qe+2],w,B,Q,ee)&&(!pt||pt(Ve))&&(!Yt||!Kt(Jt,Ve.overlapMode))){let ot=ce[qe],Ke=ce[qe+1],ft=ce[qe+2];if(Ne.push({key:Ve,x1:ot-ft,y1:Ke-ft,x2:ot+ft,y2:Ke+ft}),Yt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,Ne,$e,pt){let{circle:zt,seenUids:Yt,overlapMode:Jt}=$e,yr=this.boxCells[le];if(yr!==null){let ce=this.bboxes;for(let Ae of yr)if(!Yt.box[Ae]){Yt.box[Ae]=!0;let qe=4*Ae,Ve=this.boxKeys[Ae];if(this._circleAndRectCollide(zt.x,zt.y,zt.radius,ce[qe+0],ce[qe+1],ce[qe+2],ce[qe+3])&&(!pt||pt(Ve))&&!Kt(Jt,Ve.overlapMode))return Ne.push(!0),!0}}let Ir=this.circleCells[le];if(Ir!==null){let ce=this.circles;for(let Ae of Ir)if(!Yt.circle[Ae]){Yt.circle[Ae]=!0;let qe=3*Ae,Ve=this.circleKeys[Ae];if(this._circlesCollide(ce[qe],ce[qe+1],ce[qe+2],zt.x,zt.y,zt.radius)&&(!pt||pt(Ve))&&!Kt(Jt,Ve.overlapMode))return Ne.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,Ne,$e,pt){let zt=this._convertToXCellCoord(w),Yt=this._convertToYCellCoord(B),Jt=this._convertToXCellCoord(Q),yr=this._convertToYCellCoord(ee);for(let Ir=zt;Ir<=Jt;Ir++)for(let ce=Yt;ce<=yr;ce++)if(le.call(this,w,B,Q,ee,this.xCellCount*ce+Ir,Ne,$e,pt))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,Ne){let $e=ee-w,pt=le-B,zt=Q+Ne;return zt*zt>$e*$e+pt*pt}_circleAndRectCollide(w,B,Q,ee,le,Ne,$e){let pt=(Ne-ee)/2,zt=Math.abs(w-(ee+pt));if(zt>pt+Q)return!1;let Yt=($e-le)/2,Jt=Math.abs(B-(le+Yt));if(Jt>Yt+Q)return!1;if(zt<=pt||Jt<=Yt)return!0;let yr=zt-pt,Ir=Jt-Yt;return yr*yr+Ir*Ir<=Q*Q}}function fr(oe,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,oe),le}function Ot(oe,w,B,Q,ee){if(w){let le=a.ae(oe);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function De(oe,w,B,Q){let ee;Q?(ee=[oe,w,Q(oe,w),1],a.af(ee,ee,B)):(ee=[oe,w,0,1],vr(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function _e(oe,w){return .5+oe/w*.5}function Fe(oe,w){return oe.x>=-w[0]&&oe.x<=w[0]&&oe.y>=-w[1]&&oe.y<=w[1]}function Pe(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce){let Ae=Q?oe.textSizeData:oe.iconSizeData,qe=a.ag(Ae,B.transform.zoom),Ve=[256/B.width*2+1,256/B.height*2+1],ot=Q?oe.text.dynamicLayoutVertexArray:oe.icon.dynamicLayoutVertexArray;ot.clear();let Ke=oe.lineVertexArray,ft=Q?oe.text.placedSymbolArray:oe.icon.placedSymbolArray,qt=B.transform.width/B.transform.height,Xt=!1;for(let $t=0;$tMath.abs(B.x-w.x)*Q?{useVertical:!0}:(oe===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function ye(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt){let Jt=B/24,yr=w.lineOffsetX*Jt,Ir=w.lineOffsetY*Jt,ce;if(w.numGlyphs>1){let Ae=w.glyphStartIndex+w.numGlyphs,qe=w.lineStartIndex,Ve=w.lineStartIndex+w.lineLength,ot=Ie(Jt,$e,yr,Ir,Q,w,Yt,oe);if(!ot)return{notEnoughRoom:!0};let Ke=De(ot.first.point.x,ot.first.point.y,Ne,oe.getElevation).point,ft=De(ot.last.point.x,ot.last.point.y,Ne,oe.getElevation).point;if(ee&&!Q){let qt=lt(w.writingMode,Ke,ft,zt);if(qt)return qt}ce=[ot.first];for(let qt=w.glyphStartIndex+1;qt0?Ke.point:function(Xt,$t,dr,Mr,$r,ii){return ue(Xt,$t,dr,1,$r,ii)}(oe.tileAnchorPoint,ot,qe,0,le,oe),qt=lt(w.writingMode,qe,ft,zt);if(qt)return qt}let Ae=Zt(Jt*$e.getoffsetX(w.glyphStartIndex),yr,Ir,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,oe,Yt);if(!Ae||oe.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ce=[Ae]}for(let Ae of ce)a.aj(pt,Ae.point,Ae.angle);return{}}function ue(oe,w,B,Q,ee,le){let Ne=oe.add(oe.sub(w)._unit()),$e=ee!==void 0?De(Ne.x,Ne.y,ee,le.getElevation).point:ht(Ne.x,Ne.y,le).point,pt=B.sub($e);return B.add(pt._mult(Q/pt.mag()))}function de(oe,w,B){let Q=w.projectionCache;if(Q.projections[oe])return Q.projections[oe];let ee=new a.P(w.lineVertexArray.getx(oe),w.lineVertexArray.gety(oe)),le=ht(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[oe]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let Ne=oe-B.direction;return function($e,pt,zt,Yt,Jt){return ue($e,pt,zt,Yt,void 0,Jt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(Ne),w.lineVertexArray.gety(Ne)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function ht(oe,w,B){let Q=oe+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=De(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function Et(oe,w,B){return oe._unit()._perp()._mult(w*B)}function St(oe,w,B,Q,ee,le,Ne,$e,pt){if($e.projectionCache.offsets[oe])return $e.projectionCache.offsets[oe];let zt=B.add(w);if(oe+pt.direction=ee)return $e.projectionCache.offsets[oe]=zt,zt;let Yt=de(oe+pt.direction,$e,pt),Jt=Et(Yt.sub(B),Ne,pt.direction),yr=B.add(Jt),Ir=Yt.add(Jt);return $e.projectionCache.offsets[oe]=a.ak(le,zt,yr,Ir)||zt,$e.projectionCache.offsets[oe]}function Zt(oe,w,B,Q,ee,le,Ne,$e,pt){let zt=Q?oe-w:oe+w,Yt=zt>0?1:-1,Jt=0;Q&&(Yt*=-1,Jt=Math.PI),Yt<0&&(Jt+=Math.PI);let yr,Ir=Yt>0?le+ee:le+ee+1;$e.projectionCache.cachedAnchorPoint?yr=$e.projectionCache.cachedAnchorPoint:(yr=ht($e.tileAnchorPoint.x,$e.tileAnchorPoint.y,$e).point,$e.projectionCache.cachedAnchorPoint=yr);let ce,Ae,qe=yr,Ve=yr,ot=0,Ke=0,ft=Math.abs(zt),qt=[],Xt;for(;ot+Ke<=ft;){if(Ir+=Yt,Ir=Ne)return null;ot+=Ke,Ve=qe,Ae=ce;let Mr={absOffsetX:ft,direction:Yt,distanceFromAnchor:ot,previousVertex:Ve};if(qe=de(Ir,$e,Mr),B===0)qt.push(Ve),Xt=qe.sub(Ve);else{let $r,ii=qe.sub(Ve);$r=ii.mag()===0?Et(de(Ir+Yt,$e,Mr).sub(qe),B,Yt):Et(ii,B,Yt),Ae||(Ae=Ve.add($r)),ce=St(Ir,$r,qe,le,Ne,Ae,B,$e,Mr),qt.push(Ae),Xt=ce.sub(Ae)}Ke=Xt.mag()}let $t=Xt._mult((ft-ot)/Ke)._add(Ae||Ve),dr=Jt+Math.atan2(qe.y-Ve.y,qe.x-Ve.x);return qt.push($t),{point:$t,angle:pt?dr:0,path:qt}}let qr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Lr(oe,w){for(let B=0;B=1;ys--)ua.push(wn.path[ys]);for(let ys=1;ysil.signedDistanceFromCamera<=0)?[]:ys.map(il=>il.point)}let el=[];if(ua.length>0){let ys=ua[0].clone(),il=ua[0].clone();for(let $l=1;$l=ii.x&&il.x<=pi.x&&ys.y>=ii.y&&il.y<=pi.y?[ua]:il.xpi.x||il.ypi.y?[]:a.al([ua],ii.x,ii.y,pi.x,pi.y)}for(let ys of el){Yi.reset(ys,.25*$r);let il=0;il=Yi.length<=.5*$r?1:Math.ceil(Yi.paddedLength/oo)+1;for(let $l=0;$lDe(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,Ne=-1/0;for(let Yt of w){let Jt=new a.P(Yt.x+Er,Yt.y+Er);Q=Math.min(Q,Jt.x),ee=Math.min(ee,Jt.y),le=Math.max(le,Jt.x),Ne=Math.max(Ne,Jt.y),B.push(Jt)}let $e=this.grid.query(Q,ee,le,Ne).concat(this.ignoredGrid.query(Q,ee,le,Ne)),pt={},zt={};for(let Yt of $e){let Jt=Yt.key;if(pt[Jt.bucketInstanceId]===void 0&&(pt[Jt.bucketInstanceId]={}),pt[Jt.bucketInstanceId][Jt.featureIndex])continue;let yr=[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,yr)&&(pt[Jt.bucketInstanceId][Jt.featureIndex]=!0,zt[Jt.bucketInstanceId]===void 0&&(zt[Jt.bucketInstanceId]=[]),zt[Jt.bucketInstanceId].push(Jt.featureIndex))}return zt}insertCollisionBox(w,B,Q,ee,le,Ne){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:Ne,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,Ne){let $e=Q?this.ignoredGrid:this.grid,pt={bucketInstanceId:ee,featureIndex:le,collisionGroupID:Ne,overlapMode:B};for(let zt=0;zt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,$r.x,$r.y,ee,zt));dr=Mr.some($r=>!$r.isOccluded),$t=Mr.map($r=>$r.point)}else dr=!0;return{box:a.ao($t),allPointsOccluded:!dr}}}function Ei(oe,w,B){return w*(a.X/(oe.tileSize*Math.pow(2,B-oe.tileID.overscaledZ)))}class Si{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 xi{constructor(w,B,Q,ee,le){this.text=new Si(w?w.text:null,B,Q,le),this.icon=new Si(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Hi{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Jr{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ci{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class Di{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 Lt(oe,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:Ne}=a.au(oe);return new a.P(-(le-.5)*w+Q[0]*ee,-(Ne-.5)*B+Q[1]*ee)}class vt{constructor(w,B,Q,ee,le,Ne){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new si(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Di(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Ne,Ne&&(Ne.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),Ne=Q.latestFeatureIndex;if(!le||!Ne||B.id!==le.layerIds[0])return;let $e=Q.collisionBoxArray,pt=le.layers[0].layout,zt=le.layers[0].paint,Yt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Jt=Q.tileSize/a.X,yr=Q.tileID.toUnwrapped(),Ir=this.transform.calculatePosMatrix(yr),ce=pt.get("text-pitch-alignment")==="map",Ae=pt.get("text-rotation-alignment")==="map",qe=Ei(Q,1,this.transform.zoom),Ve=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,zt.get("text-translate"),zt.get("text-translate-anchor")),ot=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,zt.get("icon-translate"),zt.get("icon-translate-anchor")),Ke=fr(Ir,ce,Ae,this.transform,qe),ft=null;if(ce){let Xt=Ot(Ir,ce,Ae,this.transform,qe);ft=a.L([],this.transform.labelPlaneMatrix,Xt)}this.retainedQueryData[le.bucketInstanceId]=new ci(le.bucketInstanceId,Ne,le.sourceLayerIndex,le.index,Q.tileID);let qt={bucket:le,layout:pt,translationText:Ve,translationIcon:ot,posMatrix:Ir,unwrappedTileID:yr,textLabelPlaneMatrix:Ke,labelToScreenMatrix:ft,scale:Yt,textPixelRatio:Jt,holdingForFade:Q.holdingForFade(),collisionBoxArray:$e,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Xt of le.sortKeyRanges){let{sortKey:$t,symbolInstanceStart:dr,symbolInstanceEnd:Mr}=Xt;w.push({sortKey:$t,symbolInstanceStart:dr,symbolInstanceEnd:Mr,parameters:qt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot,Ke){let ft=a.aq[w.textAnchor],qt=[w.textOffset0,w.textOffset1],Xt=Lt(ft,Q,ee,qt,le),$t=this.collisionIndex.placeCollisionBox(B,yr,pt,zt,Yt,$e,Ne,qe,Jt.predicate,Ke,Xt);if((!ot||this.collisionIndex.placeCollisionBox(ot,yr,pt,zt,Yt,$e,Ne,Ve,Jt.predicate,Ke,Xt).placeable)&&$t.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:qt,width:Q,height:ee,anchor:ft,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ce,ft,Ir,Ae),ce.allowVerticalPlacement&&(this.markUsedOrientation(ce,Ae,Ir),this.placedOrientations[Ir.crossTileID]=Ae),{shift:Xt,placedGlyphBoxes:$t}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:Ne,translationIcon:$e,posMatrix:pt,unwrappedTileID:zt,textLabelPlaneMatrix:Yt,labelToScreenMatrix:Jt,textPixelRatio:yr,holdingForFade:Ir,collisionBoxArray:ce,partiallyEvaluatedTextSize:Ae,collisionGroup:qe}=w.parameters,Ve=le.get("text-optional"),ot=le.get("icon-optional"),Ke=a.ar(le,"text-overlap","text-allow-overlap"),ft=Ke==="always",qt=a.ar(le,"icon-overlap","icon-allow-overlap"),Xt=qt==="always",$t=le.get("text-rotation-alignment")==="map",dr=le.get("text-pitch-alignment")==="map",Mr=le.get("icon-text-fit")!=="none",$r=le.get("symbol-z-order")==="viewport-y",ii=ft&&(Xt||!ee.hasIconData()||ot),pi=Xt&&(ft||!ee.hasTextData()||Ve);!ee.collisionArrays&&ce&&ee.deserializeCollisionBoxes(ce);let Yi=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),wn=(Tn,ua,oo)=>{var el,ys;if(B[Tn.crossTileID])return;if(Ir)return void(this.placements[Tn.crossTileID]=new Hi(!1,!1,!1));let il=!1,$l=!1,pl=!0,Hl=null,Ll={box:null,placeable:!1,offscreen:null},Ql={box:null,placeable:!1,offscreen:null},ku=null,Jl=null,Kl=null,Hu=0,tf=0,Ku=0;ua.textFeatureIndex?Hu=ua.textFeatureIndex:Tn.useRuntimeCollisionCircles&&(Hu=Tn.featureIndex),ua.verticalTextFeatureIndex&&(tf=ua.verticalTextFeatureIndex);let Gu=ua.textBox;if(Gu){let nf=Le=>{let We=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Le&&this.prevPlacement){let Ye=this.prevPlacement.placedOrientations[Tn.crossTileID];Ye&&(this.placedOrientations[Tn.crossTileID]=Ye,We=Ye,this.markUsedOrientation(ee,We,Tn))}return We},af=(Le,We)=>{if(ee.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&ua.verticalTextBox){for(let Ye of ee.writingModes)if(Ye===a.ah.vertical?(Ll=We(),Ql=Ll):Ll=Le(),Ll&&Ll.placeable)break}else Ll=Le()},X=Tn.textAnchorOffsetStartIndex,se=Tn.textAnchorOffsetEndIndex;if(se===X){let Le=(We,Ye)=>{let it=this.collisionIndex.placeCollisionBox(We,Ke,yr,pt,zt,dr,$t,Ne,qe.predicate,Yi);return it&&it.placeable&&(this.markUsedOrientation(ee,Ye,Tn),this.placedOrientations[Tn.crossTileID]=Ye),it};af(()=>Le(Gu,a.ah.horizontal),()=>{let We=ua.verticalTextBox;return ee.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&We?Le(We,a.ah.vertical):{box:null,offscreen:null}}),nf(Ll&&Ll.placeable)}else{let Le=a.aq[(ys=(el=this.prevPlacement)===null||el===void 0?void 0:el.variableOffsets[Tn.crossTileID])===null||ys===void 0?void 0:ys.anchor],We=(it,Nt,mt)=>{let er=it.x2-it.x1,_r=it.y2-it.y1,wr=Tn.textBoxScale,ni=Mr&&qt==="never"?Nt:null,Wr=null,Ci=Ke==="never"?1:2,Ji="never";Le&&Ci++;for(let ai=0;aiWe(Gu,ua.iconBox,a.ah.horizontal),()=>{let it=ua.verticalTextBox;return ee.allowVerticalPlacement&&(!Ll||!Ll.placeable)&&Tn.numVerticalGlyphVertices>0&&it?We(it,ua.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Ll&&(il=Ll.placeable,pl=Ll.offscreen);let Ye=nf(Ll&&Ll.placeable);if(!il&&this.prevPlacement){let it=this.prevPlacement.variableOffsets[Tn.crossTileID];it&&(this.variableOffsets[Tn.crossTileID]=it,this.markUsedJustification(ee,it.anchor,Tn,Ye))}}}if(ku=Ll,il=ku&&ku.placeable,pl=ku&&ku.offscreen,Tn.useRuntimeCollisionCircles){let nf=ee.text.placedSymbolArray.get(Tn.centerJustifiedTextSymbolIndex),af=a.ai(ee.textSizeData,Ae,nf),X=le.get("text-padding");Jl=this.collisionIndex.placeCollisionCircles(Ke,nf,ee.lineVertexArray,ee.glyphOffsetArray,af,pt,zt,Yt,Jt,Q,dr,qe.predicate,Tn.collisionCircleDiameter,X,Ne,Yi),Jl.circles.length&&Jl.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),il=ft||Jl.circles.length>0&&!Jl.collisionDetected,pl=pl&&Jl.offscreen}if(ua.iconFeatureIndex&&(Ku=ua.iconFeatureIndex),ua.iconBox){let nf=af=>this.collisionIndex.placeCollisionBox(af,qt,yr,pt,zt,dr,$t,$e,qe.predicate,Yi,Mr&&Hl?Hl:void 0);Ql&&Ql.placeable&&ua.verticalIconBox?(Kl=nf(ua.verticalIconBox),$l=Kl.placeable):(Kl=nf(ua.iconBox),$l=Kl.placeable),pl=pl&&Kl.offscreen}let Wu=Ve||Tn.numHorizontalGlyphVertices===0&&Tn.numVerticalGlyphVertices===0,sf=ot||Tn.numIconVertices===0;Wu||sf?sf?Wu||($l=$l&&il):il=$l&&il:$l=il=$l&&il;let gf=$l&&Kl.placeable;if(il&&ku.placeable&&this.collisionIndex.insertCollisionBox(ku.box,Ke,le.get("text-ignore-placement"),ee.bucketInstanceId,Ql&&Ql.placeable&&tf?tf:Hu,qe.ID),gf&&this.collisionIndex.insertCollisionBox(Kl.box,qt,le.get("icon-ignore-placement"),ee.bucketInstanceId,Ku,qe.ID),Jl&&il&&this.collisionIndex.insertCollisionCircles(Jl.circles,Ke,le.get("text-ignore-placement"),ee.bucketInstanceId,Hu,qe.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,oo,ua,ku,Kl,Jl),Tn.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[Tn.crossTileID]=new Hi(il||ii,$l||pi,pl||ee.justReloaded),B[Tn.crossTileID]=!0};if($r){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Tn=ee.getSortedSymbolIndexes(this.transform.angle);for(let ua=Tn.length-1;ua>=0;--ua){let oo=Tn[ua];wn(ee.symbolInstances.get(oo),ee.collisionArrays[oo],oo)}}else for(let Tn=w.symbolInstanceStart;Tn=0&&(w.text.placedSymbolArray.get($e).crossTileID=le>=0&&$e!==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,Ne=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let $e of Ne)w.text.placedSymbolArray.get($e).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:{},Ne=B?B.variableOffsets:{},$e=B?B.placedOrientations:{};for(let pt in this.placements){let zt=this.placements[pt],Yt=le[pt];Yt?(this.opacities[pt]=new xi(Yt,ee,zt.text,zt.icon),Q=Q||zt.text!==Yt.text.placed||zt.icon!==Yt.icon.placed):(this.opacities[pt]=new xi(null,ee,zt.text,zt.icon,zt.skipFade),Q=Q||zt.text||zt.icon)}for(let pt in le){let zt=le[pt];if(!this.opacities[pt]){let Yt=new xi(zt,ee,!1,!1);Yt.isHidden()||(this.opacities[pt]=Yt,Q=Q||zt.text.placed||zt.icon.placed)}}for(let pt in Ne)this.variableOffsets[pt]||!this.opacities[pt]||this.opacities[pt].isHidden()||(this.variableOffsets[pt]=Ne[pt]);for(let pt in $e)this.placedOrientations[pt]||!this.opacities[pt]||this.opacities[pt].isHidden()||(this.placedOrientations[pt]=$e[pt]);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],Ne=le.layout,$e=new xi(null,0,!1,!1,!0),pt=Ne.get("text-allow-overlap"),zt=Ne.get("icon-allow-overlap"),Yt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Jt=Ne.get("text-rotation-alignment")==="map",yr=Ne.get("text-pitch-alignment")==="map",Ir=Ne.get("icon-text-fit")!=="none",ce=new xi(null,0,pt&&(zt||!w.hasIconData()||Ne.get("icon-optional")),zt&&(pt||!w.hasTextData()||Ne.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let Ae=(Ve,ot,Ke)=>{for(let ft=0;ft0,dr=this.placedOrientations[ot.crossTileID],Mr=dr===a.ah.vertical,$r=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(Ke>0||ft>0){let pi=oi(Xt.text);Ae(w.text,Ke,Mr?vi:pi),Ae(w.text,ft,$r?vi:pi);let Yi=Xt.text.isHidden();[ot.rightJustifiedTextSymbolIndex,ot.centerJustifiedTextSymbolIndex,ot.leftJustifiedTextSymbolIndex].forEach(ua=>{ua>=0&&(w.text.placedSymbolArray.get(ua).hidden=Yi||Mr?1:0)}),ot.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(ot.verticalPlacedTextSymbolIndex).hidden=Yi||$r?1:0);let wn=this.variableOffsets[ot.crossTileID];wn&&this.markUsedJustification(w,wn.anchor,ot,dr);let Tn=this.placedOrientations[ot.crossTileID];Tn&&(this.markUsedJustification(w,"left",ot,Tn),this.markUsedOrientation(w,Tn,ot))}if($t){let pi=oi(Xt.icon),Yi=!(Ir&&ot.verticalPlacedIconSymbolIndex&&Mr);ot.placedIconSymbolIndex>=0&&(Ae(w.icon,ot.numIconVertices,Yi?pi:vi),w.icon.placedSymbolArray.get(ot.placedIconSymbolIndex).hidden=Xt.icon.isHidden()),ot.verticalPlacedIconSymbolIndex>=0&&(Ae(w.icon,ot.numVerticalIconVertices,Yi?vi:pi),w.icon.placedSymbolArray.get(ot.verticalPlacedIconSymbolIndex).hidden=Xt.icon.isHidden())}let ii=qe&&qe.has(Ve)?qe.get(Ve):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let pi=w.collisionArrays[Ve];if(pi){let Yi=new a.P(0,0);if(pi.textBox||pi.verticalTextBox){let wn=!0;if(Yt){let Tn=this.variableOffsets[qt];Tn?(Yi=Lt(Tn.anchor,Tn.width,Tn.height,Tn.textOffset,Tn.textBoxScale),Jt&&Yi._rotate(yr?this.transform.angle:-this.transform.angle)):wn=!1}if(pi.textBox||pi.verticalTextBox){let Tn;pi.textBox&&(Tn=Mr),pi.verticalTextBox&&(Tn=$r),Dt(w.textCollisionBox.collisionVertexArray,Xt.text.placed,!wn||Tn,ii.text,Yi.x,Yi.y)}}if(pi.iconBox||pi.verticalIconBox){let wn=!!(!$r&&pi.verticalIconBox),Tn;pi.iconBox&&(Tn=wn),pi.verticalIconBox&&(Tn=!wn),Dt(w.iconCollisionBox.collisionVertexArray,Xt.icon.placed,Tn,ii.icon,Ir?Yi.x:0,Ir?Yi.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 Ve=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Ve.invProjMatrix,w.placementViewportMatrix=Ve.viewportMatrix,w.collisionCircleArray=Ve.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 Dt(oe,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let Ne=Q[0]-Er,$e=Q[1]-Er,pt=Q[2]-Er,zt=Q[3]-Er;oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Ne,$e),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,pt,$e),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,pt,zt),oe.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Ne,zt)}let Bt=Math.pow(2,25),sr=Math.pow(2,24),br=Math.pow(2,17),zr=Math.pow(2,16),Tr=Math.pow(2,9),Rr=Math.pow(2,8),Br=Math.pow(2,1);function oi(oe){if(oe.opacity===0&&!oe.placed)return 0;if(oe.opacity===1&&oe.placed)return 4294967295;let w=oe.placed?1:0,B=Math.floor(127*oe.opacity);return B*Bt+w*sr+B*br+w*zr+B*Tr+w*Rr+B*Br+w}let vi=0;function Pi(){return{isOccluded:(oe,w,B)=>!1,getPitchedTextCorrection:(oe,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(oe,w,B,Q){throw new Error("Not implemented.")},translatePosition:(oe,w,B,Q)=>function(ee,le,Ne,$e,pt=!1){if(!Ne[0]&&!Ne[1])return[0,0];let zt=pt?$e==="map"?ee.angle:0:$e==="viewport"?-ee.angle:0;if(zt){let Yt=Math.sin(zt),Jt=Math.cos(zt);Ne=[Ne[0]*Jt-Ne[1]*Yt,Ne[0]*Yt+Ne[1]*Jt]}return[pt?Ne[0]:Ei(le,Ne[0],ee.zoom),pt?Ne[1]:Ei(le,Ne[1],ee.zoom)]}(oe,w,B,Q),getCircleRadiusCorrection:oe=>1}}class Yr{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 Ne=this._bucketParts;for(;this._currentTileIndex$e.sortKey-pt.sortKey));this._currentPartIndex!this._forceFullPlacement&&l.now()-ee>2;for(;this._currentPlacementIndex>=0;){let Ne=B[w[this._currentPlacementIndex]],$e=this.placement.collisionIndex.transform.zoom;if(Ne.type==="symbol"&&(!Ne.minzoom||Ne.minzoom<=$e)&&(!Ne.maxzoom||Ne.maxzoom>$e)){if(this._inProgressLayer||(this._inProgressLayer=new Yr(Ne)),this._inProgressLayer.continuePlacement(Q[Ne.source],this.placement,this._showCollisionBoxes,Ne,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let Ur=512/a.X/2;class ti{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le({x:Math.floor(pt.anchorX*Ur),y:Math.floor(pt.anchorY*Ur)})),crossTileIDs:Ne.map(pt=>pt.crossTileID)};if($e.positions.length>128){let pt=new a.av($e.positions.length,16,Uint16Array);for(let{x:zt,y:Yt}of $e.positions)pt.add(zt,Yt);pt.finish(),delete $e.positions,$e.index=pt}this._symbolsByKey[le]=$e}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:Ne,y:$e,z:pt}=B.canonical,zt=Ur/Math.pow(2,pt-le),Yt=($e*a.X+w.anchorY)*zt,Jt=ee*a.X*Ur;return{x:Math.floor((Ne*a.X+w.anchorX)*zt-Q*a.X*Ur),y:Math.floor(Yt-Jt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class ki{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ji{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 Ne in ee){let $e=ee[Ne];$e.tileID=$e.tileID.unwrapTo($e.tileID.wrap+B),le[$e.tileID.key]=$e}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 $e in Ne){let pt=Ne[$e];pt.tileID.isChildOf(w)&&pt.findMatches(B.symbolInstances,w,ee)}else{let $e=Ne[w.scaledTo(Number(le)).key];$e&&$e.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 zi=(oe,w)=>a.t(oe,w&&w.filter(B=>B.identifier!=="source.canvas")),Mi=a.aw();class sn extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(ke(),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 H(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new ne(256,512),this.crossTileSymbolIndex=new Vi,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()),ut().on(At,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 Ne in this._layers){let $e=this._layers[Ne];$e.source===le.id&&this._validateLayer($e)}})}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(Ne=>{this._loadStyleRequest=null,this._load(Ne.data,B,Q)}).catch(Ne=>{this._loadStyleRequest=null,Ne&&!le.signal.aborted&&this.fire(new a.j(Ne))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,l.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(Mi,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!zi(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let Ne in le.sources)this.addSource(Ne,le.sources[Ne],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,Ne,$e,pt){return a._(this,void 0,void 0,function*(){let zt=C(le),Yt=$e>1?"@2x":"",Jt={},yr={};for(let{id:Ir,url:ce}of zt){let Ae=Ne.transformRequest(M(ce,Yt,".json"),"SpriteJSON");Jt[Ir]=a.h(Ae,pt);let qe=Ne.transformRequest(M(ce,Yt,".png"),"SpriteImage");yr[Ir]=y.getImage(qe,pt)}return yield Promise.all([...Object.values(Jt),...Object.values(yr)]),function(Ir,ce){return a._(this,void 0,void 0,function*(){let Ae={};for(let qe in Ir){Ae[qe]={};let Ve=l.getImageCanvasContext((yield ce[qe]).data),ot=(yield Ir[qe]).data;for(let Ke in ot){let{width:ft,height:qt,x:Xt,y:$t,sdf:dr,pixelRatio:Mr,stretchX:$r,stretchY:ii,content:pi,textFitWidth:Yi,textFitHeight:wn}=ot[Ke];Ae[qe][Ke]={data:null,pixelRatio:Mr,sdf:dr,stretchX:$r,stretchY:ii,content:pi,textFitWidth:Yi,textFitHeight:wn,spriteData:{width:ft,height:qt,x:Xt,y:$t,context:Ve}}}}return Ae})}(Jt,yr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let Ne in le){this._spritesImagesIds[Ne]=[];let $e=this._spritesImagesIds[Ne]?this._spritesImagesIds[Ne].filter(pt=>!(pt in le)):[];for(let pt of $e)this.imageManager.removeImage(pt),this._changedImages[pt]=!0;for(let pt in le[Ne]){let zt=Ne==="default"?pt:`${Ne}:${pt}`;this._spritesImagesIds[Ne].push(zt),zt in this.imageManager.images?this.imageManager.updateImage(zt,le[Ne][pt],!1):this.imageManager.addImage(zt,le[Ne][pt]),B&&(this._changedImages[zt]=!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 Ne=B?a.aB(Q[le]):Q[le];ee.push(Ne)}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 Ne in this._updatedSources){let $e=this._updatedSources[Ne];if($e==="reload")this._reloadSource(Ne);else{if($e!=="clear")throw new Error(`Invalid action ${$e}`);this._clearSource(Ne)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Ne in this._updatedPaintProps)this._layers[Ne].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)&&zi(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),Ne=this._getOperationsToPerform(le);if(Ne.unimplemented.length>0)throw new Error(`Unimplemented: ${Ne.unimplemented.join(", ")}.`);if(Ne.operations.length===0)return!1;for(let $e of Ne.operations)$e();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 tt(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(zi(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 Ne=B?this._order.indexOf(B):this._order.length;if(B&&Ne===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(Ne,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let $e=this._removedLayers[ee];delete this._removedLayers[ee],$e.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 Ne=le.getSource().type;Ne==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Ne!=="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,Ne=le==="vector"?w.sourceLayer:void 0;le!=="vector"||Ne?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(Ne,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=Ne=>this._layers[Ne].type==="fill-extrusion",Q={},ee=[];for(let Ne=this._order.length-1;Ne>=0;Ne--){let $e=this._order[Ne];if(B($e)){Q[$e]=Ne;for(let pt of w){let zt=pt[$e];if(zt)for(let Yt of zt)ee.push(Yt)}}}ee.sort((Ne,$e)=>$e.intersectionZ-Ne.intersectionZ);let le=[];for(let Ne=this._order.length-1;Ne>=0;Ne--){let $e=this._order[Ne];if(B($e))for(let pt=ee.length-1;pt>=0;pt--){let zt=ee[pt].feature;if(Q[zt.layer.id]{let dr=Ve.featureSortOrder;if(dr){let Mr=dr.indexOf(Xt.featureIndex);return dr.indexOf($t.featureIndex)-Mr}return $t.featureIndex-Xt.featureIndex});for(let Xt of qt)ft.push(Xt)}}for(let Ve in ce)ce[Ve].forEach(ot=>{let Ke=ot.feature,ft=zt[$e[Ve].source].getFeatureState(Ke.layer["source-layer"],Ke.id);Ke.source=Ke.layer.source,Ke.layer["source-layer"]&&(Ke.sourceLayer=Ke.layer["source-layer"]),Ke.state=ft});return ce}(this._layers,Ne,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 Ne=ee.getRenderableIds().map(zt=>ee.getTileByID(zt)),$e=[],pt={};for(let zt=0;ztyr.getTileByID(Ir)).sort((Ir,ce)=>ce.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan(ce.tileID)?-1:1))}let Jt=this.crossTileSymbolIndex.addLayer(Yt,pt[Yt.source],w.center.lng);Ne=Ne||Jt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(l.now(),w.zoom))&&(this.pauseablePlacement=new Ni(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,pt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(l.now()),$e=!0),Ne&&this.pauseablePlacement.placement.setStale()),$e||Ne)for(let zt of this._order){let Yt=this._layers[zt];Yt.type==="symbol"&&this.placement.updateLayerOpacities(Yt,pt[Yt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(l.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}],Ne=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",Ne,null,Q)||(this.stylesheet.sprite=Ne,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 fi=a.Y([{name:"a_pos",type:"Int16",components:2}]);let Or={prelude:st(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3797,7 +3797,7 @@ uniform ${Yt} ${Jt} u_${yr}; #endif `}),staticAttributes:Q,staticUniforms:Ne}}class Wt{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,Ne,$e,pt,zt){this.context=w;let Yt=this.boundPaintVertexBuffers.length!==ee.length;for(let Jt=0;!Yt&&Jt({u_matrix:oe,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 or(oe){let w=[];for(let B=0;B({u_depth:new a.aH(Xt,$t.u_depth),u_terrain:new a.aH(Xt,$t.u_terrain),u_terrain_dim:new a.aI(Xt,$t.u_terrain_dim),u_terrain_matrix:new a.aJ(Xt,$t.u_terrain_matrix),u_terrain_unpack:new a.aK(Xt,$t.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Xt,$t.u_terrain_exaggeration)}))(w,qt),this.binderUniforms=Q?Q.getUniforms(w,qt):[]}draw(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot){let Ke=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(Ne),pt){w.activeTexture.set(Ke.TEXTURE2),Ke.bindTexture(Ke.TEXTURE_2D,pt.depthTexture),w.activeTexture.set(Ke.TEXTURE3),Ke.bindTexture(Ke.TEXTURE_2D,pt.texture);for(let qt in this.terrainUniforms)this.terrainUniforms[qt].set(pt[qt])}for(let qt in this.fixedUniforms)this.fixedUniforms[qt].set($e[qt]);Ae&&Ae.setUniforms(w,this.binderUniforms,Ir,{zoom:ce});let ft=0;switch(B){case Ke.LINES:ft=2;break;case Ke.TRIANGLES:ft=3;break;case Ke.LINE_STRIP:ft=1}for(let qt of yr.get()){let Xt=qt.vaos||(qt.vaos={});(Xt[zt]||(Xt[zt]=new Wt)).bind(w,this,Yt,Ae?Ae.getPaintVertexBuffers():[],Jt,qt.vertexOffset,qe,Ve,ot),Ke.drawElements(B,qt.primitiveLength*ft,Ke.UNSIGNED_SHORT,qt.primitiveOffset*ft*2)}}}function hi(oe,w,B){let Q=1/Ei(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Ne=le*(B.tileID.canonical.x+B.tileID.wrap*ee),$e=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,oe.fromScale,oe.toScale],u_fade:oe.t,u_pixel_coord_upper:[Ne>>16,$e>>16],u_pixel_coord_lower:[65535&Ne,65535&$e]}}let Gi=(oe,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),Ne=[le.x,le.y,le.z],$e=function(){var zt=new a.A(9);return a.A!=Float32Array&&(zt[1]=0,zt[2]=0,zt[3]=0,zt[5]=0,zt[6]=0,zt[7]=0),zt[0]=1,zt[4]=1,zt[8]=1,zt}();ee.properties.get("anchor")==="viewport"&&function(zt,Yt){var Jt=Math.sin(Yt),yr=Math.cos(Yt);zt[0]=yr,zt[1]=Jt,zt[2]=0,zt[3]=-Jt,zt[4]=yr,zt[5]=0,zt[6]=0,zt[7]=0,zt[8]=1}($e,-w.transform.angle),function(zt,Yt,Jt){var yr=Yt[0],Ir=Yt[1],ce=Yt[2];zt[0]=yr*Jt[0]+Ir*Jt[3]+ce*Jt[6],zt[1]=yr*Jt[1]+Ir*Jt[4]+ce*Jt[7],zt[2]=yr*Jt[2]+Ir*Jt[5]+ce*Jt[8]}(Ne,Ne,$e);let pt=ee.properties.get("color");return{u_matrix:oe,u_lightpos:Ne,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[pt.r,pt.g,pt.b],u_vertical_gradient:+B,u_opacity:Q}},Qr=(oe,w,B,Q,ee,le,Ne)=>a.e(Gi(oe,w,B,Q),hi(le,w,Ne),{u_height_factor:-Math.pow(2,ee.overscaledZ)/Ne.tileSize/8}),Ui=oe=>({u_matrix:oe}),zn=(oe,w,B,Q)=>a.e(Ui(oe),hi(B,w,Q)),fn=(oe,w)=>({u_matrix:oe,u_world:w}),xn=(oe,w,B,Q,ee)=>a.e(zn(oe,w,B,Q),{u_world:ee}),_a=(oe,w,B,Q)=>{let ee=oe.transform,le,Ne;if(Q.paint.get("circle-pitch-alignment")==="map"){let $e=Ei(B,1,ee.zoom);le=!0,Ne=[$e,$e]}else le=!1,Ne=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:oe.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:oe.pixelRatio,u_extrude_scale:Ne}},Wn=(oe,w,B)=>({u_matrix:oe,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),Fn=(oe,w,B=1)=>({u_matrix:oe,u_color:w,u_overlay:0,u_overlay_scale:B}),ia=oe=>({u_matrix:oe}),za=(oe,w,B,Q)=>({u_matrix:oe,u_extrude_scale:Ei(w,1,B),u_intensity:Q}),Hr=(oe,w,B,Q)=>{let ee=a.H();a.aP(ee,0,oe.width,oe.height,0,0,1);let le=oe.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 na(oe,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 go=(oe,w,B,Q)=>{let ee=oe.transform;return{u_matrix:Ba(oe,w,B,Q),u_ratio:1/Ei(w,1,ee.zoom),u_device_pixel_ratio:oe.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},Dn=(oe,w,B,Q,ee)=>a.e(go(oe,w,B,ee),{u_image:0,u_image_height:Q}),un=(oe,w,B,Q,ee)=>{let le=oe.transform,Ne=Wo(w,le);return{u_matrix:Ba(oe,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Ei(w,1,le.zoom),u_device_pixel_ratio:oe.pixelRatio,u_image:0,u_scale:[Ne,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},Zn=(oe,w,B,Q,ee,le)=>{let Ne=oe.lineAtlas,$e=Wo(w,oe.transform),pt=B.layout.get("line-cap")==="round",zt=Ne.getDash(Q.from,pt),Yt=Ne.getDash(Q.to,pt),Jt=zt.width*ee.fromScale,yr=Yt.width*ee.toScale;return a.e(go(oe,w,B,le),{u_patternscale_a:[$e/Jt,-zt.height/2],u_patternscale_b:[$e/yr,-Yt.height/2],u_sdfgamma:Ne.width/(256*Math.min(Jt,yr)*oe.pixelRatio)/2,u_image:0,u_tex_y_a:zt.y,u_tex_y_b:Yt.y,u_mix:ee.t})};function Wo(oe,w){return 1/Ei(oe,1,w.tileZoom)}function Ba(oe,w,B,Q){return oe.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let Bo=(oe,w,B,Q,ee)=>{return{u_matrix:oe,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:(Ne=ee.paint.get("raster-saturation"),Ne>0?1-1/(1.001-Ne):-Ne),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ea(ee.paint.get("raster-hue-rotate"))};var le,Ne};function Ea(oe){oe*=Math.PI/180;let w=Math.sin(oe),B=Math.cos(oe);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let Ha=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir)=>{let ce=Ne.transform;return{u_is_size_zoom_constant:+(oe==="constant"||oe==="source"),u_is_size_feature_constant:+(oe==="constant"||oe==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ce.cameraToCenterDistance,u_pitch:ce.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ce.width/ce.height,u_fade_change:Ne.options.fadeDuration?Ne.symbolFadeChange:1,u_matrix:$e,u_label_plane_matrix:pt,u_coord_matrix:zt,u_is_text:+Jt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:yr,u_texture:0,u_translation:Yt,u_pitched_scale:Ir}},tn=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce)=>{let Ae=Ne.transform;return a.e(Ha(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,ce),{u_gamma_scale:Q?Math.cos(Ae._pitch)*Ae.cameraToCenterDistance:1,u_device_pixel_ratio:Ne.pixelRatio,u_is_halo:+Ir})},Cn=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir)=>a.e(tn(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,!0,Jt,!0,Ir),{u_texsize_icon:yr,u_texture_icon:1}),Xn=(oe,w,B)=>({u_matrix:oe,u_opacity:w,u_color:B}),ts=(oe,w,B,Q,ee,le)=>a.e(function(Ne,$e,pt,zt){let Yt=pt.imageManager.getPattern(Ne.from.toString()),Jt=pt.imageManager.getPattern(Ne.to.toString()),{width:yr,height:Ir}=pt.imageManager.getPixelSize(),ce=Math.pow(2,zt.tileID.overscaledZ),Ae=zt.tileSize*Math.pow(2,pt.transform.tileZoom)/ce,qe=Ae*(zt.tileID.canonical.x+zt.tileID.wrap*ce),Ve=Ae*zt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Yt.tl,u_pattern_br_a:Yt.br,u_pattern_tl_b:Jt.tl,u_pattern_br_b:Jt.br,u_texsize:[yr,Ir],u_mix:$e.t,u_pattern_size_a:Yt.displaySize,u_pattern_size_b:Jt.displaySize,u_scale_a:$e.fromScale,u_scale_b:$e.toScale,u_tile_units_to_pixels:1/Ei(zt,1,pt.transform.tileZoom),u_pixel_coord_upper:[qe>>16,Ve>>16],u_pixel_coord_lower:[65535&qe,65535&Ve]}}(Q,le,B,ee),{u_matrix:oe,u_opacity:w}),Ja={fillExtrusion:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_lightpos:new a.aN(oe,w.u_lightpos),u_lightintensity:new a.aI(oe,w.u_lightintensity),u_lightcolor:new a.aN(oe,w.u_lightcolor),u_vertical_gradient:new a.aI(oe,w.u_vertical_gradient),u_opacity:new a.aI(oe,w.u_opacity)}),fillExtrusionPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_lightpos:new a.aN(oe,w.u_lightpos),u_lightintensity:new a.aI(oe,w.u_lightintensity),u_lightcolor:new a.aN(oe,w.u_lightcolor),u_vertical_gradient:new a.aI(oe,w.u_vertical_gradient),u_height_factor:new a.aI(oe,w.u_height_factor),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade),u_opacity:new a.aI(oe,w.u_opacity)}),fill:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix)}),fillPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),fillOutline:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world)}),fillOutlinePattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),circle:(oe,w)=>({u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(oe,w.u_scale_with_map),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_extrude_scale:new a.aO(oe,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_matrix:new a.aJ(oe,w.u_matrix)}),collisionBox:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_pixel_extrude_scale:new a.aO(oe,w.u_pixel_extrude_scale)}),collisionCircle:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_inv_matrix:new a.aJ(oe,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_viewport_size:new a.aO(oe,w.u_viewport_size)}),debug:(oe,w)=>({u_color:new a.aL(oe,w.u_color),u_matrix:new a.aJ(oe,w.u_matrix),u_overlay:new a.aH(oe,w.u_overlay),u_overlay_scale:new a.aI(oe,w.u_overlay_scale)}),clippingMask:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix)}),heatmap:(oe,w)=>({u_extrude_scale:new a.aI(oe,w.u_extrude_scale),u_intensity:new a.aI(oe,w.u_intensity),u_matrix:new a.aJ(oe,w.u_matrix)}),heatmapTexture:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world),u_image:new a.aH(oe,w.u_image),u_color_ramp:new a.aH(oe,w.u_color_ramp),u_opacity:new a.aI(oe,w.u_opacity)}),hillshade:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_latrange:new a.aO(oe,w.u_latrange),u_light:new a.aO(oe,w.u_light),u_shadow:new a.aL(oe,w.u_shadow),u_highlight:new a.aL(oe,w.u_highlight),u_accent:new a.aL(oe,w.u_accent)}),hillshadePrepare:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_dimension:new a.aO(oe,w.u_dimension),u_zoom:new a.aI(oe,w.u_zoom),u_unpack:new a.aK(oe,w.u_unpack)}),line:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels)}),lineGradient:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_image:new a.aH(oe,w.u_image),u_image_height:new a.aI(oe,w.u_image_height)}),linePattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texsize:new a.aO(oe,w.u_texsize),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_image:new a.aH(oe,w.u_image),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),lineSDF:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_patternscale_a:new a.aO(oe,w.u_patternscale_a),u_patternscale_b:new a.aO(oe,w.u_patternscale_b),u_sdfgamma:new a.aI(oe,w.u_sdfgamma),u_image:new a.aH(oe,w.u_image),u_tex_y_a:new a.aI(oe,w.u_tex_y_a),u_tex_y_b:new a.aI(oe,w.u_tex_y_b),u_mix:new a.aI(oe,w.u_mix)}),raster:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_tl_parent:new a.aO(oe,w.u_tl_parent),u_scale_parent:new a.aI(oe,w.u_scale_parent),u_buffer_scale:new a.aI(oe,w.u_buffer_scale),u_fade_t:new a.aI(oe,w.u_fade_t),u_opacity:new a.aI(oe,w.u_opacity),u_image0:new a.aH(oe,w.u_image0),u_image1:new a.aH(oe,w.u_image1),u_brightness_low:new a.aI(oe,w.u_brightness_low),u_brightness_high:new a.aI(oe,w.u_brightness_high),u_saturation_factor:new a.aI(oe,w.u_saturation_factor),u_contrast_factor:new a.aI(oe,w.u_contrast_factor),u_spin_weights:new a.aN(oe,w.u_spin_weights)}),symbolIcon:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texture:new a.aH(oe,w.u_texture),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),symbolSDF:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texture:new a.aH(oe,w.u_texture),u_gamma_scale:new a.aI(oe,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_is_halo:new a.aH(oe,w.u_is_halo),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),symbolTextAndIcon:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texsize_icon:new a.aO(oe,w.u_texsize_icon),u_texture:new a.aH(oe,w.u_texture),u_texture_icon:new a.aH(oe,w.u_texture_icon),u_gamma_scale:new a.aI(oe,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_is_halo:new a.aH(oe,w.u_is_halo),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),background:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_opacity:new a.aI(oe,w.u_opacity),u_color:new a.aL(oe,w.u_color)}),backgroundPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_opacity:new a.aI(oe,w.u_opacity),u_image:new a.aH(oe,w.u_image),u_pattern_tl_a:new a.aO(oe,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(oe,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(oe,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(oe,w.u_pattern_br_b),u_texsize:new a.aO(oe,w.u_texsize),u_mix:new a.aI(oe,w.u_mix),u_pattern_size_a:new a.aO(oe,w.u_pattern_size_a),u_pattern_size_b:new a.aO(oe,w.u_pattern_size_b),u_scale_a:new a.aI(oe,w.u_scale_a),u_scale_b:new a.aI(oe,w.u_scale_b),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(oe,w.u_tile_units_to_pixels)}),terrain:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texture:new a.aH(oe,w.u_texture),u_ele_delta:new a.aI(oe,w.u_ele_delta),u_fog_matrix:new a.aJ(oe,w.u_fog_matrix),u_fog_color:new a.aL(oe,w.u_fog_color),u_fog_ground_blend:new a.aI(oe,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(oe,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(oe,w.u_horizon_color),u_horizon_fog_blend:new a.aI(oe,w.u_horizon_fog_blend)}),terrainDepth:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ele_delta:new a.aI(oe,w.u_ele_delta)}),terrainCoords:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texture:new a.aH(oe,w.u_texture),u_terrain_coords_id:new a.aI(oe,w.u_terrain_coords_id),u_ele_delta:new a.aI(oe,w.u_ele_delta)}),sky:(oe,w)=>({u_sky_color:new a.aL(oe,w.u_sky_color),u_horizon_color:new a.aL(oe,w.u_horizon_color),u_horizon:new a.aI(oe,w.u_horizon),u_sky_horizon_blend:new a.aI(oe,w.u_sky_horizon_blend)})};class to{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 Ri={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class an{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 Xt=a.H();a.aQ(Xt,Ke.placementInvProjMatrix,oe.transform.glCoordMatrix),a.aQ(Xt,Xt,Ke.placementViewportMatrix),pt.push({circleArray:qt,circleOffset:Yt,transform:ot.posMatrix,invTransform:Xt,coord:ot}),zt+=qt.length/4,Yt=zt}ft&&$e.draw(le,Ne.LINES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,{u_matrix:ot.posMatrix,u_pixel_extrude_scale:[1/(Jt=oe.transform).width,1/Jt.height]},oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ot),B.id,ft.layoutVertexBuffer,ft.indexBuffer,ft.segments,null,oe.transform.zoom,null,null,ft.collisionVertexBuffer)}var Jt;if(!ee||!pt.length)return;let yr=oe.useProgram("collisionCircle"),Ir=new a.aR;Ir.resize(4*zt),Ir._trim();let ce=0;for(let Ve of pt)for(let ot=0;ot=0&&(Ve[Ke.associatedIconIndex]={shiftedAnchor:oo,angle:el})}else Lr(Ke.numGlyphs,Ae)}if(zt){qe.clear();let ot=oe.icon.placedSymbolArray;for(let Ke=0;Keoe.style.map.terrain.getElevation(ii,mt,er):null,Nt=B.layout.get("text-rotation-alignment")==="map";Pe(Yi,ii.posMatrix,oe,ee,tf,Gu,Ve,zt,Nt,Ae,ii.toUnwrapped(),ce.width,ce.height,Wu,it)}let nf=ii.posMatrix,af=ee&&dr||gf,X=ot||af?Za:tf,se=Ku,Le=ua&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,We;We=ua?Yi.iconsInText?Cn(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,pl,ku,$r):tn(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,ee,pl,!0,$r):Ha(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,ee,pl,$r);let Ye={program:ys,buffers:wn,uniformValues:We,atlasTexture:Hl,atlasTextureIcon:Jl,atlasInterpolation:Ll,atlasInterpolationIcon:Ql,isSDF:ua,hasHalo:Le};if(qt&&Yi.canOverlap){Xt=!0;let it=wn.segments.get();for(let Nt of it)Mr.push({segments:new a.a0([Nt]),sortKey:Nt.sortKey,state:Ye,terrainData:$l})}else Mr.push({segments:wn.segments,sortKey:0,state:Ye,terrainData:$l})}Xt&&Mr.sort((ii,pi)=>ii.sortKey-pi.sortKey);for(let ii of Mr){let pi=ii.state;if(yr.activeTexture.set(Ir.TEXTURE0),pi.atlasTexture.bind(pi.atlasInterpolation,Ir.CLAMP_TO_EDGE),pi.atlasTextureIcon&&(yr.activeTexture.set(Ir.TEXTURE1),pi.atlasTextureIcon&&pi.atlasTextureIcon.bind(pi.atlasInterpolationIcon,Ir.CLAMP_TO_EDGE)),pi.isSDF){let Yi=pi.uniformValues;pi.hasHalo&&(Yi.u_is_halo=1,Kn(pi.buffers,ii.segments,B,oe,pi.program,$t,Yt,Jt,Yi,ii.terrainData)),Yi.u_is_halo=0}Kn(pi.buffers,ii.segments,B,oe,pi.program,$t,Yt,Jt,pi.uniformValues,ii.terrainData)}}function Kn(oe,w,B,Q,ee,le,Ne,$e,pt,zt){let Yt=Q.context;ee.draw(Yt,Yt.gl.TRIANGLES,le,Ne,$e,$i.disabled,pt,zt,B.id,oe.layoutVertexBuffer,oe.indexBuffer,w,B.paint,Q.transform.zoom,oe.programConfigurations.get(B.id),oe.dynamicLayoutVertexBuffer,oe.opacityVertexBuffer)}function ns(oe,w,B,Q){let ee=oe.context,le=ee.gl,Ne=wa.disabled,$e=new Da([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),pt=w.getBucket(B);if(!pt)return;let zt=Q.key,Yt=B.heatmapFbos.get(zt);Yt||(Yt=vo(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(zt,Yt)),ee.bindFramebuffer.set(Yt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Jt=pt.programConfigurations.get(B.id),yr=oe.useProgram("heatmap",Jt),Ir=oe.style.map.terrain.getTerrainData(Q);yr.draw(ee,le.TRIANGLES,Ln.disabled,Ne,$e,$i.disabled,za(Q.posMatrix,w,oe.transform.zoom,B.paint.get("heatmap-intensity")),Ir,B.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,B.paint,oe.transform.zoom,Jt)}function Jo(oe,w,B){let Q=oe.context,ee=Q.gl;Q.setColorMode(oe.colorModeForRenderPass());let le=ma(Q,w),Ne=B.key,$e=w.heatmapFbos.get(Ne);$e&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,$e.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),oe.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,Hr(oe,w,0,1),null,w.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments,w.paint,oe.transform.zoom),$e.destroy(),w.heatmapFbos.delete(Ne))}function vo(oe,w,B){var Q,ee;let le=oe.gl,Ne=le.createTexture();le.bindTexture(le.TEXTURE_2D,Ne),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 $e=(Q=oe.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,pt=(ee=oe.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,pt,w,B,0,le.RGBA,$e,null);let zt=oe.createFramebuffer(w,B,!1,!1);return zt.colorAttachment.set(Ne),zt}function ma(oe,w){return w.colorRampTexture||(w.colorRampTexture=new v(oe,w.colorRamp,oe.gl.RGBA)),w.colorRampTexture}function ja(oe,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,Ne=le[B.to.toString()],$e=le[B.from.toString()];if(!Ne&&$e&&(Ne=$e),!$e&&Ne&&($e=Ne),!Ne||!$e){let pt=ee.getPaintProperty(w);Ne=le[pt],$e=le[pt]}Ne&&$e&&oe.setConstantPatternPositions(Ne,$e)}function To(oe,w,B,Q,ee,le,Ne){let $e=oe.context.gl,pt="fill-pattern",zt=B.paint.get(pt),Yt=zt&&zt.constantOr(1),Jt=B.getCrossfadeParameters(),yr,Ir,ce,Ae,qe;Ne?(Ir=Yt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",yr=$e.LINES):(Ir=Yt?"fillPattern":"fill",yr=$e.TRIANGLES);let Ve=zt.constantOr(null);for(let ot of Q){let Ke=w.getTile(ot);if(Yt&&!Ke.patternsLoaded())continue;let ft=Ke.getBucket(B);if(!ft)continue;let qt=ft.programConfigurations.get(B.id),Xt=oe.useProgram(Ir,qt),$t=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ot);Yt&&(oe.context.activeTexture.set($e.TEXTURE0),Ke.imageAtlasTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE),qt.updatePaintBuffers(Jt)),ja(qt,pt,Ve,Ke,B);let dr=$t?ot:null,Mr=oe.translatePosMatrix(dr?dr.posMatrix:ot.posMatrix,Ke,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(Ne){Ae=ft.indexBuffer2,qe=ft.segments2;let $r=[$e.drawingBufferWidth,$e.drawingBufferHeight];ce=Ir==="fillOutlinePattern"&&Yt?xn(Mr,oe,Jt,Ke,$r):fn(Mr,$r)}else Ae=ft.indexBuffer,qe=ft.segments,ce=Yt?zn(Mr,oe,Jt,Ke):Ui(Mr);Xt.draw(oe.context,yr,ee,oe.stencilModeForClipping(ot),le,$i.disabled,ce,$t,B.id,ft.layoutVertexBuffer,Ae,qe,B.paint,oe.transform.zoom,qt)}}function Ao(oe,w,B,Q,ee,le,Ne){let $e=oe.context,pt=$e.gl,zt="fill-extrusion-pattern",Yt=B.paint.get(zt),Jt=Yt.constantOr(1),yr=B.getCrossfadeParameters(),Ir=B.paint.get("fill-extrusion-opacity"),ce=Yt.constantOr(null);for(let Ae of Q){let qe=w.getTile(Ae),Ve=qe.getBucket(B);if(!Ve)continue;let ot=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(Ae),Ke=Ve.programConfigurations.get(B.id),ft=oe.useProgram(Jt?"fillExtrusionPattern":"fillExtrusion",Ke);Jt&&(oe.context.activeTexture.set(pt.TEXTURE0),qe.imageAtlasTexture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),Ke.updatePaintBuffers(yr)),ja(Ke,zt,ce,qe,B);let qt=oe.translatePosMatrix(Ae.posMatrix,qe,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Xt=B.paint.get("fill-extrusion-vertical-gradient"),$t=Jt?Qr(qt,oe,Xt,Ir,Ae,yr,qe):Gi(qt,oe,Xt,Ir);ft.draw($e,$e.gl.TRIANGLES,ee,le,Ne,$i.backCCW,$t,ot,B.id,Ve.layoutVertexBuffer,Ve.indexBuffer,Ve.segments,B.paint,oe.transform.zoom,Ke,oe.style.map.terrain&&Ve.centroidVertexBuffer)}}function la(oe,w,B,Q,ee,le,Ne){let $e=oe.context,pt=$e.gl,zt=B.fbo;if(!zt)return;let Yt=oe.useProgram("hillshade"),Jt=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(w);$e.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,zt.colorAttachment.get()),Yt.draw($e,pt.TRIANGLES,ee,le,Ne,$i.disabled,((yr,Ir,ce,Ae)=>{let qe=ce.paint.get("hillshade-shadow-color"),Ve=ce.paint.get("hillshade-highlight-color"),ot=ce.paint.get("hillshade-accent-color"),Ke=ce.paint.get("hillshade-illumination-direction")*(Math.PI/180);ce.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ke-=yr.transform.angle);let ft=!yr.options.moving;return{u_matrix:Ae?Ae.posMatrix:yr.transform.calculatePosMatrix(Ir.tileID.toUnwrapped(),ft),u_image:0,u_latrange:na(0,Ir.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),Ke],u_shadow:qe,u_highlight:Ve,u_accent:ot}})(oe,B,Q,Jt?w:null),Jt,Q.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments)}function Ki(oe,w,B,Q,ee,le){let Ne=oe.context,$e=Ne.gl,pt=w.dem;if(pt&&pt.data){let zt=pt.dim,Yt=pt.stride,Jt=pt.getPixels();if(Ne.activeTexture.set($e.TEXTURE1),Ne.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||oe.getTileTexture(Yt),w.demTexture){let Ir=w.demTexture;Ir.update(Jt,{premultiply:!1}),Ir.bind($e.NEAREST,$e.CLAMP_TO_EDGE)}else w.demTexture=new v(Ne,Jt,$e.RGBA,{premultiply:!1}),w.demTexture.bind($e.NEAREST,$e.CLAMP_TO_EDGE);Ne.activeTexture.set($e.TEXTURE0);let yr=w.fbo;if(!yr){let Ir=new v(Ne,{width:zt,height:zt,data:null},$e.RGBA);Ir.bind($e.LINEAR,$e.CLAMP_TO_EDGE),yr=w.fbo=Ne.createFramebuffer(zt,zt,!0,!1),yr.colorAttachment.set(Ir.texture)}Ne.bindFramebuffer.set(yr.framebuffer),Ne.viewport.set([0,0,zt,zt]),oe.useProgram("hillshadePrepare").draw(Ne,$e.TRIANGLES,Q,ee,le,$i.disabled,((Ir,ce)=>{let Ae=ce.stride,qe=a.H();return a.aP(qe,0,a.X,-a.X,0,0,1),a.J(qe,qe,[0,-a.X,0]),{u_matrix:qe,u_image:1,u_dimension:[Ae,Ae],u_zoom:Ir.overscaledZ,u_unpack:ce.getUnpackVector()}})(w.tileID,pt),null,B.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function ho(oe,w,B,Q,ee,le){let Ne=Q.paint.get("raster-fade-duration");if(!le&&Ne>0){let $e=l.now(),pt=($e-oe.timeAdded)/Ne,zt=w?($e-w.timeAdded)/Ne:-1,Yt=B.getSource(),Jt=ee.coveringZoomLevel({tileSize:Yt.tileSize,roundZoom:Yt.roundZoom}),yr=!w||Math.abs(w.tileID.overscaledZ-Jt)>Math.abs(oe.tileID.overscaledZ-Jt),Ir=yr&&oe.refreshedUponExpiration?1:a.ac(yr?pt:1-zt,0,1);return oe.refreshedUponExpiration&&pt>=1&&(oe.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Ir}:{opacity:Ir,mix:0}}return{opacity:1,mix:0}}let Ka=new a.aM(1,0,0,1),Ca=new a.aM(0,1,0,1),ta=new a.aM(0,0,1,1),En=new a.aM(1,0,1,1),Mo=new a.aM(0,1,1,1);function Ds(oe,w,B,Q){vs(oe,0,w+B/2,oe.transform.width,B,Q)}function Ro(oe,w,B,Q){vs(oe,w-B/2,0,B,oe.transform.height,Q)}function vs(oe,w,B,Q,ee,le){let Ne=oe.context,$e=Ne.gl;$e.enable($e.SCISSOR_TEST),$e.scissor(w*oe.pixelRatio,B*oe.pixelRatio,Q*oe.pixelRatio,ee*oe.pixelRatio),Ne.clear({color:le}),$e.disable($e.SCISSOR_TEST)}function Ks(oe,w,B){let Q=oe.context,ee=Q.gl,le=B.posMatrix,Ne=oe.useProgram("debug"),$e=Ln.disabled,pt=wa.disabled,zt=oe.colorModeForRenderPass(),Yt="$debug",Jt=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let yr=w.getTileByID(B.key).latestRawTileData,Ir=Math.floor((yr&&yr.byteLength||0)/1024),ce=w.getTile(B).tileSize,Ae=512/Math.min(ce,512)*(B.overscaledZ/oe.transform.zoom)*.5,qe=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(qe+=` => ${B.overscaledZ}`),function(Ve,ot){Ve.initDebugOverlayCanvas();let Ke=Ve.debugOverlayCanvas,ft=Ve.context.gl,qt=Ve.debugOverlayCanvas.getContext("2d");qt.clearRect(0,0,Ke.width,Ke.height),qt.shadowColor="white",qt.shadowBlur=2,qt.lineWidth=1.5,qt.strokeStyle="white",qt.textBaseline="top",qt.font="bold 36px Open Sans, sans-serif",qt.fillText(ot,5,5),qt.strokeText(ot,5,5),Ve.debugOverlayTexture.update(Ke),Ve.debugOverlayTexture.bind(ft.LINEAR,ft.CLAMP_TO_EDGE)}(oe,`${qe} ${Ir}kB`),Ne.draw(Q,ee.TRIANGLES,$e,pt,Da.alphaBlended,$i.disabled,Fn(le,a.aM.transparent,Ae),null,Yt,oe.debugBuffer,oe.quadTriangleIndexBuffer,oe.debugSegments),Ne.draw(Q,ee.LINE_STRIP,$e,pt,zt,$i.disabled,Fn(le,a.aM.red),Jt,Yt,oe.debugBuffer,oe.tileBorderIndexBuffer,oe.debugSegments)}function as(oe,w,B){let Q=oe.context,ee=Q.gl,le=oe.colorModeForRenderPass(),Ne=new Ln(ee.LEQUAL,Ln.ReadWrite,oe.depthRangeFor3D),$e=oe.useProgram("terrain"),pt=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,oe.width,oe.height]);for(let zt of B){let Yt=oe.renderToTexture.getTexture(zt),Jt=w.getTerrainData(zt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Yt.texture);let yr=oe.transform.calculatePosMatrix(zt.tileID.toUnwrapped()),Ir=w.getMeshFrameDelta(oe.transform.zoom),ce=oe.transform.calculateFogMatrix(zt.tileID.toUnwrapped()),Ae=tr(yr,Ir,ce,oe.style.sky,oe.transform.pitch);$e.draw(Q,ee.TRIANGLES,Ne,wa.disabled,le,$i.backCCW,Ae,Jt,"terrain",pt.vertexBuffer,pt.indexBuffer,pt.segments)}}class Jn{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 Cs{constructor(w,B){this.context=new Aa(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=tt.maxUnderzooming+tt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vi}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,fi.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,fi.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,Xe.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,fi.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let Ne=new a.aZ;Ne.emplaceBack(0),Ne.emplaceBack(1),Ne.emplaceBack(3),Ne.emplaceBack(2),Ne.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(Ne);let $e=new a.aY;$e.emplaceBack(0,1,2),$e.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer($e);let pt=this.context.gl;this.stencilClearMode=new wa({func:pt.ALWAYS,mask:0},0,255,pt.ZERO,pt.ZERO,pt.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,Ln.disabled,this.stencilClearMode,Da.disabled,$i.disabled,ia(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(Da.disabled),Q.setDepthMode(Ln.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Ne of B){let $e=this._tileClippingMaskIDs[Ne.key]=this.nextStencilID++,pt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ne);le.draw(Q,ee.TRIANGLES,Ln.disabled,new wa({func:ee.ALWAYS,mask:0},$e,255,ee.KEEP,ee.KEEP,ee.REPLACE),Da.disabled,$i.disabled,ia(Ne.posMatrix),pt,"$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 wa({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new wa({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((Ne,$e)=>$e.overscaledZ-Ne.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 Ne={};for(let $e=0;$e({u_sky_color:Ve.properties.get("sky-color"),u_horizon_color:Ve.properties.get("horizon-color"),u_horizon:(ot.height/2+ot.getHorizon())*Ke,u_sky_horizon_blend:Ve.properties.get("sky-horizon-blend")*ot.height/2*Ke}))(zt,pt.style.map.transform,pt.pixelRatio),Ir=new Ln(Jt.LEQUAL,Ln.ReadWrite,[0,1]),ce=wa.disabled,Ae=pt.colorModeForRenderPass(),qe=pt.useProgram("sky");if(!zt.mesh){let Ve=new a.aX;Ve.emplaceBack(-1,-1),Ve.emplaceBack(1,-1),Ve.emplaceBack(1,1),Ve.emplaceBack(-1,1);let ot=new a.aY;ot.emplaceBack(0,1,2),ot.emplaceBack(0,2,3),zt.mesh=new Jn(Yt.createVertexBuffer(Ve,fi.members),Yt.createIndexBuffer(ot),a.a0.simpleSegment(0,0,Ve.length,ot.length))}qe.draw(Yt,Jt.TRIANGLES,Ir,ce,Ae,$i.disabled,yr,void 0,"sky",zt.mesh.vertexBuffer,zt.mesh.indexBuffer,zt.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 pt=this.style._layers[Q[this.currentLayer]],zt=ee[pt.source],Yt=le[pt.source];this._renderTileClippingMasks(pt,Yt),this.renderLayer(this,zt,pt,Yt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerqe.source&&!qe.isHidden(Yt)?[zt.sourceCaches[qe.source]]:[]),Ir=yr.filter(qe=>qe.getSource().type==="vector"),ce=yr.filter(qe=>qe.getSource().type!=="vector"),Ae=qe=>{(!Jt||Jt.getSource().maxzoomAe(qe)),Jt||ce.forEach(qe=>Ae(qe)),Jt}(this.style,this.transform.zoom);pt&&function(zt,Yt,Jt){for(let yr=0;yr0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,Ne){let $e=le.context,pt=$e.gl,zt=Da.unblended,Yt=new Ln(pt.LEQUAL,Ln.ReadWrite,[0,1]),Jt=Ne.getTerrainMesh(),yr=Ne.sourceCache.getRenderableTiles(),Ir=le.useProgram("terrainDepth");$e.bindFramebuffer.set(Ne.getFramebuffer("depth").framebuffer),$e.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),$e.clear({color:a.aM.transparent,depth:1});for(let ce of yr){let Ae=Ne.getTerrainData(ce.tileID),qe={u_matrix:le.transform.calculatePosMatrix(ce.tileID.toUnwrapped()),u_ele_delta:Ne.getMeshFrameDelta(le.transform.zoom)};Ir.draw($e,pt.TRIANGLES,Yt,wa.disabled,zt,$i.backCCW,qe,Ae,"terrain",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments)}$e.bindFramebuffer.set(null),$e.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,Ne){let $e=le.context,pt=$e.gl,zt=Da.unblended,Yt=new Ln(pt.LEQUAL,Ln.ReadWrite,[0,1]),Jt=Ne.getTerrainMesh(),yr=Ne.getCoordsTexture(),Ir=Ne.sourceCache.getRenderableTiles(),ce=le.useProgram("terrainCoords");$e.bindFramebuffer.set(Ne.getFramebuffer("coords").framebuffer),$e.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),$e.clear({color:a.aM.transparent,depth:1}),Ne.coordsIndex=[];for(let Ae of Ir){let qe=Ne.getTerrainData(Ae.tileID);$e.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,yr.texture);let Ve={u_matrix:le.transform.calculatePosMatrix(Ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-Ne.coordsIndex.length)/255,u_texture:0,u_ele_delta:Ne.getMeshFrameDelta(le.transform.zoom)};ce.draw($e,pt.TRIANGLES,Yt,wa.disabled,zt,$i.backCCW,Ve,qe,"terrain",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments),Ne.coordsIndex.push(Ae.tileID.key)}$e.bindFramebuffer.set(null),$e.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,Ne,$e,pt,zt){if(le.renderPass!=="translucent")return;let Yt=wa.disabled,Jt=le.colorModeForRenderPass();($e._unevaluatedLayout.hasValue("text-variable-anchor")||$e._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft){let qt=Ir.transform,Xt=Pi(),$t=qe==="map",dr=Ve==="map";for(let Mr of yr){let $r=Ae.getTile(Mr),ii=$r.getBucket(ce);if(!ii||!ii.text||!ii.text.segments.get().length)continue;let pi=a.ag(ii.textSizeData,qt.zoom),Yi=Ei($r,1,Ir.transform.zoom),wn=fr(Mr.posMatrix,dr,$t,Ir.transform,Yi),Tn=ce.layout.get("icon-text-fit")!=="none"&&ii.hasIconData();if(pi){let ua=Math.pow(2,qt.zoom-$r.tileID.overscaledZ),oo=Ir.style.map.terrain?(ys,il)=>Ir.style.map.terrain.getElevation(Mr,ys,il):null,el=Xt.translatePosition(qt,$r,ot,Ke);hn(ii,$t,dr,ft,qt,wn,Mr.posMatrix,ua,pi,Tn,Xt,el,Mr.toUnwrapped(),oo)}}}(pt,le,$e,Ne,$e.layout.get("text-rotation-alignment"),$e.layout.get("text-pitch-alignment"),$e.paint.get("text-translate"),$e.paint.get("text-translate-anchor"),zt),$e.paint.get("icon-opacity").constantOr(1)!==0&&Ss(le,Ne,$e,pt,!1,$e.paint.get("icon-translate"),$e.paint.get("icon-translate-anchor"),$e.layout.get("icon-rotation-alignment"),$e.layout.get("icon-pitch-alignment"),$e.layout.get("icon-keep-upright"),Yt,Jt),$e.paint.get("text-opacity").constantOr(1)!==0&&Ss(le,Ne,$e,pt,!0,$e.paint.get("text-translate"),$e.paint.get("text-translate-anchor"),$e.layout.get("text-rotation-alignment"),$e.layout.get("text-pitch-alignment"),$e.layout.get("text-keep-upright"),Yt,Jt),Ne.map.showCollisionBoxes&&(Sa(le,Ne,$e,pt,!0),Sa(le,Ne,$e,pt,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,Ne,$e,pt){if(le.renderPass!=="translucent")return;let zt=$e.paint.get("circle-opacity"),Yt=$e.paint.get("circle-stroke-width"),Jt=$e.paint.get("circle-stroke-opacity"),yr=!$e.layout.get("circle-sort-key").isConstant();if(zt.constantOr(1)===0&&(Yt.constantOr(1)===0||Jt.constantOr(1)===0))return;let Ir=le.context,ce=Ir.gl,Ae=le.depthModeForSublayer(0,Ln.ReadOnly),qe=wa.disabled,Ve=le.colorModeForRenderPass(),ot=[];for(let Ke=0;KeKe.sortKey-ft.sortKey);for(let Ke of ot){let{programConfiguration:ft,program:qt,layoutVertexBuffer:Xt,indexBuffer:$t,uniformValues:dr,terrainData:Mr}=Ke.state;qt.draw(Ir,ce.TRIANGLES,Ae,qe,Ve,$i.disabled,dr,Mr,$e.id,Xt,$t,Ke.segments,$e.paint,le.transform.zoom,ft)}})(w,B,Q,ee);break;case"heatmap":(function(le,Ne,$e,pt){if($e.paint.get("heatmap-opacity")===0)return;let zt=le.context;if(le.style.map.terrain){for(let Yt of pt){let Jt=Ne.getTile(Yt);Ne.hasRenderableParent(Yt)||(le.renderPass==="offscreen"?ns(le,Jt,$e,Yt):le.renderPass==="translucent"&&Jo(le,$e,Yt))}zt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Yt,Jt,yr,Ir){let ce=Yt.context,Ae=ce.gl,qe=wa.disabled,Ve=new Da([Ae.ONE,Ae.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(ot,Ke,ft){let qt=ot.gl;ot.activeTexture.set(qt.TEXTURE1),ot.viewport.set([0,0,Ke.width/4,Ke.height/4]);let Xt=ft.heatmapFbos.get(a.aU);Xt?(qt.bindTexture(qt.TEXTURE_2D,Xt.colorAttachment.get()),ot.bindFramebuffer.set(Xt.framebuffer)):(Xt=vo(ot,Ke.width/4,Ke.height/4),ft.heatmapFbos.set(a.aU,Xt))})(ce,Yt,yr),ce.clear({color:a.aM.transparent});for(let ot=0;ot20&&Yt.texParameterf(Yt.TEXTURE_2D,zt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,zt.extTextureFilterAnisotropicMax);let ii=le.style.map.terrain&&le.style.map.terrain.getTerrainData(ot),pi=ii?ot:null,Yi=pi?pi.posMatrix:le.transform.calculatePosMatrix(ot.toUnwrapped(),Ve),wn=Bo(Yi,Mr||[0,0],dr||1,$t,$e);Jt instanceof Tt?yr.draw(zt,Yt.TRIANGLES,Ke,wa.disabled,Ir,$i.disabled,wn,ii,$e.id,Jt.boundsBuffer,le.quadTriangleIndexBuffer,Jt.boundsSegments):yr.draw(zt,Yt.TRIANGLES,Ke,ce[ot.overscaledZ],Ir,$i.disabled,wn,ii,$e.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,Ne,$e,pt){let zt=$e.paint.get("background-color"),Yt=$e.paint.get("background-opacity");if(Yt===0)return;let Jt=le.context,yr=Jt.gl,Ir=le.transform,ce=Ir.tileSize,Ae=$e.paint.get("background-pattern");if(le.isPatternMissing(Ae))return;let qe=!Ae&&zt.a===1&&Yt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==qe)return;let Ve=wa.disabled,ot=le.depthModeForSublayer(0,qe==="opaque"?Ln.ReadWrite:Ln.ReadOnly),Ke=le.colorModeForRenderPass(),ft=le.useProgram(Ae?"backgroundPattern":"background"),qt=pt||Ir.coveringTiles({tileSize:ce,terrain:le.style.map.terrain});Ae&&(Jt.activeTexture.set(yr.TEXTURE0),le.imageManager.bind(le.context));let Xt=$e.getCrossfadeParameters();for(let $t of qt){let dr=pt?$t.posMatrix:le.transform.calculatePosMatrix($t.toUnwrapped()),Mr=Ae?ts(dr,Yt,le,Ae,{tileID:$t,tileSize:ce},Xt):Xn(dr,Yt,zt),$r=le.style.map.terrain&&le.style.map.terrain.getTerrainData($t);ft.draw(Jt,yr.TRIANGLES,ot,Ve,Ke,$i.disabled,Mr,$r,$e.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,Ne,$e){let pt=le.context,zt=$e.implementation;if(le.renderPass==="offscreen"){let Yt=zt.prerender;Yt&&(le.setCustomLayerDefaults(),pt.setColorMode(le.colorModeForRenderPass()),Yt.call(zt,pt.gl,le.transform.customLayerMatrix()),pt.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),pt.setColorMode(le.colorModeForRenderPass()),pt.setStencilMode(wa.disabled);let Yt=zt.renderingMode==="3d"?new Ln(le.context.gl.LEQUAL,Ln.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Ln.ReadOnly);pt.setDepthMode(Yt),zt.render(pt.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),pt.setDirty(),le.setBaseState(),pt.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let Ne=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(Ne){let zt=Math.sin(Ne),Yt=Math.cos(Ne);Q=[Q[0]*Yt-Q[1]*zt,Q[0]*zt+Q[1]*Yt]}let $e=[le?Q[0]:Ei(B,Q[0],this.transform.zoom),le?Q[1]:Ei(B,Q[1],this.transform.zoom),0],pt=new Float32Array(16);return a.J(pt,w,$e),pt}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 Nr(this.context,Or[w],B,Ja[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 v(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 Xa{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($e=>{let pt=1/($e=a.af([],$e,w))[3]/B*ee;return a.b1($e,$e,[pt,pt,1/$e[3],pt])}),Ne=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map($e=>{let pt=function(yr,Ir){var ce=Ir[0],Ae=Ir[1],qe=Ir[2],Ve=ce*ce+Ae*Ae+qe*qe;return Ve>0&&(Ve=1/Math.sqrt(Ve)),yr[0]=Ir[0]*Ve,yr[1]=Ir[1]*Ve,yr[2]=Ir[2]*Ve,yr}([],function(yr,Ir,ce){var Ae=Ir[0],qe=Ir[1],Ve=Ir[2],ot=ce[0],Ke=ce[1],ft=ce[2];return yr[0]=qe*ft-Ve*Ke,yr[1]=Ve*ot-Ae*ft,yr[2]=Ae*Ke-qe*ot,yr}([],L([],le[$e[0]],le[$e[1]]),L([],le[$e[2]],le[$e[1]]))),zt=-((Yt=pt)[0]*(Jt=le[$e[1]])[0]+Yt[1]*Jt[1]+Yt[2]*Jt[2]);var Yt,Jt;return pt.concat(zt)});return new Xa(le,Ne)}}class Zo{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=k(this.min),ee=k(this.max);for(let le=0;le=0&&Ne++;if(Ne===0)return 0;Ne!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,Ne=-Number.MAX_VALUE;for(let $e=0;$ethis.max[ee]-this.min[ee])return 0}return 1}}class Eo{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 Eo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let lo=85.051129;class $a{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 Eo,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new $a(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 Ne=ee[0],$e=ee[1],pt=ee[2],zt=ee[3],Yt=Math.sin(le),Jt=Math.cos(le);Q[0]=Ne*Jt+pt*Yt,Q[1]=$e*Jt+zt*Yt,Q[2]=Ne*-Yt+pt*Jt,Q[3]=$e*-Yt+zt*Jt}(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)),Ne=this.pointCoordinate(new a.P(0,this.height)),$e=Math.floor(Math.min(Q.x,ee.x,le.x,Ne.x)),pt=Math.floor(Math.max(Q.x,ee.x,le.x,Ne.x)),zt=1;for(let Yt=$e-zt;Yt<=pt+zt;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 Ne=this.pointCoordinate(this.getCameraPoint()),$e=a.Z.fromLngLat(this.center),pt=Math.pow(2,ee),zt=[pt*Ne.x,pt*Ne.y,0],Yt=[pt*$e.x,pt*$e.y,0],Jt=Xa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),yr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(yr=ee);let Ir=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ce=Ke=>({aabb:new Zo([Ke*pt,0,0],[(Ke+1)*pt,pt,0]),zoom:0,x:0,y:0,wrap:Ke,fullyVisible:!1}),Ae=[],qe=[],Ve=ee,ot=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Ke=1;Ke<=3;Ke++)Ae.push(ce(-Ke)),Ae.push(ce(Ke));for(Ae.push(ce(0));Ae.length>0;){let Ke=Ae.pop(),ft=Ke.x,qt=Ke.y,Xt=Ke.fullyVisible;if(!Xt){let ii=Ke.aabb.intersects(Jt);if(ii===0)continue;Xt=ii===2}let $t=w.terrain?zt:Yt,dr=Ke.aabb.distanceX($t),Mr=Ke.aabb.distanceY($t),$r=Math.max(Math.abs(dr),Math.abs(Mr));if(Ke.zoom===Ve||$r>Ir+(1<=yr){let ii=Ve-Ke.zoom,pi=zt[0]-.5-(ft<>1),wn=Ke.zoom+1,Tn=Ke.aabb.quadrant(ii);if(w.terrain){let ua=new a.S(wn,Ke.wrap,wn,pi,Yi),oo=w.terrain.getMinMaxElevation(ua),el=(B=oo.minElevation)!==null&&B!==void 0?B:this.elevation,ys=(Q=oo.maxElevation)!==null&&Q!==void 0?Q:this.elevation;Tn=new Zo([Tn.min[0],Tn.min[1],el],[Tn.max[0],Tn.max[1],ys])}Ae.push({aabb:Tn,zoom:wn,x:pi,y:Yi,wrap:Ke.wrap,fullyVisible:Xt})}}return qe.sort((Ke,ft)=>Ke.distanceSq-ft.distanceSq).map(Ke=>Ke.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,lo);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 Ne=Q+B-le,$e=Math.cos(this._pitch)*this.cameraToCenterDistance/Ne/a.b5(1,ee.lat),pt=this.scaleZoom($e/this.tileSize);this._elevation=le,this._center=ee,this.zoom=pt}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),Ne=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(Ne),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 yr=B.pointCoordinate(w);if(yr!=null)return yr}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],Ne=ee[3],$e=Q[1]/le,pt=ee[1]/Ne,zt=Q[2]/le,Yt=ee[2]/Ne,Jt=zt===Yt?0:(0-zt)/(Yt-zt);return new a.Z(a.y.number(Q[0]/le,ee[0]/Ne,Jt)/this.worldSize,a.y.number($e,pt,Jt)/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 fe().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 fe([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,lo])}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 Ke=179.9999999999;ee=[-Ke,Ke]}let le=this.tileSize*this.zoomScale(Q.zoom),Ne=0,$e=le,pt=0,zt=le,Yt=0,Jt=0,{x:yr,y:Ir}=this.size;if(this.latRange){let Ke=this.latRange;Ne=a.Q(Ke[1])*le,$e=a.Q(Ke[0])*le,$e-Ne$e&&(Ve=$e-Ke)}if(ee){let Ke=(pt+zt)/2,ft=ce;this._renderWorldCopies&&(ft=a.b3(ce,Ke-le/2,Ke+le/2));let qt=yr/2;ft-qtzt&&(qe=zt-qt)}if(qe!==void 0||Ve!==void 0){let Ke=new a.P(qe!=null?qe:ce,Ve!=null?Ve:Ae);Q.center=this.unproject.call({worldSize:le},Ke).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),Ne=Math.min(this.elevation,this.minElevationForCurrentTile),$e=le-Ne*this._pixelPerMeter/Math.cos(this._pitch),pt=Ne<0?$e:le,zt=Math.PI/2+this._pitch,Yt=this._fov*(.5+w.y/this.height),Jt=Math.sin(Yt)*pt/Math.sin(a.ac(Math.PI-zt-Yt,.01,Math.PI-.01)),yr=this.getHorizon(),Ir=2*Math.atan(yr/this.cameraToCenterDistance)*(.5+w.y/(2*yr)),ce=Math.sin(Ir)*pt/Math.sin(a.ac(Math.PI-zt-Ir,.01,Math.PI-.01)),Ae=Math.min(Jt,ce);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Ae+pt),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 qe=this.width%2/2,Ve=this.height%2/2,ot=Math.cos(this.angle),Ke=Math.sin(this.angle),ft=B-Math.round(B)+ot*qe+Ke*Ve,qt=Q-Math.round(Q)+ot*Ve+Ke*qe,Xt=new Float64Array(ee);if(a.J(Xt,Xt,[ft>.5?ft-1:ft,qt>.5?qt-1:qt,0]),this.alignedModelViewProjectionMatrix=Xt,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,Ne=B.y;for(let $e of w)Q=Math.min(Q,$e.x),ee=Math.min(ee,$e.y),le=Math.max(le,$e.x),Ne=Math.max(Ne,$e.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,Ne),new a.P(Q,Ne),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 Xo(oe,w){let B,Q=!1,ee=null,le=null,Ne=()=>{ee=null,Q&&(oe.apply(le,B),ee=setTimeout(Ne,w),Q=!1)};return(...$e)=>(Q=!0,le=this,B=$e,ee||Ne(),ee)}class rs{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 Ne=window.location.href.replace(/(#.+)?$/,le);Ne=Ne.replace("&&","&"),window.history.replaceState(window.history.state,null,Ne)},this._updateHash=Xo(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),Ne=Math.round(B.lng*le)/le,$e=Math.round(B.lat*le)/le,pt=this._map.getBearing(),zt=this._map.getPitch(),Yt="";if(Yt+=w?`/${Ne}/${$e}/${Q}`:`${Q}/${$e}/${Ne}`,(pt||zt)&&(Yt+="/"+Math.round(10*pt)/10),zt&&(Yt+=`/${Math.round(zt)}`),this._hashName){let Jt=this._hashName,yr=!1,Ir=window.location.hash.slice(1).split("&").map(ce=>{let Ae=ce.split("=")[0];return Ae===Jt?(yr=!0,`${Ae}=${Yt}`):ce}).filter(ce=>ce);return yr||Ir.push(`${Jt}=${Yt}`),`#${Ir.join("&")}`}return`#${Yt}`}}let $n={linearity:.3,easing:a.b8(0,0,.3,1)},Sn=a.e({deceleration:2500,maxSpeed:1400},$n),uo=a.e({deceleration:20,maxSpeed:1400},$n),Rs=a.e({deceleration:1e3,maxSpeed:360},$n),xs=a.e({deceleration:1e3,maxSpeed:90},$n);class Go{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=l.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=So(B.pan.mag(),Q,a.e({},Sn,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,os(ee,le)}if(B.zoom){let le=So(B.zoom,Q,uo);ee.zoom=this._map.transform.zoom+le.amount,os(ee,le)}if(B.bearing){let le=So(B.bearing,Q,Rs);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),os(ee,le)}if(B.pitch){let le=So(B.pitch,Q,xs);ee.pitch=this._map.transform.pitch+le.amount,os(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 os(oe,w){(!oe.duration||oe.durationB.unproject(pt)),$e=le.reduce((pt,zt,Yt,Jt)=>pt.add(zt.div(Jt.length)),new a.P(0,0));super(w,{points:le,point:$e,lngLats:Ne,lngLat:B.unproject($e),originalEvent:Q}),this._defaultPrevented=!1}}class rl extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class $o{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new rl(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new Qn(w.type,this._map,w))}mouseup(w){this._map.fire(new Qn(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new Qn(w.type,this._map,w))}dblclick(w){return this._firePreventable(new Qn(w.type,this._map,w))}mouseover(w){this._map.fire(new Qn(w.type,this._map,w))}mouseout(w){this._map.fire(new Qn(w.type,this._map,w))}touchstart(w){return this._firePreventable(new zo(w.type,this._map,w))}touchmove(w){this._map.fire(new zo(w.type,this._map,w))}touchend(w){this._map.fire(new zo(w.type,this._map,w))}touchcancel(w){this._map.fire(new zo(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Na{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new Qn(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new Qn(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ua{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 Po{constructor(w,B){this._map=w,this._tr=new Ua(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&&(f.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&&(f.remove(this._box),this._box=null),f.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function fo(oe,w){if(oe.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${oe.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 Ne of ee)le._add(Ne);return le.div(ee.length)}(B),this.touches=fo(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=fo(Q,B);for(let le in this.touches){let Ne=ee[le];(!Ne||Ne.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 Ma{constructor(w){this.singleTap=new ro(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,Ne=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&Ne||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class io{constructor(w){this._tr=new Ua(w),this._zoomIn=new Ma({numTouches:1,numTaps:2}),this._zoomOut=new Ma({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),Ne=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$e=>$e.easeTo({duration:300,zoom:Ne.zoom+1,around:Ne.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$e=>$e.easeTo({duration:300,zoom:Ne.zoom-1,around:Ne.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 aa{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){oe.mousedown=oe.dragStart,oe.mousemoveWindow=oe.dragMove,oe.mouseup=oe.dragEnd,oe.contextmenu=w=>{w.preventDefault()}},ws=({enable:oe,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new No({checkCorrectEvent:ee=>f.mouseButton(ee)===0&&ee.ctrlKey||f.mouseButton(ee)===2});return new aa({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:oe,assignEvents:Fs})},no=({enable:oe,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new No({checkCorrectEvent:ee=>f.mouseButton(ee)===0&&ee.ctrlKey||f.mouseButton(ee)===2});return new aa({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:oe,assignEvents:Fs})};class Ls{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=fo(Q,B),le=new a.P(0,0),Ne=new a.P(0,0),$e=0;for(let zt in ee){let Yt=ee[zt],Jt=this._touches[zt];Jt&&(le._add(Yt),Ne._add(Yt.sub(Jt)),$e++,ee[zt]=Yt)}if(this._touches=ee,this._shouldBePrevented($e)||!Ne.mag())return;let pt=Ne.div($e);return this._sum._add(pt),this._sum.mag()Math.abs(oe.x)}class gs extends ds{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,ls(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 Ne=w.y>0==B.y>0;return ls(w)&&ls(B)&&Ne}}let bt={panStep:100,bearingStep:15,pitchStep:10};class Ft{constructor(w){this._tr=new Ua(w);let B=bt;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,Ne=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(),Ne=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),Ne=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:$e=>{let pt=this._tr;$e.easeTo({duration:300,easeId:"keyboardHandler",easing:hr,zoom:B?Math.round(pt.zoom)+B*(w.shiftKey?2:1):pt.zoom,bearing:pt.bearing+Q*this._bearingStep,pitch:pt.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-Ne*this._panStep],center:pt.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 hr(oe){return oe*(2-oe)}let nr=4.000244140625;class Sr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new Ua(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=l.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%nr==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=f.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 pt=this._type==="wheel"&&Math.abs(this._delta)>nr?this._wheelZoomRate:this._defaultZoomRate,zt=2/(1+Math.exp(-Math.abs(this._delta*pt)));this._delta<0&&zt!==0&&(zt=1/zt);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*zt))),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,Ne=!1,$e=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&$e){let pt=Math.min($e/200,1),zt=ee(pt);le=a.y.number(Q,B,zt),pt<1?this._frameId||(this._frameId=!0):Ne=!0}else le=B,Ne=!0;return this._active=!0,Ne&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ne,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(l.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),Ne=.27/Math.sqrt(le*le+1e-4)*.01,$e=Math.sqrt(.0729-Ne*Ne);B=a.b8(Ne,$e,.25,1)}return this._prevEase={start:l.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 li{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 di{constructor(w){this._tr=new Ua(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 mi{constructor(){this._tap=new Ma({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,Ne=this._tapPoint.dist(ee)<30;le&&Ne?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 Oi{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 dn{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 wi{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 ui{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=f.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&&(f.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 Ai=oe=>oe.zoom||oe.drag||oe.pitch||oe.rotate;class gi extends a.k{}function gn(oe){return oe.panDelta&&oe.panDelta.mag()||oe.zoomDelta||oe.bearingDelta||oe.pitchDelta}class In{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 Ne=ee.type==="renderFrame"?void 0:ee,$e={needsRenderFrame:!1},pt={},zt={},Yt=ee.touches,Jt=Yt?this._getMapTouches(Yt):void 0,yr=Jt?f.touchPos(this._map.getCanvas(),Jt):f.mousePos(this._map.getCanvas(),ee);for(let{handlerName:Ae,handler:qe,allowed:Ve}of this._handlers){if(!qe.isEnabled())continue;let ot;this._blockedByActive(zt,Ve,Ae)?qe.reset():qe[le||ee.type]&&(ot=qe[le||ee.type](ee,yr,Jt),this.mergeHandlerResult($e,pt,ot,Ae,Ne),ot&&ot.needsRenderFrame&&this._triggerRenderFrame()),(ot||qe.isActive())&&(zt[Ae]=qe)}let Ir={};for(let Ae in this._previousActiveHandlers)zt[Ae]||(Ir[Ae]=Ne);this._previousActiveHandlers=zt,(Object.keys(Ir).length||gn($e))&&(this._changes.push([$e,pt,Ir]),this._triggerRenderFrame()),(Object.keys(zt).length||gn($e))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ce}=$e;ce&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ce(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Go(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,Ne]of this._listeners)f.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,Ne)}destroy(){for(let[w,B,Q]of this._listeners)f.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new $o(B,w));let ee=B.boxZoom=new Po(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new ui(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let Ne=new io(B),$e=new di(B);B.doubleClickZoom=new li($e,Ne),this._add("tapZoom",Ne),this._add("clickZoom",$e),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let pt=new mi;this._add("tapDragZoom",pt);let zt=B.touchPitch=new gs(B);this._add("touchPitch",zt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Yt=ws(w),Jt=no(w);B.dragRotate=new dn(w,Yt,Jt),this._add("mouseRotate",Yt,["mousePitch"]),this._add("mousePitch",Jt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let yr=(({enable:ot,clickTolerance:Ke})=>{let ft=new No({checkCorrectEvent:qt=>f.mouseButton(qt)===0&&!qt.ctrlKey});return new aa({clickTolerance:Ke,move:(qt,Xt)=>({around:Xt,panDelta:Xt.sub(qt)}),activateOnStart:!0,moveStateManager:ft,enable:ot,assignEvents:Fs})})(w),Ir=new Ls(w,B);B.dragPan=new Oi(Q,yr,Ir),this._add("mousePan",yr),this._add("touchPan",Ir,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ce=new ss,Ae=new Yo;B.touchZoomRotate=new wi(Q,Ae,ce,pt),this._add("touchRotate",ce,["touchPan","touchZoom"]),this._add("touchZoom",Ae,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let qe=B.scrollZoom=new Sr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",qe,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Ve=B.keyboard=new Ft(B);this._add("keyboard",Ve),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Na(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!!Ai(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 Ne={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=Ne),Q.panDelta!==void 0&&(B.drag=Ne),Q.pitchDelta!==void 0&&(B.pitch=Ne),Q.bearingDelta!==void 0&&(B.rotate=Ne)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,Ne]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,Ne);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),Ne=ee.terrain;if(!(gn(w)||Ne&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:$e,zoomDelta:pt,bearingDelta:zt,pitchDelta:Yt,around:Jt,pinchAround:yr}=w;yr!==void 0&&(Jt=yr),ee._stop(!0),Jt=Jt||ee.transform.centerPoint;let Ir=le.pointLocation($e?Jt.sub($e):Jt);zt&&(le.bearing+=zt),Yt&&(le.pitch+=Yt),pt&&(le.zoom+=pt),Ne?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub($e)):le.setLocationAtPoint(Ir,Jt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Ir,Jt)):le.setLocationAtPoint(Ir,Jt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=Ai(this._eventsInProgress),le=Ai(w),Ne={};for(let Jt in w){let{originalEvent:yr}=w[Jt];this._eventsInProgress[Jt]||(Ne[`${Jt}start`]=yr),this._eventsInProgress[Jt]=w[Jt]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let Jt in Ne)this._fireEvent(Jt,Ne[Jt]);le&&this._fireEvent("move",le.originalEvent);for(let Jt in w){let{originalEvent:yr}=w[Jt];this._fireEvent(Jt,yr)}let $e={},pt;for(let Jt in this._eventsInProgress){let{handlerName:yr,originalEvent:Ir}=this._eventsInProgress[Jt];this._handlersById[yr].isActive()||(delete this._eventsInProgress[Jt],pt=B[yr]||Ir,$e[`${Jt}end`]=pt)}for(let Jt in $e)this._fireEvent(Jt,$e[Jt]);let zt=Ai(this._eventsInProgress),Yt=(ee||le)&&!zt;if(Yt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Jt=this._map._getTransformForUpdate();Jt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Jt)}if(Q&&Yt){this._updatingCamera=!0;let Jt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),yr=Ir=>Ir!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new gi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Vn extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((l.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,qe,$t)),this._rotating&&(ee.bearing=a.y.number(Ne,zt,$t)),this._pitching&&(ee.pitch=a.y.number($e,Yt,$t)),this._padding&&(ee.interpolatePadding(pt,Jt,$t),Ir=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation($t),ft)ee.setLocationAtPoint(ft,qt);else{let dr=ee.zoomScale(ee.zoom-le),Mr=qe>le?Math.min(2,Ke):Math.max(.5,Ke),$r=Math.pow(Mr,1-$t),ii=ee.unproject(Ve.add(ot.mult($t*$r)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?ii.wrap():ii,Ir)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},$t=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,$t)},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:Ne,zoom:$e,pitch:pt,bearing:zt,elevation:Yt}=ee(le);Ne&&(le.center=Ne),$e!==void 0&&(le.zoom=$e),pt!==void 0&&(le.pitch=pt),zt!==void 0&&(le.bearing=zt),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&&l.prefersReducedMotion){let ua=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ua,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,Ne=ee.bearing,$e=ee.pitch,pt=ee.padding,zt="bearing"in w?this._normalizeBearing(w.bearing,Ne):Ne,Yt="pitch"in w?+w.pitch:$e,Jt="padding"in w?w.padding:ee.padding,yr=a.P.convert(w.offset),Ir=ee.centerPoint.add(yr),ce=ee.pointLocation(Ir),{center:Ae,zoom:qe}=ee.getConstrained(a.N.convert(w.center||ce),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(Ae,ee);let Ve=ee.zoomScale(qe-le),ot=ee.project(ce),Ke=ee.project(Ae).sub(ot),ft=w.curve,qt=Math.max(ee.width,ee.height),Xt=qt/Ve,$t=Ke.mag();if("minZoom"in w){let ua=a.ac(Math.min(w.minZoom,le,qe),ee.minZoom,ee.maxZoom),oo=qt/ee.zoomScale(ua-le);ft=Math.sqrt(oo/$t*2)}let dr=ft*ft;function Mr(ua){let oo=(Xt*Xt-qt*qt+(ua?-1:1)*dr*dr*$t*$t)/(2*(ua?Xt:qt)*dr*$t);return Math.log(Math.sqrt(oo*oo+1)-oo)}function $r(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function ii(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let pi=Mr(!1),Yi=function(ua){return ii(pi)/ii(pi+ft*ua)},wn=function(ua){return qt*((ii(pi)*($r(oo=pi+ft*ua)/ii(oo))-$r(pi))/dr)/$t;var oo},Tn=(Mr(!0)-pi)/ft;if(Math.abs($t)<1e-6||!isFinite(Tn)){if(Math.abs(qt-Xt)<1e-6)return this.easeTo(w,B);let ua=Xt0,Yi=oo=>Math.exp(ua*ft*oo)}return w.duration="duration"in w?+w.duration:1e3*Tn/("screenSpeed"in w?+w.screenSpeed/ft:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=Ne!==zt,this._pitching=Yt!==$e,this._padding=!ee.isPaddingEqual(Jt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(Ae),this._ease(ua=>{let oo=ua*Tn,el=1/Yi(oo);ee.zoom=ua===1?qe:le+ee.scaleZoom(el),this._rotating&&(ee.bearing=a.y.number(Ne,zt,ua)),this._pitching&&(ee.pitch=a.y.number($e,Yt,ua)),this._padding&&(ee.interpolatePadding(pt,Jt,ua),Ir=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation(ua);let ys=ua===1?Ae:ee.unproject(ot.add(Ke.mult(wn(oo))).mult(el));ee.setLocationAtPoint(ee.renderWorldCopies?ys.wrap():ys,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=l.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 Rn={compact:!0,customAttribution:'MapLibre'};class Hn{constructor(w=Rn){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=f.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=f.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=f.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(){f.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 Ne=le.getSource();Ne.attribution&&w.indexOf(Ne.attribution)<0&&w.push(Ne.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let Ne=le+1;Ne=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 Gn{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=f.create("div","maplibregl-ctrl");let B=f.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(){f.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class pn{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 Lo=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class us 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 ct(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 Ne=ee.canonical.z-w.canonical.z,$e=ee.canonical.x-(ee.canonical.x>>Ne<>Ne<>Ne;a.aP(le.posMatrix,0,zt,0,zt,0,1),a.J(le.posMatrix,le.posMatrix,[-$e*zt,-pt*zt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Ne=w.canonical.z-ee.canonical.z,$e=w.canonical.x-(w.canonical.x>>Ne<>Ne<>Ne;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[$e*zt,pt*zt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**Ne,1/2**Ne,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 Bs{constructor(w,B,Q){this.painter=w,this.sourceCache=new us(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 Ne=w.canonical.x-(w.canonical.x>>le<>le<>8<<4|le>>8,B[Ne+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new v(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),Ne=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),$e=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,$e-Ne-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let pt=B[0]+(B[2]>>4<<8),zt=B[1]+((15&B[2])<<8),Yt=this.coordsIndex[255-B[3]],Jt=Yt&&this.sourceCache.getTileByID(Yt);if(!Jt)return null;let yr=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 ol={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Cl{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Js(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 Ne=this.terrain.sourceCache.getTerrainCoords(le);for(let $e in Ne)this._coordsDescendingInv[Q][$e]||(this._coordsDescendingInv[Q][$e]=[]),this._coordsDescendingInv[Q][$e].push(Ne[$e])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(ol[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let Ne in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][Ne]=this._coordsDescendingInv[le][Ne].map($e=>$e.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(ol[B]&&(this._prevType&&ol[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(ol[this._prevType]||ol[B]&&ee){this._prevType=B;let le=this._stacks.length-1,Ne=this._stacks[le]||[];for(let $e of this._renderableTiles){if(this.pool.isFull()&&(as(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push($e),$e.rtt[le]){let zt=this.pool.getObjectForId($e.rtt[le].id);if(zt.stamp===$e.rtt[le].stamp){this.pool.useObject(zt);continue}}let pt=this.pool.getOrCreateFreeObject();this.pool.useObject(pt),this.pool.stampObject(pt),$e.rtt[le]={id:pt.id,stamp:pt.stamp},Q.context.bindFramebuffer.set(pt.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let zt=0;zt{oe.touchstart=oe.dragStart,oe.touchmoveWindow=oe.dragMove,oe.touchend=oe.dragEnd},ga={showCompass:!0,showZoom:!0,visualizePitch:!1};class ko{constructor(w,B,Q=!1){this.mousedown=Ne=>{this.startMouse(a.e({},Ne,{ctrlKey:!0,preventDefault:()=>Ne.preventDefault()}),f.mousePos(this.element,Ne)),f.addEventListener(window,"mousemove",this.mousemove),f.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Ne=>{this.moveMouse(Ne,f.mousePos(this.element,Ne))},this.mouseup=Ne=>{this.mouseRotate.dragEnd(Ne),this.mousePitch&&this.mousePitch.dragEnd(Ne),this.offTemp()},this.touchstart=Ne=>{Ne.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=f.touchPos(this.element,Ne.targetTouches)[0],this.startTouch(Ne,this._startPos),f.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.addEventListener(window,"touchend",this.touchend))},this.touchmove=Ne=>{Ne.targetTouches.length!==1?this.reset():(this._lastPos=f.touchPos(this.element,Ne.targetTouches)[0],this.moveTouch(Ne,this._lastPos))},this.touchend=Ne=>{Ne.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=ws({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:Ne,clickTolerance:$e,bearingDegreesPerPixelMoved:pt=.8})=>{let zt=new Zs;return new aa({clickTolerance:$e,move:(Yt,Jt)=>({bearingDelta:(Jt.x-Yt.x)*pt}),moveStateManager:zt,enable:Ne,assignEvents:Fl})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=no({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:Ne,clickTolerance:$e,pitchDegreesPerPixelMoved:pt=-.5})=>{let zt=new Zs;return new aa({clickTolerance:$e,move:(Yt,Jt)=>({pitchDelta:(Jt.y-Yt.y)*pt}),moveStateManager:zt,enable:Ne,assignEvents:Fl})})({clickTolerance:le,enable:!0})),f.addEventListener(B,"mousedown",this.mousedown),f.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),f.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),f.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),f.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;f.removeEventListener(w,"mousedown",this.mousedown),f.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),f.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.removeEventListener(window,"touchend",this.touchend),f.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){f.enableDrag(),f.removeEventListener(window,"mousemove",this.mousemove),f.removeEventListener(window,"mouseup",this.mouseup),f.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.removeEventListener(window,"touchend",this.touchend)}}let zs;function Fo(oe,w,B){let Q=new a.N(oe.lng,oe.lat);if(oe=new a.N(oe.lng,oe.lat),w){let ee=new a.N(oe.lng-360,oe.lat),le=new a.N(oe.lng+360,oe.lat),Ne=B.locationPoint(oe).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(oe);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;oe.lng>B.center.lng?oe.lng-=360:oe.lng+=360}return oe.lng!==Q.lng&&B.locationPoint(oe).y>B.height/2-B.getHorizon()?oe:Q}let Ys={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 Gs(oe,w,B){let Q=oe.classList;for(let ee in Ys)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Us 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?Fo(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 Ne="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ne="rotateX(0deg)":this._pitchAlignment==="map"&&(Ne=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),f.setTransform(this._element,`${Ys[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Ne} ${le}`),l.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=f.create("div");let B=f.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=f.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 Ne=f.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"fill-rule","nonzero");let $e=f.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"transform","translate(3.0, 29.0)"),$e.setAttributeNS(null,"fill","#000000");let pt=[{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 Ve of pt){let ot=f.createNS("http://www.w3.org/2000/svg","ellipse");ot.setAttributeNS(null,"opacity","0.04"),ot.setAttributeNS(null,"cx","10.5"),ot.setAttributeNS(null,"cy","5.80029008"),ot.setAttributeNS(null,"rx",Ve.rx),ot.setAttributeNS(null,"ry",Ve.ry),$e.appendChild(ot)}let zt=f.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"fill",this._color);let Yt=f.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"),zt.appendChild(Yt);let Jt=f.createNS("http://www.w3.org/2000/svg","g");Jt.setAttributeNS(null,"opacity","0.25"),Jt.setAttributeNS(null,"fill","#000000");let yr=f.createNS("http://www.w3.org/2000/svg","path");yr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Jt.appendChild(yr);let Ir=f.createNS("http://www.w3.org/2000/svg","g");Ir.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ir.setAttributeNS(null,"fill","#FFFFFF");let ce=f.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Ae=f.createNS("http://www.w3.org/2000/svg","circle");Ae.setAttributeNS(null,"fill","#000000"),Ae.setAttributeNS(null,"opacity","0.25"),Ae.setAttributeNS(null,"cx","5.5"),Ae.setAttributeNS(null,"cy","5.5"),Ae.setAttributeNS(null,"r","5.4999962");let qe=f.createNS("http://www.w3.org/2000/svg","circle");qe.setAttributeNS(null,"fill","#FFFFFF"),qe.setAttributeNS(null,"cx","5.5"),qe.setAttributeNS(null,"cy","5.5"),qe.setAttributeNS(null,"r","5.4999962"),ce.appendChild(Ae),ce.appendChild(qe),Ne.appendChild($e),Ne.appendChild(zt),Ne.appendChild(Jt),Ne.appendChild(Ir),Ne.appendChild(ce),B.appendChild(Ne),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()}),Gs(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),f.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),Ne=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,Ne)-le<.006)return void(this._element.style.opacity=this._opacity);let $e=-this._offset.y/ee.transform._pixelPerMeter,pt=Math.sin(ee.getPitch()*Math.PI/180)*$e,zt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Yt=ee.transform.lngLatToCameraDepth(this._lngLat,Ne+pt)-zt>.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 Sl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_l=0,kl=!1,cl={maxWidth:100,unit:"metric"};function xl(oe,w,B){let Q=B&&B.maxWidth||100,ee=oe._container.clientHeight/2,le=oe.unproject([0,ee]),Ne=oe.unproject([Q,ee]),$e=le.distanceTo(Ne);if(B&&B.unit==="imperial"){let pt=3.2808*$e;pt>5280?Uo(w,Q,pt/5280,oe._getUIString("ScaleControl.Miles")):Uo(w,Q,pt,oe._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Uo(w,Q,$e/1852,oe._getUIString("ScaleControl.NauticalMiles")):$e>=1e3?Uo(w,Q,$e/1e3,oe._getUIString("ScaleControl.Kilometers")):Uo(w,Q,$e,oe._getUIString("ScaleControl.Meters"))}function Uo(oe,w,B,Q){let ee=function(le){let Ne=Math.pow(10,`${Math.floor(le)}`.length-1),$e=le/Ne;return $e=$e>=10?10:$e>=5?5:$e>=3?3:$e>=2?2:$e>=1?1:function(pt){let zt=Math.pow(10,Math.ceil(-Math.log(pt)/Math.LN10));return Math.round(pt*zt)/zt}($e),Ne*$e}(B);oe.style.width=w*(ee/B)+"px",oe.innerHTML=`${ee} ${Q}`}let _s={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Bl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Il(oe){if(oe){if(typeof oe=="number"){let w=Math.round(Math.abs(oe)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,oe),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-oe),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(oe,0),right:new a.P(-oe,0)}}if(oe instanceof a.P||Array.isArray(oe)){let w=a.P.convert(oe);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(oe.center||[0,0]),top:a.P.convert(oe.top||[0,0]),"top-left":a.P.convert(oe["top-left"]||[0,0]),"top-right":a.P.convert(oe["top-right"]||[0,0]),bottom:a.P.convert(oe.bottom||[0,0]),"bottom-left":a.P.convert(oe["bottom-left"]||[0,0]),"bottom-right":a.P.convert(oe["bottom-right"]||[0,0]),left:a.P.convert(oe.left||[0,0]),right:a.P.convert(oe.right||[0,0])}}return Il(new a.P(0,0))}let Dl=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=Hn,i.BoxZoomHandler=Po,i.CanvasSource=_t,i.CooperativeGesturesHandler=ui,i.DoubleClickZoomHandler=li,i.DragPanHandler=Oi,i.DragRotateHandler=dn,i.EdgeInsets=Eo,i.FullscreenControl=class extends a.E{constructor(oe={}){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,oe&&oe.container&&(oe.container instanceof HTMLElement?this._container=oe.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(oe){return this._map=oe,this._container||(this._container=this._map.getContainer()),this._controlContainer=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){f.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let oe=this._fullscreenButton=f.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);f.create("span","maplibregl-ctrl-icon",oe).setAttribute("aria-hidden","true"),oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",oe),this._fullscreenButton.title=oe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new 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=Qe,i.GeolocateControl=class extends a.E{constructor(oe){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),Ne=fe.fromLngLat(B,Q);this._map.fitBounds(Ne,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&&kl)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=f.create("button","maplibregl-ctrl-geolocate",this._container),f.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=f.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Us({element:this._dotElement}),this._circleElement=f.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Us({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({},Sl,oe)}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(zs!==void 0&&!w)return zs;if(window.navigator.permissions===void 0)return zs=!!window.navigator.geolocation,zs;try{zs=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){zs=!!window.navigator.geolocation}return zs})}().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(),f.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_l=0,kl=!1}_isOutOfMapMaxBounds(oe){let w=this._map.getMaxBounds(),B=oe.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 oe=this._map.getBounds(),w=oe.getSouthEast(),B=oe.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":_l--,kl=!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 oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),_l++,_l>1?(oe={maximumAge:6e5,timeout:0},kl=!0):(oe=this.options.positionOptions,kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,oe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=rs,i.ImageSource=Tt,i.KeyboardHandler=Ft,i.LngLatBounds=fe,i.LogoControl=Gn,i.Map=class extends Vn{constructor(oe){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Vl),oe);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 $a(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new pn,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({},ul),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=y.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(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=Xo(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 In(this,w),this._hash=w.hash&&new rs(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 Hn(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Gn,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(oe,w){if(w===void 0&&(w=oe.getDefaultPosition?oe.getDefaultPosition():"top-right"),!oe||!oe.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=oe.onAdd(this);this._controls.push(oe);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(oe){if(!oe||!oe.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(oe);return w>-1&&this._controls.splice(w,1),oe.onRemove(this),this}hasControl(oe){return this._controls.indexOf(oe)>-1}calculateCameraOptionsFromTo(oe,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(oe,w,B,Q)}resize(oe){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 $e=this.painter.context.gl;this._maxCanvasSize=[$e.drawingBufferWidth,$e.drawingBufferHeight];let pt=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,pt),this.painter.resize(Q,ee,pt)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let Ne=!this._moving;return Ne&&(this.stop(),this.fire(new a.k("movestart",oe)).fire(new a.k("move",oe))),this.fire(new a.k("resize",oe)),Ne&&this.fire(new a.k("moveend",oe)),this}_getClampedPixelRatio(oe,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=oe*ee,Ne=w*ee;return Math.min(le>B?B/le:1,Ne>Q?Q/Ne:1)*ee}getPixelRatio(){var oe;return(oe=this._overridePixelRatio)!==null&&oe!==void 0?oe:devicePixelRatio}setPixelRatio(oe){this._overridePixelRatio=oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(oe){return this.transform.setMaxBounds(fe.convert(oe)),this._update()}setMinZoom(oe){if((oe=oe==null?-2:oe)>=-2&&oe<=this.transform.maxZoom)return this.transform.minZoom=oe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=oe,this._update(),this.getZoom()>oe&&this.setZoom(oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(oe){if((oe=oe==null?0:oe)<0)throw new Error("minPitch must be greater than or equal to 0");if(oe>=0&&oe<=this.transform.maxPitch)return this.transform.minPitch=oe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(oe>=this.transform.minPitch)return this.transform.maxPitch=oe,this._update(),this.getPitch()>oe&&this.setPitch(oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(oe){return this.transform.renderWorldCopies=oe,this._update()}project(oe){return this.transform.locationPoint(a.N.convert(oe),this.style&&this.terrain)}unproject(oe){return this.transform.pointLocation(a.P.convert(oe),this.terrain)}isMoving(){var oe;return this._moving||((oe=this.handlers)===null||oe===void 0?void 0:oe.isMoving())}isZooming(){var oe;return this._zooming||((oe=this.handlers)===null||oe===void 0?void 0:oe.isZooming())}isRotating(){var oe;return this._rotating||((oe=this.handlers)===null||oe===void 0?void 0:oe.isRotating())}_createDelegatedListener(oe,w,B){if(oe==="mouseenter"||oe==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let Ne=w.filter(pt=>this.getLayer(pt)),$e=Ne.length!==0?this.queryRenderedFeatures(le.point,{layers:Ne}):[];$e.length?Q||(Q=!0,B.call(this,new Qn(oe,this,le.originalEvent,{features:$e}))):Q=!1},mouseout:()=>{Q=!1}}}}if(oe==="mouseleave"||oe==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:Ne=>{let $e=w.filter(pt=>this.getLayer(pt));($e.length!==0?this.queryRenderedFeatures(Ne.point,{layers:$e}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new Qn(oe,this,Ne.originalEvent)))},mouseout:Ne=>{Q&&(Q=!1,B.call(this,new Qn(oe,this,Ne.originalEvent)))}}}}{let Q=ee=>{let le=w.filter($e=>this.getLayer($e)),Ne=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];Ne.length&&(ee.features=Ne,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[oe]:Q}}}}_saveDelegatedListener(oe,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[oe]=this._delegatedListeners[oe]||[],this._delegatedListeners[oe].push(w)}_removeDelegatedListener(oe,w,B){if(!this._delegatedListeners||!this._delegatedListeners[oe])return;let Q=this._delegatedListeners[oe];for(let ee=0;eew.includes(Ne))){for(let Ne in le.delegates)this.off(Ne,le.delegates[Ne]);return void Q.splice(ee,1)}}}on(oe,w,B){if(B===void 0)return super.on(oe,w);let Q=this._createDelegatedListener(oe,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(oe,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(oe,w,B){if(B===void 0)return super.once(oe,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(oe,Q,B);for(let le in ee.delegates){let Ne=ee.delegates[le];ee.delegates[le]=(...$e)=>{this._removeDelegatedListener(oe,Q,B),Ne(...$e)}}this._saveDelegatedListener(oe,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(oe,w,B){return B===void 0?super.off(oe,w):(this._removeDelegatedListener(oe,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(oe,w){if(!this.style)return[];let B,Q=oe instanceof a.P||Array.isArray(oe),ee=Q?oe:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:oe)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),Ne=a.P.convert(ee[1]);B=[le,new a.P(Ne.x,le.y),Ne,new a.P(le.x,Ne.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(oe,w){return this.style.querySourceFeatures(oe,w)}setStyle(oe,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&oe?(this._diffStyle(oe,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(oe,w))}setTransformRequest(oe){return this._requestManager.setTransformRequest(oe),this}_getUIString(oe){let w=this._locale[oe];if(w==null)throw new Error(`Missing UI string '${oe}'`);return w}_updateStyle(oe,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(oe,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!oe)),oe?(this.style=new sn(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof oe=="string"?this.style.loadURL(oe,w,B):this.style.loadJSON(oe,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new sn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(oe,w){if(typeof oe=="string"){let B=this._requestManager.transformRequest(oe,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof oe=="object"&&this._updateDiff(oe,w)}_updateDiff(oe,w){try{this.style.setState(oe,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(oe,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(oe,w){return this._lazyInitEmptyStyle(),this.style.addSource(oe,w),this._update(!0)}isSourceLoaded(oe){let w=this.style&&this.style.sourceCaches[oe];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${oe}'`)))}setTerrain(oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),oe){let w=this.style.sourceCaches[oe.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${oe.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===oe.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 Bs(this.painter,w,oe),this.painter.renderToTexture=new Cl(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!==oe.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(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:oe})),this}getTerrain(){var oe,w;return(w=(oe=this.terrain)===null||oe===void 0?void 0:oe.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let oe=this.style&&this.style.sourceCaches;for(let w in oe){let B=oe[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(oe){return this.style.removeSource(oe),this._update(!0)}getSource(oe){return this.style.getSource(oe)}addImage(oe,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt}=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:Jt,data:yr}=w,Ir=w;return this.style.addImage(oe,{data:new a.R({width:Yt,height:Jt},new Uint8Array(yr)),pixelRatio:Q,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt,sdf:ee,version:0,userImage:Ir}),Ir.onAdd&&Ir.onAdd(this,oe),this}}{let{width:Yt,height:Jt,data:yr}=l.getImageData(w);this.style.addImage(oe,{data:new a.R({width:Yt,height:Jt},yr),pixelRatio:Q,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt,sdf:ee,version:0})}}updateImage(oe,w){let B=this.style.getImage(oe);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)?l.getImageData(w):w,{width:ee,height:le,data:Ne}=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 $e=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(Ne,$e),this.style.updateImage(oe,B),this}getImage(oe){return this.style.getImage(oe)}hasImage(oe){return oe?!!this.style.getImage(oe):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(oe){this.style.removeImage(oe)}loadImage(oe){return y.getImage(this._requestManager.transformRequest(oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(oe,w){return this._lazyInitEmptyStyle(),this.style.addLayer(oe,w),this._update(!0)}moveLayer(oe,w){return this.style.moveLayer(oe,w),this._update(!0)}removeLayer(oe){return this.style.removeLayer(oe),this._update(!0)}getLayer(oe){return this.style.getLayer(oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(oe,w,B){return this.style.setLayerZoomRange(oe,w,B),this._update(!0)}setFilter(oe,w,B={}){return this.style.setFilter(oe,w,B),this._update(!0)}getFilter(oe){return this.style.getFilter(oe)}setPaintProperty(oe,w,B,Q={}){return this.style.setPaintProperty(oe,w,B,Q),this._update(!0)}getPaintProperty(oe,w){return this.style.getPaintProperty(oe,w)}setLayoutProperty(oe,w,B,Q={}){return this.style.setLayoutProperty(oe,w,B,Q),this._update(!0)}getLayoutProperty(oe,w){return this.style.getLayoutProperty(oe,w)}setGlyphs(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(oe,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(oe,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(oe,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(oe,w,B=>{B||this._update(!0)}),this}setLight(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(oe,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(oe){return this._lazyInitEmptyStyle(),this.style.setSky(oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(oe,w){return this.style.setFeatureState(oe,w),this._update()}removeFeatureState(oe,w){return this.style.removeFeatureState(oe,w),this._update()}getFeatureState(oe){return this.style.getFeatureState(oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let oe=0,w=0;return this._container&&(oe=this._container.clientWidth||400,w=this._container.clientHeight||300),[oe,w]}_setupContainer(){let oe=this._container;oe.classList.add("maplibregl-map");let w=this._canvasContainer=f.create("div","maplibregl-canvas-container",oe);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=f.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=f.create("div","maplibregl-control-container",oe),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Ne=>{le[Ne]=f.create("div",`maplibregl-ctrl-${Ne} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(oe,w,B){this._canvas.width=Math.floor(B*oe),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${oe}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let oe={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:oe},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",oe)||this._canvas.getContext("webgl",oe);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Cs(B,this.transform),c.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(oe){return this._update(),this._renderTaskQueue.add(oe)}_cancelRenderFrame(oe){this._renderTaskQueue.remove(oe)}_render(oe){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(oe),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=l.now();this.style.zoomHistory.update(ee,le);let Ne=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),$e=Ne.crossFadingFactor();$e===1&&$e===this._crossFadingFactor||(B=!0,this._crossFadingFactor=$e),this.style.update(Ne)}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 oe;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),y.removeThrottleControl(this._imageQueueHandle),(oe=this._resizeObserver)===null||oe===void 0||oe.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),f.remove(this._canvasContainer),f.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,l.frameAsync(this._frameRequest).then(oe=>{a.bf.frame(oe),this._frameRequest=null,this._render(oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(oe){this._showTileBoundaries!==oe&&(this._showTileBoundaries=oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(oe){this._showPadding!==oe&&(this._showPadding=oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(oe){this._showCollisionBoxes!==oe&&(this._showCollisionBoxes=oe,oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(oe){this._showOverdrawInspector!==oe&&(this._showOverdrawInspector=oe,this._update())}get repaint(){return!!this._repaint}set repaint(oe){this._repaint!==oe&&(this._repaint=oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(oe){this._vertices=oe,this._update()}get version(){return Gl}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=Qn,i.MapTouchEvent=zo,i.MapWheelEvent=rl,i.Marker=Us,i.NavigationControl=class{constructor(oe){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({},ga,oe),this._container=f.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})),f.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})),f.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=f.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(oe){return this._map=oe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ko(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){f.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(oe,w){let B=f.create("button",oe,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(oe){super(),this.remove=()=>(this._content&&f.remove(this._content),this._container&&(f.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=f.create("div","maplibregl-popup",this._map.getContainer()),this._tip=f.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let $e of this.options.className.split(" "))this._container.classList.add($e);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?Fo(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=Il(this.options.offset);if(!ee){let $e=this._container.offsetWidth,pt=this._container.offsetHeight,zt;zt=Q.y+le.bottom.ythis._map.transform.height-pt?["bottom"]:[],Q.x<$e/2?zt.push("left"):Q.x>this._map.transform.width-$e/2&&zt.push("right"),ee=zt.length===0?"bottom":zt.join("-")}let Ne=Q.add(le[ee]);this.options.subpixelPositioning||(Ne=Ne.round()),f.setTransform(this._container,`${Ys[ee]} translate(${Ne.x}px,${Ne.y}px)`),Gs(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(_s),oe)}addTo(oe){return this._map&&this.remove(),this._map=oe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(oe){return this._lngLat=a.N.convert(oe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(oe){return this.setDOMContent(document.createTextNode(oe))}setHTML(oe){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=oe;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var oe;return(oe=this._container)===null||oe===void 0?void 0:oe.style.maxWidth}setMaxWidth(oe){return this.options.maxWidth=oe,this._update(),this}setDOMContent(oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=f.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(oe){return this._container&&this._container.classList.add(oe),this}removeClassName(oe){return this._container&&this._container.classList.remove(oe),this}setOffset(oe){return this.options.offset=oe,this._update(),this}toggleClassName(oe){if(this._container)return this._container.classList.toggle(oe)}setSubpixelPositioning(oe){this.options.subpixelPositioning=oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=f.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let oe=this._container.querySelector(Bl);oe&&oe.focus()}},i.RasterDEMTileSource=Pt,i.RasterTileSource=gt,i.ScaleControl=class{constructor(oe){this._onMove=()=>{xl(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,xl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},cl),oe)}getDefaultPosition(){return"bottom-left"}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-scale",oe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){f.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Sr,i.Style=sn,i.TerrainControl=class{constructor(oe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=oe}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=f.create("button","maplibregl-ctrl-terrain",this._container),f.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(){f.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=gs,i.TwoFingersTouchRotateHandler=ss,i.TwoFingersTouchZoomHandler=Yo,i.TwoFingersTouchZoomRotateHandler=wi,i.VectorTileSource=et,i.VideoSource=xt,i.addSourceType=(oe,w)=>a._(void 0,void 0,void 0,function*(){if(jt(oe))throw new Error(`A source type called "${oe}" already exists.`);((B,Q)=>{Ct[B]=Q})(oe,w)}),i.clearPrewarmedResources=function(){let oe=he;oe&&(oe.isPreloaded()&&oe.numActive()===1?(oe.release(be),he=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return ut().getRTLTextPluginStatus()},i.getVersion=function(){return Dl},i.getWorkerCount=function(){return ze.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(oe){return Me().broadcast("IS",oe)},i.prewarm=function(){ke().acquire(be)},i.setMaxParallelImageRequests=function(oe){a.a.MAX_PARALLEL_IMAGE_REQUESTS=oe},i.setRTLTextPlugin=function(oe,w){return ut().setRTLTextPlugin(oe,w)},i.setWorkerCount=function(oe){ze.workerCount=oe},i.setWorkerUrl=function(oe){a.a.WORKER_URL=oe}});var n=e;return n})});var EGe=Se((bxr,MGe)=>{"use strict";var iw=Zr(),xjt=Bf().sanitizeHTML,bjt=xJ(),TGe=bx();function AGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=TGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ay=AGe.prototype;ay.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=dq(t)};ay.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))};ay.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ay.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ay.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ay.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)};ay.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,!!dq(e)){var r=wjt(e);t.addSource(this.idSource,r)}};ay.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function SGe(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=bjt(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 wjt(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=xjt(e.sourceattribution)),n}MGe.exports=function(t,r,n){var i=new AGe(t,r);return i.update(n),i}});var RGe=Se((wxr,DGe)=>{"use strict";var MJ=wGe(),EJ=Zr(),LGe=ix(),kGe=Ul(),Tjt=hu(),Ajt=gp(),pq=jc(),zGe=Sy(),Sjt=zGe.drawMode,Mjt=zGe.selectMode,Ejt=nh().prepSelect,kjt=nh().clearOutline,Cjt=nh().clearSelectionsCache,Ljt=nh().selectOnClick,nw=bx(),zjt=EGe();function PGe(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 Wh=PGe.prototype;Wh.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)};Wh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=IGe(a.style),s=a.bounds,u=s?[[s.west,s.south],[s.east,s.north]]:null,l=i.map=new MJ.Map({container:i.div,style:o.style,center:kJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:u,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new MJ.AttributionControl({compact:!0})),f={};l.on("styleimagemissing",function(h){var d=h.id;if(!f[d]&&d.includes("-15")){f[d]=!0;var p=new Image(15,15);p.onload=function(){l.addImage(d,p)},p.crossOrigin="Anonymous",p.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),l.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}}),l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(h){l.once("load",h)})),c=c.concat(LGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Wh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],u=IGe(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,a.setStyle(u.style),i.traceHash={},s.push(new Promise(function(l){a.once("styledata",l)}))),s=s.concat(LGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Wh.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&&Ljt(u.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),l.indexOf("event")>-1&&pq.click(n,u.originalEvent)}}};Wh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(u){var l=t.map.unproject(u);return[l.lng,l.lat]}var a=e.dragmode,o;o=function(u,l){if(l.isRect){var f=u.range={};f[t.id]=[i([l.xmin,l.ymin]),i([l.xmax,l.ymax])]}else{var c=u.lassoPoints={};c[t.id]=l.map(i)}};var s=t.dragOptions;t.dragOptions=EJ.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),Mjt(a)||Sjt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(u,l,f){Ejt(u,l,f,t.dragOptions,a)},Ajt.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))};Wh.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])};Wh.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 CJ=Zr(),Ijt=k_(),Djt=Jd(),FGe=Fk();qGe.exports=function(t,r,n){Ijt(t,r,n,{type:"map",attributes:FGe,handleDefaults:Rjt,partition:"y"})};function Rjt(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,Djt(e,t,{name:"layers",handleItemDefaults:Fjt}),t._input=e}function Fjt(e,t){function r(u,l){return CJ.coerce(e,t,FGe.layers,u,l)}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",CJ.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"),CJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var yq=Se(l0=>{"use strict";var vq=Zr(),OGe=vq.strTranslate,qjt=vq.strScale,Bjt=Dd().getSubplotCalcData,Ojt=Zv(),Njt=Nl(),NGe=yu(),Ujt=Bf(),Vjt=RGe(),wx="map";l0.name=wx;l0.attr="subplot";l0.idRoot=wx;l0.idRegex=l0.attrRegex=vq.counterRegex(wx);l0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};l0.layoutAttributes=Fk();l0.supplyLayoutDefaults=BGe();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[wx],a=0;ax/2){var b=c.split("|").join("
");d.text(b).attr("data-unformatted",b).call(Ujt.convertToTspans,e),p=NGe.bBox(d.node())}d.attr("transform",OGe(-3,-p.height+8)),h.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>x&&(y=x/(p.width+6));var E=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",OGe(E[0],E[1])+qjt(y))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=0;n{"use strict";UGe.exports={attributes:sq(),supplyDefaults:eGe(),colorbar:ep(),formatLabels:_J(),calc:lF(),plot:pGe(),hoverPoints:hq().hoverPoints,eventData:gGe(),selectPoints:xGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:yq(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var GGe=Se((Mxr,HGe)=>{"use strict";HGe.exports=VGe()});var LJ=Se((Exr,WGe)=>{"use strict";var d1=JA(),Hjt=Xf(),Gjt=Du().hovertemplateAttrs,Wjt=zf(),Tx=vu().extendFlat;WGe.exports=Tx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Tx({},d1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Tx({},d1.marker.line.color,{editType:"plot"}),width:Tx({},d1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Tx({},d1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Tx({},d1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Tx({},d1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d1.hoverinfo,hovertemplate:Gjt({},{keys:["properties"]}),showlegend:Tx({},Wjt.showlegend,{dflt:!1})},Hjt("",{cLetter:"z",editTypeOverride:"calc"}))});var ZGe=Se((kxr,jGe)=>{"use strict";var Nk=Zr(),jjt=ed(),Zjt=LJ();jGe.exports=function(t,r,n,i){function a(f,c){return Nk.coerce(t,r,Zjt,f,c)}var o=a("locations"),s=a("z"),u=a("geojson");if(!Nk.isArrayOrTypedArray(o)||!o.length||!Nk.isArrayOrTypedArray(s)||!s.length||!(typeof u=="string"&&u!==""||Nk.isPlainObject(u))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),jjt(t,r,i,a,{prefix:"",cLetter:"z"}),Nk.coerceSelectionMarkerOpacity(r,a)}});var zJ=Se((Cxr,KGe)=>{"use strict";var Xjt=_u(),p1=Zr(),Yjt=fc(),Kjt=yu(),Jjt=tx().makeBlank,XGe=ix();function $jt(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:Jjt()};if(!r)return a;var o=XGe.extractTraceFeature(e);if(!o)return a;var s=Yjt.makeColorScaleFuncFromTrace(t),u=t.marker,l=u.line||{},f;p1.isArrayOrTypedArray(u.opacity)&&(f=function(E){var k=E.mo;return Xjt(k)?+p1.constrain(k,0,1):0});var c;p1.isArrayOrTypedArray(l.color)&&(c=function(E){return E.mlc});var h;p1.isArrayOrTypedArray(l.width)&&(h=function(E){return E.mlw});for(var d=0;d{"use strict";var $Ge=zJ().convert,Qjt=zJ().convertOnSelect,JGe=bx().traceLayerPrefix;function QGe(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",JGe+t+"-fill"],["line",JGe+t+"-line"]],this.below=null}var ES=QGe.prototype;ES.update=function(e){this._update($Ge(e)),e[0].trace._glTrace=this};ES.updateOnSelect=function(e){this._update(Qjt(e))};ES._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])};ES.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};eWe.exports=function(t,r){var n=r[0].trace,i=new QGe(t,n.uid),a=i.sourceId,o=$Ge(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 iWe=Se((zxr,rWe)=>{"use strict";rWe.exports={attributes:LJ(),supplyDefaults:ZGe(),colorbar:S_(),calc:LF(),plot:tWe(),hoverPoints:PF(),eventData:IF(),selectPoints:DF(),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";nWe.exports=iWe()});var IJ=Se((Ixr,sWe)=>{"use strict";var eZt=Xf(),tZt=Du().hovertemplateAttrs,oWe=zf(),mq=sq(),PJ=vu().extendFlat;sWe.exports=PJ({lon:mq.lon,lat:mq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:mq.text,hovertext:mq.hovertext,hoverinfo:PJ({},oWe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:tZt(),showlegend:PJ({},oWe.showlegend,{dflt:!1})},eZt("",{cLetter:"z",editTypeOverride:"calc"}))});var uWe=Se((Dxr,lWe)=>{"use strict";var rZt=Zr(),iZt=ed(),nZt=IJ();lWe.exports=function(t,r,n,i){function a(l,f){return rZt.coerce(t,r,nZt,l,f)}var o=a("lon")||[],s=a("lat")||[],u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),iZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var hWe=Se((Rxr,cWe)=>{"use strict";var DJ=_u(),aZt=Zr().isArrayOrTypedArray,RJ=ju().BADNUM,oZt=Rp(),fWe=Zr()._;cWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=aZt(a)&&a.length,s=0;s{"use strict";var sZt=_u(),FJ=Zr(),dWe=Pl(),pWe=fc(),vWe=ju().BADNUM,lZt=tx().makeBlank;yWe.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:lZt()};if(!n)return a;var o=[],s,u=r.z,l=r.radius,f=FJ.isArrayOrTypedArray(u)&&u.length,c=FJ.isArrayOrTypedArray(l);for(s=0;s0?+l[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var b=pWe.extractOpts(r),y=b.reversescale?pWe.flipScale(b.colorscale):b.colorscale,E=y[0][1],k=dWe.opacity(E)<1?E:dWe.addOpacity(E,0),A=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var gWe=mWe(),uZt=bx().traceLayerPrefix;function _We(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",uZt+t+"-heatmap"]],this.below=null}var gq=_We.prototype;gq.update=function(e){var t=this.subplot,r=this.layerList,n=gWe(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])};gq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};xWe.exports=function(t,r){var n=r[0].trace,i=new _We(t,n.uid),a=i.sourceId,o=gWe(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 TWe=Se((Bxr,wWe)=>{"use strict";var fZt=hu(),cZt=hq().hoverPoints,hZt=hq().getExtraText;wWe.exports=function(t,r,n){var i=cZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,u=o[a.index];if(delete a.color,"z"in u){var l=a.subplot.mockAxis;a.z=u.z,a.zLabel=fZt.tickText(l,l.c2l(u.z),"hover").text}return a.extraText=hZt(s,u,o[0].t.labels),[a]}}});var SWe=Se((Oxr,AWe)=>{"use strict";AWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var EWe=Se((Nxr,MWe)=>{"use strict";MWe.exports={attributes:IJ(),supplyDefaults:uWe(),colorbar:S_(),formatLabels:_J(),calc:hWe(),plot:bWe(),hoverPoints:TWe(),eventData:SWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";kWe.exports=EWe()});var BJ=Se((Hxr,IWe)=>{"use strict";var dZt=uc(),pZt=zf(),LWe=Ih(),qJ=i3(),vZt=Ec().attributes,zWe=Du().hovertemplateAttrs,yZt=Xf(),mZt=_f().templatedArray,gZt=Gc().descriptionOnlyNumbers,PWe=vu().extendFlat,_Zt=_c().overrideAll,Vxr=IWe.exports=_Zt({hoverinfo:PWe({},pZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:qJ.hoverlabel,domain:vZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:gZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:dZt({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:LWe.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:qJ.hoverlabel,hovertemplate:zWe({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:LWe.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:qJ.hoverlabel,hovertemplate:zWe({},{keys:["value","label"]}),colorscales:mZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:PWe(yZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var BWe=Se((Gxr,qWe)=>{"use strict";var kS=Zr(),_q=BJ(),xZt=Pl(),DWe=cd(),bZt=Ec().defaults,RWe=o5(),FWe=_f(),wZt=Jd();qWe.exports=function(t,r,n,i){function a(A,L){return kS.coerce(t,r,_q,A,L)}var o=kS.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,u=FWe.newContainer(r,"node");function l(A,L){return kS.coerce(s,u,_q.node,A,L)}l("label"),l("groups"),l("x"),l("y"),l("pad"),l("thickness"),l("line.color"),l("line.width"),l("hoverinfo",t.hoverinfo),RWe(s,u,l,o),l("hovertemplate"),l("align");var f=i.colorway,c=function(A){return f[A%f.length]};l("color",u.label.map(function(A,L){return xZt.addOpacity(c(L),.8)})),l("customdata");var h=t.link||{},d=FWe.newContainer(r,"link");function p(A,L){return kS.coerce(h,d,_q.link,A,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),RWe(h,d,p,o),p("hovertemplate");var x=DWe(i.paper_bgcolor).getLuminance()<.333,b=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",b);function E(A){var L=DWe(A);if(!L.isValid())return A;var _=L.getAlpha();return _<=.8?L.setAlpha(_+.2):L=x?L.brighten():L.darken(),L.toRgbString()}p("hovercolor",Array.isArray(y)?y.map(E):E(y)),p("customdata"),wZt(h,d,{name:"colorscales",handleItemDefaults:TZt}),bZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var k;u.x.length&&u.y.length&&(k="freeform"),a("arrangement",k),kS.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function TZt(e,t){function r(n,i){return kS.coerce(e,t,_q.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var OJ=Se((Wxr,OWe)=>{"use strict";OWe.exports=AZt;function AZt(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),u=0;u0;){b=E[E.length-1];var k=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=A}else{if(n[b]===r[b]){for(var _=[],C=[],M=0,A=y.length-1;A>=0;--A){var v=y[A];if(i[v]=!1,_.push(v),C.push(s[v]),M+=s[v].length,o[v]=f.length,v===b){y.length=A;break}}f.push(_);for(var z=new Array(M),A=0;A{"use strict";var SZt=OJ(),CS=Zr(),MZt=Km().wrap,Uk=CS.isArrayOrTypedArray,NWe=CS.isIndex,UWe=fc();function EZt(e){var t=e.node,r=e.link,n=[],i=Uk(r.color),a=Uk(r.hovercolor),o=Uk(r.customdata),s={},u={},l=r.colorscales.length,f;for(f=0;fp&&(p=r.source[f]),r.target[f]>p&&(p=r.target[f]);var x=p+1;e.node._count=x;var b,y=e.node.groups,E={};for(f=0;f0&&NWe(M,x)&&NWe(v,x)&&!(E.hasOwnProperty(M)&&E.hasOwnProperty(v)&&E[M]===E[v])){E.hasOwnProperty(v)&&(v=E[v]),E.hasOwnProperty(M)&&(M=E[M]),M=+M,v=+v,s[M]=s[v]=!0;var z="";r.label&&r.label[f]&&(z=r.label[f]);var T=null;z&&u.hasOwnProperty(z)&&(T=u[z]),n.push({pointNumber:f,label:z,color:i?r.color[f]:r.color,hovercolor:a?r.hovercolor[f]:r.hovercolor,customdata:o?r.customdata[f]:r.customdata,concentrationscale:T,source:M,target:v,value:+C}),_.source.push(M),_.target.push(v)}}var F=x+y.length,q=Uk(t.color),U=Uk(t.customdata),H=[];for(f=0;fx-1,childrenNodes:[],pointNumber:f,label:j,color:q?t.color[f]:t.color,customdata:U?t.customdata[f]:t.customdata})}var G=!1;return kZt(F,_.source,_.target)&&(G=!0),{circular:G,links:n,nodes:H,groups:y,groupLookup:E}}function kZt(e,t,r){for(var n=CS.init2dArray(e,0),i=0;i1})}VWe.exports=function(t,r){var n=EZt(r);return MZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var WWe=Se((xq,GWe)=>{(function(e,t){typeof xq=="object"&&typeof GWe!="undefined"?t(xq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(xq,function(e){"use strict";function t(C){var M=+this._x.call(null,C),v=+this._y.call(null,C);return r(this.cover(M,v),M,v,C)}function r(C,M,v,z){if(isNaN(M)||isNaN(v))return C;var T,F=C._root,q={data:z},U=C._x0,H=C._y0,j=C._x1,G=C._y1,O,W,re,ne,be,ze,Ce,he;if(!F)return C._root=q,C;for(;F.length;)if((be=M>=(O=(U+j)/2))?U=O:j=O,(ze=v>=(W=(H+G)/2))?H=W:G=W,T=F,!(F=F[Ce=ze<<1|be]))return T[Ce]=q,C;if(re=+C._x.call(null,F.data),ne=+C._y.call(null,F.data),M===re&&v===ne)return q.next=F,T?T[Ce]=q:C._root=q,C;do T=T?T[Ce]=new Array(4):C._root=new Array(4),(be=M>=(O=(U+j)/2))?U=O:j=O,(ze=v>=(W=(H+G)/2))?H=W:G=W;while((Ce=ze<<1|be)===(he=(ne>=W)<<1|re>=O));return T[he]=F,T[Ce]=q,C}function n(C){var M,v,z=C.length,T,F,q=new Array(z),U=new Array(z),H=1/0,j=1/0,G=-1/0,O=-1/0;for(v=0;vG&&(G=T),FO&&(O=F));if(H>G||j>O)return this;for(this.cover(H,j).cover(G,O),v=0;vC||C>=T||z>M||M>=F;)switch(j=(MG||(U=ne.y0)>O||(H=ne.x1)=Ce)<<1|C>=ze)&&(ne=W[W.length-1],W[W.length-1]=W[W.length-1-be],W[W.length-1-be]=ne)}else{var he=C-+this._x.call(null,re.data),te=M-+this._y.call(null,re.data),ke=he*he+te*te;if(ke=(W=(q+H)/2))?q=W:H=W,(be=O>=(re=(U+j)/2))?U=re:j=re,M=v,!(v=v[ze=be<<1|ne]))return this;if(!v.length)break;(M[ze+1&3]||M[ze+2&3]||M[ze+3&3])&&(z=M,Ce=ze)}for(;v.data!==C;)if(T=v,!(v=v.next))return this;return(F=v.next)&&delete v.next,T?(F?T.next=F:delete T.next,this):M?(F?M[ze]=F:delete M[ze],(v=M[0]||M[1]||M[2]||M[3])&&v===(M[3]||M[2]||M[1]||M[0])&&!v.length&&(z?z[Ce]=v:this._root=v),this):(this._root=F,this)}function f(C){for(var M=0,v=C.length;M{(function(e,t){typeof bq=="object"&&typeof jWe!="undefined"?t(bq):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(bq,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,b){return this[t+x]=b,this},remove:function(x){var b=t+x;return b in this&&delete this[b]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var b in this)b[0]===t&&x.push(b.slice(1));return x},values:function(){var x=[];for(var b in this)b[0]===t&&x.push(this[b]);return x},entries:function(){var x=[];for(var b in this)b[0]===t&&x.push({key:b.slice(1),value:this[b]});return x},size:function(){var x=0;for(var b in this)b[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var b in this)b[0]===t&&x(this[b],b.slice(1),this)}};function n(x,b){var y=new r;if(x instanceof r)x.each(function(_,C){y.set(C,_)});else if(Array.isArray(x)){var E=-1,k=x.length,A;if(b==null)for(;++E=x.length)return y!=null&&_.sort(y),E!=null?E(_):_;for(var z=-1,T=_.length,F=x[C++],q,U,H=n(),j,G=M();++zx.length)return _;var M,v=b[C-1];return E!=null&&C>=x.length?M=_.entries():(M=[],_.each(function(z,T){M.push({key:T,values:L(z,C)})})),v!=null?M.sort(function(z,T){return v(z.key,T.key)}):M}return k={object:function(_){return A(_,0,a,o)},map:function(_){return A(_,0,s,u)},entries:function(_){return L(A(_,0,s,u),0)},key:function(_){return x.push(_),k},sortKeys:function(_){return b[x.length-1]=_,k},sortValues:function(_){return y=_,k},rollup:function(_){return E=_,k}}}function a(){return{}}function o(x,b,y){x[b]=y}function s(){return n()}function u(x,b,y){x.set(b,y)}function l(){}var f=n.prototype;l.prototype=c.prototype={constructor:l,has:f.has,add:function(x){return x+="",this[t+x]=x,this},remove:f.remove,clear:f.clear,values:f.keys,size:f.size,empty:f.empty,each:f.each};function c(x,b){var y=new l;if(x instanceof l)x.each(function(A){y.add(A)});else if(x){var E=-1,k=x.length;if(b==null)for(;++E{(function(e,t){typeof Tq=="object"&&typeof ZWe!="undefined"?t(Tq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Tq,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,u=arguments.length,l={},f;s=0&&(f=l.slice(c+1),l=l.slice(0,c)),l&&!u.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:f}})}n.prototype=r.prototype={constructor:n,on:function(s,u){var l=this._,f=i(s+"",l),c,h=-1,d=f.length;if(arguments.length<2){for(;++h0)for(var l=new Array(c),f=0,c,h;f{(function(e,t){typeof Aq=="object"&&typeof YWe!="undefined"?t(Aq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Aq,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,u=0,l=0,f=typeof performance=="object"&&performance.now?performance:Date,c=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return u||(c(d),u=f.now()+l)}function d(){u=0}function p(){this._call=this._time=this._next=null}p.prototype=x.prototype={constructor:p,restart:function(C,M,v){if(typeof C!="function")throw new TypeError("callback is not a function");v=(v==null?h():+v)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=v,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function x(C,M,v){var z=new p;return z.restart(C,M,v),z}function b(){h(),++t;for(var C=a,M;C;)(M=u-C._time)>=0&&C._call.call(null,M),C=C._next;--t}function y(){u=(s=f.now())+l,t=r=0;try{b()}finally{t=0,k(),u=0}}function E(){var C=f.now(),M=C-s;M>i&&(l-=M,s=C)}function k(){for(var C,M=a,v,z=1/0;M;)M._call?(z>M._time&&(z=M._time),C=M,M=M._next):(v=M._next,M._next=null,M=C?C._next=v:a=v);o=C,A(z)}function A(C){if(!t){r&&(r=clearTimeout(r));var M=C-u;M>24?(C<1/0&&(r=setTimeout(y,C-f.now()-l)),n&&(n=clearInterval(n))):(n||(s=f.now(),n=setInterval(E,i)),t=1,c(y))}}function L(C,M,v){var z=new p;return M=M==null?0:+M,z.restart(function(T){z.stop(),C(T+M)},M,v),z}function _(C,M,v){var z=new p,T=M;return M==null?(z.restart(C,M,v),z):(M=+M,v=v==null?h():+v,z.restart(function F(q){q+=T,z.restart(F,T+=M,v),C(q)},M,v),z)}e.interval=_,e.now=h,e.timeout=L,e.timer=x,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var $We=Se((Sq,JWe)=>{(function(e,t){typeof Sq=="object"&&typeof JWe!="undefined"?t(Sq,WWe(),wq(),XWe(),KWe()):typeof define=="function"&&define.amd?define(["exports","d3-quadtree","d3-collection","d3-dispatch","d3-timer"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(Sq,function(e,t,r,n,i){"use strict";function a(C,M){var v;C==null&&(C=0),M==null&&(M=0);function z(){var T,F=v.length,q,U=0,H=0;for(T=0;TO.index){var Be=W-Oe.x-Oe.vx,fe=re-Oe.y-Oe.vy,Ze=Be*Be+fe*fe;ZeW+me||Eere+me||MeH.r&&(H.r=H[j].r)}function U(){if(M){var H,j=M.length,G;for(v=new Array(j),H=0;H1?(be==null?U.remove(ne):U.set(ne,re(be)),M):U.get(ne)},find:function(ne,be,ze){var Ce=0,he=C.length,te,ke,Ee,Me,Oe;for(ze==null?ze=1/0:ze*=ze,Ce=0;Ce1?(j.on(ne,be),M):j.on(ne)}}}function k(){var C,M,v,z=o(-30),T,F=1,q=1/0,U=.81;function H(W){var re,ne=C.length,be=t.quadtree(C,p,x).visitAfter(G);for(v=W,re=0;re=q)return;(W.data!==M||W.next)&&(ze===0&&(ze=s(),te+=ze*ze),Ce===0&&(Ce=s(),te+=Ce*Ce),te{(function(e,t){typeof Mq=="object"&&typeof QWe!="undefined"?t(Mq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Mq,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,u){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,u){this._+="L"+(this._x1=+s)+","+(this._y1=+u)},quadraticCurveTo:function(s,u,l,f){this._+="Q"+ +s+","+ +u+","+(this._x1=+l)+","+(this._y1=+f)},bezierCurveTo:function(s,u,l,f,c,h){this._+="C"+ +s+","+ +u+","+ +l+","+ +f+","+(this._x1=+c)+","+(this._y1=+h)},arcTo:function(s,u,l,f,c){s=+s,u=+u,l=+l,f=+f,c=+c;var h=this._x1,d=this._y1,p=l-s,x=f-u,b=h-s,y=d-u,E=b*b+y*y;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=u);else if(E>n)if(!(Math.abs(y*p-x*b)>n)||!c)this._+="L"+(this._x1=s)+","+(this._y1=u);else{var k=l-h,A=f-d,L=p*p+x*x,_=k*k+A*A,C=Math.sqrt(L),M=Math.sqrt(E),v=c*Math.tan((t-Math.acos((L+E-_)/(2*C*M)))/2),z=v/M,T=v/C;Math.abs(z-1)>n&&(this._+="L"+(s+z*b)+","+(u+z*y)),this._+="A"+c+","+c+",0,0,"+ +(y*k>b*A)+","+(this._x1=s+T*p)+","+(this._y1=u+T*x)}},arc:function(s,u,l,f,c,h){s=+s,u=+u,l=+l,h=!!h;var d=l*Math.cos(f),p=l*Math.sin(f),x=s+d,b=u+p,y=1^h,E=h?f-c:c-f;if(l<0)throw new Error("negative radius: "+l);this._x1===null?this._+="M"+x+","+b:(Math.abs(this._x1-x)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+x+","+b),l&&(E<0&&(E=E%r+r),E>i?this._+="A"+l+","+l+",0,1,"+y+","+(s-d)+","+(u-p)+"A"+l+","+l+",0,1,"+y+","+(this._x1=x)+","+(this._y1=b):E>n&&(this._+="A"+l+","+l+",0,"+ +(E>=t)+","+y+","+(this._x1=s+l*Math.cos(c))+","+(this._y1=u+l*Math.sin(c))))},rect:function(s,u,l,f){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+u)+"h"+ +l+"v"+ +f+"h"+-l+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var NJ=Se((Eq,tje)=>{(function(e,t){typeof Eq=="object"&&typeof tje!="undefined"?t(Eq,eje()):typeof define=="function"&&define.amd?define(["exports","d3-path"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Eq,function(e,t){"use strict";function r(st){return function(){return st}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,u=Math.sin,l=Math.sqrt,f=1e-12,c=Math.PI,h=c/2,d=2*c;function p(st){return st>1?0:st<-1?c:Math.acos(st)}function x(st){return st>=1?h:st<=-1?-h:Math.asin(st)}function b(st){return st.innerRadius}function y(st){return st.outerRadius}function E(st){return st.startAngle}function k(st){return st.endAngle}function A(st){return st&&st.padAngle}function L(st,Wt,tr,or,Nr,hi,Gi,Qr){var Ui=tr-st,zn=or-Wt,fn=Gi-Nr,xn=Qr-hi,_a=xn*Ui-fn*zn;if(!(_a*_aXn*Xn+ts*ts&&(Ba=Ea,Bo=Ha),{cx:Ba,cy:Bo,x01:-fn,y01:-xn,x11:Ba*(Nr/un-1),y11:Bo*(Nr/un-1)}}function C(){var st=b,Wt=y,tr=r(0),or=null,Nr=E,hi=k,Gi=A,Qr=null;function Ui(){var zn,fn,xn=+st.apply(this,arguments),_a=+Wt.apply(this,arguments),Wn=Nr.apply(this,arguments)-h,Fn=hi.apply(this,arguments)-h,ia=n(Fn-Wn),za=Fn>Wn;if(Qr||(Qr=zn=t.path()),_af))Qr.moveTo(0,0);else if(ia>d-f)Qr.moveTo(_a*a(Wn),_a*u(Wn)),Qr.arc(0,0,_a,Wn,Fn,!za),xn>f&&(Qr.moveTo(xn*a(Fn),xn*u(Fn)),Qr.arc(0,0,xn,Fn,Wn,za));else{var Hr=Wn,na=Fn,go=Wn,Dn=Fn,un=ia,Zn=ia,Wo=Gi.apply(this,arguments)/2,Ba=Wo>f&&(or?+or.apply(this,arguments):l(xn*xn+_a*_a)),Bo=s(n(_a-xn)/2,+tr.apply(this,arguments)),Ea=Bo,Ha=Bo,tn,Cn;if(Ba>f){var Xn=x(Ba/xn*u(Wo)),ts=x(Ba/_a*u(Wo));(un-=Xn*2)>f?(Xn*=za?1:-1,go+=Xn,Dn-=Xn):(un=0,go=Dn=(Wn+Fn)/2),(Zn-=ts*2)>f?(ts*=za?1:-1,Hr+=ts,na-=ts):(Zn=0,Hr=na=(Wn+Fn)/2)}var Ja=_a*a(Hr),to=_a*u(Hr),Ri=xn*a(Dn),an=xn*u(Dn);if(Bo>f){var cs=_a*a(na),pa=_a*u(na),ln=xn*a(go),ka=xn*u(go),va;if(iaf?Ha>f?(tn=_(ln,ka,Ja,to,_a,Ha,za),Cn=_(cs,pa,Ri,an,_a,Ha,za),Qr.moveTo(tn.cx+tn.x01,tn.cy+tn.y01),Haf)||!(un>f)?Qr.lineTo(Ri,an):Ea>f?(tn=_(Ri,an,cs,pa,xn,-Ea,za),Cn=_(Ja,to,ln,ka,xn,-Ea,za),Qr.lineTo(tn.cx+tn.x01,tn.cy+tn.y01),Ea=_a;--Wn)Qr.point(na[Wn],go[Wn]);Qr.lineEnd(),Qr.areaEnd()}za&&(na[xn]=+st(ia,xn,fn),go[xn]=+tr(ia,xn,fn),Qr.point(Wt?+Wt(ia,xn,fn):na[xn],or?+or(ia,xn,fn):go[xn]))}if(Hr)return Qr=null,Hr+""||null}function zn(){return F().defined(Nr).curve(Gi).context(hi)}return Ui.x=function(fn){return arguments.length?(st=typeof fn=="function"?fn:r(+fn),Wt=null,Ui):st},Ui.x0=function(fn){return arguments.length?(st=typeof fn=="function"?fn:r(+fn),Ui):st},Ui.x1=function(fn){return arguments.length?(Wt=fn==null?null:typeof fn=="function"?fn:r(+fn),Ui):Wt},Ui.y=function(fn){return arguments.length?(tr=typeof fn=="function"?fn:r(+fn),or=null,Ui):tr},Ui.y0=function(fn){return arguments.length?(tr=typeof fn=="function"?fn:r(+fn),Ui):tr},Ui.y1=function(fn){return arguments.length?(or=fn==null?null:typeof fn=="function"?fn:r(+fn),Ui):or},Ui.lineX0=Ui.lineY0=function(){return zn().x(st).y(tr)},Ui.lineY1=function(){return zn().x(st).y(or)},Ui.lineX1=function(){return zn().x(Wt).y(tr)},Ui.defined=function(fn){return arguments.length?(Nr=typeof fn=="function"?fn:r(!!fn),Ui):Nr},Ui.curve=function(fn){return arguments.length?(Gi=fn,hi!=null&&(Qr=Gi(hi)),Ui):Gi},Ui.context=function(fn){return arguments.length?(fn==null?hi=Qr=null:Qr=Gi(hi=fn),Ui):hi},Ui}function U(st,Wt){return Wtst?1:Wt>=st?0:NaN}function H(st){return st}function j(){var st=H,Wt=U,tr=null,or=r(0),Nr=r(d),hi=r(0);function Gi(Qr){var Ui,zn=Qr.length,fn,xn,_a=0,Wn=new Array(zn),Fn=new Array(zn),ia=+or.apply(this,arguments),za=Math.min(d,Math.max(-d,Nr.apply(this,arguments)-ia)),Hr,na=Math.min(Math.abs(za)/zn,hi.apply(this,arguments)),go=na*(za<0?-1:1),Dn;for(Ui=0;Ui0&&(_a+=Dn);for(Wt!=null?Wn.sort(function(un,Zn){return Wt(Fn[un],Fn[Zn])}):tr!=null&&Wn.sort(function(un,Zn){return tr(Qr[un],Qr[Zn])}),Ui=0,xn=_a?(za-zn*go)/_a:0;Ui0?Dn*xn:0)+go,Fn[fn]={data:Qr[fn],index:Ui,value:Dn,startAngle:ia,endAngle:Hr,padAngle:na};return Fn}return Gi.value=function(Qr){return arguments.length?(st=typeof Qr=="function"?Qr:r(+Qr),Gi):st},Gi.sortValues=function(Qr){return arguments.length?(Wt=Qr,tr=null,Gi):Wt},Gi.sort=function(Qr){return arguments.length?(tr=Qr,Wt=null,Gi):tr},Gi.startAngle=function(Qr){return arguments.length?(or=typeof Qr=="function"?Qr:r(+Qr),Gi):or},Gi.endAngle=function(Qr){return arguments.length?(Nr=typeof Qr=="function"?Qr:r(+Qr),Gi):Nr},Gi.padAngle=function(Qr){return arguments.length?(hi=typeof Qr=="function"?Qr:r(+Qr),Gi):hi},Gi}var G=W(v);function O(st){this._curve=st}O.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(st,Wt){this._curve.point(Wt*Math.sin(st),Wt*-Math.cos(st))}};function W(st){function Wt(tr){return new O(st(tr))}return Wt._curve=st,Wt}function re(st){var Wt=st.curve;return st.angle=st.x,delete st.x,st.radius=st.y,delete st.y,st.curve=function(tr){return arguments.length?Wt(W(tr)):Wt()._curve},st}function ne(){return re(F().curve(G))}function be(){var st=q().curve(G),Wt=st.curve,tr=st.lineX0,or=st.lineX1,Nr=st.lineY0,hi=st.lineY1;return st.angle=st.x,delete st.x,st.startAngle=st.x0,delete st.x0,st.endAngle=st.x1,delete st.x1,st.radius=st.y,delete st.y,st.innerRadius=st.y0,delete st.y0,st.outerRadius=st.y1,delete st.y1,st.lineStartAngle=function(){return re(tr())},delete st.lineX0,st.lineEndAngle=function(){return re(or())},delete st.lineX1,st.lineInnerRadius=function(){return re(Nr())},delete st.lineY0,st.lineOuterRadius=function(){return re(hi())},delete st.lineY1,st.curve=function(Gi){return arguments.length?Wt(W(Gi)):Wt()._curve},st}function ze(st,Wt){return[(Wt=+Wt)*Math.cos(st-=Math.PI/2),Wt*Math.sin(st)]}var Ce=Array.prototype.slice;function he(st){return st.source}function te(st){return st.target}function ke(st){var Wt=he,tr=te,or=z,Nr=T,hi=null;function Gi(){var Qr,Ui=Ce.call(arguments),zn=Wt.apply(this,Ui),fn=tr.apply(this,Ui);if(hi||(hi=Qr=t.path()),st(hi,+or.apply(this,(Ui[0]=zn,Ui)),+Nr.apply(this,Ui),+or.apply(this,(Ui[0]=fn,Ui)),+Nr.apply(this,Ui)),Qr)return hi=null,Qr+""||null}return Gi.source=function(Qr){return arguments.length?(Wt=Qr,Gi):Wt},Gi.target=function(Qr){return arguments.length?(tr=Qr,Gi):tr},Gi.x=function(Qr){return arguments.length?(or=typeof Qr=="function"?Qr:r(+Qr),Gi):or},Gi.y=function(Qr){return arguments.length?(Nr=typeof Qr=="function"?Qr:r(+Qr),Gi):Nr},Gi.context=function(Qr){return arguments.length?(hi=Qr==null?null:Qr,Gi):hi},Gi}function Ee(st,Wt,tr,or,Nr){st.moveTo(Wt,tr),st.bezierCurveTo(Wt=(Wt+or)/2,tr,Wt,Nr,or,Nr)}function Me(st,Wt,tr,or,Nr){st.moveTo(Wt,tr),st.bezierCurveTo(Wt,tr=(tr+Nr)/2,or,tr,or,Nr)}function Oe(st,Wt,tr,or,Nr){var hi=ze(Wt,tr),Gi=ze(Wt,tr=(tr+Nr)/2),Qr=ze(or,tr),Ui=ze(or,Nr);st.moveTo(hi[0],hi[1]),st.bezierCurveTo(Gi[0],Gi[1],Qr[0],Qr[1],Ui[0],Ui[1])}function Re(){return ke(Ee)}function me(){return ke(Me)}function Be(){var st=ke(Oe);return st.angle=st.x,delete st.x,st.radius=st.y,delete st.y,st}var fe={draw:function(st,Wt){var tr=Math.sqrt(Wt/c);st.moveTo(tr,0),st.arc(0,0,tr,0,d)}},Ze={draw:function(st,Wt){var tr=Math.sqrt(Wt/5)/2;st.moveTo(-3*tr,-tr),st.lineTo(-tr,-tr),st.lineTo(-tr,-3*tr),st.lineTo(tr,-3*tr),st.lineTo(tr,-tr),st.lineTo(3*tr,-tr),st.lineTo(3*tr,tr),st.lineTo(tr,tr),st.lineTo(tr,3*tr),st.lineTo(-tr,3*tr),st.lineTo(-tr,tr),st.lineTo(-3*tr,tr),st.closePath()}},et=Math.sqrt(1/3),gt=et*2,Pt={draw:function(st,Wt){var tr=Math.sqrt(Wt/gt),or=tr*et;st.moveTo(0,-tr),st.lineTo(or,0),st.lineTo(0,tr),st.lineTo(-or,0),st.closePath()}},Qe=.8908130915292852,Xe=Math.sin(c/10)/Math.sin(7*c/10),Tt=Math.sin(d/10)*Xe,xt=-Math.cos(d/10)*Xe,_t={draw:function(st,Wt){var tr=Math.sqrt(Wt*Qe),or=Tt*tr,Nr=xt*tr;st.moveTo(0,-tr),st.lineTo(or,Nr);for(var hi=1;hi<5;++hi){var Gi=d*hi/5,Qr=Math.cos(Gi),Ui=Math.sin(Gi);st.lineTo(Ui*tr,-Qr*tr),st.lineTo(Qr*or-Ui*Nr,Ui*or+Qr*Nr)}st.closePath()}},Ct={draw:function(st,Wt){var tr=Math.sqrt(Wt),or=-tr/2;st.rect(or,or,tr,tr)}},jt=Math.sqrt(3),At={draw:function(st,Wt){var tr=-Math.sqrt(Wt/(jt*3));st.moveTo(0,tr*2),st.lineTo(-jt*tr,-tr),st.lineTo(jt*tr,-tr),st.closePath()}},Te=-.5,nt=Math.sqrt(3)/2,ut=1/Math.sqrt(12),ct=(ut/2+1)*3,rt={draw:function(st,Wt){var tr=Math.sqrt(Wt/ct),or=tr/2,Nr=tr*ut,hi=or,Gi=tr*ut+tr,Qr=-hi,Ui=Gi;st.moveTo(or,Nr),st.lineTo(hi,Gi),st.lineTo(Qr,Ui),st.lineTo(Te*or-nt*Nr,nt*or+Te*Nr),st.lineTo(Te*hi-nt*Gi,nt*hi+Te*Gi),st.lineTo(Te*Qr-nt*Ui,nt*Qr+Te*Ui),st.lineTo(Te*or+nt*Nr,Te*Nr-nt*or),st.lineTo(Te*hi+nt*Gi,Te*Gi-nt*hi),st.lineTo(Te*Qr+nt*Ui,Te*Ui-nt*Qr),st.closePath()}},je=[fe,Ze,Pt,Ct,_t,At,rt];function tt(){var st=r(fe),Wt=r(64),tr=null;function or(){var Nr;if(tr||(tr=Nr=t.path()),st.apply(this,arguments).draw(tr,+Wt.apply(this,arguments)),Nr)return tr=null,Nr+""||null}return or.type=function(Nr){return arguments.length?(st=typeof Nr=="function"?Nr:r(Nr),or):st},or.size=function(Nr){return arguments.length?(Wt=typeof Nr=="function"?Nr:r(+Nr),or):Wt},or.context=function(Nr){return arguments.length?(tr=Nr==null?null:Nr,or):tr},or}function Je(){}function Mt(st,Wt,tr){st._context.bezierCurveTo((2*st._x0+st._x1)/3,(2*st._y0+st._y1)/3,(st._x0+2*st._x1)/3,(st._y0+2*st._y1)/3,(st._x0+4*st._x1+Wt)/6,(st._y0+4*st._y1+tr)/6)}function Vt(st){this._context=st}Vt.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:Mt(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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);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:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function Kt(st){return new Vt(st)}function ir(st){this._context=st}ir.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._x2=st,this._y2=Wt;break;case 1:this._point=2,this._x3=st,this._y3=Wt;break;case 2:this._point=3,this._x4=st,this._y4=Wt,this._context.moveTo((this._x0+4*this._x1+st)/6,(this._y0+4*this._y1+Wt)/6);break;default:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function fr(st){return new ir(st)}function Ot(st){this._context=st}Ot.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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var tr=(this._x0+4*this._x1+st)/6,or=(this._y0+4*this._y1+Wt)/6;this._line?this._context.lineTo(tr,or):this._context.moveTo(tr,or);break;case 3:this._point=4;default:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function De(st){return new Ot(st)}function _e(st,Wt){this._basis=new Vt(st),this._beta=Wt}_e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var st=this._x,Wt=this._y,tr=st.length-1;if(tr>0)for(var or=st[0],Nr=Wt[0],hi=st[tr]-or,Gi=Wt[tr]-Nr,Qr=-1,Ui;++Qr<=tr;)Ui=Qr/tr,this._basis.point(this._beta*st[Qr]+(1-this._beta)*(or+Ui*hi),this._beta*Wt[Qr]+(1-this._beta)*(Nr+Ui*Gi));this._x=this._y=null,this._basis.lineEnd()},point:function(st,Wt){this._x.push(+st),this._y.push(+Wt)}};var Fe=function st(Wt){function tr(or){return Wt===1?new Vt(or):new _e(or,Wt)}return tr.beta=function(or){return st(+or)},tr}(.85);function Pe(st,Wt,tr){st._context.bezierCurveTo(st._x1+st._k*(st._x2-st._x0),st._y1+st._k*(st._y2-st._y0),st._x2+st._k*(st._x1-Wt),st._y2+st._k*(st._y1-tr),st._x2,st._y2)}function Ie(st,Wt){this._context=st,this._k=(1-Wt)/6}Ie.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:Pe(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2,this._x1=st,this._y1=Wt;break;case 2:this._point=3;default:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var lt=function st(Wt){function tr(or){return new Ie(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function ye(st,Wt){this._context=st,this._k=(1-Wt)/6}ye.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._x3=st,this._y3=Wt;break;case 1:this._point=2,this._context.moveTo(this._x4=st,this._y4=Wt);break;case 2:this._point=3,this._x5=st,this._y5=Wt;break;default:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var ue=function st(Wt){function tr(or){return new ye(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function de(st,Wt){this._context=st,this._k=(1-Wt)/6}de.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(st,Wt){switch(st=+st,Wt=+Wt,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:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var ht=function st(Wt){function tr(or){return new de(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function Et(st,Wt,tr){var or=st._x1,Nr=st._y1,hi=st._x2,Gi=st._y2;if(st._l01_a>f){var Qr=2*st._l01_2a+3*st._l01_a*st._l12_a+st._l12_2a,Ui=3*st._l01_a*(st._l01_a+st._l12_a);or=(or*Qr-st._x0*st._l12_2a+st._x2*st._l01_2a)/Ui,Nr=(Nr*Qr-st._y0*st._l12_2a+st._y2*st._l01_2a)/Ui}if(st._l23_a>f){var zn=2*st._l23_2a+3*st._l23_a*st._l12_a+st._l12_2a,fn=3*st._l23_a*(st._l23_a+st._l12_a);hi=(hi*zn+st._x1*st._l23_2a-Wt*st._l12_2a)/fn,Gi=(Gi*zn+st._y1*st._l23_2a-tr*st._l12_2a)/fn}st._context.bezierCurveTo(or,Nr,hi,Gi,st._x2,st._y2)}function St(st,Wt){this._context=st,this._alpha=Wt}St.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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;break;case 2:this._point=3;default:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Zt=function st(Wt){function tr(or){return Wt?new St(or,Wt):new Ie(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function qr(st,Wt){this._context=st,this._alpha=Wt}qr.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=st,this._y3=Wt;break;case 1:this._point=2,this._context.moveTo(this._x4=st,this._y4=Wt);break;case 2:this._point=3,this._x5=st,this._y5=Wt;break;default:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Lr=function st(Wt){function tr(or){return Wt?new qr(or,Wt):new ye(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function vr(st,Wt){this._context=st,this._alpha=Wt}vr.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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,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:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Er=function st(Wt){function tr(or){return Wt?new vr(or,Wt):new de(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function si(st){this._context=st}si.prototype={areaStart:Je,areaEnd:Je,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(st,Wt){st=+st,Wt=+Wt,this._point?this._context.lineTo(st,Wt):(this._point=1,this._context.moveTo(st,Wt))}};function Ei(st){return new si(st)}function Si(st){return st<0?-1:1}function xi(st,Wt,tr){var or=st._x1-st._x0,Nr=Wt-st._x1,hi=(st._y1-st._y0)/(or||Nr<0&&-0),Gi=(tr-st._y1)/(Nr||or<0&&-0),Qr=(hi*Nr+Gi*or)/(or+Nr);return(Si(hi)+Si(Gi))*Math.min(Math.abs(hi),Math.abs(Gi),.5*Math.abs(Qr))||0}function Hi(st,Wt){var tr=st._x1-st._x0;return tr?(3*(st._y1-st._y0)/tr-Wt)/2:Wt}function Jr(st,Wt,tr){var or=st._x0,Nr=st._y0,hi=st._x1,Gi=st._y1,Qr=(hi-or)/3;st._context.bezierCurveTo(or+Qr,Nr+Qr*Wt,hi-Qr,Gi-Qr*tr,hi,Gi)}function ci(st){this._context=st}ci.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:Jr(this,this._t0,Hi(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(st,Wt){var tr=NaN;if(st=+st,Wt=+Wt,!(st===this._x1&&Wt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;break;case 2:this._point=3,Jr(this,Hi(this,tr=xi(this,st,Wt)),tr);break;default:Jr(this,this._t0,tr=xi(this,st,Wt));break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt,this._t0=tr}}};function Di(st){this._context=new Lt(st)}(Di.prototype=Object.create(ci.prototype)).point=function(st,Wt){ci.prototype.point.call(this,Wt,st)};function Lt(st){this._context=st}Lt.prototype={moveTo:function(st,Wt){this._context.moveTo(Wt,st)},closePath:function(){this._context.closePath()},lineTo:function(st,Wt){this._context.lineTo(Wt,st)},bezierCurveTo:function(st,Wt,tr,or,Nr,hi){this._context.bezierCurveTo(Wt,st,or,tr,hi,Nr)}};function vt(st){return new ci(st)}function Dt(st){return new Di(st)}function Bt(st){this._context=st}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var st=this._x,Wt=this._y,tr=st.length;if(tr)if(this._line?this._context.lineTo(st[0],Wt[0]):this._context.moveTo(st[0],Wt[0]),tr===2)this._context.lineTo(st[1],Wt[1]);else for(var or=sr(st),Nr=sr(Wt),hi=0,Gi=1;Gi=0;--Wt)Nr[Wt]=(Gi[Wt]-Nr[Wt+1])/hi[Wt];for(hi[tr-1]=(st[tr]+Nr[tr-1])/2,Wt=0;Wt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Wt),this._context.lineTo(st,Wt);else{var tr=this._x*(1-this._t)+st*this._t;this._context.lineTo(tr,this._y),this._context.lineTo(tr,Wt)}break}}this._x=st,this._y=Wt}};function Tr(st){return new zr(st,.5)}function Rr(st){return new zr(st,0)}function Br(st){return new zr(st,1)}function oi(st,Wt){if((Gi=st.length)>1)for(var tr=1,or,Nr,hi=st[Wt[0]],Gi,Qr=hi.length;tr=0;)tr[Wt]=Wt;return tr}function Pi(st,Wt){return st[Wt]}function Yr(){var st=r([]),Wt=vi,tr=oi,or=Pi;function Nr(hi){var Gi=st.apply(this,arguments),Qr,Ui=hi.length,zn=Gi.length,fn=new Array(zn),xn;for(Qr=0;Qr0){for(var tr,or,Nr=0,hi=st[0].length,Gi;Nr0)for(var tr,or=0,Nr,hi,Gi,Qr,Ui,zn=st[Wt[0]].length;or0?(Nr[0]=Gi,Nr[1]=Gi+=hi):hi<0?(Nr[1]=Qr,Nr[0]=Qr+=hi):(Nr[0]=0,Nr[1]=hi)}function ti(st,Wt){if((Nr=st.length)>0){for(var tr=0,or=st[Wt[0]],Nr,hi=or.length;tr0)||!((hi=(Nr=st[Wt[0]]).length)>0))){for(var tr=0,or=1,Nr,hi,Gi;orhi&&(hi=Nr,tr=Wt);return tr}function zi(st){var Wt=st.map(Mi);return vi(st).sort(function(tr,or){return Wt[tr]-Wt[or]})}function Mi(st){for(var Wt=0,tr=-1,or=st.length,Nr;++tr{(function(e,t){typeof kq=="object"&&typeof rje!="undefined"?t(kq,JE(),wq(),NJ()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(kq,function(e,t,r,n){"use strict";function i(v){return v.target.depth}function a(v){return v.depth}function o(v,z){return z-1-v.height}function s(v,z){return v.sourceLinks.length?v.depth:z-1}function u(v){return v.targetLinks.length?v.depth:v.sourceLinks.length?t.min(v.sourceLinks,i)-1:0}function l(v){return function(){return v}}function f(v,z){return h(v.source,z.source)||v.index-z.index}function c(v,z){return h(v.target,z.target)||v.index-z.index}function h(v,z){return v.y0-z.y0}function d(v){return v.value}function p(v){return(v.y0+v.y1)/2}function x(v){return p(v.source)*v.value}function b(v){return p(v.target)*v.value}function y(v){return v.index}function E(v){return v.nodes}function k(v){return v.links}function A(v,z){var T=v.get(z);if(!T)throw new Error("missing: "+z);return T}var L=function(){var v=0,z=0,T=1,F=1,q=24,U=8,H=y,j=s,G=E,O=k,W=32,re=2/3;function ne(){var ke={nodes:G.apply(null,arguments),links:O.apply(null,arguments)};return be(ke),ze(ke),Ce(ke),he(ke,W),te(ke),ke}ne.update=function(ke){return te(ke),ke},ne.nodeId=function(ke){return arguments.length?(H=typeof ke=="function"?ke:l(ke),ne):H},ne.nodeAlign=function(ke){return arguments.length?(j=typeof ke=="function"?ke:l(ke),ne):j},ne.nodeWidth=function(ke){return arguments.length?(q=+ke,ne):q},ne.nodePadding=function(ke){return arguments.length?(U=+ke,ne):U},ne.nodes=function(ke){return arguments.length?(G=typeof ke=="function"?ke:l(ke),ne):G},ne.links=function(ke){return arguments.length?(O=typeof ke=="function"?ke:l(ke),ne):O},ne.size=function(ke){return arguments.length?(v=z=0,T=+ke[0],F=+ke[1],ne):[T-v,F-z]},ne.extent=function(ke){return arguments.length?(v=+ke[0][0],T=+ke[1][0],z=+ke[0][1],F=+ke[1][1],ne):[[v,z],[T,F]]},ne.iterations=function(ke){return arguments.length?(W=+ke,ne):W};function be(ke){ke.nodes.forEach(function(Me,Oe){Me.index=Oe,Me.sourceLinks=[],Me.targetLinks=[]});var Ee=r.map(ke.nodes,H);ke.links.forEach(function(Me,Oe){Me.index=Oe;var Re=Me.source,me=Me.target;typeof Re!="object"&&(Re=Me.source=A(Ee,Re)),typeof me!="object"&&(me=Me.target=A(Ee,me)),Re.sourceLinks.push(Me),me.targetLinks.push(Me)})}function ze(ke){ke.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Ce(ke){var Ee,Me,Oe;for(Ee=ke.nodes,Me=[],Oe=0;Ee.length;++Oe,Ee=Me,Me=[])Ee.forEach(function(me){me.depth=Oe,me.sourceLinks.forEach(function(Be){Me.indexOf(Be.target)<0&&Me.push(Be.target)})});for(Ee=ke.nodes,Me=[],Oe=0;Ee.length;++Oe,Ee=Me,Me=[])Ee.forEach(function(me){me.height=Oe,me.targetLinks.forEach(function(Be){Me.indexOf(Be.source)<0&&Me.push(Be.source)})});var Re=(T-v-q)/(Oe-1);ke.nodes.forEach(function(me){me.x1=(me.x0=v+Math.max(0,Math.min(Oe-1,Math.floor(j.call(null,me,Oe))))*Re)+q})}function he(ke){var Ee=r.nest().key(function(Ze){return Ze.x0}).sortKeys(t.ascending).entries(ke.nodes).map(function(Ze){return Ze.values});Re(),fe();for(var Me=1,Oe=W;Oe>0;--Oe)Be(Me*=.99),fe(),me(Me),fe();function Re(){var Ze=t.max(Ee,function(Pt){return Pt.length}),et=re*(F-z)/(Ze-1);U>et&&(U=et);var gt=t.min(Ee,function(Pt){return(F-z-(Pt.length-1)*U)/t.sum(Pt,d)});Ee.forEach(function(Pt){Pt.forEach(function(Qe,Xe){Qe.y1=(Qe.y0=Xe)+Qe.value*gt})}),ke.links.forEach(function(Pt){Pt.width=Pt.value*gt})}function me(Ze){Ee.forEach(function(et){et.forEach(function(gt){if(gt.targetLinks.length){var Pt=(t.sum(gt.targetLinks,x)/t.sum(gt.targetLinks,d)-p(gt))*Ze;gt.y0+=Pt,gt.y1+=Pt}})})}function Be(Ze){Ee.slice().reverse().forEach(function(et){et.forEach(function(gt){if(gt.sourceLinks.length){var Pt=(t.sum(gt.sourceLinks,b)/t.sum(gt.sourceLinks,d)-p(gt))*Ze;gt.y0+=Pt,gt.y1+=Pt}})})}function fe(){Ee.forEach(function(Ze){var et,gt,Pt=z,Qe=Ze.length,Xe;for(Ze.sort(h),Xe=0;Xe0&&(et.y0+=gt,et.y1+=gt),Pt=et.y1+U;if(gt=Pt-U-F,gt>0)for(Pt=et.y0-=gt,et.y1-=gt,Xe=Qe-2;Xe>=0;--Xe)et=Ze[Xe],gt=et.y1+U-Pt,gt>0&&(et.y0-=gt,et.y1-=gt),Pt=et.y0})}}function te(ke){ke.nodes.forEach(function(Ee){Ee.sourceLinks.sort(c),Ee.targetLinks.sort(f)}),ke.nodes.forEach(function(Ee){var Me=Ee.y0,Oe=Me;Ee.sourceLinks.forEach(function(Re){Re.y0=Me+Re.width/2,Me+=Re.width}),Ee.targetLinks.forEach(function(Re){Re.y1=Oe+Re.width/2,Oe+=Re.width})})}return ne};function _(v){return[v.source.x1,v.y0]}function C(v){return[v.target.x0,v.y1]}var M=function(){return n.linkHorizontal().source(_).target(C)};e.sankey=L,e.sankeyCenter=u,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,"__esModule",{value:!0})})});var aje=Se((Zxr,nje)=>{var CZt=OJ();nje.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],u;function l(k){a[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(A){delete o[k][A],a[A]&&l(A)})}function f(k){var A=!1;i.push(k),a[k]=!0;var L,_;for(L=0;L=k})}function d(k){h(k);for(var A=t,L=CZt(A),_=L.components.filter(function(q){return q.length>1}),C=1/0,M,v=0;v<_.length;v++)for(var z=0;z<_[v].length;z++)_[v][z]{(function(e,t){typeof Cq=="object"&&typeof oje!="undefined"?t(Cq,JE(),wq(),NJ(),aje()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape","elementary-circuits-directed-graph"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(Cq,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(Qe){return Qe.target.depth}function o(Qe){return Qe.depth}function s(Qe,Xe){return Xe-1-Qe.height}function u(Qe,Xe){return Qe.sourceLinks.length?Qe.depth:Xe-1}function l(Qe){return Qe.targetLinks.length?Qe.depth:Qe.sourceLinks.length?t.min(Qe.sourceLinks,a)-1:0}function f(Qe){return function(){return Qe}}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe};function h(Qe,Xe){return p(Qe.source,Xe.source)||Qe.index-Xe.index}function d(Qe,Xe){return p(Qe.target,Xe.target)||Qe.index-Xe.index}function p(Qe,Xe){return Qe.partOfCycle===Xe.partOfCycle?Qe.y0-Xe.y0:Qe.circularLinkType==="top"||Xe.circularLinkType==="bottom"?-1:1}function x(Qe){return Qe.value}function b(Qe){return(Qe.y0+Qe.y1)/2}function y(Qe){return b(Qe.source)}function E(Qe){return b(Qe.target)}function k(Qe){return Qe.index}function A(Qe){return Qe.nodes}function L(Qe){return Qe.links}function _(Qe,Xe){var Tt=Qe.get(Xe);if(!Tt)throw new Error("missing: "+Xe);return Tt}function C(Qe,Xe){return Xe(Qe)}var M=25,v=10,z=.3;function T(){var Qe=0,Xe=0,Tt=1,xt=1,_t=24,Ct,jt=k,At=u,Te=A,nt=L,ut=32,ct=2,rt,je=null;function tt(){var De={nodes:Te.apply(null,arguments),links:nt.apply(null,arguments)};Je(De),F(De,jt,je),Mt(De),ir(De),q(De,jt),fr(De,ut,jt),Ot(De);for(var _e=4,Fe=0;Fe<_e;Fe++)Be(De,xt,jt),fe(De,xt,jt),Oe(De,Xe,xt,jt),Be(De,xt,jt),fe(De,xt,jt);return Pt(De,Xe,xt),W(De,ct,xt,jt),De}tt.nodeId=function(De){return arguments.length?(jt=typeof De=="function"?De:f(De),tt):jt},tt.nodeAlign=function(De){return arguments.length?(At=typeof De=="function"?De:f(De),tt):At},tt.nodeWidth=function(De){return arguments.length?(_t=+De,tt):_t},tt.nodePadding=function(De){return arguments.length?(Ct=+De,tt):Ct},tt.nodes=function(De){return arguments.length?(Te=typeof De=="function"?De:f(De),tt):Te},tt.links=function(De){return arguments.length?(nt=typeof De=="function"?De:f(De),tt):nt},tt.size=function(De){return arguments.length?(Qe=Xe=0,Tt=+De[0],xt=+De[1],tt):[Tt-Qe,xt-Xe]},tt.extent=function(De){return arguments.length?(Qe=+De[0][0],Tt=+De[1][0],Xe=+De[0][1],xt=+De[1][1],tt):[[Qe,Xe],[Tt,xt]]},tt.iterations=function(De){return arguments.length?(ut=+De,tt):ut},tt.circularLinkGap=function(De){return arguments.length?(ct=+De,tt):ct},tt.nodePaddingRatio=function(De){return arguments.length?(rt=+De,tt):rt},tt.sortNodes=function(De){return arguments.length?(je=De,tt):je},tt.update=function(De){return q(De,jt),Ot(De),De.links.forEach(function(_e){_e.circular&&(_e.circularLinkType=_e.y0+_e.y10?_e+M+v:_e,Fe=Fe>0?Fe+M+v:Fe,Pe=Pe>0?Pe+M+v:Pe,Ie=Ie>0?Ie+M+v:Ie,{top:_e,bottom:Fe,left:Ie,right:Pe}}function Kt(De,_e){var Fe=t.max(De.nodes,function(ht){return ht.column}),Pe=Tt-Qe,Ie=xt-Xe,lt=Pe+_e.right+_e.left,ye=Ie+_e.top+_e.bottom,ue=Pe/lt,de=Ie/ye;return Qe=Qe*ue+_e.left,Tt=_e.right==0?Tt:Tt*ue,Xe=Xe*de+_e.top,xt=xt*de,De.nodes.forEach(function(ht){ht.x0=Qe+ht.column*((Tt-Qe-_t)/Fe),ht.x1=ht.x0+_t}),de}function ir(De){var _e,Fe,Pe;for(_e=De.nodes,Fe=[],Pe=0;_e.length;++Pe,_e=Fe,Fe=[])_e.forEach(function(Ie){Ie.depth=Pe,Ie.sourceLinks.forEach(function(lt){Fe.indexOf(lt.target)<0&&!lt.circular&&Fe.push(lt.target)})});for(_e=De.nodes,Fe=[],Pe=0;_e.length;++Pe,_e=Fe,Fe=[])_e.forEach(function(Ie){Ie.height=Pe,Ie.targetLinks.forEach(function(lt){Fe.indexOf(lt.source)<0&&!lt.circular&&Fe.push(lt.source)})});De.nodes.forEach(function(Ie){Ie.column=Math.floor(At.call(null,Ie,Pe))})}function fr(De,_e,Fe){var Pe=r.nest().key(function(ht){return ht.column}).sortKeys(t.ascending).entries(De.nodes).map(function(ht){return ht.values});ye(Fe),de();for(var Ie=1,lt=_e;lt>0;--lt)ue(Ie*=.99,Fe),de();function ye(ht){if(rt){var Et=1/0;Pe.forEach(function(Lr){var vr=xt*rt/(Lr.length+1);Et=vr0))if(Lr==0&&qr==1)Er=vr.y1-vr.y0,vr.y0=xt/2-Er/2,vr.y1=xt/2+Er/2;else if(Lr==St-1&&qr==1)Er=vr.y1-vr.y0,vr.y0=xt/2-Er/2,vr.y1=xt/2+Er/2;else{var si=0,Ei=t.mean(vr.sourceLinks,E),Si=t.mean(vr.targetLinks,y);Ei&&Si?si=(Ei+Si)/2:si=Ei||Si;var xi=(si-b(vr))*ht;vr.y0+=xi,vr.y1+=xi}})})}function de(){Pe.forEach(function(ht){var Et,St,Zt=Xe,qr=ht.length,Lr;for(ht.sort(p),Lr=0;Lr0&&(Et.y0+=St,Et.y1+=St),Zt=Et.y1+Ct;if(St=Zt-Ct-xt,St>0)for(Zt=Et.y0-=St,Et.y1-=St,Lr=qr-2;Lr>=0;--Lr)Et=ht[Lr],St=Et.y1+Ct-Zt,St>0&&(Et.y0-=St,Et.y1-=St),Zt=Et.y0})}}function Ot(De){De.nodes.forEach(function(_e){_e.sourceLinks.sort(d),_e.targetLinks.sort(h)}),De.nodes.forEach(function(_e){var Fe=_e.y0,Pe=Fe,Ie=_e.y1,lt=Ie;_e.sourceLinks.forEach(function(ye){ye.circular?(ye.y0=Ie-ye.width/2,Ie=Ie-ye.width):(ye.y0=Fe+ye.width/2,Fe+=ye.width)}),_e.targetLinks.forEach(function(ye){ye.circular?(ye.y1=lt-ye.width/2,lt=lt-ye.width):(ye.y1=Pe+ye.width/2,Pe+=ye.width)})})}return tt}function F(Qe,Xe,Tt){var xt=0;if(Tt===null){for(var _t=[],Ct=0;CtXe.source.column)}function j(Qe,Xe){var Tt=0;Qe.sourceLinks.forEach(function(_t){Tt=_t.circular&&!gt(_t,Xe)?Tt+1:Tt});var xt=0;return Qe.targetLinks.forEach(function(_t){xt=_t.circular&&!gt(_t,Xe)?xt+1:xt}),Tt+xt}function G(Qe){var Xe=Qe.source.sourceLinks,Tt=0;Xe.forEach(function(Ct){Tt=Ct.circular?Tt+1:Tt});var xt=Qe.target.targetLinks,_t=0;return xt.forEach(function(Ct){_t=Ct.circular?_t+1:_t}),!(Tt>1||_t>1)}function O(Qe,Xe,Tt){return Qe.sort(ne),Qe.forEach(function(xt,_t){var Ct=0;if(gt(xt,Tt)&&G(xt))xt.circularPathData.verticalBuffer=Ct+xt.width/2;else{var jt=0;for(jt;jt<_t;jt++)if(H(Qe[_t],Qe[jt])){var At=Qe[jt].circularPathData.verticalBuffer+Qe[jt].width/2+Xe;Ct=At>Ct?At:Ct}xt.circularPathData.verticalBuffer=Ct+xt.width/2}}),Qe}function W(Qe,Xe,Tt,xt){var _t=5,Ct=t.min(Qe.links,function(Te){return Te.source.y0});Qe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var jt=Qe.links.filter(function(Te){return Te.circularLinkType=="top"});O(jt,Xe,xt);var At=Qe.links.filter(function(Te){return Te.circularLinkType=="bottom"});O(At,Xe,xt),Qe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+v,Te.circularPathData.leftNodeBuffer=_t,Te.circularPathData.rightNodeBuffer=_t,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,gt(Te,xt)&&G(Te))Te.circularPathData.leftSmallArcRadius=v+Te.width/2,Te.circularPathData.leftLargeArcRadius=v+Te.width/2,Te.circularPathData.rightSmallArcRadius=v+Te.width/2,Te.circularPathData.rightLargeArcRadius=v+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+M+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-M-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var nt=Te.source.column,ut=Te.circularLinkType,ct=Qe.links.filter(function(tt){return tt.source.column==nt&&tt.circularLinkType==ut});Te.circularLinkType=="bottom"?ct.sort(ze):ct.sort(be);var rt=0;ct.forEach(function(tt,Je){tt.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=v+Te.width/2+rt,Te.circularPathData.leftLargeArcRadius=v+Te.width/2+Je*Xe+rt),rt=rt+tt.width}),nt=Te.target.column,ct=Qe.links.filter(function(tt){return tt.target.column==nt&&tt.circularLinkType==ut}),Te.circularLinkType=="bottom"?ct.sort(he):ct.sort(Ce),rt=0,ct.forEach(function(tt,Je){tt.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=v+Te.width/2+rt,Te.circularPathData.rightLargeArcRadius=v+Te.width/2+Je*Xe+rt),rt=rt+tt.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(Tt,Te.source.y1,Te.target.y1)+M+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Ct-M-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=re(Te);else{var je=n.linkHorizontal().source(function(tt){var Je=tt.source.x0+(tt.source.x1-tt.source.x0),Mt=tt.y0;return[Je,Mt]}).target(function(tt){var Je=tt.target.x0,Mt=tt.y1;return[Je,Mt]});Te.path=je(Te)}})}function re(Qe){var Xe="";return Qe.circularLinkType=="top"?Xe="M"+Qe.circularPathData.sourceX+" "+Qe.circularPathData.sourceY+" L"+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.sourceY+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Qe.circularPathData.leftFullExtent+" "+(Qe.circularPathData.sourceY-Qe.circularPathData.leftSmallArcRadius)+" L"+Qe.circularPathData.leftFullExtent+" "+Qe.circularPathData.verticalLeftInnerExtent+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" L"+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Qe.circularPathData.rightFullExtent+" "+Qe.circularPathData.verticalRightInnerExtent+" L"+Qe.circularPathData.rightFullExtent+" "+(Qe.circularPathData.targetY-Qe.circularPathData.rightSmallArcRadius)+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.targetY+" L"+Qe.circularPathData.targetX+" "+Qe.circularPathData.targetY:Xe="M"+Qe.circularPathData.sourceX+" "+Qe.circularPathData.sourceY+" L"+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.sourceY+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Qe.circularPathData.leftFullExtent+" "+(Qe.circularPathData.sourceY+Qe.circularPathData.leftSmallArcRadius)+" L"+Qe.circularPathData.leftFullExtent+" "+Qe.circularPathData.verticalLeftInnerExtent+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" L"+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Qe.circularPathData.rightFullExtent+" "+Qe.circularPathData.verticalRightInnerExtent+" L"+Qe.circularPathData.rightFullExtent+" "+(Qe.circularPathData.targetY+Qe.circularPathData.rightSmallArcRadius)+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.targetY+" L"+Qe.circularPathData.targetX+" "+Qe.circularPathData.targetY,Xe}function ne(Qe,Xe){return te(Qe)==te(Xe)?Qe.circularLinkType=="bottom"?ze(Qe,Xe):be(Qe,Xe):te(Xe)-te(Qe)}function be(Qe,Xe){return Qe.y0-Xe.y0}function ze(Qe,Xe){return Xe.y0-Qe.y0}function Ce(Qe,Xe){return Qe.y1-Xe.y1}function he(Qe,Xe){return Xe.y1-Qe.y1}function te(Qe){return Qe.target.column-Qe.source.column}function ke(Qe){return Qe.target.x0-Qe.source.x1}function Ee(Qe,Xe){var Tt=U(Qe),xt=ke(Xe)/Math.tan(Tt),_t=et(Qe)=="up"?Qe.y1+xt:Qe.y1-xt;return _t}function Me(Qe,Xe){var Tt=U(Qe),xt=ke(Xe)/Math.tan(Tt),_t=et(Qe)=="up"?Qe.y1-xt:Qe.y1+xt;return _t}function Oe(Qe,Xe,Tt,xt){Qe.links.forEach(function(_t){if(!_t.circular&&_t.target.column-_t.source.column>1){var Ct=_t.source.column+1,jt=_t.target.column-1,At=1,Te=jt-Ct+1;for(At=1;Ct<=jt;Ct++,At++)Qe.nodes.forEach(function(nt){if(nt.column==Ct){var ut=At/(Te+1),ct=Math.pow(1-ut,3),rt=3*ut*Math.pow(1-ut,2),je=3*Math.pow(ut,2)*(1-ut),tt=Math.pow(ut,3),Je=ct*_t.y0+rt*_t.y0+je*_t.y1+tt*_t.y1,Mt=Je-_t.width/2,Vt=Je+_t.width/2,Kt;Mt>nt.y0&&Mtnt.y0&&Vtnt.y1&&me(ir,Kt,Xe,Tt)})):Mtnt.y1&&(Kt=Vt-nt.y0+10,nt=me(nt,Kt,Xe,Tt),Qe.nodes.forEach(function(ir){C(ir,xt)==C(nt,xt)||ir.column!=nt.column||ir.y0nt.y1&&me(ir,Kt,Xe,Tt)}))}})}})}function Re(Qe,Xe){return Qe.y0>Xe.y0&&Qe.y0Xe.y0&&Qe.y1Xe.y1}function me(Qe,Xe,Tt,xt){return Qe.y0+Xe>=Tt&&Qe.y1+Xe<=xt&&(Qe.y0=Qe.y0+Xe,Qe.y1=Qe.y1+Xe,Qe.targetLinks.forEach(function(_t){_t.y1=_t.y1+Xe}),Qe.sourceLinks.forEach(function(_t){_t.y0=_t.y0+Xe})),Qe}function Be(Qe,Xe,Tt,xt){Qe.nodes.forEach(function(_t){xt&&_t.y+(_t.y1-_t.y0)>Xe&&(_t.y=_t.y-(_t.y+(_t.y1-_t.y0)-Xe));var Ct=Qe.links.filter(function(Te){return C(Te.source,Tt)==C(_t,Tt)}),jt=Ct.length;jt>1&&Ct.sort(function(Te,nt){if(!Te.circular&&!nt.circular){if(Te.target.column==nt.target.column)return Te.y1-nt.y1;if(Ze(Te,nt)){if(Te.target.column>nt.target.column){var ut=Me(nt,Te);return Te.y1-ut}if(nt.target.column>Te.target.column){var ct=Me(Te,nt);return ct-nt.y1}}else return Te.y1-nt.y1}if(Te.circular&&!nt.circular)return Te.circularLinkType=="top"?-1:1;if(nt.circular&&!Te.circular)return nt.circularLinkType=="top"?1:-1;if(Te.circular&&nt.circular)return Te.circularLinkType===nt.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===nt.target.column?Te.target.y1-nt.target.y1:nt.target.column-Te.target.column:Te.circularLinkType===nt.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===nt.target.column?nt.target.y1-Te.target.y1:Te.target.column-nt.target.column:Te.circularLinkType=="top"?-1:1});var At=_t.y0;Ct.forEach(function(Te){Te.y0=At+Te.width/2,At=At+Te.width}),Ct.forEach(function(Te,nt){if(Te.circularLinkType=="bottom"){var ut=nt+1,ct=0;for(ut;ut1&&_t.sort(function(At,Te){if(!At.circular&&!Te.circular){if(At.source.column==Te.source.column)return At.y0-Te.y0;if(Ze(At,Te)){if(Te.source.column0?"up":"down"}function gt(Qe,Xe){return C(Qe.source,Xe)==C(Qe.target,Xe)}function Pt(Qe,Xe,Tt){var xt=Qe.nodes,_t=Qe.links,Ct=!1,jt=!1;if(_t.forEach(function(rt){rt.circularLinkType=="top"?Ct=!0:rt.circularLinkType=="bottom"&&(jt=!0)}),Ct==!1||jt==!1){var At=t.min(xt,function(rt){return rt.y0}),Te=t.max(xt,function(rt){return rt.y1}),nt=Te-At,ut=Tt-Xe,ct=ut/nt;xt.forEach(function(rt){var je=(rt.y1-rt.y0)*ct;rt.y0=(rt.y0-At)*ct,rt.y1=rt.y0+je}),_t.forEach(function(rt){rt.y0=(rt.y0-At)*ct,rt.y1=(rt.y1-At)*ct,rt.width=rt.width*ct})}}e.sankeyCircular=T,e.sankeyCenter=l,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=u,Object.defineProperty(e,"__esModule",{value:!0})})});var UJ=Se((Xxr,lje)=>{"use strict";lje.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 bje=Se((Yxr,xje)=>{"use strict";var uje=$We(),LZt=(I2(),ab(P2)).interpolateNumber,LS=Nl(),Vk=ije(),zZt=sje(),nc=UJ(),zS=cd(),aw=Pl(),PZt=yu(),v1=Zr(),GJ=v1.strTranslate,IZt=v1.strRotate,WJ=Km(),Hk=WJ.keyFun,Lq=WJ.repeat,vje=WJ.unwrap,fje=Bf(),DZt=Ul(),yje=Qh(),RZt=yje.CAP_SHIFT,FZt=yje.LINE_SPACING,qZt=3;function BZt(e,t,r){var n=vje(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,u=i.node.thickness,l={justify:Vk.sankeyJustify,left:Vk.sankeyLeft,right:Vk.sankeyRight,center:Vk.sankeyCenter}[i.node.align],f=e.width*(a.x[1]-a.x[0]),c=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,p=n.circular,x;p?x=zZt.sankeyCircular().circularLinkGap(0):x=Vk.sankey(),x.iterations(nc.sankeyIterations).size(o?[f,c]:[c,f]).nodeWidth(u).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(l).nodes(h).links(d);var b=x();x.nodePadding()=O||(G=O-j.y0,G>1e-6&&(j.y0+=G,j.y1+=G)),O=j.y1+s})}function z(U){var H=U.map(function(be,ze){return{x0:be.x0,index:ze}}).sort(function(be,ze){return be.x0-ze.x0}),j=[],G=-1,O,W=-1/0,re;for(y=0;yW+u&&(G+=1,O=ne.x0),W=ne.x0,j[G]||(j[G]=[]),j[G].push(ne),re=O-ne.x0,ne.x0+=re,ne.x1+=re}return j}if(i.node.x.length&&i.node.y.length){for(y=0;y0?"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"+(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+"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"+(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+"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 NZt(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=LZt(a,o),u=s(e),l=s(1-e),f=r.link.y0-r.link.width/2,c=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,p="M"+a+","+f,x="C"+u+","+f+" "+l+","+h+" "+o+","+h,b="C"+l+","+d+" "+u+","+c+" "+a+","+c,y=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return y+="L"+o+","+d,p+x+y+b+"Z"}return t}function UZt(e,t){var r=zS(t.color),n=nc.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=v1.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:aw.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 HJ(e){e.attr("transform",function(t){return GJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function VZt(e){e.call(HJ)}function mje(e,t){e.call(VZt),t.attr("d",jJ())}function cje(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function VJ(e){return e.link.width>1||e.linkLineWidth>0}function hje(e){var t=GJ(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function dje(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 HZt(e,t,r,n){var i=LS.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"&&(v1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),v1.raiseToTop(this),a.interactionState.dragInProgress=a.node,pje(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):GZt(e,o,a,n),WZt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=LS.event.x,s=LS.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),pje(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),mje(e.filter(_je(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var u=r.node.originalX;r.node.x0=u-r.visibleWidth/2,r.node.x1=u+r.visibleWidth/2,gje(r,i)}})}function jZt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function gje(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zp=Nl(),XJ=Zr(),zq=XJ.numberFormat,KZt=bje(),PS=jc(),JZt=Pl(),Ax=UJ().cn,Gk=XJ._;function wje(e){return e!==""}function IS(e,t){return e.filter(function(r){return r.key===t.traceId})}function Tje(e,t){Zp.select(e).select("path").style("fill-opacity",t),Zp.select(e).select("rect").style("fill-opacity",t)}function Aje(e){Zp.select(e).select("text.name").style("fill","black")}function Sje(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Mje(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Eje(e,t,r){t&&r&&IS(r,t).selectAll("."+Ax.sankeyLink).filter(Sje(t)).call(kje.bind(0,t,r,!1))}function ZJ(e,t,r){t&&r&&IS(r,t).selectAll("."+Ax.sankeyLink).filter(Sje(t)).call(Cje.bind(0,t,r,!1))}function kje(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!==""&&IS(t,e).selectAll("."+Ax.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&&IS(t,e).selectAll("."+Ax.sankeyNode).filter(Mje(e)).call(Eje)}function Cje(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!==""&&IS(t,e).selectAll("."+Ax.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&&IS(t,e).selectAll(Ax.sankeyNode).filter(Mje(e)).call(ZJ)}function th(e,t){var r=e.hoverlabel||{},n=XJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}Lje.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:th(C,"bgcolor")||JZt.addOpacity(F.color,1),borderColor:th(C,"bordercolor"),fontFamily:th(C,"font.family"),fontSize:th(C,"font.size"),fontColor:th(C,"font.color"),fontWeight:th(C,"font.weight"),fontStyle:th(C,"font.style"),fontVariant:th(C,"font.variant"),fontTextcase:th(C,"font.textcase"),fontLineposition:th(C,"font.lineposition"),fontShadow:th(C,"font.shadow"),nameLength:th(C,"namelength"),textAlign:th(C,"align"),idealAlign:Zp.event.x"),color:th(C,"bgcolor")||_.tinyColorHue,borderColor:th(C,"bordercolor"),fontFamily:th(C,"font.family"),fontSize:th(C,"font.size"),fontColor:th(C,"font.color"),fontWeight:th(C,"font.weight"),fontStyle:th(C,"font.style"),fontVariant:th(C,"font.variant"),fontTextcase:th(C,"font.textcase"),fontLineposition:th(C,"font.lineposition"),fontShadow:th(C,"font.shadow"),nameLength:th(C,"namelength"),textAlign:th(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[_.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});Tje(G,.85),Aje(G)}}},A=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zp.select(L).call(ZJ,_,C),_.node.trace.node.hoverinfo!=="skip"&&(_.node.fullData=_.node.trace,t.emit("plotly_unhover",{event:Zp.event,points:[_.node]})),PS.loneUnhover(n._hoverlayer.node()))};KZt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:l,follow:x,unhover:b,select:u},nodeEvents:{hover:E,follow:k,unhover:A,select:y}})}});var zje=Se(ow=>{"use strict";var $Zt=_c().overrideAll,QZt=Dd().getModuleCalcData,eXt=YJ(),tXt=O1(),rXt=Ty(),iXt=gp(),nXt=nh().prepSelect,KJ=Zr(),aXt=Ul(),Pq="sankey";ow.name=Pq;ow.baseLayoutAttrOverrides=$Zt({hoverlabel:tXt.hoverlabel},"plot","nested");ow.plot=function(e){var t=QZt(e.calcdata,Pq)[0];eXt(e,t),ow.updateFx(e)};ow.clean=function(e,t,r,n){var i=n._has&&n._has(Pq),a=t._has&&t._has(Pq);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};ow.updateFx=function(e){for(var t=0;t{"use strict";Pje.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";Dje.exports={attributes:BJ(),supplyDefaults:BWe(),calc:HWe(),plot:YJ(),moduleType:"trace",name:"sankey",basePlotModule:zje(),selectPoints:Ije(),categories:["noOpacity"],meta:{}}});var qje=Se((ebr,Fje)=>{"use strict";Fje.exports=Rje()});var Oje=Se(DS=>{"use strict";var Bje=Sc();DS.name="indicator";DS.plot=function(e,t,r,n){Bje.plotBasePlot(DS.name,e,t,r,n)};DS.clean=function(e,t,r,n){Bje.cleanBasePlot(DS.name,e,t,r,n)}});var $J=Se((rbr,Wje)=>{"use strict";var Sx=vu().extendFlat,Uje=vu().extendDeep,sXt=_c().overrideAll,Vje=uc(),Hje=Ih(),lXt=Ec().attributes,sh=Rd(),uXt=_f().templatedArray,Iq=HT(),Nje=Gc().descriptionOnlyNumbers,JJ=Vje({editType:"plot",colorEditType:"plot"}),Wk={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:Hje.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"},Gje={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},fXt=uXt("step",Uje({},Wk,{range:Gje}));Wje.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:lXt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Sx({},JJ,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:Nje("value")},font:Sx({},JJ,{}),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:Nje("value")},increasing:{symbol:{valType:"string",dflt:Iq.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:Iq.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:Iq.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:Iq.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Sx({},JJ,{}),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:Uje({},Wk,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Hje.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:sXt({range:Gje,visible:Sx({},sh.visible,{dflt:!0}),tickmode:sh.minor.tickmode,nticks:sh.nticks,tick0:sh.tick0,dtick:sh.dtick,tickvals:sh.tickvals,ticktext:sh.ticktext,ticks:Sx({},sh.ticks,{dflt:"outside"}),ticklen:sh.ticklen,tickwidth:sh.tickwidth,tickcolor:sh.tickcolor,ticklabelstep:sh.ticklabelstep,showticklabels:sh.showticklabels,labelalias:sh.labelalias,tickfont:Vje({}),tickangle:sh.tickangle,tickformat:sh.tickformat,tickformatstops:sh.tickformatstops,tickprefix:sh.tickprefix,showtickprefix:sh.showtickprefix,ticksuffix:sh.ticksuffix,showticksuffix:sh.showticksuffix,separatethousands:sh.separatethousands,exponentformat:sh.exponentformat,minexponent:sh.minexponent,showexponent:sh.showexponent,editType:"plot"},"plot"),steps:fXt,threshold:{line:{color:Sx({},Wk.line.color,{}),width:Sx({},Wk.line.width,{dflt:1}),editType:"plot"},thickness:Sx({},Wk.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var QJ=Se((ibr,jje)=>{"use strict";jje.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var Yje=Se((nbr,Xje)=>{"use strict";var eg=Zr(),Rq=$J(),cXt=Ec().defaults,Zje=_f(),hXt=Jd(),Dq=QJ(),dXt=xb(),pXt=T3(),vXt=e_(),yXt=t_();function mXt(e,t,r,n){function i(_,C){return eg.coerce(e,t,Rq,_,C)}cXt(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 u=eg.extendFlat({},n.font);u.size=void 0,eg.coerceFont(i,"number.font",u),t.number.font.size===void 0&&(t.number.font.size=Dq.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var l;if(t._hasDelta){var f=eg.extendFlat({},n.font);f.size=void 0,eg.coerceFont(i,"delta.font",f),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||Dq.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"),l=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var c=eg.extendFlat({},n.font);c.size=.25*(s||l||Dq.defaultNumberFontSize),eg.coerceFont(i,"title.font",c),i("title.text");var h,d,p,x;function b(_,C){return eg.coerce(h,d,Rq.gauge,_,C)}function y(_,C){return eg.coerce(p,x,Rq.gauge.axis,_,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=Zje.newContainer(t,"gauge"),b("shape");var E=t._isBullet=t.gauge.shape==="bullet";E||i("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var A=Dq.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",A),hXt(h,d,{name:"steps",handleItemDefaults:gXt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),p={},h&&(p=h.axis||{}),x=Zje.newContainer(d,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};dXt(p,x,y,"linear"),yXt(p,x,y,"linear",L),vXt(p,x,y,"linear",L),pXt(p,x,y,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function gXt(e,t){function r(n,i){return eg.coerce(e,t,Rq.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}Xje.exports={supplyDefaults:mXt}});var Jje=Se((abr,Kje)=>{"use strict";function _Xt(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}Kje.exports={calc:_Xt}});var iZe=Se((obr,rZe)=>{"use strict";var cw=Nl(),xXt=(I2(),ab(P2)).interpolate,$je=(I2(),ab(P2)).interpolateNumber,Mx=Zr(),bXt=Mx.strScale,Zk=Mx.strTranslate,wXt=Mx.rad2deg,TXt=Qh().MID_SHIFT,fw=yu(),sw=QJ(),qq=Bf(),up=hu(),AXt=J5(),SXt=rI(),MXt=Rd(),RS=Pl(),e$={left:"start",center:"middle",right:"end"},lw={left:0,center:.5,right:1},Qje=/[yzafpnµmkMGTPEZY]/;function Xk(e){return e&&e.duration>0}rZe.exports=function(t,r,n,i){var a=t._fullLayout,o;Xk(n)&&i&&(o=i()),Mx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var u=s[0],l=u.trace,f=cw.select(this),c=l._hasGauge,h=l._isAngular,d=l._isBullet,p=l.domain,x={w:a._size.w*(p.x[1]-p.x[0]),h:a._size.h*(p.y[1]-p.y[0]),l:a._size.l+a._size.w*p.x[0],r:a._size.r+a._size.w*(1-p.x[1]),t:a._size.t+a._size.h*(1-p.y[1]),b:a._size.b+a._size.h*p.y[0]},b=x.l+x.w/2,y=x.t+x.h/2,E=Math.min(x.w/2,x.h),k=sw.innerRadius*E,A,L,_,C=l.align||"center";if(L=y,!c)A=x.l+lw[C]*x.w,_=function(G){return eZe(G,x.w,x.h)};else if(h&&(A=b,L=y+E/2,_=function(G){return zXt(G,.9*k)}),d){var M=sw.bulletPadding,v=1-sw.bulletNumberDomainSize+M;A=x.l+(v+(1-v)*lw[C])*x.w,_=function(G){return eZe(G,(sw.bulletNumberDomainSize-M)*x.w,x.h)}}CXt(t,f,s,{numbersX:A,numbersY:L,numbersScaler:_,transitionOpts:n,onComplete:o});var z,T;c&&(z={range:l.gauge.axis.range,color:l.gauge.bgcolor,line:{color:l.gauge.bordercolor,width:0},thickness:1},T={range:l.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:l.gauge.bordercolor,width:l.gauge.borderwidth},thickness:1});var F=f.selectAll("g.angular").data(h?s:[]);F.exit().remove();var q=f.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&kXt(t,f,s,{radius:E,innerRadius:k,gauge:F,layer:q,size:x,gaugeBg:z,gaugeOutline:T,transitionOpts:n,onComplete:o});var U=f.selectAll("g.bullet").data(d?s:[]);U.exit().remove();var H=f.selectAll("g.bulletaxis").data(d?s:[]);H.exit().remove(),d&&EXt(t,f,s,{gauge:U,layer:H,size:x,gaugeBg:z,gaugeOutline:T,transitionOpts:n,onComplete:o});var j=f.selectAll("text.title").data(s);j.exit().remove(),j.enter().append("text").classed("title",!0),j.attr("text-anchor",function(){return d?e$.right:e$[l.title.align]}).text(l.title.text).call(fw.font,l.title.font).call(qq.convertToTspans,t),j.attr("transform",function(){var G=x.l+x.w*lw[l.title.align],O,W=sw.titlePadding,re=fw.bBox(j.node());if(c){if(h)if(l.gauge.axis.visible){var ne=fw.bBox(q.node());O=ne.top-W-re.bottom}else O=x.t+x.h/2-E/2-re.bottom-W;d&&(O=L-(re.top+re.bottom)/2,G=x.l-sw.bulletPadding*x.w)}else O=l._numbersTop-W-re.bottom;return Zk(G,O)})})};function EXt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,u=n.gaugeOutline,l=n.size,f=i.domain,c=n.transitionOpts,h=n.onComplete,d,p,x,b,y;a.enter().append("g").classed("bullet",!0),a.attr("transform",Zk(l.l,l.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var E=l.h,k=i.gauge.bar.thickness*E,A=f.x[0],L=f.x[0]+(f.x[1]-f.x[0])*(i._hasNumber||i._hasDelta?1-sw.bulletNumberDomainSize:1);d=jk(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[A,L],d.setScale(),p=up.calcTicks(d),x=up.makeTransTickFn(d),b=up.getTickSigns(d)[2],y=l.t+l.h,d.visible&&(up.drawTicks(e,d,{vals:d.ticks==="inside"?up.clipEnds(d,p):p,layer:o,path:up.makeTickPath(d,y,b),transFn:x}),up.drawLabels(e,d,{vals:p,layer:o,transFn:x,labelFns:up.makeLabelFns(d,y)}));function _(q){q.attr("width",function(U){return Math.max(0,d.c2p(U.range[1])-d.c2p(U.range[0]))}).attr("x",function(U){return d.c2p(U.range[0])}).attr("y",function(U){return .5*(1-U.thickness)*E}).attr("height",function(U){return U.thickness*E})}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(_).call(uw),M.exit().remove();var v=a.selectAll("g.value-bullet").data([i.gauge.bar]);v.enter().append("g").classed("value-bullet",!0).append("rect"),v.select("rect").attr("height",k).attr("y",(E-k)/2).call(uw),Xk(c)?v.select("rect").transition().duration(c.duration).ease(c.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)))):v.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),v.exit().remove();var z=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),T=a.selectAll("g.threshold-bullet").data(z);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*E).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*E).call(RS.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),T.exit().remove();var F=a.selectAll("g.gauge-outline").data([u]);F.enter().append("g").classed("gauge-outline",!0).append("rect"),F.select("rect").call(_).call(uw),F.exit().remove()}function kXt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,u=n.gaugeBg,l=n.gaugeOutline,f=[a.l+a.w/2,a.t+a.h/2+o/2],c=n.gauge,h=n.layer,d=n.transitionOpts,p=n.onComplete,x=Math.PI/2;function b(be){var ze=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],he=(be-ze)/(Ce-ze)*Math.PI-x;return he<-x?-x:he>x?x:he}function y(be){return cw.svg.arc().innerRadius((s+o)/2-be/2*(o-s)).outerRadius((s+o)/2+be/2*(o-s)).startAngle(-x)}function E(be){be.attr("d",function(ze){return y(ze.thickness).startAngle(b(ze.range[0])).endAngle(b(ze.range[1]))()})}var k,A,L,_;c.enter().append("g").classed("angular",!0),c.attr("transform",Zk(f[0],f[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),k=jk(e,i.gauge.axis),k.type="linear",k.range=i.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var C=function(be){return(k.range[0]-be.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},M={},v=up.makeLabelFns(k,0),z=v.labelStandoff;M.xFn=function(be){var ze=C(be);return Math.cos(ze)*z},M.yFn=function(be){var ze=C(be),Ce=Math.sin(ze)>0?.2:1;return-Math.sin(ze)*(z+be.fontSize*Ce)+Math.abs(Math.cos(ze))*(be.fontSize*TXt)},M.anchorFn=function(be){var ze=C(be),Ce=Math.cos(ze);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},M.heightFn=function(be,ze,Ce){var he=C(be);return-.5*(1+Math.sin(he))*Ce};var T=function(be){return Zk(f[0]+o*Math.cos(be),f[1]-o*Math.sin(be))};L=function(be){return T(C(be))};var F=function(be){var ze=C(be);return T(ze)+"rotate("+-wXt(ze)+")"};if(A=up.calcTicks(k),_=up.getTickSigns(k)[2],k.visible){_=k.ticks==="inside"?-1:1;var q=(k.linewidth||1)/2;up.drawTicks(e,k,{vals:A,layer:h,path:"M"+_*q+",0h"+_*k.ticklen,transFn:F}),up.drawLabels(e,k,{vals:A,layer:h,transFn:L,labelFns:M})}var U=[u].concat(i.gauge.steps),H=c.selectAll("g.bg-arc").data(U);H.enter().append("g").classed("bg-arc",!0).append("path"),H.select("path").call(E).call(uw),H.exit().remove();var j=y(i.gauge.bar.thickness),G=c.selectAll("g.value-arc").data([i.gauge.bar]);G.enter().append("g").classed("value-arc",!0).append("path");var O=G.select("path");Xk(d)?(O.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",LXt(j,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):O.attr("d",typeof r[0].y=="number"?j.endAngle(b(r[0].y)):"M0,0Z"),O.call(uw),G.exit().remove(),U=[];var W=i.gauge.threshold.value;(W||W===0)&&U.push({range:[W,W],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=c.selectAll("g.threshold-arc").data(U);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(E).call(uw),re.exit().remove();var ne=c.selectAll("g.gauge-outline").data([l]);ne.enter().append("g").classed("gauge-outline",!0).append("path"),ne.select("path").call(E).call(uw),ne.exit().remove()}function CXt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",u=e$[s],l=n.transitionOpts,f=n.onComplete,c=Mx.ensureSingle(t,"g","numbers"),h,d,p,x=[];i._hasNumber&&x.push("number"),i._hasDelta&&(x.push("delta"),i.delta.position==="left"&&x.reverse());var b=c.selectAll("text").data(x);b.enter().append("text"),b.attr("text-anchor",function(){return u}).attr("class",function(T){return T}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function y(T,F,q,U){if(T.match("s")&&q>=0!=U>=0&&!F(q).slice(-1).match(Qje)&&!F(U).slice(-1).match(Qje)){var H=T.slice().replace("s","f").replace(/\d+/,function(G){return parseInt(G)-1}),j=jk(e,{tickformat:H});return function(G){return Math.abs(G)<1?up.tickText(j,G).text:F(G)}}else return F}function E(){var T=jk(e,{tickformat:i.number.valueformat},i._range);T.setScale(),up.prepTicks(T);var F=function(G){return up.tickText(T,G).text},q=i.number.suffix,U=i.number.prefix,H=c.select("text.number");function j(){var G=typeof r[0].y=="number"?U+F(r[0].y)+q:"-";H.text(G).call(fw.font,i.number.font).call(qq.convertToTspans,e)}return Xk(l)?H.transition().duration(l.duration).ease(l.easing).each("end",function(){j(),f&&f()}).each("interrupt",function(){j(),f&&f()}).attrTween("text",function(){var G=cw.select(this),O=$je(r[0].lastY,r[0].y);i._lastValue=r[0].y;var W=y(i.number.valueformat,F,r[0].lastY,r[0].y);return function(re){G.text(U+W(O(re))+q)}}):j(),h=tZe(U+F(r[0].y)+q,i.number.font,u,e),H}function k(){var T=jk(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),up.prepTicks(T);var F=function(re){return up.tickText(T,re).text},q=i.delta.suffix,U=i.delta.prefix,H=function(re){var ne=i.delta.relative?re.relativeDelta:re.delta;return ne},j=function(re,ne){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+ne(re)+q},G=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=H(r[0]));var O=c.select("text.delta");O.call(fw.font,i.delta.font).call(RS.fill,G({delta:i._deltaLastValue}));function W(){O.text(j(H(r[0]),F)).call(RS.fill,G(r[0])).call(qq.convertToTspans,e)}return Xk(l)?O.transition().duration(l.duration).ease(l.easing).tween("text",function(){var re=cw.select(this),ne=H(r[0]),be=i._deltaLastValue,ze=y(i.delta.valueformat,F,be,ne),Ce=$je(be,ne);return i._deltaLastValue=ne,function(he){re.text(j(Ce(he),ze)),re.call(RS.fill,G({delta:Ce(he)}))}}).each("end",function(){W(),f&&f()}).each("interrupt",function(){W(),f&&f()}):W(),d=tZe(j(H(r[0]),F),i.delta.font,u,e),O}var A=i.mode+i.align,L;if(i._hasDelta&&(L=k(),A+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,A+=i.delta.increasing.symbol+i.delta.decreasing.symbol,p=d),i._hasNumber&&(E(),A+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,p=h),i._hasDelta&&i._hasNumber){var _=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,v,z=.75*i.delta.font.size;i.delta.position==="left"&&(M=Fq(i,"deltaPos",0,-1*(h.width*lw[i.align]+d.width*(1-lw[i.align])+z),A,Math.min),v=_[1]-C[1],p={width:h.width+d.width+z,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+v),bottom:Math.max(h.bottom,d.bottom+v)}),i.delta.position==="right"&&(M=Fq(i,"deltaPos",0,h.width*(1-lw[i.align])+d.width*lw[i.align]+z,A,Math.max),v=_[1]-C[1],p={width:h.width+d.width+z,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+v),bottom:Math.max(h.bottom,d.bottom+v)}),i.delta.position==="bottom"&&(M=null,v=d.height,p={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,v=h.top,p={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:v})}(i._hasNumber||i._hasDelta)&&c.attr("transform",function(){var T=n.numbersScaler(p);A+=T[2];var F=Fq(i,"numbersScale",1,T[0],A,Math.min),q;i._scaleNumbers||(F=1),i._isAngular?q=o-F*p.bottom:q=o-F*(p.top+p.bottom)/2,i._numbersTop=F*p.top+q;var U=p[s];s==="center"&&(U=(p.left+p.right)/2);var H=a-F*U;return H=Fq(i,"numbersTranslate",0,H,A,Math.max),Zk(H,q)+bXt(F)})}function uw(e){e.each(function(t){RS.stroke(cw.select(this),t.line.color)}).each(function(t){RS.fill(cw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function LXt(e,t,r){return function(){var n=xXt(t,r);return function(i){return e.endAngle(n(i))()}}}function jk(e,t,r){var n=e._fullLayout,i=Mx.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(u,l){return Mx.coerce(i,a,MXt,u,l)}return AXt(i,a,s,o,n),SXt(i,a,s,o),a}function eZe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function zXt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function tZe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=cw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(qq.convertToTspans,n).call(fw.font,t),fw.bBox(a.node())}function Fq(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Mx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var aZe=Se((sbr,nZe)=>{"use strict";nZe.exports={moduleType:"trace",name:"indicator",basePlotModule:Oje(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:$J(),supplyDefaults:Yje().supplyDefaults,calc:Jje().calc,plot:iZe(),meta:{}}});var sZe=Se((lbr,oZe)=>{"use strict";oZe.exports=aZe()});var t$=Se((fbr,cZe)=>{"use strict";var lZe=Nb(),Bq=vu().extendFlat,PXt=_c().overrideAll,uZe=uc(),IXt=Ec().attributes,fZe=Gc().descriptionOnlyNumbers,ubr=cZe.exports=PXt({domain:IXt({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:fZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:Bq({},lZe.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:Bq({},uZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:fZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:Bq({},lZe.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:Bq({},uZe({arrayOk:!0}))}},"calc","from-root")});var dZe=Se((cbr,hZe)=>{"use strict";var r$=Zr(),DXt=t$(),RXt=Ec().defaults;function FXt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(u,l){return u-l}),o=i.map(function(u){return a.indexOf(u)}),s=o.length;s{"use strict";var qXt=Km().wrap;pZe.exports=function(){return qXt({})}});var i$=Se((dbr,yZe)=>{"use strict";yZe.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 SZe=Se((pbr,AZe)=>{"use strict";var mZe=i$(),a$=vu().extendFlat,BXt=_u(),OXt=yp().isTypedArray,Oq=yp().isArrayOrTypedArray;AZe.exports=function(t,r){var n=n$(r.cells.values),i=function(v){return v.slice(r.header.values.length,v.length)},a=n$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=n$(a));var o=a.concat(i(n).map(function(){return TZe((a[0]||[""]).length)})),s=r.domain,u=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),l=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),f=r.header.values.length?o[0].map(function(){return r.header.height}):[mZe.emptyHeaderHeight],c=n.length?n[0].map(function(){return r.cells.height}):[],h=f.reduce(gZe,0),d=l-h,p=d+mZe.uplift,x=bZe(c,p),b=bZe(f,h),y=xZe(b,[]),E=xZe(x,y),k={},A=r._fullInput.columnorder;Oq(A)&&(A=Array.from(A)),A=A.concat(i(n.map(function(v,z){return z})));var L=o.map(function(v,z){var T=Oq(r.columnwidth)?r.columnwidth[Math.min(z,r.columnwidth.length-1)]:r.columnwidth;return BXt(T)?Number(T):1}),_=L.reduce(gZe,0);L=L.map(function(v){return v/_*u});var C=Math.max(o$(r.header.line.width),o$(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:u,maxLineWidth:C,height:l,columnOrder:A,groupHeight:l,rowBlocks:E,headerRowBlocks:y,scrollY:0,cells:a$({},r.cells,{values:n}),headerCells:a$({},r.header,{values:o}),gdColumns:o.map(function(v){return v[0]}),gdColumnsOriginalOrder:o.map(function(v){return v[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(v,z){var T=k[v];k[v]=(T||0)+1;var F=v+"__"+k[v];return{key:F,label:v,specIndex:z,xIndex:A[z],xScale:_Ze,x:void 0,calcdata:void 0,columnWidth:L[z]}})};return M.columns.forEach(function(v){v.calcdata=M,v.x=_Ze(v)}),M};function o$(e){if(Oq(e)){for(var t=0,r=0;r=t||l===e.length-1)&&(r[i]=o,o.key=u++,o.firstRowIndex=s,o.lastRowIndex=l,o=wZe(),i+=a,s=l+1,a=0);return r}function wZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var MZe=Se(s$=>{"use strict";var Nq=vu().extendFlat;s$.splitToPanels=function(e){var t=[0,0],r=Nq({},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:Nq({},e.calcdata,{cells:e.calcdata.headerCells})}),n=Nq({},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=Nq({},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]};s$.splitToCells=function(e){var t=NXt(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 NXt(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 m$=Se((ybr,qZe)=>{"use strict";var Yl=i$(),Vc=Nl(),l$=Zr(),UXt=l$.numberFormat,ac=Km(),u$=yu(),VXt=Bf(),HXt=Zr().raiseToTop,oy=Zr().strTranslate,GXt=Zr().cancelTransition,WXt=SZe(),IZe=MZe(),EZe=Pl();qZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Yl.cn.table).data(r.map(function(E){var k=ac.unwrap(E),A=k.trace;return WXt(t,A)}),ac.keyFun);i.exit().remove(),i.enter().append("g").classed(Yl.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(E){return E.width+E.size.l+E.size.r}).attr("height",function(E){return E.height+E.size.t+E.size.b}).attr("transform",function(E){return oy(E.translateX,E.translateY)});var a=i.selectAll("."+Yl.cn.tableControlView).data(ac.repeat,ac.keyFun),o=a.enter().append("g").classed(Yl.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(E){a.filter(function(k){return E===k}).call(Yk,t)}).on(s,function(E){if(!E.scrollbarState.wheeling){E.scrollbarState.wheeling=!0;var k=E.scrollY+Vc.event.deltaY,A=Vq(t,a,null,k)(E);A||(Vc.event.stopPropagation(),Vc.event.preventDefault()),E.scrollbarState.wheeling=!1}}).call(Yk,t,!0)}a.attr("transform",function(E){return oy(E.size.l,E.size.t)});var u=a.selectAll("."+Yl.cn.scrollBackground).data(ac.repeat,ac.keyFun);u.enter().append("rect").classed(Yl.cn.scrollBackground,!0).attr("fill","none"),u.attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),a.each(function(E){u$.setClipUrl(Vc.select(this),kZe(t,E),t)});var l=a.selectAll("."+Yl.cn.yColumn).data(function(E){return E.columns},ac.keyFun);l.enter().append("g").classed(Yl.cn.yColumn,!0),l.exit().remove(),l.attr("transform",function(E){return oy(E.x,0)}),n&&l.call(Vc.behavior.drag().origin(function(E){var k=Vc.select(this);return zZe(k,E,-Yl.uplift),HXt(this),E.calcdata.columnDragInProgress=!0,Yk(a.filter(function(A){return E.calcdata.key===A.key}),t),E}).on("drag",function(E){var k=Vc.select(this),A=function(C){return(E===C?Vc.event.x:C.x)+C.columnWidth/2};E.x=Math.max(-Yl.overdrag,Math.min(E.calcdata.width+Yl.overdrag-E.columnWidth,Vc.event.x));var L=DZe(l).filter(function(C){return C.calcdata.key===E.calcdata.key}),_=L.sort(function(C,M){return A(C)-A(M)});_.forEach(function(C,M){C.xIndex=M,C.x=E===C?C.x:C.xScale(C)}),l.filter(function(C){return E!==C}).transition().ease(Yl.transitionEase).duration(Yl.transitionDuration).attr("transform",function(C){return oy(C.x,0)}),k.call(GXt).attr("transform",oy(E.x,-Yl.uplift))}).on("dragend",function(E){var k=Vc.select(this),A=E.calcdata;E.x=E.xScale(E),E.calcdata.columnDragInProgress=!1,zZe(k,E,0),tYt(t,A,A.columns.map(function(L){return L.xIndex}))})),l.each(function(E){u$.setClipUrl(Vc.select(this),CZe(t,E),t)});var f=l.selectAll("."+Yl.cn.columnBlock).data(IZe.splitToPanels,ac.keyFun);f.enter().append("g").classed(Yl.cn.columnBlock,!0).attr("id",function(E){return E.key}),f.style("cursor",function(E){return E.dragHandle?"ew-resize":E.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var c=f.filter(rYt),h=f.filter(p$);n&&h.call(Vc.behavior.drag().origin(function(E){return Vc.event.stopPropagation(),E}).on("drag",Vq(t,a,-1)).on("dragend",function(){})),f$(t,a,c,f),f$(t,a,h,f);var d=a.selectAll("."+Yl.cn.scrollAreaClip).data(ac.repeat,ac.keyFun);d.enter().append("clipPath").classed(Yl.cn.scrollAreaClip,!0).attr("id",function(E){return kZe(t,E)});var p=d.selectAll("."+Yl.cn.scrollAreaClipRect).data(ac.repeat,ac.keyFun);p.enter().append("rect").classed(Yl.cn.scrollAreaClipRect,!0).attr("x",-Yl.overdrag).attr("y",-Yl.uplift).attr("fill","none"),p.attr("width",function(E){return E.width+2*Yl.overdrag}).attr("height",function(E){return E.height+Yl.uplift});var x=l.selectAll("."+Yl.cn.columnBoundary).data(ac.repeat,ac.keyFun);x.enter().append("g").classed(Yl.cn.columnBoundary,!0);var b=l.selectAll("."+Yl.cn.columnBoundaryClippath).data(ac.repeat,ac.keyFun);b.enter().append("clipPath").classed(Yl.cn.columnBoundaryClippath,!0),b.attr("id",function(E){return CZe(t,E)});var y=b.selectAll("."+Yl.cn.columnBoundaryRect).data(ac.repeat,ac.keyFun);y.enter().append("rect").classed(Yl.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(E){return E.columnWidth+2*Uq(E)}).attr("height",function(E){return E.calcdata.height+2*Uq(E)+Yl.uplift}).attr("x",function(E){return-Uq(E)}).attr("y",function(E){return-Uq(E)}),v$(null,h,a)};function Uq(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function kZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function CZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function DZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function Yk(e,t,r){function n(l){var f=l.rowBlocks;return h$(f,f.length-1)+(f.length?Hq(f[f.length-1],1/0):1)}var i=e.selectAll("."+Yl.cn.scrollbarKit).data(ac.repeat,ac.keyFun);i.enter().append("g").classed(Yl.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(l){var f=l.scrollbarState;f.totalHeight=n(l),f.scrollableAreaHeight=l.groupHeight-c$(l),f.currentlyVisibleHeight=Math.min(f.totalHeight,f.scrollableAreaHeight),f.ratio=f.currentlyVisibleHeight/f.totalHeight,f.barLength=Math.max(f.ratio*f.currentlyVisibleHeight,Yl.goldenRatio*Yl.scrollbarWidth),f.barWiggleRoom=f.currentlyVisibleHeight-f.barLength,f.wiggleRoom=Math.max(0,f.totalHeight-f.scrollableAreaHeight),f.topY=f.barWiggleRoom===0?0:l.scrollY/f.wiggleRoom*f.barWiggleRoom,f.bottomY=f.topY+f.barLength,f.dragMultiplier=f.wiggleRoom/f.barWiggleRoom}).attr("transform",function(l){var f=l.width+Yl.scrollbarWidth/2+Yl.scrollbarOffset;return oy(f,c$(l))});var a=i.selectAll("."+Yl.cn.scrollbar).data(ac.repeat,ac.keyFun);a.enter().append("g").classed(Yl.cn.scrollbar,!0);var o=a.selectAll("."+Yl.cn.scrollbarSlider).data(ac.repeat,ac.keyFun);o.enter().append("g").classed(Yl.cn.scrollbarSlider,!0),o.attr("transform",function(l){return oy(0,l.scrollbarState.topY||0)});var s=o.selectAll("."+Yl.cn.scrollbarGlyph).data(ac.repeat,ac.keyFun);s.enter().append("line").classed(Yl.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Yl.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Yl.scrollbarWidth/2),s.attr("y2",function(l){return l.scrollbarState.barLength-Yl.scrollbarWidth/2}).attr("stroke-opacity",function(l){return l.columnDragInProgress||!l.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Yl.scrollbarHideDelay).duration(Yl.scrollbarHideDuration).attr("stroke-opacity",0);var u=a.selectAll("."+Yl.cn.scrollbarCaptureZone).data(ac.repeat,ac.keyFun);u.enter().append("line").classed(Yl.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Yl.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(l){var f=Vc.event.y,c=this.getBoundingClientRect(),h=l.scrollbarState,d=f-c.top,p=Vc.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||Vq(t,e,null,p(d-h.barLength/2))(l)}).call(Vc.behavior.drag().origin(function(l){return Vc.event.stopPropagation(),l.scrollbarState.scrollbarScrollInProgress=!0,l}).on("drag",Vq(t,e)).on("dragend",function(){})),u.attr("y2",function(l){return l.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),u.remove())}function f$(e,t,r,n){var i=jXt(r),a=ZXt(i);JXt(a);var o=XXt(a);QXt(o);var s=KXt(a),u=YXt(s);$Xt(u),RZe(u,t,n,e),y$(a)}function jXt(e){var t=e.selectAll("."+Yl.cn.columnCells).data(ac.repeat,ac.keyFun);return t.enter().append("g").classed(Yl.cn.columnCells,!0),t.exit().remove(),t}function ZXt(e){var t=e.selectAll("."+Yl.cn.columnCell).data(IZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Yl.cn.columnCell,!0),t.exit().remove(),t}function XXt(e){var t=e.selectAll("."+Yl.cn.cellRect).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Yl.cn.cellRect,!0),t}function YXt(e){var t=e.selectAll("."+Yl.cn.cellText).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Yl.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Vc.event.stopPropagation()}),t}function KXt(e){var t=e.selectAll("."+Yl.cn.cellTextHolder).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Yl.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function JXt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Xp(n.size,i,r),color:Xp(n.color,i,r),family:Xp(n.family,i,r),weight:Xp(n.weight,i,r),style:Xp(n.style,i,r),variant:Xp(n.variant,i,r),textcase:Xp(n.textcase,i,r),lineposition:Xp(n.lineposition,i,r),shadow:Xp(n.shadow,i,r)};t.rowNumber=t.key,t.align=Xp(t.calcdata.cells.align,i,r),t.cellBorderWidth=Xp(t.calcdata.cells.line.width,i,r),t.font=a})}function $Xt(e){e.each(function(t){u$.font(Vc.select(this),t.font)})}function QXt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Vc.select(this);EZe.stroke(r,Xp(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),EZe.fill(r,Xp(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function RZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,u=typeof s=="string",l=u&&s.match(/
/i),f=!u||l;i.mayHaveMarkup=u&&s.match(/[<&>]/);var c=eYt(s);i.latex=c;var h=c?"":Xp(i.calcdata.cells.prefix,a,o)||"",d=c?"":Xp(i.calcdata.cells.suffix,a,o)||"",p=c?null:Xp(i.calcdata.cells.format,a,o)||null,x=h+(p?UXt(p)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!f&&!c&&(b=LZe(x)),i.cellHeightMayIncrease=l||c||i.mayHaveMarkup||(b===void 0?LZe(x):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var y;if(i.wrappingNeeded){var E=Yl.wrapSplitCharacter===" "?x.replace(/i&&n.push(a),i+=u}return n}function v$(e,t,r){var n=DZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=h$(i,i.length),s=n.calcdata.groupHeight-c$(n),u=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),l=iYt(i,u,s);l.length===1&&(l[0]===i.length-1?l.unshift(l[0]-1):l.push(l[0]+1)),l[0]%2&&l.reverse(),t.each(function(f,c){f.page=l[c],f.scrollY=u}),t.attr("transform",function(f){var c=h$(f.rowBlocks,f.page)-f.scrollY;return oy(0,c)}),e&&(PZe(e,r,t,l,n.prevPages,n,0),PZe(e,r,t,l,n.prevPages,n,1),Yk(r,e))}}function Vq(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(c){return o.key===c.key}),u=r||o.scrollbarState.dragMultiplier,l=o.scrollY;o.scrollY=n===void 0?o.scrollY+u*Vc.event.dy:n;var f=s.selectAll("."+Yl.cn.yColumn).selectAll("."+Yl.cn.columnBlock).filter(p$);return v$(e,f,s),o.scrollY===l}}function PZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var u=r.filter(function(l,f){return f===o&&n[f]!==i[f]});f$(e,t,u,r),i[o]=n[o]}))}function nYt(e,t,r,n){return function(){var a=Vc.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(x,b){s[b].width=this.getComputedTextLength()});var u=s[s.length-1].width,l=s.slice(0,-1),f=[],c,h,d=0,p=o.column.columnWidth-2*Yl.cellPad;for(o.value="";l.length;)c=l.shift(),h=c.width+u,d+h>p&&(o.value+=f.join(Yl.wrapSpacer)+Yl.lineBreaker,f=[],d=0),f.push(c.text),d+=h;d&&(o.value+=f.join(Yl.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),RZe(a.select("."+Yl.cn.cellText),r,e,n),Vc.select(t.parentNode.parentNode).call(y$)}}function aYt(e,t,r,n,i){return function(){if(!i.settledY){var o=Vc.select(t.parentNode),s=d$(i),u=i.key-s.firstRowIndex,l=s.rows[u].rowHeight,f=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Yl.cellPad:l,c=Math.max(f,l),h=c-s.rows[u].rowHeight;h&&(s.rows[u].rowHeight=c,e.selectAll("."+Yl.cn.columnCell).call(y$),v$(null,e.filter(p$),0),Yk(r,n,!0)),o.attr("transform",function(){var d=this,p=d.parentNode,x=p.getBoundingClientRect(),b=Vc.select(d.parentNode).select("."+Yl.cn.cellRect).node().getBoundingClientRect(),y=d.transform.baseVal.consolidate(),E=b.top-x.top+(y?y.matrix.f:Yl.cellPad);return oy(FZe(i,Vc.select(d.parentNode).select("."+Yl.cn.cellTextHolder).node().getBoundingClientRect().width),E)}),i.settledY=!0}}}function FZe(e,t){switch(e.align){case"left":return Yl.cellPad;case"right":return e.column.columnWidth-(t||0)-Yl.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Yl.cellPad}}function y$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+Hq(s,1/0)},0),n=d$(t),i=Hq(n,t.key),a=i+r;return oy(0,a)}).selectAll("."+Yl.cn.cellRect).attr("height",function(t){return sYt(d$(t),t.key).rowHeight})}function h$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=oYt(e[n]);return r}function Hq(e,t){for(var r=0,n=0;n{"use strict";var lYt=Dd().getModuleCalcData,uYt=m$(),Gq="table";Wq.name=Gq;Wq.plot=function(e){var t=lYt(e.calcdata,Gq)[0];t.length&&uYt(e,t)};Wq.clean=function(e,t,r,n){var i=n._has&&n._has(Gq),a=t._has&&t._has(Gq);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var NZe=Se((gbr,OZe)=>{"use strict";OZe.exports={attributes:t$(),supplyDefaults:dZe(),calc:vZe(),plot:m$(),moduleType:"trace",name:"table",basePlotModule:BZe(),categories:["noOpacity"],meta:{}}});var VZe=Se((_br,UZe)=>{"use strict";UZe.exports=NZe()});var ZZe=Se((xbr,jZe)=>{"use strict";var HZe=uc(),GZe=Ih(),g$=Rd(),fYt=Gc().descriptionWithDates,cYt=_c().overrideAll,WZe=Id().dash,_$=vu().extendFlat;jZe.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:HZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:g$.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:_$({},g$.labelalias,{editType:"calc"}),tickfont:HZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:fYt("tick label")},tickformatstops:cYt(g$.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:GZe.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:_$({},WZe,{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:_$({},WZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:GZe.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 Zq=Se((bbr,KZe)=>{"use strict";var hYt=uc(),XZe=ZZe(),YZe=Ih(),jq=hYt({editType:"calc"}),dYt=Zc().zorder;jq.family.dflt='"Open Sans", verdana, arial, sans-serif';jq.size.dflt=12;jq.color.dflt=YZe.defaultLine;KZe.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:XZe,baxis:XZe,font:jq,color:{valType:"color",dflt:YZe.defaultLine,editType:"plot"},zorder:dYt}});var QZe=Se((wbr,$Ze)=>{"use strict";var JZe=Zr().isArray1D;$Ze.exports=function(t,r,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||JZe(i))&&(!s||JZe(o))){var u=a?i.length:1/0;s&&(u=Math.min(u,o.length)),r.a&&r.a.length&&(u=Math.min(u,r.a.length)),r.b&&r.b.length&&(u=Math.min(u,r.b.length)),r._length=u}else r._length=null;return!0}});var rXe=Se((Tbr,tXe)=>{"use strict";var pYt=Zq(),eXe=Pl().addOpacity,vYt=Ul(),Kk=Zr(),yYt=xb(),mYt=e_(),gYt=t_(),_Yt=QP(),xYt=gm(),bYt=L3();tXe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=pYt[i+"axis"];function s(v,z){return Kk.coerce(t,r,o,v,z)}function u(v,z){return Kk.coerce2(t,r,o,v,z)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var l=s("type");if(l==="-"&&(n.data&&wYt(r,n.data),r.type==="-"?r.type="linear":l=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,l==="date"){var f=vYt.getComponentMethod("calendars","handleDefaults");f(t,r,"calendar",n.calendar)}xYt(r,n.fullLayout),r.c2p=Kk.identity;var c=s("color",n.dfltColor),h=c===t.color?c:a.color,d=s("title.text");d&&(Kk.coerceFont(s,"title.font",a,{overrideDflt:{size:Kk.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),yYt(t,r,s,l),gYt(t,r,s,l,n),mYt(t,r,s,l,n),_Yt(t,r,s,{data:n.data,dataAttr:i});var x=u("gridcolor",eXe(c,.3)),b=u("gridwidth"),y=u("griddash"),E=s("showgrid");E||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=u("startlinecolor",c),A=u("startlinewidth",b),L=s("startline",r.showgrid||!!k||!!A);L||(delete r.startlinecolor,delete r.startlinewidth);var _=u("endlinecolor",c),C=u("endlinewidth",b),M=s("endline",r.showgrid||!!_||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),E?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",y),s("minorgridcolor",eXe(x,.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 wYt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=bYt(t,a,{autotypenumbers:e.autotypenumbers})}}});var nXe=Se((Abr,iXe)=>{"use strict";var TYt=rXe(),AYt=_f();iXe.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")),SYt(t,r,n,a)};function SYt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},u=AYt.newContainer(t,a),l={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};TYt(s,u,l),u._categories=u._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var sXe=Se((Sbr,oXe)=>{"use strict";var aXe=Zr(),MYt=QZe(),EYt=nXe(),kYt=Zq(),CYt=Ih();oXe.exports=function(t,r,n,i){function a(u,l){return aXe.coerce(t,r,kYt,u,l)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",CYt.defaultLine);if(aXe.coerceFont(a,"font",i.font),a("carpet"),EYt(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=MYt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var x$=Se((Mbr,lXe)=>{"use strict";var LYt=Zr().isArrayOrTypedArray;lXe.exports=function(t,r,n){var i;for(LYt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";uXe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";fXe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),u=a[1]*t.dpdy(n),l=1,f=1;if(o){var c=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])/c/h;f=Math.max(0,d)}var p=Math.atan2(u,s)*180/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(i,r,n),offsetMultplier:f}}});var _Xe=Se((Cbr,gXe)=>{"use strict";var Jq=Nl(),Xq=yu(),Yq=x$(),pXe=b$(),Jk=cXe(),w$=Bf(),Uv=Zr(),vXe=Uv.strRotate,Kq=Uv.strTranslate,yXe=Qh();gXe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,u=t._fullLayout,l=u._clips;Uv.makeTraceGroups(i,n,"trace").each(function(f){var c=Jq.select(this),h=f[0],d=h.trace,p=d.aaxis,x=d.baxis,b=Uv.ensureSingle(c,"g","minorlayer"),y=Uv.ensureSingle(c,"g","majorlayer"),E=Uv.ensureSingle(c,"g","boundarylayer"),k=Uv.ensureSingle(c,"g","labellayer");c.style("opacity",d.opacity),FS(o,s,y,p,"a",p._gridlines,!0,a),FS(o,s,y,x,"b",x._gridlines,!0,a),FS(o,s,b,p,"a",p._minorgridlines,!0,a),FS(o,s,b,x,"b",x._minorgridlines,!0,a),FS(o,s,E,p,"a-boundary",p._boundarylines,a),FS(o,s,E,x,"b-boundary",x._boundarylines,a);var A=hXe(t,o,s,d,h,k,p._labels,"a-label"),L=hXe(t,o,s,d,h,k,x._labels,"b-label");PYt(t,k,d,h,o,s,A,L),zYt(d,h,l,o,s)})};function zYt(e,t,r,n,i){var a,o,s,u,l=r.select("#"+e._clipPathId);l.size()||(l=r.append("clipPath").classed("carpetclip",!0));var f=Uv.ensureSingle(l,"path","carpetboundary"),c=t.clipsegments,h=[];for(u=0;u0?"start":"end","data-notex":1}).call(Xq.font,c.font).text(c.text).call(w$.convertToTspans,e),y=Xq.bBox(this);b.attr("transform",Kq(d.p[0],d.p[1])+vXe(d.angle)+Kq(c.axis.labelpadding*x,y.height*.3)),l=Math.max(l,y.width+c.axis.labelpadding)}),u.exit().remove(),f.maxExtent=l,f}function PYt(e,t,r,n,i,a,o,s){var u,l,f,c,h=Uv.aggNums(Math.min,null,r.a),d=Uv.aggNums(Math.max,null,r.a),p=Uv.aggNums(Math.min,null,r.b),x=Uv.aggNums(Math.max,null,r.b);u=.5*(h+d),l=p,f=r.ab2xy(u,l,!0),c=r.dxyda_rough(u,l),o.angle===void 0&&Uv.extendFlat(o,Jk(r,i,a,f,r.dxydb_rough(u,l))),dXe(e,t,r,n,f,c,r.aaxis,i,a,o,"a-title"),u=h,l=.5*(p+x),f=r.ab2xy(u,l,!0),c=r.dxydb_rough(u,l),s.angle===void 0&&Uv.extendFlat(s,Jk(r,i,a,f,r.dxyda_rough(u,l))),dXe(e,t,r,n,f,c,r.baxis,i,a,s,"b-title")}var mXe=yXe.LINE_SPACING,IYt=(1-yXe.MID_SHIFT)/mXe+1;function dXe(e,t,r,n,i,a,o,s,u,l,f){var c=[];o.title.text&&c.push(o.title.text);var h=t.selectAll("text."+f).data(c),d=l.maxExtent;h.enter().append("text").classed(f,!0),h.each(function(){var p=Jk(r,s,u,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var x=o.title.font.size;d+=x+o.title.offset;var b=l.angle+(l.flip<0?180:0),y=(b-p.angle+450)%360,E=y>90&&y<270,k=Jq.select(this);k.text(o.title.text).call(w$.convertToTspans,e),E&&(d=(-w$.lineCount(k)+IYt)*mXe*x-d),k.attr("transform",Kq(p.p[0],p.p[1])+vXe(p.angle)+Kq(0,d)).attr("text-anchor","middle").call(Xq.font,o.title.font)}),h.exit().remove()}});var bXe=Se((Lbr,xXe)=>{"use strict";var $q=Zr().isArrayOrTypedArray;xXe.exports=function(e,t,r){var n,i,a,o,s,u,l=[],f=$q(e)?e.length:e,c=$q(t)?t.length:t,h=$q(e)?e:null,d=$q(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(f-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(c-1));var p,x=1/0,b=-1/0;for(i=0;i{"use strict";var wXe=Zr().isArrayOrTypedArray;AXe.exports=function(e){return TXe(e,0)};function TXe(e,t){if(!wXe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var DYt=hu(),Ex=vu().extendFlat;MXe.exports=function(t,r,n){var i,a,o,s,u,l,f,c,h,d,p,x,b,y,E=t["_"+r],k=t[r+"axis"],A=k._gridlines=[],L=k._minorgridlines=[],_=k._boundarylines=[],C=t["_"+n],M=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=E.slice());var v=t._xctrl,z=t._yctrl,T=v[0].length,F=v.length,q=t._a.length,U=t._b.length;DYt.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var H=k.smoothing?3:1;function j(O){var W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re=[],me=[],Be={};if(r==="b")for(re=t.b2j(O),ne=Math.floor(Math.max(0,Math.min(U-2,re))),be=re-ne,Be.length=U,Be.crossLength=q,Be.xy=function(fe){return t.evalxy([],fe,re)},Be.dxy=function(fe,Ze){return t.dxydi([],fe,ne,Ze,be)},W=0;W0&&(ke=t.dxydi([],W-1,ne,0,be),Re.push(ze[0]+ke[0]/3),me.push(ze[1]+ke[1]/3),Ee=t.dxydi([],W-1,ne,1,be),Re.push(te[0]-Ee[0]/3),me.push(te[1]-Ee[1]/3)),Re.push(te[0]),me.push(te[1]),ze=te;else for(W=t.a2i(O),Ce=Math.floor(Math.max(0,Math.min(q-2,W))),he=W-Ce,Be.length=q,Be.crossLength=U,Be.xy=function(fe){return t.evalxy([],W,fe)},Be.dxy=function(fe,Ze){return t.dxydj([],Ce,fe,he,Ze)},re=0;re0&&(Me=t.dxydj([],Ce,re-1,he,0),Re.push(ze[0]+Me[0]/3),me.push(ze[1]+Me[1]/3),Oe=t.dxydj([],Ce,re-1,he,1),Re.push(te[0]-Oe[0]/3),me.push(te[1]-Oe[1]/3)),Re.push(te[0]),me.push(te[1]),ze=te;return Be.axisLetter=r,Be.axis=k,Be.crossAxis=M,Be.value=O,Be.constvar=n,Be.index=c,Be.x=Re,Be.y=me,Be.smoothing=M.smoothing,Be}function G(O){var W,re,ne,be,ze,Ce=[],he=[],te={};if(te.length=E.length,te.crossLength=C.length,r==="b")for(ne=Math.max(0,Math.min(U-2,O)),ze=Math.min(1,Math.max(0,O-ne)),te.xy=function(ke){return t.evalxy([],ke,O)},te.dxy=function(ke,Ee){return t.dxydi([],ke,ne,Ee,ze)},W=0;WE.length-1)&&A.push(Ex(G(a),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(c=l;cE.length-1)&&!(p<0||p>E.length-1))for(x=E[o],b=E[p],i=0;iE[E.length-1])&&L.push(Ex(j(d),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&_.push(Ex(G(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&_.push(Ex(G(E.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,u=[Math.floor((E[E.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((E[0]-k.tick0)/k.dtick/(1+s))].sort(function(O,W){return O-W}),l=u[0],f=u[1],c=l;c<=f;c++)h=k.tick0+k.dtick*c,A.push(Ex(j(h),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(c=l-1;cE[E.length-1])&&L.push(Ex(j(d),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&_.push(Ex(j(E[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&_.push(Ex(j(E[E.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var zXe=Se((Ibr,LXe)=>{"use strict";var kXe=hu(),CXe=vu().extendFlat;LXe.exports=function(t,r){var n,i,a,o,s,u=r._labels=[],l=r._gridlines;for(n=0;n{"use strict";PXe.exports=function(t,r,n,i){var a,o,s,u=[],l=!!n.smoothing,f=!!i.smoothing,c=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=c;a++)o[a]=t[0][a],s[a]=r[0][a];for(u.push({x:o,y:s,bicubic:l}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][c],s[a]=r[a][c];for(u.push({x:o,y:s,bicubic:f}),a=c,o=[],s=[];a>=0;a--)o[c-a]=t[h][a],s[c-a]=r[h][a];for(u.push({x:o,y:s,bicubic:l}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return u.push({x:o,y:s,bicubic:f}),u}});var RXe=Se((Rbr,DXe)=>{"use strict";var RYt=Zr();DXe.exports=function(t,r,n){var i,a,o,s=[],u=[],l=t[0].length,f=t.length;function c(ne,be){var ze=0,Ce,he=0;return ne>0&&(Ce=t[be][ne-1])!==void 0&&(he++,ze+=Ce),ne0&&(Ce=t[be-1][ne])!==void 0&&(he++,ze+=Ce),be0&&a0&&iM);return RYt.log("Smoother converged to",v,"after",T,"iterations"),t}});var qXe=Se((Fbr,FXe)=>{"use strict";FXe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var NXe=Se((qbr,OXe)=>{"use strict";var BXe=.5;OXe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],u=n[1]-r[1],l=Math.pow(a*a+o*o,BXe/2),f=Math.pow(s*s+u*u,BXe/2),c=(f*f*a-l*l*s)*i,h=(f*f*o-l*l*u)*i,d=f*(l+f)*3,p=l*(l+f)*3;return[[r[0]+(d&&c/d),r[1]+(d&&h/d)],[r[0]-(p&&c/p),r[1]-(p&&h/p)]]}});var VXe=Se((Bbr,UXe)=>{"use strict";var T$=NXe(),Qq=Zr().ensureArray;function qS(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]}UXe.exports=function(t,r,n,i,a,o){var s,u,l,f,c,h,d,p,x,b,y=n[0].length,E=n.length,k=a?3*y-2:y,A=o?3*E-2:E;for(t=Qq(t,A),r=Qq(r,A),l=0;l{"use strict";HXe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,u,l){s||(s=[]);var f,c,h,d,p,x,b=Math.max(0,Math.min(Math.floor(u),a)),y=Math.max(0,Math.min(Math.floor(l),o)),E=Math.max(0,Math.min(1,u-b)),k=Math.max(0,Math.min(1,l-y));b*=3,y*=3;var A=E*E,L=A*E,_=1-E,C=_*_,M=C*_,v=k*k,z=v*k,T=1-k,F=T*T,q=F*T;for(x=0;x{"use strict";WXe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3,a*=3;var p=o*o,x=1-o,b=x*x,y=x*o*2,E=-3*b,k=3*(b-y),A=3*(y-p),L=3*p,_=s*s,C=_*s,M=1-s,v=M*M,z=v*M;for(d=0;d{"use strict";ZXe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3,a*=3;var p=o*o,x=p*o,b=1-o,y=b*b,E=y*b,k=s*s,A=1-s,L=A*A,_=A*s*2,C=-3*L,M=3*(L-_),v=3*(_-k),z=3*k;for(d=0;d{"use strict";var YXe=qXe(),KXe=EL().findBin,FYt=VXe(),qYt=GXe(),BYt=jXe(),OYt=XXe();JXe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,u=r[0],l=r[i-1],f=n[0],c=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],p=h*YXe.RELATIVE_CULL_TOLERANCE,x=d*YXe.RELATIVE_CULL_TOLERANCE;u-=p,l+=p,f-=x,c+=x,t.isVisible=function(b,y){return b>u&&bf&&yl||yc},t.setScale=function(){var b=t._x,y=t._y,E=FYt(t._xctrl,t._yctrl,b,y,o.smoothing,s.smoothing);t._xctrl=E[0],t._yctrl=E[1],t.evalxy=qYt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=BYt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=OYt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var y=Math.max(0,Math.floor(b[0]),i-2),E=b[0]-y;return(1-E)*r[y]+E*r[y+1]},t.j2b=function(b){var y=Math.max(0,Math.floor(b[1]),i-2),E=b[1]-y;return(1-E)*n[y]+E*n[y+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var y=Math.max(0,Math.min(KXe(b,r),i-2)),E=r[y],k=r[y+1];return Math.max(0,Math.min(i-1,y+(b-E)/(k-E)))},t.b2j=function(b){var y=Math.max(0,Math.min(KXe(b,n),a-2)),E=n[y],k=n[y+1];return Math.max(0,Math.min(a-1,y+(b-E)/(k-E)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,y){return t.evalxy([],b,y)},t.ab2xy=function(b,y,E){if(!E&&(br[i-1]|yn[a-1]))return[!1,!1];var k=t.a2i(b),A=t.b2j(y),L=t.evalxy([],k,A);if(E){var _=0,C=0,M=[],v,z,T,F;br[i-1]?(v=i-2,z=1,_=(b-r[i-1])/(r[i-1]-r[i-2])):(v=Math.max(0,Math.min(i-2,Math.floor(k))),z=k-v),yn[a-1]?(T=a-2,F=1,C=(y-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(A))),F=A-T),_&&(t.dxydi(M,v,T,z,F),L[0]+=M[0]*_,L[1]+=M[1]*_),C&&(t.dxydj(M,v,T,z,F),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,y,E){return[y.c2p(b[0]),E.c2p(b[1])]},t.p2x=function(b,y,E){return[y.p2c(b[0]),E.p2c(b[1])]},t.dadi=function(b){var y=Math.max(0,Math.min(r.length-2,b));return r[y+1]-r[y]},t.dbdj=function(b){var y=Math.max(0,Math.min(n.length-2,b));return n[y+1]-n[y]},t.dxyda=function(b,y,E,k){var A=t.dxydi(null,b,y,E,k),L=t.dadi(b,E);return[A[0]/L,A[1]/L]},t.dxydb=function(b,y,E,k){var A=t.dxydj(null,b,y,E,k),L=t.dbdj(y,k);return[A[0]/L,A[1]/L]},t.dxyda_rough=function(b,y,E){var k=h*(E||.1),A=t.ab2xy(b+k,y,!0),L=t.ab2xy(b-k,y,!0);return[(A[0]-L[0])*.5/k,(A[1]-L[1])*.5/k]},t.dxydb_rough=function(b,y,E){var k=d*(E||.1),A=t.ab2xy(b,y+k,!0),L=t.ab2xy(b,y-k,!0);return[(A[0]-L[0])*.5/k,(A[1]-L[1])*.5/k]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var oYe=Se((Hbr,aYe)=>{"use strict";var e8=hu(),QXe=Zr().isArray1D,NYt=bXe(),eYe=SXe(),tYe=EXe(),rYe=zXe(),UYt=IXe(),iYe=$I(),nYe=RXe(),VYt=KI(),HYt=$Xe();aYe.exports=function(t,r){var n=e8.getFromId(t,r.xaxis),i=e8.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,u=r.y,l=[];s&&QXe(s)&&l.push("x"),u&&QXe(u)&&l.push("y"),l.length&&VYt(r,a,o,"a","b",l);var f=r._a=r._a||r.a,c=r._b=r._b||r.b;s=r._x||r.x,u=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?f.length:f,p=o.cheatertype==="index"?c.length:c;s=NYt(d,p,r.cheaterslope)}r._x=s=iYe(s),r._y=u=iYe(u),nYe(s,f,c),nYe(u,f,c),HYt(r),r.setScale();var x=eYe(s),b=eYe(u),y=.5*(x[1]-x[0]),E=.5*(x[1]+x[0]),k=.5*(b[1]-b[0]),A=.5*(b[1]+b[0]),L=1.3;return x=[E-y*L,E+y*L],b=[A-k*L,A+k*L],r._extremes[n._id]=e8.findExtremes(n,x,{padded:!0}),r._extremes[i._id]=e8.findExtremes(i,b,{padded:!0}),tYe(r,"a","b"),tYe(r,"b","a"),rYe(r,a),rYe(r,o),h.clipsegments=UYt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=u,h.a=f,h.b=c,[h]}});var lYe=Se((Gbr,sYe)=>{"use strict";sYe.exports={attributes:Zq(),supplyDefaults:sXe(),plot:_Xe(),calc:oYe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Th(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var fYe=Se((Wbr,uYe)=>{"use strict";uYe.exports=lYe()});var A$=Se((jbr,hYe)=>{"use strict";var GYt=Ey(),u0=Zc(),WYt=zf(),jYt=Du().hovertemplateAttrs,ZYt=Du().texttemplateAttrs,cYe=Xf(),kx=vu().extendFlat,sy=u0.marker,BS=u0.line,XYt=sy.line;hYe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:kx({},u0.mode,{dflt:"markers"}),text:kx({},u0.text,{}),texttemplate:ZYt({editType:"plot"},{keys:["a","b","text"]}),hovertext:kx({},u0.hovertext,{}),line:{color:BS.color,width:BS.width,dash:BS.dash,backoff:BS.backoff,shape:kx({},BS.shape,{values:["linear","spline"]}),smoothing:BS.smoothing,editType:"calc"},connectgaps:u0.connectgaps,fill:kx({},u0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:GYt(),marker:kx({symbol:sy.symbol,opacity:sy.opacity,maxdisplayed:sy.maxdisplayed,angle:sy.angle,angleref:sy.angleref,standoff:sy.standoff,size:sy.size,sizeref:sy.sizeref,sizemin:sy.sizemin,sizemode:sy.sizemode,line:kx({width:XYt.width,editType:"calc"},cYe("marker.line")),gradient:sy.gradient,editType:"calc"},cYe("marker")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:kx({},WYt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:u0.hoveron,hovertemplate:jYt(),zorder:u0.zorder}});var yYe=Se((Zbr,vYe)=>{"use strict";var dYe=Zr(),YYt=Sm(),OS=ec(),KYt=$v(),JYt=I0(),pYe=J3(),$Yt=D0(),QYt=Py(),eKt=A$();vYe.exports=function(t,r,n,i){function a(h,d){return dYe.coerce(t,r,eKt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("text"),a("texttemplate"),a("hovertext");var l=u{"use strict";mYe.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,u=Math.floor(a[1]),l=a[1]-u,f=i.evalxy([],o,u,s,l);return n.yLabel=f[1].toFixed(3),n}});var t8=Se((Ybr,_Ye)=>{"use strict";_Ye.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var xYe=_u(),tKt=R0(),rKt=km(),iKt=F0(),nKt=q0().calcMarkerSize,aKt=t8();bYe.exports=function(t,r){var n=r._carpetTrace=aKt(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,u,l=!1;for(i=0;i{"use strict";var oKt=iT(),TYe=hu(),sKt=yu();AYe.exports=function(t,r,n,i){var a,o,s,u=n[0][0].carpet,l=TYe.getFromId(t,u.xaxis||"x"),f=TYe.getFromId(t,u.yaxis||"y"),c={xaxis:l,yaxis:f,plot:r.plot};for(a=0;a{"use strict";var lKt=sT(),uKt=Zr().fillText;MYe.exports=function(t,r,n,i){var a=lKt(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,u=t.xa._length,l=u*s/2,f=u-l;return o.x0=Math.max(Math.min(o.x0,f),l),o.x1=Math.max(Math.min(o.x1,f),l),a}var c=o.cd[o.index];o.a=c.a,o.b=c.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,p=h._module.formatLabels(c,h);o.yLabel=p.yLabel,delete o.text;var x=[];function b(k,A){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,x.push(L+": "+A.toFixed(3)+k.labelsuffix)}if(!h.hovertemplate){var y=c.hi||h.hoverinfo,E=y.split("+");E.indexOf("all")!==-1&&(E=["a","b","text"]),E.indexOf("a")!==-1&&b(d.aaxis,c.a),E.indexOf("b")!==-1&&b(d.baxis,c.b),x.push("y: "+o.yLabel),E.indexOf("text")!==-1&&uKt(c,h,x),o.extraText=x.join("
")}return a}});var CYe=Se((Qbr,kYe)=>{"use strict";kYe.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 zYe=Se((e2r,LYe)=>{"use strict";LYe.exports={attributes:A$(),supplyDefaults:yYe(),colorbar:ep(),formatLabels:gYe(),calc:wYe(),plot:SYe(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:EYe(),selectPoints:lT(),eventData:CYe(),moduleType:"trace",name:"scattercarpet",basePlotModule:Th(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var IYe=Se((t2r,PYe)=>{"use strict";PYe.exports=zYe()});var S$=Se((r2r,DYe)=>{"use strict";var ly=ET(),y1=T4(),fKt=Xf(),cKt=vu().extendFlat,tg=y1.contours;DYe.exports=cKt({carpet:{valType:"string",editType:"calc"},z:ly.z,a:ly.x,a0:ly.x0,da:ly.dx,b:ly.y,b0:ly.y0,db:ly.dy,text:ly.text,hovertext:ly.hovertext,transpose:ly.transpose,atype:ly.xtype,btype:ly.ytype,fillcolor:y1.fillcolor,autocontour:y1.autocontour,ncontours:y1.ncontours,contours:{type:tg.type,start:tg.start,end:tg.end,size:tg.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:tg.showlines,showlabels:tg.showlabels,labelfont:tg.labelfont,labelformat:tg.labelformat,operation:tg.operation,value:tg.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:y1.line.color,width:y1.line.width,dash:y1.line.dash,smoothing:y1.line.smoothing,editType:"plot"},zorder:y1.zorder},fKt("",{cLetter:"z",autoColorDflt:!1}))});var M$=Se((i2r,qYe)=>{"use strict";var RYe=Zr(),hKt=ZI(),FYe=S$(),dKt=kH(),pKt=mD(),vKt=gD();qYe.exports=function(t,r,n,i){function a(l,f){return RYe.coerce(t,r,FYe,l,f)}function o(l){return RYe.coerce2(t,r,FYe,l)}if(a("carpet"),t.a&&t.b){var s=hKt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var u=a("contours.type")==="constraint";u?dKt(t,r,a,i,n,{hasHover:!1}):(pKt(t,r,a,o),vKt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var UYe=Se((n2r,NYe)=>{"use strict";var yKt=Rp(),BYe=Zr(),mKt=KI(),gKt=$I(),_Kt=QI(),xKt=eD(),OYe=$V(),bKt=M$(),wKt=t8(),TKt=yH();NYe.exports=function(t,r){var n=r._carpetTrace=wKt(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),bKt(a,r,r._defaultColor,t._fullLayout)}var o=AKt(t,r);return TKt(r,r._z),o}};function AKt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,u,l,f,c;n._minDtick=0,i._minDtick=0,BYe.isArray1D(t.z)&&mKt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,u=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],u=u?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,l=t.b0||0,f=t.db||1,c=t._z=gKt(t._z||t.z,t.transpose),t._emptypoints=xKt(c),_Kt(c,t._emptypoints);var h=BYe.maxRowLength(c),d=t.xtype==="scaled"?"":a,p=OYe(t,d,o,s,h,n),x=t.ytype==="scaled"?"":u,b=OYe(t,x,l,f,c.length,i),y={a:p,b,z:c};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&yKt(e,t,{vals:c,containerStr:"",cLetter:"z"}),[y]}});var HYe=Se((a2r,VYe)=>{"use strict";var SKt=Zr().isArrayOrTypedArray;VYe.exports=function(e,t,r,n){var i,a,o,s,u,l,f,c,h,d,p,x,b,y=SKt(r)?"a":"b",E=y==="a"?e.aaxis:e.baxis,k=E.smoothing,A=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,_=y==="a"?n:r,C=y==="a"?t.a.length:t.b.length,M=y==="a"?t.b.length:t.a.length,v=Math.floor(y==="a"?e.b2j(_):e.a2i(_)),z=y==="a"?function(be){return e.evalxy([],be,v)}:function(be){return e.evalxy([],v,be)};k&&(o=Math.max(0,Math.min(M-2,v)),s=v-o,a=y==="a"?function(be,ze){return e.dxydi([],be,o,ze,s)}:function(be,ze){return e.dxydj([],o,be,s,ze)});var T=A(L[0]),F=A(L[1]),q=T0?Math.floor:Math.ceil,j=q>0?Math.ceil:Math.floor,G=q>0?Math.min:Math.max,O=q>0?Math.max:Math.min,W=H(T+U),re=j(F-U);f=z(T);var ne=[[f]];for(i=W;i*q{"use strict";var i8=Nl(),n8=x$(),XYe=b$(),$k=yu(),m1=Zr(),MKt=gH(),EKt=_H(),hw=bD(),r8=S4(),kKt=TH(),CKt=wH(),LKt=AH(),zKt=t8(),GYe=HYe();YYe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,"contour").each(function(s){var u=i8.select(this),l=s[0],f=l.trace,c=f._carpetTrace=zKt(t,f),h=t.calcdata[c.index][0];if(!c.visible||c.visible==="legendonly")return;var d=l.a,p=l.b,x=f.contours,b=CKt(x,r,l),y=x.type==="constraint",E=x._operation,k=y?E==="="?"lines":"fill":x.coloring;function A(H){var j=c.ab2xy(H[0],H[1],!0);return[a.c2p(j[0]),o.c2p(j[1])]}var L=[[d[0],p[p.length-1]],[d[d.length-1],p[p.length-1]],[d[d.length-1],p[0]],[d[0],p[0]]];MKt(b);var _=(d[d.length-1]-d[0])*1e-8,C=(p[p.length-1]-p[0])*1e-8;EKt(b,_,C);var M=b;x.type==="constraint"&&(M=kKt(b,E)),PKt(b,A);var v,z,T,F,q=[];for(F=h.clipsegments.length-1;F>=0;F--)v=h.clipsegments[F],z=n8([],v.x,a.c2p),T=n8([],v.y,o.c2p),z.reverse(),T.reverse(),q.push(XYe(z,T,v.bicubic));var U="M"+q.join("L")+"Z";RKt(u,h.clipsegments,a,o,y,k),FKt(f,u,a,o,M,L,A,c,h,k,U),IKt(u,b,t,l,x,r,c),$k.setClipUrl(u,c._clipPathId,t)})};function PKt(e,t){var r,n,i,a,o,s,u,l,f;for(r=0;rb&&(n.max=b),n.len=n.max-n.min}function WYe(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 jYe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function ZYe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function RKt(e,t,r,n,i,a){var o,s,u,l,f=m1.ensureSingle(e,"g","contourbg"),c=f.selectAll("path").data(a==="fill"&&!i?[0]:[]);c.enter().append("path"),c.exit().remove();var h=[];for(l=0;l=0&&(d=z,x=b):Math.abs(h[1]-d[1])=0&&(d=z,x=b):m1.log("endpt to newendpt is not vert. or horz.",h,d,z)}if(x>=0)break;l+=M(h,d),h=d}if(x===t.edgepaths.length){m1.log("unclosed perimeter path");break}u=x,c=f.indexOf(u)===-1,c&&(u=f[0],l+=M(h,d)+"Z",h=null)}for(u=0;u{"use strict";JYe.exports={attributes:S$(),supplyDefaults:M$(),colorbar:AD(),calc:UYe(),plot:KYe(),style:TD(),moduleType:"trace",name:"contourcarpet",basePlotModule:Th(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var eKe=Se((l2r,QYe)=>{"use strict";QYe.exports=$Ye()});var o8=Se((u2r,aKe)=>{"use strict";var a8=Zr().extendFlat,Qk=Zc(),tKe=Gc().axisHoverFormat,iKe=Id().dash,BKt=i3(),nKe=HT(),OKt=nKe.INCREASING.COLOR,NKt=nKe.DECREASING.COLOR,E$=Qk.line;function rKe(e){return{line:{color:a8({},E$.color,{dflt:e}),width:E$.width,dash:iKe,editType:"style"},editType:"style"}}aKe.exports={xperiod:Qk.xperiod,xperiod0:Qk.xperiod0,xperiodalignment:Qk.xperiodalignment,xhoverformat:tKe("x"),yhoverformat:tKe("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:a8({},E$.width,{}),dash:a8({},iKe,{}),editType:"style"},increasing:rKe(OKt),decreasing:rKe(NKt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:a8({},BKt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:Qk.zorder}});var k$=Se((f2r,oKe)=>{"use strict";var UKt=Ul(),VKt=Zr();oKe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),u=n("low"),l=n("close");n("hoverlabel.split");var f=UKt.getComponentMethod("calendars","handleTraceDefaults");if(f(t,r,["x"],i),!!(o&&s&&u&&l)){var c=Math.min(o.length,s.length,u.length,l.length);return a&&(c=Math.min(c,VKt.minRowLength(a))),r._length=c,c}}});var uKe=Se((c2r,lKe)=>{"use strict";var HKt=Zr(),GKt=k$(),WKt=zy(),jKt=o8();lKe.exports=function(t,r,n,i){function a(s,u){return HKt.coerce(t,r,jKt,s,u)}var o=GKt(t,r,a,i);if(!o){r.visible=!1;return}WKt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),sKe(t,r,a,"increasing"),sKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function sKe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var C$=Se((h2r,cKe)=>{"use strict";var NS=Zr(),s8=NS._,l8=hu(),ZKt=Iy(),eC=ju().BADNUM;function XKt(e,t){var r=l8.getFromId(e,t.xaxis),n=l8.getFromId(e,t.yaxis),i=KKt(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var u=fKe(e,t,o,s,n,YKt);return t._extremes[r._id]=l8.findExtremes(r,s,{vpad:a/2}),u.length?(NS.extendFlat(u[0].t,{wHover:a/2,tickLen:i}),u):[{t:{empty:!0}}]}function YKt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function fKe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),u=i.makeCalcdata(t,"low"),l=i.makeCalcdata(t,"close"),f=NS.isArrayOrTypedArray(t.text),c=NS.isArrayOrTypedArray(t.hovertext),h=!0,d=null,p=!!t.xperiodalignment,x=[],b=0;bd):h=L>E,d=L;var _=a(E,k,A,L);_.pos=y,_.yc=(E+L)/2,_.i=b,_.dir=h?"increasing":"decreasing",_.x=_.pos,_.y=[A,k],p&&(_.orig_p=r[b]),f&&(_.tx=t.text[b]),c&&(_.htx=t.hovertext[b]),x.push(_)}else x.push({pos:y,empty:!0})}return t._extremes[i._id]=l8.findExtremes(i,NS.concat(u,s),{padded:!0}),x.length&&(x[0].t={labels:{open:s8(e,"open:")+" ",high:s8(e,"high:")+" ",low:s8(e,"low:")+" ",close:s8(e,"close:")+" "}}),x}function KKt(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 JKt=Nl(),hKe=Zr();dKe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;hKe.makeTraceGroups(i,n,"trace ohlc").each(function(u){var l=JKt.select(this),f=u[0],c=f.t,h=f.trace;if(h.visible!==!0||c.empty){l.remove();return}var d=c.tickLen,p=l.selectAll("path").data(hKe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(x){if(x.empty)return"M0,0Z";var b=o.c2p(x.pos-d,!0),y=o.c2p(x.pos+d,!0),E=s?(b+y)/2:o.c2p(x.pos,!0),k=a.c2p(x.o,!0),A=a.c2p(x.h,!0),L=a.c2p(x.l,!0),_=a.c2p(x.c,!0);return"M"+b+","+k+"H"+E+"M"+E+","+A+"V"+L+"M"+y+","+_+"H"+E})})}});var yKe=Se((p2r,vKe)=>{"use strict";var L$=Nl(),$Kt=yu(),QKt=Pl();vKe.exports=function(t,r,n){var i=n||L$.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;L$.select(this).selectAll("path").each(function(s){if(!s.empty){var u=o[s.dir].line;L$.select(this).style("fill","none").call(QKt.stroke,u.color).call($Kt.dashLine,u.dash,u.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var P$=Se((v2r,bKe)=>{"use strict";var z$=hu(),eJt=Zr(),u8=jc(),tJt=Pl(),rJt=Zr().fillText,mKe=HT(),iJt={increasing:mKe.INCREASING.SYMBOL,decreasing:mKe.DECREASING.SYMBOL};function nJt(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?_Ke(e,t,r,n):xKe(e,t,r,n)}function gKe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,u=o.type,l=u==="ohlc"?"l":"min",f=u==="ohlc"?"h":"max",c,h,d=s.bPos||0,p=function(z){return z.pos+d-t},x=s.bdPos||s.tickLen,b=s.wHover,y=Math.min(1,x/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));c=e.maxHoverDistance-y,h=e.maxSpikeDistance-y;function E(z){var T=p(z);return u8.inbox(T-b,T+b,c)}function k(z){var T=z[l],F=z[f];return T===F||u8.inbox(T-r,F-r,c)}function A(z){return(E(z)+k(z))/2}var L=u8.getDistanceFunction(n,E,k,A);if(u8.getClosest(i,L,e),e.index===!1)return null;var _=i[e.index];if(_.empty)return null;var C=_.dir,M=o[C],v=M.line.color;return tJt.opacity(v)&&M.line.width?e.color=v:e.color=M.fillcolor,e.x0=a.c2p(_.pos+d-x,!0),e.x1=a.c2p(_.pos+d+x,!0),e.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,e.spikeDistance=A(_)*h/c,e.xSpike=a.c2p(_.pos,!0),e}function _Ke(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,u=[],l=gKe(e,t,r,n);if(!l)return[];var f=l.index,c=i[f],h=c.hi||o.hoverinfo,d=h.split("+"),p=h==="all",x=p||d.indexOf("y")!==-1;if(!x)return[];for(var b=["high","open","close","low"],y={},E=0;E"+s.labels[k]+z$.hoverLabelText(a,A,o.yhoverformat)):(_=eJt.extendFlat({},l),_.y0=_.y1=L,_.yLabelVal=A,_.yLabel=s.labels[k]+z$.hoverLabelText(a,A,o.yhoverformat),_.name="",u.push(_),y[A]=_)}return u}function xKe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,u=gKe(e,t,r,n);if(!u)return[];var l=u.index,f=i[l],c=u.index=f.i,h=f.dir;function d(A){return s.labels[A]+z$.hoverLabelText(a,o[A][c],o.yhoverformat)}var p=f.hi||o.hoverinfo,x=p.split("+"),b=p==="all",y=b||x.indexOf("y")!==-1,E=b||x.indexOf("text")!==-1,k=y?[d("open"),d("high"),d("low"),d("close")+" "+iJt[h]]:[];return E&&rJt(f,o,k),u.extraText=k.join("
"),u.y0=u.y1=a.c2p(f.yc,!0),[u]}bKe.exports={hoverPoints:nJt,hoverSplit:_Ke,hoverOnPoints:xKe}});var I$=Se((y2r,wKe)=>{"use strict";wKe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";TKe.exports={moduleType:"trace",name:"ohlc",basePlotModule:Th(),categories:["cartesian","svg","showLegend"],meta:{},attributes:o8(),supplyDefaults:uKe(),calc:C$().calc,plot:pKe(),style:yKe(),hoverPoints:P$().hoverPoints,selectPoints:I$()}});var MKe=Se((g2r,SKe)=>{"use strict";SKe.exports=AKe()});var R$=Se((_2r,CKe)=>{"use strict";var D$=Zr().extendFlat,EKe=Gc().axisHoverFormat,f0=o8(),US=p4();function kKe(e){return{line:{color:D$({},US.line.color,{dflt:e}),width:US.line.width,editType:"style"},fillcolor:US.fillcolor,editType:"style"}}CKe.exports={xperiod:f0.xperiod,xperiod0:f0.xperiod0,xperiodalignment:f0.xperiodalignment,xhoverformat:EKe("x"),yhoverformat:EKe("y"),x:f0.x,open:f0.open,high:f0.high,low:f0.low,close:f0.close,line:{width:D$({},US.line.width,{}),editType:"style"},increasing:kKe(f0.increasing.line.color.dflt),decreasing:kKe(f0.decreasing.line.color.dflt),text:f0.text,hovertext:f0.hovertext,whiskerwidth:D$({},US.whiskerwidth,{dflt:0}),hoverlabel:f0.hoverlabel,zorder:US.zorder}});var PKe=Se((x2r,zKe)=>{"use strict";var aJt=Zr(),oJt=Pl(),sJt=k$(),lJt=zy(),uJt=R$();zKe.exports=function(t,r,n,i){function a(s,u){return aJt.coerce(t,r,uJt,s,u)}var o=sJt(t,r,a,i);if(!o){r.visible=!1;return}lJt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),LKe(t,r,a,"increasing"),LKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function LKe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",oJt.addOpacity(i,.5))}});var FKe=Se((b2r,RKe)=>{"use strict";var IKe=Zr(),DKe=hu(),fJt=Iy(),cJt=C$().calcCommon;RKe.exports=function(e,t){var r=e._fullLayout,n=DKe.getFromId(e,t.xaxis),i=DKe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=fJt(t,n,"x",a).vals,s=cJt(e,t,a,o,i,hJt);return s.length?(IKe.extendFlat(s[0].t,{num:r._numBoxes,dPos:IKe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function hJt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var BKe=Se((w2r,qKe)=>{"use strict";qKe.exports={moduleType:"trace",name:"candlestick",basePlotModule:Th(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:R$(),layoutAttributes:v4(),supplyLayoutDefaults:UI().supplyLayoutDefaults,crossTraceCalc:HI().crossTraceCalc,supplyDefaults:PKe(),calc:FKe(),plot:GI().plot,layerName:"boxlayer",style:WI().style,hoverPoints:P$().hoverPoints,selectPoints:I$()}});var NKe=Se((T2r,OKe)=>{"use strict";OKe.exports=BKe()});var q$=Se((A2r,UKe)=>{"use strict";var c8=Zr(),dJt=gm(),f8=c8.deg2rad,F$=c8.rad2deg;UKe.exports=function(t,r,n){switch(dJt(t,n),t._id){case"x":case"radialaxis":pJt(t,r);break;case"angularaxis":mJt(t,r);break}};function pJt(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,u=n>i?function(l){return l<=0}:function(l){return l>=0};e.c2g=function(l){var f=e.c2l(l)-n;return(u(f)?f:0)+s},e.g2c=function(l){return e.l2c(l+n-s)},e.g2p=function(l){return l*o},e.c2p=function(l){return e.g2p(e.c2g(l))}}}function vJt(e,t){return t==="degrees"?f8(e):e}function yJt(e,t){return t==="degrees"?F$(e):e}function mJt(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return vJt(n(a),o)},e.c2d=function(a,o){return i(yJt(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],u=a._length,l,f,c=function(b){return e.d2c(b,a.thetaunit)};if(s)for(l=new Array(u),f=0;f{"use strict";VKe.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 p8=Se((M2r,ZKe)=>{"use strict";var dw=Zr(),HKe=w5().tester,B$=dw.findIndexOfMin,WKe=dw.isAngleInsideSector,gJt=dw.angleDelta,GKe=dw.angleDist;function _Jt(e,t,r,n,i){if(!WKe(t,n))return!1;var a,o;r[0]0?o:1/0},n=B$(t,r),i=dw.mod(n+1,t.length);return[t[n],t[i]]}function d8(e){return Math.abs(e)>1e-10?e:0}function O$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function XKe(e){return e<0?-1:e>0?1:0}function HS(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 GS(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function YKe(e,t){return t*e.radius}function EJt(e,t,r,n){var i=GS(e,HS([r,t])),a=i[0],o=i[1],s=GS(e,HS([n,t])),u=s[0],l=s[1];if(t===0)return["M"+a+","+o,"L"+u+","+l].join(" ");var f=YKe(e,1/Math.abs(t));return["M"+a+","+o,"A"+f+","+f+" 0 0,"+(t<0?1:0)+" "+u+","+l].join(" ")}function kJt(e,t,r,n){var i=YKe(e,1/(t+1)),a=GS(e,HS([t,r])),o=a[0],s=a[1],u=GS(e,HS([t,n])),l=u[0],f=u[1];if(XKe(r)!==XKe(n)){var c=GS(e,HS([t,0])),h=c[0],d=c[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var pw=Nl(),CJt=cd(),yw=Ul(),Fc=Zr(),rg=Fc.strRotate,bd=Fc.strTranslate,U$=Pl(),tC=yu(),LJt=Sc(),dv=hu(),zJt=gm(),PJt=q$(),IJt=wy().doAutoRange,g1=G7(),m8=gp(),JKe=jc(),DJt=Mb(),RJt=nh().prepSelect,FJt=nh().selectOnClick,V$=nh().clearOutline,$Ke=Ty(),QKe=l5(),eJe=y5().redrawReglTraces,qJt=Qh().MID_SHIFT,Cx=h8(),_1=p8(),g8=N$(),v8=g8.smith,BJt=g8.reactanceArc,OJt=g8.resistanceArc,y8=g8.smithTransform,NJt=Fc._,tJe=Fc.mod,Lx=Fc.deg2rad,vw=Fc.rad2deg;function rJe(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 Vd=rJe.prototype;aJe.exports=function(t,r,n){return new rJe(t,r,n)};Vd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(y=l,E=l*b,L=(f-E)/i.h/2,k=[s[0],s[1]],A=[u[0]+L,u[1]-L]):(y=f/b,E=f,L=(l-y)/i.w/2,k=[s[0]+L,s[1]-L],A=[u[0],u[1]]),r.xLength2=y,r.yLength2=E,r.xDomain2=k,r.yDomain2=A;var _=r.xOffset2=i.l+i.w*k[0],C=r.yOffset2=i.t+i.h*(1-A[1]),M=r.radius=y/d,v=r.innerRadius=r.getHole(t)*M,z=r.cx=_-M*h[0],T=r.cy=C+M*h[3],F=r.cxx=z-_,q=r.cyy=T-C,U=a.side,H;U==="counterclockwise"?(H=U,U="top"):U==="clockwise"&&(H=U,U="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:U,_trueSide:H,domain:[v/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:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:A});var j=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",j).attr("transform",bd(F,q)),n.frontplot.attr("transform",bd(_,C)).call(tC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",j).attr("transform",bd(z,T)).call(U$.fill,t.bgcolor)};Vd.mockAxis=function(e,t,r,n){var i=Fc.extendFlat({},r,n);return PJt(i,t,e),i};Vd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Fc.extendFlat({type:"linear"},r);zJt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var u=n.sectorBBox,l=s[a],f=n.radialAxis._rl,c=(f[1]-f[0])/(1-n.getHole(t));o.range=[u[l[0]]*c,u[l[1]]*c]},o.isPtWithinRange=a==="x"&&!i?function(u){return n.isPtInside(u)}:function(){return!0},o.setRange(),o.setScale(),o};Vd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);IJt(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 u=i.r2l(i.maxallowed);i._rl[0]90&&f<=270&&(c.tickangle=180);var p=d?function(M){var v=y8(r,v8([M.x,0]));return bd(v[0]-s,v[1]-u)}:function(M){return bd(c.l2p(M.x)+o,0)},x=d?function(M){return OJt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(c.r2p(M.x)+o)},b=iJe(l);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){c.setScale();var y=0,E=d?(c.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return dv.tickText(c,M,!0,!1)}):dv.calcTicks(c),k=d?E:dv.clipEnds(c,E),A=dv.getTickSigns(c)[2];d&&((c.ticks==="top"&&c.side==="bottom"||c.ticks==="bottom"&&c.side==="top")&&(A=-A),c.ticks==="top"&&c.side==="top"&&(y=-c.ticklen),c.ticks==="bottom"&&c.side==="bottom"&&(y=c.ticklen)),dv.drawTicks(n,c,{vals:E,layer:i["radial-axis"],path:dv.makeTickPath(c,0,A),transFn:p,crisp:!1}),dv.drawGrid(n,c,{vals:k,layer:i["radial-grid"],path:x,transFn:Fc.noop,crisp:!1}),dv.drawLabels(n,c,{vals:E,layer:i["radial-axis"],transFn:p,labelFns:dv.makeLabelFns(c,y)})}var L=r.radialAxisAngle=r.vangles?vw(nJe(Lx(l.angle),r.vangles)):l.angle,_=bd(s,u),C=_+rg(-L);rC(i["radial-axis"],h&&(l.showticklabels||l.ticks),{transform:C}),rC(i["radial-grid"],h&&l.showgrid,{transform:d?"":_}),rC(i["radial-line"].select("line"),h&&l.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",l.linewidth).call(U$.stroke,l.linecolor)};Vd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,u=n.getRadial(t),l=n.id+"title",f=0;if(u.title){var c=tC.bBox(n.layers["radial-axis"].node()).height,h=u.title.font.size,d=u.side;f=d==="top"?h:d==="counterclockwise"?-(c+h*.4):c+h*.8}var p=r!==void 0?r:n.radialAxisAngle,x=Lx(p),b=Math.cos(x),y=Math.sin(x),E=o+a/2*b+f*y,k=s-a/2*y+f*b;n.layers["radial-axis-title"]=DJt.draw(i,l,{propContainer:u,propName:n.id+".radialaxis.title",placeholder:NJt(i,"Click to enter radial axis title"),attributes:{x:E,y:k,"text-anchor":"middle"},transform:{rotate:-p}})}};Vd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,u=r.cy,l=r.getAngular(t),f=r.angularAxis,c=r.isSmith;c||(r.fillViewInitialKey("angularaxis.rotation",l.rotation),f.setGeometry(),f.setScale());var h=c?function(v){var z=y8(r,v8([0,v.x]));return Math.atan2(z[0]-s,z[1]-u)-Math.PI/2}:function(v){return f.t2g(v.x)};f.type==="linear"&&f.thetaunit==="radians"&&(f.tick0=vw(f.tick0),f.dtick=vw(f.dtick));var d=function(v){return bd(s+a*Math.cos(v),u-a*Math.sin(v))},p=c?function(v){var z=y8(r,v8([0,v.x]));return bd(z[0],z[1])}:function(v){return d(h(v))},x=c?function(v){var z=y8(r,v8([0,v.x])),T=Math.atan2(z[0]-s,z[1]-u)-Math.PI/2;return bd(z[0],z[1])+rg(-vw(T))}:function(v){var z=h(v);return d(z)+rg(-vw(z))},b=c?function(v){return BJt(r,v.x,0,1/0)}:function(v){var z=h(v),T=Math.cos(z),F=Math.sin(z);return"M"+[s+o*T,u-o*F]+"L"+[s+a*T,u-a*F]},y=dv.makeLabelFns(f,0),E=y.labelStandoff,k={};k.xFn=function(v){var z=h(v);return Math.cos(z)*E},k.yFn=function(v){var z=h(v),T=Math.sin(z)>0?.2:1;return-Math.sin(z)*(E+v.fontSize*T)+Math.abs(Math.cos(z))*(v.fontSize*qJt)},k.anchorFn=function(v){var z=h(v),T=Math.cos(z);return Math.abs(T)<.1?"middle":T>0?"start":"end"},k.heightFn=function(v,z,T){var F=h(v);return-.5*(1+Math.sin(F))*T};var A=iJe(l);r.angularTickLayout!==A&&(i["angular-axis"].selectAll("."+f._id+"tick").remove(),r.angularTickLayout=A);var L=c?[1/0].concat(f.tickvals||[]).map(function(v){return dv.tickText(f,v,!0,!1)}):dv.calcTicks(f);c&&(L[0].text="\u221E",L[0].fontSize*=1.75);var _;if(t.gridshape==="linear"?(_=L.map(h),Fc.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,f.type==="category"&&(L=L.filter(function(v){return Fc.isAngleInsideSector(h(v),r.sectorInRad)})),f.visible){var C=f.ticks==="inside"?-1:1,M=(f.linewidth||1)/2;dv.drawTicks(n,f,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*f.ticklen,transFn:x,crisp:!1}),dv.drawGrid(n,f,{vals:L,layer:i["angular-grid"],path:b,transFn:Fc.noop,crisp:!1}),dv.drawLabels(n,f,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:k})}rC(i["angular-line"].select("path"),l.showline,{d:r.pathSubplot(),transform:bd(s,u)}).attr("stroke-width",l.linewidth).call(U$.stroke,l.linecolor)};Vd.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)}};Vd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Cx.MINZOOM,s=Cx.OFFEDGE,u=t.radius,l=t.innerRadius,f=t.cx,c=t.cy,h=t.cxx,d=t.cyy,p=t.sectorInRad,x=t.vangles,b=t.radialAxis,y=_1.clampTiny,E=_1.findXYatLength,k=_1.findEnclosingVertexAngles,A=Cx.cornerHalfWidth,L=Cx.cornerLen/2,_,C,M=g1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");pw.select(M).attr("d",t.pathSubplot()).attr("transform",bd(f,c)),M.onmousemove=function(fe){JKe.hover(n,fe,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(fe){n._dragging||m8.unhover(n,fe)};var v={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},z,T,F,q,U,H,j,G,O;function W(fe,Ze){return Math.sqrt(fe*fe+Ze*Ze)}function re(fe,Ze){return W(fe-h,Ze-d)}function ne(fe,Ze){return Math.atan2(d-Ze,fe-h)}function be(fe,Ze){return[fe*Math.cos(Ze),fe*Math.sin(-Ze)]}function ze(fe,Ze){if(fe===0)return t.pathSector(2*A);var et=L/fe,gt=Ze-et,Pt=Ze+et,Qe=Math.max(0,Math.min(fe,u)),Xe=Qe-A,Tt=Qe+A;return"M"+be(Xe,gt)+"A"+[Xe,Xe]+" 0,0,0 "+be(Xe,Pt)+"L"+be(Tt,Pt)+"A"+[Tt,Tt]+" 0,0,1 "+be(Tt,gt)+"Z"}function Ce(fe,Ze,et){if(fe===0)return t.pathSector(2*A);var gt=be(fe,Ze),Pt=be(fe,et),Qe=y((gt[0]+Pt[0])/2),Xe=y((gt[1]+Pt[1])/2),Tt,xt;if(Qe&&Xe){var _t=Xe/Qe,Ct=-1/_t,jt=E(A,_t,Qe,Xe);Tt=E(L,Ct,jt[0][0],jt[0][1]),xt=E(L,Ct,jt[1][0],jt[1][1])}else{var At,Te;Xe?(At=L,Te=A):(At=A,Te=L),Tt=[[Qe-At,Xe-Te],[Qe+At,Xe-Te]],xt=[[Qe-At,Xe+Te],[Qe+At,Xe+Te]]}return"M"+Tt.join("L")+"L"+xt.reverse().join("L")+"Z"}function he(){F=null,q=null,U=t.pathSubplot(),H=!1;var fe=n._fullLayout[t.id];j=CJt(fe.bgcolor).getLuminance(),G=g1.makeZoombox(a,j,f,c,U),G.attr("fill-rule","evenodd"),O=g1.makeCorners(a,f,c),V$(n)}function te(fe,Ze){return Ze=Math.max(Math.min(Ze,u),l),feo?(fe-1&&fe===1&&FJt(Ze,n,[t.xaxis],[t.yaxis],t.id,v),et.indexOf("event")>-1&&JKe.click(n,Ze,t.id)}v.prepFn=function(fe,Ze,et){var gt=n._fullLayout.dragmode,Pt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Qe=n._fullLayout._invTransform;_=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var Xe=Fc.apply3DTransform(Qe)(Ze-Pt.left,et-Pt.top);if(z=Xe[0],T=Xe[1],x){var Tt=_1.findPolygonOffset(u,p[0],p[1],x);z+=h+Tt[0],T+=d+Tt[1]}switch(gt){case"zoom":v.clickFn=Be,r||(x?v.moveFn=Oe:v.moveFn=Ee,v.doneFn=Re,he(fe,Ze,et));break;case"select":case"lasso":RJt(fe,Ze,et,v,gt);break}},m8.init(v)};Vd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,u=n.cx,l=n.cy,f=n.radialAxis,c=Cx.radialDragBoxSize,h=c/2;if(!f.visible)return;var d=Lx(n.radialAxisAngle),p=f._rl,x=p[0],b=p[1],y=p[r],E=.75*(p[1]-p[0])/(1-n.getHole(t))/o,k,A,L;r?(k=u+(o+h)*Math.cos(d),A=l-(o+h)*Math.sin(d),L="radialdrag"):(k=u+(s-h)*Math.cos(d),A=l-(s-h)*Math.sin(d),L="radialdrag-inner");var _=g1.makeRectDragger(a,L,"crosshair",-h,-h,c,c),C={element:_,gd:i};e.dragmode===!1&&(C.dragmode=!1),rC(pw.select(_),f.visible&&s0!=(r?z>x:z=90||i>90&&a>=450?d=1:s<=0&&l<=0?d=0:d=Math.max(s,l),i<=180&&a>=180||i>180&&a>=540?f=-1:o>=0&&u>=0?f=0:f=Math.min(o,u),i<=270&&a>=270||i>270&&a>=630?c=-1:s>=0&&l>=0?c=0:c=Math.min(s,l),a>=360?h=1:o<=0&&u<=0?h=0:h=Math.max(o,u),[f,c,h,d]}function nJe(e,t){var r=function(i){return Fc.angleDist(e,i)},n=Fc.findIndexOfMin(t,r);return t[n]}function rC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var G$=Se((C2r,cJe)=>{"use strict";var VJt=Ih(),Uu=Rd(),HJt=Ec().attributes,c0=Zr().extendFlat,oJe=_c().overrideAll,sJe=oJe({color:Uu.color,showline:c0({},Uu.showline,{dflt:!0}),linecolor:Uu.linecolor,linewidth:Uu.linewidth,showgrid:c0({},Uu.showgrid,{dflt:!0}),gridcolor:Uu.gridcolor,gridwidth:Uu.gridwidth,griddash:Uu.griddash},"plot","from-root"),lJe=oJe({tickmode:Uu.minor.tickmode,nticks:Uu.nticks,tick0:Uu.tick0,dtick:Uu.dtick,tickvals:Uu.tickvals,ticktext:Uu.ticktext,ticks:Uu.ticks,ticklen:Uu.ticklen,tickwidth:Uu.tickwidth,tickcolor:Uu.tickcolor,ticklabelstep:Uu.ticklabelstep,showticklabels:Uu.showticklabels,labelalias:Uu.labelalias,showtickprefix:Uu.showtickprefix,tickprefix:Uu.tickprefix,showticksuffix:Uu.showticksuffix,ticksuffix:Uu.ticksuffix,showexponent:Uu.showexponent,exponentformat:Uu.exponentformat,minexponent:Uu.minexponent,separatethousands:Uu.separatethousands,tickfont:Uu.tickfont,tickangle:Uu.tickangle,tickformat:Uu.tickformat,tickformatstops:Uu.tickformatstops,layer:Uu.layer},"plot","from-root"),uJe={visible:c0({},Uu.visible,{dflt:!0}),type:c0({},Uu.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Uu.autotypenumbers,autorangeoptions:{minallowed:Uu.autorangeoptions.minallowed,maxallowed:Uu.autorangeoptions.maxallowed,clipmin:Uu.autorangeoptions.clipmin,clipmax:Uu.autorangeoptions.clipmax,include:Uu.autorangeoptions.include,editType:"plot"},autorange:c0({},Uu.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:c0({},Uu.minallowed,{editType:"plot"}),maxallowed:c0({},Uu.maxallowed,{editType:"plot"}),range:c0({},Uu.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Uu.categoryorder,categoryarray:Uu.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Uu.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:c0({},Uu.title.text,{editType:"plot",dflt:""}),font:c0({},Uu.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Uu.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(uJe,sJe,lJe);var fJe={visible:c0({},Uu.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Uu.autotypenumbers,categoryorder:Uu.categoryorder,categoryarray:Uu.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:Uu.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(fJe,sJe,lJe);cJe.exports={domain:HJt({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:VJt.background},radialaxis:uJe,angularaxis:fJe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var vJe=Se((L2r,pJe)=>{"use strict";var _8=Zr(),GJt=Pl(),WJt=_f(),jJt=k_(),ZJt=Dd().getSubplotData,XJt=xb(),YJt=T3(),KJt=e_(),JJt=t_(),$Jt=QP(),QJt=Y5(),e$t=bN(),t$t=L3(),dJe=G$(),r$t=q$(),x8=h8(),hJe=x8.axisNames;function i$t(e,t,r,n){var i=r("bgcolor");n.bgColor=GJt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=ZJt(n.fullData,x8.name,n.id),s=n.layoutOut,u;function l(G,O){return r(u+"."+G,O)}for(var f=0;f{"use strict";var a$t=Dd().getSubplotCalcData,o$t=Zr().counterRegex,s$t=H$(),mJe=h8(),gJe=mJe.attr,mw=mJe.name,yJe=o$t(mw),_Je={};_Je[gJe]={valType:"subplotid",dflt:mw,editType:"calc"};function l$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[mw],i=0;i{"use strict";var f$t=Du().hovertemplateAttrs,c$t=Du().texttemplateAttrs,w8=vu().extendFlat,h$t=Ey(),h0=Zc(),d$t=zf(),WS=h0.line;bJe.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:c$t({editType:"plot"},{keys:["r","theta","text"]}),hovertext:h0.hovertext,line:{color:WS.color,width:WS.width,dash:WS.dash,backoff:WS.backoff,shape:w8({},WS.shape,{values:["linear","spline"]}),smoothing:WS.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:w8({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:w8({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:h$t(),hoverinfo:w8({},d$t.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:f$t(),selected:h0.selected,unselected:h0.unselected}});var A8=Se((I2r,AJe)=>{"use strict";var T8=Zr(),jS=ec(),p$t=$v(),v$t=I0(),wJe=J3(),y$t=D0(),m$t=Py(),g$t=Sm().PTS_LINESONLY,_$t=iC();function x$t(e,t,r,n){function i(s,u){return T8.coerce(e,t,_$t,s,u)}var a=TJe(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var b$t=Zr(),SJe=hu();MJe.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 u=o.c2l(t.r);i.rLabel=SJe.tickText(o,u,!0).text;var l=s.thetaunit==="degrees"?b$t.rad2deg(t.theta):t.theta;return i.thetaLabel=SJe.tickText(s,l,!0).text,i}});var CJe=Se((R2r,kJe)=>{"use strict";var EJe=_u(),w$t=ju().BADNUM,T$t=hu(),A$t=R0(),S$t=km(),M$t=F0(),E$t=q0().calcMarkerSize;kJe.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"),u=o.makeCalcdata(r,"theta"),l=r._length,f=new Array(l),c=0;c{"use strict";var k$t=iT(),LJe=ju().BADNUM;zJe.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},u=r.radialAxis,l=r.angularAxis,f=0;f{"use strict";var C$t=sT();function L$t(e,t,r,n){var i=C$t(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],u=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,IJe(s,u,o,a),a.hovertemplate=u.hovertemplate,i}}function IJe(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 u=e.hi||t.hoverinfo,l=[];function f(h,d){l.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var c=u.split("+");c.indexOf("all")!==-1&&(c=["r","theta","text"]),c.indexOf("r")!==-1&&f(i,n.rLabel),c.indexOf("theta")!==-1&&f(a,n.thetaLabel),c.indexOf("text")!==-1&&n.text&&(l.push(n.text),delete n.text),n.extraText=l.join("
")}}DJe.exports={hoverPoints:L$t,makeHoverPointText:IJe}});var FJe=Se((B2r,RJe)=>{"use strict";RJe.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:b8(),categories:["polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:A8().supplyDefaults,colorbar:ep(),formatLabels:S8(),calc:CJe(),plot:PJe(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:M8().hoverPoints,selectPoints:lT(),meta:{}}});var BJe=Se((O2r,qJe)=>{"use strict";qJe.exports=FJe()});var W$=Se((N2r,OJe)=>{"use strict";var Vv=iC(),x1=ek(),z$t=Du().texttemplateAttrs;OJe.exports={mode:Vv.mode,r:Vv.r,theta:Vv.theta,r0:Vv.r0,dr:Vv.dr,theta0:Vv.theta0,dtheta:Vv.dtheta,thetaunit:Vv.thetaunit,text:Vv.text,texttemplate:z$t({editType:"plot"},{keys:["r","theta","text"]}),hovertext:Vv.hovertext,hovertemplate:Vv.hovertemplate,line:{color:x1.line.color,width:x1.line.width,dash:x1.line.dash,editType:"calc"},connectgaps:x1.connectgaps,marker:x1.marker,fill:x1.fill,fillcolor:x1.fillcolor,textposition:x1.textposition,textfont:x1.textfont,hoverinfo:Vv.hoverinfo,selected:Vv.selected,unselected:Vv.unselected}});var VJe=Se((U2r,UJe)=>{"use strict";var NJe=Zr(),j$=ec(),P$t=A8().handleRThetaDefaults,I$t=$v(),D$t=I0(),R$t=D0(),F$t=Py(),q$t=Sm().PTS_LINESONLY,B$t=W$();UJe.exports=function(t,r,n,i){function a(s,u){return NJe.coerce(t,r,B$t,s,u)}var o=P$t(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var O$t=S8();HJe.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]),O$t(t,r,n)}});var jJe=Se((H2r,WJe)=>{"use strict";var N$t=R0(),U$t=q0().calcMarkerSize,V$t=Y2(),H$t=hu(),G$t=ox().TOO_MANY_POINTS;WJe.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"),u=r._theta=o.makeCalcdata(r,"theta"),l=r._length,f={};l{"use strict";var W$t=RF(),j$t=M8().makeHoverPointText;function Z$t(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,u=W$t.hoverPoints(e,t,r,n);if(!(!u||u[0].index===!1)){var l=u[0];if(l.index===void 0)return u;var f=e.subplot,c=l.cd[l.index],h=l.trace;if(c.r=o[l.index],c.theta=s[l.index],!!f.isPtInside(c))return l.xLabelVal=void 0,l.yLabelVal=void 0,j$t(c,h,f,l),u}}ZJe.exports={hoverPoints:Z$t}});var KJe=Se((W2r,YJe)=>{"use strict";YJe.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:b8(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:W$(),supplyDefaults:VJe(),colorbar:ep(),formatLabels:GJe(),calc:jJe(),hoverPoints:XJe().hoverPoints,selectPoints:oY(),meta:{}}});var JJe=Se((j2r,Z$)=>{"use strict";var X$t=BF(),Y$t=_u(),K$t=uK(),J$t=iY(),E8=Y2(),k8=Zr(),$$t=ox().TOO_MANY_POINTS,Q$t={};Z$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=J$t(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var u=s[0],l=u.trace,f=u.t,c=l._length,h=f.r,d=f.theta,p=f.opts,x,b=h.slice(),y=d.slice();for(x=0;x=$$t&&(p.marker.cluster=f.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=E),p.line&&E.length>1&&k8.extendFlat(p.line,E8.linePositions(t,l,E)),p.text&&(k8.extendFlat(p.text,{positions:E},E8.textPosition(t,l,p.text,p.marker)),k8.extendFlat(p.textSel,{positions:E},E8.textPosition(t,l,p.text,p.markerSel)),k8.extendFlat(p.textUnsel,{positions:E},E8.textPosition(t,l,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),f.x=k,f.y=A,f.rawx=k,f.rawy=A,f.r=h,f.theta=d,f.positions=E,f._scene=o,f.index=o.count,o.count++}}),K$t(t,r,n)}};Z$.exports.reglPrecompiled=Q$t});var QJe=Se((Z2r,$Je)=>{"use strict";var eQt=b9(),tQt=w9(),rQt=T9(),iQt=A9(),nQt=S9(),aQt=M9(),oQt=E9(),sQt=k9(),lQt=C9(),uQt=L9();$Je.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":eQt,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:tQt,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":rQt,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:iQt,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:nQt,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":aQt,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:oQt,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:sQt,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":lQt,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":uQt}});var t$e=Se((X2r,e$e)=>{"use strict";var X$=JJe(),fQt=QJe(),cQt=fK();Object.assign(X$.reglPrecompiled,fQt);Object.assign(X$.reglPrecompiled,cQt);e$e.exports=X$});var n$e=Se((Y2r,i$e)=>{"use strict";var r$e=KJe();r$e.plot=t$e();i$e.exports=r$e});var Y$=Se((K2r,a$e)=>{"use strict";var hQt=Du().hovertemplateAttrs,ZS=vu().extendFlat,zx=iC(),Px=Lm();a$e.exports={r:zx.r,theta:zx.theta,r0:zx.r0,dr:zx.dr,theta0:zx.theta0,dtheta:zx.dtheta,thetaunit:zx.thetaunit,base:ZS({},Px.base,{}),offset:ZS({},Px.offset,{}),width:ZS({},Px.width,{}),text:ZS({},Px.text,{}),hovertext:ZS({},Px.hovertext,{}),marker:dQt(),hoverinfo:zx.hoverinfo,hovertemplate:hQt(),selected:Px.selected,unselected:Px.unselected};function dQt(){var e=ZS({},Px.marker);return delete e.cornerradius,e}});var K$=Se((J2r,o$e)=>{"use strict";o$e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var u$e=Se(($2r,l$e)=>{"use strict";var s$e=Zr(),pQt=A8().handleRThetaDefaults,vQt=RI(),yQt=Y$();l$e.exports=function(t,r,n,i){function a(s,u){return s$e.coerce(t,r,yQt,s,u)}var o=pQt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),vQt(t,r,a,n,i),s$e.coerceSelectionMarkerOpacity(r,a)}});var c$e=Se((Q2r,f$e)=>{"use strict";var mQt=Zr(),gQt=K$();f$e.exports=function(e,t,r){var n={},i;function a(u,l){return mQt.coerce(e[i]||{},t[i],gQt,u,l)}for(var o=0;o{"use strict";var h$e=Dp().hasColorscale,d$e=Rp(),_Qt=Zr().isArrayOrTypedArray,xQt=f4(),bQt=Gb().setGroupPositions,wQt=F0(),TQt=Ul().traceIs,AQt=Zr().extendFlat;function SQt(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"),u=t._length,l=new Array(u),f=o,c=s,h=0;h{"use strict";var v$e=Nl(),C8=_u(),XS=Zr(),EQt=yu(),$$=p8();y$e.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,u=r.angularAxis,l=kQt(r),f=r.layers.frontplot.select("g.barlayer");XS.makeTraceGroups(f,n,"trace bars").each(function(){var c=v$e.select(this),h=XS.ensureSingle(c,"g","points"),d=h.selectAll("g.point").data(XS.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(p){var x=v$e.select(this),b=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),E=p.thetag0=u.c2g(p.p0),k=p.thetag1=u.c2g(p.p1),A;if(!C8(b)||!C8(y)||!C8(E)||!C8(k)||b===y||E===k)A="M0,0Z";else{var L=s.c2g(p.s1),_=(E+k)/2;p.ct=[a.c2p(L*Math.cos(_)),o.c2p(L*Math.sin(_))],A=l(b,y,E,k)}XS.ensureSingle(x,"path").attr("d",A)}),EQt.setClipUrl(c,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function kQt(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,u;XS.angleDelta(a,o)>0?(s=a,u=o):(s=o,u=a);var l=$$.findEnclosingVertexAngles(s,e.vangles)[0],f=$$.findEnclosingVertexAngles(u,e.vangles)[1],c=[l,(s+u)/2,f];return $$.pathPolygonAnnulus(n,i,s,u,c,t,r)}:function(n,i,a,o){return XS.pathAnnulus(n,i,a,o,t,r)}}});var _$e=Se((rwr,g$e)=>{"use strict";var CQt=jc(),Q$=Zr(),LQt=TT().getTraceColor,zQt=Q$.fillText,PQt=M8().makeHoverPointText,IQt=p8().isPtInsidePolygon;g$e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,u=o.angularAxis,l=o.vangles,f=l?IQt:Q$.isPtInsideSector,c=t.maxHoverDistance,h=u._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var x=function(k){return f(d,p,[k.rp0,k.rp1],[k.thetag0,k.thetag1],l)?c+Math.min(1,Math.abs(k.thetag1-k.thetag0)/h)-1+(k.rp1-d)/(k.rp1-k.rp0)-1:1/0};if(CQt.getClosest(i,x,t),t.index!==!1){var b=t.index,y=i[b];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var E=Q$.extendFlat({},y,{r:y.s,theta:y.p});return zQt(y,a,t),PQt(E,a,o,t),t.hovertemplate=a.hovertemplate,t.color=LQt(a,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var b$e=Se((iwr,x$e)=>{"use strict";x$e.exports={moduleType:"trace",name:"barpolar",basePlotModule:b8(),categories:["polar","bar","showLegend"],attributes:Y$(),layoutAttributes:K$(),supplyDefaults:u$e(),supplyLayoutDefaults:c$e(),calc:J$().calc,crossTraceCalc:J$().crossTraceCalc,plot:m$e(),colorbar:ep(),formatLabels:S8(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:_$e(),selectPoints:AT(),meta:{}}});var T$e=Se((nwr,w$e)=>{"use strict";w$e.exports=b$e()});var eQ=Se((awr,A$e)=>{"use strict";A$e.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var tQ=Se((owr,k$e)=>{"use strict";var DQt=Ih(),lh=Rd(),RQt=Ec().attributes,Ix=Zr().extendFlat,S$e=_c().overrideAll,M$e=S$e({color:lh.color,showline:Ix({},lh.showline,{dflt:!0}),linecolor:lh.linecolor,linewidth:lh.linewidth,showgrid:Ix({},lh.showgrid,{dflt:!0}),gridcolor:lh.gridcolor,gridwidth:lh.gridwidth,griddash:lh.griddash},"plot","from-root"),E$e=S$e({ticklen:lh.ticklen,tickwidth:Ix({},lh.tickwidth,{dflt:2}),tickcolor:lh.tickcolor,showticklabels:lh.showticklabels,labelalias:lh.labelalias,showtickprefix:lh.showtickprefix,tickprefix:lh.tickprefix,showticksuffix:lh.showticksuffix,ticksuffix:lh.ticksuffix,tickfont:lh.tickfont,tickformat:lh.tickformat,hoverformat:lh.hoverformat,layer:lh.layer},"plot","from-root"),FQt=Ix({visible:Ix({},lh.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Ix({},lh.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},M$e,E$e),qQt=Ix({visible:Ix({},lh.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:lh.ticks,editType:"calc"},M$e,E$e);k$e.exports={domain:RQt({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:DQt.background},realaxis:FQt,imaginaryaxis:qQt,editType:"calc"}});var z$e=Se((swr,L$e)=>{"use strict";var YS=Zr(),BQt=Pl(),OQt=_f(),NQt=k_(),UQt=Dd().getSubplotData,VQt=t_(),HQt=e_(),GQt=Y5(),WQt=gm(),KS=tQ(),rQ=eQ(),C$e=rQ.axisNames,jQt=XQt(function(e){return YS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function ZQt(e,t,r,n){var i=r("bgcolor");n.bgColor=BQt.combine(i,n.paper_bgcolor);var a=UQt(n.fullData,rQ.name,n.id),o=n.layoutOut,s;function u(L,_){return r(s+"."+L,_)}for(var l=0;l{"use strict";var YQt=Dd().getSubplotCalcData,KQt=Zr().counterRegex,JQt=H$(),I$e=eQ(),D$e=I$e.attr,gw=I$e.name,P$e=KQt(gw),R$e={};R$e[D$e]={valType:"subplotid",dflt:gw,editType:"calc"};function $Qt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[gw],i=0;i{"use strict";var eer=Du().hovertemplateAttrs,ter=Du().texttemplateAttrs,L8=vu().extendFlat,rer=Ey(),d0=Zc(),ier=zf(),JS=d0.line;B$e.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:ter({editType:"plot"},{keys:["real","imag","text"]}),hovertext:d0.hovertext,line:{color:JS.color,width:JS.width,dash:JS.dash,backoff:JS.backoff,shape:L8({},JS.shape,{values:["linear","spline"]}),smoothing:JS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:L8({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:L8({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:rer(),hoverinfo:L8({},ier.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:eer(),selected:d0.selected,unselected:d0.unselected}});var U$e=Se((fwr,N$e)=>{"use strict";var z8=Zr(),$S=ec(),ner=$v(),aer=I0(),O$e=J3(),oer=D0(),ser=Py(),ler=Sm().PTS_LINESONLY,uer=iQ();N$e.exports=function(t,r,n,i){function a(u,l){return z8.coerce(t,r,uer,u,l)}var o=fer(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var V$e=hu();H$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=V$e.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=V$e.tickText(a.angularAxis,t.imag,!0).text,i}});var Z$e=Se((hwr,j$e)=>{"use strict";var W$e=_u(),cer=ju().BADNUM,her=R0(),der=km(),per=F0(),ver=q0().calcMarkerSize;j$e.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"),u=o.makeCalcdata(r,"imag"),l=r._length,f=new Array(l),c=0;c{"use strict";var yer=iT(),X$e=ju().BADNUM,mer=N$(),ger=mer.smith;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},u=0;u{"use strict";var _er=sT();function xer(e,t,r,n){var i=_er(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],u=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,J$e(s,u,o,a),a.hovertemplate=u.hovertemplate,i}}function J$e(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 u=e.hi||t.hoverinfo,l=[];function f(h,d){l.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var c=u.split("+");c.indexOf("all")!==-1&&(c=["real","imag","text"]),c.indexOf("real")!==-1&&f(i,n.realLabel),c.indexOf("imag")!==-1&&f(a,n.imagLabel),c.indexOf("text")!==-1&&n.text&&(l.push(n.text),delete n.text),n.extraText=l.join("
")}}$$e.exports={hoverPoints:xer,makeHoverPointText:J$e}});var tQe=Se((vwr,eQe)=>{"use strict";eQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:q$e(),categories:["smith","symbols","showLegend","scatter-like"],attributes:iQ(),supplyDefaults:U$e(),colorbar:ep(),formatLabels:G$e(),calc:Z$e(),plot:K$e(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:Q$e().hoverPoints,selectPoints:lT(),meta:{}}});var iQe=Se((ywr,rQe)=>{"use strict";rQe.exports=tQe()});var Ep=Se((mwr,aQe)=>{var I8=Uh();function nQe(){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={}}I8(nQe.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 nQ(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(cf.local.invalidDate||cf.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function P8(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}I8(nQ.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(cf.local.invalidDate||cf.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(cf.local.differentCalendars||cf.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?"-":"")+P8(Math.abs(this.year()),4)+"-"+P8(this.month(),2)+"-"+P8(this.day(),2)}});function aQ(){this.shortYearCutoff="+10"}I8(aQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,cf.local.invalidDate||cf.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new nQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.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,cf.local.invalidYear||cf.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+P8(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,cf.local.invalidMonth||cf.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,cf.local.invalidMonth||cf.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,cf.local.invalidDate||cf.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,cf.local.invalidDate||cf.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,cf.local.invalidDate||cf.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,cf.local.invalidDate||cf.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(f){for(;oc-1+f.minMonth;)a++,o-=c,c=f.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 u=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,u}catch(l){throw this._validateLevel--,l}},_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,cf.local.invalidDate||cf.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),l=i-(u>2.5?4716:4715);return l<=0&&l--,this.newDate(l,u,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,cf.local.invalidDate||cf.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 cf=aQe.exports=new nQe;cf.cdate=nQ;cf.baseCalendar=aQ;cf.calendars.gregorian=oQ});var oQe=Se(()=>{var sQ=Uh(),Hd=Ep();sQ(Hd.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"});Hd.local=Hd.regionalOptions[""];sQ(Hd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});sQ(Hd.baseCalendar.prototype,{UNIX_EPOCH:Hd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Hd.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 Hd.local.invalidFormat||Hd.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,u=r.calculateWeek||this.local.calculateWeek,l=function(A,L){for(var _=1;k+_1},f=function(A,L,_,C){var M=""+L;if(l(A,C))for(;M.length<_;)M="0"+M;return M},c=function(A,L,_,C){return l(A)?C[L]:_[L]},h=this,d=function(A){return typeof a=="function"?a.call(h,A,l("m")):b(f("m",A.month(),2))},p=function(A,L){return L?typeof s=="function"?s.call(h,A):s[A.month()-h.minMonth]:typeof o=="function"?o.call(h,A):o[A.month()-h.minMonth]},x=this.local.digits,b=function(A){return r.localNumbers&&x?x(A):A},y="",E=!1,k=0;k1},E=function(F,q){var U=y(F,q),H=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],j=new RegExp("^-?\\d{1,"+H+"}"),G=t.substring(M).match(j);if(!G)throw(Hd.local.missingNumberAt||Hd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=G[0].length,parseInt(G[0],10)},k=this,A=function(){if(typeof s=="function"){y("m");var F=s.call(k,t.substring(M));return M+=F.length,F}return E("m")},L=function(F,q,U,H){for(var j=y(F,H)?U:q,G=0;G-1){h=1,d=p;for(var T=this.daysInMonth(c,h);d>T;T=this.daysInMonth(c,h))h++,d-=T}return f>-1?this.fromJD(f):this.newDate(c,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(c){}s=s.toLowerCase();for(var u=(s.match(/^c/)&&r?r.newDate():null)||a.today(),l=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=l.exec(s);f;)u.add(parseInt(f[1],10),f[2]||"d"),f=l.exec(s);return u};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 sQe=Se(()=>{var Dx=Ep(),ber=Uh(),lQ=Dx.instance();function D8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D8.prototype=new Dx.baseCalendar;ber(D8.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(Ter);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(Aer);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(Ser);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 Dx.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 Dx.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,Dx.local.invalidyear),i=Fx[n-Fx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,u;u=lQ.newDate(a,o,s),u.add(4-(u.dayOfWeek()||7),"d");var l=this.toJD(e,t,r)-u.toJD();return 1+Math.floor(l/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=Rx[e-Rx[0]],n=r>>13,i=n?12:11;if(t>i)throw Dx.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,Dx.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=Eer(e,a,r,i);return lQ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=lQ.fromJD(e),r=Mer(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(wer),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(D8.prototype).add.call(this,e,t,r);if(r==="y"){var u=s.year(),l=s.month(),f=this.isIntercalaryMonth(u,o),c=a&&f?this.toMonthIndex(u,o,!0):this.toMonthIndex(u,o,!1);c!==l&&s.month(c)}return s}});var wer=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Ter=/^\d?\d[iI]?/m,Aer=/^闰?十?[一二三四五六七八九]?月/m,Ser=/^闰?十?[一二三四五六七八九]?/m;Dx.calendars.chinese=D8;var Rx=[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],Fx=[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 Mer(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 u=typeof r=="number"&&r>=1&&r<=31;if(!u)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var l=Fx[i.year-Fx[0]],f=i.year<<9|i.month<<5|i.day;a.year=f>=l?i.year:i.year-1,l=Fx[a.year-Fx[0]];var c=l>>9&4095,h=l>>5&15,d=l&31,p,x=new Date(c,h-1,d),b=new Date(i.year,i.month-1,i.day);p=Math.round((b-x)/(24*3600*1e3));var y=Rx[a.year-Rx[0]],E;for(E=0;E<13;E++){var k=y&1<<12-E?30:29;if(p>13;return!A||E=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var u=typeof t=="number"&&t>=1&&t<=12;if(!u)throw new Error("Lunar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=30;if(!l)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,a=n):(f=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:f}}var c;c=o.day-1;var h=Rx[o.year-Rx[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var x=0;x>9&4095,k=y>>5&15,A=y&31,L=new Date(E,k-1,A+c);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var lQe=Se(()=>{var _w=Ep(),ker=Uh();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new _w.baseCalendar;ker(uQ.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,_w.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,_w.local.invalidYear||_w.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,_w.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,_w.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)}});_w.calendars.coptic=uQ});var uQe=Se(()=>{var b1=Ep(),Cer=Uh();function fQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}fQ.prototype=new b1.baseCalendar;Cer(fQ.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,b1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.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,b1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,b1.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,b1.local.invalidDate);return{century:Ler[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,b1.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 Ler={20:"Fruitbat",21:"Anchovy"};b1.calendars.discworld=fQ});var fQe=Se(()=>{var xw=Ep(),zer=Uh();function cQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}cQ.prototype=new xw.baseCalendar;zer(cQ.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,xw.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,xw.local.invalidYear||xw.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,xw.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,xw.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)}});xw.calendars.ethiopian=cQ});var cQe=Se(()=>{var qx=Ep(),Per=Uh();function hQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}hQ.prototype=new qx.baseCalendar;Per(hQ.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,R8(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&&R8(this.daysInYear(e),10)===5?30:t===9&&R8(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 R8(e,t){return e-t*Math.floor(e/t)}qx.calendars.hebrew=hQ});var hQe=Se(()=>{var nC=Ep(),Ier=Uh();function dQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}dQ.prototype=new nC.baseCalendar;Ier(dQ.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,nC.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,nC.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,nC.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)}});nC.calendars.islamic=dQ});var dQe=Se(()=>{var aC=Ep(),Der=Uh();function pQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}pQ.prototype=new aC.baseCalendar;Der(pQ.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,aC.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,aC.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,aC.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),u=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,u)}});aC.calendars.julian=pQ});var vQe=Se(()=>{var uy=Ep(),Rer=Uh();function yQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}yQ.prototype=new uy.baseCalendar;Rer(yQ.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,uy.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,uy.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,uy.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,uy.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,uy.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,uy.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,uy.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,uy.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,uy.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=vQ(e+8+17*20,365);return[Math.floor(t/20)+1,vQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[pQe(e+20,20),pQe(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,uy.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 vQ(e,t){return e-t*Math.floor(e/t)}function pQe(e,t){return vQ(e-1,t)+1}uy.calendars.mayan=yQ});var mQe=Se(()=>{var bw=Ep(),Fer=Uh();function mQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}mQ.prototype=new bw.baseCalendar;var yQe=bw.instance("gregorian");Fer(mQ.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,bw.local.invalidYear||bw.regionalOptions[""].invalidYear);return yQe.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,bw.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,bw.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)}});bw.calendars.nanakshahi=mQ});var gQe=Se(()=>{var ww=Ep(),qer=Uh();function gQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}gQ.prototype=new ww.baseCalendar;qer(gQ.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,ww.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,ww.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,ww.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=ww.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var u=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(u))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(u,1,1).add(a,"d").toJD()},fromJD:function(e){var t=ww.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],u=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>u;)o++,o>12&&(o=1,a++),u+=this.NEPALI_CALENDAR_DATA[a][o];var l=this.NEPALI_CALENDAR_DATA[a][o]-(u-i);return this.newDate(a,o,l)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var QS=Ep(),Ber=Uh();function F8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F8.prototype=new QS.baseCalendar;Ber(F8.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,QS.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},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,QS.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,QS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e-(e>=0?474:473),a=474+_Q(i,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(i/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),n=_Q(t,1029983),i=2820;if(n!==1029982){var a=Math.floor(n/366),o=_Q(n,366);i=Math.floor((2134*a+2816*o+2815)/1028522)+a+1}var s=i+2820*r+474;s=s<=0?s-1:s;var u=e-this.toJD(s,1,1)+1,l=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(s,l,1)+1;return this.newDate(s,l,f)}});function _Q(e,t){return e-t*Math.floor(e/t)}QS.calendars.persian=F8;QS.calendars.jalali=F8});var xQe=Se(()=>{var Tw=Ep(),Oer=Uh(),q8=Tw.instance();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new Tw.baseCalendar;Oer(xQ.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,Tw.local.invalidYear),r=this._t2gYear(t.year());return q8.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Tw.local.invalidYear),i=this._t2gYear(n.year());return q8.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.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,Tw.local.invalidDate),i=this._t2gYear(n.year());return q8.toJD(i,n.month(),n.day())},fromJD:function(e){var t=q8.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)}});Tw.calendars.taiwan=xQ});var bQe=Se(()=>{var Aw=Ep(),Ner=Uh(),B8=Aw.instance();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new Aw.baseCalendar;Ner(bQ.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,Aw.local.invalidYear),r=this._t2gYear(t.year());return B8.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Aw.local.invalidYear),i=this._t2gYear(n.year());return B8.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Aw.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,Aw.local.invalidDate),i=this._t2gYear(n.year());return B8.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B8.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)}});Aw.calendars.thai=bQ});var wQe=Se(()=>{var Sw=Ep(),Uer=Uh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Sw.baseCalendar;Uer(wQ.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,Sw.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,Sw.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,Sw.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,u=t-Bx[r-1]+1;return this.newDate(o,s,u)},isValid:function(e,t,r){var n=Sw.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=Sw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Sw.calendars.ummalqura=wQ;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 AQe=Se((Xwr,TQe)=>{"use strict";TQe.exports=Ep();oQe();sQe();lQe();uQe();fQe();cQe();hQe();dQe();vQe();mQe();gQe();_Qe();xQe();bQe();wQe()});var zQe=Se((Ywr,LQe)=>{"use strict";var MQe=AQe(),oC=Zr(),EQe=ju(),Ver=EQe.EPOCHJD,Her=EQe.ONEDAY,SQ={valType:"enumerated",values:oC.sortObjectKeys(MQe.calendars),editType:"calc",dflt:"gregorian"},kQe=function(e,t,r,n){var i={};return i[r]=SQ,oC.coerce(e,t,i,r,n)},Ger=function(e,t,r,n){for(var i=0;i{"use strict";PQe.exports=zQe()});var Ker=Se((Jwr,RQe)=>{var DQe=ege();DQe.register([r1e(),H1e(),txe(),bxe(),Dxe(),Lbe(),Hbe(),C2e(),nwe(),Owe(),S3e(),Q4e(),UEe(),zCe(),gLe(),XLe(),mze(),WPe(),fIe(),kIe(),NIe(),eDe(),vDe(),zDe(),nRe(),ARe(),JOe(),e7e(),pUe(),OUe(),XVe(),uHe(),IHe(),GGe(),aWe(),CWe(),qje(),sZe(),VZe(),fYe(),IYe(),eKe(),MKe(),NKe(),BJe(),n$e(),T$e(),iQe(),IQe()]);RQe.exports=DQe});return Ker();})(); +`),Ke=$e.createShader($e.FRAGMENT_SHADER);if($e.isContextLost())return void(this.failedToCreate=!0);if($e.shaderSource(Ke,Ve),$e.compileShader(Ke),!$e.getShaderParameter(Ke,$e.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${$e.getShaderInfoLog(Ke)}`);$e.attachShader(this.program,Ke);let ft=$e.createShader($e.VERTEX_SHADER);if($e.isContextLost())return void(this.failedToCreate=!0);if($e.shaderSource(ft,ot),$e.compileShader(ft),!$e.getShaderParameter(ft,$e.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${$e.getShaderInfoLog(ft)}`);$e.attachShader(this.program,ft),this.attributes={};let qt={};this.numAttributes=Yt.length;for(let Xt=0;Xt({u_depth:new a.aH(Xt,$t.u_depth),u_terrain:new a.aH(Xt,$t.u_terrain),u_terrain_dim:new a.aI(Xt,$t.u_terrain_dim),u_terrain_matrix:new a.aJ(Xt,$t.u_terrain_matrix),u_terrain_unpack:new a.aK(Xt,$t.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Xt,$t.u_terrain_exaggeration)}))(w,qt),this.binderUniforms=Q?Q.getUniforms(w,qt):[]}draw(w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce,Ae,qe,Ve,ot){let Ke=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(Ne),pt){w.activeTexture.set(Ke.TEXTURE2),Ke.bindTexture(Ke.TEXTURE_2D,pt.depthTexture),w.activeTexture.set(Ke.TEXTURE3),Ke.bindTexture(Ke.TEXTURE_2D,pt.texture);for(let qt in this.terrainUniforms)this.terrainUniforms[qt].set(pt[qt])}for(let qt in this.fixedUniforms)this.fixedUniforms[qt].set($e[qt]);Ae&&Ae.setUniforms(w,this.binderUniforms,Ir,{zoom:ce});let ft=0;switch(B){case Ke.LINES:ft=2;break;case Ke.TRIANGLES:ft=3;break;case Ke.LINE_STRIP:ft=1}for(let qt of yr.get()){let Xt=qt.vaos||(qt.vaos={});(Xt[zt]||(Xt[zt]=new Wt)).bind(w,this,Yt,Ae?Ae.getPaintVertexBuffers():[],Jt,qt.vertexOffset,qe,Ve,ot),Ke.drawElements(B,qt.primitiveLength*ft,Ke.UNSIGNED_SHORT,qt.primitiveOffset*ft*2)}}}function hi(oe,w,B){let Q=1/Ei(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Ne=le*(B.tileID.canonical.x+B.tileID.wrap*ee),$e=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,oe.fromScale,oe.toScale],u_fade:oe.t,u_pixel_coord_upper:[Ne>>16,$e>>16],u_pixel_coord_lower:[65535&Ne,65535&$e]}}let Gi=(oe,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),Ne=[le.x,le.y,le.z],$e=function(){var zt=new a.A(9);return a.A!=Float32Array&&(zt[1]=0,zt[2]=0,zt[3]=0,zt[5]=0,zt[6]=0,zt[7]=0),zt[0]=1,zt[4]=1,zt[8]=1,zt}();ee.properties.get("anchor")==="viewport"&&function(zt,Yt){var Jt=Math.sin(Yt),yr=Math.cos(Yt);zt[0]=yr,zt[1]=Jt,zt[2]=0,zt[3]=-Jt,zt[4]=yr,zt[5]=0,zt[6]=0,zt[7]=0,zt[8]=1}($e,-w.transform.angle),function(zt,Yt,Jt){var yr=Yt[0],Ir=Yt[1],ce=Yt[2];zt[0]=yr*Jt[0]+Ir*Jt[3]+ce*Jt[6],zt[1]=yr*Jt[1]+Ir*Jt[4]+ce*Jt[7],zt[2]=yr*Jt[2]+Ir*Jt[5]+ce*Jt[8]}(Ne,Ne,$e);let pt=ee.properties.get("color");return{u_matrix:oe,u_lightpos:Ne,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[pt.r,pt.g,pt.b],u_vertical_gradient:+B,u_opacity:Q}},Qr=(oe,w,B,Q,ee,le,Ne)=>a.e(Gi(oe,w,B,Q),hi(le,w,Ne),{u_height_factor:-Math.pow(2,ee.overscaledZ)/Ne.tileSize/8}),Ui=oe=>({u_matrix:oe}),zn=(oe,w,B,Q)=>a.e(Ui(oe),hi(B,w,Q)),fn=(oe,w)=>({u_matrix:oe,u_world:w}),xn=(oe,w,B,Q,ee)=>a.e(zn(oe,w,B,Q),{u_world:ee}),_a=(oe,w,B,Q)=>{let ee=oe.transform,le,Ne;if(Q.paint.get("circle-pitch-alignment")==="map"){let $e=Ei(B,1,ee.zoom);le=!0,Ne=[$e,$e]}else le=!1,Ne=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:oe.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:oe.pixelRatio,u_extrude_scale:Ne}},Wn=(oe,w,B)=>({u_matrix:oe,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),Fn=(oe,w,B=1)=>({u_matrix:oe,u_color:w,u_overlay:0,u_overlay_scale:B}),ia=oe=>({u_matrix:oe}),za=(oe,w,B,Q)=>({u_matrix:oe,u_extrude_scale:Ei(w,1,B),u_intensity:Q}),Hr=(oe,w,B,Q)=>{let ee=a.H();a.aP(ee,0,oe.width,oe.height,0,0,1);let le=oe.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 na(oe,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 go=(oe,w,B,Q)=>{let ee=oe.transform;return{u_matrix:Ba(oe,w,B,Q),u_ratio:1/Ei(w,1,ee.zoom),u_device_pixel_ratio:oe.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},Dn=(oe,w,B,Q,ee)=>a.e(go(oe,w,B,ee),{u_image:0,u_image_height:Q}),un=(oe,w,B,Q,ee)=>{let le=oe.transform,Ne=Wo(w,le);return{u_matrix:Ba(oe,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Ei(w,1,le.zoom),u_device_pixel_ratio:oe.pixelRatio,u_image:0,u_scale:[Ne,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},Zn=(oe,w,B,Q,ee,le)=>{let Ne=oe.lineAtlas,$e=Wo(w,oe.transform),pt=B.layout.get("line-cap")==="round",zt=Ne.getDash(Q.from,pt),Yt=Ne.getDash(Q.to,pt),Jt=zt.width*ee.fromScale,yr=Yt.width*ee.toScale;return a.e(go(oe,w,B,le),{u_patternscale_a:[$e/Jt,-zt.height/2],u_patternscale_b:[$e/yr,-Yt.height/2],u_sdfgamma:Ne.width/(256*Math.min(Jt,yr)*oe.pixelRatio)/2,u_image:0,u_tex_y_a:zt.y,u_tex_y_b:Yt.y,u_mix:ee.t})};function Wo(oe,w){return 1/Ei(oe,1,w.tileZoom)}function Ba(oe,w,B,Q){return oe.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let Bo=(oe,w,B,Q,ee)=>{return{u_matrix:oe,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:(Ne=ee.paint.get("raster-saturation"),Ne>0?1-1/(1.001-Ne):-Ne),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ea(ee.paint.get("raster-hue-rotate"))};var le,Ne};function Ea(oe){oe*=Math.PI/180;let w=Math.sin(oe),B=Math.cos(oe);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let Ha=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir)=>{let ce=Ne.transform;return{u_is_size_zoom_constant:+(oe==="constant"||oe==="source"),u_is_size_feature_constant:+(oe==="constant"||oe==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ce.cameraToCenterDistance,u_pitch:ce.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ce.width/ce.height,u_fade_change:Ne.options.fadeDuration?Ne.symbolFadeChange:1,u_matrix:$e,u_label_plane_matrix:pt,u_coord_matrix:zt,u_is_text:+Jt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:yr,u_texture:0,u_translation:Yt,u_pitched_scale:Ir}},tn=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir,ce)=>{let Ae=Ne.transform;return a.e(Ha(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,ce),{u_gamma_scale:Q?Math.cos(Ae._pitch)*Ae.cameraToCenterDistance:1,u_device_pixel_ratio:Ne.pixelRatio,u_is_halo:+Ir})},Cn=(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,Jt,yr,Ir)=>a.e(tn(oe,w,B,Q,ee,le,Ne,$e,pt,zt,Yt,!0,Jt,!0,Ir),{u_texsize_icon:yr,u_texture_icon:1}),Xn=(oe,w,B)=>({u_matrix:oe,u_opacity:w,u_color:B}),ts=(oe,w,B,Q,ee,le)=>a.e(function(Ne,$e,pt,zt){let Yt=pt.imageManager.getPattern(Ne.from.toString()),Jt=pt.imageManager.getPattern(Ne.to.toString()),{width:yr,height:Ir}=pt.imageManager.getPixelSize(),ce=Math.pow(2,zt.tileID.overscaledZ),Ae=zt.tileSize*Math.pow(2,pt.transform.tileZoom)/ce,qe=Ae*(zt.tileID.canonical.x+zt.tileID.wrap*ce),Ve=Ae*zt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Yt.tl,u_pattern_br_a:Yt.br,u_pattern_tl_b:Jt.tl,u_pattern_br_b:Jt.br,u_texsize:[yr,Ir],u_mix:$e.t,u_pattern_size_a:Yt.displaySize,u_pattern_size_b:Jt.displaySize,u_scale_a:$e.fromScale,u_scale_b:$e.toScale,u_tile_units_to_pixels:1/Ei(zt,1,pt.transform.tileZoom),u_pixel_coord_upper:[qe>>16,Ve>>16],u_pixel_coord_lower:[65535&qe,65535&Ve]}}(Q,le,B,ee),{u_matrix:oe,u_opacity:w}),Ja={fillExtrusion:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_lightpos:new a.aN(oe,w.u_lightpos),u_lightintensity:new a.aI(oe,w.u_lightintensity),u_lightcolor:new a.aN(oe,w.u_lightcolor),u_vertical_gradient:new a.aI(oe,w.u_vertical_gradient),u_opacity:new a.aI(oe,w.u_opacity)}),fillExtrusionPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_lightpos:new a.aN(oe,w.u_lightpos),u_lightintensity:new a.aI(oe,w.u_lightintensity),u_lightcolor:new a.aN(oe,w.u_lightcolor),u_vertical_gradient:new a.aI(oe,w.u_vertical_gradient),u_height_factor:new a.aI(oe,w.u_height_factor),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade),u_opacity:new a.aI(oe,w.u_opacity)}),fill:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix)}),fillPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),fillOutline:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world)}),fillOutlinePattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world),u_image:new a.aH(oe,w.u_image),u_texsize:new a.aO(oe,w.u_texsize),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),circle:(oe,w)=>({u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(oe,w.u_scale_with_map),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_extrude_scale:new a.aO(oe,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_matrix:new a.aJ(oe,w.u_matrix)}),collisionBox:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_pixel_extrude_scale:new a.aO(oe,w.u_pixel_extrude_scale)}),collisionCircle:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_inv_matrix:new a.aJ(oe,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_viewport_size:new a.aO(oe,w.u_viewport_size)}),debug:(oe,w)=>({u_color:new a.aL(oe,w.u_color),u_matrix:new a.aJ(oe,w.u_matrix),u_overlay:new a.aH(oe,w.u_overlay),u_overlay_scale:new a.aI(oe,w.u_overlay_scale)}),clippingMask:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix)}),heatmap:(oe,w)=>({u_extrude_scale:new a.aI(oe,w.u_extrude_scale),u_intensity:new a.aI(oe,w.u_intensity),u_matrix:new a.aJ(oe,w.u_matrix)}),heatmapTexture:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_world:new a.aO(oe,w.u_world),u_image:new a.aH(oe,w.u_image),u_color_ramp:new a.aH(oe,w.u_color_ramp),u_opacity:new a.aI(oe,w.u_opacity)}),hillshade:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_latrange:new a.aO(oe,w.u_latrange),u_light:new a.aO(oe,w.u_light),u_shadow:new a.aL(oe,w.u_shadow),u_highlight:new a.aL(oe,w.u_highlight),u_accent:new a.aL(oe,w.u_accent)}),hillshadePrepare:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_image:new a.aH(oe,w.u_image),u_dimension:new a.aO(oe,w.u_dimension),u_zoom:new a.aI(oe,w.u_zoom),u_unpack:new a.aK(oe,w.u_unpack)}),line:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels)}),lineGradient:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_image:new a.aH(oe,w.u_image),u_image_height:new a.aI(oe,w.u_image_height)}),linePattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texsize:new a.aO(oe,w.u_texsize),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_image:new a.aH(oe,w.u_image),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_scale:new a.aN(oe,w.u_scale),u_fade:new a.aI(oe,w.u_fade)}),lineSDF:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ratio:new a.aI(oe,w.u_ratio),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(oe,w.u_units_to_pixels),u_patternscale_a:new a.aO(oe,w.u_patternscale_a),u_patternscale_b:new a.aO(oe,w.u_patternscale_b),u_sdfgamma:new a.aI(oe,w.u_sdfgamma),u_image:new a.aH(oe,w.u_image),u_tex_y_a:new a.aI(oe,w.u_tex_y_a),u_tex_y_b:new a.aI(oe,w.u_tex_y_b),u_mix:new a.aI(oe,w.u_mix)}),raster:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_tl_parent:new a.aO(oe,w.u_tl_parent),u_scale_parent:new a.aI(oe,w.u_scale_parent),u_buffer_scale:new a.aI(oe,w.u_buffer_scale),u_fade_t:new a.aI(oe,w.u_fade_t),u_opacity:new a.aI(oe,w.u_opacity),u_image0:new a.aH(oe,w.u_image0),u_image1:new a.aH(oe,w.u_image1),u_brightness_low:new a.aI(oe,w.u_brightness_low),u_brightness_high:new a.aI(oe,w.u_brightness_high),u_saturation_factor:new a.aI(oe,w.u_saturation_factor),u_contrast_factor:new a.aI(oe,w.u_contrast_factor),u_spin_weights:new a.aN(oe,w.u_spin_weights)}),symbolIcon:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texture:new a.aH(oe,w.u_texture),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),symbolSDF:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texture:new a.aH(oe,w.u_texture),u_gamma_scale:new a.aI(oe,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_is_halo:new a.aH(oe,w.u_is_halo),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),symbolTextAndIcon:(oe,w)=>({u_is_size_zoom_constant:new a.aH(oe,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(oe,w.u_is_size_feature_constant),u_size_t:new a.aI(oe,w.u_size_t),u_size:new a.aI(oe,w.u_size),u_camera_to_center_distance:new a.aI(oe,w.u_camera_to_center_distance),u_pitch:new a.aI(oe,w.u_pitch),u_rotate_symbol:new a.aH(oe,w.u_rotate_symbol),u_aspect_ratio:new a.aI(oe,w.u_aspect_ratio),u_fade_change:new a.aI(oe,w.u_fade_change),u_matrix:new a.aJ(oe,w.u_matrix),u_label_plane_matrix:new a.aJ(oe,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(oe,w.u_coord_matrix),u_is_text:new a.aH(oe,w.u_is_text),u_pitch_with_map:new a.aH(oe,w.u_pitch_with_map),u_is_along_line:new a.aH(oe,w.u_is_along_line),u_is_variable_anchor:new a.aH(oe,w.u_is_variable_anchor),u_texsize:new a.aO(oe,w.u_texsize),u_texsize_icon:new a.aO(oe,w.u_texsize_icon),u_texture:new a.aH(oe,w.u_texture),u_texture_icon:new a.aH(oe,w.u_texture_icon),u_gamma_scale:new a.aI(oe,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(oe,w.u_device_pixel_ratio),u_is_halo:new a.aH(oe,w.u_is_halo),u_translation:new a.aO(oe,w.u_translation),u_pitched_scale:new a.aI(oe,w.u_pitched_scale)}),background:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_opacity:new a.aI(oe,w.u_opacity),u_color:new a.aL(oe,w.u_color)}),backgroundPattern:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_opacity:new a.aI(oe,w.u_opacity),u_image:new a.aH(oe,w.u_image),u_pattern_tl_a:new a.aO(oe,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(oe,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(oe,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(oe,w.u_pattern_br_b),u_texsize:new a.aO(oe,w.u_texsize),u_mix:new a.aI(oe,w.u_mix),u_pattern_size_a:new a.aO(oe,w.u_pattern_size_a),u_pattern_size_b:new a.aO(oe,w.u_pattern_size_b),u_scale_a:new a.aI(oe,w.u_scale_a),u_scale_b:new a.aI(oe,w.u_scale_b),u_pixel_coord_upper:new a.aO(oe,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(oe,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(oe,w.u_tile_units_to_pixels)}),terrain:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texture:new a.aH(oe,w.u_texture),u_ele_delta:new a.aI(oe,w.u_ele_delta),u_fog_matrix:new a.aJ(oe,w.u_fog_matrix),u_fog_color:new a.aL(oe,w.u_fog_color),u_fog_ground_blend:new a.aI(oe,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(oe,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(oe,w.u_horizon_color),u_horizon_fog_blend:new a.aI(oe,w.u_horizon_fog_blend)}),terrainDepth:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_ele_delta:new a.aI(oe,w.u_ele_delta)}),terrainCoords:(oe,w)=>({u_matrix:new a.aJ(oe,w.u_matrix),u_texture:new a.aH(oe,w.u_texture),u_terrain_coords_id:new a.aI(oe,w.u_terrain_coords_id),u_ele_delta:new a.aI(oe,w.u_ele_delta)}),sky:(oe,w)=>({u_sky_color:new a.aL(oe,w.u_sky_color),u_horizon_color:new a.aL(oe,w.u_horizon_color),u_horizon:new a.aI(oe,w.u_horizon),u_sky_horizon_blend:new a.aI(oe,w.u_sky_horizon_blend)})};class to{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 Ri={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class an{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 Xt=a.H();a.aQ(Xt,Ke.placementInvProjMatrix,oe.transform.glCoordMatrix),a.aQ(Xt,Xt,Ke.placementViewportMatrix),pt.push({circleArray:qt,circleOffset:Yt,transform:ot.posMatrix,invTransform:Xt,coord:ot}),zt+=qt.length/4,Yt=zt}ft&&$e.draw(le,Ne.LINES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,{u_matrix:ot.posMatrix,u_pixel_extrude_scale:[1/(Jt=oe.transform).width,1/Jt.height]},oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ot),B.id,ft.layoutVertexBuffer,ft.indexBuffer,ft.segments,null,oe.transform.zoom,null,null,ft.collisionVertexBuffer)}var Jt;if(!ee||!pt.length)return;let yr=oe.useProgram("collisionCircle"),Ir=new a.aR;Ir.resize(4*zt),Ir._trim();let ce=0;for(let Ve of pt)for(let ot=0;ot=0&&(Ve[Ke.associatedIconIndex]={shiftedAnchor:oo,angle:el})}else Lr(Ke.numGlyphs,Ae)}if(zt){qe.clear();let ot=oe.icon.placedSymbolArray;for(let Ke=0;Keoe.style.map.terrain.getElevation(ii,mt,er):null,Nt=B.layout.get("text-rotation-alignment")==="map";Pe(Yi,ii.posMatrix,oe,ee,tf,Gu,Ve,zt,Nt,Ae,ii.toUnwrapped(),ce.width,ce.height,Wu,it)}let nf=ii.posMatrix,af=ee&&dr||gf,X=ot||af?Za:tf,se=Ku,Le=ua&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,We;We=ua?Yi.iconsInText?Cn(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,pl,ku,$r):tn(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,ee,pl,!0,$r):Ha(oo.kind,il,Ke,Ve,ot,af,oe,nf,X,se,Wu,ee,pl,$r);let Ye={program:ys,buffers:wn,uniformValues:We,atlasTexture:Hl,atlasTextureIcon:Jl,atlasInterpolation:Ll,atlasInterpolationIcon:Ql,isSDF:ua,hasHalo:Le};if(qt&&Yi.canOverlap){Xt=!0;let it=wn.segments.get();for(let Nt of it)Mr.push({segments:new a.a0([Nt]),sortKey:Nt.sortKey,state:Ye,terrainData:$l})}else Mr.push({segments:wn.segments,sortKey:0,state:Ye,terrainData:$l})}Xt&&Mr.sort((ii,pi)=>ii.sortKey-pi.sortKey);for(let ii of Mr){let pi=ii.state;if(yr.activeTexture.set(Ir.TEXTURE0),pi.atlasTexture.bind(pi.atlasInterpolation,Ir.CLAMP_TO_EDGE),pi.atlasTextureIcon&&(yr.activeTexture.set(Ir.TEXTURE1),pi.atlasTextureIcon&&pi.atlasTextureIcon.bind(pi.atlasInterpolationIcon,Ir.CLAMP_TO_EDGE)),pi.isSDF){let Yi=pi.uniformValues;pi.hasHalo&&(Yi.u_is_halo=1,Kn(pi.buffers,ii.segments,B,oe,pi.program,$t,Yt,Jt,Yi,ii.terrainData)),Yi.u_is_halo=0}Kn(pi.buffers,ii.segments,B,oe,pi.program,$t,Yt,Jt,pi.uniformValues,ii.terrainData)}}function Kn(oe,w,B,Q,ee,le,Ne,$e,pt,zt){let Yt=Q.context;ee.draw(Yt,Yt.gl.TRIANGLES,le,Ne,$e,$i.disabled,pt,zt,B.id,oe.layoutVertexBuffer,oe.indexBuffer,w,B.paint,Q.transform.zoom,oe.programConfigurations.get(B.id),oe.dynamicLayoutVertexBuffer,oe.opacityVertexBuffer)}function ns(oe,w,B,Q){let ee=oe.context,le=ee.gl,Ne=wa.disabled,$e=new Da([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),pt=w.getBucket(B);if(!pt)return;let zt=Q.key,Yt=B.heatmapFbos.get(zt);Yt||(Yt=vo(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(zt,Yt)),ee.bindFramebuffer.set(Yt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Jt=pt.programConfigurations.get(B.id),yr=oe.useProgram("heatmap",Jt),Ir=oe.style.map.terrain.getTerrainData(Q);yr.draw(ee,le.TRIANGLES,Ln.disabled,Ne,$e,$i.disabled,za(Q.posMatrix,w,oe.transform.zoom,B.paint.get("heatmap-intensity")),Ir,B.id,pt.layoutVertexBuffer,pt.indexBuffer,pt.segments,B.paint,oe.transform.zoom,Jt)}function Jo(oe,w,B){let Q=oe.context,ee=Q.gl;Q.setColorMode(oe.colorModeForRenderPass());let le=ma(Q,w),Ne=B.key,$e=w.heatmapFbos.get(Ne);$e&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,$e.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),oe.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Ln.disabled,wa.disabled,oe.colorModeForRenderPass(),$i.disabled,Hr(oe,w,0,1),null,w.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments,w.paint,oe.transform.zoom),$e.destroy(),w.heatmapFbos.delete(Ne))}function vo(oe,w,B){var Q,ee;let le=oe.gl,Ne=le.createTexture();le.bindTexture(le.TEXTURE_2D,Ne),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 $e=(Q=oe.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,pt=(ee=oe.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,pt,w,B,0,le.RGBA,$e,null);let zt=oe.createFramebuffer(w,B,!1,!1);return zt.colorAttachment.set(Ne),zt}function ma(oe,w){return w.colorRampTexture||(w.colorRampTexture=new v(oe,w.colorRamp,oe.gl.RGBA)),w.colorRampTexture}function ja(oe,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,Ne=le[B.to.toString()],$e=le[B.from.toString()];if(!Ne&&$e&&(Ne=$e),!$e&&Ne&&($e=Ne),!Ne||!$e){let pt=ee.getPaintProperty(w);Ne=le[pt],$e=le[pt]}Ne&&$e&&oe.setConstantPatternPositions(Ne,$e)}function To(oe,w,B,Q,ee,le,Ne){let $e=oe.context.gl,pt="fill-pattern",zt=B.paint.get(pt),Yt=zt&&zt.constantOr(1),Jt=B.getCrossfadeParameters(),yr,Ir,ce,Ae,qe;Ne?(Ir=Yt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",yr=$e.LINES):(Ir=Yt?"fillPattern":"fill",yr=$e.TRIANGLES);let Ve=zt.constantOr(null);for(let ot of Q){let Ke=w.getTile(ot);if(Yt&&!Ke.patternsLoaded())continue;let ft=Ke.getBucket(B);if(!ft)continue;let qt=ft.programConfigurations.get(B.id),Xt=oe.useProgram(Ir,qt),$t=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(ot);Yt&&(oe.context.activeTexture.set($e.TEXTURE0),Ke.imageAtlasTexture.bind($e.LINEAR,$e.CLAMP_TO_EDGE),qt.updatePaintBuffers(Jt)),ja(qt,pt,Ve,Ke,B);let dr=$t?ot:null,Mr=oe.translatePosMatrix(dr?dr.posMatrix:ot.posMatrix,Ke,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(Ne){Ae=ft.indexBuffer2,qe=ft.segments2;let $r=[$e.drawingBufferWidth,$e.drawingBufferHeight];ce=Ir==="fillOutlinePattern"&&Yt?xn(Mr,oe,Jt,Ke,$r):fn(Mr,$r)}else Ae=ft.indexBuffer,qe=ft.segments,ce=Yt?zn(Mr,oe,Jt,Ke):Ui(Mr);Xt.draw(oe.context,yr,ee,oe.stencilModeForClipping(ot),le,$i.disabled,ce,$t,B.id,ft.layoutVertexBuffer,Ae,qe,B.paint,oe.transform.zoom,qt)}}function Ao(oe,w,B,Q,ee,le,Ne){let $e=oe.context,pt=$e.gl,zt="fill-extrusion-pattern",Yt=B.paint.get(zt),Jt=Yt.constantOr(1),yr=B.getCrossfadeParameters(),Ir=B.paint.get("fill-extrusion-opacity"),ce=Yt.constantOr(null);for(let Ae of Q){let qe=w.getTile(Ae),Ve=qe.getBucket(B);if(!Ve)continue;let ot=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(Ae),Ke=Ve.programConfigurations.get(B.id),ft=oe.useProgram(Jt?"fillExtrusionPattern":"fillExtrusion",Ke);Jt&&(oe.context.activeTexture.set(pt.TEXTURE0),qe.imageAtlasTexture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),Ke.updatePaintBuffers(yr)),ja(Ke,zt,ce,qe,B);let qt=oe.translatePosMatrix(Ae.posMatrix,qe,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Xt=B.paint.get("fill-extrusion-vertical-gradient"),$t=Jt?Qr(qt,oe,Xt,Ir,Ae,yr,qe):Gi(qt,oe,Xt,Ir);ft.draw($e,$e.gl.TRIANGLES,ee,le,Ne,$i.backCCW,$t,ot,B.id,Ve.layoutVertexBuffer,Ve.indexBuffer,Ve.segments,B.paint,oe.transform.zoom,Ke,oe.style.map.terrain&&Ve.centroidVertexBuffer)}}function la(oe,w,B,Q,ee,le,Ne){let $e=oe.context,pt=$e.gl,zt=B.fbo;if(!zt)return;let Yt=oe.useProgram("hillshade"),Jt=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(w);$e.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,zt.colorAttachment.get()),Yt.draw($e,pt.TRIANGLES,ee,le,Ne,$i.disabled,((yr,Ir,ce,Ae)=>{let qe=ce.paint.get("hillshade-shadow-color"),Ve=ce.paint.get("hillshade-highlight-color"),ot=ce.paint.get("hillshade-accent-color"),Ke=ce.paint.get("hillshade-illumination-direction")*(Math.PI/180);ce.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ke-=yr.transform.angle);let ft=!yr.options.moving;return{u_matrix:Ae?Ae.posMatrix:yr.transform.calculatePosMatrix(Ir.tileID.toUnwrapped(),ft),u_image:0,u_latrange:na(0,Ir.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),Ke],u_shadow:qe,u_highlight:Ve,u_accent:ot}})(oe,B,Q,Jt?w:null),Jt,Q.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments)}function Ki(oe,w,B,Q,ee,le){let Ne=oe.context,$e=Ne.gl,pt=w.dem;if(pt&&pt.data){let zt=pt.dim,Yt=pt.stride,Jt=pt.getPixels();if(Ne.activeTexture.set($e.TEXTURE1),Ne.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||oe.getTileTexture(Yt),w.demTexture){let Ir=w.demTexture;Ir.update(Jt,{premultiply:!1}),Ir.bind($e.NEAREST,$e.CLAMP_TO_EDGE)}else w.demTexture=new v(Ne,Jt,$e.RGBA,{premultiply:!1}),w.demTexture.bind($e.NEAREST,$e.CLAMP_TO_EDGE);Ne.activeTexture.set($e.TEXTURE0);let yr=w.fbo;if(!yr){let Ir=new v(Ne,{width:zt,height:zt,data:null},$e.RGBA);Ir.bind($e.LINEAR,$e.CLAMP_TO_EDGE),yr=w.fbo=Ne.createFramebuffer(zt,zt,!0,!1),yr.colorAttachment.set(Ir.texture)}Ne.bindFramebuffer.set(yr.framebuffer),Ne.viewport.set([0,0,zt,zt]),oe.useProgram("hillshadePrepare").draw(Ne,$e.TRIANGLES,Q,ee,le,$i.disabled,((Ir,ce)=>{let Ae=ce.stride,qe=a.H();return a.aP(qe,0,a.X,-a.X,0,0,1),a.J(qe,qe,[0,-a.X,0]),{u_matrix:qe,u_image:1,u_dimension:[Ae,Ae],u_zoom:Ir.overscaledZ,u_unpack:ce.getUnpackVector()}})(w.tileID,pt),null,B.id,oe.rasterBoundsBuffer,oe.quadTriangleIndexBuffer,oe.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function ho(oe,w,B,Q,ee,le){let Ne=Q.paint.get("raster-fade-duration");if(!le&&Ne>0){let $e=l.now(),pt=($e-oe.timeAdded)/Ne,zt=w?($e-w.timeAdded)/Ne:-1,Yt=B.getSource(),Jt=ee.coveringZoomLevel({tileSize:Yt.tileSize,roundZoom:Yt.roundZoom}),yr=!w||Math.abs(w.tileID.overscaledZ-Jt)>Math.abs(oe.tileID.overscaledZ-Jt),Ir=yr&&oe.refreshedUponExpiration?1:a.ac(yr?pt:1-zt,0,1);return oe.refreshedUponExpiration&&pt>=1&&(oe.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Ir}:{opacity:Ir,mix:0}}return{opacity:1,mix:0}}let Ka=new a.aM(1,0,0,1),Ca=new a.aM(0,1,0,1),ta=new a.aM(0,0,1,1),En=new a.aM(1,0,1,1),Mo=new a.aM(0,1,1,1);function Ds(oe,w,B,Q){vs(oe,0,w+B/2,oe.transform.width,B,Q)}function Ro(oe,w,B,Q){vs(oe,w-B/2,0,B,oe.transform.height,Q)}function vs(oe,w,B,Q,ee,le){let Ne=oe.context,$e=Ne.gl;$e.enable($e.SCISSOR_TEST),$e.scissor(w*oe.pixelRatio,B*oe.pixelRatio,Q*oe.pixelRatio,ee*oe.pixelRatio),Ne.clear({color:le}),$e.disable($e.SCISSOR_TEST)}function Ks(oe,w,B){let Q=oe.context,ee=Q.gl,le=B.posMatrix,Ne=oe.useProgram("debug"),$e=Ln.disabled,pt=wa.disabled,zt=oe.colorModeForRenderPass(),Yt="$debug",Jt=oe.style.map.terrain&&oe.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let yr=w.getTileByID(B.key).latestRawTileData,Ir=Math.floor((yr&&yr.byteLength||0)/1024),ce=w.getTile(B).tileSize,Ae=512/Math.min(ce,512)*(B.overscaledZ/oe.transform.zoom)*.5,qe=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(qe+=` => ${B.overscaledZ}`),function(Ve,ot){Ve.initDebugOverlayCanvas();let Ke=Ve.debugOverlayCanvas,ft=Ve.context.gl,qt=Ve.debugOverlayCanvas.getContext("2d");qt.clearRect(0,0,Ke.width,Ke.height),qt.shadowColor="white",qt.shadowBlur=2,qt.lineWidth=1.5,qt.strokeStyle="white",qt.textBaseline="top",qt.font="bold 36px Open Sans, sans-serif",qt.fillText(ot,5,5),qt.strokeText(ot,5,5),Ve.debugOverlayTexture.update(Ke),Ve.debugOverlayTexture.bind(ft.LINEAR,ft.CLAMP_TO_EDGE)}(oe,`${qe} ${Ir}kB`),Ne.draw(Q,ee.TRIANGLES,$e,pt,Da.alphaBlended,$i.disabled,Fn(le,a.aM.transparent,Ae),null,Yt,oe.debugBuffer,oe.quadTriangleIndexBuffer,oe.debugSegments),Ne.draw(Q,ee.LINE_STRIP,$e,pt,zt,$i.disabled,Fn(le,a.aM.red),Jt,Yt,oe.debugBuffer,oe.tileBorderIndexBuffer,oe.debugSegments)}function as(oe,w,B){let Q=oe.context,ee=Q.gl,le=oe.colorModeForRenderPass(),Ne=new Ln(ee.LEQUAL,Ln.ReadWrite,oe.depthRangeFor3D),$e=oe.useProgram("terrain"),pt=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,oe.width,oe.height]);for(let zt of B){let Yt=oe.renderToTexture.getTexture(zt),Jt=w.getTerrainData(zt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Yt.texture);let yr=oe.transform.calculatePosMatrix(zt.tileID.toUnwrapped()),Ir=w.getMeshFrameDelta(oe.transform.zoom),ce=oe.transform.calculateFogMatrix(zt.tileID.toUnwrapped()),Ae=tr(yr,Ir,ce,oe.style.sky,oe.transform.pitch);$e.draw(Q,ee.TRIANGLES,Ne,wa.disabled,le,$i.backCCW,Ae,Jt,"terrain",pt.vertexBuffer,pt.indexBuffer,pt.segments)}}class Jn{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 Cs{constructor(w,B){this.context=new Aa(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=tt.maxUnderzooming+tt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vi}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,fi.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,fi.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,Xe.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,fi.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let Ne=new a.aZ;Ne.emplaceBack(0),Ne.emplaceBack(1),Ne.emplaceBack(3),Ne.emplaceBack(2),Ne.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(Ne);let $e=new a.aY;$e.emplaceBack(0,1,2),$e.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer($e);let pt=this.context.gl;this.stencilClearMode=new wa({func:pt.ALWAYS,mask:0},0,255,pt.ZERO,pt.ZERO,pt.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,Ln.disabled,this.stencilClearMode,Da.disabled,$i.disabled,ia(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(Da.disabled),Q.setDepthMode(Ln.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Ne of B){let $e=this._tileClippingMaskIDs[Ne.key]=this.nextStencilID++,pt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ne);le.draw(Q,ee.TRIANGLES,Ln.disabled,new wa({func:ee.ALWAYS,mask:0},$e,255,ee.KEEP,ee.KEEP,ee.REPLACE),Da.disabled,$i.disabled,ia(Ne.posMatrix),pt,"$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 wa({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new wa({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((Ne,$e)=>$e.overscaledZ-Ne.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 Ne={};for(let $e=0;$e({u_sky_color:Ve.properties.get("sky-color"),u_horizon_color:Ve.properties.get("horizon-color"),u_horizon:(ot.height/2+ot.getHorizon())*Ke,u_sky_horizon_blend:Ve.properties.get("sky-horizon-blend")*ot.height/2*Ke}))(zt,pt.style.map.transform,pt.pixelRatio),Ir=new Ln(Jt.LEQUAL,Ln.ReadWrite,[0,1]),ce=wa.disabled,Ae=pt.colorModeForRenderPass(),qe=pt.useProgram("sky");if(!zt.mesh){let Ve=new a.aX;Ve.emplaceBack(-1,-1),Ve.emplaceBack(1,-1),Ve.emplaceBack(1,1),Ve.emplaceBack(-1,1);let ot=new a.aY;ot.emplaceBack(0,1,2),ot.emplaceBack(0,2,3),zt.mesh=new Jn(Yt.createVertexBuffer(Ve,fi.members),Yt.createIndexBuffer(ot),a.a0.simpleSegment(0,0,Ve.length,ot.length))}qe.draw(Yt,Jt.TRIANGLES,Ir,ce,Ae,$i.disabled,yr,void 0,"sky",zt.mesh.vertexBuffer,zt.mesh.indexBuffer,zt.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 pt=this.style._layers[Q[this.currentLayer]],zt=ee[pt.source],Yt=le[pt.source];this._renderTileClippingMasks(pt,Yt),this.renderLayer(this,zt,pt,Yt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerqe.source&&!qe.isHidden(Yt)?[zt.sourceCaches[qe.source]]:[]),Ir=yr.filter(qe=>qe.getSource().type==="vector"),ce=yr.filter(qe=>qe.getSource().type!=="vector"),Ae=qe=>{(!Jt||Jt.getSource().maxzoomAe(qe)),Jt||ce.forEach(qe=>Ae(qe)),Jt}(this.style,this.transform.zoom);pt&&function(zt,Yt,Jt){for(let yr=0;yr0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,Ne){let $e=le.context,pt=$e.gl,zt=Da.unblended,Yt=new Ln(pt.LEQUAL,Ln.ReadWrite,[0,1]),Jt=Ne.getTerrainMesh(),yr=Ne.sourceCache.getRenderableTiles(),Ir=le.useProgram("terrainDepth");$e.bindFramebuffer.set(Ne.getFramebuffer("depth").framebuffer),$e.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),$e.clear({color:a.aM.transparent,depth:1});for(let ce of yr){let Ae=Ne.getTerrainData(ce.tileID),qe={u_matrix:le.transform.calculatePosMatrix(ce.tileID.toUnwrapped()),u_ele_delta:Ne.getMeshFrameDelta(le.transform.zoom)};Ir.draw($e,pt.TRIANGLES,Yt,wa.disabled,zt,$i.backCCW,qe,Ae,"terrain",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments)}$e.bindFramebuffer.set(null),$e.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,Ne){let $e=le.context,pt=$e.gl,zt=Da.unblended,Yt=new Ln(pt.LEQUAL,Ln.ReadWrite,[0,1]),Jt=Ne.getTerrainMesh(),yr=Ne.getCoordsTexture(),Ir=Ne.sourceCache.getRenderableTiles(),ce=le.useProgram("terrainCoords");$e.bindFramebuffer.set(Ne.getFramebuffer("coords").framebuffer),$e.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),$e.clear({color:a.aM.transparent,depth:1}),Ne.coordsIndex=[];for(let Ae of Ir){let qe=Ne.getTerrainData(Ae.tileID);$e.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,yr.texture);let Ve={u_matrix:le.transform.calculatePosMatrix(Ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-Ne.coordsIndex.length)/255,u_texture:0,u_ele_delta:Ne.getMeshFrameDelta(le.transform.zoom)};ce.draw($e,pt.TRIANGLES,Yt,wa.disabled,zt,$i.backCCW,Ve,qe,"terrain",Jt.vertexBuffer,Jt.indexBuffer,Jt.segments),Ne.coordsIndex.push(Ae.tileID.key)}$e.bindFramebuffer.set(null),$e.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,Ne,$e,pt,zt){if(le.renderPass!=="translucent")return;let Yt=wa.disabled,Jt=le.colorModeForRenderPass();($e._unevaluatedLayout.hasValue("text-variable-anchor")||$e._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(yr,Ir,ce,Ae,qe,Ve,ot,Ke,ft){let qt=Ir.transform,Xt=Pi(),$t=qe==="map",dr=Ve==="map";for(let Mr of yr){let $r=Ae.getTile(Mr),ii=$r.getBucket(ce);if(!ii||!ii.text||!ii.text.segments.get().length)continue;let pi=a.ag(ii.textSizeData,qt.zoom),Yi=Ei($r,1,Ir.transform.zoom),wn=fr(Mr.posMatrix,dr,$t,Ir.transform,Yi),Tn=ce.layout.get("icon-text-fit")!=="none"&&ii.hasIconData();if(pi){let ua=Math.pow(2,qt.zoom-$r.tileID.overscaledZ),oo=Ir.style.map.terrain?(ys,il)=>Ir.style.map.terrain.getElevation(Mr,ys,il):null,el=Xt.translatePosition(qt,$r,ot,Ke);hn(ii,$t,dr,ft,qt,wn,Mr.posMatrix,ua,pi,Tn,Xt,el,Mr.toUnwrapped(),oo)}}}(pt,le,$e,Ne,$e.layout.get("text-rotation-alignment"),$e.layout.get("text-pitch-alignment"),$e.paint.get("text-translate"),$e.paint.get("text-translate-anchor"),zt),$e.paint.get("icon-opacity").constantOr(1)!==0&&Ss(le,Ne,$e,pt,!1,$e.paint.get("icon-translate"),$e.paint.get("icon-translate-anchor"),$e.layout.get("icon-rotation-alignment"),$e.layout.get("icon-pitch-alignment"),$e.layout.get("icon-keep-upright"),Yt,Jt),$e.paint.get("text-opacity").constantOr(1)!==0&&Ss(le,Ne,$e,pt,!0,$e.paint.get("text-translate"),$e.paint.get("text-translate-anchor"),$e.layout.get("text-rotation-alignment"),$e.layout.get("text-pitch-alignment"),$e.layout.get("text-keep-upright"),Yt,Jt),Ne.map.showCollisionBoxes&&(Sa(le,Ne,$e,pt,!0),Sa(le,Ne,$e,pt,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,Ne,$e,pt){if(le.renderPass!=="translucent")return;let zt=$e.paint.get("circle-opacity"),Yt=$e.paint.get("circle-stroke-width"),Jt=$e.paint.get("circle-stroke-opacity"),yr=!$e.layout.get("circle-sort-key").isConstant();if(zt.constantOr(1)===0&&(Yt.constantOr(1)===0||Jt.constantOr(1)===0))return;let Ir=le.context,ce=Ir.gl,Ae=le.depthModeForSublayer(0,Ln.ReadOnly),qe=wa.disabled,Ve=le.colorModeForRenderPass(),ot=[];for(let Ke=0;KeKe.sortKey-ft.sortKey);for(let Ke of ot){let{programConfiguration:ft,program:qt,layoutVertexBuffer:Xt,indexBuffer:$t,uniformValues:dr,terrainData:Mr}=Ke.state;qt.draw(Ir,ce.TRIANGLES,Ae,qe,Ve,$i.disabled,dr,Mr,$e.id,Xt,$t,Ke.segments,$e.paint,le.transform.zoom,ft)}})(w,B,Q,ee);break;case"heatmap":(function(le,Ne,$e,pt){if($e.paint.get("heatmap-opacity")===0)return;let zt=le.context;if(le.style.map.terrain){for(let Yt of pt){let Jt=Ne.getTile(Yt);Ne.hasRenderableParent(Yt)||(le.renderPass==="offscreen"?ns(le,Jt,$e,Yt):le.renderPass==="translucent"&&Jo(le,$e,Yt))}zt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Yt,Jt,yr,Ir){let ce=Yt.context,Ae=ce.gl,qe=wa.disabled,Ve=new Da([Ae.ONE,Ae.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(ot,Ke,ft){let qt=ot.gl;ot.activeTexture.set(qt.TEXTURE1),ot.viewport.set([0,0,Ke.width/4,Ke.height/4]);let Xt=ft.heatmapFbos.get(a.aU);Xt?(qt.bindTexture(qt.TEXTURE_2D,Xt.colorAttachment.get()),ot.bindFramebuffer.set(Xt.framebuffer)):(Xt=vo(ot,Ke.width/4,Ke.height/4),ft.heatmapFbos.set(a.aU,Xt))})(ce,Yt,yr),ce.clear({color:a.aM.transparent});for(let ot=0;ot20&&Yt.texParameterf(Yt.TEXTURE_2D,zt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,zt.extTextureFilterAnisotropicMax);let ii=le.style.map.terrain&&le.style.map.terrain.getTerrainData(ot),pi=ii?ot:null,Yi=pi?pi.posMatrix:le.transform.calculatePosMatrix(ot.toUnwrapped(),Ve),wn=Bo(Yi,Mr||[0,0],dr||1,$t,$e);Jt instanceof Tt?yr.draw(zt,Yt.TRIANGLES,Ke,wa.disabled,Ir,$i.disabled,wn,ii,$e.id,Jt.boundsBuffer,le.quadTriangleIndexBuffer,Jt.boundsSegments):yr.draw(zt,Yt.TRIANGLES,Ke,ce[ot.overscaledZ],Ir,$i.disabled,wn,ii,$e.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,Ne,$e,pt){let zt=$e.paint.get("background-color"),Yt=$e.paint.get("background-opacity");if(Yt===0)return;let Jt=le.context,yr=Jt.gl,Ir=le.transform,ce=Ir.tileSize,Ae=$e.paint.get("background-pattern");if(le.isPatternMissing(Ae))return;let qe=!Ae&&zt.a===1&&Yt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==qe)return;let Ve=wa.disabled,ot=le.depthModeForSublayer(0,qe==="opaque"?Ln.ReadWrite:Ln.ReadOnly),Ke=le.colorModeForRenderPass(),ft=le.useProgram(Ae?"backgroundPattern":"background"),qt=pt||Ir.coveringTiles({tileSize:ce,terrain:le.style.map.terrain});Ae&&(Jt.activeTexture.set(yr.TEXTURE0),le.imageManager.bind(le.context));let Xt=$e.getCrossfadeParameters();for(let $t of qt){let dr=pt?$t.posMatrix:le.transform.calculatePosMatrix($t.toUnwrapped()),Mr=Ae?ts(dr,Yt,le,Ae,{tileID:$t,tileSize:ce},Xt):Xn(dr,Yt,zt),$r=le.style.map.terrain&&le.style.map.terrain.getTerrainData($t);ft.draw(Jt,yr.TRIANGLES,ot,Ve,Ke,$i.disabled,Mr,$r,$e.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,Ne,$e){let pt=le.context,zt=$e.implementation;if(le.renderPass==="offscreen"){let Yt=zt.prerender;Yt&&(le.setCustomLayerDefaults(),pt.setColorMode(le.colorModeForRenderPass()),Yt.call(zt,pt.gl,le.transform.customLayerMatrix()),pt.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),pt.setColorMode(le.colorModeForRenderPass()),pt.setStencilMode(wa.disabled);let Yt=zt.renderingMode==="3d"?new Ln(le.context.gl.LEQUAL,Ln.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Ln.ReadOnly);pt.setDepthMode(Yt),zt.render(pt.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),pt.setDirty(),le.setBaseState(),pt.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let Ne=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(Ne){let zt=Math.sin(Ne),Yt=Math.cos(Ne);Q=[Q[0]*Yt-Q[1]*zt,Q[0]*zt+Q[1]*Yt]}let $e=[le?Q[0]:Ei(B,Q[0],this.transform.zoom),le?Q[1]:Ei(B,Q[1],this.transform.zoom),0],pt=new Float32Array(16);return a.J(pt,w,$e),pt}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 Nr(this.context,Or[w],B,Ja[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 v(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 Xa{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($e=>{let pt=1/($e=a.af([],$e,w))[3]/B*ee;return a.b1($e,$e,[pt,pt,1/$e[3],pt])}),Ne=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map($e=>{let pt=function(yr,Ir){var ce=Ir[0],Ae=Ir[1],qe=Ir[2],Ve=ce*ce+Ae*Ae+qe*qe;return Ve>0&&(Ve=1/Math.sqrt(Ve)),yr[0]=Ir[0]*Ve,yr[1]=Ir[1]*Ve,yr[2]=Ir[2]*Ve,yr}([],function(yr,Ir,ce){var Ae=Ir[0],qe=Ir[1],Ve=Ir[2],ot=ce[0],Ke=ce[1],ft=ce[2];return yr[0]=qe*ft-Ve*Ke,yr[1]=Ve*ot-Ae*ft,yr[2]=Ae*Ke-qe*ot,yr}([],L([],le[$e[0]],le[$e[1]]),L([],le[$e[2]],le[$e[1]]))),zt=-((Yt=pt)[0]*(Jt=le[$e[1]])[0]+Yt[1]*Jt[1]+Yt[2]*Jt[2]);var Yt,Jt;return pt.concat(zt)});return new Xa(le,Ne)}}class Zo{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&&Ne++;if(Ne===0)return 0;Ne!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,Ne=-Number.MAX_VALUE;for(let $e=0;$ethis.max[ee]-this.min[ee])return 0}return 1}}class Eo{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 Eo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let lo=85.051129;class $a{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 Eo,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new $a(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 Ne=ee[0],$e=ee[1],pt=ee[2],zt=ee[3],Yt=Math.sin(le),Jt=Math.cos(le);Q[0]=Ne*Jt+pt*Yt,Q[1]=$e*Jt+zt*Yt,Q[2]=Ne*-Yt+pt*Jt,Q[3]=$e*-Yt+zt*Jt}(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)),Ne=this.pointCoordinate(new a.P(0,this.height)),$e=Math.floor(Math.min(Q.x,ee.x,le.x,Ne.x)),pt=Math.floor(Math.max(Q.x,ee.x,le.x,Ne.x)),zt=1;for(let Yt=$e-zt;Yt<=pt+zt;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 Ne=this.pointCoordinate(this.getCameraPoint()),$e=a.Z.fromLngLat(this.center),pt=Math.pow(2,ee),zt=[pt*Ne.x,pt*Ne.y,0],Yt=[pt*$e.x,pt*$e.y,0],Jt=Xa.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),yr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(yr=ee);let Ir=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ce=Ke=>({aabb:new Zo([Ke*pt,0,0],[(Ke+1)*pt,pt,0]),zoom:0,x:0,y:0,wrap:Ke,fullyVisible:!1}),Ae=[],qe=[],Ve=ee,ot=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Ke=1;Ke<=3;Ke++)Ae.push(ce(-Ke)),Ae.push(ce(Ke));for(Ae.push(ce(0));Ae.length>0;){let Ke=Ae.pop(),ft=Ke.x,qt=Ke.y,Xt=Ke.fullyVisible;if(!Xt){let ii=Ke.aabb.intersects(Jt);if(ii===0)continue;Xt=ii===2}let $t=w.terrain?zt:Yt,dr=Ke.aabb.distanceX($t),Mr=Ke.aabb.distanceY($t),$r=Math.max(Math.abs(dr),Math.abs(Mr));if(Ke.zoom===Ve||$r>Ir+(1<=yr){let ii=Ve-Ke.zoom,pi=zt[0]-.5-(ft<>1),wn=Ke.zoom+1,Tn=Ke.aabb.quadrant(ii);if(w.terrain){let ua=new a.S(wn,Ke.wrap,wn,pi,Yi),oo=w.terrain.getMinMaxElevation(ua),el=(B=oo.minElevation)!==null&&B!==void 0?B:this.elevation,ys=(Q=oo.maxElevation)!==null&&Q!==void 0?Q:this.elevation;Tn=new Zo([Tn.min[0],Tn.min[1],el],[Tn.max[0],Tn.max[1],ys])}Ae.push({aabb:Tn,zoom:wn,x:pi,y:Yi,wrap:Ke.wrap,fullyVisible:Xt})}}return qe.sort((Ke,ft)=>Ke.distanceSq-ft.distanceSq).map(Ke=>Ke.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,lo);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 Ne=Q+B-le,$e=Math.cos(this._pitch)*this.cameraToCenterDistance/Ne/a.b5(1,ee.lat),pt=this.scaleZoom($e/this.tileSize);this._elevation=le,this._center=ee,this.zoom=pt}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),Ne=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(Ne),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 yr=B.pointCoordinate(w);if(yr!=null)return yr}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],Ne=ee[3],$e=Q[1]/le,pt=ee[1]/Ne,zt=Q[2]/le,Yt=ee[2]/Ne,Jt=zt===Yt?0:(0-zt)/(Yt-zt);return new a.Z(a.y.number(Q[0]/le,ee[0]/Ne,Jt)/this.worldSize,a.y.number($e,pt,Jt)/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 fe().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 fe([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,lo])}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 Ke=179.9999999999;ee=[-Ke,Ke]}let le=this.tileSize*this.zoomScale(Q.zoom),Ne=0,$e=le,pt=0,zt=le,Yt=0,Jt=0,{x:yr,y:Ir}=this.size;if(this.latRange){let Ke=this.latRange;Ne=a.Q(Ke[1])*le,$e=a.Q(Ke[0])*le,$e-Ne$e&&(Ve=$e-Ke)}if(ee){let Ke=(pt+zt)/2,ft=ce;this._renderWorldCopies&&(ft=a.b3(ce,Ke-le/2,Ke+le/2));let qt=yr/2;ft-qtzt&&(qe=zt-qt)}if(qe!==void 0||Ve!==void 0){let Ke=new a.P(qe!=null?qe:ce,Ve!=null?Ve:Ae);Q.center=this.unproject.call({worldSize:le},Ke).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),Ne=Math.min(this.elevation,this.minElevationForCurrentTile),$e=le-Ne*this._pixelPerMeter/Math.cos(this._pitch),pt=Ne<0?$e:le,zt=Math.PI/2+this._pitch,Yt=this._fov*(.5+w.y/this.height),Jt=Math.sin(Yt)*pt/Math.sin(a.ac(Math.PI-zt-Yt,.01,Math.PI-.01)),yr=this.getHorizon(),Ir=2*Math.atan(yr/this.cameraToCenterDistance)*(.5+w.y/(2*yr)),ce=Math.sin(Ir)*pt/Math.sin(a.ac(Math.PI-zt-Ir,.01,Math.PI-.01)),Ae=Math.min(Jt,ce);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Ae+pt),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 qe=this.width%2/2,Ve=this.height%2/2,ot=Math.cos(this.angle),Ke=Math.sin(this.angle),ft=B-Math.round(B)+ot*qe+Ke*Ve,qt=Q-Math.round(Q)+ot*Ve+Ke*qe,Xt=new Float64Array(ee);if(a.J(Xt,Xt,[ft>.5?ft-1:ft,qt>.5?qt-1:qt,0]),this.alignedModelViewProjectionMatrix=Xt,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,Ne=B.y;for(let $e of w)Q=Math.min(Q,$e.x),ee=Math.min(ee,$e.y),le=Math.max(le,$e.x),Ne=Math.max(Ne,$e.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,Ne),new a.P(Q,Ne),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 Xo(oe,w){let B,Q=!1,ee=null,le=null,Ne=()=>{ee=null,Q&&(oe.apply(le,B),ee=setTimeout(Ne,w),Q=!1)};return(...$e)=>(Q=!0,le=this,B=$e,ee||Ne(),ee)}class rs{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 Ne=window.location.href.replace(/(#.+)?$/,le);Ne=Ne.replace("&&","&"),window.history.replaceState(window.history.state,null,Ne)},this._updateHash=Xo(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),Ne=Math.round(B.lng*le)/le,$e=Math.round(B.lat*le)/le,pt=this._map.getBearing(),zt=this._map.getPitch(),Yt="";if(Yt+=w?`/${Ne}/${$e}/${Q}`:`${Q}/${$e}/${Ne}`,(pt||zt)&&(Yt+="/"+Math.round(10*pt)/10),zt&&(Yt+=`/${Math.round(zt)}`),this._hashName){let Jt=this._hashName,yr=!1,Ir=window.location.hash.slice(1).split("&").map(ce=>{let Ae=ce.split("=")[0];return Ae===Jt?(yr=!0,`${Ae}=${Yt}`):ce}).filter(ce=>ce);return yr||Ir.push(`${Jt}=${Yt}`),`#${Ir.join("&")}`}return`#${Yt}`}}let $n={linearity:.3,easing:a.b8(0,0,.3,1)},Sn=a.e({deceleration:2500,maxSpeed:1400},$n),uo=a.e({deceleration:20,maxSpeed:1400},$n),Rs=a.e({deceleration:1e3,maxSpeed:360},$n),xs=a.e({deceleration:1e3,maxSpeed:90},$n);class Go{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=l.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=So(B.pan.mag(),Q,a.e({},Sn,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,os(ee,le)}if(B.zoom){let le=So(B.zoom,Q,uo);ee.zoom=this._map.transform.zoom+le.amount,os(ee,le)}if(B.bearing){let le=So(B.bearing,Q,Rs);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),os(ee,le)}if(B.pitch){let le=So(B.pitch,Q,xs);ee.pitch=this._map.transform.pitch+le.amount,os(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 os(oe,w){(!oe.duration||oe.durationB.unproject(pt)),$e=le.reduce((pt,zt,Yt,Jt)=>pt.add(zt.div(Jt.length)),new a.P(0,0));super(w,{points:le,point:$e,lngLats:Ne,lngLat:B.unproject($e),originalEvent:Q}),this._defaultPrevented=!1}}class rl extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class $o{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new rl(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new Qn(w.type,this._map,w))}mouseup(w){this._map.fire(new Qn(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new Qn(w.type,this._map,w))}dblclick(w){return this._firePreventable(new Qn(w.type,this._map,w))}mouseover(w){this._map.fire(new Qn(w.type,this._map,w))}mouseout(w){this._map.fire(new Qn(w.type,this._map,w))}touchstart(w){return this._firePreventable(new zo(w.type,this._map,w))}touchmove(w){this._map.fire(new zo(w.type,this._map,w))}touchend(w){this._map.fire(new zo(w.type,this._map,w))}touchcancel(w){this._map.fire(new zo(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Na{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new Qn(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Qn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new Qn(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ua{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 Po{constructor(w,B){this._map=w,this._tr=new Ua(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&&(f.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&&(f.remove(this._box),this._box=null),f.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function fo(oe,w){if(oe.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${oe.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 Ne of ee)le._add(Ne);return le.div(ee.length)}(B),this.touches=fo(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=fo(Q,B);for(let le in this.touches){let Ne=ee[le];(!Ne||Ne.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 Ma{constructor(w){this.singleTap=new ro(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,Ne=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&Ne||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class io{constructor(w){this._tr=new Ua(w),this._zoomIn=new Ma({numTouches:1,numTaps:2}),this._zoomOut=new Ma({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),Ne=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$e=>$e.easeTo({duration:300,zoom:Ne.zoom+1,around:Ne.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$e=>$e.easeTo({duration:300,zoom:Ne.zoom-1,around:Ne.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 aa{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){oe.mousedown=oe.dragStart,oe.mousemoveWindow=oe.dragMove,oe.mouseup=oe.dragEnd,oe.contextmenu=w=>{w.preventDefault()}},ws=({enable:oe,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new No({checkCorrectEvent:ee=>f.mouseButton(ee)===0&&ee.ctrlKey||f.mouseButton(ee)===2});return new aa({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:oe,assignEvents:Fs})},no=({enable:oe,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new No({checkCorrectEvent:ee=>f.mouseButton(ee)===0&&ee.ctrlKey||f.mouseButton(ee)===2});return new aa({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:oe,assignEvents:Fs})};class Ls{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=fo(Q,B),le=new a.P(0,0),Ne=new a.P(0,0),$e=0;for(let zt in ee){let Yt=ee[zt],Jt=this._touches[zt];Jt&&(le._add(Yt),Ne._add(Yt.sub(Jt)),$e++,ee[zt]=Yt)}if(this._touches=ee,this._shouldBePrevented($e)||!Ne.mag())return;let pt=Ne.div($e);return this._sum._add(pt),this._sum.mag()Math.abs(oe.x)}class gs extends ds{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,ls(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 Ne=w.y>0==B.y>0;return ls(w)&&ls(B)&&Ne}}let bt={panStep:100,bearingStep:15,pitchStep:10};class Ft{constructor(w){this._tr=new Ua(w);let B=bt;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,Ne=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(),Ne=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),Ne=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:$e=>{let pt=this._tr;$e.easeTo({duration:300,easeId:"keyboardHandler",easing:hr,zoom:B?Math.round(pt.zoom)+B*(w.shiftKey?2:1):pt.zoom,bearing:pt.bearing+Q*this._bearingStep,pitch:pt.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-Ne*this._panStep],center:pt.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 hr(oe){return oe*(2-oe)}let nr=4.000244140625;class Sr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new Ua(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=l.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%nr==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=f.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 pt=this._type==="wheel"&&Math.abs(this._delta)>nr?this._wheelZoomRate:this._defaultZoomRate,zt=2/(1+Math.exp(-Math.abs(this._delta*pt)));this._delta<0&&zt!==0&&(zt=1/zt);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*zt))),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,Ne=!1,$e=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&$e){let pt=Math.min($e/200,1),zt=ee(pt);le=a.y.number(Q,B,zt),pt<1?this._frameId||(this._frameId=!0):Ne=!0}else le=B,Ne=!0;return this._active=!0,Ne&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ne,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(l.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),Ne=.27/Math.sqrt(le*le+1e-4)*.01,$e=Math.sqrt(.0729-Ne*Ne);B=a.b8(Ne,$e,.25,1)}return this._prevEase={start:l.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 li{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 di{constructor(w){this._tr=new Ua(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 mi{constructor(){this._tap=new Ma({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,Ne=this._tapPoint.dist(ee)<30;le&&Ne?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 Oi{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 dn{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 wi{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 ui{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=f.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&&(f.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 Ai=oe=>oe.zoom||oe.drag||oe.pitch||oe.rotate;class gi extends a.k{}function gn(oe){return oe.panDelta&&oe.panDelta.mag()||oe.zoomDelta||oe.bearingDelta||oe.pitchDelta}class In{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 Ne=ee.type==="renderFrame"?void 0:ee,$e={needsRenderFrame:!1},pt={},zt={},Yt=ee.touches,Jt=Yt?this._getMapTouches(Yt):void 0,yr=Jt?f.touchPos(this._map.getCanvas(),Jt):f.mousePos(this._map.getCanvas(),ee);for(let{handlerName:Ae,handler:qe,allowed:Ve}of this._handlers){if(!qe.isEnabled())continue;let ot;this._blockedByActive(zt,Ve,Ae)?qe.reset():qe[le||ee.type]&&(ot=qe[le||ee.type](ee,yr,Jt),this.mergeHandlerResult($e,pt,ot,Ae,Ne),ot&&ot.needsRenderFrame&&this._triggerRenderFrame()),(ot||qe.isActive())&&(zt[Ae]=qe)}let Ir={};for(let Ae in this._previousActiveHandlers)zt[Ae]||(Ir[Ae]=Ne);this._previousActiveHandlers=zt,(Object.keys(Ir).length||gn($e))&&(this._changes.push([$e,pt,Ir]),this._triggerRenderFrame()),(Object.keys(zt).length||gn($e))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ce}=$e;ce&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ce(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Go(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,Ne]of this._listeners)f.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,Ne)}destroy(){for(let[w,B,Q]of this._listeners)f.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new $o(B,w));let ee=B.boxZoom=new Po(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new ui(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let Ne=new io(B),$e=new di(B);B.doubleClickZoom=new li($e,Ne),this._add("tapZoom",Ne),this._add("clickZoom",$e),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let pt=new mi;this._add("tapDragZoom",pt);let zt=B.touchPitch=new gs(B);this._add("touchPitch",zt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Yt=ws(w),Jt=no(w);B.dragRotate=new dn(w,Yt,Jt),this._add("mouseRotate",Yt,["mousePitch"]),this._add("mousePitch",Jt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let yr=(({enable:ot,clickTolerance:Ke})=>{let ft=new No({checkCorrectEvent:qt=>f.mouseButton(qt)===0&&!qt.ctrlKey});return new aa({clickTolerance:Ke,move:(qt,Xt)=>({around:Xt,panDelta:Xt.sub(qt)}),activateOnStart:!0,moveStateManager:ft,enable:ot,assignEvents:Fs})})(w),Ir=new Ls(w,B);B.dragPan=new Oi(Q,yr,Ir),this._add("mousePan",yr),this._add("touchPan",Ir,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ce=new ss,Ae=new Yo;B.touchZoomRotate=new wi(Q,Ae,ce,pt),this._add("touchRotate",ce,["touchPan","touchZoom"]),this._add("touchZoom",Ae,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let qe=B.scrollZoom=new Sr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",qe,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Ve=B.keyboard=new Ft(B);this._add("keyboard",Ve),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Na(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!!Ai(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 Ne={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=Ne),Q.panDelta!==void 0&&(B.drag=Ne),Q.pitchDelta!==void 0&&(B.pitch=Ne),Q.bearingDelta!==void 0&&(B.rotate=Ne)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,Ne]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,Ne);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),Ne=ee.terrain;if(!(gn(w)||Ne&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:$e,zoomDelta:pt,bearingDelta:zt,pitchDelta:Yt,around:Jt,pinchAround:yr}=w;yr!==void 0&&(Jt=yr),ee._stop(!0),Jt=Jt||ee.transform.centerPoint;let Ir=le.pointLocation($e?Jt.sub($e):Jt);zt&&(le.bearing+=zt),Yt&&(le.pitch+=Yt),pt&&(le.zoom+=pt),Ne?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub($e)):le.setLocationAtPoint(Ir,Jt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Ir,Jt)):le.setLocationAtPoint(Ir,Jt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=Ai(this._eventsInProgress),le=Ai(w),Ne={};for(let Jt in w){let{originalEvent:yr}=w[Jt];this._eventsInProgress[Jt]||(Ne[`${Jt}start`]=yr),this._eventsInProgress[Jt]=w[Jt]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let Jt in Ne)this._fireEvent(Jt,Ne[Jt]);le&&this._fireEvent("move",le.originalEvent);for(let Jt in w){let{originalEvent:yr}=w[Jt];this._fireEvent(Jt,yr)}let $e={},pt;for(let Jt in this._eventsInProgress){let{handlerName:yr,originalEvent:Ir}=this._eventsInProgress[Jt];this._handlersById[yr].isActive()||(delete this._eventsInProgress[Jt],pt=B[yr]||Ir,$e[`${Jt}end`]=pt)}for(let Jt in $e)this._fireEvent(Jt,$e[Jt]);let zt=Ai(this._eventsInProgress),Yt=(ee||le)&&!zt;if(Yt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Jt=this._map._getTransformForUpdate();Jt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Jt)}if(Q&&Yt){this._updatingCamera=!0;let Jt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),yr=Ir=>Ir!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new gi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Vn extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((l.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,qe,$t)),this._rotating&&(ee.bearing=a.y.number(Ne,zt,$t)),this._pitching&&(ee.pitch=a.y.number($e,Yt,$t)),this._padding&&(ee.interpolatePadding(pt,Jt,$t),Ir=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation($t),ft)ee.setLocationAtPoint(ft,qt);else{let dr=ee.zoomScale(ee.zoom-le),Mr=qe>le?Math.min(2,Ke):Math.max(.5,Ke),$r=Math.pow(Mr,1-$t),ii=ee.unproject(Ve.add(ot.mult($t*$r)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?ii.wrap():ii,Ir)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},$t=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,$t)},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:Ne,zoom:$e,pitch:pt,bearing:zt,elevation:Yt}=ee(le);Ne&&(le.center=Ne),$e!==void 0&&(le.zoom=$e),pt!==void 0&&(le.pitch=pt),zt!==void 0&&(le.bearing=zt),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&&l.prefersReducedMotion){let ua=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ua,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,Ne=ee.bearing,$e=ee.pitch,pt=ee.padding,zt="bearing"in w?this._normalizeBearing(w.bearing,Ne):Ne,Yt="pitch"in w?+w.pitch:$e,Jt="padding"in w?w.padding:ee.padding,yr=a.P.convert(w.offset),Ir=ee.centerPoint.add(yr),ce=ee.pointLocation(Ir),{center:Ae,zoom:qe}=ee.getConstrained(a.N.convert(w.center||ce),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(Ae,ee);let Ve=ee.zoomScale(qe-le),ot=ee.project(ce),Ke=ee.project(Ae).sub(ot),ft=w.curve,qt=Math.max(ee.width,ee.height),Xt=qt/Ve,$t=Ke.mag();if("minZoom"in w){let ua=a.ac(Math.min(w.minZoom,le,qe),ee.minZoom,ee.maxZoom),oo=qt/ee.zoomScale(ua-le);ft=Math.sqrt(oo/$t*2)}let dr=ft*ft;function Mr(ua){let oo=(Xt*Xt-qt*qt+(ua?-1:1)*dr*dr*$t*$t)/(2*(ua?Xt:qt)*dr*$t);return Math.log(Math.sqrt(oo*oo+1)-oo)}function $r(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function ii(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let pi=Mr(!1),Yi=function(ua){return ii(pi)/ii(pi+ft*ua)},wn=function(ua){return qt*((ii(pi)*($r(oo=pi+ft*ua)/ii(oo))-$r(pi))/dr)/$t;var oo},Tn=(Mr(!0)-pi)/ft;if(Math.abs($t)<1e-6||!isFinite(Tn)){if(Math.abs(qt-Xt)<1e-6)return this.easeTo(w,B);let ua=Xt0,Yi=oo=>Math.exp(ua*ft*oo)}return w.duration="duration"in w?+w.duration:1e3*Tn/("screenSpeed"in w?+w.screenSpeed/ft:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=Ne!==zt,this._pitching=Yt!==$e,this._padding=!ee.isPaddingEqual(Jt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(Ae),this._ease(ua=>{let oo=ua*Tn,el=1/Yi(oo);ee.zoom=ua===1?qe:le+ee.scaleZoom(el),this._rotating&&(ee.bearing=a.y.number(Ne,zt,ua)),this._pitching&&(ee.pitch=a.y.number($e,Yt,ua)),this._padding&&(ee.interpolatePadding(pt,Jt,ua),Ir=ee.centerPoint.add(yr)),this.terrain&&!w.freezeElevation&&this._updateElevation(ua);let ys=ua===1?Ae:ee.unproject(ot.add(Ke.mult(wn(oo))).mult(el));ee.setLocationAtPoint(ee.renderWorldCopies?ys.wrap():ys,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=l.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 Rn={compact:!0,customAttribution:'
MapLibre'};class Hn{constructor(w=Rn){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=f.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=f.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=f.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(){f.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 Ne=le.getSource();Ne.attribution&&w.indexOf(Ne.attribution)<0&&w.push(Ne.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let Ne=le+1;Ne=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 Gn{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=f.create("div","maplibregl-ctrl");let B=f.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(){f.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class pn{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 Lo=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class us 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 ct(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 Ne=ee.canonical.z-w.canonical.z,$e=ee.canonical.x-(ee.canonical.x>>Ne<>Ne<>Ne;a.aP(le.posMatrix,0,zt,0,zt,0,1),a.J(le.posMatrix,le.posMatrix,[-$e*zt,-pt*zt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Ne=w.canonical.z-ee.canonical.z,$e=w.canonical.x-(w.canonical.x>>Ne<>Ne<>Ne;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[$e*zt,pt*zt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**Ne,1/2**Ne,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 Bs{constructor(w,B,Q){this.painter=w,this.sourceCache=new us(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 Ne=w.canonical.x-(w.canonical.x>>le<>le<>8<<4|le>>8,B[Ne+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new v(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),Ne=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),$e=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,$e-Ne-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let pt=B[0]+(B[2]>>4<<8),zt=B[1]+((15&B[2])<<8),Yt=this.coordsIndex[255-B[3]],Jt=Yt&&this.sourceCache.getTileByID(Yt);if(!Jt)return null;let yr=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 ol={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Cl{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Js(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 Ne=this.terrain.sourceCache.getTerrainCoords(le);for(let $e in Ne)this._coordsDescendingInv[Q][$e]||(this._coordsDescendingInv[Q][$e]=[]),this._coordsDescendingInv[Q][$e].push(Ne[$e])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(ol[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let Ne in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][Ne]=this._coordsDescendingInv[le][Ne].map($e=>$e.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(ol[B]&&(this._prevType&&ol[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(ol[this._prevType]||ol[B]&&ee){this._prevType=B;let le=this._stacks.length-1,Ne=this._stacks[le]||[];for(let $e of this._renderableTiles){if(this.pool.isFull()&&(as(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push($e),$e.rtt[le]){let zt=this.pool.getObjectForId($e.rtt[le].id);if(zt.stamp===$e.rtt[le].stamp){this.pool.useObject(zt);continue}}let pt=this.pool.getOrCreateFreeObject();this.pool.useObject(pt),this.pool.stampObject(pt),$e.rtt[le]={id:pt.id,stamp:pt.stamp},Q.context.bindFramebuffer.set(pt.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let zt=0;zt{oe.touchstart=oe.dragStart,oe.touchmoveWindow=oe.dragMove,oe.touchend=oe.dragEnd},ga={showCompass:!0,showZoom:!0,visualizePitch:!1};class ko{constructor(w,B,Q=!1){this.mousedown=Ne=>{this.startMouse(a.e({},Ne,{ctrlKey:!0,preventDefault:()=>Ne.preventDefault()}),f.mousePos(this.element,Ne)),f.addEventListener(window,"mousemove",this.mousemove),f.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Ne=>{this.moveMouse(Ne,f.mousePos(this.element,Ne))},this.mouseup=Ne=>{this.mouseRotate.dragEnd(Ne),this.mousePitch&&this.mousePitch.dragEnd(Ne),this.offTemp()},this.touchstart=Ne=>{Ne.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=f.touchPos(this.element,Ne.targetTouches)[0],this.startTouch(Ne,this._startPos),f.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.addEventListener(window,"touchend",this.touchend))},this.touchmove=Ne=>{Ne.targetTouches.length!==1?this.reset():(this._lastPos=f.touchPos(this.element,Ne.targetTouches)[0],this.moveTouch(Ne,this._lastPos))},this.touchend=Ne=>{Ne.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=ws({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:Ne,clickTolerance:$e,bearingDegreesPerPixelMoved:pt=.8})=>{let zt=new Zs;return new aa({clickTolerance:$e,move:(Yt,Jt)=>({bearingDelta:(Jt.x-Yt.x)*pt}),moveStateManager:zt,enable:Ne,assignEvents:Fl})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=no({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:Ne,clickTolerance:$e,pitchDegreesPerPixelMoved:pt=-.5})=>{let zt=new Zs;return new aa({clickTolerance:$e,move:(Yt,Jt)=>({pitchDelta:(Jt.y-Yt.y)*pt}),moveStateManager:zt,enable:Ne,assignEvents:Fl})})({clickTolerance:le,enable:!0})),f.addEventListener(B,"mousedown",this.mousedown),f.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),f.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),f.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),f.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;f.removeEventListener(w,"mousedown",this.mousedown),f.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),f.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.removeEventListener(window,"touchend",this.touchend),f.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){f.enableDrag(),f.removeEventListener(window,"mousemove",this.mousemove),f.removeEventListener(window,"mouseup",this.mouseup),f.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),f.removeEventListener(window,"touchend",this.touchend)}}let zs;function Fo(oe,w,B){let Q=new a.N(oe.lng,oe.lat);if(oe=new a.N(oe.lng,oe.lat),w){let ee=new a.N(oe.lng-360,oe.lat),le=new a.N(oe.lng+360,oe.lat),Ne=B.locationPoint(oe).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(oe);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;oe.lng>B.center.lng?oe.lng-=360:oe.lng+=360}return oe.lng!==Q.lng&&B.locationPoint(oe).y>B.height/2-B.getHorizon()?oe:Q}let Ys={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 Gs(oe,w,B){let Q=oe.classList;for(let ee in Ys)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Us 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?Fo(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 Ne="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ne="rotateX(0deg)":this._pitchAlignment==="map"&&(Ne=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),f.setTransform(this._element,`${Ys[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Ne} ${le}`),l.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=f.create("div");let B=f.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=f.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 Ne=f.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"fill-rule","nonzero");let $e=f.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"transform","translate(3.0, 29.0)"),$e.setAttributeNS(null,"fill","#000000");let pt=[{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 Ve of pt){let ot=f.createNS("http://www.w3.org/2000/svg","ellipse");ot.setAttributeNS(null,"opacity","0.04"),ot.setAttributeNS(null,"cx","10.5"),ot.setAttributeNS(null,"cy","5.80029008"),ot.setAttributeNS(null,"rx",Ve.rx),ot.setAttributeNS(null,"ry",Ve.ry),$e.appendChild(ot)}let zt=f.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"fill",this._color);let Yt=f.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"),zt.appendChild(Yt);let Jt=f.createNS("http://www.w3.org/2000/svg","g");Jt.setAttributeNS(null,"opacity","0.25"),Jt.setAttributeNS(null,"fill","#000000");let yr=f.createNS("http://www.w3.org/2000/svg","path");yr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Jt.appendChild(yr);let Ir=f.createNS("http://www.w3.org/2000/svg","g");Ir.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ir.setAttributeNS(null,"fill","#FFFFFF");let ce=f.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Ae=f.createNS("http://www.w3.org/2000/svg","circle");Ae.setAttributeNS(null,"fill","#000000"),Ae.setAttributeNS(null,"opacity","0.25"),Ae.setAttributeNS(null,"cx","5.5"),Ae.setAttributeNS(null,"cy","5.5"),Ae.setAttributeNS(null,"r","5.4999962");let qe=f.createNS("http://www.w3.org/2000/svg","circle");qe.setAttributeNS(null,"fill","#FFFFFF"),qe.setAttributeNS(null,"cx","5.5"),qe.setAttributeNS(null,"cy","5.5"),qe.setAttributeNS(null,"r","5.4999962"),ce.appendChild(Ae),ce.appendChild(qe),Ne.appendChild($e),Ne.appendChild(zt),Ne.appendChild(Jt),Ne.appendChild(Ir),Ne.appendChild(ce),B.appendChild(Ne),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()}),Gs(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),f.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),Ne=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,Ne)-le<.006)return void(this._element.style.opacity=this._opacity);let $e=-this._offset.y/ee.transform._pixelPerMeter,pt=Math.sin(ee.getPitch()*Math.PI/180)*$e,zt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Yt=ee.transform.lngLatToCameraDepth(this._lngLat,Ne+pt)-zt>.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 Sl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_l=0,kl=!1,cl={maxWidth:100,unit:"metric"};function xl(oe,w,B){let Q=B&&B.maxWidth||100,ee=oe._container.clientHeight/2,le=oe.unproject([0,ee]),Ne=oe.unproject([Q,ee]),$e=le.distanceTo(Ne);if(B&&B.unit==="imperial"){let pt=3.2808*$e;pt>5280?Uo(w,Q,pt/5280,oe._getUIString("ScaleControl.Miles")):Uo(w,Q,pt,oe._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Uo(w,Q,$e/1852,oe._getUIString("ScaleControl.NauticalMiles")):$e>=1e3?Uo(w,Q,$e/1e3,oe._getUIString("ScaleControl.Kilometers")):Uo(w,Q,$e,oe._getUIString("ScaleControl.Meters"))}function Uo(oe,w,B,Q){let ee=function(le){let Ne=Math.pow(10,`${Math.floor(le)}`.length-1),$e=le/Ne;return $e=$e>=10?10:$e>=5?5:$e>=3?3:$e>=2?2:$e>=1?1:function(pt){let zt=Math.pow(10,Math.ceil(-Math.log(pt)/Math.LN10));return Math.round(pt*zt)/zt}($e),Ne*$e}(B);oe.style.width=w*(ee/B)+"px",oe.innerHTML=`${ee} ${Q}`}let _s={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Bl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Il(oe){if(oe){if(typeof oe=="number"){let w=Math.round(Math.abs(oe)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,oe),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-oe),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(oe,0),right:new a.P(-oe,0)}}if(oe instanceof a.P||Array.isArray(oe)){let w=a.P.convert(oe);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(oe.center||[0,0]),top:a.P.convert(oe.top||[0,0]),"top-left":a.P.convert(oe["top-left"]||[0,0]),"top-right":a.P.convert(oe["top-right"]||[0,0]),bottom:a.P.convert(oe.bottom||[0,0]),"bottom-left":a.P.convert(oe["bottom-left"]||[0,0]),"bottom-right":a.P.convert(oe["bottom-right"]||[0,0]),left:a.P.convert(oe.left||[0,0]),right:a.P.convert(oe.right||[0,0])}}return Il(new a.P(0,0))}let Dl=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=Hn,i.BoxZoomHandler=Po,i.CanvasSource=_t,i.CooperativeGesturesHandler=ui,i.DoubleClickZoomHandler=li,i.DragPanHandler=Oi,i.DragRotateHandler=dn,i.EdgeInsets=Eo,i.FullscreenControl=class extends a.E{constructor(oe={}){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,oe&&oe.container&&(oe.container instanceof HTMLElement?this._container=oe.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(oe){return this._map=oe,this._container||(this._container=this._map.getContainer()),this._controlContainer=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){f.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let oe=this._fullscreenButton=f.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);f.create("span","maplibregl-ctrl-icon",oe).setAttribute("aria-hidden","true"),oe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let oe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",oe),this._fullscreenButton.title=oe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new 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=Qe,i.GeolocateControl=class extends a.E{constructor(oe){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),Ne=fe.fromLngLat(B,Q);this._map.fitBounds(Ne,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&&kl)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=f.create("button","maplibregl-ctrl-geolocate",this._container),f.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=f.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Us({element:this._dotElement}),this._circleElement=f.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Us({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({},Sl,oe)}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(zs!==void 0&&!w)return zs;if(window.navigator.permissions===void 0)return zs=!!window.navigator.geolocation,zs;try{zs=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){zs=!!window.navigator.geolocation}return zs})}().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(),f.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_l=0,kl=!1}_isOutOfMapMaxBounds(oe){let w=this._map.getMaxBounds(),B=oe.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 oe=this._map.getBounds(),w=oe.getSouthEast(),B=oe.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":_l--,kl=!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 oe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),_l++,_l>1?(oe={maximumAge:6e5,timeout:0},kl=!0):(oe=this.options.positionOptions,kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,oe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=rs,i.ImageSource=Tt,i.KeyboardHandler=Ft,i.LngLatBounds=fe,i.LogoControl=Gn,i.Map=class extends Vn{constructor(oe){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Vl),oe);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 $a(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new pn,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({},ul),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=y.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=Xo(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 In(this,w),this._hash=w.hash&&new rs(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 Hn(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Gn,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(oe,w){if(w===void 0&&(w=oe.getDefaultPosition?oe.getDefaultPosition():"top-right"),!oe||!oe.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=oe.onAdd(this);this._controls.push(oe);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(oe){if(!oe||!oe.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(oe);return w>-1&&this._controls.splice(w,1),oe.onRemove(this),this}hasControl(oe){return this._controls.indexOf(oe)>-1}calculateCameraOptionsFromTo(oe,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(oe,w,B,Q)}resize(oe){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 $e=this.painter.context.gl;this._maxCanvasSize=[$e.drawingBufferWidth,$e.drawingBufferHeight];let pt=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,pt),this.painter.resize(Q,ee,pt)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let Ne=!this._moving;return Ne&&(this.stop(),this.fire(new a.k("movestart",oe)).fire(new a.k("move",oe))),this.fire(new a.k("resize",oe)),Ne&&this.fire(new a.k("moveend",oe)),this}_getClampedPixelRatio(oe,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=oe*ee,Ne=w*ee;return Math.min(le>B?B/le:1,Ne>Q?Q/Ne:1)*ee}getPixelRatio(){var oe;return(oe=this._overridePixelRatio)!==null&&oe!==void 0?oe:devicePixelRatio}setPixelRatio(oe){this._overridePixelRatio=oe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(oe){return this.transform.setMaxBounds(fe.convert(oe)),this._update()}setMinZoom(oe){if((oe=oe==null?-2:oe)>=-2&&oe<=this.transform.maxZoom)return this.transform.minZoom=oe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=oe,this._update(),this.getZoom()>oe&&this.setZoom(oe),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(oe){if((oe=oe==null?0:oe)<0)throw new Error("minPitch must be greater than or equal to 0");if(oe>=0&&oe<=this.transform.maxPitch)return this.transform.minPitch=oe,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(oe>=this.transform.minPitch)return this.transform.maxPitch=oe,this._update(),this.getPitch()>oe&&this.setPitch(oe),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(oe){return this.transform.renderWorldCopies=oe,this._update()}project(oe){return this.transform.locationPoint(a.N.convert(oe),this.style&&this.terrain)}unproject(oe){return this.transform.pointLocation(a.P.convert(oe),this.terrain)}isMoving(){var oe;return this._moving||((oe=this.handlers)===null||oe===void 0?void 0:oe.isMoving())}isZooming(){var oe;return this._zooming||((oe=this.handlers)===null||oe===void 0?void 0:oe.isZooming())}isRotating(){var oe;return this._rotating||((oe=this.handlers)===null||oe===void 0?void 0:oe.isRotating())}_createDelegatedListener(oe,w,B){if(oe==="mouseenter"||oe==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let Ne=w.filter(pt=>this.getLayer(pt)),$e=Ne.length!==0?this.queryRenderedFeatures(le.point,{layers:Ne}):[];$e.length?Q||(Q=!0,B.call(this,new Qn(oe,this,le.originalEvent,{features:$e}))):Q=!1},mouseout:()=>{Q=!1}}}}if(oe==="mouseleave"||oe==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:Ne=>{let $e=w.filter(pt=>this.getLayer(pt));($e.length!==0?this.queryRenderedFeatures(Ne.point,{layers:$e}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new Qn(oe,this,Ne.originalEvent)))},mouseout:Ne=>{Q&&(Q=!1,B.call(this,new Qn(oe,this,Ne.originalEvent)))}}}}{let Q=ee=>{let le=w.filter($e=>this.getLayer($e)),Ne=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];Ne.length&&(ee.features=Ne,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[oe]:Q}}}}_saveDelegatedListener(oe,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[oe]=this._delegatedListeners[oe]||[],this._delegatedListeners[oe].push(w)}_removeDelegatedListener(oe,w,B){if(!this._delegatedListeners||!this._delegatedListeners[oe])return;let Q=this._delegatedListeners[oe];for(let ee=0;eew.includes(Ne))){for(let Ne in le.delegates)this.off(Ne,le.delegates[Ne]);return void Q.splice(ee,1)}}}on(oe,w,B){if(B===void 0)return super.on(oe,w);let Q=this._createDelegatedListener(oe,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(oe,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(oe,w,B){if(B===void 0)return super.once(oe,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(oe,Q,B);for(let le in ee.delegates){let Ne=ee.delegates[le];ee.delegates[le]=(...$e)=>{this._removeDelegatedListener(oe,Q,B),Ne(...$e)}}this._saveDelegatedListener(oe,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(oe,w,B){return B===void 0?super.off(oe,w):(this._removeDelegatedListener(oe,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(oe,w){if(!this.style)return[];let B,Q=oe instanceof a.P||Array.isArray(oe),ee=Q?oe:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:oe)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),Ne=a.P.convert(ee[1]);B=[le,new a.P(Ne.x,le.y),Ne,new a.P(le.x,Ne.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(oe,w){return this.style.querySourceFeatures(oe,w)}setStyle(oe,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&oe?(this._diffStyle(oe,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(oe,w))}setTransformRequest(oe){return this._requestManager.setTransformRequest(oe),this}_getUIString(oe){let w=this._locale[oe];if(w==null)throw new Error(`Missing UI string '${oe}'`);return w}_updateStyle(oe,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(oe,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!oe)),oe?(this.style=new sn(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof oe=="string"?this.style.loadURL(oe,w,B):this.style.loadJSON(oe,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new sn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(oe,w){if(typeof oe=="string"){let B=this._requestManager.transformRequest(oe,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof oe=="object"&&this._updateDiff(oe,w)}_updateDiff(oe,w){try{this.style.setState(oe,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(oe,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(oe,w){return this._lazyInitEmptyStyle(),this.style.addSource(oe,w),this._update(!0)}isSourceLoaded(oe){let w=this.style&&this.style.sourceCaches[oe];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${oe}'`)))}setTerrain(oe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),oe){let w=this.style.sourceCaches[oe.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${oe.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===oe.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 Bs(this.painter,w,oe),this.painter.renderToTexture=new Cl(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!==oe.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(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:oe})),this}getTerrain(){var oe,w;return(w=(oe=this.terrain)===null||oe===void 0?void 0:oe.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let oe=this.style&&this.style.sourceCaches;for(let w in oe){let B=oe[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(oe){return this.style.removeSource(oe),this._update(!0)}getSource(oe){return this.style.getSource(oe)}addImage(oe,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt}=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:Jt,data:yr}=w,Ir=w;return this.style.addImage(oe,{data:new a.R({width:Yt,height:Jt},new Uint8Array(yr)),pixelRatio:Q,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt,sdf:ee,version:0,userImage:Ir}),Ir.onAdd&&Ir.onAdd(this,oe),this}}{let{width:Yt,height:Jt,data:yr}=l.getImageData(w);this.style.addImage(oe,{data:new a.R({width:Yt,height:Jt},yr),pixelRatio:Q,stretchX:le,stretchY:Ne,content:$e,textFitWidth:pt,textFitHeight:zt,sdf:ee,version:0})}}updateImage(oe,w){let B=this.style.getImage(oe);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)?l.getImageData(w):w,{width:ee,height:le,data:Ne}=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 $e=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(Ne,$e),this.style.updateImage(oe,B),this}getImage(oe){return this.style.getImage(oe)}hasImage(oe){return oe?!!this.style.getImage(oe):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(oe){this.style.removeImage(oe)}loadImage(oe){return y.getImage(this._requestManager.transformRequest(oe,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(oe,w){return this._lazyInitEmptyStyle(),this.style.addLayer(oe,w),this._update(!0)}moveLayer(oe,w){return this.style.moveLayer(oe,w),this._update(!0)}removeLayer(oe){return this.style.removeLayer(oe),this._update(!0)}getLayer(oe){return this.style.getLayer(oe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(oe,w,B){return this.style.setLayerZoomRange(oe,w,B),this._update(!0)}setFilter(oe,w,B={}){return this.style.setFilter(oe,w,B),this._update(!0)}getFilter(oe){return this.style.getFilter(oe)}setPaintProperty(oe,w,B,Q={}){return this.style.setPaintProperty(oe,w,B,Q),this._update(!0)}getPaintProperty(oe,w){return this.style.getPaintProperty(oe,w)}setLayoutProperty(oe,w,B,Q={}){return this.style.setLayoutProperty(oe,w,B,Q),this._update(!0)}getLayoutProperty(oe,w){return this.style.getLayoutProperty(oe,w)}setGlyphs(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(oe,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(oe,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(oe,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(oe){return this._lazyInitEmptyStyle(),this.style.removeSprite(oe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(oe,w,B=>{B||this._update(!0)}),this}setLight(oe,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(oe,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(oe){return this._lazyInitEmptyStyle(),this.style.setSky(oe),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(oe,w){return this.style.setFeatureState(oe,w),this._update()}removeFeatureState(oe,w){return this.style.removeFeatureState(oe,w),this._update()}getFeatureState(oe){return this.style.getFeatureState(oe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let oe=0,w=0;return this._container&&(oe=this._container.clientWidth||400,w=this._container.clientHeight||300),[oe,w]}_setupContainer(){let oe=this._container;oe.classList.add("maplibregl-map");let w=this._canvasContainer=f.create("div","maplibregl-canvas-container",oe);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=f.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=f.create("div","maplibregl-control-container",oe),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Ne=>{le[Ne]=f.create("div",`maplibregl-ctrl-${Ne} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(oe,w,B){this._canvas.width=Math.floor(B*oe),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${oe}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let oe={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:oe},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",oe)||this._canvas.getContext("webgl",oe);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Cs(B,this.transform),c.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(oe){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||oe,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(oe){return this._update(),this._renderTaskQueue.add(oe)}_cancelRenderFrame(oe){this._renderTaskQueue.remove(oe)}_render(oe){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(oe),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=l.now();this.style.zoomHistory.update(ee,le);let Ne=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),$e=Ne.crossFadingFactor();$e===1&&$e===this._crossFadingFactor||(B=!0,this._crossFadingFactor=$e),this.style.update(Ne)}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 oe;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),y.removeThrottleControl(this._imageQueueHandle),(oe=this._resizeObserver)===null||oe===void 0||oe.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),f.remove(this._canvasContainer),f.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,l.frameAsync(this._frameRequest).then(oe=>{a.bf.frame(oe),this._frameRequest=null,this._render(oe)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(oe){this._showTileBoundaries!==oe&&(this._showTileBoundaries=oe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(oe){this._showPadding!==oe&&(this._showPadding=oe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(oe){this._showCollisionBoxes!==oe&&(this._showCollisionBoxes=oe,oe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(oe){this._showOverdrawInspector!==oe&&(this._showOverdrawInspector=oe,this._update())}get repaint(){return!!this._repaint}set repaint(oe){this._repaint!==oe&&(this._repaint=oe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(oe){this._vertices=oe,this._update()}get version(){return Gl}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=Qn,i.MapTouchEvent=zo,i.MapWheelEvent=rl,i.Marker=Us,i.NavigationControl=class{constructor(oe){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({},ga,oe),this._container=f.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})),f.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})),f.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=f.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(oe){return this._map=oe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ko(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){f.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(oe,w){let B=f.create("button",oe,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(oe){super(),this.remove=()=>(this._content&&f.remove(this._content),this._container&&(f.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=f.create("div","maplibregl-popup",this._map.getContainer()),this._tip=f.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let $e of this.options.className.split(" "))this._container.classList.add($e);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?Fo(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=Il(this.options.offset);if(!ee){let $e=this._container.offsetWidth,pt=this._container.offsetHeight,zt;zt=Q.y+le.bottom.ythis._map.transform.height-pt?["bottom"]:[],Q.x<$e/2?zt.push("left"):Q.x>this._map.transform.width-$e/2&&zt.push("right"),ee=zt.length===0?"bottom":zt.join("-")}let Ne=Q.add(le[ee]);this.options.subpixelPositioning||(Ne=Ne.round()),f.setTransform(this._container,`${Ys[ee]} translate(${Ne.x}px,${Ne.y}px)`),Gs(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(_s),oe)}addTo(oe){return this._map&&this.remove(),this._map=oe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(oe){return this._lngLat=a.N.convert(oe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(oe){return this.setDOMContent(document.createTextNode(oe))}setHTML(oe){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=oe;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var oe;return(oe=this._container)===null||oe===void 0?void 0:oe.style.maxWidth}setMaxWidth(oe){return this.options.maxWidth=oe,this._update(),this}setDOMContent(oe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=f.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(oe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(oe){return this._container&&this._container.classList.add(oe),this}removeClassName(oe){return this._container&&this._container.classList.remove(oe),this}setOffset(oe){return this.options.offset=oe,this._update(),this}toggleClassName(oe){if(this._container)return this._container.classList.toggle(oe)}setSubpixelPositioning(oe){this.options.subpixelPositioning=oe}_createCloseButton(){this.options.closeButton&&(this._closeButton=f.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let oe=this._container.querySelector(Bl);oe&&oe.focus()}},i.RasterDEMTileSource=Pt,i.RasterTileSource=gt,i.ScaleControl=class{constructor(oe){this._onMove=()=>{xl(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,xl(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},cl),oe)}getDefaultPosition(){return"bottom-left"}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-scale",oe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){f.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Sr,i.Style=sn,i.TerrainControl=class{constructor(oe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=oe}onAdd(oe){return this._map=oe,this._container=f.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=f.create("button","maplibregl-ctrl-terrain",this._container),f.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(){f.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=gs,i.TwoFingersTouchRotateHandler=ss,i.TwoFingersTouchZoomHandler=Yo,i.TwoFingersTouchZoomRotateHandler=wi,i.VectorTileSource=et,i.VideoSource=xt,i.addSourceType=(oe,w)=>a._(void 0,void 0,void 0,function*(){if(jt(oe))throw new Error(`A source type called "${oe}" already exists.`);((B,Q)=>{Ct[B]=Q})(oe,w)}),i.clearPrewarmedResources=function(){let oe=he;oe&&(oe.isPreloaded()&&oe.numActive()===1?(oe.release(be),he=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return ut().getRTLTextPluginStatus()},i.getVersion=function(){return Dl},i.getWorkerCount=function(){return ze.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(oe){return Me().broadcast("IS",oe)},i.prewarm=function(){ke().acquire(be)},i.setMaxParallelImageRequests=function(oe){a.a.MAX_PARALLEL_IMAGE_REQUESTS=oe},i.setRTLTextPlugin=function(oe,w){return ut().setRTLTextPlugin(oe,w)},i.setWorkerCount=function(oe){ze.workerCount=oe},i.setWorkerUrl=function(oe){a.a.WORKER_URL=oe}});var n=e;return n})});var EGe=Se((bxr,MGe)=>{"use strict";var iw=Zr(),xjt=Bf().sanitizeHTML,bjt=xJ(),TGe=bx();function AGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=TGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ay=AGe.prototype;ay.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=dq(t)};ay.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))};ay.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ay.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ay.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ay.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)};ay.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,!!dq(e)){var r=wjt(e);t.addSource(this.idSource,r)}};ay.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function SGe(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=bjt(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 wjt(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=xjt(e.sourceattribution)),n}MGe.exports=function(t,r,n){var i=new AGe(t,r);return i.update(n),i}});var RGe=Se((wxr,DGe)=>{"use strict";var MJ=wGe(),EJ=Zr(),LGe=ix(),kGe=Ul(),Tjt=hu(),Ajt=gp(),pq=jc(),zGe=Sy(),Sjt=zGe.drawMode,Mjt=zGe.selectMode,Ejt=nh().prepSelect,kjt=nh().clearOutline,Cjt=nh().clearSelectionsCache,Ljt=nh().selectOnClick,nw=bx(),zjt=EGe();function PGe(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 Wh=PGe.prototype;Wh.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)};Wh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=IGe(a.style),s=a.bounds,u=s?[[s.west,s.south],[s.east,s.north]]:null,l=i.map=new MJ.Map({container:i.div,style:o.style,center:kJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:u,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new MJ.AttributionControl({compact:!0})),f={};l.on("styleimagemissing",function(h){var d=h.id;if(!f[d]&&d.includes("-15")){f[d]=!0;var p=new Image(15,15);p.onload=function(){l.addImage(d,p)},p.crossOrigin="Anonymous",p.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),l.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}}),l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(h){l.once("load",h)})),c=c.concat(LGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Wh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],u=IGe(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,a.setStyle(u.style),i.traceHash={},s.push(new Promise(function(l){a.once("styledata",l)}))),s=s.concat(LGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Wh.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&&Ljt(u.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),l.indexOf("event")>-1&&pq.click(n,u.originalEvent)}}};Wh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(u){var l=t.map.unproject(u);return[l.lng,l.lat]}var a=e.dragmode,o;o=function(u,l){if(l.isRect){var f=u.range={};f[t.id]=[i([l.xmin,l.ymin]),i([l.xmax,l.ymax])]}else{var c=u.lassoPoints={};c[t.id]=l.map(i)}};var s=t.dragOptions;t.dragOptions=EJ.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),Mjt(a)||Sjt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(u,l,f){Ejt(u,l,f,t.dragOptions,a)},Ajt.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))};Wh.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])};Wh.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 CJ=Zr(),Ijt=k_(),Djt=Jd(),FGe=Fk();qGe.exports=function(t,r,n){Ijt(t,r,n,{type:"map",attributes:FGe,handleDefaults:Rjt,partition:"y"})};function Rjt(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,Djt(e,t,{name:"layers",handleItemDefaults:Fjt}),t._input=e}function Fjt(e,t){function r(u,l){return CJ.coerce(e,t,FGe.layers,u,l)}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",CJ.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"),CJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var yq=Se(l0=>{"use strict";var vq=Zr(),OGe=vq.strTranslate,qjt=vq.strScale,Bjt=Dd().getSubplotCalcData,Ojt=Zv(),Njt=Nl(),NGe=yu(),Ujt=Bf(),Vjt=RGe(),wx="map";l0.name=wx;l0.attr="subplot";l0.idRoot=wx;l0.idRegex=l0.attrRegex=vq.counterRegex(wx);l0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};l0.layoutAttributes=Fk();l0.supplyLayoutDefaults=BGe();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[wx],a=0;ax/2){var b=c.split("|").join("
");d.text(b).attr("data-unformatted",b).call(Ujt.convertToTspans,e),p=NGe.bBox(d.node())}d.attr("transform",OGe(-3,-p.height+8)),h.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>x&&(y=x/(p.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",OGe(k[0],k[1])+qjt(y))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=0;n{"use strict";UGe.exports={attributes:sq(),supplyDefaults:eGe(),colorbar:ep(),formatLabels:_J(),calc:lF(),plot:pGe(),hoverPoints:hq().hoverPoints,eventData:gGe(),selectPoints:xGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:yq(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var GGe=Se((Mxr,HGe)=>{"use strict";HGe.exports=VGe()});var LJ=Se((Exr,WGe)=>{"use strict";var d1=JA(),Hjt=Xf(),Gjt=Du().hovertemplateAttrs,Wjt=zf(),Tx=vu().extendFlat;WGe.exports=Tx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Tx({},d1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Tx({},d1.marker.line.color,{editType:"plot"}),width:Tx({},d1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Tx({},d1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Tx({},d1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Tx({},d1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d1.hoverinfo,hovertemplate:Gjt({},{keys:["properties"]}),showlegend:Tx({},Wjt.showlegend,{dflt:!1})},Hjt("",{cLetter:"z",editTypeOverride:"calc"}))});var ZGe=Se((kxr,jGe)=>{"use strict";var Nk=Zr(),jjt=ed(),Zjt=LJ();jGe.exports=function(t,r,n,i){function a(f,c){return Nk.coerce(t,r,Zjt,f,c)}var o=a("locations"),s=a("z"),u=a("geojson");if(!Nk.isArrayOrTypedArray(o)||!o.length||!Nk.isArrayOrTypedArray(s)||!s.length||!(typeof u=="string"&&u!==""||Nk.isPlainObject(u))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var l=a("marker.line.width");l&&a("marker.line.color"),a("marker.opacity"),jjt(t,r,i,a,{prefix:"",cLetter:"z"}),Nk.coerceSelectionMarkerOpacity(r,a)}});var zJ=Se((Cxr,KGe)=>{"use strict";var Xjt=_u(),p1=Zr(),Yjt=fc(),Kjt=yu(),Jjt=tx().makeBlank,XGe=ix();function $jt(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:Jjt()};if(!r)return a;var o=XGe.extractTraceFeature(e);if(!o)return a;var s=Yjt.makeColorScaleFuncFromTrace(t),u=t.marker,l=u.line||{},f;p1.isArrayOrTypedArray(u.opacity)&&(f=function(k){var E=k.mo;return Xjt(E)?+p1.constrain(E,0,1):0});var c;p1.isArrayOrTypedArray(l.color)&&(c=function(k){return k.mlc});var h;p1.isArrayOrTypedArray(l.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var $Ge=zJ().convert,Qjt=zJ().convertOnSelect,JGe=bx().traceLayerPrefix;function QGe(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",JGe+t+"-fill"],["line",JGe+t+"-line"]],this.below=null}var ES=QGe.prototype;ES.update=function(e){this._update($Ge(e)),e[0].trace._glTrace=this};ES.updateOnSelect=function(e){this._update(Qjt(e))};ES._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])};ES.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};eWe.exports=function(t,r){var n=r[0].trace,i=new QGe(t,n.uid),a=i.sourceId,o=$Ge(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 iWe=Se((zxr,rWe)=>{"use strict";rWe.exports={attributes:LJ(),supplyDefaults:ZGe(),colorbar:S_(),calc:LF(),plot:tWe(),hoverPoints:PF(),eventData:IF(),selectPoints:DF(),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";nWe.exports=iWe()});var IJ=Se((Ixr,sWe)=>{"use strict";var eZt=Xf(),tZt=Du().hovertemplateAttrs,oWe=zf(),mq=sq(),PJ=vu().extendFlat;sWe.exports=PJ({lon:mq.lon,lat:mq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:mq.text,hovertext:mq.hovertext,hoverinfo:PJ({},oWe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:tZt(),showlegend:PJ({},oWe.showlegend,{dflt:!1})},eZt("",{cLetter:"z",editTypeOverride:"calc"}))});var uWe=Se((Dxr,lWe)=>{"use strict";var rZt=Zr(),iZt=ed(),nZt=IJ();lWe.exports=function(t,r,n,i){function a(l,f){return rZt.coerce(t,r,nZt,l,f)}var o=a("lon")||[],s=a("lat")||[],u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),iZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var hWe=Se((Rxr,cWe)=>{"use strict";var DJ=_u(),aZt=Zr().isArrayOrTypedArray,RJ=ju().BADNUM,oZt=Rp(),fWe=Zr()._;cWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=aZt(a)&&a.length,s=0;s{"use strict";var sZt=_u(),FJ=Zr(),dWe=Pl(),pWe=fc(),vWe=ju().BADNUM,lZt=tx().makeBlank;yWe.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:lZt()};if(!n)return a;var o=[],s,u=r.z,l=r.radius,f=FJ.isArrayOrTypedArray(u)&&u.length,c=FJ.isArrayOrTypedArray(l);for(s=0;s0?+l[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var b=pWe.extractOpts(r),y=b.reversescale?pWe.flipScale(b.colorscale):b.colorscale,k=y[0][1],E=dWe.opacity(k)<1?k:dWe.addOpacity(k,0),A=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s{"use strict";var gWe=mWe(),uZt=bx().traceLayerPrefix;function _We(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",uZt+t+"-heatmap"]],this.below=null}var gq=_We.prototype;gq.update=function(e){var t=this.subplot,r=this.layerList,n=gWe(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])};gq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};xWe.exports=function(t,r){var n=r[0].trace,i=new _We(t,n.uid),a=i.sourceId,o=gWe(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 TWe=Se((Bxr,wWe)=>{"use strict";var fZt=hu(),cZt=hq().hoverPoints,hZt=hq().getExtraText;wWe.exports=function(t,r,n){var i=cZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,u=o[a.index];if(delete a.color,"z"in u){var l=a.subplot.mockAxis;a.z=u.z,a.zLabel=fZt.tickText(l,l.c2l(u.z),"hover").text}return a.extraText=hZt(s,u,o[0].t.labels),[a]}}});var SWe=Se((Oxr,AWe)=>{"use strict";AWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var EWe=Se((Nxr,MWe)=>{"use strict";MWe.exports={attributes:IJ(),supplyDefaults:uWe(),colorbar:S_(),formatLabels:_J(),calc:hWe(),plot:bWe(),hoverPoints:TWe(),eventData:SWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";kWe.exports=EWe()});var BJ=Se((Hxr,IWe)=>{"use strict";var dZt=uc(),pZt=zf(),LWe=Ih(),qJ=i3(),vZt=Ec().attributes,zWe=Du().hovertemplateAttrs,yZt=Xf(),mZt=_f().templatedArray,gZt=Gc().descriptionOnlyNumbers,PWe=vu().extendFlat,_Zt=_c().overrideAll,Vxr=IWe.exports=_Zt({hoverinfo:PWe({},pZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:qJ.hoverlabel,domain:vZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:gZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:dZt({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:LWe.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:qJ.hoverlabel,hovertemplate:zWe({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:LWe.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:qJ.hoverlabel,hovertemplate:zWe({},{keys:["value","label"]}),colorscales:mZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:PWe(yZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var BWe=Se((Gxr,qWe)=>{"use strict";var kS=Zr(),_q=BJ(),xZt=Pl(),DWe=cd(),bZt=Ec().defaults,RWe=o5(),FWe=_f(),wZt=Jd();qWe.exports=function(t,r,n,i){function a(A,L){return kS.coerce(t,r,_q,A,L)}var o=kS.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,u=FWe.newContainer(r,"node");function l(A,L){return kS.coerce(s,u,_q.node,A,L)}l("label"),l("groups"),l("x"),l("y"),l("pad"),l("thickness"),l("line.color"),l("line.width"),l("hoverinfo",t.hoverinfo),RWe(s,u,l,o),l("hovertemplate"),l("align");var f=i.colorway,c=function(A){return f[A%f.length]};l("color",u.label.map(function(A,L){return xZt.addOpacity(c(L),.8)})),l("customdata");var h=t.link||{},d=FWe.newContainer(r,"link");function p(A,L){return kS.coerce(h,d,_q.link,A,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),RWe(h,d,p,o),p("hovertemplate");var x=DWe(i.paper_bgcolor).getLuminance()<.333,b=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",b);function k(A){var L=DWe(A);if(!L.isValid())return A;var _=L.getAlpha();return _<=.8?L.setAlpha(_+.2):L=x?L.brighten():L.darken(),L.toRgbString()}p("hovercolor",Array.isArray(y)?y.map(k):k(y)),p("customdata"),wZt(h,d,{name:"colorscales",handleItemDefaults:TZt}),bZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var E;u.x.length&&u.y.length&&(E="freeform"),a("arrangement",E),kS.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function TZt(e,t){function r(n,i){return kS.coerce(e,t,_q.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var OJ=Se((Wxr,OWe)=>{"use strict";OWe.exports=AZt;function AZt(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),u=0;u0;){b=k[k.length-1];var E=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=A}else{if(n[b]===r[b]){for(var _=[],C=[],M=0,A=y.length-1;A>=0;--A){var v=y[A];if(i[v]=!1,_.push(v),C.push(s[v]),M+=s[v].length,o[v]=f.length,v===b){y.length=A;break}}f.push(_);for(var z=new Array(M),A=0;A{"use strict";var SZt=OJ(),CS=Zr(),MZt=Km().wrap,Uk=CS.isArrayOrTypedArray,NWe=CS.isIndex,UWe=fc();function EZt(e){var t=e.node,r=e.link,n=[],i=Uk(r.color),a=Uk(r.hovercolor),o=Uk(r.customdata),s={},u={},l=r.colorscales.length,f;for(f=0;fp&&(p=r.source[f]),r.target[f]>p&&(p=r.target[f]);var x=p+1;e.node._count=x;var b,y=e.node.groups,k={};for(f=0;f0&&NWe(M,x)&&NWe(v,x)&&!(k.hasOwnProperty(M)&&k.hasOwnProperty(v)&&k[M]===k[v])){k.hasOwnProperty(v)&&(v=k[v]),k.hasOwnProperty(M)&&(M=k[M]),M=+M,v=+v,s[M]=s[v]=!0;var z="";r.label&&r.label[f]&&(z=r.label[f]);var T=null;z&&u.hasOwnProperty(z)&&(T=u[z]),n.push({pointNumber:f,label:z,color:i?r.color[f]:r.color,hovercolor:a?r.hovercolor[f]:r.hovercolor,customdata:o?r.customdata[f]:r.customdata,concentrationscale:T,source:M,target:v,value:+C}),_.source.push(M),_.target.push(v)}}var F=x+y.length,q=Uk(t.color),U=Uk(t.customdata),H=[];for(f=0;fx-1,childrenNodes:[],pointNumber:f,label:j,color:q?t.color[f]:t.color,customdata:U?t.customdata[f]:t.customdata})}var G=!1;return kZt(F,_.source,_.target)&&(G=!0),{circular:G,links:n,nodes:H,groups:y,groupLookup:k}}function kZt(e,t,r){for(var n=CS.init2dArray(e,0),i=0;i1})}VWe.exports=function(t,r){var n=EZt(r);return MZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var WWe=Se((xq,GWe)=>{(function(e,t){typeof xq=="object"&&typeof GWe!="undefined"?t(xq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(xq,function(e){"use strict";function t(C){var M=+this._x.call(null,C),v=+this._y.call(null,C);return r(this.cover(M,v),M,v,C)}function r(C,M,v,z){if(isNaN(M)||isNaN(v))return C;var T,F=C._root,q={data:z},U=C._x0,H=C._y0,j=C._x1,G=C._y1,O,W,re,ne,be,ze,Ce,he;if(!F)return C._root=q,C;for(;F.length;)if((be=M>=(O=(U+j)/2))?U=O:j=O,(ze=v>=(W=(H+G)/2))?H=W:G=W,T=F,!(F=F[Ce=ze<<1|be]))return T[Ce]=q,C;if(re=+C._x.call(null,F.data),ne=+C._y.call(null,F.data),M===re&&v===ne)return q.next=F,T?T[Ce]=q:C._root=q,C;do T=T?T[Ce]=new Array(4):C._root=new Array(4),(be=M>=(O=(U+j)/2))?U=O:j=O,(ze=v>=(W=(H+G)/2))?H=W:G=W;while((Ce=ze<<1|be)===(he=(ne>=W)<<1|re>=O));return T[he]=F,T[Ce]=q,C}function n(C){var M,v,z=C.length,T,F,q=new Array(z),U=new Array(z),H=1/0,j=1/0,G=-1/0,O=-1/0;for(v=0;vG&&(G=T),FO&&(O=F));if(H>G||j>O)return this;for(this.cover(H,j).cover(G,O),v=0;vC||C>=T||z>M||M>=F;)switch(j=(MG||(U=ne.y0)>O||(H=ne.x1)=Ce)<<1|C>=ze)&&(ne=W[W.length-1],W[W.length-1]=W[W.length-1-be],W[W.length-1-be]=ne)}else{var he=C-+this._x.call(null,re.data),te=M-+this._y.call(null,re.data),ke=he*he+te*te;if(ke=(W=(q+H)/2))?q=W:H=W,(be=O>=(re=(U+j)/2))?U=re:j=re,M=v,!(v=v[ze=be<<1|ne]))return this;if(!v.length)break;(M[ze+1&3]||M[ze+2&3]||M[ze+3&3])&&(z=M,Ce=ze)}for(;v.data!==C;)if(T=v,!(v=v.next))return this;return(F=v.next)&&delete v.next,T?(F?T.next=F:delete T.next,this):M?(F?M[ze]=F:delete M[ze],(v=M[0]||M[1]||M[2]||M[3])&&v===(M[3]||M[2]||M[1]||M[0])&&!v.length&&(z?z[Ce]=v:this._root=v),this):(this._root=F,this)}function f(C){for(var M=0,v=C.length;M{(function(e,t){typeof bq=="object"&&typeof jWe!="undefined"?t(bq):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(bq,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,b){return this[t+x]=b,this},remove:function(x){var b=t+x;return b in this&&delete this[b]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var b in this)b[0]===t&&x.push(b.slice(1));return x},values:function(){var x=[];for(var b in this)b[0]===t&&x.push(this[b]);return x},entries:function(){var x=[];for(var b in this)b[0]===t&&x.push({key:b.slice(1),value:this[b]});return x},size:function(){var x=0;for(var b in this)b[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var b in this)b[0]===t&&x(this[b],b.slice(1),this)}};function n(x,b){var y=new r;if(x instanceof r)x.each(function(_,C){y.set(C,_)});else if(Array.isArray(x)){var k=-1,E=x.length,A;if(b==null)for(;++k=x.length)return y!=null&&_.sort(y),k!=null?k(_):_;for(var z=-1,T=_.length,F=x[C++],q,U,H=n(),j,G=M();++zx.length)return _;var M,v=b[C-1];return k!=null&&C>=x.length?M=_.entries():(M=[],_.each(function(z,T){M.push({key:T,values:L(z,C)})})),v!=null?M.sort(function(z,T){return v(z.key,T.key)}):M}return E={object:function(_){return A(_,0,a,o)},map:function(_){return A(_,0,s,u)},entries:function(_){return L(A(_,0,s,u),0)},key:function(_){return x.push(_),E},sortKeys:function(_){return b[x.length-1]=_,E},sortValues:function(_){return y=_,E},rollup:function(_){return k=_,E}}}function a(){return{}}function o(x,b,y){x[b]=y}function s(){return n()}function u(x,b,y){x.set(b,y)}function l(){}var f=n.prototype;l.prototype=c.prototype={constructor:l,has:f.has,add:function(x){return x+="",this[t+x]=x,this},remove:f.remove,clear:f.clear,values:f.keys,size:f.size,empty:f.empty,each:f.each};function c(x,b){var y=new l;if(x instanceof l)x.each(function(A){y.add(A)});else if(x){var k=-1,E=x.length;if(b==null)for(;++k{(function(e,t){typeof Tq=="object"&&typeof ZWe!="undefined"?t(Tq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Tq,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,u=arguments.length,l={},f;s=0&&(f=l.slice(c+1),l=l.slice(0,c)),l&&!u.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:f}})}n.prototype=r.prototype={constructor:n,on:function(s,u){var l=this._,f=i(s+"",l),c,h=-1,d=f.length;if(arguments.length<2){for(;++h0)for(var l=new Array(c),f=0,c,h;f{(function(e,t){typeof Aq=="object"&&typeof YWe!="undefined"?t(Aq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Aq,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,u=0,l=0,f=typeof performance=="object"&&performance.now?performance:Date,c=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return u||(c(d),u=f.now()+l)}function d(){u=0}function p(){this._call=this._time=this._next=null}p.prototype=x.prototype={constructor:p,restart:function(C,M,v){if(typeof C!="function")throw new TypeError("callback is not a function");v=(v==null?h():+v)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=v,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function x(C,M,v){var z=new p;return z.restart(C,M,v),z}function b(){h(),++t;for(var C=a,M;C;)(M=u-C._time)>=0&&C._call.call(null,M),C=C._next;--t}function y(){u=(s=f.now())+l,t=r=0;try{b()}finally{t=0,E(),u=0}}function k(){var C=f.now(),M=C-s;M>i&&(l-=M,s=C)}function E(){for(var C,M=a,v,z=1/0;M;)M._call?(z>M._time&&(z=M._time),C=M,M=M._next):(v=M._next,M._next=null,M=C?C._next=v:a=v);o=C,A(z)}function A(C){if(!t){r&&(r=clearTimeout(r));var M=C-u;M>24?(C<1/0&&(r=setTimeout(y,C-f.now()-l)),n&&(n=clearInterval(n))):(n||(s=f.now(),n=setInterval(k,i)),t=1,c(y))}}function L(C,M,v){var z=new p;return M=M==null?0:+M,z.restart(function(T){z.stop(),C(T+M)},M,v),z}function _(C,M,v){var z=new p,T=M;return M==null?(z.restart(C,M,v),z):(M=+M,v=v==null?h():+v,z.restart(function F(q){q+=T,z.restart(F,T+=M,v),C(q)},M,v),z)}e.interval=_,e.now=h,e.timeout=L,e.timer=x,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var $We=Se((Sq,JWe)=>{(function(e,t){typeof Sq=="object"&&typeof JWe!="undefined"?t(Sq,WWe(),wq(),XWe(),KWe()):typeof define=="function"&&define.amd?define(["exports","d3-quadtree","d3-collection","d3-dispatch","d3-timer"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(Sq,function(e,t,r,n,i){"use strict";function a(C,M){var v;C==null&&(C=0),M==null&&(M=0);function z(){var T,F=v.length,q,U=0,H=0;for(T=0;TO.index){var Be=W-Oe.x-Oe.vx,fe=re-Oe.y-Oe.vy,Ze=Be*Be+fe*fe;ZeW+me||Eere+me||MeH.r&&(H.r=H[j].r)}function U(){if(M){var H,j=M.length,G;for(v=new Array(j),H=0;H1?(be==null?U.remove(ne):U.set(ne,re(be)),M):U.get(ne)},find:function(ne,be,ze){var Ce=0,he=C.length,te,ke,Ee,Me,Oe;for(ze==null?ze=1/0:ze*=ze,Ce=0;Ce1?(j.on(ne,be),M):j.on(ne)}}}function E(){var C,M,v,z=o(-30),T,F=1,q=1/0,U=.81;function H(W){var re,ne=C.length,be=t.quadtree(C,p,x).visitAfter(G);for(v=W,re=0;re=q)return;(W.data!==M||W.next)&&(ze===0&&(ze=s(),te+=ze*ze),Ce===0&&(Ce=s(),te+=Ce*Ce),te{(function(e,t){typeof Mq=="object"&&typeof QWe!="undefined"?t(Mq):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(Mq,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,u){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,u){this._+="L"+(this._x1=+s)+","+(this._y1=+u)},quadraticCurveTo:function(s,u,l,f){this._+="Q"+ +s+","+ +u+","+(this._x1=+l)+","+(this._y1=+f)},bezierCurveTo:function(s,u,l,f,c,h){this._+="C"+ +s+","+ +u+","+ +l+","+ +f+","+(this._x1=+c)+","+(this._y1=+h)},arcTo:function(s,u,l,f,c){s=+s,u=+u,l=+l,f=+f,c=+c;var h=this._x1,d=this._y1,p=l-s,x=f-u,b=h-s,y=d-u,k=b*b+y*y;if(c<0)throw new Error("negative radius: "+c);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=u);else if(k>n)if(!(Math.abs(y*p-x*b)>n)||!c)this._+="L"+(this._x1=s)+","+(this._y1=u);else{var E=l-h,A=f-d,L=p*p+x*x,_=E*E+A*A,C=Math.sqrt(L),M=Math.sqrt(k),v=c*Math.tan((t-Math.acos((L+k-_)/(2*C*M)))/2),z=v/M,T=v/C;Math.abs(z-1)>n&&(this._+="L"+(s+z*b)+","+(u+z*y)),this._+="A"+c+","+c+",0,0,"+ +(y*E>b*A)+","+(this._x1=s+T*p)+","+(this._y1=u+T*x)}},arc:function(s,u,l,f,c,h){s=+s,u=+u,l=+l,h=!!h;var d=l*Math.cos(f),p=l*Math.sin(f),x=s+d,b=u+p,y=1^h,k=h?f-c:c-f;if(l<0)throw new Error("negative radius: "+l);this._x1===null?this._+="M"+x+","+b:(Math.abs(this._x1-x)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+x+","+b),l&&(k<0&&(k=k%r+r),k>i?this._+="A"+l+","+l+",0,1,"+y+","+(s-d)+","+(u-p)+"A"+l+","+l+",0,1,"+y+","+(this._x1=x)+","+(this._y1=b):k>n&&(this._+="A"+l+","+l+",0,"+ +(k>=t)+","+y+","+(this._x1=s+l*Math.cos(c))+","+(this._y1=u+l*Math.sin(c))))},rect:function(s,u,l,f){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+u)+"h"+ +l+"v"+ +f+"h"+-l+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var NJ=Se((Eq,tje)=>{(function(e,t){typeof Eq=="object"&&typeof tje!="undefined"?t(Eq,eje()):typeof define=="function"&&define.amd?define(["exports","d3-path"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Eq,function(e,t){"use strict";function r(st){return function(){return st}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,u=Math.sin,l=Math.sqrt,f=1e-12,c=Math.PI,h=c/2,d=2*c;function p(st){return st>1?0:st<-1?c:Math.acos(st)}function x(st){return st>=1?h:st<=-1?-h:Math.asin(st)}function b(st){return st.innerRadius}function y(st){return st.outerRadius}function k(st){return st.startAngle}function E(st){return st.endAngle}function A(st){return st&&st.padAngle}function L(st,Wt,tr,or,Nr,hi,Gi,Qr){var Ui=tr-st,zn=or-Wt,fn=Gi-Nr,xn=Qr-hi,_a=xn*Ui-fn*zn;if(!(_a*_aXn*Xn+ts*ts&&(Ba=Ea,Bo=Ha),{cx:Ba,cy:Bo,x01:-fn,y01:-xn,x11:Ba*(Nr/un-1),y11:Bo*(Nr/un-1)}}function C(){var st=b,Wt=y,tr=r(0),or=null,Nr=k,hi=E,Gi=A,Qr=null;function Ui(){var zn,fn,xn=+st.apply(this,arguments),_a=+Wt.apply(this,arguments),Wn=Nr.apply(this,arguments)-h,Fn=hi.apply(this,arguments)-h,ia=n(Fn-Wn),za=Fn>Wn;if(Qr||(Qr=zn=t.path()),_af))Qr.moveTo(0,0);else if(ia>d-f)Qr.moveTo(_a*a(Wn),_a*u(Wn)),Qr.arc(0,0,_a,Wn,Fn,!za),xn>f&&(Qr.moveTo(xn*a(Fn),xn*u(Fn)),Qr.arc(0,0,xn,Fn,Wn,za));else{var Hr=Wn,na=Fn,go=Wn,Dn=Fn,un=ia,Zn=ia,Wo=Gi.apply(this,arguments)/2,Ba=Wo>f&&(or?+or.apply(this,arguments):l(xn*xn+_a*_a)),Bo=s(n(_a-xn)/2,+tr.apply(this,arguments)),Ea=Bo,Ha=Bo,tn,Cn;if(Ba>f){var Xn=x(Ba/xn*u(Wo)),ts=x(Ba/_a*u(Wo));(un-=Xn*2)>f?(Xn*=za?1:-1,go+=Xn,Dn-=Xn):(un=0,go=Dn=(Wn+Fn)/2),(Zn-=ts*2)>f?(ts*=za?1:-1,Hr+=ts,na-=ts):(Zn=0,Hr=na=(Wn+Fn)/2)}var Ja=_a*a(Hr),to=_a*u(Hr),Ri=xn*a(Dn),an=xn*u(Dn);if(Bo>f){var cs=_a*a(na),pa=_a*u(na),ln=xn*a(go),ka=xn*u(go),va;if(iaf?Ha>f?(tn=_(ln,ka,Ja,to,_a,Ha,za),Cn=_(cs,pa,Ri,an,_a,Ha,za),Qr.moveTo(tn.cx+tn.x01,tn.cy+tn.y01),Haf)||!(un>f)?Qr.lineTo(Ri,an):Ea>f?(tn=_(Ri,an,cs,pa,xn,-Ea,za),Cn=_(Ja,to,ln,ka,xn,-Ea,za),Qr.lineTo(tn.cx+tn.x01,tn.cy+tn.y01),Ea=_a;--Wn)Qr.point(na[Wn],go[Wn]);Qr.lineEnd(),Qr.areaEnd()}za&&(na[xn]=+st(ia,xn,fn),go[xn]=+tr(ia,xn,fn),Qr.point(Wt?+Wt(ia,xn,fn):na[xn],or?+or(ia,xn,fn):go[xn]))}if(Hr)return Qr=null,Hr+""||null}function zn(){return F().defined(Nr).curve(Gi).context(hi)}return Ui.x=function(fn){return arguments.length?(st=typeof fn=="function"?fn:r(+fn),Wt=null,Ui):st},Ui.x0=function(fn){return arguments.length?(st=typeof fn=="function"?fn:r(+fn),Ui):st},Ui.x1=function(fn){return arguments.length?(Wt=fn==null?null:typeof fn=="function"?fn:r(+fn),Ui):Wt},Ui.y=function(fn){return arguments.length?(tr=typeof fn=="function"?fn:r(+fn),or=null,Ui):tr},Ui.y0=function(fn){return arguments.length?(tr=typeof fn=="function"?fn:r(+fn),Ui):tr},Ui.y1=function(fn){return arguments.length?(or=fn==null?null:typeof fn=="function"?fn:r(+fn),Ui):or},Ui.lineX0=Ui.lineY0=function(){return zn().x(st).y(tr)},Ui.lineY1=function(){return zn().x(st).y(or)},Ui.lineX1=function(){return zn().x(Wt).y(tr)},Ui.defined=function(fn){return arguments.length?(Nr=typeof fn=="function"?fn:r(!!fn),Ui):Nr},Ui.curve=function(fn){return arguments.length?(Gi=fn,hi!=null&&(Qr=Gi(hi)),Ui):Gi},Ui.context=function(fn){return arguments.length?(fn==null?hi=Qr=null:Qr=Gi(hi=fn),Ui):hi},Ui}function U(st,Wt){return Wtst?1:Wt>=st?0:NaN}function H(st){return st}function j(){var st=H,Wt=U,tr=null,or=r(0),Nr=r(d),hi=r(0);function Gi(Qr){var Ui,zn=Qr.length,fn,xn,_a=0,Wn=new Array(zn),Fn=new Array(zn),ia=+or.apply(this,arguments),za=Math.min(d,Math.max(-d,Nr.apply(this,arguments)-ia)),Hr,na=Math.min(Math.abs(za)/zn,hi.apply(this,arguments)),go=na*(za<0?-1:1),Dn;for(Ui=0;Ui0&&(_a+=Dn);for(Wt!=null?Wn.sort(function(un,Zn){return Wt(Fn[un],Fn[Zn])}):tr!=null&&Wn.sort(function(un,Zn){return tr(Qr[un],Qr[Zn])}),Ui=0,xn=_a?(za-zn*go)/_a:0;Ui0?Dn*xn:0)+go,Fn[fn]={data:Qr[fn],index:Ui,value:Dn,startAngle:ia,endAngle:Hr,padAngle:na};return Fn}return Gi.value=function(Qr){return arguments.length?(st=typeof Qr=="function"?Qr:r(+Qr),Gi):st},Gi.sortValues=function(Qr){return arguments.length?(Wt=Qr,tr=null,Gi):Wt},Gi.sort=function(Qr){return arguments.length?(tr=Qr,Wt=null,Gi):tr},Gi.startAngle=function(Qr){return arguments.length?(or=typeof Qr=="function"?Qr:r(+Qr),Gi):or},Gi.endAngle=function(Qr){return arguments.length?(Nr=typeof Qr=="function"?Qr:r(+Qr),Gi):Nr},Gi.padAngle=function(Qr){return arguments.length?(hi=typeof Qr=="function"?Qr:r(+Qr),Gi):hi},Gi}var G=W(v);function O(st){this._curve=st}O.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(st,Wt){this._curve.point(Wt*Math.sin(st),Wt*-Math.cos(st))}};function W(st){function Wt(tr){return new O(st(tr))}return Wt._curve=st,Wt}function re(st){var Wt=st.curve;return st.angle=st.x,delete st.x,st.radius=st.y,delete st.y,st.curve=function(tr){return arguments.length?Wt(W(tr)):Wt()._curve},st}function ne(){return re(F().curve(G))}function be(){var st=q().curve(G),Wt=st.curve,tr=st.lineX0,or=st.lineX1,Nr=st.lineY0,hi=st.lineY1;return st.angle=st.x,delete st.x,st.startAngle=st.x0,delete st.x0,st.endAngle=st.x1,delete st.x1,st.radius=st.y,delete st.y,st.innerRadius=st.y0,delete st.y0,st.outerRadius=st.y1,delete st.y1,st.lineStartAngle=function(){return re(tr())},delete st.lineX0,st.lineEndAngle=function(){return re(or())},delete st.lineX1,st.lineInnerRadius=function(){return re(Nr())},delete st.lineY0,st.lineOuterRadius=function(){return re(hi())},delete st.lineY1,st.curve=function(Gi){return arguments.length?Wt(W(Gi)):Wt()._curve},st}function ze(st,Wt){return[(Wt=+Wt)*Math.cos(st-=Math.PI/2),Wt*Math.sin(st)]}var Ce=Array.prototype.slice;function he(st){return st.source}function te(st){return st.target}function ke(st){var Wt=he,tr=te,or=z,Nr=T,hi=null;function Gi(){var Qr,Ui=Ce.call(arguments),zn=Wt.apply(this,Ui),fn=tr.apply(this,Ui);if(hi||(hi=Qr=t.path()),st(hi,+or.apply(this,(Ui[0]=zn,Ui)),+Nr.apply(this,Ui),+or.apply(this,(Ui[0]=fn,Ui)),+Nr.apply(this,Ui)),Qr)return hi=null,Qr+""||null}return Gi.source=function(Qr){return arguments.length?(Wt=Qr,Gi):Wt},Gi.target=function(Qr){return arguments.length?(tr=Qr,Gi):tr},Gi.x=function(Qr){return arguments.length?(or=typeof Qr=="function"?Qr:r(+Qr),Gi):or},Gi.y=function(Qr){return arguments.length?(Nr=typeof Qr=="function"?Qr:r(+Qr),Gi):Nr},Gi.context=function(Qr){return arguments.length?(hi=Qr==null?null:Qr,Gi):hi},Gi}function Ee(st,Wt,tr,or,Nr){st.moveTo(Wt,tr),st.bezierCurveTo(Wt=(Wt+or)/2,tr,Wt,Nr,or,Nr)}function Me(st,Wt,tr,or,Nr){st.moveTo(Wt,tr),st.bezierCurveTo(Wt,tr=(tr+Nr)/2,or,tr,or,Nr)}function Oe(st,Wt,tr,or,Nr){var hi=ze(Wt,tr),Gi=ze(Wt,tr=(tr+Nr)/2),Qr=ze(or,tr),Ui=ze(or,Nr);st.moveTo(hi[0],hi[1]),st.bezierCurveTo(Gi[0],Gi[1],Qr[0],Qr[1],Ui[0],Ui[1])}function Re(){return ke(Ee)}function me(){return ke(Me)}function Be(){var st=ke(Oe);return st.angle=st.x,delete st.x,st.radius=st.y,delete st.y,st}var fe={draw:function(st,Wt){var tr=Math.sqrt(Wt/c);st.moveTo(tr,0),st.arc(0,0,tr,0,d)}},Ze={draw:function(st,Wt){var tr=Math.sqrt(Wt/5)/2;st.moveTo(-3*tr,-tr),st.lineTo(-tr,-tr),st.lineTo(-tr,-3*tr),st.lineTo(tr,-3*tr),st.lineTo(tr,-tr),st.lineTo(3*tr,-tr),st.lineTo(3*tr,tr),st.lineTo(tr,tr),st.lineTo(tr,3*tr),st.lineTo(-tr,3*tr),st.lineTo(-tr,tr),st.lineTo(-3*tr,tr),st.closePath()}},et=Math.sqrt(1/3),gt=et*2,Pt={draw:function(st,Wt){var tr=Math.sqrt(Wt/gt),or=tr*et;st.moveTo(0,-tr),st.lineTo(or,0),st.lineTo(0,tr),st.lineTo(-or,0),st.closePath()}},Qe=.8908130915292852,Xe=Math.sin(c/10)/Math.sin(7*c/10),Tt=Math.sin(d/10)*Xe,xt=-Math.cos(d/10)*Xe,_t={draw:function(st,Wt){var tr=Math.sqrt(Wt*Qe),or=Tt*tr,Nr=xt*tr;st.moveTo(0,-tr),st.lineTo(or,Nr);for(var hi=1;hi<5;++hi){var Gi=d*hi/5,Qr=Math.cos(Gi),Ui=Math.sin(Gi);st.lineTo(Ui*tr,-Qr*tr),st.lineTo(Qr*or-Ui*Nr,Ui*or+Qr*Nr)}st.closePath()}},Ct={draw:function(st,Wt){var tr=Math.sqrt(Wt),or=-tr/2;st.rect(or,or,tr,tr)}},jt=Math.sqrt(3),At={draw:function(st,Wt){var tr=-Math.sqrt(Wt/(jt*3));st.moveTo(0,tr*2),st.lineTo(-jt*tr,-tr),st.lineTo(jt*tr,-tr),st.closePath()}},Te=-.5,nt=Math.sqrt(3)/2,ut=1/Math.sqrt(12),ct=(ut/2+1)*3,rt={draw:function(st,Wt){var tr=Math.sqrt(Wt/ct),or=tr/2,Nr=tr*ut,hi=or,Gi=tr*ut+tr,Qr=-hi,Ui=Gi;st.moveTo(or,Nr),st.lineTo(hi,Gi),st.lineTo(Qr,Ui),st.lineTo(Te*or-nt*Nr,nt*or+Te*Nr),st.lineTo(Te*hi-nt*Gi,nt*hi+Te*Gi),st.lineTo(Te*Qr-nt*Ui,nt*Qr+Te*Ui),st.lineTo(Te*or+nt*Nr,Te*Nr-nt*or),st.lineTo(Te*hi+nt*Gi,Te*Gi-nt*hi),st.lineTo(Te*Qr+nt*Ui,Te*Ui-nt*Qr),st.closePath()}},je=[fe,Ze,Pt,Ct,_t,At,rt];function tt(){var st=r(fe),Wt=r(64),tr=null;function or(){var Nr;if(tr||(tr=Nr=t.path()),st.apply(this,arguments).draw(tr,+Wt.apply(this,arguments)),Nr)return tr=null,Nr+""||null}return or.type=function(Nr){return arguments.length?(st=typeof Nr=="function"?Nr:r(Nr),or):st},or.size=function(Nr){return arguments.length?(Wt=typeof Nr=="function"?Nr:r(+Nr),or):Wt},or.context=function(Nr){return arguments.length?(tr=Nr==null?null:Nr,or):tr},or}function Je(){}function Mt(st,Wt,tr){st._context.bezierCurveTo((2*st._x0+st._x1)/3,(2*st._y0+st._y1)/3,(st._x0+2*st._x1)/3,(st._y0+2*st._y1)/3,(st._x0+4*st._x1+Wt)/6,(st._y0+4*st._y1+tr)/6)}function Vt(st){this._context=st}Vt.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:Mt(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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);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:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function Kt(st){return new Vt(st)}function ir(st){this._context=st}ir.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._x2=st,this._y2=Wt;break;case 1:this._point=2,this._x3=st,this._y3=Wt;break;case 2:this._point=3,this._x4=st,this._y4=Wt,this._context.moveTo((this._x0+4*this._x1+st)/6,(this._y0+4*this._y1+Wt)/6);break;default:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function fr(st){return new ir(st)}function Ot(st){this._context=st}Ot.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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var tr=(this._x0+4*this._x1+st)/6,or=(this._y0+4*this._y1+Wt)/6;this._line?this._context.lineTo(tr,or):this._context.moveTo(tr,or);break;case 3:this._point=4;default:Mt(this,st,Wt);break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt}};function De(st){return new Ot(st)}function _e(st,Wt){this._basis=new Vt(st),this._beta=Wt}_e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var st=this._x,Wt=this._y,tr=st.length-1;if(tr>0)for(var or=st[0],Nr=Wt[0],hi=st[tr]-or,Gi=Wt[tr]-Nr,Qr=-1,Ui;++Qr<=tr;)Ui=Qr/tr,this._basis.point(this._beta*st[Qr]+(1-this._beta)*(or+Ui*hi),this._beta*Wt[Qr]+(1-this._beta)*(Nr+Ui*Gi));this._x=this._y=null,this._basis.lineEnd()},point:function(st,Wt){this._x.push(+st),this._y.push(+Wt)}};var Fe=function st(Wt){function tr(or){return Wt===1?new Vt(or):new _e(or,Wt)}return tr.beta=function(or){return st(+or)},tr}(.85);function Pe(st,Wt,tr){st._context.bezierCurveTo(st._x1+st._k*(st._x2-st._x0),st._y1+st._k*(st._y2-st._y0),st._x2+st._k*(st._x1-Wt),st._y2+st._k*(st._y1-tr),st._x2,st._y2)}function Ie(st,Wt){this._context=st,this._k=(1-Wt)/6}Ie.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:Pe(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2,this._x1=st,this._y1=Wt;break;case 2:this._point=3;default:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var lt=function st(Wt){function tr(or){return new Ie(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function ye(st,Wt){this._context=st,this._k=(1-Wt)/6}ye.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._x3=st,this._y3=Wt;break;case 1:this._point=2,this._context.moveTo(this._x4=st,this._y4=Wt);break;case 2:this._point=3,this._x5=st,this._y5=Wt;break;default:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var ue=function st(Wt){function tr(or){return new ye(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function de(st,Wt){this._context=st,this._k=(1-Wt)/6}de.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(st,Wt){switch(st=+st,Wt=+Wt,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:Pe(this,st,Wt);break}this._x0=this._x1,this._x1=this._x2,this._x2=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var ht=function st(Wt){function tr(or){return new de(or,Wt)}return tr.tension=function(or){return st(+or)},tr}(0);function Et(st,Wt,tr){var or=st._x1,Nr=st._y1,hi=st._x2,Gi=st._y2;if(st._l01_a>f){var Qr=2*st._l01_2a+3*st._l01_a*st._l12_a+st._l12_2a,Ui=3*st._l01_a*(st._l01_a+st._l12_a);or=(or*Qr-st._x0*st._l12_2a+st._x2*st._l01_2a)/Ui,Nr=(Nr*Qr-st._y0*st._l12_2a+st._y2*st._l01_2a)/Ui}if(st._l23_a>f){var zn=2*st._l23_2a+3*st._l23_a*st._l12_a+st._l12_2a,fn=3*st._l23_a*(st._l23_a+st._l12_a);hi=(hi*zn+st._x1*st._l23_2a-Wt*st._l12_2a)/fn,Gi=(Gi*zn+st._y1*st._l23_2a-tr*st._l12_2a)/fn}st._context.bezierCurveTo(or,Nr,hi,Gi,st._x2,st._y2)}function St(st,Wt){this._context=st,this._alpha=Wt}St.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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;break;case 2:this._point=3;default:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Zt=function st(Wt){function tr(or){return Wt?new St(or,Wt):new Ie(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function qr(st,Wt){this._context=st,this._alpha=Wt}qr.prototype={areaStart:Je,areaEnd:Je,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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=st,this._y3=Wt;break;case 1:this._point=2,this._context.moveTo(this._x4=st,this._y4=Wt);break;case 2:this._point=3,this._x5=st,this._y5=Wt;break;default:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Lr=function st(Wt){function tr(or){return Wt?new qr(or,Wt):new ye(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function vr(st,Wt){this._context=st,this._alpha=Wt}vr.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(st,Wt){if(st=+st,Wt=+Wt,this._point){var tr=this._x2-st,or=this._y2-Wt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(tr*tr+or*or,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:Et(this,st,Wt);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=st,this._y0=this._y1,this._y1=this._y2,this._y2=Wt}};var Er=function st(Wt){function tr(or){return Wt?new vr(or,Wt):new de(or,0)}return tr.alpha=function(or){return st(+or)},tr}(.5);function si(st){this._context=st}si.prototype={areaStart:Je,areaEnd:Je,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(st,Wt){st=+st,Wt=+Wt,this._point?this._context.lineTo(st,Wt):(this._point=1,this._context.moveTo(st,Wt))}};function Ei(st){return new si(st)}function Si(st){return st<0?-1:1}function xi(st,Wt,tr){var or=st._x1-st._x0,Nr=Wt-st._x1,hi=(st._y1-st._y0)/(or||Nr<0&&-0),Gi=(tr-st._y1)/(Nr||or<0&&-0),Qr=(hi*Nr+Gi*or)/(or+Nr);return(Si(hi)+Si(Gi))*Math.min(Math.abs(hi),Math.abs(Gi),.5*Math.abs(Qr))||0}function Hi(st,Wt){var tr=st._x1-st._x0;return tr?(3*(st._y1-st._y0)/tr-Wt)/2:Wt}function Jr(st,Wt,tr){var or=st._x0,Nr=st._y0,hi=st._x1,Gi=st._y1,Qr=(hi-or)/3;st._context.bezierCurveTo(or+Qr,Nr+Qr*Wt,hi-Qr,Gi-Qr*tr,hi,Gi)}function ci(st){this._context=st}ci.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:Jr(this,this._t0,Hi(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(st,Wt){var tr=NaN;if(st=+st,Wt=+Wt,!(st===this._x1&&Wt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;break;case 2:this._point=3,Jr(this,Hi(this,tr=xi(this,st,Wt)),tr);break;default:Jr(this,this._t0,tr=xi(this,st,Wt));break}this._x0=this._x1,this._x1=st,this._y0=this._y1,this._y1=Wt,this._t0=tr}}};function Di(st){this._context=new Lt(st)}(Di.prototype=Object.create(ci.prototype)).point=function(st,Wt){ci.prototype.point.call(this,Wt,st)};function Lt(st){this._context=st}Lt.prototype={moveTo:function(st,Wt){this._context.moveTo(Wt,st)},closePath:function(){this._context.closePath()},lineTo:function(st,Wt){this._context.lineTo(Wt,st)},bezierCurveTo:function(st,Wt,tr,or,Nr,hi){this._context.bezierCurveTo(Wt,st,or,tr,hi,Nr)}};function vt(st){return new ci(st)}function Dt(st){return new Di(st)}function Bt(st){this._context=st}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var st=this._x,Wt=this._y,tr=st.length;if(tr)if(this._line?this._context.lineTo(st[0],Wt[0]):this._context.moveTo(st[0],Wt[0]),tr===2)this._context.lineTo(st[1],Wt[1]);else for(var or=sr(st),Nr=sr(Wt),hi=0,Gi=1;Gi=0;--Wt)Nr[Wt]=(Gi[Wt]-Nr[Wt+1])/hi[Wt];for(hi[tr-1]=(st[tr]+Nr[tr-1])/2,Wt=0;Wt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(st,Wt){switch(st=+st,Wt=+Wt,this._point){case 0:this._point=1,this._line?this._context.lineTo(st,Wt):this._context.moveTo(st,Wt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Wt),this._context.lineTo(st,Wt);else{var tr=this._x*(1-this._t)+st*this._t;this._context.lineTo(tr,this._y),this._context.lineTo(tr,Wt)}break}}this._x=st,this._y=Wt}};function Tr(st){return new zr(st,.5)}function Rr(st){return new zr(st,0)}function Br(st){return new zr(st,1)}function oi(st,Wt){if((Gi=st.length)>1)for(var tr=1,or,Nr,hi=st[Wt[0]],Gi,Qr=hi.length;tr=0;)tr[Wt]=Wt;return tr}function Pi(st,Wt){return st[Wt]}function Yr(){var st=r([]),Wt=vi,tr=oi,or=Pi;function Nr(hi){var Gi=st.apply(this,arguments),Qr,Ui=hi.length,zn=Gi.length,fn=new Array(zn),xn;for(Qr=0;Qr0){for(var tr,or,Nr=0,hi=st[0].length,Gi;Nr0)for(var tr,or=0,Nr,hi,Gi,Qr,Ui,zn=st[Wt[0]].length;or0?(Nr[0]=Gi,Nr[1]=Gi+=hi):hi<0?(Nr[1]=Qr,Nr[0]=Qr+=hi):(Nr[0]=0,Nr[1]=hi)}function ti(st,Wt){if((Nr=st.length)>0){for(var tr=0,or=st[Wt[0]],Nr,hi=or.length;tr0)||!((hi=(Nr=st[Wt[0]]).length)>0))){for(var tr=0,or=1,Nr,hi,Gi;orhi&&(hi=Nr,tr=Wt);return tr}function zi(st){var Wt=st.map(Mi);return vi(st).sort(function(tr,or){return Wt[tr]-Wt[or]})}function Mi(st){for(var Wt=0,tr=-1,or=st.length,Nr;++tr{(function(e,t){typeof kq=="object"&&typeof rje!="undefined"?t(kq,JE(),wq(),NJ()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(kq,function(e,t,r,n){"use strict";function i(v){return v.target.depth}function a(v){return v.depth}function o(v,z){return z-1-v.height}function s(v,z){return v.sourceLinks.length?v.depth:z-1}function u(v){return v.targetLinks.length?v.depth:v.sourceLinks.length?t.min(v.sourceLinks,i)-1:0}function l(v){return function(){return v}}function f(v,z){return h(v.source,z.source)||v.index-z.index}function c(v,z){return h(v.target,z.target)||v.index-z.index}function h(v,z){return v.y0-z.y0}function d(v){return v.value}function p(v){return(v.y0+v.y1)/2}function x(v){return p(v.source)*v.value}function b(v){return p(v.target)*v.value}function y(v){return v.index}function k(v){return v.nodes}function E(v){return v.links}function A(v,z){var T=v.get(z);if(!T)throw new Error("missing: "+z);return T}var L=function(){var v=0,z=0,T=1,F=1,q=24,U=8,H=y,j=s,G=k,O=E,W=32,re=2/3;function ne(){var ke={nodes:G.apply(null,arguments),links:O.apply(null,arguments)};return be(ke),ze(ke),Ce(ke),he(ke,W),te(ke),ke}ne.update=function(ke){return te(ke),ke},ne.nodeId=function(ke){return arguments.length?(H=typeof ke=="function"?ke:l(ke),ne):H},ne.nodeAlign=function(ke){return arguments.length?(j=typeof ke=="function"?ke:l(ke),ne):j},ne.nodeWidth=function(ke){return arguments.length?(q=+ke,ne):q},ne.nodePadding=function(ke){return arguments.length?(U=+ke,ne):U},ne.nodes=function(ke){return arguments.length?(G=typeof ke=="function"?ke:l(ke),ne):G},ne.links=function(ke){return arguments.length?(O=typeof ke=="function"?ke:l(ke),ne):O},ne.size=function(ke){return arguments.length?(v=z=0,T=+ke[0],F=+ke[1],ne):[T-v,F-z]},ne.extent=function(ke){return arguments.length?(v=+ke[0][0],T=+ke[1][0],z=+ke[0][1],F=+ke[1][1],ne):[[v,z],[T,F]]},ne.iterations=function(ke){return arguments.length?(W=+ke,ne):W};function be(ke){ke.nodes.forEach(function(Me,Oe){Me.index=Oe,Me.sourceLinks=[],Me.targetLinks=[]});var Ee=r.map(ke.nodes,H);ke.links.forEach(function(Me,Oe){Me.index=Oe;var Re=Me.source,me=Me.target;typeof Re!="object"&&(Re=Me.source=A(Ee,Re)),typeof me!="object"&&(me=Me.target=A(Ee,me)),Re.sourceLinks.push(Me),me.targetLinks.push(Me)})}function ze(ke){ke.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Ce(ke){var Ee,Me,Oe;for(Ee=ke.nodes,Me=[],Oe=0;Ee.length;++Oe,Ee=Me,Me=[])Ee.forEach(function(me){me.depth=Oe,me.sourceLinks.forEach(function(Be){Me.indexOf(Be.target)<0&&Me.push(Be.target)})});for(Ee=ke.nodes,Me=[],Oe=0;Ee.length;++Oe,Ee=Me,Me=[])Ee.forEach(function(me){me.height=Oe,me.targetLinks.forEach(function(Be){Me.indexOf(Be.source)<0&&Me.push(Be.source)})});var Re=(T-v-q)/(Oe-1);ke.nodes.forEach(function(me){me.x1=(me.x0=v+Math.max(0,Math.min(Oe-1,Math.floor(j.call(null,me,Oe))))*Re)+q})}function he(ke){var Ee=r.nest().key(function(Ze){return Ze.x0}).sortKeys(t.ascending).entries(ke.nodes).map(function(Ze){return Ze.values});Re(),fe();for(var Me=1,Oe=W;Oe>0;--Oe)Be(Me*=.99),fe(),me(Me),fe();function Re(){var Ze=t.max(Ee,function(Pt){return Pt.length}),et=re*(F-z)/(Ze-1);U>et&&(U=et);var gt=t.min(Ee,function(Pt){return(F-z-(Pt.length-1)*U)/t.sum(Pt,d)});Ee.forEach(function(Pt){Pt.forEach(function(Qe,Xe){Qe.y1=(Qe.y0=Xe)+Qe.value*gt})}),ke.links.forEach(function(Pt){Pt.width=Pt.value*gt})}function me(Ze){Ee.forEach(function(et){et.forEach(function(gt){if(gt.targetLinks.length){var Pt=(t.sum(gt.targetLinks,x)/t.sum(gt.targetLinks,d)-p(gt))*Ze;gt.y0+=Pt,gt.y1+=Pt}})})}function Be(Ze){Ee.slice().reverse().forEach(function(et){et.forEach(function(gt){if(gt.sourceLinks.length){var Pt=(t.sum(gt.sourceLinks,b)/t.sum(gt.sourceLinks,d)-p(gt))*Ze;gt.y0+=Pt,gt.y1+=Pt}})})}function fe(){Ee.forEach(function(Ze){var et,gt,Pt=z,Qe=Ze.length,Xe;for(Ze.sort(h),Xe=0;Xe0&&(et.y0+=gt,et.y1+=gt),Pt=et.y1+U;if(gt=Pt-U-F,gt>0)for(Pt=et.y0-=gt,et.y1-=gt,Xe=Qe-2;Xe>=0;--Xe)et=Ze[Xe],gt=et.y1+U-Pt,gt>0&&(et.y0-=gt,et.y1-=gt),Pt=et.y0})}}function te(ke){ke.nodes.forEach(function(Ee){Ee.sourceLinks.sort(c),Ee.targetLinks.sort(f)}),ke.nodes.forEach(function(Ee){var Me=Ee.y0,Oe=Me;Ee.sourceLinks.forEach(function(Re){Re.y0=Me+Re.width/2,Me+=Re.width}),Ee.targetLinks.forEach(function(Re){Re.y1=Oe+Re.width/2,Oe+=Re.width})})}return ne};function _(v){return[v.source.x1,v.y0]}function C(v){return[v.target.x0,v.y1]}var M=function(){return n.linkHorizontal().source(_).target(C)};e.sankey=L,e.sankeyCenter=u,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,"__esModule",{value:!0})})});var aje=Se((Zxr,nje)=>{var CZt=OJ();nje.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],u;function l(E){a[E]=!1,o.hasOwnProperty(E)&&Object.keys(o[E]).forEach(function(A){delete o[E][A],a[A]&&l(A)})}function f(E){var A=!1;i.push(E),a[E]=!0;var L,_;for(L=0;L=E})}function d(E){h(E);for(var A=t,L=CZt(A),_=L.components.filter(function(q){return q.length>1}),C=1/0,M,v=0;v<_.length;v++)for(var z=0;z<_[v].length;z++)_[v][z]{(function(e,t){typeof Cq=="object"&&typeof oje!="undefined"?t(Cq,JE(),wq(),NJ(),aje()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape","elementary-circuits-directed-graph"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(Cq,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(Qe){return Qe.target.depth}function o(Qe){return Qe.depth}function s(Qe,Xe){return Xe-1-Qe.height}function u(Qe,Xe){return Qe.sourceLinks.length?Qe.depth:Xe-1}function l(Qe){return Qe.targetLinks.length?Qe.depth:Qe.sourceLinks.length?t.min(Qe.sourceLinks,a)-1:0}function f(Qe){return function(){return Qe}}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Qe){return typeof Qe}:function(Qe){return Qe&&typeof Symbol=="function"&&Qe.constructor===Symbol&&Qe!==Symbol.prototype?"symbol":typeof Qe};function h(Qe,Xe){return p(Qe.source,Xe.source)||Qe.index-Xe.index}function d(Qe,Xe){return p(Qe.target,Xe.target)||Qe.index-Xe.index}function p(Qe,Xe){return Qe.partOfCycle===Xe.partOfCycle?Qe.y0-Xe.y0:Qe.circularLinkType==="top"||Xe.circularLinkType==="bottom"?-1:1}function x(Qe){return Qe.value}function b(Qe){return(Qe.y0+Qe.y1)/2}function y(Qe){return b(Qe.source)}function k(Qe){return b(Qe.target)}function E(Qe){return Qe.index}function A(Qe){return Qe.nodes}function L(Qe){return Qe.links}function _(Qe,Xe){var Tt=Qe.get(Xe);if(!Tt)throw new Error("missing: "+Xe);return Tt}function C(Qe,Xe){return Xe(Qe)}var M=25,v=10,z=.3;function T(){var Qe=0,Xe=0,Tt=1,xt=1,_t=24,Ct,jt=E,At=u,Te=A,nt=L,ut=32,ct=2,rt,je=null;function tt(){var De={nodes:Te.apply(null,arguments),links:nt.apply(null,arguments)};Je(De),F(De,jt,je),Mt(De),ir(De),q(De,jt),fr(De,ut,jt),Ot(De);for(var _e=4,Fe=0;Fe<_e;Fe++)Be(De,xt,jt),fe(De,xt,jt),Oe(De,Xe,xt,jt),Be(De,xt,jt),fe(De,xt,jt);return Pt(De,Xe,xt),W(De,ct,xt,jt),De}tt.nodeId=function(De){return arguments.length?(jt=typeof De=="function"?De:f(De),tt):jt},tt.nodeAlign=function(De){return arguments.length?(At=typeof De=="function"?De:f(De),tt):At},tt.nodeWidth=function(De){return arguments.length?(_t=+De,tt):_t},tt.nodePadding=function(De){return arguments.length?(Ct=+De,tt):Ct},tt.nodes=function(De){return arguments.length?(Te=typeof De=="function"?De:f(De),tt):Te},tt.links=function(De){return arguments.length?(nt=typeof De=="function"?De:f(De),tt):nt},tt.size=function(De){return arguments.length?(Qe=Xe=0,Tt=+De[0],xt=+De[1],tt):[Tt-Qe,xt-Xe]},tt.extent=function(De){return arguments.length?(Qe=+De[0][0],Tt=+De[1][0],Xe=+De[0][1],xt=+De[1][1],tt):[[Qe,Xe],[Tt,xt]]},tt.iterations=function(De){return arguments.length?(ut=+De,tt):ut},tt.circularLinkGap=function(De){return arguments.length?(ct=+De,tt):ct},tt.nodePaddingRatio=function(De){return arguments.length?(rt=+De,tt):rt},tt.sortNodes=function(De){return arguments.length?(je=De,tt):je},tt.update=function(De){return q(De,jt),Ot(De),De.links.forEach(function(_e){_e.circular&&(_e.circularLinkType=_e.y0+_e.y10?_e+M+v:_e,Fe=Fe>0?Fe+M+v:Fe,Pe=Pe>0?Pe+M+v:Pe,Ie=Ie>0?Ie+M+v:Ie,{top:_e,bottom:Fe,left:Ie,right:Pe}}function Kt(De,_e){var Fe=t.max(De.nodes,function(ht){return ht.column}),Pe=Tt-Qe,Ie=xt-Xe,lt=Pe+_e.right+_e.left,ye=Ie+_e.top+_e.bottom,ue=Pe/lt,de=Ie/ye;return Qe=Qe*ue+_e.left,Tt=_e.right==0?Tt:Tt*ue,Xe=Xe*de+_e.top,xt=xt*de,De.nodes.forEach(function(ht){ht.x0=Qe+ht.column*((Tt-Qe-_t)/Fe),ht.x1=ht.x0+_t}),de}function ir(De){var _e,Fe,Pe;for(_e=De.nodes,Fe=[],Pe=0;_e.length;++Pe,_e=Fe,Fe=[])_e.forEach(function(Ie){Ie.depth=Pe,Ie.sourceLinks.forEach(function(lt){Fe.indexOf(lt.target)<0&&!lt.circular&&Fe.push(lt.target)})});for(_e=De.nodes,Fe=[],Pe=0;_e.length;++Pe,_e=Fe,Fe=[])_e.forEach(function(Ie){Ie.height=Pe,Ie.targetLinks.forEach(function(lt){Fe.indexOf(lt.source)<0&&!lt.circular&&Fe.push(lt.source)})});De.nodes.forEach(function(Ie){Ie.column=Math.floor(At.call(null,Ie,Pe))})}function fr(De,_e,Fe){var Pe=r.nest().key(function(ht){return ht.column}).sortKeys(t.ascending).entries(De.nodes).map(function(ht){return ht.values});ye(Fe),de();for(var Ie=1,lt=_e;lt>0;--lt)ue(Ie*=.99,Fe),de();function ye(ht){if(rt){var Et=1/0;Pe.forEach(function(Lr){var vr=xt*rt/(Lr.length+1);Et=vr0))if(Lr==0&&qr==1)Er=vr.y1-vr.y0,vr.y0=xt/2-Er/2,vr.y1=xt/2+Er/2;else if(Lr==St-1&&qr==1)Er=vr.y1-vr.y0,vr.y0=xt/2-Er/2,vr.y1=xt/2+Er/2;else{var si=0,Ei=t.mean(vr.sourceLinks,k),Si=t.mean(vr.targetLinks,y);Ei&&Si?si=(Ei+Si)/2:si=Ei||Si;var xi=(si-b(vr))*ht;vr.y0+=xi,vr.y1+=xi}})})}function de(){Pe.forEach(function(ht){var Et,St,Zt=Xe,qr=ht.length,Lr;for(ht.sort(p),Lr=0;Lr0&&(Et.y0+=St,Et.y1+=St),Zt=Et.y1+Ct;if(St=Zt-Ct-xt,St>0)for(Zt=Et.y0-=St,Et.y1-=St,Lr=qr-2;Lr>=0;--Lr)Et=ht[Lr],St=Et.y1+Ct-Zt,St>0&&(Et.y0-=St,Et.y1-=St),Zt=Et.y0})}}function Ot(De){De.nodes.forEach(function(_e){_e.sourceLinks.sort(d),_e.targetLinks.sort(h)}),De.nodes.forEach(function(_e){var Fe=_e.y0,Pe=Fe,Ie=_e.y1,lt=Ie;_e.sourceLinks.forEach(function(ye){ye.circular?(ye.y0=Ie-ye.width/2,Ie=Ie-ye.width):(ye.y0=Fe+ye.width/2,Fe+=ye.width)}),_e.targetLinks.forEach(function(ye){ye.circular?(ye.y1=lt-ye.width/2,lt=lt-ye.width):(ye.y1=Pe+ye.width/2,Pe+=ye.width)})})}return tt}function F(Qe,Xe,Tt){var xt=0;if(Tt===null){for(var _t=[],Ct=0;CtXe.source.column)}function j(Qe,Xe){var Tt=0;Qe.sourceLinks.forEach(function(_t){Tt=_t.circular&&!gt(_t,Xe)?Tt+1:Tt});var xt=0;return Qe.targetLinks.forEach(function(_t){xt=_t.circular&&!gt(_t,Xe)?xt+1:xt}),Tt+xt}function G(Qe){var Xe=Qe.source.sourceLinks,Tt=0;Xe.forEach(function(Ct){Tt=Ct.circular?Tt+1:Tt});var xt=Qe.target.targetLinks,_t=0;return xt.forEach(function(Ct){_t=Ct.circular?_t+1:_t}),!(Tt>1||_t>1)}function O(Qe,Xe,Tt){return Qe.sort(ne),Qe.forEach(function(xt,_t){var Ct=0;if(gt(xt,Tt)&&G(xt))xt.circularPathData.verticalBuffer=Ct+xt.width/2;else{var jt=0;for(jt;jt<_t;jt++)if(H(Qe[_t],Qe[jt])){var At=Qe[jt].circularPathData.verticalBuffer+Qe[jt].width/2+Xe;Ct=At>Ct?At:Ct}xt.circularPathData.verticalBuffer=Ct+xt.width/2}}),Qe}function W(Qe,Xe,Tt,xt){var _t=5,Ct=t.min(Qe.links,function(Te){return Te.source.y0});Qe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var jt=Qe.links.filter(function(Te){return Te.circularLinkType=="top"});O(jt,Xe,xt);var At=Qe.links.filter(function(Te){return Te.circularLinkType=="bottom"});O(At,Xe,xt),Qe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+v,Te.circularPathData.leftNodeBuffer=_t,Te.circularPathData.rightNodeBuffer=_t,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,gt(Te,xt)&&G(Te))Te.circularPathData.leftSmallArcRadius=v+Te.width/2,Te.circularPathData.leftLargeArcRadius=v+Te.width/2,Te.circularPathData.rightSmallArcRadius=v+Te.width/2,Te.circularPathData.rightLargeArcRadius=v+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+M+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-M-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var nt=Te.source.column,ut=Te.circularLinkType,ct=Qe.links.filter(function(tt){return tt.source.column==nt&&tt.circularLinkType==ut});Te.circularLinkType=="bottom"?ct.sort(ze):ct.sort(be);var rt=0;ct.forEach(function(tt,Je){tt.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=v+Te.width/2+rt,Te.circularPathData.leftLargeArcRadius=v+Te.width/2+Je*Xe+rt),rt=rt+tt.width}),nt=Te.target.column,ct=Qe.links.filter(function(tt){return tt.target.column==nt&&tt.circularLinkType==ut}),Te.circularLinkType=="bottom"?ct.sort(he):ct.sort(Ce),rt=0,ct.forEach(function(tt,Je){tt.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=v+Te.width/2+rt,Te.circularPathData.rightLargeArcRadius=v+Te.width/2+Je*Xe+rt),rt=rt+tt.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(Tt,Te.source.y1,Te.target.y1)+M+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Ct-M-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=re(Te);else{var je=n.linkHorizontal().source(function(tt){var Je=tt.source.x0+(tt.source.x1-tt.source.x0),Mt=tt.y0;return[Je,Mt]}).target(function(tt){var Je=tt.target.x0,Mt=tt.y1;return[Je,Mt]});Te.path=je(Te)}})}function re(Qe){var Xe="";return Qe.circularLinkType=="top"?Xe="M"+Qe.circularPathData.sourceX+" "+Qe.circularPathData.sourceY+" L"+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.sourceY+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Qe.circularPathData.leftFullExtent+" "+(Qe.circularPathData.sourceY-Qe.circularPathData.leftSmallArcRadius)+" L"+Qe.circularPathData.leftFullExtent+" "+Qe.circularPathData.verticalLeftInnerExtent+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" L"+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Qe.circularPathData.rightFullExtent+" "+Qe.circularPathData.verticalRightInnerExtent+" L"+Qe.circularPathData.rightFullExtent+" "+(Qe.circularPathData.targetY-Qe.circularPathData.rightSmallArcRadius)+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.targetY+" L"+Qe.circularPathData.targetX+" "+Qe.circularPathData.targetY:Xe="M"+Qe.circularPathData.sourceX+" "+Qe.circularPathData.sourceY+" L"+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.sourceY+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Qe.circularPathData.leftFullExtent+" "+(Qe.circularPathData.sourceY+Qe.circularPathData.leftSmallArcRadius)+" L"+Qe.circularPathData.leftFullExtent+" "+Qe.circularPathData.verticalLeftInnerExtent+" A"+Qe.circularPathData.leftLargeArcRadius+" "+Qe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Qe.circularPathData.leftInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" L"+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.verticalFullExtent+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Qe.circularPathData.rightFullExtent+" "+Qe.circularPathData.verticalRightInnerExtent+" L"+Qe.circularPathData.rightFullExtent+" "+(Qe.circularPathData.targetY+Qe.circularPathData.rightSmallArcRadius)+" A"+Qe.circularPathData.rightLargeArcRadius+" "+Qe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Qe.circularPathData.rightInnerExtent+" "+Qe.circularPathData.targetY+" L"+Qe.circularPathData.targetX+" "+Qe.circularPathData.targetY,Xe}function ne(Qe,Xe){return te(Qe)==te(Xe)?Qe.circularLinkType=="bottom"?ze(Qe,Xe):be(Qe,Xe):te(Xe)-te(Qe)}function be(Qe,Xe){return Qe.y0-Xe.y0}function ze(Qe,Xe){return Xe.y0-Qe.y0}function Ce(Qe,Xe){return Qe.y1-Xe.y1}function he(Qe,Xe){return Xe.y1-Qe.y1}function te(Qe){return Qe.target.column-Qe.source.column}function ke(Qe){return Qe.target.x0-Qe.source.x1}function Ee(Qe,Xe){var Tt=U(Qe),xt=ke(Xe)/Math.tan(Tt),_t=et(Qe)=="up"?Qe.y1+xt:Qe.y1-xt;return _t}function Me(Qe,Xe){var Tt=U(Qe),xt=ke(Xe)/Math.tan(Tt),_t=et(Qe)=="up"?Qe.y1-xt:Qe.y1+xt;return _t}function Oe(Qe,Xe,Tt,xt){Qe.links.forEach(function(_t){if(!_t.circular&&_t.target.column-_t.source.column>1){var Ct=_t.source.column+1,jt=_t.target.column-1,At=1,Te=jt-Ct+1;for(At=1;Ct<=jt;Ct++,At++)Qe.nodes.forEach(function(nt){if(nt.column==Ct){var ut=At/(Te+1),ct=Math.pow(1-ut,3),rt=3*ut*Math.pow(1-ut,2),je=3*Math.pow(ut,2)*(1-ut),tt=Math.pow(ut,3),Je=ct*_t.y0+rt*_t.y0+je*_t.y1+tt*_t.y1,Mt=Je-_t.width/2,Vt=Je+_t.width/2,Kt;Mt>nt.y0&&Mtnt.y0&&Vtnt.y1&&me(ir,Kt,Xe,Tt)})):Mtnt.y1&&(Kt=Vt-nt.y0+10,nt=me(nt,Kt,Xe,Tt),Qe.nodes.forEach(function(ir){C(ir,xt)==C(nt,xt)||ir.column!=nt.column||ir.y0nt.y1&&me(ir,Kt,Xe,Tt)}))}})}})}function Re(Qe,Xe){return Qe.y0>Xe.y0&&Qe.y0Xe.y0&&Qe.y1Xe.y1}function me(Qe,Xe,Tt,xt){return Qe.y0+Xe>=Tt&&Qe.y1+Xe<=xt&&(Qe.y0=Qe.y0+Xe,Qe.y1=Qe.y1+Xe,Qe.targetLinks.forEach(function(_t){_t.y1=_t.y1+Xe}),Qe.sourceLinks.forEach(function(_t){_t.y0=_t.y0+Xe})),Qe}function Be(Qe,Xe,Tt,xt){Qe.nodes.forEach(function(_t){xt&&_t.y+(_t.y1-_t.y0)>Xe&&(_t.y=_t.y-(_t.y+(_t.y1-_t.y0)-Xe));var Ct=Qe.links.filter(function(Te){return C(Te.source,Tt)==C(_t,Tt)}),jt=Ct.length;jt>1&&Ct.sort(function(Te,nt){if(!Te.circular&&!nt.circular){if(Te.target.column==nt.target.column)return Te.y1-nt.y1;if(Ze(Te,nt)){if(Te.target.column>nt.target.column){var ut=Me(nt,Te);return Te.y1-ut}if(nt.target.column>Te.target.column){var ct=Me(Te,nt);return ct-nt.y1}}else return Te.y1-nt.y1}if(Te.circular&&!nt.circular)return Te.circularLinkType=="top"?-1:1;if(nt.circular&&!Te.circular)return nt.circularLinkType=="top"?1:-1;if(Te.circular&&nt.circular)return Te.circularLinkType===nt.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===nt.target.column?Te.target.y1-nt.target.y1:nt.target.column-Te.target.column:Te.circularLinkType===nt.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===nt.target.column?nt.target.y1-Te.target.y1:Te.target.column-nt.target.column:Te.circularLinkType=="top"?-1:1});var At=_t.y0;Ct.forEach(function(Te){Te.y0=At+Te.width/2,At=At+Te.width}),Ct.forEach(function(Te,nt){if(Te.circularLinkType=="bottom"){var ut=nt+1,ct=0;for(ut;ut1&&_t.sort(function(At,Te){if(!At.circular&&!Te.circular){if(At.source.column==Te.source.column)return At.y0-Te.y0;if(Ze(At,Te)){if(Te.source.column0?"up":"down"}function gt(Qe,Xe){return C(Qe.source,Xe)==C(Qe.target,Xe)}function Pt(Qe,Xe,Tt){var xt=Qe.nodes,_t=Qe.links,Ct=!1,jt=!1;if(_t.forEach(function(rt){rt.circularLinkType=="top"?Ct=!0:rt.circularLinkType=="bottom"&&(jt=!0)}),Ct==!1||jt==!1){var At=t.min(xt,function(rt){return rt.y0}),Te=t.max(xt,function(rt){return rt.y1}),nt=Te-At,ut=Tt-Xe,ct=ut/nt;xt.forEach(function(rt){var je=(rt.y1-rt.y0)*ct;rt.y0=(rt.y0-At)*ct,rt.y1=rt.y0+je}),_t.forEach(function(rt){rt.y0=(rt.y0-At)*ct,rt.y1=(rt.y1-At)*ct,rt.width=rt.width*ct})}}e.sankeyCircular=T,e.sankeyCenter=l,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=u,Object.defineProperty(e,"__esModule",{value:!0})})});var UJ=Se((Xxr,lje)=>{"use strict";lje.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 bje=Se((Yxr,xje)=>{"use strict";var uje=$We(),LZt=(I2(),ab(P2)).interpolateNumber,LS=Nl(),Vk=ije(),zZt=sje(),nc=UJ(),zS=cd(),aw=Pl(),PZt=yu(),v1=Zr(),GJ=v1.strTranslate,IZt=v1.strRotate,WJ=Km(),Hk=WJ.keyFun,Lq=WJ.repeat,vje=WJ.unwrap,fje=Bf(),DZt=Ul(),yje=Qh(),RZt=yje.CAP_SHIFT,FZt=yje.LINE_SPACING,qZt=3;function BZt(e,t,r){var n=vje(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,u=i.node.thickness,l={justify:Vk.sankeyJustify,left:Vk.sankeyLeft,right:Vk.sankeyRight,center:Vk.sankeyCenter}[i.node.align],f=e.width*(a.x[1]-a.x[0]),c=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,p=n.circular,x;p?x=zZt.sankeyCircular().circularLinkGap(0):x=Vk.sankey(),x.iterations(nc.sankeyIterations).size(o?[f,c]:[c,f]).nodeWidth(u).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(l).nodes(h).links(d);var b=x();x.nodePadding()=O||(G=O-j.y0,G>1e-6&&(j.y0+=G,j.y1+=G)),O=j.y1+s})}function z(U){var H=U.map(function(be,ze){return{x0:be.x0,index:ze}}).sort(function(be,ze){return be.x0-ze.x0}),j=[],G=-1,O,W=-1/0,re;for(y=0;yW+u&&(G+=1,O=ne.x0),W=ne.x0,j[G]||(j[G]=[]),j[G].push(ne),re=O-ne.x0,ne.x0+=re,ne.x1+=re}return j}if(i.node.x.length&&i.node.y.length){for(y=0;y0?"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"+(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+"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"+(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+"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 NZt(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=LZt(a,o),u=s(e),l=s(1-e),f=r.link.y0-r.link.width/2,c=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,p="M"+a+","+f,x="C"+u+","+f+" "+l+","+h+" "+o+","+h,b="C"+l+","+d+" "+u+","+c+" "+a+","+c,y=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return y+="L"+o+","+d,p+x+y+b+"Z"}return t}function UZt(e,t){var r=zS(t.color),n=nc.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=v1.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:aw.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 HJ(e){e.attr("transform",function(t){return GJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function VZt(e){e.call(HJ)}function mje(e,t){e.call(VZt),t.attr("d",jJ())}function cje(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function VJ(e){return e.link.width>1||e.linkLineWidth>0}function hje(e){var t=GJ(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function dje(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 HZt(e,t,r,n){var i=LS.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"&&(v1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),v1.raiseToTop(this),a.interactionState.dragInProgress=a.node,pje(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):GZt(e,o,a,n),WZt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=LS.event.x,s=LS.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),pje(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),mje(e.filter(_je(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var u=r.node.originalX;r.node.x0=u-r.visibleWidth/2,r.node.x1=u+r.visibleWidth/2,gje(r,i)}})}function jZt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function gje(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zp=Nl(),XJ=Zr(),zq=XJ.numberFormat,KZt=bje(),PS=jc(),JZt=Pl(),Ax=UJ().cn,Gk=XJ._;function wje(e){return e!==""}function IS(e,t){return e.filter(function(r){return r.key===t.traceId})}function Tje(e,t){Zp.select(e).select("path").style("fill-opacity",t),Zp.select(e).select("rect").style("fill-opacity",t)}function Aje(e){Zp.select(e).select("text.name").style("fill","black")}function Sje(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Mje(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Eje(e,t,r){t&&r&&IS(r,t).selectAll("."+Ax.sankeyLink).filter(Sje(t)).call(kje.bind(0,t,r,!1))}function ZJ(e,t,r){t&&r&&IS(r,t).selectAll("."+Ax.sankeyLink).filter(Sje(t)).call(Cje.bind(0,t,r,!1))}function kje(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!==""&&IS(t,e).selectAll("."+Ax.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&&IS(t,e).selectAll("."+Ax.sankeyNode).filter(Mje(e)).call(Eje)}function Cje(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!==""&&IS(t,e).selectAll("."+Ax.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&&IS(t,e).selectAll(Ax.sankeyNode).filter(Mje(e)).call(ZJ)}function th(e,t){var r=e.hoverlabel||{},n=XJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}Lje.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:th(C,"bgcolor")||JZt.addOpacity(F.color,1),borderColor:th(C,"bordercolor"),fontFamily:th(C,"font.family"),fontSize:th(C,"font.size"),fontColor:th(C,"font.color"),fontWeight:th(C,"font.weight"),fontStyle:th(C,"font.style"),fontVariant:th(C,"font.variant"),fontTextcase:th(C,"font.textcase"),fontLineposition:th(C,"font.lineposition"),fontShadow:th(C,"font.shadow"),nameLength:th(C,"namelength"),textAlign:th(C,"align"),idealAlign:Zp.event.x"),color:th(C,"bgcolor")||_.tinyColorHue,borderColor:th(C,"bordercolor"),fontFamily:th(C,"font.family"),fontSize:th(C,"font.size"),fontColor:th(C,"font.color"),fontWeight:th(C,"font.weight"),fontStyle:th(C,"font.style"),fontVariant:th(C,"font.variant"),fontTextcase:th(C,"font.textcase"),fontLineposition:th(C,"font.lineposition"),fontShadow:th(C,"font.shadow"),nameLength:th(C,"namelength"),textAlign:th(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[_.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});Tje(G,.85),Aje(G)}}},A=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zp.select(L).call(ZJ,_,C),_.node.trace.node.hoverinfo!=="skip"&&(_.node.fullData=_.node.trace,t.emit("plotly_unhover",{event:Zp.event,points:[_.node]})),PS.loneUnhover(n._hoverlayer.node()))};KZt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:l,follow:x,unhover:b,select:u},nodeEvents:{hover:k,follow:E,unhover:A,select:y}})}});var zje=Se(ow=>{"use strict";var $Zt=_c().overrideAll,QZt=Dd().getModuleCalcData,eXt=YJ(),tXt=O1(),rXt=Ty(),iXt=gp(),nXt=nh().prepSelect,KJ=Zr(),aXt=Ul(),Pq="sankey";ow.name=Pq;ow.baseLayoutAttrOverrides=$Zt({hoverlabel:tXt.hoverlabel},"plot","nested");ow.plot=function(e){var t=QZt(e.calcdata,Pq)[0];eXt(e,t),ow.updateFx(e)};ow.clean=function(e,t,r,n){var i=n._has&&n._has(Pq),a=t._has&&t._has(Pq);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};ow.updateFx=function(e){for(var t=0;t{"use strict";Pje.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";Dje.exports={attributes:BJ(),supplyDefaults:BWe(),calc:HWe(),plot:YJ(),moduleType:"trace",name:"sankey",basePlotModule:zje(),selectPoints:Ije(),categories:["noOpacity"],meta:{}}});var qje=Se((ebr,Fje)=>{"use strict";Fje.exports=Rje()});var Oje=Se(DS=>{"use strict";var Bje=Sc();DS.name="indicator";DS.plot=function(e,t,r,n){Bje.plotBasePlot(DS.name,e,t,r,n)};DS.clean=function(e,t,r,n){Bje.cleanBasePlot(DS.name,e,t,r,n)}});var $J=Se((rbr,Wje)=>{"use strict";var Sx=vu().extendFlat,Uje=vu().extendDeep,sXt=_c().overrideAll,Vje=uc(),Hje=Ih(),lXt=Ec().attributes,sh=Rd(),uXt=_f().templatedArray,Iq=HT(),Nje=Gc().descriptionOnlyNumbers,JJ=Vje({editType:"plot",colorEditType:"plot"}),Wk={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:Hje.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"},Gje={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},fXt=uXt("step",Uje({},Wk,{range:Gje}));Wje.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:lXt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Sx({},JJ,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:Nje("value")},font:Sx({},JJ,{}),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:Nje("value")},increasing:{symbol:{valType:"string",dflt:Iq.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:Iq.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:Iq.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:Iq.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Sx({},JJ,{}),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:Uje({},Wk,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Hje.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:sXt({range:Gje,visible:Sx({},sh.visible,{dflt:!0}),tickmode:sh.minor.tickmode,nticks:sh.nticks,tick0:sh.tick0,dtick:sh.dtick,tickvals:sh.tickvals,ticktext:sh.ticktext,ticks:Sx({},sh.ticks,{dflt:"outside"}),ticklen:sh.ticklen,tickwidth:sh.tickwidth,tickcolor:sh.tickcolor,ticklabelstep:sh.ticklabelstep,showticklabels:sh.showticklabels,labelalias:sh.labelalias,tickfont:Vje({}),tickangle:sh.tickangle,tickformat:sh.tickformat,tickformatstops:sh.tickformatstops,tickprefix:sh.tickprefix,showtickprefix:sh.showtickprefix,ticksuffix:sh.ticksuffix,showticksuffix:sh.showticksuffix,separatethousands:sh.separatethousands,exponentformat:sh.exponentformat,minexponent:sh.minexponent,showexponent:sh.showexponent,editType:"plot"},"plot"),steps:fXt,threshold:{line:{color:Sx({},Wk.line.color,{}),width:Sx({},Wk.line.width,{dflt:1}),editType:"plot"},thickness:Sx({},Wk.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var QJ=Se((ibr,jje)=>{"use strict";jje.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var Yje=Se((nbr,Xje)=>{"use strict";var eg=Zr(),Rq=$J(),cXt=Ec().defaults,Zje=_f(),hXt=Jd(),Dq=QJ(),dXt=xb(),pXt=T3(),vXt=e_(),yXt=t_();function mXt(e,t,r,n){function i(_,C){return eg.coerce(e,t,Rq,_,C)}cXt(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 u=eg.extendFlat({},n.font);u.size=void 0,eg.coerceFont(i,"number.font",u),t.number.font.size===void 0&&(t.number.font.size=Dq.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var l;if(t._hasDelta){var f=eg.extendFlat({},n.font);f.size=void 0,eg.coerceFont(i,"delta.font",f),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||Dq.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"),l=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var c=eg.extendFlat({},n.font);c.size=.25*(s||l||Dq.defaultNumberFontSize),eg.coerceFont(i,"title.font",c),i("title.text");var h,d,p,x;function b(_,C){return eg.coerce(h,d,Rq.gauge,_,C)}function y(_,C){return eg.coerce(p,x,Rq.gauge.axis,_,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=Zje.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 A=Dq.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",A),hXt(h,d,{name:"steps",handleItemDefaults:gXt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),p={},h&&(p=h.axis||{}),x=Zje.newContainer(d,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};dXt(p,x,y,"linear"),yXt(p,x,y,"linear",L),vXt(p,x,y,"linear",L),pXt(p,x,y,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function gXt(e,t){function r(n,i){return eg.coerce(e,t,Rq.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}Xje.exports={supplyDefaults:mXt}});var Jje=Se((abr,Kje)=>{"use strict";function _Xt(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}Kje.exports={calc:_Xt}});var iZe=Se((obr,rZe)=>{"use strict";var cw=Nl(),xXt=(I2(),ab(P2)).interpolate,$je=(I2(),ab(P2)).interpolateNumber,Mx=Zr(),bXt=Mx.strScale,Zk=Mx.strTranslate,wXt=Mx.rad2deg,TXt=Qh().MID_SHIFT,fw=yu(),sw=QJ(),qq=Bf(),up=hu(),AXt=J5(),SXt=rI(),MXt=Rd(),RS=Pl(),e$={left:"start",center:"middle",right:"end"},lw={left:0,center:.5,right:1},Qje=/[yzafpnµmkMGTPEZY]/;function Xk(e){return e&&e.duration>0}rZe.exports=function(t,r,n,i){var a=t._fullLayout,o;Xk(n)&&i&&(o=i()),Mx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var u=s[0],l=u.trace,f=cw.select(this),c=l._hasGauge,h=l._isAngular,d=l._isBullet,p=l.domain,x={w:a._size.w*(p.x[1]-p.x[0]),h:a._size.h*(p.y[1]-p.y[0]),l:a._size.l+a._size.w*p.x[0],r:a._size.r+a._size.w*(1-p.x[1]),t:a._size.t+a._size.h*(1-p.y[1]),b:a._size.b+a._size.h*p.y[0]},b=x.l+x.w/2,y=x.t+x.h/2,k=Math.min(x.w/2,x.h),E=sw.innerRadius*k,A,L,_,C=l.align||"center";if(L=y,!c)A=x.l+lw[C]*x.w,_=function(G){return eZe(G,x.w,x.h)};else if(h&&(A=b,L=y+k/2,_=function(G){return zXt(G,.9*E)}),d){var M=sw.bulletPadding,v=1-sw.bulletNumberDomainSize+M;A=x.l+(v+(1-v)*lw[C])*x.w,_=function(G){return eZe(G,(sw.bulletNumberDomainSize-M)*x.w,x.h)}}CXt(t,f,s,{numbersX:A,numbersY:L,numbersScaler:_,transitionOpts:n,onComplete:o});var z,T;c&&(z={range:l.gauge.axis.range,color:l.gauge.bgcolor,line:{color:l.gauge.bordercolor,width:0},thickness:1},T={range:l.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:l.gauge.bordercolor,width:l.gauge.borderwidth},thickness:1});var F=f.selectAll("g.angular").data(h?s:[]);F.exit().remove();var q=f.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&kXt(t,f,s,{radius:k,innerRadius:E,gauge:F,layer:q,size:x,gaugeBg:z,gaugeOutline:T,transitionOpts:n,onComplete:o});var U=f.selectAll("g.bullet").data(d?s:[]);U.exit().remove();var H=f.selectAll("g.bulletaxis").data(d?s:[]);H.exit().remove(),d&&EXt(t,f,s,{gauge:U,layer:H,size:x,gaugeBg:z,gaugeOutline:T,transitionOpts:n,onComplete:o});var j=f.selectAll("text.title").data(s);j.exit().remove(),j.enter().append("text").classed("title",!0),j.attr("text-anchor",function(){return d?e$.right:e$[l.title.align]}).text(l.title.text).call(fw.font,l.title.font).call(qq.convertToTspans,t),j.attr("transform",function(){var G=x.l+x.w*lw[l.title.align],O,W=sw.titlePadding,re=fw.bBox(j.node());if(c){if(h)if(l.gauge.axis.visible){var ne=fw.bBox(q.node());O=ne.top-W-re.bottom}else O=x.t+x.h/2-k/2-re.bottom-W;d&&(O=L-(re.top+re.bottom)/2,G=x.l-sw.bulletPadding*x.w)}else O=l._numbersTop-W-re.bottom;return Zk(G,O)})})};function EXt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,u=n.gaugeOutline,l=n.size,f=i.domain,c=n.transitionOpts,h=n.onComplete,d,p,x,b,y;a.enter().append("g").classed("bullet",!0),a.attr("transform",Zk(l.l,l.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=l.h,E=i.gauge.bar.thickness*k,A=f.x[0],L=f.x[0]+(f.x[1]-f.x[0])*(i._hasNumber||i._hasDelta?1-sw.bulletNumberDomainSize:1);d=jk(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[A,L],d.setScale(),p=up.calcTicks(d),x=up.makeTransTickFn(d),b=up.getTickSigns(d)[2],y=l.t+l.h,d.visible&&(up.drawTicks(e,d,{vals:d.ticks==="inside"?up.clipEnds(d,p):p,layer:o,path:up.makeTickPath(d,y,b),transFn:x}),up.drawLabels(e,d,{vals:p,layer:o,transFn:x,labelFns:up.makeLabelFns(d,y)}));function _(q){q.attr("width",function(U){return Math.max(0,d.c2p(U.range[1])-d.c2p(U.range[0]))}).attr("x",function(U){return d.c2p(U.range[0])}).attr("y",function(U){return .5*(1-U.thickness)*k}).attr("height",function(U){return U.thickness*k})}var C=[s].concat(i.gauge.steps),M=a.selectAll("g.bg-bullet").data(C);M.enter().append("g").classed("bg-bullet",!0).append("rect"),M.select("rect").call(_).call(uw),M.exit().remove();var v=a.selectAll("g.value-bullet").data([i.gauge.bar]);v.enter().append("g").classed("value-bullet",!0).append("rect"),v.select("rect").attr("height",E).attr("y",(k-E)/2).call(uw),Xk(c)?v.select("rect").transition().duration(c.duration).ease(c.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)))):v.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),v.exit().remove();var z=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),T=a.selectAll("g.threshold-bullet").data(z);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(RS.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),T.exit().remove();var F=a.selectAll("g.gauge-outline").data([u]);F.enter().append("g").classed("gauge-outline",!0).append("rect"),F.select("rect").call(_).call(uw),F.exit().remove()}function kXt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,u=n.gaugeBg,l=n.gaugeOutline,f=[a.l+a.w/2,a.t+a.h/2+o/2],c=n.gauge,h=n.layer,d=n.transitionOpts,p=n.onComplete,x=Math.PI/2;function b(be){var ze=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],he=(be-ze)/(Ce-ze)*Math.PI-x;return he<-x?-x:he>x?x:he}function y(be){return cw.svg.arc().innerRadius((s+o)/2-be/2*(o-s)).outerRadius((s+o)/2+be/2*(o-s)).startAngle(-x)}function k(be){be.attr("d",function(ze){return y(ze.thickness).startAngle(b(ze.range[0])).endAngle(b(ze.range[1]))()})}var E,A,L,_;c.enter().append("g").classed("angular",!0),c.attr("transform",Zk(f[0],f[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),E=jk(e,i.gauge.axis),E.type="linear",E.range=i.gauge.axis.range,E._id="xangularaxis",E.ticklabeloverflow="allow",E.setScale();var C=function(be){return(E.range[0]-be.x)/(E.range[1]-E.range[0])*Math.PI+Math.PI},M={},v=up.makeLabelFns(E,0),z=v.labelStandoff;M.xFn=function(be){var ze=C(be);return Math.cos(ze)*z},M.yFn=function(be){var ze=C(be),Ce=Math.sin(ze)>0?.2:1;return-Math.sin(ze)*(z+be.fontSize*Ce)+Math.abs(Math.cos(ze))*(be.fontSize*TXt)},M.anchorFn=function(be){var ze=C(be),Ce=Math.cos(ze);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},M.heightFn=function(be,ze,Ce){var he=C(be);return-.5*(1+Math.sin(he))*Ce};var T=function(be){return Zk(f[0]+o*Math.cos(be),f[1]-o*Math.sin(be))};L=function(be){return T(C(be))};var F=function(be){var ze=C(be);return T(ze)+"rotate("+-wXt(ze)+")"};if(A=up.calcTicks(E),_=up.getTickSigns(E)[2],E.visible){_=E.ticks==="inside"?-1:1;var q=(E.linewidth||1)/2;up.drawTicks(e,E,{vals:A,layer:h,path:"M"+_*q+",0h"+_*E.ticklen,transFn:F}),up.drawLabels(e,E,{vals:A,layer:h,transFn:L,labelFns:M})}var U=[u].concat(i.gauge.steps),H=c.selectAll("g.bg-arc").data(U);H.enter().append("g").classed("bg-arc",!0).append("path"),H.select("path").call(k).call(uw),H.exit().remove();var j=y(i.gauge.bar.thickness),G=c.selectAll("g.value-arc").data([i.gauge.bar]);G.enter().append("g").classed("value-arc",!0).append("path");var O=G.select("path");Xk(d)?(O.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",LXt(j,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):O.attr("d",typeof r[0].y=="number"?j.endAngle(b(r[0].y)):"M0,0Z"),O.call(uw),G.exit().remove(),U=[];var W=i.gauge.threshold.value;(W||W===0)&&U.push({range:[W,W],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=c.selectAll("g.threshold-arc").data(U);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(k).call(uw),re.exit().remove();var ne=c.selectAll("g.gauge-outline").data([l]);ne.enter().append("g").classed("gauge-outline",!0).append("path"),ne.select("path").call(k).call(uw),ne.exit().remove()}function CXt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",u=e$[s],l=n.transitionOpts,f=n.onComplete,c=Mx.ensureSingle(t,"g","numbers"),h,d,p,x=[];i._hasNumber&&x.push("number"),i._hasDelta&&(x.push("delta"),i.delta.position==="left"&&x.reverse());var b=c.selectAll("text").data(x);b.enter().append("text"),b.attr("text-anchor",function(){return u}).attr("class",function(T){return T}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function y(T,F,q,U){if(T.match("s")&&q>=0!=U>=0&&!F(q).slice(-1).match(Qje)&&!F(U).slice(-1).match(Qje)){var H=T.slice().replace("s","f").replace(/\d+/,function(G){return parseInt(G)-1}),j=jk(e,{tickformat:H});return function(G){return Math.abs(G)<1?up.tickText(j,G).text:F(G)}}else return F}function k(){var T=jk(e,{tickformat:i.number.valueformat},i._range);T.setScale(),up.prepTicks(T);var F=function(G){return up.tickText(T,G).text},q=i.number.suffix,U=i.number.prefix,H=c.select("text.number");function j(){var G=typeof r[0].y=="number"?U+F(r[0].y)+q:"-";H.text(G).call(fw.font,i.number.font).call(qq.convertToTspans,e)}return Xk(l)?H.transition().duration(l.duration).ease(l.easing).each("end",function(){j(),f&&f()}).each("interrupt",function(){j(),f&&f()}).attrTween("text",function(){var G=cw.select(this),O=$je(r[0].lastY,r[0].y);i._lastValue=r[0].y;var W=y(i.number.valueformat,F,r[0].lastY,r[0].y);return function(re){G.text(U+W(O(re))+q)}}):j(),h=tZe(U+F(r[0].y)+q,i.number.font,u,e),H}function E(){var T=jk(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),up.prepTicks(T);var F=function(re){return up.tickText(T,re).text},q=i.delta.suffix,U=i.delta.prefix,H=function(re){var ne=i.delta.relative?re.relativeDelta:re.delta;return ne},j=function(re,ne){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+ne(re)+q},G=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=H(r[0]));var O=c.select("text.delta");O.call(fw.font,i.delta.font).call(RS.fill,G({delta:i._deltaLastValue}));function W(){O.text(j(H(r[0]),F)).call(RS.fill,G(r[0])).call(qq.convertToTspans,e)}return Xk(l)?O.transition().duration(l.duration).ease(l.easing).tween("text",function(){var re=cw.select(this),ne=H(r[0]),be=i._deltaLastValue,ze=y(i.delta.valueformat,F,be,ne),Ce=$je(be,ne);return i._deltaLastValue=ne,function(he){re.text(j(Ce(he),ze)),re.call(RS.fill,G({delta:Ce(he)}))}}).each("end",function(){W(),f&&f()}).each("interrupt",function(){W(),f&&f()}):W(),d=tZe(j(H(r[0]),F),i.delta.font,u,e),O}var A=i.mode+i.align,L;if(i._hasDelta&&(L=E(),A+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,A+=i.delta.increasing.symbol+i.delta.decreasing.symbol,p=d),i._hasNumber&&(k(),A+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,p=h),i._hasDelta&&i._hasNumber){var _=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,v,z=.75*i.delta.font.size;i.delta.position==="left"&&(M=Fq(i,"deltaPos",0,-1*(h.width*lw[i.align]+d.width*(1-lw[i.align])+z),A,Math.min),v=_[1]-C[1],p={width:h.width+d.width+z,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+v),bottom:Math.max(h.bottom,d.bottom+v)}),i.delta.position==="right"&&(M=Fq(i,"deltaPos",0,h.width*(1-lw[i.align])+d.width*lw[i.align]+z,A,Math.max),v=_[1]-C[1],p={width:h.width+d.width+z,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+v),bottom:Math.max(h.bottom,d.bottom+v)}),i.delta.position==="bottom"&&(M=null,v=d.height,p={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,v=h.top,p={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:v})}(i._hasNumber||i._hasDelta)&&c.attr("transform",function(){var T=n.numbersScaler(p);A+=T[2];var F=Fq(i,"numbersScale",1,T[0],A,Math.min),q;i._scaleNumbers||(F=1),i._isAngular?q=o-F*p.bottom:q=o-F*(p.top+p.bottom)/2,i._numbersTop=F*p.top+q;var U=p[s];s==="center"&&(U=(p.left+p.right)/2);var H=a-F*U;return H=Fq(i,"numbersTranslate",0,H,A,Math.max),Zk(H,q)+bXt(F)})}function uw(e){e.each(function(t){RS.stroke(cw.select(this),t.line.color)}).each(function(t){RS.fill(cw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function LXt(e,t,r){return function(){var n=xXt(t,r);return function(i){return e.endAngle(n(i))()}}}function jk(e,t,r){var n=e._fullLayout,i=Mx.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(u,l){return Mx.coerce(i,a,MXt,u,l)}return AXt(i,a,s,o,n),SXt(i,a,s,o),a}function eZe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function zXt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function tZe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=cw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(qq.convertToTspans,n).call(fw.font,t),fw.bBox(a.node())}function Fq(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Mx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var aZe=Se((sbr,nZe)=>{"use strict";nZe.exports={moduleType:"trace",name:"indicator",basePlotModule:Oje(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:$J(),supplyDefaults:Yje().supplyDefaults,calc:Jje().calc,plot:iZe(),meta:{}}});var sZe=Se((lbr,oZe)=>{"use strict";oZe.exports=aZe()});var t$=Se((fbr,cZe)=>{"use strict";var lZe=Nb(),Bq=vu().extendFlat,PXt=_c().overrideAll,uZe=uc(),IXt=Ec().attributes,fZe=Gc().descriptionOnlyNumbers,ubr=cZe.exports=PXt({domain:IXt({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:fZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:Bq({},lZe.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:Bq({},uZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:fZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:Bq({},lZe.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:Bq({},uZe({arrayOk:!0}))}},"calc","from-root")});var dZe=Se((cbr,hZe)=>{"use strict";var r$=Zr(),DXt=t$(),RXt=Ec().defaults;function FXt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(u,l){return u-l}),o=i.map(function(u){return a.indexOf(u)}),s=o.length;s{"use strict";var qXt=Km().wrap;pZe.exports=function(){return qXt({})}});var i$=Se((dbr,yZe)=>{"use strict";yZe.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 SZe=Se((pbr,AZe)=>{"use strict";var mZe=i$(),a$=vu().extendFlat,BXt=_u(),OXt=yp().isTypedArray,Oq=yp().isArrayOrTypedArray;AZe.exports=function(t,r){var n=n$(r.cells.values),i=function(v){return v.slice(r.header.values.length,v.length)},a=n$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=n$(a));var o=a.concat(i(n).map(function(){return TZe((a[0]||[""]).length)})),s=r.domain,u=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),l=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),f=r.header.values.length?o[0].map(function(){return r.header.height}):[mZe.emptyHeaderHeight],c=n.length?n[0].map(function(){return r.cells.height}):[],h=f.reduce(gZe,0),d=l-h,p=d+mZe.uplift,x=bZe(c,p),b=bZe(f,h),y=xZe(b,[]),k=xZe(x,y),E={},A=r._fullInput.columnorder;Oq(A)&&(A=Array.from(A)),A=A.concat(i(n.map(function(v,z){return z})));var L=o.map(function(v,z){var T=Oq(r.columnwidth)?r.columnwidth[Math.min(z,r.columnwidth.length-1)]:r.columnwidth;return BXt(T)?Number(T):1}),_=L.reduce(gZe,0);L=L.map(function(v){return v/_*u});var C=Math.max(o$(r.header.line.width),o$(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:u,maxLineWidth:C,height:l,columnOrder:A,groupHeight:l,rowBlocks:k,headerRowBlocks:y,scrollY:0,cells:a$({},r.cells,{values:n}),headerCells:a$({},r.header,{values:o}),gdColumns:o.map(function(v){return v[0]}),gdColumnsOriginalOrder:o.map(function(v){return v[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(v,z){var T=E[v];E[v]=(T||0)+1;var F=v+"__"+E[v];return{key:F,label:v,specIndex:z,xIndex:A[z],xScale:_Ze,x:void 0,calcdata:void 0,columnWidth:L[z]}})};return M.columns.forEach(function(v){v.calcdata=M,v.x=_Ze(v)}),M};function o$(e){if(Oq(e)){for(var t=0,r=0;r=t||l===e.length-1)&&(r[i]=o,o.key=u++,o.firstRowIndex=s,o.lastRowIndex=l,o=wZe(),i+=a,s=l+1,a=0);return r}function wZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var MZe=Se(s$=>{"use strict";var Nq=vu().extendFlat;s$.splitToPanels=function(e){var t=[0,0],r=Nq({},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:Nq({},e.calcdata,{cells:e.calcdata.headerCells})}),n=Nq({},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=Nq({},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]};s$.splitToCells=function(e){var t=NXt(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 NXt(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 m$=Se((ybr,qZe)=>{"use strict";var Yl=i$(),Vc=Nl(),l$=Zr(),UXt=l$.numberFormat,ac=Km(),u$=yu(),VXt=Bf(),HXt=Zr().raiseToTop,oy=Zr().strTranslate,GXt=Zr().cancelTransition,WXt=SZe(),IZe=MZe(),EZe=Pl();qZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Yl.cn.table).data(r.map(function(k){var E=ac.unwrap(k),A=E.trace;return WXt(t,A)}),ac.keyFun);i.exit().remove(),i.enter().append("g").classed(Yl.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 oy(k.translateX,k.translateY)});var a=i.selectAll("."+Yl.cn.tableControlView).data(ac.repeat,ac.keyFun),o=a.enter().append("g").classed(Yl.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(Yk,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var E=k.scrollY+Vc.event.deltaY,A=Vq(t,a,null,E)(k);A||(Vc.event.stopPropagation(),Vc.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(Yk,t,!0)}a.attr("transform",function(k){return oy(k.size.l,k.size.t)});var u=a.selectAll("."+Yl.cn.scrollBackground).data(ac.repeat,ac.keyFun);u.enter().append("rect").classed(Yl.cn.scrollBackground,!0).attr("fill","none"),u.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){u$.setClipUrl(Vc.select(this),kZe(t,k),t)});var l=a.selectAll("."+Yl.cn.yColumn).data(function(k){return k.columns},ac.keyFun);l.enter().append("g").classed(Yl.cn.yColumn,!0),l.exit().remove(),l.attr("transform",function(k){return oy(k.x,0)}),n&&l.call(Vc.behavior.drag().origin(function(k){var E=Vc.select(this);return zZe(E,k,-Yl.uplift),HXt(this),k.calcdata.columnDragInProgress=!0,Yk(a.filter(function(A){return k.calcdata.key===A.key}),t),k}).on("drag",function(k){var E=Vc.select(this),A=function(C){return(k===C?Vc.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Yl.overdrag,Math.min(k.calcdata.width+Yl.overdrag-k.columnWidth,Vc.event.x));var L=DZe(l).filter(function(C){return C.calcdata.key===k.calcdata.key}),_=L.sort(function(C,M){return A(C)-A(M)});_.forEach(function(C,M){C.xIndex=M,C.x=k===C?C.x:C.xScale(C)}),l.filter(function(C){return k!==C}).transition().ease(Yl.transitionEase).duration(Yl.transitionDuration).attr("transform",function(C){return oy(C.x,0)}),E.call(GXt).attr("transform",oy(k.x,-Yl.uplift))}).on("dragend",function(k){var E=Vc.select(this),A=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,zZe(E,k,0),tYt(t,A,A.columns.map(function(L){return L.xIndex}))})),l.each(function(k){u$.setClipUrl(Vc.select(this),CZe(t,k),t)});var f=l.selectAll("."+Yl.cn.columnBlock).data(IZe.splitToPanels,ac.keyFun);f.enter().append("g").classed(Yl.cn.columnBlock,!0).attr("id",function(k){return k.key}),f.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var c=f.filter(rYt),h=f.filter(p$);n&&h.call(Vc.behavior.drag().origin(function(k){return Vc.event.stopPropagation(),k}).on("drag",Vq(t,a,-1)).on("dragend",function(){})),f$(t,a,c,f),f$(t,a,h,f);var d=a.selectAll("."+Yl.cn.scrollAreaClip).data(ac.repeat,ac.keyFun);d.enter().append("clipPath").classed(Yl.cn.scrollAreaClip,!0).attr("id",function(k){return kZe(t,k)});var p=d.selectAll("."+Yl.cn.scrollAreaClipRect).data(ac.repeat,ac.keyFun);p.enter().append("rect").classed(Yl.cn.scrollAreaClipRect,!0).attr("x",-Yl.overdrag).attr("y",-Yl.uplift).attr("fill","none"),p.attr("width",function(k){return k.width+2*Yl.overdrag}).attr("height",function(k){return k.height+Yl.uplift});var x=l.selectAll("."+Yl.cn.columnBoundary).data(ac.repeat,ac.keyFun);x.enter().append("g").classed(Yl.cn.columnBoundary,!0);var b=l.selectAll("."+Yl.cn.columnBoundaryClippath).data(ac.repeat,ac.keyFun);b.enter().append("clipPath").classed(Yl.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return CZe(t,k)});var y=b.selectAll("."+Yl.cn.columnBoundaryRect).data(ac.repeat,ac.keyFun);y.enter().append("rect").classed(Yl.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(k){return k.columnWidth+2*Uq(k)}).attr("height",function(k){return k.calcdata.height+2*Uq(k)+Yl.uplift}).attr("x",function(k){return-Uq(k)}).attr("y",function(k){return-Uq(k)}),v$(null,h,a)};function Uq(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function kZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function CZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function DZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function Yk(e,t,r){function n(l){var f=l.rowBlocks;return h$(f,f.length-1)+(f.length?Hq(f[f.length-1],1/0):1)}var i=e.selectAll("."+Yl.cn.scrollbarKit).data(ac.repeat,ac.keyFun);i.enter().append("g").classed(Yl.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(l){var f=l.scrollbarState;f.totalHeight=n(l),f.scrollableAreaHeight=l.groupHeight-c$(l),f.currentlyVisibleHeight=Math.min(f.totalHeight,f.scrollableAreaHeight),f.ratio=f.currentlyVisibleHeight/f.totalHeight,f.barLength=Math.max(f.ratio*f.currentlyVisibleHeight,Yl.goldenRatio*Yl.scrollbarWidth),f.barWiggleRoom=f.currentlyVisibleHeight-f.barLength,f.wiggleRoom=Math.max(0,f.totalHeight-f.scrollableAreaHeight),f.topY=f.barWiggleRoom===0?0:l.scrollY/f.wiggleRoom*f.barWiggleRoom,f.bottomY=f.topY+f.barLength,f.dragMultiplier=f.wiggleRoom/f.barWiggleRoom}).attr("transform",function(l){var f=l.width+Yl.scrollbarWidth/2+Yl.scrollbarOffset;return oy(f,c$(l))});var a=i.selectAll("."+Yl.cn.scrollbar).data(ac.repeat,ac.keyFun);a.enter().append("g").classed(Yl.cn.scrollbar,!0);var o=a.selectAll("."+Yl.cn.scrollbarSlider).data(ac.repeat,ac.keyFun);o.enter().append("g").classed(Yl.cn.scrollbarSlider,!0),o.attr("transform",function(l){return oy(0,l.scrollbarState.topY||0)});var s=o.selectAll("."+Yl.cn.scrollbarGlyph).data(ac.repeat,ac.keyFun);s.enter().append("line").classed(Yl.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Yl.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Yl.scrollbarWidth/2),s.attr("y2",function(l){return l.scrollbarState.barLength-Yl.scrollbarWidth/2}).attr("stroke-opacity",function(l){return l.columnDragInProgress||!l.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Yl.scrollbarHideDelay).duration(Yl.scrollbarHideDuration).attr("stroke-opacity",0);var u=a.selectAll("."+Yl.cn.scrollbarCaptureZone).data(ac.repeat,ac.keyFun);u.enter().append("line").classed(Yl.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Yl.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(l){var f=Vc.event.y,c=this.getBoundingClientRect(),h=l.scrollbarState,d=f-c.top,p=Vc.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||Vq(t,e,null,p(d-h.barLength/2))(l)}).call(Vc.behavior.drag().origin(function(l){return Vc.event.stopPropagation(),l.scrollbarState.scrollbarScrollInProgress=!0,l}).on("drag",Vq(t,e)).on("dragend",function(){})),u.attr("y2",function(l){return l.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),u.remove())}function f$(e,t,r,n){var i=jXt(r),a=ZXt(i);JXt(a);var o=XXt(a);QXt(o);var s=KXt(a),u=YXt(s);$Xt(u),RZe(u,t,n,e),y$(a)}function jXt(e){var t=e.selectAll("."+Yl.cn.columnCells).data(ac.repeat,ac.keyFun);return t.enter().append("g").classed(Yl.cn.columnCells,!0),t.exit().remove(),t}function ZXt(e){var t=e.selectAll("."+Yl.cn.columnCell).data(IZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Yl.cn.columnCell,!0),t.exit().remove(),t}function XXt(e){var t=e.selectAll("."+Yl.cn.cellRect).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Yl.cn.cellRect,!0),t}function YXt(e){var t=e.selectAll("."+Yl.cn.cellText).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Yl.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Vc.event.stopPropagation()}),t}function KXt(e){var t=e.selectAll("."+Yl.cn.cellTextHolder).data(ac.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Yl.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function JXt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Xp(n.size,i,r),color:Xp(n.color,i,r),family:Xp(n.family,i,r),weight:Xp(n.weight,i,r),style:Xp(n.style,i,r),variant:Xp(n.variant,i,r),textcase:Xp(n.textcase,i,r),lineposition:Xp(n.lineposition,i,r),shadow:Xp(n.shadow,i,r)};t.rowNumber=t.key,t.align=Xp(t.calcdata.cells.align,i,r),t.cellBorderWidth=Xp(t.calcdata.cells.line.width,i,r),t.font=a})}function $Xt(e){e.each(function(t){u$.font(Vc.select(this),t.font)})}function QXt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Vc.select(this);EZe.stroke(r,Xp(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),EZe.fill(r,Xp(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function RZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,u=typeof s=="string",l=u&&s.match(/
/i),f=!u||l;i.mayHaveMarkup=u&&s.match(/[<&>]/);var c=eYt(s);i.latex=c;var h=c?"":Xp(i.calcdata.cells.prefix,a,o)||"",d=c?"":Xp(i.calcdata.cells.suffix,a,o)||"",p=c?null:Xp(i.calcdata.cells.format,a,o)||null,x=h+(p?UXt(p)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!f&&!c&&(b=LZe(x)),i.cellHeightMayIncrease=l||c||i.mayHaveMarkup||(b===void 0?LZe(x):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var y;if(i.wrappingNeeded){var k=Yl.wrapSplitCharacter===" "?x.replace(/i&&n.push(a),i+=u}return n}function v$(e,t,r){var n=DZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=h$(i,i.length),s=n.calcdata.groupHeight-c$(n),u=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),l=iYt(i,u,s);l.length===1&&(l[0]===i.length-1?l.unshift(l[0]-1):l.push(l[0]+1)),l[0]%2&&l.reverse(),t.each(function(f,c){f.page=l[c],f.scrollY=u}),t.attr("transform",function(f){var c=h$(f.rowBlocks,f.page)-f.scrollY;return oy(0,c)}),e&&(PZe(e,r,t,l,n.prevPages,n,0),PZe(e,r,t,l,n.prevPages,n,1),Yk(r,e))}}function Vq(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(c){return o.key===c.key}),u=r||o.scrollbarState.dragMultiplier,l=o.scrollY;o.scrollY=n===void 0?o.scrollY+u*Vc.event.dy:n;var f=s.selectAll("."+Yl.cn.yColumn).selectAll("."+Yl.cn.columnBlock).filter(p$);return v$(e,f,s),o.scrollY===l}}function PZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var u=r.filter(function(l,f){return f===o&&n[f]!==i[f]});f$(e,t,u,r),i[o]=n[o]}))}function nYt(e,t,r,n){return function(){var a=Vc.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(x,b){s[b].width=this.getComputedTextLength()});var u=s[s.length-1].width,l=s.slice(0,-1),f=[],c,h,d=0,p=o.column.columnWidth-2*Yl.cellPad;for(o.value="";l.length;)c=l.shift(),h=c.width+u,d+h>p&&(o.value+=f.join(Yl.wrapSpacer)+Yl.lineBreaker,f=[],d=0),f.push(c.text),d+=h;d&&(o.value+=f.join(Yl.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),RZe(a.select("."+Yl.cn.cellText),r,e,n),Vc.select(t.parentNode.parentNode).call(y$)}}function aYt(e,t,r,n,i){return function(){if(!i.settledY){var o=Vc.select(t.parentNode),s=d$(i),u=i.key-s.firstRowIndex,l=s.rows[u].rowHeight,f=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Yl.cellPad:l,c=Math.max(f,l),h=c-s.rows[u].rowHeight;h&&(s.rows[u].rowHeight=c,e.selectAll("."+Yl.cn.columnCell).call(y$),v$(null,e.filter(p$),0),Yk(r,n,!0)),o.attr("transform",function(){var d=this,p=d.parentNode,x=p.getBoundingClientRect(),b=Vc.select(d.parentNode).select("."+Yl.cn.cellRect).node().getBoundingClientRect(),y=d.transform.baseVal.consolidate(),k=b.top-x.top+(y?y.matrix.f:Yl.cellPad);return oy(FZe(i,Vc.select(d.parentNode).select("."+Yl.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function FZe(e,t){switch(e.align){case"left":return Yl.cellPad;case"right":return e.column.columnWidth-(t||0)-Yl.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Yl.cellPad}}function y$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+Hq(s,1/0)},0),n=d$(t),i=Hq(n,t.key),a=i+r;return oy(0,a)}).selectAll("."+Yl.cn.cellRect).attr("height",function(t){return sYt(d$(t),t.key).rowHeight})}function h$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=oYt(e[n]);return r}function Hq(e,t){for(var r=0,n=0;n{"use strict";var lYt=Dd().getModuleCalcData,uYt=m$(),Gq="table";Wq.name=Gq;Wq.plot=function(e){var t=lYt(e.calcdata,Gq)[0];t.length&&uYt(e,t)};Wq.clean=function(e,t,r,n){var i=n._has&&n._has(Gq),a=t._has&&t._has(Gq);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var NZe=Se((gbr,OZe)=>{"use strict";OZe.exports={attributes:t$(),supplyDefaults:dZe(),calc:vZe(),plot:m$(),moduleType:"trace",name:"table",basePlotModule:BZe(),categories:["noOpacity"],meta:{}}});var VZe=Se((_br,UZe)=>{"use strict";UZe.exports=NZe()});var ZZe=Se((xbr,jZe)=>{"use strict";var HZe=uc(),GZe=Ih(),g$=Rd(),fYt=Gc().descriptionWithDates,cYt=_c().overrideAll,WZe=Id().dash,_$=vu().extendFlat;jZe.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:HZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:g$.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:_$({},g$.labelalias,{editType:"calc"}),tickfont:HZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:fYt("tick label")},tickformatstops:cYt(g$.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:GZe.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:_$({},WZe,{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:_$({},WZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:GZe.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 Zq=Se((bbr,KZe)=>{"use strict";var hYt=uc(),XZe=ZZe(),YZe=Ih(),jq=hYt({editType:"calc"}),dYt=Zc().zorder;jq.family.dflt='"Open Sans", verdana, arial, sans-serif';jq.size.dflt=12;jq.color.dflt=YZe.defaultLine;KZe.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:XZe,baxis:XZe,font:jq,color:{valType:"color",dflt:YZe.defaultLine,editType:"plot"},zorder:dYt}});var QZe=Se((wbr,$Ze)=>{"use strict";var JZe=Zr().isArray1D;$Ze.exports=function(t,r,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||JZe(i))&&(!s||JZe(o))){var u=a?i.length:1/0;s&&(u=Math.min(u,o.length)),r.a&&r.a.length&&(u=Math.min(u,r.a.length)),r.b&&r.b.length&&(u=Math.min(u,r.b.length)),r._length=u}else r._length=null;return!0}});var rXe=Se((Tbr,tXe)=>{"use strict";var pYt=Zq(),eXe=Pl().addOpacity,vYt=Ul(),Kk=Zr(),yYt=xb(),mYt=e_(),gYt=t_(),_Yt=QP(),xYt=gm(),bYt=L3();tXe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=pYt[i+"axis"];function s(v,z){return Kk.coerce(t,r,o,v,z)}function u(v,z){return Kk.coerce2(t,r,o,v,z)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var l=s("type");if(l==="-"&&(n.data&&wYt(r,n.data),r.type==="-"?r.type="linear":l=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,l==="date"){var f=vYt.getComponentMethod("calendars","handleDefaults");f(t,r,"calendar",n.calendar)}xYt(r,n.fullLayout),r.c2p=Kk.identity;var c=s("color",n.dfltColor),h=c===t.color?c:a.color,d=s("title.text");d&&(Kk.coerceFont(s,"title.font",a,{overrideDflt:{size:Kk.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),yYt(t,r,s,l),gYt(t,r,s,l,n),mYt(t,r,s,l,n),_Yt(t,r,s,{data:n.data,dataAttr:i});var x=u("gridcolor",eXe(c,.3)),b=u("gridwidth"),y=u("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var E=u("startlinecolor",c),A=u("startlinewidth",b),L=s("startline",r.showgrid||!!E||!!A);L||(delete r.startlinecolor,delete r.startlinewidth);var _=u("endlinecolor",c),C=u("endlinewidth",b),M=s("endline",r.showgrid||!!_||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",y),s("minorgridcolor",eXe(x,.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 wYt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=bYt(t,a,{autotypenumbers:e.autotypenumbers})}}});var nXe=Se((Abr,iXe)=>{"use strict";var TYt=rXe(),AYt=_f();iXe.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")),SYt(t,r,n,a)};function SYt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},u=AYt.newContainer(t,a),l={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};TYt(s,u,l),u._categories=u._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var sXe=Se((Sbr,oXe)=>{"use strict";var aXe=Zr(),MYt=QZe(),EYt=nXe(),kYt=Zq(),CYt=Ih();oXe.exports=function(t,r,n,i){function a(u,l){return aXe.coerce(t,r,kYt,u,l)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",CYt.defaultLine);if(aXe.coerceFont(a,"font",i.font),a("carpet"),EYt(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=MYt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var x$=Se((Mbr,lXe)=>{"use strict";var LYt=Zr().isArrayOrTypedArray;lXe.exports=function(t,r,n){var i;for(LYt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";uXe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";fXe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),u=a[1]*t.dpdy(n),l=1,f=1;if(o){var c=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])/c/h;f=Math.max(0,d)}var p=Math.atan2(u,s)*180/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(i,r,n),offsetMultplier:f}}});var _Xe=Se((Cbr,gXe)=>{"use strict";var Jq=Nl(),Xq=yu(),Yq=x$(),pXe=b$(),Jk=cXe(),w$=Bf(),Uv=Zr(),vXe=Uv.strRotate,Kq=Uv.strTranslate,yXe=Qh();gXe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,u=t._fullLayout,l=u._clips;Uv.makeTraceGroups(i,n,"trace").each(function(f){var c=Jq.select(this),h=f[0],d=h.trace,p=d.aaxis,x=d.baxis,b=Uv.ensureSingle(c,"g","minorlayer"),y=Uv.ensureSingle(c,"g","majorlayer"),k=Uv.ensureSingle(c,"g","boundarylayer"),E=Uv.ensureSingle(c,"g","labellayer");c.style("opacity",d.opacity),FS(o,s,y,p,"a",p._gridlines,!0,a),FS(o,s,y,x,"b",x._gridlines,!0,a),FS(o,s,b,p,"a",p._minorgridlines,!0,a),FS(o,s,b,x,"b",x._minorgridlines,!0,a),FS(o,s,k,p,"a-boundary",p._boundarylines,a),FS(o,s,k,x,"b-boundary",x._boundarylines,a);var A=hXe(t,o,s,d,h,E,p._labels,"a-label"),L=hXe(t,o,s,d,h,E,x._labels,"b-label");PYt(t,E,d,h,o,s,A,L),zYt(d,h,l,o,s)})};function zYt(e,t,r,n,i){var a,o,s,u,l=r.select("#"+e._clipPathId);l.size()||(l=r.append("clipPath").classed("carpetclip",!0));var f=Uv.ensureSingle(l,"path","carpetboundary"),c=t.clipsegments,h=[];for(u=0;u0?"start":"end","data-notex":1}).call(Xq.font,c.font).text(c.text).call(w$.convertToTspans,e),y=Xq.bBox(this);b.attr("transform",Kq(d.p[0],d.p[1])+vXe(d.angle)+Kq(c.axis.labelpadding*x,y.height*.3)),l=Math.max(l,y.width+c.axis.labelpadding)}),u.exit().remove(),f.maxExtent=l,f}function PYt(e,t,r,n,i,a,o,s){var u,l,f,c,h=Uv.aggNums(Math.min,null,r.a),d=Uv.aggNums(Math.max,null,r.a),p=Uv.aggNums(Math.min,null,r.b),x=Uv.aggNums(Math.max,null,r.b);u=.5*(h+d),l=p,f=r.ab2xy(u,l,!0),c=r.dxyda_rough(u,l),o.angle===void 0&&Uv.extendFlat(o,Jk(r,i,a,f,r.dxydb_rough(u,l))),dXe(e,t,r,n,f,c,r.aaxis,i,a,o,"a-title"),u=h,l=.5*(p+x),f=r.ab2xy(u,l,!0),c=r.dxydb_rough(u,l),s.angle===void 0&&Uv.extendFlat(s,Jk(r,i,a,f,r.dxyda_rough(u,l))),dXe(e,t,r,n,f,c,r.baxis,i,a,s,"b-title")}var mXe=yXe.LINE_SPACING,IYt=(1-yXe.MID_SHIFT)/mXe+1;function dXe(e,t,r,n,i,a,o,s,u,l,f){var c=[];o.title.text&&c.push(o.title.text);var h=t.selectAll("text."+f).data(c),d=l.maxExtent;h.enter().append("text").classed(f,!0),h.each(function(){var p=Jk(r,s,u,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var x=o.title.font.size;d+=x+o.title.offset;var b=l.angle+(l.flip<0?180:0),y=(b-p.angle+450)%360,k=y>90&&y<270,E=Jq.select(this);E.text(o.title.text).call(w$.convertToTspans,e),k&&(d=(-w$.lineCount(E)+IYt)*mXe*x-d),E.attr("transform",Kq(p.p[0],p.p[1])+vXe(p.angle)+Kq(0,d)).attr("text-anchor","middle").call(Xq.font,o.title.font)}),h.exit().remove()}});var bXe=Se((Lbr,xXe)=>{"use strict";var $q=Zr().isArrayOrTypedArray;xXe.exports=function(e,t,r){var n,i,a,o,s,u,l=[],f=$q(e)?e.length:e,c=$q(t)?t.length:t,h=$q(e)?e:null,d=$q(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(f-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(c-1));var p,x=1/0,b=-1/0;for(i=0;i{"use strict";var wXe=Zr().isArrayOrTypedArray;AXe.exports=function(e){return TXe(e,0)};function TXe(e,t){if(!wXe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var DYt=hu(),Ex=vu().extendFlat;MXe.exports=function(t,r,n){var i,a,o,s,u,l,f,c,h,d,p,x,b,y,k=t["_"+r],E=t[r+"axis"],A=E._gridlines=[],L=E._minorgridlines=[],_=E._boundarylines=[],C=t["_"+n],M=t[n+"axis"];E.tickmode==="array"&&(E.tickvals=k.slice());var v=t._xctrl,z=t._yctrl,T=v[0].length,F=v.length,q=t._a.length,U=t._b.length;DYt.prepTicks(E),E.tickmode==="array"&&delete E.tickvals;var H=E.smoothing?3:1;function j(O){var W,re,ne,be,ze,Ce,he,te,ke,Ee,Me,Oe,Re=[],me=[],Be={};if(r==="b")for(re=t.b2j(O),ne=Math.floor(Math.max(0,Math.min(U-2,re))),be=re-ne,Be.length=U,Be.crossLength=q,Be.xy=function(fe){return t.evalxy([],fe,re)},Be.dxy=function(fe,Ze){return t.dxydi([],fe,ne,Ze,be)},W=0;W0&&(ke=t.dxydi([],W-1,ne,0,be),Re.push(ze[0]+ke[0]/3),me.push(ze[1]+ke[1]/3),Ee=t.dxydi([],W-1,ne,1,be),Re.push(te[0]-Ee[0]/3),me.push(te[1]-Ee[1]/3)),Re.push(te[0]),me.push(te[1]),ze=te;else for(W=t.a2i(O),Ce=Math.floor(Math.max(0,Math.min(q-2,W))),he=W-Ce,Be.length=q,Be.crossLength=U,Be.xy=function(fe){return t.evalxy([],W,fe)},Be.dxy=function(fe,Ze){return t.dxydj([],Ce,fe,he,Ze)},re=0;re0&&(Me=t.dxydj([],Ce,re-1,he,0),Re.push(ze[0]+Me[0]/3),me.push(ze[1]+Me[1]/3),Oe=t.dxydj([],Ce,re-1,he,1),Re.push(te[0]-Oe[0]/3),me.push(te[1]-Oe[1]/3)),Re.push(te[0]),me.push(te[1]),ze=te;return Be.axisLetter=r,Be.axis=E,Be.crossAxis=M,Be.value=O,Be.constvar=n,Be.index=c,Be.x=Re,Be.y=me,Be.smoothing=M.smoothing,Be}function G(O){var W,re,ne,be,ze,Ce=[],he=[],te={};if(te.length=k.length,te.crossLength=C.length,r==="b")for(ne=Math.max(0,Math.min(U-2,O)),ze=Math.min(1,Math.max(0,O-ne)),te.xy=function(ke){return t.evalxy([],ke,O)},te.dxy=function(ke,Ee){return t.dxydi([],ke,ne,Ee,ze)},W=0;Wk.length-1)&&A.push(Ex(G(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(c=l;ck.length-1)&&!(p<0||p>k.length-1))for(x=k[o],b=k[p],i=0;ik[k.length-1])&&L.push(Ex(j(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&_.push(Ex(G(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&_.push(Ex(G(k.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(s=5e-15,u=[Math.floor((k[k.length-1]-E.tick0)/E.dtick*(1+s)),Math.ceil((k[0]-E.tick0)/E.dtick/(1+s))].sort(function(O,W){return O-W}),l=u[0],f=u[1],c=l;c<=f;c++)h=E.tick0+E.dtick*c,A.push(Ex(j(h),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(c=l-1;ck[k.length-1])&&L.push(Ex(j(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&_.push(Ex(j(k[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&_.push(Ex(j(k[k.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}});var zXe=Se((Ibr,LXe)=>{"use strict";var kXe=hu(),CXe=vu().extendFlat;LXe.exports=function(t,r){var n,i,a,o,s,u=r._labels=[],l=r._gridlines;for(n=0;n{"use strict";PXe.exports=function(t,r,n,i){var a,o,s,u=[],l=!!n.smoothing,f=!!i.smoothing,c=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=c;a++)o[a]=t[0][a],s[a]=r[0][a];for(u.push({x:o,y:s,bicubic:l}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][c],s[a]=r[a][c];for(u.push({x:o,y:s,bicubic:f}),a=c,o=[],s=[];a>=0;a--)o[c-a]=t[h][a],s[c-a]=r[h][a];for(u.push({x:o,y:s,bicubic:l}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return u.push({x:o,y:s,bicubic:f}),u}});var RXe=Se((Rbr,DXe)=>{"use strict";var RYt=Zr();DXe.exports=function(t,r,n){var i,a,o,s=[],u=[],l=t[0].length,f=t.length;function c(ne,be){var ze=0,Ce,he=0;return ne>0&&(Ce=t[be][ne-1])!==void 0&&(he++,ze+=Ce),ne0&&(Ce=t[be-1][ne])!==void 0&&(he++,ze+=Ce),be0&&a0&&iM);return RYt.log("Smoother converged to",v,"after",T,"iterations"),t}});var qXe=Se((Fbr,FXe)=>{"use strict";FXe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var NXe=Se((qbr,OXe)=>{"use strict";var BXe=.5;OXe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],u=n[1]-r[1],l=Math.pow(a*a+o*o,BXe/2),f=Math.pow(s*s+u*u,BXe/2),c=(f*f*a-l*l*s)*i,h=(f*f*o-l*l*u)*i,d=f*(l+f)*3,p=l*(l+f)*3;return[[r[0]+(d&&c/d),r[1]+(d&&h/d)],[r[0]-(p&&c/p),r[1]-(p&&h/p)]]}});var VXe=Se((Bbr,UXe)=>{"use strict";var T$=NXe(),Qq=Zr().ensureArray;function qS(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]}UXe.exports=function(t,r,n,i,a,o){var s,u,l,f,c,h,d,p,x,b,y=n[0].length,k=n.length,E=a?3*y-2:y,A=o?3*k-2:k;for(t=Qq(t,A),r=Qq(r,A),l=0;l{"use strict";HXe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,u,l){s||(s=[]);var f,c,h,d,p,x,b=Math.max(0,Math.min(Math.floor(u),a)),y=Math.max(0,Math.min(Math.floor(l),o)),k=Math.max(0,Math.min(1,u-b)),E=Math.max(0,Math.min(1,l-y));b*=3,y*=3;var A=k*k,L=A*k,_=1-k,C=_*_,M=C*_,v=E*E,z=v*E,T=1-E,F=T*T,q=F*T;for(x=0;x{"use strict";WXe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3,a*=3;var p=o*o,x=1-o,b=x*x,y=x*o*2,k=-3*b,E=3*(b-y),A=3*(y-p),L=3*p,_=s*s,C=_*s,M=1-s,v=M*M,z=v*M;for(d=0;d{"use strict";ZXe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var u,l,f,c,h,d;i*=3,a*=3;var p=o*o,x=p*o,b=1-o,y=b*b,k=y*b,E=s*s,A=1-s,L=A*A,_=A*s*2,C=-3*L,M=3*(L-_),v=3*(_-E),z=3*E;for(d=0;d{"use strict";var YXe=qXe(),KXe=EL().findBin,FYt=VXe(),qYt=GXe(),BYt=jXe(),OYt=XXe();JXe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,u=r[0],l=r[i-1],f=n[0],c=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],p=h*YXe.RELATIVE_CULL_TOLERANCE,x=d*YXe.RELATIVE_CULL_TOLERANCE;u-=p,l+=p,f-=x,c+=x,t.isVisible=function(b,y){return b>u&&bf&&yl||yc},t.setScale=function(){var b=t._x,y=t._y,k=FYt(t._xctrl,t._yctrl,b,y,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=qYt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=BYt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=OYt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var y=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-y;return(1-k)*r[y]+k*r[y+1]},t.j2b=function(b){var y=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-y;return(1-k)*n[y]+k*n[y+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var y=Math.max(0,Math.min(KXe(b,r),i-2)),k=r[y],E=r[y+1];return Math.max(0,Math.min(i-1,y+(b-k)/(E-k)))},t.b2j=function(b){var y=Math.max(0,Math.min(KXe(b,n),a-2)),k=n[y],E=n[y+1];return Math.max(0,Math.min(a-1,y+(b-k)/(E-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,y){return t.evalxy([],b,y)},t.ab2xy=function(b,y,k){if(!k&&(br[i-1]|yn[a-1]))return[!1,!1];var E=t.a2i(b),A=t.b2j(y),L=t.evalxy([],E,A);if(k){var _=0,C=0,M=[],v,z,T,F;br[i-1]?(v=i-2,z=1,_=(b-r[i-1])/(r[i-1]-r[i-2])):(v=Math.max(0,Math.min(i-2,Math.floor(E))),z=E-v),yn[a-1]?(T=a-2,F=1,C=(y-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(A))),F=A-T),_&&(t.dxydi(M,v,T,z,F),L[0]+=M[0]*_,L[1]+=M[1]*_),C&&(t.dxydj(M,v,T,z,F),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,y,k){return[y.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,y,k){return[y.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var y=Math.max(0,Math.min(r.length-2,b));return r[y+1]-r[y]},t.dbdj=function(b){var y=Math.max(0,Math.min(n.length-2,b));return n[y+1]-n[y]},t.dxyda=function(b,y,k,E){var A=t.dxydi(null,b,y,k,E),L=t.dadi(b,k);return[A[0]/L,A[1]/L]},t.dxydb=function(b,y,k,E){var A=t.dxydj(null,b,y,k,E),L=t.dbdj(y,E);return[A[0]/L,A[1]/L]},t.dxyda_rough=function(b,y,k){var E=h*(k||.1),A=t.ab2xy(b+E,y,!0),L=t.ab2xy(b-E,y,!0);return[(A[0]-L[0])*.5/E,(A[1]-L[1])*.5/E]},t.dxydb_rough=function(b,y,k){var E=d*(k||.1),A=t.ab2xy(b,y+E,!0),L=t.ab2xy(b,y-E,!0);return[(A[0]-L[0])*.5/E,(A[1]-L[1])*.5/E]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var oYe=Se((Hbr,aYe)=>{"use strict";var e8=hu(),QXe=Zr().isArray1D,NYt=bXe(),eYe=SXe(),tYe=EXe(),rYe=zXe(),UYt=IXe(),iYe=$I(),nYe=RXe(),VYt=KI(),HYt=$Xe();aYe.exports=function(t,r){var n=e8.getFromId(t,r.xaxis),i=e8.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,u=r.y,l=[];s&&QXe(s)&&l.push("x"),u&&QXe(u)&&l.push("y"),l.length&&VYt(r,a,o,"a","b",l);var f=r._a=r._a||r.a,c=r._b=r._b||r.b;s=r._x||r.x,u=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?f.length:f,p=o.cheatertype==="index"?c.length:c;s=NYt(d,p,r.cheaterslope)}r._x=s=iYe(s),r._y=u=iYe(u),nYe(s,f,c),nYe(u,f,c),HYt(r),r.setScale();var x=eYe(s),b=eYe(u),y=.5*(x[1]-x[0]),k=.5*(x[1]+x[0]),E=.5*(b[1]-b[0]),A=.5*(b[1]+b[0]),L=1.3;return x=[k-y*L,k+y*L],b=[A-E*L,A+E*L],r._extremes[n._id]=e8.findExtremes(n,x,{padded:!0}),r._extremes[i._id]=e8.findExtremes(i,b,{padded:!0}),tYe(r,"a","b"),tYe(r,"b","a"),rYe(r,a),rYe(r,o),h.clipsegments=UYt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=u,h.a=f,h.b=c,[h]}});var lYe=Se((Gbr,sYe)=>{"use strict";sYe.exports={attributes:Zq(),supplyDefaults:sXe(),plot:_Xe(),calc:oYe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Th(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var fYe=Se((Wbr,uYe)=>{"use strict";uYe.exports=lYe()});var A$=Se((jbr,hYe)=>{"use strict";var GYt=Ey(),u0=Zc(),WYt=zf(),jYt=Du().hovertemplateAttrs,ZYt=Du().texttemplateAttrs,cYe=Xf(),kx=vu().extendFlat,sy=u0.marker,BS=u0.line,XYt=sy.line;hYe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:kx({},u0.mode,{dflt:"markers"}),text:kx({},u0.text,{}),texttemplate:ZYt({editType:"plot"},{keys:["a","b","text"]}),hovertext:kx({},u0.hovertext,{}),line:{color:BS.color,width:BS.width,dash:BS.dash,backoff:BS.backoff,shape:kx({},BS.shape,{values:["linear","spline"]}),smoothing:BS.smoothing,editType:"calc"},connectgaps:u0.connectgaps,fill:kx({},u0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:GYt(),marker:kx({symbol:sy.symbol,opacity:sy.opacity,maxdisplayed:sy.maxdisplayed,angle:sy.angle,angleref:sy.angleref,standoff:sy.standoff,size:sy.size,sizeref:sy.sizeref,sizemin:sy.sizemin,sizemode:sy.sizemode,line:kx({width:XYt.width,editType:"calc"},cYe("marker.line")),gradient:sy.gradient,editType:"calc"},cYe("marker")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:kx({},WYt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:u0.hoveron,hovertemplate:jYt(),zorder:u0.zorder}});var yYe=Se((Zbr,vYe)=>{"use strict";var dYe=Zr(),YYt=Sm(),OS=ec(),KYt=$v(),JYt=I0(),pYe=J3(),$Yt=D0(),QYt=Py(),eKt=A$();vYe.exports=function(t,r,n,i){function a(h,d){return dYe.coerce(t,r,eKt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),u=Math.min(o.length,s.length);if(!u){r.visible=!1;return}r._length=u,a("text"),a("texttemplate"),a("hovertext");var l=u{"use strict";mYe.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,u=Math.floor(a[1]),l=a[1]-u,f=i.evalxy([],o,u,s,l);return n.yLabel=f[1].toFixed(3),n}});var t8=Se((Ybr,_Ye)=>{"use strict";_Ye.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var xYe=_u(),tKt=R0(),rKt=km(),iKt=F0(),nKt=q0().calcMarkerSize,aKt=t8();bYe.exports=function(t,r){var n=r._carpetTrace=aKt(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,u,l=!1;for(i=0;i{"use strict";var oKt=iT(),TYe=hu(),sKt=yu();AYe.exports=function(t,r,n,i){var a,o,s,u=n[0][0].carpet,l=TYe.getFromId(t,u.xaxis||"x"),f=TYe.getFromId(t,u.yaxis||"y"),c={xaxis:l,yaxis:f,plot:r.plot};for(a=0;a{"use strict";var lKt=sT(),uKt=Zr().fillText;MYe.exports=function(t,r,n,i){var a=lKt(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,u=t.xa._length,l=u*s/2,f=u-l;return o.x0=Math.max(Math.min(o.x0,f),l),o.x1=Math.max(Math.min(o.x1,f),l),a}var c=o.cd[o.index];o.a=c.a,o.b=c.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,p=h._module.formatLabels(c,h);o.yLabel=p.yLabel,delete o.text;var x=[];function b(E,A){var L;E.labelprefix&&E.labelprefix.length>0?L=E.labelprefix.replace(/ = $/,""):L=E._hovertitle,x.push(L+": "+A.toFixed(3)+E.labelsuffix)}if(!h.hovertemplate){var y=c.hi||h.hoverinfo,k=y.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,c.a),k.indexOf("b")!==-1&&b(d.baxis,c.b),x.push("y: "+o.yLabel),k.indexOf("text")!==-1&&uKt(c,h,x),o.extraText=x.join("
")}return a}});var CYe=Se((Qbr,kYe)=>{"use strict";kYe.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 zYe=Se((e2r,LYe)=>{"use strict";LYe.exports={attributes:A$(),supplyDefaults:yYe(),colorbar:ep(),formatLabels:gYe(),calc:wYe(),plot:SYe(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:EYe(),selectPoints:lT(),eventData:CYe(),moduleType:"trace",name:"scattercarpet",basePlotModule:Th(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var IYe=Se((t2r,PYe)=>{"use strict";PYe.exports=zYe()});var S$=Se((r2r,DYe)=>{"use strict";var ly=ET(),y1=T4(),fKt=Xf(),cKt=vu().extendFlat,tg=y1.contours;DYe.exports=cKt({carpet:{valType:"string",editType:"calc"},z:ly.z,a:ly.x,a0:ly.x0,da:ly.dx,b:ly.y,b0:ly.y0,db:ly.dy,text:ly.text,hovertext:ly.hovertext,transpose:ly.transpose,atype:ly.xtype,btype:ly.ytype,fillcolor:y1.fillcolor,autocontour:y1.autocontour,ncontours:y1.ncontours,contours:{type:tg.type,start:tg.start,end:tg.end,size:tg.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:tg.showlines,showlabels:tg.showlabels,labelfont:tg.labelfont,labelformat:tg.labelformat,operation:tg.operation,value:tg.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:y1.line.color,width:y1.line.width,dash:y1.line.dash,smoothing:y1.line.smoothing,editType:"plot"},zorder:y1.zorder},fKt("",{cLetter:"z",autoColorDflt:!1}))});var M$=Se((i2r,qYe)=>{"use strict";var RYe=Zr(),hKt=ZI(),FYe=S$(),dKt=kH(),pKt=mD(),vKt=gD();qYe.exports=function(t,r,n,i){function a(l,f){return RYe.coerce(t,r,FYe,l,f)}function o(l){return RYe.coerce2(t,r,FYe,l)}if(a("carpet"),t.a&&t.b){var s=hKt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var u=a("contours.type")==="constraint";u?dKt(t,r,a,i,n,{hasHover:!1}):(pKt(t,r,a,o),vKt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var UYe=Se((n2r,NYe)=>{"use strict";var yKt=Rp(),BYe=Zr(),mKt=KI(),gKt=$I(),_Kt=QI(),xKt=eD(),OYe=$V(),bKt=M$(),wKt=t8(),TKt=yH();NYe.exports=function(t,r){var n=r._carpetTrace=wKt(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),bKt(a,r,r._defaultColor,t._fullLayout)}var o=AKt(t,r);return TKt(r,r._z),o}};function AKt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,u,l,f,c;n._minDtick=0,i._minDtick=0,BYe.isArray1D(t.z)&&mKt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,u=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],u=u?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,l=t.b0||0,f=t.db||1,c=t._z=gKt(t._z||t.z,t.transpose),t._emptypoints=xKt(c),_Kt(c,t._emptypoints);var h=BYe.maxRowLength(c),d=t.xtype==="scaled"?"":a,p=OYe(t,d,o,s,h,n),x=t.ytype==="scaled"?"":u,b=OYe(t,x,l,f,c.length,i),y={a:p,b,z:c};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&yKt(e,t,{vals:c,containerStr:"",cLetter:"z"}),[y]}});var HYe=Se((a2r,VYe)=>{"use strict";var SKt=Zr().isArrayOrTypedArray;VYe.exports=function(e,t,r,n){var i,a,o,s,u,l,f,c,h,d,p,x,b,y=SKt(r)?"a":"b",k=y==="a"?e.aaxis:e.baxis,E=k.smoothing,A=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,_=y==="a"?n:r,C=y==="a"?t.a.length:t.b.length,M=y==="a"?t.b.length:t.a.length,v=Math.floor(y==="a"?e.b2j(_):e.a2i(_)),z=y==="a"?function(be){return e.evalxy([],be,v)}:function(be){return e.evalxy([],v,be)};E&&(o=Math.max(0,Math.min(M-2,v)),s=v-o,a=y==="a"?function(be,ze){return e.dxydi([],be,o,ze,s)}:function(be,ze){return e.dxydj([],o,be,s,ze)});var T=A(L[0]),F=A(L[1]),q=T0?Math.floor:Math.ceil,j=q>0?Math.ceil:Math.floor,G=q>0?Math.min:Math.max,O=q>0?Math.max:Math.min,W=H(T+U),re=j(F-U);f=z(T);var ne=[[f]];for(i=W;i*q{"use strict";var i8=Nl(),n8=x$(),XYe=b$(),$k=yu(),m1=Zr(),MKt=gH(),EKt=_H(),hw=bD(),r8=S4(),kKt=TH(),CKt=wH(),LKt=AH(),zKt=t8(),GYe=HYe();YYe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,"contour").each(function(s){var u=i8.select(this),l=s[0],f=l.trace,c=f._carpetTrace=zKt(t,f),h=t.calcdata[c.index][0];if(!c.visible||c.visible==="legendonly")return;var d=l.a,p=l.b,x=f.contours,b=CKt(x,r,l),y=x.type==="constraint",k=x._operation,E=y?k==="="?"lines":"fill":x.coloring;function A(H){var j=c.ab2xy(H[0],H[1],!0);return[a.c2p(j[0]),o.c2p(j[1])]}var L=[[d[0],p[p.length-1]],[d[d.length-1],p[p.length-1]],[d[d.length-1],p[0]],[d[0],p[0]]];MKt(b);var _=(d[d.length-1]-d[0])*1e-8,C=(p[p.length-1]-p[0])*1e-8;EKt(b,_,C);var M=b;x.type==="constraint"&&(M=kKt(b,k)),PKt(b,A);var v,z,T,F,q=[];for(F=h.clipsegments.length-1;F>=0;F--)v=h.clipsegments[F],z=n8([],v.x,a.c2p),T=n8([],v.y,o.c2p),z.reverse(),T.reverse(),q.push(XYe(z,T,v.bicubic));var U="M"+q.join("L")+"Z";RKt(u,h.clipsegments,a,o,y,E),FKt(f,u,a,o,M,L,A,c,h,E,U),IKt(u,b,t,l,x,r,c),$k.setClipUrl(u,c._clipPathId,t)})};function PKt(e,t){var r,n,i,a,o,s,u,l,f;for(r=0;rb&&(n.max=b),n.len=n.max-n.min}function WYe(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 jYe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function ZYe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function RKt(e,t,r,n,i,a){var o,s,u,l,f=m1.ensureSingle(e,"g","contourbg"),c=f.selectAll("path").data(a==="fill"&&!i?[0]:[]);c.enter().append("path"),c.exit().remove();var h=[];for(l=0;l=0&&(d=z,x=b):Math.abs(h[1]-d[1])=0&&(d=z,x=b):m1.log("endpt to newendpt is not vert. or horz.",h,d,z)}if(x>=0)break;l+=M(h,d),h=d}if(x===t.edgepaths.length){m1.log("unclosed perimeter path");break}u=x,c=f.indexOf(u)===-1,c&&(u=f[0],l+=M(h,d)+"Z",h=null)}for(u=0;u{"use strict";JYe.exports={attributes:S$(),supplyDefaults:M$(),colorbar:AD(),calc:UYe(),plot:KYe(),style:TD(),moduleType:"trace",name:"contourcarpet",basePlotModule:Th(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var eKe=Se((l2r,QYe)=>{"use strict";QYe.exports=$Ye()});var o8=Se((u2r,aKe)=>{"use strict";var a8=Zr().extendFlat,Qk=Zc(),tKe=Gc().axisHoverFormat,iKe=Id().dash,BKt=i3(),nKe=HT(),OKt=nKe.INCREASING.COLOR,NKt=nKe.DECREASING.COLOR,E$=Qk.line;function rKe(e){return{line:{color:a8({},E$.color,{dflt:e}),width:E$.width,dash:iKe,editType:"style"},editType:"style"}}aKe.exports={xperiod:Qk.xperiod,xperiod0:Qk.xperiod0,xperiodalignment:Qk.xperiodalignment,xhoverformat:tKe("x"),yhoverformat:tKe("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:a8({},E$.width,{}),dash:a8({},iKe,{}),editType:"style"},increasing:rKe(OKt),decreasing:rKe(NKt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:a8({},BKt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:Qk.zorder}});var k$=Se((f2r,oKe)=>{"use strict";var UKt=Ul(),VKt=Zr();oKe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),u=n("low"),l=n("close");n("hoverlabel.split");var f=UKt.getComponentMethod("calendars","handleTraceDefaults");if(f(t,r,["x"],i),!!(o&&s&&u&&l)){var c=Math.min(o.length,s.length,u.length,l.length);return a&&(c=Math.min(c,VKt.minRowLength(a))),r._length=c,c}}});var uKe=Se((c2r,lKe)=>{"use strict";var HKt=Zr(),GKt=k$(),WKt=zy(),jKt=o8();lKe.exports=function(t,r,n,i){function a(s,u){return HKt.coerce(t,r,jKt,s,u)}var o=GKt(t,r,a,i);if(!o){r.visible=!1;return}WKt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),sKe(t,r,a,"increasing"),sKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function sKe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var C$=Se((h2r,cKe)=>{"use strict";var NS=Zr(),s8=NS._,l8=hu(),ZKt=Iy(),eC=ju().BADNUM;function XKt(e,t){var r=l8.getFromId(e,t.xaxis),n=l8.getFromId(e,t.yaxis),i=KKt(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var u=fKe(e,t,o,s,n,YKt);return t._extremes[r._id]=l8.findExtremes(r,s,{vpad:a/2}),u.length?(NS.extendFlat(u[0].t,{wHover:a/2,tickLen:i}),u):[{t:{empty:!0}}]}function YKt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function fKe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),u=i.makeCalcdata(t,"low"),l=i.makeCalcdata(t,"close"),f=NS.isArrayOrTypedArray(t.text),c=NS.isArrayOrTypedArray(t.hovertext),h=!0,d=null,p=!!t.xperiodalignment,x=[],b=0;bd):h=L>k,d=L;var _=a(k,E,A,L);_.pos=y,_.yc=(k+L)/2,_.i=b,_.dir=h?"increasing":"decreasing",_.x=_.pos,_.y=[A,E],p&&(_.orig_p=r[b]),f&&(_.tx=t.text[b]),c&&(_.htx=t.hovertext[b]),x.push(_)}else x.push({pos:y,empty:!0})}return t._extremes[i._id]=l8.findExtremes(i,NS.concat(u,s),{padded:!0}),x.length&&(x[0].t={labels:{open:s8(e,"open:")+" ",high:s8(e,"high:")+" ",low:s8(e,"low:")+" ",close:s8(e,"close:")+" "}}),x}function KKt(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 JKt=Nl(),hKe=Zr();dKe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;hKe.makeTraceGroups(i,n,"trace ohlc").each(function(u){var l=JKt.select(this),f=u[0],c=f.t,h=f.trace;if(h.visible!==!0||c.empty){l.remove();return}var d=c.tickLen,p=l.selectAll("path").data(hKe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(x){if(x.empty)return"M0,0Z";var b=o.c2p(x.pos-d,!0),y=o.c2p(x.pos+d,!0),k=s?(b+y)/2:o.c2p(x.pos,!0),E=a.c2p(x.o,!0),A=a.c2p(x.h,!0),L=a.c2p(x.l,!0),_=a.c2p(x.c,!0);return"M"+b+","+E+"H"+k+"M"+k+","+A+"V"+L+"M"+y+","+_+"H"+k})})}});var yKe=Se((p2r,vKe)=>{"use strict";var L$=Nl(),$Kt=yu(),QKt=Pl();vKe.exports=function(t,r,n){var i=n||L$.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;L$.select(this).selectAll("path").each(function(s){if(!s.empty){var u=o[s.dir].line;L$.select(this).style("fill","none").call(QKt.stroke,u.color).call($Kt.dashLine,u.dash,u.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var P$=Se((v2r,bKe)=>{"use strict";var z$=hu(),eJt=Zr(),u8=jc(),tJt=Pl(),rJt=Zr().fillText,mKe=HT(),iJt={increasing:mKe.INCREASING.SYMBOL,decreasing:mKe.DECREASING.SYMBOL};function nJt(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?_Ke(e,t,r,n):xKe(e,t,r,n)}function gKe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,u=o.type,l=u==="ohlc"?"l":"min",f=u==="ohlc"?"h":"max",c,h,d=s.bPos||0,p=function(z){return z.pos+d-t},x=s.bdPos||s.tickLen,b=s.wHover,y=Math.min(1,x/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));c=e.maxHoverDistance-y,h=e.maxSpikeDistance-y;function k(z){var T=p(z);return u8.inbox(T-b,T+b,c)}function E(z){var T=z[l],F=z[f];return T===F||u8.inbox(T-r,F-r,c)}function A(z){return(k(z)+E(z))/2}var L=u8.getDistanceFunction(n,k,E,A);if(u8.getClosest(i,L,e),e.index===!1)return null;var _=i[e.index];if(_.empty)return null;var C=_.dir,M=o[C],v=M.line.color;return tJt.opacity(v)&&M.line.width?e.color=v:e.color=M.fillcolor,e.x0=a.c2p(_.pos+d-x,!0),e.x1=a.c2p(_.pos+d+x,!0),e.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,e.spikeDistance=A(_)*h/c,e.xSpike=a.c2p(_.pos,!0),e}function _Ke(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,u=[],l=gKe(e,t,r,n);if(!l)return[];var f=l.index,c=i[f],h=c.hi||o.hoverinfo,d=h.split("+"),p=h==="all",x=p||d.indexOf("y")!==-1;if(!x)return[];for(var b=["high","open","close","low"],y={},k=0;k"+s.labels[E]+z$.hoverLabelText(a,A,o.yhoverformat)):(_=eJt.extendFlat({},l),_.y0=_.y1=L,_.yLabelVal=A,_.yLabel=s.labels[E]+z$.hoverLabelText(a,A,o.yhoverformat),_.name="",u.push(_),y[A]=_)}return u}function xKe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,u=gKe(e,t,r,n);if(!u)return[];var l=u.index,f=i[l],c=u.index=f.i,h=f.dir;function d(A){return s.labels[A]+z$.hoverLabelText(a,o[A][c],o.yhoverformat)}var p=f.hi||o.hoverinfo,x=p.split("+"),b=p==="all",y=b||x.indexOf("y")!==-1,k=b||x.indexOf("text")!==-1,E=y?[d("open"),d("high"),d("low"),d("close")+" "+iJt[h]]:[];return k&&rJt(f,o,E),u.extraText=E.join("
"),u.y0=u.y1=a.c2p(f.yc,!0),[u]}bKe.exports={hoverPoints:nJt,hoverSplit:_Ke,hoverOnPoints:xKe}});var I$=Se((y2r,wKe)=>{"use strict";wKe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,u=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";TKe.exports={moduleType:"trace",name:"ohlc",basePlotModule:Th(),categories:["cartesian","svg","showLegend"],meta:{},attributes:o8(),supplyDefaults:uKe(),calc:C$().calc,plot:pKe(),style:yKe(),hoverPoints:P$().hoverPoints,selectPoints:I$()}});var MKe=Se((g2r,SKe)=>{"use strict";SKe.exports=AKe()});var R$=Se((_2r,CKe)=>{"use strict";var D$=Zr().extendFlat,EKe=Gc().axisHoverFormat,f0=o8(),US=p4();function kKe(e){return{line:{color:D$({},US.line.color,{dflt:e}),width:US.line.width,editType:"style"},fillcolor:US.fillcolor,editType:"style"}}CKe.exports={xperiod:f0.xperiod,xperiod0:f0.xperiod0,xperiodalignment:f0.xperiodalignment,xhoverformat:EKe("x"),yhoverformat:EKe("y"),x:f0.x,open:f0.open,high:f0.high,low:f0.low,close:f0.close,line:{width:D$({},US.line.width,{}),editType:"style"},increasing:kKe(f0.increasing.line.color.dflt),decreasing:kKe(f0.decreasing.line.color.dflt),text:f0.text,hovertext:f0.hovertext,whiskerwidth:D$({},US.whiskerwidth,{dflt:0}),hoverlabel:f0.hoverlabel,zorder:US.zorder}});var PKe=Se((x2r,zKe)=>{"use strict";var aJt=Zr(),oJt=Pl(),sJt=k$(),lJt=zy(),uJt=R$();zKe.exports=function(t,r,n,i){function a(s,u){return aJt.coerce(t,r,uJt,s,u)}var o=sJt(t,r,a,i);if(!o){r.visible=!1;return}lJt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),LKe(t,r,a,"increasing"),LKe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function LKe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",oJt.addOpacity(i,.5))}});var FKe=Se((b2r,RKe)=>{"use strict";var IKe=Zr(),DKe=hu(),fJt=Iy(),cJt=C$().calcCommon;RKe.exports=function(e,t){var r=e._fullLayout,n=DKe.getFromId(e,t.xaxis),i=DKe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=fJt(t,n,"x",a).vals,s=cJt(e,t,a,o,i,hJt);return s.length?(IKe.extendFlat(s[0].t,{num:r._numBoxes,dPos:IKe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function hJt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var BKe=Se((w2r,qKe)=>{"use strict";qKe.exports={moduleType:"trace",name:"candlestick",basePlotModule:Th(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:R$(),layoutAttributes:v4(),supplyLayoutDefaults:UI().supplyLayoutDefaults,crossTraceCalc:HI().crossTraceCalc,supplyDefaults:PKe(),calc:FKe(),plot:GI().plot,layerName:"boxlayer",style:WI().style,hoverPoints:P$().hoverPoints,selectPoints:I$()}});var NKe=Se((T2r,OKe)=>{"use strict";OKe.exports=BKe()});var q$=Se((A2r,UKe)=>{"use strict";var c8=Zr(),dJt=gm(),f8=c8.deg2rad,F$=c8.rad2deg;UKe.exports=function(t,r,n){switch(dJt(t,n),t._id){case"x":case"radialaxis":pJt(t,r);break;case"angularaxis":mJt(t,r);break}};function pJt(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,u=n>i?function(l){return l<=0}:function(l){return l>=0};e.c2g=function(l){var f=e.c2l(l)-n;return(u(f)?f:0)+s},e.g2c=function(l){return e.l2c(l+n-s)},e.g2p=function(l){return l*o},e.c2p=function(l){return e.g2p(e.c2g(l))}}}function vJt(e,t){return t==="degrees"?f8(e):e}function yJt(e,t){return t==="degrees"?F$(e):e}function mJt(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return vJt(n(a),o)},e.c2d=function(a,o){return i(yJt(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],u=a._length,l,f,c=function(b){return e.d2c(b,a.thetaunit)};if(s)for(l=new Array(u),f=0;f{"use strict";VKe.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 p8=Se((M2r,ZKe)=>{"use strict";var dw=Zr(),HKe=w5().tester,B$=dw.findIndexOfMin,WKe=dw.isAngleInsideSector,gJt=dw.angleDelta,GKe=dw.angleDist;function _Jt(e,t,r,n,i){if(!WKe(t,n))return!1;var a,o;r[0]0?o:1/0},n=B$(t,r),i=dw.mod(n+1,t.length);return[t[n],t[i]]}function d8(e){return Math.abs(e)>1e-10?e:0}function O$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function XKe(e){return e<0?-1:e>0?1:0}function HS(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 GS(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function YKe(e,t){return t*e.radius}function EJt(e,t,r,n){var i=GS(e,HS([r,t])),a=i[0],o=i[1],s=GS(e,HS([n,t])),u=s[0],l=s[1];if(t===0)return["M"+a+","+o,"L"+u+","+l].join(" ");var f=YKe(e,1/Math.abs(t));return["M"+a+","+o,"A"+f+","+f+" 0 0,"+(t<0?1:0)+" "+u+","+l].join(" ")}function kJt(e,t,r,n){var i=YKe(e,1/(t+1)),a=GS(e,HS([t,r])),o=a[0],s=a[1],u=GS(e,HS([t,n])),l=u[0],f=u[1];if(XKe(r)!==XKe(n)){var c=GS(e,HS([t,0])),h=c[0],d=c[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var pw=Nl(),CJt=cd(),yw=Ul(),Fc=Zr(),rg=Fc.strRotate,bd=Fc.strTranslate,U$=Pl(),tC=yu(),LJt=Sc(),dv=hu(),zJt=gm(),PJt=q$(),IJt=wy().doAutoRange,g1=G7(),m8=gp(),JKe=jc(),DJt=Mb(),RJt=nh().prepSelect,FJt=nh().selectOnClick,V$=nh().clearOutline,$Ke=Ty(),QKe=l5(),eJe=y5().redrawReglTraces,qJt=Qh().MID_SHIFT,Cx=h8(),_1=p8(),g8=N$(),v8=g8.smith,BJt=g8.reactanceArc,OJt=g8.resistanceArc,y8=g8.smithTransform,NJt=Fc._,tJe=Fc.mod,Lx=Fc.deg2rad,vw=Fc.rad2deg;function rJe(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 Vd=rJe.prototype;aJe.exports=function(t,r,n){return new rJe(t,r,n)};Vd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(y=l,k=l*b,L=(f-k)/i.h/2,E=[s[0],s[1]],A=[u[0]+L,u[1]-L]):(y=f/b,k=f,L=(l-y)/i.w/2,E=[s[0]+L,s[1]-L],A=[u[0],u[1]]),r.xLength2=y,r.yLength2=k,r.xDomain2=E,r.yDomain2=A;var _=r.xOffset2=i.l+i.w*E[0],C=r.yOffset2=i.t+i.h*(1-A[1]),M=r.radius=y/d,v=r.innerRadius=r.getHole(t)*M,z=r.cx=_-M*h[0],T=r.cy=C+M*h[3],F=r.cxx=z-_,q=r.cyy=T-C,U=a.side,H;U==="counterclockwise"?(H=U,U="top"):U==="clockwise"&&(H=U,U="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:U,_trueSide:H,domain:[v/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:A});var j=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",j).attr("transform",bd(F,q)),n.frontplot.attr("transform",bd(_,C)).call(tC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",j).attr("transform",bd(z,T)).call(U$.fill,t.bgcolor)};Vd.mockAxis=function(e,t,r,n){var i=Fc.extendFlat({},r,n);return PJt(i,t,e),i};Vd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Fc.extendFlat({type:"linear"},r);zJt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var u=n.sectorBBox,l=s[a],f=n.radialAxis._rl,c=(f[1]-f[0])/(1-n.getHole(t));o.range=[u[l[0]]*c,u[l[1]]*c]},o.isPtWithinRange=a==="x"&&!i?function(u){return n.isPtInside(u)}:function(){return!0},o.setRange(),o.setScale(),o};Vd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);IJt(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 u=i.r2l(i.maxallowed);i._rl[0]90&&f<=270&&(c.tickangle=180);var p=d?function(M){var v=y8(r,v8([M.x,0]));return bd(v[0]-s,v[1]-u)}:function(M){return bd(c.l2p(M.x)+o,0)},x=d?function(M){return OJt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(c.r2p(M.x)+o)},b=iJe(l);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){c.setScale();var y=0,k=d?(c.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return dv.tickText(c,M,!0,!1)}):dv.calcTicks(c),E=d?k:dv.clipEnds(c,k),A=dv.getTickSigns(c)[2];d&&((c.ticks==="top"&&c.side==="bottom"||c.ticks==="bottom"&&c.side==="top")&&(A=-A),c.ticks==="top"&&c.side==="top"&&(y=-c.ticklen),c.ticks==="bottom"&&c.side==="bottom"&&(y=c.ticklen)),dv.drawTicks(n,c,{vals:k,layer:i["radial-axis"],path:dv.makeTickPath(c,0,A),transFn:p,crisp:!1}),dv.drawGrid(n,c,{vals:E,layer:i["radial-grid"],path:x,transFn:Fc.noop,crisp:!1}),dv.drawLabels(n,c,{vals:k,layer:i["radial-axis"],transFn:p,labelFns:dv.makeLabelFns(c,y)})}var L=r.radialAxisAngle=r.vangles?vw(nJe(Lx(l.angle),r.vangles)):l.angle,_=bd(s,u),C=_+rg(-L);rC(i["radial-axis"],h&&(l.showticklabels||l.ticks),{transform:C}),rC(i["radial-grid"],h&&l.showgrid,{transform:d?"":_}),rC(i["radial-line"].select("line"),h&&l.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",l.linewidth).call(U$.stroke,l.linecolor)};Vd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,u=n.getRadial(t),l=n.id+"title",f=0;if(u.title){var c=tC.bBox(n.layers["radial-axis"].node()).height,h=u.title.font.size,d=u.side;f=d==="top"?h:d==="counterclockwise"?-(c+h*.4):c+h*.8}var p=r!==void 0?r:n.radialAxisAngle,x=Lx(p),b=Math.cos(x),y=Math.sin(x),k=o+a/2*b+f*y,E=s-a/2*y+f*b;n.layers["radial-axis-title"]=DJt.draw(i,l,{propContainer:u,propName:n.id+".radialaxis.title",placeholder:NJt(i,"Click to enter radial axis title"),attributes:{x:k,y:E,"text-anchor":"middle"},transform:{rotate:-p}})}};Vd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,u=r.cy,l=r.getAngular(t),f=r.angularAxis,c=r.isSmith;c||(r.fillViewInitialKey("angularaxis.rotation",l.rotation),f.setGeometry(),f.setScale());var h=c?function(v){var z=y8(r,v8([0,v.x]));return Math.atan2(z[0]-s,z[1]-u)-Math.PI/2}:function(v){return f.t2g(v.x)};f.type==="linear"&&f.thetaunit==="radians"&&(f.tick0=vw(f.tick0),f.dtick=vw(f.dtick));var d=function(v){return bd(s+a*Math.cos(v),u-a*Math.sin(v))},p=c?function(v){var z=y8(r,v8([0,v.x]));return bd(z[0],z[1])}:function(v){return d(h(v))},x=c?function(v){var z=y8(r,v8([0,v.x])),T=Math.atan2(z[0]-s,z[1]-u)-Math.PI/2;return bd(z[0],z[1])+rg(-vw(T))}:function(v){var z=h(v);return d(z)+rg(-vw(z))},b=c?function(v){return BJt(r,v.x,0,1/0)}:function(v){var z=h(v),T=Math.cos(z),F=Math.sin(z);return"M"+[s+o*T,u-o*F]+"L"+[s+a*T,u-a*F]},y=dv.makeLabelFns(f,0),k=y.labelStandoff,E={};E.xFn=function(v){var z=h(v);return Math.cos(z)*k},E.yFn=function(v){var z=h(v),T=Math.sin(z)>0?.2:1;return-Math.sin(z)*(k+v.fontSize*T)+Math.abs(Math.cos(z))*(v.fontSize*qJt)},E.anchorFn=function(v){var z=h(v),T=Math.cos(z);return Math.abs(T)<.1?"middle":T>0?"start":"end"},E.heightFn=function(v,z,T){var F=h(v);return-.5*(1+Math.sin(F))*T};var A=iJe(l);r.angularTickLayout!==A&&(i["angular-axis"].selectAll("."+f._id+"tick").remove(),r.angularTickLayout=A);var L=c?[1/0].concat(f.tickvals||[]).map(function(v){return dv.tickText(f,v,!0,!1)}):dv.calcTicks(f);c&&(L[0].text="\u221E",L[0].fontSize*=1.75);var _;if(t.gridshape==="linear"?(_=L.map(h),Fc.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,f.type==="category"&&(L=L.filter(function(v){return Fc.isAngleInsideSector(h(v),r.sectorInRad)})),f.visible){var C=f.ticks==="inside"?-1:1,M=(f.linewidth||1)/2;dv.drawTicks(n,f,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*f.ticklen,transFn:x,crisp:!1}),dv.drawGrid(n,f,{vals:L,layer:i["angular-grid"],path:b,transFn:Fc.noop,crisp:!1}),dv.drawLabels(n,f,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:E})}rC(i["angular-line"].select("path"),l.showline,{d:r.pathSubplot(),transform:bd(s,u)}).attr("stroke-width",l.linewidth).call(U$.stroke,l.linecolor)};Vd.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)}};Vd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Cx.MINZOOM,s=Cx.OFFEDGE,u=t.radius,l=t.innerRadius,f=t.cx,c=t.cy,h=t.cxx,d=t.cyy,p=t.sectorInRad,x=t.vangles,b=t.radialAxis,y=_1.clampTiny,k=_1.findXYatLength,E=_1.findEnclosingVertexAngles,A=Cx.cornerHalfWidth,L=Cx.cornerLen/2,_,C,M=g1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");pw.select(M).attr("d",t.pathSubplot()).attr("transform",bd(f,c)),M.onmousemove=function(fe){JKe.hover(n,fe,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(fe){n._dragging||m8.unhover(n,fe)};var v={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},z,T,F,q,U,H,j,G,O;function W(fe,Ze){return Math.sqrt(fe*fe+Ze*Ze)}function re(fe,Ze){return W(fe-h,Ze-d)}function ne(fe,Ze){return Math.atan2(d-Ze,fe-h)}function be(fe,Ze){return[fe*Math.cos(Ze),fe*Math.sin(-Ze)]}function ze(fe,Ze){if(fe===0)return t.pathSector(2*A);var et=L/fe,gt=Ze-et,Pt=Ze+et,Qe=Math.max(0,Math.min(fe,u)),Xe=Qe-A,Tt=Qe+A;return"M"+be(Xe,gt)+"A"+[Xe,Xe]+" 0,0,0 "+be(Xe,Pt)+"L"+be(Tt,Pt)+"A"+[Tt,Tt]+" 0,0,1 "+be(Tt,gt)+"Z"}function Ce(fe,Ze,et){if(fe===0)return t.pathSector(2*A);var gt=be(fe,Ze),Pt=be(fe,et),Qe=y((gt[0]+Pt[0])/2),Xe=y((gt[1]+Pt[1])/2),Tt,xt;if(Qe&&Xe){var _t=Xe/Qe,Ct=-1/_t,jt=k(A,_t,Qe,Xe);Tt=k(L,Ct,jt[0][0],jt[0][1]),xt=k(L,Ct,jt[1][0],jt[1][1])}else{var At,Te;Xe?(At=L,Te=A):(At=A,Te=L),Tt=[[Qe-At,Xe-Te],[Qe+At,Xe-Te]],xt=[[Qe-At,Xe+Te],[Qe+At,Xe+Te]]}return"M"+Tt.join("L")+"L"+xt.reverse().join("L")+"Z"}function he(){F=null,q=null,U=t.pathSubplot(),H=!1;var fe=n._fullLayout[t.id];j=CJt(fe.bgcolor).getLuminance(),G=g1.makeZoombox(a,j,f,c,U),G.attr("fill-rule","evenodd"),O=g1.makeCorners(a,f,c),V$(n)}function te(fe,Ze){return Ze=Math.max(Math.min(Ze,u),l),feo?(fe-1&&fe===1&&FJt(Ze,n,[t.xaxis],[t.yaxis],t.id,v),et.indexOf("event")>-1&&JKe.click(n,Ze,t.id)}v.prepFn=function(fe,Ze,et){var gt=n._fullLayout.dragmode,Pt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Qe=n._fullLayout._invTransform;_=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var Xe=Fc.apply3DTransform(Qe)(Ze-Pt.left,et-Pt.top);if(z=Xe[0],T=Xe[1],x){var Tt=_1.findPolygonOffset(u,p[0],p[1],x);z+=h+Tt[0],T+=d+Tt[1]}switch(gt){case"zoom":v.clickFn=Be,r||(x?v.moveFn=Oe:v.moveFn=Ee,v.doneFn=Re,he(fe,Ze,et));break;case"select":case"lasso":RJt(fe,Ze,et,v,gt);break}},m8.init(v)};Vd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,u=n.cx,l=n.cy,f=n.radialAxis,c=Cx.radialDragBoxSize,h=c/2;if(!f.visible)return;var d=Lx(n.radialAxisAngle),p=f._rl,x=p[0],b=p[1],y=p[r],k=.75*(p[1]-p[0])/(1-n.getHole(t))/o,E,A,L;r?(E=u+(o+h)*Math.cos(d),A=l-(o+h)*Math.sin(d),L="radialdrag"):(E=u+(s-h)*Math.cos(d),A=l-(s-h)*Math.sin(d),L="radialdrag-inner");var _=g1.makeRectDragger(a,L,"crosshair",-h,-h,c,c),C={element:_,gd:i};e.dragmode===!1&&(C.dragmode=!1),rC(pw.select(_),f.visible&&s0!=(r?z>x:z=90||i>90&&a>=450?d=1:s<=0&&l<=0?d=0:d=Math.max(s,l),i<=180&&a>=180||i>180&&a>=540?f=-1:o>=0&&u>=0?f=0:f=Math.min(o,u),i<=270&&a>=270||i>270&&a>=630?c=-1:s>=0&&l>=0?c=0:c=Math.min(s,l),a>=360?h=1:o<=0&&u<=0?h=0:h=Math.max(o,u),[f,c,h,d]}function nJe(e,t){var r=function(i){return Fc.angleDist(e,i)},n=Fc.findIndexOfMin(t,r);return t[n]}function rC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var G$=Se((C2r,cJe)=>{"use strict";var VJt=Ih(),Uu=Rd(),HJt=Ec().attributes,c0=Zr().extendFlat,oJe=_c().overrideAll,sJe=oJe({color:Uu.color,showline:c0({},Uu.showline,{dflt:!0}),linecolor:Uu.linecolor,linewidth:Uu.linewidth,showgrid:c0({},Uu.showgrid,{dflt:!0}),gridcolor:Uu.gridcolor,gridwidth:Uu.gridwidth,griddash:Uu.griddash},"plot","from-root"),lJe=oJe({tickmode:Uu.minor.tickmode,nticks:Uu.nticks,tick0:Uu.tick0,dtick:Uu.dtick,tickvals:Uu.tickvals,ticktext:Uu.ticktext,ticks:Uu.ticks,ticklen:Uu.ticklen,tickwidth:Uu.tickwidth,tickcolor:Uu.tickcolor,ticklabelstep:Uu.ticklabelstep,showticklabels:Uu.showticklabels,labelalias:Uu.labelalias,showtickprefix:Uu.showtickprefix,tickprefix:Uu.tickprefix,showticksuffix:Uu.showticksuffix,ticksuffix:Uu.ticksuffix,showexponent:Uu.showexponent,exponentformat:Uu.exponentformat,minexponent:Uu.minexponent,separatethousands:Uu.separatethousands,tickfont:Uu.tickfont,tickangle:Uu.tickangle,tickformat:Uu.tickformat,tickformatstops:Uu.tickformatstops,layer:Uu.layer},"plot","from-root"),uJe={visible:c0({},Uu.visible,{dflt:!0}),type:c0({},Uu.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Uu.autotypenumbers,autorangeoptions:{minallowed:Uu.autorangeoptions.minallowed,maxallowed:Uu.autorangeoptions.maxallowed,clipmin:Uu.autorangeoptions.clipmin,clipmax:Uu.autorangeoptions.clipmax,include:Uu.autorangeoptions.include,editType:"plot"},autorange:c0({},Uu.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:c0({},Uu.minallowed,{editType:"plot"}),maxallowed:c0({},Uu.maxallowed,{editType:"plot"}),range:c0({},Uu.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Uu.categoryorder,categoryarray:Uu.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Uu.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:c0({},Uu.title.text,{editType:"plot",dflt:""}),font:c0({},Uu.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Uu.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(uJe,sJe,lJe);var fJe={visible:c0({},Uu.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Uu.autotypenumbers,categoryorder:Uu.categoryorder,categoryarray:Uu.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:Uu.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};c0(fJe,sJe,lJe);cJe.exports={domain:HJt({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:VJt.background},radialaxis:uJe,angularaxis:fJe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var vJe=Se((L2r,pJe)=>{"use strict";var _8=Zr(),GJt=Pl(),WJt=_f(),jJt=k_(),ZJt=Dd().getSubplotData,XJt=xb(),YJt=T3(),KJt=e_(),JJt=t_(),$Jt=QP(),QJt=Y5(),e$t=bN(),t$t=L3(),dJe=G$(),r$t=q$(),x8=h8(),hJe=x8.axisNames;function i$t(e,t,r,n){var i=r("bgcolor");n.bgColor=GJt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=ZJt(n.fullData,x8.name,n.id),s=n.layoutOut,u;function l(G,O){return r(u+"."+G,O)}for(var f=0;f{"use strict";var a$t=Dd().getSubplotCalcData,o$t=Zr().counterRegex,s$t=H$(),mJe=h8(),gJe=mJe.attr,mw=mJe.name,yJe=o$t(mw),_Je={};_Je[gJe]={valType:"subplotid",dflt:mw,editType:"calc"};function l$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[mw],i=0;i{"use strict";var f$t=Du().hovertemplateAttrs,c$t=Du().texttemplateAttrs,w8=vu().extendFlat,h$t=Ey(),h0=Zc(),d$t=zf(),WS=h0.line;bJe.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:c$t({editType:"plot"},{keys:["r","theta","text"]}),hovertext:h0.hovertext,line:{color:WS.color,width:WS.width,dash:WS.dash,backoff:WS.backoff,shape:w8({},WS.shape,{values:["linear","spline"]}),smoothing:WS.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:w8({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:w8({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:h$t(),hoverinfo:w8({},d$t.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:f$t(),selected:h0.selected,unselected:h0.unselected}});var A8=Se((I2r,AJe)=>{"use strict";var T8=Zr(),jS=ec(),p$t=$v(),v$t=I0(),wJe=J3(),y$t=D0(),m$t=Py(),g$t=Sm().PTS_LINESONLY,_$t=iC();function x$t(e,t,r,n){function i(s,u){return T8.coerce(e,t,_$t,s,u)}var a=TJe(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var b$t=Zr(),SJe=hu();MJe.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 u=o.c2l(t.r);i.rLabel=SJe.tickText(o,u,!0).text;var l=s.thetaunit==="degrees"?b$t.rad2deg(t.theta):t.theta;return i.thetaLabel=SJe.tickText(s,l,!0).text,i}});var CJe=Se((R2r,kJe)=>{"use strict";var EJe=_u(),w$t=ju().BADNUM,T$t=hu(),A$t=R0(),S$t=km(),M$t=F0(),E$t=q0().calcMarkerSize;kJe.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"),u=o.makeCalcdata(r,"theta"),l=r._length,f=new Array(l),c=0;c{"use strict";var k$t=iT(),LJe=ju().BADNUM;zJe.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},u=r.radialAxis,l=r.angularAxis,f=0;f{"use strict";var C$t=sT();function L$t(e,t,r,n){var i=C$t(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],u=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,IJe(s,u,o,a),a.hovertemplate=u.hovertemplate,i}}function IJe(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 u=e.hi||t.hoverinfo,l=[];function f(h,d){l.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var c=u.split("+");c.indexOf("all")!==-1&&(c=["r","theta","text"]),c.indexOf("r")!==-1&&f(i,n.rLabel),c.indexOf("theta")!==-1&&f(a,n.thetaLabel),c.indexOf("text")!==-1&&n.text&&(l.push(n.text),delete n.text),n.extraText=l.join("
")}}DJe.exports={hoverPoints:L$t,makeHoverPointText:IJe}});var FJe=Se((B2r,RJe)=>{"use strict";RJe.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:b8(),categories:["polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:A8().supplyDefaults,colorbar:ep(),formatLabels:S8(),calc:CJe(),plot:PJe(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:M8().hoverPoints,selectPoints:lT(),meta:{}}});var BJe=Se((O2r,qJe)=>{"use strict";qJe.exports=FJe()});var W$=Se((N2r,OJe)=>{"use strict";var Vv=iC(),x1=ek(),z$t=Du().texttemplateAttrs;OJe.exports={mode:Vv.mode,r:Vv.r,theta:Vv.theta,r0:Vv.r0,dr:Vv.dr,theta0:Vv.theta0,dtheta:Vv.dtheta,thetaunit:Vv.thetaunit,text:Vv.text,texttemplate:z$t({editType:"plot"},{keys:["r","theta","text"]}),hovertext:Vv.hovertext,hovertemplate:Vv.hovertemplate,line:{color:x1.line.color,width:x1.line.width,dash:x1.line.dash,editType:"calc"},connectgaps:x1.connectgaps,marker:x1.marker,fill:x1.fill,fillcolor:x1.fillcolor,textposition:x1.textposition,textfont:x1.textfont,hoverinfo:Vv.hoverinfo,selected:Vv.selected,unselected:Vv.unselected}});var VJe=Se((U2r,UJe)=>{"use strict";var NJe=Zr(),j$=ec(),P$t=A8().handleRThetaDefaults,I$t=$v(),D$t=I0(),R$t=D0(),F$t=Py(),q$t=Sm().PTS_LINESONLY,B$t=W$();UJe.exports=function(t,r,n,i){function a(s,u){return NJe.coerce(t,r,B$t,s,u)}var o=P$t(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var O$t=S8();HJe.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]),O$t(t,r,n)}});var jJe=Se((H2r,WJe)=>{"use strict";var N$t=R0(),U$t=q0().calcMarkerSize,V$t=Y2(),H$t=hu(),G$t=ox().TOO_MANY_POINTS;WJe.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"),u=r._theta=o.makeCalcdata(r,"theta"),l=r._length,f={};l{"use strict";var W$t=RF(),j$t=M8().makeHoverPointText;function Z$t(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,u=W$t.hoverPoints(e,t,r,n);if(!(!u||u[0].index===!1)){var l=u[0];if(l.index===void 0)return u;var f=e.subplot,c=l.cd[l.index],h=l.trace;if(c.r=o[l.index],c.theta=s[l.index],!!f.isPtInside(c))return l.xLabelVal=void 0,l.yLabelVal=void 0,j$t(c,h,f,l),u}}ZJe.exports={hoverPoints:Z$t}});var KJe=Se((W2r,YJe)=>{"use strict";YJe.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:b8(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:W$(),supplyDefaults:VJe(),colorbar:ep(),formatLabels:GJe(),calc:jJe(),hoverPoints:XJe().hoverPoints,selectPoints:oY(),meta:{}}});var JJe=Se((j2r,Z$)=>{"use strict";var X$t=BF(),Y$t=_u(),K$t=uK(),J$t=iY(),E8=Y2(),k8=Zr(),$$t=ox().TOO_MANY_POINTS,Q$t={};Z$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=J$t(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var u=s[0],l=u.trace,f=u.t,c=l._length,h=f.r,d=f.theta,p=f.opts,x,b=h.slice(),y=d.slice();for(x=0;x=$$t&&(p.marker.cluster=f.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=k),p.line&&k.length>1&&k8.extendFlat(p.line,E8.linePositions(t,l,k)),p.text&&(k8.extendFlat(p.text,{positions:k},E8.textPosition(t,l,p.text,p.marker)),k8.extendFlat(p.textSel,{positions:k},E8.textPosition(t,l,p.text,p.markerSel)),k8.extendFlat(p.textUnsel,{positions:k},E8.textPosition(t,l,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),f.x=E,f.y=A,f.rawx=E,f.rawy=A,f.r=h,f.theta=d,f.positions=k,f._scene=o,f.index=o.count,o.count++}}),K$t(t,r,n)}};Z$.exports.reglPrecompiled=Q$t});var QJe=Se((Z2r,$Je)=>{"use strict";var eQt=b9(),tQt=w9(),rQt=T9(),iQt=A9(),nQt=S9(),aQt=M9(),oQt=E9(),sQt=k9(),lQt=C9(),uQt=L9();$Je.exports={"3e771157d23b4793771f65d83e6387262ed73d488209157f19a7fa027bddd71b":eQt,cbf700f001fff25b649fba9c37fa0dc6631c1cdee318ad49473d28ec10dcee81:tQt,"8fad2284703471df7c0e0d0a7b96d983e8c53f6d707dd55d5921c1eab71f6623":rQt,fe5b6844077cde1bdd7273f4495969fad93500c26a69b62e74ec2664c447bcc7:iQt,db1b82c68771e7f5012fad1fbdae7ff23b526e58d2995bf6dd2cf30024e0f41d:nQt,"49e82bba439f1d9d441c17ba252d05640bc63fefdf22d1219993633af7730210":aQt,dbd1cc9126a137a605df67dc0706e55116f04e33b4545a80042031752de5aef5:oQt,bfc540da96a87fcc039073cb37b45e6b81ef5ee6ef3529d726ceed8336354019:sQt,"6a5d6bd29c15cf7614221b94c3f384df47c2c46fbe4456e8c57b5cd14c84d923":lQt,"8902aff2b23b600f8103bcc84a8af2999d28795208aedadc2db06f921f9c7034":uQt}});var t$e=Se((X2r,e$e)=>{"use strict";var X$=JJe(),fQt=QJe(),cQt=fK();Object.assign(X$.reglPrecompiled,fQt);Object.assign(X$.reglPrecompiled,cQt);e$e.exports=X$});var n$e=Se((Y2r,i$e)=>{"use strict";var r$e=KJe();r$e.plot=t$e();i$e.exports=r$e});var Y$=Se((K2r,a$e)=>{"use strict";var hQt=Du().hovertemplateAttrs,ZS=vu().extendFlat,zx=iC(),Px=Lm();a$e.exports={r:zx.r,theta:zx.theta,r0:zx.r0,dr:zx.dr,theta0:zx.theta0,dtheta:zx.dtheta,thetaunit:zx.thetaunit,base:ZS({},Px.base,{}),offset:ZS({},Px.offset,{}),width:ZS({},Px.width,{}),text:ZS({},Px.text,{}),hovertext:ZS({},Px.hovertext,{}),marker:dQt(),hoverinfo:zx.hoverinfo,hovertemplate:hQt(),selected:Px.selected,unselected:Px.unselected};function dQt(){var e=ZS({},Px.marker);return delete e.cornerradius,e}});var K$=Se((J2r,o$e)=>{"use strict";o$e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var u$e=Se(($2r,l$e)=>{"use strict";var s$e=Zr(),pQt=A8().handleRThetaDefaults,vQt=RI(),yQt=Y$();l$e.exports=function(t,r,n,i){function a(s,u){return s$e.coerce(t,r,yQt,s,u)}var o=pQt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),vQt(t,r,a,n,i),s$e.coerceSelectionMarkerOpacity(r,a)}});var c$e=Se((Q2r,f$e)=>{"use strict";var mQt=Zr(),gQt=K$();f$e.exports=function(e,t,r){var n={},i;function a(u,l){return mQt.coerce(e[i]||{},t[i],gQt,u,l)}for(var o=0;o{"use strict";var h$e=Dp().hasColorscale,d$e=Rp(),_Qt=Zr().isArrayOrTypedArray,xQt=f4(),bQt=Gb().setGroupPositions,wQt=F0(),TQt=Ul().traceIs,AQt=Zr().extendFlat;function SQt(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"),u=t._length,l=new Array(u),f=o,c=s,h=0;h{"use strict";var v$e=Nl(),C8=_u(),XS=Zr(),EQt=yu(),$$=p8();y$e.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,u=r.angularAxis,l=kQt(r),f=r.layers.frontplot.select("g.barlayer");XS.makeTraceGroups(f,n,"trace bars").each(function(){var c=v$e.select(this),h=XS.ensureSingle(c,"g","points"),d=h.selectAll("g.point").data(XS.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(p){var x=v$e.select(this),b=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),k=p.thetag0=u.c2g(p.p0),E=p.thetag1=u.c2g(p.p1),A;if(!C8(b)||!C8(y)||!C8(k)||!C8(E)||b===y||k===E)A="M0,0Z";else{var L=s.c2g(p.s1),_=(k+E)/2;p.ct=[a.c2p(L*Math.cos(_)),o.c2p(L*Math.sin(_))],A=l(b,y,k,E)}XS.ensureSingle(x,"path").attr("d",A)}),EQt.setClipUrl(c,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function kQt(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,u;XS.angleDelta(a,o)>0?(s=a,u=o):(s=o,u=a);var l=$$.findEnclosingVertexAngles(s,e.vangles)[0],f=$$.findEnclosingVertexAngles(u,e.vangles)[1],c=[l,(s+u)/2,f];return $$.pathPolygonAnnulus(n,i,s,u,c,t,r)}:function(n,i,a,o){return XS.pathAnnulus(n,i,a,o,t,r)}}});var _$e=Se((rwr,g$e)=>{"use strict";var CQt=jc(),Q$=Zr(),LQt=TT().getTraceColor,zQt=Q$.fillText,PQt=M8().makeHoverPointText,IQt=p8().isPtInsidePolygon;g$e.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,u=o.angularAxis,l=o.vangles,f=l?IQt:Q$.isPtInsideSector,c=t.maxHoverDistance,h=u._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var x=function(E){return f(d,p,[E.rp0,E.rp1],[E.thetag0,E.thetag1],l)?c+Math.min(1,Math.abs(E.thetag1-E.thetag0)/h)-1+(E.rp1-d)/(E.rp1-E.rp0)-1:1/0};if(CQt.getClosest(i,x,t),t.index!==!1){var b=t.index,y=i[b];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var k=Q$.extendFlat({},y,{r:y.s,theta:y.p});return zQt(y,a,t),PQt(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=LQt(a,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var b$e=Se((iwr,x$e)=>{"use strict";x$e.exports={moduleType:"trace",name:"barpolar",basePlotModule:b8(),categories:["polar","bar","showLegend"],attributes:Y$(),layoutAttributes:K$(),supplyDefaults:u$e(),supplyLayoutDefaults:c$e(),calc:J$().calc,crossTraceCalc:J$().crossTraceCalc,plot:m$e(),colorbar:ep(),formatLabels:S8(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:_$e(),selectPoints:AT(),meta:{}}});var T$e=Se((nwr,w$e)=>{"use strict";w$e.exports=b$e()});var eQ=Se((awr,A$e)=>{"use strict";A$e.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var tQ=Se((owr,k$e)=>{"use strict";var DQt=Ih(),lh=Rd(),RQt=Ec().attributes,Ix=Zr().extendFlat,S$e=_c().overrideAll,M$e=S$e({color:lh.color,showline:Ix({},lh.showline,{dflt:!0}),linecolor:lh.linecolor,linewidth:lh.linewidth,showgrid:Ix({},lh.showgrid,{dflt:!0}),gridcolor:lh.gridcolor,gridwidth:lh.gridwidth,griddash:lh.griddash},"plot","from-root"),E$e=S$e({ticklen:lh.ticklen,tickwidth:Ix({},lh.tickwidth,{dflt:2}),tickcolor:lh.tickcolor,showticklabels:lh.showticklabels,labelalias:lh.labelalias,showtickprefix:lh.showtickprefix,tickprefix:lh.tickprefix,showticksuffix:lh.showticksuffix,ticksuffix:lh.ticksuffix,tickfont:lh.tickfont,tickformat:lh.tickformat,hoverformat:lh.hoverformat,layer:lh.layer},"plot","from-root"),FQt=Ix({visible:Ix({},lh.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Ix({},lh.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},M$e,E$e),qQt=Ix({visible:Ix({},lh.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:lh.ticks,editType:"calc"},M$e,E$e);k$e.exports={domain:RQt({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:DQt.background},realaxis:FQt,imaginaryaxis:qQt,editType:"calc"}});var z$e=Se((swr,L$e)=>{"use strict";var YS=Zr(),BQt=Pl(),OQt=_f(),NQt=k_(),UQt=Dd().getSubplotData,VQt=t_(),HQt=e_(),GQt=Y5(),WQt=gm(),KS=tQ(),rQ=eQ(),C$e=rQ.axisNames,jQt=XQt(function(e){return YS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function ZQt(e,t,r,n){var i=r("bgcolor");n.bgColor=BQt.combine(i,n.paper_bgcolor);var a=UQt(n.fullData,rQ.name,n.id),o=n.layoutOut,s;function u(L,_){return r(s+"."+L,_)}for(var l=0;l{"use strict";var YQt=Dd().getSubplotCalcData,KQt=Zr().counterRegex,JQt=H$(),I$e=eQ(),D$e=I$e.attr,gw=I$e.name,P$e=KQt(gw),R$e={};R$e[D$e]={valType:"subplotid",dflt:gw,editType:"calc"};function $Qt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[gw],i=0;i{"use strict";var eer=Du().hovertemplateAttrs,ter=Du().texttemplateAttrs,L8=vu().extendFlat,rer=Ey(),d0=Zc(),ier=zf(),JS=d0.line;B$e.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:ter({editType:"plot"},{keys:["real","imag","text"]}),hovertext:d0.hovertext,line:{color:JS.color,width:JS.width,dash:JS.dash,backoff:JS.backoff,shape:L8({},JS.shape,{values:["linear","spline"]}),smoothing:JS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:L8({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:L8({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:rer(),hoverinfo:L8({},ier.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:eer(),selected:d0.selected,unselected:d0.unselected}});var U$e=Se((fwr,N$e)=>{"use strict";var z8=Zr(),$S=ec(),ner=$v(),aer=I0(),O$e=J3(),oer=D0(),ser=Py(),ler=Sm().PTS_LINESONLY,uer=iQ();N$e.exports=function(t,r,n,i){function a(u,l){return z8.coerce(t,r,uer,u,l)}var o=fer(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var V$e=hu();H$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=V$e.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=V$e.tickText(a.angularAxis,t.imag,!0).text,i}});var Z$e=Se((hwr,j$e)=>{"use strict";var W$e=_u(),cer=ju().BADNUM,her=R0(),der=km(),per=F0(),ver=q0().calcMarkerSize;j$e.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"),u=o.makeCalcdata(r,"imag"),l=r._length,f=new Array(l),c=0;c{"use strict";var yer=iT(),X$e=ju().BADNUM,mer=N$(),ger=mer.smith;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},u=0;u{"use strict";var _er=sT();function xer(e,t,r,n){var i=_er(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],u=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,J$e(s,u,o,a),a.hovertemplate=u.hovertemplate,i}}function J$e(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 u=e.hi||t.hoverinfo,l=[];function f(h,d){l.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var c=u.split("+");c.indexOf("all")!==-1&&(c=["real","imag","text"]),c.indexOf("real")!==-1&&f(i,n.realLabel),c.indexOf("imag")!==-1&&f(a,n.imagLabel),c.indexOf("text")!==-1&&n.text&&(l.push(n.text),delete n.text),n.extraText=l.join("
")}}$$e.exports={hoverPoints:xer,makeHoverPointText:J$e}});var tQe=Se((vwr,eQe)=>{"use strict";eQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:q$e(),categories:["smith","symbols","showLegend","scatter-like"],attributes:iQ(),supplyDefaults:U$e(),colorbar:ep(),formatLabels:G$e(),calc:Z$e(),plot:K$e(),style:ov().style,styleOnSelect:ov().styleOnSelect,hoverPoints:Q$e().hoverPoints,selectPoints:lT(),meta:{}}});var iQe=Se((ywr,rQe)=>{"use strict";rQe.exports=tQe()});var Ep=Se((mwr,aQe)=>{var I8=Uh();function nQe(){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={}}I8(nQe.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 nQ(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(cf.local.invalidDate||cf.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function P8(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}I8(nQ.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(cf.local.invalidDate||cf.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(cf.local.differentCalendars||cf.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?"-":"")+P8(Math.abs(this.year()),4)+"-"+P8(this.month(),2)+"-"+P8(this.day(),2)}});function aQ(){this.shortYearCutoff="+10"}I8(aQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,cf.local.invalidDate||cf.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new nQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.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,cf.local.invalidYear||cf.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+P8(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,cf.local.invalidMonth||cf.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,cf.local.invalidMonth||cf.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,cf.local.invalidYear||cf.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,cf.local.invalidDate||cf.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,cf.local.invalidDate||cf.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,cf.local.invalidDate||cf.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,cf.local.invalidDate||cf.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(f){for(;oc-1+f.minMonth;)a++,o-=c,c=f.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 u=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,u}catch(l){throw this._validateLevel--,l}},_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,cf.local.invalidDate||cf.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),l=i-(u>2.5?4716:4715);return l<=0&&l--,this.newDate(l,u,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,cf.local.invalidDate||cf.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 cf=aQe.exports=new nQe;cf.cdate=nQ;cf.baseCalendar=aQ;cf.calendars.gregorian=oQ});var oQe=Se(()=>{var sQ=Uh(),Hd=Ep();sQ(Hd.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"});Hd.local=Hd.regionalOptions[""];sQ(Hd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});sQ(Hd.baseCalendar.prototype,{UNIX_EPOCH:Hd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Hd.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 Hd.local.invalidFormat||Hd.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,u=r.calculateWeek||this.local.calculateWeek,l=function(A,L){for(var _=1;E+_1},f=function(A,L,_,C){var M=""+L;if(l(A,C))for(;M.length<_;)M="0"+M;return M},c=function(A,L,_,C){return l(A)?C[L]:_[L]},h=this,d=function(A){return typeof a=="function"?a.call(h,A,l("m")):b(f("m",A.month(),2))},p=function(A,L){return L?typeof s=="function"?s.call(h,A):s[A.month()-h.minMonth]:typeof o=="function"?o.call(h,A):o[A.month()-h.minMonth]},x=this.local.digits,b=function(A){return r.localNumbers&&x?x(A):A},y="",k=!1,E=0;E1},k=function(F,q){var U=y(F,q),H=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],j=new RegExp("^-?\\d{1,"+H+"}"),G=t.substring(M).match(j);if(!G)throw(Hd.local.missingNumberAt||Hd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=G[0].length,parseInt(G[0],10)},E=this,A=function(){if(typeof s=="function"){y("m");var F=s.call(E,t.substring(M));return M+=F.length,F}return k("m")},L=function(F,q,U,H){for(var j=y(F,H)?U:q,G=0;G-1){h=1,d=p;for(var T=this.daysInMonth(c,h);d>T;T=this.daysInMonth(c,h))h++,d-=T}return f>-1?this.fromJD(f):this.newDate(c,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(c){}s=s.toLowerCase();for(var u=(s.match(/^c/)&&r?r.newDate():null)||a.today(),l=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,f=l.exec(s);f;)u.add(parseInt(f[1],10),f[2]||"d"),f=l.exec(s);return u};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 sQe=Se(()=>{var Dx=Ep(),ber=Uh(),lQ=Dx.instance();function D8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}D8.prototype=new Dx.baseCalendar;ber(D8.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(Ter);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(Aer);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(Ser);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 Dx.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 Dx.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,Dx.local.invalidyear),i=Fx[n-Fx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,u;u=lQ.newDate(a,o,s),u.add(4-(u.dayOfWeek()||7),"d");var l=this.toJD(e,t,r)-u.toJD();return 1+Math.floor(l/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=Rx[e-Rx[0]],n=r>>13,i=n?12:11;if(t>i)throw Dx.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,Dx.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=Eer(e,a,r,i);return lQ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=lQ.fromJD(e),r=Mer(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(wer),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(D8.prototype).add.call(this,e,t,r);if(r==="y"){var u=s.year(),l=s.month(),f=this.isIntercalaryMonth(u,o),c=a&&f?this.toMonthIndex(u,o,!0):this.toMonthIndex(u,o,!1);c!==l&&s.month(c)}return s}});var wer=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Ter=/^\d?\d[iI]?/m,Aer=/^闰?十?[一二三四五六七八九]?月/m,Ser=/^闰?十?[一二三四五六七八九]?/m;Dx.calendars.chinese=D8;var Rx=[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],Fx=[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 Mer(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 u=typeof r=="number"&&r>=1&&r<=31;if(!u)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var l=Fx[i.year-Fx[0]],f=i.year<<9|i.month<<5|i.day;a.year=f>=l?i.year:i.year-1,l=Fx[a.year-Fx[0]];var c=l>>9&4095,h=l>>5&15,d=l&31,p,x=new Date(c,h-1,d),b=new Date(i.year,i.month-1,i.day);p=Math.round((b-x)/(24*3600*1e3));var y=Rx[a.year-Rx[0]],k;for(k=0;k<13;k++){var E=y&1<<12-k?30:29;if(p>13;return!A||k=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var u=typeof t=="number"&&t>=1&&t<=12;if(!u)throw new Error("Lunar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=30;if(!l)throw new Error("Lunar day outside range 1 - 30");var f;typeof n=="object"?(f=!1,a=n):(f=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:f}}var c;c=o.day-1;var h=Rx[o.year-Rx[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var x=0;x>9&4095,E=y>>5&15,A=y&31,L=new Date(k,E-1,A+c);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var lQe=Se(()=>{var _w=Ep(),ker=Uh();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new _w.baseCalendar;ker(uQ.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,_w.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,_w.local.invalidYear||_w.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,_w.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,_w.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)}});_w.calendars.coptic=uQ});var uQe=Se(()=>{var b1=Ep(),Cer=Uh();function fQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}fQ.prototype=new b1.baseCalendar;Cer(fQ.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,b1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.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,b1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,b1.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,b1.local.invalidDate);return{century:Ler[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,b1.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 Ler={20:"Fruitbat",21:"Anchovy"};b1.calendars.discworld=fQ});var fQe=Se(()=>{var xw=Ep(),zer=Uh();function cQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}cQ.prototype=new xw.baseCalendar;zer(cQ.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,xw.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,xw.local.invalidYear||xw.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,xw.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,xw.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)}});xw.calendars.ethiopian=cQ});var cQe=Se(()=>{var qx=Ep(),Per=Uh();function hQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}hQ.prototype=new qx.baseCalendar;Per(hQ.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,R8(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&&R8(this.daysInYear(e),10)===5?30:t===9&&R8(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 R8(e,t){return e-t*Math.floor(e/t)}qx.calendars.hebrew=hQ});var hQe=Se(()=>{var nC=Ep(),Ier=Uh();function dQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}dQ.prototype=new nC.baseCalendar;Ier(dQ.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,nC.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,nC.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,nC.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)}});nC.calendars.islamic=dQ});var dQe=Se(()=>{var aC=Ep(),Der=Uh();function pQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}pQ.prototype=new aC.baseCalendar;Der(pQ.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,aC.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,aC.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,aC.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),u=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,u)}});aC.calendars.julian=pQ});var vQe=Se(()=>{var uy=Ep(),Rer=Uh();function yQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}yQ.prototype=new uy.baseCalendar;Rer(yQ.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,uy.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,uy.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,uy.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,uy.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,uy.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,uy.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,uy.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,uy.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,uy.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=vQ(e+8+17*20,365);return[Math.floor(t/20)+1,vQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[pQe(e+20,20),pQe(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,uy.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 vQ(e,t){return e-t*Math.floor(e/t)}function pQe(e,t){return vQ(e-1,t)+1}uy.calendars.mayan=yQ});var mQe=Se(()=>{var bw=Ep(),Fer=Uh();function mQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}mQ.prototype=new bw.baseCalendar;var yQe=bw.instance("gregorian");Fer(mQ.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,bw.local.invalidYear||bw.regionalOptions[""].invalidYear);return yQe.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,bw.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,bw.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)}});bw.calendars.nanakshahi=mQ});var gQe=Se(()=>{var ww=Ep(),qer=Uh();function gQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}gQ.prototype=new ww.baseCalendar;qer(gQ.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,ww.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,ww.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,ww.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=ww.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var u=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(u))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(u,1,1).add(a,"d").toJD()},fromJD:function(e){var t=ww.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],u=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>u;)o++,o>12&&(o=1,a++),u+=this.NEPALI_CALENDAR_DATA[a][o];var l=this.NEPALI_CALENDAR_DATA[a][o]-(u-i);return this.newDate(a,o,l)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var QS=Ep(),Ber=Uh();function F8(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F8.prototype=new QS.baseCalendar;Ber(F8.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,QS.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},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,QS.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,QS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e-(e>=0?474:473),a=474+_Q(i,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(i/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),n=_Q(t,1029983),i=2820;if(n!==1029982){var a=Math.floor(n/366),o=_Q(n,366);i=Math.floor((2134*a+2816*o+2815)/1028522)+a+1}var s=i+2820*r+474;s=s<=0?s-1:s;var u=e-this.toJD(s,1,1)+1,l=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=e-this.toJD(s,l,1)+1;return this.newDate(s,l,f)}});function _Q(e,t){return e-t*Math.floor(e/t)}QS.calendars.persian=F8;QS.calendars.jalali=F8});var xQe=Se(()=>{var Tw=Ep(),Oer=Uh(),q8=Tw.instance();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new Tw.baseCalendar;Oer(xQ.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,Tw.local.invalidYear),r=this._t2gYear(t.year());return q8.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Tw.local.invalidYear),i=this._t2gYear(n.year());return q8.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.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,Tw.local.invalidDate),i=this._t2gYear(n.year());return q8.toJD(i,n.month(),n.day())},fromJD:function(e){var t=q8.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)}});Tw.calendars.taiwan=xQ});var bQe=Se(()=>{var Aw=Ep(),Ner=Uh(),B8=Aw.instance();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new Aw.baseCalendar;Ner(bQ.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,Aw.local.invalidYear),r=this._t2gYear(t.year());return B8.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Aw.local.invalidYear),i=this._t2gYear(n.year());return B8.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Aw.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,Aw.local.invalidDate),i=this._t2gYear(n.year());return B8.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B8.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)}});Aw.calendars.thai=bQ});var wQe=Se(()=>{var Sw=Ep(),Uer=Uh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Sw.baseCalendar;Uer(wQ.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,Sw.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,Sw.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,Sw.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,u=t-Bx[r-1]+1;return this.newDate(o,s,u)},isValid:function(e,t,r){var n=Sw.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=Sw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Sw.calendars.ummalqura=wQ;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 AQe=Se((Xwr,TQe)=>{"use strict";TQe.exports=Ep();oQe();sQe();lQe();uQe();fQe();cQe();hQe();dQe();vQe();mQe();gQe();_Qe();xQe();bQe();wQe()});var zQe=Se((Ywr,LQe)=>{"use strict";var MQe=AQe(),oC=Zr(),EQe=ju(),Ver=EQe.EPOCHJD,Her=EQe.ONEDAY,SQ={valType:"enumerated",values:oC.sortObjectKeys(MQe.calendars),editType:"calc",dflt:"gregorian"},kQe=function(e,t,r,n){var i={};return i[r]=SQ,oC.coerce(e,t,i,r,n)},Ger=function(e,t,r,n){for(var i=0;i{"use strict";PQe.exports=zQe()});var Ker=Se((Jwr,RQe)=>{var DQe=ege();DQe.register([r1e(),H1e(),txe(),bxe(),Dxe(),Lbe(),Hbe(),C2e(),nwe(),Owe(),S3e(),Q4e(),UEe(),zCe(),gLe(),XLe(),mze(),WPe(),fIe(),kIe(),NIe(),eDe(),vDe(),zDe(),nRe(),ARe(),JOe(),e7e(),pUe(),OUe(),XVe(),uHe(),IHe(),GGe(),aWe(),CWe(),qje(),sZe(),VZe(),fYe(),IYe(),eKe(),MKe(),NKe(),BJe(),n$e(),T$e(),iQe(),IQe()]);RQe.exports=DQe});return Ker();})(); /*! * The buffer module from node.js, for the browser. * diff --git a/dist/plotly-with-meta.js b/dist/plotly-with-meta.js index c4147499913..9f554351a5a 100644 --- a/dist/plotly-with-meta.js +++ b/dist/plotly-with-meta.js @@ -14770,7 +14770,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc", + editType: "plot", description: [ "Default attributes to be applied to the plot. Templates can be", "created from existing plots using `Plotly.makeTemplate`, or", @@ -14825,10 +14825,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -57018,8 +57018,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -57032,18 +57038,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly.js b/dist/plotly.js index 3eb59a21ab2..934133834c0 100644 --- a/dist/plotly.js +++ b/dist/plotly.js @@ -13731,7 +13731,7 @@ var Plotly = (() => { }, template: { valType: "any", - editType: "calc" + editType: "plot" }, newshape: drawNewShapeAttrs.newshape, activeshape: drawNewShapeAttrs.activeshape, @@ -13755,10 +13755,10 @@ var Plotly = (() => { } }); - // stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css + // stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css var maplibre_gl_exports = {}; var init_maplibre_gl2 = __esm({ - "stylePlugin:/home/solarch/plotly/webgl/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { + "stylePlugin:/Users/marthacryan/gitrepos/plotly.js/node_modules/maplibre-gl/dist/maplibre-gl.css"() { init_maplibre_gl(); } }); @@ -54128,8 +54128,14 @@ var Plotly = (() => { gd ); } - var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow); - var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove); + function imgDataFunc(d) { + return [d.xref, d.x, d.sizex, d.yref, d.y, d.sizey].join("_"); + } + function imgSort(a, b) { + return a._index - b._index; + } + var imagesBelow = fullLayout._imageLowerLayer.selectAll("image").data(imageDataBelow, imgDataFunc); + var imagesAbove = fullLayout._imageUpperLayer.selectAll("image").data(imageDataAbove, imgDataFunc); imagesBelow.enter().append("image"); imagesAbove.enter().append("image"); imagesBelow.exit().remove(); @@ -54142,18 +54148,21 @@ var Plotly = (() => { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesBelow.sort(imgSort); + imagesAbove.sort(imgSort); var allSubplots = Object.keys(fullLayout._plots); for (i = 0; i < allSubplots.length; i++) { subplot = allSubplots[i]; var subplotObj = fullLayout._plots[subplot]; if (!subplotObj.imagelayer) continue; - var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || []); + var imagesOnSubplot = subplotObj.imagelayer.selectAll("image").data(imageDataSubplot[subplot] || [], imgDataFunc); imagesOnSubplot.enter().append("image"); imagesOnSubplot.exit().remove(); imagesOnSubplot.each(function(d) { setImage.bind(this)(d); applyAttributes.bind(this)(d); }); + imagesOnSubplot.sort(imgSort); } }; } diff --git a/dist/plotly.min.js b/dist/plotly.min.js index 12dd25b8c56..7bccff5201e 100644 --- a/dist/plotly.min.js +++ b/dist/plotly.min.js @@ -12,14 +12,14 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var $C=Object.defineProperty,zQe=Object.defineProperties,FQe=Object.getOwnPropertyDescriptor,qQe=Object.getOwnPropertyDescriptors,OQe=Object.getOwnPropertyNames,WQ=Object.getOwnPropertySymbols;var XQ=Object.prototype.hasOwnProperty,BQe=Object.prototype.propertyIsEnumerable;var ZQ=(e,t,r)=>t in e?$C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YQ=(e,t)=>{for(var r in t||(t={}))XQ.call(t,r)&&ZQ(e,r,t[r]);if(WQ)for(var r of WQ(t))BQe.call(t,r)&&ZQ(e,r,t[r]);return e},KQ=(e,t)=>zQe(e,qQe(t));var su=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),NQe=(e,t)=>{for(var r in t)$C(e,r,{get:t[r],enumerable:!0})},UQe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of OQe(t))!XQ.call(e,i)&&i!==r&&$C(e,i,{get:()=>t[i],enumerable:!(n=FQe(t,i))||n.enumerable});return e};var ab=e=>UQe($C({},"__esModule",{value:!0}),e);var QC=ye(JQ=>{"use strict";JQ.version="3.0.0-rc.0"});var QQ=ye(($Q,e6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof e6!="undefined"&&e6.exports?e6.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:$Q,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(E){return setImmediate(E)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(E,k,S,L){return Object.defineProperty(E,k,{value:S,writable:!0,configurable:L!==!1})}}catch(g){t=function(k,S,L){return k[S]=L,k}}n=function(){var E,k,S;function L(_,C){this.fn=_,this.self=C,this.next=void 0}return{add:function(C,M){S=new L(C,M),k?k.next=S:E=S,k=S,S=void 0},drain:function(){var C=E;for(E=k=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(g,E){n.add(g,E),r||(r=a(n.drain))}function s(g){var E,k=typeof g;return g!=null&&(k=="object"||k=="function")&&(E=g.then),typeof E=="function"?E:!1}function l(){for(var g=0;g0&&o(l,k))}catch(S){f.call(new d(k),S)}}}function f(g){var E=this;E.triggered||(E.triggered=!0,E.def&&(E=E.def),E.msg=g,E.state=2,E.chain.length>0&&o(l,E))}function h(g,E,k,S){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(Z){return t.call(Z)},n=self.document;function i(Z){return Z&&(Z.ownerDocument||Z.document||Z).documentElement}function a(Z){return Z&&(Z.ownerDocument&&Z.ownerDocument.defaultView||Z.document&&Z||Z.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(Z){r=function(oe){for(var we=oe.length,Be=new Array(we);we--;)Be[we]=oe[we];return Be}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(Z){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(oe,we){s.call(this,oe,we+"")},o.setAttributeNS=function(oe,we,Be){l.call(this,oe,we,Be+"")},u.setProperty=function(oe,we,Be){c.call(this,oe,we+"",Be)}}e.ascending=f;function f(Z,oe){return Zoe?1:Z>=oe?0:NaN}e.descending=function(Z,oe){return oeZ?1:oe>=Z?0:NaN},e.min=function(Z,oe){var we=-1,Be=Z.length,Ue,We;if(arguments.length===1){for(;++we=We){Ue=We;break}for(;++weWe&&(Ue=We)}else{for(;++we=We){Ue=We;break}for(;++weWe&&(Ue=We)}return Ue},e.max=function(Z,oe){var we=-1,Be=Z.length,Ue,We;if(arguments.length===1){for(;++we=We){Ue=We;break}for(;++weUe&&(Ue=We)}else{for(;++we=We){Ue=We;break}for(;++weUe&&(Ue=We)}return Ue},e.extent=function(Z,oe){var we=-1,Be=Z.length,Ue,We,wt;if(arguments.length===1){for(;++we=We){Ue=wt=We;break}for(;++weWe&&(Ue=We),wt=We){Ue=wt=We;break}for(;++weWe&&(Ue=We),wt1)return wt/(zt-1)},e.deviation=function(){var Z=e.variance.apply(this,arguments);return Z&&Math.sqrt(Z)};function v(Z){return{left:function(oe,we,Be,Ue){for(arguments.length<3&&(Be=0),arguments.length<4&&(Ue=oe.length);Be>>1;Z(oe[We],we)<0?Be=We+1:Ue=We}return Be},right:function(oe,we,Be,Ue){for(arguments.length<3&&(Be=0),arguments.length<4&&(Ue=oe.length);Be>>1;Z(oe[We],we)>0?Ue=We:Be=We+1}return Be}}}var x=v(f);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(Z){return v(Z.length===1?function(oe,we){return f(Z(oe),we)}:Z)},e.shuffle=function(Z,oe,we){(Be=arguments.length)<3&&(we=Z.length,Be<2&&(oe=0));for(var Be=we-oe,Ue,We;Be;)We=Math.random()*Be--|0,Ue=Z[Be+oe],Z[Be+oe]=Z[We+oe],Z[We+oe]=Ue;return Z},e.permute=function(Z,oe){for(var we=oe.length,Be=new Array(we);we--;)Be[we]=Z[oe[we]];return Be},e.pairs=function(Z){for(var oe=0,we=Z.length-1,Be,Ue=Z[0],We=new Array(we<0?0:we);oe=0;)for(wt=Z[oe],we=wt.length;--we>=0;)We[--Ue]=wt[we];return We};var g=Math.abs;e.range=function(Z,oe,we){if(arguments.length<3&&(we=1,arguments.length<2&&(oe=Z,Z=0)),(oe-Z)/we===1/0)throw new Error("infinite range");var Be=[],Ue=E(g(we)),We=-1,wt;if(Z*=Ue,oe*=Ue,we*=Ue,we<0)for(;(wt=Z+we*++We)>oe;)Be.push(wt/Ue);else for(;(wt=Z+we*++We)=oe.length)return Ue?Ue.call(Z,zt):Be?zt.sort(Be):zt;for(var lr=-1,Rr=zt.length,Ir=oe[or++],oi,ui,qr,Kr=new S,ii;++lr=oe.length)return tt;var or=[],lr=we[zt++];return tt.forEach(function(Rr,Ir){or.push({key:Rr,values:wt(Ir,zt)})}),lr?or.sort(function(Rr,Ir){return lr(Rr.key,Ir.key)}):or}return Z.map=function(tt,zt){return We(zt,tt,0)},Z.entries=function(tt){return wt(We(e.map,tt,0),0)},Z.key=function(tt){return oe.push(tt),Z},Z.sortKeys=function(tt){return we[oe.length-1]=tt,Z},Z.sortValues=function(tt){return Be=tt,Z},Z.rollup=function(tt){return Ue=tt,Z},Z},e.set=function(Z){var oe=new V;if(Z)for(var we=0,Be=Z.length;we=0&&(Be=Z.slice(we+1),Z=Z.slice(0,we)),Z)return arguments.length<2?this[Z].on(Be):this[Z].on(Be,oe);if(arguments.length===2){if(oe==null)for(Z in this)this.hasOwnProperty(Z)&&this[Z].on(Be,null);return this}};function ae(Z){var oe=[],we=new S;function Be(){for(var Ue=oe,We=-1,wt=Ue.length,tt;++We=0&&(we=Z.slice(0,oe))!=="xmlns"&&(Z=Z.slice(oe+1)),Ge.hasOwnProperty(we)?{space:Ge[we],local:Z}:Z}},Ce.attr=function(Z,oe){if(arguments.length<2){if(typeof Z=="string"){var we=this.node();return Z=e.ns.qualify(Z),Z.local?we.getAttributeNS(Z.space,Z.local):we.getAttribute(Z)}for(oe in Z)this.each(nt(oe,Z[oe]));return this}return this.each(nt(Z,oe))};function nt(Z,oe){Z=e.ns.qualify(Z);function we(){this.removeAttribute(Z)}function Be(){this.removeAttributeNS(Z.space,Z.local)}function Ue(){this.setAttribute(Z,oe)}function We(){this.setAttributeNS(Z.space,Z.local,oe)}function wt(){var zt=oe.apply(this,arguments);zt==null?this.removeAttribute(Z):this.setAttribute(Z,zt)}function tt(){var zt=oe.apply(this,arguments);zt==null?this.removeAttributeNS(Z.space,Z.local):this.setAttributeNS(Z.space,Z.local,zt)}return oe==null?Z.local?Be:we:typeof oe=="function"?Z.local?tt:wt:Z.local?We:Ue}function ct(Z){return Z.trim().replace(/\s+/g," ")}Ce.classed=function(Z,oe){if(arguments.length<2){if(typeof Z=="string"){var we=this.node(),Be=(Z=rt(Z)).length,Ue=-1;if(oe=we.classList){for(;++Ue=0;)(We=we[Be])&&(Ue&&Ue!==We.nextSibling&&Ue.parentNode.insertBefore(We,Ue),Ue=We);return this},Ce.sort=function(Z){Z=xt.apply(this,arguments);for(var oe=-1,we=this.length;++oe=oe&&(oe=Ue+1);!(zt=wt[oe])&&++oe0&&(Z=Z.slice(0,Ue));var wt=Ht.get(Z);wt&&(Z=wt,We=fr);function tt(){var lr=this[Be];lr&&(this.removeEventListener(Z,lr,lr.$),delete this[Be])}function zt(){var lr=We(oe,r(arguments));tt.call(this),this.addEventListener(Z,this[Be]=lr,lr.$=we),lr._=oe}function or(){var lr=new RegExp("^__on([^.]+)"+e.requote(Z)+"$"),Rr;for(var Ir in this)if(Rr=Ir.match(lr)){var oi=this[Ir];this.removeEventListener(Rr[1],oi,oi.$),delete this[Ir]}}return Ue?oe?zt:tt:oe?W:or}var Ht=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Ht.forEach(function(Z){"on"+Z in n&&Ht.remove(Z)});function $t(Z,oe){return function(we){var Be=e.event;e.event=we,oe[0]=this.__data__;try{Z.apply(this,oe)}finally{e.event=Be}}}function fr(Z,oe){var we=$t(Z,oe);return function(Be){var Ue=this,We=Be.relatedTarget;(!We||We!==Ue&&!(We.compareDocumentPosition(Ue)&8))&&we.call(Ue,Be)}}var _r,Br=0;function Or(Z){var oe=".dragsuppress-"+ ++Br,we="click"+oe,Be=e.select(a(Z)).on("touchmove"+oe,_e).on("dragstart"+oe,_e).on("selectstart"+oe,_e);if(_r==null&&(_r="onselectstart"in Z?!1:G(Z.style,"userSelect")),_r){var Ue=i(Z).style,We=Ue[_r];Ue[_r]="none"}return function(wt){if(Be.on(oe,null),_r&&(Ue[_r]=We),wt){var tt=function(){Be.on(we,null)};Be.on(we,function(){_e(),tt()},!0),setTimeout(tt,0)}}}e.mouse=function(Z){return ut(Z,Me())};var Nr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ut(Z,oe){oe.changedTouches&&(oe=oe.changedTouches[0]);var we=Z.ownerSVGElement||Z;if(we.createSVGPoint){var Be=we.createSVGPoint();if(Nr<0){var Ue=a(Z);if(Ue.scrollX||Ue.scrollY){we=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var We=we[0][0].getScreenCTM();Nr=!(We.f||We.e),we.remove()}}return Nr?(Be.x=oe.pageX,Be.y=oe.pageY):(Be.x=oe.clientX,Be.y=oe.clientY),Be=Be.matrixTransform(Z.getScreenCTM().inverse()),[Be.x,Be.y]}var wt=Z.getBoundingClientRect();return[oe.clientX-wt.left-Z.clientLeft,oe.clientY-wt.top-Z.clientTop]}e.touch=function(Z,oe,we){if(arguments.length<3&&(we=oe,oe=Me().changedTouches),oe){for(var Be=0,Ue=oe.length,We;Be0?1:Z<0?-1:0}function Vt(Z,oe,we){return(oe[0]-Z[0])*(we[1]-Z[1])-(oe[1]-Z[1])*(we[0]-Z[0])}function ar(Z){return Z>1?0:Z<-1?Xe:Math.acos(Z)}function Qr(Z){return Z>1?xe:Z<-1?-xe:Math.asin(Z)}function ai(Z){return((Z=Math.exp(Z))-1/Z)/2}function jr(Z){return((Z=Math.exp(Z))+1/Z)/2}function ri(Z){return((Z=Math.exp(2*Z))-1)/(Z+1)}function bi(Z){return(Z=Math.sin(Z/2))*Z}var nn=Math.SQRT2,Wi=2,Ni=4;e.interpolateZoom=function(Z,oe){var we=Z[0],Be=Z[1],Ue=Z[2],We=oe[0],wt=oe[1],tt=oe[2],zt=We-we,or=wt-Be,lr=zt*zt+or*or,Rr,Ir;if(lr0&&(pn=pn.transition().duration(wt)),pn.call(ci.event)}function ga(){Kr&&Kr.domain(qr.range().map(function(pn){return(pn-Z.x)/Z.k}).map(qr.invert)),vi&&vi.domain(ii.range().map(function(pn){return(pn-Z.y)/Z.k}).map(ii.invert))}function ya(pn){tt++||pn({type:"zoomstart"})}function so(pn){ga(),pn({type:"zoom",scale:Z.k,translate:[Z.x,Z.y]})}function wa(pn){--tt||(pn({type:"zoomend"}),we=null)}function io(){var pn=this,za=ui.of(pn,arguments),Lo=0,Fo=e.select(a(pn)).on(or,fu).on(lr,dl),js=Jr(e.mouse(pn)),xl=Or(pn);ea.call(pn),ya(za);function fu(){Lo=1,En(e.mouse(pn),js),so(za)}function dl(){Fo.on(or,null).on(lr,null),xl(Lo),wa(za)}}function Ss(){var pn=this,za=ui.of(pn,arguments),Lo={},Fo=0,js,xl=".zoom-"+e.event.changedTouches[0].identifier,fu="touchmove"+xl,dl="touchend"+xl,xc=[],At=e.select(pn),Er=Or(pn);wi(),ya(za),At.on(zt,null).on(Ir,wi);function Wr(){var Bi=e.touches(pn);return js=Z.k,Bi.forEach(function(cn){cn.identifier in Lo&&(Lo[cn.identifier]=Jr(cn))}),Bi}function wi(){var Bi=e.event.target;e.select(Bi).on(fu,Ui).on(dl,Oi),xc.push(Bi);for(var cn=e.event.changedTouches,On=0,Bn=cn.length;On1){var Dn=yn[0],Rn=yn[1],fn=Dn[0]-Rn[0],Ai=Dn[1]-Rn[1];Fo=fn*fn+Ai*Ai}}function Ui(){var Bi=e.touches(pn),cn,On,Bn,yn;ea.call(pn);for(var to=0,Dn=Bi.length;to1?1:oe,we=we<0?0:we>1?1:we,Ue=we<=.5?we*(1+oe):we+oe-we*oe,Be=2*we-Ue;function We(tt){return tt>360?tt-=360:tt<0&&(tt+=360),tt<60?Be+(Ue-Be)*tt/60:tt<180?Ue:tt<240?Be+(Ue-Be)*(240-tt)/60:Be}function wt(tt){return Math.round(We(tt)*255)}return new Fa(wt(Z+120),wt(Z),wt(Z-120))}e.hcl=Zt;function Zt(Z,oe,we){return this instanceof Zt?(this.h=+Z,this.c=+oe,void(this.l=+we)):arguments.length<2?Z instanceof Zt?new Zt(Z.h,Z.c,Z.l):Z instanceof Zr?Ki(Z.l,Z.a,Z.b):Ki((Z=xn((Z=e.rgb(Z)).r,Z.g,Z.b)).l,Z.a,Z.b):new Zt(Z,oe,we)}var yr=Zt.prototype=new Wn;yr.brighter=function(Z){return new Zt(this.h,this.c,Math.min(100,this.l+Vr*(arguments.length?Z:1)))},yr.darker=function(Z){return new Zt(this.h,this.c,Math.max(0,this.l-Vr*(arguments.length?Z:1)))},yr.rgb=function(){return Fr(this.h,this.c,this.l).rgb()};function Fr(Z,oe,we){return isNaN(Z)&&(Z=0),isNaN(oe)&&(oe=0),new Zr(we,Math.cos(Z*=Se)*oe,Math.sin(Z)*oe)}e.lab=Zr;function Zr(Z,oe,we){return this instanceof Zr?(this.l=+Z,this.a=+oe,void(this.b=+we)):arguments.length<2?Z instanceof Zr?new Zr(Z.l,Z.a,Z.b):Z instanceof Zt?Fr(Z.h,Z.c,Z.l):xn((Z=Fa(Z)).r,Z.g,Z.b):new Zr(Z,oe,we)}var Vr=18,gi=.95047,Si=1,Mi=1.08883,Pi=Zr.prototype=new Wn;Pi.brighter=function(Z){return new Zr(Math.min(100,this.l+Vr*(arguments.length?Z:1)),this.a,this.b)},Pi.darker=function(Z){return new Zr(Math.max(0,this.l-Vr*(arguments.length?Z:1)),this.a,this.b)},Pi.rgb=function(){return Gi(this.l,this.a,this.b)};function Gi(Z,oe,we){var Be=(Z+16)/116,Ue=Be+oe/500,We=Be-we/200;return Ue=ka(Ue)*gi,Be=ka(Be)*Si,We=ka(We)*Mi,new Fa(la(3.2404542*Ue-1.5371385*Be-.4985314*We),la(-.969266*Ue+1.8760108*Be+.041556*We),la(.0556434*Ue-.2040259*Be+1.0572252*We))}function Ki(Z,oe,we){return Z>0?new Zt(Math.atan2(we,oe)*lt,Math.sqrt(oe*oe+we*we),Z):new Zt(NaN,NaN,Z)}function ka(Z){return Z>.206893034?Z*Z*Z:(Z-4/29)/7.787037}function jn(Z){return Z>.008856?Math.pow(Z,1/3):7.787037*Z+4/29}function la(Z){return Math.round(255*(Z<=.00304?12.92*Z:1.055*Math.pow(Z,1/2.4)-.055))}e.rgb=Fa;function Fa(Z,oe,we){return this instanceof Fa?(this.r=~~Z,this.g=~~oe,void(this.b=~~we)):arguments.length<2?Z instanceof Fa?new Fa(Z.r,Z.g,Z.b):Ha(""+Z,Fa,jt):new Fa(Z,oe,we)}function Da(Z){return new Fa(Z>>16,Z>>8&255,Z&255)}function jo(Z){return Da(Z)+""}var oa=Fa.prototype=new Wn;oa.brighter=function(Z){Z=Math.pow(.7,arguments.length?Z:1);var oe=this.r,we=this.g,Be=this.b,Ue=30;return!oe&&!we&&!Be?new Fa(Ue,Ue,Ue):(oe&&oe>4,Be=Be>>4|Be,Ue=zt&240,Ue=Ue>>4|Ue,We=zt&15,We=We<<4|We):Z.length===7&&(Be=(zt&16711680)>>16,Ue=(zt&65280)>>8,We=zt&255)),oe(Be,Ue,We))}function oo(Z,oe,we){var Be=Math.min(Z/=255,oe/=255,we/=255),Ue=Math.max(Z,oe,we),We=Ue-Be,wt,tt,zt=(Ue+Be)/2;return We?(tt=zt<.5?We/(Ue+Be):We/(2-Ue-Be),Z==Ue?wt=(oe-we)/We+(oe0&&zt<1?0:wt),new It(wt,tt,zt)}function xn(Z,oe,we){Z=_t(Z),oe=_t(oe),we=_t(we);var Be=jn((.4124564*Z+.3575761*oe+.1804375*we)/gi),Ue=jn((.2126729*Z+.7151522*oe+.072175*we)/Si),We=jn((.0193339*Z+.119192*oe+.9503041*we)/Mi);return Zr(116*Ue-16,500*(Be-Ue),200*(Ue-We))}function _t(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function br(Z){var oe=parseFloat(Z);return Z.charAt(Z.length-1)==="%"?Math.round(oe*2.55):oe}var Hr=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});Hr.forEach(function(Z,oe){Hr.set(Z,Da(oe))});function ti(Z){return typeof Z=="function"?Z:function(){return Z}}e.functor=ti,e.xhr=zi(H);function zi(Z){return function(oe,we,Be){return arguments.length===2&&typeof we=="function"&&(Be=we,we=null),Yi(oe,we,Z,Be)}}function Yi(Z,oe,we,Be){var Ue={},We=e.dispatch("beforesend","progress","load","error"),wt={},tt=new XMLHttpRequest,zt=null;self.XDomainRequest&&!("withCredentials"in tt)&&/^(http(s)?:)?\/\//.test(Z)&&(tt=new XDomainRequest),"onload"in tt?tt.onload=tt.onerror=or:tt.onreadystatechange=function(){tt.readyState>3&&or()};function or(){var lr=tt.status,Rr;if(!lr&&hi(tt)||lr>=200&&lr<300||lr===304){try{Rr=we.call(Ue,tt)}catch(Ir){We.error.call(Ue,Ir);return}We.load.call(Ue,Rr)}else We.error.call(Ue,tt)}return tt.onprogress=function(lr){var Rr=e.event;e.event=lr;try{We.progress.call(Ue,tt)}finally{e.event=Rr}},Ue.header=function(lr,Rr){return lr=(lr+"").toLowerCase(),arguments.length<2?wt[lr]:(Rr==null?delete wt[lr]:wt[lr]=Rr+"",Ue)},Ue.mimeType=function(lr){return arguments.length?(oe=lr==null?null:lr+"",Ue):oe},Ue.responseType=function(lr){return arguments.length?(zt=lr,Ue):zt},Ue.response=function(lr){return we=lr,Ue},["get","post"].forEach(function(lr){Ue[lr]=function(){return Ue.send.apply(Ue,[lr].concat(r(arguments)))}}),Ue.send=function(lr,Rr,Ir){if(arguments.length===2&&typeof Rr=="function"&&(Ir=Rr,Rr=null),tt.open(lr,Z,!0),oe!=null&&!("accept"in wt)&&(wt.accept=oe+",*/*"),tt.setRequestHeader)for(var oi in wt)tt.setRequestHeader(oi,wt[oi]);return oe!=null&&tt.overrideMimeType&&tt.overrideMimeType(oe),zt!=null&&(tt.responseType=zt),Ir!=null&&Ue.on("error",Ir).on("load",function(ui){Ir(null,ui)}),We.beforesend.call(Ue,tt),tt.send(Rr==null?null:Rr),Ue},Ue.abort=function(){return tt.abort(),Ue},e.rebind(Ue,We,"on"),Be==null?Ue:Ue.get(an(Be))}function an(Z){return Z.length===1?function(oe,we){Z(oe==null?we:null)}:Z}function hi(Z){var oe=Z.responseType;return oe&&oe!=="text"?Z.response:Z.responseText}e.dsv=function(Z,oe){var we=new RegExp('["'+Z+` +"use strict";var Plotly=(()=>{var $C=Object.defineProperty,zQe=Object.defineProperties,FQe=Object.getOwnPropertyDescriptor,qQe=Object.getOwnPropertyDescriptors,OQe=Object.getOwnPropertyNames,WQ=Object.getOwnPropertySymbols;var XQ=Object.prototype.hasOwnProperty,BQe=Object.prototype.propertyIsEnumerable;var ZQ=(e,t,r)=>t in e?$C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YQ=(e,t)=>{for(var r in t||(t={}))XQ.call(t,r)&&ZQ(e,r,t[r]);if(WQ)for(var r of WQ(t))BQe.call(t,r)&&ZQ(e,r,t[r]);return e},KQ=(e,t)=>zQe(e,qQe(t));var su=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),NQe=(e,t)=>{for(var r in t)$C(e,r,{get:t[r],enumerable:!0})},UQe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of OQe(t))!XQ.call(e,i)&&i!==r&&$C(e,i,{get:()=>t[i],enumerable:!(n=FQe(t,i))||n.enumerable});return e};var ab=e=>UQe($C({},"__esModule",{value:!0}),e);var QC=ye(JQ=>{"use strict";JQ.version="3.0.0-rc.0"});var QQ=ye(($Q,e6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof e6!="undefined"&&e6.exports?e6.exports=r[t]:typeof define=="function"&&define.amd&&define(function(){return r[t]})})("Promise",typeof window!="undefined"?window:$Q,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(E){return setImmediate(E)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(E,k,A,L){return Object.defineProperty(E,k,{value:A,writable:!0,configurable:L!==!1})}}catch(g){t=function(k,A,L){return k[A]=L,k}}n=function(){var E,k,A;function L(_,C){this.fn=_,this.self=C,this.next=void 0}return{add:function(C,M){A=new L(C,M),k?k.next=A:E=A,k=A,A=void 0},drain:function(){var C=E;for(E=k=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(g,E){n.add(g,E),r||(r=a(n.drain))}function s(g){var E,k=typeof g;return g!=null&&(k=="object"||k=="function")&&(E=g.then),typeof E=="function"?E:!1}function l(){for(var g=0;g0&&o(l,k))}catch(A){f.call(new d(k),A)}}}function f(g){var E=this;E.triggered||(E.triggered=!0,E.def&&(E=E.def),E.msg=g,E.state=2,E.chain.length>0&&o(l,E))}function h(g,E,k,A){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(Z){return t.call(Z)},n=self.document;function i(Z){return Z&&(Z.ownerDocument||Z.document||Z).documentElement}function a(Z){return Z&&(Z.ownerDocument&&Z.ownerDocument.defaultView||Z.document&&Z||Z.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(Z){r=function(oe){for(var we=oe.length,Be=new Array(we);we--;)Be[we]=oe[we];return Be}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(Z){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(oe,we){s.call(this,oe,we+"")},o.setAttributeNS=function(oe,we,Be){l.call(this,oe,we,Be+"")},u.setProperty=function(oe,we,Be){c.call(this,oe,we+"",Be)}}e.ascending=f;function f(Z,oe){return Zoe?1:Z>=oe?0:NaN}e.descending=function(Z,oe){return oeZ?1:oe>=Z?0:NaN},e.min=function(Z,oe){var we=-1,Be=Z.length,Ue,We;if(arguments.length===1){for(;++we=We){Ue=We;break}for(;++weWe&&(Ue=We)}else{for(;++we=We){Ue=We;break}for(;++weWe&&(Ue=We)}return Ue},e.max=function(Z,oe){var we=-1,Be=Z.length,Ue,We;if(arguments.length===1){for(;++we=We){Ue=We;break}for(;++weUe&&(Ue=We)}else{for(;++we=We){Ue=We;break}for(;++weUe&&(Ue=We)}return Ue},e.extent=function(Z,oe){var we=-1,Be=Z.length,Ue,We,wt;if(arguments.length===1){for(;++we=We){Ue=wt=We;break}for(;++weWe&&(Ue=We),wt=We){Ue=wt=We;break}for(;++weWe&&(Ue=We),wt1)return wt/(zt-1)},e.deviation=function(){var Z=e.variance.apply(this,arguments);return Z&&Math.sqrt(Z)};function v(Z){return{left:function(oe,we,Be,Ue){for(arguments.length<3&&(Be=0),arguments.length<4&&(Ue=oe.length);Be>>1;Z(oe[We],we)<0?Be=We+1:Ue=We}return Be},right:function(oe,we,Be,Ue){for(arguments.length<3&&(Be=0),arguments.length<4&&(Ue=oe.length);Be>>1;Z(oe[We],we)>0?Ue=We:Be=We+1}return Be}}}var x=v(f);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(Z){return v(Z.length===1?function(oe,we){return f(Z(oe),we)}:Z)},e.shuffle=function(Z,oe,we){(Be=arguments.length)<3&&(we=Z.length,Be<2&&(oe=0));for(var Be=we-oe,Ue,We;Be;)We=Math.random()*Be--|0,Ue=Z[Be+oe],Z[Be+oe]=Z[We+oe],Z[We+oe]=Ue;return Z},e.permute=function(Z,oe){for(var we=oe.length,Be=new Array(we);we--;)Be[we]=Z[oe[we]];return Be},e.pairs=function(Z){for(var oe=0,we=Z.length-1,Be,Ue=Z[0],We=new Array(we<0?0:we);oe=0;)for(wt=Z[oe],we=wt.length;--we>=0;)We[--Ue]=wt[we];return We};var g=Math.abs;e.range=function(Z,oe,we){if(arguments.length<3&&(we=1,arguments.length<2&&(oe=Z,Z=0)),(oe-Z)/we===1/0)throw new Error("infinite range");var Be=[],Ue=E(g(we)),We=-1,wt;if(Z*=Ue,oe*=Ue,we*=Ue,we<0)for(;(wt=Z+we*++We)>oe;)Be.push(wt/Ue);else for(;(wt=Z+we*++We)=oe.length)return Ue?Ue.call(Z,zt):Be?zt.sort(Be):zt;for(var lr=-1,Rr=zt.length,Ir=oe[or++],oi,ui,qr,Kr=new A,ii;++lr=oe.length)return tt;var or=[],lr=we[zt++];return tt.forEach(function(Rr,Ir){or.push({key:Rr,values:wt(Ir,zt)})}),lr?or.sort(function(Rr,Ir){return lr(Rr.key,Ir.key)}):or}return Z.map=function(tt,zt){return We(zt,tt,0)},Z.entries=function(tt){return wt(We(e.map,tt,0),0)},Z.key=function(tt){return oe.push(tt),Z},Z.sortKeys=function(tt){return we[oe.length-1]=tt,Z},Z.sortValues=function(tt){return Be=tt,Z},Z.rollup=function(tt){return Ue=tt,Z},Z},e.set=function(Z){var oe=new V;if(Z)for(var we=0,Be=Z.length;we=0&&(Be=Z.slice(we+1),Z=Z.slice(0,we)),Z)return arguments.length<2?this[Z].on(Be):this[Z].on(Be,oe);if(arguments.length===2){if(oe==null)for(Z in this)this.hasOwnProperty(Z)&&this[Z].on(Be,null);return this}};function ae(Z){var oe=[],we=new A;function Be(){for(var Ue=oe,We=-1,wt=Ue.length,tt;++We=0&&(we=Z.slice(0,oe))!=="xmlns"&&(Z=Z.slice(oe+1)),Ge.hasOwnProperty(we)?{space:Ge[we],local:Z}:Z}},Ce.attr=function(Z,oe){if(arguments.length<2){if(typeof Z=="string"){var we=this.node();return Z=e.ns.qualify(Z),Z.local?we.getAttributeNS(Z.space,Z.local):we.getAttribute(Z)}for(oe in Z)this.each(nt(oe,Z[oe]));return this}return this.each(nt(Z,oe))};function nt(Z,oe){Z=e.ns.qualify(Z);function we(){this.removeAttribute(Z)}function Be(){this.removeAttributeNS(Z.space,Z.local)}function Ue(){this.setAttribute(Z,oe)}function We(){this.setAttributeNS(Z.space,Z.local,oe)}function wt(){var zt=oe.apply(this,arguments);zt==null?this.removeAttribute(Z):this.setAttribute(Z,zt)}function tt(){var zt=oe.apply(this,arguments);zt==null?this.removeAttributeNS(Z.space,Z.local):this.setAttributeNS(Z.space,Z.local,zt)}return oe==null?Z.local?Be:we:typeof oe=="function"?Z.local?tt:wt:Z.local?We:Ue}function ct(Z){return Z.trim().replace(/\s+/g," ")}Ce.classed=function(Z,oe){if(arguments.length<2){if(typeof Z=="string"){var we=this.node(),Be=(Z=rt(Z)).length,Ue=-1;if(oe=we.classList){for(;++Ue=0;)(We=we[Be])&&(Ue&&Ue!==We.nextSibling&&Ue.parentNode.insertBefore(We,Ue),Ue=We);return this},Ce.sort=function(Z){Z=xt.apply(this,arguments);for(var oe=-1,we=this.length;++oe=oe&&(oe=Ue+1);!(zt=wt[oe])&&++oe0&&(Z=Z.slice(0,Ue));var wt=Ht.get(Z);wt&&(Z=wt,We=fr);function tt(){var lr=this[Be];lr&&(this.removeEventListener(Z,lr,lr.$),delete this[Be])}function zt(){var lr=We(oe,r(arguments));tt.call(this),this.addEventListener(Z,this[Be]=lr,lr.$=we),lr._=oe}function or(){var lr=new RegExp("^__on([^.]+)"+e.requote(Z)+"$"),Rr;for(var Ir in this)if(Rr=Ir.match(lr)){var oi=this[Ir];this.removeEventListener(Rr[1],oi,oi.$),delete this[Ir]}}return Ue?oe?zt:tt:oe?W:or}var Ht=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Ht.forEach(function(Z){"on"+Z in n&&Ht.remove(Z)});function $t(Z,oe){return function(we){var Be=e.event;e.event=we,oe[0]=this.__data__;try{Z.apply(this,oe)}finally{e.event=Be}}}function fr(Z,oe){var we=$t(Z,oe);return function(Be){var Ue=this,We=Be.relatedTarget;(!We||We!==Ue&&!(We.compareDocumentPosition(Ue)&8))&&we.call(Ue,Be)}}var _r,Br=0;function Or(Z){var oe=".dragsuppress-"+ ++Br,we="click"+oe,Be=e.select(a(Z)).on("touchmove"+oe,_e).on("dragstart"+oe,_e).on("selectstart"+oe,_e);if(_r==null&&(_r="onselectstart"in Z?!1:G(Z.style,"userSelect")),_r){var Ue=i(Z).style,We=Ue[_r];Ue[_r]="none"}return function(wt){if(Be.on(oe,null),_r&&(Ue[_r]=We),wt){var tt=function(){Be.on(we,null)};Be.on(we,function(){_e(),tt()},!0),setTimeout(tt,0)}}}e.mouse=function(Z){return ut(Z,Me())};var Nr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ut(Z,oe){oe.changedTouches&&(oe=oe.changedTouches[0]);var we=Z.ownerSVGElement||Z;if(we.createSVGPoint){var Be=we.createSVGPoint();if(Nr<0){var Ue=a(Z);if(Ue.scrollX||Ue.scrollY){we=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var We=we[0][0].getScreenCTM();Nr=!(We.f||We.e),we.remove()}}return Nr?(Be.x=oe.pageX,Be.y=oe.pageY):(Be.x=oe.clientX,Be.y=oe.clientY),Be=Be.matrixTransform(Z.getScreenCTM().inverse()),[Be.x,Be.y]}var wt=Z.getBoundingClientRect();return[oe.clientX-wt.left-Z.clientLeft,oe.clientY-wt.top-Z.clientTop]}e.touch=function(Z,oe,we){if(arguments.length<3&&(we=oe,oe=Me().changedTouches),oe){for(var Be=0,Ue=oe.length,We;Be0?1:Z<0?-1:0}function Vt(Z,oe,we){return(oe[0]-Z[0])*(we[1]-Z[1])-(oe[1]-Z[1])*(we[0]-Z[0])}function ar(Z){return Z>1?0:Z<-1?Xe:Math.acos(Z)}function Qr(Z){return Z>1?xe:Z<-1?-xe:Math.asin(Z)}function ai(Z){return((Z=Math.exp(Z))-1/Z)/2}function jr(Z){return((Z=Math.exp(Z))+1/Z)/2}function ri(Z){return((Z=Math.exp(2*Z))-1)/(Z+1)}function bi(Z){return(Z=Math.sin(Z/2))*Z}var nn=Math.SQRT2,Wi=2,Ni=4;e.interpolateZoom=function(Z,oe){var we=Z[0],Be=Z[1],Ue=Z[2],We=oe[0],wt=oe[1],tt=oe[2],zt=We-we,or=wt-Be,lr=zt*zt+or*or,Rr,Ir;if(lr0&&(pn=pn.transition().duration(wt)),pn.call(ci.event)}function ga(){Kr&&Kr.domain(qr.range().map(function(pn){return(pn-Z.x)/Z.k}).map(qr.invert)),vi&&vi.domain(ii.range().map(function(pn){return(pn-Z.y)/Z.k}).map(ii.invert))}function ya(pn){tt++||pn({type:"zoomstart"})}function so(pn){ga(),pn({type:"zoom",scale:Z.k,translate:[Z.x,Z.y]})}function wa(pn){--tt||(pn({type:"zoomend"}),we=null)}function io(){var pn=this,za=ui.of(pn,arguments),Lo=0,Fo=e.select(a(pn)).on(or,fu).on(lr,dl),js=Jr(e.mouse(pn)),xl=Or(pn);ea.call(pn),ya(za);function fu(){Lo=1,En(e.mouse(pn),js),so(za)}function dl(){Fo.on(or,null).on(lr,null),xl(Lo),wa(za)}}function Ss(){var pn=this,za=ui.of(pn,arguments),Lo={},Fo=0,js,xl=".zoom-"+e.event.changedTouches[0].identifier,fu="touchmove"+xl,dl="touchend"+xl,xc=[],At=e.select(pn),Er=Or(pn);wi(),ya(za),At.on(zt,null).on(Ir,wi);function Wr(){var Bi=e.touches(pn);return js=Z.k,Bi.forEach(function(cn){cn.identifier in Lo&&(Lo[cn.identifier]=Jr(cn))}),Bi}function wi(){var Bi=e.event.target;e.select(Bi).on(fu,Ui).on(dl,Oi),xc.push(Bi);for(var cn=e.event.changedTouches,On=0,Bn=cn.length;On1){var Dn=yn[0],Rn=yn[1],fn=Dn[0]-Rn[0],Ai=Dn[1]-Rn[1];Fo=fn*fn+Ai*Ai}}function Ui(){var Bi=e.touches(pn),cn,On,Bn,yn;ea.call(pn);for(var to=0,Dn=Bi.length;to1?1:oe,we=we<0?0:we>1?1:we,Ue=we<=.5?we*(1+oe):we+oe-we*oe,Be=2*we-Ue;function We(tt){return tt>360?tt-=360:tt<0&&(tt+=360),tt<60?Be+(Ue-Be)*tt/60:tt<180?Ue:tt<240?Be+(Ue-Be)*(240-tt)/60:Be}function wt(tt){return Math.round(We(tt)*255)}return new Fa(wt(Z+120),wt(Z),wt(Z-120))}e.hcl=Zt;function Zt(Z,oe,we){return this instanceof Zt?(this.h=+Z,this.c=+oe,void(this.l=+we)):arguments.length<2?Z instanceof Zt?new Zt(Z.h,Z.c,Z.l):Z instanceof Zr?Ki(Z.l,Z.a,Z.b):Ki((Z=xn((Z=e.rgb(Z)).r,Z.g,Z.b)).l,Z.a,Z.b):new Zt(Z,oe,we)}var yr=Zt.prototype=new Wn;yr.brighter=function(Z){return new Zt(this.h,this.c,Math.min(100,this.l+Vr*(arguments.length?Z:1)))},yr.darker=function(Z){return new Zt(this.h,this.c,Math.max(0,this.l-Vr*(arguments.length?Z:1)))},yr.rgb=function(){return Fr(this.h,this.c,this.l).rgb()};function Fr(Z,oe,we){return isNaN(Z)&&(Z=0),isNaN(oe)&&(oe=0),new Zr(we,Math.cos(Z*=Se)*oe,Math.sin(Z)*oe)}e.lab=Zr;function Zr(Z,oe,we){return this instanceof Zr?(this.l=+Z,this.a=+oe,void(this.b=+we)):arguments.length<2?Z instanceof Zr?new Zr(Z.l,Z.a,Z.b):Z instanceof Zt?Fr(Z.h,Z.c,Z.l):xn((Z=Fa(Z)).r,Z.g,Z.b):new Zr(Z,oe,we)}var Vr=18,gi=.95047,Si=1,Mi=1.08883,Pi=Zr.prototype=new Wn;Pi.brighter=function(Z){return new Zr(Math.min(100,this.l+Vr*(arguments.length?Z:1)),this.a,this.b)},Pi.darker=function(Z){return new Zr(Math.max(0,this.l-Vr*(arguments.length?Z:1)),this.a,this.b)},Pi.rgb=function(){return Gi(this.l,this.a,this.b)};function Gi(Z,oe,we){var Be=(Z+16)/116,Ue=Be+oe/500,We=Be-we/200;return Ue=ka(Ue)*gi,Be=ka(Be)*Si,We=ka(We)*Mi,new Fa(la(3.2404542*Ue-1.5371385*Be-.4985314*We),la(-.969266*Ue+1.8760108*Be+.041556*We),la(.0556434*Ue-.2040259*Be+1.0572252*We))}function Ki(Z,oe,we){return Z>0?new Zt(Math.atan2(we,oe)*lt,Math.sqrt(oe*oe+we*we),Z):new Zt(NaN,NaN,Z)}function ka(Z){return Z>.206893034?Z*Z*Z:(Z-4/29)/7.787037}function jn(Z){return Z>.008856?Math.pow(Z,1/3):7.787037*Z+4/29}function la(Z){return Math.round(255*(Z<=.00304?12.92*Z:1.055*Math.pow(Z,1/2.4)-.055))}e.rgb=Fa;function Fa(Z,oe,we){return this instanceof Fa?(this.r=~~Z,this.g=~~oe,void(this.b=~~we)):arguments.length<2?Z instanceof Fa?new Fa(Z.r,Z.g,Z.b):Ha(""+Z,Fa,jt):new Fa(Z,oe,we)}function Da(Z){return new Fa(Z>>16,Z>>8&255,Z&255)}function jo(Z){return Da(Z)+""}var oa=Fa.prototype=new Wn;oa.brighter=function(Z){Z=Math.pow(.7,arguments.length?Z:1);var oe=this.r,we=this.g,Be=this.b,Ue=30;return!oe&&!we&&!Be?new Fa(Ue,Ue,Ue):(oe&&oe>4,Be=Be>>4|Be,Ue=zt&240,Ue=Ue>>4|Ue,We=zt&15,We=We<<4|We):Z.length===7&&(Be=(zt&16711680)>>16,Ue=(zt&65280)>>8,We=zt&255)),oe(Be,Ue,We))}function oo(Z,oe,we){var Be=Math.min(Z/=255,oe/=255,we/=255),Ue=Math.max(Z,oe,we),We=Ue-Be,wt,tt,zt=(Ue+Be)/2;return We?(tt=zt<.5?We/(Ue+Be):We/(2-Ue-Be),Z==Ue?wt=(oe-we)/We+(oe0&&zt<1?0:wt),new It(wt,tt,zt)}function xn(Z,oe,we){Z=_t(Z),oe=_t(oe),we=_t(we);var Be=jn((.4124564*Z+.3575761*oe+.1804375*we)/gi),Ue=jn((.2126729*Z+.7151522*oe+.072175*we)/Si),We=jn((.0193339*Z+.119192*oe+.9503041*we)/Mi);return Zr(116*Ue-16,500*(Be-Ue),200*(Ue-We))}function _t(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function br(Z){var oe=parseFloat(Z);return Z.charAt(Z.length-1)==="%"?Math.round(oe*2.55):oe}var Hr=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});Hr.forEach(function(Z,oe){Hr.set(Z,Da(oe))});function ti(Z){return typeof Z=="function"?Z:function(){return Z}}e.functor=ti,e.xhr=zi(H);function zi(Z){return function(oe,we,Be){return arguments.length===2&&typeof we=="function"&&(Be=we,we=null),Yi(oe,we,Z,Be)}}function Yi(Z,oe,we,Be){var Ue={},We=e.dispatch("beforesend","progress","load","error"),wt={},tt=new XMLHttpRequest,zt=null;self.XDomainRequest&&!("withCredentials"in tt)&&/^(http(s)?:)?\/\//.test(Z)&&(tt=new XDomainRequest),"onload"in tt?tt.onload=tt.onerror=or:tt.onreadystatechange=function(){tt.readyState>3&&or()};function or(){var lr=tt.status,Rr;if(!lr&&hi(tt)||lr>=200&&lr<300||lr===304){try{Rr=we.call(Ue,tt)}catch(Ir){We.error.call(Ue,Ir);return}We.load.call(Ue,Rr)}else We.error.call(Ue,tt)}return tt.onprogress=function(lr){var Rr=e.event;e.event=lr;try{We.progress.call(Ue,tt)}finally{e.event=Rr}},Ue.header=function(lr,Rr){return lr=(lr+"").toLowerCase(),arguments.length<2?wt[lr]:(Rr==null?delete wt[lr]:wt[lr]=Rr+"",Ue)},Ue.mimeType=function(lr){return arguments.length?(oe=lr==null?null:lr+"",Ue):oe},Ue.responseType=function(lr){return arguments.length?(zt=lr,Ue):zt},Ue.response=function(lr){return we=lr,Ue},["get","post"].forEach(function(lr){Ue[lr]=function(){return Ue.send.apply(Ue,[lr].concat(r(arguments)))}}),Ue.send=function(lr,Rr,Ir){if(arguments.length===2&&typeof Rr=="function"&&(Ir=Rr,Rr=null),tt.open(lr,Z,!0),oe!=null&&!("accept"in wt)&&(wt.accept=oe+",*/*"),tt.setRequestHeader)for(var oi in wt)tt.setRequestHeader(oi,wt[oi]);return oe!=null&&tt.overrideMimeType&&tt.overrideMimeType(oe),zt!=null&&(tt.responseType=zt),Ir!=null&&Ue.on("error",Ir).on("load",function(ui){Ir(null,ui)}),We.beforesend.call(Ue,tt),tt.send(Rr==null?null:Rr),Ue},Ue.abort=function(){return tt.abort(),Ue},e.rebind(Ue,We,"on"),Be==null?Ue:Ue.get(an(Be))}function an(Z){return Z.length===1?function(oe,we){Z(oe==null?we:null)}:Z}function hi(Z){var oe=Z.responseType;return oe&&oe!=="text"?Z.response:Z.responseText}e.dsv=function(Z,oe){var we=new RegExp('["'+Z+` ]`),Be=Z.charCodeAt(0);function Ue(or,lr,Rr){arguments.length<3&&(Rr=lr,lr=null);var Ir=Yi(or,oe,lr==null?We:wt(lr),Rr);return Ir.row=function(oi){return arguments.length?Ir.response((lr=oi)==null?We:wt(oi)):lr},Ir}function We(or){return Ue.parse(or.responseText)}function wt(or){return function(lr){return Ue.parse(lr.responseText,or)}}Ue.parse=function(or,lr){var Rr;return Ue.parseRows(or,function(Ir,oi){if(Rr)return Rr(Ir,oi-1);var ui=function(qr){for(var Kr={},ii=Ir.length,vi=0;vi=ui)return Ir;if(vi)return vi=!1,Rr;var un=qr;if(or.charCodeAt(un)===34){for(var dn=un;dn++24?(isFinite(oe)&&(clearTimeout(Sa),Sa=setTimeout(ho,oe)),Fn=0):(Fn=1,go(ho))}e.timer.flush=function(){Mo(),xo()};function Mo(){for(var Z=Date.now(),oe=Ji;oe;)Z>=oe.t&&oe.c(Z-oe.t)&&(oe.c=null),oe=oe.n;return Z}function xo(){for(var Z,oe=Ji,we=1/0;oe;)oe.c?(oe.t=0;--tt)qr.push(Ue[or[Rr[tt]][2]]);for(tt=+oi;tt1&&Vt(Z[we[Be-2]],Z[we[Be-1]],Z[Ue])<=0;)--Be;we[Be++]=Ue}return we.slice(0,Be)}function Xs(Z,oe){return Z[0]-oe[0]||Z[1]-oe[1]}e.geom.polygon=function(Z){return ie(Z,wl),Z};var wl=e.geom.polygon.prototype=[];wl.area=function(){for(var Z=-1,oe=this.length,we,Be=this[oe-1],Ue=0;++ZYe)tt=tt.L;else if(wt=oe-vo(tt,we),wt>Ye){if(!tt.R){Be=tt;break}tt=tt.R}else{We>-Ye?(Be=tt.P,Ue=tt):wt>-Ye?(Be=tt,Ue=tt.N):Be=Ue=tt;break}var zt=ms(Z);if(Hs.insert(Be,zt),!(!Be&&!Ue)){if(Be===Ue){ko(Be),Ue=ms(Be.site),Hs.insert(zt,Ue),zt.edge=Ue.edge=cf(Be.site,zt.site),Zn(Be),Zn(Ue);return}if(!Ue){zt.edge=cf(Be.site,zt.site);return}ko(Be),ko(Ue);var or=Be.site,lr=or.x,Rr=or.y,Ir=Z.x-lr,oi=Z.y-Rr,ui=Ue.site,qr=ui.x-lr,Kr=ui.y-Rr,ii=2*(Ir*Kr-oi*qr),vi=Ir*Ir+oi*oi,ci=qr*qr+Kr*Kr,Jr={x:(Kr*vi-oi*ci)/ii+lr,y:(Ir*ci-qr*vi)/ii+Rr};Al(Ue.edge,or,ui,Jr),zt.edge=cf(or,Z,null,Jr),Ue.edge=cf(Z,ui,null,Jr),Zn(Be),Zn(Ue)}}function Il(Z,oe){var we=Z.site,Be=we.x,Ue=we.y,We=Ue-oe;if(!We)return Be;var wt=Z.P;if(!wt)return-1/0;we=wt.site;var tt=we.x,zt=we.y,or=zt-oe;if(!or)return tt;var lr=tt-Be,Rr=1/We-1/or,Ir=lr/or;return Rr?(-Ir+Math.sqrt(Ir*Ir-2*Rr*(lr*lr/(-2*or)-zt+or/2+Ue-We/2)))/Rr+Be:(Be+tt)/2}function vo(Z,oe){var we=Z.N;if(we)return Il(we,oe);var Be=Z.site;return Be.y===oe?Be.x:1/0}function Wl(Z){this.site=Z,this.edges=[]}Wl.prototype.prepare=function(){for(var Z=this.edges,oe=Z.length,we;oe--;)we=Z[oe].edge,(!we.b||!we.a)&&Z.splice(oe,1);return Z.sort(Zl),Z.length};function Ks(Z){for(var oe=Z[0][0],we=Z[1][0],Be=Z[0][1],Ue=Z[1][1],We,wt,tt,zt,or=Ys,lr=or.length,Rr,Ir,oi,ui,qr,Kr;lr--;)if(Rr=or[lr],!(!Rr||!Rr.prepare()))for(oi=Rr.edges,ui=oi.length,Ir=0;IrYe||g(zt-wt)>Ye)&&(oi.splice(Ir,0,new Hc(rh(Rr.site,Kr,g(tt-oe)Ye?{x:oe,y:g(We-oe)Ye?{x:g(wt-Ue)Ye?{x:we,y:g(We-we)Ye?{x:g(wt-Be)=-Ve)){var Ir=zt*zt+or*or,oi=lr*lr+Kr*Kr,ui=(Kr*Ir-or*oi)/Rr,qr=(zt*oi-lr*Ir)/Rr,Kr=qr+tt,ii=Gu.pop()||new Ec;ii.arc=Z,ii.site=Ue,ii.x=ui+wt,ii.y=Kr+Math.sqrt(ui*ui+qr*qr),ii.cy=Kr,Z.circle=ii;for(var vi=null,ci=$l._;ci;)if(ii.y0)){if(qr/=oi,oi<0){if(qr0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}if(qr=we-tt,!(!oi&&qr<0)){if(qr/=oi,oi<0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}else if(oi>0){if(qr0)){if(qr/=ui,ui<0){if(qr0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}if(qr=Be-zt,!(!ui&&qr<0)){if(qr/=ui,ui<0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}else if(ui>0){if(qr0&&(Ue.a={x:tt+Rr*oi,y:zt+Rr*ui}),Ir<1&&(Ue.b={x:tt+Ir*oi,y:zt+Ir*ui}),Ue}}}}}}function Tl(Z){for(var oe=ml,we=Co(Z[0][0],Z[0][1],Z[1][0],Z[1][1]),Be=oe.length,Ue;Be--;)Ue=oe[Be],(!uf(Ue,Z)||!we(Ue)||g(Ue.a.x-Ue.b.x)=We)return;if(lr>Ir){if(!Be)Be={x:ui,y:wt};else if(Be.y>=tt)return;we={x:ui,y:tt}}else{if(!Be)Be={x:ui,y:tt};else if(Be.y1)if(lr>Ir){if(!Be)Be={x:(wt-ii)/Kr,y:wt};else if(Be.y>=tt)return;we={x:(tt-ii)/Kr,y:tt}}else{if(!Be)Be={x:(tt-ii)/Kr,y:tt};else if(Be.y=We)return;we={x:We,y:Kr*We+ii}}else{if(!Be)Be={x:We,y:Kr*We+ii};else if(Be.x=lr&&ii.x<=Ir&&ii.y>=Rr&&ii.y<=oi?[[lr,oi],[Ir,oi],[Ir,Rr],[lr,Rr]]:[];vi.point=zt[qr]}),or}function tt(zt){return zt.map(function(or,lr){return{x:Math.round(Be(or,lr)/Ye)*Ye,y:Math.round(Ue(or,lr)/Ye)*Ye,i:lr}})}return wt.links=function(zt){return Gc(tt(zt)).edges.filter(function(or){return or.l&&or.r}).map(function(or){return{source:zt[or.l.i],target:zt[or.r.i]}})},wt.triangles=function(zt){var or=[];return Gc(tt(zt)).cells.forEach(function(lr,Rr){for(var Ir=lr.site,oi=lr.edges.sort(Zl),ui=-1,qr=oi.length,Kr,ii,vi=oi[qr-1].edge,ci=vi.l===Ir?vi.r:vi.l;++uici&&(ci=lr.x),lr.y>Jr&&(Jr=lr.y),oi.push(lr.x),ui.push(lr.y);else for(qr=0;qrci&&(ci=un),dn>Jr&&(Jr=dn),oi.push(un),ui.push(dn)}var En=ci-ii,Nn=Jr-vi;En>Nn?Jr=vi+En:ci=ii+Nn;function ga(wa,io,Ss,_s,Ns,pn,za,Lo){if(!(isNaN(Ss)||isNaN(_s)))if(wa.leaf){var Fo=wa.x,js=wa.y;if(Fo!=null)if(g(Fo-Ss)+g(js-_s)<.01)ya(wa,io,Ss,_s,Ns,pn,za,Lo);else{var xl=wa.point;wa.x=wa.y=wa.point=null,ya(wa,xl,Fo,js,Ns,pn,za,Lo),ya(wa,io,Ss,_s,Ns,pn,za,Lo)}else wa.x=Ss,wa.y=_s,wa.point=io}else ya(wa,io,Ss,_s,Ns,pn,za,Lo)}function ya(wa,io,Ss,_s,Ns,pn,za,Lo){var Fo=(Ns+za)*.5,js=(pn+Lo)*.5,xl=Ss>=Fo,fu=_s>=js,dl=fu<<1|xl;wa.leaf=!1,wa=wa.nodes[dl]||(wa.nodes[dl]=Ul()),xl?Ns=Fo:za=Fo,fu?pn=js:Lo=js,ga(wa,io,Ss,_s,Ns,pn,za,Lo)}var so=Ul();if(so.add=function(wa){ga(so,wa,+Rr(wa,++qr),+Ir(wa,qr),ii,vi,ci,Jr)},so.visit=function(wa){Js(wa,so,ii,vi,ci,Jr)},so.find=function(wa){return hc(so,wa[0],wa[1],ii,vi,ci,Jr)},qr=-1,oe==null){for(;++qrWe||Ir>wt||oi=un,Nn=we>=dn,ga=Nn<<1|En,ya=ga+4;gawe&&(We=oe.slice(we,We),tt[wt]?tt[wt]+=We:tt[++wt]=We),(Be=Be[0])===(Ue=Ue[0])?tt[wt]?tt[wt]+=Ue:tt[++wt]=Ue:(tt[++wt]=null,zt.push({i:wt,x:$s(Be,Ue)})),we=dc.lastIndex;return we=0&&!(Be=e.interpolators[we](Z,oe)););return Be}e.interpolators=[function(Z,oe){var we=typeof oe;return(we==="string"?Hr.has(oe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(oe)?Cc:hs:oe instanceof Wn?Cc:Array.isArray(oe)?ec:we==="object"&&isNaN(oe)?ws:$s)(Z,oe)}],e.interpolateArray=ec;function ec(Z,oe){var we=[],Be=[],Ue=Z.length,We=oe.length,wt=Math.min(Z.length,oe.length),tt;for(tt=0;tt=0?Z.slice(0,oe):Z,Be=oe>=0?Z.slice(oe+1):"in";return we=ov.get(we)||Ps,Be=wo.get(Be)||H,Od(Be(we.apply(null,t.call(arguments,1))))};function Od(Z){return function(oe){return oe<=0?0:oe>=1?1:Z(oe)}}function $o(Z){return function(oe){return 1-Z(1-oe)}}function Ja(Z){return function(oe){return .5*(oe<.5?Z(2*oe):2-Z(2-2*oe))}}function Ef(Z){return Z*Z}function tc(Z){return Z*Z*Z}function uu(Z){if(Z<=0)return 0;if(Z>=1)return 1;var oe=Z*Z,we=oe*Z;return 4*(Z<.5?we:3*(Z-oe)+we-.75)}function Mh(Z){return function(oe){return Math.pow(oe,Z)}}function jc(Z){return 1-Math.cos(Z*xe)}function kf(Z){return Math.pow(2,10*(Z-1))}function Ml(Z){return 1-Math.sqrt(1-Z*Z)}function Yh(Z,oe){var we;return arguments.length<2&&(oe=.45),arguments.length?we=oe/ht*Math.asin(1/Z):(Z=1,we=oe/4),function(Be){return 1+Z*Math.pow(2,-10*Be)*Math.sin((Be-we)*ht/oe)}}function Eh(Z){return Z||(Z=1.70158),function(oe){return oe*oe*((Z+1)*oe-Z)}}function nh(Z){return Z<1/2.75?7.5625*Z*Z:Z<2/2.75?7.5625*(Z-=1.5/2.75)*Z+.75:Z<2.5/2.75?7.5625*(Z-=2.25/2.75)*Z+.9375:7.5625*(Z-=2.625/2.75)*Z+.984375}e.interpolateHcl=hf;function hf(Z,oe){Z=e.hcl(Z),oe=e.hcl(oe);var we=Z.h,Be=Z.c,Ue=Z.l,We=oe.h-we,wt=oe.c-Be,tt=oe.l-Ue;return isNaN(wt)&&(wt=0,Be=isNaN(Be)?oe.c:Be),isNaN(We)?(We=0,we=isNaN(we)?oe.h:we):We>180?We-=360:We<-180&&(We+=360),function(zt){return Fr(we+We*zt,Be+wt*zt,Ue+tt*zt)+""}}e.interpolateHsl=kh;function kh(Z,oe){Z=e.hsl(Z),oe=e.hsl(oe);var we=Z.h,Be=Z.s,Ue=Z.l,We=oe.h-we,wt=oe.s-Be,tt=oe.l-Ue;return isNaN(wt)&&(wt=0,Be=isNaN(Be)?oe.s:Be),isNaN(We)?(We=0,we=isNaN(we)?oe.h:we):We>180?We-=360:We<-180&&(We+=360),function(zt){return jt(we+We*zt,Be+wt*zt,Ue+tt*zt)+""}}e.interpolateLab=Kh;function Kh(Z,oe){Z=e.lab(Z),oe=e.lab(oe);var we=Z.l,Be=Z.a,Ue=Z.b,We=oe.l-we,wt=oe.a-Be,tt=oe.b-Ue;return function(zt){return Gi(we+We*zt,Be+wt*zt,Ue+tt*zt)+""}}e.interpolateRound=rc;function rc(Z,oe){return oe-=Z,function(we){return Math.round(Z+oe*we)}}e.transform=function(Z){var oe=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(we){if(we!=null){oe.setAttribute("transform",we);var Be=oe.transform.baseVal.consolidate()}return new ah(Be?Be.matrix:Nf)})(Z)};function ah(Z){var oe=[Z.a,Z.b],we=[Z.c,Z.d],Be=df(oe),Ue=Wc(oe,we),We=df(Cu(we,oe,-Ue))||0;oe[0]*we[1]180?oe+=360:oe-Z>180&&(Z+=360),Be.push({i:we.push(Zc(we)+"rotate(",null,")")-2,x:$s(Z,oe)})):oe&&we.push(Zc(we)+"rotate("+oe+")")}function Bd(Z,oe,we,Be){Z!==oe?Be.push({i:we.push(Zc(we)+"skewX(",null,")")-2,x:$s(Z,oe)}):oe&&we.push(Zc(we)+"skewX("+oe+")")}function Jh(Z,oe,we,Be){if(Z[0]!==oe[0]||Z[1]!==oe[1]){var Ue=we.push(Zc(we)+"scale(",null,",",null,")");Be.push({i:Ue-4,x:$s(Z[0],oe[0])},{i:Ue-2,x:$s(Z[1],oe[1])})}else(oe[0]!==1||oe[1]!==1)&&we.push(Zc(we)+"scale("+oe+")")}function Cf(Z,oe){var we=[],Be=[];return Z=e.transform(Z),oe=e.transform(oe),ds(Z.translate,oe.translate,we,Be),Ch(Z.rotate,oe.rotate,we,Be),Bd(Z.skew,oe.skew,we,Be),Jh(Z.scale,oe.scale,we,Be),Z=oe=null,function(Ue){for(var We=-1,wt=Be.length,tt;++We0?We=Jr:(we.c=null,we.t=NaN,we=null,oe.end({type:"end",alpha:We=0})):Jr>0&&(oe.start({type:"start",alpha:We=Jr}),we=Oo(Z.tick)),Z):We},Z.start=function(){var Jr,un=oi.length,dn=ui.length,En=Be[0],Nn=Be[1],ga,ya;for(Jr=0;Jr=0;)We.push(lr=or[zt]),lr.parent=tt,lr.depth=tt.depth+1;we&&(tt.value=0),tt.children=or}else we&&(tt.value=+we.call(Be,tt,tt.depth)||0),delete tt.children;return vc(Ue,function(Rr){var Ir,oi;Z&&(Ir=Rr.children)&&Ir.sort(Z),we&&(oi=Rr.parent)&&(oi.value+=Rr.value)}),wt}return Be.sort=function(Ue){return arguments.length?(Z=Ue,Be):Z},Be.children=function(Ue){return arguments.length?(oe=Ue,Be):oe},Be.value=function(Ue){return arguments.length?(we=Ue,Be):we},Be.revalue=function(Ue){return we&&(Pc(Ue,function(We){We.children&&(We.value=0)}),vc(Ue,function(We){var wt;We.children||(We.value=+we.call(Be,We,We.depth)||0),(wt=We.parent)&&(wt.value+=We.value)})),Ue},Be};function ju(Z,oe){return e.rebind(Z,oe,"sort","children","value"),Z.nodes=Z,Z.links=Iu,Z}function Pc(Z,oe){for(var we=[Z];(Z=we.pop())!=null;)if(oe(Z),(Ue=Z.children)&&(Be=Ue.length))for(var Be,Ue;--Be>=0;)we.push(Ue[Be])}function vc(Z,oe){for(var we=[Z],Be=[];(Z=we.pop())!=null;)if(Be.push(Z),(wt=Z.children)&&(We=wt.length))for(var Ue=-1,We,wt;++UeUe&&(Ue=tt),Be.push(tt)}for(wt=0;wtBe&&(we=oe,Be=Ue);return we}function Is(Z){return Z.reduce(Pf,0)}function Pf(Z,oe){return Z+oe[1]}e.layout.histogram=function(){var Z=!0,oe=Number,we=Vf,Be=Ic;function Ue(We,Ir){for(var tt=[],zt=We.map(oe,this),or=we.call(this,zt,Ir),lr=Be.call(this,or,zt,Ir),Rr,Ir=-1,oi=zt.length,ui=lr.length-1,qr=Z?1:1/oi,Kr;++Ir0)for(Ir=-1;++Ir=or[0]&&Kr<=or[1]&&(Rr=tt[e.bisect(lr,Kr,1,ui)-1],Rr.y+=qr,Rr.push(We[Ir]));return tt}return Ue.value=function(We){return arguments.length?(oe=We,Ue):oe},Ue.range=function(We){return arguments.length?(we=ti(We),Ue):we},Ue.bins=function(We){return arguments.length?(Be=typeof We=="number"?function(wt){return Wu(wt,We)}:ti(We),Ue):Be},Ue.frequency=function(We){return arguments.length?(Z=!!We,Ue):Z},Ue};function Ic(Z,oe){return Wu(Z,Math.ceil(Math.log(oe.length)/Math.LN2+1))}function Wu(Z,oe){for(var we=-1,Be=+Z[0],Ue=(Z[1]-Be)/oe,We=[];++we<=oe;)We[we]=Ue*we+Be;return We}function Vf(Z){return[e.min(Z),e.max(Z)]}e.layout.pack=function(){var Z=e.layout.hierarchy().sort(pc),oe=0,we=[1,1],Be;function Ue(We,wt){var tt=Z.call(this,We,wt),zt=tt[0],or=we[0],lr=we[1],Rr=Be==null?Math.sqrt:typeof Be=="function"?Be:function(){return Be};if(zt.x=zt.y=0,vc(zt,function(oi){oi.r=+Rr(oi.value)}),vc(zt,Ih),oe){var Ir=oe*(Be?1:Math.max(2*zt.r/or,2*zt.r/lr))/2;vc(zt,function(oi){oi.r+=Ir}),vc(zt,Ih),vc(zt,function(oi){oi.r-=Ir})}return gc(zt,or/2,lr/2,Be?1:1/Math.max(2*zt.r/or,2*zt.r/lr)),tt}return Ue.size=function(We){return arguments.length?(we=We,Ue):we},Ue.radius=function(We){return arguments.length?(Be=We==null||typeof We=="function"?We:+We,Ue):Be},Ue.padding=function(We){return arguments.length?(oe=+We,Ue):oe},ju(Ue,Z)};function pc(Z,oe){return Z.value-oe.value}function pf(Z,oe){var we=Z._pack_next;Z._pack_next=oe,oe._pack_prev=Z,oe._pack_next=we,we._pack_prev=oe}function Ph(Z,oe){Z._pack_next=oe,oe._pack_prev=Z}function Dl(Z,oe){var we=oe.x-Z.x,Be=oe.y-Z.y,Ue=Z.r+oe.r;return .999*Ue*Ue>we*we+Be*Be}function Ih(Z){if(!(oe=Z.children)||!(Ir=oe.length))return;var oe,we=1/0,Be=-1/0,Ue=1/0,We=-1/0,wt,tt,zt,or,lr,Rr,Ir;function oi(Jr){we=Math.min(Jr.x-Jr.r,we),Be=Math.max(Jr.x+Jr.r,Be),Ue=Math.min(Jr.y-Jr.r,Ue),We=Math.max(Jr.y+Jr.r,We)}if(oe.forEach(Zu),wt=oe[0],wt.x=-wt.r,wt.y=0,oi(wt),Ir>1&&(tt=oe[1],tt.x=tt.r,tt.y=0,oi(tt),Ir>2))for(zt=oe[2],hl(wt,tt,zt),oi(zt),pf(wt,zt),wt._pack_prev=zt,pf(zt,tt),tt=wt._pack_next,or=3;orKr.x&&(Kr=un),un.depth>ii.depth&&(ii=un)});var vi=oe(qr,Kr)/2-qr.x,ci=we[0]/(Kr.x+oe(Kr,qr)/2+vi),Jr=we[1]/(ii.depth||1);Pc(oi,function(un){un.x=(un.x+vi)*ci,un.y=un.depth*Jr})}return Ir}function We(lr){for(var Rr={A:null,children:[lr]},Ir=[Rr],oi;(oi=Ir.pop())!=null;)for(var ui=oi.children,qr,Kr=0,ii=ui.length;Kr0&&(nc(gt(qr,lr,Ir),lr,un),ii+=un,vi+=un),ci+=qr.m,ii+=oi.m,Jr+=Kr.m,vi+=ui.m;qr&&!Yc(ui)&&(ui.t=qr,ui.m+=ci-vi),oi&&!mc(Kr)&&(Kr.t=oi,Kr.m+=ii-Jr,Ir=lr)}return Ir}function or(lr){lr.x*=we[0],lr.y=lr.depth*we[1]}return Ue.separation=function(lr){return arguments.length?(oe=lr,Ue):oe},Ue.size=function(lr){return arguments.length?(Be=(we=lr)==null?or:null,Ue):Be?null:we},Ue.nodeSize=function(lr){return arguments.length?(Be=(we=lr)==null?null:or,Ue):Be?we:null},ju(Ue,Z)};function ru(Z,oe){return Z.parent==oe.parent?1:2}function mc(Z){var oe=Z.children;return oe.length?oe[0]:Z.t}function Yc(Z){var oe=Z.children,we;return(we=oe.length)?oe[we-1]:Z.t}function nc(Z,oe,we){var Be=we/(oe.i-Z.i);oe.c-=Be,oe.s+=we,Z.c+=Be,oe.z+=we,oe.m+=we}function gf(Z){for(var oe=0,we=0,Be=Z.children,Ue=Be.length,We;--Ue>=0;)We=Be[Ue],We.z+=oe,We.m+=oe,oe+=We.s+(we+=We.c)}function gt(Z,oe,we){return Z.a.parent===oe.parent?Z.a:we}e.layout.cluster=function(){var Z=e.layout.hierarchy().sort(null).value(null),oe=ru,we=[1,1],Be=!1;function Ue(We,wt){var tt=Z.call(this,We,wt),zt=tt[0],or,lr=0;vc(zt,function(qr){var Kr=qr.children;Kr&&Kr.length?(qr.x=wr(Kr),qr.y=Bt(Kr)):(qr.x=or?lr+=oe(qr,or):0,qr.y=0,or=qr)});var Rr=vr(zt),Ir=Ur(zt),oi=Rr.x-oe(Rr,Ir)/2,ui=Ir.x+oe(Ir,Rr)/2;return vc(zt,Be?function(qr){qr.x=(qr.x-zt.x)*we[0],qr.y=(zt.y-qr.y)*we[1]}:function(qr){qr.x=(qr.x-oi)/(ui-oi)*we[0],qr.y=(1-(zt.y?qr.y/zt.y:1))*we[1]}),tt}return Ue.separation=function(We){return arguments.length?(oe=We,Ue):oe},Ue.size=function(We){return arguments.length?(Be=(we=We)==null,Ue):Be?null:we},Ue.nodeSize=function(We){return arguments.length?(Be=(we=We)!=null,Ue):Be?we:null},ju(Ue,Z)};function Bt(Z){return 1+e.max(Z,function(oe){return oe.y})}function wr(Z){return Z.reduce(function(oe,we){return oe+we.x},0)/Z.length}function vr(Z){var oe=Z.children;return oe&&oe.length?vr(oe[0]):Z}function Ur(Z){var oe=Z.children,we;return oe&&(we=oe.length)?Ur(oe[we-1]):Z}e.layout.treemap=function(){var Z=e.layout.hierarchy(),oe=Math.round,we=[1,1],Be=null,Ue=fi,We=!1,wt,tt="squarify",zt=.5*(1+Math.sqrt(5));function or(qr,Kr){for(var ii=-1,vi=qr.length,ci,Jr;++ii0;)vi.push(Jr=ci[Nn-1]),vi.area+=Jr.area,tt!=="squarify"||(dn=Ir(vi,En))<=un?(ci.pop(),un=dn):(vi.area-=vi.pop().area,oi(vi,En,ii,!1),En=Math.min(ii.dx,ii.dy),vi.length=vi.area=0,un=1/0);vi.length&&(oi(vi,En,ii,!0),vi.length=vi.area=0),Kr.forEach(lr)}}function Rr(qr){var Kr=qr.children;if(Kr&&Kr.length){var ii=Ue(qr),vi=Kr.slice(),ci,Jr=[];for(or(vi,ii.dx*ii.dy/qr.value),Jr.area=0;ci=vi.pop();)Jr.push(ci),Jr.area+=ci.area,ci.z!=null&&(oi(Jr,ci.z?ii.dx:ii.dy,ii,!vi.length),Jr.length=Jr.area=0);Kr.forEach(Rr)}}function Ir(qr,Kr){for(var ii=qr.area,vi,ci=0,Jr=1/0,un=-1,dn=qr.length;++unci&&(ci=vi));return ii*=ii,Kr*=Kr,ii?Math.max(Kr*ci*zt/ii,ii/(Kr*Jr*zt)):1/0}function oi(qr,Kr,ii,vi){var ci=-1,Jr=qr.length,un=ii.x,dn=ii.y,En=Kr?oe(qr.area/Kr):0,Nn;if(Kr==ii.dx){for((vi||En>ii.dy)&&(En=ii.dy);++ciii.dx)&&(En=ii.dx);++ci1);return Z+oe*Be*Math.sqrt(-2*Math.log(We)/We)}},logNormal:function(){var Z=e.random.normal.apply(e,arguments);return function(){return Math.exp(Z())}},bates:function(Z){var oe=e.random.irwinHall(Z);return function(){return oe()/Z}},irwinHall:function(Z){return function(){for(var oe=0,we=0;we2?mi:hn,or=Be?Lu:pd;return Ue=zt(Z,oe,or,we),We=zt(oe,Z,or,Sl),tt}function tt(zt){return Ue(zt)}return tt.invert=function(zt){return We(zt)},tt.domain=function(zt){return arguments.length?(Z=zt.map(Number),wt()):Z},tt.range=function(zt){return arguments.length?(oe=zt,wt()):oe},tt.rangeRound=function(zt){return tt.range(zt).interpolate(rc)},tt.clamp=function(zt){return arguments.length?(Be=zt,wt()):Be},tt.interpolate=function(zt){return arguments.length?(we=zt,wt()):we},tt.ticks=function(zt){return qa(Z,zt)},tt.tickFormat=function(zt,or){return d3_scale_linearTickFormat(Z,zt,or)},tt.nice=function(zt){return Ta(Z,zt),wt()},tt.copy=function(){return Pn(Z,oe,we,Be)},wt()}function Ma(Z,oe){return e.rebind(Z,oe,"range","rangeRound","interpolate","clamp")}function Ta(Z,oe){return Ti(Z,qi(Ea(Z,oe)[2])),Ti(Z,qi(Ea(Z,oe)[2])),Z}function Ea(Z,oe){oe==null&&(oe=10);var we=Fi(Z),Be=we[1]-we[0],Ue=Math.pow(10,Math.floor(Math.log(Be/oe)/Math.LN10)),We=oe/Be*Ue;return We<=.15?Ue*=10:We<=.35?Ue*=5:We<=.75&&(Ue*=2),we[0]=Math.ceil(we[0]/Ue)*Ue,we[1]=Math.floor(we[1]/Ue)*Ue+Ue*.5,we[2]=Ue,we}function qa(Z,oe){return e.range.apply(e,Ea(Z,oe))}var Cn={s:1,g:1,p:1,r:1,e:1};function sn(Z){return-Math.floor(Math.log(Z)/Math.LN10+.01)}function Ua(Z,oe){var we=sn(oe[2]);return Z in Cn?Math.abs(we-sn(Math.max(g(oe[0]),g(oe[1]))))+ +(Z!=="e"):we-(Z==="%")*2}e.scale.log=function(){return mo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function mo(Z,oe,we,Be){function Ue(tt){return(we?Math.log(tt<0?0:tt):-Math.log(tt>0?0:-tt))/Math.log(oe)}function We(tt){return we?Math.pow(oe,tt):-Math.pow(oe,-tt)}function wt(tt){return Z(Ue(tt))}return wt.invert=function(tt){return We(Z.invert(tt))},wt.domain=function(tt){return arguments.length?(we=tt[0]>=0,Z.domain((Be=tt.map(Number)).map(Ue)),wt):Be},wt.base=function(tt){return arguments.length?(oe=+tt,Z.domain(Be.map(Ue)),wt):oe},wt.nice=function(){var tt=Ti(Be.map(Ue),we?Math:Xo);return Z.domain(tt),Be=tt.map(We),wt},wt.ticks=function(){var tt=Fi(Be),zt=[],or=tt[0],lr=tt[1],Rr=Math.floor(Ue(or)),Ir=Math.ceil(Ue(lr)),oi=oe%1?2:oe;if(isFinite(Ir-Rr)){if(we){for(;Rr0;ui--)zt.push(We(Rr)*ui);for(Rr=0;zt[Rr]lr;Ir--);zt=zt.slice(Rr,Ir)}return zt},wt.copy=function(){return mo(Z.copy(),oe,we,Be)},Ma(wt,Z)}var Xo={floor:function(Z){return-Math.ceil(-Z)},ceil:function(Z){return-Math.floor(-Z)}};e.scale.pow=function(){return Ts(e.scale.linear(),1,[0,1])};function Ts(Z,oe,we){var Be=Qo(oe),Ue=Qo(1/oe);function We(wt){return Z(Be(wt))}return We.invert=function(wt){return Ue(Z.invert(wt))},We.domain=function(wt){return arguments.length?(Z.domain((we=wt.map(Number)).map(Be)),We):we},We.ticks=function(wt){return qa(we,wt)},We.tickFormat=function(wt,tt){return d3_scale_linearTickFormat(we,wt,tt)},We.nice=function(wt){return We.domain(Ta(we,wt))},We.exponent=function(wt){return arguments.length?(Be=Qo(oe=wt),Ue=Qo(1/oe),Z.domain(we.map(Be)),We):oe},We.copy=function(){return Ts(Z.copy(),oe,we)},Ma(We,Z)}function Qo(Z){return function(oe){return oe<0?-Math.pow(-oe,Z):Math.pow(oe,Z)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ys([],{t:"range",a:[[]]})};function ys(Z,oe){var we,Be,Ue;function We(tt){return Be[((we.get(tt)||(oe.t==="range"?we.set(tt,Z.push(tt)):NaN))-1)%Be.length]}function wt(tt,zt){return e.range(Z.length).map(function(or){return tt+zt*or})}return We.domain=function(tt){if(!arguments.length)return Z;Z=[],we=new S;for(var zt=-1,or=tt.length,lr;++zt0?we[We-1]:Z[0],WeIr?0:1;if(lr=Le)return zt(lr,ui)+(or?zt(or,1-ui):"")+"Z";var qr,Kr,ii,vi,ci=0,Jr=0,un,dn,En,Nn,ga,ya,so,wa,io=[];if((vi=(+wt.apply(this,arguments)||0)/2)&&(ii=Be===Du?Math.sqrt(or*or+lr*lr):+Be.apply(this,arguments),ui||(Jr*=-1),lr&&(Jr=Qr(ii/lr*Math.sin(vi))),or&&(ci=Qr(ii/or*Math.sin(vi)))),lr){un=lr*Math.cos(Rr+Jr),dn=lr*Math.sin(Rr+Jr),En=lr*Math.cos(Ir-Jr),Nn=lr*Math.sin(Ir-Jr);var Ss=Math.abs(Ir-Rr-2*Jr)<=Xe?0:1;if(Jr&&Rc(un,dn,En,Nn)===ui^Ss){var _s=(Rr+Ir)/2;un=lr*Math.cos(_s),dn=lr*Math.sin(_s),En=Nn=null}}else un=dn=0;if(or){ga=or*Math.cos(Ir-ci),ya=or*Math.sin(Ir-ci),so=or*Math.cos(Rr+ci),wa=or*Math.sin(Rr+ci);var Ns=Math.abs(Rr-Ir+2*ci)<=Xe?0:1;if(ci&&Rc(ga,ya,so,wa)===1-ui^Ns){var pn=(Rr+Ir)/2;ga=or*Math.cos(pn),ya=or*Math.sin(pn),so=wa=null}}else ga=ya=0;if(oi>Ye&&(qr=Math.min(Math.abs(lr-or)/2,+we.apply(this,arguments)))>.001){Kr=or0?0:1}function Ra(Z,oe,we,Be,Ue){var We=Z[0]-oe[0],wt=Z[1]-oe[1],tt=(Ue?Be:-Be)/Math.sqrt(We*We+wt*wt),zt=tt*wt,or=-tt*We,lr=Z[0]+zt,Rr=Z[1]+or,Ir=oe[0]+zt,oi=oe[1]+or,ui=(lr+Ir)/2,qr=(Rr+oi)/2,Kr=Ir-lr,ii=oi-Rr,vi=Kr*Kr+ii*ii,ci=we-Be,Jr=lr*oi-Ir*Rr,un=(ii<0?-1:1)*Math.sqrt(Math.max(0,ci*ci*vi-Jr*Jr)),dn=(Jr*ii-Kr*un)/vi,En=(-Jr*Kr-ii*un)/vi,Nn=(Jr*ii+Kr*un)/vi,ga=(-Jr*Kr+ii*un)/vi,ya=dn-ui,so=En-qr,wa=Nn-ui,io=ga-qr;return ya*ya+so*so>wa*wa+io*io&&(dn=Nn,En=ga),[[dn-zt,En-or],[dn*we/ci,En*we/ci]]}function eo(){return!0}function Jc(Z){var oe=zs,we=ks,Be=eo,Ue=_c,We=Ue.key,wt=.7;function tt(zt){var or=[],lr=[],Rr=-1,Ir=zt.length,oi,ui=ti(oe),qr=ti(we);function Kr(){or.push("M",Ue(Z(lr),wt))}for(;++Rr1?Z.join("L"):Z+"Z"}function le(Z){return Z.join("L")+"Z"}function w(Z){for(var oe=0,we=Z.length,Be=Z[0],Ue=[Be[0],",",Be[1]];++oe1&&Ue.push("H",Be[0]),Ue.join("")}function B(Z){for(var oe=0,we=Z.length,Be=Z[0],Ue=[Be[0],",",Be[1]];++oe1){tt=oe[1],We=Z[zt],zt++,Be+="C"+(Ue[0]+wt[0])+","+(Ue[1]+wt[1])+","+(We[0]-tt[0])+","+(We[1]-tt[1])+","+We[0]+","+We[1];for(var or=2;or9&&(We=we*3/Math.sqrt(We),wt[tt]=We*Be,wt[tt+1]=We*Ue));for(tt=-1;++tt<=zt;)We=(Z[Math.min(zt,tt+1)][0]-Z[Math.max(0,tt-1)][0])/(6*(1+wt[tt]*wt[tt])),oe.push([We||0,wt[tt]*We||0]);return oe}function Mt(Z){return Z.length<3?_c(Z):Z[0]+je(Z,et(Z))}e.svg.line.radial=function(){var Z=Jc(Rt);return Z.radius=Z.x,delete Z.x,Z.angle=Z.y,delete Z.y,Z};function Rt(Z){for(var oe,we=-1,Be=Z.length,Ue,We;++weXe)+",1 "+Rr}function or(lr,Rr,Ir,oi){return"Q 0,0 "+oi}return We.radius=function(lr){return arguments.length?(we=ti(lr),We):we},We.source=function(lr){return arguments.length?(Z=ti(lr),We):Z},We.target=function(lr){return arguments.length?(oe=ti(lr),We):oe},We.startAngle=function(lr){return arguments.length?(Be=ti(lr),We):Be},We.endAngle=function(lr){return arguments.length?(Ue=ti(lr),We):Ue},We};function Dr(Z){return Z.radius}e.svg.diagonal=function(){var Z=tr,oe=mr,we=zr;function Be(Ue,We){var wt=Z.call(this,Ue,We),tt=oe.call(this,Ue,We),zt=(wt.y+tt.y)/2,or=[wt,{x:wt.x,y:zt},{x:tt.x,y:zt},tt];return or=or.map(we),"M"+or[0]+"C"+or[1]+" "+or[2]+" "+or[3]}return Be.source=function(Ue){return arguments.length?(Z=ti(Ue),Be):Z},Be.target=function(Ue){return arguments.length?(oe=ti(Ue),Be):oe},Be.projection=function(Ue){return arguments.length?(we=Ue,Be):we},Be};function zr(Z){return[Z.x,Z.y]}e.svg.diagonal.radial=function(){var Z=e.svg.diagonal(),oe=zr,we=Z.projection;return Z.projection=function(Be){return arguments.length?we(Xr(oe=Be)):oe},Z};function Xr(Z){return function(){var oe=Z.apply(this,arguments),we=oe[0],Be=oe[1]-xe;return[we*Math.cos(Be),we*Math.sin(Be)]}}e.svg.symbol=function(){var Z=Li,oe=di;function we(Be,Ue){return(Qi.get(Z.call(this,Be,Ue))||Ci)(oe.call(this,Be,Ue))}return we.type=function(Be){return arguments.length?(Z=ti(Be),we):Z},we.size=function(Be){return arguments.length?(oe=ti(Be),we):oe},we};function di(){return 64}function Li(){return"circle"}function Ci(Z){var oe=Math.sqrt(Z/Xe);return"M0,"+oe+"A"+oe+","+oe+" 0 1,1 0,"+-oe+"A"+oe+","+oe+" 0 1,1 0,"+oe+"Z"}var Qi=e.map({circle:Ci,cross:function(Z){var oe=Math.sqrt(Z/5)/2;return"M"+-3*oe+","+-oe+"H"+-oe+"V"+-3*oe+"H"+oe+"V"+-oe+"H"+3*oe+"V"+oe+"H"+oe+"V"+3*oe+"H"+-oe+"V"+oe+"H"+-3*oe+"Z"},diamond:function(Z){var oe=Math.sqrt(Z/(2*pa)),we=oe*pa;return"M0,"+-oe+"L"+we+",0 0,"+oe+" "+-we+",0Z"},square:function(Z){var oe=Math.sqrt(Z)/2;return"M"+-oe+","+-oe+"L"+oe+","+-oe+" "+oe+","+oe+" "+-oe+","+oe+"Z"},"triangle-down":function(Z){var oe=Math.sqrt(Z/Mn),we=oe*Mn/2;return"M0,"+we+"L"+oe+","+-we+" "+-oe+","+-we+"Z"},"triangle-up":function(Z){var oe=Math.sqrt(Z/Mn),we=oe*Mn/2;return"M0,"+-we+"L"+oe+","+we+" "+-oe+","+we+"Z"}});e.svg.symbolTypes=Qi.keys();var Mn=Math.sqrt(3),pa=Math.tan(30*Se);Ce.transition=function(Z){for(var oe=Do||++co,we=po(Z),Be=[],Ue,We,wt=Rs||{time:Date.now(),ease:uu,delay:0,duration:250},tt=-1,zt=this.length;++tt0;)Rr[--vi].call(Z,ii);if(Kr>=1)return wt.event&&wt.event.end.call(Z,Z.__data__,oe),--We.count?delete We[Be]:delete Z[we],1}wt||(tt=Ue.time,zt=Oo(Ir,0,tt),wt=We[Be]={tween:new S,time:tt,timer:zt,delay:Ue.delay,duration:Ue.duration,ease:Ue.ease,index:oe},Ue=null,++We.count)}e.svg.axis=function(){var Z=e.scale.linear(),oe=Vl,we=6,Be=6,Ue=3,We=[10],wt=null,tt;function zt(or){or.each(function(){var lr=e.select(this),Rr=this.__chart__||Z,Ir=this.__chart__=Z.copy(),oi=wt==null?Ir.ticks?Ir.ticks.apply(Ir,We):Ir.domain():wt,ui=tt==null?Ir.tickFormat?Ir.tickFormat.apply(Ir,We):H:tt,qr=lr.selectAll(".tick").data(oi,Ir),Kr=qr.enter().insert("g",".domain").attr("class","tick").style("opacity",Ye),ii=e.transition(qr.exit()).style("opacity",Ye).remove(),vi=e.transition(qr.order()).style("opacity",1),ci=Math.max(we,0)+Ue,Jr,un=Xi(Ir),dn=lr.selectAll(".domain").data([0]),En=(dn.enter().append("path").attr("class","domain"),e.transition(dn));Kr.append("line"),Kr.append("text");var Nn=Kr.select("line"),ga=vi.select("line"),ya=qr.select("text").text(ui),so=Kr.select("text"),wa=vi.select("text"),io=oe==="top"||oe==="left"?-1:1,Ss,_s,Ns,pn;if(oe==="bottom"||oe==="top"?(Jr=cu,Ss="x",Ns="y",_s="x2",pn="y2",ya.attr("dy",io<0?"0em":".71em").style("text-anchor","middle"),En.attr("d","M"+un[0]+","+io*Be+"V0H"+un[1]+"V"+io*Be)):(Jr=el,Ss="y",Ns="x",_s="y2",pn="x2",ya.attr("dy",".32em").style("text-anchor",io<0?"end":"start"),En.attr("d","M"+io*Be+","+un[0]+"H0V"+un[1]+"H"+io*Be)),Nn.attr(pn,io*we),so.attr(Ns,io*ci),ga.attr(_s,0).attr(pn,io*we),wa.attr(Ss,0).attr(Ns,io*ci),Ir.rangeBand){var za=Ir,Lo=za.rangeBand()/2;Rr=Ir=function(Fo){return za(Fo)+Lo}}else Rr.rangeBand?Rr=Ir:ii.call(Jr,Ir,Rr);Kr.call(Jr,Rr,Ir),vi.call(Jr,Ir,Ir)})}return zt.scale=function(or){return arguments.length?(Z=or,zt):Z},zt.orient=function(or){return arguments.length?(oe=or in Xu?or+"":Vl,zt):oe},zt.ticks=function(){return arguments.length?(We=r(arguments),zt):We},zt.tickValues=function(or){return arguments.length?(wt=or,zt):wt},zt.tickFormat=function(or){return arguments.length?(tt=or,zt):tt},zt.tickSize=function(or){var lr=arguments.length;return lr?(we=+or,Be=+arguments[lr-1],zt):we},zt.innerTickSize=function(or){return arguments.length?(we=+or,zt):we},zt.outerTickSize=function(or){return arguments.length?(Be=+or,zt):Be},zt.tickPadding=function(or){return arguments.length?(Ue=+or,zt):Ue},zt.tickSubdivide=function(){return arguments.length&&zt},zt};var Vl="bottom",Xu={top:1,right:1,bottom:1,left:1};function cu(Z,oe,we){Z.attr("transform",function(Be){var Ue=oe(Be);return"translate("+(isFinite(Ue)?Ue:we(Be))+",0)"})}function el(Z,oe,we){Z.attr("transform",function(Be){var Ue=oe(Be);return"translate(0,"+(isFinite(Ue)?Ue:we(Be))+")"})}e.svg.brush=function(){var Z=ke(lr,"brushstart","brush","brushend"),oe=null,we=null,Be=[0,0],Ue=[0,0],We,wt,tt=!0,zt=!0,or=zc[0];function lr(qr){qr.each(function(){var Kr=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ui).on("touchstart.brush",ui),ii=Kr.selectAll(".background").data([0]);ii.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Kr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var vi=Kr.selectAll(".resize").data(or,H);vi.exit().remove(),vi.enter().append("g").attr("class",function(dn){return"resize "+dn}).style("cursor",function(dn){return nu[dn]}).append("rect").attr("x",function(dn){return/[ew]$/.test(dn)?-3:null}).attr("y",function(dn){return/^[ns]/.test(dn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),vi.style("display",lr.empty()?"none":null);var ci=e.transition(Kr),Jr=e.transition(ii),un;oe&&(un=Xi(oe),Jr.attr("x",un[0]).attr("width",un[1]-un[0]),Ir(ci)),we&&(un=Xi(we),Jr.attr("y",un[0]).attr("height",un[1]-un[0]),oi(ci)),Rr(ci)})}lr.event=function(qr){qr.each(function(){var Kr=Z.of(this,arguments),ii={x:Be,y:Ue,i:We,j:wt},vi=this.__chart__||ii;this.__chart__=ii,Do?e.select(this).transition().each("start.brush",function(){We=vi.i,wt=vi.j,Be=vi.x,Ue=vi.y,Kr({type:"brushstart"})}).tween("brush:brush",function(){var ci=ec(Be,ii.x),Jr=ec(Ue,ii.y);return We=wt=null,function(un){Be=ii.x=ci(un),Ue=ii.y=Jr(un),Kr({type:"brush",mode:"resize"})}}).each("end.brush",function(){We=ii.i,wt=ii.j,Kr({type:"brush",mode:"resize"}),Kr({type:"brushend"})}):(Kr({type:"brushstart"}),Kr({type:"brush",mode:"resize"}),Kr({type:"brushend"}))})};function Rr(qr){qr.selectAll(".resize").attr("transform",function(Kr){return"translate("+Be[+/e$/.test(Kr)]+","+Ue[+/^s/.test(Kr)]+")"})}function Ir(qr){qr.select(".extent").attr("x",Be[0]),qr.selectAll(".extent,.n>rect,.s>rect").attr("width",Be[1]-Be[0])}function oi(qr){qr.select(".extent").attr("y",Ue[0]),qr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ue[1]-Ue[0])}function ui(){var qr=this,Kr=e.select(e.event.target),ii=Z.of(qr,arguments),vi=e.select(qr),ci=Kr.datum(),Jr=!/^(n|s)$/.test(ci)&&oe,un=!/^(e|w)$/.test(ci)&&we,dn=Kr.classed("extent"),En=Or(qr),Nn,ga=e.mouse(qr),ya,so=e.select(a(qr)).on("keydown.brush",Ss).on("keyup.brush",_s);if(e.event.changedTouches?so.on("touchmove.brush",Ns).on("touchend.brush",za):so.on("mousemove.brush",Ns).on("mouseup.brush",za),vi.interrupt().selectAll("*").interrupt(),dn)ga[0]=Be[0]-ga[0],ga[1]=Ue[0]-ga[1];else if(ci){var wa=+/w$/.test(ci),io=+/^n/.test(ci);ya=[Be[1-wa]-ga[0],Ue[1-io]-ga[1]],ga[0]=Be[wa],ga[1]=Ue[io]}else e.event.altKey&&(Nn=ga.slice());vi.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Kr.style("cursor")),ii({type:"brushstart"}),Ns();function Ss(){e.event.keyCode==32&&(dn||(Nn=null,ga[0]-=Be[1],ga[1]-=Ue[1],dn=2),_e())}function _s(){e.event.keyCode==32&&dn==2&&(ga[0]+=Be[1],ga[1]+=Ue[1],dn=0,_e())}function Ns(){var Lo=e.mouse(qr),Fo=!1;ya&&(Lo[0]+=ya[0],Lo[1]+=ya[1]),dn||(e.event.altKey?(Nn||(Nn=[(Be[0]+Be[1])/2,(Ue[0]+Ue[1])/2]),ga[0]=Be[+(Lo[0]{(function(e,t){typeof r6=="object"&&typeof eee!="undefined"?t(r6):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(r6,function(e){"use strict";var t=new Date,r=new Date;function n(Ke,xt,bt,Lt){function St(Et){return Ke(Et=arguments.length===0?new Date:new Date(+Et)),Et}return St.floor=function(Et){return Ke(Et=new Date(+Et)),Et},St.ceil=function(Et){return Ke(Et=new Date(Et-1)),xt(Et,1),Ke(Et),Et},St.round=function(Et){var dt=St(Et),Ht=St.ceil(Et);return Et-dt0))return $t;do $t.push(fr=new Date(+Et)),xt(Et,Ht),Ke(Et);while(fr=dt)for(;Ke(dt),!Et(dt);)dt.setTime(dt-1)},function(dt,Ht){if(dt>=dt)if(Ht<0)for(;++Ht<=0;)for(;xt(dt,-1),!Et(dt););else for(;--Ht>=0;)for(;xt(dt,1),!Et(dt););})},bt&&(St.count=function(Et,dt){return t.setTime(+Et),r.setTime(+dt),Ke(t),Ke(r),Math.floor(bt(t,r))},St.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?St.filter(Lt?function(dt){return Lt(dt)%Et===0}:function(dt){return St.count(0,dt)%Et===0}):St}),St}var i=n(function(){},function(Ke,xt){Ke.setTime(+Ke+xt)},function(Ke,xt){return xt-Ke});i.every=function(Ke){return Ke=Math.floor(Ke),!isFinite(Ke)||!(Ke>0)?null:Ke>1?n(function(xt){xt.setTime(Math.floor(xt/Ke)*Ke)},function(xt,bt){xt.setTime(+xt+bt*Ke)},function(xt,bt){return(bt-xt)/Ke}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Ke){Ke.setTime(Ke-Ke.getMilliseconds())},function(Ke,xt){Ke.setTime(+Ke+xt*o)},function(Ke,xt){return(xt-Ke)/o},function(Ke){return Ke.getUTCSeconds()}),h=f.range,d=n(function(Ke){Ke.setTime(Ke-Ke.getMilliseconds()-Ke.getSeconds()*o)},function(Ke,xt){Ke.setTime(+Ke+xt*s)},function(Ke,xt){return(xt-Ke)/s},function(Ke){return Ke.getMinutes()}),v=d.range,x=n(function(Ke){Ke.setTime(Ke-Ke.getMilliseconds()-Ke.getSeconds()*o-Ke.getMinutes()*s)},function(Ke,xt){Ke.setTime(+Ke+xt*l)},function(Ke,xt){return(xt-Ke)/l},function(Ke){return Ke.getHours()}),b=x.range,g=n(function(Ke){Ke.setHours(0,0,0,0)},function(Ke,xt){Ke.setDate(Ke.getDate()+xt)},function(Ke,xt){return(xt-Ke-(xt.getTimezoneOffset()-Ke.getTimezoneOffset())*s)/u},function(Ke){return Ke.getDate()-1}),E=g.range;function k(Ke){return n(function(xt){xt.setDate(xt.getDate()-(xt.getDay()+7-Ke)%7),xt.setHours(0,0,0,0)},function(xt,bt){xt.setDate(xt.getDate()+bt*7)},function(xt,bt){return(bt-xt-(bt.getTimezoneOffset()-xt.getTimezoneOffset())*s)/c})}var S=k(0),L=k(1),_=k(2),C=k(3),M=k(4),p=k(5),P=k(6),T=S.range,F=L.range,q=_.range,V=C.range,H=M.range,X=p.range,G=P.range,N=n(function(Ke){Ke.setDate(1),Ke.setHours(0,0,0,0)},function(Ke,xt){Ke.setMonth(Ke.getMonth()+xt)},function(Ke,xt){return xt.getMonth()-Ke.getMonth()+(xt.getFullYear()-Ke.getFullYear())*12},function(Ke){return Ke.getMonth()}),W=N.range,re=n(function(Ke){Ke.setMonth(0,1),Ke.setHours(0,0,0,0)},function(Ke,xt){Ke.setFullYear(Ke.getFullYear()+xt)},function(Ke,xt){return xt.getFullYear()-Ke.getFullYear()},function(Ke){return Ke.getFullYear()});re.every=function(Ke){return!isFinite(Ke=Math.floor(Ke))||!(Ke>0)?null:n(function(xt){xt.setFullYear(Math.floor(xt.getFullYear()/Ke)*Ke),xt.setMonth(0,1),xt.setHours(0,0,0,0)},function(xt,bt){xt.setFullYear(xt.getFullYear()+bt*Ke)})};var ae=re.range,_e=n(function(Ke){Ke.setUTCSeconds(0,0)},function(Ke,xt){Ke.setTime(+Ke+xt*s)},function(Ke,xt){return(xt-Ke)/s},function(Ke){return Ke.getUTCMinutes()}),Me=_e.range,ke=n(function(Ke){Ke.setUTCMinutes(0,0,0)},function(Ke,xt){Ke.setTime(+Ke+xt*l)},function(Ke,xt){return(xt-Ke)/l},function(Ke){return Ke.getUTCHours()}),ge=ke.range,ie=n(function(Ke){Ke.setUTCHours(0,0,0,0)},function(Ke,xt){Ke.setUTCDate(Ke.getUTCDate()+xt)},function(Ke,xt){return(xt-Ke)/u},function(Ke){return Ke.getUTCDate()-1}),Te=ie.range;function Ee(Ke){return n(function(xt){xt.setUTCDate(xt.getUTCDate()-(xt.getUTCDay()+7-Ke)%7),xt.setUTCHours(0,0,0,0)},function(xt,bt){xt.setUTCDate(xt.getUTCDate()+bt*7)},function(xt,bt){return(bt-xt)/c})}var Ae=Ee(0),ze=Ee(1),Ce=Ee(2),me=Ee(3),De=Ee(4),ce=Ee(5),Ge=Ee(6),nt=Ae.range,ct=ze.range,qt=Ce.range,rt=me.range,ot=De.range,Dt=ce.range,kt=Ge.range,Ct=n(function(Ke){Ke.setUTCDate(1),Ke.setUTCHours(0,0,0,0)},function(Ke,xt){Ke.setUTCMonth(Ke.getUTCMonth()+xt)},function(Ke,xt){return xt.getUTCMonth()-Ke.getUTCMonth()+(xt.getUTCFullYear()-Ke.getUTCFullYear())*12},function(Ke){return Ke.getUTCMonth()}),Yt=Ct.range,xr=n(function(Ke){Ke.setUTCMonth(0,1),Ke.setUTCHours(0,0,0,0)},function(Ke,xt){Ke.setUTCFullYear(Ke.getUTCFullYear()+xt)},function(Ke,xt){return xt.getUTCFullYear()-Ke.getUTCFullYear()},function(Ke){return Ke.getUTCFullYear()});xr.every=function(Ke){return!isFinite(Ke=Math.floor(Ke))||!(Ke>0)?null:n(function(xt){xt.setUTCFullYear(Math.floor(xt.getUTCFullYear()/Ke)*Ke),xt.setUTCMonth(0,1),xt.setUTCHours(0,0,0,0)},function(xt,bt){xt.setUTCFullYear(xt.getUTCFullYear()+bt*Ke)})};var er=xr.range;e.timeDay=g,e.timeDays=E,e.timeFriday=p,e.timeFridays=X,e.timeHour=x,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=F,e.timeMonth=N,e.timeMonths=W,e.timeSaturday=P,e.timeSaturdays=G,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=S,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=H,e.timeTuesday=_,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=V,e.timeWeek=S,e.timeWeeks=T,e.timeYear=re,e.timeYears=ae,e.utcDay=ie,e.utcDays=Te,e.utcFriday=ce,e.utcFridays=Dt,e.utcHour=ke,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Me,e.utcMonday=ze,e.utcMondays=ct,e.utcMonth=Ct,e.utcMonths=Yt,e.utcSaturday=Ge,e.utcSaturdays=kt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=Ae,e.utcSundays=nt,e.utcThursday=De,e.utcThursdays=ot,e.utcTuesday=Ce,e.utcTuesdays=qt,e.utcWednesday=me,e.utcWednesdays=rt,e.utcWeek=Ae,e.utcWeeks=nt,e.utcYear=xr,e.utcYears=er,Object.defineProperty(e,"__esModule",{value:!0})})});var e3=ye((i6,tee)=>{(function(e,t){typeof i6=="object"&&typeof tee!="undefined"?t(i6,hq()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(i6,function(e,t){"use strict";function r(Ne){if(0<=Ne.y&&Ne.y<100){var Ye=new Date(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L);return Ye.setFullYear(Ne.y),Ye}return new Date(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L)}function n(Ne){if(0<=Ne.y&&Ne.y<100){var Ye=new Date(Date.UTC(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L));return Ye.setUTCFullYear(Ne.y),Ye}return new Date(Date.UTC(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L))}function i(Ne,Ye,Ve){return{y:Ne,m:Ye,d:Ve,H:0,M:0,S:0,L:0}}function a(Ne){var Ye=Ne.dateTime,Ve=Ne.date,Xe=Ne.time,ht=Ne.periods,Le=Ne.days,xe=Ne.shortDays,Se=Ne.months,lt=Ne.shortMonths,Gt=h(ht),Vt=d(ht),ar=h(Le),Qr=d(Le),ai=h(xe),jr=d(xe),ri=h(Se),bi=d(Se),nn=h(lt),Wi=d(lt),Ni={a:Si,A:Mi,b:Pi,B:Gi,c:null,d:N,e:N,f:Me,H:W,I:re,j:ae,L:_e,m:ke,M:ge,p:Ki,q:ka,Q:dt,s:Ht,S:ie,u:Te,U:Ee,V:Ae,w:ze,W:Ce,x:null,X:null,y:me,Y:De,Z:ce,"%":Et},_n={a:jn,A:la,b:Fa,B:Da,c:null,d:Ge,e:Ge,f:ot,H:nt,I:ct,j:qt,L:rt,m:Dt,M:kt,p:jo,q:oa,Q:dt,s:Ht,S:Ct,u:Yt,U:xr,V:er,w:Ke,W:xt,x:null,X:null,y:bt,Y:Lt,Z:St,"%":Et},$i={a:jt,A:Zt,b:yr,B:Fr,c:Zr,d:M,e:M,f:V,H:P,I:P,j:p,L:q,m:C,M:T,p:ft,q:_,Q:X,s:G,S:F,u:x,U:b,V:g,w:v,W:E,x:Vr,X:gi,y:S,Y:k,Z:L,"%":H};Ni.x=zn(Ve,Ni),Ni.X=zn(Xe,Ni),Ni.c=zn(Ye,Ni),_n.x=zn(Ve,_n),_n.X=zn(Xe,_n),_n.c=zn(Ye,_n);function zn(Sn,Ha){return function(oo){var xn=[],_t=-1,br=0,Hr=Sn.length,ti,zi,Yi;for(oo instanceof Date||(oo=new Date(+oo));++_t53)return null;"w"in xn||(xn.w=1),"Z"in xn?(br=n(i(xn.y,0,1)),Hr=br.getUTCDay(),br=Hr>4||Hr===0?t.utcMonday.ceil(br):t.utcMonday(br),br=t.utcDay.offset(br,(xn.V-1)*7),xn.y=br.getUTCFullYear(),xn.m=br.getUTCMonth(),xn.d=br.getUTCDate()+(xn.w+6)%7):(br=r(i(xn.y,0,1)),Hr=br.getDay(),br=Hr>4||Hr===0?t.timeMonday.ceil(br):t.timeMonday(br),br=t.timeDay.offset(br,(xn.V-1)*7),xn.y=br.getFullYear(),xn.m=br.getMonth(),xn.d=br.getDate()+(xn.w+6)%7)}else("W"in xn||"U"in xn)&&("w"in xn||(xn.w="u"in xn?xn.u%7:"W"in xn?1:0),Hr="Z"in xn?n(i(xn.y,0,1)).getUTCDay():r(i(xn.y,0,1)).getDay(),xn.m=0,xn.d="W"in xn?(xn.w+6)%7+xn.W*7-(Hr+5)%7:xn.w+xn.U*7-(Hr+6)%7);return"Z"in xn?(xn.H+=xn.Z/100|0,xn.M+=xn.Z%100,n(xn)):r(xn)}}function It(Sn,Ha,oo,xn){for(var _t=0,br=Ha.length,Hr=oo.length,ti,zi;_t=Hr)return-1;if(ti=Ha.charCodeAt(_t++),ti===37){if(ti=Ha.charAt(_t++),zi=$i[ti in o?Ha.charAt(_t++):ti],!zi||(xn=zi(Sn,oo,xn))<0)return-1}else if(ti!=oo.charCodeAt(xn++))return-1}return xn}function ft(Sn,Ha,oo){var xn=Gt.exec(Ha.slice(oo));return xn?(Sn.p=Vt[xn[0].toLowerCase()],oo+xn[0].length):-1}function jt(Sn,Ha,oo){var xn=ai.exec(Ha.slice(oo));return xn?(Sn.w=jr[xn[0].toLowerCase()],oo+xn[0].length):-1}function Zt(Sn,Ha,oo){var xn=ar.exec(Ha.slice(oo));return xn?(Sn.w=Qr[xn[0].toLowerCase()],oo+xn[0].length):-1}function yr(Sn,Ha,oo){var xn=nn.exec(Ha.slice(oo));return xn?(Sn.m=Wi[xn[0].toLowerCase()],oo+xn[0].length):-1}function Fr(Sn,Ha,oo){var xn=ri.exec(Ha.slice(oo));return xn?(Sn.m=bi[xn[0].toLowerCase()],oo+xn[0].length):-1}function Zr(Sn,Ha,oo){return It(Sn,Ye,Ha,oo)}function Vr(Sn,Ha,oo){return It(Sn,Ve,Ha,oo)}function gi(Sn,Ha,oo){return It(Sn,Xe,Ha,oo)}function Si(Sn){return xe[Sn.getDay()]}function Mi(Sn){return Le[Sn.getDay()]}function Pi(Sn){return lt[Sn.getMonth()]}function Gi(Sn){return Se[Sn.getMonth()]}function Ki(Sn){return ht[+(Sn.getHours()>=12)]}function ka(Sn){return 1+~~(Sn.getMonth()/3)}function jn(Sn){return xe[Sn.getUTCDay()]}function la(Sn){return Le[Sn.getUTCDay()]}function Fa(Sn){return lt[Sn.getUTCMonth()]}function Da(Sn){return Se[Sn.getUTCMonth()]}function jo(Sn){return ht[+(Sn.getUTCHours()>=12)]}function oa(Sn){return 1+~~(Sn.getUTCMonth()/3)}return{format:function(Sn){var Ha=zn(Sn+="",Ni);return Ha.toString=function(){return Sn},Ha},parse:function(Sn){var Ha=Wn(Sn+="",!1);return Ha.toString=function(){return Sn},Ha},utcFormat:function(Sn){var Ha=zn(Sn+="",_n);return Ha.toString=function(){return Sn},Ha},utcParse:function(Sn){var Ha=Wn(Sn+="",!0);return Ha.toString=function(){return Sn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ne,Ye,Ve){var Xe=Ne<0?"-":"",ht=(Xe?-Ne:Ne)+"",Le=ht.length;return Xe+(Le68?1900:2e3),Ve+Xe[0].length):-1}function L(Ne,Ye,Ve){var Xe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ye.slice(Ve,Ve+6));return Xe?(Ne.Z=Xe[1]?0:-(Xe[2]+(Xe[3]||"00")),Ve+Xe[0].length):-1}function _(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+1));return Xe?(Ne.q=Xe[0]*3-3,Ve+Xe[0].length):-1}function C(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.m=Xe[0]-1,Ve+Xe[0].length):-1}function M(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.d=+Xe[0],Ve+Xe[0].length):-1}function p(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+3));return Xe?(Ne.m=0,Ne.d=+Xe[0],Ve+Xe[0].length):-1}function P(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.H=+Xe[0],Ve+Xe[0].length):-1}function T(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.M=+Xe[0],Ve+Xe[0].length):-1}function F(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.S=+Xe[0],Ve+Xe[0].length):-1}function q(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+3));return Xe?(Ne.L=+Xe[0],Ve+Xe[0].length):-1}function V(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+6));return Xe?(Ne.L=Math.floor(Xe[0]/1e3),Ve+Xe[0].length):-1}function H(Ne,Ye,Ve){var Xe=l.exec(Ye.slice(Ve,Ve+1));return Xe?Ve+Xe[0].length:-1}function X(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve));return Xe?(Ne.Q=+Xe[0],Ve+Xe[0].length):-1}function G(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve));return Xe?(Ne.s=+Xe[0],Ve+Xe[0].length):-1}function N(Ne,Ye){return c(Ne.getDate(),Ye,2)}function W(Ne,Ye){return c(Ne.getHours(),Ye,2)}function re(Ne,Ye){return c(Ne.getHours()%12||12,Ye,2)}function ae(Ne,Ye){return c(1+t.timeDay.count(t.timeYear(Ne),Ne),Ye,3)}function _e(Ne,Ye){return c(Ne.getMilliseconds(),Ye,3)}function Me(Ne,Ye){return _e(Ne,Ye)+"000"}function ke(Ne,Ye){return c(Ne.getMonth()+1,Ye,2)}function ge(Ne,Ye){return c(Ne.getMinutes(),Ye,2)}function ie(Ne,Ye){return c(Ne.getSeconds(),Ye,2)}function Te(Ne){var Ye=Ne.getDay();return Ye===0?7:Ye}function Ee(Ne,Ye){return c(t.timeSunday.count(t.timeYear(Ne)-1,Ne),Ye,2)}function Ae(Ne,Ye){var Ve=Ne.getDay();return Ne=Ve>=4||Ve===0?t.timeThursday(Ne):t.timeThursday.ceil(Ne),c(t.timeThursday.count(t.timeYear(Ne),Ne)+(t.timeYear(Ne).getDay()===4),Ye,2)}function ze(Ne){return Ne.getDay()}function Ce(Ne,Ye){return c(t.timeMonday.count(t.timeYear(Ne)-1,Ne),Ye,2)}function me(Ne,Ye){return c(Ne.getFullYear()%100,Ye,2)}function De(Ne,Ye){return c(Ne.getFullYear()%1e4,Ye,4)}function ce(Ne){var Ye=Ne.getTimezoneOffset();return(Ye>0?"-":(Ye*=-1,"+"))+c(Ye/60|0,"0",2)+c(Ye%60,"0",2)}function Ge(Ne,Ye){return c(Ne.getUTCDate(),Ye,2)}function nt(Ne,Ye){return c(Ne.getUTCHours(),Ye,2)}function ct(Ne,Ye){return c(Ne.getUTCHours()%12||12,Ye,2)}function qt(Ne,Ye){return c(1+t.utcDay.count(t.utcYear(Ne),Ne),Ye,3)}function rt(Ne,Ye){return c(Ne.getUTCMilliseconds(),Ye,3)}function ot(Ne,Ye){return rt(Ne,Ye)+"000"}function Dt(Ne,Ye){return c(Ne.getUTCMonth()+1,Ye,2)}function kt(Ne,Ye){return c(Ne.getUTCMinutes(),Ye,2)}function Ct(Ne,Ye){return c(Ne.getUTCSeconds(),Ye,2)}function Yt(Ne){var Ye=Ne.getUTCDay();return Ye===0?7:Ye}function xr(Ne,Ye){return c(t.utcSunday.count(t.utcYear(Ne)-1,Ne),Ye,2)}function er(Ne,Ye){var Ve=Ne.getUTCDay();return Ne=Ve>=4||Ve===0?t.utcThursday(Ne):t.utcThursday.ceil(Ne),c(t.utcThursday.count(t.utcYear(Ne),Ne)+(t.utcYear(Ne).getUTCDay()===4),Ye,2)}function Ke(Ne){return Ne.getUTCDay()}function xt(Ne,Ye){return c(t.utcMonday.count(t.utcYear(Ne)-1,Ne),Ye,2)}function bt(Ne,Ye){return c(Ne.getUTCFullYear()%100,Ye,2)}function Lt(Ne,Ye){return c(Ne.getUTCFullYear()%1e4,Ye,4)}function St(){return"+0000"}function Et(){return"%"}function dt(Ne){return+Ne}function Ht(Ne){return Math.floor(+Ne/1e3)}var $t;fr({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 fr(Ne){return $t=a(Ne),e.timeFormat=$t.format,e.timeParse=$t.parse,e.utcFormat=$t.utcFormat,e.utcParse=$t.utcParse,$t}var _r="%Y-%m-%dT%H:%M:%S.%LZ";function Br(Ne){return Ne.toISOString()}var Or=Date.prototype.toISOString?Br:e.utcFormat(_r);function Nr(Ne){var Ye=new Date(Ne);return isNaN(Ye)?null:Ye}var ut=+new Date("2000-01-01T00:00:00.000Z")?Nr:e.utcParse(_r);e.isoFormat=Or,e.isoParse=ut,e.timeFormatDefaultLocale=fr,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var dq=ye((n6,ree)=>{(function(e,t){typeof n6=="object"&&typeof ree!="undefined"?t(n6):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(n6,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((p=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var p,P=C.slice(0,p);return[P.length>1?P[0]+P.slice(2):P,+C.slice(p+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(p,P){for(var T=p.length,F=[],q=0,V=C[0],H=0;T>0&&V>0&&(H+V+1>P&&(V=Math.max(1,P-H)),F.push(p.substring(T-=V,T+V)),!((H+=V+1)>P));)V=C[q=(q+1)%C.length];return F.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(p){return C[+p]})}}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,p=1,P=-1,T;p0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(T+1):C}var c;function f(C,M){var p=r(C,M);if(!p)return C+"";var P=p[0],T=p[1],F=T-(c=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,q=P.length;return F===q?P:F>q?P+new Array(F-q+1).join("0"):F>0?P.slice(0,F)+"."+P.slice(F):"0."+new Array(1-F).join("0")+r(C,Math.max(0,M+F-1))[0]}function h(C,M){var p=r(C,M);if(!p)return C+"";var P=p[0],T=p[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 x=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function g(C){var M=C.grouping===void 0||C.thousands===void 0?v:i(x.call(C.grouping,Number),C.thousands+""),p=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",T=C.decimal===void 0?".":C.decimal+"",F=C.numerals===void 0?v:a(x.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",V=C.minus===void 0?"-":C.minus+"",H=C.nan===void 0?"NaN":C.nan+"";function X(N){N=s(N);var W=N.fill,re=N.align,ae=N.sign,_e=N.symbol,Me=N.zero,ke=N.width,ge=N.comma,ie=N.precision,Te=N.trim,Ee=N.type;Ee==="n"?(ge=!0,Ee="g"):d[Ee]||(ie===void 0&&(ie=12),Te=!0,Ee="g"),(Me||W==="0"&&re==="=")&&(Me=!0,W="0",re="=");var Ae=_e==="$"?p:_e==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",ze=_e==="$"?P:/[%p]/.test(Ee)?q:"",Ce=d[Ee],me=/[defgprs%]/.test(Ee);ie=ie===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function De(ce){var Ge=Ae,nt=ze,ct,qt,rt;if(Ee==="c")nt=Ce(ce)+nt,ce="";else{ce=+ce;var ot=ce<0||1/ce<0;if(ce=isNaN(ce)?H:Ce(Math.abs(ce),ie),Te&&(ce=u(ce)),ot&&+ce==0&&ae!=="+"&&(ot=!1),Ge=(ot?ae==="("?ae:V:ae==="-"||ae==="("?"":ae)+Ge,nt=(Ee==="s"?b[8+c/3]:"")+nt+(ot&&ae==="("?")":""),me){for(ct=-1,qt=ce.length;++ctrt||rt>57){nt=(rt===46?T+ce.slice(ct+1):ce.slice(ct))+nt,ce=ce.slice(0,ct);break}}}ge&&!Me&&(ce=M(ce,1/0));var Dt=Ge.length+ce.length+nt.length,kt=Dt>1)+Ge+ce+nt+kt.slice(Dt);break;default:ce=kt+Ge+ce+nt;break}return F(ce)}return De.toString=function(){return N+""},De}function G(N,W){var re=X((N=s(N),N.type="f",N)),ae=Math.max(-8,Math.min(8,Math.floor(n(W)/3)))*3,_e=Math.pow(10,-ae),Me=b[8+ae/3];return function(ke){return re(_e*ke)+Me}}return{format:X,formatPrefix:G}}var E;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(C){return E=g(C),e.format=E.format,e.formatPrefix=E.formatPrefix,E}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 _(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=k,e.formatLocale=g,e.formatSpecifier=s,e.precisionFixed=S,e.precisionPrefix=L,e.precisionRound=_,Object.defineProperty(e,"__esModule",{value:!0})})});var nee=ye((CQt,iee)=>{"use strict";iee.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 uo=ye((LQt,aee)=>{"use strict";var VQe=nee();aee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&VQe(r))return!1}else if(t!=="number")return!1;return e-e<1}});var es=ye((PQt,oee)=>{"use strict";oee.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 vq=ye((a6,see)=>{(function(e,t){typeof a6=="object"&&typeof see!="undefined"?t(a6):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(a6,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 x=new ArrayBuffer(s),b=new Uint8Array(x);for(u=0;u>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return x};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var gy=ye((IQt,lee)=>{"use strict";lee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var vv=ye(mg=>{"use strict";var HQe=vq().decode,GQe=gy(),pq=Array.isArray,jQe=ArrayBuffer,WQe=DataView;function uee(e){return jQe.isView(e)&&!(e instanceof WQe)}mg.isTypedArray=uee;function o6(e){return pq(e)||uee(e)}mg.isArrayOrTypedArray=o6;function ZQe(e){return!o6(e[0])}mg.isArray1D=ZQe;mg.ensureArray=function(e,t){return pq(e)||(e=[]),e.length=t,e};var Md={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};Md.uint8c=Md.u1c;Md.uint8=Md.u1;Md.int8=Md.i1;Md.uint16=Md.u2;Md.int16=Md.i2;Md.uint32=Md.u4;Md.int32=Md.i4;Md.float32=Md.f4;Md.float64=Md.f8;function gq(e){return e.constructor===ArrayBuffer}mg.isArrayBuffer=gq;mg.decodeTypedArraySpec=function(e){var t=[],r=XQe(e),n=r.dtype,i=Md[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;gq(o)||(o=HQe(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 fee=uo(),yq=vv().isArrayOrTypedArray;pee.exports=function(t,r){if(fee(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var t3=ES(),QQe=/^\w*$/,eet=0,gee=1,s6=2,mee=3,ob=4;yee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=t3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|s6,f.set(h,null);if(c){for(a=d;a{"use strict";var tet=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,ret=/^[^\.\[\]]+$/;xee.exports=function(e,t){for(;t;){var r=e.match(tet);if(r)e=r[1];else if(e.match(ret))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 l6=ye((qQt,wee)=>{"use strict";var iet=uo();wee.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 iet(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var See=ye((OQt,Aee)=>{"use strict";var Tee=vv().isArrayOrTypedArray,kS=gy();Aee.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(Tee(i)&&Tee(a)&&kS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function net(e,t){var r=e%t;return r<0?r+t:r}function aet(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Mee.exports={mod:net,modHalf:aet}});var id=ye((NQt,u6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,De){if(me=me||"",De=De||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,De);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=De.format||ce.format,this._gradientType=De.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),De,ce,Ge,nt,ct,qt;return De=me.r/255,ce=me.g/255,Ge=me.b/255,De<=.03928?nt=De/12.92:nt=e.pow((De+.055)/1.055,2.4),ce<=.03928?ct=ce/12.92:ct=e.pow((ce+.055)/1.055,2.4),Ge<=.03928?qt=Ge/12.92:qt=e.pow((Ge+.055)/1.055,2.4),.2126*nt+.7152*ct+.0722*qt},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),Ge=i(me.v*100);return this._a==1?"hsv("+De+", "+ce+"%, "+Ge+"%)":"hsva("+De+", "+ce+"%, "+Ge+"%, "+this._roundA+")"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),Ge=i(me.l*100);return this._a==1?"hsl("+De+", "+ce+"%, "+Ge+"%)":"hsla("+De+", "+ce+"%, "+Ge+"%, "+this._roundA+")"},toHex:function(me){return x(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(W(this._r,255)*100)+"%",g:i(W(this._g,255)*100)+"%",b:i(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%)":"rgba("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:X[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var De="#"+g(this._r,this._g,this._b,this._a),ce=De,Ge=this._gradientType?"GradientType = 1, ":"";if(me){var nt=l(me);ce="#"+g(nt._r,nt._g,nt._b,nt._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ge+"startColorstr="+De+",endColorstr="+ce+")"},toString:function(me){var De=!!me;me=me||this._format;var ce=!1,Ge=this._a<1&&this._a>=0,nt=!De&&Ge&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return nt?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(ce=this.toRgbString()),me==="prgb"&&(ce=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(ce=this.toHexString()),me==="hex3"&&(ce=this.toHexString(!0)),me==="hex4"&&(ce=this.toHex8String(!0)),me==="hex8"&&(ce=this.toHex8String()),me==="name"&&(ce=this.toName()),me==="hsl"&&(ce=this.toHslString()),me==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,De){var ce=me.apply(null,[this].concat([].slice.call(De)));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(_,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(E,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,De){return me.apply(null,[this].concat([].slice.call(De)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(me,De){if(typeof me=="object"){var ce={};for(var Ge in me)me.hasOwnProperty(Ge)&&(Ge==="a"?ce[Ge]=me[Ge]:ce[Ge]=ge(me[Ge]));me=ce}return l(me,De)};function u(me){var De={r:0,g:0,b:0},ce=1,Ge=null,nt=null,ct=null,qt=!1,rt=!1;return typeof me=="string"&&(me=ze(me)),typeof me=="object"&&(Ae(me.r)&&Ae(me.g)&&Ae(me.b)?(De=c(me.r,me.g,me.b),qt=!0,rt=String(me.r).substr(-1)==="%"?"prgb":"rgb"):Ae(me.h)&&Ae(me.s)&&Ae(me.v)?(Ge=ge(me.s),nt=ge(me.v),De=v(me.h,Ge,nt),qt=!0,rt="hsv"):Ae(me.h)&&Ae(me.s)&&Ae(me.l)&&(Ge=ge(me.s),ct=ge(me.l),De=h(me.h,Ge,ct),qt=!0,rt="hsl"),me.hasOwnProperty("a")&&(ce=me.a)),ce=N(ce),{ok:qt,format:me.format||rt,r:a(255,o(De.r,0)),g:a(255,o(De.g,0)),b:a(255,o(De.b,0)),a:ce}}function c(me,De,ce){return{r:W(me,255)*255,g:W(De,255)*255,b:W(ce,255)*255}}function f(me,De,ce){me=W(me,255),De=W(De,255),ce=W(ce,255);var Ge=o(me,De,ce),nt=a(me,De,ce),ct,qt,rt=(Ge+nt)/2;if(Ge==nt)ct=qt=0;else{var ot=Ge-nt;switch(qt=rt>.5?ot/(2-Ge-nt):ot/(Ge+nt),Ge){case me:ct=(De-ce)/ot+(De1&&(Ct-=1),Ct<1/6?Dt+(kt-Dt)*6*Ct:Ct<1/2?kt:Ct<2/3?Dt+(kt-Dt)*(2/3-Ct)*6:Dt}if(De===0)Ge=nt=ct=ce;else{var rt=ce<.5?ce*(1+De):ce+De-ce*De,ot=2*ce-rt;Ge=qt(ot,rt,me+1/3),nt=qt(ot,rt,me),ct=qt(ot,rt,me-1/3)}return{r:Ge*255,g:nt*255,b:ct*255}}function d(me,De,ce){me=W(me,255),De=W(De,255),ce=W(ce,255);var Ge=o(me,De,ce),nt=a(me,De,ce),ct,qt,rt=Ge,ot=Ge-nt;if(qt=Ge===0?0:ot/Ge,Ge==nt)ct=0;else{switch(Ge){case me:ct=(De-ce)/ot+(De>1)+720)%360;--De;)Ge.h=(Ge.h+nt)%360,ct.push(l(Ge));return ct}function V(me,De){De=De||6;for(var ce=l(me).toHsv(),Ge=ce.h,nt=ce.s,ct=ce.v,qt=[],rt=1/De;De--;)qt.push(l({h:Ge,s:nt,v:ct})),ct=(ct+rt)%1;return qt}l.mix=function(me,De,ce){ce=ce===0?0:ce||50;var Ge=l(me).toRgb(),nt=l(De).toRgb(),ct=ce/100,qt={r:(nt.r-Ge.r)*ct+Ge.r,g:(nt.g-Ge.g)*ct+Ge.g,b:(nt.b-Ge.b)*ct+Ge.b,a:(nt.a-Ge.a)*ct+Ge.a};return l(qt)},l.readability=function(me,De){var ce=l(me),Ge=l(De);return(e.max(ce.getLuminance(),Ge.getLuminance())+.05)/(e.min(ce.getLuminance(),Ge.getLuminance())+.05)},l.isReadable=function(me,De,ce){var Ge=l.readability(me,De),nt,ct;switch(ct=!1,nt=Ce(ce),nt.level+nt.size){case"AAsmall":case"AAAlarge":ct=Ge>=4.5;break;case"AAlarge":ct=Ge>=3;break;case"AAAsmall":ct=Ge>=7;break}return ct},l.mostReadable=function(me,De,ce){var Ge=null,nt=0,ct,qt,rt,ot;ce=ce||{},qt=ce.includeFallbackColors,rt=ce.level,ot=ce.size;for(var Dt=0;Dtnt&&(nt=ct,Ge=l(De[Dt]));return l.isReadable(me,Ge,{level:rt,size:ot})||!qt?Ge:(ce.includeFallbackColors=!1,l.mostReadable(me,["#fff","#000"],ce))};var H=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"},X=l.hexNames=G(H);function G(me){var De={};for(var ce in me)me.hasOwnProperty(ce)&&(De[me[ce]]=ce);return De}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function W(me,De){_e(me)&&(me="100%");var ce=Me(me);return me=a(De,o(0,parseFloat(me))),ce&&(me=parseInt(me*De,10)/100),e.abs(me-De)<1e-6?1:me%De/parseFloat(De)}function re(me){return a(1,o(0,me))}function ae(me){return parseInt(me,16)}function _e(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function Me(me){return typeof me=="string"&&me.indexOf("%")!=-1}function ke(me){return me.length==1?"0"+me:""+me}function ge(me){return me<=1&&(me=me*100+"%"),me}function ie(me){return e.round(parseFloat(me)*255).toString(16)}function Te(me){return ae(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",De="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+De+")|(?:"+me+")",Ge="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",nt="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+Ge),rgba:new RegExp("rgba"+nt),hsl:new RegExp("hsl"+Ge),hsla:new RegExp("hsla"+nt),hsv:new RegExp("hsv"+Ge),hsva:new RegExp("hsva"+nt),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(me){return!!Ee.CSS_UNIT.exec(me)}function ze(me){me=me.replace(t,"").replace(r,"").toLowerCase();var De=!1;if(H[me])me=H[me],De=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Ee.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Ee.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Ee.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Ee.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Ee.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Ee.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Ee.hex8.exec(me))?{r:ae(ce[1]),g:ae(ce[2]),b:ae(ce[3]),a:Te(ce[4]),format:De?"name":"hex8"}:(ce=Ee.hex6.exec(me))?{r:ae(ce[1]),g:ae(ce[2]),b:ae(ce[3]),format:De?"name":"hex"}:(ce=Ee.hex4.exec(me))?{r:ae(ce[1]+""+ce[1]),g:ae(ce[2]+""+ce[2]),b:ae(ce[3]+""+ce[3]),a:Te(ce[4]+""+ce[4]),format:De?"name":"hex8"}:(ce=Ee.hex3.exec(me))?{r:ae(ce[1]+""+ce[1]),g:ae(ce[2]+""+ce[2]),b:ae(ce[3]+""+ce[3]),format:De?"name":"hex"}:!1}function Ce(me){var De,ce;return me=me||{level:"AA",size:"small"},De=(me.level||"AA").toUpperCase(),ce=(me.size||"small").toLowerCase(),De!=="AA"&&De!=="AAA"&&(De="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:De,size:ce}}typeof u6!="undefined"&&u6.exports?u6.exports=l:typeof define=="function"&&define.amd?define(function(){return l}):window.tinycolor=l})(Math)});var no=ye(PS=>{"use strict";var Eee=gy(),CS=Array.isArray;function oet(e,t){var r,n;for(r=0;r{"use strict";kee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var IS=ye((HQt,Cee)=>{"use strict";Cee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var B1=ye((GQt,Iee)=>{"use strict";var Lee=IS(),Pee=Su(),_q=Pee({editType:"none"});_q.family.dflt=Lee.HOVERFONT;_q.size.dflt=Lee.HOVERFONTSIZE;Iee.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:_q,grouptitlefont:Pee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var i3=ye((jQt,Dee)=>{"use strict";var set=Su(),c6=B1().hoverlabel,f6=no().extendFlat;Dee.exports={hoverlabel:{bgcolor:f6({},c6.bgcolor,{arrayOk:!0}),bordercolor:f6({},c6.bordercolor,{arrayOk:!0}),font:set({arrayOk:!0,editType:"none"}),align:f6({},c6.align,{arrayOk:!0}),namelength:f6({},c6.namelength,{arrayOk:!0}),editType:"none"}}});var vl=ye((WQt,Ree)=>{"use strict";var uet=Su(),cet=i3();Ree.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:uet({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:cet.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 sb=ye((ZQt,qee)=>{"use strict";var fet=id(),h6={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)"]]},zee=h6.RdBu;function het(e,t){if(t||(t=zee),!e)return t;function r(){try{e=h6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Fee(e)?e:t}function Fee(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";lb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];lb.defaultLine="#444";lb.lightLine="#eee";lb.background="#fff";lb.borderLine="#BEC8D9";lb.lightFraction=100*10/11});var va=ye((YQt,Oee)=>{"use strict";var xp=id(),vet=uo(),pet=vv().isTypedArray,nd=Oee.exports={},d6=dh();nd.defaults=d6.defaults;var get=nd.defaultLine=d6.defaultLine;nd.lightLine=d6.lightLine;var bq=nd.background=d6.background;nd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};nd.rgb=function(e){return nd.tinyRGB(xp(e))};nd.opacity=function(e){return e?xp(e).getAlpha():0};nd.addOpacity=function(e,t){var r=xp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};nd.combine=function(e,t){var r=xp(e).toRgb();if(r.a===1)return xp(e).toRgbString();var n=xp(t||bq).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 xp(a).toRgbString()};nd.interpolate=function(e,t,r){var n=xp(e).toRgb(),i=xp(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 xp(a).toRgbString()};nd.contrast=function(e,t,r){var n=xp(e);n.getAlpha()!==1&&(n=xp(nd.combine(e,bq)));var i=n.isDark()?t?n.lighten(t):bq:r?n.darken(r):get;return i.toString()};nd.stroke=function(e,t){var r=xp(t);e.style({stroke:nd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};nd.fill=function(e,t){var r=xp(t);e.style({fill:nd.tinyRGB(r),"fill-opacity":r.getAlpha()})};nd.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((KQt,Bee)=>{"use strict";Bee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var n3=ye(Nee=>{"use strict";Nee.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 Gee=ye(bp=>{"use strict";var wq=uo(),Uee=id(),Vee=no().extendFlat,met=vl(),yet=sb(),_et=va(),xet=N1().DESELECTDIM,a3=ES(),Hee=n3().counter,bet=r3().modHalf,dm=vv().isArrayOrTypedArray,U1=vv().isTypedArraySpec,V1=vv().decodeTypedArraySpec;bp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(dm(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;nn.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||!wq(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)),Uee(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return Uee(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(yet.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e==="auto"?t.set("auto"):wq(e)?t.set(bet(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||Hee(r);if(typeof e=="string"&&i.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Hee(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 jee={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/"},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:{}}},Wee={};function Zee(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),Zee(n,t[r]))}}Zee(jee,Wee);Xee.exports={configAttributes:jee,dfltConfig:Wee}});var Aq=ye((eer,Yee)=>{"use strict";var Tq=xa(),wet=uo(),DS=[];Yee.exports=function(e,t){if(DS.indexOf(e)!==-1)return;DS.push(e);var r=1e3;wet(t)?r=t:t==="long"&&(r=3e3);var n=Tq.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(DS);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var l=DS.indexOf(s);l!==-1&&DS.splice(l,1),Tq.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=Tq.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 o3=ub().dfltConfig,Sq=Aq(),Mq=Kee.exports={};Mq.log=function(){var e;if(o3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Mq.warn=function(){var e;if(o3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Mq.error=function(){var e;if(o3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var p6=ye((rer,Jee)=>{"use strict";Jee.exports=function(){}});var Eq=ye((ier,$ee)=>{"use strict";$ee.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{Qee.exports=Tet;function Tet(){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 rte=ye((aer,tte)=>{tte.exports=Aet;function Aet(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 nte=ye((oer,ite)=>{ite.exports=Met;function Met(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 kq=ye((ser,ate)=>{ate.exports=Eet;function Eet(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 ste=ye((ler,ote)=>{ote.exports=ket;function ket(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 ute=ye((uer,lte)=>{lte.exports=Cet;function Cet(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],x=t[13],b=t[14],g=t[15],E=r*s-n*o,k=r*l-i*o,S=r*u-a*o,L=n*l-i*s,_=n*u-a*s,C=i*u-a*l,M=c*x-f*v,p=c*b-h*v,P=c*g-d*v,T=f*b-h*x,F=f*g-d*x,q=h*g-d*b,V=E*q-k*F+S*T+L*P-_*p+C*M;return V?(V=1/V,e[0]=(s*q-l*F+u*T)*V,e[1]=(i*F-n*q-a*T)*V,e[2]=(x*C-b*_+g*L)*V,e[3]=(h*_-f*C-d*L)*V,e[4]=(l*P-o*q-u*p)*V,e[5]=(r*q-i*P+a*p)*V,e[6]=(b*S-v*C-g*k)*V,e[7]=(c*C-h*S+d*k)*V,e[8]=(o*F-s*P+u*M)*V,e[9]=(n*P-r*F-a*M)*V,e[10]=(v*_-x*S+g*E)*V,e[11]=(f*S-c*_-d*E)*V,e[12]=(s*p-o*T-l*M)*V,e[13]=(r*T-n*p+i*M)*V,e[14]=(x*k-v*L-b*E)*V,e[15]=(c*L-f*k+h*E)*V,e):null}});var fte=ye((cer,cte)=>{cte.exports=Let;function Let(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],x=t[13],b=t[14],g=t[15];return e[0]=s*(h*g-d*b)-f*(l*g-u*b)+x*(l*d-u*h),e[1]=-(n*(h*g-d*b)-f*(i*g-a*b)+x*(i*d-a*h)),e[2]=n*(l*g-u*b)-s*(i*g-a*b)+x*(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*g-d*b)-c*(l*g-u*b)+v*(l*d-u*h)),e[5]=r*(h*g-d*b)-c*(i*g-a*b)+v*(i*d-a*h),e[6]=-(r*(l*g-u*b)-o*(i*g-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*g-d*x)-c*(s*g-u*x)+v*(s*d-u*f),e[9]=-(r*(f*g-d*x)-c*(n*g-a*x)+v*(n*d-a*f)),e[10]=r*(s*g-u*x)-o*(n*g-a*x)+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*x)-c*(s*b-l*x)+v*(s*h-l*f)),e[13]=r*(f*b-h*x)-c*(n*b-i*x)+v*(n*h-i*f),e[14]=-(r*(s*b-l*x)-o*(n*b-i*x)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var dte=ye((fer,hte)=>{hte.exports=Pet;function Pet(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],x=e[14],b=e[15],g=t*o-r*a,E=t*s-n*a,k=t*l-i*a,S=r*s-n*o,L=r*l-i*o,_=n*l-i*s,C=u*v-c*d,M=u*x-f*d,p=u*b-h*d,P=c*x-f*v,T=c*b-h*v,F=f*b-h*x;return g*F-E*T+k*P+S*p-L*M+_*C}});var pte=ye((her,vte)=>{vte.exports=Iet;function Iet(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],x=t[12],b=t[13],g=t[14],E=t[15],k=r[0],S=r[1],L=r[2],_=r[3];return e[0]=k*n+S*s+L*f+_*x,e[1]=k*i+S*l+L*h+_*b,e[2]=k*a+S*u+L*d+_*g,e[3]=k*o+S*c+L*v+_*E,k=r[4],S=r[5],L=r[6],_=r[7],e[4]=k*n+S*s+L*f+_*x,e[5]=k*i+S*l+L*h+_*b,e[6]=k*a+S*u+L*d+_*g,e[7]=k*o+S*c+L*v+_*E,k=r[8],S=r[9],L=r[10],_=r[11],e[8]=k*n+S*s+L*f+_*x,e[9]=k*i+S*l+L*h+_*b,e[10]=k*a+S*u+L*d+_*g,e[11]=k*o+S*c+L*v+_*E,k=r[12],S=r[13],L=r[14],_=r[15],e[12]=k*n+S*s+L*f+_*x,e[13]=k*i+S*l+L*h+_*b,e[14]=k*a+S*u+L*d+_*g,e[15]=k*o+S*c+L*v+_*E,e}});var mte=ye((der,gte)=>{gte.exports=Det;function Det(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,x,b,g;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],x=t[9],b=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=x,e[10]=b,e[11]=g,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+x*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+g*a+t[15]),e}});var _te=ye((ver,yte)=>{yte.exports=Ret;function Ret(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 bte=ye((per,xte)=>{xte.exports=zet;function zet(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,x,b,g,E,k,S,L,_,C,M,p,P,T,F,q,V,H;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],x=t[4],b=t[5],g=t[6],E=t[7],k=t[8],S=t[9],L=t[10],_=t[11],C=i*i*c+u,M=a*i*c+o*l,p=o*i*c-a*l,P=i*a*c-o*l,T=a*a*c+u,F=o*a*c+i*l,q=i*o*c+a*l,V=a*o*c-i*l,H=o*o*c+u,e[0]=f*C+x*M+k*p,e[1]=h*C+b*M+S*p,e[2]=d*C+g*M+L*p,e[3]=v*C+E*M+_*p,e[4]=f*P+x*T+k*F,e[5]=h*P+b*T+S*F,e[6]=d*P+g*T+L*F,e[7]=v*P+E*T+_*F,e[8]=f*q+x*V+k*H,e[9]=h*q+b*V+S*H,e[10]=d*q+g*V+L*H,e[11]=v*q+E*V+_*H,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Tte=ye((ger,wte)=>{wte.exports=Fet;function Fet(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 Ste=ye((mer,Ate)=>{Ate.exports=qet;function qet(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 Ete=ye((yer,Mte)=>{Mte.exports=Oet;function Oet(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 Cte=ye((_er,kte)=>{kte.exports=Bet;function Bet(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 Pte=ye((xer,Lte)=>{Lte.exports=Net;function Net(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,x=a*u,b=o*s,g=o*l,E=o*u;return e[0]=1-(d+x),e[1]=f+E,e[2]=h-g,e[3]=0,e[4]=f-E,e[5]=1-(c+x),e[6]=v+b,e[7]=0,e[8]=h+g,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 Dte=ye((ber,Ite)=>{Ite.exports=Uet;function Uet(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 zte=ye((wer,Rte)=>{Rte.exports=Vet;function Vet(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 qte=ye((Ter,Fte)=>{Fte.exports=Het;function Het(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 Bte=ye((Aer,Ote)=>{Ote.exports=Get;function Get(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 Ute=ye((Ser,Nte)=>{Nte.exports=jet;function jet(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 Cq=ye((Mer,Vte)=>{Vte.exports=Wet;function Wet(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,x=a*o,b=a*s,g=a*l;return e[0]=1-f-v,e[1]=c+g,e[2]=h-b,e[3]=0,e[4]=c-g,e[5]=1-u-v,e[6]=d+x,e[7]=0,e[8]=h+b,e[9]=d-x,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Gte=ye((Eer,Hte)=>{Hte.exports=Zet;function Zet(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 Wte=ye((ker,jte)=>{jte.exports=Xet;function Xet(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 Xte=ye((Cer,Zte)=>{Zte.exports=Yet;function Yet(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 Kte=ye((Ler,Yte)=>{Yte.exports=Ket;function Ket(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 $te=ye((Per,Jte)=>{var Jet=kq();Jte.exports=$et;function $et(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],x=t[1],b=t[2],g=n[0],E=n[1],k=n[2],S=r[0],L=r[1],_=r[2];return Math.abs(v-S)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(b-_)<1e-6?Jet(e):(c=v-S,f=x-L,h=b-_,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=E*h-k*f,a=k*c-g*h,o=g*f-E*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*x+o*b),e[13]=-(s*v+l*x+u*b),e[14]=-(c*v+f*x+h*b),e[15]=1,e)}});var ere=ye((Ier,Qte)=>{Qte.exports=Qet;function Qet(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 Lq=ye((Der,tre)=>{tre.exports={create:ete(),clone:rte(),copy:nte(),identity:kq(),transpose:ste(),invert:ute(),adjoint:fte(),determinant:dte(),multiply:pte(),translate:mte(),scale:_te(),rotate:bte(),rotateX:Tte(),rotateY:Ste(),rotateZ:Ete(),fromRotation:Cte(),fromRotationTranslation:Pte(),fromScaling:Dte(),fromTranslation:zte(),fromXRotation:qte(),fromYRotation:Bte(),fromZRotation:Ute(),fromQuat:Cq(),frustum:Gte(),perspective:Wte(),perspectiveFromFieldOfView:Xte(),ortho:Kte(),lookAt:$te(),str:ere()}});var g6=ye(Xf=>{"use strict";var ett=Lq();Xf.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var ttt=xa(),rre=H1(),rtt=g6(),itt=Lq();function ntt(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 att(e){var t=ttt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function ire(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function ott(e,t){nre("global",e,t)}function nre(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):rre.warn("addStyleRule failed"):rre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function stt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&ire(r)}function ltt(e,t,r,n,i){var a=n.split(":"),o=i.split(":"),s="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(l){l.getAttribute(s)||(l.addEventListener("mouseenter",function(){var u=this.querySelector(r);u&&(u.style[a[0]]=a[1])}),l.addEventListener("mouseleave",function(){var u=this.querySelector(r);u&&(t&&this.matches(t)?u.style[a[0]]=a[1]:u.style[o[0]]=o[1])}),l.setAttribute(s,!0))})}function utt(e){var t=ore(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=are(n);if(i){var a=rtt.convertCssMatrix(i);r=itt.multiply(r,r,a)}}),r}function are(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 ore(e){for(var t=[];ctt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function ctt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function ftt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}sre.exports={getGraphDiv:ntt,isPlotDiv:att,removeElement:ire,addStyleRule:ott,addRelatedStyleRule:nre,deleteRelatedStyleRule:stt,setStyleOnHover:ltt,getFullTransformMatrix:utt,getElementTransformMatrix:are,getElementAndAncestors:ore,equalDomRects:ftt}});var zS=ye((Fer,lre)=>{"use strict";lre.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 Bu=ye((qer,pre)=>{"use strict";var cre=no().extendFlat,htt=gy(),fre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},hre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},dtt=fre.flags.slice().concat(["fullReplot"]),vtt=hre.flags.slice().concat("layoutReplot");pre.exports={traces:fre,layout:hre,traceFlags:function(){return ure(dtt)},layoutFlags:function(){return ure(vtt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";Pq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Pq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 Iq=ye((Ber,gre)=>{"use strict";gre.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 Wo=ye(m6=>{"use strict";var mre=Iq(),Ner=mre.FORMAT_LINK,Uer=mre.DATE_FORMAT_LINK;function Dq(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i{"use strict";function G1(e,t){return t?t.d2l(e):e}function yre(e,t){return t?t.l2d(e):e}function ptt(e){return e.x0}function gtt(e){return e.x1}function mtt(e){return e.y0}function ytt(e){return e.y1}function _re(e){return e.x0shift||0}function xre(e){return e.x1shift||0}function bre(e){return e.y0shift||0}function wre(e){return e.y1shift||0}function y6(e,t){return G1(e.x1,t)+xre(e)-G1(e.x0,t)-_re(e)}function _6(e,t,r){return G1(e.y1,r)+wre(e)-G1(e.y0,r)-bre(e)}function _tt(e,t){return Math.abs(y6(e,t))}function xtt(e,t,r){return Math.abs(_6(e,t,r))}function btt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(y6(e,t),2)+Math.pow(_6(e,t,r),2))}function wtt(e,t){return yre((G1(e.x1,t)+xre(e)+G1(e.x0,t)+_re(e))/2,t)}function Ttt(e,t,r){return yre((G1(e.y1,r)+wre(e)+G1(e.y0,r)+bre(e))/2,r)}function Att(e,t,r){return e.type!=="line"?void 0:_6(e,t,r)/y6(e,t)}Tre.exports={x0:ptt,x1:gtt,y0:mtt,y1:ytt,slope:Att,dx:y6,dy:_6,width:_tt,height:xtt,length:btt,xcenter:wtt,ycenter:Ttt}});var Mre=ye((Ger,Sre)=>{"use strict";var Stt=Bu().overrideAll,cb=vl(),Are=Su(),Mtt=Ed().dash,j1=no().extendFlat,Ett=Wo().shapeTexttemplateAttrs,ktt=x6();Sre.exports=Stt({newshape:{visible:j1({},cb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:j1({},cb.legend,{}),legendgroup:j1({},cb.legendgroup,{}),legendgrouptitle:{text:j1({},cb.legendgrouptitle.text,{}),font:Are({})},legendrank:j1({},cb.legendrank,{}),legendwidth:j1({},cb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:j1({},Mtt,{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({},cb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:Ett({newshape:!0},{keys:Object.keys(ktt)}),font:Are({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var kre=ye((jer,Ere)=>{"use strict";var Ctt=Ed().dash,Ltt=no().extendFlat;Ere.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:Ltt({},Ctt,{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 b6=ye((Wer,Cre)=>{"use strict";Cre.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 s3=ye((Zer,Dre)=>{"use strict";var Rq=Su(),Ptt=zS(),w6=dh(),Lre=Mre(),Pre=kre(),Itt=b6(),Ire=no().extendFlat,T6=Rq({editType:"calc"});T6.family.dflt='"Open Sans", verdana, arial, sans-serif';T6.size.dflt=12;T6.color.dflt=w6.defaultLine;Dre.exports={font:T6,title:{text:{valType:"string",editType:"layoutstyle"},font:Rq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Rq({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:Ire(Itt({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:w6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:w6.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:w6.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:Lre.newshape,activeshape:Lre.activeshape,newselection:Pre.newselection,activeselection:Pre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Ire({},Ptt.transition,{editType:"none"})}});var Rre=su(()=>{});var Dtt={};var zre=su(()=>{Rre()});var ba=ye(qs=>{"use strict";var l3=H1(),Fre=p6(),qre=Eq(),Rtt=gy(),ztt=RS().addStyleRule,Ore=no(),Ftt=vl(),qtt=s3(),Ott=Ore.extendFlat,zq=Ore.extendDeepAll;qs.modules={};qs.allCategories={};qs.allTypes=[];qs.subplotsRegistry={};qs.componentsRegistry={};qs.layoutArrayContainers=[];qs.layoutArrayRegexes=[];qs.traceLayoutAttributes={};qs.localeRegistry={};qs.apiMethodRegistry={};qs.collectableSubplotTypes=null;qs.register=function(t){if(qs.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 Gtt=e3().timeFormat,Yre=uo(),Fq=H1(),Z1=r3().mod,f3=es(),_0=f3.BADNUM,wp=f3.ONEDAY,FS=f3.ONEHOUR,W1=f3.ONEMIN,c3=f3.ONESEC,qS=f3.EPOCHJD,my=ba(),Hre=e3().utcFormat,jtt=/^\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,Wtt=/^\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,Gre=new Date().getFullYear()-70;function yy(e){return e&&my.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Yf.dateTick0=function(e,t){var r=Ztt(e,!!t);if(t<2)return r;var n=Yf.dateTime2ms(r,e);return n+=wp*(t-1),Yf.ms2DateTime(n,0,e)};function Ztt(e,t){return yy(e)?t?my.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:my.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Yf.dfltRange=function(e){return yy(e)?my.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Yf.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var S6,M6;Yf.dateTime2ms=function(e,t){if(Yf.isJSDate(e)){var r=e.getTimezoneOffset()*W1,n=(e.getUTCMinutes()-e.getMinutes())*W1+(e.getUTCSeconds()-e.getSeconds())*c3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*W1;r=r-i/2+Z1(n-r+i/2,i)}return e=Number(e)-r,e>=S6&&e<=M6?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=yy(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.substr(1),t="");var s=a&&t.substr(0,7)==="chinese",l=e.match(s?Wtt:jtt);if(!l)return _0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var x;try{var b=my.getComponentMethod("calendars","getCal")(t);if(s){var g=c.charAt(c.length-1)==="i";c=parseInt(c,10),x=b.newDate(u,b.toMonthIndex(u,c,g),f)}else x=b.newDate(u,Number(c),f)}catch(k){return _0}return x?(x.toJD()-qS)*wp+h*FS+d*W1+v*c3:_0}u.length===2?u=(Number(u)+2e3-Gre)%100+Gre:u=Number(u),c-=1;var E=new Date(Date.UTC(2e3,c,f,h,d));return E.setUTCFullYear(u),E.getUTCMonth()!==c||E.getUTCDate()!==f?_0:E.getTime()+v*c3};S6=Yf.MIN_MS=Yf.dateTime2ms("-9999");M6=Yf.MAX_MS=Yf.dateTime2ms("9999-12-31 23:59:59.9999");Yf.isDateTime=function(e,t){return Yf.dateTime2ms(e,t)!==_0};function u3(e,t){return String(e+Math.pow(10,t)).substr(1)}var A6=90*wp,jre=3*FS,Wre=5*W1;Yf.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=S6&&e<=M6))return _0;t||(t=0);var n=Math.floor(Z1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(yy(r)){var f=Math.floor(i/wp)+qS,h=Math.floor(Z1(e,wp));try{a=my.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=Hre("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=S6+wp&&e<=M6-wp))return _0;var t=Math.floor(Z1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Gtt("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Kre(n,i,a,o,s)};function Kre(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+u3(t,2)+":"+u3(r,2),(n||i)&&(e+=":"+u3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+u3(i,a)}return e}Yf.cleanDate=function(e,t,r){if(e===_0)return t;if(Yf.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(yy(r))return Fq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Yf.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Yf.isDateTime(e,r))return Fq.error("unrecognized date",e),t;return e};var Xtt=/%\d?f/g,Ytt=/%h/g,Ktt={1:"1",2:"1",3:"2",4:"2"};function Zre(e,t,r,n){e=e.replace(Xtt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Ytt,function(){return Ktt[r("%q")(i)]}),yy(n))try{e=my.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var Jtt=[59,59.9,59.99,59.999,59.9999];function $tt(e,t){var r=Z1(e+.05,wp),n=u3(Math.floor(r/FS),2)+":"+u3(Z1(Math.floor(r/W1),60),2);if(t!=="M"){Yre(t)||(t=0);var i=Math.min(Z1(e/c3,60),Jtt[t]),a=(100+i).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}Yf.formatDate=function(e,t,r,n,i,a){if(i=yy(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` +`)};function tt(or){return or.map(zt).join(Z)}function zt(or){return we.test(or)?'"'+or.replace(/\"/g,'""')+'"':or}return Ue},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Ji,ua,Fn,Sa,go=this[G(this,"requestAnimationFrame")]||function(Z){setTimeout(Z,17)};e.timer=function(){Oo.apply(this,arguments)};function Oo(Z,oe,we){var Be=arguments.length;Be<2&&(oe=0),Be<3&&(we=Date.now());var Ue=we+oe,We={c:Z,t:Ue,n:null};return ua?ua.n=We:Ji=We,ua=We,Fn||(Sa=clearTimeout(Sa),Fn=1,go(ho)),We}function ho(){var Z=Mo(),oe=xo()-Z;oe>24?(isFinite(oe)&&(clearTimeout(Sa),Sa=setTimeout(ho,oe)),Fn=0):(Fn=1,go(ho))}e.timer.flush=function(){Mo(),xo()};function Mo(){for(var Z=Date.now(),oe=Ji;oe;)Z>=oe.t&&oe.c(Z-oe.t)&&(oe.c=null),oe=oe.n;return Z}function xo(){for(var Z,oe=Ji,we=1/0;oe;)oe.c?(oe.t=0;--tt)qr.push(Ue[or[Rr[tt]][2]]);for(tt=+oi;tt1&&Vt(Z[we[Be-2]],Z[we[Be-1]],Z[Ue])<=0;)--Be;we[Be++]=Ue}return we.slice(0,Be)}function Xs(Z,oe){return Z[0]-oe[0]||Z[1]-oe[1]}e.geom.polygon=function(Z){return ie(Z,wl),Z};var wl=e.geom.polygon.prototype=[];wl.area=function(){for(var Z=-1,oe=this.length,we,Be=this[oe-1],Ue=0;++ZYe)tt=tt.L;else if(wt=oe-vo(tt,we),wt>Ye){if(!tt.R){Be=tt;break}tt=tt.R}else{We>-Ye?(Be=tt.P,Ue=tt):wt>-Ye?(Be=tt,Ue=tt.N):Be=Ue=tt;break}var zt=ms(Z);if(Hs.insert(Be,zt),!(!Be&&!Ue)){if(Be===Ue){ko(Be),Ue=ms(Be.site),Hs.insert(zt,Ue),zt.edge=Ue.edge=cf(Be.site,zt.site),Zn(Be),Zn(Ue);return}if(!Ue){zt.edge=cf(Be.site,zt.site);return}ko(Be),ko(Ue);var or=Be.site,lr=or.x,Rr=or.y,Ir=Z.x-lr,oi=Z.y-Rr,ui=Ue.site,qr=ui.x-lr,Kr=ui.y-Rr,ii=2*(Ir*Kr-oi*qr),vi=Ir*Ir+oi*oi,ci=qr*qr+Kr*Kr,Jr={x:(Kr*vi-oi*ci)/ii+lr,y:(Ir*ci-qr*vi)/ii+Rr};Al(Ue.edge,or,ui,Jr),zt.edge=cf(or,Z,null,Jr),Ue.edge=cf(Z,ui,null,Jr),Zn(Be),Zn(Ue)}}function Il(Z,oe){var we=Z.site,Be=we.x,Ue=we.y,We=Ue-oe;if(!We)return Be;var wt=Z.P;if(!wt)return-1/0;we=wt.site;var tt=we.x,zt=we.y,or=zt-oe;if(!or)return tt;var lr=tt-Be,Rr=1/We-1/or,Ir=lr/or;return Rr?(-Ir+Math.sqrt(Ir*Ir-2*Rr*(lr*lr/(-2*or)-zt+or/2+Ue-We/2)))/Rr+Be:(Be+tt)/2}function vo(Z,oe){var we=Z.N;if(we)return Il(we,oe);var Be=Z.site;return Be.y===oe?Be.x:1/0}function Wl(Z){this.site=Z,this.edges=[]}Wl.prototype.prepare=function(){for(var Z=this.edges,oe=Z.length,we;oe--;)we=Z[oe].edge,(!we.b||!we.a)&&Z.splice(oe,1);return Z.sort(Zl),Z.length};function Ks(Z){for(var oe=Z[0][0],we=Z[1][0],Be=Z[0][1],Ue=Z[1][1],We,wt,tt,zt,or=Ys,lr=or.length,Rr,Ir,oi,ui,qr,Kr;lr--;)if(Rr=or[lr],!(!Rr||!Rr.prepare()))for(oi=Rr.edges,ui=oi.length,Ir=0;IrYe||g(zt-wt)>Ye)&&(oi.splice(Ir,0,new Hc(rh(Rr.site,Kr,g(tt-oe)Ye?{x:oe,y:g(We-oe)Ye?{x:g(wt-Ue)Ye?{x:we,y:g(We-we)Ye?{x:g(wt-Be)=-Ve)){var Ir=zt*zt+or*or,oi=lr*lr+Kr*Kr,ui=(Kr*Ir-or*oi)/Rr,qr=(zt*oi-lr*Ir)/Rr,Kr=qr+tt,ii=Gu.pop()||new Ec;ii.arc=Z,ii.site=Ue,ii.x=ui+wt,ii.y=Kr+Math.sqrt(ui*ui+qr*qr),ii.cy=Kr,Z.circle=ii;for(var vi=null,ci=$l._;ci;)if(ii.y0)){if(qr/=oi,oi<0){if(qr0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}if(qr=we-tt,!(!oi&&qr<0)){if(qr/=oi,oi<0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}else if(oi>0){if(qr0)){if(qr/=ui,ui<0){if(qr0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}if(qr=Be-zt,!(!ui&&qr<0)){if(qr/=ui,ui<0){if(qr>Ir)return;qr>Rr&&(Rr=qr)}else if(ui>0){if(qr0&&(Ue.a={x:tt+Rr*oi,y:zt+Rr*ui}),Ir<1&&(Ue.b={x:tt+Ir*oi,y:zt+Ir*ui}),Ue}}}}}}function Tl(Z){for(var oe=ml,we=Co(Z[0][0],Z[0][1],Z[1][0],Z[1][1]),Be=oe.length,Ue;Be--;)Ue=oe[Be],(!uf(Ue,Z)||!we(Ue)||g(Ue.a.x-Ue.b.x)=We)return;if(lr>Ir){if(!Be)Be={x:ui,y:wt};else if(Be.y>=tt)return;we={x:ui,y:tt}}else{if(!Be)Be={x:ui,y:tt};else if(Be.y1)if(lr>Ir){if(!Be)Be={x:(wt-ii)/Kr,y:wt};else if(Be.y>=tt)return;we={x:(tt-ii)/Kr,y:tt}}else{if(!Be)Be={x:(tt-ii)/Kr,y:tt};else if(Be.y=We)return;we={x:We,y:Kr*We+ii}}else{if(!Be)Be={x:We,y:Kr*We+ii};else if(Be.x=lr&&ii.x<=Ir&&ii.y>=Rr&&ii.y<=oi?[[lr,oi],[Ir,oi],[Ir,Rr],[lr,Rr]]:[];vi.point=zt[qr]}),or}function tt(zt){return zt.map(function(or,lr){return{x:Math.round(Be(or,lr)/Ye)*Ye,y:Math.round(Ue(or,lr)/Ye)*Ye,i:lr}})}return wt.links=function(zt){return Gc(tt(zt)).edges.filter(function(or){return or.l&&or.r}).map(function(or){return{source:zt[or.l.i],target:zt[or.r.i]}})},wt.triangles=function(zt){var or=[];return Gc(tt(zt)).cells.forEach(function(lr,Rr){for(var Ir=lr.site,oi=lr.edges.sort(Zl),ui=-1,qr=oi.length,Kr,ii,vi=oi[qr-1].edge,ci=vi.l===Ir?vi.r:vi.l;++uici&&(ci=lr.x),lr.y>Jr&&(Jr=lr.y),oi.push(lr.x),ui.push(lr.y);else for(qr=0;qrci&&(ci=un),dn>Jr&&(Jr=dn),oi.push(un),ui.push(dn)}var En=ci-ii,Nn=Jr-vi;En>Nn?Jr=vi+En:ci=ii+Nn;function ga(wa,io,Ss,_s,Ns,pn,za,Lo){if(!(isNaN(Ss)||isNaN(_s)))if(wa.leaf){var Fo=wa.x,js=wa.y;if(Fo!=null)if(g(Fo-Ss)+g(js-_s)<.01)ya(wa,io,Ss,_s,Ns,pn,za,Lo);else{var xl=wa.point;wa.x=wa.y=wa.point=null,ya(wa,xl,Fo,js,Ns,pn,za,Lo),ya(wa,io,Ss,_s,Ns,pn,za,Lo)}else wa.x=Ss,wa.y=_s,wa.point=io}else ya(wa,io,Ss,_s,Ns,pn,za,Lo)}function ya(wa,io,Ss,_s,Ns,pn,za,Lo){var Fo=(Ns+za)*.5,js=(pn+Lo)*.5,xl=Ss>=Fo,fu=_s>=js,dl=fu<<1|xl;wa.leaf=!1,wa=wa.nodes[dl]||(wa.nodes[dl]=Ul()),xl?Ns=Fo:za=Fo,fu?pn=js:Lo=js,ga(wa,io,Ss,_s,Ns,pn,za,Lo)}var so=Ul();if(so.add=function(wa){ga(so,wa,+Rr(wa,++qr),+Ir(wa,qr),ii,vi,ci,Jr)},so.visit=function(wa){Js(wa,so,ii,vi,ci,Jr)},so.find=function(wa){return hc(so,wa[0],wa[1],ii,vi,ci,Jr)},qr=-1,oe==null){for(;++qrWe||Ir>wt||oi=un,Nn=we>=dn,ga=Nn<<1|En,ya=ga+4;gawe&&(We=oe.slice(we,We),tt[wt]?tt[wt]+=We:tt[++wt]=We),(Be=Be[0])===(Ue=Ue[0])?tt[wt]?tt[wt]+=Ue:tt[++wt]=Ue:(tt[++wt]=null,zt.push({i:wt,x:$s(Be,Ue)})),we=dc.lastIndex;return we=0&&!(Be=e.interpolators[we](Z,oe)););return Be}e.interpolators=[function(Z,oe){var we=typeof oe;return(we==="string"?Hr.has(oe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(oe)?Cc:hs:oe instanceof Wn?Cc:Array.isArray(oe)?ec:we==="object"&&isNaN(oe)?ws:$s)(Z,oe)}],e.interpolateArray=ec;function ec(Z,oe){var we=[],Be=[],Ue=Z.length,We=oe.length,wt=Math.min(Z.length,oe.length),tt;for(tt=0;tt=0?Z.slice(0,oe):Z,Be=oe>=0?Z.slice(oe+1):"in";return we=ov.get(we)||Ps,Be=wo.get(Be)||H,Od(Be(we.apply(null,t.call(arguments,1))))};function Od(Z){return function(oe){return oe<=0?0:oe>=1?1:Z(oe)}}function $o(Z){return function(oe){return 1-Z(1-oe)}}function Ja(Z){return function(oe){return .5*(oe<.5?Z(2*oe):2-Z(2-2*oe))}}function Ef(Z){return Z*Z}function tc(Z){return Z*Z*Z}function uu(Z){if(Z<=0)return 0;if(Z>=1)return 1;var oe=Z*Z,we=oe*Z;return 4*(Z<.5?we:3*(Z-oe)+we-.75)}function Mh(Z){return function(oe){return Math.pow(oe,Z)}}function jc(Z){return 1-Math.cos(Z*xe)}function kf(Z){return Math.pow(2,10*(Z-1))}function Ml(Z){return 1-Math.sqrt(1-Z*Z)}function Yh(Z,oe){var we;return arguments.length<2&&(oe=.45),arguments.length?we=oe/ht*Math.asin(1/Z):(Z=1,we=oe/4),function(Be){return 1+Z*Math.pow(2,-10*Be)*Math.sin((Be-we)*ht/oe)}}function Eh(Z){return Z||(Z=1.70158),function(oe){return oe*oe*((Z+1)*oe-Z)}}function nh(Z){return Z<1/2.75?7.5625*Z*Z:Z<2/2.75?7.5625*(Z-=1.5/2.75)*Z+.75:Z<2.5/2.75?7.5625*(Z-=2.25/2.75)*Z+.9375:7.5625*(Z-=2.625/2.75)*Z+.984375}e.interpolateHcl=hf;function hf(Z,oe){Z=e.hcl(Z),oe=e.hcl(oe);var we=Z.h,Be=Z.c,Ue=Z.l,We=oe.h-we,wt=oe.c-Be,tt=oe.l-Ue;return isNaN(wt)&&(wt=0,Be=isNaN(Be)?oe.c:Be),isNaN(We)?(We=0,we=isNaN(we)?oe.h:we):We>180?We-=360:We<-180&&(We+=360),function(zt){return Fr(we+We*zt,Be+wt*zt,Ue+tt*zt)+""}}e.interpolateHsl=kh;function kh(Z,oe){Z=e.hsl(Z),oe=e.hsl(oe);var we=Z.h,Be=Z.s,Ue=Z.l,We=oe.h-we,wt=oe.s-Be,tt=oe.l-Ue;return isNaN(wt)&&(wt=0,Be=isNaN(Be)?oe.s:Be),isNaN(We)?(We=0,we=isNaN(we)?oe.h:we):We>180?We-=360:We<-180&&(We+=360),function(zt){return jt(we+We*zt,Be+wt*zt,Ue+tt*zt)+""}}e.interpolateLab=Kh;function Kh(Z,oe){Z=e.lab(Z),oe=e.lab(oe);var we=Z.l,Be=Z.a,Ue=Z.b,We=oe.l-we,wt=oe.a-Be,tt=oe.b-Ue;return function(zt){return Gi(we+We*zt,Be+wt*zt,Ue+tt*zt)+""}}e.interpolateRound=rc;function rc(Z,oe){return oe-=Z,function(we){return Math.round(Z+oe*we)}}e.transform=function(Z){var oe=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(we){if(we!=null){oe.setAttribute("transform",we);var Be=oe.transform.baseVal.consolidate()}return new ah(Be?Be.matrix:Nf)})(Z)};function ah(Z){var oe=[Z.a,Z.b],we=[Z.c,Z.d],Be=df(oe),Ue=Wc(oe,we),We=df(Cu(we,oe,-Ue))||0;oe[0]*we[1]180?oe+=360:oe-Z>180&&(Z+=360),Be.push({i:we.push(Zc(we)+"rotate(",null,")")-2,x:$s(Z,oe)})):oe&&we.push(Zc(we)+"rotate("+oe+")")}function Bd(Z,oe,we,Be){Z!==oe?Be.push({i:we.push(Zc(we)+"skewX(",null,")")-2,x:$s(Z,oe)}):oe&&we.push(Zc(we)+"skewX("+oe+")")}function Jh(Z,oe,we,Be){if(Z[0]!==oe[0]||Z[1]!==oe[1]){var Ue=we.push(Zc(we)+"scale(",null,",",null,")");Be.push({i:Ue-4,x:$s(Z[0],oe[0])},{i:Ue-2,x:$s(Z[1],oe[1])})}else(oe[0]!==1||oe[1]!==1)&&we.push(Zc(we)+"scale("+oe+")")}function Cf(Z,oe){var we=[],Be=[];return Z=e.transform(Z),oe=e.transform(oe),ds(Z.translate,oe.translate,we,Be),Ch(Z.rotate,oe.rotate,we,Be),Bd(Z.skew,oe.skew,we,Be),Jh(Z.scale,oe.scale,we,Be),Z=oe=null,function(Ue){for(var We=-1,wt=Be.length,tt;++We0?We=Jr:(we.c=null,we.t=NaN,we=null,oe.end({type:"end",alpha:We=0})):Jr>0&&(oe.start({type:"start",alpha:We=Jr}),we=Oo(Z.tick)),Z):We},Z.start=function(){var Jr,un=oi.length,dn=ui.length,En=Be[0],Nn=Be[1],ga,ya;for(Jr=0;Jr=0;)We.push(lr=or[zt]),lr.parent=tt,lr.depth=tt.depth+1;we&&(tt.value=0),tt.children=or}else we&&(tt.value=+we.call(Be,tt,tt.depth)||0),delete tt.children;return vc(Ue,function(Rr){var Ir,oi;Z&&(Ir=Rr.children)&&Ir.sort(Z),we&&(oi=Rr.parent)&&(oi.value+=Rr.value)}),wt}return Be.sort=function(Ue){return arguments.length?(Z=Ue,Be):Z},Be.children=function(Ue){return arguments.length?(oe=Ue,Be):oe},Be.value=function(Ue){return arguments.length?(we=Ue,Be):we},Be.revalue=function(Ue){return we&&(Pc(Ue,function(We){We.children&&(We.value=0)}),vc(Ue,function(We){var wt;We.children||(We.value=+we.call(Be,We,We.depth)||0),(wt=We.parent)&&(wt.value+=We.value)})),Ue},Be};function ju(Z,oe){return e.rebind(Z,oe,"sort","children","value"),Z.nodes=Z,Z.links=Iu,Z}function Pc(Z,oe){for(var we=[Z];(Z=we.pop())!=null;)if(oe(Z),(Ue=Z.children)&&(Be=Ue.length))for(var Be,Ue;--Be>=0;)we.push(Ue[Be])}function vc(Z,oe){for(var we=[Z],Be=[];(Z=we.pop())!=null;)if(Be.push(Z),(wt=Z.children)&&(We=wt.length))for(var Ue=-1,We,wt;++UeUe&&(Ue=tt),Be.push(tt)}for(wt=0;wtBe&&(we=oe,Be=Ue);return we}function Is(Z){return Z.reduce(Pf,0)}function Pf(Z,oe){return Z+oe[1]}e.layout.histogram=function(){var Z=!0,oe=Number,we=Vf,Be=Ic;function Ue(We,Ir){for(var tt=[],zt=We.map(oe,this),or=we.call(this,zt,Ir),lr=Be.call(this,or,zt,Ir),Rr,Ir=-1,oi=zt.length,ui=lr.length-1,qr=Z?1:1/oi,Kr;++Ir0)for(Ir=-1;++Ir=or[0]&&Kr<=or[1]&&(Rr=tt[e.bisect(lr,Kr,1,ui)-1],Rr.y+=qr,Rr.push(We[Ir]));return tt}return Ue.value=function(We){return arguments.length?(oe=We,Ue):oe},Ue.range=function(We){return arguments.length?(we=ti(We),Ue):we},Ue.bins=function(We){return arguments.length?(Be=typeof We=="number"?function(wt){return Wu(wt,We)}:ti(We),Ue):Be},Ue.frequency=function(We){return arguments.length?(Z=!!We,Ue):Z},Ue};function Ic(Z,oe){return Wu(Z,Math.ceil(Math.log(oe.length)/Math.LN2+1))}function Wu(Z,oe){for(var we=-1,Be=+Z[0],Ue=(Z[1]-Be)/oe,We=[];++we<=oe;)We[we]=Ue*we+Be;return We}function Vf(Z){return[e.min(Z),e.max(Z)]}e.layout.pack=function(){var Z=e.layout.hierarchy().sort(pc),oe=0,we=[1,1],Be;function Ue(We,wt){var tt=Z.call(this,We,wt),zt=tt[0],or=we[0],lr=we[1],Rr=Be==null?Math.sqrt:typeof Be=="function"?Be:function(){return Be};if(zt.x=zt.y=0,vc(zt,function(oi){oi.r=+Rr(oi.value)}),vc(zt,Ih),oe){var Ir=oe*(Be?1:Math.max(2*zt.r/or,2*zt.r/lr))/2;vc(zt,function(oi){oi.r+=Ir}),vc(zt,Ih),vc(zt,function(oi){oi.r-=Ir})}return gc(zt,or/2,lr/2,Be?1:1/Math.max(2*zt.r/or,2*zt.r/lr)),tt}return Ue.size=function(We){return arguments.length?(we=We,Ue):we},Ue.radius=function(We){return arguments.length?(Be=We==null||typeof We=="function"?We:+We,Ue):Be},Ue.padding=function(We){return arguments.length?(oe=+We,Ue):oe},ju(Ue,Z)};function pc(Z,oe){return Z.value-oe.value}function pf(Z,oe){var we=Z._pack_next;Z._pack_next=oe,oe._pack_prev=Z,oe._pack_next=we,we._pack_prev=oe}function Ph(Z,oe){Z._pack_next=oe,oe._pack_prev=Z}function Dl(Z,oe){var we=oe.x-Z.x,Be=oe.y-Z.y,Ue=Z.r+oe.r;return .999*Ue*Ue>we*we+Be*Be}function Ih(Z){if(!(oe=Z.children)||!(Ir=oe.length))return;var oe,we=1/0,Be=-1/0,Ue=1/0,We=-1/0,wt,tt,zt,or,lr,Rr,Ir;function oi(Jr){we=Math.min(Jr.x-Jr.r,we),Be=Math.max(Jr.x+Jr.r,Be),Ue=Math.min(Jr.y-Jr.r,Ue),We=Math.max(Jr.y+Jr.r,We)}if(oe.forEach(Zu),wt=oe[0],wt.x=-wt.r,wt.y=0,oi(wt),Ir>1&&(tt=oe[1],tt.x=tt.r,tt.y=0,oi(tt),Ir>2))for(zt=oe[2],hl(wt,tt,zt),oi(zt),pf(wt,zt),wt._pack_prev=zt,pf(zt,tt),tt=wt._pack_next,or=3;orKr.x&&(Kr=un),un.depth>ii.depth&&(ii=un)});var vi=oe(qr,Kr)/2-qr.x,ci=we[0]/(Kr.x+oe(Kr,qr)/2+vi),Jr=we[1]/(ii.depth||1);Pc(oi,function(un){un.x=(un.x+vi)*ci,un.y=un.depth*Jr})}return Ir}function We(lr){for(var Rr={A:null,children:[lr]},Ir=[Rr],oi;(oi=Ir.pop())!=null;)for(var ui=oi.children,qr,Kr=0,ii=ui.length;Kr0&&(nc(gt(qr,lr,Ir),lr,un),ii+=un,vi+=un),ci+=qr.m,ii+=oi.m,Jr+=Kr.m,vi+=ui.m;qr&&!Yc(ui)&&(ui.t=qr,ui.m+=ci-vi),oi&&!mc(Kr)&&(Kr.t=oi,Kr.m+=ii-Jr,Ir=lr)}return Ir}function or(lr){lr.x*=we[0],lr.y=lr.depth*we[1]}return Ue.separation=function(lr){return arguments.length?(oe=lr,Ue):oe},Ue.size=function(lr){return arguments.length?(Be=(we=lr)==null?or:null,Ue):Be?null:we},Ue.nodeSize=function(lr){return arguments.length?(Be=(we=lr)==null?null:or,Ue):Be?we:null},ju(Ue,Z)};function ru(Z,oe){return Z.parent==oe.parent?1:2}function mc(Z){var oe=Z.children;return oe.length?oe[0]:Z.t}function Yc(Z){var oe=Z.children,we;return(we=oe.length)?oe[we-1]:Z.t}function nc(Z,oe,we){var Be=we/(oe.i-Z.i);oe.c-=Be,oe.s+=we,Z.c+=Be,oe.z+=we,oe.m+=we}function gf(Z){for(var oe=0,we=0,Be=Z.children,Ue=Be.length,We;--Ue>=0;)We=Be[Ue],We.z+=oe,We.m+=oe,oe+=We.s+(we+=We.c)}function gt(Z,oe,we){return Z.a.parent===oe.parent?Z.a:we}e.layout.cluster=function(){var Z=e.layout.hierarchy().sort(null).value(null),oe=ru,we=[1,1],Be=!1;function Ue(We,wt){var tt=Z.call(this,We,wt),zt=tt[0],or,lr=0;vc(zt,function(qr){var Kr=qr.children;Kr&&Kr.length?(qr.x=wr(Kr),qr.y=Bt(Kr)):(qr.x=or?lr+=oe(qr,or):0,qr.y=0,or=qr)});var Rr=vr(zt),Ir=Ur(zt),oi=Rr.x-oe(Rr,Ir)/2,ui=Ir.x+oe(Ir,Rr)/2;return vc(zt,Be?function(qr){qr.x=(qr.x-zt.x)*we[0],qr.y=(zt.y-qr.y)*we[1]}:function(qr){qr.x=(qr.x-oi)/(ui-oi)*we[0],qr.y=(1-(zt.y?qr.y/zt.y:1))*we[1]}),tt}return Ue.separation=function(We){return arguments.length?(oe=We,Ue):oe},Ue.size=function(We){return arguments.length?(Be=(we=We)==null,Ue):Be?null:we},Ue.nodeSize=function(We){return arguments.length?(Be=(we=We)!=null,Ue):Be?we:null},ju(Ue,Z)};function Bt(Z){return 1+e.max(Z,function(oe){return oe.y})}function wr(Z){return Z.reduce(function(oe,we){return oe+we.x},0)/Z.length}function vr(Z){var oe=Z.children;return oe&&oe.length?vr(oe[0]):Z}function Ur(Z){var oe=Z.children,we;return oe&&(we=oe.length)?Ur(oe[we-1]):Z}e.layout.treemap=function(){var Z=e.layout.hierarchy(),oe=Math.round,we=[1,1],Be=null,Ue=fi,We=!1,wt,tt="squarify",zt=.5*(1+Math.sqrt(5));function or(qr,Kr){for(var ii=-1,vi=qr.length,ci,Jr;++ii0;)vi.push(Jr=ci[Nn-1]),vi.area+=Jr.area,tt!=="squarify"||(dn=Ir(vi,En))<=un?(ci.pop(),un=dn):(vi.area-=vi.pop().area,oi(vi,En,ii,!1),En=Math.min(ii.dx,ii.dy),vi.length=vi.area=0,un=1/0);vi.length&&(oi(vi,En,ii,!0),vi.length=vi.area=0),Kr.forEach(lr)}}function Rr(qr){var Kr=qr.children;if(Kr&&Kr.length){var ii=Ue(qr),vi=Kr.slice(),ci,Jr=[];for(or(vi,ii.dx*ii.dy/qr.value),Jr.area=0;ci=vi.pop();)Jr.push(ci),Jr.area+=ci.area,ci.z!=null&&(oi(Jr,ci.z?ii.dx:ii.dy,ii,!vi.length),Jr.length=Jr.area=0);Kr.forEach(Rr)}}function Ir(qr,Kr){for(var ii=qr.area,vi,ci=0,Jr=1/0,un=-1,dn=qr.length;++unci&&(ci=vi));return ii*=ii,Kr*=Kr,ii?Math.max(Kr*ci*zt/ii,ii/(Kr*Jr*zt)):1/0}function oi(qr,Kr,ii,vi){var ci=-1,Jr=qr.length,un=ii.x,dn=ii.y,En=Kr?oe(qr.area/Kr):0,Nn;if(Kr==ii.dx){for((vi||En>ii.dy)&&(En=ii.dy);++ciii.dx)&&(En=ii.dx);++ci1);return Z+oe*Be*Math.sqrt(-2*Math.log(We)/We)}},logNormal:function(){var Z=e.random.normal.apply(e,arguments);return function(){return Math.exp(Z())}},bates:function(Z){var oe=e.random.irwinHall(Z);return function(){return oe()/Z}},irwinHall:function(Z){return function(){for(var oe=0,we=0;we2?mi:hn,or=Be?Lu:pd;return Ue=zt(Z,oe,or,we),We=zt(oe,Z,or,Sl),tt}function tt(zt){return Ue(zt)}return tt.invert=function(zt){return We(zt)},tt.domain=function(zt){return arguments.length?(Z=zt.map(Number),wt()):Z},tt.range=function(zt){return arguments.length?(oe=zt,wt()):oe},tt.rangeRound=function(zt){return tt.range(zt).interpolate(rc)},tt.clamp=function(zt){return arguments.length?(Be=zt,wt()):Be},tt.interpolate=function(zt){return arguments.length?(we=zt,wt()):we},tt.ticks=function(zt){return qa(Z,zt)},tt.tickFormat=function(zt,or){return d3_scale_linearTickFormat(Z,zt,or)},tt.nice=function(zt){return Ta(Z,zt),wt()},tt.copy=function(){return Pn(Z,oe,we,Be)},wt()}function Ma(Z,oe){return e.rebind(Z,oe,"range","rangeRound","interpolate","clamp")}function Ta(Z,oe){return Ti(Z,qi(Ea(Z,oe)[2])),Ti(Z,qi(Ea(Z,oe)[2])),Z}function Ea(Z,oe){oe==null&&(oe=10);var we=Fi(Z),Be=we[1]-we[0],Ue=Math.pow(10,Math.floor(Math.log(Be/oe)/Math.LN10)),We=oe/Be*Ue;return We<=.15?Ue*=10:We<=.35?Ue*=5:We<=.75&&(Ue*=2),we[0]=Math.ceil(we[0]/Ue)*Ue,we[1]=Math.floor(we[1]/Ue)*Ue+Ue*.5,we[2]=Ue,we}function qa(Z,oe){return e.range.apply(e,Ea(Z,oe))}var Cn={s:1,g:1,p:1,r:1,e:1};function sn(Z){return-Math.floor(Math.log(Z)/Math.LN10+.01)}function Ua(Z,oe){var we=sn(oe[2]);return Z in Cn?Math.abs(we-sn(Math.max(g(oe[0]),g(oe[1]))))+ +(Z!=="e"):we-(Z==="%")*2}e.scale.log=function(){return mo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function mo(Z,oe,we,Be){function Ue(tt){return(we?Math.log(tt<0?0:tt):-Math.log(tt>0?0:-tt))/Math.log(oe)}function We(tt){return we?Math.pow(oe,tt):-Math.pow(oe,-tt)}function wt(tt){return Z(Ue(tt))}return wt.invert=function(tt){return We(Z.invert(tt))},wt.domain=function(tt){return arguments.length?(we=tt[0]>=0,Z.domain((Be=tt.map(Number)).map(Ue)),wt):Be},wt.base=function(tt){return arguments.length?(oe=+tt,Z.domain(Be.map(Ue)),wt):oe},wt.nice=function(){var tt=Ti(Be.map(Ue),we?Math:Xo);return Z.domain(tt),Be=tt.map(We),wt},wt.ticks=function(){var tt=Fi(Be),zt=[],or=tt[0],lr=tt[1],Rr=Math.floor(Ue(or)),Ir=Math.ceil(Ue(lr)),oi=oe%1?2:oe;if(isFinite(Ir-Rr)){if(we){for(;Rr0;ui--)zt.push(We(Rr)*ui);for(Rr=0;zt[Rr]lr;Ir--);zt=zt.slice(Rr,Ir)}return zt},wt.copy=function(){return mo(Z.copy(),oe,we,Be)},Ma(wt,Z)}var Xo={floor:function(Z){return-Math.ceil(-Z)},ceil:function(Z){return-Math.floor(-Z)}};e.scale.pow=function(){return Ts(e.scale.linear(),1,[0,1])};function Ts(Z,oe,we){var Be=Qo(oe),Ue=Qo(1/oe);function We(wt){return Z(Be(wt))}return We.invert=function(wt){return Ue(Z.invert(wt))},We.domain=function(wt){return arguments.length?(Z.domain((we=wt.map(Number)).map(Be)),We):we},We.ticks=function(wt){return qa(we,wt)},We.tickFormat=function(wt,tt){return d3_scale_linearTickFormat(we,wt,tt)},We.nice=function(wt){return We.domain(Ta(we,wt))},We.exponent=function(wt){return arguments.length?(Be=Qo(oe=wt),Ue=Qo(1/oe),Z.domain(we.map(Be)),We):oe},We.copy=function(){return Ts(Z.copy(),oe,we)},Ma(We,Z)}function Qo(Z){return function(oe){return oe<0?-Math.pow(-oe,Z):Math.pow(oe,Z)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ys([],{t:"range",a:[[]]})};function ys(Z,oe){var we,Be,Ue;function We(tt){return Be[((we.get(tt)||(oe.t==="range"?we.set(tt,Z.push(tt)):NaN))-1)%Be.length]}function wt(tt,zt){return e.range(Z.length).map(function(or){return tt+zt*or})}return We.domain=function(tt){if(!arguments.length)return Z;Z=[],we=new A;for(var zt=-1,or=tt.length,lr;++zt0?we[We-1]:Z[0],WeIr?0:1;if(lr=Le)return zt(lr,ui)+(or?zt(or,1-ui):"")+"Z";var qr,Kr,ii,vi,ci=0,Jr=0,un,dn,En,Nn,ga,ya,so,wa,io=[];if((vi=(+wt.apply(this,arguments)||0)/2)&&(ii=Be===Du?Math.sqrt(or*or+lr*lr):+Be.apply(this,arguments),ui||(Jr*=-1),lr&&(Jr=Qr(ii/lr*Math.sin(vi))),or&&(ci=Qr(ii/or*Math.sin(vi)))),lr){un=lr*Math.cos(Rr+Jr),dn=lr*Math.sin(Rr+Jr),En=lr*Math.cos(Ir-Jr),Nn=lr*Math.sin(Ir-Jr);var Ss=Math.abs(Ir-Rr-2*Jr)<=Xe?0:1;if(Jr&&Rc(un,dn,En,Nn)===ui^Ss){var _s=(Rr+Ir)/2;un=lr*Math.cos(_s),dn=lr*Math.sin(_s),En=Nn=null}}else un=dn=0;if(or){ga=or*Math.cos(Ir-ci),ya=or*Math.sin(Ir-ci),so=or*Math.cos(Rr+ci),wa=or*Math.sin(Rr+ci);var Ns=Math.abs(Rr-Ir+2*ci)<=Xe?0:1;if(ci&&Rc(ga,ya,so,wa)===1-ui^Ns){var pn=(Rr+Ir)/2;ga=or*Math.cos(pn),ya=or*Math.sin(pn),so=wa=null}}else ga=ya=0;if(oi>Ye&&(qr=Math.min(Math.abs(lr-or)/2,+we.apply(this,arguments)))>.001){Kr=or0?0:1}function Ra(Z,oe,we,Be,Ue){var We=Z[0]-oe[0],wt=Z[1]-oe[1],tt=(Ue?Be:-Be)/Math.sqrt(We*We+wt*wt),zt=tt*wt,or=-tt*We,lr=Z[0]+zt,Rr=Z[1]+or,Ir=oe[0]+zt,oi=oe[1]+or,ui=(lr+Ir)/2,qr=(Rr+oi)/2,Kr=Ir-lr,ii=oi-Rr,vi=Kr*Kr+ii*ii,ci=we-Be,Jr=lr*oi-Ir*Rr,un=(ii<0?-1:1)*Math.sqrt(Math.max(0,ci*ci*vi-Jr*Jr)),dn=(Jr*ii-Kr*un)/vi,En=(-Jr*Kr-ii*un)/vi,Nn=(Jr*ii+Kr*un)/vi,ga=(-Jr*Kr+ii*un)/vi,ya=dn-ui,so=En-qr,wa=Nn-ui,io=ga-qr;return ya*ya+so*so>wa*wa+io*io&&(dn=Nn,En=ga),[[dn-zt,En-or],[dn*we/ci,En*we/ci]]}function eo(){return!0}function Jc(Z){var oe=zs,we=ks,Be=eo,Ue=_c,We=Ue.key,wt=.7;function tt(zt){var or=[],lr=[],Rr=-1,Ir=zt.length,oi,ui=ti(oe),qr=ti(we);function Kr(){or.push("M",Ue(Z(lr),wt))}for(;++Rr1?Z.join("L"):Z+"Z"}function le(Z){return Z.join("L")+"Z"}function w(Z){for(var oe=0,we=Z.length,Be=Z[0],Ue=[Be[0],",",Be[1]];++oe1&&Ue.push("H",Be[0]),Ue.join("")}function B(Z){for(var oe=0,we=Z.length,Be=Z[0],Ue=[Be[0],",",Be[1]];++oe1){tt=oe[1],We=Z[zt],zt++,Be+="C"+(Ue[0]+wt[0])+","+(Ue[1]+wt[1])+","+(We[0]-tt[0])+","+(We[1]-tt[1])+","+We[0]+","+We[1];for(var or=2;or9&&(We=we*3/Math.sqrt(We),wt[tt]=We*Be,wt[tt+1]=We*Ue));for(tt=-1;++tt<=zt;)We=(Z[Math.min(zt,tt+1)][0]-Z[Math.max(0,tt-1)][0])/(6*(1+wt[tt]*wt[tt])),oe.push([We||0,wt[tt]*We||0]);return oe}function Mt(Z){return Z.length<3?_c(Z):Z[0]+je(Z,et(Z))}e.svg.line.radial=function(){var Z=Jc(Rt);return Z.radius=Z.x,delete Z.x,Z.angle=Z.y,delete Z.y,Z};function Rt(Z){for(var oe,we=-1,Be=Z.length,Ue,We;++weXe)+",1 "+Rr}function or(lr,Rr,Ir,oi){return"Q 0,0 "+oi}return We.radius=function(lr){return arguments.length?(we=ti(lr),We):we},We.source=function(lr){return arguments.length?(Z=ti(lr),We):Z},We.target=function(lr){return arguments.length?(oe=ti(lr),We):oe},We.startAngle=function(lr){return arguments.length?(Be=ti(lr),We):Be},We.endAngle=function(lr){return arguments.length?(Ue=ti(lr),We):Ue},We};function Dr(Z){return Z.radius}e.svg.diagonal=function(){var Z=tr,oe=mr,we=zr;function Be(Ue,We){var wt=Z.call(this,Ue,We),tt=oe.call(this,Ue,We),zt=(wt.y+tt.y)/2,or=[wt,{x:wt.x,y:zt},{x:tt.x,y:zt},tt];return or=or.map(we),"M"+or[0]+"C"+or[1]+" "+or[2]+" "+or[3]}return Be.source=function(Ue){return arguments.length?(Z=ti(Ue),Be):Z},Be.target=function(Ue){return arguments.length?(oe=ti(Ue),Be):oe},Be.projection=function(Ue){return arguments.length?(we=Ue,Be):we},Be};function zr(Z){return[Z.x,Z.y]}e.svg.diagonal.radial=function(){var Z=e.svg.diagonal(),oe=zr,we=Z.projection;return Z.projection=function(Be){return arguments.length?we(Xr(oe=Be)):oe},Z};function Xr(Z){return function(){var oe=Z.apply(this,arguments),we=oe[0],Be=oe[1]-xe;return[we*Math.cos(Be),we*Math.sin(Be)]}}e.svg.symbol=function(){var Z=Li,oe=di;function we(Be,Ue){return(Qi.get(Z.call(this,Be,Ue))||Ci)(oe.call(this,Be,Ue))}return we.type=function(Be){return arguments.length?(Z=ti(Be),we):Z},we.size=function(Be){return arguments.length?(oe=ti(Be),we):oe},we};function di(){return 64}function Li(){return"circle"}function Ci(Z){var oe=Math.sqrt(Z/Xe);return"M0,"+oe+"A"+oe+","+oe+" 0 1,1 0,"+-oe+"A"+oe+","+oe+" 0 1,1 0,"+oe+"Z"}var Qi=e.map({circle:Ci,cross:function(Z){var oe=Math.sqrt(Z/5)/2;return"M"+-3*oe+","+-oe+"H"+-oe+"V"+-3*oe+"H"+oe+"V"+-oe+"H"+3*oe+"V"+oe+"H"+oe+"V"+3*oe+"H"+-oe+"V"+oe+"H"+-3*oe+"Z"},diamond:function(Z){var oe=Math.sqrt(Z/(2*pa)),we=oe*pa;return"M0,"+-oe+"L"+we+",0 0,"+oe+" "+-we+",0Z"},square:function(Z){var oe=Math.sqrt(Z)/2;return"M"+-oe+","+-oe+"L"+oe+","+-oe+" "+oe+","+oe+" "+-oe+","+oe+"Z"},"triangle-down":function(Z){var oe=Math.sqrt(Z/Mn),we=oe*Mn/2;return"M0,"+we+"L"+oe+","+-we+" "+-oe+","+-we+"Z"},"triangle-up":function(Z){var oe=Math.sqrt(Z/Mn),we=oe*Mn/2;return"M0,"+-we+"L"+oe+","+we+" "+-oe+","+we+"Z"}});e.svg.symbolTypes=Qi.keys();var Mn=Math.sqrt(3),pa=Math.tan(30*Se);Ce.transition=function(Z){for(var oe=Do||++co,we=po(Z),Be=[],Ue,We,wt=Rs||{time:Date.now(),ease:uu,delay:0,duration:250},tt=-1,zt=this.length;++tt0;)Rr[--vi].call(Z,ii);if(Kr>=1)return wt.event&&wt.event.end.call(Z,Z.__data__,oe),--We.count?delete We[Be]:delete Z[we],1}wt||(tt=Ue.time,zt=Oo(Ir,0,tt),wt=We[Be]={tween:new A,time:tt,timer:zt,delay:Ue.delay,duration:Ue.duration,ease:Ue.ease,index:oe},Ue=null,++We.count)}e.svg.axis=function(){var Z=e.scale.linear(),oe=Vl,we=6,Be=6,Ue=3,We=[10],wt=null,tt;function zt(or){or.each(function(){var lr=e.select(this),Rr=this.__chart__||Z,Ir=this.__chart__=Z.copy(),oi=wt==null?Ir.ticks?Ir.ticks.apply(Ir,We):Ir.domain():wt,ui=tt==null?Ir.tickFormat?Ir.tickFormat.apply(Ir,We):H:tt,qr=lr.selectAll(".tick").data(oi,Ir),Kr=qr.enter().insert("g",".domain").attr("class","tick").style("opacity",Ye),ii=e.transition(qr.exit()).style("opacity",Ye).remove(),vi=e.transition(qr.order()).style("opacity",1),ci=Math.max(we,0)+Ue,Jr,un=Xi(Ir),dn=lr.selectAll(".domain").data([0]),En=(dn.enter().append("path").attr("class","domain"),e.transition(dn));Kr.append("line"),Kr.append("text");var Nn=Kr.select("line"),ga=vi.select("line"),ya=qr.select("text").text(ui),so=Kr.select("text"),wa=vi.select("text"),io=oe==="top"||oe==="left"?-1:1,Ss,_s,Ns,pn;if(oe==="bottom"||oe==="top"?(Jr=cu,Ss="x",Ns="y",_s="x2",pn="y2",ya.attr("dy",io<0?"0em":".71em").style("text-anchor","middle"),En.attr("d","M"+un[0]+","+io*Be+"V0H"+un[1]+"V"+io*Be)):(Jr=el,Ss="y",Ns="x",_s="y2",pn="x2",ya.attr("dy",".32em").style("text-anchor",io<0?"end":"start"),En.attr("d","M"+io*Be+","+un[0]+"H0V"+un[1]+"H"+io*Be)),Nn.attr(pn,io*we),so.attr(Ns,io*ci),ga.attr(_s,0).attr(pn,io*we),wa.attr(Ss,0).attr(Ns,io*ci),Ir.rangeBand){var za=Ir,Lo=za.rangeBand()/2;Rr=Ir=function(Fo){return za(Fo)+Lo}}else Rr.rangeBand?Rr=Ir:ii.call(Jr,Ir,Rr);Kr.call(Jr,Rr,Ir),vi.call(Jr,Ir,Ir)})}return zt.scale=function(or){return arguments.length?(Z=or,zt):Z},zt.orient=function(or){return arguments.length?(oe=or in Xu?or+"":Vl,zt):oe},zt.ticks=function(){return arguments.length?(We=r(arguments),zt):We},zt.tickValues=function(or){return arguments.length?(wt=or,zt):wt},zt.tickFormat=function(or){return arguments.length?(tt=or,zt):tt},zt.tickSize=function(or){var lr=arguments.length;return lr?(we=+or,Be=+arguments[lr-1],zt):we},zt.innerTickSize=function(or){return arguments.length?(we=+or,zt):we},zt.outerTickSize=function(or){return arguments.length?(Be=+or,zt):Be},zt.tickPadding=function(or){return arguments.length?(Ue=+or,zt):Ue},zt.tickSubdivide=function(){return arguments.length&&zt},zt};var Vl="bottom",Xu={top:1,right:1,bottom:1,left:1};function cu(Z,oe,we){Z.attr("transform",function(Be){var Ue=oe(Be);return"translate("+(isFinite(Ue)?Ue:we(Be))+",0)"})}function el(Z,oe,we){Z.attr("transform",function(Be){var Ue=oe(Be);return"translate(0,"+(isFinite(Ue)?Ue:we(Be))+")"})}e.svg.brush=function(){var Z=ke(lr,"brushstart","brush","brushend"),oe=null,we=null,Be=[0,0],Ue=[0,0],We,wt,tt=!0,zt=!0,or=zc[0];function lr(qr){qr.each(function(){var Kr=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ui).on("touchstart.brush",ui),ii=Kr.selectAll(".background").data([0]);ii.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Kr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var vi=Kr.selectAll(".resize").data(or,H);vi.exit().remove(),vi.enter().append("g").attr("class",function(dn){return"resize "+dn}).style("cursor",function(dn){return nu[dn]}).append("rect").attr("x",function(dn){return/[ew]$/.test(dn)?-3:null}).attr("y",function(dn){return/^[ns]/.test(dn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),vi.style("display",lr.empty()?"none":null);var ci=e.transition(Kr),Jr=e.transition(ii),un;oe&&(un=Xi(oe),Jr.attr("x",un[0]).attr("width",un[1]-un[0]),Ir(ci)),we&&(un=Xi(we),Jr.attr("y",un[0]).attr("height",un[1]-un[0]),oi(ci)),Rr(ci)})}lr.event=function(qr){qr.each(function(){var Kr=Z.of(this,arguments),ii={x:Be,y:Ue,i:We,j:wt},vi=this.__chart__||ii;this.__chart__=ii,Do?e.select(this).transition().each("start.brush",function(){We=vi.i,wt=vi.j,Be=vi.x,Ue=vi.y,Kr({type:"brushstart"})}).tween("brush:brush",function(){var ci=ec(Be,ii.x),Jr=ec(Ue,ii.y);return We=wt=null,function(un){Be=ii.x=ci(un),Ue=ii.y=Jr(un),Kr({type:"brush",mode:"resize"})}}).each("end.brush",function(){We=ii.i,wt=ii.j,Kr({type:"brush",mode:"resize"}),Kr({type:"brushend"})}):(Kr({type:"brushstart"}),Kr({type:"brush",mode:"resize"}),Kr({type:"brushend"}))})};function Rr(qr){qr.selectAll(".resize").attr("transform",function(Kr){return"translate("+Be[+/e$/.test(Kr)]+","+Ue[+/^s/.test(Kr)]+")"})}function Ir(qr){qr.select(".extent").attr("x",Be[0]),qr.selectAll(".extent,.n>rect,.s>rect").attr("width",Be[1]-Be[0])}function oi(qr){qr.select(".extent").attr("y",Ue[0]),qr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ue[1]-Ue[0])}function ui(){var qr=this,Kr=e.select(e.event.target),ii=Z.of(qr,arguments),vi=e.select(qr),ci=Kr.datum(),Jr=!/^(n|s)$/.test(ci)&&oe,un=!/^(e|w)$/.test(ci)&&we,dn=Kr.classed("extent"),En=Or(qr),Nn,ga=e.mouse(qr),ya,so=e.select(a(qr)).on("keydown.brush",Ss).on("keyup.brush",_s);if(e.event.changedTouches?so.on("touchmove.brush",Ns).on("touchend.brush",za):so.on("mousemove.brush",Ns).on("mouseup.brush",za),vi.interrupt().selectAll("*").interrupt(),dn)ga[0]=Be[0]-ga[0],ga[1]=Ue[0]-ga[1];else if(ci){var wa=+/w$/.test(ci),io=+/^n/.test(ci);ya=[Be[1-wa]-ga[0],Ue[1-io]-ga[1]],ga[0]=Be[wa],ga[1]=Ue[io]}else e.event.altKey&&(Nn=ga.slice());vi.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Kr.style("cursor")),ii({type:"brushstart"}),Ns();function Ss(){e.event.keyCode==32&&(dn||(Nn=null,ga[0]-=Be[1],ga[1]-=Ue[1],dn=2),_e())}function _s(){e.event.keyCode==32&&dn==2&&(ga[0]+=Be[1],ga[1]+=Ue[1],dn=0,_e())}function Ns(){var Lo=e.mouse(qr),Fo=!1;ya&&(Lo[0]+=ya[0],Lo[1]+=ya[1]),dn||(e.event.altKey?(Nn||(Nn=[(Be[0]+Be[1])/2,(Ue[0]+Ue[1])/2]),ga[0]=Be[+(Lo[0]{(function(e,t){typeof r6=="object"&&typeof eee!="undefined"?t(r6):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(r6,function(e){"use strict";var t=new Date,r=new Date;function n(Ke,xt,bt,Lt){function St(Et){return Ke(Et=arguments.length===0?new Date:new Date(+Et)),Et}return St.floor=function(Et){return Ke(Et=new Date(+Et)),Et},St.ceil=function(Et){return Ke(Et=new Date(Et-1)),xt(Et,1),Ke(Et),Et},St.round=function(Et){var dt=St(Et),Ht=St.ceil(Et);return Et-dt0))return $t;do $t.push(fr=new Date(+Et)),xt(Et,Ht),Ke(Et);while(fr=dt)for(;Ke(dt),!Et(dt);)dt.setTime(dt-1)},function(dt,Ht){if(dt>=dt)if(Ht<0)for(;++Ht<=0;)for(;xt(dt,-1),!Et(dt););else for(;--Ht>=0;)for(;xt(dt,1),!Et(dt););})},bt&&(St.count=function(Et,dt){return t.setTime(+Et),r.setTime(+dt),Ke(t),Ke(r),Math.floor(bt(t,r))},St.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?St.filter(Lt?function(dt){return Lt(dt)%Et===0}:function(dt){return St.count(0,dt)%Et===0}):St}),St}var i=n(function(){},function(Ke,xt){Ke.setTime(+Ke+xt)},function(Ke,xt){return xt-Ke});i.every=function(Ke){return Ke=Math.floor(Ke),!isFinite(Ke)||!(Ke>0)?null:Ke>1?n(function(xt){xt.setTime(Math.floor(xt/Ke)*Ke)},function(xt,bt){xt.setTime(+xt+bt*Ke)},function(xt,bt){return(bt-xt)/Ke}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Ke){Ke.setTime(Ke-Ke.getMilliseconds())},function(Ke,xt){Ke.setTime(+Ke+xt*o)},function(Ke,xt){return(xt-Ke)/o},function(Ke){return Ke.getUTCSeconds()}),h=f.range,d=n(function(Ke){Ke.setTime(Ke-Ke.getMilliseconds()-Ke.getSeconds()*o)},function(Ke,xt){Ke.setTime(+Ke+xt*s)},function(Ke,xt){return(xt-Ke)/s},function(Ke){return Ke.getMinutes()}),v=d.range,x=n(function(Ke){Ke.setTime(Ke-Ke.getMilliseconds()-Ke.getSeconds()*o-Ke.getMinutes()*s)},function(Ke,xt){Ke.setTime(+Ke+xt*l)},function(Ke,xt){return(xt-Ke)/l},function(Ke){return Ke.getHours()}),b=x.range,g=n(function(Ke){Ke.setHours(0,0,0,0)},function(Ke,xt){Ke.setDate(Ke.getDate()+xt)},function(Ke,xt){return(xt-Ke-(xt.getTimezoneOffset()-Ke.getTimezoneOffset())*s)/u},function(Ke){return Ke.getDate()-1}),E=g.range;function k(Ke){return n(function(xt){xt.setDate(xt.getDate()-(xt.getDay()+7-Ke)%7),xt.setHours(0,0,0,0)},function(xt,bt){xt.setDate(xt.getDate()+bt*7)},function(xt,bt){return(bt-xt-(bt.getTimezoneOffset()-xt.getTimezoneOffset())*s)/c})}var A=k(0),L=k(1),_=k(2),C=k(3),M=k(4),p=k(5),P=k(6),T=A.range,F=L.range,q=_.range,V=C.range,H=M.range,X=p.range,G=P.range,N=n(function(Ke){Ke.setDate(1),Ke.setHours(0,0,0,0)},function(Ke,xt){Ke.setMonth(Ke.getMonth()+xt)},function(Ke,xt){return xt.getMonth()-Ke.getMonth()+(xt.getFullYear()-Ke.getFullYear())*12},function(Ke){return Ke.getMonth()}),W=N.range,re=n(function(Ke){Ke.setMonth(0,1),Ke.setHours(0,0,0,0)},function(Ke,xt){Ke.setFullYear(Ke.getFullYear()+xt)},function(Ke,xt){return xt.getFullYear()-Ke.getFullYear()},function(Ke){return Ke.getFullYear()});re.every=function(Ke){return!isFinite(Ke=Math.floor(Ke))||!(Ke>0)?null:n(function(xt){xt.setFullYear(Math.floor(xt.getFullYear()/Ke)*Ke),xt.setMonth(0,1),xt.setHours(0,0,0,0)},function(xt,bt){xt.setFullYear(xt.getFullYear()+bt*Ke)})};var ae=re.range,_e=n(function(Ke){Ke.setUTCSeconds(0,0)},function(Ke,xt){Ke.setTime(+Ke+xt*s)},function(Ke,xt){return(xt-Ke)/s},function(Ke){return Ke.getUTCMinutes()}),Me=_e.range,ke=n(function(Ke){Ke.setUTCMinutes(0,0,0)},function(Ke,xt){Ke.setTime(+Ke+xt*l)},function(Ke,xt){return(xt-Ke)/l},function(Ke){return Ke.getUTCHours()}),ge=ke.range,ie=n(function(Ke){Ke.setUTCHours(0,0,0,0)},function(Ke,xt){Ke.setUTCDate(Ke.getUTCDate()+xt)},function(Ke,xt){return(xt-Ke)/u},function(Ke){return Ke.getUTCDate()-1}),Te=ie.range;function Ee(Ke){return n(function(xt){xt.setUTCDate(xt.getUTCDate()-(xt.getUTCDay()+7-Ke)%7),xt.setUTCHours(0,0,0,0)},function(xt,bt){xt.setUTCDate(xt.getUTCDate()+bt*7)},function(xt,bt){return(bt-xt)/c})}var Ae=Ee(0),ze=Ee(1),Ce=Ee(2),me=Ee(3),De=Ee(4),ce=Ee(5),Ge=Ee(6),nt=Ae.range,ct=ze.range,qt=Ce.range,rt=me.range,ot=De.range,Dt=ce.range,kt=Ge.range,Ct=n(function(Ke){Ke.setUTCDate(1),Ke.setUTCHours(0,0,0,0)},function(Ke,xt){Ke.setUTCMonth(Ke.getUTCMonth()+xt)},function(Ke,xt){return xt.getUTCMonth()-Ke.getUTCMonth()+(xt.getUTCFullYear()-Ke.getUTCFullYear())*12},function(Ke){return Ke.getUTCMonth()}),Yt=Ct.range,xr=n(function(Ke){Ke.setUTCMonth(0,1),Ke.setUTCHours(0,0,0,0)},function(Ke,xt){Ke.setUTCFullYear(Ke.getUTCFullYear()+xt)},function(Ke,xt){return xt.getUTCFullYear()-Ke.getUTCFullYear()},function(Ke){return Ke.getUTCFullYear()});xr.every=function(Ke){return!isFinite(Ke=Math.floor(Ke))||!(Ke>0)?null:n(function(xt){xt.setUTCFullYear(Math.floor(xt.getUTCFullYear()/Ke)*Ke),xt.setUTCMonth(0,1),xt.setUTCHours(0,0,0,0)},function(xt,bt){xt.setUTCFullYear(xt.getUTCFullYear()+bt*Ke)})};var er=xr.range;e.timeDay=g,e.timeDays=E,e.timeFriday=p,e.timeFridays=X,e.timeHour=x,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=F,e.timeMonth=N,e.timeMonths=W,e.timeSaturday=P,e.timeSaturdays=G,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=A,e.timeSundays=T,e.timeThursday=M,e.timeThursdays=H,e.timeTuesday=_,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=V,e.timeWeek=A,e.timeWeeks=T,e.timeYear=re,e.timeYears=ae,e.utcDay=ie,e.utcDays=Te,e.utcFriday=ce,e.utcFridays=Dt,e.utcHour=ke,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Me,e.utcMonday=ze,e.utcMondays=ct,e.utcMonth=Ct,e.utcMonths=Yt,e.utcSaturday=Ge,e.utcSaturdays=kt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=Ae,e.utcSundays=nt,e.utcThursday=De,e.utcThursdays=ot,e.utcTuesday=Ce,e.utcTuesdays=qt,e.utcWednesday=me,e.utcWednesdays=rt,e.utcWeek=Ae,e.utcWeeks=nt,e.utcYear=xr,e.utcYears=er,Object.defineProperty(e,"__esModule",{value:!0})})});var e3=ye((i6,tee)=>{(function(e,t){typeof i6=="object"&&typeof tee!="undefined"?t(i6,hq()):typeof define=="function"&&define.amd?define(["exports","d3-time"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(i6,function(e,t){"use strict";function r(Ne){if(0<=Ne.y&&Ne.y<100){var Ye=new Date(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L);return Ye.setFullYear(Ne.y),Ye}return new Date(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L)}function n(Ne){if(0<=Ne.y&&Ne.y<100){var Ye=new Date(Date.UTC(-1,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L));return Ye.setUTCFullYear(Ne.y),Ye}return new Date(Date.UTC(Ne.y,Ne.m,Ne.d,Ne.H,Ne.M,Ne.S,Ne.L))}function i(Ne,Ye,Ve){return{y:Ne,m:Ye,d:Ve,H:0,M:0,S:0,L:0}}function a(Ne){var Ye=Ne.dateTime,Ve=Ne.date,Xe=Ne.time,ht=Ne.periods,Le=Ne.days,xe=Ne.shortDays,Se=Ne.months,lt=Ne.shortMonths,Gt=h(ht),Vt=d(ht),ar=h(Le),Qr=d(Le),ai=h(xe),jr=d(xe),ri=h(Se),bi=d(Se),nn=h(lt),Wi=d(lt),Ni={a:Si,A:Mi,b:Pi,B:Gi,c:null,d:N,e:N,f:Me,H:W,I:re,j:ae,L:_e,m:ke,M:ge,p:Ki,q:ka,Q:dt,s:Ht,S:ie,u:Te,U:Ee,V:Ae,w:ze,W:Ce,x:null,X:null,y:me,Y:De,Z:ce,"%":Et},_n={a:jn,A:la,b:Fa,B:Da,c:null,d:Ge,e:Ge,f:ot,H:nt,I:ct,j:qt,L:rt,m:Dt,M:kt,p:jo,q:oa,Q:dt,s:Ht,S:Ct,u:Yt,U:xr,V:er,w:Ke,W:xt,x:null,X:null,y:bt,Y:Lt,Z:St,"%":Et},$i={a:jt,A:Zt,b:yr,B:Fr,c:Zr,d:M,e:M,f:V,H:P,I:P,j:p,L:q,m:C,M:T,p:ft,q:_,Q:X,s:G,S:F,u:x,U:b,V:g,w:v,W:E,x:Vr,X:gi,y:A,Y:k,Z:L,"%":H};Ni.x=zn(Ve,Ni),Ni.X=zn(Xe,Ni),Ni.c=zn(Ye,Ni),_n.x=zn(Ve,_n),_n.X=zn(Xe,_n),_n.c=zn(Ye,_n);function zn(Sn,Ha){return function(oo){var xn=[],_t=-1,br=0,Hr=Sn.length,ti,zi,Yi;for(oo instanceof Date||(oo=new Date(+oo));++_t53)return null;"w"in xn||(xn.w=1),"Z"in xn?(br=n(i(xn.y,0,1)),Hr=br.getUTCDay(),br=Hr>4||Hr===0?t.utcMonday.ceil(br):t.utcMonday(br),br=t.utcDay.offset(br,(xn.V-1)*7),xn.y=br.getUTCFullYear(),xn.m=br.getUTCMonth(),xn.d=br.getUTCDate()+(xn.w+6)%7):(br=r(i(xn.y,0,1)),Hr=br.getDay(),br=Hr>4||Hr===0?t.timeMonday.ceil(br):t.timeMonday(br),br=t.timeDay.offset(br,(xn.V-1)*7),xn.y=br.getFullYear(),xn.m=br.getMonth(),xn.d=br.getDate()+(xn.w+6)%7)}else("W"in xn||"U"in xn)&&("w"in xn||(xn.w="u"in xn?xn.u%7:"W"in xn?1:0),Hr="Z"in xn?n(i(xn.y,0,1)).getUTCDay():r(i(xn.y,0,1)).getDay(),xn.m=0,xn.d="W"in xn?(xn.w+6)%7+xn.W*7-(Hr+5)%7:xn.w+xn.U*7-(Hr+6)%7);return"Z"in xn?(xn.H+=xn.Z/100|0,xn.M+=xn.Z%100,n(xn)):r(xn)}}function It(Sn,Ha,oo,xn){for(var _t=0,br=Ha.length,Hr=oo.length,ti,zi;_t=Hr)return-1;if(ti=Ha.charCodeAt(_t++),ti===37){if(ti=Ha.charAt(_t++),zi=$i[ti in o?Ha.charAt(_t++):ti],!zi||(xn=zi(Sn,oo,xn))<0)return-1}else if(ti!=oo.charCodeAt(xn++))return-1}return xn}function ft(Sn,Ha,oo){var xn=Gt.exec(Ha.slice(oo));return xn?(Sn.p=Vt[xn[0].toLowerCase()],oo+xn[0].length):-1}function jt(Sn,Ha,oo){var xn=ai.exec(Ha.slice(oo));return xn?(Sn.w=jr[xn[0].toLowerCase()],oo+xn[0].length):-1}function Zt(Sn,Ha,oo){var xn=ar.exec(Ha.slice(oo));return xn?(Sn.w=Qr[xn[0].toLowerCase()],oo+xn[0].length):-1}function yr(Sn,Ha,oo){var xn=nn.exec(Ha.slice(oo));return xn?(Sn.m=Wi[xn[0].toLowerCase()],oo+xn[0].length):-1}function Fr(Sn,Ha,oo){var xn=ri.exec(Ha.slice(oo));return xn?(Sn.m=bi[xn[0].toLowerCase()],oo+xn[0].length):-1}function Zr(Sn,Ha,oo){return It(Sn,Ye,Ha,oo)}function Vr(Sn,Ha,oo){return It(Sn,Ve,Ha,oo)}function gi(Sn,Ha,oo){return It(Sn,Xe,Ha,oo)}function Si(Sn){return xe[Sn.getDay()]}function Mi(Sn){return Le[Sn.getDay()]}function Pi(Sn){return lt[Sn.getMonth()]}function Gi(Sn){return Se[Sn.getMonth()]}function Ki(Sn){return ht[+(Sn.getHours()>=12)]}function ka(Sn){return 1+~~(Sn.getMonth()/3)}function jn(Sn){return xe[Sn.getUTCDay()]}function la(Sn){return Le[Sn.getUTCDay()]}function Fa(Sn){return lt[Sn.getUTCMonth()]}function Da(Sn){return Se[Sn.getUTCMonth()]}function jo(Sn){return ht[+(Sn.getUTCHours()>=12)]}function oa(Sn){return 1+~~(Sn.getUTCMonth()/3)}return{format:function(Sn){var Ha=zn(Sn+="",Ni);return Ha.toString=function(){return Sn},Ha},parse:function(Sn){var Ha=Wn(Sn+="",!1);return Ha.toString=function(){return Sn},Ha},utcFormat:function(Sn){var Ha=zn(Sn+="",_n);return Ha.toString=function(){return Sn},Ha},utcParse:function(Sn){var Ha=Wn(Sn+="",!0);return Ha.toString=function(){return Sn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ne,Ye,Ve){var Xe=Ne<0?"-":"",ht=(Xe?-Ne:Ne)+"",Le=ht.length;return Xe+(Le68?1900:2e3),Ve+Xe[0].length):-1}function L(Ne,Ye,Ve){var Xe=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ye.slice(Ve,Ve+6));return Xe?(Ne.Z=Xe[1]?0:-(Xe[2]+(Xe[3]||"00")),Ve+Xe[0].length):-1}function _(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+1));return Xe?(Ne.q=Xe[0]*3-3,Ve+Xe[0].length):-1}function C(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.m=Xe[0]-1,Ve+Xe[0].length):-1}function M(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.d=+Xe[0],Ve+Xe[0].length):-1}function p(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+3));return Xe?(Ne.m=0,Ne.d=+Xe[0],Ve+Xe[0].length):-1}function P(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.H=+Xe[0],Ve+Xe[0].length):-1}function T(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.M=+Xe[0],Ve+Xe[0].length):-1}function F(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+2));return Xe?(Ne.S=+Xe[0],Ve+Xe[0].length):-1}function q(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+3));return Xe?(Ne.L=+Xe[0],Ve+Xe[0].length):-1}function V(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve,Ve+6));return Xe?(Ne.L=Math.floor(Xe[0]/1e3),Ve+Xe[0].length):-1}function H(Ne,Ye,Ve){var Xe=l.exec(Ye.slice(Ve,Ve+1));return Xe?Ve+Xe[0].length:-1}function X(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve));return Xe?(Ne.Q=+Xe[0],Ve+Xe[0].length):-1}function G(Ne,Ye,Ve){var Xe=s.exec(Ye.slice(Ve));return Xe?(Ne.s=+Xe[0],Ve+Xe[0].length):-1}function N(Ne,Ye){return c(Ne.getDate(),Ye,2)}function W(Ne,Ye){return c(Ne.getHours(),Ye,2)}function re(Ne,Ye){return c(Ne.getHours()%12||12,Ye,2)}function ae(Ne,Ye){return c(1+t.timeDay.count(t.timeYear(Ne),Ne),Ye,3)}function _e(Ne,Ye){return c(Ne.getMilliseconds(),Ye,3)}function Me(Ne,Ye){return _e(Ne,Ye)+"000"}function ke(Ne,Ye){return c(Ne.getMonth()+1,Ye,2)}function ge(Ne,Ye){return c(Ne.getMinutes(),Ye,2)}function ie(Ne,Ye){return c(Ne.getSeconds(),Ye,2)}function Te(Ne){var Ye=Ne.getDay();return Ye===0?7:Ye}function Ee(Ne,Ye){return c(t.timeSunday.count(t.timeYear(Ne)-1,Ne),Ye,2)}function Ae(Ne,Ye){var Ve=Ne.getDay();return Ne=Ve>=4||Ve===0?t.timeThursday(Ne):t.timeThursday.ceil(Ne),c(t.timeThursday.count(t.timeYear(Ne),Ne)+(t.timeYear(Ne).getDay()===4),Ye,2)}function ze(Ne){return Ne.getDay()}function Ce(Ne,Ye){return c(t.timeMonday.count(t.timeYear(Ne)-1,Ne),Ye,2)}function me(Ne,Ye){return c(Ne.getFullYear()%100,Ye,2)}function De(Ne,Ye){return c(Ne.getFullYear()%1e4,Ye,4)}function ce(Ne){var Ye=Ne.getTimezoneOffset();return(Ye>0?"-":(Ye*=-1,"+"))+c(Ye/60|0,"0",2)+c(Ye%60,"0",2)}function Ge(Ne,Ye){return c(Ne.getUTCDate(),Ye,2)}function nt(Ne,Ye){return c(Ne.getUTCHours(),Ye,2)}function ct(Ne,Ye){return c(Ne.getUTCHours()%12||12,Ye,2)}function qt(Ne,Ye){return c(1+t.utcDay.count(t.utcYear(Ne),Ne),Ye,3)}function rt(Ne,Ye){return c(Ne.getUTCMilliseconds(),Ye,3)}function ot(Ne,Ye){return rt(Ne,Ye)+"000"}function Dt(Ne,Ye){return c(Ne.getUTCMonth()+1,Ye,2)}function kt(Ne,Ye){return c(Ne.getUTCMinutes(),Ye,2)}function Ct(Ne,Ye){return c(Ne.getUTCSeconds(),Ye,2)}function Yt(Ne){var Ye=Ne.getUTCDay();return Ye===0?7:Ye}function xr(Ne,Ye){return c(t.utcSunday.count(t.utcYear(Ne)-1,Ne),Ye,2)}function er(Ne,Ye){var Ve=Ne.getUTCDay();return Ne=Ve>=4||Ve===0?t.utcThursday(Ne):t.utcThursday.ceil(Ne),c(t.utcThursday.count(t.utcYear(Ne),Ne)+(t.utcYear(Ne).getUTCDay()===4),Ye,2)}function Ke(Ne){return Ne.getUTCDay()}function xt(Ne,Ye){return c(t.utcMonday.count(t.utcYear(Ne)-1,Ne),Ye,2)}function bt(Ne,Ye){return c(Ne.getUTCFullYear()%100,Ye,2)}function Lt(Ne,Ye){return c(Ne.getUTCFullYear()%1e4,Ye,4)}function St(){return"+0000"}function Et(){return"%"}function dt(Ne){return+Ne}function Ht(Ne){return Math.floor(+Ne/1e3)}var $t;fr({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 fr(Ne){return $t=a(Ne),e.timeFormat=$t.format,e.timeParse=$t.parse,e.utcFormat=$t.utcFormat,e.utcParse=$t.utcParse,$t}var _r="%Y-%m-%dT%H:%M:%S.%LZ";function Br(Ne){return Ne.toISOString()}var Or=Date.prototype.toISOString?Br:e.utcFormat(_r);function Nr(Ne){var Ye=new Date(Ne);return isNaN(Ye)?null:Ye}var ut=+new Date("2000-01-01T00:00:00.000Z")?Nr:e.utcParse(_r);e.isoFormat=Or,e.isoParse=ut,e.timeFormatDefaultLocale=fr,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var dq=ye((n6,ree)=>{(function(e,t){typeof n6=="object"&&typeof ree!="undefined"?t(n6):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(n6,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((p=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var p,P=C.slice(0,p);return[P.length>1?P[0]+P.slice(2):P,+C.slice(p+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(p,P){for(var T=p.length,F=[],q=0,V=C[0],H=0;T>0&&V>0&&(H+V+1>P&&(V=Math.max(1,P-H)),F.push(p.substring(T-=V,T+V)),!((H+=V+1)>P));)V=C[q=(q+1)%C.length];return F.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(p){return C[+p]})}}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,p=1,P=-1,T;p0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(T+1):C}var c;function f(C,M){var p=r(C,M);if(!p)return C+"";var P=p[0],T=p[1],F=T-(c=Math.max(-8,Math.min(8,Math.floor(T/3)))*3)+1,q=P.length;return F===q?P:F>q?P+new Array(F-q+1).join("0"):F>0?P.slice(0,F)+"."+P.slice(F):"0."+new Array(1-F).join("0")+r(C,Math.max(0,M+F-1))[0]}function h(C,M){var p=r(C,M);if(!p)return C+"";var P=p[0],T=p[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 x=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function g(C){var M=C.grouping===void 0||C.thousands===void 0?v:i(x.call(C.grouping,Number),C.thousands+""),p=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",T=C.decimal===void 0?".":C.decimal+"",F=C.numerals===void 0?v:a(x.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",V=C.minus===void 0?"-":C.minus+"",H=C.nan===void 0?"NaN":C.nan+"";function X(N){N=s(N);var W=N.fill,re=N.align,ae=N.sign,_e=N.symbol,Me=N.zero,ke=N.width,ge=N.comma,ie=N.precision,Te=N.trim,Ee=N.type;Ee==="n"?(ge=!0,Ee="g"):d[Ee]||(ie===void 0&&(ie=12),Te=!0,Ee="g"),(Me||W==="0"&&re==="=")&&(Me=!0,W="0",re="=");var Ae=_e==="$"?p:_e==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",ze=_e==="$"?P:/[%p]/.test(Ee)?q:"",Ce=d[Ee],me=/[defgprs%]/.test(Ee);ie=ie===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function De(ce){var Ge=Ae,nt=ze,ct,qt,rt;if(Ee==="c")nt=Ce(ce)+nt,ce="";else{ce=+ce;var ot=ce<0||1/ce<0;if(ce=isNaN(ce)?H:Ce(Math.abs(ce),ie),Te&&(ce=u(ce)),ot&&+ce==0&&ae!=="+"&&(ot=!1),Ge=(ot?ae==="("?ae:V:ae==="-"||ae==="("?"":ae)+Ge,nt=(Ee==="s"?b[8+c/3]:"")+nt+(ot&&ae==="("?")":""),me){for(ct=-1,qt=ce.length;++ctrt||rt>57){nt=(rt===46?T+ce.slice(ct+1):ce.slice(ct))+nt,ce=ce.slice(0,ct);break}}}ge&&!Me&&(ce=M(ce,1/0));var Dt=Ge.length+ce.length+nt.length,kt=Dt>1)+Ge+ce+nt+kt.slice(Dt);break;default:ce=kt+Ge+ce+nt;break}return F(ce)}return De.toString=function(){return N+""},De}function G(N,W){var re=X((N=s(N),N.type="f",N)),ae=Math.max(-8,Math.min(8,Math.floor(n(W)/3)))*3,_e=Math.pow(10,-ae),Me=b[8+ae/3];return function(ke){return re(_e*ke)+Me}}return{format:X,formatPrefix:G}}var E;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(C){return E=g(C),e.format=E.format,e.formatPrefix=E.formatPrefix,E}function A(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 _(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=k,e.formatLocale=g,e.formatSpecifier=s,e.precisionFixed=A,e.precisionPrefix=L,e.precisionRound=_,Object.defineProperty(e,"__esModule",{value:!0})})});var nee=ye((CQt,iee)=>{"use strict";iee.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 uo=ye((LQt,aee)=>{"use strict";var VQe=nee();aee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&VQe(r))return!1}else if(t!=="number")return!1;return e-e<1}});var es=ye((PQt,oee)=>{"use strict";oee.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 vq=ye((a6,see)=>{(function(e,t){typeof a6=="object"&&typeof see!="undefined"?t(a6):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(a6,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 x=new ArrayBuffer(s),b=new Uint8Array(x);for(u=0;u>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return x};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var gy=ye((IQt,lee)=>{"use strict";lee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var vv=ye(mg=>{"use strict";var HQe=vq().decode,GQe=gy(),pq=Array.isArray,jQe=ArrayBuffer,WQe=DataView;function uee(e){return jQe.isView(e)&&!(e instanceof WQe)}mg.isTypedArray=uee;function o6(e){return pq(e)||uee(e)}mg.isArrayOrTypedArray=o6;function ZQe(e){return!o6(e[0])}mg.isArray1D=ZQe;mg.ensureArray=function(e,t){return pq(e)||(e=[]),e.length=t,e};var Md={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};Md.uint8c=Md.u1c;Md.uint8=Md.u1;Md.int8=Md.i1;Md.uint16=Md.u2;Md.int16=Md.i2;Md.uint32=Md.u4;Md.int32=Md.i4;Md.float32=Md.f4;Md.float64=Md.f8;function gq(e){return e.constructor===ArrayBuffer}mg.isArrayBuffer=gq;mg.decodeTypedArraySpec=function(e){var t=[],r=XQe(e),n=r.dtype,i=Md[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;gq(o)||(o=HQe(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 fee=uo(),yq=vv().isArrayOrTypedArray;pee.exports=function(t,r){if(fee(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var t3=ES(),QQe=/^\w*$/,eet=0,gee=1,s6=2,mee=3,ob=4;yee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=t3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|s6,f.set(h,null);if(c){for(a=d;a{"use strict";var tet=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,ret=/^[^\.\[\]]+$/;xee.exports=function(e,t){for(;t;){var r=e.match(tet);if(r)e=r[1];else if(e.match(ret))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 l6=ye((qQt,wee)=>{"use strict";var iet=uo();wee.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 iet(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var See=ye((OQt,Aee)=>{"use strict";var Tee=vv().isArrayOrTypedArray,kS=gy();Aee.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(Tee(i)&&Tee(a)&&kS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function net(e,t){var r=e%t;return r<0?r+t:r}function aet(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Mee.exports={mod:net,modHalf:aet}});var id=ye((NQt,u6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,De){if(me=me||"",De=De||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,De);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=De.format||ce.format,this._gradientType=De.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),De,ce,Ge,nt,ct,qt;return De=me.r/255,ce=me.g/255,Ge=me.b/255,De<=.03928?nt=De/12.92:nt=e.pow((De+.055)/1.055,2.4),ce<=.03928?ct=ce/12.92:ct=e.pow((ce+.055)/1.055,2.4),Ge<=.03928?qt=Ge/12.92:qt=e.pow((Ge+.055)/1.055,2.4),.2126*nt+.7152*ct+.0722*qt},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),Ge=i(me.v*100);return this._a==1?"hsv("+De+", "+ce+"%, "+Ge+"%)":"hsva("+De+", "+ce+"%, "+Ge+"%, "+this._roundA+")"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),Ge=i(me.l*100);return this._a==1?"hsl("+De+", "+ce+"%, "+Ge+"%)":"hsla("+De+", "+ce+"%, "+Ge+"%, "+this._roundA+")"},toHex:function(me){return x(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(W(this._r,255)*100)+"%",g:i(W(this._g,255)*100)+"%",b:i(W(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%)":"rgba("+i(W(this._r,255)*100)+"%, "+i(W(this._g,255)*100)+"%, "+i(W(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:X[x(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var De="#"+g(this._r,this._g,this._b,this._a),ce=De,Ge=this._gradientType?"GradientType = 1, ":"";if(me){var nt=l(me);ce="#"+g(nt._r,nt._g,nt._b,nt._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ge+"startColorstr="+De+",endColorstr="+ce+")"},toString:function(me){var De=!!me;me=me||this._format;var ce=!1,Ge=this._a<1&&this._a>=0,nt=!De&&Ge&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return nt?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(ce=this.toRgbString()),me==="prgb"&&(ce=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(ce=this.toHexString()),me==="hex3"&&(ce=this.toHexString(!0)),me==="hex4"&&(ce=this.toHex8String(!0)),me==="hex8"&&(ce=this.toHex8String()),me==="name"&&(ce=this.toName()),me==="hsl"&&(ce=this.toHslString()),me==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,De){var ce=me.apply(null,[this].concat([].slice.call(De)));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(_,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(E,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,De){return me.apply(null,[this].concat([].slice.call(De)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(V,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(me,De){if(typeof me=="object"){var ce={};for(var Ge in me)me.hasOwnProperty(Ge)&&(Ge==="a"?ce[Ge]=me[Ge]:ce[Ge]=ge(me[Ge]));me=ce}return l(me,De)};function u(me){var De={r:0,g:0,b:0},ce=1,Ge=null,nt=null,ct=null,qt=!1,rt=!1;return typeof me=="string"&&(me=ze(me)),typeof me=="object"&&(Ae(me.r)&&Ae(me.g)&&Ae(me.b)?(De=c(me.r,me.g,me.b),qt=!0,rt=String(me.r).substr(-1)==="%"?"prgb":"rgb"):Ae(me.h)&&Ae(me.s)&&Ae(me.v)?(Ge=ge(me.s),nt=ge(me.v),De=v(me.h,Ge,nt),qt=!0,rt="hsv"):Ae(me.h)&&Ae(me.s)&&Ae(me.l)&&(Ge=ge(me.s),ct=ge(me.l),De=h(me.h,Ge,ct),qt=!0,rt="hsl"),me.hasOwnProperty("a")&&(ce=me.a)),ce=N(ce),{ok:qt,format:me.format||rt,r:a(255,o(De.r,0)),g:a(255,o(De.g,0)),b:a(255,o(De.b,0)),a:ce}}function c(me,De,ce){return{r:W(me,255)*255,g:W(De,255)*255,b:W(ce,255)*255}}function f(me,De,ce){me=W(me,255),De=W(De,255),ce=W(ce,255);var Ge=o(me,De,ce),nt=a(me,De,ce),ct,qt,rt=(Ge+nt)/2;if(Ge==nt)ct=qt=0;else{var ot=Ge-nt;switch(qt=rt>.5?ot/(2-Ge-nt):ot/(Ge+nt),Ge){case me:ct=(De-ce)/ot+(De1&&(Ct-=1),Ct<1/6?Dt+(kt-Dt)*6*Ct:Ct<1/2?kt:Ct<2/3?Dt+(kt-Dt)*(2/3-Ct)*6:Dt}if(De===0)Ge=nt=ct=ce;else{var rt=ce<.5?ce*(1+De):ce+De-ce*De,ot=2*ce-rt;Ge=qt(ot,rt,me+1/3),nt=qt(ot,rt,me),ct=qt(ot,rt,me-1/3)}return{r:Ge*255,g:nt*255,b:ct*255}}function d(me,De,ce){me=W(me,255),De=W(De,255),ce=W(ce,255);var Ge=o(me,De,ce),nt=a(me,De,ce),ct,qt,rt=Ge,ot=Ge-nt;if(qt=Ge===0?0:ot/Ge,Ge==nt)ct=0;else{switch(Ge){case me:ct=(De-ce)/ot+(De>1)+720)%360;--De;)Ge.h=(Ge.h+nt)%360,ct.push(l(Ge));return ct}function V(me,De){De=De||6;for(var ce=l(me).toHsv(),Ge=ce.h,nt=ce.s,ct=ce.v,qt=[],rt=1/De;De--;)qt.push(l({h:Ge,s:nt,v:ct})),ct=(ct+rt)%1;return qt}l.mix=function(me,De,ce){ce=ce===0?0:ce||50;var Ge=l(me).toRgb(),nt=l(De).toRgb(),ct=ce/100,qt={r:(nt.r-Ge.r)*ct+Ge.r,g:(nt.g-Ge.g)*ct+Ge.g,b:(nt.b-Ge.b)*ct+Ge.b,a:(nt.a-Ge.a)*ct+Ge.a};return l(qt)},l.readability=function(me,De){var ce=l(me),Ge=l(De);return(e.max(ce.getLuminance(),Ge.getLuminance())+.05)/(e.min(ce.getLuminance(),Ge.getLuminance())+.05)},l.isReadable=function(me,De,ce){var Ge=l.readability(me,De),nt,ct;switch(ct=!1,nt=Ce(ce),nt.level+nt.size){case"AAsmall":case"AAAlarge":ct=Ge>=4.5;break;case"AAlarge":ct=Ge>=3;break;case"AAAsmall":ct=Ge>=7;break}return ct},l.mostReadable=function(me,De,ce){var Ge=null,nt=0,ct,qt,rt,ot;ce=ce||{},qt=ce.includeFallbackColors,rt=ce.level,ot=ce.size;for(var Dt=0;Dtnt&&(nt=ct,Ge=l(De[Dt]));return l.isReadable(me,Ge,{level:rt,size:ot})||!qt?Ge:(ce.includeFallbackColors=!1,l.mostReadable(me,["#fff","#000"],ce))};var H=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"},X=l.hexNames=G(H);function G(me){var De={};for(var ce in me)me.hasOwnProperty(ce)&&(De[me[ce]]=ce);return De}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function W(me,De){_e(me)&&(me="100%");var ce=Me(me);return me=a(De,o(0,parseFloat(me))),ce&&(me=parseInt(me*De,10)/100),e.abs(me-De)<1e-6?1:me%De/parseFloat(De)}function re(me){return a(1,o(0,me))}function ae(me){return parseInt(me,16)}function _e(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function Me(me){return typeof me=="string"&&me.indexOf("%")!=-1}function ke(me){return me.length==1?"0"+me:""+me}function ge(me){return me<=1&&(me=me*100+"%"),me}function ie(me){return e.round(parseFloat(me)*255).toString(16)}function Te(me){return ae(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",De="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+De+")|(?:"+me+")",Ge="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",nt="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+Ge),rgba:new RegExp("rgba"+nt),hsl:new RegExp("hsl"+Ge),hsla:new RegExp("hsla"+nt),hsv:new RegExp("hsv"+Ge),hsva:new RegExp("hsva"+nt),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(me){return!!Ee.CSS_UNIT.exec(me)}function ze(me){me=me.replace(t,"").replace(r,"").toLowerCase();var De=!1;if(H[me])me=H[me],De=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Ee.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Ee.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Ee.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Ee.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Ee.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Ee.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Ee.hex8.exec(me))?{r:ae(ce[1]),g:ae(ce[2]),b:ae(ce[3]),a:Te(ce[4]),format:De?"name":"hex8"}:(ce=Ee.hex6.exec(me))?{r:ae(ce[1]),g:ae(ce[2]),b:ae(ce[3]),format:De?"name":"hex"}:(ce=Ee.hex4.exec(me))?{r:ae(ce[1]+""+ce[1]),g:ae(ce[2]+""+ce[2]),b:ae(ce[3]+""+ce[3]),a:Te(ce[4]+""+ce[4]),format:De?"name":"hex8"}:(ce=Ee.hex3.exec(me))?{r:ae(ce[1]+""+ce[1]),g:ae(ce[2]+""+ce[2]),b:ae(ce[3]+""+ce[3]),format:De?"name":"hex"}:!1}function Ce(me){var De,ce;return me=me||{level:"AA",size:"small"},De=(me.level||"AA").toUpperCase(),ce=(me.size||"small").toLowerCase(),De!=="AA"&&De!=="AAA"&&(De="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:De,size:ce}}typeof u6!="undefined"&&u6.exports?u6.exports=l:typeof define=="function"&&define.amd?define(function(){return l}):window.tinycolor=l})(Math)});var no=ye(PS=>{"use strict";var Eee=gy(),CS=Array.isArray;function oet(e,t){var r,n;for(r=0;r{"use strict";kee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var IS=ye((HQt,Cee)=>{"use strict";Cee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var B1=ye((GQt,Iee)=>{"use strict";var Lee=IS(),Pee=Su(),_q=Pee({editType:"none"});_q.family.dflt=Lee.HOVERFONT;_q.size.dflt=Lee.HOVERFONTSIZE;Iee.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:_q,grouptitlefont:Pee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var i3=ye((jQt,Dee)=>{"use strict";var set=Su(),c6=B1().hoverlabel,f6=no().extendFlat;Dee.exports={hoverlabel:{bgcolor:f6({},c6.bgcolor,{arrayOk:!0}),bordercolor:f6({},c6.bordercolor,{arrayOk:!0}),font:set({arrayOk:!0,editType:"none"}),align:f6({},c6.align,{arrayOk:!0}),namelength:f6({},c6.namelength,{arrayOk:!0}),editType:"none"}}});var vl=ye((WQt,Ree)=>{"use strict";var uet=Su(),cet=i3();Ree.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:uet({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:cet.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 sb=ye((ZQt,qee)=>{"use strict";var fet=id(),h6={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)"]]},zee=h6.RdBu;function het(e,t){if(t||(t=zee),!e)return t;function r(){try{e=h6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Fee(e)?e:t}function Fee(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";lb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];lb.defaultLine="#444";lb.lightLine="#eee";lb.background="#fff";lb.borderLine="#BEC8D9";lb.lightFraction=100*10/11});var va=ye((YQt,Oee)=>{"use strict";var xp=id(),vet=uo(),pet=vv().isTypedArray,nd=Oee.exports={},d6=dh();nd.defaults=d6.defaults;var get=nd.defaultLine=d6.defaultLine;nd.lightLine=d6.lightLine;var bq=nd.background=d6.background;nd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};nd.rgb=function(e){return nd.tinyRGB(xp(e))};nd.opacity=function(e){return e?xp(e).getAlpha():0};nd.addOpacity=function(e,t){var r=xp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};nd.combine=function(e,t){var r=xp(e).toRgb();if(r.a===1)return xp(e).toRgbString();var n=xp(t||bq).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 xp(a).toRgbString()};nd.interpolate=function(e,t,r){var n=xp(e).toRgb(),i=xp(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 xp(a).toRgbString()};nd.contrast=function(e,t,r){var n=xp(e);n.getAlpha()!==1&&(n=xp(nd.combine(e,bq)));var i=n.isDark()?t?n.lighten(t):bq:r?n.darken(r):get;return i.toString()};nd.stroke=function(e,t){var r=xp(t);e.style({stroke:nd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};nd.fill=function(e,t){var r=xp(t);e.style({fill:nd.tinyRGB(r),"fill-opacity":r.getAlpha()})};nd.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((KQt,Bee)=>{"use strict";Bee.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var n3=ye(Nee=>{"use strict";Nee.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 Gee=ye(bp=>{"use strict";var wq=uo(),Uee=id(),Vee=no().extendFlat,met=vl(),yet=sb(),_et=va(),xet=N1().DESELECTDIM,a3=ES(),Hee=n3().counter,bet=r3().modHalf,dm=vv().isArrayOrTypedArray,U1=vv().isTypedArraySpec,V1=vv().decodeTypedArraySpec;bp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(dm(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;nn.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||!wq(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)),Uee(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return Uee(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(yet.get(e,r))}},angle:{coerceFunction:function(e,t,r){U1(e)&&(e=V1(e)),e==="auto"?t.set("auto"):wq(e)?t.set(bet(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||Hee(r);if(typeof e=="string"&&i.test(e)){t.set(e);return}t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Hee(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 jee={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/"},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:{}}},Wee={};function Zee(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),Zee(n,t[r]))}}Zee(jee,Wee);Xee.exports={configAttributes:jee,dfltConfig:Wee}});var Aq=ye((eer,Yee)=>{"use strict";var Tq=xa(),wet=uo(),DS=[];Yee.exports=function(e,t){if(DS.indexOf(e)!==-1)return;DS.push(e);var r=1e3;wet(t)?r=t:t==="long"&&(r=3e3);var n=Tq.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(DS);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var l=DS.indexOf(s);l!==-1&&DS.splice(l,1),Tq.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=Tq.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 o3=ub().dfltConfig,Sq=Aq(),Mq=Kee.exports={};Mq.log=function(){var e;if(o3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Mq.warn=function(){var e;if(o3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Mq.error=function(){var e;if(o3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var p6=ye((rer,Jee)=>{"use strict";Jee.exports=function(){}});var Eq=ye((ier,$ee)=>{"use strict";$ee.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{Qee.exports=Tet;function Tet(){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 rte=ye((aer,tte)=>{tte.exports=Aet;function Aet(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 nte=ye((oer,ite)=>{ite.exports=Met;function Met(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 kq=ye((ser,ate)=>{ate.exports=Eet;function Eet(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 ste=ye((ler,ote)=>{ote.exports=ket;function ket(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 ute=ye((uer,lte)=>{lte.exports=Cet;function Cet(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],x=t[13],b=t[14],g=t[15],E=r*s-n*o,k=r*l-i*o,A=r*u-a*o,L=n*l-i*s,_=n*u-a*s,C=i*u-a*l,M=c*x-f*v,p=c*b-h*v,P=c*g-d*v,T=f*b-h*x,F=f*g-d*x,q=h*g-d*b,V=E*q-k*F+A*T+L*P-_*p+C*M;return V?(V=1/V,e[0]=(s*q-l*F+u*T)*V,e[1]=(i*F-n*q-a*T)*V,e[2]=(x*C-b*_+g*L)*V,e[3]=(h*_-f*C-d*L)*V,e[4]=(l*P-o*q-u*p)*V,e[5]=(r*q-i*P+a*p)*V,e[6]=(b*A-v*C-g*k)*V,e[7]=(c*C-h*A+d*k)*V,e[8]=(o*F-s*P+u*M)*V,e[9]=(n*P-r*F-a*M)*V,e[10]=(v*_-x*A+g*E)*V,e[11]=(f*A-c*_-d*E)*V,e[12]=(s*p-o*T-l*M)*V,e[13]=(r*T-n*p+i*M)*V,e[14]=(x*k-v*L-b*E)*V,e[15]=(c*L-f*k+h*E)*V,e):null}});var fte=ye((cer,cte)=>{cte.exports=Let;function Let(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],x=t[13],b=t[14],g=t[15];return e[0]=s*(h*g-d*b)-f*(l*g-u*b)+x*(l*d-u*h),e[1]=-(n*(h*g-d*b)-f*(i*g-a*b)+x*(i*d-a*h)),e[2]=n*(l*g-u*b)-s*(i*g-a*b)+x*(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*g-d*b)-c*(l*g-u*b)+v*(l*d-u*h)),e[5]=r*(h*g-d*b)-c*(i*g-a*b)+v*(i*d-a*h),e[6]=-(r*(l*g-u*b)-o*(i*g-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*g-d*x)-c*(s*g-u*x)+v*(s*d-u*f),e[9]=-(r*(f*g-d*x)-c*(n*g-a*x)+v*(n*d-a*f)),e[10]=r*(s*g-u*x)-o*(n*g-a*x)+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*x)-c*(s*b-l*x)+v*(s*h-l*f)),e[13]=r*(f*b-h*x)-c*(n*b-i*x)+v*(n*h-i*f),e[14]=-(r*(s*b-l*x)-o*(n*b-i*x)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var dte=ye((fer,hte)=>{hte.exports=Pet;function Pet(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],x=e[14],b=e[15],g=t*o-r*a,E=t*s-n*a,k=t*l-i*a,A=r*s-n*o,L=r*l-i*o,_=n*l-i*s,C=u*v-c*d,M=u*x-f*d,p=u*b-h*d,P=c*x-f*v,T=c*b-h*v,F=f*b-h*x;return g*F-E*T+k*P+A*p-L*M+_*C}});var pte=ye((her,vte)=>{vte.exports=Iet;function Iet(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],x=t[12],b=t[13],g=t[14],E=t[15],k=r[0],A=r[1],L=r[2],_=r[3];return e[0]=k*n+A*s+L*f+_*x,e[1]=k*i+A*l+L*h+_*b,e[2]=k*a+A*u+L*d+_*g,e[3]=k*o+A*c+L*v+_*E,k=r[4],A=r[5],L=r[6],_=r[7],e[4]=k*n+A*s+L*f+_*x,e[5]=k*i+A*l+L*h+_*b,e[6]=k*a+A*u+L*d+_*g,e[7]=k*o+A*c+L*v+_*E,k=r[8],A=r[9],L=r[10],_=r[11],e[8]=k*n+A*s+L*f+_*x,e[9]=k*i+A*l+L*h+_*b,e[10]=k*a+A*u+L*d+_*g,e[11]=k*o+A*c+L*v+_*E,k=r[12],A=r[13],L=r[14],_=r[15],e[12]=k*n+A*s+L*f+_*x,e[13]=k*i+A*l+L*h+_*b,e[14]=k*a+A*u+L*d+_*g,e[15]=k*o+A*c+L*v+_*E,e}});var mte=ye((der,gte)=>{gte.exports=Det;function Det(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,x,b,g;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],x=t[9],b=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=x,e[10]=b,e[11]=g,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+x*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+g*a+t[15]),e}});var _te=ye((ver,yte)=>{yte.exports=Ret;function Ret(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 bte=ye((per,xte)=>{xte.exports=zet;function zet(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,x,b,g,E,k,A,L,_,C,M,p,P,T,F,q,V,H;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],x=t[4],b=t[5],g=t[6],E=t[7],k=t[8],A=t[9],L=t[10],_=t[11],C=i*i*c+u,M=a*i*c+o*l,p=o*i*c-a*l,P=i*a*c-o*l,T=a*a*c+u,F=o*a*c+i*l,q=i*o*c+a*l,V=a*o*c-i*l,H=o*o*c+u,e[0]=f*C+x*M+k*p,e[1]=h*C+b*M+A*p,e[2]=d*C+g*M+L*p,e[3]=v*C+E*M+_*p,e[4]=f*P+x*T+k*F,e[5]=h*P+b*T+A*F,e[6]=d*P+g*T+L*F,e[7]=v*P+E*T+_*F,e[8]=f*q+x*V+k*H,e[9]=h*q+b*V+A*H,e[10]=d*q+g*V+L*H,e[11]=v*q+E*V+_*H,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Tte=ye((ger,wte)=>{wte.exports=Fet;function Fet(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 Ste=ye((mer,Ate)=>{Ate.exports=qet;function qet(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 Ete=ye((yer,Mte)=>{Mte.exports=Oet;function Oet(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 Cte=ye((_er,kte)=>{kte.exports=Bet;function Bet(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 Pte=ye((xer,Lte)=>{Lte.exports=Net;function Net(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,x=a*u,b=o*s,g=o*l,E=o*u;return e[0]=1-(d+x),e[1]=f+E,e[2]=h-g,e[3]=0,e[4]=f-E,e[5]=1-(c+x),e[6]=v+b,e[7]=0,e[8]=h+g,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 Dte=ye((ber,Ite)=>{Ite.exports=Uet;function Uet(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 zte=ye((wer,Rte)=>{Rte.exports=Vet;function Vet(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 qte=ye((Ter,Fte)=>{Fte.exports=Het;function Het(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 Bte=ye((Aer,Ote)=>{Ote.exports=Get;function Get(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 Ute=ye((Ser,Nte)=>{Nte.exports=jet;function jet(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 Cq=ye((Mer,Vte)=>{Vte.exports=Wet;function Wet(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,x=a*o,b=a*s,g=a*l;return e[0]=1-f-v,e[1]=c+g,e[2]=h-b,e[3]=0,e[4]=c-g,e[5]=1-u-v,e[6]=d+x,e[7]=0,e[8]=h+b,e[9]=d-x,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Gte=ye((Eer,Hte)=>{Hte.exports=Zet;function Zet(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 Wte=ye((ker,jte)=>{jte.exports=Xet;function Xet(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 Xte=ye((Cer,Zte)=>{Zte.exports=Yet;function Yet(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 Kte=ye((Ler,Yte)=>{Yte.exports=Ket;function Ket(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 $te=ye((Per,Jte)=>{var Jet=kq();Jte.exports=$et;function $et(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],x=t[1],b=t[2],g=n[0],E=n[1],k=n[2],A=r[0],L=r[1],_=r[2];return Math.abs(v-A)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(b-_)<1e-6?Jet(e):(c=v-A,f=x-L,h=b-_,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=E*h-k*f,a=k*c-g*h,o=g*f-E*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*x+o*b),e[13]=-(s*v+l*x+u*b),e[14]=-(c*v+f*x+h*b),e[15]=1,e)}});var ere=ye((Ier,Qte)=>{Qte.exports=Qet;function Qet(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 Lq=ye((Der,tre)=>{tre.exports={create:ete(),clone:rte(),copy:nte(),identity:kq(),transpose:ste(),invert:ute(),adjoint:fte(),determinant:dte(),multiply:pte(),translate:mte(),scale:_te(),rotate:bte(),rotateX:Tte(),rotateY:Ste(),rotateZ:Ete(),fromRotation:Cte(),fromRotationTranslation:Pte(),fromScaling:Dte(),fromTranslation:zte(),fromXRotation:qte(),fromYRotation:Bte(),fromZRotation:Ute(),fromQuat:Cq(),frustum:Gte(),perspective:Wte(),perspectiveFromFieldOfView:Xte(),ortho:Kte(),lookAt:$te(),str:ere()}});var g6=ye(Xf=>{"use strict";var ett=Lq();Xf.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var ttt=xa(),rre=H1(),rtt=g6(),itt=Lq();function ntt(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 att(e){var t=ttt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function ire(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function ott(e,t){nre("global",e,t)}function nre(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):rre.warn("addStyleRule failed"):rre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function stt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&ire(r)}function ltt(e,t,r,n,i){var a=n.split(":"),o=i.split(":"),s="data-btn-style-event-added";document.querySelectorAll(e).forEach(function(l){l.getAttribute(s)||(l.addEventListener("mouseenter",function(){var u=this.querySelector(r);u&&(u.style[a[0]]=a[1])}),l.addEventListener("mouseleave",function(){var u=this.querySelector(r);u&&(t&&this.matches(t)?u.style[a[0]]=a[1]:u.style[o[0]]=o[1])}),l.setAttribute(s,!0))})}function utt(e){var t=ore(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=are(n);if(i){var a=rtt.convertCssMatrix(i);r=itt.multiply(r,r,a)}}),r}function are(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 ore(e){for(var t=[];ctt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function ctt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function ftt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}sre.exports={getGraphDiv:ntt,isPlotDiv:att,removeElement:ire,addStyleRule:ott,addRelatedStyleRule:nre,deleteRelatedStyleRule:stt,setStyleOnHover:ltt,getFullTransformMatrix:utt,getElementTransformMatrix:are,getElementAndAncestors:ore,equalDomRects:ftt}});var zS=ye((Fer,lre)=>{"use strict";lre.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 Bu=ye((qer,pre)=>{"use strict";var cre=no().extendFlat,htt=gy(),fre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},hre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},dtt=fre.flags.slice().concat(["fullReplot"]),vtt=hre.flags.slice().concat("layoutReplot");pre.exports={traces:fre,layout:hre,traceFlags:function(){return ure(dtt)},layoutFlags:function(){return ure(vtt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";Pq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Pq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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 Iq=ye((Ber,gre)=>{"use strict";gre.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 Wo=ye(m6=>{"use strict";var mre=Iq(),Ner=mre.FORMAT_LINK,Uer=mre.DATE_FORMAT_LINK;function Dq(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i{"use strict";function G1(e,t){return t?t.d2l(e):e}function yre(e,t){return t?t.l2d(e):e}function ptt(e){return e.x0}function gtt(e){return e.x1}function mtt(e){return e.y0}function ytt(e){return e.y1}function _re(e){return e.x0shift||0}function xre(e){return e.x1shift||0}function bre(e){return e.y0shift||0}function wre(e){return e.y1shift||0}function y6(e,t){return G1(e.x1,t)+xre(e)-G1(e.x0,t)-_re(e)}function _6(e,t,r){return G1(e.y1,r)+wre(e)-G1(e.y0,r)-bre(e)}function _tt(e,t){return Math.abs(y6(e,t))}function xtt(e,t,r){return Math.abs(_6(e,t,r))}function btt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(y6(e,t),2)+Math.pow(_6(e,t,r),2))}function wtt(e,t){return yre((G1(e.x1,t)+xre(e)+G1(e.x0,t)+_re(e))/2,t)}function Ttt(e,t,r){return yre((G1(e.y1,r)+wre(e)+G1(e.y0,r)+bre(e))/2,r)}function Att(e,t,r){return e.type!=="line"?void 0:_6(e,t,r)/y6(e,t)}Tre.exports={x0:ptt,x1:gtt,y0:mtt,y1:ytt,slope:Att,dx:y6,dy:_6,width:_tt,height:xtt,length:btt,xcenter:wtt,ycenter:Ttt}});var Mre=ye((Ger,Sre)=>{"use strict";var Stt=Bu().overrideAll,cb=vl(),Are=Su(),Mtt=Ed().dash,j1=no().extendFlat,Ett=Wo().shapeTexttemplateAttrs,ktt=x6();Sre.exports=Stt({newshape:{visible:j1({},cb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:j1({},cb.legend,{}),legendgroup:j1({},cb.legendgroup,{}),legendgrouptitle:{text:j1({},cb.legendgrouptitle.text,{}),font:Are({})},legendrank:j1({},cb.legendrank,{}),legendwidth:j1({},cb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:j1({},Mtt,{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({},cb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:Ett({newshape:!0},{keys:Object.keys(ktt)}),font:Are({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var kre=ye((jer,Ere)=>{"use strict";var Ctt=Ed().dash,Ltt=no().extendFlat;Ere.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:Ltt({},Ctt,{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 b6=ye((Wer,Cre)=>{"use strict";Cre.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 s3=ye((Zer,Dre)=>{"use strict";var Rq=Su(),Ptt=zS(),w6=dh(),Lre=Mre(),Pre=kre(),Itt=b6(),Ire=no().extendFlat,T6=Rq({editType:"calc"});T6.family.dflt='"Open Sans", verdana, arial, sans-serif';T6.size.dflt=12;T6.color.dflt=w6.defaultLine;Dre.exports={font:T6,title:{text:{valType:"string",editType:"layoutstyle"},font:Rq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Rq({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:Ire(Itt({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:w6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:w6.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:w6.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:"plot"},newshape:Lre.newshape,activeshape:Lre.activeshape,newselection:Pre.newselection,activeselection:Pre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Ire({},Ptt.transition,{editType:"none"})}});var Rre=su(()=>{});var Dtt={};var zre=su(()=>{Rre()});var ba=ye(qs=>{"use strict";var l3=H1(),Fre=p6(),qre=Eq(),Rtt=gy(),ztt=RS().addStyleRule,Ore=no(),Ftt=vl(),qtt=s3(),Ott=Ore.extendFlat,zq=Ore.extendDeepAll;qs.modules={};qs.allCategories={};qs.allTypes=[];qs.subplotsRegistry={};qs.componentsRegistry={};qs.layoutArrayContainers=[];qs.layoutArrayRegexes=[];qs.traceLayoutAttributes={};qs.localeRegistry={};qs.apiMethodRegistry={};qs.collectableSubplotTypes=null;qs.register=function(t){if(qs.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 Gtt=e3().timeFormat,Yre=uo(),Fq=H1(),Z1=r3().mod,f3=es(),_0=f3.BADNUM,wp=f3.ONEDAY,FS=f3.ONEHOUR,W1=f3.ONEMIN,c3=f3.ONESEC,qS=f3.EPOCHJD,my=ba(),Hre=e3().utcFormat,jtt=/^\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,Wtt=/^\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,Gre=new Date().getFullYear()-70;function yy(e){return e&&my.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Yf.dateTick0=function(e,t){var r=Ztt(e,!!t);if(t<2)return r;var n=Yf.dateTime2ms(r,e);return n+=wp*(t-1),Yf.ms2DateTime(n,0,e)};function Ztt(e,t){return yy(e)?t?my.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:my.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Yf.dfltRange=function(e){return yy(e)?my.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Yf.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var S6,M6;Yf.dateTime2ms=function(e,t){if(Yf.isJSDate(e)){var r=e.getTimezoneOffset()*W1,n=(e.getUTCMinutes()-e.getMinutes())*W1+(e.getUTCSeconds()-e.getSeconds())*c3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*W1;r=r-i/2+Z1(n-r+i/2,i)}return e=Number(e)-r,e>=S6&&e<=M6?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=yy(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.substr(1),t="");var s=a&&t.substr(0,7)==="chinese",l=e.match(s?Wtt:jtt);if(!l)return _0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var x;try{var b=my.getComponentMethod("calendars","getCal")(t);if(s){var g=c.charAt(c.length-1)==="i";c=parseInt(c,10),x=b.newDate(u,b.toMonthIndex(u,c,g),f)}else x=b.newDate(u,Number(c),f)}catch(k){return _0}return x?(x.toJD()-qS)*wp+h*FS+d*W1+v*c3:_0}u.length===2?u=(Number(u)+2e3-Gre)%100+Gre:u=Number(u),c-=1;var E=new Date(Date.UTC(2e3,c,f,h,d));return E.setUTCFullYear(u),E.getUTCMonth()!==c||E.getUTCDate()!==f?_0:E.getTime()+v*c3};S6=Yf.MIN_MS=Yf.dateTime2ms("-9999");M6=Yf.MAX_MS=Yf.dateTime2ms("9999-12-31 23:59:59.9999");Yf.isDateTime=function(e,t){return Yf.dateTime2ms(e,t)!==_0};function u3(e,t){return String(e+Math.pow(10,t)).substr(1)}var A6=90*wp,jre=3*FS,Wre=5*W1;Yf.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=S6&&e<=M6))return _0;t||(t=0);var n=Math.floor(Z1(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(yy(r)){var f=Math.floor(i/wp)+qS,h=Math.floor(Z1(e,wp));try{a=my.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=Hre("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=t=S6+wp&&e<=M6-wp))return _0;var t=Math.floor(Z1(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Gtt("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Kre(n,i,a,o,s)};function Kre(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+u3(t,2)+":"+u3(r,2),(n||i)&&(e+=":"+u3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+u3(i,a)}return e}Yf.cleanDate=function(e,t,r){if(e===_0)return t;if(Yf.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(yy(r))return Fq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Yf.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Yf.isDateTime(e,r))return Fq.error("unrecognized date",e),t;return e};var Xtt=/%\d?f/g,Ytt=/%h/g,Ktt={1:"1",2:"1",3:"2",4:"2"};function Zre(e,t,r,n){e=e.replace(Xtt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).substr(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Ytt,function(){return Ktt[r("%q")(i)]}),yy(n))try{e=my.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var Jtt=[59,59.9,59.99,59.999,59.9999];function $tt(e,t){var r=Z1(e+.05,wp),n=u3(Math.floor(r/FS),2)+":"+u3(Z1(Math.floor(r/W1),60),2);if(t!=="M"){Yre(t)||(t=0);var i=Math.min(Z1(e/c3,60),Jtt[t]),a=(100+i).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}Yf.formatDate=function(e,t,r,n,i,a){if(i=yy(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 $tt(e,r)+` -`+Zre(a.dayMonthYear,e,n,i);return Zre(t,e,n,i)};var Xre=3*wp;Yf.incrementMonth=function(e,t,r){r=yy(r)&&r;var n=Z1(e,wp);if(e=Math.round(e-n),r)try{var i=Math.round(e/wp)+qS,a=my.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-qS)*wp+n}catch(l){Fq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+Xre);return s.setUTCMonth(s.getUTCMonth()+t)+n-Xre};Yf.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=yy(t)&&my.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";$re.exports=function(t){return t}});var E6=ye(_y=>{"use strict";var Qtt=uo(),ert=H1(),trt=OS(),rrt=es().BADNUM,qq=1e-9;_y.findBin=function(e,t,r){if(Qtt(t.start))return r?Math.ceil((e-t.start)/t.size-qq)-1:Math.floor((e-t.start)/t.size+qq);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?irt:nrt:l=r?ort:art,e+=o*qq*(r?-1:1)*(o>=0?1:-1);n90&&ert.log("Long binary search..."),n-1};function irt(e,t){return et}function ort(e,t){return e>=t}_y.sorterAsc=function(e,t){return e-t};_y.sorterDes=function(e,t){return t-e};_y.distinctVals=function(e){var t=e.slice();t.sort(_y.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===rrt;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}};_y.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()};_y.findIndexOfMin=function(e,t){t=t||trt;for(var r=1/0,n,i=0;i{"use strict";Qre.exports=function(t){return Object.keys(t).sort()}});var eie=ye(Kf=>{"use strict";var BS=uo(),srt=vv().isArrayOrTypedArray;Kf.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),BS(t)||(t=!1),srt(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 aie=ye((itr,nie)=>{"use strict";var tie=r3(),Oq=tie.mod,lrt=tie.modHalf,NS=Math.PI,Y1=2*NS;function urt(e){return e/180*NS}function crt(e){return e/NS*180}function Bq(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function rie(e,t){return lrt(t-e,Y1)}function frt(e,t){return Math.abs(rie(e,t))}function iie(e,t){if(Bq(t))return!0;var r,n;t[0]n&&(n+=Y1);var i=Oq(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function hrt(e,t,r,n){if(!iie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function Nq(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=Bq([r,n]),l,u,c,f,h;s?(l=0,u=NS,c=Y1):r{"use strict";fb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};fb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};fb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};fb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};fb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};fb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var uie=ye(hb=>{"use strict";var Uq=r3().mod;hb.segmentsIntersect=lie;function lie(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 x=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||x<0||x>1?null:{x:e+l*x,y:t+f*x}}hb.segmentDistance=function(t,r,n,i,a,o,s,l){if(lie(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,x=Math.min(k6(u,c,d,a-t,o-r),k6(u,c,d,s-t,l-r),k6(f,h,v,t-a,r-o),k6(f,h,v,n-a,i-o));return Math.sqrt(x)};function k6(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 C6,Vq,sie;hb.getTextLocation=function(t,r,n,i){if((t!==Vq||i!==sie)&&(C6={},Vq=t,sie=i),C6[n])return C6[n];var a=t.getPointAtLength(Uq(n-i/2,r)),o=t.getPointAtLength(Uq(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(Uq(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 C6[n]=f,f};hb.clearLocationCache=function(){Vq=null};hb.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(x){var b=t.getPointAtLength(x);x===0?f=b:x===u&&(h=b);var g=b.xa?b.x-a:0,E=b.ys?b.y-s:0;return Math.sqrt(g*g+E*E)}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}};hb.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 L6=ye(US=>{"use strict";var xy={};US.throttle=function(t,r,n){var i=xy[t],a=Date.now();if(!i){for(var o in xy)xy[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};US.done=function(e){var t=xy[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};US.clear=function(e){if(e)cie(xy[e]),delete xy[e];else for(var t in xy)US.clear(t)};function cie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var hie=ye((str,fie)=>{"use strict";fie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var die=ye((ltr,P6)=>{"use strict";P6.exports=Hq;P6.exports.isMobile=Hq;P6.exports.default=Hq;var grt=/(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,mrt=/CrOS/,yrt=/android|ipad|playbook|silk/i;function Hq(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=grt.test(t)&&!mrt.test(t)||!!e.tablet&&yrt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var pie=ye((utr,vie)=>{"use strict";var _rt=uo(),xrt=die();vie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=brt(),typeof r!="string")return!0;var n=xrt({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.substr(0,8)==="Version/"){var u=l.substr(8).split(".")[0];if(_rt(u)&&(u=+u),u>=13)return!0}}}return n};function brt(){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 mie=ye((ctr,gie)=>{"use strict";var wrt=xa();gie.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]=wrt.select(this)}),i}});var _ie=ye((ftr,yie)=>{"use strict";var Trt=ba();yie.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=Trt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var Gq=ye((htr,xie)=>{"use strict";xie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";bie.exports=function(t){for(var r=Mrt(t)?Srt:Art,n=[],i=0;i{"use strict";Tie.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 Mie=ye((ptr,Sie)=>{"use strict";var Ert=uo(),krt=es().BADNUM,Crt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Sie.exports=function(t){return typeof t=="string"&&(t=t.replace(Crt,"")),Ert(t)?Number(t):krt}});var Mr=ye((gtr,Bie)=>{"use strict";var VS=xa(),Lrt=e3().utcFormat,Prt=dq().format,Iie=uo(),Die=es(),Rie=Die.FP_SAFE,Irt=-Rie,Eie=Die.BADNUM,li=Bie.exports={};li.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 kie={};li.warnBadFormat=function(e){var t=String(e);kie[t]||(kie[t]=1,li.warn('encountered bad format: "'+t+'"'))};li.noFormat=function(e){return String(e)};li.numberFormat=function(e){var t;try{t=Prt(li.adjustFormat(e))}catch(r){return li.warnBadFormat(e),li.noFormat}return t};li.nestedProperty=ES();li.keyedContainer=_ee();li.relativeAttr=bee();li.isPlainObject=gy();li.toLogRange=l6();li.relinkPrivateKeys=See();var K1=vv();li.isArrayBuffer=K1.isArrayBuffer;li.isTypedArray=K1.isTypedArray;li.isArrayOrTypedArray=K1.isArrayOrTypedArray;li.isArray1D=K1.isArray1D;li.ensureArray=K1.ensureArray;li.concat=K1.concat;li.maxRowLength=K1.maxRowLength;li.minRowLength=K1.minRowLength;var zie=r3();li.mod=zie.mod;li.modHalf=zie.modHalf;var J1=Gee();li.valObjectMeta=J1.valObjectMeta;li.coerce=J1.coerce;li.coerce2=J1.coerce2;li.coerceFont=J1.coerceFont;li.coercePattern=J1.coercePattern;li.coerceHoverinfo=J1.coerceHoverinfo;li.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;li.validate=J1.validate;var Wp=Jre();li.dateTime2ms=Wp.dateTime2ms;li.isDateTime=Wp.isDateTime;li.ms2DateTime=Wp.ms2DateTime;li.ms2DateTimeLocal=Wp.ms2DateTimeLocal;li.cleanDate=Wp.cleanDate;li.isJSDate=Wp.isJSDate;li.formatDate=Wp.formatDate;li.incrementMonth=Wp.incrementMonth;li.dateTick0=Wp.dateTick0;li.dfltRange=Wp.dfltRange;li.findExactDates=Wp.findExactDates;li.MIN_MS=Wp.MIN_MS;li.MAX_MS=Wp.MAX_MS;var db=E6();li.findBin=db.findBin;li.sorterAsc=db.sorterAsc;li.sorterDes=db.sorterDes;li.distinctVals=db.distinctVals;li.roundUp=db.roundUp;li.sort=db.sort;li.findIndexOfMin=db.findIndexOfMin;li.sortObjectKeys=X1();var by=eie();li.aggNums=by.aggNums;li.len=by.len;li.mean=by.mean;li.geometricMean=by.geometricMean;li.median=by.median;li.midRange=by.midRange;li.variance=by.variance;li.stdev=by.stdev;li.interp=by.interp;var yg=g6();li.init2dArray=yg.init2dArray;li.transposeRagged=yg.transposeRagged;li.dot=yg.dot;li.translationMatrix=yg.translationMatrix;li.rotationMatrix=yg.rotationMatrix;li.rotationXYMatrix=yg.rotationXYMatrix;li.apply3DTransform=yg.apply3DTransform;li.apply2DTransform=yg.apply2DTransform;li.apply2DTransform2=yg.apply2DTransform2;li.convertCssMatrix=yg.convertCssMatrix;li.inverseTransformMatrix=yg.inverseTransformMatrix;var vm=aie();li.deg2rad=vm.deg2rad;li.rad2deg=vm.rad2deg;li.angleDelta=vm.angleDelta;li.angleDist=vm.angleDist;li.isFullCircle=vm.isFullCircle;li.isAngleInsideSector=vm.isAngleInsideSector;li.isPtInsideSector=vm.isPtInsideSector;li.pathArc=vm.pathArc;li.pathSector=vm.pathSector;li.pathAnnulus=vm.pathAnnulus;var d3=oie();li.isLeftAnchor=d3.isLeftAnchor;li.isCenterAnchor=d3.isCenterAnchor;li.isRightAnchor=d3.isRightAnchor;li.isTopAnchor=d3.isTopAnchor;li.isMiddleAnchor=d3.isMiddleAnchor;li.isBottomAnchor=d3.isBottomAnchor;var v3=uie();li.segmentsIntersect=v3.segmentsIntersect;li.segmentDistance=v3.segmentDistance;li.getTextLocation=v3.getTextLocation;li.clearLocationCache=v3.clearLocationCache;li.getVisibleSegment=v3.getVisibleSegment;li.findPointOnPath=v3.findPointOnPath;var R6=no();li.extendFlat=R6.extendFlat;li.extendDeep=R6.extendDeep;li.extendDeepAll=R6.extendDeepAll;li.extendDeepNoArrays=R6.extendDeepNoArrays;var jq=H1();li.log=jq.log;li.warn=jq.warn;li.error=jq.error;var Drt=n3();li.counterRegex=Drt.counter;var Wq=L6();li.throttle=Wq.throttle;li.throttleDone=Wq.done;li.clearThrottle=Wq.clear;var _g=RS();li.getGraphDiv=_g.getGraphDiv;li.isPlotDiv=_g.isPlotDiv;li.removeElement=_g.removeElement;li.addStyleRule=_g.addStyleRule;li.addRelatedStyleRule=_g.addRelatedStyleRule;li.deleteRelatedStyleRule=_g.deleteRelatedStyleRule;li.setStyleOnHover=_g.setStyleOnHover;li.getFullTransformMatrix=_g.getFullTransformMatrix;li.getElementTransformMatrix=_g.getElementTransformMatrix;li.getElementAndAncestors=_g.getElementAndAncestors;li.equalDomRects=_g.equalDomRects;li.clearResponsive=hie();li.preserveDrawingBuffer=pie();li.makeTraceGroups=mie();li._=_ie();li.notifier=Aq();li.filterUnique=Gq();li.filterVisible=wie();li.pushUnique=Eq();li.increment=Aie();li.cleanNumber=Mie();li.ensureNumber=function(t){return Iie(t)?(t=Number(t),t>Rie||t=t?!1:Iie(e)&&e>=0&&e%1===0};li.noop=p6();li.identity=OS();li.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))};li.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};li.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?(li.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};li.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};li.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};li.syncOrAsync=function(e,t,r){var n,i;function a(){return li.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)};li.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};li.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};li.fillArray=function(e,t,r,n){if(n=n||li.identity,li.isArrayOrTypedArray(e))for(var i=0;i1?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};li.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Oie=/^\w*$/;li.templateString=function(e,t){var r={};return e.replace(li.TEMPLATE_STRING_REGEX,function(n,i){var a;return Oie.test(i)?a=t[i]:(r[i]=r[i]||li.nestedProperty(t,i).get,a=r[i]()),li.isValidTextValue(a)?a:""})};var Brt={max:10,count:0,name:"hovertemplate"};li.hovertemplateString=function(){return Zq.apply(Brt,arguments)};var Nrt={max:10,count:0,name:"texttemplate"};li.texttemplateString=function(){return Zq.apply(Nrt,arguments)};var Urt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Vrt(e){var t=e.match(Urt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Hrt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};li.texttemplateStringForShapes=function(){return Zq.apply(Hrt,arguments)};var Cie=/^[:|\|]/;function Zq(e,t,r){var n=this,i=arguments;t||(t={});var a={};return e.replace(li.TEMPLATE_STRING_REGEX,function(o,s,l){var u=s==="xother"||s==="yother",c=s==="_xother"||s==="_yother",f=s==="_xother_"||s==="_yother_",h=s==="xother_"||s==="yother_",d=u||c||h||f,v=s;(c||f)&&(v=v.substring(1)),(h||f)&&(v=v.substring(0,v.length-1));var x=null,b=null;if(n.parseMultDiv){var g=Vrt(v);v=g.key,x=g.op,b=g.number}var E;if(d){if(E=t[v],E===void 0)return""}else{var k,S;for(S=3;S=D6&&o<=Lie,u=s>=D6&&s<=Lie;if(l&&(n=10*n+o-D6),u&&(i=10*i+s-D6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var h3=2e9;li.seedPseudoRandom=function(){h3=2e9};li.pseudoRandom=function(){var e=h3;return h3=(69069*h3+1)%4294967296,Math.abs(h3-e)<429496729?li.pseudoRandom():h3/4294967296};li.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=li.extractOption(e,t,"htx","hovertext");if(li.isValidTextValue(i))return n(i);var a=li.extractOption(e,t,"tx","text");if(li.isValidTextValue(a))return n(a)};li.isValidTextValue=function(e){return e||e===0};li.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,li.strTranslate(i-u*(r+o),a-u*(n+s))+li.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};li.setTransormAndDisplay=function(e,t){e.attr("transform",li.getTextTransform(t)),e.style("display",t.scale?null:"none")};li.ensureUniformFontSize=function(e,t){var r=li.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};li.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)};li.bigFont=function(e){return Math.round(1.2*e)};var Pie=li.getFirefoxVersion(),Grt=Pie!==null&&Pie<86;li.getPositionFromD3Event=function(){return Grt?[VS.event.layerX,VS.event.layerY]:[VS.event.offsetX,VS.event.offsetY]}});var Vie=ye(()=>{"use strict";var jrt=Mr(),Nie={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Xq in Nie)Uie=Xq.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jrt.addStyleRule(Uie,Nie[Xq]);var Uie,Xq});var Yq=ye((_tr,Hie)=>{Hie.exports=!0});var Jq=ye((xtr,Gie)=>{"use strict";var Wrt=Yq(),Kq;typeof window.matchMedia=="function"?Kq=!window.matchMedia("(hover: none)").matches:Kq=Wrt;Gie.exports=Kq});var vb=ye((btr,$q)=>{"use strict";var p3=typeof Reflect=="object"?Reflect:null,jie=p3&&typeof p3.apply=="function"?p3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},z6;p3&&typeof p3.ownKeys=="function"?z6=p3.ownKeys:Object.getOwnPropertySymbols?z6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:z6=function(t){return Object.getOwnPropertyNames(t)};function Zrt(e){console&&console.warn&&console.warn(e)}var Zie=Number.isNaN||function(t){return t!==t};function Tc(){Tc.init.call(this)}$q.exports=Tc;$q.exports.once=Jrt;Tc.EventEmitter=Tc;Tc.prototype._events=void 0;Tc.prototype._eventsCount=0;Tc.prototype._maxListeners=void 0;var Wie=10;function F6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Tc,"defaultMaxListeners",{enumerable:!0,get:function(){return Wie},set:function(e){if(typeof e!="number"||e<0||Zie(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Wie=e}});Tc.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};Tc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Zie(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 Xie(e){return e._maxListeners===void 0?Tc.defaultMaxListeners:e._maxListeners}Tc.prototype.getMaxListeners=function(){return Xie(this)};Tc.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")jie(l,this,r);else for(var u=l.length,c=Qie(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,Zrt(s)}return e}Tc.prototype.addListener=function(t,r){return Yie(this,t,r,!1)};Tc.prototype.on=Tc.prototype.addListener;Tc.prototype.prependListener=function(t,r){return Yie(this,t,r,!0)};function Xrt(){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 Kie(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Xrt.bind(n);return i.listener=r,n.wrapFn=i,i}Tc.prototype.once=function(t,r){return F6(r),this.on(t,Kie(this,t,r)),this};Tc.prototype.prependOnceListener=function(t,r){return F6(r),this.prependListener(t,Kie(this,t,r)),this};Tc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(F6(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():Yrt(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Tc.prototype.off=Tc.prototype.removeListener;Tc.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 Jie(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?Krt(i):Qie(i,i.length)}Tc.prototype.listeners=function(t){return Jie(this,t,!0)};Tc.prototype.rawListeners=function(t){return Jie(this,t,!1)};Tc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):$ie.call(e,t)};Tc.prototype.listenerCount=$ie;function $ie(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}Tc.prototype.eventNames=function(){return this._eventsCount>0?z6(this._events):[]};function Qie(e,t){for(var r=new Array(t),n=0;n{"use strict";var Qq=vb().EventEmitter,Qrt={init:function(e){if(e._ev instanceof Qq)return e;var t=new Qq,r=new Qq;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)},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 rne=Mr(),eit=ub().dfltConfig;function tit(e,t){for(var r=[],n,i=0;ieit.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};wy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};wy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};wy.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";ane.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var _3=ye(Bh=>{"use strict";var x0=ba(),HS=Mr(),O6=vl(),tO=s3(),rit=eO(),iit=zS(),nit=ub().configAttributes,one=Bu(),xg=HS.extendDeepAll,m3=HS.isPlainObject,ait=HS.isArrayOrTypedArray,B6=HS.nestedProperty,oit=HS.valObjectMeta,rO="_isSubplotObj",N6="_isLinkedToArray",sit="_arrayAttrRegexps",lne="_deprecated",iO=[rO,N6,sit,lne];Bh.IS_SUBPLOT_OBJ=rO;Bh.IS_LINKED_TO_ARRAY=N6;Bh.DEPRECATED=lne;Bh.UNDERSCORE_ATTRS=iO;Bh.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=uit(t)}),{defs:{valObjects:oit,metaKeys:iO.concat(["description","role","editType","impliedEdits"]),editType:{traces:one.traces,layout:one.layout},impliedEdits:{}},traces:e,layout:cit(),frames:fit(),animation:y3(iit),config:y3(nit)}};Bh.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(iO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!Bh.isValObject(o)&&m3(o)&&a!=="impliedEdits"&&Bh.crawl(o,t,i+1,s)}})};Bh.isValObject=function(e){return e&&e.valType!==void 0};Bh.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)ait(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(!q6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function q6(e){return e===Math.round(e)&&e>=0}function uit(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=xg({},O6),a=xg({},t.attributes);Bh.crawl(a,function(l,u,c,f,h){B6(i,h).set(void 0),l===void 0&&B6(a,h).set(void 0)}),xg(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,xg(n,a),r.attributes&&xg(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:y3(n)};if(t.layoutAttributes){var s={};xg(s,t.layoutAttributes),o.layoutAttributes=y3(s)}return t.animatable||Bh.crawl(o,function(l){Bh.isValObject(l)&&"anim"in l&&delete l.anim}),o}function cit(){var e={},t,r;xg(e,tO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var x3=Mr(),git=vl(),$1="templateitemname",nO={name:{valType:"string",editType:"none"}};nO[$1]={valType:"string",editType:"calc"};pb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=nO.name,t[$1]=nO[$1],t};pb.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=x3.coerce(a,{},git,"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}};pb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);x3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};pb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[fne(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(!cne(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?x3.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 x=f();for(var b in x)x3.nestedProperty(e,b).set(x[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var ad=ye((Etr,hne)=>{"use strict";var GS=n3().counter;hne.exports={idRegex:{x:GS("x","( domain)?"),y:GS("y","( domain)?")},attrRegex:GS("[xy]axis"),xAxisMatch:GS("xaxis"),yAxisMatch:GS("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 af=ye(Tp=>{"use strict";var mit=ba(),aO=ad();Tp.id2name=function(t){if(!(typeof t!="string"||!t.match(aO.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Tp.name2id=function(t){if(t.match(aO.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Tp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(aO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Tp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Tp.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Tp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function dne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function yit(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function _it(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}vne.exports={clearOutlineControllers:yit,clearOutline:_it}});var U6=ye((Ltr,pne)=>{"use strict";pne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var kd=ye(H6=>{"use strict";var V6=ba(),Ptr=ad().SUBPLOT_PATTERN;H6.getSubplotCalcData=function(e,t,r){var n=V6.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var xit=ba(),b3=Mr();gb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=gb.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){gne(e,o,i.cache),i.check=function(){if(a){var c=gne(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;b3.isPlainObject(a)?oO(a,t,o,n+1):t(o,i,a)}})}});var Yu=ye((Rtr,Dne)=>{"use strict";var Mne=xa(),wit=e3().timeFormatLocale,Tit=dq().formatLocale,jS=uo(),Ait=vq(),bl=ba(),Ene=_3(),Sit=Vs(),Ca=Mr(),kne=va(),xne=es().BADNUM,Ap=af(),Mit=Q1().clearOutline,Eit=U6(),sO=zS(),kit=eO(),Cit=kd().getModuleCalcData,bne=Ca.relinkPrivateKeys,mb=Ca._,ha=Dne.exports={};Ca.extendFlat(ha,bl);ha.attributes=vl();ha.attributes.type.values=ha.allTypes;ha.fontAttrs=Su();ha.layoutAttributes=s3();var j6=_ne();ha.executeAPICommand=j6.executeAPICommand;ha.computeAPICommandBindings=j6.computeAPICommandBindings;ha.manageCommandObserver=j6.manageCommandObserver;ha.hasSimpleAPICommandBindings=j6.hasSimpleAPICommandBindings;ha.redrawText=function(e){return e=Ca.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(bl.getComponentMethod("annotations","draw")(e),bl.getComponentMethod("legend","draw")(e),bl.getComponentMethod("colorbar","draw")(e),t(ha.previousPromises(e)))},300)})};ha.resize=function(e){e=Ca.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ca.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||Ca.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,bl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};ha.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};ha.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ca.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:kne.defaultLine,"pointer-events":"all"}).each(function(){var u=Mne.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&&Lit(e,a),o.text(a.text()&&s.text()?" - ":"")}};function Lit(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(){ha.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})}}ha.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Mne.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=ha.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var Pit=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Iit=["year","month","dayMonth","dayMonthYear"];ha.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||ha.createTransitionData(e),i._dfltTitle={plot:mb(e,"Click to enter Plot title"),subtitle:mb(e,"Click to enter Plot subtitle"),x:mb(e,"Click to enter X axis title"),y:mb(e,"Click to enter Y axis title"),colorbar:mb(e,"Click to enter Colorscale title"),annotation:mb(e,"new text")},i._traceWord=mb(e,"trace");var h=wne(e,Pit);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;ha.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),ha.sanitizeMargins(i)}else{ha.supplyLayoutGlobalDefaults(a,i,h);var x=!a.width||!a.height,b=i.autosize,g=c.autosizable,E=x&&(b||g);E?ha.plotAutoSize(e,a,i):x&&ha.sanitizeMargins(i),!b&&x&&(a.width=i.width,a.height=i.height)}i._d3locale=zit(h,i.separators),i._extraFormat=wne(e,Iit),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var k=i._subplots=Rit(),S=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=Dit(o,l),ha.supplyDataDefaults(l,s,a,i);var _=Object.keys(S.x),C=Object.keys(S.y);if(_.length>1&&C.length>1){for(bl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f<_.length;f++)Ca.pushUnique(k.xaxis,_[f]);for(f=0;f15&&C.length>15&&i.shapes.length===0&&i.images.length===0,ha.linkSubplots(s,i,o,n),ha.cleanPlot(s,i,o,n);var F=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),V=F,H=q;V&&!H?n._bgLayer.remove():H&&!V&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&Mit({_fullLayout:n}),Fit(s,i),bne(i,n),bl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var X=i._tracePreGUI,G={},N;for(N in X)G[N]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=ha.layoutAttributes.width.min,h=ha.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}),ha.sanitizeMargins(n)};ha.supplyLayoutModuleDefaults=function(e,t,r,n){var i=bl.componentsRegistry,a=t._basePlotModules,o,s,l,u=bl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(bl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ca.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var g=(r.t+r.b)/h;g>1&&(r.t/=g,r.b/=g)}var E=r.xl!==void 0?r.xl:r.x,k=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:E,size:r.l+x},r:{val:k,size:r.r+x},b:{val:L,size:r.b+x},t:{val:S,size:r.t+x}},v[t]=1}if(!n._replotting)return ha.doAutoMargin(e)}};function Oit(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Ap.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}ha.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Cne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ca.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,x=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var g=e._fullLayout._reservedMargin;for(var E in g)for(var k in g[E]){var S=g[E][k];o[k]=Math.max(o[k],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 _=0;for(var C in h)C!=="base"&&jS(h[C][L].size)&&(_=h[C][L].size>_?h[C][L].size:_);var M=Math.max(0,a[L]-_);o[L]=Math.max(0,o[L]-M)}for(var p in h){var P=h[p].l||{},T=h[p].b||{},F=P.val,q=P.size,V=T.val,H=T.size,X=r-o.r-o.l,G=n-o.t-o.b;for(var N in h){if(jS(q)&&h[N].r){var W=h[N].r.val,re=h[N].r.size;if(W>F){var ae=(q*W+(re-X)*F)/(W-F),_e=(re*(1-F)+(q-X)*(1-W))/(W-F);ae+_e>l+u&&(l=ae,u=_e)}}if(jS(H)&&h[N].t){var Me=h[N].t.val,ke=h[N].t.size;if(Me>V){var ge=(H*Me+(ke-G)*V)/(Me-V),ie=(ke*(1-V)+(H-G)*(1-Me))/(Me-V);ge+ie>f+c&&(f=ge,c=ie)}}}}}var Te=Ca.constrain(r-a.l-a.r,Lne,v),Ee=Ca.constrain(n-a.t-a.b,Pne,x),Ae=Math.max(0,r-Te),ze=Math.max(0,n-Ee);if(Ae){var Ce=(l+u)/Ae;Ce>1&&(l/=Ce,u/=Ce)}if(ze){var me=(f+c)/ze;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(ha.didMarginChange(s,i)||Oit(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var De=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};ha.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&ha.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(Ca.isPlainObject(h)){var v={},x;return Object.keys(h).sort().forEach(function(k){if(["_","["].indexOf(k.charAt(0))===-1){if(typeof h[k]=="function"){d&&(v[k]="_function");return}if(r==="keepdata"){if(k.substr(k.length-3)==="src")return}else if(r==="keepstream"){if(x=h[k+"src"],typeof x=="string"&&x.indexOf(":")>0&&!Ca.isPlainObject(h.stream))return}else if(r!=="keepall"&&(x=h[k+"src"],typeof x=="string"&&x.indexOf(":")>0))return;v[k]=u(h[k],d)}}),v}var b=Array.isArray(h),g=Ca.isTypedArray(h);if((b||g)&&h.dtype&&h.shape){var E=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ca.isArrayBuffer(E)?Ait.encode(E):E},d)}return b?h.map(function(k){return u(k,d)}):g?Ca.simpleMap(h,Ca.identity):Ca.isJSDate(h)?Ca.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)};ha.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 bl.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 bl.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=[ha.previousPromises,l,r.prepareFn,ha.rehover,ha.reselect,o],c=Ca.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}ha.doCalcdata=function(e,t){var r=Ap.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:xne,y:xne}]),S[0].t||(S[0].t={}),S[0].trace=a,u[E]=S}}for(Ane(r,n,i),s=0;s{"use strict";yb.xmlns="http://www.w3.org/2000/xmlns/";yb.svg="http://www.w3.org/2000/svg";yb.xlink="http://www.w3.org/1999/xlink";yb.svgAttrs={xmlns:yb.svg,"xmlns:xlink":yb.xlink}});var Nh=ye((Ftr,Rne)=>{"use strict";Rne.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 Ll=ye(b0=>{"use strict";var vh=xa(),Ty=Mr(),Vit=Ty.strTranslate,lO=Zp(),Hit=Nh().LINE_SPACING,Git=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Git),a=vh.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=int(e.node(),n);l&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};Xit(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 x=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,g=d.height;v.attr({class:o,height:g,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var E=e.node().style.fill||"black",k=v.select("g");k.attr({fill:E,stroke:E});var S=k.node().getBoundingClientRect(),L=S.width,_=S.height;(L>b||_>g)&&(v.style("overflow","hidden"),S=v.node().getBoundingClientRect(),L=S.width,_=S.height);var C=+e.attr("x"),M=+e.attr("y"),p=u||e.node().getBoundingClientRect().height,P=-p/4;if(o[0]==="y")x.attr({transform:"rotate("+[-90,C,M]+")"+Vit(-L/2,P-_/2)});else if(o[0]==="l")M=P-_/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-_/2}v.attr({x:C,y:M}),r&&r.call(e,x),l(x)})})):s(),e};var jit=/(<|<|<)/g,Wit=/(>|>|>)/g;function Zit(e){return e.replace(jit,"\\lt ").replace(Wit,"\\gt ")}var zne=[["$","$"],["\\(","\\)"]];function Xit(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Ty.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Ty.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:zne},displayAlign:"left"})},u=function(){a=Ty.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=zne},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 E="math-output-"+Ty.randstr({},64);s=vh.select("body").append("div").attr({id:E}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Zit(e));var k=s.node();return n===2?MathJax.Hub.Typeset(k):MathJax.typeset([k])},d=function(){var E=s.select(n===2?".MathJax_SVG":".MathJax"),k=!E.empty()&&s.select("svg").node();if(!k)Ty.log("There was an error in the tex syntax.",e),r();else{var S=k.getBoundingClientRect(),L;n===2?L=vh.select("body").select("#MathJax_SVG_glyphs"):L=E.select("defs"),r(E,L,S)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},x=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},g=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(),x(),g()}))}var Bne={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"},Yit={sub:"0.3em",sup:"-0.6em"},Kit={sub:"-0.21em",sup:"0.42em"},Fne="\u200B",qne=["http:","https:","mailto:","",void 0,":"],Nne=b0.NEWLINES=/(\r\n?|\n)/g,cO=/(<[^<>]*>)/,fO=/<(\/?)([^ >]*)(\s+(.*))?>/i,Jit=//i;b0.BR_TAG_ALL=//gi;var Une=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,Vne=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,Hne=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,$it=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function _b(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&W6(n)}var Qit=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(cO),s=[],l="",u=0,c=0;ca?s.push(f.substr(0,x-a)+i):s.push(f.substr(0,x));break}l=""}}return s.join("")};var ent={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},tnt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function W6(e){return e.replace(tnt,function(t,r){var n;return r.charAt(0)==="#"?n=rnt(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):n=ent[r],n||t})}b0.convertEntities=W6;function rnt(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 int(e,t){t=t.replace(Nne," ");var r=!1,n=[],i,a=-1;function o(){a++;var _=document.createElementNS(lO.svg,"tspan");vh.select(_).attr({class:"line",dy:a*Hit+"em"}),e.appendChild(_),i=_;var C=n;if(n=[{node:_}],C.length>1)for(var M=1;M.",t);return}var C=n.pop();_!==C.type&&Ty.log("Start tag <"+C.type+"> doesnt match end tag <"+_+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Jit.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(cO),h=0;h{"use strict";var nnt=xa(),X6=id(),ZS=uo(),Z6=Mr(),jne=va(),ant=sb().isValid;function ont(e,t,r){var n=t?Z6.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(Z6.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function Jne(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 Qne=Iq(),lnt=Qne.FORMAT_LINK,unt=Qne.DATE_FORMAT_LINK;function cnt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?hO:eae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function hO(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: "+lnt+"."].join(" ")}function eae(e,t){return hO(e,t)+[" And for dates see: "+unt+".","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(" ")}tae.exports={axisHoverFormat:cnt,descriptionOnlyNumbers:hO,descriptionWithDates:eae}});var Cd=ye((Ntr,yae)=>{"use strict";var rae=Su(),w3=dh(),mae=Ed().dash,vO=no().extendFlat,iae=Vs().templatedArray,nae=Oc().descriptionWithDates,fnt=es().ONEDAY,pm=ad(),hnt=pm.HOUR_PATTERN,dnt=pm.WEEKDAY_PATTERN,dO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},vnt=vO({},dO,{values:dO.values.slice().concat(["sync"])});function aae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var oae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},sae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},lae={valType:"data_array",editType:"ticks"},uae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function cae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function fae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var hae={valType:"color",dflt:w3.defaultLine,editType:"ticks"},dae={valType:"color",dflt:w3.lightLine,editType:"ticks"};function vae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var pae=vO({},mae,{editType:"ticks"}),gae={valType:"boolean",editType:"ticks"};yae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:rae({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"},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:iae("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:[dnt,hnt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:fnt},editType:"calc"}),tickmode:vnt,nticks:aae(),tick0:oae,dtick:sae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:lae,ticktext:{valType:"data_array",editType:"ticks"},ticks:uae,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:cae(),tickwidth:fae(),tickcolor:hae,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:vO({},mae,{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:rae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:nae("tick label")},tickformatstops:iae("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:nae("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:gae,gridcolor:dae,gridwidth:vae(),griddash:pae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:w3.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:dO,nticks:aae("minor"),tick0:oae,dtick:sae,tickvals:lae,ticks:uae,ticklen:cae("minor"),tickwidth:fae("minor"),tickcolor:hae,gridcolor:dae,gridwidth:vae("minor"),griddash:pae,showgrid:gae,editType:"ticks"},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 Y6=ye((Utr,bae)=>{"use strict";var Ac=Cd(),_ae=Su(),xae=no().extendFlat,pnt=Bu().overrideAll;bae.exports=pnt({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:Ac.linecolor,outlinewidth:Ac.linewidth,bordercolor:Ac.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Ac.minor.tickmode,nticks:Ac.nticks,tick0:Ac.tick0,dtick:Ac.dtick,tickvals:Ac.tickvals,ticktext:Ac.ticktext,ticks:xae({},Ac.ticks,{dflt:""}),ticklabeloverflow:xae({},Ac.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:Ac.ticklen,tickwidth:Ac.tickwidth,tickcolor:Ac.tickcolor,ticklabelstep:Ac.ticklabelstep,showticklabels:Ac.showticklabels,labelalias:Ac.labelalias,tickfont:_ae({}),tickangle:Ac.tickangle,tickformat:Ac.tickformat,tickformatstops:Ac.tickformatstops,tickprefix:Ac.tickprefix,showtickprefix:Ac.showtickprefix,ticksuffix:Ac.ticksuffix,showticksuffix:Ac.showticksuffix,separatethousands:Ac.separatethousands,exponentformat:Ac.exponentformat,minexponent:Ac.minexponent,showexponent:Ac.showexponent,title:{text:{valType:"string"},font:_ae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Kl=ye((Htr,Tae)=>{"use strict";var gnt=Y6(),mnt=n3().counter,ynt=X1(),wae=sb().scales,Vtr=ynt(wae);function K6(e){return"`"+e+"`"}Tae.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"?wae[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 "+K6(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",x=n+"max",b=n+"mid",g=K6(u+d),E=K6(u+v),k=K6(u+x),S=E+" and "+k,L={};L[v]=L[x]=void 0;var _={};_[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:_},C[x]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},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=gnt),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:mnt("coloraxis"),dflt:null,editType:"calc"}),C}});var gO=ye((Gtr,Aae)=>{"use strict";var _nt=no().extendFlat,xnt=Kl(),pO=sb().scales;Aae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:pO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:pO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:pO.RdBu,editType:"calc"}},coloraxis:_nt({_isSubplotObj:!0,editType:"calc"},xnt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var mO=ye((jtr,Sae)=>{"use strict";var bnt=Mr();Sae.exports=function(t){return bnt.isPlainObject(t.colorbar)}});var xO=ye(_O=>{"use strict";var yO=uo(),Mae=Mr(),Eae=es(),wnt=Eae.ONEDAY,Tnt=Eae.ONEWEEK;_O.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?wnt:1;if(!e)return a;if(yO(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.substr(1);return s=yO(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};_O.tick0=function(e,t,r,n){if(t==="date")return Mae.cleanDate(e,Mae.dateTick0(r,n%Tnt===0?1:0));if(!(n==="D1"||n==="D2"))return yO(e)?Number(e):0}});var xb=ye((Ztr,Cae)=>{"use strict";var kae=xO(),Ant=Mr().isArrayOrTypedArray,Snt=vv().isTypedArraySpec,Mnt=vv().decodeTypedArraySpec;Cae.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(E){var k=s[E];return Snt(k)&&(k=Mnt(k)),k!==void 0?k:(l._template||{})[E]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=Ant(d)?"array":h?"linear":"auto",x=n(u+"tickmode",v);if(x==="auto"||x==="sync")n(u+"nticks");else if(x==="linear"){var b=l.dtick=kae.dtick(h,i);l.tick0=kae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var g=n(u+"tickvals");g===void 0?l.tickmode="auto":o||n("ticktext")}}});var T3=ye((Xtr,Pae)=>{"use strict";var bO=Mr(),Lae=Cd();Pae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Lae.minor:Lae,u=a?"minor.":"",c=bO.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=bO.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=bO.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 wO=ye((Ytr,Iae)=>{"use strict";Iae.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Zd=ye((Ktr,Dae)=>{"use strict";var J6=Mr(),Ent=Vs();Dae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=J6.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=Ent.arrayTemplater(r,i,a),c,f;for(c=0;c{"use strict";var TO=Mr(),knt=va().contrast,Rae=Cd(),Cnt=wO(),Lnt=Zd();zae.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");TO.isPlainObject(o)||delete r.labelalias;var s=Cnt(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?knt(a.bgColor):c&&c!==Rae.color.dflt?c:u.color;if(TO.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");Lnt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Pnt}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function Pnt(e,t){function r(i,a){return TO.coerce(e,t,Rae.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var t_=ye(($tr,Fae)=>{"use strict";var Int=wO();Fae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=Int(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var AO=ye((Qtr,qae)=>{"use strict";var r_=Mr(),Dnt=Vs(),Rnt=xb(),znt=T3(),Fnt=e_(),qnt=t_(),Ont=Y6();qae.exports=function(t,r,n){var i=Dnt.newContainer(r,"colorbar"),a=t.colorbar||{};function o(T,F){return r_.coerce(a,i,Ont,T,F)}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"),x=o("xref"),b=v==="paper",g=x==="paper",E,k,S,L="left";f?(S="middle",L=g?"left":"right",E=g?1.02:1,k=.5):(S=b?"bottom":"top",L="center",E=.5,k=b?1.02:1),r_.coerce(a,i,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:E}},"x"),r_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:k}},"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 _=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",_.indexOf("inside")!==-1?"hide past domain":"hide past div"),Rnt(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};_.indexOf("inside")!==-1&&(M.bgColor="black"),qnt(a,i,o,"linear",M),Fnt(a,i,o,"linear",M),znt(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var p=i.showticklabels?i.tickfont:C,P=r_.extendFlat({},C,{family:p.family,size:r_.bigFont(p.size)});r_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var Uh=ye((err,Nae)=>{"use strict";var Oae=uo(),MO=Mr(),Bnt=mO(),Nnt=AO(),Bae=sb().isValid,Unt=ba().traceIs;function SO(e,t){var r=t.slice(0,t.length-1);return t?MO.nestedProperty(e,r).get()||{}:e}Nae.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=SO(t,o),c=SO(r,o),f=SO(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 x=Unt(r,"contour")&&MO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==x&&(b[0]=!1,MO.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[x,r,[h]];return}}var g=u[s+"min"],E=u[s+"max"],k=Oae(g)&&Oae(E)&&g{"use strict";var Uae=Mr(),Vnt=Vs(),Vae=gO(),Hnt=Uh();Hae.exports=function(t,r){function n(f,h){return Uae.coerce(t,r,Vae,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return Uae.coerce(a,o,Vae.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Vnt.newContainer(r,l,"coloraxis"),o._name=l,Hnt(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Gnt=Mr(),jnt=Rv().hasColorscale,Wnt=Rv().extractOpts;jae.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?Gnt.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Wnt(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 Zae=uo(),EO=Mr(),Znt=Rv().extractOpts;Xae.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?EO.nestedProperty(r,o).get():r,l=Znt(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return EO.aggNums(Math.min,null,a)},v=function(){return EO.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&Zae(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&Zae(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?x=i.colorscale.sequential:x=i.colorscale.sequentialminus,l._sync("colorscale",x)}}});var Mu=ye((nrr,Yae)=>{"use strict";var $6=sb(),A3=Rv();Yae.exports={moduleType:"component",name:"colorscale",attributes:Kl(),layoutAttributes:gO(),supplyLayoutDefaults:Gae(),handleDefaults:Uh(),crossTraceDefaults:Wae(),calc:zv(),scales:$6.scales,defaultScale:$6.defaultScale,getScale:$6.get,isValidScale:$6.isValid,hasColorscale:A3.hasColorscale,extractOpts:A3.extractOpts,extractScale:A3.extractScale,flipScale:A3.flipScale,makeColorScaleFunc:A3.makeColorScaleFunc,makeColorScaleFuncFromTrace:A3.makeColorScaleFuncFromTrace}});var lu=ye((arr,Jae)=>{"use strict";var Kae=Mr(),Xnt=vv().isTypedArraySpec;Jae.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 Kae.isPlainObject(t)&&(Kae.isArrayOrTypedArray(t.size)||Xnt(t.size))}}});var S3=ye((orr,$ae)=>{"use strict";var Ynt=uo();$ae.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 Ynt(l)&&l>0?Math.max(l,a):0}}});var rp=ye(pv=>{"use strict";var Qae=Mr();pv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};pv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{roe.exports=eat;var kO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Qnt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function eat(e){var t=[];return e.replace(Qnt,function(r,n,i){var a=n.toLowerCase();for(i=rat(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==kO[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var iat=XS(),Yn=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},ts="M0,0Z",ioe=Math.sqrt(2),i_=Math.sqrt(3),CO=Math.PI,LO=Math.cos,PO=Math.sin;loe.exports={circle:{n:0,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?is(t,r,i):i}},square:{n:1,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*1.3,2);return is(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.4,2),i=Yn(e*1.2,2);return is(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(rs(t))return ts;var n=Yn(e*.8/ioe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return is(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(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.951,2),i=Yn(e*.588,2),a=Yn(-e,2),o=Yn(e*-.309,2),s=Yn(e*.809,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e/2,2),a=Yn(e*i_/2,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e/2,2),a=Yn(e*i_/2,2);return is(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(rs(t))return ts;var n=Yn(e*.924,2),i=Yn(e*.383,2);return is(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(rs(t))return ts;var n=e*1.4,i=Yn(n*.225,2),a=Yn(n*.951,2),o=Yn(n*.363,2),s=Yn(n*.588,2),l=Yn(-n,2),u=Yn(n*-.309,2),c=Yn(n*.118,2),f=Yn(n*.809,2),h=Yn(n*.382,2);return is(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(rs(t))return ts;var n=Yn(e*.66,2),i=Yn(e*.38,2),a=Yn(e*.76,2);return is(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(rs(t))return ts;var n=Yn(e*i_*.8,2),i=Yn(e*.8,2),a=Yn(e*1.6,2),o=Yn(e*4,2),s="A "+o+","+o+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*i_*.8,2),i=Yn(e*.8,2),a=Yn(e*1.6,2),o=Yn(e*4,2),s="A "+o+","+o+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*1.1,2),i=Yn(e*2,2),a="A "+i+","+i+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*1.4,2),i=Yn(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*.7,2),i=Yn(e*1.4,2);return is(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*1.4,2),i=Yn(e*.7,2);return is(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e/ioe,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*1.3,2);return is(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(rs(t))return ts;var n=Yn(e*1.3,2),i=Yn(e*.65,2);return is(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(rs(t))return ts;var n=Yn(e*1.4,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*.85,2);return is(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(rs(t))return ts;var n=Yn(e/2,2),i=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.4,2);return is(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*1.4,2);return is(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(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(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(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(rs(t))return ts;var n=CO/2.5,i=2*e*LO(n),a=2*e*PO(n);return is(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(rs(t))return ts;var n=CO/4,i=2*e*LO(n),a=2*e*PO(n);return is(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function rs(e){return e===null}var noe,aoe,ooe,soe;function is(e,t,r){if((!e||e%360===0)&&!t)return r;if(ooe===e&&soe===t&&noe===r)return aoe;ooe=e,soe=t,noe=r;function n(b,g){var E=LO(b),k=PO(b),S=g[0],L=g[1]+(t||0);return[S*E-L*k,S*k+L*E]}for(var i=e/180*CO,a=0,o=0,s=iat(r),l="",u=0;u{"use strict";var od=xa(),du=Mr(),nat=du.numberFormat,Ab=uo(),qO=id(),eL=ba(),Xd=va(),aat=Mu(),KS=du.strTranslate,tL=Ll(),oat=Zp(),sat=Nh(),lat=sat.LINE_SPACING,_oe=N1().DESELECTDIM,uat=lu(),cat=S3(),fat=rp().appendArrayPointValue,na=Coe.exports={};na.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(Xd.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",IO(dat(c))),l&&e.style("text-shadow",l==="auto"?tL.makeTextShadow(Xd.contrast(a)):IO(l)),u&&e.style("text-decoration-line",IO(vat(u)))};function IO(e){return e==="none"?void 0:e}var hat={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function dat(e){return hat[e]}function vat(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}na.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};na.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};na.setRect=function(e,t,r,n,i){e.call(na.setPosition,t,r).call(na.setSize,n,i)};na.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Ab(i)&&Ab(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",KS(i,a));else return!1;return!0};na.translatePoints=function(e,t,r){e.each(function(n){var i=od.select(this);na.translatePoint(n,i,t,r)})};na.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};na.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=eL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){na.hideOutsideRangePoint(u,od.select(this),r,n,o,s)})})}};na.crispRound=function(e,t,r){return!t||!Ab(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};na.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||"";Xd.stroke(t,n||a.color),na.dashLine(t,s,o)};na.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||"";od.select(this).call(Xd.stroke,r||a.color).call(na.dashLine,s,o)})};na.dashLine=function(e,t,r){r=+r||0,t=na.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};na.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 xoe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&na.getPatternAttr(i.shape,0,"");if(o){var s=na.getPatternAttr(i.bgcolor,0,null),l=na.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,c=na.getPatternAttr(i.size,0,8),f=na.getPatternAttr(i.solidity,0,.3),h=t.uid;na.pattern(e,"point",r,h,o,c,f,void 0,i.fillmode,s,l,u)}else if(a&&a.type!=="none"){var d=a.type,v="scatterfill-"+t.uid;if(n&&(v="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var x,b;d==="horizontal"?(x={x:a.start,y:0},b={x:a.stop,y:0}):d==="vertical"&&(x={x:0,y:a.start},b={x:0,y:a.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.max[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.max[0].val:b.y,!0),e.call(Toe,r,v,"linear",a.colorscale,"fill",x,b,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(na.gradient,r,v,d,a.colorscale,"fill")}else t.fillcolor&&e.call(Xd.fill,t.fillcolor)}na.singleFillStyle=function(e,t){var r=od.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};xoe(e,i,t,!1)};na.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=od.select(this);n[0].trace&&xoe(i,n[0].trace,t,r)})};var coe=uoe();na.symbolNames=[];na.symbolFuncs=[];na.symbolBackOffs=[];na.symbolNeedLines={};na.symbolNoDot={};na.symbolNoFill={};na.symbolList=[];Object.keys(coe).forEach(function(e){var t=coe[e],r=t.n;na.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),na.symbolNames[r]=e,na.symbolFuncs[r]=t.f,na.symbolBackOffs[r]=t.backoff||0,t.needLine&&(na.symbolNeedLines[r]=!0),t.noDot?na.symbolNoDot[r]=!0:na.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(na.symbolNoFill[r]=!0)});var pat=na.symbolNames.length,gat="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";na.symbolNumber=function(e){if(Ab(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=na.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=pat||e>=400?0:Math.floor(Math.max(e,0))};function boe(e,t,r,n){var i=e%100;return na.symbolFuncs[i](t,r,n)+(e>=200?gat:"")}var foe=nat("~f"),woe={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}};na.gradient=function(e,t,r,n,i,a){var o=woe[n];return Toe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Toe(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=na.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=NO(e,r),f=BO(e,r);t.attr("d",boe(u,l,c,f))}var h=!1,d,v,x;if(e.so)x=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;x=(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=Xd.defaultLine:v=s.color,du.isArrayOrTypedArray(o.color)&&(d=Xd.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(Xd.stroke,d).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var g=o.gradient,E=e.mgt;E?h=!0:E=g&&g.type,du.isArrayOrTypedArray(E)&&(E=E[0],woe[E]||(E=0));var k=o.pattern,S=k&&na.getPatternAttr(k.shape,e.i,"");if(E&&E!=="none"){var L=e.mgc;L?h=!0:L=g.color;var _=r.uid;h&&(_+="-"+e.i),na.gradient(t,i,_,E,[[0,L],[1,d]],"fill")}else if(S){var C=!1,M=k.fgcolor;!M&&a&&a.color&&(M=a.color,C=!0);var p=na.getPatternAttr(M,e.i,a&&a.color||null),P=na.getPatternAttr(k.bgcolor,e.i,null),T=k.fgopacity,F=na.getPatternAttr(k.size,e.i,8),q=na.getPatternAttr(k.solidity,e.i,.3);C=C||e.mcc||du.isArrayOrTypedArray(k.shape)||du.isArrayOrTypedArray(k.bgcolor)||du.isArrayOrTypedArray(k.fgcolor)||du.isArrayOrTypedArray(k.size)||du.isArrayOrTypedArray(k.solidity);var V=r.uid;C&&(V+="-"+e.i),na.pattern(t,"point",i,V,S,F,q,e.mcc,k.fillmode,P,p,T)}else du.isArrayOrTypedArray(d)?Xd.fill(t,d[e.i]):Xd.fill(t,d);x&&Xd.stroke(t,v)}};na.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=na.tryColorscale(r,""),t.lineScale=na.tryColorscale(r,"line"),eL.traceIs(e,"symbols")&&(t.ms2mrc=uat.isBubble(e)?cat(e):function(){return(r.size||6)/2}),e.selectedpoints&&du.extendFlat(t,na.makeSelectedPointStyleFns(e)),t};na.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:_oe*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 x=i.size,b=a.size,g=o.size,E=b!==void 0,k=g!==void 0;return eL.traceIs(e,"symbols")&&(E||k)&&(t.selectedSizeFn=function(S){var L=S.mrc||x/2;return S.selected?E?b/2:L:k?g/2:L}),t};na.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:Xd.addOpacity(f,_oe))},t};na.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=na.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){Xd.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",boe(na.symbolNumber(s),l,NO(o,t),BO(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=od.select(this),s=0;s0?r:0}na.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=na.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=od.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={};fat(h,t,s.i);var d=t._meta||{};u=du.texttemplateString(u,f,o._d3locale,h,s,d)}var v=s.tp||t.textposition,x=Soe(s,t),b=n?n(s):s.tc||t.textfont.color;l.call(na.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:x,color:b}).text(u).call(tL.convertToTspans,r).call(Aoe,v,x,s.mrc)})}};na.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=na.makeSelectedTextStyleFns(t);e.each(function(n){var i=od.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Soe(n,t);Xd.fill(i,a);var l=eL.traceIs(t,"bar-like");Aoe(i,o,s,n.mrc2||n.mrc,l)})}};var hoe=.5;na.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}na.applyBackoff=koe;na.makeTester=function(){var e=du.ensureSingleById(od.select("body"),"svg","js-plotly-tester",function(r){r.attr(oat.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"})});na.tester=e,na.testref=t};na.savedBBoxes={};var RO=0,_at=1e4;na.bBox=function(e,t,r){r||(r=doe(e));var n;if(r){if(n=na.savedBBoxes[r],n)return du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=doe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=na.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=na.savedBBoxes[r],n)return du.extendFlat({},n)}}var u,c;t?u=e:(c=na.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),od.select(u).attr("transform",null).call(tL.positionText,0,0);var f=u.getBoundingClientRect(),h=na.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 RO>=_at&&(na.savedBBoxes={},RO=0),r&&(na.savedBBoxes[r]=d),RO++,du.extendFlat({},d)};function doe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}na.setClipUrl=function(e,t,r){e.attr("clip-path",OO(t,r))};function OO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}na.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}};na.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+=KS(t,r),o=o.trim(),e[a]("transform",o),o};na.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}};na.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 xat=/\s*sc.*/;na.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(xat,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var bat=/translate\([^)]*\)\s*$/;na.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=od.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(bat);t===1&&r===1?n=[]:n=[KS(o,s),"scale("+t+","+r+")",KS(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function BO(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}na.getMarkerStandoff=BO;var YS=Math.atan2,bb=Math.cos,E3=Math.sin;function voe(e,t){var r=t[0],n=t[1];return[r*bb(e)-n*E3(e),r*E3(e)+n*bb(e)]}var poe,goe,moe,yoe,zO,FO;function NO(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=YS(h[1]-i,h[0]-n),v=YS(f[1]-i,f[0]-n),x;if(a==="north")x=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,g=c/180*Math.PI,E=poe/180*Math.PI,k=goe/180*Math.PI,S=E-b,L=bb(k)*E3(S),_=E3(k)*bb(g)-bb(k)*E3(g)*bb(S);x=-YS(L,_)-Math.PI,poe=u,goe=c}var C=voe(d,[bb(x),0]),M=voe(v,[E3(x),0]);r=YS(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(FO===t.uid&&e.i===zO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(FO===t.uid&&e.i===zO+1&&Ab(n)&&Ab(i)){var p=n-moe,P=i-yoe,T=t.line&&t.line.shape||"",F=T.slice(T.length-1);F==="h"&&(P=0),F==="v"&&(p=0),r+=YS(P,p)/Math.PI*180+90}else r=null}return moe=n,yoe=i,zO=e.i,FO=t.uid,r}na.getMarkerAngle=NO});var Mb=ye((frr,Doe)=>{"use strict";var k3=xa(),wat=uo(),Tat=Yu(),UO=ba(),Sb=Mr(),Loe=Sb.strTranslate,rL=ao(),iL=va(),C3=Ll(),Poe=N1(),Aat=Nh().OPPOSITE_SIDE,Ioe=/ [XY][0-9]* /,VO=1.6,HO=1.6;function Sat(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(),x=!1,b=d&&d.font?d.font:{},g=b.family,E=b.size,k=b.color,S=b.weight,L=b.style,_=b.variant,C=b.textcase,M=b.lineposition,p=b.shadow,P=r.subtitlePropName,T=!!P,F=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},V=q.text.trim(),H=!1,X=1,G=q.font,N=G.family,W=G.size,re=G.color,ae=G.weight,_e=G.style,Me=G.variant,ke=G.textcase,ge=G.lineposition,ie=G.shadow,Te;a==="title.text"?Te="titleText":a.indexOf("axis")!==-1?Te="axisTitleText":a.indexOf("colorbar"!==-1)&&(Te="colorbarTitleText");var Ee=e._context.edits[Te];function Ae(kt,Ct){return kt===void 0||Ct===void 0?!1:kt.replace(Ioe," % ")===Ct.replace(Ioe," % ")}v===""?h=0:Ae(v,o)&&(Ee||(v=""),h=.2,x=!0),T&&(V===""?X=0:Ae(V,F)&&(Ee||(V=""),X=.2,H=!0)),r._meta?v=Sb.templateString(v,r._meta):n._meta&&(v=Sb.templateString(v,n._meta));var ze=v||V||Ee,Ce;f||(f=Sb.ensureSingle(n._infolayer,"g","g-"+t),Ce=n._hColorbarMoveTitle);var me=f.selectAll("text."+t).data(ze?[0]:[]);me.enter().append("text"),me.text(v).attr("class",t),me.exit().remove();var De=null,ce=t+"-subtitle",Ge=V||Ee;if(T&&Ge&&(De=f.selectAll("text."+ce).data(Ge?[0]:[]),De.enter().append("text"),De.text(V).attr("class",ce),De.exit().remove()),!ze)return f;function nt(kt,Ct){Sb.syncOrAsync([ct,qt],{title:kt,subtitle:Ct})}function ct(kt){var Ct=kt.title,Yt=kt.subtitle,xr;!c&&Ce&&(c={}),c?(xr="",c.rotate&&(xr+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Ce)&&(xr+=Loe(0,(c.offset||0)-(Ce||0)))):xr=null,Ct.attr("transform",xr);function er(Et){if(Et){var dt=k3.select(Et.node().parentNode).select("."+ce);if(!dt.empty()){var Ht=Et.node().getBBox();if(Ht.height){var $t=Ht.y+Ht.height+VO*W;dt.attr("y",$t)}}}}if(Ct.style("opacity",h*iL.opacity(k)).call(rL.font,{color:iL.rgb(k),size:k3.round(E,2),family:g,weight:S,style:L,variant:_,textcase:C,shadow:p,lineposition:M}).attr(u).call(C3.convertToTspans,e,er),Yt){var Ke=f.select("."+t+"-math-group"),xt=Ct.node().getBBox(),bt=Ke.node()?Ke.node().getBBox():void 0,Lt=bt?bt.y+bt.height+VO*W:xt.y+xt.height+HO*W,St=Sb.extendFlat({},u,{y:Lt});Yt.attr("transform",xr),Yt.style("opacity",X*iL.opacity(re)).call(rL.font,{color:iL.rgb(re),size:k3.round(W,2),family:N,weight:ae,style:_e,variant:Me,textcase:ke,shadow:ie,lineposition:ge}).attr(St).call(C3.convertToTspans,e)}return Tat.previousPromises(e)}function qt(kt){var Ct=kt.title,Yt=k3.select(Ct.node().parentNode);if(l&&l.selection&&l.side&&v){Yt.attr("transform",null);var xr=Aat[l.side],er=l.side==="left"||l.side==="top"?-1:1,Ke=wat(l.pad)?l.pad:2,xt=rL.bBox(Yt.node()),bt={t:0,b:0,l:0,r:0},Lt=e._fullLayout._reservedMargin;for(var St in Lt)for(var Et in Lt[St]){var dt=Lt[St][Et];bt[Et]=Math.max(bt[Et],dt)}var Ht={left:bt.l,top:bt.t,right:n.width-bt.r,bottom:n.height-bt.b},$t=l.maxShift||er*(Ht[l.side]-xt[l.side]),fr=0;if($t<0)fr=$t;else{var _r=l.offsetLeft||0,Br=l.offsetTop||0;xt.left-=_r,xt.right-=_r,xt.top-=Br,xt.bottom-=Br,l.selection.each(function(){var Nr=rL.bBox(this);Sb.bBoxIntersect(xt,Nr,Ke)&&(fr=Math.max(fr,er*(Nr[l.side]-xt[xr])+Ke))}),fr=Math.min($t,fr),i._titleScoot=Math.abs(fr)}if(fr>0||$t<0){var Or={left:[-fr,0],right:[fr,0],top:[0,-fr],bottom:[0,fr]}[l.side];Yt.attr("transform",Loe(Or[0],Or[1]))}}}me.call(nt,De);function rt(kt,Ct){kt.text(Ct).on("mouseover.opacity",function(){k3.select(this).transition().duration(Poe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k3.select(this).transition().duration(Poe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(v?me.on(".opacity",null):(rt(me,o),x=!0),me.call(C3.makeEditable,{gd:e}).on("edit",function(kt){s!==void 0?UO.call("_guiRestyle",e,a,kt,s):UO.call("_guiRelayout",e,a,kt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(nt)}).on("input",function(kt){this.text(kt||" ").call(C3.positionText,u.x,u.y)}),T)){if(T&&!v){var ot=me.node().getBBox(),Dt=ot.y+ot.height+HO*W;De.attr("y",Dt)}V?De.on(".opacity",null):(rt(De,F),H=!0),De.call(C3.makeEditable,{gd:e}).on("edit",function(kt){UO.call("_guiRelayout",e,"title.subtitle.text",kt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(nt)}).on("input",function(kt){this.text(kt||" ").call(C3.positionText,De.attr("x"),De.attr("y"))})}return me.classed("js-placeholder",x),De&&De.classed("js-placeholder",H),f}Doe.exports={draw:Sat,SUBTITLE_PADDING_EM:HO,SUBTITLE_PADDING_MATHJAX_EM:VO}});var ym=ye((hrr,Ooe)=>{"use strict";var Mat=xa(),Eat=e3().utcFormat,Nu=Mr(),kat=Nu.numberFormat,gm=uo(),n_=Nu.cleanNumber,Cat=Nu.ms2DateTime,Roe=Nu.dateTime2ms,mm=Nu.ensureNumber,zoe=Nu.isArrayOrTypedArray,a_=es(),nL=a_.FP_SAFE,bg=a_.BADNUM,Lat=a_.LOG_CLIP,Pat=a_.ONEWEEK,aL=a_.ONEDAY,oL=a_.ONEHOUR,Foe=a_.ONEMIN,qoe=a_.ONESEC,sL=af(),cL=ad(),lL=cL.HOUR_PATTERN,uL=cL.WEEKDAY_PATTERN;function JS(e){return Math.pow(10,e)}function GO(e){return e!=null}Ooe.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 _=t.range[0],C=t.range[1];return .5*(_+C-2*Lat*Math.abs(_-C))}else return bg}function o(S,L,_,C){if((C||{}).msUTC&&gm(S))return+S;var M=Roe(S,_||t.calendar);if(M===bg)if(gm(S)){S=+S;var p=Math.floor(Nu.mod(S+.05,1)*10),P=Math.round(S-p/10);M=Roe(new Date(P))+p/10}else return bg;return M}function s(S,L,_){return Cat(S,L,_||t.calendar)}function l(S){return t._categories[Math.round(S)]}function u(S){if(GO(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 bg}function c(S,L){for(var _=new Array(L),C=0;Ct.range[1]&&(_=!_);for(var C=_?-1:1,M=C*S,p=0,P=0;PF)p=P+1;else{p=M<(T+F)/2?P:P+1;break}}var q=t._B[p]||0;return isFinite(q)?v(S,t._m2,q):0},g=function(S){var L=t._rangebreaks.length;if(!L)return x(S,t._m,t._b);for(var _=0,C=0;Ct._rangebreaks[C].pmax&&(_=C+1);return x(S,t._m2,t._B[_])}}t.c2l=t.type==="log"?a:mm,t.l2c=t.type==="log"?JS:mm,t.l2p=b,t.p2l=g,t.c2p=t.type==="log"?function(S,L){return b(a(S,L))}:b,t.p2c=t.type==="log"?function(S){return JS(g(S))}:g,["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=g,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 JS(n_(S))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=JS,t.d2p=function(S,L){return t.l2p(t.d2r(S,L))},t.p2d=function(S){return JS(g(S))},t.r2p=function(S){return t.l2p(n_(S))},t.p2r=g,t.cleanPos=mm):t.type==="date"?(t.d2r=t.r2d=Nu.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,_){return t.l2p(o(S,0,_))},t.p2d=t.p2r=function(S,L,_){return s(g(S),L,_)},t.cleanPos=function(S){return Nu.cleanDate(S,bg,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(g(S))},t.r2p=t.d2p,t.p2r=g,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(g(S))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(S){return Array.isArray(S)||typeof S=="string"&&S!==""?S:mm(S)},t.setupMultiCategory=function(S){var L=t._traceIndices,_,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var p in M)if(p!==n){var P=r[sL.id2name(p)];L=L.concat(P._traceIndices)}}var T=[[0,{}],[0,{}]],F=[];for(_=0;_P[1]&&(C[p?0:1]=_),C[0]===C[1]){var T=t.l2r(L),F=t.l2r(_);if(L!==void 0){var q=T+1;_!==void 0&&(q=Math.min(q,F)),C[p?1:0]=q}if(_!==void 0){var V=F+1;L!==void 0&&(V=Math.max(V,T)),C[p?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 _=Nu.nestedProperty(t,S).get(),C,M;if(t.type==="date"?M=Nu.dfltRange(t.calendar):i==="y"?M=cL.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||cL.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!_||_.length!==2){Nu.nestedProperty(t,S).set(M);return}var p=_[0]===null,P=_[1]===null;for(t.type==="date"&&!t.autorange&&(_[0]=Nu.cleanDate(_[0],bg,t.calendar),_[1]=Nu.cleanDate(_[1],bg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!Nu.isDateTime(_[C],t.calendar)){t[S]=M;break}if(t.r2l(_[0])===t.r2l(_[1])){var T=Nu.constrain(t.r2l(_[0]),Nu.MIN_MS+1e3,Nu.MAX_MS-1e3);_[0]=t.l2r(T-1e3),_[1]=t.l2r(T+1e3);break}}else{if(!gm(_[C]))if(!(p||P)&&gm(_[1-C]))_[C]=_[1-C]*(C?10:.1);else{t[S]=M;break}if(_[C]<-nL?_[C]=-nL:_[C]>nL&&(_[C]=nL),_[0]===_[1]){var F=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=F,_[1]+=F}}},t.setScale=function(S){var L=r._size;if(t.overlaying){var _=sL.getFromId({_fullLayout:r},t.overlaying);t.domain=_.domain}var C=S&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var p=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/(p-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-p),t._b=-t._m*p),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var F,q;if(t._rangebreaks=t.locateBreaks(Math.min(p,P),Math.max(p,P)),t._rangebreaks.length){for(F=0;FP&&(V=!V),V&&t._rangebreaks.reverse();var H=V?-1:1;for(t._m2=H*t._length/(Math.abs(P-p)-t._lBreaks),t._B.push(-t._m2*(T?P:p)),F=0;FM&&(M+=7,pM&&(M+=24,p=C&&p=C&&S=ie.min&&(_eie.max&&(ie.max=Me),ke=!1)}ke&&P.push({min:_e,max:Me})}};for(_=0;_{"use strict";var Boe=uo(),jO=Mr(),Iat=es().BADNUM,fL=jO.isArrayOrTypedArray,Dat=jO.isDateTime,Rat=jO.cleanNumber,Noe=Math.round;Voe.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(fL(i)&&!i.length)return"-";if(!a&&Bat(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function Uoe(e){return Math.max(1,(e-1)/1e3)}function Oat(e,t){for(var r=e.length,n=Uoe(r),i=0,a=0,o={},s=0;si*2}function Bat(e){return fL(e[0])&&fL(e[1])}});var wg=ye((vrr,Koe)=>{"use strict";var Nat=xa(),Woe=uo(),o_=Mr(),hL=es().FP_SAFE,Uat=ba(),Vat=ao(),Zoe=af(),Hat=Zoe.getFromId,Gat=Zoe.isLinked;Koe.exports={applyAutorangeOptions:Yoe,getAutoRange:WO,makePadFn:ZO,doAutoRange:Wat,findExtremes:Zat,concatExtremes:KO};function WO(e,t){var r,n,i=[],a=e._fullLayout,o=ZO(a,t,0),s=ZO(a,t,1),l=KO(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=k-o(_)-s(C),P>S?T/P>L&&(M=_,p=C,L=T/P):T/k>L&&(M={val:_.val,nopad:1},p={val:C.val,nopad:1},L=T/k));function F(G,N){return Math.max(G,s(N))}if(f===h){var q=f-1,V=f+1;if(g)if(f===0)i=[0,1];else{var H=(f>0?c:u).reduce(F,0),X=f/(1-Math.min(.5,H/k));i=f>0?[0,X]:[X,0]}else E?i=[Math.max(0,q),Math.max(1,V)]:i=[q,V]}else g?(M.val>=0&&(M={val:0,nopad:1}),p.val<=0&&(p={val:0,nopad:1})):E&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),p.val<=0&&(p={val:1,nopad:1})),L=(p.val-M.val-Hoe(t,_.val,C.val))/(k-o(M)-s(p)),i=[M.val-L*o(M),p.val+L*s(p)];return i=Yoe(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function Hoe(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),_=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(E=1/0,k=-1/0,l)for(f=0;f0&&(E=h),h>k&&h-hL&&(E=h),h>k&&h=T;f--)P(f);return{min:n,max:i,opts:r}}function XO(e,t,r,n){Xoe(e,t,r,n,Xat)}function YO(e,t,r,n){Xoe(e,t,r,n,Yat)}function Xoe(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 joe(e){return Woe(e)&&Math.abs(e)=t}function Kat(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&dL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&dL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Jat(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&dL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&dL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function dL(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=Kat(r,t),n=Jat(n,t),[r,n]}});var Qa=ye((prr,yse)=>{"use strict";var w0=xa(),ph=uo(),P3=Yu(),QS=ba(),Vo=Mr(),I3=Vo.strTranslate,Eb=Ll(),$at=Mb(),eM=va(),Xp=ao(),Qat=Cd(),Joe=xO(),Yd=es(),eot=Yd.ONEMAXYEAR,gL=Yd.ONEAVGYEAR,mL=Yd.ONEMINYEAR,tot=Yd.ONEMAXQUARTER,eB=Yd.ONEAVGQUARTER,yL=Yd.ONEMINQUARTER,rot=Yd.ONEMAXMONTH,D3=Yd.ONEAVGMONTH,_L=Yd.ONEMINMONTH,Yp=Yd.ONEWEEK,Fv=Yd.ONEDAY,s_=Fv/2,xm=Yd.ONEHOUR,tM=Yd.ONEMIN,xL=Yd.ONESEC,iot=Yd.ONEMILLI,not=Yd.ONEMICROSEC,kb=Yd.MINUS_SIGN,TL=Yd.BADNUM,tB={K:"zeroline"},rB={K:"gridline",L:"path"},iB={K:"minor-gridline",L:"path"},lse={K:"tick",L:"path"},$oe={K:"tick",L:"text"},Qoe={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},AL=Nh(),$S=AL.MID_SHIFT,Cb=AL.CAP_SHIFT,rM=AL.LINE_SPACING,aot=AL.OPPOSITE_SIDE,bL=3,kn=yse.exports={};kn.setConvert=ym();var oot=L3(),Ay=af(),sot=Ay.idSort,lot=Ay.isLinked;kn.id2name=Ay.id2name;kn.name2id=Ay.name2id;kn.cleanId=Ay.cleanId;kn.list=Ay.list;kn.listIds=Ay.listIds;kn.getFromId=Ay.getFromId;kn.getFromTrace=Ay.getFromTrace;var use=wg();kn.getAutoRange=use.getAutoRange;kn.findExtremes=use.findExtremes;var uot=1e-4;function sB(e){var t=(e[1]-e[0])*uot;return[e[0]-t,e[1]+t]}kn.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},Vo.coerce(e,t,u,l)};kn.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};kn.coercePosition=function(e,t,r,n,i,a){var o,s,l=kn.getRefType(n);if(l!=="range")o=Vo.ensureNumber,s=r(i,a);else{var u=kn.getFromId(t,n);a=u.fraction2r(a),s=r(i,a),o=u.cleanPos}e[i]=o(s)};kn.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?Vo.ensureNumber:kn.getFromId(t,r).cleanPos;return n(e)};kn.redrawComponents=function(e,t){t=t||kn.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var l=QS.getComponentMethod(i,a),u={},c=0;c2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};kn.saveRangeInitial=function(e,t){for(var r=kn.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.substr(1));a.exactYears>o&&s%12===0?e=kn.tickIncrement(e,"M6","reverse")+Fv*1.5:a.exactMonths>o?e=kn.tickIncrement(e,"M1","reverse")+Fv*15.5:e-=s_;var l=kn.tickIncrement(e,r);if(l<=n)return l}return e}kn.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&ph(t._tmin),i;if(n){var a=kn.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Vo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Vo.simpleMap(i,t.l2r),e._isMinor=!0,kn.prepTicks(e,r),n){var s=ph(t.dtick),l=ph(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?JO(u,c)?u===2*Yp&&c===2*Fv&&(e.dtick=Yp):u===2*Yp&&c===3*Fv?e.dtick=Yp:u===Yp&&!(t._input.minor||{}).nticks?e.dtick=Fv:rse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":JO(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"?JO(u,c)||(e.dtick=rse(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 JO(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function rse(e,t){return Math.abs(e/t-1)<.001}kn.prepTicks=function(e,t){var r=Vo.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?Vo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Vo.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,kn.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>=mL?u>=mL&&u<=eot?f=u:f=gL:r===eB&&c>=yL?u>=yL&&u<=tot?f=u:f=eB:c>=_L?u>=_L&&u<=rot?f=u:f=D3:r===Yp&&c>=Yp?f=Yp:c>=Fv?f=Fv: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,x=0,b=0;bYp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}kn.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||Vo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Vo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(k?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 _=S?t:Vo.extendFlat({},t,t.minor);if(L?kn.prepMinorTicks(_,t,r):kn.prepTicks(_,r),_.tickmode==="array"){S?(b=[],v=ise(t,!L)):(g=[],x=ise(t,!L));continue}if(_.tickmode==="sync"){b=[],v=pot(t);continue}var C=sB(u),M=C[0],p=C[1],P=ph(_.dtick),T=n==="log"&&!(P||_.dtick.charAt(0)==="L"),F=kn.tickFirst(_,r);if(S){if(t._tmin=F,F=p:V<=p;V=kn.tickIncrement(V,G,c,i)){if(S&&H++,_.rangebreaks&&!c){if(V=h)break}if(b.length>d||V===q)break;q=V;var N={value:V};S?(T&&V!==(V|0)&&(N.simpleLabel=!0),a>1&&H%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,g.push(N))}}if(!g||g.length<2)l=!1;else{var W=(g[1].value-g[0].value)*(s?-1:1);Bot(W,t.tickformat)||(l=!1)}if(!l)E=b;else{var re=b.concat(g);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Dt,kt){return Dt.value-kt.value}).filter(function(Dt,kt,Ct){return kt===0||Dt.value!==Ct[kt-1].value});var ae=re.map(function(Dt,kt){return Dt.minor===void 0&&!Dt.skipLabel?kt:null}).filter(function(Dt){return Dt!==null});ae.forEach(function(Dt){l.map(function(kt){var Ct=Dt+kt;Ct>=0&&Ct-1;ze--){if(b[ze].drop){b.splice(ze,1);continue}b[ze].value=QO(b[ze].value,t);var ce=t.c2p(b[ze].value);(Ce?De>ce-me:Deh||Yth&&(Ct.periodX=h),Yti&&hgL)t/=gL,n=i(10),e.dtick="M"+12*_m(t,n,vL);else if(a>D3)t/=D3,e.dtick="M"+_m(t,1,nse);else if(a>Fv){if(e.dtick=_m(t,Fv,e._hasDayOfWeekBreaks?[1,2,7,14]:got),!r){var o=kn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Vo.dateTick0(e.calendar,2):e.tick0=Vo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,nse):a>tM?e.dtick=_m(t,tM,ase):a>xL?e.dtick=_m(t,xL,ase):(n=i(10),e.dtick=_m(t,n,vL))}else if(e.type==="log"){e.tick0=0;var l=Vo.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,vL)}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))):cB(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,mot)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,vL));if(e.dtick===0&&(e.dtick=1),!ph(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function dse(e){var t=e.dtick;if(e._tickexponent=0,!ph(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.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=Fv&&i<=10||t>=Fv*15)e._tickround="d";else if(t>=tM&&i<=16||t>=xm)e._tickround="M";else if(t>=xL&&i<=19||t>=tM)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(ph(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);ph(t)||(t=Number(t.substr(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&&(wL(e.exponentformat)&&!lB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}kn.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(ph(t))return Vo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.substr(1));if(a==="M")return Vo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?hse:fse,l=e+i*.01,u=Vo.roundUp(Vo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};kn.tickFirst=function(e,t){var r=e.r2l||Number,n=Vo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&g<=e._length?b:null};if(a&&Vo.isArrayOrTypedArray(e.ticktext)){var f=Vo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u"+s;else{var u=nM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function _ot(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=iM(Math.pow(10,o),e,i,n);else if(ph(a)||l==="D"&&Vo.mod(o+.01,1)<.1){var u=Math.round(o),c=Math.abs(u),f=e.exponentformat;f==="power"||wL(f)&&lB(u)?(u===0?t.text=1:u===1?t.text="10":t.text="10"+(u>1?"":kb)+c+"",t.fontSize*=1.25):(f==="e"||f==="E")&&c>2?t.text="1"+f+(u>0?"+":kb)+c:(t.text=iM(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=String(Math.round(Math.pow(10,Vo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var h=String(t.text).charAt(0);(h==="0"||h==="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 xot(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function bot(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 wot(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=iM(t.x,e,i,n)}function Tot(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=Aot(a);if(o[1]>=100)t.text=iM(Vo.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=kb+t.text)}}}else t.text=iM(t.x,e,i,n)}function Aot(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 Sot=["f","p","n","\u03BC","m","","k","M","G","T"];function wL(e){return e==="SI"||e==="B"}function lB(e){return e>14||e<-15}function iM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=kn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:ph(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};dse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,kb);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+v+"":o==="B"&&s===9?e+="B":wL(o)&&(e+=Sot[s/3+5])}return i?kb+e:e}kn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*D3}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 Vo.syncOrAsync(i.map(function(l){return function(){if(l){var u=kn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=kn.drawOne(e,u,r);return u._shiftPusher&&oB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Vo.simpleMap(u._r,u.r2l),c}}}))};kn.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=kn.counterLetter(u),h=l._plots[t._mainSubplot];if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),oB(t,d,n,!0),oB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Oot(t,n));var v=h[c+"axislayer"],x=t._mainLinePosition,b=x+=t._shift,g=t._mainMirrorPosition,E=t._vals=kn.calcTicks(t),k=[t.mirror,b,g].join("_");for(a=0;a0?Ct.bottom-Dt:0,kt))));var Ke=0,xt=0;if(t._shiftPusher&&(Ke=Math.max(kt,Ct.height>0?rt==="l"?Dt-Ct.left:Ct.right-Dt:0),t.title.text!==l._dfltTitle[c]&&(xt=(t._titleStandoff||0)+(t._titleScoot||0),rt==="l"&&(xt+=sse(t))),t._fullDepth=Math.max(Ke,xt)),t.automargin){Yt={x:0,y:0,r:0,l:0,t:0,b:0};var bt=[0,1],Lt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(rt==="b"?Yt[rt]=t._depth:(Yt[rt]=t._depth=Math.max(Ct.width>0?Dt-Ct.top:0,kt),bt.reverse()),Ct.width>0){var St=Ct.right-(t._offset+t._length);St>0&&(Yt.xr=1,Yt.r=St);var Et=t._offset-Ct.left;Et>0&&(Yt.xl=0,Yt.l=Et)}}else if(rt==="l"?(t._depth=Math.max(Ct.height>0?Dt-Ct.left:0,kt),Yt[rt]=t._depth-Lt):(t._depth=Math.max(Ct.height>0?Ct.right-Dt:0,kt),Yt[rt]=t._depth+Lt,bt.reverse()),Ct.height>0){var dt=Ct.bottom-(t._offset+t._length);dt>0&&(Yt.yb=0,Yt.b=dt);var Ht=t._offset-Ct.top;Ht>0&&(Yt.yt=1,Yt.t=Ht)}Yt[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[bt[0]],t.title.text!==l._dfltTitle[c]&&(Yt[rt]+=sse(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(xr={x:0,y:0,r:0,l:0,t:0,b:0},xr[ot]=t.linewidth,t.mirror&&t.mirror!==!0&&(xr[ot]+=kt),t.mirror===!0||t.mirror==="ticks"?xr[f]=t._anchorAxis.domain[bt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(xr[f]=[t._counterDomainMin,t._counterDomainMax][bt[1]]))}qt&&(er=QS.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(ose(Yt,t.automargin),ose(xr,t.automargin)),P3.autoMargin(e,uB(t),Yt),P3.autoMargin(e,gse(t),xr),P3.autoMargin(e,mse(t),er)}),Vo.syncOrAsync(nt)}};function ose(e,t){if(e){var r=Object.keys(Qoe).reduce(function(n,i){return t.indexOf(i)!==-1&&Qoe[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 Mot(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Vo.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 I3(i+e._offset+e.l2p(nB(h))+r,a+n)}:function(h){return I3(a+n,i+e._offset+e.l2p(nB(h))+r)}};function nB(e){return e.periodX!==void 0?e.periodX:e.x}function Lot(e){var t=e.ticklabelposition||"",r=function(d){return t.indexOf(d)!==-1},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=e.side,c=l?(e.tickwidth||0)/2:0,f=bL,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(c+=h*Cb,f+=(e.linewidth||0)/2),(i||a)&&(c+=(e.linewidth||0)/2,f+=bL),s&&u==="top"&&(f-=h*(1-Cb)),(i||n)&&(c=-c),(u==="bottom"||u==="right")&&(f=-f),[l?c:0,s?f:0]}kn.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};kn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(F){return n.indexOf(F)!==-1},a=i("top"),o=i("left"),s=i("right"),l=i("bottom"),u=l||o||a||s,c=i("inside"),f=n==="inside"&&e.ticks==="inside"||!c&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,v=f?e.ticklen:0;if(c?v*=-1:u&&(v=0),f&&(h+=v,r)){var x=Vo.deg2rad(r);h=v*Math.cos(x)+1,d=v*Math.sin(x)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(c?-1:1);var b={labelStandoff:h,labelShift:d},g,E,k,S,L=0,_=e.side,C=e._id.charAt(0),M=e.tickangle,p;if(C==="x")p=!c&&_==="bottom"||c&&_==="top",S=p?1:-1,c&&(S*=-1),g=d*S,E=t+h*S,k=p?1:-.2,Math.abs(M)===90&&(c?k+=$S:M===-90&&_==="bottom"?k=Cb:M===90&&_==="top"?k=$S:k=.5,L=$S/2*(M/90)),b.xFn=function(F){return F.dx+g+L*F.fontSize},b.yFn=function(F){return F.dy+E+F.fontSize*k},b.anchorFn=function(F,q){if(u){if(o)return"end";if(s)return"start"}return!ph(q)||q===0||q===180?"middle":q*S<0!==c?"end":"start"},b.heightFn=function(F,q,V){return q<-60||q>60?-.5*V:e.side==="top"!==c?-V:0};else if(C==="y"){if(p=!c&&_==="left"||c&&_==="right",S=p?1:-1,c&&(S*=-1),g=h,E=d*S,k=0,!c&&Math.abs(M)===90&&(M===-90&&_==="left"||M===90&&_==="right"?k=Cb:k=.5),c){var P=ph(M)?+M:0;if(P!==0){var T=Vo.deg2rad(P);L=Math.abs(Math.sin(T))*Cb*S,k=0}}b.xFn=function(F){return F.dx+t-(g+F.fontSize*k)*S+L*F.fontSize},b.yFn=function(F){return F.dy+E+F.fontSize*$S},b.anchorFn=function(F,q){return ph(q)&&Math.abs(q)===90?"middle":p?"end":"start"},b.heightFn=function(F,q,V){return e.side==="right"&&(q*=-1),q<-30?-V:q<30?-.5*V:0}}return b};function SL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}kn.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,SL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return eM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),ML(t,[lse]),a.attr("transform",r.transFn)};kn.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(g){return g.minor}):[],o=t.showgrid?r.vals.filter(function(g){return!g.minor}):[],s=r.counterAxis;if(s&&kn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;v--){var x=v?h:d;if(x){var b=x.selectAll("path."+n).data(v?o:a,SL);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(g){return eM.stroke(w0.select(this),g.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(g){return Xp.dashStyle(g.minor?t.minor.griddash:t.griddash,g.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(g){return(g.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}ML(t,[rB,iB])}};kn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=kn.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 sot(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(eM.stroke,t.zerolinecolor||eM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),ML(t,[tB])};kn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=r.cls||i+"tick",o=r.vals.filter(function(N){return N.text}),s=r.labelFns,l=r.secondary?0:t.tickangle,u=(t._prevTickAngles||{})[a],c=r.layer.selectAll("g."+a).data(t.showticklabels?o:[],SL),f=[];c.enter().append("g").classed(a,1).append("text").attr("text-anchor","middle").each(function(N){var W=w0.select(this),re=e._promises.length;W.call(Eb.positionText,s.xFn(N),s.yFn(N)).call(Xp.font,{family:N.font,size:N.fontSize,color:N.fontColor,weight:N.fontWeight,style:N.fontStyle,variant:N.fontVariant,textcase:N.fontTextcase,lineposition:N.fontLineposition,shadow:N.fontShadow}).text(N.text).call(Eb.convertToTspans,e),e._promises[re]?f.push(e._promises.pop().then(function(){h(W,l)})):h(W,l)}),ML(t,[$oe]),c.exit().remove(),r.repositionOnUpdate&&c.each(function(N){w0.select(this).select("text").call(Eb.positionText,s.xFn(N),s.yFn(N))});function h(N,W){N.each(function(re){var ae=w0.select(this),_e=ae.select(".text-math-group"),Me=s.anchorFn(re,W),ke=r.transFn.call(ae.node(),re)+(ph(W)&&+W!=0?" rotate("+W+","+s.xFn(re)+","+(s.yFn(re)-re.fontSize/2)+")":""),ge=Eb.lineCount(ae),ie=rM*re.fontSize,Te=s.heightFn(re,ph(W)?+W:0,(ge-1)*ie);if(Te&&(ke+=I3(0,Te)),_e.empty()){var Ee=ae.select("text");Ee.attr({transform:ke,"text-anchor":Me}),Ee.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Ae=Xp.bBox(_e.node()).width,ze=Ae*{end:-.5,start:.5}[Me];_e.attr("transform",ke+I3(ze,0))}})}t._adjustTickLabelsOverflow=function(){var N=t.ticklabeloverflow;if(!(!N||N==="allow")){var W=N.indexOf("hide")!==-1,re=t._id.charAt(0)==="x",ae=0,_e=re?e._fullLayout.width:e._fullLayout.height;if(N.indexOf("domain")!==-1){var Me=Vo.simpleMap(t.range,t.r2l);ae=t.l2p(Me[0])+t._offset,_e=t.l2p(Me[1])+t._offset}var ke=Math.min(ae,_e),ge=Math.max(ae,_e),ie=t.side,Te=1/0,Ee=-1/0;c.each(function(me){var De=w0.select(this),ce=De.select(".text-math-group");if(ce.empty()){var Ge=Xp.bBox(De.node()),nt=0;re?(Ge.right>ge||Ge.leftge||Ge.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+Me._id]?me.style("display","none"):ge.K==="tick"&&!ke&&me.style("display",null)})})})})},h(c,u+1?u:l);function d(){return f.length&&Promise.all(f)}var v=null;function x(){if(h(c,l),o.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){v=t.autotickangles[0];var N=0,W=[],re,ae=1;c.each(function(Ct){N=Math.max(N,Ct.fontSize);var Yt=t.l2p(Ct.x),xr=aB(this),er=Xp.bBox(xr.node());ae=Math.max(ae,Eb.lineCount(xr)),W.push({top:0,bottom:10,height:10,left:Yt-er.width/2,right:Yt+er.width/2+2,width:er.width+2})});var _e=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Me=o.length,ke=Math.abs((o[Me-1].x-o[0].x)*t._m)/(Me-1),ge=_e?ke/2:ke,ie=_e?t.ticklen:N*1.25*ae,Te=Math.sqrt(Math.pow(ge,2)+Math.pow(ie,2)),Ee=ge/Te,Ae=t.autotickangles.map(function(Ct){return Ct*Math.PI/180}),ze=Ae.find(function(Ct){return Math.abs(Math.cos(Ct))<=Ee});ze===void 0&&(ze=Ae.reduce(function(Ct,Yt){return Math.abs(Math.cos(Ct))H*V&&(T=V,M[C]=p[C]=F[C])}var X=Math.abs(T-P);X-S>0?(X-=S,S*=1+S/X):S=0,t._id.charAt(0)!=="y"&&(S=-S),M[_]=E.p2r(E.r2p(p[_])+L*S),E.autorange==="min"||E.autorange==="max reversed"?(M[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange==="max"||E.autorange==="min reversed")&&(M[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+".range"]=M}var G=Vo.syncOrAsync(b);return G&&G.then&&e._promises.push(G),G};function Pot(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,SL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(eM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}kn.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 sse(e){var t=e.title.font.size,r=(e.title.text.match(Eb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Cb+r*rM):r?t*(r+1)*rM:t}function Iot(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Eb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Cb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*($S+s*rM));else{var l=nM(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=kn.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 x=t._selections[t._id+"tick"];if(v={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var b=Xp.getTranslate(x.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,$at.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"}})}kn.shouldShowZeroLine=function(e,t,r){var n=Vo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===TL)&&(pse(t,0)||!Dot(e,t,r,n)||Rot(e,t))};kn.clipEnds=function(e,t){return t.filter(function(r){return pse(e,r.x)})};function pse(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=not:/%L/.test(t)?e>=iot:/%[SX]/.test(t)?e>=xL:/%M/.test(t)?e>=tM:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=Fv:/%[UVW]/.test(t)?e>=Yp:/%[Bbm]/.test(t)?e>=_L:/%[q]/.test(t)?e>=yL:/%[Yy]/.test(t)?e>=mL:!0}});var fB=ye((grr,_se)=>{"use strict";_se.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 hB=ye((mrr,xse)=>{"use strict";var Not=fB();xse.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&&(Not(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var wse=ye((yrr,bse)=>{var Uot={left:0,top:0};bse.exports=Vot;function Vot(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=Hot(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Hot(e){return e===window||e===document||e===document.body?Uot:e.getBoundingClientRect()}});var EL=ye((_rr,Tse)=>{"use strict";var Got=Yq();function jot(){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}Tse.exports=Got&&jot()});var Sse=ye((xrr,Ase)=>{"use strict";Ase.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 kse=ye((brr,Ese)=>{"use strict";var Mse=Mr(),Wot=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Ese.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Mse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Mse.constrain(Math.floor(r*3),0,2),Wot[r][t]}});var Lse=ye((wrr,Cse)=>{"use strict";var Zot=g3(),Xot=L6(),Yot=RS().getGraphDiv,Kot=IS(),dB=Cse.exports={};dB.wrapped=function(e,t,r){e=Yot(e),e._fullLayout&&Xot.clear(e._fullLayout._uid+Kot.HOVERID),dB.raw(e,t,r)};dB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Zot.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 gv=ye((Trr,Dse)=>{"use strict";var Jot=wse(),vB=Jq(),$ot=EL(),Qot=Mr().removeElement,est=ad(),Lb=Dse.exports={};Lb.align=Sse();Lb.getCursor=kse();var Pse=Lse();Lb.unhover=Pse.wrapped;Lb.unhoverRaw=Pse.raw;Lb.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,$ot?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(k,S,L){return Math.abs(k)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(n,f),!d){var S;try{S=new MouseEvent("click",k)}catch(_){var L=pB(k);S=document.createEvent("MouseEvents"),S.initMouseEvent("click",k.bubbles,k.cancelable,k.view,k.detail,k.screenX,k.screenY,L[0],L[1],k.ctrlKey,k.altKey,k.shiftKey,k.metaKey,k.button,k.relatedTarget)}h.dispatchEvent(S)}r._dragging=!1,r._dragged=!1}};function Ise(){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}Lb.coverSlip=Ise;function pB(e){return Jot(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Tg=ye((Arr,Rse)=>{"use strict";Rse.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 qse=ye((Srr,Fse)=>{"use strict";var gB=Tg(),aM="data-savedcursor",zse="!!";Fse.exports=function(t,r){var n=t.attr(aM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var mB=Su(),tst=dh();Ose.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:tst.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:mB({editType:"legend"}),grouptitlefont:mB({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:mB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var CL=ye(kL=>{"use strict";kL.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};kL.isVertical=function(t){return t.orientation!=="h"};kL.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var bB=ye((krr,Bse)=>{"use strict";var _B=ba(),Kp=Mr(),rst=Vs(),ist=vl(),nst=yB(),ast=s3(),xB=CL();function ost(e,t,r,n){var i=t[e]||{},a=rst.newContainer(r,e);function o(G,N){return Kp.coerce(i,a,nst,G,N)}var s=Kp.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var l=o("visible");if(l){for(var u,c=function(G,N){var W=u._input,re=u;return Kp.coerce(W,re,ist,G,N)},f=r.font||{},h=Kp.coerceFont(o,"grouptitlefont",f,{overrideDflt:{size:Math.round(f.size*1.1)}}),d=0,v=!1,x="normal",b=(r.shapes||[]).filter(function(G){return G.showlegend}),g=n.concat(b).filter(function(G){return e===(G.legend||"legend")}),E=0;E(e==="legend"?1:0));if(S===!1&&(r[e]=void 0),!(S===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),S!==!1)){o("borderwidth");var L=o("orientation"),_=o("yref"),C=o("xref"),M=L==="h",p=_==="paper",P=C==="paper",T,F,q,V="left";M?(T=0,_B.getComponentMethod("rangeslider","isVisible")(t.xaxis)?p?(F=1.1,q="bottom"):(F=1,q="top"):p?(F=-.1,q="top"):(F=0,q="bottom")):(F=1,q="auto",P?T=1.02:(T=1,V="right")),Kp.coerce(i,a,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:T}},"x"),Kp.coerce(i,a,{y:{valType:"number",editType:"legend",min:p?-2:0,max:p?3:1,dflt:F}},"y"),o("traceorder",x),xB.isGrouped(r[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",V),o("yanchor",q),o("valign"),Kp.noneOrAll(i,a,["x","y"]);var H=o("title.text");if(H){o("title.side",M?"left":"top");var X=Kp.extendFlat({},s,{size:Kp.bigFont(s.size)});Kp.coerceFont(o,"title.font",X)}}}}Bse.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var R3=ba(),TB=Mr(),sst=TB.pushUnique,wB=!0;Nse.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"&&wB&&r.data&&r._context.showTips&&TB.notifier(TB._(r,"Double-click on legend to isolate one trace"),"long"),wB=!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(Dt){return Dt.showlegend}),v=h.concat(d),x=f.trace;x._isShape&&(x=x._fullInput);var b=x.legendgroup,g,E,k,S,L,_,C={},M=[],p=[],P=[];function T(Dt,kt){var Ct=M.indexOf(Dt),Yt=C.visible;return Yt||(Yt=C.visible=[]),M.indexOf(Dt)===-1&&(M.push(Dt),Ct=M.length-1),Yt[Ct]=kt,Ct}var F=(i.shapes||[]).map(function(Dt){return Dt._input}),q=!1;function V(Dt,kt){F[Dt].visible=kt,q=!0}function H(Dt,kt){if(!(f.groupTitle&&!u)){var Ct=Dt._fullInput||Dt,Yt=Ct._isShape,xr=Ct.index;xr===void 0&&(xr=Ct._index);var er=Ct.visible===!1?!1:kt;Yt?V(xr,er):T(xr,er)}}var X=x.legend,G=x._fullInput,N=G&&G._isShape;if(!N&&R3.traceIs(x,"pie-like")){var W=f.label,re=c.indexOf(W);if(l==="toggle")re===-1?c.push(W):c.splice(re,1);else if(l==="toggleothers"){var ae=re!==-1,_e=[];for(g=0;g{"use strict";Vse.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var jse=ye((Prr,Gse)=>{"use strict";var Hse=ba(),SB=CL();Gse.exports=function(t,r,n){var i=r._inHover,a=SB.isGrouped(r),o=SB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function x(G,N,W){if(r.visible!==!1&&!(n&&G!==r._id))if(N===""||!SB.isGrouped(r)){var re="~~i"+f;l.push(re),s[re]=[W],f++}else l.indexOf(N)===-1?(l.push(N),u=!0,s[N]=[W]):s[N].push(W)}for(d=0;dP&&(p=P)}C[d][0]._groupMinRank=p,C[d][0]._preGroupSort=d}var T=function(G,N){return G[0]._groupMinRank-N[0]._groupMinRank||G[0]._preGroupSort-N[0]._preGroupSort},F=function(G,N){return G.trace.legendrank-N.trace.legendrank||G._preSort-N._preSort};for(C.forEach(function(G,N){G[0]._preGroupSort=N}),C.sort(T),d=0;d{"use strict";var LL=Mr();function Wse(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Pb.formatPiePercent=function(t,r){var n=Wse((t*100).toPrecision(3));return LL.numSeparate(n,r)+"%"};Pb.formatPieValue=function(t,r){var n=Wse(t.toPrecision(10));return LL.numSeparate(n,r)};Pb.getFirstFilled=function(t,r){if(LL.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var lst=ao(),ust=va();Zse.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?lst.pointStyle(t,n,i,r):ust.fill(t,r.color)}});var z3=ye((Rrr,Jse)=>{"use strict";var Yse=va(),Kse=l_().castOption,cst=Xse();Jse.exports=function(t,r,n,i){var a=n.marker.line,o=Kse(a.color,r.pts)||Yse.defaultLine,s=Kse(a.width,r.pts)||0;t.call(cst,r,n,i).style("stroke-width",s).call(Yse.stroke,o)}});var CB=ye((zrr,ile)=>{"use strict";var qv=xa(),MB=ba(),mv=Mr(),$se=mv.strTranslate,ip=ao(),T0=va(),EB=Rv().extractOpts,PL=lu(),fst=z3(),hst=l_().castOption,dst=AB(),Qse=12,ele=5,Ib=2,vst=10,F3=5;ile.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+dst.itemGap*2)/2,l=$se(s,0),u=function(C,M,p,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,p)};t.each(function(C){var M=qv.select(this),p=mv.ensureSingle(M,"g","layers");p.style("opacity",C[0].trace.opacity);var P=n.indentation,T=n.valign,F=C[0].lineHeight,q=C[0].height;if(T==="middle"&&P===0||!F||!q)p.attr("transform",null);else{var V={top:1,bottom:-1}[T],H=V*(.5*(F-q+3))||0,X=n.indentation;p.attr("transform",$se(X,H))}var G=p.selectAll("g.legendfill").data([C]);G.enter().append("g").classed("legendfill",!0);var N=p.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var W=p.selectAll("g.legendsymbols").data([C]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(_).each(h).each(v).each(d).each(b).each(S).each(k).each(c).each(f).each(g).each(E);function c(C){var M=tle(C),p=M.showFill,P=M.showLine,T=M.showGradientLine,F=M.showGradientFill,q=M.anyFill,V=M.anyLine,H=C[0],X=H.trace,G,N,W=EB(X),re=W.colorscale,ae=W.reversescale,_e=function(Ae){if(Ae.size())if(p)ip.fillGroupStyle(Ae,r,!0);else{var ze="legendfill-"+X.uid;ip.gradient(Ae,r,ze,kB(ae),re,"fill")}},Me=function(Ae){if(Ae.size()){var ze="legendline-"+X.uid;ip.lineGroupStyle(Ae),ip.gradient(Ae,r,ze,kB(ae),re,"stroke")}},ke=PL.hasMarkers(X)||!q?"M5,0":V?"M5,-2":"M5,-3",ge=qv.select(this),ie=ge.select(".legendfill").selectAll("path").data(p||F?[C]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",ke+"h"+o+"v6h-"+o+"z").call(_e),P||T){var Te=u(void 0,X.line,vst,ele);N=mv.minExtend(X,{line:{width:Te}}),G=[mv.minExtend(H,{trace:N})]}var Ee=ge.select(".legendlines").selectAll("path").data(P||T?[G]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",ke+(T?"l"+o+",0.0001":"h"+o)).call(P?ip.lineGroupStyle:Me)}function f(C){var M=tle(C),p=M.anyFill,P=M.anyLine,T=M.showLine,F=M.showMarker,q=C[0],V=q.trace,H=!F&&!P&&!p&&PL.hasText(V),X,G;function N(ie,Te,Ee,Ae){var ze=mv.nestedProperty(V,ie).get(),Ce=mv.isArrayOrTypedArray(ze)&&Te?Te(ze):ze;if(a&&Ce&&Ae!==void 0&&(Ce=Ae),Ee){if(CeEe[1])return Ee[1]}return Ce}function W(ie){return q._distinct&&q.index&&ie[q.index]?ie[q.index]:ie[0]}if(F||H||T){var re={},ae={};if(F){re.mc=N("marker.color",W),re.mx=N("marker.symbol",W),re.mo=N("marker.opacity",mv.mean,[.2,1]),re.mlc=N("marker.line.color",W),re.mlw=N("marker.line.width",mv.mean,[0,5],Ib),ae.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",mv.mean,[2,16],Qse);re.ms=_e,ae.marker.size=_e}T&&(ae.line={width:N("line.width",W,[0,10],ele)}),H&&(re.tx="Aa",re.tp=N("textposition",W),re.ts=10,re.tc=N("textfont.color",W),re.tf=N("textfont.family",W),re.tw=N("textfont.weight",W),re.ty=N("textfont.style",W),re.tv=N("textfont.variant",W),re.tC=N("textfont.textcase",W),re.tE=N("textfont.lineposition",W),re.tS=N("textfont.shadow",W)),X=[mv.minExtend(q,re)],G=mv.minExtend(V,ae),G.selectedpoints=null,G.texttemplate=null}var Me=qv.select(this).select("g.legendpoints"),ke=Me.selectAll("path.scatterpts").data(F?X:[]);ke.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),ke.exit().remove(),ke.call(ip.pointStyle,G,r),F&&(X[0].mrc=3);var ge=Me.selectAll("g.pointtext").data(H?X:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),ge.exit().remove(),ge.selectAll("text").call(ip.textPointStyle,G,r)}function h(C){var M=C[0].trace,p=M.type==="waterfall";if(C[0]._distinct&&p){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,x(C,this,"waterfall")}var T=[];M.visible&&p&&(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 F=qv.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(T);F.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),F.exit().remove(),F.each(function(q){var V=qv.select(this),H=M[q[0]].marker,X=u(void 0,H.line,F3,Ib);V.attr("d",q[1]).style("stroke-width",X+"px").call(T0.fill,H.color),X&&V.call(T0.stroke,H.line.color)})}function d(C){x(C,this)}function v(C){x(C,this,"funnel")}function x(C,M,p){var P=C[0].trace,T=P.marker||{},F=T.line||{},q=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=p?P.visible&&P.type===p:MB.traceIs(P,"bar"),H=qv.select(M).select("g.legendpoints").selectAll("path.legend"+p).data(V?[C]:[]);H.enter().append("path").classed("legend"+p,!0).attr("d",q).attr("transform",l),H.exit().remove(),H.each(function(X){var G=qv.select(this),N=X[0],W=u(N.mlw,T.line,F3,Ib);G.style("stroke-width",W+"px");var re=N.mcc;if(!n._inHover&&"mc"in N){var ae=EB(T),_e=ae.mid;_e===void 0&&(_e=(ae.max+ae.min)/2),re=ip.tryColorscale(T,"")(_e)}var Me=re||N.mc||T.color,ke=T.pattern,ge=ke&&ip.getPatternAttr(ke.shape,0,"");if(ge){var ie=ip.getPatternAttr(ke.bgcolor,0,null),Te=ip.getPatternAttr(ke.fgcolor,0,null),Ee=ke.fgopacity,Ae=rle(ke.size,8,10),ze=rle(ke.solidity,.5,1),Ce="legend-"+P.uid;G.call(ip.pattern,"legend",r,Ce,ge,Ae,ze,re,ke.fillmode,ie,Te,Ee)}else G.call(T0.fill,Me);W&&T0.stroke(G,N.mlc||F.color)})}function b(C){var M=C[0].trace,p=qv.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&MB.traceIs(M,"box-violin")?[C]:[]);p.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),p.exit().remove(),p.each(function(){var P=qv.select(this);if((M.boxpoints==="all"||M.points==="all")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var T=mv.minExtend(M,{marker:{size:a?Qse:mv.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});p.call(ip.pointStyle,T,r)}else{var F=u(void 0,M.line,F3,Ib);P.style("stroke-width",F+"px").call(T0.fill,M.fillcolor),F&&T0.stroke(P,M.line.color)}})}function g(C){var M=C[0].trace,p=qv.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);p.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),p.exit().remove(),p.each(function(P,T){var F=qv.select(this),q=M[T?"increasing":"decreasing"],V=u(void 0,q.line,F3,Ib);F.style("stroke-width",V+"px").call(T0.fill,q.fillcolor),V&&T0.stroke(F,q.line.color)})}function E(C){var M=C[0].trace,p=qv.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);p.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),p.exit().remove(),p.each(function(P,T){var F=qv.select(this),q=M[T?"increasing":"decreasing"],V=u(void 0,q.line,F3,Ib);F.style("fill","none").call(ip.dashLine,q.line.dash,V),V&&T0.stroke(F,q.line.color)})}function k(C){L(C,this,"pie")}function S(C){L(C,this,"funnelarea")}function L(C,M,p){var P=C[0],T=P.trace,F=p?T.visible&&T.type===p:MB.traceIs(T,p),q=qv.select(M).select("g.legendpoints").selectAll("path.legend"+p).data(F?[C]:[]);if(q.enter().append("path").classed("legend"+p,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),q.exit().remove(),q.size()){var V=T.marker||{},H=u(hst(V.line.width,P.pts),V.line,F3,Ib),X="pieLike",G=mv.minExtend(T,{marker:{line:{width:H}}},X),N=mv.minExtend(P,{trace:G},X);fst(q,N,G,r)}}function _(C){var M=C[0].trace,p,P=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],p=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],p=!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"]],p="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"]],p=!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"]],p=!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"]],p=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],p=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],p=!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"]],p=!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(F,q){var V=qv.select(this),H=EB(M),X=H.colorscale,G=H.reversescale,N=function(_e){if(_e.size()){var Me="legendfill-"+M.uid;ip.gradient(_e,r,Me,kB(G,p==="radial"),X,"fill")}},W;if(X){if(!p){var ae=X.length;W=q===0?X[G?ae-1:0][1]:q===1?X[G?0:ae-1][1]:X[Math.floor((ae-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;W=mv.isArrayOrTypedArray(re)?re[q]||re[0]:re}V.attr("d",F[0]),W?V.call(T0.fill,W):V.call(N)})}};function kB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function tle(e){var t=e[0].trace,r=t.contours,n=PL.hasLines(t),i=PL.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 rle(e,t,r){return e&&mv.isArrayOrTypedArray(e)?t:e>r?r:e}});var DB=ye((Frr,dle)=>{"use strict";var Sp=xa(),gh=Mr(),PB=Yu(),B3=ba(),nle=g3(),LB=gv(),mh=ao(),DL=va(),Db=Ll(),ale=Use(),Vh=AB(),IB=Nh(),fle=IB.LINE_SPACING,O3=IB.FROM_TL,ole=IB.FROM_BR,sle=jse(),pst=CB(),lle=CL(),q3=1,gst=/^legend[0-9]*$/;dle.exports=function(t,r){if(r)ule(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=Sp.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(gst)&&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(),PB.autoMargin(e,i);var x=gh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=gh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),g=gh.ensureSingle(x,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});g.call(DL.stroke,r.bordercolor).call(DL.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var E=gh.ensureSingle(x,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var S;k.text?(S=gh.ensureSingle(E,"text",i+"titletext"),S.attr("text-anchor","start").call(mh.font,k.font).text(k.text),RL(S,E,e,r,q3)):E.selectAll("."+i+"titletext").remove();var L=gh.ensureSingle(x,"rect","scrollbar",function(M){M.attr(Vh.scrollBarEnterAttrs).call(DL.fill,Vh.scrollBarColor)}),_=E.selectAll("g.groups").data(l);_.enter().append("g").attr("class","groups"),_.exit().remove();var C=_.selectAll("g.traces").data(gh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){var p=M[0].trace;return B3.traceIs(p,"pie-like")?v.indexOf(M[0].label)!==-1?.5:1:p.visible==="legendonly"?.5:1}).each(function(){Sp.select(this).call(yst,e,r)}).call(pst,e,r).each(function(){s||Sp.select(this).call(_st,e,i)}),gh.syncOrAsync([PB.previousPromises,function(){return wst(e,_,C,r)},function(){var M=n._size,p=r.borderwidth,P=r.xref==="paper",T=r.yref==="paper";if(k.text&&mst(S,r,p),!s){var F,q;P?F=M.l+M.w*r.x-O3[zL(r)]*r._width:F=n.width*r.x-O3[zL(r)]*r._width,T?q=M.t+M.h*(1-r.y)-O3[FL(r)]*r._effHeight:q=n.height*(1-r.y)-O3[FL(r)]*r._effHeight;var V=Tst(e,i,F,q);if(V)return;if(n.margin.autoexpand){var H=F,X=q;F=P?gh.constrain(F,0,n.width-r._width):H,q=T?gh.constrain(q,0,n.height-r._effHeight):X,F!==H&&gh.log("Constrain "+i+".x to make legend fit inside graph"),q!==X&&gh.log("Constrain "+i+".y to make legend fit inside graph")}mh.setTranslate(x,F,q)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var G=r._effHeight;s&&(G=r._height),g.attr({width:r._width-p,height:G-p,x:p/2,y:p/2}),mh.setTranslate(E,0,0),b.select("rect").attr({width:r._width-2*p,height:G-2*p,x:p,y:p}),mh.setClipUrl(E,a,e),mh.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(Vh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),W=r._effHeight-N-2*Vh.scrollBarMargin,re=r._height-r._effHeight,ae=W/re,_e=Math.min(r._scrollY||0,re);g.attr({width:r._width-2*p+Vh.scrollBarWidth+Vh.scrollBarMargin,height:r._effHeight-p,x:p/2,y:p/2}),b.select("rect").attr({width:r._width-2*p+Vh.scrollBarWidth+Vh.scrollBarMargin,height:r._effHeight-2*p,x:p,y:p+_e}),mh.setClipUrl(E,a,e),ze(_e,N,ae),x.on("wheel",function(){_e=gh.constrain(r._scrollY+Sp.event.deltaY/W*re,0,re),ze(_e,N,ae),_e!==0&&_e!==re&&Sp.event.preventDefault()});var Me,ke,ge,ie=function(Ge,nt,ct){var qt=(ct-nt)/ae+Ge;return gh.constrain(qt,0,re)},Te=function(Ge,nt,ct){var qt=(nt-ct)/ae+Ge;return gh.constrain(qt,0,re)},Ee=Sp.behavior.drag().on("dragstart",function(){var Ge=Sp.event.sourceEvent;Ge.type==="touchstart"?Me=Ge.changedTouches[0].clientY:Me=Ge.clientY,ge=_e}).on("drag",function(){var Ge=Sp.event.sourceEvent;Ge.buttons===2||Ge.ctrlKey||(Ge.type==="touchmove"?ke=Ge.changedTouches[0].clientY:ke=Ge.clientY,_e=ie(ge,Me,ke),ze(_e,N,ae))});L.call(Ee);var Ae=Sp.behavior.drag().on("dragstart",function(){var Ge=Sp.event.sourceEvent;Ge.type==="touchstart"&&(Me=Ge.changedTouches[0].clientY,ge=_e)}).on("drag",function(){var Ge=Sp.event.sourceEvent;Ge.type==="touchmove"&&(ke=Ge.changedTouches[0].clientY,_e=Te(ge,Me,ke),ze(_e,N,ae))});E.call(Ae)}function ze(Ge,nt,ct){r._scrollY=e._fullLayout[i]._scrollY=Ge,mh.setTranslate(E,0,-Ge),mh.setRect(L,r._width,Vh.scrollBarMargin+Ge*ct,Vh.scrollBarWidth,nt),b.select("rect").attr("y",p+Ge)}if(e._context.edits.legendPosition){var Ce,me,De,ce;x.classed("cursor-move",!0),LB.init({element:x.node(),gd:e,prepFn:function(Ge){if(Ge.target!==L.node()){var nt=mh.getTranslate(x);De=nt.x,ce=nt.y}},moveFn:function(Ge,nt){if(De!==void 0&&ce!==void 0){var ct=De+Ge,qt=ce+nt;mh.setTranslate(x,ct,qt),Ce=LB.align(ct,r._width,M.l,M.l+M.w,r.xanchor),me=LB.align(qt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Ce!==void 0&&me!==void 0){var Ge={};Ge[i+".x"]=Ce,Ge[i+".y"]=me,B3.call("_guiRelayout",e,Ge)}},clickFn:function(Ge,nt){var ct=o.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return nt.clientX>=qt.left&&nt.clientX<=qt.right&&nt.clientY>=qt.top&&nt.clientY<=qt.bottom});ct.size()>0&&hle(e,x,ct,Ge,nt)}})}}],e)}}function IL(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 hle(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),B3.traceIs(a,"pie-like")&&(o.label=r.datum()[0].label);var s=nle.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&ale(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var l=nle.triggerHandler(e,"plotly_legenddoubleclick",o);l!==!1&&s!==!1&&ale(r,e,n)}}function yst(e,t,r){var n=qL(r),i=e.data()[0][0],a=i.trace,o=B3.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=gh.templateString(u,a._meta))));var f=gh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(mh.font,c).text(s?cle(u,l):u);var h=r.indentation+r.itemwidth+Vh.itemGap*2;Db.positionText(f,h,0),s?f.call(Db.makeEditable,{gd:t,text:u}).call(RL,e,t,r).on("edit",function(d){this.text(cle(d,l)).call(RL,e,t,r);var v=i.trace._fullInput||{},x={};return x.name=d,v._isShape?B3.call("_guiRelayout",t,"shapes["+a.index+"].name",x.name):B3.call("_guiRestyle",t,x,a.index)}):RL(f,e,t,r)}function cle(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 _st(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=gh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(DL.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)),hle(t,s,e,a,Sp.event)}}))}function RL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Db.convertToTspans(e,r,function(){xst(t,r,n,i)})}function xst(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){e.remove();return}var a=e.select("g[class*=math-group]"),o=a.node(),s=qL(r);r||(r=t._fullLayout[s]);var l=r.borderwidth,u;n===q3?u=r.title.font:i.groupTitle?u=i.groupTitle.font:u=r.font;var c=u.size*fle,f,h;if(o){var d=mh.bBox(o);f=d.height,h=d.width,n===q3?mh.setTranslate(a,l,l+f*.75):mh.setTranslate(a,0,f*.25)}else{var v="."+s+(n===q3?"title":"")+"text",x=e.select(v),b=Db.lineCount(x),g=x.node();if(f=c*b,h=g?mh.bBox(g).width:0,n===q3)r.title.side==="left"&&(h+=Vh.itemGap*2),Db.positionText(x,l+Vh.titlePad,l+c);else{var E=Vh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(E=Vh.itemGap,h-=r.indentation+r.itemwidth),Db.positionText(x,E,-c*((b-1)/2-.3))}}n===q3?(r._titleWidth=h,r._titleHeight=f):(i.lineHeight=c,i.height=Math.max(f,16)+3,i.width=h)}function bst(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 wst(e,t,r,n){var i=e._fullLayout,a=qL(n);n||(n=i[a]);var o=i._size,s=lle.isVertical(n),l=lle.isGrouped(n),u=n.entrywidthmode==="fraction",c=n.borderwidth,f=2*c,h=Vh.itemGap,d=n.indentation+n.itemwidth+h*2,v=2*(c+h),x=FL(n),b=n.y<0||n.y===0&&x==="top",g=n.y>1||n.y===1&&x==="bottom",E=n.tracegroupgap,k={};n._maxHeight=Math.max(b||g?i.height/2:o.h,30);var S=0;n._width=0,n._height=0;var L=bst(n);if(s)r.each(function(ge){var ie=ge[0].height;mh.setTranslate(this,c+L[0],c+L[1]+n._height+ie/2+h),n._height+=ie,n._width=Math.max(n._width,ge[0].width)}),S=d+n._width,n._width+=h+d+f,n._height+=v,l&&(t.each(function(ge,ie){mh.setTranslate(this,0,ie*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var _=zL(n),C=n.x<0||n.x===0&&_==="right",M=n.x>1||n.x===1&&_==="left",p=g||b,P=i.width/2;n._maxWidth=Math.max(C?p&&_==="left"?o.l+o.w:P:M?p&&_==="right"?o.r+o.w:P:o.w,2*d);var T=0,F=0;r.each(function(ge){var ie=IL(ge,n,d);T=Math.max(T,ie),F+=ie}),S=null;var q=0;if(l){var V=0,H=0,X=0;t.each(function(){var ge=0,ie=0;Sp.select(this).selectAll("g.traces").each(function(Ee){var Ae=IL(Ee,n,d),ze=Ee[0].height;mh.setTranslate(this,L[0],L[1]+c+h+ze/2+ie),ie+=ze,ge=Math.max(ge,Ae),k[Ee[0].trace.legendgroup]=ge});var Te=ge+h;H>0&&Te+c+H>n._maxWidth?(q=Math.max(q,H),H=0,X+=V+E,V=ie):V=Math.max(V,ie),mh.setTranslate(this,H,X),H+=Te}),n._width=Math.max(q,H)+c,n._height=X+V+v}else{var G=r.size(),N=F+f+(G-1)*h=n._maxWidth&&(q=Math.max(q,_e),re=0,ae+=W,n._height+=W,W=0),mh.setTranslate(this,L[0]+c+re,L[1]+c+ae+ie/2+h),_e=re+Te+h,re+=Ee,W=Math.max(W,ie)}),N?(n._width=re+f,n._height=W+v):(n._width=Math.max(q,_e)+f,n._height+=W+v)}}n._width=Math.ceil(Math.max(n._width+L[0],n._titleWidth+2*(c+Vh.titlePad))),n._height=Math.ceil(Math.max(n._height+L[1],n._titleHeight+2*(c+Vh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Me=e._context.edits,ke=Me.legendText||Me.legendPosition;r.each(function(ge){var ie=Sp.select(this).select("."+a+"toggle"),Te=ge[0].height,Ee=ge[0].trace.legendgroup,Ae=IL(ge,n,d);l&&Ee!==""&&(Ae=k[Ee]);var ze=ke?d:S||Ae;!s&&!u&&(ze+=h/2),mh.setRect(ie,0,-Te/2,ze,Te)})}function Tst(e,t,r,n){var i=e._fullLayout,a=i[t],o=zL(a),s=FL(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 PB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*O3[o],r:a._width*ole[o],b:a._effHeight*ole[s],t:a._effHeight*O3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function zL(e){return gh.isRightAnchor(e)?"right":gh.isCenterAnchor(e)?"center":"left"}function FL(e){return gh.isBottomAnchor(e)?"bottom":gh.isMiddleAnchor(e)?"middle":"top"}function qL(e){return e._id||"legend"}});var qB=ye(FB=>{"use strict";var Rb=xa(),Sy=uo(),vle=id(),Df=Mr(),Ast=Df.pushUnique,RB=Df.strTranslate,Sst=Df.strRotate,Mst=g3(),A0=Ll(),Est=qse(),bm=ao(),sd=va(),OL=gv(),wm=Qa(),kst=ad().zindexSeparator,U3=ba(),Ag=rp(),zb=IS(),Cst=bB(),Lst=DB(),wle=zb.YANGLE,zB=Math.PI*wle/180,Pst=1/Math.sin(zB),Ist=Math.cos(zB),Dst=Math.sin(zB),Bc=zb.HOVERARROWSIZE,Us=zb.HOVERTEXTPAD,ple={box:!0,ohlc:!0,violin:!0,candlestick:!0},Rst={scatter:!0,scattergl:!0,splom:!0};function gle(e,t){return e.distance-t.distance}FB.hover=function(t,r,n,i){t=Df.getGraphDiv(t);var a=r.target;Df.throttle(t._fullLayout._uid+zb.HOVERID,zb.HOVERMINTIME,function(){zst(t,r,n,i,a)})};FB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Ele(i),o=kle(i),s=t.map(function(b){var g=b._x0||b.x0||b.x||0,E=b._x1||b.x1||b.x||0,k=b._y0||b.y0||b.y||0,S=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var _=Math.min(g,E),C=Math.max(g,E),M=Math.min(k,S),p=Math.max(k,S),P=b.trace;if(U3.traceIs(P,"gl3d")){var T=i._fullLayout[P.scene]._scene.container,F=T.offsetLeft,q=T.offsetTop;_+=F,C+=F,M+=q,p+=q}L.bbox={x0:_+o,x1:C+o,y0:M+a,y1:p+a},r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||sd.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=Ale(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||sd.background,container:Rb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,g){return b.y0-g.y0}).each(function(b,g){var E=b.y0-b.by/2;E-fC[0]._length||ce<0||ce>M[0]._length)return OL.unhoverRaw(e,t)}if(t.pointerX=De+C[0]._offset,t.pointerY=ce+M[0]._offset,"xval"in t?X=Ag.flat(a,t.xval):X=Ag.p2c(C,De),"yval"in t?G=Ag.flat(a,t.yval):G=Ag.p2c(M,ce),!Sy(X[0])||!Sy(G[0]))return Df.warn("Fx.hover failed",t,e),OL.unhoverRaw(e,t)}var ct=1/0;function qt(Ni,_n){for(W=0;WEe&&(V.splice(0,Ee),ct=V[0].distance),f&&q!==0&&V.length===0){Te.distance=q,Te.index=!1;var ft=ae._module.hoverPoints(Te,ge,ie,"closest",{hoverLayer:s._hoverlayer});if(ft&&(ft=ft.filter(function(Vr){return Vr.spikeDistance<=q})),ft&&ft.length){var jt,Zt=ft.filter(function(Vr){return Vr.xa.showspikes&&Vr.xa.spikesnap!=="hovered data"});if(Zt.length){var yr=Zt[0];Sy(yr.x0)&&Sy(yr.y0)&&(jt=ot(yr),(!Ae.vLinePoint||Ae.vLinePoint.spikeDistance>jt.spikeDistance)&&(Ae.vLinePoint=jt))}var Fr=ft.filter(function(Vr){return Vr.ya.showspikes&&Vr.ya.spikesnap!=="hovered data"});if(Fr.length){var Zr=Fr[0];Sy(Zr.x0)&&Sy(Zr.y0)&&(jt=ot(Zr),(!Ae.hLinePoint||Ae.hLinePoint.spikeDistance>jt.spikeDistance)&&(Ae.hLinePoint=jt))}}}}}qt();function rt(Ni,_n,$i){for(var zn=null,Wn=1/0,It,ft=0;ft0&&Math.abs(Ni.distance)dt-1;Nr--)Or(V[Nr]);V=fr,Yt()}var ut=e._hoverdata,Ne=[],Ye=Ele(e),Ve=kle(e);for(N=0;N1||V.length>1)||h==="closest"&&ze&&V.length>1,ri=sd.combine(s.plot_bgcolor||sd.background,s.paper_bgcolor),bi=Ale(V,{gd:e,hovermode:h,rotateLabels:jr,bgColor:ri,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),nn=bi.hoverLabels;if(Ag.isUnifiedHover(h)||(qst(nn,jr,s,bi.commonLabelBoundingBox),Mle(nn,jr,s._invScaleX,s._invScaleY)),i&&i.tagName){var Wi=U3.getComponentMethod("annotations","hasClickToShow")(e,Ne);Est(Rb.select(i),Wi?"pointer":"")}!i||n||!Nst(e,t,ut)||(ut&&e.emit("plotly_unhover",{event:t,points:ut}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:X,yvals:G}))}function Tle(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 Fst=/([\s\S]*)<\/extra>/;function Ale(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,x=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,g=t.fontShadow||n.font.shadow,E=e[0],k=E.xa,S=E.ya,L=i.charAt(0),_=L+"Label",C=E[_];if(C===void 0&&k.type==="multicategory")for(var M=0;Mn.width-ut&&(Ne=n.width-ut),Lt.attr("d","M"+(Br-Ne)+",0L"+(Br-Ne+Bc)+","+Nr+Bc+"H"+ut+"v"+Nr+(Us*2+_r.height)+"H"+-ut+"V"+Nr+Bc+"H"+(Br-Ne-Bc)+"Z"),Br=Ne,W.minX=Br-ut,W.maxX=Br+ut,k.side==="top"?(W.minY=Or-(Us*2+_r.height),W.maxY=Or-Us):(W.minY=Or+Us,W.maxY=Or+(Us*2+_r.height))}else{var Ye,Ve,Xe;S.side==="right"?(Ye="start",Ve=1,Xe="",Br=k._offset+k._length):(Ye="end",Ve=-1,Xe="-",Br=k._offset),Or=S._offset+(E.y0+E.y1)/2,St.attr("text-anchor",Ye),Lt.attr("d","M0,0L"+Xe+Bc+","+Bc+"V"+(Us+_r.height/2)+"h"+Xe+(Us*2+_r.width)+"V-"+(Us+_r.height/2)+"H"+Xe+Bc+"V-"+Bc+"Z"),W.minY=Or-(Us+_r.height/2),W.maxY=Or+(Us+_r.height/2),S.side==="right"?(W.minX=Br+Bc,W.maxX=Br+Bc+(Us*2+_r.width)):(W.minX=Br-Bc-(Us*2+_r.width),W.maxX=Br-Bc);var ht=_r.height/2,Le=P-_r.top-ht,xe="clip"+n._uid+"commonlabel"+S._id,Se;if(Br<_r.width+2*Us+Bc){Se="M-"+(Bc+Us)+"-"+ht+"h-"+(_r.width-Us)+"V"+ht+"h"+(_r.width-Us)+"Z";var lt=_r.width-Br+Us;A0.positionText(St,lt,Le),Ye==="end"&&St.selectAll("tspan").each(function(){var Vt=Rb.select(this),ar=bm.tester.append("text").text(Vt.text()).call(bm.font,fr),Qr=N3(r,ar.node());Math.round(Qr.width)=0?er=kt:Ct+ce=0?er=Ct:Yt+ce=0?Ke=ot:Dt+Ge=0?Ke=Dt:xr+Ge=0,(bt.idealAlign==="top"||!Vt)&&ar?(Xe-=Le/2,bt.anchor="end"):Vt?(Xe+=Le/2,bt.anchor="start"):bt.anchor="middle",bt.crossPos=Xe;else{if(bt.pos=Xe,Vt=Ve+ht/2+Gt<=T,ar=Ve-ht/2-Gt>=0,(bt.idealAlign==="left"||!Vt)&&ar)Ve-=ht/2,bt.anchor="end";else if(Vt)Ve+=ht/2,bt.anchor="start";else{bt.anchor="middle";var Qr=Gt/2,ai=Ve+Qr-T,jr=Ve-Qr;ai>0&&(Ve-=ai),jr<0&&(Ve+=-jr)}bt.crossPos=Ve}Or.attr("text-anchor",bt.anchor),ut&&Nr.attr("text-anchor",bt.anchor),Lt.attr("transform",RB(Ve,Xe)+(a?Sst(wle):""))}),{hoverLabels:xt,commonLabelBoundingBox:W}}function mle(e,t,r,n,i,a){var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Df.templateString(e.name,e.trace._meta)),o=xle(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);var c=e.hovertemplate||!1;if(c){var f=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(f[l+"other"]=f[l+"Val"],f[l+"otherLabel"]=f[l+"Label"]),s=Df.hovertemplateString(c,f,n._d3locale,e.eventData[0]||{},e.trace._meta),s=s.replace(Fst,function(h,d){return o=xle(d,e.nameLength),""})}return[s,o]}function qst(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,x=function(X){return X*r._invScaleX},b=function(X){return X*r._invScaleY};e.each(function(X){var G=X[i],N=X[a],W=G._id.charAt(0)==="x",re=G.range;c===0&&re&&re[0]>re[1]!==W&&(s=-1);var ae=0,_e=W?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Me=Sle(X,t),ke=X.anchor,ge=ke==="end"?-1:1,ie,Te;if(ke==="middle")ie=X.crossPos+(W?b(Me.y-X.by/2):x(X.bx/2+X.tx2width/2)),Te=ie+(W?b(X.by):x(X.bx));else if(W)ie=X.crossPos+b(Bc+Me.y)-b(X.by/2-Bc),Te=ie+b(X.by);else{var Ee=x(ge*Bc+Me.x),Ae=Ee+x(ge*X.bx);ie=X.crossPos+Math.min(Ee,Ae),Te=X.crossPos+Math.max(Ee,Ae)}W?d!==void 0&&v!==void 0&&Math.min(Te,v)-Math.max(ie,d)>1&&(N.side==="left"?(ae=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Te,h)-Math.max(ie,f)>1&&(N.side==="top"?(ae=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:X,traceIndex:X.trace.index,dp:0,pos:X.pos,posref:X.posref,size:X.by*(W?Pst:1)/2,pmin:ae,pmax:_e}]}),u.sort(function(X,G){return X[0].posref-G[0].posref||s*(G[0].traceIndex-X[0].traceIndex)});var g,E,k,S,L,_,C;function M(X){var G=X[0],N=X[X.length-1];if(E=G.pmin-G.pos-G.dp+G.size,k=N.pos+N.dp+N.size-G.pmax,E>.01){for(L=X.length-1;L>=0;L--)X[L].dp+=E;g=!1}if(!(k<.01)){if(E<-.01){for(L=X.length-1;L>=0;L--)X[L].dp-=k;g=!1}if(g){var W=0;for(S=0;SG.pmax&&W++;for(S=X.length-1;S>=0&&!(W<=0);S--)_=X[S],_.pos>G.pmax-1&&(_.del=!0,W--);for(S=0;S=0;L--)X[L].dp-=k;for(S=X.length-1;S>=0&&!(W<=0);S--)_=X[S],_.pos+_.dp+_.size>G.pmax&&(_.del=!0,W--)}}}for(;!g&&o<=l;){for(o++,g=!0,S=0;S.01){for(L=P.length-1;L>=0;L--)P[L].dp+=E;for(p.push.apply(p,P),u.splice(S+1,1),C=0,L=p.length-1;L>=0;L--)C+=p[L].dp;for(k=C/p.length,L=p.length-1;L>=0;L--)p[L].dp-=k;g=!1}else S++}u.forEach(M)}for(S=u.length-1;S>=0;S--){var q=u[S];for(L=q.length-1;L>=0;L--){var V=q[L],H=V.datum;H.offset=V.dp,H.del=V.del}}}function Sle(e,t){var r=0,n=e.offset;return t&&(n*=-Dst,r=e.offset*Ist),{x:r,y:n}}function Ost(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Bc+Us),n=r+t*(e.txwidth+Us),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+Us),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Mle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Rb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Ost(o),h=Sle(o,t),d=h.x,v=h.y,x=u==="middle";s.select("path").attr("d",x?"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":"M0,0L"+i(c*Bc+d)+","+a(Bc+v)+"v"+a(o.by/2-Bc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Bc+d)+"V"+a(v-Bc)+"Z");var b=d+f.textShiftX,g=v+o.ty0-o.by/2+Us,E=o.textAlign||"auto";E!=="auto"&&(E==="left"&&u!=="start"?(l.attr("text-anchor","start"),b=x?-o.bx/2-o.tx2width/2+Us:-o.bx-Us):E==="right"&&u!=="end"&&(l.attr("text-anchor","end"),b=x?o.bx/2-o.tx2width/2-Us:o.bx+Us)),l.call(A0.positionText,i(b),a(g)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(f.text2ShiftX+f.alignShift*Us+d),a(v+o.ty0-o.by/2+Us)),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 Bst(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Sy(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=Df.castOption(i,r,h);return o(v)?v:Df.extractOption({},n,"",d)}:function(h,d){return Df.extractOption(a,n,h,d)};function l(h,d,v){var x=s(d,v);o(x)&&(e[h]=x)}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=Df.constrain(e.x0,0,e.xa._length),e.x1=Df.constrain(e.x1,0,e.xa._length),e.y0=Df.constrain(e.y0,0,e.ya._length),e.y1=Df.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 yle(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=sd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var x=c.spikesnap;x==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=vle.readability(h.color,f)<1.5?sd.contrast(f):h.color,g=c.spikemode,E=c.spikethickness,k=c.spikecolor||b,S=wm.getPxPosition(e,c),L,_;if(g.indexOf("toaxis")!==-1||g.indexOf("across")!==-1){if(g.indexOf("toaxis")!==-1&&(L=S,_=d),g.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,_=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:_,y1:v,y2:v,"stroke-width":E,stroke:k,"stroke-dasharray":bm.dashStyle(c.spikedash,E)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:_,y1:v,y2:v,"stroke-width":E+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}g.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:S+(c.side!=="right"?E:-E),cy:v,r:E,fill:k}).classed("spikeline",!0)}if(l){var p=t.vLinePoint,P,T;u=p&&p.xa,c=p&&p.ya;var F=u.spikesnap;F==="cursor"?(P=o.pointerX,T=o.pointerY):(P=u._offset+p.x,T=c._offset+p.y);var q=vle.readability(p.color,f)<1.5?sd.contrast(f):p.color,V=u.spikemode,H=u.spikethickness,X=u.spikecolor||q,G=wm.getPxPosition(e,u),N,W;if(V.indexOf("toaxis")!==-1||V.indexOf("across")!==-1){if(V.indexOf("toaxis")!==-1&&(N=G,W=T),V.indexOf("across")!==-1){var re=u._counterDomainMin,ae=u._counterDomainMax;u.anchor==="free"&&(re=Math.min(re,u.position),ae=Math.max(ae,u.position)),N=a.t+(1-ae)*a.h,W=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:W,"stroke-width":H,stroke:X,"stroke-dasharray":bm.dashStyle(u.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:W,"stroke-width":H+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}V.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:G-(u.side!=="top"?H:-H),r:H,fill:X}).classed("spikeline",!0)}}}function Nst(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))return!0}return!1}function _le(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function xle(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Ust(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o{"use strict";var Vst=Mr(),Hst=va(),Gst=rp().isUnifiedHover;Cle.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&&Gst(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=Hst.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),Vst.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Ple=ye((Brr,Lle)=>{"use strict";var jst=Mr(),Wst=oM(),Zst=B1();Lle.exports=function(t,r){function n(i,a){return jst.coerce(t,r,Zst,i,a)}Wst(t,r,n)}});var Rle=ye((Nrr,Dle)=>{"use strict";var Ile=Mr(),Xst=i3(),Yst=oM();Dle.exports=function(t,r,n,i){function a(s,l){return Ile.coerce(t,r,Xst,s,l)}var o=Ile.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Yst(t,r,a,o)}});var OB=ye((Urr,zle)=>{"use strict";var Kst=Mr(),Jst=B1();zle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Kst.coerce(t,r,Jst,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var Ole=ye((Vrr,qle)=>{"use strict";var Fle=Mr(),$st=B1(),Qst=OB(),elt=oM();qle.exports=function(t,r){function n(c,f){return Fle.coerce(t,r,$st,c,f)}var i=Qst(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"),elt(t,r,n),Fle.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Ule=ye((Hrr,Nle)=>{"use strict";var BB=Mr(),Ble=ba();Nle.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return BB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a{"use strict";var rlt=ba(),ilt=qB().hover;Vle.exports=function(t,r,n){var i=rlt.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&ilt(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 Nc=ye((jrr,Wle)=>{"use strict";var nlt=xa(),BL=Mr(),alt=gv(),sM=rp(),Gle=B1(),jle=qB();Wle.exports={moduleType:"component",name:"fx",constants:IS(),schema:{layout:Gle},attributes:i3(),layoutAttributes:Gle,supplyLayoutGlobalDefaults:Ple(),supplyDefaults:Rle(),supplyLayoutDefaults:Ole(),calc:Ule(),getDistanceFunction:sM.getDistanceFunction,getClosest:sM.getClosest,inbox:sM.inbox,quadrature:sM.quadrature,appendArrayPointValue:sM.appendArrayPointValue,castHoverOption:slt,castHoverinfo:llt,hover:jle.hover,unhover:alt.unhover,loneHover:jle.loneHover,loneUnhover:olt,click:Hle()};function olt(e){var t=BL.isD3Selection(e)?e:nlt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function slt(e,t,r){return BL.castOption(e,t,"hoverlabel."+r)}function llt(e,t,r){function n(i){return BL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return BL.castOption(e,r,"hoverinfo",n)}});var Sg=ye(My=>{"use strict";My.selectMode=function(e){return e==="lasso"||e==="select"};My.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};My.openMode=function(e){return e==="drawline"||e==="drawopenpath"};My.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};My.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};My.selectingOrDrawing=function(e){return My.freeMode(e)||My.rectMode(e)}});var lM=ye((Zrr,Zle)=>{"use strict";Zle.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 NL=ye((Xrr,Xle)=>{"use strict";Xle.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 VL=ye((Yrr,Yle)=>{"use strict";var UL=32;Yle.exports={CIRCLE_SIDES:UL,i000:0,i090:UL/4,i180:UL/2,i270:UL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var HL=ye((Krr,Jle)=>{"use strict";var ult=Mr().strTranslate;function Kle(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 clt(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 flt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return Kle(e,r[t])}}function hlt(e){return ult(e.xaxis._offset,e.yaxis._offset)}Jle.exports={p2r:Kle,r2p:clt,axValue:flt,getTransform:hlt}});var u_=ye(Ey=>{"use strict";var dlt=XS(),eue=VL(),V3=eue.CIRCLE_SIDES,NB=eue.SQRT2,tue=HL(),$le=tue.p2r,Qle=tue.r2p,vlt=[0,3,4,5,6,1,2],plt=[0,3,4,1,2];Ey.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var oue=Sg(),glt=oue.drawMode,mlt=oue.openMode,H3=VL(),rue=H3.i000,iue=H3.i090,nue=H3.i180,aue=H3.i270,ylt=H3.cos45,_lt=H3.sin45,sue=HL(),jL=sue.p2r,c_=sue.r2p,xlt=Q1(),blt=xlt.clearOutline,WL=u_(),wlt=WL.readPaths,Tlt=WL.writePaths,Alt=WL.ellipseOver,Slt=WL.fixDatesForPaths;function Mlt(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(!glt(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var Elt=Sg(),klt=Elt.selectMode,Clt=Q1(),Llt=Clt.clearOutline,UB=u_(),Plt=UB.readPaths,Ilt=UB.writePaths,Dlt=UB.fixDatesForPaths;cue.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(!klt(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";fue.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(Ld=>{"use strict";var Fb=cM(),hue=Mr(),XL=Qa();Ld.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Ld.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Ld.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Ld.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Ld.extractPathCoords=function(e,t,r){var n=[],i=e.match(Fb.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.substr(1).match(Fb.paramRE);if(!(!s||s.lengthd&&(x="X"),x});return u>d&&(v=v.replace(/[\s,]*X.*/,""),hue.log("Ignoring extra params in segment "+l)),c+v})}function fM(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 GB=ye((rir,gue)=>{"use strict";var zlt=Mr(),G3=Qa(),due=Ll(),vue=ao(),Flt=u_().readPaths,HB=f_(),qlt=HB.getPathString,pue=x6(),Olt=Nh().FROM_TL;gue.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=G3.getFromId(t,n.xref),l=G3.getFromId(t,n.yref);for(var u in pue){var c=pue[u](n,s,l);c!==void 0&&(o[u]=c)}}a=zlt.texttemplateStringForShapes(n.label.texttemplate,{},t._fullLayout._d3locale,o)}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),x=v.append("text").attr(d).classed("shape-label-text",!0).text(a),b,g,E,k;if(n.path){var S=qlt(t,n),L=Flt(S,t);b=1/0,E=1/0,g=-1/0,k=-1/0;for(var _=0;_=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Nlt(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,x=i.label.yanchor,b,g,E,k;if(c==="line"){s==="start"?(b=e,g=t):s==="end"?(b=r,g=n):(b=(e+r)/2,g=(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 Ult=Mr(),Vlt=Ult.strTranslate,mue=gv(),xue=Sg(),Hlt=xue.drawMode,bue=xue.selectMode,wue=ba(),yue=va(),KL=VL(),Glt=KL.i000,jlt=KL.i090,Wlt=KL.i180,Zlt=KL.i270,Xlt=Q1(),Tue=Xlt.clearOutlineControllers,WB=u_(),YL=WB.pointsOnRectangle,jB=WB.pointsOnEllipse,Ylt=WB.writePaths,Klt=ZL().newShapes,Jlt=ZL().createShapeObj,$lt=VB(),Qlt=GB();Aue.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(G){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Klt(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=$lt(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&wue.call((G||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Hlt(c),h=bue(c);(f||h)&&(a._fullLayout._outlining=!0),Tue(a),r.attr("d",Ylt(t));var d,v,x,b,g;if(!i&&(n.isActiveShape||n.isActiveSelection)){g=eut([],t);var E=u.append("g").attr("class","outline-controllers");P(E),X()}if(f&&n.hasText){var k=u.select(".label-temp"),S=Jlt(r,n,n.dragmode);Qlt(a,"label-temp",S,k)}function L(G){x=+G.srcElement.getAttribute("data-i"),b=+G.srcElement.getAttribute("data-j"),d[x][b].moveFn=_}function _(G,N){if(t.length){var W=g[x][b][1],re=g[x][b][2],ae=t[x],_e=ae.length;if(YL(ae)){var Me=G,ke=N;if(n.isActiveSelection){var ge=_ue(ae,b);ge[1]===ae[b][1]?ke=0:Me=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Te=ae[ie];Te[1]===ae[b][1]&&(Te[1]=W+Me),Te[2]===ae[b][2]&&(Te[2]=re+ke)}if(ae[b][1]=W+Me,ae[b][2]=re+ke,!YL(ae))for(var Ee=0;Ee<_e;Ee++)for(var Ae=0;Ae1&&!(G.length===2&&G[1][0]==="Z")&&(b===0&&(G[0][0]="M"),t[x]=G,o(),s())}}function p(G,N){if(G===2){x=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var W=t[x];!YL(W)&&!jB(W)&&M()}}function P(G){d=[];for(var N=0;N{"use strict";var rut=xa(),Lue=ba(),Sue=Mr(),j3=Qa(),iut=u_().readPaths,nut=JL(),QL=GB(),Pue=Q1().clearOutlineControllers,ZB=va(),YB=ao(),aut=Vs().arrayEditor,Mue=gv(),Eue=Tg(),qb=cM(),Mp=f_(),XB=Mp.getPathString;Rue.exports={draw:KB,drawOne:Iue,eraseActiveShape:lut,drawLabel:QL};function KB(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&&kt>s&&!rt.shiftKey?Mue.getCursor(Ct/Dt,1-Yt/kt):"move";Eue(t,xr),Te=xr.split("-")[0]}}function Ce(rt){$L(e)||(l&&(g=ae(r.xanchor)),u&&(E=_e(r.yanchor)),r.type==="path"?T=r.path:(d=l?r.x0:ae(r.x0),v=u?r.y0:_e(r.y0),x=l?r.x1:ae(r.x1),b=u?r.y1:_e(r.y1)),db?(k=v,C="y0",S=b,M="y1"):(k=b,C="y1",S=v,M="y0"),ze(rt),nt(i,r),qt(t,r,e),ie.moveFn=Te==="move"?ce:Ge,ie.altKey=rt.altKey)}function me(){$L(e)||(Eue(t),ct(i),Due(t,e,r),Lue.call("_guiRelayout",e,a.getUpdateObj()))}function De(){$L(e)||ct(i)}function ce(rt,ot){if(r.type==="path"){var Dt=function(Yt){return Yt},kt=Dt,Ct=Dt;l?h("xanchor",r.xanchor=Me(g+rt)):(kt=function(xr){return Me(ae(xr)+rt)},q&&q.type==="date"&&(kt=Mp.encodeDate(kt))),u?h("yanchor",r.yanchor=ke(E+ot)):(Ct=function(xr){return ke(_e(xr)+ot)},H&&H.type==="date"&&(Ct=Mp.encodeDate(Ct))),h("path",r.path=kue(T,kt,Ct))}else l?h("xanchor",r.xanchor=Me(g+rt)):(h("x0",r.x0=Me(d+rt)),h("x1",r.x1=Me(x+rt))),u?h("yanchor",r.yanchor=ke(E+ot)):(h("y0",r.y0=ke(v+ot)),h("y1",r.y1=ke(b+ot)));t.attr("d",XB(e,r)),nt(i,r),QL(e,n,r,F)}function Ge(rt,ot){if(f){var Dt=function(_r){return _r},kt=Dt,Ct=Dt;l?h("xanchor",r.xanchor=Me(g+rt)):(kt=function(Br){return Me(ae(Br)+rt)},q&&q.type==="date"&&(kt=Mp.encodeDate(kt))),u?h("yanchor",r.yanchor=ke(E+ot)):(Ct=function(Br){return ke(_e(Br)+ot)},H&&H.type==="date"&&(Ct=Mp.encodeDate(Ct))),h("path",r.path=kue(T,kt,Ct))}else if(c){if(Te==="resize-over-start-point"){var Yt=d+rt,xr=u?v-ot:v+ot;h("x0",r.x0=l?Yt:Me(Yt)),h("y0",r.y0=u?xr:ke(xr))}else if(Te==="resize-over-end-point"){var er=x+rt,Ke=u?b-ot:b+ot;h("x1",r.x1=l?er:Me(er)),h("y1",r.y1=u?Ke:ke(Ke))}}else{var xt=function(_r){return Te.indexOf(_r)!==-1},bt=xt("n"),Lt=xt("s"),St=xt("w"),Et=xt("e"),dt=bt?k+ot:k,Ht=Lt?S+ot:S,$t=St?L+rt:L,fr=Et?_+rt:_;u&&(bt&&(dt=k-ot),Lt&&(Ht=S-ot)),(!u&&Ht-dt>s||u&&dt-Ht>s)&&(h(C,r[C]=u?dt:ke(dt)),h(M,r[M]=u?Ht:ke(Ht))),fr-$t>o&&(h(p,r[p]=l?$t:Me($t)),h(P,r[P]=l?fr:Me(fr)))}t.attr("d",XB(e,r)),nt(i,r),QL(e,n,r,F)}function nt(rt,ot){(l||u)&&Dt();function Dt(){var kt=ot.type!=="path",Ct=rt.selectAll(".visual-cue").data([0]),Yt=1;Ct.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Yt}).classed("visual-cue",!0);var xr=ae(l?ot.xanchor:Sue.midRange(kt?[ot.x0,ot.x1]:Mp.extractPathCoords(ot.path,qb.paramIsX))),er=_e(u?ot.yanchor:Sue.midRange(kt?[ot.y0,ot.y1]:Mp.extractPathCoords(ot.path,qb.paramIsY)));if(xr=Mp.roundPositionForSharpStrokeRendering(xr,Yt),er=Mp.roundPositionForSharpStrokeRendering(er,Yt),l&&u){var Ke="M"+(xr-1-Yt)+","+(er-1-Yt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ct.attr("d",Ke)}else if(l){var xt="M"+(xr-1-Yt)+","+(er-9-Yt)+"v18 h2 v-18 Z";Ct.attr("d",xt)}else{var bt="M"+(xr-9-Yt)+","+(er-1-Yt)+"h18 v2 h-18 Z";Ct.attr("d",bt)}}}function ct(rt){rt.selectAll(".visual-cue").remove()}function qt(rt,ot,Dt){var kt=ot.xref,Ct=ot.yref,Yt=j3.getFromId(Dt,kt),xr=j3.getFromId(Dt,Ct),er="";kt!=="paper"&&!Yt.autorange&&(er+=kt),Ct!=="paper"&&!xr.autorange&&(er+=Ct),YB.setClipUrl(rt,er?"clip"+Dt._fullLayout._uid+er:null,Dt)}}function kue(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.substr(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 sut(e,t){if(eP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Cue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Cue,KB(e)}}}function Cue(e){if(eP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Pue(e),delete e._fullLayout._activeShapeIndex,KB(e))}}function lut(e){if(eP(e)){Pue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=ba(),zue=Yu(),Fue=af(),al=NL(),uut=tP().eraseActiveShape,rP=Mr(),Os=rP._,ol=Hue.exports={};ol.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Os(e,"Download plot as a png"):Os(e,"Download plot")},icon:al.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};rP.notifier(Os(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){rP.notifier(Os(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){rP.notifier(Os(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};ol.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Os(e,"Edit in Chart Studio")},icon:al.disk,click:function(e){zue.sendDataToCloud(e)}};ol.editInChartStudio={name:"editInChartStudio",title:function(e){return Os(e,"Edit in Chart Studio")},icon:al.pencil,click:function(e){zue.sendDataToCloud(e)}};ol.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Os(e,"Zoom")},attr:"dragmode",val:"zoom",icon:al.zoombox,click:Ov};ol.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Os(e,"Pan")},attr:"dragmode",val:"pan",icon:al.pan,click:Ov};ol.select2d={name:"select2d",_cat:"select",title:function(e){return Os(e,"Box Select")},attr:"dragmode",val:"select",icon:al.selectbox,click:Ov};ol.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Os(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:al.lasso,click:Ov};ol.drawclosedpath={name:"drawclosedpath",title:function(e){return Os(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:al.drawclosedpath,click:Ov};ol.drawopenpath={name:"drawopenpath",title:function(e){return Os(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:al.drawopenpath,click:Ov};ol.drawline={name:"drawline",title:function(e){return Os(e,"Draw line")},attr:"dragmode",val:"drawline",icon:al.drawline,click:Ov};ol.drawrect={name:"drawrect",title:function(e){return Os(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:al.drawrect,click:Ov};ol.drawcircle={name:"drawcircle",title:function(e){return Os(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:al.drawcircle,click:Ov};ol.eraseshape={name:"eraseshape",title:function(e){return Os(e,"Erase active shape")},icon:al.eraseshape,click:uut};ol.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Os(e,"Zoom in")},attr:"zoom",val:"in",icon:al.zoom_plus,click:Ov};ol.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Os(e,"Zoom out")},attr:"zoom",val:"out",icon:al.zoom_minus,click:Ov};ol.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Os(e,"Autoscale")},attr:"zoom",val:"auto",icon:al.autoscale,click:Ov};ol.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Os(e,"Reset axes")},attr:"zoom",val:"reset",icon:al.home,click:Ov};ol.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Os(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:al.tooltip_basic,gravity:"ne",click:Ov};ol.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Os(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:al.tooltip_compare,gravity:"ne",click:Ov};function Ov(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Fue.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 Gue=QB(),hut=Object.keys(Gue),jue=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Wue=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(jue),Z3=[],dut=function(e){if(Wue.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Z3.indexOf(t)===-1&&Z3.push(t),Z3.indexOf(r)===-1&&Z3.push(r)}};hut.forEach(function(e){dut(Gue[e])});Z3.sort();Zue.exports={DRAW_MODES:jue,backButtons:Wue,foreButtons:Z3}});var tN=ye((lir,Xue)=>{"use strict";var sir=eN();Xue.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 Kue=ye((uir,Yue)=>{"use strict";var vut=Mr(),hM=va(),put=Vs(),gut=tN();Yue.exports=function(t,r){var n=t.modebar||{},i=put.newContainer(r,"modebar");function a(s,l){return vut.coerce(n,i,gut,s,l)}a("orientation"),a("bgcolor",hM.addOpacity(r.paper_bgcolor,.5));var o=hM.contrast(hM.rgb(r.modebar.bgcolor));a("color",hM.addOpacity(o,.3)),a("activecolor",hM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var ece=ye((cir,Que)=>{"use strict";var rN=xa(),mut=uo(),nP=Mr(),Jue=NL(),yut=QC().version,_ut=new DOMParser;function $ue(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=$ue.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._uid=i,this.element.className="modebar",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}),nP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color);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()};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("a");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),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&&rN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Jue.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Tm.createIcon=function(e){var t=mut(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=_ut.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=rN.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:nP.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 wut=af(),tce=lu(),iN=ba(),Tut=rp().isUnifiedHover,Aut=ece(),aP=QB(),Sut=eN().DRAW_MODES,Mut=Mr().extendDeep;rce.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=Iut(a):!n.displayModeBar&&n.watermark?o=[]:o=Eut(t),i?i.update(t,o):r._modeBar=Aut(t,o)};function Eut(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,W){if(typeof W=="string"){if(W.toLowerCase()===N.toLowerCase())return!0}else{var re=W.name,ae=W._cat||W.name;if(re===N||ae===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 W=0;W1?(P=["toggleHover"],T=["resetViews"]):f?(p=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],T=["resetGeo"]):c?(P=["hoverClosest3d"],T=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(p=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],T=["resetViewMapbox"]):b?(p=["zoomInMap","zoomOutMap"],P=["toggleHover"],T=["resetViewMap"]):h?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],T=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Lut(r)||L)&&(P=[]),u&&!S&&(p=["zoomIn2d","zoomOut2d","autoScale2d"],T[0]!=="resetViews"&&(T=["resetScale2d"])),c?F=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!S||v?F=["zoom2d","pan2d"]:x||b||f?F=["pan2d"]:g&&(F=["zoom2d"]),Cut(r)&&F.push("select2d","lasso2d");var q=[],V=function(N){q.indexOf(N)===-1&&P.indexOf(N)!==-1&&q.push(N)};if(Array.isArray(s)){for(var H=[],X=0;X{"use strict";nce.exports={moduleType:"component",name:"modebar",layoutAttributes:tN(),supplyLayoutDefaults:Kue(),manage:ice()}});var aN=ye((dir,ace)=>{"use strict";var Dut=Nh().FROM_BL;ace.exports=function(t,r,n){n===void 0&&(n=Dut[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 Bb=ye(dM=>{"use strict";var Ob=Mr(),oN=wg(),Mg=af().id2name,Rut=Cd(),oce=aN(),zut=ym(),Fut=es().ALMOST_EQUAL,qut=Nh().FROM_BL;dM.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.substr(a):n.substr(i))+o}function But(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;oFut*v&&!E)){for(a=0;aF&&reP&&(P=re);var _e=(P-p)/(2*T);f/=_e,p=l.l2r(p),P=l.l2r(P),l.range=l._input.range=_{"use strict";var sP=xa(),Bv=ba(),Jp=Yu(),M0=Mr(),uN=Ll(),cN=lM(),vM=va(),X3=ao(),cce=Mb(),pce=nN(),pM=Qa(),ky=Nh(),gce=Bb(),Nut=gce.enforce,Uut=gce.clean,fce=wg().doAutoRange,mce="start",Vut="middle",yce="end",Hut=ad().zindexSeparator;ld.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,jut],e)};function Gut(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function jut(e){var t=e._fullLayout,r=t._size,n=r.p,i=pM.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(X3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),ld.drawMainTitle(e),pce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Ce,me,De){var ce=Ce._lw/2;if(Ce._id.charAt(0)==="x"){if(me){if(De==="top")return me._offset-n-ce}else return r.t+r.h*(1-(Ce.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(De==="right")return me._offset+me._length+n+ce}else return r.l+r.w*(Ce.position||0)+ce%1;return me._offset-n-ce}for(a=0;a0){Yut(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:vce(t.yanchor)}).call(uN.positionText,o,a);var c=(t.text.match(uN.BR_TAG_ALL)||[]).length;if(c){var f=ky.LINE_SPACING*c+ky.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=sP.selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,x=v+cce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:x,"text-anchor":n,dy:vce(t.yanchor)}).call(uN.positionText,o,x)}}}};function Wut(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.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=Zut(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Yut(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"&&Wut(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 Kut(e,t){var r=e.title,n=e._size,i=0;switch(t===mce?i=r.pad.l:t===yce&&(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 Jut(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===ky.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 vce(e){return e==="top"?ky.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ky.MID_SHIFT+"em"}function $ut(e){var t=e.title,r=Vut;return M0.isRightAnchor(t)?r=yce:M0.isLeftAnchor(t)&&(r=mce),r}function Qut(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=ky.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=ky.MID_SHIFT+"em"),r}ld.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var ect=u_().readPaths,tct=JL(),_ce=Q1().clearOutlineControllers,fN=va(),xce=ao(),rct=Vs().arrayEditor,bce=f_(),ict=bce.getPathString;Tce.exports={draw:lP,drawOne:wce,activateLastSelection:oct};function lP(e){var t=e._fullLayout;_ce(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 g=o.append("path").attr(l).style("opacity",b?.1:u).call(fN.stroke,f).call(fN.fill,c).call(xce.dashLine,b?"solid":d,b?4+h:h);if(nct(g,e,n),v){var E=rct(e.layout,"selections",n);g.style({cursor:"move"});var k={element:g.node(),plotinfo:i,gd:e,editHelpers:E,isActiveSelection:!0},S=ect(s,e);tct(S,g,k)}else g.style("pointer-events",b?"all":"none");x[b]=g}var L=x[0],_=x[1];_.node().addEventListener("click",function(){return act(e,L)})}}function nct(e,t,r){var n=r.xref+r.yref;xce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function act(e,t){if(uP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){hN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=hN,lP(e)}}}function oct(e){if(uP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=hN,lP(e)}}function hN(e){if(uP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(_ce(e),delete e._fullLayout._activeSelectionIndex,lP(e))}}});var Sce=ye((mir,Ace)=>{function sct(){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}Ace.exports=sct});var Ece=ye((yir,Mce)=>{function lct(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}Mce.exports=lct});var Cce=ye((_ir,kce)=>{var uct={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}};kce.exports=uct});var Pce=ye((xir,Lce)=>{var mM=Cce();function cct(e,t,r){function n(v,x){return{id:r?r.segmentId():-1,start:v,end:x,myFill:{above:null,below:null},otherFill:null}}function i(v,x,b){return{id:r?r.segmentId():-1,start:v,end:x,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=mM.create();function o(v,x,b,g,E,k){var S=t.pointsCompare(x,E);return S!==0?S:t.pointsSame(b,k)?0:v!==g?v?1:-1:t.pointAboveOrOnLine(b,g?E:k,g?k:E)?1:-1}function s(v,x){a.insertBefore(v,function(b){var g=o(v.isStart,v.pt,x,b.isStart,b.pt,b.other.pt);return g<0})}function l(v,x){var b=mM.node({isStart:!0,pt:v.start,seg:v,primary:x,other:null,status:null});return s(b,v.end),b}function u(v,x,b){var g=mM.node({isStart:!1,pt:x.end,seg:x,primary:b,other:v,status:null});v.other=g,s(g,v.pt)}function c(v,x){var b=l(v,x);return u(b,v,x),b}function f(v,x){r&&r.segmentChop(v.seg,x),v.other.remove(),v.seg.end=x,v.other.pt=x,s(v.other,v.pt)}function h(v,x){var b=i(x,v.seg.end,v.seg);return f(v,x),c(b,v.primary)}function d(v,x){var b=mM.create();function g(H,X){var G=H.seg.start,N=H.seg.end,W=X.seg.start,re=X.seg.end;return t.pointsCollinear(G,W,re)?t.pointsCollinear(N,W,re)||t.pointAboveOrOnLine(N,W,re)?1:-1:t.pointAboveOrOnLine(G,W,re)?1:-1}function E(H){return b.findTransition(function(X){var G=g(H,X.ev);return G>0})}function k(H,X){var G=H.seg,N=X.seg,W=G.start,re=G.end,ae=N.start,_e=N.end;r&&r.checkIntersection(G,N);var Me=t.linesIntersect(W,re,ae,_e);if(Me===!1){if(!t.pointsCollinear(W,re,ae)||t.pointsSame(W,_e)||t.pointsSame(re,ae))return!1;var ke=t.pointsSame(W,ae),ge=t.pointsSame(re,_e);if(ke&&ge)return X;var ie=!ke&&t.pointBetween(W,ae,_e),Te=!ge&&t.pointBetween(re,ae,_e);if(ke)return Te?h(X,re):h(H,_e),X;ie&&(ge||(Te?h(X,re):h(H,_e)),h(X,W))}else Me.alongA===0&&(Me.alongB===-1?h(H,ae):Me.alongB===0?h(H,Me.pt):Me.alongB===1&&h(H,_e)),Me.alongB===0&&(Me.alongA===-1?h(X,W):Me.alongA===0?h(X,Me.pt):Me.alongA===1&&h(X,re));return!1}for(var S=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let H=function(){if(C){var X=k(L,C);if(X)return X}return M?k(L,M):!1};var V=H;r&&r.segmentNew(L.seg,L.primary);var _=E(L),C=_.before?_.before.ev:null,M=_.after?_.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var p=H();if(p){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(p.seg.myFill.above=!p.seg.myFill.above)}else p.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(p.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?x:v,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=_.insert(mM.node({ev:L}))}else{var F=L.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(F.prev)&&b.exists(F.next)&&k(F.prev.ev,F.next.ev),r&&r.statusRemove(F.ev.seg),F.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}S.push(L.seg)}a.getHead().remove()}return r&&r.done(),S}return e?{addRegion:function(v){for(var x,b=v[v.length-1],g=0;g{function fct(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,H,X){return c.index=V,c.matches_head=H,c.matches_pt1=X,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function yM(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 hct={union:function(e,t){return yM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return yM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return yM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return yM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return yM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Rce.exports=hct});var qce=ye((Tir,Fce)=>{var dct={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 vct=Sce(),pct=Ece(),Oce=Pce(),gct=Dce(),_M=zce(),Bce=qce(),E0=!1,xM=pct(),Ep;Ep={buildLog:function(e){return e===!0?E0=vct():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return xM.epsilon(e)},segments:function(e){var t=Oce(!0,xM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Oce(!1,xM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:_M.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:_M.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:_M.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:_M.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:_M.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:gct(e.segments,xM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Bce.toPolygon(Ep,e)},polygonToGeoJSON:function(e){return Bce.fromPolygon(Ep,xM,e)},union:function(e,t){return bM(e,t,Ep.selectUnion)},intersect:function(e,t){return bM(e,t,Ep.selectIntersect)},difference:function(e,t){return bM(e,t,Ep.selectDifference)},differenceRev:function(e,t){return bM(e,t,Ep.selectDifferenceRev)},xor:function(e,t){return bM(e,t,Ep.selectXor)}};function bM(e,t,r){var n=Ep.segments(e),i=Ep.segments(t),a=Ep.combine(n,i),o=r(a);return Ep.polygon(o)}typeof window=="object"&&(window.PolyBool=Ep);Nce.exports=Ep});var Hce=ye((Sir,Vce)=>{Vce.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;x&&(s=!s)}return s}});var wM=ye((Mir,Gce)=>{"use strict";var vN=g6().dot,cP=es().BADNUM,fP=Gce.exports={};fP.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||g===cP||go||x&&u(v))}function f(v,x){var b=v[0],g=v[1];if(b===cP||bi||g===cP||go)return!1;var E=r.length,k=r[0][0],S=r[0][1],L=0,_,C,M,p,P;for(_=1;_Math.max(C,k)||g>Math.max(M,S)))if(gs||Math.abs(vN(f,u))>i)return!0;return!1};fP.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 Wce=ye((Eir,jce)=>{"use strict";jce.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var vfe=ye((kir,dfe)=>{"use strict";var Zce=Uce(),mct=Hce(),SM=ba(),yct=ao().dashStyle,TM=va(),_ct=Nc(),xct=rp().makeEventData,LM=Sg(),bct=LM.freeMode,wct=LM.rectMode,MM=LM.drawMode,yN=LM.openMode,_N=LM.selectMode,Xce=f_(),Yce=cM(),efe=JL(),tfe=Q1().clearOutline,rfe=u_(),pN=rfe.handleEllipse,Tct=rfe.readPaths,Act=ZL().newShapes,Sct=VB(),Mct=dN().activateLastSelection,dP=Mr(),Ect=dP.sorterAsc,ife=wM(),AM=L6(),k0=af().getFromId,kct=lM(),Cct=gM().redrawReglTraces,vP=Wce(),Am=vP.MINSELECT,Lct=ife.filter,xN=ife.tester,bN=HL(),Kce=bN.p2r,Pct=bN.axValue,Ict=bN.getTransform;function wN(e){return e.subplot!==void 0}function Dct(e,t,r,n,i){var a=!wN(n),o=bct(i),s=wct(i),l=yN(i),u=MM(i),c=_N(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,x=v._fullLayout,b=c&&x.newselection.mode==="immediate"&&a,g=x._zoomlayer,E=n.element.getBoundingClientRect(),k=n.plotinfo,S=Ict(k),L=t-E.left,_=r-E.top;x._calcInverseTransform(v);var C=dP.apply3DTransform(x._invTransform)(L,_);L=C[0],_=C[1];var M=x._invScaleX,p=x._invScaleY,P=L,T=_,F="M"+L+","+_,q=n.xaxes[0],V=n.yaxes[0],H=q._length,X=V._length,G=e.altKey&&!(MM(i)&&l),N,W,re,ae,_e,Me,ke;afe(e,v,n),o&&(N=Lct([[L,_]],vP.BENDPX));var ge=g.selectAll("path.select-outline-"+k.id).data([1]),ie=u?x.newshape:x.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Te=u&&!l?ie.fillcolor:"rgba(0,0,0,0)",Ee=ie.line.color||(a?TM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:u?ie.opacity/2:1,"stroke-dasharray":yct(ie.line.dash,ie.line.width),"stroke-width":ie.line.width+"px","shape-rendering":"crispEdges"}).call(TM.stroke,Ee).call(TM.fill,Te).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",S).attr("d",F+"Z");var Ae=g.append("path").attr("class","zoombox-corners").style({fill:TM.background,stroke:TM.defaultLine,"stroke-width":1}).attr("transform",S).attr("d","M0,0Z");if(u&&n.hasText){var ze=g.select(".label-temp");ze.empty()&&(ze=g.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ce=x._uid+vP.SELECTID,me=[],De=pP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ge=q._id,nt=V._id;cfe(v,Ge,nt,De);for(var ct=(v.layout||{}).selections||[],qt=[],rt=!1,ot=0;ot=0){v._fullLayout._deactivateShape(v);return}if(!u){var ct=x.clickmode;AM.done(Ce).then(function(){if(AM.clear(Ce),Ge===2){for(ge.remove(),_e=0;_e-1&&nfe(nt,v,n.xaxes,n.yaxes,n.subplot,n,ge),ct==="event"&&CM(v,void 0);_ct.click(v,nt,k.id)}).catch(dP.error)}},n.doneFn=function(){Ae.remove(),AM.done(Ce).then(function(){AM.clear(Ce),!b&&ae&&n.selectionDefs&&(ae.subtract=G,n.selectionDefs.push(ae),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&EM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&CM(v,ke)}).catch(dP.error)}}function nfe(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,x,b,g,E,k,S,L;if(Oct(s)){afe(e,t,a),h=pP(t,r,n,i);var _=Bct(s,h),C=_.pointNumbers.length>0;if(C?Nct(h,_):Uct(h)&&(E=$ce(_))){for(o&&o.remove(),L=0;L=0}function qct(e){return e._fullLayout._activeSelectionIndex>=0}function EM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;Fct(i)&&i._fullLayout._deactivateShape(i),qct(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=MM(r),l=_N(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=Act(u,e)),c&&SM.call("_guiRelayout",i,{shapes:c});var f;l&&!wN(e)&&(f=Sct(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,SM.call("_guiRelayout",i,{selections:f}).then(function(){t&&Mct(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Jce(e){return e._id}function pP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(Jce),o=r.map(Jce),s,l,u;for(u=0;u0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Nct(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 kM(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var Ge=Qce(e,!0);if(Ge.length){var nt=Ge[0].xref,ct=Ge[0].yref;if(nt&&ct){var qt=ffe(Ge),rt=hfe([k0(e,nt,"x"),k0(e,ct,"y")]);rt(me,qt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&CM(e,me),h._reselect=!1}if(!o&&h._deselect){var ot=h._deselect;s=ot.xref,l=ot.yref,Gct(s,l,c)||cfe(e,s,l,n),ce&&(me.points.length?CM(e,me):SN(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Hct(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 PM=ye((Lir,gfe)=>{"use strict";gfe.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 Nb=ye((Iir,_fe)=>{"use strict";var mfe=MN(),yfe=Su(),gP=ad(),Yct=Vs().templatedArray,Pir=PM();_fe.exports=Yct("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:yfe({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:mfe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:mfe.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",gP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",gP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",gP.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",gP.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:yfe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Sm=ye((Dir,xfe)=>{"use strict";xfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Eg=ye((Rir,bfe)=>{"use strict";bfe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Uc=ye((zir,Efe)=>{"use strict";var wfe=Oc().axisHoverFormat,Kct=Wo().texttemplateAttrs,Jct=Wo().hovertemplateAttrs,Tfe=Kl(),$ct=Su(),Qct=Ed().dash,eft=Ed().pattern,tft=ao(),rft=Sm(),mP=no().extendFlat,ift=Eg();function Afe(e){return{valType:"any",dflt:0,editType:"calc"}}function Sfe(e){return{valType:"any",editType:"calc"}}function Mfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Efe.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:Afe("x"),yperiod:Afe("y"),xperiod0:Sfe("x0"),yperiod0:Sfe("y0"),xperiodalignment:Mfe("x"),yperiodalignment:Mfe("y"),xhoverformat:wfe("x"),yhoverformat:wfe("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:Kct({},{}),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:Jct({},{keys:rft.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:mP({},Qct,{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:ift(!0),fillgradient:mP({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:eft,marker:mP({symbol:{valType:"enumerated",values:tft.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:mP({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Tfe("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"},Tfe("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:$ct({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var EN=ye((qir,Lfe)=>{"use strict";var kfe=Nb(),Cfe=Uc().line,nft=Ed().dash,yP=no().extendFlat,aft=Bu().overrideAll,oft=Vs().templatedArray,Fir=PM();Lfe.exports=aft(oft("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:yP({},kfe.xref,{}),yref:yP({},kfe.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:Cfe.color,width:yP({},Cfe.width,{min:1,dflt:1}),dash:yP({},nft,{dflt:"dot"})}}),"arraydraw","from-root")});var Rfe=ye((Oir,Dfe)=>{"use strict";var Pfe=Mr(),_P=Qa(),sft=Zd(),lft=EN(),Ife=f_();Dfe.exports=function(t,r){sft(t,r,{name:"selections",handleItemDefaults:uft});for(var n=r.selections,i=0;i{"use strict";zfe.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 IM=ye((Nir,Bfe)=>{"use strict";var cft=ba(),qfe=Mr(),Ofe=af();Bfe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=cft.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 Nfe=dN(),DM=vfe();Ufe.exports={moduleType:"component",name:"selections",layoutAttributes:EN(),supplyLayoutDefaults:Rfe(),supplyDrawNewSelectionDefaults:Ffe(),includeBasePlot:IM()("selections"),draw:Nfe.draw,drawOne:Nfe.drawOne,reselect:DM.reselect,prepSelect:DM.prepSelect,clearOutline:DM.clearOutline,clearSelectionsCache:DM.clearSelectionsCache,selectOnClick:DM.selectOnClick}});var RN=ye((Vir,she)=>{"use strict";var IN=xa(),C0=Mr(),Vfe=C0.numberFormat,fft=id(),hft=EL(),xP=ba(),Jfe=C0.strTranslate,dft=Ll(),Hfe=va(),d_=ao(),vft=Nc(),Gfe=Qa(),pft=Tg(),gft=gv(),$fe=Sg(),bP=$fe.selectingOrDrawing,mft=$fe.freeMode,yft=Nh().FROM_TL,_ft=lM(),xft=gM().redrawReglTraces,bft=Yu(),CN=af().getFromId,wft=wf().prepSelect,Tft=wf().clearOutline,Aft=wf().selectOnClick,kN=aN(),DN=ad(),jfe=DN.MINDRAG,np=DN.MINZOOM,Wfe=!0;function Sft(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,x,b,g,E,k,S,L,_,C,M,p,P,T,F,q,V,H,X,G;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,k=f._length,S=h._length,g=f._offset,E=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var Et=t.overlays,dt=0;dt=0){Ht._fullLayout._deactivateShape(Ht);return}var $t=Ht._fullLayout.clickmode;if(PN(Ht),Et===2&&!c&&er(),u)$t.indexOf("select")>-1&&Aft(dt,Ht,x,b,t.id,ae),$t.indexOf("event")>-1&&vft.click(Ht,dt,t.id);else if(Et===1&&c){var fr=o?h:f,_r=o==="s"||s==="w"?0:1,Br=fr._name+".range["+_r+"]",Or=Mft(fr,_r),Nr="left",ut="middle";if(fr.fixedrange)return;o?(ut=o==="n"?"top":"bottom",fr.side==="right"&&(Nr="right")):s==="e"&&(Nr="right"),Ht._context.showAxisRangeEntryBoxes&&IN.select(re).call(dft.makeEditable,{gd:Ht,immediate:!0,background:Ht._fullLayout.paper_bgcolor,text:String(Or),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Nr,verticalAlign:ut}).on("edit",function(Ne){var Ye=fr.d2r(Ne);Ye!==void 0&&xP.call("_guiRelayout",Ht,Br,Ye)})}}gft.init(ae);var ke,ge,ie,Te,Ee,Ae,ze,Ce,me,De;function ce(Et,dt,Ht){var $t=re.getBoundingClientRect();ke=dt-$t.left,ge=Ht-$t.top,e._fullLayout._calcInverseTransform(e);var fr=C0.apply3DTransform(e._fullLayout._invTransform)(ke,ge);ke=fr[0],ge=fr[1],ie={l:ke,r:ke,w:0,t:ge,b:ge,h:0},Te=e._hmpixcount?e._hmlumcount/e._hmpixcount:fft(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+k+"V"+S+"H0V0",Ae=!1,ze="xy",De=!1,Ce=the(l,Te,g,E,Ee),me=rhe(l,g,E)}function Ge(Et,dt){if(e._transitioningWithDuration)return!1;var Ht=Math.max(0,Math.min(k,X*Et+ke)),$t=Math.max(0,Math.min(S,G*dt+ge)),fr=Math.abs(Ht-ke),_r=Math.abs($t-ge);ie.l=Math.min(ke,Ht),ie.r=Math.max(ke,Ht),ie.t=Math.min(ge,$t),ie.b=Math.max(ge,$t);function Br(){ze="",ie.r=ie.l,ie.t=ie.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)fr>np||_r>np?(ze="xy",fr/k>_r/S?(_r=fr*S/k,ge>$t?ie.t=ge-_r:ie.b=ge+_r):(fr=_r*k/S,ke>Ht?ie.l=ke-fr:ie.r=ke+fr),me.attr("d",wP(ie))):Br();else if(_.isSubplotConstrained)if(fr>np||_r>np){ze="xy";var Or=Math.min(ie.l/k,(S-ie.b)/S),Nr=Math.max(ie.r/k,(S-ie.t)/S);ie.l=Or*k,ie.r=Nr*k,ie.b=(1-Or)*S,ie.t=(1-Nr)*S,me.attr("d",wP(ie))}else Br();else!M||_r0){var Ne;if(_.isSubplotConstrained||!C&&M.length===1){for(Ne=0;Ne1&&(Br.maxallowed!==void 0&&P===(Br.range[0]1&&(Or.maxallowed!==void 0&&T===(Or.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function kft(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function the(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",Jfe(r,n)).attr("d",i+"Z")}function rhe(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:Hfe.background,stroke:Hfe.defaultLine,"stroke-width":1,opacity:0}).attr("transform",Jfe(t,r)).attr("d","M0,0Z")}function ihe(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"),nhe(e,t,i,a)}function nhe(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 PN(e){IN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ahe(e){Wfe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long"),Wfe=!1)}function Cft(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 Lft(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 wP(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 Yfe(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 Pft=xa(),TP=Nc(),Ift=gv(),Dft=Tg(),kg=RN().makeDragBox,ud=ad().DRAGGERSIZE;AP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Pft.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=kg(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]&&TP.hover(t,h,a)},TP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Ift.unhover(t,h))},t._context.showAxisDragHandles&&(kg(t,o,s._offset-ud,l._offset-ud,ud,ud,"n","w"),kg(t,o,s._offset+s._length,l._offset-ud,ud,ud,"n","e"),kg(t,o,s._offset-ud,l._offset+l._length,ud,ud,"s","w"),kg(t,o,s._offset+s._length,l._offset+l._length,ud,ud,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=ud),kg(t,o,s._offset+s._length*.1,c,s._length*.8,ud,"","ew"),kg(t,o,s._offset,c,s._length*.1,ud,"","w"),kg(t,o,s._offset+s._length*.9,c,s._length*.1,ud,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=ud),kg(t,o,f,l._offset+l._length*.1,ud,l._length*.8,"ns",""),kg(t,o,f,l._offset+l._length*.9,ud,l._length*.1,"s",""),kg(t,o,f,l._offset,ud,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,TP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,TP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},AP.updateFx(t)}};AP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Dft(t._draggers,r)}});var che=ye((Gir,uhe)=>{"use strict";var lhe=ba();uhe.exports=function(t){for(var r=lhe.layoutArrayContainers,n=lhe.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var Rft=gy(),FN=p6(),RM=H1(),zft=E6().sorterAsc,qN=ba();zM.containerArrayMatch=che();var Fft=zM.isAddVal=function(t){return t==="add"||Rft(t)},fhe=zM.isRemoveVal=function(t){return t===null||t==="remove"};zM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=qN.getComponentMethod(o,"supplyLayoutDefaults"),l=qN.getComponentMethod(o,"draw"),u=qN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===FN||l===FN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&RM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(fhe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return RM.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(zft),x=r.get(),b=x||[],g=a(h,o).get(),E=[],k=-1,S=b.length,L,_,C,M,p,P,T,F;for(L=0;Lb.length-(T?0:1)){RM.warn("index out of range",o,C);continue}if(P!==void 0)p.length>1&&RM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),fhe(P)?E.push(C):T?(P==="add"&&(P={}),b.splice(C,0,P),g&&g.splice(C,0,{})):RM.warn("Unrecognized full object edit value",o,C,P),k===-1&&(k=C);else for(_=0;_=0;L--)b.splice(E[L],1),g&&g.splice(E[L],1);if(b.length?x||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==FN){var q;if(k===-1)q=v;else{for(S=Math.max(b.length,S),q=[],L=0;L=k));L++)q.push(C);for(L=k;L{"use strict";var ghe=uo(),Wir=Cq(),mhe=ba(),kp=Mr(),FM=Yu(),yhe=af(),_he=va(),qM=yhe.cleanId,qft=yhe.getFromTrace,ON=mhe.traceIs;Cg.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&kp.log("Clearing previous rejected promises from queue."),e._promises=[]};Cg.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=(FM.subplotsRegistry.cartesian||{}).attrRegex,i=(FM.subplotsRegistry.polar||{}).attrRegex,a=(FM.subplotsRegistry.ternary||{}).attrRegex,o=(FM.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"),_he.clean(e),e.template&&e.template.layout&&Cg.cleanLayout(e.template.layout),e};function Y3(e,t){var r=e[t],n=t.charAt(0);r&&r!=="paper"&&(e[t]=qM(r,n,!0))}Cg.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}Cg.hasParent=function(e,t){for(var r=phe(t);r;){if(r in e)return!0;r=phe(r)}return!1};var Nft=["x","y","z"];Cg.clearAxisTypes=function(e,t,r){for(var n=0;n{"use strict";var kP=xa(),Uft=uo(),Vft=Jq(),sa=Mr(),Uu=sa.nestedProperty,UN=g3(),ap=nne(),L0=ba(),zP=_3(),Ho=Yu(),Nv=Qa(),Hft=hB(),Gft=Cd(),BN=ao(),jft=va(),Wft=zN().initInteractions,Zft=Zp(),Xft=wf().clearOutline,She=ub().dfltConfig,MP=hhe(),yh=xhe(),Jl=gM(),v_=Bu(),Yft=ad().AX_NAME_PATTERN,NN=0,bhe=5;function Kft(e,t,r,n){var i;if(e=sa.getGraphDiv(e),UN.init(e),sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=UN.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 pl.addFrames(e,i)}Ehe(e,n),r||(r={}),kP.select(e).classed("js-plotly-plot",!0),BN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(yh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=yh.cleanLayout(r)),Ho.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(yht(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),BN.initGradients(e),BN.initPatterns(e),l&&Nv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Ho.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 khe(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]),LP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&LP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function tht(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 F=M.parts[T],q=M.parts[T-1]+"."+F,V=M.parts.slice(0,T).join("."),H=Uu(e.layout,V).get(),X=Uu(n,V).get(),G=M.get();if(p!==void 0){g[C]=p,E[C]=F==="reverse"?p:Cy(G);var N=zP.getLayoutValObject(n,M.parts);if(N&&N.impliedEdits&&p!==null)for(var W in N.impliedEdits)k(sa.relativeAttr(C,W),N.impliedEdits[W]);if(["width","height"].indexOf(C)!==-1)if(p){k("autosize",null);var re=C==="height"?"width":"height";k(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")k("width",p?null:n.width),k("height",p?null:n.height);else if(q.match(qhe))_(q),Uu(n,V+"._inputRange").set(null);else if(q.match(Ohe)){_(q),Uu(n,V+"._inputRange").set(null);var ae=Uu(n,V).get();ae._inputDomain&&(ae._input.domain=ae._inputDomain.slice())}else q.match(Bhe)&&Uu(n,V+"._inputDomain").set(null);if(F==="type"){L=H;var _e=X.type==="linear"&&p==="log",Me=X.type==="log"&&p==="linear";if(_e||Me){if(!L||!L.range)k(V+".autorange",!0);else if(X.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var ke=L.range[0],ge=L.range[1];_e?(ke<=0&&ge<=0&&k(V+".autorange",!0),ke<=0?ke=ge/1e6:ge<=0&&(ge=ke/1e6),k(V+".range[0]",Math.log(ke)/Math.LN10),k(V+".range[1]",Math.log(ge)/Math.LN10)):(k(V+".range[0]",Math.pow(10,ke)),k(V+".range[1]",Math.pow(10,ge)))}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,X,p,k),L0.getComponentMethod("images","convertCoords")(e,X,p,k)}else k(V+".autorange",!0),k(V+".range",null);Uu(n,V+"._inputRange").set(null)}else if(F.match(Yft)){var ie=Uu(n,C).get(),Te=(p||{}).type;(!Te||Te==="-")&&(Te="linear"),L0.getComponentMethod("annotations","convertCoords")(e,ie,Te,k),L0.getComponentMethod("images","convertCoords")(e,ie,Te,k)}var Ee=MP.containerArrayMatch(C);if(Ee){c=Ee.array,f=Ee.index;var Ae=Ee.property,ze=N||{editType:"calc"};f!==""&&Ae===""&&(MP.isAddVal(p)?E[C]=null:MP.isRemoveVal(p)?E[C]=(Uu(r,c).get()||[])[f]:sa.warn("unrecognized full object value",t)),v_.update(b,ze),u[c]||(u[c]={});var Ce=u[c][f];Ce||(Ce=u[c][f]={}),Ce[Ae]=p,delete t[C]}else F==="reverse"?(H.range?H.range.reverse():(k(V+".autorange",!0),H.range=[1,0]),X.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(p===!1&&G!==!1||p!==!1&&G===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(p==="lasso"||p==="select")&&!(G==="lasso"||G==="select")?b.plot=!0:N?v_.update(b,N):b.calc=!0,M.set(p))}}for(c in u){var me=MP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var De in S){L=Nv.getFromId(e,De);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var Ge in ce)S[Ge]||(Nv.getFromId(e,Ge)._constraintShrinkable=!0)}}(Uhe(e)||t.height||t.width)&&(b.plot=!0);var nt=n.shapes;for(f=0;f1;)if(n.pop(),r=Uu(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function sht(e,t){for(var r=0;r=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 F=n._frameQueue.pop();F.onInterrupt&&F.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(F){if(F.length!==0){for(var q=0;qn._timeToNext&&v()};F()}var b=0;function g(F){return Array.isArray(i)?b>=i.length?F.transitionOpts=i[b]:F.transitionOpts=i[0]:F.transitionOpts=i,b++,F}var E,k,S=[],L=t==null,_=Array.isArray(t),C=!L&&!_&&sa.isPlainObject(t);if(C)S.push({type:"object",data:g(sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(E=0;E0&&PP)&&T.push(k);S=T}}S.length>0?h(S):(e.emit("plotly_animated"),u())})}function vht(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,x=l[d]||f[d];d&&v&&typeof v=="number"&&x&&NNM.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=Ho.modifyFrames,l=Ho.modifyFrames,u=[e,o],c=[e,a];return ap&&ap.add(e,s,u,l,c),Ho.modifyFrames(e,a)}function ght(e){e=sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Ho.cleanPlot([],{},r,t),Ho.purge(e),UN.purge(e),t._container&&t._container.remove(),delete e._context,e}function mht(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 yht(e){var t=kP.select(e),r=e._fullLayout;if(r._calcInverseTransform=mht,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),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={};kP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Zft.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")}pl.animate=dht;pl.addFrames=vht;pl.deleteFrames=pht;pl.addTraces=Dhe;pl.deleteTraces=Rhe;pl.extendTraces=Phe;pl.moveTraces=VN;pl.prependTraces=Ihe;pl.newPlot=eht;pl._doPlot=Kft;pl.purge=ght;pl.react=cht;pl.redraw=Qft;pl.relayout=OM;pl.restyle=PP;pl.setPlotConfig=Jft;pl.update=DP;pl._guiRelayout=GN(OM);pl._guiRestyle=GN(PP);pl._guiUpdate=GN(DP);pl._storeDirectGUIEdit=nht});var Ly=ye(Mm=>{"use strict";var _ht=ba();Mm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Mm.getRedrawFunc=function(e){return function(){_ht.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 Vhe=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return Vhe.createObjectURL(e)};Mm.revokeObjectURL=function(e){return Vhe.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=xht(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Mm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function xht(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var WN=xa(),Kir=Mr(),bht=ao(),wht=va(),Jir=Zp(),jN=/"/g,NM="TOBESTRIPPED",Tht=new RegExp('("'+NM+")|("+NM+'")',"g");function Aht(e){var t=WN.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 Sht(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Hhe.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(bht.setRect,0,0,s,l).call(wht.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u{"use strict";var Mht=Mr(),Eht=vb().EventEmitter,UM=Ly();function kht(e){var t=e.emitter||new Eht,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}),x=new a,b,g;s==="svg"||Mht.isSafari()?g=UM.encodeSVG(o):(b=UM.createBlob(o,"svg"),g=UM.createObjectURL(b)),l.width=h,l.height=d,x.onload=function(){var E;switch(b=null,UM.revokeObjectURL(g),s!=="svg"&&v.drawImage(x,0,0,h,d),s){case"jpeg":E=l.toDataURL("image/jpeg");break;case"png":E=l.toDataURL("image/png");break;case"webp":E=l.toDataURL("image/webp");break;case"svg":E=g;break;default:var k="Image format is not jpeg, png, svg or webp.";if(i(new Error(k)),!e.promise)return t.emit("error",k)}n(E),e.promise||t.emit("success",E)},x.onerror=function(E){if(b=null,UM.revokeObjectURL(g),i(E),!e.promise)return t.emit("error",E)},x.src=g});return e.promise?r:t}Ghe.exports=kht});var XN=ye((enr,Zhe)=>{"use strict";var jhe=uo(),Whe=qP(),Cht=Yu(),Em=Mr(),VM=Ly(),Lht=OP(),Pht=BP(),Iht=QC().version,ZN={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 Dht(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(_){return!(_ in t)||Em.validate(t[_],ZN[_])}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(ZN.format.values,", "," or ")+".");var s={};function l(_,C){return Em.coerce(t,s,ZN,_,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var b=Em.extendFlat({},n);c?b.width=c:t.width===null&&jhe(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&jhe(a.height)&&(b.height=a.height);var g=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),E=VM.getRedrawFunc(x);function k(){return new Promise(function(_){setTimeout(_,VM.getDelay(x._fullLayout))})}function S(){return new Promise(function(_,C){var M=Lht(x,u,h),p=x._fullLayout.width,P=x._fullLayout.height;function T(){Whe.purge(x),document.body.removeChild(x)}if(u==="full-json"){var F=Cht.graphJson(x,!1,"keepdata","object",!0,!0);return F.version=Iht,F=JSON.stringify(F),T(),_(v?F:VM.encodeJSON(F))}if(T(),u==="svg")return _(v?M:VM.encodeSVG(M));var q=document.createElement("canvas");q.id=Em.randstr(),Pht({format:u,width:p,height:P,scale:h,canvas:q,svg:M,promise:!0}).then(_).catch(C)})}function L(_){return v?_.replace(VM.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,C){Whe.newPlot(x,r,b,g).then(E).then(k).then(S).then(function(M){_(L(M))}).catch(function(M){C(M)})})}Zhe.exports=Dht});var Jhe=ye((tnr,Khe)=>{"use strict";var P0=Mr(),Rht=Yu(),zht=_3(),Fht=ub().dfltConfig,Lg=P0.isPlainObject,Vb=Array.isArray,Xhe=P0.isArrayOrTypedArray;Khe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=zht.get(),i=[],a={_context:P0.extendFlat({},Fht)},o,s;Vb(t)?(a.data=P0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(cd("array","data"))),Lg(r)?(a.layout=P0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(cd("object","layout"))),Rht.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&n.push(cd("unused",i,u.concat(f.length)));var g=f.length,E=Array.isArray(b);E&&(g=Math.min(g,b.length));var k,S,L,_,C;if(h.dimensions===2)for(S=0;Sf[S].length&&n.push(cd("unused",i,u.concat(S,f[S].length)));var M=f[S].length;for(k=0;k<(E?Math.min(M,b[S].length):M);k++)L=E?b[S][k]:b,_=c[S][k],C=f[S][k],P0.validate(_,L)?C!==_&&C!==+_&&n.push(cd("dynamic",i,u.concat(S,k),_,C)):n.push(cd("value",i,u.concat(S,k),_))}else n.push(cd("array",i,u.concat(S),c[S]));else for(S=0;S{"use strict";var Hht=Mr(),UP=Ly();function Ght(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=UP.createBlob(e,r),u=UP.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),UP.revokeObjectURL(u),l=null,o(t);if(Hht.isSafari()){var c=r==="svg"?",":";base64,";return UP.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}$he.exports=Ght});var YN=ye((nnr,tde)=>{"use strict";var ede=Mr(),jht=XN(),Wht=Qhe(),inr=Ly();function Zht(e,t){var r;return ede.isPlainObject(e)||(r=ede.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=jht(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Wht(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}tde.exports=Zht});var ode=ye(KN=>{"use strict";var Cp=Mr(),Lp=Cp.isPlainObject,rde=_3(),ide=Yu(),Xht=vl(),nde=Vs(),ade=ub().dfltConfig;KN.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:ade},{data:e.data,layout:e.layout}),ide.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={};HM(d,v,Kht.bind(null,d));var x=Cp.coerce(d,{},Xht,"type"),b=n.data[x];b||(b=n.data[x]=[]),b.push(v)}),HM(r,n.layout,Yht.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)&&VP(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;og?o.push({code:"unused",traceType:d,templateCount:b,dataCount:g}):g>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:g})}}function E(k,S){for(var L in k)if(L.charAt(0)!=="_"){var _=k[L],C=I0(k,L,S);Lp(_)?(Array.isArray(k)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:C,templateitemname:_.templateitemname}),E(_,C)):Array.isArray(_)&&Jht(_)&&E(_,C)}}if(E({data:l,layout:s},""),o.length)return o.map($ht)};function Jht(e){for(var t=0;t{"use strict";var Hh=qP();Sc._doPlot=Hh._doPlot;Sc.newPlot=Hh.newPlot;Sc.restyle=Hh.restyle;Sc.relayout=Hh.relayout;Sc.redraw=Hh.redraw;Sc.update=Hh.update;Sc._guiRestyle=Hh._guiRestyle;Sc._guiRelayout=Hh._guiRelayout;Sc._guiUpdate=Hh._guiUpdate;Sc._storeDirectGUIEdit=Hh._storeDirectGUIEdit;Sc.react=Hh.react;Sc.extendTraces=Hh.extendTraces;Sc.prependTraces=Hh.prependTraces;Sc.addTraces=Hh.addTraces;Sc.deleteTraces=Hh.deleteTraces;Sc.moveTraces=Hh.moveTraces;Sc.purge=Hh.purge;Sc.addFrames=Hh.addFrames;Sc.deleteFrames=Hh.deleteFrames;Sc.animate=Hh.animate;Sc.setPlotConfig=Hh.setPlotConfig;var Qht=RS().getGraphDiv,edt=tP().eraseActiveShape;Sc.deleteActiveShape=function(e){return edt(Qht(e))};Sc.toImage=XN();Sc.validate=Jhe();Sc.downloadImage=YN();var sde=ode();Sc.makeTemplate=sde.makeTemplate;Sc.validateTemplate=sde.validateTemplate});var K3=ye((snr,ude)=>{"use strict";var JN=Mr(),tdt=ba();ude.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=tdt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=JN.minRowLength(a);o?s=Math.min(u,JN.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=JN.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Pg=ye((lnr,hde)=>{"use strict";var cde=Mr().dateTick0,rdt=es(),idt=rdt.ONEWEEK;function fde(e,t){return e%idt===0?cde(t,1):cde(t,0)}hde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",fde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",fde(s,r.ycalendar)),i("yperiodalignment"))}}});var pde=ye((unr,vde)=>{"use strict";var dde=["orientation","groupnorm","stackgaps"];vde.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 gde=va(),mde=Rv().hasColorscale,yde=Uh(),ndt=lu();_de.exports=function(t,r,n,i,a,o){var s=ndt.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),mde(t,"marker")&&yde(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=gde.background:u=gde.defaultLine,a("marker.line.color",u),mde(t,"marker.line")&&yde(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 D0=ye((fnr,xde)=>{"use strict";var adt=Mr().isArrayOrTypedArray,odt=Rv().hasColorscale,sdt=Uh();xde.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),odt(t,"line"))sdt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(adt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var J3=ye((hnr,bde)=>{"use strict";bde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var R0=ye((dnr,wde)=>{"use strict";var ldt=Mr();wde.exports=function(e,t,r,n,i){i=i||{},n("textposition"),ldt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Ig=ye((vnr,Ade)=>{"use strict";var GP=va(),Tde=Mr().isArrayOrTypedArray;function udt(e){for(var t=GP.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var Sde=Mr(),cdt=ba(),fdt=Uc(),hdt=Sm(),$3=lu(),ddt=K3(),vdt=Pg(),pdt=pde(),gdt=$p(),mdt=D0(),Mde=J3(),ydt=R0(),_dt=Ig(),xdt=Mr().coercePattern;Ede.exports=function(t,r,n,i){function a(d,v){return Sde.coerce(t,r,fdt,d,v)}var o=ddt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){vdt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=pdt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var bdt=Bb().getAxisGroup;Cde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=bdt(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,x=v[d];r._offsetIndex=0,(a!=="group"||d)&&(x||(x=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=x.offsetIndex)}});var $N=ye((mnr,Lde)=>{"use strict";var wdt=Mr(),Tdt=Hb(),Adt=Uc();Lde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return wdt.coerce(i._input,i,Adt,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 Ide=ye((ynr,Pde)=>{"use strict";var Sdt=Mr(),Mdt=U6();Pde.exports=function(e,t){function r(i,a){return Sdt.coerce(e,t,Mdt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var Dg=ye((_nr,Rde)=>{"use strict";var Edt=uo(),Dde=Mr(),kdt=Dde.dateTime2ms,jP=Dde.incrementMonth,Cdt=es(),Ldt=Cdt.ONEAVGMONTH;Rde.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(Edt(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=kdt(h,u)||0,v=[],x=[],b=[],g=i.length,E=0;Ek;)_=jP(_,-s,u);for(;_<=k;)_=jP(_,s,u);L=jP(_,-s,u)}else{for(S=Math.round((k-d)/o),_=d+S*o;_>k;)_-=o;for(;_<=k;)_+=o;L=_-o}v[E]=c?L:f?_:(L+_)/2,x[E]=L,b[E]=_}return{vals:v,starts:x,ends:b}}});var z0=ye((xnr,Fde)=>{"use strict";var QN=Rv().hasColorscale,eU=zv(),zde=lu();Fde.exports=function(t,r){zde.hasLines(r)&&QN(r,"line")&&eU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),zde.hasMarkers(r)&&(QN(r,"marker")&&eU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),QN(r,"marker.line")&&eU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var km=ye((bnr,qde)=>{"use strict";var Rf=Mr();qde.exports=function(t,r){for(var n=0;n{"use strict";var Ode=Mr();Bde.exports=function(t,r){Ode.isArrayOrTypedArray(r.selectedpoints)&&Ode.tagSelected(t,r)}});var q0=ye((Tnr,Wde)=>{"use strict";var Nde=uo(),rU=Mr(),GM=Qa(),Ude=Dg(),tU=es().BADNUM,iU=lu(),Pdt=z0(),Idt=km(),Ddt=F0();function Rdt(e,t){var r=e._fullLayout,n=t._xA=GM.getFromId(e,t.xaxis||"x","x"),i=t._yA=GM.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=Ude(t,n,"x",a),l=Ude(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=nU(t,r,n,i),x=!1,b,g,E,k,S,L;Gde(r,t);var _="x",C="y",M;if(v)rU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",M="x"):(_="s",M="y"),S=v.stackgaps==="interpolate";else{var p=Hde(t,f);Vde(e,t,n,i,u,c,p)}var P=!!t.xperiodalignment,T=!!t.yperiodalignment;for(g=0;gg&&h[k].gap;)k--;for(L=h[k].s,E=h.length-1;E>k;E--)h[E].s=L;for(;g{"use strict";Zde.exports=WP;var zdt=Mr().distinctVals;function WP(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 O0=uo(),p_=Mr().isArrayOrTypedArray,Q3=es().BADNUM,Fdt=ba(),jM=Qa(),qdt=Bb().getAxisGroup,ZP=Xde();function Odt(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||!O0(s))}for(var c=0;c{"use strict";var Qde=q0(),eve=Gb().setGroupPositions;function Kdt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;up[c]&&c{"use strict";var $dt=ao(),ove=es(),WM=ove.BADNUM,sve=ove.LOG_CLIP,ive=sve+.5,nve=sve-.5,XP=Mr(),Qdt=XP.segmentsIntersect,ave=XP.constrain,cU=Sm();lve.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,x=v==="linear",b=n.fill&&n.fill!=="none",g=[],E=cU.minTolerance,k=t.length,S=new Array(k),L=0,_,C,M,p,P,T,F,q,V,H,X,G,N,W,re,ae;function _e(ut){var Ne=t[ut];if(!Ne)return!1;var Ye=r.linearized?i.l2p(Ne.x):i.c2p(Ne.x),Ve=r.linearized?a.l2p(Ne.y):a.c2p(Ne.y);if(Ye===WM){if(o&&(Ye=i.c2p(Ne.x,!0)),Ye===WM)return!1;s&&Ve===WM&&(Ye*=Math.abs(i._m*u*(i._m>0?ive:nve)/(a._m*l*(a._m>0?ive:nve)))),Ye*=1e3}if(Ve===WM){if(s&&(Ve=a.c2p(Ne.y,!0)),Ve===WM)return!1;Ve*=1e3}return[Ye,Ve]}function Me(ut,Ne,Ye,Ve){var Xe=Ye-ut,ht=Ve-Ne,Le=.5-ut,xe=.5-Ne,Se=Xe*Xe+ht*ht,lt=Xe*Le+ht*xe;if(lt>0&<1||Math.abs(Le.y-Ye[0][1])>1)&&(Le=[Le.x,Le.y],Ve&&Te(Le,ut)ze||ut[1]me)return[ave(ut[0],Ae,ze),ave(ut[1],Ce,me)]}function kt(ut,Ne){if(ut[0]===Ne[0]&&(ut[0]===Ae||ut[0]===ze)||ut[1]===Ne[1]&&(ut[1]===Ce||ut[1]===me))return!0}function Ct(ut,Ne){var Ye=[],Ve=Dt(ut),Xe=Dt(Ne);return Ve&&Xe&&kt(Ve,Xe)||(Ve&&Ye.push(Ve),Xe&&Ye.push(Xe)),Ye}function Yt(ut,Ne,Ye){return function(Ve,Xe){var ht=Dt(Ve),Le=Dt(Xe),xe=[];if(ht&&Le&&kt(ht,Le))return xe;ht&&xe.push(ht),Le&&xe.push(Le);var Se=2*XP.constrain((Ve[ut]+Xe[ut])/2,Ne,Ye)-((ht||Ve)[ut]+(Le||Xe)[ut]);if(Se){var lt;ht&&Le?lt=Se>0==ht[ut]>Le[ut]?ht:Le:lt=ht||Le,lt[ut]+=Se}return xe}}var xr;v==="linear"||v==="spline"?xr=ot:v==="hv"||v==="vh"?xr=Ct:v==="hvh"?xr=Yt(0,Ae,ze):v==="vhv"&&(xr=Yt(1,Ce,me));function er(ut,Ne){var Ye=Ne[0]-ut[0],Ve=(Ne[1]-ut[1])/Ye,Xe=(ut[1]*Ne[0]-Ne[1]*ut[0])/Ye;return Xe>0?[Ve>0?Ae:ze,me]:[Ve>0?ze:Ae,Ce]}function Ke(ut){var Ne=ut[0],Ye=ut[1],Ve=Ne===S[L-1][0],Xe=Ye===S[L-1][1];if(!(Ve&&Xe))if(L>1){var ht=Ne===S[L-2][0],Le=Ye===S[L-2][1];Ve&&(Ne===Ae||Ne===ze)&&ht?Le?L--:S[L-1]=ut:Xe&&(Ye===Ce||Ye===me)&&Le?ht?L--:S[L-1]=ut:S[L++]=ut}else S[L++]=ut}function xt(ut){S[L-1][0]!==ut[0]&&S[L-1][1]!==ut[1]&&Ke([nt,ct]),Ke(ut),qt=null,nt=ct=0}var bt=XP.isArrayOrTypedArray(f);function Lt(ut){if(ut&&c&&(ut.i=_,ut.d=t,ut.trace=n,ut.marker=bt?f[ut.i]:f,ut.backoff=c),ke=ut[0]/l,ge=ut[1]/u,ce=ut[0]ze?ze:0,Ge=ut[1]me?me:0,ce||Ge){if(!L)S[L++]=[ce||ut[0],Ge||ut[1]];else if(qt){var Ne=xr(qt,ut);Ne.length>1&&(xt(Ne[0]),S[L++]=Ne[1])}else rt=xr(S[L-1],ut)[0],S[L++]=rt;var Ye=S[L-1];ce&&Ge&&(Ye[0]!==ce||Ye[1]!==Ge)?(qt&&(nt!==ce&&ct!==Ge?Ke(nt&&ct?er(qt,ut):[nt||ce,ct||Ge]):nt&&ct&&Ke([nt,ct])),Ke([ce,Ge])):nt-ce&&ct-Ge&&Ke([ce||nt,Ge||ct]),qt=ut,nt=ce,ct=Ge}else qt&&xt(xr(qt,ut)[0]),S[L++]=ut}for(_=0;_ie(T,St))break;M=T,N=V[0]*q[0]+V[1]*q[1],N>X?(X=N,p=T,F=!1):N=t.length||!T)break;Lt(T),C=T}}qt&&Ke([nt||qt[0],ct||qt[1]]),g.push(S.slice(0,L))}var Et=v.slice(v.length-1);if(c&&Et!=="h"&&Et!=="v"){for(var dt=!1,Ht=-1,$t=[],fr=0;fr{"use strict";var uve={tonextx:1,tonexty:1,tonext:1};cve.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 Rg=xa(),evt=ba(),ZM=Mr(),tT=ZM.ensureSingle,hve=ZM.identity,zf=ao(),rT=lu(),tvt=fU(),rvt=hU(),YP=wM().tester;dve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=rvt(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(),ivt(t,s,r),c){o&&(l=o());var h=Rg.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){fve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){fve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function ivt(e,t,r){t.each(function(n){var i=tT(Rg.select(this),"g","fills");zf.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,hve);s.enter().append("g"),s.exit().each(function(l){a[l]=null}).remove(),s.order().each(function(l){a[l]=tT(Rg.select(this),"path","js-fill")})})}function fve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;nvt(e,t,r,n,i);var u=!!o&&o.duration>0;function c(Yt){return u?Yt.transition():Yt}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,x=Rg.select(a),b=tT(x,"g","errorbars"),g=tT(x,"g","lines"),E=tT(x,"g","points"),k=tT(x,"g","text");if(evt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(x).style("opacity",d.opacity);var S,L,_=d.fill.charAt(d.fill.length-1);_!=="x"&&_!=="y"&&(_="");var C,M;_==="y"?(C=1,M=h.c2p(0,!0)):_==="x"&&(C=0,M=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var p="",P=[],T=d._prevtrace,F=null,q=null;T&&(p=T._prevRevpath||"",L=T._nextFill,P=T._ownPolygons,F=T._fillsegments,q=T._fillElement);var V,H,X="",G="",N,W,re,ae,_e,Me,ke=[];d._polygons=[];var ge=[],ie=[],Te=ZM.noop;if(S=d._ownFill,rT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=zf.steps(v.shape),W=zf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=W=function(Yt){var xr=Yt[Yt.length-1];return Yt.length>1&&Yt[0][0]===xr[0]&&Yt[0][1]===xr[1]?zf.smoothclosed(Yt.slice(1),v.smoothing):zf.smoothopen(Yt,v.smoothing)}:N=W=function(Yt){return"M"+Yt.join("L")},re=function(Yt){return W(Yt.reverse())},ie=tvt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(ie.length);var Ee=0;for(l=0;l=s[0]&&x.x<=s[1]&&x.y>=l[0]&&x.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(x,b){var g=x[0].trace;rT.hasMarkers(g)&&g.marker.maxdisplayed>0&&b{"use strict";vve.exports={container:"marker",min:"cmin",max:"cmax"}});var JP=ye((Pnr,pve)=>{"use strict";var KP=Qa();pve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=KP.getFromTrace(a,r,"x"),s=KP.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=KP.tickText(o,o.c2l(l),!0).text,i.yLabel=KP.tickText(s,s.c2l(u),!0).text,i}});var op=ye((Inr,gve)=>{"use strict";var dU=xa(),nT=ao(),avt=ba();function ovt(e){var t=dU.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=dU.select(this),i=r.trace||r[0].trace;vU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=dU.select(this),i=r.trace||r[0].trace;pU(n,i,e)}),t.selectAll("g.trace path.js-line").call(nT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nT.fillGroupStyle,e,!1),avt.getComponentMethod("errorbars","style")(t)}function vU(e,t,r){nT.pointStyle(e.selectAll("path.point"),t,r)}function pU(e,t,r){nT.textPointStyle(e.selectAll("text"),t,r)}function svt(e,t,r){var n=t[0].trace;n.selectedpoints?(nT.selectedPointStyle(r.selectAll("path.point"),n),nT.selectedTextStyle(r.selectAll("text"),n)):(vU(r,n,e),pU(r,n,e))}gve.exports={style:ovt,stylePoints:vU,styleText:pU,styleOnSelect:svt}});var oT=ye((Dnr,mve)=>{"use strict";var aT=va(),lvt=lu();mve.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&aT.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&&aT.opacity(a)?a:o&&aT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?aT.opacity(i)<.3?aT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&aT.opacity(n)&&lvt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var sT=ye((Rnr,_ve)=>{"use strict";var $P=Mr(),yve=Nc(),uvt=ba(),cvt=oT(),gU=va(),fvt=$P.fillText;_ve.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,x=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(G){if(v){var N=s.c2p(G.xStart),W=s.c2p(G.xEnd);return u>=Math.min(N,W)&&u<=Math.max(N,W)?0:1/0}var re=Math.max(3,G.mrc||0),ae=1-1/re,_e=Math.abs(s.c2p(G.x)-u);return _e=Math.min(N,W)&&c<=Math.max(N,W)?0:1/0}var re=Math.max(3,G.mrc||0),ae=1-1/re,_e=Math.abs(l.c2p(G.y)-c);return _eke!=me>=ke&&(Ae=Te[ie-1][0],ze=Te[ie][0],me-Ce&&(Ee=Ae+(ze-Ae)*(ke-Ce)/(me-Ce),re=Math.min(re,Ee),ae=Math.max(ae,Ee)));return re=Math.max(re,0),ae=Math.min(ae,s._length),{x0:re,x1:ae,y0:ke,y1:ke}}if(h.indexOf("fills")!==-1&&o._fillElement){var V=F(o._fillElement)&&!F(o._fillExclusionElement);if(V){var H=q(o._polygons);H===null&&(H={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var X=gU.defaultLine;return gU.opacity(o.fillcolor)?X=o.fillcolor:gU.opacity((o.line||{}).color)&&(X=o.line.color),$P.extendFlat(t,{distance:t.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:X,hovertemplate:!1}),delete t.index,o.text&&!$P.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var lT=ye((znr,bve)=>{"use strict";var xve=lu();bve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!xve.hasMarkers(s)&&!xve.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";wve.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var yU=ye((qnr,Mve)=>{"use strict";var XM=ba().traceIs,mU=L3();Mve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(hvt(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function hvt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=dvt(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:!XM(a,"cartesian")||XM(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,Sve(a,n)){var u=Ave(a),c=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(Sve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Ave(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Sve(e,t){var r=Ave(e),n=XM(e,"box-violin"),i=XM(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var QP=ye((Onr,Eve)=>{"use strict";var vvt=vv().isTypedArraySpec;function pvt(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||vvt(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=pvt(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var YM=ye((Bnr,Cve)=>{"use strict";var kve=id().mix,gvt=dh(),mvt=Mr();Cve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(C,M){return mvt.coerce2(t,r,i.attributes,C,M)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=kve(a,i.bgColor,i.blend||gvt.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 x=kve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",x),g=o("minor.gridwidth",r.gridwidth||1),E=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!b||!!g||!!E);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var S=o("zerolinecolor",a),L=o("zerolinewidth"),_=n("zeroline",i.showGrid||!!S||!!L);_||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var JM=ye((Nnr,zve)=>{"use strict";var Lve=uo(),yvt=ba(),KM=Mr(),_vt=Vs(),xvt=Zd(),_U=Cd(),Pve=xb(),Ive=T3(),bvt=e_(),wvt=t_(),Tvt=QP(),Avt=YM(),Svt=hB(),Dve=ym(),eI=ad().WEEKDAY_PATTERN,Mvt=ad().HOUR_PATTERN;zve.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=yvt.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=KM.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"),Dve(r,a),Svt(t,r,n,i),Tvt(t,r,n,i),f!=="category"&&!i.noHover&&n("hoverformat");var x=n("color"),b=x!==_U.color.dflt?x:s.color,g=l.label||a._dfltTitle[o];if(wvt(t,r,n,f,i),!u)return r;n("title.text",g),KM.coerceFont(n,"title.font",s,{overrideDflt:{size:KM.bigFont(s.size),color:b}}),Pve(t,r,n,f);var E=i.hasMinor;if(E&&(_vt.newContainer(r,"minor"),Pve(t,r,n,f,{isMinor:!0})),bvt(t,r,n,f,i),Ive(t,r,n,i),E){var k=i.isMinor;i.isMinor=!0,Ive(t,r,n,i),i.isMinor=k}Avt(t,r,n,{dfltColor:x,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:E,attributes:_U}),E&&!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)){var L;S&&(L="boundaries");var _=n("tickson",L);_==="boundaries"&&delete r.ticklabelposition}if(S){var C=n("showdividers");C&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(xvt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Evt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var M=0;M=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=Rve(a[s]),l){o=eI;break}}var u=n("pattern",o);if(u===eI)for(s=0;s<2;s++)l=Rve(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case eI:if(!Lve(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 Mvt:if(!Lve(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 Cvt=uo(),tI=Mr();Fve.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,x;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||(Cvt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,x=!1;var b=tI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),g=tI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var E=n("autoshift");E&&(d=g==="left"?u[0]:u[1],x=r.automargin?r.automargin:!0,v=g==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",x);var k=!1;if(o.length&&(k=tI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var S=n("domain",f);S[0]>S[1]-1/4096&&(r.domain=f),tI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var jve=ye((Vnr,Gve)=>{"use strict";var jb=Mr(),qve=va(),Lvt=rp().isUnifiedHover,Pvt=OB(),Ove=Vs(),Ivt=s3(),Bve=Cd(),Dvt=yU(),Nve=JM(),Rvt=Bb(),Uve=rI(),bU=af(),Cm=bU.id2name,Vve=bU.name2id,zvt=ad().AX_ID_PATTERN,Hve=ba(),iI=Hve.traceIs,xU=Hve.getComponentMethod;function nI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}Gve.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},x,b;for(x=0;x{"use strict";var Fvt=xa(),Wve=ba(),aI=Mr(),Qp=ao(),oI=Qa();Zve.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){oI.redrawComponents(t);return}function o(b){var g=b.xaxis,E=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,g._offset,E._offset).call(Qp.setScale,1,1);var k=b.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(Qp.setPointGroupScale,1,1),k.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),k.call(Qp.hideOutsideRangePoints,b)}function s(b,g){var E=b.plotinfo,k=E.xaxis,S=E.yaxis,L=k._length,_=S._length,C=!!b.xr1,M=!!b.yr1,p=[];if(C){var P=aI.simpleMap(b.xr0,k.r2l),T=aI.simpleMap(b.xr1,k.r2l),F=P[1]-P[0],q=T[1]-T[0];p[0]=(P[0]*(1-g)+g*T[0]-P[0])/(P[1]-P[0])*L,p[2]=L*(1-g+g*q/F),k.range[0]=k.l2r(P[0]*(1-g)+g*T[0]),k.range[1]=k.l2r(P[1]*(1-g)+g*T[1])}else p[0]=0,p[2]=L;if(M){var V=aI.simpleMap(b.yr0,S.r2l),H=aI.simpleMap(b.yr1,S.r2l),X=V[1]-V[0],G=H[1]-H[0];p[1]=(V[1]*(1-g)+g*H[1]-V[1])/(V[0]-V[1])*_,p[3]=_*(1-g+g*G/X),S.range[0]=k.l2r(V[0]*(1-g)+g*H[0]),S.range[1]=S.l2r(V[1]*(1-g)+g*H[1])}else p[1]=0,p[3]=_;oI.drawOne(t,k,{skipTitle:!0}),oI.drawOne(t,S,{skipTitle:!0}),oI.redrawComponents(t,[k._id,S._id]);var N=C?L/p[2]:1,W=M?_/p[3]:1,re=C?p[0]:0,ae=M?p[1]:0,_e=C?p[0]/p[2]*L:0,Me=M?p[1]/p[3]*_:0,ke=k._offset-_e,ge=S._offset-Me;E.clipRect.call(Qp.setTranslate,re,ae).call(Qp.setScale,1/N,1/W),E.plot.call(Qp.setTranslate,ke,ge).call(Qp.setScale,N,W),Qp.setPointGroupScale(E.zoomScalePts,1/N,1/W),Qp.setTextPointsScale(E.zoomScaleTxt,1/N,1/W)}var l;i&&(l=i());function u(){for(var b={},g=0;gn.duration?(u(),d=window.cancelAnimationFrame(x)):d=window.requestAnimationFrame(x)}return f=Date.now(),d=window.requestAnimationFrame(x),Promise.resolve()}});var Jf=ye(yv=>{"use strict";var lI=xa(),Yve=ba(),Wb=Mr(),qvt=Yu(),Ovt=ao(),Kve=kd().getModuleCalcData,g_=af(),zg=ad(),Bvt=Zp(),Fl=Wb.ensureSingle;function sI(e,t,r){return Wb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Zb=zg.zindexSeparator;yv.name="cartesian";yv.attr=["xaxis","yaxis"];yv.idRoot=["x","y"];yv.idRegex=zg.idRegex;yv.attrRegex=zg.attrRegex;yv.attributes=Tve();yv.layoutAttributes=Cd();yv.supplyLayoutDefaults=jve();yv.transitionAxes=Xve();yv.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=Wb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],x,b=0;b1&&(L+=Zb+S),k.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=Fl(n,"path","xlines-above"),t.ylines=Fl(n,"path","ylines-above"),t.xaxislayer=Fl(n,"g","xaxislayer-above"),t.yaxislayer=Fl(n,"g","yaxislayer-above");else{if(!o){var h=Fl(n,"g","layer-subplot");t.shapelayer=Fl(h,"g","shapelayer"),t.imagelayer=Fl(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=Fl(n,"g","minor-gridlayer"),t.gridlayer=Fl(n,"g","gridlayer"),t.zerolinelayer=Fl(n,"g","zerolinelayer"));var d=Fl(n,"g","layer-between");t.shapelayerBetween=Fl(d,"g","shapelayer"),t.imagelayerBetween=Fl(d,"g","imagelayer"),Fl(n,"path","xlines-below"),Fl(n,"path","ylines-below"),t.overlinesBelow=Fl(n,"g","overlines-below"),Fl(n,"g","xaxislayer-below"),Fl(n,"g","yaxislayer-below"),t.overaxesBelow=Fl(n,"g","overaxes-below")}t.overplot=Fl(n,"g","overplot"),t.plot=Fl(t.overplot,"g",i),o||(t.xlines=Fl(n,"path","xlines-above"),t.ylines=Fl(n,"path","ylines-above"),t.overlinesAbove=Fl(n,"g","overlines-above"),Fl(n,"g","xaxislayer-above"),Fl(n,"g","yaxislayer-above"),t.overaxesAbove=Fl(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,x=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,Fl(f.overlinesBelow,"path",x),Fl(f.overlinesBelow,"path",b),Fl(f.overaxesBelow,"g",x),Fl(f.overaxesBelow,"g",b),t.plot=Fl(f.overplot,"g",i),Fl(f.overlinesAbove,"path",x),Fl(f.overlinesAbove,"path",b),Fl(f.overaxesAbove,"g",x),Fl(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+x),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+x),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(sI(t.minorGridlayer,"g",t.xaxis._id),sI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(g){return g[0]}).sort(g_.idSort),sI(t.gridlayer,"g",t.xaxis._id),sI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(g){return g[0]}).sort(g_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Qve(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=lI.select(this);c.remove(),epe(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 uI=lu();tpe.exports={hasLines:uI.hasLines,hasMarkers:uI.hasMarkers,hasText:uI.hasText,isBubble:uI.isBubble,attributes:Uc(),layoutAttributes:U6(),supplyDefaults:kde(),crossTraceDefaults:$N(),supplyLayoutDefaults:Ide(),calc:q0().calc,crossTraceCalc:rve(),arraysToCalcdata:km(),plot:iT(),colorbar:Kd(),formatLabels:JP(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:sT(),selectPoints:lT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Jf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var ape=ye((Wnr,npe)=>{"use strict";var Uvt=xa(),Vvt=va(),ipe=MN(),wU=Mr(),Hvt=wU.strScale,Gvt=wU.strRotate,jvt=wU.strTranslate;npe.exports=function(t,r,n){var i=t.node(),a=ipe[n.arrowhead||0],o=ipe[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,x,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var g=d.x-v.x,E=d.y-v.y;if(x=Math.atan2(E,g),b=x+Math.PI,f&&h&&f+h>Math.sqrt(g*g+E*E)){V();return}if(f){if(f*f>g*g+E*E){V();return}var k=f*Math.cos(x),S=f*Math.sin(x);v.x+=k,v.y+=S,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>g*g+E*E){V();return}var L=h*Math.cos(x),_=h*Math.sin(x);d.x-=L,d.y-=_,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C{"use strict";var ope=xa(),TU=ba(),Wvt=Yu(),y_=Mr(),AU=y_.strTranslate,QM=Qa(),Xb=va(),Py=ao(),spe=Nc(),SU=Ll(),MU=Tg(),$M=gv(),Zvt=Vs().arrayEditor,Xvt=ape();cpe.exports={draw:Yvt,drawOne:lpe,drawRaw:upe};function Yvt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Xe="right":Xe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Xe]}for(var Ce=!1,me=["x","y"],De=0;De1)&&(nt===Ge?(St=ct.r2fraction(t["a"+ce]),(St<0||St>1)&&(Ce=!0)):Ce=!0),xr=ct._offset+ct.r2p(t[ce]),xt=.5}else{var Et=Lt==="domain";ce==="x"?(Ke=t[ce],xr=Et?ct._offset+ct._length*Ke:xr=s.l+s.w*Ke):(Ke=1-t[ce],xr=Et?ct._offset+ct._length*Ke:xr=s.t+s.h*Ke),xt=t.showarrow?.5:Ke}if(t.showarrow){Yt.head=xr;var dt=t["a"+ce];if(bt=rt*ze(.5,t.xanchor)-ot*ze(.5,t.yanchor),nt===Ge){var Ht=QM.getRefType(nt);Ht==="domain"?(ce==="y"&&(dt=1-dt),Yt.tail=ct._offset+ct._length*dt):Ht==="paper"?ce==="y"?(dt=1-dt,Yt.tail=s.t+s.h*dt):Yt.tail=s.l+s.w*dt:Yt.tail=ct._offset+ct.r2p(dt),er=bt}else Yt.tail=xr+dt,er=bt+dt;Yt.text=Yt.tail+bt;var $t=o[ce==="x"?"width":"height"];if(Ge==="paper"&&(Yt.head=y_.constrain(Yt.head,1,$t-1)),nt==="pixel"){var fr=-Math.max(Yt.tail-3,Yt.text),_r=Math.min(Yt.tail+3,Yt.text)-$t;fr>0?(Yt.tail+=fr,Yt.text+=fr):_r>0&&(Yt.tail-=_r,Yt.text-=_r)}Yt.tail+=Ct,Yt.head+=Ct}else bt=Dt*ze(xt,kt),er=bt,Yt.text=xr+bt;Yt.text+=Ct,bt+=Ct,er+=Ct,t["_"+ce+"padplus"]=Dt/2+er,t["_"+ce+"padminus"]=Dt/2-er,t["_"+ce+"size"]=Dt,t["_"+ce+"shift"]=bt}if(Ce){C.remove();return}var Br=0,Or=0;if(t.align!=="left"&&(Br=(ie-ke)*(t.align==="center"?.5:1)),t.valign!=="top"&&(Or=(Te-ge)*(t.valign==="middle"?.5:1)),_e)ae.select("svg").attr({x:P+Br-1,y:P+Or}).call(Py.setClipUrl,F?x:null,e);else{var Nr=P+Or-Me.top,ut=P+Br-Me.left;X.call(SU.positionText,ut,Nr).call(Py.setClipUrl,F?x:null,e)}q.select("rect").call(Py.setRect,P,P,ie,Te),T.call(Py.setRect,M/2,M/2,Ee-M,Ae-M),C.call(Py.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Ae/2)),k.attr({transform:"rotate("+g+","+b.x.text+","+b.y.text+")"});var Ne=function(Ve,Xe){E.selectAll(".annotation-arrow-g").remove();var ht=b.x.head,Le=b.y.head,xe=b.x.tail+Ve,Se=b.y.tail+Xe,lt=b.x.text+Ve,Gt=b.y.text+Xe,Vt=y_.rotationXYMatrix(g,lt,Gt),ar=y_.apply2DTransform(Vt),Qr=y_.apply2DTransform2(Vt),ai=+T.attr("width"),jr=+T.attr("height"),ri=lt-.5*ai,bi=ri+ai,nn=Gt-.5*jr,Wi=nn+jr,Ni=[[ri,nn,ri,Wi],[ri,Wi,bi,Wi],[bi,Wi,bi,nn],[bi,nn,ri,nn]].map(Qr);if(!Ni.reduce(function(Vr,gi){return Vr^!!y_.segmentsIntersect(ht,Le,ht+1e6,Le+1e6,gi[0],gi[1],gi[2],gi[3])},!1)){Ni.forEach(function(Vr){var gi=y_.segmentsIntersect(xe,Se,ht,Le,Vr[0],Vr[1],Vr[2],Vr[3]);gi&&(xe=gi.x,Se=gi.y)});var _n=t.arrowwidth,$i=t.arrowcolor,zn=t.arrowside,Wn=E.append("g").style({opacity:Xb.opacity($i)}).classed("annotation-arrow-g",!0),It=Wn.append("path").attr("d","M"+xe+","+Se+"L"+ht+","+Le).style("stroke-width",_n+"px").call(Xb.stroke,Xb.rgb($i));if(Xvt(It,zn,t),l.annotationPosition&&It.node().parentNode&&!n){var ft=ht,jt=Le;if(t.standoff){var Zt=Math.sqrt(Math.pow(ht-xe,2)+Math.pow(Le-Se,2));ft+=t.standoff*(xe-ht)/Zt,jt+=t.standoff*(Se-Le)/Zt}var yr=Wn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(xe-ft)+","+(Se-jt),transform:AU(ft,jt)}).style("stroke-width",_n+6+"px").call(Xb.stroke,"rgba(0,0,0,0)").call(Xb.fill,"rgba(0,0,0,0)"),Fr,Zr;$M.init({element:yr.node(),gd:e,prepFn:function(){var Vr=Py.getTranslate(C);Fr=Vr.x,Zr=Vr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Vr,gi){var Si=ar(Fr,Zr),Mi=Si[0]+Vr,Pi=Si[1]+gi;C.call(Py.setTranslate,Mi,Pi),d("x",m_(i,Vr,"x",s,t)),d("y",m_(a,gi,"y",s,t)),t.axref===t.xref&&d("ax",m_(i,Vr,"ax",s,t)),t.ayref===t.yref&&d("ay",m_(a,gi,"ay",s,t)),Wn.attr("transform",AU(Vr,gi)),k.attr({transform:"rotate("+g+","+Mi+","+Pi+")"})},doneFn:function(){TU.call("_guiRelayout",e,v());var Vr=document.querySelector(".js-notes-box-panel");Vr&&Vr.redraw(Vr.selectedObj)}})}}};if(t.showarrow&&Ne(0,0),S){var Ye;$M.init({element:C.node(),gd:e,prepFn:function(){Ye=k.attr("transform")},moveFn:function(Ve,Xe){var ht="pointer";if(t.showarrow)t.axref===t.xref?d("ax",m_(i,Ve,"ax",s,t)):d("ax",t.ax+Ve),t.ayref===t.yref?d("ay",m_(a,Xe,"ay",s.w,t)):d("ay",t.ay+Xe),Ne(Ve,Xe);else{if(n)return;var Le,xe;if(i)Le=m_(i,Ve,"x",s,t);else{var Se=t._xsize/s.w,lt=t.x+(t._xshift-t.xshift)/s.w-Se/2;Le=$M.align(lt+Ve/s.w,Se,0,1,t.xanchor)}if(a)xe=m_(a,Xe,"y",s,t);else{var Gt=t._ysize/s.h,Vt=t.y-(t._yshift+t.yshift)/s.h-Gt/2;xe=$M.align(Vt-Xe/s.h,Gt,0,1,t.yanchor)}d("x",Le),d("y",xe),(!i||!a)&&(ht=$M.getCursor(i?.5:Le,a?.5:xe,t.xanchor,t.yanchor))}k.attr({transform:AU(Ve,Xe)+Ye}),MU(C,ht)},clickFn:function(Ve,Xe){t.captureevents&&e.emit("plotly_clickannotation",_(Xe))},doneFn:function(){MU(C),TU.call("_guiRelayout",e,v());var Ve=document.querySelector(".js-notes-box-panel");Ve&&Ve.redraw(Ve.selectedObj)}})}}l.annotationText?X.call(SU.makeEditable,{delegate:C,gd:e}).call(G).on("edit",function(W){t.text=W,this.call(G),d("text",W),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),TU.call("_guiRelayout",e,v())}):X.call(G)}});var gpe=ye((Xnr,ppe)=>{"use strict";var fpe=Mr(),Kvt=ba(),hpe=Vs().arrayEditor;ppe.exports={hasClickToShow:Jvt,onClick:$vt};function Jvt(e,t){var r=vpe(e,t);return r.on.length>0||r.explicitOff.length>0}function $vt(e,t){var r=vpe(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 EU=Mr(),uT=va();mpe.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=uT.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),EU.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:uT.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),x=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",x.bgcolor||(uT.opacity(a)?uT.rgb(a):uT.defaultLine)),g=i("hoverlabel.bordercolor",x.bordercolor||uT.contrast(b)),E=EU.extendFlat({},x.font);E.color||(E.color=g),EU.coerceFont(i,"hoverlabel.font",E)}i("captureevents",!!v)}});var _pe=ye((Knr,ype)=>{"use strict";var CU=Mr(),Yb=Qa(),Qvt=Zd(),ept=kU(),tpt=Nb();ype.exports=function(t,r){Qvt(t,r,{name:"annotations",handleItemDefaults:rpt})};function rpt(e,t,r){function n(k,S){return CU.coerce(e,t,tpt,k,S)}var i=n("visible"),a=n("clicktoshow");if(i||a){ept(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=Yb.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=Yb.getFromId(u,h);d._annIndices.push(t._index)}if(Yb.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,x=Yb.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);x!=="pixel"&&x!==h&&(x=t[v]="pixel");var b=x==="pixel"?l[c]:.4;Yb.coercePosition(t,u,n,x,v,b)}n(f+"anchor"),n(f+"shift")}if(CU.noneOrAll(e,t,["x","y"]),o&&CU.noneOrAll(e,t,["ax","ay"]),a){var g=n("xclick"),E=n("yclick");t._xclick=g===void 0?t.x:Yb.cleanPosition(g,u,t.xref),t._yclick=E===void 0?t.y:Yb.cleanPosition(E,u,t.yref)}}}});var wpe=ye((Jnr,bpe)=>{"use strict";var LU=Mr(),Kb=Qa(),ipt=cI().draw;bpe.exports=function(t){var r=t._fullLayout,n=LU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return LU.syncOrAsync([ipt,npt],t)};function npt(e){var t=e._fullLayout;LU.filterVisible(t.annotations).forEach(function(r){var n=Kb.getFromId(e,r.xref),i=Kb.getFromId(e,r.yref),a=Kb.getRefType(r.xref),o=Kb.getRefType(r.yref);r._extremes={},a==="range"&&xpe(r,n),o==="range"&&xpe(r,i)})}function xpe(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,x=v+c,b=v-c,g;if(s===o){var E=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),k=Kb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,x),ppadminus:Math.max(u,b)});g={min:[E.min[0],k.min[0]],max:[E.max[0],k.max[0]]}}else x=a?x+a:x,b=a?b-a:b,g=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,x),ppadminus:Math.max(u,d,b)});e._extremes[r]=g}});var Ape=ye(($nr,Tpe)=>{"use strict";var apt=uo(),opt=l6();Tpe.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],x=null;a?x=opt(v,r.range):x=Math.pow(10,v),apt(x)||(x=null),i(c+d,x)}for(var h=0;h{"use strict";var PU=cI(),Spe=gpe();Mpe.exports={moduleType:"component",name:"annotations",layoutAttributes:Nb(),supplyLayoutDefaults:_pe(),includeBasePlot:IM()("annotations"),calcAutorange:wpe(),draw:PU.draw,drawOne:PU.drawOne,drawRaw:PU.drawRaw,hasClickToShow:Spe.hasClickToShow,onClick:Spe.onClick,convertCoords:Ape()}});var fI=ye((ear,kpe)=>{"use strict";var Ku=Nb(),spt=Bu().overrideAll,lpt=Vs().templatedArray;kpe.exports=spt(lpt("annotation",{visible:Ku.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ku.xanchor,xshift:Ku.xshift,yanchor:Ku.yanchor,yshift:Ku.yshift,text:Ku.text,textangle:Ku.textangle,font:Ku.font,width:Ku.width,height:Ku.height,opacity:Ku.opacity,align:Ku.align,valign:Ku.valign,bgcolor:Ku.bgcolor,bordercolor:Ku.bordercolor,borderpad:Ku.borderpad,borderwidth:Ku.borderwidth,showarrow:Ku.showarrow,arrowcolor:Ku.arrowcolor,arrowhead:Ku.arrowhead,startarrowhead:Ku.startarrowhead,arrowside:Ku.arrowside,arrowsize:Ku.arrowsize,startarrowsize:Ku.startarrowsize,arrowwidth:Ku.arrowwidth,standoff:Ku.standoff,startstandoff:Ku.startstandoff,hovertext:Ku.hovertext,hoverlabel:Ku.hoverlabel,captureevents:Ku.captureevents}),"calc","from-root")});var Lpe=ye((tar,Cpe)=>{"use strict";var IU=Mr(),upt=Qa(),cpt=Zd(),fpt=kU(),hpt=fI();Cpe.exports=function(t,r,n){cpt(t,r,{name:"annotations",handleItemDefaults:dpt,fullLayout:n.fullLayout})};function dpt(e,t,r,n){function i(s,l){return IU.coerce(e,t,hpt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],upt.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(fpt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),IU.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),IU.noneOrAll(e,t,["ax","ay"])))}});var Rpe=ye((rar,Dpe)=>{"use strict";var Ppe=Mr(),Ipe=Qa();Dpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function DU(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 ppt(e,t){var r=DU(e.projection,DU(e.view,DU(e.model,[t[0],t[1],t[2],1])));return r}zpe.exports=ppt});var qpe=ye((nar,Fpe)=>{"use strict";var gpt=cI().drawRaw,mpt=RU(),ypt=["x","y","z"];Fpe.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=mpt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),gpt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var Npe=ye((aar,Bpe)=>{"use strict";var _pt=ba(),Ope=Mr();Bpe.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:fI()}}},layoutAttributes:fI(),handleDefaults:Lpe(),includeBasePlot:xpt,convert:Rpe(),draw:qpe()};function xpt(e,t){var r=_pt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var Upe=Nb(),Vpe=Su(),Hpe=Uc().line,bpt=Ed().dash,Fg=no().extendFlat,wpt=Vs().templatedArray,oar=PM(),cT=vl(),Tpt=Wo().shapeTexttemplateAttrs,Apt=x6();Gpe.exports=wpt("shape",{visible:Fg({},cT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Fg({},cT.legend,{editType:"calc+arraydraw"}),legendgroup:Fg({},cT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Fg({},cT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Vpe({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Fg({},cT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Fg({},cT.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:Fg({},Upe.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:Fg({},Upe.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:Fg({},Hpe.color,{editType:"arraydraw"}),width:Fg({},Hpe.width,{editType:"calc+arraydraw"}),dash:Fg({},bpt,{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:Tpt({},{keys:Object.keys(Apt)}),font:Vpe({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 Zpe=ye((lar,Wpe)=>{"use strict";var e4=Mr(),fT=Qa(),Spt=Zd(),Mpt=zU(),jpe=f_();Wpe.exports=function(t,r){Spt(t,r,{name:"shapes",handleItemDefaults:kpt})};function Ept(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function kpt(e,t,r){function n(W,re){return e4.coerce(e,t,Mpt,W,re)}t._isShape=!0;var i=n("visible");if(i){var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),e4.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 x=d[v],b=x+"anchor",g=x==="x"?f:h,E={_fullLayout:r},k,S,L,_=fT.coerceRef(e,t,E,x,void 0,"paper"),C=fT.getRefType(_);if(C==="range"?(k=fT.getFromId(E,_),k._shapeIndices.push(t._index),L=jpe.rangeToShapePosition(k),S=jpe.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(n(x+"0shift"),n(x+"1shift"))):S=L=e4.identity,u){var M=.25,p=.75,P=x+"0",T=x+"1",F=e[P],q=e[T];e[P]=S(e[P],!0),e[T]=S(e[T],!0),g==="pixel"?(n(P,0),n(T,10)):(fT.coercePosition(t,E,n,_,P,M),fT.coercePosition(t,E,n,_,T,p)),t[P]=L(t[P]),t[T]=L(t[T]),e[P]=F,e[T]=q}if(g==="pixel"){var V=e[b];e[b]=S(e[b],!0),fT.coercePosition(t,E,n,_,b,.25),t[b]=L(t[b]),e[b]=V}}u&&e4.noneOrAll(e,t,["x0","x1","y0","y1"]);var H=l==="line",X,G;if(u&&(X=n("label.texttemplate")),X||(G=n("label.text")),G||X){n("label.textangle");var N=n("label.textposition",H?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Ept(H,N)),n("label.padding"),e4.coerceFont(n,"label.font",r.font)}}}});var Kpe=ye((uar,Ype)=>{"use strict";var Cpt=va(),Xpe=Mr();function Lpt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Ype.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"),Xpe.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",Cpt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",Lpt(o,u)),n("newshape.label.padding"),Xpe.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var t0e=ye((car,e0e)=>{"use strict";var FU=Mr(),hT=Qa(),dT=cM(),$pe=f_();e0e.exports=function(t){var r=t._fullLayout,n=FU.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 Jpe(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(dT.segmentRE),v,x,b,g,E;for(e.type==="date"&&(u=$pe.decodeDate(u)),v=0;vh&&(h=E)));if(h>=f)return[f,h]}}});var n0e=ye((far,i0e)=>{"use strict";var r0e=tP();i0e.exports={moduleType:"component",name:"shapes",layoutAttributes:zU(),supplyLayoutDefaults:Zpe(),supplyDrawNewShapeDefaults:Kpe(),includeBasePlot:IM()("shapes"),calcAutorange:t0e(),draw:r0e.draw,drawOne:r0e.drawOne}});var qU=ye((dar,o0e)=>{"use strict";var a0e=ad(),Dpt=Vs().templatedArray,har=PM();o0e.exports=Dpt("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",a0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",a0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var l0e=ye((par,s0e)=>{"use strict";var Rpt=Mr(),OU=Qa(),zpt=Zd(),Fpt=qU(),qpt="images";s0e.exports=function(t,r){var n={name:qpt,handleItemDefaults:Opt};zpt(t,r,n)};function Opt(e,t,r){function n(h,d){return Rpt.coerce(e,t,Fpt,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=OU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=OU.getFromId(o,c);f._imgIndices.push(t._index)}OU.coercePosition(t,o,n,c,u,0)}return t}});var h0e=ye((gar,f0e)=>{"use strict";var u0e=xa(),Bpt=ao(),vT=Qa(),c0e=af(),Npt=Zp();f0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var d0e=uo(),Upt=l6();v0e.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";g0e.exports={moduleType:"component",name:"images",layoutAttributes:qU(),supplyLayoutDefaults:l0e(),includeBasePlot:IM()("images"),draw:h0e(),convertCoords:p0e()}});var hI=ye((_ar,y0e)=>{"use strict";y0e.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 BU=ye((xar,x0e)=>{"use strict";var Vpt=Su(),Hpt=dh(),Gpt=no().extendFlat,jpt=Bu().overrideAll,Wpt=b6(),_0e=Vs().templatedArray,Zpt=_0e("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}});x0e.exports=jpt(_0e("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:Zpt,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:Gpt(Wpt({editType:"arraydraw"}),{}),font:Vpt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Hpt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var A0e=ye((bar,T0e)=>{"use strict";var dI=Mr(),b0e=Zd(),w0e=BU(),Xpt=hI(),Ypt=Xpt.name,Kpt=w0e.buttons;T0e.exports=function(t,r){var n={name:Ypt,handleItemDefaults:Jpt};b0e(t,r,n)};function Jpt(e,t,r){function n(o,s){return dI.coerce(e,t,w0e,o,s)}var i=b0e(e,t,{name:"buttons",handleItemDefaults:$pt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),dI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),dI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function $pt(e,t){function r(i,a){return dI.coerce(e,t,Kpt,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 E0e=ye((war,M0e)=>{"use strict";M0e.exports=of;var qg=xa(),S0e=va(),pT=ao(),vI=Mr();function of(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})}of.barWidth=2;of.barLength=20;of.barRadius=2;of.barPad=1;of.barColor="#808BA4";of.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",x=f==="up",b=l,g=c,E,k,S,L;!h&&!d&&!v&&!x&&(this.position.direction="down",h=!0);var _=h||x;_?(E=s,k=E+b,h?(S=u,L=Math.min(S+g,o),g=L-S):(L=u+g,S=Math.max(L-g,0),g=L-S)):(S=u,L=S+g,d?(k=s+b,E=Math.max(k-b,0),b=k-E):(E=s,k=Math.min(E+b,a),b=k-E)),this._box={l:E,t:S,w:b,h:g};var C=l>b,M=of.barLength+2*of.barPad,p=of.barWidth+2*of.barPad,P=s,T=u+c;T+p>o&&(T=o-p);var F=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(S0e.fill,of.barColor),C?(this.hbar=F.attr({rx:of.barRadius,ry:of.barRadius,x:P,y:T,width:M,height:p}),this._hbarXMin=P+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=c>g,V=of.barWidth+2*of.barPad,H=of.barLength+2*of.barPad,X=s+l,G=u;X+V>a&&(X=a-V);var N=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(S0e.fill,of.barColor),q?(this.vbar=N.attr({rx:of.barRadius,ry:of.barRadius,x:X,y:G,width:V,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=g-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,re=E-.5,ae=q?k+V+.5:k+.5,_e=S-.5,Me=C?L+p+.5:L+.5,ke=i._topdefs.selectAll("#"+W).data(C||q?[0]:[]);if(ke.exit().remove(),ke.enter().append("clipPath").attr("id",W).append("rect"),C||q?(this._clipRect=ke.select("rect").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(ae)-Math.floor(re),height:Math.ceil(Me)-Math.floor(_e)}),this.container.call(pT.setClipUrl,W,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(pT.setClipUrl,null),delete this._clipRect),C||q){var ge=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(ge);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),q&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(r,n)};of.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(pT.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)};of.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)};of.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)};of.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=vI.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=vI.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)};of.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=vI.constrain(t||0,0,n),r=vI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(pT.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(pT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(pT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var q0e=ye((Tar,F0e)=>{"use strict";var gT=xa(),t4=Yu(),r4=va(),mT=ao(),e0=Mr(),pI=Ll(),Qpt=Vs().arrayEditor,C0e=Nh().LINE_SPACING,Go=hI(),e0t=E0e();F0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[Go.name]);function i(h){t4.autoMargin(t,R0e(h))}var a=r._menulayer.selectAll("g."+Go.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(Go.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){gT.select(this).selectAll("g."+Go.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+Go.headerGroupClassName).data(n,t0t);o.enter().append("g").classed(Go.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,"g",Go.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var l0t=hI();O0e.exports={moduleType:"component",name:l0t.name,layoutAttributes:BU(),supplyLayoutDefaults:A0e(),draw:q0e()}});var n4=ye((Sar,N0e)=>{"use strict";N0e.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 HU=ye((Mar,H0e)=>{"use strict";var U0e=Su(),u0t=b6(),c0t=no().extendDeepAll,f0t=Bu().overrideAll,h0t=zS(),V0e=Vs().templatedArray,Jb=n4(),d0t=V0e("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}});H0e.exports=f0t(V0e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:d0t,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:c0t(u0t({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:h0t.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:U0e({})},font:U0e({}),activebgcolor:{valType:"color",dflt:Jb.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jb.railBgColor},bordercolor:{valType:"color",dflt:Jb.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jb.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jb.tickLength},tickcolor:{valType:"color",dflt:Jb.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jb.minorTickLength}}),"arraydraw","from-root")});var Z0e=ye((Ear,W0e)=>{"use strict";var yT=Mr(),G0e=Zd(),j0e=HU(),v0t=n4(),p0t=v0t.name,g0t=j0e.steps;W0e.exports=function(t,r){G0e(t,r,{name:p0t,handleItemDefaults:m0t})};function m0t(e,t,r){function n(f,h){return yT.coerce(e,t,j0e,f,h)}for(var i=G0e(e,t,{name:"steps",handleItemDefaults:y0t}),a=0,o=0;o{"use strict";var Og=xa(),gI=Yu(),__=va(),Bg=ao(),t0=Mr(),_0t=t0.strTranslate,a4=Ll(),x0t=Vs().arrayEditor,gs=n4(),WU=Nh(),K0e=WU.LINE_SPACING,GU=WU.FROM_TL,jU=WU.FROM_BR;rge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=b0t(n,t),a=n._infolayer.selectAll("g."+gs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(gs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),gI.autoMargin(t,J0e(c))}if(a.exit().each(function(){Og.select(this).selectAll("g."+gs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+gs.groupClassName).data(i,w0t);s.enter().append("g").classed(gs.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",_0t(o-gs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function ZU(e,t){var r=e._dims;return r.inputAreaStart+gs.stepInset+(r.inputAreaLength-2*gs.stepInset)*Math.min(1,Math.max(0,t))}function Y0e(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-gs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*gs.stepInset-2*r.inputAreaStart)))}function C0t(e,t,r){var n=r._dims,i=t0.ensureSingle(e,"rect",gs.railTouchRectClass,function(a){a.call(ege,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,gs.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr("opacity",0),Bg.setTranslate(i,0,n.currentValueTotalHeight)}function L0t(e,t){var r=t._dims,n=r.inputAreaLength-gs.railInset*2,i=t0.ensureSingle(e,"rect",gs.railRectClass);i.attr({width:n,height:gs.railWidth,rx:gs.railRadius,ry:gs.railRadius,"shape-rendering":"crispEdges"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Bg.setTranslate(i,gs.railInset,(r.inputAreaWidth-gs.railWidth)*.5+r.currentValueTotalHeight)}});var age=ye((Car,nge)=>{"use strict";var P0t=n4();nge.exports={moduleType:"component",name:P0t.name,layoutAttributes:HU(),supplyLayoutDefaults:Z0e(),draw:ige()}});var yI=ye((Lar,sge)=>{"use strict";var oge=dh();sge.exports={bgcolor:{valType:"color",dflt:oge.background,editType:"plot"},bordercolor:{valType:"color",dflt:oge.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 XU=ye((Par,lge)=>{"use strict";lge.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 _I=ye((Iar,uge)=>{"use strict";uge.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 hge=ye(bI=>{"use strict";var I0t=af(),D0t=Ll(),cge=_I(),R0t=Nh().LINE_SPACING,xI=cge.name;function fge(e){var t=e&&e[xI];return t&&t.visible}bI.isVisible=fge;bI.makeData=function(e){for(var t=I0t.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var wI=Mr(),dge=Vs(),vge=af(),z0t=yI(),F0t=XU();pge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;wI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=dge.newContainer(a,"rangeslider");function l(L,_){return wI.coerce(o,s,z0t,L,_)}var u,c;function f(L,_){return wI.coerce(u,c,F0t,L,_)}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.substr(0,L.indexOf("y"))===vge.name2id(n)}).map(function(L){return L.substr(L.indexOf("y"),L.length)}),x=wI.simpleMap(v,vge.id2name),b=0;b{"use strict";var q0t=af().list,O0t=wg().getAutoRange,B0t=_I();mge.exports=function(t){for(var r=q0t(t,"x",!0),n=0;n{"use strict";var TI=xa(),N0t=ba(),U0t=Yu(),Ff=Mr(),AI=Ff.strTranslate,xge=ao(),x_=va(),V0t=Mb(),H0t=Jf(),YU=af(),G0t=gv(),j0t=Tg(),Bs=_I();bge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=N.max)X=T[G+1];else if(H=N.pmax)X=T[G+1];else if(H0?e.touches[0].clientX:0}function W0t(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+Bs.slideBoxClassName).node(),a=e.select("rect."+Bs.grabAreaMinClassName).node(),o=e.select("rect."+Bs.grabAreaMaxClassName).node();function s(){var l=TI.event,u=l.target,c=_ge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=G0t.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",b),v.addEventListener("mousemove",x),v.addEventListener("mouseup",b);function x(g){var E=_ge(g),k=+E-c,S,L,_;switch(u){case i:if(_="ew-resize",h+k>r._length||d+k<0)return;S=h+k,L=d+k;break;case a:if(_="col-resize",h+k>r._length)return;S=h+k,L=d;break;case o:if(_="col-resize",d+k<0)return;S=h,L=d+k;break;default:_="ew-resize",S=f,L=f+k;break}if(L{"use strict";var rgt=Mr(),igt=yI(),ngt=XU(),KU=hge();Tge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:rgt.extendFlat({},igt,{yaxis:ngt})}}},layoutAttributes:yI(),handleDefaults:gge(),calcAutorange:yge(),draw:wge(),isVisible:KU.isVisible,makeData:KU.makeData,autoMarginOpts:KU.autoMarginOpts}});var SI=ye((Oar,Mge)=>{"use strict";var agt=Su(),Sge=dh(),ogt=Vs().templatedArray,sgt=ogt("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"});Mge.exports={visible:{valType:"boolean",editType:"plot"},buttons:sgt,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:agt({editType:"plot"}),bgcolor:{valType:"color",dflt:Sge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Sge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var JU=ye((Bar,Ege)=>{"use strict";Ege.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Lge=ye((Nar,Cge)=>{"use strict";var MI=Mr(),lgt=va(),ugt=Vs(),cgt=Zd(),kge=SI(),$U=JU();Cge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=ugt.newContainer(r,"rangeselector");function l(d,v){return MI.coerce(o,s,kge,d,v)}var u=cgt(o,s,{name:"buttons",handleItemDefaults:fgt,calendar:a}),c=l("visible",u.length>0);if(c){var f=hgt(r,n,i);l("x",f[0]),l("y",f[1]),MI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),MI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",lgt.contrast(h,$U.lightAmount,$U.darkAmount)),l("bordercolor"),l("borderwidth")}};function fgt(e,t,r,n){var i=n.calendar;function a(l,u){return MI.coerce(e,t,kge.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 hgt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var dgt=hq(),vgt=Mr().titleCase;Pge.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=pgt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function pgt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=dgt["utc"+vgt(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 Nge=ye((Var,Bge)=>{"use strict";var kI=xa(),ggt=ba(),mgt=Yu(),Dge=va(),Oge=ao(),Iy=Mr(),Rge=Iy.strTranslate,EI=Ll(),ygt=af(),tV=Nh(),zge=tV.LINE_SPACING,Fge=tV.FROM_TL,qge=tV.FROM_BR,eV=JU(),_gt=Ige();Bge.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(xgt(t),bgt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=kI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Iy.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=kI.select(this),f=_gt(o,u);u._isActive=wgt(o,u,f),c.call(QU,s,u),c.call(Agt,s,u,t),c.on("click",function(){t._dragged||ggt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(QU,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(QU,s,u)})}),Mgt(t,l,s,o._name,a)})};function xgt(e){for(var t=ygt.list(e,"x",!0),r=[],n=0;n{"use strict";Uge.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:SI()}}},layoutAttributes:SI(),handleDefaults:Lge(),draw:Nge()}});var Ju=ye(rV=>{"use strict";var Hge=no().extendFlat;rV.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:Hge({},r,{}),y:Hge({},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};rV.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 Egt=Mr(),kgt=n3().counter,Cgt=Ju().attributes,Gge=ad().idRegex,Lgt=Vs(),iV={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:[kgt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Gge.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Gge.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:Cgt({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 CI(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 Pgt(e,t){var r=e.grid||{},n=CI(t,r,"x"),i=CI(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=Lgt.newContainer(t,"grid");function h(_,C){return Egt.coerce(r,f,iV,_,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var x=h("pattern")==="independent";x&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),g=b==="top to bottom",E=a?.2:.1,k=a?.3:.1,S,L;l&&t._splomGridDflt&&(S=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:jge("x",h,E,S,v),y:jge("y",h,k,L,d,g)}}function jge(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";Xge.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 Jge=ye((Zar,Kge)=>{"use strict";var Yge=uo(),Dgt=ba(),Rgt=Mr(),zgt=Vs(),Fgt=aV();Kge.exports=function(e,t,r,n){var i="error_"+n.axis,a=zgt.newContainer(t,i),o=e[i]||{};function s(v,x){return Rgt.coerce(o,a,Fgt,v,x)}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||Yge(o.thickness)||Yge(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",Dgt.traceIs(t,"gl3d")?0:4))}}});var oV=ye((Xar,Qge)=>{"use strict";Qge.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=$ge(r,t.value),s=$ge(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 $ge(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 rme=ye((Yar,tme)=>{"use strict";var sV=uo(),qgt=ba(),lV=Qa(),Ogt=Mr(),Bgt=oV();tme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var ime=xa(),b_=uo(),Ngt=ao(),Ugt=lu();nme.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(E){return E.id});var x=Ugt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=ime.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 g=b.enter().append("g").classed("errorbar",!0);l&&g.style("opacity",0).transition().duration(i.duration).style("opacity",1),Ngt.setClipUrl(b,n.layerClipId,t),b.each(function(E){var k=ime.select(this),S=Vgt(E,o,s);if(!(x&&!E.vis)){var L,_=k.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=!_.size(),a?_=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(_=_.transition().duration(i.duration).ease(i.easing)),_.attr("d",L)}else _.remove();var M=k.select("path.xerror");if(h.visible&&b_(S.y)&&b_(S.xh)&&b_(S.xs)){var p=(h.copy_ystyle?d:h).width;L="M"+S.xh+","+(S.y-p)+"v"+2*p+"m0,-"+p+"H"+S.xs,S.noXS||(L+="m0,-"+p+"v"+2*p),a=!M.size(),a?M=k.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 Vgt(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 lme=ye((Jar,sme)=>{"use strict";var Hgt=xa(),ome=va();sme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Hgt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(ome.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(ome.stroke,a.color)})}});var fme=ye(($ar,cme)=>{"use strict";var o4=Mr(),ume=Bu().overrideAll,s4=aV(),$b={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4)};delete $b.error_x.copy_zstyle;delete $b.error_y.copy_zstyle;delete $b.error_y.copy_ystyle;var l4={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4),error_z:o4.extendFlat({},s4)};delete l4.error_x.copy_ystyle;delete l4.error_y.copy_ystyle;delete l4.error_z.copy_ystyle;delete l4.error_z.copy_zstyle;cme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$b,bar:$b,histogram:$b,scatter3d:ume(l4,"calc","nested"),scattergl:ume($b,"calc","nested")}},supplyDefaults:Jge(),calc:rme(),makeComputeError:oV(),plot:ame(),style:lme(),hoverInfo:Ggt};function Ggt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var dme=ye((Qar,hme)=>{"use strict";hme.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 xme=ye((eor,_me)=>{"use strict";var w_=xa(),uV=id(),PI=Yu(),vme=ba(),Dy=Qa(),LI=gv(),B0=Mr(),Ug=B0.strTranslate,yme=no().extendFlat,cV=Tg(),Ng=ao(),fV=va(),jgt=Mb(),Wgt=Ll(),Zgt=Rv().flipScale,Xgt=JM(),Ygt=rI(),Kgt=Cd(),hV=Nh(),pme=hV.LINE_SPACING,gme=hV.FROM_TL,mme=hV.FROM_BR,Vc=dme().cn;function Jgt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Vc.colorbar).data($gt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Vc.colorbar,!0),r.each(function(n){var i=w_.select(this);B0.ensureSingle(i,"rect",Vc.cbbg),B0.ensureSingle(i,"g",Vc.cbfills),B0.ensureSingle(i,"g",Vc.cblines),B0.ensureSingle(i,"g",Vc.cbaxis,function(o){o.classed(Vc.crisp,!0)}),B0.ensureSingle(i,"g",Vc.cbtitleunshift,function(o){o.append("g").classed(Vc.cbtitle,!0)}),B0.ensureSingle(i,"rect",Vc.cboutline);var a=Qgt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&emt(i,n,e)}),r.exit().each(function(n){PI.autoMargin(e,n._id)}).remove(),r.order()}function $gt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(k){return yme(k,{_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?Zgt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c1){var De=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));ze*=De*B0.roundUp(me/De,[2,5,10]),(Math.abs(F.start)/F.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=ze}Ee.domain=n?[ie+v/S.h,ie+W-v/S.h]:[ie+d/S.w,ie+W-d/S.w],Ee.setScale(),e.attr("transform",Ug(Math.round(S.l),Math.round(S.t)));var ce=e.select("."+Vc.cbtitleunshift).attr("transform",Ug(-Math.round(S.l),-Math.round(S.t))),Ge=Ee.ticklabelposition,nt=Ee.title.font.size,ct=e.select("."+Vc.cbaxis),qt,rt=0,ot=0;function Dt(er,Ke){var xt={propContainer:Ee,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Vc.cbtitle)},bt=er.charAt(0)==="h"?er.substr(1):"h"+er;e.selectAll("."+bt+",."+bt+"-math-group").remove(),jgt.draw(r,er,yme(xt,Ke||{}))}function kt(){if(n&&Ae||!n&&!Ae){var er,Ke;M==="top"&&(er=d+S.l+re*x,Ke=v+S.t+ae*(1-ie-W)+3+nt*.75),M==="bottom"&&(er=d+S.l+re*x,Ke=v+S.t+ae*(1-ie)-3-nt*.25),M==="right"&&(Ke=v+S.t+ae*b+3+nt*.75,er=d+S.l+re*ie),Dt(Ee._id+"title",{attributes:{x:er,y:Ke,"text-anchor":n?"start":"middle"}})}}function Ct(){if(n&&!Ae||!n&&Ae){var er=Ee.position||0,Ke=Ee._offset+Ee._length/2,xt,bt;if(M==="right")bt=Ke,xt=S.l+re*er+10+nt*(Ee.showticklabels?1:.5);else if(xt=Ke,M==="bottom"&&(bt=S.t+ae*er+10+(Ge.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="intside"&&t.ticklen||0)),M==="top"){var Lt=C.text.split("
").length;bt=S.t+ae*er+10-X-pme*nt*Lt}Dt((n?"h":"v")+Ee._id+"title",{avoid:{selection:w_.select(r).selectAll("g."+Ee._id+"tick"),side:M,offsetTop:n?0:S.t,offsetLeft:n?S.l:0,maxShift:n?k.width:k.height},attributes:{x:xt,y:bt,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Yt(){if(!n&&!Ae||n&&Ae){var er=e.select("."+Vc.cbtitle),Ke=er.select("text"),xt=[-l/2,l/2],bt=er.select(".h"+Ee._id+"title-math-group").node(),Lt=15.6;Ke.node()&&(Lt=parseInt(Ke.node().style.fontSize,10)*pme);var St;if(bt?(St=Ng.bBox(bt),ot=St.width,rt=St.height,rt>Lt&&(xt[1]-=(rt-Lt)/2)):Ke.node()&&!Ke.classed(Vc.jsPlaceholder)&&(St=Ng.bBox(Ke.node()),ot=St.width,rt=St.height),n){if(rt){if(rt+=5,M==="top")Ee.domain[1]-=rt/S.h,xt[1]*=-1;else{Ee.domain[0]+=rt/S.h;var Et=Wgt.lineCount(Ke);xt[1]+=(1-Et)*Lt}er.attr("transform",Ug(xt[0],xt[1])),Ee.setScale()}}else ot&&(M==="right"&&(Ee.domain[0]+=(ot+nt/2)/S.w),er.attr("transform",Ug(xt[0],xt[1])),Ee.setScale())}e.selectAll("."+Vc.cbfills+",."+Vc.cblines).attr("transform",n?Ug(0,Math.round(S.h*(1-Ee.domain[1]))):Ug(Math.round(S.w*Ee.domain[0]),0)),ct.attr("transform",n?Ug(0,Math.round(-S.t)):Ug(Math.round(-S.l),0));var dt=e.select("."+Vc.cbfills).selectAll("rect."+Vc.cbfill).attr("style","").data(V);dt.enter().append("rect").classed(Vc.cbfill,!0).attr("style",""),dt.exit().remove();var Ht=p.map(Ee.c2p).map(Math.round).sort(function(Or,Nr){return Or-Nr});dt.each(function(Or,Nr){var ut=[Nr===0?p[0]:(V[Nr]+V[Nr-1])/2,Nr===V.length-1?p[1]:(V[Nr]+V[Nr+1])/2].map(Ee.c2p).map(Math.round);n&&(ut[1]=B0.constrain(ut[1]+(ut[1]>ut[0])?1:-1,Ht[0],Ht[1]));var Ne=w_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",w_.min(ut)).attr(n?"width":"height",Math.max(X,2)).attr(n?"height":"width",Math.max(w_.max(ut)-w_.min(ut),2));if(t._fillgradient)Ng.gradient(Ne,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Ye=T(Or).replace("e-","");Ne.attr("fill",uV(Ye).toHexString())}});var $t=e.select("."+Vc.cblines).selectAll("path."+Vc.cbline).data(_.color&&_.width?H:[]);$t.enter().append("path").classed(Vc.cbline,!0),$t.exit().remove(),$t.each(function(Or){var Nr=_e,ut=Math.round(Ee.c2p(Or))+_.width/2%1;w_.select(this).attr("d","M"+(n?Nr+","+ut:ut+","+Nr)+(n?"h":"v")+X).call(Ng.lineGroupStyle,_.width,P(Or),_.dash)}),ct.selectAll("g."+Ee._id+"tick,path").remove();var fr=_e+X+(l||0)/2-(t.ticks==="outside"?1:0),_r=Dy.calcTicks(Ee),Br=Dy.getTickSigns(Ee)[2];return Dy.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Dy.clipEnds(Ee,_r):_r,layer:ct,path:Dy.makeTickPath(Ee,fr,Br),transFn:Dy.makeTransTickFn(Ee)}),Dy.drawLabels(r,Ee,{vals:_r,layer:ct,transFn:Dy.makeTransTickLabelFn(Ee),labelFns:Dy.makeLabelFns(Ee,fr)})}function xr(){var er,Ke=X+l/2;Ge.indexOf("inside")===-1&&(er=Ng.bBox(ct.node()),Ke+=n?er.width:er.height),qt=ce.select("text");var xt=0,bt=n&&M==="top",Lt=!n&&M==="right",St=0;if(qt.node()&&!qt.classed(Vc.jsPlaceholder)){var Et,dt=ce.select(".h"+Ee._id+"title-math-group").node();dt&&(n&&Ae||!n&&!Ae)?(er=Ng.bBox(dt),xt=er.width,Et=er.height):(er=Ng.bBox(ce.node()),xt=er.right-S.l-(n?_e:Te),Et=er.bottom-S.t-(n?Te:_e),!n&&M==="top"&&(Ke+=er.height,St=er.height)),Lt&&(qt.attr("transform",Ug(xt/2+nt/2,0)),xt*=2),Ke=Math.max(Ke,n?xt:Et)}var Ht=(n?d:v)*2+Ke+u+l/2,$t=0;!n&&C.text&&h==="bottom"&&b<=0&&($t=Ht/2,Ht+=$t,St+=$t),k._hColorbarMoveTitle=$t,k._hColorbarMoveCBTitle=St;var fr=u+l,_r=(n?_e:Te)-fr/2-(n?d:0),Br=(n?Te:_e)-(n?N:v+St-$t);e.select("."+Vc.cbbg).attr("x",_r).attr("y",Br).attr(n?"width":"height",Math.max(Ht-$t,2)).attr(n?"height":"width",Math.max(N+fr,2)).call(fV.fill,c).call(fV.stroke,t.bordercolor).style("stroke-width",u);var Or=Lt?Math.max(xt-10,0):0;e.selectAll("."+Vc.cboutline).attr("x",(n?_e:Te+d)+Or).attr("y",(n?Te+v-N:_e)+(bt?rt:0)).attr(n?"width":"height",Math.max(X,2)).attr(n?"height":"width",Math.max(N-(n?2*v+rt:2*d+Or),2)).call(fV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Nr=n?Me*Ht:0,ut=n?0:(1-ke)*Ht-St;if(Nr=E?S.l-Nr:-Nr,ut=g?S.t-ut:-ut,e.attr("transform",Ug(Nr,ut)),!n&&(u||uV(c).getAlpha()&&!uV.equals(k.paper_bgcolor,c))){var Ne=ct.selectAll("text"),Ye=Ne[0].length,Ve=e.select("."+Vc.cbbg).node(),Xe=Ng.bBox(Ve),ht=Ng.getTranslate(e),Le=2;Ne.each(function(ri,bi){var nn=0,Wi=Ye-1;if(bi===nn||bi===Wi){var Ni=Ng.bBox(this),_n=Ng.getTranslate(this),$i;if(bi===Wi){var zn=Ni.right+_n.x,Wn=Xe.right+ht.x+Te-u-Le+x;$i=Wn-zn,$i>0&&($i=0)}else if(bi===nn){var It=Ni.left+_n.x,ft=Xe.left+ht.x+Te+u+Le;$i=ft-It,$i<0&&($i=0)}$i&&(Ye<3?this.setAttribute("transform","translate("+$i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var xe={},Se=gme[f],lt=mme[f],Gt=gme[h],Vt=mme[h],ar=Ht-X;n?(a==="pixels"?(xe.y=b,xe.t=N*Gt,xe.b=N*Vt):(xe.t=xe.b=0,xe.yt=b+i*Gt,xe.yb=b-i*Vt),s==="pixels"?(xe.x=x,xe.l=Ht*Se,xe.r=Ht*lt):(xe.l=ar*Se,xe.r=ar*lt,xe.xl=x-o*Se,xe.xr=x+o*lt)):(a==="pixels"?(xe.x=x,xe.l=N*Se,xe.r=N*lt):(xe.l=xe.r=0,xe.xl=x+i*Se,xe.xr=x-i*lt),s==="pixels"?(xe.y=1-b,xe.t=Ht*Gt,xe.b=Ht*Vt):(xe.t=ar*Gt,xe.b=ar*Vt,xe.yt=b-o*Gt,xe.yb=b+o*Vt));var Qr=t.y<.5?"b":"t",ai=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var jr={r:k.width-_r-Nr,l:_r+xe.r,b:k.height-Br-ut,t:Br+xe.b};E&&g?PI.autoMargin(r,t._id,xe):E?r._fullLayout._reservedMargin[t._id][Qr]=jr[Qr]:g||n?r._fullLayout._reservedMargin[t._id][ai]=jr[ai]:r._fullLayout._reservedMargin[t._id][Qr]=jr[Qr]}return B0.syncOrAsync([PI.previousPromises,kt,Yt,Ct,PI.previousPromises,xr],r)}function emt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;LI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),cV(e)},moveFn:function(u,c){e.attr("transform",o+Ug(u,c)),s=LI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=LI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=LI.getCursor(s,l,t.xanchor,t.yanchor);cV(e,f)},doneFn:function(){if(cV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?vme.call("_guiRestyle",r,u,t._traceIndex):vme.call("_guiRelayout",r,u)}}})}function tmt(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";bme.exports={moduleType:"component",name:"colorbar",attributes:Y6(),supplyDefaults:AO(),draw:xme().draw,hasColorbar:mO()}});var Ame=ye((ror,Tme)=>{"use strict";Tme.exports={moduleType:"component",name:"legend",layoutAttributes:yB(),supplyLayoutDefaults:bB(),draw:DB(),style:CB()}});var Mme=ye((ior,Sme)=>{"use strict";Sme.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 kme=ye((nor,Eme)=>{"use strict";Eme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var vV=ye((aor,Ime)=>{"use strict";var imt=ba(),Pme=Mr(),dV=Pme.extendFlat,Cme=Pme.extendDeep;function Lme(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 nmt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Ime.exports=function(t,r){var n,i=t.data,a=t.layout,o=Cme([],i),s=Cme({},a,Lme(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 amt=vb().EventEmitter,omt=ba(),smt=Mr(),Dme=Ly(),lmt=vV(),umt=OP(),cmt=BP();function fmt(e,t){var r=new amt,n=lmt(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=Dme.getDelay(i._fullLayout);setTimeout(function(){var l=umt(i),u=document.createElement("canvas");u.id=smt.randstr(),r=cmt({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=Dme.getRedrawFunc(i);return omt.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}Rme.exports=fmt});var Ome=ye((sor,qme)=>{"use strict";var Fme=Ly(),hmt={getDelay:Fme.getDelay,getRedrawFunc:Fme.getRedrawFunc,clone:vV(),toSVG:OP(),svgToImg:BP(),toImage:zme(),downloadImage:YN()};qme.exports=hmt});var Nme=ye(Ry=>{"use strict";Ry.version=QC().version;QQ();Vie();var dmt=ba(),u4=Ry.register=dmt.register,gV=lde(),Bme=Object.keys(gV);for(II=0;II{"use strict";Ume.exports=Nme()});var Qb=ye((cor,Hme)=>{"use strict";Hme.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Lm=ye((hor,Zme)=>{"use strict";var Tf=Uc(),Gme=Oc().axisHoverFormat,vmt=Wo().hovertemplateAttrs,pmt=Wo().texttemplateAttrs,Wme=Kl(),gmt=Su(),jme=Qb(),mmt=Ed().pattern,e2=no().extendFlat,mV=gmt({editType:"calc",arrayOk:!0,colorEditType:"style"}),ymt=Tf.marker,_mt=ymt.line,xmt=e2({},_mt.width,{dflt:0}),bmt=e2({width:xmt,editType:"calc"},Wme("marker.line")),wmt=e2({line:bmt,editType:"calc"},Wme("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:mmt,cornerradius:{valType:"any",editType:"calc"}});Zme.exports={x:Tf.x,x0:Tf.x0,dx:Tf.dx,y:Tf.y,y0:Tf.y0,dy:Tf.dy,xperiod:Tf.xperiod,yperiod:Tf.yperiod,xperiod0:Tf.xperiod0,yperiod0:Tf.yperiod0,xperiodalignment:Tf.xperiodalignment,yperiodalignment:Tf.yperiodalignment,xhoverformat:Gme("x"),yhoverformat:Gme("y"),text:Tf.text,texttemplate:pmt({editType:"plot"},{keys:jme.eventDataKeys}),hovertext:Tf.hovertext,hovertemplate:vmt({},{keys:jme.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:e2({},mV,{}),insidetextfont:e2({},mV,{}),outsidetextfont:e2({},mV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:e2({},Tf.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:wmt,offsetgroup:Tf.offsetgroup,alignmentgroup:Tf.alignmentgroup,selected:{marker:{opacity:Tf.selected.marker.opacity,color:Tf.selected.marker.color,editType:"style"},textfont:Tf.selected.textfont,editType:"style"},unselected:{marker:{opacity:Tf.unselected.marker.opacity,color:Tf.unselected.marker.color,editType:"style"},textfont:Tf.unselected.textfont,editType:"style"},zorder:Tf.zorder}});var RI=ye((dor,Xme)=>{"use strict";Xme.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 zI=ye((vor,Jme)=>{"use strict";var Tmt=va(),Yme=Rv().hasColorscale,Kme=Uh(),Amt=Mr().coercePattern;Jme.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=Yme(t,"marker");s&&Kme(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",Tmt.defaultLine),Yme(t,"marker.line")&&Kme(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),Amt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var r0=ye((por,iye)=>{"use strict";var $me=uo(),xT=Mr(),Qme=va(),Smt=ba(),Mmt=K3(),Emt=Pg(),kmt=zI(),Cmt=Hb(),eye=Lm(),FI=xT.coerceFont;function Lmt(e,t,r,n){function i(u,c){return xT.coerce(e,t,eye,u,c)}var a=Mmt(e,t,n,i);if(!a){t.visible=!1;return}Emt(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");var o=i("textposition");rye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),kmt(e,t,i,r,n);var s=(t.marker.line||{}).color,l=Smt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||Qme.defaultLine,{axis:"y"}),l(e,t,s||Qme.defaultLine,{axis:"x",inherit:"y"}),xT.coerceSelectionMarkerOpacity(t,i)}function Pmt(e,t){var r,n;function i(s,l){return xT.coerce(n._input,n,eye,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&$me(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function rye(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",x=d||i==="outside";if(v||x){var b=FI(n,"textfont",r.font),g=xT.extendFlat({},b),E=e.textfont&&e.textfont.color,k=!E;if(k&&delete g.color,FI(n,"insidetextfont",g),h){var S=xT.extendFlat({},b);k&&delete S.color,FI(n,"pathbar.textfont",S)}x&&FI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate")}v&&f&&n("insidetextanchor")}iye.exports={supplyDefaults:Lmt,crossTraceDefaults:Pmt,handleText:rye,validateCornerradius:tye}});var yV=ye((gor,nye)=>{"use strict";var Imt=ba(),Dmt=Qa(),Rmt=Mr(),zmt=RI(),Fmt=r0().validateCornerradius;nye.exports=function(e,t,r){function n(x,b){return Rmt.coerce(e,t,zmt,x,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=Dmt.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=Fmt(v)}});var c4=ye((mor,aye)=>{"use strict";var bT=Mr();aye.exports=function(t,r){for(var n=0;n{"use strict";var oye=Qa(),sye=Dg(),lye=Rv().hasColorscale,uye=zv(),qmt=c4(),Omt=F0();cye.exports=function(t,r){var n=oye.getFromId(t,r.xaxis||"x"),i=oye.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=sye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=sye(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 Bmt=xa(),Nmt=Mr();function Umt(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=Bmt.select(this).select("text");Nmt.setTransormAndDisplay(u,l)}})}}function Vmt(e,t,r){if(r.uniformtext.mode){var n=hye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var Gmt=uo(),jmt=id(),vye=Mr().isArrayOrTypedArray;t2.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};t2.coerceNumber=function(e,t,r){if(Gmt(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};t2.coerceColor=function(e,t,r){return jmt(t).isValid()?t:r!==void 0?r:e.dflt};t2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};t2.getValue=function(e,t){var r;return vye(e)?t{"use strict";var f4=xa(),Wmt=va(),h4=ao(),pye=Mr(),gye=ba(),mye=_v().resizeText,_V=Lm(),Zmt=_V.textfont,Xmt=_V.insidetextfont,Ymt=_V.outsidetextfont,Jd=qI();function Kmt(e){var t=f4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");mye(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)&&f4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=f4.select(this),o=i[0].trace;yye(a,o,e)}),gye.getComponentMethod("errorbars","style")(t)}function yye(e,t,r){h4.pointStyle(e.selectAll("path"),t,r),_ye(e,t,r)}function _ye(e,t,r){e.selectAll("text").each(function(n){var i=f4.select(this),a=pye.ensureUniformFontSize(r,xye(i,n,t,r));h4.font(i,a)})}function Jmt(e,t,r){var n=t[0].trace;n.selectedpoints?$mt(r,n,e):(yye(r,n,e),gye.getComponentMethod("errorbars","style")(r))}function $mt(e,t,r){h4.selectedPointStyle(e.selectAll("path"),t),Qmt(e.selectAll("text"),t,r)}function Qmt(e,t,r){e.each(function(n){var i=f4.select(this),a;if(n.selected){a=pye.ensureUniformFontSize(r,xye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),h4.font(i,a)}else h4.selectedTextStyle(i,t)})}function xye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Aye(t,r);a=wye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Tye(r,t.i,i));return a}function bye(e,t,r){return xV(Zmt,e.textfont,t,r)}function wye(e,t,r,n){var i=bye(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:Wmt.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}),xV(Xmt,e.insidetextfont,t,i)}function Tye(e,t,r){var n=bye(e,t,r);return xV(Ymt,e.outsidetextfont,t,n)}function xV(e,t,r,n){t=t||{};var i=Jd.getValue(t.family,r),a=Jd.getValue(t.size,r),o=Jd.getValue(t.color,r),s=Jd.getValue(t.weight,r),l=Jd.getValue(t.style,r),u=Jd.getValue(t.variant,r),c=Jd.getValue(t.textcase,r),f=Jd.getValue(t.lineposition,r),h=Jd.getValue(t.shadow,r);return{family:Jd.coerceString(e.family,i,n.family),size:Jd.coerceNumber(e.size,a,n.size),color:Jd.coerceColor(e.color,o,n.color),weight:Jd.coerceString(e.weight,s,n.weight),style:Jd.coerceString(e.style,l,n.style),variant:Jd.coerceString(e.variant,u,n.variant),textcase:Jd.coerceString(e.variant,c,n.textcase),lineposition:Jd.coerceString(e.variant,f,n.lineposition),shadow:Jd.coerceString(e.variant,h,n.shadow)}}function Aye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Sye.exports={style:Kmt,styleTextPoints:_ye,styleOnSelect:Jmt,getInsideTextFont:wye,getOutsideTextFont:Tye,getBarColor:Aye,resizeText:mye}});var i2=ye((wor,Dye)=>{"use strict";var OI=xa(),BI=uo(),Pd=Mr(),eyt=Ll(),tyt=va(),T_=ao(),ryt=ba(),NI=Qa().tickText,Mye=_v(),iyt=Mye.recordMinTextSize,nyt=Mye.clearMinTextSize,bV=N0(),wT=qI(),ayt=Qb(),Eye=Lm(),oyt=Eye.text,syt=Eye.textposition,lyt=rp().appendArrayPointValue,Uv=ayt.TEXTPAD;function uyt(e){return e.id}function cyt(e){if(e.ids)return uyt}function wV(e){return(e>0)-(e<0)}function Pm(e,t){return e0}function hyt(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},nyt("bar",l));var c=Pd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=OI.select(this),d=f[0].trace,v=f[0].t,x=d.type==="waterfall",b=d.type==="funnel",g=d.type==="histogram",E=d.type==="bar",k=E||b,S=0;x&&d.connector.visible&&d.connector.mode==="between"&&(S=d.connector.line.width/2);var L=d.orientation==="h",_=Cye(i),C=Pd.ensureSingle(h,"g","points"),M=cyt(d),p=C.selectAll("g.point").data(Pd.identity,M);p.enter().append("g").classed("point",!0),p.exit().remove(),p.each(function(T,F){var q=OI.select(this),V=fyt(T,o,s,L),H=V[0][0],X=V[0][1],G=V[1][0],N=V[1][1],W=(L?X-H:N-G)===0;W&&k&&wT.getLineWidth(d,T)&&(W=!1),W||(W=!BI(H)||!BI(X)||!BI(G)||!BI(N)),T.isBlank=W,W&&(L?X=H:N=G),S&&!W&&(L?(H-=Pm(H,X)*S,X+=Pm(H,X)*S):(G-=Pm(G,N)*S,N+=Pm(G,N)*S));var re,ae;if(d.type==="waterfall"){if(!W){var _e=d[T.dir].marker;re=_e.line.width,ae=_e.color}}else re=wT.getLineWidth(d,T),ae=T.mc||d.marker.color;function Me(Ke){var xt=OI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?OI.round(Math.round(Ke)-xt,2):Ke}function ke(Ke,xt,bt){return bt&&Ke===xt?Ke:Math.abs(Ke-xt)>=2?Me(Ke):Ke>xt?Math.ceil(Ke):Math.floor(Ke)}var ge=tyt.opacity(ae),ie=ge<1||re>.01?Me:ke;e._context.staticPlot||(H=ie(H,X,L),X=ie(X,H,L),G=ie(G,N,!L),N=ie(N,G,!L));var Te=L?o.c2p:s.c2p,Ee;T.s0>0?Ee=T._sMax:T.s0<0?Ee=T._sMin:Ee=T.s1>0?T._sMax:T._sMin;function Ae(Ke,xt){if(!Ke)return 0;var bt=Math.abs(L?N-G:X-H),Lt=Math.abs(L?X-H:N-G),St=ie(Math.abs(Te(Ee,!0)-Te(0,!0))),Et=T.hasB?Math.min(bt/2,Lt/2):Math.min(bt/2,St),dt;if(xt==="%"){var Ht=Math.min(50,Ke);dt=bt*(Ht/100)}else dt=Ke;return ie(Math.max(Math.min(dt,Et),0))}var ze=E||g?Ae(v.cornerradiusvalue,v.cornerradiusform):0,Ce,me,De="M"+H+","+G+"V"+N+"H"+X+"V"+G+"Z",ce=0;if(ze&&T.s){var Ge=wV(T.s0)===0||wV(T.s)===wV(T.s0)?T.s1:T.s0;if(ce=ie(T.hasB?0:Math.abs(Te(Ee,!0)-Te(Ge,!0))),ce0?Math.sqrt(ce*(2*ze-ce)):0,Dt=nt>0?Math.max:Math.min;Ce="M"+H+","+G+"V"+(N-rt*ct)+"H"+Dt(X-(ze-ce)*nt,H)+"A "+ze+","+ze+" 0 0 "+qt+" "+X+","+(N-ze*ct-ot)+"V"+(G+ze*ct+ot)+"A "+ze+","+ze+" 0 0 "+qt+" "+Dt(X-(ze-ce)*nt,H)+","+(G+rt*ct)+"Z"}else if(T.hasB)Ce="M"+(H+ze*nt)+","+G+"A "+ze+","+ze+" 0 0 "+qt+" "+H+","+(G+ze*ct)+"V"+(N-ze*ct)+"A "+ze+","+ze+" 0 0 "+qt+" "+(H+ze*nt)+","+N+"H"+(X-ze*nt)+"A "+ze+","+ze+" 0 0 "+qt+" "+X+","+(N-ze*ct)+"V"+(G+ze*ct)+"A "+ze+","+ze+" 0 0 "+qt+" "+(X-ze*nt)+","+G+"Z";else{me=Math.abs(N-G)+ce;var kt=me0?Math.sqrt(ce*(2*ze-ce)):0,Yt=ct>0?Math.max:Math.min;Ce="M"+(H+kt*nt)+","+G+"V"+Yt(N-(ze-ce)*ct,G)+"A "+ze+","+ze+" 0 0 "+qt+" "+(H+ze*nt-Ct)+","+N+"H"+(X-ze*nt+Ct)+"A "+ze+","+ze+" 0 0 "+qt+" "+(X-kt*nt)+","+Yt(N-(ze-ce)*ct,G)+"V"+G+"Z"}}else Ce=De}else Ce=De;var xr=kye(Pd.ensureSingle(q,"path"),l,i,a);if(xr.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((X-H)*(N-G))||W&&e._context.staticPlot?"M0,0Z":Ce).call(T_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&_){var er=T_.makePointStyleFns(d);T_.singlePointStyle(T,xr,d,er,e)}dyt(e,t,q,f,F,H,X,G,N,ze,ce,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;T_.setClipUrl(h,P?null:t.layerClipId,e)});ryt.getComponentMethod("errorbars","plot")(e,c,t,i)}function dyt(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,x=e._fullLayout,b;function g(me,De,ce){var Ge=Pd.ensureSingle(me,"text").text(De).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(T_.font,ce).call(eyt.convertToTspans,e);return Ge}var E=n[0].trace,k=E.orientation==="h",S=gyt(x,n,i,d,v);b=myt(E,i);var L=f.mode==="stack"||f.mode==="relative",_=n[i],C=!L||_._outmost,M=_.hasB,p=u&&u-c>Uv;if(!S||b==="none"||(_.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=x.font,T=bV.getBarColor(n[i],E),F=bV.getInsideTextFont(E,i,P,T),q=bV.getOutsideTextFont(E,i,P),V=E.insidetextanchor||"end",H=r.datum();k?d.type==="log"&&H.s0<=0&&(d.range[0]0&&Me>0,ie;p?M?ie=r2(N-2*u,W,_e,Me,k)||r2(N,W-2*u,_e,Me,k):k?ie=r2(N-(u-c),W,_e,Me,k)||r2(N,W-2*(u-c),_e,Me,k):ie=r2(N,W-(u-c),_e,Me,k)||r2(N-2*(u-c),W,_e,Me,k):ie=r2(N,W,_e,Me,k),ge&&ie?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){ke=Pd.ensureUniformFontSize(e,b==="outside"?q:F),re=g(r,S,ke);var Te=re.attr("transform");if(re.attr("transform",""),ae=T_.bBox(re.node()),_e=ae.width,Me=ae.height,re.attr("transform",Te),_e<=0||Me<=0){re.remove();return}}var Ee=E.textangle,Ae,ze;b==="outside"?(ze=E.constraintext==="both"||E.constraintext==="outside",Ae=pyt(a,o,s,l,ae,{isHorizontal:k,constrained:ze,angle:Ee})):(ze=E.constraintext==="both"||E.constraintext==="inside",Ae=Iye(a,o,s,l,ae,{isHorizontal:k,constrained:ze,angle:Ee,anchor:V,hasB:M,r:u,overhead:c})),Ae.fontSize=ke.size,iyt(E.type==="histogram"?"bar":E.type,Ae,x),_.transform=Ae;var Ce=kye(re,x,f,h);Pd.setTransormAndDisplay(Ce,Ae)}function r2(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 Lye(e){return e==="auto"?0:e}function Pye(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 Iye(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,x=a.hasB,b=a.r,g=a.overhead,E=i.width,k=i.height,S=Math.abs(t-e),L=Math.abs(n-r),_=S>2*Uv&&L>2*Uv?Uv:0;S-=2*_,L-=2*_;var C=Lye(l);l==="auto"&&!(E<=S&&k<=L)&&(E>S||k>L)&&(!(E>L||k>S)||EUv){var T=vyt(e,t,r,n,M,b,g,o,x);p=T.scale,P=T.pad}else p=1,s&&(p=Math.min(1,S/M.x,L/M.y)),P=0;var F=i.left*v+i.right*d,q=(i.top+i.bottom)/2,V=(e+Uv)*v+(t-Uv)*d,H=(r+n)/2,X=0,G=0;if(f||c){var N=(o?M.x:M.y)/2;b&&(c||x)&&(_+=P);var W=o?Pm(e,t):Pm(r,n);o?f?(V=e+W*_,X=-W*N):(V=t-W*_,X=W*N):f?(H=r+W*_,G=-W*N):(H=n-W*_,G=W*N)}return{textX:F,textY:q,targetX:V,targetY:H,anchorX:X,anchorY:G,scale:p,rotate:C}}function vyt(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Uv),c=Math.max(0,Math.abs(n-r)-2*Uv),f=a-Uv,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,x,b,g,E,k;return i.y/i.x>=c/(u-d)?E=c/i.y:i.y/i.x<=(c-v)/u?E=u/i.x:!l&&s?(x=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),g=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,E=(-b+Math.sqrt(b*b-4*x*g))/(2*x)):l?(x=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),g=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,E=(-b+Math.sqrt(b*b-4*x*g))/(2*x)):(x=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),g=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,E=(-b+Math.sqrt(b*b-4*x*g))/(2*x)),E=Math.min(1,E),s?k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*E)/2)*(f-(c-i.y*E)/2)))-o):k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*E)/2)*(f-(u-i.x*E)/2)))-o),{scale:E,pad:k}}function pyt(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*Uv?Uv:0:d=f>2*Uv?Uv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var x=Lye(l),b=Pye(i,x),g=(o?b.x:b.y)/2,E=(i.left+i.right)/2,k=(i.top+i.bottom)/2,S=(e+t)/2,L=(r+n)/2,_=0,C=0,M=o?Pm(t,e):Pm(r,n);return o?(S=t-M*d,_=M*g):(L=n+M*d,C=-M*g),{textX:E,textY:k,targetX:S,targetY:L,anchorX:_,anchorY:C,scale:v,rotate:x}}function gyt(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=yyt(e,t,r,n,i):a.textinfo?s=_yt(t,r,n,i):s=wT.getValue(a.text,r),wT.coerceString(oyt,s)}function myt(e,t){var r=wT.getValue(e.textposition,t);return wT.coerceEnumerated(syt,r)}function yyt(e,t,r,n,i){var a=t[0].trace,o=Pd.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 NI(h,h.c2l(_),!0).text}function b(_){return NI(v,v.c2l(_),!0).text}var g=t[r],E={};E.label=g.p,E.labelLabel=E[f+"Label"]=x(g.p);var k=Pd.castOption(a,g.i,"text");(k===0||k)&&(E.text=k),E.value=g.s,E.valueLabel=E[d+"Label"]=b(g.s);var S={};lyt(S,a,g.i),(s||S.x===void 0)&&(S.x=c?E.value:E.label),(s||S.y===void 0)&&(S.y=c?E.label:E.value),(s||S.xLabel===void 0)&&(S.xLabel=c?E.valueLabel:E.labelLabel),(s||S.yLabel===void 0)&&(S.yLabel=c?E.labelLabel:E.valueLabel),l&&(E.delta=+g.rawS||g.s,E.deltaLabel=b(E.delta),E.final=g.v,E.finalLabel=b(E.final),E.initial=E.final-E.delta,E.initialLabel=b(E.initial)),u&&(E.value=g.s,E.valueLabel=b(E.value),E.percentInitial=g.begR,E.percentInitialLabel=Pd.formatPercent(g.begR),E.percentPrevious=g.difR,E.percentPreviousLabel=Pd.formatPercent(g.difR),E.percentTotal=g.sumR,E.percenTotalLabel=Pd.formatPercent(g.sumR));var L=Pd.castOption(a,g.i,"customdata");return L&&(E.customdata=L),Pd.texttemplateString(o,E,e._d3locale,S,E,a._meta||{})}function _yt(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 _=a?n:r;return NI(_,L,!0).text}function u(L){var _=a?r:n;return NI(_,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,x=function(L){return h.indexOf(L)!==-1};if(x("label")&&d.push(l(e[t].p)),x("text")&&(v=Pd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,g=f.v,E=g-b;x("initial")&&d.push(u(E)),x("delta")&&d.push(u(b)),x("final")&&d.push(u(g))}if(s){x("value")&&d.push(u(f.s));var k=0;x("percent initial")&&k++,x("percent previous")&&k++,x("percent total")&&k++;var S=k>1;x("percent initial")&&(v=Pd.formatPercent(f.begR),S&&(v+=" of initial"),d.push(v)),x("percent previous")&&(v=Pd.formatPercent(f.difR),S&&(v+=" of previous"),d.push(v)),x("percent total")&&(v=Pd.formatPercent(f.sumR),S&&(v+=" of total"),d.push(v))}return d.join("
")}Dye.exports={plot:hyt,toMoveInsideBar:Iye}});var TT=ye((Tor,qye)=>{"use strict";var d4=Nc(),xyt=ba(),Rye=va(),byt=Mr().fillText,wyt=qI().getLineWidth,TV=Qa().hoverLabelText,Tyt=es().BADNUM;function Ayt(e,t,r,n,i){var a=zye(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=Fye(s,l),xyt.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function zye(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,x,b,g,E;o.orientation==="h"?(h=r,d=t,v="y",x="x",b=H,g=F):(h=t,d=r,v="x",x="y",g=H,b=F);var k=o[v+"period"],S=l||k;function L(ie){return C(ie,-1)}function _(ie){return C(ie,1)}function C(ie,Te){var Ee=ie.w;return ie[v]+Te*Ee/2}function M(ie){return ie[v+"End"]-ie[v+"Start"]}var p=l?L:k?function(ie){return ie.p-M(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?_:k?function(ie){return ie.p+M(ie)/2}:function(ie){return Math.max(_(ie),ie.p+s.bardelta/2)};function T(ie,Te,Ee){return i.finiteRange&&(Ee=0),d4.inbox(ie-h,Te-h,Ee+Math.min(1,Math.abs(Te-ie)/E)-1)}function F(ie){return T(p(ie),P(ie),c)}function q(ie){return T(L(ie),_(ie),f)}function V(ie){var Te=ie[x];if(u){var Ee=Math.abs(ie.rawS)||0;d>0?Te+=Ee:d<0&&(Te-=Ee)}return Te}function H(ie){var Te=d,Ee=ie.b,Ae=V(ie);return d4.inbox(Ee-Te,Ae-Te,c+(Ae-Te)/(Ae-Ee)-1)}function X(ie){var Te=d,Ee=ie.b,Ae=V(ie);return d4.inbox(Ee-Te,Ae-Te,f+(Ae-Te)/(Ae-Ee)-1)}var G=e[v+"a"],N=e[x+"a"];E=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function W(ie){return(b(ie)+g(ie))/2}var re=d4.getDistanceFunction(n,b,g,W);if(d4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==Tyt){S||(p=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(_(ie),ie.p+s.bargroupwidth/2)});var ae=e.index,_e=a[ae],Me=o.base?_e.b+_e.s:_e.s;e[x+"0"]=e[x+"1"]=N.c2p(_e[x],!0),e[x+"LabelVal"]=Me;var ke=s.extents[s.extents.round(_e.p)];e[v+"0"]=G.c2p(l?p(_e):ke[0],!0),e[v+"1"]=G.c2p(l?P(_e):ke[1],!0);var ge=_e.orig_p!==void 0;return e[v+"LabelVal"]=ge?_e.orig_p:_e.p,e.labelLabel=TV(G,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=TV(N,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=TV(N,_e.b,o[x+"hoverformat"]),e.spikeDistance=(X(_e)+q(_e))/2,e[v+"Spike"]=G.c2p(_e.p,!0),byt(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function Fye(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=wyt(e,t);if(Rye.opacity(r))return r;if(Rye.opacity(n)&&i)return n}qye.exports={hoverPoints:Ayt,hoverOnBars:zye,getTraceColor:Fye}});var Bye=ye((Aor,Oye)=>{"use strict";Oye.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 AT=ye((Sor,Nye)=>{"use strict";Nye.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";Uye.exports={attributes:Lm(),layoutAttributes:RI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:yV(),calc:fye(),crossTraceCalc:Gb().crossTraceCalc,colorbar:Kd(),arraysToCalcdata:c4(),plot:i2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:TT().hoverPoints,eventData:Bye(),selectPoints:AT(),moduleType:"trace",name:"bar",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var Gye=ye((Eor,Hye)=>{"use strict";Hye.exports=Vye()});var v4=ye((kor,Xye)=>{"use strict";var Myt=Eg(),U0=Uc(),jye=Lm(),Eyt=dh(),Wye=Oc().axisHoverFormat,kyt=Wo().hovertemplateAttrs,zy=no().extendFlat,ST=U0.marker,Zye=ST.line;Xye.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:Wye("x"),yhoverformat:Wye("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({},ST.symbol,{arrayOk:!1,editType:"plot"}),opacity:zy({},ST.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:zy({},ST.angle,{arrayOk:!1,editType:"calc"}),size:zy({},ST.size,{arrayOk:!1,editType:"calc"}),color:zy({},ST.color,{arrayOk:!1,editType:"style"}),line:{color:zy({},Zye.color,{arrayOk:!1,dflt:Eyt.defaultLine,editType:"style"}),width:zy({},Zye.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:Myt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:jye.offsetgroup,alignmentgroup:jye.alignmentgroup,selected:{marker:U0.selected.marker,editType:"style"},unselected:{marker:U0.unselected.marker,editType:"style"},text:zy({},U0.text,{}),hovertext:zy({},U0.hovertext,{}),hovertemplate:kyt({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:U0.zorder}});var p4=ye((Cor,Yye)=>{"use strict";Yye.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 m4=ye((Lor,Qye)=>{"use strict";var V0=Mr(),Cyt=ba(),Lyt=va(),Pyt=Pg(),Iyt=Hb(),Kye=L3(),g4=v4();function Dyt(e,t,r,n){function i(v,x){return V0.coerce(e,t,g4,v,x)}if(Jye(e,t,i,n),t.visible!==!1){Pyt(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",Lyt.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,g4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),$ye(e,t,i,{prefix:"box"}),i("zorder")}}function Jye(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],g4[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),x=d&&V0.minRowLength(s),b=n.calendar,g={autotypenumbers:n.autotypenumbers},E,k;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var S=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!S?E="h":E="v",k=l;break;case"10":E="v",k=Math.min(l,x);break;case"20":E="h",k=Math.min(l,s.length);break;case"01":E="h",k=Math.min(l,v);break;case"02":E="v",k=Math.min(l,o.length);break;case"12":E="v",k=Math.min(l,x,o.length);break;case"21":E="h",k=Math.min(l,s.length,v);break;case"11":k=0;break;case"22":var _=!1,C;for(C=0;C0?(E="v",d>0?k=Math.min(x,v):k=Math.min(v)):d>0?(E="h",k=Math.min(x)):k=0;if(!k){t.visible=!1;return}t._length=k;var M=r("orientation",E);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 p=Cyt.getComponentMethod("calendars","handleTraceDefaults");p(e,t,["x","y"],n)}function $ye(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,g4,"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"),V0.coerceSelectionMarkerOpacity(t,r)}function Ryt(e,t){var r,n;function i(l){return V0.coerce(n._input,n,g4,l)}for(var a=0;a{"use strict";var zyt=ba(),Fyt=Mr(),qyt=p4();function e1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var SV=uo(),VI=Qa(),Byt=Dg(),$f=Mr(),i0=es().BADNUM,Fy=$f._;c1e.exports=function(t,r){var n=t._fullLayout,i=VI.getFromId(t,r.xaxis||"x"),a=VI.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 x=Nyt(r,d,h,n[s]),b=x[0],g=x[1],E=$f.distinctVals(b,h),k=E.vals,S=E.minDiff/2,L,_,C,M,p,P,T=(r.boxpoints||r.points)==="all"?$f.identity:function(qt){return qt.vL.uf};if(r._hasPreCompStats){var F=r[f],q=function(qt){return c.d2c((r[qt]||[])[l])},V=1/0,H=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var G=q("lowerfence");L.lf=G!==i0&&G<=L.q1?G:a1e(L,C,M);var N=q("upperfence");L.uf=N!==i0&&N>=L.q3?N:o1e(L,C,M);var W=q("mean");L.mean=W!==i0?W:M?$f.mean(C,M):(L.q1+L.q3)/2;var re=q("sd");L.sd=W!==i0&&re>=0?re:M?$f.stdev(C,M,L.mean):L.q3-L.q1,L.lo=s1e(L),L.uo=l1e(L);var ae=q("notchspan");ae=ae!==i0&&ae>0?ae:u1e(L,M),L.ln=L.med-ae,L.un=L.med+ae;var _e=L.lf,Me=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),Me=Math.max(Me,C[M-1])),r.notched&&(_e=Math.min(_e,L.ln),Me=Math.max(Me,L.un)),L.min=_e,L.max=Me}else{$f.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` -`));var ke;L.med!==i0?ke=L.med:L.q1!==i0?L.q3!==i0?ke=(L.q1+L.q3)/2:ke=L.q1:L.q3!==i0?ke=L.q3:ke=0,L.med=ke,L.q1=L.q3=ke,L.lf=L.uf=ke,L.mean=L.sd=ke,L.ln=L.un=ke,L.min=L.max=ke}V=Math.min(V,L.min),H=Math.max(H,L.max),L.pts2=_.filter(T),o.push(L)}}r._extremes[c._id]=VI.findExtremes(c,[V,H],{padded:!0})}else{var ge=c.makeCalcdata(r,f),ie=Uyt(k,S),Te=k.length,Ee=Vyt(Te);for(l=0;l=0&&Ae0){if(L={},L.pos=L[d]=k[l],_=L.pts=Ee[l].sort(i1e),C=L[f]=_.map(n1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=$f.mean(C,M),L.sd=$f.stdev(C,M,L.mean)*r.sdmultiple,L.med=$f.interp(C,.5),M%2&&(De||ce)){var Ge,nt;De?(Ge=C.slice(0,M/2),nt=C.slice(M/2+1)):ce&&(Ge=C.slice(0,M/2+1),nt=C.slice(M/2)),L.q1=$f.interp(Ge,.5),L.q3=$f.interp(nt,.5)}else L.q1=$f.interp(C,.25),L.q3=$f.interp(C,.75);L.lf=a1e(L,C,M),L.uf=o1e(L,C,M),L.lo=s1e(L),L.uo=l1e(L);var ct=u1e(L,M);L.ln=L.med-ct,L.un=L.med+ct,ze=Math.min(ze,L.ln),Ce=Math.max(Ce,L.un),L.pts2=_.filter(T),o.push(L)}r.notched&&$f.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=VI.findExtremes(c,r.notched?ge.concat([ze,Ce]):ge,{padded:!0})}return Hyt(o,r),o.length>0?(o[0].t={num:n[s],dPos:S,posLetter:d,valLetter:f,labels:{med:Fy(t,"median:"),min:Fy(t,"min:"),q1:Fy(t,"q1:"),q3:Fy(t,"q3:"),max:Fy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Fy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Fy(t,"mean:"),lf:Fy(t,"lower fence:"),uf:Fy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function Nyt(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=Byt(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||SV(e.name)&&["linear","log"].indexOf(r.type)!==-1||$f.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 f1e=Qa(),Gyt=Mr(),jyt=Bb().getAxisGroup,h1e=["v","h"];function Wyt(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,E=1-a[e+"gap"],k=1-a[e+"groupgap"];for(l=0;l0;if(C==="positive"?(N=M*(_?1:.5),ae=re,W=ae=P):C==="negative"?(N=ae=P,W=M*(_?1:.5),_e=re):(N=W=M,ae=_e=re),Ee){var Ae=S.pointpos,ze=S.jitter,Ce=S.marker.size/2,me=0;Ae+ze>=0&&(me=re*(Ae+ze),me>N?(Te=!0,ge=Ce,Me=me):me>ae&&(ge=Ce,Me=N)),me<=N&&(Me=N);var De=0;Ae-ze<=0&&(De=-re*(Ae-ze),De>W?(Te=!0,ie=Ce,ke=De):De>_e&&(ie=Ce,ke=W)),De<=W&&(ke=W)}else Me=N,ke=W;var ce=new Array(c.length);for(u=0;u{"use strict";var MT=xa(),n2=Mr(),Zyt=ao(),p1e=5,Xyt=.01;function Yyt(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;n2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=MT.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),g1e(l,{pos:h,val:d},f,c,i),m1e(l,{x:a,y:o},f,c),y1e(l,{pos:h,val:d},f,c)})}function g1e(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,x=v?1-2*r.notchwidth:1,b,g;Array.isArray(n.bdPos)?(b=n.bdPos[0],g=n.bdPos[1]):(b=n.bdPos,g=n.bdPos);var E=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?n2.identity:[]);E.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),E.exit().remove(),E.each(function(k){if(k.empty)return MT.select(this).attr("d","M0,0Z");var S=s.c2l(k.pos+u,!0),L=s.l2p(S-b)+f,_=s.l2p(S+g)+f,C=l?(L+_)/2:s.l2p(S)+f,M=r.whiskerwidth,p=l?L*M+(1-M)*C:s.l2p(S-c)+f,P=l?_*M+(1-M)*C:s.l2p(S+c)+f,T=s.l2p(S-b*x)+f,F=s.l2p(S+g*x)+f,q=r.sizemode==="sd",V=o.c2p(q?k.mean-k.sd:k.q1,!0),H=q?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),X=n2.constrain(q?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(V,H)+1,Math.max(V,H)-1),G=k.lf===void 0||r.boxpoints===!1||q,N=o.c2p(G?k.min:k.lf,!0),W=o.c2p(G?k.max:k.uf,!0),re=o.c2p(k.ln,!0),ae=o.c2p(k.un,!0);a?MT.select(this).attr("d","M"+X+","+T+"V"+F+"M"+V+","+L+"V"+_+(v?"H"+re+"L"+X+","+F+"L"+ae+","+_:"")+"H"+H+"V"+L+(v?"H"+ae+"L"+X+","+T+"L"+re+","+L:"")+"Z"+(d?"M"+V+","+C+"H"+N+"M"+H+","+C+"H"+W+(h===0?"":"M"+N+","+p+"V"+P+"M"+W+","+p+"V"+P):"")):MT.select(this).attr("d","M"+T+","+X+"H"+F+"M"+L+","+V+"H"+_+(v?"V"+re+"L"+F+","+X+"L"+_+","+ae:"")+"V"+H+"H"+L+(v?"V"+ae+"L"+T+","+X+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+V+"V"+N+"M"+C+","+H+"V"+W+(h===0?"":"M"+p+","+N+"H"+P+"M"+p+","+W+"H"+P):""))})}function m1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;n2.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,x=Math.max((h.max-h.min)/10,h.q3-h.q1),b=x*1e-9,g=x*Xyt,E=[],k=0,S;if(r.jitter){if(x===0)for(k=1,E=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(Zyt.translatePoints,i,a)}function y1e(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?n2.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),x=a.l2p(v-c)+l,b=a.l2p(v+f)+l,g=o?(x+b)/2:a.l2p(v)+l,E=i.c2p(d.mean,!0),k=i.c2p(d.mean-d.sd,!0),S=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?MT.select(this).attr("d","M"+E+","+x+"V"+b+(u==="sd"?"m0,0L"+k+","+g+"L"+E+","+x+"L"+S+","+g+"Z":"")):MT.select(this).attr("d","M"+x+","+E+"H"+b+(u==="sd"?"m0,0L"+g+","+k+"L"+x+","+E+"L"+g+","+S+"Z":""))})}_1e.exports={plot:Yyt,plotBoxAndWhiskers:g1e,plotPoints:m1e,plotBoxMean:y1e}});var jI=ye((zor,x1e)=>{"use strict";var EV=xa(),kV=va(),CV=ao();function Kyt(e,t,r){var n=r||EV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=EV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(kV.stroke,d).call(kV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=EV.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(kV.stroke,o.line.color);var c=a.selectAll("path.point");CV.pointStyle(c,o,e)}})}function Jyt(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?CV.selectedPointStyle(i,n):CV.pointStyle(i,n,e)}x1e.exports={style:Kyt,styleOnSelect:Jyt}});var PV=ye((For,A1e)=>{"use strict";var $yt=Qa(),LV=Mr(),A_=Nc(),b1e=va(),Qyt=LV.fillText;function e1t(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(w1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=T1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function w1e(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,x,b,g,E,k,S,L=l.bdPos,_,C,M=l.wHover,p=function(Ce){return h.c2l(Ce.pos)+l.bPos-h.c2l(x)};u&&s.side!=="both"?(s.side==="positive"&&(E=function(Ce){var me=p(Ce);return A_.inbox(me,me+M,k)},_=L,C=0),s.side==="negative"&&(E=function(Ce){var me=p(Ce);return A_.inbox(me-M,me,k)},_=0,C=L)):(E=function(Ce){var me=p(Ce);return A_.inbox(me-M,me+M,k)},_=C=L);var P;u?P=function(Ce){return A_.inbox(Ce.span[0]-v,Ce.span[1]-v,k)}:P=function(Ce){return A_.inbox(Ce.min-v,Ce.max-v,k)},s.orientation==="h"?(v=t,x=r,b=P,g=E,c="y",h=o,f="x",d=a):(v=r,x=t,b=E,g=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])));k=e.maxHoverDistance-T,S=e.maxSpikeDistance-T;function F(Ce){return(b(Ce)+g(Ce))/2}var q=A_.getDistanceFunction(n,b,g,F);if(A_.getClosest(i,q,e),e.index===!1)return[];var V=i[e.index],H=s.line.color,X=(s.marker||{}).color;b1e.opacity(H)&&s.line.width?e.color=H:b1e.opacity(X)&&s.boxpoints?e.color=X:e.color=s.fillcolor,e[c+"0"]=h.c2p(V.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(V.pos+l.bPos+_,!0),e[c+"LabelVal"]=V.orig_p!==void 0?V.orig_p:V.pos;var G=c+"Spike";e.spikeDistance=F(V)*S/k,e[G]=h.c2p(V.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,W=s.boxpoints||s.points,re=W&&N?["max","uf","q3","med","mean","q1","lf","min"]:W&&!N?["max","uf","q3","med","q1","lf","min"]:!W&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ae=d.range[1]{"use strict";S1e.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 IV=ye((Oor,E1e)=>{"use strict";E1e.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";k1e.exports={attributes:v4(),layoutAttributes:p4(),supplyDefaults:m4().supplyDefaults,crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:UI().supplyLayoutDefaults,calc:MV(),crossTraceCalc:HI().crossTraceCalc,plot:GI().plot,style:jI().style,styleOnSelect:jI().styleOnSelect,hoverPoints:PV().hoverPoints,eventData:M1e(),selectPoints:IV(),moduleType:"trace",name:"box",basePlotModule:Jf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var P1e=ye((Nor,L1e)=>{"use strict";L1e.exports=C1e()});var ET=ye((Uor,I1e)=>{"use strict";var n0=Uc(),t1t=vl(),r1t=Su(),DV=Oc().axisHoverFormat,i1t=Wo().hovertemplateAttrs,n1t=Wo().texttemplateAttrs,a1t=Kl(),Pp=no().extendFlat;I1e.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:DV("x"),yhoverformat:DV("y"),zhoverformat:DV("z",1),hovertemplate:i1t(),texttemplate:n1t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:r1t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},t1t.showlegend,{dflt:!1}),zorder:n0.zorder},a1t("",{cLetter:"z",autoColorDflt:!1}))});var ZI=ye((Vor,R1e)=>{"use strict";var o1t=uo(),WI=Mr(),s1t=ba();R1e.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(WI.isArray1D(s)){l=n(a),u=n(o);var c=WI.minRowLength(l),f=WI.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=D1e(a,n),u=D1e(o,n),!l1t(s))return 0;n("transpose"),r._length=null}var h=s1t.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function D1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function l1t(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var z1e=Mr();F1e.exports=function(t,r){t("texttemplate");var n=z1e.extendFlat({},r.font,{color:"auto",size:"auto"});z1e.coerceFont(t,"textfont",n)}});var RV=ye((Gor,q1e)=>{"use strict";q1e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var N1e=ye((jor,B1e)=>{"use strict";var O1e=Mr(),u1t=ZI(),c1t=y4(),f1t=Pg(),h1t=RV(),d1t=Uh(),v1t=ET();B1e.exports=function(t,r,n,i){function a(s,l){return O1e.coerce(t,r,v1t,s,l)}var o=u1t(t,r,a,i);if(!o){r.visible=!1;return}f1t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),c1t(a,i),h1t(t,r,a,i),a("hoverongaps"),a("connectgaps",O1e.isArray1D(r.z)&&r.zsmooth!==!1),d1t(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var zV=ye((Wor,U1e)=>{"use strict";var kT=uo();U1e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return kT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return kT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(kT(i))if(i=Number(i),kT(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(kT(i))if(i=Number(i),kT(r[e])){if(r[e]{"use strict";V1e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";H1e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var CT=es(),a2=CT.ONEAVGYEAR,G1e=CT.ONEAVGMONTH,YI=CT.ONEDAY,j1e=CT.ONEHOUR,W1e=CT.ONEMIN,Z1e=CT.ONESEC,X1e=Qa().tickIncrement;J1e.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(XI(u+s,u+l,i,a),XI(c+s,c+l,i,a)),h=Math.min(XI(u+o,u+s,i,a),XI(c+o,c+s,i,a)),d,v;if(f>h&&hYI){var x=d===a2?1:6,b=d===a2?"M12":"M1";return function(g,E){var k=i.c2d(g,a2,a),S=k.indexOf("-",x);S>0&&(k=k.substr(0,S));var L=i.d2c(k,0,a);if(LZ1e?e>YI?e>a2*1.1?a2:e>G1e*1.1?G1e:YI:e>j1e?j1e:e>W1e?W1e:Z1e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function p1t(e,t,r,n,i,a){if(n&&e>YI){var o=K1e(t,i,a),s=K1e(r,i,a),l=e===a2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function K1e(e,t,r){var n=t.c2d(e,a2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var UV=ye((Kor,e_e)=>{"use strict";var BV=uo(),Vv=Mr(),$1e=ba(),H0=Qa(),g1t=c4(),Q1e=zV(),m1t=FV(),y1t=qV(),_1t=OV();function x1t(e,t){var r=[],n=[],i=t.orientation==="h",a=H0.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=NV(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",x=[],b=v?x:h,g=[],E=[],k=[],S=0,L=t.histnorm,_=t.histfunc,C=L.indexOf("density")!==-1,M,p,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var T=_==="max"||_==="min",F=T?null:0,q=Q1e.count,V=m1t[L],H=!1,X=function(me){return a.r2c(me,0,l)},G;for(Vv.isArrayOrTypedArray(t[s])&&_!=="count"&&(G=t[s],H=_==="avg",q=Q1e[_]),c=X(h.start),p=X(h.end)+(c-H0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&P=Ae;c--)if(n[c]){ze=c;break}for(c=Ae;c<=ze;c++)if(BV(r[c])&&BV(n[c])){var Ce={p:r[c],s:n[c],b:0};u.enabled||(Ce.pts=k[c],ae?Ce.ph0=Ce.ph1=k[c].length?d[k[c][0]]:r[c]:(t._computePh=!0,Ce.ph0=ie(x[c]),Ce.ph1=ie(x[c+1],!0))),Ee.push(Ce)}return Ee.length===1&&(Ee[0].width1=H0.tickIncrement(Ee[0].p,h.size,!1,l)-Ee[0].p),g1t(Ee,t),Vv.isArrayOrTypedArray(t.selectedpoints)&&Vv.tagSelected(Ee,t,ke),Ee}function NV(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,x,b,g=function(ge){return r.r2c(ge,0,d)},E=function(ge){return r.c2r(ge,0,d)},k=r.type==="date"?function(ge){return ge||ge===0?Vv.cleanDate(ge,null,d):null}:function(ge){return BV(ge)?Number(ge):null};function S(ge,ie,Te){ie[ge+"Found"]?(ie[ge]=k(ie[ge]),ie[ge]===null&&(ie[ge]=Te[ge])):(x[ge]=ie[ge]=Te[ge],Vv.nestedProperty(f[0],a+"."+ge).set(Te[ge]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],_=!0,C=!1,M=!1;for(c=0;cr.r2l(G)&&(W=H0.tickIncrement(W,l.size,!0,d)),q.start=r.l2r(W),X||Vv.nestedProperty(t,a+".start").set(q.start)}var re=l.end,ae=r.r2l(F.end),_e=ae!==void 0;if((l.endFound||_e)&&ae!==r.r2l(re)){var Me=_e?ae:Vv.aggNums(Math.max,null,v);q.end=r.l2r(Me),_e||Vv.nestedProperty(t,a+".start").set(q.end)}var ke="autobin"+n;return t._input[ke]===!1&&(t._input[a]=Vv.extendFlat({},t[a]||{}),delete t._input[ke],delete t[ke]),[q,v]}function b1t(e,t,r,n,i){var a=e._fullLayout,o=w1t(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_e.exports={calc:x1t,calcAllAutoBins:NV}});var l_e=ye((Jor,s_e)=>{"use strict";var t_e=Mr(),LT=Qa(),r_e=zV(),A1t=FV(),S1t=qV(),M1t=OV(),i_e=UV().calcAllAutoBins;s_e.exports=function(t,r){var n=LT.getFromId(t,r.xaxis),i=LT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(Et){return n.r2c(Et,0,a)},l=function(Et){return i.r2c(Et,0,o)},u=function(Et){return n.c2r(Et,0,a)},c=function(Et){return i.c2r(Et,0,o)},f,h,d,v,x=i_e(t,r,n,"x"),b=x[0],g=x[1],E=i_e(t,r,i,"y"),k=E[0],S=E[1],L=r._length;g.length>L&&g.splice(L,g.length-L),S.length>L&&S.splice(L,S.length-L);var _=[],C=[],M=[],p=typeof b.size=="string",P=typeof k.size=="string",T=[],F=[],q=p?T:b,V=P?F:k,H=0,X=[],G=[],N=r.histnorm,W=r.histfunc,re=N.indexOf("density")!==-1,ae=W==="max"||W==="min",_e=ae?null:0,Me=r_e.count,ke=A1t[N],ge=!1,ie=[],Te=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&W!=="count"&&(ge=W==="avg",Me=r_e[W]);var Ae=b.size,ze=s(b.start),Ce=s(b.end)+(ze-LT.tickIncrement(ze,Ae,!1,a))/1e6;for(f=ze;f=0&&d=0&&v{"use strict";var Im=Mr(),u_e=es().BADNUM,c_e=Dg();f_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=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,x,b=Im.distinctVals(l),g=b.vals,E=Im.distinctVals(u),k=E.vals,S=[],L,_,C=k.length,M=g.length;for(v=0;v{"use strict";var E1t=uo(),k1t=Mr(),JI=es().BADNUM;h_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(g){if(E1t(g))return+g}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var C1t=Mr(),d_e=.01,L1t=[[-1,0],[1,0],[0,-1],[0,1]];function P1t(e){return .5-.25*Math.min(1,e*.5)}p_e.exports=function(t,r){var n=1,i;for(v_e(t,r),i=0;id_e;i++)n=v_e(t,r,P1t(n));return n>d_e&&C1t.log("interp2d didn't converge quickly",n),t};function v_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,x,b;for(s=0;sx&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-x))))}return n}});var e8=ye((tsr,g_e)=>{"use strict";var I1t=Mr().maxRowLength;g_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=I1t(t),u,c,f,h,d,v,x,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&&(x[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in x)n[h]=x[h],r.push(x[h])}return r.sort(function(g,E){return E[2]-g[2]})}});var VV=ye((rsr,__e)=>{"use strict";var m_e=ba(),y_e=Mr().isArrayOrTypedArray;__e.exports=function(t,r,n,i,a,o){var s=[],l=m_e.traceIs(t,"contour"),u=m_e.traceIs(t,"histogram"),c,f,h,d=y_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 x_e=ba(),HV=Mr(),t8=Qa(),b_e=Dg(),D1t=l_e(),R1t=zv(),z1t=KI(),F1t=$I(),q1t=QI(),O1t=e8(),r8=VV(),GV=es().BADNUM;T_e.exports=function(t,r){var n=t8.getFromId(t,r.xaxis||"x"),i=t8.getFromId(t,r.yaxis||"y"),a=x_e.traceIs(r,"contour"),o=x_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,x,b,g,E;if(n._minDtick=0,i._minDtick=0,o)E=D1t(t,r),f=E.orig_x,l=E.x,u=E.x0,c=E.dx,x=E.orig_y,h=E.y,d=E.y0,v=E.dy,b=E.z;else{var k=r.z;HV.isArray1D(k)?(z1t(r,n,i,"x","y",["z"]),l=r._x,h=r._y,k=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],x=r.y?i.makeCalcdata(r,"y"):[],l=b_e(r,n,"x",f).vals,h=b_e(r,i,"y",x).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=F1t(k,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=B1t(l,h,b),o||(l=w_e(l),h=w_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=O1t(b),q1t(b,r._emptypoints));function S(q){s=r._input.zsmooth=r.zsmooth=!1,HV.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var V=(q[q.length-1]-q[0])/(q.length-1),H=Math.abs(V/100);for(g=0;gH)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 _=HV.maxRowLength(b),C=r.xtype==="scaled"?"":l,M=r8(r,C,u,c,_,n),p=r.ytype==="scaled"?"":h,P=r8(r,p,d,v,b.length,i);r._extremes[n._id]=t8.findExtremes(n,M),r._extremes[i._id]=t8.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&&x&&(T.orig_y=x),C&&C.length===M.length-1&&(T.xCenter=C),p&&p.length===P.length-1&&(T.yCenter=p),o&&(T.xRanges=E.xRanges,T.yRanges=E.yRanges,T.pts=E.pts),a||R1t(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var F={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=r8(F,C,u,c,_,n),T.yfill=r8(F,p,d,v,b.length,i)}return[T]};function w_e(e){for(var t=[],r=e.length,n=0;n{"use strict";n8.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"]];n8.STYLE=n8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var jV=ye((asr,M_e)=>{"use strict";var A_e=a8(),N1t=ao(),S_e=Mr(),PT=null;function U1t(){if(PT!==null)return PT;PT=!1;var e=S_e.isSafari()||S_e.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(A_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")PT=t.some(function(o){return r.apply(null,o)});else{var n=N1t.tester.append("image").attr("style",A_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;PT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return PT}M_e.exports=U1t});var o8=ye((osr,z_e)=>{"use strict";var E_e=xa(),V1t=id(),H1t=ba(),G1t=ao(),j1t=Qa(),G0=Mr(),k_e=Ll(),W1t=JP(),Z1t=va(),X1t=Mu().extractOpts,Y1t=Mu().makeColorScaleFuncFromTrace,K1t=Zp(),J1t=Nh(),WV=J1t.LINE_SPACING,$1t=jV(),Q1t=a8().STYLE,D_e="heatmap-label";function R_e(e){return e.selectAll("g."+D_e)}function C_e(e){R_e(e).remove()}z_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;G0.makeTraceGroups(n,r,"hm").each(function(o){var s=E_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,x=l.xCenter,b=l.yCenter,g=H1t.traceIs(u,"contour"),E=g?"best":u.zsmooth,k=h.length,S=G0.maxRowLength(h),L=!1,_=!1,C,M,p,P,T,F,q,V;for(F=0;C===void 0&&F0;)M=i.c2p(d[F]),F--;for(M0;)T=a.c2p(v[F]),F--;T=i._length||M<=0||P>=a._length||T<=0;if(W){var re=s.selectAll("image").data([]);re.exit().remove(),C_e(s);return}var ae,_e;H==="fast"?(ae=S,_e=k):(ae=G,_e=N);var Me=document.createElement("canvas");Me.width=ae,Me.height=_e;var ke=Me.getContext("2d",{willReadFrequently:!0}),ge=Y1t(u,{noNumericCheck:!0,returnArray:!0}),ie,Te;H==="fast"?(ie=L?function(Pi){return S-1-Pi}:G0.identity,Te=_?function(Pi){return k-1-Pi}:G0.identity):(ie=function(Pi){return G0.constrain(Math.round(i.c2p(d[Pi])-C),0,G)},Te=function(Pi){return G0.constrain(Math.round(a.c2p(v[Pi])-P),0,N)});var Ee=Te(0),Ae=[Ee,Ee],ze=L?0:1,Ce=_?0:1,me=0,De=0,ce=0,Ge=0,nt,ct,qt,rt,ot;function Dt(Pi,Gi){if(Pi!==void 0){var Ki=ge(Pi);return Ki[0]=Math.round(Ki[0]),Ki[1]=Math.round(Ki[1]),Ki[2]=Math.round(Ki[2]),me+=Gi,De+=Ki[0]*Gi,ce+=Ki[1]*Gi,Ge+=Ki[2]*Gi,Ki}return[0,0,0,0]}function kt(Pi,Gi,Ki,ka){var jn=Pi[Ki.bin0];if(jn===void 0)return Dt(void 0,1);var la=Pi[Ki.bin1],Fa=Gi[Ki.bin0],Da=Gi[Ki.bin1],jo=la-jn||0,oa=Fa-jn||0,Sn;return la===void 0?Da===void 0?Sn=0:Fa===void 0?Sn=2*(Da-jn):Sn=(2*Da-Fa-jn)*2/3:Da===void 0?Fa===void 0?Sn=0:Sn=(2*jn-la-Fa)*2/3:Fa===void 0?Sn=(2*Da-la-jn)*2/3:Sn=Da+jn-la-Fa,Dt(jn+Ki.frac*jo+ka.frac*(oa+Ki.frac*Sn))}if(H!=="default"){var Ct=0,Yt;try{Yt=new Uint8Array(ae*_e*4)}catch(Pi){Yt=new Array(ae*_e*4)}if(H==="smooth"){var xr=x||d,er=b||v,Ke=new Array(xr.length),xt=new Array(er.length),bt=new Array(G),Lt=x?P_e:L_e,St=b?P_e:L_e,Et,dt,Ht;for(F=0;Far||ar>a._length))for(q=Se;qai||ai>i._length)){var jr=W1t({x:Qr,y:Vt},u,e._fullLayout);jr.x=Qr,jr.y=Vt;var ri=l.z[F][q];ri===void 0?(jr.z="",jr.zLabel=""):(jr.z=ri,jr.zLabel=j1t.tickText(Ve,ri,"hover").text);var bi=l.text&&l.text[F]&&l.text[F][q];(bi===void 0||bi===!1)&&(bi=""),jr.text=bi;var nn=G0.texttemplateString(Ne,jr,e._fullLayout._d3locale,jr,u._meta||{});if(nn){var Wi=nn.split("
"),Ni=Wi.length,_n=0;for(V=0;V{"use strict";F_e.exports={min:"zmin",max:"zmax"}});var s8=ye((lsr,q_e)=>{"use strict";var e_t=xa();q_e.exports=function(t){e_t.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var u8=ye((usr,B_e)=>{"use strict";var O_e=Nc(),_4=Mr(),l8=_4.isArrayOrTypedArray,t_t=Qa(),r_t=Mu().extractOpts;B_e.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,x=s.yCenter,b=s.zmask,g=l.zhoverformat,E=f,k=h,S,L,_,C;if(t.index!==!1){try{_=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){_4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(_<0||_>=d[0].length||C<0||C>d.length)return}else{if(O_e.inbox(r-f[0],r-f[f.length-1],0)>0||O_e.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(E=[2*f[0]-f[1]],M=1;M{"use strict";N_e.exports={attributes:ET(),supplyDefaults:N1e(),calc:i8(),plot:o8(),colorbar:S_(),style:s8(),hoverPoints:u8(),moduleType:"trace",name:"heatmap",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var H_e=ye((fsr,V_e)=>{"use strict";V_e.exports=U_e()});var ZV=ye((hsr,G_e)=>{"use strict";G_e.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var W_e=ye((dsr,j_e)=>{"use strict";j_e.exports={eventDataKeys:["binNumber"]}});var c8=ye((vsr,Y_e)=>{"use strict";var Ip=Lm(),Z_e=Oc().axisHoverFormat,i_t=Wo().hovertemplateAttrs,n_t=Wo().texttemplateAttrs,XV=Su(),X_e=ZV(),a_t=W_e(),YV=no().extendFlat;Y_e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:Z_e("x"),yhoverformat:Z_e("y"),text:YV({},Ip.text,{}),hovertext:YV({},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:X_e("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:X_e("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:i_t({},{keys:a_t.eventDataKeys}),texttemplate:n_t({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:YV({},Ip.textposition,{arrayOk:!1}),textfont:XV({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:XV({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:XV({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 Q_e=ye((psr,$_e)=>{"use strict";var K_e=ba(),x4=Mr(),J_e=va(),o_t=r0().handleText,s_t=zI(),l_t=c8();$_e.exports=function(t,r,n,i){function a(E,k){return x4.coerce(t,r,l_t,E,k)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");o_t(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),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(x4.minRowLength(o)&&x4.minRowLength(s)):x4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=K_e.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var x=r[h];x&&a("histfunc"),a("histnorm"),a("autobin"+f),s_t(t,r,a,n,i),x4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,g=K_e.getComponentMethod("errorbars","supplyDefaults");g(t,r,b||J_e.defaultLine,{axis:"y"}),g(t,r,b||J_e.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var h8=ye((gsr,rxe)=>{"use strict";var b4=Mr(),u_t=af(),f8=ba().traceIs,c_t=Hb(),f_t=r0().validateCornerradius,exe=b4.nestedProperty,KV=Bb().getAxisGroup,txe=[{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"}],h_t=["x","y"];rxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(H,X){return b4.coerce(s._input,s,s._module.attributes,H,X)}function x(H){return H.orientation==="v"?"x":"y"}function b(H,X){var G=u_t.getFromTrace({_fullLayout:r},H,X);return G.type}function g(H,X,G){var N=H.uid+"__"+G;X||(X=N);var W=b(H,G),re=H[G+"calendar"]||"",ae=n[X],_e=!0;ae&&(W===ae.axType&&re===ae.calendar?(_e=!1,ae.traces.push(H),ae.dirs.push(G)):(X=N,W!==ae.axType&&b4.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+W,"axis","with bins on","type:"+ae.axType,"axis."].join(" ")),re!==ae.calendar&&b4.warn(["Attempted to group the bins of trace",H.index,"set with a",re,"calendar","with bins",ae.calendar?"on a "+ae.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[X]={traces:[H],dirs:[G],axType:W,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=X}for(f=0;f{"use strict";var d_t=TT().hoverPoints,v_t=Qa().hoverLabelText;ixe.exports=function(t,r,n,i,a){var o=d_t(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"]=v_t(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var JV=ye((ysr,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";oxe.exports={attributes:c8(),layoutAttributes:RI(),supplyDefaults:Q_e(),crossTraceDefaults:h8(),supplyLayoutDefaults:yV(),calc:UV().calc,crossTraceCalc:Gb().crossTraceCalc,plot:i2().plot,layerName:"barlayer",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:Kd(),hoverPoints:nxe(),selectPoints:AT(),eventData:JV(),moduleType:"trace",name:"histogram",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var uxe=ye((xsr,lxe)=>{"use strict";lxe.exports=sxe()});var v8=ye((bsr,fxe)=>{"use strict";var Vg=c8(),cxe=ZV(),d8=ET(),p_t=vl(),$V=Oc().axisHoverFormat,g_t=Wo().hovertemplateAttrs,m_t=Wo().texttemplateAttrs,y_t=Kl(),w4=no().extendFlat;fxe.exports=w4({x:Vg.x,y:Vg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Vg.histnorm,histfunc:Vg.histfunc,nbinsx:Vg.nbinsx,xbins:cxe("x"),nbinsy:Vg.nbinsy,ybins:cxe("y"),autobinx:Vg.autobinx,autobiny:Vg.autobiny,bingroup:w4({},Vg.bingroup,{}),xbingroup:w4({},Vg.bingroup,{}),ybingroup:w4({},Vg.bingroup,{}),xgap:d8.xgap,ygap:d8.ygap,zsmooth:d8.zsmooth,xhoverformat:$V("x"),yhoverformat:$V("y"),zhoverformat:$V("z",1),hovertemplate:g_t({},{keys:"z"}),texttemplate:m_t({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:d8.textfont,showlegend:w4({},p_t.showlegend,{dflt:!1})},y_t("",{cLetter:"z",autoColorDflt:!1}))});var QV=ye((wsr,dxe)=>{"use strict";var __t=ba(),hxe=Mr();dxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=hxe.minRowLength(a),l=hxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=__t.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 pxe=ye((Tsr,vxe)=>{"use strict";var x_t=Mr(),b_t=QV(),w_t=RV(),T_t=Uh(),A_t=y4(),S_t=v8();vxe.exports=function(t,r,n,i){function a(o,s){return x_t.coerce(t,r,S_t,o,s)}b_t(t,r,a,i),r.visible!==!1&&(w_t(t,r,a,i),T_t(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),A_t(a,i),a("xhoverformat"),a("yhoverformat"))}});var yxe=ye((Asr,mxe)=>{"use strict";var M_t=u8(),gxe=Qa().hoverLabelText;mxe.exports=function(t,r,n,i,a){var o=M_t(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=gxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=gxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var xxe=ye((Ssr,_xe)=>{"use strict";_xe.exports={attributes:v8(),supplyDefaults:pxe(),crossTraceDefaults:h8(),calc:i8(),plot:o8(),layerName:"heatmaplayer",colorbar:S_(),style:s8(),hoverPoints:yxe(),eventData:JV(),moduleType:"trace",name:"histogram2d",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var wxe=ye((Msr,bxe)=>{"use strict";bxe.exports=xxe()});var p8=ye((Esr,Txe)=>{"use strict";Txe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var T4=ye((ksr,Exe)=>{"use strict";var Gh=ET(),g8=Uc(),Sxe=Oc(),eH=Sxe.axisHoverFormat,E_t=Sxe.descriptionOnlyNumbers,k_t=Kl(),C_t=Ed().dash,L_t=Su(),IT=no().extendFlat,Mxe=p8(),P_t=Mxe.COMPARISON_OPS2,I_t=Mxe.INTERVAL_OPS,Axe=g8.line;Exe.exports=IT({z:Gh.z,x:Gh.x,x0:Gh.x0,dx:Gh.dx,y:Gh.y,y0:Gh.y0,dy:Gh.dy,xperiod:Gh.xperiod,yperiod:Gh.yperiod,xperiod0:g8.xperiod0,yperiod0:g8.yperiod0,xperiodalignment:Gh.xperiodalignment,yperiodalignment:Gh.yperiodalignment,text:Gh.text,hovertext:Gh.hovertext,transpose:Gh.transpose,xtype:Gh.xtype,ytype:Gh.ytype,xhoverformat:eH("x"),yhoverformat:eH("y"),zhoverformat:eH("z",1),hovertemplate:Gh.hovertemplate,texttemplate:IT({},Gh.texttemplate,{}),textfont:IT({},Gh.textfont,{}),hoverongaps:Gh.hoverongaps,connectgaps:IT({},Gh.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:L_t({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:E_t("contour label")},operation:{valType:"enumerated",values:[].concat(P_t).concat(I_t),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:IT({},Axe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:C_t,smoothing:IT({},Axe.smoothing,{}),editType:"plot"},zorder:g8.zorder},k_t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var rH=ye((Csr,Cxe)=>{"use strict";var Hv=v8(),qy=T4(),D_t=Kl(),tH=Oc().axisHoverFormat,kxe=no().extendFlat;Cxe.exports=kxe({x:Hv.x,y:Hv.y,z:Hv.z,marker:Hv.marker,histnorm:Hv.histnorm,histfunc:Hv.histfunc,nbinsx:Hv.nbinsx,xbins:Hv.xbins,nbinsy:Hv.nbinsy,ybins:Hv.ybins,autobinx:Hv.autobinx,autobiny:Hv.autobiny,bingroup:Hv.bingroup,xbingroup:Hv.xbingroup,ybingroup:Hv.ybingroup,autocontour:qy.autocontour,ncontours:qy.ncontours,contours:qy.contours,line:{color:qy.line.color,width:kxe({},qy.line.width,{dflt:.5}),dash:qy.line.dash,smoothing:qy.line.smoothing,editType:"plot"},xhoverformat:tH("x"),yhoverformat:tH("y"),zhoverformat:tH("z",1),hovertemplate:Hv.hovertemplate,texttemplate:qy.texttemplate,textfont:qy.textfont},D_t("",{cLetter:"z",editTypeOverride:"calc"}))});var m8=ye((Lsr,Lxe)=>{"use strict";Lxe.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 iH=ye((Psr,Pxe)=>{"use strict";var R_t=Mr();Pxe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;R_t.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var y8=ye((Isr,Ixe)=>{"use strict";var z_t=Uh(),F_t=iH();Ixe.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,z_t(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),F_t(n,i,l,a)}});var Fxe=ye((Dsr,zxe)=>{"use strict";var Dxe=Mr(),q_t=QV(),O_t=m8(),B_t=y8(),N_t=y4(),Rxe=rH();zxe.exports=function(t,r,n,i){function a(s,l){return Dxe.coerce(t,r,Rxe,s,l)}function o(s){return Dxe.coerce2(t,r,Rxe,s)}q_t(t,r,a,i),r.visible!==!1&&(O_t(t,r,a,o),B_t(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),r.contours&&r.contours.coloring==="heatmap"&&N_t(a,i))}});var oH=ye((Rsr,Oxe)=>{"use strict";var aH=Qa(),nH=Mr();Oxe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=nH.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=nH.aggNums(Math.max,null,r));var o=qxe(i,a,t.ncontours);n.size=o.dtick,n.start=aH.tickFirst(o),o.range.reverse(),n.end=aH.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={}),nH.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=qxe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function qxe(e,t,r){var n={type:"linear",range:[e,t]};return aH.autoTicks(n,(t-e)/(r||15)),n}});var A4=ye((zsr,Bxe)=>{"use strict";Bxe.exports=function(t){return t.end+t.size/1e6}});var sH=ye((Fsr,Uxe)=>{"use strict";var Nxe=Mu(),U_t=i8(),V_t=oH(),H_t=A4();Uxe.exports=function(t,r){var n=U_t(t,r),i=n[0].z;V_t(r,i);var a=r.contours,o=Nxe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=H_t(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 Nxe.calc(t,r,{vals:s,cLetter:"z"}),n}});var S4=ye((qsr,Vxe)=>{"use strict";Vxe.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 lH=ye((Osr,Hxe)=>{"use strict";var _8=S4();Hxe.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 uH=ye((Bsr,Wxe)=>{"use strict";var x8=Mr(),DT=S4();Wxe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=DT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=DT.SADDLEREMAINDER[o]):delete e.crossings[a],s=DT.NEWDELTA[o],!s){x8.log("Found bad marching index:",o,t,e.level);break}l.push(jxe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),M4(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),x=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(x||r&&v)break;o=e.crossings[a]}d===1e4&&x8.log("Infinite loop in contour?");var b=M4(l[0],l[l.length-1],n,i),g=0,E=.2*e.smoothing,k=[],S=0,L,_,C,M,p,P,T,F,q,V,H;for(d=1;d=S;d--)if(L=k[d],L=S&&L+k[_]F&&q--,e.edgepaths[q]=H.concat(l,V));break}W||(e.edgepaths[F]=l.concat(V))}for(F=0;F20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:DT.BOTTOMSTART.indexOf(e)!==-1?i=1:DT.LEFTSTART.indexOf(e)!==-1?n=1:DT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function jxe(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 Kxe=ye((Nsr,Yxe)=>{"use strict";var cH=p8(),Z_t=uo();Yxe.exports={"[]":Zxe("[]"),"][":Zxe("]["),">":fH(">"),"<":fH("<"),"=":fH("=")};function Xxe(e,t){var r=Array.isArray(t),n;function i(a){return Z_t(a)?+a:null}return cH.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):cH.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:cH.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function Zxe(e){return function(t){t=Xxe(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 fH(e){return function(t){return t=Xxe(e,t),{start:t,end:1/0,size:1/0}}}});var hH=ye((Usr,$xe)=>{"use strict";var Jxe=Mr(),X_t=Kxe(),Y_t=A4();$xe.exports=function(t,r,n){for(var i=t.type==="constraint"?X_t[t._operation](t.value):t,a=i.size,o=[],s=Y_t(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){Jxe.warn("Too many contours, clipping at 1000",t);break}return o}});var dH=ye((Vsr,ebe)=>{"use strict";var RT=Mr();ebe.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&&RT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";tbe.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 b8=ye(Gv=>{"use strict";var k4=xa(),Id=Mr(),Oy=ao(),K_t=Mu(),nbe=Ll(),rbe=Qa(),ibe=ym(),J_t=o8(),abe=lH(),obe=uH(),$_t=hH(),Q_t=dH(),sbe=vH(),E4=S4(),Dm=E4.LABELOPTIMIZER;Gv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Id.makeTraceGroups(i,n,"contour").each(function(s){var l=k4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=$_t(d,r,u),x=Id.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),J_t(t,r,b,x),abe(v),obe(v);var g=a.c2p(f[0],!0),E=a.c2p(f[f.length-1],!0),k=o.c2p(h[0],!0),S=o.c2p(h[h.length-1],!0),L=[[g,S],[E,S],[E,k],[g,k]],_=v;d.type==="constraint"&&(_=Q_t(v,d._operation)),ext(l,L,d),txt(l,_,L,d),rxt(l,v,t,u,d),nxt(l,r,t,u,L)})};function ext(e,t,r){var n=Id.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 txt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&sbe(t,n);var o=Id.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:"")+lbe(l,r);u?k4.select(this).attr("d",u).style("stroke","none"):k4.select(this).remove()})}function lbe(e,t){var r="",n=0,i=e.edgepaths.map(function(g,E){return E}),a=!0,o,s,l,u,c,f;function h(g){return Math.abs(g[1]-t[0][1])<.01}function d(g){return Math.abs(g[1]-t[2][1])<.01}function v(g){return Math.abs(g[0]-t[0][0])<.01}function x(g){return Math.abs(g[0]-t[2][0])<.01}for(;i.length;){for(f=Oy.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){Id.log("Missing end?",n,e);break}for(h(o)&&!x(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:x(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):Id.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){Id.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 ixt(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,x=s-c,b=o+u,g=s+c,E=0;E{"use strict";var oxt=xa(),pH=Mu(),sxt=A4();ube.exports=function(t){var r=t.contours,n=r.start,i=sxt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=pH.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?pH.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,x=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v=b)&&(n<=x&&(n=x),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;vx&&(f.unshift(x),h.unshift(h[0])),f[f.length-1]{"use strict";var w8=xa(),cbe=ao(),lxt=s8(),uxt=gH();fbe.exports=function(t){var r=w8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=w8.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?uxt(a):null;i.selectAll("g.contourlevel").each(function(b){w8.select(this).selectAll("path").call(cbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){cbe.font(w8.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 x;i.selectAll("g.contourfill path").style("fill",function(b){return x===void 0&&(x=b.level),d(b.level+.5*l)}),x===void 0&&(x=u),i.selectAll("g.contourbg path").style("fill",d(x-.5*l))}}),lxt(t)}});var A8=ye((Zsr,dbe)=>{"use strict";var hbe=Mu(),cxt=gH(),fxt=A4();function hxt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=cxt(t,{isColorbar:!0});if(o==="heatmap"){var l=hbe.extractOpts(t);r._fillgradient=l.reversescale?hbe.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:fxt(n),size:a}}dbe.exports={min:"zmin",max:"zmax",calc:hxt}});var mH=ye((Xsr,vbe)=>{"use strict";var S8=va(),dxt=u8();vbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=dxt(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&S8.opacity(l.fillcolor)?s.color=S8.addOpacity(l.fillcolor,1):l.contours.showlines&&S8.opacity(l.line.color)&&(s.color=S8.addOpacity(l.line.color,1)))}),o}});var gbe=ye((Ysr,pbe)=>{"use strict";pbe.exports={attributes:rH(),supplyDefaults:Fxe(),crossTraceDefaults:h8(),calc:sH(),plot:b8().plot,layerName:"contourlayer",style:T8(),colorbar:A8(),hoverPoints:mH(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var ybe=ye((Ksr,mbe)=>{"use strict";mbe.exports=gbe()});var yH=ye((Jsr,Abe)=>{"use strict";var _be=uo(),vxt=iH(),wbe=va(),xbe=wbe.addOpacity,pxt=wbe.opacity,Tbe=p8(),bbe=Mr().isArrayOrTypedArray,gxt=Tbe.CONSTRAINT_REDUCTION,mxt=Tbe.COMPARISON_OPS2;Abe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=gxt[f],yxt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",xbe((t.line||{}).color||a,.5))),l){var h=c&&pxt(c)?xbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),vxt(n,i,u,o)};function yxt(e,t){var r;mxt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),bbe(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])]:_be(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),_be(t.value)||(bbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Ebe=ye(($sr,Mbe)=>{"use strict";var _H=Mr(),_xt=ZI(),xxt=Pg(),bxt=yH(),wxt=m8(),Txt=y8(),Axt=y4(),Sbe=T4();Mbe.exports=function(t,r,n,i){function a(u,c){return _H.coerce(t,r,Sbe,u,c)}function o(u){return _H.coerce2(t,r,Sbe,u)}var s=_xt(t,r,a,i);if(!s){r.visible=!1;return}xxt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate");var l=a("contours.type")==="constraint";a("connectgaps",_H.isArray1D(r.z)),l?bxt(t,r,a,i,n):(wxt(t,r,a,o),Txt(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&Axt(a,i),a("zorder")}});var Cbe=ye((Qsr,kbe)=>{"use strict";kbe.exports={attributes:T4(),supplyDefaults:Ebe(),calc:sH(),plot:b8().plot,style:T8(),colorbar:A8(),hoverPoints:mH(),moduleType:"trace",name:"contour",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Pbe=ye((elr,Lbe)=>{"use strict";Lbe.exports=Cbe()});var xH=ye((tlr,Dbe)=>{"use strict";var Sxt=Wo().hovertemplateAttrs,Mxt=Wo().texttemplateAttrs,Ext=Eg(),a0=Uc(),kxt=vl(),Ibe=Kl(),Cxt=Ed().dash,M_=no().extendFlat,j0=a0.marker,C4=a0.line,Lxt=j0.line;Dbe.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:Mxt({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:M_({},a0.hovertext,{}),line:{color:C4.color,width:C4.width,dash:Cxt,backoff:C4.backoff,shape:M_({},C4.shape,{values:["linear","spline"]}),smoothing:C4.smoothing,editType:"calc"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Ext(),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:Lxt.width,editType:"calc"},Ibe("marker.line")),gradient:j0.gradient,editType:"calc"},Ibe("marker")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},kxt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a0.hoveron,hovertemplate:Sxt()}});var qbe=ye((rlr,Fbe)=>{"use strict";var Rbe=Mr(),Pxt=Sm(),zT=lu(),Ixt=$p(),Dxt=D0(),zbe=J3(),Rxt=R0(),zxt=Ig(),Fxt=xH();Fbe.exports=function(t,r,n,i){function a(h,d){return Rbe.coerce(t,r,Fxt,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");var c=u{"use strict";var bH=Qa();Obe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=bH.tickText(a.aaxis,t.a,!0).text,i.bLabel=bH.tickText(a.baxis,t.b,!0).text,i.cLabel=bH.tickText(a.caxis,t.c,!0).text,i}});var Hbe=ye((nlr,Vbe)=>{"use strict";var wH=uo(),qxt=z0(),Oxt=km(),Bxt=F0(),Nxt=q0().calcMarkerSize,Nbe=["a","b","c"],Ube={a:["b","c"],b:["a","c"],c:["a","b"]};Vbe.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 Uxt=iT();Gbe.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 Vxt=sT();Wbe.exports=function(t,r,n,i){var a=Vxt(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 x=h._module.formatLabels(f,h,v);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var b=f.hi||h.hoverinfo,g=[];function E(S,L){g.push(S._hovertitle+": "+L)}if(!h.hovertemplate){var k=b.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&E(d.aaxis,o.aLabel),k.indexOf("b")!==-1&&E(d.baxis,o.bLabel),k.indexOf("c")!==-1&&E(d.caxis,o.cLabel)}return o.extraText=g.join("
"),o.hovertemplate=h.hovertemplate,a}});var Ybe=ye((slr,Xbe)=>{"use strict";Xbe.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 o2e=ye((llr,a2e)=>{"use strict";var t2e=xa(),Hxt=id(),TH=ba(),By=Mr(),Rm=By.strTranslate,M8=By._,qT=va(),E8=ao(),L4=ym(),AH=no().extendFlat,Gxt=Yu(),E_=Qa(),Kbe=gv(),Jbe=Nc(),r2e=Sg(),$be=r2e.freeMode,jxt=r2e.rectMode,SH=Mb(),Wxt=wf().prepSelect,Zxt=wf().selectOnClick,Xxt=wf().clearOutline,Yxt=wf().clearSelectionsCache,i2e=ad();function n2e(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}a2e.exports=n2e;var zm=n2e.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;aFT*u?(g=u,b=g*FT):(b=l,g=b/FT),E=o*b/l,k=s*g/u,v=t.l+t.w*i-b/2,x=t.t+t.h*(1-a)-g/2,r.x0=v,r.y0=x,r.w=b,r.h=g,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-E/2,i+E/2],_id:"x"},L4(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-k/2,a+k/2],_id:"y"},L4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var S=r.yaxis.domain[0],L=r.aaxis=AH({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[S,S+k*FT],anchor:"free",position:0,_id:"y",_length:b});L4(L,r.graphDiv._fullLayout),L.setScale();var _=r.baxis=AH({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});L4(_,r.graphDiv._fullLayout),_.setScale();var C=r.caxis=AH({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[S,S+k*FT],anchor:"free",position:0,_id:"y",_length:b});L4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+v+","+(x+g)+"h"+b+"l-"+b/2+",-"+g+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var p="M0,"+g+"h"+b+"l-"+b/2+",-"+g+"Z";r.clipDefRelative.select("path").attr("d",p);var P=Rm(v,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var T=Rm(v-_._offset,x+g);r.layers.baxis.attr("transform",T),r.layers.bgrid.attr("transform",T);var F=Rm(v+b/2,x)+"rotate(30)"+Rm(0,-L._offset);r.layers.aaxis.attr("transform",F),r.layers.agrid.attr("transform",F);var q=Rm(v+b/2,x)+"rotate(-30)"+Rm(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+v+","+(x+g)+"l"+b/2+",-"+g:"M0,0").call(qT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",_.showline?"M"+v+","+(x+g)+"h"+b:"M0,0").call(qT.stroke,_.linecolor||"#000").style("stroke-width",(_.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+x+"l"+b/2+","+g:"M0,0").call(qT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),E8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};zm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(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"]=SH.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:M8(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"]=SH.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:M8(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"]=SH.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:M8(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=Kxt(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),x=d*(e.linewidth||1)/2,b=d*e.ticklen,g=t.w,E=t.h,k=i==="b"?"M0,"+x+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+x+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,S={a:"M0,0l"+E+",-"+g/2,b:"M0,0l-"+g/2+",-"+E,c:"M0,0l-"+E+","+g/2}[i];E_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:k,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 Kxt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var fd=i2e.MINZOOM/2+.87,Jxt="m-0.87,.5h"+fd+"v3h-"+(fd+5.2)+"l"+(fd/2+2.6)+",-"+(fd*.87+4.5)+"l2.6,1.5l-"+fd/2+","+fd*.87+"Z",$xt="m0.87,.5h-"+fd+"v3h"+(fd+5.2)+"l-"+(fd/2+2.6)+",-"+(fd*.87+4.5)+"l-2.6,1.5l"+fd/2+","+fd*.87+"Z",Qxt="m0,1l"+fd/2+","+fd*.87+"l2.6,-1.5l-"+(fd/2+2.6)+",-"+(fd*.87+4.5)+"l-"+(fd/2+2.6)+","+(fd*.87+4.5)+"l2.6,1.5l"+fd/2+",-"+fd*.87+"Z",ebt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",Qbe=!0;zm.clearOutline=function(){Yxt(this.dragOptions),Xxt(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,F,q){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;$be(V)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,V==="zoom"?(e.dragOptions.moveFn=_,e.dragOptions.clickFn=g,e.dragOptions.doneFn=C,E(T,F,q)):V==="pan"?(e.dragOptions.moveFn=p,e.dragOptions.clickFn=g,e.dragOptions.doneFn=P,M(),e.clearOutline(r)):(jxt(V)||$be(V))&&Wxt(T,F,q,e.dragOptions,V)}};var o,s,l,u,c,f,h,d,v,x;function b(T){var F={};return F[e.id+".aaxis.min"]=T.a,F[e.id+".baxis.min"]=T.b,F[e.id+".caxis.min"]=T.c,F}function g(T,F){var q=r._fullLayout.clickmode;e2e(r),T===2&&(r.emit("plotly_doubleclick",null),TH.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&T===1&&Zxt(F,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&Jbe.click(r,F,e.id)}function E(T,F,q){var V=t.getBoundingClientRect();o=F-V.left,s=q-V.top,r._fullLayout._calcInverseTransform(r);var H=r._fullLayout._invTransform,X=By.apply3DTransform(H)(o,s);o=X[0],s=X[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=Hxt(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",Rm(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),x=n.append("path").attr("class","zoombox-corners").attr("transform",Rm(e.x0,e.y0)).style({fill:qT.background,stroke:qT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(T,F){return 1-F/e.h}function S(T,F){return 1-(T+(e.h-F)/Math.sqrt(3))/e.w}function L(T,F){return(T-(e.h-F)/Math.sqrt(3))/e.w}function _(T,F){var q=o+T*i,V=s+F*a,H=Math.max(0,Math.min(1,k(o,s),k(q,V))),X=Math.max(0,Math.min(1,S(o,s),S(q,V))),G=Math.max(0,Math.min(1,L(o,s),L(q,V))),N=(H/2+G)*e.w,W=(1-H/2-X)*e.w,re=(N+W)/2,ae=W-N,_e=(1-H)*e.h,Me=_e-ae/FT;ae.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){e2e(r),c!==l&&(TH.call("_guiRelayout",r,b(c)),Qbe&&r.data&&r._context.showTips&&(By.notifier(M8(r,"Double-click to zoom back out"),"long"),Qbe=!1))}function M(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function p(T,F){var q=T/e.xaxis._m,V=F/e.yaxis._m;c={a:l.a-V,b:l.b+(q+V)/2,c:l.c-(q-V)/2};var H=[c.a,c.b,c.c].sort(By.sorterAsc),X={a:H.indexOf(c.a),b:H.indexOf(c.b),c:H.indexOf(c.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),c={a:H[X.a],b:H[X.b],c:H[X.c]},F=(l.a-c.a)*e.yaxis._m,T=(l.c-c.c-l.b+c.b)*e.xaxis._m);var G=Rm(e.x0+T,e.y0+F);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var N=Rm(-T,-F);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(E8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){TH.call("_guiRelayout",r,b(c))}t.onmousemove=function(T){Jbe.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||Kbe.unhover(r,T)},Kbe.init(this.dragOptions)};function e2e(e){t2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var kH=ye((ulr,s2e)=>{"use strict";var tbt=dh(),rbt=Ju().attributes,ql=Cd(),ibt=Bu().overrideAll,MH=no().extendFlat,EH={title:{text:ql.title.text,font:ql.title.font},color:ql.color,tickmode:ql.minor.tickmode,nticks:MH({},ql.nticks,{dflt:6,min:1}),tick0:ql.tick0,dtick:ql.dtick,tickvals:ql.tickvals,ticktext:ql.ticktext,ticks:ql.ticks,ticklen:ql.ticklen,tickwidth:ql.tickwidth,tickcolor:ql.tickcolor,ticklabelstep:ql.ticklabelstep,showticklabels:ql.showticklabels,labelalias:ql.labelalias,showtickprefix:ql.showtickprefix,tickprefix:ql.tickprefix,showticksuffix:ql.showticksuffix,ticksuffix:ql.ticksuffix,showexponent:ql.showexponent,exponentformat:ql.exponentformat,minexponent:ql.minexponent,separatethousands:ql.separatethousands,tickfont:ql.tickfont,tickangle:ql.tickangle,tickformat:ql.tickformat,tickformatstops:ql.tickformatstops,hoverformat:ql.hoverformat,showline:MH({},ql.showline,{dflt:!0}),linecolor:ql.linecolor,linewidth:ql.linewidth,showgrid:MH({},ql.showgrid,{dflt:!0}),gridcolor:ql.gridcolor,gridwidth:ql.gridwidth,griddash:ql.griddash,layer:ql.layer,min:{valType:"number",dflt:0,min:0}},k8=s2e.exports=ibt({domain:rbt({name:"ternary"}),bgcolor:{valType:"color",dflt:tbt.background},sum:{valType:"number",dflt:1,min:0},aaxis:EH,baxis:EH,caxis:EH},"plot","from-root");k8.uirevision={valType:"any",editType:"none"};k8.aaxis.uirevision=k8.baxis.uirevision=k8.caxis.uirevision={valType:"any",editType:"none"}});var k_=ye((clr,l2e)=>{"use strict";var nbt=Mr(),abt=Vs(),obt=Ju().defaults;l2e.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(E,k){return nbt.coerce(h,d,o,E,k)}for(var x=0;x{"use strict";var sbt=va(),lbt=Vs(),C8=Mr(),ubt=k_(),cbt=e_(),fbt=t_(),hbt=T3(),dbt=xb(),vbt=YM(),c2e=kH(),u2e=["aaxis","baxis","caxis"];f2e.exports=function(t,r,n){ubt(t,r,n,{type:"ternary",attributes:c2e,handleDefaults:pbt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function pbt(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=sbt.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 gbt(e,t,r,n){var i=c2e[t._name];function a(d,v){return C8.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,C8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:C8.bigFont(r.font.size),color:s}}),a("min"),dbt(e,t,a,"linear"),fbt(e,t,a,"linear"),cbt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),hbt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(C8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),vbt(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 mbt=o2e(),ybt=kd().getSubplotCalcData,_bt=Mr().counterRegex,OT="ternary";W0.name=OT;var xbt=W0.attr="subplot";W0.idRoot=OT;W0.idRegex=W0.attrRegex=_bt(OT);var bbt=W0.attributes={};bbt[xbt]={valType:"subplotid",dflt:"ternary",editType:"calc"};W0.layoutAttributes=kH();W0.supplyLayoutDefaults=h2e();W0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[OT],a=0;a{"use strict";v2e.exports={attributes:xH(),supplyDefaults:qbe(),colorbar:Kd(),formatLabels:Bbe(),calc:Hbe(),plot:jbe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:Zbe(),selectPoints:lT(),eventData:Ybe(),moduleType:"trace",name:"scatterternary",basePlotModule:d2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var m2e=ye((vlr,g2e)=>{"use strict";g2e.exports=p2e()});var CH=ye((plr,_2e)=>{"use strict";var jh=v4(),BT=no().extendFlat,y2e=Oc().axisHoverFormat;_2e.exports={y:jh.y,x:jh.x,x0:jh.x0,y0:jh.y0,xhoverformat:y2e("x"),yhoverformat:y2e("y"),name:BT({},jh.name,{}),orientation:BT({},jh.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:jh.fillcolor,points:BT({},jh.boxpoints,{}),jitter:BT({},jh.jitter,{}),pointpos:BT({},jh.pointpos,{}),width:BT({},jh.width,{}),marker:jh.marker,text:jh.text,hovertext:jh.hovertext,hovertemplate:jh.hovertemplate,quartilemethod:jh.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:jh.offsetgroup,alignmentgroup:jh.alignmentgroup,selected:jh.selected,unselected:jh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:jh.zorder}});var IH=ye((glr,x2e)=>{"use strict";var LH=p4(),PH=Mr().extendFlat;x2e.exports={violinmode:PH({},LH.boxmode,{}),violingap:PH({},LH.boxgap,{}),violingroupgap:PH({},LH.boxgroupgap,{})}});var S2e=ye((mlr,A2e)=>{"use strict";var b2e=Mr(),wbt=va(),w2e=m4(),T2e=CH();A2e.exports=function(t,r,n,i){function a(L,_){return b2e.coerce(t,r,T2e,L,_)}function o(L,_){return b2e.coerce2(t,r,T2e,L,_)}if(w2e.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",wbt.addOpacity(r.line.color,.5));w2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),x=o("box.line.color",c),b=o("box.line.width",f),g=a("box.visible",!!(d||v||x||b));g||(r.box={visible:!1});var E=o("meanline.color",c),k=o("meanline.width",f),S=a("meanline.visible",!!(E||k));S||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var E2e=ye((ylr,M2e)=>{"use strict";var Tbt=Mr(),Abt=IH(),Sbt=UI();M2e.exports=function(t,r,n){function i(a,o){return Tbt.coerce(t,r,Abt,a,o)}Sbt._supply(t,r,n,i,"violin")}});var L8=ye(o2=>{"use strict";var Mbt=Mr(),Ebt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};o2.makeKDE=function(e,t,r){var n=r.length,i=Ebt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u{"use strict";var DH=Mr(),RH=Qa(),kbt=MV(),k2e=L8(),Cbt=es().BADNUM;C2e.exports=function(t,r){var n=kbt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=RH.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var Dbt=HI().setPositionOffset,P2e=["v","h"];I2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var zH=xa(),FH=Mr(),Rbt=ao(),qH=GI(),zbt=fU(),Fbt=L8();R2e.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=zbt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return Rbt.smoothopen(h[0],1)}FH.makeTraceGroups(i,n,"trace violins").each(function(c){var f=zH.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var x=d.bPos,b=d.bdPos,g=r[d.valLetter+"axis"],E=r[d.posLetter+"axis"],k=v.side==="both",S=k||v.side==="positive",L=k||v.side==="negative",_=f.selectAll("path.violin").data(FH.identity);_.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(V){var H=zH.select(this),X=V.density,G=X.length,N=E.c2l(V.pos+x,!0),W=E.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var ae=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode==="count"?ae.maxKDE/b*(ae.maxCount/V.pts.length):ae.maxKDE/b}var _e,Me,ke,ge,ie,Te,Ee;if(S){for(Te=new Array(G),ge=0;ge{"use strict";var F2e=xa(),NT=va(),qbt=op().stylePoints;q2e.exports=function(t){var r=F2e.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=F2e.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(NT.stroke,i.line.color).call(NT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(NT.stroke,s.color).call(NT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(NT.stroke,l.color),a.selectAll("path.meanline").style(c).call(NT.stroke,l.color),qbt(a,i,t)})}});var V2e=ye((Alr,U2e)=>{"use strict";var Obt=va(),OH=Mr(),Bbt=Qa(),B2e=PV(),N2e=L8();U2e.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 x=B2e.hoverOnBoxes(t,r,n,i);if(f&&x.length>0){var b=t.xa,g=t.ya,E,k,S,L,_;l.orientation==="h"?(_=r,E="y",S=g,k="x",L=b):(_=n,E="x",S=b,k="y",L=g);var C=s[t.index];if(_>=C.span[0]&&_<=C.span[1]){var M=OH.extendFlat({},t),p=L.c2p(_,!0),P=N2e.getKdeValue(C,l,_),T=N2e.getPositionOnKdePath(C,l,p),F=S._offset,q=S._length;M[E+"0"]=T[0],M[E+"1"]=T[1],M[k+"0"]=M[k+"1"]=p,M[k+"Label"]=k+": "+Bbt.hoverLabelText(L,_,l[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var V=0,H=0;H{"use strict";H2e.exports={attributes:CH(),layoutAttributes:IH(),supplyDefaults:S2e(),crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:E2e(),calc:L2e(),crossTraceCalc:D2e(),plot:z2e(),style:O2e(),styleOnSelect:op().styleOnSelect,hoverPoints:V2e(),selectPoints:IV(),moduleType:"trace",name:"violin",basePlotModule:Jf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var W2e=ye((Mlr,j2e)=>{"use strict";j2e.exports=G2e()});var X2e=ye((Elr,Z2e)=>{"use strict";Z2e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var NH=ye((klr,J2e)=>{"use strict";var lc=Lm(),BH=Uc().line,Nbt=vl(),Y2e=Oc().axisHoverFormat,Ubt=Wo().hovertemplateAttrs,Vbt=Wo().texttemplateAttrs,K2e=X2e(),Ny=no().extendFlat,Hbt=va();J2e.exports={x:lc.x,x0:lc.x0,dx:lc.dx,y:lc.y,y0:lc.y0,dy:lc.dy,xperiod:lc.xperiod,yperiod:lc.yperiod,xperiod0:lc.xperiod0,yperiod0:lc.yperiod0,xperiodalignment:lc.xperiodalignment,yperiodalignment:lc.yperiodalignment,xhoverformat:Y2e("x"),yhoverformat:Y2e("y"),hovertext:lc.hovertext,hovertemplate:Ubt({},{keys:K2e.eventDataKeys}),hoverinfo:Ny({},Nbt.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:Vbt({editType:"plot"},{keys:K2e.eventDataKeys.concat(["label","value"])}),text:lc.text,textposition:lc.textposition,insidetextanchor:Ny({},lc.insidetextanchor,{dflt:"middle"}),textangle:Ny({},lc.textangle,{dflt:0}),textfont:lc.textfont,insidetextfont:lc.insidetextfont,outsidetextfont:lc.outsidetextfont,constraintext:lc.constraintext,cliponaxis:lc.cliponaxis,orientation:Ny({},lc.orientation,{}),offset:Ny({},lc.offset,{arrayOk:!1}),width:Ny({},lc.width,{arrayOk:!1}),marker:Gbt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ny({},BH.color,{dflt:Hbt.defaultLine}),width:Ny({},BH.width,{dflt:0,editType:"plot"}),dash:BH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:lc.offsetgroup,alignmentgroup:lc.alignmentgroup,zorder:lc.zorder};function Gbt(){var e=Ny({},lc.marker);return delete e.pattern,delete e.cornerradius,e}});var UH=ye((Clr,$2e)=>{"use strict";$2e.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 HH=ye((Llr,ewe)=>{"use strict";var P8=Mr(),jbt=Hb(),Wbt=r0().handleText,Zbt=K3(),Xbt=Pg(),Q2e=NH(),VH=va();function Ybt(e,t,r,n){function i(f,h){return P8.coerce(e,t,Q2e,f,h)}var a=Zbt(e,t,n,i);if(!a){t.visible=!1;return}Xbt(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");var s=i("textposition");Wbt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",P8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",VH.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Kbt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Kbt(e){var t=P8.isArrayOrTypedArray(e)?"#000":e;return VH.addOpacity(t,.5*VH.opacity(t))}function Jbt(e,t){var r,n;function i(o){return P8.coerce(n._input,n,Q2e,o)}for(var a=0;a{"use strict";var $bt=Mr(),Qbt=UH();twe.exports=function(e,t,r){var n=!1;function i(s,l){return $bt.coerce(e,t,Qbt,s,l)}for(var a=0;a{"use strict";var UT=Mr();iwe.exports=function(t,r){for(var n=0;n{"use strict";var awe=Qa(),owe=Dg(),e2t=nwe(),t2t=F0(),P4=es().BADNUM;swe.exports=function(t,r){var n=awe.getFromId(t,r.xaxis||"x"),i=awe.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=owe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=owe(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 uwe=Gb().setGroupPositions;cwe.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 I8=xa(),L_=Mr(),hwe=ao(),C_=es().BADNUM,r2t=i2(),i2t=_v().clearMinTextSize;vwe.exports=function(t,r,n,i){var a=t._fullLayout;i2t("funnel",a),n2t(t,r,n,i),a2t(t,r,n,i),r2t.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function n2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=I8.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 x=dwe(d,i,a,c),b=x[0],g=x[1],E="";b[0]!==C_&&g[0]!==C_&&b[1]!==C_&&g[1]!==C_&&b[2]!==C_&&g[2]!==C_&&b[3]!==C_&&g[3]!==C_&&(c?E+="M"+b[0]+","+g[1]+"L"+b[2]+","+g[2]+"H"+b[3]+"L"+b[1]+","+g[1]+"Z":E+="M"+b[1]+","+g[1]+"L"+b[2]+","+g[3]+"V"+g[2]+"L"+b[1]+","+g[0]+"Z"),E===""&&(E="M0,0Z"),L_.ensureSingle(I8.select(this),"path").attr("d",E).call(hwe.setClipUrl,t.layerClipId,e)}})})}function a2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=I8.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 x=dwe(d,i,a,c),b=x[0],g=x[1],E="";b[3]!==void 0&&g[3]!==void 0&&(c?(E+="M"+b[0]+","+g[1]+"L"+b[2]+","+g[2],E+="M"+b[1]+","+g[1]+"L"+b[3]+","+g[2]):(E+="M"+b[1]+","+g[1]+"L"+b[2]+","+g[3],E+="M"+b[1]+","+g[0]+"L"+b[2]+","+g[2])),E===""&&(E="M0,0Z"),L_.ensureSingle(I8.select(this),"path").attr("d",E).call(hwe.setClipUrl,t.layerClipId,e)}})})}function dwe(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 ywe=ye((Flr,mwe)=>{"use strict";var I4=xa(),gwe=ao(),jH=va(),o2t=N1().DESELECTDIM,s2t=N0(),l2t=_v().resizeText,u2t=s2t.styleTextPoints;function c2t(e,t,r){var n=r||I4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");l2t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=I4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;I4.select(this).call(jH.fill,s.mc||l.color).call(jH.stroke,s.mlc||l.line.color).call(gwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?o2t:1)}}),u2t(a,o,e),a.selectAll(".regions").each(function(){I4.select(this).selectAll("path").style("stroke-width",0).call(jH.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;gwe.lineGroupStyle(I4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}mwe.exports={style:c2t}});var bwe=ye((qlr,xwe)=>{"use strict";var _we=va().opacity,f2t=TT().hoverOnBars,WH=Mr().formatPercent;xwe.exports=function(t,r,n,i,a){var o=f2t(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=WH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=WH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=WH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var x=d==="all",b=d.split("+"),g=function(E){return x||b.indexOf(E)!==-1};g("percent initial")&&v.push(o.percentInitialLabel+" of initial"),g("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),g("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("
"),o.color=h2t(l,f),[o]}};function h2t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(_we(n))return n;if(_we(i)&&a)return i}});var Twe=ye((Olr,wwe)=>{"use strict";wwe.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 Swe=ye((Blr,Awe)=>{"use strict";Awe.exports={attributes:NH(),layoutAttributes:UH(),supplyDefaults:HH().supplyDefaults,crossTraceDefaults:HH().crossTraceDefaults,supplyLayoutDefaults:rwe(),calc:lwe(),crossTraceCalc:fwe(),plot:pwe(),style:ywe().style,hoverPoints:bwe(),eventData:Twe(),selectPoints:AT(),moduleType:"trace",name:"funnel",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Ewe=ye((Nlr,Mwe)=>{"use strict";Mwe.exports=Swe()});var Cwe=ye((Ulr,kwe)=>{"use strict";kwe.exports={eventDataKeys:["initial","delta","final"]}});var YH=ye((Vlr,Iwe)=>{"use strict";var Vu=Lm(),ZH=Uc().line,d2t=vl(),Lwe=Oc().axisHoverFormat,v2t=Wo().hovertemplateAttrs,p2t=Wo().texttemplateAttrs,Pwe=Cwe(),VT=no().extendFlat,g2t=va();function XH(e){return{marker:{color:VT({},Vu.marker.color,{arrayOk:!1,editType:"style"}),line:{color:VT({},Vu.marker.line.color,{arrayOk:!1,editType:"style"}),width:VT({},Vu.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Iwe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:Vu.x,x0:Vu.x0,dx:Vu.dx,y:Vu.y,y0:Vu.y0,dy:Vu.dy,xperiod:Vu.xperiod,yperiod:Vu.yperiod,xperiod0:Vu.xperiod0,yperiod0:Vu.yperiod0,xperiodalignment:Vu.xperiodalignment,yperiodalignment:Vu.yperiodalignment,xhoverformat:Lwe("x"),yhoverformat:Lwe("y"),hovertext:Vu.hovertext,hovertemplate:v2t({},{keys:Pwe.eventDataKeys}),hoverinfo:VT({},d2t.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:p2t({editType:"plot"},{keys:Pwe.eventDataKeys.concat(["label"])}),text:Vu.text,textposition:Vu.textposition,insidetextanchor:Vu.insidetextanchor,textangle:Vu.textangle,textfont:Vu.textfont,insidetextfont:Vu.insidetextfont,outsidetextfont:Vu.outsidetextfont,constraintext:Vu.constraintext,cliponaxis:Vu.cliponaxis,orientation:Vu.orientation,offset:Vu.offset,width:Vu.width,increasing:XH("increasing"),decreasing:XH("decreasing"),totals:XH("intermediate sums and total"),connector:{line:{color:VT({},ZH.color,{dflt:g2t.defaultLine}),width:VT({},ZH.width,{editType:"plot"}),dash:ZH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Vu.offsetgroup,alignmentgroup:Vu.alignmentgroup,zorder:Vu.zorder}});var KH=ye((Hlr,Dwe)=>{"use strict";Dwe.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 HT=ye((Glr,Rwe)=>{"use strict";Rwe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var $H=ye((jlr,Owe)=>{"use strict";var zwe=Mr(),m2t=Hb(),y2t=r0().handleText,_2t=K3(),x2t=Pg(),Fwe=YH(),b2t=va(),qwe=HT(),w2t=qwe.INCREASING.COLOR,T2t=qwe.DECREASING.COLOR,A2t="#4499FF";function JH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",b2t.defaultLine),e(t+".marker.line.width")}function S2t(e,t,r,n){function i(u,c){return zwe.coerce(e,t,Fwe,u,c)}var a=_2t(e,t,n,i);if(!a){t.visible=!1;return}x2t(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");var o=i("textposition");y2t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),t.texttemplate||i("textinfo")),JH(i,"increasing",w2t),JH(i,"decreasing",T2t),JH(i,"totals",A2t);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 M2t(e,t){var r,n;function i(o){return zwe.coerce(n._input,n,Fwe,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var E2t=Mr(),k2t=KH();Bwe.exports=function(e,t,r){var n=!1;function i(s,l){return E2t.coerce(e,t,k2t,s,l)}for(var a=0;a{"use strict";var Uwe=Qa(),Vwe=Dg(),Hwe=Mr().mergeArray,C2t=F0(),Gwe=es().BADNUM;function QH(e){return e==="a"||e==="absolute"}function eG(e){return e==="t"||e==="total"}jwe.exports=function(t,r){var n=Uwe.getFromId(t,r.xaxis||"x"),i=Uwe.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=Vwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=Vwe(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,x=!1,b=0;b{"use strict";var Zwe=Gb().setGroupPositions;Xwe.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 Kwe=xa(),D8=Mr(),L2t=ao(),GT=es().BADNUM,P2t=i2(),I2t=_v().clearMinTextSize;Jwe.exports=function(t,r,n,i){var a=t._fullLayout;I2t("waterfall",a),P2t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),D2t(t,r,n,i)};function D2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;D8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=Kwe.select(this),l=o[0].trace,u=D8.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(D8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,x){if(!(x!==d-1&&!v.cNext)){var b=R2t(v,i,a,c),g=b[0],E=b[1],k="";g[0]!==GT&&E[0]!==GT&&g[1]!==GT&&E[1]!==GT&&(f==="spanning"&&!v.isSum&&x>0&&(c?k+="M"+g[0]+","+E[1]+"V"+E[0]:k+="M"+g[1]+","+E[0]+"H"+g[0]),f!=="between"&&(v.isSum||x{"use strict";var R8=xa(),Qwe=ao(),e3e=va(),z2t=N1().DESELECTDIM,F2t=N0(),q2t=_v().resizeText,O2t=F2t.styleTextPoints;function B2t(e,t,r){var n=r||R8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");q2t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=R8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;R8.select(this).call(e3e.fill,l.color).call(e3e.stroke,l.line.color).call(Qwe.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?z2t:1)}}),O2t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;Qwe.lineGroupStyle(R8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}t3e.exports={style:B2t}});var s3e=ye((Jlr,o3e)=>{"use strict";var N2t=Qa().hoverLabelText,i3e=va().opacity,U2t=TT().hoverOnBars,n3e=HT(),a3e={increasing:n3e.INCREASING.SYMBOL,decreasing:n3e.DECREASING.SYMBOL};o3e.exports=function(t,r,n,i,a){var o=U2t(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(_){return N2t(f,_,l[c+"hoverformat"])}var d=o.index,v=s[d],x=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-x,o.delta=x,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=x<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var g=v.hi||l.hoverinfo,E=[];if(g&&g!=="none"&&g!=="skip"){var k=g==="all",S=g.split("+"),L=function(_){return k||S.indexOf(_)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&E.push(o.finalLabel),L("delta")&&(x<0?E.push(o.deltaLabel+" "+a3e.decreasing):E.push(o.deltaLabel+" "+a3e.increasing)),L("initial")&&E.push("Initial: "+o.initialLabel))}return E.length&&(o.extraText=E.join("
")),o.color=V2t(l,v),[o]};function V2t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(i3e(n))return n;if(i3e(i)&&a)return i}});var u3e=ye(($lr,l3e)=>{"use strict";l3e.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 f3e=ye((Qlr,c3e)=>{"use strict";c3e.exports={attributes:YH(),layoutAttributes:KH(),supplyDefaults:$H().supplyDefaults,crossTraceDefaults:$H().crossTraceDefaults,supplyLayoutDefaults:Nwe(),calc:Wwe(),crossTraceCalc:Ywe(),plot:$we(),style:r3e().style,hoverPoints:s3e(),eventData:u3e(),selectPoints:AT(),moduleType:"trace",name:"waterfall",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var d3e=ye((eur,h3e)=>{"use strict";h3e.exports=f3e()});var jT=ye((tur,v3e)=>{"use strict";v3e.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 tG=ye((rur,g3e)=>{"use strict";var H2t=vl(),G2t=Uc().zorder,j2t=Wo().hovertemplateAttrs,p3e=no().extendFlat,W2t=jT().colormodel,R4=["rgb","rgba","rgba256","hsl","hsla"],Z2t=[],X2t=[];for(WT=0;WT{"use strict";var Y2t=Mr(),K2t=tG(),m3e=jT(),J2t=Ly().IMAGE_URL_PREFIX;y3e.exports=function(t,r){function n(o,s){return Y2t.coerce(t,r,K2t,o,s)}n("source"),r.source&&!r.source.match(J2t)&&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=m3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=m3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),r._length=null,n("zorder")}});var Uy=ye((nur,rG)=>{typeof Object.create=="function"?rG.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:rG.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 iG=ye((aur,x3e)=>{x3e.exports=vb().EventEmitter});var T3e=ye(z8=>{"use strict";z8.byteLength=Q2t;z8.toByteArray=twt;z8.fromByteArray=nwt;var Fm=[],Z0=[],$2t=typeof Uint8Array!="undefined"?Uint8Array:Array,nG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s2=0,b3e=nG.length;s20)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 Q2t(e){var t=w3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ewt(e,t,r){return(t+r)*3/4-r}function twt(e){var t,r=w3e(e),n=r[0],i=r[1],a=new $2t(ewt(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=Z0[e.charCodeAt(l)]<<2|Z0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Z0[e.charCodeAt(l)]<<10|Z0[e.charCodeAt(l+1)]<<4|Z0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function rwt(e){return Fm[e>>18&63]+Fm[e>>12&63]+Fm[e>>6&63]+Fm[e&63]}function iwt(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Fm[t>>2]+Fm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Fm[t>>10]+Fm[t>>4&63]+Fm[t<<2&63]+"=")),i.join("")}});var A3e=ye(aG=>{aG.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)};aG.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,x=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]|=x*128}});var u2=ye(KT=>{"use strict";var oG=T3e(),XT=A3e(),S3e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;KT.Buffer=In;KT.SlowBuffer=cwt;KT.INSPECT_MAX_BYTES=50;var F8=2147483647;KT.kMaxLength=F8;In.TYPED_ARRAY_SUPPORT=awt();!In.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 awt(){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(In.prototype,"parent",{enumerable:!0,get:function(){if(In.isBuffer(this))return this.buffer}});Object.defineProperty(In.prototype,"offset",{enumerable:!0,get:function(){if(In.isBuffer(this))return this.byteOffset}});function Vy(e){if(e>F8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,In.prototype),t}function In(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 cG(e)}return C3e(e,t,r)}In.poolSize=8192;function C3e(e,t,r){if(typeof e=="string")return swt(e,t);if(ArrayBuffer.isView(e))return lwt(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 lG(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 In.from(n,t,r);let i=uwt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return In.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)}In.from=function(e,t,r){return C3e(e,t,r)};Object.setPrototypeOf(In.prototype,Uint8Array.prototype);Object.setPrototypeOf(In,Uint8Array);function L3e(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 owt(e,t,r){return L3e(e),e<=0?Vy(e):t!==void 0?typeof r=="string"?Vy(e).fill(t,r):Vy(e).fill(t):Vy(e)}In.alloc=function(e,t,r){return owt(e,t,r)};function cG(e){return L3e(e),Vy(e<0?0:fG(e)|0)}In.allocUnsafe=function(e){return cG(e)};In.allocUnsafeSlow=function(e){return cG(e)};function swt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!In.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=P3e(e,t)|0,n=Vy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function sG(e){let t=e.length<0?0:fG(e.length)|0,r=Vy(t);for(let n=0;n=F8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+F8.toString(16)+" bytes");return e|0}function cwt(e){return+e!=e&&(e=0),In.alloc(+e)}In.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==In.prototype};In.compare=function(t,r){if(qm(t,Uint8Array)&&(t=In.from(t,t.offset,t.byteLength)),qm(r,Uint8Array)&&(r=In.from(r,r.offset,r.byteLength)),!In.isBuffer(t)||!In.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?(In.isBuffer(o)||(o=In.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(In.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function P3e(e,t){if(In.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 uG(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return N3e(e).length;default:if(i)return n?-1:uG(e).length;t=(""+t).toLowerCase(),i=!0}}In.byteLength=P3e;function fwt(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 bwt(this,t,r);case"utf8":case"utf-8":return D3e(this,t,r);case"ascii":return _wt(this,t,r);case"latin1":case"binary":return xwt(this,t,r);case"base64":return mwt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wwt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}In.prototype._isBuffer=!0;function l2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}In.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+=" ... "),""};S3e&&(In.prototype[S3e]=In.prototype.inspect);In.prototype.compare=function(t,r,n,i,a){if(qm(t,Uint8Array)&&(t=In.from(t,t.offset,t.byteLength)),!In.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,dG(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=In.from(t,n)),In.isBuffer(t))return t.length===0?-1:M3e(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):M3e(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M3e(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 hwt(this,t,r,n);case"utf8":case"utf-8":return dwt(this,t,r,n);case"ascii":case"latin1":case"binary":return vwt(this,t,r,n);case"base64":return pwt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gwt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};In.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function mwt(e,t,r){return t===0&&r===e.length?oG.fromByteArray(e):oG.fromByteArray(e.slice(t,r))}function D3e(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 ywt(n)}var E3e=4096;function ywt(e){let t=e.length;if(t<=E3e)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")}In.prototype.readUintLE=In.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||$d(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||$d(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};In.prototype.readUint8=In.prototype.readUInt8=function(t,r){return t=t>>>0,r||$d(t,1,this.length),this[t]};In.prototype.readUint16LE=In.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||$d(t,2,this.length),this[t]|this[t+1]<<8};In.prototype.readUint16BE=In.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||$d(t,2,this.length),this[t]<<8|this[t+1]};In.prototype.readUint32LE=In.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};In.prototype.readUint32BE=In.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};In.prototype.readBigUInt64LE=P_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(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||$d(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};In.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||$d(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};In.prototype.readInt8=function(t,r){return t=t>>>0,r||$d(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};In.prototype.readInt16LE=function(t,r){t=t>>>0,r||$d(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};In.prototype.readInt16BE=function(t,r){t=t>>>0,r||$d(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};In.prototype.readInt32LE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};In.prototype.readInt32BE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};In.prototype.readBigInt64LE=P_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||$d(t,4,this.length),XT.read(this,t,!0,23,4)};In.prototype.readFloatBE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),XT.read(this,t,!1,23,4)};In.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||$d(t,8,this.length),XT.read(this,t,!0,52,8)};In.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||$d(t,8,this.length),XT.read(this,t,!1,52,8)};function Dp(e,t,r,n,i,a){if(!In.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}In.prototype.writeUintLE=In.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;Dp(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;Dp(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};In.prototype.writeUint8=In.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,1,255,0),this[r]=t&255,r+1};In.prototype.writeUint16LE=In.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};In.prototype.writeUint16BE=In.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};In.prototype.writeUint32LE=In.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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};In.prototype.writeUint32BE=In.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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 R3e(e,t,r,n,i){B3e(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 z3e(e,t,r,n,i){B3e(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}In.prototype.writeBigUInt64LE=P_(function(t,r=0){return R3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});In.prototype.writeBigUInt64BE=P_(function(t,r=0){return z3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});In.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Dp(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};In.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Dp(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};In.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};In.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};In.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};In.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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};In.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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};In.prototype.writeBigInt64LE=P_(function(t,r=0){return R3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});In.prototype.writeBigInt64BE=P_(function(t,r=0){return z3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F3e(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 q3e(e,t,r,n,i){return t=+t,r=r>>>0,i||F3e(e,t,r,4,34028234663852886e22,-34028234663852886e22),XT.write(e,t,r,n,23,4),r+4}In.prototype.writeFloatLE=function(t,r,n){return q3e(this,t,r,!0,n)};In.prototype.writeFloatBE=function(t,r,n){return q3e(this,t,r,!1,n)};function O3e(e,t,r,n,i){return t=+t,r=r>>>0,i||F3e(e,t,r,8,17976931348623157e292,-17976931348623157e292),XT.write(e,t,r,n,52,8),r+8}In.prototype.writeDoubleLE=function(t,r,n){return O3e(this,t,r,!0,n)};In.prototype.writeDoubleBE=function(t,r,n){return O3e(this,t,r,!1,n)};In.prototype.copy=function(t,r,n,i){if(!In.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=k3e(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=k3e(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function k3e(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 Twt(e,t,r){YT(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&z4(t,e.length-(r+1))}function B3e(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 ZT.ERR_OUT_OF_RANGE("value",s,e)}Twt(n,i,a)}function YT(e,t){if(typeof e!="number")throw new ZT.ERR_INVALID_ARG_TYPE(t,"number",e)}function z4(e,t,r){throw Math.floor(e)!==e?(YT(e,r),new ZT.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ZT.ERR_BUFFER_OUT_OF_BOUNDS:new ZT.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Awt=/[^+/0-9A-Za-z-_]/g;function Swt(e){if(e=e.split("=")[0],e=e.trim().replace(Awt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function uG(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 Mwt(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function N3e(e){return oG.toByteArray(Swt(e))}function q8(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 dG(e){return e!==e}var kwt=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"?Cwt:e}function Cwt(){throw new Error("BigInt not supported")}});var O8=ye((cur,U3e)=>{"use strict";U3e.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(r 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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var F4=ye((fur,V3e)=>{"use strict";var Lwt=O8();V3e.exports=function(){return Lwt()&&!!Symbol.toStringTag}});var G3e=ye((hur,H3e)=>{"use strict";H3e.exports=Error});var W3e=ye((dur,j3e)=>{"use strict";j3e.exports=EvalError});var X3e=ye((vur,Z3e)=>{"use strict";Z3e.exports=RangeError});var K3e=ye((pur,Y3e)=>{"use strict";Y3e.exports=ReferenceError});var vG=ye((gur,J3e)=>{"use strict";J3e.exports=SyntaxError});var q4=ye((mur,$3e)=>{"use strict";$3e.exports=TypeError});var eTe=ye((yur,Q3e)=>{"use strict";Q3e.exports=URIError});var iTe=ye((_ur,rTe)=>{"use strict";var tTe=typeof Symbol!="undefined"&&Symbol,Pwt=O8();rTe.exports=function(){return typeof tTe!="function"||typeof Symbol!="function"||typeof tTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Pwt()}});var oTe=ye((xur,aTe)=>{"use strict";var nTe={foo:{}},Iwt=Object;aTe.exports=function(){return{__proto__:nTe}.foo===nTe.foo&&!({__proto__:null}instanceof Iwt)}});var uTe=ye((bur,lTe)=>{"use strict";var Dwt="Function.prototype.bind called on incompatible ",Rwt=Object.prototype.toString,zwt=Math.max,Fwt="[object Function]",sTe=function(t,r){for(var n=[],i=0;i{"use strict";var Bwt=uTe();cTe.exports=Function.prototype.bind||Bwt});var hTe=ye((Tur,fTe)=>{"use strict";var Nwt=Function.prototype.call,Uwt=Object.prototype.hasOwnProperty,Vwt=B8();fTe.exports=Vwt.call(Nwt,Uwt)});var t5=ye((Aur,mTe)=>{"use strict";var Gl,Hwt=G3e(),Gwt=W3e(),jwt=X3e(),Wwt=K3e(),e5=vG(),QT=q4(),Zwt=eTe(),gTe=Function,pG=function(e){try{return gTe('"use strict"; return ('+e+").constructor;")()}catch(t){}},c2=Object.getOwnPropertyDescriptor;if(c2)try{c2({},"")}catch(e){c2=null}var gG=function(){throw new QT},Xwt=c2?function(){try{return arguments.callee,gG}catch(e){try{return c2(arguments,"callee").get}catch(t){return gG}}}():gG,JT=iTe()(),Ywt=oTe()(),Qd=Object.getPrototypeOf||(Ywt?function(e){return e.__proto__}:null),$T={},Kwt=typeof Uint8Array=="undefined"||!Qd?Gl:Qd(Uint8Array),f2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Gl:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Gl:ArrayBuffer,"%ArrayIteratorPrototype%":JT&&Qd?Qd([][Symbol.iterator]()):Gl,"%AsyncFromSyncIteratorPrototype%":Gl,"%AsyncFunction%":$T,"%AsyncGenerator%":$T,"%AsyncGeneratorFunction%":$T,"%AsyncIteratorPrototype%":$T,"%Atomics%":typeof Atomics=="undefined"?Gl:Atomics,"%BigInt%":typeof BigInt=="undefined"?Gl:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Gl:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Gl:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Gl:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Hwt,"%eval%":eval,"%EvalError%":Gwt,"%Float32Array%":typeof Float32Array=="undefined"?Gl:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Gl:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Gl:FinalizationRegistry,"%Function%":gTe,"%GeneratorFunction%":$T,"%Int8Array%":typeof Int8Array=="undefined"?Gl:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Gl:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Gl:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":JT&&Qd?Qd(Qd([][Symbol.iterator]())):Gl,"%JSON%":typeof JSON=="object"?JSON:Gl,"%Map%":typeof Map=="undefined"?Gl:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!JT||!Qd?Gl:Qd(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Gl:Promise,"%Proxy%":typeof Proxy=="undefined"?Gl:Proxy,"%RangeError%":jwt,"%ReferenceError%":Wwt,"%Reflect%":typeof Reflect=="undefined"?Gl:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Gl:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!JT||!Qd?Gl:Qd(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Gl:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":JT&&Qd?Qd(""[Symbol.iterator]()):Gl,"%Symbol%":JT?Symbol:Gl,"%SyntaxError%":e5,"%ThrowTypeError%":Xwt,"%TypedArray%":Kwt,"%TypeError%":QT,"%Uint8Array%":typeof Uint8Array=="undefined"?Gl:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Gl:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Gl:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Gl:Uint32Array,"%URIError%":Zwt,"%WeakMap%":typeof WeakMap=="undefined"?Gl:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Gl:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Gl:WeakSet};if(Qd)try{null.error}catch(e){dTe=Qd(Qd(e)),f2["%Error.prototype%"]=dTe}var dTe,Jwt=function e(t){var r;if(t==="%AsyncFunction%")r=pG("async function () {}");else if(t==="%GeneratorFunction%")r=pG("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=pG("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Qd&&(r=Qd(i.prototype))}return f2[t]=r,r},vTe={__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"]},O4=B8(),N8=hTe(),$wt=O4.call(Function.call,Array.prototype.concat),Qwt=O4.call(Function.apply,Array.prototype.splice),pTe=O4.call(Function.call,String.prototype.replace),U8=O4.call(Function.call,String.prototype.slice),e3t=O4.call(Function.call,RegExp.prototype.exec),t3t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,r3t=/\\(\\)?/g,i3t=function(t){var r=U8(t,0,1),n=U8(t,-1);if(r==="%"&&n!=="%")throw new e5("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new e5("invalid intrinsic syntax, expected opening `%`");var i=[];return pTe(t,t3t,function(a,o,s,l){i[i.length]=s?pTe(l,r3t,"$1"):o||a}),i},n3t=function(t,r){var n=t,i;if(N8(vTe,n)&&(i=vTe[n],n="%"+i[0]+"%"),N8(f2,n)){var a=f2[n];if(a===$T&&(a=Jwt(n)),typeof a=="undefined"&&!r)throw new QT("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new e5("intrinsic "+t+" does not exist!")};mTe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new QT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new QT('"allowMissing" argument must be a boolean');if(e3t(/^%?[^%]*%?$/,t)===null)throw new e5("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=i3t(t),i=n.length>0?n[0]:"",a=n3t("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],Qwt(n,$wt([0,1],u)));for(var c=1,f=!0;c=n.length){var x=c2(s,h);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[h]}else f=N8(s,h),s=s[h];f&&!l&&(f2[o]=s)}}return s}});var H8=ye((Sur,yTe)=>{"use strict";var a3t=t5(),V8=a3t("%Object.defineProperty%",!0)||!1;if(V8)try{V8({},"a",{value:1})}catch(e){V8=!1}yTe.exports=V8});var B4=ye((Mur,_Te)=>{"use strict";var o3t=t5(),G8=o3t("%Object.getOwnPropertyDescriptor%",!0);if(G8)try{G8([],"length")}catch(e){G8=null}_Te.exports=G8});var TTe=ye((Eur,wTe)=>{"use strict";var xTe=H8(),s3t=vG(),r5=q4(),bTe=B4();wTe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new r5("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new r5("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r5("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r5("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r5("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r5("`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=!!bTe&&bTe(t,r);if(xTe)xTe(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 s3t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var yG=ye((kur,STe)=>{"use strict";var mG=H8(),ATe=function(){return!!mG};ATe.hasArrayLengthDefineBug=function(){if(!mG)return null;try{return mG([],"length",{value:1}).length!==1}catch(t){return!0}};STe.exports=ATe});var LTe=ye((Cur,CTe)=>{"use strict";var l3t=t5(),MTe=TTe(),u3t=yG()(),ETe=B4(),kTe=q4(),c3t=l3t("%Math.floor%");CTe.exports=function(t,r){if(typeof t!="function")throw new kTe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||c3t(r)!==r)throw new kTe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&ETe){var o=ETe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(u3t?MTe(t,"length",r,!0,!0):MTe(t,"length",r)),t}});var N4=ye((Lur,j8)=>{"use strict";var _G=B8(),W8=t5(),f3t=LTe(),h3t=q4(),DTe=W8("%Function.prototype.apply%"),RTe=W8("%Function.prototype.call%"),zTe=W8("%Reflect.apply%",!0)||_G.call(RTe,DTe),PTe=H8(),d3t=W8("%Math.max%");j8.exports=function(t){if(typeof t!="function")throw new h3t("a function is required");var r=zTe(_G,RTe,arguments);return f3t(r,1+d3t(0,t.length-(arguments.length-1)),!0)};var ITe=function(){return zTe(_G,DTe,arguments)};PTe?PTe(j8.exports,"apply",{value:ITe}):j8.exports.apply=ITe});var i5=ye((Pur,OTe)=>{"use strict";var FTe=t5(),qTe=N4(),v3t=qTe(FTe("String.prototype.indexOf"));OTe.exports=function(t,r){var n=FTe(t,!!r);return typeof n=="function"&&v3t(t,".prototype.")>-1?qTe(n):n}});var UTe=ye((Iur,NTe)=>{"use strict";var p3t=F4()(),g3t=i5(),xG=g3t("Object.prototype.toString"),Z8=function(t){return p3t&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:xG(t)==="[object Arguments]"},BTe=function(t){return Z8(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&xG(t)!=="[object Array]"&&xG(t.callee)==="[object Function]"},m3t=function(){return Z8(arguments)}();Z8.isLegacyArguments=BTe;NTe.exports=m3t?Z8:BTe});var GTe=ye((Dur,HTe)=>{"use strict";var y3t=Object.prototype.toString,_3t=Function.prototype.toString,x3t=/^\s*(?:function)?\*/,VTe=F4()(),bG=Object.getPrototypeOf,b3t=function(){if(!VTe)return!1;try{return Function("return function*() {}")()}catch(e){}},wG;HTe.exports=function(t){if(typeof t!="function")return!1;if(x3t.test(_3t.call(t)))return!0;if(!VTe){var r=y3t.call(t);return r==="[object GeneratorFunction]"}if(!bG)return!1;if(typeof wG=="undefined"){var n=b3t();wG=n?bG(n):!1}return bG(t)===wG}});var XTe=ye((Rur,ZTe)=>{"use strict";var WTe=Function.prototype.toString,n5=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,AG,X8;if(typeof n5=="function"&&typeof Object.defineProperty=="function")try{AG=Object.defineProperty({},"length",{get:function(){throw X8}}),X8={},n5(function(){throw 42},null,AG)}catch(e){e!==X8&&(n5=null)}else n5=null;var w3t=/^\s*class\b/,SG=function(t){try{var r=WTe.call(t);return w3t.test(r)}catch(n){return!1}},TG=function(t){try{return SG(t)?!1:(WTe.call(t),!0)}catch(r){return!1}},Y8=Object.prototype.toString,T3t="[object Object]",A3t="[object Function]",S3t="[object GeneratorFunction]",M3t="[object HTMLAllCollection]",E3t="[object HTML document.all class]",k3t="[object HTMLCollection]",C3t=typeof Symbol=="function"&&!!Symbol.toStringTag,L3t=!(0 in[,]),MG=function(){return!1};typeof document=="object"&&(jTe=document.all,Y8.call(jTe)===Y8.call(document.all)&&(MG=function(t){if((L3t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=Y8.call(t);return(r===M3t||r===E3t||r===k3t||r===T3t)&&t("")==null}catch(n){}return!1}));var jTe;ZTe.exports=n5?function(t){if(MG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{n5(t,null,AG)}catch(r){if(r!==X8)return!1}return!SG(t)&&TG(t)}:function(t){if(MG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(C3t)return TG(t);if(SG(t))return!1;var r=Y8.call(t);return r!==A3t&&r!==S3t&&!/^\[object HTML/.test(r)?!1:TG(t)}});var EG=ye((zur,KTe)=>{"use strict";var P3t=XTe(),I3t=Object.prototype.toString,YTe=Object.prototype.hasOwnProperty,D3t=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),I3t.call(t)==="[object Array]"?D3t(t,r,i):typeof t=="string"?R3t(t,r,i):z3t(t,r,i)};KTe.exports=F3t});var CG=ye((Fur,JTe)=>{"use strict";var kG=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],q3t=typeof globalThis=="undefined"?window:globalThis;JTe.exports=function(){for(var t=[],r=0;r{"use strict";var J8=EG(),O3t=CG(),$Te=N4(),IG=i5(),K8=B4(),B3t=IG("Object.prototype.toString"),e5e=F4()(),QTe=typeof globalThis=="undefined"?window:globalThis,PG=O3t(),DG=IG("String.prototype.slice"),LG=Object.getPrototypeOf,N3t=IG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:V3t(t)}return K8?U3t(t):null}});var l5e=ye((Our,s5e)=>{"use strict";var i5e=EG(),H3t=CG(),zG=i5(),G3t=zG("Object.prototype.toString"),n5e=F4()(),Q8=B4(),j3t=typeof globalThis=="undefined"?window:globalThis,a5e=H3t(),W3t=zG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return Q8?X3t(t):!1}});var OG=ye(Ol=>{"use strict";var Y3t=UTe(),K3t=GTe(),Hg=r5e(),u5e=l5e();function a5(e){return e.call.bind(e)}var c5e=typeof BigInt!="undefined",f5e=typeof Symbol!="undefined",X0=a5(Object.prototype.toString),J3t=a5(Number.prototype.valueOf),$3t=a5(String.prototype.valueOf),Q3t=a5(Boolean.prototype.valueOf);c5e&&(h5e=a5(BigInt.prototype.valueOf));var h5e;f5e&&(d5e=a5(Symbol.prototype.valueOf));var d5e;function V4(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Ol.isArgumentsObject=Y3t;Ol.isGeneratorFunction=K3t;Ol.isTypedArray=u5e;function eTt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Ol.isPromise=eTt;function tTt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):u5e(e)||p5e(e)}Ol.isArrayBufferView=tTt;function rTt(e){return Hg(e)==="Uint8Array"}Ol.isUint8Array=rTt;function iTt(e){return Hg(e)==="Uint8ClampedArray"}Ol.isUint8ClampedArray=iTt;function nTt(e){return Hg(e)==="Uint16Array"}Ol.isUint16Array=nTt;function aTt(e){return Hg(e)==="Uint32Array"}Ol.isUint32Array=aTt;function oTt(e){return Hg(e)==="Int8Array"}Ol.isInt8Array=oTt;function sTt(e){return Hg(e)==="Int16Array"}Ol.isInt16Array=sTt;function lTt(e){return Hg(e)==="Int32Array"}Ol.isInt32Array=lTt;function uTt(e){return Hg(e)==="Float32Array"}Ol.isFloat32Array=uTt;function cTt(e){return Hg(e)==="Float64Array"}Ol.isFloat64Array=cTt;function fTt(e){return Hg(e)==="BigInt64Array"}Ol.isBigInt64Array=fTt;function hTt(e){return Hg(e)==="BigUint64Array"}Ol.isBigUint64Array=hTt;function eD(e){return X0(e)==="[object Map]"}eD.working=typeof Map!="undefined"&&eD(new Map);function dTt(e){return typeof Map=="undefined"?!1:eD.working?eD(e):e instanceof Map}Ol.isMap=dTt;function tD(e){return X0(e)==="[object Set]"}tD.working=typeof Set!="undefined"&&tD(new Set);function vTt(e){return typeof Set=="undefined"?!1:tD.working?tD(e):e instanceof Set}Ol.isSet=vTt;function rD(e){return X0(e)==="[object WeakMap]"}rD.working=typeof WeakMap!="undefined"&&rD(new WeakMap);function pTt(e){return typeof WeakMap=="undefined"?!1:rD.working?rD(e):e instanceof WeakMap}Ol.isWeakMap=pTt;function qG(e){return X0(e)==="[object WeakSet]"}qG.working=typeof WeakSet!="undefined"&&qG(new WeakSet);function gTt(e){return qG(e)}Ol.isWeakSet=gTt;function iD(e){return X0(e)==="[object ArrayBuffer]"}iD.working=typeof ArrayBuffer!="undefined"&&iD(new ArrayBuffer);function v5e(e){return typeof ArrayBuffer=="undefined"?!1:iD.working?iD(e):e instanceof ArrayBuffer}Ol.isArrayBuffer=v5e;function nD(e){return X0(e)==="[object DataView]"}nD.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&nD(new DataView(new ArrayBuffer(1),0,1));function p5e(e){return typeof DataView=="undefined"?!1:nD.working?nD(e):e instanceof DataView}Ol.isDataView=p5e;var FG=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function U4(e){return X0(e)==="[object SharedArrayBuffer]"}function g5e(e){return typeof FG=="undefined"?!1:(typeof U4.working=="undefined"&&(U4.working=U4(new FG)),U4.working?U4(e):e instanceof FG)}Ol.isSharedArrayBuffer=g5e;function mTt(e){return X0(e)==="[object AsyncFunction]"}Ol.isAsyncFunction=mTt;function yTt(e){return X0(e)==="[object Map Iterator]"}Ol.isMapIterator=yTt;function _Tt(e){return X0(e)==="[object Set Iterator]"}Ol.isSetIterator=_Tt;function xTt(e){return X0(e)==="[object Generator]"}Ol.isGeneratorObject=xTt;function bTt(e){return X0(e)==="[object WebAssembly.Module]"}Ol.isWebAssemblyCompiledModule=bTt;function m5e(e){return V4(e,J3t)}Ol.isNumberObject=m5e;function y5e(e){return V4(e,$3t)}Ol.isStringObject=y5e;function _5e(e){return V4(e,Q3t)}Ol.isBooleanObject=_5e;function x5e(e){return c5e&&V4(e,h5e)}Ol.isBigIntObject=x5e;function b5e(e){return f5e&&V4(e,d5e)}Ol.isSymbolObject=b5e;function wTt(e){return m5e(e)||y5e(e)||_5e(e)||x5e(e)||b5e(e)}Ol.isBoxedPrimitive=wTt;function TTt(e){return typeof Uint8Array!="undefined"&&(v5e(e)||g5e(e))}Ol.isAnyArrayBuffer=TTt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Ol,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var BG=ye((Nur,w5e)=>{w5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var jG=ye(Bl=>{var T5e=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]),HG(t)?r.showHidden=t:t&&Bl._extend(r,t),d2(r.showHidden)&&(r.showHidden=!1),d2(r.depth)&&(r.depth=2),d2(r.colors)&&(r.colors=!1),d2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=STt),lD(r,e,r.depth)}Bl.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 STt(e,t){var r=I_.styles[t];return r?"\x1B["+I_.colors[r][0]+"m"+e+"\x1B["+I_.colors[r][1]+"m":e}function MTt(e,t){return e}function ETt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function lD(e,t,r){if(e.customInspect&&t&&sD(t.inspect)&&t.inspect!==Bl.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return fD(n)||(n=lD(e,n,r)),n}var i=kTt(e,t);if(i)return i;var a=Object.keys(t),o=ETt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),G4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return NG(t);if(a.length===0){if(sD(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(H4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(uD(t))return e.stylize(Date.prototype.toString.call(t),"date");if(G4(t))return NG(t)}var l="",u=!1,c=["{","}"];if(S5e(t)&&(u=!0,c=["[","]"]),sD(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(H4(t)&&(l=" "+RegExp.prototype.toString.call(t)),uD(t)&&(l=" "+Date.prototype.toUTCString.call(t)),G4(t)&&(l=" "+NG(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return H4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=CTt(e,t,r,o,a):h=a.map(function(d){return VG(e,t,r,o,d,u)}),e.seen.pop(),LTt(h,l,c)}function kTt(e,t){if(d2(t))return e.stylize("undefined","undefined");if(fD(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(M5e(t))return e.stylize(""+t,"number");if(HG(t))return e.stylize(""+t,"boolean");if(cD(t))return e.stylize("null","null")}function NG(e){return"["+Error.prototype.toString.call(e)+"]"}function CTt(e,t,r,n,i){for(var a=[],o=0,s=t.length;o{"use strict";$re.exports=function(t){return t}});var E6=ye(_y=>{"use strict";var Qtt=uo(),ert=H1(),trt=OS(),rrt=es().BADNUM,qq=1e-9;_y.findBin=function(e,t,r){if(Qtt(t.start))return r?Math.ceil((e-t.start)/t.size-qq)-1:Math.floor((e-t.start)/t.size+qq);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?irt:nrt:l=r?ort:art,e+=o*qq*(r?-1:1)*(o>=0?1:-1);n90&&ert.log("Long binary search..."),n-1};function irt(e,t){return et}function ort(e,t){return e>=t}_y.sorterAsc=function(e,t){return e-t};_y.sorterDes=function(e,t){return t-e};_y.distinctVals=function(e){var t=e.slice();t.sort(_y.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===rrt;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}};_y.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()};_y.findIndexOfMin=function(e,t){t=t||trt;for(var r=1/0,n,i=0;i{"use strict";Qre.exports=function(t){return Object.keys(t).sort()}});var eie=ye(Kf=>{"use strict";var BS=uo(),srt=vv().isArrayOrTypedArray;Kf.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),BS(t)||(t=!1),srt(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 aie=ye((itr,nie)=>{"use strict";var tie=r3(),Oq=tie.mod,lrt=tie.modHalf,NS=Math.PI,Y1=2*NS;function urt(e){return e/180*NS}function crt(e){return e/NS*180}function Bq(e){return Math.abs(e[1]-e[0])>Y1-1e-14}function rie(e,t){return lrt(t-e,Y1)}function frt(e,t){return Math.abs(rie(e,t))}function iie(e,t){if(Bq(t))return!0;var r,n;t[0]n&&(n+=Y1);var i=Oq(e,Y1),a=i+Y1;return i>=r&&i<=n||a>=r&&a<=n}function hrt(e,t,r,n){if(!iie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function Nq(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=Bq([r,n]),l,u,c,f,h;s?(l=0,u=NS,c=Y1):r{"use strict";fb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};fb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};fb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};fb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};fb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};fb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var uie=ye(hb=>{"use strict";var Uq=r3().mod;hb.segmentsIntersect=lie;function lie(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 x=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||x<0||x>1?null:{x:e+l*x,y:t+f*x}}hb.segmentDistance=function(t,r,n,i,a,o,s,l){if(lie(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,x=Math.min(k6(u,c,d,a-t,o-r),k6(u,c,d,s-t,l-r),k6(f,h,v,t-a,r-o),k6(f,h,v,n-a,i-o));return Math.sqrt(x)};function k6(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 C6,Vq,sie;hb.getTextLocation=function(t,r,n,i){if((t!==Vq||i!==sie)&&(C6={},Vq=t,sie=i),C6[n])return C6[n];var a=t.getPointAtLength(Uq(n-i/2,r)),o=t.getPointAtLength(Uq(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(Uq(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 C6[n]=f,f};hb.clearLocationCache=function(){Vq=null};hb.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(x){var b=t.getPointAtLength(x);x===0?f=b:x===u&&(h=b);var g=b.xa?b.x-a:0,E=b.ys?b.y-s:0;return Math.sqrt(g*g+E*E)}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}};hb.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 L6=ye(US=>{"use strict";var xy={};US.throttle=function(t,r,n){var i=xy[t],a=Date.now();if(!i){for(var o in xy)xy[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};US.done=function(e){var t=xy[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};US.clear=function(e){if(e)cie(xy[e]),delete xy[e];else for(var t in xy)US.clear(t)};function cie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var hie=ye((str,fie)=>{"use strict";fie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var die=ye((ltr,P6)=>{"use strict";P6.exports=Hq;P6.exports.isMobile=Hq;P6.exports.default=Hq;var grt=/(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,mrt=/CrOS/,yrt=/android|ipad|playbook|silk/i;function Hq(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=grt.test(t)&&!mrt.test(t)||!!e.tablet&&yrt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var pie=ye((utr,vie)=>{"use strict";var _rt=uo(),xrt=die();vie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=brt(),typeof r!="string")return!0;var n=xrt({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.substr(0,8)==="Version/"){var u=l.substr(8).split(".")[0];if(_rt(u)&&(u=+u),u>=13)return!0}}}return n};function brt(){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 mie=ye((ctr,gie)=>{"use strict";var wrt=xa();gie.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]=wrt.select(this)}),i}});var _ie=ye((ftr,yie)=>{"use strict";var Trt=ba();yie.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=Trt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var Gq=ye((htr,xie)=>{"use strict";xie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";bie.exports=function(t){for(var r=Mrt(t)?Srt:Art,n=[],i=0;i{"use strict";Tie.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 Mie=ye((ptr,Sie)=>{"use strict";var Ert=uo(),krt=es().BADNUM,Crt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Sie.exports=function(t){return typeof t=="string"&&(t=t.replace(Crt,"")),Ert(t)?Number(t):krt}});var Mr=ye((gtr,Bie)=>{"use strict";var VS=xa(),Lrt=e3().utcFormat,Prt=dq().format,Iie=uo(),Die=es(),Rie=Die.FP_SAFE,Irt=-Rie,Eie=Die.BADNUM,li=Bie.exports={};li.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 kie={};li.warnBadFormat=function(e){var t=String(e);kie[t]||(kie[t]=1,li.warn('encountered bad format: "'+t+'"'))};li.noFormat=function(e){return String(e)};li.numberFormat=function(e){var t;try{t=Prt(li.adjustFormat(e))}catch(r){return li.warnBadFormat(e),li.noFormat}return t};li.nestedProperty=ES();li.keyedContainer=_ee();li.relativeAttr=bee();li.isPlainObject=gy();li.toLogRange=l6();li.relinkPrivateKeys=See();var K1=vv();li.isArrayBuffer=K1.isArrayBuffer;li.isTypedArray=K1.isTypedArray;li.isArrayOrTypedArray=K1.isArrayOrTypedArray;li.isArray1D=K1.isArray1D;li.ensureArray=K1.ensureArray;li.concat=K1.concat;li.maxRowLength=K1.maxRowLength;li.minRowLength=K1.minRowLength;var zie=r3();li.mod=zie.mod;li.modHalf=zie.modHalf;var J1=Gee();li.valObjectMeta=J1.valObjectMeta;li.coerce=J1.coerce;li.coerce2=J1.coerce2;li.coerceFont=J1.coerceFont;li.coercePattern=J1.coercePattern;li.coerceHoverinfo=J1.coerceHoverinfo;li.coerceSelectionMarkerOpacity=J1.coerceSelectionMarkerOpacity;li.validate=J1.validate;var Wp=Jre();li.dateTime2ms=Wp.dateTime2ms;li.isDateTime=Wp.isDateTime;li.ms2DateTime=Wp.ms2DateTime;li.ms2DateTimeLocal=Wp.ms2DateTimeLocal;li.cleanDate=Wp.cleanDate;li.isJSDate=Wp.isJSDate;li.formatDate=Wp.formatDate;li.incrementMonth=Wp.incrementMonth;li.dateTick0=Wp.dateTick0;li.dfltRange=Wp.dfltRange;li.findExactDates=Wp.findExactDates;li.MIN_MS=Wp.MIN_MS;li.MAX_MS=Wp.MAX_MS;var db=E6();li.findBin=db.findBin;li.sorterAsc=db.sorterAsc;li.sorterDes=db.sorterDes;li.distinctVals=db.distinctVals;li.roundUp=db.roundUp;li.sort=db.sort;li.findIndexOfMin=db.findIndexOfMin;li.sortObjectKeys=X1();var by=eie();li.aggNums=by.aggNums;li.len=by.len;li.mean=by.mean;li.geometricMean=by.geometricMean;li.median=by.median;li.midRange=by.midRange;li.variance=by.variance;li.stdev=by.stdev;li.interp=by.interp;var yg=g6();li.init2dArray=yg.init2dArray;li.transposeRagged=yg.transposeRagged;li.dot=yg.dot;li.translationMatrix=yg.translationMatrix;li.rotationMatrix=yg.rotationMatrix;li.rotationXYMatrix=yg.rotationXYMatrix;li.apply3DTransform=yg.apply3DTransform;li.apply2DTransform=yg.apply2DTransform;li.apply2DTransform2=yg.apply2DTransform2;li.convertCssMatrix=yg.convertCssMatrix;li.inverseTransformMatrix=yg.inverseTransformMatrix;var vm=aie();li.deg2rad=vm.deg2rad;li.rad2deg=vm.rad2deg;li.angleDelta=vm.angleDelta;li.angleDist=vm.angleDist;li.isFullCircle=vm.isFullCircle;li.isAngleInsideSector=vm.isAngleInsideSector;li.isPtInsideSector=vm.isPtInsideSector;li.pathArc=vm.pathArc;li.pathSector=vm.pathSector;li.pathAnnulus=vm.pathAnnulus;var d3=oie();li.isLeftAnchor=d3.isLeftAnchor;li.isCenterAnchor=d3.isCenterAnchor;li.isRightAnchor=d3.isRightAnchor;li.isTopAnchor=d3.isTopAnchor;li.isMiddleAnchor=d3.isMiddleAnchor;li.isBottomAnchor=d3.isBottomAnchor;var v3=uie();li.segmentsIntersect=v3.segmentsIntersect;li.segmentDistance=v3.segmentDistance;li.getTextLocation=v3.getTextLocation;li.clearLocationCache=v3.clearLocationCache;li.getVisibleSegment=v3.getVisibleSegment;li.findPointOnPath=v3.findPointOnPath;var R6=no();li.extendFlat=R6.extendFlat;li.extendDeep=R6.extendDeep;li.extendDeepAll=R6.extendDeepAll;li.extendDeepNoArrays=R6.extendDeepNoArrays;var jq=H1();li.log=jq.log;li.warn=jq.warn;li.error=jq.error;var Drt=n3();li.counterRegex=Drt.counter;var Wq=L6();li.throttle=Wq.throttle;li.throttleDone=Wq.done;li.clearThrottle=Wq.clear;var _g=RS();li.getGraphDiv=_g.getGraphDiv;li.isPlotDiv=_g.isPlotDiv;li.removeElement=_g.removeElement;li.addStyleRule=_g.addStyleRule;li.addRelatedStyleRule=_g.addRelatedStyleRule;li.deleteRelatedStyleRule=_g.deleteRelatedStyleRule;li.setStyleOnHover=_g.setStyleOnHover;li.getFullTransformMatrix=_g.getFullTransformMatrix;li.getElementTransformMatrix=_g.getElementTransformMatrix;li.getElementAndAncestors=_g.getElementAndAncestors;li.equalDomRects=_g.equalDomRects;li.clearResponsive=hie();li.preserveDrawingBuffer=pie();li.makeTraceGroups=mie();li._=_ie();li.notifier=Aq();li.filterUnique=Gq();li.filterVisible=wie();li.pushUnique=Eq();li.increment=Aie();li.cleanNumber=Mie();li.ensureNumber=function(t){return Iie(t)?(t=Number(t),t>Rie||t=t?!1:Iie(e)&&e>=0&&e%1===0};li.noop=p6();li.identity=OS();li.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))};li.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};li.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?(li.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};li.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};li.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};li.syncOrAsync=function(e,t,r){var n,i;function a(){return li.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)};li.stripTrailingSlash=function(e){return e.substr(-1)==="/"?e.substr(0,e.length-1):e};li.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};li.fillArray=function(e,t,r,n){if(n=n||li.identity,li.isArrayOrTypedArray(e))for(var i=0;i1?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};li.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Oie=/^\w*$/;li.templateString=function(e,t){var r={};return e.replace(li.TEMPLATE_STRING_REGEX,function(n,i){var a;return Oie.test(i)?a=t[i]:(r[i]=r[i]||li.nestedProperty(t,i).get,a=r[i]()),li.isValidTextValue(a)?a:""})};var Brt={max:10,count:0,name:"hovertemplate"};li.hovertemplateString=function(){return Zq.apply(Brt,arguments)};var Nrt={max:10,count:0,name:"texttemplate"};li.texttemplateString=function(){return Zq.apply(Nrt,arguments)};var Urt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Vrt(e){var t=e.match(Urt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Hrt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};li.texttemplateStringForShapes=function(){return Zq.apply(Hrt,arguments)};var Cie=/^[:|\|]/;function Zq(e,t,r){var n=this,i=arguments;t||(t={});var a={};return e.replace(li.TEMPLATE_STRING_REGEX,function(o,s,l){var u=s==="xother"||s==="yother",c=s==="_xother"||s==="_yother",f=s==="_xother_"||s==="_yother_",h=s==="xother_"||s==="yother_",d=u||c||h||f,v=s;(c||f)&&(v=v.substring(1)),(h||f)&&(v=v.substring(0,v.length-1));var x=null,b=null;if(n.parseMultDiv){var g=Vrt(v);v=g.key,x=g.op,b=g.number}var E;if(d){if(E=t[v],E===void 0)return""}else{var k,A;for(A=3;A=D6&&o<=Lie,u=s>=D6&&s<=Lie;if(l&&(n=10*n+o-D6),u&&(i=10*i+s-D6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var h3=2e9;li.seedPseudoRandom=function(){h3=2e9};li.pseudoRandom=function(){var e=h3;return h3=(69069*h3+1)%4294967296,Math.abs(h3-e)<429496729?li.pseudoRandom():h3/4294967296};li.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=li.extractOption(e,t,"htx","hovertext");if(li.isValidTextValue(i))return n(i);var a=li.extractOption(e,t,"tx","text");if(li.isValidTextValue(a))return n(a)};li.isValidTextValue=function(e){return e||e===0};li.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,li.strTranslate(i-u*(r+o),a-u*(n+s))+li.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};li.setTransormAndDisplay=function(e,t){e.attr("transform",li.getTextTransform(t)),e.style("display",t.scale?null:"none")};li.ensureUniformFontSize=function(e,t){var r=li.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};li.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)};li.bigFont=function(e){return Math.round(1.2*e)};var Pie=li.getFirefoxVersion(),Grt=Pie!==null&&Pie<86;li.getPositionFromD3Event=function(){return Grt?[VS.event.layerX,VS.event.layerY]:[VS.event.offsetX,VS.event.offsetY]}});var Vie=ye(()=>{"use strict";var jrt=Mr(),Nie={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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(Xq in Nie)Uie=Xq.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jrt.addStyleRule(Uie,Nie[Xq]);var Uie,Xq});var Yq=ye((_tr,Hie)=>{Hie.exports=!0});var Jq=ye((xtr,Gie)=>{"use strict";var Wrt=Yq(),Kq;typeof window.matchMedia=="function"?Kq=!window.matchMedia("(hover: none)").matches:Kq=Wrt;Gie.exports=Kq});var vb=ye((btr,$q)=>{"use strict";var p3=typeof Reflect=="object"?Reflect:null,jie=p3&&typeof p3.apply=="function"?p3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},z6;p3&&typeof p3.ownKeys=="function"?z6=p3.ownKeys:Object.getOwnPropertySymbols?z6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:z6=function(t){return Object.getOwnPropertyNames(t)};function Zrt(e){console&&console.warn&&console.warn(e)}var Zie=Number.isNaN||function(t){return t!==t};function Tc(){Tc.init.call(this)}$q.exports=Tc;$q.exports.once=Jrt;Tc.EventEmitter=Tc;Tc.prototype._events=void 0;Tc.prototype._eventsCount=0;Tc.prototype._maxListeners=void 0;var Wie=10;function F6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Tc,"defaultMaxListeners",{enumerable:!0,get:function(){return Wie},set:function(e){if(typeof e!="number"||e<0||Zie(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Wie=e}});Tc.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};Tc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Zie(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 Xie(e){return e._maxListeners===void 0?Tc.defaultMaxListeners:e._maxListeners}Tc.prototype.getMaxListeners=function(){return Xie(this)};Tc.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")jie(l,this,r);else for(var u=l.length,c=Qie(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,Zrt(s)}return e}Tc.prototype.addListener=function(t,r){return Yie(this,t,r,!1)};Tc.prototype.on=Tc.prototype.addListener;Tc.prototype.prependListener=function(t,r){return Yie(this,t,r,!0)};function Xrt(){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 Kie(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Xrt.bind(n);return i.listener=r,n.wrapFn=i,i}Tc.prototype.once=function(t,r){return F6(r),this.on(t,Kie(this,t,r)),this};Tc.prototype.prependOnceListener=function(t,r){return F6(r),this.prependListener(t,Kie(this,t,r)),this};Tc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(F6(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():Yrt(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Tc.prototype.off=Tc.prototype.removeListener;Tc.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 Jie(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?Krt(i):Qie(i,i.length)}Tc.prototype.listeners=function(t){return Jie(this,t,!0)};Tc.prototype.rawListeners=function(t){return Jie(this,t,!1)};Tc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):$ie.call(e,t)};Tc.prototype.listenerCount=$ie;function $ie(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}Tc.prototype.eventNames=function(){return this._eventsCount>0?z6(this._events):[]};function Qie(e,t){for(var r=new Array(t),n=0;n{"use strict";var Qq=vb().EventEmitter,Qrt={init:function(e){if(e._ev instanceof Qq)return e;var t=new Qq,r=new Qq;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)},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 rne=Mr(),eit=ub().dfltConfig;function tit(e,t){for(var r=[],n,i=0;ieit.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};wy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};wy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};wy.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";ane.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var _3=ye(Bh=>{"use strict";var x0=ba(),HS=Mr(),O6=vl(),tO=s3(),rit=eO(),iit=zS(),nit=ub().configAttributes,one=Bu(),xg=HS.extendDeepAll,m3=HS.isPlainObject,ait=HS.isArrayOrTypedArray,B6=HS.nestedProperty,oit=HS.valObjectMeta,rO="_isSubplotObj",N6="_isLinkedToArray",sit="_arrayAttrRegexps",lne="_deprecated",iO=[rO,N6,sit,lne];Bh.IS_SUBPLOT_OBJ=rO;Bh.IS_LINKED_TO_ARRAY=N6;Bh.DEPRECATED=lne;Bh.UNDERSCORE_ATTRS=iO;Bh.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=uit(t)}),{defs:{valObjects:oit,metaKeys:iO.concat(["description","role","editType","impliedEdits"]),editType:{traces:one.traces,layout:one.layout},impliedEdits:{}},traces:e,layout:cit(),frames:fit(),animation:y3(iit),config:y3(nit)}};Bh.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(iO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!Bh.isValObject(o)&&m3(o)&&a!=="impliedEdits"&&Bh.crawl(o,t,i+1,s)}})};Bh.isValObject=function(e){return e&&e.valType!==void 0};Bh.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)ait(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(!q6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function q6(e){return e===Math.round(e)&&e>=0}function uit(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=xg({},O6),a=xg({},t.attributes);Bh.crawl(a,function(l,u,c,f,h){B6(i,h).set(void 0),l===void 0&&B6(a,h).set(void 0)}),xg(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,xg(n,a),r.attributes&&xg(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:y3(n)};if(t.layoutAttributes){var s={};xg(s,t.layoutAttributes),o.layoutAttributes=y3(s)}return t.animatable||Bh.crawl(o,function(l){Bh.isValObject(l)&&"anim"in l&&delete l.anim}),o}function cit(){var e={},t,r;xg(e,tO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var x3=Mr(),git=vl(),$1="templateitemname",nO={name:{valType:"string",editType:"none"}};nO[$1]={valType:"string",editType:"calc"};pb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=nO.name,t[$1]=nO[$1],t};pb.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=x3.coerce(a,{},git,"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}};pb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);x3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};pb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[fne(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(!cne(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?x3.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 x=f();for(var b in x)x3.nestedProperty(e,b).set(x[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var ad=ye((Etr,hne)=>{"use strict";var GS=n3().counter;hne.exports={idRegex:{x:GS("x","( domain)?"),y:GS("y","( domain)?")},attrRegex:GS("[xy]axis"),xAxisMatch:GS("xaxis"),yAxisMatch:GS("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 af=ye(Tp=>{"use strict";var mit=ba(),aO=ad();Tp.id2name=function(t){if(!(typeof t!="string"||!t.match(aO.AX_ID_PATTERN))){var r=t.split(" ")[0].substr(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Tp.name2id=function(t){if(t.match(aO.AX_NAME_PATTERN)){var r=t.substr(5);return r==="1"&&(r=""),t.charAt(0)+r}};Tp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(aO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Tp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Tp.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)};Tp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function dne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function yit(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function _it(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}vne.exports={clearOutlineControllers:yit,clearOutline:_it}});var U6=ye((Ltr,pne)=>{"use strict";pne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var kd=ye(H6=>{"use strict";var V6=ba(),Ptr=ad().SUBPLOT_PATTERN;H6.getSubplotCalcData=function(e,t,r){var n=V6.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var xit=ba(),b3=Mr();gb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=gb.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){gne(e,o,i.cache),i.check=function(){if(a){var c=gne(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;b3.isPlainObject(a)?oO(a,t,o,n+1):t(o,i,a)}})}});var Yu=ye((Rtr,Dne)=>{"use strict";var Mne=xa(),wit=e3().timeFormatLocale,Tit=dq().formatLocale,jS=uo(),Ait=vq(),bl=ba(),Ene=_3(),Sit=Vs(),Ca=Mr(),kne=va(),xne=es().BADNUM,Ap=af(),Mit=Q1().clearOutline,Eit=U6(),sO=zS(),kit=eO(),Cit=kd().getModuleCalcData,bne=Ca.relinkPrivateKeys,mb=Ca._,ha=Dne.exports={};Ca.extendFlat(ha,bl);ha.attributes=vl();ha.attributes.type.values=ha.allTypes;ha.fontAttrs=Su();ha.layoutAttributes=s3();var j6=_ne();ha.executeAPICommand=j6.executeAPICommand;ha.computeAPICommandBindings=j6.computeAPICommandBindings;ha.manageCommandObserver=j6.manageCommandObserver;ha.hasSimpleAPICommandBindings=j6.hasSimpleAPICommandBindings;ha.redrawText=function(e){return e=Ca.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(bl.getComponentMethod("annotations","draw")(e),bl.getComponentMethod("legend","draw")(e),bl.getComponentMethod("colorbar","draw")(e),t(ha.previousPromises(e)))},300)})};ha.resize=function(e){e=Ca.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ca.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||Ca.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,bl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};ha.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};ha.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ca.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:kne.defaultLine,"pointer-events":"all"}).each(function(){var u=Mne.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&&Lit(e,a),o.text(a.text()&&s.text()?" - ":"")}};function Lit(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(){ha.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})}}ha.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Mne.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=ha.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var Pit=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Iit=["year","month","dayMonth","dayMonthYear"];ha.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||ha.createTransitionData(e),i._dfltTitle={plot:mb(e,"Click to enter Plot title"),subtitle:mb(e,"Click to enter Plot subtitle"),x:mb(e,"Click to enter X axis title"),y:mb(e,"Click to enter Y axis title"),colorbar:mb(e,"Click to enter Colorscale title"),annotation:mb(e,"new text")},i._traceWord=mb(e,"trace");var h=wne(e,Pit);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;ha.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),ha.sanitizeMargins(i)}else{ha.supplyLayoutGlobalDefaults(a,i,h);var x=!a.width||!a.height,b=i.autosize,g=c.autosizable,E=x&&(b||g);E?ha.plotAutoSize(e,a,i):x&&ha.sanitizeMargins(i),!b&&x&&(a.width=i.width,a.height=i.height)}i._d3locale=zit(h,i.separators),i._extraFormat=wne(e,Iit),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var k=i._subplots=Rit(),A=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=Dit(o,l),ha.supplyDataDefaults(l,s,a,i);var _=Object.keys(A.x),C=Object.keys(A.y);if(_.length>1&&C.length>1){for(bl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f<_.length;f++)Ca.pushUnique(k.xaxis,_[f]);for(f=0;f15&&C.length>15&&i.shapes.length===0&&i.images.length===0,ha.linkSubplots(s,i,o,n),ha.cleanPlot(s,i,o,n);var F=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),V=F,H=q;V&&!H?n._bgLayer.remove():H&&!V&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&Mit({_fullLayout:n}),Fit(s,i),bne(i,n),bl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var X=i._tracePreGUI,G={},N;for(N in X)G[N]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=ha.layoutAttributes.width.min,h=ha.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}),ha.sanitizeMargins(n)};ha.supplyLayoutModuleDefaults=function(e,t,r,n){var i=bl.componentsRegistry,a=t._basePlotModules,o,s,l,u=bl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(bl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ca.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var g=(r.t+r.b)/h;g>1&&(r.t/=g,r.b/=g)}var E=r.xl!==void 0?r.xl:r.x,k=r.xr!==void 0?r.xr:r.x,A=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:E,size:r.l+x},r:{val:k,size:r.r+x},b:{val:L,size:r.b+x},t:{val:A,size:r.t+x}},v[t]=1}if(!n._replotting)return ha.doAutoMargin(e)}};function Oit(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Ap.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}ha.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Cne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ca.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,x=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var g=e._fullLayout._reservedMargin;for(var E in g)for(var k in g[E]){var A=g[E][k];o[k]=Math.max(o[k],A)}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 _=0;for(var C in h)C!=="base"&&jS(h[C][L].size)&&(_=h[C][L].size>_?h[C][L].size:_);var M=Math.max(0,a[L]-_);o[L]=Math.max(0,o[L]-M)}for(var p in h){var P=h[p].l||{},T=h[p].b||{},F=P.val,q=P.size,V=T.val,H=T.size,X=r-o.r-o.l,G=n-o.t-o.b;for(var N in h){if(jS(q)&&h[N].r){var W=h[N].r.val,re=h[N].r.size;if(W>F){var ae=(q*W+(re-X)*F)/(W-F),_e=(re*(1-F)+(q-X)*(1-W))/(W-F);ae+_e>l+u&&(l=ae,u=_e)}}if(jS(H)&&h[N].t){var Me=h[N].t.val,ke=h[N].t.size;if(Me>V){var ge=(H*Me+(ke-G)*V)/(Me-V),ie=(ke*(1-V)+(H-G)*(1-Me))/(Me-V);ge+ie>f+c&&(f=ge,c=ie)}}}}}var Te=Ca.constrain(r-a.l-a.r,Lne,v),Ee=Ca.constrain(n-a.t-a.b,Pne,x),Ae=Math.max(0,r-Te),ze=Math.max(0,n-Ee);if(Ae){var Ce=(l+u)/Ae;Ce>1&&(l/=Ce,u/=Ce)}if(ze){var me=(f+c)/ze;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(ha.didMarginChange(s,i)||Oit(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var De=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};ha.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&ha.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(Ca.isPlainObject(h)){var v={},x;return Object.keys(h).sort().forEach(function(k){if(["_","["].indexOf(k.charAt(0))===-1){if(typeof h[k]=="function"){d&&(v[k]="_function");return}if(r==="keepdata"){if(k.substr(k.length-3)==="src")return}else if(r==="keepstream"){if(x=h[k+"src"],typeof x=="string"&&x.indexOf(":")>0&&!Ca.isPlainObject(h.stream))return}else if(r!=="keepall"&&(x=h[k+"src"],typeof x=="string"&&x.indexOf(":")>0))return;v[k]=u(h[k],d)}}),v}var b=Array.isArray(h),g=Ca.isTypedArray(h);if((b||g)&&h.dtype&&h.shape){var E=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ca.isArrayBuffer(E)?Ait.encode(E):E},d)}return b?h.map(function(k){return u(k,d)}):g?Ca.simpleMap(h,Ca.identity):Ca.isJSDate(h)?Ca.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)};ha.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 bl.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 bl.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=[ha.previousPromises,l,r.prepareFn,ha.rehover,ha.reselect,o],c=Ca.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}ha.doCalcdata=function(e,t){var r=Ap.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&&(A=o.calc(e,a))}(!Array.isArray(A)||!A[0])&&(A=[{x:xne,y:xne}]),A[0].t||(A[0].t={}),A[0].trace=a,u[E]=A}}for(Ane(r,n,i),s=0;s{"use strict";yb.xmlns="http://www.w3.org/2000/xmlns/";yb.svg="http://www.w3.org/2000/svg";yb.xlink="http://www.w3.org/1999/xlink";yb.svgAttrs={xmlns:yb.svg,"xmlns:xlink":yb.xlink}});var Nh=ye((Ftr,Rne)=>{"use strict";Rne.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 Ll=ye(b0=>{"use strict";var vh=xa(),Ty=Mr(),Vit=Ty.strTranslate,lO=Zp(),Hit=Nh().LINE_SPACING,Git=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Git),a=vh.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=int(e.node(),n);l&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};Xit(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 x=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,g=d.height;v.attr({class:o,height:g,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var E=e.node().style.fill||"black",k=v.select("g");k.attr({fill:E,stroke:E});var A=k.node().getBoundingClientRect(),L=A.width,_=A.height;(L>b||_>g)&&(v.style("overflow","hidden"),A=v.node().getBoundingClientRect(),L=A.width,_=A.height);var C=+e.attr("x"),M=+e.attr("y"),p=u||e.node().getBoundingClientRect().height,P=-p/4;if(o[0]==="y")x.attr({transform:"rotate("+[-90,C,M]+")"+Vit(-L/2,P-_/2)});else if(o[0]==="l")M=P-_/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-_/2}v.attr({x:C,y:M}),r&&r.call(e,x),l(x)})})):s(),e};var jit=/(<|<|<)/g,Wit=/(>|>|>)/g;function Zit(e){return e.replace(jit,"\\lt ").replace(Wit,"\\gt ")}var zne=[["$","$"],["\\(","\\)"]];function Xit(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Ty.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Ty.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:zne},displayAlign:"left"})},u=function(){a=Ty.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=zne},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 E="math-output-"+Ty.randstr({},64);s=vh.select("body").append("div").attr({id:E}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Zit(e));var k=s.node();return n===2?MathJax.Hub.Typeset(k):MathJax.typeset([k])},d=function(){var E=s.select(n===2?".MathJax_SVG":".MathJax"),k=!E.empty()&&s.select("svg").node();if(!k)Ty.log("There was an error in the tex syntax.",e),r();else{var A=k.getBoundingClientRect(),L;n===2?L=vh.select("body").select("#MathJax_SVG_glyphs"):L=E.select("defs"),r(E,L,A)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},x=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},g=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(),x(),g()}))}var Bne={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"},Yit={sub:"0.3em",sup:"-0.6em"},Kit={sub:"-0.21em",sup:"0.42em"},Fne="\u200B",qne=["http:","https:","mailto:","",void 0,":"],Nne=b0.NEWLINES=/(\r\n?|\n)/g,cO=/(<[^<>]*>)/,fO=/<(\/?)([^ >]*)(\s+(.*))?>/i,Jit=//i;b0.BR_TAG_ALL=//gi;var Une=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,Vne=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,Hne=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,$it=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function _b(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&W6(n)}var Qit=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(cO),s=[],l="",u=0,c=0;ca?s.push(f.substr(0,x-a)+i):s.push(f.substr(0,x));break}l=""}}return s.join("")};var ent={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},tnt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function W6(e){return e.replace(tnt,function(t,r){var n;return r.charAt(0)==="#"?n=rnt(r.charAt(1)==="x"?parseInt(r.substr(2),16):parseInt(r.substr(1),10)):n=ent[r],n||t})}b0.convertEntities=W6;function rnt(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 int(e,t){t=t.replace(Nne," ");var r=!1,n=[],i,a=-1;function o(){a++;var _=document.createElementNS(lO.svg,"tspan");vh.select(_).attr({class:"line",dy:a*Hit+"em"}),e.appendChild(_),i=_;var C=n;if(n=[{node:_}],C.length>1)for(var M=1;M.",t);return}var C=n.pop();_!==C.type&&Ty.log("Start tag <"+C.type+"> doesnt match end tag <"+_+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Jit.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(cO),h=0;h{"use strict";var nnt=xa(),X6=id(),ZS=uo(),Z6=Mr(),jne=va(),ant=sb().isValid;function ont(e,t,r){var n=t?Z6.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(Z6.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function Jne(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 Qne=Iq(),lnt=Qne.FORMAT_LINK,unt=Qne.DATE_FORMAT_LINK;function cnt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?hO:eae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function hO(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: "+lnt+"."].join(" ")}function eae(e,t){return hO(e,t)+[" And for dates see: "+unt+".","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(" ")}tae.exports={axisHoverFormat:cnt,descriptionOnlyNumbers:hO,descriptionWithDates:eae}});var Cd=ye((Ntr,yae)=>{"use strict";var rae=Su(),w3=dh(),mae=Ed().dash,vO=no().extendFlat,iae=Vs().templatedArray,nae=Oc().descriptionWithDates,fnt=es().ONEDAY,pm=ad(),hnt=pm.HOUR_PATTERN,dnt=pm.WEEKDAY_PATTERN,dO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},vnt=vO({},dO,{values:dO.values.slice().concat(["sync"])});function aae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var oae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},sae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},lae={valType:"data_array",editType:"ticks"},uae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function cae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function fae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var hae={valType:"color",dflt:w3.defaultLine,editType:"ticks"},dae={valType:"color",dflt:w3.lightLine,editType:"ticks"};function vae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var pae=vO({},mae,{editType:"ticks"}),gae={valType:"boolean",editType:"ticks"};yae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:rae({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"},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:iae("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:[dnt,hnt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:fnt},editType:"calc"}),tickmode:vnt,nticks:aae(),tick0:oae,dtick:sae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:lae,ticktext:{valType:"data_array",editType:"ticks"},ticks:uae,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:cae(),tickwidth:fae(),tickcolor:hae,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:vO({},mae,{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:rae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:nae("tick label")},tickformatstops:iae("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:nae("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:gae,gridcolor:dae,gridwidth:vae(),griddash:pae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w3.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:w3.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:dO,nticks:aae("minor"),tick0:oae,dtick:sae,tickvals:lae,ticks:uae,ticklen:cae("minor"),tickwidth:fae("minor"),tickcolor:hae,gridcolor:dae,gridwidth:vae("minor"),griddash:pae,showgrid:gae,editType:"ticks"},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 Y6=ye((Utr,bae)=>{"use strict";var Ac=Cd(),_ae=Su(),xae=no().extendFlat,pnt=Bu().overrideAll;bae.exports=pnt({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:Ac.linecolor,outlinewidth:Ac.linewidth,bordercolor:Ac.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Ac.minor.tickmode,nticks:Ac.nticks,tick0:Ac.tick0,dtick:Ac.dtick,tickvals:Ac.tickvals,ticktext:Ac.ticktext,ticks:xae({},Ac.ticks,{dflt:""}),ticklabeloverflow:xae({},Ac.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:Ac.ticklen,tickwidth:Ac.tickwidth,tickcolor:Ac.tickcolor,ticklabelstep:Ac.ticklabelstep,showticklabels:Ac.showticklabels,labelalias:Ac.labelalias,tickfont:_ae({}),tickangle:Ac.tickangle,tickformat:Ac.tickformat,tickformatstops:Ac.tickformatstops,tickprefix:Ac.tickprefix,showtickprefix:Ac.showtickprefix,ticksuffix:Ac.ticksuffix,showticksuffix:Ac.showticksuffix,separatethousands:Ac.separatethousands,exponentformat:Ac.exponentformat,minexponent:Ac.minexponent,showexponent:Ac.showexponent,title:{text:{valType:"string"},font:_ae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Kl=ye((Htr,Tae)=>{"use strict";var gnt=Y6(),mnt=n3().counter,ynt=X1(),wae=sb().scales,Vtr=ynt(wae);function K6(e){return"`"+e+"`"}Tae.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"?wae[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 "+K6(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",x=n+"max",b=n+"mid",g=K6(u+d),E=K6(u+v),k=K6(u+x),A=E+" and "+k,L={};L[v]=L[x]=void 0;var _={};_[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:_},C[x]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},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=gnt),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:mnt("coloraxis"),dflt:null,editType:"calc"}),C}});var gO=ye((Gtr,Aae)=>{"use strict";var _nt=no().extendFlat,xnt=Kl(),pO=sb().scales;Aae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:pO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:pO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:pO.RdBu,editType:"calc"}},coloraxis:_nt({_isSubplotObj:!0,editType:"calc"},xnt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var mO=ye((jtr,Sae)=>{"use strict";var bnt=Mr();Sae.exports=function(t){return bnt.isPlainObject(t.colorbar)}});var xO=ye(_O=>{"use strict";var yO=uo(),Mae=Mr(),Eae=es(),wnt=Eae.ONEDAY,Tnt=Eae.ONEWEEK;_O.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?wnt:1;if(!e)return a;if(yO(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.substr(1);return s=yO(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};_O.tick0=function(e,t,r,n){if(t==="date")return Mae.cleanDate(e,Mae.dateTick0(r,n%Tnt===0?1:0));if(!(n==="D1"||n==="D2"))return yO(e)?Number(e):0}});var xb=ye((Ztr,Cae)=>{"use strict";var kae=xO(),Ant=Mr().isArrayOrTypedArray,Snt=vv().isTypedArraySpec,Mnt=vv().decodeTypedArraySpec;Cae.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(E){var k=s[E];return Snt(k)&&(k=Mnt(k)),k!==void 0?k:(l._template||{})[E]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=Ant(d)?"array":h?"linear":"auto",x=n(u+"tickmode",v);if(x==="auto"||x==="sync")n(u+"nticks");else if(x==="linear"){var b=l.dtick=kae.dtick(h,i);l.tick0=kae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var g=n(u+"tickvals");g===void 0?l.tickmode="auto":o||n("ticktext")}}});var T3=ye((Xtr,Pae)=>{"use strict";var bO=Mr(),Lae=Cd();Pae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Lae.minor:Lae,u=a?"minor.":"",c=bO.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=bO.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=bO.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 wO=ye((Ytr,Iae)=>{"use strict";Iae.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Zd=ye((Ktr,Dae)=>{"use strict";var J6=Mr(),Ent=Vs();Dae.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=J6.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=Ent.arrayTemplater(r,i,a),c,f;for(c=0;c{"use strict";var TO=Mr(),knt=va().contrast,Rae=Cd(),Cnt=wO(),Lnt=Zd();zae.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");TO.isPlainObject(o)||delete r.labelalias;var s=Cnt(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?knt(a.bgColor):c&&c!==Rae.color.dflt?c:u.color;if(TO.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");Lnt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Pnt}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}}};function Pnt(e,t){function r(i,a){return TO.coerce(e,t,Rae.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var t_=ye(($tr,Fae)=>{"use strict";var Int=wO();Fae.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=Int(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var AO=ye((Qtr,qae)=>{"use strict";var r_=Mr(),Dnt=Vs(),Rnt=xb(),znt=T3(),Fnt=e_(),qnt=t_(),Ont=Y6();qae.exports=function(t,r,n){var i=Dnt.newContainer(r,"colorbar"),a=t.colorbar||{};function o(T,F){return r_.coerce(a,i,Ont,T,F)}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"),x=o("xref"),b=v==="paper",g=x==="paper",E,k,A,L="left";f?(A="middle",L=g?"left":"right",E=g?1.02:1,k=.5):(A=b?"bottom":"top",L="center",E=.5,k=b?1.02:1),r_.coerce(a,i,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:E}},"x"),r_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:k}},"y"),o("xanchor",L),o("xpad"),o("yanchor",A),o("ypad"),r_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var _=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",_.indexOf("inside")!==-1?"hide past domain":"hide past div"),Rnt(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};_.indexOf("inside")!==-1&&(M.bgColor="black"),qnt(a,i,o,"linear",M),Fnt(a,i,o,"linear",M),znt(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var p=i.showticklabels?i.tickfont:C,P=r_.extendFlat({},C,{family:p.family,size:r_.bigFont(p.size)});r_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var Uh=ye((err,Nae)=>{"use strict";var Oae=uo(),MO=Mr(),Bnt=mO(),Nnt=AO(),Bae=sb().isValid,Unt=ba().traceIs;function SO(e,t){var r=t.slice(0,t.length-1);return t?MO.nestedProperty(e,r).get()||{}:e}Nae.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=SO(t,o),c=SO(r,o),f=SO(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 x=Unt(r,"contour")&&MO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==x&&(b[0]=!1,MO.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[x,r,[h]];return}}var g=u[s+"min"],E=u[s+"max"],k=Oae(g)&&Oae(E)&&g{"use strict";var Uae=Mr(),Vnt=Vs(),Vae=gO(),Hnt=Uh();Hae.exports=function(t,r){function n(f,h){return Uae.coerce(t,r,Vae,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return Uae.coerce(a,o,Vae.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Vnt.newContainer(r,l,"coloraxis"),o._name=l,Hnt(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Gnt=Mr(),jnt=Rv().hasColorscale,Wnt=Rv().extractOpts;jae.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?Gnt.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Wnt(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 Zae=uo(),EO=Mr(),Znt=Rv().extractOpts;Xae.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?EO.nestedProperty(r,o).get():r,l=Znt(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return EO.aggNums(Math.min,null,a)},v=function(){return EO.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&Zae(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&Zae(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?x=i.colorscale.sequential:x=i.colorscale.sequentialminus,l._sync("colorscale",x)}}});var Mu=ye((nrr,Yae)=>{"use strict";var $6=sb(),A3=Rv();Yae.exports={moduleType:"component",name:"colorscale",attributes:Kl(),layoutAttributes:gO(),supplyLayoutDefaults:Gae(),handleDefaults:Uh(),crossTraceDefaults:Wae(),calc:zv(),scales:$6.scales,defaultScale:$6.defaultScale,getScale:$6.get,isValidScale:$6.isValid,hasColorscale:A3.hasColorscale,extractOpts:A3.extractOpts,extractScale:A3.extractScale,flipScale:A3.flipScale,makeColorScaleFunc:A3.makeColorScaleFunc,makeColorScaleFuncFromTrace:A3.makeColorScaleFuncFromTrace}});var lu=ye((arr,Jae)=>{"use strict";var Kae=Mr(),Xnt=vv().isTypedArraySpec;Jae.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 Kae.isPlainObject(t)&&(Kae.isArrayOrTypedArray(t.size)||Xnt(t.size))}}});var S3=ye((orr,$ae)=>{"use strict";var Ynt=uo();$ae.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 Ynt(l)&&l>0?Math.max(l,a):0}}});var rp=ye(pv=>{"use strict";var Qae=Mr();pv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};pv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{roe.exports=eat;var kO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Qnt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function eat(e){var t=[];return e.replace(Qnt,function(r,n,i){var a=n.toLowerCase();for(i=rat(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==kO[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var iat=XS(),Yn=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},ts="M0,0Z",ioe=Math.sqrt(2),i_=Math.sqrt(3),CO=Math.PI,LO=Math.cos,PO=Math.sin;loe.exports={circle:{n:0,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?is(t,r,i):i}},square:{n:1,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*1.3,2);return is(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.4,2),i=Yn(e*1.2,2);return is(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(rs(t))return ts;var n=Yn(e*.8/ioe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return is(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(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2/i_,2),i=Yn(e/2,2),a=Yn(e,2);return is(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.6,2),i=Yn(e*1.2,2);return is(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*.951,2),i=Yn(e*.588,2),a=Yn(-e,2),o=Yn(e*-.309,2),s=Yn(e*.809,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e/2,2),a=Yn(e*i_/2,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e/2,2),a=Yn(e*i_/2,2);return is(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(rs(t))return ts;var n=Yn(e*.924,2),i=Yn(e*.383,2);return is(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(rs(t))return ts;var n=e*1.4,i=Yn(n*.225,2),a=Yn(n*.951,2),o=Yn(n*.363,2),s=Yn(n*.588,2),l=Yn(-n,2),u=Yn(n*-.309,2),c=Yn(n*.118,2),f=Yn(n*.809,2),h=Yn(n*.382,2);return is(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(rs(t))return ts;var n=Yn(e*.66,2),i=Yn(e*.38,2),a=Yn(e*.76,2);return is(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(rs(t))return ts;var n=Yn(e*i_*.8,2),i=Yn(e*.8,2),a=Yn(e*1.6,2),o=Yn(e*4,2),s="A "+o+","+o+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*i_*.8,2),i=Yn(e*.8,2),a=Yn(e*1.6,2),o=Yn(e*4,2),s="A "+o+","+o+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*1.1,2),i=Yn(e*2,2),a="A "+i+","+i+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*1.4,2),i=Yn(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return is(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(rs(t))return ts;var n=Yn(e*.7,2),i=Yn(e*1.4,2);return is(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*1.4,2),i=Yn(e*.7,2);return is(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e/ioe,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*1.3,2);return is(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(rs(t))return ts;var n=Yn(e*1.3,2),i=Yn(e*.65,2);return is(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(rs(t))return ts;var n=Yn(e*1.4,2);return is(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(rs(t))return ts;var n=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*.85,2);return is(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(rs(t))return ts;var n=Yn(e/2,2),i=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.2,2),i=Yn(e*1.6,2),a=Yn(e*.8,2);return is(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(rs(t))return ts;var n=Yn(e*1.4,2);return is(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*1.4,2);return is(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2);return is(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(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(rs(t))return ts;var n=Yn(e,2),i=Yn(e*2,2);return is(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(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(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(rs(t))return ts;var n=Yn(e*2,2),i=Yn(e,2);return is(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(rs(t))return ts;var n=CO/2.5,i=2*e*LO(n),a=2*e*PO(n);return is(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(rs(t))return ts;var n=CO/4,i=2*e*LO(n),a=2*e*PO(n);return is(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function rs(e){return e===null}var noe,aoe,ooe,soe;function is(e,t,r){if((!e||e%360===0)&&!t)return r;if(ooe===e&&soe===t&&noe===r)return aoe;ooe=e,soe=t,noe=r;function n(b,g){var E=LO(b),k=PO(b),A=g[0],L=g[1]+(t||0);return[A*E-L*k,A*k+L*E]}for(var i=e/180*CO,a=0,o=0,s=iat(r),l="",u=0;u{"use strict";var od=xa(),du=Mr(),nat=du.numberFormat,Ab=uo(),qO=id(),eL=ba(),Xd=va(),aat=Mu(),KS=du.strTranslate,tL=Ll(),oat=Zp(),sat=Nh(),lat=sat.LINE_SPACING,_oe=N1().DESELECTDIM,uat=lu(),cat=S3(),fat=rp().appendArrayPointValue,na=Coe.exports={};na.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(Xd.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",IO(dat(c))),l&&e.style("text-shadow",l==="auto"?tL.makeTextShadow(Xd.contrast(a)):IO(l)),u&&e.style("text-decoration-line",IO(vat(u)))};function IO(e){return e==="none"?void 0:e}var hat={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function dat(e){return hat[e]}function vat(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}na.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};na.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};na.setRect=function(e,t,r,n,i){e.call(na.setPosition,t,r).call(na.setSize,n,i)};na.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Ab(i)&&Ab(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",KS(i,a));else return!1;return!0};na.translatePoints=function(e,t,r){e.each(function(n){var i=od.select(this);na.translatePoint(n,i,t,r)})};na.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};na.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=eL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){na.hideOutsideRangePoint(u,od.select(this),r,n,o,s)})})}};na.crispRound=function(e,t,r){return!t||!Ab(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};na.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||"";Xd.stroke(t,n||a.color),na.dashLine(t,s,o)};na.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||"";od.select(this).call(Xd.stroke,r||a.color).call(na.dashLine,s,o)})};na.dashLine=function(e,t,r){r=+r||0,t=na.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};na.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 xoe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=i&&na.getPatternAttr(i.shape,0,"");if(o){var s=na.getPatternAttr(i.bgcolor,0,null),l=na.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,c=na.getPatternAttr(i.size,0,8),f=na.getPatternAttr(i.solidity,0,.3),h=t.uid;na.pattern(e,"point",r,h,o,c,f,void 0,i.fillmode,s,l,u)}else if(a&&a.type!=="none"){var d=a.type,v="scatterfill-"+t.uid;if(n&&(v="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var x,b;d==="horizontal"?(x={x:a.start,y:0},b={x:a.stop,y:0}):d==="vertical"&&(x={x:0,y:a.start},b={x:0,y:a.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.max[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.max[0].val:b.y,!0),e.call(Toe,r,v,"linear",a.colorscale,"fill",x,b,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(na.gradient,r,v,d,a.colorscale,"fill")}else t.fillcolor&&e.call(Xd.fill,t.fillcolor)}na.singleFillStyle=function(e,t){var r=od.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};xoe(e,i,t,!1)};na.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=od.select(this);n[0].trace&&xoe(i,n[0].trace,t,r)})};var coe=uoe();na.symbolNames=[];na.symbolFuncs=[];na.symbolBackOffs=[];na.symbolNeedLines={};na.symbolNoDot={};na.symbolNoFill={};na.symbolList=[];Object.keys(coe).forEach(function(e){var t=coe[e],r=t.n;na.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),na.symbolNames[r]=e,na.symbolFuncs[r]=t.f,na.symbolBackOffs[r]=t.backoff||0,t.needLine&&(na.symbolNeedLines[r]=!0),t.noDot?na.symbolNoDot[r]=!0:na.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(na.symbolNoFill[r]=!0)});var pat=na.symbolNames.length,gat="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";na.symbolNumber=function(e){if(Ab(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=na.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=pat||e>=400?0:Math.floor(Math.max(e,0))};function boe(e,t,r,n){var i=e%100;return na.symbolFuncs[i](t,r,n)+(e>=200?gat:"")}var foe=nat("~f"),woe={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}};na.gradient=function(e,t,r,n,i,a){var o=woe[n];return Toe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Toe(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=na.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=NO(e,r),f=BO(e,r);t.attr("d",boe(u,l,c,f))}var h=!1,d,v,x;if(e.so)x=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;x=(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=Xd.defaultLine:v=s.color,du.isArrayOrTypedArray(o.color)&&(d=Xd.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(Xd.stroke,d).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var g=o.gradient,E=e.mgt;E?h=!0:E=g&&g.type,du.isArrayOrTypedArray(E)&&(E=E[0],woe[E]||(E=0));var k=o.pattern,A=k&&na.getPatternAttr(k.shape,e.i,"");if(E&&E!=="none"){var L=e.mgc;L?h=!0:L=g.color;var _=r.uid;h&&(_+="-"+e.i),na.gradient(t,i,_,E,[[0,L],[1,d]],"fill")}else if(A){var C=!1,M=k.fgcolor;!M&&a&&a.color&&(M=a.color,C=!0);var p=na.getPatternAttr(M,e.i,a&&a.color||null),P=na.getPatternAttr(k.bgcolor,e.i,null),T=k.fgopacity,F=na.getPatternAttr(k.size,e.i,8),q=na.getPatternAttr(k.solidity,e.i,.3);C=C||e.mcc||du.isArrayOrTypedArray(k.shape)||du.isArrayOrTypedArray(k.bgcolor)||du.isArrayOrTypedArray(k.fgcolor)||du.isArrayOrTypedArray(k.size)||du.isArrayOrTypedArray(k.solidity);var V=r.uid;C&&(V+="-"+e.i),na.pattern(t,"point",i,V,A,F,q,e.mcc,k.fillmode,P,p,T)}else du.isArrayOrTypedArray(d)?Xd.fill(t,d[e.i]):Xd.fill(t,d);x&&Xd.stroke(t,v)}};na.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=na.tryColorscale(r,""),t.lineScale=na.tryColorscale(r,"line"),eL.traceIs(e,"symbols")&&(t.ms2mrc=uat.isBubble(e)?cat(e):function(){return(r.size||6)/2}),e.selectedpoints&&du.extendFlat(t,na.makeSelectedPointStyleFns(e)),t};na.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(A){var L=A.mo===void 0?i.opacity:A.mo;return A.selected?c?l:L:f?u:_oe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(A){var L=A.mcc||h;return A.selected?d||L:v||L});var x=i.size,b=a.size,g=o.size,E=b!==void 0,k=g!==void 0;return eL.traceIs(e,"symbols")&&(E||k)&&(t.selectedSizeFn=function(A){var L=A.mrc||x/2;return A.selected?E?b/2:L:k?g/2:L}),t};na.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:Xd.addOpacity(f,_oe))},t};na.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=na.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){Xd.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",boe(na.symbolNumber(s),l,NO(o,t),BO(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=od.select(this),s=0;s0?r:0}na.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=na.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=od.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={};fat(h,t,s.i);var d=t._meta||{};u=du.texttemplateString(u,f,o._d3locale,h,s,d)}var v=s.tp||t.textposition,x=Soe(s,t),b=n?n(s):s.tc||t.textfont.color;l.call(na.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:x,color:b}).text(u).call(tL.convertToTspans,r).call(Aoe,v,x,s.mrc)})}};na.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=na.makeSelectedTextStyleFns(t);e.each(function(n){var i=od.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Soe(n,t);Xd.fill(i,a);var l=eL.traceIs(t,"bar-like");Aoe(i,o,s,n.mrc2||n.mrc,l)})}};var hoe=.5;na.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||A>=c&&A<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[A,L])}return e}na.applyBackoff=koe;na.makeTester=function(){var e=du.ensureSingleById(od.select("body"),"svg","js-plotly-tester",function(r){r.attr(oat.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"})});na.tester=e,na.testref=t};na.savedBBoxes={};var RO=0,_at=1e4;na.bBox=function(e,t,r){r||(r=doe(e));var n;if(r){if(n=na.savedBBoxes[r],n)return du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=doe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=na.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=na.savedBBoxes[r],n)return du.extendFlat({},n)}}var u,c;t?u=e:(c=na.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),od.select(u).attr("transform",null).call(tL.positionText,0,0);var f=u.getBoundingClientRect(),h=na.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 RO>=_at&&(na.savedBBoxes={},RO=0),r&&(na.savedBBoxes[r]=d),RO++,du.extendFlat({},d)};function doe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}na.setClipUrl=function(e,t,r){e.attr("clip-path",OO(t,r))};function OO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}na.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}};na.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+=KS(t,r),o=o.trim(),e[a]("transform",o),o};na.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}};na.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 xat=/\s*sc.*/;na.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(xat,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var bat=/translate\([^)]*\)\s*$/;na.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=od.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(bat);t===1&&r===1?n=[]:n=[KS(o,s),"scale("+t+","+r+")",KS(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function BO(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}na.getMarkerStandoff=BO;var YS=Math.atan2,bb=Math.cos,E3=Math.sin;function voe(e,t){var r=t[0],n=t[1];return[r*bb(e)-n*E3(e),r*E3(e)+n*bb(e)]}var poe,goe,moe,yoe,zO,FO;function NO(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=YS(h[1]-i,h[0]-n),v=YS(f[1]-i,f[0]-n),x;if(a==="north")x=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,g=c/180*Math.PI,E=poe/180*Math.PI,k=goe/180*Math.PI,A=E-b,L=bb(k)*E3(A),_=E3(k)*bb(g)-bb(k)*E3(g)*bb(A);x=-YS(L,_)-Math.PI,poe=u,goe=c}var C=voe(d,[bb(x),0]),M=voe(v,[E3(x),0]);r=YS(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(FO===t.uid&&e.i===zO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(FO===t.uid&&e.i===zO+1&&Ab(n)&&Ab(i)){var p=n-moe,P=i-yoe,T=t.line&&t.line.shape||"",F=T.slice(T.length-1);F==="h"&&(P=0),F==="v"&&(p=0),r+=YS(P,p)/Math.PI*180+90}else r=null}return moe=n,yoe=i,zO=e.i,FO=t.uid,r}na.getMarkerAngle=NO});var Mb=ye((frr,Doe)=>{"use strict";var k3=xa(),wat=uo(),Tat=Yu(),UO=ba(),Sb=Mr(),Loe=Sb.strTranslate,rL=ao(),iL=va(),C3=Ll(),Poe=N1(),Aat=Nh().OPPOSITE_SIDE,Ioe=/ [XY][0-9]* /,VO=1.6,HO=1.6;function Sat(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(),x=!1,b=d&&d.font?d.font:{},g=b.family,E=b.size,k=b.color,A=b.weight,L=b.style,_=b.variant,C=b.textcase,M=b.lineposition,p=b.shadow,P=r.subtitlePropName,T=!!P,F=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},V=q.text.trim(),H=!1,X=1,G=q.font,N=G.family,W=G.size,re=G.color,ae=G.weight,_e=G.style,Me=G.variant,ke=G.textcase,ge=G.lineposition,ie=G.shadow,Te;a==="title.text"?Te="titleText":a.indexOf("axis")!==-1?Te="axisTitleText":a.indexOf("colorbar"!==-1)&&(Te="colorbarTitleText");var Ee=e._context.edits[Te];function Ae(kt,Ct){return kt===void 0||Ct===void 0?!1:kt.replace(Ioe," % ")===Ct.replace(Ioe," % ")}v===""?h=0:Ae(v,o)&&(Ee||(v=""),h=.2,x=!0),T&&(V===""?X=0:Ae(V,F)&&(Ee||(V=""),X=.2,H=!0)),r._meta?v=Sb.templateString(v,r._meta):n._meta&&(v=Sb.templateString(v,n._meta));var ze=v||V||Ee,Ce;f||(f=Sb.ensureSingle(n._infolayer,"g","g-"+t),Ce=n._hColorbarMoveTitle);var me=f.selectAll("text."+t).data(ze?[0]:[]);me.enter().append("text"),me.text(v).attr("class",t),me.exit().remove();var De=null,ce=t+"-subtitle",Ge=V||Ee;if(T&&Ge&&(De=f.selectAll("text."+ce).data(Ge?[0]:[]),De.enter().append("text"),De.text(V).attr("class",ce),De.exit().remove()),!ze)return f;function nt(kt,Ct){Sb.syncOrAsync([ct,qt],{title:kt,subtitle:Ct})}function ct(kt){var Ct=kt.title,Yt=kt.subtitle,xr;!c&&Ce&&(c={}),c?(xr="",c.rotate&&(xr+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Ce)&&(xr+=Loe(0,(c.offset||0)-(Ce||0)))):xr=null,Ct.attr("transform",xr);function er(Et){if(Et){var dt=k3.select(Et.node().parentNode).select("."+ce);if(!dt.empty()){var Ht=Et.node().getBBox();if(Ht.height){var $t=Ht.y+Ht.height+VO*W;dt.attr("y",$t)}}}}if(Ct.style("opacity",h*iL.opacity(k)).call(rL.font,{color:iL.rgb(k),size:k3.round(E,2),family:g,weight:A,style:L,variant:_,textcase:C,shadow:p,lineposition:M}).attr(u).call(C3.convertToTspans,e,er),Yt){var Ke=f.select("."+t+"-math-group"),xt=Ct.node().getBBox(),bt=Ke.node()?Ke.node().getBBox():void 0,Lt=bt?bt.y+bt.height+VO*W:xt.y+xt.height+HO*W,St=Sb.extendFlat({},u,{y:Lt});Yt.attr("transform",xr),Yt.style("opacity",X*iL.opacity(re)).call(rL.font,{color:iL.rgb(re),size:k3.round(W,2),family:N,weight:ae,style:_e,variant:Me,textcase:ke,shadow:ie,lineposition:ge}).attr(St).call(C3.convertToTspans,e)}return Tat.previousPromises(e)}function qt(kt){var Ct=kt.title,Yt=k3.select(Ct.node().parentNode);if(l&&l.selection&&l.side&&v){Yt.attr("transform",null);var xr=Aat[l.side],er=l.side==="left"||l.side==="top"?-1:1,Ke=wat(l.pad)?l.pad:2,xt=rL.bBox(Yt.node()),bt={t:0,b:0,l:0,r:0},Lt=e._fullLayout._reservedMargin;for(var St in Lt)for(var Et in Lt[St]){var dt=Lt[St][Et];bt[Et]=Math.max(bt[Et],dt)}var Ht={left:bt.l,top:bt.t,right:n.width-bt.r,bottom:n.height-bt.b},$t=l.maxShift||er*(Ht[l.side]-xt[l.side]),fr=0;if($t<0)fr=$t;else{var _r=l.offsetLeft||0,Br=l.offsetTop||0;xt.left-=_r,xt.right-=_r,xt.top-=Br,xt.bottom-=Br,l.selection.each(function(){var Nr=rL.bBox(this);Sb.bBoxIntersect(xt,Nr,Ke)&&(fr=Math.max(fr,er*(Nr[l.side]-xt[xr])+Ke))}),fr=Math.min($t,fr),i._titleScoot=Math.abs(fr)}if(fr>0||$t<0){var Or={left:[-fr,0],right:[fr,0],top:[0,-fr],bottom:[0,fr]}[l.side];Yt.attr("transform",Loe(Or[0],Or[1]))}}}me.call(nt,De);function rt(kt,Ct){kt.text(Ct).on("mouseover.opacity",function(){k3.select(this).transition().duration(Poe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k3.select(this).transition().duration(Poe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(v?me.on(".opacity",null):(rt(me,o),x=!0),me.call(C3.makeEditable,{gd:e}).on("edit",function(kt){s!==void 0?UO.call("_guiRestyle",e,a,kt,s):UO.call("_guiRelayout",e,a,kt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(nt)}).on("input",function(kt){this.text(kt||" ").call(C3.positionText,u.x,u.y)}),T)){if(T&&!v){var ot=me.node().getBBox(),Dt=ot.y+ot.height+HO*W;De.attr("y",Dt)}V?De.on(".opacity",null):(rt(De,F),H=!0),De.call(C3.makeEditable,{gd:e}).on("edit",function(kt){UO.call("_guiRelayout",e,"title.subtitle.text",kt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(nt)}).on("input",function(kt){this.text(kt||" ").call(C3.positionText,De.attr("x"),De.attr("y"))})}return me.classed("js-placeholder",x),De&&De.classed("js-placeholder",H),f}Doe.exports={draw:Sat,SUBTITLE_PADDING_EM:HO,SUBTITLE_PADDING_MATHJAX_EM:VO}});var ym=ye((hrr,Ooe)=>{"use strict";var Mat=xa(),Eat=e3().utcFormat,Nu=Mr(),kat=Nu.numberFormat,gm=uo(),n_=Nu.cleanNumber,Cat=Nu.ms2DateTime,Roe=Nu.dateTime2ms,mm=Nu.ensureNumber,zoe=Nu.isArrayOrTypedArray,a_=es(),nL=a_.FP_SAFE,bg=a_.BADNUM,Lat=a_.LOG_CLIP,Pat=a_.ONEWEEK,aL=a_.ONEDAY,oL=a_.ONEHOUR,Foe=a_.ONEMIN,qoe=a_.ONESEC,sL=af(),cL=ad(),lL=cL.HOUR_PATTERN,uL=cL.WEEKDAY_PATTERN;function JS(e){return Math.pow(10,e)}function GO(e){return e!=null}Ooe.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(A,L){if(A>0)return Math.log(A)/Math.LN10;if(A<=0&&L&&t.range&&t.range.length===2){var _=t.range[0],C=t.range[1];return .5*(_+C-2*Lat*Math.abs(_-C))}else return bg}function o(A,L,_,C){if((C||{}).msUTC&&gm(A))return+A;var M=Roe(A,_||t.calendar);if(M===bg)if(gm(A)){A=+A;var p=Math.floor(Nu.mod(A+.05,1)*10),P=Math.round(A-p/10);M=Roe(new Date(P))+p/10}else return bg;return M}function s(A,L,_){return Cat(A,L,_||t.calendar)}function l(A){return t._categories[Math.round(A)]}function u(A){if(GO(A)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[A]!==void 0)return t._categoriesMap[A];t._categories.push(typeof A=="number"?String(A):A);var L=t._categories.length-1;return t._categoriesMap[A]=L,L}return bg}function c(A,L){for(var _=new Array(L),C=0;Ct.range[1]&&(_=!_);for(var C=_?-1:1,M=C*A,p=0,P=0;PF)p=P+1;else{p=M<(T+F)/2?P:P+1;break}}var q=t._B[p]||0;return isFinite(q)?v(A,t._m2,q):0},g=function(A){var L=t._rangebreaks.length;if(!L)return x(A,t._m,t._b);for(var _=0,C=0;Ct._rangebreaks[C].pmax&&(_=C+1);return x(A,t._m2,t._B[_])}}t.c2l=t.type==="log"?a:mm,t.l2c=t.type==="log"?JS:mm,t.l2p=b,t.p2l=g,t.c2p=t.type==="log"?function(A,L){return b(a(A,L))}:b,t.p2c=t.type==="log"?function(A){return JS(g(A))}:g,["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(A){return t.l2p(n_(A))},t.p2d=t.p2r=g,t.cleanPos=mm):t.type==="log"?(t.d2r=t.d2l=function(A,L){return a(n_(A),L)},t.r2d=t.r2c=function(A){return JS(n_(A))},t.d2c=t.r2l=n_,t.c2d=t.l2r=mm,t.c2r=a,t.l2d=JS,t.d2p=function(A,L){return t.l2p(t.d2r(A,L))},t.p2d=function(A){return JS(g(A))},t.r2p=function(A){return t.l2p(n_(A))},t.p2r=g,t.cleanPos=mm):t.type==="date"?(t.d2r=t.r2d=Nu.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(A,L,_){return t.l2p(o(A,0,_))},t.p2d=t.p2r=function(A,L,_){return s(g(A),L,_)},t.cleanPos=function(A){return Nu.cleanDate(A,bg,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(A){var L=d(A);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=mm,t.r2l=d,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return l(g(A))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(A){return typeof A=="string"&&A!==""?A:mm(A)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(A){var L=h(A);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=mm,t.r2l=h,t.d2p=function(A){return t.l2p(t.r2c(A))},t.p2d=function(A){return l(g(A))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(A){return Array.isArray(A)||typeof A=="string"&&A!==""?A:mm(A)},t.setupMultiCategory=function(A){var L=t._traceIndices,_,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var p in M)if(p!==n){var P=r[sL.id2name(p)];L=L.concat(P._traceIndices)}}var T=[[0,{}],[0,{}]],F=[];for(_=0;_P[1]&&(C[p?0:1]=_),C[0]===C[1]){var T=t.l2r(L),F=t.l2r(_);if(L!==void 0){var q=T+1;_!==void 0&&(q=Math.min(q,F)),C[p?1:0]=q}if(_!==void 0){var V=F+1;L!==void 0&&(V=Math.max(V,T)),C[p?0:1]=V}}}},t.cleanRange=function(A,L){t._cleanRange(A,L),t.limitRange(A)},t._cleanRange=function(A,L){L||(L={}),A||(A="range");var _=Nu.nestedProperty(t,A).get(),C,M;if(t.type==="date"?M=Nu.dfltRange(t.calendar):i==="y"?M=cL.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||cL.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!_||_.length!==2){Nu.nestedProperty(t,A).set(M);return}var p=_[0]===null,P=_[1]===null;for(t.type==="date"&&!t.autorange&&(_[0]=Nu.cleanDate(_[0],bg,t.calendar),_[1]=Nu.cleanDate(_[1],bg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!Nu.isDateTime(_[C],t.calendar)){t[A]=M;break}if(t.r2l(_[0])===t.r2l(_[1])){var T=Nu.constrain(t.r2l(_[0]),Nu.MIN_MS+1e3,Nu.MAX_MS-1e3);_[0]=t.l2r(T-1e3),_[1]=t.l2r(T+1e3);break}}else{if(!gm(_[C]))if(!(p||P)&&gm(_[1-C]))_[C]=_[1-C]*(C?10:.1);else{t[A]=M;break}if(_[C]<-nL?_[C]=-nL:_[C]>nL&&(_[C]=nL),_[0]===_[1]){var F=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=F,_[1]+=F}}},t.setScale=function(A){var L=r._size;if(t.overlaying){var _=sL.getFromId({_fullLayout:r},t.overlaying);t.domain=_.domain}var C=A&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var p=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/(p-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-p),t._b=-t._m*p),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var F,q;if(t._rangebreaks=t.locateBreaks(Math.min(p,P),Math.max(p,P)),t._rangebreaks.length){for(F=0;FP&&(V=!V),V&&t._rangebreaks.reverse();var H=V?-1:1;for(t._m2=H*t._length/(Math.abs(P-p)-t._lBreaks),t._B.push(-t._m2*(T?P:p)),F=0;FM&&(M+=7,pM&&(M+=24,p=C&&p=C&&A=ie.min&&(_eie.max&&(ie.max=Me),ke=!1)}ke&&P.push({min:_e,max:Me})}};for(_=0;_{"use strict";var Boe=uo(),jO=Mr(),Iat=es().BADNUM,fL=jO.isArrayOrTypedArray,Dat=jO.isDateTime,Rat=jO.cleanNumber,Noe=Math.round;Voe.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(fL(i)&&!i.length)return"-";if(!a&&Bat(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function Uoe(e){return Math.max(1,(e-1)/1e3)}function Oat(e,t){for(var r=e.length,n=Uoe(r),i=0,a=0,o={},s=0;si*2}function Bat(e){return fL(e[0])&&fL(e[1])}});var wg=ye((vrr,Koe)=>{"use strict";var Nat=xa(),Woe=uo(),o_=Mr(),hL=es().FP_SAFE,Uat=ba(),Vat=ao(),Zoe=af(),Hat=Zoe.getFromId,Gat=Zoe.isLinked;Koe.exports={applyAutorangeOptions:Yoe,getAutoRange:WO,makePadFn:ZO,doAutoRange:Wat,findExtremes:Zat,concatExtremes:KO};function WO(e,t){var r,n,i=[],a=e._fullLayout,o=ZO(a,t,0),s=ZO(a,t,1),l=KO(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=k-o(_)-s(C),P>A?T/P>L&&(M=_,p=C,L=T/P):T/k>L&&(M={val:_.val,nopad:1},p={val:C.val,nopad:1},L=T/k));function F(G,N){return Math.max(G,s(N))}if(f===h){var q=f-1,V=f+1;if(g)if(f===0)i=[0,1];else{var H=(f>0?c:u).reduce(F,0),X=f/(1-Math.min(.5,H/k));i=f>0?[0,X]:[X,0]}else E?i=[Math.max(0,q),Math.max(1,V)]:i=[q,V]}else g?(M.val>=0&&(M={val:0,nopad:1}),p.val<=0&&(p={val:0,nopad:1})):E&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),p.val<=0&&(p={val:1,nopad:1})),L=(p.val-M.val-Hoe(t,_.val,C.val))/(k-o(M)-s(p)),i=[M.val-L*o(M),p.val+L*s(p)];return i=Yoe(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),o_.simpleMap(i,t.l2r||Number)}function Hoe(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),_=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),M=A(r.vpadminus||r.vpad);if(!u){if(E=1/0,k=-1/0,l)for(f=0;f0&&(E=h),h>k&&h-hL&&(E=h),h>k&&h=T;f--)P(f);return{min:n,max:i,opts:r}}function XO(e,t,r,n){Xoe(e,t,r,n,Xat)}function YO(e,t,r,n){Xoe(e,t,r,n,Yat)}function Xoe(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 joe(e){return Woe(e)&&Math.abs(e)=t}function Kat(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&dL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&dL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Jat(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&dL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&dL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function dL(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=Kat(r,t),n=Jat(n,t),[r,n]}});var Qa=ye((prr,yse)=>{"use strict";var w0=xa(),ph=uo(),P3=Yu(),QS=ba(),Vo=Mr(),I3=Vo.strTranslate,Eb=Ll(),$at=Mb(),eM=va(),Xp=ao(),Qat=Cd(),Joe=xO(),Yd=es(),eot=Yd.ONEMAXYEAR,gL=Yd.ONEAVGYEAR,mL=Yd.ONEMINYEAR,tot=Yd.ONEMAXQUARTER,eB=Yd.ONEAVGQUARTER,yL=Yd.ONEMINQUARTER,rot=Yd.ONEMAXMONTH,D3=Yd.ONEAVGMONTH,_L=Yd.ONEMINMONTH,Yp=Yd.ONEWEEK,Fv=Yd.ONEDAY,s_=Fv/2,xm=Yd.ONEHOUR,tM=Yd.ONEMIN,xL=Yd.ONESEC,iot=Yd.ONEMILLI,not=Yd.ONEMICROSEC,kb=Yd.MINUS_SIGN,TL=Yd.BADNUM,tB={K:"zeroline"},rB={K:"gridline",L:"path"},iB={K:"minor-gridline",L:"path"},lse={K:"tick",L:"path"},$oe={K:"tick",L:"text"},Qoe={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},AL=Nh(),$S=AL.MID_SHIFT,Cb=AL.CAP_SHIFT,rM=AL.LINE_SPACING,aot=AL.OPPOSITE_SIDE,bL=3,kn=yse.exports={};kn.setConvert=ym();var oot=L3(),Ay=af(),sot=Ay.idSort,lot=Ay.isLinked;kn.id2name=Ay.id2name;kn.name2id=Ay.name2id;kn.cleanId=Ay.cleanId;kn.list=Ay.list;kn.listIds=Ay.listIds;kn.getFromId=Ay.getFromId;kn.getFromTrace=Ay.getFromTrace;var use=wg();kn.getAutoRange=use.getAutoRange;kn.findExtremes=use.findExtremes;var uot=1e-4;function sB(e){var t=(e[1]-e[0])*uot;return[e[0]-t,e[1]+t]}kn.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},Vo.coerce(e,t,u,l)};kn.getRefType=function(e){return e===void 0?e:e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};kn.coercePosition=function(e,t,r,n,i,a){var o,s,l=kn.getRefType(n);if(l!=="range")o=Vo.ensureNumber,s=r(i,a);else{var u=kn.getFromId(t,n);a=u.fraction2r(a),s=r(i,a),o=u.cleanPos}e[i]=o(s)};kn.cleanPosition=function(e,t,r){var n=r==="paper"||r==="pixel"?Vo.ensureNumber:kn.getFromId(t,r).cleanPos;return n(e)};kn.redrawComponents=function(e,t){t=t||kn.listIds(e);var r=e._fullLayout;function n(i,a,o,s){for(var l=QS.getComponentMethod(i,a),u={},c=0;c2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};kn.saveRangeInitial=function(e,t){for(var r=kn.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.substr(1));a.exactYears>o&&s%12===0?e=kn.tickIncrement(e,"M6","reverse")+Fv*1.5:a.exactMonths>o?e=kn.tickIncrement(e,"M1","reverse")+Fv*15.5:e-=s_;var l=kn.tickIncrement(e,r);if(l<=n)return l}return e}kn.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&ph(t._tmin),i;if(n){var a=kn.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Vo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Vo.simpleMap(i,t.l2r),e._isMinor=!0,kn.prepTicks(e,r),n){var s=ph(t.dtick),l=ph(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?JO(u,c)?u===2*Yp&&c===2*Fv&&(e.dtick=Yp):u===2*Yp&&c===3*Fv?e.dtick=Yp:u===Yp&&!(t._input.minor||{}).nticks?e.dtick=Fv:rse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":JO(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"?JO(u,c)||(e.dtick=rse(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 JO(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function rse(e,t){return Math.abs(e/t-1)<.001}kn.prepTicks=function(e,t){var r=Vo.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?Vo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Vo.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,kn.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>=mL?u>=mL&&u<=eot?f=u:f=gL:r===eB&&c>=yL?u>=yL&&u<=tot?f=u:f=eB:c>=_L?u>=_L&&u<=rot?f=u:f=D3:r===Yp&&c>=Yp?f=Yp:c>=Fv?f=Fv: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,x=0,b=0;bYp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}kn.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||Vo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Vo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(k?0:1);A--){var L=!A;A?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var _=A?t:Vo.extendFlat({},t,t.minor);if(L?kn.prepMinorTicks(_,t,r):kn.prepTicks(_,r),_.tickmode==="array"){A?(b=[],v=ise(t,!L)):(g=[],x=ise(t,!L));continue}if(_.tickmode==="sync"){b=[],v=pot(t);continue}var C=sB(u),M=C[0],p=C[1],P=ph(_.dtick),T=n==="log"&&!(P||_.dtick.charAt(0)==="L"),F=kn.tickFirst(_,r);if(A){if(t._tmin=F,F=p:V<=p;V=kn.tickIncrement(V,G,c,i)){if(A&&H++,_.rangebreaks&&!c){if(V=h)break}if(b.length>d||V===q)break;q=V;var N={value:V};A?(T&&V!==(V|0)&&(N.simpleLabel=!0),a>1&&H%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,g.push(N))}}if(!g||g.length<2)l=!1;else{var W=(g[1].value-g[0].value)*(s?-1:1);Bot(W,t.tickformat)||(l=!1)}if(!l)E=b;else{var re=b.concat(g);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Dt,kt){return Dt.value-kt.value}).filter(function(Dt,kt,Ct){return kt===0||Dt.value!==Ct[kt-1].value});var ae=re.map(function(Dt,kt){return Dt.minor===void 0&&!Dt.skipLabel?kt:null}).filter(function(Dt){return Dt!==null});ae.forEach(function(Dt){l.map(function(kt){var Ct=Dt+kt;Ct>=0&&Ct-1;ze--){if(b[ze].drop){b.splice(ze,1);continue}b[ze].value=QO(b[ze].value,t);var ce=t.c2p(b[ze].value);(Ce?De>ce-me:Deh||Yth&&(Ct.periodX=h),Yti&&hgL)t/=gL,n=i(10),e.dtick="M"+12*_m(t,n,vL);else if(a>D3)t/=D3,e.dtick="M"+_m(t,1,nse);else if(a>Fv){if(e.dtick=_m(t,Fv,e._hasDayOfWeekBreaks?[1,2,7,14]:got),!r){var o=kn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Vo.dateTick0(e.calendar,2):e.tick0=Vo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>xm?e.dtick=_m(t,xm,nse):a>tM?e.dtick=_m(t,tM,ase):a>xL?e.dtick=_m(t,xL,ase):(n=i(10),e.dtick=_m(t,n,vL))}else if(e.type==="log"){e.tick0=0;var l=Vo.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,vL)}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))):cB(e)?(e.tick0=0,n=1,e.dtick=_m(t,n,mot)):(e.tick0=0,n=i(10),e.dtick=_m(t,n,vL));if(e.dtick===0&&(e.dtick=1),!ph(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function dse(e){var t=e.dtick;if(e._tickexponent=0,!ph(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.substr(5)!=="01-01"?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=Fv&&i<=10||t>=Fv*15)e._tickround="d";else if(t>=tM&&i<=16||t>=xm)e._tickround="M";else if(t>=xL&&i<=19||t>=tM)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(ph(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);ph(t)||(t=Number(t.substr(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&&(wL(e.exponentformat)&&!lB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}kn.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(ph(t))return Vo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.substr(1));if(a==="M")return Vo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?hse:fse,l=e+i*.01,u=Vo.roundUp(Vo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};kn.tickFirst=function(e,t){var r=e.r2l||Number,n=Vo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&g<=e._length?b:null};if(a&&Vo.isArrayOrTypedArray(e.ticktext)){var f=Vo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u"+s;else{var u=nM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function _ot(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=iM(Math.pow(10,o),e,i,n);else if(ph(a)||l==="D"&&Vo.mod(o+.01,1)<.1){var u=Math.round(o),c=Math.abs(u),f=e.exponentformat;f==="power"||wL(f)&&lB(u)?(u===0?t.text=1:u===1?t.text="10":t.text="10"+(u>1?"":kb)+c+"",t.fontSize*=1.25):(f==="e"||f==="E")&&c>2?t.text="1"+f+(u>0?"+":kb)+c:(t.text=iM(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=String(Math.round(Math.pow(10,Vo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var h=String(t.text).charAt(0);(h==="0"||h==="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 xot(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function bot(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 wot(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=iM(t.x,e,i,n)}function Tot(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=Aot(a);if(o[1]>=100)t.text=iM(Vo.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=kb+t.text)}}}else t.text=iM(t.x,e,i,n)}function Aot(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 Sot=["f","p","n","\u03BC","m","","k","M","G","T"];function wL(e){return e==="SI"||e==="B"}function lB(e){return e>14||e<-15}function iM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=kn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:ph(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};dse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,kb);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+v+"":o==="B"&&s===9?e+="B":wL(o)&&(e+=Sot[s/3+5])}return i?kb+e:e}kn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*D3}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 Vo.syncOrAsync(i.map(function(l){return function(){if(l){var u=kn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=kn.drawOne(e,u,r);return u._shiftPusher&&oB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Vo.simpleMap(u._r,u.r2l),c}}}))};kn.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=kn.counterLetter(u),h=l._plots[t._mainSubplot];if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),oB(t,d,n,!0),oB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Oot(t,n));var v=h[c+"axislayer"],x=t._mainLinePosition,b=x+=t._shift,g=t._mainMirrorPosition,E=t._vals=kn.calcTicks(t),k=[t.mirror,b,g].join("_");for(a=0;a0?Ct.bottom-Dt:0,kt))));var Ke=0,xt=0;if(t._shiftPusher&&(Ke=Math.max(kt,Ct.height>0?rt==="l"?Dt-Ct.left:Ct.right-Dt:0),t.title.text!==l._dfltTitle[c]&&(xt=(t._titleStandoff||0)+(t._titleScoot||0),rt==="l"&&(xt+=sse(t))),t._fullDepth=Math.max(Ke,xt)),t.automargin){Yt={x:0,y:0,r:0,l:0,t:0,b:0};var bt=[0,1],Lt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(rt==="b"?Yt[rt]=t._depth:(Yt[rt]=t._depth=Math.max(Ct.width>0?Dt-Ct.top:0,kt),bt.reverse()),Ct.width>0){var St=Ct.right-(t._offset+t._length);St>0&&(Yt.xr=1,Yt.r=St);var Et=t._offset-Ct.left;Et>0&&(Yt.xl=0,Yt.l=Et)}}else if(rt==="l"?(t._depth=Math.max(Ct.height>0?Dt-Ct.left:0,kt),Yt[rt]=t._depth-Lt):(t._depth=Math.max(Ct.height>0?Ct.right-Dt:0,kt),Yt[rt]=t._depth+Lt,bt.reverse()),Ct.height>0){var dt=Ct.bottom-(t._offset+t._length);dt>0&&(Yt.yb=0,Yt.b=dt);var Ht=t._offset-Ct.top;Ht>0&&(Yt.yt=1,Yt.t=Ht)}Yt[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[bt[0]],t.title.text!==l._dfltTitle[c]&&(Yt[rt]+=sse(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(xr={x:0,y:0,r:0,l:0,t:0,b:0},xr[ot]=t.linewidth,t.mirror&&t.mirror!==!0&&(xr[ot]+=kt),t.mirror===!0||t.mirror==="ticks"?xr[f]=t._anchorAxis.domain[bt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(xr[f]=[t._counterDomainMin,t._counterDomainMax][bt[1]]))}qt&&(er=QS.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(ose(Yt,t.automargin),ose(xr,t.automargin)),P3.autoMargin(e,uB(t),Yt),P3.autoMargin(e,gse(t),xr),P3.autoMargin(e,mse(t),er)}),Vo.syncOrAsync(nt)}};function ose(e,t){if(e){var r=Object.keys(Qoe).reduce(function(n,i){return t.indexOf(i)!==-1&&Qoe[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 Mot(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Vo.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 I3(i+e._offset+e.l2p(nB(h))+r,a+n)}:function(h){return I3(a+n,i+e._offset+e.l2p(nB(h))+r)}};function nB(e){return e.periodX!==void 0?e.periodX:e.x}function Lot(e){var t=e.ticklabelposition||"",r=function(d){return t.indexOf(d)!==-1},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=e.side,c=l?(e.tickwidth||0)/2:0,f=bL,h=e.tickfont?e.tickfont.size:12;return(o||n)&&(c+=h*Cb,f+=(e.linewidth||0)/2),(i||a)&&(c+=(e.linewidth||0)/2,f+=bL),s&&u==="top"&&(f-=h*(1-Cb)),(i||n)&&(c=-c),(u==="bottom"||u==="right")&&(f=-f),[l?c:0,s?f:0]}kn.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};kn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(F){return n.indexOf(F)!==-1},a=i("top"),o=i("left"),s=i("right"),l=i("bottom"),u=l||o||a||s,c=i("inside"),f=n==="inside"&&e.ticks==="inside"||!c&&e.ticks==="outside"&&e.tickson!=="boundaries",h=0,d=0,v=f?e.ticklen:0;if(c?v*=-1:u&&(v=0),f&&(h+=v,r)){var x=Vo.deg2rad(r);h=v*Math.cos(x)+1,d=v*Math.sin(x)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size),h+=(e.linewidth||1)/2*(c?-1:1);var b={labelStandoff:h,labelShift:d},g,E,k,A,L=0,_=e.side,C=e._id.charAt(0),M=e.tickangle,p;if(C==="x")p=!c&&_==="bottom"||c&&_==="top",A=p?1:-1,c&&(A*=-1),g=d*A,E=t+h*A,k=p?1:-.2,Math.abs(M)===90&&(c?k+=$S:M===-90&&_==="bottom"?k=Cb:M===90&&_==="top"?k=$S:k=.5,L=$S/2*(M/90)),b.xFn=function(F){return F.dx+g+L*F.fontSize},b.yFn=function(F){return F.dy+E+F.fontSize*k},b.anchorFn=function(F,q){if(u){if(o)return"end";if(s)return"start"}return!ph(q)||q===0||q===180?"middle":q*A<0!==c?"end":"start"},b.heightFn=function(F,q,V){return q<-60||q>60?-.5*V:e.side==="top"!==c?-V:0};else if(C==="y"){if(p=!c&&_==="left"||c&&_==="right",A=p?1:-1,c&&(A*=-1),g=h,E=d*A,k=0,!c&&Math.abs(M)===90&&(M===-90&&_==="left"||M===90&&_==="right"?k=Cb:k=.5),c){var P=ph(M)?+M:0;if(P!==0){var T=Vo.deg2rad(P);L=Math.abs(Math.sin(T))*Cb*A,k=0}}b.xFn=function(F){return F.dx+t-(g+F.fontSize*k)*A+L*F.fontSize},b.yFn=function(F){return F.dy+E+F.fontSize*$S},b.anchorFn=function(F,q){return ph(q)&&Math.abs(q)===90?"middle":p?"end":"start"},b.heightFn=function(F,q,V){return e.side==="right"&&(q*=-1),q<-30?-V:q<30?-.5*V:0}}return b};function SL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}kn.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,SL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return eM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),ML(t,[lse]),a.attr("transform",r.transFn)};kn.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(g){return g.minor}):[],o=t.showgrid?r.vals.filter(function(g){return!g.minor}):[],s=r.counterAxis;if(s&&kn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;v--){var x=v?h:d;if(x){var b=x.selectAll("path."+n).data(v?o:a,SL);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(g){return eM.stroke(w0.select(this),g.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(g){return Xp.dashStyle(g.minor?t.minor.griddash:t.griddash,g.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(g){return(g.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}ML(t,[rB,iB])}};kn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=kn.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 sot(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(eM.stroke,t.zerolinecolor||eM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),ML(t,[tB])};kn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=r.cls||i+"tick",o=r.vals.filter(function(N){return N.text}),s=r.labelFns,l=r.secondary?0:t.tickangle,u=(t._prevTickAngles||{})[a],c=r.layer.selectAll("g."+a).data(t.showticklabels?o:[],SL),f=[];c.enter().append("g").classed(a,1).append("text").attr("text-anchor","middle").each(function(N){var W=w0.select(this),re=e._promises.length;W.call(Eb.positionText,s.xFn(N),s.yFn(N)).call(Xp.font,{family:N.font,size:N.fontSize,color:N.fontColor,weight:N.fontWeight,style:N.fontStyle,variant:N.fontVariant,textcase:N.fontTextcase,lineposition:N.fontLineposition,shadow:N.fontShadow}).text(N.text).call(Eb.convertToTspans,e),e._promises[re]?f.push(e._promises.pop().then(function(){h(W,l)})):h(W,l)}),ML(t,[$oe]),c.exit().remove(),r.repositionOnUpdate&&c.each(function(N){w0.select(this).select("text").call(Eb.positionText,s.xFn(N),s.yFn(N))});function h(N,W){N.each(function(re){var ae=w0.select(this),_e=ae.select(".text-math-group"),Me=s.anchorFn(re,W),ke=r.transFn.call(ae.node(),re)+(ph(W)&&+W!=0?" rotate("+W+","+s.xFn(re)+","+(s.yFn(re)-re.fontSize/2)+")":""),ge=Eb.lineCount(ae),ie=rM*re.fontSize,Te=s.heightFn(re,ph(W)?+W:0,(ge-1)*ie);if(Te&&(ke+=I3(0,Te)),_e.empty()){var Ee=ae.select("text");Ee.attr({transform:ke,"text-anchor":Me}),Ee.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Ae=Xp.bBox(_e.node()).width,ze=Ae*{end:-.5,start:.5}[Me];_e.attr("transform",ke+I3(ze,0))}})}t._adjustTickLabelsOverflow=function(){var N=t.ticklabeloverflow;if(!(!N||N==="allow")){var W=N.indexOf("hide")!==-1,re=t._id.charAt(0)==="x",ae=0,_e=re?e._fullLayout.width:e._fullLayout.height;if(N.indexOf("domain")!==-1){var Me=Vo.simpleMap(t.range,t.r2l);ae=t.l2p(Me[0])+t._offset,_e=t.l2p(Me[1])+t._offset}var ke=Math.min(ae,_e),ge=Math.max(ae,_e),ie=t.side,Te=1/0,Ee=-1/0;c.each(function(me){var De=w0.select(this),ce=De.select(".text-math-group");if(ce.empty()){var Ge=Xp.bBox(De.node()),nt=0;re?(Ge.right>ge||Ge.leftge||Ge.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+Me._id]?me.style("display","none"):ge.K==="tick"&&!ke&&me.style("display",null)})})})})},h(c,u+1?u:l);function d(){return f.length&&Promise.all(f)}var v=null;function x(){if(h(c,l),o.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){v=t.autotickangles[0];var N=0,W=[],re,ae=1;c.each(function(Ct){N=Math.max(N,Ct.fontSize);var Yt=t.l2p(Ct.x),xr=aB(this),er=Xp.bBox(xr.node());ae=Math.max(ae,Eb.lineCount(xr)),W.push({top:0,bottom:10,height:10,left:Yt-er.width/2,right:Yt+er.width/2+2,width:er.width+2})});var _e=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Me=o.length,ke=Math.abs((o[Me-1].x-o[0].x)*t._m)/(Me-1),ge=_e?ke/2:ke,ie=_e?t.ticklen:N*1.25*ae,Te=Math.sqrt(Math.pow(ge,2)+Math.pow(ie,2)),Ee=ge/Te,Ae=t.autotickangles.map(function(Ct){return Ct*Math.PI/180}),ze=Ae.find(function(Ct){return Math.abs(Math.cos(Ct))<=Ee});ze===void 0&&(ze=Ae.reduce(function(Ct,Yt){return Math.abs(Math.cos(Ct))H*V&&(T=V,M[C]=p[C]=F[C])}var X=Math.abs(T-P);X-A>0?(X-=A,A*=1+A/X):A=0,t._id.charAt(0)!=="y"&&(A=-A),M[_]=E.p2r(E.r2p(p[_])+L*A),E.autorange==="min"||E.autorange==="max reversed"?(M[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange==="max"||E.autorange==="min reversed")&&(M[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+".range"]=M}var G=Vo.syncOrAsync(b);return G&&G.then&&e._promises.push(G),G};function Pot(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,SL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(eM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}kn.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 sse(e){var t=e.title.font.size,r=(e.title.text.match(Eb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Cb+r*rM):r?t*(r+1)*rM:t}function Iot(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Eb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Cb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*($S+s*rM));else{var l=nM(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=kn.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 x=t._selections[t._id+"tick"];if(v={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var b=Xp.getTranslate(x.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,$at.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"}})}kn.shouldShowZeroLine=function(e,t,r){var n=Vo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===TL)&&(pse(t,0)||!Dot(e,t,r,n)||Rot(e,t))};kn.clipEnds=function(e,t){return t.filter(function(r){return pse(e,r.x)})};function pse(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=not:/%L/.test(t)?e>=iot:/%[SX]/.test(t)?e>=xL:/%M/.test(t)?e>=tM:/%[HI]/.test(t)?e>=xm:/%p/.test(t)?e>=s_:/%[Aadejuwx]/.test(t)?e>=Fv:/%[UVW]/.test(t)?e>=Yp:/%[Bbm]/.test(t)?e>=_L:/%[q]/.test(t)?e>=yL:/%[Yy]/.test(t)?e>=mL:!0}});var fB=ye((grr,_se)=>{"use strict";_se.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 hB=ye((mrr,xse)=>{"use strict";var Not=fB();xse.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&&(Not(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var wse=ye((yrr,bse)=>{var Uot={left:0,top:0};bse.exports=Vot;function Vot(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=Hot(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Hot(e){return e===window||e===document||e===document.body?Uot:e.getBoundingClientRect()}});var EL=ye((_rr,Tse)=>{"use strict";var Got=Yq();function jot(){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}Tse.exports=Got&&jot()});var Sse=ye((xrr,Ase)=>{"use strict";Ase.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 kse=ye((brr,Ese)=>{"use strict";var Mse=Mr(),Wot=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Ese.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Mse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Mse.constrain(Math.floor(r*3),0,2),Wot[r][t]}});var Lse=ye((wrr,Cse)=>{"use strict";var Zot=g3(),Xot=L6(),Yot=RS().getGraphDiv,Kot=IS(),dB=Cse.exports={};dB.wrapped=function(e,t,r){e=Yot(e),e._fullLayout&&Xot.clear(e._fullLayout._uid+Kot.HOVERID),dB.raw(e,t,r)};dB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Zot.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 gv=ye((Trr,Dse)=>{"use strict";var Jot=wse(),vB=Jq(),$ot=EL(),Qot=Mr().removeElement,est=ad(),Lb=Dse.exports={};Lb.align=Sse();Lb.getCursor=kse();var Pse=Lse();Lb.unhover=Pse.wrapped;Lb.unhoverRaw=Pse.raw;Lb.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,$ot?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(k,A,L){return Math.abs(k)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(n,f),!d){var A;try{A=new MouseEvent("click",k)}catch(_){var L=pB(k);A=document.createEvent("MouseEvents"),A.initMouseEvent("click",k.bubbles,k.cancelable,k.view,k.detail,k.screenX,k.screenY,L[0],L[1],k.ctrlKey,k.altKey,k.shiftKey,k.metaKey,k.button,k.relatedTarget)}h.dispatchEvent(A)}r._dragging=!1,r._dragged=!1}};function Ise(){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}Lb.coverSlip=Ise;function pB(e){return Jot(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Tg=ye((Arr,Rse)=>{"use strict";Rse.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 qse=ye((Srr,Fse)=>{"use strict";var gB=Tg(),aM="data-savedcursor",zse="!!";Fse.exports=function(t,r){var n=t.attr(aM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var mB=Su(),tst=dh();Ose.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:tst.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:mB({editType:"legend"}),grouptitlefont:mB({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:mB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var CL=ye(kL=>{"use strict";kL.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};kL.isVertical=function(t){return t.orientation!=="h"};kL.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1}});var bB=ye((krr,Bse)=>{"use strict";var _B=ba(),Kp=Mr(),rst=Vs(),ist=vl(),nst=yB(),ast=s3(),xB=CL();function ost(e,t,r,n){var i=t[e]||{},a=rst.newContainer(r,e);function o(G,N){return Kp.coerce(i,a,nst,G,N)}var s=Kp.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var l=o("visible");if(l){for(var u,c=function(G,N){var W=u._input,re=u;return Kp.coerce(W,re,ist,G,N)},f=r.font||{},h=Kp.coerceFont(o,"grouptitlefont",f,{overrideDflt:{size:Math.round(f.size*1.1)}}),d=0,v=!1,x="normal",b=(r.shapes||[]).filter(function(G){return G.showlegend}),g=n.concat(b).filter(function(G){return e===(G.legend||"legend")}),E=0;E(e==="legend"?1:0));if(A===!1&&(r[e]=void 0),!(A===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),A!==!1)){o("borderwidth");var L=o("orientation"),_=o("yref"),C=o("xref"),M=L==="h",p=_==="paper",P=C==="paper",T,F,q,V="left";M?(T=0,_B.getComponentMethod("rangeslider","isVisible")(t.xaxis)?p?(F=1.1,q="bottom"):(F=1,q="top"):p?(F=-.1,q="top"):(F=0,q="bottom")):(F=1,q="auto",P?T=1.02:(T=1,V="right")),Kp.coerce(i,a,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:T}},"x"),Kp.coerce(i,a,{y:{valType:"number",editType:"legend",min:p?-2:0,max:p?3:1,dflt:F}},"y"),o("traceorder",x),xB.isGrouped(r[e])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",V),o("yanchor",q),o("valign"),Kp.noneOrAll(i,a,["x","y"]);var H=o("title.text");if(H){o("title.side",M?"left":"top");var X=Kp.extendFlat({},s,{size:Kp.bigFont(s.size)});Kp.coerceFont(o,"title.font",X)}}}}Bse.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var R3=ba(),TB=Mr(),sst=TB.pushUnique,wB=!0;Nse.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"&&wB&&r.data&&r._context.showTips&&TB.notifier(TB._(r,"Double-click on legend to isolate one trace"),"long"),wB=!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(Dt){return Dt.showlegend}),v=h.concat(d),x=f.trace;x._isShape&&(x=x._fullInput);var b=x.legendgroup,g,E,k,A,L,_,C={},M=[],p=[],P=[];function T(Dt,kt){var Ct=M.indexOf(Dt),Yt=C.visible;return Yt||(Yt=C.visible=[]),M.indexOf(Dt)===-1&&(M.push(Dt),Ct=M.length-1),Yt[Ct]=kt,Ct}var F=(i.shapes||[]).map(function(Dt){return Dt._input}),q=!1;function V(Dt,kt){F[Dt].visible=kt,q=!0}function H(Dt,kt){if(!(f.groupTitle&&!u)){var Ct=Dt._fullInput||Dt,Yt=Ct._isShape,xr=Ct.index;xr===void 0&&(xr=Ct._index);var er=Ct.visible===!1?!1:kt;Yt?V(xr,er):T(xr,er)}}var X=x.legend,G=x._fullInput,N=G&&G._isShape;if(!N&&R3.traceIs(x,"pie-like")){var W=f.label,re=c.indexOf(W);if(l==="toggle")re===-1?c.push(W):c.splice(re,1);else if(l==="toggleothers"){var ae=re!==-1,_e=[];for(g=0;g{"use strict";Vse.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var jse=ye((Prr,Gse)=>{"use strict";var Hse=ba(),SB=CL();Gse.exports=function(t,r,n){var i=r._inHover,a=SB.isGrouped(r),o=SB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function x(G,N,W){if(r.visible!==!1&&!(n&&G!==r._id))if(N===""||!SB.isGrouped(r)){var re="~~i"+f;l.push(re),s[re]=[W],f++}else l.indexOf(N)===-1?(l.push(N),u=!0,s[N]=[W]):s[N].push(W)}for(d=0;dP&&(p=P)}C[d][0]._groupMinRank=p,C[d][0]._preGroupSort=d}var T=function(G,N){return G[0]._groupMinRank-N[0]._groupMinRank||G[0]._preGroupSort-N[0]._preGroupSort},F=function(G,N){return G.trace.legendrank-N.trace.legendrank||G._preSort-N._preSort};for(C.forEach(function(G,N){G[0]._preGroupSort=N}),C.sort(T),d=0;d{"use strict";var LL=Mr();function Wse(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Pb.formatPiePercent=function(t,r){var n=Wse((t*100).toPrecision(3));return LL.numSeparate(n,r)+"%"};Pb.formatPieValue=function(t,r){var n=Wse(t.toPrecision(10));return LL.numSeparate(n,r)};Pb.getFirstFilled=function(t,r){if(LL.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var lst=ao(),ust=va();Zse.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?lst.pointStyle(t,n,i,r):ust.fill(t,r.color)}});var z3=ye((Rrr,Jse)=>{"use strict";var Yse=va(),Kse=l_().castOption,cst=Xse();Jse.exports=function(t,r,n,i){var a=n.marker.line,o=Kse(a.color,r.pts)||Yse.defaultLine,s=Kse(a.width,r.pts)||0;t.call(cst,r,n,i).style("stroke-width",s).call(Yse.stroke,o)}});var CB=ye((zrr,ile)=>{"use strict";var qv=xa(),MB=ba(),mv=Mr(),$se=mv.strTranslate,ip=ao(),T0=va(),EB=Rv().extractOpts,PL=lu(),fst=z3(),hst=l_().castOption,dst=AB(),Qse=12,ele=5,Ib=2,vst=10,F3=5;ile.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+dst.itemGap*2)/2,l=$se(s,0),u=function(C,M,p,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,p)};t.each(function(C){var M=qv.select(this),p=mv.ensureSingle(M,"g","layers");p.style("opacity",C[0].trace.opacity);var P=n.indentation,T=n.valign,F=C[0].lineHeight,q=C[0].height;if(T==="middle"&&P===0||!F||!q)p.attr("transform",null);else{var V={top:1,bottom:-1}[T],H=V*(.5*(F-q+3))||0,X=n.indentation;p.attr("transform",$se(X,H))}var G=p.selectAll("g.legendfill").data([C]);G.enter().append("g").classed("legendfill",!0);var N=p.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var W=p.selectAll("g.legendsymbols").data([C]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(_).each(h).each(v).each(d).each(b).each(A).each(k).each(c).each(f).each(g).each(E);function c(C){var M=tle(C),p=M.showFill,P=M.showLine,T=M.showGradientLine,F=M.showGradientFill,q=M.anyFill,V=M.anyLine,H=C[0],X=H.trace,G,N,W=EB(X),re=W.colorscale,ae=W.reversescale,_e=function(Ae){if(Ae.size())if(p)ip.fillGroupStyle(Ae,r,!0);else{var ze="legendfill-"+X.uid;ip.gradient(Ae,r,ze,kB(ae),re,"fill")}},Me=function(Ae){if(Ae.size()){var ze="legendline-"+X.uid;ip.lineGroupStyle(Ae),ip.gradient(Ae,r,ze,kB(ae),re,"stroke")}},ke=PL.hasMarkers(X)||!q?"M5,0":V?"M5,-2":"M5,-3",ge=qv.select(this),ie=ge.select(".legendfill").selectAll("path").data(p||F?[C]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",ke+"h"+o+"v6h-"+o+"z").call(_e),P||T){var Te=u(void 0,X.line,vst,ele);N=mv.minExtend(X,{line:{width:Te}}),G=[mv.minExtend(H,{trace:N})]}var Ee=ge.select(".legendlines").selectAll("path").data(P||T?[G]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",ke+(T?"l"+o+",0.0001":"h"+o)).call(P?ip.lineGroupStyle:Me)}function f(C){var M=tle(C),p=M.anyFill,P=M.anyLine,T=M.showLine,F=M.showMarker,q=C[0],V=q.trace,H=!F&&!P&&!p&&PL.hasText(V),X,G;function N(ie,Te,Ee,Ae){var ze=mv.nestedProperty(V,ie).get(),Ce=mv.isArrayOrTypedArray(ze)&&Te?Te(ze):ze;if(a&&Ce&&Ae!==void 0&&(Ce=Ae),Ee){if(CeEe[1])return Ee[1]}return Ce}function W(ie){return q._distinct&&q.index&&ie[q.index]?ie[q.index]:ie[0]}if(F||H||T){var re={},ae={};if(F){re.mc=N("marker.color",W),re.mx=N("marker.symbol",W),re.mo=N("marker.opacity",mv.mean,[.2,1]),re.mlc=N("marker.line.color",W),re.mlw=N("marker.line.width",mv.mean,[0,5],Ib),ae.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",mv.mean,[2,16],Qse);re.ms=_e,ae.marker.size=_e}T&&(ae.line={width:N("line.width",W,[0,10],ele)}),H&&(re.tx="Aa",re.tp=N("textposition",W),re.ts=10,re.tc=N("textfont.color",W),re.tf=N("textfont.family",W),re.tw=N("textfont.weight",W),re.ty=N("textfont.style",W),re.tv=N("textfont.variant",W),re.tC=N("textfont.textcase",W),re.tE=N("textfont.lineposition",W),re.tS=N("textfont.shadow",W)),X=[mv.minExtend(q,re)],G=mv.minExtend(V,ae),G.selectedpoints=null,G.texttemplate=null}var Me=qv.select(this).select("g.legendpoints"),ke=Me.selectAll("path.scatterpts").data(F?X:[]);ke.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),ke.exit().remove(),ke.call(ip.pointStyle,G,r),F&&(X[0].mrc=3);var ge=Me.selectAll("g.pointtext").data(H?X:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),ge.exit().remove(),ge.selectAll("text").call(ip.textPointStyle,G,r)}function h(C){var M=C[0].trace,p=M.type==="waterfall";if(C[0]._distinct&&p){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,x(C,this,"waterfall")}var T=[];M.visible&&p&&(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 F=qv.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(T);F.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),F.exit().remove(),F.each(function(q){var V=qv.select(this),H=M[q[0]].marker,X=u(void 0,H.line,F3,Ib);V.attr("d",q[1]).style("stroke-width",X+"px").call(T0.fill,H.color),X&&V.call(T0.stroke,H.line.color)})}function d(C){x(C,this)}function v(C){x(C,this,"funnel")}function x(C,M,p){var P=C[0].trace,T=P.marker||{},F=T.line||{},q=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=p?P.visible&&P.type===p:MB.traceIs(P,"bar"),H=qv.select(M).select("g.legendpoints").selectAll("path.legend"+p).data(V?[C]:[]);H.enter().append("path").classed("legend"+p,!0).attr("d",q).attr("transform",l),H.exit().remove(),H.each(function(X){var G=qv.select(this),N=X[0],W=u(N.mlw,T.line,F3,Ib);G.style("stroke-width",W+"px");var re=N.mcc;if(!n._inHover&&"mc"in N){var ae=EB(T),_e=ae.mid;_e===void 0&&(_e=(ae.max+ae.min)/2),re=ip.tryColorscale(T,"")(_e)}var Me=re||N.mc||T.color,ke=T.pattern,ge=ke&&ip.getPatternAttr(ke.shape,0,"");if(ge){var ie=ip.getPatternAttr(ke.bgcolor,0,null),Te=ip.getPatternAttr(ke.fgcolor,0,null),Ee=ke.fgopacity,Ae=rle(ke.size,8,10),ze=rle(ke.solidity,.5,1),Ce="legend-"+P.uid;G.call(ip.pattern,"legend",r,Ce,ge,Ae,ze,re,ke.fillmode,ie,Te,Ee)}else G.call(T0.fill,Me);W&&T0.stroke(G,N.mlc||F.color)})}function b(C){var M=C[0].trace,p=qv.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&MB.traceIs(M,"box-violin")?[C]:[]);p.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),p.exit().remove(),p.each(function(){var P=qv.select(this);if((M.boxpoints==="all"||M.points==="all")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var T=mv.minExtend(M,{marker:{size:a?Qse:mv.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});p.call(ip.pointStyle,T,r)}else{var F=u(void 0,M.line,F3,Ib);P.style("stroke-width",F+"px").call(T0.fill,M.fillcolor),F&&T0.stroke(P,M.line.color)}})}function g(C){var M=C[0].trace,p=qv.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);p.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),p.exit().remove(),p.each(function(P,T){var F=qv.select(this),q=M[T?"increasing":"decreasing"],V=u(void 0,q.line,F3,Ib);F.style("stroke-width",V+"px").call(T0.fill,q.fillcolor),V&&T0.stroke(F,q.line.color)})}function E(C){var M=C[0].trace,p=qv.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);p.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),p.exit().remove(),p.each(function(P,T){var F=qv.select(this),q=M[T?"increasing":"decreasing"],V=u(void 0,q.line,F3,Ib);F.style("fill","none").call(ip.dashLine,q.line.dash,V),V&&T0.stroke(F,q.line.color)})}function k(C){L(C,this,"pie")}function A(C){L(C,this,"funnelarea")}function L(C,M,p){var P=C[0],T=P.trace,F=p?T.visible&&T.type===p:MB.traceIs(T,p),q=qv.select(M).select("g.legendpoints").selectAll("path.legend"+p).data(F?[C]:[]);if(q.enter().append("path").classed("legend"+p,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),q.exit().remove(),q.size()){var V=T.marker||{},H=u(hst(V.line.width,P.pts),V.line,F3,Ib),X="pieLike",G=mv.minExtend(T,{marker:{line:{width:H}}},X),N=mv.minExtend(P,{trace:G},X);fst(q,N,G,r)}}function _(C){var M=C[0].trace,p,P=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],p=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],p=!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"]],p="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"]],p=!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"]],p=!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"]],p=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],p=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],p=!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"]],p=!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(F,q){var V=qv.select(this),H=EB(M),X=H.colorscale,G=H.reversescale,N=function(_e){if(_e.size()){var Me="legendfill-"+M.uid;ip.gradient(_e,r,Me,kB(G,p==="radial"),X,"fill")}},W;if(X){if(!p){var ae=X.length;W=q===0?X[G?ae-1:0][1]:q===1?X[G?0:ae-1][1]:X[Math.floor((ae-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;W=mv.isArrayOrTypedArray(re)?re[q]||re[0]:re}V.attr("d",F[0]),W?V.call(T0.fill,W):V.call(N)})}};function kB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function tle(e){var t=e[0].trace,r=t.contours,n=PL.hasLines(t),i=PL.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 rle(e,t,r){return e&&mv.isArrayOrTypedArray(e)?t:e>r?r:e}});var DB=ye((Frr,dle)=>{"use strict";var Sp=xa(),gh=Mr(),PB=Yu(),B3=ba(),nle=g3(),LB=gv(),mh=ao(),DL=va(),Db=Ll(),ale=Use(),Vh=AB(),IB=Nh(),fle=IB.LINE_SPACING,O3=IB.FROM_TL,ole=IB.FROM_BR,sle=jse(),pst=CB(),lle=CL(),q3=1,gst=/^legend[0-9]*$/;dle.exports=function(t,r){if(r)ule(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=Sp.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(gst)&&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(),PB.autoMargin(e,i);var x=gh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=gh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),g=gh.ensureSingle(x,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});g.call(DL.stroke,r.bordercolor).call(DL.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var E=gh.ensureSingle(x,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var A;k.text?(A=gh.ensureSingle(E,"text",i+"titletext"),A.attr("text-anchor","start").call(mh.font,k.font).text(k.text),RL(A,E,e,r,q3)):E.selectAll("."+i+"titletext").remove();var L=gh.ensureSingle(x,"rect","scrollbar",function(M){M.attr(Vh.scrollBarEnterAttrs).call(DL.fill,Vh.scrollBarColor)}),_=E.selectAll("g.groups").data(l);_.enter().append("g").attr("class","groups"),_.exit().remove();var C=_.selectAll("g.traces").data(gh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){var p=M[0].trace;return B3.traceIs(p,"pie-like")?v.indexOf(M[0].label)!==-1?.5:1:p.visible==="legendonly"?.5:1}).each(function(){Sp.select(this).call(yst,e,r)}).call(pst,e,r).each(function(){s||Sp.select(this).call(_st,e,i)}),gh.syncOrAsync([PB.previousPromises,function(){return wst(e,_,C,r)},function(){var M=n._size,p=r.borderwidth,P=r.xref==="paper",T=r.yref==="paper";if(k.text&&mst(A,r,p),!s){var F,q;P?F=M.l+M.w*r.x-O3[zL(r)]*r._width:F=n.width*r.x-O3[zL(r)]*r._width,T?q=M.t+M.h*(1-r.y)-O3[FL(r)]*r._effHeight:q=n.height*(1-r.y)-O3[FL(r)]*r._effHeight;var V=Tst(e,i,F,q);if(V)return;if(n.margin.autoexpand){var H=F,X=q;F=P?gh.constrain(F,0,n.width-r._width):H,q=T?gh.constrain(q,0,n.height-r._effHeight):X,F!==H&&gh.log("Constrain "+i+".x to make legend fit inside graph"),q!==X&&gh.log("Constrain "+i+".y to make legend fit inside graph")}mh.setTranslate(x,F,q)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var G=r._effHeight;s&&(G=r._height),g.attr({width:r._width-p,height:G-p,x:p/2,y:p/2}),mh.setTranslate(E,0,0),b.select("rect").attr({width:r._width-2*p,height:G-2*p,x:p,y:p}),mh.setClipUrl(E,a,e),mh.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(Vh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),W=r._effHeight-N-2*Vh.scrollBarMargin,re=r._height-r._effHeight,ae=W/re,_e=Math.min(r._scrollY||0,re);g.attr({width:r._width-2*p+Vh.scrollBarWidth+Vh.scrollBarMargin,height:r._effHeight-p,x:p/2,y:p/2}),b.select("rect").attr({width:r._width-2*p+Vh.scrollBarWidth+Vh.scrollBarMargin,height:r._effHeight-2*p,x:p,y:p+_e}),mh.setClipUrl(E,a,e),ze(_e,N,ae),x.on("wheel",function(){_e=gh.constrain(r._scrollY+Sp.event.deltaY/W*re,0,re),ze(_e,N,ae),_e!==0&&_e!==re&&Sp.event.preventDefault()});var Me,ke,ge,ie=function(Ge,nt,ct){var qt=(ct-nt)/ae+Ge;return gh.constrain(qt,0,re)},Te=function(Ge,nt,ct){var qt=(nt-ct)/ae+Ge;return gh.constrain(qt,0,re)},Ee=Sp.behavior.drag().on("dragstart",function(){var Ge=Sp.event.sourceEvent;Ge.type==="touchstart"?Me=Ge.changedTouches[0].clientY:Me=Ge.clientY,ge=_e}).on("drag",function(){var Ge=Sp.event.sourceEvent;Ge.buttons===2||Ge.ctrlKey||(Ge.type==="touchmove"?ke=Ge.changedTouches[0].clientY:ke=Ge.clientY,_e=ie(ge,Me,ke),ze(_e,N,ae))});L.call(Ee);var Ae=Sp.behavior.drag().on("dragstart",function(){var Ge=Sp.event.sourceEvent;Ge.type==="touchstart"&&(Me=Ge.changedTouches[0].clientY,ge=_e)}).on("drag",function(){var Ge=Sp.event.sourceEvent;Ge.type==="touchmove"&&(ke=Ge.changedTouches[0].clientY,_e=Te(ge,Me,ke),ze(_e,N,ae))});E.call(Ae)}function ze(Ge,nt,ct){r._scrollY=e._fullLayout[i]._scrollY=Ge,mh.setTranslate(E,0,-Ge),mh.setRect(L,r._width,Vh.scrollBarMargin+Ge*ct,Vh.scrollBarWidth,nt),b.select("rect").attr("y",p+Ge)}if(e._context.edits.legendPosition){var Ce,me,De,ce;x.classed("cursor-move",!0),LB.init({element:x.node(),gd:e,prepFn:function(Ge){if(Ge.target!==L.node()){var nt=mh.getTranslate(x);De=nt.x,ce=nt.y}},moveFn:function(Ge,nt){if(De!==void 0&&ce!==void 0){var ct=De+Ge,qt=ce+nt;mh.setTranslate(x,ct,qt),Ce=LB.align(ct,r._width,M.l,M.l+M.w,r.xanchor),me=LB.align(qt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Ce!==void 0&&me!==void 0){var Ge={};Ge[i+".x"]=Ce,Ge[i+".y"]=me,B3.call("_guiRelayout",e,Ge)}},clickFn:function(Ge,nt){var ct=o.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return nt.clientX>=qt.left&&nt.clientX<=qt.right&&nt.clientY>=qt.top&&nt.clientY<=qt.bottom});ct.size()>0&&hle(e,x,ct,Ge,nt)}})}}],e)}}function IL(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 hle(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),B3.traceIs(a,"pie-like")&&(o.label=r.datum()[0].label);var s=nle.triggerHandler(e,"plotly_legendclick",o);if(n===1){if(s===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&ale(r,e,n)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var l=nle.triggerHandler(e,"plotly_legenddoubleclick",o);l!==!1&&s!==!1&&ale(r,e,n)}}function yst(e,t,r){var n=qL(r),i=e.data()[0][0],a=i.trace,o=B3.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=gh.templateString(u,a._meta))));var f=gh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(mh.font,c).text(s?cle(u,l):u);var h=r.indentation+r.itemwidth+Vh.itemGap*2;Db.positionText(f,h,0),s?f.call(Db.makeEditable,{gd:t,text:u}).call(RL,e,t,r).on("edit",function(d){this.text(cle(d,l)).call(RL,e,t,r);var v=i.trace._fullInput||{},x={};return x.name=d,v._isShape?B3.call("_guiRelayout",t,"shapes["+a.index+"].name",x.name):B3.call("_guiRestyle",t,x,a.index)}):RL(f,e,t,r)}function cle(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 _st(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=gh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(DL.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)),hle(t,s,e,a,Sp.event)}}))}function RL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Db.convertToTspans(e,r,function(){xst(t,r,n,i)})}function xst(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){e.remove();return}var a=e.select("g[class*=math-group]"),o=a.node(),s=qL(r);r||(r=t._fullLayout[s]);var l=r.borderwidth,u;n===q3?u=r.title.font:i.groupTitle?u=i.groupTitle.font:u=r.font;var c=u.size*fle,f,h;if(o){var d=mh.bBox(o);f=d.height,h=d.width,n===q3?mh.setTranslate(a,l,l+f*.75):mh.setTranslate(a,0,f*.25)}else{var v="."+s+(n===q3?"title":"")+"text",x=e.select(v),b=Db.lineCount(x),g=x.node();if(f=c*b,h=g?mh.bBox(g).width:0,n===q3)r.title.side==="left"&&(h+=Vh.itemGap*2),Db.positionText(x,l+Vh.titlePad,l+c);else{var E=Vh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(E=Vh.itemGap,h-=r.indentation+r.itemwidth),Db.positionText(x,E,-c*((b-1)/2-.3))}}n===q3?(r._titleWidth=h,r._titleHeight=f):(i.lineHeight=c,i.height=Math.max(f,16)+3,i.width=h)}function bst(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 wst(e,t,r,n){var i=e._fullLayout,a=qL(n);n||(n=i[a]);var o=i._size,s=lle.isVertical(n),l=lle.isGrouped(n),u=n.entrywidthmode==="fraction",c=n.borderwidth,f=2*c,h=Vh.itemGap,d=n.indentation+n.itemwidth+h*2,v=2*(c+h),x=FL(n),b=n.y<0||n.y===0&&x==="top",g=n.y>1||n.y===1&&x==="bottom",E=n.tracegroupgap,k={};n._maxHeight=Math.max(b||g?i.height/2:o.h,30);var A=0;n._width=0,n._height=0;var L=bst(n);if(s)r.each(function(ge){var ie=ge[0].height;mh.setTranslate(this,c+L[0],c+L[1]+n._height+ie/2+h),n._height+=ie,n._width=Math.max(n._width,ge[0].width)}),A=d+n._width,n._width+=h+d+f,n._height+=v,l&&(t.each(function(ge,ie){mh.setTranslate(this,0,ie*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var _=zL(n),C=n.x<0||n.x===0&&_==="right",M=n.x>1||n.x===1&&_==="left",p=g||b,P=i.width/2;n._maxWidth=Math.max(C?p&&_==="left"?o.l+o.w:P:M?p&&_==="right"?o.r+o.w:P:o.w,2*d);var T=0,F=0;r.each(function(ge){var ie=IL(ge,n,d);T=Math.max(T,ie),F+=ie}),A=null;var q=0;if(l){var V=0,H=0,X=0;t.each(function(){var ge=0,ie=0;Sp.select(this).selectAll("g.traces").each(function(Ee){var Ae=IL(Ee,n,d),ze=Ee[0].height;mh.setTranslate(this,L[0],L[1]+c+h+ze/2+ie),ie+=ze,ge=Math.max(ge,Ae),k[Ee[0].trace.legendgroup]=ge});var Te=ge+h;H>0&&Te+c+H>n._maxWidth?(q=Math.max(q,H),H=0,X+=V+E,V=ie):V=Math.max(V,ie),mh.setTranslate(this,H,X),H+=Te}),n._width=Math.max(q,H)+c,n._height=X+V+v}else{var G=r.size(),N=F+f+(G-1)*h=n._maxWidth&&(q=Math.max(q,_e),re=0,ae+=W,n._height+=W,W=0),mh.setTranslate(this,L[0]+c+re,L[1]+c+ae+ie/2+h),_e=re+Te+h,re+=Ee,W=Math.max(W,ie)}),N?(n._width=re+f,n._height=W+v):(n._width=Math.max(q,_e)+f,n._height+=W+v)}}n._width=Math.ceil(Math.max(n._width+L[0],n._titleWidth+2*(c+Vh.titlePad))),n._height=Math.ceil(Math.max(n._height+L[1],n._titleHeight+2*(c+Vh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Me=e._context.edits,ke=Me.legendText||Me.legendPosition;r.each(function(ge){var ie=Sp.select(this).select("."+a+"toggle"),Te=ge[0].height,Ee=ge[0].trace.legendgroup,Ae=IL(ge,n,d);l&&Ee!==""&&(Ae=k[Ee]);var ze=ke?d:A||Ae;!s&&!u&&(ze+=h/2),mh.setRect(ie,0,-Te/2,ze,Te)})}function Tst(e,t,r,n){var i=e._fullLayout,a=i[t],o=zL(a),s=FL(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 PB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*O3[o],r:a._width*ole[o],b:a._effHeight*ole[s],t:a._effHeight*O3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function zL(e){return gh.isRightAnchor(e)?"right":gh.isCenterAnchor(e)?"center":"left"}function FL(e){return gh.isBottomAnchor(e)?"bottom":gh.isMiddleAnchor(e)?"middle":"top"}function qL(e){return e._id||"legend"}});var qB=ye(FB=>{"use strict";var Rb=xa(),Sy=uo(),vle=id(),Df=Mr(),Ast=Df.pushUnique,RB=Df.strTranslate,Sst=Df.strRotate,Mst=g3(),A0=Ll(),Est=qse(),bm=ao(),sd=va(),OL=gv(),wm=Qa(),kst=ad().zindexSeparator,U3=ba(),Ag=rp(),zb=IS(),Cst=bB(),Lst=DB(),wle=zb.YANGLE,zB=Math.PI*wle/180,Pst=1/Math.sin(zB),Ist=Math.cos(zB),Dst=Math.sin(zB),Bc=zb.HOVERARROWSIZE,Us=zb.HOVERTEXTPAD,ple={box:!0,ohlc:!0,violin:!0,candlestick:!0},Rst={scatter:!0,scattergl:!0,splom:!0};function gle(e,t){return e.distance-t.distance}FB.hover=function(t,r,n,i){t=Df.getGraphDiv(t);var a=r.target;Df.throttle(t._fullLayout._uid+zb.HOVERID,zb.HOVERMINTIME,function(){zst(t,r,n,i,a)})};FB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Ele(i),o=kle(i),s=t.map(function(b){var g=b._x0||b.x0||b.x||0,E=b._x1||b.x1||b.x||0,k=b._y0||b.y0||b.y||0,A=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var _=Math.min(g,E),C=Math.max(g,E),M=Math.min(k,A),p=Math.max(k,A),P=b.trace;if(U3.traceIs(P,"gl3d")){var T=i._fullLayout[P.scene]._scene.container,F=T.offsetLeft,q=T.offsetTop;_+=F,C+=F,M+=q,p+=q}L.bbox={x0:_+o,x1:C+o,y0:M+a,y1:p+a},r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||sd.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=Ale(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||sd.background,container:Rb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,g){return b.y0-g.y0}).each(function(b,g){var E=b.y0-b.by/2;E-fC[0]._length||ce<0||ce>M[0]._length)return OL.unhoverRaw(e,t)}if(t.pointerX=De+C[0]._offset,t.pointerY=ce+M[0]._offset,"xval"in t?X=Ag.flat(a,t.xval):X=Ag.p2c(C,De),"yval"in t?G=Ag.flat(a,t.yval):G=Ag.p2c(M,ce),!Sy(X[0])||!Sy(G[0]))return Df.warn("Fx.hover failed",t,e),OL.unhoverRaw(e,t)}var ct=1/0;function qt(Ni,_n){for(W=0;WEe&&(V.splice(0,Ee),ct=V[0].distance),f&&q!==0&&V.length===0){Te.distance=q,Te.index=!1;var ft=ae._module.hoverPoints(Te,ge,ie,"closest",{hoverLayer:s._hoverlayer});if(ft&&(ft=ft.filter(function(Vr){return Vr.spikeDistance<=q})),ft&&ft.length){var jt,Zt=ft.filter(function(Vr){return Vr.xa.showspikes&&Vr.xa.spikesnap!=="hovered data"});if(Zt.length){var yr=Zt[0];Sy(yr.x0)&&Sy(yr.y0)&&(jt=ot(yr),(!Ae.vLinePoint||Ae.vLinePoint.spikeDistance>jt.spikeDistance)&&(Ae.vLinePoint=jt))}var Fr=ft.filter(function(Vr){return Vr.ya.showspikes&&Vr.ya.spikesnap!=="hovered data"});if(Fr.length){var Zr=Fr[0];Sy(Zr.x0)&&Sy(Zr.y0)&&(jt=ot(Zr),(!Ae.hLinePoint||Ae.hLinePoint.spikeDistance>jt.spikeDistance)&&(Ae.hLinePoint=jt))}}}}}qt();function rt(Ni,_n,$i){for(var zn=null,Wn=1/0,It,ft=0;ft0&&Math.abs(Ni.distance)dt-1;Nr--)Or(V[Nr]);V=fr,Yt()}var ut=e._hoverdata,Ne=[],Ye=Ele(e),Ve=kle(e);for(N=0;N1||V.length>1)||h==="closest"&&ze&&V.length>1,ri=sd.combine(s.plot_bgcolor||sd.background,s.paper_bgcolor),bi=Ale(V,{gd:e,hovermode:h,rotateLabels:jr,bgColor:ri,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),nn=bi.hoverLabels;if(Ag.isUnifiedHover(h)||(qst(nn,jr,s,bi.commonLabelBoundingBox),Mle(nn,jr,s._invScaleX,s._invScaleY)),i&&i.tagName){var Wi=U3.getComponentMethod("annotations","hasClickToShow")(e,Ne);Est(Rb.select(i),Wi?"pointer":"")}!i||n||!Nst(e,t,ut)||(ut&&e.emit("plotly_unhover",{event:t,points:ut}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:X,yvals:G}))}function Tle(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 Fst=/([\s\S]*)<\/extra>/;function Ale(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,x=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,g=t.fontShadow||n.font.shadow,E=e[0],k=E.xa,A=E.ya,L=i.charAt(0),_=L+"Label",C=E[_];if(C===void 0&&k.type==="multicategory")for(var M=0;Mn.width-ut&&(Ne=n.width-ut),Lt.attr("d","M"+(Br-Ne)+",0L"+(Br-Ne+Bc)+","+Nr+Bc+"H"+ut+"v"+Nr+(Us*2+_r.height)+"H"+-ut+"V"+Nr+Bc+"H"+(Br-Ne-Bc)+"Z"),Br=Ne,W.minX=Br-ut,W.maxX=Br+ut,k.side==="top"?(W.minY=Or-(Us*2+_r.height),W.maxY=Or-Us):(W.minY=Or+Us,W.maxY=Or+(Us*2+_r.height))}else{var Ye,Ve,Xe;A.side==="right"?(Ye="start",Ve=1,Xe="",Br=k._offset+k._length):(Ye="end",Ve=-1,Xe="-",Br=k._offset),Or=A._offset+(E.y0+E.y1)/2,St.attr("text-anchor",Ye),Lt.attr("d","M0,0L"+Xe+Bc+","+Bc+"V"+(Us+_r.height/2)+"h"+Xe+(Us*2+_r.width)+"V-"+(Us+_r.height/2)+"H"+Xe+Bc+"V-"+Bc+"Z"),W.minY=Or-(Us+_r.height/2),W.maxY=Or+(Us+_r.height/2),A.side==="right"?(W.minX=Br+Bc,W.maxX=Br+Bc+(Us*2+_r.width)):(W.minX=Br-Bc-(Us*2+_r.width),W.maxX=Br-Bc);var ht=_r.height/2,Le=P-_r.top-ht,xe="clip"+n._uid+"commonlabel"+A._id,Se;if(Br<_r.width+2*Us+Bc){Se="M-"+(Bc+Us)+"-"+ht+"h-"+(_r.width-Us)+"V"+ht+"h"+(_r.width-Us)+"Z";var lt=_r.width-Br+Us;A0.positionText(St,lt,Le),Ye==="end"&&St.selectAll("tspan").each(function(){var Vt=Rb.select(this),ar=bm.tester.append("text").text(Vt.text()).call(bm.font,fr),Qr=N3(r,ar.node());Math.round(Qr.width)=0?er=kt:Ct+ce=0?er=Ct:Yt+ce=0?Ke=ot:Dt+Ge=0?Ke=Dt:xr+Ge=0,(bt.idealAlign==="top"||!Vt)&&ar?(Xe-=Le/2,bt.anchor="end"):Vt?(Xe+=Le/2,bt.anchor="start"):bt.anchor="middle",bt.crossPos=Xe;else{if(bt.pos=Xe,Vt=Ve+ht/2+Gt<=T,ar=Ve-ht/2-Gt>=0,(bt.idealAlign==="left"||!Vt)&&ar)Ve-=ht/2,bt.anchor="end";else if(Vt)Ve+=ht/2,bt.anchor="start";else{bt.anchor="middle";var Qr=Gt/2,ai=Ve+Qr-T,jr=Ve-Qr;ai>0&&(Ve-=ai),jr<0&&(Ve+=-jr)}bt.crossPos=Ve}Or.attr("text-anchor",bt.anchor),ut&&Nr.attr("text-anchor",bt.anchor),Lt.attr("transform",RB(Ve,Xe)+(a?Sst(wle):""))}),{hoverLabels:xt,commonLabelBoundingBox:W}}function mle(e,t,r,n,i,a){var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=Df.templateString(e.name,e.trace._meta)),o=xle(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);var c=e.hovertemplate||!1;if(c){var f=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(f[l+"other"]=f[l+"Val"],f[l+"otherLabel"]=f[l+"Label"]),s=Df.hovertemplateString(c,f,n._d3locale,e.eventData[0]||{},e.trace._meta),s=s.replace(Fst,function(h,d){return o=xle(d,e.nameLength),""})}return[s,o]}function qst(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,x=function(X){return X*r._invScaleX},b=function(X){return X*r._invScaleY};e.each(function(X){var G=X[i],N=X[a],W=G._id.charAt(0)==="x",re=G.range;c===0&&re&&re[0]>re[1]!==W&&(s=-1);var ae=0,_e=W?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Me=Sle(X,t),ke=X.anchor,ge=ke==="end"?-1:1,ie,Te;if(ke==="middle")ie=X.crossPos+(W?b(Me.y-X.by/2):x(X.bx/2+X.tx2width/2)),Te=ie+(W?b(X.by):x(X.bx));else if(W)ie=X.crossPos+b(Bc+Me.y)-b(X.by/2-Bc),Te=ie+b(X.by);else{var Ee=x(ge*Bc+Me.x),Ae=Ee+x(ge*X.bx);ie=X.crossPos+Math.min(Ee,Ae),Te=X.crossPos+Math.max(Ee,Ae)}W?d!==void 0&&v!==void 0&&Math.min(Te,v)-Math.max(ie,d)>1&&(N.side==="left"?(ae=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Te,h)-Math.max(ie,f)>1&&(N.side==="top"?(ae=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:X,traceIndex:X.trace.index,dp:0,pos:X.pos,posref:X.posref,size:X.by*(W?Pst:1)/2,pmin:ae,pmax:_e}]}),u.sort(function(X,G){return X[0].posref-G[0].posref||s*(G[0].traceIndex-X[0].traceIndex)});var g,E,k,A,L,_,C;function M(X){var G=X[0],N=X[X.length-1];if(E=G.pmin-G.pos-G.dp+G.size,k=N.pos+N.dp+N.size-G.pmax,E>.01){for(L=X.length-1;L>=0;L--)X[L].dp+=E;g=!1}if(!(k<.01)){if(E<-.01){for(L=X.length-1;L>=0;L--)X[L].dp-=k;g=!1}if(g){var W=0;for(A=0;AG.pmax&&W++;for(A=X.length-1;A>=0&&!(W<=0);A--)_=X[A],_.pos>G.pmax-1&&(_.del=!0,W--);for(A=0;A=0;L--)X[L].dp-=k;for(A=X.length-1;A>=0&&!(W<=0);A--)_=X[A],_.pos+_.dp+_.size>G.pmax&&(_.del=!0,W--)}}}for(;!g&&o<=l;){for(o++,g=!0,A=0;A.01){for(L=P.length-1;L>=0;L--)P[L].dp+=E;for(p.push.apply(p,P),u.splice(A+1,1),C=0,L=p.length-1;L>=0;L--)C+=p[L].dp;for(k=C/p.length,L=p.length-1;L>=0;L--)p[L].dp-=k;g=!1}else A++}u.forEach(M)}for(A=u.length-1;A>=0;A--){var q=u[A];for(L=q.length-1;L>=0;L--){var V=q[L],H=V.datum;H.offset=V.dp,H.del=V.del}}}function Sle(e,t){var r=0,n=e.offset;return t&&(n*=-Dst,r=e.offset*Ist),{x:r,y:n}}function Ost(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Bc+Us),n=r+t*(e.txwidth+Us),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+Us),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Mle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=Rb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Ost(o),h=Sle(o,t),d=h.x,v=h.y,x=u==="middle";s.select("path").attr("d",x?"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":"M0,0L"+i(c*Bc+d)+","+a(Bc+v)+"v"+a(o.by/2-Bc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Bc+d)+"V"+a(v-Bc)+"Z");var b=d+f.textShiftX,g=v+o.ty0-o.by/2+Us,E=o.textAlign||"auto";E!=="auto"&&(E==="left"&&u!=="start"?(l.attr("text-anchor","start"),b=x?-o.bx/2-o.tx2width/2+Us:-o.bx-Us):E==="right"&&u!=="end"&&(l.attr("text-anchor","end"),b=x?o.bx/2-o.tx2width/2-Us:o.bx+Us)),l.call(A0.positionText,i(b),a(g)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(f.text2ShiftX+f.alignShift*Us+d),a(v+o.ty0-o.by/2+Us)),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 Bst(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Sy(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=Df.castOption(i,r,h);return o(v)?v:Df.extractOption({},n,"",d)}:function(h,d){return Df.extractOption(a,n,h,d)};function l(h,d,v){var x=s(d,v);o(x)&&(e[h]=x)}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=Df.constrain(e.x0,0,e.xa._length),e.x1=Df.constrain(e.x1,0,e.xa._length),e.y0=Df.constrain(e.y0,0,e.ya._length),e.y1=Df.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 yle(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=sd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var x=c.spikesnap;x==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=vle.readability(h.color,f)<1.5?sd.contrast(f):h.color,g=c.spikemode,E=c.spikethickness,k=c.spikecolor||b,A=wm.getPxPosition(e,c),L,_;if(g.indexOf("toaxis")!==-1||g.indexOf("across")!==-1){if(g.indexOf("toaxis")!==-1&&(L=A,_=d),g.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,_=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:_,y1:v,y2:v,"stroke-width":E,stroke:k,"stroke-dasharray":bm.dashStyle(c.spikedash,E)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:_,y1:v,y2:v,"stroke-width":E+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}g.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:A+(c.side!=="right"?E:-E),cy:v,r:E,fill:k}).classed("spikeline",!0)}if(l){var p=t.vLinePoint,P,T;u=p&&p.xa,c=p&&p.ya;var F=u.spikesnap;F==="cursor"?(P=o.pointerX,T=o.pointerY):(P=u._offset+p.x,T=c._offset+p.y);var q=vle.readability(p.color,f)<1.5?sd.contrast(f):p.color,V=u.spikemode,H=u.spikethickness,X=u.spikecolor||q,G=wm.getPxPosition(e,u),N,W;if(V.indexOf("toaxis")!==-1||V.indexOf("across")!==-1){if(V.indexOf("toaxis")!==-1&&(N=G,W=T),V.indexOf("across")!==-1){var re=u._counterDomainMin,ae=u._counterDomainMax;u.anchor==="free"&&(re=Math.min(re,u.position),ae=Math.max(ae,u.position)),N=a.t+(1-ae)*a.h,W=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:W,"stroke-width":H,stroke:X,"stroke-dasharray":bm.dashStyle(u.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:W,"stroke-width":H+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}V.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:G-(u.side!=="top"?H:-H),r:H,fill:X}).classed("spikeline",!0)}}}function Nst(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))return!0}return!1}function _le(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function xle(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Ust(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;o{"use strict";var Vst=Mr(),Hst=va(),Gst=rp().isUnifiedHover;Cle.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&&Gst(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=Hst.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),Vst.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Ple=ye((Brr,Lle)=>{"use strict";var jst=Mr(),Wst=oM(),Zst=B1();Lle.exports=function(t,r){function n(i,a){return jst.coerce(t,r,Zst,i,a)}Wst(t,r,n)}});var Rle=ye((Nrr,Dle)=>{"use strict";var Ile=Mr(),Xst=i3(),Yst=oM();Dle.exports=function(t,r,n,i){function a(s,l){return Ile.coerce(t,r,Xst,s,l)}var o=Ile.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Yst(t,r,a,o)}});var OB=ye((Urr,zle)=>{"use strict";var Kst=Mr(),Jst=B1();zle.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Kst.coerce(t,r,Jst,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var Ole=ye((Vrr,qle)=>{"use strict";var Fle=Mr(),$st=B1(),Qst=OB(),elt=oM();qle.exports=function(t,r){function n(c,f){return Fle.coerce(t,r,$st,c,f)}var i=Qst(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"),elt(t,r,n),Fle.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Ule=ye((Hrr,Nle)=>{"use strict";var BB=Mr(),Ble=ba();Nle.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return BB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a{"use strict";var rlt=ba(),ilt=qB().hover;Vle.exports=function(t,r,n){var i=rlt.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&ilt(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 Nc=ye((jrr,Wle)=>{"use strict";var nlt=xa(),BL=Mr(),alt=gv(),sM=rp(),Gle=B1(),jle=qB();Wle.exports={moduleType:"component",name:"fx",constants:IS(),schema:{layout:Gle},attributes:i3(),layoutAttributes:Gle,supplyLayoutGlobalDefaults:Ple(),supplyDefaults:Rle(),supplyLayoutDefaults:Ole(),calc:Ule(),getDistanceFunction:sM.getDistanceFunction,getClosest:sM.getClosest,inbox:sM.inbox,quadrature:sM.quadrature,appendArrayPointValue:sM.appendArrayPointValue,castHoverOption:slt,castHoverinfo:llt,hover:jle.hover,unhover:alt.unhover,loneHover:jle.loneHover,loneUnhover:olt,click:Hle()};function olt(e){var t=BL.isD3Selection(e)?e:nlt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function slt(e,t,r){return BL.castOption(e,t,"hoverlabel."+r)}function llt(e,t,r){function n(i){return BL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return BL.castOption(e,r,"hoverinfo",n)}});var Sg=ye(My=>{"use strict";My.selectMode=function(e){return e==="lasso"||e==="select"};My.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};My.openMode=function(e){return e==="drawline"||e==="drawopenpath"};My.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};My.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};My.selectingOrDrawing=function(e){return My.freeMode(e)||My.rectMode(e)}});var lM=ye((Zrr,Zle)=>{"use strict";Zle.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 NL=ye((Xrr,Xle)=>{"use strict";Xle.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 VL=ye((Yrr,Yle)=>{"use strict";var UL=32;Yle.exports={CIRCLE_SIDES:UL,i000:0,i090:UL/4,i180:UL/2,i270:UL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var HL=ye((Krr,Jle)=>{"use strict";var ult=Mr().strTranslate;function Kle(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 clt(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 flt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return Kle(e,r[t])}}function hlt(e){return ult(e.xaxis._offset,e.yaxis._offset)}Jle.exports={p2r:Kle,r2p:clt,axValue:flt,getTransform:hlt}});var u_=ye(Ey=>{"use strict";var dlt=XS(),eue=VL(),V3=eue.CIRCLE_SIDES,NB=eue.SQRT2,tue=HL(),$le=tue.p2r,Qle=tue.r2p,vlt=[0,3,4,5,6,1,2],plt=[0,3,4,1,2];Ey.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var oue=Sg(),glt=oue.drawMode,mlt=oue.openMode,H3=VL(),rue=H3.i000,iue=H3.i090,nue=H3.i180,aue=H3.i270,ylt=H3.cos45,_lt=H3.sin45,sue=HL(),jL=sue.p2r,c_=sue.r2p,xlt=Q1(),blt=xlt.clearOutline,WL=u_(),wlt=WL.readPaths,Tlt=WL.writePaths,Alt=WL.ellipseOver,Slt=WL.fixDatesForPaths;function Mlt(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(!glt(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var Elt=Sg(),klt=Elt.selectMode,Clt=Q1(),Llt=Clt.clearOutline,UB=u_(),Plt=UB.readPaths,Ilt=UB.writePaths,Dlt=UB.fixDatesForPaths;cue.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(!klt(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";fue.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(Ld=>{"use strict";var Fb=cM(),hue=Mr(),XL=Qa();Ld.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Ld.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Ld.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Ld.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Ld.extractPathCoords=function(e,t,r){var n=[],i=e.match(Fb.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.substr(1).match(Fb.paramRE);if(!(!s||s.lengthd&&(x="X"),x});return u>d&&(v=v.replace(/[\s,]*X.*/,""),hue.log("Ignoring extra params in segment "+l)),c+v})}function fM(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 GB=ye((rir,gue)=>{"use strict";var zlt=Mr(),G3=Qa(),due=Ll(),vue=ao(),Flt=u_().readPaths,HB=f_(),qlt=HB.getPathString,pue=x6(),Olt=Nh().FROM_TL;gue.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=G3.getFromId(t,n.xref),l=G3.getFromId(t,n.yref);for(var u in pue){var c=pue[u](n,s,l);c!==void 0&&(o[u]=c)}}a=zlt.texttemplateStringForShapes(n.label.texttemplate,{},t._fullLayout._d3locale,o)}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),x=v.append("text").attr(d).classed("shape-label-text",!0).text(a),b,g,E,k;if(n.path){var A=qlt(t,n),L=Flt(A,t);b=1/0,E=1/0,g=-1/0,k=-1/0;for(var _=0;_=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Nlt(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,x=i.label.yanchor,b,g,E,k;if(c==="line"){s==="start"?(b=e,g=t):s==="end"?(b=r,g=n):(b=(e+r)/2,g=(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 Ult=Mr(),Vlt=Ult.strTranslate,mue=gv(),xue=Sg(),Hlt=xue.drawMode,bue=xue.selectMode,wue=ba(),yue=va(),KL=VL(),Glt=KL.i000,jlt=KL.i090,Wlt=KL.i180,Zlt=KL.i270,Xlt=Q1(),Tue=Xlt.clearOutlineControllers,WB=u_(),YL=WB.pointsOnRectangle,jB=WB.pointsOnEllipse,Ylt=WB.writePaths,Klt=ZL().newShapes,Jlt=ZL().createShapeObj,$lt=VB(),Qlt=GB();Aue.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(G){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Klt(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=$lt(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&wue.call((G||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Hlt(c),h=bue(c);(f||h)&&(a._fullLayout._outlining=!0),Tue(a),r.attr("d",Ylt(t));var d,v,x,b,g;if(!i&&(n.isActiveShape||n.isActiveSelection)){g=eut([],t);var E=u.append("g").attr("class","outline-controllers");P(E),X()}if(f&&n.hasText){var k=u.select(".label-temp"),A=Jlt(r,n,n.dragmode);Qlt(a,"label-temp",A,k)}function L(G){x=+G.srcElement.getAttribute("data-i"),b=+G.srcElement.getAttribute("data-j"),d[x][b].moveFn=_}function _(G,N){if(t.length){var W=g[x][b][1],re=g[x][b][2],ae=t[x],_e=ae.length;if(YL(ae)){var Me=G,ke=N;if(n.isActiveSelection){var ge=_ue(ae,b);ge[1]===ae[b][1]?ke=0:Me=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Te=ae[ie];Te[1]===ae[b][1]&&(Te[1]=W+Me),Te[2]===ae[b][2]&&(Te[2]=re+ke)}if(ae[b][1]=W+Me,ae[b][2]=re+ke,!YL(ae))for(var Ee=0;Ee<_e;Ee++)for(var Ae=0;Ae1&&!(G.length===2&&G[1][0]==="Z")&&(b===0&&(G[0][0]="M"),t[x]=G,o(),s())}}function p(G,N){if(G===2){x=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var W=t[x];!YL(W)&&!jB(W)&&M()}}function P(G){d=[];for(var N=0;N{"use strict";var rut=xa(),Lue=ba(),Sue=Mr(),j3=Qa(),iut=u_().readPaths,nut=JL(),QL=GB(),Pue=Q1().clearOutlineControllers,ZB=va(),YB=ao(),aut=Vs().arrayEditor,Mue=gv(),Eue=Tg(),qb=cM(),Mp=f_(),XB=Mp.getPathString;Rue.exports={draw:KB,drawOne:Iue,eraseActiveShape:lut,drawLabel:QL};function KB(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&&kt>s&&!rt.shiftKey?Mue.getCursor(Ct/Dt,1-Yt/kt):"move";Eue(t,xr),Te=xr.split("-")[0]}}function Ce(rt){$L(e)||(l&&(g=ae(r.xanchor)),u&&(E=_e(r.yanchor)),r.type==="path"?T=r.path:(d=l?r.x0:ae(r.x0),v=u?r.y0:_e(r.y0),x=l?r.x1:ae(r.x1),b=u?r.y1:_e(r.y1)),db?(k=v,C="y0",A=b,M="y1"):(k=b,C="y1",A=v,M="y0"),ze(rt),nt(i,r),qt(t,r,e),ie.moveFn=Te==="move"?ce:Ge,ie.altKey=rt.altKey)}function me(){$L(e)||(Eue(t),ct(i),Due(t,e,r),Lue.call("_guiRelayout",e,a.getUpdateObj()))}function De(){$L(e)||ct(i)}function ce(rt,ot){if(r.type==="path"){var Dt=function(Yt){return Yt},kt=Dt,Ct=Dt;l?h("xanchor",r.xanchor=Me(g+rt)):(kt=function(xr){return Me(ae(xr)+rt)},q&&q.type==="date"&&(kt=Mp.encodeDate(kt))),u?h("yanchor",r.yanchor=ke(E+ot)):(Ct=function(xr){return ke(_e(xr)+ot)},H&&H.type==="date"&&(Ct=Mp.encodeDate(Ct))),h("path",r.path=kue(T,kt,Ct))}else l?h("xanchor",r.xanchor=Me(g+rt)):(h("x0",r.x0=Me(d+rt)),h("x1",r.x1=Me(x+rt))),u?h("yanchor",r.yanchor=ke(E+ot)):(h("y0",r.y0=ke(v+ot)),h("y1",r.y1=ke(b+ot)));t.attr("d",XB(e,r)),nt(i,r),QL(e,n,r,F)}function Ge(rt,ot){if(f){var Dt=function(_r){return _r},kt=Dt,Ct=Dt;l?h("xanchor",r.xanchor=Me(g+rt)):(kt=function(Br){return Me(ae(Br)+rt)},q&&q.type==="date"&&(kt=Mp.encodeDate(kt))),u?h("yanchor",r.yanchor=ke(E+ot)):(Ct=function(Br){return ke(_e(Br)+ot)},H&&H.type==="date"&&(Ct=Mp.encodeDate(Ct))),h("path",r.path=kue(T,kt,Ct))}else if(c){if(Te==="resize-over-start-point"){var Yt=d+rt,xr=u?v-ot:v+ot;h("x0",r.x0=l?Yt:Me(Yt)),h("y0",r.y0=u?xr:ke(xr))}else if(Te==="resize-over-end-point"){var er=x+rt,Ke=u?b-ot:b+ot;h("x1",r.x1=l?er:Me(er)),h("y1",r.y1=u?Ke:ke(Ke))}}else{var xt=function(_r){return Te.indexOf(_r)!==-1},bt=xt("n"),Lt=xt("s"),St=xt("w"),Et=xt("e"),dt=bt?k+ot:k,Ht=Lt?A+ot:A,$t=St?L+rt:L,fr=Et?_+rt:_;u&&(bt&&(dt=k-ot),Lt&&(Ht=A-ot)),(!u&&Ht-dt>s||u&&dt-Ht>s)&&(h(C,r[C]=u?dt:ke(dt)),h(M,r[M]=u?Ht:ke(Ht))),fr-$t>o&&(h(p,r[p]=l?$t:Me($t)),h(P,r[P]=l?fr:Me(fr)))}t.attr("d",XB(e,r)),nt(i,r),QL(e,n,r,F)}function nt(rt,ot){(l||u)&&Dt();function Dt(){var kt=ot.type!=="path",Ct=rt.selectAll(".visual-cue").data([0]),Yt=1;Ct.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Yt}).classed("visual-cue",!0);var xr=ae(l?ot.xanchor:Sue.midRange(kt?[ot.x0,ot.x1]:Mp.extractPathCoords(ot.path,qb.paramIsX))),er=_e(u?ot.yanchor:Sue.midRange(kt?[ot.y0,ot.y1]:Mp.extractPathCoords(ot.path,qb.paramIsY)));if(xr=Mp.roundPositionForSharpStrokeRendering(xr,Yt),er=Mp.roundPositionForSharpStrokeRendering(er,Yt),l&&u){var Ke="M"+(xr-1-Yt)+","+(er-1-Yt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ct.attr("d",Ke)}else if(l){var xt="M"+(xr-1-Yt)+","+(er-9-Yt)+"v18 h2 v-18 Z";Ct.attr("d",xt)}else{var bt="M"+(xr-9-Yt)+","+(er-1-Yt)+"h18 v2 h-18 Z";Ct.attr("d",bt)}}}function ct(rt){rt.selectAll(".visual-cue").remove()}function qt(rt,ot,Dt){var kt=ot.xref,Ct=ot.yref,Yt=j3.getFromId(Dt,kt),xr=j3.getFromId(Dt,Ct),er="";kt!=="paper"&&!Yt.autorange&&(er+=kt),Ct!=="paper"&&!xr.autorange&&(er+=Ct),YB.setClipUrl(rt,er?"clip"+Dt._fullLayout._uid+er:null,Dt)}}function kue(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.substr(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 sut(e,t){if(eP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Cue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Cue,KB(e)}}}function Cue(e){if(eP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Pue(e),delete e._fullLayout._activeShapeIndex,KB(e))}}function lut(e){if(eP(e)){Pue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=ba(),zue=Yu(),Fue=af(),al=NL(),uut=tP().eraseActiveShape,rP=Mr(),Os=rP._,ol=Hue.exports={};ol.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Os(e,"Download plot as a png"):Os(e,"Download plot")},icon:al.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};rP.notifier(Os(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){rP.notifier(Os(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){rP.notifier(Os(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};ol.sendDataToCloud={name:"sendDataToCloud",title:function(e){return Os(e,"Edit in Chart Studio")},icon:al.disk,click:function(e){zue.sendDataToCloud(e)}};ol.editInChartStudio={name:"editInChartStudio",title:function(e){return Os(e,"Edit in Chart Studio")},icon:al.pencil,click:function(e){zue.sendDataToCloud(e)}};ol.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Os(e,"Zoom")},attr:"dragmode",val:"zoom",icon:al.zoombox,click:Ov};ol.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Os(e,"Pan")},attr:"dragmode",val:"pan",icon:al.pan,click:Ov};ol.select2d={name:"select2d",_cat:"select",title:function(e){return Os(e,"Box Select")},attr:"dragmode",val:"select",icon:al.selectbox,click:Ov};ol.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Os(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:al.lasso,click:Ov};ol.drawclosedpath={name:"drawclosedpath",title:function(e){return Os(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:al.drawclosedpath,click:Ov};ol.drawopenpath={name:"drawopenpath",title:function(e){return Os(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:al.drawopenpath,click:Ov};ol.drawline={name:"drawline",title:function(e){return Os(e,"Draw line")},attr:"dragmode",val:"drawline",icon:al.drawline,click:Ov};ol.drawrect={name:"drawrect",title:function(e){return Os(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:al.drawrect,click:Ov};ol.drawcircle={name:"drawcircle",title:function(e){return Os(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:al.drawcircle,click:Ov};ol.eraseshape={name:"eraseshape",title:function(e){return Os(e,"Erase active shape")},icon:al.eraseshape,click:uut};ol.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Os(e,"Zoom in")},attr:"zoom",val:"in",icon:al.zoom_plus,click:Ov};ol.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Os(e,"Zoom out")},attr:"zoom",val:"out",icon:al.zoom_minus,click:Ov};ol.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Os(e,"Autoscale")},attr:"zoom",val:"auto",icon:al.autoscale,click:Ov};ol.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Os(e,"Reset axes")},attr:"zoom",val:"reset",icon:al.home,click:Ov};ol.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Os(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:al.tooltip_basic,gravity:"ne",click:Ov};ol.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Os(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:al.tooltip_compare,gravity:"ne",click:Ov};function Ov(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Fue.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 Gue=QB(),hut=Object.keys(Gue),jue=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Wue=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(jue),Z3=[],dut=function(e){if(Wue.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Z3.indexOf(t)===-1&&Z3.push(t),Z3.indexOf(r)===-1&&Z3.push(r)}};hut.forEach(function(e){dut(Gue[e])});Z3.sort();Zue.exports={DRAW_MODES:jue,backButtons:Wue,foreButtons:Z3}});var tN=ye((lir,Xue)=>{"use strict";var sir=eN();Xue.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 Kue=ye((uir,Yue)=>{"use strict";var vut=Mr(),hM=va(),put=Vs(),gut=tN();Yue.exports=function(t,r){var n=t.modebar||{},i=put.newContainer(r,"modebar");function a(s,l){return vut.coerce(n,i,gut,s,l)}a("orientation"),a("bgcolor",hM.addOpacity(r.paper_bgcolor,.5));var o=hM.contrast(hM.rgb(r.modebar.bgcolor));a("color",hM.addOpacity(o,.3)),a("activecolor",hM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var ece=ye((cir,Que)=>{"use strict";var rN=xa(),mut=uo(),nP=Mr(),Jue=NL(),yut=QC().version,_ut=new DOMParser;function $ue(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Tm=$ue.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._uid=i,this.element.className="modebar",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}),nP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color);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()};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("a");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),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&&rN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Jue.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Tm.createIcon=function(e){var t=mut(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=_ut.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=rN.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:nP.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 wut=af(),tce=lu(),iN=ba(),Tut=rp().isUnifiedHover,Aut=ece(),aP=QB(),Sut=eN().DRAW_MODES,Mut=Mr().extendDeep;rce.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=Iut(a):!n.displayModeBar&&n.watermark?o=[]:o=Eut(t),i?i.update(t,o):r._modeBar=Aut(t,o)};function Eut(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,W){if(typeof W=="string"){if(W.toLowerCase()===N.toLowerCase())return!0}else{var re=W.name,ae=W._cat||W.name;if(re===N||ae===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 W=0;W1?(P=["toggleHover"],T=["resetViews"]):f?(p=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],T=["resetGeo"]):c?(P=["hoverClosest3d"],T=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(p=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],T=["resetViewMapbox"]):b?(p=["zoomInMap","zoomOutMap"],P=["toggleHover"],T=["resetViewMap"]):h?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],T=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Lut(r)||L)&&(P=[]),u&&!A&&(p=["zoomIn2d","zoomOut2d","autoScale2d"],T[0]!=="resetViews"&&(T=["resetScale2d"])),c?F=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!A||v?F=["zoom2d","pan2d"]:x||b||f?F=["pan2d"]:g&&(F=["zoom2d"]),Cut(r)&&F.push("select2d","lasso2d");var q=[],V=function(N){q.indexOf(N)===-1&&P.indexOf(N)!==-1&&q.push(N)};if(Array.isArray(s)){for(var H=[],X=0;X{"use strict";nce.exports={moduleType:"component",name:"modebar",layoutAttributes:tN(),supplyLayoutDefaults:Kue(),manage:ice()}});var aN=ye((dir,ace)=>{"use strict";var Dut=Nh().FROM_BL;ace.exports=function(t,r,n){n===void 0&&(n=Dut[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 Bb=ye(dM=>{"use strict";var Ob=Mr(),oN=wg(),Mg=af().id2name,Rut=Cd(),oce=aN(),zut=ym(),Fut=es().ALMOST_EQUAL,qut=Nh().FROM_BL;dM.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.substr(a):n.substr(i))+o}function But(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;oFut*v&&!E)){for(a=0;aF&&reP&&(P=re);var _e=(P-p)/(2*T);f/=_e,p=l.l2r(p),P=l.l2r(P),l.range=l._input.range=_{"use strict";var sP=xa(),Bv=ba(),Jp=Yu(),M0=Mr(),uN=Ll(),cN=lM(),vM=va(),X3=ao(),cce=Mb(),pce=nN(),pM=Qa(),ky=Nh(),gce=Bb(),Nut=gce.enforce,Uut=gce.clean,fce=wg().doAutoRange,mce="start",Vut="middle",yce="end",Hut=ad().zindexSeparator;ld.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,jut],e)};function Gut(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function jut(e){var t=e._fullLayout,r=t._size,n=r.p,i=pM.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(X3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),ld.drawMainTitle(e),pce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Ce,me,De){var ce=Ce._lw/2;if(Ce._id.charAt(0)==="x"){if(me){if(De==="top")return me._offset-n-ce}else return r.t+r.h*(1-(Ce.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(De==="right")return me._offset+me._length+n+ce}else return r.l+r.w*(Ce.position||0)+ce%1;return me._offset-n-ce}for(a=0;a0){Yut(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:vce(t.yanchor)}).call(uN.positionText,o,a);var c=(t.text.match(uN.BR_TAG_ALL)||[]).length;if(c){var f=ky.LINE_SPACING*c+ky.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=sP.selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,x=v+cce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:x,"text-anchor":n,dy:vce(t.yanchor)}).call(uN.positionText,o,x)}}}};function Wut(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.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=Zut(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Yut(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"&&Wut(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 Kut(e,t){var r=e.title,n=e._size,i=0;switch(t===mce?i=r.pad.l:t===yce&&(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 Jut(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===ky.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 vce(e){return e==="top"?ky.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ky.MID_SHIFT+"em"}function $ut(e){var t=e.title,r=Vut;return M0.isRightAnchor(t)?r=yce:M0.isLeftAnchor(t)&&(r=mce),r}function Qut(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=ky.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=ky.MID_SHIFT+"em"),r}ld.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var ect=u_().readPaths,tct=JL(),_ce=Q1().clearOutlineControllers,fN=va(),xce=ao(),rct=Vs().arrayEditor,bce=f_(),ict=bce.getPathString;Tce.exports={draw:lP,drawOne:wce,activateLastSelection:oct};function lP(e){var t=e._fullLayout;_ce(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 g=o.append("path").attr(l).style("opacity",b?.1:u).call(fN.stroke,f).call(fN.fill,c).call(xce.dashLine,b?"solid":d,b?4+h:h);if(nct(g,e,n),v){var E=rct(e.layout,"selections",n);g.style({cursor:"move"});var k={element:g.node(),plotinfo:i,gd:e,editHelpers:E,isActiveSelection:!0},A=ect(s,e);tct(A,g,k)}else g.style("pointer-events",b?"all":"none");x[b]=g}var L=x[0],_=x[1];_.node().addEventListener("click",function(){return act(e,L)})}}function nct(e,t,r){var n=r.xref+r.yref;xce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function act(e,t){if(uP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){hN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=hN,lP(e)}}}function oct(e){if(uP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=hN,lP(e)}}function hN(e){if(uP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(_ce(e),delete e._fullLayout._activeSelectionIndex,lP(e))}}});var Sce=ye((mir,Ace)=>{function sct(){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}Ace.exports=sct});var Ece=ye((yir,Mce)=>{function lct(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}Mce.exports=lct});var Cce=ye((_ir,kce)=>{var uct={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}};kce.exports=uct});var Pce=ye((xir,Lce)=>{var mM=Cce();function cct(e,t,r){function n(v,x){return{id:r?r.segmentId():-1,start:v,end:x,myFill:{above:null,below:null},otherFill:null}}function i(v,x,b){return{id:r?r.segmentId():-1,start:v,end:x,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=mM.create();function o(v,x,b,g,E,k){var A=t.pointsCompare(x,E);return A!==0?A:t.pointsSame(b,k)?0:v!==g?v?1:-1:t.pointAboveOrOnLine(b,g?E:k,g?k:E)?1:-1}function s(v,x){a.insertBefore(v,function(b){var g=o(v.isStart,v.pt,x,b.isStart,b.pt,b.other.pt);return g<0})}function l(v,x){var b=mM.node({isStart:!0,pt:v.start,seg:v,primary:x,other:null,status:null});return s(b,v.end),b}function u(v,x,b){var g=mM.node({isStart:!1,pt:x.end,seg:x,primary:b,other:v,status:null});v.other=g,s(g,v.pt)}function c(v,x){var b=l(v,x);return u(b,v,x),b}function f(v,x){r&&r.segmentChop(v.seg,x),v.other.remove(),v.seg.end=x,v.other.pt=x,s(v.other,v.pt)}function h(v,x){var b=i(x,v.seg.end,v.seg);return f(v,x),c(b,v.primary)}function d(v,x){var b=mM.create();function g(H,X){var G=H.seg.start,N=H.seg.end,W=X.seg.start,re=X.seg.end;return t.pointsCollinear(G,W,re)?t.pointsCollinear(N,W,re)||t.pointAboveOrOnLine(N,W,re)?1:-1:t.pointAboveOrOnLine(G,W,re)?1:-1}function E(H){return b.findTransition(function(X){var G=g(H,X.ev);return G>0})}function k(H,X){var G=H.seg,N=X.seg,W=G.start,re=G.end,ae=N.start,_e=N.end;r&&r.checkIntersection(G,N);var Me=t.linesIntersect(W,re,ae,_e);if(Me===!1){if(!t.pointsCollinear(W,re,ae)||t.pointsSame(W,_e)||t.pointsSame(re,ae))return!1;var ke=t.pointsSame(W,ae),ge=t.pointsSame(re,_e);if(ke&&ge)return X;var ie=!ke&&t.pointBetween(W,ae,_e),Te=!ge&&t.pointBetween(re,ae,_e);if(ke)return Te?h(X,re):h(H,_e),X;ie&&(ge||(Te?h(X,re):h(H,_e)),h(X,W))}else Me.alongA===0&&(Me.alongB===-1?h(H,ae):Me.alongB===0?h(H,Me.pt):Me.alongB===1&&h(H,_e)),Me.alongB===0&&(Me.alongA===-1?h(X,W):Me.alongA===0?h(X,Me.pt):Me.alongA===1&&h(X,re));return!1}for(var A=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let H=function(){if(C){var X=k(L,C);if(X)return X}return M?k(L,M):!1};var V=H;r&&r.segmentNew(L.seg,L.primary);var _=E(L),C=_.before?_.before.ev:null,M=_.after?_.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var p=H();if(p){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(p.seg.myFill.above=!p.seg.myFill.above)}else p.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(p.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?x:v,L.seg.otherFill={above:T,below:T}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=_.insert(mM.node({ev:L}))}else{var F=L.status;if(F===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(F.prev)&&b.exists(F.next)&&k(F.prev.ev,F.next.ev),r&&r.statusRemove(F.ev.seg),F.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}A.push(L.seg)}a.getHead().remove()}return r&&r.done(),A}return e?{addRegion:function(v){for(var x,b=v[v.length-1],g=0;g{function fct(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,H,X){return c.index=V,c.matches_head=H,c.matches_pt1=X,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function yM(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 hct={union:function(e,t){return yM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return yM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return yM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return yM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return yM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Rce.exports=hct});var qce=ye((Tir,Fce)=>{var dct={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 vct=Sce(),pct=Ece(),Oce=Pce(),gct=Dce(),_M=zce(),Bce=qce(),E0=!1,xM=pct(),Ep;Ep={buildLog:function(e){return e===!0?E0=vct():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return xM.epsilon(e)},segments:function(e){var t=Oce(!0,xM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Oce(!1,xM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:_M.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:_M.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:_M.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:_M.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:_M.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:gct(e.segments,xM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Bce.toPolygon(Ep,e)},polygonToGeoJSON:function(e){return Bce.fromPolygon(Ep,xM,e)},union:function(e,t){return bM(e,t,Ep.selectUnion)},intersect:function(e,t){return bM(e,t,Ep.selectIntersect)},difference:function(e,t){return bM(e,t,Ep.selectDifference)},differenceRev:function(e,t){return bM(e,t,Ep.selectDifferenceRev)},xor:function(e,t){return bM(e,t,Ep.selectXor)}};function bM(e,t,r){var n=Ep.segments(e),i=Ep.segments(t),a=Ep.combine(n,i),o=r(a);return Ep.polygon(o)}typeof window=="object"&&(window.PolyBool=Ep);Nce.exports=Ep});var Hce=ye((Sir,Vce)=>{Vce.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;x&&(s=!s)}return s}});var wM=ye((Mir,Gce)=>{"use strict";var vN=g6().dot,cP=es().BADNUM,fP=Gce.exports={};fP.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||g===cP||go||x&&u(v))}function f(v,x){var b=v[0],g=v[1];if(b===cP||bi||g===cP||go)return!1;var E=r.length,k=r[0][0],A=r[0][1],L=0,_,C,M,p,P;for(_=1;_Math.max(C,k)||g>Math.max(M,A)))if(gs||Math.abs(vN(f,u))>i)return!0;return!1};fP.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 Wce=ye((Eir,jce)=>{"use strict";jce.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var vfe=ye((kir,dfe)=>{"use strict";var Zce=Uce(),mct=Hce(),SM=ba(),yct=ao().dashStyle,TM=va(),_ct=Nc(),xct=rp().makeEventData,LM=Sg(),bct=LM.freeMode,wct=LM.rectMode,MM=LM.drawMode,yN=LM.openMode,_N=LM.selectMode,Xce=f_(),Yce=cM(),efe=JL(),tfe=Q1().clearOutline,rfe=u_(),pN=rfe.handleEllipse,Tct=rfe.readPaths,Act=ZL().newShapes,Sct=VB(),Mct=dN().activateLastSelection,dP=Mr(),Ect=dP.sorterAsc,ife=wM(),AM=L6(),k0=af().getFromId,kct=lM(),Cct=gM().redrawReglTraces,vP=Wce(),Am=vP.MINSELECT,Lct=ife.filter,xN=ife.tester,bN=HL(),Kce=bN.p2r,Pct=bN.axValue,Ict=bN.getTransform;function wN(e){return e.subplot!==void 0}function Dct(e,t,r,n,i){var a=!wN(n),o=bct(i),s=wct(i),l=yN(i),u=MM(i),c=_N(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,x=v._fullLayout,b=c&&x.newselection.mode==="immediate"&&a,g=x._zoomlayer,E=n.element.getBoundingClientRect(),k=n.plotinfo,A=Ict(k),L=t-E.left,_=r-E.top;x._calcInverseTransform(v);var C=dP.apply3DTransform(x._invTransform)(L,_);L=C[0],_=C[1];var M=x._invScaleX,p=x._invScaleY,P=L,T=_,F="M"+L+","+_,q=n.xaxes[0],V=n.yaxes[0],H=q._length,X=V._length,G=e.altKey&&!(MM(i)&&l),N,W,re,ae,_e,Me,ke;afe(e,v,n),o&&(N=Lct([[L,_]],vP.BENDPX));var ge=g.selectAll("path.select-outline-"+k.id).data([1]),ie=u?x.newshape:x.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Te=u&&!l?ie.fillcolor:"rgba(0,0,0,0)",Ee=ie.line.color||(a?TM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:u?ie.opacity/2:1,"stroke-dasharray":yct(ie.line.dash,ie.line.width),"stroke-width":ie.line.width+"px","shape-rendering":"crispEdges"}).call(TM.stroke,Ee).call(TM.fill,Te).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",A).attr("d",F+"Z");var Ae=g.append("path").attr("class","zoombox-corners").style({fill:TM.background,stroke:TM.defaultLine,"stroke-width":1}).attr("transform",A).attr("d","M0,0Z");if(u&&n.hasText){var ze=g.select(".label-temp");ze.empty()&&(ze=g.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ce=x._uid+vP.SELECTID,me=[],De=pP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var Ge=q._id,nt=V._id;cfe(v,Ge,nt,De);for(var ct=(v.layout||{}).selections||[],qt=[],rt=!1,ot=0;ot=0){v._fullLayout._deactivateShape(v);return}if(!u){var ct=x.clickmode;AM.done(Ce).then(function(){if(AM.clear(Ce),Ge===2){for(ge.remove(),_e=0;_e-1&&nfe(nt,v,n.xaxes,n.yaxes,n.subplot,n,ge),ct==="event"&&CM(v,void 0);_ct.click(v,nt,k.id)}).catch(dP.error)}},n.doneFn=function(){Ae.remove(),AM.done(Ce).then(function(){AM.clear(Ce),!b&&ae&&n.selectionDefs&&(ae.subtract=G,n.selectionDefs.push(ae),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&EM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&CM(v,ke)}).catch(dP.error)}}function nfe(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,x,b,g,E,k,A,L;if(Oct(s)){afe(e,t,a),h=pP(t,r,n,i);var _=Bct(s,h),C=_.pointNumbers.length>0;if(C?Nct(h,_):Uct(h)&&(E=$ce(_))){for(o&&o.remove(),L=0;L=0}function qct(e){return e._fullLayout._activeSelectionIndex>=0}function EM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;Fct(i)&&i._fullLayout._deactivateShape(i),qct(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=MM(r),l=_N(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=Act(u,e)),c&&SM.call("_guiRelayout",i,{shapes:c});var f;l&&!wN(e)&&(f=Sct(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,SM.call("_guiRelayout",i,{selections:f}).then(function(){t&&Mct(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Jce(e){return e._id}function pP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(Jce),o=r.map(Jce),s,l,u;for(u=0;u0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Nct(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 kM(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var Ge=Qce(e,!0);if(Ge.length){var nt=Ge[0].xref,ct=Ge[0].yref;if(nt&&ct){var qt=ffe(Ge),rt=hfe([k0(e,nt,"x"),k0(e,ct,"y")]);rt(me,qt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&CM(e,me),h._reselect=!1}if(!o&&h._deselect){var ot=h._deselect;s=ot.xref,l=ot.yref,Gct(s,l,c)||cfe(e,s,l,n),ce&&(me.points.length?CM(e,me):SN(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Hct(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 PM=ye((Lir,gfe)=>{"use strict";gfe.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 Nb=ye((Iir,_fe)=>{"use strict";var mfe=MN(),yfe=Su(),gP=ad(),Yct=Vs().templatedArray,Pir=PM();_fe.exports=Yct("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:yfe({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:mfe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:mfe.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",gP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",gP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",gP.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",gP.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:yfe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Sm=ye((Dir,xfe)=>{"use strict";xfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Eg=ye((Rir,bfe)=>{"use strict";bfe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Uc=ye((zir,Efe)=>{"use strict";var wfe=Oc().axisHoverFormat,Kct=Wo().texttemplateAttrs,Jct=Wo().hovertemplateAttrs,Tfe=Kl(),$ct=Su(),Qct=Ed().dash,eft=Ed().pattern,tft=ao(),rft=Sm(),mP=no().extendFlat,ift=Eg();function Afe(e){return{valType:"any",dflt:0,editType:"calc"}}function Sfe(e){return{valType:"any",editType:"calc"}}function Mfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Efe.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:Afe("x"),yperiod:Afe("y"),xperiod0:Sfe("x0"),yperiod0:Sfe("y0"),xperiodalignment:Mfe("x"),yperiodalignment:Mfe("y"),xhoverformat:wfe("x"),yhoverformat:wfe("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:Kct({},{}),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:Jct({},{keys:rft.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:mP({},Qct,{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:ift(!0),fillgradient:mP({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:eft,marker:mP({symbol:{valType:"enumerated",values:tft.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:mP({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},Tfe("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"},Tfe("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:$ct({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var EN=ye((qir,Lfe)=>{"use strict";var kfe=Nb(),Cfe=Uc().line,nft=Ed().dash,yP=no().extendFlat,aft=Bu().overrideAll,oft=Vs().templatedArray,Fir=PM();Lfe.exports=aft(oft("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:yP({},kfe.xref,{}),yref:yP({},kfe.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:Cfe.color,width:yP({},Cfe.width,{min:1,dflt:1}),dash:yP({},nft,{dflt:"dot"})}}),"arraydraw","from-root")});var Rfe=ye((Oir,Dfe)=>{"use strict";var Pfe=Mr(),_P=Qa(),sft=Zd(),lft=EN(),Ife=f_();Dfe.exports=function(t,r){sft(t,r,{name:"selections",handleItemDefaults:uft});for(var n=r.selections,i=0;i{"use strict";zfe.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 IM=ye((Nir,Bfe)=>{"use strict";var cft=ba(),qfe=Mr(),Ofe=af();Bfe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=cft.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 Nfe=dN(),DM=vfe();Ufe.exports={moduleType:"component",name:"selections",layoutAttributes:EN(),supplyLayoutDefaults:Rfe(),supplyDrawNewSelectionDefaults:Ffe(),includeBasePlot:IM()("selections"),draw:Nfe.draw,drawOne:Nfe.drawOne,reselect:DM.reselect,prepSelect:DM.prepSelect,clearOutline:DM.clearOutline,clearSelectionsCache:DM.clearSelectionsCache,selectOnClick:DM.selectOnClick}});var RN=ye((Vir,she)=>{"use strict";var IN=xa(),C0=Mr(),Vfe=C0.numberFormat,fft=id(),hft=EL(),xP=ba(),Jfe=C0.strTranslate,dft=Ll(),Hfe=va(),d_=ao(),vft=Nc(),Gfe=Qa(),pft=Tg(),gft=gv(),$fe=Sg(),bP=$fe.selectingOrDrawing,mft=$fe.freeMode,yft=Nh().FROM_TL,_ft=lM(),xft=gM().redrawReglTraces,bft=Yu(),CN=af().getFromId,wft=wf().prepSelect,Tft=wf().clearOutline,Aft=wf().selectOnClick,kN=aN(),DN=ad(),jfe=DN.MINDRAG,np=DN.MINZOOM,Wfe=!0;function Sft(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,x,b,g,E,k,A,L,_,C,M,p,P,T,F,q,V,H,X,G;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,k=f._length,A=h._length,g=f._offset,E=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var Et=t.overlays,dt=0;dt=0){Ht._fullLayout._deactivateShape(Ht);return}var $t=Ht._fullLayout.clickmode;if(PN(Ht),Et===2&&!c&&er(),u)$t.indexOf("select")>-1&&Aft(dt,Ht,x,b,t.id,ae),$t.indexOf("event")>-1&&vft.click(Ht,dt,t.id);else if(Et===1&&c){var fr=o?h:f,_r=o==="s"||s==="w"?0:1,Br=fr._name+".range["+_r+"]",Or=Mft(fr,_r),Nr="left",ut="middle";if(fr.fixedrange)return;o?(ut=o==="n"?"top":"bottom",fr.side==="right"&&(Nr="right")):s==="e"&&(Nr="right"),Ht._context.showAxisRangeEntryBoxes&&IN.select(re).call(dft.makeEditable,{gd:Ht,immediate:!0,background:Ht._fullLayout.paper_bgcolor,text:String(Or),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Nr,verticalAlign:ut}).on("edit",function(Ne){var Ye=fr.d2r(Ne);Ye!==void 0&&xP.call("_guiRelayout",Ht,Br,Ye)})}}gft.init(ae);var ke,ge,ie,Te,Ee,Ae,ze,Ce,me,De;function ce(Et,dt,Ht){var $t=re.getBoundingClientRect();ke=dt-$t.left,ge=Ht-$t.top,e._fullLayout._calcInverseTransform(e);var fr=C0.apply3DTransform(e._fullLayout._invTransform)(ke,ge);ke=fr[0],ge=fr[1],ie={l:ke,r:ke,w:0,t:ge,b:ge,h:0},Te=e._hmpixcount?e._hmlumcount/e._hmpixcount:fft(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+k+"V"+A+"H0V0",Ae=!1,ze="xy",De=!1,Ce=the(l,Te,g,E,Ee),me=rhe(l,g,E)}function Ge(Et,dt){if(e._transitioningWithDuration)return!1;var Ht=Math.max(0,Math.min(k,X*Et+ke)),$t=Math.max(0,Math.min(A,G*dt+ge)),fr=Math.abs(Ht-ke),_r=Math.abs($t-ge);ie.l=Math.min(ke,Ht),ie.r=Math.max(ke,Ht),ie.t=Math.min(ge,$t),ie.b=Math.max(ge,$t);function Br(){ze="",ie.r=ie.l,ie.t=ie.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)fr>np||_r>np?(ze="xy",fr/k>_r/A?(_r=fr*A/k,ge>$t?ie.t=ge-_r:ie.b=ge+_r):(fr=_r*k/A,ke>Ht?ie.l=ke-fr:ie.r=ke+fr),me.attr("d",wP(ie))):Br();else if(_.isSubplotConstrained)if(fr>np||_r>np){ze="xy";var Or=Math.min(ie.l/k,(A-ie.b)/A),Nr=Math.max(ie.r/k,(A-ie.t)/A);ie.l=Or*k,ie.r=Nr*k,ie.b=(1-Or)*A,ie.t=(1-Nr)*A,me.attr("d",wP(ie))}else Br();else!M||_r0){var Ne;if(_.isSubplotConstrained||!C&&M.length===1){for(Ne=0;Ne1&&(Br.maxallowed!==void 0&&P===(Br.range[0]1&&(Or.maxallowed!==void 0&&T===(Or.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function kft(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function the(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",Jfe(r,n)).attr("d",i+"Z")}function rhe(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:Hfe.background,stroke:Hfe.defaultLine,"stroke-width":1,opacity:0}).attr("transform",Jfe(t,r)).attr("d","M0,0Z")}function ihe(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"),nhe(e,t,i,a)}function nhe(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 PN(e){IN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ahe(e){Wfe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long"),Wfe=!1)}function Cft(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 Lft(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 wP(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 Yfe(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 Pft=xa(),TP=Nc(),Ift=gv(),Dft=Tg(),kg=RN().makeDragBox,ud=ad().DRAGGERSIZE;AP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Pft.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=kg(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]&&TP.hover(t,h,a)},TP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Ift.unhover(t,h))},t._context.showAxisDragHandles&&(kg(t,o,s._offset-ud,l._offset-ud,ud,ud,"n","w"),kg(t,o,s._offset+s._length,l._offset-ud,ud,ud,"n","e"),kg(t,o,s._offset-ud,l._offset+l._length,ud,ud,"s","w"),kg(t,o,s._offset+s._length,l._offset+l._length,ud,ud,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=ud),kg(t,o,s._offset+s._length*.1,c,s._length*.8,ud,"","ew"),kg(t,o,s._offset,c,s._length*.1,ud,"","w"),kg(t,o,s._offset+s._length*.9,c,s._length*.1,ud,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=ud),kg(t,o,f,l._offset+l._length*.1,ud,l._length*.8,"ns",""),kg(t,o,f,l._offset+l._length*.9,ud,l._length*.1,"s",""),kg(t,o,f,l._offset,ud,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,TP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,TP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},AP.updateFx(t)}};AP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Dft(t._draggers,r)}});var che=ye((Gir,uhe)=>{"use strict";var lhe=ba();uhe.exports=function(t){for(var r=lhe.layoutArrayContainers,n=lhe.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var Rft=gy(),FN=p6(),RM=H1(),zft=E6().sorterAsc,qN=ba();zM.containerArrayMatch=che();var Fft=zM.isAddVal=function(t){return t==="add"||Rft(t)},fhe=zM.isRemoveVal=function(t){return t===null||t==="remove"};zM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=qN.getComponentMethod(o,"supplyLayoutDefaults"),l=qN.getComponentMethod(o,"draw"),u=qN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===FN||l===FN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&RM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(fhe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return RM.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(zft),x=r.get(),b=x||[],g=a(h,o).get(),E=[],k=-1,A=b.length,L,_,C,M,p,P,T,F;for(L=0;Lb.length-(T?0:1)){RM.warn("index out of range",o,C);continue}if(P!==void 0)p.length>1&&RM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),fhe(P)?E.push(C):T?(P==="add"&&(P={}),b.splice(C,0,P),g&&g.splice(C,0,{})):RM.warn("Unrecognized full object edit value",o,C,P),k===-1&&(k=C);else for(_=0;_=0;L--)b.splice(E[L],1),g&&g.splice(E[L],1);if(b.length?x||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==FN){var q;if(k===-1)q=v;else{for(A=Math.max(b.length,A),q=[],L=0;L=k));L++)q.push(C);for(L=k;L{"use strict";var ghe=uo(),Wir=Cq(),mhe=ba(),kp=Mr(),FM=Yu(),yhe=af(),_he=va(),qM=yhe.cleanId,qft=yhe.getFromTrace,ON=mhe.traceIs;Cg.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&kp.log("Clearing previous rejected promises from queue."),e._promises=[]};Cg.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=(FM.subplotsRegistry.cartesian||{}).attrRegex,i=(FM.subplotsRegistry.polar||{}).attrRegex,a=(FM.subplotsRegistry.ternary||{}).attrRegex,o=(FM.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"),_he.clean(e),e.template&&e.template.layout&&Cg.cleanLayout(e.template.layout),e};function Y3(e,t){var r=e[t],n=t.charAt(0);r&&r!=="paper"&&(e[t]=qM(r,n,!0))}Cg.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}Cg.hasParent=function(e,t){for(var r=phe(t);r;){if(r in e)return!0;r=phe(r)}return!1};var Nft=["x","y","z"];Cg.clearAxisTypes=function(e,t,r){for(var n=0;n{"use strict";var kP=xa(),Uft=uo(),Vft=Jq(),sa=Mr(),Uu=sa.nestedProperty,UN=g3(),ap=nne(),L0=ba(),zP=_3(),Ho=Yu(),Nv=Qa(),Hft=hB(),Gft=Cd(),BN=ao(),jft=va(),Wft=zN().initInteractions,Zft=Zp(),Xft=wf().clearOutline,She=ub().dfltConfig,MP=hhe(),yh=xhe(),Jl=gM(),v_=Bu(),Yft=ad().AX_NAME_PATTERN,NN=0,bhe=5;function Kft(e,t,r,n){var i;if(e=sa.getGraphDiv(e),UN.init(e),sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=UN.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 pl.addFrames(e,i)}Ehe(e,n),r||(r={}),kP.select(e).classed("js-plotly-plot",!0),BN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(yh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=yh.cleanLayout(r)),Ho.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(yht(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),BN.initGradients(e),BN.initPatterns(e),l&&Nv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Ho.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 khe(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]),LP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&LP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function tht(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 F=M.parts[T],q=M.parts[T-1]+"."+F,V=M.parts.slice(0,T).join("."),H=Uu(e.layout,V).get(),X=Uu(n,V).get(),G=M.get();if(p!==void 0){g[C]=p,E[C]=F==="reverse"?p:Cy(G);var N=zP.getLayoutValObject(n,M.parts);if(N&&N.impliedEdits&&p!==null)for(var W in N.impliedEdits)k(sa.relativeAttr(C,W),N.impliedEdits[W]);if(["width","height"].indexOf(C)!==-1)if(p){k("autosize",null);var re=C==="height"?"width":"height";k(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")k("width",p?null:n.width),k("height",p?null:n.height);else if(q.match(qhe))_(q),Uu(n,V+"._inputRange").set(null);else if(q.match(Ohe)){_(q),Uu(n,V+"._inputRange").set(null);var ae=Uu(n,V).get();ae._inputDomain&&(ae._input.domain=ae._inputDomain.slice())}else q.match(Bhe)&&Uu(n,V+"._inputDomain").set(null);if(F==="type"){L=H;var _e=X.type==="linear"&&p==="log",Me=X.type==="log"&&p==="linear";if(_e||Me){if(!L||!L.range)k(V+".autorange",!0);else if(X.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var ke=L.range[0],ge=L.range[1];_e?(ke<=0&&ge<=0&&k(V+".autorange",!0),ke<=0?ke=ge/1e6:ge<=0&&(ge=ke/1e6),k(V+".range[0]",Math.log(ke)/Math.LN10),k(V+".range[1]",Math.log(ge)/Math.LN10)):(k(V+".range[0]",Math.pow(10,ke)),k(V+".range[1]",Math.pow(10,ge)))}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,X,p,k),L0.getComponentMethod("images","convertCoords")(e,X,p,k)}else k(V+".autorange",!0),k(V+".range",null);Uu(n,V+"._inputRange").set(null)}else if(F.match(Yft)){var ie=Uu(n,C).get(),Te=(p||{}).type;(!Te||Te==="-")&&(Te="linear"),L0.getComponentMethod("annotations","convertCoords")(e,ie,Te,k),L0.getComponentMethod("images","convertCoords")(e,ie,Te,k)}var Ee=MP.containerArrayMatch(C);if(Ee){c=Ee.array,f=Ee.index;var Ae=Ee.property,ze=N||{editType:"calc"};f!==""&&Ae===""&&(MP.isAddVal(p)?E[C]=null:MP.isRemoveVal(p)?E[C]=(Uu(r,c).get()||[])[f]:sa.warn("unrecognized full object value",t)),v_.update(b,ze),u[c]||(u[c]={});var Ce=u[c][f];Ce||(Ce=u[c][f]={}),Ce[Ae]=p,delete t[C]}else F==="reverse"?(H.range?H.range.reverse():(k(V+".autorange",!0),H.range=[1,0]),X.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(p===!1&&G!==!1||p!==!1&&G===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(p==="lasso"||p==="select")&&!(G==="lasso"||G==="select")?b.plot=!0:N?v_.update(b,N):b.calc=!0,M.set(p))}}for(c in u){var me=MP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var De in A){L=Nv.getFromId(e,De);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var Ge in ce)A[Ge]||(Nv.getFromId(e,Ge)._constraintShrinkable=!0)}}(Uhe(e)||t.height||t.width)&&(b.plot=!0);var nt=n.shapes;for(f=0;f1;)if(n.pop(),r=Uu(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function sht(e,t){for(var r=0;r=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 F=n._frameQueue.pop();F.onInterrupt&&F.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(F){if(F.length!==0){for(var q=0;qn._timeToNext&&v()};F()}var b=0;function g(F){return Array.isArray(i)?b>=i.length?F.transitionOpts=i[b]:F.transitionOpts=i[0]:F.transitionOpts=i,b++,F}var E,k,A=[],L=t==null,_=Array.isArray(t),C=!L&&!_&&sa.isPlainObject(t);if(C)A.push({type:"object",data:g(sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(E=0;E0&&PP)&&T.push(k);A=T}}A.length>0?h(A):(e.emit("plotly_animated"),u())})}function vht(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,x=l[d]||f[d];d&&v&&typeof v=="number"&&x&&NNM.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=Ho.modifyFrames,l=Ho.modifyFrames,u=[e,o],c=[e,a];return ap&&ap.add(e,s,u,l,c),Ho.modifyFrames(e,a)}function ght(e){e=sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Ho.cleanPlot([],{},r,t),Ho.purge(e),UN.purge(e),t._container&&t._container.remove(),delete e._context,e}function mht(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 yht(e){var t=kP.select(e),r=e._fullLayout;if(r._calcInverseTransform=mht,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),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={};kP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Zft.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")}pl.animate=dht;pl.addFrames=vht;pl.deleteFrames=pht;pl.addTraces=Dhe;pl.deleteTraces=Rhe;pl.extendTraces=Phe;pl.moveTraces=VN;pl.prependTraces=Ihe;pl.newPlot=eht;pl._doPlot=Kft;pl.purge=ght;pl.react=cht;pl.redraw=Qft;pl.relayout=OM;pl.restyle=PP;pl.setPlotConfig=Jft;pl.update=DP;pl._guiRelayout=GN(OM);pl._guiRestyle=GN(PP);pl._guiUpdate=GN(DP);pl._storeDirectGUIEdit=nht});var Ly=ye(Mm=>{"use strict";var _ht=ba();Mm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Mm.getRedrawFunc=function(e){return function(){_ht.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 Vhe=window.URL||window.webkitURL;Mm.createObjectURL=function(e){return Vhe.createObjectURL(e)};Mm.revokeObjectURL=function(e){return Vhe.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=xht(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Mm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function xht(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var WN=xa(),Kir=Mr(),bht=ao(),wht=va(),Jir=Zp(),jN=/"/g,NM="TOBESTRIPPED",Tht=new RegExp('("'+NM+")|("+NM+'")',"g");function Aht(e){var t=WN.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 Sht(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Hhe.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(bht.setRect,0,0,s,l).call(wht.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u{"use strict";var Mht=Mr(),Eht=vb().EventEmitter,UM=Ly();function kht(e){var t=e.emitter||new Eht,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}),x=new a,b,g;s==="svg"||Mht.isSafari()?g=UM.encodeSVG(o):(b=UM.createBlob(o,"svg"),g=UM.createObjectURL(b)),l.width=h,l.height=d,x.onload=function(){var E;switch(b=null,UM.revokeObjectURL(g),s!=="svg"&&v.drawImage(x,0,0,h,d),s){case"jpeg":E=l.toDataURL("image/jpeg");break;case"png":E=l.toDataURL("image/png");break;case"webp":E=l.toDataURL("image/webp");break;case"svg":E=g;break;default:var k="Image format is not jpeg, png, svg or webp.";if(i(new Error(k)),!e.promise)return t.emit("error",k)}n(E),e.promise||t.emit("success",E)},x.onerror=function(E){if(b=null,UM.revokeObjectURL(g),i(E),!e.promise)return t.emit("error",E)},x.src=g});return e.promise?r:t}Ghe.exports=kht});var XN=ye((enr,Zhe)=>{"use strict";var jhe=uo(),Whe=qP(),Cht=Yu(),Em=Mr(),VM=Ly(),Lht=OP(),Pht=BP(),Iht=QC().version,ZN={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 Dht(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(_){return!(_ in t)||Em.validate(t[_],ZN[_])}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(ZN.format.values,", "," or ")+".");var s={};function l(_,C){return Em.coerce(t,s,ZN,_,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var b=Em.extendFlat({},n);c?b.width=c:t.width===null&&jhe(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&jhe(a.height)&&(b.height=a.height);var g=Em.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),E=VM.getRedrawFunc(x);function k(){return new Promise(function(_){setTimeout(_,VM.getDelay(x._fullLayout))})}function A(){return new Promise(function(_,C){var M=Lht(x,u,h),p=x._fullLayout.width,P=x._fullLayout.height;function T(){Whe.purge(x),document.body.removeChild(x)}if(u==="full-json"){var F=Cht.graphJson(x,!1,"keepdata","object",!0,!0);return F.version=Iht,F=JSON.stringify(F),T(),_(v?F:VM.encodeJSON(F))}if(T(),u==="svg")return _(v?M:VM.encodeSVG(M));var q=document.createElement("canvas");q.id=Em.randstr(),Pht({format:u,width:p,height:P,scale:h,canvas:q,svg:M,promise:!0}).then(_).catch(C)})}function L(_){return v?_.replace(VM.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,C){Whe.newPlot(x,r,b,g).then(E).then(k).then(A).then(function(M){_(L(M))}).catch(function(M){C(M)})})}Zhe.exports=Dht});var Jhe=ye((tnr,Khe)=>{"use strict";var P0=Mr(),Rht=Yu(),zht=_3(),Fht=ub().dfltConfig,Lg=P0.isPlainObject,Vb=Array.isArray,Xhe=P0.isArrayOrTypedArray;Khe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=zht.get(),i=[],a={_context:P0.extendFlat({},Fht)},o,s;Vb(t)?(a.data=P0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(cd("array","data"))),Lg(r)?(a.layout=P0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(cd("object","layout"))),Rht.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&n.push(cd("unused",i,u.concat(f.length)));var g=f.length,E=Array.isArray(b);E&&(g=Math.min(g,b.length));var k,A,L,_,C;if(h.dimensions===2)for(A=0;Af[A].length&&n.push(cd("unused",i,u.concat(A,f[A].length)));var M=f[A].length;for(k=0;k<(E?Math.min(M,b[A].length):M);k++)L=E?b[A][k]:b,_=c[A][k],C=f[A][k],P0.validate(_,L)?C!==_&&C!==+_&&n.push(cd("dynamic",i,u.concat(A,k),_,C)):n.push(cd("value",i,u.concat(A,k),_))}else n.push(cd("array",i,u.concat(A),c[A]));else for(A=0;A{"use strict";var Hht=Mr(),UP=Ly();function Ght(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=UP.createBlob(e,r),u=UP.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),UP.revokeObjectURL(u),l=null,o(t);if(Hht.isSafari()){var c=r==="svg"?",":";base64,";return UP.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}$he.exports=Ght});var YN=ye((nnr,tde)=>{"use strict";var ede=Mr(),jht=XN(),Wht=Qhe(),inr=Ly();function Zht(e,t){var r;return ede.isPlainObject(e)||(r=ede.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=jht(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Wht(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}tde.exports=Zht});var ode=ye(KN=>{"use strict";var Cp=Mr(),Lp=Cp.isPlainObject,rde=_3(),ide=Yu(),Xht=vl(),nde=Vs(),ade=ub().dfltConfig;KN.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:ade},{data:e.data,layout:e.layout}),ide.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={};HM(d,v,Kht.bind(null,d));var x=Cp.coerce(d,{},Xht,"type"),b=n.data[x];b||(b=n.data[x]=[]),b.push(v)}),HM(r,n.layout,Yht.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)&&VP(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;og?o.push({code:"unused",traceType:d,templateCount:b,dataCount:g}):g>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:g})}}function E(k,A){for(var L in k)if(L.charAt(0)!=="_"){var _=k[L],C=I0(k,L,A);Lp(_)?(Array.isArray(k)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:C,templateitemname:_.templateitemname}),E(_,C)):Array.isArray(_)&&Jht(_)&&E(_,C)}}if(E({data:l,layout:s},""),o.length)return o.map($ht)};function Jht(e){for(var t=0;t{"use strict";var Hh=qP();Sc._doPlot=Hh._doPlot;Sc.newPlot=Hh.newPlot;Sc.restyle=Hh.restyle;Sc.relayout=Hh.relayout;Sc.redraw=Hh.redraw;Sc.update=Hh.update;Sc._guiRestyle=Hh._guiRestyle;Sc._guiRelayout=Hh._guiRelayout;Sc._guiUpdate=Hh._guiUpdate;Sc._storeDirectGUIEdit=Hh._storeDirectGUIEdit;Sc.react=Hh.react;Sc.extendTraces=Hh.extendTraces;Sc.prependTraces=Hh.prependTraces;Sc.addTraces=Hh.addTraces;Sc.deleteTraces=Hh.deleteTraces;Sc.moveTraces=Hh.moveTraces;Sc.purge=Hh.purge;Sc.addFrames=Hh.addFrames;Sc.deleteFrames=Hh.deleteFrames;Sc.animate=Hh.animate;Sc.setPlotConfig=Hh.setPlotConfig;var Qht=RS().getGraphDiv,edt=tP().eraseActiveShape;Sc.deleteActiveShape=function(e){return edt(Qht(e))};Sc.toImage=XN();Sc.validate=Jhe();Sc.downloadImage=YN();var sde=ode();Sc.makeTemplate=sde.makeTemplate;Sc.validateTemplate=sde.validateTemplate});var K3=ye((snr,ude)=>{"use strict";var JN=Mr(),tdt=ba();ude.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=tdt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=JN.minRowLength(a);o?s=Math.min(u,JN.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=JN.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Pg=ye((lnr,hde)=>{"use strict";var cde=Mr().dateTick0,rdt=es(),idt=rdt.ONEWEEK;function fde(e,t){return e%idt===0?cde(t,1):cde(t,0)}hde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",fde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",fde(s,r.ycalendar)),i("yperiodalignment"))}}});var pde=ye((unr,vde)=>{"use strict";var dde=["orientation","groupnorm","stackgaps"];vde.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 gde=va(),mde=Rv().hasColorscale,yde=Uh(),ndt=lu();_de.exports=function(t,r,n,i,a,o){var s=ndt.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),mde(t,"marker")&&yde(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=gde.background:u=gde.defaultLine,a("marker.line.color",u),mde(t,"marker.line")&&yde(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 D0=ye((fnr,xde)=>{"use strict";var adt=Mr().isArrayOrTypedArray,odt=Rv().hasColorscale,sdt=Uh();xde.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),odt(t,"line"))sdt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(adt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var J3=ye((hnr,bde)=>{"use strict";bde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var R0=ye((dnr,wde)=>{"use strict";var ldt=Mr();wde.exports=function(e,t,r,n,i){i=i||{},n("textposition"),ldt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Ig=ye((vnr,Ade)=>{"use strict";var GP=va(),Tde=Mr().isArrayOrTypedArray;function udt(e){for(var t=GP.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var Sde=Mr(),cdt=ba(),fdt=Uc(),hdt=Sm(),$3=lu(),ddt=K3(),vdt=Pg(),pdt=pde(),gdt=$p(),mdt=D0(),Mde=J3(),ydt=R0(),_dt=Ig(),xdt=Mr().coercePattern;Ede.exports=function(t,r,n,i){function a(d,v){return Sde.coerce(t,r,fdt,d,v)}var o=ddt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){vdt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=pdt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var bdt=Bb().getAxisGroup;Cde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=bdt(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,x=v[d];r._offsetIndex=0,(a!=="group"||d)&&(x||(x=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=x.offsetIndex)}});var $N=ye((mnr,Lde)=>{"use strict";var wdt=Mr(),Tdt=Hb(),Adt=Uc();Lde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return wdt.coerce(i._input,i,Adt,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 Ide=ye((ynr,Pde)=>{"use strict";var Sdt=Mr(),Mdt=U6();Pde.exports=function(e,t){function r(i,a){return Sdt.coerce(e,t,Mdt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var Dg=ye((_nr,Rde)=>{"use strict";var Edt=uo(),Dde=Mr(),kdt=Dde.dateTime2ms,jP=Dde.incrementMonth,Cdt=es(),Ldt=Cdt.ONEAVGMONTH;Rde.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(Edt(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=kdt(h,u)||0,v=[],x=[],b=[],g=i.length,E=0;Ek;)_=jP(_,-s,u);for(;_<=k;)_=jP(_,s,u);L=jP(_,-s,u)}else{for(A=Math.round((k-d)/o),_=d+A*o;_>k;)_-=o;for(;_<=k;)_+=o;L=_-o}v[E]=c?L:f?_:(L+_)/2,x[E]=L,b[E]=_}return{vals:v,starts:x,ends:b}}});var z0=ye((xnr,Fde)=>{"use strict";var QN=Rv().hasColorscale,eU=zv(),zde=lu();Fde.exports=function(t,r){zde.hasLines(r)&&QN(r,"line")&&eU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),zde.hasMarkers(r)&&(QN(r,"marker")&&eU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),QN(r,"marker.line")&&eU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var km=ye((bnr,qde)=>{"use strict";var Rf=Mr();qde.exports=function(t,r){for(var n=0;n{"use strict";var Ode=Mr();Bde.exports=function(t,r){Ode.isArrayOrTypedArray(r.selectedpoints)&&Ode.tagSelected(t,r)}});var q0=ye((Tnr,Wde)=>{"use strict";var Nde=uo(),rU=Mr(),GM=Qa(),Ude=Dg(),tU=es().BADNUM,iU=lu(),Pdt=z0(),Idt=km(),Ddt=F0();function Rdt(e,t){var r=e._fullLayout,n=t._xA=GM.getFromId(e,t.xaxis||"x","x"),i=t._yA=GM.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=Ude(t,n,"x",a),l=Ude(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=nU(t,r,n,i),x=!1,b,g,E,k,A,L;Gde(r,t);var _="x",C="y",M;if(v)rU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",M="x"):(_="s",M="y"),A=v.stackgaps==="interpolate";else{var p=Hde(t,f);Vde(e,t,n,i,u,c,p)}var P=!!t.xperiodalignment,T=!!t.yperiodalignment;for(g=0;gg&&h[k].gap;)k--;for(L=h[k].s,E=h.length-1;E>k;E--)h[E].s=L;for(;g{"use strict";Zde.exports=WP;var zdt=Mr().distinctVals;function WP(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 O0=uo(),p_=Mr().isArrayOrTypedArray,Q3=es().BADNUM,Fdt=ba(),jM=Qa(),qdt=Bb().getAxisGroup,ZP=Xde();function Odt(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||!O0(s))}for(var c=0;c{"use strict";var Qde=q0(),eve=Gb().setGroupPositions;function Kdt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;up[c]&&c{"use strict";var $dt=ao(),ove=es(),WM=ove.BADNUM,sve=ove.LOG_CLIP,ive=sve+.5,nve=sve-.5,XP=Mr(),Qdt=XP.segmentsIntersect,ave=XP.constrain,cU=Sm();lve.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,x=v==="linear",b=n.fill&&n.fill!=="none",g=[],E=cU.minTolerance,k=t.length,A=new Array(k),L=0,_,C,M,p,P,T,F,q,V,H,X,G,N,W,re,ae;function _e(ut){var Ne=t[ut];if(!Ne)return!1;var Ye=r.linearized?i.l2p(Ne.x):i.c2p(Ne.x),Ve=r.linearized?a.l2p(Ne.y):a.c2p(Ne.y);if(Ye===WM){if(o&&(Ye=i.c2p(Ne.x,!0)),Ye===WM)return!1;s&&Ve===WM&&(Ye*=Math.abs(i._m*u*(i._m>0?ive:nve)/(a._m*l*(a._m>0?ive:nve)))),Ye*=1e3}if(Ve===WM){if(s&&(Ve=a.c2p(Ne.y,!0)),Ve===WM)return!1;Ve*=1e3}return[Ye,Ve]}function Me(ut,Ne,Ye,Ve){var Xe=Ye-ut,ht=Ve-Ne,Le=.5-ut,xe=.5-Ne,Se=Xe*Xe+ht*ht,lt=Xe*Le+ht*xe;if(lt>0&<1||Math.abs(Le.y-Ye[0][1])>1)&&(Le=[Le.x,Le.y],Ve&&Te(Le,ut)ze||ut[1]me)return[ave(ut[0],Ae,ze),ave(ut[1],Ce,me)]}function kt(ut,Ne){if(ut[0]===Ne[0]&&(ut[0]===Ae||ut[0]===ze)||ut[1]===Ne[1]&&(ut[1]===Ce||ut[1]===me))return!0}function Ct(ut,Ne){var Ye=[],Ve=Dt(ut),Xe=Dt(Ne);return Ve&&Xe&&kt(Ve,Xe)||(Ve&&Ye.push(Ve),Xe&&Ye.push(Xe)),Ye}function Yt(ut,Ne,Ye){return function(Ve,Xe){var ht=Dt(Ve),Le=Dt(Xe),xe=[];if(ht&&Le&&kt(ht,Le))return xe;ht&&xe.push(ht),Le&&xe.push(Le);var Se=2*XP.constrain((Ve[ut]+Xe[ut])/2,Ne,Ye)-((ht||Ve)[ut]+(Le||Xe)[ut]);if(Se){var lt;ht&&Le?lt=Se>0==ht[ut]>Le[ut]?ht:Le:lt=ht||Le,lt[ut]+=Se}return xe}}var xr;v==="linear"||v==="spline"?xr=ot:v==="hv"||v==="vh"?xr=Ct:v==="hvh"?xr=Yt(0,Ae,ze):v==="vhv"&&(xr=Yt(1,Ce,me));function er(ut,Ne){var Ye=Ne[0]-ut[0],Ve=(Ne[1]-ut[1])/Ye,Xe=(ut[1]*Ne[0]-Ne[1]*ut[0])/Ye;return Xe>0?[Ve>0?Ae:ze,me]:[Ve>0?ze:Ae,Ce]}function Ke(ut){var Ne=ut[0],Ye=ut[1],Ve=Ne===A[L-1][0],Xe=Ye===A[L-1][1];if(!(Ve&&Xe))if(L>1){var ht=Ne===A[L-2][0],Le=Ye===A[L-2][1];Ve&&(Ne===Ae||Ne===ze)&&ht?Le?L--:A[L-1]=ut:Xe&&(Ye===Ce||Ye===me)&&Le?ht?L--:A[L-1]=ut:A[L++]=ut}else A[L++]=ut}function xt(ut){A[L-1][0]!==ut[0]&&A[L-1][1]!==ut[1]&&Ke([nt,ct]),Ke(ut),qt=null,nt=ct=0}var bt=XP.isArrayOrTypedArray(f);function Lt(ut){if(ut&&c&&(ut.i=_,ut.d=t,ut.trace=n,ut.marker=bt?f[ut.i]:f,ut.backoff=c),ke=ut[0]/l,ge=ut[1]/u,ce=ut[0]ze?ze:0,Ge=ut[1]me?me:0,ce||Ge){if(!L)A[L++]=[ce||ut[0],Ge||ut[1]];else if(qt){var Ne=xr(qt,ut);Ne.length>1&&(xt(Ne[0]),A[L++]=Ne[1])}else rt=xr(A[L-1],ut)[0],A[L++]=rt;var Ye=A[L-1];ce&&Ge&&(Ye[0]!==ce||Ye[1]!==Ge)?(qt&&(nt!==ce&&ct!==Ge?Ke(nt&&ct?er(qt,ut):[nt||ce,ct||Ge]):nt&&ct&&Ke([nt,ct])),Ke([ce,Ge])):nt-ce&&ct-Ge&&Ke([ce||nt,Ge||ct]),qt=ut,nt=ce,ct=Ge}else qt&&xt(xr(qt,ut)[0]),A[L++]=ut}for(_=0;_ie(T,St))break;M=T,N=V[0]*q[0]+V[1]*q[1],N>X?(X=N,p=T,F=!1):N=t.length||!T)break;Lt(T),C=T}}qt&&Ke([nt||qt[0],ct||qt[1]]),g.push(A.slice(0,L))}var Et=v.slice(v.length-1);if(c&&Et!=="h"&&Et!=="v"){for(var dt=!1,Ht=-1,$t=[],fr=0;fr{"use strict";var uve={tonextx:1,tonexty:1,tonext:1};cve.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 Rg=xa(),evt=ba(),ZM=Mr(),tT=ZM.ensureSingle,hve=ZM.identity,zf=ao(),rT=lu(),tvt=fU(),rvt=hU(),YP=wM().tester;dve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=rvt(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(),ivt(t,s,r),c){o&&(l=o());var h=Rg.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){fve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){fve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function ivt(e,t,r){t.each(function(n){var i=tT(Rg.select(this),"g","fills");zf.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,hve);s.enter().append("g"),s.exit().each(function(l){a[l]=null}).remove(),s.order().each(function(l){a[l]=tT(Rg.select(this),"path","js-fill")})})}function fve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;nvt(e,t,r,n,i);var u=!!o&&o.duration>0;function c(Yt){return u?Yt.transition():Yt}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,x=Rg.select(a),b=tT(x,"g","errorbars"),g=tT(x,"g","lines"),E=tT(x,"g","points"),k=tT(x,"g","text");if(evt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(x).style("opacity",d.opacity);var A,L,_=d.fill.charAt(d.fill.length-1);_!=="x"&&_!=="y"&&(_="");var C,M;_==="y"?(C=1,M=h.c2p(0,!0)):_==="x"&&(C=0,M=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var p="",P=[],T=d._prevtrace,F=null,q=null;T&&(p=T._prevRevpath||"",L=T._nextFill,P=T._ownPolygons,F=T._fillsegments,q=T._fillElement);var V,H,X="",G="",N,W,re,ae,_e,Me,ke=[];d._polygons=[];var ge=[],ie=[],Te=ZM.noop;if(A=d._ownFill,rT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=zf.steps(v.shape),W=zf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=W=function(Yt){var xr=Yt[Yt.length-1];return Yt.length>1&&Yt[0][0]===xr[0]&&Yt[0][1]===xr[1]?zf.smoothclosed(Yt.slice(1),v.smoothing):zf.smoothopen(Yt,v.smoothing)}:N=W=function(Yt){return"M"+Yt.join("L")},re=function(Yt){return W(Yt.reverse())},ie=tvt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(ie.length);var Ee=0;for(l=0;l=s[0]&&x.x<=s[1]&&x.y>=l[0]&&x.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(x,b){var g=x[0].trace;rT.hasMarkers(g)&&g.marker.maxdisplayed>0&&b{"use strict";vve.exports={container:"marker",min:"cmin",max:"cmax"}});var JP=ye((Pnr,pve)=>{"use strict";var KP=Qa();pve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=KP.getFromTrace(a,r,"x"),s=KP.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=KP.tickText(o,o.c2l(l),!0).text,i.yLabel=KP.tickText(s,s.c2l(u),!0).text,i}});var op=ye((Inr,gve)=>{"use strict";var dU=xa(),nT=ao(),avt=ba();function ovt(e){var t=dU.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=dU.select(this),i=r.trace||r[0].trace;vU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=dU.select(this),i=r.trace||r[0].trace;pU(n,i,e)}),t.selectAll("g.trace path.js-line").call(nT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(nT.fillGroupStyle,e,!1),avt.getComponentMethod("errorbars","style")(t)}function vU(e,t,r){nT.pointStyle(e.selectAll("path.point"),t,r)}function pU(e,t,r){nT.textPointStyle(e.selectAll("text"),t,r)}function svt(e,t,r){var n=t[0].trace;n.selectedpoints?(nT.selectedPointStyle(r.selectAll("path.point"),n),nT.selectedTextStyle(r.selectAll("text"),n)):(vU(r,n,e),pU(r,n,e))}gve.exports={style:ovt,stylePoints:vU,styleText:pU,styleOnSelect:svt}});var oT=ye((Dnr,mve)=>{"use strict";var aT=va(),lvt=lu();mve.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&aT.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&&aT.opacity(a)?a:o&&aT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?aT.opacity(i)<.3?aT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&aT.opacity(n)&&lvt.hasLines(t)&&t.line.width?n:t.fillcolor)}});var sT=ye((Rnr,_ve)=>{"use strict";var $P=Mr(),yve=Nc(),uvt=ba(),cvt=oT(),gU=va(),fvt=$P.fillText;_ve.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,x=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(G){if(v){var N=s.c2p(G.xStart),W=s.c2p(G.xEnd);return u>=Math.min(N,W)&&u<=Math.max(N,W)?0:1/0}var re=Math.max(3,G.mrc||0),ae=1-1/re,_e=Math.abs(s.c2p(G.x)-u);return _e=Math.min(N,W)&&c<=Math.max(N,W)?0:1/0}var re=Math.max(3,G.mrc||0),ae=1-1/re,_e=Math.abs(l.c2p(G.y)-c);return _eke!=me>=ke&&(Ae=Te[ie-1][0],ze=Te[ie][0],me-Ce&&(Ee=Ae+(ze-Ae)*(ke-Ce)/(me-Ce),re=Math.min(re,Ee),ae=Math.max(ae,Ee)));return re=Math.max(re,0),ae=Math.min(ae,s._length),{x0:re,x1:ae,y0:ke,y1:ke}}if(h.indexOf("fills")!==-1&&o._fillElement){var V=F(o._fillElement)&&!F(o._fillExclusionElement);if(V){var H=q(o._polygons);H===null&&(H={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var X=gU.defaultLine;return gU.opacity(o.fillcolor)?X=o.fillcolor:gU.opacity((o.line||{}).color)&&(X=o.line.color),$P.extendFlat(t,{distance:t.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:X,hovertemplate:!1}),delete t.index,o.text&&!$P.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var lT=ye((znr,bve)=>{"use strict";var xve=lu();bve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!xve.hasMarkers(s)&&!xve.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";wve.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var yU=ye((qnr,Mve)=>{"use strict";var XM=ba().traceIs,mU=L3();Mve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(hvt(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function hvt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=dvt(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:!XM(a,"cartesian")||XM(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,Sve(a,n)){var u=Ave(a),c=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(Sve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Ave(e){return{v:"x",h:"y"}[e.orientation||"v"]}function Sve(e,t){var r=Ave(e),n=XM(e,"box-violin"),i=XM(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var QP=ye((Onr,Eve)=>{"use strict";var vvt=vv().isTypedArraySpec;function pvt(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||vvt(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=pvt(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var YM=ye((Bnr,Cve)=>{"use strict";var kve=id().mix,gvt=dh(),mvt=Mr();Cve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(C,M){return mvt.coerce2(t,r,i.attributes,C,M)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=kve(a,i.bgColor,i.blend||gvt.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 x=kve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",x),g=o("minor.gridwidth",r.gridwidth||1),E=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!b||!!g||!!E);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var A=o("zerolinecolor",a),L=o("zerolinewidth"),_=n("zeroline",i.showGrid||!!A||!!L);_||(delete r.zerolinecolor,delete r.zerolinewidth)}}});var JM=ye((Nnr,zve)=>{"use strict";var Lve=uo(),yvt=ba(),KM=Mr(),_vt=Vs(),xvt=Zd(),_U=Cd(),Pve=xb(),Ive=T3(),bvt=e_(),wvt=t_(),Tvt=QP(),Avt=YM(),Svt=hB(),Dve=ym(),eI=ad().WEEKDAY_PATTERN,Mvt=ad().HOUR_PATTERN;zve.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=yvt.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=KM.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"),Dve(r,a),Svt(t,r,n,i),Tvt(t,r,n,i),f!=="category"&&!i.noHover&&n("hoverformat");var x=n("color"),b=x!==_U.color.dflt?x:s.color,g=l.label||a._dfltTitle[o];if(wvt(t,r,n,f,i),!u)return r;n("title.text",g),KM.coerceFont(n,"title.font",s,{overrideDflt:{size:KM.bigFont(s.size),color:b}}),Pve(t,r,n,f);var E=i.hasMinor;if(E&&(_vt.newContainer(r,"minor"),Pve(t,r,n,f,{isMinor:!0})),bvt(t,r,n,f,i),Ive(t,r,n,i),E){var k=i.isMinor;i.isMinor=!0,Ive(t,r,n,i),i.isMinor=k}Avt(t,r,n,{dfltColor:x,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:E,attributes:_U}),E&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var A=f==="multicategory";if(!i.noTickson&&(f==="category"||A)&&(r.ticks||r.showgrid)){var L;A&&(L="boundaries");var _=n("tickson",L);_==="boundaries"&&delete r.ticklabelposition}if(A){var C=n("showdividers");C&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(xvt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Evt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var M=0;M=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=Rve(a[s]),l){o=eI;break}}var u=n("pattern",o);if(u===eI)for(s=0;s<2;s++)l=Rve(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case eI:if(!Lve(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 Mvt:if(!Lve(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 Cvt=uo(),tI=Mr();Fve.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,x;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||(Cvt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,x=!1;var b=tI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),g=tI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var E=n("autoshift");E&&(d=g==="left"?u[0]:u[1],x=r.automargin?r.automargin:!0,v=g==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",x);var k=!1;if(o.length&&(k=tI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var A=n("domain",f);A[0]>A[1]-1/4096&&(r.domain=f),tI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var jve=ye((Vnr,Gve)=>{"use strict";var jb=Mr(),qve=va(),Lvt=rp().isUnifiedHover,Pvt=OB(),Ove=Vs(),Ivt=s3(),Bve=Cd(),Dvt=yU(),Nve=JM(),Rvt=Bb(),Uve=rI(),bU=af(),Cm=bU.id2name,Vve=bU.name2id,zvt=ad().AX_ID_PATTERN,Hve=ba(),iI=Hve.traceIs,xU=Hve.getComponentMethod;function nI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}Gve.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},x,b;for(x=0;x{"use strict";var Fvt=xa(),Wve=ba(),aI=Mr(),Qp=ao(),oI=Qa();Zve.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){oI.redrawComponents(t);return}function o(b){var g=b.xaxis,E=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,g._offset,E._offset).call(Qp.setScale,1,1);var k=b.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(Qp.setPointGroupScale,1,1),k.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),k.call(Qp.hideOutsideRangePoints,b)}function s(b,g){var E=b.plotinfo,k=E.xaxis,A=E.yaxis,L=k._length,_=A._length,C=!!b.xr1,M=!!b.yr1,p=[];if(C){var P=aI.simpleMap(b.xr0,k.r2l),T=aI.simpleMap(b.xr1,k.r2l),F=P[1]-P[0],q=T[1]-T[0];p[0]=(P[0]*(1-g)+g*T[0]-P[0])/(P[1]-P[0])*L,p[2]=L*(1-g+g*q/F),k.range[0]=k.l2r(P[0]*(1-g)+g*T[0]),k.range[1]=k.l2r(P[1]*(1-g)+g*T[1])}else p[0]=0,p[2]=L;if(M){var V=aI.simpleMap(b.yr0,A.r2l),H=aI.simpleMap(b.yr1,A.r2l),X=V[1]-V[0],G=H[1]-H[0];p[1]=(V[1]*(1-g)+g*H[1]-V[1])/(V[0]-V[1])*_,p[3]=_*(1-g+g*G/X),A.range[0]=k.l2r(V[0]*(1-g)+g*H[0]),A.range[1]=A.l2r(V[1]*(1-g)+g*H[1])}else p[1]=0,p[3]=_;oI.drawOne(t,k,{skipTitle:!0}),oI.drawOne(t,A,{skipTitle:!0}),oI.redrawComponents(t,[k._id,A._id]);var N=C?L/p[2]:1,W=M?_/p[3]:1,re=C?p[0]:0,ae=M?p[1]:0,_e=C?p[0]/p[2]*L:0,Me=M?p[1]/p[3]*_:0,ke=k._offset-_e,ge=A._offset-Me;E.clipRect.call(Qp.setTranslate,re,ae).call(Qp.setScale,1/N,1/W),E.plot.call(Qp.setTranslate,ke,ge).call(Qp.setScale,N,W),Qp.setPointGroupScale(E.zoomScalePts,1/N,1/W),Qp.setTextPointsScale(E.zoomScaleTxt,1/N,1/W)}var l;i&&(l=i());function u(){for(var b={},g=0;gn.duration?(u(),d=window.cancelAnimationFrame(x)):d=window.requestAnimationFrame(x)}return f=Date.now(),d=window.requestAnimationFrame(x),Promise.resolve()}});var Jf=ye(yv=>{"use strict";var lI=xa(),Yve=ba(),Wb=Mr(),qvt=Yu(),Ovt=ao(),Kve=kd().getModuleCalcData,g_=af(),zg=ad(),Bvt=Zp(),Fl=Wb.ensureSingle;function sI(e,t,r){return Wb.ensureSingle(e,t,r,function(n){n.datum(r)})}var Zb=zg.zindexSeparator;yv.name="cartesian";yv.attr=["xaxis","yaxis"];yv.idRoot=["x","y"];yv.idRegex=zg.idRegex;yv.attrRegex=zg.attrRegex;yv.attributes=Tve();yv.layoutAttributes=Cd();yv.supplyLayoutDefaults=jve();yv.transitionAxes=Xve();yv.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=Wb.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],x,b=0;b1&&(L+=Zb+A),k.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=Fl(n,"path","xlines-above"),t.ylines=Fl(n,"path","ylines-above"),t.xaxislayer=Fl(n,"g","xaxislayer-above"),t.yaxislayer=Fl(n,"g","yaxislayer-above");else{if(!o){var h=Fl(n,"g","layer-subplot");t.shapelayer=Fl(h,"g","shapelayer"),t.imagelayer=Fl(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=Fl(n,"g","minor-gridlayer"),t.gridlayer=Fl(n,"g","gridlayer"),t.zerolinelayer=Fl(n,"g","zerolinelayer"));var d=Fl(n,"g","layer-between");t.shapelayerBetween=Fl(d,"g","shapelayer"),t.imagelayerBetween=Fl(d,"g","imagelayer"),Fl(n,"path","xlines-below"),Fl(n,"path","ylines-below"),t.overlinesBelow=Fl(n,"g","overlines-below"),Fl(n,"g","xaxislayer-below"),Fl(n,"g","yaxislayer-below"),t.overaxesBelow=Fl(n,"g","overaxes-below")}t.overplot=Fl(n,"g","overplot"),t.plot=Fl(t.overplot,"g",i),o||(t.xlines=Fl(n,"path","xlines-above"),t.ylines=Fl(n,"path","ylines-above"),t.overlinesAbove=Fl(n,"g","overlines-above"),Fl(n,"g","xaxislayer-above"),Fl(n,"g","yaxislayer-above"),t.overaxesAbove=Fl(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,x=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,Fl(f.overlinesBelow,"path",x),Fl(f.overlinesBelow,"path",b),Fl(f.overaxesBelow,"g",x),Fl(f.overaxesBelow,"g",b),t.plot=Fl(f.overplot,"g",i),Fl(f.overlinesAbove,"path",x),Fl(f.overlinesAbove,"path",b),Fl(f.overaxesAbove,"g",x),Fl(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+x),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+x),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(sI(t.minorGridlayer,"g",t.xaxis._id),sI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(g){return g[0]}).sort(g_.idSort),sI(t.gridlayer,"g",t.xaxis._id),sI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(g){return g[0]}).sort(g_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Qve(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=lI.select(this);c.remove(),epe(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 uI=lu();tpe.exports={hasLines:uI.hasLines,hasMarkers:uI.hasMarkers,hasText:uI.hasText,isBubble:uI.isBubble,attributes:Uc(),layoutAttributes:U6(),supplyDefaults:kde(),crossTraceDefaults:$N(),supplyLayoutDefaults:Ide(),calc:q0().calc,crossTraceCalc:rve(),arraysToCalcdata:km(),plot:iT(),colorbar:Kd(),formatLabels:JP(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:sT(),selectPoints:lT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Jf(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var ape=ye((Wnr,npe)=>{"use strict";var Uvt=xa(),Vvt=va(),ipe=MN(),wU=Mr(),Hvt=wU.strScale,Gvt=wU.strRotate,jvt=wU.strTranslate;npe.exports=function(t,r,n){var i=t.node(),a=ipe[n.arrowhead||0],o=ipe[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,x,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var g=d.x-v.x,E=d.y-v.y;if(x=Math.atan2(E,g),b=x+Math.PI,f&&h&&f+h>Math.sqrt(g*g+E*E)){V();return}if(f){if(f*f>g*g+E*E){V();return}var k=f*Math.cos(x),A=f*Math.sin(x);v.x+=k,v.y+=A,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>g*g+E*E){V();return}var L=h*Math.cos(x),_=h*Math.sin(x);d.x-=L,d.y-=_,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C{"use strict";var ope=xa(),TU=ba(),Wvt=Yu(),y_=Mr(),AU=y_.strTranslate,QM=Qa(),Xb=va(),Py=ao(),spe=Nc(),SU=Ll(),MU=Tg(),$M=gv(),Zvt=Vs().arrayEditor,Xvt=ape();cpe.exports={draw:Yvt,drawOne:lpe,drawRaw:upe};function Yvt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Xe="right":Xe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Xe]}for(var Ce=!1,me=["x","y"],De=0;De1)&&(nt===Ge?(St=ct.r2fraction(t["a"+ce]),(St<0||St>1)&&(Ce=!0)):Ce=!0),xr=ct._offset+ct.r2p(t[ce]),xt=.5}else{var Et=Lt==="domain";ce==="x"?(Ke=t[ce],xr=Et?ct._offset+ct._length*Ke:xr=s.l+s.w*Ke):(Ke=1-t[ce],xr=Et?ct._offset+ct._length*Ke:xr=s.t+s.h*Ke),xt=t.showarrow?.5:Ke}if(t.showarrow){Yt.head=xr;var dt=t["a"+ce];if(bt=rt*ze(.5,t.xanchor)-ot*ze(.5,t.yanchor),nt===Ge){var Ht=QM.getRefType(nt);Ht==="domain"?(ce==="y"&&(dt=1-dt),Yt.tail=ct._offset+ct._length*dt):Ht==="paper"?ce==="y"?(dt=1-dt,Yt.tail=s.t+s.h*dt):Yt.tail=s.l+s.w*dt:Yt.tail=ct._offset+ct.r2p(dt),er=bt}else Yt.tail=xr+dt,er=bt+dt;Yt.text=Yt.tail+bt;var $t=o[ce==="x"?"width":"height"];if(Ge==="paper"&&(Yt.head=y_.constrain(Yt.head,1,$t-1)),nt==="pixel"){var fr=-Math.max(Yt.tail-3,Yt.text),_r=Math.min(Yt.tail+3,Yt.text)-$t;fr>0?(Yt.tail+=fr,Yt.text+=fr):_r>0&&(Yt.tail-=_r,Yt.text-=_r)}Yt.tail+=Ct,Yt.head+=Ct}else bt=Dt*ze(xt,kt),er=bt,Yt.text=xr+bt;Yt.text+=Ct,bt+=Ct,er+=Ct,t["_"+ce+"padplus"]=Dt/2+er,t["_"+ce+"padminus"]=Dt/2-er,t["_"+ce+"size"]=Dt,t["_"+ce+"shift"]=bt}if(Ce){C.remove();return}var Br=0,Or=0;if(t.align!=="left"&&(Br=(ie-ke)*(t.align==="center"?.5:1)),t.valign!=="top"&&(Or=(Te-ge)*(t.valign==="middle"?.5:1)),_e)ae.select("svg").attr({x:P+Br-1,y:P+Or}).call(Py.setClipUrl,F?x:null,e);else{var Nr=P+Or-Me.top,ut=P+Br-Me.left;X.call(SU.positionText,ut,Nr).call(Py.setClipUrl,F?x:null,e)}q.select("rect").call(Py.setRect,P,P,ie,Te),T.call(Py.setRect,M/2,M/2,Ee-M,Ae-M),C.call(Py.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Ae/2)),k.attr({transform:"rotate("+g+","+b.x.text+","+b.y.text+")"});var Ne=function(Ve,Xe){E.selectAll(".annotation-arrow-g").remove();var ht=b.x.head,Le=b.y.head,xe=b.x.tail+Ve,Se=b.y.tail+Xe,lt=b.x.text+Ve,Gt=b.y.text+Xe,Vt=y_.rotationXYMatrix(g,lt,Gt),ar=y_.apply2DTransform(Vt),Qr=y_.apply2DTransform2(Vt),ai=+T.attr("width"),jr=+T.attr("height"),ri=lt-.5*ai,bi=ri+ai,nn=Gt-.5*jr,Wi=nn+jr,Ni=[[ri,nn,ri,Wi],[ri,Wi,bi,Wi],[bi,Wi,bi,nn],[bi,nn,ri,nn]].map(Qr);if(!Ni.reduce(function(Vr,gi){return Vr^!!y_.segmentsIntersect(ht,Le,ht+1e6,Le+1e6,gi[0],gi[1],gi[2],gi[3])},!1)){Ni.forEach(function(Vr){var gi=y_.segmentsIntersect(xe,Se,ht,Le,Vr[0],Vr[1],Vr[2],Vr[3]);gi&&(xe=gi.x,Se=gi.y)});var _n=t.arrowwidth,$i=t.arrowcolor,zn=t.arrowside,Wn=E.append("g").style({opacity:Xb.opacity($i)}).classed("annotation-arrow-g",!0),It=Wn.append("path").attr("d","M"+xe+","+Se+"L"+ht+","+Le).style("stroke-width",_n+"px").call(Xb.stroke,Xb.rgb($i));if(Xvt(It,zn,t),l.annotationPosition&&It.node().parentNode&&!n){var ft=ht,jt=Le;if(t.standoff){var Zt=Math.sqrt(Math.pow(ht-xe,2)+Math.pow(Le-Se,2));ft+=t.standoff*(xe-ht)/Zt,jt+=t.standoff*(Se-Le)/Zt}var yr=Wn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(xe-ft)+","+(Se-jt),transform:AU(ft,jt)}).style("stroke-width",_n+6+"px").call(Xb.stroke,"rgba(0,0,0,0)").call(Xb.fill,"rgba(0,0,0,0)"),Fr,Zr;$M.init({element:yr.node(),gd:e,prepFn:function(){var Vr=Py.getTranslate(C);Fr=Vr.x,Zr=Vr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Vr,gi){var Si=ar(Fr,Zr),Mi=Si[0]+Vr,Pi=Si[1]+gi;C.call(Py.setTranslate,Mi,Pi),d("x",m_(i,Vr,"x",s,t)),d("y",m_(a,gi,"y",s,t)),t.axref===t.xref&&d("ax",m_(i,Vr,"ax",s,t)),t.ayref===t.yref&&d("ay",m_(a,gi,"ay",s,t)),Wn.attr("transform",AU(Vr,gi)),k.attr({transform:"rotate("+g+","+Mi+","+Pi+")"})},doneFn:function(){TU.call("_guiRelayout",e,v());var Vr=document.querySelector(".js-notes-box-panel");Vr&&Vr.redraw(Vr.selectedObj)}})}}};if(t.showarrow&&Ne(0,0),A){var Ye;$M.init({element:C.node(),gd:e,prepFn:function(){Ye=k.attr("transform")},moveFn:function(Ve,Xe){var ht="pointer";if(t.showarrow)t.axref===t.xref?d("ax",m_(i,Ve,"ax",s,t)):d("ax",t.ax+Ve),t.ayref===t.yref?d("ay",m_(a,Xe,"ay",s.w,t)):d("ay",t.ay+Xe),Ne(Ve,Xe);else{if(n)return;var Le,xe;if(i)Le=m_(i,Ve,"x",s,t);else{var Se=t._xsize/s.w,lt=t.x+(t._xshift-t.xshift)/s.w-Se/2;Le=$M.align(lt+Ve/s.w,Se,0,1,t.xanchor)}if(a)xe=m_(a,Xe,"y",s,t);else{var Gt=t._ysize/s.h,Vt=t.y-(t._yshift+t.yshift)/s.h-Gt/2;xe=$M.align(Vt-Xe/s.h,Gt,0,1,t.yanchor)}d("x",Le),d("y",xe),(!i||!a)&&(ht=$M.getCursor(i?.5:Le,a?.5:xe,t.xanchor,t.yanchor))}k.attr({transform:AU(Ve,Xe)+Ye}),MU(C,ht)},clickFn:function(Ve,Xe){t.captureevents&&e.emit("plotly_clickannotation",_(Xe))},doneFn:function(){MU(C),TU.call("_guiRelayout",e,v());var Ve=document.querySelector(".js-notes-box-panel");Ve&&Ve.redraw(Ve.selectedObj)}})}}l.annotationText?X.call(SU.makeEditable,{delegate:C,gd:e}).call(G).on("edit",function(W){t.text=W,this.call(G),d("text",W),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),TU.call("_guiRelayout",e,v())}):X.call(G)}});var gpe=ye((Xnr,ppe)=>{"use strict";var fpe=Mr(),Kvt=ba(),hpe=Vs().arrayEditor;ppe.exports={hasClickToShow:Jvt,onClick:$vt};function Jvt(e,t){var r=vpe(e,t);return r.on.length>0||r.explicitOff.length>0}function $vt(e,t){var r=vpe(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 EU=Mr(),uT=va();mpe.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=uT.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),EU.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:uT.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),x=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",x.bgcolor||(uT.opacity(a)?uT.rgb(a):uT.defaultLine)),g=i("hoverlabel.bordercolor",x.bordercolor||uT.contrast(b)),E=EU.extendFlat({},x.font);E.color||(E.color=g),EU.coerceFont(i,"hoverlabel.font",E)}i("captureevents",!!v)}});var _pe=ye((Knr,ype)=>{"use strict";var CU=Mr(),Yb=Qa(),Qvt=Zd(),ept=kU(),tpt=Nb();ype.exports=function(t,r){Qvt(t,r,{name:"annotations",handleItemDefaults:rpt})};function rpt(e,t,r){function n(k,A){return CU.coerce(e,t,tpt,k,A)}var i=n("visible"),a=n("clicktoshow");if(i||a){ept(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=Yb.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=Yb.getFromId(u,h);d._annIndices.push(t._index)}if(Yb.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,x=Yb.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);x!=="pixel"&&x!==h&&(x=t[v]="pixel");var b=x==="pixel"?l[c]:.4;Yb.coercePosition(t,u,n,x,v,b)}n(f+"anchor"),n(f+"shift")}if(CU.noneOrAll(e,t,["x","y"]),o&&CU.noneOrAll(e,t,["ax","ay"]),a){var g=n("xclick"),E=n("yclick");t._xclick=g===void 0?t.x:Yb.cleanPosition(g,u,t.xref),t._yclick=E===void 0?t.y:Yb.cleanPosition(E,u,t.yref)}}}});var wpe=ye((Jnr,bpe)=>{"use strict";var LU=Mr(),Kb=Qa(),ipt=cI().draw;bpe.exports=function(t){var r=t._fullLayout,n=LU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return LU.syncOrAsync([ipt,npt],t)};function npt(e){var t=e._fullLayout;LU.filterVisible(t.annotations).forEach(function(r){var n=Kb.getFromId(e,r.xref),i=Kb.getFromId(e,r.yref),a=Kb.getRefType(r.xref),o=Kb.getRefType(r.yref);r._extremes={},a==="range"&&xpe(r,n),o==="range"&&xpe(r,i)})}function xpe(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,x=v+c,b=v-c,g;if(s===o){var E=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),k=Kb.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,x),ppadminus:Math.max(u,b)});g={min:[E.min[0],k.min[0]],max:[E.max[0],k.max[0]]}}else x=a?x+a:x,b=a?b-a:b,g=Kb.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,x),ppadminus:Math.max(u,d,b)});e._extremes[r]=g}});var Ape=ye(($nr,Tpe)=>{"use strict";var apt=uo(),opt=l6();Tpe.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],x=null;a?x=opt(v,r.range):x=Math.pow(10,v),apt(x)||(x=null),i(c+d,x)}for(var h=0;h{"use strict";var PU=cI(),Spe=gpe();Mpe.exports={moduleType:"component",name:"annotations",layoutAttributes:Nb(),supplyLayoutDefaults:_pe(),includeBasePlot:IM()("annotations"),calcAutorange:wpe(),draw:PU.draw,drawOne:PU.drawOne,drawRaw:PU.drawRaw,hasClickToShow:Spe.hasClickToShow,onClick:Spe.onClick,convertCoords:Ape()}});var fI=ye((ear,kpe)=>{"use strict";var Ku=Nb(),spt=Bu().overrideAll,lpt=Vs().templatedArray;kpe.exports=spt(lpt("annotation",{visible:Ku.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ku.xanchor,xshift:Ku.xshift,yanchor:Ku.yanchor,yshift:Ku.yshift,text:Ku.text,textangle:Ku.textangle,font:Ku.font,width:Ku.width,height:Ku.height,opacity:Ku.opacity,align:Ku.align,valign:Ku.valign,bgcolor:Ku.bgcolor,bordercolor:Ku.bordercolor,borderpad:Ku.borderpad,borderwidth:Ku.borderwidth,showarrow:Ku.showarrow,arrowcolor:Ku.arrowcolor,arrowhead:Ku.arrowhead,startarrowhead:Ku.startarrowhead,arrowside:Ku.arrowside,arrowsize:Ku.arrowsize,startarrowsize:Ku.startarrowsize,arrowwidth:Ku.arrowwidth,standoff:Ku.standoff,startstandoff:Ku.startstandoff,hovertext:Ku.hovertext,hoverlabel:Ku.hoverlabel,captureevents:Ku.captureevents}),"calc","from-root")});var Lpe=ye((tar,Cpe)=>{"use strict";var IU=Mr(),upt=Qa(),cpt=Zd(),fpt=kU(),hpt=fI();Cpe.exports=function(t,r,n){cpt(t,r,{name:"annotations",handleItemDefaults:dpt,fullLayout:n.fullLayout})};function dpt(e,t,r,n){function i(s,l){return IU.coerce(e,t,hpt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],upt.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(fpt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),IU.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),IU.noneOrAll(e,t,["ax","ay"])))}});var Rpe=ye((rar,Dpe)=>{"use strict";var Ppe=Mr(),Ipe=Qa();Dpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function DU(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 ppt(e,t){var r=DU(e.projection,DU(e.view,DU(e.model,[t[0],t[1],t[2],1])));return r}zpe.exports=ppt});var qpe=ye((nar,Fpe)=>{"use strict";var gpt=cI().drawRaw,mpt=RU(),ypt=["x","y","z"];Fpe.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=mpt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),gpt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var Npe=ye((aar,Bpe)=>{"use strict";var _pt=ba(),Ope=Mr();Bpe.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:fI()}}},layoutAttributes:fI(),handleDefaults:Lpe(),includeBasePlot:xpt,convert:Rpe(),draw:qpe()};function xpt(e,t){var r=_pt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var Upe=Nb(),Vpe=Su(),Hpe=Uc().line,bpt=Ed().dash,Fg=no().extendFlat,wpt=Vs().templatedArray,oar=PM(),cT=vl(),Tpt=Wo().shapeTexttemplateAttrs,Apt=x6();Gpe.exports=wpt("shape",{visible:Fg({},cT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Fg({},cT.legend,{editType:"calc+arraydraw"}),legendgroup:Fg({},cT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Fg({},cT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Vpe({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Fg({},cT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Fg({},cT.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:Fg({},Upe.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:Fg({},Upe.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:Fg({},Hpe.color,{editType:"arraydraw"}),width:Fg({},Hpe.width,{editType:"calc+arraydraw"}),dash:Fg({},bpt,{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:Tpt({},{keys:Object.keys(Apt)}),font:Vpe({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 Zpe=ye((lar,Wpe)=>{"use strict";var e4=Mr(),fT=Qa(),Spt=Zd(),Mpt=zU(),jpe=f_();Wpe.exports=function(t,r){Spt(t,r,{name:"shapes",handleItemDefaults:kpt})};function Ept(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function kpt(e,t,r){function n(W,re){return e4.coerce(e,t,Mpt,W,re)}t._isShape=!0;var i=n("visible");if(i){var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),e4.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 x=d[v],b=x+"anchor",g=x==="x"?f:h,E={_fullLayout:r},k,A,L,_=fT.coerceRef(e,t,E,x,void 0,"paper"),C=fT.getRefType(_);if(C==="range"?(k=fT.getFromId(E,_),k._shapeIndices.push(t._index),L=jpe.rangeToShapePosition(k),A=jpe.shapePositionToRange(k),(k.type==="category"||k.type==="multicategory")&&(n(x+"0shift"),n(x+"1shift"))):A=L=e4.identity,u){var M=.25,p=.75,P=x+"0",T=x+"1",F=e[P],q=e[T];e[P]=A(e[P],!0),e[T]=A(e[T],!0),g==="pixel"?(n(P,0),n(T,10)):(fT.coercePosition(t,E,n,_,P,M),fT.coercePosition(t,E,n,_,T,p)),t[P]=L(t[P]),t[T]=L(t[T]),e[P]=F,e[T]=q}if(g==="pixel"){var V=e[b];e[b]=A(e[b],!0),fT.coercePosition(t,E,n,_,b,.25),t[b]=L(t[b]),e[b]=V}}u&&e4.noneOrAll(e,t,["x0","x1","y0","y1"]);var H=l==="line",X,G;if(u&&(X=n("label.texttemplate")),X||(G=n("label.text")),G||X){n("label.textangle");var N=n("label.textposition",H?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Ept(H,N)),n("label.padding"),e4.coerceFont(n,"label.font",r.font)}}}});var Kpe=ye((uar,Ype)=>{"use strict";var Cpt=va(),Xpe=Mr();function Lpt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Ype.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"),Xpe.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",Cpt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",Lpt(o,u)),n("newshape.label.padding"),Xpe.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var t0e=ye((car,e0e)=>{"use strict";var FU=Mr(),hT=Qa(),dT=cM(),$pe=f_();e0e.exports=function(t){var r=t._fullLayout,n=FU.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 Jpe(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(dT.segmentRE),v,x,b,g,E;for(e.type==="date"&&(u=$pe.decodeDate(u)),v=0;vh&&(h=E)));if(h>=f)return[f,h]}}});var n0e=ye((far,i0e)=>{"use strict";var r0e=tP();i0e.exports={moduleType:"component",name:"shapes",layoutAttributes:zU(),supplyLayoutDefaults:Zpe(),supplyDrawNewShapeDefaults:Kpe(),includeBasePlot:IM()("shapes"),calcAutorange:t0e(),draw:r0e.draw,drawOne:r0e.drawOne}});var qU=ye((dar,o0e)=>{"use strict";var a0e=ad(),Dpt=Vs().templatedArray,har=PM();o0e.exports=Dpt("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",a0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",a0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var l0e=ye((par,s0e)=>{"use strict";var Rpt=Mr(),OU=Qa(),zpt=Zd(),Fpt=qU(),qpt="images";s0e.exports=function(t,r){var n={name:qpt,handleItemDefaults:Opt};zpt(t,r,n)};function Opt(e,t,r){function n(h,d){return Rpt.coerce(e,t,Fpt,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=OU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=OU.getFromId(o,c);f._imgIndices.push(t._index)}OU.coercePosition(t,o,n,c,u,0)}return t}});var h0e=ye((gar,f0e)=>{"use strict";var u0e=xa(),Bpt=ao(),vT=Qa(),c0e=af(),Npt=Zp();f0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var d0e=uo(),Upt=l6();v0e.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";g0e.exports={moduleType:"component",name:"images",layoutAttributes:qU(),supplyLayoutDefaults:l0e(),includeBasePlot:IM()("images"),draw:h0e(),convertCoords:p0e()}});var hI=ye((_ar,y0e)=>{"use strict";y0e.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 BU=ye((xar,x0e)=>{"use strict";var Vpt=Su(),Hpt=dh(),Gpt=no().extendFlat,jpt=Bu().overrideAll,Wpt=b6(),_0e=Vs().templatedArray,Zpt=_0e("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}});x0e.exports=jpt(_0e("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:Zpt,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:Gpt(Wpt({editType:"arraydraw"}),{}),font:Vpt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Hpt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var A0e=ye((bar,T0e)=>{"use strict";var dI=Mr(),b0e=Zd(),w0e=BU(),Xpt=hI(),Ypt=Xpt.name,Kpt=w0e.buttons;T0e.exports=function(t,r){var n={name:Ypt,handleItemDefaults:Jpt};b0e(t,r,n)};function Jpt(e,t,r){function n(o,s){return dI.coerce(e,t,w0e,o,s)}var i=b0e(e,t,{name:"buttons",handleItemDefaults:$pt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),dI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),dI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function $pt(e,t){function r(i,a){return dI.coerce(e,t,Kpt,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 E0e=ye((war,M0e)=>{"use strict";M0e.exports=of;var qg=xa(),S0e=va(),pT=ao(),vI=Mr();function of(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})}of.barWidth=2;of.barLength=20;of.barRadius=2;of.barPad=1;of.barColor="#808BA4";of.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",x=f==="up",b=l,g=c,E,k,A,L;!h&&!d&&!v&&!x&&(this.position.direction="down",h=!0);var _=h||x;_?(E=s,k=E+b,h?(A=u,L=Math.min(A+g,o),g=L-A):(L=u+g,A=Math.max(L-g,0),g=L-A)):(A=u,L=A+g,d?(k=s+b,E=Math.max(k-b,0),b=k-E):(E=s,k=Math.min(E+b,a),b=k-E)),this._box={l:E,t:A,w:b,h:g};var C=l>b,M=of.barLength+2*of.barPad,p=of.barWidth+2*of.barPad,P=s,T=u+c;T+p>o&&(T=o-p);var F=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(S0e.fill,of.barColor),C?(this.hbar=F.attr({rx:of.barRadius,ry:of.barRadius,x:P,y:T,width:M,height:p}),this._hbarXMin=P+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=c>g,V=of.barWidth+2*of.barPad,H=of.barLength+2*of.barPad,X=s+l,G=u;X+V>a&&(X=a-V);var N=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(S0e.fill,of.barColor),q?(this.vbar=N.attr({rx:of.barRadius,ry:of.barRadius,x:X,y:G,width:V,height:H}),this._vbarYMin=G+H/2,this._vbarTranslateMax=g-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var W=this.id,re=E-.5,ae=q?k+V+.5:k+.5,_e=A-.5,Me=C?L+p+.5:L+.5,ke=i._topdefs.selectAll("#"+W).data(C||q?[0]:[]);if(ke.exit().remove(),ke.enter().append("clipPath").attr("id",W).append("rect"),C||q?(this._clipRect=ke.select("rect").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(ae)-Math.floor(re),height:Math.ceil(Me)-Math.floor(_e)}),this.container.call(pT.setClipUrl,W,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(pT.setClipUrl,null),delete this._clipRect),C||q){var ge=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(ge);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),q&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(r,n)};of.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(pT.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)};of.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)};of.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)};of.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=vI.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=vI.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)};of.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=vI.constrain(t||0,0,n),r=vI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(pT.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(pT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(pT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var q0e=ye((Tar,F0e)=>{"use strict";var gT=xa(),t4=Yu(),r4=va(),mT=ao(),e0=Mr(),pI=Ll(),Qpt=Vs().arrayEditor,C0e=Nh().LINE_SPACING,Go=hI(),e0t=E0e();F0e.exports=function(t){var r=t._fullLayout,n=e0.filterVisible(r[Go.name]);function i(h){t4.autoMargin(t,R0e(h))}var a=r._menulayer.selectAll("g."+Go.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(Go.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){gT.select(this).selectAll("g."+Go.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+Go.headerGroupClassName).data(n,t0t);o.enter().append("g").classed(Go.headerGroupClassName,!0);for(var s=e0.ensureSingle(a,"g",Go.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var l0t=hI();O0e.exports={moduleType:"component",name:l0t.name,layoutAttributes:BU(),supplyLayoutDefaults:A0e(),draw:q0e()}});var n4=ye((Sar,N0e)=>{"use strict";N0e.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 HU=ye((Mar,H0e)=>{"use strict";var U0e=Su(),u0t=b6(),c0t=no().extendDeepAll,f0t=Bu().overrideAll,h0t=zS(),V0e=Vs().templatedArray,Jb=n4(),d0t=V0e("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}});H0e.exports=f0t(V0e("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:d0t,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:c0t(u0t({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:h0t.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:U0e({})},font:U0e({}),activebgcolor:{valType:"color",dflt:Jb.gripBgActiveColor},bgcolor:{valType:"color",dflt:Jb.railBgColor},bordercolor:{valType:"color",dflt:Jb.railBorderColor},borderwidth:{valType:"number",min:0,dflt:Jb.railBorderWidth},ticklen:{valType:"number",min:0,dflt:Jb.tickLength},tickcolor:{valType:"color",dflt:Jb.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:Jb.minorTickLength}}),"arraydraw","from-root")});var Z0e=ye((Ear,W0e)=>{"use strict";var yT=Mr(),G0e=Zd(),j0e=HU(),v0t=n4(),p0t=v0t.name,g0t=j0e.steps;W0e.exports=function(t,r){G0e(t,r,{name:p0t,handleItemDefaults:m0t})};function m0t(e,t,r){function n(f,h){return yT.coerce(e,t,j0e,f,h)}for(var i=G0e(e,t,{name:"steps",handleItemDefaults:y0t}),a=0,o=0;o{"use strict";var Og=xa(),gI=Yu(),__=va(),Bg=ao(),t0=Mr(),_0t=t0.strTranslate,a4=Ll(),x0t=Vs().arrayEditor,gs=n4(),WU=Nh(),K0e=WU.LINE_SPACING,GU=WU.FROM_TL,jU=WU.FROM_BR;rge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=b0t(n,t),a=n._infolayer.selectAll("g."+gs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(gs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),gI.autoMargin(t,J0e(c))}if(a.exit().each(function(){Og.select(this).selectAll("g."+gs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+gs.groupClassName).data(i,w0t);s.enter().append("g").classed(gs.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",_0t(o-gs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function ZU(e,t){var r=e._dims;return r.inputAreaStart+gs.stepInset+(r.inputAreaLength-2*gs.stepInset)*Math.min(1,Math.max(0,t))}function Y0e(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-gs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*gs.stepInset-2*r.inputAreaStart)))}function C0t(e,t,r){var n=r._dims,i=t0.ensureSingle(e,"rect",gs.railTouchRectClass,function(a){a.call(ege,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,gs.tickOffset+r.ticklen+n.labelHeight)}).call(__.fill,r.bgcolor).attr("opacity",0),Bg.setTranslate(i,0,n.currentValueTotalHeight)}function L0t(e,t){var r=t._dims,n=r.inputAreaLength-gs.railInset*2,i=t0.ensureSingle(e,"rect",gs.railRectClass);i.attr({width:n,height:gs.railWidth,rx:gs.railRadius,ry:gs.railRadius,"shape-rendering":"crispEdges"}).call(__.stroke,t.bordercolor).call(__.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Bg.setTranslate(i,gs.railInset,(r.inputAreaWidth-gs.railWidth)*.5+r.currentValueTotalHeight)}});var age=ye((Car,nge)=>{"use strict";var P0t=n4();nge.exports={moduleType:"component",name:P0t.name,layoutAttributes:HU(),supplyLayoutDefaults:Z0e(),draw:ige()}});var yI=ye((Lar,sge)=>{"use strict";var oge=dh();sge.exports={bgcolor:{valType:"color",dflt:oge.background,editType:"plot"},bordercolor:{valType:"color",dflt:oge.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 XU=ye((Par,lge)=>{"use strict";lge.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 _I=ye((Iar,uge)=>{"use strict";uge.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 hge=ye(bI=>{"use strict";var I0t=af(),D0t=Ll(),cge=_I(),R0t=Nh().LINE_SPACING,xI=cge.name;function fge(e){var t=e&&e[xI];return t&&t.visible}bI.isVisible=fge;bI.makeData=function(e){for(var t=I0t.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var wI=Mr(),dge=Vs(),vge=af(),z0t=yI(),F0t=XU();pge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;wI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=dge.newContainer(a,"rangeslider");function l(L,_){return wI.coerce(o,s,z0t,L,_)}var u,c;function f(L,_){return wI.coerce(u,c,F0t,L,_)}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.substr(0,L.indexOf("y"))===vge.name2id(n)}).map(function(L){return L.substr(L.indexOf("y"),L.length)}),x=wI.simpleMap(v,vge.id2name),b=0;b{"use strict";var q0t=af().list,O0t=wg().getAutoRange,B0t=_I();mge.exports=function(t){for(var r=q0t(t,"x",!0),n=0;n{"use strict";var TI=xa(),N0t=ba(),U0t=Yu(),Ff=Mr(),AI=Ff.strTranslate,xge=ao(),x_=va(),V0t=Mb(),H0t=Jf(),YU=af(),G0t=gv(),j0t=Tg(),Bs=_I();bge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=N.max)X=T[G+1];else if(H=N.pmax)X=T[G+1];else if(H0?e.touches[0].clientX:0}function W0t(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+Bs.slideBoxClassName).node(),a=e.select("rect."+Bs.grabAreaMinClassName).node(),o=e.select("rect."+Bs.grabAreaMaxClassName).node();function s(){var l=TI.event,u=l.target,c=_ge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=G0t.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",b),v.addEventListener("mousemove",x),v.addEventListener("mouseup",b);function x(g){var E=_ge(g),k=+E-c,A,L,_;switch(u){case i:if(_="ew-resize",h+k>r._length||d+k<0)return;A=h+k,L=d+k;break;case a:if(_="col-resize",h+k>r._length)return;A=h+k,L=d;break;case o:if(_="col-resize",d+k<0)return;A=h,L=d+k;break;default:_="ew-resize",A=f,L=f+k;break}if(L{"use strict";var rgt=Mr(),igt=yI(),ngt=XU(),KU=hge();Tge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:rgt.extendFlat({},igt,{yaxis:ngt})}}},layoutAttributes:yI(),handleDefaults:gge(),calcAutorange:yge(),draw:wge(),isVisible:KU.isVisible,makeData:KU.makeData,autoMarginOpts:KU.autoMarginOpts}});var SI=ye((Oar,Mge)=>{"use strict";var agt=Su(),Sge=dh(),ogt=Vs().templatedArray,sgt=ogt("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"});Mge.exports={visible:{valType:"boolean",editType:"plot"},buttons:sgt,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:agt({editType:"plot"}),bgcolor:{valType:"color",dflt:Sge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Sge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var JU=ye((Bar,Ege)=>{"use strict";Ege.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Lge=ye((Nar,Cge)=>{"use strict";var MI=Mr(),lgt=va(),ugt=Vs(),cgt=Zd(),kge=SI(),$U=JU();Cge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=ugt.newContainer(r,"rangeselector");function l(d,v){return MI.coerce(o,s,kge,d,v)}var u=cgt(o,s,{name:"buttons",handleItemDefaults:fgt,calendar:a}),c=l("visible",u.length>0);if(c){var f=hgt(r,n,i);l("x",f[0]),l("y",f[1]),MI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),MI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",lgt.contrast(h,$U.lightAmount,$U.darkAmount)),l("bordercolor"),l("borderwidth")}};function fgt(e,t,r,n){var i=n.calendar;function a(l,u){return MI.coerce(e,t,kge.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 hgt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var dgt=hq(),vgt=Mr().titleCase;Pge.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=pgt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function pgt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=dgt["utc"+vgt(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 Nge=ye((Var,Bge)=>{"use strict";var kI=xa(),ggt=ba(),mgt=Yu(),Dge=va(),Oge=ao(),Iy=Mr(),Rge=Iy.strTranslate,EI=Ll(),ygt=af(),tV=Nh(),zge=tV.LINE_SPACING,Fge=tV.FROM_TL,qge=tV.FROM_BR,eV=JU(),_gt=Ige();Bge.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(xgt(t),bgt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=kI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Iy.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=kI.select(this),f=_gt(o,u);u._isActive=wgt(o,u,f),c.call(QU,s,u),c.call(Agt,s,u,t),c.on("click",function(){t._dragged||ggt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(QU,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(QU,s,u)})}),Mgt(t,l,s,o._name,a)})};function xgt(e){for(var t=ygt.list(e,"x",!0),r=[],n=0;n{"use strict";Uge.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:SI()}}},layoutAttributes:SI(),handleDefaults:Lge(),draw:Nge()}});var Ju=ye(rV=>{"use strict";var Hge=no().extendFlat;rV.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:Hge({},r,{}),y:Hge({},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};rV.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 Egt=Mr(),kgt=n3().counter,Cgt=Ju().attributes,Gge=ad().idRegex,Lgt=Vs(),iV={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:[kgt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Gge.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Gge.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:Cgt({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 CI(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 Pgt(e,t){var r=e.grid||{},n=CI(t,r,"x"),i=CI(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=Lgt.newContainer(t,"grid");function h(_,C){return Egt.coerce(r,f,iV,_,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var x=h("pattern")==="independent";x&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),g=b==="top to bottom",E=a?.2:.1,k=a?.3:.1,A,L;l&&t._splomGridDflt&&(A=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:jge("x",h,E,A,v),y:jge("y",h,k,L,d,g)}}function jge(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";Xge.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 Jge=ye((Zar,Kge)=>{"use strict";var Yge=uo(),Dgt=ba(),Rgt=Mr(),zgt=Vs(),Fgt=aV();Kge.exports=function(e,t,r,n){var i="error_"+n.axis,a=zgt.newContainer(t,i),o=e[i]||{};function s(v,x){return Rgt.coerce(o,a,Fgt,v,x)}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||Yge(o.thickness)||Yge(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",Dgt.traceIs(t,"gl3d")?0:4))}}});var oV=ye((Xar,Qge)=>{"use strict";Qge.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=$ge(r,t.value),s=$ge(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 $ge(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 rme=ye((Yar,tme)=>{"use strict";var sV=uo(),qgt=ba(),lV=Qa(),Ogt=Mr(),Bgt=oV();tme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var ime=xa(),b_=uo(),Ngt=ao(),Ugt=lu();nme.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(E){return E.id});var x=Ugt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=ime.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 g=b.enter().append("g").classed("errorbar",!0);l&&g.style("opacity",0).transition().duration(i.duration).style("opacity",1),Ngt.setClipUrl(b,n.layerClipId,t),b.each(function(E){var k=ime.select(this),A=Vgt(E,o,s);if(!(x&&!E.vis)){var L,_=k.select("path.yerror");if(d.visible&&b_(A.x)&&b_(A.yh)&&b_(A.ys)){var C=d.width;L="M"+(A.x-C)+","+A.yh+"h"+2*C+"m-"+C+",0V"+A.ys,A.noYS||(L+="m-"+C+",0h"+2*C),a=!_.size(),a?_=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(_=_.transition().duration(i.duration).ease(i.easing)),_.attr("d",L)}else _.remove();var M=k.select("path.xerror");if(h.visible&&b_(A.y)&&b_(A.xh)&&b_(A.xs)){var p=(h.copy_ystyle?d:h).width;L="M"+A.xh+","+(A.y-p)+"v"+2*p+"m0,-"+p+"H"+A.xs,A.noXS||(L+="m0,-"+p+"v"+2*p),a=!M.size(),a?M=k.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 Vgt(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 lme=ye((Jar,sme)=>{"use strict";var Hgt=xa(),ome=va();sme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Hgt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(ome.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(ome.stroke,a.color)})}});var fme=ye(($ar,cme)=>{"use strict";var o4=Mr(),ume=Bu().overrideAll,s4=aV(),$b={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4)};delete $b.error_x.copy_zstyle;delete $b.error_y.copy_zstyle;delete $b.error_y.copy_ystyle;var l4={error_x:o4.extendFlat({},s4),error_y:o4.extendFlat({},s4),error_z:o4.extendFlat({},s4)};delete l4.error_x.copy_ystyle;delete l4.error_y.copy_ystyle;delete l4.error_z.copy_ystyle;delete l4.error_z.copy_zstyle;cme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:$b,bar:$b,histogram:$b,scatter3d:ume(l4,"calc","nested"),scattergl:ume($b,"calc","nested")}},supplyDefaults:Jge(),calc:rme(),makeComputeError:oV(),plot:ame(),style:lme(),hoverInfo:Ggt};function Ggt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var dme=ye((Qar,hme)=>{"use strict";hme.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 xme=ye((eor,_me)=>{"use strict";var w_=xa(),uV=id(),PI=Yu(),vme=ba(),Dy=Qa(),LI=gv(),B0=Mr(),Ug=B0.strTranslate,yme=no().extendFlat,cV=Tg(),Ng=ao(),fV=va(),jgt=Mb(),Wgt=Ll(),Zgt=Rv().flipScale,Xgt=JM(),Ygt=rI(),Kgt=Cd(),hV=Nh(),pme=hV.LINE_SPACING,gme=hV.FROM_TL,mme=hV.FROM_BR,Vc=dme().cn;function Jgt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Vc.colorbar).data($gt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Vc.colorbar,!0),r.each(function(n){var i=w_.select(this);B0.ensureSingle(i,"rect",Vc.cbbg),B0.ensureSingle(i,"g",Vc.cbfills),B0.ensureSingle(i,"g",Vc.cblines),B0.ensureSingle(i,"g",Vc.cbaxis,function(o){o.classed(Vc.crisp,!0)}),B0.ensureSingle(i,"g",Vc.cbtitleunshift,function(o){o.append("g").classed(Vc.cbtitle,!0)}),B0.ensureSingle(i,"rect",Vc.cboutline);var a=Qgt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&emt(i,n,e)}),r.exit().each(function(n){PI.autoMargin(e,n._id)}).remove(),r.order()}function $gt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(k){return yme(k,{_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?Zgt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c1){var De=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));ze*=De*B0.roundUp(me/De,[2,5,10]),(Math.abs(F.start)/F.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=ze}Ee.domain=n?[ie+v/A.h,ie+W-v/A.h]:[ie+d/A.w,ie+W-d/A.w],Ee.setScale(),e.attr("transform",Ug(Math.round(A.l),Math.round(A.t)));var ce=e.select("."+Vc.cbtitleunshift).attr("transform",Ug(-Math.round(A.l),-Math.round(A.t))),Ge=Ee.ticklabelposition,nt=Ee.title.font.size,ct=e.select("."+Vc.cbaxis),qt,rt=0,ot=0;function Dt(er,Ke){var xt={propContainer:Ee,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Vc.cbtitle)},bt=er.charAt(0)==="h"?er.substr(1):"h"+er;e.selectAll("."+bt+",."+bt+"-math-group").remove(),jgt.draw(r,er,yme(xt,Ke||{}))}function kt(){if(n&&Ae||!n&&!Ae){var er,Ke;M==="top"&&(er=d+A.l+re*x,Ke=v+A.t+ae*(1-ie-W)+3+nt*.75),M==="bottom"&&(er=d+A.l+re*x,Ke=v+A.t+ae*(1-ie)-3-nt*.25),M==="right"&&(Ke=v+A.t+ae*b+3+nt*.75,er=d+A.l+re*ie),Dt(Ee._id+"title",{attributes:{x:er,y:Ke,"text-anchor":n?"start":"middle"}})}}function Ct(){if(n&&!Ae||!n&&Ae){var er=Ee.position||0,Ke=Ee._offset+Ee._length/2,xt,bt;if(M==="right")bt=Ke,xt=A.l+re*er+10+nt*(Ee.showticklabels?1:.5);else if(xt=Ke,M==="bottom"&&(bt=A.t+ae*er+10+(Ge.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="intside"&&t.ticklen||0)),M==="top"){var Lt=C.text.split("
").length;bt=A.t+ae*er+10-X-pme*nt*Lt}Dt((n?"h":"v")+Ee._id+"title",{avoid:{selection:w_.select(r).selectAll("g."+Ee._id+"tick"),side:M,offsetTop:n?0:A.t,offsetLeft:n?A.l:0,maxShift:n?k.width:k.height},attributes:{x:xt,y:bt,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Yt(){if(!n&&!Ae||n&&Ae){var er=e.select("."+Vc.cbtitle),Ke=er.select("text"),xt=[-l/2,l/2],bt=er.select(".h"+Ee._id+"title-math-group").node(),Lt=15.6;Ke.node()&&(Lt=parseInt(Ke.node().style.fontSize,10)*pme);var St;if(bt?(St=Ng.bBox(bt),ot=St.width,rt=St.height,rt>Lt&&(xt[1]-=(rt-Lt)/2)):Ke.node()&&!Ke.classed(Vc.jsPlaceholder)&&(St=Ng.bBox(Ke.node()),ot=St.width,rt=St.height),n){if(rt){if(rt+=5,M==="top")Ee.domain[1]-=rt/A.h,xt[1]*=-1;else{Ee.domain[0]+=rt/A.h;var Et=Wgt.lineCount(Ke);xt[1]+=(1-Et)*Lt}er.attr("transform",Ug(xt[0],xt[1])),Ee.setScale()}}else ot&&(M==="right"&&(Ee.domain[0]+=(ot+nt/2)/A.w),er.attr("transform",Ug(xt[0],xt[1])),Ee.setScale())}e.selectAll("."+Vc.cbfills+",."+Vc.cblines).attr("transform",n?Ug(0,Math.round(A.h*(1-Ee.domain[1]))):Ug(Math.round(A.w*Ee.domain[0]),0)),ct.attr("transform",n?Ug(0,Math.round(-A.t)):Ug(Math.round(-A.l),0));var dt=e.select("."+Vc.cbfills).selectAll("rect."+Vc.cbfill).attr("style","").data(V);dt.enter().append("rect").classed(Vc.cbfill,!0).attr("style",""),dt.exit().remove();var Ht=p.map(Ee.c2p).map(Math.round).sort(function(Or,Nr){return Or-Nr});dt.each(function(Or,Nr){var ut=[Nr===0?p[0]:(V[Nr]+V[Nr-1])/2,Nr===V.length-1?p[1]:(V[Nr]+V[Nr+1])/2].map(Ee.c2p).map(Math.round);n&&(ut[1]=B0.constrain(ut[1]+(ut[1]>ut[0])?1:-1,Ht[0],Ht[1]));var Ne=w_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",w_.min(ut)).attr(n?"width":"height",Math.max(X,2)).attr(n?"height":"width",Math.max(w_.max(ut)-w_.min(ut),2));if(t._fillgradient)Ng.gradient(Ne,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Ye=T(Or).replace("e-","");Ne.attr("fill",uV(Ye).toHexString())}});var $t=e.select("."+Vc.cblines).selectAll("path."+Vc.cbline).data(_.color&&_.width?H:[]);$t.enter().append("path").classed(Vc.cbline,!0),$t.exit().remove(),$t.each(function(Or){var Nr=_e,ut=Math.round(Ee.c2p(Or))+_.width/2%1;w_.select(this).attr("d","M"+(n?Nr+","+ut:ut+","+Nr)+(n?"h":"v")+X).call(Ng.lineGroupStyle,_.width,P(Or),_.dash)}),ct.selectAll("g."+Ee._id+"tick,path").remove();var fr=_e+X+(l||0)/2-(t.ticks==="outside"?1:0),_r=Dy.calcTicks(Ee),Br=Dy.getTickSigns(Ee)[2];return Dy.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Dy.clipEnds(Ee,_r):_r,layer:ct,path:Dy.makeTickPath(Ee,fr,Br),transFn:Dy.makeTransTickFn(Ee)}),Dy.drawLabels(r,Ee,{vals:_r,layer:ct,transFn:Dy.makeTransTickLabelFn(Ee),labelFns:Dy.makeLabelFns(Ee,fr)})}function xr(){var er,Ke=X+l/2;Ge.indexOf("inside")===-1&&(er=Ng.bBox(ct.node()),Ke+=n?er.width:er.height),qt=ce.select("text");var xt=0,bt=n&&M==="top",Lt=!n&&M==="right",St=0;if(qt.node()&&!qt.classed(Vc.jsPlaceholder)){var Et,dt=ce.select(".h"+Ee._id+"title-math-group").node();dt&&(n&&Ae||!n&&!Ae)?(er=Ng.bBox(dt),xt=er.width,Et=er.height):(er=Ng.bBox(ce.node()),xt=er.right-A.l-(n?_e:Te),Et=er.bottom-A.t-(n?Te:_e),!n&&M==="top"&&(Ke+=er.height,St=er.height)),Lt&&(qt.attr("transform",Ug(xt/2+nt/2,0)),xt*=2),Ke=Math.max(Ke,n?xt:Et)}var Ht=(n?d:v)*2+Ke+u+l/2,$t=0;!n&&C.text&&h==="bottom"&&b<=0&&($t=Ht/2,Ht+=$t,St+=$t),k._hColorbarMoveTitle=$t,k._hColorbarMoveCBTitle=St;var fr=u+l,_r=(n?_e:Te)-fr/2-(n?d:0),Br=(n?Te:_e)-(n?N:v+St-$t);e.select("."+Vc.cbbg).attr("x",_r).attr("y",Br).attr(n?"width":"height",Math.max(Ht-$t,2)).attr(n?"height":"width",Math.max(N+fr,2)).call(fV.fill,c).call(fV.stroke,t.bordercolor).style("stroke-width",u);var Or=Lt?Math.max(xt-10,0):0;e.selectAll("."+Vc.cboutline).attr("x",(n?_e:Te+d)+Or).attr("y",(n?Te+v-N:_e)+(bt?rt:0)).attr(n?"width":"height",Math.max(X,2)).attr(n?"height":"width",Math.max(N-(n?2*v+rt:2*d+Or),2)).call(fV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Nr=n?Me*Ht:0,ut=n?0:(1-ke)*Ht-St;if(Nr=E?A.l-Nr:-Nr,ut=g?A.t-ut:-ut,e.attr("transform",Ug(Nr,ut)),!n&&(u||uV(c).getAlpha()&&!uV.equals(k.paper_bgcolor,c))){var Ne=ct.selectAll("text"),Ye=Ne[0].length,Ve=e.select("."+Vc.cbbg).node(),Xe=Ng.bBox(Ve),ht=Ng.getTranslate(e),Le=2;Ne.each(function(ri,bi){var nn=0,Wi=Ye-1;if(bi===nn||bi===Wi){var Ni=Ng.bBox(this),_n=Ng.getTranslate(this),$i;if(bi===Wi){var zn=Ni.right+_n.x,Wn=Xe.right+ht.x+Te-u-Le+x;$i=Wn-zn,$i>0&&($i=0)}else if(bi===nn){var It=Ni.left+_n.x,ft=Xe.left+ht.x+Te+u+Le;$i=ft-It,$i<0&&($i=0)}$i&&(Ye<3?this.setAttribute("transform","translate("+$i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var xe={},Se=gme[f],lt=mme[f],Gt=gme[h],Vt=mme[h],ar=Ht-X;n?(a==="pixels"?(xe.y=b,xe.t=N*Gt,xe.b=N*Vt):(xe.t=xe.b=0,xe.yt=b+i*Gt,xe.yb=b-i*Vt),s==="pixels"?(xe.x=x,xe.l=Ht*Se,xe.r=Ht*lt):(xe.l=ar*Se,xe.r=ar*lt,xe.xl=x-o*Se,xe.xr=x+o*lt)):(a==="pixels"?(xe.x=x,xe.l=N*Se,xe.r=N*lt):(xe.l=xe.r=0,xe.xl=x+i*Se,xe.xr=x-i*lt),s==="pixels"?(xe.y=1-b,xe.t=Ht*Gt,xe.b=Ht*Vt):(xe.t=ar*Gt,xe.b=ar*Vt,xe.yt=b-o*Gt,xe.yb=b+o*Vt));var Qr=t.y<.5?"b":"t",ai=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var jr={r:k.width-_r-Nr,l:_r+xe.r,b:k.height-Br-ut,t:Br+xe.b};E&&g?PI.autoMargin(r,t._id,xe):E?r._fullLayout._reservedMargin[t._id][Qr]=jr[Qr]:g||n?r._fullLayout._reservedMargin[t._id][ai]=jr[ai]:r._fullLayout._reservedMargin[t._id][Qr]=jr[Qr]}return B0.syncOrAsync([PI.previousPromises,kt,Yt,Ct,PI.previousPromises,xr],r)}function emt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;LI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),cV(e)},moveFn:function(u,c){e.attr("transform",o+Ug(u,c)),s=LI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=LI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=LI.getCursor(s,l,t.xanchor,t.yanchor);cV(e,f)},doneFn:function(){if(cV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?vme.call("_guiRestyle",r,u,t._traceIndex):vme.call("_guiRelayout",r,u)}}})}function tmt(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";bme.exports={moduleType:"component",name:"colorbar",attributes:Y6(),supplyDefaults:AO(),draw:xme().draw,hasColorbar:mO()}});var Ame=ye((ror,Tme)=>{"use strict";Tme.exports={moduleType:"component",name:"legend",layoutAttributes:yB(),supplyLayoutDefaults:bB(),draw:DB(),style:CB()}});var Mme=ye((ior,Sme)=>{"use strict";Sme.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 kme=ye((nor,Eme)=>{"use strict";Eme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var vV=ye((aor,Ime)=>{"use strict";var imt=ba(),Pme=Mr(),dV=Pme.extendFlat,Cme=Pme.extendDeep;function Lme(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 nmt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Ime.exports=function(t,r){var n,i=t.data,a=t.layout,o=Cme([],i),s=Cme({},a,Lme(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 amt=vb().EventEmitter,omt=ba(),smt=Mr(),Dme=Ly(),lmt=vV(),umt=OP(),cmt=BP();function fmt(e,t){var r=new amt,n=lmt(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=Dme.getDelay(i._fullLayout);setTimeout(function(){var l=umt(i),u=document.createElement("canvas");u.id=smt.randstr(),r=cmt({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=Dme.getRedrawFunc(i);return omt.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}Rme.exports=fmt});var Ome=ye((sor,qme)=>{"use strict";var Fme=Ly(),hmt={getDelay:Fme.getDelay,getRedrawFunc:Fme.getRedrawFunc,clone:vV(),toSVG:OP(),svgToImg:BP(),toImage:zme(),downloadImage:YN()};qme.exports=hmt});var Nme=ye(Ry=>{"use strict";Ry.version=QC().version;QQ();Vie();var dmt=ba(),u4=Ry.register=dmt.register,gV=lde(),Bme=Object.keys(gV);for(II=0;II{"use strict";Ume.exports=Nme()});var Qb=ye((cor,Hme)=>{"use strict";Hme.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var Lm=ye((hor,Zme)=>{"use strict";var Tf=Uc(),Gme=Oc().axisHoverFormat,vmt=Wo().hovertemplateAttrs,pmt=Wo().texttemplateAttrs,Wme=Kl(),gmt=Su(),jme=Qb(),mmt=Ed().pattern,e2=no().extendFlat,mV=gmt({editType:"calc",arrayOk:!0,colorEditType:"style"}),ymt=Tf.marker,_mt=ymt.line,xmt=e2({},_mt.width,{dflt:0}),bmt=e2({width:xmt,editType:"calc"},Wme("marker.line")),wmt=e2({line:bmt,editType:"calc"},Wme("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:mmt,cornerradius:{valType:"any",editType:"calc"}});Zme.exports={x:Tf.x,x0:Tf.x0,dx:Tf.dx,y:Tf.y,y0:Tf.y0,dy:Tf.dy,xperiod:Tf.xperiod,yperiod:Tf.yperiod,xperiod0:Tf.xperiod0,yperiod0:Tf.yperiod0,xperiodalignment:Tf.xperiodalignment,yperiodalignment:Tf.yperiodalignment,xhoverformat:Gme("x"),yhoverformat:Gme("y"),text:Tf.text,texttemplate:pmt({editType:"plot"},{keys:jme.eventDataKeys}),hovertext:Tf.hovertext,hovertemplate:vmt({},{keys:jme.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:e2({},mV,{}),insidetextfont:e2({},mV,{}),outsidetextfont:e2({},mV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:e2({},Tf.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:wmt,offsetgroup:Tf.offsetgroup,alignmentgroup:Tf.alignmentgroup,selected:{marker:{opacity:Tf.selected.marker.opacity,color:Tf.selected.marker.color,editType:"style"},textfont:Tf.selected.textfont,editType:"style"},unselected:{marker:{opacity:Tf.unselected.marker.opacity,color:Tf.unselected.marker.color,editType:"style"},textfont:Tf.unselected.textfont,editType:"style"},zorder:Tf.zorder}});var RI=ye((dor,Xme)=>{"use strict";Xme.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 zI=ye((vor,Jme)=>{"use strict";var Tmt=va(),Yme=Rv().hasColorscale,Kme=Uh(),Amt=Mr().coercePattern;Jme.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=Yme(t,"marker");s&&Kme(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",Tmt.defaultLine),Yme(t,"marker.line")&&Kme(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),Amt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var r0=ye((por,iye)=>{"use strict";var $me=uo(),xT=Mr(),Qme=va(),Smt=ba(),Mmt=K3(),Emt=Pg(),kmt=zI(),Cmt=Hb(),eye=Lm(),FI=xT.coerceFont;function Lmt(e,t,r,n){function i(u,c){return xT.coerce(e,t,eye,u,c)}var a=Mmt(e,t,n,i);if(!a){t.visible=!1;return}Emt(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");var o=i("textposition");rye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),kmt(e,t,i,r,n);var s=(t.marker.line||{}).color,l=Smt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||Qme.defaultLine,{axis:"y"}),l(e,t,s||Qme.defaultLine,{axis:"x",inherit:"y"}),xT.coerceSelectionMarkerOpacity(t,i)}function Pmt(e,t){var r,n;function i(s,l){return xT.coerce(n._input,n,eye,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&$me(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function rye(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",x=d||i==="outside";if(v||x){var b=FI(n,"textfont",r.font),g=xT.extendFlat({},b),E=e.textfont&&e.textfont.color,k=!E;if(k&&delete g.color,FI(n,"insidetextfont",g),h){var A=xT.extendFlat({},b);k&&delete A.color,FI(n,"pathbar.textfont",A)}x&&FI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate")}v&&f&&n("insidetextanchor")}iye.exports={supplyDefaults:Lmt,crossTraceDefaults:Pmt,handleText:rye,validateCornerradius:tye}});var yV=ye((gor,nye)=>{"use strict";var Imt=ba(),Dmt=Qa(),Rmt=Mr(),zmt=RI(),Fmt=r0().validateCornerradius;nye.exports=function(e,t,r){function n(x,b){return Rmt.coerce(e,t,zmt,x,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=Dmt.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=Fmt(v)}});var c4=ye((mor,aye)=>{"use strict";var bT=Mr();aye.exports=function(t,r){for(var n=0;n{"use strict";var oye=Qa(),sye=Dg(),lye=Rv().hasColorscale,uye=zv(),qmt=c4(),Omt=F0();cye.exports=function(t,r){var n=oye.getFromId(t,r.xaxis||"x"),i=oye.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=sye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=sye(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 Bmt=xa(),Nmt=Mr();function Umt(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=Bmt.select(this).select("text");Nmt.setTransormAndDisplay(u,l)}})}}function Vmt(e,t,r){if(r.uniformtext.mode){var n=hye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var Gmt=uo(),jmt=id(),vye=Mr().isArrayOrTypedArray;t2.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};t2.coerceNumber=function(e,t,r){if(Gmt(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};t2.coerceColor=function(e,t,r){return jmt(t).isValid()?t:r!==void 0?r:e.dflt};t2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};t2.getValue=function(e,t){var r;return vye(e)?t{"use strict";var f4=xa(),Wmt=va(),h4=ao(),pye=Mr(),gye=ba(),mye=_v().resizeText,_V=Lm(),Zmt=_V.textfont,Xmt=_V.insidetextfont,Ymt=_V.outsidetextfont,Jd=qI();function Kmt(e){var t=f4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");mye(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)&&f4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=f4.select(this),o=i[0].trace;yye(a,o,e)}),gye.getComponentMethod("errorbars","style")(t)}function yye(e,t,r){h4.pointStyle(e.selectAll("path"),t,r),_ye(e,t,r)}function _ye(e,t,r){e.selectAll("text").each(function(n){var i=f4.select(this),a=pye.ensureUniformFontSize(r,xye(i,n,t,r));h4.font(i,a)})}function Jmt(e,t,r){var n=t[0].trace;n.selectedpoints?$mt(r,n,e):(yye(r,n,e),gye.getComponentMethod("errorbars","style")(r))}function $mt(e,t,r){h4.selectedPointStyle(e.selectAll("path"),t),Qmt(e.selectAll("text"),t,r)}function Qmt(e,t,r){e.each(function(n){var i=f4.select(this),a;if(n.selected){a=pye.ensureUniformFontSize(r,xye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),h4.font(i,a)}else h4.selectedTextStyle(i,t)})}function xye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=Aye(t,r);a=wye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Tye(r,t.i,i));return a}function bye(e,t,r){return xV(Zmt,e.textfont,t,r)}function wye(e,t,r,n){var i=bye(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:Wmt.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}),xV(Xmt,e.insidetextfont,t,i)}function Tye(e,t,r){var n=bye(e,t,r);return xV(Ymt,e.outsidetextfont,t,n)}function xV(e,t,r,n){t=t||{};var i=Jd.getValue(t.family,r),a=Jd.getValue(t.size,r),o=Jd.getValue(t.color,r),s=Jd.getValue(t.weight,r),l=Jd.getValue(t.style,r),u=Jd.getValue(t.variant,r),c=Jd.getValue(t.textcase,r),f=Jd.getValue(t.lineposition,r),h=Jd.getValue(t.shadow,r);return{family:Jd.coerceString(e.family,i,n.family),size:Jd.coerceNumber(e.size,a,n.size),color:Jd.coerceColor(e.color,o,n.color),weight:Jd.coerceString(e.weight,s,n.weight),style:Jd.coerceString(e.style,l,n.style),variant:Jd.coerceString(e.variant,u,n.variant),textcase:Jd.coerceString(e.variant,c,n.textcase),lineposition:Jd.coerceString(e.variant,f,n.lineposition),shadow:Jd.coerceString(e.variant,h,n.shadow)}}function Aye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Sye.exports={style:Kmt,styleTextPoints:_ye,styleOnSelect:Jmt,getInsideTextFont:wye,getOutsideTextFont:Tye,getBarColor:Aye,resizeText:mye}});var i2=ye((wor,Dye)=>{"use strict";var OI=xa(),BI=uo(),Pd=Mr(),eyt=Ll(),tyt=va(),T_=ao(),ryt=ba(),NI=Qa().tickText,Mye=_v(),iyt=Mye.recordMinTextSize,nyt=Mye.clearMinTextSize,bV=N0(),wT=qI(),ayt=Qb(),Eye=Lm(),oyt=Eye.text,syt=Eye.textposition,lyt=rp().appendArrayPointValue,Uv=ayt.TEXTPAD;function uyt(e){return e.id}function cyt(e){if(e.ids)return uyt}function wV(e){return(e>0)-(e<0)}function Pm(e,t){return e0}function hyt(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},nyt("bar",l));var c=Pd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=OI.select(this),d=f[0].trace,v=f[0].t,x=d.type==="waterfall",b=d.type==="funnel",g=d.type==="histogram",E=d.type==="bar",k=E||b,A=0;x&&d.connector.visible&&d.connector.mode==="between"&&(A=d.connector.line.width/2);var L=d.orientation==="h",_=Cye(i),C=Pd.ensureSingle(h,"g","points"),M=cyt(d),p=C.selectAll("g.point").data(Pd.identity,M);p.enter().append("g").classed("point",!0),p.exit().remove(),p.each(function(T,F){var q=OI.select(this),V=fyt(T,o,s,L),H=V[0][0],X=V[0][1],G=V[1][0],N=V[1][1],W=(L?X-H:N-G)===0;W&&k&&wT.getLineWidth(d,T)&&(W=!1),W||(W=!BI(H)||!BI(X)||!BI(G)||!BI(N)),T.isBlank=W,W&&(L?X=H:N=G),A&&!W&&(L?(H-=Pm(H,X)*A,X+=Pm(H,X)*A):(G-=Pm(G,N)*A,N+=Pm(G,N)*A));var re,ae;if(d.type==="waterfall"){if(!W){var _e=d[T.dir].marker;re=_e.line.width,ae=_e.color}}else re=wT.getLineWidth(d,T),ae=T.mc||d.marker.color;function Me(Ke){var xt=OI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?OI.round(Math.round(Ke)-xt,2):Ke}function ke(Ke,xt,bt){return bt&&Ke===xt?Ke:Math.abs(Ke-xt)>=2?Me(Ke):Ke>xt?Math.ceil(Ke):Math.floor(Ke)}var ge=tyt.opacity(ae),ie=ge<1||re>.01?Me:ke;e._context.staticPlot||(H=ie(H,X,L),X=ie(X,H,L),G=ie(G,N,!L),N=ie(N,G,!L));var Te=L?o.c2p:s.c2p,Ee;T.s0>0?Ee=T._sMax:T.s0<0?Ee=T._sMin:Ee=T.s1>0?T._sMax:T._sMin;function Ae(Ke,xt){if(!Ke)return 0;var bt=Math.abs(L?N-G:X-H),Lt=Math.abs(L?X-H:N-G),St=ie(Math.abs(Te(Ee,!0)-Te(0,!0))),Et=T.hasB?Math.min(bt/2,Lt/2):Math.min(bt/2,St),dt;if(xt==="%"){var Ht=Math.min(50,Ke);dt=bt*(Ht/100)}else dt=Ke;return ie(Math.max(Math.min(dt,Et),0))}var ze=E||g?Ae(v.cornerradiusvalue,v.cornerradiusform):0,Ce,me,De="M"+H+","+G+"V"+N+"H"+X+"V"+G+"Z",ce=0;if(ze&&T.s){var Ge=wV(T.s0)===0||wV(T.s)===wV(T.s0)?T.s1:T.s0;if(ce=ie(T.hasB?0:Math.abs(Te(Ee,!0)-Te(Ge,!0))),ce0?Math.sqrt(ce*(2*ze-ce)):0,Dt=nt>0?Math.max:Math.min;Ce="M"+H+","+G+"V"+(N-rt*ct)+"H"+Dt(X-(ze-ce)*nt,H)+"A "+ze+","+ze+" 0 0 "+qt+" "+X+","+(N-ze*ct-ot)+"V"+(G+ze*ct+ot)+"A "+ze+","+ze+" 0 0 "+qt+" "+Dt(X-(ze-ce)*nt,H)+","+(G+rt*ct)+"Z"}else if(T.hasB)Ce="M"+(H+ze*nt)+","+G+"A "+ze+","+ze+" 0 0 "+qt+" "+H+","+(G+ze*ct)+"V"+(N-ze*ct)+"A "+ze+","+ze+" 0 0 "+qt+" "+(H+ze*nt)+","+N+"H"+(X-ze*nt)+"A "+ze+","+ze+" 0 0 "+qt+" "+X+","+(N-ze*ct)+"V"+(G+ze*ct)+"A "+ze+","+ze+" 0 0 "+qt+" "+(X-ze*nt)+","+G+"Z";else{me=Math.abs(N-G)+ce;var kt=me0?Math.sqrt(ce*(2*ze-ce)):0,Yt=ct>0?Math.max:Math.min;Ce="M"+(H+kt*nt)+","+G+"V"+Yt(N-(ze-ce)*ct,G)+"A "+ze+","+ze+" 0 0 "+qt+" "+(H+ze*nt-Ct)+","+N+"H"+(X-ze*nt+Ct)+"A "+ze+","+ze+" 0 0 "+qt+" "+(X-kt*nt)+","+Yt(N-(ze-ce)*ct,G)+"V"+G+"Z"}}else Ce=De}else Ce=De;var xr=kye(Pd.ensureSingle(q,"path"),l,i,a);if(xr.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((X-H)*(N-G))||W&&e._context.staticPlot?"M0,0Z":Ce).call(T_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&_){var er=T_.makePointStyleFns(d);T_.singlePointStyle(T,xr,d,er,e)}dyt(e,t,q,f,F,H,X,G,N,ze,ce,i,a),t.layerClipId&&T_.hideOutsideRangePoint(T,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;T_.setClipUrl(h,P?null:t.layerClipId,e)});ryt.getComponentMethod("errorbars","plot")(e,c,t,i)}function dyt(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,x=e._fullLayout,b;function g(me,De,ce){var Ge=Pd.ensureSingle(me,"text").text(De).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(T_.font,ce).call(eyt.convertToTspans,e);return Ge}var E=n[0].trace,k=E.orientation==="h",A=gyt(x,n,i,d,v);b=myt(E,i);var L=f.mode==="stack"||f.mode==="relative",_=n[i],C=!L||_._outmost,M=_.hasB,p=u&&u-c>Uv;if(!A||b==="none"||(_.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=x.font,T=bV.getBarColor(n[i],E),F=bV.getInsideTextFont(E,i,P,T),q=bV.getOutsideTextFont(E,i,P),V=E.insidetextanchor||"end",H=r.datum();k?d.type==="log"&&H.s0<=0&&(d.range[0]0&&Me>0,ie;p?M?ie=r2(N-2*u,W,_e,Me,k)||r2(N,W-2*u,_e,Me,k):k?ie=r2(N-(u-c),W,_e,Me,k)||r2(N,W-2*(u-c),_e,Me,k):ie=r2(N,W-(u-c),_e,Me,k)||r2(N-2*(u-c),W,_e,Me,k):ie=r2(N,W,_e,Me,k),ge&&ie?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){ke=Pd.ensureUniformFontSize(e,b==="outside"?q:F),re=g(r,A,ke);var Te=re.attr("transform");if(re.attr("transform",""),ae=T_.bBox(re.node()),_e=ae.width,Me=ae.height,re.attr("transform",Te),_e<=0||Me<=0){re.remove();return}}var Ee=E.textangle,Ae,ze;b==="outside"?(ze=E.constraintext==="both"||E.constraintext==="outside",Ae=pyt(a,o,s,l,ae,{isHorizontal:k,constrained:ze,angle:Ee})):(ze=E.constraintext==="both"||E.constraintext==="inside",Ae=Iye(a,o,s,l,ae,{isHorizontal:k,constrained:ze,angle:Ee,anchor:V,hasB:M,r:u,overhead:c})),Ae.fontSize=ke.size,iyt(E.type==="histogram"?"bar":E.type,Ae,x),_.transform=Ae;var Ce=kye(re,x,f,h);Pd.setTransormAndDisplay(Ce,Ae)}function r2(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 Lye(e){return e==="auto"?0:e}function Pye(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 Iye(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,x=a.hasB,b=a.r,g=a.overhead,E=i.width,k=i.height,A=Math.abs(t-e),L=Math.abs(n-r),_=A>2*Uv&&L>2*Uv?Uv:0;A-=2*_,L-=2*_;var C=Lye(l);l==="auto"&&!(E<=A&&k<=L)&&(E>A||k>L)&&(!(E>L||k>A)||EUv){var T=vyt(e,t,r,n,M,b,g,o,x);p=T.scale,P=T.pad}else p=1,s&&(p=Math.min(1,A/M.x,L/M.y)),P=0;var F=i.left*v+i.right*d,q=(i.top+i.bottom)/2,V=(e+Uv)*v+(t-Uv)*d,H=(r+n)/2,X=0,G=0;if(f||c){var N=(o?M.x:M.y)/2;b&&(c||x)&&(_+=P);var W=o?Pm(e,t):Pm(r,n);o?f?(V=e+W*_,X=-W*N):(V=t-W*_,X=W*N):f?(H=r+W*_,G=-W*N):(H=n-W*_,G=W*N)}return{textX:F,textY:q,targetX:V,targetY:H,anchorX:X,anchorY:G,scale:p,rotate:C}}function vyt(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Uv),c=Math.max(0,Math.abs(n-r)-2*Uv),f=a-Uv,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,x,b,g,E,k;return i.y/i.x>=c/(u-d)?E=c/i.y:i.y/i.x<=(c-v)/u?E=u/i.x:!l&&s?(x=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),g=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,E=(-b+Math.sqrt(b*b-4*x*g))/(2*x)):l?(x=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),g=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,E=(-b+Math.sqrt(b*b-4*x*g))/(2*x)):(x=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),g=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,E=(-b+Math.sqrt(b*b-4*x*g))/(2*x)),E=Math.min(1,E),s?k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*E)/2)*(f-(c-i.y*E)/2)))-o):k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*E)/2)*(f-(u-i.x*E)/2)))-o),{scale:E,pad:k}}function pyt(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*Uv?Uv:0:d=f>2*Uv?Uv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var x=Lye(l),b=Pye(i,x),g=(o?b.x:b.y)/2,E=(i.left+i.right)/2,k=(i.top+i.bottom)/2,A=(e+t)/2,L=(r+n)/2,_=0,C=0,M=o?Pm(t,e):Pm(r,n);return o?(A=t-M*d,_=M*g):(L=n+M*d,C=-M*g),{textX:E,textY:k,targetX:A,targetY:L,anchorX:_,anchorY:C,scale:v,rotate:x}}function gyt(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=yyt(e,t,r,n,i):a.textinfo?s=_yt(t,r,n,i):s=wT.getValue(a.text,r),wT.coerceString(oyt,s)}function myt(e,t){var r=wT.getValue(e.textposition,t);return wT.coerceEnumerated(syt,r)}function yyt(e,t,r,n,i){var a=t[0].trace,o=Pd.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 NI(h,h.c2l(_),!0).text}function b(_){return NI(v,v.c2l(_),!0).text}var g=t[r],E={};E.label=g.p,E.labelLabel=E[f+"Label"]=x(g.p);var k=Pd.castOption(a,g.i,"text");(k===0||k)&&(E.text=k),E.value=g.s,E.valueLabel=E[d+"Label"]=b(g.s);var A={};lyt(A,a,g.i),(s||A.x===void 0)&&(A.x=c?E.value:E.label),(s||A.y===void 0)&&(A.y=c?E.label:E.value),(s||A.xLabel===void 0)&&(A.xLabel=c?E.valueLabel:E.labelLabel),(s||A.yLabel===void 0)&&(A.yLabel=c?E.labelLabel:E.valueLabel),l&&(E.delta=+g.rawS||g.s,E.deltaLabel=b(E.delta),E.final=g.v,E.finalLabel=b(E.final),E.initial=E.final-E.delta,E.initialLabel=b(E.initial)),u&&(E.value=g.s,E.valueLabel=b(E.value),E.percentInitial=g.begR,E.percentInitialLabel=Pd.formatPercent(g.begR),E.percentPrevious=g.difR,E.percentPreviousLabel=Pd.formatPercent(g.difR),E.percentTotal=g.sumR,E.percenTotalLabel=Pd.formatPercent(g.sumR));var L=Pd.castOption(a,g.i,"customdata");return L&&(E.customdata=L),Pd.texttemplateString(o,E,e._d3locale,A,E,a._meta||{})}function _yt(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 _=a?n:r;return NI(_,L,!0).text}function u(L){var _=a?r:n;return NI(_,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,x=function(L){return h.indexOf(L)!==-1};if(x("label")&&d.push(l(e[t].p)),x("text")&&(v=Pd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,g=f.v,E=g-b;x("initial")&&d.push(u(E)),x("delta")&&d.push(u(b)),x("final")&&d.push(u(g))}if(s){x("value")&&d.push(u(f.s));var k=0;x("percent initial")&&k++,x("percent previous")&&k++,x("percent total")&&k++;var A=k>1;x("percent initial")&&(v=Pd.formatPercent(f.begR),A&&(v+=" of initial"),d.push(v)),x("percent previous")&&(v=Pd.formatPercent(f.difR),A&&(v+=" of previous"),d.push(v)),x("percent total")&&(v=Pd.formatPercent(f.sumR),A&&(v+=" of total"),d.push(v))}return d.join("
")}Dye.exports={plot:hyt,toMoveInsideBar:Iye}});var TT=ye((Tor,qye)=>{"use strict";var d4=Nc(),xyt=ba(),Rye=va(),byt=Mr().fillText,wyt=qI().getLineWidth,TV=Qa().hoverLabelText,Tyt=es().BADNUM;function Ayt(e,t,r,n,i){var a=zye(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=Fye(s,l),xyt.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function zye(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,x,b,g,E;o.orientation==="h"?(h=r,d=t,v="y",x="x",b=H,g=F):(h=t,d=r,v="x",x="y",g=H,b=F);var k=o[v+"period"],A=l||k;function L(ie){return C(ie,-1)}function _(ie){return C(ie,1)}function C(ie,Te){var Ee=ie.w;return ie[v]+Te*Ee/2}function M(ie){return ie[v+"End"]-ie[v+"Start"]}var p=l?L:k?function(ie){return ie.p-M(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?_:k?function(ie){return ie.p+M(ie)/2}:function(ie){return Math.max(_(ie),ie.p+s.bardelta/2)};function T(ie,Te,Ee){return i.finiteRange&&(Ee=0),d4.inbox(ie-h,Te-h,Ee+Math.min(1,Math.abs(Te-ie)/E)-1)}function F(ie){return T(p(ie),P(ie),c)}function q(ie){return T(L(ie),_(ie),f)}function V(ie){var Te=ie[x];if(u){var Ee=Math.abs(ie.rawS)||0;d>0?Te+=Ee:d<0&&(Te-=Ee)}return Te}function H(ie){var Te=d,Ee=ie.b,Ae=V(ie);return d4.inbox(Ee-Te,Ae-Te,c+(Ae-Te)/(Ae-Ee)-1)}function X(ie){var Te=d,Ee=ie.b,Ae=V(ie);return d4.inbox(Ee-Te,Ae-Te,f+(Ae-Te)/(Ae-Ee)-1)}var G=e[v+"a"],N=e[x+"a"];E=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function W(ie){return(b(ie)+g(ie))/2}var re=d4.getDistanceFunction(n,b,g,W);if(d4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==Tyt){A||(p=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(_(ie),ie.p+s.bargroupwidth/2)});var ae=e.index,_e=a[ae],Me=o.base?_e.b+_e.s:_e.s;e[x+"0"]=e[x+"1"]=N.c2p(_e[x],!0),e[x+"LabelVal"]=Me;var ke=s.extents[s.extents.round(_e.p)];e[v+"0"]=G.c2p(l?p(_e):ke[0],!0),e[v+"1"]=G.c2p(l?P(_e):ke[1],!0);var ge=_e.orig_p!==void 0;return e[v+"LabelVal"]=ge?_e.orig_p:_e.p,e.labelLabel=TV(G,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=TV(N,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=TV(N,_e.b,o[x+"hoverformat"]),e.spikeDistance=(X(_e)+q(_e))/2,e[v+"Spike"]=G.c2p(_e.p,!0),byt(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function Fye(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=wyt(e,t);if(Rye.opacity(r))return r;if(Rye.opacity(n)&&i)return n}qye.exports={hoverPoints:Ayt,hoverOnBars:zye,getTraceColor:Fye}});var Bye=ye((Aor,Oye)=>{"use strict";Oye.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 AT=ye((Sor,Nye)=>{"use strict";Nye.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";Uye.exports={attributes:Lm(),layoutAttributes:RI(),supplyDefaults:r0().supplyDefaults,crossTraceDefaults:r0().crossTraceDefaults,supplyLayoutDefaults:yV(),calc:fye(),crossTraceCalc:Gb().crossTraceCalc,colorbar:Kd(),arraysToCalcdata:c4(),plot:i2().plot,style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:TT().hoverPoints,eventData:Bye(),selectPoints:AT(),moduleType:"trace",name:"bar",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var Gye=ye((Eor,Hye)=>{"use strict";Hye.exports=Vye()});var v4=ye((kor,Xye)=>{"use strict";var Myt=Eg(),U0=Uc(),jye=Lm(),Eyt=dh(),Wye=Oc().axisHoverFormat,kyt=Wo().hovertemplateAttrs,zy=no().extendFlat,ST=U0.marker,Zye=ST.line;Xye.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:Wye("x"),yhoverformat:Wye("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({},ST.symbol,{arrayOk:!1,editType:"plot"}),opacity:zy({},ST.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:zy({},ST.angle,{arrayOk:!1,editType:"calc"}),size:zy({},ST.size,{arrayOk:!1,editType:"calc"}),color:zy({},ST.color,{arrayOk:!1,editType:"style"}),line:{color:zy({},Zye.color,{arrayOk:!1,dflt:Eyt.defaultLine,editType:"style"}),width:zy({},Zye.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:Myt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:jye.offsetgroup,alignmentgroup:jye.alignmentgroup,selected:{marker:U0.selected.marker,editType:"style"},unselected:{marker:U0.unselected.marker,editType:"style"},text:zy({},U0.text,{}),hovertext:zy({},U0.hovertext,{}),hovertemplate:kyt({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:U0.zorder}});var p4=ye((Cor,Yye)=>{"use strict";Yye.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 m4=ye((Lor,Qye)=>{"use strict";var V0=Mr(),Cyt=ba(),Lyt=va(),Pyt=Pg(),Iyt=Hb(),Kye=L3(),g4=v4();function Dyt(e,t,r,n){function i(v,x){return V0.coerce(e,t,g4,v,x)}if(Jye(e,t,i,n),t.visible!==!1){Pyt(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",Lyt.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,g4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),$ye(e,t,i,{prefix:"box"}),i("zorder")}}function Jye(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],g4[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),x=d&&V0.minRowLength(s),b=n.calendar,g={autotypenumbers:n.autotypenumbers},E,k;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var A=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!A?E="h":E="v",k=l;break;case"10":E="v",k=Math.min(l,x);break;case"20":E="h",k=Math.min(l,s.length);break;case"01":E="h",k=Math.min(l,v);break;case"02":E="v",k=Math.min(l,o.length);break;case"12":E="v",k=Math.min(l,x,o.length);break;case"21":E="h",k=Math.min(l,s.length,v);break;case"11":k=0;break;case"22":var _=!1,C;for(C=0;C0?(E="v",d>0?k=Math.min(x,v):k=Math.min(v)):d>0?(E="h",k=Math.min(x)):k=0;if(!k){t.visible=!1;return}t._length=k;var M=r("orientation",E);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 p=Cyt.getComponentMethod("calendars","handleTraceDefaults");p(e,t,["x","y"],n)}function $ye(e,t,r,n){var i=n.prefix,a=V0.coerce2(e,t,g4,"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"),V0.coerceSelectionMarkerOpacity(t,r)}function Ryt(e,t){var r,n;function i(l){return V0.coerce(n._input,n,g4,l)}for(var a=0;a{"use strict";var zyt=ba(),Fyt=Mr(),qyt=p4();function e1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var SV=uo(),VI=Qa(),Byt=Dg(),$f=Mr(),i0=es().BADNUM,Fy=$f._;c1e.exports=function(t,r){var n=t._fullLayout,i=VI.getFromId(t,r.xaxis||"x"),a=VI.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 x=Nyt(r,d,h,n[s]),b=x[0],g=x[1],E=$f.distinctVals(b,h),k=E.vals,A=E.minDiff/2,L,_,C,M,p,P,T=(r.boxpoints||r.points)==="all"?$f.identity:function(qt){return qt.vL.uf};if(r._hasPreCompStats){var F=r[f],q=function(qt){return c.d2c((r[qt]||[])[l])},V=1/0,H=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var G=q("lowerfence");L.lf=G!==i0&&G<=L.q1?G:a1e(L,C,M);var N=q("upperfence");L.uf=N!==i0&&N>=L.q3?N:o1e(L,C,M);var W=q("mean");L.mean=W!==i0?W:M?$f.mean(C,M):(L.q1+L.q3)/2;var re=q("sd");L.sd=W!==i0&&re>=0?re:M?$f.stdev(C,M,L.mean):L.q3-L.q1,L.lo=s1e(L),L.uo=l1e(L);var ae=q("notchspan");ae=ae!==i0&&ae>0?ae:u1e(L,M),L.ln=L.med-ae,L.un=L.med+ae;var _e=L.lf,Me=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),Me=Math.max(Me,C[M-1])),r.notched&&(_e=Math.min(_e,L.ln),Me=Math.max(Me,L.un)),L.min=_e,L.max=Me}else{$f.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` +`));var ke;L.med!==i0?ke=L.med:L.q1!==i0?L.q3!==i0?ke=(L.q1+L.q3)/2:ke=L.q1:L.q3!==i0?ke=L.q3:ke=0,L.med=ke,L.q1=L.q3=ke,L.lf=L.uf=ke,L.mean=L.sd=ke,L.ln=L.un=ke,L.min=L.max=ke}V=Math.min(V,L.min),H=Math.max(H,L.max),L.pts2=_.filter(T),o.push(L)}}r._extremes[c._id]=VI.findExtremes(c,[V,H],{padded:!0})}else{var ge=c.makeCalcdata(r,f),ie=Uyt(k,A),Te=k.length,Ee=Vyt(Te);for(l=0;l=0&&Ae0){if(L={},L.pos=L[d]=k[l],_=L.pts=Ee[l].sort(i1e),C=L[f]=_.map(n1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=$f.mean(C,M),L.sd=$f.stdev(C,M,L.mean)*r.sdmultiple,L.med=$f.interp(C,.5),M%2&&(De||ce)){var Ge,nt;De?(Ge=C.slice(0,M/2),nt=C.slice(M/2+1)):ce&&(Ge=C.slice(0,M/2+1),nt=C.slice(M/2)),L.q1=$f.interp(Ge,.5),L.q3=$f.interp(nt,.5)}else L.q1=$f.interp(C,.25),L.q3=$f.interp(C,.75);L.lf=a1e(L,C,M),L.uf=o1e(L,C,M),L.lo=s1e(L),L.uo=l1e(L);var ct=u1e(L,M);L.ln=L.med-ct,L.un=L.med+ct,ze=Math.min(ze,L.ln),Ce=Math.max(Ce,L.un),L.pts2=_.filter(T),o.push(L)}r.notched&&$f.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=VI.findExtremes(c,r.notched?ge.concat([ze,Ce]):ge,{padded:!0})}return Hyt(o,r),o.length>0?(o[0].t={num:n[s],dPos:A,posLetter:d,valLetter:f,labels:{med:Fy(t,"median:"),min:Fy(t,"min:"),q1:Fy(t,"q1:"),q3:Fy(t,"q3:"),max:Fy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Fy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Fy(t,"mean:"),lf:Fy(t,"lower fence:"),uf:Fy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function Nyt(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=Byt(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||SV(e.name)&&["linear","log"].indexOf(r.type)!==-1||$f.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 f1e=Qa(),Gyt=Mr(),jyt=Bb().getAxisGroup,h1e=["v","h"];function Wyt(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,E=1-a[e+"gap"],k=1-a[e+"groupgap"];for(l=0;l0;if(C==="positive"?(N=M*(_?1:.5),ae=re,W=ae=P):C==="negative"?(N=ae=P,W=M*(_?1:.5),_e=re):(N=W=M,ae=_e=re),Ee){var Ae=A.pointpos,ze=A.jitter,Ce=A.marker.size/2,me=0;Ae+ze>=0&&(me=re*(Ae+ze),me>N?(Te=!0,ge=Ce,Me=me):me>ae&&(ge=Ce,Me=N)),me<=N&&(Me=N);var De=0;Ae-ze<=0&&(De=-re*(Ae-ze),De>W?(Te=!0,ie=Ce,ke=De):De>_e&&(ie=Ce,ke=W)),De<=W&&(ke=W)}else Me=N,ke=W;var ce=new Array(c.length);for(u=0;u{"use strict";var MT=xa(),n2=Mr(),Zyt=ao(),p1e=5,Xyt=.01;function Yyt(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;n2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=MT.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),g1e(l,{pos:h,val:d},f,c,i),m1e(l,{x:a,y:o},f,c),y1e(l,{pos:h,val:d},f,c)})}function g1e(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,x=v?1-2*r.notchwidth:1,b,g;Array.isArray(n.bdPos)?(b=n.bdPos[0],g=n.bdPos[1]):(b=n.bdPos,g=n.bdPos);var E=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?n2.identity:[]);E.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),E.exit().remove(),E.each(function(k){if(k.empty)return MT.select(this).attr("d","M0,0Z");var A=s.c2l(k.pos+u,!0),L=s.l2p(A-b)+f,_=s.l2p(A+g)+f,C=l?(L+_)/2:s.l2p(A)+f,M=r.whiskerwidth,p=l?L*M+(1-M)*C:s.l2p(A-c)+f,P=l?_*M+(1-M)*C:s.l2p(A+c)+f,T=s.l2p(A-b*x)+f,F=s.l2p(A+g*x)+f,q=r.sizemode==="sd",V=o.c2p(q?k.mean-k.sd:k.q1,!0),H=q?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),X=n2.constrain(q?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(V,H)+1,Math.max(V,H)-1),G=k.lf===void 0||r.boxpoints===!1||q,N=o.c2p(G?k.min:k.lf,!0),W=o.c2p(G?k.max:k.uf,!0),re=o.c2p(k.ln,!0),ae=o.c2p(k.un,!0);a?MT.select(this).attr("d","M"+X+","+T+"V"+F+"M"+V+","+L+"V"+_+(v?"H"+re+"L"+X+","+F+"L"+ae+","+_:"")+"H"+H+"V"+L+(v?"H"+ae+"L"+X+","+T+"L"+re+","+L:"")+"Z"+(d?"M"+V+","+C+"H"+N+"M"+H+","+C+"H"+W+(h===0?"":"M"+N+","+p+"V"+P+"M"+W+","+p+"V"+P):"")):MT.select(this).attr("d","M"+T+","+X+"H"+F+"M"+L+","+V+"H"+_+(v?"V"+re+"L"+F+","+X+"L"+_+","+ae:"")+"V"+H+"H"+L+(v?"V"+ae+"L"+T+","+X+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+V+"V"+N+"M"+C+","+H+"V"+W+(h===0?"":"M"+p+","+N+"H"+P+"M"+p+","+W+"H"+P):""))})}function m1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;n2.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,x=Math.max((h.max-h.min)/10,h.q3-h.q1),b=x*1e-9,g=x*Xyt,E=[],k=0,A;if(r.jitter){if(x===0)for(k=1,E=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(Zyt.translatePoints,i,a)}function y1e(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?n2.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),x=a.l2p(v-c)+l,b=a.l2p(v+f)+l,g=o?(x+b)/2:a.l2p(v)+l,E=i.c2p(d.mean,!0),k=i.c2p(d.mean-d.sd,!0),A=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?MT.select(this).attr("d","M"+E+","+x+"V"+b+(u==="sd"?"m0,0L"+k+","+g+"L"+E+","+x+"L"+A+","+g+"Z":"")):MT.select(this).attr("d","M"+x+","+E+"H"+b+(u==="sd"?"m0,0L"+g+","+k+"L"+x+","+E+"L"+g+","+A+"Z":""))})}_1e.exports={plot:Yyt,plotBoxAndWhiskers:g1e,plotPoints:m1e,plotBoxMean:y1e}});var jI=ye((zor,x1e)=>{"use strict";var EV=xa(),kV=va(),CV=ao();function Kyt(e,t,r){var n=r||EV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=EV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(kV.stroke,d).call(kV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=EV.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(kV.stroke,o.line.color);var c=a.selectAll("path.point");CV.pointStyle(c,o,e)}})}function Jyt(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?CV.selectedPointStyle(i,n):CV.pointStyle(i,n,e)}x1e.exports={style:Kyt,styleOnSelect:Jyt}});var PV=ye((For,A1e)=>{"use strict";var $yt=Qa(),LV=Mr(),A_=Nc(),b1e=va(),Qyt=LV.fillText;function e1t(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(w1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=T1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function w1e(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,x,b,g,E,k,A,L=l.bdPos,_,C,M=l.wHover,p=function(Ce){return h.c2l(Ce.pos)+l.bPos-h.c2l(x)};u&&s.side!=="both"?(s.side==="positive"&&(E=function(Ce){var me=p(Ce);return A_.inbox(me,me+M,k)},_=L,C=0),s.side==="negative"&&(E=function(Ce){var me=p(Ce);return A_.inbox(me-M,me,k)},_=0,C=L)):(E=function(Ce){var me=p(Ce);return A_.inbox(me-M,me+M,k)},_=C=L);var P;u?P=function(Ce){return A_.inbox(Ce.span[0]-v,Ce.span[1]-v,k)}:P=function(Ce){return A_.inbox(Ce.min-v,Ce.max-v,k)},s.orientation==="h"?(v=t,x=r,b=P,g=E,c="y",h=o,f="x",d=a):(v=r,x=t,b=E,g=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])));k=e.maxHoverDistance-T,A=e.maxSpikeDistance-T;function F(Ce){return(b(Ce)+g(Ce))/2}var q=A_.getDistanceFunction(n,b,g,F);if(A_.getClosest(i,q,e),e.index===!1)return[];var V=i[e.index],H=s.line.color,X=(s.marker||{}).color;b1e.opacity(H)&&s.line.width?e.color=H:b1e.opacity(X)&&s.boxpoints?e.color=X:e.color=s.fillcolor,e[c+"0"]=h.c2p(V.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(V.pos+l.bPos+_,!0),e[c+"LabelVal"]=V.orig_p!==void 0?V.orig_p:V.pos;var G=c+"Spike";e.spikeDistance=F(V)*A/k,e[G]=h.c2p(V.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,W=s.boxpoints||s.points,re=W&&N?["max","uf","q3","med","mean","q1","lf","min"]:W&&!N?["max","uf","q3","med","q1","lf","min"]:!W&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ae=d.range[1]{"use strict";S1e.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 IV=ye((Oor,E1e)=>{"use strict";E1e.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";k1e.exports={attributes:v4(),layoutAttributes:p4(),supplyDefaults:m4().supplyDefaults,crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:UI().supplyLayoutDefaults,calc:MV(),crossTraceCalc:HI().crossTraceCalc,plot:GI().plot,style:jI().style,styleOnSelect:jI().styleOnSelect,hoverPoints:PV().hoverPoints,eventData:M1e(),selectPoints:IV(),moduleType:"trace",name:"box",basePlotModule:Jf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var P1e=ye((Nor,L1e)=>{"use strict";L1e.exports=C1e()});var ET=ye((Uor,I1e)=>{"use strict";var n0=Uc(),t1t=vl(),r1t=Su(),DV=Oc().axisHoverFormat,i1t=Wo().hovertemplateAttrs,n1t=Wo().texttemplateAttrs,a1t=Kl(),Pp=no().extendFlat;I1e.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:DV("x"),yhoverformat:DV("y"),zhoverformat:DV("z",1),hovertemplate:i1t(),texttemplate:n1t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:r1t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},t1t.showlegend,{dflt:!1}),zorder:n0.zorder},a1t("",{cLetter:"z",autoColorDflt:!1}))});var ZI=ye((Vor,R1e)=>{"use strict";var o1t=uo(),WI=Mr(),s1t=ba();R1e.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(WI.isArray1D(s)){l=n(a),u=n(o);var c=WI.minRowLength(l),f=WI.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=D1e(a,n),u=D1e(o,n),!l1t(s))return 0;n("transpose"),r._length=null}var h=s1t.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function D1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function l1t(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var z1e=Mr();F1e.exports=function(t,r){t("texttemplate");var n=z1e.extendFlat({},r.font,{color:"auto",size:"auto"});z1e.coerceFont(t,"textfont",n)}});var RV=ye((Gor,q1e)=>{"use strict";q1e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var N1e=ye((jor,B1e)=>{"use strict";var O1e=Mr(),u1t=ZI(),c1t=y4(),f1t=Pg(),h1t=RV(),d1t=Uh(),v1t=ET();B1e.exports=function(t,r,n,i){function a(s,l){return O1e.coerce(t,r,v1t,s,l)}var o=u1t(t,r,a,i);if(!o){r.visible=!1;return}f1t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),c1t(a,i),h1t(t,r,a,i),a("hoverongaps"),a("connectgaps",O1e.isArray1D(r.z)&&r.zsmooth!==!1),d1t(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var zV=ye((Wor,U1e)=>{"use strict";var kT=uo();U1e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return kT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return kT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(kT(i))if(i=Number(i),kT(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(kT(i))if(i=Number(i),kT(r[e])){if(r[e]{"use strict";V1e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";H1e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var CT=es(),a2=CT.ONEAVGYEAR,G1e=CT.ONEAVGMONTH,YI=CT.ONEDAY,j1e=CT.ONEHOUR,W1e=CT.ONEMIN,Z1e=CT.ONESEC,X1e=Qa().tickIncrement;J1e.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(XI(u+s,u+l,i,a),XI(c+s,c+l,i,a)),h=Math.min(XI(u+o,u+s,i,a),XI(c+o,c+s,i,a)),d,v;if(f>h&&hYI){var x=d===a2?1:6,b=d===a2?"M12":"M1";return function(g,E){var k=i.c2d(g,a2,a),A=k.indexOf("-",x);A>0&&(k=k.substr(0,A));var L=i.d2c(k,0,a);if(LZ1e?e>YI?e>a2*1.1?a2:e>G1e*1.1?G1e:YI:e>j1e?j1e:e>W1e?W1e:Z1e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function p1t(e,t,r,n,i,a){if(n&&e>YI){var o=K1e(t,i,a),s=K1e(r,i,a),l=e===a2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function K1e(e,t,r){var n=t.c2d(e,a2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var UV=ye((Kor,e_e)=>{"use strict";var BV=uo(),Vv=Mr(),$1e=ba(),H0=Qa(),g1t=c4(),Q1e=zV(),m1t=FV(),y1t=qV(),_1t=OV();function x1t(e,t){var r=[],n=[],i=t.orientation==="h",a=H0.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=NV(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",x=[],b=v?x:h,g=[],E=[],k=[],A=0,L=t.histnorm,_=t.histfunc,C=L.indexOf("density")!==-1,M,p,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var T=_==="max"||_==="min",F=T?null:0,q=Q1e.count,V=m1t[L],H=!1,X=function(me){return a.r2c(me,0,l)},G;for(Vv.isArrayOrTypedArray(t[s])&&_!=="count"&&(G=t[s],H=_==="avg",q=Q1e[_]),c=X(h.start),p=X(h.end)+(c-H0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&P=Ae;c--)if(n[c]){ze=c;break}for(c=Ae;c<=ze;c++)if(BV(r[c])&&BV(n[c])){var Ce={p:r[c],s:n[c],b:0};u.enabled||(Ce.pts=k[c],ae?Ce.ph0=Ce.ph1=k[c].length?d[k[c][0]]:r[c]:(t._computePh=!0,Ce.ph0=ie(x[c]),Ce.ph1=ie(x[c+1],!0))),Ee.push(Ce)}return Ee.length===1&&(Ee[0].width1=H0.tickIncrement(Ee[0].p,h.size,!1,l)-Ee[0].p),g1t(Ee,t),Vv.isArrayOrTypedArray(t.selectedpoints)&&Vv.tagSelected(Ee,t,ke),Ee}function NV(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,x,b,g=function(ge){return r.r2c(ge,0,d)},E=function(ge){return r.c2r(ge,0,d)},k=r.type==="date"?function(ge){return ge||ge===0?Vv.cleanDate(ge,null,d):null}:function(ge){return BV(ge)?Number(ge):null};function A(ge,ie,Te){ie[ge+"Found"]?(ie[ge]=k(ie[ge]),ie[ge]===null&&(ie[ge]=Te[ge])):(x[ge]=ie[ge]=Te[ge],Vv.nestedProperty(f[0],a+"."+ge).set(Te[ge]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],_=!0,C=!1,M=!1;for(c=0;cr.r2l(G)&&(W=H0.tickIncrement(W,l.size,!0,d)),q.start=r.l2r(W),X||Vv.nestedProperty(t,a+".start").set(q.start)}var re=l.end,ae=r.r2l(F.end),_e=ae!==void 0;if((l.endFound||_e)&&ae!==r.r2l(re)){var Me=_e?ae:Vv.aggNums(Math.max,null,v);q.end=r.l2r(Me),_e||Vv.nestedProperty(t,a+".start").set(q.end)}var ke="autobin"+n;return t._input[ke]===!1&&(t._input[a]=Vv.extendFlat({},t[a]||{}),delete t._input[ke],delete t[ke]),[q,v]}function b1t(e,t,r,n,i){var a=e._fullLayout,o=w1t(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_e.exports={calc:x1t,calcAllAutoBins:NV}});var l_e=ye((Jor,s_e)=>{"use strict";var t_e=Mr(),LT=Qa(),r_e=zV(),A1t=FV(),S1t=qV(),M1t=OV(),i_e=UV().calcAllAutoBins;s_e.exports=function(t,r){var n=LT.getFromId(t,r.xaxis),i=LT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(Et){return n.r2c(Et,0,a)},l=function(Et){return i.r2c(Et,0,o)},u=function(Et){return n.c2r(Et,0,a)},c=function(Et){return i.c2r(Et,0,o)},f,h,d,v,x=i_e(t,r,n,"x"),b=x[0],g=x[1],E=i_e(t,r,i,"y"),k=E[0],A=E[1],L=r._length;g.length>L&&g.splice(L,g.length-L),A.length>L&&A.splice(L,A.length-L);var _=[],C=[],M=[],p=typeof b.size=="string",P=typeof k.size=="string",T=[],F=[],q=p?T:b,V=P?F:k,H=0,X=[],G=[],N=r.histnorm,W=r.histfunc,re=N.indexOf("density")!==-1,ae=W==="max"||W==="min",_e=ae?null:0,Me=r_e.count,ke=A1t[N],ge=!1,ie=[],Te=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&W!=="count"&&(ge=W==="avg",Me=r_e[W]);var Ae=b.size,ze=s(b.start),Ce=s(b.end)+(ze-LT.tickIncrement(ze,Ae,!1,a))/1e6;for(f=ze;f=0&&d=0&&v{"use strict";var Im=Mr(),u_e=es().BADNUM,c_e=Dg();f_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=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,x,b=Im.distinctVals(l),g=b.vals,E=Im.distinctVals(u),k=E.vals,A=[],L,_,C=k.length,M=g.length;for(v=0;v{"use strict";var E1t=uo(),k1t=Mr(),JI=es().BADNUM;h_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(g){if(E1t(g))return+g}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var C1t=Mr(),d_e=.01,L1t=[[-1,0],[1,0],[0,-1],[0,1]];function P1t(e){return .5-.25*Math.min(1,e*.5)}p_e.exports=function(t,r){var n=1,i;for(v_e(t,r),i=0;id_e;i++)n=v_e(t,r,P1t(n));return n>d_e&&C1t.log("interp2d didn't converge quickly",n),t};function v_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,x,b;for(s=0;sx&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-x))))}return n}});var e8=ye((tsr,g_e)=>{"use strict";var I1t=Mr().maxRowLength;g_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=I1t(t),u,c,f,h,d,v,x,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&&(x[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in x)n[h]=x[h],r.push(x[h])}return r.sort(function(g,E){return E[2]-g[2]})}});var VV=ye((rsr,__e)=>{"use strict";var m_e=ba(),y_e=Mr().isArrayOrTypedArray;__e.exports=function(t,r,n,i,a,o){var s=[],l=m_e.traceIs(t,"contour"),u=m_e.traceIs(t,"histogram"),c,f,h,d=y_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 x_e=ba(),HV=Mr(),t8=Qa(),b_e=Dg(),D1t=l_e(),R1t=zv(),z1t=KI(),F1t=$I(),q1t=QI(),O1t=e8(),r8=VV(),GV=es().BADNUM;T_e.exports=function(t,r){var n=t8.getFromId(t,r.xaxis||"x"),i=t8.getFromId(t,r.yaxis||"y"),a=x_e.traceIs(r,"contour"),o=x_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,x,b,g,E;if(n._minDtick=0,i._minDtick=0,o)E=D1t(t,r),f=E.orig_x,l=E.x,u=E.x0,c=E.dx,x=E.orig_y,h=E.y,d=E.y0,v=E.dy,b=E.z;else{var k=r.z;HV.isArray1D(k)?(z1t(r,n,i,"x","y",["z"]),l=r._x,h=r._y,k=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],x=r.y?i.makeCalcdata(r,"y"):[],l=b_e(r,n,"x",f).vals,h=b_e(r,i,"y",x).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=F1t(k,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=B1t(l,h,b),o||(l=w_e(l),h=w_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=O1t(b),q1t(b,r._emptypoints));function A(q){s=r._input.zsmooth=r.zsmooth=!1,HV.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var V=(q[q.length-1]-q[0])/(q.length-1),H=Math.abs(V/100);for(g=0;gH)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&A("log axis found"):L(l)?L(h)?r._islinear=!0:s==="fast"&&A("y scale is not linear"):s==="fast"&&A("x scale is not linear");var _=HV.maxRowLength(b),C=r.xtype==="scaled"?"":l,M=r8(r,C,u,c,_,n),p=r.ytype==="scaled"?"":h,P=r8(r,p,d,v,b.length,i);r._extremes[n._id]=t8.findExtremes(n,M),r._extremes[i._id]=t8.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&&x&&(T.orig_y=x),C&&C.length===M.length-1&&(T.xCenter=C),p&&p.length===P.length-1&&(T.yCenter=p),o&&(T.xRanges=E.xRanges,T.yRanges=E.yRanges,T.pts=E.pts),a||R1t(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var F={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};T.xfill=r8(F,C,u,c,_,n),T.yfill=r8(F,p,d,v,b.length,i)}return[T]};function w_e(e){for(var t=[],r=e.length,n=0;n{"use strict";n8.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"]];n8.STYLE=n8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var jV=ye((asr,M_e)=>{"use strict";var A_e=a8(),N1t=ao(),S_e=Mr(),PT=null;function U1t(){if(PT!==null)return PT;PT=!1;var e=S_e.isSafari()||S_e.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(A_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")PT=t.some(function(o){return r.apply(null,o)});else{var n=N1t.tester.append("image").attr("style",A_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;PT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return PT}M_e.exports=U1t});var o8=ye((osr,z_e)=>{"use strict";var E_e=xa(),V1t=id(),H1t=ba(),G1t=ao(),j1t=Qa(),G0=Mr(),k_e=Ll(),W1t=JP(),Z1t=va(),X1t=Mu().extractOpts,Y1t=Mu().makeColorScaleFuncFromTrace,K1t=Zp(),J1t=Nh(),WV=J1t.LINE_SPACING,$1t=jV(),Q1t=a8().STYLE,D_e="heatmap-label";function R_e(e){return e.selectAll("g."+D_e)}function C_e(e){R_e(e).remove()}z_e.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;G0.makeTraceGroups(n,r,"hm").each(function(o){var s=E_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,x=l.xCenter,b=l.yCenter,g=H1t.traceIs(u,"contour"),E=g?"best":u.zsmooth,k=h.length,A=G0.maxRowLength(h),L=!1,_=!1,C,M,p,P,T,F,q,V;for(F=0;C===void 0&&F0;)M=i.c2p(d[F]),F--;for(M0;)T=a.c2p(v[F]),F--;T=i._length||M<=0||P>=a._length||T<=0;if(W){var re=s.selectAll("image").data([]);re.exit().remove(),C_e(s);return}var ae,_e;H==="fast"?(ae=A,_e=k):(ae=G,_e=N);var Me=document.createElement("canvas");Me.width=ae,Me.height=_e;var ke=Me.getContext("2d",{willReadFrequently:!0}),ge=Y1t(u,{noNumericCheck:!0,returnArray:!0}),ie,Te;H==="fast"?(ie=L?function(Pi){return A-1-Pi}:G0.identity,Te=_?function(Pi){return k-1-Pi}:G0.identity):(ie=function(Pi){return G0.constrain(Math.round(i.c2p(d[Pi])-C),0,G)},Te=function(Pi){return G0.constrain(Math.round(a.c2p(v[Pi])-P),0,N)});var Ee=Te(0),Ae=[Ee,Ee],ze=L?0:1,Ce=_?0:1,me=0,De=0,ce=0,Ge=0,nt,ct,qt,rt,ot;function Dt(Pi,Gi){if(Pi!==void 0){var Ki=ge(Pi);return Ki[0]=Math.round(Ki[0]),Ki[1]=Math.round(Ki[1]),Ki[2]=Math.round(Ki[2]),me+=Gi,De+=Ki[0]*Gi,ce+=Ki[1]*Gi,Ge+=Ki[2]*Gi,Ki}return[0,0,0,0]}function kt(Pi,Gi,Ki,ka){var jn=Pi[Ki.bin0];if(jn===void 0)return Dt(void 0,1);var la=Pi[Ki.bin1],Fa=Gi[Ki.bin0],Da=Gi[Ki.bin1],jo=la-jn||0,oa=Fa-jn||0,Sn;return la===void 0?Da===void 0?Sn=0:Fa===void 0?Sn=2*(Da-jn):Sn=(2*Da-Fa-jn)*2/3:Da===void 0?Fa===void 0?Sn=0:Sn=(2*jn-la-Fa)*2/3:Fa===void 0?Sn=(2*Da-la-jn)*2/3:Sn=Da+jn-la-Fa,Dt(jn+Ki.frac*jo+ka.frac*(oa+Ki.frac*Sn))}if(H!=="default"){var Ct=0,Yt;try{Yt=new Uint8Array(ae*_e*4)}catch(Pi){Yt=new Array(ae*_e*4)}if(H==="smooth"){var xr=x||d,er=b||v,Ke=new Array(xr.length),xt=new Array(er.length),bt=new Array(G),Lt=x?P_e:L_e,St=b?P_e:L_e,Et,dt,Ht;for(F=0;Far||ar>a._length))for(q=Se;qai||ai>i._length)){var jr=W1t({x:Qr,y:Vt},u,e._fullLayout);jr.x=Qr,jr.y=Vt;var ri=l.z[F][q];ri===void 0?(jr.z="",jr.zLabel=""):(jr.z=ri,jr.zLabel=j1t.tickText(Ve,ri,"hover").text);var bi=l.text&&l.text[F]&&l.text[F][q];(bi===void 0||bi===!1)&&(bi=""),jr.text=bi;var nn=G0.texttemplateString(Ne,jr,e._fullLayout._d3locale,jr,u._meta||{});if(nn){var Wi=nn.split("
"),Ni=Wi.length,_n=0;for(V=0;V{"use strict";F_e.exports={min:"zmin",max:"zmax"}});var s8=ye((lsr,q_e)=>{"use strict";var e_t=xa();q_e.exports=function(t){e_t.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var u8=ye((usr,B_e)=>{"use strict";var O_e=Nc(),_4=Mr(),l8=_4.isArrayOrTypedArray,t_t=Qa(),r_t=Mu().extractOpts;B_e.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,x=s.yCenter,b=s.zmask,g=l.zhoverformat,E=f,k=h,A,L,_,C;if(t.index!==!1){try{_=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){_4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(_<0||_>=d[0].length||C<0||C>d.length)return}else{if(O_e.inbox(r-f[0],r-f[f.length-1],0)>0||O_e.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(E=[2*f[0]-f[1]],M=1;M{"use strict";N_e.exports={attributes:ET(),supplyDefaults:N1e(),calc:i8(),plot:o8(),colorbar:S_(),style:s8(),hoverPoints:u8(),moduleType:"trace",name:"heatmap",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var H_e=ye((fsr,V_e)=>{"use strict";V_e.exports=U_e()});var ZV=ye((hsr,G_e)=>{"use strict";G_e.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var W_e=ye((dsr,j_e)=>{"use strict";j_e.exports={eventDataKeys:["binNumber"]}});var c8=ye((vsr,Y_e)=>{"use strict";var Ip=Lm(),Z_e=Oc().axisHoverFormat,i_t=Wo().hovertemplateAttrs,n_t=Wo().texttemplateAttrs,XV=Su(),X_e=ZV(),a_t=W_e(),YV=no().extendFlat;Y_e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:Z_e("x"),yhoverformat:Z_e("y"),text:YV({},Ip.text,{}),hovertext:YV({},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:X_e("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:X_e("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:i_t({},{keys:a_t.eventDataKeys}),texttemplate:n_t({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:YV({},Ip.textposition,{arrayOk:!1}),textfont:XV({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:XV({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:XV({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 Q_e=ye((psr,$_e)=>{"use strict";var K_e=ba(),x4=Mr(),J_e=va(),o_t=r0().handleText,s_t=zI(),l_t=c8();$_e.exports=function(t,r,n,i){function a(E,k){return x4.coerce(t,r,l_t,E,k)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");o_t(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),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(x4.minRowLength(o)&&x4.minRowLength(s)):x4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=K_e.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var x=r[h];x&&a("histfunc"),a("histnorm"),a("autobin"+f),s_t(t,r,a,n,i),x4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,g=K_e.getComponentMethod("errorbars","supplyDefaults");g(t,r,b||J_e.defaultLine,{axis:"y"}),g(t,r,b||J_e.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var h8=ye((gsr,rxe)=>{"use strict";var b4=Mr(),u_t=af(),f8=ba().traceIs,c_t=Hb(),f_t=r0().validateCornerradius,exe=b4.nestedProperty,KV=Bb().getAxisGroup,txe=[{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"}],h_t=["x","y"];rxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(H,X){return b4.coerce(s._input,s,s._module.attributes,H,X)}function x(H){return H.orientation==="v"?"x":"y"}function b(H,X){var G=u_t.getFromTrace({_fullLayout:r},H,X);return G.type}function g(H,X,G){var N=H.uid+"__"+G;X||(X=N);var W=b(H,G),re=H[G+"calendar"]||"",ae=n[X],_e=!0;ae&&(W===ae.axType&&re===ae.calendar?(_e=!1,ae.traces.push(H),ae.dirs.push(G)):(X=N,W!==ae.axType&&b4.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+W,"axis","with bins on","type:"+ae.axType,"axis."].join(" ")),re!==ae.calendar&&b4.warn(["Attempted to group the bins of trace",H.index,"set with a",re,"calendar","with bins",ae.calendar?"on a "+ae.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[X]={traces:[H],dirs:[G],axType:W,calendar:H[G+"calendar"]||""}),H["_"+G+"bingroup"]=X}for(f=0;f{"use strict";var d_t=TT().hoverPoints,v_t=Qa().hoverLabelText;ixe.exports=function(t,r,n,i,a){var o=d_t(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"]=v_t(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var JV=ye((ysr,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";oxe.exports={attributes:c8(),layoutAttributes:RI(),supplyDefaults:Q_e(),crossTraceDefaults:h8(),supplyLayoutDefaults:yV(),calc:UV().calc,crossTraceCalc:Gb().crossTraceCalc,plot:i2().plot,layerName:"barlayer",style:N0().style,styleOnSelect:N0().styleOnSelect,colorbar:Kd(),hoverPoints:nxe(),selectPoints:AT(),eventData:JV(),moduleType:"trace",name:"histogram",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var uxe=ye((xsr,lxe)=>{"use strict";lxe.exports=sxe()});var v8=ye((bsr,fxe)=>{"use strict";var Vg=c8(),cxe=ZV(),d8=ET(),p_t=vl(),$V=Oc().axisHoverFormat,g_t=Wo().hovertemplateAttrs,m_t=Wo().texttemplateAttrs,y_t=Kl(),w4=no().extendFlat;fxe.exports=w4({x:Vg.x,y:Vg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Vg.histnorm,histfunc:Vg.histfunc,nbinsx:Vg.nbinsx,xbins:cxe("x"),nbinsy:Vg.nbinsy,ybins:cxe("y"),autobinx:Vg.autobinx,autobiny:Vg.autobiny,bingroup:w4({},Vg.bingroup,{}),xbingroup:w4({},Vg.bingroup,{}),ybingroup:w4({},Vg.bingroup,{}),xgap:d8.xgap,ygap:d8.ygap,zsmooth:d8.zsmooth,xhoverformat:$V("x"),yhoverformat:$V("y"),zhoverformat:$V("z",1),hovertemplate:g_t({},{keys:"z"}),texttemplate:m_t({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:d8.textfont,showlegend:w4({},p_t.showlegend,{dflt:!1})},y_t("",{cLetter:"z",autoColorDflt:!1}))});var QV=ye((wsr,dxe)=>{"use strict";var __t=ba(),hxe=Mr();dxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=hxe.minRowLength(a),l=hxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=__t.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 pxe=ye((Tsr,vxe)=>{"use strict";var x_t=Mr(),b_t=QV(),w_t=RV(),T_t=Uh(),A_t=y4(),S_t=v8();vxe.exports=function(t,r,n,i){function a(o,s){return x_t.coerce(t,r,S_t,o,s)}b_t(t,r,a,i),r.visible!==!1&&(w_t(t,r,a,i),T_t(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),A_t(a,i),a("xhoverformat"),a("yhoverformat"))}});var yxe=ye((Asr,mxe)=>{"use strict";var M_t=u8(),gxe=Qa().hoverLabelText;mxe.exports=function(t,r,n,i,a){var o=M_t(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=gxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=gxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var xxe=ye((Ssr,_xe)=>{"use strict";_xe.exports={attributes:v8(),supplyDefaults:pxe(),crossTraceDefaults:h8(),calc:i8(),plot:o8(),layerName:"heatmaplayer",colorbar:S_(),style:s8(),hoverPoints:yxe(),eventData:JV(),moduleType:"trace",name:"histogram2d",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var wxe=ye((Msr,bxe)=>{"use strict";bxe.exports=xxe()});var p8=ye((Esr,Txe)=>{"use strict";Txe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var T4=ye((ksr,Exe)=>{"use strict";var Gh=ET(),g8=Uc(),Sxe=Oc(),eH=Sxe.axisHoverFormat,E_t=Sxe.descriptionOnlyNumbers,k_t=Kl(),C_t=Ed().dash,L_t=Su(),IT=no().extendFlat,Mxe=p8(),P_t=Mxe.COMPARISON_OPS2,I_t=Mxe.INTERVAL_OPS,Axe=g8.line;Exe.exports=IT({z:Gh.z,x:Gh.x,x0:Gh.x0,dx:Gh.dx,y:Gh.y,y0:Gh.y0,dy:Gh.dy,xperiod:Gh.xperiod,yperiod:Gh.yperiod,xperiod0:g8.xperiod0,yperiod0:g8.yperiod0,xperiodalignment:Gh.xperiodalignment,yperiodalignment:Gh.yperiodalignment,text:Gh.text,hovertext:Gh.hovertext,transpose:Gh.transpose,xtype:Gh.xtype,ytype:Gh.ytype,xhoverformat:eH("x"),yhoverformat:eH("y"),zhoverformat:eH("z",1),hovertemplate:Gh.hovertemplate,texttemplate:IT({},Gh.texttemplate,{}),textfont:IT({},Gh.textfont,{}),hoverongaps:Gh.hoverongaps,connectgaps:IT({},Gh.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:L_t({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:E_t("contour label")},operation:{valType:"enumerated",values:[].concat(P_t).concat(I_t),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:IT({},Axe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:C_t,smoothing:IT({},Axe.smoothing,{}),editType:"plot"},zorder:g8.zorder},k_t("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var rH=ye((Csr,Cxe)=>{"use strict";var Hv=v8(),qy=T4(),D_t=Kl(),tH=Oc().axisHoverFormat,kxe=no().extendFlat;Cxe.exports=kxe({x:Hv.x,y:Hv.y,z:Hv.z,marker:Hv.marker,histnorm:Hv.histnorm,histfunc:Hv.histfunc,nbinsx:Hv.nbinsx,xbins:Hv.xbins,nbinsy:Hv.nbinsy,ybins:Hv.ybins,autobinx:Hv.autobinx,autobiny:Hv.autobiny,bingroup:Hv.bingroup,xbingroup:Hv.xbingroup,ybingroup:Hv.ybingroup,autocontour:qy.autocontour,ncontours:qy.ncontours,contours:qy.contours,line:{color:qy.line.color,width:kxe({},qy.line.width,{dflt:.5}),dash:qy.line.dash,smoothing:qy.line.smoothing,editType:"plot"},xhoverformat:tH("x"),yhoverformat:tH("y"),zhoverformat:tH("z",1),hovertemplate:Hv.hovertemplate,texttemplate:qy.texttemplate,textfont:qy.textfont},D_t("",{cLetter:"z",editTypeOverride:"calc"}))});var m8=ye((Lsr,Lxe)=>{"use strict";Lxe.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 iH=ye((Psr,Pxe)=>{"use strict";var R_t=Mr();Pxe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;R_t.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var y8=ye((Isr,Ixe)=>{"use strict";var z_t=Uh(),F_t=iH();Ixe.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,z_t(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),F_t(n,i,l,a)}});var Fxe=ye((Dsr,zxe)=>{"use strict";var Dxe=Mr(),q_t=QV(),O_t=m8(),B_t=y8(),N_t=y4(),Rxe=rH();zxe.exports=function(t,r,n,i){function a(s,l){return Dxe.coerce(t,r,Rxe,s,l)}function o(s){return Dxe.coerce2(t,r,Rxe,s)}q_t(t,r,a,i),r.visible!==!1&&(O_t(t,r,a,o),B_t(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),r.contours&&r.contours.coloring==="heatmap"&&N_t(a,i))}});var oH=ye((Rsr,Oxe)=>{"use strict";var aH=Qa(),nH=Mr();Oxe.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=nH.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=nH.aggNums(Math.max,null,r));var o=qxe(i,a,t.ncontours);n.size=o.dtick,n.start=aH.tickFirst(o),o.range.reverse(),n.end=aH.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={}),nH.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=qxe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function qxe(e,t,r){var n={type:"linear",range:[e,t]};return aH.autoTicks(n,(t-e)/(r||15)),n}});var A4=ye((zsr,Bxe)=>{"use strict";Bxe.exports=function(t){return t.end+t.size/1e6}});var sH=ye((Fsr,Uxe)=>{"use strict";var Nxe=Mu(),U_t=i8(),V_t=oH(),H_t=A4();Uxe.exports=function(t,r){var n=U_t(t,r),i=n[0].z;V_t(r,i);var a=r.contours,o=Nxe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=H_t(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 Nxe.calc(t,r,{vals:s,cLetter:"z"}),n}});var S4=ye((qsr,Vxe)=>{"use strict";Vxe.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 lH=ye((Osr,Hxe)=>{"use strict";var _8=S4();Hxe.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 uH=ye((Bsr,Wxe)=>{"use strict";var x8=Mr(),DT=S4();Wxe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=DT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=DT.SADDLEREMAINDER[o]):delete e.crossings[a],s=DT.NEWDELTA[o],!s){x8.log("Found bad marching index:",o,t,e.level);break}l.push(jxe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),M4(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),x=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(x||r&&v)break;o=e.crossings[a]}d===1e4&&x8.log("Infinite loop in contour?");var b=M4(l[0],l[l.length-1],n,i),g=0,E=.2*e.smoothing,k=[],A=0,L,_,C,M,p,P,T,F,q,V,H;for(d=1;d=A;d--)if(L=k[d],L=A&&L+k[_]F&&q--,e.edgepaths[q]=H.concat(l,V));break}W||(e.edgepaths[F]=l.concat(V))}for(F=0;F20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:DT.BOTTOMSTART.indexOf(e)!==-1?i=1:DT.LEFTSTART.indexOf(e)!==-1?n=1:DT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function jxe(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 Kxe=ye((Nsr,Yxe)=>{"use strict";var cH=p8(),Z_t=uo();Yxe.exports={"[]":Zxe("[]"),"][":Zxe("]["),">":fH(">"),"<":fH("<"),"=":fH("=")};function Xxe(e,t){var r=Array.isArray(t),n;function i(a){return Z_t(a)?+a:null}return cH.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):cH.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:cH.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function Zxe(e){return function(t){t=Xxe(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 fH(e){return function(t){return t=Xxe(e,t),{start:t,end:1/0,size:1/0}}}});var hH=ye((Usr,$xe)=>{"use strict";var Jxe=Mr(),X_t=Kxe(),Y_t=A4();$xe.exports=function(t,r,n){for(var i=t.type==="constraint"?X_t[t._operation](t.value):t,a=i.size,o=[],s=Y_t(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){Jxe.warn("Too many contours, clipping at 1000",t);break}return o}});var dH=ye((Vsr,ebe)=>{"use strict";var RT=Mr();ebe.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&&RT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";tbe.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 b8=ye(Gv=>{"use strict";var k4=xa(),Id=Mr(),Oy=ao(),K_t=Mu(),nbe=Ll(),rbe=Qa(),ibe=ym(),J_t=o8(),abe=lH(),obe=uH(),$_t=hH(),Q_t=dH(),sbe=vH(),E4=S4(),Dm=E4.LABELOPTIMIZER;Gv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Id.makeTraceGroups(i,n,"contour").each(function(s){var l=k4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=$_t(d,r,u),x=Id.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),J_t(t,r,b,x),abe(v),obe(v);var g=a.c2p(f[0],!0),E=a.c2p(f[f.length-1],!0),k=o.c2p(h[0],!0),A=o.c2p(h[h.length-1],!0),L=[[g,A],[E,A],[E,k],[g,k]],_=v;d.type==="constraint"&&(_=Q_t(v,d._operation)),ext(l,L,d),txt(l,_,L,d),rxt(l,v,t,u,d),nxt(l,r,t,u,L)})};function ext(e,t,r){var n=Id.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 txt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&sbe(t,n);var o=Id.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:"")+lbe(l,r);u?k4.select(this).attr("d",u).style("stroke","none"):k4.select(this).remove()})}function lbe(e,t){var r="",n=0,i=e.edgepaths.map(function(g,E){return E}),a=!0,o,s,l,u,c,f;function h(g){return Math.abs(g[1]-t[0][1])<.01}function d(g){return Math.abs(g[1]-t[2][1])<.01}function v(g){return Math.abs(g[0]-t[0][0])<.01}function x(g){return Math.abs(g[0]-t[2][0])<.01}for(;i.length;){for(f=Oy.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){Id.log("Missing end?",n,e);break}for(h(o)&&!x(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:x(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):Id.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){Id.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 ixt(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,x=s-c,b=o+u,g=s+c,E=0;E{"use strict";var oxt=xa(),pH=Mu(),sxt=A4();ube.exports=function(t){var r=t.contours,n=r.start,i=sxt(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=pH.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?pH.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,x=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v=b)&&(n<=x&&(n=x),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;vx&&(f.unshift(x),h.unshift(h[0])),f[f.length-1]{"use strict";var w8=xa(),cbe=ao(),lxt=s8(),uxt=gH();fbe.exports=function(t){var r=w8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=w8.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?uxt(a):null;i.selectAll("g.contourlevel").each(function(b){w8.select(this).selectAll("path").call(cbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){cbe.font(w8.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 x;i.selectAll("g.contourfill path").style("fill",function(b){return x===void 0&&(x=b.level),d(b.level+.5*l)}),x===void 0&&(x=u),i.selectAll("g.contourbg path").style("fill",d(x-.5*l))}}),lxt(t)}});var A8=ye((Zsr,dbe)=>{"use strict";var hbe=Mu(),cxt=gH(),fxt=A4();function hxt(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=cxt(t,{isColorbar:!0});if(o==="heatmap"){var l=hbe.extractOpts(t);r._fillgradient=l.reversescale?hbe.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:fxt(n),size:a}}dbe.exports={min:"zmin",max:"zmax",calc:hxt}});var mH=ye((Xsr,vbe)=>{"use strict";var S8=va(),dxt=u8();vbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=dxt(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&S8.opacity(l.fillcolor)?s.color=S8.addOpacity(l.fillcolor,1):l.contours.showlines&&S8.opacity(l.line.color)&&(s.color=S8.addOpacity(l.line.color,1)))}),o}});var gbe=ye((Ysr,pbe)=>{"use strict";pbe.exports={attributes:rH(),supplyDefaults:Fxe(),crossTraceDefaults:h8(),calc:sH(),plot:b8().plot,layerName:"contourlayer",style:T8(),colorbar:A8(),hoverPoints:mH(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var ybe=ye((Ksr,mbe)=>{"use strict";mbe.exports=gbe()});var yH=ye((Jsr,Abe)=>{"use strict";var _be=uo(),vxt=iH(),wbe=va(),xbe=wbe.addOpacity,pxt=wbe.opacity,Tbe=p8(),bbe=Mr().isArrayOrTypedArray,gxt=Tbe.CONSTRAINT_REDUCTION,mxt=Tbe.COMPARISON_OPS2;Abe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=gxt[f],yxt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",xbe((t.line||{}).color||a,.5))),l){var h=c&&pxt(c)?xbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),vxt(n,i,u,o)};function yxt(e,t){var r;mxt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),bbe(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])]:_be(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),_be(t.value)||(bbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var Ebe=ye(($sr,Mbe)=>{"use strict";var _H=Mr(),_xt=ZI(),xxt=Pg(),bxt=yH(),wxt=m8(),Txt=y8(),Axt=y4(),Sbe=T4();Mbe.exports=function(t,r,n,i){function a(u,c){return _H.coerce(t,r,Sbe,u,c)}function o(u){return _H.coerce2(t,r,Sbe,u)}var s=_xt(t,r,a,i);if(!s){r.visible=!1;return}xxt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate");var l=a("contours.type")==="constraint";a("connectgaps",_H.isArray1D(r.z)),l?bxt(t,r,a,i,n):(wxt(t,r,a,o),Txt(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&Axt(a,i),a("zorder")}});var Cbe=ye((Qsr,kbe)=>{"use strict";kbe.exports={attributes:T4(),supplyDefaults:Ebe(),calc:sH(),plot:b8().plot,style:T8(),colorbar:A8(),hoverPoints:mH(),moduleType:"trace",name:"contour",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Pbe=ye((elr,Lbe)=>{"use strict";Lbe.exports=Cbe()});var xH=ye((tlr,Dbe)=>{"use strict";var Sxt=Wo().hovertemplateAttrs,Mxt=Wo().texttemplateAttrs,Ext=Eg(),a0=Uc(),kxt=vl(),Ibe=Kl(),Cxt=Ed().dash,M_=no().extendFlat,j0=a0.marker,C4=a0.line,Lxt=j0.line;Dbe.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:Mxt({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:M_({},a0.hovertext,{}),line:{color:C4.color,width:C4.width,dash:Cxt,backoff:C4.backoff,shape:M_({},C4.shape,{values:["linear","spline"]}),smoothing:C4.smoothing,editType:"calc"},connectgaps:a0.connectgaps,cliponaxis:a0.cliponaxis,fill:M_({},a0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Ext(),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:Lxt.width,editType:"calc"},Ibe("marker.line")),gradient:j0.gradient,editType:"calc"},Ibe("marker")),textfont:a0.textfont,textposition:a0.textposition,selected:a0.selected,unselected:a0.unselected,hoverinfo:M_({},kxt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a0.hoveron,hovertemplate:Sxt()}});var qbe=ye((rlr,Fbe)=>{"use strict";var Rbe=Mr(),Pxt=Sm(),zT=lu(),Ixt=$p(),Dxt=D0(),zbe=J3(),Rxt=R0(),zxt=Ig(),Fxt=xH();Fbe.exports=function(t,r,n,i){function a(h,d){return Rbe.coerce(t,r,Fxt,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");var c=u{"use strict";var bH=Qa();Obe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=bH.tickText(a.aaxis,t.a,!0).text,i.bLabel=bH.tickText(a.baxis,t.b,!0).text,i.cLabel=bH.tickText(a.caxis,t.c,!0).text,i}});var Hbe=ye((nlr,Vbe)=>{"use strict";var wH=uo(),qxt=z0(),Oxt=km(),Bxt=F0(),Nxt=q0().calcMarkerSize,Nbe=["a","b","c"],Ube={a:["b","c"],b:["a","c"],c:["a","b"]};Vbe.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 Uxt=iT();Gbe.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 Vxt=sT();Wbe.exports=function(t,r,n,i){var a=Vxt(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 x=h._module.formatLabels(f,h,v);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var b=f.hi||h.hoverinfo,g=[];function E(A,L){g.push(A._hovertitle+": "+L)}if(!h.hovertemplate){var k=b.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&E(d.aaxis,o.aLabel),k.indexOf("b")!==-1&&E(d.baxis,o.bLabel),k.indexOf("c")!==-1&&E(d.caxis,o.cLabel)}return o.extraText=g.join("
"),o.hovertemplate=h.hovertemplate,a}});var Ybe=ye((slr,Xbe)=>{"use strict";Xbe.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 o2e=ye((llr,a2e)=>{"use strict";var t2e=xa(),Hxt=id(),TH=ba(),By=Mr(),Rm=By.strTranslate,M8=By._,qT=va(),E8=ao(),L4=ym(),AH=no().extendFlat,Gxt=Yu(),E_=Qa(),Kbe=gv(),Jbe=Nc(),r2e=Sg(),$be=r2e.freeMode,jxt=r2e.rectMode,SH=Mb(),Wxt=wf().prepSelect,Zxt=wf().selectOnClick,Xxt=wf().clearOutline,Yxt=wf().clearSelectionsCache,i2e=ad();function n2e(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}a2e.exports=n2e;var zm=n2e.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;aFT*u?(g=u,b=g*FT):(b=l,g=b/FT),E=o*b/l,k=s*g/u,v=t.l+t.w*i-b/2,x=t.t+t.h*(1-a)-g/2,r.x0=v,r.y0=x,r.w=b,r.h=g,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-E/2,i+E/2],_id:"x"},L4(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-k/2,a+k/2],_id:"y"},L4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var A=r.yaxis.domain[0],L=r.aaxis=AH({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+k*FT],anchor:"free",position:0,_id:"y",_length:b});L4(L,r.graphDiv._fullLayout),L.setScale();var _=r.baxis=AH({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});L4(_,r.graphDiv._fullLayout),_.setScale();var C=r.caxis=AH({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+k*FT],anchor:"free",position:0,_id:"y",_length:b});L4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+v+","+(x+g)+"h"+b+"l-"+b/2+",-"+g+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var p="M0,"+g+"h"+b+"l-"+b/2+",-"+g+"Z";r.clipDefRelative.select("path").attr("d",p);var P=Rm(v,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var T=Rm(v-_._offset,x+g);r.layers.baxis.attr("transform",T),r.layers.bgrid.attr("transform",T);var F=Rm(v+b/2,x)+"rotate(30)"+Rm(0,-L._offset);r.layers.aaxis.attr("transform",F),r.layers.agrid.attr("transform",F);var q=Rm(v+b/2,x)+"rotate(-30)"+Rm(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+v+","+(x+g)+"l"+b/2+",-"+g:"M0,0").call(qT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",_.showline?"M"+v+","+(x+g)+"h"+b:"M0,0").call(qT.stroke,_.linecolor||"#000").style("stroke-width",(_.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+x+"l"+b/2+","+g:"M0,0").call(qT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),E8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};zm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(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"]=SH.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:M8(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"]=SH.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:M8(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"]=SH.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:M8(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=Kxt(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),x=d*(e.linewidth||1)/2,b=d*e.ticklen,g=t.w,E=t.h,k=i==="b"?"M0,"+x+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+x+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,A={a:"M0,0l"+E+",-"+g/2,b:"M0,0l-"+g/2+",-"+E,c:"M0,0l-"+E+","+g/2}[i];E_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:k,transFn:h,crisp:!1}),E_.drawGrid(r,e,{vals:f,layer:t.layers[i+"grid"],path:A,transFn:h,crisp:!1}),E_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:E_.makeLabelFns(e,0,s)})};function Kxt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var fd=i2e.MINZOOM/2+.87,Jxt="m-0.87,.5h"+fd+"v3h-"+(fd+5.2)+"l"+(fd/2+2.6)+",-"+(fd*.87+4.5)+"l2.6,1.5l-"+fd/2+","+fd*.87+"Z",$xt="m0.87,.5h-"+fd+"v3h"+(fd+5.2)+"l-"+(fd/2+2.6)+",-"+(fd*.87+4.5)+"l-2.6,1.5l"+fd/2+","+fd*.87+"Z",Qxt="m0,1l"+fd/2+","+fd*.87+"l2.6,-1.5l-"+(fd/2+2.6)+",-"+(fd*.87+4.5)+"l-"+(fd/2+2.6)+","+(fd*.87+4.5)+"l2.6,1.5l"+fd/2+",-"+fd*.87+"Z",ebt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",Qbe=!0;zm.clearOutline=function(){Yxt(this.dragOptions),Xxt(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,F,q){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;$be(V)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,V==="zoom"?(e.dragOptions.moveFn=_,e.dragOptions.clickFn=g,e.dragOptions.doneFn=C,E(T,F,q)):V==="pan"?(e.dragOptions.moveFn=p,e.dragOptions.clickFn=g,e.dragOptions.doneFn=P,M(),e.clearOutline(r)):(jxt(V)||$be(V))&&Wxt(T,F,q,e.dragOptions,V)}};var o,s,l,u,c,f,h,d,v,x;function b(T){var F={};return F[e.id+".aaxis.min"]=T.a,F[e.id+".baxis.min"]=T.b,F[e.id+".caxis.min"]=T.c,F}function g(T,F){var q=r._fullLayout.clickmode;e2e(r),T===2&&(r.emit("plotly_doubleclick",null),TH.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&T===1&&Zxt(F,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&Jbe.click(r,F,e.id)}function E(T,F,q){var V=t.getBoundingClientRect();o=F-V.left,s=q-V.top,r._fullLayout._calcInverseTransform(r);var H=r._fullLayout._invTransform,X=By.apply3DTransform(H)(o,s);o=X[0],s=X[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=Hxt(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",Rm(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),x=n.append("path").attr("class","zoombox-corners").attr("transform",Rm(e.x0,e.y0)).style({fill:qT.background,stroke:qT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(T,F){return 1-F/e.h}function A(T,F){return 1-(T+(e.h-F)/Math.sqrt(3))/e.w}function L(T,F){return(T-(e.h-F)/Math.sqrt(3))/e.w}function _(T,F){var q=o+T*i,V=s+F*a,H=Math.max(0,Math.min(1,k(o,s),k(q,V))),X=Math.max(0,Math.min(1,A(o,s),A(q,V))),G=Math.max(0,Math.min(1,L(o,s),L(q,V))),N=(H/2+G)*e.w,W=(1-H/2-X)*e.w,re=(N+W)/2,ae=W-N,_e=(1-H)*e.h,Me=_e-ae/FT;ae.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){e2e(r),c!==l&&(TH.call("_guiRelayout",r,b(c)),Qbe&&r.data&&r._context.showTips&&(By.notifier(M8(r,"Double-click to zoom back out"),"long"),Qbe=!1))}function M(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function p(T,F){var q=T/e.xaxis._m,V=F/e.yaxis._m;c={a:l.a-V,b:l.b+(q+V)/2,c:l.c-(q-V)/2};var H=[c.a,c.b,c.c].sort(By.sorterAsc),X={a:H.indexOf(c.a),b:H.indexOf(c.b),c:H.indexOf(c.c)};H[0]<0&&(H[1]+H[0]/2<0?(H[2]+=H[0]+H[1],H[0]=H[1]=0):(H[2]+=H[0]/2,H[1]+=H[0]/2,H[0]=0),c={a:H[X.a],b:H[X.b],c:H[X.c]},F=(l.a-c.a)*e.yaxis._m,T=(l.c-c.c-l.b+c.b)*e.xaxis._m);var G=Rm(e.x0+T,e.y0+F);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",G);var N=Rm(-T,-F);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(E8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){TH.call("_guiRelayout",r,b(c))}t.onmousemove=function(T){Jbe.hover(r,T,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(T){r._dragging||Kbe.unhover(r,T)},Kbe.init(this.dragOptions)};function e2e(e){t2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var kH=ye((ulr,s2e)=>{"use strict";var tbt=dh(),rbt=Ju().attributes,ql=Cd(),ibt=Bu().overrideAll,MH=no().extendFlat,EH={title:{text:ql.title.text,font:ql.title.font},color:ql.color,tickmode:ql.minor.tickmode,nticks:MH({},ql.nticks,{dflt:6,min:1}),tick0:ql.tick0,dtick:ql.dtick,tickvals:ql.tickvals,ticktext:ql.ticktext,ticks:ql.ticks,ticklen:ql.ticklen,tickwidth:ql.tickwidth,tickcolor:ql.tickcolor,ticklabelstep:ql.ticklabelstep,showticklabels:ql.showticklabels,labelalias:ql.labelalias,showtickprefix:ql.showtickprefix,tickprefix:ql.tickprefix,showticksuffix:ql.showticksuffix,ticksuffix:ql.ticksuffix,showexponent:ql.showexponent,exponentformat:ql.exponentformat,minexponent:ql.minexponent,separatethousands:ql.separatethousands,tickfont:ql.tickfont,tickangle:ql.tickangle,tickformat:ql.tickformat,tickformatstops:ql.tickformatstops,hoverformat:ql.hoverformat,showline:MH({},ql.showline,{dflt:!0}),linecolor:ql.linecolor,linewidth:ql.linewidth,showgrid:MH({},ql.showgrid,{dflt:!0}),gridcolor:ql.gridcolor,gridwidth:ql.gridwidth,griddash:ql.griddash,layer:ql.layer,min:{valType:"number",dflt:0,min:0}},k8=s2e.exports=ibt({domain:rbt({name:"ternary"}),bgcolor:{valType:"color",dflt:tbt.background},sum:{valType:"number",dflt:1,min:0},aaxis:EH,baxis:EH,caxis:EH},"plot","from-root");k8.uirevision={valType:"any",editType:"none"};k8.aaxis.uirevision=k8.baxis.uirevision=k8.caxis.uirevision={valType:"any",editType:"none"}});var k_=ye((clr,l2e)=>{"use strict";var nbt=Mr(),abt=Vs(),obt=Ju().defaults;l2e.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(E,k){return nbt.coerce(h,d,o,E,k)}for(var x=0;x{"use strict";var sbt=va(),lbt=Vs(),C8=Mr(),ubt=k_(),cbt=e_(),fbt=t_(),hbt=T3(),dbt=xb(),vbt=YM(),c2e=kH(),u2e=["aaxis","baxis","caxis"];f2e.exports=function(t,r,n){ubt(t,r,n,{type:"ternary",attributes:c2e,handleDefaults:pbt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function pbt(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=sbt.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 gbt(e,t,r,n){var i=c2e[t._name];function a(d,v){return C8.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,C8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:C8.bigFont(r.font.size),color:s}}),a("min"),dbt(e,t,a,"linear"),fbt(e,t,a,"linear"),cbt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),hbt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(C8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),vbt(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 mbt=o2e(),ybt=kd().getSubplotCalcData,_bt=Mr().counterRegex,OT="ternary";W0.name=OT;var xbt=W0.attr="subplot";W0.idRoot=OT;W0.idRegex=W0.attrRegex=_bt(OT);var bbt=W0.attributes={};bbt[xbt]={valType:"subplotid",dflt:"ternary",editType:"calc"};W0.layoutAttributes=kH();W0.supplyLayoutDefaults=h2e();W0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[OT],a=0;a{"use strict";v2e.exports={attributes:xH(),supplyDefaults:qbe(),colorbar:Kd(),formatLabels:Bbe(),calc:Hbe(),plot:jbe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:Zbe(),selectPoints:lT(),eventData:Ybe(),moduleType:"trace",name:"scatterternary",basePlotModule:d2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var m2e=ye((vlr,g2e)=>{"use strict";g2e.exports=p2e()});var CH=ye((plr,_2e)=>{"use strict";var jh=v4(),BT=no().extendFlat,y2e=Oc().axisHoverFormat;_2e.exports={y:jh.y,x:jh.x,x0:jh.x0,y0:jh.y0,xhoverformat:y2e("x"),yhoverformat:y2e("y"),name:BT({},jh.name,{}),orientation:BT({},jh.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:jh.fillcolor,points:BT({},jh.boxpoints,{}),jitter:BT({},jh.jitter,{}),pointpos:BT({},jh.pointpos,{}),width:BT({},jh.width,{}),marker:jh.marker,text:jh.text,hovertext:jh.hovertext,hovertemplate:jh.hovertemplate,quartilemethod:jh.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:jh.offsetgroup,alignmentgroup:jh.alignmentgroup,selected:jh.selected,unselected:jh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:jh.zorder}});var IH=ye((glr,x2e)=>{"use strict";var LH=p4(),PH=Mr().extendFlat;x2e.exports={violinmode:PH({},LH.boxmode,{}),violingap:PH({},LH.boxgap,{}),violingroupgap:PH({},LH.boxgroupgap,{})}});var S2e=ye((mlr,A2e)=>{"use strict";var b2e=Mr(),wbt=va(),w2e=m4(),T2e=CH();A2e.exports=function(t,r,n,i){function a(L,_){return b2e.coerce(t,r,T2e,L,_)}function o(L,_){return b2e.coerce2(t,r,T2e,L,_)}if(w2e.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",wbt.addOpacity(r.line.color,.5));w2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),x=o("box.line.color",c),b=o("box.line.width",f),g=a("box.visible",!!(d||v||x||b));g||(r.box={visible:!1});var E=o("meanline.color",c),k=o("meanline.width",f),A=a("meanline.visible",!!(E||k));A||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var E2e=ye((ylr,M2e)=>{"use strict";var Tbt=Mr(),Abt=IH(),Sbt=UI();M2e.exports=function(t,r,n){function i(a,o){return Tbt.coerce(t,r,Abt,a,o)}Sbt._supply(t,r,n,i,"violin")}});var L8=ye(o2=>{"use strict";var Mbt=Mr(),Ebt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};o2.makeKDE=function(e,t,r){var n=r.length,i=Ebt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u{"use strict";var DH=Mr(),RH=Qa(),kbt=MV(),k2e=L8(),Cbt=es().BADNUM;C2e.exports=function(t,r){var n=kbt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=RH.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var Dbt=HI().setPositionOffset,P2e=["v","h"];I2e.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var zH=xa(),FH=Mr(),Rbt=ao(),qH=GI(),zbt=fU(),Fbt=L8();R2e.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=zbt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return Rbt.smoothopen(h[0],1)}FH.makeTraceGroups(i,n,"trace violins").each(function(c){var f=zH.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var x=d.bPos,b=d.bdPos,g=r[d.valLetter+"axis"],E=r[d.posLetter+"axis"],k=v.side==="both",A=k||v.side==="positive",L=k||v.side==="negative",_=f.selectAll("path.violin").data(FH.identity);_.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each(function(V){var H=zH.select(this),X=V.density,G=X.length,N=E.c2l(V.pos+x,!0),W=E.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var ae=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode==="count"?ae.maxKDE/b*(ae.maxCount/V.pts.length):ae.maxKDE/b}var _e,Me,ke,ge,ie,Te,Ee;if(A){for(Te=new Array(G),ge=0;ge{"use strict";var F2e=xa(),NT=va(),qbt=op().stylePoints;q2e.exports=function(t){var r=F2e.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=F2e.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(NT.stroke,i.line.color).call(NT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(NT.stroke,s.color).call(NT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(NT.stroke,l.color),a.selectAll("path.meanline").style(c).call(NT.stroke,l.color),qbt(a,i,t)})}});var V2e=ye((Alr,U2e)=>{"use strict";var Obt=va(),OH=Mr(),Bbt=Qa(),B2e=PV(),N2e=L8();U2e.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 x=B2e.hoverOnBoxes(t,r,n,i);if(f&&x.length>0){var b=t.xa,g=t.ya,E,k,A,L,_;l.orientation==="h"?(_=r,E="y",A=g,k="x",L=b):(_=n,E="x",A=b,k="y",L=g);var C=s[t.index];if(_>=C.span[0]&&_<=C.span[1]){var M=OH.extendFlat({},t),p=L.c2p(_,!0),P=N2e.getKdeValue(C,l,_),T=N2e.getPositionOnKdePath(C,l,p),F=A._offset,q=A._length;M[E+"0"]=T[0],M[E+"1"]=T[1],M[k+"0"]=M[k+"1"]=p,M[k+"Label"]=k+": "+Bbt.hoverLabelText(L,_,l[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var V=0,H=0;H{"use strict";H2e.exports={attributes:CH(),layoutAttributes:IH(),supplyDefaults:S2e(),crossTraceDefaults:m4().crossTraceDefaults,supplyLayoutDefaults:E2e(),calc:L2e(),crossTraceCalc:D2e(),plot:z2e(),style:O2e(),styleOnSelect:op().styleOnSelect,hoverPoints:V2e(),selectPoints:IV(),moduleType:"trace",name:"violin",basePlotModule:Jf(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var W2e=ye((Mlr,j2e)=>{"use strict";j2e.exports=G2e()});var X2e=ye((Elr,Z2e)=>{"use strict";Z2e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var NH=ye((klr,J2e)=>{"use strict";var lc=Lm(),BH=Uc().line,Nbt=vl(),Y2e=Oc().axisHoverFormat,Ubt=Wo().hovertemplateAttrs,Vbt=Wo().texttemplateAttrs,K2e=X2e(),Ny=no().extendFlat,Hbt=va();J2e.exports={x:lc.x,x0:lc.x0,dx:lc.dx,y:lc.y,y0:lc.y0,dy:lc.dy,xperiod:lc.xperiod,yperiod:lc.yperiod,xperiod0:lc.xperiod0,yperiod0:lc.yperiod0,xperiodalignment:lc.xperiodalignment,yperiodalignment:lc.yperiodalignment,xhoverformat:Y2e("x"),yhoverformat:Y2e("y"),hovertext:lc.hovertext,hovertemplate:Ubt({},{keys:K2e.eventDataKeys}),hoverinfo:Ny({},Nbt.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:Vbt({editType:"plot"},{keys:K2e.eventDataKeys.concat(["label","value"])}),text:lc.text,textposition:lc.textposition,insidetextanchor:Ny({},lc.insidetextanchor,{dflt:"middle"}),textangle:Ny({},lc.textangle,{dflt:0}),textfont:lc.textfont,insidetextfont:lc.insidetextfont,outsidetextfont:lc.outsidetextfont,constraintext:lc.constraintext,cliponaxis:lc.cliponaxis,orientation:Ny({},lc.orientation,{}),offset:Ny({},lc.offset,{arrayOk:!1}),width:Ny({},lc.width,{arrayOk:!1}),marker:Gbt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Ny({},BH.color,{dflt:Hbt.defaultLine}),width:Ny({},BH.width,{dflt:0,editType:"plot"}),dash:BH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:lc.offsetgroup,alignmentgroup:lc.alignmentgroup,zorder:lc.zorder};function Gbt(){var e=Ny({},lc.marker);return delete e.pattern,delete e.cornerradius,e}});var UH=ye((Clr,$2e)=>{"use strict";$2e.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 HH=ye((Llr,ewe)=>{"use strict";var P8=Mr(),jbt=Hb(),Wbt=r0().handleText,Zbt=K3(),Xbt=Pg(),Q2e=NH(),VH=va();function Ybt(e,t,r,n){function i(f,h){return P8.coerce(e,t,Q2e,f,h)}var a=Zbt(e,t,n,i);if(!a){t.visible=!1;return}Xbt(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");var s=i("textposition");Wbt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",P8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",VH.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Kbt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Kbt(e){var t=P8.isArrayOrTypedArray(e)?"#000":e;return VH.addOpacity(t,.5*VH.opacity(t))}function Jbt(e,t){var r,n;function i(o){return P8.coerce(n._input,n,Q2e,o)}for(var a=0;a{"use strict";var $bt=Mr(),Qbt=UH();twe.exports=function(e,t,r){var n=!1;function i(s,l){return $bt.coerce(e,t,Qbt,s,l)}for(var a=0;a{"use strict";var UT=Mr();iwe.exports=function(t,r){for(var n=0;n{"use strict";var awe=Qa(),owe=Dg(),e2t=nwe(),t2t=F0(),P4=es().BADNUM;swe.exports=function(t,r){var n=awe.getFromId(t,r.xaxis||"x"),i=awe.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=owe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=owe(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 uwe=Gb().setGroupPositions;cwe.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 I8=xa(),L_=Mr(),hwe=ao(),C_=es().BADNUM,r2t=i2(),i2t=_v().clearMinTextSize;vwe.exports=function(t,r,n,i){var a=t._fullLayout;i2t("funnel",a),n2t(t,r,n,i),a2t(t,r,n,i),r2t.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function n2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=I8.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 x=dwe(d,i,a,c),b=x[0],g=x[1],E="";b[0]!==C_&&g[0]!==C_&&b[1]!==C_&&g[1]!==C_&&b[2]!==C_&&g[2]!==C_&&b[3]!==C_&&g[3]!==C_&&(c?E+="M"+b[0]+","+g[1]+"L"+b[2]+","+g[2]+"H"+b[3]+"L"+b[1]+","+g[1]+"Z":E+="M"+b[1]+","+g[1]+"L"+b[2]+","+g[3]+"V"+g[2]+"L"+b[1]+","+g[0]+"Z"),E===""&&(E="M0,0Z"),L_.ensureSingle(I8.select(this),"path").attr("d",E).call(hwe.setClipUrl,t.layerClipId,e)}})})}function a2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;L_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=I8.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 x=dwe(d,i,a,c),b=x[0],g=x[1],E="";b[3]!==void 0&&g[3]!==void 0&&(c?(E+="M"+b[0]+","+g[1]+"L"+b[2]+","+g[2],E+="M"+b[1]+","+g[1]+"L"+b[3]+","+g[2]):(E+="M"+b[1]+","+g[1]+"L"+b[2]+","+g[3],E+="M"+b[1]+","+g[0]+"L"+b[2]+","+g[2])),E===""&&(E="M0,0Z"),L_.ensureSingle(I8.select(this),"path").attr("d",E).call(hwe.setClipUrl,t.layerClipId,e)}})})}function dwe(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 ywe=ye((Flr,mwe)=>{"use strict";var I4=xa(),gwe=ao(),jH=va(),o2t=N1().DESELECTDIM,s2t=N0(),l2t=_v().resizeText,u2t=s2t.styleTextPoints;function c2t(e,t,r){var n=r||I4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");l2t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=I4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;I4.select(this).call(jH.fill,s.mc||l.color).call(jH.stroke,s.mlc||l.line.color).call(gwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?o2t:1)}}),u2t(a,o,e),a.selectAll(".regions").each(function(){I4.select(this).selectAll("path").style("stroke-width",0).call(jH.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;gwe.lineGroupStyle(I4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}mwe.exports={style:c2t}});var bwe=ye((qlr,xwe)=>{"use strict";var _we=va().opacity,f2t=TT().hoverOnBars,WH=Mr().formatPercent;xwe.exports=function(t,r,n,i,a){var o=f2t(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=WH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=WH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=WH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var x=d==="all",b=d.split("+"),g=function(E){return x||b.indexOf(E)!==-1};g("percent initial")&&v.push(o.percentInitialLabel+" of initial"),g("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),g("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("
"),o.color=h2t(l,f),[o]}};function h2t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(_we(n))return n;if(_we(i)&&a)return i}});var Twe=ye((Olr,wwe)=>{"use strict";wwe.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 Swe=ye((Blr,Awe)=>{"use strict";Awe.exports={attributes:NH(),layoutAttributes:UH(),supplyDefaults:HH().supplyDefaults,crossTraceDefaults:HH().crossTraceDefaults,supplyLayoutDefaults:rwe(),calc:lwe(),crossTraceCalc:fwe(),plot:pwe(),style:ywe().style,hoverPoints:bwe(),eventData:Twe(),selectPoints:AT(),moduleType:"trace",name:"funnel",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Ewe=ye((Nlr,Mwe)=>{"use strict";Mwe.exports=Swe()});var Cwe=ye((Ulr,kwe)=>{"use strict";kwe.exports={eventDataKeys:["initial","delta","final"]}});var YH=ye((Vlr,Iwe)=>{"use strict";var Vu=Lm(),ZH=Uc().line,d2t=vl(),Lwe=Oc().axisHoverFormat,v2t=Wo().hovertemplateAttrs,p2t=Wo().texttemplateAttrs,Pwe=Cwe(),VT=no().extendFlat,g2t=va();function XH(e){return{marker:{color:VT({},Vu.marker.color,{arrayOk:!1,editType:"style"}),line:{color:VT({},Vu.marker.line.color,{arrayOk:!1,editType:"style"}),width:VT({},Vu.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Iwe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:Vu.x,x0:Vu.x0,dx:Vu.dx,y:Vu.y,y0:Vu.y0,dy:Vu.dy,xperiod:Vu.xperiod,yperiod:Vu.yperiod,xperiod0:Vu.xperiod0,yperiod0:Vu.yperiod0,xperiodalignment:Vu.xperiodalignment,yperiodalignment:Vu.yperiodalignment,xhoverformat:Lwe("x"),yhoverformat:Lwe("y"),hovertext:Vu.hovertext,hovertemplate:v2t({},{keys:Pwe.eventDataKeys}),hoverinfo:VT({},d2t.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:p2t({editType:"plot"},{keys:Pwe.eventDataKeys.concat(["label"])}),text:Vu.text,textposition:Vu.textposition,insidetextanchor:Vu.insidetextanchor,textangle:Vu.textangle,textfont:Vu.textfont,insidetextfont:Vu.insidetextfont,outsidetextfont:Vu.outsidetextfont,constraintext:Vu.constraintext,cliponaxis:Vu.cliponaxis,orientation:Vu.orientation,offset:Vu.offset,width:Vu.width,increasing:XH("increasing"),decreasing:XH("decreasing"),totals:XH("intermediate sums and total"),connector:{line:{color:VT({},ZH.color,{dflt:g2t.defaultLine}),width:VT({},ZH.width,{editType:"plot"}),dash:ZH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Vu.offsetgroup,alignmentgroup:Vu.alignmentgroup,zorder:Vu.zorder}});var KH=ye((Hlr,Dwe)=>{"use strict";Dwe.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 HT=ye((Glr,Rwe)=>{"use strict";Rwe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var $H=ye((jlr,Owe)=>{"use strict";var zwe=Mr(),m2t=Hb(),y2t=r0().handleText,_2t=K3(),x2t=Pg(),Fwe=YH(),b2t=va(),qwe=HT(),w2t=qwe.INCREASING.COLOR,T2t=qwe.DECREASING.COLOR,A2t="#4499FF";function JH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",b2t.defaultLine),e(t+".marker.line.width")}function S2t(e,t,r,n){function i(u,c){return zwe.coerce(e,t,Fwe,u,c)}var a=_2t(e,t,n,i);if(!a){t.visible=!1;return}x2t(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");var o=i("textposition");y2t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),t.texttemplate||i("textinfo")),JH(i,"increasing",w2t),JH(i,"decreasing",T2t),JH(i,"totals",A2t);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 M2t(e,t){var r,n;function i(o){return zwe.coerce(n._input,n,Fwe,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var E2t=Mr(),k2t=KH();Bwe.exports=function(e,t,r){var n=!1;function i(s,l){return E2t.coerce(e,t,k2t,s,l)}for(var a=0;a{"use strict";var Uwe=Qa(),Vwe=Dg(),Hwe=Mr().mergeArray,C2t=F0(),Gwe=es().BADNUM;function QH(e){return e==="a"||e==="absolute"}function eG(e){return e==="t"||e==="total"}jwe.exports=function(t,r){var n=Uwe.getFromId(t,r.xaxis||"x"),i=Uwe.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=Vwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=Vwe(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,x=!1,b=0;b{"use strict";var Zwe=Gb().setGroupPositions;Xwe.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 Kwe=xa(),D8=Mr(),L2t=ao(),GT=es().BADNUM,P2t=i2(),I2t=_v().clearMinTextSize;Jwe.exports=function(t,r,n,i){var a=t._fullLayout;I2t("waterfall",a),P2t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),D2t(t,r,n,i)};function D2t(e,t,r,n){var i=t.xaxis,a=t.yaxis;D8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=Kwe.select(this),l=o[0].trace,u=D8.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(D8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,x){if(!(x!==d-1&&!v.cNext)){var b=R2t(v,i,a,c),g=b[0],E=b[1],k="";g[0]!==GT&&E[0]!==GT&&g[1]!==GT&&E[1]!==GT&&(f==="spanning"&&!v.isSum&&x>0&&(c?k+="M"+g[0]+","+E[1]+"V"+E[0]:k+="M"+g[1]+","+E[0]+"H"+g[0]),f!=="between"&&(v.isSum||x{"use strict";var R8=xa(),Qwe=ao(),e3e=va(),z2t=N1().DESELECTDIM,F2t=N0(),q2t=_v().resizeText,O2t=F2t.styleTextPoints;function B2t(e,t,r){var n=r||R8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");q2t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=R8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;R8.select(this).call(e3e.fill,l.color).call(e3e.stroke,l.line.color).call(Qwe.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?z2t:1)}}),O2t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;Qwe.lineGroupStyle(R8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}t3e.exports={style:B2t}});var s3e=ye((Jlr,o3e)=>{"use strict";var N2t=Qa().hoverLabelText,i3e=va().opacity,U2t=TT().hoverOnBars,n3e=HT(),a3e={increasing:n3e.INCREASING.SYMBOL,decreasing:n3e.DECREASING.SYMBOL};o3e.exports=function(t,r,n,i,a){var o=U2t(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(_){return N2t(f,_,l[c+"hoverformat"])}var d=o.index,v=s[d],x=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-x,o.delta=x,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=x<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var g=v.hi||l.hoverinfo,E=[];if(g&&g!=="none"&&g!=="skip"){var k=g==="all",A=g.split("+"),L=function(_){return k||A.indexOf(_)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&E.push(o.finalLabel),L("delta")&&(x<0?E.push(o.deltaLabel+" "+a3e.decreasing):E.push(o.deltaLabel+" "+a3e.increasing)),L("initial")&&E.push("Initial: "+o.initialLabel))}return E.length&&(o.extraText=E.join("
")),o.color=V2t(l,v),[o]};function V2t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(i3e(n))return n;if(i3e(i)&&a)return i}});var u3e=ye(($lr,l3e)=>{"use strict";l3e.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 f3e=ye((Qlr,c3e)=>{"use strict";c3e.exports={attributes:YH(),layoutAttributes:KH(),supplyDefaults:$H().supplyDefaults,crossTraceDefaults:$H().crossTraceDefaults,supplyLayoutDefaults:Nwe(),calc:Wwe(),crossTraceCalc:Ywe(),plot:$we(),style:r3e().style,hoverPoints:s3e(),eventData:u3e(),selectPoints:AT(),moduleType:"trace",name:"waterfall",basePlotModule:Jf(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var d3e=ye((eur,h3e)=>{"use strict";h3e.exports=f3e()});var jT=ye((tur,v3e)=>{"use strict";v3e.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 tG=ye((rur,g3e)=>{"use strict";var H2t=vl(),G2t=Uc().zorder,j2t=Wo().hovertemplateAttrs,p3e=no().extendFlat,W2t=jT().colormodel,R4=["rgb","rgba","rgba256","hsl","hsla"],Z2t=[],X2t=[];for(WT=0;WT{"use strict";var Y2t=Mr(),K2t=tG(),m3e=jT(),J2t=Ly().IMAGE_URL_PREFIX;y3e.exports=function(t,r){function n(o,s){return Y2t.coerce(t,r,K2t,o,s)}n("source"),r.source&&!r.source.match(J2t)&&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=m3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=m3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),r._length=null,n("zorder")}});var Uy=ye((nur,rG)=>{typeof Object.create=="function"?rG.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:rG.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 iG=ye((aur,x3e)=>{x3e.exports=vb().EventEmitter});var T3e=ye(z8=>{"use strict";z8.byteLength=Q2t;z8.toByteArray=twt;z8.fromByteArray=nwt;var Fm=[],Z0=[],$2t=typeof Uint8Array!="undefined"?Uint8Array:Array,nG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s2=0,b3e=nG.length;s20)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 Q2t(e){var t=w3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function ewt(e,t,r){return(t+r)*3/4-r}function twt(e){var t,r=w3e(e),n=r[0],i=r[1],a=new $2t(ewt(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=Z0[e.charCodeAt(l)]<<2|Z0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Z0[e.charCodeAt(l)]<<10|Z0[e.charCodeAt(l+1)]<<4|Z0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function rwt(e){return Fm[e>>18&63]+Fm[e>>12&63]+Fm[e>>6&63]+Fm[e&63]}function iwt(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Fm[t>>2]+Fm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Fm[t>>10]+Fm[t>>4&63]+Fm[t<<2&63]+"=")),i.join("")}});var A3e=ye(aG=>{aG.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)};aG.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,x=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]|=x*128}});var u2=ye(KT=>{"use strict";var oG=T3e(),XT=A3e(),S3e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;KT.Buffer=In;KT.SlowBuffer=cwt;KT.INSPECT_MAX_BYTES=50;var F8=2147483647;KT.kMaxLength=F8;In.TYPED_ARRAY_SUPPORT=awt();!In.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 awt(){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(In.prototype,"parent",{enumerable:!0,get:function(){if(In.isBuffer(this))return this.buffer}});Object.defineProperty(In.prototype,"offset",{enumerable:!0,get:function(){if(In.isBuffer(this))return this.byteOffset}});function Vy(e){if(e>F8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,In.prototype),t}function In(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 cG(e)}return C3e(e,t,r)}In.poolSize=8192;function C3e(e,t,r){if(typeof e=="string")return swt(e,t);if(ArrayBuffer.isView(e))return lwt(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 lG(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 In.from(n,t,r);let i=uwt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return In.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)}In.from=function(e,t,r){return C3e(e,t,r)};Object.setPrototypeOf(In.prototype,Uint8Array.prototype);Object.setPrototypeOf(In,Uint8Array);function L3e(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 owt(e,t,r){return L3e(e),e<=0?Vy(e):t!==void 0?typeof r=="string"?Vy(e).fill(t,r):Vy(e).fill(t):Vy(e)}In.alloc=function(e,t,r){return owt(e,t,r)};function cG(e){return L3e(e),Vy(e<0?0:fG(e)|0)}In.allocUnsafe=function(e){return cG(e)};In.allocUnsafeSlow=function(e){return cG(e)};function swt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!In.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=P3e(e,t)|0,n=Vy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function sG(e){let t=e.length<0?0:fG(e.length)|0,r=Vy(t);for(let n=0;n=F8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+F8.toString(16)+" bytes");return e|0}function cwt(e){return+e!=e&&(e=0),In.alloc(+e)}In.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==In.prototype};In.compare=function(t,r){if(qm(t,Uint8Array)&&(t=In.from(t,t.offset,t.byteLength)),qm(r,Uint8Array)&&(r=In.from(r,r.offset,r.byteLength)),!In.isBuffer(t)||!In.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?(In.isBuffer(o)||(o=In.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(In.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function P3e(e,t){if(In.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 uG(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return N3e(e).length;default:if(i)return n?-1:uG(e).length;t=(""+t).toLowerCase(),i=!0}}In.byteLength=P3e;function fwt(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 bwt(this,t,r);case"utf8":case"utf-8":return D3e(this,t,r);case"ascii":return _wt(this,t,r);case"latin1":case"binary":return xwt(this,t,r);case"base64":return mwt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wwt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}In.prototype._isBuffer=!0;function l2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}In.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+=" ... "),""};S3e&&(In.prototype[S3e]=In.prototype.inspect);In.prototype.compare=function(t,r,n,i,a){if(qm(t,Uint8Array)&&(t=In.from(t,t.offset,t.byteLength)),!In.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,dG(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=In.from(t,n)),In.isBuffer(t))return t.length===0?-1:M3e(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):M3e(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M3e(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 hwt(this,t,r,n);case"utf8":case"utf-8":return dwt(this,t,r,n);case"ascii":case"latin1":case"binary":return vwt(this,t,r,n);case"base64":return pwt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gwt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};In.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function mwt(e,t,r){return t===0&&r===e.length?oG.fromByteArray(e):oG.fromByteArray(e.slice(t,r))}function D3e(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 ywt(n)}var E3e=4096;function ywt(e){let t=e.length;if(t<=E3e)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")}In.prototype.readUintLE=In.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||$d(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||$d(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};In.prototype.readUint8=In.prototype.readUInt8=function(t,r){return t=t>>>0,r||$d(t,1,this.length),this[t]};In.prototype.readUint16LE=In.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||$d(t,2,this.length),this[t]|this[t+1]<<8};In.prototype.readUint16BE=In.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||$d(t,2,this.length),this[t]<<8|this[t+1]};In.prototype.readUint32LE=In.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};In.prototype.readUint32BE=In.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};In.prototype.readBigUInt64LE=P_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(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||$d(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};In.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||$d(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};In.prototype.readInt8=function(t,r){return t=t>>>0,r||$d(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};In.prototype.readInt16LE=function(t,r){t=t>>>0,r||$d(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};In.prototype.readInt16BE=function(t,r){t=t>>>0,r||$d(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};In.prototype.readInt32LE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};In.prototype.readInt32BE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};In.prototype.readBigInt64LE=P_(function(t){t=t>>>0,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(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,YT(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&z4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||$d(t,4,this.length),XT.read(this,t,!0,23,4)};In.prototype.readFloatBE=function(t,r){return t=t>>>0,r||$d(t,4,this.length),XT.read(this,t,!1,23,4)};In.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||$d(t,8,this.length),XT.read(this,t,!0,52,8)};In.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||$d(t,8,this.length),XT.read(this,t,!1,52,8)};function Dp(e,t,r,n,i,a){if(!In.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}In.prototype.writeUintLE=In.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;Dp(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;Dp(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};In.prototype.writeUint8=In.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,1,255,0),this[r]=t&255,r+1};In.prototype.writeUint16LE=In.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};In.prototype.writeUint16BE=In.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};In.prototype.writeUint32LE=In.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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};In.prototype.writeUint32BE=In.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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 R3e(e,t,r,n,i){B3e(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 z3e(e,t,r,n,i){B3e(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}In.prototype.writeBigUInt64LE=P_(function(t,r=0){return R3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});In.prototype.writeBigUInt64BE=P_(function(t,r=0){return z3e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});In.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Dp(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};In.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Dp(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};In.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};In.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};In.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};In.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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};In.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Dp(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};In.prototype.writeBigInt64LE=P_(function(t,r=0){return R3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});In.prototype.writeBigInt64BE=P_(function(t,r=0){return z3e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F3e(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 q3e(e,t,r,n,i){return t=+t,r=r>>>0,i||F3e(e,t,r,4,34028234663852886e22,-34028234663852886e22),XT.write(e,t,r,n,23,4),r+4}In.prototype.writeFloatLE=function(t,r,n){return q3e(this,t,r,!0,n)};In.prototype.writeFloatBE=function(t,r,n){return q3e(this,t,r,!1,n)};function O3e(e,t,r,n,i){return t=+t,r=r>>>0,i||F3e(e,t,r,8,17976931348623157e292,-17976931348623157e292),XT.write(e,t,r,n,52,8),r+8}In.prototype.writeDoubleLE=function(t,r,n){return O3e(this,t,r,!0,n)};In.prototype.writeDoubleBE=function(t,r,n){return O3e(this,t,r,!1,n)};In.prototype.copy=function(t,r,n,i){if(!In.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=k3e(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=k3e(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function k3e(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 Twt(e,t,r){YT(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&z4(t,e.length-(r+1))}function B3e(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 ZT.ERR_OUT_OF_RANGE("value",s,e)}Twt(n,i,a)}function YT(e,t){if(typeof e!="number")throw new ZT.ERR_INVALID_ARG_TYPE(t,"number",e)}function z4(e,t,r){throw Math.floor(e)!==e?(YT(e,r),new ZT.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new ZT.ERR_BUFFER_OUT_OF_BOUNDS:new ZT.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Awt=/[^+/0-9A-Za-z-_]/g;function Swt(e){if(e=e.split("=")[0],e=e.trim().replace(Awt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function uG(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 Mwt(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function N3e(e){return oG.toByteArray(Swt(e))}function q8(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 dG(e){return e!==e}var kwt=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"?Cwt:e}function Cwt(){throw new Error("BigInt not supported")}});var O8=ye((cur,U3e)=>{"use strict";U3e.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(r 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 a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var F4=ye((fur,V3e)=>{"use strict";var Lwt=O8();V3e.exports=function(){return Lwt()&&!!Symbol.toStringTag}});var G3e=ye((hur,H3e)=>{"use strict";H3e.exports=Error});var W3e=ye((dur,j3e)=>{"use strict";j3e.exports=EvalError});var X3e=ye((vur,Z3e)=>{"use strict";Z3e.exports=RangeError});var K3e=ye((pur,Y3e)=>{"use strict";Y3e.exports=ReferenceError});var vG=ye((gur,J3e)=>{"use strict";J3e.exports=SyntaxError});var q4=ye((mur,$3e)=>{"use strict";$3e.exports=TypeError});var eTe=ye((yur,Q3e)=>{"use strict";Q3e.exports=URIError});var iTe=ye((_ur,rTe)=>{"use strict";var tTe=typeof Symbol!="undefined"&&Symbol,Pwt=O8();rTe.exports=function(){return typeof tTe!="function"||typeof Symbol!="function"||typeof tTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Pwt()}});var oTe=ye((xur,aTe)=>{"use strict";var nTe={foo:{}},Iwt=Object;aTe.exports=function(){return{__proto__:nTe}.foo===nTe.foo&&!({__proto__:null}instanceof Iwt)}});var uTe=ye((bur,lTe)=>{"use strict";var Dwt="Function.prototype.bind called on incompatible ",Rwt=Object.prototype.toString,zwt=Math.max,Fwt="[object Function]",sTe=function(t,r){for(var n=[],i=0;i{"use strict";var Bwt=uTe();cTe.exports=Function.prototype.bind||Bwt});var hTe=ye((Tur,fTe)=>{"use strict";var Nwt=Function.prototype.call,Uwt=Object.prototype.hasOwnProperty,Vwt=B8();fTe.exports=Vwt.call(Nwt,Uwt)});var t5=ye((Aur,mTe)=>{"use strict";var Gl,Hwt=G3e(),Gwt=W3e(),jwt=X3e(),Wwt=K3e(),e5=vG(),QT=q4(),Zwt=eTe(),gTe=Function,pG=function(e){try{return gTe('"use strict"; return ('+e+").constructor;")()}catch(t){}},c2=Object.getOwnPropertyDescriptor;if(c2)try{c2({},"")}catch(e){c2=null}var gG=function(){throw new QT},Xwt=c2?function(){try{return arguments.callee,gG}catch(e){try{return c2(arguments,"callee").get}catch(t){return gG}}}():gG,JT=iTe()(),Ywt=oTe()(),Qd=Object.getPrototypeOf||(Ywt?function(e){return e.__proto__}:null),$T={},Kwt=typeof Uint8Array=="undefined"||!Qd?Gl:Qd(Uint8Array),f2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Gl:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Gl:ArrayBuffer,"%ArrayIteratorPrototype%":JT&&Qd?Qd([][Symbol.iterator]()):Gl,"%AsyncFromSyncIteratorPrototype%":Gl,"%AsyncFunction%":$T,"%AsyncGenerator%":$T,"%AsyncGeneratorFunction%":$T,"%AsyncIteratorPrototype%":$T,"%Atomics%":typeof Atomics=="undefined"?Gl:Atomics,"%BigInt%":typeof BigInt=="undefined"?Gl:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Gl:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Gl:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Gl:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Hwt,"%eval%":eval,"%EvalError%":Gwt,"%Float32Array%":typeof Float32Array=="undefined"?Gl:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Gl:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Gl:FinalizationRegistry,"%Function%":gTe,"%GeneratorFunction%":$T,"%Int8Array%":typeof Int8Array=="undefined"?Gl:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Gl:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Gl:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":JT&&Qd?Qd(Qd([][Symbol.iterator]())):Gl,"%JSON%":typeof JSON=="object"?JSON:Gl,"%Map%":typeof Map=="undefined"?Gl:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!JT||!Qd?Gl:Qd(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Gl:Promise,"%Proxy%":typeof Proxy=="undefined"?Gl:Proxy,"%RangeError%":jwt,"%ReferenceError%":Wwt,"%Reflect%":typeof Reflect=="undefined"?Gl:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Gl:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!JT||!Qd?Gl:Qd(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Gl:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":JT&&Qd?Qd(""[Symbol.iterator]()):Gl,"%Symbol%":JT?Symbol:Gl,"%SyntaxError%":e5,"%ThrowTypeError%":Xwt,"%TypedArray%":Kwt,"%TypeError%":QT,"%Uint8Array%":typeof Uint8Array=="undefined"?Gl:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Gl:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Gl:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Gl:Uint32Array,"%URIError%":Zwt,"%WeakMap%":typeof WeakMap=="undefined"?Gl:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Gl:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Gl:WeakSet};if(Qd)try{null.error}catch(e){dTe=Qd(Qd(e)),f2["%Error.prototype%"]=dTe}var dTe,Jwt=function e(t){var r;if(t==="%AsyncFunction%")r=pG("async function () {}");else if(t==="%GeneratorFunction%")r=pG("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=pG("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Qd&&(r=Qd(i.prototype))}return f2[t]=r,r},vTe={__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"]},O4=B8(),N8=hTe(),$wt=O4.call(Function.call,Array.prototype.concat),Qwt=O4.call(Function.apply,Array.prototype.splice),pTe=O4.call(Function.call,String.prototype.replace),U8=O4.call(Function.call,String.prototype.slice),e3t=O4.call(Function.call,RegExp.prototype.exec),t3t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,r3t=/\\(\\)?/g,i3t=function(t){var r=U8(t,0,1),n=U8(t,-1);if(r==="%"&&n!=="%")throw new e5("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new e5("invalid intrinsic syntax, expected opening `%`");var i=[];return pTe(t,t3t,function(a,o,s,l){i[i.length]=s?pTe(l,r3t,"$1"):o||a}),i},n3t=function(t,r){var n=t,i;if(N8(vTe,n)&&(i=vTe[n],n="%"+i[0]+"%"),N8(f2,n)){var a=f2[n];if(a===$T&&(a=Jwt(n)),typeof a=="undefined"&&!r)throw new QT("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new e5("intrinsic "+t+" does not exist!")};mTe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new QT("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new QT('"allowMissing" argument must be a boolean');if(e3t(/^%?[^%]*%?$/,t)===null)throw new e5("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=i3t(t),i=n.length>0?n[0]:"",a=n3t("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],Qwt(n,$wt([0,1],u)));for(var c=1,f=!0;c=n.length){var x=c2(s,h);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[h]}else f=N8(s,h),s=s[h];f&&!l&&(f2[o]=s)}}return s}});var H8=ye((Sur,yTe)=>{"use strict";var a3t=t5(),V8=a3t("%Object.defineProperty%",!0)||!1;if(V8)try{V8({},"a",{value:1})}catch(e){V8=!1}yTe.exports=V8});var B4=ye((Mur,_Te)=>{"use strict";var o3t=t5(),G8=o3t("%Object.getOwnPropertyDescriptor%",!0);if(G8)try{G8([],"length")}catch(e){G8=null}_Te.exports=G8});var TTe=ye((Eur,wTe)=>{"use strict";var xTe=H8(),s3t=vG(),r5=q4(),bTe=B4();wTe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new r5("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new r5("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r5("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r5("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r5("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r5("`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=!!bTe&&bTe(t,r);if(xTe)xTe(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 s3t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var yG=ye((kur,STe)=>{"use strict";var mG=H8(),ATe=function(){return!!mG};ATe.hasArrayLengthDefineBug=function(){if(!mG)return null;try{return mG([],"length",{value:1}).length!==1}catch(t){return!0}};STe.exports=ATe});var LTe=ye((Cur,CTe)=>{"use strict";var l3t=t5(),MTe=TTe(),u3t=yG()(),ETe=B4(),kTe=q4(),c3t=l3t("%Math.floor%");CTe.exports=function(t,r){if(typeof t!="function")throw new kTe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||c3t(r)!==r)throw new kTe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&ETe){var o=ETe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(u3t?MTe(t,"length",r,!0,!0):MTe(t,"length",r)),t}});var N4=ye((Lur,j8)=>{"use strict";var _G=B8(),W8=t5(),f3t=LTe(),h3t=q4(),DTe=W8("%Function.prototype.apply%"),RTe=W8("%Function.prototype.call%"),zTe=W8("%Reflect.apply%",!0)||_G.call(RTe,DTe),PTe=H8(),d3t=W8("%Math.max%");j8.exports=function(t){if(typeof t!="function")throw new h3t("a function is required");var r=zTe(_G,RTe,arguments);return f3t(r,1+d3t(0,t.length-(arguments.length-1)),!0)};var ITe=function(){return zTe(_G,DTe,arguments)};PTe?PTe(j8.exports,"apply",{value:ITe}):j8.exports.apply=ITe});var i5=ye((Pur,OTe)=>{"use strict";var FTe=t5(),qTe=N4(),v3t=qTe(FTe("String.prototype.indexOf"));OTe.exports=function(t,r){var n=FTe(t,!!r);return typeof n=="function"&&v3t(t,".prototype.")>-1?qTe(n):n}});var UTe=ye((Iur,NTe)=>{"use strict";var p3t=F4()(),g3t=i5(),xG=g3t("Object.prototype.toString"),Z8=function(t){return p3t&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:xG(t)==="[object Arguments]"},BTe=function(t){return Z8(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&xG(t)!=="[object Array]"&&xG(t.callee)==="[object Function]"},m3t=function(){return Z8(arguments)}();Z8.isLegacyArguments=BTe;NTe.exports=m3t?Z8:BTe});var GTe=ye((Dur,HTe)=>{"use strict";var y3t=Object.prototype.toString,_3t=Function.prototype.toString,x3t=/^\s*(?:function)?\*/,VTe=F4()(),bG=Object.getPrototypeOf,b3t=function(){if(!VTe)return!1;try{return Function("return function*() {}")()}catch(e){}},wG;HTe.exports=function(t){if(typeof t!="function")return!1;if(x3t.test(_3t.call(t)))return!0;if(!VTe){var r=y3t.call(t);return r==="[object GeneratorFunction]"}if(!bG)return!1;if(typeof wG=="undefined"){var n=b3t();wG=n?bG(n):!1}return bG(t)===wG}});var XTe=ye((Rur,ZTe)=>{"use strict";var WTe=Function.prototype.toString,n5=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,AG,X8;if(typeof n5=="function"&&typeof Object.defineProperty=="function")try{AG=Object.defineProperty({},"length",{get:function(){throw X8}}),X8={},n5(function(){throw 42},null,AG)}catch(e){e!==X8&&(n5=null)}else n5=null;var w3t=/^\s*class\b/,SG=function(t){try{var r=WTe.call(t);return w3t.test(r)}catch(n){return!1}},TG=function(t){try{return SG(t)?!1:(WTe.call(t),!0)}catch(r){return!1}},Y8=Object.prototype.toString,T3t="[object Object]",A3t="[object Function]",S3t="[object GeneratorFunction]",M3t="[object HTMLAllCollection]",E3t="[object HTML document.all class]",k3t="[object HTMLCollection]",C3t=typeof Symbol=="function"&&!!Symbol.toStringTag,L3t=!(0 in[,]),MG=function(){return!1};typeof document=="object"&&(jTe=document.all,Y8.call(jTe)===Y8.call(document.all)&&(MG=function(t){if((L3t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=Y8.call(t);return(r===M3t||r===E3t||r===k3t||r===T3t)&&t("")==null}catch(n){}return!1}));var jTe;ZTe.exports=n5?function(t){if(MG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{n5(t,null,AG)}catch(r){if(r!==X8)return!1}return!SG(t)&&TG(t)}:function(t){if(MG(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(C3t)return TG(t);if(SG(t))return!1;var r=Y8.call(t);return r!==A3t&&r!==S3t&&!/^\[object HTML/.test(r)?!1:TG(t)}});var EG=ye((zur,KTe)=>{"use strict";var P3t=XTe(),I3t=Object.prototype.toString,YTe=Object.prototype.hasOwnProperty,D3t=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),I3t.call(t)==="[object Array]"?D3t(t,r,i):typeof t=="string"?R3t(t,r,i):z3t(t,r,i)};KTe.exports=F3t});var CG=ye((Fur,JTe)=>{"use strict";var kG=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],q3t=typeof globalThis=="undefined"?window:globalThis;JTe.exports=function(){for(var t=[],r=0;r{"use strict";var J8=EG(),O3t=CG(),$Te=N4(),IG=i5(),K8=B4(),B3t=IG("Object.prototype.toString"),e5e=F4()(),QTe=typeof globalThis=="undefined"?window:globalThis,PG=O3t(),DG=IG("String.prototype.slice"),LG=Object.getPrototypeOf,N3t=IG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:V3t(t)}return K8?U3t(t):null}});var l5e=ye((Our,s5e)=>{"use strict";var i5e=EG(),H3t=CG(),zG=i5(),G3t=zG("Object.prototype.toString"),n5e=F4()(),Q8=B4(),j3t=typeof globalThis=="undefined"?window:globalThis,a5e=H3t(),W3t=zG("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return Q8?X3t(t):!1}});var OG=ye(Ol=>{"use strict";var Y3t=UTe(),K3t=GTe(),Hg=r5e(),u5e=l5e();function a5(e){return e.call.bind(e)}var c5e=typeof BigInt!="undefined",f5e=typeof Symbol!="undefined",X0=a5(Object.prototype.toString),J3t=a5(Number.prototype.valueOf),$3t=a5(String.prototype.valueOf),Q3t=a5(Boolean.prototype.valueOf);c5e&&(h5e=a5(BigInt.prototype.valueOf));var h5e;f5e&&(d5e=a5(Symbol.prototype.valueOf));var d5e;function V4(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Ol.isArgumentsObject=Y3t;Ol.isGeneratorFunction=K3t;Ol.isTypedArray=u5e;function eTt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Ol.isPromise=eTt;function tTt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):u5e(e)||p5e(e)}Ol.isArrayBufferView=tTt;function rTt(e){return Hg(e)==="Uint8Array"}Ol.isUint8Array=rTt;function iTt(e){return Hg(e)==="Uint8ClampedArray"}Ol.isUint8ClampedArray=iTt;function nTt(e){return Hg(e)==="Uint16Array"}Ol.isUint16Array=nTt;function aTt(e){return Hg(e)==="Uint32Array"}Ol.isUint32Array=aTt;function oTt(e){return Hg(e)==="Int8Array"}Ol.isInt8Array=oTt;function sTt(e){return Hg(e)==="Int16Array"}Ol.isInt16Array=sTt;function lTt(e){return Hg(e)==="Int32Array"}Ol.isInt32Array=lTt;function uTt(e){return Hg(e)==="Float32Array"}Ol.isFloat32Array=uTt;function cTt(e){return Hg(e)==="Float64Array"}Ol.isFloat64Array=cTt;function fTt(e){return Hg(e)==="BigInt64Array"}Ol.isBigInt64Array=fTt;function hTt(e){return Hg(e)==="BigUint64Array"}Ol.isBigUint64Array=hTt;function eD(e){return X0(e)==="[object Map]"}eD.working=typeof Map!="undefined"&&eD(new Map);function dTt(e){return typeof Map=="undefined"?!1:eD.working?eD(e):e instanceof Map}Ol.isMap=dTt;function tD(e){return X0(e)==="[object Set]"}tD.working=typeof Set!="undefined"&&tD(new Set);function vTt(e){return typeof Set=="undefined"?!1:tD.working?tD(e):e instanceof Set}Ol.isSet=vTt;function rD(e){return X0(e)==="[object WeakMap]"}rD.working=typeof WeakMap!="undefined"&&rD(new WeakMap);function pTt(e){return typeof WeakMap=="undefined"?!1:rD.working?rD(e):e instanceof WeakMap}Ol.isWeakMap=pTt;function qG(e){return X0(e)==="[object WeakSet]"}qG.working=typeof WeakSet!="undefined"&&qG(new WeakSet);function gTt(e){return qG(e)}Ol.isWeakSet=gTt;function iD(e){return X0(e)==="[object ArrayBuffer]"}iD.working=typeof ArrayBuffer!="undefined"&&iD(new ArrayBuffer);function v5e(e){return typeof ArrayBuffer=="undefined"?!1:iD.working?iD(e):e instanceof ArrayBuffer}Ol.isArrayBuffer=v5e;function nD(e){return X0(e)==="[object DataView]"}nD.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&nD(new DataView(new ArrayBuffer(1),0,1));function p5e(e){return typeof DataView=="undefined"?!1:nD.working?nD(e):e instanceof DataView}Ol.isDataView=p5e;var FG=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function U4(e){return X0(e)==="[object SharedArrayBuffer]"}function g5e(e){return typeof FG=="undefined"?!1:(typeof U4.working=="undefined"&&(U4.working=U4(new FG)),U4.working?U4(e):e instanceof FG)}Ol.isSharedArrayBuffer=g5e;function mTt(e){return X0(e)==="[object AsyncFunction]"}Ol.isAsyncFunction=mTt;function yTt(e){return X0(e)==="[object Map Iterator]"}Ol.isMapIterator=yTt;function _Tt(e){return X0(e)==="[object Set Iterator]"}Ol.isSetIterator=_Tt;function xTt(e){return X0(e)==="[object Generator]"}Ol.isGeneratorObject=xTt;function bTt(e){return X0(e)==="[object WebAssembly.Module]"}Ol.isWebAssemblyCompiledModule=bTt;function m5e(e){return V4(e,J3t)}Ol.isNumberObject=m5e;function y5e(e){return V4(e,$3t)}Ol.isStringObject=y5e;function _5e(e){return V4(e,Q3t)}Ol.isBooleanObject=_5e;function x5e(e){return c5e&&V4(e,h5e)}Ol.isBigIntObject=x5e;function b5e(e){return f5e&&V4(e,d5e)}Ol.isSymbolObject=b5e;function wTt(e){return m5e(e)||y5e(e)||_5e(e)||x5e(e)||b5e(e)}Ol.isBoxedPrimitive=wTt;function TTt(e){return typeof Uint8Array!="undefined"&&(v5e(e)||g5e(e))}Ol.isAnyArrayBuffer=TTt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Ol,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var BG=ye((Nur,w5e)=>{w5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var jG=ye(Bl=>{var T5e=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]),HG(t)?r.showHidden=t:t&&Bl._extend(r,t),d2(r.showHidden)&&(r.showHidden=!1),d2(r.depth)&&(r.depth=2),d2(r.colors)&&(r.colors=!1),d2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=STt),lD(r,e,r.depth)}Bl.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 STt(e,t){var r=I_.styles[t];return r?"\x1B["+I_.colors[r][0]+"m"+e+"\x1B["+I_.colors[r][1]+"m":e}function MTt(e,t){return e}function ETt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function lD(e,t,r){if(e.customInspect&&t&&sD(t.inspect)&&t.inspect!==Bl.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return fD(n)||(n=lD(e,n,r)),n}var i=kTt(e,t);if(i)return i;var a=Object.keys(t),o=ETt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),G4(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return NG(t);if(a.length===0){if(sD(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(H4(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(uD(t))return e.stylize(Date.prototype.toString.call(t),"date");if(G4(t))return NG(t)}var l="",u=!1,c=["{","}"];if(S5e(t)&&(u=!0,c=["[","]"]),sD(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(H4(t)&&(l=" "+RegExp.prototype.toString.call(t)),uD(t)&&(l=" "+Date.prototype.toUTCString.call(t)),G4(t)&&(l=" "+NG(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return H4(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=CTt(e,t,r,o,a):h=a.map(function(d){return VG(e,t,r,o,d,u)}),e.seen.pop(),LTt(h,l,c)}function kTt(e,t){if(d2(t))return e.stylize("undefined","undefined");if(fD(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(M5e(t))return e.stylize(""+t,"number");if(HG(t))return e.stylize(""+t,"boolean");if(cD(t))return e.stylize("null","null")}function NG(e){return"["+Error.prototype.toString.call(e)+"]"}function CTt(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=` @@ -51,7 +51,7 @@ `),` `)}f>3&&(o=` `.concat(Gg,"...").concat(xv).concat(o),s=!0),n!==""&&(o=` - `.concat(n).concat(o),n="");var k=0,S=w2[r]+` + `.concat(n).concat(o),n="");var k=0,A=w2[r]+` `.concat(rE,"+ actual").concat(xv," ").concat(iE,"- expected").concat(xv),L=" ".concat(Gg,"...").concat(xv," Lines skipped");for(f=0;f1&&f>2&&(_>4?(i+=` `.concat(Gg,"...").concat(xv),s=!0):_>3&&(i+=` `.concat(c[f-2]),k++),i+=` @@ -66,10 +66,10 @@ `.concat(u[f-1]),k++),a=f,i+=` `.concat(rE,"+").concat(xv," ").concat(M),n+=` `.concat(iE,"-").concat(xv," ").concat(C),k+=2):(i+=n,n="",(_===1||f===0)&&(i+=` - `.concat(M),k++))}if(k>20&&f20&&f30)for(d[26]="".concat(Gg,"...").concat(xv);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,` @@ -95,10 +95,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `).concat(WD(e),` `));var s=new U_({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw s.generatedMessage=o,s}}sf.match=function e(t,r,n){mMe(t,r,n,e,"match")};sf.doesNotMatch=function e(t,r,n){mMe(t,r,n,e,"doesNotMatch")};function yMe(){for(var e=arguments.length,t=new Array(e),r=0;r{var vE=1e3,pE=vE*60,gE=pE*60,mE=gE*24,zMt=mE*365.25;xMe.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return FMt(e);if(r==="number"&&isNaN(e)===!1)return t.long?OMt(e):qMt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function FMt(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*zMt;case"days":case"day":case"d":return r*mE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*gE;case"minutes":case"minute":case"mins":case"min":case"m":return r*pE;case"seconds":case"second":case"secs":case"sec":case"s":return r*vE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function qMt(e){return e>=mE?Math.round(e/mE)+"d":e>=gE?Math.round(e/gE)+"h":e>=pE?Math.round(e/pE)+"m":e>=vE?Math.round(e/vE)+"s":e+"ms"}function OMt(e){return JD(e,mE,"day")||JD(e,gE,"hour")||JD(e,pE,"minute")||JD(e,vE,"second")||e+" ms"}function JD(e,t,r){if(!(e{$u=wMe.exports=jj.debug=jj.default=jj;$u.coerce=HMt;$u.disable=UMt;$u.enable=NMt;$u.enabled=VMt;$u.humanize=bMe();$u.names=[];$u.skips=[];$u.formatters={};var Gj;function BMt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return $u.colors[Math.abs(t)%$u.colors.length]}function jj(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(Gj||n);r.diff=i,r.prev=Gj,r.curr=n,Gj=n;for(var a=new Array(arguments.length),o=0;o{lp=SMe.exports=TMe();lp.log=WMt;lp.formatArgs=jMt;lp.save=ZMt;lp.load=AMe;lp.useColors=GMt;lp.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:XMt();lp.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function GMt(){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 jMt(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 WMt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ZMt(e){try{e==null?lp.storage.removeItem("debug"):lp.storage.debug=e}catch(t){}}function AMe(){var e;try{e=lp.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}lp.enable(AMe());function XMt(){try{return window.localStorage}catch(e){}}});var RMe=ye((Scr,DMe)=>{var p5=tE(),V_=MMe()("stream-parser");DMe.exports=KMt;var kMe=-1,$D=0,YMt=1,CMe=2;function KMt(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=JMt,e._skipBytes=$Mt,t&&(e._passthrough=QMt),t?e._transform=t4t:e._write=e4t}function yE(e){V_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=kMe,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function JMt(e,t){p5(!this._parserCallback,'there is already a "callback" set!'),p5(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||yE(this),V_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=$D}function $Mt(e,t){p5(!this._parserCallback,'there is already a "callback" set!'),p5(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||yE(this),V_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=YMt}function QMt(e,t){p5(!this._parserCallback,'There is already a "callback" set!'),p5(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||yE(this),V_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=CMe}function e4t(e,t,r){this._parserInit||yE(this),V_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),PMe(this,e,null,r)}function t4t(e,t,r){this._parserInit||yE(this),V_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),PMe(this,e,t,r)}function LMe(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return EMe(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return EMe(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return LMe(e,t.slice(i.length),r,n)}})}}function EMe(e,t,r,n){if(e._parserBytesLeft-=t.length,V_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===$D?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===CMe&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===$D&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==$D&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=kMe,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(IMe(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var PMe=IMe(LMe);function IMe(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var Eu=ye(Gy=>{"use strict";var zMe=EAe().Transform,r4t=RMe();function _E(){zMe.call(this,{readableObjectMode:!0})}_E.prototype=Object.create(zMe.prototype);_E.prototype.constructor=_E;r4t(_E.prototype);Gy.ParserStream=_E;Gy.sliceEq=function(e,t,r){for(var n=t,i=0;i{"use strict";var g5=Eu().readUInt16BE,Zj=Eu().readUInt32BE;function xE(e,t){if(e.length<4+t)return null;var r=Zj(e,t);return e.length>4&15,n=e[4]&15,i=e[5]>>4&15,a=g5(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}eR.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(s4t(e,t),!!t.sizes.length){var r=l4t(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 tR(e,t){var r=new Error(e);return r.code=t,r}function u4t(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 tR("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 tR("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 tR("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 tR("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)})};Xj.exports.ExifParser=jy;Xj.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 OMe=ye((Ccr,qMe)=>{"use strict";var c4t=Eu().str2arr,f4t=Eu().sliceEq,h4t=Eu().readUInt32BE,iR=FMe(),d4t=rR(),v4t=c4t("ftyp");qMe.exports=function(e){if(f4t(e,4,v4t)){var t=iR.unbox(e,0);if(t){var r=iR.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=iR.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=iR.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=h4t(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=d4t.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var UMe=ye((Lcr,NMe)=>{"use strict";var p4t=Eu().str2arr,g4t=Eu().sliceEq,BMe=Eu().readUInt16LE,m4t=p4t("BM");NMe.exports=function(e){if(!(e.length<26)&&g4t(e,0,m4t))return{width:BMe(e,18),height:BMe(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var WMe=ye((Pcr,jMe)=>{"use strict";var GMe=Eu().str2arr,VMe=Eu().sliceEq,HMe=Eu().readUInt16LE,y4t=GMe("GIF87a"),_4t=GMe("GIF89a");jMe.exports=function(e){if(!(e.length<10)&&!(!VMe(e,0,y4t)&&!VMe(e,0,_4t)))return{width:HMe(e,6),height:HMe(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var YMe=ye((Icr,XMe)=>{"use strict";var Yj=Eu().readUInt16LE,x4t=0,b4t=1,ZMe=16;XMe.exports=function(e){var t=Yj(e,0),r=Yj(e,2),n=Yj(e,4);if(!(t!==x4t||r!==b4t||!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 JMe=ye((Dcr,KMe)=>{"use strict";var Kj=Eu().readUInt16BE,w4t=Eu().str2arr,T4t=Eu().sliceEq,A4t=rR(),S4t=w4t("Exif\0\0");KMe.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=Kj(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&T4t(e,t,S4t)&&(i=A4t.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 r4e=ye((Rcr,t4e)=>{"use strict";var e4e=Eu().str2arr,$Me=Eu().sliceEq,QMe=Eu().readUInt32BE,M4t=e4e(`\x89PNG\r  -`),E4t=e4e("IHDR");t4e.exports=function(e){if(!(e.length<24)&&$Me(e,0,M4t)&&$Me(e,12,E4t))return{width:QMe(e,16),height:QMe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var a4e=ye((zcr,n4e)=>{"use strict";var k4t=Eu().str2arr,C4t=Eu().sliceEq,i4e=Eu().readUInt32BE,L4t=k4t("8BPS\0");n4e.exports=function(e){if(!(e.length<22)&&C4t(e,0,L4t))return{width:i4e(e,18),height:i4e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var l4e=ye((Fcr,s4e)=>{"use strict";function P4t(e){return e===32||e===9||e===13||e===10}function m5(e){return typeof e=="number"&&isFinite(e)&&e>0}function I4t(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,R4t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,z4t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,F4t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,q4t=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,o4e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function O4t(e){var t=e.match(z4t),r=e.match(F4t),n=e.match(q4t);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Nm(e){return o4e.test(e)?e.match(o4e)[0]:"px"}s4e.exports=function(e){if(I4t(e)){for(var t="",r=0;r{"use strict";var f4e=Eu().str2arr,u4e=Eu().sliceEq,B4t=Eu().readUInt16LE,N4t=Eu().readUInt16BE,U4t=Eu().readUInt32LE,V4t=Eu().readUInt32BE,H4t=f4e("II*\0"),G4t=f4e("MM\0*");function nR(e,t,r){return r?N4t(e,t):B4t(e,t)}function Jj(e,t,r){return r?V4t(e,t):U4t(e,t)}function c4e(e,t,r){var n=nR(e,t+2,r),i=Jj(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?nR(e,t+8,r):Jj(e,t+8,r)}h4e.exports=function(e){if(!(e.length<8)&&!(!u4e(e,0,H4t)&&!u4e(e,0,G4t))){var t=e[0]===77,r=Jj(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=nR(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var g4e=Eu().str2arr,v4e=Eu().sliceEq,p4e=Eu().readUInt16LE,$j=Eu().readUInt32LE,j4t=rR(),W4t=g4e("RIFF"),Z4t=g4e("WEBP");function X4t(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:p4e(e,t+6)&16383,height:p4e(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function Y4t(e,t){if(e[t]===47){var r=$j(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function K4t(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||X4t(e,t+8):a==="VP8L"&&o>=9?r=r||Y4t(e,t+8):a==="VP8X"&&o>=10?r=r||K4t(e,t+8):a==="EXIF"&&(n=j4t.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 x4e=ye((Bcr,_4e)=>{"use strict";_4e.exports={avif:OMe(),bmp:UMe(),gif:WMe(),ico:YMe(),jpeg:JMe(),png:r4e(),psd:a4e(),svg:l4e(),tiff:d4e(),webp:y4e()}});var b4e=ye((Ncr,eW)=>{"use strict";var Qj=x4e();function J4t(e){for(var t=Object.keys(Qj),r=0;r{"use strict";var $4t=b4e(),Q4t=Ly().IMAGE_URL_PREFIX,eEt=u2().Buffer;w4e.getImageSize=function(e){var t=e.replace(Q4t,""),r=new eEt(t,"base64");return $4t(r)}});var M4e=ye((Vcr,S4e)=>{"use strict";var A4e=Mr(),tEt=jT(),rEt=uo(),aR=Qa(),iEt=Mr().maxRowLength,nEt=T4e().getImageSize;S4e.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=iEt(r.z);else if(r._hasSource){var a=nEt(r.source);n=a.height,i=a.width}var o=aR.getFromId(t,r.xaxis||"x"),s=aR.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 lEt=xa(),T2=Mr(),E4e=T2.strTranslate,uEt=Zp(),cEt=jT(),fEt=jV(),hEt=a8().STYLE;k4e.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&fEt();T2.makeTraceGroups(i,n,"im").each(function(l){var u=lEt.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,x=c.y0,b=c.w,g=c.h,E=f.dx,k=f.dy,S,L,_,C,M,p;for(p=0;S===void 0&&p0;)L=a.c2p(v+p*E),p--;for(p=0;C===void 0&&p0;)M=o.c2p(x+p*k),p--;if(LW[0];if(re||ae){var _e=S+T/2,Me=C+F/2;G+="transform:"+E4e(_e+"px",Me+"px")+"scale("+(re?-1:1)+","+(ae?-1:1)+")"+E4e(-_e+"px",-Me+"px")+";"}}X.attr("style",G);var ke=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===g&&f._canvas.source===f.source)ge();else{var ie=document.createElement("canvas");ie.width=b,ie.height=g;var Te=ie.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var Ee=f._image;Ee.onload=function(){Te.drawImage(Ee,0,0),f._canvas={el:ie,source:f.source},ge()},Ee.setAttribute("src",f.source)}}).then(function(){var ge,ie;if(f._hasZ)ie=H(function(Ae,ze){var Ce=d[ze][Ae];return T2.isTypedArray(Ce)&&(Ce=Array.from(Ce)),Ce}),ge=ie.toDataURL("image/png");else if(f._hasSource)if(h)ge=f.source;else{var Te=f._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=Te.getImageData(0,0,b,g).data;ie=H(function(Ae,ze){var Ce=4*(ze*b+Ae);return[Ee[Ce],Ee[Ce+1],Ee[Ce+2],Ee[Ce+3]]}),ge=ie.toDataURL("image/png")}X.attr({"xlink:href":ge,height:F,width:T,x:S,y:C})});t._promises.push(ke)})}});var P4e=ye((Gcr,L4e)=>{"use strict";var dEt=xa();L4e.exports=function(t){dEt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var z4e=ye((jcr,R4e)=>{"use strict";var I4e=Nc(),D4e=Mr(),oR=D4e.isArrayOrTypedArray,vEt=jT();R4e.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(I4e.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||I4e.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=vEt.colormodel[a.colormodel],x=v.colormodel||a.colormodel,b=x.length,g=a._scaler(c),E=v.suffix,k=[];(a.hovertemplate||h)&&(k.push("["+[g[0]+E[0],g[1]+E[1],g[2]+E[2]].join(", ")),b===4&&k.push(", "+g[3]+E[3]),k.push("]"),k=k.join(""),t.extraText=x.toUpperCase()+": "+k);var S;oR(a.hovertext)&&oR(a.hovertext[u])?S=a.hovertext[u][l]:oR(a.text)&&oR(a.text[u])&&(S=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),_=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,M="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[D4e.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:g,xVal:_,xLabelVal:_,yVal:C,yLabelVal:C,zLabelVal:M,text:S,hovertemplateLabels:{zLabel:M,colorLabel:k,"color[0]Label":g[0]+E[0],"color[1]Label":g[1]+E[1],"color[2]Label":g[2]+E[2],"color[3]Label":g[3]+E[3]}})]}}}});var q4e=ye((Wcr,F4e)=>{"use strict";F4e.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 B4e=ye((Zcr,O4e)=>{"use strict";O4e.exports={attributes:tG(),supplyDefaults:_3e(),calc:M4e(),plot:C4e(),style:P4e(),hoverPoints:z4e(),eventData:q4e(),moduleType:"trace",name:"image",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var U4e=ye((Xcr,N4e)=>{"use strict";N4e.exports=B4e()});var A2=ye((Ycr,V4e)=>{"use strict";var pEt=vl(),gEt=Ju().attributes,mEt=Su(),yEt=dh(),_Et=Wo().hovertemplateAttrs,xEt=Wo().texttemplateAttrs,bE=no().extendFlat,bEt=Ed().pattern,sR=mEt({editType:"plot",arrayOk:!0,colorEditType:"plot"});V4e.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:yEt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:bEt,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:bE({},pEt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:_Et({},{keys:["label","color","value","percent","text"]}),texttemplate:xEt({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:bE({},sR,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:bE({},sR,{}),outsidetextfont:bE({},sR,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:bE({},sR,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:gEt({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 S2=ye((Kcr,j4e)=>{"use strict";var wEt=uo(),wE=Mr(),TEt=A2(),AEt=Ju().defaults,SEt=r0().handleText,MEt=Mr().coercePattern;function H4e(e,t){var r=wE.isArrayOrTypedArray(e),n=wE.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 G4e(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");MEt(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 EEt(e,t,r,n){function i(E,k){return wE.coerce(e,t,TEt,E,k)}var a=i("labels"),o=i("values"),s=H4e(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,G4e(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate"),f;if(c||(f=i("textinfo",wE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||f&&f!=="none"){var h=i("textposition");SEt(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");AEt(t,n,i);var x=i("hole"),b=i("title.text");if(b){var g=i("title.position",x?"middle center":"top center");!x&&g==="middle center"&&(t.title.position="top center"),wE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}j4e.exports={handleLabelsAndValues:H4e,handleMarkerDefaults:G4e,supplyDefaults:EEt}});var lR=ye((Jcr,W4e)=>{"use strict";W4e.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var X4e=ye(($cr,Z4e)=>{"use strict";var kEt=Mr(),CEt=lR();Z4e.exports=function(t,r){function n(i,a){return kEt.coerce(t,r,CEt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var y5=ye((Qcr,J4e)=>{"use strict";var LEt=uo(),tW=id(),PEt=va(),IEt={};function DEt(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"?x:t.sort;return S&&r.sort(function(L,_){return _.v-L.v}),r[0]&&(r[0].vTotal=v),r}function Y4e(e){return function(r,n){return!r||(r=tW(r),!r.isValid())?!1:(r=PEt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function REt(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=K4e(a,IEt));for(var s=0,l=0;l{"use strict";var zEt=rp().appendArrayMultiPointValues;$4e.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]),zEt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var hR=ye((tfr,xEe)=>{"use strict";var zp=xa(),FEt=Yu(),uR=Nc(),aEe=va(),Wy=ao(),ev=Mr(),qEt=ev.strScale,eEe=ev.strTranslate,rW=Ll(),oEe=_v(),OEt=oEe.recordMinTextSize,BEt=oEe.clearMinTextSize,sEe=Qb().TEXTPAD,Zo=l_(),cR=Q4e(),tEe=Mr().isValidTextValue;function NEt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;BEt("pie",n),cEe(t,e),mEe(t,i);var a=ev.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=zp.select(this),l=o[0],u=l.trace;YEt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=zp.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){zp.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 _=l.cx,C=l.cy,M=zp.select(this),p=M.selectAll("path.surface").data([S]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(lEe,e,o),u.pull){var P=+Zo.castOption(u.pull,S.pts)||0;P>0&&(_+=P*S.pxmid[0],C+=P*S.pxmid[1])}S.cxFinal=_,S.cyFinal=C;function T(N,W,re,ae){var _e=ae*(W[0]-N[0]),Me=ae*(W[1]-N[1]);return"a"+ae*l.r+","+ae*l.r+" 0 "+S.largeArc+(re?" 1 ":" 0 ")+_e+","+Me}var F=u.hole;if(S.v===l.vTotal){var q="M"+(_+S.px0[0])+","+(C+S.px0[1])+T(S.px0,S.pxmid,!0,1)+T(S.pxmid,S.px0,!0,1)+"Z";F?p.attr("d","M"+(_+F*S.px0[0])+","+(C+F*S.px0[1])+T(S.px0,S.pxmid,!1,F)+T(S.pxmid,S.px0,!1,F)+"Z"+q):p.attr("d",q)}else{var V=T(S.px0,S.px1,!0,1);if(F){var H=1-F;p.attr("d","M"+(_+F*S.px1[0])+","+(C+F*S.px1[1])+T(S.px1,S.px0,!1,F)+"l"+H*S.px0[0]+","+H*S.px0[1]+V+"Z")}else p.attr("d","M"+_+","+C+"l"+S.px0[0]+","+S.px0[1]+V+"Z")}yEe(e,S,l);var X=Zo.castOption(u.textposition,S.pts),G=M.selectAll("g.slicetext").data(S.text&&X!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var N=ev.ensureSingle(zp.select(this),"text","",function(ie){ie.attr("data-notex",1)}),W=ev.ensureUniformFontSize(e,X==="outside"?VEt(u,S,n.font):uEe(u,S,n.font));N.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Wy.font,W).call(rW.convertToTspans,e);var re=Wy.bBox(N.node()),ae;if(X==="outside")ae=nEe(re,S);else if(ae=fEe(re,S,l),X==="auto"&&ae.scale<1){var _e=ev.ensureUniformFontSize(e,u.outsidetextfont);N.call(Wy.font,_e),re=Wy.bBox(N.node()),ae=nEe(re,S)}var Me=ae.textPosAngle,ke=Me===void 0?S.pxmid:fR(l.r,Me);if(ae.targetX=_+ke[0]*ae.rCenter+(ae.x||0),ae.targetY=C+ke[1]*ae.rCenter+(ae.y||0),_Ee(ae,re),ae.outside){var ge=ae.targetY;S.yLabelMin=ge-re.height/2,S.yLabelMid=ge,S.yLabelMax=ge+re.height/2,S.labelExtraX=0,S.labelExtraY=0,h=!0}ae.fontSize=W.size,OEt(u.type,ae,n),o[L].transform=ae,ev.setTransormAndDisplay(N,ae)})});var d=zp.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=ev.ensureSingle(zp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=ev.templateString(L,u._meta)),S.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Wy.font,u.title.font).call(rW.convertToTspans,e);var _;u.title.position==="middle center"?_=jEt(l):_=pEe(l,i),S.attr("transform",eEe(_.x,_.y)+qEt(Math.min(1,_.scale))+eEe(_.tx,_.ty))}),h&&ZEt(f,u),UEt(c,u),h&&u.automargin){var v=Wy.bBox(s.node()),x=u.domain,b=i.w*(x.x[1]-x.x[0]),g=i.h*(x.y[1]-x.y[0]),E=(.5*b-l.r)/i.w,k=(.5*g-l.r)/i.h;FEt.autoMargin(e,"pie."+u.uid+".automargin",{xl:x.x[0]-E,xr:x.x[1]+E,yb:x.y[0]-k,yt:x.y[1]+k,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=zp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function UEt(e,t){e.each(function(r){var n=zp.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,ev.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;ev.ensureSingle(n,"path","textline").call(aEe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function lEe(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=uR.castHoverinfo({hoverinfo:[Zo.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),x=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=Zo.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var g=l.text;ev.isValidTextValue(g)&&b.push(g)}l.value=l.v,l.valueLabel=Zo.formatPieValue(l.v,x),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Zo.formatPiePercent(l.percent,x),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var E=c.hoverlabel,k=E.font,S=[];uR.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:Zo.castOption(E.bgcolor,l.pts)||l.color,borderColor:Zo.castOption(E.bordercolor,l.pts),fontFamily:Zo.castOption(k.family,l.pts),fontSize:Zo.castOption(k.size,l.pts),fontColor:Zo.castOption(k.color,l.pts),nameLength:Zo.castOption(E.namelength,l.pts),textAlign:Zo.castOption(E.align,l.pts),hovertemplate:Zo.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[cR(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:[cR(l,c)],event:zp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=zp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=zp.event,t.emit("plotly_unhover",{points:[cR(f,c)],event:zp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(uR.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=[cR(l,c)],uR.click(t,zp.event))})}function VEt(e,t,r){var n=Zo.castOption(e.outsidetextfont.color,t.pts)||Zo.castOption(e.textfont.color,t.pts)||r.color,i=Zo.castOption(e.outsidetextfont.family,t.pts)||Zo.castOption(e.textfont.family,t.pts)||r.family,a=Zo.castOption(e.outsidetextfont.size,t.pts)||Zo.castOption(e.textfont.size,t.pts)||r.size,o=Zo.castOption(e.outsidetextfont.weight,t.pts)||Zo.castOption(e.textfont.weight,t.pts)||r.weight,s=Zo.castOption(e.outsidetextfont.style,t.pts)||Zo.castOption(e.textfont.style,t.pts)||r.style,l=Zo.castOption(e.outsidetextfont.variant,t.pts)||Zo.castOption(e.textfont.variant,t.pts)||r.variant,u=Zo.castOption(e.outsidetextfont.textcase,t.pts)||Zo.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Zo.castOption(e.outsidetextfont.lineposition,t.pts)||Zo.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Zo.castOption(e.outsidetextfont.shadow,t.pts)||Zo.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 uEe(e,t,r){var n=Zo.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Zo.castOption(e._input.textfont.color,t.pts));var i=Zo.castOption(e.insidetextfont.family,t.pts)||Zo.castOption(e.textfont.family,t.pts)||r.family,a=Zo.castOption(e.insidetextfont.size,t.pts)||Zo.castOption(e.textfont.size,t.pts)||r.size,o=Zo.castOption(e.insidetextfont.weight,t.pts)||Zo.castOption(e.textfont.weight,t.pts)||r.weight,s=Zo.castOption(e.insidetextfont.style,t.pts)||Zo.castOption(e.textfont.style,t.pts)||r.style,l=Zo.castOption(e.insidetextfont.variant,t.pts)||Zo.castOption(e.textfont.variant,t.pts)||r.variant,u=Zo.castOption(e.insidetextfont.textcase,t.pts)||Zo.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Zo.castOption(e.insidetextfont.lineposition,t.pts)||Zo.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Zo.castOption(e.insidetextfont.shadow,t.pts)||Zo.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||aEe.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function cEe(e,t){for(var r,n,i=0;i=-4;E-=2)g(Math.PI*E,"tan");for(E=4;E>=-4;E-=2)g(Math.PI*(E+1),"tan")}if(f||d){for(E=4;E>=-4;E-=2)g(Math.PI*(E+1.5),"rad");for(E=4;E>=-4;E-=2)g(Math.PI*(E+.5),"rad")}}if(s||v||f){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/k,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;x.push(b)}(v||d)&&(b=rEe(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b)),(v||h)&&(b=iEe(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b));for(var S=0,L=0,_=0;_=1)break}return x[S]}function HEt(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 jEt(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 pEe(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=gEe(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=WEt(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=iW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function WEt(e,t){return e/(t===void 0?1:t)}function iW(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 gEe(e){var t=e.pull;if(!t)return 0;var r;if(ev.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function ZEt(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function x(k,S){return k.pxmid[1]-S.pxmid[1]}function b(k,S){return S.pxmid[1]-k.pxmid[1]}function g(k,S){S||(S={});var L=S.labelExtraY+(n?S.yLabelMax:S.yLabelMin),_=n?k.yLabelMin:k.yLabelMax,C=n?k.yLabelMax:k.yLabelMin,M=k.cyFinal+o(k.px0[1],k.px1[1]),p=L-_,P,T,F,q,V,H;if(p*l>0&&(k.labelExtraY=p),!!ev.isArrayOrTypedArray(t.pull))for(T=0;T=(Zo.castOption(t.pull,F.pts)||0))&&((k.pxmid[1]-F.pxmid[1])*l>0?(q=F.cyFinal+o(F.px0[1],F.px1[1]),p=q-_-k.labelExtraY,p*l>0&&(k.labelExtraY+=p)):(C+k.labelExtraY-M)*l>0&&(P=3*s*Math.abs(T-f.indexOf(k)),V=F.cxFinal+a(F.px0[0],F.px1[0]),H=V+P-(k.cxFinal+k.pxmid[0])-k.labelExtraX,H*s>0&&(k.labelExtraX+=H)))}for(n=0;n<2;n++)for(i=n?x: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=GEt(u,t))}function fR(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function yEe(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 x=Zo.getFirstFilled(i.text,t.pts);tEe(x)&&v.push(x)}f&&v.push(Zo.formatPieValue(t.v,d)),h&&v.push(Zo.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("
")}function b(S){return{label:S.label,value:S.v,valueLabel:Zo.formatPieValue(S.v,n.separators),percent:S.v/r.vTotal,percentLabel:Zo.formatPiePercent(S.v/r.vTotal,n.separators),color:S.color,text:S.text,customdata:ev.castOption(i,S.i,"customdata")}}if(a){var g=ev.castOption(i,t.i,"texttemplate");if(!g)t.text="";else{var E=b(t),k=Zo.getFirstFilled(i.text,t.pts);(tEe(k)||k==="")&&(E.text=k),t.text=ev.texttemplateString(g,E,e._fullLayout._d3locale,E,i._meta||{})}}}function _Ee(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}xEe.exports={plot:NEt,formatSliceLabel:yEe,transformInsideText:fEe,determineInsideTextFont:uEe,positionTitleOutside:pEe,prerenderTitles:cEe,layoutAreas:mEe,attachFxHandlers:lEe,computeTransform:_Ee}});var TEe=ye((rfr,wEe)=>{"use strict";var bEe=xa(),KEt=z3(),JEt=_v().resizeText;wEe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");JEt(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=bEe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){bEe.select(this).call(KEt,s,a,t)})})}});var SEe=ye(_5=>{"use strict";var AEe=Yu();_5.name="pie";_5.plot=function(e,t,r,n){AEe.plotBasePlot(_5.name,e,t,r,n)};_5.clean=function(e,t,r,n){AEe.cleanBasePlot(_5.name,e,t,r,n)}});var EEe=ye((nfr,MEe)=>{"use strict";MEe.exports={attributes:A2(),supplyDefaults:S2().supplyDefaults,supplyLayoutDefaults:X4e(),layoutAttributes:lR(),calc:y5().calc,crossTraceCalc:y5().crossTraceCalc,plot:hR().plot,style:TEe(),styleOne:z3(),moduleType:"trace",name:"pie",basePlotModule:SEe(),categories:["pie-like","pie","showLegend"],meta:{}}});var CEe=ye((afr,kEe)=>{"use strict";kEe.exports=EEe()});var PEe=ye(x5=>{"use strict";var LEe=Yu();x5.name="sunburst";x5.plot=function(e,t,r,n){LEe.plotBasePlot(x5.name,e,t,r,n)};x5.clean=function(e,t,r,n){LEe.cleanBasePlot(x5.name,e,t,r,n)}});var nW=ye((sfr,IEe)=>{"use strict";IEe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var AE=ye((lfr,REe)=>{"use strict";var $Et=vl(),QEt=Wo().hovertemplateAttrs,ekt=Wo().texttemplateAttrs,tkt=Kl(),rkt=Ju().attributes,Zy=A2(),DEe=nW(),TE=no().extendFlat,ikt=Ed().pattern;REe.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:TE({colors:{valType:"data_array",editType:"calc"},line:{color:TE({},Zy.marker.line.color,{dflt:null}),width:TE({},Zy.marker.line.width,{dflt:1}),editType:"calc"},pattern:ikt,editType:"calc"},tkt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Zy.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:ekt({editType:"plot"},{keys:DEe.eventDataKeys.concat(["label","value"])}),hovertext:Zy.hovertext,hoverinfo:TE({},$Et.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:QEt({},{keys:DEe.eventDataKeys}),textfont:Zy.textfont,insidetextorientation:Zy.insidetextorientation,insidetextfont:Zy.insidetextfont,outsidetextfont:TE({},Zy.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Zy.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:rkt({name:"sunburst",trace:!0,editType:"calc"})}});var aW=ye((ufr,zEe)=>{"use strict";zEe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var BEe=ye((cfr,OEe)=>{"use strict";var FEe=Mr(),nkt=AE(),akt=Ju().defaults,okt=r0().handleText,skt=S2().handleMarkerDefaults,qEe=Mu(),lkt=qEe.hasColorscale,ukt=qEe.handleDefaults;OEe.exports=function(t,r,n,i){function a(h,d){return FEe.coerce(t,r,nkt,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"),skt(t,r,i,a);var u=r._hasColorscale=lkt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&ukt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),r.texttemplate||a("textinfo",FEe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f="auto";okt(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"),akt(r,i,a),r._length=null}});var UEe=ye((ffr,NEe)=>{"use strict";var ckt=Mr(),fkt=aW();NEe.exports=function(t,r){function n(i,a){return ckt.coerce(t,r,fkt,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var SE=ye((dR,VEe)=>{(function(e,t){typeof dR=="object"&&typeof VEe!="undefined"?t(dR):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(dR,function(e){"use strict";function t(Ve,Xe){return Ve.parent===Xe.parent?1:2}function r(Ve){return Ve.reduce(n,0)/Ve.length}function n(Ve,Xe){return Ve+Xe.x}function i(Ve){return 1+Ve.reduce(a,0)}function a(Ve,Xe){return Math.max(Ve,Xe.y)}function o(Ve){for(var Xe;Xe=Ve.children;)Ve=Xe[0];return Ve}function s(Ve){for(var Xe;Xe=Ve.children;)Ve=Xe[Xe.length-1];return Ve}function l(){var Ve=t,Xe=1,ht=1,Le=!1;function xe(Se){var lt,Gt=0;Se.eachAfter(function(jr){var ri=jr.children;ri?(jr.x=r(ri),jr.y=i(ri)):(jr.x=lt?Gt+=Ve(jr,lt):0,jr.y=0,lt=jr)});var Vt=o(Se),ar=s(Se),Qr=Vt.x-Ve(Vt,ar)/2,ai=ar.x+Ve(ar,Vt)/2;return Se.eachAfter(Le?function(jr){jr.x=(jr.x-Se.x)*Xe,jr.y=(Se.y-jr.y)*ht}:function(jr){jr.x=(jr.x-Qr)/(ai-Qr)*Xe,jr.y=(1-(Se.y?jr.y/Se.y:1))*ht})}return xe.separation=function(Se){return arguments.length?(Ve=Se,xe):Ve},xe.size=function(Se){return arguments.length?(Le=!1,Xe=+Se[0],ht=+Se[1],xe):Le?null:[Xe,ht]},xe.nodeSize=function(Se){return arguments.length?(Le=!0,Xe=+Se[0],ht=+Se[1],xe):Le?[Xe,ht]:null},xe}function u(Ve){var Xe=0,ht=Ve.children,Le=ht&&ht.length;if(!Le)Xe=1;else for(;--Le>=0;)Xe+=ht[Le].value;Ve.value=Xe}function c(){return this.eachAfter(u)}function f(Ve){var Xe=this,ht,Le=[Xe],xe,Se,lt;do for(ht=Le.reverse(),Le=[];Xe=ht.pop();)if(Ve(Xe),xe=Xe.children,xe)for(Se=0,lt=xe.length;Se=0;--xe)ht.push(Le[xe]);return this}function d(Ve){for(var Xe=this,ht=[Xe],Le=[],xe,Se,lt;Xe=ht.pop();)if(Le.push(Xe),xe=Xe.children,xe)for(Se=0,lt=xe.length;Se=0;)ht+=Le[xe].value;Xe.value=ht})}function x(Ve){return this.eachBefore(function(Xe){Xe.children&&Xe.children.sort(Ve)})}function b(Ve){for(var Xe=this,ht=g(Xe,Ve),Le=[Xe];Xe!==ht;)Xe=Xe.parent,Le.push(Xe);for(var xe=Le.length;Ve!==ht;)Le.splice(xe,0,Ve),Ve=Ve.parent;return Le}function g(Ve,Xe){if(Ve===Xe)return Ve;var ht=Ve.ancestors(),Le=Xe.ancestors(),xe=null;for(Ve=ht.pop(),Xe=Le.pop();Ve===Xe;)xe=Ve,Ve=ht.pop(),Xe=Le.pop();return xe}function E(){for(var Ve=this,Xe=[Ve];Ve=Ve.parent;)Xe.push(Ve);return Xe}function k(){var Ve=[];return this.each(function(Xe){Ve.push(Xe)}),Ve}function S(){var Ve=[];return this.eachBefore(function(Xe){Xe.children||Ve.push(Xe)}),Ve}function L(){var Ve=this,Xe=[];return Ve.each(function(ht){ht!==Ve&&Xe.push({source:ht.parent,target:ht})}),Xe}function _(Ve,Xe){var ht=new T(Ve),Le=+Ve.value&&(ht.value=Ve.value),xe,Se=[ht],lt,Gt,Vt,ar;for(Xe==null&&(Xe=M);xe=Se.pop();)if(Le&&(xe.value=+xe.data.value),(Gt=Xe(xe.data))&&(ar=Gt.length))for(xe.children=new Array(ar),Vt=ar-1;Vt>=0;--Vt)Se.push(lt=xe.children[Vt]=new T(Gt[Vt])),lt.parent=xe,lt.depth=xe.depth+1;return ht.eachBefore(P)}function C(){return _(this).eachBefore(p)}function M(Ve){return Ve.children}function p(Ve){Ve.data=Ve.data.data}function P(Ve){var Xe=0;do Ve.height=Xe;while((Ve=Ve.parent)&&Ve.height<++Xe)}function T(Ve){this.data=Ve,this.depth=this.height=0,this.parent=null}T.prototype=_.prototype={constructor:T,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:x,path:b,ancestors:E,descendants:k,leaves:S,links:L,copy:C};var F=Array.prototype.slice;function q(Ve){for(var Xe=Ve.length,ht,Le;Xe;)Le=Math.random()*Xe--|0,ht=Ve[Xe],Ve[Xe]=Ve[Le],Ve[Le]=ht;return Ve}function V(Ve){for(var Xe=0,ht=(Ve=q(F.call(Ve))).length,Le=[],xe,Se;Xe0&&ht*ht>Le*Le+xe*xe}function N(Ve,Xe){for(var ht=0;htVt?(xe=(ar+Vt-Se)/(2*ar),Gt=Math.sqrt(Math.max(0,Vt/ar-xe*xe)),ht.x=Ve.x-xe*Le-Gt*lt,ht.y=Ve.y-xe*lt+Gt*Le):(xe=(ar+Se-Vt)/(2*ar),Gt=Math.sqrt(Math.max(0,Se/ar-xe*xe)),ht.x=Xe.x+xe*Le-Gt*lt,ht.y=Xe.y+xe*lt+Gt*Le)):(ht.x=Xe.x+ht.r,ht.y=Xe.y)}function ke(Ve,Xe){var ht=Ve.r+Xe.r-1e-6,Le=Xe.x-Ve.x,xe=Xe.y-Ve.y;return ht>0&&ht*ht>Le*Le+xe*xe}function ge(Ve){var Xe=Ve._,ht=Ve.next._,Le=Xe.r+ht.r,xe=(Xe.x*ht.r+ht.x*Xe.r)/Le,Se=(Xe.y*ht.r+ht.y*Xe.r)/Le;return xe*xe+Se*Se}function ie(Ve){this._=Ve,this.next=null,this.previous=null}function Te(Ve){if(!(xe=Ve.length))return 0;var Xe,ht,Le,xe,Se,lt,Gt,Vt,ar,Qr,ai;if(Xe=Ve[0],Xe.x=0,Xe.y=0,!(xe>1))return Xe.r;if(ht=Ve[1],Xe.x=-ht.r,ht.x=Xe.r,ht.y=0,!(xe>2))return Xe.r+ht.r;Me(ht,Xe,Le=Ve[2]),Xe=new ie(Xe),ht=new ie(ht),Le=new ie(Le),Xe.next=Le.previous=ht,ht.next=Xe.previous=Le,Le.next=ht.previous=Xe;e:for(Gt=3;Gt0)throw new Error("cycle");return Gt}return ht.id=function(Le){return arguments.length?(Ve=ze(Le),ht):Ve},ht.parentId=function(Le){return arguments.length?(Xe=ze(Le),ht):Xe},ht}function Ke(Ve,Xe){return Ve.parent===Xe.parent?1:2}function xt(Ve){var Xe=Ve.children;return Xe?Xe[0]:Ve.t}function bt(Ve){var Xe=Ve.children;return Xe?Xe[Xe.length-1]:Ve.t}function Lt(Ve,Xe,ht){var Le=ht/(Xe.i-Ve.i);Xe.c-=Le,Xe.s+=ht,Ve.c+=Le,Xe.z+=ht,Xe.m+=ht}function St(Ve){for(var Xe=0,ht=0,Le=Ve.children,xe=Le.length,Se;--xe>=0;)Se=Le[xe],Se.z+=Xe,Se.m+=Xe,Xe+=Se.s+(ht+=Se.c)}function Et(Ve,Xe,ht){return Ve.a.parent===Xe.parent?Ve.a:ht}function dt(Ve,Xe){this._=Ve,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=Xe}dt.prototype=Object.create(T.prototype);function Ht(Ve){for(var Xe=new dt(Ve,0),ht,Le=[Xe],xe,Se,lt,Gt;ht=Le.pop();)if(Se=ht._.children)for(ht.children=new Array(Gt=Se.length),lt=Gt-1;lt>=0;--lt)Le.push(xe=ht.children[lt]=new dt(Se[lt],lt)),xe.parent=ht;return(Xe.parent=new dt(null,0)).children=[Xe],Xe}function $t(){var Ve=Ke,Xe=1,ht=1,Le=null;function xe(ar){var Qr=Ht(ar);if(Qr.eachAfter(Se),Qr.parent.m=-Qr.z,Qr.eachBefore(lt),Le)ar.eachBefore(Vt);else{var ai=ar,jr=ar,ri=ar;ar.eachBefore(function(_n){_n.xjr.x&&(jr=_n),_n.depth>ri.depth&&(ri=_n)});var bi=ai===jr?1:Ve(ai,jr)/2,nn=bi-ai.x,Wi=Xe/(jr.x+bi+nn),Ni=ht/(ri.depth||1);ar.eachBefore(function(_n){_n.x=(_n.x+nn)*Wi,_n.y=_n.depth*Ni})}return ar}function Se(ar){var Qr=ar.children,ai=ar.parent.children,jr=ar.i?ai[ar.i-1]:null;if(Qr){St(ar);var ri=(Qr[0].z+Qr[Qr.length-1].z)/2;jr?(ar.z=jr.z+Ve(ar._,jr._),ar.m=ar.z-ri):ar.z=ri}else jr&&(ar.z=jr.z+Ve(ar._,jr._));ar.parent.A=Gt(ar,jr,ar.parent.A||ai[0])}function lt(ar){ar._.x=ar.z+ar.parent.m,ar.m+=ar.parent.m}function Gt(ar,Qr,ai){if(Qr){for(var jr=ar,ri=ar,bi=Qr,nn=jr.parent.children[0],Wi=jr.m,Ni=ri.m,_n=bi.m,$i=nn.m,zn;bi=bt(bi),jr=xt(jr),bi&&jr;)nn=xt(nn),ri=bt(ri),ri.a=ar,zn=bi.z+_n-jr.z-Wi+Ve(bi._,jr._),zn>0&&(Lt(Et(bi,ar,ai),ar,zn),Wi+=zn,Ni+=zn),_n+=bi.m,Wi+=jr.m,$i+=nn.m,Ni+=ri.m;bi&&!bt(ri)&&(ri.t=bi,ri.m+=_n-Ni),jr&&!xt(nn)&&(nn.t=jr,nn.m+=Wi-$i,ai=ar)}return ai}function Vt(ar){ar.x*=Xe,ar.y=ar.depth*ht}return xe.separation=function(ar){return arguments.length?(Ve=ar,xe):Ve},xe.size=function(ar){return arguments.length?(Le=!1,Xe=+ar[0],ht=+ar[1],xe):Le?null:[Xe,ht]},xe.nodeSize=function(ar){return arguments.length?(Le=!0,Xe=+ar[0],ht=+ar[1],xe):Le?[Xe,ht]:null},xe}function fr(Ve,Xe,ht,Le,xe){for(var Se=Ve.children,lt,Gt=-1,Vt=Se.length,ar=Ve.value&&(xe-ht)/Ve.value;++Gt_n&&(_n=ar),It=Wi*Wi*Wn,$i=Math.max(_n/It,It/Ni),$i>zn){Wi-=ar;break}zn=$i}lt.push(Vt={value:Wi,dice:ri1?Le:1)},ht}(_r);function Nr(){var Ve=Or,Xe=!1,ht=1,Le=1,xe=[0],Se=Ce,lt=Ce,Gt=Ce,Vt=Ce,ar=Ce;function Qr(jr){return jr.x0=jr.y0=0,jr.x1=ht,jr.y1=Le,jr.eachBefore(ai),xe=[0],Xe&&jr.eachBefore(qt),jr}function ai(jr){var ri=xe[jr.depth],bi=jr.x0+ri,nn=jr.y0+ri,Wi=jr.x1-ri,Ni=jr.y1-ri;Wi=jr-1){var _n=Se[ai];_n.x0=bi,_n.y0=nn,_n.x1=Wi,_n.y1=Ni;return}for(var $i=ar[ai],zn=ri/2+$i,Wn=ai+1,It=jr-1;Wn>>1;ar[ft]Ni-nn){var yr=(bi*Zt+Wi*jt)/ri;Qr(ai,Wn,jt,bi,nn,yr,Ni),Qr(Wn,jr,Zt,yr,nn,Wi,Ni)}else{var Fr=(nn*Zt+Ni*jt)/ri;Qr(ai,Wn,jt,bi,nn,Wi,Fr),Qr(Wn,jr,Zt,bi,Fr,Wi,Ni)}}}function Ne(Ve,Xe,ht,Le,xe){(Ve.depth&1?fr:rt)(Ve,Xe,ht,Le,xe)}var Ye=function Ve(Xe){function ht(Le,xe,Se,lt,Gt){if((Vt=Le._squarify)&&Vt.ratio===Xe)for(var Vt,ar,Qr,ai,jr=-1,ri,bi=Vt.length,nn=Le.value;++jr1?Le:1)},ht}(_r);e.cluster=l,e.hierarchy=_,e.pack=ce,e.packEnclose=V,e.packSiblings=Ee,e.partition=ot,e.stratify=er,e.tree=$t,e.treemap=Nr,e.treemapBinary=ut,e.treemapDice=rt,e.treemapResquarify=Ye,e.treemapSlice=fr,e.treemapSliceDice=Ne,e.treemapSquarify=Or,Object.defineProperty(e,"__esModule",{value:!0})})});var EE=ye(ME=>{"use strict";var HEe=SE(),hkt=uo(),b5=Mr(),dkt=Mu().makeColorScaleFuncFromTrace,vkt=y5().makePullColorFn,pkt=y5().generateExtendedColors,gkt=Mu().calc,mkt=es().ALMOST_EQUAL,ykt={},_kt={},xkt={};ME.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=b5.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=b5.isArrayOrTypedArray(s),u=[],c={},f={},h=function(G,N){c[G]?c[G].push(N):c[G]=[N],f[N]=1},d=function(G){return G||typeof G=="number"},v=function(G){return!l||hkt(s[G])&&s[G]>=0},x,b,g;i?(x=Math.min(n.length,o.length),b=function(G){return d(n[G])&&v(G)},g=function(G){return String(n[G])}):(x=Math.min(a.length,o.length),b=function(G){return d(a[G])&&v(G)},g=function(G){return String(a[G])}),l&&(x=Math.min(x,s.length));for(var E=0;E1){for(var M=b5.randstr(),p=0;p{"use strict";var k4t=Eu().str2arr,C4t=Eu().sliceEq,i4e=Eu().readUInt32BE,L4t=k4t("8BPS\0");n4e.exports=function(e){if(!(e.length<22)&&C4t(e,0,L4t))return{width:i4e(e,18),height:i4e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var l4e=ye((Fcr,s4e)=>{"use strict";function P4t(e){return e===32||e===9||e===13||e===10}function m5(e){return typeof e=="number"&&isFinite(e)&&e>0}function I4t(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,R4t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,z4t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,F4t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,q4t=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,o4e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function O4t(e){var t=e.match(z4t),r=e.match(F4t),n=e.match(q4t);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Nm(e){return o4e.test(e)?e.match(o4e)[0]:"px"}s4e.exports=function(e){if(I4t(e)){for(var t="",r=0;r{"use strict";var f4e=Eu().str2arr,u4e=Eu().sliceEq,B4t=Eu().readUInt16LE,N4t=Eu().readUInt16BE,U4t=Eu().readUInt32LE,V4t=Eu().readUInt32BE,H4t=f4e("II*\0"),G4t=f4e("MM\0*");function nR(e,t,r){return r?N4t(e,t):B4t(e,t)}function Jj(e,t,r){return r?V4t(e,t):U4t(e,t)}function c4e(e,t,r){var n=nR(e,t+2,r),i=Jj(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?nR(e,t+8,r):Jj(e,t+8,r)}h4e.exports=function(e){if(!(e.length<8)&&!(!u4e(e,0,H4t)&&!u4e(e,0,G4t))){var t=e[0]===77,r=Jj(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=nR(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var g4e=Eu().str2arr,v4e=Eu().sliceEq,p4e=Eu().readUInt16LE,$j=Eu().readUInt32LE,j4t=rR(),W4t=g4e("RIFF"),Z4t=g4e("WEBP");function X4t(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:p4e(e,t+6)&16383,height:p4e(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function Y4t(e,t){if(e[t]===47){var r=$j(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function K4t(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||X4t(e,t+8):a==="VP8L"&&o>=9?r=r||Y4t(e,t+8):a==="VP8X"&&o>=10?r=r||K4t(e,t+8):a==="EXIF"&&(n=j4t.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 x4e=ye((Bcr,_4e)=>{"use strict";_4e.exports={avif:OMe(),bmp:UMe(),gif:WMe(),ico:YMe(),jpeg:JMe(),png:r4e(),psd:a4e(),svg:l4e(),tiff:d4e(),webp:y4e()}});var b4e=ye((Ncr,eW)=>{"use strict";var Qj=x4e();function J4t(e){for(var t=Object.keys(Qj),r=0;r{"use strict";var $4t=b4e(),Q4t=Ly().IMAGE_URL_PREFIX,eEt=u2().Buffer;w4e.getImageSize=function(e){var t=e.replace(Q4t,""),r=new eEt(t,"base64");return $4t(r)}});var M4e=ye((Vcr,S4e)=>{"use strict";var A4e=Mr(),tEt=jT(),rEt=uo(),aR=Qa(),iEt=Mr().maxRowLength,nEt=T4e().getImageSize;S4e.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=iEt(r.z);else if(r._hasSource){var a=nEt(r.source);n=a.height,i=a.width}var o=aR.getFromId(t,r.xaxis||"x"),s=aR.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 lEt=xa(),T2=Mr(),E4e=T2.strTranslate,uEt=Zp(),cEt=jT(),fEt=jV(),hEt=a8().STYLE;k4e.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&fEt();T2.makeTraceGroups(i,n,"im").each(function(l){var u=lEt.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,x=c.y0,b=c.w,g=c.h,E=f.dx,k=f.dy,A,L,_,C,M,p;for(p=0;A===void 0&&p0;)L=a.c2p(v+p*E),p--;for(p=0;C===void 0&&p0;)M=o.c2p(x+p*k),p--;if(LW[0];if(re||ae){var _e=A+T/2,Me=C+F/2;G+="transform:"+E4e(_e+"px",Me+"px")+"scale("+(re?-1:1)+","+(ae?-1:1)+")"+E4e(-_e+"px",-Me+"px")+";"}}X.attr("style",G);var ke=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===g&&f._canvas.source===f.source)ge();else{var ie=document.createElement("canvas");ie.width=b,ie.height=g;var Te=ie.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var Ee=f._image;Ee.onload=function(){Te.drawImage(Ee,0,0),f._canvas={el:ie,source:f.source},ge()},Ee.setAttribute("src",f.source)}}).then(function(){var ge,ie;if(f._hasZ)ie=H(function(Ae,ze){var Ce=d[ze][Ae];return T2.isTypedArray(Ce)&&(Ce=Array.from(Ce)),Ce}),ge=ie.toDataURL("image/png");else if(f._hasSource)if(h)ge=f.source;else{var Te=f._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=Te.getImageData(0,0,b,g).data;ie=H(function(Ae,ze){var Ce=4*(ze*b+Ae);return[Ee[Ce],Ee[Ce+1],Ee[Ce+2],Ee[Ce+3]]}),ge=ie.toDataURL("image/png")}X.attr({"xlink:href":ge,height:F,width:T,x:A,y:C})});t._promises.push(ke)})}});var P4e=ye((Gcr,L4e)=>{"use strict";var dEt=xa();L4e.exports=function(t){dEt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var z4e=ye((jcr,R4e)=>{"use strict";var I4e=Nc(),D4e=Mr(),oR=D4e.isArrayOrTypedArray,vEt=jT();R4e.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(I4e.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||I4e.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=vEt.colormodel[a.colormodel],x=v.colormodel||a.colormodel,b=x.length,g=a._scaler(c),E=v.suffix,k=[];(a.hovertemplate||h)&&(k.push("["+[g[0]+E[0],g[1]+E[1],g[2]+E[2]].join(", ")),b===4&&k.push(", "+g[3]+E[3]),k.push("]"),k=k.join(""),t.extraText=x.toUpperCase()+": "+k);var A;oR(a.hovertext)&&oR(a.hovertext[u])?A=a.hovertext[u][l]:oR(a.text)&&oR(a.text[u])&&(A=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),_=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,M="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[D4e.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:g,xVal:_,xLabelVal:_,yVal:C,yLabelVal:C,zLabelVal:M,text:A,hovertemplateLabels:{zLabel:M,colorLabel:k,"color[0]Label":g[0]+E[0],"color[1]Label":g[1]+E[1],"color[2]Label":g[2]+E[2],"color[3]Label":g[3]+E[3]}})]}}}});var q4e=ye((Wcr,F4e)=>{"use strict";F4e.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 B4e=ye((Zcr,O4e)=>{"use strict";O4e.exports={attributes:tG(),supplyDefaults:_3e(),calc:M4e(),plot:C4e(),style:P4e(),hoverPoints:z4e(),eventData:q4e(),moduleType:"trace",name:"image",basePlotModule:Jf(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var U4e=ye((Xcr,N4e)=>{"use strict";N4e.exports=B4e()});var A2=ye((Ycr,V4e)=>{"use strict";var pEt=vl(),gEt=Ju().attributes,mEt=Su(),yEt=dh(),_Et=Wo().hovertemplateAttrs,xEt=Wo().texttemplateAttrs,bE=no().extendFlat,bEt=Ed().pattern,sR=mEt({editType:"plot",arrayOk:!0,colorEditType:"plot"});V4e.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:yEt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:bEt,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:bE({},pEt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:_Et({},{keys:["label","color","value","percent","text"]}),texttemplate:xEt({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:bE({},sR,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:bE({},sR,{}),outsidetextfont:bE({},sR,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:bE({},sR,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:gEt({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 S2=ye((Kcr,j4e)=>{"use strict";var wEt=uo(),wE=Mr(),TEt=A2(),AEt=Ju().defaults,SEt=r0().handleText,MEt=Mr().coercePattern;function H4e(e,t){var r=wE.isArrayOrTypedArray(e),n=wE.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 G4e(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");MEt(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 EEt(e,t,r,n){function i(E,k){return wE.coerce(e,t,TEt,E,k)}var a=i("labels"),o=i("values"),s=H4e(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,G4e(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate"),f;if(c||(f=i("textinfo",wE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||f&&f!=="none"){var h=i("textposition");SEt(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");AEt(t,n,i);var x=i("hole"),b=i("title.text");if(b){var g=i("title.position",x?"middle center":"top center");!x&&g==="middle center"&&(t.title.position="top center"),wE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}j4e.exports={handleLabelsAndValues:H4e,handleMarkerDefaults:G4e,supplyDefaults:EEt}});var lR=ye((Jcr,W4e)=>{"use strict";W4e.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var X4e=ye(($cr,Z4e)=>{"use strict";var kEt=Mr(),CEt=lR();Z4e.exports=function(t,r){function n(i,a){return kEt.coerce(t,r,CEt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var y5=ye((Qcr,J4e)=>{"use strict";var LEt=uo(),tW=id(),PEt=va(),IEt={};function DEt(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 A=t.type==="funnelarea"?x:t.sort;return A&&r.sort(function(L,_){return _.v-L.v}),r[0]&&(r[0].vTotal=v),r}function Y4e(e){return function(r,n){return!r||(r=tW(r),!r.isValid())?!1:(r=PEt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function REt(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=K4e(a,IEt));for(var s=0,l=0;l{"use strict";var zEt=rp().appendArrayMultiPointValues;$4e.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]),zEt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var hR=ye((tfr,xEe)=>{"use strict";var zp=xa(),FEt=Yu(),uR=Nc(),aEe=va(),Wy=ao(),ev=Mr(),qEt=ev.strScale,eEe=ev.strTranslate,rW=Ll(),oEe=_v(),OEt=oEe.recordMinTextSize,BEt=oEe.clearMinTextSize,sEe=Qb().TEXTPAD,Zo=l_(),cR=Q4e(),tEe=Mr().isValidTextValue;function NEt(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;BEt("pie",n),cEe(t,e),mEe(t,i);var a=ev.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=zp.select(this),l=o[0],u=l.trace;YEt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=zp.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(A,L){if(A.hidden){zp.select(this).selectAll("path,g").remove();return}A.pointNumber=A.i,A.curveNumber=u.index,f[A.pxmid[1]<0?0:1][A.pxmid[0]<0?0:1].push(A);var _=l.cx,C=l.cy,M=zp.select(this),p=M.selectAll("path.surface").data([A]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(lEe,e,o),u.pull){var P=+Zo.castOption(u.pull,A.pts)||0;P>0&&(_+=P*A.pxmid[0],C+=P*A.pxmid[1])}A.cxFinal=_,A.cyFinal=C;function T(N,W,re,ae){var _e=ae*(W[0]-N[0]),Me=ae*(W[1]-N[1]);return"a"+ae*l.r+","+ae*l.r+" 0 "+A.largeArc+(re?" 1 ":" 0 ")+_e+","+Me}var F=u.hole;if(A.v===l.vTotal){var q="M"+(_+A.px0[0])+","+(C+A.px0[1])+T(A.px0,A.pxmid,!0,1)+T(A.pxmid,A.px0,!0,1)+"Z";F?p.attr("d","M"+(_+F*A.px0[0])+","+(C+F*A.px0[1])+T(A.px0,A.pxmid,!1,F)+T(A.pxmid,A.px0,!1,F)+"Z"+q):p.attr("d",q)}else{var V=T(A.px0,A.px1,!0,1);if(F){var H=1-F;p.attr("d","M"+(_+F*A.px1[0])+","+(C+F*A.px1[1])+T(A.px1,A.px0,!1,F)+"l"+H*A.px0[0]+","+H*A.px0[1]+V+"Z")}else p.attr("d","M"+_+","+C+"l"+A.px0[0]+","+A.px0[1]+V+"Z")}yEe(e,A,l);var X=Zo.castOption(u.textposition,A.pts),G=M.selectAll("g.slicetext").data(A.text&&X!=="none"?[0]:[]);G.enter().append("g").classed("slicetext",!0),G.exit().remove(),G.each(function(){var N=ev.ensureSingle(zp.select(this),"text","",function(ie){ie.attr("data-notex",1)}),W=ev.ensureUniformFontSize(e,X==="outside"?VEt(u,A,n.font):uEe(u,A,n.font));N.text(A.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Wy.font,W).call(rW.convertToTspans,e);var re=Wy.bBox(N.node()),ae;if(X==="outside")ae=nEe(re,A);else if(ae=fEe(re,A,l),X==="auto"&&ae.scale<1){var _e=ev.ensureUniformFontSize(e,u.outsidetextfont);N.call(Wy.font,_e),re=Wy.bBox(N.node()),ae=nEe(re,A)}var Me=ae.textPosAngle,ke=Me===void 0?A.pxmid:fR(l.r,Me);if(ae.targetX=_+ke[0]*ae.rCenter+(ae.x||0),ae.targetY=C+ke[1]*ae.rCenter+(ae.y||0),_Ee(ae,re),ae.outside){var ge=ae.targetY;A.yLabelMin=ge-re.height/2,A.yLabelMid=ge,A.yLabelMax=ge+re.height/2,A.labelExtraX=0,A.labelExtraY=0,h=!0}ae.fontSize=W.size,OEt(u.type,ae,n),o[L].transform=ae,ev.setTransormAndDisplay(N,ae)})});var d=zp.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 A=ev.ensureSingle(zp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=ev.templateString(L,u._meta)),A.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Wy.font,u.title.font).call(rW.convertToTspans,e);var _;u.title.position==="middle center"?_=jEt(l):_=pEe(l,i),A.attr("transform",eEe(_.x,_.y)+qEt(Math.min(1,_.scale))+eEe(_.tx,_.ty))}),h&&ZEt(f,u),UEt(c,u),h&&u.automargin){var v=Wy.bBox(s.node()),x=u.domain,b=i.w*(x.x[1]-x.x[0]),g=i.h*(x.y[1]-x.y[0]),E=(.5*b-l.r)/i.w,k=(.5*g-l.r)/i.h;FEt.autoMargin(e,"pie."+u.uid+".automargin",{xl:x.x[0]-E,xr:x.x[1]+E,yb:x.y[0]-k,yt:x.y[1]+k,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=zp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function UEt(e,t){e.each(function(r){var n=zp.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,ev.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;ev.ensureSingle(n,"path","textline").call(aEe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function lEe(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=uR.castHoverinfo({hoverinfo:[Zo.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),x=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=Zo.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var g=l.text;ev.isValidTextValue(g)&&b.push(g)}l.value=l.v,l.valueLabel=Zo.formatPieValue(l.v,x),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Zo.formatPiePercent(l.percent,x),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var E=c.hoverlabel,k=E.font,A=[];uR.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:Zo.castOption(E.bgcolor,l.pts)||l.color,borderColor:Zo.castOption(E.bordercolor,l.pts),fontFamily:Zo.castOption(k.family,l.pts),fontSize:Zo.castOption(k.size,l.pts),fontColor:Zo.castOption(k.color,l.pts),nameLength:Zo.castOption(E.namelength,l.pts),textAlign:Zo.castOption(E.align,l.pts),hovertemplate:Zo.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[cR(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:A}),l.bbox=A[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[cR(l,c)],event:zp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=zp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=zp.event,t.emit("plotly_unhover",{points:[cR(f,c)],event:zp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(uR.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=[cR(l,c)],uR.click(t,zp.event))})}function VEt(e,t,r){var n=Zo.castOption(e.outsidetextfont.color,t.pts)||Zo.castOption(e.textfont.color,t.pts)||r.color,i=Zo.castOption(e.outsidetextfont.family,t.pts)||Zo.castOption(e.textfont.family,t.pts)||r.family,a=Zo.castOption(e.outsidetextfont.size,t.pts)||Zo.castOption(e.textfont.size,t.pts)||r.size,o=Zo.castOption(e.outsidetextfont.weight,t.pts)||Zo.castOption(e.textfont.weight,t.pts)||r.weight,s=Zo.castOption(e.outsidetextfont.style,t.pts)||Zo.castOption(e.textfont.style,t.pts)||r.style,l=Zo.castOption(e.outsidetextfont.variant,t.pts)||Zo.castOption(e.textfont.variant,t.pts)||r.variant,u=Zo.castOption(e.outsidetextfont.textcase,t.pts)||Zo.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Zo.castOption(e.outsidetextfont.lineposition,t.pts)||Zo.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Zo.castOption(e.outsidetextfont.shadow,t.pts)||Zo.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 uEe(e,t,r){var n=Zo.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Zo.castOption(e._input.textfont.color,t.pts));var i=Zo.castOption(e.insidetextfont.family,t.pts)||Zo.castOption(e.textfont.family,t.pts)||r.family,a=Zo.castOption(e.insidetextfont.size,t.pts)||Zo.castOption(e.textfont.size,t.pts)||r.size,o=Zo.castOption(e.insidetextfont.weight,t.pts)||Zo.castOption(e.textfont.weight,t.pts)||r.weight,s=Zo.castOption(e.insidetextfont.style,t.pts)||Zo.castOption(e.textfont.style,t.pts)||r.style,l=Zo.castOption(e.insidetextfont.variant,t.pts)||Zo.castOption(e.textfont.variant,t.pts)||r.variant,u=Zo.castOption(e.insidetextfont.textcase,t.pts)||Zo.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Zo.castOption(e.insidetextfont.lineposition,t.pts)||Zo.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Zo.castOption(e.insidetextfont.shadow,t.pts)||Zo.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||aEe.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function cEe(e,t){for(var r,n,i=0;i=-4;E-=2)g(Math.PI*E,"tan");for(E=4;E>=-4;E-=2)g(Math.PI*(E+1),"tan")}if(f||d){for(E=4;E>=-4;E-=2)g(Math.PI*(E+1.5),"rad");for(E=4;E>=-4;E-=2)g(Math.PI*(E+.5),"rad")}}if(s||v||f){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/k,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;x.push(b)}(v||d)&&(b=rEe(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b)),(v||h)&&(b=iEe(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,x.push(b));for(var A=0,L=0,_=0;_=1)break}return x[A]}function HEt(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 jEt(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 pEe(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=gEe(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=WEt(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=iW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function WEt(e,t){return e/(t===void 0?1:t)}function iW(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 gEe(e){var t=e.pull;if(!t)return 0;var r;if(ev.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function ZEt(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function x(k,A){return k.pxmid[1]-A.pxmid[1]}function b(k,A){return A.pxmid[1]-k.pxmid[1]}function g(k,A){A||(A={});var L=A.labelExtraY+(n?A.yLabelMax:A.yLabelMin),_=n?k.yLabelMin:k.yLabelMax,C=n?k.yLabelMax:k.yLabelMin,M=k.cyFinal+o(k.px0[1],k.px1[1]),p=L-_,P,T,F,q,V,H;if(p*l>0&&(k.labelExtraY=p),!!ev.isArrayOrTypedArray(t.pull))for(T=0;T=(Zo.castOption(t.pull,F.pts)||0))&&((k.pxmid[1]-F.pxmid[1])*l>0?(q=F.cyFinal+o(F.px0[1],F.px1[1]),p=q-_-k.labelExtraY,p*l>0&&(k.labelExtraY+=p)):(C+k.labelExtraY-M)*l>0&&(P=3*s*Math.abs(T-f.indexOf(k)),V=F.cxFinal+a(F.px0[0],F.px1[0]),H=V+P-(k.cxFinal+k.pxmid[0])-k.labelExtraX,H*s>0&&(k.labelExtraX+=H)))}for(n=0;n<2;n++)for(i=n?x: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=GEt(u,t))}function fR(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function yEe(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(A){return s.indexOf(A)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=n.separators,v;if(v=u?[t.label]:[],c){var x=Zo.getFirstFilled(i.text,t.pts);tEe(x)&&v.push(x)}f&&v.push(Zo.formatPieValue(t.v,d)),h&&v.push(Zo.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("
")}function b(A){return{label:A.label,value:A.v,valueLabel:Zo.formatPieValue(A.v,n.separators),percent:A.v/r.vTotal,percentLabel:Zo.formatPiePercent(A.v/r.vTotal,n.separators),color:A.color,text:A.text,customdata:ev.castOption(i,A.i,"customdata")}}if(a){var g=ev.castOption(i,t.i,"texttemplate");if(!g)t.text="";else{var E=b(t),k=Zo.getFirstFilled(i.text,t.pts);(tEe(k)||k==="")&&(E.text=k),t.text=ev.texttemplateString(g,E,e._fullLayout._d3locale,E,i._meta||{})}}}function _Ee(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}xEe.exports={plot:NEt,formatSliceLabel:yEe,transformInsideText:fEe,determineInsideTextFont:uEe,positionTitleOutside:pEe,prerenderTitles:cEe,layoutAreas:mEe,attachFxHandlers:lEe,computeTransform:_Ee}});var TEe=ye((rfr,wEe)=>{"use strict";var bEe=xa(),KEt=z3(),JEt=_v().resizeText;wEe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");JEt(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=bEe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){bEe.select(this).call(KEt,s,a,t)})})}});var SEe=ye(_5=>{"use strict";var AEe=Yu();_5.name="pie";_5.plot=function(e,t,r,n){AEe.plotBasePlot(_5.name,e,t,r,n)};_5.clean=function(e,t,r,n){AEe.cleanBasePlot(_5.name,e,t,r,n)}});var EEe=ye((nfr,MEe)=>{"use strict";MEe.exports={attributes:A2(),supplyDefaults:S2().supplyDefaults,supplyLayoutDefaults:X4e(),layoutAttributes:lR(),calc:y5().calc,crossTraceCalc:y5().crossTraceCalc,plot:hR().plot,style:TEe(),styleOne:z3(),moduleType:"trace",name:"pie",basePlotModule:SEe(),categories:["pie-like","pie","showLegend"],meta:{}}});var CEe=ye((afr,kEe)=>{"use strict";kEe.exports=EEe()});var PEe=ye(x5=>{"use strict";var LEe=Yu();x5.name="sunburst";x5.plot=function(e,t,r,n){LEe.plotBasePlot(x5.name,e,t,r,n)};x5.clean=function(e,t,r,n){LEe.cleanBasePlot(x5.name,e,t,r,n)}});var nW=ye((sfr,IEe)=>{"use strict";IEe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var AE=ye((lfr,REe)=>{"use strict";var $Et=vl(),QEt=Wo().hovertemplateAttrs,ekt=Wo().texttemplateAttrs,tkt=Kl(),rkt=Ju().attributes,Zy=A2(),DEe=nW(),TE=no().extendFlat,ikt=Ed().pattern;REe.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:TE({colors:{valType:"data_array",editType:"calc"},line:{color:TE({},Zy.marker.line.color,{dflt:null}),width:TE({},Zy.marker.line.width,{dflt:1}),editType:"calc"},pattern:ikt,editType:"calc"},tkt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Zy.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:ekt({editType:"plot"},{keys:DEe.eventDataKeys.concat(["label","value"])}),hovertext:Zy.hovertext,hoverinfo:TE({},$Et.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:QEt({},{keys:DEe.eventDataKeys}),textfont:Zy.textfont,insidetextorientation:Zy.insidetextorientation,insidetextfont:Zy.insidetextfont,outsidetextfont:TE({},Zy.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Zy.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:rkt({name:"sunburst",trace:!0,editType:"calc"})}});var aW=ye((ufr,zEe)=>{"use strict";zEe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var BEe=ye((cfr,OEe)=>{"use strict";var FEe=Mr(),nkt=AE(),akt=Ju().defaults,okt=r0().handleText,skt=S2().handleMarkerDefaults,qEe=Mu(),lkt=qEe.hasColorscale,ukt=qEe.handleDefaults;OEe.exports=function(t,r,n,i){function a(h,d){return FEe.coerce(t,r,nkt,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"),skt(t,r,i,a);var u=r._hasColorscale=lkt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&ukt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),r.texttemplate||a("textinfo",FEe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f="auto";okt(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"),akt(r,i,a),r._length=null}});var UEe=ye((ffr,NEe)=>{"use strict";var ckt=Mr(),fkt=aW();NEe.exports=function(t,r){function n(i,a){return ckt.coerce(t,r,fkt,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var SE=ye((dR,VEe)=>{(function(e,t){typeof dR=="object"&&typeof VEe!="undefined"?t(dR):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(dR,function(e){"use strict";function t(Ve,Xe){return Ve.parent===Xe.parent?1:2}function r(Ve){return Ve.reduce(n,0)/Ve.length}function n(Ve,Xe){return Ve+Xe.x}function i(Ve){return 1+Ve.reduce(a,0)}function a(Ve,Xe){return Math.max(Ve,Xe.y)}function o(Ve){for(var Xe;Xe=Ve.children;)Ve=Xe[0];return Ve}function s(Ve){for(var Xe;Xe=Ve.children;)Ve=Xe[Xe.length-1];return Ve}function l(){var Ve=t,Xe=1,ht=1,Le=!1;function xe(Se){var lt,Gt=0;Se.eachAfter(function(jr){var ri=jr.children;ri?(jr.x=r(ri),jr.y=i(ri)):(jr.x=lt?Gt+=Ve(jr,lt):0,jr.y=0,lt=jr)});var Vt=o(Se),ar=s(Se),Qr=Vt.x-Ve(Vt,ar)/2,ai=ar.x+Ve(ar,Vt)/2;return Se.eachAfter(Le?function(jr){jr.x=(jr.x-Se.x)*Xe,jr.y=(Se.y-jr.y)*ht}:function(jr){jr.x=(jr.x-Qr)/(ai-Qr)*Xe,jr.y=(1-(Se.y?jr.y/Se.y:1))*ht})}return xe.separation=function(Se){return arguments.length?(Ve=Se,xe):Ve},xe.size=function(Se){return arguments.length?(Le=!1,Xe=+Se[0],ht=+Se[1],xe):Le?null:[Xe,ht]},xe.nodeSize=function(Se){return arguments.length?(Le=!0,Xe=+Se[0],ht=+Se[1],xe):Le?[Xe,ht]:null},xe}function u(Ve){var Xe=0,ht=Ve.children,Le=ht&&ht.length;if(!Le)Xe=1;else for(;--Le>=0;)Xe+=ht[Le].value;Ve.value=Xe}function c(){return this.eachAfter(u)}function f(Ve){var Xe=this,ht,Le=[Xe],xe,Se,lt;do for(ht=Le.reverse(),Le=[];Xe=ht.pop();)if(Ve(Xe),xe=Xe.children,xe)for(Se=0,lt=xe.length;Se=0;--xe)ht.push(Le[xe]);return this}function d(Ve){for(var Xe=this,ht=[Xe],Le=[],xe,Se,lt;Xe=ht.pop();)if(Le.push(Xe),xe=Xe.children,xe)for(Se=0,lt=xe.length;Se=0;)ht+=Le[xe].value;Xe.value=ht})}function x(Ve){return this.eachBefore(function(Xe){Xe.children&&Xe.children.sort(Ve)})}function b(Ve){for(var Xe=this,ht=g(Xe,Ve),Le=[Xe];Xe!==ht;)Xe=Xe.parent,Le.push(Xe);for(var xe=Le.length;Ve!==ht;)Le.splice(xe,0,Ve),Ve=Ve.parent;return Le}function g(Ve,Xe){if(Ve===Xe)return Ve;var ht=Ve.ancestors(),Le=Xe.ancestors(),xe=null;for(Ve=ht.pop(),Xe=Le.pop();Ve===Xe;)xe=Ve,Ve=ht.pop(),Xe=Le.pop();return xe}function E(){for(var Ve=this,Xe=[Ve];Ve=Ve.parent;)Xe.push(Ve);return Xe}function k(){var Ve=[];return this.each(function(Xe){Ve.push(Xe)}),Ve}function A(){var Ve=[];return this.eachBefore(function(Xe){Xe.children||Ve.push(Xe)}),Ve}function L(){var Ve=this,Xe=[];return Ve.each(function(ht){ht!==Ve&&Xe.push({source:ht.parent,target:ht})}),Xe}function _(Ve,Xe){var ht=new T(Ve),Le=+Ve.value&&(ht.value=Ve.value),xe,Se=[ht],lt,Gt,Vt,ar;for(Xe==null&&(Xe=M);xe=Se.pop();)if(Le&&(xe.value=+xe.data.value),(Gt=Xe(xe.data))&&(ar=Gt.length))for(xe.children=new Array(ar),Vt=ar-1;Vt>=0;--Vt)Se.push(lt=xe.children[Vt]=new T(Gt[Vt])),lt.parent=xe,lt.depth=xe.depth+1;return ht.eachBefore(P)}function C(){return _(this).eachBefore(p)}function M(Ve){return Ve.children}function p(Ve){Ve.data=Ve.data.data}function P(Ve){var Xe=0;do Ve.height=Xe;while((Ve=Ve.parent)&&Ve.height<++Xe)}function T(Ve){this.data=Ve,this.depth=this.height=0,this.parent=null}T.prototype=_.prototype={constructor:T,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:x,path:b,ancestors:E,descendants:k,leaves:A,links:L,copy:C};var F=Array.prototype.slice;function q(Ve){for(var Xe=Ve.length,ht,Le;Xe;)Le=Math.random()*Xe--|0,ht=Ve[Xe],Ve[Xe]=Ve[Le],Ve[Le]=ht;return Ve}function V(Ve){for(var Xe=0,ht=(Ve=q(F.call(Ve))).length,Le=[],xe,Se;Xe0&&ht*ht>Le*Le+xe*xe}function N(Ve,Xe){for(var ht=0;htVt?(xe=(ar+Vt-Se)/(2*ar),Gt=Math.sqrt(Math.max(0,Vt/ar-xe*xe)),ht.x=Ve.x-xe*Le-Gt*lt,ht.y=Ve.y-xe*lt+Gt*Le):(xe=(ar+Se-Vt)/(2*ar),Gt=Math.sqrt(Math.max(0,Se/ar-xe*xe)),ht.x=Xe.x+xe*Le-Gt*lt,ht.y=Xe.y+xe*lt+Gt*Le)):(ht.x=Xe.x+ht.r,ht.y=Xe.y)}function ke(Ve,Xe){var ht=Ve.r+Xe.r-1e-6,Le=Xe.x-Ve.x,xe=Xe.y-Ve.y;return ht>0&&ht*ht>Le*Le+xe*xe}function ge(Ve){var Xe=Ve._,ht=Ve.next._,Le=Xe.r+ht.r,xe=(Xe.x*ht.r+ht.x*Xe.r)/Le,Se=(Xe.y*ht.r+ht.y*Xe.r)/Le;return xe*xe+Se*Se}function ie(Ve){this._=Ve,this.next=null,this.previous=null}function Te(Ve){if(!(xe=Ve.length))return 0;var Xe,ht,Le,xe,Se,lt,Gt,Vt,ar,Qr,ai;if(Xe=Ve[0],Xe.x=0,Xe.y=0,!(xe>1))return Xe.r;if(ht=Ve[1],Xe.x=-ht.r,ht.x=Xe.r,ht.y=0,!(xe>2))return Xe.r+ht.r;Me(ht,Xe,Le=Ve[2]),Xe=new ie(Xe),ht=new ie(ht),Le=new ie(Le),Xe.next=Le.previous=ht,ht.next=Xe.previous=Le,Le.next=ht.previous=Xe;e:for(Gt=3;Gt0)throw new Error("cycle");return Gt}return ht.id=function(Le){return arguments.length?(Ve=ze(Le),ht):Ve},ht.parentId=function(Le){return arguments.length?(Xe=ze(Le),ht):Xe},ht}function Ke(Ve,Xe){return Ve.parent===Xe.parent?1:2}function xt(Ve){var Xe=Ve.children;return Xe?Xe[0]:Ve.t}function bt(Ve){var Xe=Ve.children;return Xe?Xe[Xe.length-1]:Ve.t}function Lt(Ve,Xe,ht){var Le=ht/(Xe.i-Ve.i);Xe.c-=Le,Xe.s+=ht,Ve.c+=Le,Xe.z+=ht,Xe.m+=ht}function St(Ve){for(var Xe=0,ht=0,Le=Ve.children,xe=Le.length,Se;--xe>=0;)Se=Le[xe],Se.z+=Xe,Se.m+=Xe,Xe+=Se.s+(ht+=Se.c)}function Et(Ve,Xe,ht){return Ve.a.parent===Xe.parent?Ve.a:ht}function dt(Ve,Xe){this._=Ve,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=Xe}dt.prototype=Object.create(T.prototype);function Ht(Ve){for(var Xe=new dt(Ve,0),ht,Le=[Xe],xe,Se,lt,Gt;ht=Le.pop();)if(Se=ht._.children)for(ht.children=new Array(Gt=Se.length),lt=Gt-1;lt>=0;--lt)Le.push(xe=ht.children[lt]=new dt(Se[lt],lt)),xe.parent=ht;return(Xe.parent=new dt(null,0)).children=[Xe],Xe}function $t(){var Ve=Ke,Xe=1,ht=1,Le=null;function xe(ar){var Qr=Ht(ar);if(Qr.eachAfter(Se),Qr.parent.m=-Qr.z,Qr.eachBefore(lt),Le)ar.eachBefore(Vt);else{var ai=ar,jr=ar,ri=ar;ar.eachBefore(function(_n){_n.xjr.x&&(jr=_n),_n.depth>ri.depth&&(ri=_n)});var bi=ai===jr?1:Ve(ai,jr)/2,nn=bi-ai.x,Wi=Xe/(jr.x+bi+nn),Ni=ht/(ri.depth||1);ar.eachBefore(function(_n){_n.x=(_n.x+nn)*Wi,_n.y=_n.depth*Ni})}return ar}function Se(ar){var Qr=ar.children,ai=ar.parent.children,jr=ar.i?ai[ar.i-1]:null;if(Qr){St(ar);var ri=(Qr[0].z+Qr[Qr.length-1].z)/2;jr?(ar.z=jr.z+Ve(ar._,jr._),ar.m=ar.z-ri):ar.z=ri}else jr&&(ar.z=jr.z+Ve(ar._,jr._));ar.parent.A=Gt(ar,jr,ar.parent.A||ai[0])}function lt(ar){ar._.x=ar.z+ar.parent.m,ar.m+=ar.parent.m}function Gt(ar,Qr,ai){if(Qr){for(var jr=ar,ri=ar,bi=Qr,nn=jr.parent.children[0],Wi=jr.m,Ni=ri.m,_n=bi.m,$i=nn.m,zn;bi=bt(bi),jr=xt(jr),bi&&jr;)nn=xt(nn),ri=bt(ri),ri.a=ar,zn=bi.z+_n-jr.z-Wi+Ve(bi._,jr._),zn>0&&(Lt(Et(bi,ar,ai),ar,zn),Wi+=zn,Ni+=zn),_n+=bi.m,Wi+=jr.m,$i+=nn.m,Ni+=ri.m;bi&&!bt(ri)&&(ri.t=bi,ri.m+=_n-Ni),jr&&!xt(nn)&&(nn.t=jr,nn.m+=Wi-$i,ai=ar)}return ai}function Vt(ar){ar.x*=Xe,ar.y=ar.depth*ht}return xe.separation=function(ar){return arguments.length?(Ve=ar,xe):Ve},xe.size=function(ar){return arguments.length?(Le=!1,Xe=+ar[0],ht=+ar[1],xe):Le?null:[Xe,ht]},xe.nodeSize=function(ar){return arguments.length?(Le=!0,Xe=+ar[0],ht=+ar[1],xe):Le?[Xe,ht]:null},xe}function fr(Ve,Xe,ht,Le,xe){for(var Se=Ve.children,lt,Gt=-1,Vt=Se.length,ar=Ve.value&&(xe-ht)/Ve.value;++Gt_n&&(_n=ar),It=Wi*Wi*Wn,$i=Math.max(_n/It,It/Ni),$i>zn){Wi-=ar;break}zn=$i}lt.push(Vt={value:Wi,dice:ri1?Le:1)},ht}(_r);function Nr(){var Ve=Or,Xe=!1,ht=1,Le=1,xe=[0],Se=Ce,lt=Ce,Gt=Ce,Vt=Ce,ar=Ce;function Qr(jr){return jr.x0=jr.y0=0,jr.x1=ht,jr.y1=Le,jr.eachBefore(ai),xe=[0],Xe&&jr.eachBefore(qt),jr}function ai(jr){var ri=xe[jr.depth],bi=jr.x0+ri,nn=jr.y0+ri,Wi=jr.x1-ri,Ni=jr.y1-ri;Wi=jr-1){var _n=Se[ai];_n.x0=bi,_n.y0=nn,_n.x1=Wi,_n.y1=Ni;return}for(var $i=ar[ai],zn=ri/2+$i,Wn=ai+1,It=jr-1;Wn>>1;ar[ft]Ni-nn){var yr=(bi*Zt+Wi*jt)/ri;Qr(ai,Wn,jt,bi,nn,yr,Ni),Qr(Wn,jr,Zt,yr,nn,Wi,Ni)}else{var Fr=(nn*Zt+Ni*jt)/ri;Qr(ai,Wn,jt,bi,nn,Wi,Fr),Qr(Wn,jr,Zt,bi,Fr,Wi,Ni)}}}function Ne(Ve,Xe,ht,Le,xe){(Ve.depth&1?fr:rt)(Ve,Xe,ht,Le,xe)}var Ye=function Ve(Xe){function ht(Le,xe,Se,lt,Gt){if((Vt=Le._squarify)&&Vt.ratio===Xe)for(var Vt,ar,Qr,ai,jr=-1,ri,bi=Vt.length,nn=Le.value;++jr1?Le:1)},ht}(_r);e.cluster=l,e.hierarchy=_,e.pack=ce,e.packEnclose=V,e.packSiblings=Ee,e.partition=ot,e.stratify=er,e.tree=$t,e.treemap=Nr,e.treemapBinary=ut,e.treemapDice=rt,e.treemapResquarify=Ye,e.treemapSlice=fr,e.treemapSliceDice=Ne,e.treemapSquarify=Or,Object.defineProperty(e,"__esModule",{value:!0})})});var EE=ye(ME=>{"use strict";var HEe=SE(),hkt=uo(),b5=Mr(),dkt=Mu().makeColorScaleFuncFromTrace,vkt=y5().makePullColorFn,pkt=y5().generateExtendedColors,gkt=Mu().calc,mkt=es().ALMOST_EQUAL,ykt={},_kt={},xkt={};ME.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=b5.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=b5.isArrayOrTypedArray(s),u=[],c={},f={},h=function(G,N){c[G]?c[G].push(N):c[G]=[N],f[N]=1},d=function(G){return G||typeof G=="number"},v=function(G){return!l||hkt(s[G])&&s[G]>=0},x,b,g;i?(x=Math.min(n.length,o.length),b=function(G){return d(n[G])&&v(G)},g=function(G){return String(n[G])}):(x=Math.min(a.length,o.length),b=function(G){return d(a[G])&&v(G)},g=function(G){return String(a[G])}),l&&(x=Math.min(x,s.length));for(var E=0;E1){for(var M=b5.randstr(),p=0;p{});function Vm(){}function WEe(){return this.rgb().formatHex()}function kkt(){return this.rgb().formatHex8()}function Ckt(){return QEe(this).formatHsl()}function ZEe(){return this.rgb().formatRgb()}function j_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bkt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?XEe(t):r===3?new hd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?pR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?pR(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=wkt.exec(e))?new hd(t[1],t[2],t[3],1):(t=Tkt.exec(e))?new hd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Akt.exec(e))?pR(t[1],t[2],t[3],t[4]):(t=Skt.exec(e))?pR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mkt.exec(e))?JEe(t[1],t[2]/100,t[3]/100,1):(t=Ekt.exec(e))?JEe(t[1],t[2]/100,t[3]/100,t[4]):jEe.hasOwnProperty(e)?XEe(jEe[e]):e==="transparent"?new hd(NaN,NaN,NaN,0):null}function XEe(e){return new hd(e>>16&255,e>>8&255,e&255,1)}function pR(e,t,r,n){return n<=0&&(e=t=r=NaN),new hd(e,t,r,n)}function CE(e){return e instanceof Vm||(e=j_(e)),e?(e=e.rgb(),new hd(e.r,e.g,e.b,e.opacity)):new hd}function T5(e,t,r,n){return arguments.length===1?CE(e):new hd(e,t,r,n==null?1:n)}function hd(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function YEe(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}`}function Lkt(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}${M2((isNaN(this.opacity)?1:this.opacity)*255)}`}function KEe(){let e=mR(this.opacity);return`${e===1?"rgb(":"rgba("}${E2(this.r)}, ${E2(this.g)}, ${E2(this.b)}${e===1?")":`, ${e})`}`}function mR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M2(e){return e=E2(e),(e<16?"0":"")+e.toString(16)}function JEe(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 QEe(e){if(e instanceof Zg)return new Zg(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(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 LE(e,t,r,n){return arguments.length===1?QEe(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 $Ee(e){return e=(e||0)%360,e<0?e+360:e}function gR(e){return Math.max(0,Math.min(1,e||0))}function oW(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 G_,k2,w5,kE,Um,bkt,wkt,Tkt,Akt,Skt,Mkt,Ekt,jEe,yR=su(()=>{vR();G_=.7,k2=1/G_,w5="\\s*([+-]?\\d+)\\s*",kE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Um="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bkt=/^#([0-9a-f]{3,8})$/,wkt=new RegExp(`^rgb\\(${w5},${w5},${w5}\\)$`),Tkt=new RegExp(`^rgb\\(${Um},${Um},${Um}\\)$`),Akt=new RegExp(`^rgba\\(${w5},${w5},${w5},${kE}\\)$`),Skt=new RegExp(`^rgba\\(${Um},${Um},${Um},${kE}\\)$`),Mkt=new RegExp(`^hsl\\(${kE},${Um},${Um}\\)$`),Ekt=new RegExp(`^hsla\\(${kE},${Um},${Um},${kE}\\)$`),jEe={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};Xy(Vm,j_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:WEe,formatHex:WEe,formatHex8:kkt,formatHsl:Ckt,formatRgb:ZEe,toString:ZEe});Xy(hd,T5,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new hd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new hd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new hd(E2(this.r),E2(this.g),E2(this.b),mR(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:YEe,formatHex:YEe,formatHex8:Lkt,formatRgb:KEe,toString:KEe}));Xy(Zg,LE,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new Zg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,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 hd(oW(e>=240?e-240:e+120,i,n),oW(e,i,n),oW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zg($Ee(this.h),gR(this.s),gR(this.l),mR(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=mR(this.opacity);return`${e===1?"hsl(":"hsla("}${$Ee(this.h)}, ${gR(this.s)*100}%, ${gR(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var _R,xR,sW=su(()=>{_R=Math.PI/180,xR=180/Math.PI});function ake(e){if(e instanceof Hm)return new Hm(e.l,e.a,e.b,e.opacity);if(e instanceof Yy)return oke(e);e instanceof hd||(e=CE(e));var t=fW(e.r),r=fW(e.g),n=fW(e.b),i=lW((.2225045*t+.7168786*r+.0606169*n)/tke),a,o;return t===r&&r===n?a=o=i:(a=lW((.4360747*t+.3850649*r+.1430804*n)/eke),o=lW((.0139322*t+.0971045*r+.7141733*n)/rke)),new Hm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function S5(e,t,r,n){return arguments.length===1?ake(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 lW(e){return e>Pkt?Math.pow(e,1/3):e/nke+ike}function uW(e){return e>A5?e*e*e:nke*(e-ike)}function cW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function fW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ikt(e){if(e instanceof Yy)return new Yy(e.h,e.c,e.l,e.opacity);if(e instanceof Hm||(e=ake(e)),e.a===0&&e.b===0)return new Yy(NaN,0{vR();yR();sW();bR=18,eke=.96422,tke=1,rke=.82521,ike=4/29,A5=6/29,nke=3*A5*A5,Pkt=A5*A5*A5;Xy(Hm,S5,H_(Vm,{brighter(e){return new Hm(this.l+bR*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Hm(this.l-bR*(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=eke*uW(t),e=tke*uW(e),r=rke*uW(r),new hd(cW(3.1338561*t-1.6168667*e-.4906146*r),cW(-.9787684*t+1.9161415*e+.033454*r),cW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Xy(Yy,PE,H_(Vm,{brighter(e){return new Yy(this.h,this.c,this.l+bR*(e==null?1:e),this.opacity)},darker(e){return new Yy(this.h,this.c,this.l-bR*(e==null?1:e),this.opacity)},rgb(){return oke(this).rgb()}}))});function Dkt(e){if(e instanceof C2)return new C2(e.h,e.s,e.l,e.opacity);e instanceof hd||(e=CE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(cke*n+lke*t-uke*r)/(cke+lke-uke),a=n-i,o=(IE*(r-i)-dW*a)/wR,s=Math.sqrt(o*o+a*a)/(IE*i*(1-i)),l=s?Math.atan2(o,a)*xR-120:NaN;return new C2(l<0?l+360:l,s,i,e.opacity)}function M5(e,t,r,n){return arguments.length===1?Dkt(e):new C2(e,t,r,n==null?1:n)}function C2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var fke,hW,dW,wR,IE,lke,uke,cke,hke=su(()=>{vR();yR();sW();fke=-.14861,hW=1.78277,dW=-.29227,wR=-.90649,IE=1.97294,lke=IE*wR,uke=IE*hW,cke=hW*dW-wR*fke;Xy(C2,M5,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new C2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new C2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*_R,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new hd(255*(t+r*(fke*n+hW*i)),255*(t+r*(dW*n+wR*i)),255*(t+r*(IE*n)),this.opacity)}}))});var L2=su(()=>{yR();ske();hke()});function vW(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 TR(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 SR(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 vW((r-n/t)*t,i,a,o,s)}}var pW=su(()=>{AR()});var E5,gW=su(()=>{E5=e=>()=>e});function dke(e,t){return function(r){return e+r*t}}function Rkt(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?dke(e,r>180||r<-180?r-360*Math.round(r/360):r):E5(isNaN(e)?t:e)}function vke(e){return(e=+e)==1?qf:function(t,r){return r-t?Rkt(t,r,e):E5(isNaN(t)?r:t)}}function qf(e,t){var r=t-e;return r?dke(e,r):E5(isNaN(e)?t:e)}var P2=su(()=>{gW()});function pke(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{L2();AR();pW();P2();DE=function e(t){var r=vke(t);function n(i,a){var o=r((i=T5(i)).r,(a=T5(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=qf(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);gke=pke(TR),mke=pke(SR)});function k5(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 yke(e,t){return(MR(t)?k5:yW)(e,t)}function yW(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{RE();ER()});function kR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var xW=su(()=>{});function Fp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var zE=su(()=>{});function CR(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]=Z_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var bW=su(()=>{RE()});function zkt(e){return function(){return e}}function Fkt(e){return function(t){return e(t)+""}}function LR(e,t){var r=TW.lastIndex=wW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=TW.exec(e))&&(i=wW.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:Fp(n,i)})),r=wW.lastIndex;return r{zE();TW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wW=new RegExp(TW.source,"g")});function Z_(e,t){var r=typeof t,n;return t==null||r==="boolean"?E5(t):(r==="number"?Fp:r==="string"?(n=j_(t))?(t=n,DE):LR:t instanceof j_?DE:t instanceof Date?kR:MR(t)?k5:Array.isArray(t)?yW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?CR:Fp)(e,t)}var RE=su(()=>{L2();mW();_W();xW();zE();bW();AW();gW();ER()});function _ke(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var xke=su(()=>{});function bke(e,t){var r=W_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var wke=su(()=>{P2()});function Tke(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Ake=su(()=>{});function SW(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{Ske=180/Math.PI,PR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Eke(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?PR:SW(t.a,t.b,t.c,t.d,t.e,t.f)}function kke(e){return e==null?PR:(IR||(IR=document.createElementNS("http://www.w3.org/2000/svg","g")),IR.setAttribute("transform",e),(e=IR.transform.baseVal.consolidate())?(e=e.matrix,SW(e.a,e.b,e.c,e.d,e.e,e.f)):PR)}var IR,Cke=su(()=>{Mke()});function Lke(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 x=d.push("translate(",null,t,null,r);v.push({i:x-4,x:Fp(u,f)},{i:x-2,x:Fp(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:Fp(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:Fp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var x=d.push(i(d)+"scale(",null,",",null,")");v.push({i:x-4,x:Fp(u,f)},{i:x-2,x:Fp(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,x=h.length,b;++v{zE();Cke();Pke=Lke(Eke,"px, ","px)","deg)"),Ike=Lke(kke,", ",")",")")});function Rke(e){return((e=Math.exp(e))+1/e)/2}function Okt(e){return((e=Math.exp(e))-1/e)/2}function Bkt(e){return((e=Math.exp(2*e))-1)/(e+1)}var qkt,zke,Fke=su(()=>{qkt=1e-12;zke=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,x=d*d+v*v,b,g;if(x{L2();P2();Oke=qke(W_),Bke=qke(qf)});function MW(e,t){var r=qf((e=S5(e)).l,(t=S5(t)).l),n=qf(e.a,t.a),i=qf(e.b,t.b),a=qf(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 Uke=su(()=>{L2();P2()});function Vke(e){return function(t,r){var n=e((t=PE(t)).h,(r=PE(r)).h),i=qf(t.c,r.c),a=qf(t.l,r.l),o=qf(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 Hke,Gke,jke=su(()=>{L2();P2();Hke=Vke(W_),Gke=Vke(qf)});function Wke(e){return function t(r){r=+r;function n(i,a){var o=e((i=M5(i)).h,(a=M5(a)).h),s=qf(i.s,a.s),l=qf(i.l,a.l),u=qf(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 Zke,Xke,Yke=su(()=>{L2();P2();Zke=Wke(W_),Xke=Wke(qf)});function EW(e,t){t===void 0&&(t=e,e=Z_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{RE()});function Jke(e,t){for(var r=new Array(t),n=0;n{});var I2={};NQe(I2,{interpolate:()=>Z_,interpolateArray:()=>yke,interpolateBasis:()=>TR,interpolateBasisClosed:()=>SR,interpolateCubehelix:()=>Zke,interpolateCubehelixLong:()=>Xke,interpolateDate:()=>kR,interpolateDiscrete:()=>_ke,interpolateHcl:()=>Hke,interpolateHclLong:()=>Gke,interpolateHsl:()=>Oke,interpolateHslLong:()=>Bke,interpolateHue:()=>bke,interpolateLab:()=>MW,interpolateNumber:()=>Fp,interpolateNumberArray:()=>k5,interpolateObject:()=>CR,interpolateRgb:()=>DE,interpolateRgbBasis:()=>gke,interpolateRgbBasisClosed:()=>mke,interpolateRound:()=>Tke,interpolateString:()=>LR,interpolateTransformCss:()=>Pke,interpolateTransformSvg:()=>Ike,interpolateZoom:()=>zke,piecewise:()=>EW,quantize:()=>Jke});var D2=su(()=>{RE();_W();AR();pW();xW();xke();wke();zE();ER();bW();Ake();AW();Dke();Fke();mW();Nke();Uke();jke();Yke();Kke();$ke()});var DR=ye((tdr,Qke)=>{"use strict";var Nkt=ao(),Ukt=va();Qke.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),Nkt.pointStyle(t,n,i,r)}else Ukt.fill(t,l)}});var kW=ye((rdr,nCe)=>{"use strict";var eCe=xa(),tCe=va(),rCe=Mr(),Vkt=_v().resizeText,Hkt=DR();function Gkt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Vkt(e,t,"sunburst"),t.each(function(r){var n=eCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){eCe.select(this).call(iCe,o,a,e)})})}function iCe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=rCe.castOption(r,o,"marker.line.color")||tCe.defaultLine,l=rCe.castOption(r,o,"marker.line.width")||0;e.call(Hkt,t,r,n).style("stroke-width",l).call(tCe.stroke,s).style("opacity",a?r.leaf.opacity:null)}nCe.exports={style:Gkt,styleOne:iCe}});var Ky=ye(bs=>{"use strict";var R2=Mr(),jkt=va(),Wkt=Tg(),aCe=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 oCe(e){return e.data.data.pid}bs.getParent=function(e,t){return bs.findEntryWithLevel(e,oCe(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=aCe.formatPieValue;bs.formatPercent=function(e,t){var r=R2.formatPercent(e,0);return r==="0%"&&(r=aCe.formatPiePercent(e,t)),r}});var OE=ye((ndr,uCe)=>{"use strict";var C5=xa(),sCe=ba(),Ykt=rp().appendArrayPointValue,FE=Nc(),lCe=Mr(),Kkt=g3(),Wh=Ky(),Jkt=l_(),$kt=Jkt.formatPieValue;uCe.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 x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var b=n._fullData[s.index],g=v.data.data,E=g.i,k=Wh.isHierarchyRoot(v),S=Wh.getParent(l,v),L=Wh.getValue(v),_=function(Me){return lCe.castOption(b,E,Me)},C=_("hovertemplate"),M=FE.castHoverinfo(b,x,E),p=x.separators,P;if(C||M&&M!=="none"&&M!=="skip"){var T,F;u&&(T=o.cx+v.pxmid[0]*(1-v.rInscribed),F=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(T=v._hoverX,F=v._hoverY);var q={},V=[],H=[],X=function(Me){return V.indexOf(Me)!==-1};M&&(V=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),q.label=g.label,X("label")&&q.label&&H.push(q.label),g.hasOwnProperty("v")&&(q.value=g.v,q.valueLabel=$kt(q.value,p),X("value")&&H.push(q.valueLabel)),q.currentPath=v.currentPath=Wh.getPath(v.data),X("current path")&&!k&&H.push(q.currentPath);var G,N=[],W=function(){N.indexOf(G)===-1&&(H.push(G),N.push(G))};q.percentParent=v.percentParent=L/Wh.getValue(S),q.parent=v.parentString=Wh.getPtLabel(S),X("percent parent")&&(G=Wh.formatPercent(q.percentParent,p)+" of "+q.parent,W()),q.percentEntry=v.percentEntry=L/Wh.getValue(r),q.entry=v.entry=Wh.getPtLabel(r),X("percent entry")&&!k&&!v.onPathbar&&(G=Wh.formatPercent(q.percentEntry,p)+" of "+q.entry,W()),q.percentRoot=v.percentRoot=L/Wh.getValue(l),q.root=v.root=Wh.getPtLabel(l),X("percent root")&&!k&&(G=Wh.formatPercent(q.percentRoot,p)+" of "+q.root,W()),q.text=_("hovertext")||_("text"),X("text")&&(G=q.text,lCe.isValidTextValue(G)&&H.push(G)),P=[qE(v,b,a.eventDataKeys)];var re={trace:b,y:F,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:H.join("
"),name:C||X("name")?b.name:void 0,color:_("hoverlabel.bgcolor")||g.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),fontWeight:_("hoverlabel.font.weight"),fontStyle:_("hoverlabel.font.style"),fontVariant:_("hoverlabel.font.variant"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:P};u&&(re.x0=T-v.rInscribed*v.rpx1,re.x1=T+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(re.x=T,re.idealAlign=T<0?"left":"right");var ae=[];FE.loneHover(re,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ae}),P[0].bbox=ae[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||[qE(v,b,a.eventDataKeys)],event:C5.event})}},h=function(v){var x=n._fullLayout,b=n._fullData[s.index],g=C5.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=C5.event,n.emit("plotly_unhover",{points:[qE(g,b,a.eventDataKeys)],event:C5.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(FE.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),c){var E=t.select("path.surface");a.styleOne(E,g,b,n,{hovered:!1})}},d=function(v){var x=n._fullLayout,b=n._fullData[s.index],g=u&&(Wh.isHierarchyRoot(v)||Wh.isLeaf(v)),E=Wh.getPtId(v),k=Wh.isEntry(v)?Wh.findEntryWithChild(l,E):Wh.findEntryWithLevel(l,E),S=Wh.getPtId(k),L={points:[qE(v,b,a.eventDataKeys)],event:C5.event};g||(L.nextLevel=S);var _=Kkt.triggerHandler(n,"plotly_"+s.type+"click",L);if(_!==!1&&x.hovermode&&(n._hoverdata=[qE(v,b,a.eventDataKeys)],FE.click(n,C5.event)),!g&&_!==!1&&!n._dragging&&!n._transitioning){sCe.call("_storeDirectGUIEdit",b,x._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};FE.loneUnhover(x._hoverlayer.node()),sCe.call("animate",n,C,M)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function qE(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 BE=xa(),Qkt=SE(),Xg=(D2(),ab(I2)).interpolate,cCe=ao(),bv=Mr(),eCt=Ll(),vCe=_v(),fCe=vCe.recordMinTextSize,tCt=vCe.clearMinTextSize,pCe=hR(),rCt=l_().getRotationAngle,iCt=pCe.computeTransform,nCt=pCe.transformInsideText,aCt=kW().styleOne,oCt=N0().resizeText,sCt=OE(),CW=nW(),sl=Ky();RR.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&sl.hasTransition(r);if(tCt("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=BE.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){hCe(e,f,this,r)})})}else o.each(function(f){hCe(e,f,this,r)}),i.uniformtext.mode&&oCt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function hCe(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&sl.hasTransition(n),s=BE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=sl.findEntryWithLevel(f,c.level),d=sl.getMaxDepth(c),v=a._size,x=c.domain,b=v.w*(x.x[1]-x.x[0]),g=v.h*(x.y[1]-x.y[0]),E=.5*Math.min(b,g),k=u.cx=v.l+v.w*(x.x[1]+x.x[0])/2,S=u.cy=v.t+v.h*(1-x.y[0])-g/2;if(!h)return l.remove();var L=null,_={};o&&l.each(function(ge){_[sl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&sl.isEntry(ge)&&(L=ge)});var C=lCt(h).descendants(),M=h.height+1,p=0,P=d;u.hasMultipleRoots&&sl.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,p=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var T=rCt(c.rotation);T&&C.forEach(function(ge){ge.x0+=T,ge.x1+=T});var F=Math.min(M,d),q=function(ge){return(ge-p)/F*E},V=function(ge,ie){return[ge*Math.cos(ie),-ge*Math.sin(ie)]},H=function(ge){return bv.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,k,S)},X=function(ge){return k+dCe(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},G=function(ge){return S+dCe(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,sl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ge=BE.select(this),ie=ge.select("path.surface");ie.transition().attrTween("d",function(Ee){var Ae=ae(Ee);return function(ze){return H(Ae(ze))}});var Te=ge.select("g.slicetext");Te.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var W=sl.getPtId(L);l.each(function(ge){N===null&&sl.getPtId(ge)===W&&(N=ge.x1)})}var re=l;o&&(re=re.transition().each("end",function(){var ge=BE.select(this);sl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(ge){var ie=BE.select(this),Te=bv.ensureSingle(ie,"path","surface",function(De){De.style("pointer-events",i?"none":"all")});ge.rpx0=q(ge.y0),ge.rpx1=q(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=V(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(bv.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=uCt(ge,c),o?Te.transition().attrTween("d",function(De){var ce=_e(De);return function(Ge){return H(ce(Ge))}}):Te.attr("d",H),ie.call(sCt,h,e,t,{eventDataKeys:CW.eventDataKeys,transitionTime:CW.CLICK_TRANSITION_TIME,transitionEasing:CW.CLICK_TRANSITION_EASING}).call(sl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Te.call(aCt,ge,c,e);var Ee=bv.ensureSingle(ie,"g","slicetext"),Ae=bv.ensureSingle(Ee,"text","",function(De){De.attr("data-notex",1)}),ze=bv.ensureUniformFontSize(e,sl.determineTextFont(c,ge,a.font));Ae.text(RR.formatSliceLabel(ge,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(cCe.font,ze).call(eCt.convertToTspans,e);var Ce=cCe.bBox(Ae.node());ge.transform=nCt(Ce,ge,u),ge.transform.targetX=X(ge),ge.transform.targetY=G(ge);var me=function(De,ce){var Ge=De.transform;return iCt(Ge,ce),Ge.fontSize=ze.size,fCe(c.type,Ge,a),bv.getTextTransform(Ge)};o?Ae.transition().attrTween("transform",function(De){var ce=Me(De);return function(Ge){return me(ce(Ge),Ce)}}):Ae.attr("transform",me(ge,Ce))});function ae(ge){var ie=sl.getPtId(ge),Te=_[ie],Ee=_[sl.getPtId(h)],Ae;if(Ee){var ze=(ge.x1>Ee.x1?2*Math.PI:0)+T;Ae=ge.rpx1N?2*Math.PI:0)+T;Te={x0:Ae,x1:Ae}}else Te={rpx0:E,rpx1:E},bv.extendFlat(Te,ke(ge));else Te={rpx0:0,rpx1:0};else Te={x0:T,x1:T};return Xg(Te,Ee)}function Me(ge){var ie=_[sl.getPtId(ge)],Te,Ee=ge.transform;if(ie)Te=ie;else if(Te={rpx1:ge.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(ge.parent)if(N){var Ae=ge.x1>N?2*Math.PI:0;Te.x0=Te.x1=Ae}else bv.extendFlat(Te,ke(ge));else Te.x0=Te.x1=T;else Te.x0=Te.x1=T;var ze=Xg(Te.transform.textPosAngle,ge.transform.textPosAngle),Ce=Xg(Te.rpx1,ge.rpx1),me=Xg(Te.x0,ge.x0),De=Xg(Te.x1,ge.x1),ce=Xg(Te.transform.scale,Ee.scale),Ge=Xg(Te.transform.rotate,Ee.rotate),nt=Ee.rCenter===0?3:Te.transform.rCenter===0?1/3:1,ct=Xg(Te.transform.rCenter,Ee.rCenter),qt=function(rt){return ct(Math.pow(rt,nt))};return function(rt){var ot=Ce(rt),Dt=me(rt),kt=De(rt),Ct=qt(rt),Yt=V(ot,(Dt+kt)/2),xr=ze(rt),er={pxmid:Yt,rpx1:ot,transform:{textPosAngle:xr,rCenter:Ct,x:Ee.x,y:Ee.y}};return fCe(c.type,Ee,a),{transform:{targetX:X(er),targetY:G(er),scale:ce(rt),rotate:Ge(rt),rCenter:Ct}}}}function ke(ge){var ie=ge.parent,Te=_[sl.getPtId(ie)],Ee={};if(Te){var Ae=ie.children,ze=Ae.indexOf(ge),Ce=Ae.length,me=Xg(Te.x0,Te.x1);Ee.x0=me(ze/Ce),Ee.x1=me(ze/Ce)}else Ee.x0=Ee.x1=0;return Ee}}function lCt(e){return Qkt.partition().size([2*Math.PI,e.height+1])(e)}RR.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=sl.isHierarchyRoot(e),h=sl.getParent(c,e),d=sl.getValue(e);if(!a){var v=o.split("+"),x=function(p){return v.indexOf(p)!==-1},b=[],g;if(x("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&x("value")&&b.push(sl.formatValue(u.v,s)),!f){x("current path")&&b.push(sl.getPath(e.data));var E=0;x("percent parent")&&E++,x("percent entry")&&E++,x("percent root")&&E++;var k=E>1;if(E){var S,L=function(p){g=sl.formatPercent(S,s),k&&(g+=" of "+p),b.push(g)};x("percent parent")&&!f&&(S=d/sl.getValue(h),L("parent")),x("percent entry")&&(S=d/sl.getValue(t),L("entry")),x("percent root")&&(S=d/sl.getValue(c),L("root"))}}return x("text")&&(g=bv.castOption(r,u.i,"text"),bv.isValidTextValue(g)&&b.push(g)),b.join("
")}var _=bv.castOption(r,u.i,"texttemplate");if(!_)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=sl.formatValue(u.v,s)),C.currentPath=sl.getPath(e.data),f||(C.percentParent=d/sl.getValue(h),C.percentParentLabel=sl.formatPercent(C.percentParent,s),C.parent=sl.getPtLabel(h)),C.percentEntry=d/sl.getValue(t),C.percentEntryLabel=sl.formatPercent(C.percentEntry,s),C.entry=sl.getPtLabel(t),C.percentRoot=d/sl.getValue(c),C.percentRootLabel=sl.formatPercent(C.percentRoot,s),C.root=sl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var M=bv.castOption(r,u.i,"text");return(bv.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=bv.castOption(r,u.i,"customdata"),bv.texttemplateString(_,C,i._d3locale,C,r._meta||{})};function uCt(e){return e.rpx0===0&&bv.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function dCe(e){return cCt(e.rpx1,e.transform.textPosAngle)}function cCt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var mCe=ye((odr,gCe)=>{"use strict";gCe.exports={moduleType:"trace",name:"sunburst",basePlotModule:PEe(),categories:[],animatable:!0,attributes:AE(),layoutAttributes:aW(),supplyDefaults:BEe(),supplyLayoutDefaults:UEe(),calc:EE().calc,crossTraceCalc:EE().crossTraceCalc,plot:zR().plot,style:kW().style,colorbar:Kd(),meta:{}}});var _Ce=ye((sdr,yCe)=>{"use strict";yCe.exports=mCe()});var bCe=ye(L5=>{"use strict";var xCe=Yu();L5.name="treemap";L5.plot=function(e,t,r,n){xCe.plotBasePlot(L5.name,e,t,r,n)};L5.clean=function(e,t,r,n){xCe.cleanBasePlot(L5.name,e,t,r,n)}});var z2=ye((udr,wCe)=>{"use strict";wCe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var FR=ye((cdr,ACe)=>{"use strict";var fCt=Wo().hovertemplateAttrs,hCt=Wo().texttemplateAttrs,dCt=Kl(),vCt=Ju().attributes,F2=A2(),Q0=AE(),TCe=z2(),LW=no().extendFlat,pCt=Ed().pattern;ACe.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:LW({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:pCt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Q0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},dCt("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:LW({},F2.textfont,{}),editType:"calc"},text:F2.text,textinfo:Q0.textinfo,texttemplate:hCt({editType:"plot"},{keys:TCe.eventDataKeys.concat(["label","value"])}),hovertext:F2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:fCt({},{keys:TCe.eventDataKeys}),textfont:F2.textfont,insidetextfont:F2.insidetextfont,outsidetextfont:LW({},F2.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:F2.sort,root:Q0.root,domain:vCt({name:"treemap",trace:!0,editType:"calc"})}});var PW=ye((fdr,SCe)=>{"use strict";SCe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var CCe=ye((hdr,kCe)=>{"use strict";var MCe=Mr(),gCt=FR(),mCt=va(),yCt=Ju().defaults,_Ct=r0().handleText,xCt=Qb().TEXTPAD,bCt=S2().handleMarkerDefaults,ECe=Mu(),wCt=ECe.hasColorscale,TCt=ECe.handleDefaults;kCe.exports=function(t,r,n,i){function a(b,g){return MCe.coerce(t,r,gCt,b,g)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),r.texttemplate||a("textinfo",MCe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f=a("pathbar.visible"),h="auto";_Ct(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;bCt(t,r,i,a);var v=r._hasColorscale=wCt(t,"marker","colors")||(t.marker||{}).coloraxis;v?TCt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;a("marker.pad.t",d?x/4:x),a("marker.pad.l",x/4),a("marker.pad.r",x/4),a("marker.pad.b",d?x:x/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:mCt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*xCt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),yCt(r,i,a),r._length=null}});var PCe=ye((ddr,LCe)=>{"use strict";var ACt=Mr(),SCt=PW();LCe.exports=function(t,r){function n(i,a){return ACt.coerce(t,r,SCt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var DW=ye(IW=>{"use strict";var ICe=EE();IW.calc=function(e,t){return ICe.calc(e,t)};IW.crossTraceCalc=function(e){return ICe._runCrossTraceCalc("treemap",e)}});var RW=ye((pdr,DCe)=>{"use strict";DCe.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 P5=SE(),MCt=RW();RCe.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=P5.treemap().tile(ECt(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)&&MCt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function ECt(e,t){switch(e){case"squarify":return P5.treemapSquarify.ratio(t);case"binary":return P5.treemapBinary;case"dice":return P5.treemapDice;case"slice":return P5.treemapSlice;default:return P5.treemapSliceDice}}});var qR=ye((mdr,OCe)=>{"use strict";var zCe=xa(),I5=va(),FCe=Mr(),FW=Ky(),kCt=_v().resizeText,CCt=DR();function LCt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");kCt(e,t,"treemap"),t.each(function(r){var n=zCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){zCe.select(this).call(qCe,o,a,e,{hovered:!1})})})}function qCe(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=FW.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=FCe.castOption(r,s,"marker.line.color")||I5.defaultLine,u=FCe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=I5.combine(I5.addOpacity(r._backgroundColor,.75),c),x;if(d===!0){var b=FW.getMaxDepth(r);isFinite(b)?FW.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var g=0;g{"use strict";var BCe=xa(),OR=Mr(),NCe=ao(),PCt=Ll(),ICt=zW(),UCe=qR().styleOne,qW=z2(),D5=Ky(),DCt=OE(),OW=!0;VCe.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,x=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,g=a.makeUpdateTextInterpolator,E={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],_=L.trace,C=L.hierarchy,M=s/_._entryDepth,p=D5.listPath(n.data,"id"),P=ICt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(F){var q=p.indexOf(F.data.id);return q===-1?!1:(F.x0=M*q,F.x1=M*(q+1),F.y0=o,F.y1=o+l,F.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,D5.getPtId),i.enter().append("g").classed("pathbar",!0),x(i,OW,E,[s,l],f),i.order();var T=i;v&&(T=T.transition().each("end",function(){var F=BCe.select(this);D5.setSliceCursor(F,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(F){F._x0=u(F.x0),F._x1=u(F.x1),F._y0=c(F.y0),F._y1=c(F.y1),F._hoverX=u(F.x1-Math.min(s,l)/2),F._hoverY=c(F.y1-l/2);var q=BCe.select(this),V=OR.ensureSingle(q,"path","surface",function(N){N.style("pointer-events",k?"none":"all")});v?V.transition().attrTween("d",function(N){var W=b(N,OW,E,[s,l]);return function(re){return f(W(re))}}):V.attr("d",f),q.call(DCt,n,t,r,{styleOne:UCe,eventDataKeys:qW.eventDataKeys,transitionTime:qW.CLICK_TRANSITION_TIME,transitionEasing:qW.CLICK_TRANSITION_EASING}).call(D5.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),V.call(UCe,F,_,t,{hovered:!1}),F._text=(D5.getPtLabel(F)||"").split("
").join(" ")||"";var H=OR.ensureSingle(q,"g","slicetext"),X=OR.ensureSingle(H,"text","",function(N){N.attr("data-notex",1)}),G=OR.ensureUniformFontSize(t,D5.determineTextFont(_,F,S.font,{onPathbar:!0}));X.text(F._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(NCe.font,G).call(PCt.convertToTspans,t),F.textBB=NCe.bBox(X.node()),F.transform=h(F,{fontSize:G.size,onPathbar:!0}),F.transform.fontSize=G.size,v?X.transition().attrTween("transform",function(N){var W=g(N,OW,E,[s,l]);return function(re){return d(W(re))}}):X.attr("transform",d(F))})}});var ZCe=ye((_dr,WCe)=>{"use strict";var GCe=xa(),BW=(D2(),ab(I2)).interpolate,X_=Ky(),NE=Mr(),jCe=Qb().TEXTPAD,RCt=i2(),zCt=RCt.toMoveInsideBar,FCt=_v(),NW=FCt.recordMinTextSize,qCt=z2(),OCt=HCe();function q2(e){return X_.isHierarchyRoot(e)?"":X_.getPtId(e)}WCe.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=X_.findEntryWithLevel(f,l.level),d=GCe.select(n),v=d.selectAll("g.pathbar"),x=d.selectAll("g.slice");if(!h){v.remove(),x.remove();return}var b=X_.isHierarchyRoot(h),g=!o.uniformtext.mode&&X_.hasTransition(i),E=X_.getMaxDepth(l),k=function(Ke){return Ke.data.depth-h.data.depth-1?C+P:-(p+P):0,F={x0:M,x1:M,y0:T,y1:T+p},q=function(Ke,xt,bt){var Lt=l.tiling.pad,St=function($t){return $t-Lt<=xt.x0},Et=function($t){return $t+Lt>=xt.x1},dt=function($t){return $t-Lt<=xt.y0},Ht=function($t){return $t+Lt>=xt.y1};return Ke.x0===xt.x0&&Ke.x1===xt.x1&&Ke.y0===xt.y0&&Ke.y1===xt.y1?{x0:Ke.x0,x1:Ke.x1,y0:Ke.y0,y1:Ke.y1}:{x0:St(Ke.x0-Lt)?0:Et(Ke.x0-Lt)?bt[0]:Ke.x0,x1:St(Ke.x1+Lt)?0:Et(Ke.x1+Lt)?bt[0]:Ke.x1,y0:dt(Ke.y0-Lt)?0:Ht(Ke.y0-Lt)?bt[1]:Ke.y0,y1:dt(Ke.y1+Lt)?0:Ht(Ke.y1+Lt)?bt[1]:Ke.y1}},V=null,H={},X={},G=null,N=function(Ke,xt){return xt?H[q2(Ke)]:X[q2(Ke)]},W=function(Ke,xt,bt,Lt){if(xt)return H[q2(f)]||F;var St=X[l.level]||bt;return k(Ke)?q(Ke,St,Lt):{}};s.hasMultipleRoots&&b&&E++,l._maxDepth=E,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-_/2+S.l+S.w*(L.x[1]+L.x[0])/2,ae=-C/2+S.t+S.h*(1-(L.y[1]+L.y[0])/2),_e=function(Ke){return re+Ke},Me=function(Ke){return ae+Ke},ke=Me(0),ge=_e(0),ie=function(Ke){return ge+Ke},Te=function(Ke){return ke+Ke};function Ee(Ke,xt){return Ke+","+xt}var Ae=ie(0),ze=function(Ke){Ke.x=Math.max(Ae,Ke.x)},Ce=l.pathbar.edgeshape,me=function(Ke){var xt=ie(Math.max(Math.min(Ke.x0,Ke.x0),0)),bt=ie(Math.min(Math.max(Ke.x1,Ke.x1),M)),Lt=Te(Ke.y0),St=Te(Ke.y1),Et=p/2,dt={},Ht={};dt.x=xt,Ht.x=bt,dt.y=Ht.y=(Lt+St)/2;var $t={x:xt,y:Lt},fr={x:bt,y:Lt},_r={x:bt,y:St},Br={x:xt,y:St};return Ce===">"?($t.x-=Et,fr.x-=Et,_r.x-=Et,Br.x-=Et):Ce==="/"?(_r.x-=Et,Br.x-=Et,dt.x-=Et/2,Ht.x-=Et/2):Ce==="\\"?($t.x-=Et,fr.x-=Et,dt.x-=Et/2,Ht.x-=Et/2):Ce==="<"&&(dt.x-=Et,Ht.x-=Et),ze($t),ze(Br),ze(dt),ze(fr),ze(_r),ze(Ht),"M"+Ee($t.x,$t.y)+"L"+Ee(fr.x,fr.y)+"L"+Ee(Ht.x,Ht.y)+"L"+Ee(_r.x,_r.y)+"L"+Ee(Br.x,Br.y)+"L"+Ee(dt.x,dt.y)+"Z"},De=l[c?"tiling":"marker"].pad,ce=function(Ke){return l.textposition.indexOf(Ke)!==-1},Ge=ce("top"),nt=ce("left"),ct=ce("right"),qt=ce("bottom"),rt=function(Ke){var xt=_e(Ke.x0),bt=_e(Ke.x1),Lt=Me(Ke.y0),St=Me(Ke.y1),Et=bt-xt,dt=St-Lt;if(!Et||!dt)return"";var Ht=l.marker.cornerradius||0,$t=Math.min(Ht,Et/2,dt/2);$t&&Ke.data&&Ke.data.data&&Ke.data.data.label&&(Ge&&($t=Math.min($t,De.t)),nt&&($t=Math.min($t,De.l)),ct&&($t=Math.min($t,De.r)),qt&&($t=Math.min($t,De.b)));var fr=function(_r,Br){return $t?"a"+Ee($t,$t)+" 0 0 1 "+Ee(_r,Br):""};return"M"+Ee(xt,Lt+$t)+fr($t,-$t)+"L"+Ee(bt-$t,Lt)+fr($t,$t)+"L"+Ee(bt,St-$t)+fr(-$t,$t)+"L"+Ee(xt+$t,St)+fr(-$t,-$t)+"Z"},ot=function(Ke,xt){var bt=Ke.x0,Lt=Ke.x1,St=Ke.y0,Et=Ke.y1,dt=Ke.textBB,Ht=Ge||xt.isHeader&&!qt,$t=Ht?"start":qt?"end":"middle",fr=ce("right"),_r=ce("left")||xt.onPathbar,Br=_r?-1:fr?1:0;if(xt.isHeader){if(bt+=(c?De:De.l)-jCe,Lt-=(c?De:De.r)-jCe,bt>=Lt){var Or=(bt+Lt)/2;bt=Or,Lt=Or}var Nr;qt?(Nr=Et-(c?De:De.b),St{"use strict";var BCt=xa(),NCt=Ky(),UCt=_v(),VCt=UCt.clearMinTextSize,HCt=N0().resizeText,XCe=ZCe();YCe.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(VCt(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&&NCt.hasTransition(n)){i&&(f=i());var d=BCt.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){XCe(t,v,this,n,s)})})}else c.each(function(v){XCe(t,v,this,n,s)}),l.uniformtext.mode&&HCt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var e6e=ye((bdr,QCe)=>{"use strict";var KCe=xa(),BR=Mr(),JCe=ao(),GCt=Ll(),jCt=zW(),$Ce=qR().styleOne,VW=z2(),Y_=Ky(),WCt=OE(),ZCt=zR().formatSliceLabel,HW=!1;QCe.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,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,g=a.prevEntry,E={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,p=_.textposition.indexOf("bottom")!==-1,P=!p&&!_.marker.pad.t||p&&!_.marker.pad.b,T=jCt(n,[o,s],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),F=T.descendants(),q=1/0,V=-1/0;F.forEach(function(W){var re=W.depth;re>=_._maxDepth?(W.x0=W.x1=(W.x0+W.x1)/2,W.y0=W.y1=(W.y0+W.y1)/2):(q=Math.min(q,re),V=Math.max(V,re))}),i=i.data(F,Y_.getPtId),_._maxVisibleLayers=isFinite(V)?V-q+1:0,i.enter().append("g").classed("slice",!0),v(i,HW,E,[o,s],c),i.order();var H=null;if(d&&g){var X=Y_.getPtId(g);i.each(function(W){H===null&&Y_.getPtId(W)===X&&(H={x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1})})}var G=function(){return H||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var W=KCe.select(this);Y_.setSliceCursor(W,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(W){var re=Y_.isHeader(W,_);W._x0=l(W.x0),W._x1=l(W.x1),W._y0=u(W.y0),W._y1=u(W.y1),W._hoverX=l(W.x1-_.marker.pad.r),W._hoverY=u(p?W.y1-_.marker.pad.b/2:W.y0+_.marker.pad.t/2);var ae=KCe.select(this),_e=BR.ensureSingle(ae,"path","surface",function(Ee){Ee.style("pointer-events",k?"none":"all")});d?_e.transition().attrTween("d",function(Ee){var Ae=x(Ee,HW,G(),[o,s]);return function(ze){return c(Ae(ze))}}):_e.attr("d",c),ae.call(WCt,n,t,r,{styleOne:$Ce,eventDataKeys:VW.eventDataKeys,transitionTime:VW.CLICK_TRANSITION_TIME,transitionEasing:VW.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call($Ce,W,_,t,{hovered:!1}),W.x0===W.x1||W.y0===W.y1?W._text="":re?W._text=P?"":Y_.getPtLabel(W)||"":W._text=ZCt(W,n,_,r,S)||"";var Me=BR.ensureSingle(ae,"g","slicetext"),ke=BR.ensureSingle(Me,"text","",function(Ee){Ee.attr("data-notex",1)}),ge=BR.ensureUniformFontSize(t,Y_.determineTextFont(_,W,S.font)),ie=W._text||" ",Te=re&&ie.indexOf("
")===-1;ke.text(ie).classed("slicetext",!0).attr("text-anchor",M?"end":C||Te?"start":"middle").call(JCe.font,ge).call(GCt.convertToTspans,t),W.textBB=JCe.bBox(ke.node()),W.transform=f(W,{fontSize:ge.size,isHeader:re}),W.transform.fontSize=ge.size,d?ke.transition().attrTween("transform",function(Ee){var Ae=b(Ee,HW,G(),[o,s]);return function(ze){return h(Ae(ze))}}):ke.attr("transform",h(W))}),H}});var r6e=ye((wdr,t6e)=>{"use strict";var XCt=UW(),YCt=e6e();t6e.exports=function(t,r,n,i){return XCt(t,r,n,i,{type:"treemap",drawDescendants:YCt})}});var n6e=ye((Tdr,i6e)=>{"use strict";i6e.exports={moduleType:"trace",name:"treemap",basePlotModule:bCe(),categories:[],animatable:!0,attributes:FR(),layoutAttributes:PW(),supplyDefaults:CCe(),supplyLayoutDefaults:PCe(),calc:DW().calc,crossTraceCalc:DW().crossTraceCalc,plot:r6e(),style:qR().style,colorbar:Kd(),meta:{}}});var o6e=ye((Adr,a6e)=>{"use strict";a6e.exports=n6e()});var l6e=ye(R5=>{"use strict";var s6e=Yu();R5.name="icicle";R5.plot=function(e,t,r,n){s6e.plotBasePlot(R5.name,e,t,r,n)};R5.clean=function(e,t,r,n){s6e.cleanBasePlot(R5.name,e,t,r,n)}});var GW=ye((Mdr,c6e)=>{"use strict";var KCt=Wo().hovertemplateAttrs,JCt=Wo().texttemplateAttrs,$Ct=Kl(),QCt=Ju().attributes,UE=A2(),o0=AE(),NR=FR(),u6e=z2(),e6t=no().extendFlat,t6t=Ed().pattern;c6e.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:NR.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:e6t({colors:o0.marker.colors,line:o0.marker.line,pattern:t6t,editType:"calc"},$Ct("marker",{colorAttr:"colors",anim:!1})),leaf:o0.leaf,pathbar:NR.pathbar,text:UE.text,textinfo:o0.textinfo,texttemplate:JCt({editType:"plot"},{keys:u6e.eventDataKeys.concat(["label","value"])}),hovertext:UE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:KCt({},{keys:u6e.eventDataKeys}),textfont:UE.textfont,insidetextfont:UE.insidetextfont,outsidetextfont:NR.outsidetextfont,textposition:NR.textposition,sort:UE.sort,root:o0.root,domain:QCt({name:"icicle",trace:!0,editType:"calc"})}});var jW=ye((Edr,f6e)=>{"use strict";f6e.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var p6e=ye((kdr,v6e)=>{"use strict";var h6e=Mr(),r6t=GW(),i6t=va(),n6t=Ju().defaults,a6t=r0().handleText,o6t=Qb().TEXTPAD,s6t=S2().handleMarkerDefaults,d6e=Mu(),l6t=d6e.hasColorscale,u6t=d6e.handleDefaults;v6e.exports=function(t,r,n,i){function a(d,v){return h6e.coerce(t,r,r6t,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"),r.texttemplate||a("textinfo",h6e.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c=a("pathbar.visible"),f="auto";a6t(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),s6t(t,r,i,a);var h=r._hasColorscale=l6t(t,"marker","colors")||(t.marker||{}).coloraxis;h&&u6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:i6t.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*o6t),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),n6t(r,i,a),r._length=null}});var m6e=ye((Cdr,g6e)=>{"use strict";var c6t=Mr(),f6t=jW();g6e.exports=function(t,r){function n(i,a){return c6t.coerce(t,r,f6t,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var ZW=ye(WW=>{"use strict";var y6e=EE();WW.calc=function(e,t){return y6e.calc(e,t)};WW.crossTraceCalc=function(e){return y6e._runCrossTraceCalc("icicle",e)}});var x6e=ye((Pdr,_6e)=>{"use strict";var h6t=SE(),d6t=RW();_6e.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=h6t.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&d6t(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var XW=ye((Idr,S6e)=>{"use strict";var b6e=xa(),w6e=va(),T6e=Mr(),v6t=_v().resizeText,p6t=DR();function g6t(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");v6t(e,t,"icicle"),t.each(function(r){var n=b6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){b6e.select(this).call(A6e,o,a,e)})})}function A6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=T6e.castOption(r,o,"marker.line.color")||w6e.defaultLine,l=T6e.castOption(r,o,"marker.line.width")||0;e.call(p6t,t,r,n).style("stroke-width",l).call(w6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}S6e.exports={style:g6t,styleOne:A6e}});var L6e=ye((Ddr,C6e)=>{"use strict";var M6e=xa(),UR=Mr(),E6e=ao(),m6t=Ll(),y6t=x6e(),k6e=XW().styleOne,YW=z2(),z5=Ky(),_6t=OE(),x6t=zR().formatSliceLabel,KW=!1;C6e.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,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,g=a.prevEntry,E={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,p=_.textposition.indexOf("bottom")!==-1,P=y6t(n,[o,s],{flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,orientation:_.tiling.orientation,pad:{inner:_.tiling.pad},maxDepth:_._maxDepth}),T=P.descendants(),F=1/0,q=-1/0;T.forEach(function(N){var W=N.depth;W>=_._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(F=Math.min(F,W),q=Math.max(q,W))}),i=i.data(T,z5.getPtId),_._maxVisibleLayers=isFinite(q)?q-F+1:0,i.enter().append("g").classed("slice",!0),v(i,KW,E,[o,s],c),i.order();var V=null;if(d&&g){var H=z5.getPtId(g);i.each(function(N){V===null&&z5.getPtId(N)===H&&(V={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var X=function(){return V||{x0:0,x1:o,y0:0,y1:s}},G=i;return d&&(G=G.transition().each("end",function(){var N=M6e.select(this);z5.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.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-_.tiling.pad),N._hoverY=u(p?N.y1-_.tiling.pad/2:N.y0+_.tiling.pad/2);var W=M6e.select(this),re=UR.ensureSingle(W,"path","surface",function(ke){ke.style("pointer-events",k?"none":"all")});d?re.transition().attrTween("d",function(ke){var ge=x(ke,KW,X(),[o,s],{orientation:_.tiling.orientation,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1});return function(ie){return c(ge(ie))}}):re.attr("d",c),W.call(_6t,n,t,r,{styleOne:k6e,eventDataKeys:YW.eventDataKeys,transitionTime:YW.CLICK_TRANSITION_TIME,transitionEasing:YW.CLICK_TRANSITION_EASING}).call(z5.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(k6e,N,_,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=x6t(N,n,_,r,S)||"";var ae=UR.ensureSingle(W,"g","slicetext"),_e=UR.ensureSingle(ae,"text","",function(ke){ke.attr("data-notex",1)}),Me=UR.ensureUniformFontSize(t,z5.determineTextFont(_,N,S.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(E6e.font,Me).call(m6t.convertToTspans,t),N.textBB=E6e.bBox(_e.node()),N.transform=f(N,{fontSize:Me.size}),N.transform.fontSize=Me.size,d?_e.transition().attrTween("transform",function(ke){var ge=b(ke,KW,X(),[o,s]);return function(ie){return h(ge(ie))}}):_e.attr("transform",h(N))}),V}});var I6e=ye((Rdr,P6e)=>{"use strict";var b6t=UW(),w6t=L6e();P6e.exports=function(t,r,n,i){return b6t(t,r,n,i,{type:"icicle",drawDescendants:w6t})}});var R6e=ye((zdr,D6e)=>{"use strict";D6e.exports={moduleType:"trace",name:"icicle",basePlotModule:l6e(),categories:[],animatable:!0,attributes:GW(),layoutAttributes:jW(),supplyDefaults:p6e(),supplyLayoutDefaults:m6e(),calc:ZW().calc,crossTraceCalc:ZW().crossTraceCalc,plot:I6e(),style:XW().style,colorbar:Kd(),meta:{}}});var F6e=ye((Fdr,z6e)=>{"use strict";z6e.exports=R6e()});var O6e=ye(F5=>{"use strict";var q6e=Yu();F5.name="funnelarea";F5.plot=function(e,t,r,n){q6e.plotBasePlot(F5.name,e,t,r,n)};F5.clean=function(e,t,r,n){q6e.cleanBasePlot(F5.name,e,t,r,n)}});var JW=ye((Odr,B6e)=>{"use strict";var tv=A2(),T6t=vl(),A6t=Ju().attributes,S6t=Wo().hovertemplateAttrs,M6t=Wo().texttemplateAttrs,O2=no().extendFlat;B6e.exports={labels:tv.labels,label0:tv.label0,dlabel:tv.dlabel,values:tv.values,marker:{colors:tv.marker.colors,line:{color:O2({},tv.marker.line.color,{dflt:null}),width:O2({},tv.marker.line.width,{dflt:1}),editType:"calc"},pattern:tv.marker.pattern,editType:"calc"},text:tv.text,hovertext:tv.hovertext,scalegroup:O2({},tv.scalegroup,{}),textinfo:O2({},tv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:M6t({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:O2({},T6t.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S6t({},{keys:["label","color","value","text","percent"]}),textposition:O2({},tv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:tv.textfont,insidetextfont:tv.insidetextfont,title:{text:tv.title.text,font:tv.title.font,position:O2({},tv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:A6t({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 $W=ye((Bdr,N6e)=>{"use strict";var E6t=lR().hiddenlabels;N6e.exports={hiddenlabels:E6t,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var H6e=ye((Ndr,V6e)=>{"use strict";var U6e=Mr(),k6t=JW(),C6t=Ju().defaults,L6t=r0().handleText,P6t=S2().handleLabelsAndValues,I6t=S2().handleMarkerDefaults;V6e.exports=function(t,r,n,i){function a(x,b){return U6e.coerce(t,r,k6t,x,b)}var o=a("labels"),s=a("values"),l=P6t(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,I6t(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate"),h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),f||h&&h!=="none"){var d=a("textposition");L6t(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");C6t(r,i,a);var v=a("title.text");v&&(a("title.position"),U6e.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var j6e=ye((Udr,G6e)=>{"use strict";var D6t=Mr(),R6t=$W();G6e.exports=function(t,r){function n(i,a){return D6t.coerce(t,r,R6t,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var QW=ye((Vdr,Z6e)=>{"use strict";var W6e=y5();function z6t(e,t){return W6e.calc(e,t)}function F6t(e){W6e.crossTraceCalc(e,{type:"funnelarea"})}Z6e.exports={calc:z6t,crossTraceCalc:F6t}});var $6e=ye((Hdr,J6e)=>{"use strict";var B2=xa(),eZ=ao(),K_=Mr(),q6t=K_.strScale,X6e=K_.strTranslate,Y6e=Ll(),O6t=i2(),B6t=O6t.toMoveInsideBar,K6e=_v(),N6t=K6e.recordMinTextSize,U6t=K6e.clearMinTextSize,V6t=l_(),q5=hR(),H6t=q5.attachFxHandlers,G6t=q5.determineInsideTextFont,j6t=q5.layoutAreas,W6t=q5.prerenderTitles,Z6t=q5.positionTitleOutside,X6t=q5.formatSliceLabel;J6e.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;U6t("funnelarea",i),W6t(r,t),j6t(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=B2.select(this),s=a[0],l=s.trace;K6t(a),o.each(function(){var u=B2.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){B2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,x=B2.select(this),b=x.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(H6t,t,a);var g="M"+(d+f.TR[0])+","+(v+f.TR[1])+tZ(f.TR,f.BR)+tZ(f.BR,f.BL)+tZ(f.BL,f.TL)+"Z";b.attr("d",g),X6t(t,f,s);var E=V6t.castOption(l.textposition,f.pts),k=x.selectAll("g.slicetext").data(f.text&&E!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var S=K_.ensureSingle(B2.select(this),"text","",function(F){F.attr("data-notex",1)}),L=K_.ensureUniformFontSize(t,G6t(l,f,i.font));S.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(eZ.font,L).call(Y6e.convertToTspans,t);var _=eZ.bBox(S.node()),C,M,p,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,p=Math.min(f.TR[0],f.BR[0])+d,C=B6t(M,p,P,T,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,N6t(l.type,C,i),a[h].transform=C,K_.setTransormAndDisplay(S,C)})});var c=B2.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(B2.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(eZ.font,l.title.font).call(Y6e.convertToTspans,t);var d=Z6t(s,i._size);f.attr("transform",X6e(d.x,d.y)+q6t(Math.min(1,d.scale))+X6e(d.tx,d.ty))})})})};function tZ(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function Y6t(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function K6t(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var q=Math.sqrt(u);return{x:q,y:-q}}function f(){var q=c();return[q.x,q.y]}var h,d=[];d.push(f());var v,x;for(v=e.length-1;v>-1;v--)if(x=e[v],!x.hidden){var b=x.v/l;u+=b,d.push(f())}var g=1/0,E=-1/0;for(v=0;v-1;v--)if(x=e[v],!x.hidden){P+=1;var T=d[P][0],F=d[P][1];x.TL=[-T,F],x.TR=[T,F],x.BL=M,x.BR=p,x.pxmid=Y6t(x.TR,x.BR),M=x.TL,p=x.TR}}});var tLe=ye((Gdr,eLe)=>{"use strict";var Q6e=xa(),J6t=z3(),$6t=_v().resizeText;eLe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");$6t(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=Q6e.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Q6e.select(this).call(J6t,s,a,t)})})}});var iLe=ye((jdr,rLe)=>{"use strict";rLe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:O6e(),categories:["pie-like","funnelarea","showLegend"],attributes:JW(),layoutAttributes:$W(),supplyDefaults:H6e(),supplyLayoutDefaults:j6e(),calc:QW().calc,crossTraceCalc:QW().crossTraceCalc,plot:$6e(),style:tLe(),styleOne:z3(),meta:{}}});var aLe=ye((Wdr,nLe)=>{"use strict";nLe.exports=iLe()});var Dd=ye((Zdr,oLe)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){"use strict";var s;function l(Le,xe){if(!(Le instanceof xe))throw new TypeError("Cannot call a class as a function")}function u(Le,xe){for(var Se=0;SeM)throw new RangeError('The value "'+Le+'" is invalid for option "size"');var xe=new Uint8Array(Le);return Object.setPrototypeOf(xe,T.prototype),xe}function T(Le,xe,Se){if(typeof Le=="number"){if(typeof xe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(Le)}return F(Le,xe,Se)}T.poolSize=8192;function F(Le,xe,Se){if(typeof Le=="string")return X(Le,xe);if(ArrayBuffer.isView(Le))return N(Le);if(Le==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+S(Le));if(Ne(Le,ArrayBuffer)||Le&&Ne(Le.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ne(Le,SharedArrayBuffer)||Le&&Ne(Le.buffer,SharedArrayBuffer)))return W(Le,xe,Se);if(typeof Le=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var lt=Le.valueOf&&Le.valueOf();if(lt!=null&<!==Le)return T.from(lt,xe,Se);var Gt=re(Le);if(Gt)return Gt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Le[Symbol.toPrimitive]=="function")return T.from(Le[Symbol.toPrimitive]("string"),xe,Se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+S(Le))}T.from=function(Le,xe,Se){return F(Le,xe,Se)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function q(Le){if(typeof Le!="number")throw new TypeError('"size" argument must be of type number');if(Le<0)throw new RangeError('The value "'+Le+'" is invalid for option "size"')}function V(Le,xe,Se){return q(Le),Le<=0?P(Le):xe!==void 0?typeof Se=="string"?P(Le).fill(xe,Se):P(Le).fill(xe):P(Le)}T.alloc=function(Le,xe,Se){return V(Le,xe,Se)};function H(Le){return q(Le),P(Le<0?0:ae(Le)|0)}T.allocUnsafe=function(Le){return H(Le)},T.allocUnsafeSlow=function(Le){return H(Le)};function X(Le,xe){if((typeof xe!="string"||xe==="")&&(xe="utf8"),!T.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);var Se=Me(Le,xe)|0,lt=P(Se),Gt=lt.write(Le,xe);return Gt!==Se&&(lt=lt.slice(0,Gt)),lt}function G(Le){for(var xe=Le.length<0?0:ae(Le.length)|0,Se=P(xe),lt=0;lt=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return Le|0}function _e(Le){return+Le!=Le&&(Le=0),T.alloc(+Le)}T.isBuffer=function(xe){return xe!=null&&xe._isBuffer===!0&&xe!==T.prototype},T.compare=function(xe,Se){if(Ne(xe,Uint8Array)&&(xe=T.from(xe,xe.offset,xe.byteLength)),Ne(Se,Uint8Array)&&(Se=T.from(Se,Se.offset,Se.byteLength)),!T.isBuffer(xe)||!T.isBuffer(Se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(xe===Se)return 0;for(var lt=xe.length,Gt=Se.length,Vt=0,ar=Math.min(lt,Gt);VtGt.length?(T.isBuffer(ar)||(ar=T.from(ar)),ar.copy(Gt,Vt)):Uint8Array.prototype.set.call(Gt,ar,Vt);else if(T.isBuffer(ar))ar.copy(Gt,Vt);else throw new TypeError('"list" argument must be an Array of Buffers');Vt+=ar.length}return Gt};function Me(Le,xe){if(T.isBuffer(Le))return Le.length;if(ArrayBuffer.isView(Le)||Ne(Le,ArrayBuffer))return Le.byteLength;if(typeof Le!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+S(Le));var Se=Le.length,lt=arguments.length>2&&arguments[2]===!0;if(!lt&&Se===0)return 0;for(var Gt=!1;;)switch(xe){case"ascii":case"latin1":case"binary":return Se;case"utf8":case"utf-8":return _r(Le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se*2;case"hex":return Se>>>1;case"base64":return Nr(Le).length;default:if(Gt)return lt?-1:_r(Le).length;xe=(""+xe).toLowerCase(),Gt=!0}}T.byteLength=Me;function ke(Le,xe,Se){var lt=!1;if((xe===void 0||xe<0)&&(xe=0),xe>this.length||((Se===void 0||Se>this.length)&&(Se=this.length),Se<=0)||(Se>>>=0,xe>>>=0,Se<=xe))return"";for(Le||(Le="utf8");;)switch(Le){case"hex":return rt(this,xe,Se);case"utf8":case"utf-8":return ce(this,xe,Se);case"ascii":return ct(this,xe,Se);case"latin1":case"binary":return qt(this,xe,Se);case"base64":return De(this,xe,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,xe,Se);default:if(lt)throw new TypeError("Unknown encoding: "+Le);Le=(Le+"").toLowerCase(),lt=!0}}T.prototype._isBuffer=!0;function ge(Le,xe,Se){var lt=Le[xe];Le[xe]=Le[Se],Le[Se]=lt}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 Se=0;SeSe&&(xe+=" ... "),""},C&&(T.prototype[C]=T.prototype.inspect),T.prototype.compare=function(xe,Se,lt,Gt,Vt){if(Ne(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(Se===void 0&&(Se=0),lt===void 0&&(lt=xe?xe.length:0),Gt===void 0&&(Gt=0),Vt===void 0&&(Vt=this.length),Se<0||lt>xe.length||Gt<0||Vt>this.length)throw new RangeError("out of range index");if(Gt>=Vt&&Se>=lt)return 0;if(Gt>=Vt)return-1;if(Se>=lt)return 1;if(Se>>>=0,lt>>>=0,Gt>>>=0,Vt>>>=0,this===xe)return 0;for(var ar=Vt-Gt,Qr=lt-Se,ai=Math.min(ar,Qr),jr=this.slice(Gt,Vt),ri=xe.slice(Se,lt),bi=0;bi2147483647?Se=2147483647:Se<-2147483648&&(Se=-2147483648),Se=+Se,Ye(Se)&&(Se=Gt?0:Le.length-1),Se<0&&(Se=Le.length+Se),Se>=Le.length){if(Gt)return-1;Se=Le.length-1}else if(Se<0)if(Gt)Se=0;else return-1;if(typeof xe=="string"&&(xe=T.from(xe,lt)),T.isBuffer(xe))return xe.length===0?-1:Te(Le,xe,Se,lt,Gt);if(typeof xe=="number")return xe=xe&255,typeof Uint8Array.prototype.indexOf=="function"?Gt?Uint8Array.prototype.indexOf.call(Le,xe,Se):Uint8Array.prototype.lastIndexOf.call(Le,xe,Se):Te(Le,[xe],Se,lt,Gt);throw new TypeError("val must be string, number or Buffer")}function Te(Le,xe,Se,lt,Gt){var Vt=1,ar=Le.length,Qr=xe.length;if(lt!==void 0&&(lt=String(lt).toLowerCase(),lt==="ucs2"||lt==="ucs-2"||lt==="utf16le"||lt==="utf-16le")){if(Le.length<2||xe.length<2)return-1;Vt=2,ar/=2,Qr/=2,Se/=2}function ai(Wi,Ni){return Vt===1?Wi[Ni]:Wi.readUInt16BE(Ni*Vt)}var jr;if(Gt){var ri=-1;for(jr=Se;jrar&&(Se=ar-Qr),jr=Se;jr>=0;jr--){for(var bi=!0,nn=0;nnGt&&(lt=Gt)):lt=Gt;var Vt=xe.length;lt>Vt/2&&(lt=Vt/2);var ar;for(ar=0;ar>>0,isFinite(lt)?(lt=lt>>>0,Gt===void 0&&(Gt="utf8")):(Gt=lt,lt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Vt=this.length-Se;if((lt===void 0||lt>Vt)&&(lt=Vt),xe.length>0&&(lt<0||Se<0)||Se>this.length)throw new RangeError("Attempt to write outside buffer bounds");Gt||(Gt="utf8");for(var ar=!1;;)switch(Gt){case"hex":return Ee(this,xe,Se,lt);case"utf8":case"utf-8":return Ae(this,xe,Se,lt);case"ascii":case"latin1":case"binary":return ze(this,xe,Se,lt);case"base64":return Ce(this,xe,Se,lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,xe,Se,lt);default:if(ar)throw new TypeError("Unknown encoding: "+Gt);Gt=(""+Gt).toLowerCase(),ar=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function De(Le,xe,Se){return xe===0&&Se===Le.length?L.fromByteArray(Le):L.fromByteArray(Le.slice(xe,Se))}function ce(Le,xe,Se){Se=Math.min(Le.length,Se);for(var lt=[],Gt=xe;Gt239?4:Vt>223?3:Vt>191?2:1;if(Gt+Qr<=Se){var ai=void 0,jr=void 0,ri=void 0,bi=void 0;switch(Qr){case 1:Vt<128&&(ar=Vt);break;case 2:ai=Le[Gt+1],(ai&192)===128&&(bi=(Vt&31)<<6|ai&63,bi>127&&(ar=bi));break;case 3:ai=Le[Gt+1],jr=Le[Gt+2],(ai&192)===128&&(jr&192)===128&&(bi=(Vt&15)<<12|(ai&63)<<6|jr&63,bi>2047&&(bi<55296||bi>57343)&&(ar=bi));break;case 4:ai=Le[Gt+1],jr=Le[Gt+2],ri=Le[Gt+3],(ai&192)===128&&(jr&192)===128&&(ri&192)===128&&(bi=(Vt&15)<<18|(ai&63)<<12|(jr&63)<<6|ri&63,bi>65535&&bi<1114112&&(ar=bi))}}ar===null?(ar=65533,Qr=1):ar>65535&&(ar-=65536,lt.push(ar>>>10&1023|55296),ar=56320|ar&1023),lt.push(ar),Gt+=Qr}return nt(lt)}var Ge=4096;function nt(Le){var xe=Le.length;if(xe<=Ge)return String.fromCharCode.apply(String,Le);for(var Se="",lt=0;ltlt)&&(Se=lt);for(var Gt="",Vt=xe;Vtlt&&(xe=lt),Se<0?(Se+=lt,Se<0&&(Se=0)):Se>lt&&(Se=lt),SeSe)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(xe,Se,lt){xe=xe>>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=this[xe],Vt=1,ar=0;++ar>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=this[xe+--Se],Vt=1;Se>0&&(Vt*=256);)Gt+=this[xe+--Se]*Vt;return Gt},T.prototype.readUint8=T.prototype.readUInt8=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,1,this.length),this[xe]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,2,this.length),this[xe]|this[xe+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,2,this.length),this[xe]<<8|this[xe+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(xe,Se){return xe=xe>>>0,Se||Dt(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,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),this[xe]*16777216+(this[xe+1]<<16|this[xe+2]<<8|this[xe+3])},T.prototype.readBigUInt64LE=Xe(function(xe){xe=xe>>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=Se+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24),Vt=this[++xe]+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+lt*Math.pow(2,24);return BigInt(Gt)+(BigInt(Vt)<>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=Se*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe],Vt=this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+lt;return(BigInt(Gt)<>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=this[xe],Vt=1,ar=0;++ar=Vt&&(Gt-=Math.pow(2,8*Se)),Gt},T.prototype.readIntBE=function(xe,Se,lt){xe=xe>>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=Se,Vt=1,ar=this[xe+--Gt];Gt>0&&(Vt*=256);)ar+=this[xe+--Gt]*Vt;return Vt*=128,ar>=Vt&&(ar-=Math.pow(2,8*Se)),ar},T.prototype.readInt8=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,1,this.length),this[xe]&128?(255-this[xe]+1)*-1:this[xe]},T.prototype.readInt16LE=function(xe,Se){xe=xe>>>0,Se||Dt(xe,2,this.length);var lt=this[xe]|this[xe+1]<<8;return lt&32768?lt|4294901760:lt},T.prototype.readInt16BE=function(xe,Se){xe=xe>>>0,Se||Dt(xe,2,this.length);var lt=this[xe+1]|this[xe]<<8;return lt&32768?lt|4294901760:lt},T.prototype.readInt32LE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),this[xe]|this[xe+1]<<8|this[xe+2]<<16|this[xe+3]<<24},T.prototype.readInt32BE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),this[xe]<<24|this[xe+1]<<16|this[xe+2]<<8|this[xe+3]},T.prototype.readBigInt64LE=Xe(function(xe){xe=xe>>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=this[xe+4]+this[xe+5]*Math.pow(2,8)+this[xe+6]*Math.pow(2,16)+(lt<<24);return(BigInt(Gt)<>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=(Se<<24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe];return(BigInt(Gt)<>>0,Se||Dt(xe,4,this.length),_.read(this,xe,!0,23,4)},T.prototype.readFloatBE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),_.read(this,xe,!1,23,4)},T.prototype.readDoubleLE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,8,this.length),_.read(this,xe,!0,52,8)},T.prototype.readDoubleBE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,8,this.length),_.read(this,xe,!1,52,8)};function kt(Le,xe,Se,lt,Gt,Vt){if(!T.isBuffer(Le))throw new TypeError('"buffer" argument must be a Buffer instance');if(xe>Gt||xeLe.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(xe,Se,lt,Gt){if(xe=+xe,Se=Se>>>0,lt=lt>>>0,!Gt){var Vt=Math.pow(2,8*lt)-1;kt(this,xe,Se,lt,Vt,0)}var ar=1,Qr=0;for(this[Se]=xe&255;++Qr>>0,lt=lt>>>0,!Gt){var Vt=Math.pow(2,8*lt)-1;kt(this,xe,Se,lt,Vt,0)}var ar=lt-1,Qr=1;for(this[Se+ar]=xe&255;--ar>=0&&(Qr*=256);)this[Se+ar]=xe/Qr&255;return Se+lt},T.prototype.writeUint8=T.prototype.writeUInt8=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,1,255,0),this[Se]=xe&255,Se+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,65535,0),this[Se]=xe&255,this[Se+1]=xe>>>8,Se+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,65535,0),this[Se]=xe>>>8,this[Se+1]=xe&255,Se+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,4294967295,0),this[Se+3]=xe>>>24,this[Se+2]=xe>>>16,this[Se+1]=xe>>>8,this[Se]=xe&255,Se+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,4294967295,0),this[Se]=xe>>>24,this[Se+1]=xe>>>16,this[Se+2]=xe>>>8,this[Se+3]=xe&255,Se+4};function Ct(Le,xe,Se,lt,Gt){Et(xe,lt,Gt,Le,Se,7);var Vt=Number(xe&BigInt(4294967295));Le[Se++]=Vt,Vt=Vt>>8,Le[Se++]=Vt,Vt=Vt>>8,Le[Se++]=Vt,Vt=Vt>>8,Le[Se++]=Vt;var ar=Number(xe>>BigInt(32)&BigInt(4294967295));return Le[Se++]=ar,ar=ar>>8,Le[Se++]=ar,ar=ar>>8,Le[Se++]=ar,ar=ar>>8,Le[Se++]=ar,Se}function Yt(Le,xe,Se,lt,Gt){Et(xe,lt,Gt,Le,Se,7);var Vt=Number(xe&BigInt(4294967295));Le[Se+7]=Vt,Vt=Vt>>8,Le[Se+6]=Vt,Vt=Vt>>8,Le[Se+5]=Vt,Vt=Vt>>8,Le[Se+4]=Vt;var ar=Number(xe>>BigInt(32)&BigInt(4294967295));return Le[Se+3]=ar,ar=ar>>8,Le[Se+2]=ar,ar=ar>>8,Le[Se+1]=ar,ar=ar>>8,Le[Se]=ar,Se+8}T.prototype.writeBigUInt64LE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,xe,Se,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Yt(this,xe,Se,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(xe,Se,lt,Gt){if(xe=+xe,Se=Se>>>0,!Gt){var Vt=Math.pow(2,8*lt-1);kt(this,xe,Se,lt,Vt-1,-Vt)}var ar=0,Qr=1,ai=0;for(this[Se]=xe&255;++ar>0)-ai&255;return Se+lt},T.prototype.writeIntBE=function(xe,Se,lt,Gt){if(xe=+xe,Se=Se>>>0,!Gt){var Vt=Math.pow(2,8*lt-1);kt(this,xe,Se,lt,Vt-1,-Vt)}var ar=lt-1,Qr=1,ai=0;for(this[Se+ar]=xe&255;--ar>=0&&(Qr*=256);)xe<0&&ai===0&&this[Se+ar+1]!==0&&(ai=1),this[Se+ar]=(xe/Qr>>0)-ai&255;return Se+lt},T.prototype.writeInt8=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,1,127,-128),xe<0&&(xe=255+xe+1),this[Se]=xe&255,Se+1},T.prototype.writeInt16LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,32767,-32768),this[Se]=xe&255,this[Se+1]=xe>>>8,Se+2},T.prototype.writeInt16BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,32767,-32768),this[Se]=xe>>>8,this[Se+1]=xe&255,Se+2},T.prototype.writeInt32LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,2147483647,-2147483648),this[Se]=xe&255,this[Se+1]=xe>>>8,this[Se+2]=xe>>>16,this[Se+3]=xe>>>24,Se+4},T.prototype.writeInt32BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,2147483647,-2147483648),xe<0&&(xe=4294967295+xe+1),this[Se]=xe>>>24,this[Se+1]=xe>>>16,this[Se+2]=xe>>>8,this[Se+3]=xe&255,Se+4},T.prototype.writeBigInt64LE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,xe,Se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Yt(this,xe,Se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function xr(Le,xe,Se,lt,Gt,Vt){if(Se+lt>Le.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("Index out of range")}function er(Le,xe,Se,lt,Gt){return xe=+xe,Se=Se>>>0,Gt||xr(Le,xe,Se,4,34028234663852886e22,-34028234663852886e22),_.write(Le,xe,Se,lt,23,4),Se+4}T.prototype.writeFloatLE=function(xe,Se,lt){return er(this,xe,Se,!0,lt)},T.prototype.writeFloatBE=function(xe,Se,lt){return er(this,xe,Se,!1,lt)};function Ke(Le,xe,Se,lt,Gt){return xe=+xe,Se=Se>>>0,Gt||xr(Le,xe,Se,8,17976931348623157e292,-17976931348623157e292),_.write(Le,xe,Se,lt,52,8),Se+8}T.prototype.writeDoubleLE=function(xe,Se,lt){return Ke(this,xe,Se,!0,lt)},T.prototype.writeDoubleBE=function(xe,Se,lt){return Ke(this,xe,Se,!1,lt)},T.prototype.copy=function(xe,Se,lt,Gt){if(!T.isBuffer(xe))throw new TypeError("argument should be a Buffer");if(lt||(lt=0),!Gt&&Gt!==0&&(Gt=this.length),Se>=xe.length&&(Se=xe.length),Se||(Se=0),Gt>0&&Gt=this.length)throw new RangeError("Index out of range");if(Gt<0)throw new RangeError("sourceEnd out of bounds");Gt>this.length&&(Gt=this.length),xe.length-Se>>0,lt=lt===void 0?this.length:lt>>>0,xe||(xe=0);var ar;if(typeof xe=="number")for(ar=Se;arMath.pow(2,32)?Gt=Lt(String(Se)):typeof Se=="bigint"&&(Gt=String(Se),(Se>Math.pow(BigInt(2),BigInt(32))||Se<-Math.pow(BigInt(2),BigInt(32)))&&(Gt=Lt(Gt)),Gt+="n"),lt+=" It must be ".concat(xe,". Received ").concat(Gt),lt},RangeError);function Lt(Le){for(var xe="",Se=Le.length,lt=Le[0]==="-"?1:0;Se>=lt+4;Se-=3)xe="_".concat(Le.slice(Se-3,Se)).concat(xe);return"".concat(Le.slice(0,Se)).concat(xe)}function St(Le,xe,Se){dt(xe,"offset"),(Le[xe]===void 0||Le[xe+Se]===void 0)&&Ht(xe,Le.length-(Se+1))}function Et(Le,xe,Se,lt,Gt,Vt){if(Le>Se||Le3?xe===0||xe===BigInt(0)?Qr=">= 0".concat(ar," and < 2").concat(ar," ** ").concat((Vt+1)*8).concat(ar):Qr=">= -(2".concat(ar," ** ").concat((Vt+1)*8-1).concat(ar,") and < 2 ** ")+"".concat((Vt+1)*8-1).concat(ar):Qr=">= ".concat(xe).concat(ar," and <= ").concat(Se).concat(ar),new xt.ERR_OUT_OF_RANGE("value",Qr,Le)}St(lt,Gt,Vt)}function dt(Le,xe){if(typeof Le!="number")throw new xt.ERR_INVALID_ARG_TYPE(xe,"number",Le)}function Ht(Le,xe,Se){throw Math.floor(Le)!==Le?(dt(Le,Se),new xt.ERR_OUT_OF_RANGE(Se||"offset","an integer",Le)):xe<0?new xt.ERR_BUFFER_OUT_OF_BOUNDS:new xt.ERR_OUT_OF_RANGE(Se||"offset",">= ".concat(Se?1:0," and <= ").concat(xe),Le)}var $t=/[^+/0-9A-Za-z-_]/g;function fr(Le){if(Le=Le.split("=")[0],Le=Le.trim().replace($t,""),Le.length<2)return"";for(;Le.length%4!==0;)Le=Le+"=";return Le}function _r(Le,xe){xe=xe||1/0;for(var Se,lt=Le.length,Gt=null,Vt=[],ar=0;ar55295&&Se<57344){if(!Gt){if(Se>56319){(xe-=3)>-1&&Vt.push(239,191,189);continue}else if(ar+1===lt){(xe-=3)>-1&&Vt.push(239,191,189);continue}Gt=Se;continue}if(Se<56320){(xe-=3)>-1&&Vt.push(239,191,189),Gt=Se;continue}Se=(Gt-55296<<10|Se-56320)+65536}else Gt&&(xe-=3)>-1&&Vt.push(239,191,189);if(Gt=null,Se<128){if((xe-=1)<0)break;Vt.push(Se)}else if(Se<2048){if((xe-=2)<0)break;Vt.push(Se>>6|192,Se&63|128)}else if(Se<65536){if((xe-=3)<0)break;Vt.push(Se>>12|224,Se>>6&63|128,Se&63|128)}else if(Se<1114112){if((xe-=4)<0)break;Vt.push(Se>>18|240,Se>>12&63|128,Se>>6&63|128,Se&63|128)}else throw new Error("Invalid code point")}return Vt}function Br(Le){for(var xe=[],Se=0;Se>8,Gt=Se%256,Vt.push(Gt),Vt.push(lt);return Vt}function Nr(Le){return L.toByteArray(fr(Le))}function ut(Le,xe,Se,lt){var Gt;for(Gt=0;Gt=xe.length||Gt>=Le.length);++Gt)xe[Gt+Se]=Le[Gt];return Gt}function Ne(Le,xe){return Le instanceof xe||Le!=null&&Le.constructor!=null&&Le.constructor.name!=null&&Le.constructor.name===xe.name}function Ye(Le){return Le!==Le}var Ve=function(){for(var Le="0123456789abcdef",xe=new Array(256),Se=0;Se<16;++Se)for(var lt=Se*16,Gt=0;Gt<16;++Gt)xe[lt+Gt]=Le[Se]+Le[Gt];return xe}();function Xe(Le){return typeof BigInt=="undefined"?ht:Le}function ht(){throw new Error("BigInt not supported")}},9216:function(i){"use strict";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(x){return d[x]}),this._mode=v,this._active=d[v],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(d){for(var v=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=S);var _=L===S?0:4-L%4;return[L,_]}function d(k){var S=h(k),L=S[0],_=S[1];return(L+_)*3/4-_}function v(k,S,L){return(S+L)*3/4-L}function x(k){var S,L=h(k),_=L[0],C=L[1],M=new l(v(k,_,C)),p=0,P=C>0?_-4:_,T;for(T=0;T>16&255,M[p++]=S>>8&255,M[p++]=S&255;return C===2&&(S=s[k.charCodeAt(T)]<<2|s[k.charCodeAt(T+1)]>>4,M[p++]=S&255),C===1&&(S=s[k.charCodeAt(T)]<<10|s[k.charCodeAt(T+1)]<<4|s[k.charCodeAt(T+2)]>>2,M[p++]=S>>8&255,M[p++]=S&255),M}function b(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function g(k,S,L){for(var _,C=[],M=S;MP?P:p+M));return _===1?(S=k[L-1],C.push(o[S>>2]+o[S<<4&63]+"==")):_===2&&(S=(k[L-2]<<8)+k[L-1],C.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,x){if(s(v))return x?h(v,d(x)):[v[0].clone(),v[1].clone()];var b=0,g,E;if(l(v))g=v.clone();else if(typeof v=="string")g=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))g=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;g=u(v)}}if(s(x))g.mul(x[1]),E=x[0].clone();else if(l(x))E=x.clone();else if(typeof x=="string")E=c(x);else if(!x)E=u(1);else if(x===Math.floor(x))E=u(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),b+=256;E=u(x)}return b>0?g=g.ushln(b):b<0&&(E=E.ushln(-b)),f(g,E)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651:function(i,a,o){"use strict";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869:function(i,a,o){"use strict";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946:function(i,a,o){"use strict";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,x=s(v),b=d.mod,g=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return g*x;if(x){var E=l(x)+4,k=s(b.ushln(E).divRound(h));return g*(x+k*Math.pow(2,-E))}else{var S=h.bitLength()-b.bitLength()+53,k=s(b.ushln(S).divRound(h));return S<1023?g*k*Math.pow(2,-S):(k*=Math.pow(2,-1023),g*k*Math.pow(2,1023-S))}}},2478:function(i){"use strict";function a(f,h,d,v,x){for(var b=x+1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k>=0?(b=g,x=g-1):v=g+1}return b}function o(f,h,d,v,x){for(var b=x+1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k>0?(b=g,x=g-1):v=g+1}return b}function s(f,h,d,v,x){for(var b=v-1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k<0?(b=g,v=g+1):x=g-1}return b}function l(f,h,d,v,x){for(var b=v-1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k<=0?(b=g,v=g+1):x=g-1}return b}function u(f,h,d,v,x){for(;v<=x;){var b=v+x>>>1,g=f[b],E=d!==void 0?d(g,h):g-h;if(E===0)return b;E<=0?v=b+1:x=b-1}return-1}function c(f,h,d,v,x,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,x===void 0?f.length-1:x|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,x){return c(f,h,d,v,x,a)},gt:function(f,h,d,v,x){return c(f,h,d,v,x,o)},lt:function(f,h,d,v,x){return c(f,h,d,v,x,s)},le:function(f,h,d,v,x){return c(f,h,d,v,x,l)},eq:function(f,h,d,v,x){return c(f,h,d,v,x,u)}}},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}},6859:function(i,a,o){i=o.nmd(i),function(s,l){"use strict";function u(G,N){if(!G)throw new Error(N||"Assertion failed")}function c(G,N){G.super_=N;var W=function(){};W.prototype=N.prototype,G.prototype=new W,G.prototype.constructor=G}function f(G,N,W){if(f.isBN(G))return G;this.negative=0,this.words=null,this.length=0,this.red=null,G!==null&&((N==="le"||N==="be")&&(W=N,N=10),this._init(G||0,N||10,W||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(G){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N=="object"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,W){return N.cmp(W)>0?N:W},f.min=function(N,W){return N.cmp(W)<0?N:W},f.prototype._init=function(N,W,re){if(typeof N=="number")return this._initNumber(N,W,re);if(typeof N=="object")return this._initArray(N,W,re);W==="hex"&&(W=16),u(W===(W|0)&&W>=2&&W<=36),N=N.toString().replace(/\s+/g,"");var ae=0;N[0]==="-"&&(ae++,this.negative=1),ae=0;ae-=3)Me=N[ae]|N[ae-1]<<8|N[ae-2]<<16,this.words[_e]|=Me<>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,_e++);else if(re==="le")for(ae=0,_e=0;ae>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,_e++);return this.strip()};function d(G,N){var W=G.charCodeAt(N);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function v(G,N,W){var re=d(G,W);return W-1>=N&&(re|=d(G,W-1)<<4),re}f.prototype._parseHex=function(N,W,re){this.length=Math.ceil((N.length-W)/6),this.words=new Array(this.length);for(var ae=0;ae=W;ae-=2)ke=v(N,W,ae)<<_e,this.words[Me]|=ke&67108863,_e>=18?(_e-=18,Me+=1,this.words[Me]|=ke>>>26):_e+=8;else{var ge=N.length-W;for(ae=ge%2===0?W+1:W;ae=18?(_e-=18,Me+=1,this.words[Me]|=ke>>>26):_e+=8}this.strip()};function x(G,N,W,re){for(var ae=0,_e=Math.min(G.length,W),Me=N;Me<_e;Me++){var ke=G.charCodeAt(Me)-48;ae*=re,ke>=49?ae+=ke-49+10:ke>=17?ae+=ke-17+10:ae+=ke}return ae}f.prototype._parseBase=function(N,W,re){this.words=[0],this.length=1;for(var ae=0,_e=1;_e<=67108863;_e*=W)ae++;ae--,_e=_e/W|0;for(var Me=N.length-re,ke=Me%ae,ge=Math.min(Me,Me-ke)+re,ie=0,Te=re;Te1&&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"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[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,W){N=N||10,W=W|0||1;var re;if(N===16||N==="hex"){re="";for(var ae=0,_e=0,Me=0;Me>>24-ae&16777215,_e!==0||Me!==this.length-1?re=b[6-ge.length]+ge+re:re=ge+re,ae+=2,ae>=26&&(ae-=26,Me--)}for(_e!==0&&(re=_e.toString(16)+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=g[N],Te=E[N];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Ae=Ee.modn(Te).toString(N);Ee=Ee.idivn(Te),Ee.isZero()?re=Ae+re:re=b[ie-Ae.length]+Ae+re}for(this.isZero()&&(re="0"+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,W){return u(typeof h!="undefined"),this.toArrayLike(h,N,W)},f.prototype.toArray=function(N,W){return this.toArrayLike(Array,N,W)},f.prototype.toArrayLike=function(N,W,re){var ae=this.byteLength(),_e=re||Math.max(1,ae);u(ae<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var Me=W==="le",ke=new N(_e),ge,ie,Te=this.clone();if(Me){for(ie=0;!Te.isZero();ie++)ge=Te.andln(255),Te.iushrn(8),ke[ie]=ge;for(;ie<_e;ie++)ke[ie]=0}else{for(ie=0;ie<_e-ae;ie++)ke[ie]=0;for(ie=0;!Te.isZero();ie++)ge=Te.andln(255),Te.iushrn(8),ke[_e-ie-1]=ge}return ke},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var W=N,re=0;return W>=4096&&(re+=13,W>>>=13),W>=64&&(re+=7,W>>>=7),W>=8&&(re+=4,W>>>=4),W>=2&&(re+=2,W>>>=2),re+W},f.prototype._zeroBits=function(N){if(N===0)return 26;var W=N,re=0;return W&8191||(re+=13,W>>>=13),W&127||(re+=7,W>>>=7),W&15||(re+=4,W>>>=4),W&3||(re+=2,W>>>=2),W&1||re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],W=this._countBits(N);return(this.length-1)*26+W};function k(G){for(var N=new Array(G.bitLength()),W=0;W>>ae}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,W=0;WN.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 W;this.length>N.length?W=N:W=this;for(var re=0;reN.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 W,re;this.length>N.length?(W=this,re=N):(W=N,re=this);for(var ae=0;aeN.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 W=Math.ceil(N/26)|0,re=N%26;this._expand(W),re>0&&W--;for(var ae=0;ae0&&(this.words[ae]=~this.words[ae]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,W){u(typeof N=="number"&&N>=0);var re=N/26|0,ae=N%26;return this._expand(re+1),W?this.words[re]=this.words[re]|1<N.length?(re=this,ae=N):(re=N,ae=this);for(var _e=0,Me=0;Me>>26;for(;_e!==0&&Me>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;MeN.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var W=this.iadd(N);return N.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ae,_e;re>0?(ae=this,_e=N):(ae=N,_e=this);for(var Me=0,ke=0;ke<_e.length;ke++)W=(ae.words[ke]|0)-(_e.words[ke]|0)+Me,Me=W>>26,this.words[ke]=W&67108863;for(;Me!==0&&ke>26,this.words[ke]=W&67108863;if(Me===0&&ke>>26,Ee=ge&67108863,Ae=Math.min(ie,N.length-1),ze=Math.max(0,ie-G.length+1);ze<=Ae;ze++){var Ce=ie-ze|0;ae=G.words[Ce]|0,_e=N.words[ze]|0,Me=ae*_e+Ee,Te+=Me/67108864|0,Ee=Me&67108863}W.words[ie]=Ee|0,ge=Te|0}return ge!==0?W.words[ie]=ge|0:W.length--,W.strip()}var L=function(N,W,re){var ae=N.words,_e=W.words,Me=re.words,ke=0,ge,ie,Te,Ee=ae[0]|0,Ae=Ee&8191,ze=Ee>>>13,Ce=ae[1]|0,me=Ce&8191,De=Ce>>>13,ce=ae[2]|0,Ge=ce&8191,nt=ce>>>13,ct=ae[3]|0,qt=ct&8191,rt=ct>>>13,ot=ae[4]|0,Dt=ot&8191,kt=ot>>>13,Ct=ae[5]|0,Yt=Ct&8191,xr=Ct>>>13,er=ae[6]|0,Ke=er&8191,xt=er>>>13,bt=ae[7]|0,Lt=bt&8191,St=bt>>>13,Et=ae[8]|0,dt=Et&8191,Ht=Et>>>13,$t=ae[9]|0,fr=$t&8191,_r=$t>>>13,Br=_e[0]|0,Or=Br&8191,Nr=Br>>>13,ut=_e[1]|0,Ne=ut&8191,Ye=ut>>>13,Ve=_e[2]|0,Xe=Ve&8191,ht=Ve>>>13,Le=_e[3]|0,xe=Le&8191,Se=Le>>>13,lt=_e[4]|0,Gt=lt&8191,Vt=lt>>>13,ar=_e[5]|0,Qr=ar&8191,ai=ar>>>13,jr=_e[6]|0,ri=jr&8191,bi=jr>>>13,nn=_e[7]|0,Wi=nn&8191,Ni=nn>>>13,_n=_e[8]|0,$i=_n&8191,zn=_n>>>13,Wn=_e[9]|0,It=Wn&8191,ft=Wn>>>13;re.negative=N.negative^W.negative,re.length=19,ge=Math.imul(Ae,Or),ie=Math.imul(Ae,Nr),ie=ie+Math.imul(ze,Or)|0,Te=Math.imul(ze,Nr);var jt=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(jt>>>26)|0,jt&=67108863,ge=Math.imul(me,Or),ie=Math.imul(me,Nr),ie=ie+Math.imul(De,Or)|0,Te=Math.imul(De,Nr),ge=ge+Math.imul(Ae,Ne)|0,ie=ie+Math.imul(Ae,Ye)|0,ie=ie+Math.imul(ze,Ne)|0,Te=Te+Math.imul(ze,Ye)|0;var Zt=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,ge=Math.imul(Ge,Or),ie=Math.imul(Ge,Nr),ie=ie+Math.imul(nt,Or)|0,Te=Math.imul(nt,Nr),ge=ge+Math.imul(me,Ne)|0,ie=ie+Math.imul(me,Ye)|0,ie=ie+Math.imul(De,Ne)|0,Te=Te+Math.imul(De,Ye)|0,ge=ge+Math.imul(Ae,Xe)|0,ie=ie+Math.imul(Ae,ht)|0,ie=ie+Math.imul(ze,Xe)|0,Te=Te+Math.imul(ze,ht)|0;var yr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(yr>>>26)|0,yr&=67108863,ge=Math.imul(qt,Or),ie=Math.imul(qt,Nr),ie=ie+Math.imul(rt,Or)|0,Te=Math.imul(rt,Nr),ge=ge+Math.imul(Ge,Ne)|0,ie=ie+Math.imul(Ge,Ye)|0,ie=ie+Math.imul(nt,Ne)|0,Te=Te+Math.imul(nt,Ye)|0,ge=ge+Math.imul(me,Xe)|0,ie=ie+Math.imul(me,ht)|0,ie=ie+Math.imul(De,Xe)|0,Te=Te+Math.imul(De,ht)|0,ge=ge+Math.imul(Ae,xe)|0,ie=ie+Math.imul(Ae,Se)|0,ie=ie+Math.imul(ze,xe)|0,Te=Te+Math.imul(ze,Se)|0;var Fr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,ge=Math.imul(Dt,Or),ie=Math.imul(Dt,Nr),ie=ie+Math.imul(kt,Or)|0,Te=Math.imul(kt,Nr),ge=ge+Math.imul(qt,Ne)|0,ie=ie+Math.imul(qt,Ye)|0,ie=ie+Math.imul(rt,Ne)|0,Te=Te+Math.imul(rt,Ye)|0,ge=ge+Math.imul(Ge,Xe)|0,ie=ie+Math.imul(Ge,ht)|0,ie=ie+Math.imul(nt,Xe)|0,Te=Te+Math.imul(nt,ht)|0,ge=ge+Math.imul(me,xe)|0,ie=ie+Math.imul(me,Se)|0,ie=ie+Math.imul(De,xe)|0,Te=Te+Math.imul(De,Se)|0,ge=ge+Math.imul(Ae,Gt)|0,ie=ie+Math.imul(Ae,Vt)|0,ie=ie+Math.imul(ze,Gt)|0,Te=Te+Math.imul(ze,Vt)|0;var Zr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,ge=Math.imul(Yt,Or),ie=Math.imul(Yt,Nr),ie=ie+Math.imul(xr,Or)|0,Te=Math.imul(xr,Nr),ge=ge+Math.imul(Dt,Ne)|0,ie=ie+Math.imul(Dt,Ye)|0,ie=ie+Math.imul(kt,Ne)|0,Te=Te+Math.imul(kt,Ye)|0,ge=ge+Math.imul(qt,Xe)|0,ie=ie+Math.imul(qt,ht)|0,ie=ie+Math.imul(rt,Xe)|0,Te=Te+Math.imul(rt,ht)|0,ge=ge+Math.imul(Ge,xe)|0,ie=ie+Math.imul(Ge,Se)|0,ie=ie+Math.imul(nt,xe)|0,Te=Te+Math.imul(nt,Se)|0,ge=ge+Math.imul(me,Gt)|0,ie=ie+Math.imul(me,Vt)|0,ie=ie+Math.imul(De,Gt)|0,Te=Te+Math.imul(De,Vt)|0,ge=ge+Math.imul(Ae,Qr)|0,ie=ie+Math.imul(Ae,ai)|0,ie=ie+Math.imul(ze,Qr)|0,Te=Te+Math.imul(ze,ai)|0;var Vr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,ge=Math.imul(Ke,Or),ie=Math.imul(Ke,Nr),ie=ie+Math.imul(xt,Or)|0,Te=Math.imul(xt,Nr),ge=ge+Math.imul(Yt,Ne)|0,ie=ie+Math.imul(Yt,Ye)|0,ie=ie+Math.imul(xr,Ne)|0,Te=Te+Math.imul(xr,Ye)|0,ge=ge+Math.imul(Dt,Xe)|0,ie=ie+Math.imul(Dt,ht)|0,ie=ie+Math.imul(kt,Xe)|0,Te=Te+Math.imul(kt,ht)|0,ge=ge+Math.imul(qt,xe)|0,ie=ie+Math.imul(qt,Se)|0,ie=ie+Math.imul(rt,xe)|0,Te=Te+Math.imul(rt,Se)|0,ge=ge+Math.imul(Ge,Gt)|0,ie=ie+Math.imul(Ge,Vt)|0,ie=ie+Math.imul(nt,Gt)|0,Te=Te+Math.imul(nt,Vt)|0,ge=ge+Math.imul(me,Qr)|0,ie=ie+Math.imul(me,ai)|0,ie=ie+Math.imul(De,Qr)|0,Te=Te+Math.imul(De,ai)|0,ge=ge+Math.imul(Ae,ri)|0,ie=ie+Math.imul(Ae,bi)|0,ie=ie+Math.imul(ze,ri)|0,Te=Te+Math.imul(ze,bi)|0;var gi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(gi>>>26)|0,gi&=67108863,ge=Math.imul(Lt,Or),ie=Math.imul(Lt,Nr),ie=ie+Math.imul(St,Or)|0,Te=Math.imul(St,Nr),ge=ge+Math.imul(Ke,Ne)|0,ie=ie+Math.imul(Ke,Ye)|0,ie=ie+Math.imul(xt,Ne)|0,Te=Te+Math.imul(xt,Ye)|0,ge=ge+Math.imul(Yt,Xe)|0,ie=ie+Math.imul(Yt,ht)|0,ie=ie+Math.imul(xr,Xe)|0,Te=Te+Math.imul(xr,ht)|0,ge=ge+Math.imul(Dt,xe)|0,ie=ie+Math.imul(Dt,Se)|0,ie=ie+Math.imul(kt,xe)|0,Te=Te+Math.imul(kt,Se)|0,ge=ge+Math.imul(qt,Gt)|0,ie=ie+Math.imul(qt,Vt)|0,ie=ie+Math.imul(rt,Gt)|0,Te=Te+Math.imul(rt,Vt)|0,ge=ge+Math.imul(Ge,Qr)|0,ie=ie+Math.imul(Ge,ai)|0,ie=ie+Math.imul(nt,Qr)|0,Te=Te+Math.imul(nt,ai)|0,ge=ge+Math.imul(me,ri)|0,ie=ie+Math.imul(me,bi)|0,ie=ie+Math.imul(De,ri)|0,Te=Te+Math.imul(De,bi)|0,ge=ge+Math.imul(Ae,Wi)|0,ie=ie+Math.imul(Ae,Ni)|0,ie=ie+Math.imul(ze,Wi)|0,Te=Te+Math.imul(ze,Ni)|0;var Si=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Si>>>26)|0,Si&=67108863,ge=Math.imul(dt,Or),ie=Math.imul(dt,Nr),ie=ie+Math.imul(Ht,Or)|0,Te=Math.imul(Ht,Nr),ge=ge+Math.imul(Lt,Ne)|0,ie=ie+Math.imul(Lt,Ye)|0,ie=ie+Math.imul(St,Ne)|0,Te=Te+Math.imul(St,Ye)|0,ge=ge+Math.imul(Ke,Xe)|0,ie=ie+Math.imul(Ke,ht)|0,ie=ie+Math.imul(xt,Xe)|0,Te=Te+Math.imul(xt,ht)|0,ge=ge+Math.imul(Yt,xe)|0,ie=ie+Math.imul(Yt,Se)|0,ie=ie+Math.imul(xr,xe)|0,Te=Te+Math.imul(xr,Se)|0,ge=ge+Math.imul(Dt,Gt)|0,ie=ie+Math.imul(Dt,Vt)|0,ie=ie+Math.imul(kt,Gt)|0,Te=Te+Math.imul(kt,Vt)|0,ge=ge+Math.imul(qt,Qr)|0,ie=ie+Math.imul(qt,ai)|0,ie=ie+Math.imul(rt,Qr)|0,Te=Te+Math.imul(rt,ai)|0,ge=ge+Math.imul(Ge,ri)|0,ie=ie+Math.imul(Ge,bi)|0,ie=ie+Math.imul(nt,ri)|0,Te=Te+Math.imul(nt,bi)|0,ge=ge+Math.imul(me,Wi)|0,ie=ie+Math.imul(me,Ni)|0,ie=ie+Math.imul(De,Wi)|0,Te=Te+Math.imul(De,Ni)|0,ge=ge+Math.imul(Ae,$i)|0,ie=ie+Math.imul(Ae,zn)|0,ie=ie+Math.imul(ze,$i)|0,Te=Te+Math.imul(ze,zn)|0;var Mi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,ge=Math.imul(fr,Or),ie=Math.imul(fr,Nr),ie=ie+Math.imul(_r,Or)|0,Te=Math.imul(_r,Nr),ge=ge+Math.imul(dt,Ne)|0,ie=ie+Math.imul(dt,Ye)|0,ie=ie+Math.imul(Ht,Ne)|0,Te=Te+Math.imul(Ht,Ye)|0,ge=ge+Math.imul(Lt,Xe)|0,ie=ie+Math.imul(Lt,ht)|0,ie=ie+Math.imul(St,Xe)|0,Te=Te+Math.imul(St,ht)|0,ge=ge+Math.imul(Ke,xe)|0,ie=ie+Math.imul(Ke,Se)|0,ie=ie+Math.imul(xt,xe)|0,Te=Te+Math.imul(xt,Se)|0,ge=ge+Math.imul(Yt,Gt)|0,ie=ie+Math.imul(Yt,Vt)|0,ie=ie+Math.imul(xr,Gt)|0,Te=Te+Math.imul(xr,Vt)|0,ge=ge+Math.imul(Dt,Qr)|0,ie=ie+Math.imul(Dt,ai)|0,ie=ie+Math.imul(kt,Qr)|0,Te=Te+Math.imul(kt,ai)|0,ge=ge+Math.imul(qt,ri)|0,ie=ie+Math.imul(qt,bi)|0,ie=ie+Math.imul(rt,ri)|0,Te=Te+Math.imul(rt,bi)|0,ge=ge+Math.imul(Ge,Wi)|0,ie=ie+Math.imul(Ge,Ni)|0,ie=ie+Math.imul(nt,Wi)|0,Te=Te+Math.imul(nt,Ni)|0,ge=ge+Math.imul(me,$i)|0,ie=ie+Math.imul(me,zn)|0,ie=ie+Math.imul(De,$i)|0,Te=Te+Math.imul(De,zn)|0,ge=ge+Math.imul(Ae,It)|0,ie=ie+Math.imul(Ae,ft)|0,ie=ie+Math.imul(ze,It)|0,Te=Te+Math.imul(ze,ft)|0;var Pi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,ge=Math.imul(fr,Ne),ie=Math.imul(fr,Ye),ie=ie+Math.imul(_r,Ne)|0,Te=Math.imul(_r,Ye),ge=ge+Math.imul(dt,Xe)|0,ie=ie+Math.imul(dt,ht)|0,ie=ie+Math.imul(Ht,Xe)|0,Te=Te+Math.imul(Ht,ht)|0,ge=ge+Math.imul(Lt,xe)|0,ie=ie+Math.imul(Lt,Se)|0,ie=ie+Math.imul(St,xe)|0,Te=Te+Math.imul(St,Se)|0,ge=ge+Math.imul(Ke,Gt)|0,ie=ie+Math.imul(Ke,Vt)|0,ie=ie+Math.imul(xt,Gt)|0,Te=Te+Math.imul(xt,Vt)|0,ge=ge+Math.imul(Yt,Qr)|0,ie=ie+Math.imul(Yt,ai)|0,ie=ie+Math.imul(xr,Qr)|0,Te=Te+Math.imul(xr,ai)|0,ge=ge+Math.imul(Dt,ri)|0,ie=ie+Math.imul(Dt,bi)|0,ie=ie+Math.imul(kt,ri)|0,Te=Te+Math.imul(kt,bi)|0,ge=ge+Math.imul(qt,Wi)|0,ie=ie+Math.imul(qt,Ni)|0,ie=ie+Math.imul(rt,Wi)|0,Te=Te+Math.imul(rt,Ni)|0,ge=ge+Math.imul(Ge,$i)|0,ie=ie+Math.imul(Ge,zn)|0,ie=ie+Math.imul(nt,$i)|0,Te=Te+Math.imul(nt,zn)|0,ge=ge+Math.imul(me,It)|0,ie=ie+Math.imul(me,ft)|0,ie=ie+Math.imul(De,It)|0,Te=Te+Math.imul(De,ft)|0;var Gi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,ge=Math.imul(fr,Xe),ie=Math.imul(fr,ht),ie=ie+Math.imul(_r,Xe)|0,Te=Math.imul(_r,ht),ge=ge+Math.imul(dt,xe)|0,ie=ie+Math.imul(dt,Se)|0,ie=ie+Math.imul(Ht,xe)|0,Te=Te+Math.imul(Ht,Se)|0,ge=ge+Math.imul(Lt,Gt)|0,ie=ie+Math.imul(Lt,Vt)|0,ie=ie+Math.imul(St,Gt)|0,Te=Te+Math.imul(St,Vt)|0,ge=ge+Math.imul(Ke,Qr)|0,ie=ie+Math.imul(Ke,ai)|0,ie=ie+Math.imul(xt,Qr)|0,Te=Te+Math.imul(xt,ai)|0,ge=ge+Math.imul(Yt,ri)|0,ie=ie+Math.imul(Yt,bi)|0,ie=ie+Math.imul(xr,ri)|0,Te=Te+Math.imul(xr,bi)|0,ge=ge+Math.imul(Dt,Wi)|0,ie=ie+Math.imul(Dt,Ni)|0,ie=ie+Math.imul(kt,Wi)|0,Te=Te+Math.imul(kt,Ni)|0,ge=ge+Math.imul(qt,$i)|0,ie=ie+Math.imul(qt,zn)|0,ie=ie+Math.imul(rt,$i)|0,Te=Te+Math.imul(rt,zn)|0,ge=ge+Math.imul(Ge,It)|0,ie=ie+Math.imul(Ge,ft)|0,ie=ie+Math.imul(nt,It)|0,Te=Te+Math.imul(nt,ft)|0;var Ki=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,ge=Math.imul(fr,xe),ie=Math.imul(fr,Se),ie=ie+Math.imul(_r,xe)|0,Te=Math.imul(_r,Se),ge=ge+Math.imul(dt,Gt)|0,ie=ie+Math.imul(dt,Vt)|0,ie=ie+Math.imul(Ht,Gt)|0,Te=Te+Math.imul(Ht,Vt)|0,ge=ge+Math.imul(Lt,Qr)|0,ie=ie+Math.imul(Lt,ai)|0,ie=ie+Math.imul(St,Qr)|0,Te=Te+Math.imul(St,ai)|0,ge=ge+Math.imul(Ke,ri)|0,ie=ie+Math.imul(Ke,bi)|0,ie=ie+Math.imul(xt,ri)|0,Te=Te+Math.imul(xt,bi)|0,ge=ge+Math.imul(Yt,Wi)|0,ie=ie+Math.imul(Yt,Ni)|0,ie=ie+Math.imul(xr,Wi)|0,Te=Te+Math.imul(xr,Ni)|0,ge=ge+Math.imul(Dt,$i)|0,ie=ie+Math.imul(Dt,zn)|0,ie=ie+Math.imul(kt,$i)|0,Te=Te+Math.imul(kt,zn)|0,ge=ge+Math.imul(qt,It)|0,ie=ie+Math.imul(qt,ft)|0,ie=ie+Math.imul(rt,It)|0,Te=Te+Math.imul(rt,ft)|0;var ka=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(ka>>>26)|0,ka&=67108863,ge=Math.imul(fr,Gt),ie=Math.imul(fr,Vt),ie=ie+Math.imul(_r,Gt)|0,Te=Math.imul(_r,Vt),ge=ge+Math.imul(dt,Qr)|0,ie=ie+Math.imul(dt,ai)|0,ie=ie+Math.imul(Ht,Qr)|0,Te=Te+Math.imul(Ht,ai)|0,ge=ge+Math.imul(Lt,ri)|0,ie=ie+Math.imul(Lt,bi)|0,ie=ie+Math.imul(St,ri)|0,Te=Te+Math.imul(St,bi)|0,ge=ge+Math.imul(Ke,Wi)|0,ie=ie+Math.imul(Ke,Ni)|0,ie=ie+Math.imul(xt,Wi)|0,Te=Te+Math.imul(xt,Ni)|0,ge=ge+Math.imul(Yt,$i)|0,ie=ie+Math.imul(Yt,zn)|0,ie=ie+Math.imul(xr,$i)|0,Te=Te+Math.imul(xr,zn)|0,ge=ge+Math.imul(Dt,It)|0,ie=ie+Math.imul(Dt,ft)|0,ie=ie+Math.imul(kt,It)|0,Te=Te+Math.imul(kt,ft)|0;var jn=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(jn>>>26)|0,jn&=67108863,ge=Math.imul(fr,Qr),ie=Math.imul(fr,ai),ie=ie+Math.imul(_r,Qr)|0,Te=Math.imul(_r,ai),ge=ge+Math.imul(dt,ri)|0,ie=ie+Math.imul(dt,bi)|0,ie=ie+Math.imul(Ht,ri)|0,Te=Te+Math.imul(Ht,bi)|0,ge=ge+Math.imul(Lt,Wi)|0,ie=ie+Math.imul(Lt,Ni)|0,ie=ie+Math.imul(St,Wi)|0,Te=Te+Math.imul(St,Ni)|0,ge=ge+Math.imul(Ke,$i)|0,ie=ie+Math.imul(Ke,zn)|0,ie=ie+Math.imul(xt,$i)|0,Te=Te+Math.imul(xt,zn)|0,ge=ge+Math.imul(Yt,It)|0,ie=ie+Math.imul(Yt,ft)|0,ie=ie+Math.imul(xr,It)|0,Te=Te+Math.imul(xr,ft)|0;var la=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(la>>>26)|0,la&=67108863,ge=Math.imul(fr,ri),ie=Math.imul(fr,bi),ie=ie+Math.imul(_r,ri)|0,Te=Math.imul(_r,bi),ge=ge+Math.imul(dt,Wi)|0,ie=ie+Math.imul(dt,Ni)|0,ie=ie+Math.imul(Ht,Wi)|0,Te=Te+Math.imul(Ht,Ni)|0,ge=ge+Math.imul(Lt,$i)|0,ie=ie+Math.imul(Lt,zn)|0,ie=ie+Math.imul(St,$i)|0,Te=Te+Math.imul(St,zn)|0,ge=ge+Math.imul(Ke,It)|0,ie=ie+Math.imul(Ke,ft)|0,ie=ie+Math.imul(xt,It)|0,Te=Te+Math.imul(xt,ft)|0;var Fa=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(fr,Wi),ie=Math.imul(fr,Ni),ie=ie+Math.imul(_r,Wi)|0,Te=Math.imul(_r,Ni),ge=ge+Math.imul(dt,$i)|0,ie=ie+Math.imul(dt,zn)|0,ie=ie+Math.imul(Ht,$i)|0,Te=Te+Math.imul(Ht,zn)|0,ge=ge+Math.imul(Lt,It)|0,ie=ie+Math.imul(Lt,ft)|0,ie=ie+Math.imul(St,It)|0,Te=Te+Math.imul(St,ft)|0;var Da=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Da>>>26)|0,Da&=67108863,ge=Math.imul(fr,$i),ie=Math.imul(fr,zn),ie=ie+Math.imul(_r,$i)|0,Te=Math.imul(_r,zn),ge=ge+Math.imul(dt,It)|0,ie=ie+Math.imul(dt,ft)|0,ie=ie+Math.imul(Ht,It)|0,Te=Te+Math.imul(Ht,ft)|0;var jo=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(jo>>>26)|0,jo&=67108863,ge=Math.imul(fr,It),ie=Math.imul(fr,ft),ie=ie+Math.imul(_r,It)|0,Te=Math.imul(_r,ft);var oa=(ke+ge|0)+((ie&8191)<<13)|0;return ke=(Te+(ie>>>13)|0)+(oa>>>26)|0,oa&=67108863,Me[0]=jt,Me[1]=Zt,Me[2]=yr,Me[3]=Fr,Me[4]=Zr,Me[5]=Vr,Me[6]=gi,Me[7]=Si,Me[8]=Mi,Me[9]=Pi,Me[10]=Gi,Me[11]=Ki,Me[12]=ka,Me[13]=jn,Me[14]=la,Me[15]=Fa,Me[16]=Da,Me[17]=jo,Me[18]=oa,ke!==0&&(Me[19]=ke,re.length++),re};Math.imul||(L=S);function _(G,N,W){W.negative=N.negative^G.negative,W.length=G.length+N.length;for(var re=0,ae=0,_e=0;_e>>26)|0,ae+=Me>>>26,Me&=67108863}W.words[_e]=ke,re=Me,Me=ae}return re!==0?W.words[_e]=re:W.length--,W.strip()}function C(G,N,W){var re=new M;return re.mulp(G,N,W)}f.prototype.mulTo=function(N,W){var re,ae=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,W):ae<63?re=S(this,N,W):ae<1024?re=_(this,N,W):re=C(this,N,W),re};function M(G,N){this.x=G,this.y=N}M.prototype.makeRBT=function(N){for(var W=new Array(N),re=f.prototype._countBits(N)-1,ae=0;ae>=1;return ae},M.prototype.permute=function(N,W,re,ae,_e,Me){for(var ke=0;ke>>1)_e++;return 1<<_e+1+ae},M.prototype.conjugate=function(N,W,re){if(!(re<=1))for(var ae=0;ae>>13,re[2*Me+1]=_e&8191,_e=_e>>>13;for(Me=2*W;Me>=26,W+=ae/67108864|0,W+=_e>>>26,this.words[re]=_e&67108863}return W!==0&&(this.words[re]=W,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 W=k(N);if(W.length===0)return new f(1);for(var re=this,ae=0;ae=0);var W=N%26,re=(N-W)/26,ae=67108863>>>26-W<<26-W,_e;if(W!==0){var Me=0;for(_e=0;_e>>26-W}Me&&(this.words[_e]=Me,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e=0);var ae;W?ae=(W-W%26)/26:ae=0;var _e=N%26,Me=Math.min((N-_e)/26,this.length),ke=67108863^67108863>>>_e<<_e,ge=re;if(ae-=Me,ae=Math.max(0,ae),ge){for(var ie=0;ieMe)for(this.length-=Me,ie=0;ie=0&&(Te!==0||ie>=ae);ie--){var Ee=this.words[ie]|0;this.words[ie]=Te<<26-_e|Ee>>>_e,Te=Ee&ke}return ge&&Te!==0&&(ge.words[ge.length++]=Te),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,W,re){return u(this.negative===0),this.iushrn(N,W,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var W=N%26,re=(N-W)/26,ae=1<=0);var W=N%26,re=(N-W)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(W!==0&&re++,this.length=Math.min(re,this.length),W!==0){var ae=67108863^67108863>>>W<=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+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 W=0;W>26)-(ge/67108864|0),this.words[_e+re]=Me&67108863}for(;_e>26,this.words[_e+re]=Me&67108863;if(ke===0)return this.strip();for(u(ke===-1),ke=0,_e=0;_e>26,this.words[_e]=Me&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,W){var re=this.length-N.length,ae=this.clone(),_e=N,Me=_e.words[_e.length-1]|0,ke=this._countBits(Me);re=26-ke,re!==0&&(_e=_e.ushln(re),ae.iushln(re),Me=_e.words[_e.length-1]|0);var ge=ae.length-_e.length,ie;if(W!=="mod"){ie=new f(null),ie.length=ge+1,ie.words=new Array(ie.length);for(var Te=0;Te=0;Ae--){var ze=(ae.words[_e.length+Ae]|0)*67108864+(ae.words[_e.length+Ae-1]|0);for(ze=Math.min(ze/Me|0,67108863),ae._ishlnsubmul(_e,ze,Ae);ae.negative!==0;)ze--,ae.negative=0,ae._ishlnsubmul(_e,1,Ae),ae.isZero()||(ae.negative^=1);ie&&(ie.words[Ae]=ze)}return ie&&ie.strip(),ae.strip(),W!=="div"&&re!==0&&ae.iushrn(re),{div:ie||null,mod:ae}},f.prototype.divmod=function(N,W,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ae,_e,Me;return this.negative!==0&&N.negative===0?(Me=this.neg().divmod(N,W),W!=="mod"&&(ae=Me.div.neg()),W!=="div"&&(_e=Me.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:ae,mod:_e}):this.negative===0&&N.negative!==0?(Me=this.divmod(N.neg(),W),W!=="mod"&&(ae=Me.div.neg()),{div:ae,mod:Me.mod}):this.negative&N.negative?(Me=this.neg().divmod(N.neg(),W),W!=="div"&&(_e=Me.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:Me.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?W==="div"?{div:this.divn(N.words[0]),mod:null}:W==="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,W)},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 W=this.divmod(N);if(W.mod.isZero())return W.div;var re=W.div.negative!==0?W.mod.isub(N):W.mod,ae=N.ushrn(1),_e=N.andln(1),Me=re.cmp(ae);return Me<0||_e===1&&Me===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var W=(1<<26)%N,re=0,ae=this.length-1;ae>=0;ae--)re=(W*re+(this.words[ae]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var W=0,re=this.length-1;re>=0;re--){var ae=(this.words[re]|0)+W*67108864;this.words[re]=ae/N|0,W=ae%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 W=this,re=N.clone();W.negative!==0?W=W.umod(N):W=W.clone();for(var ae=new f(1),_e=new f(0),Me=new f(0),ke=new f(1),ge=0;W.isEven()&&re.isEven();)W.iushrn(1),re.iushrn(1),++ge;for(var ie=re.clone(),Te=W.clone();!W.isZero();){for(var Ee=0,Ae=1;!(W.words[0]&Ae)&&Ee<26;++Ee,Ae<<=1);if(Ee>0)for(W.iushrn(Ee);Ee-- >0;)(ae.isOdd()||_e.isOdd())&&(ae.iadd(ie),_e.isub(Te)),ae.iushrn(1),_e.iushrn(1);for(var ze=0,Ce=1;!(re.words[0]&Ce)&&ze<26;++ze,Ce<<=1);if(ze>0)for(re.iushrn(ze);ze-- >0;)(Me.isOdd()||ke.isOdd())&&(Me.iadd(ie),ke.isub(Te)),Me.iushrn(1),ke.iushrn(1);W.cmp(re)>=0?(W.isub(re),ae.isub(Me),_e.isub(ke)):(re.isub(W),Me.isub(ae),ke.isub(_e))}return{a:Me,b:ke,gcd:re.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var W=this,re=N.clone();W.negative!==0?W=W.umod(N):W=W.clone();for(var ae=new f(1),_e=new f(0),Me=re.clone();W.cmpn(1)>0&&re.cmpn(1)>0;){for(var ke=0,ge=1;!(W.words[0]&ge)&&ke<26;++ke,ge<<=1);if(ke>0)for(W.iushrn(ke);ke-- >0;)ae.isOdd()&&ae.iadd(Me),ae.iushrn(1);for(var ie=0,Te=1;!(re.words[0]&Te)&&ie<26;++ie,Te<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(Me),_e.iushrn(1);W.cmp(re)>=0?(W.isub(re),ae.isub(_e)):(re.isub(W),_e.isub(ae))}var Ee;return W.cmpn(1)===0?Ee=ae:Ee=_e,Ee.cmpn(0)<0&&Ee.iadd(N),Ee},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var W=this.clone(),re=N.clone();W.negative=0,re.negative=0;for(var ae=0;W.isEven()&&re.isEven();ae++)W.iushrn(1),re.iushrn(1);do{for(;W.isEven();)W.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=W.cmp(re);if(_e<0){var Me=W;W=re,re=Me}else if(_e===0||re.cmpn(1)===0)break;W.isub(re)}while(!0);return re.iushln(ae)},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 W=N%26,re=(N-W)/26,ae=1<>>26,ke&=67108863,this.words[Me]=ke}return _e!==0&&(this.words[Me]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var W=N<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this.strip();var re;if(this.length>1)re=1;else{W&&(N=-N),u(N<=67108863,"Number is too big");var ae=this.words[0]|0;re=ae===N?0:aeN.length)return 1;if(this.length=0;re--){var ae=this.words[re]|0,_e=N.words[re]|0;if(ae!==_e){ae<_e?W=-1:ae>_e&&(W=1);break}}return W},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 H(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 p={k256:null,p224:null,p192:null,p25519:null};function P(G,N){this.name=G,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 W=N,re;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),re=W.bitLength();while(re>this.n);var ae=re0?W.isub(this.p):W.strip!==void 0?W.strip():W._strip(),W},P.prototype.split=function(N,W){N.iushrn(this.n,0,W)},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,W){for(var re=4194303,ae=Math.min(N.length,9),_e=0;_e>>22,Me=ke}Me>>>=22,N.words[_e-10]=Me,Me===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 W=0,re=0;re>>=26,N.words[re]=_e,W=ae}return W!==0&&(N.words[N.length++]=W),N},f._prime=function(N){if(p[N])return p[N];var W;if(N==="k256")W=new T;else if(N==="p224")W=new F;else if(N==="p192")W=new q;else if(N==="p25519")W=new V;else throw new Error("Unknown prime "+N);return p[N]=W,W};function H(G){if(typeof G=="string"){var N=f._prime(G);this.m=N.p,this.prime=N}else u(G.gtn(1),"modulus must be greater than 1"),this.m=G,this.prime=null}H.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},H.prototype._verify2=function(N,W){u((N.negative|W.negative)===0,"red works only with positives"),u(N.red&&N.red===W.red,"red works only with red numbers")},H.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},H.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},H.prototype.add=function(N,W){this._verify2(N,W);var re=N.add(W);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},H.prototype.iadd=function(N,W){this._verify2(N,W);var re=N.iadd(W);return re.cmp(this.m)>=0&&re.isub(this.m),re},H.prototype.sub=function(N,W){this._verify2(N,W);var re=N.sub(W);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},H.prototype.isub=function(N,W){this._verify2(N,W);var re=N.isub(W);return re.cmpn(0)<0&&re.iadd(this.m),re},H.prototype.shl=function(N,W){return this._verify1(N),this.imod(N.ushln(W))},H.prototype.imul=function(N,W){return this._verify2(N,W),this.imod(N.imul(W))},H.prototype.mul=function(N,W){return this._verify2(N,W),this.imod(N.mul(W))},H.prototype.isqr=function(N){return this.imul(N,N.clone())},H.prototype.sqr=function(N){return this.mul(N,N)},H.prototype.sqrt=function(N){if(N.isZero())return N.clone();var W=this.m.andln(3);if(u(W%2===1),W===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var ae=this.m.subn(1),_e=0;!ae.isZero()&&ae.andln(1)===0;)_e++,ae.iushrn(1);u(!ae.isZero());var Me=new f(1).toRed(this),ke=Me.redNeg(),ge=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,ge).cmp(ke)!==0;)ie.redIAdd(ke);for(var Te=this.pow(ie,ae),Ee=this.pow(N,ae.addn(1).iushrn(1)),Ae=this.pow(N,ae),ze=_e;Ae.cmp(Me)!==0;){for(var Ce=Ae,me=0;Ce.cmp(Me)!==0;me++)Ce=Ce.redSqr();u(me=0;_e--){for(var Te=W.words[_e],Ee=ie-1;Ee>=0;Ee--){var Ae=Te>>Ee&1;if(Me!==ae[0]&&(Me=this.sqr(Me)),Ae===0&&ke===0){ge=0;continue}ke<<=1,ke|=Ae,ge++,!(ge!==re&&(_e!==0||Ee!==0))&&(Me=this.mul(Me,ae[ke]),ge=0,ke=0)}ie=26}return Me},H.prototype.convertTo=function(N){var W=N.umod(this.m);return W===N?W.clone():W},H.prototype.convertFrom=function(N){var W=N.clone();return W.red=null,W},f.mont=function(N){return new X(N)};function X(G){H.call(this,G),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(X,H),X.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},X.prototype.convertFrom=function(N){var W=this.imod(N.mul(this.rinv));return W.red=null,W},X.prototype.imul=function(N,W){if(N.isZero()||W.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(W),ae=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(ae).iushrn(this.shift),Me=_e;return _e.cmp(this.m)>=0?Me=_e.isub(this.m):_e.cmpn(0)<0&&(Me=_e.iadd(this.m)),Me._forceRed(this)},X.prototype.mul=function(N,W){if(N.isZero()||W.isZero())return new f(0)._forceRed(this);var re=N.mul(W),ae=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(ae).iushrn(this.shift),Me=_e;return _e.cmp(this.m)>=0?Me=_e.isub(this.m):_e.cmpn(0)<0&&(Me=_e.iadd(this.m)),Me._forceRed(this)},X.prototype.invm=function(N){var W=this.imod(N._invmp(this.m).mul(this.r2));return W._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(M<=0)){var p,P=s.mallocDouble(2*M*_),T=s.mallocInt32(_);if(_=f(E,M,P,T),_>0){if(M===1&&L)l.init(_),p=l.sweepComplete(M,S,0,_,P,T,0,_,P,T);else{var F=s.mallocDouble(2*M*C),q=s.mallocInt32(C);C=f(k,M,F,q),C>0&&(l.init(_+C),M===1?p=l.sweepBipartite(M,S,0,_,P,T,0,C,F,q):p=u(M,S,L,_,P,T,C,F,q),s.free(F),s.free(q))}s.free(P),s.free(T)}return p}}}var d;function v(E,k){d.push([E,k])}function x(E){return d=[],h(E,E,v,!0),d}function b(E,k){return d=[],h(E,k,v,!1),d}function g(E,k,S){switch(arguments.length){case 1:return x(E);case 2:return typeof k=="function"?h(E,E,k,!0):b(E,k);case 3:return h(E,k,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function u(h,d,v,x,b,g,E,k,S,L,_){for(var C=2*h,M=x,p=C*x;MS-k?u(h,d,v,x,b,g,E,k,S,L,_):c(h,d,v,x,b,g,E,k,S,L,_)}return f}function s(){function u(v,x,b,g,E,k,S,L,_,C,M){for(var p=2*v,P=g,T=p*g;PC-_?g?u(v,x,b,E,k,S,L,_,C,M,p):c(v,x,b,E,k,S,L,_,C,M,p):g?f(v,x,b,E,k,S,L,_,C,M,p):h(v,x,b,E,k,S,L,_,C,M,p)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150:function(i,a,o){"use strict";i.exports=G;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),x=128,b=1<<22,g=1<<22,E=v("!(lo>=p0)&&!(p1>=hi)"),k=v("lo===p0"),S=v("lo0;){Te-=1;var ze=Te*M,Ce=T[ze],me=T[ze+1],De=T[ze+2],ce=T[ze+3],Ge=T[ze+4],nt=T[ze+5],ct=Te*p,qt=F[ct],rt=F[ct+1],ot=nt&1,Dt=!!(nt&16),kt=_e,Ct=Me,Yt=ge,xr=ie;if(ot&&(kt=ge,Ct=ie,Yt=_e,xr=Me),!(nt&2&&(De=S(N,Ce,me,De,kt,Ct,rt),me>=De))&&!(nt&4&&(me=L(N,Ce,me,De,kt,Ct,qt),me>=De))){var er=De-me,Ke=Ge-ce;if(Dt){if(N*er*(er+Ke)v&&b[C+d]>L;--_,C-=E){for(var M=C,p=C+E,P=0;P>>1,L=2*h,_=S,C=b[L*S+d];E=F?(_=T,C=F):P>=V?(_=p,C=P):(_=q,C=V):F>=V?(_=T,C=F):V>=P?(_=p,C=P):(_=q,C=V);for(var G=L*(k-1),N=L*_,H=0;H=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,x,b,g,E,k,S){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p];if(F===S)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function l(v,x,b,g,E,k,S){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p];if(Fq;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function u(v,x,b,g,E,k,S){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+P];if(F<=S)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function c(v,x,b,g,E,k,S){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+P];if(F<=S)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function f(v,x,b,g,E,k,S){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p],q=E[_+P];if(F<=S&&S<=q)if(M===T)M+=1,C+=L;else{for(var V=0;L>V;++V){var H=E[_+V];E[_+V]=E[C],E[C++]=H}var X=k[T];k[T]=k[M],k[M++]=X}}return M}function h(v,x,b,g,E,k,S){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p],q=E[_+P];if(FV;++V){var H=E[_+V];E[_+V]=E[C],E[C++]=H}var X=k[T];k[T]=k[M],k[M++]=X}}return M}function d(v,x,b,g,E,k,S,L){for(var _=2*v,C=_*b,M=C,p=b,P=x,T=v+x,F=b;g>F;++F,C+=_){var q=E[C+P],V=E[C+T];if(!(q>=S)&&!(L>=V))if(p===F)p+=1,M+=_;else{for(var H=0;_>H;++H){var X=E[C+H];E[C+H]=E[M],E[M++]=X}var G=k[F];k[F]=k[p],k[p++]=G}}return p}},4192:function(i){"use strict";i.exports=o;var a=32;function o(x,b){b<=4*a?s(0,b-1,x):v(0,b-1,x)}function s(x,b,g){for(var E=2*(x+1),k=x+1;k<=b;++k){for(var S=g[E++],L=g[E++],_=k,C=E-2;_-- >x;){var M=g[C-2],p=g[C-1];if(Mg[b+1]:!0}function d(x,b,g,E){x*=2;var k=E[x];return k>1,_=L-E,C=L+E,M=k,p=_,P=L,T=C,F=S,q=x+1,V=b-1,H=0;h(M,p,g)&&(H=M,M=p,p=H),h(T,F,g)&&(H=T,T=F,F=H),h(M,P,g)&&(H=M,M=P,P=H),h(p,P,g)&&(H=p,p=P,P=H),h(M,T,g)&&(H=M,M=T,T=H),h(P,T,g)&&(H=P,P=T,T=H),h(p,F,g)&&(H=p,p=F,F=H),h(p,P,g)&&(H=p,p=P,P=H),h(T,F,g)&&(H=T,T=F,F=H);for(var X=g[2*p],G=g[2*p+1],N=g[2*T],W=g[2*T+1],re=2*M,ae=2*P,_e=2*F,Me=2*k,ke=2*L,ge=2*S,ie=0;ie<2;++ie){var Te=g[re+ie],Ee=g[ae+ie],Ae=g[_e+ie];g[Me+ie]=Te,g[ke+ie]=Ee,g[ge+ie]=Ae}u(_,x,g),u(C,b,g);for(var ze=q;ze<=V;++ze)if(d(ze,X,G,g))ze!==q&&l(ze,q,g),++q;else if(!d(ze,N,W,g))for(;;)if(d(V,N,W,g)){d(V,X,G,g)?(c(ze,q,V,g),++q,--V):(l(ze,V,g),--V);break}else{if(--V>>1;u(E,Ee);for(var Ae=0,ze=0,ke=0;ke=c)Ce=Ce-c|0,S(v,x,ze--,Ce);else if(Ce>=0)S(h,d,Ae--,Ce);else if(Ce<=-c){Ce=-Ce-c|0;for(var me=0;me>>1;u(E,Ee);for(var Ae=0,ze=0,Ce=0,ke=0;ke>1===E[2*ke+3]>>1&&(De=2,ke+=1),me<0){for(var ce=-(me>>1)-1,Ge=0;Ge>1)-1;De===0?S(h,d,Ae--,ce):De===1?S(v,x,ze--,ce):De===2&&S(b,g,Ce--,ce)}}}function M(P,T,F,q,V,H,X,G,N,W,re,ae){var _e=0,Me=2*P,ke=T,ge=T+P,ie=1,Te=1;q?Te=c:ie=c;for(var Ee=V;Ee>>1;u(E,me);for(var De=0,Ee=0;Ee=c?(Ge=!q,Ae-=c):(Ge=!!q,Ae-=1),Ge)L(h,d,De++,Ae);else{var nt=ae[Ae],ct=Me*Ae,qt=re[ct+T+1],rt=re[ct+T+1+P];e:for(var ot=0;ot>>1;u(E,Ae);for(var ze=0,ge=0;ge=c)h[ze++]=ie-c;else{ie-=1;var me=re[ie],De=_e*ie,ce=W[De+T+1],Ge=W[De+T+1+P];e:for(var nt=0;nt=0;--nt)if(h[nt]===ie){for(var ot=nt+1;ot0;){for(var k=d.pop(),b=d.pop(),S=-1,L=-1,g=x[b],C=1;C=0||(h.flip(b,k),u(f,h,d,S,b,L),u(f,h,d,b,L,S),u(f,h,d,L,k,S),u(f,h,d,k,S,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function l(v,x,b,g,E,k,S){this.cells=v,this.neighbor=x,this.flags=g,this.constraint=b,this.active=E,this.next=k,this.boundary=S}var u=l.prototype;function c(v,x){return v[0]-x[0]||v[1]-x[1]||v[2]-x[2]}u.locate=function(){var v=[0,0,0];return function(x,b,g){var E=x,k=b,S=g;return b0||S.length>0;){for(;k.length>0;){var p=k.pop();if(L[p]!==-E){L[p]=E;for(var P=_[p],T=0;T<3;++T){var F=M[3*p+T];F>=0&&L[F]===0&&(C[3*p+T]?S.push(F):(k.push(F),L[F]=E))}}}var q=S;S=k,k=q,S.length=0,E=-E}var V=h(_,L,x);return b?V.concat(g.boundary):V}},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,_,C,M,p){this.a=L,this.b=_,this.idx=C,this.lowerIds=M,this.upperIds=p}function d(L,_,C,M){this.a=L,this.b=_,this.type=C,this.idx=M}function v(L,_){var C=L.a[0]-_.a[0]||L.a[1]-_.a[1]||L.type-_.type;return C||L.type!==u&&(C=l(L.a,L.b,_.b),C)?C:L.idx-_.idx}function x(L,_){return l(L.a,L.b,_)}function b(L,_,C,M,p){for(var P=s.lt(_,M,x),T=s.gt(_,M,x),F=P;F1&&l(C[V[X-2]],C[V[X-1]],M)>0;)L.push([V[X-1],V[X-2],p]),X-=1;V.length=X,V.push(p);for(var H=q.upperIds,X=H.length;X>1&&l(C[H[X-2]],C[H[X-1]],M)<0;)L.push([H[X-2],H[X-1],p]),X-=1;H.length=X,H.push(p)}}function g(L,_){var C;return L.a[0]<_.a[0]?C=l(L.a,L.b,_.a):C=l(_.b,_.a,L.a),C||(_.b[0]q[0]&&p.push(new d(q,F,f,P),new d(F,q,c,P))}p.sort(v);for(var V=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),H=[new h([V,1],[V,0],-1,[],[],[],[])],X=[],P=0,G=p.length;P=0}}(),u.removeTriangle=function(h,d,v){var x=this.stars;c(x[h],d,v),c(x[d],v,h),c(x[v],h,d)},u.addTriangle=function(h,d,v){var x=this.stars;x[h].push(d,v),x[d].push(v,h),x[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],x=1,b=v.length;x=0;--N){var Te=X[N];W=Te[0];var Ee=V[W],Ae=Ee[0],ze=Ee[1],Ce=q[Ae],me=q[ze];if((Ce[0]-me[0]||Ce[1]-me[1])<0){var De=Ae;Ae=ze,ze=De}Ee[0]=Ae;var ce=Ee[1]=Te[1],Ge;for(G&&(Ge=Ee[2]);N>0&&X[N-1][0]===W;){var Te=X[--N],nt=Te[1];G?V.push([ce,nt,Ge]):V.push([ce,nt]),ce=nt}G?V.push([ce,ze,Ge]):V.push([ce,ze])}return re}function _(q,V,H){for(var X=V.length,G=new s(X),N=[],W=0;WV[2]?1:0)}function p(q,V,H){if(q.length!==0){if(V)for(var X=0;X0||W.length>0}function F(q,V,H){var X;if(H){X=V;for(var G=new Array(V.length),N=0;NL+1)throw new Error(k+" map requires nshades to be at least size "+E.length);Array.isArray(d.alpha)?d.alpha.length!==2?_=[1,1]:_=d.alpha.slice():typeof d.alpha=="number"?_=[d.alpha,d.alpha]:_=[1,1],v=E.map(function(F){return Math.round(F.index*L)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var M=E.map(function(F,q){var V=E[q].index,H=E[q].rgb.slice();return H.length===4&&H[3]>=0&&H[3]<=1||(H[3]=_[0]+(_[1]-_[0])*V),H}),p=[];for(C=0;C=0}function d(v,x,b,g){var E=s(x,b,g);if(E===0){var k=l(s(v,x,b)),S=l(s(v,x,g));if(k===S){if(k===0){var L=h(v,x,b),_=h(v,x,g);return L===_?0:L?1:-1}return 0}else{if(S===0)return k>0||h(v,x,g)?-1:1;if(k===0)return S>0||h(v,x,b)?1:-1}return l(S-k)}var C=s(v,x,b);if(C>0)return E>0&&s(v,x,g)>0?1:-1;if(C<0)return E>0||s(v,x,g)>0?1:-1;var M=s(v,x,g);return M>0||h(v,x,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),x=a(u[0],u[1]);return a(v,l[2])-a(x,u[2])||a(v+l[2],h)-a(x+u[2],d);case 4:var b=l[0],g=l[1],E=l[2],k=l[3],S=u[0],L=u[1],_=u[2],C=u[3];return b+g+E+k-(S+L+_+C)||a(b,g,E,k)-a(S,L,_,C,S)||a(b+g,b+E,b+k,g+E,g+k,E+k)-a(S+L,S+_,S+C,L+_,L+C,_+C)||a(b+g+E,b+g+k,b+E+k,g+E+k)-a(S+L+_,S+L+C,S+_+C,L+_+C);default:for(var M=l.slice().sort(o),p=u.slice().sort(o),P=0;Po[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v=d[S]&&(k+=1);g[E]=k}}return h}function f(h,d){try{return s(h,!0)}catch(g){var v=l(h);if(v.length<=d)return[];var x=u(h,v),b=s(x,!0);return c(b,v)}}},4769:function(i){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,x=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var g=s.length-1;g>=0;--g)h[g]=d*s[g]+v*l[g]+x*u[g]+b*c[g];return h}return d*s+v*l+x*u[g]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,x=d*d,b=(1+2*f)*x,g=f*x,E=v*(3-2*f),k=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]+g*l[S]+E*u[S]+k*c[S];return h}return b*s+g*l+E*u+k*c}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var x=d.point,b=v.point,g=x.length,E=0;E=2)return!1;H[G]=N}return!0}):V=V.filter(function(H){for(var X=0;X<=b;++X){var G=P[H[X]];if(G<0)return!1;H[X]=G}return!0}),b&1)for(var k=0;k>>31},i.exports.exponent=function(E){var k=i.exports.hi(E);return(k<<1>>>21)-1023},i.exports.fraction=function(E){var k=i.exports.lo(E),S=i.exports.hi(E),L=S&(1<<20)-1;return S&2146435072&&(L+=1048576),[k,L]},i.exports.denormalized=function(E){var k=i.exports.hi(E);return!(k&2146435072)}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=b-1)for(var C=k.length-1,p=v-x[b-1],M=0;M=b-1)for(var _=k.length-1,C=v-x[b-1],M=0;M=0;--b)if(v[--x])return!1;return!0},f.jump=function(v){var x=this.lastT(),b=this.dimension;if(!(v0;--M)g.push(u(L[M-1],_[M-1],arguments[M])),E.push(0)}},f.push=function(v){var x=this.lastT(),b=this.dimension;if(!(v1e-6?1/S:0;this._time.push(v);for(var p=b;p>0;--p){var P=u(_[p-1],C[p-1],arguments[p]);g.push(P),E.push((P-g[k++])*M)}}},f.set=function(v){var x=this.dimension;if(!(v0;--L)b.push(u(k[L-1],S[L-1],arguments[L])),g.push(0)}},f.move=function(v){var x=this.lastT(),b=this.dimension;if(!(v<=x||arguments.length!==b+1)){var g=this._state,E=this._velocity,k=g.length-this.dimension,S=this.bounds,L=S[0],_=S[1],C=v-x,M=C>1e-6?1/C:0;this._time.push(v);for(var p=b;p>0;--p){var P=arguments[p];g.push(u(L[p-1],_[p-1],g[k++]+P)),E.push(P*M)}}},f.idle=function(v){var x=this.lastT();if(!(v=0;--M)g.push(u(L[M],_[M],g[k]+C*E[k])),E.push(0),k+=1}};function h(v){for(var x=new Array(v),b=0;b=0;--q){var p=P[q];T[q]<=0?P[q]=new s(p._color,p.key,p.value,P[q+1],p.right,p._count+1):P[q]=new s(p._color,p.key,p.value,p.left,P[q+1],p._count+1)}for(var q=P.length-1;q>1;--q){var V=P[q-1],p=P[q];if(V._color===o||p._color===o)break;var H=P[q-2];if(H.left===V)if(V.left===p){var X=H.right;if(X&&X._color===a)V._color=o,H.right=u(o,X),H._color=a,q-=1;else{if(H._color=a,H.left=V.right,V._color=o,V.right=H,P[q-2]=V,P[q-1]=p,c(H),c(V),q>=3){var G=P[q-3];G.left===H?G.left=V:G.right=V}break}}else{var X=H.right;if(X&&X._color===a)V._color=o,H.right=u(o,X),H._color=a,q-=1;else{if(V.right=p.left,H._color=a,H.left=p.right,p._color=o,p.left=V,p.right=H,P[q-2]=p,P[q-1]=V,c(H),c(V),c(p),q>=3){var G=P[q-3];G.left===H?G.left=p:G.right=p}break}}else if(V.right===p){var X=H.left;if(X&&X._color===a)V._color=o,H.left=u(o,X),H._color=a,q-=1;else{if(H._color=a,H.right=V.left,V._color=o,V.left=H,P[q-2]=V,P[q-1]=p,c(H),c(V),q>=3){var G=P[q-3];G.right===H?G.right=V:G.left=V}break}}else{var X=H.left;if(X&&X._color===a)V._color=o,H.left=u(o,X),H._color=a,q-=1;else{if(V.left=p.right,H._color=a,H.right=p.left,p._color=o,p.right=V,p.left=H,P[q-2]=p,P[q-1]=V,c(H),c(V),c(p),q>=3){var G=P[q-3];G.right===H?G.right=p:G.left=p}break}}}return P[0]._color=o,new f(M,P[0])};function d(_,C){if(C.left){var M=d(_,C.left);if(M)return M}var M=_(C.key,C.value);if(M)return M;if(C.right)return d(_,C.right)}function v(_,C,M,p){var P=C(_,p.key);if(P<=0){if(p.left){var T=v(_,C,M,p.left);if(T)return T}var T=M(p.key,p.value);if(T)return T}if(p.right)return v(_,C,M,p.right)}function x(_,C,M,p,P){var T=M(_,P.key),F=M(C,P.key),q;if(T<=0&&(P.left&&(q=x(_,C,M,p,P.left),q)||F>0&&(q=p(P.key,P.value),q)))return q;if(F>0&&P.right)return x(_,C,M,p,P.right)}h.forEach=function(C,M,p){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,p)>=0?void 0:x(M,p,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.left;return new b(this,_)}}),Object.defineProperty(h,"end",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.right;return new b(this,_)}}),h.at=function(_){if(_<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(_=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T<=0&&(P=p.length),T<=0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.gt=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T<0&&(P=p.length),T<0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.lt=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T>0&&(P=p.length),T<=0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.le=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T>=0&&(P=p.length),T<0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.find=function(_){for(var C=this._compare,M=this.root,p=[];M;){var P=C(_,M.key);if(p.push(M),P===0)return new b(this,p);P<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(_){var C=this.find(_);return C?C.remove():this},h.get=function(_){for(var C=this._compare,M=this.root;M;){var p=C(_,M.key);if(p===0)return M.value;p<=0?M=M.left:M=M.right}};function b(_,C){this.tree=_,this._stack=C}var g=b.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new b(this.tree,this._stack.slice())};function E(_,C){_.key=C.key,_.value=C.value,_.left=C.left,_.right=C.right,_._color=C._color,_._count=C._count}function k(_){for(var C,M,p,P,T=_.length-1;T>=0;--T){if(C=_[T],T===0){C._color=o;return}if(M=_[T-1],M.left===C){if(p=M.right,p.right&&p.right._color===a){if(p=M.right=l(p),P=p.right=l(p.right),M.right=p.left,p.left=M,p.right=P,p._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(p),T>1){var F=_[T-2];F.left===M?F.left=p:F.right=p}_[T-1]=p;return}else if(p.left&&p.left._color===a){if(p=M.right=l(p),P=p.left=l(p.left),M.right=P.left,p.left=P.right,P.left=M,P.right=p,P._color=M._color,M._color=o,p._color=o,C._color=o,c(M),c(p),c(P),T>1){var F=_[T-2];F.left===M?F.left=P:F.right=P}_[T-1]=P;return}if(p._color===o)if(M._color===a){M._color=o,M.right=u(a,p);return}else{M.right=u(a,p);continue}else{if(p=l(p),M.right=p.left,p.left=M,p._color=M._color,M._color=a,c(M),c(p),T>1){var F=_[T-2];F.left===M?F.left=p:F.right=p}_[T-1]=p,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}else{if(p=M.left,p.left&&p.left._color===a){if(p=M.left=l(p),P=p.left=l(p.left),M.left=p.right,p.right=M,p.left=P,p._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(p),T>1){var F=_[T-2];F.right===M?F.right=p:F.left=p}_[T-1]=p;return}else if(p.right&&p.right._color===a){if(p=M.left=l(p),P=p.right=l(p.right),M.left=P.right,p.right=P.left,P.right=M,P.left=p,P._color=M._color,M._color=o,p._color=o,C._color=o,c(M),c(p),c(P),T>1){var F=_[T-2];F.right===M?F.right=P:F.left=P}_[T-1]=P;return}if(p._color===o)if(M._color===a){M._color=o,M.left=u(a,p);return}else{M.left=u(a,p);continue}else{if(p=l(p),M.left=p.right,p.right=M,p._color=M._color,M._color=a,c(M),c(p),T>1){var F=_[T-2];F.right===M?F.right=p:F.left=p}_[T-1]=p,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}}}g.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var C=new Array(_.length),M=_[_.length-1];C[C.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var p=_.length-2;p>=0;--p){var M=_[p];M.left===_[p+1]?C[p]=new s(M._color,M.key,M.value,C[p+1],M.right,M._count):C[p]=new s(M._color,M.key,M.value,M.left,C[p+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 p=C.length-2;p>=P;--p)M=C[p],C[p]=new s(M._color,M.key,M.value,M.left,C[p+1],M._count);C[P-1].left=C[P]}if(M=C[C.length-1],M._color===a){var F=C[C.length-2];F.left===M?F.left=null:F.right===M&&(F.right=null),C.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var _=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(_=C[C.length-1].left._count);for(var p=C.length-2;p>=0;--p)C[p+1]===C[p].right&&(++_,C[p].left&&(_+=C[p].left._count));return _},enumerable:!0}),g.next=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.right)for(C=C.right;C;)_.push(C),C=C.left;else for(_.pop();_.length>0&&_[_.length-1].right===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].left===_[C])return!0;return!1}}),g.update=function(_){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),p=C[C.length-1];M[M.length-1]=new s(p._color,p.key,_,p.left,p.right,p._count);for(var P=C.length-2;P>=0;--P)p=C[P],p.left===C[P+1]?M[P]=new s(p._color,p.key,p.value,M[P+1],p.right,p._count):M[P]=new s(p._color,p.key,p.value,p.left,M[P+1],p._count);return new f(this.tree._compare,M[0])},g.prev=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.left)for(C=C.left;C;)_.push(C),C=C.right;else for(_.pop();_.length>0&&_[_.length-1].left===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].right===_[C])return!0;return!1}});function S(_,C){return _C?1:0}function L(_){return new f(_||S,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function x(V){return d.isView(V)&&!(V instanceof v)}function b(V){return Array.isArray(V)||x(V)}function g(V,H){return V[0]=H[0],V[1]=H[1],V[2]=H[2],V}function E(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 k=E.prototype;k.update=function(V){V=V||{};function H(Ae,ze,Ce){if(Ce in V){var me=V[Ce],De=this[Ce],ce;(Ae?b(me)&&b(me[0]):b(me))?this[Ce]=ce=[ze(me[0]),ze(me[1]),ze(me[2])]:this[Ce]=ce=[ze(me),ze(me),ze(me)];for(var Ge=0;Ge<3;++Ge)if(ce[Ge]!==De[Ge])return!0}return!1}var X=H.bind(this,!1,Number),G=H.bind(this,!1,Boolean),N=H.bind(this,!1,String),W=H.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]}),re,ae=!1,_e=!1;if("bounds"in V)for(var Me=V.bounds,ke=0;ke<2;++ke)for(var ge=0;ge<3;++ge)Me[ke][ge]!==this.bounds[ke][ge]&&(_e=!0),this.bounds[ke][ge]=Me[ke][ge];if("ticks"in V){re=V.ticks,ae=!0,this.autoTicks=!1;for(var ke=0;ke<3;++ke)this.tickSpacing[ke]=0}else X("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in V||"tickSpacing"in V||(this.autoTicks=!0),_e=!0,ae=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),ae=!0),ae){for(var ke=0;ke<3;++ke)re[ke].sort(function(ze,Ce){return ze.x-Ce.x});f.equal(re,this.ticks)?ae=!1:this.ticks=re}G("tickEnable"),N("tickFont")&&(ae=!0),N("tickFontStyle")&&(ae=!0),N("tickFontWeight")&&(ae=!0),N("tickFontVariant")&&(ae=!0),X("tickSize"),X("tickAngle"),X("tickPad"),W("tickColor");var ie=N("labels");N("labelFont")&&(ie=!0),N("labelFontStyle")&&(ie=!0),N("labelFontWeight")&&(ie=!0),N("labelFontVariant")&&(ie=!0),G("labelEnable"),X("labelSize"),X("labelPad"),W("labelColor"),G("lineEnable"),G("lineMirror"),X("lineWidth"),W("lineColor"),G("lineTickEnable"),G("lineTickMirror"),X("lineTickLength"),X("lineTickWidth"),W("lineTickColor"),G("gridEnable"),X("gridWidth"),W("gridColor"),G("zeroEnable"),W("zeroLineColor"),X("zeroLineWidth"),G("backgroundEnable"),W("backgroundColor");var Te=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||ae)&&this._text.update(this.bounds,this.labels,Te,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,Te,this.ticks,Ee),this._lines&&ae&&(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 _(V,H,X,G,N){for(var W=V.primalOffset,re=V.primalMinor,ae=V.mirrorOffset,_e=V.mirrorMinor,Me=G[H],ke=0;ke<3;++ke)if(H!==ke){var ge=W,ie=ae,Te=re,Ee=_e;Me&1<0?(Te[ke]=-1,Ee[ke]=0):(Te[ke]=0,Ee[ke]=1)}}var C=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(V){};var p=0,P=[0,0,0],T=[0,0,0],F=[0,0,0];k.draw=function(V){V=V||M;for(var Ce=this.gl,H=V.model||h,X=V.view||h,G=V.projection||h,N=this.bounds,W=V._ortho||!1,re=c(H,X,G,N,W),ae=re.cubeEdges,_e=re.axis,Me=X[12],ke=X[13],ge=X[14],ie=X[15],Te=W?2:1,Ee=Te*this.pixelRatio*(G[3]*Me+G[7]*ke+G[11]*ge+G[15]*ie)/Ce.drawingBufferHeight,Ae=0;Ae<3;++Ae)this.lastCubeProps.cubeEdges[Ae]=ae[Ae],this.lastCubeProps.axis[Ae]=_e[Ae];for(var ze=L,Ae=0;Ae<3;++Ae)_(L[Ae],Ae,this.bounds,ae,_e);for(var Ce=this.gl,me=C,Ae=0;Ae<3;++Ae)this.backgroundEnable[Ae]?me[Ae]=_e[Ae]:me[Ae]=0;this._background.draw(H,X,G,N,me,this.backgroundColor),this._lines.bind(H,X,G,this);for(var Ae=0;Ae<3;++Ae){var De=[0,0,0];_e[Ae]>0?De[Ae]=N[1][Ae]:De[Ae]=N[0][Ae];for(var ce=0;ce<2;++ce){var Ge=(Ae+1+ce)%3,nt=(Ae+1+(ce^1))%3;this.gridEnable[Ge]&&this._lines.drawGrid(Ge,nt,this.bounds,De,this.gridColor[Ge],this.gridWidth[Ge]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var Ge=(Ae+1+ce)%3,nt=(Ae+1+(ce^1))%3;this.zeroEnable[nt]&&Math.min(N[0][nt],N[1][nt])<=0&&Math.max(N[0][nt],N[1][nt])>=0&&this._lines.drawZero(Ge,nt,this.bounds,De,this.zeroLineColor[nt],this.zeroLineWidth[nt]*this.pixelRatio)}}for(var Ae=0;Ae<3;++Ae){this.lineEnable[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,ze[Ae].primalOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio),this.lineMirror[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,ze[Ae].mirrorOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio);for(var ct=g(P,ze[Ae].primalMinor),qt=g(T,ze[Ae].mirrorMinor),rt=this.lineTickLength,ce=0;ce<3;++ce){var ot=Ee/H[5*ce];ct[ce]*=rt[ce]*ot,qt[ce]*=rt[ce]*ot}this.lineTickEnable[Ae]&&this._lines.drawAxisTicks(Ae,ze[Ae].primalOffset,ct,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio),this.lineTickMirror[Ae]&&this._lines.drawAxisTicks(Ae,ze[Ae].mirrorOffset,qt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,X,G,this.pixelRatio);var Dt,kt=.5,Ct,Yt;function xr(St){Yt=[0,0,0],Yt[St]=1}function er(St,Et,dt){var Ht=(St+1)%3,$t=(St+2)%3,fr=Et[Ht],_r=Et[$t],Br=dt[Ht],Or=dt[$t];if(fr>0&&Or>0){xr(Ht);return}else if(fr>0&&Or<0){xr(Ht);return}else if(fr<0&&Or>0){xr(Ht);return}else if(fr<0&&Or<0){xr(Ht);return}else if(_r>0&&Br>0){xr($t);return}else if(_r>0&&Br<0){xr($t);return}else if(_r<0&&Br>0){xr($t);return}else if(_r<0&&Br<0){xr($t);return}}for(var Ae=0;Ae<3;++Ae){for(var Ke=ze[Ae].primalMinor,xt=ze[Ae].mirrorMinor,bt=g(F,ze[Ae].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[Ae]&&(bt[ce]+=Ee*Ke[ce]*Math.max(this.lineTickLength[ce],0)/H[5*ce]);var Lt=[0,0,0];if(Lt[Ae]=1,this.tickEnable[Ae]){this.tickAngle[Ae]===-3600?(this.tickAngle[Ae]=0,this.tickAlign[Ae]="auto"):this.tickAlign[Ae]=-1,Ct=1,Dt=[this.tickAlign[Ae],kt,Ct],Dt[0]==="auto"?Dt[0]=p:Dt[0]=parseInt(""+Dt[0]),Yt=[0,0,0],er(Ae,Ke,xt);for(var ce=0;ce<3;++ce)bt[ce]+=Ee*Ke[ce]*this.tickPad[ce]/H[5*ce];this._text.drawTicks(Ae,this.tickSize[Ae],this.tickAngle[Ae],bt,this.tickColor[Ae],Lt,Yt,Dt)}if(this.labelEnable[Ae]){Ct=0,Yt=[0,0,0],this.labels[Ae].length>4&&(xr(Ae),Ct=1),Dt=[this.labelAlign[Ae],kt,Ct],Dt[0]==="auto"?Dt[0]=p:Dt[0]=parseInt(""+Dt[0]);for(var ce=0;ce<3;++ce)bt[ce]+=Ee*Ke[ce]*this.labelPad[ce]/H[5*ce];bt[Ae]+=.5*(N[0][Ae]+N[1][Ae]),this._text.drawLabel(Ae,this.labelSize[Ae],this.labelAngle[Ae],bt,this.labelColor[Ae],[0,0,0],Yt,Dt)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function q(V,H){var X=new E(V);return X.update(H),X}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,x,b){this.gl=d,this.buffer=v,this.vao=x,this.shader=b}var f=c.prototype;f.draw=function(d,v,x,b,g,E){for(var k=!1,S=0;S<3;++S)k=k||g[S];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:x,bounds:b,enable:g,colors:E},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],x=[],b=0,g=0;g<3;++g)for(var E=(g+1)%3,k=(g+2)%3,S=[0,0,0],L=[0,0,0],_=-1;_<=1;_+=2){x.push(b,b+2,b+1,b+1,b+2,b+3),S[g]=_,L[g]=_;for(var C=-1;C<=1;C+=2){S[E]=C;for(var M=-1;M<=1;M+=2)S[k]=M,v.push(S[0],S[1],S[2],L[0],L[1],L[2]),b+=1}var p=E;E=k,k=p}var P=s(d,new Float32Array(v)),T=s(d,new Uint16Array(x),d.ELEMENT_ARRAY_BUFFER),F=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],T),q=u(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new c(d,P,F,q)}},6429:function(i,a,o){"use strict";i.exports=_;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),x=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,M,p){for(var P=0;P<4;++P){C[P]=p[12+P];for(var T=0;T<3;++T)C[P]+=M[T]*p[4*T+P]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function E(C){for(var M=0;M_e&&(X|=1<_e){X|=1<d[q][1])&&(ze=q);for(var Ce=-1,q=0;q<3;++q){var me=ze^1<d[De][0]&&(De=me)}}var ce=k;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Ce^ze)]=ze&Ce,ce[s.log2(ze^De)]=ze&De;var Ge=De^7;Ge===X||Ge===Ae?(Ge=Ce^7,ce[s.log2(De^Ge)]=Ge&De):ce[s.log2(Ce^Ge)]=Ge&Ce;for(var nt=S,ct=X,W=0;W<3;++W)ct&1<{});function Vm(){}function WEe(){return this.rgb().formatHex()}function kkt(){return this.rgb().formatHex8()}function Ckt(){return QEe(this).formatHsl()}function ZEe(){return this.rgb().formatRgb()}function j_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=bkt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?XEe(t):r===3?new hd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?pR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?pR(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=wkt.exec(e))?new hd(t[1],t[2],t[3],1):(t=Tkt.exec(e))?new hd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Akt.exec(e))?pR(t[1],t[2],t[3],t[4]):(t=Skt.exec(e))?pR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Mkt.exec(e))?JEe(t[1],t[2]/100,t[3]/100,1):(t=Ekt.exec(e))?JEe(t[1],t[2]/100,t[3]/100,t[4]):jEe.hasOwnProperty(e)?XEe(jEe[e]):e==="transparent"?new hd(NaN,NaN,NaN,0):null}function XEe(e){return new hd(e>>16&255,e>>8&255,e&255,1)}function pR(e,t,r,n){return n<=0&&(e=t=r=NaN),new hd(e,t,r,n)}function CE(e){return e instanceof Vm||(e=j_(e)),e?(e=e.rgb(),new hd(e.r,e.g,e.b,e.opacity)):new hd}function T5(e,t,r,n){return arguments.length===1?CE(e):new hd(e,t,r,n==null?1:n)}function hd(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function YEe(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}`}function Lkt(){return`#${M2(this.r)}${M2(this.g)}${M2(this.b)}${M2((isNaN(this.opacity)?1:this.opacity)*255)}`}function KEe(){let e=mR(this.opacity);return`${e===1?"rgb(":"rgba("}${E2(this.r)}, ${E2(this.g)}, ${E2(this.b)}${e===1?")":`, ${e})`}`}function mR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function M2(e){return e=E2(e),(e<16?"0":"")+e.toString(16)}function JEe(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 QEe(e){if(e instanceof Zg)return new Zg(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(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 LE(e,t,r,n){return arguments.length===1?QEe(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 $Ee(e){return e=(e||0)%360,e<0?e+360:e}function gR(e){return Math.max(0,Math.min(1,e||0))}function oW(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 G_,k2,w5,kE,Um,bkt,wkt,Tkt,Akt,Skt,Mkt,Ekt,jEe,yR=su(()=>{vR();G_=.7,k2=1/G_,w5="\\s*([+-]?\\d+)\\s*",kE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Um="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bkt=/^#([0-9a-f]{3,8})$/,wkt=new RegExp(`^rgb\\(${w5},${w5},${w5}\\)$`),Tkt=new RegExp(`^rgb\\(${Um},${Um},${Um}\\)$`),Akt=new RegExp(`^rgba\\(${w5},${w5},${w5},${kE}\\)$`),Skt=new RegExp(`^rgba\\(${Um},${Um},${Um},${kE}\\)$`),Mkt=new RegExp(`^hsl\\(${kE},${Um},${Um}\\)$`),Ekt=new RegExp(`^hsla\\(${kE},${Um},${Um},${kE}\\)$`),jEe={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};Xy(Vm,j_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:WEe,formatHex:WEe,formatHex8:kkt,formatHsl:Ckt,formatRgb:ZEe,toString:ZEe});Xy(hd,T5,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new hd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new hd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new hd(E2(this.r),E2(this.g),E2(this.b),mR(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:YEe,formatHex:YEe,formatHex8:Lkt,formatRgb:KEe,toString:KEe}));Xy(Zg,LE,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new Zg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,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 hd(oW(e>=240?e-240:e+120,i,n),oW(e,i,n),oW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Zg($Ee(this.h),gR(this.s),gR(this.l),mR(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=mR(this.opacity);return`${e===1?"hsl(":"hsla("}${$Ee(this.h)}, ${gR(this.s)*100}%, ${gR(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var _R,xR,sW=su(()=>{_R=Math.PI/180,xR=180/Math.PI});function ake(e){if(e instanceof Hm)return new Hm(e.l,e.a,e.b,e.opacity);if(e instanceof Yy)return oke(e);e instanceof hd||(e=CE(e));var t=fW(e.r),r=fW(e.g),n=fW(e.b),i=lW((.2225045*t+.7168786*r+.0606169*n)/tke),a,o;return t===r&&r===n?a=o=i:(a=lW((.4360747*t+.3850649*r+.1430804*n)/eke),o=lW((.0139322*t+.0971045*r+.7141733*n)/rke)),new Hm(116*i-16,500*(a-i),200*(i-o),e.opacity)}function S5(e,t,r,n){return arguments.length===1?ake(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 lW(e){return e>Pkt?Math.pow(e,1/3):e/nke+ike}function uW(e){return e>A5?e*e*e:nke*(e-ike)}function cW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function fW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ikt(e){if(e instanceof Yy)return new Yy(e.h,e.c,e.l,e.opacity);if(e instanceof Hm||(e=ake(e)),e.a===0&&e.b===0)return new Yy(NaN,0{vR();yR();sW();bR=18,eke=.96422,tke=1,rke=.82521,ike=4/29,A5=6/29,nke=3*A5*A5,Pkt=A5*A5*A5;Xy(Hm,S5,H_(Vm,{brighter(e){return new Hm(this.l+bR*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Hm(this.l-bR*(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=eke*uW(t),e=tke*uW(e),r=rke*uW(r),new hd(cW(3.1338561*t-1.6168667*e-.4906146*r),cW(-.9787684*t+1.9161415*e+.033454*r),cW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));Xy(Yy,PE,H_(Vm,{brighter(e){return new Yy(this.h,this.c,this.l+bR*(e==null?1:e),this.opacity)},darker(e){return new Yy(this.h,this.c,this.l-bR*(e==null?1:e),this.opacity)},rgb(){return oke(this).rgb()}}))});function Dkt(e){if(e instanceof C2)return new C2(e.h,e.s,e.l,e.opacity);e instanceof hd||(e=CE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(cke*n+lke*t-uke*r)/(cke+lke-uke),a=n-i,o=(IE*(r-i)-dW*a)/wR,s=Math.sqrt(o*o+a*a)/(IE*i*(1-i)),l=s?Math.atan2(o,a)*xR-120:NaN;return new C2(l<0?l+360:l,s,i,e.opacity)}function M5(e,t,r,n){return arguments.length===1?Dkt(e):new C2(e,t,r,n==null?1:n)}function C2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var fke,hW,dW,wR,IE,lke,uke,cke,hke=su(()=>{vR();yR();sW();fke=-.14861,hW=1.78277,dW=-.29227,wR=-.90649,IE=1.97294,lke=IE*wR,uke=IE*hW,cke=hW*dW-wR*fke;Xy(C2,M5,H_(Vm,{brighter(e){return e=e==null?k2:Math.pow(k2,e),new C2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?G_:Math.pow(G_,e),new C2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*_R,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new hd(255*(t+r*(fke*n+hW*i)),255*(t+r*(dW*n+wR*i)),255*(t+r*(IE*n)),this.opacity)}}))});var L2=su(()=>{yR();ske();hke()});function vW(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 TR(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 SR(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 vW((r-n/t)*t,i,a,o,s)}}var pW=su(()=>{AR()});var E5,gW=su(()=>{E5=e=>()=>e});function dke(e,t){return function(r){return e+r*t}}function Rkt(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?dke(e,r>180||r<-180?r-360*Math.round(r/360):r):E5(isNaN(e)?t:e)}function vke(e){return(e=+e)==1?qf:function(t,r){return r-t?Rkt(t,r,e):E5(isNaN(t)?r:t)}}function qf(e,t){var r=t-e;return r?dke(e,r):E5(isNaN(e)?t:e)}var P2=su(()=>{gW()});function pke(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{L2();AR();pW();P2();DE=function e(t){var r=vke(t);function n(i,a){var o=r((i=T5(i)).r,(a=T5(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=qf(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);gke=pke(TR),mke=pke(SR)});function k5(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 yke(e,t){return(MR(t)?k5:yW)(e,t)}function yW(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{RE();ER()});function kR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var xW=su(()=>{});function Fp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var zE=su(()=>{});function CR(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]=Z_(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var bW=su(()=>{RE()});function zkt(e){return function(){return e}}function Fkt(e){return function(t){return e(t)+""}}function LR(e,t){var r=TW.lastIndex=wW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=TW.exec(e))&&(i=wW.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:Fp(n,i)})),r=wW.lastIndex;return r{zE();TW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wW=new RegExp(TW.source,"g")});function Z_(e,t){var r=typeof t,n;return t==null||r==="boolean"?E5(t):(r==="number"?Fp:r==="string"?(n=j_(t))?(t=n,DE):LR:t instanceof j_?DE:t instanceof Date?kR:MR(t)?k5:Array.isArray(t)?yW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?CR:Fp)(e,t)}var RE=su(()=>{L2();mW();_W();xW();zE();bW();AW();gW();ER()});function _ke(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var xke=su(()=>{});function bke(e,t){var r=W_(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var wke=su(()=>{P2()});function Tke(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Ake=su(()=>{});function SW(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{Ske=180/Math.PI,PR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Eke(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?PR:SW(t.a,t.b,t.c,t.d,t.e,t.f)}function kke(e){return e==null?PR:(IR||(IR=document.createElementNS("http://www.w3.org/2000/svg","g")),IR.setAttribute("transform",e),(e=IR.transform.baseVal.consolidate())?(e=e.matrix,SW(e.a,e.b,e.c,e.d,e.e,e.f)):PR)}var IR,Cke=su(()=>{Mke()});function Lke(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 x=d.push("translate(",null,t,null,r);v.push({i:x-4,x:Fp(u,f)},{i:x-2,x:Fp(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:Fp(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:Fp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var x=d.push(i(d)+"scale(",null,",",null,")");v.push({i:x-4,x:Fp(u,f)},{i:x-2,x:Fp(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,x=h.length,b;++v{zE();Cke();Pke=Lke(Eke,"px, ","px)","deg)"),Ike=Lke(kke,", ",")",")")});function Rke(e){return((e=Math.exp(e))+1/e)/2}function Okt(e){return((e=Math.exp(e))-1/e)/2}function Bkt(e){return((e=Math.exp(2*e))-1)/(e+1)}var qkt,zke,Fke=su(()=>{qkt=1e-12;zke=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,x=d*d+v*v,b,g;if(x{L2();P2();Oke=qke(W_),Bke=qke(qf)});function MW(e,t){var r=qf((e=S5(e)).l,(t=S5(t)).l),n=qf(e.a,t.a),i=qf(e.b,t.b),a=qf(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 Uke=su(()=>{L2();P2()});function Vke(e){return function(t,r){var n=e((t=PE(t)).h,(r=PE(r)).h),i=qf(t.c,r.c),a=qf(t.l,r.l),o=qf(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 Hke,Gke,jke=su(()=>{L2();P2();Hke=Vke(W_),Gke=Vke(qf)});function Wke(e){return function t(r){r=+r;function n(i,a){var o=e((i=M5(i)).h,(a=M5(a)).h),s=qf(i.s,a.s),l=qf(i.l,a.l),u=qf(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 Zke,Xke,Yke=su(()=>{L2();P2();Zke=Wke(W_),Xke=Wke(qf)});function EW(e,t){t===void 0&&(t=e,e=Z_);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{RE()});function Jke(e,t){for(var r=new Array(t),n=0;n{});var I2={};NQe(I2,{interpolate:()=>Z_,interpolateArray:()=>yke,interpolateBasis:()=>TR,interpolateBasisClosed:()=>SR,interpolateCubehelix:()=>Zke,interpolateCubehelixLong:()=>Xke,interpolateDate:()=>kR,interpolateDiscrete:()=>_ke,interpolateHcl:()=>Hke,interpolateHclLong:()=>Gke,interpolateHsl:()=>Oke,interpolateHslLong:()=>Bke,interpolateHue:()=>bke,interpolateLab:()=>MW,interpolateNumber:()=>Fp,interpolateNumberArray:()=>k5,interpolateObject:()=>CR,interpolateRgb:()=>DE,interpolateRgbBasis:()=>gke,interpolateRgbBasisClosed:()=>mke,interpolateRound:()=>Tke,interpolateString:()=>LR,interpolateTransformCss:()=>Pke,interpolateTransformSvg:()=>Ike,interpolateZoom:()=>zke,piecewise:()=>EW,quantize:()=>Jke});var D2=su(()=>{RE();_W();AR();pW();xW();xke();wke();zE();ER();bW();Ake();AW();Dke();Fke();mW();Nke();Uke();jke();Yke();Kke();$ke()});var DR=ye((tdr,Qke)=>{"use strict";var Nkt=ao(),Ukt=va();Qke.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),Nkt.pointStyle(t,n,i,r)}else Ukt.fill(t,l)}});var kW=ye((rdr,nCe)=>{"use strict";var eCe=xa(),tCe=va(),rCe=Mr(),Vkt=_v().resizeText,Hkt=DR();function Gkt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Vkt(e,t,"sunburst"),t.each(function(r){var n=eCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){eCe.select(this).call(iCe,o,a,e)})})}function iCe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=rCe.castOption(r,o,"marker.line.color")||tCe.defaultLine,l=rCe.castOption(r,o,"marker.line.width")||0;e.call(Hkt,t,r,n).style("stroke-width",l).call(tCe.stroke,s).style("opacity",a?r.leaf.opacity:null)}nCe.exports={style:Gkt,styleOne:iCe}});var Ky=ye(bs=>{"use strict";var R2=Mr(),jkt=va(),Wkt=Tg(),aCe=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 oCe(e){return e.data.data.pid}bs.getParent=function(e,t){return bs.findEntryWithLevel(e,oCe(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=aCe.formatPieValue;bs.formatPercent=function(e,t){var r=R2.formatPercent(e,0);return r==="0%"&&(r=aCe.formatPiePercent(e,t)),r}});var OE=ye((ndr,uCe)=>{"use strict";var C5=xa(),sCe=ba(),Ykt=rp().appendArrayPointValue,FE=Nc(),lCe=Mr(),Kkt=g3(),Wh=Ky(),Jkt=l_(),$kt=Jkt.formatPieValue;uCe.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 x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var b=n._fullData[s.index],g=v.data.data,E=g.i,k=Wh.isHierarchyRoot(v),A=Wh.getParent(l,v),L=Wh.getValue(v),_=function(Me){return lCe.castOption(b,E,Me)},C=_("hovertemplate"),M=FE.castHoverinfo(b,x,E),p=x.separators,P;if(C||M&&M!=="none"&&M!=="skip"){var T,F;u&&(T=o.cx+v.pxmid[0]*(1-v.rInscribed),F=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(T=v._hoverX,F=v._hoverY);var q={},V=[],H=[],X=function(Me){return V.indexOf(Me)!==-1};M&&(V=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),q.label=g.label,X("label")&&q.label&&H.push(q.label),g.hasOwnProperty("v")&&(q.value=g.v,q.valueLabel=$kt(q.value,p),X("value")&&H.push(q.valueLabel)),q.currentPath=v.currentPath=Wh.getPath(v.data),X("current path")&&!k&&H.push(q.currentPath);var G,N=[],W=function(){N.indexOf(G)===-1&&(H.push(G),N.push(G))};q.percentParent=v.percentParent=L/Wh.getValue(A),q.parent=v.parentString=Wh.getPtLabel(A),X("percent parent")&&(G=Wh.formatPercent(q.percentParent,p)+" of "+q.parent,W()),q.percentEntry=v.percentEntry=L/Wh.getValue(r),q.entry=v.entry=Wh.getPtLabel(r),X("percent entry")&&!k&&!v.onPathbar&&(G=Wh.formatPercent(q.percentEntry,p)+" of "+q.entry,W()),q.percentRoot=v.percentRoot=L/Wh.getValue(l),q.root=v.root=Wh.getPtLabel(l),X("percent root")&&!k&&(G=Wh.formatPercent(q.percentRoot,p)+" of "+q.root,W()),q.text=_("hovertext")||_("text"),X("text")&&(G=q.text,lCe.isValidTextValue(G)&&H.push(G)),P=[qE(v,b,a.eventDataKeys)];var re={trace:b,y:F,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:H.join("
"),name:C||X("name")?b.name:void 0,color:_("hoverlabel.bgcolor")||g.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),fontWeight:_("hoverlabel.font.weight"),fontStyle:_("hoverlabel.font.style"),fontVariant:_("hoverlabel.font.variant"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:P};u&&(re.x0=T-v.rInscribed*v.rpx1,re.x1=T+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(re.x=T,re.idealAlign=T<0?"left":"right");var ae=[];FE.loneHover(re,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ae}),P[0].bbox=ae[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||[qE(v,b,a.eventDataKeys)],event:C5.event})}},h=function(v){var x=n._fullLayout,b=n._fullData[s.index],g=C5.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=C5.event,n.emit("plotly_unhover",{points:[qE(g,b,a.eventDataKeys)],event:C5.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(FE.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),c){var E=t.select("path.surface");a.styleOne(E,g,b,n,{hovered:!1})}},d=function(v){var x=n._fullLayout,b=n._fullData[s.index],g=u&&(Wh.isHierarchyRoot(v)||Wh.isLeaf(v)),E=Wh.getPtId(v),k=Wh.isEntry(v)?Wh.findEntryWithChild(l,E):Wh.findEntryWithLevel(l,E),A=Wh.getPtId(k),L={points:[qE(v,b,a.eventDataKeys)],event:C5.event};g||(L.nextLevel=A);var _=Kkt.triggerHandler(n,"plotly_"+s.type+"click",L);if(_!==!1&&x.hovermode&&(n._hoverdata=[qE(v,b,a.eventDataKeys)],FE.click(n,C5.event)),!g&&_!==!1&&!n._dragging&&!n._transitioning){sCe.call("_storeDirectGUIEdit",b,x._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:A}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};FE.loneUnhover(x._hoverlayer.node()),sCe.call("animate",n,C,M)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function qE(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 BE=xa(),Qkt=SE(),Xg=(D2(),ab(I2)).interpolate,cCe=ao(),bv=Mr(),eCt=Ll(),vCe=_v(),fCe=vCe.recordMinTextSize,tCt=vCe.clearMinTextSize,pCe=hR(),rCt=l_().getRotationAngle,iCt=pCe.computeTransform,nCt=pCe.transformInsideText,aCt=kW().styleOne,oCt=N0().resizeText,sCt=OE(),CW=nW(),sl=Ky();RR.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&sl.hasTransition(r);if(tCt("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=BE.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){hCe(e,f,this,r)})})}else o.each(function(f){hCe(e,f,this,r)}),i.uniformtext.mode&&oCt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function hCe(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&sl.hasTransition(n),s=BE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=sl.findEntryWithLevel(f,c.level),d=sl.getMaxDepth(c),v=a._size,x=c.domain,b=v.w*(x.x[1]-x.x[0]),g=v.h*(x.y[1]-x.y[0]),E=.5*Math.min(b,g),k=u.cx=v.l+v.w*(x.x[1]+x.x[0])/2,A=u.cy=v.t+v.h*(1-x.y[0])-g/2;if(!h)return l.remove();var L=null,_={};o&&l.each(function(ge){_[sl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&sl.isEntry(ge)&&(L=ge)});var C=lCt(h).descendants(),M=h.height+1,p=0,P=d;u.hasMultipleRoots&&sl.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,p=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var T=rCt(c.rotation);T&&C.forEach(function(ge){ge.x0+=T,ge.x1+=T});var F=Math.min(M,d),q=function(ge){return(ge-p)/F*E},V=function(ge,ie){return[ge*Math.cos(ie),-ge*Math.sin(ie)]},H=function(ge){return bv.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,k,A)},X=function(ge){return k+dCe(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},G=function(ge){return A+dCe(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,sl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ge=BE.select(this),ie=ge.select("path.surface");ie.transition().attrTween("d",function(Ee){var Ae=ae(Ee);return function(ze){return H(Ae(ze))}});var Te=ge.select("g.slicetext");Te.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var W=sl.getPtId(L);l.each(function(ge){N===null&&sl.getPtId(ge)===W&&(N=ge.x1)})}var re=l;o&&(re=re.transition().each("end",function(){var ge=BE.select(this);sl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(ge){var ie=BE.select(this),Te=bv.ensureSingle(ie,"path","surface",function(De){De.style("pointer-events",i?"none":"all")});ge.rpx0=q(ge.y0),ge.rpx1=q(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=V(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(bv.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=uCt(ge,c),o?Te.transition().attrTween("d",function(De){var ce=_e(De);return function(Ge){return H(ce(Ge))}}):Te.attr("d",H),ie.call(sCt,h,e,t,{eventDataKeys:CW.eventDataKeys,transitionTime:CW.CLICK_TRANSITION_TIME,transitionEasing:CW.CLICK_TRANSITION_EASING}).call(sl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Te.call(aCt,ge,c,e);var Ee=bv.ensureSingle(ie,"g","slicetext"),Ae=bv.ensureSingle(Ee,"text","",function(De){De.attr("data-notex",1)}),ze=bv.ensureUniformFontSize(e,sl.determineTextFont(c,ge,a.font));Ae.text(RR.formatSliceLabel(ge,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(cCe.font,ze).call(eCt.convertToTspans,e);var Ce=cCe.bBox(Ae.node());ge.transform=nCt(Ce,ge,u),ge.transform.targetX=X(ge),ge.transform.targetY=G(ge);var me=function(De,ce){var Ge=De.transform;return iCt(Ge,ce),Ge.fontSize=ze.size,fCe(c.type,Ge,a),bv.getTextTransform(Ge)};o?Ae.transition().attrTween("transform",function(De){var ce=Me(De);return function(Ge){return me(ce(Ge),Ce)}}):Ae.attr("transform",me(ge,Ce))});function ae(ge){var ie=sl.getPtId(ge),Te=_[ie],Ee=_[sl.getPtId(h)],Ae;if(Ee){var ze=(ge.x1>Ee.x1?2*Math.PI:0)+T;Ae=ge.rpx1N?2*Math.PI:0)+T;Te={x0:Ae,x1:Ae}}else Te={rpx0:E,rpx1:E},bv.extendFlat(Te,ke(ge));else Te={rpx0:0,rpx1:0};else Te={x0:T,x1:T};return Xg(Te,Ee)}function Me(ge){var ie=_[sl.getPtId(ge)],Te,Ee=ge.transform;if(ie)Te=ie;else if(Te={rpx1:ge.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(ge.parent)if(N){var Ae=ge.x1>N?2*Math.PI:0;Te.x0=Te.x1=Ae}else bv.extendFlat(Te,ke(ge));else Te.x0=Te.x1=T;else Te.x0=Te.x1=T;var ze=Xg(Te.transform.textPosAngle,ge.transform.textPosAngle),Ce=Xg(Te.rpx1,ge.rpx1),me=Xg(Te.x0,ge.x0),De=Xg(Te.x1,ge.x1),ce=Xg(Te.transform.scale,Ee.scale),Ge=Xg(Te.transform.rotate,Ee.rotate),nt=Ee.rCenter===0?3:Te.transform.rCenter===0?1/3:1,ct=Xg(Te.transform.rCenter,Ee.rCenter),qt=function(rt){return ct(Math.pow(rt,nt))};return function(rt){var ot=Ce(rt),Dt=me(rt),kt=De(rt),Ct=qt(rt),Yt=V(ot,(Dt+kt)/2),xr=ze(rt),er={pxmid:Yt,rpx1:ot,transform:{textPosAngle:xr,rCenter:Ct,x:Ee.x,y:Ee.y}};return fCe(c.type,Ee,a),{transform:{targetX:X(er),targetY:G(er),scale:ce(rt),rotate:Ge(rt),rCenter:Ct}}}}function ke(ge){var ie=ge.parent,Te=_[sl.getPtId(ie)],Ee={};if(Te){var Ae=ie.children,ze=Ae.indexOf(ge),Ce=Ae.length,me=Xg(Te.x0,Te.x1);Ee.x0=me(ze/Ce),Ee.x1=me(ze/Ce)}else Ee.x0=Ee.x1=0;return Ee}}function lCt(e){return Qkt.partition().size([2*Math.PI,e.height+1])(e)}RR.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=sl.isHierarchyRoot(e),h=sl.getParent(c,e),d=sl.getValue(e);if(!a){var v=o.split("+"),x=function(p){return v.indexOf(p)!==-1},b=[],g;if(x("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&x("value")&&b.push(sl.formatValue(u.v,s)),!f){x("current path")&&b.push(sl.getPath(e.data));var E=0;x("percent parent")&&E++,x("percent entry")&&E++,x("percent root")&&E++;var k=E>1;if(E){var A,L=function(p){g=sl.formatPercent(A,s),k&&(g+=" of "+p),b.push(g)};x("percent parent")&&!f&&(A=d/sl.getValue(h),L("parent")),x("percent entry")&&(A=d/sl.getValue(t),L("entry")),x("percent root")&&(A=d/sl.getValue(c),L("root"))}}return x("text")&&(g=bv.castOption(r,u.i,"text"),bv.isValidTextValue(g)&&b.push(g)),b.join("
")}var _=bv.castOption(r,u.i,"texttemplate");if(!_)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=sl.formatValue(u.v,s)),C.currentPath=sl.getPath(e.data),f||(C.percentParent=d/sl.getValue(h),C.percentParentLabel=sl.formatPercent(C.percentParent,s),C.parent=sl.getPtLabel(h)),C.percentEntry=d/sl.getValue(t),C.percentEntryLabel=sl.formatPercent(C.percentEntry,s),C.entry=sl.getPtLabel(t),C.percentRoot=d/sl.getValue(c),C.percentRootLabel=sl.formatPercent(C.percentRoot,s),C.root=sl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var M=bv.castOption(r,u.i,"text");return(bv.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=bv.castOption(r,u.i,"customdata"),bv.texttemplateString(_,C,i._d3locale,C,r._meta||{})};function uCt(e){return e.rpx0===0&&bv.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function dCe(e){return cCt(e.rpx1,e.transform.textPosAngle)}function cCt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var mCe=ye((odr,gCe)=>{"use strict";gCe.exports={moduleType:"trace",name:"sunburst",basePlotModule:PEe(),categories:[],animatable:!0,attributes:AE(),layoutAttributes:aW(),supplyDefaults:BEe(),supplyLayoutDefaults:UEe(),calc:EE().calc,crossTraceCalc:EE().crossTraceCalc,plot:zR().plot,style:kW().style,colorbar:Kd(),meta:{}}});var _Ce=ye((sdr,yCe)=>{"use strict";yCe.exports=mCe()});var bCe=ye(L5=>{"use strict";var xCe=Yu();L5.name="treemap";L5.plot=function(e,t,r,n){xCe.plotBasePlot(L5.name,e,t,r,n)};L5.clean=function(e,t,r,n){xCe.cleanBasePlot(L5.name,e,t,r,n)}});var z2=ye((udr,wCe)=>{"use strict";wCe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var FR=ye((cdr,ACe)=>{"use strict";var fCt=Wo().hovertemplateAttrs,hCt=Wo().texttemplateAttrs,dCt=Kl(),vCt=Ju().attributes,F2=A2(),Q0=AE(),TCe=z2(),LW=no().extendFlat,pCt=Ed().pattern;ACe.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:LW({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:pCt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Q0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},dCt("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:LW({},F2.textfont,{}),editType:"calc"},text:F2.text,textinfo:Q0.textinfo,texttemplate:hCt({editType:"plot"},{keys:TCe.eventDataKeys.concat(["label","value"])}),hovertext:F2.hovertext,hoverinfo:Q0.hoverinfo,hovertemplate:fCt({},{keys:TCe.eventDataKeys}),textfont:F2.textfont,insidetextfont:F2.insidetextfont,outsidetextfont:LW({},F2.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:F2.sort,root:Q0.root,domain:vCt({name:"treemap",trace:!0,editType:"calc"})}});var PW=ye((fdr,SCe)=>{"use strict";SCe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var CCe=ye((hdr,kCe)=>{"use strict";var MCe=Mr(),gCt=FR(),mCt=va(),yCt=Ju().defaults,_Ct=r0().handleText,xCt=Qb().TEXTPAD,bCt=S2().handleMarkerDefaults,ECe=Mu(),wCt=ECe.hasColorscale,TCt=ECe.handleDefaults;kCe.exports=function(t,r,n,i){function a(b,g){return MCe.coerce(t,r,gCt,b,g)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),r.texttemplate||a("textinfo",MCe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate");var f=a("pathbar.visible"),h="auto";_Ct(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;bCt(t,r,i,a);var v=r._hasColorscale=wCt(t,"marker","colors")||(t.marker||{}).coloraxis;v?TCt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;a("marker.pad.t",d?x/4:x),a("marker.pad.l",x/4),a("marker.pad.r",x/4),a("marker.pad.b",d?x:x/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:mCt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*xCt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),yCt(r,i,a),r._length=null}});var PCe=ye((ddr,LCe)=>{"use strict";var ACt=Mr(),SCt=PW();LCe.exports=function(t,r){function n(i,a){return ACt.coerce(t,r,SCt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var DW=ye(IW=>{"use strict";var ICe=EE();IW.calc=function(e,t){return ICe.calc(e,t)};IW.crossTraceCalc=function(e){return ICe._runCrossTraceCalc("treemap",e)}});var RW=ye((pdr,DCe)=>{"use strict";DCe.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 P5=SE(),MCt=RW();RCe.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=P5.treemap().tile(ECt(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)&&MCt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function ECt(e,t){switch(e){case"squarify":return P5.treemapSquarify.ratio(t);case"binary":return P5.treemapBinary;case"dice":return P5.treemapDice;case"slice":return P5.treemapSlice;default:return P5.treemapSliceDice}}});var qR=ye((mdr,OCe)=>{"use strict";var zCe=xa(),I5=va(),FCe=Mr(),FW=Ky(),kCt=_v().resizeText,CCt=DR();function LCt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");kCt(e,t,"treemap"),t.each(function(r){var n=zCe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){zCe.select(this).call(qCe,o,a,e,{hovered:!1})})})}function qCe(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=FW.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=FCe.castOption(r,s,"marker.line.color")||I5.defaultLine,u=FCe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=I5.combine(I5.addOpacity(r._backgroundColor,.75),c),x;if(d===!0){var b=FW.getMaxDepth(r);isFinite(b)?FW.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var g=0;g{"use strict";var BCe=xa(),OR=Mr(),NCe=ao(),PCt=Ll(),ICt=zW(),UCe=qR().styleOne,qW=z2(),D5=Ky(),DCt=OE(),OW=!0;VCe.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,x=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,g=a.makeUpdateTextInterpolator,E={},k=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=L.hierarchy,M=s/_._entryDepth,p=D5.listPath(n.data,"id"),P=ICt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(F){var q=p.indexOf(F.data.id);return q===-1?!1:(F.x0=M*q,F.x1=M*(q+1),F.y0=o,F.y1=o+l,F.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,D5.getPtId),i.enter().append("g").classed("pathbar",!0),x(i,OW,E,[s,l],f),i.order();var T=i;v&&(T=T.transition().each("end",function(){var F=BCe.select(this);D5.setSliceCursor(F,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),T.each(function(F){F._x0=u(F.x0),F._x1=u(F.x1),F._y0=c(F.y0),F._y1=c(F.y1),F._hoverX=u(F.x1-Math.min(s,l)/2),F._hoverY=c(F.y1-l/2);var q=BCe.select(this),V=OR.ensureSingle(q,"path","surface",function(N){N.style("pointer-events",k?"none":"all")});v?V.transition().attrTween("d",function(N){var W=b(N,OW,E,[s,l]);return function(re){return f(W(re))}}):V.attr("d",f),q.call(DCt,n,t,r,{styleOne:UCe,eventDataKeys:qW.eventDataKeys,transitionTime:qW.CLICK_TRANSITION_TIME,transitionEasing:qW.CLICK_TRANSITION_EASING}).call(D5.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),V.call(UCe,F,_,t,{hovered:!1}),F._text=(D5.getPtLabel(F)||"").split("
").join(" ")||"";var H=OR.ensureSingle(q,"g","slicetext"),X=OR.ensureSingle(H,"text","",function(N){N.attr("data-notex",1)}),G=OR.ensureUniformFontSize(t,D5.determineTextFont(_,F,A.font,{onPathbar:!0}));X.text(F._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(NCe.font,G).call(PCt.convertToTspans,t),F.textBB=NCe.bBox(X.node()),F.transform=h(F,{fontSize:G.size,onPathbar:!0}),F.transform.fontSize=G.size,v?X.transition().attrTween("transform",function(N){var W=g(N,OW,E,[s,l]);return function(re){return d(W(re))}}):X.attr("transform",d(F))})}});var ZCe=ye((_dr,WCe)=>{"use strict";var GCe=xa(),BW=(D2(),ab(I2)).interpolate,X_=Ky(),NE=Mr(),jCe=Qb().TEXTPAD,RCt=i2(),zCt=RCt.toMoveInsideBar,FCt=_v(),NW=FCt.recordMinTextSize,qCt=z2(),OCt=HCe();function q2(e){return X_.isHierarchyRoot(e)?"":X_.getPtId(e)}WCe.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=X_.findEntryWithLevel(f,l.level),d=GCe.select(n),v=d.selectAll("g.pathbar"),x=d.selectAll("g.slice");if(!h){v.remove(),x.remove();return}var b=X_.isHierarchyRoot(h),g=!o.uniformtext.mode&&X_.hasTransition(i),E=X_.getMaxDepth(l),k=function(Ke){return Ke.data.depth-h.data.depth-1?C+P:-(p+P):0,F={x0:M,x1:M,y0:T,y1:T+p},q=function(Ke,xt,bt){var Lt=l.tiling.pad,St=function($t){return $t-Lt<=xt.x0},Et=function($t){return $t+Lt>=xt.x1},dt=function($t){return $t-Lt<=xt.y0},Ht=function($t){return $t+Lt>=xt.y1};return Ke.x0===xt.x0&&Ke.x1===xt.x1&&Ke.y0===xt.y0&&Ke.y1===xt.y1?{x0:Ke.x0,x1:Ke.x1,y0:Ke.y0,y1:Ke.y1}:{x0:St(Ke.x0-Lt)?0:Et(Ke.x0-Lt)?bt[0]:Ke.x0,x1:St(Ke.x1+Lt)?0:Et(Ke.x1+Lt)?bt[0]:Ke.x1,y0:dt(Ke.y0-Lt)?0:Ht(Ke.y0-Lt)?bt[1]:Ke.y0,y1:dt(Ke.y1+Lt)?0:Ht(Ke.y1+Lt)?bt[1]:Ke.y1}},V=null,H={},X={},G=null,N=function(Ke,xt){return xt?H[q2(Ke)]:X[q2(Ke)]},W=function(Ke,xt,bt,Lt){if(xt)return H[q2(f)]||F;var St=X[l.level]||bt;return k(Ke)?q(Ke,St,Lt):{}};s.hasMultipleRoots&&b&&E++,l._maxDepth=E,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-_/2+A.l+A.w*(L.x[1]+L.x[0])/2,ae=-C/2+A.t+A.h*(1-(L.y[1]+L.y[0])/2),_e=function(Ke){return re+Ke},Me=function(Ke){return ae+Ke},ke=Me(0),ge=_e(0),ie=function(Ke){return ge+Ke},Te=function(Ke){return ke+Ke};function Ee(Ke,xt){return Ke+","+xt}var Ae=ie(0),ze=function(Ke){Ke.x=Math.max(Ae,Ke.x)},Ce=l.pathbar.edgeshape,me=function(Ke){var xt=ie(Math.max(Math.min(Ke.x0,Ke.x0),0)),bt=ie(Math.min(Math.max(Ke.x1,Ke.x1),M)),Lt=Te(Ke.y0),St=Te(Ke.y1),Et=p/2,dt={},Ht={};dt.x=xt,Ht.x=bt,dt.y=Ht.y=(Lt+St)/2;var $t={x:xt,y:Lt},fr={x:bt,y:Lt},_r={x:bt,y:St},Br={x:xt,y:St};return Ce===">"?($t.x-=Et,fr.x-=Et,_r.x-=Et,Br.x-=Et):Ce==="/"?(_r.x-=Et,Br.x-=Et,dt.x-=Et/2,Ht.x-=Et/2):Ce==="\\"?($t.x-=Et,fr.x-=Et,dt.x-=Et/2,Ht.x-=Et/2):Ce==="<"&&(dt.x-=Et,Ht.x-=Et),ze($t),ze(Br),ze(dt),ze(fr),ze(_r),ze(Ht),"M"+Ee($t.x,$t.y)+"L"+Ee(fr.x,fr.y)+"L"+Ee(Ht.x,Ht.y)+"L"+Ee(_r.x,_r.y)+"L"+Ee(Br.x,Br.y)+"L"+Ee(dt.x,dt.y)+"Z"},De=l[c?"tiling":"marker"].pad,ce=function(Ke){return l.textposition.indexOf(Ke)!==-1},Ge=ce("top"),nt=ce("left"),ct=ce("right"),qt=ce("bottom"),rt=function(Ke){var xt=_e(Ke.x0),bt=_e(Ke.x1),Lt=Me(Ke.y0),St=Me(Ke.y1),Et=bt-xt,dt=St-Lt;if(!Et||!dt)return"";var Ht=l.marker.cornerradius||0,$t=Math.min(Ht,Et/2,dt/2);$t&&Ke.data&&Ke.data.data&&Ke.data.data.label&&(Ge&&($t=Math.min($t,De.t)),nt&&($t=Math.min($t,De.l)),ct&&($t=Math.min($t,De.r)),qt&&($t=Math.min($t,De.b)));var fr=function(_r,Br){return $t?"a"+Ee($t,$t)+" 0 0 1 "+Ee(_r,Br):""};return"M"+Ee(xt,Lt+$t)+fr($t,-$t)+"L"+Ee(bt-$t,Lt)+fr($t,$t)+"L"+Ee(bt,St-$t)+fr(-$t,$t)+"L"+Ee(xt+$t,St)+fr(-$t,-$t)+"Z"},ot=function(Ke,xt){var bt=Ke.x0,Lt=Ke.x1,St=Ke.y0,Et=Ke.y1,dt=Ke.textBB,Ht=Ge||xt.isHeader&&!qt,$t=Ht?"start":qt?"end":"middle",fr=ce("right"),_r=ce("left")||xt.onPathbar,Br=_r?-1:fr?1:0;if(xt.isHeader){if(bt+=(c?De:De.l)-jCe,Lt-=(c?De:De.r)-jCe,bt>=Lt){var Or=(bt+Lt)/2;bt=Or,Lt=Or}var Nr;qt?(Nr=Et-(c?De:De.b),St{"use strict";var BCt=xa(),NCt=Ky(),UCt=_v(),VCt=UCt.clearMinTextSize,HCt=N0().resizeText,XCe=ZCe();YCe.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(VCt(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&&NCt.hasTransition(n)){i&&(f=i());var d=BCt.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){XCe(t,v,this,n,s)})})}else c.each(function(v){XCe(t,v,this,n,s)}),l.uniformtext.mode&&HCt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var e6e=ye((bdr,QCe)=>{"use strict";var KCe=xa(),BR=Mr(),JCe=ao(),GCt=Ll(),jCt=zW(),$Ce=qR().styleOne,VW=z2(),Y_=Ky(),WCt=OE(),ZCt=zR().formatSliceLabel,HW=!1;QCe.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,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,g=a.prevEntry,E={},k=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,p=_.textposition.indexOf("bottom")!==-1,P=!p&&!_.marker.pad.t||p&&!_.marker.pad.b,T=jCt(n,[o,s],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),F=T.descendants(),q=1/0,V=-1/0;F.forEach(function(W){var re=W.depth;re>=_._maxDepth?(W.x0=W.x1=(W.x0+W.x1)/2,W.y0=W.y1=(W.y0+W.y1)/2):(q=Math.min(q,re),V=Math.max(V,re))}),i=i.data(F,Y_.getPtId),_._maxVisibleLayers=isFinite(V)?V-q+1:0,i.enter().append("g").classed("slice",!0),v(i,HW,E,[o,s],c),i.order();var H=null;if(d&&g){var X=Y_.getPtId(g);i.each(function(W){H===null&&Y_.getPtId(W)===X&&(H={x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1})})}var G=function(){return H||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var W=KCe.select(this);Y_.setSliceCursor(W,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(W){var re=Y_.isHeader(W,_);W._x0=l(W.x0),W._x1=l(W.x1),W._y0=u(W.y0),W._y1=u(W.y1),W._hoverX=l(W.x1-_.marker.pad.r),W._hoverY=u(p?W.y1-_.marker.pad.b/2:W.y0+_.marker.pad.t/2);var ae=KCe.select(this),_e=BR.ensureSingle(ae,"path","surface",function(Ee){Ee.style("pointer-events",k?"none":"all")});d?_e.transition().attrTween("d",function(Ee){var Ae=x(Ee,HW,G(),[o,s]);return function(ze){return c(Ae(ze))}}):_e.attr("d",c),ae.call(WCt,n,t,r,{styleOne:$Ce,eventDataKeys:VW.eventDataKeys,transitionTime:VW.CLICK_TRANSITION_TIME,transitionEasing:VW.CLICK_TRANSITION_EASING}).call(Y_.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call($Ce,W,_,t,{hovered:!1}),W.x0===W.x1||W.y0===W.y1?W._text="":re?W._text=P?"":Y_.getPtLabel(W)||"":W._text=ZCt(W,n,_,r,A)||"";var Me=BR.ensureSingle(ae,"g","slicetext"),ke=BR.ensureSingle(Me,"text","",function(Ee){Ee.attr("data-notex",1)}),ge=BR.ensureUniformFontSize(t,Y_.determineTextFont(_,W,A.font)),ie=W._text||" ",Te=re&&ie.indexOf("
")===-1;ke.text(ie).classed("slicetext",!0).attr("text-anchor",M?"end":C||Te?"start":"middle").call(JCe.font,ge).call(GCt.convertToTspans,t),W.textBB=JCe.bBox(ke.node()),W.transform=f(W,{fontSize:ge.size,isHeader:re}),W.transform.fontSize=ge.size,d?ke.transition().attrTween("transform",function(Ee){var Ae=b(Ee,HW,G(),[o,s]);return function(ze){return h(Ae(ze))}}):ke.attr("transform",h(W))}),H}});var r6e=ye((wdr,t6e)=>{"use strict";var XCt=UW(),YCt=e6e();t6e.exports=function(t,r,n,i){return XCt(t,r,n,i,{type:"treemap",drawDescendants:YCt})}});var n6e=ye((Tdr,i6e)=>{"use strict";i6e.exports={moduleType:"trace",name:"treemap",basePlotModule:bCe(),categories:[],animatable:!0,attributes:FR(),layoutAttributes:PW(),supplyDefaults:CCe(),supplyLayoutDefaults:PCe(),calc:DW().calc,crossTraceCalc:DW().crossTraceCalc,plot:r6e(),style:qR().style,colorbar:Kd(),meta:{}}});var o6e=ye((Adr,a6e)=>{"use strict";a6e.exports=n6e()});var l6e=ye(R5=>{"use strict";var s6e=Yu();R5.name="icicle";R5.plot=function(e,t,r,n){s6e.plotBasePlot(R5.name,e,t,r,n)};R5.clean=function(e,t,r,n){s6e.cleanBasePlot(R5.name,e,t,r,n)}});var GW=ye((Mdr,c6e)=>{"use strict";var KCt=Wo().hovertemplateAttrs,JCt=Wo().texttemplateAttrs,$Ct=Kl(),QCt=Ju().attributes,UE=A2(),o0=AE(),NR=FR(),u6e=z2(),e6t=no().extendFlat,t6t=Ed().pattern;c6e.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:NR.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:e6t({colors:o0.marker.colors,line:o0.marker.line,pattern:t6t,editType:"calc"},$Ct("marker",{colorAttr:"colors",anim:!1})),leaf:o0.leaf,pathbar:NR.pathbar,text:UE.text,textinfo:o0.textinfo,texttemplate:JCt({editType:"plot"},{keys:u6e.eventDataKeys.concat(["label","value"])}),hovertext:UE.hovertext,hoverinfo:o0.hoverinfo,hovertemplate:KCt({},{keys:u6e.eventDataKeys}),textfont:UE.textfont,insidetextfont:UE.insidetextfont,outsidetextfont:NR.outsidetextfont,textposition:NR.textposition,sort:UE.sort,root:o0.root,domain:QCt({name:"icicle",trace:!0,editType:"calc"})}});var jW=ye((Edr,f6e)=>{"use strict";f6e.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var p6e=ye((kdr,v6e)=>{"use strict";var h6e=Mr(),r6t=GW(),i6t=va(),n6t=Ju().defaults,a6t=r0().handleText,o6t=Qb().TEXTPAD,s6t=S2().handleMarkerDefaults,d6e=Mu(),l6t=d6e.hasColorscale,u6t=d6e.handleDefaults;v6e.exports=function(t,r,n,i){function a(d,v){return h6e.coerce(t,r,r6t,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"),r.texttemplate||a("textinfo",h6e.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate");var c=a("pathbar.visible"),f="auto";a6t(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),s6t(t,r,i,a);var h=r._hasColorscale=l6t(t,"marker","colors")||(t.marker||{}).coloraxis;h&&u6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:i6t.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*o6t),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),n6t(r,i,a),r._length=null}});var m6e=ye((Cdr,g6e)=>{"use strict";var c6t=Mr(),f6t=jW();g6e.exports=function(t,r){function n(i,a){return c6t.coerce(t,r,f6t,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var ZW=ye(WW=>{"use strict";var y6e=EE();WW.calc=function(e,t){return y6e.calc(e,t)};WW.crossTraceCalc=function(e){return y6e._runCrossTraceCalc("icicle",e)}});var x6e=ye((Pdr,_6e)=>{"use strict";var h6t=SE(),d6t=RW();_6e.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=h6t.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&d6t(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var XW=ye((Idr,S6e)=>{"use strict";var b6e=xa(),w6e=va(),T6e=Mr(),v6t=_v().resizeText,p6t=DR();function g6t(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");v6t(e,t,"icicle"),t.each(function(r){var n=b6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){b6e.select(this).call(A6e,o,a,e)})})}function A6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=T6e.castOption(r,o,"marker.line.color")||w6e.defaultLine,l=T6e.castOption(r,o,"marker.line.width")||0;e.call(p6t,t,r,n).style("stroke-width",l).call(w6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}S6e.exports={style:g6t,styleOne:A6e}});var L6e=ye((Ddr,C6e)=>{"use strict";var M6e=xa(),UR=Mr(),E6e=ao(),m6t=Ll(),y6t=x6e(),k6e=XW().styleOne,YW=z2(),z5=Ky(),_6t=OE(),x6t=zR().formatSliceLabel,KW=!1;C6e.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,x=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,g=a.prevEntry,E={},k=t._context.staticPlot,A=t._fullLayout,L=r[0],_=L.trace,C=_.textposition.indexOf("left")!==-1,M=_.textposition.indexOf("right")!==-1,p=_.textposition.indexOf("bottom")!==-1,P=y6t(n,[o,s],{flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,orientation:_.tiling.orientation,pad:{inner:_.tiling.pad},maxDepth:_._maxDepth}),T=P.descendants(),F=1/0,q=-1/0;T.forEach(function(N){var W=N.depth;W>=_._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(F=Math.min(F,W),q=Math.max(q,W))}),i=i.data(T,z5.getPtId),_._maxVisibleLayers=isFinite(q)?q-F+1:0,i.enter().append("g").classed("slice",!0),v(i,KW,E,[o,s],c),i.order();var V=null;if(d&&g){var H=z5.getPtId(g);i.each(function(N){V===null&&z5.getPtId(N)===H&&(V={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var X=function(){return V||{x0:0,x1:o,y0:0,y1:s}},G=i;return d&&(G=G.transition().each("end",function(){var N=M6e.select(this);z5.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.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-_.tiling.pad),N._hoverY=u(p?N.y1-_.tiling.pad/2:N.y0+_.tiling.pad/2);var W=M6e.select(this),re=UR.ensureSingle(W,"path","surface",function(ke){ke.style("pointer-events",k?"none":"all")});d?re.transition().attrTween("d",function(ke){var ge=x(ke,KW,X(),[o,s],{orientation:_.tiling.orientation,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1});return function(ie){return c(ge(ie))}}):re.attr("d",c),W.call(_6t,n,t,r,{styleOne:k6e,eventDataKeys:YW.eventDataKeys,transitionTime:YW.CLICK_TRANSITION_TIME,transitionEasing:YW.CLICK_TRANSITION_EASING}).call(z5.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(k6e,N,_,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=x6t(N,n,_,r,A)||"";var ae=UR.ensureSingle(W,"g","slicetext"),_e=UR.ensureSingle(ae,"text","",function(ke){ke.attr("data-notex",1)}),Me=UR.ensureUniformFontSize(t,z5.determineTextFont(_,N,A.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(E6e.font,Me).call(m6t.convertToTspans,t),N.textBB=E6e.bBox(_e.node()),N.transform=f(N,{fontSize:Me.size}),N.transform.fontSize=Me.size,d?_e.transition().attrTween("transform",function(ke){var ge=b(ke,KW,X(),[o,s]);return function(ie){return h(ge(ie))}}):_e.attr("transform",h(N))}),V}});var I6e=ye((Rdr,P6e)=>{"use strict";var b6t=UW(),w6t=L6e();P6e.exports=function(t,r,n,i){return b6t(t,r,n,i,{type:"icicle",drawDescendants:w6t})}});var R6e=ye((zdr,D6e)=>{"use strict";D6e.exports={moduleType:"trace",name:"icicle",basePlotModule:l6e(),categories:[],animatable:!0,attributes:GW(),layoutAttributes:jW(),supplyDefaults:p6e(),supplyLayoutDefaults:m6e(),calc:ZW().calc,crossTraceCalc:ZW().crossTraceCalc,plot:I6e(),style:XW().style,colorbar:Kd(),meta:{}}});var F6e=ye((Fdr,z6e)=>{"use strict";z6e.exports=R6e()});var O6e=ye(F5=>{"use strict";var q6e=Yu();F5.name="funnelarea";F5.plot=function(e,t,r,n){q6e.plotBasePlot(F5.name,e,t,r,n)};F5.clean=function(e,t,r,n){q6e.cleanBasePlot(F5.name,e,t,r,n)}});var JW=ye((Odr,B6e)=>{"use strict";var tv=A2(),T6t=vl(),A6t=Ju().attributes,S6t=Wo().hovertemplateAttrs,M6t=Wo().texttemplateAttrs,O2=no().extendFlat;B6e.exports={labels:tv.labels,label0:tv.label0,dlabel:tv.dlabel,values:tv.values,marker:{colors:tv.marker.colors,line:{color:O2({},tv.marker.line.color,{dflt:null}),width:O2({},tv.marker.line.width,{dflt:1}),editType:"calc"},pattern:tv.marker.pattern,editType:"calc"},text:tv.text,hovertext:tv.hovertext,scalegroup:O2({},tv.scalegroup,{}),textinfo:O2({},tv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:M6t({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:O2({},T6t.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S6t({},{keys:["label","color","value","text","percent"]}),textposition:O2({},tv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:tv.textfont,insidetextfont:tv.insidetextfont,title:{text:tv.title.text,font:tv.title.font,position:O2({},tv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:A6t({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 $W=ye((Bdr,N6e)=>{"use strict";var E6t=lR().hiddenlabels;N6e.exports={hiddenlabels:E6t,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var H6e=ye((Ndr,V6e)=>{"use strict";var U6e=Mr(),k6t=JW(),C6t=Ju().defaults,L6t=r0().handleText,P6t=S2().handleLabelsAndValues,I6t=S2().handleMarkerDefaults;V6e.exports=function(t,r,n,i){function a(x,b){return U6e.coerce(t,r,k6t,x,b)}var o=a("labels"),s=a("values"),l=P6t(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,I6t(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate"),h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),f||h&&h!=="none"){var d=a("textposition");L6t(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");C6t(r,i,a);var v=a("title.text");v&&(a("title.position"),U6e.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var j6e=ye((Udr,G6e)=>{"use strict";var D6t=Mr(),R6t=$W();G6e.exports=function(t,r){function n(i,a){return D6t.coerce(t,r,R6t,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var QW=ye((Vdr,Z6e)=>{"use strict";var W6e=y5();function z6t(e,t){return W6e.calc(e,t)}function F6t(e){W6e.crossTraceCalc(e,{type:"funnelarea"})}Z6e.exports={calc:z6t,crossTraceCalc:F6t}});var $6e=ye((Hdr,J6e)=>{"use strict";var B2=xa(),eZ=ao(),K_=Mr(),q6t=K_.strScale,X6e=K_.strTranslate,Y6e=Ll(),O6t=i2(),B6t=O6t.toMoveInsideBar,K6e=_v(),N6t=K6e.recordMinTextSize,U6t=K6e.clearMinTextSize,V6t=l_(),q5=hR(),H6t=q5.attachFxHandlers,G6t=q5.determineInsideTextFont,j6t=q5.layoutAreas,W6t=q5.prerenderTitles,Z6t=q5.positionTitleOutside,X6t=q5.formatSliceLabel;J6e.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;U6t("funnelarea",i),W6t(r,t),j6t(r,i._size),K_.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=B2.select(this),s=a[0],l=s.trace;K6t(a),o.each(function(){var u=B2.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){B2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,x=B2.select(this),b=x.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(H6t,t,a);var g="M"+(d+f.TR[0])+","+(v+f.TR[1])+tZ(f.TR,f.BR)+tZ(f.BR,f.BL)+tZ(f.BL,f.TL)+"Z";b.attr("d",g),X6t(t,f,s);var E=V6t.castOption(l.textposition,f.pts),k=x.selectAll("g.slicetext").data(f.text&&E!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var A=K_.ensureSingle(B2.select(this),"text","",function(F){F.attr("data-notex",1)}),L=K_.ensureUniformFontSize(t,G6t(l,f,i.font));A.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(eZ.font,L).call(Y6e.convertToTspans,t);var _=eZ.bBox(A.node()),C,M,p,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,p=Math.min(f.TR[0],f.BR[0])+d,C=B6t(M,p,P,T,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,N6t(l.type,C,i),a[h].transform=C,K_.setTransormAndDisplay(A,C)})});var c=B2.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(B2.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(eZ.font,l.title.font).call(Y6e.convertToTspans,t);var d=Z6t(s,i._size);f.attr("transform",X6e(d.x,d.y)+q6t(Math.min(1,d.scale))+X6e(d.tx,d.ty))})})})};function tZ(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function Y6t(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function K6t(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var q=Math.sqrt(u);return{x:q,y:-q}}function f(){var q=c();return[q.x,q.y]}var h,d=[];d.push(f());var v,x;for(v=e.length-1;v>-1;v--)if(x=e[v],!x.hidden){var b=x.v/l;u+=b,d.push(f())}var g=1/0,E=-1/0;for(v=0;v-1;v--)if(x=e[v],!x.hidden){P+=1;var T=d[P][0],F=d[P][1];x.TL=[-T,F],x.TR=[T,F],x.BL=M,x.BR=p,x.pxmid=Y6t(x.TR,x.BR),M=x.TL,p=x.TR}}});var tLe=ye((Gdr,eLe)=>{"use strict";var Q6e=xa(),J6t=z3(),$6t=_v().resizeText;eLe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");$6t(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=Q6e.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Q6e.select(this).call(J6t,s,a,t)})})}});var iLe=ye((jdr,rLe)=>{"use strict";rLe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:O6e(),categories:["pie-like","funnelarea","showLegend"],attributes:JW(),layoutAttributes:$W(),supplyDefaults:H6e(),supplyLayoutDefaults:j6e(),calc:QW().calc,crossTraceCalc:QW().crossTraceCalc,plot:$6e(),style:tLe(),styleOne:z3(),meta:{}}});var aLe=ye((Wdr,nLe)=>{"use strict";nLe.exports=iLe()});var Dd=ye((Zdr,oLe)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){"use strict";var s;function l(Le,xe){if(!(Le instanceof xe))throw new TypeError("Cannot call a class as a function")}function u(Le,xe){for(var Se=0;SeM)throw new RangeError('The value "'+Le+'" is invalid for option "size"');var xe=new Uint8Array(Le);return Object.setPrototypeOf(xe,T.prototype),xe}function T(Le,xe,Se){if(typeof Le=="number"){if(typeof xe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(Le)}return F(Le,xe,Se)}T.poolSize=8192;function F(Le,xe,Se){if(typeof Le=="string")return X(Le,xe);if(ArrayBuffer.isView(Le))return N(Le);if(Le==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(Le));if(Ne(Le,ArrayBuffer)||Le&&Ne(Le.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ne(Le,SharedArrayBuffer)||Le&&Ne(Le.buffer,SharedArrayBuffer)))return W(Le,xe,Se);if(typeof Le=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var lt=Le.valueOf&&Le.valueOf();if(lt!=null&<!==Le)return T.from(lt,xe,Se);var Gt=re(Le);if(Gt)return Gt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Le[Symbol.toPrimitive]=="function")return T.from(Le[Symbol.toPrimitive]("string"),xe,Se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+A(Le))}T.from=function(Le,xe,Se){return F(Le,xe,Se)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function q(Le){if(typeof Le!="number")throw new TypeError('"size" argument must be of type number');if(Le<0)throw new RangeError('The value "'+Le+'" is invalid for option "size"')}function V(Le,xe,Se){return q(Le),Le<=0?P(Le):xe!==void 0?typeof Se=="string"?P(Le).fill(xe,Se):P(Le).fill(xe):P(Le)}T.alloc=function(Le,xe,Se){return V(Le,xe,Se)};function H(Le){return q(Le),P(Le<0?0:ae(Le)|0)}T.allocUnsafe=function(Le){return H(Le)},T.allocUnsafeSlow=function(Le){return H(Le)};function X(Le,xe){if((typeof xe!="string"||xe==="")&&(xe="utf8"),!T.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);var Se=Me(Le,xe)|0,lt=P(Se),Gt=lt.write(Le,xe);return Gt!==Se&&(lt=lt.slice(0,Gt)),lt}function G(Le){for(var xe=Le.length<0?0:ae(Le.length)|0,Se=P(xe),lt=0;lt=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return Le|0}function _e(Le){return+Le!=Le&&(Le=0),T.alloc(+Le)}T.isBuffer=function(xe){return xe!=null&&xe._isBuffer===!0&&xe!==T.prototype},T.compare=function(xe,Se){if(Ne(xe,Uint8Array)&&(xe=T.from(xe,xe.offset,xe.byteLength)),Ne(Se,Uint8Array)&&(Se=T.from(Se,Se.offset,Se.byteLength)),!T.isBuffer(xe)||!T.isBuffer(Se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(xe===Se)return 0;for(var lt=xe.length,Gt=Se.length,Vt=0,ar=Math.min(lt,Gt);VtGt.length?(T.isBuffer(ar)||(ar=T.from(ar)),ar.copy(Gt,Vt)):Uint8Array.prototype.set.call(Gt,ar,Vt);else if(T.isBuffer(ar))ar.copy(Gt,Vt);else throw new TypeError('"list" argument must be an Array of Buffers');Vt+=ar.length}return Gt};function Me(Le,xe){if(T.isBuffer(Le))return Le.length;if(ArrayBuffer.isView(Le)||Ne(Le,ArrayBuffer))return Le.byteLength;if(typeof Le!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+A(Le));var Se=Le.length,lt=arguments.length>2&&arguments[2]===!0;if(!lt&&Se===0)return 0;for(var Gt=!1;;)switch(xe){case"ascii":case"latin1":case"binary":return Se;case"utf8":case"utf-8":return _r(Le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se*2;case"hex":return Se>>>1;case"base64":return Nr(Le).length;default:if(Gt)return lt?-1:_r(Le).length;xe=(""+xe).toLowerCase(),Gt=!0}}T.byteLength=Me;function ke(Le,xe,Se){var lt=!1;if((xe===void 0||xe<0)&&(xe=0),xe>this.length||((Se===void 0||Se>this.length)&&(Se=this.length),Se<=0)||(Se>>>=0,xe>>>=0,Se<=xe))return"";for(Le||(Le="utf8");;)switch(Le){case"hex":return rt(this,xe,Se);case"utf8":case"utf-8":return ce(this,xe,Se);case"ascii":return ct(this,xe,Se);case"latin1":case"binary":return qt(this,xe,Se);case"base64":return De(this,xe,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,xe,Se);default:if(lt)throw new TypeError("Unknown encoding: "+Le);Le=(Le+"").toLowerCase(),lt=!0}}T.prototype._isBuffer=!0;function ge(Le,xe,Se){var lt=Le[xe];Le[xe]=Le[Se],Le[Se]=lt}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 Se=0;SeSe&&(xe+=" ... "),""},C&&(T.prototype[C]=T.prototype.inspect),T.prototype.compare=function(xe,Se,lt,Gt,Vt){if(Ne(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 '+A(xe));if(Se===void 0&&(Se=0),lt===void 0&&(lt=xe?xe.length:0),Gt===void 0&&(Gt=0),Vt===void 0&&(Vt=this.length),Se<0||lt>xe.length||Gt<0||Vt>this.length)throw new RangeError("out of range index");if(Gt>=Vt&&Se>=lt)return 0;if(Gt>=Vt)return-1;if(Se>=lt)return 1;if(Se>>>=0,lt>>>=0,Gt>>>=0,Vt>>>=0,this===xe)return 0;for(var ar=Vt-Gt,Qr=lt-Se,ai=Math.min(ar,Qr),jr=this.slice(Gt,Vt),ri=xe.slice(Se,lt),bi=0;bi2147483647?Se=2147483647:Se<-2147483648&&(Se=-2147483648),Se=+Se,Ye(Se)&&(Se=Gt?0:Le.length-1),Se<0&&(Se=Le.length+Se),Se>=Le.length){if(Gt)return-1;Se=Le.length-1}else if(Se<0)if(Gt)Se=0;else return-1;if(typeof xe=="string"&&(xe=T.from(xe,lt)),T.isBuffer(xe))return xe.length===0?-1:Te(Le,xe,Se,lt,Gt);if(typeof xe=="number")return xe=xe&255,typeof Uint8Array.prototype.indexOf=="function"?Gt?Uint8Array.prototype.indexOf.call(Le,xe,Se):Uint8Array.prototype.lastIndexOf.call(Le,xe,Se):Te(Le,[xe],Se,lt,Gt);throw new TypeError("val must be string, number or Buffer")}function Te(Le,xe,Se,lt,Gt){var Vt=1,ar=Le.length,Qr=xe.length;if(lt!==void 0&&(lt=String(lt).toLowerCase(),lt==="ucs2"||lt==="ucs-2"||lt==="utf16le"||lt==="utf-16le")){if(Le.length<2||xe.length<2)return-1;Vt=2,ar/=2,Qr/=2,Se/=2}function ai(Wi,Ni){return Vt===1?Wi[Ni]:Wi.readUInt16BE(Ni*Vt)}var jr;if(Gt){var ri=-1;for(jr=Se;jrar&&(Se=ar-Qr),jr=Se;jr>=0;jr--){for(var bi=!0,nn=0;nnGt&&(lt=Gt)):lt=Gt;var Vt=xe.length;lt>Vt/2&&(lt=Vt/2);var ar;for(ar=0;ar>>0,isFinite(lt)?(lt=lt>>>0,Gt===void 0&&(Gt="utf8")):(Gt=lt,lt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Vt=this.length-Se;if((lt===void 0||lt>Vt)&&(lt=Vt),xe.length>0&&(lt<0||Se<0)||Se>this.length)throw new RangeError("Attempt to write outside buffer bounds");Gt||(Gt="utf8");for(var ar=!1;;)switch(Gt){case"hex":return Ee(this,xe,Se,lt);case"utf8":case"utf-8":return Ae(this,xe,Se,lt);case"ascii":case"latin1":case"binary":return ze(this,xe,Se,lt);case"base64":return Ce(this,xe,Se,lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,xe,Se,lt);default:if(ar)throw new TypeError("Unknown encoding: "+Gt);Gt=(""+Gt).toLowerCase(),ar=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function De(Le,xe,Se){return xe===0&&Se===Le.length?L.fromByteArray(Le):L.fromByteArray(Le.slice(xe,Se))}function ce(Le,xe,Se){Se=Math.min(Le.length,Se);for(var lt=[],Gt=xe;Gt239?4:Vt>223?3:Vt>191?2:1;if(Gt+Qr<=Se){var ai=void 0,jr=void 0,ri=void 0,bi=void 0;switch(Qr){case 1:Vt<128&&(ar=Vt);break;case 2:ai=Le[Gt+1],(ai&192)===128&&(bi=(Vt&31)<<6|ai&63,bi>127&&(ar=bi));break;case 3:ai=Le[Gt+1],jr=Le[Gt+2],(ai&192)===128&&(jr&192)===128&&(bi=(Vt&15)<<12|(ai&63)<<6|jr&63,bi>2047&&(bi<55296||bi>57343)&&(ar=bi));break;case 4:ai=Le[Gt+1],jr=Le[Gt+2],ri=Le[Gt+3],(ai&192)===128&&(jr&192)===128&&(ri&192)===128&&(bi=(Vt&15)<<18|(ai&63)<<12|(jr&63)<<6|ri&63,bi>65535&&bi<1114112&&(ar=bi))}}ar===null?(ar=65533,Qr=1):ar>65535&&(ar-=65536,lt.push(ar>>>10&1023|55296),ar=56320|ar&1023),lt.push(ar),Gt+=Qr}return nt(lt)}var Ge=4096;function nt(Le){var xe=Le.length;if(xe<=Ge)return String.fromCharCode.apply(String,Le);for(var Se="",lt=0;ltlt)&&(Se=lt);for(var Gt="",Vt=xe;Vtlt&&(xe=lt),Se<0?(Se+=lt,Se<0&&(Se=0)):Se>lt&&(Se=lt),SeSe)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(xe,Se,lt){xe=xe>>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=this[xe],Vt=1,ar=0;++ar>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=this[xe+--Se],Vt=1;Se>0&&(Vt*=256);)Gt+=this[xe+--Se]*Vt;return Gt},T.prototype.readUint8=T.prototype.readUInt8=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,1,this.length),this[xe]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,2,this.length),this[xe]|this[xe+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,2,this.length),this[xe]<<8|this[xe+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(xe,Se){return xe=xe>>>0,Se||Dt(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,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),this[xe]*16777216+(this[xe+1]<<16|this[xe+2]<<8|this[xe+3])},T.prototype.readBigUInt64LE=Xe(function(xe){xe=xe>>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=Se+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24),Vt=this[++xe]+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+lt*Math.pow(2,24);return BigInt(Gt)+(BigInt(Vt)<>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=Se*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe],Vt=this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+lt;return(BigInt(Gt)<>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=this[xe],Vt=1,ar=0;++ar=Vt&&(Gt-=Math.pow(2,8*Se)),Gt},T.prototype.readIntBE=function(xe,Se,lt){xe=xe>>>0,Se=Se>>>0,lt||Dt(xe,Se,this.length);for(var Gt=Se,Vt=1,ar=this[xe+--Gt];Gt>0&&(Vt*=256);)ar+=this[xe+--Gt]*Vt;return Vt*=128,ar>=Vt&&(ar-=Math.pow(2,8*Se)),ar},T.prototype.readInt8=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,1,this.length),this[xe]&128?(255-this[xe]+1)*-1:this[xe]},T.prototype.readInt16LE=function(xe,Se){xe=xe>>>0,Se||Dt(xe,2,this.length);var lt=this[xe]|this[xe+1]<<8;return lt&32768?lt|4294901760:lt},T.prototype.readInt16BE=function(xe,Se){xe=xe>>>0,Se||Dt(xe,2,this.length);var lt=this[xe+1]|this[xe]<<8;return lt&32768?lt|4294901760:lt},T.prototype.readInt32LE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),this[xe]|this[xe+1]<<8|this[xe+2]<<16|this[xe+3]<<24},T.prototype.readInt32BE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),this[xe]<<24|this[xe+1]<<16|this[xe+2]<<8|this[xe+3]},T.prototype.readBigInt64LE=Xe(function(xe){xe=xe>>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=this[xe+4]+this[xe+5]*Math.pow(2,8)+this[xe+6]*Math.pow(2,16)+(lt<<24);return(BigInt(Gt)<>>0,dt(xe,"offset");var Se=this[xe],lt=this[xe+7];(Se===void 0||lt===void 0)&&Ht(xe,this.length-8);var Gt=(Se<<24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe];return(BigInt(Gt)<>>0,Se||Dt(xe,4,this.length),_.read(this,xe,!0,23,4)},T.prototype.readFloatBE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,4,this.length),_.read(this,xe,!1,23,4)},T.prototype.readDoubleLE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,8,this.length),_.read(this,xe,!0,52,8)},T.prototype.readDoubleBE=function(xe,Se){return xe=xe>>>0,Se||Dt(xe,8,this.length),_.read(this,xe,!1,52,8)};function kt(Le,xe,Se,lt,Gt,Vt){if(!T.isBuffer(Le))throw new TypeError('"buffer" argument must be a Buffer instance');if(xe>Gt||xeLe.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(xe,Se,lt,Gt){if(xe=+xe,Se=Se>>>0,lt=lt>>>0,!Gt){var Vt=Math.pow(2,8*lt)-1;kt(this,xe,Se,lt,Vt,0)}var ar=1,Qr=0;for(this[Se]=xe&255;++Qr>>0,lt=lt>>>0,!Gt){var Vt=Math.pow(2,8*lt)-1;kt(this,xe,Se,lt,Vt,0)}var ar=lt-1,Qr=1;for(this[Se+ar]=xe&255;--ar>=0&&(Qr*=256);)this[Se+ar]=xe/Qr&255;return Se+lt},T.prototype.writeUint8=T.prototype.writeUInt8=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,1,255,0),this[Se]=xe&255,Se+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,65535,0),this[Se]=xe&255,this[Se+1]=xe>>>8,Se+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,65535,0),this[Se]=xe>>>8,this[Se+1]=xe&255,Se+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,4294967295,0),this[Se+3]=xe>>>24,this[Se+2]=xe>>>16,this[Se+1]=xe>>>8,this[Se]=xe&255,Se+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,4294967295,0),this[Se]=xe>>>24,this[Se+1]=xe>>>16,this[Se+2]=xe>>>8,this[Se+3]=xe&255,Se+4};function Ct(Le,xe,Se,lt,Gt){Et(xe,lt,Gt,Le,Se,7);var Vt=Number(xe&BigInt(4294967295));Le[Se++]=Vt,Vt=Vt>>8,Le[Se++]=Vt,Vt=Vt>>8,Le[Se++]=Vt,Vt=Vt>>8,Le[Se++]=Vt;var ar=Number(xe>>BigInt(32)&BigInt(4294967295));return Le[Se++]=ar,ar=ar>>8,Le[Se++]=ar,ar=ar>>8,Le[Se++]=ar,ar=ar>>8,Le[Se++]=ar,Se}function Yt(Le,xe,Se,lt,Gt){Et(xe,lt,Gt,Le,Se,7);var Vt=Number(xe&BigInt(4294967295));Le[Se+7]=Vt,Vt=Vt>>8,Le[Se+6]=Vt,Vt=Vt>>8,Le[Se+5]=Vt,Vt=Vt>>8,Le[Se+4]=Vt;var ar=Number(xe>>BigInt(32)&BigInt(4294967295));return Le[Se+3]=ar,ar=ar>>8,Le[Se+2]=ar,ar=ar>>8,Le[Se+1]=ar,ar=ar>>8,Le[Se]=ar,Se+8}T.prototype.writeBigUInt64LE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,xe,Se,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Yt(this,xe,Se,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(xe,Se,lt,Gt){if(xe=+xe,Se=Se>>>0,!Gt){var Vt=Math.pow(2,8*lt-1);kt(this,xe,Se,lt,Vt-1,-Vt)}var ar=0,Qr=1,ai=0;for(this[Se]=xe&255;++ar>0)-ai&255;return Se+lt},T.prototype.writeIntBE=function(xe,Se,lt,Gt){if(xe=+xe,Se=Se>>>0,!Gt){var Vt=Math.pow(2,8*lt-1);kt(this,xe,Se,lt,Vt-1,-Vt)}var ar=lt-1,Qr=1,ai=0;for(this[Se+ar]=xe&255;--ar>=0&&(Qr*=256);)xe<0&&ai===0&&this[Se+ar+1]!==0&&(ai=1),this[Se+ar]=(xe/Qr>>0)-ai&255;return Se+lt},T.prototype.writeInt8=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,1,127,-128),xe<0&&(xe=255+xe+1),this[Se]=xe&255,Se+1},T.prototype.writeInt16LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,32767,-32768),this[Se]=xe&255,this[Se+1]=xe>>>8,Se+2},T.prototype.writeInt16BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,2,32767,-32768),this[Se]=xe>>>8,this[Se+1]=xe&255,Se+2},T.prototype.writeInt32LE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,2147483647,-2147483648),this[Se]=xe&255,this[Se+1]=xe>>>8,this[Se+2]=xe>>>16,this[Se+3]=xe>>>24,Se+4},T.prototype.writeInt32BE=function(xe,Se,lt){return xe=+xe,Se=Se>>>0,lt||kt(this,xe,Se,4,2147483647,-2147483648),xe<0&&(xe=4294967295+xe+1),this[Se]=xe>>>24,this[Se+1]=xe>>>16,this[Se+2]=xe>>>8,this[Se+3]=xe&255,Se+4},T.prototype.writeBigInt64LE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ct(this,xe,Se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Xe(function(xe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Yt(this,xe,Se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function xr(Le,xe,Se,lt,Gt,Vt){if(Se+lt>Le.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("Index out of range")}function er(Le,xe,Se,lt,Gt){return xe=+xe,Se=Se>>>0,Gt||xr(Le,xe,Se,4,34028234663852886e22,-34028234663852886e22),_.write(Le,xe,Se,lt,23,4),Se+4}T.prototype.writeFloatLE=function(xe,Se,lt){return er(this,xe,Se,!0,lt)},T.prototype.writeFloatBE=function(xe,Se,lt){return er(this,xe,Se,!1,lt)};function Ke(Le,xe,Se,lt,Gt){return xe=+xe,Se=Se>>>0,Gt||xr(Le,xe,Se,8,17976931348623157e292,-17976931348623157e292),_.write(Le,xe,Se,lt,52,8),Se+8}T.prototype.writeDoubleLE=function(xe,Se,lt){return Ke(this,xe,Se,!0,lt)},T.prototype.writeDoubleBE=function(xe,Se,lt){return Ke(this,xe,Se,!1,lt)},T.prototype.copy=function(xe,Se,lt,Gt){if(!T.isBuffer(xe))throw new TypeError("argument should be a Buffer");if(lt||(lt=0),!Gt&&Gt!==0&&(Gt=this.length),Se>=xe.length&&(Se=xe.length),Se||(Se=0),Gt>0&&Gt=this.length)throw new RangeError("Index out of range");if(Gt<0)throw new RangeError("sourceEnd out of bounds");Gt>this.length&&(Gt=this.length),xe.length-Se>>0,lt=lt===void 0?this.length:lt>>>0,xe||(xe=0);var ar;if(typeof xe=="number")for(ar=Se;arMath.pow(2,32)?Gt=Lt(String(Se)):typeof Se=="bigint"&&(Gt=String(Se),(Se>Math.pow(BigInt(2),BigInt(32))||Se<-Math.pow(BigInt(2),BigInt(32)))&&(Gt=Lt(Gt)),Gt+="n"),lt+=" It must be ".concat(xe,". Received ").concat(Gt),lt},RangeError);function Lt(Le){for(var xe="",Se=Le.length,lt=Le[0]==="-"?1:0;Se>=lt+4;Se-=3)xe="_".concat(Le.slice(Se-3,Se)).concat(xe);return"".concat(Le.slice(0,Se)).concat(xe)}function St(Le,xe,Se){dt(xe,"offset"),(Le[xe]===void 0||Le[xe+Se]===void 0)&&Ht(xe,Le.length-(Se+1))}function Et(Le,xe,Se,lt,Gt,Vt){if(Le>Se||Le3?xe===0||xe===BigInt(0)?Qr=">= 0".concat(ar," and < 2").concat(ar," ** ").concat((Vt+1)*8).concat(ar):Qr=">= -(2".concat(ar," ** ").concat((Vt+1)*8-1).concat(ar,") and < 2 ** ")+"".concat((Vt+1)*8-1).concat(ar):Qr=">= ".concat(xe).concat(ar," and <= ").concat(Se).concat(ar),new xt.ERR_OUT_OF_RANGE("value",Qr,Le)}St(lt,Gt,Vt)}function dt(Le,xe){if(typeof Le!="number")throw new xt.ERR_INVALID_ARG_TYPE(xe,"number",Le)}function Ht(Le,xe,Se){throw Math.floor(Le)!==Le?(dt(Le,Se),new xt.ERR_OUT_OF_RANGE(Se||"offset","an integer",Le)):xe<0?new xt.ERR_BUFFER_OUT_OF_BOUNDS:new xt.ERR_OUT_OF_RANGE(Se||"offset",">= ".concat(Se?1:0," and <= ").concat(xe),Le)}var $t=/[^+/0-9A-Za-z-_]/g;function fr(Le){if(Le=Le.split("=")[0],Le=Le.trim().replace($t,""),Le.length<2)return"";for(;Le.length%4!==0;)Le=Le+"=";return Le}function _r(Le,xe){xe=xe||1/0;for(var Se,lt=Le.length,Gt=null,Vt=[],ar=0;ar55295&&Se<57344){if(!Gt){if(Se>56319){(xe-=3)>-1&&Vt.push(239,191,189);continue}else if(ar+1===lt){(xe-=3)>-1&&Vt.push(239,191,189);continue}Gt=Se;continue}if(Se<56320){(xe-=3)>-1&&Vt.push(239,191,189),Gt=Se;continue}Se=(Gt-55296<<10|Se-56320)+65536}else Gt&&(xe-=3)>-1&&Vt.push(239,191,189);if(Gt=null,Se<128){if((xe-=1)<0)break;Vt.push(Se)}else if(Se<2048){if((xe-=2)<0)break;Vt.push(Se>>6|192,Se&63|128)}else if(Se<65536){if((xe-=3)<0)break;Vt.push(Se>>12|224,Se>>6&63|128,Se&63|128)}else if(Se<1114112){if((xe-=4)<0)break;Vt.push(Se>>18|240,Se>>12&63|128,Se>>6&63|128,Se&63|128)}else throw new Error("Invalid code point")}return Vt}function Br(Le){for(var xe=[],Se=0;Se>8,Gt=Se%256,Vt.push(Gt),Vt.push(lt);return Vt}function Nr(Le){return L.toByteArray(fr(Le))}function ut(Le,xe,Se,lt){var Gt;for(Gt=0;Gt=xe.length||Gt>=Le.length);++Gt)xe[Gt+Se]=Le[Gt];return Gt}function Ne(Le,xe){return Le instanceof xe||Le!=null&&Le.constructor!=null&&Le.constructor.name!=null&&Le.constructor.name===xe.name}function Ye(Le){return Le!==Le}var Ve=function(){for(var Le="0123456789abcdef",xe=new Array(256),Se=0;Se<16;++Se)for(var lt=Se*16,Gt=0;Gt<16;++Gt)xe[lt+Gt]=Le[Se]+Le[Gt];return xe}();function Xe(Le){return typeof BigInt=="undefined"?ht:Le}function ht(){throw new Error("BigInt not supported")}},9216:function(i){"use strict";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(x){return d[x]}),this._mode=v,this._active=d[v],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(d){for(var v=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=A);var _=L===A?0:4-L%4;return[L,_]}function d(k){var A=h(k),L=A[0],_=A[1];return(L+_)*3/4-_}function v(k,A,L){return(A+L)*3/4-L}function x(k){var A,L=h(k),_=L[0],C=L[1],M=new l(v(k,_,C)),p=0,P=C>0?_-4:_,T;for(T=0;T>16&255,M[p++]=A>>8&255,M[p++]=A&255;return C===2&&(A=s[k.charCodeAt(T)]<<2|s[k.charCodeAt(T+1)]>>4,M[p++]=A&255),C===1&&(A=s[k.charCodeAt(T)]<<10|s[k.charCodeAt(T+1)]<<4|s[k.charCodeAt(T+2)]>>2,M[p++]=A>>8&255,M[p++]=A&255),M}function b(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function g(k,A,L){for(var _,C=[],M=A;MP?P:p+M));return _===1?(A=k[L-1],C.push(o[A>>2]+o[A<<4&63]+"==")):_===2&&(A=(k[L-2]<<8)+k[L-1],C.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,x){if(s(v))return x?h(v,d(x)):[v[0].clone(),v[1].clone()];var b=0,g,E;if(l(v))g=v.clone();else if(typeof v=="string")g=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))g=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;g=u(v)}}if(s(x))g.mul(x[1]),E=x[0].clone();else if(l(x))E=x.clone();else if(typeof x=="string")E=c(x);else if(!x)E=u(1);else if(x===Math.floor(x))E=u(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),b+=256;E=u(x)}return b>0?g=g.ushln(b):b<0&&(E=E.ushln(-b)),f(g,E)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651:function(i,a,o){"use strict";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869:function(i,a,o){"use strict";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946:function(i,a,o){"use strict";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,x=s(v),b=d.mod,g=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return g*x;if(x){var E=l(x)+4,k=s(b.ushln(E).divRound(h));return g*(x+k*Math.pow(2,-E))}else{var A=h.bitLength()-b.bitLength()+53,k=s(b.ushln(A).divRound(h));return A<1023?g*k*Math.pow(2,-A):(k*=Math.pow(2,-1023),g*k*Math.pow(2,1023-A))}}},2478:function(i){"use strict";function a(f,h,d,v,x){for(var b=x+1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k>=0?(b=g,x=g-1):v=g+1}return b}function o(f,h,d,v,x){for(var b=x+1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k>0?(b=g,x=g-1):v=g+1}return b}function s(f,h,d,v,x){for(var b=v-1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k<0?(b=g,v=g+1):x=g-1}return b}function l(f,h,d,v,x){for(var b=v-1;v<=x;){var g=v+x>>>1,E=f[g],k=d!==void 0?d(E,h):E-h;k<=0?(b=g,v=g+1):x=g-1}return b}function u(f,h,d,v,x){for(;v<=x;){var b=v+x>>>1,g=f[b],E=d!==void 0?d(g,h):g-h;if(E===0)return b;E<=0?v=b+1:x=b-1}return-1}function c(f,h,d,v,x,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,x===void 0?f.length-1:x|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,x){return c(f,h,d,v,x,a)},gt:function(f,h,d,v,x){return c(f,h,d,v,x,o)},lt:function(f,h,d,v,x){return c(f,h,d,v,x,s)},le:function(f,h,d,v,x){return c(f,h,d,v,x,l)},eq:function(f,h,d,v,x){return c(f,h,d,v,x,u)}}},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}},6859:function(i,a,o){i=o.nmd(i),function(s,l){"use strict";function u(G,N){if(!G)throw new Error(N||"Assertion failed")}function c(G,N){G.super_=N;var W=function(){};W.prototype=N.prototype,G.prototype=new W,G.prototype.constructor=G}function f(G,N,W){if(f.isBN(G))return G;this.negative=0,this.words=null,this.length=0,this.red=null,G!==null&&((N==="le"||N==="be")&&(W=N,N=10),this._init(G||0,N||10,W||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(G){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N=="object"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,W){return N.cmp(W)>0?N:W},f.min=function(N,W){return N.cmp(W)<0?N:W},f.prototype._init=function(N,W,re){if(typeof N=="number")return this._initNumber(N,W,re);if(typeof N=="object")return this._initArray(N,W,re);W==="hex"&&(W=16),u(W===(W|0)&&W>=2&&W<=36),N=N.toString().replace(/\s+/g,"");var ae=0;N[0]==="-"&&(ae++,this.negative=1),ae=0;ae-=3)Me=N[ae]|N[ae-1]<<8|N[ae-2]<<16,this.words[_e]|=Me<>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,_e++);else if(re==="le")for(ae=0,_e=0;ae>>26-ke&67108863,ke+=24,ke>=26&&(ke-=26,_e++);return this.strip()};function d(G,N){var W=G.charCodeAt(N);return W>=65&&W<=70?W-55:W>=97&&W<=102?W-87:W-48&15}function v(G,N,W){var re=d(G,W);return W-1>=N&&(re|=d(G,W-1)<<4),re}f.prototype._parseHex=function(N,W,re){this.length=Math.ceil((N.length-W)/6),this.words=new Array(this.length);for(var ae=0;ae=W;ae-=2)ke=v(N,W,ae)<<_e,this.words[Me]|=ke&67108863,_e>=18?(_e-=18,Me+=1,this.words[Me]|=ke>>>26):_e+=8;else{var ge=N.length-W;for(ae=ge%2===0?W+1:W;ae=18?(_e-=18,Me+=1,this.words[Me]|=ke>>>26):_e+=8}this.strip()};function x(G,N,W,re){for(var ae=0,_e=Math.min(G.length,W),Me=N;Me<_e;Me++){var ke=G.charCodeAt(Me)-48;ae*=re,ke>=49?ae+=ke-49+10:ke>=17?ae+=ke-17+10:ae+=ke}return ae}f.prototype._parseBase=function(N,W,re){this.words=[0],this.length=1;for(var ae=0,_e=1;_e<=67108863;_e*=W)ae++;ae--,_e=_e/W|0;for(var Me=N.length-re,ke=Me%ae,ge=Math.min(Me,Me-ke)+re,ie=0,Te=re;Te1&&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"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[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,W){N=N||10,W=W|0||1;var re;if(N===16||N==="hex"){re="";for(var ae=0,_e=0,Me=0;Me>>24-ae&16777215,_e!==0||Me!==this.length-1?re=b[6-ge.length]+ge+re:re=ge+re,ae+=2,ae>=26&&(ae-=26,Me--)}for(_e!==0&&(re=_e.toString(16)+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=g[N],Te=E[N];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Ae=Ee.modn(Te).toString(N);Ee=Ee.idivn(Te),Ee.isZero()?re=Ae+re:re=b[ie-Ae.length]+Ae+re}for(this.isZero()&&(re="0"+re);re.length%W!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,W){return u(typeof h!="undefined"),this.toArrayLike(h,N,W)},f.prototype.toArray=function(N,W){return this.toArrayLike(Array,N,W)},f.prototype.toArrayLike=function(N,W,re){var ae=this.byteLength(),_e=re||Math.max(1,ae);u(ae<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var Me=W==="le",ke=new N(_e),ge,ie,Te=this.clone();if(Me){for(ie=0;!Te.isZero();ie++)ge=Te.andln(255),Te.iushrn(8),ke[ie]=ge;for(;ie<_e;ie++)ke[ie]=0}else{for(ie=0;ie<_e-ae;ie++)ke[ie]=0;for(ie=0;!Te.isZero();ie++)ge=Te.andln(255),Te.iushrn(8),ke[_e-ie-1]=ge}return ke},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var W=N,re=0;return W>=4096&&(re+=13,W>>>=13),W>=64&&(re+=7,W>>>=7),W>=8&&(re+=4,W>>>=4),W>=2&&(re+=2,W>>>=2),re+W},f.prototype._zeroBits=function(N){if(N===0)return 26;var W=N,re=0;return W&8191||(re+=13,W>>>=13),W&127||(re+=7,W>>>=7),W&15||(re+=4,W>>>=4),W&3||(re+=2,W>>>=2),W&1||re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],W=this._countBits(N);return(this.length-1)*26+W};function k(G){for(var N=new Array(G.bitLength()),W=0;W>>ae}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,W=0;WN.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 W;this.length>N.length?W=N:W=this;for(var re=0;reN.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 W,re;this.length>N.length?(W=this,re=N):(W=N,re=this);for(var ae=0;aeN.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 W=Math.ceil(N/26)|0,re=N%26;this._expand(W),re>0&&W--;for(var ae=0;ae0&&(this.words[ae]=~this.words[ae]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,W){u(typeof N=="number"&&N>=0);var re=N/26|0,ae=N%26;return this._expand(re+1),W?this.words[re]=this.words[re]|1<N.length?(re=this,ae=N):(re=N,ae=this);for(var _e=0,Me=0;Me>>26;for(;_e!==0&&Me>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;MeN.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var W=this.iadd(N);return N.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ae,_e;re>0?(ae=this,_e=N):(ae=N,_e=this);for(var Me=0,ke=0;ke<_e.length;ke++)W=(ae.words[ke]|0)-(_e.words[ke]|0)+Me,Me=W>>26,this.words[ke]=W&67108863;for(;Me!==0&&ke>26,this.words[ke]=W&67108863;if(Me===0&&ke>>26,Ee=ge&67108863,Ae=Math.min(ie,N.length-1),ze=Math.max(0,ie-G.length+1);ze<=Ae;ze++){var Ce=ie-ze|0;ae=G.words[Ce]|0,_e=N.words[ze]|0,Me=ae*_e+Ee,Te+=Me/67108864|0,Ee=Me&67108863}W.words[ie]=Ee|0,ge=Te|0}return ge!==0?W.words[ie]=ge|0:W.length--,W.strip()}var L=function(N,W,re){var ae=N.words,_e=W.words,Me=re.words,ke=0,ge,ie,Te,Ee=ae[0]|0,Ae=Ee&8191,ze=Ee>>>13,Ce=ae[1]|0,me=Ce&8191,De=Ce>>>13,ce=ae[2]|0,Ge=ce&8191,nt=ce>>>13,ct=ae[3]|0,qt=ct&8191,rt=ct>>>13,ot=ae[4]|0,Dt=ot&8191,kt=ot>>>13,Ct=ae[5]|0,Yt=Ct&8191,xr=Ct>>>13,er=ae[6]|0,Ke=er&8191,xt=er>>>13,bt=ae[7]|0,Lt=bt&8191,St=bt>>>13,Et=ae[8]|0,dt=Et&8191,Ht=Et>>>13,$t=ae[9]|0,fr=$t&8191,_r=$t>>>13,Br=_e[0]|0,Or=Br&8191,Nr=Br>>>13,ut=_e[1]|0,Ne=ut&8191,Ye=ut>>>13,Ve=_e[2]|0,Xe=Ve&8191,ht=Ve>>>13,Le=_e[3]|0,xe=Le&8191,Se=Le>>>13,lt=_e[4]|0,Gt=lt&8191,Vt=lt>>>13,ar=_e[5]|0,Qr=ar&8191,ai=ar>>>13,jr=_e[6]|0,ri=jr&8191,bi=jr>>>13,nn=_e[7]|0,Wi=nn&8191,Ni=nn>>>13,_n=_e[8]|0,$i=_n&8191,zn=_n>>>13,Wn=_e[9]|0,It=Wn&8191,ft=Wn>>>13;re.negative=N.negative^W.negative,re.length=19,ge=Math.imul(Ae,Or),ie=Math.imul(Ae,Nr),ie=ie+Math.imul(ze,Or)|0,Te=Math.imul(ze,Nr);var jt=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(jt>>>26)|0,jt&=67108863,ge=Math.imul(me,Or),ie=Math.imul(me,Nr),ie=ie+Math.imul(De,Or)|0,Te=Math.imul(De,Nr),ge=ge+Math.imul(Ae,Ne)|0,ie=ie+Math.imul(Ae,Ye)|0,ie=ie+Math.imul(ze,Ne)|0,Te=Te+Math.imul(ze,Ye)|0;var Zt=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,ge=Math.imul(Ge,Or),ie=Math.imul(Ge,Nr),ie=ie+Math.imul(nt,Or)|0,Te=Math.imul(nt,Nr),ge=ge+Math.imul(me,Ne)|0,ie=ie+Math.imul(me,Ye)|0,ie=ie+Math.imul(De,Ne)|0,Te=Te+Math.imul(De,Ye)|0,ge=ge+Math.imul(Ae,Xe)|0,ie=ie+Math.imul(Ae,ht)|0,ie=ie+Math.imul(ze,Xe)|0,Te=Te+Math.imul(ze,ht)|0;var yr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(yr>>>26)|0,yr&=67108863,ge=Math.imul(qt,Or),ie=Math.imul(qt,Nr),ie=ie+Math.imul(rt,Or)|0,Te=Math.imul(rt,Nr),ge=ge+Math.imul(Ge,Ne)|0,ie=ie+Math.imul(Ge,Ye)|0,ie=ie+Math.imul(nt,Ne)|0,Te=Te+Math.imul(nt,Ye)|0,ge=ge+Math.imul(me,Xe)|0,ie=ie+Math.imul(me,ht)|0,ie=ie+Math.imul(De,Xe)|0,Te=Te+Math.imul(De,ht)|0,ge=ge+Math.imul(Ae,xe)|0,ie=ie+Math.imul(Ae,Se)|0,ie=ie+Math.imul(ze,xe)|0,Te=Te+Math.imul(ze,Se)|0;var Fr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,ge=Math.imul(Dt,Or),ie=Math.imul(Dt,Nr),ie=ie+Math.imul(kt,Or)|0,Te=Math.imul(kt,Nr),ge=ge+Math.imul(qt,Ne)|0,ie=ie+Math.imul(qt,Ye)|0,ie=ie+Math.imul(rt,Ne)|0,Te=Te+Math.imul(rt,Ye)|0,ge=ge+Math.imul(Ge,Xe)|0,ie=ie+Math.imul(Ge,ht)|0,ie=ie+Math.imul(nt,Xe)|0,Te=Te+Math.imul(nt,ht)|0,ge=ge+Math.imul(me,xe)|0,ie=ie+Math.imul(me,Se)|0,ie=ie+Math.imul(De,xe)|0,Te=Te+Math.imul(De,Se)|0,ge=ge+Math.imul(Ae,Gt)|0,ie=ie+Math.imul(Ae,Vt)|0,ie=ie+Math.imul(ze,Gt)|0,Te=Te+Math.imul(ze,Vt)|0;var Zr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,ge=Math.imul(Yt,Or),ie=Math.imul(Yt,Nr),ie=ie+Math.imul(xr,Or)|0,Te=Math.imul(xr,Nr),ge=ge+Math.imul(Dt,Ne)|0,ie=ie+Math.imul(Dt,Ye)|0,ie=ie+Math.imul(kt,Ne)|0,Te=Te+Math.imul(kt,Ye)|0,ge=ge+Math.imul(qt,Xe)|0,ie=ie+Math.imul(qt,ht)|0,ie=ie+Math.imul(rt,Xe)|0,Te=Te+Math.imul(rt,ht)|0,ge=ge+Math.imul(Ge,xe)|0,ie=ie+Math.imul(Ge,Se)|0,ie=ie+Math.imul(nt,xe)|0,Te=Te+Math.imul(nt,Se)|0,ge=ge+Math.imul(me,Gt)|0,ie=ie+Math.imul(me,Vt)|0,ie=ie+Math.imul(De,Gt)|0,Te=Te+Math.imul(De,Vt)|0,ge=ge+Math.imul(Ae,Qr)|0,ie=ie+Math.imul(Ae,ai)|0,ie=ie+Math.imul(ze,Qr)|0,Te=Te+Math.imul(ze,ai)|0;var Vr=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,ge=Math.imul(Ke,Or),ie=Math.imul(Ke,Nr),ie=ie+Math.imul(xt,Or)|0,Te=Math.imul(xt,Nr),ge=ge+Math.imul(Yt,Ne)|0,ie=ie+Math.imul(Yt,Ye)|0,ie=ie+Math.imul(xr,Ne)|0,Te=Te+Math.imul(xr,Ye)|0,ge=ge+Math.imul(Dt,Xe)|0,ie=ie+Math.imul(Dt,ht)|0,ie=ie+Math.imul(kt,Xe)|0,Te=Te+Math.imul(kt,ht)|0,ge=ge+Math.imul(qt,xe)|0,ie=ie+Math.imul(qt,Se)|0,ie=ie+Math.imul(rt,xe)|0,Te=Te+Math.imul(rt,Se)|0,ge=ge+Math.imul(Ge,Gt)|0,ie=ie+Math.imul(Ge,Vt)|0,ie=ie+Math.imul(nt,Gt)|0,Te=Te+Math.imul(nt,Vt)|0,ge=ge+Math.imul(me,Qr)|0,ie=ie+Math.imul(me,ai)|0,ie=ie+Math.imul(De,Qr)|0,Te=Te+Math.imul(De,ai)|0,ge=ge+Math.imul(Ae,ri)|0,ie=ie+Math.imul(Ae,bi)|0,ie=ie+Math.imul(ze,ri)|0,Te=Te+Math.imul(ze,bi)|0;var gi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(gi>>>26)|0,gi&=67108863,ge=Math.imul(Lt,Or),ie=Math.imul(Lt,Nr),ie=ie+Math.imul(St,Or)|0,Te=Math.imul(St,Nr),ge=ge+Math.imul(Ke,Ne)|0,ie=ie+Math.imul(Ke,Ye)|0,ie=ie+Math.imul(xt,Ne)|0,Te=Te+Math.imul(xt,Ye)|0,ge=ge+Math.imul(Yt,Xe)|0,ie=ie+Math.imul(Yt,ht)|0,ie=ie+Math.imul(xr,Xe)|0,Te=Te+Math.imul(xr,ht)|0,ge=ge+Math.imul(Dt,xe)|0,ie=ie+Math.imul(Dt,Se)|0,ie=ie+Math.imul(kt,xe)|0,Te=Te+Math.imul(kt,Se)|0,ge=ge+Math.imul(qt,Gt)|0,ie=ie+Math.imul(qt,Vt)|0,ie=ie+Math.imul(rt,Gt)|0,Te=Te+Math.imul(rt,Vt)|0,ge=ge+Math.imul(Ge,Qr)|0,ie=ie+Math.imul(Ge,ai)|0,ie=ie+Math.imul(nt,Qr)|0,Te=Te+Math.imul(nt,ai)|0,ge=ge+Math.imul(me,ri)|0,ie=ie+Math.imul(me,bi)|0,ie=ie+Math.imul(De,ri)|0,Te=Te+Math.imul(De,bi)|0,ge=ge+Math.imul(Ae,Wi)|0,ie=ie+Math.imul(Ae,Ni)|0,ie=ie+Math.imul(ze,Wi)|0,Te=Te+Math.imul(ze,Ni)|0;var Si=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Si>>>26)|0,Si&=67108863,ge=Math.imul(dt,Or),ie=Math.imul(dt,Nr),ie=ie+Math.imul(Ht,Or)|0,Te=Math.imul(Ht,Nr),ge=ge+Math.imul(Lt,Ne)|0,ie=ie+Math.imul(Lt,Ye)|0,ie=ie+Math.imul(St,Ne)|0,Te=Te+Math.imul(St,Ye)|0,ge=ge+Math.imul(Ke,Xe)|0,ie=ie+Math.imul(Ke,ht)|0,ie=ie+Math.imul(xt,Xe)|0,Te=Te+Math.imul(xt,ht)|0,ge=ge+Math.imul(Yt,xe)|0,ie=ie+Math.imul(Yt,Se)|0,ie=ie+Math.imul(xr,xe)|0,Te=Te+Math.imul(xr,Se)|0,ge=ge+Math.imul(Dt,Gt)|0,ie=ie+Math.imul(Dt,Vt)|0,ie=ie+Math.imul(kt,Gt)|0,Te=Te+Math.imul(kt,Vt)|0,ge=ge+Math.imul(qt,Qr)|0,ie=ie+Math.imul(qt,ai)|0,ie=ie+Math.imul(rt,Qr)|0,Te=Te+Math.imul(rt,ai)|0,ge=ge+Math.imul(Ge,ri)|0,ie=ie+Math.imul(Ge,bi)|0,ie=ie+Math.imul(nt,ri)|0,Te=Te+Math.imul(nt,bi)|0,ge=ge+Math.imul(me,Wi)|0,ie=ie+Math.imul(me,Ni)|0,ie=ie+Math.imul(De,Wi)|0,Te=Te+Math.imul(De,Ni)|0,ge=ge+Math.imul(Ae,$i)|0,ie=ie+Math.imul(Ae,zn)|0,ie=ie+Math.imul(ze,$i)|0,Te=Te+Math.imul(ze,zn)|0;var Mi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,ge=Math.imul(fr,Or),ie=Math.imul(fr,Nr),ie=ie+Math.imul(_r,Or)|0,Te=Math.imul(_r,Nr),ge=ge+Math.imul(dt,Ne)|0,ie=ie+Math.imul(dt,Ye)|0,ie=ie+Math.imul(Ht,Ne)|0,Te=Te+Math.imul(Ht,Ye)|0,ge=ge+Math.imul(Lt,Xe)|0,ie=ie+Math.imul(Lt,ht)|0,ie=ie+Math.imul(St,Xe)|0,Te=Te+Math.imul(St,ht)|0,ge=ge+Math.imul(Ke,xe)|0,ie=ie+Math.imul(Ke,Se)|0,ie=ie+Math.imul(xt,xe)|0,Te=Te+Math.imul(xt,Se)|0,ge=ge+Math.imul(Yt,Gt)|0,ie=ie+Math.imul(Yt,Vt)|0,ie=ie+Math.imul(xr,Gt)|0,Te=Te+Math.imul(xr,Vt)|0,ge=ge+Math.imul(Dt,Qr)|0,ie=ie+Math.imul(Dt,ai)|0,ie=ie+Math.imul(kt,Qr)|0,Te=Te+Math.imul(kt,ai)|0,ge=ge+Math.imul(qt,ri)|0,ie=ie+Math.imul(qt,bi)|0,ie=ie+Math.imul(rt,ri)|0,Te=Te+Math.imul(rt,bi)|0,ge=ge+Math.imul(Ge,Wi)|0,ie=ie+Math.imul(Ge,Ni)|0,ie=ie+Math.imul(nt,Wi)|0,Te=Te+Math.imul(nt,Ni)|0,ge=ge+Math.imul(me,$i)|0,ie=ie+Math.imul(me,zn)|0,ie=ie+Math.imul(De,$i)|0,Te=Te+Math.imul(De,zn)|0,ge=ge+Math.imul(Ae,It)|0,ie=ie+Math.imul(Ae,ft)|0,ie=ie+Math.imul(ze,It)|0,Te=Te+Math.imul(ze,ft)|0;var Pi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,ge=Math.imul(fr,Ne),ie=Math.imul(fr,Ye),ie=ie+Math.imul(_r,Ne)|0,Te=Math.imul(_r,Ye),ge=ge+Math.imul(dt,Xe)|0,ie=ie+Math.imul(dt,ht)|0,ie=ie+Math.imul(Ht,Xe)|0,Te=Te+Math.imul(Ht,ht)|0,ge=ge+Math.imul(Lt,xe)|0,ie=ie+Math.imul(Lt,Se)|0,ie=ie+Math.imul(St,xe)|0,Te=Te+Math.imul(St,Se)|0,ge=ge+Math.imul(Ke,Gt)|0,ie=ie+Math.imul(Ke,Vt)|0,ie=ie+Math.imul(xt,Gt)|0,Te=Te+Math.imul(xt,Vt)|0,ge=ge+Math.imul(Yt,Qr)|0,ie=ie+Math.imul(Yt,ai)|0,ie=ie+Math.imul(xr,Qr)|0,Te=Te+Math.imul(xr,ai)|0,ge=ge+Math.imul(Dt,ri)|0,ie=ie+Math.imul(Dt,bi)|0,ie=ie+Math.imul(kt,ri)|0,Te=Te+Math.imul(kt,bi)|0,ge=ge+Math.imul(qt,Wi)|0,ie=ie+Math.imul(qt,Ni)|0,ie=ie+Math.imul(rt,Wi)|0,Te=Te+Math.imul(rt,Ni)|0,ge=ge+Math.imul(Ge,$i)|0,ie=ie+Math.imul(Ge,zn)|0,ie=ie+Math.imul(nt,$i)|0,Te=Te+Math.imul(nt,zn)|0,ge=ge+Math.imul(me,It)|0,ie=ie+Math.imul(me,ft)|0,ie=ie+Math.imul(De,It)|0,Te=Te+Math.imul(De,ft)|0;var Gi=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,ge=Math.imul(fr,Xe),ie=Math.imul(fr,ht),ie=ie+Math.imul(_r,Xe)|0,Te=Math.imul(_r,ht),ge=ge+Math.imul(dt,xe)|0,ie=ie+Math.imul(dt,Se)|0,ie=ie+Math.imul(Ht,xe)|0,Te=Te+Math.imul(Ht,Se)|0,ge=ge+Math.imul(Lt,Gt)|0,ie=ie+Math.imul(Lt,Vt)|0,ie=ie+Math.imul(St,Gt)|0,Te=Te+Math.imul(St,Vt)|0,ge=ge+Math.imul(Ke,Qr)|0,ie=ie+Math.imul(Ke,ai)|0,ie=ie+Math.imul(xt,Qr)|0,Te=Te+Math.imul(xt,ai)|0,ge=ge+Math.imul(Yt,ri)|0,ie=ie+Math.imul(Yt,bi)|0,ie=ie+Math.imul(xr,ri)|0,Te=Te+Math.imul(xr,bi)|0,ge=ge+Math.imul(Dt,Wi)|0,ie=ie+Math.imul(Dt,Ni)|0,ie=ie+Math.imul(kt,Wi)|0,Te=Te+Math.imul(kt,Ni)|0,ge=ge+Math.imul(qt,$i)|0,ie=ie+Math.imul(qt,zn)|0,ie=ie+Math.imul(rt,$i)|0,Te=Te+Math.imul(rt,zn)|0,ge=ge+Math.imul(Ge,It)|0,ie=ie+Math.imul(Ge,ft)|0,ie=ie+Math.imul(nt,It)|0,Te=Te+Math.imul(nt,ft)|0;var Ki=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,ge=Math.imul(fr,xe),ie=Math.imul(fr,Se),ie=ie+Math.imul(_r,xe)|0,Te=Math.imul(_r,Se),ge=ge+Math.imul(dt,Gt)|0,ie=ie+Math.imul(dt,Vt)|0,ie=ie+Math.imul(Ht,Gt)|0,Te=Te+Math.imul(Ht,Vt)|0,ge=ge+Math.imul(Lt,Qr)|0,ie=ie+Math.imul(Lt,ai)|0,ie=ie+Math.imul(St,Qr)|0,Te=Te+Math.imul(St,ai)|0,ge=ge+Math.imul(Ke,ri)|0,ie=ie+Math.imul(Ke,bi)|0,ie=ie+Math.imul(xt,ri)|0,Te=Te+Math.imul(xt,bi)|0,ge=ge+Math.imul(Yt,Wi)|0,ie=ie+Math.imul(Yt,Ni)|0,ie=ie+Math.imul(xr,Wi)|0,Te=Te+Math.imul(xr,Ni)|0,ge=ge+Math.imul(Dt,$i)|0,ie=ie+Math.imul(Dt,zn)|0,ie=ie+Math.imul(kt,$i)|0,Te=Te+Math.imul(kt,zn)|0,ge=ge+Math.imul(qt,It)|0,ie=ie+Math.imul(qt,ft)|0,ie=ie+Math.imul(rt,It)|0,Te=Te+Math.imul(rt,ft)|0;var ka=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(ka>>>26)|0,ka&=67108863,ge=Math.imul(fr,Gt),ie=Math.imul(fr,Vt),ie=ie+Math.imul(_r,Gt)|0,Te=Math.imul(_r,Vt),ge=ge+Math.imul(dt,Qr)|0,ie=ie+Math.imul(dt,ai)|0,ie=ie+Math.imul(Ht,Qr)|0,Te=Te+Math.imul(Ht,ai)|0,ge=ge+Math.imul(Lt,ri)|0,ie=ie+Math.imul(Lt,bi)|0,ie=ie+Math.imul(St,ri)|0,Te=Te+Math.imul(St,bi)|0,ge=ge+Math.imul(Ke,Wi)|0,ie=ie+Math.imul(Ke,Ni)|0,ie=ie+Math.imul(xt,Wi)|0,Te=Te+Math.imul(xt,Ni)|0,ge=ge+Math.imul(Yt,$i)|0,ie=ie+Math.imul(Yt,zn)|0,ie=ie+Math.imul(xr,$i)|0,Te=Te+Math.imul(xr,zn)|0,ge=ge+Math.imul(Dt,It)|0,ie=ie+Math.imul(Dt,ft)|0,ie=ie+Math.imul(kt,It)|0,Te=Te+Math.imul(kt,ft)|0;var jn=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(jn>>>26)|0,jn&=67108863,ge=Math.imul(fr,Qr),ie=Math.imul(fr,ai),ie=ie+Math.imul(_r,Qr)|0,Te=Math.imul(_r,ai),ge=ge+Math.imul(dt,ri)|0,ie=ie+Math.imul(dt,bi)|0,ie=ie+Math.imul(Ht,ri)|0,Te=Te+Math.imul(Ht,bi)|0,ge=ge+Math.imul(Lt,Wi)|0,ie=ie+Math.imul(Lt,Ni)|0,ie=ie+Math.imul(St,Wi)|0,Te=Te+Math.imul(St,Ni)|0,ge=ge+Math.imul(Ke,$i)|0,ie=ie+Math.imul(Ke,zn)|0,ie=ie+Math.imul(xt,$i)|0,Te=Te+Math.imul(xt,zn)|0,ge=ge+Math.imul(Yt,It)|0,ie=ie+Math.imul(Yt,ft)|0,ie=ie+Math.imul(xr,It)|0,Te=Te+Math.imul(xr,ft)|0;var la=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(la>>>26)|0,la&=67108863,ge=Math.imul(fr,ri),ie=Math.imul(fr,bi),ie=ie+Math.imul(_r,ri)|0,Te=Math.imul(_r,bi),ge=ge+Math.imul(dt,Wi)|0,ie=ie+Math.imul(dt,Ni)|0,ie=ie+Math.imul(Ht,Wi)|0,Te=Te+Math.imul(Ht,Ni)|0,ge=ge+Math.imul(Lt,$i)|0,ie=ie+Math.imul(Lt,zn)|0,ie=ie+Math.imul(St,$i)|0,Te=Te+Math.imul(St,zn)|0,ge=ge+Math.imul(Ke,It)|0,ie=ie+Math.imul(Ke,ft)|0,ie=ie+Math.imul(xt,It)|0,Te=Te+Math.imul(xt,ft)|0;var Fa=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(fr,Wi),ie=Math.imul(fr,Ni),ie=ie+Math.imul(_r,Wi)|0,Te=Math.imul(_r,Ni),ge=ge+Math.imul(dt,$i)|0,ie=ie+Math.imul(dt,zn)|0,ie=ie+Math.imul(Ht,$i)|0,Te=Te+Math.imul(Ht,zn)|0,ge=ge+Math.imul(Lt,It)|0,ie=ie+Math.imul(Lt,ft)|0,ie=ie+Math.imul(St,It)|0,Te=Te+Math.imul(St,ft)|0;var Da=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(Da>>>26)|0,Da&=67108863,ge=Math.imul(fr,$i),ie=Math.imul(fr,zn),ie=ie+Math.imul(_r,$i)|0,Te=Math.imul(_r,zn),ge=ge+Math.imul(dt,It)|0,ie=ie+Math.imul(dt,ft)|0,ie=ie+Math.imul(Ht,It)|0,Te=Te+Math.imul(Ht,ft)|0;var jo=(ke+ge|0)+((ie&8191)<<13)|0;ke=(Te+(ie>>>13)|0)+(jo>>>26)|0,jo&=67108863,ge=Math.imul(fr,It),ie=Math.imul(fr,ft),ie=ie+Math.imul(_r,It)|0,Te=Math.imul(_r,ft);var oa=(ke+ge|0)+((ie&8191)<<13)|0;return ke=(Te+(ie>>>13)|0)+(oa>>>26)|0,oa&=67108863,Me[0]=jt,Me[1]=Zt,Me[2]=yr,Me[3]=Fr,Me[4]=Zr,Me[5]=Vr,Me[6]=gi,Me[7]=Si,Me[8]=Mi,Me[9]=Pi,Me[10]=Gi,Me[11]=Ki,Me[12]=ka,Me[13]=jn,Me[14]=la,Me[15]=Fa,Me[16]=Da,Me[17]=jo,Me[18]=oa,ke!==0&&(Me[19]=ke,re.length++),re};Math.imul||(L=A);function _(G,N,W){W.negative=N.negative^G.negative,W.length=G.length+N.length;for(var re=0,ae=0,_e=0;_e>>26)|0,ae+=Me>>>26,Me&=67108863}W.words[_e]=ke,re=Me,Me=ae}return re!==0?W.words[_e]=re:W.length--,W.strip()}function C(G,N,W){var re=new M;return re.mulp(G,N,W)}f.prototype.mulTo=function(N,W){var re,ae=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,W):ae<63?re=A(this,N,W):ae<1024?re=_(this,N,W):re=C(this,N,W),re};function M(G,N){this.x=G,this.y=N}M.prototype.makeRBT=function(N){for(var W=new Array(N),re=f.prototype._countBits(N)-1,ae=0;ae>=1;return ae},M.prototype.permute=function(N,W,re,ae,_e,Me){for(var ke=0;ke>>1)_e++;return 1<<_e+1+ae},M.prototype.conjugate=function(N,W,re){if(!(re<=1))for(var ae=0;ae>>13,re[2*Me+1]=_e&8191,_e=_e>>>13;for(Me=2*W;Me>=26,W+=ae/67108864|0,W+=_e>>>26,this.words[re]=_e&67108863}return W!==0&&(this.words[re]=W,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 W=k(N);if(W.length===0)return new f(1);for(var re=this,ae=0;ae=0);var W=N%26,re=(N-W)/26,ae=67108863>>>26-W<<26-W,_e;if(W!==0){var Me=0;for(_e=0;_e>>26-W}Me&&(this.words[_e]=Me,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e=0);var ae;W?ae=(W-W%26)/26:ae=0;var _e=N%26,Me=Math.min((N-_e)/26,this.length),ke=67108863^67108863>>>_e<<_e,ge=re;if(ae-=Me,ae=Math.max(0,ae),ge){for(var ie=0;ieMe)for(this.length-=Me,ie=0;ie=0&&(Te!==0||ie>=ae);ie--){var Ee=this.words[ie]|0;this.words[ie]=Te<<26-_e|Ee>>>_e,Te=Ee&ke}return ge&&Te!==0&&(ge.words[ge.length++]=Te),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,W,re){return u(this.negative===0),this.iushrn(N,W,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var W=N%26,re=(N-W)/26,ae=1<=0);var W=N%26,re=(N-W)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(W!==0&&re++,this.length=Math.min(re,this.length),W!==0){var ae=67108863^67108863>>>W<=67108864;W++)this.words[W]-=67108864,W===this.length-1?this.words[W+1]=1:this.words[W+1]++;return this.length=Math.max(this.length,W+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 W=0;W>26)-(ge/67108864|0),this.words[_e+re]=Me&67108863}for(;_e>26,this.words[_e+re]=Me&67108863;if(ke===0)return this.strip();for(u(ke===-1),ke=0,_e=0;_e>26,this.words[_e]=Me&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,W){var re=this.length-N.length,ae=this.clone(),_e=N,Me=_e.words[_e.length-1]|0,ke=this._countBits(Me);re=26-ke,re!==0&&(_e=_e.ushln(re),ae.iushln(re),Me=_e.words[_e.length-1]|0);var ge=ae.length-_e.length,ie;if(W!=="mod"){ie=new f(null),ie.length=ge+1,ie.words=new Array(ie.length);for(var Te=0;Te=0;Ae--){var ze=(ae.words[_e.length+Ae]|0)*67108864+(ae.words[_e.length+Ae-1]|0);for(ze=Math.min(ze/Me|0,67108863),ae._ishlnsubmul(_e,ze,Ae);ae.negative!==0;)ze--,ae.negative=0,ae._ishlnsubmul(_e,1,Ae),ae.isZero()||(ae.negative^=1);ie&&(ie.words[Ae]=ze)}return ie&&ie.strip(),ae.strip(),W!=="div"&&re!==0&&ae.iushrn(re),{div:ie||null,mod:ae}},f.prototype.divmod=function(N,W,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ae,_e,Me;return this.negative!==0&&N.negative===0?(Me=this.neg().divmod(N,W),W!=="mod"&&(ae=Me.div.neg()),W!=="div"&&(_e=Me.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:ae,mod:_e}):this.negative===0&&N.negative!==0?(Me=this.divmod(N.neg(),W),W!=="mod"&&(ae=Me.div.neg()),{div:ae,mod:Me.mod}):this.negative&N.negative?(Me=this.neg().divmod(N.neg(),W),W!=="div"&&(_e=Me.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:Me.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?W==="div"?{div:this.divn(N.words[0]),mod:null}:W==="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,W)},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 W=this.divmod(N);if(W.mod.isZero())return W.div;var re=W.div.negative!==0?W.mod.isub(N):W.mod,ae=N.ushrn(1),_e=N.andln(1),Me=re.cmp(ae);return Me<0||_e===1&&Me===0?W.div:W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var W=(1<<26)%N,re=0,ae=this.length-1;ae>=0;ae--)re=(W*re+(this.words[ae]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var W=0,re=this.length-1;re>=0;re--){var ae=(this.words[re]|0)+W*67108864;this.words[re]=ae/N|0,W=ae%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 W=this,re=N.clone();W.negative!==0?W=W.umod(N):W=W.clone();for(var ae=new f(1),_e=new f(0),Me=new f(0),ke=new f(1),ge=0;W.isEven()&&re.isEven();)W.iushrn(1),re.iushrn(1),++ge;for(var ie=re.clone(),Te=W.clone();!W.isZero();){for(var Ee=0,Ae=1;!(W.words[0]&Ae)&&Ee<26;++Ee,Ae<<=1);if(Ee>0)for(W.iushrn(Ee);Ee-- >0;)(ae.isOdd()||_e.isOdd())&&(ae.iadd(ie),_e.isub(Te)),ae.iushrn(1),_e.iushrn(1);for(var ze=0,Ce=1;!(re.words[0]&Ce)&&ze<26;++ze,Ce<<=1);if(ze>0)for(re.iushrn(ze);ze-- >0;)(Me.isOdd()||ke.isOdd())&&(Me.iadd(ie),ke.isub(Te)),Me.iushrn(1),ke.iushrn(1);W.cmp(re)>=0?(W.isub(re),ae.isub(Me),_e.isub(ke)):(re.isub(W),Me.isub(ae),ke.isub(_e))}return{a:Me,b:ke,gcd:re.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var W=this,re=N.clone();W.negative!==0?W=W.umod(N):W=W.clone();for(var ae=new f(1),_e=new f(0),Me=re.clone();W.cmpn(1)>0&&re.cmpn(1)>0;){for(var ke=0,ge=1;!(W.words[0]&ge)&&ke<26;++ke,ge<<=1);if(ke>0)for(W.iushrn(ke);ke-- >0;)ae.isOdd()&&ae.iadd(Me),ae.iushrn(1);for(var ie=0,Te=1;!(re.words[0]&Te)&&ie<26;++ie,Te<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(Me),_e.iushrn(1);W.cmp(re)>=0?(W.isub(re),ae.isub(_e)):(re.isub(W),_e.isub(ae))}var Ee;return W.cmpn(1)===0?Ee=ae:Ee=_e,Ee.cmpn(0)<0&&Ee.iadd(N),Ee},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var W=this.clone(),re=N.clone();W.negative=0,re.negative=0;for(var ae=0;W.isEven()&&re.isEven();ae++)W.iushrn(1),re.iushrn(1);do{for(;W.isEven();)W.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=W.cmp(re);if(_e<0){var Me=W;W=re,re=Me}else if(_e===0||re.cmpn(1)===0)break;W.isub(re)}while(!0);return re.iushln(ae)},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 W=N%26,re=(N-W)/26,ae=1<>>26,ke&=67108863,this.words[Me]=ke}return _e!==0&&(this.words[Me]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var W=N<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this.strip();var re;if(this.length>1)re=1;else{W&&(N=-N),u(N<=67108863,"Number is too big");var ae=this.words[0]|0;re=ae===N?0:aeN.length)return 1;if(this.length=0;re--){var ae=this.words[re]|0,_e=N.words[re]|0;if(ae!==_e){ae<_e?W=-1:ae>_e&&(W=1);break}}return W},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 H(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 p={k256:null,p224:null,p192:null,p25519:null};function P(G,N){this.name=G,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 W=N,re;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),re=W.bitLength();while(re>this.n);var ae=re0?W.isub(this.p):W.strip!==void 0?W.strip():W._strip(),W},P.prototype.split=function(N,W){N.iushrn(this.n,0,W)},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,W){for(var re=4194303,ae=Math.min(N.length,9),_e=0;_e>>22,Me=ke}Me>>>=22,N.words[_e-10]=Me,Me===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 W=0,re=0;re>>=26,N.words[re]=_e,W=ae}return W!==0&&(N.words[N.length++]=W),N},f._prime=function(N){if(p[N])return p[N];var W;if(N==="k256")W=new T;else if(N==="p224")W=new F;else if(N==="p192")W=new q;else if(N==="p25519")W=new V;else throw new Error("Unknown prime "+N);return p[N]=W,W};function H(G){if(typeof G=="string"){var N=f._prime(G);this.m=N.p,this.prime=N}else u(G.gtn(1),"modulus must be greater than 1"),this.m=G,this.prime=null}H.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},H.prototype._verify2=function(N,W){u((N.negative|W.negative)===0,"red works only with positives"),u(N.red&&N.red===W.red,"red works only with red numbers")},H.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},H.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},H.prototype.add=function(N,W){this._verify2(N,W);var re=N.add(W);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},H.prototype.iadd=function(N,W){this._verify2(N,W);var re=N.iadd(W);return re.cmp(this.m)>=0&&re.isub(this.m),re},H.prototype.sub=function(N,W){this._verify2(N,W);var re=N.sub(W);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},H.prototype.isub=function(N,W){this._verify2(N,W);var re=N.isub(W);return re.cmpn(0)<0&&re.iadd(this.m),re},H.prototype.shl=function(N,W){return this._verify1(N),this.imod(N.ushln(W))},H.prototype.imul=function(N,W){return this._verify2(N,W),this.imod(N.imul(W))},H.prototype.mul=function(N,W){return this._verify2(N,W),this.imod(N.mul(W))},H.prototype.isqr=function(N){return this.imul(N,N.clone())},H.prototype.sqr=function(N){return this.mul(N,N)},H.prototype.sqrt=function(N){if(N.isZero())return N.clone();var W=this.m.andln(3);if(u(W%2===1),W===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var ae=this.m.subn(1),_e=0;!ae.isZero()&&ae.andln(1)===0;)_e++,ae.iushrn(1);u(!ae.isZero());var Me=new f(1).toRed(this),ke=Me.redNeg(),ge=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,ge).cmp(ke)!==0;)ie.redIAdd(ke);for(var Te=this.pow(ie,ae),Ee=this.pow(N,ae.addn(1).iushrn(1)),Ae=this.pow(N,ae),ze=_e;Ae.cmp(Me)!==0;){for(var Ce=Ae,me=0;Ce.cmp(Me)!==0;me++)Ce=Ce.redSqr();u(me=0;_e--){for(var Te=W.words[_e],Ee=ie-1;Ee>=0;Ee--){var Ae=Te>>Ee&1;if(Me!==ae[0]&&(Me=this.sqr(Me)),Ae===0&&ke===0){ge=0;continue}ke<<=1,ke|=Ae,ge++,!(ge!==re&&(_e!==0||Ee!==0))&&(Me=this.mul(Me,ae[ke]),ge=0,ke=0)}ie=26}return Me},H.prototype.convertTo=function(N){var W=N.umod(this.m);return W===N?W.clone():W},H.prototype.convertFrom=function(N){var W=N.clone();return W.red=null,W},f.mont=function(N){return new X(N)};function X(G){H.call(this,G),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(X,H),X.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},X.prototype.convertFrom=function(N){var W=this.imod(N.mul(this.rinv));return W.red=null,W},X.prototype.imul=function(N,W){if(N.isZero()||W.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(W),ae=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(ae).iushrn(this.shift),Me=_e;return _e.cmp(this.m)>=0?Me=_e.isub(this.m):_e.cmpn(0)<0&&(Me=_e.iadd(this.m)),Me._forceRed(this)},X.prototype.mul=function(N,W){if(N.isZero()||W.isZero())return new f(0)._forceRed(this);var re=N.mul(W),ae=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(ae).iushrn(this.shift),Me=_e;return _e.cmp(this.m)>=0?Me=_e.isub(this.m):_e.cmpn(0)<0&&(Me=_e.iadd(this.m)),Me._forceRed(this)},X.prototype.invm=function(N){var W=this.imod(N._invmp(this.m).mul(this.r2));return W._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(M<=0)){var p,P=s.mallocDouble(2*M*_),T=s.mallocInt32(_);if(_=f(E,M,P,T),_>0){if(M===1&&L)l.init(_),p=l.sweepComplete(M,A,0,_,P,T,0,_,P,T);else{var F=s.mallocDouble(2*M*C),q=s.mallocInt32(C);C=f(k,M,F,q),C>0&&(l.init(_+C),M===1?p=l.sweepBipartite(M,A,0,_,P,T,0,C,F,q):p=u(M,A,L,_,P,T,C,F,q),s.free(F),s.free(q))}s.free(P),s.free(T)}return p}}}var d;function v(E,k){d.push([E,k])}function x(E){return d=[],h(E,E,v,!0),d}function b(E,k){return d=[],h(E,k,v,!1),d}function g(E,k,A){switch(arguments.length){case 1:return x(E);case 2:return typeof k=="function"?h(E,E,k,!0):b(E,k);case 3:return h(E,k,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function u(h,d,v,x,b,g,E,k,A,L,_){for(var C=2*h,M=x,p=C*x;MA-k?u(h,d,v,x,b,g,E,k,A,L,_):c(h,d,v,x,b,g,E,k,A,L,_)}return f}function s(){function u(v,x,b,g,E,k,A,L,_,C,M){for(var p=2*v,P=g,T=p*g;PC-_?g?u(v,x,b,E,k,A,L,_,C,M,p):c(v,x,b,E,k,A,L,_,C,M,p):g?f(v,x,b,E,k,A,L,_,C,M,p):h(v,x,b,E,k,A,L,_,C,M,p)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150:function(i,a,o){"use strict";i.exports=G;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),x=128,b=1<<22,g=1<<22,E=v("!(lo>=p0)&&!(p1>=hi)"),k=v("lo===p0"),A=v("lo0;){Te-=1;var ze=Te*M,Ce=T[ze],me=T[ze+1],De=T[ze+2],ce=T[ze+3],Ge=T[ze+4],nt=T[ze+5],ct=Te*p,qt=F[ct],rt=F[ct+1],ot=nt&1,Dt=!!(nt&16),kt=_e,Ct=Me,Yt=ge,xr=ie;if(ot&&(kt=ge,Ct=ie,Yt=_e,xr=Me),!(nt&2&&(De=A(N,Ce,me,De,kt,Ct,rt),me>=De))&&!(nt&4&&(me=L(N,Ce,me,De,kt,Ct,qt),me>=De))){var er=De-me,Ke=Ge-ce;if(Dt){if(N*er*(er+Ke)v&&b[C+d]>L;--_,C-=E){for(var M=C,p=C+E,P=0;P>>1,L=2*h,_=A,C=b[L*A+d];E=F?(_=T,C=F):P>=V?(_=p,C=P):(_=q,C=V):F>=V?(_=T,C=F):V>=P?(_=p,C=P):(_=q,C=V);for(var G=L*(k-1),N=L*_,H=0;H=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,x,b,g,E,k,A){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p];if(F===A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function l(v,x,b,g,E,k,A){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p];if(Fq;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function u(v,x,b,g,E,k,A){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+P];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function c(v,x,b,g,E,k,A){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+P];if(F<=A)if(M===T)M+=1,C+=L;else{for(var q=0;L>q;++q){var V=E[_+q];E[_+q]=E[C],E[C++]=V}var H=k[T];k[T]=k[M],k[M++]=H}}return M}function f(v,x,b,g,E,k,A){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p],q=E[_+P];if(F<=A&&A<=q)if(M===T)M+=1,C+=L;else{for(var V=0;L>V;++V){var H=E[_+V];E[_+V]=E[C],E[C++]=H}var X=k[T];k[T]=k[M],k[M++]=X}}return M}function h(v,x,b,g,E,k,A){for(var L=2*v,_=L*b,C=_,M=b,p=x,P=v+x,T=b;g>T;++T,_+=L){var F=E[_+p],q=E[_+P];if(FV;++V){var H=E[_+V];E[_+V]=E[C],E[C++]=H}var X=k[T];k[T]=k[M],k[M++]=X}}return M}function d(v,x,b,g,E,k,A,L){for(var _=2*v,C=_*b,M=C,p=b,P=x,T=v+x,F=b;g>F;++F,C+=_){var q=E[C+P],V=E[C+T];if(!(q>=A)&&!(L>=V))if(p===F)p+=1,M+=_;else{for(var H=0;_>H;++H){var X=E[C+H];E[C+H]=E[M],E[M++]=X}var G=k[F];k[F]=k[p],k[p++]=G}}return p}},4192:function(i){"use strict";i.exports=o;var a=32;function o(x,b){b<=4*a?s(0,b-1,x):v(0,b-1,x)}function s(x,b,g){for(var E=2*(x+1),k=x+1;k<=b;++k){for(var A=g[E++],L=g[E++],_=k,C=E-2;_-- >x;){var M=g[C-2],p=g[C-1];if(Mg[b+1]:!0}function d(x,b,g,E){x*=2;var k=E[x];return k>1,_=L-E,C=L+E,M=k,p=_,P=L,T=C,F=A,q=x+1,V=b-1,H=0;h(M,p,g)&&(H=M,M=p,p=H),h(T,F,g)&&(H=T,T=F,F=H),h(M,P,g)&&(H=M,M=P,P=H),h(p,P,g)&&(H=p,p=P,P=H),h(M,T,g)&&(H=M,M=T,T=H),h(P,T,g)&&(H=P,P=T,T=H),h(p,F,g)&&(H=p,p=F,F=H),h(p,P,g)&&(H=p,p=P,P=H),h(T,F,g)&&(H=T,T=F,F=H);for(var X=g[2*p],G=g[2*p+1],N=g[2*T],W=g[2*T+1],re=2*M,ae=2*P,_e=2*F,Me=2*k,ke=2*L,ge=2*A,ie=0;ie<2;++ie){var Te=g[re+ie],Ee=g[ae+ie],Ae=g[_e+ie];g[Me+ie]=Te,g[ke+ie]=Ee,g[ge+ie]=Ae}u(_,x,g),u(C,b,g);for(var ze=q;ze<=V;++ze)if(d(ze,X,G,g))ze!==q&&l(ze,q,g),++q;else if(!d(ze,N,W,g))for(;;)if(d(V,N,W,g)){d(V,X,G,g)?(c(ze,q,V,g),++q,--V):(l(ze,V,g),--V);break}else{if(--V>>1;u(E,Ee);for(var Ae=0,ze=0,ke=0;ke=c)Ce=Ce-c|0,A(v,x,ze--,Ce);else if(Ce>=0)A(h,d,Ae--,Ce);else if(Ce<=-c){Ce=-Ce-c|0;for(var me=0;me>>1;u(E,Ee);for(var Ae=0,ze=0,Ce=0,ke=0;ke>1===E[2*ke+3]>>1&&(De=2,ke+=1),me<0){for(var ce=-(me>>1)-1,Ge=0;Ge>1)-1;De===0?A(h,d,Ae--,ce):De===1?A(v,x,ze--,ce):De===2&&A(b,g,Ce--,ce)}}}function M(P,T,F,q,V,H,X,G,N,W,re,ae){var _e=0,Me=2*P,ke=T,ge=T+P,ie=1,Te=1;q?Te=c:ie=c;for(var Ee=V;Ee>>1;u(E,me);for(var De=0,Ee=0;Ee=c?(Ge=!q,Ae-=c):(Ge=!!q,Ae-=1),Ge)L(h,d,De++,Ae);else{var nt=ae[Ae],ct=Me*Ae,qt=re[ct+T+1],rt=re[ct+T+1+P];e:for(var ot=0;ot>>1;u(E,Ae);for(var ze=0,ge=0;ge=c)h[ze++]=ie-c;else{ie-=1;var me=re[ie],De=_e*ie,ce=W[De+T+1],Ge=W[De+T+1+P];e:for(var nt=0;nt=0;--nt)if(h[nt]===ie){for(var ot=nt+1;ot0;){for(var k=d.pop(),b=d.pop(),A=-1,L=-1,g=x[b],C=1;C=0||(h.flip(b,k),u(f,h,d,A,b,L),u(f,h,d,b,L,A),u(f,h,d,L,k,A),u(f,h,d,k,A,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function l(v,x,b,g,E,k,A){this.cells=v,this.neighbor=x,this.flags=g,this.constraint=b,this.active=E,this.next=k,this.boundary=A}var u=l.prototype;function c(v,x){return v[0]-x[0]||v[1]-x[1]||v[2]-x[2]}u.locate=function(){var v=[0,0,0];return function(x,b,g){var E=x,k=b,A=g;return b0||A.length>0;){for(;k.length>0;){var p=k.pop();if(L[p]!==-E){L[p]=E;for(var P=_[p],T=0;T<3;++T){var F=M[3*p+T];F>=0&&L[F]===0&&(C[3*p+T]?A.push(F):(k.push(F),L[F]=E))}}}var q=A;A=k,k=q,A.length=0,E=-E}var V=h(_,L,x);return b?V.concat(g.boundary):V}},8902:function(i,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=A;function h(L,_,C,M,p){this.a=L,this.b=_,this.idx=C,this.lowerIds=M,this.upperIds=p}function d(L,_,C,M){this.a=L,this.b=_,this.type=C,this.idx=M}function v(L,_){var C=L.a[0]-_.a[0]||L.a[1]-_.a[1]||L.type-_.type;return C||L.type!==u&&(C=l(L.a,L.b,_.b),C)?C:L.idx-_.idx}function x(L,_){return l(L.a,L.b,_)}function b(L,_,C,M,p){for(var P=s.lt(_,M,x),T=s.gt(_,M,x),F=P;F1&&l(C[V[X-2]],C[V[X-1]],M)>0;)L.push([V[X-1],V[X-2],p]),X-=1;V.length=X,V.push(p);for(var H=q.upperIds,X=H.length;X>1&&l(C[H[X-2]],C[H[X-1]],M)<0;)L.push([H[X-2],H[X-1],p]),X-=1;H.length=X,H.push(p)}}function g(L,_){var C;return L.a[0]<_.a[0]?C=l(L.a,L.b,_.a):C=l(_.b,_.a,L.a),C||(_.b[0]q[0]&&p.push(new d(q,F,f,P),new d(F,q,c,P))}p.sort(v);for(var V=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),H=[new h([V,1],[V,0],-1,[],[],[],[])],X=[],P=0,G=p.length;P=0}}(),u.removeTriangle=function(h,d,v){var x=this.stars;c(x[h],d,v),c(x[d],v,h),c(x[v],h,d)},u.addTriangle=function(h,d,v){var x=this.stars;x[h].push(d,v),x[d].push(v,h),x[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],x=1,b=v.length;x=0;--N){var Te=X[N];W=Te[0];var Ee=V[W],Ae=Ee[0],ze=Ee[1],Ce=q[Ae],me=q[ze];if((Ce[0]-me[0]||Ce[1]-me[1])<0){var De=Ae;Ae=ze,ze=De}Ee[0]=Ae;var ce=Ee[1]=Te[1],Ge;for(G&&(Ge=Ee[2]);N>0&&X[N-1][0]===W;){var Te=X[--N],nt=Te[1];G?V.push([ce,nt,Ge]):V.push([ce,nt]),ce=nt}G?V.push([ce,ze,Ge]):V.push([ce,ze])}return re}function _(q,V,H){for(var X=V.length,G=new s(X),N=[],W=0;WV[2]?1:0)}function p(q,V,H){if(q.length!==0){if(V)for(var X=0;X0||W.length>0}function F(q,V,H){var X;if(H){X=V;for(var G=new Array(V.length),N=0;NL+1)throw new Error(k+" map requires nshades to be at least size "+E.length);Array.isArray(d.alpha)?d.alpha.length!==2?_=[1,1]:_=d.alpha.slice():typeof d.alpha=="number"?_=[d.alpha,d.alpha]:_=[1,1],v=E.map(function(F){return Math.round(F.index*L)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var M=E.map(function(F,q){var V=E[q].index,H=E[q].rgb.slice();return H.length===4&&H[3]>=0&&H[3]<=1||(H[3]=_[0]+(_[1]-_[0])*V),H}),p=[];for(C=0;C=0}function d(v,x,b,g){var E=s(x,b,g);if(E===0){var k=l(s(v,x,b)),A=l(s(v,x,g));if(k===A){if(k===0){var L=h(v,x,b),_=h(v,x,g);return L===_?0:L?1:-1}return 0}else{if(A===0)return k>0||h(v,x,g)?-1:1;if(k===0)return A>0||h(v,x,b)?1:-1}return l(A-k)}var C=s(v,x,b);if(C>0)return E>0&&s(v,x,g)>0?1:-1;if(C<0)return E>0||s(v,x,g)>0?1:-1;var M=s(v,x,g);return M>0||h(v,x,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),x=a(u[0],u[1]);return a(v,l[2])-a(x,u[2])||a(v+l[2],h)-a(x+u[2],d);case 4:var b=l[0],g=l[1],E=l[2],k=l[3],A=u[0],L=u[1],_=u[2],C=u[3];return b+g+E+k-(A+L+_+C)||a(b,g,E,k)-a(A,L,_,C,A)||a(b+g,b+E,b+k,g+E,g+k,E+k)-a(A+L,A+_,A+C,L+_,L+C,_+C)||a(b+g+E,b+g+k,b+E+k,g+E+k)-a(A+L+_,A+L+C,A+_+C,L+_+C);default:for(var M=l.slice().sort(o),p=u.slice().sort(o),P=0;Po[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v=d[A]&&(k+=1);g[E]=k}}return h}function f(h,d){try{return s(h,!0)}catch(g){var v=l(h);if(v.length<=d)return[];var x=u(h,v),b=s(x,!0);return c(b,v)}}},4769:function(i){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,x=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var g=s.length-1;g>=0;--g)h[g]=d*s[g]+v*l[g]+x*u[g]+b*c[g];return h}return d*s+v*l+x*u[g]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,x=d*d,b=(1+2*f)*x,g=f*x,E=v*(3-2*f),k=v*d;if(s.length){h||(h=new Array(s.length));for(var A=s.length-1;A>=0;--A)h[A]=b*s[A]+g*l[A]+E*u[A]+k*c[A];return h}return b*s+g*l+E*u+k*c}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var x=d.point,b=v.point,g=x.length,E=0;E=2)return!1;H[G]=N}return!0}):V=V.filter(function(H){for(var X=0;X<=b;++X){var G=P[H[X]];if(G<0)return!1;H[X]=G}return!0}),b&1)for(var k=0;k>>31},i.exports.exponent=function(E){var k=i.exports.hi(E);return(k<<1>>>21)-1023},i.exports.fraction=function(E){var k=i.exports.lo(E),A=i.exports.hi(E),L=A&(1<<20)-1;return A&2146435072&&(L+=1048576),[k,L]},i.exports.denormalized=function(E){var k=i.exports.hi(E);return!(k&2146435072)}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=b-1)for(var C=k.length-1,p=v-x[b-1],M=0;M=b-1)for(var _=k.length-1,C=v-x[b-1],M=0;M=0;--b)if(v[--x])return!1;return!0},f.jump=function(v){var x=this.lastT(),b=this.dimension;if(!(v0;--M)g.push(u(L[M-1],_[M-1],arguments[M])),E.push(0)}},f.push=function(v){var x=this.lastT(),b=this.dimension;if(!(v1e-6?1/A:0;this._time.push(v);for(var p=b;p>0;--p){var P=u(_[p-1],C[p-1],arguments[p]);g.push(P),E.push((P-g[k++])*M)}}},f.set=function(v){var x=this.dimension;if(!(v0;--L)b.push(u(k[L-1],A[L-1],arguments[L])),g.push(0)}},f.move=function(v){var x=this.lastT(),b=this.dimension;if(!(v<=x||arguments.length!==b+1)){var g=this._state,E=this._velocity,k=g.length-this.dimension,A=this.bounds,L=A[0],_=A[1],C=v-x,M=C>1e-6?1/C:0;this._time.push(v);for(var p=b;p>0;--p){var P=arguments[p];g.push(u(L[p-1],_[p-1],g[k++]+P)),E.push(P*M)}}},f.idle=function(v){var x=this.lastT();if(!(v=0;--M)g.push(u(L[M],_[M],g[k]+C*E[k])),E.push(0),k+=1}};function h(v){for(var x=new Array(v),b=0;b=0;--q){var p=P[q];T[q]<=0?P[q]=new s(p._color,p.key,p.value,P[q+1],p.right,p._count+1):P[q]=new s(p._color,p.key,p.value,p.left,P[q+1],p._count+1)}for(var q=P.length-1;q>1;--q){var V=P[q-1],p=P[q];if(V._color===o||p._color===o)break;var H=P[q-2];if(H.left===V)if(V.left===p){var X=H.right;if(X&&X._color===a)V._color=o,H.right=u(o,X),H._color=a,q-=1;else{if(H._color=a,H.left=V.right,V._color=o,V.right=H,P[q-2]=V,P[q-1]=p,c(H),c(V),q>=3){var G=P[q-3];G.left===H?G.left=V:G.right=V}break}}else{var X=H.right;if(X&&X._color===a)V._color=o,H.right=u(o,X),H._color=a,q-=1;else{if(V.right=p.left,H._color=a,H.left=p.right,p._color=o,p.left=V,p.right=H,P[q-2]=p,P[q-1]=V,c(H),c(V),c(p),q>=3){var G=P[q-3];G.left===H?G.left=p:G.right=p}break}}else if(V.right===p){var X=H.left;if(X&&X._color===a)V._color=o,H.left=u(o,X),H._color=a,q-=1;else{if(H._color=a,H.right=V.left,V._color=o,V.left=H,P[q-2]=V,P[q-1]=p,c(H),c(V),q>=3){var G=P[q-3];G.right===H?G.right=V:G.left=V}break}}else{var X=H.left;if(X&&X._color===a)V._color=o,H.left=u(o,X),H._color=a,q-=1;else{if(V.left=p.right,H._color=a,H.right=p.left,p._color=o,p.right=V,p.left=H,P[q-2]=p,P[q-1]=V,c(H),c(V),c(p),q>=3){var G=P[q-3];G.right===H?G.right=p:G.left=p}break}}}return P[0]._color=o,new f(M,P[0])};function d(_,C){if(C.left){var M=d(_,C.left);if(M)return M}var M=_(C.key,C.value);if(M)return M;if(C.right)return d(_,C.right)}function v(_,C,M,p){var P=C(_,p.key);if(P<=0){if(p.left){var T=v(_,C,M,p.left);if(T)return T}var T=M(p.key,p.value);if(T)return T}if(p.right)return v(_,C,M,p.right)}function x(_,C,M,p,P){var T=M(_,P.key),F=M(C,P.key),q;if(T<=0&&(P.left&&(q=x(_,C,M,p,P.left),q)||F>0&&(q=p(P.key,P.value),q)))return q;if(F>0&&P.right)return x(_,C,M,p,P.right)}h.forEach=function(C,M,p){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,p)>=0?void 0:x(M,p,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.left;return new b(this,_)}}),Object.defineProperty(h,"end",{get:function(){for(var _=[],C=this.root;C;)_.push(C),C=C.right;return new b(this,_)}}),h.at=function(_){if(_<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(_=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T<=0&&(P=p.length),T<=0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.gt=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T<0&&(P=p.length),T<0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.lt=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T>0&&(P=p.length),T<=0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.le=function(_){for(var C=this._compare,M=this.root,p=[],P=0;M;){var T=C(_,M.key);p.push(M),T>=0&&(P=p.length),T<0?M=M.left:M=M.right}return p.length=P,new b(this,p)},h.find=function(_){for(var C=this._compare,M=this.root,p=[];M;){var P=C(_,M.key);if(p.push(M),P===0)return new b(this,p);P<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(_){var C=this.find(_);return C?C.remove():this},h.get=function(_){for(var C=this._compare,M=this.root;M;){var p=C(_,M.key);if(p===0)return M.value;p<=0?M=M.left:M=M.right}};function b(_,C){this.tree=_,this._stack=C}var g=b.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new b(this.tree,this._stack.slice())};function E(_,C){_.key=C.key,_.value=C.value,_.left=C.left,_.right=C.right,_._color=C._color,_._count=C._count}function k(_){for(var C,M,p,P,T=_.length-1;T>=0;--T){if(C=_[T],T===0){C._color=o;return}if(M=_[T-1],M.left===C){if(p=M.right,p.right&&p.right._color===a){if(p=M.right=l(p),P=p.right=l(p.right),M.right=p.left,p.left=M,p.right=P,p._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(p),T>1){var F=_[T-2];F.left===M?F.left=p:F.right=p}_[T-1]=p;return}else if(p.left&&p.left._color===a){if(p=M.right=l(p),P=p.left=l(p.left),M.right=P.left,p.left=P.right,P.left=M,P.right=p,P._color=M._color,M._color=o,p._color=o,C._color=o,c(M),c(p),c(P),T>1){var F=_[T-2];F.left===M?F.left=P:F.right=P}_[T-1]=P;return}if(p._color===o)if(M._color===a){M._color=o,M.right=u(a,p);return}else{M.right=u(a,p);continue}else{if(p=l(p),M.right=p.left,p.left=M,p._color=M._color,M._color=a,c(M),c(p),T>1){var F=_[T-2];F.left===M?F.left=p:F.right=p}_[T-1]=p,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}else{if(p=M.left,p.left&&p.left._color===a){if(p=M.left=l(p),P=p.left=l(p.left),M.left=p.right,p.right=M,p.left=P,p._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(p),T>1){var F=_[T-2];F.right===M?F.right=p:F.left=p}_[T-1]=p;return}else if(p.right&&p.right._color===a){if(p=M.left=l(p),P=p.right=l(p.right),M.left=P.right,p.right=P.left,P.right=M,P.left=p,P._color=M._color,M._color=o,p._color=o,C._color=o,c(M),c(p),c(P),T>1){var F=_[T-2];F.right===M?F.right=P:F.left=P}_[T-1]=P;return}if(p._color===o)if(M._color===a){M._color=o,M.left=u(a,p);return}else{M.left=u(a,p);continue}else{if(p=l(p),M.left=p.right,p.right=M,p._color=M._color,M._color=a,c(M),c(p),T>1){var F=_[T-2];F.right===M?F.right=p:F.left=p}_[T-1]=p,_[T]=M,T+1<_.length?_[T+1]=C:_.push(C),T=T+2}}}}g.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var C=new Array(_.length),M=_[_.length-1];C[C.length-1]=new s(M._color,M.key,M.value,M.left,M.right,M._count);for(var p=_.length-2;p>=0;--p){var M=_[p];M.left===_[p+1]?C[p]=new s(M._color,M.key,M.value,C[p+1],M.right,M._count):C[p]=new s(M._color,M.key,M.value,M.left,C[p+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 p=C.length-2;p>=P;--p)M=C[p],C[p]=new s(M._color,M.key,M.value,M.left,C[p+1],M._count);C[P-1].left=C[P]}if(M=C[C.length-1],M._color===a){var F=C[C.length-2];F.left===M?F.left=null:F.right===M&&(F.right=null),C.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var _=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(_=C[C.length-1].left._count);for(var p=C.length-2;p>=0;--p)C[p+1]===C[p].right&&(++_,C[p].left&&(_+=C[p].left._count));return _},enumerable:!0}),g.next=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.right)for(C=C.right;C;)_.push(C),C=C.left;else for(_.pop();_.length>0&&_[_.length-1].right===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].left===_[C])return!0;return!1}}),g.update=function(_){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),p=C[C.length-1];M[M.length-1]=new s(p._color,p.key,_,p.left,p.right,p._count);for(var P=C.length-2;P>=0;--P)p=C[P],p.left===C[P+1]?M[P]=new s(p._color,p.key,p.value,M[P+1],p.right,p._count):M[P]=new s(p._color,p.key,p.value,p.left,M[P+1],p._count);return new f(this.tree._compare,M[0])},g.prev=function(){var _=this._stack;if(_.length!==0){var C=_[_.length-1];if(C.left)for(C=C.left;C;)_.push(C),C=C.right;else for(_.pop();_.length>0&&_[_.length-1].left===C;)C=_[_.length-1],_.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var C=_.length-1;C>0;--C)if(_[C-1].right===_[C])return!0;return!1}});function A(_,C){return _C?1:0}function L(_){return new f(_||A,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function x(V){return d.isView(V)&&!(V instanceof v)}function b(V){return Array.isArray(V)||x(V)}function g(V,H){return V[0]=H[0],V[1]=H[1],V[2]=H[2],V}function E(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 k=E.prototype;k.update=function(V){V=V||{};function H(Ae,ze,Ce){if(Ce in V){var me=V[Ce],De=this[Ce],ce;(Ae?b(me)&&b(me[0]):b(me))?this[Ce]=ce=[ze(me[0]),ze(me[1]),ze(me[2])]:this[Ce]=ce=[ze(me),ze(me),ze(me)];for(var Ge=0;Ge<3;++Ge)if(ce[Ge]!==De[Ge])return!0}return!1}var X=H.bind(this,!1,Number),G=H.bind(this,!1,Boolean),N=H.bind(this,!1,String),W=H.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]}),re,ae=!1,_e=!1;if("bounds"in V)for(var Me=V.bounds,ke=0;ke<2;++ke)for(var ge=0;ge<3;++ge)Me[ke][ge]!==this.bounds[ke][ge]&&(_e=!0),this.bounds[ke][ge]=Me[ke][ge];if("ticks"in V){re=V.ticks,ae=!0,this.autoTicks=!1;for(var ke=0;ke<3;++ke)this.tickSpacing[ke]=0}else X("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in V||"tickSpacing"in V||(this.autoTicks=!0),_e=!0,ae=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),ae=!0),ae){for(var ke=0;ke<3;++ke)re[ke].sort(function(ze,Ce){return ze.x-Ce.x});f.equal(re,this.ticks)?ae=!1:this.ticks=re}G("tickEnable"),N("tickFont")&&(ae=!0),N("tickFontStyle")&&(ae=!0),N("tickFontWeight")&&(ae=!0),N("tickFontVariant")&&(ae=!0),X("tickSize"),X("tickAngle"),X("tickPad"),W("tickColor");var ie=N("labels");N("labelFont")&&(ie=!0),N("labelFontStyle")&&(ie=!0),N("labelFontWeight")&&(ie=!0),N("labelFontVariant")&&(ie=!0),G("labelEnable"),X("labelSize"),X("labelPad"),W("labelColor"),G("lineEnable"),G("lineMirror"),X("lineWidth"),W("lineColor"),G("lineTickEnable"),G("lineTickMirror"),X("lineTickLength"),X("lineTickWidth"),W("lineTickColor"),G("gridEnable"),X("gridWidth"),W("gridColor"),G("zeroEnable"),W("zeroLineColor"),X("zeroLineWidth"),G("backgroundEnable"),W("backgroundColor");var Te=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||ae)&&this._text.update(this.bounds,this.labels,Te,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,Te,this.ticks,Ee),this._lines&&ae&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new A,new A,new A];function _(V,H,X,G,N){for(var W=V.primalOffset,re=V.primalMinor,ae=V.mirrorOffset,_e=V.mirrorMinor,Me=G[H],ke=0;ke<3;++ke)if(H!==ke){var ge=W,ie=ae,Te=re,Ee=_e;Me&1<0?(Te[ke]=-1,Ee[ke]=0):(Te[ke]=0,Ee[ke]=1)}}var C=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(V){};var p=0,P=[0,0,0],T=[0,0,0],F=[0,0,0];k.draw=function(V){V=V||M;for(var Ce=this.gl,H=V.model||h,X=V.view||h,G=V.projection||h,N=this.bounds,W=V._ortho||!1,re=c(H,X,G,N,W),ae=re.cubeEdges,_e=re.axis,Me=X[12],ke=X[13],ge=X[14],ie=X[15],Te=W?2:1,Ee=Te*this.pixelRatio*(G[3]*Me+G[7]*ke+G[11]*ge+G[15]*ie)/Ce.drawingBufferHeight,Ae=0;Ae<3;++Ae)this.lastCubeProps.cubeEdges[Ae]=ae[Ae],this.lastCubeProps.axis[Ae]=_e[Ae];for(var ze=L,Ae=0;Ae<3;++Ae)_(L[Ae],Ae,this.bounds,ae,_e);for(var Ce=this.gl,me=C,Ae=0;Ae<3;++Ae)this.backgroundEnable[Ae]?me[Ae]=_e[Ae]:me[Ae]=0;this._background.draw(H,X,G,N,me,this.backgroundColor),this._lines.bind(H,X,G,this);for(var Ae=0;Ae<3;++Ae){var De=[0,0,0];_e[Ae]>0?De[Ae]=N[1][Ae]:De[Ae]=N[0][Ae];for(var ce=0;ce<2;++ce){var Ge=(Ae+1+ce)%3,nt=(Ae+1+(ce^1))%3;this.gridEnable[Ge]&&this._lines.drawGrid(Ge,nt,this.bounds,De,this.gridColor[Ge],this.gridWidth[Ge]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var Ge=(Ae+1+ce)%3,nt=(Ae+1+(ce^1))%3;this.zeroEnable[nt]&&Math.min(N[0][nt],N[1][nt])<=0&&Math.max(N[0][nt],N[1][nt])>=0&&this._lines.drawZero(Ge,nt,this.bounds,De,this.zeroLineColor[nt],this.zeroLineWidth[nt]*this.pixelRatio)}}for(var Ae=0;Ae<3;++Ae){this.lineEnable[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,ze[Ae].primalOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio),this.lineMirror[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,ze[Ae].mirrorOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio);for(var ct=g(P,ze[Ae].primalMinor),qt=g(T,ze[Ae].mirrorMinor),rt=this.lineTickLength,ce=0;ce<3;++ce){var ot=Ee/H[5*ce];ct[ce]*=rt[ce]*ot,qt[ce]*=rt[ce]*ot}this.lineTickEnable[Ae]&&this._lines.drawAxisTicks(Ae,ze[Ae].primalOffset,ct,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio),this.lineTickMirror[Ae]&&this._lines.drawAxisTicks(Ae,ze[Ae].mirrorOffset,qt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(H,X,G,this.pixelRatio);var Dt,kt=.5,Ct,Yt;function xr(St){Yt=[0,0,0],Yt[St]=1}function er(St,Et,dt){var Ht=(St+1)%3,$t=(St+2)%3,fr=Et[Ht],_r=Et[$t],Br=dt[Ht],Or=dt[$t];if(fr>0&&Or>0){xr(Ht);return}else if(fr>0&&Or<0){xr(Ht);return}else if(fr<0&&Or>0){xr(Ht);return}else if(fr<0&&Or<0){xr(Ht);return}else if(_r>0&&Br>0){xr($t);return}else if(_r>0&&Br<0){xr($t);return}else if(_r<0&&Br>0){xr($t);return}else if(_r<0&&Br<0){xr($t);return}}for(var Ae=0;Ae<3;++Ae){for(var Ke=ze[Ae].primalMinor,xt=ze[Ae].mirrorMinor,bt=g(F,ze[Ae].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[Ae]&&(bt[ce]+=Ee*Ke[ce]*Math.max(this.lineTickLength[ce],0)/H[5*ce]);var Lt=[0,0,0];if(Lt[Ae]=1,this.tickEnable[Ae]){this.tickAngle[Ae]===-3600?(this.tickAngle[Ae]=0,this.tickAlign[Ae]="auto"):this.tickAlign[Ae]=-1,Ct=1,Dt=[this.tickAlign[Ae],kt,Ct],Dt[0]==="auto"?Dt[0]=p:Dt[0]=parseInt(""+Dt[0]),Yt=[0,0,0],er(Ae,Ke,xt);for(var ce=0;ce<3;++ce)bt[ce]+=Ee*Ke[ce]*this.tickPad[ce]/H[5*ce];this._text.drawTicks(Ae,this.tickSize[Ae],this.tickAngle[Ae],bt,this.tickColor[Ae],Lt,Yt,Dt)}if(this.labelEnable[Ae]){Ct=0,Yt=[0,0,0],this.labels[Ae].length>4&&(xr(Ae),Ct=1),Dt=[this.labelAlign[Ae],kt,Ct],Dt[0]==="auto"?Dt[0]=p:Dt[0]=parseInt(""+Dt[0]);for(var ce=0;ce<3;++ce)bt[ce]+=Ee*Ke[ce]*this.labelPad[ce]/H[5*ce];bt[Ae]+=.5*(N[0][Ae]+N[1][Ae]),this._text.drawLabel(Ae,this.labelSize[Ae],this.labelAngle[Ae],bt,this.labelColor[Ae],[0,0,0],Yt,Dt)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function q(V,H){var X=new E(V);return X.update(H),X}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,x,b){this.gl=d,this.buffer=v,this.vao=x,this.shader=b}var f=c.prototype;f.draw=function(d,v,x,b,g,E){for(var k=!1,A=0;A<3;++A)k=k||g[A];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:x,bounds:b,enable:g,colors:E},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],x=[],b=0,g=0;g<3;++g)for(var E=(g+1)%3,k=(g+2)%3,A=[0,0,0],L=[0,0,0],_=-1;_<=1;_+=2){x.push(b,b+2,b+1,b+1,b+2,b+3),A[g]=_,L[g]=_;for(var C=-1;C<=1;C+=2){A[E]=C;for(var M=-1;M<=1;M+=2)A[k]=M,v.push(A[0],A[1],A[2],L[0],L[1],L[2]),b+=1}var p=E;E=k,k=p}var P=s(d,new Float32Array(v)),T=s(d,new Uint16Array(x),d.ELEMENT_ARRAY_BUFFER),F=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],T),q=u(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new c(d,P,F,q)}},6429:function(i,a,o){"use strict";i.exports=_;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),x=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,M,p){for(var P=0;P<4;++P){C[P]=p[12+P];for(var T=0;T<3;++T)C[P]+=M[T]*p[4*T+P]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function E(C){for(var M=0;M_e&&(X|=1<_e){X|=1<d[q][1])&&(ze=q);for(var Ce=-1,q=0;q<3;++q){var me=ze^1<d[De][0]&&(De=me)}}var ce=k;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Ce^ze)]=ze&Ce,ce[s.log2(ze^De)]=ze&De;var Ge=De^7;Ge===X||Ge===Ae?(Ge=Ce^7,ce[s.log2(De^Ge)]=Ge&De):ce[s.log2(Ce^Ge)]=Ge&Ce;for(var nt=A,ct=X,W=0;W<3;++W)ct&1<=0;--ce){var Ge=Ae[De[ce]];M.push(Ee*Ge[0],-Ee*Ge[1],W)}}for(var P=[0,0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0],V=1.25,H={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},X=0;X<3;++X){F[X]=M.length/d|0,p(.5*(k[0][X]+k[1][X]),S[X],L[X],12,V,H),q[X]=(M.length/d|0)-F[X],P[X]=M.length/d|0;for(var G=0;G<_[X].length;++G)if(_[X][G].text){var N={family:_[X][G].font||C[X].family,style:C[X].fontStyle||C[X].style,weight:C[X].fontWeight||C[X].weight,variant:C[X].fontVariant||C[X].variant};p(_[X][G].x,_[X][G].text,N,_[X][G].fontSize||12,V,H)}T[X]=(M.length/d|0)-P[X]}this.buffer.update(M),this.tickOffset=P,this.tickCount=T,this.labelOffset=F,this.labelCount=q},x.drawTicks=function(k,S,L,_,C,M,p,P){this.tickCount[k]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=S,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=p,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[k],this.tickOffset[k]))},x.drawLabel=function(k,S,L,_,C,M,p,P){this.labelCount[k]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=S,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=p,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.labelCount[k],this.labelOffset[k]))},x.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function g(k,S){try{return u(k,S)}catch(L){return console.warn('error vectorizing text:"'+k+'" error:',L),{cells:[],positions:[]}}}function E(k,S,L,_,C,M){var p=s(k),P=l(k,[{buffer:p,size:3}]),T=c(k);T.attributes.position.location=0;var F=new v(k,T,p,P);return F.update(S,L,_,C,M),F}},6444:function(i,a){"use strict";a.create=s,a.equal=l;function o(u,c){var f=u+"",h=f.indexOf("."),d=0;h>=0&&(d=f.length-h-1);var v=Math.pow(10,d),x=Math.round(u*c*v),b=x+"";if(b.indexOf("e")>=0)return b;var g=x/v,E=x%v;x<0?(g=-Math.ceil(g)|0,E=-E|0):(g=Math.floor(g)|0,E=E|0);var k=""+g;if(x<0&&(k="-"+k),d){for(var S=""+E;S.length=u[0][h];--x)d.push({x:x*c[h],text:o(c[h],x)});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;hk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(E,_,L),k}function v(g,E){for(var k=s.malloc(g.length,E),S=g.length,L=0;L=0;--S){if(E[S]!==k)return!1;k*=g[S]}return!0}h.update=function(g,E){if(typeof E!="number"&&(E=-1),this.bind(),typeof g=="object"&&typeof g.shape!="undefined"){var k=g.dtype;if(c.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&k!=="uint16"?k="uint32":k="uint16"}if(k===g.dtype&&x(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,g.data,E):this.length=d(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),E);else{var L=s.malloc(g.size,k),_=u(L,g.shape);l.assign(_,g),E<0?this.length=d(this.gl,this.type,this.length,this.usage,L,E):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,g.size),E),s.free(L)}}else if(Array.isArray(g)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(g,"uint16"):C=v(g,"float32"),E<0?this.length=d(this.gl,this.type,this.length,this.usage,C,E):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,g.length),E),s.free(C)}else if(typeof g=="object"&&typeof g.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,g,E);else if(typeof g=="number"||g===void 0){if(E>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function b(g,E,k,S){if(k=k||g.ARRAY_BUFFER,S=S||g.DYNAMIC_DRAW,k!==g.ARRAY_BUFFER&&k!==g.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(S!==g.DYNAMIC_DRAW&&S!==g.STATIC_DRAW&&S!==g.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=g.createBuffer(),_=new f(g,k,L,0,S);return _.update(E),_}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,x=1/0,b=-1/0,g=1/0,E=-1/0,k=1/0,S=-1/0,L=null,_=null,C=[],M=1/0,p=!1,P=u.coneSizemode==="raw",T=0;Tv&&(v=s.length(q)),T&&!P){var V=2*s.distance(L,F)/(s.length(_)+s.length(q));V?(M=Math.min(M,V),p=!1):p=!0}p||(L=F,_=q),C.push(q)}var H=[x,g,k],X=[b,E,S];c&&(c[0]=H,c[1]=X),v===0&&(v=1);var G=1/v;isFinite(M)||(M=1),d.vectorScale=M;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*G),d.coneScale=N;for(var T=0,W=0;T=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(C){this.pickId=C};function E(C){for(var M=v({colormap:C,nshades:256,format:"rgba"}),p=new Uint8Array(256*4),P=0;P<256;++P){for(var T=M[P],F=0;F<3;++F)p[4*P+F]=T[F];p[4*P+3]=T[3]*255}return d(p,[256,256,4],[4,0,1])}function k(C){for(var M=C.length,p=new Array(M),P=0;P0){var W=this.triShader;W.bind(),W.uniforms=V,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(C){C=C||{};for(var M=this.gl,p=C.model||x,P=C.view||x,T=C.projection||x,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)F[0][q]=Math.max(F[0][q],this.clipBounds[0][q]),F[1][q]=Math.min(F[1][q],this.clipBounds[1][q]);this._model=[].slice.call(p),this._view=[].slice.call(P),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var V={model:p,view:P,projection:T,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},H=this.pickShader;H.bind(),H.uniforms=V,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],p=this.cells[M],P=this.positions[p[1]].slice(0,3),T={position:P,dataCoordinate:P,index:Math.floor(p[1]/48)};return this.traceType==="cone"?T.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[p[1]],T.velocity=this.vectors[p[1]].slice(0,3),T.divergence=this.vectors[p[1]][3],T.index=M),T},g.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function S(C,M){var p=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function L(C,M){var p=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function _(C,M,p){var P=p.shaders;arguments.length===1&&(M=C,C=M.gl);var T=S(C,P),F=L(C,P),q=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var V=l(C),H=l(C),X=l(C),G=l(C),N=l(C),W=u(C,[{buffer:V,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:X,type:C.FLOAT,size:4},{buffer:G,type:C.FLOAT,size:2},{buffer:H,type:C.FLOAT,size:4}]),re=new b(C,q,T,F,V,H,N,X,G,W,p.traceType||"cone");return re.update(M),re}i.exports=_},614:function(i,a,o){var s=o(3236),l=s([`precision highp float; +}`]);a.bg=function(x){return l(x,d,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(i,a,o){"use strict";i.exports=E;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(k,A,L,_){this.gl=k,this.shader=A,this.buffer=L,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var x=v.prototype,b=[0,0];x.bind=function(k,A,L,_){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=k,C.view=A,C.projection=L,C.pixelScale=_,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},x.unbind=function(){this.vao.unbind()},x.update=function(k,A,L,_,C){var M=[];function p(W,re,ae,_e,Me,ke){var ge=[ae.style,ae.weight,ae.variant,ae.family].join("_"),ie=h[ge];ie||(ie=h[ge]={});var Te=ie[re];Te||(Te=ie[re]=g(re,{triangles:!0,font:ae.family,fontStyle:ae.style,fontWeight:ae.weight,fontVariant:ae.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Me,styletags:ke}));for(var Ee=(_e||12)/12,Ae=Te.positions,ze=Te.cells,Ce=0,me=ze.length;Ce=0;--ce){var Ge=Ae[De[ce]];M.push(Ee*Ge[0],-Ee*Ge[1],W)}}for(var P=[0,0,0],T=[0,0,0],F=[0,0,0],q=[0,0,0],V=1.25,H={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},X=0;X<3;++X){F[X]=M.length/d|0,p(.5*(k[0][X]+k[1][X]),A[X],L[X],12,V,H),q[X]=(M.length/d|0)-F[X],P[X]=M.length/d|0;for(var G=0;G<_[X].length;++G)if(_[X][G].text){var N={family:_[X][G].font||C[X].family,style:C[X].fontStyle||C[X].style,weight:C[X].fontWeight||C[X].weight,variant:C[X].fontVariant||C[X].variant};p(_[X][G].x,_[X][G].text,N,_[X][G].fontSize||12,V,H)}T[X]=(M.length/d|0)-P[X]}this.buffer.update(M),this.tickOffset=P,this.tickCount=T,this.labelOffset=F,this.labelCount=q},x.drawTicks=function(k,A,L,_,C,M,p,P){this.tickCount[k]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=p,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.tickCount[k],this.tickOffset[k]))},x.drawLabel=function(k,A,L,_,C,M,p,P){this.labelCount[k]&&(this.shader.uniforms.axis=M,this.shader.uniforms.color=C,this.shader.uniforms.angle=L,this.shader.uniforms.scale=A,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=p,this.shader.uniforms.alignOpt=P,this.vao.draw(this.gl.TRIANGLES,this.labelCount[k],this.labelOffset[k]))},x.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function g(k,A){try{return u(k,A)}catch(L){return console.warn('error vectorizing text:"'+k+'" error:',L),{cells:[],positions:[]}}}function E(k,A,L,_,C,M){var p=s(k),P=l(k,[{buffer:p,size:3}]),T=c(k);T.attributes.position.location=0;var F=new v(k,T,p,P);return F.update(A,L,_,C,M),F}},6444:function(i,a){"use strict";a.create=s,a.equal=l;function o(u,c){var f=u+"",h=f.indexOf("."),d=0;h>=0&&(d=f.length-h-1);var v=Math.pow(10,d),x=Math.round(u*c*v),b=x+"";if(b.indexOf("e")>=0)return b;var g=x/v,E=x%v;x<0?(g=-Math.ceil(g)|0,E=-E|0):(g=Math.floor(g)|0,E=E|0);var k=""+g;if(x<0&&(k="-"+k),d){for(var A=""+E;A.length=u[0][h];--x)d.push({x:x*c[h],text:o(c[h],x)});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;hk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(E,_,L),k}function v(g,E){for(var k=s.malloc(g.length,E),A=g.length,L=0;L=0;--A){if(E[A]!==k)return!1;k*=g[A]}return!0}h.update=function(g,E){if(typeof E!="number"&&(E=-1),this.bind(),typeof g=="object"&&typeof g.shape!="undefined"){var k=g.dtype;if(c.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&k!=="uint16"?k="uint32":k="uint16"}if(k===g.dtype&&x(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,g.data,E):this.length=d(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),E);else{var L=s.malloc(g.size,k),_=u(L,g.shape);l.assign(_,g),E<0?this.length=d(this.gl,this.type,this.length,this.usage,L,E):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,g.size),E),s.free(L)}}else if(Array.isArray(g)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(g,"uint16"):C=v(g,"float32"),E<0?this.length=d(this.gl,this.type,this.length,this.usage,C,E):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,g.length),E),s.free(C)}else if(typeof g=="object"&&typeof g.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,g,E);else if(typeof g=="number"||g===void 0){if(E>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function b(g,E,k,A){if(k=k||g.ARRAY_BUFFER,A=A||g.DYNAMIC_DRAW,k!==g.ARRAY_BUFFER&&k!==g.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==g.DYNAMIC_DRAW&&A!==g.STATIC_DRAW&&A!==g.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=g.createBuffer(),_=new f(g,k,L,0,A);return _.update(E),_}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,x=1/0,b=-1/0,g=1/0,E=-1/0,k=1/0,A=-1/0,L=null,_=null,C=[],M=1/0,p=!1,P=u.coneSizemode==="raw",T=0;Tv&&(v=s.length(q)),T&&!P){var V=2*s.distance(L,F)/(s.length(_)+s.length(q));V?(M=Math.min(M,V),p=!1):p=!0}p||(L=F,_=q),C.push(q)}var H=[x,g,k],X=[b,E,A];c&&(c[0]=H,c[1]=X),v===0&&(v=1);var G=1/v;isFinite(M)||(M=1),d.vectorScale=M;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*G),d.coneScale=N;for(var T=0,W=0;T=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(C){this.pickId=C};function E(C){for(var M=v({colormap:C,nshades:256,format:"rgba"}),p=new Uint8Array(256*4),P=0;P<256;++P){for(var T=M[P],F=0;F<3;++F)p[4*P+F]=T[F];p[4*P+3]=T[3]*255}return d(p,[256,256,4],[4,0,1])}function k(C){for(var M=C.length,p=new Array(M),P=0;P0){var W=this.triShader;W.bind(),W.uniforms=V,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(C){C=C||{};for(var M=this.gl,p=C.model||x,P=C.view||x,T=C.projection||x,F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)F[0][q]=Math.max(F[0][q],this.clipBounds[0][q]),F[1][q]=Math.min(F[1][q],this.clipBounds[1][q]);this._model=[].slice.call(p),this._view=[].slice.call(P),this._projection=[].slice.call(T),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var V={model:p,view:P,projection:T,clipBounds:F,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},H=this.pickShader;H.bind(),H.uniforms=V,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],p=this.cells[M],P=this.positions[p[1]].slice(0,3),T={position:P,dataCoordinate:P,index:Math.floor(p[1]/48)};return this.traceType==="cone"?T.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(T.intensity=this.intensity[p[1]],T.velocity=this.vectors[p[1]].slice(0,3),T.divergence=this.vectors[p[1]][3],T.index=M),T},g.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(C,M){var p=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function L(C,M){var p=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function _(C,M,p){var P=p.shaders;arguments.length===1&&(M=C,C=M.gl);var T=A(C,P),F=L(C,P),q=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var V=l(C),H=l(C),X=l(C),G=l(C),N=l(C),W=u(C,[{buffer:V,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:X,type:C.FLOAT,size:4},{buffer:G,type:C.FLOAT,size:2},{buffer:H,type:C.FLOAT,size:4}]),re=new b(C,q,T,F,V,H,N,X,G,W,p.traceType||"cone");return re.update(M),re}i.exports=_},614:function(i,a,o){var s=o(3236),l=s([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -653,7 +653,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(i){i.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(i,a,o){var s=o(737);i.exports=function(u){return s[u]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(g,E,k,S){this.gl=g,this.shader=S,this.buffer=E,this.vao=k,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(g){var E=this.gl,k=this.shader.uniforms;this.shader.bind();var S=k.view=g.view||c,L=k.projection=g.projection||c;k.model=g.model||c,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var _=S[12],C=S[13],M=S[14],p=S[15],P=g._ortho||!1,T=P?2:1,F=T*this.pixelRatio*(L[3]*_+L[7]*C+L[11]*M+L[15]*p)/E.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)E.lineWidth(this.lineWidth[q]*this.pixelRatio),k.capSize=this.capSize[q]*F,this.lineCount[q]&&E.drawArrays(E.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(g,E){for(var k=0;k<3;++k)g[0][k]=Math.min(g[0][k],E[k]),g[1][k]=Math.max(g[1][k],E[k])}var v=function(){for(var g=new Array(3),E=0;E<3;++E){for(var k=[],S=1;S<=2;++S)for(var L=-1;L<=1;L+=2){var _=(S+E)%3,C=[0,0,0];C[_]=L,k.push(C)}g[E]=k}return g}();function x(g,E,k,S){for(var L=v[S],_=0;_0){var V=P.slice();V[M]+=F[1][M],L.push(P[0],P[1],P[2],q[0],q[1],q[2],q[3],0,0,0,V[0],V[1],V[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,V),C+=2+x(L,V,q,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(g){var E=g.gl,k=s(E),S=l(E,[{buffer:k,type:E.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:E.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:E.FLOAT,size:3,offset:28,stride:40}]),L=u(E);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var _=new f(E,k,S,L);return _.update(g),_}},3436:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; +}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(i){i.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(i,a,o){var s=o(737);i.exports=function(u){return s[u]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(g,E,k,A){this.gl=g,this.shader=A,this.buffer=E,this.vao=k,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(g){var E=this.gl,k=this.shader.uniforms;this.shader.bind();var A=k.view=g.view||c,L=k.projection=g.projection||c;k.model=g.model||c,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var _=A[12],C=A[13],M=A[14],p=A[15],P=g._ortho||!1,T=P?2:1,F=T*this.pixelRatio*(L[3]*_+L[7]*C+L[11]*M+L[15]*p)/E.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)E.lineWidth(this.lineWidth[q]*this.pixelRatio),k.capSize=this.capSize[q]*F,this.lineCount[q]&&E.drawArrays(E.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(g,E){for(var k=0;k<3;++k)g[0][k]=Math.min(g[0][k],E[k]),g[1][k]=Math.max(g[1][k],E[k])}var v=function(){for(var g=new Array(3),E=0;E<3;++E){for(var k=[],A=1;A<=2;++A)for(var L=-1;L<=1;L+=2){var _=(A+E)%3,C=[0,0,0];C[_]=L,k.push(C)}g[E]=k}return g}();function x(g,E,k,A){for(var L=v[A],_=0;_0){var V=P.slice();V[M]+=F[1][M],L.push(P[0],P[1],P[2],q[0],q[1],q[2],q[3],0,0,0,V[0],V[1],V[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,V),C+=2+x(L,V,q,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(g){var E=g.gl,k=s(E),A=l(E,[{buffer:k,type:E.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:E.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:E.FLOAT,size:3,offset:28,stride:40}]),L=u(E);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var _=new f(E,k,A,L);return _.update(g),_}},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; @@ -704,11 +704,11 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(i,a,o){"use strict";var s=o(7766);i.exports=C;var l=null,u,c,f,h;function d(M){var p=M.getParameter(M.FRAMEBUFFER_BINDING),P=M.getParameter(M.RENDERBUFFER_BINDING),T=M.getParameter(M.TEXTURE_BINDING_2D);return[p,P,T]}function v(M,p){M.bindFramebuffer(M.FRAMEBUFFER,p[0]),M.bindRenderbuffer(M.RENDERBUFFER,p[1]),M.bindTexture(M.TEXTURE_2D,p[2])}function x(M,p){var P=M.getParameter(p.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var T=0;T<=P;++T){for(var F=new Array(P),q=0;q1&&H.drawBuffersWEBGL(l[V]);var re=P.getExtension("WEBGL_depth_texture");re?X?M.depth=g(P,F,q,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):G&&(M.depth=g(P,F,q,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):G&&X?M._depth_rb=E(P,F,q,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):G?M._depth_rb=E(P,F,q,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):X&&(M._depth_rb=E(P,F,q,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var ae=P.checkFramebufferStatus(P.FRAMEBUFFER);if(ae!==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 W=0;WF||P<0||P>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=p,M._shape[1]=P;for(var q=d(T),V=0;Vq||P<0||P>q)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(F){if(V>M.getParameter(F.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 H=M.UNSIGNED_BYTE,X=M.getExtension("OES_texture_float");if(T.float&&V>0){if(!X)throw new Error("gl-fbo: Context does not support floating point textures");H=M.FLOAT}else T.preferFloat&&V>0&&X&&(H=M.FLOAT);var G=!0;"depth"in T&&(G=!!T.depth);var N=!1;return"stencil"in T&&(N=!!T.stencil),new S(M,p,P,H,V,G,N,F)}},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){"use strict";var x=u(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";v!==void 0&&(b=v===l.FRAGMENT_SHADER?"fragment":"vertex");for(var g=s(`Error compiling %s shader %s: +}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(i,a,o){"use strict";var s=o(7766);i.exports=C;var l=null,u,c,f,h;function d(M){var p=M.getParameter(M.FRAMEBUFFER_BINDING),P=M.getParameter(M.RENDERBUFFER_BINDING),T=M.getParameter(M.TEXTURE_BINDING_2D);return[p,P,T]}function v(M,p){M.bindFramebuffer(M.FRAMEBUFFER,p[0]),M.bindRenderbuffer(M.RENDERBUFFER,p[1]),M.bindTexture(M.TEXTURE_2D,p[2])}function x(M,p){var P=M.getParameter(p.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var T=0;T<=P;++T){for(var F=new Array(P),q=0;q1&&H.drawBuffersWEBGL(l[V]);var re=P.getExtension("WEBGL_depth_texture");re?X?M.depth=g(P,F,q,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):G&&(M.depth=g(P,F,q,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):G&&X?M._depth_rb=E(P,F,q,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):G?M._depth_rb=E(P,F,q,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):X&&(M._depth_rb=E(P,F,q,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var ae=P.checkFramebufferStatus(P.FRAMEBUFFER);if(ae!==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 W=0;WF||P<0||P>F)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=p,M._shape[1]=P;for(var q=d(T),V=0;Vq||P<0||P>q)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(F){if(V>M.getParameter(F.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 H=M.UNSIGNED_BYTE,X=M.getExtension("OES_texture_float");if(T.float&&V>0){if(!X)throw new Error("gl-fbo: Context does not support floating point textures");H=M.FLOAT}else T.preferFloat&&V>0&&X&&(H=M.FLOAT);var G=!0;"depth"in T&&(G=!!T.depth);var N=!1;return"stencil"in T&&(N=!!T.stencil),new A(M,p,P,H,V,G,N,F)}},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){"use strict";var x=u(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";v!==void 0&&(b=v===l.FRAGMENT_SHADER?"fragment":"vertex");for(var g=s(`Error compiling %s shader %s: `,b,x),E=s("%s%s",g,h),k=h.split(` -`),S={},L=0;L0){for(var ge=0;ge<24;++ge)q.push(q[q.length-12]);G+=2,_e=!0}continue e}N[0][T]=Math.min(N[0][T],Me[T],ke[T]),N[1][T]=Math.max(N[1][T],Me[T],ke[T])}var ie,Te;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Te=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Te=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Te.length===3&&(Te=[Te[0],Te[1],Te[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(ae)?Ee=ae.length>P-1?ae[P-1]:ae.length>0?ae[ae.length-1]:[0,0,0,1]:Ee=ae;var Ae=X;if(X+=k(Me,ke),_e){for(T=0;T<2;++T)q.push(Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3]);G+=2,_e=!1}q.push(Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3],Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,-Ee,ie[0],ie[1],ie[2],ie[3],ke[0],ke[1],ke[2],Me[0],Me[1],Me[2],X,-Ee,Te[0],Te[1],Te[2],Te[3],ke[0],ke[1],ke[2],Me[0],Me[1],Me[2],X,Ee,Te[0],Te[1],Te[2],Te[3]),G+=4}}if(this.buffer.update(q),V.push(X),H.push(W[W.length-1].slice()),this.bounds=N,this.vertexCount=G,this.points=H,this.arcLength=V,"dashes"in p){var ze=p.dashes,Ce=ze.slice();for(Ce.unshift(0),P=1;P1.0001)return null;T+=P[L]}return Math.abs(T-1)>.001?null:[_,h(v,P),P]}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float; +}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714:function(i,a,o){"use strict";i.exports=M;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(p,P,T,F){return c[0]=F,c[1]=T,c[2]=P,c[3]=p,f[0]}var d=o(2478),v=o(9618),x=o(7319),b=x.createShader,g=x.createPickShader,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(p,P){for(var T=0,F=0;F<3;++F){var q=p[F]-P[F];T+=q*q}return Math.sqrt(T)}function A(p){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],T=0;T<3;++T)P[0][T]=Math.max(p[0][T],P[0][T]),P[1][T]=Math.min(p[1][T],P[1][T]);return P}function L(p,P,T,F){this.arcLength=p,this.position=P,this.index=T,this.dataCoordinate=F}function _(p,P,T,F,q,V){this.gl=p,this.shader=P,this.pickShader=T,this.buffer=F,this.vao=q,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=V,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=_.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(p){this.pickId=p},C.drawTransparent=C.draw=function(p){if(this.vertexCount){var P=this.gl,T=this.shader,F=this.vao;T.bind(),T.uniforms={model:p.model||E,view:p.view||E,projection:p.projection||E,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(P.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},C.drawPick=function(p){if(this.vertexCount){var P=this.gl,T=this.pickShader,F=this.vao;T.bind(),T.uniforms={model:p.model||E,view:p.view||E,projection:p.projection||E,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},F.bind(),F.draw(P.TRIANGLE_STRIP,this.vertexCount),F.unbind()}},C.update=function(p){var P,T;this.dirty=!0;var F=!!p.connectGaps;"dashScale"in p&&(this.dashScale=p.dashScale),this.hasAlpha=!1,"opacity"in p&&(this.opacity=+p.opacity,this.opacity<1&&(this.hasAlpha=!0));var q=[],V=[],H=[],X=0,G=0,N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=p.position||p.positions;if(W){var re=p.color||p.colors||[0,0,0,1],ae=p.lineWidth||1,_e=!1;e:for(P=1;P0){for(var ge=0;ge<24;++ge)q.push(q[q.length-12]);G+=2,_e=!0}continue e}N[0][T]=Math.min(N[0][T],Me[T],ke[T]),N[1][T]=Math.max(N[1][T],Me[T],ke[T])}var ie,Te;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Te=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Te=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Te.length===3&&(Te=[Te[0],Te[1],Te[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(ae)?Ee=ae.length>P-1?ae[P-1]:ae.length>0?ae[ae.length-1]:[0,0,0,1]:Ee=ae;var Ae=X;if(X+=k(Me,ke),_e){for(T=0;T<2;++T)q.push(Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3]);G+=2,_e=!1}q.push(Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3],Me[0],Me[1],Me[2],ke[0],ke[1],ke[2],Ae,-Ee,ie[0],ie[1],ie[2],ie[3],ke[0],ke[1],ke[2],Me[0],Me[1],Me[2],X,-Ee,Te[0],Te[1],Te[2],Te[3],ke[0],ke[1],ke[2],Me[0],Me[1],Me[2],X,Ee,Te[0],Te[1],Te[2],Te[3]),G+=4}}if(this.buffer.update(q),V.push(X),H.push(W[W.length-1].slice()),this.bounds=N,this.vertexCount=G,this.points=H,this.arcLength=V,"dashes"in p){var ze=p.dashes,Ce=ze.slice();for(Ce.unshift(0),P=1;P1.0001)return null;T+=P[L]}return Math.abs(T-1)>.001?null:[_,h(v,P),P]}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1236,7 +1236,7 @@ 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:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:g,fragment:E,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),v=o(6760),x=o(7608),b=o(9618),g=o(6729),E=o(7765),k=o(1888),S=o(840),L=o(7626),_=S.meshShader,C=S.wireShader,M=S.pointShader,p=S.pickShader,P=S.pointPickShader,T=S.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(ge,ie,Te,Ee,Ae,ze,Ce,me,De,ce,Ge,nt,ct,qt,rt,ot,Dt,kt,Ct,Yt,xr,er,Ke,xt,bt,Lt,St){this.gl=ge,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=ie,this.dirty=!0,this.triShader=Te,this.lineShader=Ee,this.pointShader=Ae,this.pickShader=ze,this.pointPickShader=Ce,this.contourShader=me,this.trianglePositions=De,this.triangleColors=Ge,this.triangleNormals=ct,this.triangleUVs=nt,this.triangleIds=ce,this.triangleVAO=qt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=rt,this.edgeColors=Dt,this.edgeUVs=kt,this.edgeIds=ot,this.edgeVAO=Ct,this.edgeCount=0,this.pointPositions=Yt,this.pointColors=er,this.pointUVs=Ke,this.pointSizes=xt,this.pointIds=xr,this.pointVAO=bt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Lt,this.contourVAO=St,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=F,this._view=F,this._projection=F,this._resolution=[1,1]}var V=q.prototype;V.isOpaque=function(){return!this.hasAlpha},V.isTransparent=function(){return this.hasAlpha},V.pickSlots=1,V.setPickBase=function(ge){this.pickId=ge};function H(ge,ie){if(!ie||!ie.length)return 1;for(var Te=0;Tege&&Te>0){var Ee=(ie[Te][0]-ge)/(ie[Te][0]-ie[Te-1][0]);return ie[Te][1]*(1-Ee)+Ee*ie[Te-1][1]}}return 1}function X(ge,ie){for(var Te=g({colormap:ge,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),Ae=0;Ae<256;++Ae){for(var ze=Te[Ae],Ce=0;Ce<3;++Ce)Ee[4*Ae+Ce]=ze[Ce];ie?Ee[4*Ae+3]=255*H(Ae/255,ie):Ee[4*Ae+3]=255*ze[3]}return b(Ee,[256,256,4],[4,0,1])}function G(ge){for(var ie=ge.length,Te=new Array(ie),Ee=0;Ee0){var ct=this.triShader;ct.bind(),ct.uniforms=me,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ct=this.lineShader;ct.bind(),ct.uniforms=me,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ct=this.pointShader;ct.bind(),ct.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ct=this.contourShader;ct.bind(),ct.uniforms=me,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},V.drawPick=function(ge){ge=ge||{};for(var ie=this.gl,Te=ge.model||F,Ee=ge.view||F,Ae=ge.projection||F,ze=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Ce=0;Ce<3;++Ce)ze[0][Ce]=Math.max(ze[0][Ce],this.clipBounds[0][Ce]),ze[1][Ce]=Math.min(ze[1][Ce],this.clipBounds[1][Ce]);this._model=[].slice.call(Te),this._view=[].slice.call(Ee),this._projection=[].slice.call(Ae),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var me={model:Te,view:Ee,projection:Ae,clipBounds:ze,pickId:this.pickId/255},De=this.pickShader;if(De.bind(),De.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var De=this.pointPickShader;De.bind(),De.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},V.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var ie=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Te=this.cells[ie],Ee=this.positions,Ae=new Array(Te.length),ze=0;zeMath.abs(p))g.rotate(F,0,0,-M*P*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var q=-_.zoomSpeed*T*p/window.innerHeight*(F-g.lastT())/20;g.pan(F,0,0,k*(Math.exp(q)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; +`]);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:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:g,fragment:E,attributes:[{name:"position",type:"vec3"}]}},7201:function(i,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),v=o(6760),x=o(7608),b=o(9618),g=o(6729),E=o(7765),k=o(1888),A=o(840),L=o(7626),_=A.meshShader,C=A.wireShader,M=A.pointShader,p=A.pickShader,P=A.pointPickShader,T=A.contourShader,F=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function q(ge,ie,Te,Ee,Ae,ze,Ce,me,De,ce,Ge,nt,ct,qt,rt,ot,Dt,kt,Ct,Yt,xr,er,Ke,xt,bt,Lt,St){this.gl=ge,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=ie,this.dirty=!0,this.triShader=Te,this.lineShader=Ee,this.pointShader=Ae,this.pickShader=ze,this.pointPickShader=Ce,this.contourShader=me,this.trianglePositions=De,this.triangleColors=Ge,this.triangleNormals=ct,this.triangleUVs=nt,this.triangleIds=ce,this.triangleVAO=qt,this.triangleCount=0,this.lineWidth=1,this.edgePositions=rt,this.edgeColors=Dt,this.edgeUVs=kt,this.edgeIds=ot,this.edgeVAO=Ct,this.edgeCount=0,this.pointPositions=Yt,this.pointColors=er,this.pointUVs=Ke,this.pointSizes=xt,this.pointIds=xr,this.pointVAO=bt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Lt,this.contourVAO=St,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=F,this._view=F,this._projection=F,this._resolution=[1,1]}var V=q.prototype;V.isOpaque=function(){return!this.hasAlpha},V.isTransparent=function(){return this.hasAlpha},V.pickSlots=1,V.setPickBase=function(ge){this.pickId=ge};function H(ge,ie){if(!ie||!ie.length)return 1;for(var Te=0;Tege&&Te>0){var Ee=(ie[Te][0]-ge)/(ie[Te][0]-ie[Te-1][0]);return ie[Te][1]*(1-Ee)+Ee*ie[Te-1][1]}}return 1}function X(ge,ie){for(var Te=g({colormap:ge,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),Ae=0;Ae<256;++Ae){for(var ze=Te[Ae],Ce=0;Ce<3;++Ce)Ee[4*Ae+Ce]=ze[Ce];ie?Ee[4*Ae+3]=255*H(Ae/255,ie):Ee[4*Ae+3]=255*ze[3]}return b(Ee,[256,256,4],[4,0,1])}function G(ge){for(var ie=ge.length,Te=new Array(ie),Ee=0;Ee0){var ct=this.triShader;ct.bind(),ct.uniforms=me,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ct=this.lineShader;ct.bind(),ct.uniforms=me,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ct=this.pointShader;ct.bind(),ct.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ct=this.contourShader;ct.bind(),ct.uniforms=me,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},V.drawPick=function(ge){ge=ge||{};for(var ie=this.gl,Te=ge.model||F,Ee=ge.view||F,Ae=ge.projection||F,ze=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Ce=0;Ce<3;++Ce)ze[0][Ce]=Math.max(ze[0][Ce],this.clipBounds[0][Ce]),ze[1][Ce]=Math.min(ze[1][Ce],this.clipBounds[1][Ce]);this._model=[].slice.call(Te),this._view=[].slice.call(Ee),this._projection=[].slice.call(Ae),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var me={model:Te,view:Ee,projection:Ae,clipBounds:ze,pickId:this.pickId/255},De=this.pickShader;if(De.bind(),De.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var De=this.pointPickShader;De.bind(),De.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},V.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var ie=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Te=this.cells[ie],Ee=this.positions,Ae=new Array(Te.length),ze=0;zeMath.abs(p))g.rotate(F,0,0,-M*P*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var q=-_.zoomSpeed*T*p/window.innerHeight*(F-g.lastT())/20;g.pan(F,0,0,k*(Math.exp(q)-1))}}},!0)},_.enableMouseListeners(),_}},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; @@ -1252,7 +1252,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100:function(i,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),x=o(4772),b=o(4040),g=o(799),E=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function k(){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(p,P){var T=null;try{T=p.getContext("webgl",P),T||(T=p.getContext("experimental-webgl",P))}catch(F){return null}return T}function L(p){var P=Math.round(Math.log(Math.abs(p))/Math.log(10));if(P<0){var T=Math.round(Math.pow(10,-P));return Math.ceil(p*T)/T}else if(P>0){var T=Math.round(Math.pow(10,P));return Math.ceil(p/T)*T}return Math.ceil(p)}function _(p){return typeof p=="boolean"?p:!0}function C(p){p=p||{},p.camera=p.camera||{};var P=p.canvas;if(!P)if(P=document.createElement("canvas"),p.container){var T=p.container;T.appendChild(P)}else document.body.appendChild(P);var F=p.gl;if(F||(p.glOptions&&(E=!!p.glOptions.preserveDrawingBuffer),F=S(P,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:E})),!F)throw new Error("webgl not supported");var q=p.bounds||[[-10,-10,-10],[10,10,10]],V=new k,H=h(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!E}),X=g(F),G=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,N={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:G},W=p.axes||{},re=l(F,W);re.enable=!W.disable;var ae=p.spikes||{},_e=c(F,ae),Me=[],ke=[],ge=[],ie=[],Te=!0,Ce=!0,Ee=new Array(16),Ae=new Array(16),ze={view:null,projection:Ee,model:Ae,_ortho:!1},Ce=!0,me=[F.drawingBufferWidth,F.drawingBufferHeight],De=p.cameraObject||s(P,N),ce={gl:F,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:P,selection:V,camera:De,axes:re,axesPixels:null,spikes:_e,bounds:q,objects:Me,shape:me,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:_(p.autoResize),autoBounds:_(p.autoBounds),autoScale:!!p.autoScale,autoCenter:_(p.autoCenter),clipToBounds:_(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:ze,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Yt){this.aspect[0]=Yt.x,this.aspect[1]=Yt.y,this.aspect[2]=Yt.z,Ce=!0},setBounds:function(Yt,xr){this.bounds[0][Yt]=xr.min,this.bounds[1][Yt]=xr.max},setClearColor:function(Yt){this.clearColor=Yt},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)}},Ge=[F.drawingBufferWidth/ce.pixelRatio|0,F.drawingBufferHeight/ce.pixelRatio|0];function nt(){if(!ce._stopped&&ce.autoResize){var Yt=P.parentNode,xr=1,er=1;Yt&&Yt!==document.body?(xr=Yt.clientWidth,er=Yt.clientHeight):(xr=window.innerWidth,er=window.innerHeight);var Ke=Math.ceil(xr*ce.pixelRatio)|0,xt=Math.ceil(er*ce.pixelRatio)|0;if(Ke!==P.width||xt!==P.height){P.width=Ke,P.height=xt;var bt=P.style;bt.position=bt.position||"absolute",bt.left="0px",bt.top="0px",bt.width=xr+"px",bt.height=er+"px",Te=!0}}}ce.autoResize&&nt(),window.addEventListener("resize",nt);function ct(){for(var Yt=Me.length,xr=ie.length,er=0;er0&&ge[xr-1]===0;)ge.pop(),ie.pop().dispose()}ce.update=function(Yt){ce._stopped||(Yt=Yt||{},Te=!0,Ce=!0)},ce.add=function(Yt){ce._stopped||(Yt.axes=re,Me.push(Yt),ke.push(-1),Te=!0,Ce=!0,ct())},ce.remove=function(Yt){if(!ce._stopped){var xr=Me.indexOf(Yt);xr<0||(Me.splice(xr,1),ke.pop(),Te=!0,Ce=!0,ct())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",nt),P.removeEventListener("webglcontextlost",qt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var Yt=0;YtV.distance)continue;for(var dt=0;dt1e-6?(E=Math.acos(k),S=Math.sin(E),L=Math.sin((1-u)*E)/S,_=Math.sin(u*E)/S):(L=1-u,_=u),o[0]=L*c+_*v,o[1]=L*f+_*x,o[2]=L*h+_*b,o[3]=L*d+_*g,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var b=s(c,x);x.triangles=!1;var g=s(c,x),E,k;if(h&&h!==1){for(E=0;E0){var T=Math.round(Math.pow(10,P));return Math.ceil(p/T)*T}return Math.ceil(p)}function _(p){return typeof p=="boolean"?p:!0}function C(p){p=p||{},p.camera=p.camera||{};var P=p.canvas;if(!P)if(P=document.createElement("canvas"),p.container){var T=p.container;T.appendChild(P)}else document.body.appendChild(P);var F=p.gl;if(F||(p.glOptions&&(E=!!p.glOptions.preserveDrawingBuffer),F=A(P,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:E})),!F)throw new Error("webgl not supported");var q=p.bounds||[[-10,-10,-10],[10,10,10]],V=new k,H=h(F,F.drawingBufferWidth,F.drawingBufferHeight,{preferFloat:!E}),X=g(F),G=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,N={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:G},W=p.axes||{},re=l(F,W);re.enable=!W.disable;var ae=p.spikes||{},_e=c(F,ae),Me=[],ke=[],ge=[],ie=[],Te=!0,Ce=!0,Ee=new Array(16),Ae=new Array(16),ze={view:null,projection:Ee,model:Ae,_ortho:!1},Ce=!0,me=[F.drawingBufferWidth,F.drawingBufferHeight],De=p.cameraObject||s(P,N),ce={gl:F,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:P,selection:V,camera:De,axes:re,axesPixels:null,spikes:_e,bounds:q,objects:Me,shape:me,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:_(p.autoResize),autoBounds:_(p.autoBounds),autoScale:!!p.autoScale,autoCenter:_(p.autoCenter),clipToBounds:_(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:ze,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Yt){this.aspect[0]=Yt.x,this.aspect[1]=Yt.y,this.aspect[2]=Yt.z,Ce=!0},setBounds:function(Yt,xr){this.bounds[0][Yt]=xr.min,this.bounds[1][Yt]=xr.max},setClearColor:function(Yt){this.clearColor=Yt},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)}},Ge=[F.drawingBufferWidth/ce.pixelRatio|0,F.drawingBufferHeight/ce.pixelRatio|0];function nt(){if(!ce._stopped&&ce.autoResize){var Yt=P.parentNode,xr=1,er=1;Yt&&Yt!==document.body?(xr=Yt.clientWidth,er=Yt.clientHeight):(xr=window.innerWidth,er=window.innerHeight);var Ke=Math.ceil(xr*ce.pixelRatio)|0,xt=Math.ceil(er*ce.pixelRatio)|0;if(Ke!==P.width||xt!==P.height){P.width=Ke,P.height=xt;var bt=P.style;bt.position=bt.position||"absolute",bt.left="0px",bt.top="0px",bt.width=xr+"px",bt.height=er+"px",Te=!0}}}ce.autoResize&&nt(),window.addEventListener("resize",nt);function ct(){for(var Yt=Me.length,xr=ie.length,er=0;er0&&ge[xr-1]===0;)ge.pop(),ie.pop().dispose()}ce.update=function(Yt){ce._stopped||(Yt=Yt||{},Te=!0,Ce=!0)},ce.add=function(Yt){ce._stopped||(Yt.axes=re,Me.push(Yt),ke.push(-1),Te=!0,Ce=!0,ct())},ce.remove=function(Yt){if(!ce._stopped){var xr=Me.indexOf(Yt);xr<0||(Me.splice(xr,1),ke.pop(),Te=!0,Ce=!0,ct())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",nt),P.removeEventListener("webglcontextlost",qt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var Yt=0;YtV.distance)continue;for(var dt=0;dt1e-6?(E=Math.acos(k),A=Math.sin(E),L=Math.sin((1-u)*E)/A,_=Math.sin(u*E)/A):(L=1-u,_=u),o[0]=L*c+_*v,o[1]=L*f+_*x,o[2]=L*h+_*b,o[3]=L*d+_*g,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var b=s(c,x);x.triangles=!1;var g=s(c,x),E,k;if(h&&h!==1){for(E=0;E1?1:Ae}function M(Ae,ze,Ce,me,De,ce,Ge,nt,ct,qt,rt,ot){this.gl=Ae,this.pixelRatio=1,this.shader=ze,this.orthoShader=Ce,this.projectShader=me,this.pointBuffer=De,this.colorBuffer=ce,this.glyphBuffer=Ge,this.idBuffer=nt,this.vao=ct,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=qt,this.pickOrthoShader=rt,this.pickProjectShader=ot,this.points=[],this._selectResult=new _(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 p=M.prototype;p.pickSlots=1,p.setPickBase=function(Ae){this.pickId=Ae},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&this.projectHasAlpha)return!0;return!1},p.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],F=[0,0,0],q=[0,0,0,1],V=[0,0,0,1],H=x.slice(),X=[0,0,0],G=[[0,0,0],[0,0,0]];function N(Ae){return Ae[0]=Ae[1]=Ae[2]=0,Ae}function W(Ae,ze){return Ae[0]=ze[0],Ae[1]=ze[1],Ae[2]=ze[2],Ae[3]=1,Ae}function re(Ae,ze,Ce,me){return Ae[0]=ze[0],Ae[1]=ze[1],Ae[2]=ze[2],Ae[Ce]=me,Ae}function ae(Ae){for(var ze=G,Ce=0;Ce<2;++Ce)for(var me=0;me<3;++me)ze[Ce][me]=Math.max(Math.min(Ae[Ce][me],1e8),-1e8);return ze}function _e(Ae,ze,Ce,me){var De=ze.axesProject,ce=ze.gl,Ge=Ae.uniforms,nt=Ce.model||x,ct=Ce.view||x,qt=Ce.projection||x,rt=ze.axesBounds,ot=ae(ze.clipBounds),Dt;ze.axes&&ze.axes.lastCubeProps?Dt=ze.axes.lastCubeProps.axis:Dt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,Ae.bind(),Ge.view=ct,Ge.projection=qt,Ge.screenSize=P,Ge.highlightId=ze.highlightId,Ge.highlightScale=ze.highlightScale,Ge.clipBounds=ot,Ge.pickGroup=ze.pickId/255,Ge.pixelRatio=me;for(var kt=0;kt<3;++kt)if(De[kt]){Ge.scale=ze.projectScale[kt],Ge.opacity=ze.projectOpacity[kt];for(var Ct=H,Yt=0;Yt<16;++Yt)Ct[Yt]=0;for(var Yt=0;Yt<4;++Yt)Ct[5*Yt]=1;Ct[5*kt]=0,Dt[kt]<0?Ct[12+kt]=rt[0][kt]:Ct[12+kt]=rt[1][kt],f(Ct,nt,Ct),Ge.model=Ct;var xr=(kt+1)%3,er=(kt+2)%3,Ke=N(T),xt=N(F);Ke[xr]=1,xt[er]=1;var bt=L(qt,ct,nt,W(q,Ke)),Lt=L(qt,ct,nt,W(V,xt));if(Math.abs(bt[1])>Math.abs(Lt[1])){var St=bt;bt=Lt,Lt=St,St=Ke,Ke=xt,xt=St;var Et=xr;xr=er,er=Et}bt[0]<0&&(Ke[xr]=-1),Lt[1]>0&&(xt[er]=-1);for(var dt=0,Ht=0,Yt=0;Yt<4;++Yt)dt+=Math.pow(nt[4*xr+Yt],2),Ht+=Math.pow(nt[4*er+Yt],2);Ke[xr]/=Math.sqrt(dt),xt[er]/=Math.sqrt(Ht),Ge.axes[0]=Ke,Ge.axes[1]=xt,Ge.fragClipBounds[0]=re(X,ot[0],kt,-1e8),Ge.fragClipBounds[1]=re(X,ot[1],kt,1e8),ze.vao.bind(),ze.vao.draw(ce.TRIANGLES,ze.vertexCount),ze.lineWidth>0&&(ce.lineWidth(ze.lineWidth*me),ze.vao.draw(ce.LINES,ze.lineVertexCount,ze.vertexCount)),ze.vao.unbind()}}var Me=[-1e8,-1e8,-1e8],ke=[1e8,1e8,1e8],ge=[Me,ke];function ie(Ae,ze,Ce,me,De,ce,Ge){var nt=Ce.gl;if((ce===Ce.projectHasAlpha||Ge)&&_e(ze,Ce,me,De),ce===Ce.hasAlpha||Ge){Ae.bind();var ct=Ae.uniforms;ct.model=me.model||x,ct.view=me.view||x,ct.projection=me.projection||x,P[0]=2/nt.drawingBufferWidth,P[1]=2/nt.drawingBufferHeight,ct.screenSize=P,ct.highlightId=Ce.highlightId,ct.highlightScale=Ce.highlightScale,ct.fragClipBounds=ge,ct.clipBounds=Ce.axes.bounds,ct.opacity=Ce.opacity,ct.pickGroup=Ce.pickId/255,ct.pixelRatio=De,Ce.vao.bind(),Ce.vao.draw(nt.TRIANGLES,Ce.vertexCount),Ce.lineWidth>0&&(nt.lineWidth(Ce.lineWidth*De),Ce.vao.draw(nt.LINES,Ce.lineVertexCount,Ce.vertexCount)),Ce.vao.unbind()}}p.draw=function(Ae){var ze=this.useOrtho?this.orthoShader:this.shader;ie(ze,this.projectShader,this,Ae,this.pixelRatio,!1,!1)},p.drawTransparent=function(Ae){var ze=this.useOrtho?this.orthoShader:this.shader;ie(ze,this.projectShader,this,Ae,this.pixelRatio,!0,!1)},p.drawPick=function(Ae){var ze=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(ze,this.pickProjectShader,this,Ae,1,!0,!0)},p.pick=function(Ae){if(!Ae||Ae.id!==this.pickId)return null;var ze=Ae.value[2]+(Ae.value[1]<<8)+(Ae.value[0]<<16);if(ze>=this.pointCount||ze<0)return null;var Ce=this.points[ze],me=this._selectResult;me.index=ze;for(var De=0;De<3;++De)me.position[De]=me.dataCoordinate[De]=Ce[De];return me},p.highlight=function(Ae){if(!Ae)this.highlightId=[1,1,1,1];else{var ze=Ae.index,Ce=ze&255,me=ze>>8&255,De=ze>>16&255;this.highlightId=[Ce/255,me/255,De/255,0]}};function Te(Ae,ze,Ce,me){var De;k(Ae)?ze0){var Nr=0,ut=er,Ne=[0,0,0,1],Ye=[0,0,0,1],Ve=k(Dt)&&k(Dt[0]),Xe=k(Yt)&&k(Yt[0]);e:for(var me=0;me0?1-Ht[0][0]:Vt<0?1+Ht[1][0]:1,ar*=ar>0?1-Ht[0][1]:ar<0?1+Ht[1][1]:1;for(var Qr=[Vt,ar],nn=Et.cells||[],Wi=Et.positions||[],Lt=0;Ltthis.buffer.length){l.free(this.buffer);for(var k=this.buffer=l.mallocUint8(c(E*g*4)),S=0;Sk)for(g=k;gE)for(g=E;g=0){for(var G=X.type.charAt(X.type.length-1)|0,N=new Array(G),W=0;W=0;)re+=1;V[H]=re}var ae=new Array(k.length);function _e(){_.program=c.program(C,_._vref,_._fref,q,V);for(var Me=0;Me=0){var p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+_+": "+C);f(v,x,M[0],g,p,E,_)}else if(C.indexOf("mat")>=0){var p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+_+": "+C);h(v,x,M,g,p,E,_)}else throw new s("","Unknown data type for attribute "+_+": "+C);break}}return E}},3327:function(i,a,o){"use strict";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),x=0;x4)throw new l("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+ae+"iv"](x[V],H);break;case"v":h["uniform"+ae+"fv"](x[V],H);break;default:throw new l("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(ae=re.charCodeAt(re.length-1)-48,ae<2||ae>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+ae+"fv"](x[V],!1,H);break}else throw new l("","Unknown uniform data type for "+name+": "+re)}}}}}function E(C,M){if(typeof M!="object")return[[C,M]];var p=[];for(var P in M){var T=M[P],F=C;parseInt(P)+""===P?F+="["+P+"]":F+="."+P,typeof T=="object"?p.push.apply(p,E(F,T)):p.push([F,T])}return p}function k(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 p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(p,!1):c(p,0)}else if(C.indexOf("mat")===0&&C.length===4){var p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(p*p,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function S(C,M,p){if(typeof p=="object"){var P=L(p);Object.defineProperty(C,M,{get:u(P),set:g(p),enumerable:!0,configurable:!1})}else x[p]?Object.defineProperty(C,M,{get:b(p),set:g(p),enumerable:!0,configurable:!1}):C[M]=k(v[p].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var p=0;p1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var x=1;x1)for(var E=0;E1?1:Ae}function M(Ae,ze,Ce,me,De,ce,Ge,nt,ct,qt,rt,ot){this.gl=Ae,this.pixelRatio=1,this.shader=ze,this.orthoShader=Ce,this.projectShader=me,this.pointBuffer=De,this.colorBuffer=ce,this.glyphBuffer=Ge,this.idBuffer=nt,this.vao=ct,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=qt,this.pickOrthoShader=rt,this.pickProjectShader=ot,this.points=[],this._selectResult=new _(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 p=M.prototype;p.pickSlots=1,p.setPickBase=function(Ae){this.pickId=Ae},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&this.projectHasAlpha)return!0;return!1},p.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],F=[0,0,0],q=[0,0,0,1],V=[0,0,0,1],H=x.slice(),X=[0,0,0],G=[[0,0,0],[0,0,0]];function N(Ae){return Ae[0]=Ae[1]=Ae[2]=0,Ae}function W(Ae,ze){return Ae[0]=ze[0],Ae[1]=ze[1],Ae[2]=ze[2],Ae[3]=1,Ae}function re(Ae,ze,Ce,me){return Ae[0]=ze[0],Ae[1]=ze[1],Ae[2]=ze[2],Ae[Ce]=me,Ae}function ae(Ae){for(var ze=G,Ce=0;Ce<2;++Ce)for(var me=0;me<3;++me)ze[Ce][me]=Math.max(Math.min(Ae[Ce][me],1e8),-1e8);return ze}function _e(Ae,ze,Ce,me){var De=ze.axesProject,ce=ze.gl,Ge=Ae.uniforms,nt=Ce.model||x,ct=Ce.view||x,qt=Ce.projection||x,rt=ze.axesBounds,ot=ae(ze.clipBounds),Dt;ze.axes&&ze.axes.lastCubeProps?Dt=ze.axes.lastCubeProps.axis:Dt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,Ae.bind(),Ge.view=ct,Ge.projection=qt,Ge.screenSize=P,Ge.highlightId=ze.highlightId,Ge.highlightScale=ze.highlightScale,Ge.clipBounds=ot,Ge.pickGroup=ze.pickId/255,Ge.pixelRatio=me;for(var kt=0;kt<3;++kt)if(De[kt]){Ge.scale=ze.projectScale[kt],Ge.opacity=ze.projectOpacity[kt];for(var Ct=H,Yt=0;Yt<16;++Yt)Ct[Yt]=0;for(var Yt=0;Yt<4;++Yt)Ct[5*Yt]=1;Ct[5*kt]=0,Dt[kt]<0?Ct[12+kt]=rt[0][kt]:Ct[12+kt]=rt[1][kt],f(Ct,nt,Ct),Ge.model=Ct;var xr=(kt+1)%3,er=(kt+2)%3,Ke=N(T),xt=N(F);Ke[xr]=1,xt[er]=1;var bt=L(qt,ct,nt,W(q,Ke)),Lt=L(qt,ct,nt,W(V,xt));if(Math.abs(bt[1])>Math.abs(Lt[1])){var St=bt;bt=Lt,Lt=St,St=Ke,Ke=xt,xt=St;var Et=xr;xr=er,er=Et}bt[0]<0&&(Ke[xr]=-1),Lt[1]>0&&(xt[er]=-1);for(var dt=0,Ht=0,Yt=0;Yt<4;++Yt)dt+=Math.pow(nt[4*xr+Yt],2),Ht+=Math.pow(nt[4*er+Yt],2);Ke[xr]/=Math.sqrt(dt),xt[er]/=Math.sqrt(Ht),Ge.axes[0]=Ke,Ge.axes[1]=xt,Ge.fragClipBounds[0]=re(X,ot[0],kt,-1e8),Ge.fragClipBounds[1]=re(X,ot[1],kt,1e8),ze.vao.bind(),ze.vao.draw(ce.TRIANGLES,ze.vertexCount),ze.lineWidth>0&&(ce.lineWidth(ze.lineWidth*me),ze.vao.draw(ce.LINES,ze.lineVertexCount,ze.vertexCount)),ze.vao.unbind()}}var Me=[-1e8,-1e8,-1e8],ke=[1e8,1e8,1e8],ge=[Me,ke];function ie(Ae,ze,Ce,me,De,ce,Ge){var nt=Ce.gl;if((ce===Ce.projectHasAlpha||Ge)&&_e(ze,Ce,me,De),ce===Ce.hasAlpha||Ge){Ae.bind();var ct=Ae.uniforms;ct.model=me.model||x,ct.view=me.view||x,ct.projection=me.projection||x,P[0]=2/nt.drawingBufferWidth,P[1]=2/nt.drawingBufferHeight,ct.screenSize=P,ct.highlightId=Ce.highlightId,ct.highlightScale=Ce.highlightScale,ct.fragClipBounds=ge,ct.clipBounds=Ce.axes.bounds,ct.opacity=Ce.opacity,ct.pickGroup=Ce.pickId/255,ct.pixelRatio=De,Ce.vao.bind(),Ce.vao.draw(nt.TRIANGLES,Ce.vertexCount),Ce.lineWidth>0&&(nt.lineWidth(Ce.lineWidth*De),Ce.vao.draw(nt.LINES,Ce.lineVertexCount,Ce.vertexCount)),Ce.vao.unbind()}}p.draw=function(Ae){var ze=this.useOrtho?this.orthoShader:this.shader;ie(ze,this.projectShader,this,Ae,this.pixelRatio,!1,!1)},p.drawTransparent=function(Ae){var ze=this.useOrtho?this.orthoShader:this.shader;ie(ze,this.projectShader,this,Ae,this.pixelRatio,!0,!1)},p.drawPick=function(Ae){var ze=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(ze,this.pickProjectShader,this,Ae,1,!0,!0)},p.pick=function(Ae){if(!Ae||Ae.id!==this.pickId)return null;var ze=Ae.value[2]+(Ae.value[1]<<8)+(Ae.value[0]<<16);if(ze>=this.pointCount||ze<0)return null;var Ce=this.points[ze],me=this._selectResult;me.index=ze;for(var De=0;De<3;++De)me.position[De]=me.dataCoordinate[De]=Ce[De];return me},p.highlight=function(Ae){if(!Ae)this.highlightId=[1,1,1,1];else{var ze=Ae.index,Ce=ze&255,me=ze>>8&255,De=ze>>16&255;this.highlightId=[Ce/255,me/255,De/255,0]}};function Te(Ae,ze,Ce,me){var De;k(Ae)?ze0){var Nr=0,ut=er,Ne=[0,0,0,1],Ye=[0,0,0,1],Ve=k(Dt)&&k(Dt[0]),Xe=k(Yt)&&k(Yt[0]);e:for(var me=0;me0?1-Ht[0][0]:Vt<0?1+Ht[1][0]:1,ar*=ar>0?1-Ht[0][1]:ar<0?1+Ht[1][1]:1;for(var Qr=[Vt,ar],nn=Et.cells||[],Wi=Et.positions||[],Lt=0;Ltthis.buffer.length){l.free(this.buffer);for(var k=this.buffer=l.mallocUint8(c(E*g*4)),A=0;Ak)for(g=k;gE)for(g=E;g=0){for(var G=X.type.charAt(X.type.length-1)|0,N=new Array(G),W=0;W=0;)re+=1;V[H]=re}var ae=new Array(k.length);function _e(){_.program=c.program(C,_._vref,_._fref,q,V);for(var Me=0;Me=0){var p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+_+": "+C);f(v,x,M[0],g,p,E,_)}else if(C.indexOf("mat")>=0){var p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+_+": "+C);h(v,x,M,g,p,E,_)}else throw new s("","Unknown data type for attribute "+_+": "+C);break}}return E}},3327:function(i,a,o){"use strict";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),x=0;x4)throw new l("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+ae+"iv"](x[V],H);break;case"v":h["uniform"+ae+"fv"](x[V],H);break;default:throw new l("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(ae=re.charCodeAt(re.length-1)-48,ae<2||ae>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+ae+"fv"](x[V],!1,H);break}else throw new l("","Unknown uniform data type for "+name+": "+re)}}}}}function E(C,M){if(typeof M!="object")return[[C,M]];var p=[];for(var P in M){var T=M[P],F=C;parseInt(P)+""===P?F+="["+P+"]":F+="."+P,typeof T=="object"?p.push.apply(p,E(F,T)):p.push([F,T])}return p}function k(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 p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(p,!1):c(p,0)}else if(C.indexOf("mat")===0&&C.length===4){var p=C.charCodeAt(C.length-1)-48;if(p<2||p>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(p*p,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function A(C,M,p){if(typeof p=="object"){var P=L(p);Object.defineProperty(C,M,{get:u(P),set:g(p),enumerable:!0,configurable:!1})}else x[p]?Object.defineProperty(C,M,{get:b(p),set:g(p),enumerable:!0,configurable:!1}):C[M]=k(v[p].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var p=0;p1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var x=1;x1)for(var E=0;E0)for(var ie=0;ieL)return C-1}return C},d=function(S,L,_){return S_?_:S},v=function(S,L,_){var C=L.vectors,M=L.meshgrid,p=S[0],P=S[1],T=S[2],F=M[0].length,q=M[1].length,V=M[2].length,H=h(M[0],p),X=h(M[1],P),G=h(M[2],T),N=H+1,W=X+1,re=G+1;if(H=d(H,0,F-1),N=d(N,0,F-1),X=d(X,0,q-1),W=d(W,0,q-1),G=d(G,0,V-1),re=d(re,0,V-1),H<0||X<0||G<0||N>F-1||W>q-1||re>V-1)return s.create();var ae=M[0][H],_e=M[0][N],Me=M[1][X],ke=M[1][W],ge=M[2][G],ie=M[2][re],Te=(p-ae)/(_e-ae),Ee=(P-Me)/(ke-Me),Ae=(T-ge)/(ie-ge);isFinite(Te)||(Te=.5),isFinite(Ee)||(Ee=.5),isFinite(Ae)||(Ae=.5);var ze,Ce,me,De,ce,Ge;switch(_.reversedX&&(H=F-1-H,N=F-1-N),_.reversedY&&(X=q-1-X,W=q-1-W),_.reversedZ&&(G=V-1-G,re=V-1-re),_.filled){case 5:ce=G,Ge=re,me=X*V,De=W*V,ze=H*V*q,Ce=N*V*q;break;case 4:ce=G,Ge=re,ze=H*V,Ce=N*V,me=X*V*F,De=W*V*F;break;case 3:me=X,De=W,ce=G*q,Ge=re*q,ze=H*q*V,Ce=N*q*V;break;case 2:me=X,De=W,ze=H*q,Ce=N*q,ce=G*q*F,Ge=re*q*F;break;case 1:ze=H,Ce=N,ce=G*F,Ge=re*F,me=X*F*V,De=W*F*V;break;default:ze=H,Ce=N,me=X*F,De=W*F,ce=G*F*q,Ge=re*F*q;break}var nt=C[ze+me+ce],ct=C[ze+me+Ge],qt=C[ze+De+ce],rt=C[ze+De+Ge],ot=C[Ce+me+ce],Dt=C[Ce+me+Ge],kt=C[Ce+De+ce],Ct=C[Ce+De+Ge],Yt=s.create(),xr=s.create(),er=s.create(),Ke=s.create();s.lerp(Yt,nt,ot,Te),s.lerp(xr,ct,Dt,Te),s.lerp(er,qt,kt,Te),s.lerp(Ke,rt,Ct,Te);var xt=s.create(),bt=s.create();s.lerp(xt,Yt,er,Ee),s.lerp(bt,xr,Ke,Ee);var Lt=s.create();return s.lerp(Lt,xt,bt,Ae),Lt},x=function(S,L){var _=L[0],C=L[1],M=L[2];return S[0]=_<0?-_:_,S[1]=C<0?-C:C,S[2]=M<0?-M:M,S},b=function(S){var L=1/0;S.sort(function(p,P){return p-P});for(var _=S.length,C=1;C<_;C++){var M=Math.abs(S[C]-S[C-1]);MN||CtW||Ytre)},_e=s.distance(L[0],L[1]),Me=10*_e/C,ke=Me*Me,ge=1,ie=0,Te=_.length;Te>1&&(ge=g(_));for(var Ee=0;Eeie&&(ie=nt),ce.push(nt),V.push({points:ze,velocities:Ce,divergences:ce});for(var ct=0;ctke&&s.scale(qt,qt,Me/Math.sqrt(rt)),s.add(qt,qt,Ae),me=F(qt),s.squaredDistance(De,qt)-ke>-1e-4*ke){ze.push(qt),De=qt,Ce.push(me);var Ge=q(qt,me),nt=s.length(Ge);isFinite(nt)&&nt>ie&&(ie=nt),ce.push(nt)}Ae=qt}}var ot=f(V,S.colormap,ie,ge);return p?ot.tubeScale=p:(ie===0&&(ie=1),ot.tubeScale=M*.5*ge/ie),ot};var E=o(6740),k=o(6405).createMesh;i.exports.createTubeMesh=function(S,L){return k(S,L,{shaders:E,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; +}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(i,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(A,L,_,C){for(var M=A.points,p=A.velocities,P=A.divergences,T=[],F=[],q=[],V=[],H=[],X=[],G=0,N=0,W=l.create(),re=l.create(),ae=8,_e=0;_e0)for(var ie=0;ieL)return C-1}return C},d=function(A,L,_){return A_?_:A},v=function(A,L,_){var C=L.vectors,M=L.meshgrid,p=A[0],P=A[1],T=A[2],F=M[0].length,q=M[1].length,V=M[2].length,H=h(M[0],p),X=h(M[1],P),G=h(M[2],T),N=H+1,W=X+1,re=G+1;if(H=d(H,0,F-1),N=d(N,0,F-1),X=d(X,0,q-1),W=d(W,0,q-1),G=d(G,0,V-1),re=d(re,0,V-1),H<0||X<0||G<0||N>F-1||W>q-1||re>V-1)return s.create();var ae=M[0][H],_e=M[0][N],Me=M[1][X],ke=M[1][W],ge=M[2][G],ie=M[2][re],Te=(p-ae)/(_e-ae),Ee=(P-Me)/(ke-Me),Ae=(T-ge)/(ie-ge);isFinite(Te)||(Te=.5),isFinite(Ee)||(Ee=.5),isFinite(Ae)||(Ae=.5);var ze,Ce,me,De,ce,Ge;switch(_.reversedX&&(H=F-1-H,N=F-1-N),_.reversedY&&(X=q-1-X,W=q-1-W),_.reversedZ&&(G=V-1-G,re=V-1-re),_.filled){case 5:ce=G,Ge=re,me=X*V,De=W*V,ze=H*V*q,Ce=N*V*q;break;case 4:ce=G,Ge=re,ze=H*V,Ce=N*V,me=X*V*F,De=W*V*F;break;case 3:me=X,De=W,ce=G*q,Ge=re*q,ze=H*q*V,Ce=N*q*V;break;case 2:me=X,De=W,ze=H*q,Ce=N*q,ce=G*q*F,Ge=re*q*F;break;case 1:ze=H,Ce=N,ce=G*F,Ge=re*F,me=X*F*V,De=W*F*V;break;default:ze=H,Ce=N,me=X*F,De=W*F,ce=G*F*q,Ge=re*F*q;break}var nt=C[ze+me+ce],ct=C[ze+me+Ge],qt=C[ze+De+ce],rt=C[ze+De+Ge],ot=C[Ce+me+ce],Dt=C[Ce+me+Ge],kt=C[Ce+De+ce],Ct=C[Ce+De+Ge],Yt=s.create(),xr=s.create(),er=s.create(),Ke=s.create();s.lerp(Yt,nt,ot,Te),s.lerp(xr,ct,Dt,Te),s.lerp(er,qt,kt,Te),s.lerp(Ke,rt,Ct,Te);var xt=s.create(),bt=s.create();s.lerp(xt,Yt,er,Ee),s.lerp(bt,xr,Ke,Ee);var Lt=s.create();return s.lerp(Lt,xt,bt,Ae),Lt},x=function(A,L){var _=L[0],C=L[1],M=L[2];return A[0]=_<0?-_:_,A[1]=C<0?-C:C,A[2]=M<0?-M:M,A},b=function(A){var L=1/0;A.sort(function(p,P){return p-P});for(var _=A.length,C=1;C<_;C++){var M=Math.abs(A[C]-A[C-1]);MN||CtW||Ytre)},_e=s.distance(L[0],L[1]),Me=10*_e/C,ke=Me*Me,ge=1,ie=0,Te=_.length;Te>1&&(ge=g(_));for(var Ee=0;Eeie&&(ie=nt),ce.push(nt),V.push({points:ze,velocities:Ce,divergences:ce});for(var ct=0;ctke&&s.scale(qt,qt,Me/Math.sqrt(rt)),s.add(qt,qt,Ae),me=F(qt),s.squaredDistance(De,qt)-ke>-1e-4*ke){ze.push(qt),De=qt,Ce.push(me);var Ge=q(qt,me),nt=s.length(Ge);isFinite(nt)&&nt>ie&&(ie=nt),ce.push(nt)}Ae=qt}}var ot=f(V,A.colormap,ie,ge);return p?ot.tubeScale=p:(ie===0&&(ie=1),ot.tubeScale=M*.5*ge/ie),ot};var E=o(6740),k=o(6405).createMesh;i.exports.createTubeMesh=function(A,L){return k(A,L,{shaders:E,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1999,13 +1999,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);a.createShader=function(d){var v=s(d,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},9499:function(i,a,o){"use strict";i.exports=ze;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),v=o(9994),x=o(9618),b=o(3711),g=o(6760),E=o(7608),k=o(2478),S=o(6199),L=o(990),_=L.createShader,C=L.createContourShader,M=L.createPickShader,p=L.createPickContourShader,P=4*10,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],q=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var Ce=0;Ce<3;++Ce){var me=q[Ce],De=(Ce+1)%3,ce=(Ce+2)%3;me[De+0]=1,me[ce+3]=1,me[Ce+6]=1}})();function V(Ce,me,De,ce,Ge){this.position=Ce,this.index=me,this.uv=De,this.level=ce,this.dataCoordinate=Ge}var H=256;function X(Ce,me,De,ce,Ge,nt,ct,qt,rt,ot,Dt,kt,Ct,Yt,xr){this.gl=Ce,this.shape=me,this.bounds=De,this.objectOffset=xr,this.intensityBounds=[],this._shader=ce,this._pickShader=Ge,this._coordinateBuffer=nt,this._vao=ct,this._colorMap=qt,this._contourShader=rt,this._contourPickShader=ot,this._contourBuffer=Dt,this._contourVAO=kt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new V([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Ct,this._dynamicVAO=Yt,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var G=X.prototype;G.genColormap=function(Ce,me){var De=!1,ce=v([h({colormap:Ce,nshades:H,format:"rgba"}).map(function(Ge,nt){var ct=me?N(nt/255,me):Ge[3];return ct<1&&(De=!0),[Ge[0],Ge[1],Ge[2],255*ct]})]);return d.divseq(ce,255),this.hasAlphaScale=De,ce},G.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},G.isOpaque=function(){return!this.isTransparent()},G.pickSlots=1,G.setPickBase=function(Ce){this.pickId=Ce};function N(Ce,me){if(!me||!me.length)return 1;for(var De=0;DeCe&&De>0){var ce=(me[De][0]-Ce)/(me[De][0]-me[De-1][0]);return me[De][1]*(1-ce)+ce*me[De-1][1]}}return 1}var W=[0,0,0],re={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 ae(Ce,me){var De,ce,Ge,nt=me.axes&&me.axes.lastCubeProps.axis||W,ct=me.showSurface,qt=me.showContour;for(De=0;De<3;++De)for(ct=ct||me.surfaceProject[De],ce=0;ce<3;++ce)qt=qt||me.contourProject[De][ce];for(De=0;De<3;++De){var rt=re.projections[De];for(ce=0;ce<16;++ce)rt[ce]=0;for(ce=0;ce<4;++ce)rt[5*ce]=1;rt[5*De]=0,rt[12+De]=me.axesBounds[+(nt[De]>0)][De],g(rt,Ce.model,rt);var ot=re.clipBounds[De];for(Ge=0;Ge<2;++Ge)for(ce=0;ce<3;++ce)ot[Ge][ce]=Ce.clipBounds[Ge][ce];ot[0][De]=-1e8,ot[1][De]=1e8}return re.showSurface=ct,re.showContour=qt,re}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},Me=T.slice(),ke=[1,0,0,0,1,0,0,0,1];function ge(Ce,me){Ce=Ce||{};var De=this.gl;De.disable(De.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Ce.model||T,ce.view=Ce.view||T,ce.projection=Ce.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=E(ce.inverseModel,ce.model);for(var Ge=0;Ge<2;++Ge)for(var nt=ce.clipBounds[Ge],ct=0;ct<3;++ct)nt[ct]=Math.min(Math.max(this.clipBounds[Ge][ct],-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=ke,ce.vertexColor=this.vertexColor;var qt=Me;for(g(qt,ce.view,ce.model),g(qt,ce.projection,qt),E(qt,qt),Ge=0;Ge<3;++Ge)ce.eyePosition[Ge]=qt[12+Ge]/qt[15];var rt=qt[15];for(Ge=0;Ge<3;++Ge)rt+=this.lightPosition[Ge]*qt[4*Ge+3];for(Ge=0;Ge<3;++Ge){var ot=qt[12+Ge];for(ct=0;ct<3;++ct)ot+=qt[4*ct+Ge]*this.lightPosition[ct];ce.lightPosition[Ge]=ot/rt}var Dt=ae(ce,this);if(Dt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(De.TRIANGLES,this._vertexCount),Ge=0;Ge<3;++Ge)!this.surfaceProject[Ge]||!this.vertexCount||(this._shader.uniforms.model=Dt.projections[Ge],this._shader.uniforms.clipBounds=Dt.clipBounds[Ge],this._vao.draw(De.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Dt.showContour){var kt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,kt.bind(),kt.uniforms=ce;var Ct=this._contourVAO;for(Ct.bind(),Ge=0;Ge<3;++Ge)for(kt.uniforms.permutation=q[Ge],De.lineWidth(this.contourWidth[Ge]*this.pixelRatio),ct=0;ct>4)/16)/255,Ge=Math.floor(ce),nt=ce-Ge,ct=me[1]*(Ce.value[1]+(Ce.value[2]&15)/16)/255,qt=Math.floor(ct),rt=ct-qt;Ge+=1,qt+=1;var ot=De.position;ot[0]=ot[1]=ot[2]=0;for(var Dt=0;Dt<2;++Dt)for(var kt=Dt?nt:1-nt,Ct=0;Ct<2;++Ct)for(var Yt=Ct?rt:1-rt,xr=Ge+Dt,er=qt+Ct,Ke=kt*Yt,xt=0;xt<3;++xt)ot[xt]+=this._field[xt].get(xr,er)*Ke;for(var bt=this._pickResult.level,Lt=0;Lt<3;++Lt)if(bt[Lt]=k.le(this.contourLevels[Lt],ot[Lt]),bt[Lt]<0)this.contourLevels[Lt].length>0&&(bt[Lt]=0);else if(bt[Lt]Math.abs(Et-ot[Lt])&&(bt[Lt]+=1)}for(De.index[0]=nt<.5?Ge:Ge+1,De.index[1]=rt<.5?qt:qt+1,De.uv[0]=ce/me[0],De.uv[1]=ct/me[1],xt=0;xt<3;++xt)De.dataCoordinate[xt]=this._field[xt].get(De.index[0],De.index[1]);return De},G.padField=function(Ce,me){var De=me.shape.slice(),ce=Ce.shape.slice();d.assign(Ce.lo(1,1).hi(De[0],De[1]),me),d.assign(Ce.lo(1).hi(De[0],1),me.hi(De[0],1)),d.assign(Ce.lo(1,ce[1]-1).hi(De[0],1),me.lo(0,De[1]-1).hi(De[0],1)),d.assign(Ce.lo(0,1).hi(1,De[1]),me.hi(1)),d.assign(Ce.lo(ce[0]-1,1).hi(1,De[1]),me.lo(De[0]-1)),Ce.set(0,0,me.get(0,0)),Ce.set(0,ce[1]-1,me.get(0,De[1]-1)),Ce.set(ce[0]-1,0,me.get(De[0]-1,0)),Ce.set(ce[0]-1,ce[1]-1,me.get(De[0]-1,De[1]-1))};function Te(Ce,me){return Array.isArray(Ce)?[me(Ce[0]),me(Ce[1]),me(Ce[2])]:[me(Ce),me(Ce),me(Ce)]}function Ee(Ce){return Array.isArray(Ce)?Ce.length===3?[Ce[0],Ce[1],Ce[2],1]:[Ce[0],Ce[1],Ce[2],Ce[3]]:[0,0,0,1]}function Ae(Ce){if(Array.isArray(Ce)){if(Array.isArray(Ce))return[Ee(Ce[0]),Ee(Ce[1]),Ee(Ce[2])];var me=Ee(Ce);return[me.slice(),me.slice(),me.slice()]}}G.update=function(Ce){Ce=Ce||{},this.objectOffset=Ce.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Ce&&(this.contourWidth=Te(Ce.contourWidth,Number)),"showContour"in Ce&&(this.showContour=Te(Ce.showContour,Boolean)),"showSurface"in Ce&&(this.showSurface=!!Ce.showSurface),"contourTint"in Ce&&(this.contourTint=Te(Ce.contourTint,Boolean)),"contourColor"in Ce&&(this.contourColor=Ae(Ce.contourColor)),"contourProject"in Ce&&(this.contourProject=Te(Ce.contourProject,function(Gi){return Te(Gi,Boolean)})),"surfaceProject"in Ce&&(this.surfaceProject=Ce.surfaceProject),"dynamicColor"in Ce&&(this.dynamicColor=Ae(Ce.dynamicColor)),"dynamicTint"in Ce&&(this.dynamicTint=Te(Ce.dynamicTint,Number)),"dynamicWidth"in Ce&&(this.dynamicWidth=Te(Ce.dynamicWidth,Number)),"opacity"in Ce&&(this.opacity=Ce.opacity),"opacityscale"in Ce&&(this.opacityscale=Ce.opacityscale),"colorBounds"in Ce&&(this.colorBounds=Ce.colorBounds),"vertexColor"in Ce&&(this.vertexColor=Ce.vertexColor?1:0),"colormap"in Ce&&this._colorMap.setPixels(this.genColormap(Ce.colormap,this.opacityscale));var me=Ce.field||Ce.coords&&Ce.coords[2]||null,De=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Ce||"coords"in Ce){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=x(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var Ge=this.shape,nt=0;nt<2;++nt)this._field[2].size>this._field[nt].data.length&&(f.freeFloat(this._field[nt].data),this._field[nt].data=f.mallocFloat(this._field[2].size)),this._field[nt]=x(this._field[nt].data,[Ge[0]+2,Ge[1]+2]);if(Ce.coords){var ct=Ce.coords;if(!Array.isArray(ct)||ct.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(nt=0;nt<2;++nt){var qt=ct[nt];for(Ct=0;Ct<2;++Ct)if(qt.shape[Ct]!==Ge[Ct])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[nt],qt)}}else if(Ce.ticks){var rt=Ce.ticks;if(!Array.isArray(rt)||rt.length!==2)throw new Error("gl-surface: invalid ticks");for(nt=0;nt<2;++nt){var ot=rt[nt];if((Array.isArray(ot)||ot.length)&&(ot=x(ot)),ot.shape[0]!==Ge[nt])throw new Error("gl-surface: invalid tick length");var Dt=x(ot.data,Ge);Dt.stride[nt]=ot.stride[0],Dt.stride[nt^1]=0,this.padField(this._field[nt],Dt)}}else{for(nt=0;nt<2;++nt){var kt=[0,0];kt[nt]=1,this._field[nt]=x(this._field[nt].data,[Ge[0]+2,Ge[1]+2],kt,0)}this._field[0].set(0,0,0);for(var Ct=0;Ct0){for(var Mi=0;Mi<5;++Mi)ai.pop();Ve-=1}continue e}}}nn.push(Ve)}this._contourOffsets[jr]=bi,this._contourCounts[jr]=nn}var Pi=f.mallocFloat(ai.length);for(nt=0;ntV||F<0||F>V)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[T,F],P.bind(),q.texImage2D(q.TEXTURE_2D,0,P.format,T,F,0,P.format,P.type,null),P._mipLevels=[0],P}function g(P,T,F,q,V,H){this.gl=P,this.handle=T,this.format=V,this.type=H,this._shape=[F,q],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var X=this,G=[this._wrapS,this._wrapT];Object.defineProperties(G,[{get:function(){return X._wrapS},set:function(W){return X.wrapS=W}},{get:function(){return X._wrapT},set:function(W){return X.wrapT=W}}]),this._wrapVector=G;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return X._shape[0]},set:function(W){return X.width=W}},{get:function(){return X._shape[1]},set:function(W){return X.height=W}}]),this._shapeVector=N}var E=g.prototype;Object.defineProperties(E,{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 F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.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 F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.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}}}),E.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},E.dispose=function(){this.gl.deleteTexture(this.handle)},E.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)},E.setPixels=function(P,T,F,q){var V=this.gl;this.bind(),Array.isArray(T)?(q=F,F=T[1]|0,T=T[0]|0):(T=T||0,F=F||0),q=q||0;var H=v(P)?P:P.raw;if(H){var X=this._mipLevels.indexOf(q)<0;X?(V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,this.type,H),this._mipLevels.push(q)):V.texSubImage2D(V.TEXTURE_2D,q,T,F,this.format,this.type,H)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||T+P.shape[1]>this._shape[1]>>>q||F+P.shape[0]>this._shape[0]>>>q||T<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(V,T,F,q,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function k(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,F,q,V,H,X,G){var N=G.dtype,W=G.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,ae=0,_e=k(W,G.stride.slice());N==="float32"?re=P.FLOAT:N==="float64"?(re=P.FLOAT,_e=!1,N="float32"):N==="uint8"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N="uint8");var Me=1;if(W.length===2)ae=P.LUMINANCE,W=[W[0],W[1],1],G=s(G.data,W,[G.stride[0],G.stride[1],1],G.offset);else if(W.length===3){if(W[2]===1)ae=P.ALPHA;else if(W[2]===2)ae=P.LUMINANCE_ALPHA;else if(W[2]===3)ae=P.RGB;else if(W[2]===4)ae=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Me=W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ae===P.LUMINANCE||ae===P.ALPHA)&&(V===P.LUMINANCE||V===P.ALPHA)&&(ae=V),ae!==V)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ke=G.size,ge=X.indexOf(q)<0;if(ge&&X.push(q),re===H&&_e)G.offset===0&&G.data.length===ke?ge?P.texImage2D(P.TEXTURE_2D,q,V,W[0],W[1],0,V,H,G.data):P.texSubImage2D(P.TEXTURE_2D,q,T,F,W[0],W[1],V,H,G.data):ge?P.texImage2D(P.TEXTURE_2D,q,V,W[0],W[1],0,V,H,G.data.subarray(G.offset,G.offset+ke)):P.texSubImage2D(P.TEXTURE_2D,q,T,F,W[0],W[1],V,H,G.data.subarray(G.offset,G.offset+ke));else{var ie;H===P.FLOAT?ie=u.mallocFloat32(ke):ie=u.mallocUint8(ke);var Te=s(ie,W,[W[2],W[2]*W[0],1]);re===P.FLOAT&&H===P.UNSIGNED_BYTE?x(Te,G):l.assign(Te,G),ge?P.texImage2D(P.TEXTURE_2D,q,V,W[0],W[1],0,V,H,ie.subarray(0,ke)):P.texSubImage2D(P.TEXTURE_2D,q,T,F,W[0],W[1],V,H,ie.subarray(0,ke)),H===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 _(P,T,F,q,V){var H=P.getParameter(P.MAX_TEXTURE_SIZE);if(T<0||T>H||F<0||F>H)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 X=L(P);return P.texImage2D(P.TEXTURE_2D,0,q,T,F,0,q,V,null),new g(P,X,T,F,q,V)}function C(P,T,F,q,V,H){var X=L(P);return P.texImage2D(P.TEXTURE_2D,0,V,V,H,T),new g(P,X,F,q,V,H)}function M(P,T){var F=T.dtype,q=T.shape.slice(),V=P.getParameter(P.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>V||q[1]<0||q[1]>V)throw new Error("gl-texture2d: Invalid texture size");var H=k(q,T.stride.slice()),X=0;F==="float32"?X=P.FLOAT:F==="float64"?(X=P.FLOAT,H=!1,F="float32"):F==="uint8"?X=P.UNSIGNED_BYTE:(X=P.UNSIGNED_BYTE,H=!1,F="uint8");var G=0;if(q.length===2)G=P.LUMINANCE,q=[q[0],q[1],1],T=s(T.data,q,[T.stride[0],T.stride[1],1],T.offset);else if(q.length===3)if(q[2]===1)G=P.ALPHA;else if(q[2]===2)G=P.LUMINANCE_ALPHA;else if(q[2]===3)G=P.RGB;else if(q[2]===4)G=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");X===P.FLOAT&&!P.getExtension("OES_texture_float")&&(X=P.UNSIGNED_BYTE,H=!1);var N,W,re=T.size;if(H)T.offset===0&&T.data.length===re?N=T.data:N=T.data.subarray(T.offset,T.offset+re);else{var ae=[q[2],q[2]*q[0],1];W=u.malloc(re,F);var _e=s(W,q,ae,0);(F==="float32"||F==="float64")&&X===P.UNSIGNED_BYTE?x(_e,T):l.assign(_e,T),N=W.subarray(0,re)}var Me=L(P);return P.texImage2D(P.TEXTURE_2D,0,G,q[0],q[1],0,G,X,N),H||u.free(W),new g(P,Me,q[0],q[1],G,X)}function p(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return _(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(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],F=v(T)?T:T.raw;if(F)return C(P,F,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")}},1433:function(i){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(x)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],x=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-x)<=s*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=l;var s=o(1091)();function l(u,c,f,h,d,v){var x,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,x=f;x0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=s[0],o[1]=c+h*x-d*v,o[2]=f+h*v+d*x,o}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=c+d*v+h*x,o[1]=s[1],o[2]=f+d*x-h*v,o}},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=c+h*x-d*v,o[1]=f+h*v+d*x,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],x=l[3],b=x*u+d*f-v*c,g=x*c+v*u-h*f,E=x*f+h*c-d*u,k=-h*u-d*c-v*f;return o[0]=b*x+k*-h+g*-v-E*-d,o[1]=g*x+k*-d+E*-h-b*-v,o[2]=E*x+k*-v+b*-d-g*-h,o}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],x=l[3],b=x*u+d*f-v*c,g=x*c+v*u-h*f,E=x*f+h*c-d*u,k=-h*u-d*c-v*f;return o[0]=b*x+k*-h+g*-v-E*-d,o[1]=g*x+k*-d+E*-h-b*-v,o[2]=E*x+k*-v+b*-d-g*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;hCe&&De>0){var ce=(me[De][0]-Ce)/(me[De][0]-me[De-1][0]);return me[De][1]*(1-ce)+ce*me[De-1][1]}}return 1}var W=[0,0,0],re={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 ae(Ce,me){var De,ce,Ge,nt=me.axes&&me.axes.lastCubeProps.axis||W,ct=me.showSurface,qt=me.showContour;for(De=0;De<3;++De)for(ct=ct||me.surfaceProject[De],ce=0;ce<3;++ce)qt=qt||me.contourProject[De][ce];for(De=0;De<3;++De){var rt=re.projections[De];for(ce=0;ce<16;++ce)rt[ce]=0;for(ce=0;ce<4;++ce)rt[5*ce]=1;rt[5*De]=0,rt[12+De]=me.axesBounds[+(nt[De]>0)][De],g(rt,Ce.model,rt);var ot=re.clipBounds[De];for(Ge=0;Ge<2;++Ge)for(ce=0;ce<3;++ce)ot[Ge][ce]=Ce.clipBounds[Ge][ce];ot[0][De]=-1e8,ot[1][De]=1e8}return re.showSurface=ct,re.showContour=qt,re}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},Me=T.slice(),ke=[1,0,0,0,1,0,0,0,1];function ge(Ce,me){Ce=Ce||{};var De=this.gl;De.disable(De.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Ce.model||T,ce.view=Ce.view||T,ce.projection=Ce.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=E(ce.inverseModel,ce.model);for(var Ge=0;Ge<2;++Ge)for(var nt=ce.clipBounds[Ge],ct=0;ct<3;++ct)nt[ct]=Math.min(Math.max(this.clipBounds[Ge][ct],-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=ke,ce.vertexColor=this.vertexColor;var qt=Me;for(g(qt,ce.view,ce.model),g(qt,ce.projection,qt),E(qt,qt),Ge=0;Ge<3;++Ge)ce.eyePosition[Ge]=qt[12+Ge]/qt[15];var rt=qt[15];for(Ge=0;Ge<3;++Ge)rt+=this.lightPosition[Ge]*qt[4*Ge+3];for(Ge=0;Ge<3;++Ge){var ot=qt[12+Ge];for(ct=0;ct<3;++ct)ot+=qt[4*ct+Ge]*this.lightPosition[ct];ce.lightPosition[Ge]=ot/rt}var Dt=ae(ce,this);if(Dt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(De.TRIANGLES,this._vertexCount),Ge=0;Ge<3;++Ge)!this.surfaceProject[Ge]||!this.vertexCount||(this._shader.uniforms.model=Dt.projections[Ge],this._shader.uniforms.clipBounds=Dt.clipBounds[Ge],this._vao.draw(De.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Dt.showContour){var kt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,kt.bind(),kt.uniforms=ce;var Ct=this._contourVAO;for(Ct.bind(),Ge=0;Ge<3;++Ge)for(kt.uniforms.permutation=q[Ge],De.lineWidth(this.contourWidth[Ge]*this.pixelRatio),ct=0;ct>4)/16)/255,Ge=Math.floor(ce),nt=ce-Ge,ct=me[1]*(Ce.value[1]+(Ce.value[2]&15)/16)/255,qt=Math.floor(ct),rt=ct-qt;Ge+=1,qt+=1;var ot=De.position;ot[0]=ot[1]=ot[2]=0;for(var Dt=0;Dt<2;++Dt)for(var kt=Dt?nt:1-nt,Ct=0;Ct<2;++Ct)for(var Yt=Ct?rt:1-rt,xr=Ge+Dt,er=qt+Ct,Ke=kt*Yt,xt=0;xt<3;++xt)ot[xt]+=this._field[xt].get(xr,er)*Ke;for(var bt=this._pickResult.level,Lt=0;Lt<3;++Lt)if(bt[Lt]=k.le(this.contourLevels[Lt],ot[Lt]),bt[Lt]<0)this.contourLevels[Lt].length>0&&(bt[Lt]=0);else if(bt[Lt]Math.abs(Et-ot[Lt])&&(bt[Lt]+=1)}for(De.index[0]=nt<.5?Ge:Ge+1,De.index[1]=rt<.5?qt:qt+1,De.uv[0]=ce/me[0],De.uv[1]=ct/me[1],xt=0;xt<3;++xt)De.dataCoordinate[xt]=this._field[xt].get(De.index[0],De.index[1]);return De},G.padField=function(Ce,me){var De=me.shape.slice(),ce=Ce.shape.slice();d.assign(Ce.lo(1,1).hi(De[0],De[1]),me),d.assign(Ce.lo(1).hi(De[0],1),me.hi(De[0],1)),d.assign(Ce.lo(1,ce[1]-1).hi(De[0],1),me.lo(0,De[1]-1).hi(De[0],1)),d.assign(Ce.lo(0,1).hi(1,De[1]),me.hi(1)),d.assign(Ce.lo(ce[0]-1,1).hi(1,De[1]),me.lo(De[0]-1)),Ce.set(0,0,me.get(0,0)),Ce.set(0,ce[1]-1,me.get(0,De[1]-1)),Ce.set(ce[0]-1,0,me.get(De[0]-1,0)),Ce.set(ce[0]-1,ce[1]-1,me.get(De[0]-1,De[1]-1))};function Te(Ce,me){return Array.isArray(Ce)?[me(Ce[0]),me(Ce[1]),me(Ce[2])]:[me(Ce),me(Ce),me(Ce)]}function Ee(Ce){return Array.isArray(Ce)?Ce.length===3?[Ce[0],Ce[1],Ce[2],1]:[Ce[0],Ce[1],Ce[2],Ce[3]]:[0,0,0,1]}function Ae(Ce){if(Array.isArray(Ce)){if(Array.isArray(Ce))return[Ee(Ce[0]),Ee(Ce[1]),Ee(Ce[2])];var me=Ee(Ce);return[me.slice(),me.slice(),me.slice()]}}G.update=function(Ce){Ce=Ce||{},this.objectOffset=Ce.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Ce&&(this.contourWidth=Te(Ce.contourWidth,Number)),"showContour"in Ce&&(this.showContour=Te(Ce.showContour,Boolean)),"showSurface"in Ce&&(this.showSurface=!!Ce.showSurface),"contourTint"in Ce&&(this.contourTint=Te(Ce.contourTint,Boolean)),"contourColor"in Ce&&(this.contourColor=Ae(Ce.contourColor)),"contourProject"in Ce&&(this.contourProject=Te(Ce.contourProject,function(Gi){return Te(Gi,Boolean)})),"surfaceProject"in Ce&&(this.surfaceProject=Ce.surfaceProject),"dynamicColor"in Ce&&(this.dynamicColor=Ae(Ce.dynamicColor)),"dynamicTint"in Ce&&(this.dynamicTint=Te(Ce.dynamicTint,Number)),"dynamicWidth"in Ce&&(this.dynamicWidth=Te(Ce.dynamicWidth,Number)),"opacity"in Ce&&(this.opacity=Ce.opacity),"opacityscale"in Ce&&(this.opacityscale=Ce.opacityscale),"colorBounds"in Ce&&(this.colorBounds=Ce.colorBounds),"vertexColor"in Ce&&(this.vertexColor=Ce.vertexColor?1:0),"colormap"in Ce&&this._colorMap.setPixels(this.genColormap(Ce.colormap,this.opacityscale));var me=Ce.field||Ce.coords&&Ce.coords[2]||null,De=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Ce||"coords"in Ce){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=x(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var Ge=this.shape,nt=0;nt<2;++nt)this._field[2].size>this._field[nt].data.length&&(f.freeFloat(this._field[nt].data),this._field[nt].data=f.mallocFloat(this._field[2].size)),this._field[nt]=x(this._field[nt].data,[Ge[0]+2,Ge[1]+2]);if(Ce.coords){var ct=Ce.coords;if(!Array.isArray(ct)||ct.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(nt=0;nt<2;++nt){var qt=ct[nt];for(Ct=0;Ct<2;++Ct)if(qt.shape[Ct]!==Ge[Ct])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[nt],qt)}}else if(Ce.ticks){var rt=Ce.ticks;if(!Array.isArray(rt)||rt.length!==2)throw new Error("gl-surface: invalid ticks");for(nt=0;nt<2;++nt){var ot=rt[nt];if((Array.isArray(ot)||ot.length)&&(ot=x(ot)),ot.shape[0]!==Ge[nt])throw new Error("gl-surface: invalid tick length");var Dt=x(ot.data,Ge);Dt.stride[nt]=ot.stride[0],Dt.stride[nt^1]=0,this.padField(this._field[nt],Dt)}}else{for(nt=0;nt<2;++nt){var kt=[0,0];kt[nt]=1,this._field[nt]=x(this._field[nt].data,[Ge[0]+2,Ge[1]+2],kt,0)}this._field[0].set(0,0,0);for(var Ct=0;Ct0){for(var Mi=0;Mi<5;++Mi)ai.pop();Ve-=1}continue e}}}nn.push(Ve)}this._contourOffsets[jr]=bi,this._contourCounts[jr]=nn}var Pi=f.mallocFloat(ai.length);for(nt=0;ntV||F<0||F>V)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[T,F],P.bind(),q.texImage2D(q.TEXTURE_2D,0,P.format,T,F,0,P.format,P.type,null),P._mipLevels=[0],P}function g(P,T,F,q,V,H){this.gl=P,this.handle=T,this.format=V,this.type=H,this._shape=[F,q],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var X=this,G=[this._wrapS,this._wrapT];Object.defineProperties(G,[{get:function(){return X._wrapS},set:function(W){return X.wrapS=W}},{get:function(){return X._wrapT},set:function(W){return X.wrapT=W}}]),this._wrapVector=G;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return X._shape[0]},set:function(W){return X.width=W}},{get:function(){return X._shape[1]},set:function(W){return X.height=W}}]),this._shapeVector=N}var E=g.prototype;Object.defineProperties(E,{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 F=this.gl.getExtension("EXT_texture_filter_anisotropic");F&&this.gl.texParameterf(this.gl.TEXTURE_2D,F.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 F=this.gl;return this.bind(),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,this._wrapS),F.texParameteri(F.TEXTURE_2D,F.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}}}),E.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},E.dispose=function(){this.gl.deleteTexture(this.handle)},E.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)},E.setPixels=function(P,T,F,q){var V=this.gl;this.bind(),Array.isArray(T)?(q=F,F=T[1]|0,T=T[0]|0):(T=T||0,F=F||0),q=q||0;var H=v(P)?P:P.raw;if(H){var X=this._mipLevels.indexOf(q)<0;X?(V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,this.type,H),this._mipLevels.push(q)):V.texSubImage2D(V.TEXTURE_2D,q,T,F,this.format,this.type,H)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||T+P.shape[1]>this._shape[1]>>>q||F+P.shape[0]>this._shape[0]>>>q||T<0||F<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(V,T,F,q,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function k(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 A(P,T,F,q,V,H,X,G){var N=G.dtype,W=G.shape.slice();if(W.length<2||W.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,ae=0,_e=k(W,G.stride.slice());N==="float32"?re=P.FLOAT:N==="float64"?(re=P.FLOAT,_e=!1,N="float32"):N==="uint8"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N="uint8");var Me=1;if(W.length===2)ae=P.LUMINANCE,W=[W[0],W[1],1],G=s(G.data,W,[G.stride[0],G.stride[1],1],G.offset);else if(W.length===3){if(W[2]===1)ae=P.ALPHA;else if(W[2]===2)ae=P.LUMINANCE_ALPHA;else if(W[2]===3)ae=P.RGB;else if(W[2]===4)ae=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Me=W[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ae===P.LUMINANCE||ae===P.ALPHA)&&(V===P.LUMINANCE||V===P.ALPHA)&&(ae=V),ae!==V)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ke=G.size,ge=X.indexOf(q)<0;if(ge&&X.push(q),re===H&&_e)G.offset===0&&G.data.length===ke?ge?P.texImage2D(P.TEXTURE_2D,q,V,W[0],W[1],0,V,H,G.data):P.texSubImage2D(P.TEXTURE_2D,q,T,F,W[0],W[1],V,H,G.data):ge?P.texImage2D(P.TEXTURE_2D,q,V,W[0],W[1],0,V,H,G.data.subarray(G.offset,G.offset+ke)):P.texSubImage2D(P.TEXTURE_2D,q,T,F,W[0],W[1],V,H,G.data.subarray(G.offset,G.offset+ke));else{var ie;H===P.FLOAT?ie=u.mallocFloat32(ke):ie=u.mallocUint8(ke);var Te=s(ie,W,[W[2],W[2]*W[0],1]);re===P.FLOAT&&H===P.UNSIGNED_BYTE?x(Te,G):l.assign(Te,G),ge?P.texImage2D(P.TEXTURE_2D,q,V,W[0],W[1],0,V,H,ie.subarray(0,ke)):P.texSubImage2D(P.TEXTURE_2D,q,T,F,W[0],W[1],V,H,ie.subarray(0,ke)),H===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 _(P,T,F,q,V){var H=P.getParameter(P.MAX_TEXTURE_SIZE);if(T<0||T>H||F<0||F>H)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 X=L(P);return P.texImage2D(P.TEXTURE_2D,0,q,T,F,0,q,V,null),new g(P,X,T,F,q,V)}function C(P,T,F,q,V,H){var X=L(P);return P.texImage2D(P.TEXTURE_2D,0,V,V,H,T),new g(P,X,F,q,V,H)}function M(P,T){var F=T.dtype,q=T.shape.slice(),V=P.getParameter(P.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>V||q[1]<0||q[1]>V)throw new Error("gl-texture2d: Invalid texture size");var H=k(q,T.stride.slice()),X=0;F==="float32"?X=P.FLOAT:F==="float64"?(X=P.FLOAT,H=!1,F="float32"):F==="uint8"?X=P.UNSIGNED_BYTE:(X=P.UNSIGNED_BYTE,H=!1,F="uint8");var G=0;if(q.length===2)G=P.LUMINANCE,q=[q[0],q[1],1],T=s(T.data,q,[T.stride[0],T.stride[1],1],T.offset);else if(q.length===3)if(q[2]===1)G=P.ALPHA;else if(q[2]===2)G=P.LUMINANCE_ALPHA;else if(q[2]===3)G=P.RGB;else if(q[2]===4)G=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");X===P.FLOAT&&!P.getExtension("OES_texture_float")&&(X=P.UNSIGNED_BYTE,H=!1);var N,W,re=T.size;if(H)T.offset===0&&T.data.length===re?N=T.data:N=T.data.subarray(T.offset,T.offset+re);else{var ae=[q[2],q[2]*q[0],1];W=u.malloc(re,F);var _e=s(W,q,ae,0);(F==="float32"||F==="float64")&&X===P.UNSIGNED_BYTE?x(_e,T):l.assign(_e,T),N=W.subarray(0,re)}var Me=L(P);return P.texImage2D(P.TEXTURE_2D,0,G,q[0],q[1],0,G,X,N),H||u.free(W),new g(P,Me,q[0],q[1],G,X)}function p(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return _(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(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],F=v(T)?T:T.raw;if(F)return C(P,F,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")}},1433:function(i){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(x)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],x=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-x)<=s*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=l;var s=o(1091)();function l(u,c,f,h,d,v){var x,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,x=f;x0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=s[0],o[1]=c+h*x-d*v,o[2]=f+h*v+d*x,o}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=c+d*v+h*x,o[1]=s[1],o[2]=f+d*x-h*v,o}},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),x=Math.cos(u);return o[0]=c+h*x-d*v,o[1]=f+h*v+d*x,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],x=l[3],b=x*u+d*f-v*c,g=x*c+v*u-h*f,E=x*f+h*c-d*u,k=-h*u-d*c-v*f;return o[0]=b*x+k*-h+g*-v-E*-d,o[1]=g*x+k*-d+E*-h-b*-v,o[2]=E*x+k*-v+b*-d-g*-h,o}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],x=l[3],b=x*u+d*f-v*c,g=x*c+v*u-h*f,E=x*f+h*c-d*u,k=-h*u-d*c-v*f;return o[0]=b*x+k*-h+g*-v-E*-d,o[1]=g*x+k*-d+E*-h-b*-v,o[2]=E*x+k*-v+b*-d-g*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h0)continue;Lt=Ke.slice(0,1).join("")}return De(Lt),ke+=Lt.length,N=N.slice(Lt.length),N.length}while(!0)}function Ct(){return/[^a-fA-F0-9]/.test(X)?(De(N.join("")),H=h,q):(N.push(X),G=X,q+1)}function Yt(){return X==="."||/[eE]/.test(X)?(N.push(X),H=k,G=X,q+1):X==="x"&&N.length===1&&N[0]==="0"?(H=p,N.push(X),G=X,q+1):/[^\d]/.test(X)?(De(N.join("")),H=h,q):(N.push(X),G=X,q+1)}function xr(){return X==="f"&&(N.push(X),G=X,q+=1),/[eE]/.test(X)||(X==="-"||X==="+")&&/[eE]/.test(G)?(N.push(X),G=X,q+1):/[^\d]/.test(X)?(De(N.join("")),H=h,q):(N.push(X),G=X,q+1)}function er(){if(/[^\d\w_]/.test(X)){var Ke=N.join("");return me[Ke]?H=_:Ce[Ke]?H=L:H=S,De(N.join("")),H=h,q}return N.push(X),G=X,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(i){i.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,b=-7,g=l?c-1:0,E=l?-1:1,k=o[s+g];for(g+=E,f=k&(1<<-b)-1,k>>=-b,b+=d;b>0;f=f*256+o[s+g],g+=E,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+g],g+=E,b-=8);if(f===0)f=1-x;else{if(f===v)return h?NaN:(k?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-x}return(k?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,x=f*8-c-1,b=(1<>1,E=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=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+g>=1?s+=E/v:s+=E*Math.pow(2,1-g),s*v>=2&&(h++,v/=2),h+g>=b?(d=0,h=b):h+g>=1?(d=(s*v-1)*Math.pow(2,c),h=h+g):(d=s*Math.pow(2,g-1)*Math.pow(2,c),h=0));c>=8;o[l+k]=d&255,k+=S,d/=256,c-=8);for(h=h<0;o[l+k]=h&255,k+=S,h/=256,x-=8);o[l+k-S]|=L*128}},8954:function(i,a,o){"use strict";i.exports=g;var s=o(3250),l=o(6803).Fw;function u(E,k,S){this.vertices=E,this.adjacent=k,this.boundary=S,this.lastVisited=-1}u.prototype.flip=function(){var E=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=E;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function c(E,k,S){this.vertices=E,this.cell=k,this.index=S}function f(E,k){return l(E.vertices,k.vertices)}function h(E){return function(){var k=this.tuple;return E.apply(this,k)}}function d(E){var k=s[E+1];return k||(k=s),h(k)}var v=[];function x(E,k,S){this.dimension=E,this.vertices=k,this.simplices=S,this.interior=S.filter(function(C){return!C.boundary}),this.tuple=new Array(E+1);for(var L=0;L<=E;++L)this.tuple[L]=this.vertices[L];var _=v[E];_||(_=v[E]=d(E)),this.orient=_}var b=x.prototype;b.handleBoundaryDegeneracy=function(E,k){var S=this.dimension,L=this.vertices.length-1,_=this.tuple,C=this.vertices,M=[E];for(E.lastVisited=-L;M.length>0;){E=M.pop();for(var p=E.adjacent,P=0;P<=S;++P){var T=p[P];if(!(!T.boundary||T.lastVisited<=-L)){for(var F=T.vertices,q=0;q<=S;++q){var V=F[q];V<0?_[q]=k:_[q]=C[V]}var H=this.orient();if(H>0)return T;T.lastVisited=-L,H===0&&M.push(T)}}}return null},b.walk=function(E,k){var S=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=k?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[M];e:for(;!p.boundary;){for(var P=p.vertices,T=p.adjacent,F=0;F<=L;++F)C[F]=_[P[F]];p.lastVisited=S;for(var F=0;F<=L;++F){var q=T[F];if(!(q.lastVisited>=S)){var V=C[F];C[F]=E;var H=this.orient();if(C[F]=V,H<0){p=q;continue e}else q.boundary?q.lastVisited=-S:q.lastVisited=S}}return}return p},b.addPeaks=function(E,k){var S=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=this.interior,p=this.simplices,P=[k];k.lastVisited=S,k.vertices[k.vertices.indexOf(-1)]=S,k.boundary=!1,M.push(k);for(var T=[];P.length>0;){var k=P.pop(),F=k.vertices,q=k.adjacent,V=F.indexOf(S);if(!(V<0)){for(var H=0;H<=L;++H)if(H!==V){var X=q[H];if(!(!X.boundary||X.lastVisited>=S)){var G=X.vertices;if(X.lastVisited!==-S){for(var N=0,W=0;W<=L;++W)G[W]<0?(N=W,C[W]=E):C[W]=_[G[W]];var re=this.orient();if(re>0){G[N]=S,X.boundary=!1,M.push(X),P.push(X),X.lastVisited=S;continue}else X.lastVisited=-S}var ae=X.adjacent,_e=F.slice(),Me=q.slice(),ke=new u(_e,Me,!0);p.push(ke);var ge=ae.indexOf(k);if(!(ge<0)){ae[ge]=ke,Me[V]=X,_e[H]=-1,Me[H]=k,q[H]=ke,ke.flip();for(var W=0;W<=L;++W){var ie=_e[W];if(!(ie<0||ie===S)){for(var Te=new Array(L-1),Ee=0,Ae=0;Ae<=L;++Ae){var ze=_e[Ae];ze<0||Ae===W||(Te[Ee++]=ze)}T.push(new c(Te,ke,W))}}}}}}}T.sort(f);for(var H=0;H+1=0?M[P++]=p[F]:T=F&1;if(T===(E&1)){var q=M[0];M[0]=M[1],M[1]=q}k.push(M)}}return k};function g(E,k){var S=E.length;if(S===0)throw new Error("Must have at least d+1 points");var L=E[0].length;if(S<=L)throw new Error("Must input at least d+1 points");var _=E.slice(0,L+1),C=s.apply(void 0,_);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),p=0;p<=L;++p)M[p]=p;C<0&&(M[0]=1,M[1]=0);for(var P=new u(M,new Array(L+1),!1),T=P.adjacent,F=new Array(L+2),p=0;p<=L;++p){for(var q=M.slice(),V=0;V<=L;++V)V===p&&(q[V]=-1);var H=q[0];q[0]=q[1],q[1]=H;var X=new u(q,new Array(L+1),!0);T[p]=X,F[p]=X}F[L+1]=P;for(var p=0;p<=L;++p)for(var q=T[p].vertices,G=T[p].adjacent,V=0;V<=L;++V){var N=q[V];if(N<0){G[V]=P;continue}for(var W=0;W<=L;++W)T[W].vertices.indexOf(N)<0&&(G[V]=T[W])}for(var re=new x(L,_,F),ae=!!k,p=L+1;p3*(F+1)?x(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?x(this,T):this.right.insert(T):this.right=C([T]);else{var q=s.ge(this.leftPoints,T,L),V=s.ge(this.rightPoints,T,_);this.leftPoints.splice(q,0,T),this.rightPoints.splice(V,0,T)}},h.remove=function(T){var F=this.count-this.leftPoints;if(T[1]3*(F-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 H=this.left?this.left.count:0;if(4*H>3*(F-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 X=this,G=this.left;G.right;)X=G,G=G.right;if(X===this)G.right=this.right;else{var N=this.left,V=this.right;X.count-=G.count,X.right=G.left,G.left=N,G.right=V}d(this,G),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]>=F;--V){var H=q(T[V]);if(H)return H}}function k(T,F){for(var q=0;qthis.mid){if(this.right){var q=this.right.queryPoint(T,F);if(q)return q}return E(this.rightPoints,T,F)}else return k(this.leftPoints,F)},h.queryInterval=function(T,F,q){if(Tthis.mid&&this.right){var V=this.right.queryInterval(T,F,q);if(V)return V}return Fthis.mid?E(this.rightPoints,T,q):k(this.leftPoints,q)};function S(T,F){return T-F}function L(T,F){var q=T[0]-F[0];return q||T[1]-F[1]}function _(T,F){var q=T[1]-F[1];return q||T[0]-F[0]}function C(T){if(T.length===0)return null;for(var F=[],q=0;q>1],H=[],X=[],G=[],q=0;q13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),x=l(),b=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],E=[0,0,0];i.exports=function(C,M,p,P,T,F){if(M||(M=[0,0,0]),p||(p=[0,0,0]),P||(P=[0,0,0]),T||(T=[0,0,0,1]),F||(F=[0,0,0,1]),!s(v,C)||(u(x,v),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(c(x)<1e-8)))return!1;var q=v[3],V=v[7],H=v[11],X=v[12],G=v[13],N=v[14],W=v[15];if(q!==0||V!==0||H!==0){b[0]=q,b[1]=V,b[2]=H,b[3]=W;var re=f(x,x);if(!re)return!1;h(x,x),k(T,b,x)}else T[0]=T[1]=T[2]=0,T[3]=1;if(M[0]=X,M[1]=G,M[2]=N,S(g,v),p[0]=d.length(g[0]),d.normalize(g[0],g[0]),P[0]=d.dot(g[0],g[1]),L(g[1],g[1],g[0],1,-P[0]),p[1]=d.length(g[1]),d.normalize(g[1],g[1]),P[0]/=p[1],P[1]=d.dot(g[0],g[2]),L(g[2],g[2],g[0],1,-P[1]),P[2]=d.dot(g[1],g[2]),L(g[2],g[2],g[1],1,-P[2]),p[2]=d.length(g[2]),d.normalize(g[2],g[2]),P[1]/=p[2],P[2]/=p[2],d.cross(E,g[1],g[2]),d.dot(g[0],E)<0)for(var ae=0;ae<3;ae++)p[ae]*=-1,g[ae][0]*=-1,g[ae][1]*=-1,g[ae][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(F[0]=-F[0]),g[0][2]>g[2][0]&&(F[1]=-F[1]),g[1][0]>g[0][1]&&(F[2]=-F[2]),!0};function k(_,C,M){var p=C[0],P=C[1],T=C[2],F=C[3];return _[0]=M[0]*p+M[4]*P+M[8]*T+M[12]*F,_[1]=M[1]*p+M[5]*P+M[9]*T+M[13]*F,_[2]=M[2]*p+M[6]*P+M[10]*T+M[14]*F,_[3]=M[3]*p+M[7]*P+M[11]*T+M[15]*F,_}function S(_,C){_[0][0]=C[0],_[0][1]=C[1],_[0][2]=C[2],_[1][0]=C[4],_[1][1]=C[5],_[1][2]=C[6],_[2][0]=C[8],_[2][1]=C[9],_[2][2]=C[10]}function L(_,C,M,p,P){_[0]=C[0]*p+M[0]*P,_[1]=C[1]*p+M[1]*P,_[2]=C[2]*p+M[2]*P}},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=x;function x(k,S,L,_){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,_),s(v.skew,h.skew,d.skew,_),s(v.scale,h.scale,d.scale,_),s(v.perspective,h.perspective,d.perspective,_),f(v.quaternion,h.quaternion,d.quaternion,_),l(k,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:g(),scale:g(1),skew:g(),perspective:E(),quaternion:E()}}function g(k){return[k||0,k||0,k||0]}function E(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,x,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=x[0],f[7]=x[1],f[11]=x[2],f[15]=x[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811:function(i,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),x=o(2504),b=o(3536),g=[0,0,0];i.exports=L;function E(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var k=E.prototype;k.recalcMatrix=function(_){var C=this._time,M=s.le(C,_),p=this.computedMatrix;if(!(M<0)){var P=this._components;if(M===C.length-1)for(var T=16*M,F=0;F<16;++F)p[F]=P[T++];else{for(var q=C[M+1]-C[M],T=16*M,V=this.prevMatrix,H=!0,F=0;F<16;++F)V[F]=P[T++];for(var X=this.nextMatrix,F=0;F<16;++F)X[F]=P[T++],H=H&&V[F]===X[F];if(q<1e-6||H)for(var F=0;F<16;++F)p[F]=V[F];else l(p,V,X,(_-C[M])/q)}var G=this.computedUp;G[0]=p[1],G[1]=p[5],G[2]=p[9],b(G,G);var N=this.computedInverse;u(N,p);var W=this.computedEye,re=N[15];W[0]=N[12]/re,W[1]=N[13]/re,W[2]=N[14]/re;for(var ae=this.computedCenter,_e=Math.exp(this.computedRadius[0]),F=0;F<3;++F)ae[F]=W[F]-p[2+4*F]*_e}},k.idle=function(_){if(!(_1&&s(u[d[g-2]],u[d[g-1]],b)<=0;)g-=1,d.pop();for(d.push(x),g=v.length;g>1&&s(u[v[g-2]],u[v[g-1]],b)>=0;)g-=1,v.pop();v.push(x)}for(var E=new Array(v.length+d.length-2),k=0,f=0,S=d.length;f0;--L)E[k++]=v[L];return E}},351:function(i,a,o){"use strict";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function b(T){var F=!1;return"altKey"in T&&(F=F||T.altKey!==v.alt,v.alt=!!T.altKey),"shiftKey"in T&&(F=F||T.shiftKey!==v.shift,v.shift=!!T.shiftKey),"ctrlKey"in T&&(F=F||T.ctrlKey!==v.control,v.control=!!T.ctrlKey),"metaKey"in T&&(F=F||T.metaKey!==v.meta,v.meta=!!T.metaKey),F}function g(T,F){var q=s.x(F),V=s.y(F);"buttons"in F&&(T=F.buttons|0),(T!==f||q!==h||V!==d||b(F))&&(f=T|0,h=q||0,d=V||0,c&&c(f,h,d,v))}function E(T){g(0,T)}function k(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function S(T){b(T)&&c&&c(f,h,d,v)}function L(T){s.buttons(T)===0?g(0,T):g(f,T)}function _(T){g(f|s.buttons(T),T)}function C(T){g(f&~s.buttons(T),T)}function M(){x||(x=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",_),u.addEventListener("mouseup",C),u.addEventListener("mouseleave",E),u.addEventListener("mouseenter",E),u.addEventListener("mouseout",E),u.addEventListener("mouseover",E),u.addEventListener("blur",k),u.addEventListener("keyup",S),u.addEventListener("keydown",S),u.addEventListener("keypress",S),u!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",S),window.addEventListener("keydown",S),window.addEventListener("keypress",S)))}function p(){x&&(x=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",_),u.removeEventListener("mouseup",C),u.removeEventListener("mouseleave",E),u.removeEventListener("mouseenter",E),u.removeEventListener("mouseout",E),u.removeEventListener("mouseover",E),u.removeEventListener("blur",k),u.removeEventListener("keyup",S),u.removeEventListener("keydown",S),u.removeEventListener("keypress",S),u!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",S),window.removeEventListener("keydown",S),window.removeEventListener("keypress",S)))}M();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return x},set:function(T){T?M():p()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(Me=1,ie[Ee++]=v(M[F],k,S,L),F+=re,_>0)for(_e=1,q=M[F],Ae=ie[Ee]=v(q,k,S,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,S,L),rt=Te[Ee]=ke++),Ee+=1,F+=re,_e=2;_e<_;++_e)q=M[F],Ae=ie[Ee]=v(q,k,S,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,S,L),rt=Te[Ee]=ke++,qt!==me&&d(Te[Ee+ze],rt,W,H,qt,me,k,S,L)),Ee+=1,F+=re;for(F+=ae,Ee=0,ot=ze,ze=Ce,Ce=ot,ot=De,De=ce,ce=ot,ot=nt,nt=ct,ct=ot,Me=2;Me0)for(_e=1,q=M[F],Ae=ie[Ee]=v(q,k,S,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,S,L),rt=Te[Ee]=ke++,qt!==Ge&&d(Te[Ee+De],rt,G,W,Ge,qt,k,S,L)),Ee+=1,F+=re,_e=2;_e<_;++_e)q=M[F],Ae=ie[Ee]=v(q,k,S,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,S,L),rt=Te[Ee]=ke++,qt!==Ge&&d(Te[Ee+De],rt,G,W,Ge,qt,k,S,L),qt!==me&&d(Te[Ee+ze],rt,W,H,qt,me,k,S,L)),Ee+=1,F+=re;Me&1&&(Ee=0),ot=ze,ze=Ce,Ce=ot,ot=De,De=ce,ce=ot,ot=nt,nt=ct,ct=ot,F+=ae}}b(Te),b(ie)}},"false,1,0":function(h,d,v,x,b){return function(E,k,S,L){var _=E.shape[0]|0,C=E.shape[1]|0,M=E.data,p=E.offset|0,P=E.stride[0]|0,T=E.stride[1]|0,F=p,q,V=-P|0,H=0,X=-T|0,G=0,N=-P-T|0,W=0,re=T|0,ae=P-T*C|0,_e=0,Me=0,ke=0,ge=2*C|0,ie=x(ge),Te=x(ge),Ee=0,Ae=0,ze=-1,Ce=-1,me=0,De=-C|0,ce=C|0,Ge=0,nt=-C-1|0,ct=C-1|0,qt=0,rt=0,ot=0;for(Me=0;Me0){if(_e=1,ie[Ee++]=v(M[F],k,S,L),F+=re,C>0)for(Me=1,q=M[F],Ae=ie[Ee]=v(q,k,S,L),Ge=ie[Ee+De],me=ie[Ee+ze],qt=ie[Ee+nt],(Ae!==Ge||Ae!==me||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,Ge,me,qt,k,S,L),rt=Te[Ee]=ke++),Ee+=1,F+=re,Me=2;Me0)for(Me=1,q=M[F],Ae=ie[Ee]=v(q,k,S,L),Ge=ie[Ee+De],me=ie[Ee+ze],qt=ie[Ee+nt],(Ae!==Ge||Ae!==me||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,Ge,me,qt,k,S,L),rt=Te[Ee]=ke++,qt!==Ge&&d(Te[Ee+De],rt,W,H,qt,Ge,k,S,L)),Ee+=1,F+=re,Me=2;Me 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||[],g=new Array(v),E=0;E=0?g[E]=!0:g[E]=!1;return u(f.vertex,f.cell,f.phase,x,d,g)}},6199:function(i,a,o){"use strict";var s=o(1338),l={zero:function(L,_,C,M){var p=L[0],P=C[0];M|=0;var T=0,F=P;for(T=0;T2&&T[1]>2&&M(P.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),p.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),p.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),p.pick(0,-1,1).lo(1).hi(T[1]-2)),_(p.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),p.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),_(p.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),p.pick(-1,0,0).lo(1).hi(T[0]-2)),_(p.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),p.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),_(p.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),p.set(0,0,0,0),p.set(0,0,1,0),p.set(T[0]-1,0,0,0),p.set(T[0]-1,0,1,0),p.set(0,T[1]-1,0,0),p.set(0,T[1]-1,1,0),p.set(T[0]-1,T[1]-1,0,0),p.set(T[0]-1,T[1]-1,1,0),p}}function S(L){var _=L.join(),T=v[_];if(T)return T;for(var C=L.length,M=[b,g],p=1;p<=C;++p)M.push(E(p));var P=k,T=P.apply(void 0,M);return v[_]=T,T}i.exports=function(_,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return _;if(C.dimension===0)return _.set(0),_;var p=S(M);return p(_,C)}},4317:function(i){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h0;){G<64?(_=G,G=0):(_=64,G-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),g=H+G*p+N*P,S=X+G*F+N*q;var W=0,re=0,ae=0,_e=T,Me=p-M*T,ke=P-_*p,ge=V,ie=F-M*V,Te=q-_*F;for(ae=0;ae0;){q<64?(_=q,q=0):(_=64,q-=64);for(var V=v[0]|0;V>0;){V<64?(L=V,V=0):(L=64,V-=64),g=T+q*M+V*C,S=F+q*P+V*p;var H=0,X=0,G=M,N=C-_*M,W=P,re=p-_*P;for(X=0;X0;){X<64?(C=X,X=0):(C=64,X-=64);for(var G=v[0]|0;G>0;){G<64?(L=G,G=0):(L=64,G-=64);for(var N=v[1]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),g=V+X*P+G*M+N*p,S=H+X*q+G*T+N*F;var W=0,re=0,ae=0,_e=P,Me=M-C*P,ke=p-L*M,ge=q,ie=T-C*q,Te=F-L*T;for(ae=0;ae<_;++ae){for(re=0;reE;){W=0,re=H-_;t:for(G=0;G_e)break t;re+=T,W+=F}for(W=H,re=H-_,G=0;G>1,N=G-V,W=G+V,re=H,ae=N,_e=G,Me=W,ke=X,ge=k+1,ie=S-1,Te=!0,Ee,Ae,ze,Ce,me,De,ce,Ge,nt,ct=0,qt=0,rt=0,ot,Dt,kt,Ct,Yt,xr,er,Ke,xt,bt,Lt,St,Et,dt,Ht,$t,fr=P,_r=b(fr),Br=b(fr);Dt=C*re,kt=C*ae,$t=_;e:for(ot=0;ot0){Ae=re,re=ae,ae=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*Me,kt=C*ke,$t=_;e:for(ot=0;ot0){Ae=Me,Me=ke,ke=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*re,kt=C*_e,$t=_;e:for(ot=0;ot0){Ae=re,re=_e,_e=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*ae,kt=C*_e,$t=_;e:for(ot=0;ot0){Ae=ae,ae=_e,_e=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*re,kt=C*Me,$t=_;e:for(ot=0;ot0){Ae=re,re=Me,Me=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*_e,kt=C*Me,$t=_;e:for(ot=0;ot0){Ae=_e,_e=Me,Me=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*ae,kt=C*ke,$t=_;e:for(ot=0;ot0){Ae=ae,ae=ke,ke=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*ae,kt=C*_e,$t=_;e:for(ot=0;ot0){Ae=ae,ae=_e,_e=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*Me,kt=C*ke,$t=_;e:for(ot=0;ot0){Ae=Me,Me=ke,ke=Ae;break e}if(rt<0)break e;$t+=F}for(Dt=C*re,kt=C*ae,Ct=C*_e,Yt=C*Me,xr=C*ke,er=C*H,Ke=C*G,xt=C*X,Ht=0,$t=_,ot=0;ot0)ie--;else if(rt<0){for(Dt=C*De,kt=C*ge,Ct=C*ie,$t=_,ot=0;ot0)for(;;){ce=_+ie*C,Ht=0;e:for(ot=0;ot0){if(--ieX){e:for(;;){for(ce=_+ge*C,Ht=0,$t=_,ot=0;ot1&&E?S(g,E[0],E[1]):S(g)}var d={"uint32,1,0":function(x,b){return function(g){var E=g.data,k=g.offset|0,S=g.shape,L=g.stride,_=L[0]|0,C=S[0]|0,M=L[1]|0,p=S[1]|0,P=M,T=M,F=1;C<=32?x(0,C-1,E,k,_,M,C,p,P,T,F):b(0,C-1,E,k,_,M,C,p,P,T,F)}}};function v(x,b){var g=[b,x].join(","),E=d[g],k=c(x,b),S=h(x,b,k);return E(k,S)}i.exports=v},446:function(i,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(":"),x=l[v];return x||(l[v]=x=s(f,h)),x(c),c}i.exports=u},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(b,g){return b[0]-g[0]}function c(){var b=this.stride,g=new Array(b.length),E;for(E=0;E=0&&(M=_|0,C+=P*M,p-=M),new k(this.data,p,P,C)},S.step=function(_){var C=this.shape[0],M=this.stride[0],p=this.offset,P=0,T=Math.ceil;return typeof _=="number"&&(P=_|0,P<0?(p+=M*(C-1),C=T(-C/P)):C=T(C/P),M*=P),new k(this.data,C,M,p)},S.transpose=function(_){_=_===void 0?0:_|0;var C=this.shape,M=this.stride;return new k(this.data,C[_],M[_],this.offset)},S.pick=function(_){var C=[],M=[],p=this.offset;typeof _=="number"&&_>=0?p=p+this.stride[0]*_|0:(C.push(this.shape[0]),M.push(this.stride[0]));var P=g[C.length+1];return P(this.data,C,M,p)},function(_,C,M,p){return new k(_,C[0],M[0],p)}},2:function(b,g,E){function k(L,_,C,M,p,P){this.data=L,this.shape=[_,C],this.stride=[M,p],this.offset=P|0}var S=k.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(_,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]=M},S.get=function(_,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]},S.index=function(_,C){return this.offset+this.stride[0]*_+this.stride[1]*C},S.hi=function(_,C){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(_,C){var M=this.offset,p=0,P=this.shape[0],T=this.shape[1],F=this.stride[0],q=this.stride[1];return typeof _=="number"&&_>=0&&(p=_|0,M+=F*p,P-=p),typeof C=="number"&&C>=0&&(p=C|0,M+=q*p,T-=p),new k(this.data,P,T,F,q,M)},S.step=function(_,C){var M=this.shape[0],p=this.shape[1],P=this.stride[0],T=this.stride[1],F=this.offset,q=0,V=Math.ceil;return typeof _=="number"&&(q=_|0,q<0?(F+=P*(M-1),M=V(-M/q)):M=V(M/q),P*=q),typeof C=="number"&&(q=C|0,q<0?(F+=T*(p-1),p=V(-p/q)):p=V(p/q),T*=q),new k(this.data,M,p,P,T,F)},S.transpose=function(_,C){_=_===void 0?0:_|0,C=C===void 0?1:C|0;var M=this.shape,p=this.stride;return new k(this.data,M[_],M[C],p[_],p[C],this.offset)},S.pick=function(_,C){var M=[],p=[],P=this.offset;typeof _=="number"&&_>=0?P=P+this.stride[0]*_|0:(M.push(this.shape[0]),p.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(M.push(this.shape[1]),p.push(this.stride[1]));var T=g[M.length+1];return T(this.data,M,p,P)},function(_,C,M,p){return new k(_,C[0],C[1],M[0],M[1],p)}},3:function(b,g,E){function k(L,_,C,M,p,P,T,F){this.data=L,this.shape=[_,C,M],this.stride=[p,P,T],this.offset=F|0}var S=k.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 _=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return _>C?C>M?[2,1,0]:_>M?[1,2,0]:[1,0,2]:_>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),S.set=function(_,C,M,p){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M,p):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]=p},S.get=function(_,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]},S.index=function(_,C,M){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M},S.hi=function(_,C,M){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|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(_,C,M){var p=this.offset,P=0,T=this.shape[0],F=this.shape[1],q=this.shape[2],V=this.stride[0],H=this.stride[1],X=this.stride[2];return typeof _=="number"&&_>=0&&(P=_|0,p+=V*P,T-=P),typeof C=="number"&&C>=0&&(P=C|0,p+=H*P,F-=P),typeof M=="number"&&M>=0&&(P=M|0,p+=X*P,q-=P),new k(this.data,T,F,q,V,H,X,p)},S.step=function(_,C,M){var p=this.shape[0],P=this.shape[1],T=this.shape[2],F=this.stride[0],q=this.stride[1],V=this.stride[2],H=this.offset,X=0,G=Math.ceil;return typeof _=="number"&&(X=_|0,X<0?(H+=F*(p-1),p=G(-p/X)):p=G(p/X),F*=X),typeof C=="number"&&(X=C|0,X<0?(H+=q*(P-1),P=G(-P/X)):P=G(P/X),q*=X),typeof M=="number"&&(X=M|0,X<0?(H+=V*(T-1),T=G(-T/X)):T=G(T/X),V*=X),new k(this.data,p,P,T,F,q,V,H)},S.transpose=function(_,C,M){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var p=this.shape,P=this.stride;return new k(this.data,p[_],p[C],p[M],P[_],P[C],P[M],this.offset)},S.pick=function(_,C,M){var p=[],P=[],T=this.offset;typeof _=="number"&&_>=0?T=T+this.stride[0]*_|0:(p.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(p.push(this.shape[1]),P.push(this.stride[1])),typeof M=="number"&&M>=0?T=T+this.stride[2]*M|0:(p.push(this.shape[2]),P.push(this.stride[2]));var F=g[p.length+1];return F(this.data,p,P,T)},function(_,C,M,p){return new k(_,C[0],C[1],C[2],M[0],M[1],M[2],p)}},4:function(b,g,E){function k(L,_,C,M,p,P,T,F,q,V){this.data=L,this.shape=[_,C,M,p],this.stride=[P,T,F,q],this.offset=V|0}var S=k.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:E}),S.set=function(_,C,M,p,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p,P):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p]=P},S.get=function(_,C,M,p){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p]},S.index=function(_,C,M,p){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p},S.hi=function(_,C,M,p){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof p!="number"||p<0?this.shape[3]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(_,C,M,p){var P=this.offset,T=0,F=this.shape[0],q=this.shape[1],V=this.shape[2],H=this.shape[3],X=this.stride[0],G=this.stride[1],N=this.stride[2],W=this.stride[3];return typeof _=="number"&&_>=0&&(T=_|0,P+=X*T,F-=T),typeof C=="number"&&C>=0&&(T=C|0,P+=G*T,q-=T),typeof M=="number"&&M>=0&&(T=M|0,P+=N*T,V-=T),typeof p=="number"&&p>=0&&(T=p|0,P+=W*T,H-=T),new k(this.data,F,q,V,H,X,G,N,W,P)},S.step=function(_,C,M,p){var P=this.shape[0],T=this.shape[1],F=this.shape[2],q=this.shape[3],V=this.stride[0],H=this.stride[1],X=this.stride[2],G=this.stride[3],N=this.offset,W=0,re=Math.ceil;return typeof _=="number"&&(W=_|0,W<0?(N+=V*(P-1),P=re(-P/W)):P=re(P/W),V*=W),typeof C=="number"&&(W=C|0,W<0?(N+=H*(T-1),T=re(-T/W)):T=re(T/W),H*=W),typeof M=="number"&&(W=M|0,W<0?(N+=X*(F-1),F=re(-F/W)):F=re(F/W),X*=W),typeof p=="number"&&(W=p|0,W<0?(N+=G*(q-1),q=re(-q/W)):q=re(q/W),G*=W),new k(this.data,P,T,F,q,V,H,X,G,N)},S.transpose=function(_,C,M,p){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,p=p===void 0?3:p|0;var P=this.shape,T=this.stride;return new k(this.data,P[_],P[C],P[M],P[p],T[_],T[C],T[M],T[p],this.offset)},S.pick=function(_,C,M,p){var P=[],T=[],F=this.offset;typeof _=="number"&&_>=0?F=F+this.stride[0]*_|0:(P.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?F=F+this.stride[1]*C|0:(P.push(this.shape[1]),T.push(this.stride[1])),typeof M=="number"&&M>=0?F=F+this.stride[2]*M|0:(P.push(this.shape[2]),T.push(this.stride[2])),typeof p=="number"&&p>=0?F=F+this.stride[3]*p|0:(P.push(this.shape[3]),T.push(this.stride[3]));var q=g[P.length+1];return q(this.data,P,T,F)},function(_,C,M,p){return new k(_,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],p)}},5:function(g,E,k){function S(_,C,M,p,P,T,F,q,V,H,X,G){this.data=_,this.shape=[C,M,p,P,T],this.stride=[F,q,V,H,X],this.offset=G|0}var L=S.prototype;return L.dtype=g,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:k}),L.set=function(C,M,p,P,T,F){return g==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T,F):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T]=F},L.get=function(C,M,p,P,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T]},L.index=function(C,M,p,P,T){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T},L.hi=function(C,M,p,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 p!="number"||p<0?this.shape[2]:p|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,p,P,T){var F=this.offset,q=0,V=this.shape[0],H=this.shape[1],X=this.shape[2],G=this.shape[3],N=this.shape[4],W=this.stride[0],re=this.stride[1],ae=this.stride[2],_e=this.stride[3],Me=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,F+=W*q,V-=q),typeof M=="number"&&M>=0&&(q=M|0,F+=re*q,H-=q),typeof p=="number"&&p>=0&&(q=p|0,F+=ae*q,X-=q),typeof P=="number"&&P>=0&&(q=P|0,F+=_e*q,G-=q),typeof T=="number"&&T>=0&&(q=T|0,F+=Me*q,N-=q),new S(this.data,V,H,X,G,N,W,re,ae,_e,Me,F)},L.step=function(C,M,p,P,T){var F=this.shape[0],q=this.shape[1],V=this.shape[2],H=this.shape[3],X=this.shape[4],G=this.stride[0],N=this.stride[1],W=this.stride[2],re=this.stride[3],ae=this.stride[4],_e=this.offset,Me=0,ke=Math.ceil;return typeof C=="number"&&(Me=C|0,Me<0?(_e+=G*(F-1),F=ke(-F/Me)):F=ke(F/Me),G*=Me),typeof M=="number"&&(Me=M|0,Me<0?(_e+=N*(q-1),q=ke(-q/Me)):q=ke(q/Me),N*=Me),typeof p=="number"&&(Me=p|0,Me<0?(_e+=W*(V-1),V=ke(-V/Me)):V=ke(V/Me),W*=Me),typeof P=="number"&&(Me=P|0,Me<0?(_e+=re*(H-1),H=ke(-H/Me)):H=ke(H/Me),re*=Me),typeof T=="number"&&(Me=T|0,Me<0?(_e+=ae*(X-1),X=ke(-X/Me)):X=ke(X/Me),ae*=Me),new S(this.data,F,q,V,H,X,G,N,W,re,ae,_e)},L.transpose=function(C,M,p,P,T){C=C===void 0?0:C|0,M=M===void 0?1:M|0,p=p===void 0?2:p|0,P=P===void 0?3:P|0,T=T===void 0?4:T|0;var F=this.shape,q=this.stride;return new S(this.data,F[C],F[M],F[p],F[P],F[T],q[C],q[M],q[p],q[P],q[T],this.offset)},L.pick=function(C,M,p,P,T){var F=[],q=[],V=this.offset;typeof C=="number"&&C>=0?V=V+this.stride[0]*C|0:(F.push(this.shape[0]),q.push(this.stride[0])),typeof M=="number"&&M>=0?V=V+this.stride[1]*M|0:(F.push(this.shape[1]),q.push(this.stride[1])),typeof p=="number"&&p>=0?V=V+this.stride[2]*p|0:(F.push(this.shape[2]),q.push(this.stride[2])),typeof P=="number"&&P>=0?V=V+this.stride[3]*P|0:(F.push(this.shape[3]),q.push(this.stride[3])),typeof T=="number"&&T>=0?V=V+this.stride[4]*T|0:(F.push(this.shape[4]),q.push(this.stride[4]));var H=E[F.length+1];return H(this.data,F,q,V)},function(C,M,p,P){return new S(C,M[0],M[1],M[2],M[3],M[4],p[0],p[1],p[2],p[3],p[4],P)}}};function h(b,g){var E=g===-1?"T":String(g),k=f[E];return g===-1?k(b):g===0?k(b,v[b][0]):k(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 x(b,g,E,k){if(b===void 0){var p=v.array[0];return p([])}else typeof b=="number"&&(b=[b]);g===void 0&&(g=[b.length]);var S=g.length;if(E===void 0){E=new Array(S);for(var L=S-1,_=1;L>=0;--L)E[L]=_,_*=g[L]}if(k===void 0){k=0;for(var L=0;L>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;vd)for(var F=h[g],q=1/Math.sqrt(M*P),T=0;T<3;++T){var V=(T+1)%3,H=(T+2)%3;F[T]+=q*(p[V]*C[H]-p[H]*C[V])}}for(var v=0;vd)for(var q=1/Math.sqrt(X),T=0;T<3;++T)F[T]*=q;else for(var T=0;T<3;++T)F[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 g=0;g<3;++g)S[g]*=L;h[v]=S}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,x){var b=s+f+x;if(g>0){var g=Math.sqrt(b+1);o[0]=.5*(h-v)/g,o[1]=.5*(d-u)/g,o[2]=.5*(l-f)/g,o[3]=.5*g}else{var E=Math.max(s,f,x),g=Math.sqrt(2*E-b+1);s>=E?(o[0]=.5*g,o[1]=.5*(c+l)/g,o[2]=.5*(d+u)/g,o[3]=.5*(h-v)/g):f>=E?(o[0]=.5*(l+c)/g,o[1]=.5*g,o[2]=.5*(v+h)/g,o[3]=.5*(d-u)/g):(o[0]=.5*(u+d)/g,o[1]=.5*(h+v)/g,o[2]=.5*g,o[3]=.5*(l-c)/g)}return o}},9977:function(i,a,o){"use strict";i.exports=g;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(E,k,S){return Math.sqrt(Math.pow(E,2)+Math.pow(k,2)+Math.pow(S,2))}function d(E,k,S,L){return Math.sqrt(Math.pow(E,2)+Math.pow(k,2)+Math.pow(S,2)+Math.pow(L,2))}function v(E,k){var S=k[0],L=k[1],_=k[2],C=k[3],M=d(S,L,_,C);M>1e-6?(E[0]=S/M,E[1]=L/M,E[2]=_/M,E[3]=C/M):(E[0]=E[1]=E[2]=0,E[3]=1)}function x(E,k,S){this.radius=s([S]),this.center=s(k),this.rotation=s(E),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=x.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(E){this.radius.curve(E),this.center.curve(E),this.rotation.curve(E);var k=this.computedRotation;v(k,k);var S=this.computedMatrix;u(S,k);var L=this.computedCenter,_=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);_[0]=L[0]+M*S[2],_[1]=L[1]+M*S[6],_[2]=L[2]+M*S[10],C[0]=S[1],C[1]=S[5],C[2]=S[9];for(var p=0;p<3;++p){for(var P=0,T=0;T<3;++T)P+=S[p+4*T]*_[T];S[12+p]=-P}},b.getMatrix=function(E,k){this.recalcMatrix(E);var S=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=S[L];return k}return S},b.idle=function(E){this.center.idle(E),this.radius.idle(E),this.rotation.idle(E)},b.flush=function(E){this.center.flush(E),this.radius.flush(E),this.rotation.flush(E)},b.pan=function(E,k,S,L){k=k||0,S=S||0,L=L||0,this.recalcMatrix(E);var _=this.computedMatrix,C=_[1],M=_[5],p=_[9],P=h(C,M,p);C/=P,M/=P,p/=P;var T=_[0],F=_[4],q=_[8],V=T*C+F*M+q*p;T-=C*V,F-=M*V,q-=p*V;var H=h(T,F,q);T/=H,F/=H,q/=H;var X=_[2],G=_[6],N=_[10],W=X*C+G*M+N*p,re=X*T+G*F+N*q;X-=W*C+re*T,G-=W*M+re*F,N-=W*p+re*q;var ae=h(X,G,N);X/=ae,G/=ae,N/=ae;var _e=T*k+C*S,Me=F*k+M*S,ke=q*k+p*S;this.center.move(E,_e,Me,ke);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(E,Math.log(ge))},b.rotate=function(E,k,S,L){this.recalcMatrix(E),k=k||0,S=S||0;var _=this.computedMatrix,C=_[0],M=_[4],p=_[8],P=_[1],T=_[5],F=_[9],q=_[2],V=_[6],H=_[10],X=k*C+S*P,G=k*M+S*T,N=k*p+S*F,W=-(V*N-H*G),re=-(H*X-q*N),ae=-(q*G-V*X),_e=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(re,2)-Math.pow(ae,2))),Me=d(W,re,ae,_e);Me>1e-6?(W/=Me,re/=Me,ae/=Me,_e/=Me):(W=re=ae=0,_e=1);var ke=this.computedRotation,ge=ke[0],ie=ke[1],Te=ke[2],Ee=ke[3],Ae=ge*_e+Ee*W+ie*ae-Te*re,ze=ie*_e+Ee*re+Te*W-ge*ae,Ce=Te*_e+Ee*ae+ge*re-ie*W,me=Ee*_e-ge*W-ie*re-Te*ae;if(L){W=q,re=V,ae=H;var De=Math.sin(L)/h(W,re,ae);W*=De,re*=De,ae*=De,_e=Math.cos(k),Ae=Ae*_e+me*W+ze*ae-Ce*re,ze=ze*_e+me*re+Ce*W-Ae*ae,Ce=Ce*_e+me*ae+Ae*re-ze*W,me=me*_e-Ae*W-ze*re-Ce*ae}var ce=d(Ae,ze,Ce,me);ce>1e-6?(Ae/=ce,ze/=ce,Ce/=ce,me/=ce):(Ae=ze=Ce=0,me=1),this.rotation.set(E,Ae,ze,Ce,me)},b.lookAt=function(E,k,S,L){this.recalcMatrix(E),S=S||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var _=this.computedMatrix;l(_,k,S,L);var C=this.computedRotation;f(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),v(C,C),this.rotation.set(E,C[0],C[1],C[2],C[3]);for(var M=0,p=0;p<3;++p)M+=Math.pow(S[p]-k[p],2);this.radius.set(E,.5*Math.log(Math.max(M,1e-6))),this.center.set(E,S[0],S[1],S[2])},b.translate=function(E,k,S,L){this.center.move(E,k||0,S||0,L||0)},b.setMatrix=function(E,k){var S=this.computedRotation;f(S,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),v(S,S),this.rotation.set(E,S[0],S[1],S[2],S[3]);var L=this.computedMatrix;c(L,k);var _=L[15];if(Math.abs(_)>1e-6){var C=L[12]/_,M=L[13]/_,p=L[14]/_;this.recalcMatrix(E);var P=Math.exp(this.computedRadius[0]);this.center.set(E,C-L[2]*P,M-L[6]*P,p-L[10]*P),this.radius.idle(E)}else this.center.idle(E),this.radius.idle(E)},b.setDistance=function(E,k){k>0&&this.radius.set(E,Math.log(k))},b.setDistanceLimits=function(E,k){E>0?E=Math.log(E):E=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,E),this.radius.bounds[0][0]=E,this.radius.bounds[1][0]=k},b.getDistanceLimits=function(E){var k=this.radius.bounds;return E?(E[0]=Math.exp(k[0][0]),E[1]=Math.exp(k[1][0]),E):[Math.exp(k[0][0]),Math.exp(k[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(E){var k=this.lastT(),S=E.center;S&&this.center.set(k,S[0],S[1],S[2]);var L=E.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var _=E.distance;_&&_>0&&this.radius.set(k,Math.log(_)),this.setDistanceLimits(E.zoomMin,E.zoomMax)};function g(E){E=E||{};var k=E.center||[0,0,0],S=E.rotation||[0,0,0,1],L=E.radius||1;k=[].slice.call(k,0,3),S=[].slice.call(S,0,4),v(S,S);var _=new x(S,k,Math.log(L));return _.setDistanceLimits(E.zoomMin,E.zoomMax),("eye"in E||"up"in E)&&_.lookAt(0,E.eye,E.center,E.up),_}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v0){F=d[H][P][0],V=H;break}q=F[V^1];for(var X=0;X<2;++X)for(var G=d[X][P],N=0;N0&&(F=W,q=re,V=X)}return T||F&&g(F,V),q}function k(p,P){var T=d[P][p][0],F=[p];g(T,P);for(var q=T[P^1],V=P;;){for(;q!==p;)F.push(q),q=E(F[F.length-2],q,!1);if(d[0][p].length+d[1][p].length===0)break;var H=F[F.length-1],X=p,G=F[1],N=E(H,X,!0);if(s(c[H],c[X],c[G],c[N])<0)break;F.push(p),q=E(H,X)}return F}function S(p,P){return P[1]===P[P.length-1]}for(var v=0;v0;){var C=d[0][v].length,M=k(v,L);S(_,M)?_.push.apply(_,M):(_.length>0&&b.push(_),_=M)}_.length>0&&b.push(_)}return b}},5609:function(i,a,o){"use strict";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],x=0;x0;){var g=v.pop();h[g]=!1;for(var E=f[g],x=0;x0}C=C.filter(M);for(var p=C.length,P=new Array(p),T=new Array(p),_=0;_0;){var ce=Ce.pop(),Ge=Me[ce];h(Ge,function(ot,Dt){return ot-Dt});var nt=Ge.length,ct=me[ce],qt;if(ct===0){var G=C[ce];qt=[G]}for(var _=0;_=0)&&(me[rt]=ct^1,Ce.push(rt),ct===0)){var G=C[rt];ze(G)||(G.reverse(),qt.push(G))}}ct===0&&De.push(qt)}return De}},5085:function(i,a,o){i.exports=E;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(k){return function(S,L){var _=k[S];return _?!!_.queryPoint(L,f):!1}}function d(k){for(var S={},L=0;L0&&S[_]===L[0])C=k[_-1];else return 1;for(var M=1;C;){var p=C.key,P=s(L,p[0],p[1]);if(p[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 x(k){return 1}function b(k){return function(L){return k(L[0],L[1])?0:1}}function g(k,S){return function(_){return k(_[0],_[1])?0:S(_)}}function E(k){for(var S=k.length,L=[],_=[],C=0,M=0;M=x?(p=1,T=x+2*E+S):(p=-E/x,T=E*p+S)):(p=0,k>=0?(P=0,T=S):-k>=g?(P=1,T=g+2*k+S):(P=-k/g,T=k*P+S));else if(P<0)P=0,E>=0?(p=0,T=S):-E>=x?(p=1,T=x+2*E+S):(p=-E/x,T=E*p+S);else{var F=1/M;p*=F,P*=F,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+S}else{var q,V,H,X;p<0?(q=b+E,V=g+k,V>q?(H=V-q,X=x-2*b+g,H>=X?(p=1,P=0,T=x+2*E+S):(p=H/X,P=1-p,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+S)):(p=0,V<=0?(P=1,T=g+2*k+S):k>=0?(P=0,T=S):(P=-k/g,T=k*P+S))):P<0?(q=b+k,V=x+E,V>q?(H=V-q,X=x-2*b+g,H>=X?(P=1,p=0,T=g+2*k+S):(P=H/X,p=1-P,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+S)):(P=0,V<=0?(p=1,T=x+2*E+S):E>=0?(p=0,T=S):(p=-E/x,T=E*p+S))):(H=g+k-b-E,H<=0?(p=0,P=1,T=g+2*k+S):(X=x-2*b+g,H>=X?(p=1,P=0,T=x+2*E+S):(p=H/X,P=1-p,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+S)))}for(var G=1-p-P,v=0;v0){var g=f[d-1];if(s(x,g)===0&&u(g)!==b){d-=1;continue}}f[d++]=x}}return f.length=d,f}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var x=0,c=u;c0){if(V<=0)return H;X=q+V}else if(q<0){if(V>=0)return H;X=-(q+V)}else return H;var G=d*X;return H>=G||H<=-G?H:k(P,T,F)},function(P,T,F,q){var V=P[0]-q[0],H=T[0]-q[0],X=F[0]-q[0],G=P[1]-q[1],N=T[1]-q[1],W=F[1]-q[1],re=P[2]-q[2],ae=T[2]-q[2],_e=F[2]-q[2],Me=H*W,ke=X*N,ge=X*G,ie=V*W,Te=V*N,Ee=H*G,Ae=re*(Me-ke)+ae*(ge-ie)+_e*(Te-Ee),ze=(Math.abs(Me)+Math.abs(ke))*Math.abs(re)+(Math.abs(ge)+Math.abs(ie))*Math.abs(ae)+(Math.abs(Te)+Math.abs(Ee))*Math.abs(_e),Ce=v*ze;return Ae>Ce||-Ae>Ce?Ae:S(P,T,F,q)}];function _(p){var P=L[p.length];return P||(P=L[p.length]=E(p.length)),P.apply(void 0,p)}function C(p,P,T,F,q,V,H){return function(G,N,W,re,ae){switch(arguments.length){case 0:case 1:return 0;case 2:return F(G,N);case 3:return q(G,N,W);case 4:return V(G,N,W,re);case 5:return H(G,N,W,re,ae)}for(var _e=new Array(arguments.length),Me=0;Me0&&x>0||v<0&&x<0)return!1;var b=s(h,c,f),g=s(d,c,f);return b>0&&g>0||b<0&&g<0?!1:v===0&&x===0&&b===0&&g===0?l(c,f,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,x=0,b=Math.abs,g=s[v],E=b(g),k=-l[x],S=b(k),L,_;E=c?(L=g,v+=1,v=c?(L=g,v+=1,v>1,k=f[2*E+1];if(k===x)return E;x>1,k=f[2*E+1];if(k===x)return E;x>1,k=f[2*E+1];if(k===x)return E;x>1,k=f[2*E+1];if(k===x)return E;x>1,X=d(P[H],T);X<=0?(X===0&&(V=H),F=H+1):X>0&&(q=H-1)}return V}s=g;function E(P,T){for(var F=new Array(P.length),q=0,V=F.length;q=P.length||d(P[Me],H)!==0););}return F}s=E;function k(P,T){if(!T)return E(b(L(P,0)),P,0);for(var F=new Array(T),q=0;q>>W&1&&N.push(V[W]);T.push(N)}return x(T)}s=S;function L(P,T){if(T<0)return[];for(var F=[],q=(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}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(p){for(var P=0,T=Math.max,F=0,q=p.length;F>1,H=h(p[V],P);H<=0?(H===0&&(q=V),T=V+1):H>0&&(F=V-1)}return q}a.findCell=b;function g(p,P){for(var T=new Array(p.length),F=0,q=T.length;F=p.length||h(p[_e],V)!==0););}return T}a.incidence=g;function E(p,P){if(!P)return g(x(S(p,0)),p,0);for(var T=new Array(P),F=0;F>>N&1&&G.push(q[N]);P.push(G)}return v(P)}a.explode=k;function S(p,P){if(P<0)return[];for(var T=[],F=(1<>1:(ie>>1)-1}function F(ie){for(var Te=P(ie);;){var Ee=Te,Ae=2*ie+1,ze=2*(ie+1),Ce=ie;if(Ae0;){var Ee=T(ie);if(Ee>=0){var Ae=P(Ee);if(Te0){var ie=G[0];return p(0,re-1),re-=1,F(0),ie}return-1}function H(ie,Te){var Ee=G[ie];return E[Ee]===Te?ie:(E[Ee]=-1/0,q(ie),V(),E[Ee]=Te,re+=1,q(re-1))}function X(ie){if(!k[ie]){k[ie]=!0;var Te=b[ie],Ee=g[ie];b[Ee]>=0&&(b[Ee]=Te),g[Te]>=0&&(g[Te]=Ee),N[Te]>=0&&H(N[Te],M(Te)),N[Ee]>=0&&H(N[Ee],M(Ee))}}for(var G=[],N=new Array(v),S=0;S>1;S>=0;--S)F(S);for(;;){var ae=V();if(ae<0||E[ae]>d)break;X(ae)}for(var _e=[],S=0;S=0&&Ee>=0&&Te!==Ee){var Ae=N[Te],ze=N[Ee];Ae!==ze&&ge.push([Ae,ze])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),x=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),g=Math.max(f[0][1],f[1][1]);return xg?v-g:x-g}var E,k;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var v,x;if(c[0][0]c[1][0])v=c[1],x=c[0];else return-l(c,f);var b=s(h,d,x),g=s(h,d,v);if(b<0){if(g<=0)return b}else if(b>0){if(g>=0)return b}else if(g)return g;if(b=s(x,v,d),g=s(x,v,h),b<0){if(g<=0)return b}else if(b>0){if(g>=0)return b}else if(g)return g;return d[0]-x[0]}},4209:function(i,a,o){"use strict";i.exports=g;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(E,k,S){this.slabs=E,this.coordinates=k,this.horizontal=S}var h=f.prototype;function d(E,k){return E.y-k}function v(E,k){for(var S=null;E;){var L=E.key,_,C;L[0][0]0)if(k[0]!==L[1][0])S=E,E=E.right;else{var p=v(E.right,k);if(p)return p;E=E.left}else{if(k[0]!==L[1][0])return E;var p=v(E.right,k);if(p)return p;E=E.left}}return S}h.castUp=function(E){var k=s.le(this.coordinates,E[0]);if(k<0)return-1;var S=this.slabs[k],L=v(this.slabs[k],E),_=-1;if(L&&(_=L.value),this.coordinates[k]===E[0]){var C=null;if(L&&(C=L.key),k>0){var M=v(this.slabs[k-1],E);M&&(C?c(M.key,C)>0&&(C=M.key,_=M.value):(_=M.value,C=M.key))}var p=this.horizontal[k];if(p.length>0){var P=s.ge(p,E[1],d);if(P=p.length)return _;T=p[P]}}if(T.start)if(C){var F=u(C[0],C[1],[E[0],T.y]);C[0][0]>C[1][0]&&(F=-F),F>0&&(_=T.index)}else _=T.index;else T.y!==E[1]&&(_=T.index)}}}return _};function x(E,k,S,L){this.y=E,this.index=k,this.start=S,this.closed=L}function b(E,k,S,L){this.x=E,this.segment=k,this.create=S,this.index=L}function g(E){for(var k=E.length,S=2*k,L=new Array(S),_=0;_1&&(k=1);for(var S=1-k,L=v.length,_=new Array(L),C=0;C0||E>0&&_<0){var C=c(k,_,S,E);b.push(C),g.push(C.slice())}_<0?g.push(S.slice()):_>0?b.push(S.slice()):(b.push(S.slice()),g.push(S.slice())),E=_}return{positive:b,negative:g}}function h(v,x){for(var b=[],g=u(v[v.length-1],x),E=v[v.length-1],k=v[0],S=0;S0||g>0&&L<0)&&b.push(c(E,L,k,g)),L>=0&&b.push(k.slice()),g=L}return b}function d(v,x){for(var b=[],g=u(v[v.length-1],x),E=v[v.length-1],k=v[0],S=0;S0||g>0&&L<0)&&b.push(c(E,L,k,g)),L<=0&&b.push(k.slice()),g=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(v){return f(d(v),arguments)}function c(v,x){return u.apply(null,[v].concat(x||[]))}function f(v,x){var b=1,g=v.length,E,k="",S,L,_,C,M,p,P,T;for(S=0;S=0),_.type){case"b":E=parseInt(E,10).toString(2);break;case"c":E=String.fromCharCode(parseInt(E,10));break;case"d":case"i":E=parseInt(E,10);break;case"j":E=JSON.stringify(E,null,_.width?parseInt(_.width):0);break;case"e":E=_.precision?parseFloat(E).toExponential(_.precision):parseFloat(E).toExponential();break;case"f":E=_.precision?parseFloat(E).toFixed(_.precision):parseFloat(E);break;case"g":E=_.precision?String(Number(E.toPrecision(_.precision))):parseFloat(E);break;case"o":E=(parseInt(E,10)>>>0).toString(8);break;case"s":E=String(E),E=_.precision?E.substring(0,_.precision):E;break;case"t":E=String(!!E),E=_.precision?E.substring(0,_.precision):E;break;case"T":E=Object.prototype.toString.call(E).slice(8,-1).toLowerCase(),E=_.precision?E.substring(0,_.precision):E;break;case"u":E=parseInt(E,10)>>>0;break;case"v":E=E.valueOf(),E=_.precision?E.substring(0,_.precision):E;break;case"x":E=(parseInt(E,10)>>>0).toString(16);break;case"X":E=(parseInt(E,10)>>>0).toString(16).toUpperCase();break}l.json.test(_.type)?k+=E:(l.number.test(_.type)&&(!P||_.sign)?(T=P?"+":"-",E=E.toString().replace(l.sign,"")):T="",M=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",p=_.width-(T+E).length,C=_.width&&p>0?M.repeat(p):"",k+=_.align?T+E+C:M==="0"?T+C+E:C+T+E)}return k}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var x=v,b,g=[],E=0;x;){if((b=l.text.exec(x))!==null)g.push(b[0]);else if((b=l.modulo.exec(x))!==null)g.push("%");else if((b=l.placeholder.exec(x))!==null){if(b[2]){E|=1;var k=[],S=b[2],L=[];if((L=l.key.exec(S))!==null)for(k.push(L[1]);(S=S.substring(L[0].length))!=="";)if((L=l.key_access.exec(S))!==null)k.push(L[1]);else if((L=l.index_access.exec(S))!==null)k.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]=k}else E|=2;if(E===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.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");x=x.substring(b[0].length)}return h[v]=g}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),l=o(781),u={"2d":function(v,x,b){var g=v({order:x,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(k,S,L,_){return k>_|0},vertex:function(k,S,L,_,C,M,p,P,T,F,q,V,H){var X=(p<<0)+(P<<1)+(T<<2)+(F<<3)|0;if(!(X===0||X===15))switch(X){case 0:q.push([k-.5,S-.5]);break;case 1:q.push([k-.25-.25*(_+L-2*H)/(L-_),S-.25-.25*(C+L-2*H)/(L-C)]);break;case 2:q.push([k-.75-.25*(-_-L+2*H)/(_-L),S-.25-.25*(M+_-2*H)/(_-M)]);break;case 3:q.push([k-.5,S-.5-.5*(C+L+M+_-4*H)/(L-C+_-M)]);break;case 4:q.push([k-.25-.25*(M+C-2*H)/(C-M),S-.75-.25*(-C-L+2*H)/(C-L)]);break;case 5:q.push([k-.5-.5*(_+L+M+C-4*H)/(L-_+C-M),S-.5]);break;case 6:q.push([k-.5-.25*(-_-L+M+C)/(_-L+C-M),S-.5-.25*(-C-L+M+_)/(C-L+_-M)]);break;case 7:q.push([k-.75-.25*(M+C-2*H)/(C-M),S-.75-.25*(M+_-2*H)/(_-M)]);break;case 8:q.push([k-.75-.25*(-M-C+2*H)/(M-C),S-.75-.25*(-M-_+2*H)/(M-_)]);break;case 9:q.push([k-.5-.25*(_+L+-M-C)/(L-_+M-C),S-.5-.25*(C+L+-M-_)/(L-C+M-_)]);break;case 10:q.push([k-.5-.5*(-_-L+-M-C+4*H)/(_-L+M-C),S-.5]);break;case 11:q.push([k-.25-.25*(-M-C+2*H)/(M-C),S-.75-.25*(C+L-2*H)/(L-C)]);break;case 12:q.push([k-.5,S-.5-.5*(-C-L+-M-_+4*H)/(C-L+M-_)]);break;case 13:q.push([k-.75-.25*(_+L-2*H)/(L-_),S-.25-.25*(-M-_+2*H)/(M-_)]);break;case 14:q.push([k-.25-.25*(-_-L+2*H)/(_-L),S-.25-.25*(-C-L+2*H)/(C-L)]);break;case 15:q.push([k-.5,S-.5]);break}},cell:function(k,S,L,_,C,M,p,P,T){C?P.push([k,S]):P.push([S,k])}});return function(E,k){var S=[],L=[];return g(E,S,L,k),{positions:S,cells:L}}}};function c(v,x){var b=v.length+"d",g=u[b];if(g)return g(s,v,x)}function f(v,x){for(var b=l(v,x),g=b.length,E=new Array(g),k=new Array(g),S=0;SMath.max(_,C)?M[2]=1:_>Math.max(L,C)?M[0]=1:M[1]=1;for(var p=0,P=0,T=0;T<3;++T)p+=S[T]*S[T],P+=M[T]*S[T];for(var T=0;T<3;++T)M[T]-=P/p*S[T];return f(M,M),M}function b(S,L,_,C,M,p,P,T){this.center=s(_),this.up=s(C),this.right=s(M),this.radius=s([p]),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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var g=b.prototype;g.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},g.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])]},g.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,_=this.computedRight,C=0,M=0,p=0;p<3;++p)M+=L[p]*_[p],C+=L[p]*L[p];for(var P=Math.sqrt(C),T=0,p=0;p<3;++p)_[p]-=L[p]*M/C,T+=_[p]*_[p],L[p]/=P;for(var F=Math.sqrt(T),p=0;p<3;++p)_[p]/=F;var q=this.computedToward;c(q,L,_),f(q,q);for(var V=Math.exp(this.computedRadius[0]),H=this.computedAngle[0],X=this.computedAngle[1],G=Math.cos(H),N=Math.sin(H),W=Math.cos(X),re=Math.sin(X),ae=this.computedCenter,_e=G*W,Me=N*W,ke=re,ge=-G*re,ie=-N*re,Te=W,Ee=this.computedEye,Ae=this.computedMatrix,p=0;p<3;++p){var ze=_e*_[p]+Me*q[p]+ke*L[p];Ae[4*p+1]=ge*_[p]+ie*q[p]+Te*L[p],Ae[4*p+2]=ze,Ae[4*p+3]=0}var Ce=Ae[1],me=Ae[5],De=Ae[9],ce=Ae[2],Ge=Ae[6],nt=Ae[10],ct=me*nt-De*Ge,qt=De*ce-Ce*nt,rt=Ce*Ge-me*ce,ot=d(ct,qt,rt);ct/=ot,qt/=ot,rt/=ot,Ae[0]=ct,Ae[4]=qt,Ae[8]=rt;for(var p=0;p<3;++p)Ee[p]=ae[p]+Ae[2+4*p]*V;for(var p=0;p<3;++p){for(var T=0,Dt=0;Dt<3;++Dt)T+=Ae[p+4*Dt]*Ee[Dt];Ae[12+p]=-T}Ae[15]=1},g.getMatrix=function(S,L){this.recalcMatrix(S);var _=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=_[C];return L}return _};var E=[0,0,0];g.rotate=function(S,L,_,C){if(this.angle.move(S,L,_),C){this.recalcMatrix(S);var M=this.computedMatrix;E[0]=M[2],E[1]=M[6],E[2]=M[10];for(var p=this.computedUp,P=this.computedRight,T=this.computedToward,F=0;F<3;++F)M[4*F]=p[F],M[4*F+1]=P[F],M[4*F+2]=T[F];u(M,M,C,E);for(var F=0;F<3;++F)p[F]=M[4*F],P[F]=M[4*F+1];this.up.set(S,p[0],p[1],p[2]),this.right.set(S,P[0],P[1],P[2])}},g.pan=function(S,L,_,C){L=L||0,_=_||0,C=C||0,this.recalcMatrix(S);var M=this.computedMatrix,p=Math.exp(this.computedRadius[0]),P=M[1],T=M[5],F=M[9],q=d(P,T,F);P/=q,T/=q,F/=q;var V=M[0],H=M[4],X=M[8],G=V*P+H*T+X*F;V-=P*G,H-=T*G,X-=F*G;var N=d(V,H,X);V/=N,H/=N,X/=N;var W=V*L+P*_,re=H*L+T*_,ae=X*L+F*_;this.center.move(S,W,re,ae);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(S,Math.log(_e))},g.translate=function(S,L,_,C){this.center.move(S,L||0,_||0,C||0)},g.setMatrix=function(S,L,_,C){var M=1;typeof _=="number"&&(M=_|0),(M<0||M>3)&&(M=1);var p=(M+2)%3,P=(M+1)%3;L||(this.recalcMatrix(S),L=this.computedMatrix);var T=L[M],F=L[M+4],q=L[M+8];if(C){var H=Math.abs(T),X=Math.abs(F),G=Math.abs(q),N=Math.max(H,X,G);H===N?(T=T<0?-1:1,F=q=0):G===N?(q=q<0?-1:1,T=F=0):(F=F<0?-1:1,T=q=0)}else{var V=d(T,F,q);T/=V,F/=V,q/=V}var W=L[p],re=L[p+4],ae=L[p+8],_e=W*T+re*F+ae*q;W-=T*_e,re-=F*_e,ae-=q*_e;var Me=d(W,re,ae);W/=Me,re/=Me,ae/=Me;var ke=F*ae-q*re,ge=q*W-T*ae,ie=T*re-F*W,Te=d(ke,ge,ie);ke/=Te,ge/=Te,ie/=Te,this.center.jump(S,er,Ke,xt),this.radius.idle(S),this.up.jump(S,T,F,q),this.right.jump(S,W,re,ae);var Ee,Ae;if(M===2){var ze=L[1],Ce=L[5],me=L[9],De=ze*W+Ce*re+me*ae,ce=ze*ke+Ce*ge+me*ie;qt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Ae=Math.atan2(ce,De)}else{var Ge=L[2],nt=L[6],ct=L[10],qt=Ge*T+nt*F+ct*q,rt=Ge*W+nt*re+ct*ae,ot=Ge*ke+nt*ge+ct*ie;Ee=Math.asin(v(qt)),Ae=Math.atan2(ot,rt)}this.angle.jump(S,Ae,Ee),this.recalcMatrix(S);var Dt=L[2],kt=L[6],Ct=L[10],Yt=this.computedMatrix;l(Yt,L);var xr=Yt[15],er=Yt[12]/xr,Ke=Yt[13]/xr,xt=Yt[14]/xr,bt=Math.exp(this.computedRadius[0]);this.center.jump(S,er-Dt*bt,Ke-kt*bt,xt-Ct*bt)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},g.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},g.setDistance=function(S,L){L>0&&this.radius.set(S,Math.log(L))},g.lookAt=function(S,L,_,C){this.recalcMatrix(S),L=L||this.computedEye,_=_||this.computedCenter,C=C||this.computedUp;var M=C[0],p=C[1],P=C[2],T=d(M,p,P);if(!(T<1e-6)){M/=T,p/=T,P/=T;var F=L[0]-_[0],q=L[1]-_[1],V=L[2]-_[2],H=d(F,q,V);if(!(H<1e-6)){F/=H,q/=H,V/=H;var X=this.computedRight,G=X[0],N=X[1],W=X[2],re=M*G+p*N+P*W;G-=re*M,N-=re*p,W-=re*P;var ae=d(G,N,W);if(!(ae<.01&&(G=p*V-P*q,N=P*F-M*V,W=M*q-p*F,ae=d(G,N,W),ae<1e-6))){G/=ae,N/=ae,W/=ae,this.up.set(S,M,p,P),this.right.set(S,G,N,W),this.center.set(S,_[0],_[1],_[2]),this.radius.set(S,Math.log(H));var _e=p*W-P*N,Me=P*G-M*W,ke=M*N-p*G,ge=d(_e,Me,ke);_e/=ge,Me/=ge,ke/=ge;var ie=M*F+p*q+P*V,Te=G*F+N*q+W*V,Ee=_e*F+Me*q+ke*V,Ae=Math.asin(v(ie)),ze=Math.atan2(Ee,Te),Ce=this.angle._state,me=Ce[Ce.length-1],De=Ce[Ce.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-ze),Ge=Math.abs(me-ze),nt=Math.abs(me-2*Math.PI-ze);ce0?W.pop():new ArrayBuffer(G)}a.mallocArrayBuffer=E;function k(X){return new Uint8Array(E(X),0,X)}a.mallocUint8=k;function S(X){return new Uint16Array(E(2*X),0,X)}a.mallocUint16=S;function L(X){return new Uint32Array(E(4*X),0,X)}a.mallocUint32=L;function _(X){return new Int8Array(E(X),0,X)}a.mallocInt8=_;function C(X){return new Int16Array(E(2*X),0,X)}a.mallocInt16=C;function M(X){return new Int32Array(E(4*X),0,X)}a.mallocInt32=M;function p(X){return new Float32Array(E(4*X),0,X)}a.mallocFloat32=a.mallocFloat=p;function P(X){return new Float64Array(E(8*X),0,X)}a.mallocFloat64=a.mallocDouble=P;function T(X){return c?new Uint8ClampedArray(E(X),0,X):k(X)}a.mallocUint8Clamped=T;function F(X){return f?new BigUint64Array(E(8*X),0,X):null}a.mallocBigUint64=F;function q(X){return h?new BigInt64Array(E(8*X),0,X):null}a.mallocBigInt64=q;function V(X){return new DataView(E(X),0,X)}a.mallocDataView=V;function H(X){X=s.nextPow2(X);var G=s.log2(X),N=x[G];return N.length>0?N.pop():new u(X)}a.mallocBuffer=H,a.clearCache=function(){for(var G=0;G<32;++G)d.UINT8[G].length=0,d.UINT16[G].length=0,d.UINT32[G].length=0,d.INT8[G].length=0,d.INT16[G].length=0,d.INT32[G].length=0,d.FLOAT[G].length=0,d.DOUBLE[G].length=0,d.BIGUINT64[G].length=0,d.BIGINT64[G].length=0,d.UINT8C[G].length=0,v[G].length=0,x[G].length=0}},1755:function(i){"use strict";"use restrict";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",W="",re=N.length,ae=W.length,_e=H[0]===E||H[0]===L,Me=0,ke=-ae;Me>-1&&(Me=X.indexOf(N,Me),!(Me===-1||(ke=X.indexOf(W,Me+re),ke===-1)||ke<=Me));){for(var ge=Me;ge=ke)G[ge]=null,X=X.substr(0,ge)+" "+X.substr(ge+1);else if(G[ge]!==null){var ie=G[ge].indexOf(H[0]);ie===-1?G[ge]+=H:_e&&(G[ge]=G[ge].substr(0,ie+1)+(1+parseInt(G[ge][ie+1]))+G[ge].substr(ie+2))}var Te=Me+re,Ee=X.substr(Te,ke-Te),Ae=Ee.indexOf(N);Ae!==-1?Me=Ae:Me=ke+ae}return G}function M(V,H,X){for(var G=H.textAlign||"start",N=H.textBaseline||"alphabetic",W=[1<<30,1<<30],re=[0,0],ae=V.length,_e=0;_e/g,` -`):X=X.replace(/\/g," ");var re="",ae=[];for(me=0;me0)continue;Lt=Ke.slice(0,1).join("")}return De(Lt),ke+=Lt.length,N=N.slice(Lt.length),N.length}while(!0)}function Ct(){return/[^a-fA-F0-9]/.test(X)?(De(N.join("")),H=h,q):(N.push(X),G=X,q+1)}function Yt(){return X==="."||/[eE]/.test(X)?(N.push(X),H=k,G=X,q+1):X==="x"&&N.length===1&&N[0]==="0"?(H=p,N.push(X),G=X,q+1):/[^\d]/.test(X)?(De(N.join("")),H=h,q):(N.push(X),G=X,q+1)}function xr(){return X==="f"&&(N.push(X),G=X,q+=1),/[eE]/.test(X)||(X==="-"||X==="+")&&/[eE]/.test(G)?(N.push(X),G=X,q+1):/[^\d]/.test(X)?(De(N.join("")),H=h,q):(N.push(X),G=X,q+1)}function er(){if(/[^\d\w_]/.test(X)){var Ke=N.join("");return me[Ke]?H=_:Ce[Ke]?H=L:H=A,De(N.join("")),H=h,q}return N.push(X),G=X,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(i){i.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,b=-7,g=l?c-1:0,E=l?-1:1,k=o[s+g];for(g+=E,f=k&(1<<-b)-1,k>>=-b,b+=d;b>0;f=f*256+o[s+g],g+=E,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+g],g+=E,b-=8);if(f===0)f=1-x;else{if(f===v)return h?NaN:(k?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-x}return(k?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,x=f*8-c-1,b=(1<>1,E=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=u?0:f-1,A=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+g>=1?s+=E/v:s+=E*Math.pow(2,1-g),s*v>=2&&(h++,v/=2),h+g>=b?(d=0,h=b):h+g>=1?(d=(s*v-1)*Math.pow(2,c),h=h+g):(d=s*Math.pow(2,g-1)*Math.pow(2,c),h=0));c>=8;o[l+k]=d&255,k+=A,d/=256,c-=8);for(h=h<0;o[l+k]=h&255,k+=A,h/=256,x-=8);o[l+k-A]|=L*128}},8954:function(i,a,o){"use strict";i.exports=g;var s=o(3250),l=o(6803).Fw;function u(E,k,A){this.vertices=E,this.adjacent=k,this.boundary=A,this.lastVisited=-1}u.prototype.flip=function(){var E=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=E;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function c(E,k,A){this.vertices=E,this.cell=k,this.index=A}function f(E,k){return l(E.vertices,k.vertices)}function h(E){return function(){var k=this.tuple;return E.apply(this,k)}}function d(E){var k=s[E+1];return k||(k=s),h(k)}var v=[];function x(E,k,A){this.dimension=E,this.vertices=k,this.simplices=A,this.interior=A.filter(function(C){return!C.boundary}),this.tuple=new Array(E+1);for(var L=0;L<=E;++L)this.tuple[L]=this.vertices[L];var _=v[E];_||(_=v[E]=d(E)),this.orient=_}var b=x.prototype;b.handleBoundaryDegeneracy=function(E,k){var A=this.dimension,L=this.vertices.length-1,_=this.tuple,C=this.vertices,M=[E];for(E.lastVisited=-L;M.length>0;){E=M.pop();for(var p=E.adjacent,P=0;P<=A;++P){var T=p[P];if(!(!T.boundary||T.lastVisited<=-L)){for(var F=T.vertices,q=0;q<=A;++q){var V=F[q];V<0?_[q]=k:_[q]=C[V]}var H=this.orient();if(H>0)return T;T.lastVisited=-L,H===0&&M.push(T)}}}return null},b.walk=function(E,k){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=k?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[M];e:for(;!p.boundary;){for(var P=p.vertices,T=p.adjacent,F=0;F<=L;++F)C[F]=_[P[F]];p.lastVisited=A;for(var F=0;F<=L;++F){var q=T[F];if(!(q.lastVisited>=A)){var V=C[F];C[F]=E;var H=this.orient();if(C[F]=V,H<0){p=q;continue e}else q.boundary?q.lastVisited=-A:q.lastVisited=A}}return}return p},b.addPeaks=function(E,k){var A=this.vertices.length-1,L=this.dimension,_=this.vertices,C=this.tuple,M=this.interior,p=this.simplices,P=[k];k.lastVisited=A,k.vertices[k.vertices.indexOf(-1)]=A,k.boundary=!1,M.push(k);for(var T=[];P.length>0;){var k=P.pop(),F=k.vertices,q=k.adjacent,V=F.indexOf(A);if(!(V<0)){for(var H=0;H<=L;++H)if(H!==V){var X=q[H];if(!(!X.boundary||X.lastVisited>=A)){var G=X.vertices;if(X.lastVisited!==-A){for(var N=0,W=0;W<=L;++W)G[W]<0?(N=W,C[W]=E):C[W]=_[G[W]];var re=this.orient();if(re>0){G[N]=A,X.boundary=!1,M.push(X),P.push(X),X.lastVisited=A;continue}else X.lastVisited=-A}var ae=X.adjacent,_e=F.slice(),Me=q.slice(),ke=new u(_e,Me,!0);p.push(ke);var ge=ae.indexOf(k);if(!(ge<0)){ae[ge]=ke,Me[V]=X,_e[H]=-1,Me[H]=k,q[H]=ke,ke.flip();for(var W=0;W<=L;++W){var ie=_e[W];if(!(ie<0||ie===A)){for(var Te=new Array(L-1),Ee=0,Ae=0;Ae<=L;++Ae){var ze=_e[Ae];ze<0||Ae===W||(Te[Ee++]=ze)}T.push(new c(Te,ke,W))}}}}}}}T.sort(f);for(var H=0;H+1=0?M[P++]=p[F]:T=F&1;if(T===(E&1)){var q=M[0];M[0]=M[1],M[1]=q}k.push(M)}}return k};function g(E,k){var A=E.length;if(A===0)throw new Error("Must have at least d+1 points");var L=E[0].length;if(A<=L)throw new Error("Must input at least d+1 points");var _=E.slice(0,L+1),C=s.apply(void 0,_);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),p=0;p<=L;++p)M[p]=p;C<0&&(M[0]=1,M[1]=0);for(var P=new u(M,new Array(L+1),!1),T=P.adjacent,F=new Array(L+2),p=0;p<=L;++p){for(var q=M.slice(),V=0;V<=L;++V)V===p&&(q[V]=-1);var H=q[0];q[0]=q[1],q[1]=H;var X=new u(q,new Array(L+1),!0);T[p]=X,F[p]=X}F[L+1]=P;for(var p=0;p<=L;++p)for(var q=T[p].vertices,G=T[p].adjacent,V=0;V<=L;++V){var N=q[V];if(N<0){G[V]=P;continue}for(var W=0;W<=L;++W)T[W].vertices.indexOf(N)<0&&(G[V]=T[W])}for(var re=new x(L,_,F),ae=!!k,p=L+1;p3*(F+1)?x(this,T):this.left.insert(T):this.left=C([T]);else if(T[0]>this.mid)this.right?4*(this.right.count+1)>3*(F+1)?x(this,T):this.right.insert(T):this.right=C([T]);else{var q=s.ge(this.leftPoints,T,L),V=s.ge(this.rightPoints,T,_);this.leftPoints.splice(q,0,T),this.rightPoints.splice(V,0,T)}},h.remove=function(T){var F=this.count-this.leftPoints;if(T[1]3*(F-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 H=this.left?this.left.count:0;if(4*H>3*(F-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 X=this,G=this.left;G.right;)X=G,G=G.right;if(X===this)G.right=this.right;else{var N=this.left,V=this.right;X.count-=G.count,X.right=G.left,G.left=N,G.right=V}d(this,G),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]>=F;--V){var H=q(T[V]);if(H)return H}}function k(T,F){for(var q=0;qthis.mid){if(this.right){var q=this.right.queryPoint(T,F);if(q)return q}return E(this.rightPoints,T,F)}else return k(this.leftPoints,F)},h.queryInterval=function(T,F,q){if(Tthis.mid&&this.right){var V=this.right.queryInterval(T,F,q);if(V)return V}return Fthis.mid?E(this.rightPoints,T,q):k(this.leftPoints,q)};function A(T,F){return T-F}function L(T,F){var q=T[0]-F[0];return q||T[1]-F[1]}function _(T,F){var q=T[1]-F[1];return q||T[0]-F[0]}function C(T){if(T.length===0)return null;for(var F=[],q=0;q>1],H=[],X=[],G=[],q=0;q13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),x=l(),b=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],E=[0,0,0];i.exports=function(C,M,p,P,T,F){if(M||(M=[0,0,0]),p||(p=[0,0,0]),P||(P=[0,0,0]),T||(T=[0,0,0,1]),F||(F=[0,0,0,1]),!s(v,C)||(u(x,v),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(c(x)<1e-8)))return!1;var q=v[3],V=v[7],H=v[11],X=v[12],G=v[13],N=v[14],W=v[15];if(q!==0||V!==0||H!==0){b[0]=q,b[1]=V,b[2]=H,b[3]=W;var re=f(x,x);if(!re)return!1;h(x,x),k(T,b,x)}else T[0]=T[1]=T[2]=0,T[3]=1;if(M[0]=X,M[1]=G,M[2]=N,A(g,v),p[0]=d.length(g[0]),d.normalize(g[0],g[0]),P[0]=d.dot(g[0],g[1]),L(g[1],g[1],g[0],1,-P[0]),p[1]=d.length(g[1]),d.normalize(g[1],g[1]),P[0]/=p[1],P[1]=d.dot(g[0],g[2]),L(g[2],g[2],g[0],1,-P[1]),P[2]=d.dot(g[1],g[2]),L(g[2],g[2],g[1],1,-P[2]),p[2]=d.length(g[2]),d.normalize(g[2],g[2]),P[1]/=p[2],P[2]/=p[2],d.cross(E,g[1],g[2]),d.dot(g[0],E)<0)for(var ae=0;ae<3;ae++)p[ae]*=-1,g[ae][0]*=-1,g[ae][1]*=-1,g[ae][2]*=-1;return F[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),F[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),F[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),F[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(F[0]=-F[0]),g[0][2]>g[2][0]&&(F[1]=-F[1]),g[1][0]>g[0][1]&&(F[2]=-F[2]),!0};function k(_,C,M){var p=C[0],P=C[1],T=C[2],F=C[3];return _[0]=M[0]*p+M[4]*P+M[8]*T+M[12]*F,_[1]=M[1]*p+M[5]*P+M[9]*T+M[13]*F,_[2]=M[2]*p+M[6]*P+M[10]*T+M[14]*F,_[3]=M[3]*p+M[7]*P+M[11]*T+M[15]*F,_}function A(_,C){_[0][0]=C[0],_[0][1]=C[1],_[0][2]=C[2],_[1][0]=C[4],_[1][1]=C[5],_[1][2]=C[6],_[2][0]=C[8],_[2][1]=C[9],_[2][2]=C[10]}function L(_,C,M,p,P){_[0]=C[0]*p+M[0]*P,_[1]=C[1]*p+M[1]*P,_[2]=C[2]*p+M[2]*P}},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=x;function x(k,A,L,_){if(c(A)===0||c(L)===0)return!1;var C=u(A,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,_),s(v.skew,h.skew,d.skew,_),s(v.scale,h.scale,d.scale,_),s(v.perspective,h.perspective,d.perspective,_),f(v.quaternion,h.quaternion,d.quaternion,_),l(k,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:g(),scale:g(1),skew:g(),perspective:E(),quaternion:E()}}function g(k){return[k||0,k||0,k||0]}function E(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,x,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=x[0],f[7]=x[1],f[11]=x[2],f[15]=x[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811:function(i,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),x=o(2504),b=o(3536),g=[0,0,0];i.exports=L;function E(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var k=E.prototype;k.recalcMatrix=function(_){var C=this._time,M=s.le(C,_),p=this.computedMatrix;if(!(M<0)){var P=this._components;if(M===C.length-1)for(var T=16*M,F=0;F<16;++F)p[F]=P[T++];else{for(var q=C[M+1]-C[M],T=16*M,V=this.prevMatrix,H=!0,F=0;F<16;++F)V[F]=P[T++];for(var X=this.nextMatrix,F=0;F<16;++F)X[F]=P[T++],H=H&&V[F]===X[F];if(q<1e-6||H)for(var F=0;F<16;++F)p[F]=V[F];else l(p,V,X,(_-C[M])/q)}var G=this.computedUp;G[0]=p[1],G[1]=p[5],G[2]=p[9],b(G,G);var N=this.computedInverse;u(N,p);var W=this.computedEye,re=N[15];W[0]=N[12]/re,W[1]=N[13]/re,W[2]=N[14]/re;for(var ae=this.computedCenter,_e=Math.exp(this.computedRadius[0]),F=0;F<3;++F)ae[F]=W[F]-p[2+4*F]*_e}},k.idle=function(_){if(!(_1&&s(u[d[g-2]],u[d[g-1]],b)<=0;)g-=1,d.pop();for(d.push(x),g=v.length;g>1&&s(u[v[g-2]],u[v[g-1]],b)>=0;)g-=1,v.pop();v.push(x)}for(var E=new Array(v.length+d.length-2),k=0,f=0,A=d.length;f0;--L)E[k++]=v[L];return E}},351:function(i,a,o){"use strict";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function b(T){var F=!1;return"altKey"in T&&(F=F||T.altKey!==v.alt,v.alt=!!T.altKey),"shiftKey"in T&&(F=F||T.shiftKey!==v.shift,v.shift=!!T.shiftKey),"ctrlKey"in T&&(F=F||T.ctrlKey!==v.control,v.control=!!T.ctrlKey),"metaKey"in T&&(F=F||T.metaKey!==v.meta,v.meta=!!T.metaKey),F}function g(T,F){var q=s.x(F),V=s.y(F);"buttons"in F&&(T=F.buttons|0),(T!==f||q!==h||V!==d||b(F))&&(f=T|0,h=q||0,d=V||0,c&&c(f,h,d,v))}function E(T){g(0,T)}function k(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function A(T){b(T)&&c&&c(f,h,d,v)}function L(T){s.buttons(T)===0?g(0,T):g(f,T)}function _(T){g(f|s.buttons(T),T)}function C(T){g(f&~s.buttons(T),T)}function M(){x||(x=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",_),u.addEventListener("mouseup",C),u.addEventListener("mouseleave",E),u.addEventListener("mouseenter",E),u.addEventListener("mouseout",E),u.addEventListener("mouseover",E),u.addEventListener("blur",k),u.addEventListener("keyup",A),u.addEventListener("keydown",A),u.addEventListener("keypress",A),u!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function p(){x&&(x=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",_),u.removeEventListener("mouseup",C),u.removeEventListener("mouseleave",E),u.removeEventListener("mouseenter",E),u.removeEventListener("mouseout",E),u.removeEventListener("mouseover",E),u.removeEventListener("blur",k),u.removeEventListener("keyup",A),u.removeEventListener("keydown",A),u.removeEventListener("keypress",A),u!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}M();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return x},set:function(T){T?M():p()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(Me=1,ie[Ee++]=v(M[F],k,A,L),F+=re,_>0)for(_e=1,q=M[F],Ae=ie[Ee]=v(q,k,A,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,A,L),rt=Te[Ee]=ke++),Ee+=1,F+=re,_e=2;_e<_;++_e)q=M[F],Ae=ie[Ee]=v(q,k,A,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,A,L),rt=Te[Ee]=ke++,qt!==me&&d(Te[Ee+ze],rt,W,H,qt,me,k,A,L)),Ee+=1,F+=re;for(F+=ae,Ee=0,ot=ze,ze=Ce,Ce=ot,ot=De,De=ce,ce=ot,ot=nt,nt=ct,ct=ot,Me=2;Me0)for(_e=1,q=M[F],Ae=ie[Ee]=v(q,k,A,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,A,L),rt=Te[Ee]=ke++,qt!==Ge&&d(Te[Ee+De],rt,G,W,Ge,qt,k,A,L)),Ee+=1,F+=re,_e=2;_e<_;++_e)q=M[F],Ae=ie[Ee]=v(q,k,A,L),me=ie[Ee+ze],Ge=ie[Ee+De],qt=ie[Ee+nt],(Ae!==me||Ae!==Ge||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,me,Ge,qt,k,A,L),rt=Te[Ee]=ke++,qt!==Ge&&d(Te[Ee+De],rt,G,W,Ge,qt,k,A,L),qt!==me&&d(Te[Ee+ze],rt,W,H,qt,me,k,A,L)),Ee+=1,F+=re;Me&1&&(Ee=0),ot=ze,ze=Ce,Ce=ot,ot=De,De=ce,ce=ot,ot=nt,nt=ct,ct=ot,F+=ae}}b(Te),b(ie)}},"false,1,0":function(h,d,v,x,b){return function(E,k,A,L){var _=E.shape[0]|0,C=E.shape[1]|0,M=E.data,p=E.offset|0,P=E.stride[0]|0,T=E.stride[1]|0,F=p,q,V=-P|0,H=0,X=-T|0,G=0,N=-P-T|0,W=0,re=T|0,ae=P-T*C|0,_e=0,Me=0,ke=0,ge=2*C|0,ie=x(ge),Te=x(ge),Ee=0,Ae=0,ze=-1,Ce=-1,me=0,De=-C|0,ce=C|0,Ge=0,nt=-C-1|0,ct=C-1|0,qt=0,rt=0,ot=0;for(Me=0;Me0){if(_e=1,ie[Ee++]=v(M[F],k,A,L),F+=re,C>0)for(Me=1,q=M[F],Ae=ie[Ee]=v(q,k,A,L),Ge=ie[Ee+De],me=ie[Ee+ze],qt=ie[Ee+nt],(Ae!==Ge||Ae!==me||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,Ge,me,qt,k,A,L),rt=Te[Ee]=ke++),Ee+=1,F+=re,Me=2;Me0)for(Me=1,q=M[F],Ae=ie[Ee]=v(q,k,A,L),Ge=ie[Ee+De],me=ie[Ee+ze],qt=ie[Ee+nt],(Ae!==Ge||Ae!==me||Ae!==qt)&&(H=M[F+V],G=M[F+X],W=M[F+N],h(_e,Me,q,H,G,W,Ae,Ge,me,qt,k,A,L),rt=Te[Ee]=ke++,qt!==Ge&&d(Te[Ee+De],rt,W,H,qt,Ge,k,A,L)),Ee+=1,F+=re,Me=2;Me 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||[],g=new Array(v),E=0;E=0?g[E]=!0:g[E]=!1;return u(f.vertex,f.cell,f.phase,x,d,g)}},6199:function(i,a,o){"use strict";var s=o(1338),l={zero:function(L,_,C,M){var p=L[0],P=C[0];M|=0;var T=0,F=P;for(T=0;T2&&T[1]>2&&M(P.pick(-1,-1).lo(1,1).hi(T[0]-2,T[1]-2),p.pick(-1,-1,0).lo(1,1).hi(T[0]-2,T[1]-2),p.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),p.pick(0,-1,1).lo(1).hi(T[1]-2)),_(p.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),p.pick(T[0]-1,-1,1).lo(1).hi(T[1]-2)),_(p.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),p.pick(-1,0,0).lo(1).hi(T[0]-2)),_(p.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),p.pick(-1,T[1]-1,0).lo(1).hi(T[0]-2)),_(p.pick(-1,T[1]-1,1).lo(1).hi(T[0]-2))),p.set(0,0,0,0),p.set(0,0,1,0),p.set(T[0]-1,0,0,0),p.set(T[0]-1,0,1,0),p.set(0,T[1]-1,0,0),p.set(0,T[1]-1,1,0),p.set(T[0]-1,T[1]-1,0,0),p.set(T[0]-1,T[1]-1,1,0),p}}function A(L){var _=L.join(),T=v[_];if(T)return T;for(var C=L.length,M=[b,g],p=1;p<=C;++p)M.push(E(p));var P=k,T=P.apply(void 0,M);return v[_]=T,T}i.exports=function(_,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return _;if(C.dimension===0)return _.set(0),_;var p=A(M);return p(_,C)}},4317:function(i){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h0;){G<64?(_=G,G=0):(_=64,G-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),g=H+G*p+N*P,A=X+G*F+N*q;var W=0,re=0,ae=0,_e=T,Me=p-M*T,ke=P-_*p,ge=V,ie=F-M*V,Te=q-_*F;for(ae=0;ae0;){q<64?(_=q,q=0):(_=64,q-=64);for(var V=v[0]|0;V>0;){V<64?(L=V,V=0):(L=64,V-=64),g=T+q*M+V*C,A=F+q*P+V*p;var H=0,X=0,G=M,N=C-_*M,W=P,re=p-_*P;for(X=0;X0;){X<64?(C=X,X=0):(C=64,X-=64);for(var G=v[0]|0;G>0;){G<64?(L=G,G=0):(L=64,G-=64);for(var N=v[1]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),g=V+X*P+G*M+N*p,A=H+X*q+G*T+N*F;var W=0,re=0,ae=0,_e=P,Me=M-C*P,ke=p-L*M,ge=q,ie=T-C*q,Te=F-L*T;for(ae=0;ae<_;++ae){for(re=0;reE;){W=0,re=H-_;t:for(G=0;G_e)break t;re+=T,W+=F}for(W=H,re=H-_,G=0;G>1,N=G-V,W=G+V,re=H,ae=N,_e=G,Me=W,ke=X,ge=k+1,ie=A-1,Te=!0,Ee,Ae,ze,Ce,me,De,ce,Ge,nt,ct=0,qt=0,rt=0,ot,Dt,kt,Ct,Yt,xr,er,Ke,xt,bt,Lt,St,Et,dt,Ht,$t,fr=P,_r=b(fr),Br=b(fr);Dt=C*re,kt=C*ae,$t=_;e:for(ot=0;ot0){Ae=re,re=ae,ae=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*Me,kt=C*ke,$t=_;e:for(ot=0;ot0){Ae=Me,Me=ke,ke=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*re,kt=C*_e,$t=_;e:for(ot=0;ot0){Ae=re,re=_e,_e=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*ae,kt=C*_e,$t=_;e:for(ot=0;ot0){Ae=ae,ae=_e,_e=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*re,kt=C*Me,$t=_;e:for(ot=0;ot0){Ae=re,re=Me,Me=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*_e,kt=C*Me,$t=_;e:for(ot=0;ot0){Ae=_e,_e=Me,Me=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*ae,kt=C*ke,$t=_;e:for(ot=0;ot0){Ae=ae,ae=ke,ke=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*ae,kt=C*_e,$t=_;e:for(ot=0;ot0){Ae=ae,ae=_e,_e=Ae;break e}if(rt<0)break e;$t+=F}Dt=C*Me,kt=C*ke,$t=_;e:for(ot=0;ot0){Ae=Me,Me=ke,ke=Ae;break e}if(rt<0)break e;$t+=F}for(Dt=C*re,kt=C*ae,Ct=C*_e,Yt=C*Me,xr=C*ke,er=C*H,Ke=C*G,xt=C*X,Ht=0,$t=_,ot=0;ot0)ie--;else if(rt<0){for(Dt=C*De,kt=C*ge,Ct=C*ie,$t=_,ot=0;ot0)for(;;){ce=_+ie*C,Ht=0;e:for(ot=0;ot0){if(--ieX){e:for(;;){for(ce=_+ge*C,Ht=0,$t=_,ot=0;ot1&&E?A(g,E[0],E[1]):A(g)}var d={"uint32,1,0":function(x,b){return function(g){var E=g.data,k=g.offset|0,A=g.shape,L=g.stride,_=L[0]|0,C=A[0]|0,M=L[1]|0,p=A[1]|0,P=M,T=M,F=1;C<=32?x(0,C-1,E,k,_,M,C,p,P,T,F):b(0,C-1,E,k,_,M,C,p,P,T,F)}}};function v(x,b){var g=[b,x].join(","),E=d[g],k=c(x,b),A=h(x,b,k);return E(k,A)}i.exports=v},446:function(i,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(":"),x=l[v];return x||(l[v]=x=s(f,h)),x(c),c}i.exports=u},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(b,g){return b[0]-g[0]}function c(){var b=this.stride,g=new Array(b.length),E;for(E=0;E=0&&(M=_|0,C+=P*M,p-=M),new k(this.data,p,P,C)},A.step=function(_){var C=this.shape[0],M=this.stride[0],p=this.offset,P=0,T=Math.ceil;return typeof _=="number"&&(P=_|0,P<0?(p+=M*(C-1),C=T(-C/P)):C=T(C/P),M*=P),new k(this.data,C,M,p)},A.transpose=function(_){_=_===void 0?0:_|0;var C=this.shape,M=this.stride;return new k(this.data,C[_],M[_],this.offset)},A.pick=function(_){var C=[],M=[],p=this.offset;typeof _=="number"&&_>=0?p=p+this.stride[0]*_|0:(C.push(this.shape[0]),M.push(this.stride[0]));var P=g[C.length+1];return P(this.data,C,M,p)},function(_,C,M,p){return new k(_,C[0],M[0],p)}},2:function(b,g,E){function k(L,_,C,M,p,P){this.data=L,this.shape=[_,C],this.stride=[M,p],this.offset=P|0}var A=k.prototype;return A.dtype=b,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(_,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]=M},A.get=function(_,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C):this.data[this.offset+this.stride[0]*_+this.stride[1]*C]},A.index=function(_,C){return this.offset+this.stride[0]*_+this.stride[1]*C},A.hi=function(_,C){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(_,C){var M=this.offset,p=0,P=this.shape[0],T=this.shape[1],F=this.stride[0],q=this.stride[1];return typeof _=="number"&&_>=0&&(p=_|0,M+=F*p,P-=p),typeof C=="number"&&C>=0&&(p=C|0,M+=q*p,T-=p),new k(this.data,P,T,F,q,M)},A.step=function(_,C){var M=this.shape[0],p=this.shape[1],P=this.stride[0],T=this.stride[1],F=this.offset,q=0,V=Math.ceil;return typeof _=="number"&&(q=_|0,q<0?(F+=P*(M-1),M=V(-M/q)):M=V(M/q),P*=q),typeof C=="number"&&(q=C|0,q<0?(F+=T*(p-1),p=V(-p/q)):p=V(p/q),T*=q),new k(this.data,M,p,P,T,F)},A.transpose=function(_,C){_=_===void 0?0:_|0,C=C===void 0?1:C|0;var M=this.shape,p=this.stride;return new k(this.data,M[_],M[C],p[_],p[C],this.offset)},A.pick=function(_,C){var M=[],p=[],P=this.offset;typeof _=="number"&&_>=0?P=P+this.stride[0]*_|0:(M.push(this.shape[0]),p.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(M.push(this.shape[1]),p.push(this.stride[1]));var T=g[M.length+1];return T(this.data,M,p,P)},function(_,C,M,p){return new k(_,C[0],C[1],M[0],M[1],p)}},3:function(b,g,E){function k(L,_,C,M,p,P,T,F){this.data=L,this.shape=[_,C,M],this.stride=[p,P,T],this.offset=F|0}var A=k.prototype;return A.dtype=b,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var _=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return _>C?C>M?[2,1,0]:_>M?[1,2,0]:[1,0,2]:_>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),A.set=function(_,C,M,p){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M,p):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]=p},A.get=function(_,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M]},A.index=function(_,C,M){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M},A.hi=function(_,C,M){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|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)},A.lo=function(_,C,M){var p=this.offset,P=0,T=this.shape[0],F=this.shape[1],q=this.shape[2],V=this.stride[0],H=this.stride[1],X=this.stride[2];return typeof _=="number"&&_>=0&&(P=_|0,p+=V*P,T-=P),typeof C=="number"&&C>=0&&(P=C|0,p+=H*P,F-=P),typeof M=="number"&&M>=0&&(P=M|0,p+=X*P,q-=P),new k(this.data,T,F,q,V,H,X,p)},A.step=function(_,C,M){var p=this.shape[0],P=this.shape[1],T=this.shape[2],F=this.stride[0],q=this.stride[1],V=this.stride[2],H=this.offset,X=0,G=Math.ceil;return typeof _=="number"&&(X=_|0,X<0?(H+=F*(p-1),p=G(-p/X)):p=G(p/X),F*=X),typeof C=="number"&&(X=C|0,X<0?(H+=q*(P-1),P=G(-P/X)):P=G(P/X),q*=X),typeof M=="number"&&(X=M|0,X<0?(H+=V*(T-1),T=G(-T/X)):T=G(T/X),V*=X),new k(this.data,p,P,T,F,q,V,H)},A.transpose=function(_,C,M){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var p=this.shape,P=this.stride;return new k(this.data,p[_],p[C],p[M],P[_],P[C],P[M],this.offset)},A.pick=function(_,C,M){var p=[],P=[],T=this.offset;typeof _=="number"&&_>=0?T=T+this.stride[0]*_|0:(p.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?T=T+this.stride[1]*C|0:(p.push(this.shape[1]),P.push(this.stride[1])),typeof M=="number"&&M>=0?T=T+this.stride[2]*M|0:(p.push(this.shape[2]),P.push(this.stride[2]));var F=g[p.length+1];return F(this.data,p,P,T)},function(_,C,M,p){return new k(_,C[0],C[1],C[2],M[0],M[1],M[2],p)}},4:function(b,g,E){function k(L,_,C,M,p,P,T,F,q,V){this.data=L,this.shape=[_,C,M,p],this.stride=[P,T,F,q],this.offset=V|0}var A=k.prototype;return A.dtype=b,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:E}),A.set=function(_,C,M,p,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p,P):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p]=P},A.get=function(_,C,M,p){return b==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p):this.data[this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p]},A.index=function(_,C,M,p){return this.offset+this.stride[0]*_+this.stride[1]*C+this.stride[2]*M+this.stride[3]*p},A.hi=function(_,C,M,p){return new k(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof p!="number"||p<0?this.shape[3]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(_,C,M,p){var P=this.offset,T=0,F=this.shape[0],q=this.shape[1],V=this.shape[2],H=this.shape[3],X=this.stride[0],G=this.stride[1],N=this.stride[2],W=this.stride[3];return typeof _=="number"&&_>=0&&(T=_|0,P+=X*T,F-=T),typeof C=="number"&&C>=0&&(T=C|0,P+=G*T,q-=T),typeof M=="number"&&M>=0&&(T=M|0,P+=N*T,V-=T),typeof p=="number"&&p>=0&&(T=p|0,P+=W*T,H-=T),new k(this.data,F,q,V,H,X,G,N,W,P)},A.step=function(_,C,M,p){var P=this.shape[0],T=this.shape[1],F=this.shape[2],q=this.shape[3],V=this.stride[0],H=this.stride[1],X=this.stride[2],G=this.stride[3],N=this.offset,W=0,re=Math.ceil;return typeof _=="number"&&(W=_|0,W<0?(N+=V*(P-1),P=re(-P/W)):P=re(P/W),V*=W),typeof C=="number"&&(W=C|0,W<0?(N+=H*(T-1),T=re(-T/W)):T=re(T/W),H*=W),typeof M=="number"&&(W=M|0,W<0?(N+=X*(F-1),F=re(-F/W)):F=re(F/W),X*=W),typeof p=="number"&&(W=p|0,W<0?(N+=G*(q-1),q=re(-q/W)):q=re(q/W),G*=W),new k(this.data,P,T,F,q,V,H,X,G,N)},A.transpose=function(_,C,M,p){_=_===void 0?0:_|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,p=p===void 0?3:p|0;var P=this.shape,T=this.stride;return new k(this.data,P[_],P[C],P[M],P[p],T[_],T[C],T[M],T[p],this.offset)},A.pick=function(_,C,M,p){var P=[],T=[],F=this.offset;typeof _=="number"&&_>=0?F=F+this.stride[0]*_|0:(P.push(this.shape[0]),T.push(this.stride[0])),typeof C=="number"&&C>=0?F=F+this.stride[1]*C|0:(P.push(this.shape[1]),T.push(this.stride[1])),typeof M=="number"&&M>=0?F=F+this.stride[2]*M|0:(P.push(this.shape[2]),T.push(this.stride[2])),typeof p=="number"&&p>=0?F=F+this.stride[3]*p|0:(P.push(this.shape[3]),T.push(this.stride[3]));var q=g[P.length+1];return q(this.data,P,T,F)},function(_,C,M,p){return new k(_,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],p)}},5:function(g,E,k){function A(_,C,M,p,P,T,F,q,V,H,X,G){this.data=_,this.shape=[C,M,p,P,T],this.stride=[F,q,V,H,X],this.offset=G|0}var L=A.prototype;return L.dtype=g,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:k}),L.set=function(C,M,p,P,T,F){return g==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T,F):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T]=F},L.get=function(C,M,p,P,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T]},L.index=function(C,M,p,P,T){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*p+this.stride[3]*P+this.stride[4]*T},L.hi=function(C,M,p,P,T){return new A(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof p!="number"||p<0?this.shape[2]:p|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,p,P,T){var F=this.offset,q=0,V=this.shape[0],H=this.shape[1],X=this.shape[2],G=this.shape[3],N=this.shape[4],W=this.stride[0],re=this.stride[1],ae=this.stride[2],_e=this.stride[3],Me=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,F+=W*q,V-=q),typeof M=="number"&&M>=0&&(q=M|0,F+=re*q,H-=q),typeof p=="number"&&p>=0&&(q=p|0,F+=ae*q,X-=q),typeof P=="number"&&P>=0&&(q=P|0,F+=_e*q,G-=q),typeof T=="number"&&T>=0&&(q=T|0,F+=Me*q,N-=q),new A(this.data,V,H,X,G,N,W,re,ae,_e,Me,F)},L.step=function(C,M,p,P,T){var F=this.shape[0],q=this.shape[1],V=this.shape[2],H=this.shape[3],X=this.shape[4],G=this.stride[0],N=this.stride[1],W=this.stride[2],re=this.stride[3],ae=this.stride[4],_e=this.offset,Me=0,ke=Math.ceil;return typeof C=="number"&&(Me=C|0,Me<0?(_e+=G*(F-1),F=ke(-F/Me)):F=ke(F/Me),G*=Me),typeof M=="number"&&(Me=M|0,Me<0?(_e+=N*(q-1),q=ke(-q/Me)):q=ke(q/Me),N*=Me),typeof p=="number"&&(Me=p|0,Me<0?(_e+=W*(V-1),V=ke(-V/Me)):V=ke(V/Me),W*=Me),typeof P=="number"&&(Me=P|0,Me<0?(_e+=re*(H-1),H=ke(-H/Me)):H=ke(H/Me),re*=Me),typeof T=="number"&&(Me=T|0,Me<0?(_e+=ae*(X-1),X=ke(-X/Me)):X=ke(X/Me),ae*=Me),new A(this.data,F,q,V,H,X,G,N,W,re,ae,_e)},L.transpose=function(C,M,p,P,T){C=C===void 0?0:C|0,M=M===void 0?1:M|0,p=p===void 0?2:p|0,P=P===void 0?3:P|0,T=T===void 0?4:T|0;var F=this.shape,q=this.stride;return new A(this.data,F[C],F[M],F[p],F[P],F[T],q[C],q[M],q[p],q[P],q[T],this.offset)},L.pick=function(C,M,p,P,T){var F=[],q=[],V=this.offset;typeof C=="number"&&C>=0?V=V+this.stride[0]*C|0:(F.push(this.shape[0]),q.push(this.stride[0])),typeof M=="number"&&M>=0?V=V+this.stride[1]*M|0:(F.push(this.shape[1]),q.push(this.stride[1])),typeof p=="number"&&p>=0?V=V+this.stride[2]*p|0:(F.push(this.shape[2]),q.push(this.stride[2])),typeof P=="number"&&P>=0?V=V+this.stride[3]*P|0:(F.push(this.shape[3]),q.push(this.stride[3])),typeof T=="number"&&T>=0?V=V+this.stride[4]*T|0:(F.push(this.shape[4]),q.push(this.stride[4]));var H=E[F.length+1];return H(this.data,F,q,V)},function(C,M,p,P){return new A(C,M[0],M[1],M[2],M[3],M[4],p[0],p[1],p[2],p[3],p[4],P)}}};function h(b,g){var E=g===-1?"T":String(g),k=f[E];return g===-1?k(b):g===0?k(b,v[b][0]):k(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 x(b,g,E,k){if(b===void 0){var p=v.array[0];return p([])}else typeof b=="number"&&(b=[b]);g===void 0&&(g=[b.length]);var A=g.length;if(E===void 0){E=new Array(A);for(var L=A-1,_=1;L>=0;--L)E[L]=_,_*=g[L]}if(k===void 0){k=0;for(var L=0;L>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;vd)for(var F=h[g],q=1/Math.sqrt(M*P),T=0;T<3;++T){var V=(T+1)%3,H=(T+2)%3;F[T]+=q*(p[V]*C[H]-p[H]*C[V])}}for(var v=0;vd)for(var q=1/Math.sqrt(X),T=0;T<3;++T)F[T]*=q;else for(var T=0;T<3;++T)F[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 g=0;g<3;++g)A[g]*=L;h[v]=A}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,x){var b=s+f+x;if(g>0){var g=Math.sqrt(b+1);o[0]=.5*(h-v)/g,o[1]=.5*(d-u)/g,o[2]=.5*(l-f)/g,o[3]=.5*g}else{var E=Math.max(s,f,x),g=Math.sqrt(2*E-b+1);s>=E?(o[0]=.5*g,o[1]=.5*(c+l)/g,o[2]=.5*(d+u)/g,o[3]=.5*(h-v)/g):f>=E?(o[0]=.5*(l+c)/g,o[1]=.5*g,o[2]=.5*(v+h)/g,o[3]=.5*(d-u)/g):(o[0]=.5*(u+d)/g,o[1]=.5*(h+v)/g,o[2]=.5*g,o[3]=.5*(l-c)/g)}return o}},9977:function(i,a,o){"use strict";i.exports=g;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(E,k,A){return Math.sqrt(Math.pow(E,2)+Math.pow(k,2)+Math.pow(A,2))}function d(E,k,A,L){return Math.sqrt(Math.pow(E,2)+Math.pow(k,2)+Math.pow(A,2)+Math.pow(L,2))}function v(E,k){var A=k[0],L=k[1],_=k[2],C=k[3],M=d(A,L,_,C);M>1e-6?(E[0]=A/M,E[1]=L/M,E[2]=_/M,E[3]=C/M):(E[0]=E[1]=E[2]=0,E[3]=1)}function x(E,k,A){this.radius=s([A]),this.center=s(k),this.rotation=s(E),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=x.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(E){this.radius.curve(E),this.center.curve(E),this.rotation.curve(E);var k=this.computedRotation;v(k,k);var A=this.computedMatrix;u(A,k);var L=this.computedCenter,_=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);_[0]=L[0]+M*A[2],_[1]=L[1]+M*A[6],_[2]=L[2]+M*A[10],C[0]=A[1],C[1]=A[5],C[2]=A[9];for(var p=0;p<3;++p){for(var P=0,T=0;T<3;++T)P+=A[p+4*T]*_[T];A[12+p]=-P}},b.getMatrix=function(E,k){this.recalcMatrix(E);var A=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=A[L];return k}return A},b.idle=function(E){this.center.idle(E),this.radius.idle(E),this.rotation.idle(E)},b.flush=function(E){this.center.flush(E),this.radius.flush(E),this.rotation.flush(E)},b.pan=function(E,k,A,L){k=k||0,A=A||0,L=L||0,this.recalcMatrix(E);var _=this.computedMatrix,C=_[1],M=_[5],p=_[9],P=h(C,M,p);C/=P,M/=P,p/=P;var T=_[0],F=_[4],q=_[8],V=T*C+F*M+q*p;T-=C*V,F-=M*V,q-=p*V;var H=h(T,F,q);T/=H,F/=H,q/=H;var X=_[2],G=_[6],N=_[10],W=X*C+G*M+N*p,re=X*T+G*F+N*q;X-=W*C+re*T,G-=W*M+re*F,N-=W*p+re*q;var ae=h(X,G,N);X/=ae,G/=ae,N/=ae;var _e=T*k+C*A,Me=F*k+M*A,ke=q*k+p*A;this.center.move(E,_e,Me,ke);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(E,Math.log(ge))},b.rotate=function(E,k,A,L){this.recalcMatrix(E),k=k||0,A=A||0;var _=this.computedMatrix,C=_[0],M=_[4],p=_[8],P=_[1],T=_[5],F=_[9],q=_[2],V=_[6],H=_[10],X=k*C+A*P,G=k*M+A*T,N=k*p+A*F,W=-(V*N-H*G),re=-(H*X-q*N),ae=-(q*G-V*X),_e=Math.sqrt(Math.max(0,1-Math.pow(W,2)-Math.pow(re,2)-Math.pow(ae,2))),Me=d(W,re,ae,_e);Me>1e-6?(W/=Me,re/=Me,ae/=Me,_e/=Me):(W=re=ae=0,_e=1);var ke=this.computedRotation,ge=ke[0],ie=ke[1],Te=ke[2],Ee=ke[3],Ae=ge*_e+Ee*W+ie*ae-Te*re,ze=ie*_e+Ee*re+Te*W-ge*ae,Ce=Te*_e+Ee*ae+ge*re-ie*W,me=Ee*_e-ge*W-ie*re-Te*ae;if(L){W=q,re=V,ae=H;var De=Math.sin(L)/h(W,re,ae);W*=De,re*=De,ae*=De,_e=Math.cos(k),Ae=Ae*_e+me*W+ze*ae-Ce*re,ze=ze*_e+me*re+Ce*W-Ae*ae,Ce=Ce*_e+me*ae+Ae*re-ze*W,me=me*_e-Ae*W-ze*re-Ce*ae}var ce=d(Ae,ze,Ce,me);ce>1e-6?(Ae/=ce,ze/=ce,Ce/=ce,me/=ce):(Ae=ze=Ce=0,me=1),this.rotation.set(E,Ae,ze,Ce,me)},b.lookAt=function(E,k,A,L){this.recalcMatrix(E),A=A||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var _=this.computedMatrix;l(_,k,A,L);var C=this.computedRotation;f(C,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),v(C,C),this.rotation.set(E,C[0],C[1],C[2],C[3]);for(var M=0,p=0;p<3;++p)M+=Math.pow(A[p]-k[p],2);this.radius.set(E,.5*Math.log(Math.max(M,1e-6))),this.center.set(E,A[0],A[1],A[2])},b.translate=function(E,k,A,L){this.center.move(E,k||0,A||0,L||0)},b.setMatrix=function(E,k){var A=this.computedRotation;f(A,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),v(A,A),this.rotation.set(E,A[0],A[1],A[2],A[3]);var L=this.computedMatrix;c(L,k);var _=L[15];if(Math.abs(_)>1e-6){var C=L[12]/_,M=L[13]/_,p=L[14]/_;this.recalcMatrix(E);var P=Math.exp(this.computedRadius[0]);this.center.set(E,C-L[2]*P,M-L[6]*P,p-L[10]*P),this.radius.idle(E)}else this.center.idle(E),this.radius.idle(E)},b.setDistance=function(E,k){k>0&&this.radius.set(E,Math.log(k))},b.setDistanceLimits=function(E,k){E>0?E=Math.log(E):E=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,E),this.radius.bounds[0][0]=E,this.radius.bounds[1][0]=k},b.getDistanceLimits=function(E){var k=this.radius.bounds;return E?(E[0]=Math.exp(k[0][0]),E[1]=Math.exp(k[1][0]),E):[Math.exp(k[0][0]),Math.exp(k[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(E){var k=this.lastT(),A=E.center;A&&this.center.set(k,A[0],A[1],A[2]);var L=E.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var _=E.distance;_&&_>0&&this.radius.set(k,Math.log(_)),this.setDistanceLimits(E.zoomMin,E.zoomMax)};function g(E){E=E||{};var k=E.center||[0,0,0],A=E.rotation||[0,0,0,1],L=E.radius||1;k=[].slice.call(k,0,3),A=[].slice.call(A,0,4),v(A,A);var _=new x(A,k,Math.log(L));return _.setDistanceLimits(E.zoomMin,E.zoomMax),("eye"in E||"up"in E)&&_.lookAt(0,E.eye,E.center,E.up),_}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v0){F=d[H][P][0],V=H;break}q=F[V^1];for(var X=0;X<2;++X)for(var G=d[X][P],N=0;N0&&(F=W,q=re,V=X)}return T||F&&g(F,V),q}function k(p,P){var T=d[P][p][0],F=[p];g(T,P);for(var q=T[P^1],V=P;;){for(;q!==p;)F.push(q),q=E(F[F.length-2],q,!1);if(d[0][p].length+d[1][p].length===0)break;var H=F[F.length-1],X=p,G=F[1],N=E(H,X,!0);if(s(c[H],c[X],c[G],c[N])<0)break;F.push(p),q=E(H,X)}return F}function A(p,P){return P[1]===P[P.length-1]}for(var v=0;v0;){var C=d[0][v].length,M=k(v,L);A(_,M)?_.push.apply(_,M):(_.length>0&&b.push(_),_=M)}_.length>0&&b.push(_)}return b}},5609:function(i,a,o){"use strict";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],x=0;x0;){var g=v.pop();h[g]=!1;for(var E=f[g],x=0;x0}C=C.filter(M);for(var p=C.length,P=new Array(p),T=new Array(p),_=0;_0;){var ce=Ce.pop(),Ge=Me[ce];h(Ge,function(ot,Dt){return ot-Dt});var nt=Ge.length,ct=me[ce],qt;if(ct===0){var G=C[ce];qt=[G]}for(var _=0;_=0)&&(me[rt]=ct^1,Ce.push(rt),ct===0)){var G=C[rt];ze(G)||(G.reverse(),qt.push(G))}}ct===0&&De.push(qt)}return De}},5085:function(i,a,o){i.exports=E;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(k){return function(A,L){var _=k[A];return _?!!_.queryPoint(L,f):!1}}function d(k){for(var A={},L=0;L0&&A[_]===L[0])C=k[_-1];else return 1;for(var M=1;C;){var p=C.key,P=s(L,p[0],p[1]);if(p[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 x(k){return 1}function b(k){return function(L){return k(L[0],L[1])?0:1}}function g(k,A){return function(_){return k(_[0],_[1])?0:A(_)}}function E(k){for(var A=k.length,L=[],_=[],C=0,M=0;M=x?(p=1,T=x+2*E+A):(p=-E/x,T=E*p+A)):(p=0,k>=0?(P=0,T=A):-k>=g?(P=1,T=g+2*k+A):(P=-k/g,T=k*P+A));else if(P<0)P=0,E>=0?(p=0,T=A):-E>=x?(p=1,T=x+2*E+A):(p=-E/x,T=E*p+A);else{var F=1/M;p*=F,P*=F,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+A}else{var q,V,H,X;p<0?(q=b+E,V=g+k,V>q?(H=V-q,X=x-2*b+g,H>=X?(p=1,P=0,T=x+2*E+A):(p=H/X,P=1-p,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+A)):(p=0,V<=0?(P=1,T=g+2*k+A):k>=0?(P=0,T=A):(P=-k/g,T=k*P+A))):P<0?(q=b+k,V=x+E,V>q?(H=V-q,X=x-2*b+g,H>=X?(P=1,p=0,T=g+2*k+A):(P=H/X,p=1-P,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+A)):(P=0,V<=0?(p=1,T=x+2*E+A):E>=0?(p=0,T=A):(p=-E/x,T=E*p+A))):(H=g+k-b-E,H<=0?(p=0,P=1,T=g+2*k+A):(X=x-2*b+g,H>=X?(p=1,P=0,T=x+2*E+A):(p=H/X,P=1-p,T=p*(x*p+b*P+2*E)+P*(b*p+g*P+2*k)+A)))}for(var G=1-p-P,v=0;v0){var g=f[d-1];if(s(x,g)===0&&u(g)!==b){d-=1;continue}}f[d++]=x}}return f.length=d,f}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var x=0,c=u;c0){if(V<=0)return H;X=q+V}else if(q<0){if(V>=0)return H;X=-(q+V)}else return H;var G=d*X;return H>=G||H<=-G?H:k(P,T,F)},function(P,T,F,q){var V=P[0]-q[0],H=T[0]-q[0],X=F[0]-q[0],G=P[1]-q[1],N=T[1]-q[1],W=F[1]-q[1],re=P[2]-q[2],ae=T[2]-q[2],_e=F[2]-q[2],Me=H*W,ke=X*N,ge=X*G,ie=V*W,Te=V*N,Ee=H*G,Ae=re*(Me-ke)+ae*(ge-ie)+_e*(Te-Ee),ze=(Math.abs(Me)+Math.abs(ke))*Math.abs(re)+(Math.abs(ge)+Math.abs(ie))*Math.abs(ae)+(Math.abs(Te)+Math.abs(Ee))*Math.abs(_e),Ce=v*ze;return Ae>Ce||-Ae>Ce?Ae:A(P,T,F,q)}];function _(p){var P=L[p.length];return P||(P=L[p.length]=E(p.length)),P.apply(void 0,p)}function C(p,P,T,F,q,V,H){return function(G,N,W,re,ae){switch(arguments.length){case 0:case 1:return 0;case 2:return F(G,N);case 3:return q(G,N,W);case 4:return V(G,N,W,re);case 5:return H(G,N,W,re,ae)}for(var _e=new Array(arguments.length),Me=0;Me0&&x>0||v<0&&x<0)return!1;var b=s(h,c,f),g=s(d,c,f);return b>0&&g>0||b<0&&g<0?!1:v===0&&x===0&&b===0&&g===0?l(c,f,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,x=0,b=Math.abs,g=s[v],E=b(g),k=-l[x],A=b(k),L,_;E=c?(L=g,v+=1,v=c?(L=g,v+=1,v>1,k=f[2*E+1];if(k===x)return E;x>1,k=f[2*E+1];if(k===x)return E;x>1,k=f[2*E+1];if(k===x)return E;x>1,k=f[2*E+1];if(k===x)return E;x>1,X=d(P[H],T);X<=0?(X===0&&(V=H),F=H+1):X>0&&(q=H-1)}return V}s=g;function E(P,T){for(var F=new Array(P.length),q=0,V=F.length;q=P.length||d(P[Me],H)!==0););}return F}s=E;function k(P,T){if(!T)return E(b(L(P,0)),P,0);for(var F=new Array(T),q=0;q>>W&1&&N.push(V[W]);T.push(N)}return x(T)}s=A;function L(P,T){if(T<0)return[];for(var F=[],q=(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}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(p){for(var P=0,T=Math.max,F=0,q=p.length;F>1,H=h(p[V],P);H<=0?(H===0&&(q=V),T=V+1):H>0&&(F=V-1)}return q}a.findCell=b;function g(p,P){for(var T=new Array(p.length),F=0,q=T.length;F=p.length||h(p[_e],V)!==0););}return T}a.incidence=g;function E(p,P){if(!P)return g(x(A(p,0)),p,0);for(var T=new Array(P),F=0;F>>N&1&&G.push(q[N]);P.push(G)}return v(P)}a.explode=k;function A(p,P){if(P<0)return[];for(var T=[],F=(1<>1:(ie>>1)-1}function F(ie){for(var Te=P(ie);;){var Ee=Te,Ae=2*ie+1,ze=2*(ie+1),Ce=ie;if(Ae0;){var Ee=T(ie);if(Ee>=0){var Ae=P(Ee);if(Te0){var ie=G[0];return p(0,re-1),re-=1,F(0),ie}return-1}function H(ie,Te){var Ee=G[ie];return E[Ee]===Te?ie:(E[Ee]=-1/0,q(ie),V(),E[Ee]=Te,re+=1,q(re-1))}function X(ie){if(!k[ie]){k[ie]=!0;var Te=b[ie],Ee=g[ie];b[Ee]>=0&&(b[Ee]=Te),g[Te]>=0&&(g[Te]=Ee),N[Te]>=0&&H(N[Te],M(Te)),N[Ee]>=0&&H(N[Ee],M(Ee))}}for(var G=[],N=new Array(v),A=0;A>1;A>=0;--A)F(A);for(;;){var ae=V();if(ae<0||E[ae]>d)break;X(ae)}for(var _e=[],A=0;A=0&&Ee>=0&&Te!==Ee){var Ae=N[Te],ze=N[Ee];Ae!==ze&&ge.push([Ae,ze])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),x=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),g=Math.max(f[0][1],f[1][1]);return xg?v-g:x-g}var E,k;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var v,x;if(c[0][0]c[1][0])v=c[1],x=c[0];else return-l(c,f);var b=s(h,d,x),g=s(h,d,v);if(b<0){if(g<=0)return b}else if(b>0){if(g>=0)return b}else if(g)return g;if(b=s(x,v,d),g=s(x,v,h),b<0){if(g<=0)return b}else if(b>0){if(g>=0)return b}else if(g)return g;return d[0]-x[0]}},4209:function(i,a,o){"use strict";i.exports=g;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(E,k,A){this.slabs=E,this.coordinates=k,this.horizontal=A}var h=f.prototype;function d(E,k){return E.y-k}function v(E,k){for(var A=null;E;){var L=E.key,_,C;L[0][0]0)if(k[0]!==L[1][0])A=E,E=E.right;else{var p=v(E.right,k);if(p)return p;E=E.left}else{if(k[0]!==L[1][0])return E;var p=v(E.right,k);if(p)return p;E=E.left}}return A}h.castUp=function(E){var k=s.le(this.coordinates,E[0]);if(k<0)return-1;var A=this.slabs[k],L=v(this.slabs[k],E),_=-1;if(L&&(_=L.value),this.coordinates[k]===E[0]){var C=null;if(L&&(C=L.key),k>0){var M=v(this.slabs[k-1],E);M&&(C?c(M.key,C)>0&&(C=M.key,_=M.value):(_=M.value,C=M.key))}var p=this.horizontal[k];if(p.length>0){var P=s.ge(p,E[1],d);if(P=p.length)return _;T=p[P]}}if(T.start)if(C){var F=u(C[0],C[1],[E[0],T.y]);C[0][0]>C[1][0]&&(F=-F),F>0&&(_=T.index)}else _=T.index;else T.y!==E[1]&&(_=T.index)}}}return _};function x(E,k,A,L){this.y=E,this.index=k,this.start=A,this.closed=L}function b(E,k,A,L){this.x=E,this.segment=k,this.create=A,this.index=L}function g(E){for(var k=E.length,A=2*k,L=new Array(A),_=0;_1&&(k=1);for(var A=1-k,L=v.length,_=new Array(L),C=0;C0||E>0&&_<0){var C=c(k,_,A,E);b.push(C),g.push(C.slice())}_<0?g.push(A.slice()):_>0?b.push(A.slice()):(b.push(A.slice()),g.push(A.slice())),E=_}return{positive:b,negative:g}}function h(v,x){for(var b=[],g=u(v[v.length-1],x),E=v[v.length-1],k=v[0],A=0;A0||g>0&&L<0)&&b.push(c(E,L,k,g)),L>=0&&b.push(k.slice()),g=L}return b}function d(v,x){for(var b=[],g=u(v[v.length-1],x),E=v[v.length-1],k=v[0],A=0;A0||g>0&&L<0)&&b.push(c(E,L,k,g)),L<=0&&b.push(k.slice()),g=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(v){return f(d(v),arguments)}function c(v,x){return u.apply(null,[v].concat(x||[]))}function f(v,x){var b=1,g=v.length,E,k="",A,L,_,C,M,p,P,T;for(A=0;A=0),_.type){case"b":E=parseInt(E,10).toString(2);break;case"c":E=String.fromCharCode(parseInt(E,10));break;case"d":case"i":E=parseInt(E,10);break;case"j":E=JSON.stringify(E,null,_.width?parseInt(_.width):0);break;case"e":E=_.precision?parseFloat(E).toExponential(_.precision):parseFloat(E).toExponential();break;case"f":E=_.precision?parseFloat(E).toFixed(_.precision):parseFloat(E);break;case"g":E=_.precision?String(Number(E.toPrecision(_.precision))):parseFloat(E);break;case"o":E=(parseInt(E,10)>>>0).toString(8);break;case"s":E=String(E),E=_.precision?E.substring(0,_.precision):E;break;case"t":E=String(!!E),E=_.precision?E.substring(0,_.precision):E;break;case"T":E=Object.prototype.toString.call(E).slice(8,-1).toLowerCase(),E=_.precision?E.substring(0,_.precision):E;break;case"u":E=parseInt(E,10)>>>0;break;case"v":E=E.valueOf(),E=_.precision?E.substring(0,_.precision):E;break;case"x":E=(parseInt(E,10)>>>0).toString(16);break;case"X":E=(parseInt(E,10)>>>0).toString(16).toUpperCase();break}l.json.test(_.type)?k+=E:(l.number.test(_.type)&&(!P||_.sign)?(T=P?"+":"-",E=E.toString().replace(l.sign,"")):T="",M=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",p=_.width-(T+E).length,C=_.width&&p>0?M.repeat(p):"",k+=_.align?T+E+C:M==="0"?T+C+E:C+T+E)}return k}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var x=v,b,g=[],E=0;x;){if((b=l.text.exec(x))!==null)g.push(b[0]);else if((b=l.modulo.exec(x))!==null)g.push("%");else if((b=l.placeholder.exec(x))!==null){if(b[2]){E|=1;var k=[],A=b[2],L=[];if((L=l.key.exec(A))!==null)for(k.push(L[1]);(A=A.substring(L[0].length))!=="";)if((L=l.key_access.exec(A))!==null)k.push(L[1]);else if((L=l.index_access.exec(A))!==null)k.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]=k}else E|=2;if(E===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.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");x=x.substring(b[0].length)}return h[v]=g}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),l=o(781),u={"2d":function(v,x,b){var g=v({order:x,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(k,A,L,_){return k>_|0},vertex:function(k,A,L,_,C,M,p,P,T,F,q,V,H){var X=(p<<0)+(P<<1)+(T<<2)+(F<<3)|0;if(!(X===0||X===15))switch(X){case 0:q.push([k-.5,A-.5]);break;case 1:q.push([k-.25-.25*(_+L-2*H)/(L-_),A-.25-.25*(C+L-2*H)/(L-C)]);break;case 2:q.push([k-.75-.25*(-_-L+2*H)/(_-L),A-.25-.25*(M+_-2*H)/(_-M)]);break;case 3:q.push([k-.5,A-.5-.5*(C+L+M+_-4*H)/(L-C+_-M)]);break;case 4:q.push([k-.25-.25*(M+C-2*H)/(C-M),A-.75-.25*(-C-L+2*H)/(C-L)]);break;case 5:q.push([k-.5-.5*(_+L+M+C-4*H)/(L-_+C-M),A-.5]);break;case 6:q.push([k-.5-.25*(-_-L+M+C)/(_-L+C-M),A-.5-.25*(-C-L+M+_)/(C-L+_-M)]);break;case 7:q.push([k-.75-.25*(M+C-2*H)/(C-M),A-.75-.25*(M+_-2*H)/(_-M)]);break;case 8:q.push([k-.75-.25*(-M-C+2*H)/(M-C),A-.75-.25*(-M-_+2*H)/(M-_)]);break;case 9:q.push([k-.5-.25*(_+L+-M-C)/(L-_+M-C),A-.5-.25*(C+L+-M-_)/(L-C+M-_)]);break;case 10:q.push([k-.5-.5*(-_-L+-M-C+4*H)/(_-L+M-C),A-.5]);break;case 11:q.push([k-.25-.25*(-M-C+2*H)/(M-C),A-.75-.25*(C+L-2*H)/(L-C)]);break;case 12:q.push([k-.5,A-.5-.5*(-C-L+-M-_+4*H)/(C-L+M-_)]);break;case 13:q.push([k-.75-.25*(_+L-2*H)/(L-_),A-.25-.25*(-M-_+2*H)/(M-_)]);break;case 14:q.push([k-.25-.25*(-_-L+2*H)/(_-L),A-.25-.25*(-C-L+2*H)/(C-L)]);break;case 15:q.push([k-.5,A-.5]);break}},cell:function(k,A,L,_,C,M,p,P,T){C?P.push([k,A]):P.push([A,k])}});return function(E,k){var A=[],L=[];return g(E,A,L,k),{positions:A,cells:L}}}};function c(v,x){var b=v.length+"d",g=u[b];if(g)return g(s,v,x)}function f(v,x){for(var b=l(v,x),g=b.length,E=new Array(g),k=new Array(g),A=0;AMath.max(_,C)?M[2]=1:_>Math.max(L,C)?M[0]=1:M[1]=1;for(var p=0,P=0,T=0;T<3;++T)p+=A[T]*A[T],P+=M[T]*A[T];for(var T=0;T<3;++T)M[T]-=P/p*A[T];return f(M,M),M}function b(A,L,_,C,M,p,P,T){this.center=s(_),this.up=s(C),this.right=s(M),this.radius=s([p]),this.angle=s([P,T]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,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 F=0;F<16;++F)this.computedMatrix[F]=.5;this.recalcMatrix(0)}var g=b.prototype;g.setDistanceLimits=function(A,L){A>0?A=Math.log(A):A=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=L},g.getDistanceLimits=function(A){var L=this.radius.bounds[0];return A?(A[0]=Math.exp(L[0][0]),A[1]=Math.exp(L[1][0]),A):[Math.exp(L[0][0]),Math.exp(L[1][0])]},g.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var L=this.computedUp,_=this.computedRight,C=0,M=0,p=0;p<3;++p)M+=L[p]*_[p],C+=L[p]*L[p];for(var P=Math.sqrt(C),T=0,p=0;p<3;++p)_[p]-=L[p]*M/C,T+=_[p]*_[p],L[p]/=P;for(var F=Math.sqrt(T),p=0;p<3;++p)_[p]/=F;var q=this.computedToward;c(q,L,_),f(q,q);for(var V=Math.exp(this.computedRadius[0]),H=this.computedAngle[0],X=this.computedAngle[1],G=Math.cos(H),N=Math.sin(H),W=Math.cos(X),re=Math.sin(X),ae=this.computedCenter,_e=G*W,Me=N*W,ke=re,ge=-G*re,ie=-N*re,Te=W,Ee=this.computedEye,Ae=this.computedMatrix,p=0;p<3;++p){var ze=_e*_[p]+Me*q[p]+ke*L[p];Ae[4*p+1]=ge*_[p]+ie*q[p]+Te*L[p],Ae[4*p+2]=ze,Ae[4*p+3]=0}var Ce=Ae[1],me=Ae[5],De=Ae[9],ce=Ae[2],Ge=Ae[6],nt=Ae[10],ct=me*nt-De*Ge,qt=De*ce-Ce*nt,rt=Ce*Ge-me*ce,ot=d(ct,qt,rt);ct/=ot,qt/=ot,rt/=ot,Ae[0]=ct,Ae[4]=qt,Ae[8]=rt;for(var p=0;p<3;++p)Ee[p]=ae[p]+Ae[2+4*p]*V;for(var p=0;p<3;++p){for(var T=0,Dt=0;Dt<3;++Dt)T+=Ae[p+4*Dt]*Ee[Dt];Ae[12+p]=-T}Ae[15]=1},g.getMatrix=function(A,L){this.recalcMatrix(A);var _=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=_[C];return L}return _};var E=[0,0,0];g.rotate=function(A,L,_,C){if(this.angle.move(A,L,_),C){this.recalcMatrix(A);var M=this.computedMatrix;E[0]=M[2],E[1]=M[6],E[2]=M[10];for(var p=this.computedUp,P=this.computedRight,T=this.computedToward,F=0;F<3;++F)M[4*F]=p[F],M[4*F+1]=P[F],M[4*F+2]=T[F];u(M,M,C,E);for(var F=0;F<3;++F)p[F]=M[4*F],P[F]=M[4*F+1];this.up.set(A,p[0],p[1],p[2]),this.right.set(A,P[0],P[1],P[2])}},g.pan=function(A,L,_,C){L=L||0,_=_||0,C=C||0,this.recalcMatrix(A);var M=this.computedMatrix,p=Math.exp(this.computedRadius[0]),P=M[1],T=M[5],F=M[9],q=d(P,T,F);P/=q,T/=q,F/=q;var V=M[0],H=M[4],X=M[8],G=V*P+H*T+X*F;V-=P*G,H-=T*G,X-=F*G;var N=d(V,H,X);V/=N,H/=N,X/=N;var W=V*L+P*_,re=H*L+T*_,ae=X*L+F*_;this.center.move(A,W,re,ae);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(A,Math.log(_e))},g.translate=function(A,L,_,C){this.center.move(A,L||0,_||0,C||0)},g.setMatrix=function(A,L,_,C){var M=1;typeof _=="number"&&(M=_|0),(M<0||M>3)&&(M=1);var p=(M+2)%3,P=(M+1)%3;L||(this.recalcMatrix(A),L=this.computedMatrix);var T=L[M],F=L[M+4],q=L[M+8];if(C){var H=Math.abs(T),X=Math.abs(F),G=Math.abs(q),N=Math.max(H,X,G);H===N?(T=T<0?-1:1,F=q=0):G===N?(q=q<0?-1:1,T=F=0):(F=F<0?-1:1,T=q=0)}else{var V=d(T,F,q);T/=V,F/=V,q/=V}var W=L[p],re=L[p+4],ae=L[p+8],_e=W*T+re*F+ae*q;W-=T*_e,re-=F*_e,ae-=q*_e;var Me=d(W,re,ae);W/=Me,re/=Me,ae/=Me;var ke=F*ae-q*re,ge=q*W-T*ae,ie=T*re-F*W,Te=d(ke,ge,ie);ke/=Te,ge/=Te,ie/=Te,this.center.jump(A,er,Ke,xt),this.radius.idle(A),this.up.jump(A,T,F,q),this.right.jump(A,W,re,ae);var Ee,Ae;if(M===2){var ze=L[1],Ce=L[5],me=L[9],De=ze*W+Ce*re+me*ae,ce=ze*ke+Ce*ge+me*ie;qt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Ae=Math.atan2(ce,De)}else{var Ge=L[2],nt=L[6],ct=L[10],qt=Ge*T+nt*F+ct*q,rt=Ge*W+nt*re+ct*ae,ot=Ge*ke+nt*ge+ct*ie;Ee=Math.asin(v(qt)),Ae=Math.atan2(ot,rt)}this.angle.jump(A,Ae,Ee),this.recalcMatrix(A);var Dt=L[2],kt=L[6],Ct=L[10],Yt=this.computedMatrix;l(Yt,L);var xr=Yt[15],er=Yt[12]/xr,Ke=Yt[13]/xr,xt=Yt[14]/xr,bt=Math.exp(this.computedRadius[0]);this.center.jump(A,er-Dt*bt,Ke-kt*bt,xt-Ct*bt)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},g.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},g.setDistance=function(A,L){L>0&&this.radius.set(A,Math.log(L))},g.lookAt=function(A,L,_,C){this.recalcMatrix(A),L=L||this.computedEye,_=_||this.computedCenter,C=C||this.computedUp;var M=C[0],p=C[1],P=C[2],T=d(M,p,P);if(!(T<1e-6)){M/=T,p/=T,P/=T;var F=L[0]-_[0],q=L[1]-_[1],V=L[2]-_[2],H=d(F,q,V);if(!(H<1e-6)){F/=H,q/=H,V/=H;var X=this.computedRight,G=X[0],N=X[1],W=X[2],re=M*G+p*N+P*W;G-=re*M,N-=re*p,W-=re*P;var ae=d(G,N,W);if(!(ae<.01&&(G=p*V-P*q,N=P*F-M*V,W=M*q-p*F,ae=d(G,N,W),ae<1e-6))){G/=ae,N/=ae,W/=ae,this.up.set(A,M,p,P),this.right.set(A,G,N,W),this.center.set(A,_[0],_[1],_[2]),this.radius.set(A,Math.log(H));var _e=p*W-P*N,Me=P*G-M*W,ke=M*N-p*G,ge=d(_e,Me,ke);_e/=ge,Me/=ge,ke/=ge;var ie=M*F+p*q+P*V,Te=G*F+N*q+W*V,Ee=_e*F+Me*q+ke*V,Ae=Math.asin(v(ie)),ze=Math.atan2(Ee,Te),Ce=this.angle._state,me=Ce[Ce.length-1],De=Ce[Ce.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-ze),Ge=Math.abs(me-ze),nt=Math.abs(me-2*Math.PI-ze);ce0?W.pop():new ArrayBuffer(G)}a.mallocArrayBuffer=E;function k(X){return new Uint8Array(E(X),0,X)}a.mallocUint8=k;function A(X){return new Uint16Array(E(2*X),0,X)}a.mallocUint16=A;function L(X){return new Uint32Array(E(4*X),0,X)}a.mallocUint32=L;function _(X){return new Int8Array(E(X),0,X)}a.mallocInt8=_;function C(X){return new Int16Array(E(2*X),0,X)}a.mallocInt16=C;function M(X){return new Int32Array(E(4*X),0,X)}a.mallocInt32=M;function p(X){return new Float32Array(E(4*X),0,X)}a.mallocFloat32=a.mallocFloat=p;function P(X){return new Float64Array(E(8*X),0,X)}a.mallocFloat64=a.mallocDouble=P;function T(X){return c?new Uint8ClampedArray(E(X),0,X):k(X)}a.mallocUint8Clamped=T;function F(X){return f?new BigUint64Array(E(8*X),0,X):null}a.mallocBigUint64=F;function q(X){return h?new BigInt64Array(E(8*X),0,X):null}a.mallocBigInt64=q;function V(X){return new DataView(E(X),0,X)}a.mallocDataView=V;function H(X){X=s.nextPow2(X);var G=s.log2(X),N=x[G];return N.length>0?N.pop():new u(X)}a.mallocBuffer=H,a.clearCache=function(){for(var G=0;G<32;++G)d.UINT8[G].length=0,d.UINT16[G].length=0,d.UINT32[G].length=0,d.INT8[G].length=0,d.INT16[G].length=0,d.INT32[G].length=0,d.FLOAT[G].length=0,d.DOUBLE[G].length=0,d.BIGUINT64[G].length=0,d.BIGINT64[G].length=0,d.UINT8C[G].length=0,v[G].length=0,x[G].length=0}},1755:function(i){"use strict";"use restrict";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",W="",re=N.length,ae=W.length,_e=H[0]===E||H[0]===L,Me=0,ke=-ae;Me>-1&&(Me=X.indexOf(N,Me),!(Me===-1||(ke=X.indexOf(W,Me+re),ke===-1)||ke<=Me));){for(var ge=Me;ge=ke)G[ge]=null,X=X.substr(0,ge)+" "+X.substr(ge+1);else if(G[ge]!==null){var ie=G[ge].indexOf(H[0]);ie===-1?G[ge]+=H:_e&&(G[ge]=G[ge].substr(0,ie+1)+(1+parseInt(G[ge][ie+1]))+G[ge].substr(ie+2))}var Te=Me+re,Ee=X.substr(Te,ke-Te),Ae=Ee.indexOf(N);Ae!==-1?Me=Ae:Me=ke+ae}return G}function M(V,H,X){for(var G=H.textAlign||"start",N=H.textBaseline||"alphabetic",W=[1<<30,1<<30],re=[0,0],ae=V.length,_e=0;_e/g,` +`):X=X.replace(/\/g," ");var re="",ae=[];for(me=0;me-1?parseInt(Ke[1+Lt]):0,dt=St>-1?parseInt(xt[1+St]):0;Et!==dt&&(bt=bt.replace(rt(),"?px "),Ge*=Math.pow(.75,dt-Et),bt=bt.replace("?px ",rt())),ce+=.25*ie*(dt-Et)}if(W.superscripts===!0){var Ht=Ke.indexOf(E),$t=xt.indexOf(E),fr=Ht>-1?parseInt(Ke[1+Ht]):0,_r=$t>-1?parseInt(xt[1+$t]):0;fr!==_r&&(bt=bt.replace(rt(),"?px "),Ge*=Math.pow(.75,_r-fr),bt=bt.replace("?px ",rt())),ce-=.25*ie*(_r-fr)}if(W.bolds===!0){var Br=Ke.indexOf(v)>-1,Or=xt.indexOf(v)>-1;!Br&&Or&&(Nr?bt=bt.replace("italic ","italic bold "):bt="bold "+bt),Br&&!Or&&(bt=bt.replace("bold ",""))}if(W.italics===!0){var Nr=Ke.indexOf(b)>-1,ut=xt.indexOf(b)>-1;!Nr&&ut&&(bt="italic "+bt),Nr&&!ut&&(bt=bt.replace("italic ",""))}H.font=bt}for(Ce=0;Ce0&&(N=G.size),G.lineSpacing&&G.lineSpacing>0&&(W=G.lineSpacing),G.styletags&&G.styletags.breaklines&&(re.breaklines=!!G.styletags.breaklines),G.styletags&&G.styletags.bolds&&(re.bolds=!!G.styletags.bolds),G.styletags&&G.styletags.italics&&(re.italics=!!G.styletags.italics),G.styletags&&G.styletags.subscripts&&(re.subscripts=!!G.styletags.subscripts),G.styletags&&G.styletags.superscripts&&(re.superscripts=!!G.styletags.superscripts)),X.font=[G.fontStyle,G.fontVariant,G.fontWeight,N+"px",G.font].filter(function(_e){return _e}).join(" "),X.textAlign="start",X.textBaseline="alphabetic",X.direction="ltr";var ae=p(H,X,V,N,W,re);return F(ae,G,N)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(T){T.permitHostObjects___&&T.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,x="weakmap:",b=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var g=new ArrayBuffer(25),E=new Uint8Array(g);crypto.getRandomValues(E),b=x+"rand:"+Array.prototype.map.call(E,function(T){return(T%36).toString(36)}).join("")+"___"}function k(T){return!(T.substr(0,x.length)==x&&T.substr(T.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(F){return h(F).filter(k)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(F){return S(F).filter(k)}})}function L(T){if(T!==Object(T))throw new TypeError("Not an object: "+T);var F=T[b];if(F&&F.key===T)return F;if(v(T)){F={key:T};try{return d(T,b,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch(q){return}}}(function(){var T=Object.freeze;d(Object,"freeze",{value:function(H){return L(H),T(H)}});var F=Object.seal;d(Object,"seal",{value:function(H){return L(H),F(H)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(H){return L(H),q(H)}})})();function _(T){return T.prototype=null,Object.freeze(T)}var C=!1;function M(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var p=0,P=function(){this instanceof P||M();var T=[],F=[],q=p++;function V(N,W){var re,ae=L(N);return ae?q in ae?ae[q]:W:(re=T.indexOf(N),re>=0?F[re]:W)}function H(N){var W=L(N);return W?q in W:T.indexOf(N)>=0}function X(N,W){var re,ae=L(N);return ae?ae[q]=W:(re=T.indexOf(N),re>=0?F[re]=W:(re=T.length,F[re]=W,T[re]=N)),this}function G(N){var W=L(N),re,ae;return W?q in W&&delete W[q]:(re=T.indexOf(N),re<0?!1:(ae=T.length-1,T[re]=void 0,F[re]=F[ae],T[re]=T[ae],T.length=ae,F.length=ae,!0))}return Object.create(P.prototype,{get___:{value:_(V)},has___:{value:_(H)},set___:{value:_(X)},delete___:{value:_(G)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(F,q){return this.get___(F,q)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,q){return this.set___(F,q)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function T(){this instanceof P||M();var F=new l,q=void 0,V=!1;function H(W,re){return q?F.has(W)?F.get(W):q.get___(W,re):F.get(W,re)}function X(W){return F.has(W)||(q?q.has___(W):!1)}var G;s?G=function(W,re){return F.set(W,re),F.has(W)||(q||(q=new P),q.set(W,re)),this}:G=function(W,re){if(V)try{F.set(W,re)}catch(ae){q||(q=new P),q.set___(W,re)}else F.set(W,re);return this};function N(W){var re=!!F.delete(W);return q&&q.delete___(W)||re}return Object.create(P.prototype,{get___:{value:_(H)},has___:{value:_(X)},set___:{value:_(G)},delete___:{value:_(N)},permitHostObjects___:{value:_(function(W){if(W===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)})()},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349:function(i){"use strict";function a(){return function(f,h,d,v,x,b){var g=f[0],E=d[0],k=[0],S=E;v|=0;var L=0,_=E;for(L=0;L=0!=M>=0&&x.push(k[0]+.5+.5*(C+M)/(C-M))}v+=_,++k[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,x,b){var g=v.dtype,E=v.order,k=[g,E.join()].join(),S=h[k];return S||(h[k]=S=f([g,E])),S(v.shape.slice(0),v.data,v.stride,v.offset|0,x,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);oLe.exports=n})()});var lLe=ye((Xdr,sLe)=>{"use strict";sLe.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 hLe=ye((Ydr,fLe)=>{"use strict";var uLe=lLe();fLe.exports=Q6t;var cLe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Q6t(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),uLe[e])r=uLe[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(cLe[h]!==void 0)return cLe[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 vLe=ye((Kdr,dLe)=>{"use strict";dLe.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var gLe=ye((Jdr,pLe)=>{"use strict";var eLt=vLe();pLe.exports={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;if(r===0)return l=n*255,[l,l,l];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,s=[0,0,0];for(var u=0;u<3;u++)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,6*o<1?l=i+(a-i)*6*o:2*o<1?l=a:3*o<2?l=i+(a-i)*(2/3-o)*6:l=i,s[u]=l*255;return s}};eLt.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 O5=ye(($dr,mLe)=>{mLe.exports=tLt;function tLt(e,t,r){return tr?r:e:et?t:e}});var rZ=ye((Qdr,yLe)=>{"use strict";var rLt=hLe(),iLt=gLe(),VR=O5();yLe.exports=function(t){var r,n,i,a=rLt(t);return a.space?(r=Array(3),r[0]=VR(a.values[0],0,255),r[1]=VR(a.values[1],0,255),r[2]=VR(a.values[2],0,255),a.space[0]==="h"&&(r=iLt.rgb(r)),r.push(VR(a.alpha,0,1)),r):[]}});var HR=ye((evr,_Le)=>{_Le.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((tvr,xLe)=>{"use strict";var nLt=rZ(),GR=O5(),aLt=HR();xLe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=aLt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=nLt(t),t[0]/=255,t[1]/=255,t[2]/=255),oLt(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]=GR(Math.floor(t[0]*255),0,255),i[1]=GR(Math.floor(t[1]*255),0,255),i[2]=GR(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:GR(Math.floor(t[3]*255),0,255)),i)};function oLt(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((rvr,bLe)=>{"use strict";var sLt=J_();function lLt(e){return e?sLt(e):[0,0,0,1]}bLe.exports=lLt});var $y=ye((ivr,kLe)=>{"use strict";var MLe=uo(),uLt=id(),jR=J_(),WR=Mu(),cLt=dh().defaultLine,wLe=vv().isArrayOrTypedArray,iZ=jR(cLt),ELe=1;function TLe(e,t){var r=e;return r[3]*=t,r}function ALe(e){if(MLe(e))return iZ;var t=jR(e);return t.length?t:iZ}function SLe(e){return MLe(e)?e:ELe}function fLt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=wLe(n),a=wLe(t),o=WR.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=WR.makeColorScaleFuncFromTrace(e):l=ALe,i?u=function(v,x){return v[x]===void 0?iZ:jR(l(v[x]))}:u=ALe,a?c=function(v,x){return v[x]===void 0?ELe:SLe(v[x])}:c=SLe,i||a)for(var d=0;d{"use strict";CLe.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 ZR=ye((avr,LLe)=>{"use strict";LLe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var ILe=ye((ovr,PLe)=>{"use strict";var dLt=ba();function aZ(e,t,r,n){if(!t||!t.visible)return null;for(var i=dLt.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 vLt(e){for(var t=0;t{"use strict";var gLt=Dd().gl_line3d,DLe=Dd().gl_scatter3d,mLt=Dd().gl_error3d,yLt=Dd().gl_mesh3d,_Lt=Dd().delaunay_triangulate,Qy=Mr(),OLe=Jy(),XR=$y().formatColor,xLt=S3(),oZ=nZ(),bLt=ZR(),wLt=Qa(),TLt=rp().appendArrayPointValue,ALt=ILe();function BLe(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 lZ=BLe.prototype;lZ.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 SLt(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 zLe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function ELt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var u=SLt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=yLt(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)};lZ.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 PLt(e,t){var r=new BLe(e,t.uid);return r.update(t),r}NLe.exports=PLt});var dZ=ye((lvr,GLe)=>{"use strict";var e1=Uc(),ILt=Su(),hZ=Kl(),uZ=Oc().axisHoverFormat,DLt=Wo().hovertemplateAttrs,RLt=Wo().texttemplateAttrs,VLe=vl(),zLt=nZ(),FLt=ZR(),Yg=no().extendFlat,qLt=Bu().overrideAll,HLe=X1(),OLt=e1.line,N2=e1.marker,BLt=N2.line,NLt=Yg({width:OLt.width,dash:{valType:"enumerated",values:HLe(zLt),dflt:"solid"}},hZ("line"));function cZ(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 fZ=GLe.exports=qLt({x:e1.x,y:e1.y,z:{valType:"data_array"},text:Yg({},e1.text,{}),texttemplate:RLt({},{}),hovertext:Yg({},e1.hovertext,{}),hovertemplate:DLt(),xhoverformat:uZ("x"),yhoverformat:uZ("y"),zhoverformat:uZ("z"),mode:Yg({},e1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:cZ("x"),y:cZ("y"),z:cZ("z")},connectgaps:e1.connectgaps,line:NLt,marker:Yg({symbol:{valType:"enumerated",values:HLe(FLt),dflt:"circle",arrayOk:!0},size:Yg({},N2.size,{dflt:8}),sizeref:N2.sizeref,sizemin:N2.sizemin,sizemode:N2.sizemode,opacity:Yg({},N2.opacity,{arrayOk:!1}),colorbar:N2.colorbar,line:Yg({width:Yg({},BLt.width,{arrayOk:!1})},hZ("marker.line"))},hZ("marker")),textposition:Yg({},e1.textposition,{dflt:"top center"}),textfont:ILt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:VLe.opacity,hoverinfo:Yg({},VLe.hoverinfo)},"calc","nested");fZ.x.editType=fZ.y.editType=fZ.z.editType="calc+clearAxisTypes"});var ZLe=ye((uvr,WLe)=>{"use strict";var jLe=ba(),ULt=Mr(),vZ=lu(),VLt=$p(),HLt=D0(),GLt=R0(),jLt=dZ();WLe.exports=function(t,r,n,i){function a(d,v){return ULt.coerce(t,r,jLt,d,v)}var o=WLt(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),vZ.hasMarkers(r)&&VLt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),vZ.hasLines(r)&&(a("connectgaps"),HLt(t,r,n,i,a)),vZ.hasText(r)&&(a("texttemplate"),GLt(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=jLe.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 WLt(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=jLe.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 YLe=ye((cvr,XLe)=>{"use strict";var ZLt=km(),XLt=z0();XLe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return ZLt(n,r),XLt(t,r),n}});var JLe=ye((fvr,KLe)=>{KLe.exports=YLt;function YLt(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 KLt=JLe();$Le.exports=function(t){return KLt("webgl",t)}});var pZ=ye((dvr,tPe)=>{"use strict";var ePe=va(),JLt=function(){};tPe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=JLt);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=ePe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=ePe.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 nPe=ye((vvr,iPe)=>{"use strict";var U2=Jy(),$Lt=Mr(),QLt=["xaxis","yaxis","zaxis"];function rPe(){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 ePt=rPe.prototype;ePt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[QLt[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?$Lt.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=U2(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]=U2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=U2(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]=U2(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]=U2(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]=U2(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]=U2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function tPt(e,t){var r=new rPe;return r.merge(e,t),r}iPe.exports=tPt});var sPe=ye((pvr,oPe)=>{"use strict";var rPt=Jy(),iPt=["xaxis","yaxis","zaxis"];function aPe(){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 nPt=aPe.prototype;nPt.merge=function(e){for(var t=0;t<3;++t){var r=e[iPt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=rPt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function aPt(e){var t=new aPe;return t.merge(e),t}oPe.exports=aPt});var cPe=ye((gvr,uPe)=>{"use strict";uPe.exports=cPt;var lPe=Qa(),oPt=Mr(),sPt=["xaxis","yaxis","zaxis"],lPt=[0,0,0];function uPt(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){lPt[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=uPt(i)}});var mPe=ye((mvr,gPe)=>{"use strict";var dPe=Dd().gl_plot3d,fPt=dPe.createCamera,fPe=dPe.createScene,hPt=QLe(),dPt=EL(),JR=ba(),up=Mr(),KR=up.preserveDrawingBuffer(),$R=Qa(),Kg=Nc(),vPt=Jy(),pPt=pZ(),gPt=RU(),mPt=nPe(),yPt=sPe(),_Pt=cPe(),xPt=wg().applyAutorangeOptions,VE,YR,vPe=!1;function pPe(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=mPt(t,t[this.id]),this.spikeOptions=yPt(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=JR.getComponentMethod("annotations3d","convert"),this.drawAnnotations=JR.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var wv=pPe.prototype;wv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:KR,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(!YR&&(VE=document.createElement("canvas"),YR=hPt({canvas:VE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!YR))throw new Error("error creating static canvas/context for image server");t.gl=YR,t.canvas=VE}return t};var hPe=!0;wv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=fPe(t)}catch(n){if(e.staticMode||!hPe||KR)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{KR=t.glOptions.preserveDrawingBuffer=!0,e.glplot=fPe(t)}catch(i){KR=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return hPe=!1,r};wv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=fPt(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"})};wv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return pPt(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(){vPe=!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)}},dPt?{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};wv.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),_Pt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(g.valueLabel=$R.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),_.push("value: "+g.valueLabel),f.textLabel&&_.push(f.textLabel),L=_.join("
")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:b};Kg.appendArrayPointValue(C,x,b),r._module.eventData&&(C=x._module.eventData(C,f,x,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var p=[];Kg.loneHover({trace:x,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:g.xLabel,yLabel:g.yLabel,zLabel:g.zLabel,text:L,name:c.name,color:Kg.castHoverOption(x,b,"bgcolor")||c.color,borderColor:Kg.castHoverOption(x,b,"bordercolor"),fontFamily:Kg.castHoverOption(x,b,"font.family"),fontSize:Kg.castHoverOption(x,b,"font.size"),fontColor:Kg.castHoverOption(x,b,"font.color"),nameLength:Kg.castHoverOption(x,b,"namelength"),textAlign:Kg.castHoverOption(x,b,"align"),hovertemplate:up.castOption(x,b,"hovertemplate"),hovertemplateLabels:up.extendFlat({},C,g),eventData:[C]},{container:n,gd:t,inOut_bbox:p}),C.bbox=p[0]}f.distance<5&&(f.buttons||vPe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Kg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};wv.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 HE=["xaxis","yaxis","zaxis"];function bPt(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=HE[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;dx[1][o])x[0][o]=-1,x[1][o]=1;else{var T=x[1][o]-x[0][o];x[0][o]-=T/32,x[1][o]+=T/32}if(E=[x[0][o],x[1][o]],E=xPt(E,l),x[0][o]=E[0],x[1][o]=E[1],l.isReversed()){var F=x[0][o];x[0][o]=x[1][o],x[1][o]=F}}else E=l.range,x[0][o]=l.r2l(E[0]),x[1][o]=l.r2l(E[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),b[o]=x[1][o]-x[0][o],l.range=[x[0][o],x[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var q,V=c.aspectmode;if(V==="cube")q=[1,1,1];else if(V==="manual"){var H=c.aspectratio;q=[H.x,H.y,H.z]}else if(V==="auto"||V==="data"){var X=[1,1,1];for(o=0;o<3;++o){l=c[HE[o]],u=l.type;var G=g[u];X[o]=Math.pow(G.acc,1/G.count)/d[o]}V==="data"||Math.max.apply(null,X)/Math.min.apply(null,X)<=4?q=X:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=q[0],c.aspectratio.y=f.aspectratio.y=q[1],c.aspectratio.z=f.aspectratio.z=q[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,W=t._size||null;if(N&&W){var re=n.container.style;re.position="absolute",re.left=W.l+N.x[0]*W.w+"px",re.top=W.t+(1-N.y[1])*W.h+"px",re.width=W.w*(N.x[1]-N.x[0])+"px",re.height=W.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};wv.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 TPt(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 APt(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"}}}wv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),APt(e.camera)};wv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,TPt(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())};wv.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};wv.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};wv.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),JR.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};wv.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;JR.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,up.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function SPt(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)}}wv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(VE),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),SPt(a,n,i),MPt(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(VE),u};wv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[HE[t]];$R.setConvert(r,e.fullLayout),r.setScale=up.noop}};wv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},$R.setConvert(e._mockAxis,r)};gPe.exports=pPe});var _Pe=ye((yvr,yPe)=>{"use strict";yPe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var mZ=ye((_vr,xPe)=>{"use strict";var EPt=va(),cs=Cd(),gZ=no().extendFlat,kPt=Bu().overrideAll;xPe.exports=kPt({visible:cs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:EPt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:cs.color,categoryorder:cs.categoryorder,categoryarray:cs.categoryarray,title:{text:cs.title.text,font:cs.title.font},type:gZ({},cs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:cs.autotypenumbers,autorange:cs.autorange,autorangeoptions:{minallowed:cs.autorangeoptions.minallowed,maxallowed:cs.autorangeoptions.maxallowed,clipmin:cs.autorangeoptions.clipmin,clipmax:cs.autorangeoptions.clipmax,include:cs.autorangeoptions.include,editType:"plot"},rangemode:cs.rangemode,minallowed:cs.minallowed,maxallowed:cs.maxallowed,range:gZ({},cs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:cs.minor.tickmode,nticks:cs.nticks,tick0:cs.tick0,dtick:cs.dtick,tickvals:cs.tickvals,ticktext:cs.ticktext,ticks:cs.ticks,mirror:cs.mirror,ticklen:cs.ticklen,tickwidth:cs.tickwidth,tickcolor:cs.tickcolor,showticklabels:cs.showticklabels,labelalias:cs.labelalias,tickfont:cs.tickfont,tickangle:cs.tickangle,tickprefix:cs.tickprefix,showtickprefix:cs.showtickprefix,ticksuffix:cs.ticksuffix,showticksuffix:cs.showticksuffix,showexponent:cs.showexponent,exponentformat:cs.exponentformat,minexponent:cs.minexponent,separatethousands:cs.separatethousands,tickformat:cs.tickformat,tickformatstops:cs.tickformatstops,hoverformat:cs.hoverformat,showline:cs.showline,linecolor:cs.linecolor,linewidth:cs.linewidth,showgrid:cs.showgrid,gridcolor:gZ({},cs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:cs.gridwidth,zeroline:cs.zeroline,zerolinecolor:cs.zerolinecolor,zerolinewidth:cs.zerolinewidth},"plot","from-root")});var bZ=ye((xvr,bPe)=>{"use strict";var yZ=mZ(),CPt=Ju().attributes,_Z=no().extendFlat,LPt=Mr().counterRegex;function xZ(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"}}bPe.exports={_arrayAttrRegexps:[LPt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:_Z(xZ(0,0,1),{}),center:_Z(xZ(0,0,0),{}),eye:_Z(xZ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:CPt({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:yZ,yaxis:yZ,zaxis:yZ,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 SPe=ye((bvr,APe)=>{"use strict";var PPt=id().mix,wPe=Mr(),IPt=Vs(),DPt=mZ(),RPt=yU(),zPt=JM(),TPe=["xaxis","yaxis","zaxis"],FPt=100*136/187;APe.exports=function(t,r,n){var i,a;function o(u,c){return wPe.coerce(i,a,DPt,u,c)}for(var s=0;s{"use strict";var qPt=Mr(),OPt=va(),BPt=ba(),NPt=k_(),UPt=SPe(),MPe=bZ(),VPt=kd().getSubplotData,EPe="gl3d";kPe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=qPt.validate(t[o],MPe[o]);if(s)return t[o]}}NPt(t,r,n,{type:EPe,attributes:MPe,handleDefaults:HPt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function HPt(e,t,r,n){for(var i=r("bgcolor"),a=OPt.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 GPt=Bu().overrideAll,jPt=B1(),WPt=mPe(),ZPt=kd().getSubplotData,XPt=Mr(),YPt=Zp(),B5="gl3d",wZ="scene";cp.name=B5;cp.attr=wZ;cp.idRoot=wZ;cp.idRegex=cp.attrRegex=XPt.counterRegex("scene");cp.attributes=_Pe();cp.layoutAttributes=bZ();cp.baseLayoutAttrOverrides=GPt({hoverlabel:jPt.hoverlabel},"plot","nested");cp.supplyLayoutDefaults=CPe();cp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[B5],a=0;a{"use strict";LPe.exports={plot:ULe(),attributes:dZ(),markerSymbols:ZR(),supplyDefaults:ZLe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:YLe(),moduleType:"trace",name:"scatter3d",basePlotModule:$_(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var DPe=ye((Svr,IPe)=>{"use strict";IPe.exports=PPe()});var GE=ye((Mvr,FPe)=>{"use strict";var RPe=va(),KPt=Kl(),TZ=Oc().axisHoverFormat,JPt=Wo().hovertemplateAttrs,zPe=vl(),AZ=no().extendFlat,$Pt=Bu().overrideAll;function SZ(e){return{valType:"boolean",dflt:!1}}function MZ(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:SZ("x"),y:SZ("y"),z:SZ("z")},color:{valType:"color",dflt:RPe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:RPe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var EZ=FPe.exports=$Pt(AZ({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:JPt(),xhoverformat:TZ("x"),yhoverformat:TZ("y"),zhoverformat:TZ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},KPt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:MZ("x"),y:MZ("y"),z:MZ("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:AZ({},zPe.hoverinfo),showlegend:AZ({},zPe.showlegend,{dflt:!1})}),"calc","nested");EZ.x.editType=EZ.y.editType=EZ.z.editType="calc+clearAxisTypes"});var CZ=ye((Evr,BPe)=>{"use strict";var QPt=ba(),qPe=Mr(),eIt=Uh(),tIt=GE(),kZ=.1;function rIt(e,t){for(var r=[],n=32,i=0;i{"use strict";var NPe=zv();UPe.exports=function(t,r){r.surfacecolor?NPe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):NPe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var XPe=ye((Cvr,ZPe)=>{"use strict";var aIt=Dd().gl_surface3d,N5=Dd().ndarray,oIt=Dd().ndarray_linear_interpolate.d2,sIt=QI(),lIt=e8(),jE=Mr().isArrayOrTypedArray,uIt=$y().parseColorScale,HPe=Jy(),cIt=Mu().extractOpts;function jPe(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 Jg=jPe.prototype;Jg.getXat=function(e,t,r,n){var i=jE(this.data.x)?jE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};Jg.getYat=function(e,t,r,n){var i=jE(this.data.y)?jE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};Jg.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)};Jg.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 jE(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 fIt(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 U5=[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 hIt(e,t){if(e0){r=U5[n];break}return r}function vIt(e,t){if(!(e<1||t<1)){for(var r=LZ(e),n=LZ(t),i=1,a=0;aQR;)n--,n/=dIt(n),n++,n1?i:1};function gIt(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 mIt(e,t,r){return yIt(e,t,gIt,r),e}function yIt(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";YPe.exports={attributes:GE(),supplyDefaults:CZ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:VPe(),plot:XPe(),moduleType:"trace",name:"surface",basePlotModule:$_(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var $Pe=ye((Pvr,JPe)=>{"use strict";JPe.exports=KPe()});var V5=ye((Ivr,eIe)=>{"use strict";var bIt=Kl(),PZ=Oc().axisHoverFormat,wIt=Wo().hovertemplateAttrs,Q_=GE(),QPe=vl(),ex=no().extendFlat;eIe.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:wIt({editType:"calc"}),xhoverformat:PZ("x"),yhoverformat:PZ("y"),zhoverformat:PZ("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"}},bIt("",{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"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},Q_.lighting),hoverinfo:ex({},QPe.hoverinfo,{editType:"calc"}),showlegend:ex({},QPe.showlegend,{dflt:!1})})});var tz=ye((Dvr,rIe)=>{"use strict";var TIt=Kl(),ez=Oc().axisHoverFormat,AIt=Wo().hovertemplateAttrs,WE=V5(),tIe=vl(),IZ=no().extendFlat,SIt=Bu().overrideAll;function DZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function RZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var H5=rIe.exports=SIt(IZ({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:DZ("x"),y:DZ("y"),z:DZ("z")},caps:{x:RZ("x"),y:RZ("y"),z:RZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:AIt(),xhoverformat:ez("x"),yhoverformat:ez("y"),zhoverformat:ez("z"),valuehoverformat:ez("value",1),showlegend:IZ({},tIe.showlegend,{dflt:!1})},TIt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:WE.opacity,lightposition:WE.lightposition,lighting:WE.lighting,flatshading:WE.flatshading,contour:WE.contour,hoverinfo:IZ({},tIe.hoverinfo)}),"calc","nested");H5.flatshading.dflt=!0;H5.lighting.facenormalsepsilon.dflt=0;H5.x.editType=H5.y.editType=H5.z.editType=H5.value.editType="calc+clearAxisTypes"});var zZ=ye((Rvr,nIe)=>{"use strict";var MIt=Mr(),EIt=ba(),kIt=tz(),CIt=Uh();function LIt(e,t,r,n){function i(a,o){return MIt.coerce(e,t,kIt,a,o)}iIe(e,t,r,n,i)}function iIe(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=EIt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(x){i(x+"hoverformat");var b="caps."+x,g=i(b+".show");g&&i(b+".fill");var E="slices."+x,k=i(E+".show");k&&(i(E+".fill"),i(E+".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(x){i(x)}),CIt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}nIe.exports={supplyDefaults:LIt,supplyIsoDefaults:iIe}});var rz=ye((zvr,oIe)=>{"use strict";var qZ=Mr(),PIt=zv();function IIt(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=Gm(t.u,t._len),t._v=Gm(t.v,t._len),t._w=Gm(t.w,t._len),t._x=Gm(t.x,t._len),t._y=Gm(t.y,t._len),t._z=Gm(t.z,t._len);var r=aIe(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=Gm(t.starts.x||[]),a=Gm(t.starts.y||[]),o=Gm(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&&(k=t[i-1],L=r[i-1],C=n[i-1]),a=0;ak?"-":"+")+"x"),v=v.replace("y",(S>L?"-":"+")+"y"),v=v.replace("z",(_>C?"-":"+")+"z");var T=function(){i=0,M=[],p=[],P=[]};(!i||i{"use strict";var DIt=zv(),RIt=rz().processGrid,iz=rz().filter;sIe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=iz(r.x,r._len),r._y=iz(r.y,r._len),r._z=iz(r.z,r._len),r._value=iz(r.value,r._len);var n=RIt(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";lIe.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var zIt=Dd().gl_mesh3d,FIt=$y().parseColorScale,qIt=Mr().isArrayOrTypedArray,OIt=Jy(),BIt=Mu().extractOpts,uIe=G5(),ZE=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 ae(bt,Lt){return bt===null?Lt:bt}function _e(bt,Lt,St){T();var Et=[Lt],dt=[St];if(G>=1)Et=[Lt],dt=[St];else if(G>0){var Ht=W(Lt,St);Et=Ht.xyzv,dt=Ht.abc}for(var $t=0;$t-1?St[_r]:P(Br,Or,Nr);Ne>-1?fr[_r]=Ne:fr[_r]=q(Br,Or,Nr,ae(bt,ut))}V(fr[0],fr[1],fr[2])}}function Me(bt,Lt,St){var Et=function(dt,Ht,$t){_e(bt,[Lt[dt],Lt[Ht],Lt[$t]],[St[dt],St[Ht],St[$t]])};Et(0,1,2),Et(2,3,0)}function ke(bt,Lt,St){var Et=function(dt,Ht,$t){_e(bt,[Lt[dt],Lt[Ht],Lt[$t]],[St[dt],St[Ht],St[$t]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}function ge(bt,Lt,St,Et){var dt=bt[3];dtEt&&(dt=Et);for(var Ht=(bt[3]-dt)/(bt[3]-Lt[3]+1e-9),$t=[],fr=0;fr<4;fr++)$t[fr]=(1-Ht)*bt[fr]+Ht*Lt[fr];return $t}function ie(bt,Lt,St){return bt>=Lt&&bt<=St}function Te(bt){var Lt=.001*(L-S);return bt>=S-Lt&&bt<=L+Lt}function Ee(bt){for(var Lt=[],St=0;St<4;St++){var Et=bt[St];Lt.push([e._x[Et],e._y[Et],e._z[Et],e._value[Et]])}return Lt}var Ae=3;function ze(bt,Lt,St,Et,dt,Ht){Ht||(Ht=1),St=[-1,-1,-1];var $t=!1,fr=[ie(Lt[0][3],Et,dt),ie(Lt[1][3],Et,dt),ie(Lt[2][3],Et,dt)];if(!fr[0]&&!fr[1]&&!fr[2])return!1;var _r=function(Or,Nr,ut){return Te(Nr[0][3])&&Te(Nr[1][3])&&Te(Nr[2][3])?(_e(Or,Nr,ut),!0):Htfr?[E,Ht]:[Ht,k];kt(Lt,_r[0],_r[1])}}var Br=[[Math.min(S,k),Math.max(S,k)],[Math.min(E,L),Math.max(E,L)]];["x","y","z"].forEach(function(Or){for(var Nr=[],ut=0;ut0&&(Le.push(lt.id),Or==="x"?xe.push([lt.distRatio,0,0]):Or==="y"?xe.push([0,lt.distRatio,0]):xe.push([0,0,lt.distRatio]))}else Or==="x"?ht=er(1,d-1):Or==="y"?ht=er(1,v-1):ht=er(1,x-1);Le.length>0&&(Or==="x"?Nr[Ne]=Ct(bt,Le,Ye,Ve,xe,Nr[Ne]):Or==="y"?Nr[Ne]=Yt(bt,Le,Ye,Ve,xe,Nr[Ne]):Nr[Ne]=xr(bt,Le,Ye,Ve,xe,Nr[Ne]),Ne++),ht.length>0&&(Or==="x"?Nr[Ne]=ct(bt,ht,Ye,Ve,Nr[Ne]):Or==="y"?Nr[Ne]=qt(bt,ht,Ye,Ve,Nr[Ne]):Nr[Ne]=rt(bt,ht,Ye,Ve,Nr[Ne]),Ne++)}var Gt=e.caps[Or];Gt.show&&Gt.fill&&(N(Gt.fill),Or==="x"?Nr[Ne]=ct(bt,[0,d-1],Ye,Ve,Nr[Ne]):Or==="y"?Nr[Ne]=qt(bt,[0,v-1],Ye,Ve,Nr[Ne]):Nr[Ne]=rt(bt,[0,x-1],Ye,Ve,Nr[Ne]),Ne++)}}),s===0&&F(),e._meshX=_,e._meshY=C,e._meshZ=M,e._meshIntensity=p,e._Xs=c,e._Ys=f,e._Zs=h}return xt(),e}function UIt(e,t){var r=e.glplot.gl,n=zIt({gl:r}),i=new cIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}hIe.exports={findNearestOnAxis:ZE,generateIsoMeshes:fIe,createIsosurfaceTrace:UIt}});var vIe=ye((Bvr,dIe)=>{"use strict";dIe.exports={attributes:tz(),supplyDefaults:zZ().supplyDefaults,calc:OZ(),colorbar:{min:"cmin",max:"cmax"},plot:nz().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var gIe=ye((Nvr,pIe)=>{"use strict";pIe.exports=vIe()});var UZ=ye((Uvr,yIe)=>{"use strict";var VIt=Kl(),xh=tz(),HIt=GE(),mIe=vl(),NZ=no().extendFlat,GIt=Bu().overrideAll,az=yIe.exports=GIt(NZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate},VIt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:HIt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:NZ({},mIe.hoverinfo),showlegend:NZ({},mIe.showlegend,{dflt:!1})}),"calc","nested");az.x.editType=az.y.editType=az.z.editType=az.value.editType="calc+clearAxisTypes"});var xIe=ye((Vvr,_Ie)=>{"use strict";var jIt=Mr(),WIt=UZ(),ZIt=zZ().supplyIsoDefaults,XIt=CZ().opacityscaleDefaults;_Ie.exports=function(t,r,n,i){function a(o,s){return jIt.coerce(t,r,WIt,o,s)}ZIt(t,r,n,i,a),XIt(t,r,i,a)}});var AIe=ye((Hvr,TIe)=>{"use strict";var YIt=Dd().gl_mesh3d,KIt=$y().parseColorScale,JIt=Mr().isArrayOrTypedArray,$It=Jy(),QIt=Mu().extractOpts,bIe=G5(),VZ=nz().findNearestOnAxis,e8t=nz().generateIsoMeshes;function wIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var HZ=wIe.prototype;HZ.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=VZ(r,this.data._Xs).id,l=VZ(n,this.data._Ys).id,u=VZ(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 JIt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};HZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e8t(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=bIe(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=bIe(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:$It(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=QIt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=KIt(e),this.mesh.update(o)};HZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function t8t(e,t){var r=e.glplot.gl,n=YIt({gl:r}),i=new wIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}TIe.exports=t8t});var MIe=ye((Gvr,SIe)=>{"use strict";SIe.exports={attributes:UZ(),supplyDefaults:xIe(),calc:OZ(),colorbar:{min:"cmin",max:"cmax"},plot:AIe(),moduleType:"trace",name:"volume",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var kIe=ye((jvr,EIe)=>{"use strict";EIe.exports=MIe()});var PIe=ye((Wvr,LIe)=>{"use strict";var r8t=ba(),CIe=Mr(),i8t=Uh(),n8t=V5();LIe.exports=function(t,r,n,i){function a(c,f){return CIe.coerce(t,r,n8t,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&CIe.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=r8t.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"),i8t(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("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var DIe=ye((Zvr,IIe)=>{"use strict";var a8t=zv();IIe.exports=function(t,r){r.intensity&&a8t(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var OIe=ye((Xvr,qIe)=>{"use strict";var o8t=Dd().gl_mesh3d,s8t=Dd().delaunay_triangulate,l8t=Dd().alpha_shape,u8t=Dd().convex_hull,c8t=$y().parseColorScale,f8t=Mr().isArrayOrTypedArray,ZZ=Jy(),h8t=Mu().extractOpts,RIe=G5();function FIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var XZ=FIe.prototype;XZ.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 f8t(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function zIe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}XZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=RIe(GZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),GZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),GZ(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||!WZ(e.i,n)||!WZ(e.j,n)||!WZ(e.k,n))return;a=RIe(jZ(e.i),jZ(e.j),jZ(e.k))}else e.alphahull===0?a=u8t(i):e.alphahull>0?a=l8t(e.alphahull,i):a=d8t(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:ZZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=h8t(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=c8t(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=zIe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=zIe(e.facecolor)):(this.color=e.color,o.meshColor=ZZ(e.color));this.mesh.update(o)};XZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function v8t(e,t){var r=e.glplot.gl,n=o8t({gl:r}),i=new FIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}qIe.exports=v8t});var NIe=ye((Yvr,BIe)=>{"use strict";BIe.exports={attributes:V5(),supplyDefaults:PIe(),calc:DIe(),colorbar:{min:"cmin",max:"cmax"},plot:OIe(),moduleType:"trace",name:"mesh3d",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var VIe=ye((Kvr,UIe)=>{"use strict";UIe.exports=NIe()});var KZ=ye((Jvr,GIe)=>{"use strict";var p8t=Kl(),j5=Oc().axisHoverFormat,g8t=Wo().hovertemplateAttrs,m8t=V5(),HIe=vl(),YZ=no().extendFlat,oz={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:g8t({editType:"calc"},{keys:["norm"]}),uhoverformat:j5("u",1),vhoverformat:j5("v",1),whoverformat:j5("w",1),xhoverformat:j5("x"),yhoverformat:j5("y"),zhoverformat:j5("z"),showlegend:YZ({},HIe.showlegend,{dflt:!1})};YZ(oz,p8t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var y8t=["opacity","lightposition","lighting"];y8t.forEach(function(e){oz[e]=m8t[e]});oz.hoverinfo=YZ({},HIe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});GIe.exports=oz});var WIe=ye(($vr,jIe)=>{"use strict";var _8t=Mr(),x8t=Uh(),b8t=KZ();jIe.exports=function(t,r,n,i){function a(d,v){return _8t.coerce(t,r,b8t,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"),x8t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var XIe=ye((Qvr,ZIe)=>{"use strict";var w8t=zv();ZIe.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 T8t=Dd().gl_cone3d,A8t=Dd().gl_cone3d.createConeMesh,S8t=Mr().simpleMap,M8t=$y().parseColorScale,E8t=Mu().extractOpts,k8t=Mr().isArrayOrTypedArray,YIe=G5();function KIe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var JZ=KIe.prototype;JZ.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 k8t(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var C8t={xaxis:0,yaxis:1,zaxis:2},L8t={tip:1,tail:0,cm:.25,center:.5},P8t={tip:1,tail:1,cm:.75,center:.5};function JIe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[C8t[f]];return S8t(c,function(v){return h.d2l(v)*d})}i.vectors=YIe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=YIe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=E8t(t);i.colormap=M8t(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=L8t[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=T8t(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=P8t[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}JZ.update=function(e){this.data=e;var t=JIe(this.scene,e);this.mesh.update(t)};JZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function I8t(e,t){var r=e.glplot.gl,n=JIe(e,t),i=A8t(r,n),a=new KIe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}$Ie.exports=I8t});var t8e=ye((tpr,e8e)=>{"use strict";e8e.exports={moduleType:"trace",name:"cone",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:KZ(),supplyDefaults:WIe(),colorbar:{min:"cmin",max:"cmax"},calc:XIe(),plot:QIe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var i8e=ye((rpr,r8e)=>{"use strict";r8e.exports=t8e()});var QZ=ye((ipr,a8e)=>{"use strict";var D8t=Kl(),W5=Oc().axisHoverFormat,R8t=Wo().hovertemplateAttrs,z8t=V5(),n8e=vl(),$Z=no().extendFlat,sz={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:R8t({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:W5("u",1),vhoverformat:W5("v",1),whoverformat:W5("w",1),xhoverformat:W5("x"),yhoverformat:W5("y"),zhoverformat:W5("z"),showlegend:$Z({},n8e.showlegend,{dflt:!1})};$Z(sz,D8t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var F8t=["opacity","lightposition","lighting"];F8t.forEach(function(e){sz[e]=z8t[e]});sz.hoverinfo=$Z({},n8e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});a8e.exports=sz});var s8e=ye((npr,o8e)=>{"use strict";var q8t=Mr(),O8t=Uh(),B8t=QZ();o8e.exports=function(t,r,n,i){function a(h,d){return q8t.coerce(t,r,B8t,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"),O8t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var p8e=ye((apr,v8e)=>{"use strict";var c8e=Dd().gl_streamtube3d,N8t=c8e.createTubeMesh,U8t=Mr(),V8t=$y().parseColorScale,H8t=Mu().extractOpts,l8e=G5(),f8e={xaxis:0,yaxis:1,zaxis:2};function h8e(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var tX=h8e.prototype;tX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[f8e[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 u8e(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 eX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function d8e(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(F,q){var V=r[q],H=n[f8e[q]];return U8t.simpleMap(F,function(X){return V.d2l(X)*H})}if(a.vectors=l8e(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=l8e(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=u8e(s),d=u8e(u),v=new Array(h.length*d.length),x=0,b=0;b{"use strict";g8e.exports={moduleType:"trace",name:"streamtube",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:QZ(),supplyDefaults:s8e(),colorbar:{min:"cmin",max:"cmax"},calc:rz().calc,plot:p8e(),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 _8e=ye((spr,y8e)=>{"use strict";y8e.exports=m8e()});var H2=ye((lpr,w8e)=>{"use strict";var j8t=Wo().hovertemplateAttrs,W8t=Wo().texttemplateAttrs,Z8t=Eg(),jm=Uc(),X8t=vl(),x8e=Kl(),Y8t=Ed().dash,V2=no().extendFlat,K8t=Bu().overrideAll,eg=jm.marker,b8e=jm.line,J8t=eg.line;w8e.exports=K8t({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:V2({},jm.mode,{dflt:"markers"}),text:V2({},jm.text,{}),texttemplate:W8t({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:V2({},jm.hovertext,{}),textfont:jm.textfont,textposition:jm.textposition,line:{color:b8e.color,width:b8e.width,dash:Y8t},connectgaps:jm.connectgaps,marker:V2({symbol:eg.symbol,opacity:eg.opacity,angle:eg.angle,angleref:V2({},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:V2({width:J8t.width},x8e("marker.line")),gradient:eg.gradient},x8e("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Z8t(),selected:jm.selected,unselected:jm.unselected,hoverinfo:V2({},X8t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:j8t()},"calc","nested")});var A8e=ye((upr,T8e)=>{"use strict";var rX=Mr(),iX=lu(),$8t=$p(),Q8t=D0(),eDt=R0(),tDt=Ig(),rDt=H2();T8e.exports=function(t,r,n,i){function a(d,v){return rX.coerce(t,r,rDt,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||rX.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("mode"),iX.hasMarkers(r)&&$8t(t,r,n,i,a,{gradient:!0}),iX.hasLines(r)&&(Q8t(t,r,n,i,a),a("connectgaps")),iX.hasText(r)&&(a("texttemplate"),eDt(t,r,i,a)),a("fill"),r.fill!=="none"&&tDt(t,r,n,a),rX.coerceSelectionMarkerOpacity(r,a)}});var E8e=ye((cpr,M8e)=>{"use strict";var S8e=Qa();M8e.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=S8e.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=S8e.tickText(o,o.c2l(s[1]),!0).text,i}});var lz=ye((fpr,P8e)=>{"use strict";var nX=uo(),k8e=es().BADNUM,iDt=z0(),nDt=km(),aDt=F0(),oDt=Mr().isArrayOrTypedArray,C8e=Mr()._;function L8e(e){return e&&typeof e=="string"}P8e.exports=function(t,r){var n=oDt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return L8e(h)||nX(h)}:o=L8e;for(var s=0;s{"use strict";Tv.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"};Tv.axesNames=["lonaxis","lataxis"];Tv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Tv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Tv.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]}};Tv.clipPad=.001;Tv.precision=.1;Tv.landColor="#F0DC82";Tv.waterColor="#3399FF";Tv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Tv.sphereSVG={type:"Sphere"};Tv.fillLayers={ocean:1,land:1,lakes:1};Tv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Tv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Tv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Tv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var aX=ye((uz,I8e)=>{(function(e,t){typeof uz=="object"&&typeof I8e!="undefined"?t(uz):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(uz,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var S,L,_=k.scale[0],C=k.scale[1],M=k.translate[0],p=k.translate[1];return function(P,T){T||(S=L=0);var F=2,q=P.length,V=new Array(q);for(V[0]=(S+=P[0])*_+M,V[1]=(L+=P[1])*C+p;FM&&(M=F[0]),F[1]p&&(p=F[1])}function T(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(T);break;case"Point":P(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(P);break}}k.arcs.forEach(function(F){for(var q=-1,V=F.length,H;++qM&&(M=H[0]),H[1]p&&(p=H[1])});for(L in k.objects)T(k.objects[L]);return[_,C,M,p]}function i(k,S){for(var L,_=k.length,C=_-S;C<--_;)L=k[C],k[C++]=k[_],k[_]=L}function a(k,S){return typeof S=="string"&&(S=k.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(L){return o(k,L)})}:o(k,S)}function o(k,S){var L=S.id,_=S.bbox,C=S.properties==null?{}:S.properties,M=s(k,S);return L==null&&_==null?{type:"Feature",properties:C,geometry:M}:_==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:_,properties:C,geometry:M}}function s(k,S){var L=r(k.transform),_=k.arcs;function C(q,V){V.length&&V.pop();for(var H=_[q<0?~q:q],X=0,G=H.length;X1)_=f(k,S,L);else for(C=0,_=new Array(M=k.arcs.length);C1)for(var V=1,H=P(F[0]),X,G;VH&&(G=F[0],F[0]=F[V],F[V]=G,H=X);return F}).filter(function(T){return T.length>0})}}function x(k,S){for(var L=0,_=k.length;L<_;){var C=L+_>>>1;k[C]=2))throw new Error("n must be \u22652");T=k.bbox||n(k);var L=T[0],_=T[1],C=T[2],M=T[3],p;S={scale:[C-L?(C-L)/(p-1):1,M-_?(M-_)/(p-1):1],translate:[L,_]}}else T=k.bbox;var P=g(S),T,F,q=k.objects,V={};function H(N){return P(N)}function X(N){var W;switch(N.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:N.geometries.map(X)};break;case"Point":W={type:"Point",coordinates:H(N.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:N.coordinates.map(H)};break;default:return N}return N.id!=null&&(W.id=N.id),N.bbox!=null&&(W.bbox=N.bbox),N.properties!=null&&(W.properties=N.properties),W}function G(N){var W=0,re=1,ae=N.length,_e,Me=new Array(ae);for(Me[0]=P(N[0],0);++W{"use strict";var oX=D8e.exports={},sDt=XE().locationmodeToLayer,lDt=aX().feature;oX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};oX.getTopojsonPath=function(e,t){return e+t+".json"};oX.getTopojsonFeatures=function(e,t){var r=sDt[e.locationmode],n=t.objects[r];return lDt(t,n).features}});var tx=ye(YE=>{"use strict";var uDt=es().BADNUM;YE.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};YE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};YE.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{R8e.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 dz=ye(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var qp=63710088e-1,lX={centimeters:qp*100,centimetres:qp*100,degrees:360/(2*Math.PI),feet:qp*3.28084,inches:qp*39.37,kilometers:qp/1e3,kilometres:qp/1e3,meters:qp,metres:qp,miles:qp/1609.344,millimeters:qp*1e3,millimetres:qp*1e3,nauticalmiles:qp/1852,radians:1,yards:qp*1.0936},sX={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 cDt(e,t,r={}){switch(e){case"Point":return uX(t).geometry;case"LineString":return fX(t).geometry;case"Polygon":return cX(t).geometry;case"MultiPoint":return q8e(t).geometry;case"MultiLineString":return F8e(t).geometry;case"MultiPolygon":return O8e(t).geometry;default:throw new Error(e+" is invalid")}}function uX(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(!fz(e[0])||!fz(e[1]))throw new Error("coordinates must contain numbers");return rx({type:"Point",coordinates:e},t,r)}function fDt(e,t,r={}){return hz(e.map(n=>uX(n,t)),r)}function cX(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;acX(n,t)),r)}function fX(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 dDt(e,t,r={}){return hz(e.map(n=>fX(n,t)),r)}function hz(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function F8e(e,t,r={}){return rx({type:"MultiLineString",coordinates:e},t,r)}function q8e(e,t,r={}){return rx({type:"MultiPoint",coordinates:e},t,r)}function O8e(e,t,r={}){return rx({type:"MultiPolygon",coordinates:e},t,r)}function vDt(e,t,r={}){return rx({type:"GeometryCollection",geometries:e},t,r)}function pDt(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 B8e(e,t="kilometers"){let r=lX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function hX(e,t="kilometers"){let r=lX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function gDt(e,t){return N8e(hX(e,t))}function mDt(e){let t=e%360;return t<0&&(t+=360),t}function yDt(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function N8e(e){return e%(2*Math.PI)*180/Math.PI}function _Dt(e){return e%360*Math.PI/180}function xDt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return B8e(hX(e,t),r)}function bDt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=sX[t];if(!n)throw new Error("invalid original units");let i=sX[r];if(!i)throw new Error("invalid final units");return e/n*i}function fz(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function wDt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function TDt(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(!fz(t))throw new Error("bbox must only contain numbers")})}function ADt(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")}ku.areaFactors=sX;ku.azimuthToBearing=yDt;ku.bearingToAzimuth=mDt;ku.convertArea=bDt;ku.convertLength=xDt;ku.degreesToRadians=_Dt;ku.earthRadius=qp;ku.factors=lX;ku.feature=rx;ku.featureCollection=hz;ku.geometry=cDt;ku.geometryCollection=vDt;ku.isNumber=fz;ku.isObject=wDt;ku.lengthToDegrees=gDt;ku.lengthToRadians=hX;ku.lineString=fX;ku.lineStrings=dDt;ku.multiLineString=F8e;ku.multiPoint=q8e;ku.multiPolygon=O8e;ku.point=uX;ku.points=fDt;ku.polygon=cX;ku.polygons=hDt;ku.radiansToDegrees=N8e;ku.radiansToLength=B8e;ku.round=pDt;ku.validateBBox=TDt;ku.validateId=ADt});var pz=ye(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var jv=dz();function KE(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",x=d==="Feature",b=v?e.features.length:1,g=0;gl||v>u||x>c){s=f,l=n,u=v,c=x,a=0;return}var b=jv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,x,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function PDt(e,t,r){var n=r,i=!1;return H8e(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 G8e(e,t){if(!e)throw new Error("geojson is required");vz(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(gz,"__esModule",{value:!0});var j8e=dz(),zDt=pz();function X8e(e){return zDt.geomReduce.call(void 0,e,(t,r)=>t+FDt(r),0)}function FDt(e){let t=0,r;switch(e.type){case"Polygon":return W8e(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(Z8e(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*vX,l=a[1]*vX,u=o[0]*vX;r+=(u-s)*Math.sin(l),n++}return r*qDt}var ODt=X8e;gz.area=X8e;gz.default=ODt});var J8e=ye(mz=>{"use strict";Object.defineProperty(mz,"__esModule",{value:!0});var BDt=dz(),NDt=pz();function K8e(e,t={}){let r=0,n=0,i=0;return NDt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),BDt.point.call(void 0,[r/i,n/i],t.properties)}var UDt=K8e;mz.centroid=K8e;mz.default=UDt});var Q8e=ye(yz=>{"use strict";Object.defineProperty(yz,"__esModule",{value:!0});var VDt=pz();function $8e(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return VDt.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 GDt=xa(),rDe=z8e(),{area:jDt}=Y8e(),{centroid:WDt}=J8e(),{bbox:ZDt}=Q8e(),eDe=OS(),Z5=H1(),XDt=gy(),YDt=ES(),_z=wM(),tDe=Object.keys(rDe),KDt={"ISO-3":eDe,"USA-states":eDe,"country names":JDt};function JDt(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=_z.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(_z.tester(c))},t.type){case"MultiPolygon":for(o=0;o0?v.properties.ct=tRt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else Z5.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 WDt(r).geometry.coordinates}function rRt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){GDt.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 nRt=xa(),aRt=ao(),aDe=va(),oDe=op(),oRt=oDe.stylePoints,sRt=oDe.styleText;sDe.exports=function(t,r){r&&lRt(t,r)};function lRt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),oRt(n,r,e),sRt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=nRt.select(this),o=i.trace,s=o.line||{};a.call(aDe.stroke,s.color).call(aRt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(aDe.fill,o.fillcolor)})}});var _X=ye((Tpr,cDe)=>{"use strict";var lDe=xa(),bz=Mr(),uRt=cz().getTopojsonFeatures,gX=tx(),xz=ix(),uDe=wg().findExtremes,yX=es().BADNUM,cRt=q0().calcMarkerSize,mX=lu(),fRt=pX();function hRt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=bz.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===yX&&lDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=lDe.select(this),l=o[0].trace;if(mX.hasLines(l)||l.fill!=="none"){var u=gX.calcTraceToLineCoords(o),c=l.fill!=="none"?gX.makePolygon(u):gX.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}mX.hasMarkers(l)&&s.selectAll("path.point").data(bz.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),mX.hasText(l)&&s.selectAll("g").data(bz.identity).enter().append("g").append("text").each(function(f){a(f,this)}),fRt(e,o)})}function dRt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(bz.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?xz.extractTraceFeature(e):uRt(r,i.topojson);for(o=0;o{"use strict";var vRt=Nc(),pRt=es().BADNUM,gRt=oT(),mRt=Mr().fillText,yRt=H2();fDe.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(E){var k=E.lonlat;if(k[0]===pRt||u(k))return 1/0;var S=c(k),L=c([r,n]),_=Math.abs(S[0]-L[0]),C=Math.abs(S[1]-L[1]),M=Math.max(3,E.mrc||0);return Math.max(Math.sqrt(_*_+C*C)-M,1-3/M)}if(vRt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],x=h.mrc||1;t.x0=v[0]-x,t.x1=v[0]+x,t.y0=v[1]-x,t.y1=v[1]+x,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var g=a._module.formatLabels(h,a,b);return t.lonLabel=g.lonLabel,t.latLabel=g.latLabel,t.color=gRt(a,h),t.extraText=_Rt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function _Rt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?yRt.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&&mRt(t,e,c),c.join("
")}});var vDe=ye((Spr,dDe)=>{"use strict";dDe.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 mDe=ye((Mpr,gDe)=>{"use strict";var pDe=lu(),xRt=es().BADNUM;gDe.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=!pDe.hasMarkers(s)&&!pDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){typeof wz=="object"&&typeof yDe!="undefined"?t(wz):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(wz,function(e){"use strict";function t(Ee,Ae){return EeAe?1:Ee>=Ae?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Ae,ze,Ce,me){for(Ce==null&&(Ce=0),me==null&&(me=Ae.length);Ce>>1;Ee(Ae[De],ze)<0?Ce=De+1:me=De}return Ce},right:function(Ae,ze,Ce,me){for(Ce==null&&(Ce=0),me==null&&(me=Ae.length);Ce>>1;Ee(Ae[De],ze)>0?me=De:Ce=De+1}return Ce}}}function n(Ee){return function(Ae,ze){return t(Ee(Ae),ze)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Ae){Ae==null&&(Ae=l);for(var ze=0,Ce=Ee.length-1,me=Ee[0],De=new Array(Ce<0?0:Ce);zeEe?1:Ae>=Ee?0:NaN}function f(Ee){return Ee===null?NaN:+Ee}function h(Ee,Ae){var ze=Ee.length,Ce=0,me=-1,De=0,ce,Ge,nt=0;if(Ae==null)for(;++me1)return nt/(Ce-1)}function d(Ee,Ae){var ze=h(Ee,Ae);return ze&&Math.sqrt(ze)}function v(Ee,Ae){var ze=Ee.length,Ce=-1,me,De,ce;if(Ae==null){for(;++Ce=me)for(De=ce=me;++Ceme&&(De=me),ce=me)for(De=ce=me;++Ceme&&(De=me),ce0)return[Ee];if((Ce=Ae0)for(Ee=Math.ceil(Ee/Ge),Ae=Math.floor(Ae/Ge),ce=new Array(De=Math.ceil(Ae-Ee+1));++me=0?(De>=L?10:De>=_?5:De>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(De>=L?10:De>=_?5:De>=C?2:1)}function P(Ee,Ae,ze){var Ce=Math.abs(Ae-Ee)/Math.max(0,ze),me=Math.pow(10,Math.floor(Math.log(Ce)/Math.LN10)),De=Ce/me;return De>=L?me*=10:De>=_?me*=5:De>=C&&(me*=2),Aert;)ot.pop(),--Dt;var kt=new Array(Dt+1),Ct;for(De=0;De<=Dt;++De)Ct=kt[De]=[],Ct.x0=De>0?ot[De-1]:qt,Ct.x1=De=1)return+ze(Ee[Ce-1],Ce-1,Ee);var Ce,me=(Ce-1)*Ae,De=Math.floor(me),ce=+ze(Ee[De],De,Ee),Ge=+ze(Ee[De+1],De+1,Ee);return ce+(Ge-ce)*(me-De)}}function V(Ee,Ae,ze){return Ee=g.call(Ee,f).sort(t),Math.ceil((ze-Ae)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function H(Ee,Ae,ze){return Math.ceil((ze-Ae)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function X(Ee,Ae){var ze=Ee.length,Ce=-1,me,De;if(Ae==null){for(;++Ce=me)for(De=me;++CeDe&&(De=me)}else for(;++Ce=me)for(De=me;++CeDe&&(De=me);return De}function G(Ee,Ae){var ze=Ee.length,Ce=ze,me=-1,De,ce=0;if(Ae==null)for(;++me=0;)for(ce=Ee[Ae],ze=ce.length;--ze>=0;)De[--me]=ce[ze];return De}function re(Ee,Ae){var ze=Ee.length,Ce=-1,me,De;if(Ae==null){for(;++Ce=me)for(De=me;++Ceme&&(De=me)}else for(;++Ce=me)for(De=me;++Ceme&&(De=me);return De}function ae(Ee,Ae){for(var ze=Ae.length,Ce=new Array(ze);ze--;)Ce[ze]=Ee[Ae[ze]];return Ce}function _e(Ee,Ae){if(ze=Ee.length){var ze,Ce=0,me=0,De,ce=Ee[me];for(Ae==null&&(Ae=t);++Ce{(function(e,t){typeof Tz=="object"&&typeof _De!="undefined"?t(Tz,JE()):typeof define=="function"&&define.amd?define(["exports","d3-array"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Tz,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(gt){a(i,gt,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(gt,Bt,wr){var vr=gt.s=Bt+wr,Ur=vr-Bt,fi=vr-Ur;gt.t=Bt-fi+(wr-Ur)}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,x=Math.atan,b=Math.atan2,g=Math.cos,E=Math.ceil,k=Math.exp,S=Math.log,L=Math.pow,_=Math.sin,C=Math.sign||function(gt){return gt>0?1:gt<0?-1:0},M=Math.sqrt,p=Math.tan;function P(gt){return gt>1?0:gt<-1?l:Math.acos(gt)}function T(gt){return gt>1?u:gt<-1?-u:Math.asin(gt)}function F(gt){return(gt=_(gt/2))*gt}function q(){}function V(gt,Bt){gt&&X.hasOwnProperty(gt.type)&&X[gt.type](gt,Bt)}var H={Feature:function(gt,Bt){V(gt.geometry,Bt)},FeatureCollection:function(gt,Bt){for(var wr=gt.features,vr=-1,Ur=wr.length;++vr=0?1:-1,Ur=vr*wr,fi=g(Bt),xi=_(Bt),Fi=ie*xi,Xi=ge*fi+Fi*g(Ur),hn=Fi*vr*_(Ur);re.add(b(hn,Xi)),ke=gt,ge=fi,ie=xi}function me(gt){return ae.reset(),W(gt,Te),ae*2}function De(gt){return[b(gt[1],gt[0]),T(gt[2])]}function ce(gt){var Bt=gt[0],wr=gt[1],vr=g(wr);return[vr*g(Bt),vr*_(Bt),_(wr)]}function Ge(gt,Bt){return gt[0]*Bt[0]+gt[1]*Bt[1]+gt[2]*Bt[2]}function nt(gt,Bt){return[gt[1]*Bt[2]-gt[2]*Bt[1],gt[2]*Bt[0]-gt[0]*Bt[2],gt[0]*Bt[1]-gt[1]*Bt[0]]}function ct(gt,Bt){gt[0]+=Bt[0],gt[1]+=Bt[1],gt[2]+=Bt[2]}function qt(gt,Bt){return[gt[0]*Bt,gt[1]*Bt,gt[2]*Bt]}function rt(gt){var Bt=M(gt[0]*gt[0]+gt[1]*gt[1]+gt[2]*gt[2]);gt[0]/=Bt,gt[1]/=Bt,gt[2]/=Bt}var ot,Dt,kt,Ct,Yt,xr,er,Ke,xt=r(),bt,Lt,St={point:Et,lineStart:Ht,lineEnd:$t,polygonStart:function(){St.point=fr,St.lineStart=_r,St.lineEnd=Br,xt.reset(),Te.polygonStart()},polygonEnd:function(){Te.polygonEnd(),St.point=Et,St.lineStart=Ht,St.lineEnd=$t,re<0?(ot=-(kt=180),Dt=-(Ct=90)):xt>o?Ct=90:xt<-o&&(Dt=-90),Lt[0]=ot,Lt[1]=kt},sphere:function(){ot=-(kt=180),Dt=-(Ct=90)}};function Et(gt,Bt){bt.push(Lt=[ot=gt,kt=gt]),BtCt&&(Ct=Bt)}function dt(gt,Bt){var wr=ce([gt*d,Bt*d]);if(Ke){var vr=nt(Ke,wr),Ur=[vr[1],-vr[0],0],fi=nt(Ur,vr);rt(fi),fi=De(fi);var xi=gt-Yt,Fi=xi>0?1:-1,Xi=fi[0]*h*Fi,hn,Ti=v(xi)>180;Ti^(Fi*YtCt&&(Ct=hn)):(Xi=(Xi+360)%360-180,Ti^(Fi*YtCt&&(Ct=Bt))),Ti?gtOr(ot,kt)&&(kt=gt):Or(gt,kt)>Or(ot,kt)&&(ot=gt):kt>=ot?(gtkt&&(kt=gt)):gt>Yt?Or(ot,gt)>Or(ot,kt)&&(kt=gt):Or(gt,kt)>Or(ot,kt)&&(ot=gt)}else bt.push(Lt=[ot=gt,kt=gt]);BtCt&&(Ct=Bt),Ke=wr,Yt=gt}function Ht(){St.point=dt}function $t(){Lt[0]=ot,Lt[1]=kt,St.point=Et,Ke=null}function fr(gt,Bt){if(Ke){var wr=gt-Yt;xt.add(v(wr)>180?wr+(wr>0?360:-360):wr)}else xr=gt,er=Bt;Te.point(gt,Bt),dt(gt,Bt)}function _r(){Te.lineStart()}function Br(){fr(xr,er),Te.lineEnd(),v(xt)>o&&(ot=-(kt=180)),Lt[0]=ot,Lt[1]=kt,Ke=null}function Or(gt,Bt){return(Bt-=gt)<0?Bt+360:Bt}function Nr(gt,Bt){return gt[0]-Bt[0]}function ut(gt,Bt){return gt[0]<=gt[1]?gt[0]<=Bt&&Bt<=gt[1]:BtOr(vr[0],vr[1])&&(vr[1]=Ur[1]),Or(Ur[0],vr[1])>Or(vr[0],vr[1])&&(vr[0]=Ur[0])):fi.push(vr=Ur);for(xi=-1/0,wr=fi.length-1,Bt=0,vr=fi[wr];Bt<=wr;vr=Ur,++Bt)Ur=fi[Bt],(Fi=Or(vr[1],Ur[0]))>xi&&(xi=Fi,ot=Ur[0],kt=vr[1])}return bt=Lt=null,ot===1/0||Dt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ot,Dt],[kt,Ct]]}var Ye,Ve,Xe,ht,Le,xe,Se,lt,Gt,Vt,ar,Qr,ai,jr,ri,bi,nn={sphere:q,point:Wi,lineStart:_n,lineEnd:Wn,polygonStart:function(){nn.lineStart=It,nn.lineEnd=ft},polygonEnd:function(){nn.lineStart=_n,nn.lineEnd=Wn}};function Wi(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt);Ni(wr*g(gt),wr*_(gt),_(Bt))}function Ni(gt,Bt,wr){++Ye,Xe+=(gt-Xe)/Ye,ht+=(Bt-ht)/Ye,Le+=(wr-Le)/Ye}function _n(){nn.point=$i}function $i(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt);jr=wr*g(gt),ri=wr*_(gt),bi=_(Bt),nn.point=zn,Ni(jr,ri,bi)}function zn(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt),vr=wr*g(gt),Ur=wr*_(gt),fi=_(Bt),xi=b(M((xi=ri*fi-bi*Ur)*xi+(xi=bi*vr-jr*fi)*xi+(xi=jr*Ur-ri*vr)*xi),jr*vr+ri*Ur+bi*fi);Ve+=xi,xe+=xi*(jr+(jr=vr)),Se+=xi*(ri+(ri=Ur)),lt+=xi*(bi+(bi=fi)),Ni(jr,ri,bi)}function Wn(){nn.point=Wi}function It(){nn.point=jt}function ft(){Zt(Qr,ai),nn.point=Wi}function jt(gt,Bt){Qr=gt,ai=Bt,gt*=d,Bt*=d,nn.point=Zt;var wr=g(Bt);jr=wr*g(gt),ri=wr*_(gt),bi=_(Bt),Ni(jr,ri,bi)}function Zt(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt),vr=wr*g(gt),Ur=wr*_(gt),fi=_(Bt),xi=ri*fi-bi*Ur,Fi=bi*vr-jr*fi,Xi=jr*Ur-ri*vr,hn=M(xi*xi+Fi*Fi+Xi*Xi),Ti=T(hn),qi=hn&&-Ti/hn;Gt+=qi*xi,Vt+=qi*Fi,ar+=qi*Xi,Ve+=Ti,xe+=Ti*(jr+(jr=vr)),Se+=Ti*(ri+(ri=Ur)),lt+=Ti*(bi+(bi=fi)),Ni(jr,ri,bi)}function yr(gt){Ye=Ve=Xe=ht=Le=xe=Se=lt=Gt=Vt=ar=0,W(gt,nn);var Bt=Gt,wr=Vt,vr=ar,Ur=Bt*Bt+wr*wr+vr*vr;return Url?gt+Math.round(-gt/f)*f:gt,Bt]}Vr.invert=Vr;function gi(gt,Bt,wr){return(gt%=f)?Bt||wr?Zr(Mi(gt),Pi(Bt,wr)):Mi(gt):Bt||wr?Pi(Bt,wr):Vr}function Si(gt){return function(Bt,wr){return Bt+=gt,[Bt>l?Bt-f:Bt<-l?Bt+f:Bt,wr]}}function Mi(gt){var Bt=Si(gt);return Bt.invert=Si(-gt),Bt}function Pi(gt,Bt){var wr=g(gt),vr=_(gt),Ur=g(Bt),fi=_(Bt);function xi(Fi,Xi){var hn=g(Xi),Ti=g(Fi)*hn,qi=_(Fi)*hn,Ii=_(Xi),mi=Ii*wr+Ti*vr;return[b(qi*Ur-mi*fi,Ti*wr-Ii*vr),T(mi*Ur+qi*fi)]}return xi.invert=function(Fi,Xi){var hn=g(Xi),Ti=g(Fi)*hn,qi=_(Fi)*hn,Ii=_(Xi),mi=Ii*Ur-qi*fi;return[b(qi*Ur+Ii*fi,Ti*wr+mi*vr),T(mi*wr-Ti*vr)]},xi}function Gi(gt){gt=gi(gt[0]*d,gt[1]*d,gt.length>2?gt[2]*d:0);function Bt(wr){return wr=gt(wr[0]*d,wr[1]*d),wr[0]*=h,wr[1]*=h,wr}return Bt.invert=function(wr){return wr=gt.invert(wr[0]*d,wr[1]*d),wr[0]*=h,wr[1]*=h,wr},Bt}function Ki(gt,Bt,wr,vr,Ur,fi){if(wr){var xi=g(Bt),Fi=_(Bt),Xi=vr*wr;Ur==null?(Ur=Bt+vr*f,fi=Bt-Xi/2):(Ur=ka(xi,Ur),fi=ka(xi,fi),(vr>0?Urfi)&&(Ur+=vr*f));for(var hn,Ti=Ur;vr>0?Ti>fi:Ti1&>.push(gt.pop().concat(gt.shift()))},result:function(){var wr=gt;return gt=[],Bt=null,wr}}}function Fa(gt,Bt){return v(gt[0]-Bt[0])=0;--Fi)Ur.point((qi=Ti[Fi])[0],qi[1]);else vr(Ii.x,Ii.p.x,-1,Ur);Ii=Ii.p}Ii=Ii.o,Ti=Ii.z,mi=!mi}while(!Ii.v);Ur.lineEnd()}}}function oa(gt){if(Bt=gt.length){for(var Bt,wr=0,vr=gt[0],Ur;++wr=0?1:-1,Qo=Ts*Xo,ys=Qo>l,Bo=Ma*Ua;if(Sn.add(b(Bo*Ts*_(Qo),Ta*mo+Bo*g(Qo))),xi+=ys?Xo+Ts*f:Xo,ys^mi>=wr^Cn>=wr){var yl=nt(ce(Ii),ce(qa));rt(yl);var Gs=nt(fi,yl);rt(Gs);var Ds=(ys^Xo>=0?-1:1)*T(Gs[2]);(vr>Ds||vr===Ds&&(yl[0]||yl[1]))&&(Fi+=ys^Xo>=0?1:-1)}}return(xi<-o||xi0){for(Xi||(Ur.polygonStart(),Xi=!0),Ur.lineStart(),mo=0;mo1&&sn&2&&Ua.push(Ua.pop().concat(Ua.shift())),Ti.push(Ua.filter(_t))}}return Ii}}function _t(gt){return gt.length>1}function br(gt,Bt){return((gt=gt.x)[0]<0?gt[1]-u-o:u-gt[1])-((Bt=Bt.x)[0]<0?Bt[1]-u-o:u-Bt[1])}var Hr=xn(function(){return!0},ti,Yi,[-l,-u]);function ti(gt){var Bt=NaN,wr=NaN,vr=NaN,Ur;return{lineStart:function(){gt.lineStart(),Ur=1},point:function(fi,xi){var Fi=fi>0?l:-l,Xi=v(fi-Bt);v(Xi-l)0?u:-u),gt.point(vr,wr),gt.lineEnd(),gt.lineStart(),gt.point(Fi,wr),gt.point(fi,wr),Ur=0):vr!==Fi&&Xi>=l&&(v(Bt-vr)o?x((_(Bt)*(fi=g(vr))*_(wr)-_(vr)*(Ur=g(Bt))*_(gt))/(Ur*fi*xi)):(Bt+vr)/2}function Yi(gt,Bt,wr,vr){var Ur;if(gt==null)Ur=wr*u,vr.point(-l,Ur),vr.point(0,Ur),vr.point(l,Ur),vr.point(l,0),vr.point(l,-Ur),vr.point(0,-Ur),vr.point(-l,-Ur),vr.point(-l,0),vr.point(-l,Ur);else if(v(gt[0]-Bt[0])>o){var fi=gt[0]0,Ur=v(Bt)>o;function fi(Ti,qi,Ii,mi){Ki(mi,gt,wr,Ii,Ti,qi)}function xi(Ti,qi){return g(Ti)*g(qi)>Bt}function Fi(Ti){var qi,Ii,mi,Pn,Ma;return{lineStart:function(){Pn=mi=!1,Ma=1},point:function(Ta,Ea){var qa=[Ta,Ea],Cn,sn=xi(Ta,Ea),Ua=vr?sn?0:hn(Ta,Ea):sn?hn(Ta+(Ta<0?l:-l),Ea):0;if(!qi&&(Pn=mi=sn)&&Ti.lineStart(),sn!==mi&&(Cn=Xi(qi,qa),(!Cn||Fa(qi,Cn)||Fa(qa,Cn))&&(qa[2]=1)),sn!==mi)Ma=0,sn?(Ti.lineStart(),Cn=Xi(qa,qi),Ti.point(Cn[0],Cn[1])):(Cn=Xi(qi,qa),Ti.point(Cn[0],Cn[1],2),Ti.lineEnd()),qi=Cn;else if(Ur&&qi&&vr^sn){var mo;!(Ua&Ii)&&(mo=Xi(qa,qi,!0))&&(Ma=0,vr?(Ti.lineStart(),Ti.point(mo[0][0],mo[0][1]),Ti.point(mo[1][0],mo[1][1]),Ti.lineEnd()):(Ti.point(mo[1][0],mo[1][1]),Ti.lineEnd(),Ti.lineStart(),Ti.point(mo[0][0],mo[0][1],3)))}sn&&(!qi||!Fa(qi,qa))&&Ti.point(qa[0],qa[1]),qi=qa,mi=sn,Ii=Ua},lineEnd:function(){mi&&Ti.lineEnd(),qi=null},clean:function(){return Ma|(Pn&&mi)<<1}}}function Xi(Ti,qi,Ii){var mi=ce(Ti),Pn=ce(qi),Ma=[1,0,0],Ta=nt(mi,Pn),Ea=Ge(Ta,Ta),qa=Ta[0],Cn=Ea-qa*qa;if(!Cn)return!Ii&&Ti;var sn=Bt*Ea/Cn,Ua=-Bt*qa/Cn,mo=nt(Ma,Ta),Xo=qt(Ma,sn),Ts=qt(Ta,Ua);ct(Xo,Ts);var Qo=mo,ys=Ge(Xo,Qo),Bo=Ge(Qo,Qo),yl=ys*ys-Bo*(Ge(Xo,Xo)-1);if(!(yl<0)){var Gs=M(yl),Ds=qt(Qo,(-ys-Gs)/Bo);if(ct(Ds,Xo),Ds=De(Ds),!Ii)return Ds;var ia=Ti[0],Ka=qi[0],vs=Ti[1],Ko=qi[1],iu;Ka0^Ds[1]<(v(Ds[0]-ia)l^(ia<=Ds[0]&&Ds[0]<=Ka)){var bu=qt(Qo,(-ys+Gs)/Bo);return ct(bu,Xo),[Ds,De(bu)]}}}function hn(Ti,qi){var Ii=vr?gt:l-gt,mi=0;return Ti<-Ii?mi|=1:Ti>Ii&&(mi|=2),qi<-Ii?mi|=4:qi>Ii&&(mi|=8),mi}return xn(xi,Fi,fi,vr?[0,-gt]:[-l,gt-l])}function hi(gt,Bt,wr,vr,Ur,fi){var xi=gt[0],Fi=gt[1],Xi=Bt[0],hn=Bt[1],Ti=0,qi=1,Ii=Xi-xi,mi=hn-Fi,Pn;if(Pn=wr-xi,!(!Ii&&Pn>0)){if(Pn/=Ii,Ii<0){if(Pn0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}if(Pn=Ur-xi,!(!Ii&&Pn<0)){if(Pn/=Ii,Ii<0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}else if(Ii>0){if(Pn0)){if(Pn/=mi,mi<0){if(Pn0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}if(Pn=fi-Fi,!(!mi&&Pn<0)){if(Pn/=mi,mi<0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}else if(mi>0){if(Pn0&&(gt[0]=xi+Ti*Ii,gt[1]=Fi+Ti*mi),qi<1&&(Bt[0]=xi+qi*Ii,Bt[1]=Fi+qi*mi),!0}}}}}var Ji=1e9,ua=-Ji;function Fn(gt,Bt,wr,vr){function Ur(hn,Ti){return gt<=hn&&hn<=wr&&Bt<=Ti&&Ti<=vr}function fi(hn,Ti,qi,Ii){var mi=0,Pn=0;if(hn==null||(mi=xi(hn,qi))!==(Pn=xi(Ti,qi))||Xi(hn,Ti)<0^qi>0)do Ii.point(mi===0||mi===3?gt:wr,mi>1?vr:Bt);while((mi=(mi+qi+4)%4)!==Pn);else Ii.point(Ti[0],Ti[1])}function xi(hn,Ti){return v(hn[0]-gt)0?0:3:v(hn[0]-wr)0?2:1:v(hn[1]-Bt)0?1:0:Ti>0?3:2}function Fi(hn,Ti){return Xi(hn.x,Ti.x)}function Xi(hn,Ti){var qi=xi(hn,1),Ii=xi(Ti,1);return qi!==Ii?qi-Ii:qi===0?Ti[1]-hn[1]:qi===1?hn[0]-Ti[0]:qi===2?hn[1]-Ti[1]:Ti[0]-hn[0]}return function(hn){var Ti=hn,qi=la(),Ii,mi,Pn,Ma,Ta,Ea,qa,Cn,sn,Ua,mo,Xo={point:Ts,lineStart:yl,lineEnd:Gs,polygonStart:ys,polygonEnd:Bo};function Ts(ia,Ka){Ur(ia,Ka)&&Ti.point(ia,Ka)}function Qo(){for(var ia=0,Ka=0,vs=mi.length;Kavr&&(Kc-mf)*(vr-bu)>(Ru-bu)*(gt-mf)&&++ia:Ru<=vr&&(Kc-mf)*(vr-bu)<(Ru-bu)*(gt-mf)&&--ia;return ia}function ys(){Ti=qi,Ii=[],mi=[],mo=!0}function Bo(){var ia=Qo(),Ka=mo&&ia,vs=(Ii=t.merge(Ii)).length;(Ka||vs)&&(hn.polygonStart(),Ka&&(hn.lineStart(),fi(null,null,1,hn),hn.lineEnd()),vs&&jo(Ii,Fi,ia,fi,hn),hn.polygonEnd()),Ti=hn,Ii=mi=Pn=null}function yl(){Xo.point=Ds,mi&&mi.push(Pn=[]),Ua=!0,sn=!1,qa=Cn=NaN}function Gs(){Ii&&(Ds(Ma,Ta),Ea&&sn&&qi.rejoin(),Ii.push(qi.result())),Xo.point=Ts,sn&&Ti.lineEnd()}function Ds(ia,Ka){var vs=Ur(ia,Ka);if(mi&&Pn.push([ia,Ka]),Ua)Ma=ia,Ta=Ka,Ea=vs,Ua=!1,vs&&(Ti.lineStart(),Ti.point(ia,Ka));else if(vs&&sn)Ti.point(ia,Ka);else{var Ko=[qa=Math.max(ua,Math.min(Ji,qa)),Cn=Math.max(ua,Math.min(Ji,Cn))],iu=[ia=Math.max(ua,Math.min(Ji,ia)),Ka=Math.max(ua,Math.min(Ji,Ka))];hi(Ko,iu,gt,Bt,wr,vr)?(sn||(Ti.lineStart(),Ti.point(Ko[0],Ko[1])),Ti.point(iu[0],iu[1]),vs||Ti.lineEnd(),mo=!1):vs&&(Ti.lineStart(),Ti.point(ia,Ka),mo=!1)}qa=ia,Cn=Ka,sn=vs}return Xo}}function Sa(){var gt=0,Bt=0,wr=960,vr=500,Ur,fi,xi;return xi={stream:function(Fi){return Ur&&fi===Fi?Ur:Ur=Fn(gt,Bt,wr,vr)(fi=Fi)},extent:function(Fi){return arguments.length?(gt=+Fi[0][0],Bt=+Fi[0][1],wr=+Fi[1][0],vr=+Fi[1][1],Ur=fi=null,xi):[[gt,Bt],[wr,vr]]}}}var go=r(),Oo,ho,Mo,xo={sphere:q,point:q,lineStart:zs,lineEnd:q,polygonStart:q,polygonEnd:q};function zs(){xo.point=Zs,xo.lineEnd=ks}function ks(){xo.point=xo.lineEnd=q}function Zs(gt,Bt){gt*=d,Bt*=d,Oo=gt,ho=_(Bt),Mo=g(Bt),xo.point=Xs}function Xs(gt,Bt){gt*=d,Bt*=d;var wr=_(Bt),vr=g(Bt),Ur=v(gt-Oo),fi=g(Ur),xi=_(Ur),Fi=vr*xi,Xi=Mo*wr-ho*vr*fi,hn=ho*wr+Mo*vr*fi;go.add(b(M(Fi*Fi+Xi*Xi),hn)),Oo=gt,ho=wr,Mo=vr}function wl(gt){return go.reset(),W(gt,xo),+go}var os=[null,null],cl={type:"LineString",coordinates:os};function Cs(gt,Bt){return os[0]=gt,os[1]=Bt,wl(cl)}var ml={Feature:function(gt,Bt){return Hs(gt.geometry,Bt)},FeatureCollection:function(gt,Bt){for(var wr=gt.features,vr=-1,Ur=wr.length;++vr0&&(Ur=Cs(gt[fi],gt[fi-1]),Ur>0&&wr<=Ur&&vr<=Ur&&(wr+vr-Ur)*(1-Math.pow((wr-vr)/Ur,2))o}).map(Ii)).concat(t.range(E(fi/hn)*hn,Ur,hn).filter(function(Cn){return v(Cn%qi)>o}).map(mi))}return Ea.lines=function(){return qa().map(function(Cn){return{type:"LineString",coordinates:Cn}})},Ea.outline=function(){return{type:"Polygon",coordinates:[Pn(vr).concat(Ma(xi).slice(1),Pn(wr).reverse().slice(1),Ma(Fi).reverse().slice(1))]}},Ea.extent=function(Cn){return arguments.length?Ea.extentMajor(Cn).extentMinor(Cn):Ea.extentMinor()},Ea.extentMajor=function(Cn){return arguments.length?(vr=+Cn[0][0],wr=+Cn[1][0],Fi=+Cn[0][1],xi=+Cn[1][1],vr>wr&&(Cn=vr,vr=wr,wr=Cn),Fi>xi&&(Cn=Fi,Fi=xi,xi=Cn),Ea.precision(Ta)):[[vr,Fi],[wr,xi]]},Ea.extentMinor=function(Cn){return arguments.length?(Bt=+Cn[0][0],gt=+Cn[1][0],fi=+Cn[0][1],Ur=+Cn[1][1],Bt>gt&&(Cn=Bt,Bt=gt,gt=Cn),fi>Ur&&(Cn=fi,fi=Ur,Ur=Cn),Ea.precision(Ta)):[[Bt,fi],[gt,Ur]]},Ea.step=function(Cn){return arguments.length?Ea.stepMajor(Cn).stepMinor(Cn):Ea.stepMinor()},Ea.stepMajor=function(Cn){return arguments.length?(Ti=+Cn[0],qi=+Cn[1],Ea):[Ti,qi]},Ea.stepMinor=function(Cn){return arguments.length?(Xi=+Cn[0],hn=+Cn[1],Ea):[Xi,hn]},Ea.precision=function(Cn){return arguments.length?(Ta=+Cn,Ii=on(fi,Ur,90),mi=fa(Bt,gt,Ta),Pn=on(Fi,xi,90),Ma=fa(vr,wr,Ta),Ea):Ta},Ea.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Il(){return Qu()()}function vo(gt,Bt){var wr=gt[0]*d,vr=gt[1]*d,Ur=Bt[0]*d,fi=Bt[1]*d,xi=g(vr),Fi=_(vr),Xi=g(fi),hn=_(fi),Ti=xi*g(wr),qi=xi*_(wr),Ii=Xi*g(Ur),mi=Xi*_(Ur),Pn=2*T(M(F(fi-vr)+xi*Xi*F(Ur-wr))),Ma=_(Pn),Ta=Pn?function(Ea){var qa=_(Ea*=Pn)/Ma,Cn=_(Pn-Ea)/Ma,sn=Cn*Ti+qa*Ii,Ua=Cn*qi+qa*mi,mo=Cn*Fi+qa*hn;return[b(Ua,sn)*h,b(mo,M(sn*sn+Ua*Ua))*h]}:function(){return[wr*h,vr*h]};return Ta.distance=Pn,Ta}function Wl(gt){return gt}var Ks=r(),Zl=r(),Ec,Zn,ko,Co,Tl={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Tl.lineStart=uf,Tl.lineEnd=rh},polygonEnd:function(){Tl.lineStart=Tl.lineEnd=Tl.point=q,Ks.add(v(Zl)),Zl.reset()},result:function(){var gt=Ks/2;return Ks.reset(),gt}};function uf(){Tl.point=So}function So(gt,Bt){Tl.point=cf,Ec=ko=gt,Zn=Co=Bt}function cf(gt,Bt){Zl.add(Co*gt-ko*Bt),ko=gt,Co=Bt}function rh(){cf(Ec,Zn)}var Al=1/0,Hc=Al,Ql=-Al,Ls=Ql,mu={point:kc,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var gt=[[Al,Hc],[Ql,Ls]];return Ql=Ls=-(Hc=Al=1/0),gt}};function kc(gt,Bt){gtQl&&(Ql=gt),BtLs&&(Ls=Bt)}var Of=0,Gc=0,vd=0,Bf=0,ss=0,ff=0,ih=0,Ul=0,Js=0,hc,Cc,ws,$s,hs={point:Ms,lineStart:dc,lineEnd:Ps,polygonStart:function(){hs.lineStart=ov,hs.lineEnd=wo},polygonEnd:function(){hs.point=Ms,hs.lineStart=dc,hs.lineEnd=Ps},result:function(){var gt=Js?[ih/Js,Ul/Js]:ff?[Bf/ff,ss/ff]:vd?[Of/vd,Gc/vd]:[NaN,NaN];return Of=Gc=vd=Bf=ss=ff=ih=Ul=Js=0,gt}};function Ms(gt,Bt){Of+=gt,Gc+=Bt,++vd}function dc(){hs.point=Sl}function Sl(gt,Bt){hs.point=ec,Ms(ws=gt,$s=Bt)}function ec(gt,Bt){var wr=gt-ws,vr=Bt-$s,Ur=M(wr*wr+vr*vr);Bf+=Ur*(ws+gt)/2,ss+=Ur*($s+Bt)/2,ff+=Ur,Ms(ws=gt,$s=Bt)}function Ps(){hs.point=Ms}function ov(){hs.point=Od}function wo(){$o(hc,Cc)}function Od(gt,Bt){hs.point=$o,Ms(hc=ws=gt,Cc=$s=Bt)}function $o(gt,Bt){var wr=gt-ws,vr=Bt-$s,Ur=M(wr*wr+vr*vr);Bf+=Ur*(ws+gt)/2,ss+=Ur*($s+Bt)/2,ff+=Ur,Ur=$s*gt-ws*Bt,ih+=Ur*(ws+gt),Ul+=Ur*($s+Bt),Js+=Ur*3,Ms(ws=gt,$s=Bt)}function Ja(gt){this._context=gt}Ja.prototype={_radius:4.5,pointRadius:function(gt){return this._radius=gt,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(gt,Bt){switch(this._point){case 0:{this._context.moveTo(gt,Bt),this._point=1;break}case 1:{this._context.lineTo(gt,Bt);break}default:{this._context.moveTo(gt+this._radius,Bt),this._context.arc(gt,Bt,this._radius,0,f);break}}},result:q};var Ef=r(),tc,uu,Mh,jc,kf,Ml={point:q,lineStart:function(){Ml.point=Yh},lineEnd:function(){tc&&Eh(uu,Mh),Ml.point=q},polygonStart:function(){tc=!0},polygonEnd:function(){tc=null},result:function(){var gt=+Ef;return Ef.reset(),gt}};function Yh(gt,Bt){Ml.point=Eh,uu=jc=gt,Mh=kf=Bt}function Eh(gt,Bt){jc-=gt,kf-=Bt,Ef.add(M(jc*jc+kf*kf)),jc=gt,kf=Bt}function nh(){this._string=[]}nh.prototype={_radius:4.5,_circle:hf(4.5),pointRadius:function(gt){return(gt=+gt)!==this._radius&&(this._radius=gt,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(gt,Bt){switch(this._point){case 0:{this._string.push("M",gt,",",Bt),this._point=1;break}case 1:{this._string.push("L",gt,",",Bt);break}default:{this._circle==null&&(this._circle=hf(this._radius)),this._string.push("M",gt,",",Bt,this._circle);break}}},result:function(){if(this._string.length){var gt=this._string.join("");return this._string=[],gt}else return null}};function hf(gt){return"m0,"+gt+"a"+gt+","+gt+" 0 1,1 0,"+-2*gt+"a"+gt+","+gt+" 0 1,1 0,"+2*gt+"z"}function kh(gt,Bt){var wr=4.5,vr,Ur;function fi(xi){return xi&&(typeof wr=="function"&&Ur.pointRadius(+wr.apply(this,arguments)),W(xi,vr(Ur))),Ur.result()}return fi.area=function(xi){return W(xi,vr(Tl)),Tl.result()},fi.measure=function(xi){return W(xi,vr(Ml)),Ml.result()},fi.bounds=function(xi){return W(xi,vr(mu)),mu.result()},fi.centroid=function(xi){return W(xi,vr(hs)),hs.result()},fi.projection=function(xi){return arguments.length?(vr=xi==null?(gt=null,Wl):(gt=xi).stream,fi):gt},fi.context=function(xi){return arguments.length?(Ur=xi==null?(Bt=null,new nh):new Ja(Bt=xi),typeof wr!="function"&&Ur.pointRadius(wr),fi):Bt},fi.pointRadius=function(xi){return arguments.length?(wr=typeof xi=="function"?xi:(Ur.pointRadius(+xi),+xi),fi):wr},fi.projection(gt).context(Bt)}function Kh(gt){return{stream:rc(gt)}}function rc(gt){return function(Bt){var wr=new ah;for(var vr in gt)wr[vr]=gt[vr];return wr.stream=Bt,wr}}function ah(){}ah.prototype={constructor:ah,point:function(gt,Bt){this.stream.point(gt,Bt)},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 Wc(gt,Bt,wr){var vr=gt.clipExtent&>.clipExtent();return gt.scale(150).translate([0,0]),vr!=null&>.clipExtent(null),W(wr,gt.stream(mu)),Bt(mu.result()),vr!=null&>.clipExtent(vr),gt}function df(gt,Bt,wr){return Wc(gt,function(vr){var Ur=Bt[1][0]-Bt[0][0],fi=Bt[1][1]-Bt[0][1],xi=Math.min(Ur/(vr[1][0]-vr[0][0]),fi/(vr[1][1]-vr[0][1])),Fi=+Bt[0][0]+(Ur-xi*(vr[1][0]+vr[0][0]))/2,Xi=+Bt[0][1]+(fi-xi*(vr[1][1]+vr[0][1]))/2;gt.scale(150*xi).translate([Fi,Xi])},wr)}function Cu(gt,Bt,wr){return df(gt,[[0,0],Bt],wr)}function Nf(gt,Bt,wr){return Wc(gt,function(vr){var Ur=+Bt,fi=Ur/(vr[1][0]-vr[0][0]),xi=(Ur-fi*(vr[1][0]+vr[0][0]))/2,Fi=-fi*vr[0][1];gt.scale(150*fi).translate([xi,Fi])},wr)}function Zc(gt,Bt,wr){return Wc(gt,function(vr){var Ur=+Bt,fi=Ur/(vr[1][1]-vr[0][1]),xi=-fi*vr[0][0],Fi=(Ur-fi*(vr[1][1]+vr[0][1]))/2;gt.scale(150*fi).translate([xi,Fi])},wr)}var ds=16,Ch=g(30*d);function Bd(gt,Bt){return+Bt?Cf(gt,Bt):Jh(gt)}function Jh(gt){return rc({point:function(Bt,wr){Bt=gt(Bt,wr),this.stream.point(Bt[0],Bt[1])}})}function Cf(gt,Bt){function wr(vr,Ur,fi,xi,Fi,Xi,hn,Ti,qi,Ii,mi,Pn,Ma,Ta){var Ea=hn-vr,qa=Ti-Ur,Cn=Ea*Ea+qa*qa;if(Cn>4*Bt&&Ma--){var sn=xi+Ii,Ua=Fi+mi,mo=Xi+Pn,Xo=M(sn*sn+Ua*Ua+mo*mo),Ts=T(mo/=Xo),Qo=v(v(mo)-1)Bt||v((Ea*Gs+qa*Ds)/Cn-.5)>.3||xi*Ii+Fi*mi+Xi*Pn2?ia[2]%360*d:0,Gs()):[Fi*h,Xi*h,hn*h]},Bo.angle=function(ia){return arguments.length?(qi=ia%360*d,Gs()):qi*h},Bo.reflectX=function(ia){return arguments.length?(Ii=ia?-1:1,Gs()):Ii<0},Bo.reflectY=function(ia){return arguments.length?(mi=ia?-1:1,Gs()):mi<0},Bo.precision=function(ia){return arguments.length?(mo=Bd(Xo,Ua=ia*ia),Ds()):M(Ua)},Bo.fitExtent=function(ia,Ka){return df(Bo,ia,Ka)},Bo.fitSize=function(ia,Ka){return Cu(Bo,ia,Ka)},Bo.fitWidth=function(ia,Ka){return Nf(Bo,ia,Ka)},Bo.fitHeight=function(ia,Ka){return Zc(Bo,ia,Ka)};function Gs(){var ia=eu(wr,0,0,Ii,mi,qi).apply(null,Bt(fi,xi)),Ka=(qi?eu:$h)(wr,vr-ia[0],Ur-ia[1],Ii,mi,qi);return Ti=gi(Fi,Xi,hn),Xo=Zr(Bt,Ka),Ts=Zr(Ti,Xo),mo=Bd(Xo,Ua),Ds()}function Ds(){return Qo=ys=null,Bo}return function(){return Bt=gt.apply(this,arguments),Bo.invert=Bt.invert&&yl,Gs()}}function fl(gt){var Bt=0,wr=l/3,vr=Lc(gt),Ur=vr(Bt,wr);return Ur.parallels=function(fi){return arguments.length?vr(Bt=fi[0]*d,wr=fi[1]*d):[Bt*h,wr*h]},Ur}function Xc(gt){var Bt=g(gt);function wr(vr,Ur){return[vr*Bt,_(Ur)/Bt]}return wr.invert=function(vr,Ur){return[vr/Bt,T(Ur*Bt)]},wr}function ic(gt,Bt){var wr=_(gt),vr=(wr+_(Bt))/2;if(v(vr)=.12&&Ta<.234&&Ma>=-.425&&Ma<-.214?Ur:Ta>=.166&&Ta<.234&&Ma>=-.214&&Ma<-.115?xi:wr).invert(Ii)},Ti.stream=function(Ii){return gt&&Bt===Ii?gt:gt=Qh([wr.stream(Bt=Ii),Ur.stream(Ii),xi.stream(Ii)])},Ti.precision=function(Ii){return arguments.length?(wr.precision(Ii),Ur.precision(Ii),xi.precision(Ii),qi()):wr.precision()},Ti.scale=function(Ii){return arguments.length?(wr.scale(Ii),Ur.scale(Ii*.35),xi.scale(Ii),Ti.translate(wr.translate())):wr.scale()},Ti.translate=function(Ii){if(!arguments.length)return wr.translate();var mi=wr.scale(),Pn=+Ii[0],Ma=+Ii[1];return vr=wr.translate(Ii).clipExtent([[Pn-.455*mi,Ma-.238*mi],[Pn+.455*mi,Ma+.238*mi]]).stream(hn),fi=Ur.translate([Pn-.307*mi,Ma+.201*mi]).clipExtent([[Pn-.425*mi+o,Ma+.12*mi+o],[Pn-.214*mi-o,Ma+.234*mi-o]]).stream(hn),Fi=xi.translate([Pn-.205*mi,Ma+.212*mi]).clipExtent([[Pn-.214*mi+o,Ma+.166*mi+o],[Pn-.115*mi-o,Ma+.234*mi-o]]).stream(hn),qi()},Ti.fitExtent=function(Ii,mi){return df(Ti,Ii,mi)},Ti.fitSize=function(Ii,mi){return Cu(Ti,Ii,mi)},Ti.fitWidth=function(Ii,mi){return Nf(Ti,Ii,mi)},Ti.fitHeight=function(Ii,mi){return Zc(Ti,Ii,mi)};function qi(){return gt=Bt=null,Ti}return Ti.scale(1070)}function ju(gt){return function(Bt,wr){var vr=g(Bt),Ur=g(wr),fi=gt(vr*Ur);return[fi*Ur*_(Bt),fi*_(wr)]}}function Pc(gt){return function(Bt,wr){var vr=M(Bt*Bt+wr*wr),Ur=gt(vr),fi=_(Ur),xi=g(Ur);return[b(Bt*fi,vr*xi),T(vr&&wr*fi/vr)]}}var vc=ju(function(gt){return M(2/(1+gt))});vc.invert=Pc(function(gt){return 2*T(gt/2)});function sv(){return Pu(vc).scale(124.75).clipAngle(180-.001)}var Lf=ju(function(gt){return(gt=P(gt))&>/_(gt)});Lf.invert=Pc(function(gt){return gt});function Uf(){return Pu(Lf).scale(79.4188).clipAngle(180-.001)}function Iu(gt,Bt){return[gt,S(p((u+Bt)/2))]}Iu.invert=function(gt,Bt){return[gt,2*x(k(Bt))-u]};function oh(){return tu(Iu).scale(961/f)}function tu(gt){var Bt=Pu(gt),wr=Bt.center,vr=Bt.scale,Ur=Bt.translate,fi=Bt.clipExtent,xi=null,Fi,Xi,hn;Bt.scale=function(qi){return arguments.length?(vr(qi),Ti()):vr()},Bt.translate=function(qi){return arguments.length?(Ur(qi),Ti()):Ur()},Bt.center=function(qi){return arguments.length?(wr(qi),Ti()):wr()},Bt.clipExtent=function(qi){return arguments.length?(qi==null?xi=Fi=Xi=hn=null:(xi=+qi[0][0],Fi=+qi[0][1],Xi=+qi[1][0],hn=+qi[1][1]),Ti()):xi==null?null:[[xi,Fi],[Xi,hn]]};function Ti(){var qi=l*vr(),Ii=Bt(Gi(Bt.rotate()).invert([0,0]));return fi(xi==null?[[Ii[0]-qi,Ii[1]-qi],[Ii[0]+qi,Ii[1]+qi]]:gt===Iu?[[Math.max(Ii[0]-qi,xi),Fi],[Math.min(Ii[0]+qi,Xi),hn]]:[[xi,Math.max(Ii[1]-qi,Fi)],[Xi,Math.min(Ii[1]+qi,hn)]])}return Ti()}function vf(gt){return p((u+gt)/2)}function md(gt,Bt){var wr=g(gt),vr=gt===Bt?_(gt):S(wr/g(Bt))/S(vf(Bt)/vf(gt)),Ur=wr*L(vf(gt),vr)/vr;if(!vr)return Iu;function fi(xi,Fi){Ur>0?Fi<-u+o&&(Fi=-u+o):Fi>u-o&&(Fi=u-o);var Xi=Ur/L(vf(Fi),vr);return[Xi*_(vr*xi),Ur-Xi*g(vr*xi)]}return fi.invert=function(xi,Fi){var Xi=Ur-Fi,hn=C(vr)*M(xi*xi+Xi*Xi),Ti=b(xi,v(Xi))*C(Xi);return Xi*vr<0&&(Ti-=l*C(xi)*C(Xi)),[Ti/vr,2*x(L(Ur/hn,1/vr))-u]},fi}function sh(){return fl(md).scale(109.5).parallels([30,30])}function Fs(gt,Bt){return[gt,Bt]}Fs.invert=Fs;function _u(){return Pu(Fs).scale(152.63)}function xu(gt,Bt){var wr=g(gt),vr=gt===Bt?_(gt):(wr-g(Bt))/(Bt-gt),Ur=wr/vr+gt;if(v(vr)o&&--vr>0);return[gt/(.8707+(fi=wr*wr)*(-.131979+fi*(-.013791+fi*fi*fi*(.003971-.001529*fi)))),wr]};function gc(){return Pu(Dc).scale(175.295)}function hl(gt,Bt){return[g(Bt)*_(gt),_(Bt)]}hl.invert=Pc(T);function ru(){return Pu(hl).scale(249.5).clipAngle(90+o)}function mc(gt,Bt){var wr=g(Bt),vr=1+g(gt)*wr;return[wr*_(gt)/vr,_(Bt)/vr]}mc.invert=Pc(function(gt){return 2*x(gt)});function Yc(){return Pu(mc).scale(250).clipAngle(142)}function nc(gt,Bt){return[S(p((u+Bt)/2)),-gt]}nc.invert=function(gt,Bt){return[-Bt,2*x(k(gt))-u]};function gf(){var gt=tu(nc),Bt=gt.center,wr=gt.rotate;return gt.center=function(vr){return arguments.length?Bt([-vr[1],vr[0]]):(vr=Bt(),[vr[1],-vr[0]])},gt.rotate=function(vr){return arguments.length?wr([vr[0],vr[1],vr.length>2?vr[2]+90:90]):(vr=wr(),[vr[0],vr[1],vr[2]-90])},wr([0,0,90]).scale(159.155)}e.geoAlbers=Qs,e.geoAlbersUsa=gd,e.geoArea=me,e.geoAzimuthalEqualArea=sv,e.geoAzimuthalEqualAreaRaw=vc,e.geoAzimuthalEquidistant=Uf,e.geoAzimuthalEquidistantRaw=Lf,e.geoBounds=Ne,e.geoCentroid=yr,e.geoCircle=jn,e.geoClipAntimeridian=Hr,e.geoClipCircle=an,e.geoClipExtent=Sa,e.geoClipRectangle=Fn,e.geoConicConformal=sh,e.geoConicConformalRaw=md,e.geoConicEqualArea=yu,e.geoConicEqualAreaRaw=ic,e.geoConicEquidistant=Lh,e.geoConicEquidistantRaw=xu,e.geoContains=ms,e.geoDistance=Cs,e.geoEqualEarth=Ph,e.geoEqualEarthRaw=pf,e.geoEquirectangular=_u,e.geoEquirectangularRaw=Fs,e.geoGnomonic=Ih,e.geoGnomonicRaw=Dl,e.geoGraticule=Qu,e.geoGraticule10=Il,e.geoIdentity=Zu,e.geoInterpolate=vo,e.geoLength=wl,e.geoMercator=oh,e.geoMercatorRaw=Iu,e.geoNaturalEarth1=gc,e.geoNaturalEarth1Raw=Dc,e.geoOrthographic=ru,e.geoOrthographicRaw=hl,e.geoPath=kh,e.geoProjection=Pu,e.geoProjectionMutator=Lc,e.geoRotation=Gi,e.geoStereographic=Yc,e.geoStereographicRaw=mc,e.geoStream=W,e.geoTransform=Kh,e.geoTransverseMercator=gf,e.geoTransverseMercatorRaw=nc,Object.defineProperty(e,"__esModule",{value:!0})})});var bDe=ye((Az,xDe)=>{(function(e,t){typeof Az=="object"&&typeof xDe!="undefined"?t(Az,xX(),JE()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],t):t(e.d3=e.d3||{},e.d3,e.d3)})(Az,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(he){return he>0?1:he<0?-1:0},x=Math.sin,b=Math.tan,g=1e-6,E=1e-12,k=Math.PI,S=k/2,L=k/4,_=Math.SQRT1_2,C=H(2),M=H(k),p=k*2,P=180/k,T=k/180;function F(he){return he?he/Math.sin(he):1}function q(he){return he>1?S:he<-1?-S:Math.asin(he)}function V(he){return he>1?0:he<-1?k:Math.acos(he)}function H(he){return he>0?Math.sqrt(he):0}function X(he){return he=s(2*he),(he-1)/(he+1)}function G(he){return(s(he)-s(-he))/2}function N(he){return(s(he)+s(-he))/2}function W(he){return u(he+H(he*he+1))}function re(he){return u(he+H(he*he-1))}function ae(he){var be=b(he/2),Pe=2*u(o(he/2))/(be*be);function Oe(Je,He){var et=o(Je),Mt=o(He),Rt=x(He),Ut=Mt*et,tr=-((1-Ut?u((1+Ut)/2)/(1-Ut):-.5)+Pe/(1+Ut));return[tr*Mt*x(Je),tr*Rt]}return Oe.invert=function(Je,He){var et=H(Je*Je+He*He),Mt=-he/2,Rt=50,Ut;if(!et)return[0,0];do{var tr=Mt/2,mr=o(tr),Dr=x(tr),zr=Dr/mr,Xr=-u(n(mr));Mt-=Ut=(2/zr*Xr-Pe*zr-et)/(-Xr/(Dr*Dr)+1-Pe/(2*mr*mr))*(mr<0?.7:1)}while(n(Ut)>g&&--Rt>0);var di=x(Mt);return[a(Je*di,et*o(Mt)),q(He*di/et)]},Oe}function _e(){var he=S,be=t.geoProjectionMutator(ae),Pe=be(he);return Pe.radius=function(Oe){return arguments.length?be(he=Oe*T):he*P},Pe.scale(179.976).clipAngle(147)}function Me(he,be){var Pe=o(be),Oe=F(V(Pe*o(he/=2)));return[2*Pe*x(he)*Oe,x(be)*Oe]}Me.invert=function(he,be){if(!(he*he+4*be*be>k*k+g)){var Pe=he,Oe=be,Je=25;do{var He=x(Pe),et=x(Pe/2),Mt=o(Pe/2),Rt=x(Oe),Ut=o(Oe),tr=x(2*Oe),mr=Rt*Rt,Dr=Ut*Ut,zr=et*et,Xr=1-Dr*Mt*Mt,di=Xr?V(Ut*Mt)*H(Li=1/Xr):Li=0,Li,Ci=2*di*Ut*et-he,Qi=di*Rt-be,Mn=Li*(Dr*zr+di*Ut*Mt*mr),pa=Li*(.5*He*tr-di*2*Rt*et),ea=Li*.25*(tr*et-di*Rt*Dr*He),Ga=Li*(mr*Mt+di*zr*Ut),To=pa*ea-Ga*Mn;if(!To)break;var Wa=(Qi*pa-Ci*Ga)/To,co=(Ci*ea-Qi*Mn)/To;Pe-=Wa,Oe-=co}while((n(Wa)>g||n(co)>g)&&--Je>0);return[Pe,Oe]}};function ke(){return t.geoProjection(Me).scale(152.63)}function ge(he){var be=x(he),Pe=o(he),Oe=he>=0?1:-1,Je=b(Oe*he),He=(1+be-Pe)/2;function et(Mt,Rt){var Ut=o(Rt),tr=o(Mt/=2);return[(1+Ut)*x(Mt),(Oe*Rt>-a(tr,Je)-.001?0:-Oe*10)+He+x(Rt)*Pe-(1+Ut)*be*tr]}return et.invert=function(Mt,Rt){var Ut=0,tr=0,mr=50;do{var Dr=o(Ut),zr=x(Ut),Xr=o(tr),di=x(tr),Li=1+Xr,Ci=Li*zr-Mt,Qi=He+di*Pe-Li*be*Dr-Rt,Mn=Li*Dr/2,pa=-zr*di,ea=be*Li*zr/2,Ga=Pe*Xr+be*Dr*di,To=pa*ea-Ga*Mn,Wa=(Qi*pa-Ci*Ga)/To/2,co=(Ci*ea-Qi*Mn)/To;n(co)>2&&(co/=2),Ut-=Wa,tr-=co}while((n(Wa)>g||n(co)>g)&&--mr>0);return Oe*tr>-a(o(Ut),Je)-.001?[Ut*2,tr]:null},et}function ie(){var he=20*T,be=he>=0?1:-1,Pe=b(be*he),Oe=t.geoProjectionMutator(ge),Je=Oe(he),He=Je.stream;return Je.parallel=function(et){return arguments.length?(Pe=b((be=(he=et*T)>=0?1:-1)*he),Oe(he)):he*P},Je.stream=function(et){var Mt=Je.rotate(),Rt=He(et),Ut=(Je.rotate([0,0]),He(et)),tr=Je.precision();return Je.rotate(Mt),Rt.sphere=function(){Ut.polygonStart(),Ut.lineStart();for(var mr=be*-180;be*mr<180;mr+=be*90)Ut.point(mr,be*90);if(he)for(;be*(mr-=3*be*tr)>=-180;)Ut.point(mr,be*-a(o(mr*T/2),Pe)*P);Ut.lineEnd(),Ut.polygonEnd()},Rt},Je.scale(218.695).center([0,28.0974])}function Te(he,be){var Pe=b(be/2),Oe=H(1-Pe*Pe),Je=1+Oe*o(he/=2),He=x(he)*Oe/Je,et=Pe/Je,Mt=He*He,Rt=et*et;return[4/3*He*(3+Mt-3*Rt),4/3*et*(3+3*Mt-Rt)]}Te.invert=function(he,be){if(he*=3/8,be*=3/8,!he&&n(be)>1)return null;var Pe=he*he,Oe=be*be,Je=1+Pe+Oe,He=H((Je-H(Je*Je-4*be*be))/2),et=q(He)/3,Mt=He?re(n(be/He))/3:W(n(he))/3,Rt=o(et),Ut=N(Mt),tr=Ut*Ut-Rt*Rt;return[v(he)*2*a(G(Mt)*Rt,.25-tr),v(be)*2*a(Ut*x(et),.25+tr)]};function Ee(){return t.geoProjection(Te).scale(66.1603)}var Ae=H(8),ze=u(1+C);function Ce(he,be){var Pe=n(be);return PeE&&--Oe>0);return[he/(o(Pe)*(Ae-1/x(Pe))),v(be)*Pe]};function me(){return t.geoProjection(Ce).scale(112.314)}function De(he){var be=2*k/he;function Pe(Oe,Je){var He=t.geoAzimuthalEquidistantRaw(Oe,Je);if(n(Oe)>S){var et=a(He[1],He[0]),Mt=H(He[0]*He[0]+He[1]*He[1]),Rt=be*d((et-S)/be)+S,Ut=a(x(et-=Rt),2-o(et));et=Rt+q(k/Mt*x(Ut))-Ut,He[0]=Mt*o(et),He[1]=Mt*x(et)}return He}return Pe.invert=function(Oe,Je){var He=H(Oe*Oe+Je*Je);if(He>S){var et=a(Je,Oe),Mt=be*d((et-S)/be)+S,Rt=et>Mt?-1:1,Ut=He*o(Mt-et),tr=1/b(Rt*V((Ut-k)/H(k*(k-2*Ut)+He*He)));et=Mt+2*i((tr+Rt*H(tr*tr-3))/3),Oe=He*o(et),Je=He*x(et)}return t.geoAzimuthalEquidistantRaw.invert(Oe,Je)},Pe}function ce(){var he=5,be=t.geoProjectionMutator(De),Pe=be(he),Oe=Pe.stream,Je=.01,He=-o(Je*T),et=x(Je*T);return Pe.lobes=function(Mt){return arguments.length?be(he=+Mt):he},Pe.stream=function(Mt){var Rt=Pe.rotate(),Ut=Oe(Mt),tr=(Pe.rotate([0,0]),Oe(Mt));return Pe.rotate(Rt),Ut.sphere=function(){tr.polygonStart(),tr.lineStart();for(var mr=0,Dr=360/he,zr=2*k/he,Xr=90-180/he,di=S;mr0&&n(Je)>g);return Oe<0?NaN:Pe}function rt(he,be,Pe){return be===void 0&&(be=40),Pe===void 0&&(Pe=E),function(Oe,Je,He,et){var Mt,Rt,Ut;He=He===void 0?0:+He,et=et===void 0?0:+et;for(var tr=0;trMt){He-=Rt/=2,et-=Ut/=2;continue}Mt=Xr;var di=(He>0?-1:1)*Pe,Li=(et>0?-1:1)*Pe,Ci=he(He+di,et),Qi=he(He,et+Li),Mn=(Ci[0]-mr[0])/di,pa=(Ci[1]-mr[1])/di,ea=(Qi[0]-mr[0])/Li,Ga=(Qi[1]-mr[1])/Li,To=Ga*Mn-pa*ea,Wa=(n(To)<.5?.5:1)/To;if(Rt=(zr*ea-Dr*Ga)*Wa,Ut=(Dr*pa-zr*Mn)*Wa,He+=Rt,et+=Ut,n(Rt)0&&(Mt[1]*=1+Rt/1.5*Mt[0]*Mt[0]),Mt}return Oe.invert=rt(Oe),Oe}function Dt(){return t.geoProjection(ot()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function kt(he,be){var Pe=he*x(be),Oe=30,Je;do be-=Je=(be+x(be)-Pe)/(1+o(be));while(n(Je)>g&&--Oe>0);return be/2}function Ct(he,be,Pe){function Oe(Je,He){return[he*Je*o(He=kt(Pe,He)),be*x(He)]}return Oe.invert=function(Je,He){return He=q(He/be),[Je/(he*o(He)),q((2*He+x(2*He))/Pe)]},Oe}var Yt=Ct(C/S,C,k);function xr(){return t.geoProjection(Yt).scale(169.529)}var er=2.00276,Ke=1.11072;function xt(he,be){var Pe=kt(k,be);return[er*he/(1/o(be)+Ke/o(Pe)),(be+C*x(Pe))/er]}xt.invert=function(he,be){var Pe=er*be,Oe=be<0?-L:L,Je=25,He,et;do et=Pe-C*x(Oe),Oe-=He=(x(2*Oe)+2*Oe-k*x(et))/(2*o(2*Oe)+2+k*o(et)*C*o(Oe));while(n(He)>g&&--Je>0);return et=Pe-C*x(Oe),[he*(1/o(et)+Ke/o(Oe))/er,et]};function bt(){return t.geoProjection(xt).scale(160.857)}function Lt(he){var be=0,Pe=t.geoProjectionMutator(he),Oe=Pe(be);return Oe.parallel=function(Je){return arguments.length?Pe(be=Je*T):be*P},Oe}function St(he,be){return[he*o(be),be]}St.invert=function(he,be){return[he/o(be),be]};function Et(){return t.geoProjection(St).scale(152.63)}function dt(he){if(!he)return St;var be=1/b(he);function Pe(Oe,Je){var He=be+he-Je,et=He&&Oe*o(Je)/He;return[He*x(et),be-He*o(et)]}return Pe.invert=function(Oe,Je){var He=H(Oe*Oe+(Je=be-Je)*Je),et=be+he-He;return[He/o(et)*a(Oe,Je),et]},Pe}function Ht(){return Lt(dt).scale(123.082).center([0,26.1441]).parallel(45)}function $t(he){function be(Pe,Oe){var Je=S-Oe,He=Je&&Pe*he*x(Je)/Je;return[Je*x(He)/he,S-Je*o(He)]}return be.invert=function(Pe,Oe){var Je=Pe*he,He=S-Oe,et=H(Je*Je+He*He),Mt=a(Je,He);return[(et?et/x(et):1)*Mt/he,S-et]},be}function fr(){var he=.5,be=t.geoProjectionMutator($t),Pe=be(he);return Pe.fraction=function(Oe){return arguments.length?be(he=+Oe):he},Pe.scale(158.837)}var _r=Ct(1,4/k,k);function Br(){return t.geoProjection(_r).scale(152.63)}function Or(he,be,Pe,Oe,Je,He){var et=o(He),Mt;if(n(he)>1||n(He)>1)Mt=V(Pe*Je+be*Oe*et);else{var Rt=x(he/2),Ut=x(He/2);Mt=2*q(H(Rt*Rt+be*Oe*Ut*Ut))}return n(Mt)>g?[Mt,a(Oe*x(He),be*Je-Pe*Oe*et)]:[0,0]}function Nr(he,be,Pe){return V((he*he+be*be-Pe*Pe)/(2*he*be))}function ut(he){return he-2*k*l((he+k)/(2*k))}function Ne(he,be,Pe){for(var Oe=[[he[0],he[1],x(he[1]),o(he[1])],[be[0],be[1],x(be[1]),o(be[1])],[Pe[0],Pe[1],x(Pe[1]),o(Pe[1])]],Je=Oe[2],He,et=0;et<3;++et,Je=He)He=Oe[et],Je.v=Or(He[1]-Je[1],Je[3],Je[2],He[3],He[2],He[0]-Je[0]),Je.point=[0,0];var Mt=Nr(Oe[0].v[0],Oe[2].v[0],Oe[1].v[0]),Rt=Nr(Oe[0].v[0],Oe[1].v[0],Oe[2].v[0]),Ut=k-Mt;Oe[2].point[1]=0,Oe[0].point[0]=-(Oe[1].point[0]=Oe[0].v[0]/2);var tr=[Oe[2].point[0]=Oe[0].point[0]+Oe[2].v[0]*o(Mt),2*(Oe[0].point[1]=Oe[1].point[1]=Oe[2].v[0]*x(Mt))];function mr(Dr,zr){var Xr=x(zr),di=o(zr),Li=new Array(3),Ci;for(Ci=0;Ci<3;++Ci){var Qi=Oe[Ci];if(Li[Ci]=Or(zr-Qi[1],Qi[3],Qi[2],di,Xr,Dr-Qi[0]),!Li[Ci][0])return Qi.point;Li[Ci][1]=ut(Li[Ci][1]-Qi.v[1])}var Mn=tr.slice();for(Ci=0;Ci<3;++Ci){var pa=Ci==2?0:Ci+1,ea=Nr(Oe[Ci].v[0],Li[Ci][0],Li[pa][0]);Li[Ci][1]<0&&(ea=-ea),Ci?Ci==1?(ea=Rt-ea,Mn[0]-=Li[Ci][0]*o(ea),Mn[1]-=Li[Ci][0]*x(ea)):(ea=Ut-ea,Mn[0]+=Li[Ci][0]*o(ea),Mn[1]+=Li[Ci][0]*x(ea)):(Mn[0]+=Li[Ci][0]*o(ea),Mn[1]-=Li[Ci][0]*x(ea))}return Mn[0]/=3,Mn[1]/=3,Mn}return mr}function Ye(he){return he[0]*=T,he[1]*=T,he}function Ve(){return Xe([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Xe(he,be,Pe){var Oe=t.geoCentroid({type:"MultiPoint",coordinates:[he,be,Pe]}),Je=[-Oe[0],-Oe[1]],He=t.geoRotation(Je),et=Ne(Ye(He(he)),Ye(He(be)),Ye(He(Pe)));et.invert=rt(et);var Mt=t.geoProjection(et).rotate(Je),Rt=Mt.center;return delete Mt.rotate,Mt.center=function(Ut){return arguments.length?Rt(He(Ut)):He.invert(Rt())},Mt.clipAngle(90)}function ht(he,be){var Pe=H(1-x(be));return[2/M*he*Pe,M*(1-Pe)]}ht.invert=function(he,be){var Pe=(Pe=be/M-1)*Pe;return[Pe>0?he*H(k/Pe)/2:0,q(1-Pe)]};function Le(){return t.geoProjection(ht).scale(95.6464).center([0,30])}function xe(he){var be=b(he);function Pe(Oe,Je){return[Oe,(Oe?Oe/x(Oe):1)*(x(Je)*o(Oe)-be*o(Je))]}return Pe.invert=be?function(Oe,Je){Oe&&(Je*=x(Oe)/Oe);var He=o(Oe);return[Oe,2*a(H(He*He+be*be-Je*Je)-He,be-Je)]}:function(Oe,Je){return[Oe,q(Oe?Je*b(Oe)/Oe:Je)]},Pe}function Se(){return Lt(xe).scale(249.828).clipAngle(90)}var lt=H(3);function Gt(he,be){return[lt*he*(2*o(2*be/3)-1)/M,lt*M*x(be/3)]}Gt.invert=function(he,be){var Pe=3*q(be/(lt*M));return[M*he/(lt*(2*o(2*Pe/3)-1)),Pe]};function Vt(){return t.geoProjection(Gt).scale(156.19)}function ar(he){var be=o(he);function Pe(Oe,Je){return[Oe*be,x(Je)/be]}return Pe.invert=function(Oe,Je){return[Oe/be,q(Je*be)]},Pe}function Qr(){return Lt(ar).parallel(38.58).scale(195.044)}function ai(he){var be=o(he);function Pe(Oe,Je){return[Oe*be,(1+be)*b(Je/2)]}return Pe.invert=function(Oe,Je){return[Oe/be,i(Je/(1+be))*2]},Pe}function jr(){return Lt(ai).scale(124.75)}function ri(he,be){var Pe=H(8/(3*k));return[Pe*he*(1-n(be)/k),Pe*be]}ri.invert=function(he,be){var Pe=H(8/(3*k)),Oe=be/Pe;return[he/(Pe*(1-n(Oe)/k)),Oe]};function bi(){return t.geoProjection(ri).scale(165.664)}function nn(he,be){var Pe=H(4-3*x(n(be)));return[2/H(6*k)*he*Pe,v(be)*H(2*k/3)*(2-Pe)]}nn.invert=function(he,be){var Pe=2-n(be)/H(2*k/3);return[he*H(6*k)/(2*Pe),v(be)*q((4-Pe*Pe)/3)]};function Wi(){return t.geoProjection(nn).scale(165.664)}function Ni(he,be){var Pe=H(k*(4+k));return[2/Pe*he*(1+H(1-4*be*be/(k*k))),4/Pe*be]}Ni.invert=function(he,be){var Pe=H(k*(4+k))/2;return[he*Pe/(1+H(1-be*be*(4+k)/(4*k))),be*Pe/2]};function _n(){return t.geoProjection(Ni).scale(180.739)}function $i(he,be){var Pe=(2+S)*x(be);be/=2;for(var Oe=0,Je=1/0;Oe<10&&n(Je)>g;Oe++){var He=o(be);be-=Je=(be+x(be)*(He+2)-Pe)/(2*He*(1+He))}return[2/H(k*(4+k))*he*(1+o(be)),2*H(k/(4+k))*x(be)]}$i.invert=function(he,be){var Pe=be*H((4+k)/k)/2,Oe=q(Pe),Je=o(Oe);return[he/(2/H(k*(4+k))*(1+Je)),q((Oe+Pe*(Je+2))/(2+S))]};function zn(){return t.geoProjection($i).scale(180.739)}function Wn(he,be){return[he*(1+o(be))/H(2+k),2*be/H(2+k)]}Wn.invert=function(he,be){var Pe=H(2+k),Oe=be*Pe/2;return[Pe*he/(1+o(Oe)),Oe]};function It(){return t.geoProjection(Wn).scale(173.044)}function ft(he,be){for(var Pe=(1+S)*x(be),Oe=0,Je=1/0;Oe<10&&n(Je)>g;Oe++)be-=Je=(be+x(be)-Pe)/(1+o(be));return Pe=H(2+k),[he*(1+o(be))/Pe,2*be/Pe]}ft.invert=function(he,be){var Pe=1+S,Oe=H(Pe/2);return[he*2*Oe/(1+o(be*=Oe)),q((be+x(be))/Pe)]};function jt(){return t.geoProjection(ft).scale(173.044)}var Zt=3+2*C;function yr(he,be){var Pe=x(he/=2),Oe=o(he),Je=H(o(be)),He=o(be/=2),et=x(be)/(He+C*Oe*Je),Mt=H(2/(1+et*et)),Rt=H((C*He+(Oe+Pe)*Je)/(C*He+(Oe-Pe)*Je));return[Zt*(Mt*(Rt-1/Rt)-2*u(Rt)),Zt*(Mt*et*(Rt+1/Rt)-2*i(et))]}yr.invert=function(he,be){if(!(He=Te.invert(he/1.2,be*1.065)))return null;var Pe=He[0],Oe=He[1],Je=20,He;he/=Zt,be/=Zt;do{var et=Pe/2,Mt=Oe/2,Rt=x(et),Ut=o(et),tr=x(Mt),mr=o(Mt),Dr=o(Oe),zr=H(Dr),Xr=tr/(mr+C*Ut*zr),di=Xr*Xr,Li=H(2/(1+di)),Ci=C*mr+(Ut+Rt)*zr,Qi=C*mr+(Ut-Rt)*zr,Mn=Ci/Qi,pa=H(Mn),ea=pa-1/pa,Ga=pa+1/pa,To=Li*ea-2*u(pa)-he,Wa=Li*Xr*Ga-2*i(Xr)-be,co=tr&&_*zr*Rt*di/tr,Do=(C*Ut*mr+zr)/(2*(mr+C*Ut*zr)*(mr+C*Ut*zr)*zr),Rs=-.5*Xr*Li*Li*Li,As=Rs*co,yo=Rs*Do,po=(po=2*mr+C*zr*(Ut-Rt))*po*pa,_l=(C*Ut*mr*zr+Dr)/po,Vl=-(C*Rt*tr)/(zr*po),Xu=ea*As-2*_l/pa+Li*(_l+_l/Mn),cu=ea*yo-2*Vl/pa+Li*(Vl+Vl/Mn),el=Xr*Ga*As-2*co/(1+di)+Li*Ga*co+Li*Xr*(_l-_l/Mn),nu=Xr*Ga*yo-2*Do/(1+di)+Li*Ga*Do+Li*Xr*(Vl-Vl/Mn),zc=cu*el-nu*Xu;if(!zc)break;var Rl=(Wa*cu-To*nu)/zc,zl=(To*el-Wa*Xu)/zc;Pe-=Rl,Oe=c(-S,f(S,Oe-zl))}while((n(Rl)>g||n(zl)>g)&&--Je>0);return n(n(Oe)-S)Oe){var mr=H(tr),Dr=a(Ut,Rt),zr=Pe*d(Dr/Pe),Xr=Dr-zr,di=he*o(Xr),Li=(he*x(Xr)-Xr*x(di))/(S-di),Ci=Fa(Xr,Li),Qi=(k-he)/Da(Ci,di,k);Rt=mr;var Mn=50,pa;do Rt-=pa=(he+Da(Ci,di,Rt)*Qi-mr)/(Ci(Rt)*Qi);while(n(pa)>g&&--Mn>0);Ut=Xr*x(Rt),RtOe){var Rt=H(Mt),Ut=a(et,He),tr=Pe*d(Ut/Pe),mr=Ut-tr;He=Rt*o(mr),et=Rt*x(mr);for(var Dr=He-S,zr=x(He),Xr=et/zr,di=Heg||n(Xr)>g)&&--di>0);return[mr,Dr]},Rt}var Sn=oa(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(Sn).scale(149.995)}var oo=oa(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function xn(){return t.geoProjection(oo).scale(153.93)}var _t=oa(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function br(){return t.geoProjection(_t).scale(130.945)}function Hr(he,be){var Pe=he*he,Oe=be*be;return[he*(1-.162388*Oe)*(.87-952426e-9*Pe*Pe),be*(1+Oe/12)]}Hr.invert=function(he,be){var Pe=he,Oe=be,Je=50,He;do{var et=Oe*Oe;Oe-=He=(Oe*(1+et/12)-be)/(1+et/4)}while(n(He)>g&&--Je>0);Je=50,he/=1-.162388*et;do{var Mt=(Mt=Pe*Pe)*Mt;Pe-=He=(Pe*(.87-952426e-9*Mt)-he)/(.87-.00476213*Mt)}while(n(He)>g&&--Je>0);return[Pe,Oe]};function ti(){return t.geoProjection(Hr).scale(131.747)}var zi=oa(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Yi(){return t.geoProjection(zi).scale(131.087)}function an(he){var be=he(S,0)[0]-he(-S,0)[0];function Pe(Oe,Je){var He=Oe>0?-.5:.5,et=he(Oe+He*k,Je);return et[0]-=He*be,et}return he.invert&&(Pe.invert=function(Oe,Je){var He=Oe>0?-.5:.5,et=he.invert(Oe+He*be,Je),Mt=et[0]-He*k;return Mt<-k?Mt+=2*k:Mt>k&&(Mt-=2*k),et[0]=Mt,et}),Pe}function hi(he,be){var Pe=v(he),Oe=v(be),Je=o(be),He=o(he)*Je,et=x(he)*Je,Mt=x(Oe*be);he=n(a(et,Mt)),be=q(He),n(he-S)>g&&(he%=S);var Rt=Ji(he>k/4?S-he:he,be);return he>k/4&&(Mt=Rt[0],Rt[0]=-Rt[1],Rt[1]=-Mt),Rt[0]*=Pe,Rt[1]*=-Oe,Rt}hi.invert=function(he,be){n(he)>1&&(he=v(he)*2-he),n(be)>1&&(be=v(be)*2-be);var Pe=v(he),Oe=v(be),Je=-Pe*he,He=-Oe*be,et=He/Je<1,Mt=ua(et?He:Je,et?Je:He),Rt=Mt[0],Ut=Mt[1],tr=o(Ut);return et&&(Rt=-S-Rt),[Pe*(a(x(Rt)*tr,-x(Ut))+k),Oe*q(o(Rt)*tr)]};function Ji(he,be){if(be===S)return[0,0];var Pe=x(be),Oe=Pe*Pe,Je=Oe*Oe,He=1+Je,et=1+3*Je,Mt=1-Je,Rt=q(1/H(He)),Ut=Mt+Oe*He*Rt,tr=(1-Pe)/Ut,mr=H(tr),Dr=tr*He,zr=H(Dr),Xr=mr*Mt,di,Li;if(he===0)return[0,-(Xr+Oe*zr)];var Ci=o(be),Qi=1/Ci,Mn=2*Pe*Ci,pa=(-3*Oe+Rt*et)*Mn,ea=(-Ut*Ci-(1-Pe)*pa)/(Ut*Ut),Ga=.5*ea/mr,To=Mt*Ga-2*Oe*mr*Mn,Wa=Oe*He*ea+tr*et*Mn,co=-Qi*Mn,Do=-Qi*Wa,Rs=-2*Qi*To,As=4*he/k,yo;if(he>.222*k||be.175*k){if(di=(Xr+Oe*H(Dr*(1+Je)-Xr*Xr))/(1+Je),he>k/4)return[di,di];var po=di,_l=.5*di;di=.5*(_l+po),Li=50;do{var Vl=H(Dr-di*di),Xu=di*(Rs+co*Vl)+Do*q(di/zr)-As;if(!Xu)break;Xu<0?_l=di:po=di,di=.5*(_l+po)}while(n(po-_l)>g&&--Li>0)}else{di=g,Li=25;do{var cu=di*di,el=H(Dr-cu),nu=Rs+co*el,zc=di*nu+Do*q(di/zr)-As,Rl=nu+(Do-co*cu)/el;di-=yo=el?zc/Rl:0}while(n(yo)>g&&--Li>0)}return[di,-Xr-Oe*H(Dr-di*di)]}function ua(he,be){for(var Pe=0,Oe=1,Je=.5,He=50;;){var et=Je*Je,Mt=H(Je),Rt=q(1/H(1+et)),Ut=1-et+Je*(1+et)*Rt,tr=(1-Mt)/Ut,mr=H(tr),Dr=tr*(1+et),zr=mr*(1-et),Xr=Dr-he*he,di=H(Xr),Li=be+zr+Je*di;if(n(Oe-Pe)0?Pe=Je:Oe=Je,Je=.5*(Pe+Oe)}if(!He)return null;var Ci=q(Mt),Qi=o(Ci),Mn=1/Qi,pa=2*Mt*Qi,ea=(-3*Je+Rt*(1+3*et))*pa,Ga=(-Ut*Qi-(1-Mt)*ea)/(Ut*Ut),To=.5*Ga/mr,Wa=(1-et)*To-2*Je*mr*pa,co=-2*Mn*Wa,Do=-Mn*pa,Rs=-Mn*(Je*(1+et)*Ga+tr*(1+3*et)*pa);return[k/4*(he*(co+Do*di)+Rs*q(he/H(Dr))),Ci]}function Fn(){return t.geoProjection(an(hi)).scale(239.75)}function Sa(he,be,Pe){var Oe,Je,He;return he?(Oe=go(he,Pe),be?(Je=go(be,1-Pe),He=Je[1]*Je[1]+Pe*Oe[0]*Oe[0]*Je[0]*Je[0],[[Oe[0]*Je[2]/He,Oe[1]*Oe[2]*Je[0]*Je[1]/He],[Oe[1]*Je[1]/He,-Oe[0]*Oe[2]*Je[0]*Je[2]/He],[Oe[2]*Je[1]*Je[2]/He,-Pe*Oe[0]*Oe[1]*Je[0]/He]]):[[Oe[0],0],[Oe[1],0],[Oe[2],0]]):(Je=go(be,1-Pe),[[0,Je[0]/Je[1]],[1/Je[1],0],[Je[2]/Je[1],0]])}function go(he,be){var Pe,Oe,Je,He,et;if(be=1-g)return Pe=(1-be)/4,Oe=N(he),He=X(he),Je=1/Oe,et=Oe*G(he),[He+Pe*(et-he)/(Oe*Oe),Je-Pe*He*Je*(et-he),Je+Pe*He*Je*(et+he),2*i(s(he))-S+Pe*(et-he)/Oe];var Mt=[1,0,0,0,0,0,0,0,0],Rt=[H(be),0,0,0,0,0,0,0,0],Ut=0;for(Oe=H(1-be),et=1;n(Rt[Ut]/Mt[Ut])>g&&Ut<8;)Pe=Mt[Ut++],Rt[Ut]=(Pe-Oe)/2,Mt[Ut]=(Pe+Oe)/2,Oe=H(Pe*Oe),et*=2;Je=et*Mt[Ut]*he;do He=Rt[Ut]*x(Oe=Je)/Mt[Ut],Je=(q(He)+Je)/2;while(--Ut);return[x(Je),He=o(Je),He/o(Je-Oe),Je]}function Oo(he,be,Pe){var Oe=n(he),Je=n(be),He=G(Je);if(Oe){var et=1/x(Oe),Mt=1/(b(Oe)*b(Oe)),Rt=-(Mt+Pe*(He*He*et*et)-1+Pe),Ut=(Pe-1)*Mt,tr=(-Rt+H(Rt*Rt-4*Ut))/2;return[ho(i(1/H(tr)),Pe)*v(he),ho(i(H((tr/Mt-1)/Pe)),1-Pe)*v(be)]}return[0,ho(i(He),1-Pe)*v(be)]}function ho(he,be){if(!be)return he;if(be===1)return u(b(he/2+L));for(var Pe=1,Oe=H(1-be),Je=H(be),He=0;n(Je)>g;He++){if(he%k){var et=i(Oe*b(he)/Pe);et<0&&(et+=k),he+=et+~~(he/k)*k}else he+=he;Je=(Pe+Oe)/2,Oe=H(Pe*Oe),Je=((Pe=Je)-Oe)/2}return he/(h(2,He)*Pe)}function Mo(he,be){var Pe=(C-1)/(C+1),Oe=H(1-Pe*Pe),Je=ho(S,Oe*Oe),He=-1,et=u(b(k/4+n(be)/2)),Mt=s(He*et)/H(Pe),Rt=xo(Mt*o(He*he),Mt*x(He*he)),Ut=Oo(Rt[0],Rt[1],Oe*Oe);return[-Ut[1],(be>=0?1:-1)*(.5*Je-Ut[0])]}function xo(he,be){var Pe=he*he,Oe=be+1,Je=1-Pe-be*be;return[.5*((he>=0?S:-S)-a(Je,2*he)),-.25*u(Je*Je+4*Pe)+.5*u(Oe*Oe+Pe)]}function zs(he,be){var Pe=be[0]*be[0]+be[1]*be[1];return[(he[0]*be[0]+he[1]*be[1])/Pe,(he[1]*be[0]-he[0]*be[1])/Pe]}Mo.invert=function(he,be){var Pe=(C-1)/(C+1),Oe=H(1-Pe*Pe),Je=ho(S,Oe*Oe),He=-1,et=Sa(.5*Je-be,-he,Oe*Oe),Mt=zs(et[0],et[1]),Rt=a(Mt[1],Mt[0])/He;return[Rt,2*i(s(.5/He*u(Pe*Mt[0]*Mt[0]+Pe*Mt[1]*Mt[1])))-S]};function ks(){return t.geoProjection(an(Mo)).scale(151.496)}function Zs(he){var be=x(he),Pe=o(he),Oe=Xs(he);Oe.invert=Xs(-he);function Je(He,et){var Mt=Oe(He,et);He=Mt[0],et=Mt[1];var Rt=x(et),Ut=o(et),tr=o(He),mr=V(be*Rt+Pe*Ut*tr),Dr=x(mr),zr=n(Dr)>g?mr/Dr:1;return[zr*Pe*x(He),(n(He)>S?zr:-zr)*(be*Ut-Pe*Rt*tr)]}return Je.invert=function(He,et){var Mt=H(He*He+et*et),Rt=-x(Mt),Ut=o(Mt),tr=Mt*Ut,mr=-et*Rt,Dr=Mt*be,zr=H(tr*tr+mr*mr-Dr*Dr),Xr=a(tr*Dr+mr*zr,mr*Dr-tr*zr),di=(Mt>S?-1:1)*a(He*Rt,Mt*o(Xr)*Ut+et*x(Xr)*Rt);return Oe.invert(di,Xr)},Je}function Xs(he){var be=x(he),Pe=o(he);return function(Oe,Je){var He=o(Je),et=o(Oe)*He,Mt=x(Oe)*He,Rt=x(Je);return[a(Mt,et*Pe-Rt*be),q(Rt*Pe+et*be)]}}function wl(){var he=0,be=t.geoProjectionMutator(Zs),Pe=be(he),Oe=Pe.rotate,Je=Pe.stream,He=t.geoCircle();return Pe.parallel=function(et){if(!arguments.length)return he*P;var Mt=Pe.rotate();return be(he=et*T).rotate(Mt)},Pe.rotate=function(et){return arguments.length?(Oe.call(Pe,[et[0],et[1]-he*P]),He.center([-et[0],-et[1]]),Pe):(et=Oe.call(Pe),et[1]+=he*P,et)},Pe.stream=function(et){return et=Je(et),et.sphere=function(){et.polygonStart();var Mt=.01,Rt=He.radius(90-Mt)().coordinates[0],Ut=Rt.length-1,tr=-1,mr;for(et.lineStart();++tr=0;)et.point((mr=Rt[tr])[0],mr[1]);et.lineEnd(),et.polygonEnd()},et},Pe.scale(79.4187).parallel(45).clipAngle(180-.001)}var os=3,cl=q(1-1/os)*P,Cs=ar(0);function ml(he){var be=cl*T,Pe=ht(k,be)[0]-ht(-k,be)[0],Oe=Cs(0,be)[1],Je=ht(0,be)[1],He=M-Je,et=p/he,Mt=4/p,Rt=Oe+He*He*4/p;function Ut(tr,mr){var Dr,zr=n(mr);if(zr>be){var Xr=f(he-1,c(0,l((tr+k)/et)));tr+=k*(he-1)/he-Xr*et,Dr=ht(tr,zr),Dr[0]=Dr[0]*p/Pe-p*(he-1)/(2*he)+Xr*p/he,Dr[1]=Oe+(Dr[1]-Je)*4*He/p,mr<0&&(Dr[1]=-Dr[1])}else Dr=Cs(tr,mr);return Dr[0]*=Mt,Dr[1]/=Rt,Dr}return Ut.invert=function(tr,mr){tr/=Mt,mr*=Rt;var Dr=n(mr);if(Dr>Oe){var zr=f(he-1,c(0,l((tr+k)/et)));tr=(tr+k*(he-1)/he-zr*et)*Pe/p;var Xr=ht.invert(tr,.25*(Dr-Oe)*p/He+Je);return Xr[0]-=k*(he-1)/he-zr*et,mr<0&&(Xr[1]=-Xr[1]),Xr}return Cs.invert(tr,mr)},Ut}function Ys(he,be){return[he,be&1?90-g:cl]}function Hs(he,be){return[he,be&1?-90+g:-cl]}function Eo(he){return[he[0]*(1-g),he[1]]}function fs(he){var be=[].concat(r.range(-180,180+he/2,he).map(Ys),r.range(180,-180-he/2,-he).map(Hs));return{type:"Polygon",coordinates:[he===180?be.map(Eo):be]}}function $l(){var he=4,be=t.geoProjectionMutator(ml),Pe=be(he),Oe=Pe.stream;return Pe.lobes=function(Je){return arguments.length?be(he=+Je):he},Pe.stream=function(Je){var He=Pe.rotate(),et=Oe(Je),Mt=(Pe.rotate([0,0]),Oe(Je));return Pe.rotate(He),et.sphere=function(){t.geoStream(fs(180/he),Mt)},et},Pe.scale(239.75)}function Gu(he){var be=1+he,Pe=x(1/be),Oe=q(Pe),Je=2*H(k/(He=k+4*Oe*be)),He,et=.5*Je*(be+H(he*(2+he))),Mt=he*he,Rt=be*be;function Ut(tr,mr){var Dr=1-x(mr),zr,Xr;if(Dr&&Dr<2){var di=S-mr,Li=25,Ci;do{var Qi=x(di),Mn=o(di),pa=Oe+a(Qi,be-Mn),ea=1+Rt-2*be*Mn;di-=Ci=(di-Mt*Oe-be*Qi+ea*pa-.5*Dr*He)/(2*be*Qi*pa)}while(n(Ci)>E&&--Li>0);zr=Je*H(ea),Xr=tr*pa/k}else zr=Je*(he+Dr),Xr=tr*Oe/k;return[zr*x(Xr),et-zr*o(Xr)]}return Ut.invert=function(tr,mr){var Dr=tr*tr+(mr-=et)*mr,zr=(1+Rt-Dr/(Je*Je))/(2*be),Xr=V(zr),di=x(Xr),Li=Oe+a(di,be-zr);return[q(tr/H(Dr))*k/Li,q(1-2*(Xr-Mt*Oe-be*di+(1+Rt-2*be*zr)*Li)/He)]},Ut}function fc(){var he=1,be=t.geoProjectionMutator(Gu),Pe=be(he);return Pe.ratio=function(Oe){return arguments.length?be(he=+Oe):he},Pe.scale(167.774).center([0,18.67])}var ms=.7109889596207567,on=.0528035274542;function fa(he,be){return be>-ms?(he=Yt(he,be),he[1]+=on,he):St(he,be)}fa.invert=function(he,be){return be>-ms?Yt.invert(he,be-on):St.invert(he,be)};function Qu(){return t.geoProjection(fa).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Il(he,be){return n(be)>ms?(he=Yt(he,be),he[1]-=be>0?on:-on,he):St(he,be)}Il.invert=function(he,be){return n(be)>ms?Yt.invert(he,be+(be>0?on:-on)):St.invert(he,be)};function vo(){return t.geoProjection(Il).scale(152.63)}function Wl(he,be,Pe,Oe){var Je=H(4*k/(2*Pe+(1+he-be/2)*x(2*Pe)+(he+be)/2*x(4*Pe)+be/2*x(6*Pe))),He=H(Oe*x(Pe)*H((1+he*o(2*Pe)+be*o(4*Pe))/(1+he+be))),et=Pe*Rt(1);function Mt(mr){return H(1+he*o(2*mr)+be*o(4*mr))}function Rt(mr){var Dr=mr*Pe;return(2*Dr+(1+he-be/2)*x(2*Dr)+(he+be)/2*x(4*Dr)+be/2*x(6*Dr))/Pe}function Ut(mr){return Mt(mr)*x(mr)}var tr=function(mr,Dr){var zr=Pe*qt(Rt,et*x(Dr)/Pe,Dr/k);isNaN(zr)&&(zr=Pe*v(Dr));var Xr=Je*Mt(zr);return[Xr*He*mr/k*o(zr),Xr/He*x(zr)]};return tr.invert=function(mr,Dr){var zr=qt(Ut,Dr*He/Je);return[mr*k/(o(zr)*Je*He*Mt(zr)),q(Pe*Rt(zr/Pe)/et)]},Pe===0&&(Je=H(Oe/k),tr=function(mr,Dr){return[mr*Je,x(Dr)/Je]},tr.invert=function(mr,Dr){return[mr/Je,q(Dr*Je)]}),tr}function Ks(){var he=1,be=0,Pe=45*T,Oe=2,Je=t.geoProjectionMutator(Wl),He=Je(he,be,Pe,Oe);return He.a=function(et){return arguments.length?Je(he=+et,be,Pe,Oe):he},He.b=function(et){return arguments.length?Je(he,be=+et,Pe,Oe):be},He.psiMax=function(et){return arguments.length?Je(he,be,Pe=+et*T,Oe):Pe*P},He.ratio=function(et){return arguments.length?Je(he,be,Pe,Oe=+et):Oe},He.scale(180.739)}function Zl(he,be,Pe,Oe,Je,He,et,Mt,Rt,Ut,tr){if(tr.nanEncountered)return NaN;var mr,Dr,zr,Xr,di,Li,Ci,Qi,Mn,pa;if(mr=Pe-be,Dr=he(be+mr*.25),zr=he(Pe-mr*.25),isNaN(Dr)){tr.nanEncountered=!0;return}if(isNaN(zr)){tr.nanEncountered=!0;return}return Xr=mr*(Oe+4*Dr+Je)/12,di=mr*(Je+4*zr+He)/12,Li=Xr+di,pa=(Li-et)/15,Ut>Rt?(tr.maxDepthCount++,Li+pa):Math.abs(pa)>1;do Rt[Li]>zr?di=Li:Xr=Li,Li=Xr+di>>1;while(Li>Xr);var Ci=Rt[Li+1]-Rt[Li];return Ci&&(Ci=(zr-Rt[Li+1])/Ci),(Li+1+Ci)/et}var mr=2*tr(1)/k*He/Pe,Dr=function(zr,Xr){var di=tr(n(x(Xr))),Li=Oe(di)*zr;return di/=mr,[Li,Xr>=0?di:-di]};return Dr.invert=function(zr,Xr){var di;return Xr*=mr,n(Xr)<1&&(di=v(Xr)*q(Je(n(Xr))*He)),[zr/Oe(n(Xr)),di]},Dr}function ko(){var he=0,be=2.5,Pe=1.183136,Oe=t.geoProjectionMutator(Zn),Je=Oe(he,be,Pe);return Je.alpha=function(He){return arguments.length?Oe(he=+He,be,Pe):he},Je.k=function(He){return arguments.length?Oe(he,be=+He,Pe):be},Je.gamma=function(He){return arguments.length?Oe(he,be,Pe=+He):Pe},Je.scale(152.63)}function Co(he,be){return n(he[0]-be[0])=0;--Rt)Pe=he[1][Rt],Oe=Pe[0][0],Je=Pe[0][1],He=Pe[1][1],et=Pe[2][0],Mt=Pe[2][1],be.push(Tl([[et-g,Mt-g],[et-g,He+g],[Oe+g,He+g],[Oe+g,Je-g]],30));return{type:"Polygon",coordinates:[r.merge(be)]}}function So(he,be,Pe){var Oe,Je;function He(Rt,Ut){for(var tr=Ut<0?-1:1,mr=be[+(Ut<0)],Dr=0,zr=mr.length-1;Drmr[Dr][2][0];++Dr);var Xr=he(Rt-mr[Dr][1][0],Ut);return Xr[0]+=he(mr[Dr][1][0],tr*Ut>tr*mr[Dr][0][1]?mr[Dr][0][1]:Ut)[0],Xr}Pe?He.invert=Pe(He):he.invert&&(He.invert=function(Rt,Ut){for(var tr=Je[+(Ut<0)],mr=be[+(Ut<0)],Dr=0,zr=tr.length;DrXr&&(di=zr,zr=Xr,Xr=di),[[mr,zr],[Dr,Xr]]})}),et):be.map(function(Ut){return Ut.map(function(tr){return[[tr[0][0]*P,tr[0][1]*P],[tr[1][0]*P,tr[1][1]*P],[tr[2][0]*P,tr[2][1]*P]]})})},be!=null&&et.lobes(be),et}var cf=[[[[-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 rh(){return So(xt,cf).scale(160.857)}var Al=[[[[-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 Hc(){return So(Il,Al).scale(152.63)}var Ql=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Ls(){return So(Yt,Ql).scale(169.529)}var mu=[[[[-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 kc(){return So(Yt,mu).scale(169.529).rotate([20,0])}var Of=[[[[-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 Gc(){return So(fa,Of,rt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var vd=[[[[-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 Bf(){return So(St,vd).scale(152.63).rotate([-20,0])}function ss(he,be){return[3/p*he*H(k*k/3-be*be),be]}ss.invert=function(he,be){return[p/3*he/H(k*k/3-be*be),be]};function ff(){return t.geoProjection(ss).scale(158.837)}function ih(he){function be(Pe,Oe){if(n(n(Oe)-S)2)return null;Pe/=2,Oe/=2;var He=Pe*Pe,et=Oe*Oe,Mt=2*Oe/(1+He+et);return Mt=h((1+Mt)/(1-Mt),1/he),[a(2*Pe,1-He-et)/he,q((Mt-1)/(Mt+1))]},be}function Ul(){var he=.5,be=t.geoProjectionMutator(ih),Pe=be(he);return Pe.spacing=function(Oe){return arguments.length?be(he=+Oe):he},Pe.scale(124.75)}var Js=k/C;function hc(he,be){return[he*(1+H(o(be)))/2,be/(o(be/2)*o(he/6))]}hc.invert=function(he,be){var Pe=n(he),Oe=n(be),Je=g,He=S;Oeg||n(Li)>g)&&--Je>0);return Je&&[Pe,Oe]};function $s(){return t.geoProjection(ws).scale(139.98)}function hs(he,be){return[x(he)/o(be),b(be)*o(he)]}hs.invert=function(he,be){var Pe=he*he,Oe=be*be,Je=Oe+1,He=Pe+Je,et=he?_*H((He-H(He*He-4*Pe))/Pe):1/H(Je);return[q(he*et),v(be)*V(et)]};function Ms(){return t.geoProjection(hs).scale(144.049).clipAngle(90-.001)}function dc(he){var be=o(he),Pe=b(L+he/2);function Oe(Je,He){var et=He-he,Mt=n(et)=0;)tr=he[Ut],mr=tr[0]+Mt*(zr=mr)-Rt*Dr,Dr=tr[1]+Mt*Dr+Rt*zr;return mr=Mt*(zr=mr)-Rt*Dr,Dr=Mt*Dr+Rt*zr,[mr,Dr]}return Pe.invert=function(Oe,Je){var He=20,et=Oe,Mt=Je;do{for(var Rt=be,Ut=he[Rt],tr=Ut[0],mr=Ut[1],Dr=0,zr=0,Xr;--Rt>=0;)Ut=he[Rt],Dr=tr+et*(Xr=Dr)-Mt*zr,zr=mr+et*zr+Mt*Xr,tr=Ut[0]+et*(Xr=tr)-Mt*mr,mr=Ut[1]+et*mr+Mt*Xr;Dr=tr+et*(Xr=Dr)-Mt*zr,zr=mr+et*zr+Mt*Xr,tr=et*(Xr=tr)-Mt*mr-Oe,mr=et*mr+Mt*Xr-Je;var di=Dr*Dr+zr*zr,Li,Ci;et-=Li=(tr*Dr+mr*zr)/di,Mt-=Ci=(mr*Dr-tr*zr)/di}while(n(Li)+n(Ci)>g*g&&--He>0);if(He){var Qi=H(et*et+Mt*Mt),Mn=2*i(Qi*.5),pa=x(Mn);return[a(et*pa,Qi*o(Mn)),Qi?q(Mt*pa/Qi):0]}},Pe}var wo=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Od=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],$o=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ja=[[.9245,0],[0,0],[.01943,0]],Ef=[[.721316,0],[0,0],[-.00881625,-.00617325]];function tc(){return Ml(wo,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function uu(){return Ml(Od,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mh(){return Ml($o,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function jc(){return Ml(Ja,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function kf(){return Ml(Ef,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ml(he,be){var Pe=t.geoProjection(ov(he)).rotate(be).clipAngle(90),Oe=t.geoRotation(be),Je=Pe.center;return delete Pe.rotate,Pe.center=function(He){return arguments.length?Je(Oe(He)):Oe.invert(Je())},Pe}var Yh=H(6),Eh=H(7);function nh(he,be){var Pe=q(7*x(be)/(3*Yh));return[Yh*he*(2*o(2*Pe/3)-1)/Eh,9*x(Pe/3)/Eh]}nh.invert=function(he,be){var Pe=3*q(be*Eh/9);return[he*Eh/(Yh*(2*o(2*Pe/3)-1)),q(x(Pe)*3*Yh/7)]};function hf(){return t.geoProjection(nh).scale(164.859)}function kh(he,be){for(var Pe=(1+_)*x(be),Oe=be,Je=0,He;Je<25&&(Oe-=He=(x(Oe/2)+x(Oe)-Pe)/(.5*o(Oe/2)+o(Oe)),!(n(He)E&&--Oe>0);return He=Pe*Pe,et=He*He,Mt=He*et,[he/(.84719-.13063*He+Mt*Mt*(-.04515+.05494*He-.02326*et+.00331*Mt)),Pe]};function df(){return t.geoProjection(Wc).scale(175.295)}function Cu(he,be){return[he*(1+o(be))/2,2*(be-b(be/2))]}Cu.invert=function(he,be){for(var Pe=be/2,Oe=0,Je=1/0;Oe<10&&n(Je)>g;++Oe){var He=o(be/2);be-=Je=(be-b(be/2)-Pe)/(1-.5/(He*He))}return[2*he/(1+o(be)),be]};function Nf(){return t.geoProjection(Cu).scale(152.63)}var Zc=[[[[-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 ds(){return So(Ge(1/0),Zc).rotate([20,0]).scale(152.63)}function Ch(he,be){var Pe=x(be),Oe=o(be),Je=v(he);if(he===0||n(be)===S)return[0,be];if(be===0)return[he,0];if(n(he)===S)return[he*Oe,S*Pe];var He=k/(2*he)-2*he/k,et=2*be/k,Mt=(1-et*et)/(Pe-et),Rt=He*He,Ut=Mt*Mt,tr=1+Rt/Ut,mr=1+Ut/Rt,Dr=(He*Pe/Mt-He/2)/tr,zr=(Ut*Pe/Rt+Mt/2)/mr,Xr=Dr*Dr+Oe*Oe/tr,di=zr*zr-(Ut*Pe*Pe/Rt+Mt*Pe-1)/mr;return[S*(Dr+H(Xr)*Je),S*(zr+H(di<0?0:di)*v(-be*He)*Je)]}Ch.invert=function(he,be){he/=S,be/=S;var Pe=he*he,Oe=be*be,Je=Pe+Oe,He=k*k;return[he?(Je-1+H((1-Je)*(1-Je)+4*Pe))/(2*he)*S:0,qt(function(et){return Je*(k*x(et)-2*et)*k+4*et*et*(be-x(et))+2*k*et-He*be},0)]};function Bd(){return t.geoProjection(Ch).scale(127.267)}var Jh=1.0148,Cf=.23185,pd=-.14499,Lu=.02406,$h=Jh,eu=5*Cf,Pu=7*pd,Lc=9*Lu,fl=1.790857183;function Xc(he,be){var Pe=be*be;return[he,be*(Jh+Pe*Pe*(Cf+Pe*(pd+Lu*Pe)))]}Xc.invert=function(he,be){be>fl?be=fl:be<-fl&&(be=-fl);var Pe=be,Oe;do{var Je=Pe*Pe;Pe-=Oe=(Pe*(Jh+Je*Je*(Cf+Je*(pd+Lu*Je)))-be)/($h+Je*Je*(eu+Je*(Pu+Lc*Je)))}while(n(Oe)>g);return[he,Pe]};function ic(){return t.geoProjection(Xc).scale(139.319)}function yu(he,be){if(n(be)g&&--Je>0);return et=b(Oe),[(n(be)=0;)if(Oe=be[Mt],Pe[0]===Oe[0]&&Pe[1]===Oe[1]){if(He)return[He,Pe];He=Pe}}}function tu(he){for(var be=he.length,Pe=[],Oe=he[be-1],Je=0;Je0?[-Oe[0],0]:[180-Oe[0],180])};var be=sh.map(function(Pe){return{face:Pe,project:he(Pe)}});return[-1,0,0,1,0,1,4,5].forEach(function(Pe,Oe){var Je=be[Pe];Je&&(Je.children||(Je.children=[])).push(be[Oe])}),Lf(be[0],function(Pe,Oe){return be[Pe<-k/2?Oe<0?6:4:Pe<0?Oe<0?2:0:PeOe^zr>Oe&&Pe<(Dr-Ut)*(Oe-tr)/(zr-tr)+Ut&&(Je=!Je)}return Je}function Dl(he,be){var Pe=be.stream,Oe;if(!Pe)throw new Error("invalid projection");switch(he&&he.type){case"Feature":Oe=Zu;break;case"FeatureCollection":Oe=Ih;break;default:Oe=gc;break}return Oe(he,Pe)}function Ih(he,be){return{type:"FeatureCollection",features:he.features.map(function(Pe){return Zu(Pe,be)})}}function Zu(he,be){return{type:"Feature",id:he.id,properties:he.properties,geometry:gc(he.geometry,be)}}function Dc(he,be){return{type:"GeometryCollection",geometries:he.geometries.map(function(Pe){return gc(Pe,be)})}}function gc(he,be){if(!he)return null;if(he.type==="GeometryCollection")return Dc(he,be);var Pe;switch(he.type){case"Point":Pe=mc;break;case"MultiPoint":Pe=mc;break;case"LineString":Pe=Yc;break;case"MultiLineString":Pe=Yc;break;case"Polygon":Pe=nc;break;case"MultiPolygon":Pe=nc;break;case"Sphere":Pe=nc;break;default:return null}return t.geoStream(he,be(Pe)),Pe.result()}var hl=[],ru=[],mc={point:function(he,be){hl.push([he,be])},result:function(){var he=hl.length?hl.length<2?{type:"Point",coordinates:hl[0]}:{type:"MultiPoint",coordinates:hl}:null;return hl=[],he}},Yc={lineStart:pc,point:function(he,be){hl.push([he,be])},lineEnd:function(){hl.length&&(ru.push(hl),hl=[])},result:function(){var he=ru.length?ru.length<2?{type:"LineString",coordinates:ru[0]}:{type:"MultiLineString",coordinates:ru}:null;return ru=[],he}},nc={polygonStart:pc,lineStart:pc,point:function(he,be){hl.push([he,be])},lineEnd:function(){var he=hl.length;if(he){do hl.push(hl[0].slice());while(++he<4);ru.push(hl),hl=[]}},polygonEnd:pc,result:function(){if(!ru.length)return null;var he=[],be=[];return ru.forEach(function(Pe){pf(Pe)?he.push([Pe]):be.push(Pe)}),be.forEach(function(Pe){var Oe=Pe[0];he.some(function(Je){if(Ph(Je[0],Oe))return Je.push(Pe),!0})||he.push([Pe])}),ru=[],he.length?he.length>1?{type:"MultiPolygon",coordinates:he}:{type:"Polygon",coordinates:he[0]}:null}};function gf(he){var be=he(S,0)[0]-he(-S,0)[0];function Pe(Oe,Je){var He=n(Oe)0?Oe-k:Oe+k,Je),Mt=(et[0]-et[1])*_,Rt=(et[0]+et[1])*_;if(He)return[Mt,Rt];var Ut=be*_,tr=Mt>0^Rt>0?-1:1;return[tr*Mt-v(Rt)*Ut,tr*Rt-v(Mt)*Ut]}return he.invert&&(Pe.invert=function(Oe,Je){var He=(Oe+Je)*_,et=(Je-Oe)*_,Mt=n(He)<.5*be&&n(et)<.5*be;if(!Mt){var Rt=be*_,Ut=He>0^et>0?-1:1,tr=-Ut*Oe+(et>0?1:-1)*Rt,mr=-Ut*Je+(He>0?1:-1)*Rt;He=(-tr-mr)*_,et=(tr-mr)*_}var Dr=he.invert(He,et);return Mt||(Dr[0]+=He>0?k:-k),Dr}),t.geoProjection(Pe).rotate([-90,-90,45]).clipAngle(180-.001)}function gt(){return gf(hi).scale(176.423)}function Bt(){return gf(Mo).scale(111.48)}function wr(he,be){if(!(0<=(be=+be)&&be<=20))throw new Error("invalid digits");function Pe(Ut){var tr=Ut.length,mr=2,Dr=new Array(tr);for(Dr[0]=+Ut[0].toFixed(be),Dr[1]=+Ut[1].toFixed(be);mr2||zr[0]!=tr[0]||zr[1]!=tr[1])&&(mr.push(zr),tr=zr)}return mr.length===1&&Ut.length>1&&mr.push(Pe(Ut[Ut.length-1])),mr}function He(Ut){return Ut.map(Je)}function et(Ut){if(Ut==null)return Ut;var tr;switch(Ut.type){case"GeometryCollection":tr={type:"GeometryCollection",geometries:Ut.geometries.map(et)};break;case"Point":tr={type:"Point",coordinates:Pe(Ut.coordinates)};break;case"MultiPoint":tr={type:Ut.type,coordinates:Oe(Ut.coordinates)};break;case"LineString":tr={type:Ut.type,coordinates:Je(Ut.coordinates)};break;case"MultiLineString":case"Polygon":tr={type:Ut.type,coordinates:He(Ut.coordinates)};break;case"MultiPolygon":tr={type:"MultiPolygon",coordinates:Ut.coordinates.map(He)};break;default:return Ut}return Ut.bbox!=null&&(tr.bbox=Ut.bbox),tr}function Mt(Ut){var tr={type:"Feature",properties:Ut.properties,geometry:et(Ut.geometry)};return Ut.id!=null&&(tr.id=Ut.id),Ut.bbox!=null&&(tr.bbox=Ut.bbox),tr}if(he!=null)switch(he.type){case"Feature":return Mt(he);case"FeatureCollection":{var Rt={type:"FeatureCollection",features:he.features.map(Mt)};return he.bbox!=null&&(Rt.bbox=he.bbox),Rt}default:return et(he)}return he}function vr(he){var be=x(he);function Pe(Oe,Je){var He=be?b(Oe*be/2)/be:Oe/2;if(!Je)return[2*He,-he];var et=2*i(He*x(Je)),Mt=1/b(Je);return[x(et)*Mt,Je+(1-o(et))*Mt-he]}return Pe.invert=function(Oe,Je){if(n(Je+=he)g&&--Mt>0);var Dr=Oe*(Ut=b(et)),zr=b(n(Je)0?S:-S)*(Rt+Je*(tr-et)/2+Je*Je*(tr-2*Rt+et)/2)]}xi.invert=function(he,be){var Pe=be/S,Oe=Pe*90,Je=f(18,n(Oe/5)),He=c(0,l(Je));do{var et=fi[He][1],Mt=fi[He+1][1],Rt=fi[f(19,He+2)][1],Ut=Rt-et,tr=Rt-2*Mt+et,mr=2*(n(Pe)-Mt)/Ut,Dr=tr/Ut,zr=mr*(1-Dr*mr*(1-2*Dr*mr));if(zr>=0||He===1){Oe=(be>=0?5:-5)*(zr+Je);var Xr=50,di;do Je=f(18,n(Oe)/5),He=l(Je),zr=Je-He,et=fi[He][1],Mt=fi[He+1][1],Rt=fi[f(19,He+2)][1],Oe-=(di=(be>=0?S:-S)*(Mt+zr*(Rt-et)/2+zr*zr*(Rt-2*Mt+et)/2)-be)*P;while(n(di)>E&&--Xr>0);break}}while(--He>=0);var Li=fi[He][0],Ci=fi[He+1][0],Qi=fi[f(19,He+2)][0];return[he/(Ci+zr*(Qi-Li)/2+zr*zr*(Qi-2*Ci+Li)/2),Oe*T]};function Fi(){return t.geoProjection(xi).scale(152.63)}function Xi(he){function be(Pe,Oe){var Je=o(Oe),He=(he-1)/(he-Je*o(Pe));return[He*Je*x(Pe),He*x(Oe)]}return be.invert=function(Pe,Oe){var Je=Pe*Pe+Oe*Oe,He=H(Je),et=(he-H(1-Je*(he+1)/(he-1)))/((he-1)/He+He/(he-1));return[a(Pe*et,He*H(1-et*et)),He?q(Oe*et/He):0]},be}function hn(he,be){var Pe=Xi(he);if(!be)return Pe;var Oe=o(be),Je=x(be);function He(et,Mt){var Rt=Pe(et,Mt),Ut=Rt[1],tr=Ut*Je/(he-1)+Oe;return[Rt[0]*Oe/tr,Ut/tr]}return He.invert=function(et,Mt){var Rt=(he-1)/(he-1-Mt*Je);return Pe.invert(Rt*et,Rt*Mt*Oe)},He}function Ti(){var he=2,be=0,Pe=t.geoProjectionMutator(hn),Oe=Pe(he,be);return Oe.distance=function(Je){return arguments.length?Pe(he=+Je,be):he},Oe.tilt=function(Je){return arguments.length?Pe(he,be=Je*T):be*P},Oe.scale(432.147).clipAngle(V(1/he)*P-1e-6)}var qi=1e-4,Ii=1e4,mi=-180,Pn=mi+qi,Ma=180,Ta=Ma-qi,Ea=-90,qa=Ea+qi,Cn=90,sn=Cn-qi;function Ua(he){return he.length>0}function mo(he){return Math.floor(he*Ii)/Ii}function Xo(he){return he===Ea||he===Cn?[0,he]:[mi,mo(he)]}function Ts(he){var be=he[0],Pe=he[1],Oe=!1;return be<=Pn?(be=mi,Oe=!0):be>=Ta&&(be=Ma,Oe=!0),Pe<=qa?(Pe=Ea,Oe=!0):Pe>=sn&&(Pe=Cn,Oe=!0),Oe?[be,Pe]:he}function Qo(he){return he.map(Ts)}function ys(he,be,Pe){for(var Oe=0,Je=he.length;Oe=Ta||tr<=qa||tr>=sn){He[et]=Ts(Rt);for(var mr=et+1;mrPn&&zrqa&&Xr=Mt)break;Pe.push({index:-1,polygon:be,ring:He=He.slice(mr-1)}),He[0]=Xo(He[0][1]),et=-1,Mt=He.length}}}}function Bo(he){var be,Pe=he.length,Oe={},Je={},He,et,Mt,Rt,Ut;for(be=0;be0?k-Mt:Mt)*P],Ut=t.geoProjection(he(et)).rotate(Rt),tr=t.geoRotation(Rt),mr=Ut.center;return delete Ut.rotate,Ut.center=function(Dr){return arguments.length?mr(tr(Dr)):tr.invert(mr())},Ut.clipAngle(90)}function Ko(he){var be=o(he);function Pe(Oe,Je){var He=t.geoGnomonicRaw(Oe,Je);return He[0]*=be,He}return Pe.invert=function(Oe,Je){return t.geoGnomonicRaw.invert(Oe/be,Je)},Pe}function iu(){return Du([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Du(he,be){return vs(Ko,he,be)}function ac(he){if(!(he*=2))return t.geoAzimuthalEquidistantRaw;var be=-he/2,Pe=-be,Oe=he*he,Je=b(Pe),He=.5/x(Pe);function et(Mt,Rt){var Ut=V(o(Rt)*o(Mt-be)),tr=V(o(Rt)*o(Mt-Pe)),mr=Rt<0?-1:1;return Ut*=Ut,tr*=tr,[(Ut-tr)/(2*he),mr*H(4*Oe*tr-(Oe-Ut+tr)*(Oe-Ut+tr))/(2*he)]}return et.invert=function(Mt,Rt){var Ut=Rt*Rt,tr=o(H(Ut+(Dr=Mt+be)*Dr)),mr=o(H(Ut+(Dr=Mt+Pe)*Dr)),Dr,zr;return[a(zr=tr-mr,Dr=(tr+mr)*Je),(Rt<0?-1:1)*V(H(Dr*Dr+zr*zr)*He)]},et}function mf(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(he,be){return vs(ac,he,be)}function Kc(he,be){if(n(be)g&&--Mt>0);return[v(he)*(H(Je*Je+4)+Je)*k/4,S*et]};function _c(){return t.geoProjection(yc).scale(127.16)}function le(he,be,Pe,Oe,Je){function He(et,Mt){var Rt=Pe*x(Oe*Mt),Ut=H(1-Rt*Rt),tr=H(2/(1+Ut*o(et*=Je)));return[he*Ut*tr*x(et),be*Rt*tr]}return He.invert=function(et,Mt){var Rt=et/he,Ut=Mt/be,tr=H(Rt*Rt+Ut*Ut),mr=2*q(tr/2);return[a(et*b(mr),he*tr)/Je,tr&&q(Mt*x(mr)/(be*Pe*tr))/Oe]},He}function w(he,be,Pe,Oe){var Je=k/3;he=c(he,g),be=c(be,g),he=f(he,S),be=f(be,k-g),Pe=c(Pe,0),Pe=f(Pe,100-g),Oe=c(Oe,g);var He=Pe/100+1,et=Oe/100,Mt=V(He*o(Je))/Je,Rt=x(he)/x(Mt*S),Ut=be/k,tr=H(et*x(he/2)/x(be/2)),mr=tr/H(Ut*Rt*Mt),Dr=1/(tr*H(Ut*Rt*Mt));return le(mr,Dr,Rt,Mt,Ut)}function B(){var he=65*T,be=60*T,Pe=20,Oe=200,Je=t.geoProjectionMutator(w),He=Je(he,be,Pe,Oe);return He.poleline=function(et){return arguments.length?Je(he=+et*T,be,Pe,Oe):he*P},He.parallels=function(et){return arguments.length?Je(he,be=+et*T,Pe,Oe):be*P},He.inflation=function(et){return arguments.length?Je(he,be,Pe=+et,Oe):Pe},He.ratio=function(et){return arguments.length?Je(he,be,Pe,Oe=+et):Oe},He.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*k+3*H(3),se=2*H(2*k*H(3)/ee),qe=Ct(se*H(3)/k,se,ee/6);function je(){return t.geoProjection(qe).scale(176.84)}function it(he,be){return[he*H(1-3*be*be/(k*k)),be]}it.invert=function(he,be){return[he/H(1-3*be*be/(k*k)),be]};function yt(){return t.geoProjection(it).scale(152.63)}function Ot(he,be){var Pe=o(be),Oe=o(he)*Pe,Je=1-Oe,He=o(he=a(x(he)*Pe,-x(be))),et=x(he);return Pe=H(1-Oe*Oe),[et*Pe-He*Je,-He*Pe-et*Je]}Ot.invert=function(he,be){var Pe=(he*he+be*be)/-2,Oe=H(-Pe*(2+Pe)),Je=be*Pe+he*Oe,He=he*Pe-be*Oe,et=H(He*He+Je*Je);return[a(Oe*Je,et*(1+Pe)),et?-q(Oe*He/et):0]};function Nt(){return t.geoProjection(Ot).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function hr(he,be){var Pe=Me(he,be);return[(Pe[0]+he/S)/2,(Pe[1]+be)/2]}hr.invert=function(he,be){var Pe=he,Oe=be,Je=25;do{var He=o(Oe),et=x(Oe),Mt=x(2*Oe),Rt=et*et,Ut=He*He,tr=x(Pe),mr=o(Pe/2),Dr=x(Pe/2),zr=Dr*Dr,Xr=1-Ut*mr*mr,di=Xr?V(He*mr)*H(Li=1/Xr):Li=0,Li,Ci=.5*(2*di*He*Dr+Pe/S)-he,Qi=.5*(di*et+Oe)-be,Mn=.5*Li*(Ut*zr+di*He*mr*Rt)+.5/S,pa=Li*(tr*Mt/4-di*et*Dr),ea=.125*Li*(Mt*Dr-di*et*Ut*tr),Ga=.5*Li*(Rt*mr+di*zr*He)+.5,To=pa*ea-Ga*Mn,Wa=(Qi*pa-Ci*Ga)/To,co=(Ci*ea-Qi*Mn)/To;Pe-=Wa,Oe-=co}while((n(Wa)>g||n(co)>g)&&--Je>0);return[Pe,Oe]};function Sr(){return t.geoProjection(hr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=ae,e.geoAitoff=ke,e.geoAitoffRaw=Me,e.geoArmadillo=ie,e.geoArmadilloRaw=ge,e.geoAugust=Ee,e.geoAugustRaw=Te,e.geoBaker=me,e.geoBakerRaw=Ce,e.geoBerghaus=ce,e.geoBerghausRaw=De,e.geoBertin1953=Dt,e.geoBertin1953Raw=ot,e.geoBoggs=bt,e.geoBoggsRaw=xt,e.geoBonne=Ht,e.geoBonneRaw=dt,e.geoBottomley=fr,e.geoBottomleyRaw=$t,e.geoBromley=Br,e.geoBromleyRaw=_r,e.geoChamberlin=Xe,e.geoChamberlinRaw=Ne,e.geoChamberlinAfrica=Ve,e.geoCollignon=Le,e.geoCollignonRaw=ht,e.geoCraig=Se,e.geoCraigRaw=xe,e.geoCraster=Vt,e.geoCrasterRaw=Gt,e.geoCylindricalEqualArea=Qr,e.geoCylindricalEqualAreaRaw=ar,e.geoCylindricalStereographic=jr,e.geoCylindricalStereographicRaw=ai,e.geoEckert1=bi,e.geoEckert1Raw=ri,e.geoEckert2=Wi,e.geoEckert2Raw=nn,e.geoEckert3=_n,e.geoEckert3Raw=Ni,e.geoEckert4=zn,e.geoEckert4Raw=$i,e.geoEckert5=It,e.geoEckert5Raw=Wn,e.geoEckert6=jt,e.geoEckert6Raw=ft,e.geoEisenlohr=Fr,e.geoEisenlohrRaw=yr,e.geoFahey=gi,e.geoFaheyRaw=Vr,e.geoFoucaut=Mi,e.geoFoucautRaw=Si,e.geoFoucautSinusoidal=Gi,e.geoFoucautSinusoidalRaw=Pi,e.geoGilbert=jn,e.geoGingery=jo,e.geoGingeryRaw=la,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=Sn,e.geoGinzburg5=xn,e.geoGinzburg5Raw=oo,e.geoGinzburg6=br,e.geoGinzburg6Raw=_t,e.geoGinzburg8=ti,e.geoGinzburg8Raw=Hr,e.geoGinzburg9=Yi,e.geoGinzburg9Raw=zi,e.geoGringorten=Fn,e.geoGringortenRaw=hi,e.geoGuyou=ks,e.geoGuyouRaw=Mo,e.geoHammer=ct,e.geoHammerRaw=Ge,e.geoHammerRetroazimuthal=wl,e.geoHammerRetroazimuthalRaw=Zs,e.geoHealpix=$l,e.geoHealpixRaw=ml,e.geoHill=fc,e.geoHillRaw=Gu,e.geoHomolosine=vo,e.geoHomolosineRaw=Il,e.geoHufnagel=Ks,e.geoHufnagelRaw=Wl,e.geoHyperelliptical=ko,e.geoHyperellipticalRaw=Zn,e.geoInterrupt=So,e.geoInterruptedBoggs=rh,e.geoInterruptedHomolosine=Hc,e.geoInterruptedMollweide=Ls,e.geoInterruptedMollweideHemispheres=kc,e.geoInterruptedSinuMollweide=Gc,e.geoInterruptedSinusoidal=Bf,e.geoKavrayskiy7=ff,e.geoKavrayskiy7Raw=ss,e.geoLagrange=Ul,e.geoLagrangeRaw=ih,e.geoLarrivee=Cc,e.geoLarriveeRaw=hc,e.geoLaskowski=$s,e.geoLaskowskiRaw=ws,e.geoLittrow=Ms,e.geoLittrowRaw=hs,e.geoLoximuthal=Sl,e.geoLoximuthalRaw=dc,e.geoMiller=Ps,e.geoMillerRaw=ec,e.geoModifiedStereographic=Ml,e.geoModifiedStereographicRaw=ov,e.geoModifiedStereographicAlaska=tc,e.geoModifiedStereographicGs48=uu,e.geoModifiedStereographicGs50=Mh,e.geoModifiedStereographicMiller=jc,e.geoModifiedStereographicLee=kf,e.geoMollweide=xr,e.geoMollweideRaw=Yt,e.geoMtFlatPolarParabolic=hf,e.geoMtFlatPolarParabolicRaw=nh,e.geoMtFlatPolarQuartic=Kh,e.geoMtFlatPolarQuarticRaw=kh,e.geoMtFlatPolarSinusoidal=ah,e.geoMtFlatPolarSinusoidalRaw=rc,e.geoNaturalEarth2=df,e.geoNaturalEarth2Raw=Wc,e.geoNellHammer=Nf,e.geoNellHammerRaw=Cu,e.geoInterruptedQuarticAuthalic=ds,e.geoNicolosi=Bd,e.geoNicolosiRaw=Ch,e.geoPatterson=ic,e.geoPattersonRaw=Xc,e.geoPolyconic=Qs,e.geoPolyconicRaw=yu,e.geoPolyhedral=Lf,e.geoPolyhedralButterfly=Fs,e.geoPolyhedralCollignon=Lh,e.geoPolyhedralWaterman=Is,e.geoProject=Dl,e.geoGringortenQuincuncial=gt,e.geoPeirceQuincuncial=Bt,e.geoPierceQuincuncial=Bt,e.geoQuantize=wr,e.geoQuincuncial=gf,e.geoRectangularPolyconic=Ur,e.geoRectangularPolyconicRaw=vr,e.geoRobinson=Fi,e.geoRobinsonRaw=xi,e.geoSatellite=Ti,e.geoSatelliteRaw=hn,e.geoSinuMollweide=Qu,e.geoSinuMollweideRaw=fa,e.geoSinusoidal=Et,e.geoSinusoidalRaw=St,e.geoStitch=Ds,e.geoTimes=Ka,e.geoTimesRaw=ia,e.geoTwoPointAzimuthal=Du,e.geoTwoPointAzimuthalRaw=Ko,e.geoTwoPointAzimuthalUsa=iu,e.geoTwoPointEquidistant=bu,e.geoTwoPointEquidistantRaw=ac,e.geoTwoPointEquidistantUsa=mf,e.geoVanDerGrinten=Ru,e.geoVanDerGrintenRaw=Kc,e.geoVanDerGrinten2=Ra,e.geoVanDerGrinten2Raw=Rc,e.geoVanDerGrinten3=Jc,e.geoVanDerGrinten3Raw=eo,e.geoVanDerGrinten4=_c,e.geoVanDerGrinten4Raw=yc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=je,e.geoWagner4Raw=qe,e.geoWagner6=yt,e.geoWagner6Raw=it,e.geoWiechel=Nt,e.geoWiechelRaw=Ot,e.geoWinkel3=Sr,e.geoWinkel3Raw=hr,Object.defineProperty(e,"__esModule",{value:!0})})});var MDe=ye((Epr,SDe)=>{"use strict";var Zh=xa(),bX=Mr(),bRt=ba(),X5=Math.PI/180,G2=180/Math.PI,TX={cursor:"pointer"},AX={cursor:"auto"};function wRt(e,t){var r=e.projection,n;return t._isScoped?n=TRt:t._isClipped?n=SRt:n=ARt,n(e,r)}SDe.exports=wRt;function SX(e,t){return Zh.behavior.zoom().translate(t.translate()).scale(t.scale())}function MX(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]=bX.nestedProperty(o,h).get(),bRt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=bX.nestedProperty(l,h);v.get()!==d&&(v.set(d),bX.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 TRt(e,t){var r=SX(e,t);function n(){Zh.select(this).style(TX)}function i(){t.scale(Zh.event.scale).translate(Zh.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(){Zh.select(this).style(AX),MX(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function ARt(e,t){var r=SX(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(k){return t.invert(k)}function v(k){var S=d(k);if(!S)return!0;var L=t(S);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function x(){Zh.select(this).style(TX),i=Zh.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=Zh.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(Zh.event.scale),t.translate([o[0],Zh.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 k=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":-k[0]})}function g(){Zh.select(this).style(AX),h&&MX(e,t,E)}function E(k){var S=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-S[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",b).on("zoomend",g),r}function SRt(e,t){var r={r:t.rotate(),k:t.scale()},n=SX(e,t),i=DRt(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){Zh.select(this).style(TX);var h=Zh.mouse(this),d=t.rotate(),v=d,x=t.translate(),b=MRt(d);s=Sz(t,h),o.call(n,"zoom",function(){var g=Zh.mouse(this);if(t.scale(r.k=Zh.event.scale),!s)h=g,s=Sz(t,h);else if(Sz(t,g)){t.rotate(d).translate(x);var E=Sz(t,g),k=kRt(s,E),S=LRt(ERt(b,k)),L=r.r=CRt(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(){Zh.select(this).style(AX),o.call(n,"zoom",null),c(i.of(this,arguments)),MX(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 Zh.rebind(n,i,"on")}function Sz(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&PRt(r)}function MRt(e){var t=.5*e[0]*X5,r=.5*e[1]*X5,n=.5*e[2]*X5,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 ERt(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 kRt(e,t){if(!(!e||!t)){var r=IRt(e,t),n=Math.sqrt(ADe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,ADe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function CRt(e,t,r){var n=wX(t,2,e[0]);n=wX(n,1,e[1]),n=wX(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)*G2,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)*G2-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,x=(Math.atan2(u,s)-Math.atan2(o,h))*G2,b=(Math.atan2(u,s)-Math.atan2(o,-h))*G2,g=wDe(r[0],r[1],d,x),E=wDe(r[0],r[1],v,b);return g<=E?[d,x,r[2]]:[v,b,r[2]]}function wDe(e,t,r,n){var i=TDe(r-e),a=TDe(n-t);return Math.sqrt(i*i+a*a)}function TDe(e){return(e%360+540)%360-180}function wX(e,t,r){var n=r*X5,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 LRt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*G2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*G2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*G2]}function PRt(e){var t=e[0]*X5,r=e[1]*X5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function ADe(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var t1=xa(),CX=xX(),RRt=CX.geoPath,zRt=CX.geoDistance,FRt=bDe(),qRt=ba(),QE=Mr(),ORt=QE.strTranslate,Mz=va(),$E=ao(),EDe=Nc(),BRt=Yu(),kX=Qa(),kDe=wg().getAutoRange,EX=gv(),NRt=wf().prepSelect,URt=wf().clearOutline,VRt=wf().selectOnClick,HRt=MDe(),fp=XE(),GRt=ix(),LDe=cz(),jRt=aX().feature;function PDe(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 $g=PDe.prototype;IDe.exports=function(t){return new PDe(t)};$g.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),BRt.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()};$g.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=WRt(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||{},x=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=kDe(r,u),c.range=kDe(r,c);var g=(u.range[0]+u.range[1])/2,E=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:g,lat:E};else if(n._isClipped){d={lon:g,lat:E},v={lon:g,lat:E,roll:v.roll};var k=o.type,S=fp.lonaxisSpan[k]/2||180,L=fp.lataxisSpan[k]/2||90;x=[g-S,g+S],b=[E-L,E+L]}else d={lon:g,lat:E},v={lon:g,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 _=CDe(x,b);f.fitExtent(h,_);var C=this.bounds=f.getBounds(_),M=this.fitScale=f.scale(),p=f.translate();if(n.fitbounds){var P=f.getBounds(CDe(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):QE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*M);var F=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([p[0]+(F[0]-p[0]),p[1]+(F[1]-p[1])]).clipExtent(C),n._isAlbersUsa){var q=f([d.lon,d.lat]),V=f.translate();f.translate([V[0]-(q[0]-V[0]),V[1]-(q[1]-V[1])])}};$g.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(jRt(n,n.objects[h])):o(h)&&d.datum(ZRt(h,t,e)).call(Mz.stroke,t[h].gridcolor).call($E.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(Mz.stroke,t[v+"color"]).call($E.dashLine,"",t[v+"width"]):l(h)&&d.call(Mz.fill,t[v+"color"])})};$g.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;$E.setRect(this.clipRect,i,a,o,s),this.bgRect.call($E.setRect,i,a,o,s).call(Mz.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};$g.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];qRt.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&&URt(n)}};a==="pan"?(i.node().onmousedown=null,i.call(HRt(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){NRt(f,h,d,c,a)},EX.init(c)),i.on("mousemove",function(){var f=r.projection.invert(QE.getPositionFromD3Event());if(!f)return EX.unhover(n,t1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},EDe.hover(n,t1.event,r.id)}),i.on("mouseout",function(){n._dragging||EX.unhover(n,t1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&VRt(t1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&EDe.click(n,t1.event))})};$g.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($E.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"},kX.setConvert(e.mockAxis,r)};$g.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},QE.extendFlat(this.viewInitial,i)};$g.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};$g._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?ORt(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 WRt(e){var t=e.projection,r=t.type,n=fp.projNames[r];n="geo"+QE.titleCase(n);for(var i=CX[n]||FRt[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 RRt().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 ZRt(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(E,k){return[E,k]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(E,k){return[k,E]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};kX.setConvert(c,r);var f=kX.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 LX=ye((Cpr,FDe)=>{"use strict";var K5=dh(),XRt=Ju().attributes,YRt=Ed().dash,Y5=XE(),KRt=Bu().overrideAll,RDe=X1(),zDe={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:K5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:YRt},JRt=FDe.exports=KRt({domain:XRt({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:RDe(Y5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:RDe(Y5.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:K5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:Y5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:Y5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:Y5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:Y5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:K5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:K5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:K5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:K5.background},lonaxis:zDe,lataxis:zDe},"plot","from-root");JRt.uirevision={valType:"any",editType:"none"}});var BDe=ye((Lpr,ODe)=>{"use strict";var Ez=Mr(),$Rt=k_(),QRt=kd().getSubplotData,kz=XE(),ezt=LX(),qDe=kz.axesNames;ODe.exports=function(t,r,n){$Rt(t,r,n,{type:"geo",attributes:ezt,handleDefaults:tzt,fullData:n,partition:"y"})};function tzt(e,t,r,n){var i=QRt(n.fullData,"geo",n.id),a=i.map(function(ae){return ae.index}),o=r("resolution"),s=r("scope"),l=kz.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=!!kz.lonaxisSpan[u];if(e.visible===!1){var x=Ez.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var b=r("visible"),g,E=0;E0&&q<0&&(q+=360);var V=(F+q)/2,H;if(!c){var X=f?l.projRotate:[V,0,0];H=r("projection.rotation.lon",X[0]),r("projection.rotation.lat",X[1]),r("projection.rotation.roll",X[2]),g=r("showcoastlines",!f&&b),g&&(r("coastlinecolor"),r("coastlinewidth")),g=r("showocean",b?void 0:!1),g&&r("oceancolor")}var G,N;if(c?(G=-96.6,N=38.7):(G=f?V:H,N=(T[0]+T[1])/2),r("center.lon",G),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var W=l.projParallels||[0,60];r("projection.parallels",W)}r("projection.scale"),g=r("showland",b?void 0:!1),g&&r("landcolor"),g=r("showlakes",b?void 0:!1),g&&r("lakecolor"),g=r("showrivers",b?void 0:!1),g&&(r("rivercolor"),r("riverwidth")),g=r("showcountries",f&&s!=="usa"&&b),g&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(g=r("showframe",b),g&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var PX=ye((Ppr,VDe)=>{"use strict";var rzt=kd().getSubplotCalcData,izt=Mr().counterRegex,nzt=DDe(),Wm="geo",NDe=izt(Wm),UDe={};UDe[Wm]={valType:"subplotid",dflt:Wm,editType:"calc"};function azt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Wm],i=0;i{"use strict";HDe.exports={attributes:H2(),supplyDefaults:A8e(),colorbar:Kd(),formatLabels:E8e(),calc:lz(),calcGeoJSON:_X().calcGeoJSON,plot:_X().plot,style:pX(),styleOnSelect:op().styleOnSelect,hoverPoints:hDe(),eventData:vDe(),selectPoints:mDe(),moduleType:"trace",name:"scattergeo",basePlotModule:PX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var WDe=ye((Dpr,jDe)=>{"use strict";jDe.exports=GDe()});var J5=ye((Rpr,YDe)=>{"use strict";var lzt=Wo().hovertemplateAttrs,ax=H2(),uzt=Kl(),ZDe=vl(),czt=dh().defaultLine,nx=no().extendFlat,XDe=ax.marker.line;YDe.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({},XDe.color,{dflt:czt}),width:nx({},XDe.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({},ZDe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:lzt(),showlegend:nx({},ZDe.showlegend,{dflt:!1})},uzt("",{cLetter:"z",editTypeOverride:"calc"}))});var JDe=ye((zpr,KDe)=>{"use strict";var Cz=Mr(),fzt=Uh(),hzt=J5();KDe.exports=function(t,r,n,i){function a(h,d){return Cz.coerce(t,r,hzt,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&Cz.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!==""||Cz.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),fzt(t,r,i,a,{prefix:"",cLetter:"z"}),Cz.coerceSelectionMarkerOpacity(r,a)}});var Lz=ye((Fpr,eRe)=>{"use strict";var $De=uo(),dzt=es().BADNUM,vzt=zv(),pzt=km(),gzt=F0();function QDe(e){return e&&typeof e=="string"}eRe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return QDe(c)||$De(c)}:a=QDe;for(var o=0;o{"use strict";var mzt=xa(),yzt=va(),IX=ao(),_zt=Mu();function xzt(e,t){t&&tRe(e,t)}function tRe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=_zt.makeColorScaleFuncFromTrace(r);i.each(function(l){mzt.select(this).attr("fill",s(l.z)).call(yzt.stroke,l.mlc||o.color).call(IX.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),IX.selectedPointStyle(i,r)}function bzt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?IX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):tRe(e,t)}rRe.exports={style:xzt,styleOnSelect:bzt}});var DX=ye((Opr,aRe)=>{"use strict";var wzt=xa(),iRe=Mr(),$5=ix(),Tzt=cz().getTopojsonFeatures,nRe=wg().findExtremes,Azt=Pz().style;function Szt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");iRe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=wzt.select(this),o=a.selectAll("path.choroplethlocation").data(iRe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Azt(e,i)})}function Mzt(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"?$5.extractTraceFeature(e):Tzt(r,i.topojson),l=[],u=[],c=0;c{"use strict";var Ezt=Qa(),kzt=J5(),Czt=Mr().fillText;oRe.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 Dz=ye((Npr,sRe)=>{"use strict";sRe.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 Rz=ye((Upr,lRe)=>{"use strict";lRe.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";uRe.exports={attributes:J5(),supplyDefaults:JDe(),colorbar:S_(),calc:Lz(),calcGeoJSON:DX().calcGeoJSON,plot:DX().plot,style:Pz().style,styleOnSelect:Pz().styleOnSelect,hoverPoints:Iz(),eventData:Dz(),selectPoints:Rz(),moduleType:"trace",name:"choropleth",basePlotModule:PX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var hRe=ye((Hpr,fRe)=>{"use strict";fRe.exports=cRe()});var zz=ye((Gpr,vRe)=>{"use strict";var Pzt=ba(),s0=Mr(),Izt=oT();function Dzt(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 x=s.p2c(f-d),b=s.p2c(f+d),g=l.p2c(h-d),E=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(x,b),Math.min(l._rl[0],l._rl[1]),Math.max(x,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(x,b),Math.min(g,E),Math.max(x,b),Math.max(g,E))}else v=a.ids;var k,S,L,_,C,M,p,P,T,F=d;if(n==="x"){var q=!!o.xperiodalignment,V=!!o.yperiodalignment;for(C=0;C=Math.min(H,X)&&f<=Math.max(H,X)?0:1/0}if(M=Math.min(G,N)&&h<=Math.max(G,N)?0:1/0}T=Math.sqrt(M*M+p*p),S=v[C]}}}else for(C=v.length-1;C>-1;C--)k=v[C],L=u[k],_=c[k],M=s.c2p(L)-f,p=l.c2p(_)-h,P=Math.sqrt(M*M+p*p),P{"use strict";var pRe=20;gRe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:pRe,SYMBOL_STROKE:pRe/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 ek=ye((Wpr,xRe)=>{"use strict";var Rzt=vl(),zzt=Su(),Fzt=Eg(),Af=Uc(),mRe=Oc().axisHoverFormat,yRe=Kl(),qzt=X1(),RX=no().extendFlat,Ozt=Bu().overrideAll,Bzt=ox().DASHES,_Re=Af.line,r1=Af.marker,Nzt=r1.line,Q5=xRe.exports=Ozt({x:Af.x,x0:Af.x0,dx:Af.dx,y:Af.y,y0:Af.y0,dy:Af.dy,xperiod:Af.xperiod,yperiod:Af.yperiod,xperiod0:Af.xperiod0,yperiod0:Af.yperiod0,xperiodalignment:Af.xperiodalignment,yperiodalignment:Af.yperiodalignment,xhoverformat:mRe("x"),yhoverformat:mRe("y"),text:Af.text,hovertext:Af.hovertext,textposition:Af.textposition,textfont:zzt({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:_Re.color,width:_Re.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:qzt(Bzt),dflt:"solid"}},marker:RX({},yRe("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:RX({},yRe("marker.line"),{width:Nzt.width})}),connectgaps:Af.connectgaps,fill:RX({},Af.fill,{dflt:"none"}),fillcolor:Fzt(),selected:{marker:Af.selected.marker,textfont:Af.selected.textfont},unselected:{marker:Af.unselected.marker,textfont:Af.unselected.textfont},opacity:Rzt.opacity},"calc","nested");Q5.x.editType=Q5.y.editType=Q5.x0.editType=Q5.y0.editType="calc+clearAxisTypes";Q5.hovertemplate=Af.hovertemplate;Q5.texttemplate=Af.texttemplate});var Fz=ye(zX=>{"use strict";var bRe=ox();zX.isOpenSymbol=function(e){return typeof e=="string"?bRe.OPEN_RE.test(e):e%200>100};zX.isDotSymbol=function(e){return typeof e=="string"?bRe.DOT_RE.test(e):e>200}});var ARe=ye((Xpr,TRe)=>{"use strict";var wRe=Mr(),Uzt=ba(),Vzt=Fz(),Hzt=ek(),Gzt=Sm(),qz=lu(),jzt=K3(),Wzt=Pg(),Zzt=$p(),Xzt=D0(),Yzt=Ig(),Kzt=R0();TRe.exports=function(t,r,n,i){function a(d,v){return wRe.coerce(t,r,Hzt,d,v)}var o=t.marker?Vzt.isOpenSymbol(t.marker.symbol):!1,s=qz.isBubble(t),l=jzt(t,r,i,a);if(!l){r.visible=!1;return}Wzt(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var Jzt=JP();SRe.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]),Jzt(t,r,n)}});var kRe=ye((Kpr,ERe)=>{"use strict";function $zt(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 Qzt(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 eFt(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 tFt(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 rFt(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 tk(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)}ERe.exports={ge:function(e,t,r,n,i){return tk(e,t,r,n,i,$zt)},gt:function(e,t,r,n,i){return tk(e,t,r,n,i,Qzt)},lt:function(e,t,r,n,i){return tk(e,t,r,n,i,eFt)},le:function(e,t,r,n,i){return tk(e,t,r,n,i,tFt)},eq:function(e,t,r,n,i){return tk(e,t,r,n,i,rFt)}}});var Zm=ye((Jpr,LRe)=>{"use strict";LRe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=CRe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var iFt=Zm();PRe.exports=nFt;function nFt(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=iFt(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 j2=ye((Qpr,IRe)=>{"use strict";IRe.exports=aFt;function aFt(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]{DRe.exports=function(){for(var e=0;e{var zRe=HR();FRe.exports=oFt;function oFt(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(zRe(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";qRe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var NRe=ye((i0r,BRe)=>{"use strict";BRe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var ZRe=ye((n0r,WRe)=>{"use strict";var URe=kRe(),VRe=O5(),sFt=eA(),lFt=j2(),HRe=Zm(),qX=RRe(),uFt=W2(),cFt=ORe(),fFt=HR(),GRe=NRe(),hFt=1073741824;WRe.exports=function(t,r){r||(r={}),t=uFt(t,"float64"),r=HRe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=qX(r.maxDepth,255),i=qX(r.bounds,lFt(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=jRe(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(fFt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let g=0;gn||_>hFt){for(let N=0;N_e||p>Me||P=F||re===ae)return;let ke=l[W];ae===void 0&&(ae=ke.length);for(let De=re;De=S&&Ge<=_&&nt>=L&&nt<=C&&q.push(ce)}let ge=u[W],ie=ge[re*4+0],Te=ge[re*4+1],Ee=ge[re*4+2],Ae=ge[re*4+3],ze=H(ge,re+1),Ce=N*.5,me=W+1;V(X,G,Ce,me,ie,Te||Ee||Ae||ze),V(X,G+Ce,Ce,me,Te,Ee||Ae||ze),V(X+Ce,G,Ce,me,Ee,Ae||ze),V(X+Ce,G+Ce,Ce,me,Ae,ze)}function H(X,G){let N=null,W=0;for(;N===null;)if(N=X[G*4+W],W++,W>X.length)return null;return N}return q}function x(g,E,k,S,L){let _=[];for(let C=0;C{"use strict";XRe.exports=ZRe()});var OX=ye((o0r,YRe)=>{YRe.exports=dFt;function dFt(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(Bz,"__esModule",{value:!0});var vFt=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")}}(),rk=Math.PI*2,BX=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}},pFt=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}]},KRe=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)},gFt=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),x=Math.pow(f,2),b=Math.pow(h,2),g=d*v-d*b-v*x;g<0&&(g=0),g/=d*b+v*x,g=Math.sqrt(g)*(s===l?-1:1);var E=g*a/o*h,k=g*-o/a*f,S=c*E-u*k+(t+n)/2,L=u*E+c*k+(r+i)/2,_=(f-E)/a,C=(h-k)/o,M=(-f-E)/a,p=(-h-k)/o,P=KRe(1,0,_,C),T=KRe(_,C,M,p);return l===0&&T>0&&(T-=rk),l===1&&T<0&&(T+=rk),[S,L,P,T]},mFt=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 x=Math.sin(u*rk/360),b=Math.cos(u*rk/360),g=b*(r-i)/2+x*(n-a)/2,E=-x*(r-i)/2+b*(n-a)/2;if(g===0&&E===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(g,2)/Math.pow(o,2)+Math.pow(E,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var S=gFt(r,n,i,a,o,s,f,d,x,b,g,E),L=vFt(S,4),_=L[0],C=L[1],M=L[2],p=L[3],P=Math.abs(p)/(rk/4);Math.abs(1-P)<1e-7&&(P=1);var T=Math.max(Math.ceil(P),1);p/=T;for(var F=0;F{"use strict";eze.exports=_Ft;var yFt=$Re();function _Ft(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 Nz(e,t,r,n){return["C",e,t,r,n,r,n]}function QRe(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 NX=ye((l0r,rze)=>{"use strict";rze.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var aze=ye((u0r,nze)=>{"use strict";var xFt=XS(),bFt=OX(),wFt=tze(),TFt=NX(),ize=tE();nze.exports=AFt;function AFt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(ize(TFt(e),"String is not an SVG path."),e=xFt(e)),ize(Array.isArray(e),"Argument should be a string or an array of path segments."),e=bFt(e),e=wFt(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 fze=ye((c0r,cze)=>{var Z2=Math.PI,oze=uze(120);cze.exports=SFt;function SFt(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 x=u,b=c;(t=="C"||t=="S")&&(x+=x-n,b+=b-i),d=["C",x,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=sze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=sze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=Uz(u,c,d[1],d[2]);break;case"H":d=Uz(u,c,d[1],c);break;case"V":d=Uz(u,c,u,d[1]);break;case"Z":d=Uz(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 Uz(e,t,r,n){return["C",e,t,r,n,r,n]}function sze(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 lze(e,t,r,n,i,a,o,s,l,u){if(u)k=u[0],S=u[1],g=u[2],E=u[3];else{var c=UX(e,t,-i);e=c.x,t=c.y,c=UX(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,x=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*x-v*h*h-x*f*f)/(v*h*h+x*f*f)));b==1/0&&(b=1);var g=b*r*h/n+(e+s)/2,E=b*-n*f/r+(t+l)/2,k=Math.asin(((t-E)/n).toFixed(9)),S=Math.asin(((l-E)/n).toFixed(9));k=eS&&(k=k-Z2*2),!o&&S>k&&(S=S-Z2*2)}if(Math.abs(S-k)>oze){var L=S,_=s,C=l;S=k+oze*(o&&S>k?1:-1),s=g+r*Math.cos(S),l=E+n*Math.sin(S);var M=lze(s,l,r,n,i,0,o,_,C,[S,L,g,E])}var p=Math.tan((S-k)/4),P=4/3*r*p,T=4/3*n*p,F=[2*e-(e+P*Math.sin(k)),2*t-(t-T*Math.cos(k)),s+P*Math.sin(S),l-T*Math.cos(S),s,l];if(u)return F;M&&(F=F.concat(M));for(var q=0;q{var MFt=OX(),EFt=fze(),kFt={M:"moveTo",C:"bezierCurveTo"};hze.exports=function(e,t){e.beginPath(),EFt(MFt(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[kFt[n]].apply(e,i)}),e.closePath()}});var mze=ye((h0r,gze)=>{"use strict";var CFt=O5();gze.exports=LFt;var ik=1e20;function LFt(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,x;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,x=u.length;v{"use strict";var PFt=aze(),IFt=XS(),DFt=dze(),RFt=NX(),zFt=mze(),VX=document.createElement("canvas"),hp=VX.getContext("2d");yze.exports=FFt;function FFt(e,t){if(!RFt(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=VX.width=t.w||t.width||200,n=VX.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||PFt(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),qFt()){var u=new Path2D(e);hp.fill(u),a&&hp.stroke(u)}else{var c=IFt(e);DFt(hp,c),hp.fill(),a&&hp.stroke()}hp.setTransform(1,0,0,1,0,0);var f=zFt(hp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var Vz;function qFt(){if(Vz!=null)return Vz;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return Vz=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return Vz=r&&r.data&&r.data[3]===255}});var Y2=ye((v0r,Lze)=>{"use strict";var Gz=uo(),OFt=_ze(),Hz=J_(),BFt=ba(),iA=Mr(),Qf=iA.isArrayOrTypedArray,tA=ao(),xze=af(),bze=$y().formatColor,rA=lu(),NFt=S3(),GX=Fz(),nk=ox(),UFt=N1().DESELECTDIM,wze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},VFt=rp().appendArrayPointValue;function HFt(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(rA.hasText(t)&&(n.text=Cze(e,t),n.textSel=Aze(e,t,t.selected),n.textUnsel=Aze(e,t,t.unselected)),rA.hasMarkers(t)&&(n.marker=WX(e,t),n.markerSel=jX(e,t,t.selected),n.markerUnsel=jX(e,t,t.unselected),!t.unselected&&Qf(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function WX(e,t){var r=t._length,n=t.marker,i={},a,o=Qf(n.symbol),s=Qf(n.angle),l=Qf(n.color),u=Qf(n.line.color),c=Qf(n.opacity),f=Qf(n.size),h=Qf(n.line.width),d;if(o||(d=GX.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,x=n.angle,b=bze(n,n.opacity,r),g=bze(n.line,n.opacity,r);if(!Qf(g[0])){var E=g;for(g=Array(r),a=0;ank.TOO_MANY_POINTS||rA.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=Qf(u)?u.length>1?u[o]:u[0]:u,v=wze[h],x=wze[d],b=c?c/.8+1:0,g=-x*b-x*.5;a.offset[o]=[v*b/f,g/f]}}return a}Lze.exports={style:HFt,markerStyle:WX,markerSelection:jX,linePositions:jFt,errorBarPositions:WFt,textPosition:ZFt}});var ZX=ye((p0r,Pze)=>{"use strict";var jz=Mr();Pze.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(){jz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=jz.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 XFt=Oz(),nA=Mr(),Ize=af(),YFt=wg().findExtremes,Dze=Dg(),XX=q0(),KFt=XX.calcMarkerSize,JFt=XX.calcAxisExpansion,$Ft=XX.setFirstScatter,QFt=z0(),aA=Y2(),e7t=ZX(),Rze=es().BADNUM,t7t=ox().TOO_MANY_POINTS;Fze.exports=function(t,r){var n=t._fullLayout,i=r._xA=Ize.getFromId(t,r.xaxis,"x"),a=r._yA=Ize.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=t7t,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=Dze(r,i,"x",h),x=Dze(r,a,"y",d),b=v.vals,g=x.vals;r._x=b,r._y=g,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=x.starts,r._yEnds=x.ends);var E=new Array(u),k=new Array(s);for(f=0;f1&&nA.extendFlat(o.line,aA.linePositions(e,r,n)),o.errorX||o.errorY){var s=aA.errorBarPositions(e,r,n,i,a);o.errorX&&nA.extendFlat(o.errorX,s.x),o.errorY&&nA.extendFlat(o.errorY,s.y)}return o.text&&(nA.extendFlat(o.text,{positions:n},aA.textPosition(e,r,o.text,o.marker)),nA.extendFlat(o.textSel,{positions:n},aA.textPosition(e,r,o.text,o.markerSel)),nA.extendFlat(o.textUnsel,{positions:n},aA.textPosition(e,r,o.text,o.markerUnsel))),o}});var YX=ye((m0r,Bze)=>{"use strict";var Oze=Mr(),i7t=va(),n7t=N1().DESELECTDIM;function a7t(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=Oze.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,x=c.color,b=l.color,g=Oze.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h{"use strict";var Nze=lu(),o7t=YX().styleTextSelection;Uze.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=Nze.hasText(s),x=Nze.hasMarkers(s),b=!x&&!v;if(s.visible!==!0||b)return o;var g=[],E=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var s7t=zz();Vze.exports={moduleType:"trace",name:"scattergl",basePlotModule:Jf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:ek(),supplyDefaults:ARe(),crossTraceDefaults:$N(),colorbar:Kd(),formatLabels:MRe(),calc:qze(),hoverPoints:s7t.hoverPoints,selectPoints:KX(),meta:{}}});var jze=ye((x0r,Zz)=>{"use strict";var Wz=O5();Zz.exports=Gze;Zz.exports.to=Gze;Zz.exports.from=l7t;function Gze(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=Wz(r,0,255)&255,n=Wz(n,0,255)&255,i=Wz(i,0,255)&255,a=Wz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function l7t(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 bh=ye((b0r,Zze)=>{"use strict";var Wze=Object.getOwnPropertySymbols,u7t=Object.prototype.hasOwnProperty,c7t=Object.prototype.propertyIsEnumerable;function f7t(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function h7t(){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}}Zze.exports=h7t()?Object.assign:function(e,t){for(var r,n=f7t(e),i,a=1;a{Xze.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";Kze.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";Jze.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var Xz=ye((S0r,oA)=>{"use strict";oA.exports=ak;oA.exports.float32=oA.exports.float=ak;oA.exports.fract32=oA.exports.fract=d7t;var Qze=new Float32Array(1);function d7t(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=ak(e));for(var r=0,n=t.length;r{"use strict";function v7t(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 p7t(e,t){return y7t(e)||v7t(e,t)||tFe(e,t)||b7t()}function g7t(e){return m7t(e)||_7t(e)||tFe(e)||x7t()}function m7t(e){if(Array.isArray(e))return $X(e)}function y7t(e){if(Array.isArray(e))return e}function _7t(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tFe(e,t){if(e){if(typeof e=="string")return $X(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 $X(e,t)}}function $X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(N=G.size),G.lineSpacing&&G.lineSpacing>0&&(W=G.lineSpacing),G.styletags&&G.styletags.breaklines&&(re.breaklines=!!G.styletags.breaklines),G.styletags&&G.styletags.bolds&&(re.bolds=!!G.styletags.bolds),G.styletags&&G.styletags.italics&&(re.italics=!!G.styletags.italics),G.styletags&&G.styletags.subscripts&&(re.subscripts=!!G.styletags.subscripts),G.styletags&&G.styletags.superscripts&&(re.superscripts=!!G.styletags.superscripts)),X.font=[G.fontStyle,G.fontVariant,G.fontWeight,N+"px",G.font].filter(function(_e){return _e}).join(" "),X.textAlign="start",X.textBaseline="alphabetic",X.direction="ltr";var ae=p(H,X,V,N,W,re);return F(ae,G,N)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(T){T.permitHostObjects___&&T.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,x="weakmap:",b=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var g=new ArrayBuffer(25),E=new Uint8Array(g);crypto.getRandomValues(E),b=x+"rand:"+Array.prototype.map.call(E,function(T){return(T%36).toString(36)}).join("")+"___"}function k(T){return!(T.substr(0,x.length)==x&&T.substr(T.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(F){return h(F).filter(k)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(F){return A(F).filter(k)}})}function L(T){if(T!==Object(T))throw new TypeError("Not an object: "+T);var F=T[b];if(F&&F.key===T)return F;if(v(T)){F={key:T};try{return d(T,b,{value:F,writable:!1,enumerable:!1,configurable:!1}),F}catch(q){return}}}(function(){var T=Object.freeze;d(Object,"freeze",{value:function(H){return L(H),T(H)}});var F=Object.seal;d(Object,"seal",{value:function(H){return L(H),F(H)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(H){return L(H),q(H)}})})();function _(T){return T.prototype=null,Object.freeze(T)}var C=!1;function M(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var p=0,P=function(){this instanceof P||M();var T=[],F=[],q=p++;function V(N,W){var re,ae=L(N);return ae?q in ae?ae[q]:W:(re=T.indexOf(N),re>=0?F[re]:W)}function H(N){var W=L(N);return W?q in W:T.indexOf(N)>=0}function X(N,W){var re,ae=L(N);return ae?ae[q]=W:(re=T.indexOf(N),re>=0?F[re]=W:(re=T.length,F[re]=W,T[re]=N)),this}function G(N){var W=L(N),re,ae;return W?q in W&&delete W[q]:(re=T.indexOf(N),re<0?!1:(ae=T.length-1,T[re]=void 0,F[re]=F[ae],T[re]=T[ae],T.length=ae,F.length=ae,!0))}return Object.create(P.prototype,{get___:{value:_(V)},has___:{value:_(H)},set___:{value:_(X)},delete___:{value:_(G)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(F,q){return this.get___(F,q)},writable:!0,configurable:!0},has:{value:function(F){return this.has___(F)},writable:!0,configurable:!0},set:{value:function(F,q){return this.set___(F,q)},writable:!0,configurable:!0},delete:{value:function(F){return this.delete___(F)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function T(){this instanceof P||M();var F=new l,q=void 0,V=!1;function H(W,re){return q?F.has(W)?F.get(W):q.get___(W,re):F.get(W,re)}function X(W){return F.has(W)||(q?q.has___(W):!1)}var G;s?G=function(W,re){return F.set(W,re),F.has(W)||(q||(q=new P),q.set(W,re)),this}:G=function(W,re){if(V)try{F.set(W,re)}catch(ae){q||(q=new P),q.set___(W,re)}else F.set(W,re);return this};function N(W){var re=!!F.delete(W);return q&&q.delete___(W)||re}return Object.create(P.prototype,{get___:{value:_(H)},has___:{value:_(X)},set___:{value:_(G)},delete___:{value:_(N)},permitHostObjects___:{value:_(function(W){if(W===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)})()},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349:function(i){"use strict";function a(){return function(f,h,d,v,x,b){var g=f[0],E=d[0],k=[0],A=E;v|=0;var L=0,_=E;for(L=0;L=0!=M>=0&&x.push(k[0]+.5+.5*(C+M)/(C-M))}v+=_,++k[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,x,b){var g=v.dtype,E=v.order,k=[g,E.join()].join(),A=h[k];return A||(h[k]=A=f([g,E])),A(v.shape.slice(0),v.data,v.stride,v.offset|0,x,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);oLe.exports=n})()});var lLe=ye((Xdr,sLe)=>{"use strict";sLe.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 hLe=ye((Ydr,fLe)=>{"use strict";var uLe=lLe();fLe.exports=Q6t;var cLe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Q6t(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),uLe[e])r=uLe[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(cLe[h]!==void 0)return cLe[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 vLe=ye((Kdr,dLe)=>{"use strict";dLe.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var gLe=ye((Jdr,pLe)=>{"use strict";var eLt=vLe();pLe.exports={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;if(r===0)return l=n*255,[l,l,l];n<.5?a=n*(1+r):a=n+r-n*r,i=2*n-a,s=[0,0,0];for(var u=0;u<3;u++)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,6*o<1?l=i+(a-i)*6*o:2*o<1?l=a:3*o<2?l=i+(a-i)*(2/3-o)*6:l=i,s[u]=l*255;return s}};eLt.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 O5=ye(($dr,mLe)=>{mLe.exports=tLt;function tLt(e,t,r){return tr?r:e:et?t:e}});var rZ=ye((Qdr,yLe)=>{"use strict";var rLt=hLe(),iLt=gLe(),VR=O5();yLe.exports=function(t){var r,n,i,a=rLt(t);return a.space?(r=Array(3),r[0]=VR(a.values[0],0,255),r[1]=VR(a.values[1],0,255),r[2]=VR(a.values[2],0,255),a.space[0]==="h"&&(r=iLt.rgb(r)),r.push(VR(a.alpha,0,1)),r):[]}});var HR=ye((evr,_Le)=>{_Le.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((tvr,xLe)=>{"use strict";var nLt=rZ(),GR=O5(),aLt=HR();xLe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=aLt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=nLt(t),t[0]/=255,t[1]/=255,t[2]/=255),oLt(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]=GR(Math.floor(t[0]*255),0,255),i[1]=GR(Math.floor(t[1]*255),0,255),i[2]=GR(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:GR(Math.floor(t[3]*255),0,255)),i)};function oLt(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((rvr,bLe)=>{"use strict";var sLt=J_();function lLt(e){return e?sLt(e):[0,0,0,1]}bLe.exports=lLt});var $y=ye((ivr,kLe)=>{"use strict";var MLe=uo(),uLt=id(),jR=J_(),WR=Mu(),cLt=dh().defaultLine,wLe=vv().isArrayOrTypedArray,iZ=jR(cLt),ELe=1;function TLe(e,t){var r=e;return r[3]*=t,r}function ALe(e){if(MLe(e))return iZ;var t=jR(e);return t.length?t:iZ}function SLe(e){return MLe(e)?e:ELe}function fLt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=wLe(n),a=wLe(t),o=WR.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=WR.makeColorScaleFuncFromTrace(e):l=ALe,i?u=function(v,x){return v[x]===void 0?iZ:jR(l(v[x]))}:u=ALe,a?c=function(v,x){return v[x]===void 0?ELe:SLe(v[x])}:c=SLe,i||a)for(var d=0;d{"use strict";CLe.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 ZR=ye((avr,LLe)=>{"use strict";LLe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var ILe=ye((ovr,PLe)=>{"use strict";var dLt=ba();function aZ(e,t,r,n){if(!t||!t.visible)return null;for(var i=dLt.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 vLt(e){for(var t=0;t{"use strict";var gLt=Dd().gl_line3d,DLe=Dd().gl_scatter3d,mLt=Dd().gl_error3d,yLt=Dd().gl_mesh3d,_Lt=Dd().delaunay_triangulate,Qy=Mr(),OLe=Jy(),XR=$y().formatColor,xLt=S3(),oZ=nZ(),bLt=ZR(),wLt=Qa(),TLt=rp().appendArrayPointValue,ALt=ILe();function BLe(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 lZ=BLe.prototype;lZ.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 SLt(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 zLe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function ELt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var u=SLt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=yLt(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)};lZ.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 PLt(e,t){var r=new BLe(e,t.uid);return r.update(t),r}NLe.exports=PLt});var dZ=ye((lvr,GLe)=>{"use strict";var e1=Uc(),ILt=Su(),hZ=Kl(),uZ=Oc().axisHoverFormat,DLt=Wo().hovertemplateAttrs,RLt=Wo().texttemplateAttrs,VLe=vl(),zLt=nZ(),FLt=ZR(),Yg=no().extendFlat,qLt=Bu().overrideAll,HLe=X1(),OLt=e1.line,N2=e1.marker,BLt=N2.line,NLt=Yg({width:OLt.width,dash:{valType:"enumerated",values:HLe(zLt),dflt:"solid"}},hZ("line"));function cZ(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 fZ=GLe.exports=qLt({x:e1.x,y:e1.y,z:{valType:"data_array"},text:Yg({},e1.text,{}),texttemplate:RLt({},{}),hovertext:Yg({},e1.hovertext,{}),hovertemplate:DLt(),xhoverformat:uZ("x"),yhoverformat:uZ("y"),zhoverformat:uZ("z"),mode:Yg({},e1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:cZ("x"),y:cZ("y"),z:cZ("z")},connectgaps:e1.connectgaps,line:NLt,marker:Yg({symbol:{valType:"enumerated",values:HLe(FLt),dflt:"circle",arrayOk:!0},size:Yg({},N2.size,{dflt:8}),sizeref:N2.sizeref,sizemin:N2.sizemin,sizemode:N2.sizemode,opacity:Yg({},N2.opacity,{arrayOk:!1}),colorbar:N2.colorbar,line:Yg({width:Yg({},BLt.width,{arrayOk:!1})},hZ("marker.line"))},hZ("marker")),textposition:Yg({},e1.textposition,{dflt:"top center"}),textfont:ILt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:VLe.opacity,hoverinfo:Yg({},VLe.hoverinfo)},"calc","nested");fZ.x.editType=fZ.y.editType=fZ.z.editType="calc+clearAxisTypes"});var ZLe=ye((uvr,WLe)=>{"use strict";var jLe=ba(),ULt=Mr(),vZ=lu(),VLt=$p(),HLt=D0(),GLt=R0(),jLt=dZ();WLe.exports=function(t,r,n,i){function a(d,v){return ULt.coerce(t,r,jLt,d,v)}var o=WLt(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),vZ.hasMarkers(r)&&VLt(t,r,n,i,a,{noSelect:!0,noAngle:!0}),vZ.hasLines(r)&&(a("connectgaps"),HLt(t,r,n,i,a)),vZ.hasText(r)&&(a("texttemplate"),GLt(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=jLe.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 WLt(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=jLe.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 YLe=ye((cvr,XLe)=>{"use strict";var ZLt=km(),XLt=z0();XLe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return ZLt(n,r),XLt(t,r),n}});var JLe=ye((fvr,KLe)=>{KLe.exports=YLt;function YLt(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 KLt=JLe();$Le.exports=function(t){return KLt("webgl",t)}});var pZ=ye((dvr,tPe)=>{"use strict";var ePe=va(),JLt=function(){};tPe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=JLt);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=ePe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=ePe.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 nPe=ye((vvr,iPe)=>{"use strict";var U2=Jy(),$Lt=Mr(),QLt=["xaxis","yaxis","zaxis"];function rPe(){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 ePt=rPe.prototype;ePt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[QLt[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?$Lt.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=U2(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]=U2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=U2(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]=U2(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]=U2(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]=U2(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]=U2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function tPt(e,t){var r=new rPe;return r.merge(e,t),r}iPe.exports=tPt});var sPe=ye((pvr,oPe)=>{"use strict";var rPt=Jy(),iPt=["xaxis","yaxis","zaxis"];function aPe(){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 nPt=aPe.prototype;nPt.merge=function(e){for(var t=0;t<3;++t){var r=e[iPt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=rPt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function aPt(e){var t=new aPe;return t.merge(e),t}oPe.exports=aPt});var cPe=ye((gvr,uPe)=>{"use strict";uPe.exports=cPt;var lPe=Qa(),oPt=Mr(),sPt=["xaxis","yaxis","zaxis"],lPt=[0,0,0];function uPt(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){lPt[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=uPt(i)}});var mPe=ye((mvr,gPe)=>{"use strict";var dPe=Dd().gl_plot3d,fPt=dPe.createCamera,fPe=dPe.createScene,hPt=QLe(),dPt=EL(),JR=ba(),up=Mr(),KR=up.preserveDrawingBuffer(),$R=Qa(),Kg=Nc(),vPt=Jy(),pPt=pZ(),gPt=RU(),mPt=nPe(),yPt=sPe(),_Pt=cPe(),xPt=wg().applyAutorangeOptions,VE,YR,vPe=!1;function pPe(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=mPt(t,t[this.id]),this.spikeOptions=yPt(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=JR.getComponentMethod("annotations3d","convert"),this.drawAnnotations=JR.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var wv=pPe.prototype;wv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:KR,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(!YR&&(VE=document.createElement("canvas"),YR=hPt({canvas:VE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!YR))throw new Error("error creating static canvas/context for image server");t.gl=YR,t.canvas=VE}return t};var hPe=!0;wv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=fPe(t)}catch(n){if(e.staticMode||!hPe||KR)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{KR=t.glOptions.preserveDrawingBuffer=!0,e.glplot=fPe(t)}catch(i){KR=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return hPe=!1,r};wv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=fPt(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"})};wv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return pPt(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(){vPe=!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)}},dPt?{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};wv.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),_Pt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(g.valueLabel=$R.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),_.push("value: "+g.valueLabel),f.textLabel&&_.push(f.textLabel),L=_.join("
")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:b};Kg.appendArrayPointValue(C,x,b),r._module.eventData&&(C=x._module.eventData(C,f,x,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var p=[];Kg.loneHover({trace:x,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:g.xLabel,yLabel:g.yLabel,zLabel:g.zLabel,text:L,name:c.name,color:Kg.castHoverOption(x,b,"bgcolor")||c.color,borderColor:Kg.castHoverOption(x,b,"bordercolor"),fontFamily:Kg.castHoverOption(x,b,"font.family"),fontSize:Kg.castHoverOption(x,b,"font.size"),fontColor:Kg.castHoverOption(x,b,"font.color"),nameLength:Kg.castHoverOption(x,b,"namelength"),textAlign:Kg.castHoverOption(x,b,"align"),hovertemplate:up.castOption(x,b,"hovertemplate"),hovertemplateLabels:up.extendFlat({},C,g),eventData:[C]},{container:n,gd:t,inOut_bbox:p}),C.bbox=p[0]}f.distance<5&&(f.buttons||vPe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Kg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};wv.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 HE=["xaxis","yaxis","zaxis"];function bPt(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=HE[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;dx[1][o])x[0][o]=-1,x[1][o]=1;else{var T=x[1][o]-x[0][o];x[0][o]-=T/32,x[1][o]+=T/32}if(E=[x[0][o],x[1][o]],E=xPt(E,l),x[0][o]=E[0],x[1][o]=E[1],l.isReversed()){var F=x[0][o];x[0][o]=x[1][o],x[1][o]=F}}else E=l.range,x[0][o]=l.r2l(E[0]),x[1][o]=l.r2l(E[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),b[o]=x[1][o]-x[0][o],l.range=[x[0][o],x[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var q,V=c.aspectmode;if(V==="cube")q=[1,1,1];else if(V==="manual"){var H=c.aspectratio;q=[H.x,H.y,H.z]}else if(V==="auto"||V==="data"){var X=[1,1,1];for(o=0;o<3;++o){l=c[HE[o]],u=l.type;var G=g[u];X[o]=Math.pow(G.acc,1/G.count)/d[o]}V==="data"||Math.max.apply(null,X)/Math.min.apply(null,X)<=4?q=X:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=q[0],c.aspectratio.y=f.aspectratio.y=q[1],c.aspectratio.z=f.aspectratio.z=q[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,W=t._size||null;if(N&&W){var re=n.container.style;re.position="absolute",re.left=W.l+N.x[0]*W.w+"px",re.top=W.t+(1-N.y[1])*W.h+"px",re.width=W.w*(N.x[1]-N.x[0])+"px",re.height=W.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};wv.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 TPt(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 APt(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"}}}wv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),APt(e.camera)};wv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,TPt(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())};wv.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};wv.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};wv.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),JR.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};wv.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;JR.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,up.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function SPt(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)}}wv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(VE),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),SPt(a,n,i),MPt(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(VE),u};wv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[HE[t]];$R.setConvert(r,e.fullLayout),r.setScale=up.noop}};wv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},$R.setConvert(e._mockAxis,r)};gPe.exports=pPe});var _Pe=ye((yvr,yPe)=>{"use strict";yPe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var mZ=ye((_vr,xPe)=>{"use strict";var EPt=va(),cs=Cd(),gZ=no().extendFlat,kPt=Bu().overrideAll;xPe.exports=kPt({visible:cs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:EPt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:cs.color,categoryorder:cs.categoryorder,categoryarray:cs.categoryarray,title:{text:cs.title.text,font:cs.title.font},type:gZ({},cs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:cs.autotypenumbers,autorange:cs.autorange,autorangeoptions:{minallowed:cs.autorangeoptions.minallowed,maxallowed:cs.autorangeoptions.maxallowed,clipmin:cs.autorangeoptions.clipmin,clipmax:cs.autorangeoptions.clipmax,include:cs.autorangeoptions.include,editType:"plot"},rangemode:cs.rangemode,minallowed:cs.minallowed,maxallowed:cs.maxallowed,range:gZ({},cs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:cs.minor.tickmode,nticks:cs.nticks,tick0:cs.tick0,dtick:cs.dtick,tickvals:cs.tickvals,ticktext:cs.ticktext,ticks:cs.ticks,mirror:cs.mirror,ticklen:cs.ticklen,tickwidth:cs.tickwidth,tickcolor:cs.tickcolor,showticklabels:cs.showticklabels,labelalias:cs.labelalias,tickfont:cs.tickfont,tickangle:cs.tickangle,tickprefix:cs.tickprefix,showtickprefix:cs.showtickprefix,ticksuffix:cs.ticksuffix,showticksuffix:cs.showticksuffix,showexponent:cs.showexponent,exponentformat:cs.exponentformat,minexponent:cs.minexponent,separatethousands:cs.separatethousands,tickformat:cs.tickformat,tickformatstops:cs.tickformatstops,hoverformat:cs.hoverformat,showline:cs.showline,linecolor:cs.linecolor,linewidth:cs.linewidth,showgrid:cs.showgrid,gridcolor:gZ({},cs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:cs.gridwidth,zeroline:cs.zeroline,zerolinecolor:cs.zerolinecolor,zerolinewidth:cs.zerolinewidth},"plot","from-root")});var bZ=ye((xvr,bPe)=>{"use strict";var yZ=mZ(),CPt=Ju().attributes,_Z=no().extendFlat,LPt=Mr().counterRegex;function xZ(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"}}bPe.exports={_arrayAttrRegexps:[LPt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:_Z(xZ(0,0,1),{}),center:_Z(xZ(0,0,0),{}),eye:_Z(xZ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:CPt({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:yZ,yaxis:yZ,zaxis:yZ,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 SPe=ye((bvr,APe)=>{"use strict";var PPt=id().mix,wPe=Mr(),IPt=Vs(),DPt=mZ(),RPt=yU(),zPt=JM(),TPe=["xaxis","yaxis","zaxis"],FPt=100*136/187;APe.exports=function(t,r,n){var i,a;function o(u,c){return wPe.coerce(i,a,DPt,u,c)}for(var s=0;s{"use strict";var qPt=Mr(),OPt=va(),BPt=ba(),NPt=k_(),UPt=SPe(),MPe=bZ(),VPt=kd().getSubplotData,EPe="gl3d";kPe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=qPt.validate(t[o],MPe[o]);if(s)return t[o]}}NPt(t,r,n,{type:EPe,attributes:MPe,handleDefaults:HPt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function HPt(e,t,r,n){for(var i=r("bgcolor"),a=OPt.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 GPt=Bu().overrideAll,jPt=B1(),WPt=mPe(),ZPt=kd().getSubplotData,XPt=Mr(),YPt=Zp(),B5="gl3d",wZ="scene";cp.name=B5;cp.attr=wZ;cp.idRoot=wZ;cp.idRegex=cp.attrRegex=XPt.counterRegex("scene");cp.attributes=_Pe();cp.layoutAttributes=bZ();cp.baseLayoutAttrOverrides=GPt({hoverlabel:jPt.hoverlabel},"plot","nested");cp.supplyLayoutDefaults=CPe();cp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[B5],a=0;a{"use strict";LPe.exports={plot:ULe(),attributes:dZ(),markerSymbols:ZR(),supplyDefaults:ZLe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:YLe(),moduleType:"trace",name:"scatter3d",basePlotModule:$_(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var DPe=ye((Svr,IPe)=>{"use strict";IPe.exports=PPe()});var GE=ye((Mvr,FPe)=>{"use strict";var RPe=va(),KPt=Kl(),TZ=Oc().axisHoverFormat,JPt=Wo().hovertemplateAttrs,zPe=vl(),AZ=no().extendFlat,$Pt=Bu().overrideAll;function SZ(e){return{valType:"boolean",dflt:!1}}function MZ(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:SZ("x"),y:SZ("y"),z:SZ("z")},color:{valType:"color",dflt:RPe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:RPe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var EZ=FPe.exports=$Pt(AZ({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:JPt(),xhoverformat:TZ("x"),yhoverformat:TZ("y"),zhoverformat:TZ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},KPt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:MZ("x"),y:MZ("y"),z:MZ("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:AZ({},zPe.hoverinfo),showlegend:AZ({},zPe.showlegend,{dflt:!1})}),"calc","nested");EZ.x.editType=EZ.y.editType=EZ.z.editType="calc+clearAxisTypes"});var CZ=ye((Evr,BPe)=>{"use strict";var QPt=ba(),qPe=Mr(),eIt=Uh(),tIt=GE(),kZ=.1;function rIt(e,t){for(var r=[],n=32,i=0;i{"use strict";var NPe=zv();UPe.exports=function(t,r){r.surfacecolor?NPe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):NPe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var XPe=ye((Cvr,ZPe)=>{"use strict";var aIt=Dd().gl_surface3d,N5=Dd().ndarray,oIt=Dd().ndarray_linear_interpolate.d2,sIt=QI(),lIt=e8(),jE=Mr().isArrayOrTypedArray,uIt=$y().parseColorScale,HPe=Jy(),cIt=Mu().extractOpts;function jPe(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 Jg=jPe.prototype;Jg.getXat=function(e,t,r,n){var i=jE(this.data.x)?jE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};Jg.getYat=function(e,t,r,n){var i=jE(this.data.y)?jE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};Jg.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)};Jg.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 jE(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 fIt(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 U5=[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 hIt(e,t){if(e0){r=U5[n];break}return r}function vIt(e,t){if(!(e<1||t<1)){for(var r=LZ(e),n=LZ(t),i=1,a=0;aQR;)n--,n/=dIt(n),n++,n1?i:1};function gIt(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 mIt(e,t,r){return yIt(e,t,gIt,r),e}function yIt(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";YPe.exports={attributes:GE(),supplyDefaults:CZ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:VPe(),plot:XPe(),moduleType:"trace",name:"surface",basePlotModule:$_(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var $Pe=ye((Pvr,JPe)=>{"use strict";JPe.exports=KPe()});var V5=ye((Ivr,eIe)=>{"use strict";var bIt=Kl(),PZ=Oc().axisHoverFormat,wIt=Wo().hovertemplateAttrs,Q_=GE(),QPe=vl(),ex=no().extendFlat;eIe.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:wIt({editType:"calc"}),xhoverformat:PZ("x"),yhoverformat:PZ("y"),zhoverformat:PZ("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"}},bIt("",{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"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},Q_.lighting),hoverinfo:ex({},QPe.hoverinfo,{editType:"calc"}),showlegend:ex({},QPe.showlegend,{dflt:!1})})});var tz=ye((Dvr,rIe)=>{"use strict";var TIt=Kl(),ez=Oc().axisHoverFormat,AIt=Wo().hovertemplateAttrs,WE=V5(),tIe=vl(),IZ=no().extendFlat,SIt=Bu().overrideAll;function DZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function RZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var H5=rIe.exports=SIt(IZ({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:DZ("x"),y:DZ("y"),z:DZ("z")},caps:{x:RZ("x"),y:RZ("y"),z:RZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:AIt(),xhoverformat:ez("x"),yhoverformat:ez("y"),zhoverformat:ez("z"),valuehoverformat:ez("value",1),showlegend:IZ({},tIe.showlegend,{dflt:!1})},TIt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:WE.opacity,lightposition:WE.lightposition,lighting:WE.lighting,flatshading:WE.flatshading,contour:WE.contour,hoverinfo:IZ({},tIe.hoverinfo)}),"calc","nested");H5.flatshading.dflt=!0;H5.lighting.facenormalsepsilon.dflt=0;H5.x.editType=H5.y.editType=H5.z.editType=H5.value.editType="calc+clearAxisTypes"});var zZ=ye((Rvr,nIe)=>{"use strict";var MIt=Mr(),EIt=ba(),kIt=tz(),CIt=Uh();function LIt(e,t,r,n){function i(a,o){return MIt.coerce(e,t,kIt,a,o)}iIe(e,t,r,n,i)}function iIe(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=EIt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(x){i(x+"hoverformat");var b="caps."+x,g=i(b+".show");g&&i(b+".fill");var E="slices."+x,k=i(E+".show");k&&(i(E+".fill"),i(E+".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(x){i(x)}),CIt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}nIe.exports={supplyDefaults:LIt,supplyIsoDefaults:iIe}});var rz=ye((zvr,oIe)=>{"use strict";var qZ=Mr(),PIt=zv();function IIt(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=Gm(t.u,t._len),t._v=Gm(t.v,t._len),t._w=Gm(t.w,t._len),t._x=Gm(t.x,t._len),t._y=Gm(t.y,t._len),t._z=Gm(t.z,t._len);var r=aIe(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=Gm(t.starts.x||[]),a=Gm(t.starts.y||[]),o=Gm(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&&(k=t[i-1],L=r[i-1],C=n[i-1]),a=0;ak?"-":"+")+"x"),v=v.replace("y",(A>L?"-":"+")+"y"),v=v.replace("z",(_>C?"-":"+")+"z");var T=function(){i=0,M=[],p=[],P=[]};(!i||i{"use strict";var DIt=zv(),RIt=rz().processGrid,iz=rz().filter;sIe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=iz(r.x,r._len),r._y=iz(r.y,r._len),r._z=iz(r.z,r._len),r._value=iz(r.value,r._len);var n=RIt(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";lIe.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var zIt=Dd().gl_mesh3d,FIt=$y().parseColorScale,qIt=Mr().isArrayOrTypedArray,OIt=Jy(),BIt=Mu().extractOpts,uIe=G5(),ZE=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 ae(bt,Lt){return bt===null?Lt:bt}function _e(bt,Lt,St){T();var Et=[Lt],dt=[St];if(G>=1)Et=[Lt],dt=[St];else if(G>0){var Ht=W(Lt,St);Et=Ht.xyzv,dt=Ht.abc}for(var $t=0;$t-1?St[_r]:P(Br,Or,Nr);Ne>-1?fr[_r]=Ne:fr[_r]=q(Br,Or,Nr,ae(bt,ut))}V(fr[0],fr[1],fr[2])}}function Me(bt,Lt,St){var Et=function(dt,Ht,$t){_e(bt,[Lt[dt],Lt[Ht],Lt[$t]],[St[dt],St[Ht],St[$t]])};Et(0,1,2),Et(2,3,0)}function ke(bt,Lt,St){var Et=function(dt,Ht,$t){_e(bt,[Lt[dt],Lt[Ht],Lt[$t]],[St[dt],St[Ht],St[$t]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}function ge(bt,Lt,St,Et){var dt=bt[3];dtEt&&(dt=Et);for(var Ht=(bt[3]-dt)/(bt[3]-Lt[3]+1e-9),$t=[],fr=0;fr<4;fr++)$t[fr]=(1-Ht)*bt[fr]+Ht*Lt[fr];return $t}function ie(bt,Lt,St){return bt>=Lt&&bt<=St}function Te(bt){var Lt=.001*(L-A);return bt>=A-Lt&&bt<=L+Lt}function Ee(bt){for(var Lt=[],St=0;St<4;St++){var Et=bt[St];Lt.push([e._x[Et],e._y[Et],e._z[Et],e._value[Et]])}return Lt}var Ae=3;function ze(bt,Lt,St,Et,dt,Ht){Ht||(Ht=1),St=[-1,-1,-1];var $t=!1,fr=[ie(Lt[0][3],Et,dt),ie(Lt[1][3],Et,dt),ie(Lt[2][3],Et,dt)];if(!fr[0]&&!fr[1]&&!fr[2])return!1;var _r=function(Or,Nr,ut){return Te(Nr[0][3])&&Te(Nr[1][3])&&Te(Nr[2][3])?(_e(Or,Nr,ut),!0):Htfr?[E,Ht]:[Ht,k];kt(Lt,_r[0],_r[1])}}var Br=[[Math.min(A,k),Math.max(A,k)],[Math.min(E,L),Math.max(E,L)]];["x","y","z"].forEach(function(Or){for(var Nr=[],ut=0;ut0&&(Le.push(lt.id),Or==="x"?xe.push([lt.distRatio,0,0]):Or==="y"?xe.push([0,lt.distRatio,0]):xe.push([0,0,lt.distRatio]))}else Or==="x"?ht=er(1,d-1):Or==="y"?ht=er(1,v-1):ht=er(1,x-1);Le.length>0&&(Or==="x"?Nr[Ne]=Ct(bt,Le,Ye,Ve,xe,Nr[Ne]):Or==="y"?Nr[Ne]=Yt(bt,Le,Ye,Ve,xe,Nr[Ne]):Nr[Ne]=xr(bt,Le,Ye,Ve,xe,Nr[Ne]),Ne++),ht.length>0&&(Or==="x"?Nr[Ne]=ct(bt,ht,Ye,Ve,Nr[Ne]):Or==="y"?Nr[Ne]=qt(bt,ht,Ye,Ve,Nr[Ne]):Nr[Ne]=rt(bt,ht,Ye,Ve,Nr[Ne]),Ne++)}var Gt=e.caps[Or];Gt.show&&Gt.fill&&(N(Gt.fill),Or==="x"?Nr[Ne]=ct(bt,[0,d-1],Ye,Ve,Nr[Ne]):Or==="y"?Nr[Ne]=qt(bt,[0,v-1],Ye,Ve,Nr[Ne]):Nr[Ne]=rt(bt,[0,x-1],Ye,Ve,Nr[Ne]),Ne++)}}),s===0&&F(),e._meshX=_,e._meshY=C,e._meshZ=M,e._meshIntensity=p,e._Xs=c,e._Ys=f,e._Zs=h}return xt(),e}function UIt(e,t){var r=e.glplot.gl,n=zIt({gl:r}),i=new cIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}hIe.exports={findNearestOnAxis:ZE,generateIsoMeshes:fIe,createIsosurfaceTrace:UIt}});var vIe=ye((Bvr,dIe)=>{"use strict";dIe.exports={attributes:tz(),supplyDefaults:zZ().supplyDefaults,calc:OZ(),colorbar:{min:"cmin",max:"cmax"},plot:nz().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var gIe=ye((Nvr,pIe)=>{"use strict";pIe.exports=vIe()});var UZ=ye((Uvr,yIe)=>{"use strict";var VIt=Kl(),xh=tz(),HIt=GE(),mIe=vl(),NZ=no().extendFlat,GIt=Bu().overrideAll,az=yIe.exports=GIt(NZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate},VIt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:HIt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:NZ({},mIe.hoverinfo),showlegend:NZ({},mIe.showlegend,{dflt:!1})}),"calc","nested");az.x.editType=az.y.editType=az.z.editType=az.value.editType="calc+clearAxisTypes"});var xIe=ye((Vvr,_Ie)=>{"use strict";var jIt=Mr(),WIt=UZ(),ZIt=zZ().supplyIsoDefaults,XIt=CZ().opacityscaleDefaults;_Ie.exports=function(t,r,n,i){function a(o,s){return jIt.coerce(t,r,WIt,o,s)}ZIt(t,r,n,i,a),XIt(t,r,i,a)}});var AIe=ye((Hvr,TIe)=>{"use strict";var YIt=Dd().gl_mesh3d,KIt=$y().parseColorScale,JIt=Mr().isArrayOrTypedArray,$It=Jy(),QIt=Mu().extractOpts,bIe=G5(),VZ=nz().findNearestOnAxis,e8t=nz().generateIsoMeshes;function wIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var HZ=wIe.prototype;HZ.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=VZ(r,this.data._Xs).id,l=VZ(n,this.data._Ys).id,u=VZ(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 JIt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};HZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e8t(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=bIe(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=bIe(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:$It(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=QIt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=KIt(e),this.mesh.update(o)};HZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function t8t(e,t){var r=e.glplot.gl,n=YIt({gl:r}),i=new wIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}TIe.exports=t8t});var MIe=ye((Gvr,SIe)=>{"use strict";SIe.exports={attributes:UZ(),supplyDefaults:xIe(),calc:OZ(),colorbar:{min:"cmin",max:"cmax"},plot:AIe(),moduleType:"trace",name:"volume",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var kIe=ye((jvr,EIe)=>{"use strict";EIe.exports=MIe()});var PIe=ye((Wvr,LIe)=>{"use strict";var r8t=ba(),CIe=Mr(),i8t=Uh(),n8t=V5();LIe.exports=function(t,r,n,i){function a(c,f){return CIe.coerce(t,r,n8t,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&CIe.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=r8t.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"),i8t(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("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var DIe=ye((Zvr,IIe)=>{"use strict";var a8t=zv();IIe.exports=function(t,r){r.intensity&&a8t(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var OIe=ye((Xvr,qIe)=>{"use strict";var o8t=Dd().gl_mesh3d,s8t=Dd().delaunay_triangulate,l8t=Dd().alpha_shape,u8t=Dd().convex_hull,c8t=$y().parseColorScale,f8t=Mr().isArrayOrTypedArray,ZZ=Jy(),h8t=Mu().extractOpts,RIe=G5();function FIe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var XZ=FIe.prototype;XZ.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 f8t(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function zIe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}XZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=RIe(GZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),GZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),GZ(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||!WZ(e.i,n)||!WZ(e.j,n)||!WZ(e.k,n))return;a=RIe(jZ(e.i),jZ(e.j),jZ(e.k))}else e.alphahull===0?a=u8t(i):e.alphahull>0?a=l8t(e.alphahull,i):a=d8t(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:ZZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=h8t(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=c8t(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=zIe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=zIe(e.facecolor)):(this.color=e.color,o.meshColor=ZZ(e.color));this.mesh.update(o)};XZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function v8t(e,t){var r=e.glplot.gl,n=o8t({gl:r}),i=new FIe(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}qIe.exports=v8t});var NIe=ye((Yvr,BIe)=>{"use strict";BIe.exports={attributes:V5(),supplyDefaults:PIe(),calc:DIe(),colorbar:{min:"cmin",max:"cmax"},plot:OIe(),moduleType:"trace",name:"mesh3d",basePlotModule:$_(),categories:["gl3d","showLegend"],meta:{}}});var VIe=ye((Kvr,UIe)=>{"use strict";UIe.exports=NIe()});var KZ=ye((Jvr,GIe)=>{"use strict";var p8t=Kl(),j5=Oc().axisHoverFormat,g8t=Wo().hovertemplateAttrs,m8t=V5(),HIe=vl(),YZ=no().extendFlat,oz={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:g8t({editType:"calc"},{keys:["norm"]}),uhoverformat:j5("u",1),vhoverformat:j5("v",1),whoverformat:j5("w",1),xhoverformat:j5("x"),yhoverformat:j5("y"),zhoverformat:j5("z"),showlegend:YZ({},HIe.showlegend,{dflt:!1})};YZ(oz,p8t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var y8t=["opacity","lightposition","lighting"];y8t.forEach(function(e){oz[e]=m8t[e]});oz.hoverinfo=YZ({},HIe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});GIe.exports=oz});var WIe=ye(($vr,jIe)=>{"use strict";var _8t=Mr(),x8t=Uh(),b8t=KZ();jIe.exports=function(t,r,n,i){function a(d,v){return _8t.coerce(t,r,b8t,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"),x8t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var XIe=ye((Qvr,ZIe)=>{"use strict";var w8t=zv();ZIe.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 T8t=Dd().gl_cone3d,A8t=Dd().gl_cone3d.createConeMesh,S8t=Mr().simpleMap,M8t=$y().parseColorScale,E8t=Mu().extractOpts,k8t=Mr().isArrayOrTypedArray,YIe=G5();function KIe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var JZ=KIe.prototype;JZ.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 k8t(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var C8t={xaxis:0,yaxis:1,zaxis:2},L8t={tip:1,tail:0,cm:.25,center:.5},P8t={tip:1,tail:1,cm:.75,center:.5};function JIe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[C8t[f]];return S8t(c,function(v){return h.d2l(v)*d})}i.vectors=YIe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=YIe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=E8t(t);i.colormap=M8t(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=L8t[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=T8t(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=P8t[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}JZ.update=function(e){this.data=e;var t=JIe(this.scene,e);this.mesh.update(t)};JZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function I8t(e,t){var r=e.glplot.gl,n=JIe(e,t),i=A8t(r,n),a=new KIe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}$Ie.exports=I8t});var t8e=ye((tpr,e8e)=>{"use strict";e8e.exports={moduleType:"trace",name:"cone",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:KZ(),supplyDefaults:WIe(),colorbar:{min:"cmin",max:"cmax"},calc:XIe(),plot:QIe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var i8e=ye((rpr,r8e)=>{"use strict";r8e.exports=t8e()});var QZ=ye((ipr,a8e)=>{"use strict";var D8t=Kl(),W5=Oc().axisHoverFormat,R8t=Wo().hovertemplateAttrs,z8t=V5(),n8e=vl(),$Z=no().extendFlat,sz={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:R8t({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:W5("u",1),vhoverformat:W5("v",1),whoverformat:W5("w",1),xhoverformat:W5("x"),yhoverformat:W5("y"),zhoverformat:W5("z"),showlegend:$Z({},n8e.showlegend,{dflt:!1})};$Z(sz,D8t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var F8t=["opacity","lightposition","lighting"];F8t.forEach(function(e){sz[e]=z8t[e]});sz.hoverinfo=$Z({},n8e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});a8e.exports=sz});var s8e=ye((npr,o8e)=>{"use strict";var q8t=Mr(),O8t=Uh(),B8t=QZ();o8e.exports=function(t,r,n,i){function a(h,d){return q8t.coerce(t,r,B8t,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"),O8t(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var p8e=ye((apr,v8e)=>{"use strict";var c8e=Dd().gl_streamtube3d,N8t=c8e.createTubeMesh,U8t=Mr(),V8t=$y().parseColorScale,H8t=Mu().extractOpts,l8e=G5(),f8e={xaxis:0,yaxis:1,zaxis:2};function h8e(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var tX=h8e.prototype;tX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[f8e[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 u8e(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 eX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function d8e(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(F,q){var V=r[q],H=n[f8e[q]];return U8t.simpleMap(F,function(X){return V.d2l(X)*H})}if(a.vectors=l8e(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=l8e(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=u8e(s),d=u8e(u),v=new Array(h.length*d.length),x=0,b=0;b{"use strict";g8e.exports={moduleType:"trace",name:"streamtube",basePlotModule:$_(),categories:["gl3d","showLegend"],attributes:QZ(),supplyDefaults:s8e(),colorbar:{min:"cmin",max:"cmax"},calc:rz().calc,plot:p8e(),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 _8e=ye((spr,y8e)=>{"use strict";y8e.exports=m8e()});var H2=ye((lpr,w8e)=>{"use strict";var j8t=Wo().hovertemplateAttrs,W8t=Wo().texttemplateAttrs,Z8t=Eg(),jm=Uc(),X8t=vl(),x8e=Kl(),Y8t=Ed().dash,V2=no().extendFlat,K8t=Bu().overrideAll,eg=jm.marker,b8e=jm.line,J8t=eg.line;w8e.exports=K8t({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:V2({},jm.mode,{dflt:"markers"}),text:V2({},jm.text,{}),texttemplate:W8t({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:V2({},jm.hovertext,{}),textfont:jm.textfont,textposition:jm.textposition,line:{color:b8e.color,width:b8e.width,dash:Y8t},connectgaps:jm.connectgaps,marker:V2({symbol:eg.symbol,opacity:eg.opacity,angle:eg.angle,angleref:V2({},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:V2({width:J8t.width},x8e("marker.line")),gradient:eg.gradient},x8e("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Z8t(),selected:jm.selected,unselected:jm.unselected,hoverinfo:V2({},X8t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:j8t()},"calc","nested")});var A8e=ye((upr,T8e)=>{"use strict";var rX=Mr(),iX=lu(),$8t=$p(),Q8t=D0(),eDt=R0(),tDt=Ig(),rDt=H2();T8e.exports=function(t,r,n,i){function a(d,v){return rX.coerce(t,r,rDt,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||rX.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("mode"),iX.hasMarkers(r)&&$8t(t,r,n,i,a,{gradient:!0}),iX.hasLines(r)&&(Q8t(t,r,n,i,a),a("connectgaps")),iX.hasText(r)&&(a("texttemplate"),eDt(t,r,i,a)),a("fill"),r.fill!=="none"&&tDt(t,r,n,a),rX.coerceSelectionMarkerOpacity(r,a)}});var E8e=ye((cpr,M8e)=>{"use strict";var S8e=Qa();M8e.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=S8e.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=S8e.tickText(o,o.c2l(s[1]),!0).text,i}});var lz=ye((fpr,P8e)=>{"use strict";var nX=uo(),k8e=es().BADNUM,iDt=z0(),nDt=km(),aDt=F0(),oDt=Mr().isArrayOrTypedArray,C8e=Mr()._;function L8e(e){return e&&typeof e=="string"}P8e.exports=function(t,r){var n=oDt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return L8e(h)||nX(h)}:o=L8e;for(var s=0;s{"use strict";Tv.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"};Tv.axesNames=["lonaxis","lataxis"];Tv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Tv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Tv.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]}};Tv.clipPad=.001;Tv.precision=.1;Tv.landColor="#F0DC82";Tv.waterColor="#3399FF";Tv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Tv.sphereSVG={type:"Sphere"};Tv.fillLayers={ocean:1,land:1,lakes:1};Tv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Tv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Tv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Tv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var aX=ye((uz,I8e)=>{(function(e,t){typeof uz=="object"&&typeof I8e!="undefined"?t(uz):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.topojson=e.topojson||{}))})(uz,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var A,L,_=k.scale[0],C=k.scale[1],M=k.translate[0],p=k.translate[1];return function(P,T){T||(A=L=0);var F=2,q=P.length,V=new Array(q);for(V[0]=(A+=P[0])*_+M,V[1]=(L+=P[1])*C+p;FM&&(M=F[0]),F[1]p&&(p=F[1])}function T(F){switch(F.type){case"GeometryCollection":F.geometries.forEach(T);break;case"Point":P(F.coordinates);break;case"MultiPoint":F.coordinates.forEach(P);break}}k.arcs.forEach(function(F){for(var q=-1,V=F.length,H;++qM&&(M=H[0]),H[1]p&&(p=H[1])});for(L in k.objects)T(k.objects[L]);return[_,C,M,p]}function i(k,A){for(var L,_=k.length,C=_-A;C<--_;)L=k[C],k[C++]=k[_],k[_]=L}function a(k,A){return typeof A=="string"&&(A=k.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(L){return o(k,L)})}:o(k,A)}function o(k,A){var L=A.id,_=A.bbox,C=A.properties==null?{}:A.properties,M=s(k,A);return L==null&&_==null?{type:"Feature",properties:C,geometry:M}:_==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:_,properties:C,geometry:M}}function s(k,A){var L=r(k.transform),_=k.arcs;function C(q,V){V.length&&V.pop();for(var H=_[q<0?~q:q],X=0,G=H.length;X1)_=f(k,A,L);else for(C=0,_=new Array(M=k.arcs.length);C1)for(var V=1,H=P(F[0]),X,G;VH&&(G=F[0],F[0]=F[V],F[V]=G,H=X);return F}).filter(function(T){return T.length>0})}}function x(k,A){for(var L=0,_=k.length;L<_;){var C=L+_>>>1;k[C]=2))throw new Error("n must be \u22652");T=k.bbox||n(k);var L=T[0],_=T[1],C=T[2],M=T[3],p;A={scale:[C-L?(C-L)/(p-1):1,M-_?(M-_)/(p-1):1],translate:[L,_]}}else T=k.bbox;var P=g(A),T,F,q=k.objects,V={};function H(N){return P(N)}function X(N){var W;switch(N.type){case"GeometryCollection":W={type:"GeometryCollection",geometries:N.geometries.map(X)};break;case"Point":W={type:"Point",coordinates:H(N.coordinates)};break;case"MultiPoint":W={type:"MultiPoint",coordinates:N.coordinates.map(H)};break;default:return N}return N.id!=null&&(W.id=N.id),N.bbox!=null&&(W.bbox=N.bbox),N.properties!=null&&(W.properties=N.properties),W}function G(N){var W=0,re=1,ae=N.length,_e,Me=new Array(ae);for(Me[0]=P(N[0],0);++W{"use strict";var oX=D8e.exports={},sDt=XE().locationmodeToLayer,lDt=aX().feature;oX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};oX.getTopojsonPath=function(e,t){return e+t+".json"};oX.getTopojsonFeatures=function(e,t){var r=sDt[e.locationmode],n=t.objects[r];return lDt(t,n).features}});var tx=ye(YE=>{"use strict";var uDt=es().BADNUM;YE.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};YE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};YE.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{R8e.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 dz=ye(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var qp=63710088e-1,lX={centimeters:qp*100,centimetres:qp*100,degrees:360/(2*Math.PI),feet:qp*3.28084,inches:qp*39.37,kilometers:qp/1e3,kilometres:qp/1e3,meters:qp,metres:qp,miles:qp/1609.344,millimeters:qp*1e3,millimetres:qp*1e3,nauticalmiles:qp/1852,radians:1,yards:qp*1.0936},sX={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 cDt(e,t,r={}){switch(e){case"Point":return uX(t).geometry;case"LineString":return fX(t).geometry;case"Polygon":return cX(t).geometry;case"MultiPoint":return q8e(t).geometry;case"MultiLineString":return F8e(t).geometry;case"MultiPolygon":return O8e(t).geometry;default:throw new Error(e+" is invalid")}}function uX(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(!fz(e[0])||!fz(e[1]))throw new Error("coordinates must contain numbers");return rx({type:"Point",coordinates:e},t,r)}function fDt(e,t,r={}){return hz(e.map(n=>uX(n,t)),r)}function cX(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;acX(n,t)),r)}function fX(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 dDt(e,t,r={}){return hz(e.map(n=>fX(n,t)),r)}function hz(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function F8e(e,t,r={}){return rx({type:"MultiLineString",coordinates:e},t,r)}function q8e(e,t,r={}){return rx({type:"MultiPoint",coordinates:e},t,r)}function O8e(e,t,r={}){return rx({type:"MultiPolygon",coordinates:e},t,r)}function vDt(e,t,r={}){return rx({type:"GeometryCollection",geometries:e},t,r)}function pDt(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 B8e(e,t="kilometers"){let r=lX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function hX(e,t="kilometers"){let r=lX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function gDt(e,t){return N8e(hX(e,t))}function mDt(e){let t=e%360;return t<0&&(t+=360),t}function yDt(e){return e=e%360,e>0?e>180?e-360:e:e<-180?e+360:e}function N8e(e){return e%(2*Math.PI)*180/Math.PI}function _Dt(e){return e%360*Math.PI/180}function xDt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return B8e(hX(e,t),r)}function bDt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=sX[t];if(!n)throw new Error("invalid original units");let i=sX[r];if(!i)throw new Error("invalid final units");return e/n*i}function fz(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function wDt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function TDt(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(!fz(t))throw new Error("bbox must only contain numbers")})}function ADt(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")}ku.areaFactors=sX;ku.azimuthToBearing=yDt;ku.bearingToAzimuth=mDt;ku.convertArea=bDt;ku.convertLength=xDt;ku.degreesToRadians=_Dt;ku.earthRadius=qp;ku.factors=lX;ku.feature=rx;ku.featureCollection=hz;ku.geometry=cDt;ku.geometryCollection=vDt;ku.isNumber=fz;ku.isObject=wDt;ku.lengthToDegrees=gDt;ku.lengthToRadians=hX;ku.lineString=fX;ku.lineStrings=dDt;ku.multiLineString=F8e;ku.multiPoint=q8e;ku.multiPolygon=O8e;ku.point=uX;ku.points=fDt;ku.polygon=cX;ku.polygons=hDt;ku.radiansToDegrees=N8e;ku.radiansToLength=B8e;ku.round=pDt;ku.validateBBox=TDt;ku.validateId=ADt});var pz=ye(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var jv=dz();function KE(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",x=d==="Feature",b=v?e.features.length:1,g=0;gl||v>u||x>c){s=f,l=n,u=v,c=x,a=0;return}var b=jv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,x,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function PDt(e,t,r){var n=r,i=!1;return H8e(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 G8e(e,t){if(!e)throw new Error("geojson is required");vz(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(gz,"__esModule",{value:!0});var j8e=dz(),zDt=pz();function X8e(e){return zDt.geomReduce.call(void 0,e,(t,r)=>t+FDt(r),0)}function FDt(e){let t=0,r;switch(e.type){case"Polygon":return W8e(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(Z8e(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*vX,l=a[1]*vX,u=o[0]*vX;r+=(u-s)*Math.sin(l),n++}return r*qDt}var ODt=X8e;gz.area=X8e;gz.default=ODt});var J8e=ye(mz=>{"use strict";Object.defineProperty(mz,"__esModule",{value:!0});var BDt=dz(),NDt=pz();function K8e(e,t={}){let r=0,n=0,i=0;return NDt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),BDt.point.call(void 0,[r/i,n/i],t.properties)}var UDt=K8e;mz.centroid=K8e;mz.default=UDt});var Q8e=ye(yz=>{"use strict";Object.defineProperty(yz,"__esModule",{value:!0});var VDt=pz();function $8e(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return VDt.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 GDt=xa(),rDe=z8e(),{area:jDt}=Y8e(),{centroid:WDt}=J8e(),{bbox:ZDt}=Q8e(),eDe=OS(),Z5=H1(),XDt=gy(),YDt=ES(),_z=wM(),tDe=Object.keys(rDe),KDt={"ISO-3":eDe,"USA-states":eDe,"country names":JDt};function JDt(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=_z.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(_z.tester(c))},t.type){case"MultiPolygon":for(o=0;o0?v.properties.ct=tRt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else Z5.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 WDt(r).geometry.coordinates}function rRt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){GDt.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 nRt=xa(),aRt=ao(),aDe=va(),oDe=op(),oRt=oDe.stylePoints,sRt=oDe.styleText;sDe.exports=function(t,r){r&&lRt(t,r)};function lRt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),oRt(n,r,e),sRt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=nRt.select(this),o=i.trace,s=o.line||{};a.call(aDe.stroke,s.color).call(aRt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(aDe.fill,o.fillcolor)})}});var _X=ye((Tpr,cDe)=>{"use strict";var lDe=xa(),bz=Mr(),uRt=cz().getTopojsonFeatures,gX=tx(),xz=ix(),uDe=wg().findExtremes,yX=es().BADNUM,cRt=q0().calcMarkerSize,mX=lu(),fRt=pX();function hRt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=bz.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===yX&&lDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=lDe.select(this),l=o[0].trace;if(mX.hasLines(l)||l.fill!=="none"){var u=gX.calcTraceToLineCoords(o),c=l.fill!=="none"?gX.makePolygon(u):gX.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}mX.hasMarkers(l)&&s.selectAll("path.point").data(bz.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),mX.hasText(l)&&s.selectAll("g").data(bz.identity).enter().append("g").append("text").each(function(f){a(f,this)}),fRt(e,o)})}function dRt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(bz.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?xz.extractTraceFeature(e):uRt(r,i.topojson);for(o=0;o{"use strict";var vRt=Nc(),pRt=es().BADNUM,gRt=oT(),mRt=Mr().fillText,yRt=H2();fDe.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(E){var k=E.lonlat;if(k[0]===pRt||u(k))return 1/0;var A=c(k),L=c([r,n]),_=Math.abs(A[0]-L[0]),C=Math.abs(A[1]-L[1]),M=Math.max(3,E.mrc||0);return Math.max(Math.sqrt(_*_+C*C)-M,1-3/M)}if(vRt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],x=h.mrc||1;t.x0=v[0]-x,t.x1=v[0]+x,t.y0=v[1]-x,t.y1=v[1]+x,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var g=a._module.formatLabels(h,a,b);return t.lonLabel=g.lonLabel,t.latLabel=g.latLabel,t.color=gRt(a,h),t.extraText=_Rt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function _Rt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?yRt.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&&mRt(t,e,c),c.join("
")}});var vDe=ye((Spr,dDe)=>{"use strict";dDe.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 mDe=ye((Mpr,gDe)=>{"use strict";var pDe=lu(),xRt=es().BADNUM;gDe.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=!pDe.hasMarkers(s)&&!pDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){typeof wz=="object"&&typeof yDe!="undefined"?t(wz):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(wz,function(e){"use strict";function t(Ee,Ae){return EeAe?1:Ee>=Ae?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Ae,ze,Ce,me){for(Ce==null&&(Ce=0),me==null&&(me=Ae.length);Ce>>1;Ee(Ae[De],ze)<0?Ce=De+1:me=De}return Ce},right:function(Ae,ze,Ce,me){for(Ce==null&&(Ce=0),me==null&&(me=Ae.length);Ce>>1;Ee(Ae[De],ze)>0?me=De:Ce=De+1}return Ce}}}function n(Ee){return function(Ae,ze){return t(Ee(Ae),ze)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Ae){Ae==null&&(Ae=l);for(var ze=0,Ce=Ee.length-1,me=Ee[0],De=new Array(Ce<0?0:Ce);zeEe?1:Ae>=Ee?0:NaN}function f(Ee){return Ee===null?NaN:+Ee}function h(Ee,Ae){var ze=Ee.length,Ce=0,me=-1,De=0,ce,Ge,nt=0;if(Ae==null)for(;++me1)return nt/(Ce-1)}function d(Ee,Ae){var ze=h(Ee,Ae);return ze&&Math.sqrt(ze)}function v(Ee,Ae){var ze=Ee.length,Ce=-1,me,De,ce;if(Ae==null){for(;++Ce=me)for(De=ce=me;++Ceme&&(De=me),ce=me)for(De=ce=me;++Ceme&&(De=me),ce0)return[Ee];if((Ce=Ae0)for(Ee=Math.ceil(Ee/Ge),Ae=Math.floor(Ae/Ge),ce=new Array(De=Math.ceil(Ae-Ee+1));++me=0?(De>=L?10:De>=_?5:De>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(De>=L?10:De>=_?5:De>=C?2:1)}function P(Ee,Ae,ze){var Ce=Math.abs(Ae-Ee)/Math.max(0,ze),me=Math.pow(10,Math.floor(Math.log(Ce)/Math.LN10)),De=Ce/me;return De>=L?me*=10:De>=_?me*=5:De>=C&&(me*=2),Aert;)ot.pop(),--Dt;var kt=new Array(Dt+1),Ct;for(De=0;De<=Dt;++De)Ct=kt[De]=[],Ct.x0=De>0?ot[De-1]:qt,Ct.x1=De=1)return+ze(Ee[Ce-1],Ce-1,Ee);var Ce,me=(Ce-1)*Ae,De=Math.floor(me),ce=+ze(Ee[De],De,Ee),Ge=+ze(Ee[De+1],De+1,Ee);return ce+(Ge-ce)*(me-De)}}function V(Ee,Ae,ze){return Ee=g.call(Ee,f).sort(t),Math.ceil((ze-Ae)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function H(Ee,Ae,ze){return Math.ceil((ze-Ae)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function X(Ee,Ae){var ze=Ee.length,Ce=-1,me,De;if(Ae==null){for(;++Ce=me)for(De=me;++CeDe&&(De=me)}else for(;++Ce=me)for(De=me;++CeDe&&(De=me);return De}function G(Ee,Ae){var ze=Ee.length,Ce=ze,me=-1,De,ce=0;if(Ae==null)for(;++me=0;)for(ce=Ee[Ae],ze=ce.length;--ze>=0;)De[--me]=ce[ze];return De}function re(Ee,Ae){var ze=Ee.length,Ce=-1,me,De;if(Ae==null){for(;++Ce=me)for(De=me;++Ceme&&(De=me)}else for(;++Ce=me)for(De=me;++Ceme&&(De=me);return De}function ae(Ee,Ae){for(var ze=Ae.length,Ce=new Array(ze);ze--;)Ce[ze]=Ee[Ae[ze]];return Ce}function _e(Ee,Ae){if(ze=Ee.length){var ze,Ce=0,me=0,De,ce=Ee[me];for(Ae==null&&(Ae=t);++Ce{(function(e,t){typeof Tz=="object"&&typeof _De!="undefined"?t(Tz,JE()):typeof define=="function"&&define.amd?define(["exports","d3-array"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Tz,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(gt){a(i,gt,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(gt,Bt,wr){var vr=gt.s=Bt+wr,Ur=vr-Bt,fi=vr-Ur;gt.t=Bt-fi+(wr-Ur)}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,x=Math.atan,b=Math.atan2,g=Math.cos,E=Math.ceil,k=Math.exp,A=Math.log,L=Math.pow,_=Math.sin,C=Math.sign||function(gt){return gt>0?1:gt<0?-1:0},M=Math.sqrt,p=Math.tan;function P(gt){return gt>1?0:gt<-1?l:Math.acos(gt)}function T(gt){return gt>1?u:gt<-1?-u:Math.asin(gt)}function F(gt){return(gt=_(gt/2))*gt}function q(){}function V(gt,Bt){gt&&X.hasOwnProperty(gt.type)&&X[gt.type](gt,Bt)}var H={Feature:function(gt,Bt){V(gt.geometry,Bt)},FeatureCollection:function(gt,Bt){for(var wr=gt.features,vr=-1,Ur=wr.length;++vr=0?1:-1,Ur=vr*wr,fi=g(Bt),xi=_(Bt),Fi=ie*xi,Xi=ge*fi+Fi*g(Ur),hn=Fi*vr*_(Ur);re.add(b(hn,Xi)),ke=gt,ge=fi,ie=xi}function me(gt){return ae.reset(),W(gt,Te),ae*2}function De(gt){return[b(gt[1],gt[0]),T(gt[2])]}function ce(gt){var Bt=gt[0],wr=gt[1],vr=g(wr);return[vr*g(Bt),vr*_(Bt),_(wr)]}function Ge(gt,Bt){return gt[0]*Bt[0]+gt[1]*Bt[1]+gt[2]*Bt[2]}function nt(gt,Bt){return[gt[1]*Bt[2]-gt[2]*Bt[1],gt[2]*Bt[0]-gt[0]*Bt[2],gt[0]*Bt[1]-gt[1]*Bt[0]]}function ct(gt,Bt){gt[0]+=Bt[0],gt[1]+=Bt[1],gt[2]+=Bt[2]}function qt(gt,Bt){return[gt[0]*Bt,gt[1]*Bt,gt[2]*Bt]}function rt(gt){var Bt=M(gt[0]*gt[0]+gt[1]*gt[1]+gt[2]*gt[2]);gt[0]/=Bt,gt[1]/=Bt,gt[2]/=Bt}var ot,Dt,kt,Ct,Yt,xr,er,Ke,xt=r(),bt,Lt,St={point:Et,lineStart:Ht,lineEnd:$t,polygonStart:function(){St.point=fr,St.lineStart=_r,St.lineEnd=Br,xt.reset(),Te.polygonStart()},polygonEnd:function(){Te.polygonEnd(),St.point=Et,St.lineStart=Ht,St.lineEnd=$t,re<0?(ot=-(kt=180),Dt=-(Ct=90)):xt>o?Ct=90:xt<-o&&(Dt=-90),Lt[0]=ot,Lt[1]=kt},sphere:function(){ot=-(kt=180),Dt=-(Ct=90)}};function Et(gt,Bt){bt.push(Lt=[ot=gt,kt=gt]),BtCt&&(Ct=Bt)}function dt(gt,Bt){var wr=ce([gt*d,Bt*d]);if(Ke){var vr=nt(Ke,wr),Ur=[vr[1],-vr[0],0],fi=nt(Ur,vr);rt(fi),fi=De(fi);var xi=gt-Yt,Fi=xi>0?1:-1,Xi=fi[0]*h*Fi,hn,Ti=v(xi)>180;Ti^(Fi*YtCt&&(Ct=hn)):(Xi=(Xi+360)%360-180,Ti^(Fi*YtCt&&(Ct=Bt))),Ti?gtOr(ot,kt)&&(kt=gt):Or(gt,kt)>Or(ot,kt)&&(ot=gt):kt>=ot?(gtkt&&(kt=gt)):gt>Yt?Or(ot,gt)>Or(ot,kt)&&(kt=gt):Or(gt,kt)>Or(ot,kt)&&(ot=gt)}else bt.push(Lt=[ot=gt,kt=gt]);BtCt&&(Ct=Bt),Ke=wr,Yt=gt}function Ht(){St.point=dt}function $t(){Lt[0]=ot,Lt[1]=kt,St.point=Et,Ke=null}function fr(gt,Bt){if(Ke){var wr=gt-Yt;xt.add(v(wr)>180?wr+(wr>0?360:-360):wr)}else xr=gt,er=Bt;Te.point(gt,Bt),dt(gt,Bt)}function _r(){Te.lineStart()}function Br(){fr(xr,er),Te.lineEnd(),v(xt)>o&&(ot=-(kt=180)),Lt[0]=ot,Lt[1]=kt,Ke=null}function Or(gt,Bt){return(Bt-=gt)<0?Bt+360:Bt}function Nr(gt,Bt){return gt[0]-Bt[0]}function ut(gt,Bt){return gt[0]<=gt[1]?gt[0]<=Bt&&Bt<=gt[1]:BtOr(vr[0],vr[1])&&(vr[1]=Ur[1]),Or(Ur[0],vr[1])>Or(vr[0],vr[1])&&(vr[0]=Ur[0])):fi.push(vr=Ur);for(xi=-1/0,wr=fi.length-1,Bt=0,vr=fi[wr];Bt<=wr;vr=Ur,++Bt)Ur=fi[Bt],(Fi=Or(vr[1],Ur[0]))>xi&&(xi=Fi,ot=Ur[0],kt=vr[1])}return bt=Lt=null,ot===1/0||Dt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ot,Dt],[kt,Ct]]}var Ye,Ve,Xe,ht,Le,xe,Se,lt,Gt,Vt,ar,Qr,ai,jr,ri,bi,nn={sphere:q,point:Wi,lineStart:_n,lineEnd:Wn,polygonStart:function(){nn.lineStart=It,nn.lineEnd=ft},polygonEnd:function(){nn.lineStart=_n,nn.lineEnd=Wn}};function Wi(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt);Ni(wr*g(gt),wr*_(gt),_(Bt))}function Ni(gt,Bt,wr){++Ye,Xe+=(gt-Xe)/Ye,ht+=(Bt-ht)/Ye,Le+=(wr-Le)/Ye}function _n(){nn.point=$i}function $i(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt);jr=wr*g(gt),ri=wr*_(gt),bi=_(Bt),nn.point=zn,Ni(jr,ri,bi)}function zn(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt),vr=wr*g(gt),Ur=wr*_(gt),fi=_(Bt),xi=b(M((xi=ri*fi-bi*Ur)*xi+(xi=bi*vr-jr*fi)*xi+(xi=jr*Ur-ri*vr)*xi),jr*vr+ri*Ur+bi*fi);Ve+=xi,xe+=xi*(jr+(jr=vr)),Se+=xi*(ri+(ri=Ur)),lt+=xi*(bi+(bi=fi)),Ni(jr,ri,bi)}function Wn(){nn.point=Wi}function It(){nn.point=jt}function ft(){Zt(Qr,ai),nn.point=Wi}function jt(gt,Bt){Qr=gt,ai=Bt,gt*=d,Bt*=d,nn.point=Zt;var wr=g(Bt);jr=wr*g(gt),ri=wr*_(gt),bi=_(Bt),Ni(jr,ri,bi)}function Zt(gt,Bt){gt*=d,Bt*=d;var wr=g(Bt),vr=wr*g(gt),Ur=wr*_(gt),fi=_(Bt),xi=ri*fi-bi*Ur,Fi=bi*vr-jr*fi,Xi=jr*Ur-ri*vr,hn=M(xi*xi+Fi*Fi+Xi*Xi),Ti=T(hn),qi=hn&&-Ti/hn;Gt+=qi*xi,Vt+=qi*Fi,ar+=qi*Xi,Ve+=Ti,xe+=Ti*(jr+(jr=vr)),Se+=Ti*(ri+(ri=Ur)),lt+=Ti*(bi+(bi=fi)),Ni(jr,ri,bi)}function yr(gt){Ye=Ve=Xe=ht=Le=xe=Se=lt=Gt=Vt=ar=0,W(gt,nn);var Bt=Gt,wr=Vt,vr=ar,Ur=Bt*Bt+wr*wr+vr*vr;return Url?gt+Math.round(-gt/f)*f:gt,Bt]}Vr.invert=Vr;function gi(gt,Bt,wr){return(gt%=f)?Bt||wr?Zr(Mi(gt),Pi(Bt,wr)):Mi(gt):Bt||wr?Pi(Bt,wr):Vr}function Si(gt){return function(Bt,wr){return Bt+=gt,[Bt>l?Bt-f:Bt<-l?Bt+f:Bt,wr]}}function Mi(gt){var Bt=Si(gt);return Bt.invert=Si(-gt),Bt}function Pi(gt,Bt){var wr=g(gt),vr=_(gt),Ur=g(Bt),fi=_(Bt);function xi(Fi,Xi){var hn=g(Xi),Ti=g(Fi)*hn,qi=_(Fi)*hn,Ii=_(Xi),mi=Ii*wr+Ti*vr;return[b(qi*Ur-mi*fi,Ti*wr-Ii*vr),T(mi*Ur+qi*fi)]}return xi.invert=function(Fi,Xi){var hn=g(Xi),Ti=g(Fi)*hn,qi=_(Fi)*hn,Ii=_(Xi),mi=Ii*Ur-qi*fi;return[b(qi*Ur+Ii*fi,Ti*wr+mi*vr),T(mi*wr-Ti*vr)]},xi}function Gi(gt){gt=gi(gt[0]*d,gt[1]*d,gt.length>2?gt[2]*d:0);function Bt(wr){return wr=gt(wr[0]*d,wr[1]*d),wr[0]*=h,wr[1]*=h,wr}return Bt.invert=function(wr){return wr=gt.invert(wr[0]*d,wr[1]*d),wr[0]*=h,wr[1]*=h,wr},Bt}function Ki(gt,Bt,wr,vr,Ur,fi){if(wr){var xi=g(Bt),Fi=_(Bt),Xi=vr*wr;Ur==null?(Ur=Bt+vr*f,fi=Bt-Xi/2):(Ur=ka(xi,Ur),fi=ka(xi,fi),(vr>0?Urfi)&&(Ur+=vr*f));for(var hn,Ti=Ur;vr>0?Ti>fi:Ti1&>.push(gt.pop().concat(gt.shift()))},result:function(){var wr=gt;return gt=[],Bt=null,wr}}}function Fa(gt,Bt){return v(gt[0]-Bt[0])=0;--Fi)Ur.point((qi=Ti[Fi])[0],qi[1]);else vr(Ii.x,Ii.p.x,-1,Ur);Ii=Ii.p}Ii=Ii.o,Ti=Ii.z,mi=!mi}while(!Ii.v);Ur.lineEnd()}}}function oa(gt){if(Bt=gt.length){for(var Bt,wr=0,vr=gt[0],Ur;++wr=0?1:-1,Qo=Ts*Xo,ys=Qo>l,Bo=Ma*Ua;if(Sn.add(b(Bo*Ts*_(Qo),Ta*mo+Bo*g(Qo))),xi+=ys?Xo+Ts*f:Xo,ys^mi>=wr^Cn>=wr){var yl=nt(ce(Ii),ce(qa));rt(yl);var Gs=nt(fi,yl);rt(Gs);var Ds=(ys^Xo>=0?-1:1)*T(Gs[2]);(vr>Ds||vr===Ds&&(yl[0]||yl[1]))&&(Fi+=ys^Xo>=0?1:-1)}}return(xi<-o||xi0){for(Xi||(Ur.polygonStart(),Xi=!0),Ur.lineStart(),mo=0;mo1&&sn&2&&Ua.push(Ua.pop().concat(Ua.shift())),Ti.push(Ua.filter(_t))}}return Ii}}function _t(gt){return gt.length>1}function br(gt,Bt){return((gt=gt.x)[0]<0?gt[1]-u-o:u-gt[1])-((Bt=Bt.x)[0]<0?Bt[1]-u-o:u-Bt[1])}var Hr=xn(function(){return!0},ti,Yi,[-l,-u]);function ti(gt){var Bt=NaN,wr=NaN,vr=NaN,Ur;return{lineStart:function(){gt.lineStart(),Ur=1},point:function(fi,xi){var Fi=fi>0?l:-l,Xi=v(fi-Bt);v(Xi-l)0?u:-u),gt.point(vr,wr),gt.lineEnd(),gt.lineStart(),gt.point(Fi,wr),gt.point(fi,wr),Ur=0):vr!==Fi&&Xi>=l&&(v(Bt-vr)o?x((_(Bt)*(fi=g(vr))*_(wr)-_(vr)*(Ur=g(Bt))*_(gt))/(Ur*fi*xi)):(Bt+vr)/2}function Yi(gt,Bt,wr,vr){var Ur;if(gt==null)Ur=wr*u,vr.point(-l,Ur),vr.point(0,Ur),vr.point(l,Ur),vr.point(l,0),vr.point(l,-Ur),vr.point(0,-Ur),vr.point(-l,-Ur),vr.point(-l,0),vr.point(-l,Ur);else if(v(gt[0]-Bt[0])>o){var fi=gt[0]0,Ur=v(Bt)>o;function fi(Ti,qi,Ii,mi){Ki(mi,gt,wr,Ii,Ti,qi)}function xi(Ti,qi){return g(Ti)*g(qi)>Bt}function Fi(Ti){var qi,Ii,mi,Pn,Ma;return{lineStart:function(){Pn=mi=!1,Ma=1},point:function(Ta,Ea){var qa=[Ta,Ea],Cn,sn=xi(Ta,Ea),Ua=vr?sn?0:hn(Ta,Ea):sn?hn(Ta+(Ta<0?l:-l),Ea):0;if(!qi&&(Pn=mi=sn)&&Ti.lineStart(),sn!==mi&&(Cn=Xi(qi,qa),(!Cn||Fa(qi,Cn)||Fa(qa,Cn))&&(qa[2]=1)),sn!==mi)Ma=0,sn?(Ti.lineStart(),Cn=Xi(qa,qi),Ti.point(Cn[0],Cn[1])):(Cn=Xi(qi,qa),Ti.point(Cn[0],Cn[1],2),Ti.lineEnd()),qi=Cn;else if(Ur&&qi&&vr^sn){var mo;!(Ua&Ii)&&(mo=Xi(qa,qi,!0))&&(Ma=0,vr?(Ti.lineStart(),Ti.point(mo[0][0],mo[0][1]),Ti.point(mo[1][0],mo[1][1]),Ti.lineEnd()):(Ti.point(mo[1][0],mo[1][1]),Ti.lineEnd(),Ti.lineStart(),Ti.point(mo[0][0],mo[0][1],3)))}sn&&(!qi||!Fa(qi,qa))&&Ti.point(qa[0],qa[1]),qi=qa,mi=sn,Ii=Ua},lineEnd:function(){mi&&Ti.lineEnd(),qi=null},clean:function(){return Ma|(Pn&&mi)<<1}}}function Xi(Ti,qi,Ii){var mi=ce(Ti),Pn=ce(qi),Ma=[1,0,0],Ta=nt(mi,Pn),Ea=Ge(Ta,Ta),qa=Ta[0],Cn=Ea-qa*qa;if(!Cn)return!Ii&&Ti;var sn=Bt*Ea/Cn,Ua=-Bt*qa/Cn,mo=nt(Ma,Ta),Xo=qt(Ma,sn),Ts=qt(Ta,Ua);ct(Xo,Ts);var Qo=mo,ys=Ge(Xo,Qo),Bo=Ge(Qo,Qo),yl=ys*ys-Bo*(Ge(Xo,Xo)-1);if(!(yl<0)){var Gs=M(yl),Ds=qt(Qo,(-ys-Gs)/Bo);if(ct(Ds,Xo),Ds=De(Ds),!Ii)return Ds;var ia=Ti[0],Ka=qi[0],vs=Ti[1],Ko=qi[1],iu;Ka0^Ds[1]<(v(Ds[0]-ia)l^(ia<=Ds[0]&&Ds[0]<=Ka)){var bu=qt(Qo,(-ys+Gs)/Bo);return ct(bu,Xo),[Ds,De(bu)]}}}function hn(Ti,qi){var Ii=vr?gt:l-gt,mi=0;return Ti<-Ii?mi|=1:Ti>Ii&&(mi|=2),qi<-Ii?mi|=4:qi>Ii&&(mi|=8),mi}return xn(xi,Fi,fi,vr?[0,-gt]:[-l,gt-l])}function hi(gt,Bt,wr,vr,Ur,fi){var xi=gt[0],Fi=gt[1],Xi=Bt[0],hn=Bt[1],Ti=0,qi=1,Ii=Xi-xi,mi=hn-Fi,Pn;if(Pn=wr-xi,!(!Ii&&Pn>0)){if(Pn/=Ii,Ii<0){if(Pn0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}if(Pn=Ur-xi,!(!Ii&&Pn<0)){if(Pn/=Ii,Ii<0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}else if(Ii>0){if(Pn0)){if(Pn/=mi,mi<0){if(Pn0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}if(Pn=fi-Fi,!(!mi&&Pn<0)){if(Pn/=mi,mi<0){if(Pn>qi)return;Pn>Ti&&(Ti=Pn)}else if(mi>0){if(Pn0&&(gt[0]=xi+Ti*Ii,gt[1]=Fi+Ti*mi),qi<1&&(Bt[0]=xi+qi*Ii,Bt[1]=Fi+qi*mi),!0}}}}}var Ji=1e9,ua=-Ji;function Fn(gt,Bt,wr,vr){function Ur(hn,Ti){return gt<=hn&&hn<=wr&&Bt<=Ti&&Ti<=vr}function fi(hn,Ti,qi,Ii){var mi=0,Pn=0;if(hn==null||(mi=xi(hn,qi))!==(Pn=xi(Ti,qi))||Xi(hn,Ti)<0^qi>0)do Ii.point(mi===0||mi===3?gt:wr,mi>1?vr:Bt);while((mi=(mi+qi+4)%4)!==Pn);else Ii.point(Ti[0],Ti[1])}function xi(hn,Ti){return v(hn[0]-gt)0?0:3:v(hn[0]-wr)0?2:1:v(hn[1]-Bt)0?1:0:Ti>0?3:2}function Fi(hn,Ti){return Xi(hn.x,Ti.x)}function Xi(hn,Ti){var qi=xi(hn,1),Ii=xi(Ti,1);return qi!==Ii?qi-Ii:qi===0?Ti[1]-hn[1]:qi===1?hn[0]-Ti[0]:qi===2?hn[1]-Ti[1]:Ti[0]-hn[0]}return function(hn){var Ti=hn,qi=la(),Ii,mi,Pn,Ma,Ta,Ea,qa,Cn,sn,Ua,mo,Xo={point:Ts,lineStart:yl,lineEnd:Gs,polygonStart:ys,polygonEnd:Bo};function Ts(ia,Ka){Ur(ia,Ka)&&Ti.point(ia,Ka)}function Qo(){for(var ia=0,Ka=0,vs=mi.length;Kavr&&(Kc-mf)*(vr-bu)>(Ru-bu)*(gt-mf)&&++ia:Ru<=vr&&(Kc-mf)*(vr-bu)<(Ru-bu)*(gt-mf)&&--ia;return ia}function ys(){Ti=qi,Ii=[],mi=[],mo=!0}function Bo(){var ia=Qo(),Ka=mo&&ia,vs=(Ii=t.merge(Ii)).length;(Ka||vs)&&(hn.polygonStart(),Ka&&(hn.lineStart(),fi(null,null,1,hn),hn.lineEnd()),vs&&jo(Ii,Fi,ia,fi,hn),hn.polygonEnd()),Ti=hn,Ii=mi=Pn=null}function yl(){Xo.point=Ds,mi&&mi.push(Pn=[]),Ua=!0,sn=!1,qa=Cn=NaN}function Gs(){Ii&&(Ds(Ma,Ta),Ea&&sn&&qi.rejoin(),Ii.push(qi.result())),Xo.point=Ts,sn&&Ti.lineEnd()}function Ds(ia,Ka){var vs=Ur(ia,Ka);if(mi&&Pn.push([ia,Ka]),Ua)Ma=ia,Ta=Ka,Ea=vs,Ua=!1,vs&&(Ti.lineStart(),Ti.point(ia,Ka));else if(vs&&sn)Ti.point(ia,Ka);else{var Ko=[qa=Math.max(ua,Math.min(Ji,qa)),Cn=Math.max(ua,Math.min(Ji,Cn))],iu=[ia=Math.max(ua,Math.min(Ji,ia)),Ka=Math.max(ua,Math.min(Ji,Ka))];hi(Ko,iu,gt,Bt,wr,vr)?(sn||(Ti.lineStart(),Ti.point(Ko[0],Ko[1])),Ti.point(iu[0],iu[1]),vs||Ti.lineEnd(),mo=!1):vs&&(Ti.lineStart(),Ti.point(ia,Ka),mo=!1)}qa=ia,Cn=Ka,sn=vs}return Xo}}function Sa(){var gt=0,Bt=0,wr=960,vr=500,Ur,fi,xi;return xi={stream:function(Fi){return Ur&&fi===Fi?Ur:Ur=Fn(gt,Bt,wr,vr)(fi=Fi)},extent:function(Fi){return arguments.length?(gt=+Fi[0][0],Bt=+Fi[0][1],wr=+Fi[1][0],vr=+Fi[1][1],Ur=fi=null,xi):[[gt,Bt],[wr,vr]]}}}var go=r(),Oo,ho,Mo,xo={sphere:q,point:q,lineStart:zs,lineEnd:q,polygonStart:q,polygonEnd:q};function zs(){xo.point=Zs,xo.lineEnd=ks}function ks(){xo.point=xo.lineEnd=q}function Zs(gt,Bt){gt*=d,Bt*=d,Oo=gt,ho=_(Bt),Mo=g(Bt),xo.point=Xs}function Xs(gt,Bt){gt*=d,Bt*=d;var wr=_(Bt),vr=g(Bt),Ur=v(gt-Oo),fi=g(Ur),xi=_(Ur),Fi=vr*xi,Xi=Mo*wr-ho*vr*fi,hn=ho*wr+Mo*vr*fi;go.add(b(M(Fi*Fi+Xi*Xi),hn)),Oo=gt,ho=wr,Mo=vr}function wl(gt){return go.reset(),W(gt,xo),+go}var os=[null,null],cl={type:"LineString",coordinates:os};function Cs(gt,Bt){return os[0]=gt,os[1]=Bt,wl(cl)}var ml={Feature:function(gt,Bt){return Hs(gt.geometry,Bt)},FeatureCollection:function(gt,Bt){for(var wr=gt.features,vr=-1,Ur=wr.length;++vr0&&(Ur=Cs(gt[fi],gt[fi-1]),Ur>0&&wr<=Ur&&vr<=Ur&&(wr+vr-Ur)*(1-Math.pow((wr-vr)/Ur,2))o}).map(Ii)).concat(t.range(E(fi/hn)*hn,Ur,hn).filter(function(Cn){return v(Cn%qi)>o}).map(mi))}return Ea.lines=function(){return qa().map(function(Cn){return{type:"LineString",coordinates:Cn}})},Ea.outline=function(){return{type:"Polygon",coordinates:[Pn(vr).concat(Ma(xi).slice(1),Pn(wr).reverse().slice(1),Ma(Fi).reverse().slice(1))]}},Ea.extent=function(Cn){return arguments.length?Ea.extentMajor(Cn).extentMinor(Cn):Ea.extentMinor()},Ea.extentMajor=function(Cn){return arguments.length?(vr=+Cn[0][0],wr=+Cn[1][0],Fi=+Cn[0][1],xi=+Cn[1][1],vr>wr&&(Cn=vr,vr=wr,wr=Cn),Fi>xi&&(Cn=Fi,Fi=xi,xi=Cn),Ea.precision(Ta)):[[vr,Fi],[wr,xi]]},Ea.extentMinor=function(Cn){return arguments.length?(Bt=+Cn[0][0],gt=+Cn[1][0],fi=+Cn[0][1],Ur=+Cn[1][1],Bt>gt&&(Cn=Bt,Bt=gt,gt=Cn),fi>Ur&&(Cn=fi,fi=Ur,Ur=Cn),Ea.precision(Ta)):[[Bt,fi],[gt,Ur]]},Ea.step=function(Cn){return arguments.length?Ea.stepMajor(Cn).stepMinor(Cn):Ea.stepMinor()},Ea.stepMajor=function(Cn){return arguments.length?(Ti=+Cn[0],qi=+Cn[1],Ea):[Ti,qi]},Ea.stepMinor=function(Cn){return arguments.length?(Xi=+Cn[0],hn=+Cn[1],Ea):[Xi,hn]},Ea.precision=function(Cn){return arguments.length?(Ta=+Cn,Ii=on(fi,Ur,90),mi=fa(Bt,gt,Ta),Pn=on(Fi,xi,90),Ma=fa(vr,wr,Ta),Ea):Ta},Ea.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Il(){return Qu()()}function vo(gt,Bt){var wr=gt[0]*d,vr=gt[1]*d,Ur=Bt[0]*d,fi=Bt[1]*d,xi=g(vr),Fi=_(vr),Xi=g(fi),hn=_(fi),Ti=xi*g(wr),qi=xi*_(wr),Ii=Xi*g(Ur),mi=Xi*_(Ur),Pn=2*T(M(F(fi-vr)+xi*Xi*F(Ur-wr))),Ma=_(Pn),Ta=Pn?function(Ea){var qa=_(Ea*=Pn)/Ma,Cn=_(Pn-Ea)/Ma,sn=Cn*Ti+qa*Ii,Ua=Cn*qi+qa*mi,mo=Cn*Fi+qa*hn;return[b(Ua,sn)*h,b(mo,M(sn*sn+Ua*Ua))*h]}:function(){return[wr*h,vr*h]};return Ta.distance=Pn,Ta}function Wl(gt){return gt}var Ks=r(),Zl=r(),Ec,Zn,ko,Co,Tl={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Tl.lineStart=uf,Tl.lineEnd=rh},polygonEnd:function(){Tl.lineStart=Tl.lineEnd=Tl.point=q,Ks.add(v(Zl)),Zl.reset()},result:function(){var gt=Ks/2;return Ks.reset(),gt}};function uf(){Tl.point=So}function So(gt,Bt){Tl.point=cf,Ec=ko=gt,Zn=Co=Bt}function cf(gt,Bt){Zl.add(Co*gt-ko*Bt),ko=gt,Co=Bt}function rh(){cf(Ec,Zn)}var Al=1/0,Hc=Al,Ql=-Al,Ls=Ql,mu={point:kc,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var gt=[[Al,Hc],[Ql,Ls]];return Ql=Ls=-(Hc=Al=1/0),gt}};function kc(gt,Bt){gtQl&&(Ql=gt),BtLs&&(Ls=Bt)}var Of=0,Gc=0,vd=0,Bf=0,ss=0,ff=0,ih=0,Ul=0,Js=0,hc,Cc,ws,$s,hs={point:Ms,lineStart:dc,lineEnd:Ps,polygonStart:function(){hs.lineStart=ov,hs.lineEnd=wo},polygonEnd:function(){hs.point=Ms,hs.lineStart=dc,hs.lineEnd=Ps},result:function(){var gt=Js?[ih/Js,Ul/Js]:ff?[Bf/ff,ss/ff]:vd?[Of/vd,Gc/vd]:[NaN,NaN];return Of=Gc=vd=Bf=ss=ff=ih=Ul=Js=0,gt}};function Ms(gt,Bt){Of+=gt,Gc+=Bt,++vd}function dc(){hs.point=Sl}function Sl(gt,Bt){hs.point=ec,Ms(ws=gt,$s=Bt)}function ec(gt,Bt){var wr=gt-ws,vr=Bt-$s,Ur=M(wr*wr+vr*vr);Bf+=Ur*(ws+gt)/2,ss+=Ur*($s+Bt)/2,ff+=Ur,Ms(ws=gt,$s=Bt)}function Ps(){hs.point=Ms}function ov(){hs.point=Od}function wo(){$o(hc,Cc)}function Od(gt,Bt){hs.point=$o,Ms(hc=ws=gt,Cc=$s=Bt)}function $o(gt,Bt){var wr=gt-ws,vr=Bt-$s,Ur=M(wr*wr+vr*vr);Bf+=Ur*(ws+gt)/2,ss+=Ur*($s+Bt)/2,ff+=Ur,Ur=$s*gt-ws*Bt,ih+=Ur*(ws+gt),Ul+=Ur*($s+Bt),Js+=Ur*3,Ms(ws=gt,$s=Bt)}function Ja(gt){this._context=gt}Ja.prototype={_radius:4.5,pointRadius:function(gt){return this._radius=gt,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(gt,Bt){switch(this._point){case 0:{this._context.moveTo(gt,Bt),this._point=1;break}case 1:{this._context.lineTo(gt,Bt);break}default:{this._context.moveTo(gt+this._radius,Bt),this._context.arc(gt,Bt,this._radius,0,f);break}}},result:q};var Ef=r(),tc,uu,Mh,jc,kf,Ml={point:q,lineStart:function(){Ml.point=Yh},lineEnd:function(){tc&&Eh(uu,Mh),Ml.point=q},polygonStart:function(){tc=!0},polygonEnd:function(){tc=null},result:function(){var gt=+Ef;return Ef.reset(),gt}};function Yh(gt,Bt){Ml.point=Eh,uu=jc=gt,Mh=kf=Bt}function Eh(gt,Bt){jc-=gt,kf-=Bt,Ef.add(M(jc*jc+kf*kf)),jc=gt,kf=Bt}function nh(){this._string=[]}nh.prototype={_radius:4.5,_circle:hf(4.5),pointRadius:function(gt){return(gt=+gt)!==this._radius&&(this._radius=gt,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(gt,Bt){switch(this._point){case 0:{this._string.push("M",gt,",",Bt),this._point=1;break}case 1:{this._string.push("L",gt,",",Bt);break}default:{this._circle==null&&(this._circle=hf(this._radius)),this._string.push("M",gt,",",Bt,this._circle);break}}},result:function(){if(this._string.length){var gt=this._string.join("");return this._string=[],gt}else return null}};function hf(gt){return"m0,"+gt+"a"+gt+","+gt+" 0 1,1 0,"+-2*gt+"a"+gt+","+gt+" 0 1,1 0,"+2*gt+"z"}function kh(gt,Bt){var wr=4.5,vr,Ur;function fi(xi){return xi&&(typeof wr=="function"&&Ur.pointRadius(+wr.apply(this,arguments)),W(xi,vr(Ur))),Ur.result()}return fi.area=function(xi){return W(xi,vr(Tl)),Tl.result()},fi.measure=function(xi){return W(xi,vr(Ml)),Ml.result()},fi.bounds=function(xi){return W(xi,vr(mu)),mu.result()},fi.centroid=function(xi){return W(xi,vr(hs)),hs.result()},fi.projection=function(xi){return arguments.length?(vr=xi==null?(gt=null,Wl):(gt=xi).stream,fi):gt},fi.context=function(xi){return arguments.length?(Ur=xi==null?(Bt=null,new nh):new Ja(Bt=xi),typeof wr!="function"&&Ur.pointRadius(wr),fi):Bt},fi.pointRadius=function(xi){return arguments.length?(wr=typeof xi=="function"?xi:(Ur.pointRadius(+xi),+xi),fi):wr},fi.projection(gt).context(Bt)}function Kh(gt){return{stream:rc(gt)}}function rc(gt){return function(Bt){var wr=new ah;for(var vr in gt)wr[vr]=gt[vr];return wr.stream=Bt,wr}}function ah(){}ah.prototype={constructor:ah,point:function(gt,Bt){this.stream.point(gt,Bt)},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 Wc(gt,Bt,wr){var vr=gt.clipExtent&>.clipExtent();return gt.scale(150).translate([0,0]),vr!=null&>.clipExtent(null),W(wr,gt.stream(mu)),Bt(mu.result()),vr!=null&>.clipExtent(vr),gt}function df(gt,Bt,wr){return Wc(gt,function(vr){var Ur=Bt[1][0]-Bt[0][0],fi=Bt[1][1]-Bt[0][1],xi=Math.min(Ur/(vr[1][0]-vr[0][0]),fi/(vr[1][1]-vr[0][1])),Fi=+Bt[0][0]+(Ur-xi*(vr[1][0]+vr[0][0]))/2,Xi=+Bt[0][1]+(fi-xi*(vr[1][1]+vr[0][1]))/2;gt.scale(150*xi).translate([Fi,Xi])},wr)}function Cu(gt,Bt,wr){return df(gt,[[0,0],Bt],wr)}function Nf(gt,Bt,wr){return Wc(gt,function(vr){var Ur=+Bt,fi=Ur/(vr[1][0]-vr[0][0]),xi=(Ur-fi*(vr[1][0]+vr[0][0]))/2,Fi=-fi*vr[0][1];gt.scale(150*fi).translate([xi,Fi])},wr)}function Zc(gt,Bt,wr){return Wc(gt,function(vr){var Ur=+Bt,fi=Ur/(vr[1][1]-vr[0][1]),xi=-fi*vr[0][0],Fi=(Ur-fi*(vr[1][1]+vr[0][1]))/2;gt.scale(150*fi).translate([xi,Fi])},wr)}var ds=16,Ch=g(30*d);function Bd(gt,Bt){return+Bt?Cf(gt,Bt):Jh(gt)}function Jh(gt){return rc({point:function(Bt,wr){Bt=gt(Bt,wr),this.stream.point(Bt[0],Bt[1])}})}function Cf(gt,Bt){function wr(vr,Ur,fi,xi,Fi,Xi,hn,Ti,qi,Ii,mi,Pn,Ma,Ta){var Ea=hn-vr,qa=Ti-Ur,Cn=Ea*Ea+qa*qa;if(Cn>4*Bt&&Ma--){var sn=xi+Ii,Ua=Fi+mi,mo=Xi+Pn,Xo=M(sn*sn+Ua*Ua+mo*mo),Ts=T(mo/=Xo),Qo=v(v(mo)-1)Bt||v((Ea*Gs+qa*Ds)/Cn-.5)>.3||xi*Ii+Fi*mi+Xi*Pn2?ia[2]%360*d:0,Gs()):[Fi*h,Xi*h,hn*h]},Bo.angle=function(ia){return arguments.length?(qi=ia%360*d,Gs()):qi*h},Bo.reflectX=function(ia){return arguments.length?(Ii=ia?-1:1,Gs()):Ii<0},Bo.reflectY=function(ia){return arguments.length?(mi=ia?-1:1,Gs()):mi<0},Bo.precision=function(ia){return arguments.length?(mo=Bd(Xo,Ua=ia*ia),Ds()):M(Ua)},Bo.fitExtent=function(ia,Ka){return df(Bo,ia,Ka)},Bo.fitSize=function(ia,Ka){return Cu(Bo,ia,Ka)},Bo.fitWidth=function(ia,Ka){return Nf(Bo,ia,Ka)},Bo.fitHeight=function(ia,Ka){return Zc(Bo,ia,Ka)};function Gs(){var ia=eu(wr,0,0,Ii,mi,qi).apply(null,Bt(fi,xi)),Ka=(qi?eu:$h)(wr,vr-ia[0],Ur-ia[1],Ii,mi,qi);return Ti=gi(Fi,Xi,hn),Xo=Zr(Bt,Ka),Ts=Zr(Ti,Xo),mo=Bd(Xo,Ua),Ds()}function Ds(){return Qo=ys=null,Bo}return function(){return Bt=gt.apply(this,arguments),Bo.invert=Bt.invert&&yl,Gs()}}function fl(gt){var Bt=0,wr=l/3,vr=Lc(gt),Ur=vr(Bt,wr);return Ur.parallels=function(fi){return arguments.length?vr(Bt=fi[0]*d,wr=fi[1]*d):[Bt*h,wr*h]},Ur}function Xc(gt){var Bt=g(gt);function wr(vr,Ur){return[vr*Bt,_(Ur)/Bt]}return wr.invert=function(vr,Ur){return[vr/Bt,T(Ur*Bt)]},wr}function ic(gt,Bt){var wr=_(gt),vr=(wr+_(Bt))/2;if(v(vr)=.12&&Ta<.234&&Ma>=-.425&&Ma<-.214?Ur:Ta>=.166&&Ta<.234&&Ma>=-.214&&Ma<-.115?xi:wr).invert(Ii)},Ti.stream=function(Ii){return gt&&Bt===Ii?gt:gt=Qh([wr.stream(Bt=Ii),Ur.stream(Ii),xi.stream(Ii)])},Ti.precision=function(Ii){return arguments.length?(wr.precision(Ii),Ur.precision(Ii),xi.precision(Ii),qi()):wr.precision()},Ti.scale=function(Ii){return arguments.length?(wr.scale(Ii),Ur.scale(Ii*.35),xi.scale(Ii),Ti.translate(wr.translate())):wr.scale()},Ti.translate=function(Ii){if(!arguments.length)return wr.translate();var mi=wr.scale(),Pn=+Ii[0],Ma=+Ii[1];return vr=wr.translate(Ii).clipExtent([[Pn-.455*mi,Ma-.238*mi],[Pn+.455*mi,Ma+.238*mi]]).stream(hn),fi=Ur.translate([Pn-.307*mi,Ma+.201*mi]).clipExtent([[Pn-.425*mi+o,Ma+.12*mi+o],[Pn-.214*mi-o,Ma+.234*mi-o]]).stream(hn),Fi=xi.translate([Pn-.205*mi,Ma+.212*mi]).clipExtent([[Pn-.214*mi+o,Ma+.166*mi+o],[Pn-.115*mi-o,Ma+.234*mi-o]]).stream(hn),qi()},Ti.fitExtent=function(Ii,mi){return df(Ti,Ii,mi)},Ti.fitSize=function(Ii,mi){return Cu(Ti,Ii,mi)},Ti.fitWidth=function(Ii,mi){return Nf(Ti,Ii,mi)},Ti.fitHeight=function(Ii,mi){return Zc(Ti,Ii,mi)};function qi(){return gt=Bt=null,Ti}return Ti.scale(1070)}function ju(gt){return function(Bt,wr){var vr=g(Bt),Ur=g(wr),fi=gt(vr*Ur);return[fi*Ur*_(Bt),fi*_(wr)]}}function Pc(gt){return function(Bt,wr){var vr=M(Bt*Bt+wr*wr),Ur=gt(vr),fi=_(Ur),xi=g(Ur);return[b(Bt*fi,vr*xi),T(vr&&wr*fi/vr)]}}var vc=ju(function(gt){return M(2/(1+gt))});vc.invert=Pc(function(gt){return 2*T(gt/2)});function sv(){return Pu(vc).scale(124.75).clipAngle(180-.001)}var Lf=ju(function(gt){return(gt=P(gt))&>/_(gt)});Lf.invert=Pc(function(gt){return gt});function Uf(){return Pu(Lf).scale(79.4188).clipAngle(180-.001)}function Iu(gt,Bt){return[gt,A(p((u+Bt)/2))]}Iu.invert=function(gt,Bt){return[gt,2*x(k(Bt))-u]};function oh(){return tu(Iu).scale(961/f)}function tu(gt){var Bt=Pu(gt),wr=Bt.center,vr=Bt.scale,Ur=Bt.translate,fi=Bt.clipExtent,xi=null,Fi,Xi,hn;Bt.scale=function(qi){return arguments.length?(vr(qi),Ti()):vr()},Bt.translate=function(qi){return arguments.length?(Ur(qi),Ti()):Ur()},Bt.center=function(qi){return arguments.length?(wr(qi),Ti()):wr()},Bt.clipExtent=function(qi){return arguments.length?(qi==null?xi=Fi=Xi=hn=null:(xi=+qi[0][0],Fi=+qi[0][1],Xi=+qi[1][0],hn=+qi[1][1]),Ti()):xi==null?null:[[xi,Fi],[Xi,hn]]};function Ti(){var qi=l*vr(),Ii=Bt(Gi(Bt.rotate()).invert([0,0]));return fi(xi==null?[[Ii[0]-qi,Ii[1]-qi],[Ii[0]+qi,Ii[1]+qi]]:gt===Iu?[[Math.max(Ii[0]-qi,xi),Fi],[Math.min(Ii[0]+qi,Xi),hn]]:[[xi,Math.max(Ii[1]-qi,Fi)],[Xi,Math.min(Ii[1]+qi,hn)]])}return Ti()}function vf(gt){return p((u+gt)/2)}function md(gt,Bt){var wr=g(gt),vr=gt===Bt?_(gt):A(wr/g(Bt))/A(vf(Bt)/vf(gt)),Ur=wr*L(vf(gt),vr)/vr;if(!vr)return Iu;function fi(xi,Fi){Ur>0?Fi<-u+o&&(Fi=-u+o):Fi>u-o&&(Fi=u-o);var Xi=Ur/L(vf(Fi),vr);return[Xi*_(vr*xi),Ur-Xi*g(vr*xi)]}return fi.invert=function(xi,Fi){var Xi=Ur-Fi,hn=C(vr)*M(xi*xi+Xi*Xi),Ti=b(xi,v(Xi))*C(Xi);return Xi*vr<0&&(Ti-=l*C(xi)*C(Xi)),[Ti/vr,2*x(L(Ur/hn,1/vr))-u]},fi}function sh(){return fl(md).scale(109.5).parallels([30,30])}function Fs(gt,Bt){return[gt,Bt]}Fs.invert=Fs;function _u(){return Pu(Fs).scale(152.63)}function xu(gt,Bt){var wr=g(gt),vr=gt===Bt?_(gt):(wr-g(Bt))/(Bt-gt),Ur=wr/vr+gt;if(v(vr)o&&--vr>0);return[gt/(.8707+(fi=wr*wr)*(-.131979+fi*(-.013791+fi*fi*fi*(.003971-.001529*fi)))),wr]};function gc(){return Pu(Dc).scale(175.295)}function hl(gt,Bt){return[g(Bt)*_(gt),_(Bt)]}hl.invert=Pc(T);function ru(){return Pu(hl).scale(249.5).clipAngle(90+o)}function mc(gt,Bt){var wr=g(Bt),vr=1+g(gt)*wr;return[wr*_(gt)/vr,_(Bt)/vr]}mc.invert=Pc(function(gt){return 2*x(gt)});function Yc(){return Pu(mc).scale(250).clipAngle(142)}function nc(gt,Bt){return[A(p((u+Bt)/2)),-gt]}nc.invert=function(gt,Bt){return[-Bt,2*x(k(gt))-u]};function gf(){var gt=tu(nc),Bt=gt.center,wr=gt.rotate;return gt.center=function(vr){return arguments.length?Bt([-vr[1],vr[0]]):(vr=Bt(),[vr[1],-vr[0]])},gt.rotate=function(vr){return arguments.length?wr([vr[0],vr[1],vr.length>2?vr[2]+90:90]):(vr=wr(),[vr[0],vr[1],vr[2]-90])},wr([0,0,90]).scale(159.155)}e.geoAlbers=Qs,e.geoAlbersUsa=gd,e.geoArea=me,e.geoAzimuthalEqualArea=sv,e.geoAzimuthalEqualAreaRaw=vc,e.geoAzimuthalEquidistant=Uf,e.geoAzimuthalEquidistantRaw=Lf,e.geoBounds=Ne,e.geoCentroid=yr,e.geoCircle=jn,e.geoClipAntimeridian=Hr,e.geoClipCircle=an,e.geoClipExtent=Sa,e.geoClipRectangle=Fn,e.geoConicConformal=sh,e.geoConicConformalRaw=md,e.geoConicEqualArea=yu,e.geoConicEqualAreaRaw=ic,e.geoConicEquidistant=Lh,e.geoConicEquidistantRaw=xu,e.geoContains=ms,e.geoDistance=Cs,e.geoEqualEarth=Ph,e.geoEqualEarthRaw=pf,e.geoEquirectangular=_u,e.geoEquirectangularRaw=Fs,e.geoGnomonic=Ih,e.geoGnomonicRaw=Dl,e.geoGraticule=Qu,e.geoGraticule10=Il,e.geoIdentity=Zu,e.geoInterpolate=vo,e.geoLength=wl,e.geoMercator=oh,e.geoMercatorRaw=Iu,e.geoNaturalEarth1=gc,e.geoNaturalEarth1Raw=Dc,e.geoOrthographic=ru,e.geoOrthographicRaw=hl,e.geoPath=kh,e.geoProjection=Pu,e.geoProjectionMutator=Lc,e.geoRotation=Gi,e.geoStereographic=Yc,e.geoStereographicRaw=mc,e.geoStream=W,e.geoTransform=Kh,e.geoTransverseMercator=gf,e.geoTransverseMercatorRaw=nc,Object.defineProperty(e,"__esModule",{value:!0})})});var bDe=ye((Az,xDe)=>{(function(e,t){typeof Az=="object"&&typeof xDe!="undefined"?t(Az,xX(),JE()):typeof define=="function"&&define.amd?define(["exports","d3-geo","d3-array"],t):t(e.d3=e.d3||{},e.d3,e.d3)})(Az,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(he){return he>0?1:he<0?-1:0},x=Math.sin,b=Math.tan,g=1e-6,E=1e-12,k=Math.PI,A=k/2,L=k/4,_=Math.SQRT1_2,C=H(2),M=H(k),p=k*2,P=180/k,T=k/180;function F(he){return he?he/Math.sin(he):1}function q(he){return he>1?A:he<-1?-A:Math.asin(he)}function V(he){return he>1?0:he<-1?k:Math.acos(he)}function H(he){return he>0?Math.sqrt(he):0}function X(he){return he=s(2*he),(he-1)/(he+1)}function G(he){return(s(he)-s(-he))/2}function N(he){return(s(he)+s(-he))/2}function W(he){return u(he+H(he*he+1))}function re(he){return u(he+H(he*he-1))}function ae(he){var be=b(he/2),Pe=2*u(o(he/2))/(be*be);function Oe(Je,He){var et=o(Je),Mt=o(He),Rt=x(He),Ut=Mt*et,tr=-((1-Ut?u((1+Ut)/2)/(1-Ut):-.5)+Pe/(1+Ut));return[tr*Mt*x(Je),tr*Rt]}return Oe.invert=function(Je,He){var et=H(Je*Je+He*He),Mt=-he/2,Rt=50,Ut;if(!et)return[0,0];do{var tr=Mt/2,mr=o(tr),Dr=x(tr),zr=Dr/mr,Xr=-u(n(mr));Mt-=Ut=(2/zr*Xr-Pe*zr-et)/(-Xr/(Dr*Dr)+1-Pe/(2*mr*mr))*(mr<0?.7:1)}while(n(Ut)>g&&--Rt>0);var di=x(Mt);return[a(Je*di,et*o(Mt)),q(He*di/et)]},Oe}function _e(){var he=A,be=t.geoProjectionMutator(ae),Pe=be(he);return Pe.radius=function(Oe){return arguments.length?be(he=Oe*T):he*P},Pe.scale(179.976).clipAngle(147)}function Me(he,be){var Pe=o(be),Oe=F(V(Pe*o(he/=2)));return[2*Pe*x(he)*Oe,x(be)*Oe]}Me.invert=function(he,be){if(!(he*he+4*be*be>k*k+g)){var Pe=he,Oe=be,Je=25;do{var He=x(Pe),et=x(Pe/2),Mt=o(Pe/2),Rt=x(Oe),Ut=o(Oe),tr=x(2*Oe),mr=Rt*Rt,Dr=Ut*Ut,zr=et*et,Xr=1-Dr*Mt*Mt,di=Xr?V(Ut*Mt)*H(Li=1/Xr):Li=0,Li,Ci=2*di*Ut*et-he,Qi=di*Rt-be,Mn=Li*(Dr*zr+di*Ut*Mt*mr),pa=Li*(.5*He*tr-di*2*Rt*et),ea=Li*.25*(tr*et-di*Rt*Dr*He),Ga=Li*(mr*Mt+di*zr*Ut),To=pa*ea-Ga*Mn;if(!To)break;var Wa=(Qi*pa-Ci*Ga)/To,co=(Ci*ea-Qi*Mn)/To;Pe-=Wa,Oe-=co}while((n(Wa)>g||n(co)>g)&&--Je>0);return[Pe,Oe]}};function ke(){return t.geoProjection(Me).scale(152.63)}function ge(he){var be=x(he),Pe=o(he),Oe=he>=0?1:-1,Je=b(Oe*he),He=(1+be-Pe)/2;function et(Mt,Rt){var Ut=o(Rt),tr=o(Mt/=2);return[(1+Ut)*x(Mt),(Oe*Rt>-a(tr,Je)-.001?0:-Oe*10)+He+x(Rt)*Pe-(1+Ut)*be*tr]}return et.invert=function(Mt,Rt){var Ut=0,tr=0,mr=50;do{var Dr=o(Ut),zr=x(Ut),Xr=o(tr),di=x(tr),Li=1+Xr,Ci=Li*zr-Mt,Qi=He+di*Pe-Li*be*Dr-Rt,Mn=Li*Dr/2,pa=-zr*di,ea=be*Li*zr/2,Ga=Pe*Xr+be*Dr*di,To=pa*ea-Ga*Mn,Wa=(Qi*pa-Ci*Ga)/To/2,co=(Ci*ea-Qi*Mn)/To;n(co)>2&&(co/=2),Ut-=Wa,tr-=co}while((n(Wa)>g||n(co)>g)&&--mr>0);return Oe*tr>-a(o(Ut),Je)-.001?[Ut*2,tr]:null},et}function ie(){var he=20*T,be=he>=0?1:-1,Pe=b(be*he),Oe=t.geoProjectionMutator(ge),Je=Oe(he),He=Je.stream;return Je.parallel=function(et){return arguments.length?(Pe=b((be=(he=et*T)>=0?1:-1)*he),Oe(he)):he*P},Je.stream=function(et){var Mt=Je.rotate(),Rt=He(et),Ut=(Je.rotate([0,0]),He(et)),tr=Je.precision();return Je.rotate(Mt),Rt.sphere=function(){Ut.polygonStart(),Ut.lineStart();for(var mr=be*-180;be*mr<180;mr+=be*90)Ut.point(mr,be*90);if(he)for(;be*(mr-=3*be*tr)>=-180;)Ut.point(mr,be*-a(o(mr*T/2),Pe)*P);Ut.lineEnd(),Ut.polygonEnd()},Rt},Je.scale(218.695).center([0,28.0974])}function Te(he,be){var Pe=b(be/2),Oe=H(1-Pe*Pe),Je=1+Oe*o(he/=2),He=x(he)*Oe/Je,et=Pe/Je,Mt=He*He,Rt=et*et;return[4/3*He*(3+Mt-3*Rt),4/3*et*(3+3*Mt-Rt)]}Te.invert=function(he,be){if(he*=3/8,be*=3/8,!he&&n(be)>1)return null;var Pe=he*he,Oe=be*be,Je=1+Pe+Oe,He=H((Je-H(Je*Je-4*be*be))/2),et=q(He)/3,Mt=He?re(n(be/He))/3:W(n(he))/3,Rt=o(et),Ut=N(Mt),tr=Ut*Ut-Rt*Rt;return[v(he)*2*a(G(Mt)*Rt,.25-tr),v(be)*2*a(Ut*x(et),.25+tr)]};function Ee(){return t.geoProjection(Te).scale(66.1603)}var Ae=H(8),ze=u(1+C);function Ce(he,be){var Pe=n(be);return PeE&&--Oe>0);return[he/(o(Pe)*(Ae-1/x(Pe))),v(be)*Pe]};function me(){return t.geoProjection(Ce).scale(112.314)}function De(he){var be=2*k/he;function Pe(Oe,Je){var He=t.geoAzimuthalEquidistantRaw(Oe,Je);if(n(Oe)>A){var et=a(He[1],He[0]),Mt=H(He[0]*He[0]+He[1]*He[1]),Rt=be*d((et-A)/be)+A,Ut=a(x(et-=Rt),2-o(et));et=Rt+q(k/Mt*x(Ut))-Ut,He[0]=Mt*o(et),He[1]=Mt*x(et)}return He}return Pe.invert=function(Oe,Je){var He=H(Oe*Oe+Je*Je);if(He>A){var et=a(Je,Oe),Mt=be*d((et-A)/be)+A,Rt=et>Mt?-1:1,Ut=He*o(Mt-et),tr=1/b(Rt*V((Ut-k)/H(k*(k-2*Ut)+He*He)));et=Mt+2*i((tr+Rt*H(tr*tr-3))/3),Oe=He*o(et),Je=He*x(et)}return t.geoAzimuthalEquidistantRaw.invert(Oe,Je)},Pe}function ce(){var he=5,be=t.geoProjectionMutator(De),Pe=be(he),Oe=Pe.stream,Je=.01,He=-o(Je*T),et=x(Je*T);return Pe.lobes=function(Mt){return arguments.length?be(he=+Mt):he},Pe.stream=function(Mt){var Rt=Pe.rotate(),Ut=Oe(Mt),tr=(Pe.rotate([0,0]),Oe(Mt));return Pe.rotate(Rt),Ut.sphere=function(){tr.polygonStart(),tr.lineStart();for(var mr=0,Dr=360/he,zr=2*k/he,Xr=90-180/he,di=A;mr0&&n(Je)>g);return Oe<0?NaN:Pe}function rt(he,be,Pe){return be===void 0&&(be=40),Pe===void 0&&(Pe=E),function(Oe,Je,He,et){var Mt,Rt,Ut;He=He===void 0?0:+He,et=et===void 0?0:+et;for(var tr=0;trMt){He-=Rt/=2,et-=Ut/=2;continue}Mt=Xr;var di=(He>0?-1:1)*Pe,Li=(et>0?-1:1)*Pe,Ci=he(He+di,et),Qi=he(He,et+Li),Mn=(Ci[0]-mr[0])/di,pa=(Ci[1]-mr[1])/di,ea=(Qi[0]-mr[0])/Li,Ga=(Qi[1]-mr[1])/Li,To=Ga*Mn-pa*ea,Wa=(n(To)<.5?.5:1)/To;if(Rt=(zr*ea-Dr*Ga)*Wa,Ut=(Dr*pa-zr*Mn)*Wa,He+=Rt,et+=Ut,n(Rt)0&&(Mt[1]*=1+Rt/1.5*Mt[0]*Mt[0]),Mt}return Oe.invert=rt(Oe),Oe}function Dt(){return t.geoProjection(ot()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function kt(he,be){var Pe=he*x(be),Oe=30,Je;do be-=Je=(be+x(be)-Pe)/(1+o(be));while(n(Je)>g&&--Oe>0);return be/2}function Ct(he,be,Pe){function Oe(Je,He){return[he*Je*o(He=kt(Pe,He)),be*x(He)]}return Oe.invert=function(Je,He){return He=q(He/be),[Je/(he*o(He)),q((2*He+x(2*He))/Pe)]},Oe}var Yt=Ct(C/A,C,k);function xr(){return t.geoProjection(Yt).scale(169.529)}var er=2.00276,Ke=1.11072;function xt(he,be){var Pe=kt(k,be);return[er*he/(1/o(be)+Ke/o(Pe)),(be+C*x(Pe))/er]}xt.invert=function(he,be){var Pe=er*be,Oe=be<0?-L:L,Je=25,He,et;do et=Pe-C*x(Oe),Oe-=He=(x(2*Oe)+2*Oe-k*x(et))/(2*o(2*Oe)+2+k*o(et)*C*o(Oe));while(n(He)>g&&--Je>0);return et=Pe-C*x(Oe),[he*(1/o(et)+Ke/o(Oe))/er,et]};function bt(){return t.geoProjection(xt).scale(160.857)}function Lt(he){var be=0,Pe=t.geoProjectionMutator(he),Oe=Pe(be);return Oe.parallel=function(Je){return arguments.length?Pe(be=Je*T):be*P},Oe}function St(he,be){return[he*o(be),be]}St.invert=function(he,be){return[he/o(be),be]};function Et(){return t.geoProjection(St).scale(152.63)}function dt(he){if(!he)return St;var be=1/b(he);function Pe(Oe,Je){var He=be+he-Je,et=He&&Oe*o(Je)/He;return[He*x(et),be-He*o(et)]}return Pe.invert=function(Oe,Je){var He=H(Oe*Oe+(Je=be-Je)*Je),et=be+he-He;return[He/o(et)*a(Oe,Je),et]},Pe}function Ht(){return Lt(dt).scale(123.082).center([0,26.1441]).parallel(45)}function $t(he){function be(Pe,Oe){var Je=A-Oe,He=Je&&Pe*he*x(Je)/Je;return[Je*x(He)/he,A-Je*o(He)]}return be.invert=function(Pe,Oe){var Je=Pe*he,He=A-Oe,et=H(Je*Je+He*He),Mt=a(Je,He);return[(et?et/x(et):1)*Mt/he,A-et]},be}function fr(){var he=.5,be=t.geoProjectionMutator($t),Pe=be(he);return Pe.fraction=function(Oe){return arguments.length?be(he=+Oe):he},Pe.scale(158.837)}var _r=Ct(1,4/k,k);function Br(){return t.geoProjection(_r).scale(152.63)}function Or(he,be,Pe,Oe,Je,He){var et=o(He),Mt;if(n(he)>1||n(He)>1)Mt=V(Pe*Je+be*Oe*et);else{var Rt=x(he/2),Ut=x(He/2);Mt=2*q(H(Rt*Rt+be*Oe*Ut*Ut))}return n(Mt)>g?[Mt,a(Oe*x(He),be*Je-Pe*Oe*et)]:[0,0]}function Nr(he,be,Pe){return V((he*he+be*be-Pe*Pe)/(2*he*be))}function ut(he){return he-2*k*l((he+k)/(2*k))}function Ne(he,be,Pe){for(var Oe=[[he[0],he[1],x(he[1]),o(he[1])],[be[0],be[1],x(be[1]),o(be[1])],[Pe[0],Pe[1],x(Pe[1]),o(Pe[1])]],Je=Oe[2],He,et=0;et<3;++et,Je=He)He=Oe[et],Je.v=Or(He[1]-Je[1],Je[3],Je[2],He[3],He[2],He[0]-Je[0]),Je.point=[0,0];var Mt=Nr(Oe[0].v[0],Oe[2].v[0],Oe[1].v[0]),Rt=Nr(Oe[0].v[0],Oe[1].v[0],Oe[2].v[0]),Ut=k-Mt;Oe[2].point[1]=0,Oe[0].point[0]=-(Oe[1].point[0]=Oe[0].v[0]/2);var tr=[Oe[2].point[0]=Oe[0].point[0]+Oe[2].v[0]*o(Mt),2*(Oe[0].point[1]=Oe[1].point[1]=Oe[2].v[0]*x(Mt))];function mr(Dr,zr){var Xr=x(zr),di=o(zr),Li=new Array(3),Ci;for(Ci=0;Ci<3;++Ci){var Qi=Oe[Ci];if(Li[Ci]=Or(zr-Qi[1],Qi[3],Qi[2],di,Xr,Dr-Qi[0]),!Li[Ci][0])return Qi.point;Li[Ci][1]=ut(Li[Ci][1]-Qi.v[1])}var Mn=tr.slice();for(Ci=0;Ci<3;++Ci){var pa=Ci==2?0:Ci+1,ea=Nr(Oe[Ci].v[0],Li[Ci][0],Li[pa][0]);Li[Ci][1]<0&&(ea=-ea),Ci?Ci==1?(ea=Rt-ea,Mn[0]-=Li[Ci][0]*o(ea),Mn[1]-=Li[Ci][0]*x(ea)):(ea=Ut-ea,Mn[0]+=Li[Ci][0]*o(ea),Mn[1]+=Li[Ci][0]*x(ea)):(Mn[0]+=Li[Ci][0]*o(ea),Mn[1]-=Li[Ci][0]*x(ea))}return Mn[0]/=3,Mn[1]/=3,Mn}return mr}function Ye(he){return he[0]*=T,he[1]*=T,he}function Ve(){return Xe([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Xe(he,be,Pe){var Oe=t.geoCentroid({type:"MultiPoint",coordinates:[he,be,Pe]}),Je=[-Oe[0],-Oe[1]],He=t.geoRotation(Je),et=Ne(Ye(He(he)),Ye(He(be)),Ye(He(Pe)));et.invert=rt(et);var Mt=t.geoProjection(et).rotate(Je),Rt=Mt.center;return delete Mt.rotate,Mt.center=function(Ut){return arguments.length?Rt(He(Ut)):He.invert(Rt())},Mt.clipAngle(90)}function ht(he,be){var Pe=H(1-x(be));return[2/M*he*Pe,M*(1-Pe)]}ht.invert=function(he,be){var Pe=(Pe=be/M-1)*Pe;return[Pe>0?he*H(k/Pe)/2:0,q(1-Pe)]};function Le(){return t.geoProjection(ht).scale(95.6464).center([0,30])}function xe(he){var be=b(he);function Pe(Oe,Je){return[Oe,(Oe?Oe/x(Oe):1)*(x(Je)*o(Oe)-be*o(Je))]}return Pe.invert=be?function(Oe,Je){Oe&&(Je*=x(Oe)/Oe);var He=o(Oe);return[Oe,2*a(H(He*He+be*be-Je*Je)-He,be-Je)]}:function(Oe,Je){return[Oe,q(Oe?Je*b(Oe)/Oe:Je)]},Pe}function Se(){return Lt(xe).scale(249.828).clipAngle(90)}var lt=H(3);function Gt(he,be){return[lt*he*(2*o(2*be/3)-1)/M,lt*M*x(be/3)]}Gt.invert=function(he,be){var Pe=3*q(be/(lt*M));return[M*he/(lt*(2*o(2*Pe/3)-1)),Pe]};function Vt(){return t.geoProjection(Gt).scale(156.19)}function ar(he){var be=o(he);function Pe(Oe,Je){return[Oe*be,x(Je)/be]}return Pe.invert=function(Oe,Je){return[Oe/be,q(Je*be)]},Pe}function Qr(){return Lt(ar).parallel(38.58).scale(195.044)}function ai(he){var be=o(he);function Pe(Oe,Je){return[Oe*be,(1+be)*b(Je/2)]}return Pe.invert=function(Oe,Je){return[Oe/be,i(Je/(1+be))*2]},Pe}function jr(){return Lt(ai).scale(124.75)}function ri(he,be){var Pe=H(8/(3*k));return[Pe*he*(1-n(be)/k),Pe*be]}ri.invert=function(he,be){var Pe=H(8/(3*k)),Oe=be/Pe;return[he/(Pe*(1-n(Oe)/k)),Oe]};function bi(){return t.geoProjection(ri).scale(165.664)}function nn(he,be){var Pe=H(4-3*x(n(be)));return[2/H(6*k)*he*Pe,v(be)*H(2*k/3)*(2-Pe)]}nn.invert=function(he,be){var Pe=2-n(be)/H(2*k/3);return[he*H(6*k)/(2*Pe),v(be)*q((4-Pe*Pe)/3)]};function Wi(){return t.geoProjection(nn).scale(165.664)}function Ni(he,be){var Pe=H(k*(4+k));return[2/Pe*he*(1+H(1-4*be*be/(k*k))),4/Pe*be]}Ni.invert=function(he,be){var Pe=H(k*(4+k))/2;return[he*Pe/(1+H(1-be*be*(4+k)/(4*k))),be*Pe/2]};function _n(){return t.geoProjection(Ni).scale(180.739)}function $i(he,be){var Pe=(2+A)*x(be);be/=2;for(var Oe=0,Je=1/0;Oe<10&&n(Je)>g;Oe++){var He=o(be);be-=Je=(be+x(be)*(He+2)-Pe)/(2*He*(1+He))}return[2/H(k*(4+k))*he*(1+o(be)),2*H(k/(4+k))*x(be)]}$i.invert=function(he,be){var Pe=be*H((4+k)/k)/2,Oe=q(Pe),Je=o(Oe);return[he/(2/H(k*(4+k))*(1+Je)),q((Oe+Pe*(Je+2))/(2+A))]};function zn(){return t.geoProjection($i).scale(180.739)}function Wn(he,be){return[he*(1+o(be))/H(2+k),2*be/H(2+k)]}Wn.invert=function(he,be){var Pe=H(2+k),Oe=be*Pe/2;return[Pe*he/(1+o(Oe)),Oe]};function It(){return t.geoProjection(Wn).scale(173.044)}function ft(he,be){for(var Pe=(1+A)*x(be),Oe=0,Je=1/0;Oe<10&&n(Je)>g;Oe++)be-=Je=(be+x(be)-Pe)/(1+o(be));return Pe=H(2+k),[he*(1+o(be))/Pe,2*be/Pe]}ft.invert=function(he,be){var Pe=1+A,Oe=H(Pe/2);return[he*2*Oe/(1+o(be*=Oe)),q((be+x(be))/Pe)]};function jt(){return t.geoProjection(ft).scale(173.044)}var Zt=3+2*C;function yr(he,be){var Pe=x(he/=2),Oe=o(he),Je=H(o(be)),He=o(be/=2),et=x(be)/(He+C*Oe*Je),Mt=H(2/(1+et*et)),Rt=H((C*He+(Oe+Pe)*Je)/(C*He+(Oe-Pe)*Je));return[Zt*(Mt*(Rt-1/Rt)-2*u(Rt)),Zt*(Mt*et*(Rt+1/Rt)-2*i(et))]}yr.invert=function(he,be){if(!(He=Te.invert(he/1.2,be*1.065)))return null;var Pe=He[0],Oe=He[1],Je=20,He;he/=Zt,be/=Zt;do{var et=Pe/2,Mt=Oe/2,Rt=x(et),Ut=o(et),tr=x(Mt),mr=o(Mt),Dr=o(Oe),zr=H(Dr),Xr=tr/(mr+C*Ut*zr),di=Xr*Xr,Li=H(2/(1+di)),Ci=C*mr+(Ut+Rt)*zr,Qi=C*mr+(Ut-Rt)*zr,Mn=Ci/Qi,pa=H(Mn),ea=pa-1/pa,Ga=pa+1/pa,To=Li*ea-2*u(pa)-he,Wa=Li*Xr*Ga-2*i(Xr)-be,co=tr&&_*zr*Rt*di/tr,Do=(C*Ut*mr+zr)/(2*(mr+C*Ut*zr)*(mr+C*Ut*zr)*zr),Rs=-.5*Xr*Li*Li*Li,As=Rs*co,yo=Rs*Do,po=(po=2*mr+C*zr*(Ut-Rt))*po*pa,_l=(C*Ut*mr*zr+Dr)/po,Vl=-(C*Rt*tr)/(zr*po),Xu=ea*As-2*_l/pa+Li*(_l+_l/Mn),cu=ea*yo-2*Vl/pa+Li*(Vl+Vl/Mn),el=Xr*Ga*As-2*co/(1+di)+Li*Ga*co+Li*Xr*(_l-_l/Mn),nu=Xr*Ga*yo-2*Do/(1+di)+Li*Ga*Do+Li*Xr*(Vl-Vl/Mn),zc=cu*el-nu*Xu;if(!zc)break;var Rl=(Wa*cu-To*nu)/zc,zl=(To*el-Wa*Xu)/zc;Pe-=Rl,Oe=c(-A,f(A,Oe-zl))}while((n(Rl)>g||n(zl)>g)&&--Je>0);return n(n(Oe)-A)Oe){var mr=H(tr),Dr=a(Ut,Rt),zr=Pe*d(Dr/Pe),Xr=Dr-zr,di=he*o(Xr),Li=(he*x(Xr)-Xr*x(di))/(A-di),Ci=Fa(Xr,Li),Qi=(k-he)/Da(Ci,di,k);Rt=mr;var Mn=50,pa;do Rt-=pa=(he+Da(Ci,di,Rt)*Qi-mr)/(Ci(Rt)*Qi);while(n(pa)>g&&--Mn>0);Ut=Xr*x(Rt),RtOe){var Rt=H(Mt),Ut=a(et,He),tr=Pe*d(Ut/Pe),mr=Ut-tr;He=Rt*o(mr),et=Rt*x(mr);for(var Dr=He-A,zr=x(He),Xr=et/zr,di=Heg||n(Xr)>g)&&--di>0);return[mr,Dr]},Rt}var Sn=oa(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(Sn).scale(149.995)}var oo=oa(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function xn(){return t.geoProjection(oo).scale(153.93)}var _t=oa(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function br(){return t.geoProjection(_t).scale(130.945)}function Hr(he,be){var Pe=he*he,Oe=be*be;return[he*(1-.162388*Oe)*(.87-952426e-9*Pe*Pe),be*(1+Oe/12)]}Hr.invert=function(he,be){var Pe=he,Oe=be,Je=50,He;do{var et=Oe*Oe;Oe-=He=(Oe*(1+et/12)-be)/(1+et/4)}while(n(He)>g&&--Je>0);Je=50,he/=1-.162388*et;do{var Mt=(Mt=Pe*Pe)*Mt;Pe-=He=(Pe*(.87-952426e-9*Mt)-he)/(.87-.00476213*Mt)}while(n(He)>g&&--Je>0);return[Pe,Oe]};function ti(){return t.geoProjection(Hr).scale(131.747)}var zi=oa(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Yi(){return t.geoProjection(zi).scale(131.087)}function an(he){var be=he(A,0)[0]-he(-A,0)[0];function Pe(Oe,Je){var He=Oe>0?-.5:.5,et=he(Oe+He*k,Je);return et[0]-=He*be,et}return he.invert&&(Pe.invert=function(Oe,Je){var He=Oe>0?-.5:.5,et=he.invert(Oe+He*be,Je),Mt=et[0]-He*k;return Mt<-k?Mt+=2*k:Mt>k&&(Mt-=2*k),et[0]=Mt,et}),Pe}function hi(he,be){var Pe=v(he),Oe=v(be),Je=o(be),He=o(he)*Je,et=x(he)*Je,Mt=x(Oe*be);he=n(a(et,Mt)),be=q(He),n(he-A)>g&&(he%=A);var Rt=Ji(he>k/4?A-he:he,be);return he>k/4&&(Mt=Rt[0],Rt[0]=-Rt[1],Rt[1]=-Mt),Rt[0]*=Pe,Rt[1]*=-Oe,Rt}hi.invert=function(he,be){n(he)>1&&(he=v(he)*2-he),n(be)>1&&(be=v(be)*2-be);var Pe=v(he),Oe=v(be),Je=-Pe*he,He=-Oe*be,et=He/Je<1,Mt=ua(et?He:Je,et?Je:He),Rt=Mt[0],Ut=Mt[1],tr=o(Ut);return et&&(Rt=-A-Rt),[Pe*(a(x(Rt)*tr,-x(Ut))+k),Oe*q(o(Rt)*tr)]};function Ji(he,be){if(be===A)return[0,0];var Pe=x(be),Oe=Pe*Pe,Je=Oe*Oe,He=1+Je,et=1+3*Je,Mt=1-Je,Rt=q(1/H(He)),Ut=Mt+Oe*He*Rt,tr=(1-Pe)/Ut,mr=H(tr),Dr=tr*He,zr=H(Dr),Xr=mr*Mt,di,Li;if(he===0)return[0,-(Xr+Oe*zr)];var Ci=o(be),Qi=1/Ci,Mn=2*Pe*Ci,pa=(-3*Oe+Rt*et)*Mn,ea=(-Ut*Ci-(1-Pe)*pa)/(Ut*Ut),Ga=.5*ea/mr,To=Mt*Ga-2*Oe*mr*Mn,Wa=Oe*He*ea+tr*et*Mn,co=-Qi*Mn,Do=-Qi*Wa,Rs=-2*Qi*To,As=4*he/k,yo;if(he>.222*k||be.175*k){if(di=(Xr+Oe*H(Dr*(1+Je)-Xr*Xr))/(1+Je),he>k/4)return[di,di];var po=di,_l=.5*di;di=.5*(_l+po),Li=50;do{var Vl=H(Dr-di*di),Xu=di*(Rs+co*Vl)+Do*q(di/zr)-As;if(!Xu)break;Xu<0?_l=di:po=di,di=.5*(_l+po)}while(n(po-_l)>g&&--Li>0)}else{di=g,Li=25;do{var cu=di*di,el=H(Dr-cu),nu=Rs+co*el,zc=di*nu+Do*q(di/zr)-As,Rl=nu+(Do-co*cu)/el;di-=yo=el?zc/Rl:0}while(n(yo)>g&&--Li>0)}return[di,-Xr-Oe*H(Dr-di*di)]}function ua(he,be){for(var Pe=0,Oe=1,Je=.5,He=50;;){var et=Je*Je,Mt=H(Je),Rt=q(1/H(1+et)),Ut=1-et+Je*(1+et)*Rt,tr=(1-Mt)/Ut,mr=H(tr),Dr=tr*(1+et),zr=mr*(1-et),Xr=Dr-he*he,di=H(Xr),Li=be+zr+Je*di;if(n(Oe-Pe)0?Pe=Je:Oe=Je,Je=.5*(Pe+Oe)}if(!He)return null;var Ci=q(Mt),Qi=o(Ci),Mn=1/Qi,pa=2*Mt*Qi,ea=(-3*Je+Rt*(1+3*et))*pa,Ga=(-Ut*Qi-(1-Mt)*ea)/(Ut*Ut),To=.5*Ga/mr,Wa=(1-et)*To-2*Je*mr*pa,co=-2*Mn*Wa,Do=-Mn*pa,Rs=-Mn*(Je*(1+et)*Ga+tr*(1+3*et)*pa);return[k/4*(he*(co+Do*di)+Rs*q(he/H(Dr))),Ci]}function Fn(){return t.geoProjection(an(hi)).scale(239.75)}function Sa(he,be,Pe){var Oe,Je,He;return he?(Oe=go(he,Pe),be?(Je=go(be,1-Pe),He=Je[1]*Je[1]+Pe*Oe[0]*Oe[0]*Je[0]*Je[0],[[Oe[0]*Je[2]/He,Oe[1]*Oe[2]*Je[0]*Je[1]/He],[Oe[1]*Je[1]/He,-Oe[0]*Oe[2]*Je[0]*Je[2]/He],[Oe[2]*Je[1]*Je[2]/He,-Pe*Oe[0]*Oe[1]*Je[0]/He]]):[[Oe[0],0],[Oe[1],0],[Oe[2],0]]):(Je=go(be,1-Pe),[[0,Je[0]/Je[1]],[1/Je[1],0],[Je[2]/Je[1],0]])}function go(he,be){var Pe,Oe,Je,He,et;if(be=1-g)return Pe=(1-be)/4,Oe=N(he),He=X(he),Je=1/Oe,et=Oe*G(he),[He+Pe*(et-he)/(Oe*Oe),Je-Pe*He*Je*(et-he),Je+Pe*He*Je*(et+he),2*i(s(he))-A+Pe*(et-he)/Oe];var Mt=[1,0,0,0,0,0,0,0,0],Rt=[H(be),0,0,0,0,0,0,0,0],Ut=0;for(Oe=H(1-be),et=1;n(Rt[Ut]/Mt[Ut])>g&&Ut<8;)Pe=Mt[Ut++],Rt[Ut]=(Pe-Oe)/2,Mt[Ut]=(Pe+Oe)/2,Oe=H(Pe*Oe),et*=2;Je=et*Mt[Ut]*he;do He=Rt[Ut]*x(Oe=Je)/Mt[Ut],Je=(q(He)+Je)/2;while(--Ut);return[x(Je),He=o(Je),He/o(Je-Oe),Je]}function Oo(he,be,Pe){var Oe=n(he),Je=n(be),He=G(Je);if(Oe){var et=1/x(Oe),Mt=1/(b(Oe)*b(Oe)),Rt=-(Mt+Pe*(He*He*et*et)-1+Pe),Ut=(Pe-1)*Mt,tr=(-Rt+H(Rt*Rt-4*Ut))/2;return[ho(i(1/H(tr)),Pe)*v(he),ho(i(H((tr/Mt-1)/Pe)),1-Pe)*v(be)]}return[0,ho(i(He),1-Pe)*v(be)]}function ho(he,be){if(!be)return he;if(be===1)return u(b(he/2+L));for(var Pe=1,Oe=H(1-be),Je=H(be),He=0;n(Je)>g;He++){if(he%k){var et=i(Oe*b(he)/Pe);et<0&&(et+=k),he+=et+~~(he/k)*k}else he+=he;Je=(Pe+Oe)/2,Oe=H(Pe*Oe),Je=((Pe=Je)-Oe)/2}return he/(h(2,He)*Pe)}function Mo(he,be){var Pe=(C-1)/(C+1),Oe=H(1-Pe*Pe),Je=ho(A,Oe*Oe),He=-1,et=u(b(k/4+n(be)/2)),Mt=s(He*et)/H(Pe),Rt=xo(Mt*o(He*he),Mt*x(He*he)),Ut=Oo(Rt[0],Rt[1],Oe*Oe);return[-Ut[1],(be>=0?1:-1)*(.5*Je-Ut[0])]}function xo(he,be){var Pe=he*he,Oe=be+1,Je=1-Pe-be*be;return[.5*((he>=0?A:-A)-a(Je,2*he)),-.25*u(Je*Je+4*Pe)+.5*u(Oe*Oe+Pe)]}function zs(he,be){var Pe=be[0]*be[0]+be[1]*be[1];return[(he[0]*be[0]+he[1]*be[1])/Pe,(he[1]*be[0]-he[0]*be[1])/Pe]}Mo.invert=function(he,be){var Pe=(C-1)/(C+1),Oe=H(1-Pe*Pe),Je=ho(A,Oe*Oe),He=-1,et=Sa(.5*Je-be,-he,Oe*Oe),Mt=zs(et[0],et[1]),Rt=a(Mt[1],Mt[0])/He;return[Rt,2*i(s(.5/He*u(Pe*Mt[0]*Mt[0]+Pe*Mt[1]*Mt[1])))-A]};function ks(){return t.geoProjection(an(Mo)).scale(151.496)}function Zs(he){var be=x(he),Pe=o(he),Oe=Xs(he);Oe.invert=Xs(-he);function Je(He,et){var Mt=Oe(He,et);He=Mt[0],et=Mt[1];var Rt=x(et),Ut=o(et),tr=o(He),mr=V(be*Rt+Pe*Ut*tr),Dr=x(mr),zr=n(Dr)>g?mr/Dr:1;return[zr*Pe*x(He),(n(He)>A?zr:-zr)*(be*Ut-Pe*Rt*tr)]}return Je.invert=function(He,et){var Mt=H(He*He+et*et),Rt=-x(Mt),Ut=o(Mt),tr=Mt*Ut,mr=-et*Rt,Dr=Mt*be,zr=H(tr*tr+mr*mr-Dr*Dr),Xr=a(tr*Dr+mr*zr,mr*Dr-tr*zr),di=(Mt>A?-1:1)*a(He*Rt,Mt*o(Xr)*Ut+et*x(Xr)*Rt);return Oe.invert(di,Xr)},Je}function Xs(he){var be=x(he),Pe=o(he);return function(Oe,Je){var He=o(Je),et=o(Oe)*He,Mt=x(Oe)*He,Rt=x(Je);return[a(Mt,et*Pe-Rt*be),q(Rt*Pe+et*be)]}}function wl(){var he=0,be=t.geoProjectionMutator(Zs),Pe=be(he),Oe=Pe.rotate,Je=Pe.stream,He=t.geoCircle();return Pe.parallel=function(et){if(!arguments.length)return he*P;var Mt=Pe.rotate();return be(he=et*T).rotate(Mt)},Pe.rotate=function(et){return arguments.length?(Oe.call(Pe,[et[0],et[1]-he*P]),He.center([-et[0],-et[1]]),Pe):(et=Oe.call(Pe),et[1]+=he*P,et)},Pe.stream=function(et){return et=Je(et),et.sphere=function(){et.polygonStart();var Mt=.01,Rt=He.radius(90-Mt)().coordinates[0],Ut=Rt.length-1,tr=-1,mr;for(et.lineStart();++tr=0;)et.point((mr=Rt[tr])[0],mr[1]);et.lineEnd(),et.polygonEnd()},et},Pe.scale(79.4187).parallel(45).clipAngle(180-.001)}var os=3,cl=q(1-1/os)*P,Cs=ar(0);function ml(he){var be=cl*T,Pe=ht(k,be)[0]-ht(-k,be)[0],Oe=Cs(0,be)[1],Je=ht(0,be)[1],He=M-Je,et=p/he,Mt=4/p,Rt=Oe+He*He*4/p;function Ut(tr,mr){var Dr,zr=n(mr);if(zr>be){var Xr=f(he-1,c(0,l((tr+k)/et)));tr+=k*(he-1)/he-Xr*et,Dr=ht(tr,zr),Dr[0]=Dr[0]*p/Pe-p*(he-1)/(2*he)+Xr*p/he,Dr[1]=Oe+(Dr[1]-Je)*4*He/p,mr<0&&(Dr[1]=-Dr[1])}else Dr=Cs(tr,mr);return Dr[0]*=Mt,Dr[1]/=Rt,Dr}return Ut.invert=function(tr,mr){tr/=Mt,mr*=Rt;var Dr=n(mr);if(Dr>Oe){var zr=f(he-1,c(0,l((tr+k)/et)));tr=(tr+k*(he-1)/he-zr*et)*Pe/p;var Xr=ht.invert(tr,.25*(Dr-Oe)*p/He+Je);return Xr[0]-=k*(he-1)/he-zr*et,mr<0&&(Xr[1]=-Xr[1]),Xr}return Cs.invert(tr,mr)},Ut}function Ys(he,be){return[he,be&1?90-g:cl]}function Hs(he,be){return[he,be&1?-90+g:-cl]}function Eo(he){return[he[0]*(1-g),he[1]]}function fs(he){var be=[].concat(r.range(-180,180+he/2,he).map(Ys),r.range(180,-180-he/2,-he).map(Hs));return{type:"Polygon",coordinates:[he===180?be.map(Eo):be]}}function $l(){var he=4,be=t.geoProjectionMutator(ml),Pe=be(he),Oe=Pe.stream;return Pe.lobes=function(Je){return arguments.length?be(he=+Je):he},Pe.stream=function(Je){var He=Pe.rotate(),et=Oe(Je),Mt=(Pe.rotate([0,0]),Oe(Je));return Pe.rotate(He),et.sphere=function(){t.geoStream(fs(180/he),Mt)},et},Pe.scale(239.75)}function Gu(he){var be=1+he,Pe=x(1/be),Oe=q(Pe),Je=2*H(k/(He=k+4*Oe*be)),He,et=.5*Je*(be+H(he*(2+he))),Mt=he*he,Rt=be*be;function Ut(tr,mr){var Dr=1-x(mr),zr,Xr;if(Dr&&Dr<2){var di=A-mr,Li=25,Ci;do{var Qi=x(di),Mn=o(di),pa=Oe+a(Qi,be-Mn),ea=1+Rt-2*be*Mn;di-=Ci=(di-Mt*Oe-be*Qi+ea*pa-.5*Dr*He)/(2*be*Qi*pa)}while(n(Ci)>E&&--Li>0);zr=Je*H(ea),Xr=tr*pa/k}else zr=Je*(he+Dr),Xr=tr*Oe/k;return[zr*x(Xr),et-zr*o(Xr)]}return Ut.invert=function(tr,mr){var Dr=tr*tr+(mr-=et)*mr,zr=(1+Rt-Dr/(Je*Je))/(2*be),Xr=V(zr),di=x(Xr),Li=Oe+a(di,be-zr);return[q(tr/H(Dr))*k/Li,q(1-2*(Xr-Mt*Oe-be*di+(1+Rt-2*be*zr)*Li)/He)]},Ut}function fc(){var he=1,be=t.geoProjectionMutator(Gu),Pe=be(he);return Pe.ratio=function(Oe){return arguments.length?be(he=+Oe):he},Pe.scale(167.774).center([0,18.67])}var ms=.7109889596207567,on=.0528035274542;function fa(he,be){return be>-ms?(he=Yt(he,be),he[1]+=on,he):St(he,be)}fa.invert=function(he,be){return be>-ms?Yt.invert(he,be-on):St.invert(he,be)};function Qu(){return t.geoProjection(fa).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Il(he,be){return n(be)>ms?(he=Yt(he,be),he[1]-=be>0?on:-on,he):St(he,be)}Il.invert=function(he,be){return n(be)>ms?Yt.invert(he,be+(be>0?on:-on)):St.invert(he,be)};function vo(){return t.geoProjection(Il).scale(152.63)}function Wl(he,be,Pe,Oe){var Je=H(4*k/(2*Pe+(1+he-be/2)*x(2*Pe)+(he+be)/2*x(4*Pe)+be/2*x(6*Pe))),He=H(Oe*x(Pe)*H((1+he*o(2*Pe)+be*o(4*Pe))/(1+he+be))),et=Pe*Rt(1);function Mt(mr){return H(1+he*o(2*mr)+be*o(4*mr))}function Rt(mr){var Dr=mr*Pe;return(2*Dr+(1+he-be/2)*x(2*Dr)+(he+be)/2*x(4*Dr)+be/2*x(6*Dr))/Pe}function Ut(mr){return Mt(mr)*x(mr)}var tr=function(mr,Dr){var zr=Pe*qt(Rt,et*x(Dr)/Pe,Dr/k);isNaN(zr)&&(zr=Pe*v(Dr));var Xr=Je*Mt(zr);return[Xr*He*mr/k*o(zr),Xr/He*x(zr)]};return tr.invert=function(mr,Dr){var zr=qt(Ut,Dr*He/Je);return[mr*k/(o(zr)*Je*He*Mt(zr)),q(Pe*Rt(zr/Pe)/et)]},Pe===0&&(Je=H(Oe/k),tr=function(mr,Dr){return[mr*Je,x(Dr)/Je]},tr.invert=function(mr,Dr){return[mr/Je,q(Dr*Je)]}),tr}function Ks(){var he=1,be=0,Pe=45*T,Oe=2,Je=t.geoProjectionMutator(Wl),He=Je(he,be,Pe,Oe);return He.a=function(et){return arguments.length?Je(he=+et,be,Pe,Oe):he},He.b=function(et){return arguments.length?Je(he,be=+et,Pe,Oe):be},He.psiMax=function(et){return arguments.length?Je(he,be,Pe=+et*T,Oe):Pe*P},He.ratio=function(et){return arguments.length?Je(he,be,Pe,Oe=+et):Oe},He.scale(180.739)}function Zl(he,be,Pe,Oe,Je,He,et,Mt,Rt,Ut,tr){if(tr.nanEncountered)return NaN;var mr,Dr,zr,Xr,di,Li,Ci,Qi,Mn,pa;if(mr=Pe-be,Dr=he(be+mr*.25),zr=he(Pe-mr*.25),isNaN(Dr)){tr.nanEncountered=!0;return}if(isNaN(zr)){tr.nanEncountered=!0;return}return Xr=mr*(Oe+4*Dr+Je)/12,di=mr*(Je+4*zr+He)/12,Li=Xr+di,pa=(Li-et)/15,Ut>Rt?(tr.maxDepthCount++,Li+pa):Math.abs(pa)>1;do Rt[Li]>zr?di=Li:Xr=Li,Li=Xr+di>>1;while(Li>Xr);var Ci=Rt[Li+1]-Rt[Li];return Ci&&(Ci=(zr-Rt[Li+1])/Ci),(Li+1+Ci)/et}var mr=2*tr(1)/k*He/Pe,Dr=function(zr,Xr){var di=tr(n(x(Xr))),Li=Oe(di)*zr;return di/=mr,[Li,Xr>=0?di:-di]};return Dr.invert=function(zr,Xr){var di;return Xr*=mr,n(Xr)<1&&(di=v(Xr)*q(Je(n(Xr))*He)),[zr/Oe(n(Xr)),di]},Dr}function ko(){var he=0,be=2.5,Pe=1.183136,Oe=t.geoProjectionMutator(Zn),Je=Oe(he,be,Pe);return Je.alpha=function(He){return arguments.length?Oe(he=+He,be,Pe):he},Je.k=function(He){return arguments.length?Oe(he,be=+He,Pe):be},Je.gamma=function(He){return arguments.length?Oe(he,be,Pe=+He):Pe},Je.scale(152.63)}function Co(he,be){return n(he[0]-be[0])=0;--Rt)Pe=he[1][Rt],Oe=Pe[0][0],Je=Pe[0][1],He=Pe[1][1],et=Pe[2][0],Mt=Pe[2][1],be.push(Tl([[et-g,Mt-g],[et-g,He+g],[Oe+g,He+g],[Oe+g,Je-g]],30));return{type:"Polygon",coordinates:[r.merge(be)]}}function So(he,be,Pe){var Oe,Je;function He(Rt,Ut){for(var tr=Ut<0?-1:1,mr=be[+(Ut<0)],Dr=0,zr=mr.length-1;Drmr[Dr][2][0];++Dr);var Xr=he(Rt-mr[Dr][1][0],Ut);return Xr[0]+=he(mr[Dr][1][0],tr*Ut>tr*mr[Dr][0][1]?mr[Dr][0][1]:Ut)[0],Xr}Pe?He.invert=Pe(He):he.invert&&(He.invert=function(Rt,Ut){for(var tr=Je[+(Ut<0)],mr=be[+(Ut<0)],Dr=0,zr=tr.length;DrXr&&(di=zr,zr=Xr,Xr=di),[[mr,zr],[Dr,Xr]]})}),et):be.map(function(Ut){return Ut.map(function(tr){return[[tr[0][0]*P,tr[0][1]*P],[tr[1][0]*P,tr[1][1]*P],[tr[2][0]*P,tr[2][1]*P]]})})},be!=null&&et.lobes(be),et}var cf=[[[[-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 rh(){return So(xt,cf).scale(160.857)}var Al=[[[[-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 Hc(){return So(Il,Al).scale(152.63)}var Ql=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Ls(){return So(Yt,Ql).scale(169.529)}var mu=[[[[-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 kc(){return So(Yt,mu).scale(169.529).rotate([20,0])}var Of=[[[[-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 Gc(){return So(fa,Of,rt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var vd=[[[[-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 Bf(){return So(St,vd).scale(152.63).rotate([-20,0])}function ss(he,be){return[3/p*he*H(k*k/3-be*be),be]}ss.invert=function(he,be){return[p/3*he/H(k*k/3-be*be),be]};function ff(){return t.geoProjection(ss).scale(158.837)}function ih(he){function be(Pe,Oe){if(n(n(Oe)-A)2)return null;Pe/=2,Oe/=2;var He=Pe*Pe,et=Oe*Oe,Mt=2*Oe/(1+He+et);return Mt=h((1+Mt)/(1-Mt),1/he),[a(2*Pe,1-He-et)/he,q((Mt-1)/(Mt+1))]},be}function Ul(){var he=.5,be=t.geoProjectionMutator(ih),Pe=be(he);return Pe.spacing=function(Oe){return arguments.length?be(he=+Oe):he},Pe.scale(124.75)}var Js=k/C;function hc(he,be){return[he*(1+H(o(be)))/2,be/(o(be/2)*o(he/6))]}hc.invert=function(he,be){var Pe=n(he),Oe=n(be),Je=g,He=A;Oeg||n(Li)>g)&&--Je>0);return Je&&[Pe,Oe]};function $s(){return t.geoProjection(ws).scale(139.98)}function hs(he,be){return[x(he)/o(be),b(be)*o(he)]}hs.invert=function(he,be){var Pe=he*he,Oe=be*be,Je=Oe+1,He=Pe+Je,et=he?_*H((He-H(He*He-4*Pe))/Pe):1/H(Je);return[q(he*et),v(be)*V(et)]};function Ms(){return t.geoProjection(hs).scale(144.049).clipAngle(90-.001)}function dc(he){var be=o(he),Pe=b(L+he/2);function Oe(Je,He){var et=He-he,Mt=n(et)=0;)tr=he[Ut],mr=tr[0]+Mt*(zr=mr)-Rt*Dr,Dr=tr[1]+Mt*Dr+Rt*zr;return mr=Mt*(zr=mr)-Rt*Dr,Dr=Mt*Dr+Rt*zr,[mr,Dr]}return Pe.invert=function(Oe,Je){var He=20,et=Oe,Mt=Je;do{for(var Rt=be,Ut=he[Rt],tr=Ut[0],mr=Ut[1],Dr=0,zr=0,Xr;--Rt>=0;)Ut=he[Rt],Dr=tr+et*(Xr=Dr)-Mt*zr,zr=mr+et*zr+Mt*Xr,tr=Ut[0]+et*(Xr=tr)-Mt*mr,mr=Ut[1]+et*mr+Mt*Xr;Dr=tr+et*(Xr=Dr)-Mt*zr,zr=mr+et*zr+Mt*Xr,tr=et*(Xr=tr)-Mt*mr-Oe,mr=et*mr+Mt*Xr-Je;var di=Dr*Dr+zr*zr,Li,Ci;et-=Li=(tr*Dr+mr*zr)/di,Mt-=Ci=(mr*Dr-tr*zr)/di}while(n(Li)+n(Ci)>g*g&&--He>0);if(He){var Qi=H(et*et+Mt*Mt),Mn=2*i(Qi*.5),pa=x(Mn);return[a(et*pa,Qi*o(Mn)),Qi?q(Mt*pa/Qi):0]}},Pe}var wo=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Od=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],$o=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ja=[[.9245,0],[0,0],[.01943,0]],Ef=[[.721316,0],[0,0],[-.00881625,-.00617325]];function tc(){return Ml(wo,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function uu(){return Ml(Od,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mh(){return Ml($o,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function jc(){return Ml(Ja,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function kf(){return Ml(Ef,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ml(he,be){var Pe=t.geoProjection(ov(he)).rotate(be).clipAngle(90),Oe=t.geoRotation(be),Je=Pe.center;return delete Pe.rotate,Pe.center=function(He){return arguments.length?Je(Oe(He)):Oe.invert(Je())},Pe}var Yh=H(6),Eh=H(7);function nh(he,be){var Pe=q(7*x(be)/(3*Yh));return[Yh*he*(2*o(2*Pe/3)-1)/Eh,9*x(Pe/3)/Eh]}nh.invert=function(he,be){var Pe=3*q(be*Eh/9);return[he*Eh/(Yh*(2*o(2*Pe/3)-1)),q(x(Pe)*3*Yh/7)]};function hf(){return t.geoProjection(nh).scale(164.859)}function kh(he,be){for(var Pe=(1+_)*x(be),Oe=be,Je=0,He;Je<25&&(Oe-=He=(x(Oe/2)+x(Oe)-Pe)/(.5*o(Oe/2)+o(Oe)),!(n(He)E&&--Oe>0);return He=Pe*Pe,et=He*He,Mt=He*et,[he/(.84719-.13063*He+Mt*Mt*(-.04515+.05494*He-.02326*et+.00331*Mt)),Pe]};function df(){return t.geoProjection(Wc).scale(175.295)}function Cu(he,be){return[he*(1+o(be))/2,2*(be-b(be/2))]}Cu.invert=function(he,be){for(var Pe=be/2,Oe=0,Je=1/0;Oe<10&&n(Je)>g;++Oe){var He=o(be/2);be-=Je=(be-b(be/2)-Pe)/(1-.5/(He*He))}return[2*he/(1+o(be)),be]};function Nf(){return t.geoProjection(Cu).scale(152.63)}var Zc=[[[[-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 ds(){return So(Ge(1/0),Zc).rotate([20,0]).scale(152.63)}function Ch(he,be){var Pe=x(be),Oe=o(be),Je=v(he);if(he===0||n(be)===A)return[0,be];if(be===0)return[he,0];if(n(he)===A)return[he*Oe,A*Pe];var He=k/(2*he)-2*he/k,et=2*be/k,Mt=(1-et*et)/(Pe-et),Rt=He*He,Ut=Mt*Mt,tr=1+Rt/Ut,mr=1+Ut/Rt,Dr=(He*Pe/Mt-He/2)/tr,zr=(Ut*Pe/Rt+Mt/2)/mr,Xr=Dr*Dr+Oe*Oe/tr,di=zr*zr-(Ut*Pe*Pe/Rt+Mt*Pe-1)/mr;return[A*(Dr+H(Xr)*Je),A*(zr+H(di<0?0:di)*v(-be*He)*Je)]}Ch.invert=function(he,be){he/=A,be/=A;var Pe=he*he,Oe=be*be,Je=Pe+Oe,He=k*k;return[he?(Je-1+H((1-Je)*(1-Je)+4*Pe))/(2*he)*A:0,qt(function(et){return Je*(k*x(et)-2*et)*k+4*et*et*(be-x(et))+2*k*et-He*be},0)]};function Bd(){return t.geoProjection(Ch).scale(127.267)}var Jh=1.0148,Cf=.23185,pd=-.14499,Lu=.02406,$h=Jh,eu=5*Cf,Pu=7*pd,Lc=9*Lu,fl=1.790857183;function Xc(he,be){var Pe=be*be;return[he,be*(Jh+Pe*Pe*(Cf+Pe*(pd+Lu*Pe)))]}Xc.invert=function(he,be){be>fl?be=fl:be<-fl&&(be=-fl);var Pe=be,Oe;do{var Je=Pe*Pe;Pe-=Oe=(Pe*(Jh+Je*Je*(Cf+Je*(pd+Lu*Je)))-be)/($h+Je*Je*(eu+Je*(Pu+Lc*Je)))}while(n(Oe)>g);return[he,Pe]};function ic(){return t.geoProjection(Xc).scale(139.319)}function yu(he,be){if(n(be)g&&--Je>0);return et=b(Oe),[(n(be)=0;)if(Oe=be[Mt],Pe[0]===Oe[0]&&Pe[1]===Oe[1]){if(He)return[He,Pe];He=Pe}}}function tu(he){for(var be=he.length,Pe=[],Oe=he[be-1],Je=0;Je0?[-Oe[0],0]:[180-Oe[0],180])};var be=sh.map(function(Pe){return{face:Pe,project:he(Pe)}});return[-1,0,0,1,0,1,4,5].forEach(function(Pe,Oe){var Je=be[Pe];Je&&(Je.children||(Je.children=[])).push(be[Oe])}),Lf(be[0],function(Pe,Oe){return be[Pe<-k/2?Oe<0?6:4:Pe<0?Oe<0?2:0:PeOe^zr>Oe&&Pe<(Dr-Ut)*(Oe-tr)/(zr-tr)+Ut&&(Je=!Je)}return Je}function Dl(he,be){var Pe=be.stream,Oe;if(!Pe)throw new Error("invalid projection");switch(he&&he.type){case"Feature":Oe=Zu;break;case"FeatureCollection":Oe=Ih;break;default:Oe=gc;break}return Oe(he,Pe)}function Ih(he,be){return{type:"FeatureCollection",features:he.features.map(function(Pe){return Zu(Pe,be)})}}function Zu(he,be){return{type:"Feature",id:he.id,properties:he.properties,geometry:gc(he.geometry,be)}}function Dc(he,be){return{type:"GeometryCollection",geometries:he.geometries.map(function(Pe){return gc(Pe,be)})}}function gc(he,be){if(!he)return null;if(he.type==="GeometryCollection")return Dc(he,be);var Pe;switch(he.type){case"Point":Pe=mc;break;case"MultiPoint":Pe=mc;break;case"LineString":Pe=Yc;break;case"MultiLineString":Pe=Yc;break;case"Polygon":Pe=nc;break;case"MultiPolygon":Pe=nc;break;case"Sphere":Pe=nc;break;default:return null}return t.geoStream(he,be(Pe)),Pe.result()}var hl=[],ru=[],mc={point:function(he,be){hl.push([he,be])},result:function(){var he=hl.length?hl.length<2?{type:"Point",coordinates:hl[0]}:{type:"MultiPoint",coordinates:hl}:null;return hl=[],he}},Yc={lineStart:pc,point:function(he,be){hl.push([he,be])},lineEnd:function(){hl.length&&(ru.push(hl),hl=[])},result:function(){var he=ru.length?ru.length<2?{type:"LineString",coordinates:ru[0]}:{type:"MultiLineString",coordinates:ru}:null;return ru=[],he}},nc={polygonStart:pc,lineStart:pc,point:function(he,be){hl.push([he,be])},lineEnd:function(){var he=hl.length;if(he){do hl.push(hl[0].slice());while(++he<4);ru.push(hl),hl=[]}},polygonEnd:pc,result:function(){if(!ru.length)return null;var he=[],be=[];return ru.forEach(function(Pe){pf(Pe)?he.push([Pe]):be.push(Pe)}),be.forEach(function(Pe){var Oe=Pe[0];he.some(function(Je){if(Ph(Je[0],Oe))return Je.push(Pe),!0})||he.push([Pe])}),ru=[],he.length?he.length>1?{type:"MultiPolygon",coordinates:he}:{type:"Polygon",coordinates:he[0]}:null}};function gf(he){var be=he(A,0)[0]-he(-A,0)[0];function Pe(Oe,Je){var He=n(Oe)0?Oe-k:Oe+k,Je),Mt=(et[0]-et[1])*_,Rt=(et[0]+et[1])*_;if(He)return[Mt,Rt];var Ut=be*_,tr=Mt>0^Rt>0?-1:1;return[tr*Mt-v(Rt)*Ut,tr*Rt-v(Mt)*Ut]}return he.invert&&(Pe.invert=function(Oe,Je){var He=(Oe+Je)*_,et=(Je-Oe)*_,Mt=n(He)<.5*be&&n(et)<.5*be;if(!Mt){var Rt=be*_,Ut=He>0^et>0?-1:1,tr=-Ut*Oe+(et>0?1:-1)*Rt,mr=-Ut*Je+(He>0?1:-1)*Rt;He=(-tr-mr)*_,et=(tr-mr)*_}var Dr=he.invert(He,et);return Mt||(Dr[0]+=He>0?k:-k),Dr}),t.geoProjection(Pe).rotate([-90,-90,45]).clipAngle(180-.001)}function gt(){return gf(hi).scale(176.423)}function Bt(){return gf(Mo).scale(111.48)}function wr(he,be){if(!(0<=(be=+be)&&be<=20))throw new Error("invalid digits");function Pe(Ut){var tr=Ut.length,mr=2,Dr=new Array(tr);for(Dr[0]=+Ut[0].toFixed(be),Dr[1]=+Ut[1].toFixed(be);mr2||zr[0]!=tr[0]||zr[1]!=tr[1])&&(mr.push(zr),tr=zr)}return mr.length===1&&Ut.length>1&&mr.push(Pe(Ut[Ut.length-1])),mr}function He(Ut){return Ut.map(Je)}function et(Ut){if(Ut==null)return Ut;var tr;switch(Ut.type){case"GeometryCollection":tr={type:"GeometryCollection",geometries:Ut.geometries.map(et)};break;case"Point":tr={type:"Point",coordinates:Pe(Ut.coordinates)};break;case"MultiPoint":tr={type:Ut.type,coordinates:Oe(Ut.coordinates)};break;case"LineString":tr={type:Ut.type,coordinates:Je(Ut.coordinates)};break;case"MultiLineString":case"Polygon":tr={type:Ut.type,coordinates:He(Ut.coordinates)};break;case"MultiPolygon":tr={type:"MultiPolygon",coordinates:Ut.coordinates.map(He)};break;default:return Ut}return Ut.bbox!=null&&(tr.bbox=Ut.bbox),tr}function Mt(Ut){var tr={type:"Feature",properties:Ut.properties,geometry:et(Ut.geometry)};return Ut.id!=null&&(tr.id=Ut.id),Ut.bbox!=null&&(tr.bbox=Ut.bbox),tr}if(he!=null)switch(he.type){case"Feature":return Mt(he);case"FeatureCollection":{var Rt={type:"FeatureCollection",features:he.features.map(Mt)};return he.bbox!=null&&(Rt.bbox=he.bbox),Rt}default:return et(he)}return he}function vr(he){var be=x(he);function Pe(Oe,Je){var He=be?b(Oe*be/2)/be:Oe/2;if(!Je)return[2*He,-he];var et=2*i(He*x(Je)),Mt=1/b(Je);return[x(et)*Mt,Je+(1-o(et))*Mt-he]}return Pe.invert=function(Oe,Je){if(n(Je+=he)g&&--Mt>0);var Dr=Oe*(Ut=b(et)),zr=b(n(Je)0?A:-A)*(Rt+Je*(tr-et)/2+Je*Je*(tr-2*Rt+et)/2)]}xi.invert=function(he,be){var Pe=be/A,Oe=Pe*90,Je=f(18,n(Oe/5)),He=c(0,l(Je));do{var et=fi[He][1],Mt=fi[He+1][1],Rt=fi[f(19,He+2)][1],Ut=Rt-et,tr=Rt-2*Mt+et,mr=2*(n(Pe)-Mt)/Ut,Dr=tr/Ut,zr=mr*(1-Dr*mr*(1-2*Dr*mr));if(zr>=0||He===1){Oe=(be>=0?5:-5)*(zr+Je);var Xr=50,di;do Je=f(18,n(Oe)/5),He=l(Je),zr=Je-He,et=fi[He][1],Mt=fi[He+1][1],Rt=fi[f(19,He+2)][1],Oe-=(di=(be>=0?A:-A)*(Mt+zr*(Rt-et)/2+zr*zr*(Rt-2*Mt+et)/2)-be)*P;while(n(di)>E&&--Xr>0);break}}while(--He>=0);var Li=fi[He][0],Ci=fi[He+1][0],Qi=fi[f(19,He+2)][0];return[he/(Ci+zr*(Qi-Li)/2+zr*zr*(Qi-2*Ci+Li)/2),Oe*T]};function Fi(){return t.geoProjection(xi).scale(152.63)}function Xi(he){function be(Pe,Oe){var Je=o(Oe),He=(he-1)/(he-Je*o(Pe));return[He*Je*x(Pe),He*x(Oe)]}return be.invert=function(Pe,Oe){var Je=Pe*Pe+Oe*Oe,He=H(Je),et=(he-H(1-Je*(he+1)/(he-1)))/((he-1)/He+He/(he-1));return[a(Pe*et,He*H(1-et*et)),He?q(Oe*et/He):0]},be}function hn(he,be){var Pe=Xi(he);if(!be)return Pe;var Oe=o(be),Je=x(be);function He(et,Mt){var Rt=Pe(et,Mt),Ut=Rt[1],tr=Ut*Je/(he-1)+Oe;return[Rt[0]*Oe/tr,Ut/tr]}return He.invert=function(et,Mt){var Rt=(he-1)/(he-1-Mt*Je);return Pe.invert(Rt*et,Rt*Mt*Oe)},He}function Ti(){var he=2,be=0,Pe=t.geoProjectionMutator(hn),Oe=Pe(he,be);return Oe.distance=function(Je){return arguments.length?Pe(he=+Je,be):he},Oe.tilt=function(Je){return arguments.length?Pe(he,be=Je*T):be*P},Oe.scale(432.147).clipAngle(V(1/he)*P-1e-6)}var qi=1e-4,Ii=1e4,mi=-180,Pn=mi+qi,Ma=180,Ta=Ma-qi,Ea=-90,qa=Ea+qi,Cn=90,sn=Cn-qi;function Ua(he){return he.length>0}function mo(he){return Math.floor(he*Ii)/Ii}function Xo(he){return he===Ea||he===Cn?[0,he]:[mi,mo(he)]}function Ts(he){var be=he[0],Pe=he[1],Oe=!1;return be<=Pn?(be=mi,Oe=!0):be>=Ta&&(be=Ma,Oe=!0),Pe<=qa?(Pe=Ea,Oe=!0):Pe>=sn&&(Pe=Cn,Oe=!0),Oe?[be,Pe]:he}function Qo(he){return he.map(Ts)}function ys(he,be,Pe){for(var Oe=0,Je=he.length;Oe=Ta||tr<=qa||tr>=sn){He[et]=Ts(Rt);for(var mr=et+1;mrPn&&zrqa&&Xr=Mt)break;Pe.push({index:-1,polygon:be,ring:He=He.slice(mr-1)}),He[0]=Xo(He[0][1]),et=-1,Mt=He.length}}}}function Bo(he){var be,Pe=he.length,Oe={},Je={},He,et,Mt,Rt,Ut;for(be=0;be0?k-Mt:Mt)*P],Ut=t.geoProjection(he(et)).rotate(Rt),tr=t.geoRotation(Rt),mr=Ut.center;return delete Ut.rotate,Ut.center=function(Dr){return arguments.length?mr(tr(Dr)):tr.invert(mr())},Ut.clipAngle(90)}function Ko(he){var be=o(he);function Pe(Oe,Je){var He=t.geoGnomonicRaw(Oe,Je);return He[0]*=be,He}return Pe.invert=function(Oe,Je){return t.geoGnomonicRaw.invert(Oe/be,Je)},Pe}function iu(){return Du([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Du(he,be){return vs(Ko,he,be)}function ac(he){if(!(he*=2))return t.geoAzimuthalEquidistantRaw;var be=-he/2,Pe=-be,Oe=he*he,Je=b(Pe),He=.5/x(Pe);function et(Mt,Rt){var Ut=V(o(Rt)*o(Mt-be)),tr=V(o(Rt)*o(Mt-Pe)),mr=Rt<0?-1:1;return Ut*=Ut,tr*=tr,[(Ut-tr)/(2*he),mr*H(4*Oe*tr-(Oe-Ut+tr)*(Oe-Ut+tr))/(2*he)]}return et.invert=function(Mt,Rt){var Ut=Rt*Rt,tr=o(H(Ut+(Dr=Mt+be)*Dr)),mr=o(H(Ut+(Dr=Mt+Pe)*Dr)),Dr,zr;return[a(zr=tr-mr,Dr=(tr+mr)*Je),(Rt<0?-1:1)*V(H(Dr*Dr+zr*zr)*He)]},et}function mf(){return bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function bu(he,be){return vs(ac,he,be)}function Kc(he,be){if(n(be)g&&--Mt>0);return[v(he)*(H(Je*Je+4)+Je)*k/4,A*et]};function _c(){return t.geoProjection(yc).scale(127.16)}function le(he,be,Pe,Oe,Je){function He(et,Mt){var Rt=Pe*x(Oe*Mt),Ut=H(1-Rt*Rt),tr=H(2/(1+Ut*o(et*=Je)));return[he*Ut*tr*x(et),be*Rt*tr]}return He.invert=function(et,Mt){var Rt=et/he,Ut=Mt/be,tr=H(Rt*Rt+Ut*Ut),mr=2*q(tr/2);return[a(et*b(mr),he*tr)/Je,tr&&q(Mt*x(mr)/(be*Pe*tr))/Oe]},He}function w(he,be,Pe,Oe){var Je=k/3;he=c(he,g),be=c(be,g),he=f(he,A),be=f(be,k-g),Pe=c(Pe,0),Pe=f(Pe,100-g),Oe=c(Oe,g);var He=Pe/100+1,et=Oe/100,Mt=V(He*o(Je))/Je,Rt=x(he)/x(Mt*A),Ut=be/k,tr=H(et*x(he/2)/x(be/2)),mr=tr/H(Ut*Rt*Mt),Dr=1/(tr*H(Ut*Rt*Mt));return le(mr,Dr,Rt,Mt,Ut)}function B(){var he=65*T,be=60*T,Pe=20,Oe=200,Je=t.geoProjectionMutator(w),He=Je(he,be,Pe,Oe);return He.poleline=function(et){return arguments.length?Je(he=+et*T,be,Pe,Oe):he*P},He.parallels=function(et){return arguments.length?Je(he,be=+et*T,Pe,Oe):be*P},He.inflation=function(et){return arguments.length?Je(he,be,Pe=+et,Oe):Pe},He.ratio=function(et){return arguments.length?Je(he,be,Pe,Oe=+et):Oe},He.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*k+3*H(3),se=2*H(2*k*H(3)/ee),qe=Ct(se*H(3)/k,se,ee/6);function je(){return t.geoProjection(qe).scale(176.84)}function it(he,be){return[he*H(1-3*be*be/(k*k)),be]}it.invert=function(he,be){return[he/H(1-3*be*be/(k*k)),be]};function yt(){return t.geoProjection(it).scale(152.63)}function Ot(he,be){var Pe=o(be),Oe=o(he)*Pe,Je=1-Oe,He=o(he=a(x(he)*Pe,-x(be))),et=x(he);return Pe=H(1-Oe*Oe),[et*Pe-He*Je,-He*Pe-et*Je]}Ot.invert=function(he,be){var Pe=(he*he+be*be)/-2,Oe=H(-Pe*(2+Pe)),Je=be*Pe+he*Oe,He=he*Pe-be*Oe,et=H(He*He+Je*Je);return[a(Oe*Je,et*(1+Pe)),et?-q(Oe*He/et):0]};function Nt(){return t.geoProjection(Ot).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function hr(he,be){var Pe=Me(he,be);return[(Pe[0]+he/A)/2,(Pe[1]+be)/2]}hr.invert=function(he,be){var Pe=he,Oe=be,Je=25;do{var He=o(Oe),et=x(Oe),Mt=x(2*Oe),Rt=et*et,Ut=He*He,tr=x(Pe),mr=o(Pe/2),Dr=x(Pe/2),zr=Dr*Dr,Xr=1-Ut*mr*mr,di=Xr?V(He*mr)*H(Li=1/Xr):Li=0,Li,Ci=.5*(2*di*He*Dr+Pe/A)-he,Qi=.5*(di*et+Oe)-be,Mn=.5*Li*(Ut*zr+di*He*mr*Rt)+.5/A,pa=Li*(tr*Mt/4-di*et*Dr),ea=.125*Li*(Mt*Dr-di*et*Ut*tr),Ga=.5*Li*(Rt*mr+di*zr*He)+.5,To=pa*ea-Ga*Mn,Wa=(Qi*pa-Ci*Ga)/To,co=(Ci*ea-Qi*Mn)/To;Pe-=Wa,Oe-=co}while((n(Wa)>g||n(co)>g)&&--Je>0);return[Pe,Oe]};function Sr(){return t.geoProjection(hr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=ae,e.geoAitoff=ke,e.geoAitoffRaw=Me,e.geoArmadillo=ie,e.geoArmadilloRaw=ge,e.geoAugust=Ee,e.geoAugustRaw=Te,e.geoBaker=me,e.geoBakerRaw=Ce,e.geoBerghaus=ce,e.geoBerghausRaw=De,e.geoBertin1953=Dt,e.geoBertin1953Raw=ot,e.geoBoggs=bt,e.geoBoggsRaw=xt,e.geoBonne=Ht,e.geoBonneRaw=dt,e.geoBottomley=fr,e.geoBottomleyRaw=$t,e.geoBromley=Br,e.geoBromleyRaw=_r,e.geoChamberlin=Xe,e.geoChamberlinRaw=Ne,e.geoChamberlinAfrica=Ve,e.geoCollignon=Le,e.geoCollignonRaw=ht,e.geoCraig=Se,e.geoCraigRaw=xe,e.geoCraster=Vt,e.geoCrasterRaw=Gt,e.geoCylindricalEqualArea=Qr,e.geoCylindricalEqualAreaRaw=ar,e.geoCylindricalStereographic=jr,e.geoCylindricalStereographicRaw=ai,e.geoEckert1=bi,e.geoEckert1Raw=ri,e.geoEckert2=Wi,e.geoEckert2Raw=nn,e.geoEckert3=_n,e.geoEckert3Raw=Ni,e.geoEckert4=zn,e.geoEckert4Raw=$i,e.geoEckert5=It,e.geoEckert5Raw=Wn,e.geoEckert6=jt,e.geoEckert6Raw=ft,e.geoEisenlohr=Fr,e.geoEisenlohrRaw=yr,e.geoFahey=gi,e.geoFaheyRaw=Vr,e.geoFoucaut=Mi,e.geoFoucautRaw=Si,e.geoFoucautSinusoidal=Gi,e.geoFoucautSinusoidalRaw=Pi,e.geoGilbert=jn,e.geoGingery=jo,e.geoGingeryRaw=la,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=Sn,e.geoGinzburg5=xn,e.geoGinzburg5Raw=oo,e.geoGinzburg6=br,e.geoGinzburg6Raw=_t,e.geoGinzburg8=ti,e.geoGinzburg8Raw=Hr,e.geoGinzburg9=Yi,e.geoGinzburg9Raw=zi,e.geoGringorten=Fn,e.geoGringortenRaw=hi,e.geoGuyou=ks,e.geoGuyouRaw=Mo,e.geoHammer=ct,e.geoHammerRaw=Ge,e.geoHammerRetroazimuthal=wl,e.geoHammerRetroazimuthalRaw=Zs,e.geoHealpix=$l,e.geoHealpixRaw=ml,e.geoHill=fc,e.geoHillRaw=Gu,e.geoHomolosine=vo,e.geoHomolosineRaw=Il,e.geoHufnagel=Ks,e.geoHufnagelRaw=Wl,e.geoHyperelliptical=ko,e.geoHyperellipticalRaw=Zn,e.geoInterrupt=So,e.geoInterruptedBoggs=rh,e.geoInterruptedHomolosine=Hc,e.geoInterruptedMollweide=Ls,e.geoInterruptedMollweideHemispheres=kc,e.geoInterruptedSinuMollweide=Gc,e.geoInterruptedSinusoidal=Bf,e.geoKavrayskiy7=ff,e.geoKavrayskiy7Raw=ss,e.geoLagrange=Ul,e.geoLagrangeRaw=ih,e.geoLarrivee=Cc,e.geoLarriveeRaw=hc,e.geoLaskowski=$s,e.geoLaskowskiRaw=ws,e.geoLittrow=Ms,e.geoLittrowRaw=hs,e.geoLoximuthal=Sl,e.geoLoximuthalRaw=dc,e.geoMiller=Ps,e.geoMillerRaw=ec,e.geoModifiedStereographic=Ml,e.geoModifiedStereographicRaw=ov,e.geoModifiedStereographicAlaska=tc,e.geoModifiedStereographicGs48=uu,e.geoModifiedStereographicGs50=Mh,e.geoModifiedStereographicMiller=jc,e.geoModifiedStereographicLee=kf,e.geoMollweide=xr,e.geoMollweideRaw=Yt,e.geoMtFlatPolarParabolic=hf,e.geoMtFlatPolarParabolicRaw=nh,e.geoMtFlatPolarQuartic=Kh,e.geoMtFlatPolarQuarticRaw=kh,e.geoMtFlatPolarSinusoidal=ah,e.geoMtFlatPolarSinusoidalRaw=rc,e.geoNaturalEarth2=df,e.geoNaturalEarth2Raw=Wc,e.geoNellHammer=Nf,e.geoNellHammerRaw=Cu,e.geoInterruptedQuarticAuthalic=ds,e.geoNicolosi=Bd,e.geoNicolosiRaw=Ch,e.geoPatterson=ic,e.geoPattersonRaw=Xc,e.geoPolyconic=Qs,e.geoPolyconicRaw=yu,e.geoPolyhedral=Lf,e.geoPolyhedralButterfly=Fs,e.geoPolyhedralCollignon=Lh,e.geoPolyhedralWaterman=Is,e.geoProject=Dl,e.geoGringortenQuincuncial=gt,e.geoPeirceQuincuncial=Bt,e.geoPierceQuincuncial=Bt,e.geoQuantize=wr,e.geoQuincuncial=gf,e.geoRectangularPolyconic=Ur,e.geoRectangularPolyconicRaw=vr,e.geoRobinson=Fi,e.geoRobinsonRaw=xi,e.geoSatellite=Ti,e.geoSatelliteRaw=hn,e.geoSinuMollweide=Qu,e.geoSinuMollweideRaw=fa,e.geoSinusoidal=Et,e.geoSinusoidalRaw=St,e.geoStitch=Ds,e.geoTimes=Ka,e.geoTimesRaw=ia,e.geoTwoPointAzimuthal=Du,e.geoTwoPointAzimuthalRaw=Ko,e.geoTwoPointAzimuthalUsa=iu,e.geoTwoPointEquidistant=bu,e.geoTwoPointEquidistantRaw=ac,e.geoTwoPointEquidistantUsa=mf,e.geoVanDerGrinten=Ru,e.geoVanDerGrintenRaw=Kc,e.geoVanDerGrinten2=Ra,e.geoVanDerGrinten2Raw=Rc,e.geoVanDerGrinten3=Jc,e.geoVanDerGrinten3Raw=eo,e.geoVanDerGrinten4=_c,e.geoVanDerGrinten4Raw=yc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=je,e.geoWagner4Raw=qe,e.geoWagner6=yt,e.geoWagner6Raw=it,e.geoWiechel=Nt,e.geoWiechelRaw=Ot,e.geoWinkel3=Sr,e.geoWinkel3Raw=hr,Object.defineProperty(e,"__esModule",{value:!0})})});var MDe=ye((Epr,SDe)=>{"use strict";var Zh=xa(),bX=Mr(),bRt=ba(),X5=Math.PI/180,G2=180/Math.PI,TX={cursor:"pointer"},AX={cursor:"auto"};function wRt(e,t){var r=e.projection,n;return t._isScoped?n=TRt:t._isClipped?n=SRt:n=ARt,n(e,r)}SDe.exports=wRt;function SX(e,t){return Zh.behavior.zoom().translate(t.translate()).scale(t.scale())}function MX(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]=bX.nestedProperty(o,h).get(),bRt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=bX.nestedProperty(l,h);v.get()!==d&&(v.set(d),bX.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 TRt(e,t){var r=SX(e,t);function n(){Zh.select(this).style(TX)}function i(){t.scale(Zh.event.scale).translate(Zh.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(){Zh.select(this).style(AX),MX(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function ARt(e,t){var r=SX(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(k){return t.invert(k)}function v(k){var A=d(k);if(!A)return!0;var L=t(A);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function x(){Zh.select(this).style(TX),i=Zh.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=Zh.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(Zh.event.scale),t.translate([o[0],Zh.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 k=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-k[0]})}function g(){Zh.select(this).style(AX),h&&MX(e,t,E)}function E(k){var A=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-A[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",b).on("zoomend",g),r}function SRt(e,t){var r={r:t.rotate(),k:t.scale()},n=SX(e,t),i=DRt(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){Zh.select(this).style(TX);var h=Zh.mouse(this),d=t.rotate(),v=d,x=t.translate(),b=MRt(d);s=Sz(t,h),o.call(n,"zoom",function(){var g=Zh.mouse(this);if(t.scale(r.k=Zh.event.scale),!s)h=g,s=Sz(t,h);else if(Sz(t,g)){t.rotate(d).translate(x);var E=Sz(t,g),k=kRt(s,E),A=LRt(ERt(b,k)),L=r.r=CRt(A,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(){Zh.select(this).style(AX),o.call(n,"zoom",null),c(i.of(this,arguments)),MX(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 Zh.rebind(n,i,"on")}function Sz(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&PRt(r)}function MRt(e){var t=.5*e[0]*X5,r=.5*e[1]*X5,n=.5*e[2]*X5,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 ERt(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 kRt(e,t){if(!(!e||!t)){var r=IRt(e,t),n=Math.sqrt(ADe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,ADe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function CRt(e,t,r){var n=wX(t,2,e[0]);n=wX(n,1,e[1]),n=wX(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)*G2,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)*G2-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,x=(Math.atan2(u,s)-Math.atan2(o,h))*G2,b=(Math.atan2(u,s)-Math.atan2(o,-h))*G2,g=wDe(r[0],r[1],d,x),E=wDe(r[0],r[1],v,b);return g<=E?[d,x,r[2]]:[v,b,r[2]]}function wDe(e,t,r,n){var i=TDe(r-e),a=TDe(n-t);return Math.sqrt(i*i+a*a)}function TDe(e){return(e%360+540)%360-180}function wX(e,t,r){var n=r*X5,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 LRt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*G2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*G2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*G2]}function PRt(e){var t=e[0]*X5,r=e[1]*X5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function ADe(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var t1=xa(),CX=xX(),RRt=CX.geoPath,zRt=CX.geoDistance,FRt=bDe(),qRt=ba(),QE=Mr(),ORt=QE.strTranslate,Mz=va(),$E=ao(),EDe=Nc(),BRt=Yu(),kX=Qa(),kDe=wg().getAutoRange,EX=gv(),NRt=wf().prepSelect,URt=wf().clearOutline,VRt=wf().selectOnClick,HRt=MDe(),fp=XE(),GRt=ix(),LDe=cz(),jRt=aX().feature;function PDe(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 $g=PDe.prototype;IDe.exports=function(t){return new PDe(t)};$g.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),BRt.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()};$g.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=WRt(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||{},x=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=kDe(r,u),c.range=kDe(r,c);var g=(u.range[0]+u.range[1])/2,E=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:g,lat:E};else if(n._isClipped){d={lon:g,lat:E},v={lon:g,lat:E,roll:v.roll};var k=o.type,A=fp.lonaxisSpan[k]/2||180,L=fp.lataxisSpan[k]/2||90;x=[g-A,g+A],b=[E-L,E+L]}else d={lon:g,lat:E},v={lon:g,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 _=CDe(x,b);f.fitExtent(h,_);var C=this.bounds=f.getBounds(_),M=this.fitScale=f.scale(),p=f.translate();if(n.fitbounds){var P=f.getBounds(CDe(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):QE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*M);var F=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([p[0]+(F[0]-p[0]),p[1]+(F[1]-p[1])]).clipExtent(C),n._isAlbersUsa){var q=f([d.lon,d.lat]),V=f.translate();f.translate([V[0]-(q[0]-V[0]),V[1]-(q[1]-V[1])])}};$g.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(jRt(n,n.objects[h])):o(h)&&d.datum(ZRt(h,t,e)).call(Mz.stroke,t[h].gridcolor).call($E.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(Mz.stroke,t[v+"color"]).call($E.dashLine,"",t[v+"width"]):l(h)&&d.call(Mz.fill,t[v+"color"])})};$g.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;$E.setRect(this.clipRect,i,a,o,s),this.bgRect.call($E.setRect,i,a,o,s).call(Mz.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};$g.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];qRt.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&&URt(n)}};a==="pan"?(i.node().onmousedown=null,i.call(HRt(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){NRt(f,h,d,c,a)},EX.init(c)),i.on("mousemove",function(){var f=r.projection.invert(QE.getPositionFromD3Event());if(!f)return EX.unhover(n,t1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},EDe.hover(n,t1.event,r.id)}),i.on("mouseout",function(){n._dragging||EX.unhover(n,t1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&VRt(t1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&EDe.click(n,t1.event))})};$g.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($E.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"},kX.setConvert(e.mockAxis,r)};$g.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},QE.extendFlat(this.viewInitial,i)};$g.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};$g._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?ORt(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 WRt(e){var t=e.projection,r=t.type,n=fp.projNames[r];n="geo"+QE.titleCase(n);for(var i=CX[n]||FRt[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 RRt().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 ZRt(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(E,k){return[E,k]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(E,k){return[k,E]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};kX.setConvert(c,r);var f=kX.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 LX=ye((Cpr,FDe)=>{"use strict";var K5=dh(),XRt=Ju().attributes,YRt=Ed().dash,Y5=XE(),KRt=Bu().overrideAll,RDe=X1(),zDe={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:K5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:YRt},JRt=FDe.exports=KRt({domain:XRt({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:RDe(Y5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:RDe(Y5.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:K5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:Y5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:Y5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:Y5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:Y5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:K5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:K5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:K5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:K5.background},lonaxis:zDe,lataxis:zDe},"plot","from-root");JRt.uirevision={valType:"any",editType:"none"}});var BDe=ye((Lpr,ODe)=>{"use strict";var Ez=Mr(),$Rt=k_(),QRt=kd().getSubplotData,kz=XE(),ezt=LX(),qDe=kz.axesNames;ODe.exports=function(t,r,n){$Rt(t,r,n,{type:"geo",attributes:ezt,handleDefaults:tzt,fullData:n,partition:"y"})};function tzt(e,t,r,n){var i=QRt(n.fullData,"geo",n.id),a=i.map(function(ae){return ae.index}),o=r("resolution"),s=r("scope"),l=kz.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=!!kz.lonaxisSpan[u];if(e.visible===!1){var x=Ez.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var b=r("visible"),g,E=0;E0&&q<0&&(q+=360);var V=(F+q)/2,H;if(!c){var X=f?l.projRotate:[V,0,0];H=r("projection.rotation.lon",X[0]),r("projection.rotation.lat",X[1]),r("projection.rotation.roll",X[2]),g=r("showcoastlines",!f&&b),g&&(r("coastlinecolor"),r("coastlinewidth")),g=r("showocean",b?void 0:!1),g&&r("oceancolor")}var G,N;if(c?(G=-96.6,N=38.7):(G=f?V:H,N=(T[0]+T[1])/2),r("center.lon",G),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var W=l.projParallels||[0,60];r("projection.parallels",W)}r("projection.scale"),g=r("showland",b?void 0:!1),g&&r("landcolor"),g=r("showlakes",b?void 0:!1),g&&r("lakecolor"),g=r("showrivers",b?void 0:!1),g&&(r("rivercolor"),r("riverwidth")),g=r("showcountries",f&&s!=="usa"&&b),g&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(g=r("showframe",b),g&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var PX=ye((Ppr,VDe)=>{"use strict";var rzt=kd().getSubplotCalcData,izt=Mr().counterRegex,nzt=DDe(),Wm="geo",NDe=izt(Wm),UDe={};UDe[Wm]={valType:"subplotid",dflt:Wm,editType:"calc"};function azt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Wm],i=0;i{"use strict";HDe.exports={attributes:H2(),supplyDefaults:A8e(),colorbar:Kd(),formatLabels:E8e(),calc:lz(),calcGeoJSON:_X().calcGeoJSON,plot:_X().plot,style:pX(),styleOnSelect:op().styleOnSelect,hoverPoints:hDe(),eventData:vDe(),selectPoints:mDe(),moduleType:"trace",name:"scattergeo",basePlotModule:PX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var WDe=ye((Dpr,jDe)=>{"use strict";jDe.exports=GDe()});var J5=ye((Rpr,YDe)=>{"use strict";var lzt=Wo().hovertemplateAttrs,ax=H2(),uzt=Kl(),ZDe=vl(),czt=dh().defaultLine,nx=no().extendFlat,XDe=ax.marker.line;YDe.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({},XDe.color,{dflt:czt}),width:nx({},XDe.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({},ZDe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:lzt(),showlegend:nx({},ZDe.showlegend,{dflt:!1})},uzt("",{cLetter:"z",editTypeOverride:"calc"}))});var JDe=ye((zpr,KDe)=>{"use strict";var Cz=Mr(),fzt=Uh(),hzt=J5();KDe.exports=function(t,r,n,i){function a(h,d){return Cz.coerce(t,r,hzt,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&Cz.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!==""||Cz.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),fzt(t,r,i,a,{prefix:"",cLetter:"z"}),Cz.coerceSelectionMarkerOpacity(r,a)}});var Lz=ye((Fpr,eRe)=>{"use strict";var $De=uo(),dzt=es().BADNUM,vzt=zv(),pzt=km(),gzt=F0();function QDe(e){return e&&typeof e=="string"}eRe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return QDe(c)||$De(c)}:a=QDe;for(var o=0;o{"use strict";var mzt=xa(),yzt=va(),IX=ao(),_zt=Mu();function xzt(e,t){t&&tRe(e,t)}function tRe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=_zt.makeColorScaleFuncFromTrace(r);i.each(function(l){mzt.select(this).attr("fill",s(l.z)).call(yzt.stroke,l.mlc||o.color).call(IX.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),IX.selectedPointStyle(i,r)}function bzt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?IX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):tRe(e,t)}rRe.exports={style:xzt,styleOnSelect:bzt}});var DX=ye((Opr,aRe)=>{"use strict";var wzt=xa(),iRe=Mr(),$5=ix(),Tzt=cz().getTopojsonFeatures,nRe=wg().findExtremes,Azt=Pz().style;function Szt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");iRe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=wzt.select(this),o=a.selectAll("path.choroplethlocation").data(iRe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Azt(e,i)})}function Mzt(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"?$5.extractTraceFeature(e):Tzt(r,i.topojson),l=[],u=[],c=0;c{"use strict";var Ezt=Qa(),kzt=J5(),Czt=Mr().fillText;oRe.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 Dz=ye((Npr,sRe)=>{"use strict";sRe.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 Rz=ye((Upr,lRe)=>{"use strict";lRe.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";uRe.exports={attributes:J5(),supplyDefaults:JDe(),colorbar:S_(),calc:Lz(),calcGeoJSON:DX().calcGeoJSON,plot:DX().plot,style:Pz().style,styleOnSelect:Pz().styleOnSelect,hoverPoints:Iz(),eventData:Dz(),selectPoints:Rz(),moduleType:"trace",name:"choropleth",basePlotModule:PX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var hRe=ye((Hpr,fRe)=>{"use strict";fRe.exports=cRe()});var zz=ye((Gpr,vRe)=>{"use strict";var Pzt=ba(),s0=Mr(),Izt=oT();function Dzt(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 x=s.p2c(f-d),b=s.p2c(f+d),g=l.p2c(h-d),E=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(x,b),Math.min(l._rl[0],l._rl[1]),Math.max(x,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(x,b),Math.min(g,E),Math.max(x,b),Math.max(g,E))}else v=a.ids;var k,A,L,_,C,M,p,P,T,F=d;if(n==="x"){var q=!!o.xperiodalignment,V=!!o.yperiodalignment;for(C=0;C=Math.min(H,X)&&f<=Math.max(H,X)?0:1/0}if(M=Math.min(G,N)&&h<=Math.max(G,N)?0:1/0}T=Math.sqrt(M*M+p*p),A=v[C]}}}else for(C=v.length-1;C>-1;C--)k=v[C],L=u[k],_=c[k],M=s.c2p(L)-f,p=l.c2p(_)-h,P=Math.sqrt(M*M+p*p),P{"use strict";var pRe=20;gRe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:pRe,SYMBOL_STROKE:pRe/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 ek=ye((Wpr,xRe)=>{"use strict";var Rzt=vl(),zzt=Su(),Fzt=Eg(),Af=Uc(),mRe=Oc().axisHoverFormat,yRe=Kl(),qzt=X1(),RX=no().extendFlat,Ozt=Bu().overrideAll,Bzt=ox().DASHES,_Re=Af.line,r1=Af.marker,Nzt=r1.line,Q5=xRe.exports=Ozt({x:Af.x,x0:Af.x0,dx:Af.dx,y:Af.y,y0:Af.y0,dy:Af.dy,xperiod:Af.xperiod,yperiod:Af.yperiod,xperiod0:Af.xperiod0,yperiod0:Af.yperiod0,xperiodalignment:Af.xperiodalignment,yperiodalignment:Af.yperiodalignment,xhoverformat:mRe("x"),yhoverformat:mRe("y"),text:Af.text,hovertext:Af.hovertext,textposition:Af.textposition,textfont:zzt({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:_Re.color,width:_Re.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:qzt(Bzt),dflt:"solid"}},marker:RX({},yRe("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:RX({},yRe("marker.line"),{width:Nzt.width})}),connectgaps:Af.connectgaps,fill:RX({},Af.fill,{dflt:"none"}),fillcolor:Fzt(),selected:{marker:Af.selected.marker,textfont:Af.selected.textfont},unselected:{marker:Af.unselected.marker,textfont:Af.unselected.textfont},opacity:Rzt.opacity},"calc","nested");Q5.x.editType=Q5.y.editType=Q5.x0.editType=Q5.y0.editType="calc+clearAxisTypes";Q5.hovertemplate=Af.hovertemplate;Q5.texttemplate=Af.texttemplate});var Fz=ye(zX=>{"use strict";var bRe=ox();zX.isOpenSymbol=function(e){return typeof e=="string"?bRe.OPEN_RE.test(e):e%200>100};zX.isDotSymbol=function(e){return typeof e=="string"?bRe.DOT_RE.test(e):e>200}});var ARe=ye((Xpr,TRe)=>{"use strict";var wRe=Mr(),Uzt=ba(),Vzt=Fz(),Hzt=ek(),Gzt=Sm(),qz=lu(),jzt=K3(),Wzt=Pg(),Zzt=$p(),Xzt=D0(),Yzt=Ig(),Kzt=R0();TRe.exports=function(t,r,n,i){function a(d,v){return wRe.coerce(t,r,Hzt,d,v)}var o=t.marker?Vzt.isOpenSymbol(t.marker.symbol):!1,s=qz.isBubble(t),l=jzt(t,r,i,a);if(!l){r.visible=!1;return}Wzt(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var Jzt=JP();SRe.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]),Jzt(t,r,n)}});var kRe=ye((Kpr,ERe)=>{"use strict";function $zt(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 Qzt(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 eFt(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 tFt(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 rFt(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 tk(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)}ERe.exports={ge:function(e,t,r,n,i){return tk(e,t,r,n,i,$zt)},gt:function(e,t,r,n,i){return tk(e,t,r,n,i,Qzt)},lt:function(e,t,r,n,i){return tk(e,t,r,n,i,eFt)},le:function(e,t,r,n,i){return tk(e,t,r,n,i,tFt)},eq:function(e,t,r,n,i){return tk(e,t,r,n,i,rFt)}}});var Zm=ye((Jpr,LRe)=>{"use strict";LRe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=CRe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var iFt=Zm();PRe.exports=nFt;function nFt(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=iFt(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 j2=ye((Qpr,IRe)=>{"use strict";IRe.exports=aFt;function aFt(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]{DRe.exports=function(){for(var e=0;e{var zRe=HR();FRe.exports=oFt;function oFt(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(zRe(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";qRe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var NRe=ye((i0r,BRe)=>{"use strict";BRe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var ZRe=ye((n0r,WRe)=>{"use strict";var URe=kRe(),VRe=O5(),sFt=eA(),lFt=j2(),HRe=Zm(),qX=RRe(),uFt=W2(),cFt=ORe(),fFt=HR(),GRe=NRe(),hFt=1073741824;WRe.exports=function(t,r){r||(r={}),t=uFt(t,"float64"),r=HRe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=qX(r.maxDepth,255),i=qX(r.bounds,lFt(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=jRe(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(fFt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let g=0;gn||_>hFt){for(let N=0;N_e||p>Me||P=F||re===ae)return;let ke=l[W];ae===void 0&&(ae=ke.length);for(let De=re;De=A&&Ge<=_&&nt>=L&&nt<=C&&q.push(ce)}let ge=u[W],ie=ge[re*4+0],Te=ge[re*4+1],Ee=ge[re*4+2],Ae=ge[re*4+3],ze=H(ge,re+1),Ce=N*.5,me=W+1;V(X,G,Ce,me,ie,Te||Ee||Ae||ze),V(X,G+Ce,Ce,me,Te,Ee||Ae||ze),V(X+Ce,G,Ce,me,Ee,Ae||ze),V(X+Ce,G+Ce,Ce,me,Ae,ze)}function H(X,G){let N=null,W=0;for(;N===null;)if(N=X[G*4+W],W++,W>X.length)return null;return N}return q}function x(g,E,k,A,L){let _=[];for(let C=0;C{"use strict";XRe.exports=ZRe()});var OX=ye((o0r,YRe)=>{YRe.exports=dFt;function dFt(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(Bz,"__esModule",{value:!0});var vFt=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")}}(),rk=Math.PI*2,BX=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}},pFt=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}]},KRe=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)},gFt=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),x=Math.pow(f,2),b=Math.pow(h,2),g=d*v-d*b-v*x;g<0&&(g=0),g/=d*b+v*x,g=Math.sqrt(g)*(s===l?-1:1);var E=g*a/o*h,k=g*-o/a*f,A=c*E-u*k+(t+n)/2,L=u*E+c*k+(r+i)/2,_=(f-E)/a,C=(h-k)/o,M=(-f-E)/a,p=(-h-k)/o,P=KRe(1,0,_,C),T=KRe(_,C,M,p);return l===0&&T>0&&(T-=rk),l===1&&T<0&&(T+=rk),[A,L,P,T]},mFt=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 x=Math.sin(u*rk/360),b=Math.cos(u*rk/360),g=b*(r-i)/2+x*(n-a)/2,E=-x*(r-i)/2+b*(n-a)/2;if(g===0&&E===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(g,2)/Math.pow(o,2)+Math.pow(E,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var A=gFt(r,n,i,a,o,s,f,d,x,b,g,E),L=vFt(A,4),_=L[0],C=L[1],M=L[2],p=L[3],P=Math.abs(p)/(rk/4);Math.abs(1-P)<1e-7&&(P=1);var T=Math.max(Math.ceil(P),1);p/=T;for(var F=0;F{"use strict";eze.exports=_Ft;var yFt=$Re();function _Ft(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 Nz(e,t,r,n){return["C",e,t,r,n,r,n]}function QRe(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 NX=ye((l0r,rze)=>{"use strict";rze.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var aze=ye((u0r,nze)=>{"use strict";var xFt=XS(),bFt=OX(),wFt=tze(),TFt=NX(),ize=tE();nze.exports=AFt;function AFt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(ize(TFt(e),"String is not an SVG path."),e=xFt(e)),ize(Array.isArray(e),"Argument should be a string or an array of path segments."),e=bFt(e),e=wFt(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 fze=ye((c0r,cze)=>{var Z2=Math.PI,oze=uze(120);cze.exports=SFt;function SFt(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 x=u,b=c;(t=="C"||t=="S")&&(x+=x-n,b+=b-i),d=["C",x,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=sze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=sze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=Uz(u,c,d[1],d[2]);break;case"H":d=Uz(u,c,d[1],c);break;case"V":d=Uz(u,c,u,d[1]);break;case"Z":d=Uz(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 Uz(e,t,r,n){return["C",e,t,r,n,r,n]}function sze(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 lze(e,t,r,n,i,a,o,s,l,u){if(u)k=u[0],A=u[1],g=u[2],E=u[3];else{var c=UX(e,t,-i);e=c.x,t=c.y,c=UX(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,x=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*x-v*h*h-x*f*f)/(v*h*h+x*f*f)));b==1/0&&(b=1);var g=b*r*h/n+(e+s)/2,E=b*-n*f/r+(t+l)/2,k=Math.asin(((t-E)/n).toFixed(9)),A=Math.asin(((l-E)/n).toFixed(9));k=eA&&(k=k-Z2*2),!o&&A>k&&(A=A-Z2*2)}if(Math.abs(A-k)>oze){var L=A,_=s,C=l;A=k+oze*(o&&A>k?1:-1),s=g+r*Math.cos(A),l=E+n*Math.sin(A);var M=lze(s,l,r,n,i,0,o,_,C,[A,L,g,E])}var p=Math.tan((A-k)/4),P=4/3*r*p,T=4/3*n*p,F=[2*e-(e+P*Math.sin(k)),2*t-(t-T*Math.cos(k)),s+P*Math.sin(A),l-T*Math.cos(A),s,l];if(u)return F;M&&(F=F.concat(M));for(var q=0;q{var MFt=OX(),EFt=fze(),kFt={M:"moveTo",C:"bezierCurveTo"};hze.exports=function(e,t){e.beginPath(),EFt(MFt(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[kFt[n]].apply(e,i)}),e.closePath()}});var mze=ye((h0r,gze)=>{"use strict";var CFt=O5();gze.exports=LFt;var ik=1e20;function LFt(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,x;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,x=u.length;v{"use strict";var PFt=aze(),IFt=XS(),DFt=dze(),RFt=NX(),zFt=mze(),VX=document.createElement("canvas"),hp=VX.getContext("2d");yze.exports=FFt;function FFt(e,t){if(!RFt(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=VX.width=t.w||t.width||200,n=VX.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||PFt(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),qFt()){var u=new Path2D(e);hp.fill(u),a&&hp.stroke(u)}else{var c=IFt(e);DFt(hp,c),hp.fill(),a&&hp.stroke()}hp.setTransform(1,0,0,1,0,0);var f=zFt(hp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var Vz;function qFt(){if(Vz!=null)return Vz;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return Vz=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return Vz=r&&r.data&&r.data[3]===255}});var Y2=ye((v0r,Lze)=>{"use strict";var Gz=uo(),OFt=_ze(),Hz=J_(),BFt=ba(),iA=Mr(),Qf=iA.isArrayOrTypedArray,tA=ao(),xze=af(),bze=$y().formatColor,rA=lu(),NFt=S3(),GX=Fz(),nk=ox(),UFt=N1().DESELECTDIM,wze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},VFt=rp().appendArrayPointValue;function HFt(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(rA.hasText(t)&&(n.text=Cze(e,t),n.textSel=Aze(e,t,t.selected),n.textUnsel=Aze(e,t,t.unselected)),rA.hasMarkers(t)&&(n.marker=WX(e,t),n.markerSel=jX(e,t,t.selected),n.markerUnsel=jX(e,t,t.unselected),!t.unselected&&Qf(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function WX(e,t){var r=t._length,n=t.marker,i={},a,o=Qf(n.symbol),s=Qf(n.angle),l=Qf(n.color),u=Qf(n.line.color),c=Qf(n.opacity),f=Qf(n.size),h=Qf(n.line.width),d;if(o||(d=GX.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,x=n.angle,b=bze(n,n.opacity,r),g=bze(n.line,n.opacity,r);if(!Qf(g[0])){var E=g;for(g=Array(r),a=0;ank.TOO_MANY_POINTS||rA.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=Qf(u)?u.length>1?u[o]:u[0]:u,v=wze[h],x=wze[d],b=c?c/.8+1:0,g=-x*b-x*.5;a.offset[o]=[v*b/f,g/f]}}return a}Lze.exports={style:HFt,markerStyle:WX,markerSelection:jX,linePositions:jFt,errorBarPositions:WFt,textPosition:ZFt}});var ZX=ye((p0r,Pze)=>{"use strict";var jz=Mr();Pze.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(){jz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=jz.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 XFt=Oz(),nA=Mr(),Ize=af(),YFt=wg().findExtremes,Dze=Dg(),XX=q0(),KFt=XX.calcMarkerSize,JFt=XX.calcAxisExpansion,$Ft=XX.setFirstScatter,QFt=z0(),aA=Y2(),e7t=ZX(),Rze=es().BADNUM,t7t=ox().TOO_MANY_POINTS;Fze.exports=function(t,r){var n=t._fullLayout,i=r._xA=Ize.getFromId(t,r.xaxis,"x"),a=r._yA=Ize.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=t7t,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=Dze(r,i,"x",h),x=Dze(r,a,"y",d),b=v.vals,g=x.vals;r._x=b,r._y=g,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=x.starts,r._yEnds=x.ends);var E=new Array(u),k=new Array(s);for(f=0;f1&&nA.extendFlat(o.line,aA.linePositions(e,r,n)),o.errorX||o.errorY){var s=aA.errorBarPositions(e,r,n,i,a);o.errorX&&nA.extendFlat(o.errorX,s.x),o.errorY&&nA.extendFlat(o.errorY,s.y)}return o.text&&(nA.extendFlat(o.text,{positions:n},aA.textPosition(e,r,o.text,o.marker)),nA.extendFlat(o.textSel,{positions:n},aA.textPosition(e,r,o.text,o.markerSel)),nA.extendFlat(o.textUnsel,{positions:n},aA.textPosition(e,r,o.text,o.markerUnsel))),o}});var YX=ye((m0r,Bze)=>{"use strict";var Oze=Mr(),i7t=va(),n7t=N1().DESELECTDIM;function a7t(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=Oze.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,x=c.color,b=l.color,g=Oze.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h{"use strict";var Nze=lu(),o7t=YX().styleTextSelection;Uze.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=Nze.hasText(s),x=Nze.hasMarkers(s),b=!x&&!v;if(s.visible!==!0||b)return o;var g=[],E=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var s7t=zz();Vze.exports={moduleType:"trace",name:"scattergl",basePlotModule:Jf(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:ek(),supplyDefaults:ARe(),crossTraceDefaults:$N(),colorbar:Kd(),formatLabels:MRe(),calc:qze(),hoverPoints:s7t.hoverPoints,selectPoints:KX(),meta:{}}});var jze=ye((x0r,Zz)=>{"use strict";var Wz=O5();Zz.exports=Gze;Zz.exports.to=Gze;Zz.exports.from=l7t;function Gze(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=Wz(r,0,255)&255,n=Wz(n,0,255)&255,i=Wz(i,0,255)&255,a=Wz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function l7t(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 bh=ye((b0r,Zze)=>{"use strict";var Wze=Object.getOwnPropertySymbols,u7t=Object.prototype.hasOwnProperty,c7t=Object.prototype.propertyIsEnumerable;function f7t(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function h7t(){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}}Zze.exports=h7t()?Object.assign:function(e,t){for(var r,n=f7t(e),i,a=1;a{Xze.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";Kze.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";Jze.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var Xz=ye((S0r,oA)=>{"use strict";oA.exports=ak;oA.exports.float32=oA.exports.float=ak;oA.exports.fract32=oA.exports.fract=d7t;var Qze=new Float32Array(1);function d7t(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=ak(e));for(var r=0,n=t.length;r{"use strict";function v7t(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 p7t(e,t){return y7t(e)||v7t(e,t)||tFe(e,t)||b7t()}function g7t(e){return m7t(e)||_7t(e)||tFe(e)||x7t()}function m7t(e){if(Array.isArray(e))return $X(e)}function y7t(e){if(Array.isArray(e))return e}function _7t(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tFe(e,t){if(e){if(typeof e=="string")return $X(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 $X(e,t)}}function $X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rre)?N.tree=S7t(G,{bounds:ge}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Te=Kz.float32(G);ae({data:Te,usage:"dynamic"});var Ee=Kz.fract32(G,Te);return _e({data:Ee,usage:"dynamic"}),Me({data:new Uint8Array(ke),type:"uint8",usage:"stream"}),G}},{marker:function(G,N,W){var re=N.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!G||typeof G[0]=="number"){var ae=e.addMarker(G);re[ae]=!0}else{for(var _e=[],Me=0,ke=Math.min(G.length,N.count);Me=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};rv.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";iY.exports=Qz;iY.exports.default=Qz;function Qz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=nFe(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=q7t(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 ok(a,o,r,s,l,d,0),o}function nFe(e,t,r,n,i){var a,o;if(i===rY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=iFe(a,e[a],e[a+1],o);return o&&eF(o,o.next)&&(lk(o),o=o.next),o}function J2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(eF(r,r.next)||eh(r.prev,r,r.next)===0)){if(lk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ok(e,t,r,n,i,a,o){if(e){!o&&a&&V7t(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?R7t(e,n,i,a):D7t(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),lk(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=z7t(J2(e),t,r),ok(e,t,r,n,i,a,2)):o===2&&F7t(e,t,r,n,i,a):ok(J2(e),t,r,n,i,a,1);break}}}}function D7t(e){var t=e.prev,r=e,n=e.next;if(eh(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&&sA(i,s,a,l,o,u,v.x,v.y)&&eh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function R7t(e,t,r,n){var i=e.prev,a=e,o=e.next;if(eh(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,g=eY(d,v,t,r,n),E=eY(x,b,t,r,n),k=e.prevZ,S=e.nextZ;k&&k.z>=g&&S&&S.z<=E;){if(k.x>=d&&k.x<=x&&k.y>=v&&k.y<=b&&k!==i&&k!==o&&sA(s,c,l,f,u,h,k.x,k.y)&&eh(k.prev,k,k.next)>=0||(k=k.prevZ,S.x>=d&&S.x<=x&&S.y>=v&&S.y<=b&&S!==i&&S!==o&&sA(s,c,l,f,u,h,S.x,S.y)&&eh(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;k&&k.z>=g;){if(k.x>=d&&k.x<=x&&k.y>=v&&k.y<=b&&k!==i&&k!==o&&sA(s,c,l,f,u,h,k.x,k.y)&&eh(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;S&&S.z<=E;){if(S.x>=d&&S.x<=x&&S.y>=v&&S.y<=b&&S!==i&&S!==o&&sA(s,c,l,f,u,h,S.x,S.y)&&eh(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function z7t(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!eF(i,a)&&aFe(i,n,n.next,a)&&sk(i,a)&&sk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),lk(n),lk(n.next),n=e=a),n=n.next}while(n!==e);return J2(n)}function F7t(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&j7t(o,s)){var l=oFe(o,s);o=J2(o,o.next),l=J2(l,l.next),ok(o,t,r,n,i,a,0),ok(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function q7t(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&&sA(io.x||r.x===o.x&&U7t(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function U7t(e,t){return eh(e.prev,e,t.prev)<0&&eh(t.next,e,e.next)<0}function V7t(e,t,r,n){var i=e;do i.z===0&&(i.z=eY(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,H7t(i)}function H7t(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 eY(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 G7t(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 j7t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!W7t(e,t)&&(sk(e,t)&&sk(t,e)&&Z7t(e,t)&&(eh(e.prev,e,t.prev)||eh(e,t.prev,t))||eF(e,t)&&eh(e.prev,e,e.next)>0&&eh(t.prev,t,t.next)>0)}function eh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function eF(e,t){return e.x===t.x&&e.y===t.y}function aFe(e,t,r,n){var i=$z(eh(e,t,r)),a=$z(eh(e,t,n)),o=$z(eh(r,n,e)),s=$z(eh(r,n,t));return!!(i!==a&&o!==s||i===0&&Jz(e,r,t)||a===0&&Jz(e,n,t)||o===0&&Jz(r,e,n)||s===0&&Jz(r,t,n))}function Jz(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 $z(e){return e>0?1:e<0?-1:0}function W7t(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&&aFe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function sk(e,t){return eh(e.prev,e,e.next)<0?eh(e,t,e.next)>=0&&eh(e,e.prev,t)>=0:eh(e,t,e.prev)<0||eh(e,e.next,t)<0}function Z7t(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 oFe(e,t){var r=new tY(e.i,e.x,e.y),n=new tY(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 iFe(e,t,r,n){var i=new tY(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 lk(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 tY(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}Qz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(rY(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 uFe=ye((k0r,lFe)=>{"use strict";var X7t=j2();lFe.exports=Y7t;function Y7t(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=X7t(e,t));for(var n=0;n{"use strict";cFe.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 dFe=ye((L0r,hFe)=>{"use strict";hFe.exports=function(){}});var sx=ye((P0r,vFe)=>{"use strict";var K7t=dFe()();vFe.exports=function(e){return e!==K7t&&e!==null}});var nY=ye((I0r,gFe)=>{"use strict";var J7t=Object.create,$7t=Object.getPrototypeOf,pFe={};gFe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||J7t;return typeof e!="function"?!1:$7t(e(t(null),pFe))===pFe}});var aY=ye((D0r,mFe)=>{"use strict";var Q7t=sx(),e9t={function:!0,object:!0};mFe.exports=function(e){return Q7t(e)&&e9t[typeof e]||!1}});var i1=ye((R0r,yFe)=>{"use strict";var t9t=sx();yFe.exports=function(e){if(!t9t(e))throw new TypeError("Cannot use null or undefined");return e}});var xFe=ye((z0r,_Fe)=>{"use strict";var oY=Object.create,tF;nY()()||(tF=sY());_Fe.exports=function(){var e,t,r;return!tF||tF.level!==1?oY:(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(tF,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return oY(n===null?e:n,i)})}()});var sY=ye((F0r,bFe)=>{"use strict";var r9t=aY(),i9t=i1(),n9t=Object.prototype.isPrototypeOf,a9t=Object.defineProperty,o9t={configurable:!0,enumerable:!1,writable:!0,value:void 0},rF;rF=function(e,t){if(i9t(e),t===null||r9t(t))return e;throw new TypeError("Prototype must be null or an object")};bFe.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(rF(n,i),i),n}):t=function(n,i){return rF(n,i).__proto__=i,n}:t=function n(i,a){var o;return rF(i,a),o=n9t.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&a9t(n.nullPolyfill,"__proto__",o9t),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)}());xFe()});var iF=ye((q0r,wFe)=>{"use strict";wFe.exports=nY()()?Object.setPrototypeOf:sY()});var AFe=ye((O0r,TFe)=>{"use strict";var s9t=aY();TFe.exports=function(e){if(!s9t(e))throw new TypeError(e+" is not an Object");return e}});var MFe=ye((B0r,SFe)=>{"use strict";var l9t=Object.create(null),u9t=Math.random;SFe.exports=function(){var e;do e=u9t().toString(36).slice(2);while(l9t[e]);return e}});var $2=ye((N0r,EFe)=>{"use strict";var c9t=void 0;EFe.exports=function(e){return e!==c9t&&e!==null}});var nF=ye((U0r,kFe)=>{"use strict";var f9t=$2(),h9t={object:!0,function:!0,undefined:!0};kFe.exports=function(e){return f9t(e)?hasOwnProperty.call(h9t,typeof e):!1}});var LFe=ye((V0r,CFe)=>{"use strict";var d9t=nF();CFe.exports=function(e){if(!d9t(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var IFe=ye((H0r,PFe)=>{"use strict";var v9t=LFe();PFe.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!v9t(e)}});var lY=ye((G0r,DFe)=>{"use strict";var p9t=IFe(),g9t=/^\s*class[\s{/}]/,m9t=Function.prototype.toString;DFe.exports=function(e){return!(!p9t(e)||g9t.test(m9t.call(e)))}});var zFe=ye((j0r,RFe)=>{"use strict";RFe.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 qFe=ye((W0r,FFe)=>{"use strict";FFe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var BFe=ye((Z0r,OFe)=>{"use strict";var y9t=sx(),_9t=Object.keys;OFe.exports=function(e){return _9t(y9t(e)?Object(e):e)}});var UFe=ye((X0r,NFe)=>{"use strict";NFe.exports=qFe()()?Object.keys:BFe()});var HFe=ye((Y0r,VFe)=>{"use strict";var x9t=UFe(),b9t=i1(),w9t=Math.max;VFe.exports=function(e,t){var r,n,i=w9t(arguments.length,2),a;for(e=Object(b9t(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";GFe.exports=zFe()()?Object.assign:HFe()});var uY=ye((J0r,jFe)=>{"use strict";var T9t=sx(),A9t=Array.prototype.forEach,S9t=Object.create,M9t=function(e,t){var r;for(r in e)t[r]=e[r]};jFe.exports=function(e){var t=S9t(null);return A9t.call(arguments,function(r){T9t(r)&&M9t(Object(r),t)}),t}});var ZFe=ye(($0r,WFe)=>{"use strict";var cY="razdwatrzy";WFe.exports=function(){return typeof cY.contains!="function"?!1:cY.contains("dwa")===!0&&cY.contains("foo")===!1}});var YFe=ye((Q0r,XFe)=>{"use strict";var E9t=String.prototype.indexOf;XFe.exports=function(e){return E9t.call(this,e,arguments[1])>-1}});var fY=ye((egr,KFe)=>{"use strict";KFe.exports=ZFe()()?String.prototype.contains:YFe()});var n1=ye((tgr,e7e)=>{"use strict";var oF=$2(),JFe=lY(),$Fe=aF(),QFe=uY(),uk=fY(),k9t=e7e.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],oF(e)?(r=uk.call(e,"c"),n=uk.call(e,"e"),i=uk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?$Fe(QFe(a),o):o};k9t.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],oF(t)?JFe(t)?oF(r)?JFe(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,oF(e)?(n=uk.call(e,"c"),i=uk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?$Fe(QFe(a),o):o}});var ck=ye((rgr,r7e)=>{"use strict";var t7e=Object.prototype.toString,C9t=t7e.call(function(){return arguments}());r7e.exports=function(e){return t7e.call(e)===C9t}});var fk=ye((igr,n7e)=>{"use strict";var i7e=Object.prototype.toString,L9t=i7e.call("");n7e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||i7e.call(e)===L9t)||!1}});var o7e=ye((ngr,a7e)=>{"use strict";a7e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var u7e=ye((agr,l7e)=>{var s7e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};l7e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return s7e()}try{return __global__||s7e()}finally{delete Object.prototype.__global__}}()});var hk=ye((ogr,c7e)=>{"use strict";c7e.exports=o7e()()?globalThis:u7e()});var h7e=ye((sgr,f7e)=>{"use strict";var P9t=hk(),hY={object:!0,symbol:!0};f7e.exports=function(){var e=P9t.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!hY[typeof e.iterator]||!hY[typeof e.toPrimitive]||!hY[typeof e.toStringTag])}});var v7e=ye((lgr,d7e)=>{"use strict";d7e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var dY=ye((ugr,p7e)=>{"use strict";var I9t=v7e();p7e.exports=function(e){if(!I9t(e))throw new TypeError(e+" is not a symbol");return e}});var x7e=ye((cgr,_7e)=>{"use strict";var g7e=n1(),D9t=Object.create,m7e=Object.defineProperty,R9t=Object.prototype,y7e=D9t(null);_7e.exports=function(e){for(var t=0,r,n;y7e[e+(t||"")];)++t;return e+=t||"",y7e[e]=!0,r="@@"+e,m7e(R9t,r,g7e.gs(null,function(i){n||(n=!0,m7e(this,r,g7e(i)),n=!1)})),r}});var w7e=ye((fgr,b7e)=>{"use strict";var Qg=n1(),wh=hk().Symbol;b7e.exports=function(e){return Object.defineProperties(e,{hasInstance:Qg("",wh&&wh.hasInstance||e("hasInstance")),isConcatSpreadable:Qg("",wh&&wh.isConcatSpreadable||e("isConcatSpreadable")),iterator:Qg("",wh&&wh.iterator||e("iterator")),match:Qg("",wh&&wh.match||e("match")),replace:Qg("",wh&&wh.replace||e("replace")),search:Qg("",wh&&wh.search||e("search")),species:Qg("",wh&&wh.species||e("species")),split:Qg("",wh&&wh.split||e("split")),toPrimitive:Qg("",wh&&wh.toPrimitive||e("toPrimitive")),toStringTag:Qg("",wh&&wh.toStringTag||e("toStringTag")),unscopables:Qg("",wh&&wh.unscopables||e("unscopables"))})}});var S7e=ye((hgr,A7e)=>{"use strict";var T7e=n1(),z9t=dY(),dk=Object.create(null);A7e.exports=function(e){return Object.defineProperties(e,{for:T7e(function(t){return dk[t]?dk[t]:dk[t]=e(String(t))}),keyFor:T7e(function(t){var r;z9t(t);for(r in dk)if(dk[r]===t)return r})})}});var k7e=ye((dgr,E7e)=>{"use strict";var Xm=n1(),vY=dY(),sF=hk().Symbol,F9t=x7e(),q9t=w7e(),O9t=S7e(),B9t=Object.create,pY=Object.defineProperties,lF=Object.defineProperty,Wv,lA,M7e;if(typeof sF=="function")try{String(sF()),M7e=!0}catch(e){}else sF=null;lA=function(t){if(this instanceof lA)throw new TypeError("Symbol is not a constructor");return Wv(t)};E7e.exports=Wv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return M7e?sF(t):(r=B9t(lA.prototype),t=t===void 0?"":String(t),pY(r,{__description__:Xm("",t),__name__:Xm("",F9t(t))}))};q9t(Wv);O9t(Wv);pY(lA.prototype,{constructor:Xm(Wv),toString:Xm("",function(){return this.__name__})});pY(Wv.prototype,{toString:Xm(function(){return"Symbol ("+vY(this).__description__+")"}),valueOf:Xm(function(){return vY(this)})});lF(Wv.prototype,Wv.toPrimitive,Xm("",function(){var e=vY(this);return typeof e=="symbol"?e:e.toString()}));lF(Wv.prototype,Wv.toStringTag,Xm("c","Symbol"));lF(lA.prototype,Wv.toStringTag,Xm("c",Wv.prototype[Wv.toStringTag]));lF(lA.prototype,Wv.toPrimitive,Xm("c",Wv.prototype[Wv.toPrimitive]))});var lx=ye((vgr,C7e)=>{"use strict";C7e.exports=h7e()()?hk().Symbol:k7e()});var P7e=ye((pgr,L7e)=>{"use strict";var N9t=i1();L7e.exports=function(){return N9t(this).length=0,this}});var uA=ye((ggr,I7e)=>{"use strict";I7e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var R7e=ye((mgr,D7e)=>{"use strict";var U9t=$2(),V9t=nF(),H9t=Object.prototype.toString;D7e.exports=function(e){if(!U9t(e))return null;if(V9t(e)){var t=e.toString;if(typeof t!="function"||t===H9t)return null}try{return""+e}catch(r){return null}}});var F7e=ye((ygr,z7e)=>{"use strict";z7e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var O7e=ye((_gr,q7e)=>{"use strict";var G9t=F7e(),j9t=/[\n\r\u2028\u2029]/g;q7e.exports=function(e){var t=G9t(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(j9t,function(r){switch(r){case` +`]),eFe&&(v.frag=v.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(v)}rv.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};rv.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};rv.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nre)?N.tree=S7t(G,{bounds:ge}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Te=Kz.float32(G);ae({data:Te,usage:"dynamic"});var Ee=Kz.fract32(G,Te);return _e({data:Ee,usage:"dynamic"}),Me({data:new Uint8Array(ke),type:"uint8",usage:"stream"}),G}},{marker:function(G,N,W){var re=N.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!G||typeof G[0]=="number"){var ae=e.addMarker(G);re[ae]=!0}else{for(var _e=[],Me=0,ke=Math.min(G.length,N.count);Me=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};rv.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";iY.exports=Qz;iY.exports.default=Qz;function Qz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=nFe(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=q7t(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 ok(a,o,r,s,l,d,0),o}function nFe(e,t,r,n,i){var a,o;if(i===rY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=iFe(a,e[a],e[a+1],o);return o&&eF(o,o.next)&&(lk(o),o=o.next),o}function J2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(eF(r,r.next)||eh(r.prev,r,r.next)===0)){if(lk(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ok(e,t,r,n,i,a,o){if(e){!o&&a&&V7t(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?R7t(e,n,i,a):D7t(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),lk(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=z7t(J2(e),t,r),ok(e,t,r,n,i,a,2)):o===2&&F7t(e,t,r,n,i,a):ok(J2(e),t,r,n,i,a,1);break}}}}function D7t(e){var t=e.prev,r=e,n=e.next;if(eh(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&&sA(i,s,a,l,o,u,v.x,v.y)&&eh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function R7t(e,t,r,n){var i=e.prev,a=e,o=e.next;if(eh(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,g=eY(d,v,t,r,n),E=eY(x,b,t,r,n),k=e.prevZ,A=e.nextZ;k&&k.z>=g&&A&&A.z<=E;){if(k.x>=d&&k.x<=x&&k.y>=v&&k.y<=b&&k!==i&&k!==o&&sA(s,c,l,f,u,h,k.x,k.y)&&eh(k.prev,k,k.next)>=0||(k=k.prevZ,A.x>=d&&A.x<=x&&A.y>=v&&A.y<=b&&A!==i&&A!==o&&sA(s,c,l,f,u,h,A.x,A.y)&&eh(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;k&&k.z>=g;){if(k.x>=d&&k.x<=x&&k.y>=v&&k.y<=b&&k!==i&&k!==o&&sA(s,c,l,f,u,h,k.x,k.y)&&eh(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;A&&A.z<=E;){if(A.x>=d&&A.x<=x&&A.y>=v&&A.y<=b&&A!==i&&A!==o&&sA(s,c,l,f,u,h,A.x,A.y)&&eh(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function z7t(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!eF(i,a)&&aFe(i,n,n.next,a)&&sk(i,a)&&sk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),lk(n),lk(n.next),n=e=a),n=n.next}while(n!==e);return J2(n)}function F7t(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&j7t(o,s)){var l=oFe(o,s);o=J2(o,o.next),l=J2(l,l.next),ok(o,t,r,n,i,a,0),ok(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function q7t(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&&sA(io.x||r.x===o.x&&U7t(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function U7t(e,t){return eh(e.prev,e,t.prev)<0&&eh(t.next,e,e.next)<0}function V7t(e,t,r,n){var i=e;do i.z===0&&(i.z=eY(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,H7t(i)}function H7t(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 eY(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 G7t(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 j7t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!W7t(e,t)&&(sk(e,t)&&sk(t,e)&&Z7t(e,t)&&(eh(e.prev,e,t.prev)||eh(e,t.prev,t))||eF(e,t)&&eh(e.prev,e,e.next)>0&&eh(t.prev,t,t.next)>0)}function eh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function eF(e,t){return e.x===t.x&&e.y===t.y}function aFe(e,t,r,n){var i=$z(eh(e,t,r)),a=$z(eh(e,t,n)),o=$z(eh(r,n,e)),s=$z(eh(r,n,t));return!!(i!==a&&o!==s||i===0&&Jz(e,r,t)||a===0&&Jz(e,n,t)||o===0&&Jz(r,e,n)||s===0&&Jz(r,t,n))}function Jz(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 $z(e){return e>0?1:e<0?-1:0}function W7t(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&&aFe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function sk(e,t){return eh(e.prev,e,e.next)<0?eh(e,t,e.next)>=0&&eh(e,e.prev,t)>=0:eh(e,t,e.prev)<0||eh(e,e.next,t)<0}function Z7t(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 oFe(e,t){var r=new tY(e.i,e.x,e.y),n=new tY(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 iFe(e,t,r,n){var i=new tY(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 lk(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 tY(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}Qz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(rY(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 uFe=ye((k0r,lFe)=>{"use strict";var X7t=j2();lFe.exports=Y7t;function Y7t(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=X7t(e,t));for(var n=0;n{"use strict";cFe.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 dFe=ye((L0r,hFe)=>{"use strict";hFe.exports=function(){}});var sx=ye((P0r,vFe)=>{"use strict";var K7t=dFe()();vFe.exports=function(e){return e!==K7t&&e!==null}});var nY=ye((I0r,gFe)=>{"use strict";var J7t=Object.create,$7t=Object.getPrototypeOf,pFe={};gFe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||J7t;return typeof e!="function"?!1:$7t(e(t(null),pFe))===pFe}});var aY=ye((D0r,mFe)=>{"use strict";var Q7t=sx(),e9t={function:!0,object:!0};mFe.exports=function(e){return Q7t(e)&&e9t[typeof e]||!1}});var i1=ye((R0r,yFe)=>{"use strict";var t9t=sx();yFe.exports=function(e){if(!t9t(e))throw new TypeError("Cannot use null or undefined");return e}});var xFe=ye((z0r,_Fe)=>{"use strict";var oY=Object.create,tF;nY()()||(tF=sY());_Fe.exports=function(){var e,t,r;return!tF||tF.level!==1?oY:(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(tF,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return oY(n===null?e:n,i)})}()});var sY=ye((F0r,bFe)=>{"use strict";var r9t=aY(),i9t=i1(),n9t=Object.prototype.isPrototypeOf,a9t=Object.defineProperty,o9t={configurable:!0,enumerable:!1,writable:!0,value:void 0},rF;rF=function(e,t){if(i9t(e),t===null||r9t(t))return e;throw new TypeError("Prototype must be null or an object")};bFe.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(rF(n,i),i),n}):t=function(n,i){return rF(n,i).__proto__=i,n}:t=function n(i,a){var o;return rF(i,a),o=n9t.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&a9t(n.nullPolyfill,"__proto__",o9t),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)}());xFe()});var iF=ye((q0r,wFe)=>{"use strict";wFe.exports=nY()()?Object.setPrototypeOf:sY()});var AFe=ye((O0r,TFe)=>{"use strict";var s9t=aY();TFe.exports=function(e){if(!s9t(e))throw new TypeError(e+" is not an Object");return e}});var MFe=ye((B0r,SFe)=>{"use strict";var l9t=Object.create(null),u9t=Math.random;SFe.exports=function(){var e;do e=u9t().toString(36).slice(2);while(l9t[e]);return e}});var $2=ye((N0r,EFe)=>{"use strict";var c9t=void 0;EFe.exports=function(e){return e!==c9t&&e!==null}});var nF=ye((U0r,kFe)=>{"use strict";var f9t=$2(),h9t={object:!0,function:!0,undefined:!0};kFe.exports=function(e){return f9t(e)?hasOwnProperty.call(h9t,typeof e):!1}});var LFe=ye((V0r,CFe)=>{"use strict";var d9t=nF();CFe.exports=function(e){if(!d9t(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var IFe=ye((H0r,PFe)=>{"use strict";var v9t=LFe();PFe.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!v9t(e)}});var lY=ye((G0r,DFe)=>{"use strict";var p9t=IFe(),g9t=/^\s*class[\s{/}]/,m9t=Function.prototype.toString;DFe.exports=function(e){return!(!p9t(e)||g9t.test(m9t.call(e)))}});var zFe=ye((j0r,RFe)=>{"use strict";RFe.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 qFe=ye((W0r,FFe)=>{"use strict";FFe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var BFe=ye((Z0r,OFe)=>{"use strict";var y9t=sx(),_9t=Object.keys;OFe.exports=function(e){return _9t(y9t(e)?Object(e):e)}});var UFe=ye((X0r,NFe)=>{"use strict";NFe.exports=qFe()()?Object.keys:BFe()});var HFe=ye((Y0r,VFe)=>{"use strict";var x9t=UFe(),b9t=i1(),w9t=Math.max;VFe.exports=function(e,t){var r,n,i=w9t(arguments.length,2),a;for(e=Object(b9t(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";GFe.exports=zFe()()?Object.assign:HFe()});var uY=ye((J0r,jFe)=>{"use strict";var T9t=sx(),A9t=Array.prototype.forEach,S9t=Object.create,M9t=function(e,t){var r;for(r in e)t[r]=e[r]};jFe.exports=function(e){var t=S9t(null);return A9t.call(arguments,function(r){T9t(r)&&M9t(Object(r),t)}),t}});var ZFe=ye(($0r,WFe)=>{"use strict";var cY="razdwatrzy";WFe.exports=function(){return typeof cY.contains!="function"?!1:cY.contains("dwa")===!0&&cY.contains("foo")===!1}});var YFe=ye((Q0r,XFe)=>{"use strict";var E9t=String.prototype.indexOf;XFe.exports=function(e){return E9t.call(this,e,arguments[1])>-1}});var fY=ye((egr,KFe)=>{"use strict";KFe.exports=ZFe()()?String.prototype.contains:YFe()});var n1=ye((tgr,e7e)=>{"use strict";var oF=$2(),JFe=lY(),$Fe=aF(),QFe=uY(),uk=fY(),k9t=e7e.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],oF(e)?(r=uk.call(e,"c"),n=uk.call(e,"e"),i=uk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?$Fe(QFe(a),o):o};k9t.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],oF(t)?JFe(t)?oF(r)?JFe(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,oF(e)?(n=uk.call(e,"c"),i=uk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?$Fe(QFe(a),o):o}});var ck=ye((rgr,r7e)=>{"use strict";var t7e=Object.prototype.toString,C9t=t7e.call(function(){return arguments}());r7e.exports=function(e){return t7e.call(e)===C9t}});var fk=ye((igr,n7e)=>{"use strict";var i7e=Object.prototype.toString,L9t=i7e.call("");n7e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||i7e.call(e)===L9t)||!1}});var o7e=ye((ngr,a7e)=>{"use strict";a7e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var u7e=ye((agr,l7e)=>{var s7e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};l7e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return s7e()}try{return __global__||s7e()}finally{delete Object.prototype.__global__}}()});var hk=ye((ogr,c7e)=>{"use strict";c7e.exports=o7e()()?globalThis:u7e()});var h7e=ye((sgr,f7e)=>{"use strict";var P9t=hk(),hY={object:!0,symbol:!0};f7e.exports=function(){var e=P9t.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!hY[typeof e.iterator]||!hY[typeof e.toPrimitive]||!hY[typeof e.toStringTag])}});var v7e=ye((lgr,d7e)=>{"use strict";d7e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var dY=ye((ugr,p7e)=>{"use strict";var I9t=v7e();p7e.exports=function(e){if(!I9t(e))throw new TypeError(e+" is not a symbol");return e}});var x7e=ye((cgr,_7e)=>{"use strict";var g7e=n1(),D9t=Object.create,m7e=Object.defineProperty,R9t=Object.prototype,y7e=D9t(null);_7e.exports=function(e){for(var t=0,r,n;y7e[e+(t||"")];)++t;return e+=t||"",y7e[e]=!0,r="@@"+e,m7e(R9t,r,g7e.gs(null,function(i){n||(n=!0,m7e(this,r,g7e(i)),n=!1)})),r}});var w7e=ye((fgr,b7e)=>{"use strict";var Qg=n1(),wh=hk().Symbol;b7e.exports=function(e){return Object.defineProperties(e,{hasInstance:Qg("",wh&&wh.hasInstance||e("hasInstance")),isConcatSpreadable:Qg("",wh&&wh.isConcatSpreadable||e("isConcatSpreadable")),iterator:Qg("",wh&&wh.iterator||e("iterator")),match:Qg("",wh&&wh.match||e("match")),replace:Qg("",wh&&wh.replace||e("replace")),search:Qg("",wh&&wh.search||e("search")),species:Qg("",wh&&wh.species||e("species")),split:Qg("",wh&&wh.split||e("split")),toPrimitive:Qg("",wh&&wh.toPrimitive||e("toPrimitive")),toStringTag:Qg("",wh&&wh.toStringTag||e("toStringTag")),unscopables:Qg("",wh&&wh.unscopables||e("unscopables"))})}});var S7e=ye((hgr,A7e)=>{"use strict";var T7e=n1(),z9t=dY(),dk=Object.create(null);A7e.exports=function(e){return Object.defineProperties(e,{for:T7e(function(t){return dk[t]?dk[t]:dk[t]=e(String(t))}),keyFor:T7e(function(t){var r;z9t(t);for(r in dk)if(dk[r]===t)return r})})}});var k7e=ye((dgr,E7e)=>{"use strict";var Xm=n1(),vY=dY(),sF=hk().Symbol,F9t=x7e(),q9t=w7e(),O9t=S7e(),B9t=Object.create,pY=Object.defineProperties,lF=Object.defineProperty,Wv,lA,M7e;if(typeof sF=="function")try{String(sF()),M7e=!0}catch(e){}else sF=null;lA=function(t){if(this instanceof lA)throw new TypeError("Symbol is not a constructor");return Wv(t)};E7e.exports=Wv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return M7e?sF(t):(r=B9t(lA.prototype),t=t===void 0?"":String(t),pY(r,{__description__:Xm("",t),__name__:Xm("",F9t(t))}))};q9t(Wv);O9t(Wv);pY(lA.prototype,{constructor:Xm(Wv),toString:Xm("",function(){return this.__name__})});pY(Wv.prototype,{toString:Xm(function(){return"Symbol ("+vY(this).__description__+")"}),valueOf:Xm(function(){return vY(this)})});lF(Wv.prototype,Wv.toPrimitive,Xm("",function(){var e=vY(this);return typeof e=="symbol"?e:e.toString()}));lF(Wv.prototype,Wv.toStringTag,Xm("c","Symbol"));lF(lA.prototype,Wv.toStringTag,Xm("c",Wv.prototype[Wv.toStringTag]));lF(lA.prototype,Wv.toPrimitive,Xm("c",Wv.prototype[Wv.toPrimitive]))});var lx=ye((vgr,C7e)=>{"use strict";C7e.exports=h7e()()?hk().Symbol:k7e()});var P7e=ye((pgr,L7e)=>{"use strict";var N9t=i1();L7e.exports=function(){return N9t(this).length=0,this}});var uA=ye((ggr,I7e)=>{"use strict";I7e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var R7e=ye((mgr,D7e)=>{"use strict";var U9t=$2(),V9t=nF(),H9t=Object.prototype.toString;D7e.exports=function(e){if(!U9t(e))return null;if(V9t(e)){var t=e.toString;if(typeof t!="function"||t===H9t)return null}try{return""+e}catch(r){return null}}});var F7e=ye((ygr,z7e)=>{"use strict";z7e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var O7e=ye((_gr,q7e)=>{"use strict";var G9t=F7e(),j9t=/[\n\r\u2028\u2029]/g;q7e.exports=function(e){var t=G9t(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(j9t,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 gY=ye((xgr,U7e)=>{"use strict";var B7e=$2(),W9t=nF(),Z9t=R7e(),X9t=O7e(),N7e=function(e,t){return e.replace("%v",X9t(t))};U7e.exports=function(e,t,r){if(!W9t(r))throw new TypeError(N7e(t,e));if(!B7e(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=Z9t(r.errorMessage);throw B7e(n)||(n=t),new TypeError(N7e(n,e))}});var H7e=ye((bgr,V7e)=>{"use strict";var Y9t=gY(),K9t=$2();V7e.exports=function(e){return K9t(e)?e:Y9t(e,"Cannot use %v",arguments[1])}});var j7e=ye((wgr,G7e)=>{"use strict";var J9t=gY(),$9t=lY();G7e.exports=function(e){return $9t(e)?e:J9t(e,"%v is not a plain function",arguments[1])}});var Z7e=ye((Tgr,W7e)=>{"use strict";W7e.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 Y7e=ye((Agr,X7e)=>{"use strict";var Q9t=Object.prototype.toString,eqt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);X7e.exports=function(e){return typeof e=="function"&&eqt(Q9t.call(e))}});var J7e=ye((Sgr,K7e)=>{"use strict";K7e.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var Q7e=ye((Mgr,$7e)=>{"use strict";$7e.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var t9e=ye((Egr,e9e)=>{"use strict";e9e.exports=J7e()()?Math.sign:Q7e()});var i9e=ye((kgr,r9e)=>{"use strict";var tqt=t9e(),rqt=Math.abs,iqt=Math.floor;r9e.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:tqt(e)*iqt(rqt(e)))}});var a9e=ye((Cgr,n9e)=>{"use strict";var nqt=i9e(),aqt=Math.max;n9e.exports=function(e){return aqt(0,nqt(e))}});var u9e=ye((Lgr,l9e)=>{"use strict";var oqt=lx().iterator,sqt=ck(),lqt=Y7e(),uqt=a9e(),o9e=uA(),cqt=i1(),fqt=sx(),hqt=fk(),s9e=Array.isArray,mY=Function.prototype.call,Q2={configurable:!0,enumerable:!0,writable:!0,value:null},yY=Object.defineProperty;l9e.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(cqt(e)),fqt(t)&&o9e(t),!this||this===Array||!lqt(this)){if(!t){if(sqt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(s9e(e)){for(o=new Array(s=e.length),i=0;i=55296&&l<=56319&&(h+=e[++i])),h=t?mY.call(t,r,h,a):h,n?(Q2.value=h,yY(o,a,Q2)):o[a]=h,++a;s=a}}if(s===void 0)for(s=uqt(e.length),n&&(o=new n(s)),i=0;i{"use strict";c9e.exports=Z7e()()?Array.from:u9e()});var d9e=ye((Igr,h9e)=>{"use strict";var dqt=f9e(),vqt=aF(),pqt=i1();h9e.exports=function(e){var t=Object(pqt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?dqt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):vqt(i,e),i}});var g9e=ye((Dgr,p9e)=>{"use strict";var gqt=uA(),mqt=i1(),yqt=Function.prototype.bind,v9e=Function.prototype.call,_qt=Object.keys,xqt=Object.prototype.propertyIsEnumerable;p9e.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(mqt(r)),gqt(n),i=_qt(r),o&&i.sort(typeof o=="function"?yqt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),v9e.call(e,i,function(s,l){return xqt.call(r,s)?v9e.call(n,a,r[s],s,r,l):t})}}});var y9e=ye((Rgr,m9e)=>{"use strict";m9e.exports=g9e()("forEach")});var x9e=ye((zgr,_9e)=>{"use strict";var bqt=uA(),wqt=y9e(),Tqt=Function.prototype.call;_9e.exports=function(e,t){var r={},n=arguments[2];return bqt(t),wqt(e,function(i,a,o,s){r[a]=Tqt.call(t,n,i,a,o,s)}),r}});var A9e=ye((Fgr,T9e)=>{"use strict";var Aqt=$2(),Sqt=H7e(),b9e=j7e(),Mqt=d9e(),Eqt=uY(),kqt=x9e(),Cqt=Function.prototype.bind,Lqt=Object.defineProperty,Pqt=Object.prototype.hasOwnProperty,w9e;w9e=function(e,t,r){var n=Sqt(t)&&b9e(t.value),i;return i=Mqt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&Pqt.call(this,e)?n:(t.value=Cqt.call(n,r.resolveContext?r.resolveContext(this):this),Lqt(this,e,t),this[e])},i};T9e.exports=function(e){var t=Eqt(arguments[1]);return Aqt(t.resolveContext)&&b9e(t.resolveContext),kqt(e,function(r,n){return w9e(n,r,t)})}});var _Y=ye((qgr,k9e)=>{"use strict";var Iqt=P7e(),Dqt=aF(),Rqt=uA(),zqt=i1(),Op=n1(),Fqt=A9e(),S9e=lx(),M9e=Object.defineProperty,E9e=Object.defineProperties,vk;k9e.exports=vk=function(e,t){if(!(this instanceof vk))throw new TypeError("Constructor requires 'new'");E9e(this,{__list__:Op("w",zqt(e)),__context__:Op("w",t),__nextIndex__:Op("w",0)}),t&&(Rqt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete vk.prototype.constructor;E9e(vk.prototype,Dqt({_next:Op(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__){M9e(this,"__redo__",Op("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Op(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:Op(function(){this.__redo__&&Iqt.call(this.__redo__),this.__nextIndex__=0})})));M9e(vk.prototype,S9e.iterator,Op(function(){return this}))});var D9e=ye((Ogr,I9e)=>{"use strict";var C9e=iF(),L9e=fY(),xY=n1(),qqt=lx(),bY=_Y(),P9e=Object.defineProperty,cA;cA=I9e.exports=function(e,t){if(!(this instanceof cA))throw new TypeError("Constructor requires 'new'");bY.call(this,e),t?L9e.call(t,"key+value")?t="key+value":L9e.call(t,"key")?t="key":t="value":t="value",P9e(this,"__kind__",xY("",t))};C9e&&C9e(cA,bY);delete cA.prototype.constructor;cA.prototype=Object.create(bY.prototype,{_resolve:xY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});P9e(cA.prototype,qqt.toStringTag,xY("c","Array Iterator"))});var q9e=ye((Bgr,F9e)=>{"use strict";var R9e=iF(),uF=n1(),Oqt=lx(),wY=_Y(),z9e=Object.defineProperty,fA;fA=F9e.exports=function(e){if(!(this instanceof fA))throw new TypeError("Constructor requires 'new'");e=String(e),wY.call(this,e),z9e(this,"__length__",uF("",e.length))};R9e&&R9e(fA,wY);delete fA.prototype.constructor;fA.prototype=Object.create(wY.prototype,{_next:uF(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});z9e(fA.prototype,Oqt.toStringTag,uF("c","String Iterator"))});var B9e=ye((Ngr,O9e)=>{"use strict";var Bqt=ck(),Nqt=sx(),Uqt=fk(),Vqt=lx().iterator,Hqt=Array.isArray;O9e.exports=function(e){return Nqt(e)?Hqt(e)||Uqt(e)||Bqt(e)?!0:typeof e[Vqt]=="function":!1}});var U9e=ye((Ugr,N9e)=>{"use strict";var Gqt=B9e();N9e.exports=function(e){if(!Gqt(e))throw new TypeError(e+" is not iterable");return e}});var TY=ye((Vgr,G9e)=>{"use strict";var jqt=ck(),Wqt=fk(),V9e=D9e(),Zqt=q9e(),Xqt=U9e(),H9e=lx().iterator;G9e.exports=function(e){return typeof Xqt(e)[H9e]=="function"?e[H9e]():jqt(e)?new V9e(e):Wqt(e)?new Zqt(e):new V9e(e)}});var W9e=ye((Hgr,j9e)=>{"use strict";var Yqt=ck(),Kqt=uA(),Jqt=fk(),$qt=TY(),Qqt=Array.isArray,AY=Function.prototype.call,eOt=Array.prototype.some;j9e.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(Qqt(e)||Yqt(e)?r="array":Jqt(e)?r="string":e=$qt(e),Kqt(t),a=function(){o=!0},r==="array"){eOt.call(e,function(f){return AY.call(t,n,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),AY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(AY.call(t,n,i.value,a),o)return;i=e.next()}}});var X9e=ye((Ggr,Z9e)=>{"use strict";Z9e.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var J9e=ye((jgr,K9e)=>{"use strict";var tOt=sx(),fF=iF(),cF=AFe(),rOt=i1(),iOt=MFe(),a1=n1(),nOt=TY(),aOt=W9e(),oOt=lx().toStringTag,Y9e=X9e(),sOt=Array.isArray,MY=Object.defineProperty,SY=Object.prototype.hasOwnProperty,lOt=Object.getPrototypeOf,ux;K9e.exports=ux=function(){var e=arguments[0],t;if(!(this instanceof ux))throw new TypeError("Constructor requires 'new'");return t=Y9e&&fF&&WeakMap!==ux?fF(new WeakMap,lOt(this)):this,tOt(e)&&(sOt(e)||(e=nOt(e))),MY(t,"__weakMapData__",a1("c","$weakMap$"+iOt())),e&&aOt(e,function(r){rOt(r),t.set(r[0],r[1])}),t};Y9e&&(fF&&fF(ux,WeakMap),ux.prototype=Object.create(WeakMap.prototype,{constructor:a1(ux)}));Object.defineProperties(ux.prototype,{delete:a1(function(e){return SY.call(cF(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:a1(function(e){if(SY.call(cF(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:a1(function(e){return SY.call(cF(e),this.__weakMapData__)}),set:a1(function(e,t){return MY(cF(e),this.__weakMapData__,a1("c",t)),this}),toString:a1(function(){return"[object WeakMap]"})});MY(ux.prototype,oOt,a1("c","WeakMap"))});var EY=ye((Wgr,$9e)=>{"use strict";$9e.exports=fFe()()?WeakMap:J9e()});var eqe=ye((Zgr,Q9e)=>{"use strict";Q9e.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 hF=J_(),uOt=j2(),CY=bh(),cOt=Zm(),fOt=W2(),tqe=sFe(),hOt=uFe(),{float32:dOt,fract32:kY}=Xz(),vOt=EY(),rqe=eA(),pOt=eqe(),gOt=` precision highp float; @@ -2584,7 +2584,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;iqe.exports=uc;function uc(e,t){if(!(this instanceof uc))return new uc(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=uc.shaders.has(e)?uc.shaders.get(e):uc.shaders.set(e,uc.createShaders(e)).get(e),this.update(t)}uc.dashMult=2;uc.maxPatternLength=256;uc.precisionThreshold=3e6;uc.maxPoints=1e4;uc.maxLines=2048;uc.shaders=new vOt;uc.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(CY({vert:gOt,frag:mOt,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(CY({cull:{enable:!0,face:"back"},vert:xOt,frag:bOt,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:yOt,frag:_Ot,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}};uc.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};uc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};uc.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>uc.precisionThreshold||t.scale[1]*t.viewport.height>uc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=uc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};uc.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=cOt(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=CY({},uc.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-_),E=[],k=0,S=o.hole!=null?o.hole[0]:null;if(S!=null){let L=pOt(g,_=>_>=S);g=g.slice(0,L),g.push(S)}for(let L=0;Lp-S+(g[L]-k)),M=tqe(_,C);M=M.map(p=>p+k+(p+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var lqe=ye((Ygr,sqe)=>{"use strict";var wOt=j2(),TOt=J_(),AOt=JX(),SOt=Zm(),nqe=bh(),aqe=W2(),{float32:MOt,fract32:PY}=Xz();sqe.exports=EOt;var oqe=[[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 EOt(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:oqe}),v(t),n=e({vert:` +`;iqe.exports=uc;function uc(e,t){if(!(this instanceof uc))return new uc(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=uc.shaders.has(e)?uc.shaders.get(e):uc.shaders.set(e,uc.createShaders(e)).get(e),this.update(t)}uc.dashMult=2;uc.maxPatternLength=256;uc.precisionThreshold=3e6;uc.maxPoints=1e4;uc.maxLines=2048;uc.shaders=new vOt;uc.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(CY({vert:gOt,frag:mOt,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(CY({cull:{enable:!0,face:"back"},vert:xOt,frag:bOt,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:yOt,frag:_Ot,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}};uc.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};uc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};uc.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>uc.precisionThreshold||t.scale[1]*t.viewport.height>uc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=uc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};uc.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=cOt(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=CY({},uc.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-_),E=[],k=0,A=o.hole!=null?o.hole[0]:null;if(A!=null){let L=pOt(g,_=>_>=A);g=g.slice(0,L),g.push(A)}for(let L=0;Lp-A+(g[L]-k)),M=tqe(_,C);M=M.map(p=>p+k+(p+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var lqe=ye((Ygr,sqe)=>{"use strict";var wOt=j2(),TOt=J_(),AOt=JX(),SOt=Zm(),nqe=bh(),aqe=W2(),{float32:MOt,fract32:PY}=Xz();sqe.exports=EOt;var oqe=[[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 EOt(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:oqe}),v(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2628,10 +2628,10 @@ 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,g)=>[g.viewport.x,g.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,g)=>g.offset*4,divisor:1},position:{buffer:i,offset:(b,g)=>g.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,g)=>g.offset*8,divisor:1},error:{buffer:s,offset:(b,g)=>g.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:oqe.length}),nqe(f,{update:v,draw:h,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&x(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((g,E)=>{if(g){if(b&&(b[E]?g.draw=!0:g.draw=!1),!g.draw){g.draw=!0;return}d(E)}})}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 g=0,E=0;if(f.groups=c=b.map((L,_)=>{let C=c[_];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=SOt(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[_]=C={id:_,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=nqe({},u,L)),AOt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=aqe(M),E+=M.length,M),positions:(M,p)=>(M=aqe(M,"float64"),p.count=Math.floor(M.length/2),p.bounds=wOt(M,2),p.offset=g,g+=p.count,M)},{color:(M,p)=>{let P=p.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let F=M;M=Array(P);for(let q=0;q{let T=p.bounds;return M||(M=T),p.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],p.translate=[-M[0],-M[1]],p.scaleFract=PY(p.scale),p.translateFract=PY(p.translate),M},viewport:M=>{let p;return Array.isArray(M)?p={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(p={x:M.x||M.left||0,y:M.y||M.top||0},M.right?p.width=M.right-p.x:p.width=M.w||M.width||0,M.bottom?p.height=M.bottom-p.y:p.height=M.h||M.height||0):p={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},p}}]),C}),g||E){let L=c.reduce((p,P,T)=>p+(P?P.count:0),0),_=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);c.forEach((p,P)=>{if(!p)return;let{positions:T,count:F,offset:q,color:V,errors:H}=p;F&&(C.set(V,q*4),M.set(H,q*4),_.set(T,q*2))});var k=MOt(_);i(k);var S=PY(_,k);a(S),o(C),s(M)}}function x(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var fqe=ye((Kgr,cqe)=>{var uqe=/[\'\"]/;cqe.exports=function(t){return t?(uqe.test(t.charAt(0))&&(t=t.substr(1)),uqe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var IY=ye(()=>{});var DY=ye(()=>{});var RY=ye(()=>{});var zY=ye(()=>{});var FY=ye(()=>{});var pqe=ye((smr,vqe)=>{"use strict";function hqe(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 x=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(x),i+x+i}r.forEach(function(h,d){for(var v,x=0;h!=v;)if(v=h,h=h.replace(u,f),x++>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 dqe(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 qY(e,t){return Array.isArray(e)?dqe(e,t):hqe(e,t)}qY.parse=hqe;qY.stringify=dqe;vqe.exports=qY});var yqe=ye((lmr,mqe)=>{"use strict";var gqe=pqe();mqe.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=gqe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l{});var OY=ye((fmr,xqe)=>{"use strict";var kOt=_qe();xqe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||kOt.indexOf(t)!==-1}}});var Aqe=ye((hmr,Tqe)=>{"use strict";var COt=fqe(),LOt=IY(),POt=DY(),IOt=RY(),DOt=zY(),ROt=FY(),BY=yqe(),zOt=OY().isSize;Tqe.exports=wqe;var pk=wqe.cache={};function wqe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(pk[e])return pk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(POt.indexOf(e)!==-1)return pk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=BY(e,/\s+/),n;n=r.shift();){if(LOt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),pk[e]=t;if(DOt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(ROt.indexOf(n)!==-1){t.stretch=n;continue}if(IOt.indexOf(n)!==-1){t.weight=n;continue}if(zOt(n)){var i=BY(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=bqe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=bqe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=BY(r.join(" "),/\s*,\s*/).map(COt),pk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function bqe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var UY=ye((dmr,Sqe)=>{"use strict";var FOt=Zm(),qOt=OY().isSize,OOt=mk(IY()),BOt=mk(DY()),NOt=mk(RY()),UOt=mk(zY()),VOt=mk(FY()),HOt={normal:1,"small-caps":1},GOt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},NY={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};Sqe.exports=function(t){if(t=FOt(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&&gk(t.system,BOt),t.system;if(gk(t.style,UOt),gk(t.variant,HOt),gk(t.weight,NOt),gk(t.stretch,VOt),t.size==null&&(t.size=NY.size),typeof t.size=="number"&&(t.size+="px"),!qOt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=NY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[NY.family]),t.family=t.family.map(function(n){return GOt[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 gk(e,t){if(e&&!t[e]&&!OOt[e])throw Error("Unknown keyword `"+e+"`");return e}function mk(e){for(var t={},r=0;r{"use strict";Mqe.exports={parse:Aqe(),stringify:UY()}});var GY=ye((VY,HY)=>{(function(e,t){typeof VY=="object"&&typeof HY!="undefined"?HY.exports=t():typeof define=="function"&&define.amd?define(t):e.createREGL=t()})(VY,function(){"use strict";var e=function(At,Er){for(var Wr=Object.keys(Er),wi=0;wi1&&Er===Wr&&(Er==='"'||Er==="'"))return['"'+o(At.substr(1,At.length-2))+'"'];var wi=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(At);if(wi)return s(At.substr(0,wi.index)).concat(s(wi[1])).concat(s(At.substr(wi.index+wi[0].length)));var Ui=At.split(".");if(Ui.length===1)return['"'+o(At)+'"'];for(var Oi=[],Bi=0;Bi65535)<<4,At>>>=Er,Wr=(At>255)<<3,At>>>=Wr,Er|=Wr,Wr=(At>15)<<2,At>>>=Wr,Er|=Wr,Wr=(At>3)<<1,At>>>=Wr,Er|=Wr,Er|At>>1}function N(){var At=M(8,function(){return[]});function Er(Oi){var Bi=X(Oi),cn=At[G(Bi)>>2];return cn.length>0?cn.pop():new ArrayBuffer(Bi)}function Wr(Oi){At[G(Oi.byteLength)>>2].push(Oi)}function wi(Oi,Bi){var cn=null;switch(Oi){case p:cn=new Int8Array(Er(Bi),0,Bi);break;case P:cn=new Uint8Array(Er(Bi),0,Bi);break;case T:cn=new Int16Array(Er(2*Bi),0,Bi);break;case F:cn=new Uint16Array(Er(2*Bi),0,Bi);break;case q:cn=new Int32Array(Er(4*Bi),0,Bi);break;case V:cn=new Uint32Array(Er(4*Bi),0,Bi);break;case H:cn=new Float32Array(Er(4*Bi),0,Bi);break;default:return null}return cn.length!==Bi?cn.subarray(0,Bi):cn}function Ui(Oi){Wr(Oi.buffer)}return{alloc:Er,free:Wr,allocType:wi,freeType:Ui}}var W=N();W.zero=N();var re=3408,ae=3410,_e=3411,Me=3412,ke=3413,ge=3414,ie=3415,Te=33901,Ee=33902,Ae=3379,ze=3386,Ce=34921,me=36347,De=36348,ce=35661,Ge=35660,nt=34930,ct=36349,qt=34076,rt=34024,ot=7936,Dt=7937,kt=7938,Ct=35724,Yt=34047,xr=36063,er=34852,Ke=3553,xt=34067,bt=34069,Lt=33984,St=6408,Et=5126,dt=5121,Ht=36160,$t=36053,fr=36064,_r=16384,Br=function(At,Er){var Wr=1;Er.ext_texture_filter_anisotropic&&(Wr=At.getParameter(Yt));var wi=1,Ui=1;Er.webgl_draw_buffers&&(wi=At.getParameter(er),Ui=At.getParameter(xr));var Oi=!!Er.oes_texture_float;if(Oi){var Bi=At.createTexture();At.bindTexture(Ke,Bi),At.texImage2D(Ke,0,St,1,1,0,St,Et,null);var cn=At.createFramebuffer();if(At.bindFramebuffer(Ht,cn),At.framebufferTexture2D(Ht,fr,Ke,Bi,0),At.bindTexture(Ke,null),At.checkFramebufferStatus(Ht)!==$t)Oi=!1;else{At.viewport(0,0,1,1),At.clearColor(1,0,0,1),At.clear(_r);var On=W.allocType(Et,4);At.readPixels(0,0,1,1,St,Et,On),At.getError()?Oi=!1:(At.deleteFramebuffer(cn),At.deleteTexture(Bi),Oi=On[0]===1),W.freeType(On)}}var Bn=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),yn=!0;if(!Bn){var to=At.createTexture(),Dn=W.allocType(dt,36);At.activeTexture(Lt),At.bindTexture(xt,to),At.texImage2D(bt,0,St,3,3,0,St,dt,Dn),W.freeType(Dn),At.bindTexture(xt,null),At.deleteTexture(to),yn=!At.getError()}return{colorBits:[At.getParameter(ae),At.getParameter(_e),At.getParameter(Me),At.getParameter(ke)],depthBits:At.getParameter(ge),stencilBits:At.getParameter(ie),subpixelBits:At.getParameter(re),extensions:Object.keys(Er).filter(function(Rn){return!!Er[Rn]}),maxAnisotropic:Wr,maxDrawbuffers:wi,maxColorAttachments:Ui,pointSizeDims:At.getParameter(Te),lineWidthDims:At.getParameter(Ee),maxViewportDims:At.getParameter(ze),maxCombinedTextureUnits:At.getParameter(ce),maxCubeMapSize:At.getParameter(qt),maxRenderbufferSize:At.getParameter(rt),maxTextureUnits:At.getParameter(nt),maxTextureSize:At.getParameter(Ae),maxAttributes:At.getParameter(Ce),maxVertexUniforms:At.getParameter(me),maxVertexTextureUnits:At.getParameter(Ge),maxVaryingVectors:At.getParameter(De),maxFragmentUniforms:At.getParameter(ct),glsl:At.getParameter(Ct),renderer:At.getParameter(Dt),vendor:At.getParameter(ot),version:At.getParameter(kt),readFloat:Oi,npotTextureCube:yn}},Or=function(At){return At instanceof Uint8Array||At instanceof Uint16Array||At instanceof Uint32Array||At instanceof Int8Array||At instanceof Int16Array||At instanceof Int32Array||At instanceof Float32Array||At instanceof Float64Array||At instanceof Uint8ClampedArray};function Nr(At){return!!At&&typeof At=="object"&&Array.isArray(At.shape)&&Array.isArray(At.stride)&&typeof At.offset=="number"&&At.shape.length===At.stride.length&&(Array.isArray(At.data)||Or(At.data))}var ut=function(At){return Object.keys(At).map(function(Er){return At[Er]})},Ne={shape:xe,flatten:Le};function Ye(At,Er,Wr){for(var wi=0;wi0){var Za;if(Array.isArray(ji[0])){Kn=$i(ji);for(var wn=1,vn=1;vn0){if(typeof wn[0]=="number"){var Xn=W.allocType(gn.dtype,wn.length);yr(Xn,wn),Kn(Xn,Aa),W.freeType(Xn)}else if(Array.isArray(wn[0])||Or(wn[0])){aa=$i(wn);var Vn=_n(wn,aa,gn.dtype);Kn(Vn,Aa),W.freeType(Vn)}}}else if(Nr(wn)){aa=wn.shape;var ma=wn.stride,ro=0,Ao=0,Jn=0,Oa=0;aa.length===1?(ro=aa[0],Ao=1,Jn=ma[0],Oa=0):aa.length===2&&(ro=aa[0],Ao=aa[1],Jn=ma[0],Oa=ma[1]);var _o=Array.isArray(wn.data)?gn.dtype:Zt(wn.data),Po=W.allocType(_o,ro*Ao);Fr(Po,wn.data,ro,Ao,Jn,Oa,wn.offset),Kn(Po,Aa),W.freeType(Po)}return ca}return Ln||ca(Ai),ca._reglType="buffer",ca._buffer=gn,ca.subdata=Za,Wr.profile&&(ca.stats=gn.stats),ca.destroy=function(){Dn(gn)},ca}function fn(){ut(Oi).forEach(function(Ai){Ai.buffer=At.createBuffer(),At.bindBuffer(Ai.type,Ai.buffer),At.bufferData(Ai.type,Ai.persistentData||Ai.byteLength,Ai.usage)})}return Wr.profile&&(Er.getTotalBufferSize=function(){var Ai=0;return Object.keys(Oi).forEach(function(ji){Ai+=Oi[ji].stats.size}),Ai}),{create:Rn,createStream:On,destroyStream:Bn,clear:function(){ut(Oi).forEach(Dn),cn.forEach(Dn)},getBuffer:function(Ai){return Ai&&Ai._buffer instanceof Bi?Ai._buffer:null},restore:fn,_initBuffer:to}}var Vr=0,gi=0,Si=1,Mi=1,Pi=4,Gi=4,Ki={points:Vr,point:gi,lines:Si,line:Mi,triangles:Pi,triangle:Gi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ka=0,jn=1,la=4,Fa=5120,Da=5121,jo=5122,oa=5123,Sn=5124,Ha=5125,oo=34963,xn=35040,_t=35044;function br(At,Er,Wr,wi){var Ui={},Oi=0,Bi={uint8:Da,uint16:oa};Er.oes_element_index_uint&&(Bi.uint32=Ha);function cn(fn){this.id=Oi++,Ui[this.id]=this,this.buffer=fn,this.primType=la,this.vertCount=0,this.type=0}cn.prototype.bind=function(){this.buffer.bind()};var On=[];function Bn(fn){var Ai=On.pop();return Ai||(Ai=new cn(Wr.create(null,oo,!0,!1)._buffer)),to(Ai,fn,xn,-1,-1,0,0),Ai}function yn(fn){On.push(fn)}function to(fn,Ai,ji,Ln,Un,gn,ca){fn.buffer.bind();var Kn;if(Ai){var Za=ca;!ca&&(!Or(Ai)||Nr(Ai)&&!Or(Ai.data))&&(Za=Er.oes_element_index_uint?Ha:oa),Wr._initBuffer(fn.buffer,Ai,ji,Za,3)}else At.bufferData(oo,gn,ji),fn.buffer.dtype=Kn||Da,fn.buffer.usage=ji,fn.buffer.dimension=3,fn.buffer.byteLength=gn;if(Kn=ca,!ca){switch(fn.buffer.dtype){case Da:case Fa:Kn=Da;break;case oa:case jo:Kn=oa;break;case Ha:case Sn:Kn=Ha;break;default:}fn.buffer.dtype=Kn}fn.type=Kn;var wn=Un;wn<0&&(wn=fn.buffer.byteLength,Kn===oa?wn>>=1:Kn===Ha&&(wn>>=2)),fn.vertCount=wn;var vn=Ln;if(Ln<0){vn=la;var Aa=fn.buffer.dimension;Aa===1&&(vn=ka),Aa===2&&(vn=jn),Aa===3&&(vn=la)}fn.primType=vn}function Dn(fn){wi.elementsCount--,delete Ui[fn.id],fn.buffer.destroy(),fn.buffer=null}function Rn(fn,Ai){var ji=Wr.create(null,oo,!0),Ln=new cn(ji._buffer);wi.elementsCount++;function Un(gn){if(!gn)ji(),Ln.primType=la,Ln.vertCount=0,Ln.type=Da;else if(typeof gn=="number")ji(gn),Ln.primType=la,Ln.vertCount=gn|0,Ln.type=Da;else{var ca=null,Kn=_t,Za=-1,wn=-1,vn=0,Aa=0;Array.isArray(gn)||Or(gn)||Nr(gn)?ca=gn:("data"in gn&&(ca=gn.data),"usage"in gn&&(Kn=Ni[gn.usage]),"primitive"in gn&&(Za=Ki[gn.primitive]),"count"in gn&&(wn=gn.count|0),"type"in gn&&(Aa=Bi[gn.type]),"length"in gn?vn=gn.length|0:(vn=wn,Aa===oa||Aa===jo?vn*=2:(Aa===Ha||Aa===Sn)&&(vn*=4))),to(Ln,ca,Kn,Za,wn,vn,Aa)}return Un}return Un(fn),Un._reglType="elements",Un._elements=Ln,Un.subdata=function(gn,ca){return ji.subdata(gn,ca),Un},Un.destroy=function(){Dn(Ln)},Un}return{create:Rn,createStream:Bn,destroyStream:yn,getElements:function(fn){return typeof fn=="function"&&fn._elements instanceof cn?fn._elements:null},clear:function(){ut(Ui).forEach(Dn)}}}var Hr=new Float32Array(1),ti=new Uint32Array(Hr.buffer),zi=5123;function Yi(At){for(var Er=W.allocType(zi,At.length),Wr=0;Wr>>31<<15,Oi=(wi<<1>>>24)-127,Bi=wi>>13&1023;if(Oi<-24)Er[Wr]=Ui;else if(Oi<-14){var cn=-14-Oi;Er[Wr]=Ui+(Bi+1024>>cn)}else Oi>15?Er[Wr]=Ui+31744:Er[Wr]=Ui+(Oi+15<<10)+Bi}return Er}function an(At){return Array.isArray(At)||Or(At)}var hi=34467,Ji=3553,ua=34067,Fn=34069,Sa=6408,go=6406,Oo=6407,ho=6409,Mo=6410,xo=32854,zs=32855,ks=36194,Zs=32819,Xs=32820,wl=33635,os=34042,cl=6402,Cs=34041,ml=35904,Ys=35906,Hs=36193,Eo=33776,fs=33777,$l=33778,Gu=33779,fc=35986,ms=35987,on=34798,fa=35840,Qu=35841,Il=35842,vo=35843,Wl=36196,Ks=5121,Zl=5123,Ec=5125,Zn=5126,ko=10242,Co=10243,Tl=10497,uf=33071,So=33648,cf=10240,rh=10241,Al=9728,Hc=9729,Ql=9984,Ls=9985,mu=9986,kc=9987,Of=33170,Gc=4352,vd=4353,Bf=4354,ss=34046,ff=3317,ih=37440,Ul=37441,Js=37443,hc=37444,Cc=33984,ws=[Ql,mu,Ls,kc],$s=[0,ho,Mo,Oo,Sa],hs={};hs[ho]=hs[go]=hs[cl]=1,hs[Cs]=hs[Mo]=2,hs[Oo]=hs[ml]=3,hs[Sa]=hs[Ys]=4;function Ms(At){return"[object "+At+"]"}var dc=Ms("HTMLCanvasElement"),Sl=Ms("OffscreenCanvas"),ec=Ms("CanvasRenderingContext2D"),Ps=Ms("ImageBitmap"),ov=Ms("HTMLImageElement"),wo=Ms("HTMLVideoElement"),Od=Object.keys(Se).concat([dc,Sl,ec,Ps,ov,wo]),$o=[];$o[Ks]=1,$o[Zn]=4,$o[Hs]=2,$o[Zl]=2,$o[Ec]=4;var Ja=[];Ja[xo]=2,Ja[zs]=2,Ja[ks]=2,Ja[Cs]=4,Ja[Eo]=.5,Ja[fs]=.5,Ja[$l]=1,Ja[Gu]=1,Ja[fc]=.5,Ja[ms]=1,Ja[on]=1,Ja[fa]=.5,Ja[Qu]=.25,Ja[Il]=.5,Ja[vo]=.25,Ja[Wl]=.5;function Ef(At){return Array.isArray(At)&&(At.length===0||typeof At[0]=="number")}function tc(At){if(!Array.isArray(At))return!1;var Er=At.length;return!(Er===0||!an(At[0]))}function uu(At){return Object.prototype.toString.call(At)}function Mh(At){return uu(At)===dc}function jc(At){return uu(At)===Sl}function kf(At){return uu(At)===ec}function Ml(At){return uu(At)===Ps}function Yh(At){return uu(At)===ov}function Eh(At){return uu(At)===wo}function nh(At){if(!At)return!1;var Er=uu(At);return Od.indexOf(Er)>=0?!0:Ef(At)||tc(At)||Nr(At)}function hf(At){return Se[Object.prototype.toString.call(At)]|0}function kh(At,Er){var Wr=Er.length;switch(At.type){case Ks:case Zl:case Ec:case Zn:var wi=W.allocType(At.type,Wr);wi.set(Er),At.data=wi;break;case Hs:At.data=Yi(Er);break;default:}}function Kh(At,Er){return W.allocType(At.type===Hs?Zn:At.type,Er)}function rc(At,Er){At.type===Hs?(At.data=Yi(Er),W.freeType(Er)):At.data=Er}function ah(At,Er,Wr,wi,Ui,Oi){for(var Bi=At.width,cn=At.height,On=At.channels,Bn=Bi*cn*On,yn=Kh(At,Bn),to=0,Dn=0;Dn=1;)cn+=Bi*On*On,On/=2;return cn}else return Bi*Wr*wi}function df(At,Er,Wr,wi,Ui,Oi,Bi){var cn={"don't care":Gc,"dont care":Gc,nice:Bf,fast:vd},On={repeat:Tl,clamp:uf,mirror:So},Bn={nearest:Al,linear:Hc},yn=e({mipmap:kc,"nearest mipmap nearest":Ql,"linear mipmap nearest":Ls,"nearest mipmap linear":mu,"linear mipmap linear":kc},Bn),to={none:0,browser:hc},Dn={uint8:Ks,rgba4:Zs,rgb565:wl,"rgb5 a1":Xs},Rn={alpha:go,luminance:ho,"luminance alpha":Mo,rgb:Oo,rgba:Sa,rgba4:xo,"rgb5 a1":zs,rgb565:ks},fn={};Er.ext_srgb&&(Rn.srgb=ml,Rn.srgba=Ys),Er.oes_texture_float&&(Dn.float32=Dn.float=Zn),Er.oes_texture_half_float&&(Dn.float16=Dn["half float"]=Hs),Er.webgl_depth_texture&&(e(Rn,{depth:cl,"depth stencil":Cs}),e(Dn,{uint16:Zl,uint32:Ec,"depth stencil":os})),Er.webgl_compressed_texture_s3tc&&e(fn,{"rgb s3tc dxt1":Eo,"rgba s3tc dxt1":fs,"rgba s3tc dxt3":$l,"rgba s3tc dxt5":Gu}),Er.webgl_compressed_texture_atc&&e(fn,{"rgb atc":fc,"rgba atc explicit alpha":ms,"rgba atc interpolated alpha":on}),Er.webgl_compressed_texture_pvrtc&&e(fn,{"rgb pvrtc 4bppv1":fa,"rgb pvrtc 2bppv1":Qu,"rgba pvrtc 4bppv1":Il,"rgba pvrtc 2bppv1":vo}),Er.webgl_compressed_texture_etc1&&(fn["rgb etc1"]=Wl);var Ai=Array.prototype.slice.call(At.getParameter(hi));Object.keys(fn).forEach(function(de){var Ie=fn[de];Ai.indexOf(Ie)>=0&&(Rn[de]=Ie)});var ji=Object.keys(Rn);Wr.textureFormats=ji;var Ln=[];Object.keys(Rn).forEach(function(de){var Ie=Rn[de];Ln[Ie]=de});var Un=[];Object.keys(Dn).forEach(function(de){var Ie=Dn[de];Un[Ie]=de});var gn=[];Object.keys(Bn).forEach(function(de){var Ie=Bn[de];gn[Ie]=de});var ca=[];Object.keys(yn).forEach(function(de){var Ie=yn[de];ca[Ie]=de});var Kn=[];Object.keys(On).forEach(function(de){var Ie=On[de];Kn[Ie]=de});var Za=ji.reduce(function(de,Ie){var $e=Rn[Ie];return $e===ho||$e===go||$e===ho||$e===Mo||$e===cl||$e===Cs||Er.ext_srgb&&($e===ml||$e===Ys)?de[$e]=$e:$e===zs||Ie.indexOf("rgba")>=0?de[$e]=Sa:de[$e]=Oo,de},{});function wn(){this.internalformat=Sa,this.format=Sa,this.type=Ks,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=hc,this.width=0,this.height=0,this.channels=0}function vn(de,Ie){de.internalformat=Ie.internalformat,de.format=Ie.format,de.type=Ie.type,de.compressed=Ie.compressed,de.premultiplyAlpha=Ie.premultiplyAlpha,de.flipY=Ie.flipY,de.unpackAlignment=Ie.unpackAlignment,de.colorSpace=Ie.colorSpace,de.width=Ie.width,de.height=Ie.height,de.channels=Ie.channels}function Aa(de,Ie){if(!(typeof Ie!="object"||!Ie)){if("premultiplyAlpha"in Ie&&(de.premultiplyAlpha=Ie.premultiplyAlpha),"flipY"in Ie&&(de.flipY=Ie.flipY),"alignment"in Ie&&(de.unpackAlignment=Ie.alignment),"colorSpace"in Ie&&(de.colorSpace=to[Ie.colorSpace]),"type"in Ie){var $e=Ie.type;de.type=Dn[$e]}var pt=de.width,Kt=de.height,ir=de.channels,Jt=!1;"shape"in Ie?(pt=Ie.shape[0],Kt=Ie.shape[1],Ie.shape.length===3&&(ir=Ie.shape[2],Jt=!0)):("radius"in Ie&&(pt=Kt=Ie.radius),"width"in Ie&&(pt=Ie.width),"height"in Ie&&(Kt=Ie.height),"channels"in Ie&&(ir=Ie.channels,Jt=!0)),de.width=pt|0,de.height=Kt|0,de.channels=ir|0;var vt=!1;if("format"in Ie){var Pt=Ie.format,Wt=de.internalformat=Rn[Pt];de.format=Za[Wt],Pt in Dn&&("type"in Ie||(de.type=Dn[Pt])),Pt in fn&&(de.compressed=!0),vt=!0}!Jt&&vt?de.channels=hs[de.format]:Jt&&!vt&&de.channels!==$s[de.format]&&(de.format=de.internalformat=$s[de.channels])}}function aa(de){At.pixelStorei(ih,de.flipY),At.pixelStorei(Ul,de.premultiplyAlpha),At.pixelStorei(Js,de.colorSpace),At.pixelStorei(ff,de.unpackAlignment)}function Xn(){wn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Vn(de,Ie){var $e=null;if(nh(Ie)?$e=Ie:Ie&&(Aa(de,Ie),"x"in Ie&&(de.xOffset=Ie.x|0),"y"in Ie&&(de.yOffset=Ie.y|0),nh(Ie.data)&&($e=Ie.data)),Ie.copy){var pt=Ui.viewportWidth,Kt=Ui.viewportHeight;de.width=de.width||pt-de.xOffset,de.height=de.height||Kt-de.yOffset,de.needsCopy=!0}else if(!$e)de.width=de.width||1,de.height=de.height||1,de.channels=de.channels||4;else if(Or($e))de.channels=de.channels||4,de.data=$e,!("type"in Ie)&&de.type===Ks&&(de.type=hf($e));else if(Ef($e))de.channels=de.channels||4,kh(de,$e),de.alignment=1,de.needsFree=!0;else if(Nr($e)){var ir=$e.data;!Array.isArray(ir)&&de.type===Ks&&(de.type=hf(ir));var Jt=$e.shape,vt=$e.stride,Pt,Wt,rr,dr,pr,kr;Jt.length===3?(rr=Jt[2],kr=vt[2]):(rr=1,kr=1),Pt=Jt[0],Wt=Jt[1],dr=vt[0],pr=vt[1],de.alignment=1,de.width=Pt,de.height=Wt,de.channels=rr,de.format=de.internalformat=$s[rr],de.needsFree=!0,ah(de,ir,dr,pr,kr,$e.offset)}else if(Mh($e)||jc($e)||kf($e))Mh($e)||jc($e)?de.element=$e:de.element=$e.canvas,de.width=de.element.width,de.height=de.element.height,de.channels=4;else if(Ml($e))de.element=$e,de.width=$e.width,de.height=$e.height,de.channels=4;else if(Yh($e))de.element=$e,de.width=$e.naturalWidth,de.height=$e.naturalHeight,de.channels=4;else if(Eh($e))de.element=$e,de.width=$e.videoWidth,de.height=$e.videoHeight,de.channels=4;else if(tc($e)){var Ar=de.width||$e[0].length,gr=de.height||$e.length,Cr=de.channels;an($e[0][0])?Cr=Cr||$e[0][0].length:Cr=Cr||1;for(var cr=Ne.shape($e),Gr=1,ei=0;ei>=Kt,$e.height>>=Kt,Vn($e,pt[Kt]),de.mipmask|=1<=0&&!("faces"in Ie)&&(de.genMipmaps=!0)}if("mag"in Ie){var pt=Ie.mag;de.magFilter=Bn[pt]}var Kt=de.wrapS,ir=de.wrapT;if("wrap"in Ie){var Jt=Ie.wrap;typeof Jt=="string"?Kt=ir=On[Jt]:Array.isArray(Jt)&&(Kt=On[Jt[0]],ir=On[Jt[1]])}else{if("wrapS"in Ie){var vt=Ie.wrapS;Kt=On[vt]}if("wrapT"in Ie){var Pt=Ie.wrapT;ir=On[Pt]}}if(de.wrapS=Kt,de.wrapT=ir,"anisotropic"in Ie){var Wt=Ie.anisotropic;de.anisotropic=Ie.anisotropic}if("mipmap"in Ie){var rr=!1;switch(typeof Ie.mipmap){case"string":de.mipmapHint=cn[Ie.mipmap],de.genMipmaps=!0,rr=!0;break;case"boolean":rr=de.genMipmaps=Ie.mipmap;break;case"object":de.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Ie)&&(de.minFilter=Ql)}}function wc(de,Ie){At.texParameteri(Ie,rh,de.minFilter),At.texParameteri(Ie,cf,de.magFilter),At.texParameteri(Ie,ko,de.wrapS),At.texParameteri(Ie,Co,de.wrapT),Er.ext_texture_filter_anisotropic&&At.texParameteri(Ie,ss,de.anisotropic),de.genMipmaps&&(At.hint(Of,de.mipmapHint),At.generateMipmap(Ie))}var yf=0,Hl={},Fc=Wr.maxTextureUnits,ef=Array(Fc).map(function(){return null});function ls(de){wn.call(this),this.mipmask=0,this.internalformat=Sa,this.id=yf++,this.refCount=1,this.target=de,this.texture=At.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new El,Bi.profile&&(this.stats={size:0})}function _f(de){At.activeTexture(Cc),At.bindTexture(de.target,de.texture)}function ns(){var de=ef[0];de?At.bindTexture(de.target,de.texture):At.bindTexture(Ji,null)}function Y(de){var Ie=de.texture,$e=de.unit,pt=de.target;$e>=0&&(At.activeTexture(Cc+$e),At.bindTexture(pt,null),ef[$e]=null),At.deleteTexture(Ie),de.texture=null,de.params=null,de.pixels=null,de.refCount=0,delete Hl[de.id],Oi.textureCount--}e(ls.prototype,{bind:function(){var de=this;de.bindCount+=1;var Ie=de.unit;if(Ie<0){for(var $e=0;$e0)continue;pt.unit=-1}ef[$e]=de,Ie=$e;break}Ie>=Fc,Bi.profile&&Oi.maxTextureUnits>pr)-rr,kr.height=kr.height||($e.height>>pr)-dr,_f($e),ro(kr,Ji,rr,dr,pr),ns(),Oa(kr),pt}function ir(Jt,vt){var Pt=Jt|0,Wt=vt|0||Pt;if(Pt===$e.width&&Wt===$e.height)return pt;pt.width=$e.width=Pt,pt.height=$e.height=Wt,_f($e);for(var rr=0;$e.mipmask>>rr;++rr){var dr=Pt>>rr,pr=Wt>>rr;if(!dr||!pr)break;At.texImage2D(Ji,rr,$e.format,dr,pr,0,$e.format,$e.type,null)}return ns(),Bi.profile&&($e.stats.size=Wc($e.internalformat,$e.type,Pt,Wt,!1,!1)),pt}return pt(de,Ie),pt.subimage=Kt,pt.resize=ir,pt._reglType="texture2d",pt._texture=$e,Bi.profile&&(pt.stats=$e.stats),pt.destroy=function(){$e.decRef()},pt}function K(de,Ie,$e,pt,Kt,ir){var Jt=new ls(ua);Hl[Jt.id]=Jt,Oi.cubeCount++;var vt=new Array(6);function Pt(dr,pr,kr,Ar,gr,Cr){var cr,Gr=Jt.texInfo;for(El.call(Gr),cr=0;cr<6;++cr)vt[cr]=xs();if(typeof dr=="number"||!dr){var ei=dr|0||1;for(cr=0;cr<6;++cr)Po(vt[cr],ei,ei)}else if(typeof dr=="object")if(pr)Jo(vt[0],dr),Jo(vt[1],pr),Jo(vt[2],kr),Jo(vt[3],Ar),Jo(vt[4],gr),Jo(vt[5],Cr);else if(bc(Gr,dr),Aa(Jt,dr),"faces"in dr){var yi=dr.faces;for(cr=0;cr<6;++cr)vn(vt[cr],Jt),Jo(vt[cr],yi[cr])}else for(cr=0;cr<6;++cr)Jo(vt[cr],dr);for(vn(Jt,vt[0]),Gr.genMipmaps?Jt.mipmask=(vt[0].width<<1)-1:Jt.mipmask=vt[0].mipmask,Jt.internalformat=vt[0].internalformat,Pt.width=vt[0].width,Pt.height=vt[0].height,_f(Jt),cr=0;cr<6;++cr)Xl(vt[cr],Fn+cr);for(wc(Gr,ua),ns(),Bi.profile&&(Jt.stats.size=Wc(Jt.internalformat,Jt.type,Pt.width,Pt.height,Gr.genMipmaps,!0)),Pt.format=Ln[Jt.internalformat],Pt.type=Un[Jt.type],Pt.mag=gn[Gr.magFilter],Pt.min=ca[Gr.minFilter],Pt.wrapS=Kn[Gr.wrapS],Pt.wrapT=Kn[Gr.wrapT],cr=0;cr<6;++cr)Qc(vt[cr]);return Pt}function Wt(dr,pr,kr,Ar,gr){var Cr=kr|0,cr=Ar|0,Gr=gr|0,ei=Jn();return vn(ei,Jt),ei.width=0,ei.height=0,Vn(ei,pr),ei.width=ei.width||(Jt.width>>Gr)-Cr,ei.height=ei.height||(Jt.height>>Gr)-cr,_f(Jt),ro(ei,Fn+dr,Cr,cr,Gr),ns(),Oa(ei),Pt}function rr(dr){var pr=dr|0;if(pr!==Jt.width){Pt.width=Jt.width=pr,Pt.height=Jt.height=pr,_f(Jt);for(var kr=0;kr<6;++kr)for(var Ar=0;Jt.mipmask>>Ar;++Ar)At.texImage2D(Fn+kr,Ar,Jt.format,pr>>Ar,pr>>Ar,0,Jt.format,Jt.type,null);return ns(),Bi.profile&&(Jt.stats.size=Wc(Jt.internalformat,Jt.type,Pt.width,Pt.height,!1,!0)),Pt}}return Pt(de,Ie,$e,pt,Kt,ir),Pt.subimage=Wt,Pt.resize=rr,Pt._reglType="textureCube",Pt._texture=Jt,Bi.profile&&(Pt.stats=Jt.stats),Pt.destroy=function(){Jt.decRef()},Pt}function O(){for(var de=0;de>pt,$e.height>>pt,0,$e.internalformat,$e.type,null);else for(var Kt=0;Kt<6;++Kt)At.texImage2D(Fn+Kt,pt,$e.internalformat,$e.width>>pt,$e.height>>pt,0,$e.internalformat,$e.type,null);wc($e.texInfo,$e.target)})}function pe(){for(var de=0;de=0?Qc=!0:On.indexOf(El)>=0&&(Qc=!1))),("depthTexture"in ls||"depthStencilTexture"in ls)&&(ef=!!(ls.depthTexture||ls.depthStencilTexture)),"depth"in ls&&(typeof ls.depth=="boolean"?Xl=ls.depth:(yf=ls.depth,$c=!1)),"stencil"in ls&&(typeof ls.stencil=="boolean"?$c=ls.stencil:(Hl=ls.stencil,Xl=!1)),"depthStencil"in ls&&(typeof ls.depthStencil=="boolean"?Xl=$c=ls.depthStencil:(Fc=ls.depthStencil,Xl=!1,$c=!1))}var ns=null,Y=null,z=null,K=null;if(Array.isArray(xs))ns=xs.map(fn);else if(xs)ns=[fn(xs)];else for(ns=new Array(wc),_o=0;_o0&&(Oa.depth=Vn[0].depth,Oa.stencil=Vn[0].stencil,Oa.depthStencil=Vn[0].depthStencil),Vn[Jn]?Vn[Jn](Oa):Vn[Jn]=vn(Oa)}return e(ma,{width:_o,height:_o,color:El})}function ro(Ao){var Jn,Oa=Ao|0;if(Oa===ma.width)return ma;var _o=ma.color;for(Jn=0;Jn<_o.length;++Jn)_o[Jn].resize(Oa);for(Jn=0;Jn<6;++Jn)Vn[Jn].resize(Oa);return ma.width=ma.height=Oa,ma}return ma(Xn),e(ma,{faces:Vn,resize:ro,_reglType:"framebufferCube",destroy:function(){Vn.forEach(function(Ao){Ao.destroy()})}})}function aa(){Bi.cur=null,Bi.next=null,Bi.dirty=!0,ut(gn).forEach(function(Xn){Xn.framebuffer=At.createFramebuffer(),wn(Xn)})}return e(Bi,{getFramebuffer:function(Xn){if(typeof Xn=="function"&&Xn._reglType==="framebuffer"){var Vn=Xn._framebuffer;if(Vn instanceof ca)return Vn}return null},create:vn,createCube:Aa,clear:function(){ut(gn).forEach(Za)},restore:aa})}var md=5126,sh=34962,Fs=34963;function _u(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=md,this.offset=0,this.stride=0,this.divisor=0}function xu(At,Er,Wr,wi,Ui,Oi,Bi){for(var cn=Wr.maxAttributes,On=new Array(cn),Bn=0;Bn=_o.byteLength?Po.subdata(_o):(Po.destroy(),vn.buffers[Ao]=null)),vn.buffers[Ao]||(Po=vn.buffers[Ao]=Ui.create(Jn,sh,!1,!0)),Oa.buffer=Ui.getBuffer(Po),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1,ma[Ao]=1}else Ui.getBuffer(Jn)?(Oa.buffer=Ui.getBuffer(Jn),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1):Ui.getBuffer(Jn.buffer)?(Oa.buffer=Ui.getBuffer(Jn.buffer),Oa.size=(+Jn.size||Oa.buffer.dimension)|0,Oa.normalized=!!Jn.normalized||!1,"type"in Jn?Oa.type=bi[Jn.type]:Oa.type=Oa.buffer.dtype,Oa.offset=(Jn.offset||0)|0,Oa.stride=(Jn.stride||0)|0,Oa.divisor=(Jn.divisor||0)|0,Oa.state=1):"x"in Jn&&(Oa.x=+Jn.x||0,Oa.y=+Jn.y||0,Oa.z=+Jn.z||0,Oa.w=+Jn.w||0,Oa.state=2)}for(var Jo=0;Jo1)for(var aa=0;aaAi&&(Ai=ji.stats.uniformsCount)}),Ai},Wr.getMaxAttributesCount=function(){var Ai=0;return yn.forEach(function(ji){ji.stats.attributesCount>Ai&&(Ai=ji.stats.attributesCount)}),Ai});function fn(){Ui={},Oi={};for(var Ai=0;Ai16&&(Wr=Ti(Wr,At.length*8));for(var wi=Array(16),Ui=Array(16),Oi=0;Oi<16;Oi++)wi[Oi]=Wr[Oi]^909522486,Ui[Oi]=Wr[Oi]^1549556828;var Bi=Ti(wi.concat(gf(Er)),512+Er.length*8);return gt(Ti(Ui.concat(Bi),768))}function ru(At){for(var Er=Ih?"0123456789ABCDEF":"0123456789abcdef",Wr="",wi,Ui=0;Ui>>4&15)+Er.charAt(wi&15);return Wr}function mc(At){for(var Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wr="",wi=At.length,Ui=0;UiAt.length*8?Wr+=Zu:Wr+=Er.charAt(Oi>>>6*(3-Bi)&63);return Wr}function Yc(At,Er){var Wr=Er.length,wi=Array(),Ui,Oi,Bi,cn,On=Array(Math.ceil(At.length/2));for(Ui=0;Ui0;){for(cn=Array(),Bi=0,Ui=0;Ui0||Oi>0)&&(cn[cn.length]=Oi);wi[wi.length]=Bi,On=cn}var Bn="";for(Ui=wi.length-1;Ui>=0;Ui--)Bn+=Er.charAt(wi[Ui]);var yn=Math.ceil(At.length*8/(Math.log(Er.length)/Math.log(2)));for(Ui=Bn.length;Ui>>6&31,128|wi&63):wi<=65535?Er+=String.fromCharCode(224|wi>>>12&15,128|wi>>>6&63,128|wi&63):wi<=2097151&&(Er+=String.fromCharCode(240|wi>>>18&7,128|wi>>>12&63,128|wi>>>6&63,128|wi&63));return Er}function gf(At){for(var Er=Array(At.length>>2),Wr=0;Wr>5]|=(At.charCodeAt(Wr/8)&255)<<24-Wr%32;return Er}function gt(At){for(var Er="",Wr=0;Wr>5]>>>24-Wr%32&255);return Er}function Bt(At,Er){return At>>>Er|At<<32-Er}function wr(At,Er){return At>>>Er}function vr(At,Er,Wr){return At&Er^~At&Wr}function Ur(At,Er,Wr){return At&Er^At&Wr^Er&Wr}function fi(At){return Bt(At,2)^Bt(At,13)^Bt(At,22)}function xi(At){return Bt(At,6)^Bt(At,11)^Bt(At,25)}function Fi(At){return Bt(At,7)^Bt(At,18)^wr(At,3)}function Xi(At){return Bt(At,17)^Bt(At,19)^wr(At,10)}var hn=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 Ti(At,Er){var Wr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),wi=new Array(64),Ui,Oi,Bi,cn,On,Bn,yn,to,Dn,Rn,fn,Ai;for(At[Er>>5]|=128<<24-Er%32,At[(Er+64>>9<<4)+15]=Er,Dn=0;Dn>16)+(Er>>16)+(Wr>>16);return wi<<16|Wr&65535}function Ii(At){return Array.prototype.slice.call(At)}function mi(At){return Ii(At).join("")}function Pn(At){var Er=At&&At.cache,Wr=0,wi=[],Ui=[],Oi=[];function Bi(fn,Ai){var ji=Ai&&Ai.stable;if(!ji){for(var Ln=0;Ln0&&(fn.push(Un,"="),fn.push.apply(fn,Ii(arguments)),fn.push(";")),Un}return e(Ai,{def:Ln,toString:function(){return mi([ji.length>0?"var "+ji.join(",")+";":"",mi(fn)])}})}function On(){var fn=cn(),Ai=cn(),ji=fn.toString,Ln=Ai.toString;function Un(gn,ca){Ai(gn,ca,"=",fn.def(gn,ca),";")}return e(function(){fn.apply(fn,Ii(arguments))},{def:fn.def,entry:fn,exit:Ai,save:Un,set:function(gn,ca,Kn){Un(gn,ca),fn(gn,ca,"=",Kn,";")},toString:function(){return ji()+Ln()}})}function Bn(){var fn=mi(arguments),Ai=On(),ji=On(),Ln=Ai.toString,Un=ji.toString;return e(Ai,{then:function(){return Ai.apply(Ai,Ii(arguments)),this},else:function(){return ji.apply(ji,Ii(arguments)),this},toString:function(){var gn=Un();return gn&&(gn="else{"+gn+"}"),mi(["if(",fn,"){",Ln(),"}",gn])}})}var yn=cn(),to={};function Dn(fn,Ai){var ji=[];function Ln(){var Za="a"+ji.length;return ji.push(Za),Za}Ai=Ai||0;for(var Un=0;Un[g.viewport.x,g.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,g)=>g.offset*4,divisor:1},position:{buffer:i,offset:(b,g)=>g.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,g)=>g.offset*8,divisor:1},error:{buffer:s,offset:(b,g)=>g.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:oqe.length}),nqe(f,{update:v,draw:h,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&x(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((g,E)=>{if(g){if(b&&(b[E]?g.draw=!0:g.draw=!1),!g.draw){g.draw=!0;return}d(E)}})}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 g=0,E=0;if(f.groups=c=b.map((L,_)=>{let C=c[_];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=SOt(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[_]=C={id:_,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=nqe({},u,L)),AOt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=aqe(M),E+=M.length,M),positions:(M,p)=>(M=aqe(M,"float64"),p.count=Math.floor(M.length/2),p.bounds=wOt(M,2),p.offset=g,g+=p.count,M)},{color:(M,p)=>{let P=p.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let F=M;M=Array(P);for(let q=0;q{let T=p.bounds;return M||(M=T),p.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],p.translate=[-M[0],-M[1]],p.scaleFract=PY(p.scale),p.translateFract=PY(p.translate),M},viewport:M=>{let p;return Array.isArray(M)?p={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(p={x:M.x||M.left||0,y:M.y||M.top||0},M.right?p.width=M.right-p.x:p.width=M.w||M.width||0,M.bottom?p.height=M.bottom-p.y:p.height=M.h||M.height||0):p={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},p}}]),C}),g||E){let L=c.reduce((p,P,T)=>p+(P?P.count:0),0),_=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);c.forEach((p,P)=>{if(!p)return;let{positions:T,count:F,offset:q,color:V,errors:H}=p;F&&(C.set(V,q*4),M.set(H,q*4),_.set(T,q*2))});var k=MOt(_);i(k);var A=PY(_,k);a(A),o(C),s(M)}}function x(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var fqe=ye((Kgr,cqe)=>{var uqe=/[\'\"]/;cqe.exports=function(t){return t?(uqe.test(t.charAt(0))&&(t=t.substr(1)),uqe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var IY=ye(()=>{});var DY=ye(()=>{});var RY=ye(()=>{});var zY=ye(()=>{});var FY=ye(()=>{});var pqe=ye((smr,vqe)=>{"use strict";function hqe(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 x=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(x),i+x+i}r.forEach(function(h,d){for(var v,x=0;h!=v;)if(v=h,h=h.replace(u,f),x++>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 dqe(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 qY(e,t){return Array.isArray(e)?dqe(e,t):hqe(e,t)}qY.parse=hqe;qY.stringify=dqe;vqe.exports=qY});var yqe=ye((lmr,mqe)=>{"use strict";var gqe=pqe();mqe.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=gqe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l{});var OY=ye((fmr,xqe)=>{"use strict";var kOt=_qe();xqe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||kOt.indexOf(t)!==-1}}});var Aqe=ye((hmr,Tqe)=>{"use strict";var COt=fqe(),LOt=IY(),POt=DY(),IOt=RY(),DOt=zY(),ROt=FY(),BY=yqe(),zOt=OY().isSize;Tqe.exports=wqe;var pk=wqe.cache={};function wqe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(pk[e])return pk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(POt.indexOf(e)!==-1)return pk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=BY(e,/\s+/),n;n=r.shift();){if(LOt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),pk[e]=t;if(DOt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(ROt.indexOf(n)!==-1){t.stretch=n;continue}if(IOt.indexOf(n)!==-1){t.weight=n;continue}if(zOt(n)){var i=BY(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=bqe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=bqe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=BY(r.join(" "),/\s*,\s*/).map(COt),pk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function bqe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var UY=ye((dmr,Sqe)=>{"use strict";var FOt=Zm(),qOt=OY().isSize,OOt=mk(IY()),BOt=mk(DY()),NOt=mk(RY()),UOt=mk(zY()),VOt=mk(FY()),HOt={normal:1,"small-caps":1},GOt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},NY={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};Sqe.exports=function(t){if(t=FOt(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&&gk(t.system,BOt),t.system;if(gk(t.style,UOt),gk(t.variant,HOt),gk(t.weight,NOt),gk(t.stretch,VOt),t.size==null&&(t.size=NY.size),typeof t.size=="number"&&(t.size+="px"),!qOt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=NY.family),Array.isArray(t.family)&&(t.family.length||(t.family=[NY.family]),t.family=t.family.map(function(n){return GOt[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 gk(e,t){if(e&&!t[e]&&!OOt[e])throw Error("Unknown keyword `"+e+"`");return e}function mk(e){for(var t={},r=0;r{"use strict";Mqe.exports={parse:Aqe(),stringify:UY()}});var GY=ye((VY,HY)=>{(function(e,t){typeof VY=="object"&&typeof HY!="undefined"?HY.exports=t():typeof define=="function"&&define.amd?define(t):e.createREGL=t()})(VY,function(){"use strict";var e=function(At,Er){for(var Wr=Object.keys(Er),wi=0;wi1&&Er===Wr&&(Er==='"'||Er==="'"))return['"'+o(At.substr(1,At.length-2))+'"'];var wi=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(At);if(wi)return s(At.substr(0,wi.index)).concat(s(wi[1])).concat(s(At.substr(wi.index+wi[0].length)));var Ui=At.split(".");if(Ui.length===1)return['"'+o(At)+'"'];for(var Oi=[],Bi=0;Bi65535)<<4,At>>>=Er,Wr=(At>255)<<3,At>>>=Wr,Er|=Wr,Wr=(At>15)<<2,At>>>=Wr,Er|=Wr,Wr=(At>3)<<1,At>>>=Wr,Er|=Wr,Er|At>>1}function N(){var At=M(8,function(){return[]});function Er(Oi){var Bi=X(Oi),cn=At[G(Bi)>>2];return cn.length>0?cn.pop():new ArrayBuffer(Bi)}function Wr(Oi){At[G(Oi.byteLength)>>2].push(Oi)}function wi(Oi,Bi){var cn=null;switch(Oi){case p:cn=new Int8Array(Er(Bi),0,Bi);break;case P:cn=new Uint8Array(Er(Bi),0,Bi);break;case T:cn=new Int16Array(Er(2*Bi),0,Bi);break;case F:cn=new Uint16Array(Er(2*Bi),0,Bi);break;case q:cn=new Int32Array(Er(4*Bi),0,Bi);break;case V:cn=new Uint32Array(Er(4*Bi),0,Bi);break;case H:cn=new Float32Array(Er(4*Bi),0,Bi);break;default:return null}return cn.length!==Bi?cn.subarray(0,Bi):cn}function Ui(Oi){Wr(Oi.buffer)}return{alloc:Er,free:Wr,allocType:wi,freeType:Ui}}var W=N();W.zero=N();var re=3408,ae=3410,_e=3411,Me=3412,ke=3413,ge=3414,ie=3415,Te=33901,Ee=33902,Ae=3379,ze=3386,Ce=34921,me=36347,De=36348,ce=35661,Ge=35660,nt=34930,ct=36349,qt=34076,rt=34024,ot=7936,Dt=7937,kt=7938,Ct=35724,Yt=34047,xr=36063,er=34852,Ke=3553,xt=34067,bt=34069,Lt=33984,St=6408,Et=5126,dt=5121,Ht=36160,$t=36053,fr=36064,_r=16384,Br=function(At,Er){var Wr=1;Er.ext_texture_filter_anisotropic&&(Wr=At.getParameter(Yt));var wi=1,Ui=1;Er.webgl_draw_buffers&&(wi=At.getParameter(er),Ui=At.getParameter(xr));var Oi=!!Er.oes_texture_float;if(Oi){var Bi=At.createTexture();At.bindTexture(Ke,Bi),At.texImage2D(Ke,0,St,1,1,0,St,Et,null);var cn=At.createFramebuffer();if(At.bindFramebuffer(Ht,cn),At.framebufferTexture2D(Ht,fr,Ke,Bi,0),At.bindTexture(Ke,null),At.checkFramebufferStatus(Ht)!==$t)Oi=!1;else{At.viewport(0,0,1,1),At.clearColor(1,0,0,1),At.clear(_r);var On=W.allocType(Et,4);At.readPixels(0,0,1,1,St,Et,On),At.getError()?Oi=!1:(At.deleteFramebuffer(cn),At.deleteTexture(Bi),Oi=On[0]===1),W.freeType(On)}}var Bn=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),yn=!0;if(!Bn){var to=At.createTexture(),Dn=W.allocType(dt,36);At.activeTexture(Lt),At.bindTexture(xt,to),At.texImage2D(bt,0,St,3,3,0,St,dt,Dn),W.freeType(Dn),At.bindTexture(xt,null),At.deleteTexture(to),yn=!At.getError()}return{colorBits:[At.getParameter(ae),At.getParameter(_e),At.getParameter(Me),At.getParameter(ke)],depthBits:At.getParameter(ge),stencilBits:At.getParameter(ie),subpixelBits:At.getParameter(re),extensions:Object.keys(Er).filter(function(Rn){return!!Er[Rn]}),maxAnisotropic:Wr,maxDrawbuffers:wi,maxColorAttachments:Ui,pointSizeDims:At.getParameter(Te),lineWidthDims:At.getParameter(Ee),maxViewportDims:At.getParameter(ze),maxCombinedTextureUnits:At.getParameter(ce),maxCubeMapSize:At.getParameter(qt),maxRenderbufferSize:At.getParameter(rt),maxTextureUnits:At.getParameter(nt),maxTextureSize:At.getParameter(Ae),maxAttributes:At.getParameter(Ce),maxVertexUniforms:At.getParameter(me),maxVertexTextureUnits:At.getParameter(Ge),maxVaryingVectors:At.getParameter(De),maxFragmentUniforms:At.getParameter(ct),glsl:At.getParameter(Ct),renderer:At.getParameter(Dt),vendor:At.getParameter(ot),version:At.getParameter(kt),readFloat:Oi,npotTextureCube:yn}},Or=function(At){return At instanceof Uint8Array||At instanceof Uint16Array||At instanceof Uint32Array||At instanceof Int8Array||At instanceof Int16Array||At instanceof Int32Array||At instanceof Float32Array||At instanceof Float64Array||At instanceof Uint8ClampedArray};function Nr(At){return!!At&&typeof At=="object"&&Array.isArray(At.shape)&&Array.isArray(At.stride)&&typeof At.offset=="number"&&At.shape.length===At.stride.length&&(Array.isArray(At.data)||Or(At.data))}var ut=function(At){return Object.keys(At).map(function(Er){return At[Er]})},Ne={shape:xe,flatten:Le};function Ye(At,Er,Wr){for(var wi=0;wi0){var Za;if(Array.isArray(ji[0])){Kn=$i(ji);for(var wn=1,vn=1;vn0){if(typeof wn[0]=="number"){var Xn=W.allocType(gn.dtype,wn.length);yr(Xn,wn),Kn(Xn,Aa),W.freeType(Xn)}else if(Array.isArray(wn[0])||Or(wn[0])){aa=$i(wn);var Vn=_n(wn,aa,gn.dtype);Kn(Vn,Aa),W.freeType(Vn)}}}else if(Nr(wn)){aa=wn.shape;var ma=wn.stride,ro=0,Ao=0,Jn=0,Oa=0;aa.length===1?(ro=aa[0],Ao=1,Jn=ma[0],Oa=0):aa.length===2&&(ro=aa[0],Ao=aa[1],Jn=ma[0],Oa=ma[1]);var _o=Array.isArray(wn.data)?gn.dtype:Zt(wn.data),Po=W.allocType(_o,ro*Ao);Fr(Po,wn.data,ro,Ao,Jn,Oa,wn.offset),Kn(Po,Aa),W.freeType(Po)}return ca}return Ln||ca(Ai),ca._reglType="buffer",ca._buffer=gn,ca.subdata=Za,Wr.profile&&(ca.stats=gn.stats),ca.destroy=function(){Dn(gn)},ca}function fn(){ut(Oi).forEach(function(Ai){Ai.buffer=At.createBuffer(),At.bindBuffer(Ai.type,Ai.buffer),At.bufferData(Ai.type,Ai.persistentData||Ai.byteLength,Ai.usage)})}return Wr.profile&&(Er.getTotalBufferSize=function(){var Ai=0;return Object.keys(Oi).forEach(function(ji){Ai+=Oi[ji].stats.size}),Ai}),{create:Rn,createStream:On,destroyStream:Bn,clear:function(){ut(Oi).forEach(Dn),cn.forEach(Dn)},getBuffer:function(Ai){return Ai&&Ai._buffer instanceof Bi?Ai._buffer:null},restore:fn,_initBuffer:to}}var Vr=0,gi=0,Si=1,Mi=1,Pi=4,Gi=4,Ki={points:Vr,point:gi,lines:Si,line:Mi,triangles:Pi,triangle:Gi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ka=0,jn=1,la=4,Fa=5120,Da=5121,jo=5122,oa=5123,Sn=5124,Ha=5125,oo=34963,xn=35040,_t=35044;function br(At,Er,Wr,wi){var Ui={},Oi=0,Bi={uint8:Da,uint16:oa};Er.oes_element_index_uint&&(Bi.uint32=Ha);function cn(fn){this.id=Oi++,Ui[this.id]=this,this.buffer=fn,this.primType=la,this.vertCount=0,this.type=0}cn.prototype.bind=function(){this.buffer.bind()};var On=[];function Bn(fn){var Ai=On.pop();return Ai||(Ai=new cn(Wr.create(null,oo,!0,!1)._buffer)),to(Ai,fn,xn,-1,-1,0,0),Ai}function yn(fn){On.push(fn)}function to(fn,Ai,ji,Ln,Un,gn,ca){fn.buffer.bind();var Kn;if(Ai){var Za=ca;!ca&&(!Or(Ai)||Nr(Ai)&&!Or(Ai.data))&&(Za=Er.oes_element_index_uint?Ha:oa),Wr._initBuffer(fn.buffer,Ai,ji,Za,3)}else At.bufferData(oo,gn,ji),fn.buffer.dtype=Kn||Da,fn.buffer.usage=ji,fn.buffer.dimension=3,fn.buffer.byteLength=gn;if(Kn=ca,!ca){switch(fn.buffer.dtype){case Da:case Fa:Kn=Da;break;case oa:case jo:Kn=oa;break;case Ha:case Sn:Kn=Ha;break;default:}fn.buffer.dtype=Kn}fn.type=Kn;var wn=Un;wn<0&&(wn=fn.buffer.byteLength,Kn===oa?wn>>=1:Kn===Ha&&(wn>>=2)),fn.vertCount=wn;var vn=Ln;if(Ln<0){vn=la;var Aa=fn.buffer.dimension;Aa===1&&(vn=ka),Aa===2&&(vn=jn),Aa===3&&(vn=la)}fn.primType=vn}function Dn(fn){wi.elementsCount--,delete Ui[fn.id],fn.buffer.destroy(),fn.buffer=null}function Rn(fn,Ai){var ji=Wr.create(null,oo,!0),Ln=new cn(ji._buffer);wi.elementsCount++;function Un(gn){if(!gn)ji(),Ln.primType=la,Ln.vertCount=0,Ln.type=Da;else if(typeof gn=="number")ji(gn),Ln.primType=la,Ln.vertCount=gn|0,Ln.type=Da;else{var ca=null,Kn=_t,Za=-1,wn=-1,vn=0,Aa=0;Array.isArray(gn)||Or(gn)||Nr(gn)?ca=gn:("data"in gn&&(ca=gn.data),"usage"in gn&&(Kn=Ni[gn.usage]),"primitive"in gn&&(Za=Ki[gn.primitive]),"count"in gn&&(wn=gn.count|0),"type"in gn&&(Aa=Bi[gn.type]),"length"in gn?vn=gn.length|0:(vn=wn,Aa===oa||Aa===jo?vn*=2:(Aa===Ha||Aa===Sn)&&(vn*=4))),to(Ln,ca,Kn,Za,wn,vn,Aa)}return Un}return Un(fn),Un._reglType="elements",Un._elements=Ln,Un.subdata=function(gn,ca){return ji.subdata(gn,ca),Un},Un.destroy=function(){Dn(Ln)},Un}return{create:Rn,createStream:Bn,destroyStream:yn,getElements:function(fn){return typeof fn=="function"&&fn._elements instanceof cn?fn._elements:null},clear:function(){ut(Ui).forEach(Dn)}}}var Hr=new Float32Array(1),ti=new Uint32Array(Hr.buffer),zi=5123;function Yi(At){for(var Er=W.allocType(zi,At.length),Wr=0;Wr>>31<<15,Oi=(wi<<1>>>24)-127,Bi=wi>>13&1023;if(Oi<-24)Er[Wr]=Ui;else if(Oi<-14){var cn=-14-Oi;Er[Wr]=Ui+(Bi+1024>>cn)}else Oi>15?Er[Wr]=Ui+31744:Er[Wr]=Ui+(Oi+15<<10)+Bi}return Er}function an(At){return Array.isArray(At)||Or(At)}var hi=34467,Ji=3553,ua=34067,Fn=34069,Sa=6408,go=6406,Oo=6407,ho=6409,Mo=6410,xo=32854,zs=32855,ks=36194,Zs=32819,Xs=32820,wl=33635,os=34042,cl=6402,Cs=34041,ml=35904,Ys=35906,Hs=36193,Eo=33776,fs=33777,$l=33778,Gu=33779,fc=35986,ms=35987,on=34798,fa=35840,Qu=35841,Il=35842,vo=35843,Wl=36196,Ks=5121,Zl=5123,Ec=5125,Zn=5126,ko=10242,Co=10243,Tl=10497,uf=33071,So=33648,cf=10240,rh=10241,Al=9728,Hc=9729,Ql=9984,Ls=9985,mu=9986,kc=9987,Of=33170,Gc=4352,vd=4353,Bf=4354,ss=34046,ff=3317,ih=37440,Ul=37441,Js=37443,hc=37444,Cc=33984,ws=[Ql,mu,Ls,kc],$s=[0,ho,Mo,Oo,Sa],hs={};hs[ho]=hs[go]=hs[cl]=1,hs[Cs]=hs[Mo]=2,hs[Oo]=hs[ml]=3,hs[Sa]=hs[Ys]=4;function Ms(At){return"[object "+At+"]"}var dc=Ms("HTMLCanvasElement"),Sl=Ms("OffscreenCanvas"),ec=Ms("CanvasRenderingContext2D"),Ps=Ms("ImageBitmap"),ov=Ms("HTMLImageElement"),wo=Ms("HTMLVideoElement"),Od=Object.keys(Se).concat([dc,Sl,ec,Ps,ov,wo]),$o=[];$o[Ks]=1,$o[Zn]=4,$o[Hs]=2,$o[Zl]=2,$o[Ec]=4;var Ja=[];Ja[xo]=2,Ja[zs]=2,Ja[ks]=2,Ja[Cs]=4,Ja[Eo]=.5,Ja[fs]=.5,Ja[$l]=1,Ja[Gu]=1,Ja[fc]=.5,Ja[ms]=1,Ja[on]=1,Ja[fa]=.5,Ja[Qu]=.25,Ja[Il]=.5,Ja[vo]=.25,Ja[Wl]=.5;function Ef(At){return Array.isArray(At)&&(At.length===0||typeof At[0]=="number")}function tc(At){if(!Array.isArray(At))return!1;var Er=At.length;return!(Er===0||!an(At[0]))}function uu(At){return Object.prototype.toString.call(At)}function Mh(At){return uu(At)===dc}function jc(At){return uu(At)===Sl}function kf(At){return uu(At)===ec}function Ml(At){return uu(At)===Ps}function Yh(At){return uu(At)===ov}function Eh(At){return uu(At)===wo}function nh(At){if(!At)return!1;var Er=uu(At);return Od.indexOf(Er)>=0?!0:Ef(At)||tc(At)||Nr(At)}function hf(At){return Se[Object.prototype.toString.call(At)]|0}function kh(At,Er){var Wr=Er.length;switch(At.type){case Ks:case Zl:case Ec:case Zn:var wi=W.allocType(At.type,Wr);wi.set(Er),At.data=wi;break;case Hs:At.data=Yi(Er);break;default:}}function Kh(At,Er){return W.allocType(At.type===Hs?Zn:At.type,Er)}function rc(At,Er){At.type===Hs?(At.data=Yi(Er),W.freeType(Er)):At.data=Er}function ah(At,Er,Wr,wi,Ui,Oi){for(var Bi=At.width,cn=At.height,On=At.channels,Bn=Bi*cn*On,yn=Kh(At,Bn),to=0,Dn=0;Dn=1;)cn+=Bi*On*On,On/=2;return cn}else return Bi*Wr*wi}function df(At,Er,Wr,wi,Ui,Oi,Bi){var cn={"don't care":Gc,"dont care":Gc,nice:Bf,fast:vd},On={repeat:Tl,clamp:uf,mirror:So},Bn={nearest:Al,linear:Hc},yn=e({mipmap:kc,"nearest mipmap nearest":Ql,"linear mipmap nearest":Ls,"nearest mipmap linear":mu,"linear mipmap linear":kc},Bn),to={none:0,browser:hc},Dn={uint8:Ks,rgba4:Zs,rgb565:wl,"rgb5 a1":Xs},Rn={alpha:go,luminance:ho,"luminance alpha":Mo,rgb:Oo,rgba:Sa,rgba4:xo,"rgb5 a1":zs,rgb565:ks},fn={};Er.ext_srgb&&(Rn.srgb=ml,Rn.srgba=Ys),Er.oes_texture_float&&(Dn.float32=Dn.float=Zn),Er.oes_texture_half_float&&(Dn.float16=Dn["half float"]=Hs),Er.webgl_depth_texture&&(e(Rn,{depth:cl,"depth stencil":Cs}),e(Dn,{uint16:Zl,uint32:Ec,"depth stencil":os})),Er.webgl_compressed_texture_s3tc&&e(fn,{"rgb s3tc dxt1":Eo,"rgba s3tc dxt1":fs,"rgba s3tc dxt3":$l,"rgba s3tc dxt5":Gu}),Er.webgl_compressed_texture_atc&&e(fn,{"rgb atc":fc,"rgba atc explicit alpha":ms,"rgba atc interpolated alpha":on}),Er.webgl_compressed_texture_pvrtc&&e(fn,{"rgb pvrtc 4bppv1":fa,"rgb pvrtc 2bppv1":Qu,"rgba pvrtc 4bppv1":Il,"rgba pvrtc 2bppv1":vo}),Er.webgl_compressed_texture_etc1&&(fn["rgb etc1"]=Wl);var Ai=Array.prototype.slice.call(At.getParameter(hi));Object.keys(fn).forEach(function(de){var Ie=fn[de];Ai.indexOf(Ie)>=0&&(Rn[de]=Ie)});var ji=Object.keys(Rn);Wr.textureFormats=ji;var Ln=[];Object.keys(Rn).forEach(function(de){var Ie=Rn[de];Ln[Ie]=de});var Un=[];Object.keys(Dn).forEach(function(de){var Ie=Dn[de];Un[Ie]=de});var gn=[];Object.keys(Bn).forEach(function(de){var Ie=Bn[de];gn[Ie]=de});var ca=[];Object.keys(yn).forEach(function(de){var Ie=yn[de];ca[Ie]=de});var Kn=[];Object.keys(On).forEach(function(de){var Ie=On[de];Kn[Ie]=de});var Za=ji.reduce(function(de,Ie){var $e=Rn[Ie];return $e===ho||$e===go||$e===ho||$e===Mo||$e===cl||$e===Cs||Er.ext_srgb&&($e===ml||$e===Ys)?de[$e]=$e:$e===zs||Ie.indexOf("rgba")>=0?de[$e]=Sa:de[$e]=Oo,de},{});function wn(){this.internalformat=Sa,this.format=Sa,this.type=Ks,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=hc,this.width=0,this.height=0,this.channels=0}function vn(de,Ie){de.internalformat=Ie.internalformat,de.format=Ie.format,de.type=Ie.type,de.compressed=Ie.compressed,de.premultiplyAlpha=Ie.premultiplyAlpha,de.flipY=Ie.flipY,de.unpackAlignment=Ie.unpackAlignment,de.colorSpace=Ie.colorSpace,de.width=Ie.width,de.height=Ie.height,de.channels=Ie.channels}function Aa(de,Ie){if(!(typeof Ie!="object"||!Ie)){if("premultiplyAlpha"in Ie&&(de.premultiplyAlpha=Ie.premultiplyAlpha),"flipY"in Ie&&(de.flipY=Ie.flipY),"alignment"in Ie&&(de.unpackAlignment=Ie.alignment),"colorSpace"in Ie&&(de.colorSpace=to[Ie.colorSpace]),"type"in Ie){var $e=Ie.type;de.type=Dn[$e]}var pt=de.width,Kt=de.height,ir=de.channels,Jt=!1;"shape"in Ie?(pt=Ie.shape[0],Kt=Ie.shape[1],Ie.shape.length===3&&(ir=Ie.shape[2],Jt=!0)):("radius"in Ie&&(pt=Kt=Ie.radius),"width"in Ie&&(pt=Ie.width),"height"in Ie&&(Kt=Ie.height),"channels"in Ie&&(ir=Ie.channels,Jt=!0)),de.width=pt|0,de.height=Kt|0,de.channels=ir|0;var vt=!1;if("format"in Ie){var Pt=Ie.format,Wt=de.internalformat=Rn[Pt];de.format=Za[Wt],Pt in Dn&&("type"in Ie||(de.type=Dn[Pt])),Pt in fn&&(de.compressed=!0),vt=!0}!Jt&&vt?de.channels=hs[de.format]:Jt&&!vt&&de.channels!==$s[de.format]&&(de.format=de.internalformat=$s[de.channels])}}function aa(de){At.pixelStorei(ih,de.flipY),At.pixelStorei(Ul,de.premultiplyAlpha),At.pixelStorei(Js,de.colorSpace),At.pixelStorei(ff,de.unpackAlignment)}function Xn(){wn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Vn(de,Ie){var $e=null;if(nh(Ie)?$e=Ie:Ie&&(Aa(de,Ie),"x"in Ie&&(de.xOffset=Ie.x|0),"y"in Ie&&(de.yOffset=Ie.y|0),nh(Ie.data)&&($e=Ie.data)),Ie.copy){var pt=Ui.viewportWidth,Kt=Ui.viewportHeight;de.width=de.width||pt-de.xOffset,de.height=de.height||Kt-de.yOffset,de.needsCopy=!0}else if(!$e)de.width=de.width||1,de.height=de.height||1,de.channels=de.channels||4;else if(Or($e))de.channels=de.channels||4,de.data=$e,!("type"in Ie)&&de.type===Ks&&(de.type=hf($e));else if(Ef($e))de.channels=de.channels||4,kh(de,$e),de.alignment=1,de.needsFree=!0;else if(Nr($e)){var ir=$e.data;!Array.isArray(ir)&&de.type===Ks&&(de.type=hf(ir));var Jt=$e.shape,vt=$e.stride,Pt,Wt,rr,dr,pr,kr;Jt.length===3?(rr=Jt[2],kr=vt[2]):(rr=1,kr=1),Pt=Jt[0],Wt=Jt[1],dr=vt[0],pr=vt[1],de.alignment=1,de.width=Pt,de.height=Wt,de.channels=rr,de.format=de.internalformat=$s[rr],de.needsFree=!0,ah(de,ir,dr,pr,kr,$e.offset)}else if(Mh($e)||jc($e)||kf($e))Mh($e)||jc($e)?de.element=$e:de.element=$e.canvas,de.width=de.element.width,de.height=de.element.height,de.channels=4;else if(Ml($e))de.element=$e,de.width=$e.width,de.height=$e.height,de.channels=4;else if(Yh($e))de.element=$e,de.width=$e.naturalWidth,de.height=$e.naturalHeight,de.channels=4;else if(Eh($e))de.element=$e,de.width=$e.videoWidth,de.height=$e.videoHeight,de.channels=4;else if(tc($e)){var Ar=de.width||$e[0].length,gr=de.height||$e.length,Cr=de.channels;an($e[0][0])?Cr=Cr||$e[0][0].length:Cr=Cr||1;for(var cr=Ne.shape($e),Gr=1,ei=0;ei>=Kt,$e.height>>=Kt,Vn($e,pt[Kt]),de.mipmask|=1<=0&&!("faces"in Ie)&&(de.genMipmaps=!0)}if("mag"in Ie){var pt=Ie.mag;de.magFilter=Bn[pt]}var Kt=de.wrapS,ir=de.wrapT;if("wrap"in Ie){var Jt=Ie.wrap;typeof Jt=="string"?Kt=ir=On[Jt]:Array.isArray(Jt)&&(Kt=On[Jt[0]],ir=On[Jt[1]])}else{if("wrapS"in Ie){var vt=Ie.wrapS;Kt=On[vt]}if("wrapT"in Ie){var Pt=Ie.wrapT;ir=On[Pt]}}if(de.wrapS=Kt,de.wrapT=ir,"anisotropic"in Ie){var Wt=Ie.anisotropic;de.anisotropic=Ie.anisotropic}if("mipmap"in Ie){var rr=!1;switch(typeof Ie.mipmap){case"string":de.mipmapHint=cn[Ie.mipmap],de.genMipmaps=!0,rr=!0;break;case"boolean":rr=de.genMipmaps=Ie.mipmap;break;case"object":de.genMipmaps=!1,rr=!0;break;default:}rr&&!("min"in Ie)&&(de.minFilter=Ql)}}function wc(de,Ie){At.texParameteri(Ie,rh,de.minFilter),At.texParameteri(Ie,cf,de.magFilter),At.texParameteri(Ie,ko,de.wrapS),At.texParameteri(Ie,Co,de.wrapT),Er.ext_texture_filter_anisotropic&&At.texParameteri(Ie,ss,de.anisotropic),de.genMipmaps&&(At.hint(Of,de.mipmapHint),At.generateMipmap(Ie))}var yf=0,Hl={},Fc=Wr.maxTextureUnits,ef=Array(Fc).map(function(){return null});function ls(de){wn.call(this),this.mipmask=0,this.internalformat=Sa,this.id=yf++,this.refCount=1,this.target=de,this.texture=At.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new El,Bi.profile&&(this.stats={size:0})}function _f(de){At.activeTexture(Cc),At.bindTexture(de.target,de.texture)}function ns(){var de=ef[0];de?At.bindTexture(de.target,de.texture):At.bindTexture(Ji,null)}function Y(de){var Ie=de.texture,$e=de.unit,pt=de.target;$e>=0&&(At.activeTexture(Cc+$e),At.bindTexture(pt,null),ef[$e]=null),At.deleteTexture(Ie),de.texture=null,de.params=null,de.pixels=null,de.refCount=0,delete Hl[de.id],Oi.textureCount--}e(ls.prototype,{bind:function(){var de=this;de.bindCount+=1;var Ie=de.unit;if(Ie<0){for(var $e=0;$e0)continue;pt.unit=-1}ef[$e]=de,Ie=$e;break}Ie>=Fc,Bi.profile&&Oi.maxTextureUnits>pr)-rr,kr.height=kr.height||($e.height>>pr)-dr,_f($e),ro(kr,Ji,rr,dr,pr),ns(),Oa(kr),pt}function ir(Jt,vt){var Pt=Jt|0,Wt=vt|0||Pt;if(Pt===$e.width&&Wt===$e.height)return pt;pt.width=$e.width=Pt,pt.height=$e.height=Wt,_f($e);for(var rr=0;$e.mipmask>>rr;++rr){var dr=Pt>>rr,pr=Wt>>rr;if(!dr||!pr)break;At.texImage2D(Ji,rr,$e.format,dr,pr,0,$e.format,$e.type,null)}return ns(),Bi.profile&&($e.stats.size=Wc($e.internalformat,$e.type,Pt,Wt,!1,!1)),pt}return pt(de,Ie),pt.subimage=Kt,pt.resize=ir,pt._reglType="texture2d",pt._texture=$e,Bi.profile&&(pt.stats=$e.stats),pt.destroy=function(){$e.decRef()},pt}function K(de,Ie,$e,pt,Kt,ir){var Jt=new ls(ua);Hl[Jt.id]=Jt,Oi.cubeCount++;var vt=new Array(6);function Pt(dr,pr,kr,Ar,gr,Cr){var cr,Gr=Jt.texInfo;for(El.call(Gr),cr=0;cr<6;++cr)vt[cr]=xs();if(typeof dr=="number"||!dr){var ei=dr|0||1;for(cr=0;cr<6;++cr)Po(vt[cr],ei,ei)}else if(typeof dr=="object")if(pr)Jo(vt[0],dr),Jo(vt[1],pr),Jo(vt[2],kr),Jo(vt[3],Ar),Jo(vt[4],gr),Jo(vt[5],Cr);else if(bc(Gr,dr),Aa(Jt,dr),"faces"in dr){var yi=dr.faces;for(cr=0;cr<6;++cr)vn(vt[cr],Jt),Jo(vt[cr],yi[cr])}else for(cr=0;cr<6;++cr)Jo(vt[cr],dr);for(vn(Jt,vt[0]),Gr.genMipmaps?Jt.mipmask=(vt[0].width<<1)-1:Jt.mipmask=vt[0].mipmask,Jt.internalformat=vt[0].internalformat,Pt.width=vt[0].width,Pt.height=vt[0].height,_f(Jt),cr=0;cr<6;++cr)Xl(vt[cr],Fn+cr);for(wc(Gr,ua),ns(),Bi.profile&&(Jt.stats.size=Wc(Jt.internalformat,Jt.type,Pt.width,Pt.height,Gr.genMipmaps,!0)),Pt.format=Ln[Jt.internalformat],Pt.type=Un[Jt.type],Pt.mag=gn[Gr.magFilter],Pt.min=ca[Gr.minFilter],Pt.wrapS=Kn[Gr.wrapS],Pt.wrapT=Kn[Gr.wrapT],cr=0;cr<6;++cr)Qc(vt[cr]);return Pt}function Wt(dr,pr,kr,Ar,gr){var Cr=kr|0,cr=Ar|0,Gr=gr|0,ei=Jn();return vn(ei,Jt),ei.width=0,ei.height=0,Vn(ei,pr),ei.width=ei.width||(Jt.width>>Gr)-Cr,ei.height=ei.height||(Jt.height>>Gr)-cr,_f(Jt),ro(ei,Fn+dr,Cr,cr,Gr),ns(),Oa(ei),Pt}function rr(dr){var pr=dr|0;if(pr!==Jt.width){Pt.width=Jt.width=pr,Pt.height=Jt.height=pr,_f(Jt);for(var kr=0;kr<6;++kr)for(var Ar=0;Jt.mipmask>>Ar;++Ar)At.texImage2D(Fn+kr,Ar,Jt.format,pr>>Ar,pr>>Ar,0,Jt.format,Jt.type,null);return ns(),Bi.profile&&(Jt.stats.size=Wc(Jt.internalformat,Jt.type,Pt.width,Pt.height,!1,!0)),Pt}}return Pt(de,Ie,$e,pt,Kt,ir),Pt.subimage=Wt,Pt.resize=rr,Pt._reglType="textureCube",Pt._texture=Jt,Bi.profile&&(Pt.stats=Jt.stats),Pt.destroy=function(){Jt.decRef()},Pt}function O(){for(var de=0;de>pt,$e.height>>pt,0,$e.internalformat,$e.type,null);else for(var Kt=0;Kt<6;++Kt)At.texImage2D(Fn+Kt,pt,$e.internalformat,$e.width>>pt,$e.height>>pt,0,$e.internalformat,$e.type,null);wc($e.texInfo,$e.target)})}function pe(){for(var de=0;de=0?Qc=!0:On.indexOf(El)>=0&&(Qc=!1))),("depthTexture"in ls||"depthStencilTexture"in ls)&&(ef=!!(ls.depthTexture||ls.depthStencilTexture)),"depth"in ls&&(typeof ls.depth=="boolean"?Xl=ls.depth:(yf=ls.depth,$c=!1)),"stencil"in ls&&(typeof ls.stencil=="boolean"?$c=ls.stencil:(Hl=ls.stencil,Xl=!1)),"depthStencil"in ls&&(typeof ls.depthStencil=="boolean"?Xl=$c=ls.depthStencil:(Fc=ls.depthStencil,Xl=!1,$c=!1))}var ns=null,Y=null,z=null,K=null;if(Array.isArray(xs))ns=xs.map(fn);else if(xs)ns=[fn(xs)];else for(ns=new Array(wc),_o=0;_o0&&(Oa.depth=Vn[0].depth,Oa.stencil=Vn[0].stencil,Oa.depthStencil=Vn[0].depthStencil),Vn[Jn]?Vn[Jn](Oa):Vn[Jn]=vn(Oa)}return e(ma,{width:_o,height:_o,color:El})}function ro(Ao){var Jn,Oa=Ao|0;if(Oa===ma.width)return ma;var _o=ma.color;for(Jn=0;Jn<_o.length;++Jn)_o[Jn].resize(Oa);for(Jn=0;Jn<6;++Jn)Vn[Jn].resize(Oa);return ma.width=ma.height=Oa,ma}return ma(Xn),e(ma,{faces:Vn,resize:ro,_reglType:"framebufferCube",destroy:function(){Vn.forEach(function(Ao){Ao.destroy()})}})}function aa(){Bi.cur=null,Bi.next=null,Bi.dirty=!0,ut(gn).forEach(function(Xn){Xn.framebuffer=At.createFramebuffer(),wn(Xn)})}return e(Bi,{getFramebuffer:function(Xn){if(typeof Xn=="function"&&Xn._reglType==="framebuffer"){var Vn=Xn._framebuffer;if(Vn instanceof ca)return Vn}return null},create:vn,createCube:Aa,clear:function(){ut(gn).forEach(Za)},restore:aa})}var md=5126,sh=34962,Fs=34963;function _u(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=md,this.offset=0,this.stride=0,this.divisor=0}function xu(At,Er,Wr,wi,Ui,Oi,Bi){for(var cn=Wr.maxAttributes,On=new Array(cn),Bn=0;Bn=_o.byteLength?Po.subdata(_o):(Po.destroy(),vn.buffers[Ao]=null)),vn.buffers[Ao]||(Po=vn.buffers[Ao]=Ui.create(Jn,sh,!1,!0)),Oa.buffer=Ui.getBuffer(Po),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1,ma[Ao]=1}else Ui.getBuffer(Jn)?(Oa.buffer=Ui.getBuffer(Jn),Oa.size=Oa.buffer.dimension|0,Oa.normalized=!1,Oa.type=Oa.buffer.dtype,Oa.offset=0,Oa.stride=0,Oa.divisor=0,Oa.state=1):Ui.getBuffer(Jn.buffer)?(Oa.buffer=Ui.getBuffer(Jn.buffer),Oa.size=(+Jn.size||Oa.buffer.dimension)|0,Oa.normalized=!!Jn.normalized||!1,"type"in Jn?Oa.type=bi[Jn.type]:Oa.type=Oa.buffer.dtype,Oa.offset=(Jn.offset||0)|0,Oa.stride=(Jn.stride||0)|0,Oa.divisor=(Jn.divisor||0)|0,Oa.state=1):"x"in Jn&&(Oa.x=+Jn.x||0,Oa.y=+Jn.y||0,Oa.z=+Jn.z||0,Oa.w=+Jn.w||0,Oa.state=2)}for(var Jo=0;Jo1)for(var aa=0;aaAi&&(Ai=ji.stats.uniformsCount)}),Ai},Wr.getMaxAttributesCount=function(){var Ai=0;return yn.forEach(function(ji){ji.stats.attributesCount>Ai&&(Ai=ji.stats.attributesCount)}),Ai});function fn(){Ui={},Oi={};for(var Ai=0;Ai16&&(Wr=Ti(Wr,At.length*8));for(var wi=Array(16),Ui=Array(16),Oi=0;Oi<16;Oi++)wi[Oi]=Wr[Oi]^909522486,Ui[Oi]=Wr[Oi]^1549556828;var Bi=Ti(wi.concat(gf(Er)),512+Er.length*8);return gt(Ti(Ui.concat(Bi),768))}function ru(At){for(var Er=Ih?"0123456789ABCDEF":"0123456789abcdef",Wr="",wi,Ui=0;Ui>>4&15)+Er.charAt(wi&15);return Wr}function mc(At){for(var Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wr="",wi=At.length,Ui=0;UiAt.length*8?Wr+=Zu:Wr+=Er.charAt(Oi>>>6*(3-Bi)&63);return Wr}function Yc(At,Er){var Wr=Er.length,wi=Array(),Ui,Oi,Bi,cn,On=Array(Math.ceil(At.length/2));for(Ui=0;Ui0;){for(cn=Array(),Bi=0,Ui=0;Ui0||Oi>0)&&(cn[cn.length]=Oi);wi[wi.length]=Bi,On=cn}var Bn="";for(Ui=wi.length-1;Ui>=0;Ui--)Bn+=Er.charAt(wi[Ui]);var yn=Math.ceil(At.length*8/(Math.log(Er.length)/Math.log(2)));for(Ui=Bn.length;Ui>>6&31,128|wi&63):wi<=65535?Er+=String.fromCharCode(224|wi>>>12&15,128|wi>>>6&63,128|wi&63):wi<=2097151&&(Er+=String.fromCharCode(240|wi>>>18&7,128|wi>>>12&63,128|wi>>>6&63,128|wi&63));return Er}function gf(At){for(var Er=Array(At.length>>2),Wr=0;Wr>5]|=(At.charCodeAt(Wr/8)&255)<<24-Wr%32;return Er}function gt(At){for(var Er="",Wr=0;Wr>5]>>>24-Wr%32&255);return Er}function Bt(At,Er){return At>>>Er|At<<32-Er}function wr(At,Er){return At>>>Er}function vr(At,Er,Wr){return At&Er^~At&Wr}function Ur(At,Er,Wr){return At&Er^At&Wr^Er&Wr}function fi(At){return Bt(At,2)^Bt(At,13)^Bt(At,22)}function xi(At){return Bt(At,6)^Bt(At,11)^Bt(At,25)}function Fi(At){return Bt(At,7)^Bt(At,18)^wr(At,3)}function Xi(At){return Bt(At,17)^Bt(At,19)^wr(At,10)}var hn=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 Ti(At,Er){var Wr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),wi=new Array(64),Ui,Oi,Bi,cn,On,Bn,yn,to,Dn,Rn,fn,Ai;for(At[Er>>5]|=128<<24-Er%32,At[(Er+64>>9<<4)+15]=Er,Dn=0;Dn>16)+(Er>>16)+(Wr>>16);return wi<<16|Wr&65535}function Ii(At){return Array.prototype.slice.call(At)}function mi(At){return Ii(At).join("")}function Pn(At){var Er=At&&At.cache,Wr=0,wi=[],Ui=[],Oi=[];function Bi(fn,Ai){var ji=Ai&&Ai.stable;if(!ji){for(var Ln=0;Ln0&&(fn.push(Un,"="),fn.push.apply(fn,Ii(arguments)),fn.push(";")),Un}return e(Ai,{def:Ln,toString:function(){return mi([ji.length>0?"var "+ji.join(",")+";":"",mi(fn)])}})}function On(){var fn=cn(),Ai=cn(),ji=fn.toString,Ln=Ai.toString;function Un(gn,ca){Ai(gn,ca,"=",fn.def(gn,ca),";")}return e(function(){fn.apply(fn,Ii(arguments))},{def:fn.def,entry:fn,exit:Ai,save:Un,set:function(gn,ca,Kn){Un(gn,ca),fn(gn,ca,"=",Kn,";")},toString:function(){return ji()+Ln()}})}function Bn(){var fn=mi(arguments),Ai=On(),ji=On(),Ln=Ai.toString,Un=ji.toString;return e(Ai,{then:function(){return Ai.apply(Ai,Ii(arguments)),this},else:function(){return ji.apply(ji,Ii(arguments)),this},toString:function(){var gn=Un();return gn&&(gn="else{"+gn+"}"),mi(["if(",fn,"){",Ln(),"}",gn])}})}var yn=cn(),to={};function Dn(fn,Ai){var ji=[];function Ln(){var Za="a"+ji.length;return ji.push(Za),Za}Ai=Ai||0;for(var Un=0;Un":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Kr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ii={cw:we,ccw:Be};function vi(At){return Array.isArray(At)||Or(At)||Nr(At)}function ci(At){return At.sort(function(Er,Wr){return Er===ee?-1:Wr===ee?1:Er=1,wi>=2,Er)}else if(Wr===Xo){var Ui=At.data;return new Jr(Ui.thisDep,Ui.contextDep,Ui.propDep,Er)}else{if(Wr===Ts)return new Jr(!1,!1,!1,Er);if(Wr===Qo){for(var Oi=!1,Bi=!1,cn=!1,On=0;On=1&&(Bi=!0),yn>=2&&(cn=!0)}else Bn.type===Xo&&(Oi=Oi||Bn.data.thisDep,Bi=Bi||Bn.data.contextDep,cn=cn||Bn.data.propDep)}return new Jr(Oi,Bi,cn,Er)}else return new Jr(Wr===mo,Wr===Ua,Wr===sn,Er)}}var Nn=new Jr(!1,!1,!1,function(){});function ga(At,Er,Wr,wi,Ui,Oi,Bi,cn,On,Bn,yn,to,Dn,Rn,fn,Ai){var ji=Bn.Record,Ln={add:32774,subtract:32778,"reverse subtract":32779};Wr.ext_blend_minmax&&(Ln.min=Ue,Ln.max=We);var Un=Wr.angle_instanced_arrays,gn=Wr.webgl_draw_buffers,ca=Wr.oes_vertex_array_object,Kn={dirty:!0,profile:Ai.profile},Za={},wn=[],vn={},Aa={};function aa(vt){return vt.replace(".","_")}function Xn(vt,Pt,Wt){var rr=aa(vt);wn.push(vt),Za[rr]=Kn[rr]=!!Wt,vn[rr]=Pt}function Vn(vt,Pt,Wt){var rr=aa(vt);wn.push(vt),Array.isArray(Wt)?(Kn[rr]=Wt.slice(),Za[rr]=Wt.slice()):Kn[rr]=Za[rr]=Wt,Aa[rr]=Pt}function ma(vt){return!!isNaN(vt)}Xn(ys,di),Xn(Bo,Xr),Vn(yl,"blendColor",[0,0,0,0]),Vn(Gs,"blendEquationSeparate",[lr,lr]),Vn(Ds,"blendFuncSeparate",[or,zt,or,zt]),Xn(ia,Ci,!0),Vn(Ka,"depthFunc",Rr),Vn(vs,"depthRange",[0,1]),Vn(Ko,"depthMask",!0),Vn(iu,iu,[!0,!0,!0,!0]),Xn(Du,zr),Vn(ac,"cullFace",oe),Vn(mf,mf,Be),Vn(bu,bu,1),Xn(Kc,Mn),Vn(Ru,"polygonOffset",[0,0]),Xn(Rc,pa),Xn(Ra,ea),Vn(eo,"sampleCoverage",[1,!1]),Xn(Jc,Li),Vn(yc,"stencilMask",-1),Vn(_c,"stencilFunc",[wt,0,-1]),Vn(le,"stencilOpSeparate",[Z,tt,tt,tt]),Vn(w,"stencilOpSeparate",[oe,tt,tt,tt]),Xn(B,Qi),Vn(Q,"scissor",[0,0,At.drawingBufferWidth,At.drawingBufferHeight]),Vn(ee,ee,[0,0,At.drawingBufferWidth,At.drawingBufferHeight]);var ro={gl:At,context:Dn,strings:Er,next:Za,current:Kn,draw:to,elements:Oi,buffer:Ui,shader:yn,attributes:Bn.state,vao:Bn,uniforms:On,framebuffer:cn,extensions:Wr,timer:Rn,isBufferArgs:vi},Ao={primTypes:Ki,compareFuncs:qr,blendFuncs:ui,blendEquations:Ln,stencilOps:Kr,glTypes:bi,orientationType:ii};gn&&(Ao.backBuffer=[oe],Ao.drawBuffer=M(wi.maxDrawbuffers,function(vt){return vt===0?[0]:M(vt,function(Pt){return oi+Pt})}));var Jn=0;function Oa(){var vt=Pn({cache:fn}),Pt=vt.link,Wt=vt.global;vt.id=Jn++,vt.batchId="0";var rr=Pt(ro),dr=vt.shared={props:"a0"};Object.keys(ro).forEach(function(Cr){dr[Cr]=Wt.def(rr,".",Cr)});var pr=vt.next={},kr=vt.current={};Object.keys(Aa).forEach(function(Cr){Array.isArray(Kn[Cr])&&(pr[Cr]=Wt.def(dr.next,".",Cr),kr[Cr]=Wt.def(dr.current,".",Cr))});var Ar=vt.constants={};Object.keys(Ao).forEach(function(Cr){Ar[Cr]=Wt.def(JSON.stringify(Ao[Cr]))}),vt.invoke=function(Cr,cr){switch(cr.type){case Cn:var Gr=["this",dr.context,dr.props,vt.batchId];return Cr.def(Pt(cr.data),".call(",Gr.slice(0,Math.max(cr.data.length+1,4)),")");case sn:return Cr.def(dr.props,cr.data);case Ua:return Cr.def(dr.context,cr.data);case mo:return Cr.def("this",cr.data);case Xo:return cr.data.append(vt,Cr),cr.data.ref;case Ts:return cr.data.toString();case Qo:return cr.data.map(function(ei){return vt.invoke(Cr,ei)})}},vt.attribCache={};var gr={};return vt.scopeAttrib=function(Cr){var cr=Er.id(Cr);if(cr in gr)return gr[cr];var Gr=Bn.scope[cr];Gr||(Gr=Bn.scope[cr]=new ji);var ei=gr[cr]=Pt(Gr);return ei},vt}function _o(vt){var Pt=vt.static,Wt=vt.dynamic,rr;if(se in Pt){var dr=!!Pt[se];rr=dn(function(kr,Ar){return dr}),rr.enable=dr}else if(se in Wt){var pr=Wt[se];rr=En(pr,function(kr,Ar){return kr.invoke(Ar,pr)})}return rr}function Po(vt,Pt){var Wt=vt.static,rr=vt.dynamic;if(qe in Wt){var dr=Wt[qe];return dr?(dr=cn.getFramebuffer(dr),dn(function(kr,Ar){var gr=kr.link(dr),Cr=kr.shared;Ar.set(Cr.framebuffer,".next",gr);var cr=Cr.context;return Ar.set(cr,"."+Oe,gr+".width"),Ar.set(cr,"."+Je,gr+".height"),gr})):dn(function(kr,Ar){var gr=kr.shared;Ar.set(gr.framebuffer,".next","null");var Cr=gr.context;return Ar.set(Cr,"."+Oe,Cr+"."+Rt),Ar.set(Cr,"."+Je,Cr+"."+Ut),"null"})}else if(qe in rr){var pr=rr[qe];return En(pr,function(kr,Ar){var gr=kr.invoke(Ar,pr),Cr=kr.shared,cr=Cr.framebuffer,Gr=Ar.def(cr,".getFramebuffer(",gr,")");Ar.set(cr,".next",Gr);var ei=Cr.context;return Ar.set(ei,"."+Oe,Gr+"?"+Gr+".width:"+ei+"."+Rt),Ar.set(ei,"."+Je,Gr+"?"+Gr+".height:"+ei+"."+Ut),Gr})}else return null}function Jo(vt,Pt,Wt){var rr=vt.static,dr=vt.dynamic;function pr(gr){if(gr in rr){var Cr=rr[gr],cr=!0,Gr=Cr.x|0,ei=Cr.y|0,yi,tn;return"width"in Cr?yi=Cr.width|0:cr=!1,"height"in Cr?tn=Cr.height|0:cr=!1,new Jr(!cr&&Pt&&Pt.thisDep,!cr&&Pt&&Pt.contextDep,!cr&&Pt&&Pt.propDep,function(Qn,qn){var rn=Qn.shared.context,bn=yi;"width"in Cr||(bn=qn.def(rn,".",Oe,"-",Gr));var mn=tn;return"height"in Cr||(mn=qn.def(rn,".",Je,"-",ei)),[Gr,ei,bn,mn]})}else if(gr in dr){var Di=dr[gr],ln=En(Di,function(Qn,qn){var rn=Qn.invoke(qn,Di),bn=Qn.shared.context,mn=qn.def(rn,".x|0"),Gn=qn.def(rn,".y|0"),da=qn.def('"width" in ',rn,"?",rn,".width|0:","(",bn,".",Oe,"-",mn,")"),No=qn.def('"height" in ',rn,"?",rn,".height|0:","(",bn,".",Je,"-",Gn,")");return[mn,Gn,da,No]});return Pt&&(ln.thisDep=ln.thisDep||Pt.thisDep,ln.contextDep=ln.contextDep||Pt.contextDep,ln.propDep=ln.propDep||Pt.propDep),ln}else return Pt?new Jr(Pt.thisDep,Pt.contextDep,Pt.propDep,function(Qn,qn){var rn=Qn.shared.context;return[0,0,qn.def(rn,".",Oe),qn.def(rn,".",Je)]}):null}var kr=pr(ee);if(kr){var Ar=kr;kr=new Jr(kr.thisDep,kr.contextDep,kr.propDep,function(gr,Cr){var cr=Ar.append(gr,Cr),Gr=gr.shared.context;return Cr.set(Gr,"."+He,cr[2]),Cr.set(Gr,"."+et,cr[3]),cr})}return{viewport:kr,scissor_box:pr(Q)}}function Xl(vt,Pt){var Wt=vt.static,rr=typeof Wt[it]=="string"&&typeof Wt[je]=="string";if(rr){if(Object.keys(Pt.dynamic).length>0)return null;var dr=Pt.static,pr=Object.keys(dr);if(pr.length>0&&typeof dr[pr[0]]=="number"){for(var kr=[],Ar=0;Ar"+mn+"?"+cr+".constant["+mn+"]:0;"}).join(""),"}}else{","if(",yi,"(",cr,".buffer)){",Qn,"=",tn,".createStream(",mr,",",cr,".buffer);","}else{",Qn,"=",tn,".getBuffer(",cr,".buffer);","}",qn,'="type" in ',cr,"?",ei.glTypes,"[",cr,".type]:",Qn,".dtype;",Di.normalized,"=!!",cr,".normalized;");function rn(bn){Cr(Di[bn],"=",cr,".",bn,"|0;")}return rn("size"),rn("offset"),rn("stride"),rn("divisor"),Cr("}}"),Cr.exit("if(",Di.isStream,"){",tn,".destroyStream(",Qn,");","}"),Di}dr[pr]=En(kr,Ar)}),dr}function wc(vt){var Pt=vt.static,Wt=vt.dynamic,rr={};return Object.keys(Pt).forEach(function(dr){var pr=Pt[dr];rr[dr]=dn(function(kr,Ar){return typeof pr=="number"||typeof pr=="boolean"?""+pr:kr.link(pr)})}),Object.keys(Wt).forEach(function(dr){var pr=Wt[dr];rr[dr]=En(pr,function(kr,Ar){return kr.invoke(Ar,pr)})}),rr}function yf(vt,Pt,Wt,rr,dr){var pr=vt.static,kr=vt.dynamic,Ar=Xl(vt,Pt),gr=Po(vt,dr),Cr=Jo(vt,gr,dr),cr=xs(vt,dr),Gr=Qc(vt,dr),ei=$c(vt,dr,Ar);function yi(rn){var bn=Cr[rn];bn&&(Gr[rn]=bn)}yi(ee),yi(aa(Q));var tn=Object.keys(Gr).length>0,Di={framebuffer:gr,draw:cr,shader:ei,state:Gr,dirty:tn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Di.profile=_o(vt,dr),Di.uniforms=El(Wt,dr),Di.drawVAO=Di.scopeVAO=cr.vao,!Di.drawVAO&&ei.program&&!Ar&&Wr.angle_instanced_arrays&&cr.static.elements){var ln=!0,Qn=ei.program.attributes.map(function(rn){var bn=Pt.static[rn];return ln=ln&&!!bn,bn});if(ln&&Qn.length>0){var qn=Bn.getVAO(Bn.createVAO({attributes:Qn,elements:cr.static.elements}));Di.drawVAO=new Jr(null,null,null,function(rn,bn){return rn.link(qn)}),Di.useVAO=!0}}return Ar?Di.useVAO=!0:Di.attributes=bc(Pt,dr),Di.context=wc(rr,dr),Di}function Hl(vt,Pt,Wt){var rr=vt.shared,dr=rr.context,pr=vt.scope();Object.keys(Wt).forEach(function(kr){Pt.save(dr,"."+kr);var Ar=Wt[kr],gr=Ar.append(vt,Pt);Array.isArray(gr)?pr(dr,".",kr,"=[",gr.join(),"];"):pr(dr,".",kr,"=",gr,";")}),Pt(pr)}function Fc(vt,Pt,Wt,rr){var dr=vt.shared,pr=dr.gl,kr=dr.framebuffer,Ar;gn&&(Ar=Pt.def(dr.extensions,".webgl_draw_buffers"));var gr=vt.constants,Cr=gr.drawBuffer,cr=gr.backBuffer,Gr;Wt?Gr=Wt.append(vt,Pt):Gr=Pt.def(kr,".next"),rr||Pt("if(",Gr,"!==",kr,".cur){"),Pt("if(",Gr,"){",pr,".bindFramebuffer(",Ir,",",Gr,".framebuffer);"),gn&&Pt(Ar,".drawBuffersWEBGL(",Cr,"[",Gr,".colorAttachments.length]);"),Pt("}else{",pr,".bindFramebuffer(",Ir,",null);"),gn&&Pt(Ar,".drawBuffersWEBGL(",cr,");"),Pt("}",kr,".cur=",Gr,";"),rr||Pt("}")}function ef(vt,Pt,Wt){var rr=vt.shared,dr=rr.gl,pr=vt.current,kr=vt.next,Ar=rr.current,gr=rr.next,Cr=vt.cond(Ar,".dirty");wn.forEach(function(cr){var Gr=aa(cr);if(!(Gr in Wt.state)){var ei,yi;if(Gr in kr){ei=kr[Gr],yi=pr[Gr];var tn=M(Kn[Gr].length,function(ln){return Cr.def(ei,"[",ln,"]")});Cr(vt.cond(tn.map(function(ln,Qn){return ln+"!=="+yi+"["+Qn+"]"}).join("||")).then(dr,".",Aa[Gr],"(",tn,");",tn.map(function(ln,Qn){return yi+"["+Qn+"]="+ln}).join(";"),";"))}else{ei=Cr.def(gr,".",Gr);var Di=vt.cond(ei,"!==",Ar,".",Gr);Cr(Di),Gr in vn?Di(vt.cond(ei).then(dr,".enable(",vn[Gr],");").else(dr,".disable(",vn[Gr],");"),Ar,".",Gr,"=",ei,";"):Di(dr,".",Aa[Gr],"(",ei,");",Ar,".",Gr,"=",ei,";")}}}),Object.keys(Wt.state).length===0&&Cr(Ar,".dirty=false;"),Pt(Cr)}function ls(vt,Pt,Wt,rr){var dr=vt.shared,pr=vt.current,kr=dr.current,Ar=dr.gl,gr;ci(Object.keys(Wt)).forEach(function(Cr){var cr=Wt[Cr];if(!(rr&&!rr(cr))){var Gr=cr.append(vt,Pt);if(vn[Cr]){var ei=vn[Cr];un(cr)?(gr=vt.link(Gr,{stable:!0}),Pt(vt.cond(gr).then(Ar,".enable(",ei,");").else(Ar,".disable(",ei,");")),Pt(kr,".",Cr,"=",gr,";")):(Pt(vt.cond(Gr).then(Ar,".enable(",ei,");").else(Ar,".disable(",ei,");")),Pt(kr,".",Cr,"=",Gr,";"))}else if(an(Gr)){var yi=pr[Cr];Pt(Ar,".",Aa[Cr],"(",Gr,");",Gr.map(function(tn,Di){return yi+"["+Di+"]="+tn}).join(";"),";")}else un(cr)?(gr=vt.link(Gr,{stable:!0}),Pt(Ar,".",Aa[Cr],"(",gr,");",kr,".",Cr,"=",gr,";")):Pt(Ar,".",Aa[Cr],"(",Gr,");",kr,".",Cr,"=",Gr,";")}})}function _f(vt,Pt){Un&&(vt.instancing=Pt.def(vt.shared.extensions,".angle_instanced_arrays"))}function ns(vt,Pt,Wt,rr,dr){var pr=vt.shared,kr=vt.stats,Ar=pr.current,gr=pr.timer,Cr=Wt.profile;function cr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var Gr,ei;function yi(rn){Gr=Pt.def(),rn(Gr,"=",cr(),";"),typeof dr=="string"?rn(kr,".count+=",dr,";"):rn(kr,".count++;"),Rn&&(rr?(ei=Pt.def(),rn(ei,"=",gr,".getNumPendingQueries();")):rn(gr,".beginQuery(",kr,");"))}function tn(rn){rn(kr,".cpuTime+=",cr(),"-",Gr,";"),Rn&&(rr?rn(gr,".pushScopeStats(",ei,",",gr,".getNumPendingQueries(),",kr,");"):rn(gr,".endQuery();"))}function Di(rn){var bn=Pt.def(Ar,".profile");Pt(Ar,".profile=",rn,";"),Pt.exit(Ar,".profile=",bn,";")}var ln;if(Cr){if(un(Cr)){Cr.enable?(yi(Pt),tn(Pt.exit),Di("true")):Di("false");return}ln=Cr.append(vt,Pt),Di(ln)}else ln=Pt.def(Ar,".profile");var Qn=vt.block();yi(Qn),Pt("if(",ln,"){",Qn,"}");var qn=vt.block();tn(qn),Pt.exit("if(",ln,"){",qn,"}")}function Y(vt,Pt,Wt,rr,dr){var pr=vt.shared;function kr(gr){switch(gr){case To:case Rs:case _l:return 2;case Wa:case As:case Vl:return 3;case co:case yo:case Xu:return 4;default:return 1}}function Ar(gr,Cr,cr){var Gr=pr.gl,ei=Pt.def(gr,".location"),yi=Pt.def(pr.attributes,"[",ei,"]"),tn=cr.state,Di=cr.buffer,ln=[cr.x,cr.y,cr.z,cr.w],Qn=["buffer","normalized","offset","stride"];function qn(){Pt("if(!",yi,".buffer){",Gr,".enableVertexAttribArray(",ei,");}");var bn=cr.type,mn;if(cr.size?mn=Pt.def(cr.size,"||",Cr):mn=Cr,Pt("if(",yi,".type!==",bn,"||",yi,".size!==",mn,"||",Qn.map(function(da){return yi+"."+da+"!=="+cr[da]}).join("||"),"){",Gr,".bindBuffer(",mr,",",Di,".buffer);",Gr,".vertexAttribPointer(",[ei,mn,bn,cr.normalized,cr.stride,cr.offset],");",yi,".type=",bn,";",yi,".size=",mn,";",Qn.map(function(da){return yi+"."+da+"="+cr[da]+";"}).join(""),"}"),Un){var Gn=cr.divisor;Pt("if(",yi,".divisor!==",Gn,"){",vt.instancing,".vertexAttribDivisorANGLE(",[ei,Gn],");",yi,".divisor=",Gn,";}")}}function rn(){Pt("if(",yi,".buffer){",Gr,".disableVertexAttribArray(",ei,");",yi,".buffer=null;","}if(",Ma.map(function(bn,mn){return yi+"."+bn+"!=="+ln[mn]}).join("||"),"){",Gr,".vertexAttrib4f(",ei,",",ln,");",Ma.map(function(bn,mn){return yi+"."+bn+"="+ln[mn]+";"}).join(""),"}")}tn===Ea?qn():tn===qa?rn():(Pt("if(",tn,"===",Ea,"){"),qn(),Pt("}else{"),rn(),Pt("}"))}rr.forEach(function(gr){var Cr=gr.name,cr=Wt.attributes[Cr],Gr;if(cr){if(!dr(cr))return;Gr=cr.append(vt,Pt)}else{if(!dr(Nn))return;var ei=vt.scopeAttrib(Cr);Gr={},Object.keys(new ji).forEach(function(yi){Gr[yi]=Pt.def(ei,".",yi)})}Ar(vt.link(gr),kr(gr.info.type),Gr)})}function z(vt,Pt,Wt,rr,dr,pr){for(var kr=vt.shared,Ar=kr.gl,gr,Cr=0;Cr1){for(var Ro=[],ps=[],fo=0;fo>1)",Di],");")}function Gn(){Wt(ln,".drawArraysInstancedANGLE(",[ei,yi,tn,Di],");")}cr&&cr!=="null"?qn?mn():(Wt("if(",cr,"){"),mn(),Wt("}else{"),Gn(),Wt("}")):Gn()}function bn(){function mn(){Wt(pr+".drawElements("+[ei,tn,Qn,yi+"<<(("+Qn+"-"+Ta+")>>1)"]+");")}function Gn(){Wt(pr+".drawArrays("+[ei,yi,tn]+");")}cr&&cr!=="null"?qn?mn():(Wt("if(",cr,"){"),mn(),Wt("}else{"),Gn(),Wt("}")):Gn()}Un&&(typeof Di!="number"||Di>=0)?typeof Di=="string"?(Wt("if(",Di,">0){"),rn(),Wt("}else if(",Di,"<0){"),bn(),Wt("}")):rn():bn()}function O(vt,Pt,Wt,rr,dr){var pr=Oa(),kr=pr.proc("body",dr);return Un&&(pr.instancing=kr.def(pr.shared.extensions,".angle_instanced_arrays")),vt(pr,kr,Wt,rr),pr.compile().body}function $(vt,Pt,Wt,rr){_f(vt,Pt),Wt.useVAO?Wt.drawVAO?Pt(vt.shared.vao,".setVAO(",Wt.drawVAO.append(vt,Pt),");"):Pt(vt.shared.vao,".setVAO(",vt.shared.vao,".targetVAO);"):(Pt(vt.shared.vao,".setVAO(null);"),Y(vt,Pt,Wt,rr.attributes,function(){return!0})),z(vt,Pt,Wt,rr.uniforms,function(){return!0},!1),K(vt,Pt,Pt,Wt)}function pe(vt,Pt){var Wt=vt.proc("draw",1);_f(vt,Wt),Hl(vt,Wt,Pt.context),Fc(vt,Wt,Pt.framebuffer),ef(vt,Wt,Pt),ls(vt,Wt,Pt.state),ns(vt,Wt,Pt,!1,!0);var rr=Pt.shader.progVar.append(vt,Wt);if(Wt(vt.shared.gl,".useProgram(",rr,".program);"),Pt.shader.program)$(vt,Wt,Pt,Pt.shader.program);else{Wt(vt.shared.vao,".setVAO(null);");var dr=vt.global.def("{}"),pr=Wt.def(rr,".id"),kr=Wt.def(dr,"[",pr,"]");Wt(vt.cond(kr).then(kr,".call(this,a0);").else(kr,"=",dr,"[",pr,"]=",vt.link(function(Ar){return O($,vt,Pt,Ar,1)}),"(",rr,");",kr,".call(this,a0);"))}Object.keys(Pt.state).length>0&&Wt(vt.shared.current,".dirty=true;"),vt.shared.vao&&Wt(vt.shared.vao,".setVAO(null);")}function de(vt,Pt,Wt,rr){vt.batchId="a1",_f(vt,Pt);function dr(){return!0}Y(vt,Pt,Wt,rr.attributes,dr),z(vt,Pt,Wt,rr.uniforms,dr,!1),K(vt,Pt,Pt,Wt)}function Ie(vt,Pt,Wt,rr){_f(vt,Pt);var dr=Wt.contextDep,pr=Pt.def(),kr="a0",Ar="a1",gr=Pt.def();vt.shared.props=gr,vt.batchId=pr;var Cr=vt.scope(),cr=vt.scope();Pt(Cr.entry,"for(",pr,"=0;",pr,"<",Ar,";++",pr,"){",gr,"=",kr,"[",pr,"];",cr,"}",Cr.exit);function Gr(Qn){return Qn.contextDep&&dr||Qn.propDep}function ei(Qn){return!Gr(Qn)}if(Wt.needsContext&&Hl(vt,cr,Wt.context),Wt.needsFramebuffer&&Fc(vt,cr,Wt.framebuffer),ls(vt,cr,Wt.state,Gr),Wt.profile&&Gr(Wt.profile)&&ns(vt,cr,Wt,!1,!0),rr)Wt.useVAO?Wt.drawVAO?Gr(Wt.drawVAO)?cr(vt.shared.vao,".setVAO(",Wt.drawVAO.append(vt,cr),");"):Cr(vt.shared.vao,".setVAO(",Wt.drawVAO.append(vt,Cr),");"):Cr(vt.shared.vao,".setVAO(",vt.shared.vao,".targetVAO);"):(Cr(vt.shared.vao,".setVAO(null);"),Y(vt,Cr,Wt,rr.attributes,ei),Y(vt,cr,Wt,rr.attributes,Gr)),z(vt,Cr,Wt,rr.uniforms,ei,!1),z(vt,cr,Wt,rr.uniforms,Gr,!0),K(vt,Cr,cr,Wt);else{var yi=vt.global.def("{}"),tn=Wt.shader.progVar.append(vt,cr),Di=cr.def(tn,".id"),ln=cr.def(yi,"[",Di,"]");cr(vt.shared.gl,".useProgram(",tn,".program);","if(!",ln,"){",ln,"=",yi,"[",Di,"]=",vt.link(function(Qn){return O(de,vt,Wt,Qn,2)}),"(",tn,");}",ln,".call(this,a0[",pr,"],",pr,");")}}function $e(vt,Pt){var Wt=vt.proc("batch",2);vt.batchId="0",_f(vt,Wt);var rr=!1,dr=!0;Object.keys(Pt.context).forEach(function(yi){rr=rr||Pt.context[yi].propDep}),rr||(Hl(vt,Wt,Pt.context),dr=!1);var pr=Pt.framebuffer,kr=!1;pr?(pr.propDep?rr=kr=!0:pr.contextDep&&rr&&(kr=!0),kr||Fc(vt,Wt,pr)):Fc(vt,Wt,null),Pt.state.viewport&&Pt.state.viewport.propDep&&(rr=!0);function Ar(yi){return yi.contextDep&&rr||yi.propDep}ef(vt,Wt,Pt),ls(vt,Wt,Pt.state,function(yi){return!Ar(yi)}),(!Pt.profile||!Ar(Pt.profile))&&ns(vt,Wt,Pt,!1,"a1"),Pt.contextDep=rr,Pt.needsContext=dr,Pt.needsFramebuffer=kr;var gr=Pt.shader.progVar;if(gr.contextDep&&rr||gr.propDep)Ie(vt,Wt,Pt,null);else{var Cr=gr.append(vt,Wt);if(Wt(vt.shared.gl,".useProgram(",Cr,".program);"),Pt.shader.program)Ie(vt,Wt,Pt,Pt.shader.program);else{Wt(vt.shared.vao,".setVAO(null);");var cr=vt.global.def("{}"),Gr=Wt.def(Cr,".id"),ei=Wt.def(cr,"[",Gr,"]");Wt(vt.cond(ei).then(ei,".call(this,a0,a1);").else(ei,"=",cr,"[",Gr,"]=",vt.link(function(yi){return O(Ie,vt,Pt,yi,2)}),"(",Cr,");",ei,".call(this,a0,a1);"))}}Object.keys(Pt.state).length>0&&Wt(vt.shared.current,".dirty=true;"),vt.shared.vao&&Wt(vt.shared.vao,".setVAO(null);")}function pt(vt,Pt){var Wt=vt.proc("scope",3);vt.batchId="a2";var rr=vt.shared,dr=rr.current;if(Hl(vt,Wt,Pt.context),Pt.framebuffer&&Pt.framebuffer.append(vt,Wt),ci(Object.keys(Pt.state)).forEach(function(Ar){var gr=Pt.state[Ar],Cr=gr.append(vt,Wt);an(Cr)?Cr.forEach(function(cr,Gr){ma(cr)?Wt.set(vt.next[Ar],"["+Gr+"]",cr):Wt.set(vt.next[Ar],"["+Gr+"]",vt.link(cr,{stable:!0}))}):un(gr)?Wt.set(rr.next,"."+Ar,vt.link(Cr,{stable:!0})):Wt.set(rr.next,"."+Ar,Cr)}),ns(vt,Wt,Pt,!0,!0),[yt,hr,Nt,Sr,Ot].forEach(function(Ar){var gr=Pt.draw[Ar];if(gr){var Cr=gr.append(vt,Wt);ma(Cr)?Wt.set(rr.draw,"."+Ar,Cr):Wt.set(rr.draw,"."+Ar,vt.link(Cr),{stable:!0})}}),Object.keys(Pt.uniforms).forEach(function(Ar){var gr=Pt.uniforms[Ar].append(vt,Wt);Array.isArray(gr)&&(gr="["+gr.map(function(Cr){return ma(Cr)?Cr:vt.link(Cr,{stable:!0})})+"]"),Wt.set(rr.uniforms,"["+vt.link(Er.id(Ar),{stable:!0})+"]",gr)}),Object.keys(Pt.attributes).forEach(function(Ar){var gr=Pt.attributes[Ar].append(vt,Wt),Cr=vt.scopeAttrib(Ar);Object.keys(new ji).forEach(function(cr){Wt.set(Cr,"."+cr,gr[cr])})}),Pt.scopeVAO){var pr=Pt.scopeVAO.append(vt,Wt);ma(pr)?Wt.set(rr.vao,".targetVAO",pr):Wt.set(rr.vao,".targetVAO",vt.link(pr,{stable:!0}))}function kr(Ar){var gr=Pt.shader[Ar];if(gr){var Cr=gr.append(vt,Wt);ma(Cr)?Wt.set(rr.shader,"."+Ar,Cr):Wt.set(rr.shader,"."+Ar,vt.link(Cr,{stable:!0}))}}kr(je),kr(it),Object.keys(Pt.state).length>0&&(Wt(dr,".dirty=true;"),Wt.exit(dr,".dirty=true;")),Wt("a1(",vt.shared.context,",a0,",vt.batchId,");")}function Kt(vt){if(!(typeof vt!="object"||an(vt))){for(var Pt=Object.keys(vt),Wt=0;Wt=0;--O){var $=ro[O];$&&$(fn,null,0)}Wr.flush(),yn&&yn.update()}function Jo(){!_o&&ro.length>0&&(_o=d.next(Po))}function Xl(){_o&&(d.cancel(Po),_o=null)}function $c(O){O.preventDefault(),Ui=!0,Xl(),Ao.forEach(function($){$()})}function xs(O){Wr.getError(),Ui=!1,Oi.restore(),Za.restore(),Un.restore(),wn.restore(),vn.restore(),Aa.restore(),ca.restore(),yn&&yn.restore(),aa.procs.refresh(),Jo(),Jn.forEach(function($){$()})}ma&&(ma.addEventListener(Lo,$c,!1),ma.addEventListener(Fo,xs,!1));function Qc(){ro.length=0,Xl(),ma&&(ma.removeEventListener(Lo,$c),ma.removeEventListener(Fo,xs)),Za.clear(),Aa.clear(),vn.clear(),ca.clear(),wn.clear(),gn.clear(),Un.clear(),yn&&yn.clear(),Oa.forEach(function(O){O()})}function El(O){function $(pr){var kr=e({},pr);delete kr.uniforms,delete kr.attributes,delete kr.context,delete kr.vao,"stencil"in kr&&kr.stencil.op&&(kr.stencil.opBack=kr.stencil.opFront=kr.stencil.op,delete kr.stencil.op);function Ar(gr){if(gr in kr){var Cr=kr[gr];delete kr[gr],Object.keys(Cr).forEach(function(cr){kr[gr+"."+cr]=Cr[cr]})}}return Ar("blend"),Ar("depth"),Ar("cull"),Ar("stencil"),Ar("polygonOffset"),Ar("scissor"),Ar("sample"),"vao"in pr&&(kr.vao=pr.vao),kr}function pe(pr,kr){var Ar={},gr={};return Object.keys(pr).forEach(function(Cr){var cr=pr[Cr];if(h.isDynamic(cr)){gr[Cr]=h.unbox(cr,Cr);return}else if(kr&&Array.isArray(cr)){for(var Gr=0;Gr0)return vt.call(this,rr(pr|0),pr|0)}else if(Array.isArray(pr)){if(pr.length)return vt.call(this,pr,pr.length)}else return Jt.call(this,pr)}return e(dr,{stats:Kt,destroy:function(){ir.destroy()}})}var bc=Aa.setFBO=El({framebuffer:h.define.call(null,js,"framebuffer")});function wc(O,$){var pe=0;aa.procs.poll();var de=$.color;de&&(Wr.clearColor(+de[0]||0,+de[1]||0,+de[2]||0,+de[3]||0),pe|=_s),"depth"in $&&(Wr.clearDepth(+$.depth),pe|=Ns),"stencil"in $&&(Wr.clearStencil($.stencil|0),pe|=pn),Wr.clear(pe)}function yf(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var $=0;$<6;++$)bc(e({framebuffer:O.framebuffer.faces[$]},O),wc);else bc(O,wc);else wc(null,O)}function Hl(O){ro.push(O);function $(){var pe=dl(ro,O);function de(){var Ie=dl(ro,de);ro[Ie]=ro[ro.length-1],ro.length-=1,ro.length<=0&&Xl()}ro[pe]=de}return Jo(),{cancel:$}}function Fc(){var O=Vn.viewport,$=Vn.scissor_box;O[0]=O[1]=$[0]=$[1]=0,fn.viewportWidth=fn.framebufferWidth=fn.drawingBufferWidth=O[2]=$[2]=Wr.drawingBufferWidth,fn.viewportHeight=fn.framebufferHeight=fn.drawingBufferHeight=O[3]=$[3]=Wr.drawingBufferHeight}function ef(){fn.tick+=1,fn.time=_f(),Fc(),aa.procs.poll()}function ls(){wn.refresh(),Fc(),aa.procs.refresh(),yn&&yn.update()}function _f(){return(v()-to)/1e3}ls();function ns(O,$){var pe;switch(O){case"frame":return Hl($);case"lost":pe=Ao;break;case"restore":pe=Jn;break;case"destroy":pe=Oa;break;default:}return pe.push($),{cancel:function(){for(var de=0;de=0},read:Xn,destroy:Qc,_gl:Wr,_refresh:ls,poll:function(){ef(),yn&&yn.update()},now:_f,stats:cn,getCachedCode:Y,preloadCachedCode:z});return Er.onDone(null,K),K}return xc})});var Iqe=ye((pmr,Pqe)=>{"use strict";var jOt=Zm();Pqe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},Cqe(t)?t={container:t}:WOt(t)?t={container:t}:ZOt(t)?t={gl:t}:t=jOt(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}Cqe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=Lqe(),t.container.appendChild(t.canvas),kqe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=Lqe(),t.container.appendChild(t.canvas),kqe(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 kqe(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 Cqe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function WOt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function ZOt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function Lqe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var Rqe=ye((gmr,Dqe)=>{"use strict";var XOt=UY(),YOt=[32,126];Dqe.exports=KOt;function KOt(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||YOt;if(n&&typeof n!="string"&&(n=XOt(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 WY=ye(Th=>{"use strict";"use restrict";var jY=32;Th.INT_BITS=jY;Th.INT_MAX=2147483647;Th.INT_MIN=-1<0)-(e<0)};Th.abs=function(e){var t=e>>jY-1;return(e^t)-t};Th.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};Th.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};Th.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function zqe(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}Th.countTrailingZeros=zqe;Th.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};Th.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Th.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var yk=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|yk[e>>>16&255]<<8|yk[e>>>24&255]};Th.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};Th.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};Th.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};Th.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};Th.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>zqe(e)+1}});var Oqe=ye((ymr,qqe)=>{"use strict";function Fqe(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 JOt(e|0,t);break;case"object":if(typeof e.length=="number")return Fqe(e,t,0);break}return[]}qqe.exports=$Ot});var Qqe=ye(jl=>{"use strict";var cx=WY(),Av=Oqe(),Bqe=u2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Av([32,0]),UINT16:Av([32,0]),UINT32:Av([32,0]),BIGUINT64:Av([32,0]),INT8:Av([32,0]),INT16:Av([32,0]),INT32:Av([32,0]),BIGINT64:Av([32,0]),FLOAT:Av([32,0]),DOUBLE:Av([32,0]),DATA:Av([32,0]),UINT8C:Av([32,0]),BUFFER:Av([32,0])});var QOt=typeof Uint8ClampedArray!="undefined",eBt=typeof BigUint64Array!="undefined",tBt=typeof BigInt64Array!="undefined",Xh=window.__TYPEDARRAY_POOL;Xh.UINT8C||(Xh.UINT8C=Av([32,0]));Xh.BIGUINT64||(Xh.BIGUINT64=Av([32,0]));Xh.BIGINT64||(Xh.BIGINT64=Av([32,0]));Xh.BUFFER||(Xh.BUFFER=Av([32,0]));var dF=Xh.DATA,vF=Xh.BUFFER;jl.free=function(t){if(Bqe.isBuffer(t))vF[cx.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=cx.log2(r)|0;dF[n].push(t)}};function Nqe(e){if(e){var t=e.length||e.byteLength,r=cx.log2(t);dF[r].push(e)}}function rBt(e){Nqe(e.buffer)}jl.freeUint8=jl.freeUint16=jl.freeUint32=jl.freeBigUint64=jl.freeInt8=jl.freeInt16=jl.freeInt32=jl.freeBigInt64=jl.freeFloat32=jl.freeFloat=jl.freeFloat64=jl.freeDouble=jl.freeUint8Clamped=jl.freeDataView=rBt;jl.freeArrayBuffer=Nqe;jl.freeBuffer=function(t){vF[cx.log2(t.length)].push(t)};jl.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return ZY(t);case"uint16":return Uqe(t);case"uint32":return Vqe(t);case"int8":return Hqe(t);case"int16":return Gqe(t);case"int32":return jqe(t);case"float":case"float32":return Wqe(t);case"double":case"float64":return Zqe(t);case"uint8_clamped":return Xqe(t);case"bigint64":return Kqe(t);case"biguint64":return Yqe(t);case"buffer":return $qe(t);case"data":case"dataview":return Jqe(t);default:return null}return null};function Bp(t){var t=cx.nextPow2(t),r=cx.log2(t),n=dF[r];return n.length>0?n.pop():new ArrayBuffer(t)}jl.mallocArrayBuffer=Bp;function ZY(e){return new Uint8Array(Bp(e),0,e)}jl.mallocUint8=ZY;function Uqe(e){return new Uint16Array(Bp(2*e),0,e)}jl.mallocUint16=Uqe;function Vqe(e){return new Uint32Array(Bp(4*e),0,e)}jl.mallocUint32=Vqe;function Hqe(e){return new Int8Array(Bp(e),0,e)}jl.mallocInt8=Hqe;function Gqe(e){return new Int16Array(Bp(2*e),0,e)}jl.mallocInt16=Gqe;function jqe(e){return new Int32Array(Bp(4*e),0,e)}jl.mallocInt32=jqe;function Wqe(e){return new Float32Array(Bp(4*e),0,e)}jl.mallocFloat32=jl.mallocFloat=Wqe;function Zqe(e){return new Float64Array(Bp(8*e),0,e)}jl.mallocFloat64=jl.mallocDouble=Zqe;function Xqe(e){return QOt?new Uint8ClampedArray(Bp(e),0,e):ZY(e)}jl.mallocUint8Clamped=Xqe;function Yqe(e){return eBt?new BigUint64Array(Bp(8*e),0,e):null}jl.mallocBigUint64=Yqe;function Kqe(e){return tBt?new BigInt64Array(Bp(8*e),0,e):null}jl.mallocBigInt64=Kqe;function Jqe(e){return new DataView(Bp(e),0,e)}jl.mallocDataView=Jqe;function $qe(e){e=cx.nextPow2(e);var t=cx.log2(e),r=vF[t];return r.length>0?r.pop():new Bqe(e)}jl.mallocBuffer=$qe;jl.clearCache=function(){for(var t=0;t<32;++t)Xh.UINT8[t].length=0,Xh.UINT16[t].length=0,Xh.UINT32[t].length=0,Xh.INT8[t].length=0,Xh.INT16[t].length=0,Xh.INT32[t].length=0,Xh.FLOAT[t].length=0,Xh.DOUBLE[t].length=0,Xh.BIGUINT64[t].length=0,Xh.BIGINT64[t].length=0,Xh.UINT8C[t].length=0,dF[t].length=0,vF[t].length=0}});var tOe=ye((xmr,eOe)=>{"use strict";var iBt=Object.prototype.toString;eOe.exports=function(e){var t;return iBt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var XY=ye((bmr,rOe)=>{rOe.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 aOe=ye((wmr,nOe)=>{"use strict";var nBt=XY();nOe.exports=iOe;var _k=96;function YY(e,t){var r=nBt(getComputedStyle(e).getPropertyValue(t));return r[0]*iOe(r[1],e)}function aBt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=YY(r,"font-size")/128;return t.removeChild(r),n}function iOe(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 aBt(e,t);case"em":return YY(t,"font-size");case"rem":return YY(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 _k;case"cm":return _k/2.54;case"mm":return _k/25.4;case"pt":return _k/72;case"pc":return _k/6}return 1}});var lOe=ye((Tmr,sOe)=>{"use strict";sOe.exports=mF;var oBt=mF.canvas=document.createElement("canvas"),pF=oBt.getContext("2d"),oOe=gF([32,126]);mF.createPairs=gF;mF.ascii=oOe;function mF(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=gF(t):Array.isArray(t)?n=t:(t.o?n=gF(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=oOe),pF.font=i+"px "+e;for(var o=0;oi*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function gF(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";fOe.exports=fx;fx.canvas=document.createElement("canvas");fx.cache={};function fx(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(fx.cache[r]&&n<=fx.cache[r].em)return uOe(fx.cache[r],s);var l=t.canvas||fx.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=Ym(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var x=Ym(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-x+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=Ym(u.getImageData(0,0,f,f)),g=f-b-1+v;d.baseline=d.alphabetic=g,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var E=Ym(u.getImageData(0,0,f,f));d.median=d.middle=f-E-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var k=Ym(u.getImageData(0,0,f,f));d.hanging=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var S=Ym(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=Ym(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=Ym(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=Ym(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=Ym(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=cOe(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=cOe(u.getImageData(0,0,f,f));d.overshoot=L-g}for(var _ in d)d[_]/=n;return d.em=n,fx.cache[r]=d,uOe(d,s)}function uOe(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 Ym(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 gOe=ye((Smr,pOe)=>{"use strict";var hA=Eqe(),sBt=Zm(),lBt=GY(),uBt=Iqe(),cBt=EY(),KY=J_(),fBt=Rqe(),hx=Qqe(),hBt=eA(),dBt=tOe(),vBt=XY(),pBt=aOe(),gBt=lOe(),mBt=bh(),yBt=hOe(),_Bt=W2(),xBt=WY(),dOe=xBt.nextPow2,vOe=new cBt,_F=!1;document.body&&(yF=document.body.appendChild(document.createElement("div")),yF.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(yF).fontStretch&&(_F=!0),document.body.removeChild(yF));var yF,Hu=function(t){bBt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=uBt(t),this.shader=vOe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||lBt({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(),vOe.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(dBt(t)?t:{})};Hu.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:` +`),ji;if(Er&&(ji=Dc(Ai),Er[ji]))return Er[ji].apply(null,Ui);var Ln=Function.apply(null,wi.concat(Ai));return Er&&(Er[ji]=Ln),Ln.apply(null,Ui)}return{global:yn,link:Bi,block:cn,proc:Dn,scope:On,cond:Bn,compile:Rn}}var Ma="xyzw".split(""),Ta=5121,Ea=1,qa=2,Cn=0,sn=1,Ua=2,mo=3,Xo=4,Ts=5,Qo=6,ys="dither",Bo="blend.enable",yl="blend.color",Gs="blend.equation",Ds="blend.func",ia="depth.enable",Ka="depth.func",vs="depth.range",Ko="depth.mask",iu="colorMask",Du="cull.enable",ac="cull.face",mf="frontFace",bu="lineWidth",Kc="polygonOffset.enable",Ru="polygonOffset.offset",Rc="sample.alpha",Ra="sample.enable",eo="sample.coverage",Jc="stencil.enable",yc="stencil.mask",_c="stencil.func",le="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",se="profile",qe="framebuffer",je="vert",it="frag",yt="elements",Ot="primitive",Nt="count",hr="offset",Sr="instances",he="vao",be="Width",Pe="Height",Oe=qe+be,Je=qe+Pe,He=ee+be,et=ee+Pe,Mt="drawingBuffer",Rt=Mt+be,Ut=Mt+Pe,tr=[Ds,Gs,_c,le,w,eo,ee,Q,Ru],mr=34962,Dr=34963,zr=2884,Xr=3042,di=3024,Li=2960,Ci=2929,Qi=3089,Mn=32823,pa=32926,ea=32928,Ga=5126,To=35664,Wa=35665,co=35666,Do=5124,Rs=35667,As=35668,yo=35669,po=35670,_l=35671,Vl=35672,Xu=35673,cu=35674,el=35675,nu=35676,zc=35678,Rl=35680,zl=4,Z=1028,oe=1029,we=2304,Be=2305,Ue=32775,We=32776,wt=519,tt=7680,zt=0,or=1,lr=32774,Rr=513,Ir=36160,oi=36064,ui={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},qr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Kr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ii={cw:we,ccw:Be};function vi(At){return Array.isArray(At)||Or(At)||Nr(At)}function ci(At){return At.sort(function(Er,Wr){return Er===ee?-1:Wr===ee?1:Er=1,wi>=2,Er)}else if(Wr===Xo){var Ui=At.data;return new Jr(Ui.thisDep,Ui.contextDep,Ui.propDep,Er)}else{if(Wr===Ts)return new Jr(!1,!1,!1,Er);if(Wr===Qo){for(var Oi=!1,Bi=!1,cn=!1,On=0;On=1&&(Bi=!0),yn>=2&&(cn=!0)}else Bn.type===Xo&&(Oi=Oi||Bn.data.thisDep,Bi=Bi||Bn.data.contextDep,cn=cn||Bn.data.propDep)}return new Jr(Oi,Bi,cn,Er)}else return new Jr(Wr===mo,Wr===Ua,Wr===sn,Er)}}var Nn=new Jr(!1,!1,!1,function(){});function ga(At,Er,Wr,wi,Ui,Oi,Bi,cn,On,Bn,yn,to,Dn,Rn,fn,Ai){var ji=Bn.Record,Ln={add:32774,subtract:32778,"reverse subtract":32779};Wr.ext_blend_minmax&&(Ln.min=Ue,Ln.max=We);var Un=Wr.angle_instanced_arrays,gn=Wr.webgl_draw_buffers,ca=Wr.oes_vertex_array_object,Kn={dirty:!0,profile:Ai.profile},Za={},wn=[],vn={},Aa={};function aa(vt){return vt.replace(".","_")}function Xn(vt,Pt,Wt){var rr=aa(vt);wn.push(vt),Za[rr]=Kn[rr]=!!Wt,vn[rr]=Pt}function Vn(vt,Pt,Wt){var rr=aa(vt);wn.push(vt),Array.isArray(Wt)?(Kn[rr]=Wt.slice(),Za[rr]=Wt.slice()):Kn[rr]=Za[rr]=Wt,Aa[rr]=Pt}function ma(vt){return!!isNaN(vt)}Xn(ys,di),Xn(Bo,Xr),Vn(yl,"blendColor",[0,0,0,0]),Vn(Gs,"blendEquationSeparate",[lr,lr]),Vn(Ds,"blendFuncSeparate",[or,zt,or,zt]),Xn(ia,Ci,!0),Vn(Ka,"depthFunc",Rr),Vn(vs,"depthRange",[0,1]),Vn(Ko,"depthMask",!0),Vn(iu,iu,[!0,!0,!0,!0]),Xn(Du,zr),Vn(ac,"cullFace",oe),Vn(mf,mf,Be),Vn(bu,bu,1),Xn(Kc,Mn),Vn(Ru,"polygonOffset",[0,0]),Xn(Rc,pa),Xn(Ra,ea),Vn(eo,"sampleCoverage",[1,!1]),Xn(Jc,Li),Vn(yc,"stencilMask",-1),Vn(_c,"stencilFunc",[wt,0,-1]),Vn(le,"stencilOpSeparate",[Z,tt,tt,tt]),Vn(w,"stencilOpSeparate",[oe,tt,tt,tt]),Xn(B,Qi),Vn(Q,"scissor",[0,0,At.drawingBufferWidth,At.drawingBufferHeight]),Vn(ee,ee,[0,0,At.drawingBufferWidth,At.drawingBufferHeight]);var ro={gl:At,context:Dn,strings:Er,next:Za,current:Kn,draw:to,elements:Oi,buffer:Ui,shader:yn,attributes:Bn.state,vao:Bn,uniforms:On,framebuffer:cn,extensions:Wr,timer:Rn,isBufferArgs:vi},Ao={primTypes:Ki,compareFuncs:qr,blendFuncs:ui,blendEquations:Ln,stencilOps:Kr,glTypes:bi,orientationType:ii};gn&&(Ao.backBuffer=[oe],Ao.drawBuffer=M(wi.maxDrawbuffers,function(vt){return vt===0?[0]:M(vt,function(Pt){return oi+Pt})}));var Jn=0;function Oa(){var vt=Pn({cache:fn}),Pt=vt.link,Wt=vt.global;vt.id=Jn++,vt.batchId="0";var rr=Pt(ro),dr=vt.shared={props:"a0"};Object.keys(ro).forEach(function(Cr){dr[Cr]=Wt.def(rr,".",Cr)});var pr=vt.next={},kr=vt.current={};Object.keys(Aa).forEach(function(Cr){Array.isArray(Kn[Cr])&&(pr[Cr]=Wt.def(dr.next,".",Cr),kr[Cr]=Wt.def(dr.current,".",Cr))});var Ar=vt.constants={};Object.keys(Ao).forEach(function(Cr){Ar[Cr]=Wt.def(JSON.stringify(Ao[Cr]))}),vt.invoke=function(Cr,cr){switch(cr.type){case Cn:var Gr=["this",dr.context,dr.props,vt.batchId];return Cr.def(Pt(cr.data),".call(",Gr.slice(0,Math.max(cr.data.length+1,4)),")");case sn:return Cr.def(dr.props,cr.data);case Ua:return Cr.def(dr.context,cr.data);case mo:return Cr.def("this",cr.data);case Xo:return cr.data.append(vt,Cr),cr.data.ref;case Ts:return cr.data.toString();case Qo:return cr.data.map(function(ei){return vt.invoke(Cr,ei)})}},vt.attribCache={};var gr={};return vt.scopeAttrib=function(Cr){var cr=Er.id(Cr);if(cr in gr)return gr[cr];var Gr=Bn.scope[cr];Gr||(Gr=Bn.scope[cr]=new ji);var ei=gr[cr]=Pt(Gr);return ei},vt}function _o(vt){var Pt=vt.static,Wt=vt.dynamic,rr;if(se in Pt){var dr=!!Pt[se];rr=dn(function(kr,Ar){return dr}),rr.enable=dr}else if(se in Wt){var pr=Wt[se];rr=En(pr,function(kr,Ar){return kr.invoke(Ar,pr)})}return rr}function Po(vt,Pt){var Wt=vt.static,rr=vt.dynamic;if(qe in Wt){var dr=Wt[qe];return dr?(dr=cn.getFramebuffer(dr),dn(function(kr,Ar){var gr=kr.link(dr),Cr=kr.shared;Ar.set(Cr.framebuffer,".next",gr);var cr=Cr.context;return Ar.set(cr,"."+Oe,gr+".width"),Ar.set(cr,"."+Je,gr+".height"),gr})):dn(function(kr,Ar){var gr=kr.shared;Ar.set(gr.framebuffer,".next","null");var Cr=gr.context;return Ar.set(Cr,"."+Oe,Cr+"."+Rt),Ar.set(Cr,"."+Je,Cr+"."+Ut),"null"})}else if(qe in rr){var pr=rr[qe];return En(pr,function(kr,Ar){var gr=kr.invoke(Ar,pr),Cr=kr.shared,cr=Cr.framebuffer,Gr=Ar.def(cr,".getFramebuffer(",gr,")");Ar.set(cr,".next",Gr);var ei=Cr.context;return Ar.set(ei,"."+Oe,Gr+"?"+Gr+".width:"+ei+"."+Rt),Ar.set(ei,"."+Je,Gr+"?"+Gr+".height:"+ei+"."+Ut),Gr})}else return null}function Jo(vt,Pt,Wt){var rr=vt.static,dr=vt.dynamic;function pr(gr){if(gr in rr){var Cr=rr[gr],cr=!0,Gr=Cr.x|0,ei=Cr.y|0,yi,tn;return"width"in Cr?yi=Cr.width|0:cr=!1,"height"in Cr?tn=Cr.height|0:cr=!1,new Jr(!cr&&Pt&&Pt.thisDep,!cr&&Pt&&Pt.contextDep,!cr&&Pt&&Pt.propDep,function(Qn,qn){var rn=Qn.shared.context,bn=yi;"width"in Cr||(bn=qn.def(rn,".",Oe,"-",Gr));var mn=tn;return"height"in Cr||(mn=qn.def(rn,".",Je,"-",ei)),[Gr,ei,bn,mn]})}else if(gr in dr){var Di=dr[gr],ln=En(Di,function(Qn,qn){var rn=Qn.invoke(qn,Di),bn=Qn.shared.context,mn=qn.def(rn,".x|0"),Gn=qn.def(rn,".y|0"),da=qn.def('"width" in ',rn,"?",rn,".width|0:","(",bn,".",Oe,"-",mn,")"),No=qn.def('"height" in ',rn,"?",rn,".height|0:","(",bn,".",Je,"-",Gn,")");return[mn,Gn,da,No]});return Pt&&(ln.thisDep=ln.thisDep||Pt.thisDep,ln.contextDep=ln.contextDep||Pt.contextDep,ln.propDep=ln.propDep||Pt.propDep),ln}else return Pt?new Jr(Pt.thisDep,Pt.contextDep,Pt.propDep,function(Qn,qn){var rn=Qn.shared.context;return[0,0,qn.def(rn,".",Oe),qn.def(rn,".",Je)]}):null}var kr=pr(ee);if(kr){var Ar=kr;kr=new Jr(kr.thisDep,kr.contextDep,kr.propDep,function(gr,Cr){var cr=Ar.append(gr,Cr),Gr=gr.shared.context;return Cr.set(Gr,"."+He,cr[2]),Cr.set(Gr,"."+et,cr[3]),cr})}return{viewport:kr,scissor_box:pr(Q)}}function Xl(vt,Pt){var Wt=vt.static,rr=typeof Wt[it]=="string"&&typeof Wt[je]=="string";if(rr){if(Object.keys(Pt.dynamic).length>0)return null;var dr=Pt.static,pr=Object.keys(dr);if(pr.length>0&&typeof dr[pr[0]]=="number"){for(var kr=[],Ar=0;Ar"+mn+"?"+cr+".constant["+mn+"]:0;"}).join(""),"}}else{","if(",yi,"(",cr,".buffer)){",Qn,"=",tn,".createStream(",mr,",",cr,".buffer);","}else{",Qn,"=",tn,".getBuffer(",cr,".buffer);","}",qn,'="type" in ',cr,"?",ei.glTypes,"[",cr,".type]:",Qn,".dtype;",Di.normalized,"=!!",cr,".normalized;");function rn(bn){Cr(Di[bn],"=",cr,".",bn,"|0;")}return rn("size"),rn("offset"),rn("stride"),rn("divisor"),Cr("}}"),Cr.exit("if(",Di.isStream,"){",tn,".destroyStream(",Qn,");","}"),Di}dr[pr]=En(kr,Ar)}),dr}function wc(vt){var Pt=vt.static,Wt=vt.dynamic,rr={};return Object.keys(Pt).forEach(function(dr){var pr=Pt[dr];rr[dr]=dn(function(kr,Ar){return typeof pr=="number"||typeof pr=="boolean"?""+pr:kr.link(pr)})}),Object.keys(Wt).forEach(function(dr){var pr=Wt[dr];rr[dr]=En(pr,function(kr,Ar){return kr.invoke(Ar,pr)})}),rr}function yf(vt,Pt,Wt,rr,dr){var pr=vt.static,kr=vt.dynamic,Ar=Xl(vt,Pt),gr=Po(vt,dr),Cr=Jo(vt,gr,dr),cr=xs(vt,dr),Gr=Qc(vt,dr),ei=$c(vt,dr,Ar);function yi(rn){var bn=Cr[rn];bn&&(Gr[rn]=bn)}yi(ee),yi(aa(Q));var tn=Object.keys(Gr).length>0,Di={framebuffer:gr,draw:cr,shader:ei,state:Gr,dirty:tn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Di.profile=_o(vt,dr),Di.uniforms=El(Wt,dr),Di.drawVAO=Di.scopeVAO=cr.vao,!Di.drawVAO&&ei.program&&!Ar&&Wr.angle_instanced_arrays&&cr.static.elements){var ln=!0,Qn=ei.program.attributes.map(function(rn){var bn=Pt.static[rn];return ln=ln&&!!bn,bn});if(ln&&Qn.length>0){var qn=Bn.getVAO(Bn.createVAO({attributes:Qn,elements:cr.static.elements}));Di.drawVAO=new Jr(null,null,null,function(rn,bn){return rn.link(qn)}),Di.useVAO=!0}}return Ar?Di.useVAO=!0:Di.attributes=bc(Pt,dr),Di.context=wc(rr,dr),Di}function Hl(vt,Pt,Wt){var rr=vt.shared,dr=rr.context,pr=vt.scope();Object.keys(Wt).forEach(function(kr){Pt.save(dr,"."+kr);var Ar=Wt[kr],gr=Ar.append(vt,Pt);Array.isArray(gr)?pr(dr,".",kr,"=[",gr.join(),"];"):pr(dr,".",kr,"=",gr,";")}),Pt(pr)}function Fc(vt,Pt,Wt,rr){var dr=vt.shared,pr=dr.gl,kr=dr.framebuffer,Ar;gn&&(Ar=Pt.def(dr.extensions,".webgl_draw_buffers"));var gr=vt.constants,Cr=gr.drawBuffer,cr=gr.backBuffer,Gr;Wt?Gr=Wt.append(vt,Pt):Gr=Pt.def(kr,".next"),rr||Pt("if(",Gr,"!==",kr,".cur){"),Pt("if(",Gr,"){",pr,".bindFramebuffer(",Ir,",",Gr,".framebuffer);"),gn&&Pt(Ar,".drawBuffersWEBGL(",Cr,"[",Gr,".colorAttachments.length]);"),Pt("}else{",pr,".bindFramebuffer(",Ir,",null);"),gn&&Pt(Ar,".drawBuffersWEBGL(",cr,");"),Pt("}",kr,".cur=",Gr,";"),rr||Pt("}")}function ef(vt,Pt,Wt){var rr=vt.shared,dr=rr.gl,pr=vt.current,kr=vt.next,Ar=rr.current,gr=rr.next,Cr=vt.cond(Ar,".dirty");wn.forEach(function(cr){var Gr=aa(cr);if(!(Gr in Wt.state)){var ei,yi;if(Gr in kr){ei=kr[Gr],yi=pr[Gr];var tn=M(Kn[Gr].length,function(ln){return Cr.def(ei,"[",ln,"]")});Cr(vt.cond(tn.map(function(ln,Qn){return ln+"!=="+yi+"["+Qn+"]"}).join("||")).then(dr,".",Aa[Gr],"(",tn,");",tn.map(function(ln,Qn){return yi+"["+Qn+"]="+ln}).join(";"),";"))}else{ei=Cr.def(gr,".",Gr);var Di=vt.cond(ei,"!==",Ar,".",Gr);Cr(Di),Gr in vn?Di(vt.cond(ei).then(dr,".enable(",vn[Gr],");").else(dr,".disable(",vn[Gr],");"),Ar,".",Gr,"=",ei,";"):Di(dr,".",Aa[Gr],"(",ei,");",Ar,".",Gr,"=",ei,";")}}}),Object.keys(Wt.state).length===0&&Cr(Ar,".dirty=false;"),Pt(Cr)}function ls(vt,Pt,Wt,rr){var dr=vt.shared,pr=vt.current,kr=dr.current,Ar=dr.gl,gr;ci(Object.keys(Wt)).forEach(function(Cr){var cr=Wt[Cr];if(!(rr&&!rr(cr))){var Gr=cr.append(vt,Pt);if(vn[Cr]){var ei=vn[Cr];un(cr)?(gr=vt.link(Gr,{stable:!0}),Pt(vt.cond(gr).then(Ar,".enable(",ei,");").else(Ar,".disable(",ei,");")),Pt(kr,".",Cr,"=",gr,";")):(Pt(vt.cond(Gr).then(Ar,".enable(",ei,");").else(Ar,".disable(",ei,");")),Pt(kr,".",Cr,"=",Gr,";"))}else if(an(Gr)){var yi=pr[Cr];Pt(Ar,".",Aa[Cr],"(",Gr,");",Gr.map(function(tn,Di){return yi+"["+Di+"]="+tn}).join(";"),";")}else un(cr)?(gr=vt.link(Gr,{stable:!0}),Pt(Ar,".",Aa[Cr],"(",gr,");",kr,".",Cr,"=",gr,";")):Pt(Ar,".",Aa[Cr],"(",Gr,");",kr,".",Cr,"=",Gr,";")}})}function _f(vt,Pt){Un&&(vt.instancing=Pt.def(vt.shared.extensions,".angle_instanced_arrays"))}function ns(vt,Pt,Wt,rr,dr){var pr=vt.shared,kr=vt.stats,Ar=pr.current,gr=pr.timer,Cr=Wt.profile;function cr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var Gr,ei;function yi(rn){Gr=Pt.def(),rn(Gr,"=",cr(),";"),typeof dr=="string"?rn(kr,".count+=",dr,";"):rn(kr,".count++;"),Rn&&(rr?(ei=Pt.def(),rn(ei,"=",gr,".getNumPendingQueries();")):rn(gr,".beginQuery(",kr,");"))}function tn(rn){rn(kr,".cpuTime+=",cr(),"-",Gr,";"),Rn&&(rr?rn(gr,".pushScopeStats(",ei,",",gr,".getNumPendingQueries(),",kr,");"):rn(gr,".endQuery();"))}function Di(rn){var bn=Pt.def(Ar,".profile");Pt(Ar,".profile=",rn,";"),Pt.exit(Ar,".profile=",bn,";")}var ln;if(Cr){if(un(Cr)){Cr.enable?(yi(Pt),tn(Pt.exit),Di("true")):Di("false");return}ln=Cr.append(vt,Pt),Di(ln)}else ln=Pt.def(Ar,".profile");var Qn=vt.block();yi(Qn),Pt("if(",ln,"){",Qn,"}");var qn=vt.block();tn(qn),Pt.exit("if(",ln,"){",qn,"}")}function Y(vt,Pt,Wt,rr,dr){var pr=vt.shared;function kr(gr){switch(gr){case To:case Rs:case _l:return 2;case Wa:case As:case Vl:return 3;case co:case yo:case Xu:return 4;default:return 1}}function Ar(gr,Cr,cr){var Gr=pr.gl,ei=Pt.def(gr,".location"),yi=Pt.def(pr.attributes,"[",ei,"]"),tn=cr.state,Di=cr.buffer,ln=[cr.x,cr.y,cr.z,cr.w],Qn=["buffer","normalized","offset","stride"];function qn(){Pt("if(!",yi,".buffer){",Gr,".enableVertexAttribArray(",ei,");}");var bn=cr.type,mn;if(cr.size?mn=Pt.def(cr.size,"||",Cr):mn=Cr,Pt("if(",yi,".type!==",bn,"||",yi,".size!==",mn,"||",Qn.map(function(da){return yi+"."+da+"!=="+cr[da]}).join("||"),"){",Gr,".bindBuffer(",mr,",",Di,".buffer);",Gr,".vertexAttribPointer(",[ei,mn,bn,cr.normalized,cr.stride,cr.offset],");",yi,".type=",bn,";",yi,".size=",mn,";",Qn.map(function(da){return yi+"."+da+"="+cr[da]+";"}).join(""),"}"),Un){var Gn=cr.divisor;Pt("if(",yi,".divisor!==",Gn,"){",vt.instancing,".vertexAttribDivisorANGLE(",[ei,Gn],");",yi,".divisor=",Gn,";}")}}function rn(){Pt("if(",yi,".buffer){",Gr,".disableVertexAttribArray(",ei,");",yi,".buffer=null;","}if(",Ma.map(function(bn,mn){return yi+"."+bn+"!=="+ln[mn]}).join("||"),"){",Gr,".vertexAttrib4f(",ei,",",ln,");",Ma.map(function(bn,mn){return yi+"."+bn+"="+ln[mn]+";"}).join(""),"}")}tn===Ea?qn():tn===qa?rn():(Pt("if(",tn,"===",Ea,"){"),qn(),Pt("}else{"),rn(),Pt("}"))}rr.forEach(function(gr){var Cr=gr.name,cr=Wt.attributes[Cr],Gr;if(cr){if(!dr(cr))return;Gr=cr.append(vt,Pt)}else{if(!dr(Nn))return;var ei=vt.scopeAttrib(Cr);Gr={},Object.keys(new ji).forEach(function(yi){Gr[yi]=Pt.def(ei,".",yi)})}Ar(vt.link(gr),kr(gr.info.type),Gr)})}function z(vt,Pt,Wt,rr,dr,pr){for(var kr=vt.shared,Ar=kr.gl,gr,Cr=0;Cr1){for(var Ro=[],ps=[],fo=0;fo>1)",Di],");")}function Gn(){Wt(ln,".drawArraysInstancedANGLE(",[ei,yi,tn,Di],");")}cr&&cr!=="null"?qn?mn():(Wt("if(",cr,"){"),mn(),Wt("}else{"),Gn(),Wt("}")):Gn()}function bn(){function mn(){Wt(pr+".drawElements("+[ei,tn,Qn,yi+"<<(("+Qn+"-"+Ta+")>>1)"]+");")}function Gn(){Wt(pr+".drawArrays("+[ei,yi,tn]+");")}cr&&cr!=="null"?qn?mn():(Wt("if(",cr,"){"),mn(),Wt("}else{"),Gn(),Wt("}")):Gn()}Un&&(typeof Di!="number"||Di>=0)?typeof Di=="string"?(Wt("if(",Di,">0){"),rn(),Wt("}else if(",Di,"<0){"),bn(),Wt("}")):rn():bn()}function O(vt,Pt,Wt,rr,dr){var pr=Oa(),kr=pr.proc("body",dr);return Un&&(pr.instancing=kr.def(pr.shared.extensions,".angle_instanced_arrays")),vt(pr,kr,Wt,rr),pr.compile().body}function $(vt,Pt,Wt,rr){_f(vt,Pt),Wt.useVAO?Wt.drawVAO?Pt(vt.shared.vao,".setVAO(",Wt.drawVAO.append(vt,Pt),");"):Pt(vt.shared.vao,".setVAO(",vt.shared.vao,".targetVAO);"):(Pt(vt.shared.vao,".setVAO(null);"),Y(vt,Pt,Wt,rr.attributes,function(){return!0})),z(vt,Pt,Wt,rr.uniforms,function(){return!0},!1),K(vt,Pt,Pt,Wt)}function pe(vt,Pt){var Wt=vt.proc("draw",1);_f(vt,Wt),Hl(vt,Wt,Pt.context),Fc(vt,Wt,Pt.framebuffer),ef(vt,Wt,Pt),ls(vt,Wt,Pt.state),ns(vt,Wt,Pt,!1,!0);var rr=Pt.shader.progVar.append(vt,Wt);if(Wt(vt.shared.gl,".useProgram(",rr,".program);"),Pt.shader.program)$(vt,Wt,Pt,Pt.shader.program);else{Wt(vt.shared.vao,".setVAO(null);");var dr=vt.global.def("{}"),pr=Wt.def(rr,".id"),kr=Wt.def(dr,"[",pr,"]");Wt(vt.cond(kr).then(kr,".call(this,a0);").else(kr,"=",dr,"[",pr,"]=",vt.link(function(Ar){return O($,vt,Pt,Ar,1)}),"(",rr,");",kr,".call(this,a0);"))}Object.keys(Pt.state).length>0&&Wt(vt.shared.current,".dirty=true;"),vt.shared.vao&&Wt(vt.shared.vao,".setVAO(null);")}function de(vt,Pt,Wt,rr){vt.batchId="a1",_f(vt,Pt);function dr(){return!0}Y(vt,Pt,Wt,rr.attributes,dr),z(vt,Pt,Wt,rr.uniforms,dr,!1),K(vt,Pt,Pt,Wt)}function Ie(vt,Pt,Wt,rr){_f(vt,Pt);var dr=Wt.contextDep,pr=Pt.def(),kr="a0",Ar="a1",gr=Pt.def();vt.shared.props=gr,vt.batchId=pr;var Cr=vt.scope(),cr=vt.scope();Pt(Cr.entry,"for(",pr,"=0;",pr,"<",Ar,";++",pr,"){",gr,"=",kr,"[",pr,"];",cr,"}",Cr.exit);function Gr(Qn){return Qn.contextDep&&dr||Qn.propDep}function ei(Qn){return!Gr(Qn)}if(Wt.needsContext&&Hl(vt,cr,Wt.context),Wt.needsFramebuffer&&Fc(vt,cr,Wt.framebuffer),ls(vt,cr,Wt.state,Gr),Wt.profile&&Gr(Wt.profile)&&ns(vt,cr,Wt,!1,!0),rr)Wt.useVAO?Wt.drawVAO?Gr(Wt.drawVAO)?cr(vt.shared.vao,".setVAO(",Wt.drawVAO.append(vt,cr),");"):Cr(vt.shared.vao,".setVAO(",Wt.drawVAO.append(vt,Cr),");"):Cr(vt.shared.vao,".setVAO(",vt.shared.vao,".targetVAO);"):(Cr(vt.shared.vao,".setVAO(null);"),Y(vt,Cr,Wt,rr.attributes,ei),Y(vt,cr,Wt,rr.attributes,Gr)),z(vt,Cr,Wt,rr.uniforms,ei,!1),z(vt,cr,Wt,rr.uniforms,Gr,!0),K(vt,Cr,cr,Wt);else{var yi=vt.global.def("{}"),tn=Wt.shader.progVar.append(vt,cr),Di=cr.def(tn,".id"),ln=cr.def(yi,"[",Di,"]");cr(vt.shared.gl,".useProgram(",tn,".program);","if(!",ln,"){",ln,"=",yi,"[",Di,"]=",vt.link(function(Qn){return O(de,vt,Wt,Qn,2)}),"(",tn,");}",ln,".call(this,a0[",pr,"],",pr,");")}}function $e(vt,Pt){var Wt=vt.proc("batch",2);vt.batchId="0",_f(vt,Wt);var rr=!1,dr=!0;Object.keys(Pt.context).forEach(function(yi){rr=rr||Pt.context[yi].propDep}),rr||(Hl(vt,Wt,Pt.context),dr=!1);var pr=Pt.framebuffer,kr=!1;pr?(pr.propDep?rr=kr=!0:pr.contextDep&&rr&&(kr=!0),kr||Fc(vt,Wt,pr)):Fc(vt,Wt,null),Pt.state.viewport&&Pt.state.viewport.propDep&&(rr=!0);function Ar(yi){return yi.contextDep&&rr||yi.propDep}ef(vt,Wt,Pt),ls(vt,Wt,Pt.state,function(yi){return!Ar(yi)}),(!Pt.profile||!Ar(Pt.profile))&&ns(vt,Wt,Pt,!1,"a1"),Pt.contextDep=rr,Pt.needsContext=dr,Pt.needsFramebuffer=kr;var gr=Pt.shader.progVar;if(gr.contextDep&&rr||gr.propDep)Ie(vt,Wt,Pt,null);else{var Cr=gr.append(vt,Wt);if(Wt(vt.shared.gl,".useProgram(",Cr,".program);"),Pt.shader.program)Ie(vt,Wt,Pt,Pt.shader.program);else{Wt(vt.shared.vao,".setVAO(null);");var cr=vt.global.def("{}"),Gr=Wt.def(Cr,".id"),ei=Wt.def(cr,"[",Gr,"]");Wt(vt.cond(ei).then(ei,".call(this,a0,a1);").else(ei,"=",cr,"[",Gr,"]=",vt.link(function(yi){return O(Ie,vt,Pt,yi,2)}),"(",Cr,");",ei,".call(this,a0,a1);"))}}Object.keys(Pt.state).length>0&&Wt(vt.shared.current,".dirty=true;"),vt.shared.vao&&Wt(vt.shared.vao,".setVAO(null);")}function pt(vt,Pt){var Wt=vt.proc("scope",3);vt.batchId="a2";var rr=vt.shared,dr=rr.current;if(Hl(vt,Wt,Pt.context),Pt.framebuffer&&Pt.framebuffer.append(vt,Wt),ci(Object.keys(Pt.state)).forEach(function(Ar){var gr=Pt.state[Ar],Cr=gr.append(vt,Wt);an(Cr)?Cr.forEach(function(cr,Gr){ma(cr)?Wt.set(vt.next[Ar],"["+Gr+"]",cr):Wt.set(vt.next[Ar],"["+Gr+"]",vt.link(cr,{stable:!0}))}):un(gr)?Wt.set(rr.next,"."+Ar,vt.link(Cr,{stable:!0})):Wt.set(rr.next,"."+Ar,Cr)}),ns(vt,Wt,Pt,!0,!0),[yt,hr,Nt,Sr,Ot].forEach(function(Ar){var gr=Pt.draw[Ar];if(gr){var Cr=gr.append(vt,Wt);ma(Cr)?Wt.set(rr.draw,"."+Ar,Cr):Wt.set(rr.draw,"."+Ar,vt.link(Cr),{stable:!0})}}),Object.keys(Pt.uniforms).forEach(function(Ar){var gr=Pt.uniforms[Ar].append(vt,Wt);Array.isArray(gr)&&(gr="["+gr.map(function(Cr){return ma(Cr)?Cr:vt.link(Cr,{stable:!0})})+"]"),Wt.set(rr.uniforms,"["+vt.link(Er.id(Ar),{stable:!0})+"]",gr)}),Object.keys(Pt.attributes).forEach(function(Ar){var gr=Pt.attributes[Ar].append(vt,Wt),Cr=vt.scopeAttrib(Ar);Object.keys(new ji).forEach(function(cr){Wt.set(Cr,"."+cr,gr[cr])})}),Pt.scopeVAO){var pr=Pt.scopeVAO.append(vt,Wt);ma(pr)?Wt.set(rr.vao,".targetVAO",pr):Wt.set(rr.vao,".targetVAO",vt.link(pr,{stable:!0}))}function kr(Ar){var gr=Pt.shader[Ar];if(gr){var Cr=gr.append(vt,Wt);ma(Cr)?Wt.set(rr.shader,"."+Ar,Cr):Wt.set(rr.shader,"."+Ar,vt.link(Cr,{stable:!0}))}}kr(je),kr(it),Object.keys(Pt.state).length>0&&(Wt(dr,".dirty=true;"),Wt.exit(dr,".dirty=true;")),Wt("a1(",vt.shared.context,",a0,",vt.batchId,");")}function Kt(vt){if(!(typeof vt!="object"||an(vt))){for(var Pt=Object.keys(vt),Wt=0;Wt=0;--O){var $=ro[O];$&&$(fn,null,0)}Wr.flush(),yn&&yn.update()}function Jo(){!_o&&ro.length>0&&(_o=d.next(Po))}function Xl(){_o&&(d.cancel(Po),_o=null)}function $c(O){O.preventDefault(),Ui=!0,Xl(),Ao.forEach(function($){$()})}function xs(O){Wr.getError(),Ui=!1,Oi.restore(),Za.restore(),Un.restore(),wn.restore(),vn.restore(),Aa.restore(),ca.restore(),yn&&yn.restore(),aa.procs.refresh(),Jo(),Jn.forEach(function($){$()})}ma&&(ma.addEventListener(Lo,$c,!1),ma.addEventListener(Fo,xs,!1));function Qc(){ro.length=0,Xl(),ma&&(ma.removeEventListener(Lo,$c),ma.removeEventListener(Fo,xs)),Za.clear(),Aa.clear(),vn.clear(),ca.clear(),wn.clear(),gn.clear(),Un.clear(),yn&&yn.clear(),Oa.forEach(function(O){O()})}function El(O){function $(pr){var kr=e({},pr);delete kr.uniforms,delete kr.attributes,delete kr.context,delete kr.vao,"stencil"in kr&&kr.stencil.op&&(kr.stencil.opBack=kr.stencil.opFront=kr.stencil.op,delete kr.stencil.op);function Ar(gr){if(gr in kr){var Cr=kr[gr];delete kr[gr],Object.keys(Cr).forEach(function(cr){kr[gr+"."+cr]=Cr[cr]})}}return Ar("blend"),Ar("depth"),Ar("cull"),Ar("stencil"),Ar("polygonOffset"),Ar("scissor"),Ar("sample"),"vao"in pr&&(kr.vao=pr.vao),kr}function pe(pr,kr){var Ar={},gr={};return Object.keys(pr).forEach(function(Cr){var cr=pr[Cr];if(h.isDynamic(cr)){gr[Cr]=h.unbox(cr,Cr);return}else if(kr&&Array.isArray(cr)){for(var Gr=0;Gr0)return vt.call(this,rr(pr|0),pr|0)}else if(Array.isArray(pr)){if(pr.length)return vt.call(this,pr,pr.length)}else return Jt.call(this,pr)}return e(dr,{stats:Kt,destroy:function(){ir.destroy()}})}var bc=Aa.setFBO=El({framebuffer:h.define.call(null,js,"framebuffer")});function wc(O,$){var pe=0;aa.procs.poll();var de=$.color;de&&(Wr.clearColor(+de[0]||0,+de[1]||0,+de[2]||0,+de[3]||0),pe|=_s),"depth"in $&&(Wr.clearDepth(+$.depth),pe|=Ns),"stencil"in $&&(Wr.clearStencil($.stencil|0),pe|=pn),Wr.clear(pe)}function yf(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var $=0;$<6;++$)bc(e({framebuffer:O.framebuffer.faces[$]},O),wc);else bc(O,wc);else wc(null,O)}function Hl(O){ro.push(O);function $(){var pe=dl(ro,O);function de(){var Ie=dl(ro,de);ro[Ie]=ro[ro.length-1],ro.length-=1,ro.length<=0&&Xl()}ro[pe]=de}return Jo(),{cancel:$}}function Fc(){var O=Vn.viewport,$=Vn.scissor_box;O[0]=O[1]=$[0]=$[1]=0,fn.viewportWidth=fn.framebufferWidth=fn.drawingBufferWidth=O[2]=$[2]=Wr.drawingBufferWidth,fn.viewportHeight=fn.framebufferHeight=fn.drawingBufferHeight=O[3]=$[3]=Wr.drawingBufferHeight}function ef(){fn.tick+=1,fn.time=_f(),Fc(),aa.procs.poll()}function ls(){wn.refresh(),Fc(),aa.procs.refresh(),yn&&yn.update()}function _f(){return(v()-to)/1e3}ls();function ns(O,$){var pe;switch(O){case"frame":return Hl($);case"lost":pe=Ao;break;case"restore":pe=Jn;break;case"destroy":pe=Oa;break;default:}return pe.push($),{cancel:function(){for(var de=0;de=0},read:Xn,destroy:Qc,_gl:Wr,_refresh:ls,poll:function(){ef(),yn&&yn.update()},now:_f,stats:cn,getCachedCode:Y,preloadCachedCode:z});return Er.onDone(null,K),K}return xc})});var Iqe=ye((pmr,Pqe)=>{"use strict";var jOt=Zm();Pqe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},Cqe(t)?t={container:t}:WOt(t)?t={container:t}:ZOt(t)?t={gl:t}:t=jOt(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}Cqe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=Lqe(),t.container.appendChild(t.canvas),kqe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=Lqe(),t.container.appendChild(t.canvas),kqe(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 kqe(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 Cqe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function WOt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function ZOt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function Lqe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var Rqe=ye((gmr,Dqe)=>{"use strict";var XOt=UY(),YOt=[32,126];Dqe.exports=KOt;function KOt(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||YOt;if(n&&typeof n!="string"&&(n=XOt(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 WY=ye(Th=>{"use strict";"use restrict";var jY=32;Th.INT_BITS=jY;Th.INT_MAX=2147483647;Th.INT_MIN=-1<0)-(e<0)};Th.abs=function(e){var t=e>>jY-1;return(e^t)-t};Th.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};Th.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};Th.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function zqe(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}Th.countTrailingZeros=zqe;Th.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};Th.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Th.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var yk=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|yk[e>>>16&255]<<8|yk[e>>>24&255]};Th.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};Th.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};Th.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};Th.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};Th.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>zqe(e)+1}});var Oqe=ye((ymr,qqe)=>{"use strict";function Fqe(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 JOt(e|0,t);break;case"object":if(typeof e.length=="number")return Fqe(e,t,0);break}return[]}qqe.exports=$Ot});var Qqe=ye(jl=>{"use strict";var cx=WY(),Av=Oqe(),Bqe=u2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Av([32,0]),UINT16:Av([32,0]),UINT32:Av([32,0]),BIGUINT64:Av([32,0]),INT8:Av([32,0]),INT16:Av([32,0]),INT32:Av([32,0]),BIGINT64:Av([32,0]),FLOAT:Av([32,0]),DOUBLE:Av([32,0]),DATA:Av([32,0]),UINT8C:Av([32,0]),BUFFER:Av([32,0])});var QOt=typeof Uint8ClampedArray!="undefined",eBt=typeof BigUint64Array!="undefined",tBt=typeof BigInt64Array!="undefined",Xh=window.__TYPEDARRAY_POOL;Xh.UINT8C||(Xh.UINT8C=Av([32,0]));Xh.BIGUINT64||(Xh.BIGUINT64=Av([32,0]));Xh.BIGINT64||(Xh.BIGINT64=Av([32,0]));Xh.BUFFER||(Xh.BUFFER=Av([32,0]));var dF=Xh.DATA,vF=Xh.BUFFER;jl.free=function(t){if(Bqe.isBuffer(t))vF[cx.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=cx.log2(r)|0;dF[n].push(t)}};function Nqe(e){if(e){var t=e.length||e.byteLength,r=cx.log2(t);dF[r].push(e)}}function rBt(e){Nqe(e.buffer)}jl.freeUint8=jl.freeUint16=jl.freeUint32=jl.freeBigUint64=jl.freeInt8=jl.freeInt16=jl.freeInt32=jl.freeBigInt64=jl.freeFloat32=jl.freeFloat=jl.freeFloat64=jl.freeDouble=jl.freeUint8Clamped=jl.freeDataView=rBt;jl.freeArrayBuffer=Nqe;jl.freeBuffer=function(t){vF[cx.log2(t.length)].push(t)};jl.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return ZY(t);case"uint16":return Uqe(t);case"uint32":return Vqe(t);case"int8":return Hqe(t);case"int16":return Gqe(t);case"int32":return jqe(t);case"float":case"float32":return Wqe(t);case"double":case"float64":return Zqe(t);case"uint8_clamped":return Xqe(t);case"bigint64":return Kqe(t);case"biguint64":return Yqe(t);case"buffer":return $qe(t);case"data":case"dataview":return Jqe(t);default:return null}return null};function Bp(t){var t=cx.nextPow2(t),r=cx.log2(t),n=dF[r];return n.length>0?n.pop():new ArrayBuffer(t)}jl.mallocArrayBuffer=Bp;function ZY(e){return new Uint8Array(Bp(e),0,e)}jl.mallocUint8=ZY;function Uqe(e){return new Uint16Array(Bp(2*e),0,e)}jl.mallocUint16=Uqe;function Vqe(e){return new Uint32Array(Bp(4*e),0,e)}jl.mallocUint32=Vqe;function Hqe(e){return new Int8Array(Bp(e),0,e)}jl.mallocInt8=Hqe;function Gqe(e){return new Int16Array(Bp(2*e),0,e)}jl.mallocInt16=Gqe;function jqe(e){return new Int32Array(Bp(4*e),0,e)}jl.mallocInt32=jqe;function Wqe(e){return new Float32Array(Bp(4*e),0,e)}jl.mallocFloat32=jl.mallocFloat=Wqe;function Zqe(e){return new Float64Array(Bp(8*e),0,e)}jl.mallocFloat64=jl.mallocDouble=Zqe;function Xqe(e){return QOt?new Uint8ClampedArray(Bp(e),0,e):ZY(e)}jl.mallocUint8Clamped=Xqe;function Yqe(e){return eBt?new BigUint64Array(Bp(8*e),0,e):null}jl.mallocBigUint64=Yqe;function Kqe(e){return tBt?new BigInt64Array(Bp(8*e),0,e):null}jl.mallocBigInt64=Kqe;function Jqe(e){return new DataView(Bp(e),0,e)}jl.mallocDataView=Jqe;function $qe(e){e=cx.nextPow2(e);var t=cx.log2(e),r=vF[t];return r.length>0?r.pop():new Bqe(e)}jl.mallocBuffer=$qe;jl.clearCache=function(){for(var t=0;t<32;++t)Xh.UINT8[t].length=0,Xh.UINT16[t].length=0,Xh.UINT32[t].length=0,Xh.INT8[t].length=0,Xh.INT16[t].length=0,Xh.INT32[t].length=0,Xh.FLOAT[t].length=0,Xh.DOUBLE[t].length=0,Xh.BIGUINT64[t].length=0,Xh.BIGINT64[t].length=0,Xh.UINT8C[t].length=0,dF[t].length=0,vF[t].length=0}});var tOe=ye((xmr,eOe)=>{"use strict";var iBt=Object.prototype.toString;eOe.exports=function(e){var t;return iBt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var XY=ye((bmr,rOe)=>{rOe.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 aOe=ye((wmr,nOe)=>{"use strict";var nBt=XY();nOe.exports=iOe;var _k=96;function YY(e,t){var r=nBt(getComputedStyle(e).getPropertyValue(t));return r[0]*iOe(r[1],e)}function aBt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=YY(r,"font-size")/128;return t.removeChild(r),n}function iOe(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 aBt(e,t);case"em":return YY(t,"font-size");case"rem":return YY(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 _k;case"cm":return _k/2.54;case"mm":return _k/25.4;case"pt":return _k/72;case"pc":return _k/6}return 1}});var lOe=ye((Tmr,sOe)=>{"use strict";sOe.exports=mF;var oBt=mF.canvas=document.createElement("canvas"),pF=oBt.getContext("2d"),oOe=gF([32,126]);mF.createPairs=gF;mF.ascii=oOe;function mF(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=gF(t):Array.isArray(t)?n=t:(t.o?n=gF(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=oOe),pF.font=i+"px "+e;for(var o=0;oi*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function gF(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";fOe.exports=fx;fx.canvas=document.createElement("canvas");fx.cache={};function fx(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(fx.cache[r]&&n<=fx.cache[r].em)return uOe(fx.cache[r],s);var l=t.canvas||fx.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=Ym(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var x=Ym(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-x+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=Ym(u.getImageData(0,0,f,f)),g=f-b-1+v;d.baseline=d.alphabetic=g,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var E=Ym(u.getImageData(0,0,f,f));d.median=d.middle=f-E-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var k=Ym(u.getImageData(0,0,f,f));d.hanging=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var A=Ym(u.getImageData(0,0,f,f));if(d.ideographic=f-A-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=Ym(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=Ym(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=Ym(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=Ym(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=cOe(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=cOe(u.getImageData(0,0,f,f));d.overshoot=L-g}for(var _ in d)d[_]/=n;return d.em=n,fx.cache[r]=d,uOe(d,s)}function uOe(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 Ym(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 gOe=ye((Smr,pOe)=>{"use strict";var hA=Eqe(),sBt=Zm(),lBt=GY(),uBt=Iqe(),cBt=EY(),KY=J_(),fBt=Rqe(),hx=Qqe(),hBt=eA(),dBt=tOe(),vBt=XY(),pBt=aOe(),gBt=lOe(),mBt=bh(),yBt=hOe(),_Bt=W2(),xBt=WY(),dOe=xBt.nextPow2,vOe=new cBt,_F=!1;document.body&&(yF=document.body.appendChild(document.createElement("div")),yF.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(yF).fontStretch&&(_F=!0),document.body.removeChild(yF));var yF,Hu=function(t){bBt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=uBt(t),this.shader=vOe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||lBt({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(),vOe.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(dBt(t)?t:{})};Hu.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; @@ -2705,14 +2705,14 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),n={};return{regl:t,draw:r,atlas:n}};Hu.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=sBt(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(ke){return parseFloat(ke)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=hBt(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=_Bt(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=Hu.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(ke,ge){if(typeof ke=="string")try{ke=hA.parse(ke)}catch(Ge){ke=hA.parse(Hu.baseFontSize+"px "+ke)}else{var ie=ke.style,Te=ke.weight,Ee=ke.stretch,Ae=ke.variant;ke=hA.parse(hA.stringify(ke)),ie&&(ke.style=ie),Te&&(ke.weight=Te),Ee&&(ke.stretch=Ee),Ae&&(ke.variant=Ae)}var ze=hA.stringify({size:Hu.baseFontSize,family:ke.family,stretch:_F?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style}),Ce=vBt(ke.size),me=Math.round(Ce[0]*pBt(Ce[1]));if(me!==r.fontSize[ge]&&(i=!0,r.fontSize[ge]=me),(!r.font[ge]||ze!=r.font[ge].baseString)&&(n=!0,r.font[ge]=Hu.fonts[ze],!r.font[ge])){var De=ke.family.join(", "),ce=[ke.style];ke.style!=ke.variant&&ce.push(ke.variant),ke.variant!=ke.weight&&ce.push(ke.weight),_F&&ke.weight!=ke.stretch&&ce.push(ke.stretch),r.font[ge]={baseString:ze,family:De,weight:ke.weight,stretch:ke.stretch,style:ke.style,variant:ke.variant,width:{},kerning:{},metrics:yBt(De,{origin:"top",fontSize:Hu.baseFontSize,fontStyle:ce.join(" ")})},Hu.fonts[ze]=r.font[ge]}}),(n||i)&&this.font.forEach(function(ke,ge){var ie=hA.stringify({size:r.fontSize[ge],family:ke.family,stretch:_F?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style});if(r.fontAtlas[ge]=r.shader.atlas[ie],!r.fontAtlas[ge]){var Te=ke.metrics;r.shader.atlas[ie]=r.fontAtlas[ge]={fontString:ie,step:Math.ceil(r.fontSize[ge]*Te.bottom*.5)*2,em:r.fontSize[ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=hx.mallocFloat(this.count*2),f=0,h=0;f1?r.align[ge]:r.align[0]:r.align;if(typeof ie=="number")return ie;switch(ie){case"right":case"end":return-ke;case"center":case"centre":case"middle":return-ke*.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(ke,ge){var ie=(r.font[ge]||r.font[0]).metrics,Te=0;return Te+=ie.bottom*.5,typeof ke=="number"?Te+=ke-ie.baseline:Te+=-ie[ke],Te*=-1,Te})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=KY(t.color,"uint8");else{var H;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var X=t.color.length;H=hx.mallocUint8(X);for(var G=(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(ae){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 Me=0;Me1?this.counts[Me]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Me]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Me*4,Me*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Me]:this.opacity,baseline:this.baselineOffset[Me]!=null?this.baselineOffset[Me]:this.baselineOffset[0],align:this.align?this.alignOffset[Me]!=null?this.alignOffset[Me]:this.alignOffset[0]:0,atlas:this.fontAtlas[Me]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Me*2,Me*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=[]}};Hu.prototype.destroy=function(){};Hu.prototype.kerning=!0;Hu.prototype.position={constant:new Float32Array(2)};Hu.prototype.translate=null;Hu.prototype.scale=null;Hu.prototype.font=null;Hu.prototype.text="";Hu.prototype.positionOffset=[0,0];Hu.prototype.opacity=1;Hu.prototype.color=new Uint8Array([0,0,0,255]);Hu.prototype.alignOffset=[0,0];Hu.maxAtlasSize=1024;Hu.atlasCanvas=document.createElement("canvas");Hu.atlasContext=Hu.atlasCanvas.getContext("2d",{alpha:!1});Hu.baseFontSize=64;Hu.fonts={};function bBt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}pOe.exports=Hu});var xF=ye((Mmr,mOe)=>{"use strict";var wBt=pZ(),TBt=GY();mOe.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=TBt({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||wBt({container:i._glcontainer.node()}),a}});var QY=ye(($Y,wOe)=>{"use strict";var yOe=QX(),_Oe=LY(),ABt=lqe(),xOe=gOe(),JY=Mr(),SBt=Sg().selectMode,MBt=xF(),EBt=lu(),kBt=hU(),CBt=YX().styleTextSelection,bOe={};function LBt(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 $Y=wOe.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=MBt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],bOe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(kBt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({}),a.error2d===!0&&(a.error2d=ABt(h)),a.line2d===!0&&(a.line2d=_Oe(h)),a.scatter2d===!0&&(a.scatter2d=yOe(h)),a.fill2d===!0&&(a.fill2d=_Oe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;lae&&(isNaN(re[_e])||isNaN(re[_e+1]));)_e-=2;W.positions=re.slice(ae,_e+2)}return W}),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=JY.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(W,re){var ae=n[re];if(!(!W||!ae||!ae[0]||!ae[0].trace)){var _e=ae[0],Me=_e.trace,ke=_e.t,ge=a.lineOptions[re],ie,Te,Ee=[];Me._ownfill&&Ee.push(re),Me._nexttrace&&Ee.push(re+1),Ee.length&&(a.fillOrder[re]=Ee);var Ae=[],ze=ge&&ge.positions||ke.positions,Ce,me;if(Me.fill==="tozeroy"){for(Ce=0;CeCe&&isNaN(ze[me+1]);)me-=2;ze[Ce+1]!==0&&(Ae=[ze[Ce],0]),Ae=Ae.concat(ze.slice(Ce,me+2)),ze[me+1]!==0&&(Ae=Ae.concat([ze[me],0]))}else if(Me.fill==="tozerox"){for(Ce=0;CeCe&&isNaN(ze[me]);)me-=2;ze[Ce]!==0&&(Ae=[0,ze[Ce+1]]),Ae=Ae.concat(ze.slice(Ce,me+2)),ze[me]!==0&&(Ae=Ae.concat([0,ze[me+1]]))}else if(Me.fill==="toself"||Me.fill==="tonext"){for(Ae=[],ie=0,W.splitNull=!0,Te=0;Te-1;for(l=0;l{"use strict";var TOe=Hze();TOe.plot=QY();AOe.exports=TOe});var EOe=ye((kmr,MOe)=>{"use strict";MOe.exports=SOe()});var eK=ye((Cmr,POe)=>{"use strict";var PBt=Uc(),LOe=Kl(),kOe=Oc().axisHoverFormat,IBt=Wo().hovertemplateAttrs,xk=ek(),DBt=ad().idRegex,RBt=Vs().templatedArray,dA=no().extendFlat,o1=PBt.marker,zBt=o1.line,FBt=dA(LOe("marker.line",{editTypeOverride:"calc"}),{width:dA({},zBt.width,{editType:"calc"}),editType:"calc"}),bF=dA(LOe("marker"),{symbol:o1.symbol,angle:o1.angle,size:dA({},o1.size,{editType:"markerSize"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:FBt,editType:"calc"});bF.color.editType=bF.cmin.editType=bF.cmax.editType="style";function COe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:DBt[e],editType:"plot"}}}POe.exports={dimensions:RBt("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:dA({},xk.text,{}),hovertext:dA({},xk.hovertext,{}),hovertemplate:IBt(),xhoverformat:kOe("x"),yhoverformat:kOe("y"),marker:bF,xaxes:COe("x"),yaxes:COe("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:xk.selected.marker,editType:"calc"},unselected:{marker:xk.unselected.marker,editType:"calc"},opacity:xk.opacity}});var wF=ye((Lmr,IOe)=>{"use strict";IOe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var tK=Mr(),qBt=Zd(),DOe=eK(),OBt=lu(),BBt=$p(),NBt=wF(),UBt=Fz().isOpenSymbol;ROe.exports=function(t,r,n,i){function a(d,v){return tK.coerce(t,r,DOe,d,v)}var o=qBt(t,r,{name:"dimensions",handleItemDefaults:VBt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=NBt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),BBt(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var f=UBt(r.marker.symbol),h=OBt.isBubble(r);a("marker.line.width",f||h?1:0),HBt(t,r,i,a),tK.coerceSelectionMarkerOpacity(r,a)};function VBt(e,t){function r(i,a){return tK.coerce(e,t,DOe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function HBt(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 FOe=Mr();qOe.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]=FOe.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||FOe.extendFlat(l,o),l}});var UOe=ye((Dmr,NOe)=>{"use strict";var rK=Mr(),TF=af(),GBt=q0().calcMarkerSize,jBt=q0().calcAxisExpansion,WBt=z0(),BOe=Y2().markerSelection,ZBt=Y2().markerStyle,XBt=OOe(),YBt=es().BADNUM,KBt=ox().TOO_MANY_POINTS;NOe.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(k,S){for(var L=k.makeCalcdata({v:S.values,vcalendar:r.calendar},"v"),_=0;_KBt,g;for(b?g=a.sizeAvg||Math.max(a.size,3):g=GBt(r,i),c=0;c{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?bk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(bk.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?(bk.exports=function(){return Date.now()-r},r=Date.now()):(bk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(VOe)});var jOe=ye((Rmr,MF)=>{var JBt=HOe(),s1=window,AF=["moz","webkit"],pA="AnimationFrame",gA=s1["request"+pA],wk=s1["cancel"+pA]||s1["cancelRequest"+pA];for(vA=0;!gA&&vA{WOe.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 $Bt=QX(),QBt=Zm(),eNt=j2(),XOe=jOe(),tNt=ZOe(),nK=eA(),rNt=W2();KOe.exports=vx;function vx(e,t){if(!(this instanceof vx))return new vx(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=$Bt(e),this.canvas=this.scatter.canvas}vx.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=XOe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,XOe(()=>{this.dirty=!1})),this)};vx.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&x{t[a+s]=n})}this.scatter.draw(...t)}return this};vx.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 iNt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function EF(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 YOe(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=nK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var QOe=ye((qmr,$Oe)=>{"use strict";var nNt=JOe(),aK=Mr(),kF=af(),aNt=Sg().selectMode;$Oe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,T=aNt(c)||!!i.selectedpoints||P,F=!0;if(T){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var V=i.selectedpoints,H={};for(d=0;d{"use strict";eBe.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 tBe=oK(),sNt=zz().calcHover,rBe=Qa().getFromId,lNt=no().extendFlat;function uNt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=iBe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=lNt({},e),f=0;f{"use strict";var uBe=Mr(),oBe=uBe.pushUnique,sBe=lu(),lBe=oK();cBe.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=!sBe.hasMarkers(i)&&!sBe.hasText(i);if(i.visible!==!0||f)return c;var h=lBe.getDimIndex(i,l),d=lBe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],x=a.ypx[d],b=s[h],g=s[d],E=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var S=0;S{"use strict";var hBe=Mr(),cNt=z0(),fNt=Y2().markerStyle;dBe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){cNt(t,n),hBe.extendFlat(i.matrixOptions,fNt(t,n));var a=hBe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var gBe=ye((Vmr,pBe)=>{"use strict";var hNt=ba(),dNt=nV();pBe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:eK(),supplyDefaults:zOe(),colorbar:Kd(),calc:UOe(),plot:QOe(),hoverPoints:aBe().hoverPoints,selectPoints:fBe(),editStyle:vBe(),meta:{}};hNt.register(dNt)});var wBe=ye((Hmr,bBe)=>{"use strict";var vNt=LY(),pNt=ba(),gNt=xF(),mNt=kd().getModuleCalcData,px=Jf(),mBe=af().getFromId,yBe=Qa().shouldShowZeroLine,_Be="splom",xBe={};function yNt(e){var t=e._fullLayout,r=pNt.getModule(_Be),n=mNt(e.calcdata,r)[0],i=gNt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],xBe);i&&(t._hasOnlyLargeSploms&&sK(e),r.plot(e,{},n))}function _Nt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&sK(e);for(var n=0;n{"use strict";var TBe=gBe();TBe.basePlotModule=wBe(),ABe.exports=TBe});var EBe=ye((jmr,MBe)=>{"use strict";MBe.exports=SBe()});var cK=ye((Wmr,kBe)=>{"use strict";var TNt=Kl(),lK=Cd(),uK=Su(),ANt=Ju().attributes,CF=no().extendFlat,SNt=Vs().templatedArray;kBe.exports={domain:ANt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:uK({editType:"plot"}),tickfont:uK({autoShadowDflt:!0,editType:"plot"}),rangefont:uK({editType:"plot"}),dimensions:SNt("dimension",{label:{valType:"string",editType:"plot"},tickvals:CF({},lK.tickvals,{editType:"plot"}),ticktext:CF({},lK.ticktext,{editType:"plot"}),tickformat:CF({},lK.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:CF({editType:"calc"},TNt("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 Tk=ye((Zmr,CBe)=>{"use strict";CBe.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 Km=ye((Xmr,PBe)=>{"use strict";var MNt=OS();function LBe(e){return[e]}PBe.exports={keyFun:function(e){return e.key},repeat:LBe,descend:MNt,wrap:LBe,unwrap:function(e){return e[0]}}});var dK=ye((Ymr,VBe)=>{"use strict";var th=Tk(),em=xa(),ENt=Km().keyFun,LF=Km().repeat,mA=Mr().sorterAsc,kNt=Mr().strTranslate,IBe=th.bar.snapRatio;function DBe(e,t){return e*(1-IBe)+t*IBe}var RBe=th.bar.snapClose;function CNt(e,t){return e*(1-RBe)+t*RBe}function IF(e,t,r,n){if(LNt(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 PNt(e){e.attr("x",-th.bar.captureWidth/2).attr("width",th.bar.captureWidth)}function INt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function DNt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=zBe(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 FBe(){em.select(document.body).style("cursor",null)}function hK(e){e.attr("stroke-dasharray",DNt)}function PF(e,t){var r=em.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(th.bar.snapDuration).each("end",t):r;hK(n)}function qBe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=zBe(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]=E[0]&&g<=E[1]){a.clickableOrdinalRange=E;break}}}return a}function zNt(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=qBe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function OBe(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(mA),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),PF(e.parentNode)}function FNt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(BBe(e,t),OBe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=em.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,FBe(),!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&&fK(r)):fK(r),i.brushCallback(t),PF(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||fK(r),i.brushCallback(t),u?PF(e.parentNode,s):(s(),PF(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function BBe(e,t){var r=t.height-em.mouse(e)[1]-2*th.verticalPadding,n=qBe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),em.select(document.body).style("cursor",i)}function qNt(e){e.on("mousemove",function(t){em.event.preventDefault(),t.parent.inBrushDrag||BBe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||FBe()}).call(em.behavior.drag().on("dragstart",function(t){zNt(this,t)}).on("drag",function(t){OBe(this,t)}).on("dragend",function(t){FNt(this,t)}))}function NBe(e,t){return e[0]-t[0]}function ONt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(LF);i.enter().append("rect").classed("background",!0).call(PNt).call(INt).style("pointer-events",n?"none":"auto").attr("transform",kNt(0,th.verticalPadding)),i.call(qNt).attr("height",function(s){return s.height-th.verticalPadding});var a=e.selectAll(".highlight-shadow").data(LF);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-th.bar.width/2).attr("stroke-width",th.bar.width+th.bar.strokeWidth).attr("stroke",t).attr("opacity",th.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(hK);var o=e.selectAll(".highlight").data(LF);o.enter().append("line").classed("highlight",!0).attr("x",-th.bar.width/2).attr("stroke-width",th.bar.width-th.bar.strokeWidth).attr("stroke",th.bar.fillColor).attr("opacity",th.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(hK)}function BNt(e,t,r){var n=e.selectAll("."+th.cn.axisBrush).data(LF,ENt);n.enter().append("g").classed(th.cn.axisBrush,!0),ONt(n,t,r)}function NNt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function fK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function UNt(e){return function(r){var n=r.brush,i=NNt(n),a=i.slice();n.filter.set(a),e()}}function UBe(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 VNt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(mA)}).sort(NBe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=UBe(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 HNt(e,t,r,n,i,a){var o=VNt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:UNt(i),brushEndCallback:a}}}function GNt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(mA)}),t.multiselect?e=UBe(e.sort(NBe)):e=[e[0]]):e=[e.sort(mA)],t.tickvals){var r=t.tickvals.slice().sort(mA);if(e=e.map(function(n){var i=[IF(0,r,n[0],[]),IF(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]}VBe.exports={makeBrush:HNt,ensureAxisBrush:BNt,cleanRanges:GNt}});var jBe=ye((Kmr,GBe)=>{"use strict";var gx=Mr(),jNt=Rv().hasColorscale,WNt=Uh(),ZNt=Ju().defaults,XNt=Zd(),YNt=Qa(),HBe=cK(),KNt=dK(),vK=Tk().maxDimensionCount,JNt=wF();function $Nt(e,t,r,n,i){var a=i("line.color",r);if(jNt(e,"line")&&gx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),WNt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function QNt(e,t,r,n){function i(u,c){return gx.coerce(e,t,HBe.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},YNt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=KNt.cleanRanges(l,t))}}GBe.exports=function(t,r,n,i){function a(c,f){return gx.coerce(t,r,HBe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>vK&&(gx.log("parcoords traces support up to "+vK+" dimensions at the moment"),o.splice(vK));var s=XNt(t,r,{name:"dimensions",layout:i,handleItemDefaults:QNt}),l=$Nt(t,r,n,i,a);ZNt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),JNt(r,s,"values",l);var u=gx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});gx.coerceFont(a,"labelfont",u),gx.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),gx.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var ZBe=ye((Jmr,WBe)=>{"use strict";var eUt=Mr().isArrayOrTypedArray,pK=Mu(),tUt=Km().wrap;WBe.exports=function(t,r){var n,i;return pK.hasColorscale(r,"line")&&eUt(r.line.color)?(n=r.line.color,i=pK.extractOpts(r.line).colorscale,pK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=rUt(r._length),i=[[0,r.line.color],[1,r.line.color]]),tUt({lineColor:n,cscale:i})};function rUt(e){for(var t=new Array(e),r=0;r{"use strict";var iUt=Mr().isTypedArray;DF.convertTypedArray=function(e){return iUt(e)?Array.prototype.slice.call(e):e};DF.isOrdinal=function(e){return!!e.tickvals};DF.isVisible=function(e){return e.visible||!("visible"in e)}});var iNe=ye((Qmr,rNe)=>{"use strict";var nUt=["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(` + }`}),n={};return{regl:t,draw:r,atlas:n}};Hu.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=sBt(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(ke){return parseFloat(ke)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=hBt(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=_Bt(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=Hu.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(ke,ge){if(typeof ke=="string")try{ke=hA.parse(ke)}catch(Ge){ke=hA.parse(Hu.baseFontSize+"px "+ke)}else{var ie=ke.style,Te=ke.weight,Ee=ke.stretch,Ae=ke.variant;ke=hA.parse(hA.stringify(ke)),ie&&(ke.style=ie),Te&&(ke.weight=Te),Ee&&(ke.stretch=Ee),Ae&&(ke.variant=Ae)}var ze=hA.stringify({size:Hu.baseFontSize,family:ke.family,stretch:_F?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style}),Ce=vBt(ke.size),me=Math.round(Ce[0]*pBt(Ce[1]));if(me!==r.fontSize[ge]&&(i=!0,r.fontSize[ge]=me),(!r.font[ge]||ze!=r.font[ge].baseString)&&(n=!0,r.font[ge]=Hu.fonts[ze],!r.font[ge])){var De=ke.family.join(", "),ce=[ke.style];ke.style!=ke.variant&&ce.push(ke.variant),ke.variant!=ke.weight&&ce.push(ke.weight),_F&&ke.weight!=ke.stretch&&ce.push(ke.stretch),r.font[ge]={baseString:ze,family:De,weight:ke.weight,stretch:ke.stretch,style:ke.style,variant:ke.variant,width:{},kerning:{},metrics:yBt(De,{origin:"top",fontSize:Hu.baseFontSize,fontStyle:ce.join(" ")})},Hu.fonts[ze]=r.font[ge]}}),(n||i)&&this.font.forEach(function(ke,ge){var ie=hA.stringify({size:r.fontSize[ge],family:ke.family,stretch:_F?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style});if(r.fontAtlas[ge]=r.shader.atlas[ie],!r.fontAtlas[ge]){var Te=ke.metrics;r.shader.atlas[ie]=r.fontAtlas[ge]={fontString:ie,step:Math.ceil(r.fontSize[ge]*Te.bottom*.5)*2,em:r.fontSize[ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=hx.mallocFloat(this.count*2),f=0,h=0;f1?r.align[ge]:r.align[0]:r.align;if(typeof ie=="number")return ie;switch(ie){case"right":case"end":return-ke;case"center":case"centre":case"middle":return-ke*.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(ke,ge){var ie=(r.font[ge]||r.font[0]).metrics,Te=0;return Te+=ie.bottom*.5,typeof ke=="number"?Te+=ke-ie.baseline:Te+=-ie[ke],Te*=-1,Te})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=KY(t.color,"uint8");else{var H;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var X=t.color.length;H=hx.mallocUint8(X);for(var G=(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(ae){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 Me=0;Me1?this.counts[Me]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Me]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Me*4,Me*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Me]:this.opacity,baseline:this.baselineOffset[Me]!=null?this.baselineOffset[Me]:this.baselineOffset[0],align:this.align?this.alignOffset[Me]!=null?this.alignOffset[Me]:this.alignOffset[0]:0,atlas:this.fontAtlas[Me]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Me*2,Me*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=[]}};Hu.prototype.destroy=function(){};Hu.prototype.kerning=!0;Hu.prototype.position={constant:new Float32Array(2)};Hu.prototype.translate=null;Hu.prototype.scale=null;Hu.prototype.font=null;Hu.prototype.text="";Hu.prototype.positionOffset=[0,0];Hu.prototype.opacity=1;Hu.prototype.color=new Uint8Array([0,0,0,255]);Hu.prototype.alignOffset=[0,0];Hu.maxAtlasSize=1024;Hu.atlasCanvas=document.createElement("canvas");Hu.atlasContext=Hu.atlasCanvas.getContext("2d",{alpha:!1});Hu.baseFontSize=64;Hu.fonts={};function bBt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}pOe.exports=Hu});var xF=ye((Mmr,mOe)=>{"use strict";var wBt=pZ(),TBt=GY();mOe.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=TBt({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||wBt({container:i._glcontainer.node()}),a}});var QY=ye(($Y,wOe)=>{"use strict";var yOe=QX(),_Oe=LY(),ABt=lqe(),xOe=gOe(),JY=Mr(),SBt=Sg().selectMode,MBt=xF(),EBt=lu(),kBt=hU(),CBt=YX().styleTextSelection,bOe={};function LBt(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 $Y=wOe.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=MBt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],bOe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(kBt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({}),a.error2d===!0&&(a.error2d=ABt(h)),a.line2d===!0&&(a.line2d=_Oe(h)),a.scatter2d===!0&&(a.scatter2d=yOe(h)),a.fill2d===!0&&(a.fill2d=_Oe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;lae&&(isNaN(re[_e])||isNaN(re[_e+1]));)_e-=2;W.positions=re.slice(ae,_e+2)}return W}),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=JY.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(W,re){var ae=n[re];if(!(!W||!ae||!ae[0]||!ae[0].trace)){var _e=ae[0],Me=_e.trace,ke=_e.t,ge=a.lineOptions[re],ie,Te,Ee=[];Me._ownfill&&Ee.push(re),Me._nexttrace&&Ee.push(re+1),Ee.length&&(a.fillOrder[re]=Ee);var Ae=[],ze=ge&&ge.positions||ke.positions,Ce,me;if(Me.fill==="tozeroy"){for(Ce=0;CeCe&&isNaN(ze[me+1]);)me-=2;ze[Ce+1]!==0&&(Ae=[ze[Ce],0]),Ae=Ae.concat(ze.slice(Ce,me+2)),ze[me+1]!==0&&(Ae=Ae.concat([ze[me],0]))}else if(Me.fill==="tozerox"){for(Ce=0;CeCe&&isNaN(ze[me]);)me-=2;ze[Ce]!==0&&(Ae=[0,ze[Ce+1]]),Ae=Ae.concat(ze.slice(Ce,me+2)),ze[me]!==0&&(Ae=Ae.concat([0,ze[me+1]]))}else if(Me.fill==="toself"||Me.fill==="tonext"){for(Ae=[],ie=0,W.splitNull=!0,Te=0;Te-1;for(l=0;l{"use strict";var TOe=Hze();TOe.plot=QY();AOe.exports=TOe});var EOe=ye((kmr,MOe)=>{"use strict";MOe.exports=SOe()});var eK=ye((Cmr,POe)=>{"use strict";var PBt=Uc(),LOe=Kl(),kOe=Oc().axisHoverFormat,IBt=Wo().hovertemplateAttrs,xk=ek(),DBt=ad().idRegex,RBt=Vs().templatedArray,dA=no().extendFlat,o1=PBt.marker,zBt=o1.line,FBt=dA(LOe("marker.line",{editTypeOverride:"calc"}),{width:dA({},zBt.width,{editType:"calc"}),editType:"calc"}),bF=dA(LOe("marker"),{symbol:o1.symbol,angle:o1.angle,size:dA({},o1.size,{editType:"markerSize"}),sizeref:o1.sizeref,sizemin:o1.sizemin,sizemode:o1.sizemode,opacity:o1.opacity,colorbar:o1.colorbar,line:FBt,editType:"calc"});bF.color.editType=bF.cmin.editType=bF.cmax.editType="style";function COe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:DBt[e],editType:"plot"}}}POe.exports={dimensions:RBt("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:dA({},xk.text,{}),hovertext:dA({},xk.hovertext,{}),hovertemplate:IBt(),xhoverformat:kOe("x"),yhoverformat:kOe("y"),marker:bF,xaxes:COe("x"),yaxes:COe("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:xk.selected.marker,editType:"calc"},unselected:{marker:xk.unselected.marker,editType:"calc"},opacity:xk.opacity}});var wF=ye((Lmr,IOe)=>{"use strict";IOe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var tK=Mr(),qBt=Zd(),DOe=eK(),OBt=lu(),BBt=$p(),NBt=wF(),UBt=Fz().isOpenSymbol;ROe.exports=function(t,r,n,i){function a(d,v){return tK.coerce(t,r,DOe,d,v)}var o=qBt(t,r,{name:"dimensions",handleItemDefaults:VBt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=NBt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),BBt(t,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var f=UBt(r.marker.symbol),h=OBt.isBubble(r);a("marker.line.width",f||h?1:0),HBt(t,r,i,a),tK.coerceSelectionMarkerOpacity(r,a)};function VBt(e,t){function r(i,a){return tK.coerce(e,t,DOe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function HBt(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 FOe=Mr();qOe.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]=FOe.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||FOe.extendFlat(l,o),l}});var UOe=ye((Dmr,NOe)=>{"use strict";var rK=Mr(),TF=af(),GBt=q0().calcMarkerSize,jBt=q0().calcAxisExpansion,WBt=z0(),BOe=Y2().markerSelection,ZBt=Y2().markerStyle,XBt=OOe(),YBt=es().BADNUM,KBt=ox().TOO_MANY_POINTS;NOe.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(k,A){for(var L=k.makeCalcdata({v:A.values,vcalendar:r.calendar},"v"),_=0;_KBt,g;for(b?g=a.sizeAvg||Math.max(a.size,3):g=GBt(r,i),c=0;c{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?bk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(bk.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?(bk.exports=function(){return Date.now()-r},r=Date.now()):(bk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(VOe)});var jOe=ye((Rmr,MF)=>{var JBt=HOe(),s1=window,AF=["moz","webkit"],pA="AnimationFrame",gA=s1["request"+pA],wk=s1["cancel"+pA]||s1["cancelRequest"+pA];for(vA=0;!gA&&vA{WOe.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 $Bt=QX(),QBt=Zm(),eNt=j2(),XOe=jOe(),tNt=ZOe(),nK=eA(),rNt=W2();KOe.exports=vx;function vx(e,t){if(!(this instanceof vx))return new vx(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=$Bt(e),this.canvas=this.scatter.canvas}vx.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=XOe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,XOe(()=>{this.dirty=!1})),this)};vx.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&x{t[a+s]=n})}this.scatter.draw(...t)}return this};vx.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 iNt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function EF(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 YOe(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=nK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var QOe=ye((qmr,$Oe)=>{"use strict";var nNt=JOe(),aK=Mr(),kF=af(),aNt=Sg().selectMode;$Oe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,T=aNt(c)||!!i.selectedpoints||P,F=!0;if(T){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var V=i.selectedpoints,H={};for(d=0;d{"use strict";eBe.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 tBe=oK(),sNt=zz().calcHover,rBe=Qa().getFromId,lNt=no().extendFlat;function uNt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=iBe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=lNt({},e),f=0;f{"use strict";var uBe=Mr(),oBe=uBe.pushUnique,sBe=lu(),lBe=oK();cBe.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=!sBe.hasMarkers(i)&&!sBe.hasText(i);if(i.visible!==!0||f)return c;var h=lBe.getDimIndex(i,l),d=lBe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],x=a.ypx[d],b=s[h],g=s[d],E=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var A=0;A{"use strict";var hBe=Mr(),cNt=z0(),fNt=Y2().markerStyle;dBe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){cNt(t,n),hBe.extendFlat(i.matrixOptions,fNt(t,n));var a=hBe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var gBe=ye((Vmr,pBe)=>{"use strict";var hNt=ba(),dNt=nV();pBe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:eK(),supplyDefaults:zOe(),colorbar:Kd(),calc:UOe(),plot:QOe(),hoverPoints:aBe().hoverPoints,selectPoints:fBe(),editStyle:vBe(),meta:{}};hNt.register(dNt)});var wBe=ye((Hmr,bBe)=>{"use strict";var vNt=LY(),pNt=ba(),gNt=xF(),mNt=kd().getModuleCalcData,px=Jf(),mBe=af().getFromId,yBe=Qa().shouldShowZeroLine,_Be="splom",xBe={};function yNt(e){var t=e._fullLayout,r=pNt.getModule(_Be),n=mNt(e.calcdata,r)[0],i=gNt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],xBe);i&&(t._hasOnlyLargeSploms&&sK(e),r.plot(e,{},n))}function _Nt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&sK(e);for(var n=0;n{"use strict";var TBe=gBe();TBe.basePlotModule=wBe(),ABe.exports=TBe});var EBe=ye((jmr,MBe)=>{"use strict";MBe.exports=SBe()});var cK=ye((Wmr,kBe)=>{"use strict";var TNt=Kl(),lK=Cd(),uK=Su(),ANt=Ju().attributes,CF=no().extendFlat,SNt=Vs().templatedArray;kBe.exports={domain:ANt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:uK({editType:"plot"}),tickfont:uK({autoShadowDflt:!0,editType:"plot"}),rangefont:uK({editType:"plot"}),dimensions:SNt("dimension",{label:{valType:"string",editType:"plot"},tickvals:CF({},lK.tickvals,{editType:"plot"}),ticktext:CF({},lK.ticktext,{editType:"plot"}),tickformat:CF({},lK.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:CF({editType:"calc"},TNt("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 Tk=ye((Zmr,CBe)=>{"use strict";CBe.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 Km=ye((Xmr,PBe)=>{"use strict";var MNt=OS();function LBe(e){return[e]}PBe.exports={keyFun:function(e){return e.key},repeat:LBe,descend:MNt,wrap:LBe,unwrap:function(e){return e[0]}}});var dK=ye((Ymr,VBe)=>{"use strict";var th=Tk(),em=xa(),ENt=Km().keyFun,LF=Km().repeat,mA=Mr().sorterAsc,kNt=Mr().strTranslate,IBe=th.bar.snapRatio;function DBe(e,t){return e*(1-IBe)+t*IBe}var RBe=th.bar.snapClose;function CNt(e,t){return e*(1-RBe)+t*RBe}function IF(e,t,r,n){if(LNt(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 PNt(e){e.attr("x",-th.bar.captureWidth/2).attr("width",th.bar.captureWidth)}function INt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function DNt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=zBe(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 FBe(){em.select(document.body).style("cursor",null)}function hK(e){e.attr("stroke-dasharray",DNt)}function PF(e,t){var r=em.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(th.bar.snapDuration).each("end",t):r;hK(n)}function qBe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=zBe(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]=E[0]&&g<=E[1]){a.clickableOrdinalRange=E;break}}}return a}function zNt(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=qBe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function OBe(e,t){em.event.sourceEvent.stopPropagation();var r=t.height-em.mouse(e)[1]-2*th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(mA),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),PF(e.parentNode)}function FNt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(BBe(e,t),OBe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=em.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,FBe(),!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&&fK(r)):fK(r),i.brushCallback(t),PF(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||fK(r),i.brushCallback(t),u?PF(e.parentNode,s):(s(),PF(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function BBe(e,t){var r=t.height-em.mouse(e)[1]-2*th.verticalPadding,n=qBe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),em.select(document.body).style("cursor",i)}function qNt(e){e.on("mousemove",function(t){em.event.preventDefault(),t.parent.inBrushDrag||BBe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||FBe()}).call(em.behavior.drag().on("dragstart",function(t){zNt(this,t)}).on("drag",function(t){OBe(this,t)}).on("dragend",function(t){FNt(this,t)}))}function NBe(e,t){return e[0]-t[0]}function ONt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(LF);i.enter().append("rect").classed("background",!0).call(PNt).call(INt).style("pointer-events",n?"none":"auto").attr("transform",kNt(0,th.verticalPadding)),i.call(qNt).attr("height",function(s){return s.height-th.verticalPadding});var a=e.selectAll(".highlight-shadow").data(LF);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-th.bar.width/2).attr("stroke-width",th.bar.width+th.bar.strokeWidth).attr("stroke",t).attr("opacity",th.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(hK);var o=e.selectAll(".highlight").data(LF);o.enter().append("line").classed("highlight",!0).attr("x",-th.bar.width/2).attr("stroke-width",th.bar.width-th.bar.strokeWidth).attr("stroke",th.bar.fillColor).attr("opacity",th.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(hK)}function BNt(e,t,r){var n=e.selectAll("."+th.cn.axisBrush).data(LF,ENt);n.enter().append("g").classed(th.cn.axisBrush,!0),ONt(n,t,r)}function NNt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function fK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function UNt(e){return function(r){var n=r.brush,i=NNt(n),a=i.slice();n.filter.set(a),e()}}function UBe(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 VNt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(mA)}).sort(NBe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=UBe(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 HNt(e,t,r,n,i,a){var o=VNt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:UNt(i),brushEndCallback:a}}}function GNt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(mA)}),t.multiselect?e=UBe(e.sort(NBe)):e=[e[0]]):e=[e.sort(mA)],t.tickvals){var r=t.tickvals.slice().sort(mA);if(e=e.map(function(n){var i=[IF(0,r,n[0],[]),IF(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]}VBe.exports={makeBrush:HNt,ensureAxisBrush:BNt,cleanRanges:GNt}});var jBe=ye((Kmr,GBe)=>{"use strict";var gx=Mr(),jNt=Rv().hasColorscale,WNt=Uh(),ZNt=Ju().defaults,XNt=Zd(),YNt=Qa(),HBe=cK(),KNt=dK(),vK=Tk().maxDimensionCount,JNt=wF();function $Nt(e,t,r,n,i){var a=i("line.color",r);if(jNt(e,"line")&&gx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),WNt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function QNt(e,t,r,n){function i(u,c){return gx.coerce(e,t,HBe.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},YNt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=KNt.cleanRanges(l,t))}}GBe.exports=function(t,r,n,i){function a(c,f){return gx.coerce(t,r,HBe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>vK&&(gx.log("parcoords traces support up to "+vK+" dimensions at the moment"),o.splice(vK));var s=XNt(t,r,{name:"dimensions",layout:i,handleItemDefaults:QNt}),l=$Nt(t,r,n,i,a);ZNt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),JNt(r,s,"values",l);var u=gx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});gx.coerceFont(a,"labelfont",u),gx.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),gx.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var ZBe=ye((Jmr,WBe)=>{"use strict";var eUt=Mr().isArrayOrTypedArray,pK=Mu(),tUt=Km().wrap;WBe.exports=function(t,r){var n,i;return pK.hasColorscale(r,"line")&&eUt(r.line.color)?(n=r.line.color,i=pK.extractOpts(r.line).colorscale,pK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=rUt(r._length),i=[[0,r.line.color],[1,r.line.color]]),tUt({lineColor:n,cscale:i})};function rUt(e){for(var t=new Array(e),r=0;r{"use strict";var iUt=Mr().isTypedArray;DF.convertTypedArray=function(e){return iUt(e)?Array.prototype.slice.call(e):e};DF.isOrdinal=function(e){return!!e.tickvals};DF.isVisible=function(e){return e.visible||!("visible"in e)}});var iNe=ye((Qmr,rNe)=>{"use strict";var nUt=["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(` `),aUt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),Ak=Tk().maxDimensionCount,QBe=Mr(),XBe=1e-6,RF=2048,oUt=new Uint8Array(4),YBe=new Uint8Array(4),KBe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function sUt(e){e.read({x:0,y:0,width:1,height:1,data:oUt})}function eNe(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 lUt(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],eNe(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 fUt(e,t,r){for(var n=new Array(e*(Ak+4)),i=0,a=0;aX&&(X=M[F].dim1.canvasX,V=F);T===0&&eNe(i,0,0,u.canvasWidth,u.canvasHeight);var G=k(r);for(F=0;F{"use strict";var zd=xa(),l1=Mr(),yK=l1.isArrayOrTypedArray,uNe=l1.numberFormat,cNe=rZ(),fNe=Qa(),gUt=l1.strRotate,Jm=l1.strTranslate,mUt=Ll(),zF=ao(),nNe=Mu(),bK=Km(),tg=bK.keyFun,$m=bK.repeat,hNe=bK.unwrap,yA=gK(),ll=Tk(),dNe=dK(),yUt=iNe();function aNe(e,t,r){return l1.aggNums(e,null,t,r)}function vNe(e,t){return wK(aNe(Math.min,e,t),aNe(Math.max,e,t))}function FF(e){var t=e.range;return t?wK(t[0],t[1]):vNe(e.values,e._length)}function wK(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 _Ut(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function xUt(e,t,r,n,i){var a=FF(r);return n?zd.scale.ordinal().domain(n.map(_Ut(uNe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):zd.scale.linear().domain(a).range([e-t,t])}function bUt(e,t){return zd.scale.linear().range([t,e-t])}function wUt(e,t){return zd.scale.linear().domain(FF(e)).range([t,1-t])}function TUt(e){if(e.tickvals){var t=FF(e);return zd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function AUt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=cNe(a[1]);return zd.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return zd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function xK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function SUt(e,t,r){var n=hNe(t),i=n.trace,a=yA.convertTypedArray(n.lineColor),o=i.line,s={color:cNe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=nNe.extractOpts(o),u=l.reversescale?nNe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,x=i.labelfont,b=i.tickfont,g=i.rangefont,E=l1.extendDeepNoArrays({},o,{color:a.map(zd.scale.linear().domain(FF({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:ll.blockLineCount,canvasOverdrag:ll.overdrag*ll.canvasPixelRatio}),k=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},_=k,C=S;return{key:r,colCount:f.filter(yA.isVisible).length,dimensions:f,tickDistance:ll.tickDistance,unitToColor:AUt(u),lines:E,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:x,tickFont:b,rangeFont:g,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:_*ll.canvasPixelRatio+2*E.canvasOverdrag,canvasHeight:C*ll.canvasPixelRatio,width:_,height:C,canvasPixelRatio:ll.canvasPixelRatio}}function MUt(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=ll.verticalPadding/i,u=bUt(i,ll.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(yA.isVisible).map(function(h,d){var v=wUt(h,l),x=f[h.label];f[h.label]=(x||0)+1;var b=h.label+(x?"__"+x:""),g=h.constraintrange,E=g&&g.length;E&&!yK(g[0])&&(g=[g]);var k=E?g.map(function(q){return q.map(v)}):[[-1/0,1/0]],S=function(){var q=c;q.focusLayer&&q.focusLayer.render(q.panels,!0);var V=xK(q);!e.contextShown()&&V?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!V&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var _=h.tickvals,C;function M(q,V){return{val:q,text:C[V]}}function p(q,V){return q.val-V.val}if(yK(_)&&_.length){l1.isTypedArray(_)&&(_=Array.from(_)),C=h.ticktext,!yK(C)||!C.length?C=_.map(uNe(h.tickformat)):C.length>_.length?C=C.slice(0,_.length):_.length>C.length&&(_=_.slice(0,C.length));for(var P=1;P<_.length;P++)if(_[P]<_[P-1]){for(var T=_.map(M).sort(p),F=0;F<_.length;F++)_[F]=T[F].val,C[F]=T[F].text;break}}else _=void 0;return L=yA.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:_,ticktext:C,ordinal:yA.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(v),unitTickvals:_&&_.map(v),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:u,domainScale:xUt(i,ll.verticalPadding,h,_,C),ordinalScale:TUt(h),parent:c,model:r,brush:dNe.makeBrush(e,E,k,function(){e.linePickActive(!1)},S,function(q){if(c.focusLayer.render(c.panels,!0),c.pickLayer&&c.pickLayer.render(c.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var V=v.invert,H=q.map(function(X){return X.map(V).sort(l1.sorterAsc)}).sort(function(X,G){return X[0]-G[0]});t.filterChanged(c.key,h._index,H)}})}}),c}function oNe(e){e.classed(ll.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function EUt(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function sNe(e,t){var r=t==="top"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function _K(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a=V||N>=H)return;var W=F.lineLayer.readPixel(G,H-1-N),re=W[3]!==0,ae=re?W[2]+256*(W[1]+256*W[0]):null,_e={x:G,y:N,clientX:q.clientX,clientY:q.clientY,dataIndex:F.model.key,curveNumber:ae};ae!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=ae)}}),d.style("opacity",function(F){return F.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+ll.cn.parcoords).data(h,tg);b.exit().remove(),b.enter().append("g").classed(ll.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(F){return Jm(F.model.translateX,F.model.translateY)});var g=b.selectAll("."+ll.cn.parcoordsControlView).data($m,tg);g.enter().append("g").classed(ll.cn.parcoordsControlView,!0),g.attr("transform",function(F){return Jm(F.model.pad.l,F.model.pad.t)});var E=g.selectAll("."+ll.cn.yAxis).data(function(F){return F.dimensions},tg);E.enter().append("g").classed(ll.cn.yAxis,!0),g.each(function(F){_K(E,F,u)}),d.each(function(F){if(F.viewModel){!F.lineLayer||i?F.lineLayer=yUt(this,F):F.lineLayer.update(F),(F.key||F.key===0)&&(F.viewModel[F.key]=F.lineLayer);var q=!F.context||i;F.lineLayer.render(F.viewModel.panels,q)}}),E.attr("transform",function(F){return Jm(F.xScale(F.xIndex),0)}),E.call(zd.behavior.drag().origin(function(F){return F}).on("drag",function(F){var q=F.parent;f.linePickActive(!1),F.x=Math.max(-ll.overdrag,Math.min(F.model.width+ll.overdrag,zd.event.x)),F.canvasX=F.x*F.model.canvasPixelRatio,E.sort(function(V,H){return V.x-H.x}).each(function(V,H){V.xIndex=H,V.x=F===V?V.x:V.xScale(V.xIndex),V.canvasX=V.x*V.model.canvasPixelRatio}),_K(E,q,u),E.filter(function(V){return Math.abs(F.xIndex-V.xIndex)!==0}).attr("transform",function(V){return Jm(V.xScale(V.xIndex),0)}),zd.select(this).attr("transform",Jm(F.x,0)),E.each(function(V,H,X){X===F.parent.key&&(q.dimensions[H]=V)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!xK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(F){var q=F.parent;F.x=F.xScale(F.xIndex),F.canvasX=F.x*F.model.canvasPixelRatio,_K(E,q,u),zd.select(this).attr("transform",function(V){return Jm(V.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!xK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(V){return V.crossfilterDimensionIndex}))})),E.exit().remove();var k=E.selectAll("."+ll.cn.axisOverlays).data($m,tg);k.enter().append("g").classed(ll.cn.axisOverlays,!0),k.selectAll("."+ll.cn.axis).remove();var S=k.selectAll("."+ll.cn.axis).data($m,tg);S.enter().append("g").classed(ll.cn.axis,!0),S.each(function(F){var q=F.model.height/F.model.tickDistance,V=F.domainScale,H=V.domain();zd.select(this).call(zd.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,F.tickFormat).tickValues(F.ordinal?H:null).tickFormat(function(X){return yA.isOrdinal(F)?X:pNe(F.model.dimensions[F.visibleIndex],X)}).scale(V)),zF.font(S.selectAll("text"),F.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=k.selectAll("."+ll.cn.axisHeading).data($m,tg);L.enter().append("g").classed(ll.cn.axisHeading,!0);var _=L.selectAll("."+ll.cn.axisTitle).data($m,tg);_.enter().append("text").classed(ll.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),_.text(function(F){return F.label}).each(function(F){var q=zd.select(this);zF.font(q,F.model.labelFont),mUt.convertToTspans(q,t)}).attr("transform",function(F){var q=sNe(F.model.labelAngle,F.model.labelSide),V=ll.axisTitleOffset;return(q.dir>0?"":Jm(0,2*V+F.model.height))+gUt(q.degrees)+Jm(-V*q.dx,-V*q.dy)}).attr("text-anchor",function(F){var q=sNe(F.model.labelAngle,F.model.labelSide),V=Math.abs(q.dx),H=Math.abs(q.dy);return 2*V>H?q.dir*q.dx<0?"start":"end":"middle"});var C=k.selectAll("."+ll.cn.axisExtent).data($m,tg);C.enter().append("g").classed(ll.cn.axisExtent,!0);var M=C.selectAll("."+ll.cn.axisExtentTop).data($m,tg);M.enter().append("g").classed(ll.cn.axisExtentTop,!0),M.attr("transform",Jm(0,-ll.axisExtentOffset));var p=M.selectAll("."+ll.cn.axisExtentTopText).data($m,tg);p.enter().append("text").classed(ll.cn.axisExtentTopText,!0).call(oNe),p.text(function(F){return lNe(F,!0)}).each(function(F){zF.font(zd.select(this),F.model.rangeFont)});var P=C.selectAll("."+ll.cn.axisExtentBottom).data($m,tg);P.enter().append("g").classed(ll.cn.axisExtentBottom,!0),P.attr("transform",function(F){return Jm(0,F.model.height+ll.axisExtentOffset)});var T=P.selectAll("."+ll.cn.axisExtentBottomText).data($m,tg);T.enter().append("text").classed(ll.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(oNe),T.text(function(F){return lNe(F,!1)}).each(function(F){zF.font(zd.select(this),F.model.rangeFont)}),dNe.ensureAxisBrush(k,c,t)}});var AK=ye((TK,bNe)=>{"use strict";var CUt=mNe(),LUt=xF(),yNe=gK().isVisible,xNe={};function _Ne(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function PUt(e,t){return function(n,i){return _Ne(e,t,n)-_Ne(e,t,i)}}var TK=bNe.exports=function(t,r){var n=t._fullLayout,i=LUt(t,[],xNe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,x){var b=v[0].trace;s[x]=b.index;var g=l[x]=b.index;a[x]=t.data[g].dimensions,o[x]=t.data[g].dimensions.slice()});var c=function(v,x,b){var g=o[v][x],E=b.map(function(M){return M.slice()}),k="dimensions["+x+"].constraintrange",S=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(S[k]===void 0){var L=g.constraintrange;S[k]=L||null}var _=t._fullData[s[v]].dimensions[x];E.length?(E.length===1&&(E=E[0]),g.constraintrange=E,_.constraintrange=E.slice(),E=[E]):(delete g.constraintrange,delete _.constraintrange,E=null);var C={};C[k]=E,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,x){var b=PUt(x,o[v].filter(yNe));a[v].sort(b),o[v].filter(function(g){return!yNe(g)}).sort(function(g){return o[v].indexOf(g)}).forEach(function(g){a[v].splice(a[v].indexOf(g),1),a[v].splice(o[v].indexOf(g),0,g)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};CUt(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})}};TK.reglPrecompiled=xNe});var TNe=ye(Sk=>{"use strict";var wNe=xa(),IUt=kd().getModuleCalcData,DUt=AK(),RUt=Zp();Sk.name="parcoords";Sk.plot=function(e){var t=IUt(e.calcdata,"parcoords")[0];t.length&&DUt(e,t)};Sk.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())};Sk.toSVG=function(e){var t=e._fullLayout._glimages,r=wNe.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:RUt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){wNe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var SNe=ye((ryr,ANe)=>{"use strict";ANe.exports={attributes:cK(),supplyDefaults:jBe(),calc:ZBe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:TNe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var kNe=ye((iyr,ENe)=>{"use strict";var MNe=SNe();MNe.plot=AK();ENe.exports=MNe});var LNe=ye((nyr,CNe)=>{"use strict";CNe.exports=kNe()});var SK=ye((ayr,RNe)=>{"use strict";var INe=no().extendFlat,zUt=vl(),PNe=Su(),FUt=Kl(),DNe=Wo().hovertemplateAttrs,qUt=Ju().attributes,OUt=INe({editType:"calc"},FUt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:DNe({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});RNe.exports={domain:qUt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:INe({},zUt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:DNe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:PNe({editType:"calc"}),tickfont:PNe({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:OUt,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 qNe=ye((oyr,FNe)=>{"use strict";var _A=Mr(),BUt=Rv().hasColorscale,NUt=Uh(),UUt=Ju().defaults,VUt=Zd(),zNe=SK(),HUt=wF(),GUt=vv().isTypedArraySpec;function jUt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate");var a=i("line.color",n.colorway[0]);if(BUt(e,"line")&&_A.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),NUt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function WUt(e,t){function r(u,c){return _A.coerce(e,t,zNe.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=_A.isArrayOrTypedArray(a)&&a.length>0||GUt(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")}}FNe.exports=function(t,r,n,i){function a(u,c){return _A.coerce(t,r,zNe,u,c)}var o=VUt(t,r,{name:"dimensions",handleItemDefaults:WUt}),s=jUt(t,r,n,i,a);UUt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),HUt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;_A.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),_A.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var BNe=ye((syr,ONe)=>{"use strict";var ZUt=Km().wrap,XUt=Rv().hasColorscale,YUt=zv(),KUt=Gq(),JUt=ao(),Mk=Mr(),$Ut=uo();ONe.exports=function(t,r){var n=Mk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(p){var P;if(p.categoryorder==="trace")P=null;else if(p.categoryorder==="array")P=p.categoryarray;else{P=KUt(p.values);for(var T=!0,F=0;F=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var XNe=ye((lyr,ZNe)=>{"use strict";var ul=xa(),uVt=(D2(),ab(I2)).interpolateNumber,cVt=qP(),Ck=Nc(),mx=Mr(),Ek=mx.strTranslate,NNe=ao(),MK=id(),fVt=Ll();function hVt(e,t,r,n){var i=t._context.staticPlot,a=e.map(EVt.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(E){return Ek(E.x,E.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(E){return E.paths},u1);c.attr("fill",function(E){return E.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(E){return E.model.color}).attr("fill-opacity",0);CK(f),c.attr("d",function(E){return E.svgD}),f.empty()||c.sort(EK),c.exit().remove(),c.on("mouseover",dVt).on("mouseout",vVt).on("click",pVt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(E){return E.dimensions},u1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(E){return Ek(E.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(E){return E.categories},u1),x=v.enter().append("g").attr("class","category");v.attr("transform",function(E){return Ek(0,E.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),VNe(x);var b=v.selectAll("rect.bandrect").data(function(E){return E.bands},u1);b.each(function(){mx.raiseToTop(this)}),b.attr("fill",function(E){return E.color});var g=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(E){return E.color}).attr("fill-opacity",0);b.attr("fill",function(E){return E.color}).attr("width",function(E){return E.width}).attr("height",function(E){return E.height}).attr("y",function(E){return E.y}).attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":E.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),PK(g),b.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(E){return kk(E)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(E){return kk(E)?E.width+5:-5}).attr("y",function(E){return E.height/2}).text(function(E){return E.model.categoryLabel}).each(function(E){NNe.font(ul.select(this),E.parcatsViewModel.categorylabelfont),fVt.convertToTspans(ul.select(this),t)}),x.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(E){return E.width/2}).attr("y",-5).text(function(E,k){return k===0?E.parcatsViewModel.model.dimensions[E.model.dimensionInd].dimensionLabel:null}).each(function(E){NNe.font(ul.select(this),E.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",wVt).on("mouseout",TVt),v.exit().remove(),d.call(ul.behavior.drag().origin(function(E){return{x:E.x,y:0}}).on("dragstart",AVt).on("drag",SVt).on("dragend",MVt)),s.each(function(E){E.traceSelection=ul.select(this),E.pathSelection=ul.select(this).selectAll("g.paths").selectAll("path.path"),E.dimensionSelection=ul.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}ZNe.exports=function(e,t,r,n){hVt(r,e,n,t)};function u1(e){return e.key}function kk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function EK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),_=ul.mouse(i)[0];Ck.loneHover({trace:a,x:v-s.left+l.left,y:x-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:_1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,x=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,g={countLabel:v,categoryLabel:x,probabilityLabel:b.toFixed(3)},E=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&E.push(["Count:",g.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&E.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var k=E.join("
");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:g,eventData:[{data:c._input,fullData:c,count:v,category:x,probability:b}]}}function xVt(e,t,r){var n=[];return ul.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(HNe(e,t,i))}),n}function bVt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=ul.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,x=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var g=s.model.count,E=0;l.pathSelection.each(function(P){P.model.color===o.color&&(E+=P.model.count)});var k=b/x,S=b/E,L=b/g,_={countLabel:b,categoryLabel:v,probabilityLabel:k.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",_.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+_.probabilityLabel),C.push("P("+v+" | color): "+S.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var M=C.join("
"),p=MK.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:p,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:_,eventData:[{data:c._input,fullData:c,category:v,count:x,probability:k,categorycount:g,colorcount:E,bandcolorcount:b}]}}function wVt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=ul.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"?(_Vt(o),DK(o,"plotly_hover",ul.event)):(yVt(o),IK(o,"plotly_hover",ul.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=HNe(r,i,o):a==="color"?s=bVt(r,i,o):a==="dimension"&&(s=xVt(r,i,o)),s&&Ck.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function TVt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(CK(t.pathSelection),VNe(t.dimensionSelection.selectAll("g.category")),PK(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Ck.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(EK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?DK(n,"plotly_unhover",ul.event):IK(n,"plotly_unhover",ul.event)}}function AVt(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,ul.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=ul.mouse(this)[0],n=ul.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,mx.raiseToTop(this.parentNode),ul.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=ul.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}zK(e.parcatsViewModel),RK(e.parcatsViewModel),WNe(e.parcatsViewModel),jNe(e.parcatsViewModel)}}function MVt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){ul.select(this).selectAll("text").attr("font-weight","normal");var t={},r=GNe(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"?DK(e.potentialClickBand,"plotly_click",ul.event.sourceEvent):IK(e.potentialClickBand,"plotly_click",ul.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,zK(e.parcatsViewModel),RK(e.parcatsViewModel);var f=ul.transition().duration(300).ease("cubic-in-out");f.each(function(){WNe(e.parcatsViewModel,!0),jNe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&cVt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function GNe(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 RK(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(V){return V.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(V){return V.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),l=t.map(function(q){return q.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(q){var V=q.categoryInds.map(function(X,G){return i[G][X]}),H=o.map(function(X){return V[X]});return H}u.sort(function(q,V){var H=f(q),X=f(V);return e.sortpaths==="backward"&&(H.reverse(),X.reverse()),H.push(q.valueInds[0]),X.push(V.valueInds[0]),e.bundlecolors&&(H.unshift(q.rawColor),X.unshift(V.rawColor)),HX?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(q){return q.height}).reduce(function(q,V){return q+V}),x=0;x0?g=v*(b.count/d):g=0;for(var E=new Array(n.length),k=0;k1?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),x,b,g,E,k,S=(c-f)*h/2,L=t.categories.map(function(_){return{displayInd:_.displayInd,categoryInd:_.categoryInd}});for(L.sort(function(_,C){return _.displayInd-C.displayInd}),k=0;k0?x=b.count/d*v:x=0,g={key:b.valueInds[0],model:b,width:n,height:x,y:b.dragY!==null?b.dragY:S,bands:[],parcatsViewModel:e},S=S+x+h,u.push(g);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 FK=ye((uyr,YNe)=>{"use strict";var CVt=XNe();YNe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;CVt(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 JNe=ye(OF=>{"use strict";var LVt=kd().getModuleCalcData,PVt=FK(),KNe="parcats";OF.name=KNe;OF.plot=function(e,t,r,n){var i=LVt(e.calcdata,KNe);if(i.length){var a=i[0];PVt(e,a,r,n)}};OF.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 QNe=ye((fyr,$Ne)=>{"use strict";$Ne.exports={attributes:SK(),supplyDefaults:qNe(),calc:BNe(),plot:FK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:JNe(),categories:["noOpacity"],meta:{}}});var tUe=ye((hyr,eUe)=>{"use strict";eUe.exports=QNe()});var c1=ye((dyr,lUe)=>{"use strict";var IVt=X1(),rUe="1.13.4",oUe='\xA9
OpenStreetMap contributors',iUe=['\xA9 Carto',oUe].join(" "),nUe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),DVt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),sUe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:oUe,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:iUe,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:iUe,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:nUe,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:nUe,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:DVt,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"}},aUe=IVt(sUe);lUe.exports={requiredVersion:rUe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:sUe,styleValuesNonMapbox:aUe,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@"+rUe+"."].join(` +`),Ak=Tk().maxDimensionCount,QBe=Mr(),XBe=1e-6,RF=2048,oUt=new Uint8Array(4),YBe=new Uint8Array(4),KBe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function sUt(e){e.read({x:0,y:0,width:1,height:1,data:oUt})}function eNe(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 lUt(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],eNe(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 fUt(e,t,r){for(var n=new Array(e*(Ak+4)),i=0,a=0;aX&&(X=M[F].dim1.canvasX,V=F);T===0&&eNe(i,0,0,u.canvasWidth,u.canvasHeight);var G=k(r);for(F=0;F{"use strict";var zd=xa(),l1=Mr(),yK=l1.isArrayOrTypedArray,uNe=l1.numberFormat,cNe=rZ(),fNe=Qa(),gUt=l1.strRotate,Jm=l1.strTranslate,mUt=Ll(),zF=ao(),nNe=Mu(),bK=Km(),tg=bK.keyFun,$m=bK.repeat,hNe=bK.unwrap,yA=gK(),ll=Tk(),dNe=dK(),yUt=iNe();function aNe(e,t,r){return l1.aggNums(e,null,t,r)}function vNe(e,t){return wK(aNe(Math.min,e,t),aNe(Math.max,e,t))}function FF(e){var t=e.range;return t?wK(t[0],t[1]):vNe(e.values,e._length)}function wK(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 _Ut(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function xUt(e,t,r,n,i){var a=FF(r);return n?zd.scale.ordinal().domain(n.map(_Ut(uNe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):zd.scale.linear().domain(a).range([e-t,t])}function bUt(e,t){return zd.scale.linear().range([t,e-t])}function wUt(e,t){return zd.scale.linear().domain(FF(e)).range([t,1-t])}function TUt(e){if(e.tickvals){var t=FF(e);return zd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function AUt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=cNe(a[1]);return zd.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return zd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function xK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function SUt(e,t,r){var n=hNe(t),i=n.trace,a=yA.convertTypedArray(n.lineColor),o=i.line,s={color:cNe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=nNe.extractOpts(o),u=l.reversescale?nNe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,x=i.labelfont,b=i.tickfont,g=i.rangefont,E=l1.extendDeepNoArrays({},o,{color:a.map(zd.scale.linear().domain(FF({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:ll.blockLineCount,canvasOverdrag:ll.overdrag*ll.canvasPixelRatio}),k=Math.floor(h*(c.x[1]-c.x[0])),A=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},_=k,C=A;return{key:r,colCount:f.filter(yA.isVisible).length,dimensions:f,tickDistance:ll.tickDistance,unitToColor:AUt(u),lines:E,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:x,tickFont:b,rangeFont:g,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:_*ll.canvasPixelRatio+2*E.canvasOverdrag,canvasHeight:C*ll.canvasPixelRatio,width:_,height:C,canvasPixelRatio:ll.canvasPixelRatio}}function MUt(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=ll.verticalPadding/i,u=bUt(i,ll.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(yA.isVisible).map(function(h,d){var v=wUt(h,l),x=f[h.label];f[h.label]=(x||0)+1;var b=h.label+(x?"__"+x:""),g=h.constraintrange,E=g&&g.length;E&&!yK(g[0])&&(g=[g]);var k=E?g.map(function(q){return q.map(v)}):[[-1/0,1/0]],A=function(){var q=c;q.focusLayer&&q.focusLayer.render(q.panels,!0);var V=xK(q);!e.contextShown()&&V?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!V&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var _=h.tickvals,C;function M(q,V){return{val:q,text:C[V]}}function p(q,V){return q.val-V.val}if(yK(_)&&_.length){l1.isTypedArray(_)&&(_=Array.from(_)),C=h.ticktext,!yK(C)||!C.length?C=_.map(uNe(h.tickformat)):C.length>_.length?C=C.slice(0,_.length):_.length>C.length&&(_=_.slice(0,C.length));for(var P=1;P<_.length;P++)if(_[P]<_[P-1]){for(var T=_.map(M).sort(p),F=0;F<_.length;F++)_[F]=T[F].val,C[F]=T[F].text;break}}else _=void 0;return L=yA.convertTypedArray(L),{key:b,label:h.label,tickFormat:h.tickformat,tickvals:_,ticktext:C,ordinal:yA.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:i,values:L,paddedUnitValues:L.map(v),unitTickvals:_&&_.map(v),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:u,domainScale:xUt(i,ll.verticalPadding,h,_,C),ordinalScale:TUt(h),parent:c,model:r,brush:dNe.makeBrush(e,E,k,function(){e.linePickActive(!1)},A,function(q){if(c.focusLayer.render(c.panels,!0),c.pickLayer&&c.pickLayer.render(c.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var V=v.invert,H=q.map(function(X){return X.map(V).sort(l1.sorterAsc)}).sort(function(X,G){return X[0]-G[0]});t.filterChanged(c.key,h._index,H)}})}}),c}function oNe(e){e.classed(ll.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function EUt(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function sNe(e,t){var r=t==="top"?1:-1,n=e*Math.PI/180,i=Math.sin(n),a=Math.cos(n);return{dir:r,dx:i,dy:a,degrees:e}}function _K(e,t,r){for(var n=t.panels||(t.panels=[]),i=e.data(),a=0;a=V||N>=H)return;var W=F.lineLayer.readPixel(G,H-1-N),re=W[3]!==0,ae=re?W[2]+256*(W[1]+256*W[0]):null,_e={x:G,y:N,clientX:q.clientX,clientY:q.clientY,dataIndex:F.model.key,curveNumber:ae};ae!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=ae)}}),d.style("opacity",function(F){return F.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+ll.cn.parcoords).data(h,tg);b.exit().remove(),b.enter().append("g").classed(ll.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(F){return Jm(F.model.translateX,F.model.translateY)});var g=b.selectAll("."+ll.cn.parcoordsControlView).data($m,tg);g.enter().append("g").classed(ll.cn.parcoordsControlView,!0),g.attr("transform",function(F){return Jm(F.model.pad.l,F.model.pad.t)});var E=g.selectAll("."+ll.cn.yAxis).data(function(F){return F.dimensions},tg);E.enter().append("g").classed(ll.cn.yAxis,!0),g.each(function(F){_K(E,F,u)}),d.each(function(F){if(F.viewModel){!F.lineLayer||i?F.lineLayer=yUt(this,F):F.lineLayer.update(F),(F.key||F.key===0)&&(F.viewModel[F.key]=F.lineLayer);var q=!F.context||i;F.lineLayer.render(F.viewModel.panels,q)}}),E.attr("transform",function(F){return Jm(F.xScale(F.xIndex),0)}),E.call(zd.behavior.drag().origin(function(F){return F}).on("drag",function(F){var q=F.parent;f.linePickActive(!1),F.x=Math.max(-ll.overdrag,Math.min(F.model.width+ll.overdrag,zd.event.x)),F.canvasX=F.x*F.model.canvasPixelRatio,E.sort(function(V,H){return V.x-H.x}).each(function(V,H){V.xIndex=H,V.x=F===V?V.x:V.xScale(V.xIndex),V.canvasX=V.x*V.model.canvasPixelRatio}),_K(E,q,u),E.filter(function(V){return Math.abs(F.xIndex-V.xIndex)!==0}).attr("transform",function(V){return Jm(V.xScale(V.xIndex),0)}),zd.select(this).attr("transform",Jm(F.x,0)),E.each(function(V,H,X){X===F.parent.key&&(q.dimensions[H]=V)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!xK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(F){var q=F.parent;F.x=F.xScale(F.xIndex),F.canvasX=F.x*F.model.canvasPixelRatio,_K(E,q,u),zd.select(this).attr("transform",function(V){return Jm(V.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!xK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(V){return V.crossfilterDimensionIndex}))})),E.exit().remove();var k=E.selectAll("."+ll.cn.axisOverlays).data($m,tg);k.enter().append("g").classed(ll.cn.axisOverlays,!0),k.selectAll("."+ll.cn.axis).remove();var A=k.selectAll("."+ll.cn.axis).data($m,tg);A.enter().append("g").classed(ll.cn.axis,!0),A.each(function(F){var q=F.model.height/F.model.tickDistance,V=F.domainScale,H=V.domain();zd.select(this).call(zd.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,F.tickFormat).tickValues(F.ordinal?H:null).tickFormat(function(X){return yA.isOrdinal(F)?X:pNe(F.model.dimensions[F.visibleIndex],X)}).scale(V)),zF.font(A.selectAll("text"),F.model.tickFont)}),A.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),A.selectAll("text").style("cursor","default");var L=k.selectAll("."+ll.cn.axisHeading).data($m,tg);L.enter().append("g").classed(ll.cn.axisHeading,!0);var _=L.selectAll("."+ll.cn.axisTitle).data($m,tg);_.enter().append("text").classed(ll.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),_.text(function(F){return F.label}).each(function(F){var q=zd.select(this);zF.font(q,F.model.labelFont),mUt.convertToTspans(q,t)}).attr("transform",function(F){var q=sNe(F.model.labelAngle,F.model.labelSide),V=ll.axisTitleOffset;return(q.dir>0?"":Jm(0,2*V+F.model.height))+gUt(q.degrees)+Jm(-V*q.dx,-V*q.dy)}).attr("text-anchor",function(F){var q=sNe(F.model.labelAngle,F.model.labelSide),V=Math.abs(q.dx),H=Math.abs(q.dy);return 2*V>H?q.dir*q.dx<0?"start":"end":"middle"});var C=k.selectAll("."+ll.cn.axisExtent).data($m,tg);C.enter().append("g").classed(ll.cn.axisExtent,!0);var M=C.selectAll("."+ll.cn.axisExtentTop).data($m,tg);M.enter().append("g").classed(ll.cn.axisExtentTop,!0),M.attr("transform",Jm(0,-ll.axisExtentOffset));var p=M.selectAll("."+ll.cn.axisExtentTopText).data($m,tg);p.enter().append("text").classed(ll.cn.axisExtentTopText,!0).call(oNe),p.text(function(F){return lNe(F,!0)}).each(function(F){zF.font(zd.select(this),F.model.rangeFont)});var P=C.selectAll("."+ll.cn.axisExtentBottom).data($m,tg);P.enter().append("g").classed(ll.cn.axisExtentBottom,!0),P.attr("transform",function(F){return Jm(0,F.model.height+ll.axisExtentOffset)});var T=P.selectAll("."+ll.cn.axisExtentBottomText).data($m,tg);T.enter().append("text").classed(ll.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(oNe),T.text(function(F){return lNe(F,!1)}).each(function(F){zF.font(zd.select(this),F.model.rangeFont)}),dNe.ensureAxisBrush(k,c,t)}});var AK=ye((TK,bNe)=>{"use strict";var CUt=mNe(),LUt=xF(),yNe=gK().isVisible,xNe={};function _Ne(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function PUt(e,t){return function(n,i){return _Ne(e,t,n)-_Ne(e,t,i)}}var TK=bNe.exports=function(t,r){var n=t._fullLayout,i=LUt(t,[],xNe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,x){var b=v[0].trace;s[x]=b.index;var g=l[x]=b.index;a[x]=t.data[g].dimensions,o[x]=t.data[g].dimensions.slice()});var c=function(v,x,b){var g=o[v][x],E=b.map(function(M){return M.slice()}),k="dimensions["+x+"].constraintrange",A=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(A[k]===void 0){var L=g.constraintrange;A[k]=L||null}var _=t._fullData[s[v]].dimensions[x];E.length?(E.length===1&&(E=E[0]),g.constraintrange=E,_.constraintrange=E.slice(),E=[E]):(delete g.constraintrange,delete _.constraintrange,E=null);var C={};C[k]=E,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,x){var b=PUt(x,o[v].filter(yNe));a[v].sort(b),o[v].filter(function(g){return!yNe(g)}).sort(function(g){return o[v].indexOf(g)}).forEach(function(g){a[v].splice(a[v].indexOf(g),1),a[v].splice(o[v].indexOf(g),0,g)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};CUt(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})}};TK.reglPrecompiled=xNe});var TNe=ye(Sk=>{"use strict";var wNe=xa(),IUt=kd().getModuleCalcData,DUt=AK(),RUt=Zp();Sk.name="parcoords";Sk.plot=function(e){var t=IUt(e.calcdata,"parcoords")[0];t.length&&DUt(e,t)};Sk.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())};Sk.toSVG=function(e){var t=e._fullLayout._glimages,r=wNe.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:RUt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){wNe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var SNe=ye((ryr,ANe)=>{"use strict";ANe.exports={attributes:cK(),supplyDefaults:jBe(),calc:ZBe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:TNe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var kNe=ye((iyr,ENe)=>{"use strict";var MNe=SNe();MNe.plot=AK();ENe.exports=MNe});var LNe=ye((nyr,CNe)=>{"use strict";CNe.exports=kNe()});var SK=ye((ayr,RNe)=>{"use strict";var INe=no().extendFlat,zUt=vl(),PNe=Su(),FUt=Kl(),DNe=Wo().hovertemplateAttrs,qUt=Ju().attributes,OUt=INe({editType:"calc"},FUt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:DNe({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});RNe.exports={domain:qUt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:INe({},zUt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:DNe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:PNe({editType:"calc"}),tickfont:PNe({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:OUt,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 qNe=ye((oyr,FNe)=>{"use strict";var _A=Mr(),BUt=Rv().hasColorscale,NUt=Uh(),UUt=Ju().defaults,VUt=Zd(),zNe=SK(),HUt=wF(),GUt=vv().isTypedArraySpec;function jUt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate");var a=i("line.color",n.colorway[0]);if(BUt(e,"line")&&_A.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),NUt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function WUt(e,t){function r(u,c){return _A.coerce(e,t,zNe.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=_A.isArrayOrTypedArray(a)&&a.length>0||GUt(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")}}FNe.exports=function(t,r,n,i){function a(u,c){return _A.coerce(t,r,zNe,u,c)}var o=VUt(t,r,{name:"dimensions",handleItemDefaults:WUt}),s=jUt(t,r,n,i,a);UUt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),HUt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;_A.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),_A.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var BNe=ye((syr,ONe)=>{"use strict";var ZUt=Km().wrap,XUt=Rv().hasColorscale,YUt=zv(),KUt=Gq(),JUt=ao(),Mk=Mr(),$Ut=uo();ONe.exports=function(t,r){var n=Mk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(p){var P;if(p.categoryorder==="trace")P=null;else if(p.categoryorder==="array")P=p.categoryarray;else{P=KUt(p.values);for(var T=!0,F=0;F=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var XNe=ye((lyr,ZNe)=>{"use strict";var ul=xa(),uVt=(D2(),ab(I2)).interpolateNumber,cVt=qP(),Ck=Nc(),mx=Mr(),Ek=mx.strTranslate,NNe=ao(),MK=id(),fVt=Ll();function hVt(e,t,r,n){var i=t._context.staticPlot,a=e.map(EVt.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(E){return Ek(E.x,E.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(E){return E.paths},u1);c.attr("fill",function(E){return E.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(E){return E.model.color}).attr("fill-opacity",0);CK(f),c.attr("d",function(E){return E.svgD}),f.empty()||c.sort(EK),c.exit().remove(),c.on("mouseover",dVt).on("mouseout",vVt).on("click",pVt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(E){return E.dimensions},u1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(E){return Ek(E.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(E){return E.categories},u1),x=v.enter().append("g").attr("class","category");v.attr("transform",function(E){return Ek(0,E.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),VNe(x);var b=v.selectAll("rect.bandrect").data(function(E){return E.bands},u1);b.each(function(){mx.raiseToTop(this)}),b.attr("fill",function(E){return E.color});var g=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(E){return E.color}).attr("fill-opacity",0);b.attr("fill",function(E){return E.color}).attr("width",function(E){return E.width}).attr("height",function(E){return E.height}).attr("y",function(E){return E.y}).attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":E.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),PK(g),b.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(E){return kk(E)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(E){return kk(E)?E.width+5:-5}).attr("y",function(E){return E.height/2}).text(function(E){return E.model.categoryLabel}).each(function(E){NNe.font(ul.select(this),E.parcatsViewModel.categorylabelfont),fVt.convertToTspans(ul.select(this),t)}),x.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(E){return E.width/2}).attr("y",-5).text(function(E,k){return k===0?E.parcatsViewModel.model.dimensions[E.model.dimensionInd].dimensionLabel:null}).each(function(E){NNe.font(ul.select(this),E.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",wVt).on("mouseout",TVt),v.exit().remove(),d.call(ul.behavior.drag().origin(function(E){return{x:E.x,y:0}}).on("dragstart",AVt).on("drag",SVt).on("dragend",MVt)),s.each(function(E){E.traceSelection=ul.select(this),E.pathSelection=ul.select(this).selectAll("g.paths").selectAll("path.path"),E.dimensionSelection=ul.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}ZNe.exports=function(e,t,r,n){hVt(r,e,n,t)};function u1(e){return e.key}function kk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function EK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),_=ul.mouse(i)[0];Ck.loneHover({trace:a,x:v-s.left+l.left,y:x-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:_1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,x=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,g={countLabel:v,categoryLabel:x,probabilityLabel:b.toFixed(3)},E=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&E.push(["Count:",g.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&E.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var k=E.join("
");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:g,eventData:[{data:c._input,fullData:c,count:v,category:x,probability:b}]}}function xVt(e,t,r){var n=[];return ul.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(HNe(e,t,i))}),n}function bVt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=ul.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,x=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var g=s.model.count,E=0;l.pathSelection.each(function(P){P.model.color===o.color&&(E+=P.model.count)});var k=b/x,A=b/E,L=b/g,_={countLabel:b,categoryLabel:v,probabilityLabel:k.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",_.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+_.probabilityLabel),C.push("P("+v+" | color): "+A.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var M=C.join("
"),p=MK.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:p,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:_,eventData:[{data:c._input,fullData:c,category:v,count:x,probability:k,categorycount:g,colorcount:E,bandcolorcount:b}]}}function wVt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=ul.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"?(_Vt(o),DK(o,"plotly_hover",ul.event)):(yVt(o),IK(o,"plotly_hover",ul.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=HNe(r,i,o):a==="color"?s=bVt(r,i,o):a==="dimension"&&(s=xVt(r,i,o)),s&&Ck.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function TVt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(CK(t.pathSelection),VNe(t.dimensionSelection.selectAll("g.category")),PK(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Ck.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(EK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?DK(n,"plotly_unhover",ul.event):IK(n,"plotly_unhover",ul.event)}}function AVt(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,ul.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=ul.mouse(this)[0],n=ul.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,mx.raiseToTop(this.parentNode),ul.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=ul.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}zK(e.parcatsViewModel),RK(e.parcatsViewModel),WNe(e.parcatsViewModel),jNe(e.parcatsViewModel)}}function MVt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){ul.select(this).selectAll("text").attr("font-weight","normal");var t={},r=GNe(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"?DK(e.potentialClickBand,"plotly_click",ul.event.sourceEvent):IK(e.potentialClickBand,"plotly_click",ul.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,zK(e.parcatsViewModel),RK(e.parcatsViewModel);var f=ul.transition().duration(300).ease("cubic-in-out");f.each(function(){WNe(e.parcatsViewModel,!0),jNe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&cVt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function GNe(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 RK(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(V){return V.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(V){return V.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),l=t.map(function(q){return q.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(q){var V=q.categoryInds.map(function(X,G){return i[G][X]}),H=o.map(function(X){return V[X]});return H}u.sort(function(q,V){var H=f(q),X=f(V);return e.sortpaths==="backward"&&(H.reverse(),X.reverse()),H.push(q.valueInds[0]),X.push(V.valueInds[0]),e.bundlecolors&&(H.unshift(q.rawColor),X.unshift(V.rawColor)),HX?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(q){return q.height}).reduce(function(q,V){return q+V}),x=0;x0?g=v*(b.count/d):g=0;for(var E=new Array(n.length),k=0;k1?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),x,b,g,E,k,A=(c-f)*h/2,L=t.categories.map(function(_){return{displayInd:_.displayInd,categoryInd:_.categoryInd}});for(L.sort(function(_,C){return _.displayInd-C.displayInd}),k=0;k0?x=b.count/d*v:x=0,g={key:b.valueInds[0],model:b,width:n,height:x,y:b.dragY!==null?b.dragY:A,bands:[],parcatsViewModel:e},A=A+x+h,u.push(g);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 FK=ye((uyr,YNe)=>{"use strict";var CVt=XNe();YNe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;CVt(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 JNe=ye(OF=>{"use strict";var LVt=kd().getModuleCalcData,PVt=FK(),KNe="parcats";OF.name=KNe;OF.plot=function(e,t,r,n){var i=LVt(e.calcdata,KNe);if(i.length){var a=i[0];PVt(e,a,r,n)}};OF.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 QNe=ye((fyr,$Ne)=>{"use strict";$Ne.exports={attributes:SK(),supplyDefaults:qNe(),calc:BNe(),plot:FK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:JNe(),categories:["noOpacity"],meta:{}}});var tUe=ye((hyr,eUe)=>{"use strict";eUe.exports=QNe()});var c1=ye((dyr,lUe)=>{"use strict";var IVt=X1(),rUe="1.13.4",oUe='\xA9 OpenStreetMap contributors',iUe=['\xA9 Carto',oUe].join(" "),nUe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),DVt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),sUe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:oUe,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:iUe,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:iUe,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:nUe,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:nUe,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:DVt,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"}},aUe=IVt(sUe);lUe.exports={requiredVersion:rUe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:sUe,styleValuesNonMapbox:aUe,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@"+rUe+"."].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:",aUe.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 Pk=ye((vyr,hUe)=>{"use strict";var uUe=Mr(),cUe=va().defaultLine,RVt=Ju().attributes,zVt=Su(),FVt=Uc().textposition,qVt=Bu().overrideAll,OVt=Vs().templatedArray,qK=c1(),fUe=zVt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});fUe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var BVt=hUe.exports=qVt({_arrayAttrRegexps:[uUe.counterRegex("mapbox",".layers",!0)],domain:RVt({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:OVt("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:cUe},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:cUe}},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:fUe,textposition:uUe.extendFlat({},FVt,{arrayOk:!1})}})},"plot","from-root");BVt.uirevision={valType:"any",editType:"none"}});var BF=ye((pyr,pUe)=>{"use strict";var NVt=Wo().hovertemplateAttrs,UVt=Wo().texttemplateAttrs,VVt=Eg(),Ik=H2(),xA=Uc(),dUe=Pk(),HVt=vl(),GVt=Kl(),ew=no().extendFlat,jVt=Bu().overrideAll,WVt=Pk(),vUe=Ik.line,bA=Ik.marker;pUe.exports=jVt({lon:Ik.lon,lat:Ik.lat,cluster:{enabled:{valType:"boolean"},maxzoom:ew({},WVt.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:ew({},bA.opacity,{dflt:1})},mode:ew({},xA.mode,{dflt:"markers"}),text:ew({},xA.text,{}),texttemplate:UVt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:ew({},xA.hovertext,{}),line:{color:vUe.color,width:vUe.width},connectgaps:xA.connectgaps,marker:ew({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:bA.opacity,size:bA.size,sizeref:bA.sizeref,sizemin:bA.sizemin,sizemode:bA.sizemode},GVt("marker")),fill:Ik.fill,fillcolor:VVt(),textfont:dUe.layers.symbol.textfont,textposition:dUe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:xA.selected.marker},unselected:{marker:xA.unselected.marker},hoverinfo:ew({},HVt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:NVt()},"calc","nested")});var OK=ye((gyr,gUe)=>{"use strict";var ZVt=["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"];gUe.exports={isSupportedFont:function(e){return ZVt.indexOf(e)!==-1}}});var _Ue=ye((myr,yUe)=>{"use strict";var Dk=Mr(),BK=lu(),XVt=$p(),YVt=D0(),KVt=R0(),JVt=Ig(),mUe=BF(),$Vt=OK().isSupportedFont;yUe.exports=function(t,r,n,i){function a(g,E){return Dk.coerce(t,r,mUe,g,E)}function o(g,E){return Dk.coerce2(t,r,mUe,g,E)}var s=QVt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),BK.hasMarkers(r)){XVt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Dk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Dk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}BK.hasLines(r)&&(YVt(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,x=a("cluster.enabled",v);if(x||BK.hasText(r)){var b=i.font.family;KVt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:$Vt(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"&&JVt(t,r,n,a),Dk.coerceSelectionMarkerOpacity(r,a)};function QVt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var NK=ye((yyr,bUe)=>{"use strict";var xUe=Qa();bUe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=xUe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=xUe.tickText(o,o.c2l(s[1]),!0).text,i}});var UK=ye((_yr,TUe)=>{"use strict";var wUe=Mr();TUe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=wUe.isArrayOrTypedArray(r)?wUe.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 CUe=ye((xyr,kUe)=>{"use strict";var MUe=uo(),iv=Mr(),eHt=es().BADNUM,UF=tx(),AUe=Mu(),tHt=ao(),rHt=S3(),VF=lu(),iHt=OK().isSupportedFont,nHt=UK(),aHt=rp().appendArrayPointValue,oHt=Ll().NEWLINES,sHt=Ll().BR_TAG_ALL;kUe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=VF.hasLines(n),s=VF.hasMarkers(n),l=VF.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=NF("fill"),d=NF("line"),v=NF("circle"),x=NF("symbol"),b={fill:h,line:d,circle:v,symbol:x};if(!i)return b;var g;if((a||o)&&(g=UF.calcTraceToLineCoords(r)),a&&(h.geojson=UF.makePolygon(g),h.layout.visibility="visible",iv.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=UF.makeLine(g),d.layout.visibility="visible",iv.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var E=lHt(r);v.geojson=E.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":HK(n.cluster.color,n.cluster.step),"circle-radius":HK(n.cluster.size,n.cluster.step),"circle-opacity":HK(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":SUe(n),"text-size":12}}),iv.extendFlat(v.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=uHt(r,t),iv.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(iv.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&iv.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,iv.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var k=(n.marker||{}).size,S=nHt(n.textposition,k);iv.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":SUe(n)}),iv.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function NF(e){return{type:e,geojson:UF.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function lHt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=iv.isArrayOrTypedArray(r.color),a=iv.isArrayOrTypedArray(r.size),o=iv.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;i&&(AUe.hasColorscale(t,"marker")?c=AUe.makeColorScaleFuncFromTrace(r):c=iv.identity);var f;a&&(f=rHt(t));var h;o&&(h=function(k){var S=MUe(k)?+iv.constrain(k,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"),iHt(s)||(s=r);var l=s.split(", ");return l}});var DUe=ye((byr,IUe)=>{"use strict";var cHt=Mr(),LUe=CUe(),wA=c1().traceLayerPrefix,rg={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function PUe(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:wA+t+"-fill",line:wA+t+"-line",circle:wA+t+"-circle",symbol:wA+t+"-symbol",cluster:wA+t+"-cluster",clusterCount:wA+t+"-cluster-count"},this.below=null}var Rk=PUe.prototype;Rk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&cHt.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)};Rk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Rk.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 _=S[L];i.removeLayer(u.layerIds[_])}k||i.removeSource(u.sourceIds.circle)}function h(k){for(var S=rg.nonCluster,L=0;L=0;L--){var _=S[L];i.removeLayer(u.layerIds[_]),k||i.removeSource(u.sourceIds[_])}}function v(k){l?f(k):d(k)}function x(k){s?c(k):h(k)}function b(){for(var k=s?rg.cluster:rg.nonCluster,S=0;S=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};IUe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new PUe(t,n.uid,i,a),s=LUe(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 fHt=Nc(),GK=Mr(),hHt=oT(),dHt=GK.fillText,vHt=es().BADNUM,pHt=c1().traceLayerPrefix;function gHt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=pHt+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 x(M){var p=M.lonlat;if(p[0]===vHt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=GK.modHalf(p[0],360),T=p[1],F=s.project([P,T]),q=F.x-a.c2p([v,T]),V=F.y-o.c2p([P,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+V*V)-H,1-3/H)}if(fHt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],g=b.lonlat,E=[GK.modHalf(g[0],360)+d,g[1]],k=a.c2p(E),S=o.c2p(E),L=b.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=S-L,e.y1=S+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=hHt(i,b),e.extraText=RUe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function RUe(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)&&dHt(t,e,u),u.join("
")}zUe.exports={hoverPoints:gHt,getExtraText:RUe}});var qUe=ye((Tyr,FUe)=>{"use strict";FUe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var BUe=ye((Ayr,OUe)=>{"use strict";var mHt=Mr(),yHt=lu(),_Ht=es().BADNUM;OUe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!yHt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof jK=="object"&&typeof WK!="undefined"?WK.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(jK,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,J,ne,fe;for(J=m,fe=0;fe<8;fe++){if(ne=this.sampleCurveX(J)-m,Math.abs(ne)U)return U;for(;Ine?I=J:U=J,J=(U-I)*.5+I}return J},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,J=I*this.x+y*this.y;return this.x=U,this.y=J,this},_rotateAround:function(m,y){var I=Math.cos(m),U=Math.sin(m),J=y.x+I*(this.x-y.x)-U*(this.y-y.y),ne=y.y+U*(this.x-y.x)+I*(this.y-y.y);return this.x=J,this.y=ne,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 x(m,y,I,U){var J=new s(m,y,I,U);return function(ne){return J.solve(ne)}}var b=x(.25,.1,.25,1);function g(m,y,I){return Math.min(I,Math.max(y,m))}function E(m,y,I){var U=I-y,J=((m-y)%U+U)%U+y;return J===y?I:J}function k(m,y,I){if(!m.length)return I(null,[]);var U=m.length,J=new Array(m.length),ne=null;m.forEach(function(fe,Fe){y(fe,function(Qe,st){Qe&&(ne=Qe),J[Fe]=st,--U===0&&I(ne,J)})})}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 _(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,J=y;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 F(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 q(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 H(m,y,I){var U={};for(var J in m)U[J]=y.call(I||this,m[J],J,m);return U}function X(m,y,I){var U={};for(var J in m)y.call(I||this,m[J],J,m)&&(U[J]=m[J]);return U}function G(m){return Array.isArray(m)?m.map(G):typeof m=="object"&&m?H(m,G):m}function N(m,y){for(var I=0;I=0)return!0;return!1}var W={};function re(m){W[m]||(typeof console!="undefined"&&console.warn(m),W[m]=!0)}function ae(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,J=U-1,ne=void 0,fe=void 0;I@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(m.replace(y,function(J,ne,fe,Fe){var Qe=fe||Fe;return I[ne]=Qe?Qe.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 Te(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 Ee(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 ze(m){return decodeURIComponent(f.atob(m).split("").map(function(y){return"%"+("00"+y.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Ce=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,De=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,Ge,nt={now:Ce,frame:function(y){var I=me(y);return{cancel:function(){return De(I)}}},getImageData:function(y,I){I===void 0&&(I=0);var U=f.document.createElement("canvas"),J=U.getContext("2d");if(!J)throw new Error("failed to create canvas 2d context");return U.width=y.width,U.height=y.height,J.drawImage(y,0,0,y.width,y.height),J.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?(Ge==null&&(Ge=f.matchMedia("(prefers-reduced-motion: reduce)")),Ge.matches):!1}},ct={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},qt={supported:!1,testSupport:Ct},rt,ot=!1,Dt,kt=!1;f.document&&(Dt=f.document.createElement("img"),Dt.onload=function(){rt&&Yt(rt),rt=null,kt=!0},Dt.onerror=function(){ot=!0,rt=null},Dt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Ct(m){ot||!Dt||(kt?Yt(m):rt=m)}function Yt(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,Dt),m.isContextLost())return;qt.supported=!0}catch(I){}m.deleteTexture(y),ot=!0}var xr="01";function er(){for(var m="1",y="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",U=0;U<10;U++)I+=y[Math.floor(Math.random()*62)];var J=12*60*60*1e3,ne=[m,xr,I].join(""),fe=Date.now()+J;return{token:ne,tokenExpiresAt:fe}}var Ke=function(y,I){this._transformRequestFn=y,this._customAccessToken=I,this._createSkuToken()};Ke.prototype._createSkuToken=function(){var y=er();this._skuToken=y.token,this._skuTokenExpiresAt=y.tokenExpiresAt},Ke.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ke.prototype.transformRequest=function(y,I){return this._transformRequestFn?this._transformRequestFn(y,I)||{url:y}:{url:y}},Ke.prototype.normalizeStyleURL=function(y,I){if(!xt(y))return y;var U=Ht(y);return U.path="/styles/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Ke.prototype.normalizeGlyphsURL=function(y,I){if(!xt(y))return y;var U=Ht(y);return U.path="/fonts/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Ke.prototype.normalizeSourceURL=function(y,I){if(!xt(y))return y;var U=Ht(y);return U.path="/v4/"+U.authority+".json",U.params.push("secure"),this._makeAPIURL(U,this._customAccessToken||I)},Ke.prototype.normalizeSpriteURL=function(y,I,U,J){var ne=Ht(y);return xt(y)?(ne.path="/styles/v1"+ne.path+"/sprite"+I+U,this._makeAPIURL(ne,this._customAccessToken||J)):(ne.path+=""+I+U,$t(ne))},Ke.prototype.normalizeTileURL=function(y,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),y&&!xt(y))return y;var U=Ht(y),J=/(\.(png|jpg)\d*)(?=$)/,ne=/^.+\/v4\//,fe=nt.devicePixelRatio>=2||I===512?"@2x":"",Fe=qt.supported?".webp":"$1";U.path=U.path.replace(J,""+fe+Fe),U.path=U.path.replace(ne,"/"),U.path="/v4"+U.path;var Qe=this._customAccessToken||Et(U.params)||ct.ACCESS_TOKEN;return ct.REQUIRE_ACCESS_TOKEN&&Qe&&this._skuToken&&U.params.push("sku="+this._skuToken),this._makeAPIURL(U,Qe)},Ke.prototype.canonicalizeTileURL=function(y,I){var U="/v4/",J=/\.[\w]+$/,ne=Ht(y);if(!ne.path.match(/(^\/v4\/)/)||!ne.path.match(J))return y;var fe="mapbox://tiles/";fe+=ne.path.replace(U,"");var Fe=ne.params;return I&&(Fe=Fe.filter(function(Qe){return!Qe.match(/^access_token=/)})),Fe.length&&(fe+="?"+Fe.join("&")),fe},Ke.prototype.canonicalizeTileset=function(y,I){for(var U=I?xt(I):!1,J=[],ne=0,fe=y.tiles||[];ne=0&&y.params.splice(ne,1)}if(J.path!=="/"&&(y.path=""+J.path+y.path),!ct.REQUIRE_ACCESS_TOKEN)return $t(y);if(I=I||ct.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(fe){return fe.indexOf("access_token")===-1}),y.params.push("access_token="+I),$t(y)};function xt(m){return m.indexOf("mapbox:")===0}var bt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Lt(m){return bt.test(m)}function St(m){return m.indexOf("sku=")>0&&Lt(m)}function Et(m){for(var y=0,I=m;y=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch(J){re("Unable to write to LocalStorage")}},Br.prototype.processRequests=function(y){},Br.prototype.postEvent=function(y,I,U,J){var ne=this;if(ct.EVENTS_URL){var fe=Ht(ct.EVENTS_URL);fe.params.push("access_token="+(J||ct.ACCESS_TOKEN||""));var Fe={event:this.type,created:new Date(y).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:xr,userId:this.anonId},Qe=I?_(Fe,I):Fe,st={url:$t(fe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Qe])};this.pendingRequest=Vr(st,function(mt){ne.pendingRequest=null,U(mt),ne.saveEventData(),ne.processRequests(J)})}},Br.prototype.queueRequest=function(y,I){this.queue.push(y),this.processRequests(I)};var Or=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,J,ne,fe){this.skuToken=ne,(ct.EVENTS_URL&&fe||ct.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(Fe){return xt(Fe)||Lt(Fe)}))&&this.queueRequest({id:J,timestamp:Date.now()},fe)},y.prototype.processRequests=function(U){var J=this;if(!(this.pendingRequest||this.queue.length===0)){var ne=this.queue.shift(),fe=ne.id,Fe=ne.timestamp;fe&&this.success[fe]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=P()),this.postEvent(Fe,{skuToken:this.skuToken},function(Qe){Qe||fe&&(J.success[fe]=!0)},U))}},y}(Br),Nr=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,J){ct.EVENTS_URL&&ct.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(ne){return xt(ne)||Lt(ne)})&&this.queueRequest(Date.now(),J)},y.prototype.processRequests=function(U){var J=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ne=_r(ct.ACCESS_TOKEN),fe=ne?ne.u:ct.ACCESS_TOKEN,Fe=fe!==this.eventData.tokenU;F(this.anonId)||(this.anonId=P(),Fe=!0);var Qe=this.queue.shift();if(this.eventData.lastSuccess){var st=new Date(this.eventData.lastSuccess),mt=new Date(Qe),Xt=(Qe-this.eventData.lastSuccess)/(24*60*60*1e3);Fe=Fe||Xt>=1||Xt<-1||st.getDate()!==mt.getDate()}else Fe=!0;if(!Fe)return this.processRequests();this.postEvent(Qe,{"enabled.telemetry":!1},function(ur){ur||(J.eventData.lastSuccess=Qe,J.eventData.tokenU=fe)},U)}},y}(Br),ut=new Nr,Ne=ut.postTurnstileEvent.bind(ut),Ye=new Or,Ve=Ye.postMapLoadEvent.bind(Ye),Xe="mapbox-tiles",ht=500,Le=50,xe=1e3*60*7,Se;function lt(){f.caches&&!Se&&(Se=f.caches.open(Xe))}var Gt;function Vt(m,y){if(Gt===void 0)try{new Response(new ReadableStream),Gt=!0}catch(I){Gt=!1}Gt?y(m.body):m.blob().then(y)}function ar(m,y,I){if(lt(),!!Se){var U={status:y.status,statusText:y.statusText,headers:new f.Headers};y.headers.forEach(function(fe,Fe){return U.headers.set(Fe,fe)});var J=ge(y.headers.get("Cache-Control")||"");if(!J["no-store"]){J["max-age"]&&U.headers.set("Expires",new Date(I+J["max-age"]*1e3).toUTCString());var ne=new Date(U.headers.get("Expires")).getTime()-I;neDate.now()&&!I["no-cache"]}var ri=1/0;function bi(m){ri++,ri>Le&&(m.getActor().send("enforceCacheSizeLimit",ht),ri=0)}function nn(m){lt(),Se&&Se.then(function(y){y.keys().then(function(I){for(var U=0;U=200&&I.status<300||I.status===0)&&I.response!==null){var J=I.response;if(m.type==="json")try{J=JSON.parse(I.response)}catch(ne){return y(ne)}y(null,J,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else y(new Wn(I.statusText,I.status,m.url))},I.send(m.body),{cancel:function(){return I.abort()}}}var yr=function(m,y){if(!ft(m.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return jt(m,y);if(ke()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",m,y,void 0,I)}}return Zt(m,y)},Fr=function(m,y){return yr(_(m,{type:"json"}),y)},Zr=function(m,y){return yr(_(m,{type:"arrayBuffer"}),y)},Vr=function(m,y){return yr(_(m,{method:"POST"}),y)};function gi(m){var y=f.document.createElement("a");return y.href=m,y.protocol===f.document.location.protocol&&y.host===f.document.location.host}var Si="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Mi(m,y,I,U){var J=new f.Image,ne=f.URL;J.onload=function(){y(null,J),ne.revokeObjectURL(J.src),J.onload=null,f.requestAnimationFrame(function(){J.src=Si})},J.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 fe=new f.Blob([new Uint8Array(m)],{type:"image/png"});J.cacheControl=I,J.expires=U,J.src=m.byteLength?ne.createObjectURL(fe):Si}function Pi(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 Gi,Ki,ka=function(){Gi=[],Ki=0};ka();var jn=function(m,y){if(qt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Ki>=ct.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:m,callback:y,cancelled:!1,cancel:function(){this.cancelled=!0}};return Gi.push(I),I}Ki++;var U=!1,J=function(){if(!U)for(U=!0,Ki--;Gi.length&&Ki0||this._oneTimeListeners&&this._oneTimeListeners[y]&&this._oneTimeListeners[y].length>0||this._eventedParent&&this._eventedParent.listens(y)},Sn.prototype.setEventedParent=function(y,I){return this._eventedParent=y,this._eventedParentData=I,this};var Ha=8,oo={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"}},xn={"*":{type:"source"}},_t=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],br={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:"*"}},Hr={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:"*"}},ti={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:"*"}},zi={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"}},Yi={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"}}},an={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"}}},hi={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"}},Ji=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ua={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fn={"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"}},Sa={"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"}},go={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Oo={"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"}},ho={"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"}},Mo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zs={type:"array",value:"*"},ks={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Zs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Xs={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wl={type:"array",value:"*",minimum:1},os={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}},cl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Cs={"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"}},ml={"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"}},Ys={"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"}},Hs={"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"}},Eo={"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"}},fs={"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"}},$l={"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"}},Gu={"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"}},fc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},ms={"*":{type:"string"}},on={$version:Ha,$root:oo,sources:xn,source:_t,source_vector:br,source_raster:Hr,source_raster_dem:ti,source_geojson:zi,source_video:Yi,source_image:an,layer:hi,layout:Ji,layout_background:ua,layout_fill:Fn,layout_circle:Sa,layout_heatmap:go,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Oo,layout_symbol:ho,layout_raster:Mo,layout_hillshade:xo,filter:zs,filter_operator:ks,geometry_type:Zs,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Xs,expression:wl,light:os,paint:cl,paint_fill:Cs,"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:ml,paint_circle:Ys,paint_heatmap:Hs,paint_symbol:Eo,paint_raster:fs,paint_hillshade:$l,paint_background:Gu,transition:fc,"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:ms},fa=function(y,I,U,J){this.message=(y?y+": ":"")+U,J&&(this.identifier=J),I!=null&&I.__line__&&(this.line=I.__line__)};function Qu(m){var y=m.key,I=m.value;return I?[new fa(y,I,"constants have been deprecated as of v8")]:[]}function Il(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,J=y;U":m.itemType.kind==="value"?"array":"array<"+y+">"}else return m.kind}var mu=[Ec,Zn,ko,Co,Tl,Al,uf,Ql(So),Hc];function kc(m,y){if(y.kind==="error")return null;if(m.kind==="array"){if(y.kind==="array"&&(y.N===0&&y.itemType.kind==="value"||!kc(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=mu;I255?255:st}function J(st){return st<0?0:st>1?1:st}function ne(st){return st[st.length-1]==="%"?U(parseFloat(st)/100*255):U(parseInt(st))}function fe(st){return st[st.length-1]==="%"?J(parseFloat(st)/100):J(parseFloat(st))}function Fe(st,mt,Xt){return Xt<0?Xt+=1:Xt>1&&(Xt-=1),Xt*6<1?st+(mt-st)*Xt*6:Xt*2<1?mt:Xt*3<2?st+(mt-st)*(2/3-Xt)*6:st}function Qe(st){var mt=st.replace(/ /g,"").toLowerCase();if(mt in I)return I[mt].slice();if(mt[0]==="#"){if(mt.length===4){var Xt=parseInt(mt.substr(1),16);return Xt>=0&&Xt<=4095?[(Xt&3840)>>4|(Xt&3840)>>8,Xt&240|(Xt&240)>>4,Xt&15|(Xt&15)<<4,1]:null}else if(mt.length===7){var Xt=parseInt(mt.substr(1),16);return Xt>=0&&Xt<=16777215?[(Xt&16711680)>>16,(Xt&65280)>>8,Xt&255,1]:null}return null}var ur=mt.indexOf("("),nr=mt.indexOf(")");if(ur!==-1&&nr+1===mt.length){var Lr=mt.substr(0,ur),Yr=mt.substr(ur+1,nr-(ur+1)).split(","),_i=1;switch(Lr){case"rgba":if(Yr.length!==4)return null;_i=fe(Yr.pop());case"rgb":return Yr.length!==3?null:[ne(Yr[0]),ne(Yr[1]),ne(Yr[2]),_i];case"hsla":if(Yr.length!==4)return null;_i=fe(Yr.pop());case"hsl":if(Yr.length!==3)return null;var si=(parseFloat(Yr[0])%360+360)%360/360,Hi=fe(Yr[1]),Ei=fe(Yr[2]),Vi=Ei<=.5?Ei*(Hi+1):Ei+Hi-Ei*Hi,en=Ei*2-Vi;return[U(Fe(en,Vi,si+1/3)*255),U(Fe(en,Vi,si)*255),U(Fe(en,Vi,si-1/3)*255),_i];default:return null}}return null}try{y.parseCSSColor=Qe}catch(st){}}),Bf=vd.parseCSSColor,ss=function(y,I,U,J){J===void 0&&(J=1),this.r=y,this.g=I,this.b=U,this.a=J};ss.parse=function(y){if(y){if(y instanceof ss)return y;if(typeof y=="string"){var I=Bf(y);if(I)return new ss(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},ss.prototype.toString=function(){var y=this.toArray(),I=y[0],U=y[1],J=y[2],ne=y[3];return"rgba("+Math.round(I)+","+Math.round(U)+","+Math.round(J)+","+ne+")"},ss.prototype.toArray=function(){var y=this,I=y.r,U=y.g,J=y.b,ne=y.a;return ne===0?[0,0,0,0]:[I*255/ne,U*255/ne,J*255/ne,ne]},ss.black=new ss(0,0,0,1),ss.white=new ss(1,1,1,1),ss.transparent=new ss(0,0,0,0),ss.red=new ss(1,0,0,1);var ff=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"})};ff.prototype.compare=function(y,I){return this.collator.compare(y,I)},ff.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ih=function(y,I,U,J,ne){this.text=y,this.image=I,this.scale=U,this.fontStack=J,this.textColor=ne},Ul=function(y){this.sections=y};Ul.fromString=function(y){return new Ul([new ih(y,null,null,null,null)])},Ul.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})},Ul.factory=function(y){return y instanceof Ul?y:Ul.fromString(y)},Ul.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(y){return y.text}).join("")},Ul.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 J=typeof U=="number"?[m,y,I,U]:[m,y,I];return"Invalid rgba value ["+J.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 Cc(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 ss)return!0;if(m instanceof ff)return!0;if(m instanceof Ul)return!0;if(m instanceof Js)return!0;if(Array.isArray(m)){for(var y=0,I=m;y2){var Fe=y[1];if(typeof Fe!="string"||!(Fe in dc)||Fe==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);fe=dc[Fe],U++}else fe=So;var Qe;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);Qe=y[2],U++}J=Ql(fe,Qe)}else J=dc[ne];for(var st=[];U1)&&I.push(J)}}return I.concat(this.args.map(function(ne){return ne.serialize()}))};var ec=function(y){this.type=Al,this.sections=y};ec.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 J=[],ne=!1,fe=1;fe<=y.length-1;++fe){var Fe=y[fe];if(ne&&typeof Fe=="object"&&!Array.isArray(Fe)){ne=!1;var Qe=null;if(Fe["font-scale"]&&(Qe=I.parse(Fe["font-scale"],1,Zn),!Qe))return null;var st=null;if(Fe["text-font"]&&(st=I.parse(Fe["text-font"],1,Ql(ko)),!st))return null;var mt=null;if(Fe["text-color"]&&(mt=I.parse(Fe["text-color"],1,Tl),!mt))return null;var Xt=J[J.length-1];Xt.scale=Qe,Xt.font=st,Xt.textColor=mt}else{var ur=I.parse(y[fe],1,So);if(!ur)return null;var nr=ur.type.kind;if(nr!=="string"&&nr!=="value"&&nr!=="null"&&nr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ne=!0,J.push({content:ur,scale:null,font:null,textColor:null})}}return new ec(J)},ec.prototype.evaluate=function(y){var I=function(U){var J=U.content.evaluate(y);return ws(J)===Hc?new ih("",J,null,null,null):new ih($s(J),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 Ul(this.sections.map(I))},ec.prototype.eachChild=function(y){for(var I=0,U=this.sections;I-1),U},Ps.prototype.eachChild=function(y){y(this.input)},Ps.prototype.outputDefined=function(){return!1},Ps.prototype.serialize=function(){return["image",this.input.serialize()]};var ov={"to-boolean":Co,"to-color":Tl,"to-number":Zn,"to-string":ko},wo=function(y,I){this.type=y,this.args=I};wo.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 J=ov[U],ne=[],fe=1;fe4?U="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":U=hc(I[0],I[1],I[2],I[3]),!U))return new ss(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new Ms(U||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var Qe=null,st=0,mt=this.args;st=y[2]||m[1]<=y[1]||m[3]>=y[3])}function Yh(m,y){var I=jc(m[0]),U=kf(m[1]),J=Math.pow(2,y.z);return[Math.round(I*J*uu),Math.round(U*J*uu)]}function Eh(m,y,I){var U=m[0]-y[0],J=m[1]-y[1],ne=m[0]-I[0],fe=m[1]-I[1];return U*fe-ne*J===0&&U*ne<=0&&J*fe<=0}function nh(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 hf(m,y){for(var I=!1,U=0,J=y.length;U0&&Xt<0||mt<0&&Xt>0}function ah(m,y,I,U){var J=[y[0]-m[0],y[1]-m[1]],ne=[U[0]-I[0],U[1]-I[1]];return Kh(ne,J)===0?!1:!!(rc(m,y,I,U)&&rc(I,U,m,y))}function Wc(m,y,I){for(var U=0,J=I;UI[2]){var J=U*.5,ne=m[0]-I[0]>J?-U:I[0]-m[0]>J?U:0;ne===0&&(ne=m[0]-I[2]>J?-U:I[2]-m[0]>J?U:0),m[0]+=ne}Mh(y,m)}function Ch(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Bd(m,y,I,U){for(var J=Math.pow(2,U.z)*uu,ne=[U.x*uu,U.y*uu],fe=[],Fe=0,Qe=m;Fe=0)return!1;var I=!0;return m.eachChild(function(U){I&&!Pu(U,y)&&(I=!1)}),I}var Lc=function(y,I){this.type=I.type,this.name=y,this.boundExpression=I};Lc.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 Lc(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)},Lc.prototype.evaluate=function(y){return this.boundExpression.evaluate(y)},Lc.prototype.eachChild=function(){},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return["var",this.name]};var fl=function(y,I,U,J,ne){I===void 0&&(I=[]),J===void 0&&(J=new Zl),ne===void 0&&(ne=[]),this.registry=y,this.path=I,this.key=I.map(function(fe){return"["+fe+"]"}).join(""),this.scope=J,this.errors=ne,this.expectedType=U};fl.prototype.parse=function(y,I,U,J,ne){return ne===void 0&&(ne={}),I?this.concat(I,U,J)._parse(y,ne):this._parse(y,ne)},fl.prototype._parse=function(y,I){(y===null||typeof y=="string"||typeof y=="boolean"||typeof y=="number")&&(y=["literal",y]);function U(mt,Xt,ur){return ur==="assert"?new Sl(Xt,[mt]):ur==="coerce"?new wo(Xt,[mt]):mt}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 J=y[0];if(typeof J!="string")return this.error("Expression name must be a string, but found "+typeof J+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ne=this.registry[J];if(ne){var fe=ne.parse(y,this);if(!fe)return null;if(this.expectedType){var Fe=this.expectedType,Qe=fe.type;if((Fe.kind==="string"||Fe.kind==="number"||Fe.kind==="boolean"||Fe.kind==="object"||Fe.kind==="array")&&Qe.kind==="value")fe=U(fe,Fe,I.typeAnnotation||"assert");else if((Fe.kind==="color"||Fe.kind==="formatted"||Fe.kind==="resolvedImage")&&(Qe.kind==="value"||Qe.kind==="string"))fe=U(fe,Fe,I.typeAnnotation||"coerce");else if(this.checkSubtype(Fe,Qe))return null}if(!(fe instanceof hs)&&fe.type.kind!=="resolvedImage"&&Xc(fe)){var st=new $o;try{fe=new hs(fe.type,fe.evaluate(st))}catch(mt){return this.error(mt.message),null}}return fe}return this.error('Unknown expression "'+J+'". 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.")},fl.prototype.concat=function(y,I,U){var J=typeof y=="number"?this.path.concat(y):this.path,ne=U?this.scope.concat(U):this.scope;return new fl(this.registry,J,I||null,ne,this.errors)},fl.prototype.error=function(y){for(var I=[],U=arguments.length-1;U-- >0;)I[U]=arguments[U+1];var J=""+this.key+I.map(function(ne){return"["+ne+"]"}).join("");this.errors.push(new Ks(J,y))},fl.prototype.checkSubtype=function(y,I){var U=kc(y,I);return U&&this.error(U),U};function Xc(m){if(m instanceof Lc)return Xc(m.boundExpression);if(m instanceof Ja&&m.name==="error")return!1;if(m instanceof tc)return!1;if(m instanceof Lu)return!1;var y=m instanceof wo||m instanceof Sl,I=!0;return m.eachChild(function(U){y?I=I&&Xc(U):I=I&&U instanceof hs}),I?$h(m)&&Pu(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function ic(m,y){for(var I=m.length-1,U=0,J=I,ne=0,fe,Fe;U<=J;)if(ne=Math.floor((U+J)/2),fe=m[ne],Fe=m[ne+1],fe<=y){if(ne===I||yy)J=ne-1;else throw new Ms("Input is not a number.");return 0}var yu=function(y,I,U){this.type=y,this.input=I,this.labels=[],this.outputs=[];for(var J=0,ne=U;J=Fe)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',st);var Xt=I.parse(Qe,mt,ne);if(!Xt)return null;ne=ne||Xt.type,J.push([Fe,Xt])}return new yu(ne,U,J)},yu.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var J=this.input.evaluate(y);if(J<=I[0])return U[0].evaluate(y);var ne=I.length;if(J>=I[ne-1])return U[ne-1].evaluate(y);var fe=ic(I,J);return U[fe].evaluate(y)},yu.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 Qs(m,y,I){return m*(1-I)+y*I}function Qh(m,y,I){return new ss(Qs(m.r,y.r,I),Qs(m.g,y.g,I),Qs(m.b,y.b,I),Qs(m.a,y.a,I))}function gd(m,y,I){return m.map(function(U,J){return Qs(U,y[J],I)})}var ju=Object.freeze({__proto__:null,number:Qs,color:Qh,array:gd}),Pc=.95047,vc=1,sv=1.08883,Lf=4/29,Uf=6/29,Iu=3*Uf*Uf,oh=Uf*Uf*Uf,tu=Math.PI/180,vf=180/Math.PI;function md(m){return m>oh?Math.pow(m,1/3):m/Iu+Lf}function sh(m){return m>Uf?m*m*m:Iu*(m-Lf)}function Fs(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function _u(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function xu(m){var y=_u(m.r),I=_u(m.g),U=_u(m.b),J=md((.4124564*y+.3575761*I+.1804375*U)/Pc),ne=md((.2126729*y+.7151522*I+.072175*U)/vc),fe=md((.0193339*y+.119192*I+.9503041*U)/sv);return{l:116*ne-16,a:500*(J-ne),b:200*(ne-fe),alpha:m.a}}function Lh(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=vc*sh(y),I=Pc*sh(I),U=sv*sh(U),new ss(Fs(3.2404542*I-1.5371385*y-.4985314*U),Fs(-.969266*I+1.8760108*y+.041556*U),Fs(.0556434*I-.2040259*y+1.0572252*U),m.alpha)}function Is(m,y,I){return{l:Qs(m.l,y.l,I),a:Qs(m.a,y.a,I),b:Qs(m.b,y.b,I),alpha:Qs(m.alpha,y.alpha,I)}}function Pf(m){var y=xu(m),I=y.l,U=y.a,J=y.b,ne=Math.atan2(J,U)*vf;return{h:ne<0?ne+360:ne,c:Math.sqrt(U*U+J*J),l:I,alpha:m.a}}function Ic(m){var y=m.h*tu,I=m.c,U=m.l;return Lh({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 Vf(m,y,I){return{h:Wu(m.h,y.h,I),c:Qs(m.c,y.c,I),l:Qs(m.l,y.l,I),alpha:Qs(m.alpha,y.alpha,I)}}var pc={forward:xu,reverse:Lh,interpolate:Is},pf={forward:Pf,reverse:Ic,interpolate:Vf},Ph=Object.freeze({__proto__:null,lab:pc,hcl:pf}),Dl=function(y,I,U,J,ne){this.type=y,this.operator=I,this.interpolation=U,this.input=J,this.labels=[],this.outputs=[];for(var fe=0,Fe=ne;fe1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);J={name:"cubic-bezier",controlPoints:Qe}}else return I.error("Unknown interpolation type "+String(J[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(ne=I.parse(ne,2,Zn),!ne)return null;var st=[],mt=null;U==="interpolate-hcl"||U==="interpolate-lab"?mt=Tl:I.expectedType&&I.expectedType.kind!=="value"&&(mt=I.expectedType);for(var Xt=0;Xt=ur)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Lr);var _i=I.parse(nr,Yr,mt);if(!_i)return null;mt=mt||_i.type,st.push([ur,_i])}return mt.kind!=="number"&&mt.kind!=="color"&&!(mt.kind==="array"&&mt.itemType.kind==="number"&&typeof mt.N=="number")?I.error("Type "+Ls(mt)+" is not interpolatable."):new Dl(mt,U,J,ne,st)},Dl.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var J=this.input.evaluate(y);if(J<=I[0])return U[0].evaluate(y);var ne=I.length;if(J>=I[ne-1])return U[ne-1].evaluate(y);var fe=ic(I,J),Fe=I[fe],Qe=I[fe+1],st=Dl.interpolationFactor(this.interpolation,J,Fe,Qe),mt=U[fe].evaluate(y),Xt=U[fe+1].evaluate(y);return this.operator==="interpolate"?ju[this.type.kind.toLowerCase()](mt,Xt,st):this.operator==="interpolate-hcl"?pf.reverse(pf.interpolate(pf.forward(mt),pf.forward(Xt),st)):pc.reverse(pc.interpolate(pc.forward(mt),pc.forward(Xt),st))},Dl.prototype.eachChild=function(y){y(this.input);for(var I=0,U=this.outputs;I=U.length)throw new Ms("Array index out of bounds: "+I+" > "+(U.length-1)+".");if(I!==Math.floor(I))throw new Ms("Array index must be an integer, but found "+I+" instead.");return U[I]},gc.prototype.eachChild=function(y){y(this.index),y(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var hl=function(y,I){this.type=Co,this.needle=y,this.haystack=I};hl.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,So),J=I.parse(y[2],2,So);return!U||!J?null:Of(U.type,[Co,ko,Zn,Ec,So])?new hl(U,J):I.error("Expected first argument to be of type boolean, string, number or null, but found "+Ls(U.type)+" instead")},hl.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!U)return!1;if(!Gc(I,["boolean","string","number","null"]))throw new Ms("Expected first argument to be of type boolean, string, number or null, but found "+Ls(ws(I))+" instead.");if(!Gc(U,["string","array"]))throw new Ms("Expected second argument to be of type array or string, but found "+Ls(ws(U))+" instead.");return U.indexOf(I)>=0},hl.prototype.eachChild=function(y){y(this.needle),y(this.haystack)},hl.prototype.outputDefined=function(){return!0},hl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ru=function(y,I,U){this.type=Zn,this.needle=y,this.haystack=I,this.fromIndex=U};ru.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,So),J=I.parse(y[2],2,So);if(!U||!J)return null;if(!Of(U.type,[Co,ko,Zn,Ec,So]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+Ls(U.type)+" instead");if(y.length===4){var ne=I.parse(y[3],3,Zn);return ne?new ru(U,J,ne):null}else return new ru(U,J)},ru.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!Gc(I,["boolean","string","number","null"]))throw new Ms("Expected first argument to be of type boolean, string, number or null, but found "+Ls(ws(I))+" instead.");if(!Gc(U,["string","array"]))throw new Ms("Expected second argument to be of type array or string, but found "+Ls(ws(U))+" instead.");if(this.fromIndex){var J=this.fromIndex.evaluate(y);return U.indexOf(I,J)}return U.indexOf(I)},ru.prototype.eachChild=function(y){y(this.needle),y(this.haystack),this.fromIndex&&y(this.fromIndex)},ru.prototype.outputDefined=function(){return!1},ru.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 mc=function(y,I,U,J,ne,fe){this.inputType=y,this.type=I,this.input=U,this.cases=J,this.outputs=ne,this.otherwise=fe};mc.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,J;I.expectedType&&I.expectedType.kind!=="value"&&(J=I.expectedType);for(var ne={},fe=[],Fe=2;FeNumber.MAX_SAFE_INTEGER)return mt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof nr=="number"&&Math.floor(nr)!==nr)return mt.error("Numeric branch labels must be integer values.");if(!U)U=ws(nr);else if(mt.checkSubtype(U,ws(nr)))return null;if(typeof ne[String(nr)]!="undefined")return mt.error("Branch labels must be unique.");ne[String(nr)]=fe.length}var Lr=I.parse(st,Fe,J);if(!Lr)return null;J=J||Lr.type,fe.push(Lr)}var Yr=I.parse(y[1],1,So);if(!Yr)return null;var _i=I.parse(y[y.length-1],y.length-1,J);return!_i||Yr.type.kind!=="value"&&I.concat(1).checkSubtype(U,Yr.type)?null:new mc(U,J,Yr,ne,fe,_i)},mc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=ws(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return U.evaluate(y)},mc.prototype.eachChild=function(y){y(this.input),this.outputs.forEach(y),y(this.otherwise)},mc.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})&&this.otherwise.outputDefined()},mc.prototype.serialize=function(){for(var y=this,I=["match",this.input.serialize()],U=Object.keys(this.cases).sort(),J=[],ne={},fe=0,Fe=U;fe=5)return I.error("Expected 3 or 4 arguments, but found "+(y.length-1)+" instead.");var U=I.parse(y[1],1,So),J=I.parse(y[2],2,Zn);if(!U||!J)return null;if(!Of(U.type,[Ql(So),ko,So]))return I.error("Expected first argument to be of type array or string, but found "+Ls(U.type)+" instead");if(y.length===4){var ne=I.parse(y[3],3,Zn);return ne?new nc(U.type,U,J,ne):null}else return new nc(U.type,U,J)},nc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=this.beginIndex.evaluate(y);if(!Gc(I,["string","array"]))throw new Ms("Expected first argument to be of type array or string, but found "+Ls(ws(I))+" instead.");if(this.endIndex){var J=this.endIndex.evaluate(y);return I.slice(U,J)}return I.slice(U)},nc.prototype.eachChild=function(y){y(this.input),y(this.beginIndex),this.endIndex&&y(this.endIndex)},nc.prototype.outputDefined=function(){return!1},nc.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 gf(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 gt(m,y,I){return y===I}function Bt(m,y,I){return y!==I}function wr(m,y,I){return yI}function Ur(m,y,I){return y<=I}function fi(m,y,I){return y>=I}function xi(m,y,I,U){return U.compare(y,I)===0}function Fi(m,y,I,U){return!xi(m,y,I,U)}function Xi(m,y,I,U){return U.compare(y,I)<0}function hn(m,y,I,U){return U.compare(y,I)>0}function Ti(m,y,I,U){return U.compare(y,I)<=0}function qi(m,y,I,U){return U.compare(y,I)>=0}function Ii(m,y,I){var U=m!=="=="&&m!=="!=";return function(){function J(ne,fe,Fe){this.type=Co,this.lhs=ne,this.rhs=fe,this.collator=Fe,this.hasUntypedArgument=ne.type.kind==="value"||fe.type.kind==="value"}return J.parse=function(fe,Fe){if(fe.length!==3&&fe.length!==4)return Fe.error("Expected two or three arguments.");var Qe=fe[0],st=Fe.parse(fe[1],1,So);if(!st)return null;if(!gf(Qe,st.type))return Fe.concat(1).error('"'+Qe+`" comparisons are not supported for type '`+Ls(st.type)+"'.");var mt=Fe.parse(fe[2],2,So);if(!mt)return null;if(!gf(Qe,mt.type))return Fe.concat(2).error('"'+Qe+`" comparisons are not supported for type '`+Ls(mt.type)+"'.");if(st.type.kind!==mt.type.kind&&st.type.kind!=="value"&&mt.type.kind!=="value")return Fe.error("Cannot compare types '"+Ls(st.type)+"' and '"+Ls(mt.type)+"'.");U&&(st.type.kind==="value"&&mt.type.kind!=="value"?st=new Sl(mt.type,[st]):st.type.kind!=="value"&&mt.type.kind==="value"&&(mt=new Sl(st.type,[mt])));var Xt=null;if(fe.length===4){if(st.type.kind!=="string"&&mt.type.kind!=="string"&&st.type.kind!=="value"&&mt.type.kind!=="value")return Fe.error("Cannot use collator to compare non-string types.");if(Xt=Fe.parse(fe[3],3,rh),!Xt)return null}return new J(st,mt,Xt)},J.prototype.evaluate=function(fe){var Fe=this.lhs.evaluate(fe),Qe=this.rhs.evaluate(fe);if(U&&this.hasUntypedArgument){var st=ws(Fe),mt=ws(Qe);if(st.kind!==mt.kind||!(st.kind==="string"||st.kind==="number"))throw new Ms('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+st.kind+", "+mt.kind+") instead.")}if(this.collator&&!U&&this.hasUntypedArgument){var Xt=ws(Fe),ur=ws(Qe);if(Xt.kind!=="string"||ur.kind!=="string")return y(fe,Fe,Qe)}return this.collator?I(fe,Fe,Qe,this.collator.evaluate(fe)):y(fe,Fe,Qe)},J.prototype.eachChild=function(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)},J.prototype.outputDefined=function(){return!0},J.prototype.serialize=function(){var fe=[m];return this.eachChild(function(Fe){fe.push(Fe.serialize())}),fe},J}()}var mi=Ii("==",gt,xi),Pn=Ii("!=",Bt,Fi),Ma=Ii("<",wr,Xi),Ta=Ii(">",vr,hn),Ea=Ii("<=",Ur,Ti),qa=Ii(">=",fi,qi),Cn=function(y,I,U,J,ne){this.type=ko,this.number=y,this.locale=I,this.currency=U,this.minFractionDigits=J,this.maxFractionDigits=ne};Cn.parse=function(y,I){if(y.length!==3)return I.error("Expected two arguments.");var U=I.parse(y[1],1,Zn);if(!U)return null;var J=y[2];if(typeof J!="object"||Array.isArray(J))return I.error("NumberFormat options argument must be an object.");var ne=null;if(J.locale&&(ne=I.parse(J.locale,1,ko),!ne))return null;var fe=null;if(J.currency&&(fe=I.parse(J.currency,1,ko),!fe))return null;var Fe=null;if(J["min-fraction-digits"]&&(Fe=I.parse(J["min-fraction-digits"],1,Zn),!Fe))return null;var Qe=null;return J["max-fraction-digits"]&&(Qe=I.parse(J["max-fraction-digits"],1,Zn),!Qe)?null:new Cn(U,ne,fe,Fe,Qe)},Cn.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))},Cn.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)},Cn.prototype.outputDefined=function(){return!1},Cn.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 sn=function(y){this.type=Zn,this.input=y};sn.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 "+Ls(U.type)+" instead."):new sn(U):null},sn.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 Ms("Expected value to be of type string or array, but found "+Ls(ws(I))+" instead.")},sn.prototype.eachChild=function(y){y(this.input)},sn.prototype.outputDefined=function(){return!1},sn.prototype.serialize=function(){var y=["length"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Ua={"==":mi,"!=":Pn,">":Ta,"<":Ma,">=":qa,"<=":Ea,array:Sl,at:gc,boolean:Sl,case:Yc,coalesce:Zu,collator:tc,format:ec,image:Ps,in:hl,"index-of":ru,interpolate:Dl,"interpolate-hcl":Dl,"interpolate-lab":Dl,length:sn,let:Dc,literal:hs,match:mc,number:Sl,"number-format":Cn,object:Sl,slice:nc,step:yu,string:Sl,"to-boolean":wo,"to-color":wo,"to-number":wo,"to-string":wo,var:Lc,within:Lu};function mo(m,y){var I=y[0],U=y[1],J=y[2],ne=y[3];I=I.evaluate(m),U=U.evaluate(m),J=J.evaluate(m);var fe=ne?ne.evaluate(m):1,Fe=hc(I,U,J,fe);if(Fe)throw new Ms(Fe);return new ss(I/255*fe,U/255*fe,J/255*fe,fe)}function Xo(m,y){return m in y}function Ts(m,y){var I=y[m];return typeof I=="undefined"?null:I}function Qo(m,y,I,U){for(;I<=U;){var J=I+U>>1;if(y[J]===m)return!0;y[J]>m?U=J-1:I=J+1}return!1}function ys(m){return{type:m}}Ja.register(Ua,{error:[cf,[ko],function(m,y){var I=y[0];throw new Ms(I.evaluate(m))}],typeof:[ko,[So],function(m,y){var I=y[0];return Ls(ws(I.evaluate(m)))}],"to-rgba":[Ql(Zn,4),[Tl],function(m,y){var I=y[0];return I.evaluate(m).toArray()}],rgb:[Tl,[Zn,Zn,Zn],mo],rgba:[Tl,[Zn,Zn,Zn,Zn],mo],has:{type:Co,overloads:[[[ko],function(m,y){var I=y[0];return Xo(I.evaluate(m),m.properties())}],[[ko,uf],function(m,y){var I=y[0],U=y[1];return Xo(I.evaluate(m),U.evaluate(m))}]]},get:{type:So,overloads:[[[ko],function(m,y){var I=y[0];return Ts(I.evaluate(m),m.properties())}],[[ko,uf],function(m,y){var I=y[0],U=y[1];return Ts(I.evaluate(m),U.evaluate(m))}]]},"feature-state":[So,[ko],function(m,y){var I=y[0];return Ts(I.evaluate(m),m.featureState||{})}],properties:[uf,[],function(m){return m.properties()}],"geometry-type":[ko,[],function(m){return m.geometryType()}],id:[So,[],function(m){return m.id()}],zoom:[Zn,[],function(m){return m.globals.zoom}],"heatmap-density":[Zn,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[Zn,[],function(m){return m.globals.lineProgress||0}],accumulated:[So,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[Zn,ys(Zn),function(m,y){for(var I=0,U=0,J=y;U":[Co,[ko,So],function(m,y){var I=y[0],U=y[1],J=m.properties()[I.value],ne=U.value;return typeof J==typeof ne&&J>ne}],"filter-id->":[Co,[So],function(m,y){var I=y[0],U=m.id(),J=I.value;return typeof U==typeof J&&U>J}],"filter-<=":[Co,[ko,So],function(m,y){var I=y[0],U=y[1],J=m.properties()[I.value],ne=U.value;return typeof J==typeof ne&&J<=ne}],"filter-id-<=":[Co,[So],function(m,y){var I=y[0],U=m.id(),J=I.value;return typeof U==typeof J&&U<=J}],"filter->=":[Co,[ko,So],function(m,y){var I=y[0],U=y[1],J=m.properties()[I.value],ne=U.value;return typeof J==typeof ne&&J>=ne}],"filter-id->=":[Co,[So],function(m,y){var I=y[0],U=m.id(),J=I.value;return typeof U==typeof J&&U>=J}],"filter-has":[Co,[So],function(m,y){var I=y[0];return I.value in m.properties()}],"filter-has-id":[Co,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[Co,[Ql(ko)],function(m,y){var I=y[0];return I.value.indexOf(m.geometryType())>=0}],"filter-id-in":[Co,[Ql(So)],function(m,y){var I=y[0];return I.value.indexOf(m.id())>=0}],"filter-in-small":[Co,[ko,Ql(So)],function(m,y){var I=y[0],U=y[1];return U.value.indexOf(m.properties()[I.value])>=0}],"filter-in-large":[Co,[ko,Ql(So)],function(m,y){var I=y[0],U=y[1];return Qo(m.properties()[I.value],U.value,0,U.value.length-1)}],all:{type:Co,overloads:[[[Co,Co],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)&&U.evaluate(m)}],[ys(Co),function(m,y){for(var I=0,U=y;I-1}function ia(m){return!!m.expression&&m.expression.interpolated}function Ka(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function vs(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Ko(m){return m}function iu(m,y){var I=y.type==="color",U=m.stops&&typeof m.stops[0][0]=="object",J=U||m.property!==void 0,ne=U||!J,fe=m.type||(ia(y)?"exponential":"interval");if(I&&(m=Il({},m),m.stops&&(m.stops=m.stops.map(function($n){return[$n[0],ss.parse($n[1])]})),m.default?m.default=ss.parse(m.default):m.default=ss.parse(y.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Ph[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Fe,Qe,st;if(fe==="exponential")Fe=bu;else if(fe==="interval")Fe=mf;else if(fe==="categorical"){Fe=ac,Qe=Object.create(null);for(var mt=0,Xt=m.stops;mt=m.stops[U-1][0])return m.stops[U-1][1];var J=ic(m.stops.map(function(ne){return ne[0]}),I);return m.stops[J][1]}function bu(m,y,I){var U=m.base!==void 0?m.base:1;if(Ka(I)!=="number")return Du(m.default,y.default);var J=m.stops.length;if(J===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[J-1][0])return m.stops[J-1][1];var ne=ic(m.stops.map(function(Xt){return Xt[0]}),I),fe=Ru(I,U,m.stops[ne][0],m.stops[ne+1][0]),Fe=m.stops[ne][1],Qe=m.stops[ne+1][1],st=ju[y.type]||Ko;if(m.colorSpace&&m.colorSpace!=="rgb"){var mt=Ph[m.colorSpace];st=function(Xt,ur){return mt.reverse(mt.interpolate(mt.forward(Xt),mt.forward(ur),fe))}}return typeof Fe.evaluate=="function"?{evaluate:function(){for(var ur=[],nr=arguments.length;nr--;)ur[nr]=arguments[nr];var Lr=Fe.evaluate.apply(void 0,ur),Yr=Qe.evaluate.apply(void 0,ur);if(!(Lr===void 0||Yr===void 0))return st(Lr,Yr,fe)}}:st(Fe,Qe,fe)}function Kc(m,y,I){return y.type==="color"?I=ss.parse(I):y.type==="formatted"?I=Ul.fromString(I.toString()):y.type==="resolvedImage"?I=Js.fromString(I.toString()):Ka(I)!==y.type&&(y.type!=="enum"||!y.values[I])&&(I=void 0),Du(I,m.default,y.default)}function Ru(m,y,I,U){var J=U-I,ne=m-I;return J===0?0:y===1?ne/J:(Math.pow(y,ne)-1)/(Math.pow(y,J)-1)}var Rc=function(y,I){this.expression=y,this._warningHistory={},this._evaluator=new $o,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Rc.prototype.evaluateWithoutErrorHandling=function(y,I,U,J,ne,fe){return this._evaluator.globals=y,this._evaluator.feature=I,this._evaluator.featureState=U,this._evaluator.canonical=J,this._evaluator.availableImages=ne||null,this._evaluator.formattedSection=fe,this.expression.evaluate(this._evaluator)},Rc.prototype.evaluate=function(y,I,U,J,ne,fe){this._evaluator.globals=y,this._evaluator.feature=I||null,this._evaluator.featureState=U||null,this._evaluator.canonical=J,this._evaluator.availableImages=ne||null,this._evaluator.formattedSection=fe||null;try{var Fe=this.expression.evaluate(this._evaluator);if(Fe==null||typeof Fe=="number"&&Fe!==Fe)return this._defaultValue;if(this._enumValues&&!(Fe in this._enumValues))throw new Ms("Expected value to be one of "+Object.keys(this._enumValues).map(function(Qe){return JSON.stringify(Qe)}).join(", ")+", but found "+JSON.stringify(Fe)+" instead.");return Fe}catch(Qe){return this._warningHistory[Qe.message]||(this._warningHistory[Qe.message]=!0,typeof console!="undefined"&&console.warn(Qe.message)),this._defaultValue}};function Ra(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Ua}function eo(m,y){var I=new fl(Ua,[],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?Bo(new Rc(U,y)):yl(I.errors)}var Jc=function(y,I){this.kind=y,this._styleExpression=I,this.isStateDependent=y!=="constant"&&!eu(I.expression)};Jc.prototype.evaluateWithoutErrorHandling=function(y,I,U,J,ne,fe){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,J,ne,fe)},Jc.prototype.evaluate=function(y,I,U,J,ne,fe){return this._styleExpression.evaluate(y,I,U,J,ne,fe)};var yc=function(y,I,U,J){this.kind=y,this.zoomStops=U,this._styleExpression=I,this.isStateDependent=y!=="camera"&&!eu(I.expression),this.interpolationType=J};yc.prototype.evaluateWithoutErrorHandling=function(y,I,U,J,ne,fe){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,J,ne,fe)},yc.prototype.evaluate=function(y,I,U,J,ne,fe){return this._styleExpression.evaluate(y,I,U,J,ne,fe)},yc.prototype.interpolationFactor=function(y,I,U){return this.interpolationType?Dl.interpolationFactor(this.interpolationType,y,I,U):0};function _c(m,y){if(m=eo(m,y),m.result==="error")return m;var I=m.value.expression,U=$h(I);if(!U&&!Gs(y))return yl([new Ks("","data expressions not supported")]);var J=Pu(I,["zoom"]);if(!J&&!Ds(y))return yl([new Ks("","zoom expressions not supported")]);var ne=B(I);if(!ne&&!J)return yl([new Ks("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ne instanceof Ks)return yl([ne]);if(ne instanceof Dl&&!ia(y))return yl([new Ks("",'"interpolate" expressions cannot be used with this property')]);if(!ne)return Bo(U?new Jc("constant",m.value):new Jc("source",m.value));var fe=ne instanceof Dl?ne.interpolation:void 0;return Bo(U?new yc("camera",m.value,ne.labels,fe):new yc("composite",m.value,ne.labels,fe))}var le=function(y,I){this._parameters=y,this._specification=I,Il(this,iu(this._parameters,this._specification))};le.deserialize=function(y){return new le(y._parameters,y._specification)},le.serialize=function(y){return{_parameters:y._parameters,_specification:y._specification}};function w(m,y){if(vs(m))return new le(m,y);if(Ra(m)){var I=_c(m,y);if(I.result==="error")throw new Error(I.value.map(function(J){return J.key+": "+J.message}).join(", "));return I.value}else{var U=m;return typeof m=="string"&&y.type==="color"&&(U=ss.parse(m)),{kind:"constant",evaluate:function(){return U}}}}function B(m){var y=null;if(m instanceof Dc)y=B(m.result);else if(m instanceof Zu)for(var I=0,U=m.args;IU.maximum?[new fa(y,I,I+" is greater than the maximum value "+U.maximum)]:[]}function it(m){var y=m.valueSpec,I=vo(m.value.type),U,J={},ne,fe,Fe=I!=="categorical"&&m.value.property===void 0,Qe=!Fe,st=Ka(m.value.stops)==="array"&&Ka(m.value.stops[0])==="array"&&Ka(m.value.stops[0][0])==="object",mt=se({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Xt,default:Lr}});return I==="identity"&&Fe&&mt.push(new fa(m.key,m.value,'missing required property "property"')),I!=="identity"&&!m.value.stops&&mt.push(new fa(m.key,m.value,'missing required property "stops"')),I==="exponential"&&m.valueSpec.expression&&!ia(m.valueSpec)&&mt.push(new fa(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Qe&&!Gs(m.valueSpec)?mt.push(new fa(m.key,m.value,"property functions not supported")):Fe&&!Ds(m.valueSpec)&&mt.push(new fa(m.key,m.value,"zoom functions not supported"))),(I==="categorical"||st)&&m.value.property===void 0&&mt.push(new fa(m.key,m.value,'"property" property is required')),mt;function Xt(Yr){if(I==="identity")return[new fa(Yr.key,Yr.value,'identity function may not have a "stops" property')];var _i=[],si=Yr.value;return _i=_i.concat(qe({key:Yr.key,value:si,valueSpec:Yr.valueSpec,style:Yr.style,styleSpec:Yr.styleSpec,arrayElementValidator:ur})),Ka(si)==="array"&&si.length===0&&_i.push(new fa(Yr.key,si,"array must have at least one stop")),_i}function ur(Yr){var _i=[],si=Yr.value,Hi=Yr.key;if(Ka(si)!=="array")return[new fa(Hi,si,"array expected, "+Ka(si)+" found")];if(si.length!==2)return[new fa(Hi,si,"array length 2 expected, length "+si.length+" found")];if(st){if(Ka(si[0])!=="object")return[new fa(Hi,si,"object expected, "+Ka(si[0])+" found")];if(si[0].zoom===void 0)return[new fa(Hi,si,"object stop key must have zoom")];if(si[0].value===void 0)return[new fa(Hi,si,"object stop key must have value")];if(fe&&fe>vo(si[0].zoom))return[new fa(Hi,si[0].zoom,"stop zoom values must appear in ascending order")];vo(si[0].zoom)!==fe&&(fe=vo(si[0].zoom),ne=void 0,J={}),_i=_i.concat(se({key:Hi+"[0]",value:si[0],valueSpec:{zoom:{}},style:Yr.style,styleSpec:Yr.styleSpec,objectElementValidators:{zoom:je,value:nr}}))}else _i=_i.concat(nr({key:Hi+"[0]",value:si[0],valueSpec:{},style:Yr.style,styleSpec:Yr.styleSpec},si));return Ra(Wl(si[1]))?_i.concat([new fa(Hi+"[1]",si[1],"expressions are not allowed in function stops.")]):_i.concat(Wa({key:Hi+"[1]",value:si[1],valueSpec:y,style:Yr.style,styleSpec:Yr.styleSpec}))}function nr(Yr,_i){var si=Ka(Yr.value),Hi=vo(Yr.value),Ei=Yr.value!==null?Yr.value:_i;if(!U)U=si;else if(si!==U)return[new fa(Yr.key,Ei,si+" stop domain type must match previous stop domain type "+U)];if(si!=="number"&&si!=="string"&&si!=="boolean")return[new fa(Yr.key,Ei,"stop domain value must be a number, string, or boolean")];if(si!=="number"&&I!=="categorical"){var Vi="number expected, "+si+" found";return Gs(y)&&I===void 0&&(Vi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fa(Yr.key,Ei,Vi)]}return I==="categorical"&&si==="number"&&(!isFinite(Hi)||Math.floor(Hi)!==Hi)?[new fa(Yr.key,Ei,"integer expected, found "+Hi)]:I!=="categorical"&&si==="number"&&ne!==void 0&&Hi=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 Oe(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var y=1;y"||y==="<="||y===">="?He(m[1],m[2],y):y==="any"?et(m.slice(1)):y==="all"?["all"].concat(m.slice(1).map(Je)):y==="none"?["all"].concat(m.slice(1).map(Je).map(Ut)):y==="in"?Mt(m[1],m.slice(2)):y==="!in"?Ut(Mt(m[1],m.slice(2))):y==="has"?Rt(m[1]):y==="!has"?Ut(Rt(m[1])):y==="within"?m:!0;return I}function He(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 et(m){return["any"].concat(m.map(Je))}function Mt(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(Pe)]]:["filter-in-small",m,["literal",y]]}}function Rt(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Ut(m){return["!",m]}function tr(m){return Sr(Wl(m.value))?yt(Il({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):mr(m)}function mr(m){var y=m.value,I=m.key;if(Ka(y)!=="array")return[new fa(I,y,"array expected, "+Ka(y)+" found")];var U=m.styleSpec,J,ne=[];if(y.length<1)return[new fa(I,y,"filter array must have at least 1 element")];switch(ne=ne.concat(hr({key:I+"[0]",value:y[0],valueSpec:U.filter_operator,style:m.style,styleSpec:m.styleSpec})),vo(y[0])){case"<":case"<=":case">":case">=":y.length>=2&&vo(y[1])==="$type"&&ne.push(new fa(I,y,'"$type" cannot be use with operator "'+y[0]+'"'));case"==":case"!=":y.length!==3&&ne.push(new fa(I,y,'filter array for operator "'+y[0]+'" must have 3 elements'));case"in":case"!in":y.length>=2&&(J=Ka(y[1]),J!=="string"&&ne.push(new fa(I+"[1]",y[1],"string expected, "+J+" found")));for(var fe=2;fe=mt[nr+0]&&U>=mt[nr+1])?(fe[ur]=!0,ne.push(st[ur])):fe[ur]=!1}}},nu.prototype._forEachCell=function(m,y,I,U,J,ne,fe,Fe){for(var Qe=this._convertToCellCoord(m),st=this._convertToCellCoord(y),mt=this._convertToCellCoord(I),Xt=this._convertToCellCoord(U),ur=Qe;ur<=mt;ur++)for(var nr=st;nr<=Xt;nr++){var Lr=this.d*nr+ur;if(!(Fe&&!Fe(this._convertFromCellCoord(ur),this._convertFromCellCoord(nr),this._convertFromCellCoord(ur+1),this._convertFromCellCoord(nr+1)))&&J.call(this,m,y,I,U,Lr,ne,fe,Fe))return}},nu.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},nu.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},nu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,y=el+this.cells.length+1+1,I=0,U=0;U=0)){var Xt=m[mt];st[mt]=zl[Qe].shallow.indexOf(mt)>=0?Xt:Ue(Xt,y)}m instanceof Error&&(st.message=m.message)}if(st.$name)throw new Error("$name property is reserved for worker serialization logic.");return Qe!=="Object"&&(st.$name=Qe),st}throw new Error("can't serialize object of type "+typeof m)}function We(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||we(m)||Be(m)||ArrayBuffer.isView(m)||m instanceof zc)return m;if(Array.isArray(m))return m.map(We);if(typeof m=="object"){var y=m.$name||"Object",I=zl[y],U=I.klass;if(!U)throw new Error("can't deserialize unregistered class "+y);if(U.deserialize)return U.deserialize(m);for(var J=Object.create(U.prototype),ne=0,fe=Object.keys(m);ne=0?Qe:We(Qe)}}return J}throw new Error("can't deserialize object of type "+typeof m)}var wt=function(){this.first=!0};wt.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 zt(m){for(var y=0,I=m;y=65097&&m<=65103)||tt["CJK Compatibility Ideographs"](m)||tt["CJK Compatibility"](m)||tt["CJK Radicals Supplement"](m)||tt["CJK Strokes"](m)||tt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||tt["CJK Unified Ideographs Extension A"](m)||tt["CJK Unified Ideographs"](m)||tt["Enclosed CJK Letters and Months"](m)||tt["Hangul Compatibility Jamo"](m)||tt["Hangul Jamo Extended-A"](m)||tt["Hangul Jamo Extended-B"](m)||tt["Hangul Jamo"](m)||tt["Hangul Syllables"](m)||tt.Hiragana(m)||tt["Ideographic Description Characters"](m)||tt.Kanbun(m)||tt["Kangxi Radicals"](m)||tt["Katakana Phonetic Extensions"](m)||tt.Katakana(m)&&m!==12540||tt["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)||tt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||tt["Unified Canadian Aboriginal Syllabics"](m)||tt["Unified Canadian Aboriginal Syllabics Extended"](m)||tt["Vertical Forms"](m)||tt["Yijing Hexagram Symbols"](m)||tt["Yi Syllables"](m)||tt["Yi Radicals"](m))}function oi(m){return!!(tt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||tt["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)||tt["Letterlike Symbols"](m)||tt["Number Forms"](m)||tt["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)||tt["Control Pictures"](m)&&m!==9251||tt["Optical Character Recognition"](m)||tt["Enclosed Alphanumerics"](m)||tt["Geometric Shapes"](m)||tt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||tt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||tt["CJK Symbols and Punctuation"](m)||tt.Katakana(m)||tt["Private Use Area"](m)||tt["CJK Compatibility Forms"](m)||tt["Small Form Variants"](m)||tt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function ui(m){return!(Ir(m)||oi(m))}function qr(m){return tt.Arabic(m)||tt["Arabic Supplement"](m)||tt["Arabic Extended-A"](m)||tt["Arabic Presentation Forms-A"](m)||tt["Arabic Presentation Forms-B"](m)}function Kr(m){return m>=1424&&m<=2303||tt["Arabic Presentation Forms-A"](m)||tt["Arabic Presentation Forms-B"](m)}function ii(m,y){return!(!y&&Kr(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||tt.Khmer(m))}function vi(m){for(var y=0,I=m;y-1&&(dn=Jr.error),un&&un(m)};function ga(){ya.fire(new jo("pluginStateChange",{pluginStatus:dn,pluginURL:En}))}var ya=new Sn,so=function(){return dn},wa=function(m){return m({pluginStatus:dn,pluginURL:En}),ya.on("pluginStateChange",m),m},io=function(m,y,I){if(I===void 0&&(I=!1),dn===Jr.deferred||dn===Jr.loading||dn===Jr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");En=nt.resolveURL(m),dn=Jr.deferred,un=y,ga(),I||Ss()},Ss=function(){if(dn!==Jr.deferred||!En)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");dn=Jr.loading,ga(),En&&Zr({url:En},function(m){m?Nn(m):(dn=Jr.loaded,ga())})},_s={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return dn===Jr.loaded||_s.applyArabicShaping!=null},isLoading:function(){return dn===Jr.loading},setState:function(y){dn=y.pluginStatus,En=y.pluginURL},isParsed:function(){return _s.applyArabicShaping!=null&&_s.processBidirectionalText!=null&&_s.processStyledBidirectionalText!=null},getPluginURL:function(){return En}},Ns=function(){!_s.isLoading()&&!_s.isLoaded()&&so()==="deferred"&&Ss()},pn=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 wt,this.transition={})};pn.prototype.isSupportedScript=function(y){return ci(y,_s.isLoaded())},pn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},pn.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 za=function(y,I){this.property=y,this.value=I,this.expression=w(I===void 0?y.specification.default:I,y.specification)};za.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},za.prototype.possiblyEvaluate=function(y,I,U){return this.property.possiblyEvaluate(this,y,I,U)};var Lo=function(y){this.property=y,this.value=new za(y,void 0)};Lo.prototype.transitioned=function(y,I){return new js(this.property,this.value,I,_({},y.transition,this.transition),y.now)},Lo.prototype.untransitioned=function(){return new js(this.property,this.value,null,{},0)};var Fo=function(y){this._properties=y,this._values=Object.create(y.defaultTransitionablePropertyValues)};Fo.prototype.getValue=function(y){return G(this._values[y].value.value)},Fo.prototype.setValue=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Lo(this._values[y].property)),this._values[y].value=new za(this._values[y].property,I===null?void 0:G(I))},Fo.prototype.getTransition=function(y){return G(this._values[y].transition)},Fo.prototype.setTransition=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Lo(this._values[y].property)),this._values[y].transition=G(I)||void 0},Fo.prototype.serialize=function(){for(var y={},I=0,U=Object.keys(this._values);Ithis.end)return this.prior=null,ne;if(this.value.isDataDriven())return this.prior=null,ne;if(Jfe.zoomHistory.lastIntegerZoom?{from:U,to:J}:{from:ne,to:J}},y.prototype.interpolate=function(U){return U},y}(Er),wi=function(y){this.specification=y};wi.prototype.possiblyEvaluate=function(y,I,U,J){if(y.value!==void 0)if(y.expression.kind==="constant"){var ne=y.expression.evaluate(I,null,{},U,J);return this._calculate(ne,ne,ne,I)}else return this._calculate(y.expression.evaluate(new pn(Math.floor(I.zoom-1),I)),y.expression.evaluate(new pn(Math.floor(I.zoom),I)),y.expression.evaluate(new pn(Math.floor(I.zoom+1),I)),I)},wi.prototype._calculate=function(y,I,U,J){var ne=J.zoom;return ne>J.zoomHistory.lastIntegerZoom?{from:y,to:I}:{from:U,to:I}},wi.prototype.interpolate=function(y){return y};var Ui=function(y){this.specification=y};Ui.prototype.possiblyEvaluate=function(y,I,U,J){return!!y.expression.evaluate(I,null,{},U,J)},Ui.prototype.interpolate=function(){return!1};var Oi=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 J=this.defaultPropertyValues[I]=new za(U,void 0),ne=this.defaultTransitionablePropertyValues[I]=new Lo(U);this.defaultTransitioningPropertyValues[I]=ne.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=J.possiblyEvaluate({})}};Z("DataDrivenProperty",Er),Z("DataConstantProperty",At),Z("CrossFadedDataDrivenProperty",Wr),Z("CrossFadedProperty",wi),Z("ColorRampProperty",Ui);var Bi="-transition",cn=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 fu(U.layout)),U.paint)){this._transitionablePaint=new Fo(U.paint);for(var J in I.paint)this.setPaintProperty(J,I.paint[J],{validate:!1});for(var ne in I.layout)this.setLayoutProperty(ne,I.layout[ne],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xc(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,J,ne){if(ne===void 0&&(ne={}),J!=null){var fe="layers."+this.id+".layout."+U;if(this._validate(Vl,fe,U,J,ne))return}if(U==="visibility"){this.visibility=J;return}this._unevaluatedLayout.setValue(U,J)},y.prototype.getPaintProperty=function(U){return V(U,Bi)?this._transitionablePaint.getTransition(U.slice(0,-Bi.length)):this._transitionablePaint.getValue(U)},y.prototype.setPaintProperty=function(U,J,ne){if(ne===void 0&&(ne={}),J!=null){var fe="layers."+this.id+".paint."+U;if(this._validate(_l,fe,U,J,ne))return!1}if(V(U,Bi))return this._transitionablePaint.setTransition(U.slice(0,-Bi.length),J||void 0),!1;var Fe=this._transitionablePaint._values[U],Qe=Fe.property.specification["property-type"]==="cross-faded-data-driven",st=Fe.value.isDataDriven(),mt=Fe.value;this._transitionablePaint.setValue(U,J),this._handleSpecialPaintPropertyUpdate(U);var Xt=this._transitionablePaint._values[U].value,ur=Xt.isDataDriven();return ur||st||Qe||this._handleOverridablePaintPropertyUpdate(U,mt,Xt)},y.prototype._handleSpecialPaintPropertyUpdate=function(U){},y.prototype._handleOverridablePaintPropertyUpdate=function(U,J,ne){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,J){U.getCrossfadeParameters&&(this._crossfadeParameters=U.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(U,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(U,void 0,J)},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),X(U,function(J,ne){return J!==void 0&&!(ne==="layout"&&!Object.keys(J).length)&&!(ne==="paint"&&!Object.keys(J).length)})},y.prototype._validate=function(U,J,ne,fe,Fe){return Fe===void 0&&(Fe={}),Fe&&Fe.validate===!1?!1:Xu(this,U.call(yo,{key:J,layerType:this.type,objectKey:ne,value:fe,styleSpec:on,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 J=this.paint.get(U);if(!(!(J instanceof dl)||!Gs(J.property.specification))&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1},y}(Sn),On={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Bn=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},yn=128,to=5,Dn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Dn.serialize=function(y,I){return y._trim(),I&&(y.isTransferred=!0,I.push(y.arrayBuffer)),{length:y.length,arrayBuffer:y.arrayBuffer}},Dn.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},Dn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Dn.prototype.clear=function(){this.length=0},Dn.prototype.resize=function(y){this.reserve(y),this.length=y},Dn.prototype.reserve=function(y){if(y>this.capacity){this.capacity=Math.max(y,Math.floor(this.capacity*to),yn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},Dn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Rn(m,y){y===void 0&&(y=1);var I=0,U=0,J=m.map(function(fe){var Fe=fn(fe.type),Qe=I=Ai(I,Math.max(y,Fe)),st=fe.components||1;return U=Math.max(U,Fe),I+=Fe*st,{name:fe.name,type:fe.type,components:st,offset:Qe}}),ne=Ai(I,Math.max(U,y));return{members:J,size:ne,alignment:y}}function fn(m){return On[m].BYTES_PER_ELEMENT}function Ai(m,y){return Math.ceil(m/y)*y}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,J){var ne=this.length;return this.resize(ne+1),this.emplace(ne,U,J)},y.prototype.emplace=function(U,J,ne){var fe=U*2;return this.int16[fe+0]=J,this.int16[fe+1]=ne,U},y}(Dn);ji.prototype.bytesPerElement=4,Z("StructArrayLayout2i4",ji);var Ln=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,J,ne,fe){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,U,J,ne,fe)},y.prototype.emplace=function(U,J,ne,fe,Fe){var Qe=U*4;return this.int16[Qe+0]=J,this.int16[Qe+1]=ne,this.int16[Qe+2]=fe,this.int16[Qe+3]=Fe,U},y}(Dn);Ln.prototype.bytesPerElement=8,Z("StructArrayLayout4i8",Ln);var Un=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,J,ne,fe,Fe,Qe){var st=this.length;return this.resize(st+1),this.emplace(st,U,J,ne,fe,Fe,Qe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st){var mt=U*6;return this.int16[mt+0]=J,this.int16[mt+1]=ne,this.int16[mt+2]=fe,this.int16[mt+3]=Fe,this.int16[mt+4]=Qe,this.int16[mt+5]=st,U},y}(Dn);Un.prototype.bytesPerElement=12,Z("StructArrayLayout2i4i12",Un);var gn=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,J,ne,fe,Fe,Qe){var st=this.length;return this.resize(st+1),this.emplace(st,U,J,ne,fe,Fe,Qe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st){var mt=U*4,Xt=U*8;return this.int16[mt+0]=J,this.int16[mt+1]=ne,this.uint8[Xt+4]=fe,this.uint8[Xt+5]=Fe,this.uint8[Xt+6]=Qe,this.uint8[Xt+7]=st,U},y}(Dn);gn.prototype.bytesPerElement=8,Z("StructArrayLayout2i4ub8",gn);var ca=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,J){var ne=this.length;return this.resize(ne+1),this.emplace(ne,U,J)},y.prototype.emplace=function(U,J,ne){var fe=U*2;return this.float32[fe+0]=J,this.float32[fe+1]=ne,U},y}(Dn);ca.prototype.bytesPerElement=8,Z("StructArrayLayout2f8",ca);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.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur){var nr=this.length;return this.resize(nr+1),this.emplace(nr,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr){var Lr=U*10;return this.uint16[Lr+0]=J,this.uint16[Lr+1]=ne,this.uint16[Lr+2]=fe,this.uint16[Lr+3]=Fe,this.uint16[Lr+4]=Qe,this.uint16[Lr+5]=st,this.uint16[Lr+6]=mt,this.uint16[Lr+7]=Xt,this.uint16[Lr+8]=ur,this.uint16[Lr+9]=nr,U},y}(Dn);Kn.prototype.bytesPerElement=20,Z("StructArrayLayout10ui20",Kn);var Za=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,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr){var Yr=this.length;return this.resize(Yr+1),this.emplace(Yr,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr){var _i=U*12;return this.int16[_i+0]=J,this.int16[_i+1]=ne,this.int16[_i+2]=fe,this.int16[_i+3]=Fe,this.uint16[_i+4]=Qe,this.uint16[_i+5]=st,this.uint16[_i+6]=mt,this.uint16[_i+7]=Xt,this.int16[_i+8]=ur,this.int16[_i+9]=nr,this.int16[_i+10]=Lr,this.int16[_i+11]=Yr,U},y}(Dn);Za.prototype.bytesPerElement=24,Z("StructArrayLayout4i4ui4i24",Za);var wn=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,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*3;return this.float32[Fe+0]=J,this.float32[Fe+1]=ne,this.float32[Fe+2]=fe,U},y}(Dn);wn.prototype.bytesPerElement=12,Z("StructArrayLayout3f12",wn);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.uint32=new Uint32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var J=this.length;return this.resize(J+1),this.emplace(J,U)},y.prototype.emplace=function(U,J){var ne=U*1;return this.uint32[ne+0]=J,U},y}(Dn);vn.prototype.bytesPerElement=4,Z("StructArrayLayout1ul4",vn);var Aa=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,J,ne,fe,Fe,Qe,st,mt,Xt){var ur=this.length;return this.resize(ur+1),this.emplace(ur,U,J,ne,fe,Fe,Qe,st,mt,Xt)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur){var nr=U*10,Lr=U*5;return this.int16[nr+0]=J,this.int16[nr+1]=ne,this.int16[nr+2]=fe,this.int16[nr+3]=Fe,this.int16[nr+4]=Qe,this.int16[nr+5]=st,this.uint32[Lr+3]=mt,this.uint16[nr+8]=Xt,this.uint16[nr+9]=ur,U},y}(Dn);Aa.prototype.bytesPerElement=20,Z("StructArrayLayout6i1ul2ui20",Aa);var aa=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,J,ne,fe,Fe,Qe){var st=this.length;return this.resize(st+1),this.emplace(st,U,J,ne,fe,Fe,Qe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st){var mt=U*6;return this.int16[mt+0]=J,this.int16[mt+1]=ne,this.int16[mt+2]=fe,this.int16[mt+3]=Fe,this.int16[mt+4]=Qe,this.int16[mt+5]=st,U},y}(Dn);aa.prototype.bytesPerElement=12,Z("StructArrayLayout2i2i2i12",aa);var Xn=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,J,ne,fe,Fe){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,U,J,ne,fe,Fe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe){var st=U*4,mt=U*8;return this.float32[st+0]=J,this.float32[st+1]=ne,this.float32[st+2]=fe,this.int16[mt+6]=Fe,this.int16[mt+7]=Qe,U},y}(Dn);Xn.prototype.bytesPerElement=16,Z("StructArrayLayout2f1f2i16",Xn);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.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,J,ne,fe){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,U,J,ne,fe)},y.prototype.emplace=function(U,J,ne,fe,Fe){var Qe=U*12,st=U*3;return this.uint8[Qe+0]=J,this.uint8[Qe+1]=ne,this.float32[st+1]=fe,this.float32[st+2]=Fe,U},y}(Dn);Vn.prototype.bytesPerElement=12,Z("StructArrayLayout2ub2f12",Vn);var ma=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,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*3;return this.uint16[Fe+0]=J,this.uint16[Fe+1]=ne,this.uint16[Fe+2]=fe,U},y}(Dn);ma.prototype.bytesPerElement=6,Z("StructArrayLayout3ui6",ma);var ro=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,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei){var Vi=this.length;return this.resize(Vi+1),this.emplace(Vi,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi){var en=U*24,An=U*12,ra=U*48;return this.int16[en+0]=J,this.int16[en+1]=ne,this.uint16[en+2]=fe,this.uint16[en+3]=Fe,this.uint32[An+2]=Qe,this.uint32[An+3]=st,this.uint32[An+4]=mt,this.uint16[en+10]=Xt,this.uint16[en+11]=ur,this.uint16[en+12]=nr,this.float32[An+7]=Lr,this.float32[An+8]=Yr,this.uint8[ra+36]=_i,this.uint8[ra+37]=si,this.uint8[ra+38]=Hi,this.uint32[An+10]=Ei,this.int16[en+22]=Vi,U},y}(Dn);ro.prototype.bytesPerElement=48,Z("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ro);var 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._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,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi,en,An,ra,$n,Ba,_a,Pa,qo,Na,ja){var us=this.length;return this.resize(us+1),this.emplace(us,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi,en,An,ra,$n,Ba,_a,Pa,qo,Na,ja)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi,en,An,ra,$n,Ba,_a,Pa,qo,Na,ja,us){var zo=U*34,rl=U*17;return this.int16[zo+0]=J,this.int16[zo+1]=ne,this.int16[zo+2]=fe,this.int16[zo+3]=Fe,this.int16[zo+4]=Qe,this.int16[zo+5]=st,this.int16[zo+6]=mt,this.int16[zo+7]=Xt,this.uint16[zo+8]=ur,this.uint16[zo+9]=nr,this.uint16[zo+10]=Lr,this.uint16[zo+11]=Yr,this.uint16[zo+12]=_i,this.uint16[zo+13]=si,this.uint16[zo+14]=Hi,this.uint16[zo+15]=Ei,this.uint16[zo+16]=Vi,this.uint16[zo+17]=en,this.uint16[zo+18]=An,this.uint16[zo+19]=ra,this.uint16[zo+20]=$n,this.uint16[zo+21]=Ba,this.uint16[zo+22]=_a,this.uint32[rl+12]=Pa,this.float32[rl+13]=qo,this.float32[rl+14]=Na,this.float32[rl+15]=ja,this.float32[rl+16]=us,U},y}(Dn);Ao.prototype.bytesPerElement=68,Z("StructArrayLayout8i15ui1ul4f68",Ao);var Jn=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 J=this.length;return this.resize(J+1),this.emplace(J,U)},y.prototype.emplace=function(U,J){var ne=U*1;return this.float32[ne+0]=J,U},y}(Dn);Jn.prototype.bytesPerElement=4,Z("StructArrayLayout1f4",Jn);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.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*3;return this.int16[Fe+0]=J,this.int16[Fe+1]=ne,this.int16[Fe+2]=fe,U},y}(Dn);Oa.prototype.bytesPerElement=6,Z("StructArrayLayout3i6",Oa);var _o=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,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*2,Qe=U*4;return this.uint32[Fe+0]=J,this.uint16[Qe+2]=ne,this.uint16[Qe+3]=fe,U},y}(Dn);_o.prototype.bytesPerElement=8,Z("StructArrayLayout1ul2ui8",_o);var Po=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,J){var ne=this.length;return this.resize(ne+1),this.emplace(ne,U,J)},y.prototype.emplace=function(U,J,ne){var fe=U*2;return this.uint16[fe+0]=J,this.uint16[fe+1]=ne,U},y}(Dn);Po.prototype.bytesPerElement=4,Z("StructArrayLayout2ui4",Po);var Jo=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 J=this.length;return this.resize(J+1),this.emplace(J,U)},y.prototype.emplace=function(U,J){var ne=U*1;return this.uint16[ne+0]=J,U},y}(Dn);Jo.prototype.bytesPerElement=2,Z("StructArrayLayout1ui2",Jo);var Xl=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,J,ne,fe){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,U,J,ne,fe)},y.prototype.emplace=function(U,J,ne,fe,Fe){var Qe=U*4;return this.float32[Qe+0]=J,this.float32[Qe+1]=ne,this.float32[Qe+2]=fe,this.float32[Qe+3]=Fe,U},y}(Dn);Xl.prototype.bytesPerElement=16,Z("StructArrayLayout4f16",Xl);var $c=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}(Bn);$c.prototype.size=20;var xs=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 $c(this,U)},y}(Aa);Z("CollisionBoxArray",xs);var Qc=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}(Bn);Qc.prototype.size=48;var El=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 Qc(this,U)},y}(ro);Z("PlacedSymbolArray",El);var bc=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}(Bn);bc.prototype.size=68;var wc=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 bc(this,U)},y}(Ao);Z("SymbolInstanceArray",wc);var yf=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}(Jn);Z("GlyphOffsetArray",yf);var Hl=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}(Oa);Z("SymbolLineVertexArray",Hl);var Fc=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}(Bn);Fc.prototype.size=8;var ef=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 Fc(this,U)},y}(_o);Z("FeatureIndexArray",ef);var ls=Rn([{name:"a_pos",components:2,type:"Int16"}],4),_f=ls.members,ns=function(y){y===void 0&&(y=[]),this.segments=y};ns.prototype.prepareSegment=function(y,I,U,J){var ne=this.segments[this.segments.length-1];return y>ns.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+ns.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+y),(!ne||ne.vertexLength+y>ns.MAX_VERTEX_ARRAY_LENGTH||ne.sortKey!==J)&&(ne={vertexOffset:I.length,primitiveOffset:U.length,vertexLength:0,primitiveLength:0},J!==void 0&&(ne.sortKey=J),this.segments.push(ne)),ne},ns.prototype.get=function(){return this.segments},ns.prototype.destroy=function(){for(var y=0,I=this.segments;y>>16)*Qe&65535)<<16)&4294967295,mt=mt<<15|mt>>>17,mt=(mt&65535)*st+(((mt>>>16)*st&65535)<<16)&4294967295,fe^=mt,fe=fe<<13|fe>>>19,Fe=(fe&65535)*5+(((fe>>>16)*5&65535)<<16)&4294967295,fe=(Fe&65535)+27492+(((Fe>>>16)+58964&65535)<<16);switch(mt=0,J){case 3:mt^=(I.charCodeAt(Xt+2)&255)<<16;case 2:mt^=(I.charCodeAt(Xt+1)&255)<<8;case 1:mt^=I.charCodeAt(Xt)&255,mt=(mt&65535)*Qe+(((mt>>>16)*Qe&65535)<<16)&4294967295,mt=mt<<15|mt>>>17,mt=(mt&65535)*st+(((mt>>>16)*st&65535)<<16)&4294967295,fe^=mt}return fe^=I.length,fe^=fe>>>16,fe=(fe&65535)*2246822507+(((fe>>>16)*2246822507&65535)<<16)&4294967295,fe^=fe>>>13,fe=(fe&65535)*3266489909+(((fe>>>16)*3266489909&65535)<<16)&4294967295,fe^=fe>>>16,fe>>>0}m.exports=y}),O=a(function(m){function y(I,U){for(var J=I.length,ne=U^J,fe=0,Fe;J>=4;)Fe=I.charCodeAt(fe)&255|(I.charCodeAt(++fe)&255)<<8|(I.charCodeAt(++fe)&255)<<16|(I.charCodeAt(++fe)&255)<<24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),Fe^=Fe>>>24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),ne=(ne&65535)*1540483477+(((ne>>>16)*1540483477&65535)<<16)^Fe,J-=4,++fe;switch(J){case 3:ne^=(I.charCodeAt(fe+2)&255)<<16;case 2:ne^=(I.charCodeAt(fe+1)&255)<<8;case 1:ne^=I.charCodeAt(fe)&255,ne=(ne&65535)*1540483477+(((ne>>>16)*1540483477&65535)<<16)}return ne^=ne>>>13,ne=(ne&65535)*1540483477+(((ne>>>16)*1540483477&65535)<<16),ne^=ne>>>15,ne>>>0}m.exports=y}),$=K,pe=K,de=O;$.murmur3=pe,$.murmur2=de;var Ie=function(){this.ids=[],this.positions=[],this.indexed=!1};Ie.prototype.add=function(y,I,U,J){this.ids.push(pt(y)),this.positions.push(I,U,J)},Ie.prototype.getPositions=function(y){for(var I=pt(y),U=0,J=this.ids.length-1;U>1;this.ids[ne]>=I?J=ne:U=ne+1}for(var fe=[];this.ids[U]===I;){var Fe=this.positions[3*U],Qe=this.positions[3*U+1],st=this.positions[3*U+2];fe.push({index:Fe,start:Qe,end:st}),U++}return fe},Ie.serialize=function(y,I){var U=new Float64Array(y.ids),J=new Uint32Array(y.positions);return Kt(U,J,0,U.length-1),I&&I.push(U.buffer,J.buffer),{ids:U,positions:J}},Ie.deserialize=function(y){var I=new Ie;return I.ids=y.ids,I.positions=y.positions,I.indexed=!0,I};var $e=Math.pow(2,53)-1;function pt(m){var y=+m;return!isNaN(y)&&y<=$e?y:$(String(m))}function Kt(m,y,I,U){for(;I>1],ne=I-1,fe=U+1;;){do ne++;while(m[ne]J);if(ne>=fe)break;ir(m,ne,fe),ir(y,3*ne,3*fe),ir(y,3*ne+1,3*fe+1),ir(y,3*ne+2,3*fe+2)}fe-Ife.x+1||Qefe.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function No(m,y){return{type:m.type,id:m.id,properties:m.properties,geometry:y?da(m):[]}}function Ro(m,y,I,U,J){m.emplaceBack(y*2+(U+1)/2,I*2+(J+1)/2)}var ps=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 ji,this.indexArray=new ma,this.segments=new ns,this.programConfigurations=new Di(y.layers,y.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ps.prototype.populate=function(y,I,U){var J=this.layers[0],ne=[],fe=null;J.type==="circle"&&(fe=J.layout.get("circle-sort-key"));for(var Fe=0,Qe=y;Fe=rn||ur<0||ur>=rn)){var nr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,y.sortKey),Lr=nr.vertexLength;Ro(this.layoutVertexArray,Xt,ur,-1,-1),Ro(this.layoutVertexArray,Xt,ur,1,-1),Ro(this.layoutVertexArray,Xt,ur,1,1),Ro(this.layoutVertexArray,Xt,ur,-1,1),this.indexArray.emplaceBack(Lr,Lr+1,Lr+2),this.indexArray.emplaceBack(Lr,Lr+3,Lr+2),nr.vertexLength+=4,nr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,{},J)},Z("CircleBucket",ps,{omit:["layers"]});function fo(m,y){for(var I=0;I=3){for(var ne=0;ne1){if(Ev(m,y))return!0;for(var U=0;U1?m.distSqr(I):m.distSqr(I.sub(y)._mult(J)._add(y))}function vp(m,y){for(var I=!1,U,J,ne,fe=0;fey.y!=ne.y>y.y&&y.x<(ne.x-J.x)*(y.y-J.y)/(ne.y-J.y)+J.x&&(I=!I)}return I}function _d(m,y){for(var I=!1,U=0,J=m.length-1;Uy.y!=fe.y>y.y&&y.x<(fe.x-ne.x)*(y.y-ne.y)/(fe.y-ne.y)+ne.x&&(I=!I)}return I}function pp(m,y,I,U,J){for(var ne=0,fe=m;ne=Fe.x&&J>=Fe.y)return!0}var Qe=[new u(y,I),new u(y,J),new u(U,J),new u(U,I)];if(m.length>2)for(var st=0,mt=Qe;stJ.x&&y.x>J.x||m.yJ.y&&y.y>J.y)return!1;var ne=ae(m,y,I[0]);return ne!==ae(m,y,I[1])||ne!==ae(m,y,I[2])||ne!==ae(m,y,I[3])}function xd(m,y,I){var U=y.paint.get(m).value;return U.kind==="constant"?U.value:I.programConfigurations.get(y.id).getMaxValue(m)}function kv(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Kv(m,y,I,U,J){if(!y[0]&&!y[1])return m;var ne=u.convert(y)._mult(J);I==="viewport"&&ne._rotate(-U);for(var fe=[],Fe=0;Fe0&&(ne=1/Math.sqrt(ne)),m[0]=y[0]*ne,m[1]=y[1]*ne,m[2]=y[2]*ne,m}function L9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]}function P9(m,y,I){var U=y[0],J=y[1],ne=y[2],fe=I[0],Fe=I[1],Qe=I[2];return m[0]=J*Qe-ne*Fe,m[1]=ne*fe-U*Qe,m[2]=U*Fe-J*fe,m}function I9(m,y,I){var U=y[0],J=y[1],ne=y[2];return m[0]=U*I[0]+J*I[3]+ne*I[6],m[1]=U*I[1]+J*I[4]+ne*I[7],m[2]=U*I[2]+J*I[5]+ne*I[8],m}var D9=om,pQ=function(){var m=am();return function(y,I,U,J,ne,fe){var Fe,Qe;for(I||(I=3),U||(U=0),J?Qe=Math.min(J*I+U,y.length):Qe=y.length,Fe=U;Fem.width||J.height>m.height||I.x>m.width-J.width||I.y>m.height-J.height)throw new RangeError("out of range source coordinates for image copy");if(J.width>y.width||J.height>y.height||U.x>y.width-J.width||U.y>y.height-J.height)throw new RangeError("out of range destination coordinates for image copy");for(var fe=m.data,Fe=y.data,Qe=0;Qe80*I){Fe=st=m[0],Qe=mt=m[1];for(var Lr=I;Lrst&&(st=Xt),ur>mt&&(mt=ur);nr=Math.max(st-Fe,mt-Qe),nr=nr!==0?1/nr:0}return Gx(ne,fe,I,Fe,Qe,nr),fe}function Iw(m,y,I,U,J){var ne,fe;if(J===cS(m,y,I,U)>0)for(ne=y;ne=y;ne-=U)fe=yC(ne,m[ne],m[ne+1],fe);return fe&&Wx(fe,fe.next)&&(Yx(fe),fe=fe.next),fe}function sm(m,y){if(!m)return m;y||(y=m);var I=m,U;do if(U=!1,!I.steiner&&(Wx(I,I.next)||tf(I.prev,I,I.next)===0)){if(Yx(I),I=y=I.prev,I===I.next)break;U=!0}else I=I.next;while(U||I!==y);return y}function Gx(m,y,I,U,J,ne,fe){if(m){!fe&&ne&&Dw(m,U,J,ne);for(var Fe=m,Qe,st;m.prev!==m.next;){if(Qe=m.prev,st=m.next,ne?pC(m,U,J,ne):vC(m)){y.push(Qe.i/I),y.push(m.i/I),y.push(st.i/I),Yx(m),m=st.next,Fe=st.next;continue}if(m=st,m===Fe){fe?fe===1?(m=jx(sm(m),y,I),Gx(m,y,I,U,J,ne,2)):fe===2&&v0(m,y,I,U,J,ne):Gx(sm(m),y,I,U,J,ne,1);break}}}}function vC(m){var y=m.prev,I=m,U=m.next;if(tf(y,I,U)>=0)return!1;for(var J=m.next.next;J!==m.prev;){if(um(y.x,y.y,I.x,I.y,U.x,U.y,J.x,J.y)&&tf(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function pC(m,y,I,U){var J=m.prev,ne=m,fe=m.next;if(tf(J,ne,fe)>=0)return!1;for(var Fe=J.xne.x?J.x>fe.x?J.x:fe.x:ne.x>fe.x?ne.x:fe.x,mt=J.y>ne.y?J.y>fe.y?J.y:fe.y:ne.y>fe.y?ne.y:fe.y,Xt=oS(Fe,Qe,y,I,U),ur=oS(st,mt,y,I,U),nr=m.prevZ,Lr=m.nextZ;nr&&nr.z>=Xt&&Lr&&Lr.z<=ur;){if(nr!==m.prev&&nr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,nr.x,nr.y)&&tf(nr.prev,nr,nr.next)>=0||(nr=nr.prevZ,Lr!==m.prev&&Lr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,Lr.x,Lr.y)&&tf(Lr.prev,Lr,Lr.next)>=0))return!1;Lr=Lr.nextZ}for(;nr&&nr.z>=Xt;){if(nr!==m.prev&&nr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,nr.x,nr.y)&&tf(nr.prev,nr,nr.next)>=0)return!1;nr=nr.prevZ}for(;Lr&&Lr.z<=ur;){if(Lr!==m.prev&&Lr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,Lr.x,Lr.y)&&tf(Lr.prev,Lr,Lr.next)>=0)return!1;Lr=Lr.nextZ}return!0}function jx(m,y,I){var U=m;do{var J=U.prev,ne=U.next.next;!Wx(J,ne)&&Rw(J,U,U.next,ne)&&Xx(J,ne)&&Xx(ne,J)&&(y.push(J.i/I),y.push(U.i/I),y.push(ne.i/I),Yx(U),Yx(U.next),U=m=ne),U=U.next}while(U!==m);return sm(U)}function v0(m,y,I,U,J,ne){var fe=m;do{for(var Fe=fe.next.next;Fe!==fe.prev;){if(fe.i!==Fe.i&&E1(fe,Fe)){var Qe=lS(fe,Fe);fe=sm(fe,fe.next),Qe=sm(Qe,Qe.next),Gx(fe,y,I,U,J,ne),Gx(Qe,y,I,U,J,ne);return}Fe=Fe.next}fe=fe.next}while(fe!==m)}function lm(m,y,I,U){var J=[],ne,fe,Fe,Qe,st;for(ne=0,fe=y.length;ne=I.next.y&&I.next.y!==I.y){var Fe=I.x+(J-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Fe<=U&&Fe>ne){if(ne=Fe,Fe===U){if(J===I.y)return I;if(J===I.next.y)return I.next}fe=I.x=I.x&&I.x>=st&&U!==I.x&&um(Jfe.x||I.x===fe.x&&V9(fe,I)))&&(fe=I,Xt=ur)),I=I.next;while(I!==Qe);return fe}function V9(m,y){return tf(m.prev,m,y.prev)<0&&tf(y.next,m,m.next)<0}function Dw(m,y,I,U){var J=m;do J.z===null&&(J.z=oS(J.x,J.y,y,I,U)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next;while(J!==m);J.prevZ.nextZ=null,J.prevZ=null,aS(J)}function aS(m){var y,I,U,J,ne,fe,Fe,Qe,st=1;do{for(I=m,m=null,ne=null,fe=0;I;){for(fe++,U=I,Fe=0,y=0;y0||Qe>0&&U;)Fe!==0&&(Qe===0||!U||I.z<=U.z)?(J=I,I=I.nextZ,Fe--):(J=U,U=U.nextZ,Qe--),ne?ne.nextZ=J:m=J,J.prevZ=ne,ne=J;I=U}ne.nextZ=null,st*=2}while(fe>1);return m}function oS(m,y,I,U,J){return m=32767*(m-I)*J,y=32767*(y-U)*J,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 sS(m){var y=m,I=m;do(y.x=0&&(m-fe)*(U-Fe)-(I-fe)*(y-Fe)>=0&&(I-fe)*(ne-Fe)-(J-fe)*(U-Fe)>=0}function E1(m,y){return m.next.i!==y.i&&m.prev.i!==y.i&&!mC(m,y)&&(Xx(m,y)&&Xx(y,m)&&H9(m,y)&&(tf(m.prev,m,y.prev)||tf(m,y.prev,y))||Wx(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 Wx(m,y){return m.x===y.x&&m.y===y.y}function Rw(m,y,I,U){var J=uy(tf(m,y,I)),ne=uy(tf(m,y,U)),fe=uy(tf(I,U,m)),Fe=uy(tf(I,U,y));return!!(J!==ne&&fe!==Fe||J===0&&Zx(m,I,y)||ne===0&&Zx(m,U,y)||fe===0&&Zx(I,m,U)||Fe===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 uy(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&&Rw(I,I.next,m,y))return!0;I=I.next}while(I!==m);return!1}function Xx(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 H9(m,y){var I=m,U=!1,J=(m.x+y.x)/2,ne=(m.y+y.y)/2;do I.y>ne!=I.next.y>ne&&I.next.y!==I.y&&J<(I.next.x-I.x)*(ne-I.y)/(I.next.y-I.y)+I.x&&(U=!U),I=I.next;while(I!==m);return U}function lS(m,y){var I=new uS(m.i,m.x,m.y),U=new uS(y.i,y.x,y.y),J=m.next,ne=y.prev;return m.next=y,y.prev=m,I.next=J,J.prev=I,U.next=I,I.prev=U,ne.next=U,U.prev=ne,U}function yC(m,y,I,U){var J=new uS(m,y,I);return U?(J.next=U.next,J.prev=U,U.next.prev=J,U.next=J):(J.prev=J,J.next=J),J}function Yx(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 uS(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}M1.deviation=function(m,y,I,U){var J=y&&y.length,ne=J?y[0]*I:m.length,fe=Math.abs(cS(m,0,ne,I));if(J)for(var Fe=0,Qe=y.length;Fe0&&(U+=m[J-1].length,I.holes.push(U))}return I},Pw.default=dC;function fS(m,y,I,U,J){dg(m,y,I||0,U||m.length-1,J||_C)}function dg(m,y,I,U,J){for(;U>I;){if(U-I>600){var ne=U-I+1,fe=y-I+1,Fe=Math.log(ne),Qe=.5*Math.exp(2*Fe/3),st=.5*Math.sqrt(Fe*Qe*(ne-Qe)/ne)*(fe-ne/2<0?-1:1),mt=Math.max(I,Math.floor(y-fe*Qe/ne+st)),Xt=Math.min(U,Math.floor(y+(ne-fe)*Qe/ne+st));dg(m,y,mt,Xt,J)}var ur=m[y],nr=I,Lr=U;for(k1(m,I,y),J(m[U],ur)>0&&k1(m,I,U);nr0;)Lr--}J(m[I],ur)===0?k1(m,I,Lr):(Lr++,k1(m,Lr,U)),Lr<=y&&(I=Lr+1),y<=Lr&&(U=Lr-1)}}function k1(m,y,I){var U=m[y];m[y]=m[I],m[I]=U}function _C(m,y){return my?1:0}function zw(m,y){var I=m.length;if(I<=1)return[m];for(var U=[],J,ne,fe=0;fe1)for(var Qe=0;Qe>3}if(U--,I===1||I===2)J+=m.readSVarint(),ne+=m.readSVarint(),I===1&&(Fe&&fe.push(Fe),Fe=[]),Fe.push(new u(J,ne));else if(I===7)Fe&&Fe.push(Fe[0].clone());else throw new Error("unknown command "+I)}return Fe&&fe.push(Fe),fe},cy.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,U=0,J=0,ne=0,fe=1/0,Fe=-1/0,Qe=1/0,st=-1/0;m.pos>3}if(U--,I===1||I===2)J+=m.readSVarint(),ne+=m.readSVarint(),JFe&&(Fe=J),nest&&(st=ne);else if(I!==7)throw new Error("unknown command "+I)}return[fe,Qe,Fe,st]},cy.prototype.toGeoJSON=function(m,y,I){var U=this.extent*Math.pow(2,I),J=this.extent*m,ne=this.extent*y,fe=this.loadGeometry(),Fe=cy.types[this.type],Qe,st;function mt(nr){for(var Lr=0;Lr>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}vS.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 dS(this._pbf,y,this.extent,this._keys,this._values)};var CC=j9;function j9(m,y){this.layers=m.readFields(W9,{},y)}function W9(m,y,I){if(m===3){var U=new vg(I,I.readVarint()+I.pos);U.length&&(y[U.name]=U)}}var LC=CC,C1=dS,PC=vg,pg={VectorTile:LC,VectorTileFeature:C1,VectorTileLayer:PC},IC=pg.VectorTileFeature.types,qw=500,L1=Math.pow(2,13);function cm(m,y,I,U,J,ne,fe,Fe){m.emplaceBack(y,I,Math.floor(U*L1)*2+fe,J*L1*2,ne*L1*2,Math.round(Fe))}var Hp=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 Un,this.indexArray=new ma,this.programConfigurations=new Di(y.layers,y.zoom),this.segments=new ns,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Hp.prototype.populate=function(y,I,U){this.features=[],this.hasPattern=Fw("fill-extrusion",this.layers,I);for(var J=0,ne=y;J=1){var Vi=_i[Hi-1];if(!Z9(Ei,Vi)){nr.vertexLength+4>ns.MAX_VERTEX_ARRAY_LENGTH&&(nr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var en=Ei.sub(Vi)._perp()._unit(),An=Vi.dist(Ei);si+An>32768&&(si=0),cm(this.layoutVertexArray,Ei.x,Ei.y,en.x,en.y,0,0,si),cm(this.layoutVertexArray,Ei.x,Ei.y,en.x,en.y,0,1,si),si+=An,cm(this.layoutVertexArray,Vi.x,Vi.y,en.x,en.y,0,0,si),cm(this.layoutVertexArray,Vi.x,Vi.y,en.x,en.y,0,1,si);var ra=nr.vertexLength;this.indexArray.emplaceBack(ra,ra+2,ra+1),this.indexArray.emplaceBack(ra+1,ra+2,ra+3),nr.vertexLength+=4,nr.primitiveLength+=2}}}}if(nr.vertexLength+st>ns.MAX_VERTEX_ARRAY_LENGTH&&(nr=this.segments.prepareSegment(st,this.layoutVertexArray,this.indexArray)),IC[y.type]==="Polygon"){for(var $n=[],Ba=[],_a=nr.vertexLength,Pa=0,qo=Qe;Parn)||m.y===y.y&&(m.y<0||m.y>rn)}function X9(m){return m.every(function(y){return y.x<0})||m.every(function(y){return y.x>rn})||m.every(function(y){return y.y<0})||m.every(function(y){return y.y>rn})}var P1=new Oi({"fill-extrusion-opacity":new At(on["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Er(on["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new At(on["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new At(on["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Wr(on["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Er(on["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Er(on["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new At(on["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ed={paint:P1},fm=function(m){function y(I){m.call(this,I,ed)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(U){return new Hp(U)},y.prototype.queryRadius=function(){return kv(this.paint.get("fill-extrusion-translate"))},y.prototype.is3D=function(){return!0},y.prototype.queryIntersectsFeature=function(U,J,ne,fe,Fe,Qe,st,mt){var Xt=Kv(U,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qe.angle,st),ur=this.paint.get("fill-extrusion-height").evaluate(J,ne),nr=this.paint.get("fill-extrusion-base").evaluate(J,ne),Lr=Y9(Xt,mt,Qe,0),Yr=gS(fe,nr,ur,mt),_i=Yr[0],si=Yr[1];return DC(_i,si,Lr)},y}(cn);function fy(m,y){return m.x*y.x+m.y*y.y}function pS(m,y){if(m.length===1){for(var I=0,U=y[I++],J;!J||U.equals(J);)if(J=y[I++],!J)return 1/0;for(;I=2&&y[st-1].equals(y[st-2]);)st--;for(var mt=0;mt0;if($n&&Hi>mt){var _a=nr.dist(Lr);if(_a>2*Xt){var Pa=nr.sub(nr.sub(Lr)._mult(Xt/_a)._round());this.updateDistance(Lr,Pa),this.addCurrentVertex(Pa,_i,0,0,ur),Lr=Pa}}var qo=Lr&&Yr,Na=qo?U:Qe?"butt":J;if(qo&&Na==="round"&&(Anne&&(Na="bevel"),Na==="bevel"&&(An>2&&(Na="flipbevel"),An100)Ei=si.mult(-1);else{var ja=An*_i.add(si).mag()/_i.sub(si).mag();Ei._perp()._mult(ja*(Ba?-1:1))}this.addCurrentVertex(nr,Ei,0,0,ur),this.addCurrentVertex(nr,Ei.mult(-1),0,0,ur)}else if(Na==="bevel"||Na==="fakeround"){var us=-Math.sqrt(An*An-1),zo=Ba?us:0,rl=Ba?0:us;if(Lr&&this.addCurrentVertex(nr,_i,zo,rl,ur),Na==="fakeround")for(var ou=Math.round(ra*180/Math.PI/yS),il=1;il2*Xt){var Zf=nr.add(Yr.sub(nr)._mult(Xt/qh)._round());this.updateDistance(nr,Zf),this.addCurrentVertex(Zf,si,0,0,ur),nr=Zf}}}}},Gf.prototype.addCurrentVertex=function(y,I,U,J,ne,fe){fe===void 0&&(fe=!1);var Fe=I.x+I.y*U,Qe=I.y-I.x*U,st=-I.x+I.y*J,mt=-I.y-I.x*J;this.addHalfVertex(y,Fe,Qe,fe,!1,U,ne),this.addHalfVertex(y,st,mt,fe,!0,-J,ne),this.distance>eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(y,I,U,J,ne,fe))},Gf.prototype.addHalfVertex=function(y,I,U,J,ne,fe,Fe){var Qe=y.x,st=y.y,mt=this.lineClips?this.scaledDistance*(eb-1):this.scaledDistance,Xt=mt*Bw;if(this.layoutVertexArray.emplaceBack((Qe<<1)+(J?1:0),(st<<1)+(ne?1:0),Math.round(Ow*I)+128,Math.round(Ow*U)+128,(fe===0?0:fe<0?-1:1)+1|(Xt&63)<<2,Xt>>6),this.lineClips){var ur=this.scaledDistance-this.lineClips.start,nr=this.lineClips.end-this.lineClips.start,Lr=ur/nr;this.layoutVertexArray2.emplaceBack(Lr,this.lineClipsArray.length)}var Yr=Fe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Yr),Fe.primitiveLength++),ne?this.e2=Yr:this.e1=Yr},Gf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Gf.prototype.updateDistance=function(y,I){this.distance+=y.dist(I),this.updateScaledDistance()},Z("LineBucket",Gf,{omit:["layers","patternFeatures"]});var _S=new Oi({"line-cap":new At(on.layout_line["line-cap"]),"line-join":new Er(on.layout_line["line-join"]),"line-miter-limit":new At(on.layout_line["line-miter-limit"]),"line-round-limit":new At(on.layout_line["line-round-limit"]),"line-sort-key":new Er(on.layout_line["line-sort-key"])}),xS=new Oi({"line-opacity":new Er(on.paint_line["line-opacity"]),"line-color":new Er(on.paint_line["line-color"]),"line-translate":new At(on.paint_line["line-translate"]),"line-translate-anchor":new At(on.paint_line["line-translate-anchor"]),"line-width":new Er(on.paint_line["line-width"]),"line-gap-width":new Er(on.paint_line["line-gap-width"]),"line-offset":new Er(on.paint_line["line-offset"]),"line-blur":new Er(on.paint_line["line-blur"]),"line-dasharray":new wi(on.paint_line["line-dasharray"]),"line-pattern":new Wr(on.paint_line["line-pattern"]),"line-gradient":new Ui(on.paint_line["line-gradient"])}),Nw={paint:xS,layout:_S},J9=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,J){return J=new pn(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),m.prototype.possiblyEvaluate.call(this,U,J)},y.prototype.evaluate=function(U,J,ne,fe){return J=_({},J,{zoom:Math.floor(J.zoom)}),m.prototype.evaluate.call(this,U,J,ne,fe)},y}(Er),D=new J9(Nw.paint.properties["line-width"].specification);D.useIntegerZoom=!0;var A=function(m){function y(I){m.call(this,I,Nw),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 J=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=J._styleExpression.expression instanceof yu,this.gradientVersion=(this.gradientVersion+1)%d}},y.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},y.prototype.recalculate=function(U,J){m.prototype.recalculate.call(this,U,J),this.paint._values["line-floorwidth"]=D.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,U)},y.prototype.createBucket=function(U){return new Gf(U)},y.prototype.queryRadius=function(U){var J=U,ne=R(xd("line-width",this,J),xd("line-gap-width",this,J)),fe=xd("line-offset",this,J);return ne/2+Math.abs(fe)+kv(this.paint.get("line-translate"))},y.prototype.queryIntersectsFeature=function(U,J,ne,fe,Fe,Qe,st){var mt=Kv(U,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qe.angle,st),Xt=st/2*R(this.paint.get("line-width").evaluate(J,ne),this.paint.get("line-gap-width").evaluate(J,ne)),ur=this.paint.get("line-offset").evaluate(J,ne);return ur&&(fe=j(fe,ur*st)),zu(mt,fe,Xt)},y.prototype.isTileClipped=function(){return!0},y}(cn);function R(m,y){return y>0?y+2*m:m}function j(m,y){for(var I=[],U=new u(0,0),J=0;J":"\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 ki(m){for(var y="",I=0;I>1,mt=-7,Xt=I?J-1:0,ur=I?-1:1,nr=m[y+Xt];for(Xt+=ur,ne=nr&(1<<-mt)-1,nr>>=-mt,mt+=Fe;mt>0;ne=ne*256+m[y+Xt],Xt+=ur,mt-=8);for(fe=ne&(1<<-mt)-1,ne>>=-mt,mt+=U;mt>0;fe=fe*256+m[y+Xt],Xt+=ur,mt-=8);if(ne===0)ne=1-st;else{if(ne===Qe)return fe?NaN:(nr?-1:1)*(1/0);fe=fe+Math.pow(2,U),ne=ne-st}return(nr?-1:1)*fe*Math.pow(2,ne-U)},Va=function(m,y,I,U,J,ne){var fe,Fe,Qe,st=ne*8-J-1,mt=(1<>1,ur=J===23?Math.pow(2,-24)-Math.pow(2,-77):0,nr=U?0:ne-1,Lr=U?1:-1,Yr=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(Fe=isNaN(y)?1:0,fe=mt):(fe=Math.floor(Math.log(y)/Math.LN2),y*(Qe=Math.pow(2,-fe))<1&&(fe--,Qe*=2),fe+Xt>=1?y+=ur/Qe:y+=ur*Math.pow(2,1-Xt),y*Qe>=2&&(fe++,Qe/=2),fe+Xt>=mt?(Fe=0,fe=mt):fe+Xt>=1?(Fe=(y*Qe-1)*Math.pow(2,J),fe=fe+Xt):(Fe=y*Math.pow(2,Xt-1)*Math.pow(2,J),fe=0));J>=8;m[I+nr]=Fe&255,nr+=Lr,Fe/=256,J-=8);for(fe=fe<0;m[I+nr]=fe&255,nr+=Lr,fe/=256,st-=8);m[I+nr-Lr]|=Yr*128},Io={read:ta,write:Va},La=Hn;function Hn(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Hn.Varint=0,Hn.Fixed64=1,Hn.Bytes=2,Hn.Fixed32=5;var lo=65536*65536,$a=1/lo,Xa=12,Tn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Hn.prototype={destroy:function(){this.buf=null},readFields:function(m,y,I){for(I=I||this.length;this.pos>3,ne=this.pos;this.type=U&7,m(J,y,this),this.pos===ne&&this.skip(U)}return y},readMessage:function(m,y){return this.readFields(m,y,this.readVarint()+this.pos)},readFixed32:function(){var m=Rh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Iv(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Rh(this.buf,this.pos)+Rh(this.buf,this.pos+4)*lo;return this.pos+=8,m},readSFixed64:function(){var m=Rh(this.buf,this.pos)+Iv(this.buf,this.pos+4)*lo;return this.pos+=8,m},readFloat:function(){var m=Io.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Io.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,bo(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>=Xa&&Tn?Cl(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!==Hn.Bytes)return m.push(this.readVarint(y));var I=Ya(this);for(m=m||[];this.pos127;);else if(y===Hn.Bytes)this.pos=this.readVarint()+this.pos;else if(y===Hn.Fixed32)this.pos+=4;else if(y===Hn.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){wu(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=qu(this.buf,m,this.pos);var I=this.pos-y;I>=128&&$v(y,I,this),this.pos=y-1,this.writeVarint(I),this.pos+=I},writeFloat:function(m){this.realloc(4),Io.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Io.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&&$v(I,U,this),this.pos=I-1,this.writeVarint(U),this.pos+=U},writeMessage:function(m,y,I){this.writeTag(m,Hn.Bytes),this.writeRawMessage(y,I)},writePackedVarint:function(m,y){y.length&&this.writeMessage(m,td,y)},writePackedSVarint:function(m,y){y.length&&this.writeMessage(m,ch,y)},writePackedBoolean:function(m,y){y.length&&this.writeMessage(m,Hd,y)},writePackedFloat:function(m,y){y.length&&this.writeMessage(m,Ud,y)},writePackedDouble:function(m,y){y.length&&this.writeMessage(m,Vd,y)},writePackedFixed32:function(m,y){y.length&&this.writeMessage(m,rf,y)},writePackedSFixed32:function(m,y){y.length&&this.writeMessage(m,fh,y)},writePackedFixed64:function(m,y){y.length&&this.writeMessage(m,Td,y)},writePackedSFixed64:function(m,y){y.length&&this.writeMessage(m,rd,y)},writeBytesField:function(m,y){this.writeTag(m,Hn.Bytes),this.writeBytes(y)},writeFixed32Field:function(m,y){this.writeTag(m,Hn.Fixed32),this.writeFixed32(y)},writeSFixed32Field:function(m,y){this.writeTag(m,Hn.Fixed32),this.writeSFixed32(y)},writeFixed64Field:function(m,y){this.writeTag(m,Hn.Fixed64),this.writeFixed64(y)},writeSFixed64Field:function(m,y){this.writeTag(m,Hn.Fixed64),this.writeSFixed64(y)},writeVarintField:function(m,y){this.writeTag(m,Hn.Varint),this.writeVarint(y)},writeSVarintField:function(m,y){this.writeTag(m,Hn.Varint),this.writeSVarint(y)},writeStringField:function(m,y){this.writeTag(m,Hn.Bytes),this.writeString(y)},writeFloatField:function(m,y){this.writeTag(m,Hn.Fixed32),this.writeFloat(y)},writeDoubleField:function(m,y){this.writeTag(m,Hn.Fixed64),this.writeDouble(y)},writeBooleanField:function(m,y){this.writeVarintField(m,!!y)}};function bo(m,y,I){var U=I.buf,J,ne;if(ne=U[I.pos++],J=(ne&112)>>4,ne<128||(ne=U[I.pos++],J|=(ne&127)<<3,ne<128)||(ne=U[I.pos++],J|=(ne&127)<<10,ne<128)||(ne=U[I.pos++],J|=(ne&127)<<17,ne<128)||(ne=U[I.pos++],J|=(ne&127)<<24,ne<128)||(ne=U[I.pos++],J|=(ne&1)<<31,ne<128))return Uo(m,J,y);throw new Error("Expected varint not more than 10 bytes")}function Ya(m){return m.type===Hn.Bytes?m.readVarint()+m.pos:m.pos+1}function Uo(m,y,I){return I?y*4294967296+(m>>>0):(y>>>0)*4294967296+(m>>>0)}function wu(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),hu(I,U,y),uh(U,y)}function hu(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 uh(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 $v(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 J=I.pos-1;J>=m;J--)I.buf[J+U]=I.buf[J]}function td(m,y){for(var I=0;I>>8,m[I+2]=y>>>16,m[I+3]=y>>>24}function Iv(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="",J=y;J239?4:ne>223?3:ne>191?2:1;if(J+Fe>I)break;var Qe,st,mt;Fe===1?ne<128&&(fe=ne):Fe===2?(Qe=m[J+1],(Qe&192)===128&&(fe=(ne&31)<<6|Qe&63,fe<=127&&(fe=null))):Fe===3?(Qe=m[J+1],st=m[J+2],(Qe&192)===128&&(st&192)===128&&(fe=(ne&15)<<12|(Qe&63)<<6|st&63,(fe<=2047||fe>=55296&&fe<=57343)&&(fe=null))):Fe===4&&(Qe=m[J+1],st=m[J+2],mt=m[J+3],(Qe&192)===128&&(st&192)===128&&(mt&192)===128&&(fe=(ne&15)<<18|(Qe&63)<<12|(st&63)<<6|mt&63,(fe<=65535||fe>=1114112)&&(fe=null))),fe===null?(fe=65533,Fe=1):fe>65535&&(fe-=65536,U+=String.fromCharCode(fe>>>10&1023|55296),fe=56320|fe&1023),U+=String.fromCharCode(fe),J+=Fe}return U}function Cl(m,y,I){return Tn.decode(m.subarray(y,I))}function qu(m,y,I){for(var U=0,J,ne;U55295&&J<57344)if(ne)if(J<56320){m[I++]=239,m[I++]=191,m[I++]=189,ne=J;continue}else J=ne-55296<<10|J-56320|65536,ne=null;else{J>56319||U+1===y.length?(m[I++]=239,m[I++]=191,m[I++]=189):ne=J;continue}else ne&&(m[I++]=239,m[I++]=191,m[I++]=189,ne=null);J<128?m[I++]=J:(J<2048?m[I++]=J>>6|192:(J<65536?m[I++]=J>>12|224:(m[I++]=J>>18|240,m[I++]=J>>12&63|128),m[I++]=J>>6&63|128),m[I++]=J&63|128)}return I}var Tu=3;function Dv(m,y,I){m===1&&I.readMessage(qc,y)}function qc(m,y,I){if(m===3){var U=I.readMessage(I1,{}),J=U.id,ne=U.bitmap,fe=U.width,Fe=U.height,Qe=U.left,st=U.top,mt=U.advance;y.push({id:J,bitmap:new Pv({width:fe+2*Tu,height:Fe+2*Tu},ne),metrics:{width:fe,height:Fe,left:Qe,top:st,advance:mt}})}}function I1(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 p0(m){return new La(m).readFields(Dv,[])}var Gp=Tu;function Qv(m){for(var y=0,I=0,U=0,J=m;U=0;nr--){var Lr=Fe[nr];if(!(ur.w>Lr.w||ur.h>Lr.h)){if(ur.x=Lr.x,ur.y=Lr.y,st=Math.max(st,ur.y+ur.h),Qe=Math.max(Qe,ur.x+ur.w),ur.w===Lr.w&&ur.h===Lr.h){var Yr=Fe.pop();nr=0&&J>=y&&m0[this.text.charCodeAt(J)];J--)U--;this.text=this.text.substring(y,U),this.sectionIndex=this.sectionIndex.slice(y,U)},zh.prototype.substring=function(y,I){var U=new zh;return U.text=this.text.substring(y,I),U.sectionIndex=this.sectionIndex.slice(y,I),U.sections=this.sections,U},zh.prototype.toString=function(){return this.text},zh.prototype.getMaxScale=function(){var y=this;return this.sectionIndex.reduce(function(I,U){return Math.max(I,y.sections[U].scale)},0)},zh.prototype.addTextSection=function(y,I){this.text+=y.text,this.sections.push(hy.forText(y.scale,y.fontStack||I));for(var U=this.sections.length-1,J=0;J=g0?null:++this.imageSectionID:(this.imageSectionID=Uw,this.imageSectionID)};function $9(m,y){for(var I=[],U=m.text,J=0,ne=0,fe=y;ne=0,mt=0,Xt=0;Xt0&&Zf>Ba&&(Ba=Zf)}else{var nl=I[Pa.fontStack],Ws=nl&&nl[Na];if(Ws&&Ws.rect)zo=Ws.rect,us=Ws.metrics;else{var Au=y[Pa.fontStack],Ou=Au&&Au[Na];if(!Ou)continue;us=Ou.metrics}ja=(en-Pa.scale)*Zi}il?(m.verticalizable=!0,$n.push({glyph:Na,imageName:rl,x:ur,y:nr+ja,vertical:il,scale:Pa.scale,fontStack:Pa.fontStack,sectionIndex:qo,metrics:us,rect:zo}),ur+=ou*Pa.scale+st):($n.push({glyph:Na,imageName:rl,x:ur,y:nr+ja,vertical:il,scale:Pa.scale,fontStack:Pa.fontStack,sectionIndex:qo,metrics:us,rect:zo}),ur+=us.advance*Pa.scale+st)}if($n.length!==0){var jd=ur-st;Lr=Math.max(jd,Lr),rq($n,0,$n.length-1,_i,Ba)}ur=0;var Wd=ne*en+Ba;ra.lineOffset=Math.max(Ba,An),nr+=Wd,Yr=Math.max(Wd,Yr),++si}var Oh=nr-D1,fv=wS(fe),hv=fv.horizontalAlign,hh=fv.verticalAlign;Ad(m.positionedLines,_i,hv,hh,Lr,Yr,ne,Oh,J.length),m.top+=-hh*Oh,m.bottom=m.top+Oh,m.left+=-hv*Lr,m.right=m.left+Lr}function rq(m,y,I,U,J){if(!(!U&&!J))for(var ne=m[I],fe=ne.metrics.advance*ne.scale,Fe=(m[I].x+fe)*U,Qe=y;Qe<=I;Qe++)m[Qe].x-=Fe,m[Qe].y+=J}function Ad(m,y,I,U,J,ne,fe,Fe,Qe){var st=(y-I)*J,mt=0;ne!==fe?mt=-Fe*U-D1:mt=(-U*Qe+.5)*fe;for(var Xt=0,ur=m;Xt-I/2;){if(fe--,fe<0)return!1;Fe-=m[fe].dist(ne),ne=m[fe]}Fe+=m[fe].dist(m[fe+1]),fe++;for(var Qe=[],st=0;FeU;)st-=Qe.shift().angleDelta;if(st>J)return!1;fe++,Fe+=Xt.dist(ur)}return!0}function xQ(m){for(var y=0,I=0;Ist){var Lr=(st-Qe)/nr,Yr=Qs(Xt.x,ur.x,Lr),_i=Qs(Xt.y,ur.y,Lr),si=new Gd(Yr,_i,ur.angleTo(Xt),mt);return si._round(),!fe||_Q(m,si,Fe,fe,y)?si:void 0}Qe+=nr}}function $$e(m,y,I,U,J,ne,fe,Fe,Qe){var st=bQ(U,ne,fe),mt=wQ(U,J),Xt=mt*fe,ur=m[0].x===0||m[0].x===Qe||m[0].y===0||m[0].y===Qe;y-Xt=0&&Vi=0&&en=0&&ur+st<=mt){var An=new Gd(Vi,en,Hi,Lr);An._round(),(!U||_Q(m,An,ne,U,J))&&nr.push(An)}}Xt+=si}return!Fe&&!nr.length&&!fe&&(nr=TQ(m,Xt/2,I,U,J,ne,fe,!0,Qe)),nr}function AQ(m,y,I,U,J){for(var ne=[],fe=0;fe=U&&Xt.x>=U)&&(mt.x>=U?mt=new u(U,mt.y+(Xt.y-mt.y)*((U-mt.x)/(Xt.x-mt.x)))._round():Xt.x>=U&&(Xt=new u(U,mt.y+(Xt.y-mt.y)*((U-mt.x)/(Xt.x-mt.x)))._round()),!(mt.y>=J&&Xt.y>=J)&&(mt.y>=J?mt=new u(mt.x+(Xt.x-mt.x)*((J-mt.y)/(Xt.y-mt.y)),J)._round():Xt.y>=J&&(Xt=new u(mt.x+(Xt.x-mt.x)*((J-mt.y)/(Xt.y-mt.y)),J)._round()),(!Qe||!mt.equals(Qe[Qe.length-1]))&&(Qe=[mt],ne.push(Qe)),Qe.push(Xt)))))}return ne}var Gw=oc;function SQ(m,y,I,U){var J=[],ne=m.image,fe=ne.pixelRatio,Fe=ne.paddedRect.w-2*Gw,Qe=ne.paddedRect.h-2*Gw,st=m.right-m.left,mt=m.bottom-m.top,Xt=ne.stretchX||[[0,Fe]],ur=ne.stretchY||[[0,Qe]],nr=function(nl,Ws){return nl+Ws[1]-Ws[0]},Lr=Xt.reduce(nr,0),Yr=ur.reduce(nr,0),_i=Fe-Lr,si=Qe-Yr,Hi=0,Ei=Lr,Vi=0,en=Yr,An=0,ra=_i,$n=0,Ba=si;if(ne.content&&U){var _a=ne.content;Hi=UC(Xt,0,_a[0]),Vi=UC(ur,0,_a[1]),Ei=UC(Xt,_a[0],_a[2]),en=UC(ur,_a[1],_a[3]),An=_a[0]-Hi,$n=_a[1]-Vi,ra=_a[2]-_a[0]-Ei,Ba=_a[3]-_a[1]-en}var Pa=function(nl,Ws,Au,Ou){var nf=VC(nl.stretch-Hi,Ei,st,m.left),bf=HC(nl.fixed-An,ra,nl.stretch,Lr),qh=VC(Ws.stretch-Vi,en,mt,m.top),Zf=HC(Ws.fixed-$n,Ba,Ws.stretch,Yr),jd=VC(Au.stretch-Hi,Ei,st,m.left),Wd=HC(Au.fixed-An,ra,Au.stretch,Lr),Oh=VC(Ou.stretch-Vi,en,mt,m.top),fv=HC(Ou.fixed-$n,Ba,Ou.stretch,Yr),hv=new u(nf,qh),hh=new u(jd,qh),dv=new u(jd,Oh),_p=new u(nf,Oh),py=new u(bf/fe,Zf/fe),F1=new u(Wd/fe,fv/fe),q1=y*Math.PI/180;if(q1){var O1=Math.sin(q1),$w=Math.cos(q1),y0=[$w,-O1,O1,$w];hv._matMult(y0),hh._matMult(y0),_p._matMult(y0),dv._matMult(y0)}var YC=nl.stretch+nl.fixed,cq=Au.stretch+Au.fixed,KC=Ws.stretch+Ws.fixed,fq=Ou.stretch+Ou.fixed,jp={x:ne.paddedRect.x+Gw+YC,y:ne.paddedRect.y+Gw+KC,w:cq-YC,h:fq-KC},Qw=ra/fe/st,JC=Ba/fe/mt;return{tl:hv,tr:hh,bl:_p,br:dv,tex:jp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:py,pixelOffsetBR:F1,minFontScaleX:Qw,minFontScaleY:JC,isSDF:I}};if(!U||!ne.stretchX&&!ne.stretchY)J.push(Pa({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:Qe+1}));else for(var qo=MQ(Xt,_i,Lr),Na=MQ(ur,si,Yr),ja=0;ja0&&(Lr=Math.max(10,Lr),this.circleDiameter=Lr)}else{var Yr=fe.top*Fe-Qe,_i=fe.bottom*Fe+Qe,si=fe.left*Fe-Qe,Hi=fe.right*Fe+Qe,Ei=fe.collisionPadding;if(Ei&&(si-=Ei[0]*Fe,Yr-=Ei[1]*Fe,Hi+=Ei[2]*Fe,_i+=Ei[3]*Fe),mt){var Vi=new u(si,Yr),en=new u(Hi,Yr),An=new u(si,_i),ra=new u(Hi,_i),$n=mt*Math.PI/180;Vi._rotate($n),en._rotate($n),An._rotate($n),ra._rotate($n),si=Math.min(Vi.x,en.x,An.x,ra.x),Hi=Math.max(Vi.x,en.x,An.x,ra.x),Yr=Math.min(Vi.y,en.y,An.y,ra.y),_i=Math.max(Vi.y,en.y,An.y,ra.y)}y.emplaceBack(I.x,I.y,si,Yr,Hi,_i,U,J,ne)}this.boxEndIndex=y.length},jw=function(y,I){if(y===void 0&&(y=[]),I===void 0&&(I=eQe),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)};jw.prototype.push=function(y){this.data.push(y),this.length++,this._up(this.length-1)},jw.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}},jw.prototype.peek=function(){return this.data[0]},jw.prototype._up=function(y){for(var I=this,U=I.data,J=I.compare,ne=U[y];y>0;){var fe=y-1>>1,Fe=U[fe];if(J(ne,Fe)>=0)break;U[y]=Fe,y=fe}U[y]=ne},jw.prototype._down=function(y){for(var I=this,U=I.data,J=I.compare,ne=this.length>>1,fe=U[y];y=0)break;U[y]=Qe,y=Fe}U[y]=fe};function eQe(m,y){return my?1:0}function tQe(m,y,I){y===void 0&&(y=1),I===void 0&&(I=!1);for(var U=1/0,J=1/0,ne=-1/0,fe=-1/0,Fe=m[0],Qe=0;Qene)&&(ne=st.x),(!Qe||st.y>fe)&&(fe=st.y)}var mt=ne-U,Xt=fe-J,ur=Math.min(mt,Xt),nr=ur/2,Lr=new jw([],rQe);if(ur===0)return new u(U,J);for(var Yr=U;Yrsi.d||!si.d)&&(si=Ei,I&&console.log("found best %d after %d probes",Math.round(1e4*Ei.d)/1e4,Hi)),!(Ei.max-si.d<=y)&&(nr=Ei.h/2,Lr.push(new Ww(Ei.p.x-nr,Ei.p.y-nr,nr,m)),Lr.push(new Ww(Ei.p.x+nr,Ei.p.y-nr,nr,m)),Lr.push(new Ww(Ei.p.x-nr,Ei.p.y+nr,nr,m)),Lr.push(new Ww(Ei.p.x+nr,Ei.p.y+nr,nr,m)),Hi+=4)}return I&&(console.log("num probes: "+Hi),console.log("best distance: "+si.d)),si.p}function rQe(m,y){return y.max-m.max}function Ww(m,y,I,U){this.p=new u(m,y),this.h=I,this.d=iQe(this.p,U),this.max=this.d+this.h*Math.SQRT2}function iQe(m,y){for(var I=!1,U=1/0,J=0;Jm.y!=mt.y>m.y&&m.x<(mt.x-st.x)*(m.y-st.y)/(mt.y-st.y)+st.x&&(I=!I),U=Math.min(U,cg(m,st,mt))}return(I?1:-1)*Math.sqrt(U)}function nQe(m){for(var y=0,I=0,U=0,J=m[0],ne=0,fe=J.length,Fe=fe-1;ne=rn||y0.y<0||y0.y>=rn||sQe(m,y0,$w,I,U,J,Na,m.layers[0],m.collisionBoxArray,y.index,y.sourceLayerIndex,m.index,si,en,$n,Qe,Ei,An,Ba,nr,y,ne,st,mt,fe)};if(_a==="line")for(var us=0,zo=AQ(y.geometry,0,0,rn,rn);us1){var qh=J$e(bf,ra,I.vertical||Lr,U,Yr,Hi);qh&&ja(bf,qh)}}else if(y.type==="Polygon")for(var Zf=0,jd=zw(y.geometry,0);ZfR1&&re(m.layerIds[0]+': Value for "text-size" is >= '+TS+'. Reduce your "text-size".')):_i.kind==="composite"&&(si=[Sd*nr.compositeTextSizes[0].evaluate(fe,{},Lr),Sd*nr.compositeTextSizes[1].evaluate(fe,{},Lr)],(si[0]>R1||si[1]>R1)&&re(m.layerIds[0]+': Value for "text-size" is >= '+TS+'. Reduce your "text-size".')),m.addSymbols(m.text,Yr,si,Fe,ne,fe,st,y,Qe.lineStartIndex,Qe.lineLength,ur,Lr);for(var Hi=0,Ei=mt;HiR1&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TS+'. Reduce your "icon-size".')):hv.kind==="composite"&&(hh=[Sd*en.compositeIconSizes[0].evaluate(Vi,{},ra),Sd*en.compositeIconSizes[1].evaluate(Vi,{},ra)],(hh[0]>R1||hh[1]>R1)&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TS+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Oh,hh,Ei,Hi,Vi,!1,y,_a.lineStartIndex,_a.lineLength,-1,ra),il=m.icon.placedSymbolArray.length-1,fv&&(zo=fv.length*4,m.addSymbols(m.icon,fv,hh,Ei,Hi,Vi,uv.vertical,y,_a.lineStartIndex,_a.lineLength,-1,ra),nl=m.icon.placedSymbolArray.length-1)}for(var dv in U.horizontal){var _p=U.horizontal[dv];if(!Pa){Au=$(_p.text);var py=Fe.layout.get("text-rotate").evaluate(Vi,{},ra);Pa=new GC(Qe,y,st,mt,Xt,_p,ur,nr,Lr,py)}var F1=_p.positionedLines.length===1;if(rl+=kQ(m,y,_p,ne,Fe,Lr,Vi,Yr,_a,U.vertical?uv.horizontal:uv.horizontalOnly,F1?Object.keys(U.horizontal):[dv],Ws,il,en,ra),F1)break}U.vertical&&(ou+=kQ(m,y,U.vertical,ne,Fe,Lr,Vi,Yr,_a,uv.vertical,["vertical"],Ws,nl,en,ra));var q1=Pa?Pa.boxStartIndex:m.collisionBoxArray.length,O1=Pa?Pa.boxEndIndex:m.collisionBoxArray.length,$w=Na?Na.boxStartIndex:m.collisionBoxArray.length,y0=Na?Na.boxEndIndex:m.collisionBoxArray.length,YC=qo?qo.boxStartIndex:m.collisionBoxArray.length,cq=qo?qo.boxEndIndex:m.collisionBoxArray.length,KC=ja?ja.boxStartIndex:m.collisionBoxArray.length,fq=ja?ja.boxEndIndex:m.collisionBoxArray.length,jp=-1,Qw=function(MS,jQ){return MS&&MS.circleDiameter?Math.max(MS.circleDiameter,jQ):jQ};jp=Qw(Pa,jp),jp=Qw(Na,jp),jp=Qw(qo,jp),jp=Qw(ja,jp);var JC=jp>-1?1:0;JC&&(jp*=$n/Zi),m.glyphOffsetArray.length>=au.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Vi.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,Vi.sortKey),m.symbolInstances.emplaceBack(y.x,y.y,Ws.right>=0?Ws.right:-1,Ws.center>=0?Ws.center:-1,Ws.left>=0?Ws.left:-1,Ws.vertical||-1,il,nl,Au,q1,O1,$w,y0,YC,cq,KC,fq,st,rl,ou,us,zo,JC,0,ur,Ou,nf,jp)}function lQe(m,y,I,U){var J=m.compareText;if(!(y in J))J[y]=[];else for(var ne=J[y],fe=ne.length-1;fe>=0;fe--)if(U.dist(ne[fe])0)&&(fe.value.kind!=="constant"||fe.value.value.length>0),mt=Qe.value.kind!=="constant"||!!Qe.value.value||Object.keys(Qe.parameters).length>0,Xt=ne.get("symbol-sort-key");if(this.features=[],!(!st&&!mt)){for(var ur=I.iconDependencies,nr=I.glyphDependencies,Lr=I.availableImages,Yr=new pn(this.zoom),_i=0,si=y;_i=0;for(var ou=0,il=Ba.sections;ou=0;Qe--)fe[Qe]={x:I[Qe].x,y:I[Qe].y,tileUnitDistanceFromAnchor:ne},Qe>0&&(ne+=I[Qe-1].dist(I[Qe]));for(var st=0;st0},au.prototype.hasIconData=function(){return this.icon.segments.get().length>0},au.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},au.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},au.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},au.prototype.addIndicesForPlacedSymbol=function(y,I){for(var U=y.placedSymbolArray.get(I),J=U.vertexStartIndex+U.numGlyphs*4,ne=U.vertexStartIndex;ne1||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,J=this.symbolInstanceIndexes;U=0&&st.indexOf(Fe)===Qe&&I.addIndicesForPlacedSymbol(I.text,Fe)}),fe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,fe.verticalPlacedTextSymbolIndex),fe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,fe.placedIconSymbolIndex),fe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,fe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Z("SymbolBucket",au,{omit:["layers","collisionBoxArray","features","compareText"]}),au.MAX_GLYPHS=65535,au.addDynamicAttributes=aq;function hQe(m,y){return y.replace(/{([^{}]+)}/g,function(I,U){return U in m?String(m[U]):""})}var dQe=new Oi({"symbol-placement":new At(on.layout_symbol["symbol-placement"]),"symbol-spacing":new At(on.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new At(on.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Er(on.layout_symbol["symbol-sort-key"]),"symbol-z-order":new At(on.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new At(on.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new At(on.layout_symbol["icon-ignore-placement"]),"icon-optional":new At(on.layout_symbol["icon-optional"]),"icon-rotation-alignment":new At(on.layout_symbol["icon-rotation-alignment"]),"icon-size":new Er(on.layout_symbol["icon-size"]),"icon-text-fit":new At(on.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new At(on.layout_symbol["icon-text-fit-padding"]),"icon-image":new Er(on.layout_symbol["icon-image"]),"icon-rotate":new Er(on.layout_symbol["icon-rotate"]),"icon-padding":new At(on.layout_symbol["icon-padding"]),"icon-keep-upright":new At(on.layout_symbol["icon-keep-upright"]),"icon-offset":new Er(on.layout_symbol["icon-offset"]),"icon-anchor":new Er(on.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new At(on.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new At(on.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new At(on.layout_symbol["text-rotation-alignment"]),"text-field":new Er(on.layout_symbol["text-field"]),"text-font":new Er(on.layout_symbol["text-font"]),"text-size":new Er(on.layout_symbol["text-size"]),"text-max-width":new Er(on.layout_symbol["text-max-width"]),"text-line-height":new At(on.layout_symbol["text-line-height"]),"text-letter-spacing":new Er(on.layout_symbol["text-letter-spacing"]),"text-justify":new Er(on.layout_symbol["text-justify"]),"text-radial-offset":new Er(on.layout_symbol["text-radial-offset"]),"text-variable-anchor":new At(on.layout_symbol["text-variable-anchor"]),"text-anchor":new Er(on.layout_symbol["text-anchor"]),"text-max-angle":new At(on.layout_symbol["text-max-angle"]),"text-writing-mode":new At(on.layout_symbol["text-writing-mode"]),"text-rotate":new Er(on.layout_symbol["text-rotate"]),"text-padding":new At(on.layout_symbol["text-padding"]),"text-keep-upright":new At(on.layout_symbol["text-keep-upright"]),"text-transform":new Er(on.layout_symbol["text-transform"]),"text-offset":new Er(on.layout_symbol["text-offset"]),"text-allow-overlap":new At(on.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new At(on.layout_symbol["text-ignore-placement"]),"text-optional":new At(on.layout_symbol["text-optional"])}),vQe=new Oi({"icon-opacity":new Er(on.paint_symbol["icon-opacity"]),"icon-color":new Er(on.paint_symbol["icon-color"]),"icon-halo-color":new Er(on.paint_symbol["icon-halo-color"]),"icon-halo-width":new Er(on.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Er(on.paint_symbol["icon-halo-blur"]),"icon-translate":new At(on.paint_symbol["icon-translate"]),"icon-translate-anchor":new At(on.paint_symbol["icon-translate-anchor"]),"text-opacity":new Er(on.paint_symbol["text-opacity"]),"text-color":new Er(on.paint_symbol["text-color"],{runtimeType:Tl,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new Er(on.paint_symbol["text-halo-color"]),"text-halo-width":new Er(on.paint_symbol["text-halo-width"]),"text-halo-blur":new Er(on.paint_symbol["text-halo-blur"]),"text-translate":new At(on.paint_symbol["text-translate"]),"text-translate-anchor":new At(on.paint_symbol["text-translate-anchor"])}),oq={paint:vQe,layout:dQe},Yw=function(y){this.type=y.property.overrides?y.property.overrides.runtimeType:Ec,this.defaultValue=y};Yw.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},Yw.prototype.eachChild=function(y){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;y(I._styleExpression.expression)}},Yw.prototype.outputDefined=function(){return!1},Yw.prototype.serialize=function(){return null},Z("FormatSectionOverride",Yw,{omit:["defaultValue"]});var pQe=function(m){function y(I){m.call(this,I,oq)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(U,J){if(m.prototype.recalculate.call(this,U,J),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 ne=this.layout.get("text-writing-mode");if(ne){for(var fe=[],Fe=0,Qe=ne;Fe",targetMapId:J,sourceMapId:fe.mapId})}}},Kw.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 J=this.cancelCallbacks[U];delete this.cancelCallbacks[U],J&&J()}else ke()||I.mustQueue?(this.tasks[U]=I,this.taskQueue.push(U),this.invoker.trigger()):this.processTask(U,I)},Kw.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)}},Kw.prototype.processTask=function(y,I){var U=this;if(I.type===""){var J=this.callbacks[y];delete this.callbacks[y],J&&(I.error?J(We(I.error)):J(null,We(I.data)))}else{var ne=!1,fe=Te(this.globalScope)?void 0:[],Fe=I.hasCallback?function(ur,nr){ne=!0,delete U.cancelCallbacks[y],U.target.postMessage({id:y,type:"",sourceMapId:U.mapId,error:ur?Ue(ur):null,data:Ue(nr,fe)},fe)}:function(ur){ne=!0},Qe=null,st=We(I.data);if(this.parent[I.type])Qe=this.parent[I.type](I.sourceMapId,st,Fe);else if(this.parent.getWorkerSource){var mt=I.type.split("."),Xt=this.parent.getWorkerSource(I.sourceMapId,mt[0],st.source);Qe=Xt[mt[1]](st,Fe)}else Fe(new Error("Could not find function "+I.type));!ne&&Qe&&Qe.cancel&&(this.cancelCallbacks[y]=Qe.cancel)}},Kw.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function MQe(m,y,I){y=Math.pow(2,I)-y-1;var U=RQ(m*256,y*256,I),J=RQ((m+1)*256,(y+1)*256,I);return U[0]+","+U[1]+","+J[0]+","+J[1]}function RQ(m,y,I){var U=2*Math.PI*6378137/256/Math.pow(2,I),J=m*U-2*Math.PI*6378137/2,ne=y*U-2*Math.PI*6378137/2;return[J,ne]}var jf=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]))};jf.prototype.setNorthEast=function(y){return this._ne=y instanceof sc?new sc(y.lng,y.lat):sc.convert(y),this},jf.prototype.setSouthWest=function(y){return this._sw=y instanceof sc?new sc(y.lng,y.lat):sc.convert(y),this},jf.prototype.extend=function(y){var I=this._sw,U=this._ne,J,ne;if(y instanceof sc)J=y,ne=y;else if(y instanceof jf){if(J=y._sw,ne=y._ne,!J||!ne)return this}else{if(Array.isArray(y))if(y.length===4||y.every(Array.isArray)){var fe=y;return this.extend(jf.convert(fe))}else{var Fe=y;return this.extend(sc.convert(Fe))}return this}return!I&&!U?(this._sw=new sc(J.lng,J.lat),this._ne=new sc(ne.lng,ne.lat)):(I.lng=Math.min(J.lng,I.lng),I.lat=Math.min(J.lat,I.lat),U.lng=Math.max(ne.lng,U.lng),U.lat=Math.max(ne.lat,U.lat)),this},jf.prototype.getCenter=function(){return new sc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},jf.prototype.getSouthWest=function(){return this._sw},jf.prototype.getNorthEast=function(){return this._ne},jf.prototype.getNorthWest=function(){return new sc(this.getWest(),this.getNorth())},jf.prototype.getSouthEast=function(){return new sc(this.getEast(),this.getSouth())},jf.prototype.getWest=function(){return this._sw.lng},jf.prototype.getSouth=function(){return this._sw.lat},jf.prototype.getEast=function(){return this._ne.lng},jf.prototype.getNorth=function(){return this._ne.lat},jf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},jf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},jf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},jf.prototype.contains=function(y){var I=sc.convert(y),U=I.lng,J=I.lat,ne=this._sw.lat<=J&&J<=this._ne.lat,fe=this._sw.lng<=U&&U<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=U&&U>=this._ne.lng),ne&&fe},jf.convert=function(y){return!y||y instanceof jf?y:new jf(y)};var zQ=63710088e-1,sc=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")};sc.prototype.wrap=function(){return new sc(E(this.lng,-180,180),this.lat)},sc.prototype.toArray=function(){return[this.lng,this.lat]},sc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},sc.prototype.distanceTo=function(y){var I=Math.PI/180,U=this.lat*I,J=y.lat*I,ne=Math.sin(U)*Math.sin(J)+Math.cos(U)*Math.cos(J)*Math.cos((y.lng-this.lng)*I),fe=zQ*Math.acos(Math.min(ne,1));return fe},sc.prototype.toBounds=function(y){y===void 0&&(y=0);var I=40075017,U=360*y/I,J=U/Math.cos(Math.PI/180*this.lat);return new jf(new sc(this.lng-J,this.lat-U),new sc(this.lng+J,this.lat+U))},sc.convert=function(y){if(y instanceof sc)return y;if(Array.isArray(y)&&(y.length===2||y.length===3))return new sc(Number(y[0]),Number(y[1]));if(!Array.isArray(y)&&typeof y=="object"&&y!==null)return new sc(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 FQ=2*Math.PI*zQ;function qQ(m){return FQ*Math.cos(m*Math.PI/180)}function OQ(m){return(180+m)/360}function BQ(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function NQ(m,y){return m/qQ(y)}function EQe(m){return m*360-180}function lq(m){var y=180-m*360;return 360/Math.PI*Math.atan(Math.exp(y*Math.PI/180))-90}function kQe(m,y){return m*qQ(lq(y))}function CQe(m){return 1/Math.cos(m*Math.PI/180)}var ib=function(y,I,U){U===void 0&&(U=0),this.x=+y,this.y=+I,this.z=+U};ib.fromLngLat=function(y,I){I===void 0&&(I=0);var U=sc.convert(y);return new ib(OQ(U.lng),BQ(U.lat),NQ(I,U.lat))},ib.prototype.toLngLat=function(){return new sc(EQe(this.x),lq(this.y))},ib.prototype.toAltitude=function(){return kQe(this.z,this.y)},ib.prototype.meterInMercatorCoordinateUnits=function(){return 1/FQ*CQe(lq(this.y))};var nb=function(y,I,U){this.z=y,this.x=I,this.y=U,this.key=SS(0,y,y,I,U)};nb.prototype.equals=function(y){return this.z===y.z&&this.x===y.x&&this.y===y.y},nb.prototype.url=function(y,I){var U=MQe(this.x,this.y,this.z),J=LQe(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}",J).replace("{bbox-epsg-3857}",U)},nb.prototype.getTilePoint=function(y){var I=Math.pow(2,this.z);return new u((y.x*I-this.x)*rn,(y.y*I-this.y)*rn)},nb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var UQ=function(y,I){this.wrap=y,this.canonical=I,this.key=SS(y,I.z,I.z,I.x,I.y)},Wf=function(y,I,U,J,ne){this.overscaledZ=y,this.wrap=I,this.canonical=new nb(U,+J,+ne),this.key=SS(I,y,U,J,ne)};Wf.prototype.equals=function(y){return this.overscaledZ===y.overscaledZ&&this.wrap===y.wrap&&this.canonical.equals(y.canonical)},Wf.prototype.scaledTo=function(y){var I=this.canonical.z-y;return y>this.canonical.z?new Wf(y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Wf(y,this.wrap,y,this.canonical.x>>I,this.canonical.y>>I)},Wf.prototype.calculateScaledKey=function(y,I){var U=this.canonical.z-y;return y>this.canonical.z?SS(this.wrap*+I,y,this.canonical.z,this.canonical.x,this.canonical.y):SS(this.wrap*+I,y,y,this.canonical.x>>U,this.canonical.y>>U)},Wf.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},Wf.prototype.children=function(y){if(this.overscaledZ>=y)return[new Wf(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,J=this.canonical.y*2;return[new Wf(I,this.wrap,I,U,J),new Wf(I,this.wrap,I,U+1,J),new Wf(I,this.wrap,I,U,J+1),new Wf(I,this.wrap,I,U+1,J+1)]},Wf.prototype.isLessThan=function(y){return this.wrapy.wrap?!1:this.overscaledZy.overscaledZ?!1:this.canonical.xy.canonical.x?!1:this.canonical.y0;ne--)J=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)},dy.prototype._unpackMapbox=function(y,I,U){return(y*256*256+I*256+U)/10-1e4},dy.prototype._unpackTerrarium=function(y,I,U){return y*256+I+U/256-32768},dy.prototype.getPixels=function(){return new lh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},dy.prototype.backfillBorder=function(y,I,U){if(this.dim!==y.dim)throw new Error("dem dimension mismatch");var J=I*this.dim,ne=I*this.dim+this.dim,fe=U*this.dim,Fe=U*this.dim+this.dim;switch(I){case-1:J=ne-1;break;case 1:ne=J+1;break}switch(U){case-1:fe=Fe-1;break;case 1:Fe=fe+1;break}for(var Qe=-I*this.dim,st=-U*this.dim,mt=fe;mt=0&&Xt[3]>=0&&Qe.insert(Fe,Xt[0],Xt[1],Xt[2],Xt[3])}},vy.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new pg.VectorTile(new La(this.rawTileData)).layers,this.sourceLayerCoder=new ZC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},vy.prototype.query=function(y,I,U,J){var ne=this;this.loadVTLayers();for(var fe=y.params||{},Fe=rn/y.tileSize/y.scale,Qe=be(fe.filter),st=y.queryGeometry,mt=y.queryPadding*Fe,Xt=HQ(st),ur=this.grid.query(Xt.minX-mt,Xt.minY-mt,Xt.maxX+mt,Xt.maxY+mt),nr=HQ(y.cameraQueryGeometry),Lr=this.grid3D.query(nr.minX-mt,nr.minY-mt,nr.maxX+mt,nr.maxY+mt,function(An,ra,$n,Ba){return pp(y.cameraQueryGeometry,An-mt,ra-mt,$n+mt,Ba+mt)}),Yr=0,_i=Lr;Yr<_i.length;Yr+=1){var si=_i[Yr];ur.push(si)}ur.sort(IQe);for(var Hi={},Ei,Vi=function(An){var ra=ur[An];if(ra!==Ei){Ei=ra;var $n=ne.featureIndexArray.get(ra),Ba=null;ne.loadMatchingFeature(Hi,$n.bucketIndex,$n.sourceLayerIndex,$n.featureIndex,Qe,fe.layers,fe.availableImages,I,U,J,function(_a,Pa,qo){return Ba||(Ba=da(_a)),Pa.queryIntersectsFeature(st,_a,qo,Ba,ne.z,y.transform,Fe,y.pixelPosMatrix)})}},en=0;enJ)ne=!1;else if(!I)ne=!0;else if(this.expirationTime=Ha.maxzoom)&&Ha.visibility!=="none"){h(Sn,this.zoom,Zt);var oo=Si[Ha.id]=Ha.createBucket({index:gi.bucketLayerIDs.length,layers:Sn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ka,sourceID:this.source});oo.populate(jn,Mi,this.tileID.canonical),gi.bucketLayerIDs.push(Sn.map(function(hi){return hi.id}))}}}}var xn,_t,br,Hr,ti=i.mapObject(Mi.glyphDependencies,function(hi){return Object.keys(hi).map(Number)});Object.keys(ti).length?yr.send("getGlyphs",{uid:this.uid,stacks:ti},function(hi,Ji){xn||(xn=hi,_t=Ji,an.call(Zr))}):_t={};var zi=Object.keys(Mi.iconDependencies);zi.length?yr.send("getImages",{icons:zi,source:this.source,tileID:this.tileID,type:"icons"},function(hi,Ji){xn||(xn=hi,br=Ji,an.call(Zr))}):br={};var Yi=Object.keys(Mi.patternDependencies);Yi.length?yr.send("getImages",{icons:Yi,source:this.source,tileID:this.tileID,type:"patterns"},function(hi,Ji){xn||(xn=hi,Hr=Ji,an.call(Zr))}):Hr={},an.call(this);function an(){if(xn)return Fr(xn);if(_t&&br&&Hr){var hi=new c(_t),Ji=new i.ImageAtlas(br,Hr);for(var ua in Si){var Fn=Si[ua];Fn instanceof i.SymbolBucket?(h(Fn.layers,this.zoom,Zt),i.performSymbolLayout(Fn,_t,hi.positions,br,Ji.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Fn.hasPattern&&(Fn instanceof i.LineBucket||Fn instanceof i.FillBucket||Fn instanceof i.FillExtrusionBucket)&&(h(Fn.layers,this.zoom,Zt),Fn.addFeatures(Mi,this.tileID.canonical,Ji.patternPositions))}this.status="done",Fr(null,{buckets:i.values(Si).filter(function(Sa){return!Sa.isEmpty()}),featureIndex:gi,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:hi.image,imageAtlas:Ji,glyphMap:this.returnDependencies?_t:null,iconMap:this.returnDependencies?br:null,glyphPositions:this.returnDependencies?hi.positions:null})}}};function h(It,ft,jt){for(var Zt=new i.EvaluationParameters(ft),yr=0,Fr=It;yr=0!=!!ft&&It.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(ft){this._feature=ft,this.extent=i.EXTENT,this.type=ft.type,this.properties=ft.tags,"id"in ft&&!isNaN(ft.id)&&(this.id=parseInt(ft.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ft=[],jt=0,Zt=this._feature.geometry;jt>31}function ke(It,ft){for(var jt=It.loadGeometry(),Zt=It.type,yr=0,Fr=0,Zr=jt.length,Vr=0;Vr>1;Te(It,ft,Zr,Zt,yr,Fr%2),ie(It,ft,jt,Zt,Zr-1,Fr+1),ie(It,ft,jt,Zr+1,yr,Fr+1)}}function Te(It,ft,jt,Zt,yr,Fr){for(;yr>Zt;){if(yr-Zt>600){var Zr=yr-Zt+1,Vr=jt-Zt+1,gi=Math.log(Zr),Si=.5*Math.exp(2*gi/3),Mi=.5*Math.sqrt(gi*Si*(Zr-Si)/Zr)*(Vr-Zr/2<0?-1:1),Pi=Math.max(Zt,Math.floor(jt-Vr*Si/Zr+Mi)),Gi=Math.min(yr,Math.floor(jt+(Zr-Vr)*Si/Zr+Mi));Te(It,ft,jt,Pi,Gi,Fr)}var Ki=ft[2*jt+Fr],ka=Zt,jn=yr;for(Ee(It,ft,Zt,jt),ft[2*yr+Fr]>Ki&&Ee(It,ft,Zt,yr);kaKi;)jn--}ft[2*Zt+Fr]===Ki?Ee(It,ft,Zt,jn):(jn++,Ee(It,ft,jn,yr)),jn<=jt&&(Zt=jn+1),jt<=jn&&(yr=jn-1)}}function Ee(It,ft,jt,Zt){Ae(It,jt,Zt),Ae(ft,2*jt,2*Zt),Ae(ft,2*jt+1,2*Zt+1)}function Ae(It,ft,jt){var Zt=It[ft];It[ft]=It[jt],It[jt]=Zt}function ze(It,ft,jt,Zt,yr,Fr,Zr){for(var Vr=[0,It.length-1,0],gi=[],Si,Mi;Vr.length;){var Pi=Vr.pop(),Gi=Vr.pop(),Ki=Vr.pop();if(Gi-Ki<=Zr){for(var ka=Ki;ka<=Gi;ka++)Si=ft[2*ka],Mi=ft[2*ka+1],Si>=jt&&Si<=yr&&Mi>=Zt&&Mi<=Fr&&gi.push(It[ka]);continue}var jn=Math.floor((Ki+Gi)/2);Si=ft[2*jn],Mi=ft[2*jn+1],Si>=jt&&Si<=yr&&Mi>=Zt&&Mi<=Fr&&gi.push(It[jn]);var la=(Pi+1)%2;(Pi===0?jt<=Si:Zt<=Mi)&&(Vr.push(Ki),Vr.push(jn-1),Vr.push(la)),(Pi===0?yr>=Si:Fr>=Mi)&&(Vr.push(jn+1),Vr.push(Gi),Vr.push(la))}return gi}function Ce(It,ft,jt,Zt,yr,Fr){for(var Zr=[0,It.length-1,0],Vr=[],gi=yr*yr;Zr.length;){var Si=Zr.pop(),Mi=Zr.pop(),Pi=Zr.pop();if(Mi-Pi<=Fr){for(var Gi=Pi;Gi<=Mi;Gi++)me(ft[2*Gi],ft[2*Gi+1],jt,Zt)<=gi&&Vr.push(It[Gi]);continue}var Ki=Math.floor((Pi+Mi)/2),ka=ft[2*Ki],jn=ft[2*Ki+1];me(ka,jn,jt,Zt)<=gi&&Vr.push(It[Ki]);var la=(Si+1)%2;(Si===0?jt-yr<=ka:Zt-yr<=jn)&&(Zr.push(Pi),Zr.push(Ki-1),Zr.push(la)),(Si===0?jt+yr>=ka:Zt+yr>=jn)&&(Zr.push(Ki+1),Zr.push(Mi),Zr.push(la))}return Vr}function me(It,ft,jt,Zt){var yr=It-jt,Fr=ft-Zt;return yr*yr+Fr*Fr}var De=function(It){return It[0]},ce=function(It){return It[1]},Ge=function(ft,jt,Zt,yr,Fr){jt===void 0&&(jt=De),Zt===void 0&&(Zt=ce),yr===void 0&&(yr=64),Fr===void 0&&(Fr=Float64Array),this.nodeSize=yr,this.points=ft;for(var Zr=ft.length<65536?Uint16Array:Uint32Array,Vr=this.ids=new Zr(ft.length),gi=this.coords=new Fr(ft.length*2),Si=0;Si=yr;Mi--){var Pi=+Date.now();gi=this._cluster(gi,Mi),this.trees[Mi]=new Ge(gi,Ke,xt,Zr,Float32Array),Zt&&console.log("z%d: %d clusters in %dms",Mi,gi.length,+Date.now()-Pi)}return Zt&&console.timeEnd("total time"),this},ct.prototype.getClusters=function(ft,jt){var Zt=((ft[0]+180)%360+360)%360-180,yr=Math.max(-90,Math.min(90,ft[1])),Fr=ft[2]===180?180:((ft[2]+180)%360+360)%360-180,Zr=Math.max(-90,Math.min(90,ft[3]));if(ft[2]-ft[0]>=360)Zt=-180,Fr=180;else if(Zt>Fr){var Vr=this.getClusters([Zt,yr,180,Zr],jt),gi=this.getClusters([-180,yr,Fr,Zr],jt);return Vr.concat(gi)}for(var Si=this.trees[this._limitZoom(jt)],Mi=Si.range(kt(Zt),Ct(Zr),kt(Fr),Ct(yr)),Pi=[],Gi=0,Ki=Mi;Gijt&&(jn+=jo.numPoints||1)}if(jn>=gi){for(var oa=Pi.x*ka,Sn=Pi.y*ka,Ha=Vr&&ka>1?this._map(Pi,!0):null,oo=(Mi<<5)+(jt+1)+this.points.length,xn=0,_t=Ki;xn<_t.length;xn+=1){var br=_t[xn],Hr=Gi.points[br];if(!(Hr.zoom<=jt)){Hr.zoom=jt;var ti=Hr.numPoints||1;oa+=Hr.x*ti,Sn+=Hr.y*ti,Hr.parentId=oo,Vr&&(Ha||(Ha=this._map(Pi,!0)),Vr(Ha,this._map(Hr)))}}Pi.parentId=oo,Zt.push(qt(oa/jn,Sn/jn,oo,jn,Ha))}else if(Zt.push(Pi),jn>1)for(var zi=0,Yi=Ki;zi>5},ct.prototype._getOriginZoom=function(ft){return(ft-this.points.length)%32},ct.prototype._map=function(ft,jt){if(ft.numPoints)return jt?er({},ft.properties):ft.properties;var Zt=this.points[ft.index].properties,yr=this.options.map(Zt);return jt&&yr===Zt?er({},yr):yr};function qt(It,ft,jt,Zt,yr){return{x:It,y:ft,zoom:1/0,id:jt,parentId:-1,numPoints:Zt,properties:yr}}function rt(It,ft){var jt=It.geometry.coordinates,Zt=jt[0],yr=jt[1];return{x:kt(Zt),y:Ct(yr),zoom:1/0,index:ft,parentId:-1}}function ot(It){return{type:"Feature",id:It.id,properties:Dt(It),geometry:{type:"Point",coordinates:[Yt(It.x),xr(It.y)]}}}function Dt(It){var ft=It.numPoints,jt=ft>=1e4?Math.round(ft/1e3)+"k":ft>=1e3?Math.round(ft/100)/10+"k":ft;return er(er({},It.properties),{cluster:!0,cluster_id:It.id,point_count:ft,point_count_abbreviated:jt})}function kt(It){return It/360+.5}function Ct(It){var ft=Math.sin(It*Math.PI/180),jt=.5-.25*Math.log((1+ft)/(1-ft))/Math.PI;return jt<0?0:jt>1?1:jt}function Yt(It){return(It-.5)*360}function xr(It){var ft=(180-It*360)*Math.PI/180;return 360*Math.atan(Math.exp(ft))/Math.PI-90}function er(It,ft){for(var jt in ft)It[jt]=ft[jt];return It}function Ke(It){return It.x}function xt(It){return It.y}function bt(It,ft,jt,Zt){for(var yr=Zt,Fr=jt-ft>>1,Zr=jt-ft,Vr,gi=It[ft],Si=It[ft+1],Mi=It[jt],Pi=It[jt+1],Gi=ft+3;Giyr)Vr=Gi,yr=Ki;else if(Ki===yr){var ka=Math.abs(Gi-Fr);kaZt&&(Vr-ft>3&&bt(It,ft,Vr,Zt),It[Vr+2]=yr,jt-Vr>3&&bt(It,Vr,jt,Zt))}function Lt(It,ft,jt,Zt,yr,Fr){var Zr=yr-jt,Vr=Fr-Zt;if(Zr!==0||Vr!==0){var gi=((It-jt)*Zr+(ft-Zt)*Vr)/(Zr*Zr+Vr*Vr);gi>1?(jt=yr,Zt=Fr):gi>0&&(jt+=Zr*gi,Zt+=Vr*gi)}return Zr=It-jt,Vr=ft-Zt,Zr*Zr+Vr*Vr}function St(It,ft,jt,Zt){var yr={id:typeof It=="undefined"?null:It,type:ft,geometry:jt,tags:Zt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Et(yr),yr}function Et(It){var ft=It.geometry,jt=It.type;if(jt==="Point"||jt==="MultiPoint"||jt==="LineString")dt(It,ft);else if(jt==="Polygon"||jt==="MultiLineString")for(var Zt=0;Zt0&&(Zt?Zr+=(yr*Si-gi*Fr)/2:Zr+=Math.sqrt(Math.pow(gi-yr,2)+Math.pow(Si-Fr,2))),yr=gi,Fr=Si}var Mi=ft.length-3;ft[2]=1,bt(ft,0,Mi,jt),ft[Mi+2]=1,ft.size=Math.abs(Zr),ft.start=0,ft.end=ft.size}function Br(It,ft,jt,Zt){for(var yr=0;yr1?1:jt}function ut(It,ft,jt,Zt,yr,Fr,Zr,Vr){if(jt/=ft,Zt/=ft,Fr>=jt&&Zr=Zt)return null;for(var gi=[],Si=0;Si=jt&&ka=Zt)continue;var jn=[];if(Gi==="Point"||Gi==="MultiPoint")Ne(Pi,jn,jt,Zt,yr);else if(Gi==="LineString")Ye(Pi,jn,jt,Zt,yr,!1,Vr.lineMetrics);else if(Gi==="MultiLineString")Xe(Pi,jn,jt,Zt,yr,!1);else if(Gi==="Polygon")Xe(Pi,jn,jt,Zt,yr,!0);else if(Gi==="MultiPolygon")for(var la=0;la=jt&&Zr<=Zt&&(ft.push(It[Fr]),ft.push(It[Fr+1]),ft.push(It[Fr+2]))}}function Ye(It,ft,jt,Zt,yr,Fr,Zr){for(var Vr=Ve(It),gi=yr===0?Le:xe,Si=It.start,Mi,Pi,Gi=0;Gijt&&(Pi=gi(Vr,Ki,ka,la,Fa,jt),Zr&&(Vr.start=Si+Mi*Pi)):Da>Zt?jo=jt&&(Pi=gi(Vr,Ki,ka,la,Fa,jt),oa=!0),jo>Zt&&Da<=Zt&&(Pi=gi(Vr,Ki,ka,la,Fa,Zt),oa=!0),!Fr&&oa&&(Zr&&(Vr.end=Si+Mi*Pi),ft.push(Vr),Vr=Ve(It)),Zr&&(Si+=Mi)}var Sn=It.length-3;Ki=It[Sn],ka=It[Sn+1],jn=It[Sn+2],Da=yr===0?Ki:ka,Da>=jt&&Da<=Zt&&ht(Vr,Ki,ka,jn),Sn=Vr.length-3,Fr&&Sn>=3&&(Vr[Sn]!==Vr[0]||Vr[Sn+1]!==Vr[1])&&ht(Vr,Vr[0],Vr[1],Vr[2]),Vr.length&&ft.push(Vr)}function Ve(It){var ft=[];return ft.size=It.size,ft.start=It.start,ft.end=It.end,ft}function Xe(It,ft,jt,Zt,yr,Fr){for(var Zr=0;ZrZr.maxX&&(Zr.maxX=Mi),Pi>Zr.maxY&&(Zr.maxY=Pi)}return Zr}function ai(It,ft,jt,Zt){var yr=ft.geometry,Fr=ft.type,Zr=[];if(Fr==="Point"||Fr==="MultiPoint")for(var Vr=0;Vr0&&ft.size<(yr?Zr:Zt)){jt.numPoints+=ft.length/3;return}for(var Vr=[],gi=0;giZr)&&(jt.numSimplified++,Vr.push(ft[gi]),Vr.push(ft[gi+1])),jt.numPoints++;yr&&ri(Vr,Fr),It.push(Vr)}function ri(It,ft){for(var jt=0,Zt=0,yr=It.length,Fr=yr-2;Zt0===ft)for(Zt=0,yr=It.length;Zt24)throw new Error("maxZoom should be in the 0-24 range");if(ft.promoteId&&ft.generateId)throw new Error("promoteId and generateId cannot be used together.");var Zt=Ht(It,ft);this.tiles={},this.tileCoords=[],jt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ft.indexMaxZoom,ft.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Zt=Se(Zt,ft),Zt.length&&this.splitTile(Zt,0,0,0),jt&&(Zt.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)))}nn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},nn.prototype.splitTile=function(It,ft,jt,Zt,yr,Fr,Zr){for(var Vr=[It,ft,jt,Zt],gi=this.options,Si=gi.debug;Vr.length;){Zt=Vr.pop(),jt=Vr.pop(),ft=Vr.pop(),It=Vr.pop();var Mi=1<1&&console.time("creation"),Gi=this.tiles[Pi]=Qr(It,ft,jt,Zt,gi),this.tileCoords.push({z:ft,x:jt,y:Zt}),Si)){Si>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ft,jt,Zt,Gi.numFeatures,Gi.numPoints,Gi.numSimplified),console.timeEnd("creation"));var Ki="z"+ft;this.stats[Ki]=(this.stats[Ki]||0)+1,this.total++}if(Gi.source=It,yr){if(ft===gi.maxZoom||ft===yr)continue;var ka=1<1&&console.time("clipping");var jn=.5*gi.buffer/gi.extent,la=.5-jn,Fa=.5+jn,Da=1+jn,jo,oa,Sn,Ha,oo,xn;jo=oa=Sn=Ha=null,oo=ut(It,Mi,jt-jn,jt+Fa,0,Gi.minX,Gi.maxX,gi),xn=ut(It,Mi,jt+la,jt+Da,0,Gi.minX,Gi.maxX,gi),It=null,oo&&(jo=ut(oo,Mi,Zt-jn,Zt+Fa,1,Gi.minY,Gi.maxY,gi),oa=ut(oo,Mi,Zt+la,Zt+Da,1,Gi.minY,Gi.maxY,gi),oo=null),xn&&(Sn=ut(xn,Mi,Zt-jn,Zt+Fa,1,Gi.minY,Gi.maxY,gi),Ha=ut(xn,Mi,Zt+la,Zt+Da,1,Gi.minY,Gi.maxY,gi),xn=null),Si>1&&console.timeEnd("clipping"),Vr.push(jo||[],ft+1,jt*2,Zt*2),Vr.push(oa||[],ft+1,jt*2,Zt*2+1),Vr.push(Sn||[],ft+1,jt*2+1,Zt*2),Vr.push(Ha||[],ft+1,jt*2+1,Zt*2+1)}}},nn.prototype.getTile=function(It,ft,jt){var Zt=this.options,yr=Zt.extent,Fr=Zt.debug;if(It<0||It>24)return null;var Zr=1<1&&console.log("drilling down to z%d-%d-%d",It,ft,jt);for(var gi=It,Si=ft,Mi=jt,Pi;!Pi&&gi>0;)gi--,Si=Math.floor(Si/2),Mi=Math.floor(Mi/2),Pi=this.tiles[Wi(gi,Si,Mi)];return!Pi||!Pi.source?null:(Fr>1&&console.log("found parent tile z%d-%d-%d",gi,Si,Mi),Fr>1&&console.time("drilling down"),this.splitTile(Pi.source,gi,Si,Mi,It,ft,jt),Fr>1&&console.timeEnd("drilling down"),this.tiles[Vr]?Vt(this.tiles[Vr],yr):null)};function Wi(It,ft,jt){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function x(Y,z,K){var O,$,pe,de=i.browser.devicePixelRatio>1?"@2x":"",Ie=i.getJSON(z.transformRequest(z.normalizeSpriteURL(Y,de,".json"),i.ResourceType.SpriteJSON),function(Kt,ir){Ie=null,pe||(pe=Kt,O=ir,pt())}),$e=i.getImage(z.transformRequest(z.normalizeSpriteURL(Y,de,".png"),i.ResourceType.SpriteImage),function(Kt,ir){$e=null,pe||(pe=Kt,$=ir,pt())});function pt(){if(pe)K(pe);else if(O&&$){var Kt=i.browser.getImageData($),ir={};for(var Jt in O){var vt=O[Jt],Pt=vt.width,Wt=vt.height,rr=vt.x,dr=vt.y,pr=vt.sdf,kr=vt.pixelRatio,Ar=vt.stretchX,gr=vt.stretchY,Cr=vt.content,cr=new i.RGBAImage({width:Pt,height:Wt});i.RGBAImage.copy(Kt,cr,{x:rr,y:dr},{x:0,y:0},{width:Pt,height:Wt}),ir[Jt]={data:cr,pixelRatio:kr,sdf:pr,stretchX:Ar,stretchY:gr,content:Cr}}K(null,ir)}}return{cancel:function(){Ie&&(Ie.cancel(),Ie=null),$e&&($e.cancel(),$e=null)}}}function b(Y){var z=Y.userImage;if(z&&z.render){var K=z.render();if(K)return Y.data.replace(new Uint8Array(z.data.buffer)),!0}return!1}var g=1,E=function(Y){function z(){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&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.isLoaded=function(){return this.loaded},z.prototype.setLoaded=function(O){if(this.loaded!==O&&(this.loaded=O,O)){for(var $=0,pe=this.requestors;$=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 z=this.ctx.getImageData(0,0,this.size,this.size),K=new Uint8ClampedArray(this.size*this.size),O=0;O65535){Kt(new Error("glyphs > 65535 not supported"));return}if(vt.ranges[Wt]){Kt(null,{stack:ir,id:Jt,glyph:Pt});return}var rr=vt.requests[Wt];rr||(rr=vt.requests[Wt]=[],P.loadGlyphRange(ir,Wt,O.url,O.requestManager,function(dr,pr){if(pr){for(var kr in pr)O._doesCharSupportLocalGlyph(+kr)||(vt.glyphs[+kr]=pr[+kr]);vt.ranges[Wt]=!0}for(var Ar=0,gr=rr;Ar1&&(pt=z[++$e]);var ir=Math.abs(Kt-pt.left),Jt=Math.abs(Kt-pt.right),vt=Math.min(ir,Jt),Pt=void 0,Wt=pe/O*($+1);if(pt.isDash){var rr=$-Math.abs(Wt);Pt=Math.sqrt(vt*vt+rr*rr)}else Pt=$-Math.sqrt(vt*vt+Wt*Wt);this.data[Ie+Kt]=Math.max(0,Math.min(255,Pt+128))}},H.prototype.addRegularDash=function(z){for(var K=z.length-1;K>=0;--K){var O=z[K],$=z[K+1];O.zeroLength?z.splice(K,1):$&&$.isDash===O.isDash&&($.left=O.left,z.splice(K,1))}var pe=z[0],de=z[z.length-1];pe.isDash===de.isDash&&(pe.left=de.left-this.width,de.right=pe.right+this.width);for(var Ie=this.width*this.nextRow,$e=0,pt=z[$e],Kt=0;Kt1&&(pt=z[++$e]);var ir=Math.abs(Kt-pt.left),Jt=Math.abs(Kt-pt.right),vt=Math.min(ir,Jt),Pt=pt.isDash?vt:-vt;this.data[Ie+Kt]=Math.max(0,Math.min(255,Pt+128))}},H.prototype.addDash=function(z,K){var O=K?7:0,$=2*O+1;if(this.nextRow+$>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var pe=0,de=0;de=O.minX&&z.x=O.minY&&z.y0&&(Kt[new i.OverscaledTileID(O.overscaledZ,Ie,$.z,de,$.y-1).key]={backfilled:!1},Kt[new i.OverscaledTileID(O.overscaledZ,O.wrap,$.z,$.x,$.y-1).key]={backfilled:!1},Kt[new i.OverscaledTileID(O.overscaledZ,pt,$.z,$e,$.y-1).key]={backfilled:!1}),$.y+10&&(pe.resourceTiming=O._resourceTiming,O._resourceTiming=[]),O.fire(new i.Event("data",pe))})},z.prototype.onAdd=function(O){this.map=O,this.load()},z.prototype.setData=function(O){var $=this;return this._data=O,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(pe){if(pe){$.fire(new i.ErrorEvent(pe));return}var de={dataType:"source",sourceDataType:"content"};$._collectResourceTiming&&$._resourceTiming&&$._resourceTiming.length>0&&(de.resourceTiming=$._resourceTiming,$._resourceTiming=[]),$.fire(new i.Event("data",de))}),this},z.prototype.getClusterExpansionZoom=function(O,$){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:O,source:this.id},$),this},z.prototype.getClusterChildren=function(O,$){return this.actor.send("geojson.getClusterChildren",{clusterId:O,source:this.id},$),this},z.prototype.getClusterLeaves=function(O,$,pe,de){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:O,limit:$,offset:pe},de),this},z.prototype._updateWorkerData=function(O){var $=this;this._loaded=!1;var pe=i.extend({},this.workerOptions),de=this._data;typeof de=="string"?(pe.request=this.map._requestManager.transformRequest(i.browser.resolveURL(de),i.ResourceType.Source),pe.request.collectResourceTiming=this._collectResourceTiming):pe.data=JSON.stringify(de),this.actor.send(this.type+".loadData",pe,function(Ie,$e){$._removed||$e&&$e.abandoned||($._loaded=!0,$e&&$e.resourceTiming&&$e.resourceTiming[$.id]&&($._resourceTiming=$e.resourceTiming[$.id].slice(0)),$.actor.send($.type+".coalesce",{source:pe.source},null),O(Ie))})},z.prototype.loaded=function(){return this._loaded},z.prototype.loadTile=function(O,$){var pe=this,de=O.actor?"reloadTile":"loadTile";O.actor=this.actor;var Ie={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.request=this.actor.send(de,Ie,function($e,pt){return delete O.request,O.unloadVectorData(),O.aborted?$(null):$e?$($e):(O.loadVectorData(pt,pe.map.painter,de==="reloadTile"),$(null))})},z.prototype.abortTile=function(O){O.request&&(O.request.cancel(),delete O.request),O.aborted=!0},z.prototype.unloadTile=function(O){O.unloadVectorData(),this.actor.send("removeTile",{uid:O.uid,type:this.type,source:this.id})},z.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},z.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},z.prototype.hasTransition=function(){return!1},z}(i.Evented),Me=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ke=function(Y){function z(K,O,$,pe){Y.call(this),this.id=K,this.dispatcher=$,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(pe),this.options=O}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.load=function(O,$){var pe=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(de,Ie){pe._loaded=!0,de?pe.fire(new i.ErrorEvent(de)):Ie&&(pe.image=Ie,O&&(pe.coordinates=O),$&&$(),pe._finishLoading())})},z.prototype.loaded=function(){return this._loaded},z.prototype.updateImage=function(O){var $=this;return!this.image||!O.url?this:(this.options.url=O.url,this.load(O.coordinates,function(){$.texture=null}),this)},z.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},z.prototype.onAdd=function(O){this.map=O,this.load()},z.prototype.setCoordinates=function(O){var $=this;this.coordinates=O;var pe=O.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(pe),this.minzoom=this.maxzoom=this.tileID.z;var de=pe.map(function(Ie){return $.tileID.getTilePoint(Ie)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(de[0].x,de[0].y,0,0),this._boundsArray.emplaceBack(de[1].x,de[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(de[3].x,de[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(de[2].x,de[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},z.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var O=this.map.painter.context,$=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(O,this.image,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var pe in this.tiles){var de=this.tiles[pe];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},z.prototype.loadTile=function(O,$){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={},$(null)):(O.state="errored",$(null))},z.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},z.prototype.hasTransition=function(){return!1},z}(i.Evented);function ge(Y){for(var z=1/0,K=1/0,O=-1/0,$=-1/0,pe=0,de=Y;pe$.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+$.start(0)+" and "+$.end(0)+"-second mark."))):this.video.currentTime=O}},z.prototype.getVideo=function(){return this.video},z.prototype.onAdd=function(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},z.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var O=this.map.painter.context,$=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE),$.texSubImage2D($.TEXTURE_2D,0,0,0,$.RGBA,$.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(O,this.video,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var pe in this.tiles){var de=this.tiles[pe];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},z.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},z.prototype.hasTransition=function(){return this.video&&!this.video.paused},z}(ke),Te=function(Y){function z(K,O,$,pe){Y.call(this,K,O,$,pe),O.coordinates?(!Array.isArray(O.coordinates)||O.coordinates.length!==4||O.coordinates.some(function(de){return!Array.isArray(de)||de.length!==2||de.some(function(Ie){return typeof Ie!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas!="string"&&!(O.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,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."+K,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate!==void 0?O.animate:!0}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.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()},z.prototype.getCanvas=function(){return this.canvas},z.prototype.onAdd=function(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()},z.prototype.onRemove=function(){this.pause()},z.prototype.prepare=function(){var O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var $=this.map.painter.context,pe=$.gl;this.boundsBuffer||(this.boundsBuffer=$.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture($,this.canvas,pe.RGBA,{premultiply:!0});for(var de in this.tiles){var Ie=this.tiles[de];Ie.state!=="loaded"&&(Ie.state="loaded",Ie.texture=this.texture)}}},z.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},z.prototype.hasTransition=function(){return this._playing},z.prototype._hasInvalidDimensions=function(){for(var O=0,$=[this.canvas.width,this.canvas.height];O<$.length;O+=1){var pe=$[O];if(isNaN(pe)||pe<=0)return!0}return!1},z}(ke),Ee={vector:W,raster:re,"raster-dem":ae,geojson:_e,video:ie,image:ke,canvas:Te},Ae=function(Y,z,K,O){var $=new Ee[z.type](Y,z,K,O);if($.id!==Y)throw new Error("Expected Source id to be "+Y+" instead of "+$.id);return i.bindAll(["load","abort","unload","serialize","prepare"],$),$},ze=function(Y){return Ee[Y]},Ce=function(Y,z){Ee[Y]=z};function me(Y,z){var K=i.identity([]);return i.translate(K,K,[1,1,0]),i.scale(K,K,[Y.width*.5,Y.height*.5,1]),i.multiply(K,K,Y.calculatePosMatrix(z.toUnwrapped()))}function De(Y,z,K){if(Y)for(var O=0,$=Y;O<$.length;O+=1){var pe=$[O],de=z[pe];if(de&&de.source===K&&de.type==="fill-extrusion")return!0}else for(var Ie in z){var $e=z[Ie];if($e.source===K&&$e.type==="fill-extrusion")return!0}return!1}function ce(Y,z,K,O,$,pe){var de=De($&&$.layers,z,Y.id),Ie=pe.maxPitchScaleFactor(),$e=Y.tilesIn(O,Ie,de);$e.sort(ct);for(var pt=[],Kt=0,ir=$e;Ktthis.max){var Ie=this._getAndRemoveByKey(this.order[0]);Ie&&this.onRemove(Ie)}return this},rt.prototype.has=function(z){return z.wrapped().key in this.data},rt.prototype.getAndRemove=function(z){return this.has(z)?this._getAndRemoveByKey(z.wrapped().key):null},rt.prototype._getAndRemoveByKey=function(z){var K=this.data[z].shift();return K.timeout&&clearTimeout(K.timeout),this.data[z].length===0&&delete this.data[z],this.order.splice(this.order.indexOf(z),1),K.value},rt.prototype.getByKey=function(z){var K=this.data[z];return K?K[0].value:null},rt.prototype.get=function(z){if(!this.has(z))return null;var K=this.data[z.wrapped().key][0];return K.value},rt.prototype.remove=function(z,K){if(!this.has(z))return this;var O=z.wrapped().key,$=K===void 0?0:this.data[O].indexOf(K),pe=this.data[O][$];return this.data[O].splice($,1),pe.timeout&&clearTimeout(pe.timeout),this.data[O].length===0&&delete this.data[O],this.onRemove(pe.value),this.order.splice(this.order.indexOf(O),1),this},rt.prototype.setMaxSize=function(z){for(this.max=z;this.order.length>this.max;){var K=this._getAndRemoveByKey(this.order[0]);K&&this.onRemove(K)}return this},rt.prototype.filter=function(z){var K=[];for(var O in this.data)for(var $=0,pe=this.data[O];$1||(Math.abs(ir)>1&&(Math.abs(ir+vt)===1?ir+=vt:Math.abs(ir-vt)===1&&(ir-=vt)),!(!Kt.dem||!pt.dem)&&(pt.dem.backfillBorder(Kt.dem,ir,Jt),pt.neighboringTiles&&pt.neighboringTiles[Pt]&&(pt.neighboringTiles[Pt].backfilled=!0)))}},z.prototype.getTile=function(O){return this.getTileByID(O.key)},z.prototype.getTileByID=function(O){return this._tiles[O]},z.prototype._retainLoadedChildren=function(O,$,pe,de){for(var Ie in this._tiles){var $e=this._tiles[Ie];if(!(de[Ie]||!$e.hasData()||$e.tileID.overscaledZ<=$||$e.tileID.overscaledZ>pe)){for(var pt=$e.tileID;$e&&$e.tileID.overscaledZ>$+1;){var Kt=$e.tileID.scaledTo($e.tileID.overscaledZ-1);$e=this._tiles[Kt.key],$e&&$e.hasData()&&(pt=Kt)}for(var ir=pt;ir.overscaledZ>$;)if(ir=ir.scaledTo(ir.overscaledZ-1),O[ir.key]){de[pt.key]=pt;break}}}},z.prototype.findLoadedParent=function(O,$){if(O.key in this._loadedParentTiles){var pe=this._loadedParentTiles[O.key];return pe&&pe.tileID.overscaledZ>=$?pe:null}for(var de=O.overscaledZ-1;de>=$;de--){var Ie=O.scaledTo(de),$e=this._getLoadedTile(Ie);if($e)return $e}},z.prototype._getLoadedTile=function(O){var $=this._tiles[O.key];if($&&$.hasData())return $;var pe=this._cache.getByKey(O.wrapped().key);return pe},z.prototype.updateCacheSize=function(O){var $=Math.ceil(O.width/this._source.tileSize)+1,pe=Math.ceil(O.height/this._source.tileSize)+1,de=$*pe,Ie=5,$e=Math.floor(de*Ie),pt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,$e):$e;this._cache.setMaxSize(pt)},z.prototype.handleWrapJump=function(O){var $=this._prevLng===void 0?O:this._prevLng,pe=O-$,de=pe/360,Ie=Math.round(de);if(this._prevLng=O,Ie){var $e={};for(var pt in this._tiles){var Kt=this._tiles[pt];Kt.tileID=Kt.tileID.unwrapTo(Kt.tileID.wrap+Ie),$e[Kt.tileID.key]=Kt}this._tiles=$e;for(var ir in this._timers)clearTimeout(this._timers[ir]),delete this._timers[ir];for(var Jt in this._tiles){var vt=this._tiles[Jt];this._setTileReloadTimer(Jt,vt)}}},z.prototype.update=function(O){var $=this;if(this.transform=O,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var pe;this.used?this._source.tileID?pe=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(yi){return new i.OverscaledTileID(yi.canonical.z,yi.wrap,yi.canonical.z,yi.canonical.x,yi.canonical.y)}):(pe=O.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(pe=pe.filter(function(yi){return $._source.hasTile(yi)}))):pe=[];var de=O.coveringZoomLevel(this._source),Ie=Math.max(de-z.maxOverzooming,this._source.minzoom),$e=Math.max(de+z.maxUnderzooming,this._source.minzoom),pt=this._updateRetainedTiles(pe,de);if(gi(this._source.type)){for(var Kt={},ir={},Jt=Object.keys(pt),vt=0,Pt=Jt;vtthis._source.maxzoom){var pr=rr.children(this._source.maxzoom)[0],kr=this.getTile(pr);if(kr&&kr.hasData()){pe[pr.key]=pr;continue}}else{var Ar=rr.children(this._source.maxzoom);if(pe[Ar[0].key]&&pe[Ar[1].key]&&pe[Ar[2].key]&&pe[Ar[3].key])continue}for(var gr=dr.wasRequested(),Cr=rr.overscaledZ-1;Cr>=Ie;--Cr){var cr=rr.scaledTo(Cr);if(de[cr.key]||(de[cr.key]=!0,dr=this.getTile(cr),!dr&&gr&&(dr=this._addTile(cr)),dr&&(pe[cr.key]=cr,gr=dr.wasRequested(),dr.hasData())))break}}}return pe},z.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var O in this._tiles){for(var $=[],pe=void 0,de=this._tiles[O].tileID;de.overscaledZ>0;){if(de.key in this._loadedParentTiles){pe=this._loadedParentTiles[de.key];break}$.push(de.key);var Ie=de.scaledTo(de.overscaledZ-1);if(pe=this._getLoadedTile(Ie),pe)break;de=Ie}for(var $e=0,pt=$;$e0)&&($.hasData()&&$.state!=="reloading"?this._cache.add($.tileID,$,$.getExpiryTimeout()):($.aborted=!0,this._abortTile($),this._unloadTile($))))},z.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var O in this._tiles)this._removeTile(O);this._cache.reset()},z.prototype.tilesIn=function(O,$,pe){var de=this,Ie=[],$e=this.transform;if(!$e)return Ie;for(var pt=pe?$e.getCameraQueryGeometry(O):O,Kt=O.map(function(Cr){return $e.pointCoordinate(Cr)}),ir=pt.map(function(Cr){return $e.pointCoordinate(Cr)}),Jt=this.getIds(),vt=1/0,Pt=1/0,Wt=-1/0,rr=-1/0,dr=0,pr=ir;dr=0&&tn[1].y+yi>=0){var Di=Kt.map(function(Qn){return Gr.getTilePoint(Qn)}),ln=ir.map(function(Qn){return Gr.getTilePoint(Qn)});Ie.push({tile:cr,tileID:Gr,queryGeometry:Di,cameraQueryGeometry:ln,scale:ei})}}},gr=0;gr=i.browser.now())return!0}return!1},z.prototype.setFeatureState=function(O,$,pe){O=O||"_geojsonTileLayer",this._state.updateState(O,$,pe)},z.prototype.removeFeatureState=function(O,$,pe){O=O||"_geojsonTileLayer",this._state.removeFeatureState(O,$,pe)},z.prototype.getFeatureState=function(O,$){return O=O||"_geojsonTileLayer",this._state.getState(O,$)},z.prototype.setDependencies=function(O,$,pe){var de=this._tiles[O];de&&de.setDependencies($,pe)},z.prototype.reloadTilesForDependencies=function(O,$){for(var pe in this._tiles){var de=this._tiles[pe];de.hasDependency(O,$)&&this._reloadTile(pe,"reloading")}this._cache.filter(function(Ie){return!Ie.hasDependency(O,$)})},z}(i.Evented);Zr.maxOverzooming=10,Zr.maxUnderzooming=3;function Vr(Y,z){var K=Math.abs(Y.wrap*2)-+(Y.wrap<0),O=Math.abs(z.wrap*2)-+(z.wrap<0);return Y.overscaledZ-z.overscaledZ||O-K||z.canonical.y-Y.canonical.y||z.canonical.x-Y.canonical.x}function gi(Y){return Y==="raster"||Y==="image"||Y==="video"}function Si(){return new i.window.Worker(ns.workerUrl)}var Mi="mapboxgl_preloaded_worker_pool",Pi=function(){this.active={}};Pi.prototype.acquire=function(z){if(!this.workers)for(this.workers=[];this.workers.length0?($-de)/Ie:0;return this.points[pe].mult(1-$e).add(this.points[K].mult($e))};var hi=function(z,K,O){var $=this.boxCells=[],pe=this.circleCells=[];this.xCellCount=Math.ceil(z/O),this.yCellCount=Math.ceil(K/O);for(var de=0;dethis.width||$<0||K>this.height)return pe?!1:[];var Ie=[];if(z<=0&&K<=0&&this.width<=O&&this.height<=$){if(pe)return!0;for(var $e=0;$e0:Ie}},hi.prototype._queryCircle=function(z,K,O,$,pe){var de=z-O,Ie=z+O,$e=K-O,pt=K+O;if(Ie<0||de>this.width||pt<0||$e>this.height)return $?!1:[];var Kt=[],ir={hitTest:$,circle:{x:z,y:K,radius:O},seenUids:{box:{},circle:{}}};return this._forEachCell(de,$e,Ie,pt,this._queryCellCircle,Kt,ir,pe),$?Kt.length>0:Kt},hi.prototype.query=function(z,K,O,$,pe){return this._query(z,K,O,$,!1,pe)},hi.prototype.hitTest=function(z,K,O,$,pe){return this._query(z,K,O,$,!0,pe)},hi.prototype.hitTestCircle=function(z,K,O,$){return this._queryCircle(z,K,O,!0,$)},hi.prototype._queryCell=function(z,K,O,$,pe,de,Ie,$e){var pt=Ie.seenUids,Kt=this.boxCells[pe];if(Kt!==null)for(var ir=this.bboxes,Jt=0,vt=Kt;Jt=ir[Wt+0]&&$>=ir[Wt+1]&&(!$e||$e(this.boxKeys[Pt]))){if(Ie.hitTest)return de.push(!0),!0;de.push({key:this.boxKeys[Pt],x1:ir[Wt],y1:ir[Wt+1],x2:ir[Wt+2],y2:ir[Wt+3]})}}}var rr=this.circleCells[pe];if(rr!==null)for(var dr=this.circles,pr=0,kr=rr;prIe*Ie+$e*$e},hi.prototype._circleAndRectCollide=function(z,K,O,$,pe,de,Ie){var $e=(de-$)/2,pt=Math.abs(z-($+$e));if(pt>$e+O)return!1;var Kt=(Ie-pe)/2,ir=Math.abs(K-(pe+Kt));if(ir>Kt+O)return!1;if(pt<=$e||ir<=Kt)return!0;var Jt=pt-$e,vt=ir-Kt;return Jt*Jt+vt*vt<=O*O};function Ji(Y,z,K,O,$){var pe=i.create();return z?(i.scale(pe,pe,[1/$,1/$,1]),K||i.rotateZ(pe,pe,O.angle)):i.multiply(pe,O.labelPlaneMatrix,Y),pe}function ua(Y,z,K,O,$){if(z){var pe=i.clone(Y);return i.scale(pe,pe,[$,$,1]),K||i.rotateZ(pe,pe,-O.angle),pe}else return O.glCoordMatrix}function Fn(Y,z){var K=[Y.x,Y.y,0,1];wl(K,K,z);var O=K[3];return{point:new i.Point(K[0]/O,K[1]/O),signedDistanceFromCamera:O}}function Sa(Y,z){return .5+.5*(Y/z)}function go(Y,z){var K=Y[0]/Y[3],O=Y[1]/Y[3],$=K>=-z[0]&&K<=z[0]&&O>=-z[1]&&O<=z[1];return $}function Oo(Y,z,K,O,$,pe,de,Ie){var $e=O?Y.textSizeData:Y.iconSizeData,pt=i.evaluateSizeForZoom($e,K.transform.zoom),Kt=[256/K.width*2+1,256/K.height*2+1],ir=O?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;ir.clear();for(var Jt=Y.lineVertexArray,vt=O?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Pt=K.transform.width/K.transform.height,Wt=!1,rr=0;rrpe)return{useVertical:!0}}return(Y===i.WritingMode.vertical?z.yK.x)?{needsFlipping:!0}:null}function xo(Y,z,K,O,$,pe,de,Ie,$e,pt,Kt,ir,Jt,vt){var Pt=z/24,Wt=Y.lineOffsetX*Pt,rr=Y.lineOffsetY*Pt,dr;if(Y.numGlyphs>1){var pr=Y.glyphStartIndex+Y.numGlyphs,kr=Y.lineStartIndex,Ar=Y.lineStartIndex+Y.lineLength,gr=ho(Pt,Ie,Wt,rr,K,Kt,ir,Y,$e,pe,Jt);if(!gr)return{notEnoughRoom:!0};var Cr=Fn(gr.first.point,de).point,cr=Fn(gr.last.point,de).point;if(O&&!K){var Gr=Mo(Y.writingMode,Cr,cr,vt);if(Gr)return Gr}dr=[gr.first];for(var ei=Y.glyphStartIndex+1;ei0?ln.point:zs(ir,Di,yi,1,$),qn=Mo(Y.writingMode,yi,Qn,vt);if(qn)return qn}var rn=ks(Pt*Ie.getoffsetX(Y.glyphStartIndex),Wt,rr,K,Kt,ir,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,$e,pe,Jt);if(!rn)return{notEnoughRoom:!0};dr=[rn]}for(var bn=0,mn=dr;bn0?1:-1,Pt=0;O&&(vt*=-1,Pt=Math.PI),vt<0&&(Pt+=Math.PI);for(var Wt=vt>0?Ie+de:Ie+de+1,rr=$,dr=$,pr=0,kr=0,Ar=Math.abs(Jt),gr=[];pr+kr<=Ar;){if(Wt+=vt,Wt=$e)return null;if(dr=rr,gr.push(rr),rr=ir[Wt],rr===void 0){var Cr=new i.Point(pt.getx(Wt),pt.gety(Wt)),cr=Fn(Cr,Kt);if(cr.signedDistanceFromCamera>0)rr=ir[Wt]=cr.point;else{var Gr=Wt-vt,ei=pr===0?pe:new i.Point(pt.getx(Gr),pt.gety(Gr));rr=zs(ei,Cr,dr,Ar-pr+1,Kt)}}pr+=kr,kr=dr.dist(rr)}var yi=(Ar-pr)/kr,tn=rr.sub(dr),Di=tn.mult(yi)._add(dr);Di._add(tn._unit()._perp()._mult(K*vt));var ln=Pt+Math.atan2(rr.y-dr.y,rr.x-dr.x);return gr.push(Di),{point:Di,angle:ln,path:gr}}var Zs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Xs(Y,z){for(var K=0;K=1;Gn--)mn.push(rn.path[Gn]);for(var da=1;da0){for(var fo=mn[0].clone(),as=mn[0].clone(),tl=1;tl=ln.x&&as.x<=Qn.x&&fo.y>=ln.y&&as.y<=Qn.y?ps=[mn]:as.xQn.x||as.yQn.y?ps=[]:ps=i.clipLine([mn],ln.x,ln.y,Qn.x,Qn.y)}for(var zu=0,Mv=ps;zu=this.screenRightBoundary||$this.screenBottomBoundary},cl.prototype.isInsideGrid=function(z,K,O,$){return O>=0&&z=0&&K0){var Ar;return this.prevPlacement&&this.prevPlacement.variableOffsets[Jt.crossTileID]&&this.prevPlacement.placements[Jt.crossTileID]&&this.prevPlacement.placements[Jt.crossTileID].text&&(Ar=this.prevPlacement.variableOffsets[Jt.crossTileID].anchor),this.variableOffsets[Jt.crossTileID]={textOffset:rr,width:O,height:$,anchor:z,textBoxScale:pe,prevAnchor:Ar},this.markUsedJustification(vt,z,Jt,Pt),vt.allowVerticalPlacement&&(this.markUsedOrientation(vt,Pt,Jt),this.placedOrientations[Jt.crossTileID]=Pt),{shift:dr,placedGlyphBoxes:pr}}},ms.prototype.placeLayerBucketPart=function(z,K,O){var $=this,pe=z.parameters,de=pe.bucket,Ie=pe.layout,$e=pe.posMatrix,pt=pe.textLabelPlaneMatrix,Kt=pe.labelToScreenMatrix,ir=pe.textPixelRatio,Jt=pe.holdingForFade,vt=pe.collisionBoxArray,Pt=pe.partiallyEvaluatedTextSize,Wt=pe.collisionGroup,rr=Ie.get("text-optional"),dr=Ie.get("icon-optional"),pr=Ie.get("text-allow-overlap"),kr=Ie.get("icon-allow-overlap"),Ar=Ie.get("text-rotation-alignment")==="map",gr=Ie.get("text-pitch-alignment")==="map",Cr=Ie.get("icon-text-fit")!=="none",cr=Ie.get("symbol-z-order")==="viewport-y",Gr=pr&&(kr||!de.hasIconData()||dr),ei=kr&&(pr||!de.hasTextData()||rr);!de.collisionArrays&&vt&&de.deserializeCollisionBoxes(vt);var yi=function(rn,bn){if(!K[rn.crossTileID]){if(Jt){$.placements[rn.crossTileID]=new Hs(!1,!1,!1);return}var mn=!1,Gn=!1,da=!0,No=null,Ro={box:null,offscreen:null},ps={box:null,offscreen:null},fo=null,as=null,tl=null,zu=0,Mv=0,Ev=0;bn.textFeatureIndex?zu=bn.textFeatureIndex:rn.useRuntimeCollisionCircles&&(zu=rn.featureIndex),bn.verticalTextFeatureIndex&&(Mv=bn.verticalTextFeatureIndex);var yd=bn.textBox;if(yd){var Yv=function(Fu){var kl=i.WritingMode.horizontal;if(de.allowVerticalPlacement&&!Fu&&$.prevPlacement){var bd=$.prevPlacement.placedOrientations[rn.crossTileID];bd&&($.placedOrientations[rn.crossTileID]=bd,kl=bd,$.markUsedOrientation(de,kl,rn))}return kl},cg=function(Fu,kl){if(de.allowVerticalPlacement&&rn.numVerticalGlyphVertices>0&&bn.verticalTextBox)for(var bd=0,sy=de.writingModes;bd0&&(Nd=Nd.filter(function(Fu){return Fu!==xd.anchor}),Nd.unshift(xd.anchor))}var kv=function(Fu,kl,bd){for(var sy=Fu.x2-Fu.x1,A1=Fu.y2-Fu.y1,Yl=rn.textBoxScale,Bx=Cr&&!kr?kl:null,am={box:[],offscreen:!1},Mw=pr?Nd.length*2:Nd.length,Lv=0;Lv=Nd.length,Nx=$.attemptAnchorPlacement(om,Fu,sy,A1,Yl,Ar,gr,ir,$e,Wt,Ew,rn,de,bd,Bx);if(Nx&&(am=Nx.placedGlyphBoxes,am&&am.box&&am.box.length)){mn=!0,No=Nx.shift;break}}return am},Kv=function(){return kv(yd,bn.iconBox,i.WritingMode.horizontal)},Cv=function(){var Fu=bn.verticalTextBox,kl=Ro&&Ro.box&&Ro.box.length;return de.allowVerticalPlacement&&!kl&&rn.numVerticalGlyphVertices>0&&Fu?kv(Fu,bn.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};cg(Kv,Cv),Ro&&(mn=Ro.box,da=Ro.offscreen);var ny=Yv(Ro&&Ro.box);if(!mn&&$.prevPlacement){var fg=$.prevPlacement.variableOffsets[rn.crossTileID];fg&&($.variableOffsets[rn.crossTileID]=fg,$.markUsedJustification(de,fg.anchor,rn,ny))}}else{var vp=function(Fu,kl){var bd=$.collisionIndex.placeCollisionBox(Fu,pr,ir,$e,Wt.predicate);return bd&&bd.box&&bd.box.length&&($.markUsedOrientation(de,kl,rn),$.placedOrientations[rn.crossTileID]=kl),bd},_d=function(){return vp(yd,i.WritingMode.horizontal)},pp=function(){var Fu=bn.verticalTextBox;return de.allowVerticalPlacement&&rn.numVerticalGlyphVertices>0&&Fu?vp(Fu,i.WritingMode.vertical):{box:null,offscreen:null}};cg(_d,pp),Yv(Ro&&Ro.box&&Ro.box.length)}}if(fo=Ro,mn=fo&&fo.box&&fo.box.length>0,da=fo&&fo.offscreen,rn.useRuntimeCollisionCircles){var Hf=de.text.placedSymbolArray.get(rn.centerJustifiedTextSymbolIndex),hg=i.evaluateSizeForFeature(de.textSizeData,Pt,Hf),ay=Ie.get("text-padding"),Dh=rn.collisionCircleDiameter;as=$.collisionIndex.placeCollisionCircles(pr,Hf,de.lineVertexArray,de.glyphOffsetArray,hg,$e,pt,Kt,O,gr,Wt.predicate,Dh,ay),mn=pr||as.circles.length>0&&!as.collisionDetected,da=da&&as.offscreen}if(bn.iconFeatureIndex&&(Ev=bn.iconFeatureIndex),bn.iconBox){var rm=function(Fu){var kl=Cr&&No?fc(Fu,No.x,No.y,Ar,gr,$.transform.angle):Fu;return $.collisionIndex.placeCollisionBox(kl,kr,ir,$e,Wt.predicate)};ps&&ps.box&&ps.box.length&&bn.verticalIconBox?(tl=rm(bn.verticalIconBox),Gn=tl.box.length>0):(tl=rm(bn.iconBox),Gn=tl.box.length>0),da=da&&tl.offscreen}var w1=rr||rn.numHorizontalGlyphVertices===0&&rn.numVerticalGlyphVertices===0,T1=dr||rn.numIconVertices===0;if(!w1&&!T1?Gn=mn=Gn&&mn:T1?w1||(Gn=Gn&&mn):mn=Gn&&mn,mn&&fo&&fo.box&&(ps&&ps.box&&Mv?$.collisionIndex.insertCollisionBox(fo.box,Ie.get("text-ignore-placement"),de.bucketInstanceId,Mv,Wt.ID):$.collisionIndex.insertCollisionBox(fo.box,Ie.get("text-ignore-placement"),de.bucketInstanceId,zu,Wt.ID)),Gn&&tl&&$.collisionIndex.insertCollisionBox(tl.box,Ie.get("icon-ignore-placement"),de.bucketInstanceId,Ev,Wt.ID),as&&(mn&&$.collisionIndex.insertCollisionCircles(as.circles,Ie.get("text-ignore-placement"),de.bucketInstanceId,zu,Wt.ID),O)){var oy=de.bucketInstanceId,im=$.collisionCircleArrays[oy];im===void 0&&(im=$.collisionCircleArrays[oy]=new Eo);for(var nm=0;nm=0;--Di){var ln=tn[Di];yi(de.symbolInstances.get(ln),de.collisionArrays[ln])}else for(var Qn=z.symbolInstanceStart;Qn=0&&(de>=0&&Kt!==de?z.text.placedSymbolArray.get(Kt).crossTileID=0:z.text.placedSymbolArray.get(Kt).crossTileID=O.crossTileID)}},ms.prototype.markUsedOrientation=function(z,K,O){for(var $=K===i.WritingMode.horizontal||K===i.WritingMode.horizontalOnly?K:0,pe=K===i.WritingMode.vertical?K:0,de=[O.leftJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.rightJustifiedTextSymbolIndex],Ie=0,$e=de;Ie<$e.length;Ie+=1){var pt=$e[Ie];z.text.placedSymbolArray.get(pt).placedOrientation=$}O.verticalPlacedTextSymbolIndex&&(z.text.placedSymbolArray.get(O.verticalPlacedTextSymbolIndex).placedOrientation=pe)},ms.prototype.commit=function(z){this.commitTime=z,this.zoomAtLastRecencyCheck=this.transform.zoom;var K=this.prevPlacement,O=!1;this.prevZoomAdjustment=K?K.zoomAdjustment(this.transform.zoom):0;var $=K?K.symbolFadeChange(z):1,pe=K?K.opacities:{},de=K?K.variableOffsets:{},Ie=K?K.placedOrientations:{};for(var $e in this.placements){var pt=this.placements[$e],Kt=pe[$e];Kt?(this.opacities[$e]=new Ys(Kt,$,pt.text,pt.icon),O=O||pt.text!==Kt.text.placed||pt.icon!==Kt.icon.placed):(this.opacities[$e]=new Ys(null,$,pt.text,pt.icon,pt.skipFade),O=O||pt.text||pt.icon)}for(var ir in pe){var Jt=pe[ir];if(!this.opacities[ir]){var vt=new Ys(Jt,$,!1,!1);vt.isHidden()||(this.opacities[ir]=vt,O=O||Jt.text.placed||Jt.icon.placed)}}for(var Pt in de)!this.variableOffsets[Pt]&&this.opacities[Pt]&&!this.opacities[Pt].isHidden()&&(this.variableOffsets[Pt]=de[Pt]);for(var Wt in Ie)!this.placedOrientations[Wt]&&this.opacities[Wt]&&!this.opacities[Wt].isHidden()&&(this.placedOrientations[Wt]=Ie[Wt]);O?this.lastPlacementChangeTime=z:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=K?K.lastPlacementChangeTime:z)},ms.prototype.updateLayerOpacities=function(z,K){for(var O={},$=0,pe=K;$0||gr>0,yi=kr.numIconVertices>0,tn=$.placedOrientations[kr.crossTileID],Di=tn===i.WritingMode.vertical,ln=tn===i.WritingMode.horizontal||tn===i.WritingMode.horizontalOnly;if(ei){var Qn=Ec(Gr.text),qn=Di?Zn:Qn;Pt(z.text,Ar,qn);var rn=ln?Zn:Qn;Pt(z.text,gr,rn);var bn=Gr.text.isHidden();[kr.rightJustifiedTextSymbolIndex,kr.centerJustifiedTextSymbolIndex,kr.leftJustifiedTextSymbolIndex].forEach(function(Ev){Ev>=0&&(z.text.placedSymbolArray.get(Ev).hidden=bn||Di?1:0)}),kr.verticalPlacedTextSymbolIndex>=0&&(z.text.placedSymbolArray.get(kr.verticalPlacedTextSymbolIndex).hidden=bn||ln?1:0);var mn=$.variableOffsets[kr.crossTileID];mn&&$.markUsedJustification(z,mn.anchor,kr,tn);var Gn=$.placedOrientations[kr.crossTileID];Gn&&($.markUsedJustification(z,"left",kr,Gn),$.markUsedOrientation(z,Gn,kr))}if(yi){var da=Ec(Gr.icon),No=!(Jt&&kr.verticalPlacedIconSymbolIndex&&Di);if(kr.placedIconSymbolIndex>=0){var Ro=No?da:Zn;Pt(z.icon,kr.numIconVertices,Ro),z.icon.placedSymbolArray.get(kr.placedIconSymbolIndex).hidden=Gr.icon.isHidden()}if(kr.verticalPlacedIconSymbolIndex>=0){var ps=No?Zn:da;Pt(z.icon,kr.numVerticalIconVertices,ps),z.icon.placedSymbolArray.get(kr.verticalPlacedIconSymbolIndex).hidden=Gr.icon.isHidden()}}if(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData()){var fo=z.collisionArrays[pr];if(fo){var as=new i.Point(0,0);if(fo.textBox||fo.verticalTextBox){var tl=!0;if(pt){var zu=$.variableOffsets[Cr];zu?(as=Gu(zu.anchor,zu.width,zu.height,zu.textOffset,zu.textBoxScale),Kt&&as._rotate(ir?$.transform.angle:-$.transform.angle)):tl=!1}fo.textBox&&on(z.textCollisionBox.collisionVertexArray,Gr.text.placed,!tl||Di,as.x,as.y),fo.verticalTextBox&&on(z.textCollisionBox.collisionVertexArray,Gr.text.placed,!tl||ln,as.x,as.y)}var Mv=!!(!ln&&fo.verticalIconBox);fo.iconBox&&on(z.iconCollisionBox.collisionVertexArray,Gr.icon.placed,Mv,Jt?as.x:0,Jt?as.y:0),fo.verticalIconBox&&on(z.iconCollisionBox.collisionVertexArray,Gr.icon.placed,!Mv,Jt?as.x:0,Jt?as.y:0)}}},rr=0;rrz},ms.prototype.setStale=function(){this.stale=!0};function on(Y,z,K,O,$){Y.emplaceBack(z?1:0,K?1:0,O||0,$||0),Y.emplaceBack(z?1:0,K?1:0,O||0,$||0),Y.emplaceBack(z?1:0,K?1:0,O||0,$||0),Y.emplaceBack(z?1:0,K?1:0,O||0,$||0)}var fa=Math.pow(2,25),Qu=Math.pow(2,24),Il=Math.pow(2,17),vo=Math.pow(2,16),Wl=Math.pow(2,9),Ks=Math.pow(2,8),Zl=Math.pow(2,1);function Ec(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var z=Y.placed?1:0,K=Math.floor(Y.opacity*127);return K*fa+z*Qu+K*Il+z*vo+K*Wl+z*Ks+K*Zl+z}var Zn=0,ko=function(z){this._sortAcrossTiles=z.layout.get("symbol-z-order")!=="viewport-y"&&z.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};ko.prototype.continuePlacement=function(z,K,O,$,pe){for(var de=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Ie=z[this._currentPlacementIndex],$e=K[Ie],pt=this.placement.collisionIndex.transform.zoom;if($e.type==="symbol"&&(!$e.minzoom||$e.minzoom<=pt)&&(!$e.maxzoom||$e.maxzoom>pt)){this._inProgressLayer||(this._inProgressLayer=new ko($e));var Kt=this._inProgressLayer.continuePlacement(O[$e.source],this.placement,this._showCollisionBoxes,$e,de);if(Kt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Co.prototype.commit=function(z){return this.placement.commit(z),this.placement};var Tl=512/i.EXTENT/2,uf=function(z,K,O){this.tileID=z,this.indexedSymbolInstances={},this.bucketInstanceId=O;for(var $=0;$z.overscaledZ)for(var pt in $e){var Kt=$e[pt];Kt.tileID.isChildOf(z)&&Kt.findMatches(K.symbolInstances,z,de)}else{var ir=z.scaledTo(Number(Ie)),Jt=$e[ir.key];Jt&&Jt.findMatches(K.symbolInstances,z,de)}}for(var vt=0;vt0)throw new Error("Unimplemented: "+de.map(function(Ie){return Ie.command}).join(", ")+".");return pe.forEach(function(Ie){Ie.command!=="setTransition"&&$[Ie.command].apply($,Ie.args)}),this.stylesheet=O,!0},z.prototype.addImage=function(O,$){if(this.getImage(O))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(O,$),this._afterImageUpdated(O)},z.prototype.updateImage=function(O,$){this.imageManager.updateImage(O,$)},z.prototype.getImage=function(O){return this.imageManager.getImage(O)},z.prototype.removeImage=function(O){if(!this.getImage(O))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(O),this._afterImageUpdated(O)},z.prototype._afterImageUpdated=function(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},z.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},z.prototype.addSource=function(O,$,pe){var de=this;if(pe===void 0&&(pe={}),this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error("There is already a source with this ID");if(!$.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys($).join(", ")+".");var Ie=["vector","raster","geojson","video","image"],$e=Ie.indexOf($.type)>=0;if(!($e&&this._validate(i.validateStyle.source,"sources."+O,$,null,pe))){this.map&&this.map._collectResourceTiming&&($.collectResourceTiming=!0);var pt=this.sourceCaches[O]=new Zr(O,$,this.dispatcher);pt.style=this,pt.setEventedParent(this,function(){return{isSourceLoaded:de.loaded(),source:pt.serialize(),sourceId:O}}),pt.onAdd(this.map),this._changed=!0}},z.prototype.removeSource=function(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(var $ in this._layers)if(this._layers[$].source===O)return this.fire(new i.ErrorEvent(new Error('Source "'+O+'" cannot be removed while layer "'+$+'" is using it.')));var pe=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],pe.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),pe.setEventedParent(null),pe.clearTiles(),pe.onRemove&&pe.onRemove(this.map),this._changed=!0},z.prototype.setGeoJSONSourceData=function(O,$){this._checkLoaded();var pe=this.sourceCaches[O].getSource();pe.setData($),this._changed=!0},z.prototype.getSource=function(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()},z.prototype.addLayer=function(O,$,pe){pe===void 0&&(pe={}),this._checkLoaded();var de=O.id;if(this.getLayer(de)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+de+'" already exists on this map')));return}var Ie;if(O.type==="custom"){if(Al(this,i.validateCustomStyleLayer(O)))return;Ie=i.createStyleLayer(O)}else{if(typeof O.source=="object"&&(this.addSource(de,O.source),O=i.clone$1(O),O=i.extend(O,{source:de})),this._validate(i.validateStyle.layer,"layers."+de,O,{arrayIndex:-1},pe))return;Ie=i.createStyleLayer(O),this._validateLayer(Ie),Ie.setEventedParent(this,{layer:{id:de}}),this._serializedLayers[Ie.id]=Ie.serialize()}var $e=$?this._order.indexOf($):this._order.length;if($&&$e===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}if(this._order.splice($e,0,de),this._layerOrderChanged=!0,this._layers[de]=Ie,this._removedLayers[de]&&Ie.source&&Ie.type!=="custom"){var pt=this._removedLayers[de];delete this._removedLayers[de],pt.type!==Ie.type?this._updatedSources[Ie.source]="clear":(this._updatedSources[Ie.source]="reload",this.sourceCaches[Ie.source].pause())}this._updateLayer(Ie),Ie.onAdd&&Ie.onAdd(this.map)},z.prototype.moveLayer=function(O,$){this._checkLoaded(),this._changed=!0;var pe=this._layers[O];if(!pe){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be moved.")));return}if(O!==$){var de=this._order.indexOf(O);this._order.splice(de,1);var Ie=$?this._order.indexOf($):this._order.length;if($&&Ie===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}this._order.splice(Ie,0,O),this._layerOrderChanged=!0}},z.prototype.removeLayer=function(O){this._checkLoaded();var $=this._layers[O];if(!$){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be removed.")));return}$.setEventedParent(null);var pe=this._order.indexOf(O);this._order.splice(pe,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=$,delete this._layers[O],delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],$.onRemove&&$.onRemove(this.map)},z.prototype.getLayer=function(O){return this._layers[O]},z.prototype.hasLayer=function(O){return O in this._layers},z.prototype.setLayerZoomRange=function(O,$,pe){this._checkLoaded();var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot have zoom extent.")));return}de.minzoom===$&&de.maxzoom===pe||($!=null&&(de.minzoom=$),pe!=null&&(de.maxzoom=pe),this._updateLayer(de))},z.prototype.setFilter=function(O,$,pe){pe===void 0&&(pe={}),this._checkLoaded();var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(de.filter,$)){if($==null){de.filter=void 0,this._updateLayer(de);return}this._validate(i.validateStyle.filter,"layers."+de.id+".filter",$,null,pe)||(de.filter=i.clone$1($),this._updateLayer(de))}},z.prototype.getFilter=function(O){return i.clone$1(this.getLayer(O).filter)},z.prototype.setLayoutProperty=function(O,$,pe,de){de===void 0&&(de={}),this._checkLoaded();var Ie=this.getLayer(O);if(!Ie){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(Ie.getLayoutProperty($),pe)||(Ie.setLayoutProperty($,pe,de),this._updateLayer(Ie))},z.prototype.getLayoutProperty=function(O,$){var pe=this.getLayer(O);if(!pe){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style.")));return}return pe.getLayoutProperty($)},z.prototype.setPaintProperty=function(O,$,pe,de){de===void 0&&(de={}),this._checkLoaded();var Ie=this.getLayer(O);if(!Ie){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(Ie.getPaintProperty($),pe)){var $e=Ie.setPaintProperty($,pe,de);$e&&this._updateLayer(Ie),this._changed=!0,this._updatedPaintProps[O]=!0}},z.prototype.getPaintProperty=function(O,$){return this.getLayer(O).getPaintProperty($)},z.prototype.setFeatureState=function(O,$){this._checkLoaded();var pe=O.source,de=O.sourceLayer,Ie=this.sourceCaches[pe];if(Ie===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")));return}var $e=Ie.getSource().type;if($e==="geojson"&&de){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if($e==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Ie.setFeatureState(de,O.id,$)},z.prototype.removeFeatureState=function(O,$){this._checkLoaded();var pe=O.source,de=this.sourceCaches[pe];if(de===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")));return}var Ie=de.getSource().type,$e=Ie==="vector"?O.sourceLayer:void 0;if(Ie==="vector"&&!$e){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if($&&typeof O.id!="string"&&typeof O.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}de.removeFeatureState($e,O.id,$)},z.prototype.getFeatureState=function(O){this._checkLoaded();var $=O.source,pe=O.sourceLayer,de=this.sourceCaches[$];if(de===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+$+"' does not exist in the map's style.")));return}var Ie=de.getSource().type;if(Ie==="vector"&&!pe){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),de.getFeatureState(pe,O.id)},z.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},z.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(O){return O.serialize()}),layers:this._serializeLayers(this._order)},function(O){return O!==void 0})},z.prototype._updateLayer=function(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._changed=!0},z.prototype._flattenAndSortRenderedFeatures=function(O){for(var $=this,pe=function(ln){return $._layers[ln].type==="fill-extrusion"},de={},Ie=[],$e=this._order.length-1;$e>=0;$e--){var pt=this._order[$e];if(pe(pt)){de[pt]=$e;for(var Kt=0,ir=O;Kt=0;pr--){var kr=this._order[pr];if(pe(kr))for(var Ar=Ie.length-1;Ar>=0;Ar--){var gr=Ie[Ar].feature;if(de[gr.layer.id] .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 Pk=ye((vyr,hUe)=>{"use strict";var uUe=Mr(),cUe=va().defaultLine,RVt=Ju().attributes,zVt=Su(),FVt=Uc().textposition,qVt=Bu().overrideAll,OVt=Vs().templatedArray,qK=c1(),fUe=zVt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});fUe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var BVt=hUe.exports=qVt({_arrayAttrRegexps:[uUe.counterRegex("mapbox",".layers",!0)],domain:RVt({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:OVt("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:cUe},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:cUe}},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:fUe,textposition:uUe.extendFlat({},FVt,{arrayOk:!1})}})},"plot","from-root");BVt.uirevision={valType:"any",editType:"none"}});var BF=ye((pyr,pUe)=>{"use strict";var NVt=Wo().hovertemplateAttrs,UVt=Wo().texttemplateAttrs,VVt=Eg(),Ik=H2(),xA=Uc(),dUe=Pk(),HVt=vl(),GVt=Kl(),ew=no().extendFlat,jVt=Bu().overrideAll,WVt=Pk(),vUe=Ik.line,bA=Ik.marker;pUe.exports=jVt({lon:Ik.lon,lat:Ik.lat,cluster:{enabled:{valType:"boolean"},maxzoom:ew({},WVt.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:ew({},bA.opacity,{dflt:1})},mode:ew({},xA.mode,{dflt:"markers"}),text:ew({},xA.text,{}),texttemplate:UVt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:ew({},xA.hovertext,{}),line:{color:vUe.color,width:vUe.width},connectgaps:xA.connectgaps,marker:ew({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:bA.opacity,size:bA.size,sizeref:bA.sizeref,sizemin:bA.sizemin,sizemode:bA.sizemode},GVt("marker")),fill:Ik.fill,fillcolor:VVt(),textfont:dUe.layers.symbol.textfont,textposition:dUe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:xA.selected.marker},unselected:{marker:xA.unselected.marker},hoverinfo:ew({},HVt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:NVt()},"calc","nested")});var OK=ye((gyr,gUe)=>{"use strict";var ZVt=["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"];gUe.exports={isSupportedFont:function(e){return ZVt.indexOf(e)!==-1}}});var _Ue=ye((myr,yUe)=>{"use strict";var Dk=Mr(),BK=lu(),XVt=$p(),YVt=D0(),KVt=R0(),JVt=Ig(),mUe=BF(),$Vt=OK().isSupportedFont;yUe.exports=function(t,r,n,i){function a(g,E){return Dk.coerce(t,r,mUe,g,E)}function o(g,E){return Dk.coerce2(t,r,mUe,g,E)}var s=QVt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),BK.hasMarkers(r)){XVt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Dk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Dk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}BK.hasLines(r)&&(YVt(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,x=a("cluster.enabled",v);if(x||BK.hasText(r)){var b=i.font.family;KVt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:$Vt(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"&&JVt(t,r,n,a),Dk.coerceSelectionMarkerOpacity(r,a)};function QVt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var NK=ye((yyr,bUe)=>{"use strict";var xUe=Qa();bUe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=xUe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=xUe.tickText(o,o.c2l(s[1]),!0).text,i}});var UK=ye((_yr,TUe)=>{"use strict";var wUe=Mr();TUe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=wUe.isArrayOrTypedArray(r)?wUe.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 CUe=ye((xyr,kUe)=>{"use strict";var MUe=uo(),iv=Mr(),eHt=es().BADNUM,UF=tx(),AUe=Mu(),tHt=ao(),rHt=S3(),VF=lu(),iHt=OK().isSupportedFont,nHt=UK(),aHt=rp().appendArrayPointValue,oHt=Ll().NEWLINES,sHt=Ll().BR_TAG_ALL;kUe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=VF.hasLines(n),s=VF.hasMarkers(n),l=VF.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=NF("fill"),d=NF("line"),v=NF("circle"),x=NF("symbol"),b={fill:h,line:d,circle:v,symbol:x};if(!i)return b;var g;if((a||o)&&(g=UF.calcTraceToLineCoords(r)),a&&(h.geojson=UF.makePolygon(g),h.layout.visibility="visible",iv.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=UF.makeLine(g),d.layout.visibility="visible",iv.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var E=lHt(r);v.geojson=E.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":HK(n.cluster.color,n.cluster.step),"circle-radius":HK(n.cluster.size,n.cluster.step),"circle-opacity":HK(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":SUe(n),"text-size":12}}),iv.extendFlat(v.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=uHt(r,t),iv.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(iv.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&iv.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,iv.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var k=(n.marker||{}).size,A=nHt(n.textposition,k);iv.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":SUe(n)}),iv.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function NF(e){return{type:e,geojson:UF.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function lHt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=iv.isArrayOrTypedArray(r.color),a=iv.isArrayOrTypedArray(r.size),o=iv.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;i&&(AUe.hasColorscale(t,"marker")?c=AUe.makeColorScaleFuncFromTrace(r):c=iv.identity);var f;a&&(f=rHt(t));var h;o&&(h=function(k){var A=MUe(k)?+iv.constrain(k,0,1):0;return l(A)});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"),iHt(s)||(s=r);var l=s.split(", ");return l}});var DUe=ye((byr,IUe)=>{"use strict";var cHt=Mr(),LUe=CUe(),wA=c1().traceLayerPrefix,rg={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function PUe(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:wA+t+"-fill",line:wA+t+"-line",circle:wA+t+"-circle",symbol:wA+t+"-symbol",cluster:wA+t+"-cluster",clusterCount:wA+t+"-cluster-count"},this.below=null}var Rk=PUe.prototype;Rk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&cHt.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)};Rk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Rk.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 _=A[L];i.removeLayer(u.layerIds[_])}k||i.removeSource(u.sourceIds.circle)}function h(k){for(var A=rg.nonCluster,L=0;L=0;L--){var _=A[L];i.removeLayer(u.layerIds[_]),k||i.removeSource(u.sourceIds[_])}}function v(k){l?f(k):d(k)}function x(k){s?c(k):h(k)}function b(){for(var k=s?rg.cluster:rg.nonCluster,A=0;A=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};IUe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new PUe(t,n.uid,i,a),s=LUe(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 fHt=Nc(),GK=Mr(),hHt=oT(),dHt=GK.fillText,vHt=es().BADNUM,pHt=c1().traceLayerPrefix;function gHt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=pHt+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 x(M){var p=M.lonlat;if(p[0]===vHt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=GK.modHalf(p[0],360),T=p[1],F=s.project([P,T]),q=F.x-a.c2p([v,T]),V=F.y-o.c2p([P,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+V*V)-H,1-3/H)}if(fHt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],g=b.lonlat,E=[GK.modHalf(g[0],360)+d,g[1]],k=a.c2p(E),A=o.c2p(E),L=b.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=hHt(i,b),e.extraText=RUe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function RUe(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)&&dHt(t,e,u),u.join("
")}zUe.exports={hoverPoints:gHt,getExtraText:RUe}});var qUe=ye((Tyr,FUe)=>{"use strict";FUe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var BUe=ye((Ayr,OUe)=>{"use strict";var mHt=Mr(),yHt=lu(),_Ht=es().BADNUM;OUe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!yHt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof jK=="object"&&typeof WK!="undefined"?WK.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.mapboxgl=t())})(jK,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,J,ne,fe;for(J=m,fe=0;fe<8;fe++){if(ne=this.sampleCurveX(J)-m,Math.abs(ne)U)return U;for(;Ine?I=J:U=J,J=(U-I)*.5+I}return J},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,J=I*this.x+y*this.y;return this.x=U,this.y=J,this},_rotateAround:function(m,y){var I=Math.cos(m),U=Math.sin(m),J=y.x+I*(this.x-y.x)-U*(this.y-y.y),ne=y.y+U*(this.x-y.x)+I*(this.y-y.y);return this.x=J,this.y=ne,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 x(m,y,I,U){var J=new s(m,y,I,U);return function(ne){return J.solve(ne)}}var b=x(.25,.1,.25,1);function g(m,y,I){return Math.min(I,Math.max(y,m))}function E(m,y,I){var U=I-y,J=((m-y)%U+U)%U+y;return J===y?I:J}function k(m,y,I){if(!m.length)return I(null,[]);var U=m.length,J=new Array(m.length),ne=null;m.forEach(function(fe,Fe){y(fe,function(Qe,st){Qe&&(ne=Qe),J[Fe]=st,--U===0&&I(ne,J)})})}function A(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 _(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,J=y;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 F(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 q(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 H(m,y,I){var U={};for(var J in m)U[J]=y.call(I||this,m[J],J,m);return U}function X(m,y,I){var U={};for(var J in m)y.call(I||this,m[J],J,m)&&(U[J]=m[J]);return U}function G(m){return Array.isArray(m)?m.map(G):typeof m=="object"&&m?H(m,G):m}function N(m,y){for(var I=0;I=0)return!0;return!1}var W={};function re(m){W[m]||(typeof console!="undefined"&&console.warn(m),W[m]=!0)}function ae(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,J=U-1,ne=void 0,fe=void 0;I@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(m.replace(y,function(J,ne,fe,Fe){var Qe=fe||Fe;return I[ne]=Qe?Qe.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 Te(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 Ee(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 ze(m){return decodeURIComponent(f.atob(m).split("").map(function(y){return"%"+("00"+y.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Ce=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,De=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,Ge,nt={now:Ce,frame:function(y){var I=me(y);return{cancel:function(){return De(I)}}},getImageData:function(y,I){I===void 0&&(I=0);var U=f.document.createElement("canvas"),J=U.getContext("2d");if(!J)throw new Error("failed to create canvas 2d context");return U.width=y.width,U.height=y.height,J.drawImage(y,0,0,y.width,y.height),J.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?(Ge==null&&(Ge=f.matchMedia("(prefers-reduced-motion: reduce)")),Ge.matches):!1}},ct={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},qt={supported:!1,testSupport:Ct},rt,ot=!1,Dt,kt=!1;f.document&&(Dt=f.document.createElement("img"),Dt.onload=function(){rt&&Yt(rt),rt=null,kt=!0},Dt.onerror=function(){ot=!0,rt=null},Dt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Ct(m){ot||!Dt||(kt?Yt(m):rt=m)}function Yt(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,Dt),m.isContextLost())return;qt.supported=!0}catch(I){}m.deleteTexture(y),ot=!0}var xr="01";function er(){for(var m="1",y="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",U=0;U<10;U++)I+=y[Math.floor(Math.random()*62)];var J=12*60*60*1e3,ne=[m,xr,I].join(""),fe=Date.now()+J;return{token:ne,tokenExpiresAt:fe}}var Ke=function(y,I){this._transformRequestFn=y,this._customAccessToken=I,this._createSkuToken()};Ke.prototype._createSkuToken=function(){var y=er();this._skuToken=y.token,this._skuTokenExpiresAt=y.tokenExpiresAt},Ke.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ke.prototype.transformRequest=function(y,I){return this._transformRequestFn?this._transformRequestFn(y,I)||{url:y}:{url:y}},Ke.prototype.normalizeStyleURL=function(y,I){if(!xt(y))return y;var U=Ht(y);return U.path="/styles/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Ke.prototype.normalizeGlyphsURL=function(y,I){if(!xt(y))return y;var U=Ht(y);return U.path="/fonts/v1"+U.path,this._makeAPIURL(U,this._customAccessToken||I)},Ke.prototype.normalizeSourceURL=function(y,I){if(!xt(y))return y;var U=Ht(y);return U.path="/v4/"+U.authority+".json",U.params.push("secure"),this._makeAPIURL(U,this._customAccessToken||I)},Ke.prototype.normalizeSpriteURL=function(y,I,U,J){var ne=Ht(y);return xt(y)?(ne.path="/styles/v1"+ne.path+"/sprite"+I+U,this._makeAPIURL(ne,this._customAccessToken||J)):(ne.path+=""+I+U,$t(ne))},Ke.prototype.normalizeTileURL=function(y,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),y&&!xt(y))return y;var U=Ht(y),J=/(\.(png|jpg)\d*)(?=$)/,ne=/^.+\/v4\//,fe=nt.devicePixelRatio>=2||I===512?"@2x":"",Fe=qt.supported?".webp":"$1";U.path=U.path.replace(J,""+fe+Fe),U.path=U.path.replace(ne,"/"),U.path="/v4"+U.path;var Qe=this._customAccessToken||Et(U.params)||ct.ACCESS_TOKEN;return ct.REQUIRE_ACCESS_TOKEN&&Qe&&this._skuToken&&U.params.push("sku="+this._skuToken),this._makeAPIURL(U,Qe)},Ke.prototype.canonicalizeTileURL=function(y,I){var U="/v4/",J=/\.[\w]+$/,ne=Ht(y);if(!ne.path.match(/(^\/v4\/)/)||!ne.path.match(J))return y;var fe="mapbox://tiles/";fe+=ne.path.replace(U,"");var Fe=ne.params;return I&&(Fe=Fe.filter(function(Qe){return!Qe.match(/^access_token=/)})),Fe.length&&(fe+="?"+Fe.join("&")),fe},Ke.prototype.canonicalizeTileset=function(y,I){for(var U=I?xt(I):!1,J=[],ne=0,fe=y.tiles||[];ne=0&&y.params.splice(ne,1)}if(J.path!=="/"&&(y.path=""+J.path+y.path),!ct.REQUIRE_ACCESS_TOKEN)return $t(y);if(I=I||ct.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(fe){return fe.indexOf("access_token")===-1}),y.params.push("access_token="+I),$t(y)};function xt(m){return m.indexOf("mapbox:")===0}var bt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Lt(m){return bt.test(m)}function St(m){return m.indexOf("sku=")>0&&Lt(m)}function Et(m){for(var y=0,I=m;y=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch(J){re("Unable to write to LocalStorage")}},Br.prototype.processRequests=function(y){},Br.prototype.postEvent=function(y,I,U,J){var ne=this;if(ct.EVENTS_URL){var fe=Ht(ct.EVENTS_URL);fe.params.push("access_token="+(J||ct.ACCESS_TOKEN||""));var Fe={event:this.type,created:new Date(y).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:xr,userId:this.anonId},Qe=I?_(Fe,I):Fe,st={url:$t(fe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Qe])};this.pendingRequest=Vr(st,function(mt){ne.pendingRequest=null,U(mt),ne.saveEventData(),ne.processRequests(J)})}},Br.prototype.queueRequest=function(y,I){this.queue.push(y),this.processRequests(I)};var Or=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,J,ne,fe){this.skuToken=ne,(ct.EVENTS_URL&&fe||ct.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(Fe){return xt(Fe)||Lt(Fe)}))&&this.queueRequest({id:J,timestamp:Date.now()},fe)},y.prototype.processRequests=function(U){var J=this;if(!(this.pendingRequest||this.queue.length===0)){var ne=this.queue.shift(),fe=ne.id,Fe=ne.timestamp;fe&&this.success[fe]||(this.anonId||this.fetchEventData(),F(this.anonId)||(this.anonId=P()),this.postEvent(Fe,{skuToken:this.skuToken},function(Qe){Qe||fe&&(J.success[fe]=!0)},U))}},y}(Br),Nr=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,J){ct.EVENTS_URL&&ct.ACCESS_TOKEN&&Array.isArray(U)&&U.some(function(ne){return xt(ne)||Lt(ne)})&&this.queueRequest(Date.now(),J)},y.prototype.processRequests=function(U){var J=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ne=_r(ct.ACCESS_TOKEN),fe=ne?ne.u:ct.ACCESS_TOKEN,Fe=fe!==this.eventData.tokenU;F(this.anonId)||(this.anonId=P(),Fe=!0);var Qe=this.queue.shift();if(this.eventData.lastSuccess){var st=new Date(this.eventData.lastSuccess),mt=new Date(Qe),Xt=(Qe-this.eventData.lastSuccess)/(24*60*60*1e3);Fe=Fe||Xt>=1||Xt<-1||st.getDate()!==mt.getDate()}else Fe=!0;if(!Fe)return this.processRequests();this.postEvent(Qe,{"enabled.telemetry":!1},function(ur){ur||(J.eventData.lastSuccess=Qe,J.eventData.tokenU=fe)},U)}},y}(Br),ut=new Nr,Ne=ut.postTurnstileEvent.bind(ut),Ye=new Or,Ve=Ye.postMapLoadEvent.bind(Ye),Xe="mapbox-tiles",ht=500,Le=50,xe=1e3*60*7,Se;function lt(){f.caches&&!Se&&(Se=f.caches.open(Xe))}var Gt;function Vt(m,y){if(Gt===void 0)try{new Response(new ReadableStream),Gt=!0}catch(I){Gt=!1}Gt?y(m.body):m.blob().then(y)}function ar(m,y,I){if(lt(),!!Se){var U={status:y.status,statusText:y.statusText,headers:new f.Headers};y.headers.forEach(function(fe,Fe){return U.headers.set(Fe,fe)});var J=ge(y.headers.get("Cache-Control")||"");if(!J["no-store"]){J["max-age"]&&U.headers.set("Expires",new Date(I+J["max-age"]*1e3).toUTCString());var ne=new Date(U.headers.get("Expires")).getTime()-I;neDate.now()&&!I["no-cache"]}var ri=1/0;function bi(m){ri++,ri>Le&&(m.getActor().send("enforceCacheSizeLimit",ht),ri=0)}function nn(m){lt(),Se&&Se.then(function(y){y.keys().then(function(I){for(var U=0;U=200&&I.status<300||I.status===0)&&I.response!==null){var J=I.response;if(m.type==="json")try{J=JSON.parse(I.response)}catch(ne){return y(ne)}y(null,J,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else y(new Wn(I.statusText,I.status,m.url))},I.send(m.body),{cancel:function(){return I.abort()}}}var yr=function(m,y){if(!ft(m.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return jt(m,y);if(ke()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",m,y,void 0,I)}}return Zt(m,y)},Fr=function(m,y){return yr(_(m,{type:"json"}),y)},Zr=function(m,y){return yr(_(m,{type:"arrayBuffer"}),y)},Vr=function(m,y){return yr(_(m,{method:"POST"}),y)};function gi(m){var y=f.document.createElement("a");return y.href=m,y.protocol===f.document.location.protocol&&y.host===f.document.location.host}var Si="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Mi(m,y,I,U){var J=new f.Image,ne=f.URL;J.onload=function(){y(null,J),ne.revokeObjectURL(J.src),J.onload=null,f.requestAnimationFrame(function(){J.src=Si})},J.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 fe=new f.Blob([new Uint8Array(m)],{type:"image/png"});J.cacheControl=I,J.expires=U,J.src=m.byteLength?ne.createObjectURL(fe):Si}function Pi(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 Gi,Ki,ka=function(){Gi=[],Ki=0};ka();var jn=function(m,y){if(qt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Ki>=ct.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:m,callback:y,cancelled:!1,cancel:function(){this.cancelled=!0}};return Gi.push(I),I}Ki++;var U=!1,J=function(){if(!U)for(U=!0,Ki--;Gi.length&&Ki0||this._oneTimeListeners&&this._oneTimeListeners[y]&&this._oneTimeListeners[y].length>0||this._eventedParent&&this._eventedParent.listens(y)},Sn.prototype.setEventedParent=function(y,I){return this._eventedParent=y,this._eventedParentData=I,this};var Ha=8,oo={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"}},xn={"*":{type:"source"}},_t=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],br={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:"*"}},Hr={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:"*"}},ti={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:"*"}},zi={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"}},Yi={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"}}},an={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"}}},hi={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"}},Ji=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ua={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Fn={"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"}},Sa={"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"}},go={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Oo={"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"}},ho={"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"}},Mo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},zs={type:"array",value:"*"},ks={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Zs={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},Xs={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wl={type:"array",value:"*",minimum:1},os={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}},cl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Cs={"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"}},ml={"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"}},Ys={"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"}},Hs={"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"}},Eo={"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"}},fs={"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"}},$l={"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"}},Gu={"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"}},fc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},ms={"*":{type:"string"}},on={$version:Ha,$root:oo,sources:xn,source:_t,source_vector:br,source_raster:Hr,source_raster_dem:ti,source_geojson:zi,source_video:Yi,source_image:an,layer:hi,layout:Ji,layout_background:ua,layout_fill:Fn,layout_circle:Sa,layout_heatmap:go,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Oo,layout_symbol:ho,layout_raster:Mo,layout_hillshade:xo,filter:zs,filter_operator:ks,geometry_type:Zs,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:Xs,expression:wl,light:os,paint:cl,paint_fill:Cs,"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:ml,paint_circle:Ys,paint_heatmap:Hs,paint_symbol:Eo,paint_raster:fs,paint_hillshade:$l,paint_background:Gu,transition:fc,"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:ms},fa=function(y,I,U,J){this.message=(y?y+": ":"")+U,J&&(this.identifier=J),I!=null&&I.__line__&&(this.line=I.__line__)};function Qu(m){var y=m.key,I=m.value;return I?[new fa(y,I,"constants have been deprecated as of v8")]:[]}function Il(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var U=0,J=y;U":m.itemType.kind==="value"?"array":"array<"+y+">"}else return m.kind}var mu=[Ec,Zn,ko,Co,Tl,Al,uf,Ql(So),Hc];function kc(m,y){if(y.kind==="error")return null;if(m.kind==="array"){if(y.kind==="array"&&(y.N===0&&y.itemType.kind==="value"||!kc(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=mu;I255?255:st}function J(st){return st<0?0:st>1?1:st}function ne(st){return st[st.length-1]==="%"?U(parseFloat(st)/100*255):U(parseInt(st))}function fe(st){return st[st.length-1]==="%"?J(parseFloat(st)/100):J(parseFloat(st))}function Fe(st,mt,Xt){return Xt<0?Xt+=1:Xt>1&&(Xt-=1),Xt*6<1?st+(mt-st)*Xt*6:Xt*2<1?mt:Xt*3<2?st+(mt-st)*(2/3-Xt)*6:st}function Qe(st){var mt=st.replace(/ /g,"").toLowerCase();if(mt in I)return I[mt].slice();if(mt[0]==="#"){if(mt.length===4){var Xt=parseInt(mt.substr(1),16);return Xt>=0&&Xt<=4095?[(Xt&3840)>>4|(Xt&3840)>>8,Xt&240|(Xt&240)>>4,Xt&15|(Xt&15)<<4,1]:null}else if(mt.length===7){var Xt=parseInt(mt.substr(1),16);return Xt>=0&&Xt<=16777215?[(Xt&16711680)>>16,(Xt&65280)>>8,Xt&255,1]:null}return null}var ur=mt.indexOf("("),nr=mt.indexOf(")");if(ur!==-1&&nr+1===mt.length){var Lr=mt.substr(0,ur),Yr=mt.substr(ur+1,nr-(ur+1)).split(","),_i=1;switch(Lr){case"rgba":if(Yr.length!==4)return null;_i=fe(Yr.pop());case"rgb":return Yr.length!==3?null:[ne(Yr[0]),ne(Yr[1]),ne(Yr[2]),_i];case"hsla":if(Yr.length!==4)return null;_i=fe(Yr.pop());case"hsl":if(Yr.length!==3)return null;var si=(parseFloat(Yr[0])%360+360)%360/360,Hi=fe(Yr[1]),Ei=fe(Yr[2]),Vi=Ei<=.5?Ei*(Hi+1):Ei+Hi-Ei*Hi,en=Ei*2-Vi;return[U(Fe(en,Vi,si+1/3)*255),U(Fe(en,Vi,si)*255),U(Fe(en,Vi,si-1/3)*255),_i];default:return null}}return null}try{y.parseCSSColor=Qe}catch(st){}}),Bf=vd.parseCSSColor,ss=function(y,I,U,J){J===void 0&&(J=1),this.r=y,this.g=I,this.b=U,this.a=J};ss.parse=function(y){if(y){if(y instanceof ss)return y;if(typeof y=="string"){var I=Bf(y);if(I)return new ss(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},ss.prototype.toString=function(){var y=this.toArray(),I=y[0],U=y[1],J=y[2],ne=y[3];return"rgba("+Math.round(I)+","+Math.round(U)+","+Math.round(J)+","+ne+")"},ss.prototype.toArray=function(){var y=this,I=y.r,U=y.g,J=y.b,ne=y.a;return ne===0?[0,0,0,0]:[I*255/ne,U*255/ne,J*255/ne,ne]},ss.black=new ss(0,0,0,1),ss.white=new ss(1,1,1,1),ss.transparent=new ss(0,0,0,0),ss.red=new ss(1,0,0,1);var ff=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"})};ff.prototype.compare=function(y,I){return this.collator.compare(y,I)},ff.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var ih=function(y,I,U,J,ne){this.text=y,this.image=I,this.scale=U,this.fontStack=J,this.textColor=ne},Ul=function(y){this.sections=y};Ul.fromString=function(y){return new Ul([new ih(y,null,null,null,null)])},Ul.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})},Ul.factory=function(y){return y instanceof Ul?y:Ul.fromString(y)},Ul.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(y){return y.text}).join("")},Ul.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 J=typeof U=="number"?[m,y,I,U]:[m,y,I];return"Invalid rgba value ["+J.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 Cc(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 ss)return!0;if(m instanceof ff)return!0;if(m instanceof Ul)return!0;if(m instanceof Js)return!0;if(Array.isArray(m)){for(var y=0,I=m;y2){var Fe=y[1];if(typeof Fe!="string"||!(Fe in dc)||Fe==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);fe=dc[Fe],U++}else fe=So;var Qe;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);Qe=y[2],U++}J=Ql(fe,Qe)}else J=dc[ne];for(var st=[];U1)&&I.push(J)}}return I.concat(this.args.map(function(ne){return ne.serialize()}))};var ec=function(y){this.type=Al,this.sections=y};ec.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 J=[],ne=!1,fe=1;fe<=y.length-1;++fe){var Fe=y[fe];if(ne&&typeof Fe=="object"&&!Array.isArray(Fe)){ne=!1;var Qe=null;if(Fe["font-scale"]&&(Qe=I.parse(Fe["font-scale"],1,Zn),!Qe))return null;var st=null;if(Fe["text-font"]&&(st=I.parse(Fe["text-font"],1,Ql(ko)),!st))return null;var mt=null;if(Fe["text-color"]&&(mt=I.parse(Fe["text-color"],1,Tl),!mt))return null;var Xt=J[J.length-1];Xt.scale=Qe,Xt.font=st,Xt.textColor=mt}else{var ur=I.parse(y[fe],1,So);if(!ur)return null;var nr=ur.type.kind;if(nr!=="string"&&nr!=="value"&&nr!=="null"&&nr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ne=!0,J.push({content:ur,scale:null,font:null,textColor:null})}}return new ec(J)},ec.prototype.evaluate=function(y){var I=function(U){var J=U.content.evaluate(y);return ws(J)===Hc?new ih("",J,null,null,null):new ih($s(J),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 Ul(this.sections.map(I))},ec.prototype.eachChild=function(y){for(var I=0,U=this.sections;I-1),U},Ps.prototype.eachChild=function(y){y(this.input)},Ps.prototype.outputDefined=function(){return!1},Ps.prototype.serialize=function(){return["image",this.input.serialize()]};var ov={"to-boolean":Co,"to-color":Tl,"to-number":Zn,"to-string":ko},wo=function(y,I){this.type=y,this.args=I};wo.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 J=ov[U],ne=[],fe=1;fe4?U="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":U=hc(I[0],I[1],I[2],I[3]),!U))return new ss(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new Ms(U||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var Qe=null,st=0,mt=this.args;st=y[2]||m[1]<=y[1]||m[3]>=y[3])}function Yh(m,y){var I=jc(m[0]),U=kf(m[1]),J=Math.pow(2,y.z);return[Math.round(I*J*uu),Math.round(U*J*uu)]}function Eh(m,y,I){var U=m[0]-y[0],J=m[1]-y[1],ne=m[0]-I[0],fe=m[1]-I[1];return U*fe-ne*J===0&&U*ne<=0&&J*fe<=0}function nh(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 hf(m,y){for(var I=!1,U=0,J=y.length;U0&&Xt<0||mt<0&&Xt>0}function ah(m,y,I,U){var J=[y[0]-m[0],y[1]-m[1]],ne=[U[0]-I[0],U[1]-I[1]];return Kh(ne,J)===0?!1:!!(rc(m,y,I,U)&&rc(I,U,m,y))}function Wc(m,y,I){for(var U=0,J=I;UI[2]){var J=U*.5,ne=m[0]-I[0]>J?-U:I[0]-m[0]>J?U:0;ne===0&&(ne=m[0]-I[2]>J?-U:I[2]-m[0]>J?U:0),m[0]+=ne}Mh(y,m)}function Ch(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Bd(m,y,I,U){for(var J=Math.pow(2,U.z)*uu,ne=[U.x*uu,U.y*uu],fe=[],Fe=0,Qe=m;Fe=0)return!1;var I=!0;return m.eachChild(function(U){I&&!Pu(U,y)&&(I=!1)}),I}var Lc=function(y,I){this.type=I.type,this.name=y,this.boundExpression=I};Lc.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 Lc(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)},Lc.prototype.evaluate=function(y){return this.boundExpression.evaluate(y)},Lc.prototype.eachChild=function(){},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return["var",this.name]};var fl=function(y,I,U,J,ne){I===void 0&&(I=[]),J===void 0&&(J=new Zl),ne===void 0&&(ne=[]),this.registry=y,this.path=I,this.key=I.map(function(fe){return"["+fe+"]"}).join(""),this.scope=J,this.errors=ne,this.expectedType=U};fl.prototype.parse=function(y,I,U,J,ne){return ne===void 0&&(ne={}),I?this.concat(I,U,J)._parse(y,ne):this._parse(y,ne)},fl.prototype._parse=function(y,I){(y===null||typeof y=="string"||typeof y=="boolean"||typeof y=="number")&&(y=["literal",y]);function U(mt,Xt,ur){return ur==="assert"?new Sl(Xt,[mt]):ur==="coerce"?new wo(Xt,[mt]):mt}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 J=y[0];if(typeof J!="string")return this.error("Expression name must be a string, but found "+typeof J+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ne=this.registry[J];if(ne){var fe=ne.parse(y,this);if(!fe)return null;if(this.expectedType){var Fe=this.expectedType,Qe=fe.type;if((Fe.kind==="string"||Fe.kind==="number"||Fe.kind==="boolean"||Fe.kind==="object"||Fe.kind==="array")&&Qe.kind==="value")fe=U(fe,Fe,I.typeAnnotation||"assert");else if((Fe.kind==="color"||Fe.kind==="formatted"||Fe.kind==="resolvedImage")&&(Qe.kind==="value"||Qe.kind==="string"))fe=U(fe,Fe,I.typeAnnotation||"coerce");else if(this.checkSubtype(Fe,Qe))return null}if(!(fe instanceof hs)&&fe.type.kind!=="resolvedImage"&&Xc(fe)){var st=new $o;try{fe=new hs(fe.type,fe.evaluate(st))}catch(mt){return this.error(mt.message),null}}return fe}return this.error('Unknown expression "'+J+'". 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.")},fl.prototype.concat=function(y,I,U){var J=typeof y=="number"?this.path.concat(y):this.path,ne=U?this.scope.concat(U):this.scope;return new fl(this.registry,J,I||null,ne,this.errors)},fl.prototype.error=function(y){for(var I=[],U=arguments.length-1;U-- >0;)I[U]=arguments[U+1];var J=""+this.key+I.map(function(ne){return"["+ne+"]"}).join("");this.errors.push(new Ks(J,y))},fl.prototype.checkSubtype=function(y,I){var U=kc(y,I);return U&&this.error(U),U};function Xc(m){if(m instanceof Lc)return Xc(m.boundExpression);if(m instanceof Ja&&m.name==="error")return!1;if(m instanceof tc)return!1;if(m instanceof Lu)return!1;var y=m instanceof wo||m instanceof Sl,I=!0;return m.eachChild(function(U){y?I=I&&Xc(U):I=I&&U instanceof hs}),I?$h(m)&&Pu(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function ic(m,y){for(var I=m.length-1,U=0,J=I,ne=0,fe,Fe;U<=J;)if(ne=Math.floor((U+J)/2),fe=m[ne],Fe=m[ne+1],fe<=y){if(ne===I||yy)J=ne-1;else throw new Ms("Input is not a number.");return 0}var yu=function(y,I,U){this.type=y,this.input=I,this.labels=[],this.outputs=[];for(var J=0,ne=U;J=Fe)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',st);var Xt=I.parse(Qe,mt,ne);if(!Xt)return null;ne=ne||Xt.type,J.push([Fe,Xt])}return new yu(ne,U,J)},yu.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var J=this.input.evaluate(y);if(J<=I[0])return U[0].evaluate(y);var ne=I.length;if(J>=I[ne-1])return U[ne-1].evaluate(y);var fe=ic(I,J);return U[fe].evaluate(y)},yu.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 Qs(m,y,I){return m*(1-I)+y*I}function Qh(m,y,I){return new ss(Qs(m.r,y.r,I),Qs(m.g,y.g,I),Qs(m.b,y.b,I),Qs(m.a,y.a,I))}function gd(m,y,I){return m.map(function(U,J){return Qs(U,y[J],I)})}var ju=Object.freeze({__proto__:null,number:Qs,color:Qh,array:gd}),Pc=.95047,vc=1,sv=1.08883,Lf=4/29,Uf=6/29,Iu=3*Uf*Uf,oh=Uf*Uf*Uf,tu=Math.PI/180,vf=180/Math.PI;function md(m){return m>oh?Math.pow(m,1/3):m/Iu+Lf}function sh(m){return m>Uf?m*m*m:Iu*(m-Lf)}function Fs(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function _u(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function xu(m){var y=_u(m.r),I=_u(m.g),U=_u(m.b),J=md((.4124564*y+.3575761*I+.1804375*U)/Pc),ne=md((.2126729*y+.7151522*I+.072175*U)/vc),fe=md((.0193339*y+.119192*I+.9503041*U)/sv);return{l:116*ne-16,a:500*(J-ne),b:200*(ne-fe),alpha:m.a}}function Lh(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=vc*sh(y),I=Pc*sh(I),U=sv*sh(U),new ss(Fs(3.2404542*I-1.5371385*y-.4985314*U),Fs(-.969266*I+1.8760108*y+.041556*U),Fs(.0556434*I-.2040259*y+1.0572252*U),m.alpha)}function Is(m,y,I){return{l:Qs(m.l,y.l,I),a:Qs(m.a,y.a,I),b:Qs(m.b,y.b,I),alpha:Qs(m.alpha,y.alpha,I)}}function Pf(m){var y=xu(m),I=y.l,U=y.a,J=y.b,ne=Math.atan2(J,U)*vf;return{h:ne<0?ne+360:ne,c:Math.sqrt(U*U+J*J),l:I,alpha:m.a}}function Ic(m){var y=m.h*tu,I=m.c,U=m.l;return Lh({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 Vf(m,y,I){return{h:Wu(m.h,y.h,I),c:Qs(m.c,y.c,I),l:Qs(m.l,y.l,I),alpha:Qs(m.alpha,y.alpha,I)}}var pc={forward:xu,reverse:Lh,interpolate:Is},pf={forward:Pf,reverse:Ic,interpolate:Vf},Ph=Object.freeze({__proto__:null,lab:pc,hcl:pf}),Dl=function(y,I,U,J,ne){this.type=y,this.operator=I,this.interpolation=U,this.input=J,this.labels=[],this.outputs=[];for(var fe=0,Fe=ne;fe1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);J={name:"cubic-bezier",controlPoints:Qe}}else return I.error("Unknown interpolation type "+String(J[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(ne=I.parse(ne,2,Zn),!ne)return null;var st=[],mt=null;U==="interpolate-hcl"||U==="interpolate-lab"?mt=Tl:I.expectedType&&I.expectedType.kind!=="value"&&(mt=I.expectedType);for(var Xt=0;Xt=ur)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Lr);var _i=I.parse(nr,Yr,mt);if(!_i)return null;mt=mt||_i.type,st.push([ur,_i])}return mt.kind!=="number"&&mt.kind!=="color"&&!(mt.kind==="array"&&mt.itemType.kind==="number"&&typeof mt.N=="number")?I.error("Type "+Ls(mt)+" is not interpolatable."):new Dl(mt,U,J,ne,st)},Dl.prototype.evaluate=function(y){var I=this.labels,U=this.outputs;if(I.length===1)return U[0].evaluate(y);var J=this.input.evaluate(y);if(J<=I[0])return U[0].evaluate(y);var ne=I.length;if(J>=I[ne-1])return U[ne-1].evaluate(y);var fe=ic(I,J),Fe=I[fe],Qe=I[fe+1],st=Dl.interpolationFactor(this.interpolation,J,Fe,Qe),mt=U[fe].evaluate(y),Xt=U[fe+1].evaluate(y);return this.operator==="interpolate"?ju[this.type.kind.toLowerCase()](mt,Xt,st):this.operator==="interpolate-hcl"?pf.reverse(pf.interpolate(pf.forward(mt),pf.forward(Xt),st)):pc.reverse(pc.interpolate(pc.forward(mt),pc.forward(Xt),st))},Dl.prototype.eachChild=function(y){y(this.input);for(var I=0,U=this.outputs;I=U.length)throw new Ms("Array index out of bounds: "+I+" > "+(U.length-1)+".");if(I!==Math.floor(I))throw new Ms("Array index must be an integer, but found "+I+" instead.");return U[I]},gc.prototype.eachChild=function(y){y(this.index),y(this.input)},gc.prototype.outputDefined=function(){return!1},gc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var hl=function(y,I){this.type=Co,this.needle=y,this.haystack=I};hl.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,So),J=I.parse(y[2],2,So);return!U||!J?null:Of(U.type,[Co,ko,Zn,Ec,So])?new hl(U,J):I.error("Expected first argument to be of type boolean, string, number or null, but found "+Ls(U.type)+" instead")},hl.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!U)return!1;if(!Gc(I,["boolean","string","number","null"]))throw new Ms("Expected first argument to be of type boolean, string, number or null, but found "+Ls(ws(I))+" instead.");if(!Gc(U,["string","array"]))throw new Ms("Expected second argument to be of type array or string, but found "+Ls(ws(U))+" instead.");return U.indexOf(I)>=0},hl.prototype.eachChild=function(y){y(this.needle),y(this.haystack)},hl.prototype.outputDefined=function(){return!0},hl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var ru=function(y,I,U){this.type=Zn,this.needle=y,this.haystack=I,this.fromIndex=U};ru.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,So),J=I.parse(y[2],2,So);if(!U||!J)return null;if(!Of(U.type,[Co,ko,Zn,Ec,So]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+Ls(U.type)+" instead");if(y.length===4){var ne=I.parse(y[3],3,Zn);return ne?new ru(U,J,ne):null}else return new ru(U,J)},ru.prototype.evaluate=function(y){var I=this.needle.evaluate(y),U=this.haystack.evaluate(y);if(!Gc(I,["boolean","string","number","null"]))throw new Ms("Expected first argument to be of type boolean, string, number or null, but found "+Ls(ws(I))+" instead.");if(!Gc(U,["string","array"]))throw new Ms("Expected second argument to be of type array or string, but found "+Ls(ws(U))+" instead.");if(this.fromIndex){var J=this.fromIndex.evaluate(y);return U.indexOf(I,J)}return U.indexOf(I)},ru.prototype.eachChild=function(y){y(this.needle),y(this.haystack),this.fromIndex&&y(this.fromIndex)},ru.prototype.outputDefined=function(){return!1},ru.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 mc=function(y,I,U,J,ne,fe){this.inputType=y,this.type=I,this.input=U,this.cases=J,this.outputs=ne,this.otherwise=fe};mc.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,J;I.expectedType&&I.expectedType.kind!=="value"&&(J=I.expectedType);for(var ne={},fe=[],Fe=2;FeNumber.MAX_SAFE_INTEGER)return mt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof nr=="number"&&Math.floor(nr)!==nr)return mt.error("Numeric branch labels must be integer values.");if(!U)U=ws(nr);else if(mt.checkSubtype(U,ws(nr)))return null;if(typeof ne[String(nr)]!="undefined")return mt.error("Branch labels must be unique.");ne[String(nr)]=fe.length}var Lr=I.parse(st,Fe,J);if(!Lr)return null;J=J||Lr.type,fe.push(Lr)}var Yr=I.parse(y[1],1,So);if(!Yr)return null;var _i=I.parse(y[y.length-1],y.length-1,J);return!_i||Yr.type.kind!=="value"&&I.concat(1).checkSubtype(U,Yr.type)?null:new mc(U,J,Yr,ne,fe,_i)},mc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=ws(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return U.evaluate(y)},mc.prototype.eachChild=function(y){y(this.input),this.outputs.forEach(y),y(this.otherwise)},mc.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})&&this.otherwise.outputDefined()},mc.prototype.serialize=function(){for(var y=this,I=["match",this.input.serialize()],U=Object.keys(this.cases).sort(),J=[],ne={},fe=0,Fe=U;fe=5)return I.error("Expected 3 or 4 arguments, but found "+(y.length-1)+" instead.");var U=I.parse(y[1],1,So),J=I.parse(y[2],2,Zn);if(!U||!J)return null;if(!Of(U.type,[Ql(So),ko,So]))return I.error("Expected first argument to be of type array or string, but found "+Ls(U.type)+" instead");if(y.length===4){var ne=I.parse(y[3],3,Zn);return ne?new nc(U.type,U,J,ne):null}else return new nc(U.type,U,J)},nc.prototype.evaluate=function(y){var I=this.input.evaluate(y),U=this.beginIndex.evaluate(y);if(!Gc(I,["string","array"]))throw new Ms("Expected first argument to be of type array or string, but found "+Ls(ws(I))+" instead.");if(this.endIndex){var J=this.endIndex.evaluate(y);return I.slice(U,J)}return I.slice(U)},nc.prototype.eachChild=function(y){y(this.input),y(this.beginIndex),this.endIndex&&y(this.endIndex)},nc.prototype.outputDefined=function(){return!1},nc.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 gf(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 gt(m,y,I){return y===I}function Bt(m,y,I){return y!==I}function wr(m,y,I){return yI}function Ur(m,y,I){return y<=I}function fi(m,y,I){return y>=I}function xi(m,y,I,U){return U.compare(y,I)===0}function Fi(m,y,I,U){return!xi(m,y,I,U)}function Xi(m,y,I,U){return U.compare(y,I)<0}function hn(m,y,I,U){return U.compare(y,I)>0}function Ti(m,y,I,U){return U.compare(y,I)<=0}function qi(m,y,I,U){return U.compare(y,I)>=0}function Ii(m,y,I){var U=m!=="=="&&m!=="!=";return function(){function J(ne,fe,Fe){this.type=Co,this.lhs=ne,this.rhs=fe,this.collator=Fe,this.hasUntypedArgument=ne.type.kind==="value"||fe.type.kind==="value"}return J.parse=function(fe,Fe){if(fe.length!==3&&fe.length!==4)return Fe.error("Expected two or three arguments.");var Qe=fe[0],st=Fe.parse(fe[1],1,So);if(!st)return null;if(!gf(Qe,st.type))return Fe.concat(1).error('"'+Qe+`" comparisons are not supported for type '`+Ls(st.type)+"'.");var mt=Fe.parse(fe[2],2,So);if(!mt)return null;if(!gf(Qe,mt.type))return Fe.concat(2).error('"'+Qe+`" comparisons are not supported for type '`+Ls(mt.type)+"'.");if(st.type.kind!==mt.type.kind&&st.type.kind!=="value"&&mt.type.kind!=="value")return Fe.error("Cannot compare types '"+Ls(st.type)+"' and '"+Ls(mt.type)+"'.");U&&(st.type.kind==="value"&&mt.type.kind!=="value"?st=new Sl(mt.type,[st]):st.type.kind!=="value"&&mt.type.kind==="value"&&(mt=new Sl(st.type,[mt])));var Xt=null;if(fe.length===4){if(st.type.kind!=="string"&&mt.type.kind!=="string"&&st.type.kind!=="value"&&mt.type.kind!=="value")return Fe.error("Cannot use collator to compare non-string types.");if(Xt=Fe.parse(fe[3],3,rh),!Xt)return null}return new J(st,mt,Xt)},J.prototype.evaluate=function(fe){var Fe=this.lhs.evaluate(fe),Qe=this.rhs.evaluate(fe);if(U&&this.hasUntypedArgument){var st=ws(Fe),mt=ws(Qe);if(st.kind!==mt.kind||!(st.kind==="string"||st.kind==="number"))throw new Ms('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+st.kind+", "+mt.kind+") instead.")}if(this.collator&&!U&&this.hasUntypedArgument){var Xt=ws(Fe),ur=ws(Qe);if(Xt.kind!=="string"||ur.kind!=="string")return y(fe,Fe,Qe)}return this.collator?I(fe,Fe,Qe,this.collator.evaluate(fe)):y(fe,Fe,Qe)},J.prototype.eachChild=function(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)},J.prototype.outputDefined=function(){return!0},J.prototype.serialize=function(){var fe=[m];return this.eachChild(function(Fe){fe.push(Fe.serialize())}),fe},J}()}var mi=Ii("==",gt,xi),Pn=Ii("!=",Bt,Fi),Ma=Ii("<",wr,Xi),Ta=Ii(">",vr,hn),Ea=Ii("<=",Ur,Ti),qa=Ii(">=",fi,qi),Cn=function(y,I,U,J,ne){this.type=ko,this.number=y,this.locale=I,this.currency=U,this.minFractionDigits=J,this.maxFractionDigits=ne};Cn.parse=function(y,I){if(y.length!==3)return I.error("Expected two arguments.");var U=I.parse(y[1],1,Zn);if(!U)return null;var J=y[2];if(typeof J!="object"||Array.isArray(J))return I.error("NumberFormat options argument must be an object.");var ne=null;if(J.locale&&(ne=I.parse(J.locale,1,ko),!ne))return null;var fe=null;if(J.currency&&(fe=I.parse(J.currency,1,ko),!fe))return null;var Fe=null;if(J["min-fraction-digits"]&&(Fe=I.parse(J["min-fraction-digits"],1,Zn),!Fe))return null;var Qe=null;return J["max-fraction-digits"]&&(Qe=I.parse(J["max-fraction-digits"],1,Zn),!Qe)?null:new Cn(U,ne,fe,Fe,Qe)},Cn.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))},Cn.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)},Cn.prototype.outputDefined=function(){return!1},Cn.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 sn=function(y){this.type=Zn,this.input=y};sn.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 "+Ls(U.type)+" instead."):new sn(U):null},sn.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 Ms("Expected value to be of type string or array, but found "+Ls(ws(I))+" instead.")},sn.prototype.eachChild=function(y){y(this.input)},sn.prototype.outputDefined=function(){return!1},sn.prototype.serialize=function(){var y=["length"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Ua={"==":mi,"!=":Pn,">":Ta,"<":Ma,">=":qa,"<=":Ea,array:Sl,at:gc,boolean:Sl,case:Yc,coalesce:Zu,collator:tc,format:ec,image:Ps,in:hl,"index-of":ru,interpolate:Dl,"interpolate-hcl":Dl,"interpolate-lab":Dl,length:sn,let:Dc,literal:hs,match:mc,number:Sl,"number-format":Cn,object:Sl,slice:nc,step:yu,string:Sl,"to-boolean":wo,"to-color":wo,"to-number":wo,"to-string":wo,var:Lc,within:Lu};function mo(m,y){var I=y[0],U=y[1],J=y[2],ne=y[3];I=I.evaluate(m),U=U.evaluate(m),J=J.evaluate(m);var fe=ne?ne.evaluate(m):1,Fe=hc(I,U,J,fe);if(Fe)throw new Ms(Fe);return new ss(I/255*fe,U/255*fe,J/255*fe,fe)}function Xo(m,y){return m in y}function Ts(m,y){var I=y[m];return typeof I=="undefined"?null:I}function Qo(m,y,I,U){for(;I<=U;){var J=I+U>>1;if(y[J]===m)return!0;y[J]>m?U=J-1:I=J+1}return!1}function ys(m){return{type:m}}Ja.register(Ua,{error:[cf,[ko],function(m,y){var I=y[0];throw new Ms(I.evaluate(m))}],typeof:[ko,[So],function(m,y){var I=y[0];return Ls(ws(I.evaluate(m)))}],"to-rgba":[Ql(Zn,4),[Tl],function(m,y){var I=y[0];return I.evaluate(m).toArray()}],rgb:[Tl,[Zn,Zn,Zn],mo],rgba:[Tl,[Zn,Zn,Zn,Zn],mo],has:{type:Co,overloads:[[[ko],function(m,y){var I=y[0];return Xo(I.evaluate(m),m.properties())}],[[ko,uf],function(m,y){var I=y[0],U=y[1];return Xo(I.evaluate(m),U.evaluate(m))}]]},get:{type:So,overloads:[[[ko],function(m,y){var I=y[0];return Ts(I.evaluate(m),m.properties())}],[[ko,uf],function(m,y){var I=y[0],U=y[1];return Ts(I.evaluate(m),U.evaluate(m))}]]},"feature-state":[So,[ko],function(m,y){var I=y[0];return Ts(I.evaluate(m),m.featureState||{})}],properties:[uf,[],function(m){return m.properties()}],"geometry-type":[ko,[],function(m){return m.geometryType()}],id:[So,[],function(m){return m.id()}],zoom:[Zn,[],function(m){return m.globals.zoom}],"heatmap-density":[Zn,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[Zn,[],function(m){return m.globals.lineProgress||0}],accumulated:[So,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[Zn,ys(Zn),function(m,y){for(var I=0,U=0,J=y;U":[Co,[ko,So],function(m,y){var I=y[0],U=y[1],J=m.properties()[I.value],ne=U.value;return typeof J==typeof ne&&J>ne}],"filter-id->":[Co,[So],function(m,y){var I=y[0],U=m.id(),J=I.value;return typeof U==typeof J&&U>J}],"filter-<=":[Co,[ko,So],function(m,y){var I=y[0],U=y[1],J=m.properties()[I.value],ne=U.value;return typeof J==typeof ne&&J<=ne}],"filter-id-<=":[Co,[So],function(m,y){var I=y[0],U=m.id(),J=I.value;return typeof U==typeof J&&U<=J}],"filter->=":[Co,[ko,So],function(m,y){var I=y[0],U=y[1],J=m.properties()[I.value],ne=U.value;return typeof J==typeof ne&&J>=ne}],"filter-id->=":[Co,[So],function(m,y){var I=y[0],U=m.id(),J=I.value;return typeof U==typeof J&&U>=J}],"filter-has":[Co,[So],function(m,y){var I=y[0];return I.value in m.properties()}],"filter-has-id":[Co,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[Co,[Ql(ko)],function(m,y){var I=y[0];return I.value.indexOf(m.geometryType())>=0}],"filter-id-in":[Co,[Ql(So)],function(m,y){var I=y[0];return I.value.indexOf(m.id())>=0}],"filter-in-small":[Co,[ko,Ql(So)],function(m,y){var I=y[0],U=y[1];return U.value.indexOf(m.properties()[I.value])>=0}],"filter-in-large":[Co,[ko,Ql(So)],function(m,y){var I=y[0],U=y[1];return Qo(m.properties()[I.value],U.value,0,U.value.length-1)}],all:{type:Co,overloads:[[[Co,Co],function(m,y){var I=y[0],U=y[1];return I.evaluate(m)&&U.evaluate(m)}],[ys(Co),function(m,y){for(var I=0,U=y;I-1}function ia(m){return!!m.expression&&m.expression.interpolated}function Ka(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function vs(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function Ko(m){return m}function iu(m,y){var I=y.type==="color",U=m.stops&&typeof m.stops[0][0]=="object",J=U||m.property!==void 0,ne=U||!J,fe=m.type||(ia(y)?"exponential":"interval");if(I&&(m=Il({},m),m.stops&&(m.stops=m.stops.map(function($n){return[$n[0],ss.parse($n[1])]})),m.default?m.default=ss.parse(m.default):m.default=ss.parse(y.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Ph[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var Fe,Qe,st;if(fe==="exponential")Fe=bu;else if(fe==="interval")Fe=mf;else if(fe==="categorical"){Fe=ac,Qe=Object.create(null);for(var mt=0,Xt=m.stops;mt=m.stops[U-1][0])return m.stops[U-1][1];var J=ic(m.stops.map(function(ne){return ne[0]}),I);return m.stops[J][1]}function bu(m,y,I){var U=m.base!==void 0?m.base:1;if(Ka(I)!=="number")return Du(m.default,y.default);var J=m.stops.length;if(J===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[J-1][0])return m.stops[J-1][1];var ne=ic(m.stops.map(function(Xt){return Xt[0]}),I),fe=Ru(I,U,m.stops[ne][0],m.stops[ne+1][0]),Fe=m.stops[ne][1],Qe=m.stops[ne+1][1],st=ju[y.type]||Ko;if(m.colorSpace&&m.colorSpace!=="rgb"){var mt=Ph[m.colorSpace];st=function(Xt,ur){return mt.reverse(mt.interpolate(mt.forward(Xt),mt.forward(ur),fe))}}return typeof Fe.evaluate=="function"?{evaluate:function(){for(var ur=[],nr=arguments.length;nr--;)ur[nr]=arguments[nr];var Lr=Fe.evaluate.apply(void 0,ur),Yr=Qe.evaluate.apply(void 0,ur);if(!(Lr===void 0||Yr===void 0))return st(Lr,Yr,fe)}}:st(Fe,Qe,fe)}function Kc(m,y,I){return y.type==="color"?I=ss.parse(I):y.type==="formatted"?I=Ul.fromString(I.toString()):y.type==="resolvedImage"?I=Js.fromString(I.toString()):Ka(I)!==y.type&&(y.type!=="enum"||!y.values[I])&&(I=void 0),Du(I,m.default,y.default)}function Ru(m,y,I,U){var J=U-I,ne=m-I;return J===0?0:y===1?ne/J:(Math.pow(y,ne)-1)/(Math.pow(y,J)-1)}var Rc=function(y,I){this.expression=y,this._warningHistory={},this._evaluator=new $o,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Rc.prototype.evaluateWithoutErrorHandling=function(y,I,U,J,ne,fe){return this._evaluator.globals=y,this._evaluator.feature=I,this._evaluator.featureState=U,this._evaluator.canonical=J,this._evaluator.availableImages=ne||null,this._evaluator.formattedSection=fe,this.expression.evaluate(this._evaluator)},Rc.prototype.evaluate=function(y,I,U,J,ne,fe){this._evaluator.globals=y,this._evaluator.feature=I||null,this._evaluator.featureState=U||null,this._evaluator.canonical=J,this._evaluator.availableImages=ne||null,this._evaluator.formattedSection=fe||null;try{var Fe=this.expression.evaluate(this._evaluator);if(Fe==null||typeof Fe=="number"&&Fe!==Fe)return this._defaultValue;if(this._enumValues&&!(Fe in this._enumValues))throw new Ms("Expected value to be one of "+Object.keys(this._enumValues).map(function(Qe){return JSON.stringify(Qe)}).join(", ")+", but found "+JSON.stringify(Fe)+" instead.");return Fe}catch(Qe){return this._warningHistory[Qe.message]||(this._warningHistory[Qe.message]=!0,typeof console!="undefined"&&console.warn(Qe.message)),this._defaultValue}};function Ra(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Ua}function eo(m,y){var I=new fl(Ua,[],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?Bo(new Rc(U,y)):yl(I.errors)}var Jc=function(y,I){this.kind=y,this._styleExpression=I,this.isStateDependent=y!=="constant"&&!eu(I.expression)};Jc.prototype.evaluateWithoutErrorHandling=function(y,I,U,J,ne,fe){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,J,ne,fe)},Jc.prototype.evaluate=function(y,I,U,J,ne,fe){return this._styleExpression.evaluate(y,I,U,J,ne,fe)};var yc=function(y,I,U,J){this.kind=y,this.zoomStops=U,this._styleExpression=I,this.isStateDependent=y!=="camera"&&!eu(I.expression),this.interpolationType=J};yc.prototype.evaluateWithoutErrorHandling=function(y,I,U,J,ne,fe){return this._styleExpression.evaluateWithoutErrorHandling(y,I,U,J,ne,fe)},yc.prototype.evaluate=function(y,I,U,J,ne,fe){return this._styleExpression.evaluate(y,I,U,J,ne,fe)},yc.prototype.interpolationFactor=function(y,I,U){return this.interpolationType?Dl.interpolationFactor(this.interpolationType,y,I,U):0};function _c(m,y){if(m=eo(m,y),m.result==="error")return m;var I=m.value.expression,U=$h(I);if(!U&&!Gs(y))return yl([new Ks("","data expressions not supported")]);var J=Pu(I,["zoom"]);if(!J&&!Ds(y))return yl([new Ks("","zoom expressions not supported")]);var ne=B(I);if(!ne&&!J)return yl([new Ks("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ne instanceof Ks)return yl([ne]);if(ne instanceof Dl&&!ia(y))return yl([new Ks("",'"interpolate" expressions cannot be used with this property')]);if(!ne)return Bo(U?new Jc("constant",m.value):new Jc("source",m.value));var fe=ne instanceof Dl?ne.interpolation:void 0;return Bo(U?new yc("camera",m.value,ne.labels,fe):new yc("composite",m.value,ne.labels,fe))}var le=function(y,I){this._parameters=y,this._specification=I,Il(this,iu(this._parameters,this._specification))};le.deserialize=function(y){return new le(y._parameters,y._specification)},le.serialize=function(y){return{_parameters:y._parameters,_specification:y._specification}};function w(m,y){if(vs(m))return new le(m,y);if(Ra(m)){var I=_c(m,y);if(I.result==="error")throw new Error(I.value.map(function(J){return J.key+": "+J.message}).join(", "));return I.value}else{var U=m;return typeof m=="string"&&y.type==="color"&&(U=ss.parse(m)),{kind:"constant",evaluate:function(){return U}}}}function B(m){var y=null;if(m instanceof Dc)y=B(m.result);else if(m instanceof Zu)for(var I=0,U=m.args;IU.maximum?[new fa(y,I,I+" is greater than the maximum value "+U.maximum)]:[]}function it(m){var y=m.valueSpec,I=vo(m.value.type),U,J={},ne,fe,Fe=I!=="categorical"&&m.value.property===void 0,Qe=!Fe,st=Ka(m.value.stops)==="array"&&Ka(m.value.stops[0])==="array"&&Ka(m.value.stops[0][0])==="object",mt=se({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:Xt,default:Lr}});return I==="identity"&&Fe&&mt.push(new fa(m.key,m.value,'missing required property "property"')),I!=="identity"&&!m.value.stops&&mt.push(new fa(m.key,m.value,'missing required property "stops"')),I==="exponential"&&m.valueSpec.expression&&!ia(m.valueSpec)&&mt.push(new fa(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(Qe&&!Gs(m.valueSpec)?mt.push(new fa(m.key,m.value,"property functions not supported")):Fe&&!Ds(m.valueSpec)&&mt.push(new fa(m.key,m.value,"zoom functions not supported"))),(I==="categorical"||st)&&m.value.property===void 0&&mt.push(new fa(m.key,m.value,'"property" property is required')),mt;function Xt(Yr){if(I==="identity")return[new fa(Yr.key,Yr.value,'identity function may not have a "stops" property')];var _i=[],si=Yr.value;return _i=_i.concat(qe({key:Yr.key,value:si,valueSpec:Yr.valueSpec,style:Yr.style,styleSpec:Yr.styleSpec,arrayElementValidator:ur})),Ka(si)==="array"&&si.length===0&&_i.push(new fa(Yr.key,si,"array must have at least one stop")),_i}function ur(Yr){var _i=[],si=Yr.value,Hi=Yr.key;if(Ka(si)!=="array")return[new fa(Hi,si,"array expected, "+Ka(si)+" found")];if(si.length!==2)return[new fa(Hi,si,"array length 2 expected, length "+si.length+" found")];if(st){if(Ka(si[0])!=="object")return[new fa(Hi,si,"object expected, "+Ka(si[0])+" found")];if(si[0].zoom===void 0)return[new fa(Hi,si,"object stop key must have zoom")];if(si[0].value===void 0)return[new fa(Hi,si,"object stop key must have value")];if(fe&&fe>vo(si[0].zoom))return[new fa(Hi,si[0].zoom,"stop zoom values must appear in ascending order")];vo(si[0].zoom)!==fe&&(fe=vo(si[0].zoom),ne=void 0,J={}),_i=_i.concat(se({key:Hi+"[0]",value:si[0],valueSpec:{zoom:{}},style:Yr.style,styleSpec:Yr.styleSpec,objectElementValidators:{zoom:je,value:nr}}))}else _i=_i.concat(nr({key:Hi+"[0]",value:si[0],valueSpec:{},style:Yr.style,styleSpec:Yr.styleSpec},si));return Ra(Wl(si[1]))?_i.concat([new fa(Hi+"[1]",si[1],"expressions are not allowed in function stops.")]):_i.concat(Wa({key:Hi+"[1]",value:si[1],valueSpec:y,style:Yr.style,styleSpec:Yr.styleSpec}))}function nr(Yr,_i){var si=Ka(Yr.value),Hi=vo(Yr.value),Ei=Yr.value!==null?Yr.value:_i;if(!U)U=si;else if(si!==U)return[new fa(Yr.key,Ei,si+" stop domain type must match previous stop domain type "+U)];if(si!=="number"&&si!=="string"&&si!=="boolean")return[new fa(Yr.key,Ei,"stop domain value must be a number, string, or boolean")];if(si!=="number"&&I!=="categorical"){var Vi="number expected, "+si+" found";return Gs(y)&&I===void 0&&(Vi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fa(Yr.key,Ei,Vi)]}return I==="categorical"&&si==="number"&&(!isFinite(Hi)||Math.floor(Hi)!==Hi)?[new fa(Yr.key,Ei,"integer expected, found "+Hi)]:I!=="categorical"&&si==="number"&&ne!==void 0&&Hi=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 Oe(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var y=1;y"||y==="<="||y===">="?He(m[1],m[2],y):y==="any"?et(m.slice(1)):y==="all"?["all"].concat(m.slice(1).map(Je)):y==="none"?["all"].concat(m.slice(1).map(Je).map(Ut)):y==="in"?Mt(m[1],m.slice(2)):y==="!in"?Ut(Mt(m[1],m.slice(2))):y==="has"?Rt(m[1]):y==="!has"?Ut(Rt(m[1])):y==="within"?m:!0;return I}function He(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 et(m){return["any"].concat(m.map(Je))}function Mt(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(Pe)]]:["filter-in-small",m,["literal",y]]}}function Rt(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function Ut(m){return["!",m]}function tr(m){return Sr(Wl(m.value))?yt(Il({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):mr(m)}function mr(m){var y=m.value,I=m.key;if(Ka(y)!=="array")return[new fa(I,y,"array expected, "+Ka(y)+" found")];var U=m.styleSpec,J,ne=[];if(y.length<1)return[new fa(I,y,"filter array must have at least 1 element")];switch(ne=ne.concat(hr({key:I+"[0]",value:y[0],valueSpec:U.filter_operator,style:m.style,styleSpec:m.styleSpec})),vo(y[0])){case"<":case"<=":case">":case">=":y.length>=2&&vo(y[1])==="$type"&&ne.push(new fa(I,y,'"$type" cannot be use with operator "'+y[0]+'"'));case"==":case"!=":y.length!==3&&ne.push(new fa(I,y,'filter array for operator "'+y[0]+'" must have 3 elements'));case"in":case"!in":y.length>=2&&(J=Ka(y[1]),J!=="string"&&ne.push(new fa(I+"[1]",y[1],"string expected, "+J+" found")));for(var fe=2;fe=mt[nr+0]&&U>=mt[nr+1])?(fe[ur]=!0,ne.push(st[ur])):fe[ur]=!1}}},nu.prototype._forEachCell=function(m,y,I,U,J,ne,fe,Fe){for(var Qe=this._convertToCellCoord(m),st=this._convertToCellCoord(y),mt=this._convertToCellCoord(I),Xt=this._convertToCellCoord(U),ur=Qe;ur<=mt;ur++)for(var nr=st;nr<=Xt;nr++){var Lr=this.d*nr+ur;if(!(Fe&&!Fe(this._convertFromCellCoord(ur),this._convertFromCellCoord(nr),this._convertFromCellCoord(ur+1),this._convertFromCellCoord(nr+1)))&&J.call(this,m,y,I,U,Lr,ne,fe,Fe))return}},nu.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},nu.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},nu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,y=el+this.cells.length+1+1,I=0,U=0;U=0)){var Xt=m[mt];st[mt]=zl[Qe].shallow.indexOf(mt)>=0?Xt:Ue(Xt,y)}m instanceof Error&&(st.message=m.message)}if(st.$name)throw new Error("$name property is reserved for worker serialization logic.");return Qe!=="Object"&&(st.$name=Qe),st}throw new Error("can't serialize object of type "+typeof m)}function We(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||we(m)||Be(m)||ArrayBuffer.isView(m)||m instanceof zc)return m;if(Array.isArray(m))return m.map(We);if(typeof m=="object"){var y=m.$name||"Object",I=zl[y],U=I.klass;if(!U)throw new Error("can't deserialize unregistered class "+y);if(U.deserialize)return U.deserialize(m);for(var J=Object.create(U.prototype),ne=0,fe=Object.keys(m);ne=0?Qe:We(Qe)}}return J}throw new Error("can't deserialize object of type "+typeof m)}var wt=function(){this.first=!0};wt.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 zt(m){for(var y=0,I=m;y=65097&&m<=65103)||tt["CJK Compatibility Ideographs"](m)||tt["CJK Compatibility"](m)||tt["CJK Radicals Supplement"](m)||tt["CJK Strokes"](m)||tt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||tt["CJK Unified Ideographs Extension A"](m)||tt["CJK Unified Ideographs"](m)||tt["Enclosed CJK Letters and Months"](m)||tt["Hangul Compatibility Jamo"](m)||tt["Hangul Jamo Extended-A"](m)||tt["Hangul Jamo Extended-B"](m)||tt["Hangul Jamo"](m)||tt["Hangul Syllables"](m)||tt.Hiragana(m)||tt["Ideographic Description Characters"](m)||tt.Kanbun(m)||tt["Kangxi Radicals"](m)||tt["Katakana Phonetic Extensions"](m)||tt.Katakana(m)&&m!==12540||tt["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)||tt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||tt["Unified Canadian Aboriginal Syllabics"](m)||tt["Unified Canadian Aboriginal Syllabics Extended"](m)||tt["Vertical Forms"](m)||tt["Yijing Hexagram Symbols"](m)||tt["Yi Syllables"](m)||tt["Yi Radicals"](m))}function oi(m){return!!(tt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||tt["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)||tt["Letterlike Symbols"](m)||tt["Number Forms"](m)||tt["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)||tt["Control Pictures"](m)&&m!==9251||tt["Optical Character Recognition"](m)||tt["Enclosed Alphanumerics"](m)||tt["Geometric Shapes"](m)||tt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||tt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||tt["CJK Symbols and Punctuation"](m)||tt.Katakana(m)||tt["Private Use Area"](m)||tt["CJK Compatibility Forms"](m)||tt["Small Form Variants"](m)||tt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function ui(m){return!(Ir(m)||oi(m))}function qr(m){return tt.Arabic(m)||tt["Arabic Supplement"](m)||tt["Arabic Extended-A"](m)||tt["Arabic Presentation Forms-A"](m)||tt["Arabic Presentation Forms-B"](m)}function Kr(m){return m>=1424&&m<=2303||tt["Arabic Presentation Forms-A"](m)||tt["Arabic Presentation Forms-B"](m)}function ii(m,y){return!(!y&&Kr(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||tt.Khmer(m))}function vi(m){for(var y=0,I=m;y-1&&(dn=Jr.error),un&&un(m)};function ga(){ya.fire(new jo("pluginStateChange",{pluginStatus:dn,pluginURL:En}))}var ya=new Sn,so=function(){return dn},wa=function(m){return m({pluginStatus:dn,pluginURL:En}),ya.on("pluginStateChange",m),m},io=function(m,y,I){if(I===void 0&&(I=!1),dn===Jr.deferred||dn===Jr.loading||dn===Jr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");En=nt.resolveURL(m),dn=Jr.deferred,un=y,ga(),I||Ss()},Ss=function(){if(dn!==Jr.deferred||!En)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");dn=Jr.loading,ga(),En&&Zr({url:En},function(m){m?Nn(m):(dn=Jr.loaded,ga())})},_s={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return dn===Jr.loaded||_s.applyArabicShaping!=null},isLoading:function(){return dn===Jr.loading},setState:function(y){dn=y.pluginStatus,En=y.pluginURL},isParsed:function(){return _s.applyArabicShaping!=null&&_s.processBidirectionalText!=null&&_s.processStyledBidirectionalText!=null},getPluginURL:function(){return En}},Ns=function(){!_s.isLoading()&&!_s.isLoaded()&&so()==="deferred"&&Ss()},pn=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 wt,this.transition={})};pn.prototype.isSupportedScript=function(y){return ci(y,_s.isLoaded())},pn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},pn.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 za=function(y,I){this.property=y,this.value=I,this.expression=w(I===void 0?y.specification.default:I,y.specification)};za.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},za.prototype.possiblyEvaluate=function(y,I,U){return this.property.possiblyEvaluate(this,y,I,U)};var Lo=function(y){this.property=y,this.value=new za(y,void 0)};Lo.prototype.transitioned=function(y,I){return new js(this.property,this.value,I,_({},y.transition,this.transition),y.now)},Lo.prototype.untransitioned=function(){return new js(this.property,this.value,null,{},0)};var Fo=function(y){this._properties=y,this._values=Object.create(y.defaultTransitionablePropertyValues)};Fo.prototype.getValue=function(y){return G(this._values[y].value.value)},Fo.prototype.setValue=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Lo(this._values[y].property)),this._values[y].value=new za(this._values[y].property,I===null?void 0:G(I))},Fo.prototype.getTransition=function(y){return G(this._values[y].transition)},Fo.prototype.setTransition=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Lo(this._values[y].property)),this._values[y].transition=G(I)||void 0},Fo.prototype.serialize=function(){for(var y={},I=0,U=Object.keys(this._values);Ithis.end)return this.prior=null,ne;if(this.value.isDataDriven())return this.prior=null,ne;if(Jfe.zoomHistory.lastIntegerZoom?{from:U,to:J}:{from:ne,to:J}},y.prototype.interpolate=function(U){return U},y}(Er),wi=function(y){this.specification=y};wi.prototype.possiblyEvaluate=function(y,I,U,J){if(y.value!==void 0)if(y.expression.kind==="constant"){var ne=y.expression.evaluate(I,null,{},U,J);return this._calculate(ne,ne,ne,I)}else return this._calculate(y.expression.evaluate(new pn(Math.floor(I.zoom-1),I)),y.expression.evaluate(new pn(Math.floor(I.zoom),I)),y.expression.evaluate(new pn(Math.floor(I.zoom+1),I)),I)},wi.prototype._calculate=function(y,I,U,J){var ne=J.zoom;return ne>J.zoomHistory.lastIntegerZoom?{from:y,to:I}:{from:U,to:I}},wi.prototype.interpolate=function(y){return y};var Ui=function(y){this.specification=y};Ui.prototype.possiblyEvaluate=function(y,I,U,J){return!!y.expression.evaluate(I,null,{},U,J)},Ui.prototype.interpolate=function(){return!1};var Oi=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 J=this.defaultPropertyValues[I]=new za(U,void 0),ne=this.defaultTransitionablePropertyValues[I]=new Lo(U);this.defaultTransitioningPropertyValues[I]=ne.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=J.possiblyEvaluate({})}};Z("DataDrivenProperty",Er),Z("DataConstantProperty",At),Z("CrossFadedDataDrivenProperty",Wr),Z("CrossFadedProperty",wi),Z("ColorRampProperty",Ui);var Bi="-transition",cn=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 fu(U.layout)),U.paint)){this._transitionablePaint=new Fo(U.paint);for(var J in I.paint)this.setPaintProperty(J,I.paint[J],{validate:!1});for(var ne in I.layout)this.setLayoutProperty(ne,I.layout[ne],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new xc(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,J,ne){if(ne===void 0&&(ne={}),J!=null){var fe="layers."+this.id+".layout."+U;if(this._validate(Vl,fe,U,J,ne))return}if(U==="visibility"){this.visibility=J;return}this._unevaluatedLayout.setValue(U,J)},y.prototype.getPaintProperty=function(U){return V(U,Bi)?this._transitionablePaint.getTransition(U.slice(0,-Bi.length)):this._transitionablePaint.getValue(U)},y.prototype.setPaintProperty=function(U,J,ne){if(ne===void 0&&(ne={}),J!=null){var fe="layers."+this.id+".paint."+U;if(this._validate(_l,fe,U,J,ne))return!1}if(V(U,Bi))return this._transitionablePaint.setTransition(U.slice(0,-Bi.length),J||void 0),!1;var Fe=this._transitionablePaint._values[U],Qe=Fe.property.specification["property-type"]==="cross-faded-data-driven",st=Fe.value.isDataDriven(),mt=Fe.value;this._transitionablePaint.setValue(U,J),this._handleSpecialPaintPropertyUpdate(U);var Xt=this._transitionablePaint._values[U].value,ur=Xt.isDataDriven();return ur||st||Qe||this._handleOverridablePaintPropertyUpdate(U,mt,Xt)},y.prototype._handleSpecialPaintPropertyUpdate=function(U){},y.prototype._handleOverridablePaintPropertyUpdate=function(U,J,ne){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,J){U.getCrossfadeParameters&&(this._crossfadeParameters=U.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(U,void 0,J)),this.paint=this._transitioningPaint.possiblyEvaluate(U,void 0,J)},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),X(U,function(J,ne){return J!==void 0&&!(ne==="layout"&&!Object.keys(J).length)&&!(ne==="paint"&&!Object.keys(J).length)})},y.prototype._validate=function(U,J,ne,fe,Fe){return Fe===void 0&&(Fe={}),Fe&&Fe.validate===!1?!1:Xu(this,U.call(yo,{key:J,layerType:this.type,objectKey:ne,value:fe,styleSpec:on,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 J=this.paint.get(U);if(!(!(J instanceof dl)||!Gs(J.property.specification))&&(J.value.kind==="source"||J.value.kind==="composite")&&J.value.isStateDependent)return!0}return!1},y}(Sn),On={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Bn=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},yn=128,to=5,Dn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Dn.serialize=function(y,I){return y._trim(),I&&(y.isTransferred=!0,I.push(y.arrayBuffer)),{length:y.length,arrayBuffer:y.arrayBuffer}},Dn.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},Dn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Dn.prototype.clear=function(){this.length=0},Dn.prototype.resize=function(y){this.reserve(y),this.length=y},Dn.prototype.reserve=function(y){if(y>this.capacity){this.capacity=Math.max(y,Math.floor(this.capacity*to),yn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},Dn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Rn(m,y){y===void 0&&(y=1);var I=0,U=0,J=m.map(function(fe){var Fe=fn(fe.type),Qe=I=Ai(I,Math.max(y,Fe)),st=fe.components||1;return U=Math.max(U,Fe),I+=Fe*st,{name:fe.name,type:fe.type,components:st,offset:Qe}}),ne=Ai(I,Math.max(U,y));return{members:J,size:ne,alignment:y}}function fn(m){return On[m].BYTES_PER_ELEMENT}function Ai(m,y){return Math.ceil(m/y)*y}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,J){var ne=this.length;return this.resize(ne+1),this.emplace(ne,U,J)},y.prototype.emplace=function(U,J,ne){var fe=U*2;return this.int16[fe+0]=J,this.int16[fe+1]=ne,U},y}(Dn);ji.prototype.bytesPerElement=4,Z("StructArrayLayout2i4",ji);var Ln=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,J,ne,fe){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,U,J,ne,fe)},y.prototype.emplace=function(U,J,ne,fe,Fe){var Qe=U*4;return this.int16[Qe+0]=J,this.int16[Qe+1]=ne,this.int16[Qe+2]=fe,this.int16[Qe+3]=Fe,U},y}(Dn);Ln.prototype.bytesPerElement=8,Z("StructArrayLayout4i8",Ln);var Un=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,J,ne,fe,Fe,Qe){var st=this.length;return this.resize(st+1),this.emplace(st,U,J,ne,fe,Fe,Qe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st){var mt=U*6;return this.int16[mt+0]=J,this.int16[mt+1]=ne,this.int16[mt+2]=fe,this.int16[mt+3]=Fe,this.int16[mt+4]=Qe,this.int16[mt+5]=st,U},y}(Dn);Un.prototype.bytesPerElement=12,Z("StructArrayLayout2i4i12",Un);var gn=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,J,ne,fe,Fe,Qe){var st=this.length;return this.resize(st+1),this.emplace(st,U,J,ne,fe,Fe,Qe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st){var mt=U*4,Xt=U*8;return this.int16[mt+0]=J,this.int16[mt+1]=ne,this.uint8[Xt+4]=fe,this.uint8[Xt+5]=Fe,this.uint8[Xt+6]=Qe,this.uint8[Xt+7]=st,U},y}(Dn);gn.prototype.bytesPerElement=8,Z("StructArrayLayout2i4ub8",gn);var ca=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,J){var ne=this.length;return this.resize(ne+1),this.emplace(ne,U,J)},y.prototype.emplace=function(U,J,ne){var fe=U*2;return this.float32[fe+0]=J,this.float32[fe+1]=ne,U},y}(Dn);ca.prototype.bytesPerElement=8,Z("StructArrayLayout2f8",ca);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.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur){var nr=this.length;return this.resize(nr+1),this.emplace(nr,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr){var Lr=U*10;return this.uint16[Lr+0]=J,this.uint16[Lr+1]=ne,this.uint16[Lr+2]=fe,this.uint16[Lr+3]=Fe,this.uint16[Lr+4]=Qe,this.uint16[Lr+5]=st,this.uint16[Lr+6]=mt,this.uint16[Lr+7]=Xt,this.uint16[Lr+8]=ur,this.uint16[Lr+9]=nr,U},y}(Dn);Kn.prototype.bytesPerElement=20,Z("StructArrayLayout10ui20",Kn);var Za=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,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr){var Yr=this.length;return this.resize(Yr+1),this.emplace(Yr,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr){var _i=U*12;return this.int16[_i+0]=J,this.int16[_i+1]=ne,this.int16[_i+2]=fe,this.int16[_i+3]=Fe,this.uint16[_i+4]=Qe,this.uint16[_i+5]=st,this.uint16[_i+6]=mt,this.uint16[_i+7]=Xt,this.int16[_i+8]=ur,this.int16[_i+9]=nr,this.int16[_i+10]=Lr,this.int16[_i+11]=Yr,U},y}(Dn);Za.prototype.bytesPerElement=24,Z("StructArrayLayout4i4ui4i24",Za);var wn=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,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*3;return this.float32[Fe+0]=J,this.float32[Fe+1]=ne,this.float32[Fe+2]=fe,U},y}(Dn);wn.prototype.bytesPerElement=12,Z("StructArrayLayout3f12",wn);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.uint32=new Uint32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U){var J=this.length;return this.resize(J+1),this.emplace(J,U)},y.prototype.emplace=function(U,J){var ne=U*1;return this.uint32[ne+0]=J,U},y}(Dn);vn.prototype.bytesPerElement=4,Z("StructArrayLayout1ul4",vn);var Aa=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,J,ne,fe,Fe,Qe,st,mt,Xt){var ur=this.length;return this.resize(ur+1),this.emplace(ur,U,J,ne,fe,Fe,Qe,st,mt,Xt)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur){var nr=U*10,Lr=U*5;return this.int16[nr+0]=J,this.int16[nr+1]=ne,this.int16[nr+2]=fe,this.int16[nr+3]=Fe,this.int16[nr+4]=Qe,this.int16[nr+5]=st,this.uint32[Lr+3]=mt,this.uint16[nr+8]=Xt,this.uint16[nr+9]=ur,U},y}(Dn);Aa.prototype.bytesPerElement=20,Z("StructArrayLayout6i1ul2ui20",Aa);var aa=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,J,ne,fe,Fe,Qe){var st=this.length;return this.resize(st+1),this.emplace(st,U,J,ne,fe,Fe,Qe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st){var mt=U*6;return this.int16[mt+0]=J,this.int16[mt+1]=ne,this.int16[mt+2]=fe,this.int16[mt+3]=Fe,this.int16[mt+4]=Qe,this.int16[mt+5]=st,U},y}(Dn);aa.prototype.bytesPerElement=12,Z("StructArrayLayout2i2i2i12",aa);var Xn=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,J,ne,fe,Fe){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,U,J,ne,fe,Fe)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe){var st=U*4,mt=U*8;return this.float32[st+0]=J,this.float32[st+1]=ne,this.float32[st+2]=fe,this.int16[mt+6]=Fe,this.int16[mt+7]=Qe,U},y}(Dn);Xn.prototype.bytesPerElement=16,Z("StructArrayLayout2f1f2i16",Xn);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.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,J,ne,fe){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,U,J,ne,fe)},y.prototype.emplace=function(U,J,ne,fe,Fe){var Qe=U*12,st=U*3;return this.uint8[Qe+0]=J,this.uint8[Qe+1]=ne,this.float32[st+1]=fe,this.float32[st+2]=Fe,U},y}(Dn);Vn.prototype.bytesPerElement=12,Z("StructArrayLayout2ub2f12",Vn);var ma=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,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*3;return this.uint16[Fe+0]=J,this.uint16[Fe+1]=ne,this.uint16[Fe+2]=fe,U},y}(Dn);ma.prototype.bytesPerElement=6,Z("StructArrayLayout3ui6",ma);var ro=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,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei){var Vi=this.length;return this.resize(Vi+1),this.emplace(Vi,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi){var en=U*24,An=U*12,ra=U*48;return this.int16[en+0]=J,this.int16[en+1]=ne,this.uint16[en+2]=fe,this.uint16[en+3]=Fe,this.uint32[An+2]=Qe,this.uint32[An+3]=st,this.uint32[An+4]=mt,this.uint16[en+10]=Xt,this.uint16[en+11]=ur,this.uint16[en+12]=nr,this.float32[An+7]=Lr,this.float32[An+8]=Yr,this.uint8[ra+36]=_i,this.uint8[ra+37]=si,this.uint8[ra+38]=Hi,this.uint32[An+10]=Ei,this.int16[en+22]=Vi,U},y}(Dn);ro.prototype.bytesPerElement=48,Z("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ro);var 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._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,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi,en,An,ra,$n,Ba,_a,Pa,qo,Na,ja){var us=this.length;return this.resize(us+1),this.emplace(us,U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi,en,An,ra,$n,Ba,_a,Pa,qo,Na,ja)},y.prototype.emplace=function(U,J,ne,fe,Fe,Qe,st,mt,Xt,ur,nr,Lr,Yr,_i,si,Hi,Ei,Vi,en,An,ra,$n,Ba,_a,Pa,qo,Na,ja,us){var zo=U*34,rl=U*17;return this.int16[zo+0]=J,this.int16[zo+1]=ne,this.int16[zo+2]=fe,this.int16[zo+3]=Fe,this.int16[zo+4]=Qe,this.int16[zo+5]=st,this.int16[zo+6]=mt,this.int16[zo+7]=Xt,this.uint16[zo+8]=ur,this.uint16[zo+9]=nr,this.uint16[zo+10]=Lr,this.uint16[zo+11]=Yr,this.uint16[zo+12]=_i,this.uint16[zo+13]=si,this.uint16[zo+14]=Hi,this.uint16[zo+15]=Ei,this.uint16[zo+16]=Vi,this.uint16[zo+17]=en,this.uint16[zo+18]=An,this.uint16[zo+19]=ra,this.uint16[zo+20]=$n,this.uint16[zo+21]=Ba,this.uint16[zo+22]=_a,this.uint32[rl+12]=Pa,this.float32[rl+13]=qo,this.float32[rl+14]=Na,this.float32[rl+15]=ja,this.float32[rl+16]=us,U},y}(Dn);Ao.prototype.bytesPerElement=68,Z("StructArrayLayout8i15ui1ul4f68",Ao);var Jn=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 J=this.length;return this.resize(J+1),this.emplace(J,U)},y.prototype.emplace=function(U,J){var ne=U*1;return this.float32[ne+0]=J,U},y}(Dn);Jn.prototype.bytesPerElement=4,Z("StructArrayLayout1f4",Jn);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.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(U,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*3;return this.int16[Fe+0]=J,this.int16[Fe+1]=ne,this.int16[Fe+2]=fe,U},y}(Dn);Oa.prototype.bytesPerElement=6,Z("StructArrayLayout3i6",Oa);var _o=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,J,ne){var fe=this.length;return this.resize(fe+1),this.emplace(fe,U,J,ne)},y.prototype.emplace=function(U,J,ne,fe){var Fe=U*2,Qe=U*4;return this.uint32[Fe+0]=J,this.uint16[Qe+2]=ne,this.uint16[Qe+3]=fe,U},y}(Dn);_o.prototype.bytesPerElement=8,Z("StructArrayLayout1ul2ui8",_o);var Po=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,J){var ne=this.length;return this.resize(ne+1),this.emplace(ne,U,J)},y.prototype.emplace=function(U,J,ne){var fe=U*2;return this.uint16[fe+0]=J,this.uint16[fe+1]=ne,U},y}(Dn);Po.prototype.bytesPerElement=4,Z("StructArrayLayout2ui4",Po);var Jo=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 J=this.length;return this.resize(J+1),this.emplace(J,U)},y.prototype.emplace=function(U,J){var ne=U*1;return this.uint16[ne+0]=J,U},y}(Dn);Jo.prototype.bytesPerElement=2,Z("StructArrayLayout1ui2",Jo);var Xl=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,J,ne,fe){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,U,J,ne,fe)},y.prototype.emplace=function(U,J,ne,fe,Fe){var Qe=U*4;return this.float32[Qe+0]=J,this.float32[Qe+1]=ne,this.float32[Qe+2]=fe,this.float32[Qe+3]=Fe,U},y}(Dn);Xl.prototype.bytesPerElement=16,Z("StructArrayLayout4f16",Xl);var $c=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}(Bn);$c.prototype.size=20;var xs=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 $c(this,U)},y}(Aa);Z("CollisionBoxArray",xs);var Qc=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}(Bn);Qc.prototype.size=48;var El=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 Qc(this,U)},y}(ro);Z("PlacedSymbolArray",El);var bc=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}(Bn);bc.prototype.size=68;var wc=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 bc(this,U)},y}(Ao);Z("SymbolInstanceArray",wc);var yf=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}(Jn);Z("GlyphOffsetArray",yf);var Hl=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}(Oa);Z("SymbolLineVertexArray",Hl);var Fc=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}(Bn);Fc.prototype.size=8;var ef=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 Fc(this,U)},y}(_o);Z("FeatureIndexArray",ef);var ls=Rn([{name:"a_pos",components:2,type:"Int16"}],4),_f=ls.members,ns=function(y){y===void 0&&(y=[]),this.segments=y};ns.prototype.prepareSegment=function(y,I,U,J){var ne=this.segments[this.segments.length-1];return y>ns.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+ns.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+y),(!ne||ne.vertexLength+y>ns.MAX_VERTEX_ARRAY_LENGTH||ne.sortKey!==J)&&(ne={vertexOffset:I.length,primitiveOffset:U.length,vertexLength:0,primitiveLength:0},J!==void 0&&(ne.sortKey=J),this.segments.push(ne)),ne},ns.prototype.get=function(){return this.segments},ns.prototype.destroy=function(){for(var y=0,I=this.segments;y>>16)*Qe&65535)<<16)&4294967295,mt=mt<<15|mt>>>17,mt=(mt&65535)*st+(((mt>>>16)*st&65535)<<16)&4294967295,fe^=mt,fe=fe<<13|fe>>>19,Fe=(fe&65535)*5+(((fe>>>16)*5&65535)<<16)&4294967295,fe=(Fe&65535)+27492+(((Fe>>>16)+58964&65535)<<16);switch(mt=0,J){case 3:mt^=(I.charCodeAt(Xt+2)&255)<<16;case 2:mt^=(I.charCodeAt(Xt+1)&255)<<8;case 1:mt^=I.charCodeAt(Xt)&255,mt=(mt&65535)*Qe+(((mt>>>16)*Qe&65535)<<16)&4294967295,mt=mt<<15|mt>>>17,mt=(mt&65535)*st+(((mt>>>16)*st&65535)<<16)&4294967295,fe^=mt}return fe^=I.length,fe^=fe>>>16,fe=(fe&65535)*2246822507+(((fe>>>16)*2246822507&65535)<<16)&4294967295,fe^=fe>>>13,fe=(fe&65535)*3266489909+(((fe>>>16)*3266489909&65535)<<16)&4294967295,fe^=fe>>>16,fe>>>0}m.exports=y}),O=a(function(m){function y(I,U){for(var J=I.length,ne=U^J,fe=0,Fe;J>=4;)Fe=I.charCodeAt(fe)&255|(I.charCodeAt(++fe)&255)<<8|(I.charCodeAt(++fe)&255)<<16|(I.charCodeAt(++fe)&255)<<24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),Fe^=Fe>>>24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),ne=(ne&65535)*1540483477+(((ne>>>16)*1540483477&65535)<<16)^Fe,J-=4,++fe;switch(J){case 3:ne^=(I.charCodeAt(fe+2)&255)<<16;case 2:ne^=(I.charCodeAt(fe+1)&255)<<8;case 1:ne^=I.charCodeAt(fe)&255,ne=(ne&65535)*1540483477+(((ne>>>16)*1540483477&65535)<<16)}return ne^=ne>>>13,ne=(ne&65535)*1540483477+(((ne>>>16)*1540483477&65535)<<16),ne^=ne>>>15,ne>>>0}m.exports=y}),$=K,pe=K,de=O;$.murmur3=pe,$.murmur2=de;var Ie=function(){this.ids=[],this.positions=[],this.indexed=!1};Ie.prototype.add=function(y,I,U,J){this.ids.push(pt(y)),this.positions.push(I,U,J)},Ie.prototype.getPositions=function(y){for(var I=pt(y),U=0,J=this.ids.length-1;U>1;this.ids[ne]>=I?J=ne:U=ne+1}for(var fe=[];this.ids[U]===I;){var Fe=this.positions[3*U],Qe=this.positions[3*U+1],st=this.positions[3*U+2];fe.push({index:Fe,start:Qe,end:st}),U++}return fe},Ie.serialize=function(y,I){var U=new Float64Array(y.ids),J=new Uint32Array(y.positions);return Kt(U,J,0,U.length-1),I&&I.push(U.buffer,J.buffer),{ids:U,positions:J}},Ie.deserialize=function(y){var I=new Ie;return I.ids=y.ids,I.positions=y.positions,I.indexed=!0,I};var $e=Math.pow(2,53)-1;function pt(m){var y=+m;return!isNaN(y)&&y<=$e?y:$(String(m))}function Kt(m,y,I,U){for(;I>1],ne=I-1,fe=U+1;;){do ne++;while(m[ne]J);if(ne>=fe)break;ir(m,ne,fe),ir(y,3*ne,3*fe),ir(y,3*ne+1,3*fe+1),ir(y,3*ne+2,3*fe+2)}fe-Ife.x+1||Qefe.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function No(m,y){return{type:m.type,id:m.id,properties:m.properties,geometry:y?da(m):[]}}function Ro(m,y,I,U,J){m.emplaceBack(y*2+(U+1)/2,I*2+(J+1)/2)}var ps=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 ji,this.indexArray=new ma,this.segments=new ns,this.programConfigurations=new Di(y.layers,y.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ps.prototype.populate=function(y,I,U){var J=this.layers[0],ne=[],fe=null;J.type==="circle"&&(fe=J.layout.get("circle-sort-key"));for(var Fe=0,Qe=y;Fe=rn||ur<0||ur>=rn)){var nr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,y.sortKey),Lr=nr.vertexLength;Ro(this.layoutVertexArray,Xt,ur,-1,-1),Ro(this.layoutVertexArray,Xt,ur,1,-1),Ro(this.layoutVertexArray,Xt,ur,1,1),Ro(this.layoutVertexArray,Xt,ur,-1,1),this.indexArray.emplaceBack(Lr,Lr+1,Lr+2),this.indexArray.emplaceBack(Lr,Lr+3,Lr+2),nr.vertexLength+=4,nr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,U,{},J)},Z("CircleBucket",ps,{omit:["layers"]});function fo(m,y){for(var I=0;I=3){for(var ne=0;ne1){if(Ev(m,y))return!0;for(var U=0;U1?m.distSqr(I):m.distSqr(I.sub(y)._mult(J)._add(y))}function vp(m,y){for(var I=!1,U,J,ne,fe=0;fey.y!=ne.y>y.y&&y.x<(ne.x-J.x)*(y.y-J.y)/(ne.y-J.y)+J.x&&(I=!I)}return I}function _d(m,y){for(var I=!1,U=0,J=m.length-1;Uy.y!=fe.y>y.y&&y.x<(fe.x-ne.x)*(y.y-ne.y)/(fe.y-ne.y)+ne.x&&(I=!I)}return I}function pp(m,y,I,U,J){for(var ne=0,fe=m;ne=Fe.x&&J>=Fe.y)return!0}var Qe=[new u(y,I),new u(y,J),new u(U,J),new u(U,I)];if(m.length>2)for(var st=0,mt=Qe;stJ.x&&y.x>J.x||m.yJ.y&&y.y>J.y)return!1;var ne=ae(m,y,I[0]);return ne!==ae(m,y,I[1])||ne!==ae(m,y,I[2])||ne!==ae(m,y,I[3])}function xd(m,y,I){var U=y.paint.get(m).value;return U.kind==="constant"?U.value:I.programConfigurations.get(y.id).getMaxValue(m)}function kv(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Kv(m,y,I,U,J){if(!y[0]&&!y[1])return m;var ne=u.convert(y)._mult(J);I==="viewport"&&ne._rotate(-U);for(var fe=[],Fe=0;Fe0&&(ne=1/Math.sqrt(ne)),m[0]=y[0]*ne,m[1]=y[1]*ne,m[2]=y[2]*ne,m}function L9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]}function P9(m,y,I){var U=y[0],J=y[1],ne=y[2],fe=I[0],Fe=I[1],Qe=I[2];return m[0]=J*Qe-ne*Fe,m[1]=ne*fe-U*Qe,m[2]=U*Fe-J*fe,m}function I9(m,y,I){var U=y[0],J=y[1],ne=y[2];return m[0]=U*I[0]+J*I[3]+ne*I[6],m[1]=U*I[1]+J*I[4]+ne*I[7],m[2]=U*I[2]+J*I[5]+ne*I[8],m}var D9=om,pQ=function(){var m=am();return function(y,I,U,J,ne,fe){var Fe,Qe;for(I||(I=3),U||(U=0),J?Qe=Math.min(J*I+U,y.length):Qe=y.length,Fe=U;Fem.width||J.height>m.height||I.x>m.width-J.width||I.y>m.height-J.height)throw new RangeError("out of range source coordinates for image copy");if(J.width>y.width||J.height>y.height||U.x>y.width-J.width||U.y>y.height-J.height)throw new RangeError("out of range destination coordinates for image copy");for(var fe=m.data,Fe=y.data,Qe=0;Qe80*I){Fe=st=m[0],Qe=mt=m[1];for(var Lr=I;Lrst&&(st=Xt),ur>mt&&(mt=ur);nr=Math.max(st-Fe,mt-Qe),nr=nr!==0?1/nr:0}return Gx(ne,fe,I,Fe,Qe,nr),fe}function Iw(m,y,I,U,J){var ne,fe;if(J===cS(m,y,I,U)>0)for(ne=y;ne=y;ne-=U)fe=yC(ne,m[ne],m[ne+1],fe);return fe&&Wx(fe,fe.next)&&(Yx(fe),fe=fe.next),fe}function sm(m,y){if(!m)return m;y||(y=m);var I=m,U;do if(U=!1,!I.steiner&&(Wx(I,I.next)||tf(I.prev,I,I.next)===0)){if(Yx(I),I=y=I.prev,I===I.next)break;U=!0}else I=I.next;while(U||I!==y);return y}function Gx(m,y,I,U,J,ne,fe){if(m){!fe&&ne&&Dw(m,U,J,ne);for(var Fe=m,Qe,st;m.prev!==m.next;){if(Qe=m.prev,st=m.next,ne?pC(m,U,J,ne):vC(m)){y.push(Qe.i/I),y.push(m.i/I),y.push(st.i/I),Yx(m),m=st.next,Fe=st.next;continue}if(m=st,m===Fe){fe?fe===1?(m=jx(sm(m),y,I),Gx(m,y,I,U,J,ne,2)):fe===2&&v0(m,y,I,U,J,ne):Gx(sm(m),y,I,U,J,ne,1);break}}}}function vC(m){var y=m.prev,I=m,U=m.next;if(tf(y,I,U)>=0)return!1;for(var J=m.next.next;J!==m.prev;){if(um(y.x,y.y,I.x,I.y,U.x,U.y,J.x,J.y)&&tf(J.prev,J,J.next)>=0)return!1;J=J.next}return!0}function pC(m,y,I,U){var J=m.prev,ne=m,fe=m.next;if(tf(J,ne,fe)>=0)return!1;for(var Fe=J.xne.x?J.x>fe.x?J.x:fe.x:ne.x>fe.x?ne.x:fe.x,mt=J.y>ne.y?J.y>fe.y?J.y:fe.y:ne.y>fe.y?ne.y:fe.y,Xt=oS(Fe,Qe,y,I,U),ur=oS(st,mt,y,I,U),nr=m.prevZ,Lr=m.nextZ;nr&&nr.z>=Xt&&Lr&&Lr.z<=ur;){if(nr!==m.prev&&nr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,nr.x,nr.y)&&tf(nr.prev,nr,nr.next)>=0||(nr=nr.prevZ,Lr!==m.prev&&Lr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,Lr.x,Lr.y)&&tf(Lr.prev,Lr,Lr.next)>=0))return!1;Lr=Lr.nextZ}for(;nr&&nr.z>=Xt;){if(nr!==m.prev&&nr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,nr.x,nr.y)&&tf(nr.prev,nr,nr.next)>=0)return!1;nr=nr.prevZ}for(;Lr&&Lr.z<=ur;){if(Lr!==m.prev&&Lr!==m.next&&um(J.x,J.y,ne.x,ne.y,fe.x,fe.y,Lr.x,Lr.y)&&tf(Lr.prev,Lr,Lr.next)>=0)return!1;Lr=Lr.nextZ}return!0}function jx(m,y,I){var U=m;do{var J=U.prev,ne=U.next.next;!Wx(J,ne)&&Rw(J,U,U.next,ne)&&Xx(J,ne)&&Xx(ne,J)&&(y.push(J.i/I),y.push(U.i/I),y.push(ne.i/I),Yx(U),Yx(U.next),U=m=ne),U=U.next}while(U!==m);return sm(U)}function v0(m,y,I,U,J,ne){var fe=m;do{for(var Fe=fe.next.next;Fe!==fe.prev;){if(fe.i!==Fe.i&&E1(fe,Fe)){var Qe=lS(fe,Fe);fe=sm(fe,fe.next),Qe=sm(Qe,Qe.next),Gx(fe,y,I,U,J,ne),Gx(Qe,y,I,U,J,ne);return}Fe=Fe.next}fe=fe.next}while(fe!==m)}function lm(m,y,I,U){var J=[],ne,fe,Fe,Qe,st;for(ne=0,fe=y.length;ne=I.next.y&&I.next.y!==I.y){var Fe=I.x+(J-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Fe<=U&&Fe>ne){if(ne=Fe,Fe===U){if(J===I.y)return I;if(J===I.next.y)return I.next}fe=I.x=I.x&&I.x>=st&&U!==I.x&&um(Jfe.x||I.x===fe.x&&V9(fe,I)))&&(fe=I,Xt=ur)),I=I.next;while(I!==Qe);return fe}function V9(m,y){return tf(m.prev,m,y.prev)<0&&tf(y.next,m,m.next)<0}function Dw(m,y,I,U){var J=m;do J.z===null&&(J.z=oS(J.x,J.y,y,I,U)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next;while(J!==m);J.prevZ.nextZ=null,J.prevZ=null,aS(J)}function aS(m){var y,I,U,J,ne,fe,Fe,Qe,st=1;do{for(I=m,m=null,ne=null,fe=0;I;){for(fe++,U=I,Fe=0,y=0;y0||Qe>0&&U;)Fe!==0&&(Qe===0||!U||I.z<=U.z)?(J=I,I=I.nextZ,Fe--):(J=U,U=U.nextZ,Qe--),ne?ne.nextZ=J:m=J,J.prevZ=ne,ne=J;I=U}ne.nextZ=null,st*=2}while(fe>1);return m}function oS(m,y,I,U,J){return m=32767*(m-I)*J,y=32767*(y-U)*J,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 sS(m){var y=m,I=m;do(y.x=0&&(m-fe)*(U-Fe)-(I-fe)*(y-Fe)>=0&&(I-fe)*(ne-Fe)-(J-fe)*(U-Fe)>=0}function E1(m,y){return m.next.i!==y.i&&m.prev.i!==y.i&&!mC(m,y)&&(Xx(m,y)&&Xx(y,m)&&H9(m,y)&&(tf(m.prev,m,y.prev)||tf(m,y.prev,y))||Wx(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 Wx(m,y){return m.x===y.x&&m.y===y.y}function Rw(m,y,I,U){var J=uy(tf(m,y,I)),ne=uy(tf(m,y,U)),fe=uy(tf(I,U,m)),Fe=uy(tf(I,U,y));return!!(J!==ne&&fe!==Fe||J===0&&Zx(m,I,y)||ne===0&&Zx(m,U,y)||fe===0&&Zx(I,m,U)||Fe===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 uy(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&&Rw(I,I.next,m,y))return!0;I=I.next}while(I!==m);return!1}function Xx(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 H9(m,y){var I=m,U=!1,J=(m.x+y.x)/2,ne=(m.y+y.y)/2;do I.y>ne!=I.next.y>ne&&I.next.y!==I.y&&J<(I.next.x-I.x)*(ne-I.y)/(I.next.y-I.y)+I.x&&(U=!U),I=I.next;while(I!==m);return U}function lS(m,y){var I=new uS(m.i,m.x,m.y),U=new uS(y.i,y.x,y.y),J=m.next,ne=y.prev;return m.next=y,y.prev=m,I.next=J,J.prev=I,U.next=I,I.prev=U,ne.next=U,U.prev=ne,U}function yC(m,y,I,U){var J=new uS(m,y,I);return U?(J.next=U.next,J.prev=U,U.next.prev=J,U.next=J):(J.prev=J,J.next=J),J}function Yx(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 uS(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}M1.deviation=function(m,y,I,U){var J=y&&y.length,ne=J?y[0]*I:m.length,fe=Math.abs(cS(m,0,ne,I));if(J)for(var Fe=0,Qe=y.length;Fe0&&(U+=m[J-1].length,I.holes.push(U))}return I},Pw.default=dC;function fS(m,y,I,U,J){dg(m,y,I||0,U||m.length-1,J||_C)}function dg(m,y,I,U,J){for(;U>I;){if(U-I>600){var ne=U-I+1,fe=y-I+1,Fe=Math.log(ne),Qe=.5*Math.exp(2*Fe/3),st=.5*Math.sqrt(Fe*Qe*(ne-Qe)/ne)*(fe-ne/2<0?-1:1),mt=Math.max(I,Math.floor(y-fe*Qe/ne+st)),Xt=Math.min(U,Math.floor(y+(ne-fe)*Qe/ne+st));dg(m,y,mt,Xt,J)}var ur=m[y],nr=I,Lr=U;for(k1(m,I,y),J(m[U],ur)>0&&k1(m,I,U);nr0;)Lr--}J(m[I],ur)===0?k1(m,I,Lr):(Lr++,k1(m,Lr,U)),Lr<=y&&(I=Lr+1),y<=Lr&&(U=Lr-1)}}function k1(m,y,I){var U=m[y];m[y]=m[I],m[I]=U}function _C(m,y){return my?1:0}function zw(m,y){var I=m.length;if(I<=1)return[m];for(var U=[],J,ne,fe=0;fe1)for(var Qe=0;Qe>3}if(U--,I===1||I===2)J+=m.readSVarint(),ne+=m.readSVarint(),I===1&&(Fe&&fe.push(Fe),Fe=[]),Fe.push(new u(J,ne));else if(I===7)Fe&&Fe.push(Fe[0].clone());else throw new Error("unknown command "+I)}return Fe&&fe.push(Fe),fe},cy.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,U=0,J=0,ne=0,fe=1/0,Fe=-1/0,Qe=1/0,st=-1/0;m.pos>3}if(U--,I===1||I===2)J+=m.readSVarint(),ne+=m.readSVarint(),JFe&&(Fe=J),nest&&(st=ne);else if(I!==7)throw new Error("unknown command "+I)}return[fe,Qe,Fe,st]},cy.prototype.toGeoJSON=function(m,y,I){var U=this.extent*Math.pow(2,I),J=this.extent*m,ne=this.extent*y,fe=this.loadGeometry(),Fe=cy.types[this.type],Qe,st;function mt(nr){for(var Lr=0;Lr>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}vS.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 dS(this._pbf,y,this.extent,this._keys,this._values)};var CC=j9;function j9(m,y){this.layers=m.readFields(W9,{},y)}function W9(m,y,I){if(m===3){var U=new vg(I,I.readVarint()+I.pos);U.length&&(y[U.name]=U)}}var LC=CC,C1=dS,PC=vg,pg={VectorTile:LC,VectorTileFeature:C1,VectorTileLayer:PC},IC=pg.VectorTileFeature.types,qw=500,L1=Math.pow(2,13);function cm(m,y,I,U,J,ne,fe,Fe){m.emplaceBack(y,I,Math.floor(U*L1)*2+fe,J*L1*2,ne*L1*2,Math.round(Fe))}var Hp=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 Un,this.indexArray=new ma,this.programConfigurations=new Di(y.layers,y.zoom),this.segments=new ns,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Hp.prototype.populate=function(y,I,U){this.features=[],this.hasPattern=Fw("fill-extrusion",this.layers,I);for(var J=0,ne=y;J=1){var Vi=_i[Hi-1];if(!Z9(Ei,Vi)){nr.vertexLength+4>ns.MAX_VERTEX_ARRAY_LENGTH&&(nr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var en=Ei.sub(Vi)._perp()._unit(),An=Vi.dist(Ei);si+An>32768&&(si=0),cm(this.layoutVertexArray,Ei.x,Ei.y,en.x,en.y,0,0,si),cm(this.layoutVertexArray,Ei.x,Ei.y,en.x,en.y,0,1,si),si+=An,cm(this.layoutVertexArray,Vi.x,Vi.y,en.x,en.y,0,0,si),cm(this.layoutVertexArray,Vi.x,Vi.y,en.x,en.y,0,1,si);var ra=nr.vertexLength;this.indexArray.emplaceBack(ra,ra+2,ra+1),this.indexArray.emplaceBack(ra+1,ra+2,ra+3),nr.vertexLength+=4,nr.primitiveLength+=2}}}}if(nr.vertexLength+st>ns.MAX_VERTEX_ARRAY_LENGTH&&(nr=this.segments.prepareSegment(st,this.layoutVertexArray,this.indexArray)),IC[y.type]==="Polygon"){for(var $n=[],Ba=[],_a=nr.vertexLength,Pa=0,qo=Qe;Parn)||m.y===y.y&&(m.y<0||m.y>rn)}function X9(m){return m.every(function(y){return y.x<0})||m.every(function(y){return y.x>rn})||m.every(function(y){return y.y<0})||m.every(function(y){return y.y>rn})}var P1=new Oi({"fill-extrusion-opacity":new At(on["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Er(on["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new At(on["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new At(on["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Wr(on["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Er(on["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Er(on["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new At(on["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ed={paint:P1},fm=function(m){function y(I){m.call(this,I,ed)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(U){return new Hp(U)},y.prototype.queryRadius=function(){return kv(this.paint.get("fill-extrusion-translate"))},y.prototype.is3D=function(){return!0},y.prototype.queryIntersectsFeature=function(U,J,ne,fe,Fe,Qe,st,mt){var Xt=Kv(U,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qe.angle,st),ur=this.paint.get("fill-extrusion-height").evaluate(J,ne),nr=this.paint.get("fill-extrusion-base").evaluate(J,ne),Lr=Y9(Xt,mt,Qe,0),Yr=gS(fe,nr,ur,mt),_i=Yr[0],si=Yr[1];return DC(_i,si,Lr)},y}(cn);function fy(m,y){return m.x*y.x+m.y*y.y}function pS(m,y){if(m.length===1){for(var I=0,U=y[I++],J;!J||U.equals(J);)if(J=y[I++],!J)return 1/0;for(;I=2&&y[st-1].equals(y[st-2]);)st--;for(var mt=0;mt0;if($n&&Hi>mt){var _a=nr.dist(Lr);if(_a>2*Xt){var Pa=nr.sub(nr.sub(Lr)._mult(Xt/_a)._round());this.updateDistance(Lr,Pa),this.addCurrentVertex(Pa,_i,0,0,ur),Lr=Pa}}var qo=Lr&&Yr,Na=qo?U:Qe?"butt":J;if(qo&&Na==="round"&&(Anne&&(Na="bevel"),Na==="bevel"&&(An>2&&(Na="flipbevel"),An100)Ei=si.mult(-1);else{var ja=An*_i.add(si).mag()/_i.sub(si).mag();Ei._perp()._mult(ja*(Ba?-1:1))}this.addCurrentVertex(nr,Ei,0,0,ur),this.addCurrentVertex(nr,Ei.mult(-1),0,0,ur)}else if(Na==="bevel"||Na==="fakeround"){var us=-Math.sqrt(An*An-1),zo=Ba?us:0,rl=Ba?0:us;if(Lr&&this.addCurrentVertex(nr,_i,zo,rl,ur),Na==="fakeround")for(var ou=Math.round(ra*180/Math.PI/yS),il=1;il2*Xt){var Zf=nr.add(Yr.sub(nr)._mult(Xt/qh)._round());this.updateDistance(nr,Zf),this.addCurrentVertex(Zf,si,0,0,ur),nr=Zf}}}}},Gf.prototype.addCurrentVertex=function(y,I,U,J,ne,fe){fe===void 0&&(fe=!1);var Fe=I.x+I.y*U,Qe=I.y-I.x*U,st=-I.x+I.y*J,mt=-I.y-I.x*J;this.addHalfVertex(y,Fe,Qe,fe,!1,U,ne),this.addHalfVertex(y,st,mt,fe,!0,-J,ne),this.distance>eb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(y,I,U,J,ne,fe))},Gf.prototype.addHalfVertex=function(y,I,U,J,ne,fe,Fe){var Qe=y.x,st=y.y,mt=this.lineClips?this.scaledDistance*(eb-1):this.scaledDistance,Xt=mt*Bw;if(this.layoutVertexArray.emplaceBack((Qe<<1)+(J?1:0),(st<<1)+(ne?1:0),Math.round(Ow*I)+128,Math.round(Ow*U)+128,(fe===0?0:fe<0?-1:1)+1|(Xt&63)<<2,Xt>>6),this.lineClips){var ur=this.scaledDistance-this.lineClips.start,nr=this.lineClips.end-this.lineClips.start,Lr=ur/nr;this.layoutVertexArray2.emplaceBack(Lr,this.lineClipsArray.length)}var Yr=Fe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Yr),Fe.primitiveLength++),ne?this.e2=Yr:this.e1=Yr},Gf.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Gf.prototype.updateDistance=function(y,I){this.distance+=y.dist(I),this.updateScaledDistance()},Z("LineBucket",Gf,{omit:["layers","patternFeatures"]});var _S=new Oi({"line-cap":new At(on.layout_line["line-cap"]),"line-join":new Er(on.layout_line["line-join"]),"line-miter-limit":new At(on.layout_line["line-miter-limit"]),"line-round-limit":new At(on.layout_line["line-round-limit"]),"line-sort-key":new Er(on.layout_line["line-sort-key"])}),xS=new Oi({"line-opacity":new Er(on.paint_line["line-opacity"]),"line-color":new Er(on.paint_line["line-color"]),"line-translate":new At(on.paint_line["line-translate"]),"line-translate-anchor":new At(on.paint_line["line-translate-anchor"]),"line-width":new Er(on.paint_line["line-width"]),"line-gap-width":new Er(on.paint_line["line-gap-width"]),"line-offset":new Er(on.paint_line["line-offset"]),"line-blur":new Er(on.paint_line["line-blur"]),"line-dasharray":new wi(on.paint_line["line-dasharray"]),"line-pattern":new Wr(on.paint_line["line-pattern"]),"line-gradient":new Ui(on.paint_line["line-gradient"])}),Nw={paint:xS,layout:_S},J9=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,J){return J=new pn(Math.floor(J.zoom),{now:J.now,fadeDuration:J.fadeDuration,zoomHistory:J.zoomHistory,transition:J.transition}),m.prototype.possiblyEvaluate.call(this,U,J)},y.prototype.evaluate=function(U,J,ne,fe){return J=_({},J,{zoom:Math.floor(J.zoom)}),m.prototype.evaluate.call(this,U,J,ne,fe)},y}(Er),D=new J9(Nw.paint.properties["line-width"].specification);D.useIntegerZoom=!0;var S=function(m){function y(I){m.call(this,I,Nw),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 J=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=J._styleExpression.expression instanceof yu,this.gradientVersion=(this.gradientVersion+1)%d}},y.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},y.prototype.recalculate=function(U,J){m.prototype.recalculate.call(this,U,J),this.paint._values["line-floorwidth"]=D.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,U)},y.prototype.createBucket=function(U){return new Gf(U)},y.prototype.queryRadius=function(U){var J=U,ne=R(xd("line-width",this,J),xd("line-gap-width",this,J)),fe=xd("line-offset",this,J);return ne/2+Math.abs(fe)+kv(this.paint.get("line-translate"))},y.prototype.queryIntersectsFeature=function(U,J,ne,fe,Fe,Qe,st){var mt=Kv(U,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qe.angle,st),Xt=st/2*R(this.paint.get("line-width").evaluate(J,ne),this.paint.get("line-gap-width").evaluate(J,ne)),ur=this.paint.get("line-offset").evaluate(J,ne);return ur&&(fe=j(fe,ur*st)),zu(mt,fe,Xt)},y.prototype.isTileClipped=function(){return!0},y}(cn);function R(m,y){return y>0?y+2*m:m}function j(m,y){for(var I=[],U=new u(0,0),J=0;J":"\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 ki(m){for(var y="",I=0;I>1,mt=-7,Xt=I?J-1:0,ur=I?-1:1,nr=m[y+Xt];for(Xt+=ur,ne=nr&(1<<-mt)-1,nr>>=-mt,mt+=Fe;mt>0;ne=ne*256+m[y+Xt],Xt+=ur,mt-=8);for(fe=ne&(1<<-mt)-1,ne>>=-mt,mt+=U;mt>0;fe=fe*256+m[y+Xt],Xt+=ur,mt-=8);if(ne===0)ne=1-st;else{if(ne===Qe)return fe?NaN:(nr?-1:1)*(1/0);fe=fe+Math.pow(2,U),ne=ne-st}return(nr?-1:1)*fe*Math.pow(2,ne-U)},Va=function(m,y,I,U,J,ne){var fe,Fe,Qe,st=ne*8-J-1,mt=(1<>1,ur=J===23?Math.pow(2,-24)-Math.pow(2,-77):0,nr=U?0:ne-1,Lr=U?1:-1,Yr=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(Fe=isNaN(y)?1:0,fe=mt):(fe=Math.floor(Math.log(y)/Math.LN2),y*(Qe=Math.pow(2,-fe))<1&&(fe--,Qe*=2),fe+Xt>=1?y+=ur/Qe:y+=ur*Math.pow(2,1-Xt),y*Qe>=2&&(fe++,Qe/=2),fe+Xt>=mt?(Fe=0,fe=mt):fe+Xt>=1?(Fe=(y*Qe-1)*Math.pow(2,J),fe=fe+Xt):(Fe=y*Math.pow(2,Xt-1)*Math.pow(2,J),fe=0));J>=8;m[I+nr]=Fe&255,nr+=Lr,Fe/=256,J-=8);for(fe=fe<0;m[I+nr]=fe&255,nr+=Lr,fe/=256,st-=8);m[I+nr-Lr]|=Yr*128},Io={read:ta,write:Va},La=Hn;function Hn(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}Hn.Varint=0,Hn.Fixed64=1,Hn.Bytes=2,Hn.Fixed32=5;var lo=65536*65536,$a=1/lo,Xa=12,Tn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");Hn.prototype={destroy:function(){this.buf=null},readFields:function(m,y,I){for(I=I||this.length;this.pos>3,ne=this.pos;this.type=U&7,m(J,y,this),this.pos===ne&&this.skip(U)}return y},readMessage:function(m,y){return this.readFields(m,y,this.readVarint()+this.pos)},readFixed32:function(){var m=Rh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Iv(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Rh(this.buf,this.pos)+Rh(this.buf,this.pos+4)*lo;return this.pos+=8,m},readSFixed64:function(){var m=Rh(this.buf,this.pos)+Iv(this.buf,this.pos+4)*lo;return this.pos+=8,m},readFloat:function(){var m=Io.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Io.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,bo(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>=Xa&&Tn?Cl(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!==Hn.Bytes)return m.push(this.readVarint(y));var I=Ya(this);for(m=m||[];this.pos127;);else if(y===Hn.Bytes)this.pos=this.readVarint()+this.pos;else if(y===Hn.Fixed32)this.pos+=4;else if(y===Hn.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){wu(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=qu(this.buf,m,this.pos);var I=this.pos-y;I>=128&&$v(y,I,this),this.pos=y-1,this.writeVarint(I),this.pos+=I},writeFloat:function(m){this.realloc(4),Io.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Io.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&&$v(I,U,this),this.pos=I-1,this.writeVarint(U),this.pos+=U},writeMessage:function(m,y,I){this.writeTag(m,Hn.Bytes),this.writeRawMessage(y,I)},writePackedVarint:function(m,y){y.length&&this.writeMessage(m,td,y)},writePackedSVarint:function(m,y){y.length&&this.writeMessage(m,ch,y)},writePackedBoolean:function(m,y){y.length&&this.writeMessage(m,Hd,y)},writePackedFloat:function(m,y){y.length&&this.writeMessage(m,Ud,y)},writePackedDouble:function(m,y){y.length&&this.writeMessage(m,Vd,y)},writePackedFixed32:function(m,y){y.length&&this.writeMessage(m,rf,y)},writePackedSFixed32:function(m,y){y.length&&this.writeMessage(m,fh,y)},writePackedFixed64:function(m,y){y.length&&this.writeMessage(m,Td,y)},writePackedSFixed64:function(m,y){y.length&&this.writeMessage(m,rd,y)},writeBytesField:function(m,y){this.writeTag(m,Hn.Bytes),this.writeBytes(y)},writeFixed32Field:function(m,y){this.writeTag(m,Hn.Fixed32),this.writeFixed32(y)},writeSFixed32Field:function(m,y){this.writeTag(m,Hn.Fixed32),this.writeSFixed32(y)},writeFixed64Field:function(m,y){this.writeTag(m,Hn.Fixed64),this.writeFixed64(y)},writeSFixed64Field:function(m,y){this.writeTag(m,Hn.Fixed64),this.writeSFixed64(y)},writeVarintField:function(m,y){this.writeTag(m,Hn.Varint),this.writeVarint(y)},writeSVarintField:function(m,y){this.writeTag(m,Hn.Varint),this.writeSVarint(y)},writeStringField:function(m,y){this.writeTag(m,Hn.Bytes),this.writeString(y)},writeFloatField:function(m,y){this.writeTag(m,Hn.Fixed32),this.writeFloat(y)},writeDoubleField:function(m,y){this.writeTag(m,Hn.Fixed64),this.writeDouble(y)},writeBooleanField:function(m,y){this.writeVarintField(m,!!y)}};function bo(m,y,I){var U=I.buf,J,ne;if(ne=U[I.pos++],J=(ne&112)>>4,ne<128||(ne=U[I.pos++],J|=(ne&127)<<3,ne<128)||(ne=U[I.pos++],J|=(ne&127)<<10,ne<128)||(ne=U[I.pos++],J|=(ne&127)<<17,ne<128)||(ne=U[I.pos++],J|=(ne&127)<<24,ne<128)||(ne=U[I.pos++],J|=(ne&1)<<31,ne<128))return Uo(m,J,y);throw new Error("Expected varint not more than 10 bytes")}function Ya(m){return m.type===Hn.Bytes?m.readVarint()+m.pos:m.pos+1}function Uo(m,y,I){return I?y*4294967296+(m>>>0):(y>>>0)*4294967296+(m>>>0)}function wu(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),hu(I,U,y),uh(U,y)}function hu(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 uh(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 $v(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 J=I.pos-1;J>=m;J--)I.buf[J+U]=I.buf[J]}function td(m,y){for(var I=0;I>>8,m[I+2]=y>>>16,m[I+3]=y>>>24}function Iv(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="",J=y;J239?4:ne>223?3:ne>191?2:1;if(J+Fe>I)break;var Qe,st,mt;Fe===1?ne<128&&(fe=ne):Fe===2?(Qe=m[J+1],(Qe&192)===128&&(fe=(ne&31)<<6|Qe&63,fe<=127&&(fe=null))):Fe===3?(Qe=m[J+1],st=m[J+2],(Qe&192)===128&&(st&192)===128&&(fe=(ne&15)<<12|(Qe&63)<<6|st&63,(fe<=2047||fe>=55296&&fe<=57343)&&(fe=null))):Fe===4&&(Qe=m[J+1],st=m[J+2],mt=m[J+3],(Qe&192)===128&&(st&192)===128&&(mt&192)===128&&(fe=(ne&15)<<18|(Qe&63)<<12|(st&63)<<6|mt&63,(fe<=65535||fe>=1114112)&&(fe=null))),fe===null?(fe=65533,Fe=1):fe>65535&&(fe-=65536,U+=String.fromCharCode(fe>>>10&1023|55296),fe=56320|fe&1023),U+=String.fromCharCode(fe),J+=Fe}return U}function Cl(m,y,I){return Tn.decode(m.subarray(y,I))}function qu(m,y,I){for(var U=0,J,ne;U55295&&J<57344)if(ne)if(J<56320){m[I++]=239,m[I++]=191,m[I++]=189,ne=J;continue}else J=ne-55296<<10|J-56320|65536,ne=null;else{J>56319||U+1===y.length?(m[I++]=239,m[I++]=191,m[I++]=189):ne=J;continue}else ne&&(m[I++]=239,m[I++]=191,m[I++]=189,ne=null);J<128?m[I++]=J:(J<2048?m[I++]=J>>6|192:(J<65536?m[I++]=J>>12|224:(m[I++]=J>>18|240,m[I++]=J>>12&63|128),m[I++]=J>>6&63|128),m[I++]=J&63|128)}return I}var Tu=3;function Dv(m,y,I){m===1&&I.readMessage(qc,y)}function qc(m,y,I){if(m===3){var U=I.readMessage(I1,{}),J=U.id,ne=U.bitmap,fe=U.width,Fe=U.height,Qe=U.left,st=U.top,mt=U.advance;y.push({id:J,bitmap:new Pv({width:fe+2*Tu,height:Fe+2*Tu},ne),metrics:{width:fe,height:Fe,left:Qe,top:st,advance:mt}})}}function I1(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 p0(m){return new La(m).readFields(Dv,[])}var Gp=Tu;function Qv(m){for(var y=0,I=0,U=0,J=m;U=0;nr--){var Lr=Fe[nr];if(!(ur.w>Lr.w||ur.h>Lr.h)){if(ur.x=Lr.x,ur.y=Lr.y,st=Math.max(st,ur.y+ur.h),Qe=Math.max(Qe,ur.x+ur.w),ur.w===Lr.w&&ur.h===Lr.h){var Yr=Fe.pop();nr=0&&J>=y&&m0[this.text.charCodeAt(J)];J--)U--;this.text=this.text.substring(y,U),this.sectionIndex=this.sectionIndex.slice(y,U)},zh.prototype.substring=function(y,I){var U=new zh;return U.text=this.text.substring(y,I),U.sectionIndex=this.sectionIndex.slice(y,I),U.sections=this.sections,U},zh.prototype.toString=function(){return this.text},zh.prototype.getMaxScale=function(){var y=this;return this.sectionIndex.reduce(function(I,U){return Math.max(I,y.sections[U].scale)},0)},zh.prototype.addTextSection=function(y,I){this.text+=y.text,this.sections.push(hy.forText(y.scale,y.fontStack||I));for(var U=this.sections.length-1,J=0;J=g0?null:++this.imageSectionID:(this.imageSectionID=Uw,this.imageSectionID)};function $9(m,y){for(var I=[],U=m.text,J=0,ne=0,fe=y;ne=0,mt=0,Xt=0;Xt0&&Zf>Ba&&(Ba=Zf)}else{var nl=I[Pa.fontStack],Ws=nl&&nl[Na];if(Ws&&Ws.rect)zo=Ws.rect,us=Ws.metrics;else{var Au=y[Pa.fontStack],Ou=Au&&Au[Na];if(!Ou)continue;us=Ou.metrics}ja=(en-Pa.scale)*Zi}il?(m.verticalizable=!0,$n.push({glyph:Na,imageName:rl,x:ur,y:nr+ja,vertical:il,scale:Pa.scale,fontStack:Pa.fontStack,sectionIndex:qo,metrics:us,rect:zo}),ur+=ou*Pa.scale+st):($n.push({glyph:Na,imageName:rl,x:ur,y:nr+ja,vertical:il,scale:Pa.scale,fontStack:Pa.fontStack,sectionIndex:qo,metrics:us,rect:zo}),ur+=us.advance*Pa.scale+st)}if($n.length!==0){var jd=ur-st;Lr=Math.max(jd,Lr),rq($n,0,$n.length-1,_i,Ba)}ur=0;var Wd=ne*en+Ba;ra.lineOffset=Math.max(Ba,An),nr+=Wd,Yr=Math.max(Wd,Yr),++si}var Oh=nr-D1,fv=wS(fe),hv=fv.horizontalAlign,hh=fv.verticalAlign;Ad(m.positionedLines,_i,hv,hh,Lr,Yr,ne,Oh,J.length),m.top+=-hh*Oh,m.bottom=m.top+Oh,m.left+=-hv*Lr,m.right=m.left+Lr}function rq(m,y,I,U,J){if(!(!U&&!J))for(var ne=m[I],fe=ne.metrics.advance*ne.scale,Fe=(m[I].x+fe)*U,Qe=y;Qe<=I;Qe++)m[Qe].x-=Fe,m[Qe].y+=J}function Ad(m,y,I,U,J,ne,fe,Fe,Qe){var st=(y-I)*J,mt=0;ne!==fe?mt=-Fe*U-D1:mt=(-U*Qe+.5)*fe;for(var Xt=0,ur=m;Xt-I/2;){if(fe--,fe<0)return!1;Fe-=m[fe].dist(ne),ne=m[fe]}Fe+=m[fe].dist(m[fe+1]),fe++;for(var Qe=[],st=0;FeU;)st-=Qe.shift().angleDelta;if(st>J)return!1;fe++,Fe+=Xt.dist(ur)}return!0}function xQ(m){for(var y=0,I=0;Ist){var Lr=(st-Qe)/nr,Yr=Qs(Xt.x,ur.x,Lr),_i=Qs(Xt.y,ur.y,Lr),si=new Gd(Yr,_i,ur.angleTo(Xt),mt);return si._round(),!fe||_Q(m,si,Fe,fe,y)?si:void 0}Qe+=nr}}function $$e(m,y,I,U,J,ne,fe,Fe,Qe){var st=bQ(U,ne,fe),mt=wQ(U,J),Xt=mt*fe,ur=m[0].x===0||m[0].x===Qe||m[0].y===0||m[0].y===Qe;y-Xt=0&&Vi=0&&en=0&&ur+st<=mt){var An=new Gd(Vi,en,Hi,Lr);An._round(),(!U||_Q(m,An,ne,U,J))&&nr.push(An)}}Xt+=si}return!Fe&&!nr.length&&!fe&&(nr=TQ(m,Xt/2,I,U,J,ne,fe,!0,Qe)),nr}function AQ(m,y,I,U,J){for(var ne=[],fe=0;fe=U&&Xt.x>=U)&&(mt.x>=U?mt=new u(U,mt.y+(Xt.y-mt.y)*((U-mt.x)/(Xt.x-mt.x)))._round():Xt.x>=U&&(Xt=new u(U,mt.y+(Xt.y-mt.y)*((U-mt.x)/(Xt.x-mt.x)))._round()),!(mt.y>=J&&Xt.y>=J)&&(mt.y>=J?mt=new u(mt.x+(Xt.x-mt.x)*((J-mt.y)/(Xt.y-mt.y)),J)._round():Xt.y>=J&&(Xt=new u(mt.x+(Xt.x-mt.x)*((J-mt.y)/(Xt.y-mt.y)),J)._round()),(!Qe||!mt.equals(Qe[Qe.length-1]))&&(Qe=[mt],ne.push(Qe)),Qe.push(Xt)))))}return ne}var Gw=oc;function SQ(m,y,I,U){var J=[],ne=m.image,fe=ne.pixelRatio,Fe=ne.paddedRect.w-2*Gw,Qe=ne.paddedRect.h-2*Gw,st=m.right-m.left,mt=m.bottom-m.top,Xt=ne.stretchX||[[0,Fe]],ur=ne.stretchY||[[0,Qe]],nr=function(nl,Ws){return nl+Ws[1]-Ws[0]},Lr=Xt.reduce(nr,0),Yr=ur.reduce(nr,0),_i=Fe-Lr,si=Qe-Yr,Hi=0,Ei=Lr,Vi=0,en=Yr,An=0,ra=_i,$n=0,Ba=si;if(ne.content&&U){var _a=ne.content;Hi=UC(Xt,0,_a[0]),Vi=UC(ur,0,_a[1]),Ei=UC(Xt,_a[0],_a[2]),en=UC(ur,_a[1],_a[3]),An=_a[0]-Hi,$n=_a[1]-Vi,ra=_a[2]-_a[0]-Ei,Ba=_a[3]-_a[1]-en}var Pa=function(nl,Ws,Au,Ou){var nf=VC(nl.stretch-Hi,Ei,st,m.left),bf=HC(nl.fixed-An,ra,nl.stretch,Lr),qh=VC(Ws.stretch-Vi,en,mt,m.top),Zf=HC(Ws.fixed-$n,Ba,Ws.stretch,Yr),jd=VC(Au.stretch-Hi,Ei,st,m.left),Wd=HC(Au.fixed-An,ra,Au.stretch,Lr),Oh=VC(Ou.stretch-Vi,en,mt,m.top),fv=HC(Ou.fixed-$n,Ba,Ou.stretch,Yr),hv=new u(nf,qh),hh=new u(jd,qh),dv=new u(jd,Oh),_p=new u(nf,Oh),py=new u(bf/fe,Zf/fe),F1=new u(Wd/fe,fv/fe),q1=y*Math.PI/180;if(q1){var O1=Math.sin(q1),$w=Math.cos(q1),y0=[$w,-O1,O1,$w];hv._matMult(y0),hh._matMult(y0),_p._matMult(y0),dv._matMult(y0)}var YC=nl.stretch+nl.fixed,cq=Au.stretch+Au.fixed,KC=Ws.stretch+Ws.fixed,fq=Ou.stretch+Ou.fixed,jp={x:ne.paddedRect.x+Gw+YC,y:ne.paddedRect.y+Gw+KC,w:cq-YC,h:fq-KC},Qw=ra/fe/st,JC=Ba/fe/mt;return{tl:hv,tr:hh,bl:_p,br:dv,tex:jp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:py,pixelOffsetBR:F1,minFontScaleX:Qw,minFontScaleY:JC,isSDF:I}};if(!U||!ne.stretchX&&!ne.stretchY)J.push(Pa({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:Qe+1}));else for(var qo=MQ(Xt,_i,Lr),Na=MQ(ur,si,Yr),ja=0;ja0&&(Lr=Math.max(10,Lr),this.circleDiameter=Lr)}else{var Yr=fe.top*Fe-Qe,_i=fe.bottom*Fe+Qe,si=fe.left*Fe-Qe,Hi=fe.right*Fe+Qe,Ei=fe.collisionPadding;if(Ei&&(si-=Ei[0]*Fe,Yr-=Ei[1]*Fe,Hi+=Ei[2]*Fe,_i+=Ei[3]*Fe),mt){var Vi=new u(si,Yr),en=new u(Hi,Yr),An=new u(si,_i),ra=new u(Hi,_i),$n=mt*Math.PI/180;Vi._rotate($n),en._rotate($n),An._rotate($n),ra._rotate($n),si=Math.min(Vi.x,en.x,An.x,ra.x),Hi=Math.max(Vi.x,en.x,An.x,ra.x),Yr=Math.min(Vi.y,en.y,An.y,ra.y),_i=Math.max(Vi.y,en.y,An.y,ra.y)}y.emplaceBack(I.x,I.y,si,Yr,Hi,_i,U,J,ne)}this.boxEndIndex=y.length},jw=function(y,I){if(y===void 0&&(y=[]),I===void 0&&(I=eQe),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)};jw.prototype.push=function(y){this.data.push(y),this.length++,this._up(this.length-1)},jw.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}},jw.prototype.peek=function(){return this.data[0]},jw.prototype._up=function(y){for(var I=this,U=I.data,J=I.compare,ne=U[y];y>0;){var fe=y-1>>1,Fe=U[fe];if(J(ne,Fe)>=0)break;U[y]=Fe,y=fe}U[y]=ne},jw.prototype._down=function(y){for(var I=this,U=I.data,J=I.compare,ne=this.length>>1,fe=U[y];y=0)break;U[y]=Qe,y=Fe}U[y]=fe};function eQe(m,y){return my?1:0}function tQe(m,y,I){y===void 0&&(y=1),I===void 0&&(I=!1);for(var U=1/0,J=1/0,ne=-1/0,fe=-1/0,Fe=m[0],Qe=0;Qene)&&(ne=st.x),(!Qe||st.y>fe)&&(fe=st.y)}var mt=ne-U,Xt=fe-J,ur=Math.min(mt,Xt),nr=ur/2,Lr=new jw([],rQe);if(ur===0)return new u(U,J);for(var Yr=U;Yrsi.d||!si.d)&&(si=Ei,I&&console.log("found best %d after %d probes",Math.round(1e4*Ei.d)/1e4,Hi)),!(Ei.max-si.d<=y)&&(nr=Ei.h/2,Lr.push(new Ww(Ei.p.x-nr,Ei.p.y-nr,nr,m)),Lr.push(new Ww(Ei.p.x+nr,Ei.p.y-nr,nr,m)),Lr.push(new Ww(Ei.p.x-nr,Ei.p.y+nr,nr,m)),Lr.push(new Ww(Ei.p.x+nr,Ei.p.y+nr,nr,m)),Hi+=4)}return I&&(console.log("num probes: "+Hi),console.log("best distance: "+si.d)),si.p}function rQe(m,y){return y.max-m.max}function Ww(m,y,I,U){this.p=new u(m,y),this.h=I,this.d=iQe(this.p,U),this.max=this.d+this.h*Math.SQRT2}function iQe(m,y){for(var I=!1,U=1/0,J=0;Jm.y!=mt.y>m.y&&m.x<(mt.x-st.x)*(m.y-st.y)/(mt.y-st.y)+st.x&&(I=!I),U=Math.min(U,cg(m,st,mt))}return(I?1:-1)*Math.sqrt(U)}function nQe(m){for(var y=0,I=0,U=0,J=m[0],ne=0,fe=J.length,Fe=fe-1;ne=rn||y0.y<0||y0.y>=rn||sQe(m,y0,$w,I,U,J,Na,m.layers[0],m.collisionBoxArray,y.index,y.sourceLayerIndex,m.index,si,en,$n,Qe,Ei,An,Ba,nr,y,ne,st,mt,fe)};if(_a==="line")for(var us=0,zo=AQ(y.geometry,0,0,rn,rn);us1){var qh=J$e(bf,ra,I.vertical||Lr,U,Yr,Hi);qh&&ja(bf,qh)}}else if(y.type==="Polygon")for(var Zf=0,jd=zw(y.geometry,0);ZfR1&&re(m.layerIds[0]+': Value for "text-size" is >= '+TS+'. Reduce your "text-size".')):_i.kind==="composite"&&(si=[Sd*nr.compositeTextSizes[0].evaluate(fe,{},Lr),Sd*nr.compositeTextSizes[1].evaluate(fe,{},Lr)],(si[0]>R1||si[1]>R1)&&re(m.layerIds[0]+': Value for "text-size" is >= '+TS+'. Reduce your "text-size".')),m.addSymbols(m.text,Yr,si,Fe,ne,fe,st,y,Qe.lineStartIndex,Qe.lineLength,ur,Lr);for(var Hi=0,Ei=mt;HiR1&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TS+'. Reduce your "icon-size".')):hv.kind==="composite"&&(hh=[Sd*en.compositeIconSizes[0].evaluate(Vi,{},ra),Sd*en.compositeIconSizes[1].evaluate(Vi,{},ra)],(hh[0]>R1||hh[1]>R1)&&re(m.layerIds[0]+': Value for "icon-size" is >= '+TS+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Oh,hh,Ei,Hi,Vi,!1,y,_a.lineStartIndex,_a.lineLength,-1,ra),il=m.icon.placedSymbolArray.length-1,fv&&(zo=fv.length*4,m.addSymbols(m.icon,fv,hh,Ei,Hi,Vi,uv.vertical,y,_a.lineStartIndex,_a.lineLength,-1,ra),nl=m.icon.placedSymbolArray.length-1)}for(var dv in U.horizontal){var _p=U.horizontal[dv];if(!Pa){Au=$(_p.text);var py=Fe.layout.get("text-rotate").evaluate(Vi,{},ra);Pa=new GC(Qe,y,st,mt,Xt,_p,ur,nr,Lr,py)}var F1=_p.positionedLines.length===1;if(rl+=kQ(m,y,_p,ne,Fe,Lr,Vi,Yr,_a,U.vertical?uv.horizontal:uv.horizontalOnly,F1?Object.keys(U.horizontal):[dv],Ws,il,en,ra),F1)break}U.vertical&&(ou+=kQ(m,y,U.vertical,ne,Fe,Lr,Vi,Yr,_a,uv.vertical,["vertical"],Ws,nl,en,ra));var q1=Pa?Pa.boxStartIndex:m.collisionBoxArray.length,O1=Pa?Pa.boxEndIndex:m.collisionBoxArray.length,$w=Na?Na.boxStartIndex:m.collisionBoxArray.length,y0=Na?Na.boxEndIndex:m.collisionBoxArray.length,YC=qo?qo.boxStartIndex:m.collisionBoxArray.length,cq=qo?qo.boxEndIndex:m.collisionBoxArray.length,KC=ja?ja.boxStartIndex:m.collisionBoxArray.length,fq=ja?ja.boxEndIndex:m.collisionBoxArray.length,jp=-1,Qw=function(MS,jQ){return MS&&MS.circleDiameter?Math.max(MS.circleDiameter,jQ):jQ};jp=Qw(Pa,jp),jp=Qw(Na,jp),jp=Qw(qo,jp),jp=Qw(ja,jp);var JC=jp>-1?1:0;JC&&(jp*=$n/Zi),m.glyphOffsetArray.length>=au.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Vi.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,Vi.sortKey),m.symbolInstances.emplaceBack(y.x,y.y,Ws.right>=0?Ws.right:-1,Ws.center>=0?Ws.center:-1,Ws.left>=0?Ws.left:-1,Ws.vertical||-1,il,nl,Au,q1,O1,$w,y0,YC,cq,KC,fq,st,rl,ou,us,zo,JC,0,ur,Ou,nf,jp)}function lQe(m,y,I,U){var J=m.compareText;if(!(y in J))J[y]=[];else for(var ne=J[y],fe=ne.length-1;fe>=0;fe--)if(U.dist(ne[fe])0)&&(fe.value.kind!=="constant"||fe.value.value.length>0),mt=Qe.value.kind!=="constant"||!!Qe.value.value||Object.keys(Qe.parameters).length>0,Xt=ne.get("symbol-sort-key");if(this.features=[],!(!st&&!mt)){for(var ur=I.iconDependencies,nr=I.glyphDependencies,Lr=I.availableImages,Yr=new pn(this.zoom),_i=0,si=y;_i=0;for(var ou=0,il=Ba.sections;ou=0;Qe--)fe[Qe]={x:I[Qe].x,y:I[Qe].y,tileUnitDistanceFromAnchor:ne},Qe>0&&(ne+=I[Qe-1].dist(I[Qe]));for(var st=0;st0},au.prototype.hasIconData=function(){return this.icon.segments.get().length>0},au.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},au.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},au.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},au.prototype.addIndicesForPlacedSymbol=function(y,I){for(var U=y.placedSymbolArray.get(I),J=U.vertexStartIndex+U.numGlyphs*4,ne=U.vertexStartIndex;ne1||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,J=this.symbolInstanceIndexes;U=0&&st.indexOf(Fe)===Qe&&I.addIndicesForPlacedSymbol(I.text,Fe)}),fe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,fe.verticalPlacedTextSymbolIndex),fe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,fe.placedIconSymbolIndex),fe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,fe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Z("SymbolBucket",au,{omit:["layers","collisionBoxArray","features","compareText"]}),au.MAX_GLYPHS=65535,au.addDynamicAttributes=aq;function hQe(m,y){return y.replace(/{([^{}]+)}/g,function(I,U){return U in m?String(m[U]):""})}var dQe=new Oi({"symbol-placement":new At(on.layout_symbol["symbol-placement"]),"symbol-spacing":new At(on.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new At(on.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Er(on.layout_symbol["symbol-sort-key"]),"symbol-z-order":new At(on.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new At(on.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new At(on.layout_symbol["icon-ignore-placement"]),"icon-optional":new At(on.layout_symbol["icon-optional"]),"icon-rotation-alignment":new At(on.layout_symbol["icon-rotation-alignment"]),"icon-size":new Er(on.layout_symbol["icon-size"]),"icon-text-fit":new At(on.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new At(on.layout_symbol["icon-text-fit-padding"]),"icon-image":new Er(on.layout_symbol["icon-image"]),"icon-rotate":new Er(on.layout_symbol["icon-rotate"]),"icon-padding":new At(on.layout_symbol["icon-padding"]),"icon-keep-upright":new At(on.layout_symbol["icon-keep-upright"]),"icon-offset":new Er(on.layout_symbol["icon-offset"]),"icon-anchor":new Er(on.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new At(on.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new At(on.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new At(on.layout_symbol["text-rotation-alignment"]),"text-field":new Er(on.layout_symbol["text-field"]),"text-font":new Er(on.layout_symbol["text-font"]),"text-size":new Er(on.layout_symbol["text-size"]),"text-max-width":new Er(on.layout_symbol["text-max-width"]),"text-line-height":new At(on.layout_symbol["text-line-height"]),"text-letter-spacing":new Er(on.layout_symbol["text-letter-spacing"]),"text-justify":new Er(on.layout_symbol["text-justify"]),"text-radial-offset":new Er(on.layout_symbol["text-radial-offset"]),"text-variable-anchor":new At(on.layout_symbol["text-variable-anchor"]),"text-anchor":new Er(on.layout_symbol["text-anchor"]),"text-max-angle":new At(on.layout_symbol["text-max-angle"]),"text-writing-mode":new At(on.layout_symbol["text-writing-mode"]),"text-rotate":new Er(on.layout_symbol["text-rotate"]),"text-padding":new At(on.layout_symbol["text-padding"]),"text-keep-upright":new At(on.layout_symbol["text-keep-upright"]),"text-transform":new Er(on.layout_symbol["text-transform"]),"text-offset":new Er(on.layout_symbol["text-offset"]),"text-allow-overlap":new At(on.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new At(on.layout_symbol["text-ignore-placement"]),"text-optional":new At(on.layout_symbol["text-optional"])}),vQe=new Oi({"icon-opacity":new Er(on.paint_symbol["icon-opacity"]),"icon-color":new Er(on.paint_symbol["icon-color"]),"icon-halo-color":new Er(on.paint_symbol["icon-halo-color"]),"icon-halo-width":new Er(on.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Er(on.paint_symbol["icon-halo-blur"]),"icon-translate":new At(on.paint_symbol["icon-translate"]),"icon-translate-anchor":new At(on.paint_symbol["icon-translate-anchor"]),"text-opacity":new Er(on.paint_symbol["text-opacity"]),"text-color":new Er(on.paint_symbol["text-color"],{runtimeType:Tl,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new Er(on.paint_symbol["text-halo-color"]),"text-halo-width":new Er(on.paint_symbol["text-halo-width"]),"text-halo-blur":new Er(on.paint_symbol["text-halo-blur"]),"text-translate":new At(on.paint_symbol["text-translate"]),"text-translate-anchor":new At(on.paint_symbol["text-translate-anchor"])}),oq={paint:vQe,layout:dQe},Yw=function(y){this.type=y.property.overrides?y.property.overrides.runtimeType:Ec,this.defaultValue=y};Yw.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},Yw.prototype.eachChild=function(y){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;y(I._styleExpression.expression)}},Yw.prototype.outputDefined=function(){return!1},Yw.prototype.serialize=function(){return null},Z("FormatSectionOverride",Yw,{omit:["defaultValue"]});var pQe=function(m){function y(I){m.call(this,I,oq)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(U,J){if(m.prototype.recalculate.call(this,U,J),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 ne=this.layout.get("text-writing-mode");if(ne){for(var fe=[],Fe=0,Qe=ne;Fe",targetMapId:J,sourceMapId:fe.mapId})}}},Kw.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 J=this.cancelCallbacks[U];delete this.cancelCallbacks[U],J&&J()}else ke()||I.mustQueue?(this.tasks[U]=I,this.taskQueue.push(U),this.invoker.trigger()):this.processTask(U,I)},Kw.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)}},Kw.prototype.processTask=function(y,I){var U=this;if(I.type===""){var J=this.callbacks[y];delete this.callbacks[y],J&&(I.error?J(We(I.error)):J(null,We(I.data)))}else{var ne=!1,fe=Te(this.globalScope)?void 0:[],Fe=I.hasCallback?function(ur,nr){ne=!0,delete U.cancelCallbacks[y],U.target.postMessage({id:y,type:"",sourceMapId:U.mapId,error:ur?Ue(ur):null,data:Ue(nr,fe)},fe)}:function(ur){ne=!0},Qe=null,st=We(I.data);if(this.parent[I.type])Qe=this.parent[I.type](I.sourceMapId,st,Fe);else if(this.parent.getWorkerSource){var mt=I.type.split("."),Xt=this.parent.getWorkerSource(I.sourceMapId,mt[0],st.source);Qe=Xt[mt[1]](st,Fe)}else Fe(new Error("Could not find function "+I.type));!ne&&Qe&&Qe.cancel&&(this.cancelCallbacks[y]=Qe.cancel)}},Kw.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function MQe(m,y,I){y=Math.pow(2,I)-y-1;var U=RQ(m*256,y*256,I),J=RQ((m+1)*256,(y+1)*256,I);return U[0]+","+U[1]+","+J[0]+","+J[1]}function RQ(m,y,I){var U=2*Math.PI*6378137/256/Math.pow(2,I),J=m*U-2*Math.PI*6378137/2,ne=y*U-2*Math.PI*6378137/2;return[J,ne]}var jf=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]))};jf.prototype.setNorthEast=function(y){return this._ne=y instanceof sc?new sc(y.lng,y.lat):sc.convert(y),this},jf.prototype.setSouthWest=function(y){return this._sw=y instanceof sc?new sc(y.lng,y.lat):sc.convert(y),this},jf.prototype.extend=function(y){var I=this._sw,U=this._ne,J,ne;if(y instanceof sc)J=y,ne=y;else if(y instanceof jf){if(J=y._sw,ne=y._ne,!J||!ne)return this}else{if(Array.isArray(y))if(y.length===4||y.every(Array.isArray)){var fe=y;return this.extend(jf.convert(fe))}else{var Fe=y;return this.extend(sc.convert(Fe))}return this}return!I&&!U?(this._sw=new sc(J.lng,J.lat),this._ne=new sc(ne.lng,ne.lat)):(I.lng=Math.min(J.lng,I.lng),I.lat=Math.min(J.lat,I.lat),U.lng=Math.max(ne.lng,U.lng),U.lat=Math.max(ne.lat,U.lat)),this},jf.prototype.getCenter=function(){return new sc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},jf.prototype.getSouthWest=function(){return this._sw},jf.prototype.getNorthEast=function(){return this._ne},jf.prototype.getNorthWest=function(){return new sc(this.getWest(),this.getNorth())},jf.prototype.getSouthEast=function(){return new sc(this.getEast(),this.getSouth())},jf.prototype.getWest=function(){return this._sw.lng},jf.prototype.getSouth=function(){return this._sw.lat},jf.prototype.getEast=function(){return this._ne.lng},jf.prototype.getNorth=function(){return this._ne.lat},jf.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},jf.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},jf.prototype.isEmpty=function(){return!(this._sw&&this._ne)},jf.prototype.contains=function(y){var I=sc.convert(y),U=I.lng,J=I.lat,ne=this._sw.lat<=J&&J<=this._ne.lat,fe=this._sw.lng<=U&&U<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=U&&U>=this._ne.lng),ne&&fe},jf.convert=function(y){return!y||y instanceof jf?y:new jf(y)};var zQ=63710088e-1,sc=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")};sc.prototype.wrap=function(){return new sc(E(this.lng,-180,180),this.lat)},sc.prototype.toArray=function(){return[this.lng,this.lat]},sc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},sc.prototype.distanceTo=function(y){var I=Math.PI/180,U=this.lat*I,J=y.lat*I,ne=Math.sin(U)*Math.sin(J)+Math.cos(U)*Math.cos(J)*Math.cos((y.lng-this.lng)*I),fe=zQ*Math.acos(Math.min(ne,1));return fe},sc.prototype.toBounds=function(y){y===void 0&&(y=0);var I=40075017,U=360*y/I,J=U/Math.cos(Math.PI/180*this.lat);return new jf(new sc(this.lng-J,this.lat-U),new sc(this.lng+J,this.lat+U))},sc.convert=function(y){if(y instanceof sc)return y;if(Array.isArray(y)&&(y.length===2||y.length===3))return new sc(Number(y[0]),Number(y[1]));if(!Array.isArray(y)&&typeof y=="object"&&y!==null)return new sc(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 FQ=2*Math.PI*zQ;function qQ(m){return FQ*Math.cos(m*Math.PI/180)}function OQ(m){return(180+m)/360}function BQ(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function NQ(m,y){return m/qQ(y)}function EQe(m){return m*360-180}function lq(m){var y=180-m*360;return 360/Math.PI*Math.atan(Math.exp(y*Math.PI/180))-90}function kQe(m,y){return m*qQ(lq(y))}function CQe(m){return 1/Math.cos(m*Math.PI/180)}var ib=function(y,I,U){U===void 0&&(U=0),this.x=+y,this.y=+I,this.z=+U};ib.fromLngLat=function(y,I){I===void 0&&(I=0);var U=sc.convert(y);return new ib(OQ(U.lng),BQ(U.lat),NQ(I,U.lat))},ib.prototype.toLngLat=function(){return new sc(EQe(this.x),lq(this.y))},ib.prototype.toAltitude=function(){return kQe(this.z,this.y)},ib.prototype.meterInMercatorCoordinateUnits=function(){return 1/FQ*CQe(lq(this.y))};var nb=function(y,I,U){this.z=y,this.x=I,this.y=U,this.key=SS(0,y,y,I,U)};nb.prototype.equals=function(y){return this.z===y.z&&this.x===y.x&&this.y===y.y},nb.prototype.url=function(y,I){var U=MQe(this.x,this.y,this.z),J=LQe(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}",J).replace("{bbox-epsg-3857}",U)},nb.prototype.getTilePoint=function(y){var I=Math.pow(2,this.z);return new u((y.x*I-this.x)*rn,(y.y*I-this.y)*rn)},nb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var UQ=function(y,I){this.wrap=y,this.canonical=I,this.key=SS(y,I.z,I.z,I.x,I.y)},Wf=function(y,I,U,J,ne){this.overscaledZ=y,this.wrap=I,this.canonical=new nb(U,+J,+ne),this.key=SS(I,y,U,J,ne)};Wf.prototype.equals=function(y){return this.overscaledZ===y.overscaledZ&&this.wrap===y.wrap&&this.canonical.equals(y.canonical)},Wf.prototype.scaledTo=function(y){var I=this.canonical.z-y;return y>this.canonical.z?new Wf(y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Wf(y,this.wrap,y,this.canonical.x>>I,this.canonical.y>>I)},Wf.prototype.calculateScaledKey=function(y,I){var U=this.canonical.z-y;return y>this.canonical.z?SS(this.wrap*+I,y,this.canonical.z,this.canonical.x,this.canonical.y):SS(this.wrap*+I,y,y,this.canonical.x>>U,this.canonical.y>>U)},Wf.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},Wf.prototype.children=function(y){if(this.overscaledZ>=y)return[new Wf(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,J=this.canonical.y*2;return[new Wf(I,this.wrap,I,U,J),new Wf(I,this.wrap,I,U+1,J),new Wf(I,this.wrap,I,U,J+1),new Wf(I,this.wrap,I,U+1,J+1)]},Wf.prototype.isLessThan=function(y){return this.wrapy.wrap?!1:this.overscaledZy.overscaledZ?!1:this.canonical.xy.canonical.x?!1:this.canonical.y0;ne--)J=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)},dy.prototype._unpackMapbox=function(y,I,U){return(y*256*256+I*256+U)/10-1e4},dy.prototype._unpackTerrarium=function(y,I,U){return y*256+I+U/256-32768},dy.prototype.getPixels=function(){return new lh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},dy.prototype.backfillBorder=function(y,I,U){if(this.dim!==y.dim)throw new Error("dem dimension mismatch");var J=I*this.dim,ne=I*this.dim+this.dim,fe=U*this.dim,Fe=U*this.dim+this.dim;switch(I){case-1:J=ne-1;break;case 1:ne=J+1;break}switch(U){case-1:fe=Fe-1;break;case 1:Fe=fe+1;break}for(var Qe=-I*this.dim,st=-U*this.dim,mt=fe;mt=0&&Xt[3]>=0&&Qe.insert(Fe,Xt[0],Xt[1],Xt[2],Xt[3])}},vy.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new pg.VectorTile(new La(this.rawTileData)).layers,this.sourceLayerCoder=new ZC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},vy.prototype.query=function(y,I,U,J){var ne=this;this.loadVTLayers();for(var fe=y.params||{},Fe=rn/y.tileSize/y.scale,Qe=be(fe.filter),st=y.queryGeometry,mt=y.queryPadding*Fe,Xt=HQ(st),ur=this.grid.query(Xt.minX-mt,Xt.minY-mt,Xt.maxX+mt,Xt.maxY+mt),nr=HQ(y.cameraQueryGeometry),Lr=this.grid3D.query(nr.minX-mt,nr.minY-mt,nr.maxX+mt,nr.maxY+mt,function(An,ra,$n,Ba){return pp(y.cameraQueryGeometry,An-mt,ra-mt,$n+mt,Ba+mt)}),Yr=0,_i=Lr;Yr<_i.length;Yr+=1){var si=_i[Yr];ur.push(si)}ur.sort(IQe);for(var Hi={},Ei,Vi=function(An){var ra=ur[An];if(ra!==Ei){Ei=ra;var $n=ne.featureIndexArray.get(ra),Ba=null;ne.loadMatchingFeature(Hi,$n.bucketIndex,$n.sourceLayerIndex,$n.featureIndex,Qe,fe.layers,fe.availableImages,I,U,J,function(_a,Pa,qo){return Ba||(Ba=da(_a)),Pa.queryIntersectsFeature(st,_a,qo,Ba,ne.z,y.transform,Fe,y.pixelPosMatrix)})}},en=0;enJ)ne=!1;else if(!I)ne=!0;else if(this.expirationTime=Ha.maxzoom)&&Ha.visibility!=="none"){h(Sn,this.zoom,Zt);var oo=Si[Ha.id]=Ha.createBucket({index:gi.bucketLayerIDs.length,layers:Sn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ka,sourceID:this.source});oo.populate(jn,Mi,this.tileID.canonical),gi.bucketLayerIDs.push(Sn.map(function(hi){return hi.id}))}}}}var xn,_t,br,Hr,ti=i.mapObject(Mi.glyphDependencies,function(hi){return Object.keys(hi).map(Number)});Object.keys(ti).length?yr.send("getGlyphs",{uid:this.uid,stacks:ti},function(hi,Ji){xn||(xn=hi,_t=Ji,an.call(Zr))}):_t={};var zi=Object.keys(Mi.iconDependencies);zi.length?yr.send("getImages",{icons:zi,source:this.source,tileID:this.tileID,type:"icons"},function(hi,Ji){xn||(xn=hi,br=Ji,an.call(Zr))}):br={};var Yi=Object.keys(Mi.patternDependencies);Yi.length?yr.send("getImages",{icons:Yi,source:this.source,tileID:this.tileID,type:"patterns"},function(hi,Ji){xn||(xn=hi,Hr=Ji,an.call(Zr))}):Hr={},an.call(this);function an(){if(xn)return Fr(xn);if(_t&&br&&Hr){var hi=new c(_t),Ji=new i.ImageAtlas(br,Hr);for(var ua in Si){var Fn=Si[ua];Fn instanceof i.SymbolBucket?(h(Fn.layers,this.zoom,Zt),i.performSymbolLayout(Fn,_t,hi.positions,br,Ji.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Fn.hasPattern&&(Fn instanceof i.LineBucket||Fn instanceof i.FillBucket||Fn instanceof i.FillExtrusionBucket)&&(h(Fn.layers,this.zoom,Zt),Fn.addFeatures(Mi,this.tileID.canonical,Ji.patternPositions))}this.status="done",Fr(null,{buckets:i.values(Si).filter(function(Sa){return!Sa.isEmpty()}),featureIndex:gi,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:hi.image,imageAtlas:Ji,glyphMap:this.returnDependencies?_t:null,iconMap:this.returnDependencies?br:null,glyphPositions:this.returnDependencies?hi.positions:null})}}};function h(It,ft,jt){for(var Zt=new i.EvaluationParameters(ft),yr=0,Fr=It;yr=0!=!!ft&&It.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(ft){this._feature=ft,this.extent=i.EXTENT,this.type=ft.type,this.properties=ft.tags,"id"in ft&&!isNaN(ft.id)&&(this.id=parseInt(ft.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var ft=[],jt=0,Zt=this._feature.geometry;jt>31}function ke(It,ft){for(var jt=It.loadGeometry(),Zt=It.type,yr=0,Fr=0,Zr=jt.length,Vr=0;Vr>1;Te(It,ft,Zr,Zt,yr,Fr%2),ie(It,ft,jt,Zt,Zr-1,Fr+1),ie(It,ft,jt,Zr+1,yr,Fr+1)}}function Te(It,ft,jt,Zt,yr,Fr){for(;yr>Zt;){if(yr-Zt>600){var Zr=yr-Zt+1,Vr=jt-Zt+1,gi=Math.log(Zr),Si=.5*Math.exp(2*gi/3),Mi=.5*Math.sqrt(gi*Si*(Zr-Si)/Zr)*(Vr-Zr/2<0?-1:1),Pi=Math.max(Zt,Math.floor(jt-Vr*Si/Zr+Mi)),Gi=Math.min(yr,Math.floor(jt+(Zr-Vr)*Si/Zr+Mi));Te(It,ft,jt,Pi,Gi,Fr)}var Ki=ft[2*jt+Fr],ka=Zt,jn=yr;for(Ee(It,ft,Zt,jt),ft[2*yr+Fr]>Ki&&Ee(It,ft,Zt,yr);kaKi;)jn--}ft[2*Zt+Fr]===Ki?Ee(It,ft,Zt,jn):(jn++,Ee(It,ft,jn,yr)),jn<=jt&&(Zt=jn+1),jt<=jn&&(yr=jn-1)}}function Ee(It,ft,jt,Zt){Ae(It,jt,Zt),Ae(ft,2*jt,2*Zt),Ae(ft,2*jt+1,2*Zt+1)}function Ae(It,ft,jt){var Zt=It[ft];It[ft]=It[jt],It[jt]=Zt}function ze(It,ft,jt,Zt,yr,Fr,Zr){for(var Vr=[0,It.length-1,0],gi=[],Si,Mi;Vr.length;){var Pi=Vr.pop(),Gi=Vr.pop(),Ki=Vr.pop();if(Gi-Ki<=Zr){for(var ka=Ki;ka<=Gi;ka++)Si=ft[2*ka],Mi=ft[2*ka+1],Si>=jt&&Si<=yr&&Mi>=Zt&&Mi<=Fr&&gi.push(It[ka]);continue}var jn=Math.floor((Ki+Gi)/2);Si=ft[2*jn],Mi=ft[2*jn+1],Si>=jt&&Si<=yr&&Mi>=Zt&&Mi<=Fr&&gi.push(It[jn]);var la=(Pi+1)%2;(Pi===0?jt<=Si:Zt<=Mi)&&(Vr.push(Ki),Vr.push(jn-1),Vr.push(la)),(Pi===0?yr>=Si:Fr>=Mi)&&(Vr.push(jn+1),Vr.push(Gi),Vr.push(la))}return gi}function Ce(It,ft,jt,Zt,yr,Fr){for(var Zr=[0,It.length-1,0],Vr=[],gi=yr*yr;Zr.length;){var Si=Zr.pop(),Mi=Zr.pop(),Pi=Zr.pop();if(Mi-Pi<=Fr){for(var Gi=Pi;Gi<=Mi;Gi++)me(ft[2*Gi],ft[2*Gi+1],jt,Zt)<=gi&&Vr.push(It[Gi]);continue}var Ki=Math.floor((Pi+Mi)/2),ka=ft[2*Ki],jn=ft[2*Ki+1];me(ka,jn,jt,Zt)<=gi&&Vr.push(It[Ki]);var la=(Si+1)%2;(Si===0?jt-yr<=ka:Zt-yr<=jn)&&(Zr.push(Pi),Zr.push(Ki-1),Zr.push(la)),(Si===0?jt+yr>=ka:Zt+yr>=jn)&&(Zr.push(Ki+1),Zr.push(Mi),Zr.push(la))}return Vr}function me(It,ft,jt,Zt){var yr=It-jt,Fr=ft-Zt;return yr*yr+Fr*Fr}var De=function(It){return It[0]},ce=function(It){return It[1]},Ge=function(ft,jt,Zt,yr,Fr){jt===void 0&&(jt=De),Zt===void 0&&(Zt=ce),yr===void 0&&(yr=64),Fr===void 0&&(Fr=Float64Array),this.nodeSize=yr,this.points=ft;for(var Zr=ft.length<65536?Uint16Array:Uint32Array,Vr=this.ids=new Zr(ft.length),gi=this.coords=new Fr(ft.length*2),Si=0;Si=yr;Mi--){var Pi=+Date.now();gi=this._cluster(gi,Mi),this.trees[Mi]=new Ge(gi,Ke,xt,Zr,Float32Array),Zt&&console.log("z%d: %d clusters in %dms",Mi,gi.length,+Date.now()-Pi)}return Zt&&console.timeEnd("total time"),this},ct.prototype.getClusters=function(ft,jt){var Zt=((ft[0]+180)%360+360)%360-180,yr=Math.max(-90,Math.min(90,ft[1])),Fr=ft[2]===180?180:((ft[2]+180)%360+360)%360-180,Zr=Math.max(-90,Math.min(90,ft[3]));if(ft[2]-ft[0]>=360)Zt=-180,Fr=180;else if(Zt>Fr){var Vr=this.getClusters([Zt,yr,180,Zr],jt),gi=this.getClusters([-180,yr,Fr,Zr],jt);return Vr.concat(gi)}for(var Si=this.trees[this._limitZoom(jt)],Mi=Si.range(kt(Zt),Ct(Zr),kt(Fr),Ct(yr)),Pi=[],Gi=0,Ki=Mi;Gijt&&(jn+=jo.numPoints||1)}if(jn>=gi){for(var oa=Pi.x*ka,Sn=Pi.y*ka,Ha=Vr&&ka>1?this._map(Pi,!0):null,oo=(Mi<<5)+(jt+1)+this.points.length,xn=0,_t=Ki;xn<_t.length;xn+=1){var br=_t[xn],Hr=Gi.points[br];if(!(Hr.zoom<=jt)){Hr.zoom=jt;var ti=Hr.numPoints||1;oa+=Hr.x*ti,Sn+=Hr.y*ti,Hr.parentId=oo,Vr&&(Ha||(Ha=this._map(Pi,!0)),Vr(Ha,this._map(Hr)))}}Pi.parentId=oo,Zt.push(qt(oa/jn,Sn/jn,oo,jn,Ha))}else if(Zt.push(Pi),jn>1)for(var zi=0,Yi=Ki;zi>5},ct.prototype._getOriginZoom=function(ft){return(ft-this.points.length)%32},ct.prototype._map=function(ft,jt){if(ft.numPoints)return jt?er({},ft.properties):ft.properties;var Zt=this.points[ft.index].properties,yr=this.options.map(Zt);return jt&&yr===Zt?er({},yr):yr};function qt(It,ft,jt,Zt,yr){return{x:It,y:ft,zoom:1/0,id:jt,parentId:-1,numPoints:Zt,properties:yr}}function rt(It,ft){var jt=It.geometry.coordinates,Zt=jt[0],yr=jt[1];return{x:kt(Zt),y:Ct(yr),zoom:1/0,index:ft,parentId:-1}}function ot(It){return{type:"Feature",id:It.id,properties:Dt(It),geometry:{type:"Point",coordinates:[Yt(It.x),xr(It.y)]}}}function Dt(It){var ft=It.numPoints,jt=ft>=1e4?Math.round(ft/1e3)+"k":ft>=1e3?Math.round(ft/100)/10+"k":ft;return er(er({},It.properties),{cluster:!0,cluster_id:It.id,point_count:ft,point_count_abbreviated:jt})}function kt(It){return It/360+.5}function Ct(It){var ft=Math.sin(It*Math.PI/180),jt=.5-.25*Math.log((1+ft)/(1-ft))/Math.PI;return jt<0?0:jt>1?1:jt}function Yt(It){return(It-.5)*360}function xr(It){var ft=(180-It*360)*Math.PI/180;return 360*Math.atan(Math.exp(ft))/Math.PI-90}function er(It,ft){for(var jt in ft)It[jt]=ft[jt];return It}function Ke(It){return It.x}function xt(It){return It.y}function bt(It,ft,jt,Zt){for(var yr=Zt,Fr=jt-ft>>1,Zr=jt-ft,Vr,gi=It[ft],Si=It[ft+1],Mi=It[jt],Pi=It[jt+1],Gi=ft+3;Giyr)Vr=Gi,yr=Ki;else if(Ki===yr){var ka=Math.abs(Gi-Fr);kaZt&&(Vr-ft>3&&bt(It,ft,Vr,Zt),It[Vr+2]=yr,jt-Vr>3&&bt(It,Vr,jt,Zt))}function Lt(It,ft,jt,Zt,yr,Fr){var Zr=yr-jt,Vr=Fr-Zt;if(Zr!==0||Vr!==0){var gi=((It-jt)*Zr+(ft-Zt)*Vr)/(Zr*Zr+Vr*Vr);gi>1?(jt=yr,Zt=Fr):gi>0&&(jt+=Zr*gi,Zt+=Vr*gi)}return Zr=It-jt,Vr=ft-Zt,Zr*Zr+Vr*Vr}function St(It,ft,jt,Zt){var yr={id:typeof It=="undefined"?null:It,type:ft,geometry:jt,tags:Zt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Et(yr),yr}function Et(It){var ft=It.geometry,jt=It.type;if(jt==="Point"||jt==="MultiPoint"||jt==="LineString")dt(It,ft);else if(jt==="Polygon"||jt==="MultiLineString")for(var Zt=0;Zt0&&(Zt?Zr+=(yr*Si-gi*Fr)/2:Zr+=Math.sqrt(Math.pow(gi-yr,2)+Math.pow(Si-Fr,2))),yr=gi,Fr=Si}var Mi=ft.length-3;ft[2]=1,bt(ft,0,Mi,jt),ft[Mi+2]=1,ft.size=Math.abs(Zr),ft.start=0,ft.end=ft.size}function Br(It,ft,jt,Zt){for(var yr=0;yr1?1:jt}function ut(It,ft,jt,Zt,yr,Fr,Zr,Vr){if(jt/=ft,Zt/=ft,Fr>=jt&&Zr=Zt)return null;for(var gi=[],Si=0;Si=jt&&ka=Zt)continue;var jn=[];if(Gi==="Point"||Gi==="MultiPoint")Ne(Pi,jn,jt,Zt,yr);else if(Gi==="LineString")Ye(Pi,jn,jt,Zt,yr,!1,Vr.lineMetrics);else if(Gi==="MultiLineString")Xe(Pi,jn,jt,Zt,yr,!1);else if(Gi==="Polygon")Xe(Pi,jn,jt,Zt,yr,!0);else if(Gi==="MultiPolygon")for(var la=0;la=jt&&Zr<=Zt&&(ft.push(It[Fr]),ft.push(It[Fr+1]),ft.push(It[Fr+2]))}}function Ye(It,ft,jt,Zt,yr,Fr,Zr){for(var Vr=Ve(It),gi=yr===0?Le:xe,Si=It.start,Mi,Pi,Gi=0;Gijt&&(Pi=gi(Vr,Ki,ka,la,Fa,jt),Zr&&(Vr.start=Si+Mi*Pi)):Da>Zt?jo=jt&&(Pi=gi(Vr,Ki,ka,la,Fa,jt),oa=!0),jo>Zt&&Da<=Zt&&(Pi=gi(Vr,Ki,ka,la,Fa,Zt),oa=!0),!Fr&&oa&&(Zr&&(Vr.end=Si+Mi*Pi),ft.push(Vr),Vr=Ve(It)),Zr&&(Si+=Mi)}var Sn=It.length-3;Ki=It[Sn],ka=It[Sn+1],jn=It[Sn+2],Da=yr===0?Ki:ka,Da>=jt&&Da<=Zt&&ht(Vr,Ki,ka,jn),Sn=Vr.length-3,Fr&&Sn>=3&&(Vr[Sn]!==Vr[0]||Vr[Sn+1]!==Vr[1])&&ht(Vr,Vr[0],Vr[1],Vr[2]),Vr.length&&ft.push(Vr)}function Ve(It){var ft=[];return ft.size=It.size,ft.start=It.start,ft.end=It.end,ft}function Xe(It,ft,jt,Zt,yr,Fr){for(var Zr=0;ZrZr.maxX&&(Zr.maxX=Mi),Pi>Zr.maxY&&(Zr.maxY=Pi)}return Zr}function ai(It,ft,jt,Zt){var yr=ft.geometry,Fr=ft.type,Zr=[];if(Fr==="Point"||Fr==="MultiPoint")for(var Vr=0;Vr0&&ft.size<(yr?Zr:Zt)){jt.numPoints+=ft.length/3;return}for(var Vr=[],gi=0;giZr)&&(jt.numSimplified++,Vr.push(ft[gi]),Vr.push(ft[gi+1])),jt.numPoints++;yr&&ri(Vr,Fr),It.push(Vr)}function ri(It,ft){for(var jt=0,Zt=0,yr=It.length,Fr=yr-2;Zt0===ft)for(Zt=0,yr=It.length;Zt24)throw new Error("maxZoom should be in the 0-24 range");if(ft.promoteId&&ft.generateId)throw new Error("promoteId and generateId cannot be used together.");var Zt=Ht(It,ft);this.tiles={},this.tileCoords=[],jt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ft.indexMaxZoom,ft.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Zt=Se(Zt,ft),Zt.length&&this.splitTile(Zt,0,0,0),jt&&(Zt.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)))}nn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},nn.prototype.splitTile=function(It,ft,jt,Zt,yr,Fr,Zr){for(var Vr=[It,ft,jt,Zt],gi=this.options,Si=gi.debug;Vr.length;){Zt=Vr.pop(),jt=Vr.pop(),ft=Vr.pop(),It=Vr.pop();var Mi=1<1&&console.time("creation"),Gi=this.tiles[Pi]=Qr(It,ft,jt,Zt,gi),this.tileCoords.push({z:ft,x:jt,y:Zt}),Si)){Si>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ft,jt,Zt,Gi.numFeatures,Gi.numPoints,Gi.numSimplified),console.timeEnd("creation"));var Ki="z"+ft;this.stats[Ki]=(this.stats[Ki]||0)+1,this.total++}if(Gi.source=It,yr){if(ft===gi.maxZoom||ft===yr)continue;var ka=1<1&&console.time("clipping");var jn=.5*gi.buffer/gi.extent,la=.5-jn,Fa=.5+jn,Da=1+jn,jo,oa,Sn,Ha,oo,xn;jo=oa=Sn=Ha=null,oo=ut(It,Mi,jt-jn,jt+Fa,0,Gi.minX,Gi.maxX,gi),xn=ut(It,Mi,jt+la,jt+Da,0,Gi.minX,Gi.maxX,gi),It=null,oo&&(jo=ut(oo,Mi,Zt-jn,Zt+Fa,1,Gi.minY,Gi.maxY,gi),oa=ut(oo,Mi,Zt+la,Zt+Da,1,Gi.minY,Gi.maxY,gi),oo=null),xn&&(Sn=ut(xn,Mi,Zt-jn,Zt+Fa,1,Gi.minY,Gi.maxY,gi),Ha=ut(xn,Mi,Zt+la,Zt+Da,1,Gi.minY,Gi.maxY,gi),xn=null),Si>1&&console.timeEnd("clipping"),Vr.push(jo||[],ft+1,jt*2,Zt*2),Vr.push(oa||[],ft+1,jt*2,Zt*2+1),Vr.push(Sn||[],ft+1,jt*2+1,Zt*2),Vr.push(Ha||[],ft+1,jt*2+1,Zt*2+1)}}},nn.prototype.getTile=function(It,ft,jt){var Zt=this.options,yr=Zt.extent,Fr=Zt.debug;if(It<0||It>24)return null;var Zr=1<1&&console.log("drilling down to z%d-%d-%d",It,ft,jt);for(var gi=It,Si=ft,Mi=jt,Pi;!Pi&&gi>0;)gi--,Si=Math.floor(Si/2),Mi=Math.floor(Mi/2),Pi=this.tiles[Wi(gi,Si,Mi)];return!Pi||!Pi.source?null:(Fr>1&&console.log("found parent tile z%d-%d-%d",gi,Si,Mi),Fr>1&&console.time("drilling down"),this.splitTile(Pi.source,gi,Si,Mi,It,ft,jt),Fr>1&&console.timeEnd("drilling down"),this.tiles[Vr]?Vt(this.tiles[Vr],yr):null)};function Wi(It,ft,jt){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function x(Y,z,K){var O,$,pe,de=i.browser.devicePixelRatio>1?"@2x":"",Ie=i.getJSON(z.transformRequest(z.normalizeSpriteURL(Y,de,".json"),i.ResourceType.SpriteJSON),function(Kt,ir){Ie=null,pe||(pe=Kt,O=ir,pt())}),$e=i.getImage(z.transformRequest(z.normalizeSpriteURL(Y,de,".png"),i.ResourceType.SpriteImage),function(Kt,ir){$e=null,pe||(pe=Kt,$=ir,pt())});function pt(){if(pe)K(pe);else if(O&&$){var Kt=i.browser.getImageData($),ir={};for(var Jt in O){var vt=O[Jt],Pt=vt.width,Wt=vt.height,rr=vt.x,dr=vt.y,pr=vt.sdf,kr=vt.pixelRatio,Ar=vt.stretchX,gr=vt.stretchY,Cr=vt.content,cr=new i.RGBAImage({width:Pt,height:Wt});i.RGBAImage.copy(Kt,cr,{x:rr,y:dr},{x:0,y:0},{width:Pt,height:Wt}),ir[Jt]={data:cr,pixelRatio:kr,sdf:pr,stretchX:Ar,stretchY:gr,content:Cr}}K(null,ir)}}return{cancel:function(){Ie&&(Ie.cancel(),Ie=null),$e&&($e.cancel(),$e=null)}}}function b(Y){var z=Y.userImage;if(z&&z.render){var K=z.render();if(K)return Y.data.replace(new Uint8Array(z.data.buffer)),!0}return!1}var g=1,E=function(Y){function z(){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&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.isLoaded=function(){return this.loaded},z.prototype.setLoaded=function(O){if(this.loaded!==O&&(this.loaded=O,O)){for(var $=0,pe=this.requestors;$=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 z=this.ctx.getImageData(0,0,this.size,this.size),K=new Uint8ClampedArray(this.size*this.size),O=0;O65535){Kt(new Error("glyphs > 65535 not supported"));return}if(vt.ranges[Wt]){Kt(null,{stack:ir,id:Jt,glyph:Pt});return}var rr=vt.requests[Wt];rr||(rr=vt.requests[Wt]=[],P.loadGlyphRange(ir,Wt,O.url,O.requestManager,function(dr,pr){if(pr){for(var kr in pr)O._doesCharSupportLocalGlyph(+kr)||(vt.glyphs[+kr]=pr[+kr]);vt.ranges[Wt]=!0}for(var Ar=0,gr=rr;Ar1&&(pt=z[++$e]);var ir=Math.abs(Kt-pt.left),Jt=Math.abs(Kt-pt.right),vt=Math.min(ir,Jt),Pt=void 0,Wt=pe/O*($+1);if(pt.isDash){var rr=$-Math.abs(Wt);Pt=Math.sqrt(vt*vt+rr*rr)}else Pt=$-Math.sqrt(vt*vt+Wt*Wt);this.data[Ie+Kt]=Math.max(0,Math.min(255,Pt+128))}},H.prototype.addRegularDash=function(z){for(var K=z.length-1;K>=0;--K){var O=z[K],$=z[K+1];O.zeroLength?z.splice(K,1):$&&$.isDash===O.isDash&&($.left=O.left,z.splice(K,1))}var pe=z[0],de=z[z.length-1];pe.isDash===de.isDash&&(pe.left=de.left-this.width,de.right=pe.right+this.width);for(var Ie=this.width*this.nextRow,$e=0,pt=z[$e],Kt=0;Kt1&&(pt=z[++$e]);var ir=Math.abs(Kt-pt.left),Jt=Math.abs(Kt-pt.right),vt=Math.min(ir,Jt),Pt=pt.isDash?vt:-vt;this.data[Ie+Kt]=Math.max(0,Math.min(255,Pt+128))}},H.prototype.addDash=function(z,K){var O=K?7:0,$=2*O+1;if(this.nextRow+$>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var pe=0,de=0;de=O.minX&&z.x=O.minY&&z.y0&&(Kt[new i.OverscaledTileID(O.overscaledZ,Ie,$.z,de,$.y-1).key]={backfilled:!1},Kt[new i.OverscaledTileID(O.overscaledZ,O.wrap,$.z,$.x,$.y-1).key]={backfilled:!1},Kt[new i.OverscaledTileID(O.overscaledZ,pt,$.z,$e,$.y-1).key]={backfilled:!1}),$.y+10&&(pe.resourceTiming=O._resourceTiming,O._resourceTiming=[]),O.fire(new i.Event("data",pe))})},z.prototype.onAdd=function(O){this.map=O,this.load()},z.prototype.setData=function(O){var $=this;return this._data=O,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(pe){if(pe){$.fire(new i.ErrorEvent(pe));return}var de={dataType:"source",sourceDataType:"content"};$._collectResourceTiming&&$._resourceTiming&&$._resourceTiming.length>0&&(de.resourceTiming=$._resourceTiming,$._resourceTiming=[]),$.fire(new i.Event("data",de))}),this},z.prototype.getClusterExpansionZoom=function(O,$){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:O,source:this.id},$),this},z.prototype.getClusterChildren=function(O,$){return this.actor.send("geojson.getClusterChildren",{clusterId:O,source:this.id},$),this},z.prototype.getClusterLeaves=function(O,$,pe,de){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:O,limit:$,offset:pe},de),this},z.prototype._updateWorkerData=function(O){var $=this;this._loaded=!1;var pe=i.extend({},this.workerOptions),de=this._data;typeof de=="string"?(pe.request=this.map._requestManager.transformRequest(i.browser.resolveURL(de),i.ResourceType.Source),pe.request.collectResourceTiming=this._collectResourceTiming):pe.data=JSON.stringify(de),this.actor.send(this.type+".loadData",pe,function(Ie,$e){$._removed||$e&&$e.abandoned||($._loaded=!0,$e&&$e.resourceTiming&&$e.resourceTiming[$.id]&&($._resourceTiming=$e.resourceTiming[$.id].slice(0)),$.actor.send($.type+".coalesce",{source:pe.source},null),O(Ie))})},z.prototype.loaded=function(){return this._loaded},z.prototype.loadTile=function(O,$){var pe=this,de=O.actor?"reloadTile":"loadTile";O.actor=this.actor;var Ie={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.request=this.actor.send(de,Ie,function($e,pt){return delete O.request,O.unloadVectorData(),O.aborted?$(null):$e?$($e):(O.loadVectorData(pt,pe.map.painter,de==="reloadTile"),$(null))})},z.prototype.abortTile=function(O){O.request&&(O.request.cancel(),delete O.request),O.aborted=!0},z.prototype.unloadTile=function(O){O.unloadVectorData(),this.actor.send("removeTile",{uid:O.uid,type:this.type,source:this.id})},z.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},z.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},z.prototype.hasTransition=function(){return!1},z}(i.Evented),Me=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),ke=function(Y){function z(K,O,$,pe){Y.call(this),this.id=K,this.dispatcher=$,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(pe),this.options=O}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.load=function(O,$){var pe=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(de,Ie){pe._loaded=!0,de?pe.fire(new i.ErrorEvent(de)):Ie&&(pe.image=Ie,O&&(pe.coordinates=O),$&&$(),pe._finishLoading())})},z.prototype.loaded=function(){return this._loaded},z.prototype.updateImage=function(O){var $=this;return!this.image||!O.url?this:(this.options.url=O.url,this.load(O.coordinates,function(){$.texture=null}),this)},z.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},z.prototype.onAdd=function(O){this.map=O,this.load()},z.prototype.setCoordinates=function(O){var $=this;this.coordinates=O;var pe=O.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(pe),this.minzoom=this.maxzoom=this.tileID.z;var de=pe.map(function(Ie){return $.tileID.getTilePoint(Ie)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(de[0].x,de[0].y,0,0),this._boundsArray.emplaceBack(de[1].x,de[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(de[3].x,de[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(de[2].x,de[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},z.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var O=this.map.painter.context,$=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(O,this.image,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var pe in this.tiles){var de=this.tiles[pe];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},z.prototype.loadTile=function(O,$){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={},$(null)):(O.state="errored",$(null))},z.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},z.prototype.hasTransition=function(){return!1},z}(i.Evented);function ge(Y){for(var z=1/0,K=1/0,O=-1/0,$=-1/0,pe=0,de=Y;pe$.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+$.start(0)+" and "+$.end(0)+"-second mark."))):this.video.currentTime=O}},z.prototype.getVideo=function(){return this.video},z.prototype.onAdd=function(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},z.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var O=this.map.painter.context,$=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE),$.texSubImage2D($.TEXTURE_2D,0,0,0,$.RGBA,$.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(O,this.video,$.RGBA),this.texture.bind($.LINEAR,$.CLAMP_TO_EDGE));for(var pe in this.tiles){var de=this.tiles[pe];de.state!=="loaded"&&(de.state="loaded",de.texture=this.texture)}}},z.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},z.prototype.hasTransition=function(){return this.video&&!this.video.paused},z}(ke),Te=function(Y){function z(K,O,$,pe){Y.call(this,K,O,$,pe),O.coordinates?(!Array.isArray(O.coordinates)||O.coordinates.length!==4||O.coordinates.some(function(de){return!Array.isArray(de)||de.length!==2||de.some(function(Ie){return typeof Ie!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas!="string"&&!(O.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+K,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."+K,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate!==void 0?O.animate:!0}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.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()},z.prototype.getCanvas=function(){return this.canvas},z.prototype.onAdd=function(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()},z.prototype.onRemove=function(){this.pause()},z.prototype.prepare=function(){var O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var $=this.map.painter.context,pe=$.gl;this.boundsBuffer||(this.boundsBuffer=$.createVertexBuffer(this._boundsArray,Me.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture($,this.canvas,pe.RGBA,{premultiply:!0});for(var de in this.tiles){var Ie=this.tiles[de];Ie.state!=="loaded"&&(Ie.state="loaded",Ie.texture=this.texture)}}},z.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},z.prototype.hasTransition=function(){return this._playing},z.prototype._hasInvalidDimensions=function(){for(var O=0,$=[this.canvas.width,this.canvas.height];O<$.length;O+=1){var pe=$[O];if(isNaN(pe)||pe<=0)return!0}return!1},z}(ke),Ee={vector:W,raster:re,"raster-dem":ae,geojson:_e,video:ie,image:ke,canvas:Te},Ae=function(Y,z,K,O){var $=new Ee[z.type](Y,z,K,O);if($.id!==Y)throw new Error("Expected Source id to be "+Y+" instead of "+$.id);return i.bindAll(["load","abort","unload","serialize","prepare"],$),$},ze=function(Y){return Ee[Y]},Ce=function(Y,z){Ee[Y]=z};function me(Y,z){var K=i.identity([]);return i.translate(K,K,[1,1,0]),i.scale(K,K,[Y.width*.5,Y.height*.5,1]),i.multiply(K,K,Y.calculatePosMatrix(z.toUnwrapped()))}function De(Y,z,K){if(Y)for(var O=0,$=Y;O<$.length;O+=1){var pe=$[O],de=z[pe];if(de&&de.source===K&&de.type==="fill-extrusion")return!0}else for(var Ie in z){var $e=z[Ie];if($e.source===K&&$e.type==="fill-extrusion")return!0}return!1}function ce(Y,z,K,O,$,pe){var de=De($&&$.layers,z,Y.id),Ie=pe.maxPitchScaleFactor(),$e=Y.tilesIn(O,Ie,de);$e.sort(ct);for(var pt=[],Kt=0,ir=$e;Ktthis.max){var Ie=this._getAndRemoveByKey(this.order[0]);Ie&&this.onRemove(Ie)}return this},rt.prototype.has=function(z){return z.wrapped().key in this.data},rt.prototype.getAndRemove=function(z){return this.has(z)?this._getAndRemoveByKey(z.wrapped().key):null},rt.prototype._getAndRemoveByKey=function(z){var K=this.data[z].shift();return K.timeout&&clearTimeout(K.timeout),this.data[z].length===0&&delete this.data[z],this.order.splice(this.order.indexOf(z),1),K.value},rt.prototype.getByKey=function(z){var K=this.data[z];return K?K[0].value:null},rt.prototype.get=function(z){if(!this.has(z))return null;var K=this.data[z.wrapped().key][0];return K.value},rt.prototype.remove=function(z,K){if(!this.has(z))return this;var O=z.wrapped().key,$=K===void 0?0:this.data[O].indexOf(K),pe=this.data[O][$];return this.data[O].splice($,1),pe.timeout&&clearTimeout(pe.timeout),this.data[O].length===0&&delete this.data[O],this.onRemove(pe.value),this.order.splice(this.order.indexOf(O),1),this},rt.prototype.setMaxSize=function(z){for(this.max=z;this.order.length>this.max;){var K=this._getAndRemoveByKey(this.order[0]);K&&this.onRemove(K)}return this},rt.prototype.filter=function(z){var K=[];for(var O in this.data)for(var $=0,pe=this.data[O];$1||(Math.abs(ir)>1&&(Math.abs(ir+vt)===1?ir+=vt:Math.abs(ir-vt)===1&&(ir-=vt)),!(!Kt.dem||!pt.dem)&&(pt.dem.backfillBorder(Kt.dem,ir,Jt),pt.neighboringTiles&&pt.neighboringTiles[Pt]&&(pt.neighboringTiles[Pt].backfilled=!0)))}},z.prototype.getTile=function(O){return this.getTileByID(O.key)},z.prototype.getTileByID=function(O){return this._tiles[O]},z.prototype._retainLoadedChildren=function(O,$,pe,de){for(var Ie in this._tiles){var $e=this._tiles[Ie];if(!(de[Ie]||!$e.hasData()||$e.tileID.overscaledZ<=$||$e.tileID.overscaledZ>pe)){for(var pt=$e.tileID;$e&&$e.tileID.overscaledZ>$+1;){var Kt=$e.tileID.scaledTo($e.tileID.overscaledZ-1);$e=this._tiles[Kt.key],$e&&$e.hasData()&&(pt=Kt)}for(var ir=pt;ir.overscaledZ>$;)if(ir=ir.scaledTo(ir.overscaledZ-1),O[ir.key]){de[pt.key]=pt;break}}}},z.prototype.findLoadedParent=function(O,$){if(O.key in this._loadedParentTiles){var pe=this._loadedParentTiles[O.key];return pe&&pe.tileID.overscaledZ>=$?pe:null}for(var de=O.overscaledZ-1;de>=$;de--){var Ie=O.scaledTo(de),$e=this._getLoadedTile(Ie);if($e)return $e}},z.prototype._getLoadedTile=function(O){var $=this._tiles[O.key];if($&&$.hasData())return $;var pe=this._cache.getByKey(O.wrapped().key);return pe},z.prototype.updateCacheSize=function(O){var $=Math.ceil(O.width/this._source.tileSize)+1,pe=Math.ceil(O.height/this._source.tileSize)+1,de=$*pe,Ie=5,$e=Math.floor(de*Ie),pt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,$e):$e;this._cache.setMaxSize(pt)},z.prototype.handleWrapJump=function(O){var $=this._prevLng===void 0?O:this._prevLng,pe=O-$,de=pe/360,Ie=Math.round(de);if(this._prevLng=O,Ie){var $e={};for(var pt in this._tiles){var Kt=this._tiles[pt];Kt.tileID=Kt.tileID.unwrapTo(Kt.tileID.wrap+Ie),$e[Kt.tileID.key]=Kt}this._tiles=$e;for(var ir in this._timers)clearTimeout(this._timers[ir]),delete this._timers[ir];for(var Jt in this._tiles){var vt=this._tiles[Jt];this._setTileReloadTimer(Jt,vt)}}},z.prototype.update=function(O){var $=this;if(this.transform=O,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var pe;this.used?this._source.tileID?pe=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(yi){return new i.OverscaledTileID(yi.canonical.z,yi.wrap,yi.canonical.z,yi.canonical.x,yi.canonical.y)}):(pe=O.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(pe=pe.filter(function(yi){return $._source.hasTile(yi)}))):pe=[];var de=O.coveringZoomLevel(this._source),Ie=Math.max(de-z.maxOverzooming,this._source.minzoom),$e=Math.max(de+z.maxUnderzooming,this._source.minzoom),pt=this._updateRetainedTiles(pe,de);if(gi(this._source.type)){for(var Kt={},ir={},Jt=Object.keys(pt),vt=0,Pt=Jt;vtthis._source.maxzoom){var pr=rr.children(this._source.maxzoom)[0],kr=this.getTile(pr);if(kr&&kr.hasData()){pe[pr.key]=pr;continue}}else{var Ar=rr.children(this._source.maxzoom);if(pe[Ar[0].key]&&pe[Ar[1].key]&&pe[Ar[2].key]&&pe[Ar[3].key])continue}for(var gr=dr.wasRequested(),Cr=rr.overscaledZ-1;Cr>=Ie;--Cr){var cr=rr.scaledTo(Cr);if(de[cr.key]||(de[cr.key]=!0,dr=this.getTile(cr),!dr&&gr&&(dr=this._addTile(cr)),dr&&(pe[cr.key]=cr,gr=dr.wasRequested(),dr.hasData())))break}}}return pe},z.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var O in this._tiles){for(var $=[],pe=void 0,de=this._tiles[O].tileID;de.overscaledZ>0;){if(de.key in this._loadedParentTiles){pe=this._loadedParentTiles[de.key];break}$.push(de.key);var Ie=de.scaledTo(de.overscaledZ-1);if(pe=this._getLoadedTile(Ie),pe)break;de=Ie}for(var $e=0,pt=$;$e0)&&($.hasData()&&$.state!=="reloading"?this._cache.add($.tileID,$,$.getExpiryTimeout()):($.aborted=!0,this._abortTile($),this._unloadTile($))))},z.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var O in this._tiles)this._removeTile(O);this._cache.reset()},z.prototype.tilesIn=function(O,$,pe){var de=this,Ie=[],$e=this.transform;if(!$e)return Ie;for(var pt=pe?$e.getCameraQueryGeometry(O):O,Kt=O.map(function(Cr){return $e.pointCoordinate(Cr)}),ir=pt.map(function(Cr){return $e.pointCoordinate(Cr)}),Jt=this.getIds(),vt=1/0,Pt=1/0,Wt=-1/0,rr=-1/0,dr=0,pr=ir;dr=0&&tn[1].y+yi>=0){var Di=Kt.map(function(Qn){return Gr.getTilePoint(Qn)}),ln=ir.map(function(Qn){return Gr.getTilePoint(Qn)});Ie.push({tile:cr,tileID:Gr,queryGeometry:Di,cameraQueryGeometry:ln,scale:ei})}}},gr=0;gr=i.browser.now())return!0}return!1},z.prototype.setFeatureState=function(O,$,pe){O=O||"_geojsonTileLayer",this._state.updateState(O,$,pe)},z.prototype.removeFeatureState=function(O,$,pe){O=O||"_geojsonTileLayer",this._state.removeFeatureState(O,$,pe)},z.prototype.getFeatureState=function(O,$){return O=O||"_geojsonTileLayer",this._state.getState(O,$)},z.prototype.setDependencies=function(O,$,pe){var de=this._tiles[O];de&&de.setDependencies($,pe)},z.prototype.reloadTilesForDependencies=function(O,$){for(var pe in this._tiles){var de=this._tiles[pe];de.hasDependency(O,$)&&this._reloadTile(pe,"reloading")}this._cache.filter(function(Ie){return!Ie.hasDependency(O,$)})},z}(i.Evented);Zr.maxOverzooming=10,Zr.maxUnderzooming=3;function Vr(Y,z){var K=Math.abs(Y.wrap*2)-+(Y.wrap<0),O=Math.abs(z.wrap*2)-+(z.wrap<0);return Y.overscaledZ-z.overscaledZ||O-K||z.canonical.y-Y.canonical.y||z.canonical.x-Y.canonical.x}function gi(Y){return Y==="raster"||Y==="image"||Y==="video"}function Si(){return new i.window.Worker(ns.workerUrl)}var Mi="mapboxgl_preloaded_worker_pool",Pi=function(){this.active={}};Pi.prototype.acquire=function(z){if(!this.workers)for(this.workers=[];this.workers.length0?($-de)/Ie:0;return this.points[pe].mult(1-$e).add(this.points[K].mult($e))};var hi=function(z,K,O){var $=this.boxCells=[],pe=this.circleCells=[];this.xCellCount=Math.ceil(z/O),this.yCellCount=Math.ceil(K/O);for(var de=0;dethis.width||$<0||K>this.height)return pe?!1:[];var Ie=[];if(z<=0&&K<=0&&this.width<=O&&this.height<=$){if(pe)return!0;for(var $e=0;$e0:Ie}},hi.prototype._queryCircle=function(z,K,O,$,pe){var de=z-O,Ie=z+O,$e=K-O,pt=K+O;if(Ie<0||de>this.width||pt<0||$e>this.height)return $?!1:[];var Kt=[],ir={hitTest:$,circle:{x:z,y:K,radius:O},seenUids:{box:{},circle:{}}};return this._forEachCell(de,$e,Ie,pt,this._queryCellCircle,Kt,ir,pe),$?Kt.length>0:Kt},hi.prototype.query=function(z,K,O,$,pe){return this._query(z,K,O,$,!1,pe)},hi.prototype.hitTest=function(z,K,O,$,pe){return this._query(z,K,O,$,!0,pe)},hi.prototype.hitTestCircle=function(z,K,O,$){return this._queryCircle(z,K,O,!0,$)},hi.prototype._queryCell=function(z,K,O,$,pe,de,Ie,$e){var pt=Ie.seenUids,Kt=this.boxCells[pe];if(Kt!==null)for(var ir=this.bboxes,Jt=0,vt=Kt;Jt=ir[Wt+0]&&$>=ir[Wt+1]&&(!$e||$e(this.boxKeys[Pt]))){if(Ie.hitTest)return de.push(!0),!0;de.push({key:this.boxKeys[Pt],x1:ir[Wt],y1:ir[Wt+1],x2:ir[Wt+2],y2:ir[Wt+3]})}}}var rr=this.circleCells[pe];if(rr!==null)for(var dr=this.circles,pr=0,kr=rr;prIe*Ie+$e*$e},hi.prototype._circleAndRectCollide=function(z,K,O,$,pe,de,Ie){var $e=(de-$)/2,pt=Math.abs(z-($+$e));if(pt>$e+O)return!1;var Kt=(Ie-pe)/2,ir=Math.abs(K-(pe+Kt));if(ir>Kt+O)return!1;if(pt<=$e||ir<=Kt)return!0;var Jt=pt-$e,vt=ir-Kt;return Jt*Jt+vt*vt<=O*O};function Ji(Y,z,K,O,$){var pe=i.create();return z?(i.scale(pe,pe,[1/$,1/$,1]),K||i.rotateZ(pe,pe,O.angle)):i.multiply(pe,O.labelPlaneMatrix,Y),pe}function ua(Y,z,K,O,$){if(z){var pe=i.clone(Y);return i.scale(pe,pe,[$,$,1]),K||i.rotateZ(pe,pe,-O.angle),pe}else return O.glCoordMatrix}function Fn(Y,z){var K=[Y.x,Y.y,0,1];wl(K,K,z);var O=K[3];return{point:new i.Point(K[0]/O,K[1]/O),signedDistanceFromCamera:O}}function Sa(Y,z){return .5+.5*(Y/z)}function go(Y,z){var K=Y[0]/Y[3],O=Y[1]/Y[3],$=K>=-z[0]&&K<=z[0]&&O>=-z[1]&&O<=z[1];return $}function Oo(Y,z,K,O,$,pe,de,Ie){var $e=O?Y.textSizeData:Y.iconSizeData,pt=i.evaluateSizeForZoom($e,K.transform.zoom),Kt=[256/K.width*2+1,256/K.height*2+1],ir=O?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;ir.clear();for(var Jt=Y.lineVertexArray,vt=O?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Pt=K.transform.width/K.transform.height,Wt=!1,rr=0;rrpe)return{useVertical:!0}}return(Y===i.WritingMode.vertical?z.yK.x)?{needsFlipping:!0}:null}function xo(Y,z,K,O,$,pe,de,Ie,$e,pt,Kt,ir,Jt,vt){var Pt=z/24,Wt=Y.lineOffsetX*Pt,rr=Y.lineOffsetY*Pt,dr;if(Y.numGlyphs>1){var pr=Y.glyphStartIndex+Y.numGlyphs,kr=Y.lineStartIndex,Ar=Y.lineStartIndex+Y.lineLength,gr=ho(Pt,Ie,Wt,rr,K,Kt,ir,Y,$e,pe,Jt);if(!gr)return{notEnoughRoom:!0};var Cr=Fn(gr.first.point,de).point,cr=Fn(gr.last.point,de).point;if(O&&!K){var Gr=Mo(Y.writingMode,Cr,cr,vt);if(Gr)return Gr}dr=[gr.first];for(var ei=Y.glyphStartIndex+1;ei0?ln.point:zs(ir,Di,yi,1,$),qn=Mo(Y.writingMode,yi,Qn,vt);if(qn)return qn}var rn=ks(Pt*Ie.getoffsetX(Y.glyphStartIndex),Wt,rr,K,Kt,ir,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,$e,pe,Jt);if(!rn)return{notEnoughRoom:!0};dr=[rn]}for(var bn=0,mn=dr;bn0?1:-1,Pt=0;O&&(vt*=-1,Pt=Math.PI),vt<0&&(Pt+=Math.PI);for(var Wt=vt>0?Ie+de:Ie+de+1,rr=$,dr=$,pr=0,kr=0,Ar=Math.abs(Jt),gr=[];pr+kr<=Ar;){if(Wt+=vt,Wt=$e)return null;if(dr=rr,gr.push(rr),rr=ir[Wt],rr===void 0){var Cr=new i.Point(pt.getx(Wt),pt.gety(Wt)),cr=Fn(Cr,Kt);if(cr.signedDistanceFromCamera>0)rr=ir[Wt]=cr.point;else{var Gr=Wt-vt,ei=pr===0?pe:new i.Point(pt.getx(Gr),pt.gety(Gr));rr=zs(ei,Cr,dr,Ar-pr+1,Kt)}}pr+=kr,kr=dr.dist(rr)}var yi=(Ar-pr)/kr,tn=rr.sub(dr),Di=tn.mult(yi)._add(dr);Di._add(tn._unit()._perp()._mult(K*vt));var ln=Pt+Math.atan2(rr.y-dr.y,rr.x-dr.x);return gr.push(Di),{point:Di,angle:ln,path:gr}}var Zs=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Xs(Y,z){for(var K=0;K=1;Gn--)mn.push(rn.path[Gn]);for(var da=1;da0){for(var fo=mn[0].clone(),as=mn[0].clone(),tl=1;tl=ln.x&&as.x<=Qn.x&&fo.y>=ln.y&&as.y<=Qn.y?ps=[mn]:as.xQn.x||as.yQn.y?ps=[]:ps=i.clipLine([mn],ln.x,ln.y,Qn.x,Qn.y)}for(var zu=0,Mv=ps;zu=this.screenRightBoundary||$this.screenBottomBoundary},cl.prototype.isInsideGrid=function(z,K,O,$){return O>=0&&z=0&&K0){var Ar;return this.prevPlacement&&this.prevPlacement.variableOffsets[Jt.crossTileID]&&this.prevPlacement.placements[Jt.crossTileID]&&this.prevPlacement.placements[Jt.crossTileID].text&&(Ar=this.prevPlacement.variableOffsets[Jt.crossTileID].anchor),this.variableOffsets[Jt.crossTileID]={textOffset:rr,width:O,height:$,anchor:z,textBoxScale:pe,prevAnchor:Ar},this.markUsedJustification(vt,z,Jt,Pt),vt.allowVerticalPlacement&&(this.markUsedOrientation(vt,Pt,Jt),this.placedOrientations[Jt.crossTileID]=Pt),{shift:dr,placedGlyphBoxes:pr}}},ms.prototype.placeLayerBucketPart=function(z,K,O){var $=this,pe=z.parameters,de=pe.bucket,Ie=pe.layout,$e=pe.posMatrix,pt=pe.textLabelPlaneMatrix,Kt=pe.labelToScreenMatrix,ir=pe.textPixelRatio,Jt=pe.holdingForFade,vt=pe.collisionBoxArray,Pt=pe.partiallyEvaluatedTextSize,Wt=pe.collisionGroup,rr=Ie.get("text-optional"),dr=Ie.get("icon-optional"),pr=Ie.get("text-allow-overlap"),kr=Ie.get("icon-allow-overlap"),Ar=Ie.get("text-rotation-alignment")==="map",gr=Ie.get("text-pitch-alignment")==="map",Cr=Ie.get("icon-text-fit")!=="none",cr=Ie.get("symbol-z-order")==="viewport-y",Gr=pr&&(kr||!de.hasIconData()||dr),ei=kr&&(pr||!de.hasTextData()||rr);!de.collisionArrays&&vt&&de.deserializeCollisionBoxes(vt);var yi=function(rn,bn){if(!K[rn.crossTileID]){if(Jt){$.placements[rn.crossTileID]=new Hs(!1,!1,!1);return}var mn=!1,Gn=!1,da=!0,No=null,Ro={box:null,offscreen:null},ps={box:null,offscreen:null},fo=null,as=null,tl=null,zu=0,Mv=0,Ev=0;bn.textFeatureIndex?zu=bn.textFeatureIndex:rn.useRuntimeCollisionCircles&&(zu=rn.featureIndex),bn.verticalTextFeatureIndex&&(Mv=bn.verticalTextFeatureIndex);var yd=bn.textBox;if(yd){var Yv=function(Fu){var kl=i.WritingMode.horizontal;if(de.allowVerticalPlacement&&!Fu&&$.prevPlacement){var bd=$.prevPlacement.placedOrientations[rn.crossTileID];bd&&($.placedOrientations[rn.crossTileID]=bd,kl=bd,$.markUsedOrientation(de,kl,rn))}return kl},cg=function(Fu,kl){if(de.allowVerticalPlacement&&rn.numVerticalGlyphVertices>0&&bn.verticalTextBox)for(var bd=0,sy=de.writingModes;bd0&&(Nd=Nd.filter(function(Fu){return Fu!==xd.anchor}),Nd.unshift(xd.anchor))}var kv=function(Fu,kl,bd){for(var sy=Fu.x2-Fu.x1,A1=Fu.y2-Fu.y1,Yl=rn.textBoxScale,Bx=Cr&&!kr?kl:null,am={box:[],offscreen:!1},Mw=pr?Nd.length*2:Nd.length,Lv=0;Lv=Nd.length,Nx=$.attemptAnchorPlacement(om,Fu,sy,A1,Yl,Ar,gr,ir,$e,Wt,Ew,rn,de,bd,Bx);if(Nx&&(am=Nx.placedGlyphBoxes,am&&am.box&&am.box.length)){mn=!0,No=Nx.shift;break}}return am},Kv=function(){return kv(yd,bn.iconBox,i.WritingMode.horizontal)},Cv=function(){var Fu=bn.verticalTextBox,kl=Ro&&Ro.box&&Ro.box.length;return de.allowVerticalPlacement&&!kl&&rn.numVerticalGlyphVertices>0&&Fu?kv(Fu,bn.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};cg(Kv,Cv),Ro&&(mn=Ro.box,da=Ro.offscreen);var ny=Yv(Ro&&Ro.box);if(!mn&&$.prevPlacement){var fg=$.prevPlacement.variableOffsets[rn.crossTileID];fg&&($.variableOffsets[rn.crossTileID]=fg,$.markUsedJustification(de,fg.anchor,rn,ny))}}else{var vp=function(Fu,kl){var bd=$.collisionIndex.placeCollisionBox(Fu,pr,ir,$e,Wt.predicate);return bd&&bd.box&&bd.box.length&&($.markUsedOrientation(de,kl,rn),$.placedOrientations[rn.crossTileID]=kl),bd},_d=function(){return vp(yd,i.WritingMode.horizontal)},pp=function(){var Fu=bn.verticalTextBox;return de.allowVerticalPlacement&&rn.numVerticalGlyphVertices>0&&Fu?vp(Fu,i.WritingMode.vertical):{box:null,offscreen:null}};cg(_d,pp),Yv(Ro&&Ro.box&&Ro.box.length)}}if(fo=Ro,mn=fo&&fo.box&&fo.box.length>0,da=fo&&fo.offscreen,rn.useRuntimeCollisionCircles){var Hf=de.text.placedSymbolArray.get(rn.centerJustifiedTextSymbolIndex),hg=i.evaluateSizeForFeature(de.textSizeData,Pt,Hf),ay=Ie.get("text-padding"),Dh=rn.collisionCircleDiameter;as=$.collisionIndex.placeCollisionCircles(pr,Hf,de.lineVertexArray,de.glyphOffsetArray,hg,$e,pt,Kt,O,gr,Wt.predicate,Dh,ay),mn=pr||as.circles.length>0&&!as.collisionDetected,da=da&&as.offscreen}if(bn.iconFeatureIndex&&(Ev=bn.iconFeatureIndex),bn.iconBox){var rm=function(Fu){var kl=Cr&&No?fc(Fu,No.x,No.y,Ar,gr,$.transform.angle):Fu;return $.collisionIndex.placeCollisionBox(kl,kr,ir,$e,Wt.predicate)};ps&&ps.box&&ps.box.length&&bn.verticalIconBox?(tl=rm(bn.verticalIconBox),Gn=tl.box.length>0):(tl=rm(bn.iconBox),Gn=tl.box.length>0),da=da&&tl.offscreen}var w1=rr||rn.numHorizontalGlyphVertices===0&&rn.numVerticalGlyphVertices===0,T1=dr||rn.numIconVertices===0;if(!w1&&!T1?Gn=mn=Gn&&mn:T1?w1||(Gn=Gn&&mn):mn=Gn&&mn,mn&&fo&&fo.box&&(ps&&ps.box&&Mv?$.collisionIndex.insertCollisionBox(fo.box,Ie.get("text-ignore-placement"),de.bucketInstanceId,Mv,Wt.ID):$.collisionIndex.insertCollisionBox(fo.box,Ie.get("text-ignore-placement"),de.bucketInstanceId,zu,Wt.ID)),Gn&&tl&&$.collisionIndex.insertCollisionBox(tl.box,Ie.get("icon-ignore-placement"),de.bucketInstanceId,Ev,Wt.ID),as&&(mn&&$.collisionIndex.insertCollisionCircles(as.circles,Ie.get("text-ignore-placement"),de.bucketInstanceId,zu,Wt.ID),O)){var oy=de.bucketInstanceId,im=$.collisionCircleArrays[oy];im===void 0&&(im=$.collisionCircleArrays[oy]=new Eo);for(var nm=0;nm=0;--Di){var ln=tn[Di];yi(de.symbolInstances.get(ln),de.collisionArrays[ln])}else for(var Qn=z.symbolInstanceStart;Qn=0&&(de>=0&&Kt!==de?z.text.placedSymbolArray.get(Kt).crossTileID=0:z.text.placedSymbolArray.get(Kt).crossTileID=O.crossTileID)}},ms.prototype.markUsedOrientation=function(z,K,O){for(var $=K===i.WritingMode.horizontal||K===i.WritingMode.horizontalOnly?K:0,pe=K===i.WritingMode.vertical?K:0,de=[O.leftJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.rightJustifiedTextSymbolIndex],Ie=0,$e=de;Ie<$e.length;Ie+=1){var pt=$e[Ie];z.text.placedSymbolArray.get(pt).placedOrientation=$}O.verticalPlacedTextSymbolIndex&&(z.text.placedSymbolArray.get(O.verticalPlacedTextSymbolIndex).placedOrientation=pe)},ms.prototype.commit=function(z){this.commitTime=z,this.zoomAtLastRecencyCheck=this.transform.zoom;var K=this.prevPlacement,O=!1;this.prevZoomAdjustment=K?K.zoomAdjustment(this.transform.zoom):0;var $=K?K.symbolFadeChange(z):1,pe=K?K.opacities:{},de=K?K.variableOffsets:{},Ie=K?K.placedOrientations:{};for(var $e in this.placements){var pt=this.placements[$e],Kt=pe[$e];Kt?(this.opacities[$e]=new Ys(Kt,$,pt.text,pt.icon),O=O||pt.text!==Kt.text.placed||pt.icon!==Kt.icon.placed):(this.opacities[$e]=new Ys(null,$,pt.text,pt.icon,pt.skipFade),O=O||pt.text||pt.icon)}for(var ir in pe){var Jt=pe[ir];if(!this.opacities[ir]){var vt=new Ys(Jt,$,!1,!1);vt.isHidden()||(this.opacities[ir]=vt,O=O||Jt.text.placed||Jt.icon.placed)}}for(var Pt in de)!this.variableOffsets[Pt]&&this.opacities[Pt]&&!this.opacities[Pt].isHidden()&&(this.variableOffsets[Pt]=de[Pt]);for(var Wt in Ie)!this.placedOrientations[Wt]&&this.opacities[Wt]&&!this.opacities[Wt].isHidden()&&(this.placedOrientations[Wt]=Ie[Wt]);O?this.lastPlacementChangeTime=z:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=K?K.lastPlacementChangeTime:z)},ms.prototype.updateLayerOpacities=function(z,K){for(var O={},$=0,pe=K;$0||gr>0,yi=kr.numIconVertices>0,tn=$.placedOrientations[kr.crossTileID],Di=tn===i.WritingMode.vertical,ln=tn===i.WritingMode.horizontal||tn===i.WritingMode.horizontalOnly;if(ei){var Qn=Ec(Gr.text),qn=Di?Zn:Qn;Pt(z.text,Ar,qn);var rn=ln?Zn:Qn;Pt(z.text,gr,rn);var bn=Gr.text.isHidden();[kr.rightJustifiedTextSymbolIndex,kr.centerJustifiedTextSymbolIndex,kr.leftJustifiedTextSymbolIndex].forEach(function(Ev){Ev>=0&&(z.text.placedSymbolArray.get(Ev).hidden=bn||Di?1:0)}),kr.verticalPlacedTextSymbolIndex>=0&&(z.text.placedSymbolArray.get(kr.verticalPlacedTextSymbolIndex).hidden=bn||ln?1:0);var mn=$.variableOffsets[kr.crossTileID];mn&&$.markUsedJustification(z,mn.anchor,kr,tn);var Gn=$.placedOrientations[kr.crossTileID];Gn&&($.markUsedJustification(z,"left",kr,Gn),$.markUsedOrientation(z,Gn,kr))}if(yi){var da=Ec(Gr.icon),No=!(Jt&&kr.verticalPlacedIconSymbolIndex&&Di);if(kr.placedIconSymbolIndex>=0){var Ro=No?da:Zn;Pt(z.icon,kr.numIconVertices,Ro),z.icon.placedSymbolArray.get(kr.placedIconSymbolIndex).hidden=Gr.icon.isHidden()}if(kr.verticalPlacedIconSymbolIndex>=0){var ps=No?Zn:da;Pt(z.icon,kr.numVerticalIconVertices,ps),z.icon.placedSymbolArray.get(kr.verticalPlacedIconSymbolIndex).hidden=Gr.icon.isHidden()}}if(z.hasIconCollisionBoxData()||z.hasTextCollisionBoxData()){var fo=z.collisionArrays[pr];if(fo){var as=new i.Point(0,0);if(fo.textBox||fo.verticalTextBox){var tl=!0;if(pt){var zu=$.variableOffsets[Cr];zu?(as=Gu(zu.anchor,zu.width,zu.height,zu.textOffset,zu.textBoxScale),Kt&&as._rotate(ir?$.transform.angle:-$.transform.angle)):tl=!1}fo.textBox&&on(z.textCollisionBox.collisionVertexArray,Gr.text.placed,!tl||Di,as.x,as.y),fo.verticalTextBox&&on(z.textCollisionBox.collisionVertexArray,Gr.text.placed,!tl||ln,as.x,as.y)}var Mv=!!(!ln&&fo.verticalIconBox);fo.iconBox&&on(z.iconCollisionBox.collisionVertexArray,Gr.icon.placed,Mv,Jt?as.x:0,Jt?as.y:0),fo.verticalIconBox&&on(z.iconCollisionBox.collisionVertexArray,Gr.icon.placed,!Mv,Jt?as.x:0,Jt?as.y:0)}}},rr=0;rrz},ms.prototype.setStale=function(){this.stale=!0};function on(Y,z,K,O,$){Y.emplaceBack(z?1:0,K?1:0,O||0,$||0),Y.emplaceBack(z?1:0,K?1:0,O||0,$||0),Y.emplaceBack(z?1:0,K?1:0,O||0,$||0),Y.emplaceBack(z?1:0,K?1:0,O||0,$||0)}var fa=Math.pow(2,25),Qu=Math.pow(2,24),Il=Math.pow(2,17),vo=Math.pow(2,16),Wl=Math.pow(2,9),Ks=Math.pow(2,8),Zl=Math.pow(2,1);function Ec(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var z=Y.placed?1:0,K=Math.floor(Y.opacity*127);return K*fa+z*Qu+K*Il+z*vo+K*Wl+z*Ks+K*Zl+z}var Zn=0,ko=function(z){this._sortAcrossTiles=z.layout.get("symbol-z-order")!=="viewport-y"&&z.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};ko.prototype.continuePlacement=function(z,K,O,$,pe){for(var de=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var Ie=z[this._currentPlacementIndex],$e=K[Ie],pt=this.placement.collisionIndex.transform.zoom;if($e.type==="symbol"&&(!$e.minzoom||$e.minzoom<=pt)&&(!$e.maxzoom||$e.maxzoom>pt)){this._inProgressLayer||(this._inProgressLayer=new ko($e));var Kt=this._inProgressLayer.continuePlacement(O[$e.source],this.placement,this._showCollisionBoxes,$e,de);if(Kt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Co.prototype.commit=function(z){return this.placement.commit(z),this.placement};var Tl=512/i.EXTENT/2,uf=function(z,K,O){this.tileID=z,this.indexedSymbolInstances={},this.bucketInstanceId=O;for(var $=0;$z.overscaledZ)for(var pt in $e){var Kt=$e[pt];Kt.tileID.isChildOf(z)&&Kt.findMatches(K.symbolInstances,z,de)}else{var ir=z.scaledTo(Number(Ie)),Jt=$e[ir.key];Jt&&Jt.findMatches(K.symbolInstances,z,de)}}for(var vt=0;vt0)throw new Error("Unimplemented: "+de.map(function(Ie){return Ie.command}).join(", ")+".");return pe.forEach(function(Ie){Ie.command!=="setTransition"&&$[Ie.command].apply($,Ie.args)}),this.stylesheet=O,!0},z.prototype.addImage=function(O,$){if(this.getImage(O))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(O,$),this._afterImageUpdated(O)},z.prototype.updateImage=function(O,$){this.imageManager.updateImage(O,$)},z.prototype.getImage=function(O){return this.imageManager.getImage(O)},z.prototype.removeImage=function(O){if(!this.getImage(O))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(O),this._afterImageUpdated(O)},z.prototype._afterImageUpdated=function(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},z.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},z.prototype.addSource=function(O,$,pe){var de=this;if(pe===void 0&&(pe={}),this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error("There is already a source with this ID");if(!$.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys($).join(", ")+".");var Ie=["vector","raster","geojson","video","image"],$e=Ie.indexOf($.type)>=0;if(!($e&&this._validate(i.validateStyle.source,"sources."+O,$,null,pe))){this.map&&this.map._collectResourceTiming&&($.collectResourceTiming=!0);var pt=this.sourceCaches[O]=new Zr(O,$,this.dispatcher);pt.style=this,pt.setEventedParent(this,function(){return{isSourceLoaded:de.loaded(),source:pt.serialize(),sourceId:O}}),pt.onAdd(this.map),this._changed=!0}},z.prototype.removeSource=function(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(var $ in this._layers)if(this._layers[$].source===O)return this.fire(new i.ErrorEvent(new Error('Source "'+O+'" cannot be removed while layer "'+$+'" is using it.')));var pe=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],pe.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),pe.setEventedParent(null),pe.clearTiles(),pe.onRemove&&pe.onRemove(this.map),this._changed=!0},z.prototype.setGeoJSONSourceData=function(O,$){this._checkLoaded();var pe=this.sourceCaches[O].getSource();pe.setData($),this._changed=!0},z.prototype.getSource=function(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()},z.prototype.addLayer=function(O,$,pe){pe===void 0&&(pe={}),this._checkLoaded();var de=O.id;if(this.getLayer(de)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+de+'" already exists on this map')));return}var Ie;if(O.type==="custom"){if(Al(this,i.validateCustomStyleLayer(O)))return;Ie=i.createStyleLayer(O)}else{if(typeof O.source=="object"&&(this.addSource(de,O.source),O=i.clone$1(O),O=i.extend(O,{source:de})),this._validate(i.validateStyle.layer,"layers."+de,O,{arrayIndex:-1},pe))return;Ie=i.createStyleLayer(O),this._validateLayer(Ie),Ie.setEventedParent(this,{layer:{id:de}}),this._serializedLayers[Ie.id]=Ie.serialize()}var $e=$?this._order.indexOf($):this._order.length;if($&&$e===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}if(this._order.splice($e,0,de),this._layerOrderChanged=!0,this._layers[de]=Ie,this._removedLayers[de]&&Ie.source&&Ie.type!=="custom"){var pt=this._removedLayers[de];delete this._removedLayers[de],pt.type!==Ie.type?this._updatedSources[Ie.source]="clear":(this._updatedSources[Ie.source]="reload",this.sourceCaches[Ie.source].pause())}this._updateLayer(Ie),Ie.onAdd&&Ie.onAdd(this.map)},z.prototype.moveLayer=function(O,$){this._checkLoaded(),this._changed=!0;var pe=this._layers[O];if(!pe){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be moved.")));return}if(O!==$){var de=this._order.indexOf(O);this._order.splice(de,1);var Ie=$?this._order.indexOf($):this._order.length;if($&&Ie===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+$+'" does not exist on this map.')));return}this._order.splice(Ie,0,O),this._layerOrderChanged=!0}},z.prototype.removeLayer=function(O){this._checkLoaded();var $=this._layers[O];if(!$){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be removed.")));return}$.setEventedParent(null);var pe=this._order.indexOf(O);this._order.splice(pe,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=$,delete this._layers[O],delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],$.onRemove&&$.onRemove(this.map)},z.prototype.getLayer=function(O){return this._layers[O]},z.prototype.hasLayer=function(O){return O in this._layers},z.prototype.setLayerZoomRange=function(O,$,pe){this._checkLoaded();var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot have zoom extent.")));return}de.minzoom===$&&de.maxzoom===pe||($!=null&&(de.minzoom=$),pe!=null&&(de.maxzoom=pe),this._updateLayer(de))},z.prototype.setFilter=function(O,$,pe){pe===void 0&&(pe={}),this._checkLoaded();var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(de.filter,$)){if($==null){de.filter=void 0,this._updateLayer(de);return}this._validate(i.validateStyle.filter,"layers."+de.id+".filter",$,null,pe)||(de.filter=i.clone$1($),this._updateLayer(de))}},z.prototype.getFilter=function(O){return i.clone$1(this.getLayer(O).filter)},z.prototype.setLayoutProperty=function(O,$,pe,de){de===void 0&&(de={}),this._checkLoaded();var Ie=this.getLayer(O);if(!Ie){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(Ie.getLayoutProperty($),pe)||(Ie.setLayoutProperty($,pe,de),this._updateLayer(Ie))},z.prototype.getLayoutProperty=function(O,$){var pe=this.getLayer(O);if(!pe){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style.")));return}return pe.getLayoutProperty($)},z.prototype.setPaintProperty=function(O,$,pe,de){de===void 0&&(de={}),this._checkLoaded();var Ie=this.getLayer(O);if(!Ie){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(Ie.getPaintProperty($),pe)){var $e=Ie.setPaintProperty($,pe,de);$e&&this._updateLayer(Ie),this._changed=!0,this._updatedPaintProps[O]=!0}},z.prototype.getPaintProperty=function(O,$){return this.getLayer(O).getPaintProperty($)},z.prototype.setFeatureState=function(O,$){this._checkLoaded();var pe=O.source,de=O.sourceLayer,Ie=this.sourceCaches[pe];if(Ie===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")));return}var $e=Ie.getSource().type;if($e==="geojson"&&de){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if($e==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Ie.setFeatureState(de,O.id,$)},z.prototype.removeFeatureState=function(O,$){this._checkLoaded();var pe=O.source,de=this.sourceCaches[pe];if(de===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")));return}var Ie=de.getSource().type,$e=Ie==="vector"?O.sourceLayer:void 0;if(Ie==="vector"&&!$e){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if($&&typeof O.id!="string"&&typeof O.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}de.removeFeatureState($e,O.id,$)},z.prototype.getFeatureState=function(O){this._checkLoaded();var $=O.source,pe=O.sourceLayer,de=this.sourceCaches[$];if(de===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+$+"' does not exist in the map's style.")));return}var Ie=de.getSource().type;if(Ie==="vector"&&!pe){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),de.getFeatureState(pe,O.id)},z.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},z.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(O){return O.serialize()}),layers:this._serializeLayers(this._order)},function(O){return O!==void 0})},z.prototype._updateLayer=function(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._changed=!0},z.prototype._flattenAndSortRenderedFeatures=function(O){for(var $=this,pe=function(ln){return $._layers[ln].type==="fill-extrusion"},de={},Ie=[],$e=this._order.length-1;$e>=0;$e--){var pt=this._order[$e];if(pe(pt)){de[pt]=$e;for(var Kt=0,ir=O;Kt=0;pr--){var kr=this._order[pr];if(pe(kr))for(var Ar=Ie.length-1;Ar>=0;Ar--){var gr=Ie[Ar].feature;if(de[gr.layer.id]>16,Ie>>16],u_pixel_coord_lower:[de&65535,Ie&65535]}}function pf(Y,z,K,O){var $=K.imageManager.getPattern(Y.from.toString()),pe=K.imageManager.getPattern(Y.to.toString()),de=K.imageManager.getPixelSize(),Ie=de.width,$e=de.height,pt=Math.pow(2,O.tileID.overscaledZ),Kt=O.tileSize*Math.pow(2,K.transform.tileZoom)/pt,ir=Kt*(O.tileID.canonical.x+O.tileID.wrap*pt),Jt=Kt*O.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:$.tl,u_pattern_br_a:$.br,u_pattern_tl_b:pe.tl,u_pattern_br_b:pe.br,u_texsize:[Ie,$e],u_mix:z.t,u_pattern_size_a:$.displaySize,u_pattern_size_b:pe.displaySize,u_scale_a:z.fromScale,u_scale_b:z.toScale,u_tile_units_to_pixels:1/Cs(O,1,K.transform.tileZoom),u_pixel_coord_upper:[ir>>16,Jt>>16],u_pixel_coord_lower:[ir&65535,Jt&65535]}}var Ph=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_lightpos:new i.Uniform3f(Y,z.u_lightpos),u_lightintensity:new i.Uniform1f(Y,z.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,z.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,z.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,z.u_opacity)}},Dl=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_lightpos:new i.Uniform3f(Y,z.u_lightpos),u_lightintensity:new i.Uniform1f(Y,z.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,z.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,z.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,z.u_height_factor),u_image:new i.Uniform1i(Y,z.u_image),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade),u_opacity:new i.Uniform1f(Y,z.u_opacity)}},Ih=function(Y,z,K,O){var $=z.style.light,pe=$.properties.get("position"),de=[pe.x,pe.y,pe.z],Ie=i.create$1();$.properties.get("anchor")==="viewport"&&i.fromRotation(Ie,-z.transform.angle),i.transformMat3(de,de,Ie);var $e=$.properties.get("color");return{u_matrix:Y,u_lightpos:de,u_lightintensity:$.properties.get("intensity"),u_lightcolor:[$e.r,$e.g,$e.b],u_vertical_gradient:+K,u_opacity:O}},Zu=function(Y,z,K,O,$,pe,de){return i.extend(Ih(Y,z,K,O),pc(pe,z,de),{u_height_factor:-Math.pow(2,$.overscaledZ)/de.tileSize/8})},Dc=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},gc=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_image:new i.Uniform1i(Y,z.u_image),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade)}},hl=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_world:new i.Uniform2f(Y,z.u_world)}},ru=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_world:new i.Uniform2f(Y,z.u_world),u_image:new i.Uniform1i(Y,z.u_image),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade)}},mc=function(Y){return{u_matrix:Y}},Yc=function(Y,z,K,O){return i.extend(mc(Y),pc(K,z,O))},nc=function(Y,z){return{u_matrix:Y,u_world:z}},gf=function(Y,z,K,O,$){return i.extend(Yc(Y,z,K,O),{u_world:$})},gt=function(Y,z){return{u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,z.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,z.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},Bt=function(Y,z,K,O){var $=Y.transform,pe,de;if(O.paint.get("circle-pitch-alignment")==="map"){var Ie=Cs(K,1,$.zoom);pe=!0,de=[Ie,Ie]}else pe=!1,de=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(z.posMatrix,K,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+pe,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:de}},wr=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,z.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,z.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,z.u_overscale_factor)}},vr=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,z.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,z.u_viewport_size)}},Ur=function(Y,z,K){var O=Cs(K,1,z.zoom),$=Math.pow(2,z.zoom-K.tileID.overscaledZ),pe=K.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:z.cameraToCenterDistance,u_pixels_to_tile_units:O,u_extrude_scale:[z.pixelsToGLUnits[0]/(O*$),z.pixelsToGLUnits[1]/(O*$)],u_overscale_factor:pe}},fi=function(Y,z,K){return{u_matrix:Y,u_inv_matrix:z,u_camera_to_center_distance:K.cameraToCenterDistance,u_viewport_size:[K.width,K.height]}},xi=function(Y,z){return{u_color:new i.UniformColor(Y,z.u_color),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_overlay:new i.Uniform1i(Y,z.u_overlay),u_overlay_scale:new i.Uniform1f(Y,z.u_overlay_scale)}},Fi=function(Y,z,K){return K===void 0&&(K=1),{u_matrix:Y,u_color:z,u_overlay:0,u_overlay_scale:K}},Xi=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},hn=function(Y){return{u_matrix:Y}},Ti=function(Y,z){return{u_extrude_scale:new i.Uniform1f(Y,z.u_extrude_scale),u_intensity:new i.Uniform1f(Y,z.u_intensity),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},qi=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_world:new i.Uniform2f(Y,z.u_world),u_image:new i.Uniform1i(Y,z.u_image),u_color_ramp:new i.Uniform1i(Y,z.u_color_ramp),u_opacity:new i.Uniform1f(Y,z.u_opacity)}},Ii=function(Y,z,K,O){return{u_matrix:Y,u_extrude_scale:Cs(z,1,K),u_intensity:O}},mi=function(Y,z,K,O){var $=i.create();i.ortho($,0,Y.width,Y.height,0,0,1);var pe=Y.context.gl;return{u_matrix:$,u_world:[pe.drawingBufferWidth,pe.drawingBufferHeight],u_image:K,u_color_ramp:O,u_opacity:z.paint.get("heatmap-opacity")}},Pn=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_image:new i.Uniform1i(Y,z.u_image),u_latrange:new i.Uniform2f(Y,z.u_latrange),u_light:new i.Uniform2f(Y,z.u_light),u_shadow:new i.UniformColor(Y,z.u_shadow),u_highlight:new i.UniformColor(Y,z.u_highlight),u_accent:new i.UniformColor(Y,z.u_accent)}},Ma=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_image:new i.Uniform1i(Y,z.u_image),u_dimension:new i.Uniform2f(Y,z.u_dimension),u_zoom:new i.Uniform1f(Y,z.u_zoom),u_unpack:new i.Uniform4f(Y,z.u_unpack)}},Ta=function(Y,z,K){var O=K.paint.get("hillshade-shadow-color"),$=K.paint.get("hillshade-highlight-color"),pe=K.paint.get("hillshade-accent-color"),de=K.paint.get("hillshade-illumination-direction")*(Math.PI/180);K.paint.get("hillshade-illumination-anchor")==="viewport"&&(de-=Y.transform.angle);var Ie=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(z.tileID.toUnwrapped(),Ie),u_image:0,u_latrange:qa(Y,z.tileID),u_light:[K.paint.get("hillshade-exaggeration"),de],u_shadow:O,u_highlight:$,u_accent:pe}},Ea=function(Y,z){var K=z.stride,O=i.create();return i.ortho(O,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(O,O,[0,-i.EXTENT,0]),{u_matrix:O,u_image:1,u_dimension:[K,K],u_zoom:Y.overscaledZ,u_unpack:z.getUnpackVector()}};function qa(Y,z){var K=Math.pow(2,z.canonical.z),O=z.canonical.y;return[new i.MercatorCoordinate(0,O/K).toLngLat().lat,new i.MercatorCoordinate(0,(O+1)/K).toLngLat().lat]}var Cn=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels)}},sn=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels),u_image:new i.Uniform1i(Y,z.u_image),u_image_height:new i.Uniform1f(Y,z.u_image_height)}},Ua=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,z.u_image),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade)}},mo=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,z.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,z.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,z.u_sdfgamma),u_image:new i.Uniform1i(Y,z.u_image),u_tex_y_a:new i.Uniform1f(Y,z.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,z.u_tex_y_b),u_mix:new i.Uniform1f(Y,z.u_mix)}},Xo=function(Y,z,K){var O=Y.transform;return{u_matrix:yl(Y,z,K),u_ratio:1/Cs(z,1,O.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/O.pixelsToGLUnits[0],1/O.pixelsToGLUnits[1]]}},Ts=function(Y,z,K,O){return i.extend(Xo(Y,z,K),{u_image:0,u_image_height:O})},Qo=function(Y,z,K,O){var $=Y.transform,pe=Bo(z,$);return{u_matrix:yl(Y,z,K),u_texsize:z.imageAtlasTexture.size,u_ratio:1/Cs(z,1,$.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[pe,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},ys=function(Y,z,K,O,$){var pe=Y.transform,de=Y.lineAtlas,Ie=Bo(z,pe),$e=K.layout.get("line-cap")==="round",pt=de.getDash(O.from,$e),Kt=de.getDash(O.to,$e),ir=pt.width*$.fromScale,Jt=Kt.width*$.toScale;return i.extend(Xo(Y,z,K),{u_patternscale_a:[Ie/ir,-pt.height/2],u_patternscale_b:[Ie/Jt,-Kt.height/2],u_sdfgamma:de.width/(Math.min(ir,Jt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:pt.y,u_tex_y_b:Kt.y,u_mix:$.t})};function Bo(Y,z){return 1/Cs(Y,1,z.tileZoom)}function yl(Y,z,K){return Y.translatePosMatrix(z.tileID.posMatrix,z,K.paint.get("line-translate"),K.paint.get("line-translate-anchor"))}var Gs=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_tl_parent:new i.Uniform2f(Y,z.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,z.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,z.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,z.u_fade_t),u_opacity:new i.Uniform1f(Y,z.u_opacity),u_image0:new i.Uniform1i(Y,z.u_image0),u_image1:new i.Uniform1i(Y,z.u_image1),u_brightness_low:new i.Uniform1f(Y,z.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,z.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,z.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,z.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,z.u_spin_weights)}},Ds=function(Y,z,K,O,$){return{u_matrix:Y,u_tl_parent:z,u_scale_parent:K,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*$.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:$.paint.get("raster-brightness-min"),u_brightness_high:$.paint.get("raster-brightness-max"),u_saturation_factor:vs($.paint.get("raster-saturation")),u_contrast_factor:Ka($.paint.get("raster-contrast")),u_spin_weights:ia($.paint.get("raster-hue-rotate"))}};function ia(Y){Y*=Math.PI/180;var z=Math.sin(Y),K=Math.cos(Y);return[(2*K+1)/3,(-Math.sqrt(3)*z-K+1)/3,(Math.sqrt(3)*z-K+1)/3]}function Ka(Y){return Y>0?1/(1-Y):1+Y}function vs(Y){return Y>0?1-1/(1.001-Y):-Y}var Ko=function(Y,z){return{u_is_size_zoom_constant:new i.Uniform1i(Y,z.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,z.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,z.u_size_t),u_size:new i.Uniform1f(Y,z.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,z.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,z.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,z.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,z.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,z.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,z.u_coord_matrix),u_is_text:new i.Uniform1i(Y,z.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_texture:new i.Uniform1i(Y,z.u_texture)}},iu=function(Y,z){return{u_is_size_zoom_constant:new i.Uniform1i(Y,z.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,z.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,z.u_size_t),u_size:new i.Uniform1f(Y,z.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,z.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,z.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,z.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,z.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,z.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,z.u_coord_matrix),u_is_text:new i.Uniform1i(Y,z.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_texture:new i.Uniform1i(Y,z.u_texture),u_gamma_scale:new i.Uniform1f(Y,z.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,z.u_is_halo)}},Du=function(Y,z){return{u_is_size_zoom_constant:new i.Uniform1i(Y,z.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,z.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,z.u_size_t),u_size:new i.Uniform1f(Y,z.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,z.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,z.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,z.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,z.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,z.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,z.u_coord_matrix),u_is_text:new i.Uniform1i(Y,z.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_texsize_icon:new i.Uniform2f(Y,z.u_texsize_icon),u_texture:new i.Uniform1i(Y,z.u_texture),u_texture_icon:new i.Uniform1i(Y,z.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,z.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,z.u_is_halo)}},ac=function(Y,z,K,O,$,pe,de,Ie,$e,pt){var Kt=$.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:z?z.uSizeT:0,u_size:z?z.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+K,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:$.options.fadeDuration?$.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:de,u_coord_matrix:Ie,u_is_text:+$e,u_pitch_with_map:+O,u_texsize:pt,u_texture:0}},mf=function(Y,z,K,O,$,pe,de,Ie,$e,pt,Kt){var ir=$.transform;return i.extend(ac(Y,z,K,O,$,pe,de,Ie,$e,pt),{u_gamma_scale:O?Math.cos(ir._pitch)*ir.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Kt})},bu=function(Y,z,K,O,$,pe,de,Ie,$e,pt){return i.extend(mf(Y,z,K,O,$,pe,de,Ie,!0,$e,!0),{u_texsize_icon:pt,u_texture_icon:1})},Kc=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_opacity:new i.Uniform1f(Y,z.u_opacity),u_color:new i.UniformColor(Y,z.u_color)}},Ru=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_opacity:new i.Uniform1f(Y,z.u_opacity),u_image:new i.Uniform1i(Y,z.u_image),u_pattern_tl_a:new i.Uniform2f(Y,z.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,z.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,z.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,z.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_mix:new i.Uniform1f(Y,z.u_mix),u_pattern_size_a:new i.Uniform2f(Y,z.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,z.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,z.u_scale_a),u_scale_b:new i.Uniform1f(Y,z.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,z.u_tile_units_to_pixels)}},Rc=function(Y,z,K){return{u_matrix:Y,u_opacity:z,u_color:K}},Ra=function(Y,z,K,O,$,pe){return i.extend(pf(O,pe,K,$),{u_matrix:Y,u_opacity:z})},eo={fillExtrusion:Ph,fillExtrusionPattern:Dl,fill:Dc,fillPattern:gc,fillOutline:hl,fillOutlinePattern:ru,circle:gt,collisionBox:wr,collisionCircle:vr,debug:xi,clippingMask:Xi,heatmap:Ti,heatmapTexture:qi,hillshade:Pn,hillshadePrepare:Ma,line:Cn,lineGradient:sn,linePattern:Ua,lineSDF:mo,raster:Gs,symbolIcon:Ko,symbolSDF:iu,symbolTextAndIcon:Du,background:Kc,backgroundPattern:Ru},Jc;function yc(Y,z,K,O,$,pe,de){for(var Ie=Y.context,$e=Ie.gl,pt=Y.useProgram("collisionBox"),Kt=[],ir=0,Jt=0,vt=0;vt0){var Ar=i.create(),gr=dr;i.mul(Ar,rr.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Ar,Ar,rr.placementViewportMatrix),Kt.push({circleArray:kr,circleOffset:Jt,transform:gr,invTransform:Ar}),ir+=kr.length/4,Jt=ir}pr&&pt.draw(Ie,$e.LINES,Wi.disabled,$i.disabled,Y.colorModeForRenderPass(),yr.disabled,Ur(dr,Y.transform,Wt),K.id,pr.layoutVertexBuffer,pr.indexBuffer,pr.segments,null,Y.transform.zoom,null,null,pr.collisionVertexBuffer)}}if(!(!de||!Kt.length)){var Cr=Y.useProgram("collisionCircle"),cr=new i.StructArrayLayout2f1f2i16;cr.resize(ir*4),cr._trim();for(var Gr=0,ei=0,yi=Kt;ei=0&&(Pt[rr.associatedIconIndex]={shiftedAnchor:ln,angle:Qn})}}if(Kt){vt.clear();for(var rn=Y.icon.placedSymbolArray,bn=0;bn0){var de=i.browser.now(),Ie=(de-Y.timeAdded)/pe,$e=z?(de-z.timeAdded)/pe:-1,pt=K.getSource(),Kt=$.coveringZoomLevel({tileSize:pt.tileSize,roundZoom:pt.roundZoom}),ir=!z||Math.abs(z.tileID.overscaledZ-Kt)>Math.abs(Y.tileID.overscaledZ-Kt),Jt=ir&&Y.refreshedUponExpiration?1:i.clamp(ir?Ie:1-$e,0,1);return Y.refreshedUponExpiration&&Ie>=1&&(Y.refreshedUponExpiration=!1),z?{opacity:1,mix:1-Jt}:{opacity:Jt,mix:0}}else return{opacity:1,mix:0}}function Ut(Y,z,K){var O=K.paint.get("background-color"),$=K.paint.get("background-opacity");if($!==0){var pe=Y.context,de=pe.gl,Ie=Y.transform,$e=Ie.tileSize,pt=K.paint.get("background-pattern");if(!Y.isPatternMissing(pt)){var Kt=!pt&&O.a===1&&$===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Kt){var ir=$i.disabled,Jt=Y.depthModeForSublayer(0,Kt==="opaque"?Wi.ReadWrite:Wi.ReadOnly),vt=Y.colorModeForRenderPass(),Pt=Y.useProgram(pt?"backgroundPattern":"background"),Wt=Ie.coveringTiles({tileSize:$e});pt&&(pe.activeTexture.set(de.TEXTURE0),Y.imageManager.bind(Y.context));for(var rr=K.getCrossfadeParameters(),dr=0,pr=Wt;dr "+K.overscaledZ);var dr=rr+" "+vt+"kb";Ga(Y,dr),de.draw(O,$.TRIANGLES,Ie,$e,ft.alphaBlended,yr.disabled,Fi(pe,i.Color.transparent,Wt),Kt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function Ga(Y,z){Y.initDebugOverlayCanvas();var K=Y.debugOverlayCanvas,O=Y.context.gl,$=Y.debugOverlayCanvas.getContext("2d");$.clearRect(0,0,K.width,K.height),$.shadowColor="white",$.shadowBlur=2,$.lineWidth=1.5,$.strokeStyle="white",$.textBaseline="top",$.font="bold 36px Open Sans, sans-serif",$.fillText(z,5,5),$.strokeText(z,5,5),Y.debugOverlayTexture.update(K),Y.debugOverlayTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}function To(Y,z,K){var O=Y.context,$=K.implementation;if(Y.renderPass==="offscreen"){var pe=$.prerender;pe&&(Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),pe.call($,O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),O.setStencilMode($i.disabled);var de=$.renderingMode==="3d"?new Wi(Y.context.gl.LEQUAL,Wi.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,Wi.ReadOnly);O.setDepthMode(de),$.render(O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState(),O.bindFramebuffer.set(null)}}var Wa={symbol:w,circle:it,heatmap:yt,line:Sr,fill:he,"fill-extrusion":Pe,hillshade:Je,raster:Mt,background:Ut,debug:pa,custom:To},co=function(z,K){this.context=new Fr(z),this.transform=K,this._tileTextures={},this.setup(),this.numSublayers=Zr.maxUnderzooming+Zr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new rh,this.gpuTimers={}};co.prototype.resize=function(z,K){if(this.width=z*i.browser.devicePixelRatio,this.height=K*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var O=0,$=this.style._order;O<$.length;O+=1){var pe=$[O];this.style._layers[pe].resize()}},co.prototype.setup=function(){var z=this.context,K=new i.StructArrayLayout2i4;K.emplaceBack(0,0),K.emplaceBack(i.EXTENT,0),K.emplaceBack(0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=z.createVertexBuffer(K,kc.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var O=new i.StructArrayLayout2i4;O.emplaceBack(0,0),O.emplaceBack(i.EXTENT,0),O.emplaceBack(0,i.EXTENT),O.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=z.createVertexBuffer(O,kc.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var $=new i.StructArrayLayout4i8;$.emplaceBack(0,0,0,0),$.emplaceBack(i.EXTENT,0,i.EXTENT,0),$.emplaceBack(0,i.EXTENT,0,i.EXTENT),$.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=z.createVertexBuffer($,Me.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var pe=new i.StructArrayLayout2i4;pe.emplaceBack(0,0),pe.emplaceBack(1,0),pe.emplaceBack(0,1),pe.emplaceBack(1,1),this.viewportBuffer=z.createVertexBuffer(pe,kc.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var de=new i.StructArrayLayout1ui2;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=z.createIndexBuffer(de);var Ie=new i.StructArrayLayout3ui6;Ie.emplaceBack(0,1,2),Ie.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=z.createIndexBuffer(Ie),this.emptyTexture=new i.Texture(z,{width:1,height:1,data:new Uint8Array([0,0,0,0])},z.gl.RGBA);var $e=this.context.gl;this.stencilClearMode=new $i({func:$e.ALWAYS,mask:0},0,255,$e.ZERO,$e.ZERO,$e.ZERO)},co.prototype.clearStencil=function(){var z=this.context,K=z.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var O=i.create();i.ortho(O,0,this.width,this.height,0,0,1),i.scale(O,O,[K.drawingBufferWidth,K.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(z,K.TRIANGLES,Wi.disabled,this.stencilClearMode,ft.disabled,yr.disabled,hn(O),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},co.prototype._renderTileClippingMasks=function(z,K){if(!(this.currentStencilSource===z.source||!z.isTileClipped()||!K||!K.length)){this.currentStencilSource=z.source;var O=this.context,$=O.gl;this.nextStencilID+K.length>256&&this.clearStencil(),O.setColorMode(ft.disabled),O.setDepthMode(Wi.disabled);var pe=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var de=0,Ie=K;de256&&this.clearStencil();var z=this.nextStencilID++,K=this.context.gl;return new $i({func:K.NOTEQUAL,mask:255},z,255,K.KEEP,K.KEEP,K.REPLACE)},co.prototype.stencilModeForClipping=function(z){var K=this.context.gl;return new $i({func:K.EQUAL,mask:255},this._tileClippingMaskIDs[z.key],0,K.KEEP,K.KEEP,K.REPLACE)},co.prototype.stencilConfigForOverlap=function(z){var K,O=this.context.gl,$=z.sort(function(pt,Kt){return Kt.overscaledZ-pt.overscaledZ}),pe=$[$.length-1].overscaledZ,de=$[0].overscaledZ-pe+1;if(de>1){this.currentStencilSource=void 0,this.nextStencilID+de>256&&this.clearStencil();for(var Ie={},$e=0;$e=0;this.currentLayer--){var Ar=this.style._layers[$[this.currentLayer]],gr=pe[Ar.source],Cr=$e[Ar.source];this._renderTileClippingMasks(Ar,Cr),this.renderLayer(this,gr,Ar,Cr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<$.length;this.currentLayer++){var cr=this.style._layers[$[this.currentLayer]],Gr=pe[cr.source],ei=(cr.type==="symbol"?Kt:pt)[cr.source];this._renderTileClippingMasks(cr,$e[cr.source]),this.renderLayer(this,Gr,cr,ei)}if(this.options.showTileBoundaries){var yi,tn,Di=i.values(this.style._layers);Di.forEach(function(ln){ln.source&&!ln.isHidden(O.transform.zoom)&&(ln.source!==(tn&&tn.id)&&(tn=O.style.sourceCaches[ln.source]),(!yi||yi.getSource().maxzoom0?K.pop():null},co.prototype.isPatternMissing=function(z){if(!z)return!1;if(!z.from||!z.to)return!0;var K=this.imageManager.getPattern(z.from.toString()),O=this.imageManager.getPattern(z.to.toString());return!K||!O},co.prototype.useProgram=function(z,K){this.cache=this.cache||{};var O=""+z+(K?K.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[O]||(this.cache[O]=new Vf(this.context,z,Pf[z],K,eo[z],this._showOverdrawInspector)),this.cache[O]},co.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()},co.prototype.setBaseState=function(){var z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(z.FUNC_ADD)},co.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var z=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,z.RGBA)}},co.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Do=function(z,K){this.points=z,this.planes=K};Do.fromInvProjectionMatrix=function(z,K,O){var $=[[-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]],pe=Math.pow(2,O),de=$.map(function(pt){return i.transformMat4([],pt,z)}).map(function(pt){return i.scale$1([],pt,1/pt[3]/K*pe)}),Ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],$e=Ie.map(function(pt){var Kt=i.sub([],de[pt[0]],de[pt[1]]),ir=i.sub([],de[pt[2]],de[pt[1]]),Jt=i.normalize([],i.cross([],Kt,ir)),vt=-i.dot(Jt,de[pt[1]]);return Jt.concat(vt)});return new Do(de,$e)};var Rs=function(z,K){this.min=z,this.max=K,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Rs.prototype.quadrant=function(z){for(var K=[z%2===0,z<2],O=i.clone$2(this.min),$=i.clone$2(this.max),pe=0;pe=0;if(de===0)return 0;de!==K.length&&(O=!1)}if(O)return 2;for(var $e=0;$e<3;$e++){for(var pt=Number.MAX_VALUE,Kt=-Number.MAX_VALUE,ir=0;irthis.max[$e]-this.min[$e])return 0}return 1};var As=function(z,K,O,$){if(z===void 0&&(z=0),K===void 0&&(K=0),O===void 0&&(O=0),$===void 0&&($=0),isNaN(z)||z<0||isNaN(K)||K<0||isNaN(O)||O<0||isNaN($)||$<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=z,this.bottom=K,this.left=O,this.right=$};As.prototype.interpolate=function(z,K,O){return K.top!=null&&z.top!=null&&(this.top=i.number(z.top,K.top,O)),K.bottom!=null&&z.bottom!=null&&(this.bottom=i.number(z.bottom,K.bottom,O)),K.left!=null&&z.left!=null&&(this.left=i.number(z.left,K.left,O)),K.right!=null&&z.right!=null&&(this.right=i.number(z.right,K.right,O)),this},As.prototype.getCenter=function(z,K){var O=i.clamp((this.left+z-this.right)/2,0,z),$=i.clamp((this.top+K-this.bottom)/2,0,K);return new i.Point(O,$)},As.prototype.equals=function(z){return this.top===z.top&&this.bottom===z.bottom&&this.left===z.left&&this.right===z.right},As.prototype.clone=function(){return new As(this.top,this.bottom,this.left,this.right)},As.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var yo=function(z,K,O,$,pe){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=pe===void 0?!0:pe,this._minZoom=z||0,this._maxZoom=K||22,this._minPitch=O==null?0:O,this._maxPitch=$==null?60:$,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 As,this._posMatrixCache={},this._alignedPosMatrixCache={}},po={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}};yo.prototype.clone=function(){var z=new yo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return z.tileSize=this.tileSize,z.latRange=this.latRange,z.width=this.width,z.height=this.height,z._center=this._center,z.zoom=this.zoom,z.angle=this.angle,z._fov=this._fov,z._pitch=this._pitch,z._unmodified=this._unmodified,z._edgeInsets=this._edgeInsets.clone(),z._calcMatrices(),z},po.minZoom.get=function(){return this._minZoom},po.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},po.maxZoom.get=function(){return this._maxZoom},po.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},po.minPitch.get=function(){return this._minPitch},po.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},po.maxPitch.get=function(){return this._maxPitch},po.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},po.renderWorldCopies.get=function(){return this._renderWorldCopies},po.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},po.worldSize.get=function(){return this.tileSize*this.scale},po.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},po.size.get=function(){return new i.Point(this.width,this.height)},po.bearing.get=function(){return-this.angle/Math.PI*180},po.bearing.set=function(Y){var z=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==z&&(this._unmodified=!1,this.angle=z,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},po.pitch.get=function(){return this._pitch/Math.PI*180},po.pitch.set=function(Y){var z=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==z&&(this._unmodified=!1,this._pitch=z,this._calcMatrices())},po.fov.get=function(){return this._fov/Math.PI*180},po.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())},po.zoom.get=function(){return this._zoom},po.zoom.set=function(Y){var z=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==z&&(this._unmodified=!1,this._zoom=z,this.scale=this.zoomScale(z),this.tileZoom=Math.floor(z),this.zoomFraction=z-this.tileZoom,this._constrain(),this._calcMatrices())},po.center.get=function(){return this._center},po.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},po.padding.get=function(){return this._edgeInsets.toJSON()},po.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},po.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},yo.prototype.isPaddingEqual=function(z){return this._edgeInsets.equals(z)},yo.prototype.interpolatePadding=function(z,K,O){this._unmodified=!1,this._edgeInsets.interpolate(z,K,O),this._constrain(),this._calcMatrices()},yo.prototype.coveringZoomLevel=function(z){var K=(z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/z.tileSize));return Math.max(0,K)},yo.prototype.getVisibleUnwrappedCoordinates=function(z){var K=[new i.UnwrappedTileID(0,z)];if(this._renderWorldCopies)for(var O=this.pointCoordinate(new i.Point(0,0)),$=this.pointCoordinate(new i.Point(this.width,0)),pe=this.pointCoordinate(new i.Point(this.width,this.height)),de=this.pointCoordinate(new i.Point(0,this.height)),Ie=Math.floor(Math.min(O.x,$.x,pe.x,de.x)),$e=Math.floor(Math.max(O.x,$.x,pe.x,de.x)),pt=1,Kt=Ie-pt;Kt<=$e+pt;Kt++)Kt!==0&&K.push(new i.UnwrappedTileID(Kt,z));return K},yo.prototype.coveringTiles=function(z){var K=this.coveringZoomLevel(z),O=K;if(z.minzoom!==void 0&&Kz.maxzoom&&(K=z.maxzoom);var $=i.MercatorCoordinate.fromLngLat(this.center),pe=Math.pow(2,K),de=[pe*$.x,pe*$.y,0],Ie=Do.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,K),$e=z.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&($e=K);var pt=3,Kt=function(Di){return{aabb:new Rs([Di*pe,0,0],[(Di+1)*pe,pe,0]),zoom:0,x:0,y:0,wrap:Di,fullyVisible:!1}},ir=[],Jt=[],vt=K,Pt=z.reparseOverscaled?O:K;if(this._renderWorldCopies)for(var Wt=1;Wt<=3;Wt++)ir.push(Kt(-Wt)),ir.push(Kt(Wt));for(ir.push(Kt(0));ir.length>0;){var rr=ir.pop(),dr=rr.x,pr=rr.y,kr=rr.fullyVisible;if(!kr){var Ar=rr.aabb.intersects(Ie);if(Ar===0)continue;kr=Ar===2}var gr=rr.aabb.distanceX(de),Cr=rr.aabb.distanceY(de),cr=Math.max(Math.abs(gr),Math.abs(Cr)),Gr=pt+(1<Gr&&rr.zoom>=$e){Jt.push({tileID:new i.OverscaledTileID(rr.zoom===vt?Pt:rr.zoom,rr.wrap,rr.zoom,dr,pr),distanceSq:i.sqrLen([de[0]-.5-dr,de[1]-.5-pr])});continue}for(var ei=0;ei<4;ei++){var yi=(dr<<1)+ei%2,tn=(pr<<1)+(ei>>1);ir.push({aabb:rr.aabb.quadrant(ei),zoom:rr.zoom+1,x:yi,y:tn,wrap:rr.wrap,fullyVisible:kr})}}return Jt.sort(function(Di,ln){return Di.distanceSq-ln.distanceSq}).map(function(Di){return Di.tileID})},yo.prototype.resize=function(z,K){this.width=z,this.height=K,this.pixelsToGLUnits=[2/z,-2/K],this._constrain(),this._calcMatrices()},po.unmodified.get=function(){return this._unmodified},yo.prototype.zoomScale=function(z){return Math.pow(2,z)},yo.prototype.scaleZoom=function(z){return Math.log(z)/Math.LN2},yo.prototype.project=function(z){var K=i.clamp(z.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(z.lng)*this.worldSize,i.mercatorYfromLat(K)*this.worldSize)},yo.prototype.unproject=function(z){return new i.MercatorCoordinate(z.x/this.worldSize,z.y/this.worldSize).toLngLat()},po.point.get=function(){return this.project(this.center)},yo.prototype.setLocationAtPoint=function(z,K){var O=this.pointCoordinate(K),$=this.pointCoordinate(this.centerPoint),pe=this.locationCoordinate(z),de=new i.MercatorCoordinate(pe.x-(O.x-$.x),pe.y-(O.y-$.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())},yo.prototype.locationPoint=function(z){return this.coordinatePoint(this.locationCoordinate(z))},yo.prototype.pointLocation=function(z){return this.coordinateLocation(this.pointCoordinate(z))},yo.prototype.locationCoordinate=function(z){return i.MercatorCoordinate.fromLngLat(z)},yo.prototype.coordinateLocation=function(z){return z.toLngLat()},yo.prototype.pointCoordinate=function(z){var K=0,O=[z.x,z.y,0,1],$=[z.x,z.y,1,1];i.transformMat4(O,O,this.pixelMatrixInverse),i.transformMat4($,$,this.pixelMatrixInverse);var pe=O[3],de=$[3],Ie=O[0]/pe,$e=$[0]/de,pt=O[1]/pe,Kt=$[1]/de,ir=O[2]/pe,Jt=$[2]/de,vt=ir===Jt?0:(K-ir)/(Jt-ir);return new i.MercatorCoordinate(i.number(Ie,$e,vt)/this.worldSize,i.number(pt,Kt,vt)/this.worldSize)},yo.prototype.coordinatePoint=function(z){var K=[z.x*this.worldSize,z.y*this.worldSize,0,1];return i.transformMat4(K,K,this.pixelMatrix),new i.Point(K[0]/K[3],K[1]/K[3])},yo.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)))},yo.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]])},yo.prototype.setMaxBounds=function(z){z?(this.lngRange=[z.getWest(),z.getEast()],this.latRange=[z.getSouth(),z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},yo.prototype.calculatePosMatrix=function(z,K){K===void 0&&(K=!1);var O=z.key,$=K?this._alignedPosMatrixCache:this._posMatrixCache;if($[O])return $[O];var pe=z.canonical,de=this.worldSize/this.zoomScale(pe.z),Ie=pe.x+Math.pow(2,pe.z)*z.wrap,$e=i.identity(new Float64Array(16));return i.translate($e,$e,[Ie*de,pe.y*de,0]),i.scale($e,$e,[de/i.EXTENT,de/i.EXTENT,1]),i.multiply($e,K?this.alignedProjMatrix:this.projMatrix,$e),$[O]=new Float32Array($e),$[O]},yo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},yo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var z=-90,K=90,O=-180,$=180,pe,de,Ie,$e,pt=this.size,Kt=this._unmodified;if(this.latRange){var ir=this.latRange;z=i.mercatorYfromLat(ir[1])*this.worldSize,K=i.mercatorYfromLat(ir[0])*this.worldSize,pe=K-zK&&($e=K-rr)}if(this.lngRange){var dr=vt.x,pr=pt.x/2;dr-pr$&&(Ie=$-pr)}(Ie!==void 0||$e!==void 0)&&(this.center=this.unproject(new i.Point(Ie!==void 0?Ie:vt.x,$e!==void 0?$e:vt.y))),this._unmodified=Kt,this._constraining=!1}},yo.prototype._calcMatrices=function(){if(this.height){var z=this._fov/2,K=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(z)*this.height;var O=Math.PI/2+this._pitch,$=this._fov*(.5+K.y/this.height),pe=Math.sin($)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-O-$,.01,Math.PI-.01)),de=this.point,Ie=de.x,$e=de.y,pt=Math.cos(Math.PI/2-this._pitch)*pe+this.cameraToCenterDistance,Kt=pt*1.01,ir=this.height/50,Jt=new Float64Array(16);i.perspective(Jt,this._fov,this.width/this.height,ir,Kt),Jt[8]=-K.x*2/this.width,Jt[9]=K.y*2/this.height,i.scale(Jt,Jt,[1,-1,1]),i.translate(Jt,Jt,[0,0,-this.cameraToCenterDistance]),i.rotateX(Jt,Jt,this._pitch),i.rotateZ(Jt,Jt,this.angle),i.translate(Jt,Jt,[-Ie,-$e,0]),this.mercatorMatrix=i.scale([],Jt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Jt,Jt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Jt,this.invProjMatrix=i.invert([],this.projMatrix);var vt=this.width%2/2,Pt=this.height%2/2,Wt=Math.cos(this.angle),rr=Math.sin(this.angle),dr=Ie-Math.round(Ie)+Wt*vt+rr*Pt,pr=$e-Math.round($e)+Wt*Pt+rr*vt,kr=new Float64Array(Jt);if(i.translate(kr,kr,[dr>.5?dr-1:dr,pr>.5?pr-1:pr,0]),this.alignedProjMatrix=kr,Jt=i.create(),i.scale(Jt,Jt,[this.width/2,-this.height/2,1]),i.translate(Jt,Jt,[1,-1,0]),this.labelPlaneMatrix=Jt,Jt=i.create(),i.scale(Jt,Jt,[1,-1,1]),i.translate(Jt,Jt,[-1,-1,0]),i.scale(Jt,Jt,[2/this.width,2/this.height,1]),this.glCoordMatrix=Jt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Jt=i.invert(new Float64Array(16),this.pixelMatrix),!Jt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Jt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},yo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var z=this.pointCoordinate(new i.Point(0,0)),K=[z.x*this.worldSize,z.y*this.worldSize,0,1],O=i.transformMat4(K,K,this.pixelMatrix);return O[3]/this.cameraToCenterDistance},yo.prototype.getCameraPoint=function(){var z=this._pitch,K=Math.tan(z)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,K))},yo.prototype.getCameraQueryGeometry=function(z){var K=this.getCameraPoint();if(z.length===1)return[z[0],K];for(var O=K.x,$=K.y,pe=K.x,de=K.y,Ie=0,$e=z;Ie<$e.length;Ie+=1){var pt=$e[Ie];O=Math.min(O,pt.x),$=Math.min($,pt.y),pe=Math.max(pe,pt.x),de=Math.max(de,pt.y)}return[new i.Point(O,$),new i.Point(pe,$),new i.Point(pe,de),new i.Point(O,de),new i.Point(O,$)]},Object.defineProperties(yo.prototype,po);function _l(Y,z){var K=!1,O=null,$=function(){O=null,K&&(Y(),O=setTimeout($,z),K=!1)};return function(){return K=!0,O||$(),O}}var Vl=function(z){this._hashName=z&&encodeURIComponent(z),i.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=_l(this._updateHashUnthrottled.bind(this),30*1e3/100)};Vl.prototype.addTo=function(z){return this._map=z,i.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Vl.prototype.remove=function(){return i.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Vl.prototype.getHashString=function(z){var K=this._map.getCenter(),O=Math.round(this._map.getZoom()*100)/100,$=Math.ceil((O*Math.LN2+Math.log(512/360/.5))/Math.LN10),pe=Math.pow(10,$),de=Math.round(K.lng*pe)/pe,Ie=Math.round(K.lat*pe)/pe,$e=this._map.getBearing(),pt=this._map.getPitch(),Kt="";if(z?Kt+="/"+de+"/"+Ie+"/"+O:Kt+=O+"/"+Ie+"/"+de,($e||pt)&&(Kt+="/"+Math.round($e*10)/10),pt&&(Kt+="/"+Math.round(pt)),this._hashName){var ir=this._hashName,Jt=!1,vt=i.window.location.hash.slice(1).split("&").map(function(Pt){var Wt=Pt.split("=")[0];return Wt===ir?(Jt=!0,Wt+"="+Kt):Pt}).filter(function(Pt){return Pt});return Jt||vt.push(ir+"="+Kt),"#"+vt.join("&")}return"#"+Kt},Vl.prototype._getCurrentHash=function(){var z=this,K=i.window.location.hash.replace("#","");if(this._hashName){var O;return K.split("&").map(function($){return $.split("=")}).forEach(function($){$[0]===z._hashName&&(O=$)}),(O&&O[1]||"").split("/")}return K.split("/")},Vl.prototype._onHashChange=function(){var z=this._getCurrentHash();if(z.length>=3&&!z.some(function(O){return isNaN(O)})){var K=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(z[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+z[2],+z[1]],zoom:+z[0],bearing:K,pitch:+(z[4]||0)}),!0}return!1},Vl.prototype._updateHashUnthrottled=function(){var z=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,z)}catch(K){}};var Xu={linearity:.3,easing:i.bezier(0,0,.3,1)},cu=i.extend({deceleration:2500,maxSpeed:1400},Xu),el=i.extend({deceleration:20,maxSpeed:1400},Xu),nu=i.extend({deceleration:1e3,maxSpeed:360},Xu),zc=i.extend({deceleration:1e3,maxSpeed:90},Xu),Rl=function(z){this._map=z,this.clear()};Rl.prototype.clear=function(){this._inertiaBuffer=[]},Rl.prototype.record=function(z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:z})},Rl.prototype._drainInertiaBuffer=function(){for(var z=this._inertiaBuffer,K=i.browser.now(),O=160;z.length>0&&K-z[0].time>O;)z.shift()},Rl.prototype._onMoveEnd=function(z){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var K={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},O=0,$=this._inertiaBuffer;O<$.length;O+=1){var pe=$[O],de=pe.settings;K.zoom+=de.zoomDelta||0,K.bearing+=de.bearingDelta||0,K.pitch+=de.pitchDelta||0,de.panDelta&&K.pan._add(de.panDelta),de.around&&(K.around=de.around),de.pinchAround&&(K.pinchAround=de.pinchAround)}var Ie=this._inertiaBuffer[this._inertiaBuffer.length-1],$e=Ie.time-this._inertiaBuffer[0].time,pt={};if(K.pan.mag()){var Kt=Z(K.pan.mag(),$e,i.extend({},cu,z||{}));pt.offset=K.pan.mult(Kt.amount/K.pan.mag()),pt.center=this._map.transform.center,zl(pt,Kt)}if(K.zoom){var ir=Z(K.zoom,$e,el);pt.zoom=this._map.transform.zoom+ir.amount,zl(pt,ir)}if(K.bearing){var Jt=Z(K.bearing,$e,nu);pt.bearing=this._map.transform.bearing+i.clamp(Jt.amount,-179,179),zl(pt,Jt)}if(K.pitch){var vt=Z(K.pitch,$e,zc);pt.pitch=this._map.transform.pitch+vt.amount,zl(pt,vt)}if(pt.zoom||pt.bearing){var Pt=K.pinchAround===void 0?K.around:K.pinchAround;pt.around=Pt?this._map.unproject(Pt):this._map.getCenter()}return this.clear(),i.extend(pt,{noMoveStart:!0})}};function zl(Y,z){(!Y.duration||Y.duration=this._clickTolerance||this._map.fire(new oe(z.type,this._map,z))},Ue.prototype.dblclick=function(z){return this._firePreventable(new oe(z.type,this._map,z))},Ue.prototype.mouseover=function(z){this._map.fire(new oe(z.type,this._map,z))},Ue.prototype.mouseout=function(z){this._map.fire(new oe(z.type,this._map,z))},Ue.prototype.touchstart=function(z){return this._firePreventable(new we(z.type,this._map,z))},Ue.prototype.touchmove=function(z){this._map.fire(new we(z.type,this._map,z))},Ue.prototype.touchend=function(z){this._map.fire(new we(z.type,this._map,z))},Ue.prototype.touchcancel=function(z){this._map.fire(new we(z.type,this._map,z))},Ue.prototype._firePreventable=function(z){if(this._map.fire(z),z.defaultPrevented)return{}},Ue.prototype.isEnabled=function(){return!0},Ue.prototype.isActive=function(){return!1},Ue.prototype.enable=function(){},Ue.prototype.disable=function(){};var We=function(z){this._map=z};We.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},We.prototype.mousemove=function(z){this._map.fire(new oe(z.type,this._map,z))},We.prototype.mousedown=function(){this._delayContextMenu=!0},We.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new oe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},We.prototype.contextmenu=function(z){this._delayContextMenu?this._contextMenuEvent=z:this._map.fire(new oe(z.type,this._map,z)),this._map.listens("contextmenu")&&z.preventDefault()},We.prototype.isEnabled=function(){return!0},We.prototype.isActive=function(){return!1},We.prototype.enable=function(){},We.prototype.disable=function(){};var wt=function(z,K){this._map=z,this._el=z.getCanvasContainer(),this._container=z.getContainer(),this._clickTolerance=K.clickTolerance||1};wt.prototype.isEnabled=function(){return!!this._enabled},wt.prototype.isActive=function(){return!!this._active},wt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},wt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},wt.prototype.mousedown=function(z,K){this.isEnabled()&&z.shiftKey&&z.button===0&&(o.disableDrag(),this._startPos=this._lastPos=K,this._active=!0)},wt.prototype.mousemoveWindow=function(z,K){if(this._active){var O=K;if(!(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=z.timeStamp),O.length===this.numTouches&&(this.centroid=zt(K),this.touches=tt(O,K)))},Ir.prototype.touchmove=function(z,K,O){if(!(this.aborted||!this.centroid)){var $=tt(O,K);for(var pe in this.touches){var de=this.touches[pe],Ie=$[pe];(!Ie||Ie.dist(de)>Rr)&&(this.aborted=!0)}}},Ir.prototype.touchend=function(z,K,O){if((!this.centroid||z.timeStamp-this.startTime>lr)&&(this.aborted=!0),O.length===0){var $=!this.aborted&&this.centroid;if(this.reset(),$)return $}};var oi=function(z){this.singleTap=new Ir(z),this.numTaps=z.numTaps,this.reset()};oi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},oi.prototype.touchstart=function(z,K,O){this.singleTap.touchstart(z,K,O)},oi.prototype.touchmove=function(z,K,O){this.singleTap.touchmove(z,K,O)},oi.prototype.touchend=function(z,K,O){var $=this.singleTap.touchend(z,K,O);if($){var pe=z.timeStamp-this.lastTime0&&(this._active=!0);var $=tt(O,K),pe=new i.Point(0,0),de=new i.Point(0,0),Ie=0;for(var $e in $){var pt=$[$e],Kt=this._touches[$e];Kt&&(pe._add(pt),de._add(pt.sub(Kt)),Ie++,$[$e]=pt)}if(this._touches=$,!(IeMath.abs(Y.x)}var pn=100,za=function(Y){function z(){Y.apply(this,arguments)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},z.prototype._start=function(O){this._lastPoints=O,Ns(O[0].sub(O[1]))&&(this._valid=!1)},z.prototype._move=function(O,$,pe){var de=O[0].sub(this._lastPoints[0]),Ie=O[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(de,Ie,pe.timeStamp),!!this._valid){this._lastPoints=O,this._active=!0;var $e=(de.y+Ie.y)/2,pt=-.5;return{pitchDelta:$e*pt}}},z.prototype.gestureBeginsVertically=function(O,$,pe){if(this._valid!==void 0)return this._valid;var de=2,Ie=O.mag()>=de,$e=$.mag()>=de;if(!(!Ie&&!$e)){if(!Ie||!$e)return this._firstMove===void 0&&(this._firstMove=pe),pe-this._firstMove0==$.y>0;return Ns(O)&&Ns($)&&pt}},z}(Nn),Lo={panStep:100,bearingStep:15,pitchStep:10},Fo=function(){var z=Lo;this._panStep=z.panStep,this._bearingStep=z.bearingStep,this._pitchStep=z.pitchStep,this._rotationDisabled=!1};Fo.prototype.reset=function(){this._active=!1},Fo.prototype.keydown=function(z){var K=this;if(!(z.altKey||z.ctrlKey||z.metaKey)){var O=0,$=0,pe=0,de=0,Ie=0;switch(z.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:z.shiftKey?$=-1:(z.preventDefault(),de=-1);break;case 39:z.shiftKey?$=1:(z.preventDefault(),de=1);break;case 38:z.shiftKey?pe=1:(z.preventDefault(),Ie=-1);break;case 40:z.shiftKey?pe=-1:(z.preventDefault(),Ie=1);break;default:return}return this._rotationDisabled&&($=0,pe=0),{cameraAnimation:function($e){var pt=$e.getZoom();$e.easeTo({duration:300,easeId:"keyboardHandler",easing:js,zoom:O?Math.round(pt)+O*(z.shiftKey?2:1):pt,bearing:$e.getBearing()+$*K._bearingStep,pitch:$e.getPitch()+pe*K._pitchStep,offset:[-de*K._panStep,-Ie*K._panStep],center:$e.getCenter()},{originalEvent:z})}}}},Fo.prototype.enable=function(){this._enabled=!0},Fo.prototype.disable=function(){this._enabled=!1,this.reset()},Fo.prototype.isEnabled=function(){return this._enabled},Fo.prototype.isActive=function(){return this._active},Fo.prototype.disableRotation=function(){this._rotationDisabled=!0},Fo.prototype.enableRotation=function(){this._rotationDisabled=!1};function js(Y){return Y*(2-Y)}var xl=4.000244140625,fu=1/100,dl=1/450,xc=2,At=function(z,K){this._map=z,this._el=z.getCanvasContainer(),this._handler=K,this._delta=0,this._defaultZoomRate=fu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};At.prototype.setZoomRate=function(z){this._defaultZoomRate=z},At.prototype.setWheelZoomRate=function(z){this._wheelZoomRate=z},At.prototype.isEnabled=function(){return!!this._enabled},At.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},At.prototype.isZooming=function(){return!!this._zooming},At.prototype.enable=function(z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=z&&z.around==="center")},At.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},At.prototype.wheel=function(z){if(this.isEnabled()){var K=z.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?z.deltaY*40:z.deltaY,O=i.browser.now(),$=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,K!==0&&K%xl===0?this._type="wheel":K!==0&&Math.abs(K)<4?this._type="trackpad":$>400?(this._type=null,this._lastValue=K,this._timeout=setTimeout(this._onTimeout,40,z)):this._type||(this._type=Math.abs($*K)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,K+=this._lastValue)),z.shiftKey&&K&&(K=K/4),this._type&&(this._lastWheelEvent=z,this._delta-=K,this._active||this._start(z)),z.preventDefault()}},At.prototype._onTimeout=function(z){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(z)},At.prototype._start=function(z){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 K=o.mousePos(this._el,z);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(K)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},At.prototype.renderFrame=function(){var z=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var K=this._map.transform;if(this._delta!==0){var O=this._type==="wheel"&&Math.abs(this._delta)>xl?this._wheelZoomRate:this._defaultZoomRate,$=xc/(1+Math.exp(-Math.abs(this._delta*O)));this._delta<0&&$!==0&&($=1/$);var pe=typeof this._targetZoom=="number"?K.zoomScale(this._targetZoom):K.scale;this._targetZoom=Math.min(K.maxZoom,Math.max(K.minZoom,K.scaleZoom(pe*$))),this._type==="wheel"&&(this._startZoom=K.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var de=typeof this._targetZoom=="number"?this._targetZoom:K.zoom,Ie=this._startZoom,$e=this._easing,pt=!1,Kt;if(this._type==="wheel"&&Ie&&$e){var ir=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),Jt=$e(ir);Kt=i.number(Ie,de,Jt),ir<1?this._frameId||(this._frameId=!0):pt=!0}else Kt=de,pt=!0;return this._active=!0,pt&&(this._active=!1,this._finishTimeout=setTimeout(function(){z._zooming=!1,z._handler._triggerRenderFrame(),delete z._targetZoom,delete z._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!pt,zoomDelta:Kt-K.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},At.prototype._smoothOutEasing=function(z){var K=i.ease;if(this._prevEase){var O=this._prevEase,$=(i.browser.now()-O.start)/O.duration,pe=O.easing($+.01)-O.easing($),de=.27/Math.sqrt(pe*pe+1e-4)*.01,Ie=Math.sqrt(.27*.27-de*de);K=i.bezier(de,Ie,.25,1)}return this._prevEase={start:i.browser.now(),duration:z,easing:K},K},At.prototype.reset=function(){this._active=!1};var Er=function(z,K){this._clickZoom=z,this._tapZoom=K};Er.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Er.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Er.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Er.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Wr=function(){this.reset()};Wr.prototype.reset=function(){this._active=!1},Wr.prototype.dblclick=function(z,K){return z.preventDefault(),{cameraAnimation:function(O){O.easeTo({duration:300,zoom:O.getZoom()+(z.shiftKey?-1:1),around:O.unproject(K)},{originalEvent:z})}}},Wr.prototype.enable=function(){this._enabled=!0},Wr.prototype.disable=function(){this._enabled=!1,this.reset()},Wr.prototype.isEnabled=function(){return this._enabled},Wr.prototype.isActive=function(){return this._active};var wi=function(){this._tap=new oi({numTouches:1,numTaps:1}),this.reset()};wi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},wi.prototype.touchstart=function(z,K,O){this._swipePoint||(this._tapTime&&z.timeStamp-this._tapTime>or&&this.reset(),this._tapTime?O.length>0&&(this._swipePoint=K[0],this._swipeTouch=O[0].identifier):this._tap.touchstart(z,K,O))},wi.prototype.touchmove=function(z,K,O){if(!this._tapTime)this._tap.touchmove(z,K,O);else if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;var $=K[0],pe=$.y-this._swipePoint.y;return this._swipePoint=$,z.preventDefault(),this._active=!0,{zoomDelta:pe/128}}},wi.prototype.touchend=function(z,K,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{var $=this._tap.touchend(z,K,O);$&&(this._tapTime=z.timeStamp)}},wi.prototype.touchcancel=function(){this.reset()},wi.prototype.enable=function(){this._enabled=!0},wi.prototype.disable=function(){this._enabled=!1,this.reset()},wi.prototype.isEnabled=function(){return this._enabled},wi.prototype.isActive=function(){return this._active};var Ui=function(z,K,O){this._el=z,this._mousePan=K,this._touchPan=O};Ui.prototype.enable=function(z){this._inertiaOptions=z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ui.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ui.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ui.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Oi=function(z,K,O){this._pitchWithRotate=z.pitchWithRotate,this._mouseRotate=K,this._mousePitch=O};Oi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Oi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Oi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Oi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Bi=function(z,K,O,$){this._el=z,this._touchZoom=K,this._touchRotate=O,this._tapDragZoom=$,this._rotationDisabled=!1,this._enabled=!0};Bi.prototype.enable=function(z){this._touchZoom.enable(z),this._rotationDisabled||this._touchRotate.enable(z),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Bi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Bi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Bi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Bi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Bi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var cn=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},On=function(Y){function z(){Y.apply(this,arguments)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z}(i.Event);function Bn(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var yn=function(z,K){this._map=z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Rl(z),this._bearingSnap=K.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(K),i.bindAll(["handleEvent","handleWindowEvent"],this);var O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[i.window,"blur",void 0]];for(var $=0,pe=this._listeners;$Ie?Math.min(2,gr):Math.max(.5,gr),Di=Math.pow(tn,1-ei),ln=de.unproject(kr.add(Ar.mult(ei*Di)).mult(yi));de.setLocationAtPoint(de.renderWorldCopies?ln.wrap():ln,rr)}pe._fireMoveEvents($)},function(ei){pe._afterEase($,ei)},O),this},z.prototype._prepareEase=function(O,$,pe){pe===void 0&&(pe={}),this._moving=!0,!$&&!pe.moving&&this.fire(new i.Event("movestart",O)),this._zooming&&!pe.zooming&&this.fire(new i.Event("zoomstart",O)),this._rotating&&!pe.rotating&&this.fire(new i.Event("rotatestart",O)),this._pitching&&!pe.pitching&&this.fire(new i.Event("pitchstart",O))},z.prototype._fireMoveEvents=function(O){this.fire(new i.Event("move",O)),this._zooming&&this.fire(new i.Event("zoom",O)),this._rotating&&this.fire(new i.Event("rotate",O)),this._pitching&&this.fire(new i.Event("pitch",O))},z.prototype._afterEase=function(O,$){if(!(this._easeId&&$&&this._easeId===$)){delete this._easeId;var pe=this._zooming,de=this._rotating,Ie=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,pe&&this.fire(new i.Event("zoomend",O)),de&&this.fire(new i.Event("rotateend",O)),Ie&&this.fire(new i.Event("pitchend",O)),this.fire(new i.Event("moveend",O))}},z.prototype.flyTo=function(O,$){var pe=this;if(!O.essential&&i.browser.prefersReducedMotion){var de=i.pick(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(de,$)}this.stop(),O=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},O);var Ie=this.transform,$e=this.getZoom(),pt=this.getBearing(),Kt=this.getPitch(),ir=this.getPadding(),Jt="zoom"in O?i.clamp(+O.zoom,Ie.minZoom,Ie.maxZoom):$e,vt="bearing"in O?this._normalizeBearing(O.bearing,pt):pt,Pt="pitch"in O?+O.pitch:Kt,Wt="padding"in O?O.padding:Ie.padding,rr=Ie.zoomScale(Jt-$e),dr=i.Point.convert(O.offset),pr=Ie.centerPoint.add(dr),kr=Ie.pointLocation(pr),Ar=i.LngLat.convert(O.center||kr);this._normalizeCenter(Ar);var gr=Ie.project(kr),Cr=Ie.project(Ar).sub(gr),cr=O.curve,Gr=Math.max(Ie.width,Ie.height),ei=Gr/rr,yi=Cr.mag();if("minZoom"in O){var tn=i.clamp(Math.min(O.minZoom,$e,Jt),Ie.minZoom,Ie.maxZoom),Di=Gr/Ie.zoomScale(tn-$e);cr=Math.sqrt(Di/yi*2)}var ln=cr*cr;function Qn(fo){var as=(ei*ei-Gr*Gr+(fo?-1:1)*ln*ln*yi*yi)/(2*(fo?ei:Gr)*ln*yi);return Math.log(Math.sqrt(as*as+1)-as)}function qn(fo){return(Math.exp(fo)-Math.exp(-fo))/2}function rn(fo){return(Math.exp(fo)+Math.exp(-fo))/2}function bn(fo){return qn(fo)/rn(fo)}var mn=Qn(0),Gn=function(fo){return rn(mn)/rn(mn+cr*fo)},da=function(fo){return Gr*((rn(mn)*bn(mn+cr*fo)-qn(mn))/ln)/yi},No=(Qn(1)-mn)/cr;if(Math.abs(yi)<1e-6||!isFinite(No)){if(Math.abs(Gr-ei)<1e-6)return this.easeTo(O,$);var Ro=eiO.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=pt!==vt,this._pitching=Pt!==Kt,this._padding=!Ie.isPaddingEqual(Wt),this._prepareEase($,!1),this._ease(function(fo){var as=fo*No,tl=1/Gn(as);Ie.zoom=fo===1?Jt:$e+Ie.scaleZoom(tl),pe._rotating&&(Ie.bearing=i.number(pt,vt,fo)),pe._pitching&&(Ie.pitch=i.number(Kt,Pt,fo)),pe._padding&&(Ie.interpolatePadding(ir,Wt,fo),pr=Ie.centerPoint.add(dr));var zu=fo===1?Ar:Ie.unproject(gr.add(Cr.mult(da(as))).mult(tl));Ie.setLocationAtPoint(Ie.renderWorldCopies?zu.wrap():zu,pr),pe._fireMoveEvents($)},function(){return pe._afterEase($)},O),this},z.prototype.isEasing=function(){return!!this._easeFrameId},z.prototype.stop=function(){return this._stop()},z.prototype._stop=function(O,$){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var pe=this._onEaseEnd;delete this._onEaseEnd,pe.call(this,$)}if(!O){var de=this.handlers;de&&de.stop(!1)}return this},z.prototype._ease=function(O,$,pe){pe.animate===!1||pe.duration===0?(O(1),$()):(this._easeStart=i.browser.now(),this._easeOptions=pe,this._onEaseFrame=O,this._onEaseEnd=$,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},z.prototype._renderFrameCallback=function(){var O=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},z.prototype._normalizeBearing=function(O,$){O=i.wrap(O,-180,180);var pe=Math.abs(O-$);return Math.abs(O-360-$)180?-360:pe<-180?360:0}},z}(i.Evented),Dn=function(z){z===void 0&&(z={}),this.options=z,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Dn.prototype.getDefaultPosition=function(){return"bottom-right"},Dn.prototype.onAdd=function(z){var K=this.options&&this.options.compact;return this._map=z,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"),K&&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),K===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Dn.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},Dn.prototype._setElementTitle=function(z,K){var O=this._map._getUIString("AttributionControl."+K);z.title=O,z.setAttribute("aria-label",O)},Dn.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"))},Dn.prototype._updateEditLink=function(){var z=this._editLink;z||(z=this._editLink=this._container.querySelector(".mapbox-improve-map"));var K=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(z){var O=K.reduce(function($,pe,de){return pe.value&&($+=pe.key+"="+pe.value+(de=0)return!1;return!0});var Ie=z.join(" | ");Ie!==this._attribHTML&&(this._attribHTML=Ie,z.length?(this._innerContainer.innerHTML=Ie,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Dn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Rn=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Rn.prototype.onAdd=function(z){this._map=z,this._container=o.create("div","mapboxgl-ctrl");var K=o.create("a","mapboxgl-ctrl-logo");return K.target="_blank",K.rel="noopener nofollow",K.href="https://www.mapbox.com/",K.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),K.setAttribute("rel","noopener nofollow"),this._container.appendChild(K),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Rn.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Rn.prototype.getDefaultPosition=function(){return"bottom-left"},Rn.prototype._updateLogo=function(z){(!z||z.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Rn.prototype._logoRequired=function(){if(this._map.style){var z=this._map.style.sourceCaches;for(var K in z){var O=z[K].getSource();if(O.mapbox_logo)return!0}return!1}},Rn.prototype._updateCompact=function(){var z=this._container.children;if(z.length){var K=z[0];this._map.getCanvasContainer().offsetWidth<250?K.classList.add("mapboxgl-compact"):K.classList.remove("mapboxgl-compact")}};var fn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};fn.prototype.add=function(z){var K=++this._id,O=this._queue;return O.push({callback:z,id:K,cancelled:!1}),K},fn.prototype.remove=function(z){for(var K=this._currentlyRunning,O=K?this._queue.concat(K):this._queue,$=0,pe=O;$O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitchZa)throw new Error("maxPitch must be less than or equal to "+Za);var pe=new yo(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies);if(Y.call(this,pe,O),this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=O.preserveDrawingBuffer,this._antialias=O.antialias,this._trackResize=O.trackResize,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=O.collectResourceTiming,this._renderTaskQueue=new fn,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Ai,O.locale),this._clickTolerance=O.clickTolerance,this._requestManager=new i.RequestManager(O.transformRequest,O.accessToken),typeof O.container=="string"){if(this._container=i.window.document.getElementById(O.container),!this._container)throw new Error("Container '"+O.container+"' not found.")}else if(O.container instanceof Ln)this._container=O.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(O.maxBounds&&this.setMaxBounds(O.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return $._update(!1)}),this.on("moveend",function(){return $._update(!1)}),this.on("zoom",function(){return $._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 yn(this,O);var de=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new Vl(de).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,i.extend({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new Dn({customAttribution:O.customAttribution})),this.addControl(new Rn,O.logoPosition),this.on("style.load",function(){$.transform.unmodified&&$.jumpTo($.style.stylesheet)}),this.on("data",function(Ie){$._update(Ie.dataType==="style"),$.fire(new i.Event(Ie.dataType+"data",Ie))}),this.on("dataloading",function(Ie){$.fire(new i.Event(Ie.dataType+"dataloading",Ie))})}Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z;var K={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return z.prototype._getMapId=function(){return this._mapId},z.prototype.addControl=function($,pe){if(pe===void 0&&($.getDefaultPosition?pe=$.getDefaultPosition():pe="top-right"),!$||!$.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 de=$.onAdd(this);this._controls.push($);var Ie=this._controlPositions[pe];return pe.indexOf("bottom")!==-1?Ie.insertBefore(de,Ie.firstChild):Ie.appendChild(de),this},z.prototype.removeControl=function($){if(!$||!$.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 pe=this._controls.indexOf($);return pe>-1&&this._controls.splice(pe,1),$.onRemove(this),this},z.prototype.hasControl=function($){return this._controls.indexOf($)>-1},z.prototype.resize=function($){var pe=this._containerDimensions(),de=pe[0],Ie=pe[1];this._resizeCanvas(de,Ie),this.transform.resize(de,Ie),this.painter.resize(de,Ie);var $e=!this._moving;return $e&&(this.stop(),this.fire(new i.Event("movestart",$)).fire(new i.Event("move",$))),this.fire(new i.Event("resize",$)),$e&&this.fire(new i.Event("moveend",$)),this},z.prototype.getBounds=function(){return this.transform.getBounds()},z.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},z.prototype.setMaxBounds=function($){return this.transform.setMaxBounds(i.LngLatBounds.convert($)),this._update()},z.prototype.setMinZoom=function($){if($=$==null?gn:$,$>=gn&&$<=this.transform.maxZoom)return this.transform.minZoom=$,this._update(),this.getZoom()<$&&this.setZoom($),this;throw new Error("minZoom must be between "+gn+" and the current maxZoom, inclusive")},z.prototype.getMinZoom=function(){return this.transform.minZoom},z.prototype.setMaxZoom=function($){if($=$==null?ca:$,$>=this.transform.minZoom)return this.transform.maxZoom=$,this._update(),this.getZoom()>$&&this.setZoom($),this;throw new Error("maxZoom must be greater than the current minZoom")},z.prototype.getMaxZoom=function(){return this.transform.maxZoom},z.prototype.setMinPitch=function($){if($=$==null?Kn:$,$=Kn&&$<=this.transform.maxPitch)return this.transform.minPitch=$,this._update(),this.getPitch()<$&&this.setPitch($),this;throw new Error("minPitch must be between "+Kn+" and the current maxPitch, inclusive")},z.prototype.getMinPitch=function(){return this.transform.minPitch},z.prototype.setMaxPitch=function($){if($=$==null?Za:$,$>Za)throw new Error("maxPitch must be less than or equal to "+Za);if($>=this.transform.minPitch)return this.transform.maxPitch=$,this._update(),this.getPitch()>$&&this.setPitch($),this;throw new Error("maxPitch must be greater than the current minPitch")},z.prototype.getMaxPitch=function(){return this.transform.maxPitch},z.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},z.prototype.setRenderWorldCopies=function($){return this.transform.renderWorldCopies=$,this._update()},z.prototype.project=function($){return this.transform.locationPoint(i.LngLat.convert($))},z.prototype.unproject=function($){return this.transform.pointLocation(i.Point.convert($))},z.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},z.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},z.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},z.prototype._createDelegatedListener=function($,pe,de){var Ie=this,$e;if($==="mouseenter"||$==="mouseover"){var pt=!1,Kt=function(rr){var dr=Ie.getLayer(pe)?Ie.queryRenderedFeatures(rr.point,{layers:[pe]}):[];dr.length?pt||(pt=!0,de.call(Ie,new oe($,Ie,rr.originalEvent,{features:dr}))):pt=!1},ir=function(){pt=!1};return{layer:pe,listener:de,delegates:{mousemove:Kt,mouseout:ir}}}else if($==="mouseleave"||$==="mouseout"){var Jt=!1,vt=function(rr){var dr=Ie.getLayer(pe)?Ie.queryRenderedFeatures(rr.point,{layers:[pe]}):[];dr.length?Jt=!0:Jt&&(Jt=!1,de.call(Ie,new oe($,Ie,rr.originalEvent)))},Pt=function(rr){Jt&&(Jt=!1,de.call(Ie,new oe($,Ie,rr.originalEvent)))};return{layer:pe,listener:de,delegates:{mousemove:vt,mouseout:Pt}}}else{var Wt=function(rr){var dr=Ie.getLayer(pe)?Ie.queryRenderedFeatures(rr.point,{layers:[pe]}):[];dr.length&&(rr.features=dr,de.call(Ie,rr),delete rr.features)};return{layer:pe,listener:de,delegates:($e={},$e[$]=Wt,$e)}}},z.prototype.on=function($,pe,de){if(de===void 0)return Y.prototype.on.call(this,$,pe);var Ie=this._createDelegatedListener($,pe,de);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$]=this._delegatedListeners[$]||[],this._delegatedListeners[$].push(Ie);for(var $e in Ie.delegates)this.on($e,Ie.delegates[$e]);return this},z.prototype.once=function($,pe,de){if(de===void 0)return Y.prototype.once.call(this,$,pe);var Ie=this._createDelegatedListener($,pe,de);for(var $e in Ie.delegates)this.once($e,Ie.delegates[$e]);return this},z.prototype.off=function($,pe,de){var Ie=this;if(de===void 0)return Y.prototype.off.call(this,$,pe);var $e=function(pt){for(var Kt=pt[$],ir=0;ir180;){var de=K.locationPoint(Y);if(de.x>=0&&de.y>=0&&de.x<=K.width&&de.y<=K.height)break;Y.lng>K.center.lng?Y.lng-=360:Y.lng+=360}return Y}var ro={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 Ao(Y,z,K){var O=Y.classList;for(var $ in ro)O.remove("mapboxgl-"+K+"-anchor-"+$);O.add("mapboxgl-"+K+"-anchor-"+z)}var Jn=function(Y){function z(K,O){if(Y.call(this),(K instanceof i.window.HTMLElement||O)&&(K=i.extend({element:K},O)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=K&&K.anchor||"center",this._color=K&&K.color||"#3FB1CE",this._scale=K&&K.scale||1,this._draggable=K&&K.draggable||!1,this._clickTolerance=K&&K.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=K&&K.rotation||0,this._rotationAlignment=K&&K.rotationAlignment||"auto",this._pitchAlignment=K&&K.pitchAlignment&&K.pitchAlignment!=="auto"?K.pitchAlignment:this._rotationAlignment,!K||!K.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var $=o.createNS("http://www.w3.org/2000/svg","svg"),pe=41,de=27;$.setAttributeNS(null,"display","block"),$.setAttributeNS(null,"height",pe+"px"),$.setAttributeNS(null,"width",de+"px"),$.setAttributeNS(null,"viewBox","0 0 "+de+" "+pe);var Ie=o.createNS("http://www.w3.org/2000/svg","g");Ie.setAttributeNS(null,"stroke","none"),Ie.setAttributeNS(null,"stroke-width","1"),Ie.setAttributeNS(null,"fill","none"),Ie.setAttributeNS(null,"fill-rule","evenodd");var $e=o.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"fill-rule","nonzero");var pt=o.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pt.setAttributeNS(null,"fill","#000000");for(var Kt=[{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"}],ir=0,Jt=Kt;ir=$}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},z.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"},z.prototype._addDragHandler=function(O){this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},z.prototype.setDraggable=function(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},z.prototype.isDraggable=function(){return this._draggable},z.prototype.setRotation=function(O){return this._rotation=O||0,this._update(),this},z.prototype.getRotation=function(){return this._rotation},z.prototype.setRotationAlignment=function(O){return this._rotationAlignment=O||"auto",this._update(),this},z.prototype.getRotationAlignment=function(){return this._rotationAlignment},z.prototype.setPitchAlignment=function(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this},z.prototype.getPitchAlignment=function(){return this._pitchAlignment},z}(i.Evented),Oa={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_o;function Po(Y){_o!==void 0?Y(_o):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(z){_o=z.state!=="denied",Y(_o)}):(_o=!!i.window.navigator.geolocation,Y(_o))}var Jo=0,Xl=!1,$c=function(Y){function z(K){Y.call(this),this.options=i.extend({},Oa,K),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.onAdd=function(O){return this._map=O,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Po(this._setupUI),this._container},z.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,Jo=0,Xl=!1},z.prototype._isOutOfMapMaxBounds=function(O){var $=this._map.getMaxBounds(),pe=O.coords;return $&&(pe.longitude<$.getWest()||pe.longitude>$.getEast()||pe.latitude<$.getSouth()||pe.latitude>$.getNorth())},z.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}},z.prototype._onSuccess=function(O){if(this._map){if(this._isOutOfMapMaxBounds(O)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",O)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(O),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",O)),this._finish()}},z.prototype._updateCamera=function(O){var $=new i.LngLat(O.coords.longitude,O.coords.latitude),pe=O.coords.accuracy,de=this._map.getBearing(),Ie=i.extend({bearing:de},this.options.fitBoundsOptions);this._map.fitBounds($.toBounds(pe),Ie,{geolocateSource:!0})},z.prototype._updateMarker=function(O){if(O){var $=new i.LngLat(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat($).addTo(this._map),this._userLocationDotMarker.setLngLat($).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},z.prototype._updateCircleRadius=function(){var O=this._map._container.clientHeight/2,$=this._map.unproject([0,O]),pe=this._map.unproject([1,O]),de=$.distanceTo(pe),Ie=Math.ceil(2*this._accuracy/de);this._circleElement.style.width=Ie+"px",this._circleElement.style.height=Ie+"px"},z.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},z.prototype._onError=function(O){if(this._map){if(this.options.trackUserLocation)if(O.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var $=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=$,this._geolocateButton.setAttribute("aria-label",$),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&Xl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",O)),this._finish()}},z.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},z.prototype._setupUI=function(O){var $=this;if(this._container.addEventListener("contextmenu",function(Ie){return Ie.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",O===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var pe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=pe,this._geolocateButton.setAttribute("aria-label",pe)}else{var de=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}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 Jn(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Jn({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(Ie){var $e=Ie.originalEvent&&Ie.originalEvent.type==="resize";!Ie.geolocateSource&&$._watchState==="ACTIVE_LOCK"&&!$e&&($._watchState="BACKGROUND",$._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),$._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),$.fire(new i.Event("trackuserlocationend")))})},z.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":Jo--,Xl=!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"),Jo++;var O;Jo>1?(O={maximumAge:6e5,timeout:0},Xl=!0):(O=this.options.positionOptions,Xl=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},z.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)},z}(i.Evented),xs={maxWidth:100,unit:"metric"},Qc=function(z){this.options=i.extend({},xs,z),i.bindAll(["_onMove","setUnit"],this)};Qc.prototype.getDefaultPosition=function(){return"bottom-left"},Qc.prototype._onMove=function(){El(this._map,this._container,this.options)},Qc.prototype.onAdd=function(z){return this._map=z,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",z.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Qc.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Qc.prototype.setUnit=function(z){this.options.unit=z,El(this._map,this._container,this.options)};function El(Y,z,K){var O=K&&K.maxWidth||100,$=Y._container.clientHeight/2,pe=Y.unproject([0,$]),de=Y.unproject([O,$]),Ie=pe.distanceTo(de);if(K&&K.unit==="imperial"){var $e=3.2808*Ie;if($e>5280){var pt=$e/5280;bc(z,O,pt,Y._getUIString("ScaleControl.Miles"))}else bc(z,O,$e,Y._getUIString("ScaleControl.Feet"))}else if(K&&K.unit==="nautical"){var Kt=Ie/1852;bc(z,O,Kt,Y._getUIString("ScaleControl.NauticalMiles"))}else Ie>=1e3?bc(z,O,Ie/1e3,Y._getUIString("ScaleControl.Kilometers")):bc(z,O,Ie,Y._getUIString("ScaleControl.Meters"))}function bc(Y,z,K,O){var $=yf(K),pe=$/K;Y.style.width=z*pe+"px",Y.innerHTML=$+" "+O}function wc(Y){var z=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*z)/z}function yf(Y){var z=Math.pow(10,(""+Math.floor(Y)).length-1),K=Y/z;return K=K>=10?10:K>=5?5:K>=3?3:K>=2?2:K>=1?1:wc(K),z*K}var Hl=function(z){this._fullscreen=!1,z&&z.container&&(z.container instanceof i.window.HTMLElement?this._container=z.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")};Hl.prototype.onAdd=function(z){return this._map=z,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},Hl.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hl.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},Hl.prototype._setupUI=function(){var z=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",z).setAttribute("aria-hidden",!0),z.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hl.prototype._updateTitle=function(){var z=this._getTitle();this._fullscreenButton.setAttribute("aria-label",z),this._fullscreenButton.title=z},Hl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Hl.prototype._isFullscreen=function(){return this._fullscreen},Hl.prototype._changeIcon=function(){var z=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;z===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Hl.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 Fc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ef=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ls=function(Y){function z(K){Y.call(this),this.options=i.extend(Object.create(Fc),K),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.addTo=function(O){return this._map&&this.remove(),this._map=O,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},z.prototype.isOpen=function(){return!!this._map},z.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},z.prototype.getLngLat=function(){return this._lngLat},z.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},z.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},z.prototype.getElement=function(){return this._container},z.prototype.setText=function(O){return this.setDOMContent(i.window.document.createTextNode(O))},z.prototype.setHTML=function(O){var $=i.window.document.createDocumentFragment(),pe=i.window.document.createElement("body"),de;for(pe.innerHTML=O;de=pe.firstChild,!!de;)$.appendChild(de);return this.setDOMContent($)},z.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},z.prototype.setMaxWidth=function(O){return this.options.maxWidth=O,this._update(),this},z.prototype.setDOMContent=function(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this},z.prototype.addClassName=function(O){this._container&&this._container.classList.add(O)},z.prototype.removeClassName=function(O){this._container&&this._container.classList.remove(O)},z.prototype.setOffset=function(O){return this.options.offset=O,this._update(),this},z.prototype.toggleClassName=function(O){if(this._container)return this._container.classList.toggle(O)},z.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))},z.prototype._onMouseUp=function(O){this._update(O.point)},z.prototype._onMouseMove=function(O){this._update(O.point)},z.prototype._onDrag=function(O){this._update(O.point)},z.prototype._update=function(O){var $=this,pe=this._lngLat||this._trackPointer;if(!(!this._map||!pe||!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(vt){return $._container.classList.add(vt)}),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=ma(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!O))){var de=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat),Ie=this.options.anchor,$e=_f(this.options.offset);if(!Ie){var pt=this._container.offsetWidth,Kt=this._container.offsetHeight,ir;de.y+$e.bottom.ythis._map.transform.height-Kt?ir=["bottom"]:ir=[],de.xthis._map.transform.width-pt/2&&ir.push("right"),ir.length===0?Ie="bottom":Ie=ir.join("-")}var Jt=de.add($e[Ie]).round();o.setTransform(this._container,ro[Ie]+" translate("+Jt.x+"px,"+Jt.y+"px)"),Ao(this._container,Ie,"popup")}},z.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var O=this._container.querySelector(ef);O&&O.focus()}},z.prototype._onClose=function(){this.remove()},z}(i.Evented);function _f(Y){if(Y)if(typeof Y=="number"){var z=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(z,z),"top-right":new i.Point(-z,z),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(z,-z),"bottom-right":new i.Point(-z,-z),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var K=i.Point.convert(Y);return{center:K,top:K,"top-left":K,"top-right":K,bottom:K,"bottom-left":K,"bottom-right":K,left:K,right:K}}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 _f(new i.Point(0,0))}var ns={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:vn,NavigationControl:Xn,GeolocateControl:$c,AttributionControl:Dn,ScaleControl:Qc,FullscreenControl:Hl,Popup:ls,Marker:Jn,Style:mu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:jn,clearPrewarmedResources:la,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 Pi.workerCount},set workerCount(Y){Pi.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(z){i.clearTileCache(z)},workerUrl:""};return ns}),r})});var GUe=ye((Syr,HUe)=>{"use strict";var tw=Mr(),xHt=Ll().sanitizeHTML,bHt=UK(),NUe=c1();function UUe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=NUe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ig=UUe.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=jF(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,!!jF(e)){var r=wHt(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 VUe(e){var t={},r={};switch(e.type){case"circle":tw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":tw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":tw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=bHt(n.textposition,n.iconsize);tw.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}),tw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":tw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function wHt(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=xHt(e.sourceattribution)),n}HUe.exports=function(t,r,n){var i=new UUe(t,r);return i.update(n),i}});var QUe=ye((Myr,$Ue)=>{"use strict";var XK=ZK(),YK=Mr(),XUe=ix(),jUe=ba(),THt=Qa(),AHt=gv(),WF=Nc(),YUe=Sg(),SHt=YUe.drawMode,MHt=YUe.selectMode,EHt=wf().prepSelect,kHt=wf().clearOutline,CHt=wf().clearSelectionsCache,LHt=wf().selectOnClick,yx=c1(),PHt=GUe();function KUe(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 Ah=KUe.prototype;Ah.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)};Ah.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=JUe(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 XK.Map({container:i.div,style:o.style,center:KK(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 XK.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(XUe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Ah.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=JUe(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(XUe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Ah.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&&LHt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&WF.click(n,l.originalEvent)}}};Ah.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=YK.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),MHt(a)||SHt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){EHt(l,u,c,t.dragOptions,a)},AHt.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))};Ah.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])};Ah.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 JK=Mr(),IHt=k_(),DHt=Zd(),eVe=Pk();tVe.exports=function(t,r,n){IHt(t,r,n,{type:"mapbox",attributes:eVe,handleDefaults:RHt,partition:"y",accessToken:r._mapboxAccessToken})};function RHt(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,DHt(e,t,{name:"layers",handleItemDefaults:zHt}),t._input=e}function zHt(e,t){function r(l,u){return JK.coerce(e,t,eVe.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",JK.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"),JK.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var ZF=ye(Np=>{"use strict";var iVe=ZK(),tm=Mr(),$K=tm.strTranslate,FHt=tm.strScale,qHt=kd().getSubplotCalcData,OHt=Zp(),BHt=xa(),nVe=ao(),NHt=Ll(),UHt=QUe(),_x="mapbox",Qm=Np.constants=c1();Np.name=_x;Np.attr="subplot";Np.idRoot=_x;Np.idRegex=Np.attrRegex=tm.counterRegex(_x);var VHt=["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=Pk();Np.supplyLayoutDefaults=rVe();var aVe=!0;Np.plot=function(t){aVe&&(aVe=!1,tm.warn(VHt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[_x];if(iVe.version!==Qm.requiredVersion)throw new Error(Qm.wrongVersionErrorMsg);var a=HHt(t,i);iVe.accessToken=a;for(var o=0;og/2){var E=d.split("|").join("
");x.text(E).attr("data-unformatted",E).call(NHt.convertToTspans,e),b=nVe.bBox(x.node())}x.attr("transform",$K(-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 k=1;b.width+6>g&&(k=g/(b.width+6));var S=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",$K(S[0],S[1])+FHt(k))}};function HHt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l1&&tm.warn(Qm.multipleTokensErrorMsg),i[0]):(a.length&&tm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function oVe(e){return typeof e=="string"&&(Qm.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=0;n{"use strict";var Cyr=["*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(" ");sVe.exports={attributes:BF(),supplyDefaults:_Ue(),colorbar:Kd(),formatLabels:NK(),calc:lz(),plot:DUe(),hoverPoints:GF().hoverPoints,eventData:qUe(),selectPoints:BUe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:ZF(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var cVe=ye((Pyr,uVe)=>{"use strict";uVe.exports=lVe()});var QK=ye((Iyr,fVe)=>{"use strict";var f1=J5(),GHt=Kl(),jHt=Wo().hovertemplateAttrs,WHt=vl(),xx=no().extendFlat;fVe.exports=xx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:xx({},f1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:f1.text,hovertext:f1.hovertext,marker:{line:{color:xx({},f1.marker.line.color,{editType:"plot"}),width:xx({},f1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:xx({},f1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:xx({},f1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:xx({},f1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:f1.hoverinfo,hovertemplate:jHt({},{keys:["properties"]}),showlegend:xx({},WHt.showlegend,{dflt:!1})},GHt("",{cLetter:"z",editTypeOverride:"calc"}))});var dVe=ye((Dyr,hVe)=>{"use strict";var zk=Mr(),ZHt=Uh(),XHt=QK();hVe.exports=function(t,r,n,i){function a(c,f){return zk.coerce(t,r,XHt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!zk.isArrayOrTypedArray(o)||!o.length||!zk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||zk.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),ZHt(t,r,i,a,{prefix:"",cLetter:"z"}),zk.coerceSelectionMarkerOpacity(r,a)}});var eJ=ye((Ryr,gVe)=>{"use strict";var YHt=uo(),h1=Mr(),KHt=Mu(),JHt=ao(),$Ht=tx().makeBlank,vVe=ix();function QHt(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:$Ht()};if(!r)return a;var o=vVe.extractTraceFeature(e);if(!o)return a;var s=KHt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;h1.isArrayOrTypedArray(l.opacity)&&(c=function(E){var k=E.mo;return YHt(k)?+h1.constrain(k,0,1):0});var f;h1.isArrayOrTypedArray(u.color)&&(f=function(E){return E.mlc});var h;h1.isArrayOrTypedArray(u.width)&&(h=function(E){return E.mlw});for(var d=0;d{"use strict";var yVe=eJ().convert,eGt=eJ().convertOnSelect,mVe=c1().traceLayerPrefix;function _Ve(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",mVe+t+"-fill"],["line",mVe+t+"-line"]],this.below=null}var TA=_Ve.prototype;TA.update=function(e){this._update(yVe(e)),e[0].trace._glTrace=this};TA.updateOnSelect=function(e){this._update(eGt(e))};TA._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])};TA.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};xVe.exports=function(t,r){var n=r[0].trace,i=new _Ve(t,n.uid),a=i.sourceId,o=yVe(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 TVe=ye((qyr,wVe)=>{"use strict";var Fyr=["*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(" ");wVe.exports={attributes:QK(),supplyDefaults:dVe(),colorbar:S_(),calc:Lz(),plot:bVe(),hoverPoints:Iz(),eventData:Dz(),selectPoints:Rz(),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";AVe.exports=TVe()});var rJ=ye((Byr,EVe)=>{"use strict";var tGt=Kl(),rGt=Wo().hovertemplateAttrs,MVe=vl(),XF=BF(),tJ=no().extendFlat;EVe.exports=tJ({lon:XF.lon,lat:XF.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:XF.text,hovertext:XF.hovertext,hoverinfo:tJ({},MVe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:rGt(),showlegend:tJ({},MVe.showlegend,{dflt:!1})},tGt("",{cLetter:"z",editTypeOverride:"calc"}))});var CVe=ye((Nyr,kVe)=>{"use strict";var iGt=Mr(),nGt=Uh(),aGt=rJ();kVe.exports=function(t,r,n,i){function a(u,c){return iGt.coerce(t,r,aGt,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"),nGt(t,r,i,a,{prefix:"",cLetter:"z"})}});var IVe=ye((Uyr,PVe)=>{"use strict";var iJ=uo(),oGt=Mr().isArrayOrTypedArray,nJ=es().BADNUM,sGt=zv(),LVe=Mr()._;PVe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=oGt(a)&&a.length,s=0;s{"use strict";var lGt=uo(),aJ=Mr(),DVe=va(),RVe=Mu(),zVe=es().BADNUM,uGt=tx().makeBlank;FVe.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:uGt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=aJ.isArrayOrTypedArray(l)&&l.length,f=aJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=RVe.extractOpts(r),g=b.reversescale?RVe.flipScale(b.colorscale):b.colorscale,E=g[0][1],k=DVe.opacity(E)<1?E:DVe.addOpacity(E,0),S=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var OVe=qVe(),cGt=c1().traceLayerPrefix;function BVe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",cGt+t+"-heatmap"]],this.below=null}var YF=BVe.prototype;YF.update=function(e){var t=this.subplot,r=this.layerList,n=OVe(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])};YF.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};NVe.exports=function(t,r){var n=r[0].trace,i=new BVe(t,n.uid),a=i.sourceId,o=OVe(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 HVe=ye((Gyr,VVe)=>{"use strict";var fGt=Qa(),hGt=GF().hoverPoints,dGt=GF().getExtraText;VVe.exports=function(t,r,n){var i=hGt(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=fGt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=dGt(s,l,o[0].t.labels),[a]}}});var jVe=ye((jyr,GVe)=>{"use strict";GVe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var ZVe=ye((Zyr,WVe)=>{"use strict";var Wyr=["*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(" ");WVe.exports={attributes:rJ(),supplyDefaults:CVe(),colorbar:S_(),formatLabels:NK(),calc:IVe(),plot:UVe(),hoverPoints:HVe(),eventData:jVe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";XVe.exports=ZVe()});var JVe=ye((Yyr,KVe)=>{KVe.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} +`),gr=Ie.createShader(Ie.FRAGMENT_SHADER);if(Ie.isContextLost()){this.failedToCreate=!0;return}Ie.shaderSource(gr,kr),Ie.compileShader(gr),Ie.attachShader(this.program,gr);var Cr=Ie.createShader(Ie.VERTEX_SHADER);if(Ie.isContextLost()){this.failedToCreate=!0;return}Ie.shaderSource(Cr,Ar),Ie.compileShader(Cr),Ie.attachShader(this.program,Cr),this.attributes={};var cr={};this.numAttributes=Kt.length;for(var Gr=0;Gr>16,Ie>>16],u_pixel_coord_lower:[de&65535,Ie&65535]}}function pf(Y,z,K,O){var $=K.imageManager.getPattern(Y.from.toString()),pe=K.imageManager.getPattern(Y.to.toString()),de=K.imageManager.getPixelSize(),Ie=de.width,$e=de.height,pt=Math.pow(2,O.tileID.overscaledZ),Kt=O.tileSize*Math.pow(2,K.transform.tileZoom)/pt,ir=Kt*(O.tileID.canonical.x+O.tileID.wrap*pt),Jt=Kt*O.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:$.tl,u_pattern_br_a:$.br,u_pattern_tl_b:pe.tl,u_pattern_br_b:pe.br,u_texsize:[Ie,$e],u_mix:z.t,u_pattern_size_a:$.displaySize,u_pattern_size_b:pe.displaySize,u_scale_a:z.fromScale,u_scale_b:z.toScale,u_tile_units_to_pixels:1/Cs(O,1,K.transform.tileZoom),u_pixel_coord_upper:[ir>>16,Jt>>16],u_pixel_coord_lower:[ir&65535,Jt&65535]}}var Ph=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_lightpos:new i.Uniform3f(Y,z.u_lightpos),u_lightintensity:new i.Uniform1f(Y,z.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,z.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,z.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,z.u_opacity)}},Dl=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_lightpos:new i.Uniform3f(Y,z.u_lightpos),u_lightintensity:new i.Uniform1f(Y,z.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,z.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,z.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,z.u_height_factor),u_image:new i.Uniform1i(Y,z.u_image),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade),u_opacity:new i.Uniform1f(Y,z.u_opacity)}},Ih=function(Y,z,K,O){var $=z.style.light,pe=$.properties.get("position"),de=[pe.x,pe.y,pe.z],Ie=i.create$1();$.properties.get("anchor")==="viewport"&&i.fromRotation(Ie,-z.transform.angle),i.transformMat3(de,de,Ie);var $e=$.properties.get("color");return{u_matrix:Y,u_lightpos:de,u_lightintensity:$.properties.get("intensity"),u_lightcolor:[$e.r,$e.g,$e.b],u_vertical_gradient:+K,u_opacity:O}},Zu=function(Y,z,K,O,$,pe,de){return i.extend(Ih(Y,z,K,O),pc(pe,z,de),{u_height_factor:-Math.pow(2,$.overscaledZ)/de.tileSize/8})},Dc=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},gc=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_image:new i.Uniform1i(Y,z.u_image),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade)}},hl=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_world:new i.Uniform2f(Y,z.u_world)}},ru=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_world:new i.Uniform2f(Y,z.u_world),u_image:new i.Uniform1i(Y,z.u_image),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade)}},mc=function(Y){return{u_matrix:Y}},Yc=function(Y,z,K,O){return i.extend(mc(Y),pc(K,z,O))},nc=function(Y,z){return{u_matrix:Y,u_world:z}},gf=function(Y,z,K,O,$){return i.extend(Yc(Y,z,K,O),{u_world:$})},gt=function(Y,z){return{u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,z.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,z.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},Bt=function(Y,z,K,O){var $=Y.transform,pe,de;if(O.paint.get("circle-pitch-alignment")==="map"){var Ie=Cs(K,1,$.zoom);pe=!0,de=[Ie,Ie]}else pe=!1,de=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(z.posMatrix,K,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+pe,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:de}},wr=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,z.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,z.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,z.u_overscale_factor)}},vr=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,z.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,z.u_viewport_size)}},Ur=function(Y,z,K){var O=Cs(K,1,z.zoom),$=Math.pow(2,z.zoom-K.tileID.overscaledZ),pe=K.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:z.cameraToCenterDistance,u_pixels_to_tile_units:O,u_extrude_scale:[z.pixelsToGLUnits[0]/(O*$),z.pixelsToGLUnits[1]/(O*$)],u_overscale_factor:pe}},fi=function(Y,z,K){return{u_matrix:Y,u_inv_matrix:z,u_camera_to_center_distance:K.cameraToCenterDistance,u_viewport_size:[K.width,K.height]}},xi=function(Y,z){return{u_color:new i.UniformColor(Y,z.u_color),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_overlay:new i.Uniform1i(Y,z.u_overlay),u_overlay_scale:new i.Uniform1f(Y,z.u_overlay_scale)}},Fi=function(Y,z,K){return K===void 0&&(K=1),{u_matrix:Y,u_color:z,u_overlay:0,u_overlay_scale:K}},Xi=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},hn=function(Y){return{u_matrix:Y}},Ti=function(Y,z){return{u_extrude_scale:new i.Uniform1f(Y,z.u_extrude_scale),u_intensity:new i.Uniform1f(Y,z.u_intensity),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix)}},qi=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_world:new i.Uniform2f(Y,z.u_world),u_image:new i.Uniform1i(Y,z.u_image),u_color_ramp:new i.Uniform1i(Y,z.u_color_ramp),u_opacity:new i.Uniform1f(Y,z.u_opacity)}},Ii=function(Y,z,K,O){return{u_matrix:Y,u_extrude_scale:Cs(z,1,K),u_intensity:O}},mi=function(Y,z,K,O){var $=i.create();i.ortho($,0,Y.width,Y.height,0,0,1);var pe=Y.context.gl;return{u_matrix:$,u_world:[pe.drawingBufferWidth,pe.drawingBufferHeight],u_image:K,u_color_ramp:O,u_opacity:z.paint.get("heatmap-opacity")}},Pn=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_image:new i.Uniform1i(Y,z.u_image),u_latrange:new i.Uniform2f(Y,z.u_latrange),u_light:new i.Uniform2f(Y,z.u_light),u_shadow:new i.UniformColor(Y,z.u_shadow),u_highlight:new i.UniformColor(Y,z.u_highlight),u_accent:new i.UniformColor(Y,z.u_accent)}},Ma=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_image:new i.Uniform1i(Y,z.u_image),u_dimension:new i.Uniform2f(Y,z.u_dimension),u_zoom:new i.Uniform1f(Y,z.u_zoom),u_unpack:new i.Uniform4f(Y,z.u_unpack)}},Ta=function(Y,z,K){var O=K.paint.get("hillshade-shadow-color"),$=K.paint.get("hillshade-highlight-color"),pe=K.paint.get("hillshade-accent-color"),de=K.paint.get("hillshade-illumination-direction")*(Math.PI/180);K.paint.get("hillshade-illumination-anchor")==="viewport"&&(de-=Y.transform.angle);var Ie=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(z.tileID.toUnwrapped(),Ie),u_image:0,u_latrange:qa(Y,z.tileID),u_light:[K.paint.get("hillshade-exaggeration"),de],u_shadow:O,u_highlight:$,u_accent:pe}},Ea=function(Y,z){var K=z.stride,O=i.create();return i.ortho(O,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(O,O,[0,-i.EXTENT,0]),{u_matrix:O,u_image:1,u_dimension:[K,K],u_zoom:Y.overscaledZ,u_unpack:z.getUnpackVector()}};function qa(Y,z){var K=Math.pow(2,z.canonical.z),O=z.canonical.y;return[new i.MercatorCoordinate(0,O/K).toLngLat().lat,new i.MercatorCoordinate(0,(O+1)/K).toLngLat().lat]}var Cn=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels)}},sn=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels),u_image:new i.Uniform1i(Y,z.u_image),u_image_height:new i.Uniform1f(Y,z.u_image_height)}},Ua=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,z.u_image),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels),u_scale:new i.Uniform3f(Y,z.u_scale),u_fade:new i.Uniform1f(Y,z.u_fade)}},mo=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_ratio:new i.Uniform1f(Y,z.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,z.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,z.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,z.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,z.u_sdfgamma),u_image:new i.Uniform1i(Y,z.u_image),u_tex_y_a:new i.Uniform1f(Y,z.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,z.u_tex_y_b),u_mix:new i.Uniform1f(Y,z.u_mix)}},Xo=function(Y,z,K){var O=Y.transform;return{u_matrix:yl(Y,z,K),u_ratio:1/Cs(z,1,O.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/O.pixelsToGLUnits[0],1/O.pixelsToGLUnits[1]]}},Ts=function(Y,z,K,O){return i.extend(Xo(Y,z,K),{u_image:0,u_image_height:O})},Qo=function(Y,z,K,O){var $=Y.transform,pe=Bo(z,$);return{u_matrix:yl(Y,z,K),u_texsize:z.imageAtlasTexture.size,u_ratio:1/Cs(z,1,$.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[pe,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},ys=function(Y,z,K,O,$){var pe=Y.transform,de=Y.lineAtlas,Ie=Bo(z,pe),$e=K.layout.get("line-cap")==="round",pt=de.getDash(O.from,$e),Kt=de.getDash(O.to,$e),ir=pt.width*$.fromScale,Jt=Kt.width*$.toScale;return i.extend(Xo(Y,z,K),{u_patternscale_a:[Ie/ir,-pt.height/2],u_patternscale_b:[Ie/Jt,-Kt.height/2],u_sdfgamma:de.width/(Math.min(ir,Jt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:pt.y,u_tex_y_b:Kt.y,u_mix:$.t})};function Bo(Y,z){return 1/Cs(Y,1,z.tileZoom)}function yl(Y,z,K){return Y.translatePosMatrix(z.tileID.posMatrix,z,K.paint.get("line-translate"),K.paint.get("line-translate-anchor"))}var Gs=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_tl_parent:new i.Uniform2f(Y,z.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,z.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,z.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,z.u_fade_t),u_opacity:new i.Uniform1f(Y,z.u_opacity),u_image0:new i.Uniform1i(Y,z.u_image0),u_image1:new i.Uniform1i(Y,z.u_image1),u_brightness_low:new i.Uniform1f(Y,z.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,z.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,z.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,z.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,z.u_spin_weights)}},Ds=function(Y,z,K,O,$){return{u_matrix:Y,u_tl_parent:z,u_scale_parent:K,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*$.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:$.paint.get("raster-brightness-min"),u_brightness_high:$.paint.get("raster-brightness-max"),u_saturation_factor:vs($.paint.get("raster-saturation")),u_contrast_factor:Ka($.paint.get("raster-contrast")),u_spin_weights:ia($.paint.get("raster-hue-rotate"))}};function ia(Y){Y*=Math.PI/180;var z=Math.sin(Y),K=Math.cos(Y);return[(2*K+1)/3,(-Math.sqrt(3)*z-K+1)/3,(Math.sqrt(3)*z-K+1)/3]}function Ka(Y){return Y>0?1/(1-Y):1+Y}function vs(Y){return Y>0?1-1/(1.001-Y):-Y}var Ko=function(Y,z){return{u_is_size_zoom_constant:new i.Uniform1i(Y,z.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,z.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,z.u_size_t),u_size:new i.Uniform1f(Y,z.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,z.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,z.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,z.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,z.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,z.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,z.u_coord_matrix),u_is_text:new i.Uniform1i(Y,z.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_texture:new i.Uniform1i(Y,z.u_texture)}},iu=function(Y,z){return{u_is_size_zoom_constant:new i.Uniform1i(Y,z.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,z.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,z.u_size_t),u_size:new i.Uniform1f(Y,z.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,z.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,z.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,z.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,z.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,z.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,z.u_coord_matrix),u_is_text:new i.Uniform1i(Y,z.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_texture:new i.Uniform1i(Y,z.u_texture),u_gamma_scale:new i.Uniform1f(Y,z.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,z.u_is_halo)}},Du=function(Y,z){return{u_is_size_zoom_constant:new i.Uniform1i(Y,z.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,z.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,z.u_size_t),u_size:new i.Uniform1f(Y,z.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,z.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,z.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,z.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,z.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,z.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,z.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,z.u_coord_matrix),u_is_text:new i.Uniform1i(Y,z.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,z.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_texsize_icon:new i.Uniform2f(Y,z.u_texsize_icon),u_texture:new i.Uniform1i(Y,z.u_texture),u_texture_icon:new i.Uniform1i(Y,z.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,z.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,z.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,z.u_is_halo)}},ac=function(Y,z,K,O,$,pe,de,Ie,$e,pt){var Kt=$.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:z?z.uSizeT:0,u_size:z?z.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+K,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:$.options.fadeDuration?$.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:de,u_coord_matrix:Ie,u_is_text:+$e,u_pitch_with_map:+O,u_texsize:pt,u_texture:0}},mf=function(Y,z,K,O,$,pe,de,Ie,$e,pt,Kt){var ir=$.transform;return i.extend(ac(Y,z,K,O,$,pe,de,Ie,$e,pt),{u_gamma_scale:O?Math.cos(ir._pitch)*ir.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Kt})},bu=function(Y,z,K,O,$,pe,de,Ie,$e,pt){return i.extend(mf(Y,z,K,O,$,pe,de,Ie,!0,$e,!0),{u_texsize_icon:pt,u_texture_icon:1})},Kc=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_opacity:new i.Uniform1f(Y,z.u_opacity),u_color:new i.UniformColor(Y,z.u_color)}},Ru=function(Y,z){return{u_matrix:new i.UniformMatrix4f(Y,z.u_matrix),u_opacity:new i.Uniform1f(Y,z.u_opacity),u_image:new i.Uniform1i(Y,z.u_image),u_pattern_tl_a:new i.Uniform2f(Y,z.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,z.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,z.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,z.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,z.u_texsize),u_mix:new i.Uniform1f(Y,z.u_mix),u_pattern_size_a:new i.Uniform2f(Y,z.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,z.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,z.u_scale_a),u_scale_b:new i.Uniform1f(Y,z.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,z.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,z.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,z.u_tile_units_to_pixels)}},Rc=function(Y,z,K){return{u_matrix:Y,u_opacity:z,u_color:K}},Ra=function(Y,z,K,O,$,pe){return i.extend(pf(O,pe,K,$),{u_matrix:Y,u_opacity:z})},eo={fillExtrusion:Ph,fillExtrusionPattern:Dl,fill:Dc,fillPattern:gc,fillOutline:hl,fillOutlinePattern:ru,circle:gt,collisionBox:wr,collisionCircle:vr,debug:xi,clippingMask:Xi,heatmap:Ti,heatmapTexture:qi,hillshade:Pn,hillshadePrepare:Ma,line:Cn,lineGradient:sn,linePattern:Ua,lineSDF:mo,raster:Gs,symbolIcon:Ko,symbolSDF:iu,symbolTextAndIcon:Du,background:Kc,backgroundPattern:Ru},Jc;function yc(Y,z,K,O,$,pe,de){for(var Ie=Y.context,$e=Ie.gl,pt=Y.useProgram("collisionBox"),Kt=[],ir=0,Jt=0,vt=0;vt0){var Ar=i.create(),gr=dr;i.mul(Ar,rr.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Ar,Ar,rr.placementViewportMatrix),Kt.push({circleArray:kr,circleOffset:Jt,transform:gr,invTransform:Ar}),ir+=kr.length/4,Jt=ir}pr&&pt.draw(Ie,$e.LINES,Wi.disabled,$i.disabled,Y.colorModeForRenderPass(),yr.disabled,Ur(dr,Y.transform,Wt),K.id,pr.layoutVertexBuffer,pr.indexBuffer,pr.segments,null,Y.transform.zoom,null,null,pr.collisionVertexBuffer)}}if(!(!de||!Kt.length)){var Cr=Y.useProgram("collisionCircle"),cr=new i.StructArrayLayout2f1f2i16;cr.resize(ir*4),cr._trim();for(var Gr=0,ei=0,yi=Kt;ei=0&&(Pt[rr.associatedIconIndex]={shiftedAnchor:ln,angle:Qn})}}if(Kt){vt.clear();for(var rn=Y.icon.placedSymbolArray,bn=0;bn0){var de=i.browser.now(),Ie=(de-Y.timeAdded)/pe,$e=z?(de-z.timeAdded)/pe:-1,pt=K.getSource(),Kt=$.coveringZoomLevel({tileSize:pt.tileSize,roundZoom:pt.roundZoom}),ir=!z||Math.abs(z.tileID.overscaledZ-Kt)>Math.abs(Y.tileID.overscaledZ-Kt),Jt=ir&&Y.refreshedUponExpiration?1:i.clamp(ir?Ie:1-$e,0,1);return Y.refreshedUponExpiration&&Ie>=1&&(Y.refreshedUponExpiration=!1),z?{opacity:1,mix:1-Jt}:{opacity:Jt,mix:0}}else return{opacity:1,mix:0}}function Ut(Y,z,K){var O=K.paint.get("background-color"),$=K.paint.get("background-opacity");if($!==0){var pe=Y.context,de=pe.gl,Ie=Y.transform,$e=Ie.tileSize,pt=K.paint.get("background-pattern");if(!Y.isPatternMissing(pt)){var Kt=!pt&&O.a===1&&$===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Kt){var ir=$i.disabled,Jt=Y.depthModeForSublayer(0,Kt==="opaque"?Wi.ReadWrite:Wi.ReadOnly),vt=Y.colorModeForRenderPass(),Pt=Y.useProgram(pt?"backgroundPattern":"background"),Wt=Ie.coveringTiles({tileSize:$e});pt&&(pe.activeTexture.set(de.TEXTURE0),Y.imageManager.bind(Y.context));for(var rr=K.getCrossfadeParameters(),dr=0,pr=Wt;dr "+K.overscaledZ);var dr=rr+" "+vt+"kb";Ga(Y,dr),de.draw(O,$.TRIANGLES,Ie,$e,ft.alphaBlended,yr.disabled,Fi(pe,i.Color.transparent,Wt),Kt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function Ga(Y,z){Y.initDebugOverlayCanvas();var K=Y.debugOverlayCanvas,O=Y.context.gl,$=Y.debugOverlayCanvas.getContext("2d");$.clearRect(0,0,K.width,K.height),$.shadowColor="white",$.shadowBlur=2,$.lineWidth=1.5,$.strokeStyle="white",$.textBaseline="top",$.font="bold 36px Open Sans, sans-serif",$.fillText(z,5,5),$.strokeText(z,5,5),Y.debugOverlayTexture.update(K),Y.debugOverlayTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}function To(Y,z,K){var O=Y.context,$=K.implementation;if(Y.renderPass==="offscreen"){var pe=$.prerender;pe&&(Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),pe.call($,O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),O.setStencilMode($i.disabled);var de=$.renderingMode==="3d"?new Wi(Y.context.gl.LEQUAL,Wi.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,Wi.ReadOnly);O.setDepthMode(de),$.render(O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState(),O.bindFramebuffer.set(null)}}var Wa={symbol:w,circle:it,heatmap:yt,line:Sr,fill:he,"fill-extrusion":Pe,hillshade:Je,raster:Mt,background:Ut,debug:pa,custom:To},co=function(z,K){this.context=new Fr(z),this.transform=K,this._tileTextures={},this.setup(),this.numSublayers=Zr.maxUnderzooming+Zr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new rh,this.gpuTimers={}};co.prototype.resize=function(z,K){if(this.width=z*i.browser.devicePixelRatio,this.height=K*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var O=0,$=this.style._order;O<$.length;O+=1){var pe=$[O];this.style._layers[pe].resize()}},co.prototype.setup=function(){var z=this.context,K=new i.StructArrayLayout2i4;K.emplaceBack(0,0),K.emplaceBack(i.EXTENT,0),K.emplaceBack(0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=z.createVertexBuffer(K,kc.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var O=new i.StructArrayLayout2i4;O.emplaceBack(0,0),O.emplaceBack(i.EXTENT,0),O.emplaceBack(0,i.EXTENT),O.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=z.createVertexBuffer(O,kc.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var $=new i.StructArrayLayout4i8;$.emplaceBack(0,0,0,0),$.emplaceBack(i.EXTENT,0,i.EXTENT,0),$.emplaceBack(0,i.EXTENT,0,i.EXTENT),$.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=z.createVertexBuffer($,Me.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var pe=new i.StructArrayLayout2i4;pe.emplaceBack(0,0),pe.emplaceBack(1,0),pe.emplaceBack(0,1),pe.emplaceBack(1,1),this.viewportBuffer=z.createVertexBuffer(pe,kc.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var de=new i.StructArrayLayout1ui2;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=z.createIndexBuffer(de);var Ie=new i.StructArrayLayout3ui6;Ie.emplaceBack(0,1,2),Ie.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=z.createIndexBuffer(Ie),this.emptyTexture=new i.Texture(z,{width:1,height:1,data:new Uint8Array([0,0,0,0])},z.gl.RGBA);var $e=this.context.gl;this.stencilClearMode=new $i({func:$e.ALWAYS,mask:0},0,255,$e.ZERO,$e.ZERO,$e.ZERO)},co.prototype.clearStencil=function(){var z=this.context,K=z.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var O=i.create();i.ortho(O,0,this.width,this.height,0,0,1),i.scale(O,O,[K.drawingBufferWidth,K.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(z,K.TRIANGLES,Wi.disabled,this.stencilClearMode,ft.disabled,yr.disabled,hn(O),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},co.prototype._renderTileClippingMasks=function(z,K){if(!(this.currentStencilSource===z.source||!z.isTileClipped()||!K||!K.length)){this.currentStencilSource=z.source;var O=this.context,$=O.gl;this.nextStencilID+K.length>256&&this.clearStencil(),O.setColorMode(ft.disabled),O.setDepthMode(Wi.disabled);var pe=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var de=0,Ie=K;de256&&this.clearStencil();var z=this.nextStencilID++,K=this.context.gl;return new $i({func:K.NOTEQUAL,mask:255},z,255,K.KEEP,K.KEEP,K.REPLACE)},co.prototype.stencilModeForClipping=function(z){var K=this.context.gl;return new $i({func:K.EQUAL,mask:255},this._tileClippingMaskIDs[z.key],0,K.KEEP,K.KEEP,K.REPLACE)},co.prototype.stencilConfigForOverlap=function(z){var K,O=this.context.gl,$=z.sort(function(pt,Kt){return Kt.overscaledZ-pt.overscaledZ}),pe=$[$.length-1].overscaledZ,de=$[0].overscaledZ-pe+1;if(de>1){this.currentStencilSource=void 0,this.nextStencilID+de>256&&this.clearStencil();for(var Ie={},$e=0;$e=0;this.currentLayer--){var Ar=this.style._layers[$[this.currentLayer]],gr=pe[Ar.source],Cr=$e[Ar.source];this._renderTileClippingMasks(Ar,Cr),this.renderLayer(this,gr,Ar,Cr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<$.length;this.currentLayer++){var cr=this.style._layers[$[this.currentLayer]],Gr=pe[cr.source],ei=(cr.type==="symbol"?Kt:pt)[cr.source];this._renderTileClippingMasks(cr,$e[cr.source]),this.renderLayer(this,Gr,cr,ei)}if(this.options.showTileBoundaries){var yi,tn,Di=i.values(this.style._layers);Di.forEach(function(ln){ln.source&&!ln.isHidden(O.transform.zoom)&&(ln.source!==(tn&&tn.id)&&(tn=O.style.sourceCaches[ln.source]),(!yi||yi.getSource().maxzoom0?K.pop():null},co.prototype.isPatternMissing=function(z){if(!z)return!1;if(!z.from||!z.to)return!0;var K=this.imageManager.getPattern(z.from.toString()),O=this.imageManager.getPattern(z.to.toString());return!K||!O},co.prototype.useProgram=function(z,K){this.cache=this.cache||{};var O=""+z+(K?K.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[O]||(this.cache[O]=new Vf(this.context,z,Pf[z],K,eo[z],this._showOverdrawInspector)),this.cache[O]},co.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()},co.prototype.setBaseState=function(){var z=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(z.FUNC_ADD)},co.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var z=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,z.RGBA)}},co.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Do=function(z,K){this.points=z,this.planes=K};Do.fromInvProjectionMatrix=function(z,K,O){var $=[[-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]],pe=Math.pow(2,O),de=$.map(function(pt){return i.transformMat4([],pt,z)}).map(function(pt){return i.scale$1([],pt,1/pt[3]/K*pe)}),Ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],$e=Ie.map(function(pt){var Kt=i.sub([],de[pt[0]],de[pt[1]]),ir=i.sub([],de[pt[2]],de[pt[1]]),Jt=i.normalize([],i.cross([],Kt,ir)),vt=-i.dot(Jt,de[pt[1]]);return Jt.concat(vt)});return new Do(de,$e)};var Rs=function(z,K){this.min=z,this.max=K,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Rs.prototype.quadrant=function(z){for(var K=[z%2===0,z<2],O=i.clone$2(this.min),$=i.clone$2(this.max),pe=0;pe=0;if(de===0)return 0;de!==K.length&&(O=!1)}if(O)return 2;for(var $e=0;$e<3;$e++){for(var pt=Number.MAX_VALUE,Kt=-Number.MAX_VALUE,ir=0;irthis.max[$e]-this.min[$e])return 0}return 1};var As=function(z,K,O,$){if(z===void 0&&(z=0),K===void 0&&(K=0),O===void 0&&(O=0),$===void 0&&($=0),isNaN(z)||z<0||isNaN(K)||K<0||isNaN(O)||O<0||isNaN($)||$<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=z,this.bottom=K,this.left=O,this.right=$};As.prototype.interpolate=function(z,K,O){return K.top!=null&&z.top!=null&&(this.top=i.number(z.top,K.top,O)),K.bottom!=null&&z.bottom!=null&&(this.bottom=i.number(z.bottom,K.bottom,O)),K.left!=null&&z.left!=null&&(this.left=i.number(z.left,K.left,O)),K.right!=null&&z.right!=null&&(this.right=i.number(z.right,K.right,O)),this},As.prototype.getCenter=function(z,K){var O=i.clamp((this.left+z-this.right)/2,0,z),$=i.clamp((this.top+K-this.bottom)/2,0,K);return new i.Point(O,$)},As.prototype.equals=function(z){return this.top===z.top&&this.bottom===z.bottom&&this.left===z.left&&this.right===z.right},As.prototype.clone=function(){return new As(this.top,this.bottom,this.left,this.right)},As.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var yo=function(z,K,O,$,pe){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=pe===void 0?!0:pe,this._minZoom=z||0,this._maxZoom=K||22,this._minPitch=O==null?0:O,this._maxPitch=$==null?60:$,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 As,this._posMatrixCache={},this._alignedPosMatrixCache={}},po={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}};yo.prototype.clone=function(){var z=new yo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return z.tileSize=this.tileSize,z.latRange=this.latRange,z.width=this.width,z.height=this.height,z._center=this._center,z.zoom=this.zoom,z.angle=this.angle,z._fov=this._fov,z._pitch=this._pitch,z._unmodified=this._unmodified,z._edgeInsets=this._edgeInsets.clone(),z._calcMatrices(),z},po.minZoom.get=function(){return this._minZoom},po.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},po.maxZoom.get=function(){return this._maxZoom},po.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},po.minPitch.get=function(){return this._minPitch},po.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},po.maxPitch.get=function(){return this._maxPitch},po.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},po.renderWorldCopies.get=function(){return this._renderWorldCopies},po.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},po.worldSize.get=function(){return this.tileSize*this.scale},po.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},po.size.get=function(){return new i.Point(this.width,this.height)},po.bearing.get=function(){return-this.angle/Math.PI*180},po.bearing.set=function(Y){var z=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==z&&(this._unmodified=!1,this.angle=z,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},po.pitch.get=function(){return this._pitch/Math.PI*180},po.pitch.set=function(Y){var z=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==z&&(this._unmodified=!1,this._pitch=z,this._calcMatrices())},po.fov.get=function(){return this._fov/Math.PI*180},po.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())},po.zoom.get=function(){return this._zoom},po.zoom.set=function(Y){var z=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==z&&(this._unmodified=!1,this._zoom=z,this.scale=this.zoomScale(z),this.tileZoom=Math.floor(z),this.zoomFraction=z-this.tileZoom,this._constrain(),this._calcMatrices())},po.center.get=function(){return this._center},po.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},po.padding.get=function(){return this._edgeInsets.toJSON()},po.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},po.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},yo.prototype.isPaddingEqual=function(z){return this._edgeInsets.equals(z)},yo.prototype.interpolatePadding=function(z,K,O){this._unmodified=!1,this._edgeInsets.interpolate(z,K,O),this._constrain(),this._calcMatrices()},yo.prototype.coveringZoomLevel=function(z){var K=(z.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/z.tileSize));return Math.max(0,K)},yo.prototype.getVisibleUnwrappedCoordinates=function(z){var K=[new i.UnwrappedTileID(0,z)];if(this._renderWorldCopies)for(var O=this.pointCoordinate(new i.Point(0,0)),$=this.pointCoordinate(new i.Point(this.width,0)),pe=this.pointCoordinate(new i.Point(this.width,this.height)),de=this.pointCoordinate(new i.Point(0,this.height)),Ie=Math.floor(Math.min(O.x,$.x,pe.x,de.x)),$e=Math.floor(Math.max(O.x,$.x,pe.x,de.x)),pt=1,Kt=Ie-pt;Kt<=$e+pt;Kt++)Kt!==0&&K.push(new i.UnwrappedTileID(Kt,z));return K},yo.prototype.coveringTiles=function(z){var K=this.coveringZoomLevel(z),O=K;if(z.minzoom!==void 0&&Kz.maxzoom&&(K=z.maxzoom);var $=i.MercatorCoordinate.fromLngLat(this.center),pe=Math.pow(2,K),de=[pe*$.x,pe*$.y,0],Ie=Do.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,K),$e=z.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&($e=K);var pt=3,Kt=function(Di){return{aabb:new Rs([Di*pe,0,0],[(Di+1)*pe,pe,0]),zoom:0,x:0,y:0,wrap:Di,fullyVisible:!1}},ir=[],Jt=[],vt=K,Pt=z.reparseOverscaled?O:K;if(this._renderWorldCopies)for(var Wt=1;Wt<=3;Wt++)ir.push(Kt(-Wt)),ir.push(Kt(Wt));for(ir.push(Kt(0));ir.length>0;){var rr=ir.pop(),dr=rr.x,pr=rr.y,kr=rr.fullyVisible;if(!kr){var Ar=rr.aabb.intersects(Ie);if(Ar===0)continue;kr=Ar===2}var gr=rr.aabb.distanceX(de),Cr=rr.aabb.distanceY(de),cr=Math.max(Math.abs(gr),Math.abs(Cr)),Gr=pt+(1<Gr&&rr.zoom>=$e){Jt.push({tileID:new i.OverscaledTileID(rr.zoom===vt?Pt:rr.zoom,rr.wrap,rr.zoom,dr,pr),distanceSq:i.sqrLen([de[0]-.5-dr,de[1]-.5-pr])});continue}for(var ei=0;ei<4;ei++){var yi=(dr<<1)+ei%2,tn=(pr<<1)+(ei>>1);ir.push({aabb:rr.aabb.quadrant(ei),zoom:rr.zoom+1,x:yi,y:tn,wrap:rr.wrap,fullyVisible:kr})}}return Jt.sort(function(Di,ln){return Di.distanceSq-ln.distanceSq}).map(function(Di){return Di.tileID})},yo.prototype.resize=function(z,K){this.width=z,this.height=K,this.pixelsToGLUnits=[2/z,-2/K],this._constrain(),this._calcMatrices()},po.unmodified.get=function(){return this._unmodified},yo.prototype.zoomScale=function(z){return Math.pow(2,z)},yo.prototype.scaleZoom=function(z){return Math.log(z)/Math.LN2},yo.prototype.project=function(z){var K=i.clamp(z.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(z.lng)*this.worldSize,i.mercatorYfromLat(K)*this.worldSize)},yo.prototype.unproject=function(z){return new i.MercatorCoordinate(z.x/this.worldSize,z.y/this.worldSize).toLngLat()},po.point.get=function(){return this.project(this.center)},yo.prototype.setLocationAtPoint=function(z,K){var O=this.pointCoordinate(K),$=this.pointCoordinate(this.centerPoint),pe=this.locationCoordinate(z),de=new i.MercatorCoordinate(pe.x-(O.x-$.x),pe.y-(O.y-$.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())},yo.prototype.locationPoint=function(z){return this.coordinatePoint(this.locationCoordinate(z))},yo.prototype.pointLocation=function(z){return this.coordinateLocation(this.pointCoordinate(z))},yo.prototype.locationCoordinate=function(z){return i.MercatorCoordinate.fromLngLat(z)},yo.prototype.coordinateLocation=function(z){return z.toLngLat()},yo.prototype.pointCoordinate=function(z){var K=0,O=[z.x,z.y,0,1],$=[z.x,z.y,1,1];i.transformMat4(O,O,this.pixelMatrixInverse),i.transformMat4($,$,this.pixelMatrixInverse);var pe=O[3],de=$[3],Ie=O[0]/pe,$e=$[0]/de,pt=O[1]/pe,Kt=$[1]/de,ir=O[2]/pe,Jt=$[2]/de,vt=ir===Jt?0:(K-ir)/(Jt-ir);return new i.MercatorCoordinate(i.number(Ie,$e,vt)/this.worldSize,i.number(pt,Kt,vt)/this.worldSize)},yo.prototype.coordinatePoint=function(z){var K=[z.x*this.worldSize,z.y*this.worldSize,0,1];return i.transformMat4(K,K,this.pixelMatrix),new i.Point(K[0]/K[3],K[1]/K[3])},yo.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)))},yo.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]])},yo.prototype.setMaxBounds=function(z){z?(this.lngRange=[z.getWest(),z.getEast()],this.latRange=[z.getSouth(),z.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},yo.prototype.calculatePosMatrix=function(z,K){K===void 0&&(K=!1);var O=z.key,$=K?this._alignedPosMatrixCache:this._posMatrixCache;if($[O])return $[O];var pe=z.canonical,de=this.worldSize/this.zoomScale(pe.z),Ie=pe.x+Math.pow(2,pe.z)*z.wrap,$e=i.identity(new Float64Array(16));return i.translate($e,$e,[Ie*de,pe.y*de,0]),i.scale($e,$e,[de/i.EXTENT,de/i.EXTENT,1]),i.multiply($e,K?this.alignedProjMatrix:this.projMatrix,$e),$[O]=new Float32Array($e),$[O]},yo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},yo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var z=-90,K=90,O=-180,$=180,pe,de,Ie,$e,pt=this.size,Kt=this._unmodified;if(this.latRange){var ir=this.latRange;z=i.mercatorYfromLat(ir[1])*this.worldSize,K=i.mercatorYfromLat(ir[0])*this.worldSize,pe=K-zK&&($e=K-rr)}if(this.lngRange){var dr=vt.x,pr=pt.x/2;dr-pr$&&(Ie=$-pr)}(Ie!==void 0||$e!==void 0)&&(this.center=this.unproject(new i.Point(Ie!==void 0?Ie:vt.x,$e!==void 0?$e:vt.y))),this._unmodified=Kt,this._constraining=!1}},yo.prototype._calcMatrices=function(){if(this.height){var z=this._fov/2,K=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(z)*this.height;var O=Math.PI/2+this._pitch,$=this._fov*(.5+K.y/this.height),pe=Math.sin($)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-O-$,.01,Math.PI-.01)),de=this.point,Ie=de.x,$e=de.y,pt=Math.cos(Math.PI/2-this._pitch)*pe+this.cameraToCenterDistance,Kt=pt*1.01,ir=this.height/50,Jt=new Float64Array(16);i.perspective(Jt,this._fov,this.width/this.height,ir,Kt),Jt[8]=-K.x*2/this.width,Jt[9]=K.y*2/this.height,i.scale(Jt,Jt,[1,-1,1]),i.translate(Jt,Jt,[0,0,-this.cameraToCenterDistance]),i.rotateX(Jt,Jt,this._pitch),i.rotateZ(Jt,Jt,this.angle),i.translate(Jt,Jt,[-Ie,-$e,0]),this.mercatorMatrix=i.scale([],Jt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Jt,Jt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Jt,this.invProjMatrix=i.invert([],this.projMatrix);var vt=this.width%2/2,Pt=this.height%2/2,Wt=Math.cos(this.angle),rr=Math.sin(this.angle),dr=Ie-Math.round(Ie)+Wt*vt+rr*Pt,pr=$e-Math.round($e)+Wt*Pt+rr*vt,kr=new Float64Array(Jt);if(i.translate(kr,kr,[dr>.5?dr-1:dr,pr>.5?pr-1:pr,0]),this.alignedProjMatrix=kr,Jt=i.create(),i.scale(Jt,Jt,[this.width/2,-this.height/2,1]),i.translate(Jt,Jt,[1,-1,0]),this.labelPlaneMatrix=Jt,Jt=i.create(),i.scale(Jt,Jt,[1,-1,1]),i.translate(Jt,Jt,[-1,-1,0]),i.scale(Jt,Jt,[2/this.width,2/this.height,1]),this.glCoordMatrix=Jt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Jt=i.invert(new Float64Array(16),this.pixelMatrix),!Jt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Jt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},yo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var z=this.pointCoordinate(new i.Point(0,0)),K=[z.x*this.worldSize,z.y*this.worldSize,0,1],O=i.transformMat4(K,K,this.pixelMatrix);return O[3]/this.cameraToCenterDistance},yo.prototype.getCameraPoint=function(){var z=this._pitch,K=Math.tan(z)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,K))},yo.prototype.getCameraQueryGeometry=function(z){var K=this.getCameraPoint();if(z.length===1)return[z[0],K];for(var O=K.x,$=K.y,pe=K.x,de=K.y,Ie=0,$e=z;Ie<$e.length;Ie+=1){var pt=$e[Ie];O=Math.min(O,pt.x),$=Math.min($,pt.y),pe=Math.max(pe,pt.x),de=Math.max(de,pt.y)}return[new i.Point(O,$),new i.Point(pe,$),new i.Point(pe,de),new i.Point(O,de),new i.Point(O,$)]},Object.defineProperties(yo.prototype,po);function _l(Y,z){var K=!1,O=null,$=function(){O=null,K&&(Y(),O=setTimeout($,z),K=!1)};return function(){return K=!0,O||$(),O}}var Vl=function(z){this._hashName=z&&encodeURIComponent(z),i.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=_l(this._updateHashUnthrottled.bind(this),30*1e3/100)};Vl.prototype.addTo=function(z){return this._map=z,i.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Vl.prototype.remove=function(){return i.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Vl.prototype.getHashString=function(z){var K=this._map.getCenter(),O=Math.round(this._map.getZoom()*100)/100,$=Math.ceil((O*Math.LN2+Math.log(512/360/.5))/Math.LN10),pe=Math.pow(10,$),de=Math.round(K.lng*pe)/pe,Ie=Math.round(K.lat*pe)/pe,$e=this._map.getBearing(),pt=this._map.getPitch(),Kt="";if(z?Kt+="/"+de+"/"+Ie+"/"+O:Kt+=O+"/"+Ie+"/"+de,($e||pt)&&(Kt+="/"+Math.round($e*10)/10),pt&&(Kt+="/"+Math.round(pt)),this._hashName){var ir=this._hashName,Jt=!1,vt=i.window.location.hash.slice(1).split("&").map(function(Pt){var Wt=Pt.split("=")[0];return Wt===ir?(Jt=!0,Wt+"="+Kt):Pt}).filter(function(Pt){return Pt});return Jt||vt.push(ir+"="+Kt),"#"+vt.join("&")}return"#"+Kt},Vl.prototype._getCurrentHash=function(){var z=this,K=i.window.location.hash.replace("#","");if(this._hashName){var O;return K.split("&").map(function($){return $.split("=")}).forEach(function($){$[0]===z._hashName&&(O=$)}),(O&&O[1]||"").split("/")}return K.split("/")},Vl.prototype._onHashChange=function(){var z=this._getCurrentHash();if(z.length>=3&&!z.some(function(O){return isNaN(O)})){var K=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(z[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+z[2],+z[1]],zoom:+z[0],bearing:K,pitch:+(z[4]||0)}),!0}return!1},Vl.prototype._updateHashUnthrottled=function(){var z=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,z)}catch(K){}};var Xu={linearity:.3,easing:i.bezier(0,0,.3,1)},cu=i.extend({deceleration:2500,maxSpeed:1400},Xu),el=i.extend({deceleration:20,maxSpeed:1400},Xu),nu=i.extend({deceleration:1e3,maxSpeed:360},Xu),zc=i.extend({deceleration:1e3,maxSpeed:90},Xu),Rl=function(z){this._map=z,this.clear()};Rl.prototype.clear=function(){this._inertiaBuffer=[]},Rl.prototype.record=function(z){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:z})},Rl.prototype._drainInertiaBuffer=function(){for(var z=this._inertiaBuffer,K=i.browser.now(),O=160;z.length>0&&K-z[0].time>O;)z.shift()},Rl.prototype._onMoveEnd=function(z){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var K={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},O=0,$=this._inertiaBuffer;O<$.length;O+=1){var pe=$[O],de=pe.settings;K.zoom+=de.zoomDelta||0,K.bearing+=de.bearingDelta||0,K.pitch+=de.pitchDelta||0,de.panDelta&&K.pan._add(de.panDelta),de.around&&(K.around=de.around),de.pinchAround&&(K.pinchAround=de.pinchAround)}var Ie=this._inertiaBuffer[this._inertiaBuffer.length-1],$e=Ie.time-this._inertiaBuffer[0].time,pt={};if(K.pan.mag()){var Kt=Z(K.pan.mag(),$e,i.extend({},cu,z||{}));pt.offset=K.pan.mult(Kt.amount/K.pan.mag()),pt.center=this._map.transform.center,zl(pt,Kt)}if(K.zoom){var ir=Z(K.zoom,$e,el);pt.zoom=this._map.transform.zoom+ir.amount,zl(pt,ir)}if(K.bearing){var Jt=Z(K.bearing,$e,nu);pt.bearing=this._map.transform.bearing+i.clamp(Jt.amount,-179,179),zl(pt,Jt)}if(K.pitch){var vt=Z(K.pitch,$e,zc);pt.pitch=this._map.transform.pitch+vt.amount,zl(pt,vt)}if(pt.zoom||pt.bearing){var Pt=K.pinchAround===void 0?K.around:K.pinchAround;pt.around=Pt?this._map.unproject(Pt):this._map.getCenter()}return this.clear(),i.extend(pt,{noMoveStart:!0})}};function zl(Y,z){(!Y.duration||Y.duration=this._clickTolerance||this._map.fire(new oe(z.type,this._map,z))},Ue.prototype.dblclick=function(z){return this._firePreventable(new oe(z.type,this._map,z))},Ue.prototype.mouseover=function(z){this._map.fire(new oe(z.type,this._map,z))},Ue.prototype.mouseout=function(z){this._map.fire(new oe(z.type,this._map,z))},Ue.prototype.touchstart=function(z){return this._firePreventable(new we(z.type,this._map,z))},Ue.prototype.touchmove=function(z){this._map.fire(new we(z.type,this._map,z))},Ue.prototype.touchend=function(z){this._map.fire(new we(z.type,this._map,z))},Ue.prototype.touchcancel=function(z){this._map.fire(new we(z.type,this._map,z))},Ue.prototype._firePreventable=function(z){if(this._map.fire(z),z.defaultPrevented)return{}},Ue.prototype.isEnabled=function(){return!0},Ue.prototype.isActive=function(){return!1},Ue.prototype.enable=function(){},Ue.prototype.disable=function(){};var We=function(z){this._map=z};We.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},We.prototype.mousemove=function(z){this._map.fire(new oe(z.type,this._map,z))},We.prototype.mousedown=function(){this._delayContextMenu=!0},We.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new oe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},We.prototype.contextmenu=function(z){this._delayContextMenu?this._contextMenuEvent=z:this._map.fire(new oe(z.type,this._map,z)),this._map.listens("contextmenu")&&z.preventDefault()},We.prototype.isEnabled=function(){return!0},We.prototype.isActive=function(){return!1},We.prototype.enable=function(){},We.prototype.disable=function(){};var wt=function(z,K){this._map=z,this._el=z.getCanvasContainer(),this._container=z.getContainer(),this._clickTolerance=K.clickTolerance||1};wt.prototype.isEnabled=function(){return!!this._enabled},wt.prototype.isActive=function(){return!!this._active},wt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},wt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},wt.prototype.mousedown=function(z,K){this.isEnabled()&&z.shiftKey&&z.button===0&&(o.disableDrag(),this._startPos=this._lastPos=K,this._active=!0)},wt.prototype.mousemoveWindow=function(z,K){if(this._active){var O=K;if(!(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=z.timeStamp),O.length===this.numTouches&&(this.centroid=zt(K),this.touches=tt(O,K)))},Ir.prototype.touchmove=function(z,K,O){if(!(this.aborted||!this.centroid)){var $=tt(O,K);for(var pe in this.touches){var de=this.touches[pe],Ie=$[pe];(!Ie||Ie.dist(de)>Rr)&&(this.aborted=!0)}}},Ir.prototype.touchend=function(z,K,O){if((!this.centroid||z.timeStamp-this.startTime>lr)&&(this.aborted=!0),O.length===0){var $=!this.aborted&&this.centroid;if(this.reset(),$)return $}};var oi=function(z){this.singleTap=new Ir(z),this.numTaps=z.numTaps,this.reset()};oi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},oi.prototype.touchstart=function(z,K,O){this.singleTap.touchstart(z,K,O)},oi.prototype.touchmove=function(z,K,O){this.singleTap.touchmove(z,K,O)},oi.prototype.touchend=function(z,K,O){var $=this.singleTap.touchend(z,K,O);if($){var pe=z.timeStamp-this.lastTime0&&(this._active=!0);var $=tt(O,K),pe=new i.Point(0,0),de=new i.Point(0,0),Ie=0;for(var $e in $){var pt=$[$e],Kt=this._touches[$e];Kt&&(pe._add(pt),de._add(pt.sub(Kt)),Ie++,$[$e]=pt)}if(this._touches=$,!(IeMath.abs(Y.x)}var pn=100,za=function(Y){function z(){Y.apply(this,arguments)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},z.prototype._start=function(O){this._lastPoints=O,Ns(O[0].sub(O[1]))&&(this._valid=!1)},z.prototype._move=function(O,$,pe){var de=O[0].sub(this._lastPoints[0]),Ie=O[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(de,Ie,pe.timeStamp),!!this._valid){this._lastPoints=O,this._active=!0;var $e=(de.y+Ie.y)/2,pt=-.5;return{pitchDelta:$e*pt}}},z.prototype.gestureBeginsVertically=function(O,$,pe){if(this._valid!==void 0)return this._valid;var de=2,Ie=O.mag()>=de,$e=$.mag()>=de;if(!(!Ie&&!$e)){if(!Ie||!$e)return this._firstMove===void 0&&(this._firstMove=pe),pe-this._firstMove0==$.y>0;return Ns(O)&&Ns($)&&pt}},z}(Nn),Lo={panStep:100,bearingStep:15,pitchStep:10},Fo=function(){var z=Lo;this._panStep=z.panStep,this._bearingStep=z.bearingStep,this._pitchStep=z.pitchStep,this._rotationDisabled=!1};Fo.prototype.reset=function(){this._active=!1},Fo.prototype.keydown=function(z){var K=this;if(!(z.altKey||z.ctrlKey||z.metaKey)){var O=0,$=0,pe=0,de=0,Ie=0;switch(z.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:z.shiftKey?$=-1:(z.preventDefault(),de=-1);break;case 39:z.shiftKey?$=1:(z.preventDefault(),de=1);break;case 38:z.shiftKey?pe=1:(z.preventDefault(),Ie=-1);break;case 40:z.shiftKey?pe=-1:(z.preventDefault(),Ie=1);break;default:return}return this._rotationDisabled&&($=0,pe=0),{cameraAnimation:function($e){var pt=$e.getZoom();$e.easeTo({duration:300,easeId:"keyboardHandler",easing:js,zoom:O?Math.round(pt)+O*(z.shiftKey?2:1):pt,bearing:$e.getBearing()+$*K._bearingStep,pitch:$e.getPitch()+pe*K._pitchStep,offset:[-de*K._panStep,-Ie*K._panStep],center:$e.getCenter()},{originalEvent:z})}}}},Fo.prototype.enable=function(){this._enabled=!0},Fo.prototype.disable=function(){this._enabled=!1,this.reset()},Fo.prototype.isEnabled=function(){return this._enabled},Fo.prototype.isActive=function(){return this._active},Fo.prototype.disableRotation=function(){this._rotationDisabled=!0},Fo.prototype.enableRotation=function(){this._rotationDisabled=!1};function js(Y){return Y*(2-Y)}var xl=4.000244140625,fu=1/100,dl=1/450,xc=2,At=function(z,K){this._map=z,this._el=z.getCanvasContainer(),this._handler=K,this._delta=0,this._defaultZoomRate=fu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};At.prototype.setZoomRate=function(z){this._defaultZoomRate=z},At.prototype.setWheelZoomRate=function(z){this._wheelZoomRate=z},At.prototype.isEnabled=function(){return!!this._enabled},At.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},At.prototype.isZooming=function(){return!!this._zooming},At.prototype.enable=function(z){this.isEnabled()||(this._enabled=!0,this._aroundCenter=z&&z.around==="center")},At.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},At.prototype.wheel=function(z){if(this.isEnabled()){var K=z.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?z.deltaY*40:z.deltaY,O=i.browser.now(),$=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,K!==0&&K%xl===0?this._type="wheel":K!==0&&Math.abs(K)<4?this._type="trackpad":$>400?(this._type=null,this._lastValue=K,this._timeout=setTimeout(this._onTimeout,40,z)):this._type||(this._type=Math.abs($*K)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,K+=this._lastValue)),z.shiftKey&&K&&(K=K/4),this._type&&(this._lastWheelEvent=z,this._delta-=K,this._active||this._start(z)),z.preventDefault()}},At.prototype._onTimeout=function(z){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(z)},At.prototype._start=function(z){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 K=o.mousePos(this._el,z);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(K)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},At.prototype.renderFrame=function(){var z=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var K=this._map.transform;if(this._delta!==0){var O=this._type==="wheel"&&Math.abs(this._delta)>xl?this._wheelZoomRate:this._defaultZoomRate,$=xc/(1+Math.exp(-Math.abs(this._delta*O)));this._delta<0&&$!==0&&($=1/$);var pe=typeof this._targetZoom=="number"?K.zoomScale(this._targetZoom):K.scale;this._targetZoom=Math.min(K.maxZoom,Math.max(K.minZoom,K.scaleZoom(pe*$))),this._type==="wheel"&&(this._startZoom=K.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var de=typeof this._targetZoom=="number"?this._targetZoom:K.zoom,Ie=this._startZoom,$e=this._easing,pt=!1,Kt;if(this._type==="wheel"&&Ie&&$e){var ir=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),Jt=$e(ir);Kt=i.number(Ie,de,Jt),ir<1?this._frameId||(this._frameId=!0):pt=!0}else Kt=de,pt=!0;return this._active=!0,pt&&(this._active=!1,this._finishTimeout=setTimeout(function(){z._zooming=!1,z._handler._triggerRenderFrame(),delete z._targetZoom,delete z._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!pt,zoomDelta:Kt-K.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},At.prototype._smoothOutEasing=function(z){var K=i.ease;if(this._prevEase){var O=this._prevEase,$=(i.browser.now()-O.start)/O.duration,pe=O.easing($+.01)-O.easing($),de=.27/Math.sqrt(pe*pe+1e-4)*.01,Ie=Math.sqrt(.27*.27-de*de);K=i.bezier(de,Ie,.25,1)}return this._prevEase={start:i.browser.now(),duration:z,easing:K},K},At.prototype.reset=function(){this._active=!1};var Er=function(z,K){this._clickZoom=z,this._tapZoom=K};Er.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Er.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Er.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Er.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Wr=function(){this.reset()};Wr.prototype.reset=function(){this._active=!1},Wr.prototype.dblclick=function(z,K){return z.preventDefault(),{cameraAnimation:function(O){O.easeTo({duration:300,zoom:O.getZoom()+(z.shiftKey?-1:1),around:O.unproject(K)},{originalEvent:z})}}},Wr.prototype.enable=function(){this._enabled=!0},Wr.prototype.disable=function(){this._enabled=!1,this.reset()},Wr.prototype.isEnabled=function(){return this._enabled},Wr.prototype.isActive=function(){return this._active};var wi=function(){this._tap=new oi({numTouches:1,numTaps:1}),this.reset()};wi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},wi.prototype.touchstart=function(z,K,O){this._swipePoint||(this._tapTime&&z.timeStamp-this._tapTime>or&&this.reset(),this._tapTime?O.length>0&&(this._swipePoint=K[0],this._swipeTouch=O[0].identifier):this._tap.touchstart(z,K,O))},wi.prototype.touchmove=function(z,K,O){if(!this._tapTime)this._tap.touchmove(z,K,O);else if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;var $=K[0],pe=$.y-this._swipePoint.y;return this._swipePoint=$,z.preventDefault(),this._active=!0,{zoomDelta:pe/128}}},wi.prototype.touchend=function(z,K,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{var $=this._tap.touchend(z,K,O);$&&(this._tapTime=z.timeStamp)}},wi.prototype.touchcancel=function(){this.reset()},wi.prototype.enable=function(){this._enabled=!0},wi.prototype.disable=function(){this._enabled=!1,this.reset()},wi.prototype.isEnabled=function(){return this._enabled},wi.prototype.isActive=function(){return this._active};var Ui=function(z,K,O){this._el=z,this._mousePan=K,this._touchPan=O};Ui.prototype.enable=function(z){this._inertiaOptions=z||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ui.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ui.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ui.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Oi=function(z,K,O){this._pitchWithRotate=z.pitchWithRotate,this._mouseRotate=K,this._mousePitch=O};Oi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Oi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Oi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Oi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Bi=function(z,K,O,$){this._el=z,this._touchZoom=K,this._touchRotate=O,this._tapDragZoom=$,this._rotationDisabled=!1,this._enabled=!0};Bi.prototype.enable=function(z){this._touchZoom.enable(z),this._rotationDisabled||this._touchRotate.enable(z),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Bi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Bi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Bi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Bi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Bi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var cn=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},On=function(Y){function z(){Y.apply(this,arguments)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z}(i.Event);function Bn(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var yn=function(z,K){this._map=z,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Rl(z),this._bearingSnap=K.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(K),i.bindAll(["handleEvent","handleWindowEvent"],this);var O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[i.window,"blur",void 0]];for(var $=0,pe=this._listeners;$Ie?Math.min(2,gr):Math.max(.5,gr),Di=Math.pow(tn,1-ei),ln=de.unproject(kr.add(Ar.mult(ei*Di)).mult(yi));de.setLocationAtPoint(de.renderWorldCopies?ln.wrap():ln,rr)}pe._fireMoveEvents($)},function(ei){pe._afterEase($,ei)},O),this},z.prototype._prepareEase=function(O,$,pe){pe===void 0&&(pe={}),this._moving=!0,!$&&!pe.moving&&this.fire(new i.Event("movestart",O)),this._zooming&&!pe.zooming&&this.fire(new i.Event("zoomstart",O)),this._rotating&&!pe.rotating&&this.fire(new i.Event("rotatestart",O)),this._pitching&&!pe.pitching&&this.fire(new i.Event("pitchstart",O))},z.prototype._fireMoveEvents=function(O){this.fire(new i.Event("move",O)),this._zooming&&this.fire(new i.Event("zoom",O)),this._rotating&&this.fire(new i.Event("rotate",O)),this._pitching&&this.fire(new i.Event("pitch",O))},z.prototype._afterEase=function(O,$){if(!(this._easeId&&$&&this._easeId===$)){delete this._easeId;var pe=this._zooming,de=this._rotating,Ie=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,pe&&this.fire(new i.Event("zoomend",O)),de&&this.fire(new i.Event("rotateend",O)),Ie&&this.fire(new i.Event("pitchend",O)),this.fire(new i.Event("moveend",O))}},z.prototype.flyTo=function(O,$){var pe=this;if(!O.essential&&i.browser.prefersReducedMotion){var de=i.pick(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(de,$)}this.stop(),O=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},O);var Ie=this.transform,$e=this.getZoom(),pt=this.getBearing(),Kt=this.getPitch(),ir=this.getPadding(),Jt="zoom"in O?i.clamp(+O.zoom,Ie.minZoom,Ie.maxZoom):$e,vt="bearing"in O?this._normalizeBearing(O.bearing,pt):pt,Pt="pitch"in O?+O.pitch:Kt,Wt="padding"in O?O.padding:Ie.padding,rr=Ie.zoomScale(Jt-$e),dr=i.Point.convert(O.offset),pr=Ie.centerPoint.add(dr),kr=Ie.pointLocation(pr),Ar=i.LngLat.convert(O.center||kr);this._normalizeCenter(Ar);var gr=Ie.project(kr),Cr=Ie.project(Ar).sub(gr),cr=O.curve,Gr=Math.max(Ie.width,Ie.height),ei=Gr/rr,yi=Cr.mag();if("minZoom"in O){var tn=i.clamp(Math.min(O.minZoom,$e,Jt),Ie.minZoom,Ie.maxZoom),Di=Gr/Ie.zoomScale(tn-$e);cr=Math.sqrt(Di/yi*2)}var ln=cr*cr;function Qn(fo){var as=(ei*ei-Gr*Gr+(fo?-1:1)*ln*ln*yi*yi)/(2*(fo?ei:Gr)*ln*yi);return Math.log(Math.sqrt(as*as+1)-as)}function qn(fo){return(Math.exp(fo)-Math.exp(-fo))/2}function rn(fo){return(Math.exp(fo)+Math.exp(-fo))/2}function bn(fo){return qn(fo)/rn(fo)}var mn=Qn(0),Gn=function(fo){return rn(mn)/rn(mn+cr*fo)},da=function(fo){return Gr*((rn(mn)*bn(mn+cr*fo)-qn(mn))/ln)/yi},No=(Qn(1)-mn)/cr;if(Math.abs(yi)<1e-6||!isFinite(No)){if(Math.abs(Gr-ei)<1e-6)return this.easeTo(O,$);var Ro=eiO.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=pt!==vt,this._pitching=Pt!==Kt,this._padding=!Ie.isPaddingEqual(Wt),this._prepareEase($,!1),this._ease(function(fo){var as=fo*No,tl=1/Gn(as);Ie.zoom=fo===1?Jt:$e+Ie.scaleZoom(tl),pe._rotating&&(Ie.bearing=i.number(pt,vt,fo)),pe._pitching&&(Ie.pitch=i.number(Kt,Pt,fo)),pe._padding&&(Ie.interpolatePadding(ir,Wt,fo),pr=Ie.centerPoint.add(dr));var zu=fo===1?Ar:Ie.unproject(gr.add(Cr.mult(da(as))).mult(tl));Ie.setLocationAtPoint(Ie.renderWorldCopies?zu.wrap():zu,pr),pe._fireMoveEvents($)},function(){return pe._afterEase($)},O),this},z.prototype.isEasing=function(){return!!this._easeFrameId},z.prototype.stop=function(){return this._stop()},z.prototype._stop=function(O,$){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var pe=this._onEaseEnd;delete this._onEaseEnd,pe.call(this,$)}if(!O){var de=this.handlers;de&&de.stop(!1)}return this},z.prototype._ease=function(O,$,pe){pe.animate===!1||pe.duration===0?(O(1),$()):(this._easeStart=i.browser.now(),this._easeOptions=pe,this._onEaseFrame=O,this._onEaseEnd=$,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},z.prototype._renderFrameCallback=function(){var O=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},z.prototype._normalizeBearing=function(O,$){O=i.wrap(O,-180,180);var pe=Math.abs(O-$);return Math.abs(O-360-$)180?-360:pe<-180?360:0}},z}(i.Evented),Dn=function(z){z===void 0&&(z={}),this.options=z,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Dn.prototype.getDefaultPosition=function(){return"bottom-right"},Dn.prototype.onAdd=function(z){var K=this.options&&this.options.compact;return this._map=z,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"),K&&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),K===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Dn.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},Dn.prototype._setElementTitle=function(z,K){var O=this._map._getUIString("AttributionControl."+K);z.title=O,z.setAttribute("aria-label",O)},Dn.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"))},Dn.prototype._updateEditLink=function(){var z=this._editLink;z||(z=this._editLink=this._container.querySelector(".mapbox-improve-map"));var K=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(z){var O=K.reduce(function($,pe,de){return pe.value&&($+=pe.key+"="+pe.value+(de=0)return!1;return!0});var Ie=z.join(" | ");Ie!==this._attribHTML&&(this._attribHTML=Ie,z.length?(this._innerContainer.innerHTML=Ie,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Dn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Rn=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Rn.prototype.onAdd=function(z){this._map=z,this._container=o.create("div","mapboxgl-ctrl");var K=o.create("a","mapboxgl-ctrl-logo");return K.target="_blank",K.rel="noopener nofollow",K.href="https://www.mapbox.com/",K.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),K.setAttribute("rel","noopener nofollow"),this._container.appendChild(K),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Rn.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Rn.prototype.getDefaultPosition=function(){return"bottom-left"},Rn.prototype._updateLogo=function(z){(!z||z.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Rn.prototype._logoRequired=function(){if(this._map.style){var z=this._map.style.sourceCaches;for(var K in z){var O=z[K].getSource();if(O.mapbox_logo)return!0}return!1}},Rn.prototype._updateCompact=function(){var z=this._container.children;if(z.length){var K=z[0];this._map.getCanvasContainer().offsetWidth<250?K.classList.add("mapboxgl-compact"):K.classList.remove("mapboxgl-compact")}};var fn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};fn.prototype.add=function(z){var K=++this._id,O=this._queue;return O.push({callback:z,id:K,cancelled:!1}),K},fn.prototype.remove=function(z){for(var K=this._currentlyRunning,O=K?this._queue.concat(K):this._queue,$=0,pe=O;$O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitchZa)throw new Error("maxPitch must be less than or equal to "+Za);var pe=new yo(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies);if(Y.call(this,pe,O),this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=O.preserveDrawingBuffer,this._antialias=O.antialias,this._trackResize=O.trackResize,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=O.collectResourceTiming,this._renderTaskQueue=new fn,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Ai,O.locale),this._clickTolerance=O.clickTolerance,this._requestManager=new i.RequestManager(O.transformRequest,O.accessToken),typeof O.container=="string"){if(this._container=i.window.document.getElementById(O.container),!this._container)throw new Error("Container '"+O.container+"' not found.")}else if(O.container instanceof Ln)this._container=O.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(O.maxBounds&&this.setMaxBounds(O.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return $._update(!1)}),this.on("moveend",function(){return $._update(!1)}),this.on("zoom",function(){return $._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 yn(this,O);var de=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new Vl(de).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,i.extend({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new Dn({customAttribution:O.customAttribution})),this.addControl(new Rn,O.logoPosition),this.on("style.load",function(){$.transform.unmodified&&$.jumpTo($.style.stylesheet)}),this.on("data",function(Ie){$._update(Ie.dataType==="style"),$.fire(new i.Event(Ie.dataType+"data",Ie))}),this.on("dataloading",function(Ie){$.fire(new i.Event(Ie.dataType+"dataloading",Ie))})}Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z;var K={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return z.prototype._getMapId=function(){return this._mapId},z.prototype.addControl=function($,pe){if(pe===void 0&&($.getDefaultPosition?pe=$.getDefaultPosition():pe="top-right"),!$||!$.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 de=$.onAdd(this);this._controls.push($);var Ie=this._controlPositions[pe];return pe.indexOf("bottom")!==-1?Ie.insertBefore(de,Ie.firstChild):Ie.appendChild(de),this},z.prototype.removeControl=function($){if(!$||!$.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 pe=this._controls.indexOf($);return pe>-1&&this._controls.splice(pe,1),$.onRemove(this),this},z.prototype.hasControl=function($){return this._controls.indexOf($)>-1},z.prototype.resize=function($){var pe=this._containerDimensions(),de=pe[0],Ie=pe[1];this._resizeCanvas(de,Ie),this.transform.resize(de,Ie),this.painter.resize(de,Ie);var $e=!this._moving;return $e&&(this.stop(),this.fire(new i.Event("movestart",$)).fire(new i.Event("move",$))),this.fire(new i.Event("resize",$)),$e&&this.fire(new i.Event("moveend",$)),this},z.prototype.getBounds=function(){return this.transform.getBounds()},z.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},z.prototype.setMaxBounds=function($){return this.transform.setMaxBounds(i.LngLatBounds.convert($)),this._update()},z.prototype.setMinZoom=function($){if($=$==null?gn:$,$>=gn&&$<=this.transform.maxZoom)return this.transform.minZoom=$,this._update(),this.getZoom()<$&&this.setZoom($),this;throw new Error("minZoom must be between "+gn+" and the current maxZoom, inclusive")},z.prototype.getMinZoom=function(){return this.transform.minZoom},z.prototype.setMaxZoom=function($){if($=$==null?ca:$,$>=this.transform.minZoom)return this.transform.maxZoom=$,this._update(),this.getZoom()>$&&this.setZoom($),this;throw new Error("maxZoom must be greater than the current minZoom")},z.prototype.getMaxZoom=function(){return this.transform.maxZoom},z.prototype.setMinPitch=function($){if($=$==null?Kn:$,$=Kn&&$<=this.transform.maxPitch)return this.transform.minPitch=$,this._update(),this.getPitch()<$&&this.setPitch($),this;throw new Error("minPitch must be between "+Kn+" and the current maxPitch, inclusive")},z.prototype.getMinPitch=function(){return this.transform.minPitch},z.prototype.setMaxPitch=function($){if($=$==null?Za:$,$>Za)throw new Error("maxPitch must be less than or equal to "+Za);if($>=this.transform.minPitch)return this.transform.maxPitch=$,this._update(),this.getPitch()>$&&this.setPitch($),this;throw new Error("maxPitch must be greater than the current minPitch")},z.prototype.getMaxPitch=function(){return this.transform.maxPitch},z.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},z.prototype.setRenderWorldCopies=function($){return this.transform.renderWorldCopies=$,this._update()},z.prototype.project=function($){return this.transform.locationPoint(i.LngLat.convert($))},z.prototype.unproject=function($){return this.transform.pointLocation(i.Point.convert($))},z.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},z.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},z.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},z.prototype._createDelegatedListener=function($,pe,de){var Ie=this,$e;if($==="mouseenter"||$==="mouseover"){var pt=!1,Kt=function(rr){var dr=Ie.getLayer(pe)?Ie.queryRenderedFeatures(rr.point,{layers:[pe]}):[];dr.length?pt||(pt=!0,de.call(Ie,new oe($,Ie,rr.originalEvent,{features:dr}))):pt=!1},ir=function(){pt=!1};return{layer:pe,listener:de,delegates:{mousemove:Kt,mouseout:ir}}}else if($==="mouseleave"||$==="mouseout"){var Jt=!1,vt=function(rr){var dr=Ie.getLayer(pe)?Ie.queryRenderedFeatures(rr.point,{layers:[pe]}):[];dr.length?Jt=!0:Jt&&(Jt=!1,de.call(Ie,new oe($,Ie,rr.originalEvent)))},Pt=function(rr){Jt&&(Jt=!1,de.call(Ie,new oe($,Ie,rr.originalEvent)))};return{layer:pe,listener:de,delegates:{mousemove:vt,mouseout:Pt}}}else{var Wt=function(rr){var dr=Ie.getLayer(pe)?Ie.queryRenderedFeatures(rr.point,{layers:[pe]}):[];dr.length&&(rr.features=dr,de.call(Ie,rr),delete rr.features)};return{layer:pe,listener:de,delegates:($e={},$e[$]=Wt,$e)}}},z.prototype.on=function($,pe,de){if(de===void 0)return Y.prototype.on.call(this,$,pe);var Ie=this._createDelegatedListener($,pe,de);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[$]=this._delegatedListeners[$]||[],this._delegatedListeners[$].push(Ie);for(var $e in Ie.delegates)this.on($e,Ie.delegates[$e]);return this},z.prototype.once=function($,pe,de){if(de===void 0)return Y.prototype.once.call(this,$,pe);var Ie=this._createDelegatedListener($,pe,de);for(var $e in Ie.delegates)this.once($e,Ie.delegates[$e]);return this},z.prototype.off=function($,pe,de){var Ie=this;if(de===void 0)return Y.prototype.off.call(this,$,pe);var $e=function(pt){for(var Kt=pt[$],ir=0;ir180;){var de=K.locationPoint(Y);if(de.x>=0&&de.y>=0&&de.x<=K.width&&de.y<=K.height)break;Y.lng>K.center.lng?Y.lng-=360:Y.lng+=360}return Y}var ro={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 Ao(Y,z,K){var O=Y.classList;for(var $ in ro)O.remove("mapboxgl-"+K+"-anchor-"+$);O.add("mapboxgl-"+K+"-anchor-"+z)}var Jn=function(Y){function z(K,O){if(Y.call(this),(K instanceof i.window.HTMLElement||O)&&(K=i.extend({element:K},O)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=K&&K.anchor||"center",this._color=K&&K.color||"#3FB1CE",this._scale=K&&K.scale||1,this._draggable=K&&K.draggable||!1,this._clickTolerance=K&&K.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=K&&K.rotation||0,this._rotationAlignment=K&&K.rotationAlignment||"auto",this._pitchAlignment=K&&K.pitchAlignment&&K.pitchAlignment!=="auto"?K.pitchAlignment:this._rotationAlignment,!K||!K.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var $=o.createNS("http://www.w3.org/2000/svg","svg"),pe=41,de=27;$.setAttributeNS(null,"display","block"),$.setAttributeNS(null,"height",pe+"px"),$.setAttributeNS(null,"width",de+"px"),$.setAttributeNS(null,"viewBox","0 0 "+de+" "+pe);var Ie=o.createNS("http://www.w3.org/2000/svg","g");Ie.setAttributeNS(null,"stroke","none"),Ie.setAttributeNS(null,"stroke-width","1"),Ie.setAttributeNS(null,"fill","none"),Ie.setAttributeNS(null,"fill-rule","evenodd");var $e=o.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"fill-rule","nonzero");var pt=o.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pt.setAttributeNS(null,"fill","#000000");for(var Kt=[{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"}],ir=0,Jt=Kt;ir=$}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},z.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"},z.prototype._addDragHandler=function(O){this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},z.prototype.setDraggable=function(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},z.prototype.isDraggable=function(){return this._draggable},z.prototype.setRotation=function(O){return this._rotation=O||0,this._update(),this},z.prototype.getRotation=function(){return this._rotation},z.prototype.setRotationAlignment=function(O){return this._rotationAlignment=O||"auto",this._update(),this},z.prototype.getRotationAlignment=function(){return this._rotationAlignment},z.prototype.setPitchAlignment=function(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this},z.prototype.getPitchAlignment=function(){return this._pitchAlignment},z}(i.Evented),Oa={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_o;function Po(Y){_o!==void 0?Y(_o):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(z){_o=z.state!=="denied",Y(_o)}):(_o=!!i.window.navigator.geolocation,Y(_o))}var Jo=0,Xl=!1,$c=function(Y){function z(K){Y.call(this),this.options=i.extend({},Oa,K),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.onAdd=function(O){return this._map=O,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Po(this._setupUI),this._container},z.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,Jo=0,Xl=!1},z.prototype._isOutOfMapMaxBounds=function(O){var $=this._map.getMaxBounds(),pe=O.coords;return $&&(pe.longitude<$.getWest()||pe.longitude>$.getEast()||pe.latitude<$.getSouth()||pe.latitude>$.getNorth())},z.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}},z.prototype._onSuccess=function(O){if(this._map){if(this._isOutOfMapMaxBounds(O)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",O)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(O),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",O)),this._finish()}},z.prototype._updateCamera=function(O){var $=new i.LngLat(O.coords.longitude,O.coords.latitude),pe=O.coords.accuracy,de=this._map.getBearing(),Ie=i.extend({bearing:de},this.options.fitBoundsOptions);this._map.fitBounds($.toBounds(pe),Ie,{geolocateSource:!0})},z.prototype._updateMarker=function(O){if(O){var $=new i.LngLat(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat($).addTo(this._map),this._userLocationDotMarker.setLngLat($).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},z.prototype._updateCircleRadius=function(){var O=this._map._container.clientHeight/2,$=this._map.unproject([0,O]),pe=this._map.unproject([1,O]),de=$.distanceTo(pe),Ie=Math.ceil(2*this._accuracy/de);this._circleElement.style.width=Ie+"px",this._circleElement.style.height=Ie+"px"},z.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},z.prototype._onError=function(O){if(this._map){if(this.options.trackUserLocation)if(O.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var $=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=$,this._geolocateButton.setAttribute("aria-label",$),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&Xl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",O)),this._finish()}},z.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},z.prototype._setupUI=function(O){var $=this;if(this._container.addEventListener("contextmenu",function(Ie){return Ie.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",O===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var pe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=pe,this._geolocateButton.setAttribute("aria-label",pe)}else{var de=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}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 Jn(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Jn({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(Ie){var $e=Ie.originalEvent&&Ie.originalEvent.type==="resize";!Ie.geolocateSource&&$._watchState==="ACTIVE_LOCK"&&!$e&&($._watchState="BACKGROUND",$._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),$._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),$.fire(new i.Event("trackuserlocationend")))})},z.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":Jo--,Xl=!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"),Jo++;var O;Jo>1?(O={maximumAge:6e5,timeout:0},Xl=!0):(O=this.options.positionOptions,Xl=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},z.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)},z}(i.Evented),xs={maxWidth:100,unit:"metric"},Qc=function(z){this.options=i.extend({},xs,z),i.bindAll(["_onMove","setUnit"],this)};Qc.prototype.getDefaultPosition=function(){return"bottom-left"},Qc.prototype._onMove=function(){El(this._map,this._container,this.options)},Qc.prototype.onAdd=function(z){return this._map=z,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",z.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Qc.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Qc.prototype.setUnit=function(z){this.options.unit=z,El(this._map,this._container,this.options)};function El(Y,z,K){var O=K&&K.maxWidth||100,$=Y._container.clientHeight/2,pe=Y.unproject([0,$]),de=Y.unproject([O,$]),Ie=pe.distanceTo(de);if(K&&K.unit==="imperial"){var $e=3.2808*Ie;if($e>5280){var pt=$e/5280;bc(z,O,pt,Y._getUIString("ScaleControl.Miles"))}else bc(z,O,$e,Y._getUIString("ScaleControl.Feet"))}else if(K&&K.unit==="nautical"){var Kt=Ie/1852;bc(z,O,Kt,Y._getUIString("ScaleControl.NauticalMiles"))}else Ie>=1e3?bc(z,O,Ie/1e3,Y._getUIString("ScaleControl.Kilometers")):bc(z,O,Ie,Y._getUIString("ScaleControl.Meters"))}function bc(Y,z,K,O){var $=yf(K),pe=$/K;Y.style.width=z*pe+"px",Y.innerHTML=$+" "+O}function wc(Y){var z=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*z)/z}function yf(Y){var z=Math.pow(10,(""+Math.floor(Y)).length-1),K=Y/z;return K=K>=10?10:K>=5?5:K>=3?3:K>=2?2:K>=1?1:wc(K),z*K}var Hl=function(z){this._fullscreen=!1,z&&z.container&&(z.container instanceof i.window.HTMLElement?this._container=z.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")};Hl.prototype.onAdd=function(z){return this._map=z,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},Hl.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hl.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},Hl.prototype._setupUI=function(){var z=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",z).setAttribute("aria-hidden",!0),z.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hl.prototype._updateTitle=function(){var z=this._getTitle();this._fullscreenButton.setAttribute("aria-label",z),this._fullscreenButton.title=z},Hl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Hl.prototype._isFullscreen=function(){return this._fullscreen},Hl.prototype._changeIcon=function(){var z=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;z===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Hl.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 Fc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ef=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ls=function(Y){function z(K){Y.call(this),this.options=i.extend(Object.create(Fc),K),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(z.__proto__=Y),z.prototype=Object.create(Y&&Y.prototype),z.prototype.constructor=z,z.prototype.addTo=function(O){return this._map&&this.remove(),this._map=O,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},z.prototype.isOpen=function(){return!!this._map},z.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},z.prototype.getLngLat=function(){return this._lngLat},z.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},z.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},z.prototype.getElement=function(){return this._container},z.prototype.setText=function(O){return this.setDOMContent(i.window.document.createTextNode(O))},z.prototype.setHTML=function(O){var $=i.window.document.createDocumentFragment(),pe=i.window.document.createElement("body"),de;for(pe.innerHTML=O;de=pe.firstChild,!!de;)$.appendChild(de);return this.setDOMContent($)},z.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},z.prototype.setMaxWidth=function(O){return this.options.maxWidth=O,this._update(),this},z.prototype.setDOMContent=function(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this},z.prototype.addClassName=function(O){this._container&&this._container.classList.add(O)},z.prototype.removeClassName=function(O){this._container&&this._container.classList.remove(O)},z.prototype.setOffset=function(O){return this.options.offset=O,this._update(),this},z.prototype.toggleClassName=function(O){if(this._container)return this._container.classList.toggle(O)},z.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))},z.prototype._onMouseUp=function(O){this._update(O.point)},z.prototype._onMouseMove=function(O){this._update(O.point)},z.prototype._onDrag=function(O){this._update(O.point)},z.prototype._update=function(O){var $=this,pe=this._lngLat||this._trackPointer;if(!(!this._map||!pe||!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(vt){return $._container.classList.add(vt)}),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=ma(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!O))){var de=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat),Ie=this.options.anchor,$e=_f(this.options.offset);if(!Ie){var pt=this._container.offsetWidth,Kt=this._container.offsetHeight,ir;de.y+$e.bottom.ythis._map.transform.height-Kt?ir=["bottom"]:ir=[],de.xthis._map.transform.width-pt/2&&ir.push("right"),ir.length===0?Ie="bottom":Ie=ir.join("-")}var Jt=de.add($e[Ie]).round();o.setTransform(this._container,ro[Ie]+" translate("+Jt.x+"px,"+Jt.y+"px)"),Ao(this._container,Ie,"popup")}},z.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var O=this._container.querySelector(ef);O&&O.focus()}},z.prototype._onClose=function(){this.remove()},z}(i.Evented);function _f(Y){if(Y)if(typeof Y=="number"){var z=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(z,z),"top-right":new i.Point(-z,z),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(z,-z),"bottom-right":new i.Point(-z,-z),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var K=i.Point.convert(Y);return{center:K,top:K,"top-left":K,"top-right":K,bottom:K,"bottom-left":K,"bottom-right":K,left:K,right:K}}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 _f(new i.Point(0,0))}var ns={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:vn,NavigationControl:Xn,GeolocateControl:$c,AttributionControl:Dn,ScaleControl:Qc,FullscreenControl:Hl,Popup:ls,Marker:Jn,Style:mu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:jn,clearPrewarmedResources:la,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 Pi.workerCount},set workerCount(Y){Pi.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(z){i.clearTileCache(z)},workerUrl:""};return ns}),r})});var GUe=ye((Syr,HUe)=>{"use strict";var tw=Mr(),xHt=Ll().sanitizeHTML,bHt=UK(),NUe=c1();function UUe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=NUe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ig=UUe.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=jF(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,!!jF(e)){var r=wHt(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 VUe(e){var t={},r={};switch(e.type){case"circle":tw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":tw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":tw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=bHt(n.textposition,n.iconsize);tw.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}),tw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":tw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function wHt(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=xHt(e.sourceattribution)),n}HUe.exports=function(t,r,n){var i=new UUe(t,r);return i.update(n),i}});var QUe=ye((Myr,$Ue)=>{"use strict";var XK=ZK(),YK=Mr(),XUe=ix(),jUe=ba(),THt=Qa(),AHt=gv(),WF=Nc(),YUe=Sg(),SHt=YUe.drawMode,MHt=YUe.selectMode,EHt=wf().prepSelect,kHt=wf().clearOutline,CHt=wf().clearSelectionsCache,LHt=wf().selectOnClick,yx=c1(),PHt=GUe();function KUe(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 Ah=KUe.prototype;Ah.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)};Ah.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=JUe(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 XK.Map({container:i.div,style:o.style,center:KK(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 XK.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(XUe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Ah.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=JUe(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(XUe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Ah.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&&LHt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&WF.click(n,l.originalEvent)}}};Ah.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=YK.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),MHt(a)||SHt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){EHt(l,u,c,t.dragOptions,a)},AHt.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))};Ah.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])};Ah.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 JK=Mr(),IHt=k_(),DHt=Zd(),eVe=Pk();tVe.exports=function(t,r,n){IHt(t,r,n,{type:"mapbox",attributes:eVe,handleDefaults:RHt,partition:"y",accessToken:r._mapboxAccessToken})};function RHt(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,DHt(e,t,{name:"layers",handleItemDefaults:zHt}),t._input=e}function zHt(e,t){function r(l,u){return JK.coerce(e,t,eVe.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",JK.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"),JK.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var ZF=ye(Np=>{"use strict";var iVe=ZK(),tm=Mr(),$K=tm.strTranslate,FHt=tm.strScale,qHt=kd().getSubplotCalcData,OHt=Zp(),BHt=xa(),nVe=ao(),NHt=Ll(),UHt=QUe(),_x="mapbox",Qm=Np.constants=c1();Np.name=_x;Np.attr="subplot";Np.idRoot=_x;Np.idRegex=Np.attrRegex=tm.counterRegex(_x);var VHt=["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=Pk();Np.supplyLayoutDefaults=rVe();var aVe=!0;Np.plot=function(t){aVe&&(aVe=!1,tm.warn(VHt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[_x];if(iVe.version!==Qm.requiredVersion)throw new Error(Qm.wrongVersionErrorMsg);var a=HHt(t,i);iVe.accessToken=a;for(var o=0;og/2){var E=d.split("|").join("
");x.text(E).attr("data-unformatted",E).call(NHt.convertToTspans,e),b=nVe.bBox(x.node())}x.attr("transform",$K(-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 k=1;b.width+6>g&&(k=g/(b.width+6));var A=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",$K(A[0],A[1])+FHt(k))}};function HHt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l1&&tm.warn(Qm.multipleTokensErrorMsg),i[0]):(a.length&&tm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function oVe(e){return typeof e=="string"&&(Qm.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[_x],n=0;n{"use strict";var Cyr=["*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(" ");sVe.exports={attributes:BF(),supplyDefaults:_Ue(),colorbar:Kd(),formatLabels:NK(),calc:lz(),plot:DUe(),hoverPoints:GF().hoverPoints,eventData:qUe(),selectPoints:BUe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:ZF(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var cVe=ye((Pyr,uVe)=>{"use strict";uVe.exports=lVe()});var QK=ye((Iyr,fVe)=>{"use strict";var f1=J5(),GHt=Kl(),jHt=Wo().hovertemplateAttrs,WHt=vl(),xx=no().extendFlat;fVe.exports=xx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:xx({},f1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:f1.text,hovertext:f1.hovertext,marker:{line:{color:xx({},f1.marker.line.color,{editType:"plot"}),width:xx({},f1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:xx({},f1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:xx({},f1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:xx({},f1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:f1.hoverinfo,hovertemplate:jHt({},{keys:["properties"]}),showlegend:xx({},WHt.showlegend,{dflt:!1})},GHt("",{cLetter:"z",editTypeOverride:"calc"}))});var dVe=ye((Dyr,hVe)=>{"use strict";var zk=Mr(),ZHt=Uh(),XHt=QK();hVe.exports=function(t,r,n,i){function a(c,f){return zk.coerce(t,r,XHt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!zk.isArrayOrTypedArray(o)||!o.length||!zk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||zk.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),ZHt(t,r,i,a,{prefix:"",cLetter:"z"}),zk.coerceSelectionMarkerOpacity(r,a)}});var eJ=ye((Ryr,gVe)=>{"use strict";var YHt=uo(),h1=Mr(),KHt=Mu(),JHt=ao(),$Ht=tx().makeBlank,vVe=ix();function QHt(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:$Ht()};if(!r)return a;var o=vVe.extractTraceFeature(e);if(!o)return a;var s=KHt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;h1.isArrayOrTypedArray(l.opacity)&&(c=function(E){var k=E.mo;return YHt(k)?+h1.constrain(k,0,1):0});var f;h1.isArrayOrTypedArray(u.color)&&(f=function(E){return E.mlc});var h;h1.isArrayOrTypedArray(u.width)&&(h=function(E){return E.mlw});for(var d=0;d{"use strict";var yVe=eJ().convert,eGt=eJ().convertOnSelect,mVe=c1().traceLayerPrefix;function _Ve(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",mVe+t+"-fill"],["line",mVe+t+"-line"]],this.below=null}var TA=_Ve.prototype;TA.update=function(e){this._update(yVe(e)),e[0].trace._glTrace=this};TA.updateOnSelect=function(e){this._update(eGt(e))};TA._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])};TA.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};xVe.exports=function(t,r){var n=r[0].trace,i=new _Ve(t,n.uid),a=i.sourceId,o=yVe(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 TVe=ye((qyr,wVe)=>{"use strict";var Fyr=["*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(" ");wVe.exports={attributes:QK(),supplyDefaults:dVe(),colorbar:S_(),calc:Lz(),plot:bVe(),hoverPoints:Iz(),eventData:Dz(),selectPoints:Rz(),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";AVe.exports=TVe()});var rJ=ye((Byr,EVe)=>{"use strict";var tGt=Kl(),rGt=Wo().hovertemplateAttrs,MVe=vl(),XF=BF(),tJ=no().extendFlat;EVe.exports=tJ({lon:XF.lon,lat:XF.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:XF.text,hovertext:XF.hovertext,hoverinfo:tJ({},MVe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:rGt(),showlegend:tJ({},MVe.showlegend,{dflt:!1})},tGt("",{cLetter:"z",editTypeOverride:"calc"}))});var CVe=ye((Nyr,kVe)=>{"use strict";var iGt=Mr(),nGt=Uh(),aGt=rJ();kVe.exports=function(t,r,n,i){function a(u,c){return iGt.coerce(t,r,aGt,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"),nGt(t,r,i,a,{prefix:"",cLetter:"z"})}});var IVe=ye((Uyr,PVe)=>{"use strict";var iJ=uo(),oGt=Mr().isArrayOrTypedArray,nJ=es().BADNUM,sGt=zv(),LVe=Mr()._;PVe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=oGt(a)&&a.length,s=0;s{"use strict";var lGt=uo(),aJ=Mr(),DVe=va(),RVe=Mu(),zVe=es().BADNUM,uGt=tx().makeBlank;FVe.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:uGt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=aJ.isArrayOrTypedArray(l)&&l.length,f=aJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=RVe.extractOpts(r),g=b.reversescale?RVe.flipScale(b.colorscale):b.colorscale,E=g[0][1],k=DVe.opacity(E)<1?E:DVe.addOpacity(E,0),A=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var OVe=qVe(),cGt=c1().traceLayerPrefix;function BVe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",cGt+t+"-heatmap"]],this.below=null}var YF=BVe.prototype;YF.update=function(e){var t=this.subplot,r=this.layerList,n=OVe(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])};YF.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};NVe.exports=function(t,r){var n=r[0].trace,i=new BVe(t,n.uid),a=i.sourceId,o=OVe(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 HVe=ye((Gyr,VVe)=>{"use strict";var fGt=Qa(),hGt=GF().hoverPoints,dGt=GF().getExtraText;VVe.exports=function(t,r,n){var i=hGt(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=fGt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=dGt(s,l,o[0].t.labels),[a]}}});var jVe=ye((jyr,GVe)=>{"use strict";GVe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var ZVe=ye((Zyr,WVe)=>{"use strict";var Wyr=["*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(" ");WVe.exports={attributes:rJ(),supplyDefaults:CVe(),colorbar:S_(),formatLabels:NK(),calc:IVe(),plot:UVe(),hoverPoints:HVe(),eventData:jVe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";XVe.exports=ZVe()});var JVe=ye((Yyr,KVe)=>{KVe.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} @@ -3220,9 +3220,9 @@ uniform `+Kt+" "+ir+" u_"+Jt+`; {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 QVe=ye((Kyr,$Ve)=>{$Ve.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 bx=ye((Jyr,nHe)=>{"use strict";var vGt=X1(),pGt=JVe(),gGt=QVe(),mGt='\xA9 OpenStreetMap contributors',eHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",tHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",KF="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",yGt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",_Gt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",xGt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",iHe={basic:KF,streets:KF,outdoors:KF,light:eHe,dark:tHe,satellite:gGt,"satellite-streets":pGt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:mGt,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":eHe,"carto-darkmatter":tHe,"carto-voyager":KF,"carto-positron-nolabels":yGt,"carto-darkmatter-nolabels":_Gt,"carto-voyager-nolabels":xGt},rHe=vGt(iHe);nHe.exports={styleValueDflt:"basic",stylesMap:iHe,styleValuesMap:rHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",rHe.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error."}});var Fk=ye(($yr,uHe)=>{"use strict";var aHe=Mr(),oHe=va().defaultLine,bGt=Ju().attributes,wGt=Su(),TGt=Uc().textposition,AGt=Bu().overrideAll,SGt=Vs().templatedArray,sHe=bx(),lHe=wGt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});lHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var MGt=uHe.exports=AGt({_arrayAttrRegexps:[aHe.counterRegex("map",".layers",!0)],domain:bGt({name:"map"}),style:{valType:"any",values:sHe.styleValuesMap,dflt:sHe.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:SGt("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:oHe},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:oHe}},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:lHe,textposition:aHe.extendFlat({},TGt,{arrayOk:!1})}})},"plot","from-root");MGt.uirevision={valType:"any",editType:"none"}});var JF=ye((Qyr,hHe)=>{"use strict";var EGt=Wo().hovertemplateAttrs,kGt=Wo().texttemplateAttrs,CGt=Eg(),qk=H2(),AA=Uc(),cHe=Fk(),LGt=vl(),PGt=Kl(),rw=no().extendFlat,IGt=Bu().overrideAll,DGt=Fk(),fHe=qk.line,SA=qk.marker;hHe.exports=IGt({lon:qk.lon,lat:qk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:rw({},DGt.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({},SA.opacity,{dflt:1})},mode:rw({},AA.mode,{dflt:"markers"}),text:rw({},AA.text,{}),texttemplate:kGt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:rw({},AA.hovertext,{}),line:{color:fHe.color,width:fHe.width},connectgaps:AA.connectgaps,marker:rw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:SA.opacity,size:SA.size,sizeref:SA.sizeref,sizemin:SA.sizemin,sizemode:SA.sizemode},PGt("marker")),fill:qk.fill,fillcolor:CGt(),textfont:cHe.layers.symbol.textfont,textposition:cHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:AA.selected.marker},unselected:{marker:AA.unselected.marker},hoverinfo:rw({},LGt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:EGt()},"calc","nested")});var oJ=ye((e1r,dHe)=>{"use strict";var RGt=["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"];dHe.exports={isSupportedFont:function(e){return RGt.indexOf(e)!==-1}}});var gHe=ye((t1r,pHe)=>{"use strict";var Ok=Mr(),sJ=lu(),zGt=$p(),FGt=D0(),qGt=R0(),OGt=Ig(),vHe=JF(),BGt=oJ().isSupportedFont;pHe.exports=function(t,r,n,i){function a(g,E){return Ok.coerce(t,r,vHe,g,E)}function o(g,E){return Ok.coerce2(t,r,vHe,g,E)}var s=NGt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),sJ.hasMarkers(r)){zGt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Ok.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Ok.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}sJ.hasLines(r)&&(FGt(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,x=a("cluster.enabled",v);if(x||sJ.hasText(r)){var b=i.font.family;qGt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:BGt(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"&&OGt(t,r,n,a),Ok.coerceSelectionMarkerOpacity(r,a)};function NGt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var lJ=ye((r1r,yHe)=>{"use strict";var mHe=Qa();yHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=mHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=mHe.tickText(o,o.c2l(s[1]),!0).text,i}});var uJ=ye((i1r,xHe)=>{"use strict";var _He=Mr();xHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=_He.isArrayOrTypedArray(r)?_He.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 MHe=ye((n1r,SHe)=>{"use strict";var THe=uo(),nv=Mr(),UGt=es().BADNUM,QF=tx(),bHe=Mu(),VGt=ao(),HGt=S3(),e7=lu(),GGt=oJ().isSupportedFont,jGt=uJ(),WGt=rp().appendArrayPointValue,ZGt=Ll().NEWLINES,XGt=Ll().BR_TAG_ALL;SHe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=e7.hasLines(n),s=e7.hasMarkers(n),l=e7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=$F("fill"),d=$F("line"),v=$F("circle"),x=$F("symbol"),b={fill:h,line:d,circle:v,symbol:x};if(!i)return b;var g;if((a||o)&&(g=QF.calcTraceToLineCoords(r)),a&&(h.geojson=QF.makePolygon(g),h.layout.visibility="visible",nv.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=QF.makeLine(g),d.layout.visibility="visible",nv.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var E=YGt(r);v.geojson=E.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":fJ(n.cluster.color,n.cluster.step),"circle-radius":fJ(n.cluster.size,n.cluster.step),"circle-opacity":fJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":wHe(n),"text-size":12}}),nv.extendFlat(v.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=KGt(r,t),nv.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(nv.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&nv.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,nv.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var k=(n.marker||{}).size,S=jGt(n.textposition,k);nv.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":wHe(n)}),nv.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function $F(e){return{type:e,geojson:QF.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function YGt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=nv.isArrayOrTypedArray(r.color),a=nv.isArrayOrTypedArray(r.size),o=nv.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;i&&(bHe.hasColorscale(t,"marker")?c=bHe.makeColorScaleFuncFromTrace(r):c=nv.identity);var f;a&&(f=HGt(t));var h;o&&(h=function(k){var S=THe(k)?+nv.constrain(k,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"),GGt(s)||(s=r);var l=s.split(", ");return l}});var LHe=ye((a1r,CHe)=>{"use strict";var JGt=Mr(),EHe=MHe(),MA=bx().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:MA+t+"-fill",line:MA+t+"-line",circle:MA+t+"-circle",symbol:MA+t+"-symbol",cluster:MA+t+"-cluster",clusterCount:MA+t+"-cluster-count"},this.below=null}var Bk=kHe.prototype;Bk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&JGt.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)};Bk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Bk.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 _=S[L];i.removeLayer(u.layerIds[_])}k||i.removeSource(u.sourceIds.circle)}function h(k){for(var S=ng.nonCluster,L=0;L=0;L--){var _=S[L];i.removeLayer(u.layerIds[_]),k||i.removeSource(u.sourceIds[_])}}function v(k){l?f(k):d(k)}function x(k){s?c(k):h(k)}function b(){for(var k=s?ng.cluster:ng.nonCluster,S=0;S=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};CHe.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=EHe(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 $Gt=Nc(),hJ=Mr(),QGt=oT(),ejt=hJ.fillText,tjt=es().BADNUM,rjt=bx().traceLayerPrefix;function ijt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=rjt+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 x(M){var p=M.lonlat;if(p[0]===tjt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=hJ.modHalf(p[0],360),T=p[1],F=s.project([P,T]),q=F.x-a.c2p([v,T]),V=F.y-o.c2p([P,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+V*V)-H,1-3/H)}if($Gt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],g=b.lonlat,E=[hJ.modHalf(g[0],360)+d,g[1]],k=a.c2p(E),S=o.c2p(E),L=b.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=S-L,e.y1=S+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=QGt(i,b),e.extraText=PHe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function PHe(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)&&ejt(t,e,u),u.join("
")}IHe.exports={hoverPoints:ijt,getExtraText:PHe}});var RHe=ye((s1r,DHe)=>{"use strict";DHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var FHe=ye((l1r,zHe)=>{"use strict";var njt=Mr(),ajt=lu(),ojt=es().BADNUM;zHe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!ajt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof dJ=="object"&&typeof vJ!="undefined"?vJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(dJ,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(D,A,R,j){return new(R||(R=Promise))(function(te,ue){function ve(at){try{Ze(j.next(at))}catch(Tt){ue(Tt)}}function Re(at){try{Ze(j.throw(at))}catch(Tt){ue(Tt)}}function Ze(at){var Tt;at.done?te(at.value):(Tt=at.value,Tt instanceof R?Tt:new R(function(Ft){Ft(Tt)})).then(ve,Re)}Ze((j=j.apply(D,A||[])).next())})}function o(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(D,A){this.x=D,this.y=A}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(D){return this.clone()._add(D)},sub:function(D){return this.clone()._sub(D)},multByPoint:function(D){return this.clone()._multByPoint(D)},divByPoint:function(D){return this.clone()._divByPoint(D)},mult:function(D){return this.clone()._mult(D)},div:function(D){return this.clone()._div(D)},rotate:function(D){return this.clone()._rotate(D)},rotateAround:function(D,A){return this.clone()._rotateAround(D,A)},matMult:function(D){return this.clone()._matMult(D)},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(D){return this.x===D.x&&this.y===D.y},dist:function(D){return Math.sqrt(this.distSqr(D))},distSqr:function(D){var A=D.x-this.x,R=D.y-this.y;return A*A+R*R},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(D){return Math.atan2(this.y-D.y,this.x-D.x)},angleWith:function(D){return this.angleWithSep(D.x,D.y)},angleWithSep:function(D,A){return Math.atan2(this.x*A-this.y*D,this.x*D+this.y*A)},_matMult:function(D){var A=D[2]*this.x+D[3]*this.y;return this.x=D[0]*this.x+D[1]*this.y,this.y=A,this},_add:function(D){return this.x+=D.x,this.y+=D.y,this},_sub:function(D){return this.x-=D.x,this.y-=D.y,this},_mult:function(D){return this.x*=D,this.y*=D,this},_div:function(D){return this.x/=D,this.y/=D,this},_multByPoint:function(D){return this.x*=D.x,this.y*=D.y,this},_divByPoint:function(D){return this.x/=D.x,this.y/=D.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var D=this.y;return this.y=this.x,this.x=-D,this},_rotate:function(D){var A=Math.cos(D),R=Math.sin(D),j=R*this.x+A*this.y;return this.x=A*this.x-R*this.y,this.y=j,this},_rotateAround:function(D,A){var R=Math.cos(D),j=Math.sin(D),te=A.y+j*(this.x-A.x)+R*(this.y-A.y);return this.x=A.x+R*(this.x-A.x)-j*(this.y-A.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(D){return D instanceof l?D:Array.isArray(D)?new l(D[0],D[1]):D};var u=o(s),c=f;function f(D,A,R,j){this.cx=3*D,this.bx=3*(R-D)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(j-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=D,this.p1y=A,this.p2x=R,this.p2y=j}f.prototype={sampleCurveX:function(D){return((this.ax*D+this.bx)*D+this.cx)*D},sampleCurveY:function(D){return((this.ay*D+this.by)*D+this.cy)*D},sampleCurveDerivativeX:function(D){return(3*this.ax*D+2*this.bx)*D+this.cx},solveCurveX:function(D,A){if(A===void 0&&(A=1e-6),D<0)return 0;if(D>1)return 1;for(var R=D,j=0;j<8;j++){var te=this.sampleCurveX(R)-D;if(Math.abs(te)te?ve=R:Re=R,R=.5*(Re-ve)+ve;return R},solve:function(D,A){return this.sampleCurveY(this.solveCurveX(D,A))}};var h=o(c);let d,v;function x(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,x())){let A=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(A){for(let j=0;j<5*5;j++){let te=4*j;A.fillStyle=`rgb(${te},${te+1},${te+2})`,A.fillRect(j%5,Math.floor(j/5),1,1)}let R=A.getImageData(0,0,5,5).data;for(let j=0;j<5*5*4;j++)if(j%4!=3&&R[j]!==j){v=!0;break}}}return v||!1}function g(D,A,R,j){let te=new h(D,A,R,j);return ue=>te.solve(ue)}let E=g(.25,.1,.25,1);function k(D,A,R){return Math.min(R,Math.max(A,D))}function S(D,A,R){let j=R-A,te=((D-A)%j+j)%j+A;return te===A?R:te}function L(D,...A){for(let R of A)for(let j in R)D[j]=R[j];return D}let _=1;function C(D,A,R){let j={};for(let te in D)j[te]=A.call(this,D[te],te,D);return j}function M(D,A,R){let j={};for(let te in D)A.call(this,D[te],te,D)&&(j[te]=D[te]);return j}function p(D){return Array.isArray(D)?D.map(p):typeof D=="object"&&D?C(D,p):D}let P={};function T(D){P[D]||(typeof console!="undefined"&&console.warn(D),P[D]=!0)}function F(D,A,R){return(R.y-D.y)*(A.x-D.x)>(A.y-D.y)*(R.x-D.x)}function q(D){return typeof WorkerGlobalScope!="undefined"&&D!==void 0&&D instanceof WorkerGlobalScope}let V=null;function H(D){return typeof ImageBitmap!="undefined"&&D instanceof ImageBitmap}let X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function G(D,A,R,j,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let ue=new VideoFrame(D,{timestamp:0});try{let ve=ue==null?void 0:ue.format;if(!ve||!ve.startsWith("BGR")&&!ve.startsWith("RGB"))throw new Error(`Unrecognized format ${ve}`);let Re=ve.startsWith("BGR"),Ze=new Uint8ClampedArray(j*te*4);if(yield ue.copyTo(Ze,function(at,Tt,Ft,Qt,sr){let Tr=4*Math.max(-Tt,0),Pr=(Math.max(0,Ft)-Ft)*Qt*4+Tr,$r=4*Qt,ni=Math.max(0,Tt),Ri=Math.max(0,Ft);return{rect:{x:ni,y:Ri,width:Math.min(at.width,Tt+Qt)-ni,height:Math.min(at.height,Ft+sr)-Ri},layout:[{offset:Pr,stride:$r}]}}(D,A,R,j,te)),Re)for(let at=0;atq(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Te=function(D,A){if(/:\/\//.test(D.url)&&!/^https?:|^file:/.test(D.url)){let j=Me(D.url);if(j)return j(D,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:D,targetMapId:ke},A)}if(!(/^file:/.test(R=D.url)||/^file:/.test(ie())&&!/^\w+:/.test(R))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(j,te){return a(this,void 0,void 0,function*(){let ue=new Request(j.url,{method:j.method||"GET",body:j.body,credentials:j.credentials,headers:j.headers,cache:j.cache,referrer:ie(),signal:te.signal});j.type!=="json"||ue.headers.has("Accept")||ue.headers.set("Accept","application/json");let ve=yield fetch(ue);if(!ve.ok){let at=yield ve.blob();throw new ge(ve.status,ve.statusText,j.url,at)}let Re;Re=j.type==="arrayBuffer"||j.type==="image"?ve.arrayBuffer():j.type==="json"?ve.json():ve.text();let Ze=yield Re;if(te.signal.aborted)throw ae();return{data:Ze,cacheControl:ve.headers.get("Cache-Control"),expires:ve.headers.get("Expires")}})}(D,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:D,mustQueue:!0,targetMapId:ke},A)}var R;return function(j,te){return new Promise((ue,ve)=>{var Re;let Ze=new XMLHttpRequest;Ze.open(j.method||"GET",j.url,!0),j.type!=="arrayBuffer"&&j.type!=="image"||(Ze.responseType="arraybuffer");for(let at in j.headers)Ze.setRequestHeader(at,j.headers[at]);j.type==="json"&&(Ze.responseType="text",!((Re=j.headers)===null||Re===void 0)&&Re.Accept||Ze.setRequestHeader("Accept","application/json")),Ze.withCredentials=j.credentials==="include",Ze.onerror=()=>{ve(new Error(Ze.statusText))},Ze.onload=()=>{if(!te.signal.aborted)if((Ze.status>=200&&Ze.status<300||Ze.status===0)&&Ze.response!==null){let at=Ze.response;if(j.type==="json")try{at=JSON.parse(Ze.response)}catch(Tt){return void ve(Tt)}ue({data:at,cacheControl:Ze.getResponseHeader("Cache-Control"),expires:Ze.getResponseHeader("Expires")})}else{let at=new Blob([Ze.response],{type:Ze.getResponseHeader("Content-Type")});ve(new ge(Ze.status,Ze.statusText,j.url,at))}},te.signal.addEventListener("abort",()=>{Ze.abort(),ve(ae())}),Ze.send(j.body)})}(D,A)};function Ee(D){if(!D||D.indexOf("://")<=0||D.indexOf("data:image/")===0||D.indexOf("blob:")===0)return!0;let A=new URL(D),R=window.location;return A.protocol===R.protocol&&A.host===R.host}function Ae(D,A,R){R[D]&&R[D].indexOf(A)!==-1||(R[D]=R[D]||[],R[D].push(A))}function ze(D,A,R){if(R&&R[D]){let j=R[D].indexOf(A);j!==-1&&R[D].splice(j,1)}}class Ce{constructor(A,R={}){L(this,R),this.type=A}}class me extends Ce{constructor(A,R={}){super("error",L({error:A},R))}}class De{on(A,R){return this._listeners=this._listeners||{},Ae(A,R,this._listeners),this}off(A,R){return ze(A,R,this._listeners),ze(A,R,this._oneTimeListeners),this}once(A,R){return R?(this._oneTimeListeners=this._oneTimeListeners||{},Ae(A,R,this._oneTimeListeners),this):new Promise(j=>this.once(A,j))}fire(A,R){typeof A=="string"&&(A=new Ce(A,R||{}));let j=A.type;if(this.listens(j)){A.target=this;let te=this._listeners&&this._listeners[j]?this._listeners[j].slice():[];for(let Re of te)Re.call(this,A);let ue=this._oneTimeListeners&&this._oneTimeListeners[j]?this._oneTimeListeners[j].slice():[];for(let Re of ue)ze(j,Re,this._oneTimeListeners),Re.call(this,A);let ve=this._eventedParent;ve&&(L(A,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),ve.fire(A))}else A instanceof me&&console.error(A.error);return this}listens(A){return this._listeners&&this._listeners[A]&&this._listeners[A].length>0||this._oneTimeListeners&&this._oneTimeListeners[A]&&this._oneTimeListeners[A].length>0||this._eventedParent&&this._eventedParent.listens(A)}setEventedParent(A,R){return this._eventedParent=A,this._eventedParentData=R,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 Ge=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function nt(D,A){let R={};for(let j in D)j!=="ref"&&(R[j]=D[j]);return Ge.forEach(j=>{j in A&&(R[j]=A[j])}),R}function ct(D,A){if(Array.isArray(D)){if(!Array.isArray(A)||D.length!==A.length)return!1;for(let R=0;R`:D.itemType.kind==="value"?"array":`array<${A}>`}return D.kind}let Ve=[Lt,St,Et,dt,Ht,Br,$t,Ne(fr),Or,Nr,ut];function Xe(D,A){if(A.kind==="error")return null;if(D.kind==="array"){if(A.kind==="array"&&(A.N===0&&A.itemType.kind==="value"||!Xe(D.itemType,A.itemType))&&(typeof D.N!="number"||D.N===A.N))return null}else{if(D.kind===A.kind)return null;if(D.kind==="value"){for(let R of Ve)if(!Xe(R,A))return null}}return`Expected ${Ye(D)} but found ${Ye(A)} instead.`}function ht(D,A){return A.some(R=>R.kind===D.kind)}function Le(D,A){return A.some(R=>R==="null"?D===null:R==="array"?Array.isArray(D):R==="object"?D&&!Array.isArray(D)&&typeof D=="object":R===typeof D)}function xe(D,A){return D.kind==="array"&&A.kind==="array"?D.itemType.kind===A.itemType.kind&&typeof D.N=="number":D.kind===A.kind}let Se=.96422,lt=.82521,Gt=4/29,Vt=6/29,ar=3*Vt*Vt,Qr=Vt*Vt*Vt,ai=Math.PI/180,jr=180/Math.PI;function ri(D){return(D%=360)<0&&(D+=360),D}function bi([D,A,R,j]){let te,ue,ve=Wi((.2225045*(D=nn(D))+.7168786*(A=nn(A))+.0606169*(R=nn(R)))/1);D===A&&A===R?te=ue=ve:(te=Wi((.4360747*D+.3850649*A+.1430804*R)/Se),ue=Wi((.0139322*D+.0971045*A+.7141733*R)/lt));let Re=116*ve-16;return[Re<0?0:Re,500*(te-ve),200*(ve-ue),j]}function nn(D){return D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function Wi(D){return D>Qr?Math.pow(D,1/3):D/ar+Gt}function Ni([D,A,R,j]){let te=(D+16)/116,ue=isNaN(A)?te:te+A/500,ve=isNaN(R)?te:te-R/200;return te=1*$i(te),ue=Se*$i(ue),ve=lt*$i(ve),[_n(3.1338561*ue-1.6168667*te-.4906146*ve),_n(-.9787684*ue+1.9161415*te+.033454*ve),_n(.0719453*ue-.2289914*te+1.4052427*ve),j]}function _n(D){return(D=D<=.00304?12.92*D:1.055*Math.pow(D,1/2.4)-.055)<0?0:D>1?1:D}function $i(D){return D>Vt?D*D*D:ar*(D-Gt)}function zn(D){return parseInt(D.padEnd(2,D),16)/255}function Wn(D,A){return It(A?D/100:D,0,1)}function It(D,A,R){return Math.min(Math.max(A,D),R)}function ft(D){return!D.some(Number.isNaN)}let jt={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 Zt{constructor(A,R,j,te=1,ue=!0){this.r=A,this.g=R,this.b=j,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[A,R,j,te]))}static parse(A){if(A instanceof Zt)return A;if(typeof A!="string")return;let R=function(j){if((j=j.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=jt[j];if(te){let[ve,Re,Ze]=te;return[ve/255,Re/255,Ze/255,1]}if(j.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(j)){let ve=j.length<6?1:2,Re=1;return[zn(j.slice(Re,Re+=ve)),zn(j.slice(Re,Re+=ve)),zn(j.slice(Re,Re+=ve)),zn(j.slice(Re,Re+ve)||"ff")]}if(j.startsWith("rgb")){let ve=j.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ve){let[Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri]=ve,pi=[Tt||" ",sr||" ",$r].join("");if(pi===" "||pi===" /"||pi===",,"||pi===",,,"){let ki=[at,Qt,Pr].join(""),Zi=ki==="%%%"?100:ki===""?255:0;if(Zi){let ta=[It(+Ze/Zi,0,1),It(+Ft/Zi,0,1),It(+Tr/Zi,0,1),ni?Wn(+ni,Ri):1];if(ft(ta))return ta}}return}}let ue=j.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr]=ue,Pr=[Ze||" ",Tt||" ",Qt].join("");if(Pr===" "||Pr===" /"||Pr===",,"||Pr===",,,"){let $r=[+Re,It(+at,0,100),It(+Ft,0,100),sr?Wn(+sr,Tr):1];if(ft($r))return function([ni,Ri,pi,ki]){function Zi(ta){let Va=(ta+ni/30)%12,Io=Ri*Math.min(pi,1-pi);return pi-Io*Math.max(-1,Math.min(Va-3,9-Va,1))}return ni=ri(ni),Ri/=100,pi/=100,[Zi(0),Zi(8),Zi(4),ki]}($r)}}}(A);return R?new Zt(...R,!1):void 0}get rgb(){let{r:A,g:R,b:j,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[A/ue,R/ue,j/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(A){let[R,j,te,ue]=bi(A),ve=Math.sqrt(j*j+te*te);return[Math.round(1e4*ve)?ri(Math.atan2(te,j)*jr):NaN,ve,R,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",bi(this.rgb))}overwriteGetter(A,R){return Object.defineProperty(this,A,{value:R}),R}toString(){let[A,R,j,te]=this.rgb;return`rgba(${[A,R,j].map(ue=>Math.round(255*ue)).join(",")},${te})`}}Zt.black=new Zt(0,0,0,1),Zt.white=new Zt(1,1,1,1),Zt.transparent=new Zt(0,0,0,0),Zt.red=new Zt(1,0,0,1);class yr{constructor(A,R,j){this.sensitivity=A?R?"variant":"case":R?"accent":"base",this.locale=j,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(A,R){return this.collator.compare(A,R)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Fr{constructor(A,R,j,te,ue){this.text=A,this.image=R,this.scale=j,this.fontStack=te,this.textColor=ue}}class Zr{constructor(A){this.sections=A}static fromString(A){return new Zr([new Fr(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 Zr?A:Zr.fromString(A)}toString(){return this.sections.length===0?"":this.sections.map(A=>A.text).join("")}}class Vr{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof Vr)return A;if(typeof A=="number")return new Vr([A,A,A,A]);if(Array.isArray(A)&&!(A.length<1||A.length>4)){for(let R of A)if(typeof R!="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 Vr(A)}}toString(){return JSON.stringify(this.values)}}let gi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Si{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof Si)return A;if(Array.isArray(A)&&!(A.length<1)&&A.length%2==0){for(let R=0;R=0&&D<=255&&typeof A=="number"&&A>=0&&A<=255&&typeof R=="number"&&R>=0&&R<=255?j===void 0||typeof j=="number"&&j>=0&&j<=1?null:`Invalid rgba value [${[D,A,R,j].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof j=="number"?[D,A,R,j]:[D,A,R]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Gi(D){if(D===null||typeof D=="string"||typeof D=="boolean"||typeof D=="number"||D instanceof Zt||D instanceof yr||D instanceof Zr||D instanceof Vr||D instanceof Si||D instanceof Mi)return!0;if(Array.isArray(D)){for(let A of D)if(!Gi(A))return!1;return!0}if(typeof D=="object"){for(let A in D)if(!Gi(D[A]))return!1;return!0}return!1}function Ki(D){if(D===null)return Lt;if(typeof D=="string")return Et;if(typeof D=="boolean")return dt;if(typeof D=="number")return St;if(D instanceof Zt)return Ht;if(D instanceof yr)return _r;if(D instanceof Zr)return Br;if(D instanceof Vr)return Or;if(D instanceof Si)return ut;if(D instanceof Mi)return Nr;if(Array.isArray(D)){let A=D.length,R;for(let j of D){let te=Ki(j);if(R){if(R===te)continue;R=fr;break}R=te}return Ne(R||fr,A)}return $t}function ka(D){let A=typeof D;return D===null?"":A==="string"||A==="number"||A==="boolean"?String(D):D instanceof Zt||D instanceof Zr||D instanceof Vr||D instanceof Si||D instanceof Mi?D.toString():JSON.stringify(D)}class jn{constructor(A,R){this.type=A,this.value=R}static parse(A,R){if(A.length!==2)return R.error(`'literal' expression requires exactly one argument, but found ${A.length-1} instead.`);if(!Gi(A[1]))return R.error("invalid value");let j=A[1],te=Ki(j),ue=R.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new jn(te,j)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class la{constructor(A){this.name="ExpressionEvaluationError",this.message=A}toJSON(){return this.message}}let Fa={string:Et,number:St,boolean:dt,object:$t};class Da{constructor(A,R){this.type=A,this.args=R}static parse(A,R){if(A.length<2)return R.error("Expected at least one argument.");let j,te=1,ue=A[0];if(ue==="array"){let Re,Ze;if(A.length>2){let at=A[1];if(typeof at!="string"||!(at in Fa)||at==="object")return R.error('The item type argument of "array" must be one of string, number, boolean',1);Re=Fa[at],te++}else Re=fr;if(A.length>3){if(A[2]!==null&&(typeof A[2]!="number"||A[2]<0||A[2]!==Math.floor(A[2])))return R.error('The length argument to "array" must be a positive integer literal',2);Ze=A[2],te++}j=Ne(Re,Ze)}else{if(!Fa[ue])throw new Error(`Types doesn't contain name = ${ue}`);j=Fa[ue]}let ve=[];for(;teA.outputDefined())}}let jo={"to-boolean":dt,"to-color":Ht,"to-number":St,"to-string":Et};class oa{constructor(A,R){this.type=A,this.args=R}static parse(A,R){if(A.length<2)return R.error("Expected at least one argument.");let j=A[0];if(!jo[j])throw new Error(`Can't parse ${j} as it is not part of the known types`);if((j==="to-boolean"||j==="to-string")&&A.length!==2)return R.error("Expected one argument.");let te=jo[j],ue=[];for(let ve=1;ve4?`Invalid rbga value ${JSON.stringify(R)}: expected an array containing either three or four numeric values.`:Pi(R[0],R[1],R[2],R[3]),!j))return new Zt(R[0]/255,R[1]/255,R[2]/255,R[3])}throw new la(j||`Could not parse color from value '${typeof R=="string"?R:JSON.stringify(R)}'`)}case"padding":{let R;for(let j of this.args){R=j.evaluate(A);let te=Vr.parse(R);if(te)return te}throw new la(`Could not parse padding from value '${typeof R=="string"?R:JSON.stringify(R)}'`)}case"variableAnchorOffsetCollection":{let R;for(let j of this.args){R=j.evaluate(A);let te=Si.parse(R);if(te)return te}throw new la(`Could not parse variableAnchorOffsetCollection from value '${typeof R=="string"?R:JSON.stringify(R)}'`)}case"number":{let R=null;for(let j of this.args){if(R=j.evaluate(A),R===null)return 0;let te=Number(R);if(!isNaN(te))return te}throw new la(`Could not convert ${JSON.stringify(R)} to number.`)}case"formatted":return Zr.fromString(ka(this.args[0].evaluate(A)));case"resolvedImage":return Mi.fromString(ka(this.args[0].evaluate(A)));default:return ka(this.args[0].evaluate(A))}}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}let Sn=["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"?Sn[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 R=this._parseColorCache[A];return R||(R=this._parseColorCache[A]=Zt.parse(A)),R}}class oo{constructor(A,R,j=[],te,ue=new bt,ve=[]){this.registry=A,this.path=j,this.key=j.map(Re=>`[${Re}]`).join(""),this.scope=ue,this.errors=ve,this.expectedType=te,this._isConstant=R}parse(A,R,j,te,ue={}){return R?this.concat(R,j,te)._parse(A,ue):this._parse(A,ue)}_parse(A,R){function j(te,ue,ve){return ve==="assert"?new Da(ue,[te]):ve==="coerce"?new oa(ue,[te]):te}if(A!==null&&typeof A!="string"&&typeof A!="boolean"&&typeof A!="number"||(A=["literal",A]),Array.isArray(A)){if(A.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=A[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let ve=ue.parse(A,this);if(!ve)return null;if(this.expectedType){let Re=this.expectedType,Ze=ve.type;if(Re.kind!=="string"&&Re.kind!=="number"&&Re.kind!=="boolean"&&Re.kind!=="object"&&Re.kind!=="array"||Ze.kind!=="value")if(Re.kind!=="color"&&Re.kind!=="formatted"&&Re.kind!=="resolvedImage"||Ze.kind!=="value"&&Ze.kind!=="string")if(Re.kind!=="padding"||Ze.kind!=="value"&&Ze.kind!=="number"&&Ze.kind!=="array")if(Re.kind!=="variableAnchorOffsetCollection"||Ze.kind!=="value"&&Ze.kind!=="array"){if(this.checkSubtype(Re,Ze))return null}else ve=j(ve,Re,R.typeAnnotation||"coerce");else ve=j(ve,Re,R.typeAnnotation||"coerce");else ve=j(ve,Re,R.typeAnnotation||"coerce");else ve=j(ve,Re,R.typeAnnotation||"assert")}if(!(ve instanceof jn)&&ve.type.kind!=="resolvedImage"&&this._isConstant(ve)){let Re=new Ha;try{ve=new jn(ve.type,ve.evaluate(Re))}catch(Ze){return this.error(Ze.message),null}}return ve}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(A===void 0?"'undefined' value invalid. Use null instead.":typeof A=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof A} instead.`)}concat(A,R,j){let te=typeof A=="number"?this.path.concat(A):this.path,ue=j?this.scope.concat(j):this.scope;return new oo(this.registry,this._isConstant,te,R||null,ue,this.errors)}error(A,...R){let j=`${this.key}${R.map(te=>`[${te}]`).join("")}`;this.errors.push(new xt(j,A))}checkSubtype(A,R){let j=Xe(A,R);return j&&this.error(j),j}}class xn{constructor(A,R){this.type=R.type,this.bindings=[].concat(A),this.result=R}evaluate(A){return this.result.evaluate(A)}eachChild(A){for(let R of this.bindings)A(R[1]);A(this.result)}static parse(A,R){if(A.length<4)return R.error(`Expected at least 3 arguments, but found ${A.length-1} instead.`);let j=[];for(let ue=1;ue=j.length)throw new la(`Array index out of bounds: ${R} > ${j.length-1}.`);if(R!==Math.floor(R))throw new la(`Array index must be an integer, but found ${R} instead.`);return j[R]}eachChild(A){A(this.index),A(this.input)}outputDefined(){return!1}}class Hr{constructor(A,R){this.type=dt,this.needle=A,this.haystack=R}static parse(A,R){if(A.length!==3)return R.error(`Expected 2 arguments, but found ${A.length-1} instead.`);let j=R.parse(A[1],1,fr),te=R.parse(A[2],2,fr);return j&&te?ht(j.type,[dt,Et,St,Lt,fr])?new Hr(j,te):R.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(j.type)} instead`):null}evaluate(A){let R=this.needle.evaluate(A),j=this.haystack.evaluate(A);if(!j)return!1;if(!Le(R,["boolean","string","number","null"]))throw new la(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ki(R))} instead.`);if(!Le(j,["string","array"]))throw new la(`Expected second argument to be of type array or string, but found ${Ye(Ki(j))} instead.`);return j.indexOf(R)>=0}eachChild(A){A(this.needle),A(this.haystack)}outputDefined(){return!0}}class ti{constructor(A,R,j){this.type=St,this.needle=A,this.haystack=R,this.fromIndex=j}static parse(A,R){if(A.length<=2||A.length>=5)return R.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let j=R.parse(A[1],1,fr),te=R.parse(A[2],2,fr);if(!j||!te)return null;if(!ht(j.type,[dt,Et,St,Lt,fr]))return R.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(j.type)} instead`);if(A.length===4){let ue=R.parse(A[3],3,St);return ue?new ti(j,te,ue):null}return new ti(j,te)}evaluate(A){let R=this.needle.evaluate(A),j=this.haystack.evaluate(A);if(!Le(R,["boolean","string","number","null"]))throw new la(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ki(R))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(A)),Le(j,["string"])){let ue=j.indexOf(R,te);return ue===-1?-1:[...j.slice(0,ue)].length}if(Le(j,["array"]))return j.indexOf(R,te);throw new la(`Expected second argument to be of type array or string, but found ${Ye(Ki(j))} instead.`)}eachChild(A){A(this.needle),A(this.haystack),this.fromIndex&&A(this.fromIndex)}outputDefined(){return!1}}class zi{constructor(A,R,j,te,ue,ve){this.inputType=A,this.type=R,this.input=j,this.cases=te,this.outputs=ue,this.otherwise=ve}static parse(A,R){if(A.length<5)return R.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if(A.length%2!=1)return R.error("Expected an even number of arguments.");let j,te;R.expectedType&&R.expectedType.kind!=="value"&&(te=R.expectedType);let ue={},ve=[];for(let at=2;atNumber.MAX_SAFE_INTEGER)return Qt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Tr=="number"&&Math.floor(Tr)!==Tr)return Qt.error("Numeric branch labels must be integer values.");if(j){if(Qt.checkSubtype(j,Ki(Tr)))return null}else j=Ki(Tr);if(ue[String(Tr)]!==void 0)return Qt.error("Branch labels must be unique.");ue[String(Tr)]=ve.length}let sr=R.parse(Ft,at,te);if(!sr)return null;te=te||sr.type,ve.push(sr)}let Re=R.parse(A[1],1,fr);if(!Re)return null;let Ze=R.parse(A[A.length-1],A.length-1,te);return Ze?Re.type.kind!=="value"&&R.concat(1).checkSubtype(j,Re.type)?null:new zi(j,te,Re,ue,ve,Ze):null}evaluate(A){let R=this.input.evaluate(A);return(Ki(R)===this.inputType&&this.outputs[this.cases[R]]||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 Yi{constructor(A,R,j){this.type=A,this.branches=R,this.otherwise=j}static parse(A,R){if(A.length<4)return R.error(`Expected at least 3 arguments, but found only ${A.length-1}.`);if(A.length%2!=0)return R.error("Expected an odd number of arguments.");let j;R.expectedType&&R.expectedType.kind!=="value"&&(j=R.expectedType);let te=[];for(let ve=1;veR.outputDefined())&&this.otherwise.outputDefined()}}class an{constructor(A,R,j,te){this.type=A,this.input=R,this.beginIndex=j,this.endIndex=te}static parse(A,R){if(A.length<=2||A.length>=5)return R.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let j=R.parse(A[1],1,fr),te=R.parse(A[2],2,St);if(!j||!te)return null;if(!ht(j.type,[Ne(fr),Et,fr]))return R.error(`Expected first argument to be of type array or string, but found ${Ye(j.type)} instead`);if(A.length===4){let ue=R.parse(A[3],3,St);return ue?new an(j.type,j,te,ue):null}return new an(j.type,j,te)}evaluate(A){let R=this.input.evaluate(A),j=this.beginIndex.evaluate(A),te;if(this.endIndex&&(te=this.endIndex.evaluate(A)),Le(R,["string"]))return[...R].slice(j,te).join("");if(Le(R,["array"]))return R.slice(j,te);throw new la(`Expected first argument to be of type array or string, but found ${Ye(Ki(R))} instead.`)}eachChild(A){A(this.input),A(this.beginIndex),this.endIndex&&A(this.endIndex)}outputDefined(){return!1}}function hi(D,A){let R=D.length-1,j,te,ue=0,ve=R,Re=0;for(;ue<=ve;)if(Re=Math.floor((ue+ve)/2),j=D[Re],te=D[Re+1],j<=A){if(Re===R||AA))throw new la("Input is not a number.");ve=Re-1}return 0}class Ji{constructor(A,R,j){this.type=A,this.input=R,this.labels=[],this.outputs=[];for(let[te,ue]of j)this.labels.push(te),this.outputs.push(ue)}static parse(A,R){if(A.length-1<4)return R.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return R.error("Expected an even number of arguments.");let j=R.parse(A[1],1,St);if(!j)return null;let te=[],ue=null;R.expectedType&&R.expectedType.kind!=="value"&&(ue=R.expectedType);for(let ve=1;ve=Re)return R.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',at);let Ft=R.parse(Ze,Tt,ue);if(!Ft)return null;ue=ue||Ft.type,te.push([Re,Ft])}return new Ji(ue,j,te)}evaluate(A){let R=this.labels,j=this.outputs;if(R.length===1)return j[0].evaluate(A);let te=this.input.evaluate(A);if(te<=R[0])return j[0].evaluate(A);let ue=R.length;return te>=R[ue-1]?j[ue-1].evaluate(A):j[hi(R,te)].evaluate(A)}eachChild(A){A(this.input);for(let R of this.outputs)A(R)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function ua(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Fn=Sa;function Sa(D,A,R,j){this.cx=3*D,this.bx=3*(R-D)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(j-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=D,this.p1y=A,this.p2x=R,this.p2y=j}Sa.prototype={sampleCurveX:function(D){return((this.ax*D+this.bx)*D+this.cx)*D},sampleCurveY:function(D){return((this.ay*D+this.by)*D+this.cy)*D},sampleCurveDerivativeX:function(D){return(3*this.ax*D+2*this.bx)*D+this.cx},solveCurveX:function(D,A){if(A===void 0&&(A=1e-6),D<0)return 0;if(D>1)return 1;for(var R=D,j=0;j<8;j++){var te=this.sampleCurveX(R)-D;if(Math.abs(te)te?ve=R:Re=R,R=.5*(Re-ve)+ve;return R},solve:function(D,A){return this.sampleCurveY(this.solveCurveX(D,A))}};var go=ua(Fn);function Oo(D,A,R){return D+R*(A-D)}function ho(D,A,R){return D.map((j,te)=>Oo(j,A[te],R))}let Mo={number:Oo,color:function(D,A,R,j="rgb"){switch(j){case"rgb":{let[te,ue,ve,Re]=ho(D.rgb,A.rgb,R);return new Zt(te,ue,ve,Re,!1)}case"hcl":{let[te,ue,ve,Re]=D.hcl,[Ze,at,Tt,Ft]=A.hcl,Qt,sr;if(isNaN(te)||isNaN(Ze))isNaN(te)?isNaN(Ze)?Qt=NaN:(Qt=Ze,ve!==1&&ve!==0||(sr=at)):(Qt=te,Tt!==1&&Tt!==0||(sr=ue));else{let Ri=Ze-te;Ze>te&&Ri>180?Ri-=360:Ze180&&(Ri+=360),Qt=te+R*Ri}let[Tr,Pr,$r,ni]=function([Ri,pi,ki,Zi]){return Ri=isNaN(Ri)?0:Ri*ai,Ni([ki,Math.cos(Ri)*pi,Math.sin(Ri)*pi,Zi])}([Qt,sr!=null?sr:Oo(ue,at,R),Oo(ve,Tt,R),Oo(Re,Ft,R)]);return new Zt(Tr,Pr,$r,ni,!1)}case"lab":{let[te,ue,ve,Re]=Ni(ho(D.lab,A.lab,R));return new Zt(te,ue,ve,Re,!1)}}},array:ho,padding:function(D,A,R){return new Vr(ho(D.values,A.values,R))},variableAnchorOffsetCollection:function(D,A,R){let j=D.values,te=A.values;if(j.length!==te.length)throw new la(`Cannot interpolate values of different length. from: ${D.toString()}, to: ${A.toString()}`);let ue=[];for(let ve=0;vetypeof Tt!="number"||Tt<0||Tt>1))return R.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:at}}}if(A.length-1<4)return R.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return R.error("Expected an even number of arguments.");if(ue=R.parse(ue,2,St),!ue)return null;let Re=[],Ze=null;j==="interpolate-hcl"||j==="interpolate-lab"?Ze=Ht:R.expectedType&&R.expectedType.kind!=="value"&&(Ze=R.expectedType);for(let at=0;at=Tt)return R.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Qt);let Tr=R.parse(Ft,sr,Ze);if(!Tr)return null;Ze=Ze||Tr.type,Re.push([Tt,Tr])}return xe(Ze,St)||xe(Ze,Ht)||xe(Ze,Or)||xe(Ze,ut)||xe(Ze,Ne(St))?new xo(Ze,j,te,ue,Re):R.error(`Type ${Ye(Ze)} is not interpolatable.`)}evaluate(A){let R=this.labels,j=this.outputs;if(R.length===1)return j[0].evaluate(A);let te=this.input.evaluate(A);if(te<=R[0])return j[0].evaluate(A);let ue=R.length;if(te>=R[ue-1])return j[ue-1].evaluate(A);let ve=hi(R,te),Re=xo.interpolationFactor(this.interpolation,te,R[ve],R[ve+1]),Ze=j[ve].evaluate(A),at=j[ve+1].evaluate(A);switch(this.operator){case"interpolate":return Mo[this.type.kind](Ze,at,Re);case"interpolate-hcl":return Mo.color(Ze,at,Re,"hcl");case"interpolate-lab":return Mo.color(Ze,at,Re,"lab")}}eachChild(A){A(this.input);for(let R of this.outputs)A(R)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function zs(D,A,R,j){let te=j-R,ue=D-R;return te===0?0:A===1?ue/te:(Math.pow(A,ue)-1)/(Math.pow(A,te)-1)}class ks{constructor(A,R){this.type=A,this.args=R}static parse(A,R){if(A.length<2)return R.error("Expectected at least one argument.");let j=null,te=R.expectedType;te&&te.kind!=="value"&&(j=te);let ue=[];for(let Re of A.slice(1)){let Ze=R.parse(Re,1+ue.length,j,void 0,{typeAnnotation:"omit"});if(!Ze)return null;j=j||Ze.type,ue.push(Ze)}if(!j)throw new Error("No output type");let ve=te&&ue.some(Re=>Xe(te,Re.type));return new ks(ve?fr:j,ue)}evaluate(A){let R,j=null,te=0;for(let ue of this.args)if(te++,j=ue.evaluate(A),j&&j instanceof Mi&&!j.available&&(R||(R=j.name),j=null,te===this.args.length&&(j=R)),j!==null)break;return j}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}function Zs(D,A){return D==="=="||D==="!="?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 Xs(D,A,R,j){return j.compare(A,R)===0}function wl(D,A,R){let j=D!=="=="&&D!=="!=";return class qHe{constructor(ue,ve,Re){this.type=dt,this.lhs=ue,this.rhs=ve,this.collator=Re,this.hasUntypedArgument=ue.type.kind==="value"||ve.type.kind==="value"}static parse(ue,ve){if(ue.length!==3&&ue.length!==4)return ve.error("Expected two or three arguments.");let Re=ue[0],Ze=ve.parse(ue[1],1,fr);if(!Ze)return null;if(!Zs(Re,Ze.type))return ve.concat(1).error(`"${Re}" comparisons are not supported for type '${Ye(Ze.type)}'.`);let at=ve.parse(ue[2],2,fr);if(!at)return null;if(!Zs(Re,at.type))return ve.concat(2).error(`"${Re}" comparisons are not supported for type '${Ye(at.type)}'.`);if(Ze.type.kind!==at.type.kind&&Ze.type.kind!=="value"&&at.type.kind!=="value")return ve.error(`Cannot compare types '${Ye(Ze.type)}' and '${Ye(at.type)}'.`);j&&(Ze.type.kind==="value"&&at.type.kind!=="value"?Ze=new Da(at.type,[Ze]):Ze.type.kind!=="value"&&at.type.kind==="value"&&(at=new Da(Ze.type,[at])));let Tt=null;if(ue.length===4){if(Ze.type.kind!=="string"&&at.type.kind!=="string"&&Ze.type.kind!=="value"&&at.type.kind!=="value")return ve.error("Cannot use collator to compare non-string types.");if(Tt=ve.parse(ue[3],3,_r),!Tt)return null}return new qHe(Ze,at,Tt)}evaluate(ue){let ve=this.lhs.evaluate(ue),Re=this.rhs.evaluate(ue);if(j&&this.hasUntypedArgument){let Ze=Ki(ve),at=Ki(Re);if(Ze.kind!==at.kind||Ze.kind!=="string"&&Ze.kind!=="number")throw new la(`Expected arguments for "${D}" to be (string, string) or (number, number), but found (${Ze.kind}, ${at.kind}) instead.`)}if(this.collator&&!j&&this.hasUntypedArgument){let Ze=Ki(ve),at=Ki(Re);if(Ze.kind!=="string"||at.kind!=="string")return A(ue,ve,Re)}return this.collator?R(ue,ve,Re,this.collator.evaluate(ue)):A(ue,ve,Re)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let os=wl("==",function(D,A,R){return A===R},Xs),cl=wl("!=",function(D,A,R){return A!==R},function(D,A,R,j){return!Xs(0,A,R,j)}),Cs=wl("<",function(D,A,R){return A",function(D,A,R){return A>R},function(D,A,R,j){return j.compare(A,R)>0}),Ys=wl("<=",function(D,A,R){return A<=R},function(D,A,R,j){return j.compare(A,R)<=0}),Hs=wl(">=",function(D,A,R){return A>=R},function(D,A,R,j){return j.compare(A,R)>=0});class Eo{constructor(A,R,j){this.type=_r,this.locale=j,this.caseSensitive=A,this.diacriticSensitive=R}static parse(A,R){if(A.length!==2)return R.error("Expected one argument.");let j=A[1];if(typeof j!="object"||Array.isArray(j))return R.error("Collator options argument must be an object.");let te=R.parse(j["case-sensitive"]!==void 0&&j["case-sensitive"],1,dt);if(!te)return null;let ue=R.parse(j["diacritic-sensitive"]!==void 0&&j["diacritic-sensitive"],1,dt);if(!ue)return null;let ve=null;return j.locale&&(ve=R.parse(j.locale,1,Et),!ve)?null:new Eo(te,ue,ve)}evaluate(A){return new yr(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 fs{constructor(A,R,j,te,ue){this.type=Et,this.number=A,this.locale=R,this.currency=j,this.minFractionDigits=te,this.maxFractionDigits=ue}static parse(A,R){if(A.length!==3)return R.error("Expected two arguments.");let j=R.parse(A[1],1,St);if(!j)return null;let te=A[2];if(typeof te!="object"||Array.isArray(te))return R.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=R.parse(te.locale,1,Et),!ue))return null;let ve=null;if(te.currency&&(ve=R.parse(te.currency,1,Et),!ve))return null;let Re=null;if(te["min-fraction-digits"]&&(Re=R.parse(te["min-fraction-digits"],1,St),!Re))return null;let Ze=null;return te["max-fraction-digits"]&&(Ze=R.parse(te["max-fraction-digits"],1,St),!Ze)?null:new fs(j,ue,ve,Re,Ze)}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 $l{constructor(A){this.type=Br,this.sections=A}static parse(A,R){if(A.length<2)return R.error("Expected at least one argument.");let j=A[1];if(!Array.isArray(j)&&typeof j=="object")return R.error("First argument must be an image or text section.");let te=[],ue=!1;for(let ve=1;ve<=A.length-1;++ve){let Re=A[ve];if(ue&&typeof Re=="object"&&!Array.isArray(Re)){ue=!1;let Ze=null;if(Re["font-scale"]&&(Ze=R.parse(Re["font-scale"],1,St),!Ze))return null;let at=null;if(Re["text-font"]&&(at=R.parse(Re["text-font"],1,Ne(Et)),!at))return null;let Tt=null;if(Re["text-color"]&&(Tt=R.parse(Re["text-color"],1,Ht),!Tt))return null;let Ft=te[te.length-1];Ft.scale=Ze,Ft.font=at,Ft.textColor=Tt}else{let Ze=R.parse(A[ve],1,fr);if(!Ze)return null;let at=Ze.type.kind;if(at!=="string"&&at!=="value"&&at!=="null"&&at!=="resolvedImage")return R.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ze,scale:null,font:null,textColor:null})}}return new $l(te)}evaluate(A){return new Zr(this.sections.map(R=>{let j=R.content.evaluate(A);return Ki(j)===Nr?new Fr("",j,null,null,null):new Fr(ka(j),null,R.scale?R.scale.evaluate(A):null,R.font?R.font.evaluate(A).join(","):null,R.textColor?R.textColor.evaluate(A):null)}))}eachChild(A){for(let R of this.sections)A(R.content),R.scale&&A(R.scale),R.font&&A(R.font),R.textColor&&A(R.textColor)}outputDefined(){return!1}}class Gu{constructor(A){this.type=Nr,this.input=A}static parse(A,R){if(A.length!==2)return R.error("Expected two arguments.");let j=R.parse(A[1],1,Et);return j?new Gu(j):R.error("No image name provided.")}evaluate(A){let R=this.input.evaluate(A),j=Mi.fromString(R);return j&&A.availableImages&&(j.available=A.availableImages.indexOf(R)>-1),j}eachChild(A){A(this.input)}outputDefined(){return!1}}class fc{constructor(A){this.type=St,this.input=A}static parse(A,R){if(A.length!==2)return R.error(`Expected 1 argument, but found ${A.length-1} instead.`);let j=R.parse(A[1],1);return j?j.type.kind!=="array"&&j.type.kind!=="string"&&j.type.kind!=="value"?R.error(`Expected argument of type string or array, but found ${Ye(j.type)} instead.`):new fc(j):null}evaluate(A){let R=this.input.evaluate(A);if(typeof R=="string")return[...R].length;if(Array.isArray(R))return R.length;throw new la(`Expected value to be of type string or array, but found ${Ye(Ki(R))} instead.`)}eachChild(A){A(this.input)}outputDefined(){return!1}}let ms=8192;function on(D,A){let R=(180+D[0])/360,j=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D[1]*Math.PI/360)))/360,te=Math.pow(2,A.z);return[Math.round(R*te*ms),Math.round(j*te*ms)]}function fa(D,A){let R=Math.pow(2,A.z);return[(te=(D[0]/ms+A.x)/R,360*te-180),(j=(D[1]/ms+A.y)/R,360/Math.PI*Math.atan(Math.exp((180-360*j)*Math.PI/180))-90)];var j,te}function Qu(D,A){D[0]=Math.min(D[0],A[0]),D[1]=Math.min(D[1],A[1]),D[2]=Math.max(D[2],A[0]),D[3]=Math.max(D[3],A[1])}function Il(D,A){return!(D[0]<=A[0]||D[2]>=A[2]||D[1]<=A[1]||D[3]>=A[3])}function vo(D,A,R){let j=D[0]-A[0],te=D[1]-A[1],ue=D[0]-R[0],ve=D[1]-R[1];return j*ve-ue*te==0&&j*ue<=0&&te*ve<=0}function Wl(D,A,R,j){return(te=[j[0]-R[0],j[1]-R[1]])[0]*(ue=[A[0]-D[0],A[1]-D[1]])[1]-te[1]*ue[0]!=0&&!(!Co(D,A,R,j)||!Co(R,j,D,A));var te,ue}function Ks(D,A,R){for(let j of R)for(let te=0;te(te=D)[1]!=(ve=Re[Ze+1])[1]>te[1]&&te[0]<(ve[0]-ue[0])*(te[1]-ue[1])/(ve[1]-ue[1])+ue[0]&&(j=!j)}var te,ue,ve;return j}function Ec(D,A){for(let R of A)if(Zl(D,R))return!0;return!1}function Zn(D,A){for(let R of D)if(!Zl(R,A))return!1;for(let R=0;R0&&Re<0||ve<0&&Re>0}function Tl(D,A,R){let j=[];for(let te=0;teR[2]){let te=.5*j,ue=D[0]-R[0]>te?-j:R[0]-D[0]>te?j:0;ue===0&&(ue=D[0]-R[2]>te?-j:R[2]-D[0]>te?j:0),D[0]+=ue}Qu(A,D)}function cf(D,A,R,j){let te=Math.pow(2,j.z)*ms,ue=[j.x*ms,j.y*ms],ve=[];for(let Re of D)for(let Ze of Re){let at=[Ze.x+ue[0],Ze.y+ue[1]];So(at,A,R,te),ve.push(at)}return ve}function rh(D,A,R,j){let te=Math.pow(2,j.z)*ms,ue=[j.x*ms,j.y*ms],ve=[];for(let Ze of D){let at=[];for(let Tt of Ze){let Ft=[Tt.x+ue[0],Tt.y+ue[1]];Qu(A,Ft),at.push(Ft)}ve.push(at)}if(A[2]-A[0]<=te/2){(Re=A)[0]=Re[1]=1/0,Re[2]=Re[3]=-1/0;for(let Ze of ve)for(let at of Ze)So(at,A,R,te)}var Re;return ve}class Al{constructor(A,R){this.type=dt,this.geojson=A,this.geometries=R}static parse(A,R){if(A.length!==2)return R.error(`'within' expression requires exactly one argument, but found ${A.length-1} instead.`);if(Gi(A[1])){let j=A[1];if(j.type==="FeatureCollection"){let te=[];for(let ue of j.features){let{type:ve,coordinates:Re}=ue.geometry;ve==="Polygon"&&te.push(Re),ve==="MultiPolygon"&&te.push(...Re)}if(te.length)return new Al(j,{type:"MultiPolygon",coordinates:te})}else if(j.type==="Feature"){let te=j.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new Al(j,j.geometry)}else if(j.type==="Polygon"||j.type==="MultiPolygon")return new Al(j,j)}return R.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(R,j){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],ve=R.canonicalID();if(j.type==="Polygon"){let Re=Tl(j.coordinates,ue,ve),Ze=cf(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!Zl(at,Re))return!1}if(j.type==="MultiPolygon"){let Re=uf(j.coordinates,ue,ve),Ze=cf(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!Ec(at,Re))return!1}return!0}(A,this.geometries);if(A.geometryType()==="LineString")return function(R,j){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],ve=R.canonicalID();if(j.type==="Polygon"){let Re=Tl(j.coordinates,ue,ve),Ze=rh(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!Zn(at,Re))return!1}if(j.type==="MultiPolygon"){let Re=uf(j.coordinates,ue,ve),Ze=rh(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!ko(at,Re))return!1}return!0}(A,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Hc=class{constructor(D=[],A=(R,j)=>Rj?1:0){if(this.data=D,this.length=this.data.length,this.compare=A,this.length>0)for(let R=(this.length>>1)-1;R>=0;R--)this._down(R)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],A=this.data.pop();return--this.length>0&&(this.data[0]=A,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:A,compare:R}=this,j=A[D];for(;D>0;){let te=D-1>>1,ue=A[te];if(R(j,ue)>=0)break;A[D]=ue,D=te}A[D]=j}_down(D){let{data:A,compare:R}=this,j=this.length>>1,te=A[D];for(;D=0)break;A[D]=A[ue],D=ue}A[D]=te}};function Ql(D,A,R,j,te){Ls(D,A,R,j||D.length-1,te||kc)}function Ls(D,A,R,j,te){for(;j>R;){if(j-R>600){var ue=j-R+1,ve=A-R+1,Re=Math.log(ue),Ze=.5*Math.exp(2*Re/3),at=.5*Math.sqrt(Re*Ze*(ue-Ze)/ue)*(ve-ue/2<0?-1:1);Ls(D,A,Math.max(R,Math.floor(A-ve*Ze/ue+at)),Math.min(j,Math.floor(A+(ue-ve)*Ze/ue+at)),te)}var Tt=D[A],Ft=R,Qt=j;for(mu(D,R,A),te(D[j],Tt)>0&&mu(D,R,j);Ft0;)Qt--}te(D[R],Tt)===0?mu(D,R,Qt):mu(D,++Qt,j),Qt<=A&&(R=Qt+1),A<=Qt&&(j=Qt-1)}}function mu(D,A,R){var j=D[A];D[A]=D[R],D[R]=j}function kc(D,A){return DA?1:0}function Of(D,A){if(D.length<=1)return[D];let R=[],j,te;for(let ue of D){let ve=vd(ue);ve!==0&&(ue.area=Math.abs(ve),te===void 0&&(te=ve<0),te===ve<0?(j&&R.push(j),j=[ue]):j.push(ue))}if(j&&R.push(j),A>1)for(let ue=0;ue1?(at=A[Ze+1][0],Tt=A[Ze+1][1]):sr>0&&(at+=Ft/this.kx*sr,Tt+=Qt/this.ky*sr)),Ft=this.wrap(R[0]-at)*this.kx,Qt=(R[1]-Tt)*this.ky;let Tr=Ft*Ft+Qt*Qt;Tr180;)A-=360;return A}}function Ul(D,A){return A[0]-D[0]}function Js(D){return D[1]-D[0]+1}function hc(D,A){return D[1]>=D[0]&&D[1]D[1])return[null,null];let R=Js(D);if(A){if(R===2)return[D,null];let te=Math.floor(R/2);return[[D[0],D[0]+te],[D[0]+te,D[1]]]}if(R===1)return[D,null];let j=Math.floor(R/2)-1;return[[D[0],D[0]+j],[D[0]+j+1,D[1]]]}function ws(D,A){if(!hc(A,D.length))return[1/0,1/0,-1/0,-1/0];let R=[1/0,1/0,-1/0,-1/0];for(let j=A[0];j<=A[1];++j)Qu(R,D[j]);return R}function $s(D){let A=[1/0,1/0,-1/0,-1/0];for(let R of D)for(let j of R)Qu(A,j);return A}function hs(D){return D[0]!==-1/0&&D[1]!==-1/0&&D[2]!==1/0&&D[3]!==1/0}function Ms(D,A,R){if(!hs(D)||!hs(A))return NaN;let j=0,te=0;return D[2]A[2]&&(j=D[0]-A[2]),D[1]>A[3]&&(te=D[1]-A[3]),D[3]=j)return j;if(Il(te,ue)){if(Od(D,A))return 0}else if(Od(A,D))return 0;let ve=1/0;for(let Re of D)for(let Ze=0,at=Re.length,Tt=at-1;Ze0;){let Ze=ve.pop();if(Ze[0]>=ue)continue;let at=Ze[1],Tt=A?50:100;if(Js(at)<=Tt){if(!hc(at,D.length))return NaN;if(A){let Ft=wo(D,at,R,j);if(isNaN(Ft)||Ft===0)return Ft;ue=Math.min(ue,Ft)}else for(let Ft=at[0];Ft<=at[1];++Ft){let Qt=ov(D[Ft],R,j);if(ue=Math.min(ue,Qt),ue===0)return 0}}else{let Ft=Cc(at,A);Ja(ve,ue,j,D,Re,Ft[0]),Ja(ve,ue,j,D,Re,Ft[1])}}return ue}function uu(D,A,R,j,te,ue=1/0){let ve=Math.min(ue,te.distance(D[0],R[0]));if(ve===0)return ve;let Re=new Hc([[0,[0,D.length-1],[0,R.length-1]]],Ul);for(;Re.length>0;){let Ze=Re.pop();if(Ze[0]>=ve)continue;let at=Ze[1],Tt=Ze[2],Ft=A?50:100,Qt=j?50:100;if(Js(at)<=Ft&&Js(Tt)<=Qt){if(!hc(at,D.length)&&hc(Tt,R.length))return NaN;let sr;if(A&&j)sr=ec(D,at,R,Tt,te),ve=Math.min(ve,sr);else if(A&&!j){let Tr=D.slice(at[0],at[1]+1);for(let Pr=Tt[0];Pr<=Tt[1];++Pr)if(sr=dc(R[Pr],Tr,te),ve=Math.min(ve,sr),ve===0)return ve}else if(!A&&j){let Tr=R.slice(Tt[0],Tt[1]+1);for(let Pr=at[0];Pr<=at[1];++Pr)if(sr=dc(D[Pr],Tr,te),ve=Math.min(ve,sr),ve===0)return ve}else sr=Ps(D,at,R,Tt,te),ve=Math.min(ve,sr)}else{let sr=Cc(at,A),Tr=Cc(Tt,j);Ef(Re,ve,te,D,R,sr[0],Tr[0]),Ef(Re,ve,te,D,R,sr[0],Tr[1]),Ef(Re,ve,te,D,R,sr[1],Tr[0]),Ef(Re,ve,te,D,R,sr[1],Tr[1])}}return ve}function Mh(D){return D.type==="MultiPolygon"?D.coordinates.map(A=>({type:"Polygon",coordinates:A})):D.type==="MultiLineString"?D.coordinates.map(A=>({type:"LineString",coordinates:A})):D.type==="MultiPoint"?D.coordinates.map(A=>({type:"Point",coordinates:A})):[D]}class jc{constructor(A,R){this.type=St,this.geojson=A,this.geometries=R}static parse(A,R){if(A.length!==2)return R.error(`'distance' expression requires exactly one argument, but found ${A.length-1} instead.`);if(Gi(A[1])){let j=A[1];if(j.type==="FeatureCollection")return new jc(j,j.features.map(te=>Mh(te.geometry)).flat());if(j.type==="Feature")return new jc(j,Mh(j.geometry));if("type"in j&&"coordinates"in j)return new jc(j,Mh(j))}return R.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(R,j){let te=R.geometry(),ue=te.flat().map(Ze=>fa([Ze.x,Ze.y],R.canonical));if(te.length===0)return NaN;let ve=new ih(ue[0][1]),Re=1/0;for(let Ze of j){switch(Ze.type){case"Point":Re=Math.min(Re,uu(ue,!1,[Ze.coordinates],!1,ve,Re));break;case"LineString":Re=Math.min(Re,uu(ue,!1,Ze.coordinates,!0,ve,Re));break;case"Polygon":Re=Math.min(Re,tc(ue,!1,Ze.coordinates,ve,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="LineString")return function(R,j){let te=R.geometry(),ue=te.flat().map(Ze=>fa([Ze.x,Ze.y],R.canonical));if(te.length===0)return NaN;let ve=new ih(ue[0][1]),Re=1/0;for(let Ze of j){switch(Ze.type){case"Point":Re=Math.min(Re,uu(ue,!0,[Ze.coordinates],!1,ve,Re));break;case"LineString":Re=Math.min(Re,uu(ue,!0,Ze.coordinates,!0,ve,Re));break;case"Polygon":Re=Math.min(Re,tc(ue,!0,Ze.coordinates,ve,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="Polygon")return function(R,j){let te=R.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Of(te,0).map(Ze=>Ze.map(at=>at.map(Tt=>fa([Tt.x,Tt.y],R.canonical)))),ve=new ih(ue[0][0][0][1]),Re=1/0;for(let Ze of j)for(let at of ue){switch(Ze.type){case"Point":Re=Math.min(Re,tc([Ze.coordinates],!1,at,ve,Re));break;case"LineString":Re=Math.min(Re,tc(Ze.coordinates,!0,at,ve,Re));break;case"Polygon":Re=Math.min(Re,$o(at,Ze.coordinates,ve,Re))}if(Re===0)return Re}return Re}(A,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let kf={"==":os,"!=":cl,">":ml,"<":Cs,">=":Hs,"<=":Ys,array:Da,at:br,boolean:Da,case:Yi,coalesce:ks,collator:Eo,format:$l,image:Gu,in:Hr,"index-of":ti,interpolate:xo,"interpolate-hcl":xo,"interpolate-lab":xo,length:fc,let:xn,literal:jn,match:zi,number:Da,"number-format":fs,object:Da,slice:an,step:Ji,string:Da,"to-boolean":oa,"to-color":oa,"to-number":oa,"to-string":oa,var:_t,within:Al,distance:jc};class Ml{constructor(A,R,j,te){this.name=A,this.type=R,this._evaluate=j,this.args=te}evaluate(A){return this._evaluate(A,this.args)}eachChild(A){this.args.forEach(A)}outputDefined(){return!1}static parse(A,R){let j=A[0],te=Ml.definitions[j];if(!te)return R.error(`Unknown expression "${j}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,ve=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Re=ve.filter(([at])=>!Array.isArray(at)||at.length===A.length-1),Ze=null;for(let[at,Tt]of Re){Ze=new oo(R.registry,kh,R.path,null,R.scope);let Ft=[],Qt=!1;for(let sr=1;sr{return Qt=Ft,Array.isArray(Qt)?`(${Qt.map(Ye).join(", ")})`:`(${Ye(Qt.type)}...)`;var Qt}).join(" | "),Tt=[];for(let Ft=1;Ft{R=A?R&&kh(j):R&&j instanceof jn}),!!R&&Kh(D)&&ah(D,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Kh(D){if(D instanceof Ml&&(D.name==="get"&&D.args.length===1||D.name==="feature-state"||D.name==="has"&&D.args.length===1||D.name==="properties"||D.name==="geometry-type"||D.name==="id"||/^filter-/.test(D.name))||D instanceof Al||D instanceof jc)return!1;let A=!0;return D.eachChild(R=>{A&&!Kh(R)&&(A=!1)}),A}function rc(D){if(D instanceof Ml&&D.name==="feature-state")return!1;let A=!0;return D.eachChild(R=>{A&&!rc(R)&&(A=!1)}),A}function ah(D,A){if(D instanceof Ml&&A.indexOf(D.name)>=0)return!1;let R=!0;return D.eachChild(j=>{R&&!ah(j,A)&&(R=!1)}),R}function Wc(D){return{result:"success",value:D}}function df(D){return{result:"error",value:D}}function Cu(D){return D["property-type"]==="data-driven"||D["property-type"]==="cross-faded-data-driven"}function Nf(D){return!!D.expression&&D.expression.parameters.indexOf("zoom")>-1}function Zc(D){return!!D.expression&&D.expression.interpolated}function ds(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function Ch(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)}function Bd(D){return D}function Jh(D,A){let R=A.type==="color",j=D.stops&&typeof D.stops[0][0]=="object",te=j||!(j||D.property!==void 0),ue=D.type||(Zc(A)?"exponential":"interval");if(R||A.type==="padding"){let Tt=R?Zt.parse:Vr.parse;(D=Ke({},D)).stops&&(D.stops=D.stops.map(Ft=>[Ft[0],Tt(Ft[1])])),D.default=Tt(D.default?D.default:A.default)}if(D.colorSpace&&(ve=D.colorSpace)!=="rgb"&&ve!=="hcl"&&ve!=="lab")throw new Error(`Unknown color space: "${D.colorSpace}"`);var ve;let Re,Ze,at;if(ue==="exponential")Re=$h;else if(ue==="interval")Re=Lu;else if(ue==="categorical"){Re=pd,Ze=Object.create(null);for(let Tt of D.stops)Ze[Tt[0]]=Tt[1];at=typeof D.stops[0][0]}else{if(ue!=="identity")throw new Error(`Unknown function type "${ue}"`);Re=eu}if(j){let Tt={},Ft=[];for(let Tr=0;TrTr[0]),evaluate:({zoom:Tr},Pr)=>$h({stops:Qt,base:D.base},A,Tr).evaluate(Tr,Pr)}}if(te){let Tt=ue==="exponential"?{name:"exponential",base:D.base!==void 0?D.base:1}:null;return{kind:"camera",interpolationType:Tt,interpolationFactor:xo.interpolationFactor.bind(void 0,Tt),zoomStops:D.stops.map(Ft=>Ft[0]),evaluate:({zoom:Ft})=>Re(D,A,Ft,Ze,at)}}return{kind:"source",evaluate(Tt,Ft){let Qt=Ft&&Ft.properties?Ft.properties[D.property]:void 0;return Qt===void 0?Cf(D.default,A.default):Re(D,A,Qt,Ze,at)}}}function Cf(D,A,R){return D!==void 0?D:A!==void 0?A:R!==void 0?R:void 0}function pd(D,A,R,j,te){return Cf(typeof R===te?j[R]:void 0,D.default,A.default)}function Lu(D,A,R){if(ds(R)!=="number")return Cf(D.default,A.default);let j=D.stops.length;if(j===1||R<=D.stops[0][0])return D.stops[0][1];if(R>=D.stops[j-1][0])return D.stops[j-1][1];let te=hi(D.stops.map(ue=>ue[0]),R);return D.stops[te][1]}function $h(D,A,R){let j=D.base!==void 0?D.base:1;if(ds(R)!=="number")return Cf(D.default,A.default);let te=D.stops.length;if(te===1||R<=D.stops[0][0])return D.stops[0][1];if(R>=D.stops[te-1][0])return D.stops[te-1][1];let ue=hi(D.stops.map(Tt=>Tt[0]),R),ve=function(Tt,Ft,Qt,sr){let Tr=sr-Qt,Pr=Tt-Qt;return Tr===0?0:Ft===1?Pr/Tr:(Math.pow(Ft,Pr)-1)/(Math.pow(Ft,Tr)-1)}(R,j,D.stops[ue][0],D.stops[ue+1][0]),Re=D.stops[ue][1],Ze=D.stops[ue+1][1],at=Mo[A.type]||Bd;return typeof Re.evaluate=="function"?{evaluate(...Tt){let Ft=Re.evaluate.apply(void 0,Tt),Qt=Ze.evaluate.apply(void 0,Tt);if(Ft!==void 0&&Qt!==void 0)return at(Ft,Qt,ve,D.colorSpace)}}:at(Re,Ze,ve,D.colorSpace)}function eu(D,A,R){switch(A.type){case"color":R=Zt.parse(R);break;case"formatted":R=Zr.fromString(R.toString());break;case"resolvedImage":R=Mi.fromString(R.toString());break;case"padding":R=Vr.parse(R);break;default:ds(R)===A.type||A.type==="enum"&&A.values[R]||(R=void 0)}return Cf(R,D.default,A.default)}Ml.register(kf,{error:[{kind:"error"},[Et],(D,[A])=>{throw new la(A.evaluate(D))}],typeof:[Et,[fr],(D,[A])=>Ye(Ki(A.evaluate(D)))],"to-rgba":[Ne(St,4),[Ht],(D,[A])=>{let[R,j,te,ue]=A.evaluate(D).rgb;return[255*R,255*j,255*te,ue]}],rgb:[Ht,[St,St,St],Yh],rgba:[Ht,[St,St,St,St],Yh],has:{type:dt,overloads:[[[Et],(D,[A])=>Eh(A.evaluate(D),D.properties())],[[Et,$t],(D,[A,R])=>Eh(A.evaluate(D),R.evaluate(D))]]},get:{type:fr,overloads:[[[Et],(D,[A])=>nh(A.evaluate(D),D.properties())],[[Et,$t],(D,[A,R])=>nh(A.evaluate(D),R.evaluate(D))]]},"feature-state":[fr,[Et],(D,[A])=>nh(A.evaluate(D),D.featureState||{})],properties:[$t,[],D=>D.properties()],"geometry-type":[Et,[],D=>D.geometryType()],id:[fr,[],D=>D.id()],zoom:[St,[],D=>D.globals.zoom],"heatmap-density":[St,[],D=>D.globals.heatmapDensity||0],"line-progress":[St,[],D=>D.globals.lineProgress||0],accumulated:[fr,[],D=>D.globals.accumulated===void 0?null:D.globals.accumulated],"+":[St,hf(St),(D,A)=>{let R=0;for(let j of A)R+=j.evaluate(D);return R}],"*":[St,hf(St),(D,A)=>{let R=1;for(let j of A)R*=j.evaluate(D);return R}],"-":{type:St,overloads:[[[St,St],(D,[A,R])=>A.evaluate(D)-R.evaluate(D)],[[St],(D,[A])=>-A.evaluate(D)]]},"/":[St,[St,St],(D,[A,R])=>A.evaluate(D)/R.evaluate(D)],"%":[St,[St,St],(D,[A,R])=>A.evaluate(D)%R.evaluate(D)],ln2:[St,[],()=>Math.LN2],pi:[St,[],()=>Math.PI],e:[St,[],()=>Math.E],"^":[St,[St,St],(D,[A,R])=>Math.pow(A.evaluate(D),R.evaluate(D))],sqrt:[St,[St],(D,[A])=>Math.sqrt(A.evaluate(D))],log10:[St,[St],(D,[A])=>Math.log(A.evaluate(D))/Math.LN10],ln:[St,[St],(D,[A])=>Math.log(A.evaluate(D))],log2:[St,[St],(D,[A])=>Math.log(A.evaluate(D))/Math.LN2],sin:[St,[St],(D,[A])=>Math.sin(A.evaluate(D))],cos:[St,[St],(D,[A])=>Math.cos(A.evaluate(D))],tan:[St,[St],(D,[A])=>Math.tan(A.evaluate(D))],asin:[St,[St],(D,[A])=>Math.asin(A.evaluate(D))],acos:[St,[St],(D,[A])=>Math.acos(A.evaluate(D))],atan:[St,[St],(D,[A])=>Math.atan(A.evaluate(D))],min:[St,hf(St),(D,A)=>Math.min(...A.map(R=>R.evaluate(D)))],max:[St,hf(St),(D,A)=>Math.max(...A.map(R=>R.evaluate(D)))],abs:[St,[St],(D,[A])=>Math.abs(A.evaluate(D))],round:[St,[St],(D,[A])=>{let R=A.evaluate(D);return R<0?-Math.round(-R):Math.round(R)}],floor:[St,[St],(D,[A])=>Math.floor(A.evaluate(D))],ceil:[St,[St],(D,[A])=>Math.ceil(A.evaluate(D))],"filter-==":[dt,[Et,fr],(D,[A,R])=>D.properties()[A.value]===R.value],"filter-id-==":[dt,[fr],(D,[A])=>D.id()===A.value],"filter-type-==":[dt,[Et],(D,[A])=>D.geometryType()===A.value],"filter-<":[dt,[Et,fr],(D,[A,R])=>{let j=D.properties()[A.value],te=R.value;return typeof j==typeof te&&j{let R=D.id(),j=A.value;return typeof R==typeof j&&R":[dt,[Et,fr],(D,[A,R])=>{let j=D.properties()[A.value],te=R.value;return typeof j==typeof te&&j>te}],"filter-id->":[dt,[fr],(D,[A])=>{let R=D.id(),j=A.value;return typeof R==typeof j&&R>j}],"filter-<=":[dt,[Et,fr],(D,[A,R])=>{let j=D.properties()[A.value],te=R.value;return typeof j==typeof te&&j<=te}],"filter-id-<=":[dt,[fr],(D,[A])=>{let R=D.id(),j=A.value;return typeof R==typeof j&&R<=j}],"filter->=":[dt,[Et,fr],(D,[A,R])=>{let j=D.properties()[A.value],te=R.value;return typeof j==typeof te&&j>=te}],"filter-id->=":[dt,[fr],(D,[A])=>{let R=D.id(),j=A.value;return typeof R==typeof j&&R>=j}],"filter-has":[dt,[fr],(D,[A])=>A.value in D.properties()],"filter-has-id":[dt,[],D=>D.id()!==null&&D.id()!==void 0],"filter-type-in":[dt,[Ne(Et)],(D,[A])=>A.value.indexOf(D.geometryType())>=0],"filter-id-in":[dt,[Ne(fr)],(D,[A])=>A.value.indexOf(D.id())>=0],"filter-in-small":[dt,[Et,Ne(fr)],(D,[A,R])=>R.value.indexOf(D.properties()[A.value])>=0],"filter-in-large":[dt,[Et,Ne(fr)],(D,[A,R])=>function(j,te,ue,ve){for(;ue<=ve;){let Re=ue+ve>>1;if(te[Re]===j)return!0;te[Re]>j?ve=Re-1:ue=Re+1}return!1}(D.properties()[A.value],R.value,0,R.value.length-1)],all:{type:dt,overloads:[[[dt,dt],(D,[A,R])=>A.evaluate(D)&&R.evaluate(D)],[hf(dt),(D,A)=>{for(let R of A)if(!R.evaluate(D))return!1;return!0}]]},any:{type:dt,overloads:[[[dt,dt],(D,[A,R])=>A.evaluate(D)||R.evaluate(D)],[hf(dt),(D,A)=>{for(let R of A)if(R.evaluate(D))return!0;return!1}]]},"!":[dt,[dt],(D,[A])=>!A.evaluate(D)],"is-supported-script":[dt,[Et],(D,[A])=>{let R=D.globals&&D.globals.isSupportedScript;return!R||R(A.evaluate(D))}],upcase:[Et,[Et],(D,[A])=>A.evaluate(D).toUpperCase()],downcase:[Et,[Et],(D,[A])=>A.evaluate(D).toLowerCase()],concat:[Et,hf(fr),(D,A)=>A.map(R=>ka(R.evaluate(D))).join("")],"resolved-locale":[Et,[_r],(D,[A])=>A.evaluate(D).resolvedLocale()]});class Pu{constructor(A,R){var j;this.expression=A,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=R?(j=R).type==="color"&&Ch(j.default)?new Zt(0,0,0,0):j.type==="color"?Zt.parse(j.default)||null:j.type==="padding"?Vr.parse(j.default)||null:j.type==="variableAnchorOffsetCollection"?Si.parse(j.default)||null:j.default===void 0?null:j.default:null,this._enumValues=R&&R.type==="enum"?R.values:null}evaluateWithoutErrorHandling(A,R,j,te,ue,ve){return this._evaluator.globals=A,this._evaluator.feature=R,this._evaluator.featureState=j,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=ve,this.expression.evaluate(this._evaluator)}evaluate(A,R,j,te,ue,ve){this._evaluator.globals=A,this._evaluator.feature=R||null,this._evaluator.featureState=j||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=ve||null;try{let Re=this.expression.evaluate(this._evaluator);if(Re==null||typeof Re=="number"&&Re!=Re)return this._defaultValue;if(this._enumValues&&!(Re in this._enumValues))throw new la(`Expected value to be one of ${Object.keys(this._enumValues).map(Ze=>JSON.stringify(Ze)).join(", ")}, but found ${JSON.stringify(Re)} instead.`);return Re}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console!="undefined"&&console.warn(Re.message)),this._defaultValue}}}function Lc(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in kf}function fl(D,A){let R=new oo(kf,kh,[],A?function(te){let ue={color:Ht,string:Et,number:St,enum:Et,boolean:dt,formatted:Br,padding:Or,resolvedImage:Nr,variableAnchorOffsetCollection:ut};return te.type==="array"?Ne(ue[te.value]||fr,te.length):ue[te.type]}(A):void 0),j=R.parse(D,void 0,void 0,void 0,A&&A.type==="string"?{typeAnnotation:"coerce"}:void 0);return j?Wc(new Pu(j,A)):df(R.errors)}class Xc{constructor(A,R){this.kind=A,this._styleExpression=R,this.isStateDependent=A!=="constant"&&!rc(R.expression)}evaluateWithoutErrorHandling(A,R,j,te,ue,ve){return this._styleExpression.evaluateWithoutErrorHandling(A,R,j,te,ue,ve)}evaluate(A,R,j,te,ue,ve){return this._styleExpression.evaluate(A,R,j,te,ue,ve)}}class ic{constructor(A,R,j,te){this.kind=A,this.zoomStops=j,this._styleExpression=R,this.isStateDependent=A!=="camera"&&!rc(R.expression),this.interpolationType=te}evaluateWithoutErrorHandling(A,R,j,te,ue,ve){return this._styleExpression.evaluateWithoutErrorHandling(A,R,j,te,ue,ve)}evaluate(A,R,j,te,ue,ve){return this._styleExpression.evaluate(A,R,j,te,ue,ve)}interpolationFactor(A,R,j){return this.interpolationType?xo.interpolationFactor(this.interpolationType,A,R,j):0}}function yu(D,A){let R=fl(D,A);if(R.result==="error")return R;let j=R.value.expression,te=Kh(j);if(!te&&!Cu(A))return df([new xt("","data expressions not supported")]);let ue=ah(j,["zoom"]);if(!ue&&!Nf(A))return df([new xt("","zoom expressions not supported")]);let ve=Qh(j);return ve||ue?ve instanceof xt?df([ve]):ve instanceof xo&&!Zc(A)?df([new xt("",'"interpolate" expressions cannot be used with this property')]):Wc(ve?new ic(te?"camera":"composite",R.value,ve.labels,ve instanceof xo?ve.interpolation:void 0):new Xc(te?"constant":"source",R.value)):df([new xt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Qs{constructor(A,R){this._parameters=A,this._specification=R,Ke(this,Jh(this._parameters,this._specification))}static deserialize(A){return new Qs(A._parameters,A._specification)}static serialize(A){return{_parameters:A._parameters,_specification:A._specification}}}function Qh(D){let A=null;if(D instanceof xn)A=Qh(D.result);else if(D instanceof ks){for(let R of D.args)if(A=Qh(R),A)break}else(D instanceof Ji||D instanceof xo)&&D.input instanceof Ml&&D.input.name==="zoom"&&(A=D);return A instanceof xt||D.eachChild(R=>{let j=Qh(R);j instanceof xt?A=j:!A&&j?A=new xt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):A&&j&&A!==j&&(A=new xt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),A}function gd(D){if(D===!0||D===!1)return!0;if(!Array.isArray(D)||D.length===0)return!1;switch(D[0]){case"has":return D.length>=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(let A of D.slice(1))if(!gd(A)&&typeof A!="boolean")return!1;return!0;default:return!0}}let ju={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Pc(D){if(D==null)return{filter:()=>!0,needGeometry:!1};gd(D)||(D=Lf(D));let A=fl(D,ju);if(A.result==="error")throw new Error(A.value.map(R=>`${R.key}: ${R.message}`).join(", "));return{filter:(R,j,te)=>A.value.evaluate(R,j,{},te),needGeometry:sv(D)}}function vc(D,A){return DA?1:0}function sv(D){if(!Array.isArray(D))return!1;if(D[0]==="within"||D[0]==="distance")return!0;for(let A=1;A"||A==="<="||A===">="?Uf(D[1],D[2],A):A==="any"?(R=D.slice(1),["any"].concat(R.map(Lf))):A==="all"?["all"].concat(D.slice(1).map(Lf)):A==="none"?["all"].concat(D.slice(1).map(Lf).map(tu)):A==="in"?Iu(D[1],D.slice(2)):A==="!in"?tu(Iu(D[1],D.slice(2))):A==="has"?oh(D[1]):A!=="!has"||tu(oh(D[1]));var R}function Uf(D,A,R){switch(D){case"$type":return[`filter-type-${R}`,A];case"$id":return[`filter-id-${R}`,A];default:return[`filter-${R}`,D,A]}}function Iu(D,A){if(A.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",A]];case"$id":return["filter-id-in",["literal",A]];default:return A.length>200&&!A.some(R=>typeof R!=typeof A[0])?["filter-in-large",D,["literal",A.sort(vc)]]:["filter-in-small",D,["literal",A]]}}function oh(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function tu(D){return["!",D]}function vf(D){let A=typeof D;if(A==="number"||A==="boolean"||A==="string"||D==null)return JSON.stringify(D);if(Array.isArray(D)){let te="[";for(let ue of D)te+=`${vf(ue)},`;return`${te}]`}let R=Object.keys(D).sort(),j="{";for(let te=0;tej.maximum?[new er(A,R,`${R} is greater than the maximum value ${j.maximum}`)]:[]}function Pf(D){let A=D.valueSpec,R=Fs(D.value.type),j,te,ue,ve={},Re=R!=="categorical"&&D.value.property===void 0,Ze=!Re,at=ds(D.value.stops)==="array"&&ds(D.value.stops[0])==="array"&&ds(D.value.stops[0][0])==="object",Tt=xu({key:D.key,value:D.value,valueSpec:D.styleSpec.function,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:function(sr){if(R==="identity")return[new er(sr.key,sr.value,'identity function may not have a "stops" property')];let Tr=[],Pr=sr.value;return Tr=Tr.concat(Lh({key:sr.key,value:Pr,valueSpec:sr.valueSpec,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec,arrayElementValidator:Ft})),ds(Pr)==="array"&&Pr.length===0&&Tr.push(new er(sr.key,Pr,"array must have at least one stop")),Tr},default:function(sr){return sr.validateSpec({key:sr.key,value:sr.value,valueSpec:A,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec})}}});return R==="identity"&&Re&&Tt.push(new er(D.key,D.value,'missing required property "property"')),R==="identity"||D.value.stops||Tt.push(new er(D.key,D.value,'missing required property "stops"')),R==="exponential"&&D.valueSpec.expression&&!Zc(D.valueSpec)&&Tt.push(new er(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(Ze&&!Cu(D.valueSpec)?Tt.push(new er(D.key,D.value,"property functions not supported")):Re&&!Nf(D.valueSpec)&&Tt.push(new er(D.key,D.value,"zoom functions not supported"))),R!=="categorical"&&!at||D.value.property!==void 0||Tt.push(new er(D.key,D.value,'"property" property is required')),Tt;function Ft(sr){let Tr=[],Pr=sr.value,$r=sr.key;if(ds(Pr)!=="array")return[new er($r,Pr,`array expected, ${ds(Pr)} found`)];if(Pr.length!==2)return[new er($r,Pr,`array length 2 expected, length ${Pr.length} found`)];if(at){if(ds(Pr[0])!=="object")return[new er($r,Pr,`object expected, ${ds(Pr[0])} found`)];if(Pr[0].zoom===void 0)return[new er($r,Pr,"object stop key must have zoom")];if(Pr[0].value===void 0)return[new er($r,Pr,"object stop key must have value")];if(ue&&ue>Fs(Pr[0].zoom))return[new er($r,Pr[0].zoom,"stop zoom values must appear in ascending order")];Fs(Pr[0].zoom)!==ue&&(ue=Fs(Pr[0].zoom),te=void 0,ve={}),Tr=Tr.concat(xu({key:`${$r}[0]`,value:Pr[0],valueSpec:{zoom:{}},validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec,objectElementValidators:{zoom:Is,value:Qt}}))}else Tr=Tr.concat(Qt({key:`${$r}[0]`,value:Pr[0],valueSpec:{},validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec},Pr));return Lc(_u(Pr[1]))?Tr.concat([new er(`${$r}[1]`,Pr[1],"expressions are not allowed in function stops.")]):Tr.concat(sr.validateSpec({key:`${$r}[1]`,value:Pr[1],valueSpec:A,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec}))}function Qt(sr,Tr){let Pr=ds(sr.value),$r=Fs(sr.value),ni=sr.value!==null?sr.value:Tr;if(j){if(Pr!==j)return[new er(sr.key,ni,`${Pr} stop domain type must match previous stop domain type ${j}`)]}else j=Pr;if(Pr!=="number"&&Pr!=="string"&&Pr!=="boolean")return[new er(sr.key,ni,"stop domain value must be a number, string, or boolean")];if(Pr!=="number"&&R!=="categorical"){let Ri=`number expected, ${Pr} found`;return Cu(A)&&R===void 0&&(Ri+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new er(sr.key,ni,Ri)]}return R!=="categorical"||Pr!=="number"||isFinite($r)&&Math.floor($r)===$r?R!=="categorical"&&Pr==="number"&&te!==void 0&&$rnew er(`${D.key}${j.key}`,D.value,j.message));let R=A.value.expression||A.value._styleExpression.expression;if(D.expressionContext==="property"&&D.propertyKey==="text-font"&&!R.outputDefined())return[new er(D.key,D.value,`Invalid data expression for "${D.propertyKey}". Output values must be contained as literals within the expression.`)];if(D.expressionContext==="property"&&D.propertyType==="layout"&&!rc(R))return[new er(D.key,D.value,'"feature-state" data expressions are not supported with layout properties.')];if(D.expressionContext==="filter"&&!rc(R))return[new er(D.key,D.value,'"feature-state" data expressions are not supported with filters.')];if(D.expressionContext&&D.expressionContext.indexOf("cluster")===0){if(!ah(R,["zoom","feature-state"]))return[new er(D.key,D.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(D.expressionContext==="cluster-initial"&&!Kh(R))return[new er(D.key,D.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(D){let A=D.key,R=D.value,j=D.valueSpec,te=[];return Array.isArray(j.values)?j.values.indexOf(Fs(R))===-1&&te.push(new er(A,R,`expected one of [${j.values.join(", ")}], ${JSON.stringify(R)} found`)):Object.keys(j.values).indexOf(Fs(R))===-1&&te.push(new er(A,R,`expected one of [${Object.keys(j.values).join(", ")}], ${JSON.stringify(R)} found`)),te}function Vf(D){return gd(_u(D.value))?Ic(Ke({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):pc(D)}function pc(D){let A=D.value,R=D.key;if(ds(A)!=="array")return[new er(R,A,`array expected, ${ds(A)} found`)];let j=D.styleSpec,te,ue=[];if(A.length<1)return[new er(R,A,"filter array must have at least 1 element")];switch(ue=ue.concat(Wu({key:`${R}[0]`,value:A[0],valueSpec:j.filter_operator,style:D.style,styleSpec:D.styleSpec})),Fs(A[0])){case"<":case"<=":case">":case">=":A.length>=2&&Fs(A[1])==="$type"&&ue.push(new er(R,A,`"$type" cannot be use with operator "${A[0]}"`));case"==":case"!=":A.length!==3&&ue.push(new er(R,A,`filter array for operator "${A[0]}" must have 3 elements`));case"in":case"!in":A.length>=2&&(te=ds(A[1]),te!=="string"&&ue.push(new er(`${R}[1]`,A[1],`string expected, ${te} found`)));for(let ve=2;ve{at in R&&A.push(new er(j,R[at],`"${at}" is prohibited for ref layers`))}),te.layers.forEach(at=>{Fs(at.id)===Re&&(Ze=at)}),Ze?Ze.ref?A.push(new er(j,R.ref,"ref cannot reference another ref layer")):ve=Fs(Ze.type):A.push(new er(j,R.ref,`ref layer "${Re}" not found`))}else if(ve!=="background")if(R.source){let Ze=te.sources&&te.sources[R.source],at=Ze&&Fs(Ze.type);Ze?at==="vector"&&ve==="raster"?A.push(new er(j,R.source,`layer "${R.id}" requires a raster source`)):at!=="raster-dem"&&ve==="hillshade"?A.push(new er(j,R.source,`layer "${R.id}" requires a raster-dem source`)):at==="raster"&&ve!=="raster"?A.push(new er(j,R.source,`layer "${R.id}" requires a vector source`)):at!=="vector"||R["source-layer"]?at==="raster-dem"&&ve!=="hillshade"?A.push(new er(j,R.source,"raster-dem source can only be used with layer type 'hillshade'.")):ve!=="line"||!R.paint||!R.paint["line-gradient"]||at==="geojson"&&Ze.lineMetrics||A.push(new er(j,R,`layer "${R.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):A.push(new er(j,R,`layer "${R.id}" must specify a "source-layer"`)):A.push(new er(j,R.source,`source "${R.source}" not found`))}else A.push(new er(j,R,'missing required property "source"'));return A=A.concat(xu({key:j,value:R,valueSpec:ue.layer,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,objectElementValidators:{"*":()=>[],type:()=>D.validateSpec({key:`${j}.type`,value:R.type,valueSpec:ue.layer.type,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,object:R,objectKey:"type"}),filter:Vf,layout:Ze=>xu({layer:R,key:Ze.key,value:Ze.value,style:Ze.style,styleSpec:Ze.styleSpec,validateSpec:Ze.validateSpec,objectElementValidators:{"*":at=>Dl(Ke({layerType:ve},at))}}),paint:Ze=>xu({layer:R,key:Ze.key,value:Ze.value,style:Ze.style,styleSpec:Ze.styleSpec,validateSpec:Ze.validateSpec,objectElementValidators:{"*":at=>Ph(Ke({layerType:ve},at))}})}})),A}function Zu(D){let A=D.value,R=D.key,j=ds(A);return j!=="string"?[new er(R,A,`string expected, ${j} found`)]:[]}let Dc={promoteId:function({key:D,value:A}){if(ds(A)==="string")return Zu({key:D,value:A});{let R=[];for(let j in A)R.push(...Zu({key:`${D}.${j}`,value:A[j]}));return R}}};function gc(D){let A=D.value,R=D.key,j=D.styleSpec,te=D.style,ue=D.validateSpec;if(!A.type)return[new er(R,A,'"type" is required')];let ve=Fs(A.type),Re;switch(ve){case"vector":case"raster":return Re=xu({key:R,value:A,valueSpec:j[`source_${ve.replace("-","_")}`],style:D.style,styleSpec:j,objectElementValidators:Dc,validateSpec:ue}),Re;case"raster-dem":return Re=function(Ze){var at;let Tt=(at=Ze.sourceName)!==null&&at!==void 0?at:"",Ft=Ze.value,Qt=Ze.styleSpec,sr=Qt.source_raster_dem,Tr=Ze.style,Pr=[],$r=ds(Ft);if(Ft===void 0)return Pr;if($r!=="object")return Pr.push(new er("source_raster_dem",Ft,`object expected, ${$r} found`)),Pr;let ni=Fs(Ft.encoding)==="custom",Ri=["redFactor","greenFactor","blueFactor","baseShift"],pi=Ze.value.encoding?`"${Ze.value.encoding}"`:"Default";for(let ki in Ft)!ni&&Ri.includes(ki)?Pr.push(new er(ki,Ft[ki],`In "${Tt}": "${ki}" is only valid when "encoding" is set to "custom". ${pi} encoding found`)):sr[ki]?Pr=Pr.concat(Ze.validateSpec({key:ki,value:Ft[ki],valueSpec:sr[ki],validateSpec:Ze.validateSpec,style:Tr,styleSpec:Qt})):Pr.push(new er(ki,Ft[ki],`unknown property "${ki}"`));return Pr}({sourceName:R,value:A,style:D.style,styleSpec:j,validateSpec:ue}),Re;case"geojson":if(Re=xu({key:R,value:A,valueSpec:j.source_geojson,style:te,styleSpec:j,validateSpec:ue,objectElementValidators:Dc}),A.cluster)for(let Ze in A.clusterProperties){let[at,Tt]=A.clusterProperties[Ze],Ft=typeof at=="string"?[at,["accumulated"],["get",Ze]]:at;Re.push(...Ic({key:`${R}.${Ze}.map`,value:Tt,validateSpec:ue,expressionContext:"cluster-map"})),Re.push(...Ic({key:`${R}.${Ze}.reduce`,value:Ft,validateSpec:ue,expressionContext:"cluster-reduce"}))}return Re;case"video":return xu({key:R,value:A,valueSpec:j.source_video,style:te,validateSpec:ue,styleSpec:j});case"image":return xu({key:R,value:A,valueSpec:j.source_image,style:te,validateSpec:ue,styleSpec:j});case"canvas":return[new er(R,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${R}.type`,value:A.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:te,validateSpec:ue,styleSpec:j})}}function hl(D){let A=D.value,R=D.styleSpec,j=R.light,te=D.style,ue=[],ve=ds(A);if(A===void 0)return ue;if(ve!=="object")return ue=ue.concat([new er("light",A,`object expected, ${ve} found`)]),ue;for(let Re in A){let Ze=Re.match(/^(.*)-transition$/);ue=ue.concat(Ze&&j[Ze[1]]&&j[Ze[1]].transition?D.validateSpec({key:Re,value:A[Re],valueSpec:R.transition,validateSpec:D.validateSpec,style:te,styleSpec:R}):j[Re]?D.validateSpec({key:Re,value:A[Re],valueSpec:j[Re],validateSpec:D.validateSpec,style:te,styleSpec:R}):[new er(Re,A[Re],`unknown property "${Re}"`)])}return ue}function ru(D){let A=D.value,R=D.styleSpec,j=R.sky,te=D.style,ue=ds(A);if(A===void 0)return[];if(ue!=="object")return[new er("sky",A,`object expected, ${ue} found`)];let ve=[];for(let Re in A)ve=ve.concat(j[Re]?D.validateSpec({key:Re,value:A[Re],valueSpec:j[Re],style:te,styleSpec:R}):[new er(Re,A[Re],`unknown property "${Re}"`)]);return ve}function mc(D){let A=D.value,R=D.styleSpec,j=R.terrain,te=D.style,ue=[],ve=ds(A);if(A===void 0)return ue;if(ve!=="object")return ue=ue.concat([new er("terrain",A,`object expected, ${ve} found`)]),ue;for(let Re in A)ue=ue.concat(j[Re]?D.validateSpec({key:Re,value:A[Re],valueSpec:j[Re],validateSpec:D.validateSpec,style:te,styleSpec:R}):[new er(Re,A[Re],`unknown property "${Re}"`)]);return ue}function Yc(D){let A=[],R=D.value,j=D.key;if(Array.isArray(R)){let te=[],ue=[];for(let ve in R)R[ve].id&&te.includes(R[ve].id)&&A.push(new er(j,R,`all the sprites' ids must be unique, but ${R[ve].id} is duplicated`)),te.push(R[ve].id),R[ve].url&&ue.includes(R[ve].url)&&A.push(new er(j,R,`all the sprites' URLs must be unique, but ${R[ve].url} is duplicated`)),ue.push(R[ve].url),A=A.concat(xu({key:`${j}[${ve}]`,value:R[ve],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:D.validateSpec}));return A}return Zu({key:j,value:R})}let nc={"*":()=>[],array:Lh,boolean:function(D){let A=D.value,R=D.key,j=ds(A);return j!=="boolean"?[new er(R,A,`boolean expected, ${j} found`)]:[]},number:Is,color:function(D){let A=D.key,R=D.value,j=ds(R);return j!=="string"?[new er(A,R,`color expected, ${j} found`)]:Zt.parse(String(R))?[]:[new er(A,R,`color expected, "${R}" found`)]},constants:sh,enum:Wu,filter:Vf,function:Pf,layer:Ih,object:xu,source:gc,light:hl,sky:ru,terrain:mc,projection:function(D){let A=D.value,R=D.styleSpec,j=R.projection,te=D.style,ue=ds(A);if(A===void 0)return[];if(ue!=="object")return[new er("projection",A,`object expected, ${ue} found`)];let ve=[];for(let Re in A)ve=ve.concat(j[Re]?D.validateSpec({key:Re,value:A[Re],valueSpec:j[Re],style:te,styleSpec:R}):[new er(Re,A[Re],`unknown property "${Re}"`)]);return ve},string:Zu,formatted:function(D){return Zu(D).length===0?[]:Ic(D)},resolvedImage:function(D){return Zu(D).length===0?[]:Ic(D)},padding:function(D){let A=D.key,R=D.value;if(ds(R)==="array"){if(R.length<1||R.length>4)return[new er(A,R,`padding requires 1 to 4 values; ${R.length} values found`)];let j={type:"number"},te=[];for(let ue=0;ue[]}})),D.constants&&(R=R.concat(sh({key:"constants",value:D.constants,style:D,styleSpec:A,validateSpec:gf}))),vr(R)}function wr(D){return function(A){return D(KQ(YQ({},A),{validateSpec:gf}))}}function vr(D){return[].concat(D).sort((A,R)=>A.line-R.line)}function Ur(D){return function(...A){return vr(D.apply(this,A))}}Bt.source=Ur(wr(gc)),Bt.sprite=Ur(wr(Yc)),Bt.glyphs=Ur(wr(gt)),Bt.light=Ur(wr(hl)),Bt.sky=Ur(wr(ru)),Bt.terrain=Ur(wr(mc)),Bt.layer=Ur(wr(Ih)),Bt.filter=Ur(wr(Vf)),Bt.paintProperty=Ur(wr(Ph)),Bt.layoutProperty=Ur(wr(Dl));let fi=Bt,xi=fi.light,Fi=fi.sky,Xi=fi.paintProperty,hn=fi.layoutProperty;function Ti(D,A){let R=!1;if(A&&A.length)for(let j of A)D.fire(new me(new Error(j.message))),R=!0;return R}class qi{constructor(A,R,j){let te=this.cells=[];if(A instanceof ArrayBuffer){this.arrayBuffer=A;let ve=new Int32Array(this.arrayBuffer);A=ve[0],this.d=(R=ve[1])+2*(j=ve[2]);for(let Ze=0;Ze=Ft[Tr+0]&&te>=Ft[Tr+1])?(Re[sr]=!0,ve.push(Tt[sr])):Re[sr]=!1}}}}_forEachCell(A,R,j,te,ue,ve,Re,Ze){let at=this._convertToCellCoord(A),Tt=this._convertToCellCoord(R),Ft=this._convertToCellCoord(j),Qt=this._convertToCellCoord(te);for(let sr=at;sr<=Ft;sr++)for(let Tr=Tt;Tr<=Qt;Tr++){let Pr=this.d*Tr+sr;if((!Ze||Ze(this._convertFromCellCoord(sr),this._convertFromCellCoord(Tr),this._convertFromCellCoord(sr+1),this._convertFromCellCoord(Tr+1)))&&ue.call(this,A,R,j,te,Pr,ve,Re,Ze))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,R=3+this.cells.length+1+1,j=0;for(let ve=0;ve=0)continue;let ve=D[ue];te[ue]=Ii[R].shallow.indexOf(ue)>=0?ve:Ea(ve,A)}D instanceof Error&&(te.message=D.message)}if(te.$name)throw new Error("$name property is reserved for worker serialization logic.");return R!=="Object"&&(te.$name=R),te}function qa(D){if(Ta(D))return D;if(Array.isArray(D))return D.map(qa);if(typeof D!="object")throw new Error("can't deserialize object of type "+typeof D);let A=Ma(D)||"Object";if(!Ii[A])throw new Error(`can't deserialize unregistered class ${A}`);let{klass:R}=Ii[A];if(!R)throw new Error(`can't deserialize unregistered class ${A}`);if(R.deserialize)return R.deserialize(D);let j=Object.create(R.prototype);for(let te of Object.keys(D)){if(te==="$name")continue;let ue=D[te];j[te]=Ii[A].shallow.indexOf(te)>=0?ue:qa(ue)}return j}class Cn{constructor(){this.first=!0}update(A,R){let j=Math.floor(A);return this.first?(this.first=!1,this.lastIntegerZoom=j,this.lastIntegerZoomTime=0,this.lastZoom=A,this.lastFloorZoom=j,!0):(this.lastFloorZoom>j?(this.lastIntegerZoom=j+1,this.lastIntegerZoomTime=R):this.lastFloorZoomD>=128&&D<=255,"Hangul Jamo":D=>D>=4352&&D<=4607,Khmer:D=>D>=6016&&D<=6143,"General Punctuation":D=>D>=8192&&D<=8303,"Letterlike Symbols":D=>D>=8448&&D<=8527,"Number Forms":D=>D>=8528&&D<=8591,"Miscellaneous Technical":D=>D>=8960&&D<=9215,"Control Pictures":D=>D>=9216&&D<=9279,"Optical Character Recognition":D=>D>=9280&&D<=9311,"Enclosed Alphanumerics":D=>D>=9312&&D<=9471,"Geometric Shapes":D=>D>=9632&&D<=9727,"Miscellaneous Symbols":D=>D>=9728&&D<=9983,"Miscellaneous Symbols and Arrows":D=>D>=11008&&D<=11263,"Ideographic Description Characters":D=>D>=12272&&D<=12287,"CJK Symbols and Punctuation":D=>D>=12288&&D<=12351,Katakana:D=>D>=12448&&D<=12543,Kanbun:D=>D>=12688&&D<=12703,"CJK Strokes":D=>D>=12736&&D<=12783,"Enclosed CJK Letters and Months":D=>D>=12800&&D<=13055,"CJK Compatibility":D=>D>=13056&&D<=13311,"Yijing Hexagram Symbols":D=>D>=19904&&D<=19967,"Private Use Area":D=>D>=57344&&D<=63743,"Vertical Forms":D=>D>=65040&&D<=65055,"CJK Compatibility Forms":D=>D>=65072&&D<=65103,"Small Form Variants":D=>D>=65104&&D<=65135,"Halfwidth and Fullwidth Forms":D=>D>=65280&&D<=65519};function Ua(D){for(let A of D)if(Bo(A.charCodeAt(0)))return!0;return!1}function mo(D){for(let A of D)if(!Qo(A.charCodeAt(0)))return!1;return!0}function Xo(D){let A=D.map(R=>{try{return new RegExp(`\\p{sc=${R}}`,"u").source}catch(j){return null}}).filter(R=>R);return new RegExp(A.join("|"),"u")}let Ts=Xo(["Arab","Dupl","Mong","Ougr","Syrc"]);function Qo(D){return!Ts.test(String.fromCodePoint(D))}let ys=Xo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Bo(D){return!(D!==746&&D!==747&&(D<4352||!(sn["CJK Compatibility Forms"](D)&&!(D>=65097&&D<=65103)||sn["CJK Compatibility"](D)||sn["CJK Strokes"](D)||!(!sn["CJK Symbols and Punctuation"](D)||D>=12296&&D<=12305||D>=12308&&D<=12319||D===12336)||sn["Enclosed CJK Letters and Months"](D)||sn["Ideographic Description Characters"](D)||sn.Kanbun(D)||sn.Katakana(D)&&D!==12540||!(!sn["Halfwidth and Fullwidth Forms"](D)||D===65288||D===65289||D===65293||D>=65306&&D<=65310||D===65339||D===65341||D===65343||D>=65371&&D<=65503||D===65507||D>=65512&&D<=65519)||!(!sn["Small Form Variants"](D)||D>=65112&&D<=65118||D>=65123&&D<=65126)||sn["Vertical Forms"](D)||sn["Yijing Hexagram Symbols"](D)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(D))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(D))||ys.test(String.fromCodePoint(D)))))}function yl(D){return!(Bo(D)||function(A){return!!(sn["Latin-1 Supplement"](A)&&(A===167||A===169||A===174||A===177||A===188||A===189||A===190||A===215||A===247)||sn["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)||sn["Letterlike Symbols"](A)||sn["Number Forms"](A)||sn["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)||sn["Control Pictures"](A)&&A!==9251||sn["Optical Character Recognition"](A)||sn["Enclosed Alphanumerics"](A)||sn["Geometric Shapes"](A)||sn["Miscellaneous Symbols"](A)&&!(A>=9754&&A<=9759)||sn["Miscellaneous Symbols and Arrows"](A)&&(A>=11026&&A<=11055||A>=11088&&A<=11097||A>=11192&&A<=11243)||sn["CJK Symbols and Punctuation"](A)||sn.Katakana(A)||sn["Private Use Area"](A)||sn["CJK Compatibility Forms"](A)||sn["Small Form Variants"](A)||sn["Halfwidth and Fullwidth Forms"](A)||A===8734||A===8756||A===8757||A>=9984&&A<=10087||A>=10102&&A<=10131||A===65532||A===65533)}(D))}let Gs=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 Ds(D){return Gs.test(String.fromCodePoint(D))}function ia(D,A){return!(!A&&Ds(D)||D>=2304&&D<=3583||D>=3840&&D<=4255||sn.Khmer(D))}function Ka(D){for(let A of D)if(Ds(A.charCodeAt(0)))return!0;return!1}let vs=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(D){this.pluginStatus=D.pluginStatus,this.pluginURL=D.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(D){this.applyArabicShaping=D.applyArabicShaping,this.processBidirectionalText=D.processBidirectionalText,this.processStyledBidirectionalText=D.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ko{constructor(A,R){this.zoom=A,R?(this.now=R.now,this.fadeDuration=R.fadeDuration,this.zoomHistory=R.zoomHistory,this.transition=R.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Cn,this.transition={})}isSupportedScript(A){return function(R,j){for(let te of R)if(!ia(te.charCodeAt(0),j))return!1;return!0}(A,vs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let A=this.zoom,R=A-Math.floor(A),j=this.crossFadingFactor();return A>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:R+(1-R)*j}:{fromScale:.5,toScale:1,t:1-(1-j)*R}}}class iu{constructor(A,R){this.property=A,this.value=R,this.expression=function(j,te){if(Ch(j))return new Qs(j,te);if(Lc(j)){let ue=yu(j,te);if(ue.result==="error")throw new Error(ue.value.map(ve=>`${ve.key}: ${ve.message}`).join(", "));return ue.value}{let ue=j;return te.type==="color"&&typeof j=="string"?ue=Zt.parse(j):te.type!=="padding"||typeof j!="number"&&!Array.isArray(j)?te.type==="variableAnchorOffsetCollection"&&Array.isArray(j)&&(ue=Si.parse(j)):ue=Vr.parse(j),{kind:"constant",evaluate:()=>ue}}}(R===void 0?A.specification.default:R,A.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(A,R,j){return this.property.possiblyEvaluate(this,A,R,j)}}class Du{constructor(A){this.property=A,this.value=new iu(A,void 0)}transitioned(A,R){return new mf(this.property,this.value,R,L({},A.transition,this.transition),A.now)}untransitioned(){return new mf(this.property,this.value,null,{},0)}}class ac{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitionablePropertyValues)}getValue(A){return p(this._values[A].value.value)}setValue(A,R){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Du(this._values[A].property)),this._values[A].value=new iu(this._values[A].property,R===null?void 0:p(R))}getTransition(A){return p(this._values[A].transition)}setTransition(A,R){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Du(this._values[A].property)),this._values[A].transition=p(R)||void 0}serialize(){let A={};for(let R of Object.keys(this._values)){let j=this.getValue(R);j!==void 0&&(A[R]=j);let te=this.getTransition(R);te!==void 0&&(A[`${R}-transition`]=te)}return A}transitioned(A,R){let j=new bu(this._properties);for(let te of Object.keys(this._values))j._values[te]=this._values[te].transitioned(A,R._values[te]);return j}untransitioned(){let A=new bu(this._properties);for(let R of Object.keys(this._values))A._values[R]=this._values[R].untransitioned();return A}}class mf{constructor(A,R,j,te,ue){this.property=A,this.value=R,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,A.specification.transition&&(te.delay||te.duration)&&(this.prior=j)}possiblyEvaluate(A,R,j){let te=A.now||0,ue=this.value.possiblyEvaluate(A,R,j),ve=this.prior;if(ve){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(te=1)return 1;let at=Ze*Ze,Tt=at*Ze;return 4*(Ze<.5?Tt:3*(Ze-at)+Tt-.75)}(Re))}}return ue}}class bu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitioningPropertyValues)}possiblyEvaluate(A,R,j){let te=new Rc(this._properties);for(let ue of Object.keys(this._values))te._values[ue]=this._values[ue].possiblyEvaluate(A,R,j);return te}hasTransition(){for(let A of Object.keys(this._values))if(this._values[A].prior)return!0;return!1}}class Kc{constructor(A){this._properties=A,this._values=Object.create(A.defaultPropertyValues)}hasValue(A){return this._values[A].value!==void 0}getValue(A){return p(this._values[A].value)}setValue(A,R){this._values[A]=new iu(this._values[A].property,R===null?void 0:p(R))}serialize(){let A={};for(let R of Object.keys(this._values)){let j=this.getValue(R);j!==void 0&&(A[R]=j)}return A}possiblyEvaluate(A,R,j){let te=new Rc(this._properties);for(let ue of Object.keys(this._values))te._values[ue]=this._values[ue].possiblyEvaluate(A,R,j);return te}}class Ru{constructor(A,R,j){this.property=A,this.value=R,this.parameters=j}isConstant(){return this.value.kind==="constant"}constantOr(A){return this.value.kind==="constant"?this.value.value:A}evaluate(A,R,j,te){return this.property.evaluate(this.value,this.parameters,A,R,j,te)}}class Rc{constructor(A){this._properties=A,this._values=Object.create(A.defaultPossiblyEvaluatedValues)}get(A){return this._values[A]}}class Ra{constructor(A){this.specification=A}possiblyEvaluate(A,R){if(A.isDataDriven())throw new Error("Value should not be data driven");return A.expression.evaluate(R)}interpolate(A,R,j){let te=Mo[this.specification.type];return te?te(A,R,j):A}}class eo{constructor(A,R){this.specification=A,this.overrides=R}possiblyEvaluate(A,R,j,te){return new Ru(this,A.expression.kind==="constant"||A.expression.kind==="camera"?{kind:"constant",value:A.expression.evaluate(R,null,{},j,te)}:A.expression,R)}interpolate(A,R,j){if(A.value.kind!=="constant"||R.value.kind!=="constant")return A;if(A.value.value===void 0||R.value.value===void 0)return new Ru(this,{kind:"constant",value:void 0},A.parameters);let te=Mo[this.specification.type];if(te){let ue=te(A.value.value,R.value.value,j);return new Ru(this,{kind:"constant",value:ue},A.parameters)}return A}evaluate(A,R,j,te,ue,ve){return A.kind==="constant"?A.value:A.evaluate(R,j,te,ue,ve)}}class Jc extends eo{possiblyEvaluate(A,R,j,te){if(A.value===void 0)return new Ru(this,{kind:"constant",value:void 0},R);if(A.expression.kind==="constant"){let ue=A.expression.evaluate(R,null,{},j,te),ve=A.property.specification.type==="resolvedImage"&&typeof ue!="string"?ue.name:ue,Re=this._calculate(ve,ve,ve,R);return new Ru(this,{kind:"constant",value:Re},R)}if(A.expression.kind==="camera"){let ue=this._calculate(A.expression.evaluate({zoom:R.zoom-1}),A.expression.evaluate({zoom:R.zoom}),A.expression.evaluate({zoom:R.zoom+1}),R);return new Ru(this,{kind:"constant",value:ue},R)}return new Ru(this,A.expression,R)}evaluate(A,R,j,te,ue,ve){if(A.kind==="source"){let Re=A.evaluate(R,j,te,ue,ve);return this._calculate(Re,Re,Re,R)}return A.kind==="composite"?this._calculate(A.evaluate({zoom:Math.floor(R.zoom)-1},j,te),A.evaluate({zoom:Math.floor(R.zoom)},j,te),A.evaluate({zoom:Math.floor(R.zoom)+1},j,te),R):A.value}_calculate(A,R,j,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:R}:{from:j,to:R}}interpolate(A){return A}}class yc{constructor(A){this.specification=A}possiblyEvaluate(A,R,j,te){if(A.value!==void 0){if(A.expression.kind==="constant"){let ue=A.expression.evaluate(R,null,{},j,te);return this._calculate(ue,ue,ue,R)}return this._calculate(A.expression.evaluate(new Ko(Math.floor(R.zoom-1),R)),A.expression.evaluate(new Ko(Math.floor(R.zoom),R)),A.expression.evaluate(new Ko(Math.floor(R.zoom+1),R)),R)}}_calculate(A,R,j,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:R}:{from:j,to:R}}interpolate(A){return A}}class _c{constructor(A){this.specification=A}possiblyEvaluate(A,R,j,te){return!!A.expression.evaluate(R,null,{},j,te)}interpolate(){return!1}}class le{constructor(A){this.properties=A,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let R in A){let j=A[R];j.specification.overridable&&this.overridableProperties.push(R);let te=this.defaultPropertyValues[R]=new iu(j,void 0),ue=this.defaultTransitionablePropertyValues[R]=new Du(j);this.defaultTransitioningPropertyValues[R]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[R]=te.possiblyEvaluate({})}}}mi("DataDrivenProperty",eo),mi("DataConstantProperty",Ra),mi("CrossFadedDataDrivenProperty",Jc),mi("CrossFadedProperty",yc),mi("ColorRampProperty",_c);let w="-transition";class B extends De{constructor(A,R){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),R.layout&&(this._unevaluatedLayout=new Kc(R.layout)),R.paint)){this._transitionablePaint=new ac(R.paint);for(let j in A.paint)this.setPaintProperty(j,A.paint[j],{validate:!1});for(let j in A.layout)this.setLayoutProperty(j,A.layout[j],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Rc(R.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(A){return A==="visibility"?this.visibility:this._unevaluatedLayout.getValue(A)}setLayoutProperty(A,R,j={}){R!=null&&this._validate(hn,`layers.${this.id}.layout.${A}`,A,R,j)||(A!=="visibility"?this._unevaluatedLayout.setValue(A,R):this.visibility=R)}getPaintProperty(A){return A.endsWith(w)?this._transitionablePaint.getTransition(A.slice(0,-11)):this._transitionablePaint.getValue(A)}setPaintProperty(A,R,j={}){if(R!=null&&this._validate(Xi,`layers.${this.id}.paint.${A}`,A,R,j))return!1;if(A.endsWith(w))return this._transitionablePaint.setTransition(A.slice(0,-11),R||void 0),!1;{let te=this._transitionablePaint._values[A],ue=te.property.specification["property-type"]==="cross-faded-data-driven",ve=te.value.isDataDriven(),Re=te.value;this._transitionablePaint.setValue(A,R),this._handleSpecialPaintPropertyUpdate(A);let Ze=this._transitionablePaint._values[A].value;return Ze.isDataDriven()||ve||ue||this._handleOverridablePaintPropertyUpdate(A,Re,Ze)}}_handleSpecialPaintPropertyUpdate(A){}_handleOverridablePaintPropertyUpdate(A,R,j){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,R){A.getCrossfadeParameters&&(this._crossfadeParameters=A.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(A,void 0,R)),this.paint=this._transitioningPaint.possiblyEvaluate(A,void 0,R)}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,(R,j)=>!(R===void 0||j==="layout"&&!Object.keys(R).length||j==="paint"&&!Object.keys(R).length))}_validate(A,R,j,te,ue={}){return(!ue||ue.validate!==!1)&&Ti(this,A.call(fi,{key:R,layerType:this.type,objectKey:j,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let A in this.paint._values){let R=this.paint.get(A);if(R instanceof Ru&&Cu(R.property.specification)&&(R.value.kind==="source"||R.value.kind==="composite")&&R.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,R){this._structArray=A,this._pos1=R*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class se{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(A,R){return A._trim(),R&&(A.isTransferred=!0,R.push(A.arrayBuffer)),{length:A.length,arrayBuffer:A.arrayBuffer}}static deserialize(A){let R=Object.create(this.prototype);return R.arrayBuffer=A.arrayBuffer,R.length=A.length,R.capacity=A.arrayBuffer.byteLength/R.bytesPerElement,R._refreshViews(),R}_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 R=this.uint8;this._refreshViews(),R&&this.uint8.set(R)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function qe(D,A=1){let R=0,j=0;return{members:D.map(te=>{let ue=Q[te.type].BYTES_PER_ELEMENT,ve=R=je(R,Math.max(A,ue)),Re=te.components||1;return j=Math.max(j,ue),R+=ue*Re,{name:te.name,type:te.type,components:Re,offset:ve}}),size:je(R,Math.max(j,A)),alignment:A}}function je(D,A){return Math.ceil(D/A)*A}class it extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R){let j=this.length;return this.resize(j+1),this.emplace(j,A,R)}emplace(A,R,j){let te=2*A;return this.int16[te+0]=R,this.int16[te+1]=j,A}}it.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",it);class yt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,A,R,j)}emplace(A,R,j,te){let ue=3*A;return this.int16[ue+0]=R,this.int16[ue+1]=j,this.int16[ue+2]=te,A}}yt.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",yt);class Ot extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,A,R,j,te)}emplace(A,R,j,te,ue){let ve=4*A;return this.int16[ve+0]=R,this.int16[ve+1]=j,this.int16[ve+2]=te,this.int16[ve+3]=ue,A}}Ot.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Ot);class Nt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,R,j,te,ue,ve)}emplace(A,R,j,te,ue,ve,Re){let Ze=6*A;return this.int16[Ze+0]=R,this.int16[Ze+1]=j,this.int16[Ze+2]=te,this.int16[Ze+3]=ue,this.int16[Ze+4]=ve,this.int16[Ze+5]=Re,A}}Nt.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Nt);class hr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,R,j,te,ue,ve)}emplace(A,R,j,te,ue,ve,Re){let Ze=4*A,at=8*A;return this.int16[Ze+0]=R,this.int16[Ze+1]=j,this.uint8[at+4]=te,this.uint8[at+5]=ue,this.uint8[at+6]=ve,this.uint8[at+7]=Re,A}}hr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",hr);class Sr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,R){let j=this.length;return this.resize(j+1),this.emplace(j,A,R)}emplace(A,R,j){let te=2*A;return this.float32[te+0]=R,this.float32[te+1]=j,A}}Sr.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",Sr);class he extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue,ve,Re,Ze,at,Tt){let Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,A,R,j,te,ue,ve,Re,Ze,at,Tt)}emplace(A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft){let Qt=10*A;return this.uint16[Qt+0]=R,this.uint16[Qt+1]=j,this.uint16[Qt+2]=te,this.uint16[Qt+3]=ue,this.uint16[Qt+4]=ve,this.uint16[Qt+5]=Re,this.uint16[Qt+6]=Ze,this.uint16[Qt+7]=at,this.uint16[Qt+8]=Tt,this.uint16[Qt+9]=Ft,A}}he.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",he);class be extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt){let sr=this.length;return this.resize(sr+1),this.emplace(sr,A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt)}emplace(A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr){let Tr=12*A;return this.int16[Tr+0]=R,this.int16[Tr+1]=j,this.int16[Tr+2]=te,this.int16[Tr+3]=ue,this.uint16[Tr+4]=ve,this.uint16[Tr+5]=Re,this.uint16[Tr+6]=Ze,this.uint16[Tr+7]=at,this.int16[Tr+8]=Tt,this.int16[Tr+9]=Ft,this.int16[Tr+10]=Qt,this.int16[Tr+11]=sr,A}}be.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",be);class Pe extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,A,R,j)}emplace(A,R,j,te){let ue=3*A;return this.float32[ue+0]=R,this.float32[ue+1]=j,this.float32[ue+2]=te,A}}Pe.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",Pe);class Oe extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(A){let R=this.length;return this.resize(R+1),this.emplace(R,A)}emplace(A,R){return this.uint32[1*A+0]=R,A}}Oe.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",Oe);class Je extends se{_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,R,j,te,ue,ve,Re,Ze,at){let Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,A,R,j,te,ue,ve,Re,Ze,at)}emplace(A,R,j,te,ue,ve,Re,Ze,at,Tt){let Ft=10*A,Qt=5*A;return this.int16[Ft+0]=R,this.int16[Ft+1]=j,this.int16[Ft+2]=te,this.int16[Ft+3]=ue,this.int16[Ft+4]=ve,this.int16[Ft+5]=Re,this.uint32[Qt+3]=Ze,this.uint16[Ft+8]=at,this.uint16[Ft+9]=Tt,A}}Je.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Je);class He extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,R,j,te,ue,ve)}emplace(A,R,j,te,ue,ve,Re){let Ze=6*A;return this.int16[Ze+0]=R,this.int16[Ze+1]=j,this.int16[Ze+2]=te,this.int16[Ze+3]=ue,this.int16[Ze+4]=ve,this.int16[Ze+5]=Re,A}}He.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",He);class et extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue){let ve=this.length;return this.resize(ve+1),this.emplace(ve,A,R,j,te,ue)}emplace(A,R,j,te,ue,ve){let Re=4*A,Ze=8*A;return this.float32[Re+0]=R,this.float32[Re+1]=j,this.float32[Re+2]=te,this.int16[Ze+6]=ue,this.int16[Ze+7]=ve,A}}et.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",et);class Mt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,R,j,te,ue,ve)}emplace(A,R,j,te,ue,ve,Re){let Ze=16*A,at=4*A,Tt=8*A;return this.uint8[Ze+0]=R,this.uint8[Ze+1]=j,this.float32[at+1]=te,this.float32[at+2]=ue,this.int16[Tt+6]=ve,this.int16[Tt+7]=Re,A}}Mt.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",Mt);class Rt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,A,R,j)}emplace(A,R,j,te){let ue=3*A;return this.uint16[ue+0]=R,this.uint16[ue+1]=j,this.uint16[ue+2]=te,A}}Rt.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",Rt);class Ut extends se{_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,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni){let Ri=this.length;return this.resize(Ri+1),this.emplace(Ri,A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni)}emplace(A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri){let pi=24*A,ki=12*A,Zi=48*A;return this.int16[pi+0]=R,this.int16[pi+1]=j,this.uint16[pi+2]=te,this.uint16[pi+3]=ue,this.uint32[ki+2]=ve,this.uint32[ki+3]=Re,this.uint32[ki+4]=Ze,this.uint16[pi+10]=at,this.uint16[pi+11]=Tt,this.uint16[pi+12]=Ft,this.float32[ki+7]=Qt,this.float32[ki+8]=sr,this.uint8[Zi+36]=Tr,this.uint8[Zi+37]=Pr,this.uint8[Zi+38]=$r,this.uint32[ki+10]=ni,this.int16[pi+22]=Ri,A}}Ut.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ut);class tr extends se{_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,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri,pi,ki,Zi,ta,Va,Io,La,Hn,lo,$a){let Xa=this.length;return this.resize(Xa+1),this.emplace(Xa,A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri,pi,ki,Zi,ta,Va,Io,La,Hn,lo,$a)}emplace(A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri,pi,ki,Zi,ta,Va,Io,La,Hn,lo,$a,Xa){let Tn=32*A,bo=16*A;return this.int16[Tn+0]=R,this.int16[Tn+1]=j,this.int16[Tn+2]=te,this.int16[Tn+3]=ue,this.int16[Tn+4]=ve,this.int16[Tn+5]=Re,this.int16[Tn+6]=Ze,this.int16[Tn+7]=at,this.uint16[Tn+8]=Tt,this.uint16[Tn+9]=Ft,this.uint16[Tn+10]=Qt,this.uint16[Tn+11]=sr,this.uint16[Tn+12]=Tr,this.uint16[Tn+13]=Pr,this.uint16[Tn+14]=$r,this.uint16[Tn+15]=ni,this.uint16[Tn+16]=Ri,this.uint16[Tn+17]=pi,this.uint16[Tn+18]=ki,this.uint16[Tn+19]=Zi,this.uint16[Tn+20]=ta,this.uint16[Tn+21]=Va,this.uint16[Tn+22]=Io,this.uint32[bo+12]=La,this.float32[bo+13]=Hn,this.float32[bo+14]=lo,this.uint16[Tn+30]=$a,this.uint16[Tn+31]=Xa,A}}tr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",tr);class mr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A){let R=this.length;return this.resize(R+1),this.emplace(R,A)}emplace(A,R){return this.float32[1*A+0]=R,A}}mr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",mr);class Dr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,A,R,j)}emplace(A,R,j,te){let ue=3*A;return this.uint16[6*A+0]=R,this.float32[ue+1]=j,this.float32[ue+2]=te,A}}Dr.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",Dr);class zr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,A,R,j)}emplace(A,R,j,te){let ue=4*A;return this.uint32[2*A+0]=R,this.uint16[ue+2]=j,this.uint16[ue+3]=te,A}}zr.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",zr);class Xr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,R){let j=this.length;return this.resize(j+1),this.emplace(j,A,R)}emplace(A,R,j){let te=2*A;return this.uint16[te+0]=R,this.uint16[te+1]=j,A}}Xr.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",Xr);class di extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A){let R=this.length;return this.resize(R+1),this.emplace(R,A)}emplace(A,R){return this.uint16[1*A+0]=R,A}}di.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",di);class Li extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,R,j,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,A,R,j,te)}emplace(A,R,j,te,ue){let ve=4*A;return this.float32[ve+0]=R,this.float32[ve+1]=j,this.float32[ve+2]=te,this.float32[ve+3]=ue,A}}Li.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Li);class Ci 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)}}Ci.prototype.size=20;class Qi extends Je{get(A){return new Ci(this,A)}}mi("CollisionBoxArray",Qi);class Mn 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]}}Mn.prototype.size=48;class pa extends Ut{get(A){return new Mn(this,A)}}mi("PlacedSymbolArray",pa);class ea 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]}}ea.prototype.size=64;class Ga extends tr{get(A){return new ea(this,A)}}mi("SymbolInstanceArray",Ga);class To extends mr{getoffsetX(A){return this.float32[1*A+0]}}mi("GlyphOffsetArray",To);class Wa extends yt{getx(A){return this.int16[3*A+0]}gety(A){return this.int16[3*A+1]}gettileUnitDistanceFromAnchor(A){return this.int16[3*A+2]}}mi("SymbolLineVertexArray",Wa);class co 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]}}co.prototype.size=12;class Do extends Dr{get(A){return new co(this,A)}}mi("TextAnchorOffsetArray",Do);class Rs 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]}}Rs.prototype.size=8;class As extends zr{get(A){return new Rs(this,A)}}mi("FeatureIndexArray",As);class yo extends it{}class po extends it{}class _l extends it{}class Vl extends Nt{}class Xu extends hr{}class cu extends Sr{}class el extends he{}class nu extends be{}class zc extends Pe{}class Rl extends Oe{}class zl extends He{}class Z extends Mt{}class oe extends Rt{}class we extends Xr{}let Be=qe([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ue}=Be;class We{constructor(A=[]){this.segments=A}prepareSegment(A,R,j,te){let ue=this.segments[this.segments.length-1];return A>We.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${We.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${A}`),(!ue||ue.vertexLength+A>We.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te)&&(ue={vertexOffset:R.length,primitiveOffset:j.length,vertexLength:0,primitiveLength:0},te!==void 0&&(ue.sortKey=te),this.segments.push(ue)),ue}get(){return this.segments}destroy(){for(let A of this.segments)for(let R in A.vaos)A.vaos[R].destroy()}static simpleSegment(A,R,j,te){return new We([{vertexOffset:A,primitiveOffset:R,vertexLength:j,primitiveLength:te,vaos:{},sortKey:0}])}}function wt(D,A){return 256*(D=k(Math.floor(D),0,255))+k(Math.floor(A),0,255)}We.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",We);let tt=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 zt={exports:{}},or={exports:{}};or.exports=function(D,A){var R,j,te,ue,ve,Re,Ze,at;for(j=D.length-(R=3&D.length),te=A,ve=3432918353,Re=461845907,at=0;at>>16)*ve&65535)<<16)&4294967295)<<15|Ze>>>17))*Re+(((Ze>>>16)*Re&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(ue>>>16)&65535)<<16);switch(Ze=0,R){case 3:Ze^=(255&D.charCodeAt(at+2))<<16;case 2:Ze^=(255&D.charCodeAt(at+1))<<8;case 1:te^=Ze=(65535&(Ze=(Ze=(65535&(Ze^=255&D.charCodeAt(at)))*ve+(((Ze>>>16)*ve&65535)<<16)&4294967295)<<15|Ze>>>17))*Re+(((Ze>>>16)*Re&65535)<<16)&4294967295}return te^=D.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var lr=or.exports,Rr={exports:{}};Rr.exports=function(D,A){for(var R,j=D.length,te=A^j,ue=0;j>=4;)R=1540483477*(65535&(R=255&D.charCodeAt(ue)|(255&D.charCodeAt(++ue))<<8|(255&D.charCodeAt(++ue))<<16|(255&D.charCodeAt(++ue))<<24))+((1540483477*(R>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(R=1540483477*(65535&(R^=R>>>24))+((1540483477*(R>>>16)&65535)<<16)),j-=4,++ue;switch(j){case 3:te^=(255&D.charCodeAt(ue+2))<<16;case 2:te^=(255&D.charCodeAt(ue+1))<<8;case 1:te=1540483477*(65535&(te^=255&D.charCodeAt(ue)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var Ir=lr,oi=Rr.exports;zt.exports=Ir,zt.exports.murmur3=Ir,zt.exports.murmur2=oi;var ui=o(zt.exports);class qr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(A,R,j,te){this.ids.push(Kr(A)),this.positions.push(R,j,te)}getPositions(A){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let R=Kr(A),j=0,te=this.ids.length-1;for(;j>1;this.ids[ve]>=R?te=ve:j=ve+1}let ue=[];for(;this.ids[j]===R;)ue.push({index:this.positions[3*j],start:this.positions[3*j+1],end:this.positions[3*j+2]}),j++;return ue}static serialize(A,R){let j=new Float64Array(A.ids),te=new Uint32Array(A.positions);return ii(j,te,0,j.length-1),R&&R.push(j.buffer,te.buffer),{ids:j,positions:te}}static deserialize(A){let R=new qr;return R.ids=A.ids,R.positions=A.positions,R.indexed=!0,R}}function Kr(D){let A=+D;return!isNaN(A)&&A<=Number.MAX_SAFE_INTEGER?A:ui(String(D))}function ii(D,A,R,j){for(;R>1],ue=R-1,ve=j+1;for(;;){do ue++;while(D[ue]te);if(ue>=ve)break;vi(D,ue,ve),vi(A,3*ue,3*ve),vi(A,3*ue+1,3*ve+1),vi(A,3*ue+2,3*ve+2)}ve-R`u_${te}`),this.type=j}setUniform(A,R,j){A.set(j.constantOr(this.value))}getBinding(A,R,j){return this.type==="color"?new dn(A,R):new Jr(A,R)}}class ya{constructor(A,R){this.uniformNames=R.map(j=>`u_${j}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(A,R){this.pixelRatioFrom=R.pixelRatio,this.pixelRatioTo=A.pixelRatio,this.patternFrom=R.tlbr,this.patternTo=A.tlbr}setUniform(A,R,j,te){let ue=te==="u_pattern_to"?this.patternTo:te==="u_pattern_from"?this.patternFrom:te==="u_pixel_ratio_to"?this.pixelRatioTo:te==="u_pixel_ratio_from"?this.pixelRatioFrom:null;ue&&A.set(ue)}getBinding(A,R,j){return j.substr(0,9)==="u_pattern"?new un(A,R):new Jr(A,R)}}class so{constructor(A,R,j,te){this.expression=A,this.type=j,this.maxValue=0,this.paintVertexAttributes=R.map(ue=>({name:`a_${ue}`,type:"Float32",components:j==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(A,R,j,te,ue){let ve=this.paintVertexArray.length,Re=this.expression.evaluate(new Ko(0),R,{},te,[],ue);this.paintVertexArray.resize(A),this._setPaintValue(ve,A,Re)}updatePaintArray(A,R,j,te){let ue=this.expression.evaluate({zoom:0},j,te);this._setPaintValue(A,R,ue)}_setPaintValue(A,R,j){if(this.type==="color"){let te=Nn(j);for(let ue=A;ue`u_${Re}_t`),this.type=j,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=R.map(Re=>({name:`a_${Re}`,type:"Float32",components:j==="color"?4:2,offset:0})),this.paintVertexArray=new ve}populatePaintArray(A,R,j,te,ue){let ve=this.expression.evaluate(new Ko(this.zoom),R,{},te,[],ue),Re=this.expression.evaluate(new Ko(this.zoom+1),R,{},te,[],ue),Ze=this.paintVertexArray.length;this.paintVertexArray.resize(A),this._setPaintValue(Ze,A,ve,Re)}updatePaintArray(A,R,j,te){let ue=this.expression.evaluate({zoom:this.zoom},j,te),ve=this.expression.evaluate({zoom:this.zoom+1},j,te);this._setPaintValue(A,R,ue,ve)}_setPaintValue(A,R,j,te){if(this.type==="color"){let ue=Nn(j),ve=Nn(te);for(let Re=A;Re`#define HAS_UNIFORM_${te}`))}return A}getBinderAttributes(){let A=[];for(let R in this.binders){let j=this.binders[R];if(j instanceof so||j instanceof wa)for(let te=0;te!0){this.programConfigurations={};for(let te of A)this.programConfigurations[te.id]=new Ss(te,R,j);this.needsUpload=!1,this._featureMap=new qr,this._bufferOffset=0}populatePaintArrays(A,R,j,te,ue,ve){for(let Re in this.programConfigurations)this.programConfigurations[Re].populatePaintArrays(A,R,te,ue,ve);R.id!==void 0&&this._featureMap.add(R.id,j,this._bufferOffset,A),this._bufferOffset=A,this.needsUpload=!0}updatePaintArrays(A,R,j,te){for(let ue of j)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(A,this._featureMap,R,ue,te)||this.needsUpload}get(A){return this.programConfigurations[A]}upload(A){if(this.needsUpload){for(let R in this.programConfigurations)this.programConfigurations[R].upload(A);this.needsUpload=!1}}destroy(){for(let A in this.programConfigurations)this.programConfigurations[A].destroy()}}function Ns(D,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"]}[D]||[D.replace(`${A}-`,"").replace(/-/g,"_")]}function pn(D,A,R){let j={color:{source:Sr,composite:Li},number:{source:mr,composite:Sr}},te=function(ue){return{"line-pattern":{source:el,composite:el},"fill-pattern":{source:el,composite:el},"fill-extrusion-pattern":{source:el,composite:el}}[ue]}(D);return te&&te[R]||j[A][R]}mi("ConstantBinder",ga),mi("CrossFadedConstantBinder",ya),mi("SourceExpressionBinder",so),mi("CrossFadedCompositeBinder",io),mi("CompositeExpressionBinder",wa),mi("ProgramConfiguration",Ss,{omit:["_buffers"]}),mi("ProgramConfigurationSet",_s);let za=8192,Lo=Math.pow(2,14)-1,Fo=-Lo-1;function js(D){let A=za/D.extent,R=D.loadGeometry();for(let j=0;jve.x+1||Zeve.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return R}function xl(D,A){return{type:D.type,id:D.id,properties:D.properties,geometry:A?js(D):[]}}function fu(D,A,R,j,te){D.emplaceBack(2*A+(j+1)/2,2*R+(te+1)/2)}class dl{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(R=>R.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new po,this.indexArray=new oe,this.segments=new We,this.programConfigurations=new _s(A.layers,A.zoom),this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(A,R,j){let te=this.layers[0],ue=[],ve=null,Re=!1;te.type==="circle"&&(ve=te.layout.get("circle-sort-key"),Re=!ve.isConstant());for(let{feature:Ze,id:at,index:Tt,sourceLayerIndex:Ft}of A){let Qt=this.layers[0]._featureFilter.needGeometry,sr=xl(Ze,Qt);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),sr,j))continue;let Tr=Re?ve.evaluate(sr,{},j):void 0,Pr={id:at,properties:Ze.properties,type:Ze.type,sourceLayerIndex:Ft,index:Tt,geometry:Qt?sr.geometry:js(Ze),patterns:{},sortKey:Tr};ue.push(Pr)}Re&&ue.sort((Ze,at)=>Ze.sortKey-at.sortKey);for(let Ze of ue){let{geometry:at,index:Tt,sourceLayerIndex:Ft}=Ze,Qt=A[Tt].feature;this.addFeature(Ze,at,Tt,j),R.featureIndex.insert(Qt,at,Tt,Ft,this.index)}}update(A,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,R,this.stateDependentLayers,j)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ue),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,R,j,te){for(let ue of R)for(let ve of ue){let Re=ve.x,Ze=ve.y;if(Re<0||Re>=za||Ze<0||Ze>=za)continue;let at=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,A.sortKey),Tt=at.vertexLength;fu(this.layoutVertexArray,Re,Ze,-1,-1),fu(this.layoutVertexArray,Re,Ze,1,-1),fu(this.layoutVertexArray,Re,Ze,1,1),fu(this.layoutVertexArray,Re,Ze,-1,1),this.indexArray.emplaceBack(Tt,Tt+1,Tt+2),this.indexArray.emplaceBack(Tt,Tt+3,Tt+2),at.vertexLength+=4,at.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,j,{},te)}}function xc(D,A){for(let R=0;R1){if(wi(D,A))return!0;for(let j=0;j1?R:R.sub(A)._mult(te)._add(A))}function cn(D,A){let R,j,te,ue=!1;for(let ve=0;veA.y!=te.y>A.y&&A.x<(te.x-j.x)*(A.y-j.y)/(te.y-j.y)+j.x&&(ue=!ue)}return ue}function On(D,A){let R=!1;for(let j=0,te=D.length-1;jA.y!=ve.y>A.y&&A.x<(ve.x-ue.x)*(A.y-ue.y)/(ve.y-ue.y)+ue.x&&(R=!R)}return R}function Bn(D,A,R){let j=R[0],te=R[2];if(D.xte.x&&A.x>te.x||D.yte.y&&A.y>te.y)return!1;let ue=F(D,A,R[0]);return ue!==F(D,A,R[1])||ue!==F(D,A,R[2])||ue!==F(D,A,R[3])}function yn(D,A,R){let j=A.paint.get(D).value;return j.kind==="constant"?j.value:R.programConfigurations.get(A.id).getMaxValue(D)}function to(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Dn(D,A,R,j,te){if(!A[0]&&!A[1])return D;let ue=u.convert(A)._mult(te);R==="viewport"&&ue._rotate(-j);let ve=[];for(let Re=0;Revn($r,Pr))}(at,Ze),sr=Ft?Tt*Re:Tt;for(let Tr of te)for(let Pr of Tr){let $r=Ft?Pr:vn(Pr,Ze),ni=sr,Ri=Za([],[Pr.x,Pr.y,0,1],Ze);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ni*=Ri[3]/ve.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ni*=ve.cameraToCenterDistance/Ri[3]),At(Qt,$r,ni))return!0}return!1}}function vn(D,A){let R=Za([],[D.x,D.y,0,1],A);return new u(R[0]/R[3],R[1]/R[3])}class Aa extends dl{}let aa;mi("HeatmapBucket",Aa,{omit:["layers"]});var Xn={get paint(){return aa=aa||new le({"heatmap-radius":new eo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new eo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ra(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new _c(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ra(ce.paint_heatmap["heatmap-opacity"])})}};function Vn(D,{width:A,height:R},j,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==A*R*j)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${A*R*j}`)}else te=new Uint8Array(A*R*j);return D.width=A,D.height=R,D.data=te,D}function ma(D,{width:A,height:R},j){if(A===D.width&&R===D.height)return;let te=Vn({},{width:A,height:R},j);ro(D,te,{x:0,y:0},{x:0,y:0},{width:Math.min(D.width,A),height:Math.min(D.height,R)},j),D.width=A,D.height=R,D.data=te.data}function ro(D,A,R,j,te,ue){if(te.width===0||te.height===0)return A;if(te.width>D.width||te.height>D.height||R.x>D.width-te.width||R.y>D.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>A.width||te.height>A.height||j.x>A.width-te.width||j.y>A.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let ve=D.data,Re=A.data;if(ve===Re)throw new Error("srcData equals dstData, so image is already copied");for(let Ze=0;Ze{A[D.evaluationKey]=Ze;let at=D.expression.evaluate(A);te.data[ve+Re+0]=Math.floor(255*at.r/at.a),te.data[ve+Re+1]=Math.floor(255*at.g/at.a),te.data[ve+Re+2]=Math.floor(255*at.b/at.a),te.data[ve+Re+3]=Math.floor(255*at.a)};if(D.clips)for(let ve=0,Re=0;ve80*R){Re=1/0,Ze=1/0;let Tt=-1/0,Ft=-1/0;for(let Qt=R;QtTt&&(Tt=sr),Tr>Ft&&(Ft=Tr)}at=Math.max(Tt-Re,Ft-Ze),at=at!==0?32767/at:0}return yf(ue,ve,R,Re,Ze,at,0),ve}function bc(D,A,R,j,te){let ue;if(te===function(ve,Re,Ze,at){let Tt=0;for(let Ft=Re,Qt=Ze-at;Ft0)for(let ve=A;ve=A;ve-=j)ue=Jt(ve/j|0,D[ve],D[ve+1],ue);return ue&&de(ue,ue.next)&&(vt(ue),ue=ue.next),ue}function wc(D,A){if(!D)return D;A||(A=D);let R,j=D;do if(R=!1,j.steiner||!de(j,j.next)&&pe(j.prev,j,j.next)!==0)j=j.next;else{if(vt(j),j=A=j.prev,j===j.next)break;R=!0}while(R||j!==A);return A}function yf(D,A,R,j,te,ue,ve){if(!D)return;!ve&&ue&&function(Ze,at,Tt,Ft){let Qt=Ze;do Qt.z===0&&(Qt.z=z(Qt.x,Qt.y,at,Tt,Ft)),Qt.prevZ=Qt.prev,Qt.nextZ=Qt.next,Qt=Qt.next;while(Qt!==Ze);Qt.prevZ.nextZ=null,Qt.prevZ=null,function(sr){let Tr,Pr=1;do{let $r,ni=sr;sr=null;let Ri=null;for(Tr=0;ni;){Tr++;let pi=ni,ki=0;for(let ta=0;ta0||Zi>0&π)ki!==0&&(Zi===0||!pi||ni.z<=pi.z)?($r=ni,ni=ni.nextZ,ki--):($r=pi,pi=pi.nextZ,Zi--),Ri?Ri.nextZ=$r:sr=$r,$r.prevZ=Ri,Ri=$r;ni=pi}Ri.nextZ=null,Pr*=2}while(Tr>1)}(Qt)}(D,j,te,ue);let Re=D;for(;D.prev!==D.next;){let Ze=D.prev,at=D.next;if(ue?Fc(D,j,te,ue):Hl(D))A.push(Ze.i,D.i,at.i),vt(D),D=at.next,Re=at.next;else if((D=at)===Re){ve?ve===1?yf(D=ef(wc(D),A),A,R,j,te,ue,2):ve===2&&ls(D,A,R,j,te,ue):yf(wc(D),A,R,j,te,ue,1);break}}}function Hl(D){let A=D.prev,R=D,j=D.next;if(pe(A,R,j)>=0)return!1;let te=A.x,ue=R.x,ve=j.x,Re=A.y,Ze=R.y,at=j.y,Tt=teue?te>ve?te:ve:ue>ve?ue:ve,sr=Re>Ze?Re>at?Re:at:Ze>at?Ze:at,Tr=j.next;for(;Tr!==A;){if(Tr.x>=Tt&&Tr.x<=Qt&&Tr.y>=Ft&&Tr.y<=sr&&O(te,Re,ue,Ze,ve,at,Tr.x,Tr.y)&&pe(Tr.prev,Tr,Tr.next)>=0)return!1;Tr=Tr.next}return!0}function Fc(D,A,R,j){let te=D.prev,ue=D,ve=D.next;if(pe(te,ue,ve)>=0)return!1;let Re=te.x,Ze=ue.x,at=ve.x,Tt=te.y,Ft=ue.y,Qt=ve.y,sr=ReZe?Re>at?Re:at:Ze>at?Ze:at,$r=Tt>Ft?Tt>Qt?Tt:Qt:Ft>Qt?Ft:Qt,ni=z(sr,Tr,A,R,j),Ri=z(Pr,$r,A,R,j),pi=D.prevZ,ki=D.nextZ;for(;pi&&pi.z>=ni&&ki&&ki.z<=Ri;){if(pi.x>=sr&&pi.x<=Pr&&pi.y>=Tr&&pi.y<=$r&&pi!==te&&pi!==ve&&O(Re,Tt,Ze,Ft,at,Qt,pi.x,pi.y)&&pe(pi.prev,pi,pi.next)>=0||(pi=pi.prevZ,ki.x>=sr&&ki.x<=Pr&&ki.y>=Tr&&ki.y<=$r&&ki!==te&&ki!==ve&&O(Re,Tt,Ze,Ft,at,Qt,ki.x,ki.y)&&pe(ki.prev,ki,ki.next)>=0))return!1;ki=ki.nextZ}for(;pi&&pi.z>=ni;){if(pi.x>=sr&&pi.x<=Pr&&pi.y>=Tr&&pi.y<=$r&&pi!==te&&pi!==ve&&O(Re,Tt,Ze,Ft,at,Qt,pi.x,pi.y)&&pe(pi.prev,pi,pi.next)>=0)return!1;pi=pi.prevZ}for(;ki&&ki.z<=Ri;){if(ki.x>=sr&&ki.x<=Pr&&ki.y>=Tr&&ki.y<=$r&&ki!==te&&ki!==ve&&O(Re,Tt,Ze,Ft,at,Qt,ki.x,ki.y)&&pe(ki.prev,ki,ki.next)>=0)return!1;ki=ki.nextZ}return!0}function ef(D,A){let R=D;do{let j=R.prev,te=R.next.next;!de(j,te)&&Ie(j,R,R.next,te)&&Kt(j,te)&&Kt(te,j)&&(A.push(j.i,R.i,te.i),vt(R),vt(R.next),R=D=te),R=R.next}while(R!==D);return wc(R)}function ls(D,A,R,j,te,ue){let ve=D;do{let Re=ve.next.next;for(;Re!==ve.prev;){if(ve.i!==Re.i&&$(ve,Re)){let Ze=ir(ve,Re);return ve=wc(ve,ve.next),Ze=wc(Ze,Ze.next),yf(ve,A,R,j,te,ue,0),void yf(Ze,A,R,j,te,ue,0)}Re=Re.next}ve=ve.next}while(ve!==D)}function _f(D,A){return D.x-A.x}function ns(D,A){let R=function(te,ue){let ve=ue,Re=te.x,Ze=te.y,at,Tt=-1/0;do{if(Ze<=ve.y&&Ze>=ve.next.y&&ve.next.y!==ve.y){let Pr=ve.x+(Ze-ve.y)*(ve.next.x-ve.x)/(ve.next.y-ve.y);if(Pr<=Re&&Pr>Tt&&(Tt=Pr,at=ve.x=ve.x&&ve.x>=Qt&&Re!==ve.x&&O(Zeat.x||ve.x===at.x&&Y(at,ve)))&&(at=ve,Tr=Pr)}ve=ve.next}while(ve!==Ft);return at}(D,A);if(!R)return A;let j=ir(R,D);return wc(j,j.next),wc(R,R.next)}function Y(D,A){return pe(D.prev,D,A.prev)<0&&pe(A.next,D,D.next)<0}function z(D,A,R,j,te){return(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-R)*te|0)|D<<8))|D<<4))|D<<2))|D<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-j)*te|0)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function K(D){let A=D,R=D;do(A.x=(D-ve)*(ue-Re)&&(D-ve)*(j-Re)>=(R-ve)*(A-Re)&&(R-ve)*(ue-Re)>=(te-ve)*(j-Re)}function $(D,A){return D.next.i!==A.i&&D.prev.i!==A.i&&!function(R,j){let te=R;do{if(te.i!==R.i&&te.next.i!==R.i&&te.i!==j.i&&te.next.i!==j.i&&Ie(te,te.next,R,j))return!0;te=te.next}while(te!==R);return!1}(D,A)&&(Kt(D,A)&&Kt(A,D)&&function(R,j){let te=R,ue=!1,ve=(R.x+j.x)/2,Re=(R.y+j.y)/2;do te.y>Re!=te.next.y>Re&&te.next.y!==te.y&&ve<(te.next.x-te.x)*(Re-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==R);return ue}(D,A)&&(pe(D.prev,D,A.prev)||pe(D,A.prev,A))||de(D,A)&&pe(D.prev,D,D.next)>0&&pe(A.prev,A,A.next)>0)}function pe(D,A,R){return(A.y-D.y)*(R.x-A.x)-(A.x-D.x)*(R.y-A.y)}function de(D,A){return D.x===A.x&&D.y===A.y}function Ie(D,A,R,j){let te=pt(pe(D,A,R)),ue=pt(pe(D,A,j)),ve=pt(pe(R,j,D)),Re=pt(pe(R,j,A));return te!==ue&&ve!==Re||!(te!==0||!$e(D,R,A))||!(ue!==0||!$e(D,j,A))||!(ve!==0||!$e(R,D,j))||!(Re!==0||!$e(R,A,j))}function $e(D,A,R){return A.x<=Math.max(D.x,R.x)&&A.x>=Math.min(D.x,R.x)&&A.y<=Math.max(D.y,R.y)&&A.y>=Math.min(D.y,R.y)}function pt(D){return D>0?1:D<0?-1:0}function Kt(D,A){return pe(D.prev,D,D.next)<0?pe(D,A,D.next)>=0&&pe(D,D.prev,A)>=0:pe(D,A,D.prev)<0||pe(D,D.next,A)<0}function ir(D,A){let R=Pt(D.i,D.x,D.y),j=Pt(A.i,A.x,A.y),te=D.next,ue=A.prev;return D.next=A,A.prev=D,R.next=te,te.prev=R,j.next=R,R.prev=j,ue.next=j,j.prev=ue,j}function Jt(D,A,R,j){let te=Pt(D,A,R);return j?(te.next=j.next,te.prev=j,j.next.prev=te,j.next=te):(te.prev=te,te.next=te),te}function vt(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function Pt(D,A,R){return{i:D,x:A,y:R,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Wt(D,A,R){let j=R.patternDependencies,te=!1;for(let ue of A){let ve=ue.paint.get(`${D}-pattern`);ve.isConstant()||(te=!0);let Re=ve.constantOr(null);Re&&(te=!0,j[Re.to]=!0,j[Re.from]=!0)}return te}function rr(D,A,R,j,te){let ue=te.patternDependencies;for(let ve of A){let Re=ve.paint.get(`${D}-pattern`).value;if(Re.kind!=="constant"){let Ze=Re.evaluate({zoom:j-1},R,{},te.availableImages),at=Re.evaluate({zoom:j},R,{},te.availableImages),Tt=Re.evaluate({zoom:j+1},R,{},te.availableImages);Ze=Ze&&Ze.name?Ze.name:Ze,at=at&&at.name?at.name:at,Tt=Tt&&Tt.name?Tt.name:Tt,ue[Ze]=!0,ue[at]=!0,ue[Tt]=!0,R.patterns[ve.id]={min:Ze,mid:at,max:Tt}}}return R}class dr{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(R=>R.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _l,this.indexArray=new oe,this.indexArray2=new we,this.programConfigurations=new _s(A.layers,A.zoom),this.segments=new We,this.segments2=new We,this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(A,R,j){this.hasPattern=Wt("fill",this.layers,R);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),ve=[];for(let{feature:Re,id:Ze,index:at,sourceLayerIndex:Tt}of A){let Ft=this.layers[0]._featureFilter.needGeometry,Qt=xl(Re,Ft);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),Qt,j))continue;let sr=ue?te.evaluate(Qt,{},j,R.availableImages):void 0,Tr={id:Ze,properties:Re.properties,type:Re.type,sourceLayerIndex:Tt,index:at,geometry:Ft?Qt.geometry:js(Re),patterns:{},sortKey:sr};ve.push(Tr)}ue&&ve.sort((Re,Ze)=>Re.sortKey-Ze.sortKey);for(let Re of ve){let{geometry:Ze,index:at,sourceLayerIndex:Tt}=Re;if(this.hasPattern){let Ft=rr("fill",this.layers,Re,this.zoom,R);this.patternFeatures.push(Ft)}else this.addFeature(Re,Ze,at,j,{});R.featureIndex.insert(A[at].feature,Ze,at,Tt,this.index)}}update(A,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,R,this.stateDependentLayers,j)}addFeatures(A,R,j){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,R,j)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Qc),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,R,j,te,ue){for(let ve of Of(R,500)){let Re=0;for(let sr of ve)Re+=sr.length;let Ze=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray),at=Ze.vertexLength,Tt=[],Ft=[];for(let sr of ve){if(sr.length===0)continue;sr!==ve[0]&&Ft.push(Tt.length/2);let Tr=this.segments2.prepareSegment(sr.length,this.layoutVertexArray,this.indexArray2),Pr=Tr.vertexLength;this.layoutVertexArray.emplaceBack(sr[0].x,sr[0].y),this.indexArray2.emplaceBack(Pr+sr.length-1,Pr),Tt.push(sr[0].x),Tt.push(sr[0].y);for(let $r=1;$r>3}if(te--,j===1||j===2)ue+=D.readSVarint(),ve+=D.readSVarint(),j===1&&(A&&Re.push(A),A=[]),A.push(new yi(ue,ve));else{if(j!==7)throw new Error("unknown command "+j);A&&A.push(A[0].clone())}}return A&&Re.push(A),Re},Di.prototype.bbox=function(){var D=this._pbf;D.pos=this._geometry;for(var A=D.readVarint()+D.pos,R=1,j=0,te=0,ue=0,ve=1/0,Re=-1/0,Ze=1/0,at=-1/0;D.pos>3}if(j--,R===1||R===2)(te+=D.readSVarint())Re&&(Re=te),(ue+=D.readSVarint())at&&(at=ue);else if(R!==7)throw new Error("unknown command "+R)}return[ve,Ze,Re,at]},Di.prototype.toGeoJSON=function(D,A,R){var j,te,ue=this.extent*Math.pow(2,R),ve=this.extent*D,Re=this.extent*A,Ze=this.loadGeometry(),at=Di.types[this.type];function Tt(sr){for(var Tr=0;Tr>3;te=ve===1?j.readString():ve===2?j.readFloat():ve===3?j.readDouble():ve===4?j.readVarint64():ve===5?j.readVarint():ve===6?j.readSVarint():ve===7?j.readBoolean():null}return te}(R))}bn.prototype.feature=function(D){if(D<0||D>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[D];var A=this._pbf.readVarint()+this._pbf.pos;return new qn(this._pbf,A,this.extent,this._keys,this._values)};var Gn=rn;function da(D,A,R){if(D===3){var j=new Gn(R,R.readVarint()+R.pos);j.length&&(A[j.name]=j)}}ei.VectorTile=function(D,A){this.layers=D.readFields(da,{},A)},ei.VectorTileFeature=tn,ei.VectorTileLayer=rn;let No=ei.VectorTileFeature.types,Ro=Math.pow(2,13);function ps(D,A,R,j,te,ue,ve,Re){D.emplaceBack(A,R,2*Math.floor(j*Ro)+ve,te*Ro*2,ue*Ro*2,Math.round(Re))}class fo{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(R=>R.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new Vl,this.centroidVertexArray=new yo,this.indexArray=new oe,this.programConfigurations=new _s(A.layers,A.zoom),this.segments=new We,this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(A,R,j){this.features=[],this.hasPattern=Wt("fill-extrusion",this.layers,R);for(let{feature:te,id:ue,index:ve,sourceLayerIndex:Re}of A){let Ze=this.layers[0]._featureFilter.needGeometry,at=xl(te,Ze);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),at,j))continue;let Tt={id:ue,sourceLayerIndex:Re,index:ve,geometry:Ze?at.geometry:js(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(rr("fill-extrusion",this.layers,Tt,this.zoom,R)):this.addFeature(Tt,Tt.geometry,ve,j,{}),R.featureIndex.insert(te,Tt.geometry,ve,Re,this.index,!0)}}addFeatures(A,R,j){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,R,j)}}update(A,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,R,this.stateDependentLayers,j)}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,Gr),this.centroidVertexBuffer=A.createVertexBuffer(this.centroidVertexArray,cr.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,R,j,te,ue){for(let ve of Of(R,500)){let Re={x:0,y:0,vertexCount:0},Ze=0;for(let Tr of ve)Ze+=Tr.length;let at=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Tr of ve){if(Tr.length===0||tl(Tr))continue;let Pr=0;for(let $r=0;$r=1){let Ri=Tr[$r-1];if(!as(ni,Ri)){at.vertexLength+4>We.MAX_VERTEX_ARRAY_LENGTH&&(at=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let pi=ni.sub(Ri)._perp()._unit(),ki=Ri.dist(ni);Pr+ki>32768&&(Pr=0),ps(this.layoutVertexArray,ni.x,ni.y,pi.x,pi.y,0,0,Pr),ps(this.layoutVertexArray,ni.x,ni.y,pi.x,pi.y,0,1,Pr),Re.x+=2*ni.x,Re.y+=2*ni.y,Re.vertexCount+=2,Pr+=ki,ps(this.layoutVertexArray,Ri.x,Ri.y,pi.x,pi.y,0,0,Pr),ps(this.layoutVertexArray,Ri.x,Ri.y,pi.x,pi.y,0,1,Pr),Re.x+=2*Ri.x,Re.y+=2*Ri.y,Re.vertexCount+=2;let Zi=at.vertexLength;this.indexArray.emplaceBack(Zi,Zi+2,Zi+1),this.indexArray.emplaceBack(Zi+1,Zi+2,Zi+3),at.vertexLength+=4,at.primitiveLength+=2}}}}if(at.vertexLength+Ze>We.MAX_VERTEX_ARRAY_LENGTH&&(at=this.segments.prepareSegment(Ze,this.layoutVertexArray,this.indexArray)),No[A.type]!=="Polygon")continue;let Tt=[],Ft=[],Qt=at.vertexLength;for(let Tr of ve)if(Tr.length!==0){Tr!==ve[0]&&Ft.push(Tt.length/2);for(let Pr=0;Prza)||D.y===A.y&&(D.y<0||D.y>za)}function tl(D){return D.every(A=>A.x<0)||D.every(A=>A.x>za)||D.every(A=>A.y<0)||D.every(A=>A.y>za)}let zu;mi("FillExtrusionBucket",fo,{omit:["layers","features"]});var Mv={get paint(){return zu=zu||new le({"fill-extrusion-opacity":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new eo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Jc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new eo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new eo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ev extends B{constructor(A){super(A,Mv)}createBucket(A){return new fo(A)}queryRadius(){return to(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(A,R,j,te,ue,ve,Re,Ze){let at=Dn(A,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ve.angle,Re),Tt=this.paint.get("fill-extrusion-height").evaluate(R,j),Ft=this.paint.get("fill-extrusion-base").evaluate(R,j),Qt=function(Tr,Pr,$r,ni){let Ri=[];for(let pi of Tr){let ki=[pi.x,pi.y,0,1];Za(ki,ki,Pr),Ri.push(new u(ki[0]/ki[3],ki[1]/ki[3]))}return Ri}(at,Ze),sr=function(Tr,Pr,$r,ni){let Ri=[],pi=[],ki=ni[8]*Pr,Zi=ni[9]*Pr,ta=ni[10]*Pr,Va=ni[11]*Pr,Io=ni[8]*$r,La=ni[9]*$r,Hn=ni[10]*$r,lo=ni[11]*$r;for(let $a of Tr){let Xa=[],Tn=[];for(let bo of $a){let Ya=bo.x,Uo=bo.y,wu=ni[0]*Ya+ni[4]*Uo+ni[12],hu=ni[1]*Ya+ni[5]*Uo+ni[13],uh=ni[2]*Ya+ni[6]*Uo+ni[14],$v=ni[3]*Ya+ni[7]*Uo+ni[15],td=uh+ta,ch=$v+Va,Ud=wu+Io,Vd=hu+La,Hd=uh+Hn,rf=$v+lo,fh=new u((wu+ki)/ch,(hu+Zi)/ch);fh.z=td/ch,Xa.push(fh);let Td=new u(Ud/rf,Vd/rf);Td.z=Hd/rf,Tn.push(Td)}Ri.push(Xa),pi.push(Tn)}return[Ri,pi]}(te,Ft,Tt,Ze);return function(Tr,Pr,$r){let ni=1/0;Er($r,Pr)&&(ni=Yv($r,Pr[0]));for(let Ri=0;RiR.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(R=>{this.gradients[R.id]={}}),this.layoutVertexArray=new Xu,this.layoutVertexArray2=new cu,this.indexArray=new oe,this.programConfigurations=new _s(A.layers,A.zoom),this.segments=new We,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(A,R,j){this.hasPattern=Wt("line",this.layers,R);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),ve=[];for(let{feature:Re,id:Ze,index:at,sourceLayerIndex:Tt}of A){let Ft=this.layers[0]._featureFilter.needGeometry,Qt=xl(Re,Ft);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),Qt,j))continue;let sr=ue?te.evaluate(Qt,{},j):void 0,Tr={id:Ze,properties:Re.properties,type:Re.type,sourceLayerIndex:Tt,index:at,geometry:Ft?Qt.geometry:js(Re),patterns:{},sortKey:sr};ve.push(Tr)}ue&&ve.sort((Re,Ze)=>Re.sortKey-Ze.sortKey);for(let Re of ve){let{geometry:Ze,index:at,sourceLayerIndex:Tt}=Re;if(this.hasPattern){let Ft=rr("line",this.layers,Re,this.zoom,R);this.patternFeatures.push(Ft)}else this.addFeature(Re,Ze,at,j,{});R.featureIndex.insert(A[at].feature,Ze,at,Tt,this.index)}}update(A,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,R,this.stateDependentLayers,j)}addFeatures(A,R,j){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,R,j)}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,pp)),this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,vp),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,R,j,te,ue){let ve=this.layers[0].layout,Re=ve.get("line-join").evaluate(A,{}),Ze=ve.get("line-cap"),at=ve.get("line-miter-limit"),Tt=ve.get("line-round-limit");this.lineClips=this.lineFeatureClips(A);for(let Ft of R)this.addLine(Ft,A,Re,Ze,at,Tt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,j,ue,te)}addLine(A,R,j,te,ue,ve){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ni=0;ni=2&&A[Ze-1].equals(A[Ze-2]);)Ze--;let at=0;for(;at0;if(Va&&ni>at){let lo=Qt.dist(sr);if(lo>2*Tt){let $a=Qt.sub(Qt.sub(sr)._mult(Tt/lo)._round());this.updateDistance(sr,$a),this.addCurrentVertex($a,Pr,0,0,Ft),sr=$a}}let La=sr&&Tr,Hn=La?j:Re?"butt":te;if(La&&Hn==="round"&&(Ziue&&(Hn="bevel"),Hn==="bevel"&&(Zi>2&&(Hn="flipbevel"),Zi100)Ri=$r.mult(-1);else{let lo=Zi*Pr.add($r).mag()/Pr.sub($r).mag();Ri._perp()._mult(lo*(Io?-1:1))}this.addCurrentVertex(Qt,Ri,0,0,Ft),this.addCurrentVertex(Qt,Ri.mult(-1),0,0,Ft)}else if(Hn==="bevel"||Hn==="fakeround"){let lo=-Math.sqrt(Zi*Zi-1),$a=Io?lo:0,Xa=Io?0:lo;if(sr&&this.addCurrentVertex(Qt,Pr,$a,Xa,Ft),Hn==="fakeround"){let Tn=Math.round(180*ta/Math.PI/20);for(let bo=1;bo2*Tt){let $a=Qt.add(Tr.sub(Qt)._mult(Tt/lo)._round());this.updateDistance(Qt,$a),this.addCurrentVertex($a,$r,0,0,Ft),Qt=$a}}}}addCurrentVertex(A,R,j,te,ue,ve=!1){let Re=R.y*te-R.x,Ze=-R.y-R.x*te;this.addHalfVertex(A,R.x+R.y*j,R.y-R.x*j,ve,!1,j,ue),this.addHalfVertex(A,Re,Ze,ve,!0,-te,ue),this.distance>kv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(A,R,j,te,ue,ve))}addHalfVertex({x:A,y:R},j,te,ue,ve,Re,Ze){let at=.5*(this.lineClips?this.scaledDistance*(kv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((A<<1)+(ue?1:0),(R<<1)+(ve?1:0),Math.round(63*j)+128,Math.round(63*te)+128,1+(Re===0?0:Re<0?-1:1)|(63&at)<<2,at>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Tt=Ze.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Tt),Ze.primitiveLength++),ve?this.e2=Tt:this.e1=Tt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(A,R){this.distance+=A.dist(R),this.updateScaledDistance()}}let Cv,ny;mi("LineBucket",Kv,{omit:["layers","patternFeatures"]});var fg={get paint(){return ny=ny||new le({"line-opacity":new eo(ce.paint_line["line-opacity"]),"line-color":new eo(ce.paint_line["line-color"]),"line-translate":new Ra(ce.paint_line["line-translate"]),"line-translate-anchor":new Ra(ce.paint_line["line-translate-anchor"]),"line-width":new eo(ce.paint_line["line-width"]),"line-gap-width":new eo(ce.paint_line["line-gap-width"]),"line-offset":new eo(ce.paint_line["line-offset"]),"line-blur":new eo(ce.paint_line["line-blur"]),"line-dasharray":new yc(ce.paint_line["line-dasharray"]),"line-pattern":new Jc(ce.paint_line["line-pattern"]),"line-gradient":new _c(ce.paint_line["line-gradient"])})},get layout(){return Cv=Cv||new le({"line-cap":new Ra(ce.layout_line["line-cap"]),"line-join":new eo(ce.layout_line["line-join"]),"line-miter-limit":new Ra(ce.layout_line["line-miter-limit"]),"line-round-limit":new Ra(ce.layout_line["line-round-limit"]),"line-sort-key":new eo(ce.layout_line["line-sort-key"])})}};class Hf extends eo{possiblyEvaluate(A,R){return R=new Ko(Math.floor(R.zoom),{now:R.now,fadeDuration:R.fadeDuration,zoomHistory:R.zoomHistory,transition:R.transition}),super.possiblyEvaluate(A,R)}evaluate(A,R,j,te){return R=L({},R,{zoom:Math.floor(R.zoom)}),super.evaluate(A,R,j,te)}}let hg;class ay extends B{constructor(A){super(A,fg),this.gradientVersion=0,hg||(hg=new Hf(fg.paint.properties["line-width"].specification),hg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(A){if(A==="line-gradient"){let R=this.gradientExpression();this.stepInterpolant=!!function(j){return j._styleExpression!==void 0}(R)&&R._styleExpression.expression instanceof Ji,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(A,R){super.recalculate(A,R),this.paint._values["line-floorwidth"]=hg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,A)}createBucket(A){return new Kv(A)}queryRadius(A){let R=A,j=Dh(yn("line-width",this,R),yn("line-gap-width",this,R)),te=yn("line-offset",this,R);return j/2+Math.abs(te)+to(this.paint.get("line-translate"))}queryIntersectsFeature(A,R,j,te,ue,ve,Re){let Ze=Dn(A,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ve.angle,Re),at=Re/2*Dh(this.paint.get("line-width").evaluate(R,j),this.paint.get("line-gap-width").evaluate(R,j)),Tt=this.paint.get("line-offset").evaluate(R,j);return Tt&&(te=function(Ft,Qt){let sr=[];for(let Tr=0;Tr=3){for(let $r=0;$r0?A+2*D:D}let rm=qe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),w1=qe([{name:"a_projected_pos",components:3,type:"Float32"}],4);qe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let T1=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 oy=qe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),im=qe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function nm(D,A,R){return D.sections.forEach(j=>{j.text=function(te,ue,ve){let Re=ue.layout.get("text-transform").evaluate(ve,{});return Re==="uppercase"?te=te.toLocaleUpperCase():Re==="lowercase"&&(te=te.toLocaleLowerCase()),vs.applyArabicShaping&&(te=vs.applyArabicShaping(te)),te}(j.text,A,R)}),D}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 Fu={"!":"\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 kl=24,bd=Yl,sy=function(D,A,R,j,te){var ue,ve,Re=8*te-j-1,Ze=(1<>1,Tt=-7,Ft=R?te-1:0,Qt=R?-1:1,sr=D[A+Ft];for(Ft+=Qt,ue=sr&(1<<-Tt)-1,sr>>=-Tt,Tt+=Re;Tt>0;ue=256*ue+D[A+Ft],Ft+=Qt,Tt-=8);for(ve=ue&(1<<-Tt)-1,ue>>=-Tt,Tt+=j;Tt>0;ve=256*ve+D[A+Ft],Ft+=Qt,Tt-=8);if(ue===0)ue=1-at;else{if(ue===Ze)return ve?NaN:1/0*(sr?-1:1);ve+=Math.pow(2,j),ue-=at}return(sr?-1:1)*ve*Math.pow(2,ue-j)},A1=function(D,A,R,j,te,ue){var ve,Re,Ze,at=8*ue-te-1,Tt=(1<>1,Qt=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,sr=j?0:ue-1,Tr=j?1:-1,Pr=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(Re=isNaN(A)?1:0,ve=Tt):(ve=Math.floor(Math.log(A)/Math.LN2),A*(Ze=Math.pow(2,-ve))<1&&(ve--,Ze*=2),(A+=ve+Ft>=1?Qt/Ze:Qt*Math.pow(2,1-Ft))*Ze>=2&&(ve++,Ze/=2),ve+Ft>=Tt?(Re=0,ve=Tt):ve+Ft>=1?(Re=(A*Ze-1)*Math.pow(2,te),ve+=Ft):(Re=A*Math.pow(2,Ft-1)*Math.pow(2,te),ve=0));te>=8;D[R+sr]=255&Re,sr+=Tr,Re/=256,te-=8);for(ve=ve<0;D[R+sr]=255&ve,sr+=Tr,ve/=256,at-=8);D[R+sr-Tr]|=128*Pr};function Yl(D){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(D)?D:new Uint8Array(D||0),this.pos=0,this.type=0,this.length=this.buf.length}Yl.Varint=0,Yl.Fixed64=1,Yl.Bytes=2,Yl.Fixed32=5;var Bx=4294967296,am=1/Bx,Mw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Lv(D){return D.type===Yl.Bytes?D.readVarint()+D.pos:D.pos+1}function om(D,A,R){return R?4294967296*A+(D>>>0):4294967296*(A>>>0)+(D>>>0)}function Ew(D,A,R){var j=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.floor(Math.log(A)/(7*Math.LN2));R.realloc(j);for(var te=R.pos-1;te>=D;te--)R.buf[te+j]=R.buf[te]}function Nx(D,A){for(var R=0;R>>8,D[R+2]=A>>>16,D[R+3]=A>>>24}function lC(D,A){return(D[A]|D[A+1]<<8|D[A+2]<<16)+(D[A+3]<<24)}Yl.prototype={destroy:function(){this.buf=null},readFields:function(D,A,R){for(R=R||this.length;this.pos>3,ue=this.pos;this.type=7&j,D(te,A,this),this.pos===ue&&this.skip(j)}return A},readMessage:function(D,A){return this.readFields(D,A,this.readVarint()+this.pos)},readFixed32:function(){var D=ly(this.buf,this.pos);return this.pos+=4,D},readSFixed32:function(){var D=lC(this.buf,this.pos);return this.pos+=4,D},readFixed64:function(){var D=ly(this.buf,this.pos)+ly(this.buf,this.pos+4)*Bx;return this.pos+=8,D},readSFixed64:function(){var D=ly(this.buf,this.pos)+lC(this.buf,this.pos+4)*Bx;return this.pos+=8,D},readFloat:function(){var D=sy(this.buf,this.pos,!0,23,4);return this.pos+=4,D},readDouble:function(){var D=sy(this.buf,this.pos,!0,52,8);return this.pos+=8,D},readVarint:function(D){var A,R,j=this.buf;return A=127&(R=j[this.pos++]),R<128?A:(A|=(127&(R=j[this.pos++]))<<7,R<128?A:(A|=(127&(R=j[this.pos++]))<<14,R<128?A:(A|=(127&(R=j[this.pos++]))<<21,R<128?A:function(te,ue,ve){var Re,Ze,at=ve.buf;if(Re=(112&(Ze=at[ve.pos++]))>>4,Ze<128||(Re|=(127&(Ze=at[ve.pos++]))<<3,Ze<128)||(Re|=(127&(Ze=at[ve.pos++]))<<10,Ze<128)||(Re|=(127&(Ze=at[ve.pos++]))<<17,Ze<128)||(Re|=(127&(Ze=at[ve.pos++]))<<24,Ze<128)||(Re|=(1&(Ze=at[ve.pos++]))<<31,Ze<128))return om(te,Re,ue);throw new Error("Expected varint not more than 10 bytes")}(A|=(15&(R=j[this.pos]))<<28,D,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var D=this.readVarint();return D%2==1?(D+1)/-2:D/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var D=this.readVarint()+this.pos,A=this.pos;return this.pos=D,D-A>=12&&Mw?function(R,j,te){return Mw.decode(R.subarray(j,te))}(this.buf,A,D):function(R,j,te){for(var ue="",ve=j;ve239?4:Tt>223?3:Tt>191?2:1;if(ve+Qt>te)break;Qt===1?Tt<128&&(Ft=Tt):Qt===2?(192&(Re=R[ve+1]))==128&&(Ft=(31&Tt)<<6|63&Re)<=127&&(Ft=null):Qt===3?(Ze=R[ve+2],(192&(Re=R[ve+1]))==128&&(192&Ze)==128&&((Ft=(15&Tt)<<12|(63&Re)<<6|63&Ze)<=2047||Ft>=55296&&Ft<=57343)&&(Ft=null)):Qt===4&&(Ze=R[ve+2],at=R[ve+3],(192&(Re=R[ve+1]))==128&&(192&Ze)==128&&(192&at)==128&&((Ft=(15&Tt)<<18|(63&Re)<<12|(63&Ze)<<6|63&at)<=65535||Ft>=1114112)&&(Ft=null)),Ft===null?(Ft=65533,Qt=1):Ft>65535&&(Ft-=65536,ue+=String.fromCharCode(Ft>>>10&1023|55296),Ft=56320|1023&Ft),ue+=String.fromCharCode(Ft),ve+=Qt}return ue}(this.buf,A,D)},readBytes:function(){var D=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,D);return this.pos=D,A},readPackedVarint:function(D,A){if(this.type!==Yl.Bytes)return D.push(this.readVarint(A));var R=Lv(this);for(D=D||[];this.pos127;);else if(A===Yl.Bytes)this.pos=this.readVarint()+this.pos;else if(A===Yl.Fixed32)this.pos+=4;else{if(A!==Yl.Fixed64)throw new Error("Unimplemented type: "+A);this.pos+=8}},writeTag:function(D,A){this.writeVarint(D<<3|A)},realloc:function(D){for(var A=this.length||16;A268435455||D<0?function(A,R){var j,te;if(A>=0?(j=A%4294967296|0,te=A/4294967296|0):(te=~(-A/4294967296),4294967295^(j=~(-A%4294967296))?j=j+1|0:(j=0,te=te+1|0)),A>=18446744073709552e3||A<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),function(ue,ve,Re){Re.buf[Re.pos++]=127&ue|128,ue>>>=7,Re.buf[Re.pos++]=127&ue|128,ue>>>=7,Re.buf[Re.pos++]=127&ue|128,ue>>>=7,Re.buf[Re.pos++]=127&ue|128,Re.buf[Re.pos]=127&(ue>>>=7)}(j,0,R),function(ue,ve){var Re=(7&ue)<<4;ve.buf[ve.pos++]|=Re|((ue>>>=3)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue)))))}(te,R)}(D,this):(this.realloc(4),this.buf[this.pos++]=127&D|(D>127?128:0),D<=127||(this.buf[this.pos++]=127&(D>>>=7)|(D>127?128:0),D<=127||(this.buf[this.pos++]=127&(D>>>=7)|(D>127?128:0),D<=127||(this.buf[this.pos++]=D>>>7&127))))},writeSVarint:function(D){this.writeVarint(D<0?2*-D-1:2*D)},writeBoolean:function(D){this.writeVarint(!!D)},writeString:function(D){D=String(D),this.realloc(4*D.length),this.pos++;var A=this.pos;this.pos=function(j,te,ue){for(var ve,Re,Ze=0;Ze55295&&ve<57344){if(!Re){ve>56319||Ze+1===te.length?(j[ue++]=239,j[ue++]=191,j[ue++]=189):Re=ve;continue}if(ve<56320){j[ue++]=239,j[ue++]=191,j[ue++]=189,Re=ve;continue}ve=Re-55296<<10|ve-56320|65536,Re=null}else Re&&(j[ue++]=239,j[ue++]=191,j[ue++]=189,Re=null);ve<128?j[ue++]=ve:(ve<2048?j[ue++]=ve>>6|192:(ve<65536?j[ue++]=ve>>12|224:(j[ue++]=ve>>18|240,j[ue++]=ve>>12&63|128),j[ue++]=ve>>6&63|128),j[ue++]=63&ve|128)}return ue}(this.buf,D,this.pos);var R=this.pos-A;R>=128&&Ew(A,R,this),this.pos=A-1,this.writeVarint(R),this.pos+=R},writeFloat:function(D){this.realloc(4),A1(this.buf,D,this.pos,!0,23,4),this.pos+=4},writeDouble:function(D){this.realloc(8),A1(this.buf,D,this.pos,!0,52,8),this.pos+=8},writeBytes:function(D){var A=D.length;this.writeVarint(A),this.realloc(A);for(var R=0;R=128&&Ew(R,j,this),this.pos=R-1,this.writeVarint(j),this.pos+=j},writeMessage:function(D,A,R){this.writeTag(D,Yl.Bytes),this.writeRawMessage(A,R)},writePackedVarint:function(D,A){A.length&&this.writeMessage(D,Nx,A)},writePackedSVarint:function(D,A){A.length&&this.writeMessage(D,L9,A)},writePackedBoolean:function(D,A){A.length&&this.writeMessage(D,D9,A)},writePackedFloat:function(D,A){A.length&&this.writeMessage(D,P9,A)},writePackedDouble:function(D,A){A.length&&this.writeMessage(D,I9,A)},writePackedFixed32:function(D,A){A.length&&this.writeMessage(D,pQ,A)},writePackedSFixed32:function(D,A){A.length&&this.writeMessage(D,R9,A)},writePackedFixed64:function(D,A){A.length&&this.writeMessage(D,z9,A)},writePackedSFixed64:function(D,A){A.length&&this.writeMessage(D,F9,A)},writeBytesField:function(D,A){this.writeTag(D,Yl.Bytes),this.writeBytes(A)},writeFixed32Field:function(D,A){this.writeTag(D,Yl.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(D,A){this.writeTag(D,Yl.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(D,A){this.writeTag(D,Yl.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(D,A){this.writeTag(D,Yl.Fixed64),this.writeSFixed64(A)},writeVarintField:function(D,A){this.writeTag(D,Yl.Varint),this.writeVarint(A)},writeSVarintField:function(D,A){this.writeTag(D,Yl.Varint),this.writeSVarint(A)},writeStringField:function(D,A){this.writeTag(D,Yl.Bytes),this.writeString(A)},writeFloatField:function(D,A){this.writeTag(D,Yl.Fixed32),this.writeFloat(A)},writeDoubleField:function(D,A){this.writeTag(D,Yl.Fixed64),this.writeDouble(A)},writeBooleanField:function(D,A){this.writeVarintField(D,!!A)}};var tS=o(bd);let rS=3;function gQ(D,A,R){D===1&&R.readMessage(q9,A)}function q9(D,A,R){if(D===3){let{id:j,bitmap:te,width:ue,height:ve,left:Re,top:Ze,advance:at}=R.readMessage(uC,{});A.push({id:j,bitmap:new Ao({width:ue+2*rS,height:ve+2*rS},te),metrics:{width:ue,height:ve,left:Re,top:Ze,advance:at}})}}function uC(D,A,R){D===1?A.id=R.readVarint():D===2?A.bitmap=R.readBytes():D===3?A.width=R.readVarint():D===4?A.height=R.readVarint():D===5?A.left=R.readSVarint():D===6?A.top=R.readSVarint():D===7&&(A.advance=R.readVarint())}let cC=rS;function iS(D){let A=0,R=0;for(let ve of D)A+=ve.w*ve.h,R=Math.max(R,ve.w);D.sort((ve,Re)=>Re.h-ve.h);let j=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(A/.95)),R),h:1/0}],te=0,ue=0;for(let ve of D)for(let Re=j.length-1;Re>=0;Re--){let Ze=j[Re];if(!(ve.w>Ze.w||ve.h>Ze.h)){if(ve.x=Ze.x,ve.y=Ze.y,ue=Math.max(ue,ve.y+ve.h),te=Math.max(te,ve.x+ve.w),ve.w===Ze.w&&ve.h===Ze.h){let at=j.pop();Re=0&&j>=A&&Lw[this.text.charCodeAt(j)];j--)R--;this.text=this.text.substring(A,R),this.sectionIndex=this.sectionIndex.slice(A,R)}substring(A,R){let j=new S1;return j.text=this.text.substring(A,R),j.sectionIndex=this.sectionIndex.slice(A,R),j.sections=this.sections,j}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((A,R)=>Math.max(A,this.sections[R].scale),0)}addTextSection(A,R){this.text+=A.text,this.sections.push(Vx.forText(A.scale,A.fontStack||R));let j=this.sections.length-1;for(let te=0;te=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hx(D,A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr){let Pr=S1.fromFeature(D,te),$r;Ft===i.ah.vertical&&Pr.verticalizePunctuation();let{processBidirectionalText:ni,processStyledBidirectionalText:Ri}=vs;if(ni&&Pr.sections.length===1){$r=[];let Zi=ni(Pr.toString(),M1(Pr,at,ue,A,j,sr));for(let ta of Zi){let Va=new S1;Va.text=ta,Va.sections=Pr.sections;for(let Io=0;Io0&&ep>xf&&(xf=ep)}else{let oc=Va[Cl.fontStack],If=oc&&oc[Tu];if(If&&If.rect)I1=If.rect,qc=If.metrics;else{let ep=ta[Cl.fontStack],gg=ep&&ep[Tu];if(!gg)continue;qc=gg.metrics}Dv=(fh-Cl.scale)*kl}Qv?(Zi.verticalizable=!0,Rh.push({glyph:Tu,imageName:p0,x:Uo,y:wu+Dv,vertical:Qv,scale:Cl.scale,fontStack:Cl.fontStack,sectionIndex:qu,metrics:qc,rect:I1}),Uo+=Gp*Cl.scale+Tn):(Rh.push({glyph:Tu,imageName:p0,x:Uo,y:wu+Dv,vertical:Qv,scale:Cl.scale,fontStack:Cl.fontStack,sectionIndex:qu,metrics:qc,rect:I1}),Uo+=qc.advance*Cl.scale+Tn)}Rh.length!==0&&(hu=Math.max(Uo-Tn,hu),sm(Rh,0,Rh.length-1,$v,xf)),Uo=0;let Iv=Hn*fh+xf;rd.lineOffset=Math.max(xf,Td),wu+=Iv,uh=Math.max(Iv,uh),++td}var ch;let Ud=wu-lh,{horizontalAlign:Vd,verticalAlign:Hd}=Iw(lo);(function(rf,fh,Td,rd,Rh,xf,Iv,lv,Cl){let qu=(fh-Td)*Rh,Tu=0;Tu=xf!==Iv?-lv*rd-lh:(-rd*Cl+.5)*Iv;for(let Dv of rf)for(let qc of Dv.positionedGlyphs)qc.x+=qu,qc.y+=Tu})(Zi.positionedLines,$v,Vd,Hd,hu,uh,Hn,Ud,La.length),Zi.top+=-Hd*Ud,Zi.bottom=Zi.top+Ud,Zi.left+=-Vd*hu,Zi.right=Zi.left+hu}(ki,A,R,j,$r,ve,Re,Ze,Ft,at,Qt,Tr),!function(Zi){for(let ta of Zi)if(ta.positionedGlyphs.length!==0)return!1;return!0}(pi)&&ki}let Lw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},O9={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},B9={40:!0};function fC(D,A,R,j,te,ue){if(A.imageName){let ve=j[A.imageName];return ve?ve.displaySize[0]*A.scale*kl/ue+te:0}{let ve=R[A.fontStack],Re=ve&&ve[D];return Re?Re.metrics.advance*A.scale+te:0}}function hC(D,A,R,j){let te=Math.pow(D-A,2);return j?D=0,at=0;for(let Ft=0;Ftat){let Tt=Math.ceil(ue/at);te*=Tt/ve,ve=Tt}return{x1:j,y1:te,x2:j+ue,y2:te+ve}}function pC(D,A,R,j,te,ue){let ve=D.image,Re;if(ve.content){let $r=ve.content,ni=ve.pixelRatio||1;Re=[$r[0]/ni,$r[1]/ni,ve.displaySize[0]-$r[2]/ni,ve.displaySize[1]-$r[3]/ni]}let Ze=A.left*ue,at=A.right*ue,Tt,Ft,Qt,sr;R==="width"||R==="both"?(sr=te[0]+Ze-j[3],Ft=te[0]+at+j[1]):(sr=te[0]+(Ze+at-ve.displaySize[0])/2,Ft=sr+ve.displaySize[0]);let Tr=A.top*ue,Pr=A.bottom*ue;return R==="height"||R==="both"?(Tt=te[1]+Tr-j[0],Qt=te[1]+Pr+j[2]):(Tt=te[1]+(Tr+Pr-ve.displaySize[1])/2,Qt=Tt+ve.displaySize[1]),{image:ve,top:Tt,right:Ft,bottom:Qt,left:sr,collisionPadding:Re}}let jx=255,v0=128,lm=jx*v0;function gC(D,A){let{expression:R}=A;if(R.kind==="constant")return{kind:"constant",layoutSize:R.evaluate(new Ko(D+1))};if(R.kind==="source")return{kind:"source"};{let{zoomStops:j,interpolationType:te}=R,ue=0;for(;ueve.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=Un([]),this.placementViewportMatrix=Un([]);let R=this.layers[0]._unevaluatedLayout._values;this.textSizeData=gC(this.zoom,R["text-size"]),this.iconSizeData=gC(this.zoom,R["icon-size"]);let j=this.layers[0].layout,te=j.get("symbol-sort-key"),ue=j.get("symbol-z-order");this.canOverlap=nS(j,"text-overlap","text-allow-overlap")!=="never"||nS(j,"icon-overlap","icon-allow-overlap")!=="never"||j.get("text-ignore-placement")||j.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,j.get("symbol-placement")==="point"&&(this.writingModes=j.get("text-writing-mode").map(ve=>i.ah[ve])),this.stateDependentLayerIds=this.layers.filter(ve=>ve.isStateDependent()).map(ve=>ve.id),this.sourceID=A.sourceID}createArrays(){this.text=new sS(new _s(this.layers,this.zoom,A=>/^text/.test(A))),this.icon=new sS(new _s(this.layers,this.zoom,A=>/^icon/.test(A))),this.glyphOffsetArray=new To,this.lineVertexArray=new Wa,this.symbolInstances=new Ga,this.textAnchorOffsets=new Do}calculateGlyphDependencies(A,R,j,te,ue){for(let ve=0;ve0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),Tt=Ze.value.kind!=="constant"||!!Ze.value.value||Object.keys(Ze.parameters).length>0,Ft=ue.get("symbol-sort-key");if(this.features=[],!at&&!Tt)return;let Qt=R.iconDependencies,sr=R.glyphDependencies,Tr=R.availableImages,Pr=new Ko(this.zoom);for(let{feature:$r,id:ni,index:Ri,sourceLayerIndex:pi}of A){let ki=te._featureFilter.needGeometry,Zi=xl($r,ki);if(!te._featureFilter.filter(Pr,Zi,j))continue;let ta,Va;if(ki||(Zi.geometry=js($r)),at){let La=te.getValueAndResolveTokens("text-field",Zi,j,Tr),Hn=Zr.factory(La),lo=this.hasRTLText=this.hasRTLText||oS(Hn);(!lo||vs.getRTLTextPluginStatus()==="unavailable"||lo&&vs.isParsed())&&(ta=nm(Hn,te,Zi))}if(Tt){let La=te.getValueAndResolveTokens("icon-image",Zi,j,Tr);Va=La instanceof Mi?La:Mi.fromString(La)}if(!ta&&!Va)continue;let Io=this.sortFeaturesByKey?Ft.evaluate(Zi,{},j):void 0;if(this.features.push({id:ni,text:ta,icon:Va,index:Ri,sourceLayerIndex:pi,geometry:Zi.geometry,properties:$r.properties,type:U9[$r.type],sortKey:Io}),Va&&(Qt[Va.name]=!0),ta){let La=ve.evaluate(Zi,{},j).join(","),Hn=ue.get("text-rotation-alignment")!=="viewport"&&ue.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let lo of ta.sections)if(lo.image)Qt[lo.image.name]=!0;else{let $a=Ua(ta.toString()),Xa=lo.fontStack||La,Tn=sr[Xa]=sr[Xa]||{};this.calculateGlyphDependencies(lo.text,Tn,Hn,this.allowVerticalPlacement,$a)}}}ue.get("symbol-placement")==="line"&&(this.features=function($r){let ni={},Ri={},pi=[],ki=0;function Zi(La){pi.push($r[La]),ki++}function ta(La,Hn,lo){let $a=Ri[La];return delete Ri[La],Ri[Hn]=$a,pi[$a].geometry[0].pop(),pi[$a].geometry[0]=pi[$a].geometry[0].concat(lo[0]),$a}function Va(La,Hn,lo){let $a=ni[Hn];return delete ni[Hn],ni[La]=$a,pi[$a].geometry[0].shift(),pi[$a].geometry[0]=lo[0].concat(pi[$a].geometry[0]),$a}function Io(La,Hn,lo){let $a=lo?Hn[0][Hn[0].length-1]:Hn[0][0];return`${La}:${$a.x}:${$a.y}`}for(let La=0;La<$r.length;La++){let Hn=$r[La],lo=Hn.geometry,$a=Hn.text?Hn.text.toString():null;if(!$a){Zi(La);continue}let Xa=Io($a,lo),Tn=Io($a,lo,!0);if(Xa in Ri&&Tn in ni&&Ri[Xa]!==ni[Tn]){let bo=Va(Xa,Tn,lo),Ya=ta(Xa,Tn,pi[bo].geometry);delete ni[Xa],delete Ri[Tn],Ri[Io($a,pi[Ya].geometry,!0)]=Ya,pi[bo].geometry=null}else Xa in Ri?ta(Xa,Tn,lo):Tn in ni?Va(Xa,Tn,lo):(Zi(La),ni[Xa]=ki-1,Ri[Tn]=ki-1)}return pi.filter(La=>La.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort(($r,ni)=>$r.sortKey-ni.sortKey)}update(A,R,j){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(A,R,this.layers,j),this.icon.programConfigurations.updatePaintArrays(A,R,this.layers,j))}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,R){let j=this.lineVertexArray.length;if(A.segment!==void 0){let te=A.dist(R[A.segment+1]),ue=A.dist(R[A.segment]),ve={};for(let Re=A.segment+1;Re=0;Re--)ve[Re]={x:R[Re].x,y:R[Re].y,tileUnitDistanceFromAnchor:ue},Re>0&&(ue+=R[Re-1].dist(R[Re]));for(let Re=0;Re0}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,R){let j=A.placedSymbolArray.get(R),te=j.vertexStartIndex+4*j.numGlyphs;for(let ue=j.vertexStartIndex;uete[Re]-te[Ze]||ue[Ze]-ue[Re]),ve}addToSortKeyRanges(A,R){let j=this.sortKeyRanges[this.sortKeyRanges.length-1];j&&j.sortKey===R?j.symbolInstanceEnd=A+1:this.sortKeyRanges.push({sortKey:R,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 R of this.symbolInstanceIndexes){let j=this.symbolInstances.get(R);this.featureSortOrder.push(j.featureIndex),[j.rightJustifiedTextSymbolIndex,j.centerJustifiedTextSymbolIndex,j.leftJustifiedTextSymbolIndex].forEach((te,ue,ve)=>{te>=0&&ve.indexOf(te)===ue&&this.addIndicesForPlacedSymbol(this.text,te)}),j.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,j.verticalPlacedTextSymbolIndex),j.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,j.placedIconSymbolIndex),j.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,j.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let tf,Wx;mi("SymbolBucket",E1,{omit:["layers","collisionBoxArray","features","compareText"]}),E1.MAX_GLYPHS=65535,E1.addDynamicAttributes=aS;var Rw={get paint(){return Wx=Wx||new le({"icon-opacity":new eo(ce.paint_symbol["icon-opacity"]),"icon-color":new eo(ce.paint_symbol["icon-color"]),"icon-halo-color":new eo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new eo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new eo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Ra(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ra(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new eo(ce.paint_symbol["text-opacity"]),"text-color":new eo(ce.paint_symbol["text-color"],{runtimeType:Ht,getOverride:D=>D.textColor,hasOverride:D=>!!D.textColor}),"text-halo-color":new eo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new eo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new eo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Ra(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Ra(ce.paint_symbol["text-translate-anchor"])})},get layout(){return tf=tf||new le({"symbol-placement":new Ra(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Ra(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ra(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new eo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ra(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ra(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ra(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ra(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ra(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ra(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new eo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Ra(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ra(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new eo(ce.layout_symbol["icon-image"]),"icon-rotate":new eo(ce.layout_symbol["icon-rotate"]),"icon-padding":new eo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Ra(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new eo(ce.layout_symbol["icon-offset"]),"icon-anchor":new eo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ra(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ra(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ra(ce.layout_symbol["text-rotation-alignment"]),"text-field":new eo(ce.layout_symbol["text-field"]),"text-font":new eo(ce.layout_symbol["text-font"]),"text-size":new eo(ce.layout_symbol["text-size"]),"text-max-width":new eo(ce.layout_symbol["text-max-width"]),"text-line-height":new Ra(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new eo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new eo(ce.layout_symbol["text-justify"]),"text-radial-offset":new eo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ra(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new eo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new eo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Ra(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Ra(ce.layout_symbol["text-writing-mode"]),"text-rotate":new eo(ce.layout_symbol["text-rotate"]),"text-padding":new Ra(ce.layout_symbol["text-padding"]),"text-keep-upright":new Ra(ce.layout_symbol["text-keep-upright"]),"text-transform":new eo(ce.layout_symbol["text-transform"]),"text-offset":new eo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Ra(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Ra(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Ra(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Ra(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:Lt,this.defaultValue=A}evaluate(A){if(A.formattedSection){let R=this.defaultValue.property.overrides;if(R&&R.hasOverride(A.formattedSection))return R.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}}mi("FormatSectionOverride",Zx,{omit:["defaultValue"]});class uy extends B{constructor(A){super(A,Rw)}recalculate(A,R){if(super.recalculate(A,R),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 j=this.layout.get("text-writing-mode");if(j){let te=[];for(let ue of j)te.indexOf(ue)<0&&te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(A,R,j,te){let ue=this.layout.get(A).evaluate(R,{},j,te),ve=this._unevaluatedLayout._values[A];return ve.isDataDriven()||Lc(ve.value)||!ue?ue:function(Re,Ze){return Ze.replace(/{([^{}]+)}/g,(at,Tt)=>Re&&Tt in Re?String(Re[Tt]):"")}(R.properties,ue)}createBucket(A){return new E1(A)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let A of Rw.paint.overridableProperties){if(!uy.hasPaintOverride(this.layout,A))continue;let R=this.paint.get(A),j=new Zx(R),te=new Pu(j,R.property.specification),ue=null;ue=R.value.kind==="constant"||R.value.kind==="source"?new Xc("source",te):new ic("composite",te,R.value.zoomStops),this.paint._values[A]=new Ru(R.property,ue,R.parameters)}}_handleOverridablePaintPropertyUpdate(A,R,j){return!(!this.layout||R.isDataDriven()||j.isDataDriven())&&uy.hasPaintOverride(this.layout,A)}static hasPaintOverride(A,R){let j=A.get("text-field"),te=Rw.paint.properties[R],ue=!1,ve=Re=>{for(let Ze of Re)if(te.overrides&&te.overrides.hasOverride(Ze))return void(ue=!0)};if(j.value.kind==="constant"&&j.value.value instanceof Zr)ve(j.value.value.sections);else if(j.value.kind==="source"){let Re=at=>{ue||(at instanceof jn&&Ki(at.value)===Br?ve(at.value.sections):at instanceof $l?ve(at.sections):at.eachChild(Re))},Ze=j.value;Ze._styleExpression&&Re(Ze._styleExpression.expression)}return ue}}let mC;var Xx={get paint(){return mC=mC||new le({"background-color":new Ra(ce.paint_background["background-color"]),"background-pattern":new yc(ce.paint_background["background-pattern"]),"background-opacity":new Ra(ce.paint_background["background-opacity"])})}};class H9 extends B{constructor(A){super(A,Xx)}}let lS;var yC={get paint(){return lS=lS||new le({"raster-opacity":new Ra(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ra(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ra(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ra(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Ra(ce.paint_raster["raster-saturation"]),"raster-contrast":new Ra(ce.paint_raster["raster-contrast"]),"raster-resampling":new Ra(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Ra(ce.paint_raster["raster-fade-duration"])})}};class Yx extends B{constructor(A){super(A,yC)}}class uS extends B{constructor(A){super(A,{}),this.onAdd=R=>{this.implementation.onAdd&&this.implementation.onAdd(R,R.painter.context.gl)},this.onRemove=R=>{this.implementation.onRemove&&this.implementation.onRemove(R,R.painter.context.gl)},this.implementation=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 cS{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 fS=63710088e-1;class dg{constructor(A,R){if(isNaN(A)||isNaN(R))throw new Error(`Invalid LngLat object: (${A}, ${R})`);if(this.lng=+A,this.lat=+R,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 R=Math.PI/180,j=this.lat*R,te=A.lat*R,ue=Math.sin(j)*Math.sin(te)+Math.cos(j)*Math.cos(te)*Math.cos((A.lng-this.lng)*R);return fS*Math.acos(Math.min(ue,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 k1=2*Math.PI*fS;function _C(D){return k1*Math.cos(D*Math.PI/180)}function zw(D){return(180+D)/360}function xC(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function Fw(D,A){return D/_C(A)}function Kx(D){return 360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90}class Jx{constructor(A,R,j=0){this.x=+A,this.y=+R,this.z=+j}static fromLngLat(A,R=0){let j=dg.convert(A);return new Jx(zw(j.lng),xC(j.lat),Fw(R,j.lat))}toLngLat(){return new dg(360*this.x-180,Kx(this.y))}toAltitude(){return this.z*_C(Kx(this.y))}meterInMercatorCoordinateUnits(){return 1/k1*(A=Kx(this.y),1/Math.cos(A*Math.PI/180));var A}}function gp(D,A,R){var j=2*Math.PI*6378137/256/Math.pow(2,R);return[D*j-2*Math.PI*6378137/2,A*j-2*Math.PI*6378137/2]}class hS{constructor(A,R,j){if(!function(te,ue,ve){return!(te<0||te>25||ve<0||ve>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(A,R,j))throw new Error(`x=${R}, y=${j}, 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=R,this.y=j,this.key=$x(0,A,A,R,j)}equals(A){return this.z===A.z&&this.x===A.x&&this.y===A.y}url(A,R,j){let te=(ve=this.y,Re=this.z,Ze=gp(256*(ue=this.x),256*(ve=Math.pow(2,Re)-ve-1),Re),at=gp(256*(ue+1),256*(ve+1),Re),Ze[0]+","+Ze[1]+","+at[0]+","+at[1]);var ue,ve,Re,Ze,at;let Tt=function(Ft,Qt,sr){let Tr,Pr="";for(let $r=Ft;$r>0;$r--)Tr=1<<$r-1,Pr+=(Qt&Tr?1:0)+(sr&Tr?2:0);return Pr}(this.z,this.x,this.y);return A[(this.x+this.y)%A.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(j==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,R>1?"@2x":"").replace(/{quadkey}/g,Tt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(A){let R=this.z-A.z;return R>0&&A.x===this.x>>R&&A.y===this.y>>R}getTilePoint(A){let R=Math.pow(2,this.z);return new u((A.x*R-this.x)*za,(A.y*R-this.y)*za)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bC{constructor(A,R){this.wrap=A,this.canonical=R,this.key=$x(A,R.z,R.z,R.x,R.y)}}class Jv{constructor(A,R,j,te,ue){if(A= z; overscaledZ = ${A}; z = ${j}`);this.overscaledZ=A,this.wrap=R,this.canonical=new hS(j,+te,+ue),this.key=$x(R,A,j,te,ue)}clone(){return new Jv(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 R=this.canonical.z-A;return A>this.canonical.z?new Jv(A,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jv(A,this.wrap,A,this.canonical.x>>R,this.canonical.y>>R)}calculateScaledKey(A,R){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let j=this.canonical.z-A;return A>this.canonical.z?$x(this.wrap*+R,A,this.canonical.z,this.canonical.x,this.canonical.y):$x(this.wrap*+R,A,A,this.canonical.x>>j,this.canonical.y>>j)}isChildOf(A){if(A.wrap!==this.wrap)return!1;let R=this.canonical.z-A.canonical.z;return A.overscaledZ===0||A.overscaledZ>R&&A.canonical.y===this.canonical.y>>R}children(A){if(this.overscaledZ>=A)return[new Jv(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let R=this.canonical.z+1,j=2*this.canonical.x,te=2*this.canonical.y;return[new Jv(R,this.wrap,R,j,te),new Jv(R,this.wrap,R,j+1,te),new Jv(R,this.wrap,R,j,te+1),new Jv(R,this.wrap,R,j+1,te+1)]}isLessThan(A){return this.wrapA.wrap)&&(this.overscaledZA.overscaledZ)&&(this.canonical.xA.canonical.x)&&this.canonical.ythis.max&&(this.max=Ft),Ft=this.dim+1||R<-1||R>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(R+1)*this.stride+(A+1)}unpack(A,R,j){return A*this.redFactor+R*this.greenFactor+j*this.blueFactor-this.baseShift}getPixels(){return new Jn({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(A,R,j){if(this.dim!==A.dim)throw new Error("dem dimension mismatch");let te=R*this.dim,ue=R*this.dim+this.dim,ve=j*this.dim,Re=j*this.dim+this.dim;switch(R){case-1:te=ue-1;break;case 1:ue=te+1}switch(j){case-1:ve=Re-1;break;case 1:Re=ve+1}let Ze=-R*this.dim,at=-j*this.dim;for(let Tt=ve;Tt=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 dS{constructor(A,R,j,te,ue){this.type="Feature",this._vectorTileFeature=A,A._z=R,A._x=j,A._y=te,this.properties=A.properties,this.id=ue}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 R in this)R!=="_geometry"&&R!=="_vectorTileFeature"&&(A[R]=this[R]);return A}}class cy{constructor(A,R){this.tileID=A,this.x=A.canonical.x,this.y=A.canonical.y,this.z=A.canonical.z,this.grid=new qi(za,16,0),this.grid3D=new qi(za,16,0),this.featureIndexArray=new As,this.promoteId=R}insert(A,R,j,te,ue,ve){let Re=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(j,te,ue);let Ze=ve?this.grid3D:this.grid;for(let at=0;at=0&&Ft[3]>=0&&Ze.insert(Re,Ft[0],Ft[1],Ft[2],Ft[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ei.VectorTile(new tS(this.rawTileData)).layers,this.sourceLayerCoder=new TC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(A,R,j,te){this.loadVTLayers();let ue=A.params||{},ve=za/A.tileSize/A.scale,Re=Pc(ue.filter),Ze=A.queryGeometry,at=A.queryPadding*ve,Tt=SC(Ze),Ft=this.grid.query(Tt.minX-at,Tt.minY-at,Tt.maxX+at,Tt.maxY+at),Qt=SC(A.cameraQueryGeometry),sr=this.grid3D.query(Qt.minX-at,Qt.minY-at,Qt.maxX+at,Qt.maxY+at,($r,ni,Ri,pi)=>function(ki,Zi,ta,Va,Io){for(let Hn of ki)if(Zi<=Hn.x&&ta<=Hn.y&&Va>=Hn.x&&Io>=Hn.y)return!0;let La=[new u(Zi,ta),new u(Zi,Io),new u(Va,Io),new u(Va,ta)];if(ki.length>2){for(let Hn of La)if(On(ki,Hn))return!0}for(let Hn=0;Hn(pi||(pi=js(ki)),Zi.queryIntersectsFeature(Ze,ki,ta,pi,this.z,A.transform,ve,A.pixelPosMatrix)))}return Tr}loadMatchingFeature(A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft){let Qt=this.bucketLayerIDs[R];if(ve&&!function($r,ni){for(let Ri=0;Ri<$r.length;Ri++)if(ni.indexOf($r[Ri])>=0)return!0;return!1}(ve,Qt))return;let sr=this.sourceLayerCoder.decode(j),Tr=this.vtLayers[sr].feature(te);if(ue.needGeometry){let $r=xl(Tr,!0);if(!ue.filter(new Ko(this.tileID.overscaledZ),$r,this.tileID.canonical))return}else if(!ue.filter(new Ko(this.tileID.overscaledZ),Tr))return;let Pr=this.getId(Tr,sr);for(let $r=0;$r{let Re=A instanceof Rc?A.get(ve):null;return Re&&Re.evaluate?Re.evaluate(R,j,te):Re})}function SC(D){let A=1/0,R=1/0,j=-1/0,te=-1/0;for(let ue of D)A=Math.min(A,ue.x),R=Math.min(R,ue.y),j=Math.max(j,ue.x),te=Math.max(te,ue.y);return{minX:A,minY:R,maxX:j,maxY:te}}function G9(D,A){return A-D}function MC(D,A,R,j,te){let ue=[];for(let ve=0;ve=j&&Ft.x>=j||(Tt.x>=j?Tt=new u(j,Tt.y+(j-Tt.x)/(Ft.x-Tt.x)*(Ft.y-Tt.y))._round():Ft.x>=j&&(Ft=new u(j,Tt.y+(j-Tt.x)/(Ft.x-Tt.x)*(Ft.y-Tt.y))._round()),Tt.y>=te&&Ft.y>=te||(Tt.y>=te?Tt=new u(Tt.x+(te-Tt.y)/(Ft.y-Tt.y)*(Ft.x-Tt.x),te)._round():Ft.y>=te&&(Ft=new u(Tt.x+(te-Tt.y)/(Ft.y-Tt.y)*(Ft.x-Tt.x),te)._round()),Ze&&Tt.equals(Ze[Ze.length-1])||(Ze=[Tt],ue.push(Ze)),Ze.push(Ft)))))}}return ue}mi("FeatureIndex",cy,{omit:["rawTileData","sourceLayerCoder"]});class vg extends u{constructor(A,R,j,te){super(A,R),this.angle=j,te!==void 0&&(this.segment=te)}clone(){return new vg(this.x,this.y,this.angle,this.segment)}}function vS(D,A,R,j,te){if(A.segment===void 0||R===0)return!0;let ue=A,ve=A.segment+1,Re=0;for(;Re>-R/2;){if(ve--,ve<0)return!1;Re-=D[ve].dist(ue),ue=D[ve]}Re+=D[ve].dist(D[ve+1]),ve++;let Ze=[],at=0;for(;Rej;)at-=Ze.shift().angleDelta;if(at>te)return!1;ve++,Re+=Tt.dist(Ft)}return!0}function EC(D){let A=0;for(let R=0;Rat){let Tr=(at-Ze)/sr,Pr=Mo.number(Ft.x,Qt.x,Tr),$r=Mo.number(Ft.y,Qt.y,Tr),ni=new vg(Pr,$r,Qt.angleTo(Ft),Tt);return ni._round(),!ve||vS(D,ni,Re,ve,A)?ni:void 0}Ze+=sr}}function W9(D,A,R,j,te,ue,ve,Re,Ze){let at=kC(j,ue,ve),Tt=CC(j,te),Ft=Tt*ve,Qt=D[0].x===0||D[0].x===Ze||D[0].y===0||D[0].y===Ze;return A-Ft=0&&ki=0&&Zi=0&&Qt+at<=Tt){let ta=new vg(ki,Zi,Ri,Tr);ta._round(),j&&!vS(D,ta,ue,j,te)||sr.push(ta)}}Ft+=ni}return Re||sr.length||ve||(sr=LC(D,Ft/2,R,j,te,ue,ve,!0,Ze)),sr}mi("Anchor",vg);let C1=wd;function PC(D,A,R,j){let te=[],ue=D.image,ve=ue.pixelRatio,Re=ue.paddedRect.w-2*C1,Ze=ue.paddedRect.h-2*C1,at={x1:D.left,y1:D.top,x2:D.right,y2:D.bottom},Tt=ue.stretchX||[[0,Re]],Ft=ue.stretchY||[[0,Ze]],Qt=(Tn,bo)=>Tn+bo[1]-bo[0],sr=Tt.reduce(Qt,0),Tr=Ft.reduce(Qt,0),Pr=Re-sr,$r=Ze-Tr,ni=0,Ri=sr,pi=0,ki=Tr,Zi=0,ta=Pr,Va=0,Io=$r;if(ue.content&&j){let Tn=ue.content,bo=Tn[2]-Tn[0],Ya=Tn[3]-Tn[1];(ue.textFitWidth||ue.textFitHeight)&&(at=vC(D)),ni=pg(Tt,0,Tn[0]),pi=pg(Ft,0,Tn[1]),Ri=pg(Tt,Tn[0],Tn[2]),ki=pg(Ft,Tn[1],Tn[3]),Zi=Tn[0]-ni,Va=Tn[1]-pi,ta=bo-Ri,Io=Ya-ki}let La=at.x1,Hn=at.y1,lo=at.x2-La,$a=at.y2-Hn,Xa=(Tn,bo,Ya,Uo)=>{let wu=qw(Tn.stretch-ni,Ri,lo,La),hu=L1(Tn.fixed-Zi,ta,Tn.stretch,sr),uh=qw(bo.stretch-pi,ki,$a,Hn),$v=L1(bo.fixed-Va,Io,bo.stretch,Tr),td=qw(Ya.stretch-ni,Ri,lo,La),ch=L1(Ya.fixed-Zi,ta,Ya.stretch,sr),Ud=qw(Uo.stretch-pi,ki,$a,Hn),Vd=L1(Uo.fixed-Va,Io,Uo.stretch,Tr),Hd=new u(wu,uh),rf=new u(td,uh),fh=new u(td,Ud),Td=new u(wu,Ud),rd=new u(hu/ve,$v/ve),Rh=new u(ch/ve,Vd/ve),xf=A*Math.PI/180;if(xf){let Cl=Math.sin(xf),qu=Math.cos(xf),Tu=[qu,-Cl,Cl,qu];Hd._matMult(Tu),rf._matMult(Tu),Td._matMult(Tu),fh._matMult(Tu)}let Iv=Tn.stretch+Tn.fixed,lv=bo.stretch+bo.fixed;return{tl:Hd,tr:rf,bl:Td,br:fh,tex:{x:ue.paddedRect.x+C1+Iv,y:ue.paddedRect.y+C1+lv,w:Ya.stretch+Ya.fixed-Iv,h:Uo.stretch+Uo.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:rd,pixelOffsetBR:Rh,minFontScaleX:ta/ve/lo,minFontScaleY:Io/ve/$a,isSDF:R}};if(j&&(ue.stretchX||ue.stretchY)){let Tn=IC(Tt,Pr,sr),bo=IC(Ft,$r,Tr);for(let Ya=0;Ya0&&(Pr=Math.max(10,Pr),this.circleDiameter=Pr)}else{let Qt=!((Ft=ve.image)===null||Ft===void 0)&&Ft.content&&(ve.image.textFitWidth||ve.image.textFitHeight)?vC(ve):{x1:ve.left,y1:ve.top,x2:ve.right,y2:ve.bottom};Qt.y1=Qt.y1*Re-Ze[0],Qt.y2=Qt.y2*Re+Ze[2],Qt.x1=Qt.x1*Re-Ze[3],Qt.x2=Qt.x2*Re+Ze[1];let sr=ve.collisionPadding;if(sr&&(Qt.x1-=sr[0]*Re,Qt.y1-=sr[1]*Re,Qt.x2+=sr[2]*Re,Qt.y2+=sr[3]*Re),Tt){let Tr=new u(Qt.x1,Qt.y1),Pr=new u(Qt.x2,Qt.y1),$r=new u(Qt.x1,Qt.y2),ni=new u(Qt.x2,Qt.y2),Ri=Tt*Math.PI/180;Tr._rotate(Ri),Pr._rotate(Ri),$r._rotate(Ri),ni._rotate(Ri),Qt.x1=Math.min(Tr.x,Pr.x,$r.x,ni.x),Qt.x2=Math.max(Tr.x,Pr.x,$r.x,ni.x),Qt.y1=Math.min(Tr.y,Pr.y,$r.y,ni.y),Qt.y2=Math.max(Tr.y,Pr.y,$r.y,ni.y)}A.emplaceBack(R.x,R.y,Qt.x1,Qt.y1,Qt.x2,Qt.y2,j,te,ue)}this.boxEndIndex=A.length}}class Hp{constructor(A=[],R=(j,te)=>jte?1:0){if(this.data=A,this.length=this.data.length,this.compare=R,this.length>0)for(let j=(this.length>>1)-1;j>=0;j--)this._down(j)}push(A){this.data.push(A),this._up(this.length++)}pop(){if(this.length===0)return;let A=this.data[0],R=this.data.pop();return--this.length>0&&(this.data[0]=R,this._down(0)),A}peek(){return this.data[0]}_up(A){let{data:R,compare:j}=this,te=R[A];for(;A>0;){let ue=A-1>>1,ve=R[ue];if(j(te,ve)>=0)break;R[A]=ve,A=ue}R[A]=te}_down(A){let{data:R,compare:j}=this,te=this.length>>1,ue=R[A];for(;A=0)break;R[A]=R[ve],A=ve}R[A]=ue}}function Z9(D,A=1,R=!1){let j=1/0,te=1/0,ue=-1/0,ve=-1/0,Re=D[0];for(let sr=0;srue)&&(ue=Tr.x),(!sr||Tr.y>ve)&&(ve=Tr.y)}let Ze=Math.min(ue-j,ve-te),at=Ze/2,Tt=new Hp([],X9);if(Ze===0)return new u(j,te);for(let sr=j;srFt.d||!Ft.d)&&(Ft=sr,R&&console.log("found best %d after %d probes",Math.round(1e4*sr.d)/1e4,Qt)),sr.max-Ft.d<=A||(at=sr.h/2,Tt.push(new P1(sr.p.x-at,sr.p.y-at,at,D)),Tt.push(new P1(sr.p.x+at,sr.p.y-at,at,D)),Tt.push(new P1(sr.p.x-at,sr.p.y+at,at,D)),Tt.push(new P1(sr.p.x+at,sr.p.y+at,at,D)),Qt+=4)}return R&&(console.log(`num probes: ${Qt}`),console.log(`best distance: ${Ft.d}`)),Ft.p}function X9(D,A){return A.max-D.max}function P1(D,A,R,j){this.p=new u(D,A),this.h=R,this.d=function(te,ue){let ve=!1,Re=1/0;for(let Ze=0;Zete.y!=Tr.y>te.y&&te.x<(Tr.x-sr.x)*(te.y-sr.y)/(Tr.y-sr.y)+sr.x&&(ve=!ve),Re=Math.min(Re,Bi(te,sr,Tr))}}return(ve?1:-1)*Math.sqrt(Re)}(this.p,j),this.max=this.d+this.h*Math.SQRT2}var ed;i.aq=void 0,(ed=i.aq||(i.aq={}))[ed.center=1]="center",ed[ed.left=2]="left",ed[ed.right=3]="right",ed[ed.top=4]="top",ed[ed.bottom=5]="bottom",ed[ed["top-left"]=6]="top-left",ed[ed["top-right"]=7]="top-right",ed[ed["bottom-left"]=8]="bottom-left",ed[ed["bottom-right"]=9]="bottom-right";let fm=7,fy=Number.POSITIVE_INFINITY;function pS(D,A){return A[1]!==fy?function(R,j,te){let ue=0,ve=0;switch(j=Math.abs(j),te=Math.abs(te),R){case"top-right":case"top-left":case"top":ve=te-fm;break;case"bottom-right":case"bottom-left":case"bottom":ve=-te+fm}switch(R){case"top-right":case"bottom-right":case"right":ue=-j;break;case"top-left":case"bottom-left":case"left":ue=j}return[ue,ve]}(D,A[0],A[1]):function(R,j){let te=0,ue=0;j<0&&(j=0);let ve=j/Math.SQRT2;switch(R){case"top-right":case"top-left":ue=ve-fm;break;case"bottom-right":case"bottom-left":ue=-ve+fm;break;case"bottom":ue=-j+fm;break;case"top":ue=j-fm}switch(R){case"top-right":case"bottom-right":te=-ve;break;case"top-left":case"bottom-left":te=ve;break;case"left":te=j;break;case"right":te=-j}return[te,ue]}(D,A[0])}function DC(D,A,R){var j;let te=D.layout,ue=(j=te.get("text-variable-anchor-offset"))===null||j===void 0?void 0:j.evaluate(A,{},R);if(ue){let Re=ue.values,Ze=[];for(let at=0;atQt*kl);Tt.startsWith("top")?Ft[1]-=fm:Tt.startsWith("bottom")&&(Ft[1]+=fm),Ze[at+1]=Ft}return new Si(Ze)}let ve=te.get("text-variable-anchor");if(ve){let Re;Re=D._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(A,{},R)*kl,fy]:te.get("text-offset").evaluate(A,{},R).map(at=>at*kl);let Ze=[];for(let at of ve)Ze.push(at,pS(at,Re));return new Si(Ze)}return null}function gS(D){switch(D){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Y9(D,A,R,j,te,ue,ve,Re,Ze,at,Tt){let Ft=ue.textMaxSize.evaluate(A,{});Ft===void 0&&(Ft=ve);let Qt=D.layers[0].layout,sr=Qt.get("icon-offset").evaluate(A,{},Tt),Tr=zC(R.horizontal),Pr=ve/24,$r=D.tilePixelRatio*Pr,ni=D.tilePixelRatio*Ft/24,Ri=D.tilePixelRatio*Re,pi=D.tilePixelRatio*Qt.get("symbol-spacing"),ki=Qt.get("text-padding")*D.tilePixelRatio,Zi=function(Tn,bo,Ya,Uo=1){let wu=Tn.get("icon-padding").evaluate(bo,{},Ya),hu=wu&&wu.values;return[hu[0]*Uo,hu[1]*Uo,hu[2]*Uo,hu[3]*Uo]}(Qt,A,Tt,D.tilePixelRatio),ta=Qt.get("text-max-angle")/180*Math.PI,Va=Qt.get("text-rotation-alignment")!=="viewport"&&Qt.get("symbol-placement")!=="point",Io=Qt.get("icon-rotation-alignment")==="map"&&Qt.get("symbol-placement")!=="point",La=Qt.get("symbol-placement"),Hn=pi/2,lo=Qt.get("icon-text-fit"),$a;j&&lo!=="none"&&(D.allowVerticalPlacement&&R.vertical&&($a=pC(j,R.vertical,lo,Qt.get("icon-text-fit-padding"),sr,Pr)),Tr&&(j=pC(j,Tr,lo,Qt.get("icon-text-fit-padding"),sr,Pr)));let Xa=(Tn,bo)=>{bo.x<0||bo.x>=za||bo.y<0||bo.y>=za||function(Ya,Uo,wu,hu,uh,$v,td,ch,Ud,Vd,Hd,rf,fh,Td,rd,Rh,xf,Iv,lv,Cl,qu,Tu,Dv,qc,I1){let p0=Ya.addToLineVertexArray(Uo,wu),Gp,Qv,oc,If,ep=0,gg=0,uv=0,D1=0,bS=-1,Uw=-1,g0={},hy=ui("");if(Ya.allowVerticalPlacement&&hu.vertical){let Ad=ch.layout.get("text-rotate").evaluate(qu,{},qc)+90;oc=new cm(Ud,Uo,Vd,Hd,rf,hu.vertical,fh,Td,rd,Ad),td&&(If=new cm(Ud,Uo,Vd,Hd,rf,td,xf,Iv,rd,Ad))}if(uh){let Ad=ch.layout.get("icon-rotate").evaluate(qu,{}),tp=ch.layout.get("icon-text-fit")!=="none",hm=PC(uh,Ad,Dv,tp),Gd=td?PC(td,Ad,Dv,tp):void 0;Qv=new cm(Ud,Uo,Vd,Hd,rf,uh,xf,Iv,!1,Ad),ep=4*hm.length;let Sd=Ya.iconSizeData,yp=null;Sd.kind==="source"?(yp=[v0*ch.layout.get("icon-size").evaluate(qu,{})],yp[0]>lm&&T(`${Ya.layerIds[0]}: Value for "icon-size" is >= ${jx}. Reduce your "icon-size".`)):Sd.kind==="composite"&&(yp=[v0*Tu.compositeIconSizes[0].evaluate(qu,{},qc),v0*Tu.compositeIconSizes[1].evaluate(qu,{},qc)],(yp[0]>lm||yp[1]>lm)&&T(`${Ya.layerIds[0]}: Value for "icon-size" is >= ${jx}. Reduce your "icon-size".`)),Ya.addSymbols(Ya.icon,hm,yp,Cl,lv,qu,i.ah.none,Uo,p0.lineStartIndex,p0.lineLength,-1,qc),bS=Ya.icon.placedSymbolArray.length-1,Gd&&(gg=4*Gd.length,Ya.addSymbols(Ya.icon,Gd,yp,Cl,lv,qu,i.ah.vertical,Uo,p0.lineStartIndex,p0.lineLength,-1,qc),Uw=Ya.icon.placedSymbolArray.length-1)}let zh=Object.keys(hu.horizontal);for(let Ad of zh){let tp=hu.horizontal[Ad];if(!Gp){hy=ui(tp.text);let Gd=ch.layout.get("text-rotate").evaluate(qu,{},qc);Gp=new cm(Ud,Uo,Vd,Hd,rf,tp,fh,Td,rd,Gd)}let hm=tp.positionedLines.length===1;if(uv+=RC(Ya,Uo,tp,$v,ch,rd,qu,Rh,p0,hu.vertical?i.ah.horizontal:i.ah.horizontalOnly,hm?zh:[Ad],g0,bS,Tu,qc),hm)break}hu.vertical&&(D1+=RC(Ya,Uo,hu.vertical,$v,ch,rd,qu,Rh,p0,i.ah.vertical,["vertical"],g0,Uw,Tu,qc));let $9=Gp?Gp.boxStartIndex:Ya.collisionBoxArray.length,Vw=Gp?Gp.boxEndIndex:Ya.collisionBoxArray.length,m0=oc?oc.boxStartIndex:Ya.collisionBoxArray.length,cv=oc?oc.boxEndIndex:Ya.collisionBoxArray.length,BC=Qv?Qv.boxStartIndex:Ya.collisionBoxArray.length,Q9=Qv?Qv.boxEndIndex:Ya.collisionBoxArray.length,NC=If?If.boxStartIndex:Ya.collisionBoxArray.length,eq=If?If.boxEndIndex:Ya.collisionBoxArray.length,mp=-1,tb=(Ad,tp)=>Ad&&Ad.circleDiameter?Math.max(Ad.circleDiameter,tp):tp;mp=tb(Gp,mp),mp=tb(oc,mp),mp=tb(Qv,mp),mp=tb(If,mp);let Hw=mp>-1?1:0;Hw&&(mp*=I1/kl),Ya.glyphOffsetArray.length>=E1.MAX_GLYPHS&&T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),qu.sortKey!==void 0&&Ya.addToSortKeyRanges(Ya.symbolInstances.length,qu.sortKey);let wS=DC(ch,qu,qc),[tq,rq]=function(Ad,tp){let hm=Ad.length,Gd=tp==null?void 0:tp.values;if((Gd==null?void 0:Gd.length)>0)for(let Sd=0;Sd=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,bS,Uw,hy,$9,Vw,m0,cv,BC,Q9,NC,eq,Vd,uv,D1,ep,gg,Hw,0,fh,mp,tq,rq)}(D,bo,Tn,R,j,te,$a,D.layers[0],D.collisionBoxArray,A.index,A.sourceLayerIndex,D.index,$r,[ki,ki,ki,ki],Va,Ze,Ri,Zi,Io,sr,A,ue,at,Tt,ve)};if(La==="line")for(let Tn of MC(A.geometry,0,0,za,za)){let bo=W9(Tn,pi,ta,R.vertical||Tr,j,24,ni,D.overscaling,za);for(let Ya of bo)Tr&&K9(D,Tr.text,Hn,Ya)||Xa(Tn,Ya)}else if(La==="line-center"){for(let Tn of A.geometry)if(Tn.length>1){let bo=j9(Tn,ta,R.vertical||Tr,j,24,ni);bo&&Xa(Tn,bo)}}else if(A.type==="Polygon")for(let Tn of Of(A.geometry,0)){let bo=Z9(Tn,16);Xa(Tn[0],new vg(bo.x,bo.y,0))}else if(A.type==="LineString")for(let Tn of A.geometry)Xa(Tn,new vg(Tn[0].x,Tn[0].y,0));else if(A.type==="Point")for(let Tn of A.geometry)for(let bo of Tn)Xa([bo],new vg(bo.x,bo.y,0))}function RC(D,A,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr){let Pr=function(Ri,pi,ki,Zi,ta,Va,Io,La){let Hn=Zi.layout.get("text-rotate").evaluate(Va,{})*Math.PI/180,lo=[];for(let $a of pi.positionedLines)for(let Xa of $a.positionedGlyphs){if(!Xa.rect)continue;let Tn=Xa.rect||{},bo=cC+1,Ya=!0,Uo=1,wu=0,hu=(ta||La)&&Xa.vertical,uh=Xa.metrics.advance*Xa.scale/2;if(La&&pi.verticalizable&&(wu=$a.lineOffset/2-(Xa.imageName?-(kl-Xa.metrics.width*Xa.scale)/2:(Xa.scale-1)*kl)),Xa.imageName){let Cl=Io[Xa.imageName];Ya=Cl.sdf,Uo=Cl.pixelRatio,bo=wd/Uo}let $v=ta?[Xa.x+uh,Xa.y]:[0,0],td=ta?[0,0]:[Xa.x+uh+ki[0],Xa.y+ki[1]-wu],ch=[0,0];hu&&(ch=td,td=[0,0]);let Ud=Xa.metrics.isDoubleResolution?2:1,Vd=(Xa.metrics.left-bo)*Xa.scale-uh+td[0],Hd=(-Xa.metrics.top-bo)*Xa.scale+td[1],rf=Vd+Tn.w/Ud*Xa.scale/Uo,fh=Hd+Tn.h/Ud*Xa.scale/Uo,Td=new u(Vd,Hd),rd=new u(rf,Hd),Rh=new u(Vd,fh),xf=new u(rf,fh);if(hu){let Cl=new u(-uh,uh-lh),qu=-Math.PI/2,Tu=kl/2-uh,Dv=new u(5-lh-Tu,-(Xa.imageName?Tu:0)),qc=new u(...ch);Td._rotateAround(qu,Cl)._add(Dv)._add(qc),rd._rotateAround(qu,Cl)._add(Dv)._add(qc),Rh._rotateAround(qu,Cl)._add(Dv)._add(qc),xf._rotateAround(qu,Cl)._add(Dv)._add(qc)}if(Hn){let Cl=Math.sin(Hn),qu=Math.cos(Hn),Tu=[qu,-Cl,Cl,qu];Td._matMult(Tu),rd._matMult(Tu),Rh._matMult(Tu),xf._matMult(Tu)}let Iv=new u(0,0),lv=new u(0,0);lo.push({tl:Td,tr:rd,bl:Rh,br:xf,tex:Tn,writingMode:pi.writingMode,glyphOffset:$v,sectionIndex:Xa.sectionIndex,isSDF:Ya,pixelOffsetTL:Iv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return lo}(0,R,Re,te,ue,ve,j,D.allowVerticalPlacement),$r=D.textSizeData,ni=null;$r.kind==="source"?(ni=[v0*te.layout.get("text-size").evaluate(ve,{})],ni[0]>lm&&T(`${D.layerIds[0]}: Value for "text-size" is >= ${jx}. Reduce your "text-size".`)):$r.kind==="composite"&&(ni=[v0*sr.compositeTextSizes[0].evaluate(ve,{},Tr),v0*sr.compositeTextSizes[1].evaluate(ve,{},Tr)],(ni[0]>lm||ni[1]>lm)&&T(`${D.layerIds[0]}: Value for "text-size" is >= ${jx}. Reduce your "text-size".`)),D.addSymbols(D.text,Pr,ni,Re,ue,ve,at,A,Ze.lineStartIndex,Ze.lineLength,Qt,Tr);for(let Ri of Tt)Ft[Ri]=D.text.placedSymbolArray.length-1;return 4*Pr.length}function zC(D){for(let A in D)return D[A];return null}function K9(D,A,R,j){let te=D.compareText;if(A in te){let ue=te[A];for(let ve=ue.length-1;ve>=0;ve--)if(j.dist(ue[ve])>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=FC[15&j];if(!ue)throw new Error("Unrecognized array type.");let[ve]=new Uint16Array(A,2,1),[Re]=new Uint32Array(A,4,1);return new mS(Re,ve,ue,A)}constructor(A,R=64,j=Float64Array,te){if(isNaN(A)||A<0)throw new Error(`Unpexpected numItems value: ${A}.`);this.numItems=+A,this.nodeSize=Math.min(Math.max(+R,2),65535),this.ArrayType=j,this.IndexArrayType=A<65536?Uint16Array:Uint32Array;let ue=FC.indexOf(this.ArrayType),ve=2*A*this.ArrayType.BYTES_PER_ELEMENT,Re=A*this.IndexArrayType.BYTES_PER_ELEMENT,Ze=(8-Re%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${j}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ze,2*A),this._pos=2*A,this._finished=!0):(this.data=new ArrayBuffer(8+ve+Re+Ze),this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ze,2*A),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=R,new Uint32Array(this.data,4,1)[0]=A)}add(A,R){let j=this._pos>>1;return this.ids[j]=j,this.coords[this._pos++]=A,this.coords[this._pos++]=R,j}finish(){let A=this._pos>>1;if(A!==this.numItems)throw new Error(`Added ${A} items when expected ${this.numItems}.`);return Ow(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(A,R,j,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:ve,nodeSize:Re}=this,Ze=[0,ue.length-1,0],at=[];for(;Ze.length;){let Tt=Ze.pop()||0,Ft=Ze.pop()||0,Qt=Ze.pop()||0;if(Ft-Qt<=Re){for(let $r=Qt;$r<=Ft;$r++){let ni=ve[2*$r],Ri=ve[2*$r+1];ni>=A&&ni<=j&&Ri>=R&&Ri<=te&&at.push(ue[$r])}continue}let sr=Qt+Ft>>1,Tr=ve[2*sr],Pr=ve[2*sr+1];Tr>=A&&Tr<=j&&Pr>=R&&Pr<=te&&at.push(ue[sr]),(Tt===0?A<=Tr:R<=Pr)&&(Ze.push(Qt),Ze.push(sr-1),Ze.push(1-Tt)),(Tt===0?j>=Tr:te>=Pr)&&(Ze.push(sr+1),Ze.push(Ft),Ze.push(1-Tt))}return at}within(A,R,j){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:ve}=this,Re=[0,te.length-1,0],Ze=[],at=j*j;for(;Re.length;){let Tt=Re.pop()||0,Ft=Re.pop()||0,Qt=Re.pop()||0;if(Ft-Qt<=ve){for(let $r=Qt;$r<=Ft;$r++)OC(ue[2*$r],ue[2*$r+1],A,R)<=at&&Ze.push(te[$r]);continue}let sr=Qt+Ft>>1,Tr=ue[2*sr],Pr=ue[2*sr+1];OC(Tr,Pr,A,R)<=at&&Ze.push(te[sr]),(Tt===0?A-j<=Tr:R-j<=Pr)&&(Re.push(Qt),Re.push(sr-1),Re.push(1-Tt)),(Tt===0?A+j>=Tr:R+j>=Pr)&&(Re.push(sr+1),Re.push(Ft),Re.push(1-Tt))}return Ze}}function Ow(D,A,R,j,te,ue){if(te-j<=R)return;let ve=j+te>>1;qC(D,A,ve,j,te,ue),Ow(D,A,R,j,ve-1,1-ue),Ow(D,A,R,ve+1,te,1-ue)}function qC(D,A,R,j,te,ue){for(;te>j;){if(te-j>600){let at=te-j+1,Tt=R-j+1,Ft=Math.log(at),Qt=.5*Math.exp(2*Ft/3),sr=.5*Math.sqrt(Ft*Qt*(at-Qt)/at)*(Tt-at/2<0?-1:1);qC(D,A,R,Math.max(j,Math.floor(R-Tt*Qt/at+sr)),Math.min(te,Math.floor(R+(at-Tt)*Qt/at+sr)),ue)}let ve=A[2*R+ue],Re=j,Ze=te;for(Qx(D,A,j,R),A[2*te+ue]>ve&&Qx(D,A,j,te);Reve;)Ze--}A[2*j+ue]===ve?Qx(D,A,j,Ze):(Ze++,Qx(D,A,Ze,te)),Ze<=R&&(j=Ze+1),R<=Ze&&(te=Ze-1)}}function Qx(D,A,R,j){yS(D,R,j),yS(A,2*R,2*j),yS(A,2*R+1,2*j+1)}function yS(D,A,R){let j=D[A];D[A]=D[R],D[R]=j}function OC(D,A,R,j){let te=D-R,ue=A-j;return te*te+ue*ue}var Bw;i.bg=void 0,(Bw=i.bg||(i.bg={})).create="create",Bw.load="load",Bw.fullLoad="fullLoad";let eb=null,Gf=[],_S=1e3/60,xS="loadTime",Nw="fullLoadTime",J9={mark(D){performance.mark(D)},frame(D){let A=D;eb!=null&&Gf.push(A-eb),eb=A},clearMetrics(){eb=null,Gf=[],performance.clearMeasures(xS),performance.clearMeasures(Nw);for(let D in i.bg)performance.clearMarks(i.bg[D])},getPerformanceMetrics(){performance.measure(xS,i.bg.create,i.bg.load),performance.measure(Nw,i.bg.create,i.bg.fullLoad);let D=performance.getEntriesByName(xS)[0].duration,A=performance.getEntriesByName(Nw)[0].duration,R=Gf.length,j=1/(Gf.reduce((ue,ve)=>ue+ve,0)/R/1e3),te=Gf.filter(ue=>ue>_S).reduce((ue,ve)=>ue+(ve-_S)/_S,0);return{loadTime:D,fullLoadTime:A,fps:j,percentDroppedFrames:te/(R+te)*100,totalFrames:R}}};i.$=class extends Ot{},i.A=Ln,i.B=Fi,i.C=function(D){if(V==null){let A=D.navigator?D.navigator.userAgent:null;V=!!D.safari||!(!A||!(/\b(iPad|iPhone|iPod)\b/.test(A)||A.match("Safari")&&!A.match("Chrome")))}return V},i.D=Ra,i.E=De,i.F=class{constructor(D,A){this.target=D,this.mapId=A,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cS(()=>this.process()),this.subscription=function(R,j,te,ue){return R.addEventListener(j,te,!1),{unsubscribe:()=>{R.removeEventListener(j,te,!1)}}}(this.target,"message",R=>this.receive(R)),this.globalScope=q(self)?D:window}registerMessageHandler(D,A){this.messageHandlers[D]=A}sendAsync(D,A){return new Promise((R,j)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:R,reject:j},A&&A.signal.addEventListener("abort",()=>{delete this.resolveRejects[te];let Re={id:te,type:"",origin:location.origin,targetMapId:D.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Re)},{once:!0});let ue=[],ve=Object.assign(Object.assign({},D),{id:te,sourceMapId:this.mapId,origin:location.origin,data:Ea(D.data,ue)});this.target.postMessage(ve,{transfer:ue})})}receive(D){let A=D.data,R=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[R];let j=this.abortControllers[R];return delete this.abortControllers[R],void(j&&j.abort())}if(q(self)||A.mustQueue)return this.tasks[R]=A,this.taskQueue.push(R),void this.invoker.trigger();this.processTask(R,A)}}process(){if(this.taskQueue.length===0)return;let D=this.taskQueue.shift(),A=this.tasks[D];delete this.tasks[D],this.taskQueue.length>0&&this.invoker.trigger(),A&&this.processTask(D,A)}processTask(D,A){return a(this,void 0,void 0,function*(){if(A.type===""){let te=this.resolveRejects[D];return delete this.resolveRejects[D],te?void(A.error?te.reject(qa(A.error)):te.resolve(qa(A.data))):void 0}if(!this.messageHandlers[A.type])return void this.completeTask(D,new Error(`Could not find a registered handler for ${A.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let R=qa(A.data),j=new AbortController;this.abortControllers[D]=j;try{let te=yield this.messageHandlers[A.type](A.sourceMapId,R,j);this.completeTask(D,null,te)}catch(te){this.completeTask(D,te)}})}completeTask(D,A,R){let j=[];delete this.abortControllers[D];let te={id:D,type:"",sourceMapId:this.mapId,origin:location.origin,error:A?Ea(A):null,data:Ea(R,j)};this.target.postMessage(te,{transfer:j})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=ke,i.H=function(){var D=new Ln(16);return Ln!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=0,D[12]=0,D[13]=0,D[14]=0),D[0]=1,D[5]=1,D[10]=1,D[15]=1,D},i.I=kw,i.J=function(D,A,R){var j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr=R[0],$r=R[1],ni=R[2];return A===D?(D[12]=A[0]*Pr+A[4]*$r+A[8]*ni+A[12],D[13]=A[1]*Pr+A[5]*$r+A[9]*ni+A[13],D[14]=A[2]*Pr+A[6]*$r+A[10]*ni+A[14],D[15]=A[3]*Pr+A[7]*$r+A[11]*ni+A[15]):(te=A[1],ue=A[2],ve=A[3],Re=A[4],Ze=A[5],at=A[6],Tt=A[7],Ft=A[8],Qt=A[9],sr=A[10],Tr=A[11],D[0]=j=A[0],D[1]=te,D[2]=ue,D[3]=ve,D[4]=Re,D[5]=Ze,D[6]=at,D[7]=Tt,D[8]=Ft,D[9]=Qt,D[10]=sr,D[11]=Tr,D[12]=j*Pr+Re*$r+Ft*ni+A[12],D[13]=te*Pr+Ze*$r+Qt*ni+A[13],D[14]=ue*Pr+at*$r+sr*ni+A[14],D[15]=ve*Pr+Tt*$r+Tr*ni+A[15]),D},i.K=function(D,A,R){var j=R[0],te=R[1],ue=R[2];return D[0]=A[0]*j,D[1]=A[1]*j,D[2]=A[2]*j,D[3]=A[3]*j,D[4]=A[4]*te,D[5]=A[5]*te,D[6]=A[6]*te,D[7]=A[7]*te,D[8]=A[8]*ue,D[9]=A[9]*ue,D[10]=A[10]*ue,D[11]=A[11]*ue,D[12]=A[12],D[13]=A[13],D[14]=A[14],D[15]=A[15],D},i.L=gn,i.M=function(D,A){let R={};for(let j=0;j{let A=window.document.createElement("video");return A.muted=!0,new Promise(R=>{A.onloadstart=()=>{R(A)};for(let j of D){let te=window.document.createElement("source");Ee(j)||(A.crossOrigin="Anonymous"),te.src=j,A.appendChild(te)}})},i.a4=function(){return _++},i.a5=Qi,i.a6=E1,i.a7=Pc,i.a8=xl,i.a9=dS,i.aA=function(D){if(D.type==="custom")return new uS(D);switch(D.type){case"background":return new H9(D);case"circle":return new wn(D);case"fill":return new gr(D);case"fill-extrusion":return new Ev(D);case"heatmap":return new Po(D);case"hillshade":return new $c(D);case"line":return new ay(D);case"raster":return new Yx(D);case"symbol":return new uy(D)}},i.aB=p,i.aC=function(D,A){if(!D)return[{command:"setStyle",args:[A]}];let R=[];try{if(!ct(D.version,A.version))return[{command:"setStyle",args:[A]}];ct(D.center,A.center)||R.push({command:"setCenter",args:[A.center]}),ct(D.zoom,A.zoom)||R.push({command:"setZoom",args:[A.zoom]}),ct(D.bearing,A.bearing)||R.push({command:"setBearing",args:[A.bearing]}),ct(D.pitch,A.pitch)||R.push({command:"setPitch",args:[A.pitch]}),ct(D.sprite,A.sprite)||R.push({command:"setSprite",args:[A.sprite]}),ct(D.glyphs,A.glyphs)||R.push({command:"setGlyphs",args:[A.glyphs]}),ct(D.transition,A.transition)||R.push({command:"setTransition",args:[A.transition]}),ct(D.light,A.light)||R.push({command:"setLight",args:[A.light]}),ct(D.terrain,A.terrain)||R.push({command:"setTerrain",args:[A.terrain]}),ct(D.sky,A.sky)||R.push({command:"setSky",args:[A.sky]}),ct(D.projection,A.projection)||R.push({command:"setProjection",args:[A.projection]});let j={},te=[];(function(ve,Re,Ze,at){let Tt;for(Tt in Re=Re||{},ve=ve||{})Object.prototype.hasOwnProperty.call(ve,Tt)&&(Object.prototype.hasOwnProperty.call(Re,Tt)||ot(Tt,Ze,at));for(Tt in Re)Object.prototype.hasOwnProperty.call(Re,Tt)&&(Object.prototype.hasOwnProperty.call(ve,Tt)?ct(ve[Tt],Re[Tt])||(ve[Tt].type==="geojson"&&Re[Tt].type==="geojson"&&kt(ve,Re,Tt)?qt(Ze,{command:"setGeoJSONSourceData",args:[Tt,Re[Tt].data]}):Dt(Tt,Re,Ze,at)):rt(Tt,Re,Ze))})(D.sources,A.sources,te,j);let ue=[];D.layers&&D.layers.forEach(ve=>{"source"in ve&&j[ve.source]?R.push({command:"removeLayer",args:[ve.id]}):ue.push(ve)}),R=R.concat(te),function(ve,Re,Ze){Re=Re||[];let at=(ve=ve||[]).map(Yt),Tt=Re.map(Yt),Ft=ve.reduce(xr,{}),Qt=Re.reduce(xr,{}),sr=at.slice(),Tr=Object.create(null),Pr,$r,ni,Ri,pi;for(let ki=0,Zi=0;ki@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(R,j,te,ue)=>{let ve=te||ue;return A[j]=!ve||ve.toLowerCase(),""}),A["max-age"]){let R=parseInt(A["max-age"],10);isNaN(R)?delete A["max-age"]:A["max-age"]=R}return A},i.ab=function(D,A){let R=[];for(let j in D)j in A||R.push(j);return R},i.ac=k,i.ad=function(D,A,R){var j=Math.sin(R),te=Math.cos(R),ue=A[0],ve=A[1],Re=A[2],Ze=A[3],at=A[4],Tt=A[5],Ft=A[6],Qt=A[7];return A!==D&&(D[8]=A[8],D[9]=A[9],D[10]=A[10],D[11]=A[11],D[12]=A[12],D[13]=A[13],D[14]=A[14],D[15]=A[15]),D[0]=ue*te+at*j,D[1]=ve*te+Tt*j,D[2]=Re*te+Ft*j,D[3]=Ze*te+Qt*j,D[4]=at*te-ue*j,D[5]=Tt*te-ve*j,D[6]=Ft*te-Re*j,D[7]=Qt*te-Ze*j,D},i.ae=function(D){var A=new Ln(16);return A[0]=D[0],A[1]=D[1],A[2]=D[2],A[3]=D[3],A[4]=D[4],A[5]=D[5],A[6]=D[6],A[7]=D[7],A[8]=D[8],A[9]=D[9],A[10]=D[10],A[11]=D[11],A[12]=D[12],A[13]=D[13],A[14]=D[14],A[15]=D[15],A},i.af=Za,i.ag=function(D,A){let R=0,j=0;if(D.kind==="constant")j=D.layoutSize;else if(D.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:ve}=D,Re=te?k(xo.interpolationFactor(te,A,ue,ve),0,1):0;D.kind==="camera"?j=Mo.number(D.minSize,D.maxSize,Re):R=Re}return{uSizeT:R,uSize:j}},i.ai=function(D,{uSize:A,uSizeT:R},{lowerSize:j,upperSize:te}){return D.kind==="source"?j/v0:D.kind==="composite"?Mo.number(j/v0,te/v0,R):A},i.aj=aS,i.ak=function(D,A,R,j){let te=A.y-D.y,ue=A.x-D.x,ve=j.y-R.y,Re=j.x-R.x,Ze=ve*ue-Re*te;if(Ze===0)return null;let at=(Re*(D.y-R.y)-ve*(D.x-R.x))/Ze;return new u(D.x+at*ue,D.y+at*te)},i.al=MC,i.am=xc,i.an=Un,i.ao=function(D){let A=1/0,R=1/0,j=-1/0,te=-1/0;for(let ue of D)A=Math.min(A,ue.x),R=Math.min(R,ue.y),j=Math.max(j,ue.x),te=Math.max(te,ue.y);return[A,R,j,te]},i.ap=kl,i.ar=nS,i.as=function(D,A){var R=A[0],j=A[1],te=A[2],ue=A[3],ve=A[4],Re=A[5],Ze=A[6],at=A[7],Tt=A[8],Ft=A[9],Qt=A[10],sr=A[11],Tr=A[12],Pr=A[13],$r=A[14],ni=A[15],Ri=R*Re-j*ve,pi=R*Ze-te*ve,ki=R*at-ue*ve,Zi=j*Ze-te*Re,ta=j*at-ue*Re,Va=te*at-ue*Ze,Io=Tt*Pr-Ft*Tr,La=Tt*$r-Qt*Tr,Hn=Tt*ni-sr*Tr,lo=Ft*$r-Qt*Pr,$a=Ft*ni-sr*Pr,Xa=Qt*ni-sr*$r,Tn=Ri*Xa-pi*$a+ki*lo+Zi*Hn-ta*La+Va*Io;return Tn?(D[0]=(Re*Xa-Ze*$a+at*lo)*(Tn=1/Tn),D[1]=(te*$a-j*Xa-ue*lo)*Tn,D[2]=(Pr*Va-$r*ta+ni*Zi)*Tn,D[3]=(Qt*ta-Ft*Va-sr*Zi)*Tn,D[4]=(Ze*Hn-ve*Xa-at*La)*Tn,D[5]=(R*Xa-te*Hn+ue*La)*Tn,D[6]=($r*ki-Tr*Va-ni*pi)*Tn,D[7]=(Tt*Va-Qt*ki+sr*pi)*Tn,D[8]=(ve*$a-Re*Hn+at*Io)*Tn,D[9]=(j*Hn-R*$a-ue*Io)*Tn,D[10]=(Tr*ta-Pr*ki+ni*Ri)*Tn,D[11]=(Ft*ki-Tt*ta-sr*Ri)*Tn,D[12]=(Re*La-ve*lo-Ze*Io)*Tn,D[13]=(R*lo-j*La+te*Io)*Tn,D[14]=(Pr*pi-Tr*Zi-$r*Ri)*Tn,D[15]=(Tt*Zi-Ft*pi+Qt*Ri)*Tn,D):null},i.at=gS,i.au=Iw,i.av=mS,i.aw=function(){let D={},A=ce.$version;for(let R in ce.$root){let j=ce.$root[R];if(j.required){let te=null;te=R==="version"?A:j.type==="array"?[]:{},te!=null&&(D[R]=te)}}return D},i.ax=Cn,i.ay=ie,i.az=function(D){D=D.slice();let A=Object.create(null);for(let R=0;R25||j<0||j>=1||R<0||R>=1)},i.bc=function(D,A){return D[0]=A[0],D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=A[1],D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=A[2],D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D},i.bd=class extends yt{},i.be=fS,i.bf=J9,i.bh=ge,i.bi=function(D,A){_e.REGISTERED_PROTOCOLS[D]=A},i.bj=function(D){delete _e.REGISTERED_PROTOCOLS[D]},i.bk=function(D,A){let R={};for(let te=0;teXa*kl)}let La=ve?"center":R.get("text-justify").evaluate(at,{},D.canonical),Hn=R.get("symbol-placement")==="point"?R.get("text-max-width").evaluate(at,{},D.canonical)*kl:1/0,lo=()=>{D.bucket.allowVerticalPlacement&&Ua(ki)&&(Tr.vertical=Hx(Pr,D.glyphMap,D.glyphPositions,D.imagePositions,Tt,Hn,ue,Va,"left",ta,ni,i.ah.vertical,!0,Qt,Ft))};if(!ve&&Io){let $a=new Set;if(La==="auto")for(let Tn=0;Tna(void 0,void 0,void 0,function*(){if(D.byteLength===0)return createImageBitmap(new ImageData(1,1));let A=new Blob([new Uint8Array(D)],{type:"image/png"});try{return createImageBitmap(A)}catch(R){throw new Error(`Could not load image because of ${R.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=D=>new Promise((A,R)=>{let j=new Image;j.onload=()=>{A(j),URL.revokeObjectURL(j.src),j.onload=null,window.requestAnimationFrame(()=>{j.src=X})},j.onerror=()=>R(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(D)],{type:"image/png"});j.src=D.byteLength?URL.createObjectURL(te):X}),i.g=Me,i.h=(D,A)=>Te(L(D,{type:"json"}),A),i.i=q,i.j=me,i.k=Ce,i.l=(D,A)=>Te(L(D,{type:"arrayBuffer"}),A),i.m=Te,i.n=function(D){return new tS(D).readFields(gQ,[])},i.o=Ao,i.p=iS,i.q=le,i.r=xi,i.s=Ee,i.t=Ti,i.u=fi,i.v=ce,i.w=T,i.x=function([D,A,R]){return A+=90,A*=Math.PI/180,R*=Math.PI/180,{x:D*Math.cos(A)*Math.sin(R),y:D*Math.sin(A)*Math.sin(R),z:D*Math.cos(R)}},i.y=Mo,i.z=Ko}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ne){this.keyCache={},Ne&&this.replace(Ne)}replace(Ne){this._layerConfigs={},this._layers={},this.update(Ne,[])}update(Ne,Ye){for(let Xe of Ne){this._layerConfigs[Xe.id]=Xe;let ht=this._layers[Xe.id]=i.aA(Xe);ht._featureFilter=i.a7(ht.filter),this.keyCache[Xe.id]&&delete this.keyCache[Xe.id]}for(let Xe of Ye)delete this.keyCache[Xe],delete this._layerConfigs[Xe],delete this._layers[Xe];this.familiesBySource={};let Ve=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let Xe of Ve){let ht=Xe.map(Vt=>this._layers[Vt.id]),Le=ht[0];if(Le.visibility==="none")continue;let xe=Le.source||"",Se=this.familiesBySource[xe];Se||(Se=this.familiesBySource[xe]={});let lt=Le.sourceLayer||"_geojsonTileLayer",Gt=Se[lt];Gt||(Gt=Se[lt]=[]),Gt.push(ht)}}}class o{constructor(Ne){let Ye={},Ve=[];for(let xe in Ne){let Se=Ne[xe],lt=Ye[xe]={};for(let Gt in Se){let Vt=Se[+Gt];if(!Vt||Vt.bitmap.width===0||Vt.bitmap.height===0)continue;let ar={x:0,y:0,w:Vt.bitmap.width+2,h:Vt.bitmap.height+2};Ve.push(ar),lt[Gt]={rect:ar,metrics:Vt.metrics}}}let{w:Xe,h:ht}=i.p(Ve),Le=new i.o({width:Xe||1,height:ht||1});for(let xe in Ne){let Se=Ne[xe];for(let lt in Se){let Gt=Se[+lt];if(!Gt||Gt.bitmap.width===0||Gt.bitmap.height===0)continue;let Vt=Ye[xe][lt].rect;i.o.copy(Gt.bitmap,Le,{x:0,y:0},{x:Vt.x+1,y:Vt.y+1},Gt.bitmap)}}this.image=Le,this.positions=Ye}}i.bl("GlyphAtlas",o);class s{constructor(Ne){this.tileID=new i.S(Ne.tileID.overscaledZ,Ne.tileID.wrap,Ne.tileID.canonical.z,Ne.tileID.canonical.x,Ne.tileID.canonical.y),this.uid=Ne.uid,this.zoom=Ne.zoom,this.pixelRatio=Ne.pixelRatio,this.tileSize=Ne.tileSize,this.source=Ne.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ne.showCollisionBoxes,this.collectResourceTiming=!!Ne.collectResourceTiming,this.returnDependencies=!!Ne.returnDependencies,this.promoteId=Ne.promoteId,this.inFlightDependencies=[]}parse(Ne,Ye,Ve,Xe){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ne,this.collisionBoxArray=new i.a5;let ht=new i.bm(Object.keys(Ne.layers).sort()),Le=new i.bn(this.tileID,this.promoteId);Le.bucketLayerIDs=[];let xe={},Se={featureIndex:Le,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ve},lt=Ye.familiesBySource[this.source];for(let _n in lt){let $i=Ne.layers[_n];if(!$i)continue;$i.version===1&&i.w(`Vector tile source "${this.source}" layer "${_n}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let zn=ht.encode(_n),Wn=[];for(let It=0;It<$i.length;It++){let ft=$i.feature(It),jt=Le.getId(ft,_n);Wn.push({feature:ft,id:jt,index:It,sourceLayerIndex:zn})}for(let It of lt[_n]){let ft=It[0];ft.source!==this.source&&i.w(`layer.source = ${ft.source} does not equal this.source = ${this.source}`),ft.minzoom&&this.zoom=ft.maxzoom||ft.visibility!=="none"&&(l(It,this.zoom,Ve),(xe[ft.id]=ft.createBucket({index:Le.bucketLayerIDs.length,layers:It,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:zn,sourceID:this.source})).populate(Wn,Se,this.tileID.canonical),Le.bucketLayerIDs.push(It.map(jt=>jt.id)))}}let Gt=i.aF(Se.glyphDependencies,_n=>Object.keys(_n).map(Number));this.inFlightDependencies.forEach(_n=>_n==null?void 0:_n.abort()),this.inFlightDependencies=[];let Vt=Promise.resolve({});if(Object.keys(Gt).length){let _n=new AbortController;this.inFlightDependencies.push(_n),Vt=Xe.sendAsync({type:"GG",data:{stacks:Gt,source:this.source,tileID:this.tileID,type:"glyphs"}},_n)}let ar=Object.keys(Se.iconDependencies),Qr=Promise.resolve({});if(ar.length){let _n=new AbortController;this.inFlightDependencies.push(_n),Qr=Xe.sendAsync({type:"GI",data:{icons:ar,source:this.source,tileID:this.tileID,type:"icons"}},_n)}let ai=Object.keys(Se.patternDependencies),jr=Promise.resolve({});if(ai.length){let _n=new AbortController;this.inFlightDependencies.push(_n),jr=Xe.sendAsync({type:"GI",data:{icons:ai,source:this.source,tileID:this.tileID,type:"patterns"}},_n)}let[ri,bi,nn]=yield Promise.all([Vt,Qr,jr]),Wi=new o(ri),Ni=new i.bo(bi,nn);for(let _n in xe){let $i=xe[_n];$i instanceof i.a6?(l($i.layers,this.zoom,Ve),i.bp({bucket:$i,glyphMap:ri,glyphPositions:Wi.positions,imageMap:bi,imagePositions:Ni.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):$i.hasPattern&&($i instanceof i.bq||$i instanceof i.br||$i instanceof i.bs)&&(l($i.layers,this.zoom,Ve),$i.addFeatures(Se,this.tileID.canonical,Ni.patternPositions))}return this.status="done",{buckets:Object.values(xe).filter(_n=>!_n.isEmpty()),featureIndex:Le,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Wi.image,imageAtlas:Ni,glyphMap:this.returnDependencies?ri:null,iconMap:this.returnDependencies?bi:null,glyphPositions:this.returnDependencies?Wi.positions:null}})}}function l(ut,Ne,Ye){let Ve=new i.z(Ne);for(let Xe of ut)Xe.recalculate(Ve,Ye)}class u{constructor(Ne,Ye,Ve){this.actor=Ne,this.layerIndex=Ye,this.availableImages=Ve,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ne,Ye){return i._(this,void 0,void 0,function*(){let Ve=yield i.l(Ne.request,Ye);try{return{vectorTile:new i.bt.VectorTile(new i.bu(Ve.data)),rawData:Ve.data,cacheControl:Ve.cacheControl,expires:Ve.expires}}catch(Xe){let ht=new Uint8Array(Ve.data),Le=`Unable to parse the tile at ${Ne.request.url}, `;throw Le+=ht[0]===31&&ht[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Xe.message}`,new Error(Le)}})}loadTile(Ne){return i._(this,void 0,void 0,function*(){let Ye=Ne.uid,Ve=!!(Ne&&Ne.request&&Ne.request.collectResourceTiming)&&new i.bv(Ne.request),Xe=new s(Ne);this.loading[Ye]=Xe;let ht=new AbortController;Xe.abort=ht;try{let Le=yield this.loadVectorTile(Ne,ht);if(delete this.loading[Ye],!Le)return null;let xe=Le.rawData,Se={};Le.expires&&(Se.expires=Le.expires),Le.cacheControl&&(Se.cacheControl=Le.cacheControl);let lt={};if(Ve){let Vt=Ve.finish();Vt&&(lt.resourceTiming=JSON.parse(JSON.stringify(Vt)))}Xe.vectorTile=Le.vectorTile;let Gt=Xe.parse(Le.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ye]=Xe,this.fetching[Ye]={rawTileData:xe,cacheControl:Se,resourceTiming:lt};try{let Vt=yield Gt;return i.e({rawTileData:xe.slice(0)},Vt,Se,lt)}finally{delete this.fetching[Ye]}}catch(Le){throw delete this.loading[Ye],Xe.status="done",this.loaded[Ye]=Xe,Le}})}reloadTile(Ne){return i._(this,void 0,void 0,function*(){let Ye=Ne.uid;if(!this.loaded||!this.loaded[Ye])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ve=this.loaded[Ye];if(Ve.showCollisionBoxes=Ne.showCollisionBoxes,Ve.status==="parsing"){let Xe=yield Ve.parse(Ve.vectorTile,this.layerIndex,this.availableImages,this.actor),ht;if(this.fetching[Ye]){let{rawTileData:Le,cacheControl:xe,resourceTiming:Se}=this.fetching[Ye];delete this.fetching[Ye],ht=i.e({rawTileData:Le.slice(0)},Xe,xe,Se)}else ht=Xe;return ht}if(Ve.status==="done"&&Ve.vectorTile)return Ve.parse(Ve.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ne){return i._(this,void 0,void 0,function*(){let Ye=this.loading,Ve=Ne.uid;Ye&&Ye[Ve]&&Ye[Ve].abort&&(Ye[Ve].abort.abort(),delete Ye[Ve])})}removeTile(Ne){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ne.uid]&&delete this.loaded[Ne.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ne){return i._(this,void 0,void 0,function*(){let{uid:Ye,encoding:Ve,rawImageData:Xe,redFactor:ht,greenFactor:Le,blueFactor:xe,baseShift:Se}=Ne,lt=Xe.width+2,Gt=Xe.height+2,Vt=i.b(Xe)?new i.R({width:lt,height:Gt},yield i.bw(Xe,-1,-1,lt,Gt)):Xe,ar=new i.bx(Ye,Vt,Ve,ht,Le,xe,Se);return this.loaded=this.loaded||{},this.loaded[Ye]=ar,ar})}removeTile(Ne){let Ye=this.loaded,Ve=Ne.uid;Ye&&Ye[Ve]&&delete Ye[Ve]}}function f(ut,Ne){if(ut.length!==0){h(ut[0],Ne);for(var Ye=1;Ye=Math.abs(xe)?Ye-Se+xe:xe-Se+Ye,Ye=Se}Ye+Ve>=0!=!!Ne&&ut.reverse()}var d=i.by(function ut(Ne,Ye){var Ve,Xe=Ne&&Ne.type;if(Xe==="FeatureCollection")for(Ve=0;Ve>31}function q(ut,Ne){for(var Ye=ut.loadGeometry(),Ve=ut.type,Xe=0,ht=0,Le=Ye.length,xe=0;xeut},G=Math.fround||(N=new Float32Array(1),ut=>(N[0]=+ut,N[0]));var N;let W=3,re=5,ae=6;class _e{constructor(Ne){this.options=Object.assign(Object.create(X),Ne),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ne){let{log:Ye,minZoom:Ve,maxZoom:Xe}=this.options;Ye&&console.time("total time");let ht=`prepare ${Ne.length} points`;Ye&&console.time(ht),this.points=Ne;let Le=[];for(let Se=0;Se=Ve;Se--){let lt=+Date.now();xe=this.trees[Se]=this._createTree(this._cluster(xe,Se)),Ye&&console.log("z%d: %d clusters in %dms",Se,xe.numItems,+Date.now()-lt)}return Ye&&console.timeEnd("total time"),this}getClusters(Ne,Ye){let Ve=((Ne[0]+180)%360+360)%360-180,Xe=Math.max(-90,Math.min(90,Ne[1])),ht=Ne[2]===180?180:((Ne[2]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Ne[3]));if(Ne[2]-Ne[0]>=360)Ve=-180,ht=180;else if(Ve>ht){let Vt=this.getClusters([Ve,Xe,180,Le],Ye),ar=this.getClusters([-180,Xe,ht,Le],Ye);return Vt.concat(ar)}let xe=this.trees[this._limitZoom(Ye)],Se=xe.range(ge(Ve),ie(Le),ge(ht),ie(Xe)),lt=xe.data,Gt=[];for(let Vt of Se){let ar=this.stride*Vt;Gt.push(lt[ar+re]>1?Me(lt,ar,this.clusterProps):this.points[lt[ar+W]])}return Gt}getChildren(Ne){let Ye=this._getOriginId(Ne),Ve=this._getOriginZoom(Ne),Xe="No cluster with the specified id.",ht=this.trees[Ve];if(!ht)throw new Error(Xe);let Le=ht.data;if(Ye*this.stride>=Le.length)throw new Error(Xe);let xe=this.options.radius/(this.options.extent*Math.pow(2,Ve-1)),Se=ht.within(Le[Ye*this.stride],Le[Ye*this.stride+1],xe),lt=[];for(let Gt of Se){let Vt=Gt*this.stride;Le[Vt+4]===Ne&<.push(Le[Vt+re]>1?Me(Le,Vt,this.clusterProps):this.points[Le[Vt+W]])}if(lt.length===0)throw new Error(Xe);return lt}getLeaves(Ne,Ye,Ve){let Xe=[];return this._appendLeaves(Xe,Ne,Ye=Ye||10,Ve=Ve||0,0),Xe}getTile(Ne,Ye,Ve){let Xe=this.trees[this._limitZoom(Ne)],ht=Math.pow(2,Ne),{extent:Le,radius:xe}=this.options,Se=xe/Le,lt=(Ve-Se)/ht,Gt=(Ve+1+Se)/ht,Vt={features:[]};return this._addTileFeatures(Xe.range((Ye-Se)/ht,lt,(Ye+1+Se)/ht,Gt),Xe.data,Ye,Ve,ht,Vt),Ye===0&&this._addTileFeatures(Xe.range(1-Se/ht,lt,1,Gt),Xe.data,ht,Ve,ht,Vt),Ye===ht-1&&this._addTileFeatures(Xe.range(0,lt,Se/ht,Gt),Xe.data,-1,Ve,ht,Vt),Vt.features.length?Vt:null}getClusterExpansionZoom(Ne){let Ye=this._getOriginZoom(Ne)-1;for(;Ye<=this.options.maxZoom;){let Ve=this.getChildren(Ne);if(Ye++,Ve.length!==1)break;Ne=Ve[0].properties.cluster_id}return Ye}_appendLeaves(Ne,Ye,Ve,Xe,ht){let Le=this.getChildren(Ye);for(let xe of Le){let Se=xe.properties;if(Se&&Se.cluster?ht+Se.point_count<=Xe?ht+=Se.point_count:ht=this._appendLeaves(Ne,Se.cluster_id,Ve,Xe,ht):ht1,Gt,Vt,ar;if(lt)Gt=ke(Ye,Se,this.clusterProps),Vt=Ye[Se],ar=Ye[Se+1];else{let jr=this.points[Ye[Se+W]];Gt=jr.properties;let[ri,bi]=jr.geometry.coordinates;Vt=ge(ri),ar=ie(bi)}let Qr={type:1,geometry:[[Math.round(this.options.extent*(Vt*ht-Ve)),Math.round(this.options.extent*(ar*ht-Xe))]],tags:Gt},ai;ai=lt||this.options.generateId?Ye[Se+W]:this.points[Ye[Se+W]].id,ai!==void 0&&(Qr.id=ai),Le.features.push(Qr)}}_limitZoom(Ne){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ne),this.options.maxZoom+1))}_cluster(Ne,Ye){let{radius:Ve,extent:Xe,reduce:ht,minPoints:Le}=this.options,xe=Ve/(Xe*Math.pow(2,Ye)),Se=Ne.data,lt=[],Gt=this.stride;for(let Vt=0;VtYe&&(ri+=Se[nn+re])}if(ri>jr&&ri>=Le){let bi,nn=ar*jr,Wi=Qr*jr,Ni=-1,_n=((Vt/Gt|0)<<5)+(Ye+1)+this.points.length;for(let $i of ai){let zn=$i*Gt;if(Se[zn+2]<=Ye)continue;Se[zn+2]=Ye;let Wn=Se[zn+re];nn+=Se[zn]*Wn,Wi+=Se[zn+1]*Wn,Se[zn+4]=_n,ht&&(bi||(bi=this._map(Se,Vt,!0),Ni=this.clusterProps.length,this.clusterProps.push(bi)),ht(bi,this._map(Se,zn)))}Se[Vt+4]=_n,lt.push(nn/ri,Wi/ri,1/0,_n,-1,ri),ht&<.push(Ni)}else{for(let bi=0;bi1)for(let bi of ai){let nn=bi*Gt;if(!(Se[nn+2]<=Ye)){Se[nn+2]=Ye;for(let Wi=0;Wi>5}_getOriginZoom(Ne){return(Ne-this.points.length)%32}_map(Ne,Ye,Ve){if(Ne[Ye+re]>1){let Le=this.clusterProps[Ne[Ye+ae]];return Ve?Object.assign({},Le):Le}let Xe=this.points[Ne[Ye+W]].properties,ht=this.options.map(Xe);return Ve&&ht===Xe?Object.assign({},ht):ht}}function Me(ut,Ne,Ye){return{type:"Feature",id:ut[Ne+W],properties:ke(ut,Ne,Ye),geometry:{type:"Point",coordinates:[(Ve=ut[Ne],360*(Ve-.5)),Te(ut[Ne+1])]}};var Ve}function ke(ut,Ne,Ye){let Ve=ut[Ne+re],Xe=Ve>=1e4?`${Math.round(Ve/1e3)}k`:Ve>=1e3?Math.round(Ve/100)/10+"k":Ve,ht=ut[Ne+ae],Le=ht===-1?{}:Object.assign({},Ye[ht]);return Object.assign(Le,{cluster:!0,cluster_id:ut[Ne+W],point_count:Ve,point_count_abbreviated:Xe})}function ge(ut){return ut/360+.5}function ie(ut){let Ne=Math.sin(ut*Math.PI/180),Ye=.5-.25*Math.log((1+Ne)/(1-Ne))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function Te(ut){let Ne=(180-360*ut)*Math.PI/180;return 360*Math.atan(Math.exp(Ne))/Math.PI-90}function Ee(ut,Ne,Ye,Ve){let Xe=Ve,ht=Ne+(Ye-Ne>>1),Le,xe=Ye-Ne,Se=ut[Ne],lt=ut[Ne+1],Gt=ut[Ye],Vt=ut[Ye+1];for(let ar=Ne+3;arXe)Le=ar,Xe=Qr;else if(Qr===Xe){let ai=Math.abs(ar-ht);aiVe&&(Le-Ne>3&&Ee(ut,Ne,Le,Ve),ut[Le+2]=Xe,Ye-Le>3&&Ee(ut,Le,Ye,Ve))}function Ae(ut,Ne,Ye,Ve,Xe,ht){let Le=Xe-Ye,xe=ht-Ve;if(Le!==0||xe!==0){let Se=((ut-Ye)*Le+(Ne-Ve)*xe)/(Le*Le+xe*xe);Se>1?(Ye=Xe,Ve=ht):Se>0&&(Ye+=Le*Se,Ve+=xe*Se)}return Le=ut-Ye,xe=Ne-Ve,Le*Le+xe*xe}function ze(ut,Ne,Ye,Ve){let Xe={id:ut==null?null:ut,type:Ne,geometry:Ye,tags:Ve,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ne==="Point"||Ne==="MultiPoint"||Ne==="LineString")Ce(Xe,Ye);else if(Ne==="Polygon")Ce(Xe,Ye[0]);else if(Ne==="MultiLineString")for(let ht of Ye)Ce(Xe,ht);else if(Ne==="MultiPolygon")for(let ht of Ye)Ce(Xe,ht[0]);return Xe}function Ce(ut,Ne){for(let Ye=0;Ye0&&(Le+=Ve?(Xe*Gt-lt*ht)/2:Math.sqrt(Math.pow(lt-Xe,2)+Math.pow(Gt-ht,2))),Xe=lt,ht=Gt}let xe=Ne.length-3;Ne[2]=1,Ee(Ne,0,xe,Ye),Ne[xe+2]=1,Ne.size=Math.abs(Le),Ne.start=0,Ne.end=Ne.size}function Ge(ut,Ne,Ye,Ve){for(let Xe=0;Xe1?1:Ye}function qt(ut,Ne,Ye,Ve,Xe,ht,Le,xe){if(Ve/=Ne,ht>=(Ye/=Ne)&&Le=Ve)return null;let Se=[];for(let lt of ut){let Gt=lt.geometry,Vt=lt.type,ar=Xe===0?lt.minX:lt.minY,Qr=Xe===0?lt.maxX:lt.maxY;if(ar>=Ye&&Qr=Ve)continue;let ai=[];if(Vt==="Point"||Vt==="MultiPoint")rt(Gt,ai,Ye,Ve,Xe);else if(Vt==="LineString")ot(Gt,ai,Ye,Ve,Xe,!1,xe.lineMetrics);else if(Vt==="MultiLineString")kt(Gt,ai,Ye,Ve,Xe,!1);else if(Vt==="Polygon")kt(Gt,ai,Ye,Ve,Xe,!0);else if(Vt==="MultiPolygon")for(let jr of Gt){let ri=[];kt(jr,ri,Ye,Ve,Xe,!0),ri.length&&ai.push(ri)}if(ai.length){if(xe.lineMetrics&&Vt==="LineString"){for(let jr of ai)Se.push(ze(lt.id,Vt,jr,lt.tags));continue}Vt!=="LineString"&&Vt!=="MultiLineString"||(ai.length===1?(Vt="LineString",ai=ai[0]):Vt="MultiLineString"),Vt!=="Point"&&Vt!=="MultiPoint"||(Vt=ai.length===3?"Point":"MultiPoint"),Se.push(ze(lt.id,Vt,ai,lt.tags))}}return Se.length?Se:null}function rt(ut,Ne,Ye,Ve,Xe){for(let ht=0;ht=Ye&&Le<=Ve&&Ct(Ne,ut[ht],ut[ht+1],ut[ht+2])}}function ot(ut,Ne,Ye,Ve,Xe,ht,Le){let xe=Dt(ut),Se=Xe===0?Yt:xr,lt,Gt,Vt=ut.start;for(let ri=0;riYe&&(Gt=Se(xe,bi,nn,Ni,_n,Ye),Le&&(xe.start=Vt+lt*Gt)):$i>Ve?zn=Ye&&(Gt=Se(xe,bi,nn,Ni,_n,Ye),Wn=!0),zn>Ve&&$i<=Ve&&(Gt=Se(xe,bi,nn,Ni,_n,Ve),Wn=!0),!ht&&Wn&&(Le&&(xe.end=Vt+lt*Gt),Ne.push(xe),xe=Dt(ut)),Le&&(Vt+=lt)}let ar=ut.length-3,Qr=ut[ar],ai=ut[ar+1],jr=Xe===0?Qr:ai;jr>=Ye&&jr<=Ve&&Ct(xe,Qr,ai,ut[ar+2]),ar=xe.length-3,ht&&ar>=3&&(xe[ar]!==xe[0]||xe[ar+1]!==xe[1])&&Ct(xe,xe[0],xe[1],xe[2]),xe.length&&Ne.push(xe)}function Dt(ut){let Ne=[];return Ne.size=ut.size,Ne.start=ut.start,Ne.end=ut.end,Ne}function kt(ut,Ne,Ye,Ve,Xe,ht){for(let Le of ut)ot(Le,Ne,Ye,Ve,Xe,ht,!1)}function Ct(ut,Ne,Ye,Ve){ut.push(Ne,Ye,Ve)}function Yt(ut,Ne,Ye,Ve,Xe,ht){let Le=(ht-Ne)/(Ve-Ne);return Ct(ut,ht,Ye+(Xe-Ye)*Le,1),Le}function xr(ut,Ne,Ye,Ve,Xe,ht){let Le=(ht-Ye)/(Xe-Ye);return Ct(ut,Ne+(Ve-Ne)*Le,ht,1),Le}function er(ut,Ne){let Ye=[];for(let Ve=0;Ve0&&Ne.size<(Xe?Le:Ve))return void(Ye.numPoints+=Ne.length/3);let xe=[];for(let Se=0;SeLe)&&(Ye.numSimplified++,xe.push(Ne[Se],Ne[Se+1])),Ye.numPoints++;Xe&&function(Se,lt){let Gt=0;for(let Vt=0,ar=Se.length,Qr=ar-2;Vt0===lt)for(let Vt=0,ar=Se.length;Vt24)throw new Error("maxZoom should be in the 0-24 range");if(Ye.promoteId&&Ye.generateId)throw new Error("promoteId and generateId cannot be used together.");let Xe=function(ht,Le){let xe=[];if(ht.type==="FeatureCollection")for(let Se=0;Se1&&console.time("creation"),Qr=this.tiles[ar]=Lt(Ne,Ye,Ve,Xe,lt),this.tileCoords.push({z:Ye,x:Ve,y:Xe}),Gt)){Gt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ye,Ve,Xe,Qr.numFeatures,Qr.numPoints,Qr.numSimplified),console.timeEnd("creation"));let Wn=`z${Ye}`;this.stats[Wn]=(this.stats[Wn]||0)+1,this.total++}if(Qr.source=Ne,ht==null){if(Ye===lt.indexMaxZoom||Qr.numPoints<=lt.indexMaxPoints)continue}else{if(Ye===lt.maxZoom||Ye===ht)continue;if(ht!=null){let Wn=ht-Ye;if(Ve!==Le>>Wn||Xe!==xe>>Wn)continue}}if(Qr.source=null,Ne.length===0)continue;Gt>1&&console.time("clipping");let ai=.5*lt.buffer/lt.extent,jr=.5-ai,ri=.5+ai,bi=1+ai,nn=null,Wi=null,Ni=null,_n=null,$i=qt(Ne,Vt,Ve-ai,Ve+ri,0,Qr.minX,Qr.maxX,lt),zn=qt(Ne,Vt,Ve+jr,Ve+bi,0,Qr.minX,Qr.maxX,lt);Ne=null,$i&&(nn=qt($i,Vt,Xe-ai,Xe+ri,1,Qr.minY,Qr.maxY,lt),Wi=qt($i,Vt,Xe+jr,Xe+bi,1,Qr.minY,Qr.maxY,lt),$i=null),zn&&(Ni=qt(zn,Vt,Xe-ai,Xe+ri,1,Qr.minY,Qr.maxY,lt),_n=qt(zn,Vt,Xe+jr,Xe+bi,1,Qr.minY,Qr.maxY,lt),zn=null),Gt>1&&console.timeEnd("clipping"),Se.push(nn||[],Ye+1,2*Ve,2*Xe),Se.push(Wi||[],Ye+1,2*Ve,2*Xe+1),Se.push(Ni||[],Ye+1,2*Ve+1,2*Xe),Se.push(_n||[],Ye+1,2*Ve+1,2*Xe+1)}}getTile(Ne,Ye,Ve){Ne=+Ne,Ye=+Ye,Ve=+Ve;let Xe=this.options,{extent:ht,debug:Le}=Xe;if(Ne<0||Ne>24)return null;let xe=1<1&&console.log("drilling down to z%d-%d-%d",Ne,Ye,Ve);let lt,Gt=Ne,Vt=Ye,ar=Ve;for(;!lt&&Gt>0;)Gt--,Vt>>=1,ar>>=1,lt=this.tiles[$t(Gt,Vt,ar)];return lt&<.source?(Le>1&&(console.log("found parent tile z%d-%d-%d",Gt,Vt,ar),console.time("drilling down")),this.splitTile(lt.source,Gt,Vt,ar,Ne,Ye,Ve),Le>1&&console.timeEnd("drilling down"),this.tiles[Se]?xt(this.tiles[Se],ht):null):null}}function $t(ut,Ne,Ye){return 32*((1<{Vt.properties=Qr;let ai={};for(let jr of ar)ai[jr]=Se[jr].evaluate(Gt,Vt);return ai},Le.reduce=(Qr,ai)=>{Vt.properties=ai;for(let jr of ar)Gt.accumulated=Qr[jr],Qr[jr]=lt[jr].evaluate(Gt,Vt)},Le}(Ne)).load((yield this._pendingData).features):(Xe=yield this._pendingData,new Ht(Xe,Ne.geojsonVtOptions)),this.loaded={};let ht={};if(Ve){let Le=Ve.finish();Le&&(ht.resourceTiming={},ht.resourceTiming[Ne.source]=JSON.parse(JSON.stringify(Le)))}return ht}catch(ht){if(delete this._pendingRequest,i.bB(ht))return{abandoned:!0};throw ht}var Xe})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ne){let Ye=this.loaded;return Ye&&Ye[Ne.uid]?super.reloadTile(Ne):this.loadTile(Ne)}loadAndProcessGeoJSON(Ne,Ye){return i._(this,void 0,void 0,function*(){let Ve=yield this.loadGeoJSON(Ne,Ye);if(delete this._pendingRequest,typeof Ve!="object")throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(d(Ve,!0),Ne.filter){let Xe=i.bC(Ne.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Xe.result==="error")throw new Error(Xe.value.map(Le=>`${Le.key}: ${Le.message}`).join(", "));Ve={type:"FeatureCollection",features:Ve.features.filter(Le=>Xe.value.evaluate({zoom:0},Le))}}return Ve})}loadGeoJSON(Ne,Ye){return i._(this,void 0,void 0,function*(){let{promoteId:Ve}=Ne;if(Ne.request){let Xe=yield i.h(Ne.request,Ye);return this._dataUpdateable=_r(Xe.data,Ve)?Br(Xe.data,Ve):void 0,Xe.data}if(typeof Ne.data=="string")try{let Xe=JSON.parse(Ne.data);return this._dataUpdateable=_r(Xe,Ve)?Br(Xe,Ve):void 0,Xe}catch(Xe){throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`)}if(!Ne.dataDiff)throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ne.source}`);return function(Xe,ht,Le){var xe,Se,lt,Gt;if(ht.removeAll&&Xe.clear(),ht.remove)for(let Vt of ht.remove)Xe.delete(Vt);if(ht.add)for(let Vt of ht.add){let ar=fr(Vt,Le);ar!=null&&Xe.set(ar,Vt)}if(ht.update)for(let Vt of ht.update){let ar=Xe.get(Vt.id);if(ar==null)continue;let Qr=!Vt.removeAllProperties&&(((xe=Vt.removeProperties)===null||xe===void 0?void 0:xe.length)>0||((Se=Vt.addOrUpdateProperties)===null||Se===void 0?void 0:Se.length)>0);if((Vt.newGeometry||Vt.removeAllProperties||Qr)&&(ar=Object.assign({},ar),Xe.set(Vt.id,ar),Qr&&(ar.properties=Object.assign({},ar.properties))),Vt.newGeometry&&(ar.geometry=Vt.newGeometry),Vt.removeAllProperties)ar.properties={};else if(((lt=Vt.removeProperties)===null||lt===void 0?void 0:lt.length)>0)for(let ai of Vt.removeProperties)Object.prototype.hasOwnProperty.call(ar.properties,ai)&&delete ar.properties[ai];if(((Gt=Vt.addOrUpdateProperties)===null||Gt===void 0?void 0:Gt.length)>0)for(let{key:ai,value:jr}of Vt.addOrUpdateProperties)ar.properties[ai]=jr}}(this._dataUpdateable,Ne.dataDiff,Ve),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ne){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ne){return this._geoJSONIndex.getClusterExpansionZoom(Ne.clusterId)}getClusterChildren(Ne){return this._geoJSONIndex.getChildren(Ne.clusterId)}getClusterLeaves(Ne){return this._geoJSONIndex.getLeaves(Ne.clusterId,Ne.limit,Ne.offset)}}class Nr{constructor(Ne){this.self=Ne,this.actor=new i.F(Ne),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ye,Ve)=>{if(this.externalWorkerSourceTypes[Ye])throw new Error(`Worker source with name "${Ye}" already registered.`);this.externalWorkerSourceTypes[Ye]=Ve},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Ye=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Ye)},this.actor.registerMessageHandler("LDT",(Ye,Ve)=>this._getDEMWorkerSource(Ye,Ve.source).loadTile(Ve)),this.actor.registerMessageHandler("RDT",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ye,Ve.source).removeTile(Ve)})),this.actor.registerMessageHandler("GCEZ",(Ye,Ve)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ve.type,Ve.source).getClusterExpansionZoom(Ve)})),this.actor.registerMessageHandler("GCC",(Ye,Ve)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ve.type,Ve.source).getClusterChildren(Ve)})),this.actor.registerMessageHandler("GCL",(Ye,Ve)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ve.type,Ve.source).getClusterLeaves(Ve)})),this.actor.registerMessageHandler("LD",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).loadData(Ve)),this.actor.registerMessageHandler("GD",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).getData()),this.actor.registerMessageHandler("LT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).loadTile(Ve)),this.actor.registerMessageHandler("RT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).reloadTile(Ve)),this.actor.registerMessageHandler("AT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).abortTile(Ve)),this.actor.registerMessageHandler("RMT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).removeTile(Ve)),this.actor.registerMessageHandler("RS",(Ye,Ve)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Ye]||!this.workerSources[Ye][Ve.type]||!this.workerSources[Ye][Ve.type][Ve.source])return;let Xe=this.workerSources[Ye][Ve.type][Ve.source];delete this.workerSources[Ye][Ve.type][Ve.source],Xe.removeSource!==void 0&&Xe.removeSource(Ve)})),this.actor.registerMessageHandler("RM",Ye=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Ye],delete this.availableImages[Ye],delete this.workerSources[Ye],delete this.demWorkerSources[Ye]})),this.actor.registerMessageHandler("SR",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this.referrer=Ve})),this.actor.registerMessageHandler("SRPS",(Ye,Ve)=>this._syncRTLPluginState(Ye,Ve)),this.actor.registerMessageHandler("IS",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this.self.importScripts(Ve)})),this.actor.registerMessageHandler("SI",(Ye,Ve)=>this._setImages(Ye,Ve)),this.actor.registerMessageHandler("UL",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).update(Ve.layers,Ve.removedIds)})),this.actor.registerMessageHandler("SL",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).replace(Ve)}))}_setImages(Ne,Ye){return i._(this,void 0,void 0,function*(){this.availableImages[Ne]=Ye;for(let Ve in this.workerSources[Ne]){let Xe=this.workerSources[Ne][Ve];for(let ht in Xe)Xe[ht].availableImages=Ye}})}_syncRTLPluginState(Ne,Ye){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Ye.pluginStatus!=="loading")return i.bD.setState(Ye),Ye;let Ve=Ye.pluginURL;if(this.self.importScripts(Ve),i.bD.isParsed()){let Xe={pluginStatus:"loaded",pluginURL:Ve};return i.bD.setState(Xe),Xe}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ve}`)})}_getAvailableImages(Ne){let Ye=this.availableImages[Ne];return Ye||(Ye=[]),Ye}_getLayerIndex(Ne){let Ye=this.layerIndexes[Ne];return Ye||(Ye=this.layerIndexes[Ne]=new a),Ye}_getWorkerSource(Ne,Ye,Ve){if(this.workerSources[Ne]||(this.workerSources[Ne]={}),this.workerSources[Ne][Ye]||(this.workerSources[Ne][Ye]={}),!this.workerSources[Ne][Ye][Ve]){let Xe={sendAsync:(ht,Le)=>(ht.targetMapId=Ne,this.actor.sendAsync(ht,Le))};switch(Ye){case"vector":this.workerSources[Ne][Ye][Ve]=new u(Xe,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;case"geojson":this.workerSources[Ne][Ye][Ve]=new Or(Xe,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;default:this.workerSources[Ne][Ye][Ve]=new this.externalWorkerSourceTypes[Ye](Xe,this._getLayerIndex(Ne),this._getAvailableImages(Ne))}}return this.workerSources[Ne][Ye][Ve]}_getDEMWorkerSource(Ne,Ye){return this.demWorkerSources[Ne]||(this.demWorkerSources[Ne]={}),this.demWorkerSources[Ne][Ye]||(this.demWorkerSources[Ne][Ye]=new c),this.demWorkerSources[Ne][Ye]}}return i.i(self)&&(self.worker=new Nr(self)),Nr}),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:le=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);le.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(le,w=0){return this.getImageCanvasContext(le).getImageData(-w,-w,le.width+2*w,le.height+2*w)},getImageCanvasContext(le){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=le.width,w.height=le.height,B.drawImage(le,0,0,le.width,le.height),B},resolveURL:le=>(s||(s=document.createElement("a")),s.href=le,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 se=0;se{h&&b(h),h=null,x=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(le){let w,B,Q,ee;le.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},le.addThrottleControl=it=>{let yt=Q++;return ee[yt]=it,yt},le.removeThrottleControl=it=>{delete ee[it],qe()},le.getImage=(it,yt,Ot=!0)=>new Promise((Nt,hr)=>{f.supported&&(it.headers||(it.headers={}),it.headers.accept="image/webp,*/*"),a.e(it,{type:"image"}),w.push({abortController:yt,requestParameters:it,supportImageRefresh:Ot,state:"queued",onError:Sr=>{hr(Sr)},onSuccess:Sr=>{Nt(Sr)}}),qe()});let se=it=>a._(this,void 0,void 0,function*(){it.state="running";let{requestParameters:yt,supportImageRefresh:Ot,onError:Nt,onSuccess:hr,abortController:Sr}=it,he=Ot===!1&&!a.i(self)&&!a.g(yt.url)&&(!yt.headers||Object.keys(yt.headers).reduce((Oe,Je)=>Oe&&Je==="accept",!0));B++;let be=he?je(yt,Sr):a.m(yt,Sr);try{let Oe=yield be;delete it.abortController,it.state="completed",Oe.data instanceof HTMLImageElement||a.b(Oe.data)?hr(Oe):Oe.data&&hr({data:yield(Pe=Oe.data,typeof createImageBitmap=="function"?a.d(Pe):a.f(Pe)),cacheControl:Oe.cacheControl,expires:Oe.expires})}catch(Oe){delete it.abortController,Nt(Oe)}finally{B--,qe()}var Pe}),qe=()=>{let it=(()=>{for(let yt of Object.keys(ee))if(ee[yt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let yt=B;yt0;yt++){let Ot=w.shift();Ot.abortController.signal.aborted?yt--:se(Ot)}},je=(it,yt)=>new Promise((Ot,Nt)=>{let hr=new Image,Sr=it.url,he=it.credentials;he&&he==="include"?hr.crossOrigin="use-credentials":(he&&he==="same-origin"||!a.s(Sr))&&(hr.crossOrigin="anonymous"),yt.signal.addEventListener("abort",()=>{hr.src="",Nt(a.c())}),hr.fetchPriority="high",hr.onload=()=>{hr.onerror=hr.onload=null,Ot({data:hr})},hr.onerror=()=>{hr.onerror=hr.onload=null,yt.signal.aborted||Nt(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."))},hr.src=Sr})}(g||(g={})),g.resetRequestQueue();class E{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function k(le){var w=new a.A(3);return w[0]=le[0],w[1]=le[1],w[2]=le[2],w}var S,L=function(le,w,B){return le[0]=w[0]-B[0],le[1]=w[1]-B[1],le[2]=w[2]-B[2],le};S=new a.A(3),a.A!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0);var _=function(le){var w=le[0],B=le[1];return w*w+B*B};function C(le){let w=[];if(typeof le=="string")w.push({id:"default",url:le});else if(le&&le.length>0){let B=[];for(let{id:Q,url:ee}of le){let se=`${Q}${ee}`;B.indexOf(se)===-1&&(B.push(se),w.push({id:Q,url:ee}))}}return w}function M(le,w,B){let Q=le.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var le=new a.A(2);a.A!=Float32Array&&(le[0]=0,le[1]=0)})();class p{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:se}=w,qe=!(this.size&&this.size[0]===ee&&this.size[1]===se||Q),{context:je}=this,{gl:it}=je;if(this.useMipmap=!!(B&&B.useMipmap),it.bindTexture(it.TEXTURE_2D,this.texture),je.pixelStoreUnpackFlipY.set(!1),je.pixelStoreUnpack.set(1),je.pixelStoreUnpackPremultiplyAlpha.set(this.format===it.RGBA&&(!B||B.premultiply!==!1)),qe)this.size=[ee,se],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?it.texImage2D(it.TEXTURE_2D,0,this.format,this.format,it.UNSIGNED_BYTE,w):it.texImage2D(it.TEXTURE_2D,0,this.format,ee,se,0,this.format,it.UNSIGNED_BYTE,w.data);else{let{x:yt,y:Ot}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?it.texSubImage2D(it.TEXTURE_2D,0,yt,Ot,it.RGBA,it.UNSIGNED_BYTE,w):it.texSubImage2D(it.TEXTURE_2D,0,yt,Ot,ee,se,it.RGBA,it.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&it.generateMipmap(it.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:se}=ee;se.bindTexture(se.TEXTURE_2D,this.texture),Q!==se.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=se.LINEAR),w!==this.filter&&(se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MAG_FILTER,w),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_S,B),se.texParameteri(se.TEXTURE_2D,se.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(le){let{userImage:w}=le;return!!(w&&w.render&&w.render())&&(le.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 se of w)this.images[se]||(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},se=new a.I(ee,Q);this.patterns[w]={bin:ee,position:se}}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 p(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let se in this.patterns)w.push(this.patterns[se].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let se in this.patterns){let{bin:qe}=this.patterns[se],je=qe.x+1,it=qe.y+1,yt=this.getImage(se).data,Ot=yt.width,Nt=yt.height;a.R.copy(yt,ee,{x:0,y:0},{x:je,y:it},{width:Ot,height:Nt}),a.R.copy(yt,ee,{x:0,y:Nt-1},{x:je,y:it-1},{width:Ot,height:1}),a.R.copy(yt,ee,{x:0,y:0},{x:je,y:it+Nt},{width:Ot,height:1}),a.R.copy(yt,ee,{x:Ot-1,y:0},{x:je-1,y:it},{width:1,height:Nt}),a.R.copy(yt,ee,{x:0,y:0},{x:je+Ot,y:it},{width:1,height:Nt})}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 F=1e20;function q(le,w,B,Q,ee,se,qe,je,it){for(let yt=w;yt-1);it++,se[it]=je,qe[it]=yt,qe[it+1]=F}for(let je=0,it=0;je65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[se])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[se]){let je=H.loadGlyphRange(w,se,this.url,this.requestManager);Q.requests[se]=je}let qe=yield Q.requests[se];for(let je in qe)this._doesCharSupportLocalGlyph(+je)||(Q.glyphs[+je]=qe[+je]);return Q.ranges[se]=!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 se=w.tinySDF;if(!se){let je="400";/bold/i.test(B)?je="900":/medium/i.test(B)?je="500":/light/i.test(B)&&(je="200"),se=w.tinySDF=new H.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:je})}let qe=se.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}}}}H.loadGlyphRange=function(le,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,se=ee+255,qe=Q.transformRequest(B.replace("{fontstack}",le).replace("{range}",`${ee}-${se}`),"Glyphs"),je=yield a.l(qe,new AbortController);if(!je||!je.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${se}`);let it={};for(let yt of a.n(je.data))it[yt.id]=yt;return it})},H.TinySDF=class{constructor({fontSize:le=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:se="normal",fontStyle:qe="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let je=this.size=le+4*w,it=this._createCanvas(je),yt=this.ctx=it.getContext("2d",{willReadFrequently:!0});yt.font=`${qe} ${se} ${le}px ${ee}`,yt.textBaseline="alphabetic",yt.textAlign="left",yt.fillStyle="black",this.gridOuter=new Float64Array(je*je),this.gridInner=new Float64Array(je*je),this.f=new Float64Array(je),this.z=new Float64Array(je+1),this.v=new Uint16Array(je)}_createCanvas(le){let w=document.createElement("canvas");return w.width=w.height=le,w}draw(le){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:se}=this.ctx.measureText(le),qe=Math.ceil(B),je=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(se-ee))),it=Math.min(this.size-this.buffer,qe+Math.ceil(Q)),yt=je+2*this.buffer,Ot=it+2*this.buffer,Nt=Math.max(yt*Ot,0),hr=new Uint8ClampedArray(Nt),Sr={data:hr,width:yt,height:Ot,glyphWidth:je,glyphHeight:it,glyphTop:qe,glyphLeft:0,glyphAdvance:w};if(je===0||it===0)return Sr;let{ctx:he,buffer:be,gridInner:Pe,gridOuter:Oe}=this;he.clearRect(be,be,je,it),he.fillText(le,be,be+qe);let Je=he.getImageData(be,be,je,it);Oe.fill(F,0,Nt),Pe.fill(0,0,Nt);for(let He=0;He0?Ut*Ut:0,Pe[Rt]=Ut<0?Ut*Ut:0}}q(Oe,0,0,yt,Ot,yt,this.f,this.v,this.z),q(Pe,be,be,je,it,yt,this.f,this.v,this.z);for(let He=0;He1&&(it=w[++je]);let Ot=Math.abs(yt-it.left),Nt=Math.abs(yt-it.right),hr=Math.min(Ot,Nt),Sr,he=se/Q*(ee+1);if(it.isDash){let be=ee-Math.abs(he);Sr=Math.sqrt(hr*hr+be*be)}else Sr=ee-Math.sqrt(hr*hr+he*he);this.data[qe+yt]=Math.max(0,Math.min(255,Sr+128))}}}addRegularDash(w){for(let je=w.length-1;je>=0;--je){let it=w[je],yt=w[je+1];it.zeroLength?w.splice(je,1):yt&&yt.isDash===it.isDash&&(yt.left=it.left,w.splice(je,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,se=0,qe=w[se];for(let je=0;je1&&(qe=w[++se]);let it=Math.abs(je-qe.left),yt=Math.abs(je-qe.right),Ot=Math.min(it,yt);this.data[ee+je]=Math.max(0,Math.min(255,(qe.isDash?Ot:-Ot)+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 se=0;for(let je=0;je{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let ke=Math.floor(u.hardwareConcurrency/2),ge,ie;function Te(){return ge||(ge=new Me),ge}Me.workerCount=a.C(globalThis)?Math.max(Math.min(ke,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{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 Ee(Te(),a.G),ie.registerMessageHandler("GR",(le,w,B)=>a.m(w,B))),ie}function ze(le,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*le.width,.5*le.height,1]),a.L(B,B,le.calculatePosMatrix(w.toUnwrapped()))}function Ce(le,w,B,Q,ee,se){let qe=function(Nt,hr,Sr){if(Nt)for(let he of Nt){let be=hr[he];if(be&&be.source===Sr&&be.type==="fill-extrusion")return!0}else for(let he in hr){let be=hr[he];if(be.source===Sr&&be.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,le.id),je=se.maxPitchScaleFactor(),it=le.tilesIn(Q,je,qe);it.sort(me);let yt=[];for(let Nt of it)yt.push({wrappedTileID:Nt.tileID.wrapped().key,queryResults:Nt.tile.queryRenderedFeatures(w,B,le._state,Nt.queryGeometry,Nt.cameraQueryGeometry,Nt.scale,ee,se,je,ze(le.transform,Nt.tileID))});let Ot=function(Nt){let hr={},Sr={};for(let he of Nt){let be=he.queryResults,Pe=he.wrappedTileID,Oe=Sr[Pe]=Sr[Pe]||{};for(let Je in be){let He=be[Je],et=Oe[Je]=Oe[Je]||{},Mt=hr[Je]=hr[Je]||[];for(let Rt of He)et[Rt.featureIndex]||(et[Rt.featureIndex]=!0,Mt.push(Rt))}}return hr}(yt);for(let Nt in Ot)Ot[Nt].forEach(hr=>{let Sr=hr.feature,he=le.getFeatureState(Sr.layer["source-layer"],Sr.id);Sr.source=Sr.layer.source,Sr.layer["source-layer"]&&(Sr.sourceLayer=Sr.layer["source-layer"]),Sr.state=he});return Ot}function me(le,w){let B=le.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 De(le,w,B){return a._(this,void 0,void 0,function*(){let Q=le;if(le.url?Q=(yield a.h(w.transformRequest(le.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,le),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(se=>se.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,se;if(w instanceof a.N)ee=w,se=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,se=w._ne,!ee||!se)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(se.lng,Q.lng),Q.lat=Math.max(se.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(se.lng,se.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 Ge{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),se=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((se,qe)=>{w.reloadPromise={resolve:se,reject:qe}})}else w.actor=this.dispatcher.getActor(),ee="LT";w.abortController=new AbortController;try{let se=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,se)}catch(se){if(delete w.abortController,w.aborted)return;if(se&&se.status!==404)throw se;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 ct 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 De(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new Ge(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 g.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,se=ee.gl,qe=Q.data;w.texture=this.map.painter.getTileTexture(qe.width),w.texture?w.texture.update(qe,{useMipmap:!0}):(w.texture=new p(ee,qe,se.RGBA,{useMipmap:!0}),w.texture.bind(se.LINEAR,se.CLAMP_TO_EDGE,se.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 qt extends ct{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 g.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let se=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let qe=a.b(se)&&a.U()?se:yield this.readImageNow(se),je={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 it=yield w.actor.sendAsync({type:"LDT",data:je});w.dem=it,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,se=B.x===0?w.wrap-1:w.wrap,qe=(B.x+1+Q)%Q,je=B.x+1===Q?w.wrap+1:w.wrap,it={};return it[new a.S(w.overscaledZ,se,B.z,ee,B.y).key]={backfilled:!1},it[new a.S(w.overscaledZ,je,B.z,qe,B.y).key]={backfilled:!1},B.y>0&&(it[new a.S(w.overscaledZ,se,B.z,ee,B.y-1).key]={backfilled:!1},it[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},it[new a.S(w.overscaledZ,je,B.z,qe,B.y-1).key]={backfilled:!1}),B.y+10&&a.e(se,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},se),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},se),{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 ot=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Dt 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 g.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 se=1/0,qe=1/0,je=-1/0,it=-1/0;for(let hr of ee)se=Math.min(se,hr.x),qe=Math.min(qe,hr.y),je=Math.max(je,hr.x),it=Math.max(it,hr.y);let yt=Math.max(je-se,it-qe),Ot=Math.max(0,Math.floor(-Math.log(yt)/Math.LN2)),Nt=Math.pow(2,Ot);return new a.a1(Ot,Math.floor((se+je)/2*Nt),Math.floor((qe+it)/2*Nt))}(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,ot.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let se=this.tiles[ee];se.state!=="loaded"&&(se.state="loaded",se.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 kt extends Dt{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,ot.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 p(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let se=this.tiles[ee];se.state!=="loaded"&&(se.state="loaded",se.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 Ct extends Dt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(se=>!Array.isArray(se)||se.length!==2||se.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,ot.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 p(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let se in this.tiles){let qe=this.tiles[se];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 Yt={},xr=le=>{switch(le){case"geojson":return rt;case"image":return Dt;case"raster":return ct;case"raster-dem":return qt;case"vector":return nt;case"video":return kt;case"canvas":return Ct}return Yt[le]},er="RTLPluginLoaded";class Ke 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(er))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let xt=null;function bt(){return xt||(xt=new Ke),xt}class Lt{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;Bse.getLayer(yt)).filter(Boolean);if(it.length!==0){je.layers=it,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(yt=>it.filter(Ot=>Ot.id===yt)[0]));for(let yt of it)qe[yt.id]=je}}return qe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let se=this.buckets[ee];if(se instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;se.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let se=this.buckets[ee];if(se instanceof a.a6&&se.hasRTLText){this.hasRTLText=!0,bt().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let se=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(se))}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 p(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,se,qe,je,it,yt,Ot){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:se,scale:qe,tileSize:this.tileSize,pixelPosMatrix:Ot,transform:it,params:je,queryPadding:this.queryPadding*yt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),se=B&&B.sourceLayer?B.sourceLayer:"",qe=ee._geojsonTileLayer||ee[se];if(!qe)return;let je=a.a7(B&&B.filter),{z:it,x:yt,y:Ot}=this.tileID.canonical,Nt={z:it,x:yt,y:Ot};for(let hr=0;hrQ)ee=!1;else if(B)if(this.expirationTime{this.remove(w,se)},Q)),this.data[ee].push(se),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),se=this.data[Q][ee];return this.data[Q].splice(ee,1),se.timeout&&clearTimeout(se.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(se.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class Et{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let se in this.state[w])se!==ee&&(this.deletedStates[w][se]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let se in this.state[w][ee])Q[se]||(this.deletedStates[w][ee][se]=null)}else for(let se in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][se]===null&&delete this.deletedStates[w][ee][se]}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 se=this.deletedStates[w][B];if(se===null)return{};for(let qe in se)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 se={};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]),se[qe]=this.state[ee][qe];Q[ee]=se}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let se={};if(this.deletedStates[ee]===null)for(let qe in this.state[ee])se[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 je of Object.keys(this.deletedStates[ee][qe]))delete this.state[ee][qe][je];se[qe]=this.state[ee][qe]}Q[ee]=Q[ee]||{},a.e(Q[ee],se)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class dt 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,se,qe,je)=>{let it=new(xr(se.type))(ee,se,qe,je);if(it.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${it.id}`);return it})(w,B,Q,this),this._tiles={},this._cache=new St(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Et,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!=="loaded"&&B.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state="errored",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k("dataabort",{tile:w,coord:w.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(Ht).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 se=Q.tileID,qe=ee.tileID,je=new a.P(se.canonical.x,se.canonical.y)._rotate(this.transform.angle),it=new a.P(qe.canonical.x,qe.canonical.y)._rotate(this.transform.angle);return se.overscaledZ-qe.overscaledZ||it.y-je.y||it.x-je.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Ht).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+it)===1?qe+=it:Math.abs(qe-it)===1&&(qe-=it)),se.dem&&ee.dem&&(ee.dem.backfillBorder(se.dem,qe,je),ee.neighboringTiles&&ee.neighboringTiles[yt]&&(ee.neighboringTiles[yt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let se in this._tiles){let qe=this._tiles[se];if(ee[se]||!qe.hasData()||qe.tileID.overscaledZ<=B||qe.tileID.overscaledZ>Q)continue;let je=qe.tileID;for(;qe&&qe.tileID.overscaledZ>B+1;){let yt=qe.tileID.scaledTo(qe.tileID.overscaledZ-1);qe=this._tiles[yt.key],qe&&qe.hasData()&&(je=yt)}let it=je;for(;it.overscaledZ>B;)if(it=it.scaledTo(it.overscaledZ-1),w[it.key]){ee[je.key]=je;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),se=this._getLoadedTile(ee);if(se)return se}}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)),se=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(se)}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 se=this._tiles[ee];se.tileID=se.tileID.unwrapTo(se.tileID.wrap+B),Q[se.tileID.key]=se}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,se,qe){let je={},it={},yt=Object.keys(w),Ot=u.now();for(let Nt of yt){let hr=w[Nt],Sr=this._tiles[Nt];if(!Sr||Sr.fadeEndTime!==0&&Sr.fadeEndTime<=Ot)continue;let he=this.findLoadedParent(hr,B),be=this.findLoadedSibling(hr),Pe=he||be||null;Pe&&(this._addTile(Pe.tileID),je[Pe.tileID.key]=Pe.tileID),it[Nt]=hr}this._retainLoadedChildren(it,ee,Q,w);for(let Nt in je)w[Nt]||(this._coveredTiles[Nt]=!0,w[Nt]=je[Nt]);if(qe){let Nt={},hr={};for(let Sr of se)this._tiles[Sr.key].hasData()?Nt[Sr.key]=Sr:hr[Sr.key]=Sr;for(let Sr in hr){let he=hr[Sr].children(this._source.maxzoom);this._tiles[he[0].key]&&this._tiles[he[1].key]&&this._tiles[he[2].key]&&this._tiles[he[3].key]&&(Nt[he[0].key]=w[he[0].key]=he[0],Nt[he[1].key]=w[he[1].key]=he[1],Nt[he[2].key]=w[he[2].key]=he[2],Nt[he[3].key]=w[he[3].key]=he[3],delete hr[Sr])}for(let Sr in hr){let he=hr[Sr],be=this.findLoadedParent(he,this._source.minzoom),Pe=this.findLoadedSibling(he),Oe=be||Pe||null;if(Oe){Nt[Oe.tileID.key]=w[Oe.tileID.key]=Oe.tileID;for(let Je in Nt)Nt[Je].isChildOf(Oe.tileID)&&delete Nt[Je]}}for(let Sr in this._tiles)Nt[Sr]||(this._coveredTiles[Sr]=!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(Ot=>new a.S(Ot.canonical.z,Ot.wrap,Ot.canonical.z,Ot.canonical.x,Ot.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(Ot=>this._source.hasTile(Ot)))):Q=[];let ee=w.coveringZoomLevel(this._source),se=Math.max(ee-dt.maxOverzooming,this._source.minzoom),qe=Math.max(ee+dt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Ot={};for(let Nt of Q)if(Nt.canonical.z>this._source.minzoom){let hr=Nt.scaledTo(Nt.canonical.z-1);Ot[hr.key]=hr;let Sr=Nt.scaledTo(Math.max(this._source.minzoom,Math.min(Nt.canonical.z,5)));Ot[Sr.key]=Sr}Q=Q.concat(Object.values(Ot))}let je=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,je&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let it=this._updateRetainedTiles(Q,ee);$t(this._source.type)&&this._updateCoveredAndRetainedTiles(it,se,qe,ee,Q,B);for(let Ot in it)this._tiles[Ot].clearFadeHold();let yt=a.ab(this._tiles,it);for(let Ot of yt){let Nt=this._tiles[Ot];Nt.hasSymbolBuckets&&!Nt.holdingForFade()?Nt.setHoldDuration(this.map._fadeDuration):Nt.hasSymbolBuckets&&!Nt.symbolFadeFinished()||this._removeTile(Ot)}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={},se={},qe=Math.max(B-dt.maxOverzooming,this._source.minzoom),je=Math.max(B+dt.maxUnderzooming,this._source.minzoom),it={};for(let yt of w){let Ot=this._addTile(yt);ee[yt.key]=yt,Ot.hasData()||Bthis._source.maxzoom){let hr=yt.children(this._source.maxzoom)[0],Sr=this.getTile(hr);if(Sr&&Sr.hasData()){ee[hr.key]=hr;continue}}else{let hr=yt.children(this._source.maxzoom);if(ee[hr[0].key]&&ee[hr[1].key]&&ee[hr[2].key]&&ee[hr[3].key])continue}let Nt=Ot.wasRequested();for(let hr=yt.overscaledZ-1;hr>=qe;--hr){let Sr=yt.scaledTo(hr);if(se[Sr.key])break;if(se[Sr.key]=!0,Ot=this.getTile(Sr),!Ot&&Nt&&(Ot=this._addTile(Sr)),Ot){let he=Ot.hasData();if((he||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Nt)&&(ee[Sr.key]=Sr),Nt=Ot.wasRequested(),he)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 se=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(se),Q)break;ee=se}for(let se of B)this._loadedParentTiles[se]=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 Lt(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=[],se=this.transform;if(!se)return ee;let qe=Q?se.getCameraQueryGeometry(w):w,je=w.map(he=>se.pointCoordinate(he,this.terrain)),it=qe.map(he=>se.pointCoordinate(he,this.terrain)),yt=this.getIds(),Ot=1/0,Nt=1/0,hr=-1/0,Sr=-1/0;for(let he of it)Ot=Math.min(Ot,he.x),Nt=Math.min(Nt,he.y),hr=Math.max(hr,he.x),Sr=Math.max(Sr,he.y);for(let he=0;he=0&&He[1].y+Je>=0){let et=je.map(Rt=>Pe.getTilePoint(Rt)),Mt=it.map(Rt=>Pe.getTilePoint(Rt));ee.push({tile:be,tileID:Pe,queryGeometry:et,cameraQueryGeometry:Mt,scale:Oe})}}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($t(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 Ht(le,w){let B=Math.abs(2*le.wrap)-+(le.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return le.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-le.canonical.y||w.canonical.x-le.canonical.x}function $t(le){return le==="raster"||le==="image"||le==="video"}dt.maxOverzooming=10,dt.maxUnderzooming=3;class fr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-qe)/je:0;return this.points[se].mult(1-it).add(this.points[B].mult(it))}}function _r(le,w){let B=!0;return le==="always"||le!=="never"&&w!=="never"||(B=!1),B}class Br{constructor(w,B,Q){let ee=this.boxCells=[],se=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 it=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(se)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let yt=0;yt0}hitTestCircle(w,B,Q,ee,se){let qe=w-Q,je=w+Q,it=B-Q,yt=B+Q;if(je<0||qe>this.width||yt<0||it>this.height)return!1;let Ot=[];return this._forEachCell(qe,it,je,yt,this._queryCellCircle,Ot,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},se),Ot.length>0}_queryCell(w,B,Q,ee,se,qe,je,it){let{seenUids:yt,hitTest:Ot,overlapMode:Nt}=je,hr=this.boxCells[se];if(hr!==null){let he=this.bboxes;for(let be of hr)if(!yt.box[be]){yt.box[be]=!0;let Pe=4*be,Oe=this.boxKeys[be];if(w<=he[Pe+2]&&B<=he[Pe+3]&&Q>=he[Pe+0]&&ee>=he[Pe+1]&&(!it||it(Oe))&&(!Ot||!_r(Nt,Oe.overlapMode))&&(qe.push({key:Oe,x1:he[Pe],y1:he[Pe+1],x2:he[Pe+2],y2:he[Pe+3]}),Ot))return!0}}let Sr=this.circleCells[se];if(Sr!==null){let he=this.circles;for(let be of Sr)if(!yt.circle[be]){yt.circle[be]=!0;let Pe=3*be,Oe=this.circleKeys[be];if(this._circleAndRectCollide(he[Pe],he[Pe+1],he[Pe+2],w,B,Q,ee)&&(!it||it(Oe))&&(!Ot||!_r(Nt,Oe.overlapMode))){let Je=he[Pe],He=he[Pe+1],et=he[Pe+2];if(qe.push({key:Oe,x1:Je-et,y1:He-et,x2:Je+et,y2:He+et}),Ot)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,se,qe,je,it){let{circle:yt,seenUids:Ot,overlapMode:Nt}=je,hr=this.boxCells[se];if(hr!==null){let he=this.bboxes;for(let be of hr)if(!Ot.box[be]){Ot.box[be]=!0;let Pe=4*be,Oe=this.boxKeys[be];if(this._circleAndRectCollide(yt.x,yt.y,yt.radius,he[Pe+0],he[Pe+1],he[Pe+2],he[Pe+3])&&(!it||it(Oe))&&!_r(Nt,Oe.overlapMode))return qe.push(!0),!0}}let Sr=this.circleCells[se];if(Sr!==null){let he=this.circles;for(let be of Sr)if(!Ot.circle[be]){Ot.circle[be]=!0;let Pe=3*be,Oe=this.circleKeys[be];if(this._circlesCollide(he[Pe],he[Pe+1],he[Pe+2],yt.x,yt.y,yt.radius)&&(!it||it(Oe))&&!_r(Nt,Oe.overlapMode))return qe.push(!0),!0}}}_forEachCell(w,B,Q,ee,se,qe,je,it){let yt=this._convertToXCellCoord(w),Ot=this._convertToYCellCoord(B),Nt=this._convertToXCellCoord(Q),hr=this._convertToYCellCoord(ee);for(let Sr=yt;Sr<=Nt;Sr++)for(let he=Ot;he<=hr;he++)if(se.call(this,w,B,Q,ee,this.xCellCount*he+Sr,qe,je,it))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,se,qe){let je=ee-w,it=se-B,yt=Q+qe;return yt*yt>je*je+it*it}_circleAndRectCollide(w,B,Q,ee,se,qe,je){let it=(qe-ee)/2,yt=Math.abs(w-(ee+it));if(yt>it+Q)return!1;let Ot=(je-se)/2,Nt=Math.abs(B-(se+Ot));if(Nt>Ot+Q)return!1;if(yt<=it||Nt<=Ot)return!0;let hr=yt-it,Sr=Nt-Ot;return hr*hr+Sr*Sr<=Q*Q}}function Or(le,w,B,Q,ee){let se=a.H();return w?(a.K(se,se,[1/ee,1/ee,1]),B||a.ad(se,se,Q.angle)):a.L(se,Q.labelPlaneMatrix,le),se}function Nr(le,w,B,Q,ee){if(w){let se=a.ae(le);return a.K(se,se,[ee,ee,1]),B||a.ad(se,se,-Q.angle),se}return Q.glCoordMatrix}function ut(le,w,B,Q){let ee;Q?(ee=[le,w,Q(le,w),1],a.af(ee,ee,B)):(ee=[le,w,0,1],jr(ee,ee,B));let se=ee[3];return{point:new a.P(ee[0]/se,ee[1]/se),signedDistanceFromCamera:se,isOccluded:!1}}function Ne(le,w){return .5+le/w*.5}function Ye(le,w){return le.x>=-w[0]&&le.x<=w[0]&&le.y>=-w[1]&&le.y<=w[1]}function Ve(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he){let be=Q?le.textSizeData:le.iconSizeData,Pe=a.ag(be,B.transform.zoom),Oe=[256/B.width*2+1,256/B.height*2+1],Je=Q?le.text.dynamicLayoutVertexArray:le.icon.dynamicLayoutVertexArray;Je.clear();let He=le.lineVertexArray,et=Q?le.text.placedSymbolArray:le.icon.placedSymbolArray,Mt=B.transform.width/B.transform.height,Rt=!1;for(let Ut=0;UtMath.abs(B.x-w.x)*Q?{useVertical:!0}:(le===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function Le(le,w,B,Q,ee,se,qe,je,it,yt,Ot){let Nt=B/24,hr=w.lineOffsetX*Nt,Sr=w.lineOffsetY*Nt,he;if(w.numGlyphs>1){let be=w.glyphStartIndex+w.numGlyphs,Pe=w.lineStartIndex,Oe=w.lineStartIndex+w.lineLength,Je=Xe(Nt,je,hr,Sr,Q,w,Ot,le);if(!Je)return{notEnoughRoom:!0};let He=ut(Je.first.point.x,Je.first.point.y,qe,le.getElevation).point,et=ut(Je.last.point.x,Je.last.point.y,qe,le.getElevation).point;if(ee&&!Q){let Mt=ht(w.writingMode,He,et,yt);if(Mt)return Mt}he=[Je.first];for(let Mt=w.glyphStartIndex+1;Mt0?He.point:function(Rt,Ut,tr,mr,Dr,zr){return xe(Rt,Ut,tr,1,Dr,zr)}(le.tileAnchorPoint,Je,Pe,0,se,le),Mt=ht(w.writingMode,Pe,et,yt);if(Mt)return Mt}let be=ar(Nt*je.getoffsetX(w.glyphStartIndex),hr,Sr,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,le,Ot);if(!be||le.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};he=[be]}for(let be of he)a.aj(it,be.point,be.angle);return{}}function xe(le,w,B,Q,ee,se){let qe=le.add(le.sub(w)._unit()),je=ee!==void 0?ut(qe.x,qe.y,ee,se.getElevation).point:lt(qe.x,qe.y,se).point,it=B.sub(je);return B.add(it._mult(Q/it.mag()))}function Se(le,w,B){let Q=w.projectionCache;if(Q.projections[le])return Q.projections[le];let ee=new a.P(w.lineVertexArray.getx(le),w.lineVertexArray.gety(le)),se=lt(ee.x,ee.y,w);if(se.signedDistanceFromCamera>0)return Q.projections[le]=se.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||se.isOccluded,se.point;let qe=le-B.direction;return function(je,it,yt,Ot,Nt){return xe(je,it,yt,Ot,void 0,Nt)}(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 lt(le,w,B){let Q=le+B.translation[0],ee=w+B.translation[1],se;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(se=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),se.point.x=(.5*se.point.x+.5)*B.width,se.point.y=(.5*-se.point.y+.5)*B.height):(se=ut(Q,ee,B.labelPlaneMatrix,B.getElevation),se.isOccluded=!1),se}function Gt(le,w,B){return le._unit()._perp()._mult(w*B)}function Vt(le,w,B,Q,ee,se,qe,je,it){if(je.projectionCache.offsets[le])return je.projectionCache.offsets[le];let yt=B.add(w);if(le+it.direction=ee)return je.projectionCache.offsets[le]=yt,yt;let Ot=Se(le+it.direction,je,it),Nt=Gt(Ot.sub(B),qe,it.direction),hr=B.add(Nt),Sr=Ot.add(Nt);return je.projectionCache.offsets[le]=a.ak(se,yt,hr,Sr)||yt,je.projectionCache.offsets[le]}function ar(le,w,B,Q,ee,se,qe,je,it){let yt=Q?le-w:le+w,Ot=yt>0?1:-1,Nt=0;Q&&(Ot*=-1,Nt=Math.PI),Ot<0&&(Nt+=Math.PI);let hr,Sr=Ot>0?se+ee:se+ee+1;je.projectionCache.cachedAnchorPoint?hr=je.projectionCache.cachedAnchorPoint:(hr=lt(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=hr);let he,be,Pe=hr,Oe=hr,Je=0,He=0,et=Math.abs(yt),Mt=[],Rt;for(;Je+He<=et;){if(Sr+=Ot,Sr=qe)return null;Je+=He,Oe=Pe,be=he;let mr={absOffsetX:et,direction:Ot,distanceFromAnchor:Je,previousVertex:Oe};if(Pe=Se(Sr,je,mr),B===0)Mt.push(Oe),Rt=Pe.sub(Oe);else{let Dr,zr=Pe.sub(Oe);Dr=zr.mag()===0?Gt(Se(Sr+Ot,je,mr).sub(Pe),B,Ot):Gt(zr,B,Ot),be||(be=Oe.add(Dr)),he=Vt(Sr,Dr,Pe,se,qe,be,B,je,mr),Mt.push(be),Rt=he.sub(be)}He=Rt.mag()}let Ut=Rt._mult((et-Je)/He)._add(be||Oe),tr=Nt+Math.atan2(Pe.y-Oe.y,Pe.x-Oe.x);return Mt.push(Ut),{point:Ut,angle:it?tr:0,path:Mt}}let Qr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ai(le,w){for(let B=0;B=1;ea--)Qi.push(Li.path[ea]);for(let ea=1;eaGa.signedDistanceFromCamera<=0)?[]:ea.map(Ga=>Ga.point)}let pa=[];if(Qi.length>0){let ea=Qi[0].clone(),Ga=Qi[0].clone();for(let To=1;To=zr.x&&Ga.x<=Xr.x&&ea.y>=zr.y&&Ga.y<=Xr.y?[Qi]:Ga.xXr.x||Ga.yXr.y?[]:a.al([Qi],zr.x,zr.y,Xr.x,Xr.y)}for(let ea of pa){di.reset(ea,.25*Dr);let Ga=0;Ga=di.length<=.5*Dr?1:Math.ceil(di.paddedLength/Mn)+1;for(let To=0;Tout(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,se=-1/0,qe=-1/0;for(let Ot of w){let Nt=new a.P(Ot.x+ri,Ot.y+ri);Q=Math.min(Q,Nt.x),ee=Math.min(ee,Nt.y),se=Math.max(se,Nt.x),qe=Math.max(qe,Nt.y),B.push(Nt)}let je=this.grid.query(Q,ee,se,qe).concat(this.ignoredGrid.query(Q,ee,se,qe)),it={},yt={};for(let Ot of je){let Nt=Ot.key;if(it[Nt.bucketInstanceId]===void 0&&(it[Nt.bucketInstanceId]={}),it[Nt.bucketInstanceId][Nt.featureIndex])continue;let hr=[new a.P(Ot.x1,Ot.y1),new a.P(Ot.x2,Ot.y1),new a.P(Ot.x2,Ot.y2),new a.P(Ot.x1,Ot.y2)];a.am(B,hr)&&(it[Nt.bucketInstanceId][Nt.featureIndex]=!0,yt[Nt.bucketInstanceId]===void 0&&(yt[Nt.bucketInstanceId]=[]),yt[Nt.bucketInstanceId].push(Nt.featureIndex))}return yt}insertCollisionBox(w,B,Q,ee,se,qe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:se,collisionGroupID:qe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,se,qe){let je=Q?this.ignoredGrid:this.grid,it={bucketInstanceId:ee,featureIndex:se,collisionGroupID:qe,overlapMode:B};for(let yt=0;yt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,Dr.x,Dr.y,ee,yt));tr=mr.some(Dr=>!Dr.isOccluded),Ut=mr.map(Dr=>Dr.point)}else tr=!0;return{box:a.ao(Ut),allPointsOccluded:!tr}}}function nn(le,w,B){return w*(a.X/(le.tileSize*Math.pow(2,B-le.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 Ni{constructor(w,B,Q,ee,se){this.text=new Wi(w?w.text:null,B,Q,se),this.icon=new Wi(w?w.icon:null,B,ee,se)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class _n{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class $i{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class zn{constructor(w,B,Q,ee,se){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=se}}class Wn{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 It(le,w,B,Q,ee){let{horizontalAlign:se,verticalAlign:qe}=a.au(le);return new a.P(-(se-.5)*w+Q[0]*ee,-(qe-.5)*B+Q[1]*ee)}class ft{constructor(w,B,Q,ee,se,qe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new bi(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Wn(se),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 se=Q.getBucket(B),qe=Q.latestFeatureIndex;if(!se||!qe||B.id!==se.layerIds[0])return;let je=Q.collisionBoxArray,it=se.layers[0].layout,yt=se.layers[0].paint,Ot=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Nt=Q.tileSize/a.X,hr=Q.tileID.toUnwrapped(),Sr=this.transform.calculatePosMatrix(hr),he=it.get("text-pitch-alignment")==="map",be=it.get("text-rotation-alignment")==="map",Pe=nn(Q,1,this.transform.zoom),Oe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,yt.get("text-translate"),yt.get("text-translate-anchor")),Je=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,yt.get("icon-translate"),yt.get("icon-translate-anchor")),He=Or(Sr,he,be,this.transform,Pe),et=null;if(he){let Rt=Nr(Sr,he,be,this.transform,Pe);et=a.L([],this.transform.labelPlaneMatrix,Rt)}this.retainedQueryData[se.bucketInstanceId]=new zn(se.bucketInstanceId,qe,se.sourceLayerIndex,se.index,Q.tileID);let Mt={bucket:se,layout:it,translationText:Oe,translationIcon:Je,posMatrix:Sr,unwrappedTileID:hr,textLabelPlaneMatrix:He,labelToScreenMatrix:et,scale:Ot,textPixelRatio:Nt,holdingForFade:Q.holdingForFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:a.ag(se.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(se.sourceID)};if(ee)for(let Rt of se.sortKeyRanges){let{sortKey:Ut,symbolInstanceStart:tr,symbolInstanceEnd:mr}=Rt;w.push({sortKey:Ut,symbolInstanceStart:tr,symbolInstanceEnd:mr,parameters:Mt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:se.symbolInstances.length,parameters:Mt})}attemptAnchorPlacement(w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he,be,Pe,Oe,Je,He){let et=a.aq[w.textAnchor],Mt=[w.textOffset0,w.textOffset1],Rt=It(et,Q,ee,Mt,se),Ut=this.collisionIndex.placeCollisionBox(B,hr,it,yt,Ot,je,qe,Pe,Nt.predicate,He,Rt);if((!Je||this.collisionIndex.placeCollisionBox(Je,hr,it,yt,Ot,je,qe,Oe,Nt.predicate,He,Rt).placeable)&&Ut.placeable){let tr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Sr.crossTileID]&&this.prevPlacement.placements[Sr.crossTileID]&&this.prevPlacement.placements[Sr.crossTileID].text&&(tr=this.prevPlacement.variableOffsets[Sr.crossTileID].anchor),Sr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Sr.crossTileID]={textOffset:Mt,width:Q,height:ee,anchor:et,textBoxScale:se,prevAnchor:tr},this.markUsedJustification(he,et,Sr,be),he.allowVerticalPlacement&&(this.markUsedOrientation(he,be,Sr),this.placedOrientations[Sr.crossTileID]=be),{shift:Rt,placedGlyphBoxes:Ut}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:se,translationText:qe,translationIcon:je,posMatrix:it,unwrappedTileID:yt,textLabelPlaneMatrix:Ot,labelToScreenMatrix:Nt,textPixelRatio:hr,holdingForFade:Sr,collisionBoxArray:he,partiallyEvaluatedTextSize:be,collisionGroup:Pe}=w.parameters,Oe=se.get("text-optional"),Je=se.get("icon-optional"),He=a.ar(se,"text-overlap","text-allow-overlap"),et=He==="always",Mt=a.ar(se,"icon-overlap","icon-allow-overlap"),Rt=Mt==="always",Ut=se.get("text-rotation-alignment")==="map",tr=se.get("text-pitch-alignment")==="map",mr=se.get("icon-text-fit")!=="none",Dr=se.get("symbol-z-order")==="viewport-y",zr=et&&(Rt||!ee.hasIconData()||Je),Xr=Rt&&(et||!ee.hasTextData()||Oe);!ee.collisionArrays&&he&&ee.deserializeCollisionBoxes(he);let di=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),Li=(Ci,Qi,Mn)=>{var pa,ea;if(B[Ci.crossTileID])return;if(Sr)return void(this.placements[Ci.crossTileID]=new _n(!1,!1,!1));let Ga=!1,To=!1,Wa=!0,co=null,Do={box:null,placeable:!1,offscreen:null},Rs={box:null,placeable:!1,offscreen:null},As=null,yo=null,po=null,_l=0,Vl=0,Xu=0;Qi.textFeatureIndex?_l=Qi.textFeatureIndex:Ci.useRuntimeCollisionCircles&&(_l=Ci.featureIndex),Qi.verticalTextFeatureIndex&&(Vl=Qi.verticalTextFeatureIndex);let cu=Qi.textBox;if(cu){let Rl=we=>{let Be=a.ah.horizontal;if(ee.allowVerticalPlacement&&!we&&this.prevPlacement){let Ue=this.prevPlacement.placedOrientations[Ci.crossTileID];Ue&&(this.placedOrientations[Ci.crossTileID]=Ue,Be=Ue,this.markUsedOrientation(ee,Be,Ci))}return Be},zl=(we,Be)=>{if(ee.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Qi.verticalTextBox){for(let Ue of ee.writingModes)if(Ue===a.ah.vertical?(Do=Be(),Rs=Do):Do=we(),Do&&Do.placeable)break}else Do=we()},Z=Ci.textAnchorOffsetStartIndex,oe=Ci.textAnchorOffsetEndIndex;if(oe===Z){let we=(Be,Ue)=>{let We=this.collisionIndex.placeCollisionBox(Be,He,hr,it,yt,tr,Ut,qe,Pe.predicate,di);return We&&We.placeable&&(this.markUsedOrientation(ee,Ue,Ci),this.placedOrientations[Ci.crossTileID]=Ue),We};zl(()=>we(cu,a.ah.horizontal),()=>{let Be=Qi.verticalTextBox;return ee.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Be?we(Be,a.ah.vertical):{box:null,offscreen:null}}),Rl(Do&&Do.placeable)}else{let we=a.aq[(ea=(pa=this.prevPlacement)===null||pa===void 0?void 0:pa.variableOffsets[Ci.crossTileID])===null||ea===void 0?void 0:ea.anchor],Be=(We,wt,tt)=>{let zt=We.x2-We.x1,or=We.y2-We.y1,lr=Ci.textBoxScale,Rr=mr&&Mt==="never"?wt:null,Ir=null,oi=He==="never"?1:2,ui="never";we&&oi++;for(let qr=0;qrBe(cu,Qi.iconBox,a.ah.horizontal),()=>{let We=Qi.verticalTextBox;return ee.allowVerticalPlacement&&(!Do||!Do.placeable)&&Ci.numVerticalGlyphVertices>0&&We?Be(We,Qi.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Do&&(Ga=Do.placeable,Wa=Do.offscreen);let Ue=Rl(Do&&Do.placeable);if(!Ga&&this.prevPlacement){let We=this.prevPlacement.variableOffsets[Ci.crossTileID];We&&(this.variableOffsets[Ci.crossTileID]=We,this.markUsedJustification(ee,We.anchor,Ci,Ue))}}}if(As=Do,Ga=As&&As.placeable,Wa=As&&As.offscreen,Ci.useRuntimeCollisionCircles){let Rl=ee.text.placedSymbolArray.get(Ci.centerJustifiedTextSymbolIndex),zl=a.ai(ee.textSizeData,be,Rl),Z=se.get("text-padding");yo=this.collisionIndex.placeCollisionCircles(He,Rl,ee.lineVertexArray,ee.glyphOffsetArray,zl,it,yt,Ot,Nt,Q,tr,Pe.predicate,Ci.collisionCircleDiameter,Z,qe,di),yo.circles.length&&yo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),Ga=et||yo.circles.length>0&&!yo.collisionDetected,Wa=Wa&&yo.offscreen}if(Qi.iconFeatureIndex&&(Xu=Qi.iconFeatureIndex),Qi.iconBox){let Rl=zl=>this.collisionIndex.placeCollisionBox(zl,Mt,hr,it,yt,tr,Ut,je,Pe.predicate,di,mr&&co?co:void 0);Rs&&Rs.placeable&&Qi.verticalIconBox?(po=Rl(Qi.verticalIconBox),To=po.placeable):(po=Rl(Qi.iconBox),To=po.placeable),Wa=Wa&&po.offscreen}let el=Oe||Ci.numHorizontalGlyphVertices===0&&Ci.numVerticalGlyphVertices===0,nu=Je||Ci.numIconVertices===0;el||nu?nu?el||(To=To&&Ga):Ga=To&&Ga:To=Ga=To&&Ga;let zc=To&&po.placeable;if(Ga&&As.placeable&&this.collisionIndex.insertCollisionBox(As.box,He,se.get("text-ignore-placement"),ee.bucketInstanceId,Rs&&Rs.placeable&&Vl?Vl:_l,Pe.ID),zc&&this.collisionIndex.insertCollisionBox(po.box,Mt,se.get("icon-ignore-placement"),ee.bucketInstanceId,Xu,Pe.ID),yo&&Ga&&this.collisionIndex.insertCollisionCircles(yo.circles,He,se.get("text-ignore-placement"),ee.bucketInstanceId,_l,Pe.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Mn,Qi,As,po,yo),Ci.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[Ci.crossTileID]=new _n(Ga||zr,To||Xr,Wa||ee.justReloaded),B[Ci.crossTileID]=!0};if(Dr){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Ci=ee.getSortedSymbolIndexes(this.transform.angle);for(let Qi=Ci.length-1;Qi>=0;--Qi){let Mn=Ci[Qi];Li(ee.symbolInstances.get(Mn),ee.collisionArrays[Mn],Mn)}}else for(let Ci=w.symbolInstanceStart;Ci=0&&(w.text.placedSymbolArray.get(je).crossTileID=se>=0&&je!==se?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,se=B===a.ah.vertical?B:0,qe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let je of qe)w.text.placedSymbolArray.get(je).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=se)}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,se=B?B.opacities:{},qe=B?B.variableOffsets:{},je=B?B.placedOrientations:{};for(let it in this.placements){let yt=this.placements[it],Ot=se[it];Ot?(this.opacities[it]=new Ni(Ot,ee,yt.text,yt.icon),Q=Q||yt.text!==Ot.text.placed||yt.icon!==Ot.icon.placed):(this.opacities[it]=new Ni(null,ee,yt.text,yt.icon,yt.skipFade),Q=Q||yt.text||yt.icon)}for(let it in se){let yt=se[it];if(!this.opacities[it]){let Ot=new Ni(yt,ee,!1,!1);Ot.isHidden()||(this.opacities[it]=Ot,Q=Q||yt.text.placed||yt.icon.placed)}}for(let it in qe)this.variableOffsets[it]||!this.opacities[it]||this.opacities[it].isHidden()||(this.variableOffsets[it]=qe[it]);for(let it in je)this.placedOrientations[it]||!this.opacities[it]||this.opacities[it].isHidden()||(this.placedOrientations[it]=je[it]);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 se=ee.getBucket(w);se&&ee.latestFeatureIndex&&w.id===se.layerIds[0]&&this.updateBucketOpacities(se,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 se=w.layers[0],qe=se.layout,je=new Ni(null,0,!1,!1,!0),it=qe.get("text-allow-overlap"),yt=qe.get("icon-allow-overlap"),Ot=se._unevaluatedLayout.hasValue("text-variable-anchor")||se._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Nt=qe.get("text-rotation-alignment")==="map",hr=qe.get("text-pitch-alignment")==="map",Sr=qe.get("icon-text-fit")!=="none",he=new Ni(null,0,it&&(yt||!w.hasIconData()||qe.get("icon-optional")),yt&&(it||!w.hasTextData()||qe.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let be=(Oe,Je,He)=>{for(let et=0;et0,tr=this.placedOrientations[Je.crossTileID],mr=tr===a.ah.vertical,Dr=tr===a.ah.horizontal||tr===a.ah.horizontalOnly;if(He>0||et>0){let Xr=Mi(Rt.text);be(w.text,He,mr?Pi:Xr),be(w.text,et,Dr?Pi:Xr);let di=Rt.text.isHidden();[Je.rightJustifiedTextSymbolIndex,Je.centerJustifiedTextSymbolIndex,Je.leftJustifiedTextSymbolIndex].forEach(Qi=>{Qi>=0&&(w.text.placedSymbolArray.get(Qi).hidden=di||mr?1:0)}),Je.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(Je.verticalPlacedTextSymbolIndex).hidden=di||Dr?1:0);let Li=this.variableOffsets[Je.crossTileID];Li&&this.markUsedJustification(w,Li.anchor,Je,tr);let Ci=this.placedOrientations[Je.crossTileID];Ci&&(this.markUsedJustification(w,"left",Je,Ci),this.markUsedOrientation(w,Ci,Je))}if(Ut){let Xr=Mi(Rt.icon),di=!(Sr&&Je.verticalPlacedIconSymbolIndex&&mr);Je.placedIconSymbolIndex>=0&&(be(w.icon,Je.numIconVertices,di?Xr:Pi),w.icon.placedSymbolArray.get(Je.placedIconSymbolIndex).hidden=Rt.icon.isHidden()),Je.verticalPlacedIconSymbolIndex>=0&&(be(w.icon,Je.numVerticalIconVertices,di?Pi:Xr),w.icon.placedSymbolArray.get(Je.verticalPlacedIconSymbolIndex).hidden=Rt.icon.isHidden())}let zr=Pe&&Pe.has(Oe)?Pe.get(Oe):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let Xr=w.collisionArrays[Oe];if(Xr){let di=new a.P(0,0);if(Xr.textBox||Xr.verticalTextBox){let Li=!0;if(Ot){let Ci=this.variableOffsets[Mt];Ci?(di=It(Ci.anchor,Ci.width,Ci.height,Ci.textOffset,Ci.textBoxScale),Nt&&di._rotate(hr?this.transform.angle:-this.transform.angle)):Li=!1}if(Xr.textBox||Xr.verticalTextBox){let Ci;Xr.textBox&&(Ci=mr),Xr.verticalTextBox&&(Ci=Dr),jt(w.textCollisionBox.collisionVertexArray,Rt.text.placed,!Li||Ci,zr.text,di.x,di.y)}}if(Xr.iconBox||Xr.verticalIconBox){let Li=!!(!Dr&&Xr.verticalIconBox),Ci;Xr.iconBox&&(Ci=Li),Xr.verticalIconBox&&(Ci=!Li),jt(w.iconCollisionBox.collisionVertexArray,Rt.icon.placed,Ci,zr.icon,Sr?di.x:0,Sr?di.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 Oe=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Oe.invProjMatrix,w.placementViewportMatrix=Oe.viewportMatrix,w.collisionCircleArray=Oe.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 jt(le,w,B,Q,ee,se){Q&&Q.length!==0||(Q=[0,0,0,0]);let qe=Q[0]-ri,je=Q[1]-ri,it=Q[2]-ri,yt=Q[3]-ri;le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,qe,je),le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,it,je),le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,it,yt),le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,qe,yt)}let Zt=Math.pow(2,25),yr=Math.pow(2,24),Fr=Math.pow(2,17),Zr=Math.pow(2,16),Vr=Math.pow(2,9),gi=Math.pow(2,8),Si=Math.pow(2,1);function Mi(le){if(le.opacity===0&&!le.placed)return 0;if(le.opacity===1&&le.placed)return 4294967295;let w=le.placed?1:0,B=Math.floor(127*le.opacity);return B*Zt+w*yr+B*Fr+w*Zr+B*Vr+w*gi+B*Si+w}let Pi=0;function Gi(){return{isOccluded:(le,w,B)=>!1,getPitchedTextCorrection:(le,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(le,w,B,Q){throw new Error("Not implemented.")},translatePosition:(le,w,B,Q)=>function(ee,se,qe,je,it=!1){if(!qe[0]&&!qe[1])return[0,0];let yt=it?je==="map"?ee.angle:0:je==="viewport"?-ee.angle:0;if(yt){let Ot=Math.sin(yt),Nt=Math.cos(yt);qe=[qe[0]*Nt-qe[1]*Ot,qe[0]*Ot+qe[1]*Nt]}return[it?qe[0]:nn(se,qe[0],ee.zoom),it?qe[1]:nn(se,qe[1],ee.zoom)]}(le,w,B,Q),getCircleRadiusCorrection:le=>1}}class Ki{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,se){let qe=this._bucketParts;for(;this._currentTileIndexje.sortKey-it.sortKey));this._currentPartIndex!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let qe=B[w[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(qe.type==="symbol"&&(!qe.minzoom||qe.minzoom<=je)&&(!qe.maxzoom||qe.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new Ki(qe)),this._inProgressLayer.continuePlacement(Q[qe.source],this.placement,this._showCollisionBoxes,qe,se))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let jn=512/a.X/2;class la{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let se=0;se({x:Math.floor(it.anchorX*jn),y:Math.floor(it.anchorY*jn)})),crossTileIDs:qe.map(it=>it.crossTileID)};if(je.positions.length>128){let it=new a.av(je.positions.length,16,Uint16Array);for(let{x:yt,y:Ot}of je.positions)it.add(yt,Ot);it.finish(),delete je.positions,je.index=it}this._symbolsByKey[se]=je}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:se}=this.tileID.canonical,{x:qe,y:je,z:it}=B.canonical,yt=jn/Math.pow(2,it-se),Ot=(je*a.X+w.anchorY)*yt,Nt=ee*a.X*jn;return{x:Math.floor((qe*a.X+w.anchorX)*yt-Q*a.X*jn),y:Math.floor(Ot-Nt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class Fa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Da{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],se={};for(let qe in ee){let je=ee[qe];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+B),se[je.tileID.key]=je}this.indexes[Q]=se}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 se=0;sew.overscaledZ)for(let je in qe){let it=qe[je];it.tileID.isChildOf(w)&&it.findMatches(B.symbolInstances,w,ee)}else{let je=qe[w.scaledTo(Number(se)).key];je&&je.findMatches(B.symbolInstances,w,ee)}}for(let se=0;se{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let oa=(le,w)=>a.t(le,w&&w.filter(B=>B.identifier!=="source.canvas")),Sn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(Te(),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 H(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new ae(256,512),this.crossTileSymbolIndex=new jo,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()),bt().on(er,this._rtlPluginLoaded),this.on("data",Q=>{if(Q.dataType!=="source"||Q.sourceDataType!=="metadata")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let se=ee.getSource();if(se&&se.vectorLayerIds)for(let qe in this._layers){let je=this._layers[qe];je.source===se.id&&this._validateLayer(je)}})}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 se=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(qe=>{this._loadStyleRequest=null,this._load(qe.data,B,Q)}).catch(qe=>{this._loadStyleRequest=null,qe&&!se.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(Sn,{validate:!1})}_load(w,B,Q){var ee;let se=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!oa(this,a.u(se))){this._loaded=!0,this.stylesheet=se;for(let qe in se.sources)this.addSource(qe,se.sources[qe],{validate:!1});se.sprite?this._loadSprite(se.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(se.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(se,qe,je,it){return a._(this,void 0,void 0,function*(){let yt=C(se),Ot=je>1?"@2x":"",Nt={},hr={};for(let{id:Sr,url:he}of yt){let be=qe.transformRequest(M(he,Ot,".json"),"SpriteJSON");Nt[Sr]=a.h(be,it);let Pe=qe.transformRequest(M(he,Ot,".png"),"SpriteImage");hr[Sr]=g.getImage(Pe,it)}return yield Promise.all([...Object.values(Nt),...Object.values(hr)]),function(Sr,he){return a._(this,void 0,void 0,function*(){let be={};for(let Pe in Sr){be[Pe]={};let Oe=u.getImageCanvasContext((yield he[Pe]).data),Je=(yield Sr[Pe]).data;for(let He in Je){let{width:et,height:Mt,x:Rt,y:Ut,sdf:tr,pixelRatio:mr,stretchX:Dr,stretchY:zr,content:Xr,textFitWidth:di,textFitHeight:Li}=Je[He];be[Pe][He]={data:null,pixelRatio:mr,sdf:tr,stretchX:Dr,stretchY:zr,content:Xr,textFitWidth:di,textFitHeight:Li,spriteData:{width:et,height:Mt,x:Rt,y:Ut,context:Oe}}}}return be})}(Nt,hr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(se=>{if(this._spriteRequest=null,se)for(let qe in se){this._spritesImagesIds[qe]=[];let je=this._spritesImagesIds[qe]?this._spritesImagesIds[qe].filter(it=>!(it in se)):[];for(let it of je)this.imageManager.removeImage(it),this._changedImages[it]=!0;for(let it in se[qe]){let yt=qe==="default"?it:`${qe}:${it}`;this._spritesImagesIds[qe].push(yt),yt in this.imageManager.images?this.imageManager.updateImage(yt,se[qe][it],!1):this.imageManager.addImage(yt,se[qe][it]),B&&(this._changedImages[yt]=!0)}}}).catch(se=>{this._spriteRequest=null,ee=se,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 se of w)if(Q[se]){let qe=B?a.aB(Q[se]):Q[se];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),se=Object.keys(this._removedLayers);(ee.length||se.length)&&this._updateWorkerLayers(ee,se);for(let qe in this._updatedSources){let je=this._updatedSources[qe];if(je==="reload")this._reloadSource(qe);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);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 se=this.sourceCaches[ee];Q[ee]=se.used,se.used=!1}for(let ee of this._order){let se=this._layers[ee];se.recalculate(w,this._availableImages),!se.isHidden(w.zoom)&&se.source&&(this.sourceCaches[se.source].used=!0)}for(let ee in Q){let se=this.sourceCaches[ee];!!Q[ee]!=!!se.used&&se.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)&&oa(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let se=a.aC(ee,w),qe=this._getOperationsToPerform(se);if(qe.unimplemented.length>0)throw new Error(`Unimplemented: ${qe.unimplemented.join(", ")}.`);if(qe.operations.length===0)return!1;for(let je of qe.operations)je();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 dt(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 se;if(w.type==="custom"){if(oa(this,a.aD(w)))return;se=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;se=a.aA(w),this._validateLayer(se),se.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]=se,this._removedLayers[ee]&&se.source&&se.type!=="custom"){let je=this._removedLayers[ee];delete this._removedLayers[ee],je.type!==se.type?this._updatedSources[se.source]="clear":(this._updatedSources[se.source]="reload",this.sourceCaches[se.source].pause())}this._updateLayer(se),se.onAdd&&se.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 se=this.getLayer(w);se?a.aE(se.getLayoutProperty(B),Q)||(se.setLayoutProperty(B,Q,ee),this._updateLayer(se)):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 se=this.getLayer(w);se?a.aE(se.getPaintProperty(B),Q)||(se.setPaintProperty(B,Q,ee)&&this._updateLayer(se),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,se=this.sourceCaches[Q];if(se===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let qe=se.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."))),se.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 se=ee.getSource().type,qe=se==="vector"?w.sourceLayer:void 0;se!=="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,se=>se.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},se=>se!==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 je=this._order[qe];if(B(je)){Q[je]=qe;for(let it of w){let yt=it[je];if(yt)for(let Ot of yt)ee.push(Ot)}}}ee.sort((qe,je)=>je.intersectionZ-qe.intersectionZ);let se=[];for(let qe=this._order.length-1;qe>=0;qe--){let je=this._order[qe];if(B(je))for(let it=ee.length-1;it>=0;it--){let yt=ee[it].feature;if(Q[yt.layer.id]{let tr=Oe.featureSortOrder;if(tr){let mr=tr.indexOf(Rt.featureIndex);return tr.indexOf(Ut.featureIndex)-mr}return Ut.featureIndex-Rt.featureIndex});for(let Rt of Mt)et.push(Rt)}}for(let Oe in he)he[Oe].forEach(Je=>{let He=Je.feature,et=yt[je[Oe].source].getFeatureState(He.layer["source-layer"],He.id);He.source=He.layer.source,He.layer["source-layer"]&&(He.sourceLayer=He.layer["source-layer"]),He.state=et});return he}(this._layers,qe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(se)}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,se){let qe=ee.getRenderableIds().map(yt=>ee.getTileByID(yt)),je=[],it={};for(let yt=0;ythr.getTileByID(Sr)).sort((Sr,he)=>he.tileID.overscaledZ-Sr.tileID.overscaledZ||(Sr.tileID.isLessThan(he.tileID)?-1:1))}let Nt=this.crossTileSymbolIndex.addLayer(Ot,it[Ot.source],w.center.lng);qe=qe||Nt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((se=se||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new ka(w,this.map.terrain,this._order,se,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,it),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),je=!0),qe&&this.pauseablePlacement.placement.setStale()),je||qe)for(let yt of this._order){let Ot=this._layers[yt];Ot.type==="symbol"&&this.placement.updateLayerOpacities(Ot,it[Ot.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 se=[{id:w,url:B}],qe=[...C(this.stylesheet.sprite),...se];this._validate(a.u.sprite,"sprite",qe,null,Q)||(this.stylesheet.sprite=qe,this._loadSprite(se,!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 oo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let xn={prelude:_t(`#ifdef GL_ES +`),mapOnErrorMsg:"Map error."}});var Fk=ye(($yr,uHe)=>{"use strict";var aHe=Mr(),oHe=va().defaultLine,bGt=Ju().attributes,wGt=Su(),TGt=Uc().textposition,AGt=Bu().overrideAll,SGt=Vs().templatedArray,sHe=bx(),lHe=wGt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});lHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var MGt=uHe.exports=AGt({_arrayAttrRegexps:[aHe.counterRegex("map",".layers",!0)],domain:bGt({name:"map"}),style:{valType:"any",values:sHe.styleValuesMap,dflt:sHe.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:SGt("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:oHe},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:oHe}},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:lHe,textposition:aHe.extendFlat({},TGt,{arrayOk:!1})}})},"plot","from-root");MGt.uirevision={valType:"any",editType:"none"}});var JF=ye((Qyr,hHe)=>{"use strict";var EGt=Wo().hovertemplateAttrs,kGt=Wo().texttemplateAttrs,CGt=Eg(),qk=H2(),AA=Uc(),cHe=Fk(),LGt=vl(),PGt=Kl(),rw=no().extendFlat,IGt=Bu().overrideAll,DGt=Fk(),fHe=qk.line,SA=qk.marker;hHe.exports=IGt({lon:qk.lon,lat:qk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:rw({},DGt.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({},SA.opacity,{dflt:1})},mode:rw({},AA.mode,{dflt:"markers"}),text:rw({},AA.text,{}),texttemplate:kGt({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:rw({},AA.hovertext,{}),line:{color:fHe.color,width:fHe.width},connectgaps:AA.connectgaps,marker:rw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:SA.opacity,size:SA.size,sizeref:SA.sizeref,sizemin:SA.sizemin,sizemode:SA.sizemode},PGt("marker")),fill:qk.fill,fillcolor:CGt(),textfont:cHe.layers.symbol.textfont,textposition:cHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:AA.selected.marker},unselected:{marker:AA.unselected.marker},hoverinfo:rw({},LGt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:EGt()},"calc","nested")});var oJ=ye((e1r,dHe)=>{"use strict";var RGt=["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"];dHe.exports={isSupportedFont:function(e){return RGt.indexOf(e)!==-1}}});var gHe=ye((t1r,pHe)=>{"use strict";var Ok=Mr(),sJ=lu(),zGt=$p(),FGt=D0(),qGt=R0(),OGt=Ig(),vHe=JF(),BGt=oJ().isSupportedFont;pHe.exports=function(t,r,n,i){function a(g,E){return Ok.coerce(t,r,vHe,g,E)}function o(g,E){return Ok.coerce2(t,r,vHe,g,E)}var s=NGt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("hovertext"),a("hovertemplate"),a("mode"),a("below"),sJ.hasMarkers(r)){zGt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Ok.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Ok.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}sJ.hasLines(r)&&(FGt(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,x=a("cluster.enabled",v);if(x||sJ.hasText(r)){var b=i.font.family;qGt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:BGt(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"&&OGt(t,r,n,a),Ok.coerceSelectionMarkerOpacity(r,a)};function NGt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var lJ=ye((r1r,yHe)=>{"use strict";var mHe=Qa();yHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=mHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=mHe.tickText(o,o.c2l(s[1]),!0).text,i}});var uJ=ye((i1r,xHe)=>{"use strict";var _He=Mr();xHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=_He.isArrayOrTypedArray(r)?_He.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 MHe=ye((n1r,SHe)=>{"use strict";var THe=uo(),nv=Mr(),UGt=es().BADNUM,QF=tx(),bHe=Mu(),VGt=ao(),HGt=S3(),e7=lu(),GGt=oJ().isSupportedFont,jGt=uJ(),WGt=rp().appendArrayPointValue,ZGt=Ll().NEWLINES,XGt=Ll().BR_TAG_ALL;SHe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=e7.hasLines(n),s=e7.hasMarkers(n),l=e7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=$F("fill"),d=$F("line"),v=$F("circle"),x=$F("symbol"),b={fill:h,line:d,circle:v,symbol:x};if(!i)return b;var g;if((a||o)&&(g=QF.calcTraceToLineCoords(r)),a&&(h.geojson=QF.makePolygon(g),h.layout.visibility="visible",nv.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=QF.makeLine(g),d.layout.visibility="visible",nv.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var E=YGt(r);v.geojson=E.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":fJ(n.cluster.color,n.cluster.step),"circle-radius":fJ(n.cluster.size,n.cluster.step),"circle-opacity":fJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":wHe(n),"text-size":12}}),nv.extendFlat(v.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=KGt(r,t),nv.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(nv.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&nv.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,nv.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var k=(n.marker||{}).size,A=jGt(n.textposition,k);nv.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":A.anchor,"text-offset":A.offset,"text-font":wHe(n)}),nv.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function $F(e){return{type:e,geojson:QF.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function YGt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=nv.isArrayOrTypedArray(r.color),a=nv.isArrayOrTypedArray(r.size),o=nv.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;i&&(bHe.hasColorscale(t,"marker")?c=bHe.makeColorScaleFuncFromTrace(r):c=nv.identity);var f;a&&(f=HGt(t));var h;o&&(h=function(k){var A=THe(k)?+nv.constrain(k,0,1):0;return l(A)});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"),GGt(s)||(s=r);var l=s.split(", ");return l}});var LHe=ye((a1r,CHe)=>{"use strict";var JGt=Mr(),EHe=MHe(),MA=bx().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:MA+t+"-fill",line:MA+t+"-line",circle:MA+t+"-circle",symbol:MA+t+"-symbol",cluster:MA+t+"-cluster",clusterCount:MA+t+"-cluster-count"},this.below=null}var Bk=kHe.prototype;Bk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&JGt.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)};Bk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Bk.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 _=A[L];i.removeLayer(u.layerIds[_])}k||i.removeSource(u.sourceIds.circle)}function h(k){for(var A=ng.nonCluster,L=0;L=0;L--){var _=A[L];i.removeLayer(u.layerIds[_]),k||i.removeSource(u.sourceIds[_])}}function v(k){l?f(k):d(k)}function x(k){s?c(k):h(k)}function b(){for(var k=s?ng.cluster:ng.nonCluster,A=0;A=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};CHe.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=EHe(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 $Gt=Nc(),hJ=Mr(),QGt=oT(),ejt=hJ.fillText,tjt=es().BADNUM,rjt=bx().traceLayerPrefix;function ijt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=rjt+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 x(M){var p=M.lonlat;if(p[0]===tjt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=hJ.modHalf(p[0],360),T=p[1],F=s.project([P,T]),q=F.x-a.c2p([v,T]),V=F.y-o.c2p([P,r]),H=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(q*q+V*V)-H,1-3/H)}if($Gt.getClosest(n,x,e),e.index!==!1){var b=n[e.index],g=b.lonlat,E=[hJ.modHalf(g[0],360)+d,g[1]],k=a.c2p(E),A=o.c2p(E),L=b.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=A-L,e.y1=A+L;var _={};_[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,_);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=QGt(i,b),e.extraText=PHe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function PHe(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)&&ejt(t,e,u),u.join("
")}IHe.exports={hoverPoints:ijt,getExtraText:PHe}});var RHe=ye((s1r,DHe)=>{"use strict";DHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var FHe=ye((l1r,zHe)=>{"use strict";var njt=Mr(),ajt=lu(),ojt=es().BADNUM;zHe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!ajt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof dJ=="object"&&typeof vJ!="undefined"?vJ.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(dJ,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(D,S,R,j){return new(R||(R=Promise))(function(te,ue){function ve(at){try{Ze(j.next(at))}catch(Tt){ue(Tt)}}function Re(at){try{Ze(j.throw(at))}catch(Tt){ue(Tt)}}function Ze(at){var Tt;at.done?te(at.value):(Tt=at.value,Tt instanceof R?Tt:new R(function(Ft){Ft(Tt)})).then(ve,Re)}Ze((j=j.apply(D,S||[])).next())})}function o(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(D,S){this.x=D,this.y=S}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(D){return this.clone()._add(D)},sub:function(D){return this.clone()._sub(D)},multByPoint:function(D){return this.clone()._multByPoint(D)},divByPoint:function(D){return this.clone()._divByPoint(D)},mult:function(D){return this.clone()._mult(D)},div:function(D){return this.clone()._div(D)},rotate:function(D){return this.clone()._rotate(D)},rotateAround:function(D,S){return this.clone()._rotateAround(D,S)},matMult:function(D){return this.clone()._matMult(D)},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(D){return this.x===D.x&&this.y===D.y},dist:function(D){return Math.sqrt(this.distSqr(D))},distSqr:function(D){var S=D.x-this.x,R=D.y-this.y;return S*S+R*R},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(D){return Math.atan2(this.y-D.y,this.x-D.x)},angleWith:function(D){return this.angleWithSep(D.x,D.y)},angleWithSep:function(D,S){return Math.atan2(this.x*S-this.y*D,this.x*D+this.y*S)},_matMult:function(D){var S=D[2]*this.x+D[3]*this.y;return this.x=D[0]*this.x+D[1]*this.y,this.y=S,this},_add:function(D){return this.x+=D.x,this.y+=D.y,this},_sub:function(D){return this.x-=D.x,this.y-=D.y,this},_mult:function(D){return this.x*=D,this.y*=D,this},_div:function(D){return this.x/=D,this.y/=D,this},_multByPoint:function(D){return this.x*=D.x,this.y*=D.y,this},_divByPoint:function(D){return this.x/=D.x,this.y/=D.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var D=this.y;return this.y=this.x,this.x=-D,this},_rotate:function(D){var S=Math.cos(D),R=Math.sin(D),j=R*this.x+S*this.y;return this.x=S*this.x-R*this.y,this.y=j,this},_rotateAround:function(D,S){var R=Math.cos(D),j=Math.sin(D),te=S.y+j*(this.x-S.x)+R*(this.y-S.y);return this.x=S.x+R*(this.x-S.x)-j*(this.y-S.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(D){return D instanceof l?D:Array.isArray(D)?new l(D[0],D[1]):D};var u=o(s),c=f;function f(D,S,R,j){this.cx=3*D,this.bx=3*(R-D)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(j-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=D,this.p1y=S,this.p2x=R,this.p2y=j}f.prototype={sampleCurveX:function(D){return((this.ax*D+this.bx)*D+this.cx)*D},sampleCurveY:function(D){return((this.ay*D+this.by)*D+this.cy)*D},sampleCurveDerivativeX:function(D){return(3*this.ax*D+2*this.bx)*D+this.cx},solveCurveX:function(D,S){if(S===void 0&&(S=1e-6),D<0)return 0;if(D>1)return 1;for(var R=D,j=0;j<8;j++){var te=this.sampleCurveX(R)-D;if(Math.abs(te)te?ve=R:Re=R,R=.5*(Re-ve)+ve;return R},solve:function(D,S){return this.sampleCurveY(this.solveCurveX(D,S))}};var h=o(c);let d,v;function x(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,x())){let S=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(S){for(let j=0;j<5*5;j++){let te=4*j;S.fillStyle=`rgb(${te},${te+1},${te+2})`,S.fillRect(j%5,Math.floor(j/5),1,1)}let R=S.getImageData(0,0,5,5).data;for(let j=0;j<5*5*4;j++)if(j%4!=3&&R[j]!==j){v=!0;break}}}return v||!1}function g(D,S,R,j){let te=new h(D,S,R,j);return ue=>te.solve(ue)}let E=g(.25,.1,.25,1);function k(D,S,R){return Math.min(R,Math.max(S,D))}function A(D,S,R){let j=R-S,te=((D-S)%j+j)%j+S;return te===S?R:te}function L(D,...S){for(let R of S)for(let j in R)D[j]=R[j];return D}let _=1;function C(D,S,R){let j={};for(let te in D)j[te]=S.call(this,D[te],te,D);return j}function M(D,S,R){let j={};for(let te in D)S.call(this,D[te],te,D)&&(j[te]=D[te]);return j}function p(D){return Array.isArray(D)?D.map(p):typeof D=="object"&&D?C(D,p):D}let P={};function T(D){P[D]||(typeof console!="undefined"&&console.warn(D),P[D]=!0)}function F(D,S,R){return(R.y-D.y)*(S.x-D.x)>(S.y-D.y)*(R.x-D.x)}function q(D){return typeof WorkerGlobalScope!="undefined"&&D!==void 0&&D instanceof WorkerGlobalScope}let V=null;function H(D){return typeof ImageBitmap!="undefined"&&D instanceof ImageBitmap}let X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function G(D,S,R,j,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let ue=new VideoFrame(D,{timestamp:0});try{let ve=ue==null?void 0:ue.format;if(!ve||!ve.startsWith("BGR")&&!ve.startsWith("RGB"))throw new Error(`Unrecognized format ${ve}`);let Re=ve.startsWith("BGR"),Ze=new Uint8ClampedArray(j*te*4);if(yield ue.copyTo(Ze,function(at,Tt,Ft,Qt,sr){let Tr=4*Math.max(-Tt,0),Pr=(Math.max(0,Ft)-Ft)*Qt*4+Tr,$r=4*Qt,ni=Math.max(0,Tt),Ri=Math.max(0,Ft);return{rect:{x:ni,y:Ri,width:Math.min(at.width,Tt+Qt)-ni,height:Math.min(at.height,Ft+sr)-Ri},layout:[{offset:Pr,stride:$r}]}}(D,S,R,j,te)),Re)for(let at=0;atq(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Te=function(D,S){if(/:\/\//.test(D.url)&&!/^https?:|^file:/.test(D.url)){let j=Me(D.url);if(j)return j(D,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:D,targetMapId:ke},S)}if(!(/^file:/.test(R=D.url)||/^file:/.test(ie())&&!/^\w+:/.test(R))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(j,te){return a(this,void 0,void 0,function*(){let ue=new Request(j.url,{method:j.method||"GET",body:j.body,credentials:j.credentials,headers:j.headers,cache:j.cache,referrer:ie(),signal:te.signal});j.type!=="json"||ue.headers.has("Accept")||ue.headers.set("Accept","application/json");let ve=yield fetch(ue);if(!ve.ok){let at=yield ve.blob();throw new ge(ve.status,ve.statusText,j.url,at)}let Re;Re=j.type==="arrayBuffer"||j.type==="image"?ve.arrayBuffer():j.type==="json"?ve.json():ve.text();let Ze=yield Re;if(te.signal.aborted)throw ae();return{data:Ze,cacheControl:ve.headers.get("Cache-Control"),expires:ve.headers.get("Expires")}})}(D,S);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:D,mustQueue:!0,targetMapId:ke},S)}var R;return function(j,te){return new Promise((ue,ve)=>{var Re;let Ze=new XMLHttpRequest;Ze.open(j.method||"GET",j.url,!0),j.type!=="arrayBuffer"&&j.type!=="image"||(Ze.responseType="arraybuffer");for(let at in j.headers)Ze.setRequestHeader(at,j.headers[at]);j.type==="json"&&(Ze.responseType="text",!((Re=j.headers)===null||Re===void 0)&&Re.Accept||Ze.setRequestHeader("Accept","application/json")),Ze.withCredentials=j.credentials==="include",Ze.onerror=()=>{ve(new Error(Ze.statusText))},Ze.onload=()=>{if(!te.signal.aborted)if((Ze.status>=200&&Ze.status<300||Ze.status===0)&&Ze.response!==null){let at=Ze.response;if(j.type==="json")try{at=JSON.parse(Ze.response)}catch(Tt){return void ve(Tt)}ue({data:at,cacheControl:Ze.getResponseHeader("Cache-Control"),expires:Ze.getResponseHeader("Expires")})}else{let at=new Blob([Ze.response],{type:Ze.getResponseHeader("Content-Type")});ve(new ge(Ze.status,Ze.statusText,j.url,at))}},te.signal.addEventListener("abort",()=>{Ze.abort(),ve(ae())}),Ze.send(j.body)})}(D,S)};function Ee(D){if(!D||D.indexOf("://")<=0||D.indexOf("data:image/")===0||D.indexOf("blob:")===0)return!0;let S=new URL(D),R=window.location;return S.protocol===R.protocol&&S.host===R.host}function Ae(D,S,R){R[D]&&R[D].indexOf(S)!==-1||(R[D]=R[D]||[],R[D].push(S))}function ze(D,S,R){if(R&&R[D]){let j=R[D].indexOf(S);j!==-1&&R[D].splice(j,1)}}class Ce{constructor(S,R={}){L(this,R),this.type=S}}class me extends Ce{constructor(S,R={}){super("error",L({error:S},R))}}class De{on(S,R){return this._listeners=this._listeners||{},Ae(S,R,this._listeners),this}off(S,R){return ze(S,R,this._listeners),ze(S,R,this._oneTimeListeners),this}once(S,R){return R?(this._oneTimeListeners=this._oneTimeListeners||{},Ae(S,R,this._oneTimeListeners),this):new Promise(j=>this.once(S,j))}fire(S,R){typeof S=="string"&&(S=new Ce(S,R||{}));let j=S.type;if(this.listens(j)){S.target=this;let te=this._listeners&&this._listeners[j]?this._listeners[j].slice():[];for(let Re of te)Re.call(this,S);let ue=this._oneTimeListeners&&this._oneTimeListeners[j]?this._oneTimeListeners[j].slice():[];for(let Re of ue)ze(j,Re,this._oneTimeListeners),Re.call(this,S);let ve=this._eventedParent;ve&&(L(S,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),ve.fire(S))}else S instanceof me&&console.error(S.error);return this}listens(S){return this._listeners&&this._listeners[S]&&this._listeners[S].length>0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)}setEventedParent(S,R){return this._eventedParent=S,this._eventedParentData=R,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 Ge=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function nt(D,S){let R={};for(let j in D)j!=="ref"&&(R[j]=D[j]);return Ge.forEach(j=>{j in S&&(R[j]=S[j])}),R}function ct(D,S){if(Array.isArray(D)){if(!Array.isArray(S)||D.length!==S.length)return!1;for(let R=0;R`:D.itemType.kind==="value"?"array":`array<${S}>`}return D.kind}let Ve=[Lt,St,Et,dt,Ht,Br,$t,Ne(fr),Or,Nr,ut];function Xe(D,S){if(S.kind==="error")return null;if(D.kind==="array"){if(S.kind==="array"&&(S.N===0&&S.itemType.kind==="value"||!Xe(D.itemType,S.itemType))&&(typeof D.N!="number"||D.N===S.N))return null}else{if(D.kind===S.kind)return null;if(D.kind==="value"){for(let R of Ve)if(!Xe(R,S))return null}}return`Expected ${Ye(D)} but found ${Ye(S)} instead.`}function ht(D,S){return S.some(R=>R.kind===D.kind)}function Le(D,S){return S.some(R=>R==="null"?D===null:R==="array"?Array.isArray(D):R==="object"?D&&!Array.isArray(D)&&typeof D=="object":R===typeof D)}function xe(D,S){return D.kind==="array"&&S.kind==="array"?D.itemType.kind===S.itemType.kind&&typeof D.N=="number":D.kind===S.kind}let Se=.96422,lt=.82521,Gt=4/29,Vt=6/29,ar=3*Vt*Vt,Qr=Vt*Vt*Vt,ai=Math.PI/180,jr=180/Math.PI;function ri(D){return(D%=360)<0&&(D+=360),D}function bi([D,S,R,j]){let te,ue,ve=Wi((.2225045*(D=nn(D))+.7168786*(S=nn(S))+.0606169*(R=nn(R)))/1);D===S&&S===R?te=ue=ve:(te=Wi((.4360747*D+.3850649*S+.1430804*R)/Se),ue=Wi((.0139322*D+.0971045*S+.7141733*R)/lt));let Re=116*ve-16;return[Re<0?0:Re,500*(te-ve),200*(ve-ue),j]}function nn(D){return D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function Wi(D){return D>Qr?Math.pow(D,1/3):D/ar+Gt}function Ni([D,S,R,j]){let te=(D+16)/116,ue=isNaN(S)?te:te+S/500,ve=isNaN(R)?te:te-R/200;return te=1*$i(te),ue=Se*$i(ue),ve=lt*$i(ve),[_n(3.1338561*ue-1.6168667*te-.4906146*ve),_n(-.9787684*ue+1.9161415*te+.033454*ve),_n(.0719453*ue-.2289914*te+1.4052427*ve),j]}function _n(D){return(D=D<=.00304?12.92*D:1.055*Math.pow(D,1/2.4)-.055)<0?0:D>1?1:D}function $i(D){return D>Vt?D*D*D:ar*(D-Gt)}function zn(D){return parseInt(D.padEnd(2,D),16)/255}function Wn(D,S){return It(S?D/100:D,0,1)}function It(D,S,R){return Math.min(Math.max(S,D),R)}function ft(D){return!D.some(Number.isNaN)}let jt={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 Zt{constructor(S,R,j,te=1,ue=!0){this.r=S,this.g=R,this.b=j,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[S,R,j,te]))}static parse(S){if(S instanceof Zt)return S;if(typeof S!="string")return;let R=function(j){if((j=j.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=jt[j];if(te){let[ve,Re,Ze]=te;return[ve/255,Re/255,Ze/255,1]}if(j.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(j)){let ve=j.length<6?1:2,Re=1;return[zn(j.slice(Re,Re+=ve)),zn(j.slice(Re,Re+=ve)),zn(j.slice(Re,Re+=ve)),zn(j.slice(Re,Re+ve)||"ff")]}if(j.startsWith("rgb")){let ve=j.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ve){let[Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri]=ve,pi=[Tt||" ",sr||" ",$r].join("");if(pi===" "||pi===" /"||pi===",,"||pi===",,,"){let ki=[at,Qt,Pr].join(""),Zi=ki==="%%%"?100:ki===""?255:0;if(Zi){let ta=[It(+Ze/Zi,0,1),It(+Ft/Zi,0,1),It(+Tr/Zi,0,1),ni?Wn(+ni,Ri):1];if(ft(ta))return ta}}return}}let ue=j.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr]=ue,Pr=[Ze||" ",Tt||" ",Qt].join("");if(Pr===" "||Pr===" /"||Pr===",,"||Pr===",,,"){let $r=[+Re,It(+at,0,100),It(+Ft,0,100),sr?Wn(+sr,Tr):1];if(ft($r))return function([ni,Ri,pi,ki]){function Zi(ta){let Va=(ta+ni/30)%12,Io=Ri*Math.min(pi,1-pi);return pi-Io*Math.max(-1,Math.min(Va-3,9-Va,1))}return ni=ri(ni),Ri/=100,pi/=100,[Zi(0),Zi(8),Zi(4),ki]}($r)}}}(S);return R?new Zt(...R,!1):void 0}get rgb(){let{r:S,g:R,b:j,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[S/ue,R/ue,j/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(S){let[R,j,te,ue]=bi(S),ve=Math.sqrt(j*j+te*te);return[Math.round(1e4*ve)?ri(Math.atan2(te,j)*jr):NaN,ve,R,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",bi(this.rgb))}overwriteGetter(S,R){return Object.defineProperty(this,S,{value:R}),R}toString(){let[S,R,j,te]=this.rgb;return`rgba(${[S,R,j].map(ue=>Math.round(255*ue)).join(",")},${te})`}}Zt.black=new Zt(0,0,0,1),Zt.white=new Zt(1,1,1,1),Zt.transparent=new Zt(0,0,0,0),Zt.red=new Zt(1,0,0,1);class yr{constructor(S,R,j){this.sensitivity=S?R?"variant":"case":R?"accent":"base",this.locale=j,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(S,R){return this.collator.compare(S,R)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Fr{constructor(S,R,j,te,ue){this.text=S,this.image=R,this.scale=j,this.fontStack=te,this.textColor=ue}}class Zr{constructor(S){this.sections=S}static fromString(S){return new Zr([new Fr(S,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(S=>S.text.length!==0||S.image&&S.image.name.length!==0)}static factory(S){return S instanceof Zr?S:Zr.fromString(S)}toString(){return this.sections.length===0?"":this.sections.map(S=>S.text).join("")}}class Vr{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Vr)return S;if(typeof S=="number")return new Vr([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let R of S)if(typeof R!="number")return;switch(S.length){case 1:S=[S[0],S[0],S[0],S[0]];break;case 2:S=[S[0],S[1],S[0],S[1]];break;case 3:S=[S[0],S[1],S[2],S[1]]}return new Vr(S)}}toString(){return JSON.stringify(this.values)}}let gi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Si{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Si)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let R=0;R=0&&D<=255&&typeof S=="number"&&S>=0&&S<=255&&typeof R=="number"&&R>=0&&R<=255?j===void 0||typeof j=="number"&&j>=0&&j<=1?null:`Invalid rgba value [${[D,S,R,j].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof j=="number"?[D,S,R,j]:[D,S,R]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Gi(D){if(D===null||typeof D=="string"||typeof D=="boolean"||typeof D=="number"||D instanceof Zt||D instanceof yr||D instanceof Zr||D instanceof Vr||D instanceof Si||D instanceof Mi)return!0;if(Array.isArray(D)){for(let S of D)if(!Gi(S))return!1;return!0}if(typeof D=="object"){for(let S in D)if(!Gi(D[S]))return!1;return!0}return!1}function Ki(D){if(D===null)return Lt;if(typeof D=="string")return Et;if(typeof D=="boolean")return dt;if(typeof D=="number")return St;if(D instanceof Zt)return Ht;if(D instanceof yr)return _r;if(D instanceof Zr)return Br;if(D instanceof Vr)return Or;if(D instanceof Si)return ut;if(D instanceof Mi)return Nr;if(Array.isArray(D)){let S=D.length,R;for(let j of D){let te=Ki(j);if(R){if(R===te)continue;R=fr;break}R=te}return Ne(R||fr,S)}return $t}function ka(D){let S=typeof D;return D===null?"":S==="string"||S==="number"||S==="boolean"?String(D):D instanceof Zt||D instanceof Zr||D instanceof Vr||D instanceof Si||D instanceof Mi?D.toString():JSON.stringify(D)}class jn{constructor(S,R){this.type=S,this.value=R}static parse(S,R){if(S.length!==2)return R.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!Gi(S[1]))return R.error("invalid value");let j=S[1],te=Ki(j),ue=R.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new jn(te,j)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class la{constructor(S){this.name="ExpressionEvaluationError",this.message=S}toJSON(){return this.message}}let Fa={string:Et,number:St,boolean:dt,object:$t};class Da{constructor(S,R){this.type=S,this.args=R}static parse(S,R){if(S.length<2)return R.error("Expected at least one argument.");let j,te=1,ue=S[0];if(ue==="array"){let Re,Ze;if(S.length>2){let at=S[1];if(typeof at!="string"||!(at in Fa)||at==="object")return R.error('The item type argument of "array" must be one of string, number, boolean',1);Re=Fa[at],te++}else Re=fr;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return R.error('The length argument to "array" must be a positive integer literal',2);Ze=S[2],te++}j=Ne(Re,Ze)}else{if(!Fa[ue])throw new Error(`Types doesn't contain name = ${ue}`);j=Fa[ue]}let ve=[];for(;teS.outputDefined())}}let jo={"to-boolean":dt,"to-color":Ht,"to-number":St,"to-string":Et};class oa{constructor(S,R){this.type=S,this.args=R}static parse(S,R){if(S.length<2)return R.error("Expected at least one argument.");let j=S[0];if(!jo[j])throw new Error(`Can't parse ${j} as it is not part of the known types`);if((j==="to-boolean"||j==="to-string")&&S.length!==2)return R.error("Expected one argument.");let te=jo[j],ue=[];for(let ve=1;ve4?`Invalid rbga value ${JSON.stringify(R)}: expected an array containing either three or four numeric values.`:Pi(R[0],R[1],R[2],R[3]),!j))return new Zt(R[0]/255,R[1]/255,R[2]/255,R[3])}throw new la(j||`Could not parse color from value '${typeof R=="string"?R:JSON.stringify(R)}'`)}case"padding":{let R;for(let j of this.args){R=j.evaluate(S);let te=Vr.parse(R);if(te)return te}throw new la(`Could not parse padding from value '${typeof R=="string"?R:JSON.stringify(R)}'`)}case"variableAnchorOffsetCollection":{let R;for(let j of this.args){R=j.evaluate(S);let te=Si.parse(R);if(te)return te}throw new la(`Could not parse variableAnchorOffsetCollection from value '${typeof R=="string"?R:JSON.stringify(R)}'`)}case"number":{let R=null;for(let j of this.args){if(R=j.evaluate(S),R===null)return 0;let te=Number(R);if(!isNaN(te))return te}throw new la(`Could not convert ${JSON.stringify(R)} to number.`)}case"formatted":return Zr.fromString(ka(this.args[0].evaluate(S)));case"resolvedImage":return Mi.fromString(ka(this.args[0].evaluate(S)));default:return ka(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Sn=["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"?Sn[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(S){let R=this._parseColorCache[S];return R||(R=this._parseColorCache[S]=Zt.parse(S)),R}}class oo{constructor(S,R,j=[],te,ue=new bt,ve=[]){this.registry=S,this.path=j,this.key=j.map(Re=>`[${Re}]`).join(""),this.scope=ue,this.errors=ve,this.expectedType=te,this._isConstant=R}parse(S,R,j,te,ue={}){return R?this.concat(R,j,te)._parse(S,ue):this._parse(S,ue)}_parse(S,R){function j(te,ue,ve){return ve==="assert"?new Da(ue,[te]):ve==="coerce"?new oa(ue,[te]):te}if(S!==null&&typeof S!="string"&&typeof S!="boolean"&&typeof S!="number"||(S=["literal",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=S[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let ve=ue.parse(S,this);if(!ve)return null;if(this.expectedType){let Re=this.expectedType,Ze=ve.type;if(Re.kind!=="string"&&Re.kind!=="number"&&Re.kind!=="boolean"&&Re.kind!=="object"&&Re.kind!=="array"||Ze.kind!=="value")if(Re.kind!=="color"&&Re.kind!=="formatted"&&Re.kind!=="resolvedImage"||Ze.kind!=="value"&&Ze.kind!=="string")if(Re.kind!=="padding"||Ze.kind!=="value"&&Ze.kind!=="number"&&Ze.kind!=="array")if(Re.kind!=="variableAnchorOffsetCollection"||Ze.kind!=="value"&&Ze.kind!=="array"){if(this.checkSubtype(Re,Ze))return null}else ve=j(ve,Re,R.typeAnnotation||"coerce");else ve=j(ve,Re,R.typeAnnotation||"coerce");else ve=j(ve,Re,R.typeAnnotation||"coerce");else ve=j(ve,Re,R.typeAnnotation||"assert")}if(!(ve instanceof jn)&&ve.type.kind!=="resolvedImage"&&this._isConstant(ve)){let Re=new Ha;try{ve=new jn(ve.type,ve.evaluate(Re))}catch(Ze){return this.error(Ze.message),null}}return ve}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(S===void 0?"'undefined' value invalid. Use null instead.":typeof S=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof S} instead.`)}concat(S,R,j){let te=typeof S=="number"?this.path.concat(S):this.path,ue=j?this.scope.concat(j):this.scope;return new oo(this.registry,this._isConstant,te,R||null,ue,this.errors)}error(S,...R){let j=`${this.key}${R.map(te=>`[${te}]`).join("")}`;this.errors.push(new xt(j,S))}checkSubtype(S,R){let j=Xe(S,R);return j&&this.error(j),j}}class xn{constructor(S,R){this.type=R.type,this.bindings=[].concat(S),this.result=R}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let R of this.bindings)S(R[1]);S(this.result)}static parse(S,R){if(S.length<4)return R.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let j=[];for(let ue=1;ue=j.length)throw new la(`Array index out of bounds: ${R} > ${j.length-1}.`);if(R!==Math.floor(R))throw new la(`Array index must be an integer, but found ${R} instead.`);return j[R]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class Hr{constructor(S,R){this.type=dt,this.needle=S,this.haystack=R}static parse(S,R){if(S.length!==3)return R.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let j=R.parse(S[1],1,fr),te=R.parse(S[2],2,fr);return j&&te?ht(j.type,[dt,Et,St,Lt,fr])?new Hr(j,te):R.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(j.type)} instead`):null}evaluate(S){let R=this.needle.evaluate(S),j=this.haystack.evaluate(S);if(!j)return!1;if(!Le(R,["boolean","string","number","null"]))throw new la(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ki(R))} instead.`);if(!Le(j,["string","array"]))throw new la(`Expected second argument to be of type array or string, but found ${Ye(Ki(j))} instead.`);return j.indexOf(R)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class ti{constructor(S,R,j){this.type=St,this.needle=S,this.haystack=R,this.fromIndex=j}static parse(S,R){if(S.length<=2||S.length>=5)return R.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let j=R.parse(S[1],1,fr),te=R.parse(S[2],2,fr);if(!j||!te)return null;if(!ht(j.type,[dt,Et,St,Lt,fr]))return R.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(j.type)} instead`);if(S.length===4){let ue=R.parse(S[3],3,St);return ue?new ti(j,te,ue):null}return new ti(j,te)}evaluate(S){let R=this.needle.evaluate(S),j=this.haystack.evaluate(S);if(!Le(R,["boolean","string","number","null"]))throw new la(`Expected first argument to be of type boolean, string, number or null, but found ${Ye(Ki(R))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(S)),Le(j,["string"])){let ue=j.indexOf(R,te);return ue===-1?-1:[...j.slice(0,ue)].length}if(Le(j,["array"]))return j.indexOf(R,te);throw new la(`Expected second argument to be of type array or string, but found ${Ye(Ki(j))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class zi{constructor(S,R,j,te,ue,ve){this.inputType=S,this.type=R,this.input=j,this.cases=te,this.outputs=ue,this.otherwise=ve}static parse(S,R){if(S.length<5)return R.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return R.error("Expected an even number of arguments.");let j,te;R.expectedType&&R.expectedType.kind!=="value"&&(te=R.expectedType);let ue={},ve=[];for(let at=2;atNumber.MAX_SAFE_INTEGER)return Qt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Tr=="number"&&Math.floor(Tr)!==Tr)return Qt.error("Numeric branch labels must be integer values.");if(j){if(Qt.checkSubtype(j,Ki(Tr)))return null}else j=Ki(Tr);if(ue[String(Tr)]!==void 0)return Qt.error("Branch labels must be unique.");ue[String(Tr)]=ve.length}let sr=R.parse(Ft,at,te);if(!sr)return null;te=te||sr.type,ve.push(sr)}let Re=R.parse(S[1],1,fr);if(!Re)return null;let Ze=R.parse(S[S.length-1],S.length-1,te);return Ze?Re.type.kind!=="value"&&R.concat(1).checkSubtype(j,Re.type)?null:new zi(j,te,Re,ue,ve,Ze):null}evaluate(S){let R=this.input.evaluate(S);return(Ki(R)===this.inputType&&this.outputs[this.cases[R]]||this.otherwise).evaluate(S)}eachChild(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)}outputDefined(){return this.outputs.every(S=>S.outputDefined())&&this.otherwise.outputDefined()}}class Yi{constructor(S,R,j){this.type=S,this.branches=R,this.otherwise=j}static parse(S,R){if(S.length<4)return R.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return R.error("Expected an odd number of arguments.");let j;R.expectedType&&R.expectedType.kind!=="value"&&(j=R.expectedType);let te=[];for(let ve=1;veR.outputDefined())&&this.otherwise.outputDefined()}}class an{constructor(S,R,j,te){this.type=S,this.input=R,this.beginIndex=j,this.endIndex=te}static parse(S,R){if(S.length<=2||S.length>=5)return R.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let j=R.parse(S[1],1,fr),te=R.parse(S[2],2,St);if(!j||!te)return null;if(!ht(j.type,[Ne(fr),Et,fr]))return R.error(`Expected first argument to be of type array or string, but found ${Ye(j.type)} instead`);if(S.length===4){let ue=R.parse(S[3],3,St);return ue?new an(j.type,j,te,ue):null}return new an(j.type,j,te)}evaluate(S){let R=this.input.evaluate(S),j=this.beginIndex.evaluate(S),te;if(this.endIndex&&(te=this.endIndex.evaluate(S)),Le(R,["string"]))return[...R].slice(j,te).join("");if(Le(R,["array"]))return R.slice(j,te);throw new la(`Expected first argument to be of type array or string, but found ${Ye(Ki(R))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function hi(D,S){let R=D.length-1,j,te,ue=0,ve=R,Re=0;for(;ue<=ve;)if(Re=Math.floor((ue+ve)/2),j=D[Re],te=D[Re+1],j<=S){if(Re===R||SS))throw new la("Input is not a number.");ve=Re-1}return 0}class Ji{constructor(S,R,j){this.type=S,this.input=R,this.labels=[],this.outputs=[];for(let[te,ue]of j)this.labels.push(te),this.outputs.push(ue)}static parse(S,R){if(S.length-1<4)return R.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return R.error("Expected an even number of arguments.");let j=R.parse(S[1],1,St);if(!j)return null;let te=[],ue=null;R.expectedType&&R.expectedType.kind!=="value"&&(ue=R.expectedType);for(let ve=1;ve=Re)return R.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',at);let Ft=R.parse(Ze,Tt,ue);if(!Ft)return null;ue=ue||Ft.type,te.push([Re,Ft])}return new Ji(ue,j,te)}evaluate(S){let R=this.labels,j=this.outputs;if(R.length===1)return j[0].evaluate(S);let te=this.input.evaluate(S);if(te<=R[0])return j[0].evaluate(S);let ue=R.length;return te>=R[ue-1]?j[ue-1].evaluate(S):j[hi(R,te)].evaluate(S)}eachChild(S){S(this.input);for(let R of this.outputs)S(R)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function ua(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Fn=Sa;function Sa(D,S,R,j){this.cx=3*D,this.bx=3*(R-D)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(j-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=D,this.p1y=S,this.p2x=R,this.p2y=j}Sa.prototype={sampleCurveX:function(D){return((this.ax*D+this.bx)*D+this.cx)*D},sampleCurveY:function(D){return((this.ay*D+this.by)*D+this.cy)*D},sampleCurveDerivativeX:function(D){return(3*this.ax*D+2*this.bx)*D+this.cx},solveCurveX:function(D,S){if(S===void 0&&(S=1e-6),D<0)return 0;if(D>1)return 1;for(var R=D,j=0;j<8;j++){var te=this.sampleCurveX(R)-D;if(Math.abs(te)te?ve=R:Re=R,R=.5*(Re-ve)+ve;return R},solve:function(D,S){return this.sampleCurveY(this.solveCurveX(D,S))}};var go=ua(Fn);function Oo(D,S,R){return D+R*(S-D)}function ho(D,S,R){return D.map((j,te)=>Oo(j,S[te],R))}let Mo={number:Oo,color:function(D,S,R,j="rgb"){switch(j){case"rgb":{let[te,ue,ve,Re]=ho(D.rgb,S.rgb,R);return new Zt(te,ue,ve,Re,!1)}case"hcl":{let[te,ue,ve,Re]=D.hcl,[Ze,at,Tt,Ft]=S.hcl,Qt,sr;if(isNaN(te)||isNaN(Ze))isNaN(te)?isNaN(Ze)?Qt=NaN:(Qt=Ze,ve!==1&&ve!==0||(sr=at)):(Qt=te,Tt!==1&&Tt!==0||(sr=ue));else{let Ri=Ze-te;Ze>te&&Ri>180?Ri-=360:Ze180&&(Ri+=360),Qt=te+R*Ri}let[Tr,Pr,$r,ni]=function([Ri,pi,ki,Zi]){return Ri=isNaN(Ri)?0:Ri*ai,Ni([ki,Math.cos(Ri)*pi,Math.sin(Ri)*pi,Zi])}([Qt,sr!=null?sr:Oo(ue,at,R),Oo(ve,Tt,R),Oo(Re,Ft,R)]);return new Zt(Tr,Pr,$r,ni,!1)}case"lab":{let[te,ue,ve,Re]=Ni(ho(D.lab,S.lab,R));return new Zt(te,ue,ve,Re,!1)}}},array:ho,padding:function(D,S,R){return new Vr(ho(D.values,S.values,R))},variableAnchorOffsetCollection:function(D,S,R){let j=D.values,te=S.values;if(j.length!==te.length)throw new la(`Cannot interpolate values of different length. from: ${D.toString()}, to: ${S.toString()}`);let ue=[];for(let ve=0;vetypeof Tt!="number"||Tt<0||Tt>1))return R.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:at}}}if(S.length-1<4)return R.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return R.error("Expected an even number of arguments.");if(ue=R.parse(ue,2,St),!ue)return null;let Re=[],Ze=null;j==="interpolate-hcl"||j==="interpolate-lab"?Ze=Ht:R.expectedType&&R.expectedType.kind!=="value"&&(Ze=R.expectedType);for(let at=0;at=Tt)return R.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Qt);let Tr=R.parse(Ft,sr,Ze);if(!Tr)return null;Ze=Ze||Tr.type,Re.push([Tt,Tr])}return xe(Ze,St)||xe(Ze,Ht)||xe(Ze,Or)||xe(Ze,ut)||xe(Ze,Ne(St))?new xo(Ze,j,te,ue,Re):R.error(`Type ${Ye(Ze)} is not interpolatable.`)}evaluate(S){let R=this.labels,j=this.outputs;if(R.length===1)return j[0].evaluate(S);let te=this.input.evaluate(S);if(te<=R[0])return j[0].evaluate(S);let ue=R.length;if(te>=R[ue-1])return j[ue-1].evaluate(S);let ve=hi(R,te),Re=xo.interpolationFactor(this.interpolation,te,R[ve],R[ve+1]),Ze=j[ve].evaluate(S),at=j[ve+1].evaluate(S);switch(this.operator){case"interpolate":return Mo[this.type.kind](Ze,at,Re);case"interpolate-hcl":return Mo.color(Ze,at,Re,"hcl");case"interpolate-lab":return Mo.color(Ze,at,Re,"lab")}}eachChild(S){S(this.input);for(let R of this.outputs)S(R)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function zs(D,S,R,j){let te=j-R,ue=D-R;return te===0?0:S===1?ue/te:(Math.pow(S,ue)-1)/(Math.pow(S,te)-1)}class ks{constructor(S,R){this.type=S,this.args=R}static parse(S,R){if(S.length<2)return R.error("Expectected at least one argument.");let j=null,te=R.expectedType;te&&te.kind!=="value"&&(j=te);let ue=[];for(let Re of S.slice(1)){let Ze=R.parse(Re,1+ue.length,j,void 0,{typeAnnotation:"omit"});if(!Ze)return null;j=j||Ze.type,ue.push(Ze)}if(!j)throw new Error("No output type");let ve=te&&ue.some(Re=>Xe(te,Re.type));return new ks(ve?fr:j,ue)}evaluate(S){let R,j=null,te=0;for(let ue of this.args)if(te++,j=ue.evaluate(S),j&&j instanceof Mi&&!j.available&&(R||(R=j.name),j=null,te===this.args.length&&(j=R)),j!==null)break;return j}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function Zs(D,S){return D==="=="||D==="!="?S.kind==="boolean"||S.kind==="string"||S.kind==="number"||S.kind==="null"||S.kind==="value":S.kind==="string"||S.kind==="number"||S.kind==="value"}function Xs(D,S,R,j){return j.compare(S,R)===0}function wl(D,S,R){let j=D!=="=="&&D!=="!=";return class qHe{constructor(ue,ve,Re){this.type=dt,this.lhs=ue,this.rhs=ve,this.collator=Re,this.hasUntypedArgument=ue.type.kind==="value"||ve.type.kind==="value"}static parse(ue,ve){if(ue.length!==3&&ue.length!==4)return ve.error("Expected two or three arguments.");let Re=ue[0],Ze=ve.parse(ue[1],1,fr);if(!Ze)return null;if(!Zs(Re,Ze.type))return ve.concat(1).error(`"${Re}" comparisons are not supported for type '${Ye(Ze.type)}'.`);let at=ve.parse(ue[2],2,fr);if(!at)return null;if(!Zs(Re,at.type))return ve.concat(2).error(`"${Re}" comparisons are not supported for type '${Ye(at.type)}'.`);if(Ze.type.kind!==at.type.kind&&Ze.type.kind!=="value"&&at.type.kind!=="value")return ve.error(`Cannot compare types '${Ye(Ze.type)}' and '${Ye(at.type)}'.`);j&&(Ze.type.kind==="value"&&at.type.kind!=="value"?Ze=new Da(at.type,[Ze]):Ze.type.kind!=="value"&&at.type.kind==="value"&&(at=new Da(Ze.type,[at])));let Tt=null;if(ue.length===4){if(Ze.type.kind!=="string"&&at.type.kind!=="string"&&Ze.type.kind!=="value"&&at.type.kind!=="value")return ve.error("Cannot use collator to compare non-string types.");if(Tt=ve.parse(ue[3],3,_r),!Tt)return null}return new qHe(Ze,at,Tt)}evaluate(ue){let ve=this.lhs.evaluate(ue),Re=this.rhs.evaluate(ue);if(j&&this.hasUntypedArgument){let Ze=Ki(ve),at=Ki(Re);if(Ze.kind!==at.kind||Ze.kind!=="string"&&Ze.kind!=="number")throw new la(`Expected arguments for "${D}" to be (string, string) or (number, number), but found (${Ze.kind}, ${at.kind}) instead.`)}if(this.collator&&!j&&this.hasUntypedArgument){let Ze=Ki(ve),at=Ki(Re);if(Ze.kind!=="string"||at.kind!=="string")return S(ue,ve,Re)}return this.collator?R(ue,ve,Re,this.collator.evaluate(ue)):S(ue,ve,Re)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let os=wl("==",function(D,S,R){return S===R},Xs),cl=wl("!=",function(D,S,R){return S!==R},function(D,S,R,j){return!Xs(0,S,R,j)}),Cs=wl("<",function(D,S,R){return S",function(D,S,R){return S>R},function(D,S,R,j){return j.compare(S,R)>0}),Ys=wl("<=",function(D,S,R){return S<=R},function(D,S,R,j){return j.compare(S,R)<=0}),Hs=wl(">=",function(D,S,R){return S>=R},function(D,S,R,j){return j.compare(S,R)>=0});class Eo{constructor(S,R,j){this.type=_r,this.locale=j,this.caseSensitive=S,this.diacriticSensitive=R}static parse(S,R){if(S.length!==2)return R.error("Expected one argument.");let j=S[1];if(typeof j!="object"||Array.isArray(j))return R.error("Collator options argument must be an object.");let te=R.parse(j["case-sensitive"]!==void 0&&j["case-sensitive"],1,dt);if(!te)return null;let ue=R.parse(j["diacritic-sensitive"]!==void 0&&j["diacritic-sensitive"],1,dt);if(!ue)return null;let ve=null;return j.locale&&(ve=R.parse(j.locale,1,Et),!ve)?null:new Eo(te,ue,ve)}evaluate(S){return new yr(this.caseSensitive.evaluate(S),this.diacriticSensitive.evaluate(S),this.locale?this.locale.evaluate(S):null)}eachChild(S){S(this.caseSensitive),S(this.diacriticSensitive),this.locale&&S(this.locale)}outputDefined(){return!1}}class fs{constructor(S,R,j,te,ue){this.type=Et,this.number=S,this.locale=R,this.currency=j,this.minFractionDigits=te,this.maxFractionDigits=ue}static parse(S,R){if(S.length!==3)return R.error("Expected two arguments.");let j=R.parse(S[1],1,St);if(!j)return null;let te=S[2];if(typeof te!="object"||Array.isArray(te))return R.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=R.parse(te.locale,1,Et),!ue))return null;let ve=null;if(te.currency&&(ve=R.parse(te.currency,1,Et),!ve))return null;let Re=null;if(te["min-fraction-digits"]&&(Re=R.parse(te["min-fraction-digits"],1,St),!Re))return null;let Ze=null;return te["max-fraction-digits"]&&(Ze=R.parse(te["max-fraction-digits"],1,St),!Ze)?null:new fs(j,ue,ve,Re,Ze)}evaluate(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))}eachChild(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)}outputDefined(){return!1}}class $l{constructor(S){this.type=Br,this.sections=S}static parse(S,R){if(S.length<2)return R.error("Expected at least one argument.");let j=S[1];if(!Array.isArray(j)&&typeof j=="object")return R.error("First argument must be an image or text section.");let te=[],ue=!1;for(let ve=1;ve<=S.length-1;++ve){let Re=S[ve];if(ue&&typeof Re=="object"&&!Array.isArray(Re)){ue=!1;let Ze=null;if(Re["font-scale"]&&(Ze=R.parse(Re["font-scale"],1,St),!Ze))return null;let at=null;if(Re["text-font"]&&(at=R.parse(Re["text-font"],1,Ne(Et)),!at))return null;let Tt=null;if(Re["text-color"]&&(Tt=R.parse(Re["text-color"],1,Ht),!Tt))return null;let Ft=te[te.length-1];Ft.scale=Ze,Ft.font=at,Ft.textColor=Tt}else{let Ze=R.parse(S[ve],1,fr);if(!Ze)return null;let at=Ze.type.kind;if(at!=="string"&&at!=="value"&&at!=="null"&&at!=="resolvedImage")return R.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ze,scale:null,font:null,textColor:null})}}return new $l(te)}evaluate(S){return new Zr(this.sections.map(R=>{let j=R.content.evaluate(S);return Ki(j)===Nr?new Fr("",j,null,null,null):new Fr(ka(j),null,R.scale?R.scale.evaluate(S):null,R.font?R.font.evaluate(S).join(","):null,R.textColor?R.textColor.evaluate(S):null)}))}eachChild(S){for(let R of this.sections)S(R.content),R.scale&&S(R.scale),R.font&&S(R.font),R.textColor&&S(R.textColor)}outputDefined(){return!1}}class Gu{constructor(S){this.type=Nr,this.input=S}static parse(S,R){if(S.length!==2)return R.error("Expected two arguments.");let j=R.parse(S[1],1,Et);return j?new Gu(j):R.error("No image name provided.")}evaluate(S){let R=this.input.evaluate(S),j=Mi.fromString(R);return j&&S.availableImages&&(j.available=S.availableImages.indexOf(R)>-1),j}eachChild(S){S(this.input)}outputDefined(){return!1}}class fc{constructor(S){this.type=St,this.input=S}static parse(S,R){if(S.length!==2)return R.error(`Expected 1 argument, but found ${S.length-1} instead.`);let j=R.parse(S[1],1);return j?j.type.kind!=="array"&&j.type.kind!=="string"&&j.type.kind!=="value"?R.error(`Expected argument of type string or array, but found ${Ye(j.type)} instead.`):new fc(j):null}evaluate(S){let R=this.input.evaluate(S);if(typeof R=="string")return[...R].length;if(Array.isArray(R))return R.length;throw new la(`Expected value to be of type string or array, but found ${Ye(Ki(R))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let ms=8192;function on(D,S){let R=(180+D[0])/360,j=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D[1]*Math.PI/360)))/360,te=Math.pow(2,S.z);return[Math.round(R*te*ms),Math.round(j*te*ms)]}function fa(D,S){let R=Math.pow(2,S.z);return[(te=(D[0]/ms+S.x)/R,360*te-180),(j=(D[1]/ms+S.y)/R,360/Math.PI*Math.atan(Math.exp((180-360*j)*Math.PI/180))-90)];var j,te}function Qu(D,S){D[0]=Math.min(D[0],S[0]),D[1]=Math.min(D[1],S[1]),D[2]=Math.max(D[2],S[0]),D[3]=Math.max(D[3],S[1])}function Il(D,S){return!(D[0]<=S[0]||D[2]>=S[2]||D[1]<=S[1]||D[3]>=S[3])}function vo(D,S,R){let j=D[0]-S[0],te=D[1]-S[1],ue=D[0]-R[0],ve=D[1]-R[1];return j*ve-ue*te==0&&j*ue<=0&&te*ve<=0}function Wl(D,S,R,j){return(te=[j[0]-R[0],j[1]-R[1]])[0]*(ue=[S[0]-D[0],S[1]-D[1]])[1]-te[1]*ue[0]!=0&&!(!Co(D,S,R,j)||!Co(R,j,D,S));var te,ue}function Ks(D,S,R){for(let j of R)for(let te=0;te(te=D)[1]!=(ve=Re[Ze+1])[1]>te[1]&&te[0]<(ve[0]-ue[0])*(te[1]-ue[1])/(ve[1]-ue[1])+ue[0]&&(j=!j)}var te,ue,ve;return j}function Ec(D,S){for(let R of S)if(Zl(D,R))return!0;return!1}function Zn(D,S){for(let R of D)if(!Zl(R,S))return!1;for(let R=0;R0&&Re<0||ve<0&&Re>0}function Tl(D,S,R){let j=[];for(let te=0;teR[2]){let te=.5*j,ue=D[0]-R[0]>te?-j:R[0]-D[0]>te?j:0;ue===0&&(ue=D[0]-R[2]>te?-j:R[2]-D[0]>te?j:0),D[0]+=ue}Qu(S,D)}function cf(D,S,R,j){let te=Math.pow(2,j.z)*ms,ue=[j.x*ms,j.y*ms],ve=[];for(let Re of D)for(let Ze of Re){let at=[Ze.x+ue[0],Ze.y+ue[1]];So(at,S,R,te),ve.push(at)}return ve}function rh(D,S,R,j){let te=Math.pow(2,j.z)*ms,ue=[j.x*ms,j.y*ms],ve=[];for(let Ze of D){let at=[];for(let Tt of Ze){let Ft=[Tt.x+ue[0],Tt.y+ue[1]];Qu(S,Ft),at.push(Ft)}ve.push(at)}if(S[2]-S[0]<=te/2){(Re=S)[0]=Re[1]=1/0,Re[2]=Re[3]=-1/0;for(let Ze of ve)for(let at of Ze)So(at,S,R,te)}var Re;return ve}class Al{constructor(S,R){this.type=dt,this.geojson=S,this.geometries=R}static parse(S,R){if(S.length!==2)return R.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Gi(S[1])){let j=S[1];if(j.type==="FeatureCollection"){let te=[];for(let ue of j.features){let{type:ve,coordinates:Re}=ue.geometry;ve==="Polygon"&&te.push(Re),ve==="MultiPolygon"&&te.push(...Re)}if(te.length)return new Al(j,{type:"MultiPolygon",coordinates:te})}else if(j.type==="Feature"){let te=j.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new Al(j,j.geometry)}else if(j.type==="Polygon"||j.type==="MultiPolygon")return new Al(j,j)}return R.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(R,j){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],ve=R.canonicalID();if(j.type==="Polygon"){let Re=Tl(j.coordinates,ue,ve),Ze=cf(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!Zl(at,Re))return!1}if(j.type==="MultiPolygon"){let Re=uf(j.coordinates,ue,ve),Ze=cf(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!Ec(at,Re))return!1}return!0}(S,this.geometries);if(S.geometryType()==="LineString")return function(R,j){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],ve=R.canonicalID();if(j.type==="Polygon"){let Re=Tl(j.coordinates,ue,ve),Ze=rh(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!Zn(at,Re))return!1}if(j.type==="MultiPolygon"){let Re=uf(j.coordinates,ue,ve),Ze=rh(R.geometry(),te,ue,ve);if(!Il(te,ue))return!1;for(let at of Ze)if(!ko(at,Re))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Hc=class{constructor(D=[],S=(R,j)=>Rj?1:0){if(this.data=D,this.length=this.data.length,this.compare=S,this.length>0)for(let R=(this.length>>1)-1;R>=0;R--)this._down(R)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:S,compare:R}=this,j=S[D];for(;D>0;){let te=D-1>>1,ue=S[te];if(R(j,ue)>=0)break;S[D]=ue,D=te}S[D]=j}_down(D){let{data:S,compare:R}=this,j=this.length>>1,te=S[D];for(;D=0)break;S[D]=S[ue],D=ue}S[D]=te}};function Ql(D,S,R,j,te){Ls(D,S,R,j||D.length-1,te||kc)}function Ls(D,S,R,j,te){for(;j>R;){if(j-R>600){var ue=j-R+1,ve=S-R+1,Re=Math.log(ue),Ze=.5*Math.exp(2*Re/3),at=.5*Math.sqrt(Re*Ze*(ue-Ze)/ue)*(ve-ue/2<0?-1:1);Ls(D,S,Math.max(R,Math.floor(S-ve*Ze/ue+at)),Math.min(j,Math.floor(S+(ue-ve)*Ze/ue+at)),te)}var Tt=D[S],Ft=R,Qt=j;for(mu(D,R,S),te(D[j],Tt)>0&&mu(D,R,j);Ft0;)Qt--}te(D[R],Tt)===0?mu(D,R,Qt):mu(D,++Qt,j),Qt<=S&&(R=Qt+1),S<=Qt&&(j=Qt-1)}}function mu(D,S,R){var j=D[S];D[S]=D[R],D[R]=j}function kc(D,S){return DS?1:0}function Of(D,S){if(D.length<=1)return[D];let R=[],j,te;for(let ue of D){let ve=vd(ue);ve!==0&&(ue.area=Math.abs(ve),te===void 0&&(te=ve<0),te===ve<0?(j&&R.push(j),j=[ue]):j.push(ue))}if(j&&R.push(j),S>1)for(let ue=0;ue1?(at=S[Ze+1][0],Tt=S[Ze+1][1]):sr>0&&(at+=Ft/this.kx*sr,Tt+=Qt/this.ky*sr)),Ft=this.wrap(R[0]-at)*this.kx,Qt=(R[1]-Tt)*this.ky;let Tr=Ft*Ft+Qt*Qt;Tr180;)S-=360;return S}}function Ul(D,S){return S[0]-D[0]}function Js(D){return D[1]-D[0]+1}function hc(D,S){return D[1]>=D[0]&&D[1]D[1])return[null,null];let R=Js(D);if(S){if(R===2)return[D,null];let te=Math.floor(R/2);return[[D[0],D[0]+te],[D[0]+te,D[1]]]}if(R===1)return[D,null];let j=Math.floor(R/2)-1;return[[D[0],D[0]+j],[D[0]+j+1,D[1]]]}function ws(D,S){if(!hc(S,D.length))return[1/0,1/0,-1/0,-1/0];let R=[1/0,1/0,-1/0,-1/0];for(let j=S[0];j<=S[1];++j)Qu(R,D[j]);return R}function $s(D){let S=[1/0,1/0,-1/0,-1/0];for(let R of D)for(let j of R)Qu(S,j);return S}function hs(D){return D[0]!==-1/0&&D[1]!==-1/0&&D[2]!==1/0&&D[3]!==1/0}function Ms(D,S,R){if(!hs(D)||!hs(S))return NaN;let j=0,te=0;return D[2]S[2]&&(j=D[0]-S[2]),D[1]>S[3]&&(te=D[1]-S[3]),D[3]=j)return j;if(Il(te,ue)){if(Od(D,S))return 0}else if(Od(S,D))return 0;let ve=1/0;for(let Re of D)for(let Ze=0,at=Re.length,Tt=at-1;Ze0;){let Ze=ve.pop();if(Ze[0]>=ue)continue;let at=Ze[1],Tt=S?50:100;if(Js(at)<=Tt){if(!hc(at,D.length))return NaN;if(S){let Ft=wo(D,at,R,j);if(isNaN(Ft)||Ft===0)return Ft;ue=Math.min(ue,Ft)}else for(let Ft=at[0];Ft<=at[1];++Ft){let Qt=ov(D[Ft],R,j);if(ue=Math.min(ue,Qt),ue===0)return 0}}else{let Ft=Cc(at,S);Ja(ve,ue,j,D,Re,Ft[0]),Ja(ve,ue,j,D,Re,Ft[1])}}return ue}function uu(D,S,R,j,te,ue=1/0){let ve=Math.min(ue,te.distance(D[0],R[0]));if(ve===0)return ve;let Re=new Hc([[0,[0,D.length-1],[0,R.length-1]]],Ul);for(;Re.length>0;){let Ze=Re.pop();if(Ze[0]>=ve)continue;let at=Ze[1],Tt=Ze[2],Ft=S?50:100,Qt=j?50:100;if(Js(at)<=Ft&&Js(Tt)<=Qt){if(!hc(at,D.length)&&hc(Tt,R.length))return NaN;let sr;if(S&&j)sr=ec(D,at,R,Tt,te),ve=Math.min(ve,sr);else if(S&&!j){let Tr=D.slice(at[0],at[1]+1);for(let Pr=Tt[0];Pr<=Tt[1];++Pr)if(sr=dc(R[Pr],Tr,te),ve=Math.min(ve,sr),ve===0)return ve}else if(!S&&j){let Tr=R.slice(Tt[0],Tt[1]+1);for(let Pr=at[0];Pr<=at[1];++Pr)if(sr=dc(D[Pr],Tr,te),ve=Math.min(ve,sr),ve===0)return ve}else sr=Ps(D,at,R,Tt,te),ve=Math.min(ve,sr)}else{let sr=Cc(at,S),Tr=Cc(Tt,j);Ef(Re,ve,te,D,R,sr[0],Tr[0]),Ef(Re,ve,te,D,R,sr[0],Tr[1]),Ef(Re,ve,te,D,R,sr[1],Tr[0]),Ef(Re,ve,te,D,R,sr[1],Tr[1])}}return ve}function Mh(D){return D.type==="MultiPolygon"?D.coordinates.map(S=>({type:"Polygon",coordinates:S})):D.type==="MultiLineString"?D.coordinates.map(S=>({type:"LineString",coordinates:S})):D.type==="MultiPoint"?D.coordinates.map(S=>({type:"Point",coordinates:S})):[D]}class jc{constructor(S,R){this.type=St,this.geojson=S,this.geometries=R}static parse(S,R){if(S.length!==2)return R.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(Gi(S[1])){let j=S[1];if(j.type==="FeatureCollection")return new jc(j,j.features.map(te=>Mh(te.geometry)).flat());if(j.type==="Feature")return new jc(j,Mh(j.geometry));if("type"in j&&"coordinates"in j)return new jc(j,Mh(j))}return R.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(R,j){let te=R.geometry(),ue=te.flat().map(Ze=>fa([Ze.x,Ze.y],R.canonical));if(te.length===0)return NaN;let ve=new ih(ue[0][1]),Re=1/0;for(let Ze of j){switch(Ze.type){case"Point":Re=Math.min(Re,uu(ue,!1,[Ze.coordinates],!1,ve,Re));break;case"LineString":Re=Math.min(Re,uu(ue,!1,Ze.coordinates,!0,ve,Re));break;case"Polygon":Re=Math.min(Re,tc(ue,!1,Ze.coordinates,ve,Re))}if(Re===0)return Re}return Re}(S,this.geometries);if(S.geometryType()==="LineString")return function(R,j){let te=R.geometry(),ue=te.flat().map(Ze=>fa([Ze.x,Ze.y],R.canonical));if(te.length===0)return NaN;let ve=new ih(ue[0][1]),Re=1/0;for(let Ze of j){switch(Ze.type){case"Point":Re=Math.min(Re,uu(ue,!0,[Ze.coordinates],!1,ve,Re));break;case"LineString":Re=Math.min(Re,uu(ue,!0,Ze.coordinates,!0,ve,Re));break;case"Polygon":Re=Math.min(Re,tc(ue,!0,Ze.coordinates,ve,Re))}if(Re===0)return Re}return Re}(S,this.geometries);if(S.geometryType()==="Polygon")return function(R,j){let te=R.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Of(te,0).map(Ze=>Ze.map(at=>at.map(Tt=>fa([Tt.x,Tt.y],R.canonical)))),ve=new ih(ue[0][0][0][1]),Re=1/0;for(let Ze of j)for(let at of ue){switch(Ze.type){case"Point":Re=Math.min(Re,tc([Ze.coordinates],!1,at,ve,Re));break;case"LineString":Re=Math.min(Re,tc(Ze.coordinates,!0,at,ve,Re));break;case"Polygon":Re=Math.min(Re,$o(at,Ze.coordinates,ve,Re))}if(Re===0)return Re}return Re}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let kf={"==":os,"!=":cl,">":ml,"<":Cs,">=":Hs,"<=":Ys,array:Da,at:br,boolean:Da,case:Yi,coalesce:ks,collator:Eo,format:$l,image:Gu,in:Hr,"index-of":ti,interpolate:xo,"interpolate-hcl":xo,"interpolate-lab":xo,length:fc,let:xn,literal:jn,match:zi,number:Da,"number-format":fs,object:Da,slice:an,step:Ji,string:Da,"to-boolean":oa,"to-color":oa,"to-number":oa,"to-string":oa,var:_t,within:Al,distance:jc};class Ml{constructor(S,R,j,te){this.name=S,this.type=R,this._evaluate=j,this.args=te}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,R){let j=S[0],te=Ml.definitions[j];if(!te)return R.error(`Unknown expression "${j}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,ve=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Re=ve.filter(([at])=>!Array.isArray(at)||at.length===S.length-1),Ze=null;for(let[at,Tt]of Re){Ze=new oo(R.registry,kh,R.path,null,R.scope);let Ft=[],Qt=!1;for(let sr=1;sr{return Qt=Ft,Array.isArray(Qt)?`(${Qt.map(Ye).join(", ")})`:`(${Ye(Qt.type)}...)`;var Qt}).join(" | "),Tt=[];for(let Ft=1;Ft{R=S?R&&kh(j):R&&j instanceof jn}),!!R&&Kh(D)&&ah(D,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Kh(D){if(D instanceof Ml&&(D.name==="get"&&D.args.length===1||D.name==="feature-state"||D.name==="has"&&D.args.length===1||D.name==="properties"||D.name==="geometry-type"||D.name==="id"||/^filter-/.test(D.name))||D instanceof Al||D instanceof jc)return!1;let S=!0;return D.eachChild(R=>{S&&!Kh(R)&&(S=!1)}),S}function rc(D){if(D instanceof Ml&&D.name==="feature-state")return!1;let S=!0;return D.eachChild(R=>{S&&!rc(R)&&(S=!1)}),S}function ah(D,S){if(D instanceof Ml&&S.indexOf(D.name)>=0)return!1;let R=!0;return D.eachChild(j=>{R&&!ah(j,S)&&(R=!1)}),R}function Wc(D){return{result:"success",value:D}}function df(D){return{result:"error",value:D}}function Cu(D){return D["property-type"]==="data-driven"||D["property-type"]==="cross-faded-data-driven"}function Nf(D){return!!D.expression&&D.expression.parameters.indexOf("zoom")>-1}function Zc(D){return!!D.expression&&D.expression.interpolated}function ds(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function Ch(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)}function Bd(D){return D}function Jh(D,S){let R=S.type==="color",j=D.stops&&typeof D.stops[0][0]=="object",te=j||!(j||D.property!==void 0),ue=D.type||(Zc(S)?"exponential":"interval");if(R||S.type==="padding"){let Tt=R?Zt.parse:Vr.parse;(D=Ke({},D)).stops&&(D.stops=D.stops.map(Ft=>[Ft[0],Tt(Ft[1])])),D.default=Tt(D.default?D.default:S.default)}if(D.colorSpace&&(ve=D.colorSpace)!=="rgb"&&ve!=="hcl"&&ve!=="lab")throw new Error(`Unknown color space: "${D.colorSpace}"`);var ve;let Re,Ze,at;if(ue==="exponential")Re=$h;else if(ue==="interval")Re=Lu;else if(ue==="categorical"){Re=pd,Ze=Object.create(null);for(let Tt of D.stops)Ze[Tt[0]]=Tt[1];at=typeof D.stops[0][0]}else{if(ue!=="identity")throw new Error(`Unknown function type "${ue}"`);Re=eu}if(j){let Tt={},Ft=[];for(let Tr=0;TrTr[0]),evaluate:({zoom:Tr},Pr)=>$h({stops:Qt,base:D.base},S,Tr).evaluate(Tr,Pr)}}if(te){let Tt=ue==="exponential"?{name:"exponential",base:D.base!==void 0?D.base:1}:null;return{kind:"camera",interpolationType:Tt,interpolationFactor:xo.interpolationFactor.bind(void 0,Tt),zoomStops:D.stops.map(Ft=>Ft[0]),evaluate:({zoom:Ft})=>Re(D,S,Ft,Ze,at)}}return{kind:"source",evaluate(Tt,Ft){let Qt=Ft&&Ft.properties?Ft.properties[D.property]:void 0;return Qt===void 0?Cf(D.default,S.default):Re(D,S,Qt,Ze,at)}}}function Cf(D,S,R){return D!==void 0?D:S!==void 0?S:R!==void 0?R:void 0}function pd(D,S,R,j,te){return Cf(typeof R===te?j[R]:void 0,D.default,S.default)}function Lu(D,S,R){if(ds(R)!=="number")return Cf(D.default,S.default);let j=D.stops.length;if(j===1||R<=D.stops[0][0])return D.stops[0][1];if(R>=D.stops[j-1][0])return D.stops[j-1][1];let te=hi(D.stops.map(ue=>ue[0]),R);return D.stops[te][1]}function $h(D,S,R){let j=D.base!==void 0?D.base:1;if(ds(R)!=="number")return Cf(D.default,S.default);let te=D.stops.length;if(te===1||R<=D.stops[0][0])return D.stops[0][1];if(R>=D.stops[te-1][0])return D.stops[te-1][1];let ue=hi(D.stops.map(Tt=>Tt[0]),R),ve=function(Tt,Ft,Qt,sr){let Tr=sr-Qt,Pr=Tt-Qt;return Tr===0?0:Ft===1?Pr/Tr:(Math.pow(Ft,Pr)-1)/(Math.pow(Ft,Tr)-1)}(R,j,D.stops[ue][0],D.stops[ue+1][0]),Re=D.stops[ue][1],Ze=D.stops[ue+1][1],at=Mo[S.type]||Bd;return typeof Re.evaluate=="function"?{evaluate(...Tt){let Ft=Re.evaluate.apply(void 0,Tt),Qt=Ze.evaluate.apply(void 0,Tt);if(Ft!==void 0&&Qt!==void 0)return at(Ft,Qt,ve,D.colorSpace)}}:at(Re,Ze,ve,D.colorSpace)}function eu(D,S,R){switch(S.type){case"color":R=Zt.parse(R);break;case"formatted":R=Zr.fromString(R.toString());break;case"resolvedImage":R=Mi.fromString(R.toString());break;case"padding":R=Vr.parse(R);break;default:ds(R)===S.type||S.type==="enum"&&S.values[R]||(R=void 0)}return Cf(R,D.default,S.default)}Ml.register(kf,{error:[{kind:"error"},[Et],(D,[S])=>{throw new la(S.evaluate(D))}],typeof:[Et,[fr],(D,[S])=>Ye(Ki(S.evaluate(D)))],"to-rgba":[Ne(St,4),[Ht],(D,[S])=>{let[R,j,te,ue]=S.evaluate(D).rgb;return[255*R,255*j,255*te,ue]}],rgb:[Ht,[St,St,St],Yh],rgba:[Ht,[St,St,St,St],Yh],has:{type:dt,overloads:[[[Et],(D,[S])=>Eh(S.evaluate(D),D.properties())],[[Et,$t],(D,[S,R])=>Eh(S.evaluate(D),R.evaluate(D))]]},get:{type:fr,overloads:[[[Et],(D,[S])=>nh(S.evaluate(D),D.properties())],[[Et,$t],(D,[S,R])=>nh(S.evaluate(D),R.evaluate(D))]]},"feature-state":[fr,[Et],(D,[S])=>nh(S.evaluate(D),D.featureState||{})],properties:[$t,[],D=>D.properties()],"geometry-type":[Et,[],D=>D.geometryType()],id:[fr,[],D=>D.id()],zoom:[St,[],D=>D.globals.zoom],"heatmap-density":[St,[],D=>D.globals.heatmapDensity||0],"line-progress":[St,[],D=>D.globals.lineProgress||0],accumulated:[fr,[],D=>D.globals.accumulated===void 0?null:D.globals.accumulated],"+":[St,hf(St),(D,S)=>{let R=0;for(let j of S)R+=j.evaluate(D);return R}],"*":[St,hf(St),(D,S)=>{let R=1;for(let j of S)R*=j.evaluate(D);return R}],"-":{type:St,overloads:[[[St,St],(D,[S,R])=>S.evaluate(D)-R.evaluate(D)],[[St],(D,[S])=>-S.evaluate(D)]]},"/":[St,[St,St],(D,[S,R])=>S.evaluate(D)/R.evaluate(D)],"%":[St,[St,St],(D,[S,R])=>S.evaluate(D)%R.evaluate(D)],ln2:[St,[],()=>Math.LN2],pi:[St,[],()=>Math.PI],e:[St,[],()=>Math.E],"^":[St,[St,St],(D,[S,R])=>Math.pow(S.evaluate(D),R.evaluate(D))],sqrt:[St,[St],(D,[S])=>Math.sqrt(S.evaluate(D))],log10:[St,[St],(D,[S])=>Math.log(S.evaluate(D))/Math.LN10],ln:[St,[St],(D,[S])=>Math.log(S.evaluate(D))],log2:[St,[St],(D,[S])=>Math.log(S.evaluate(D))/Math.LN2],sin:[St,[St],(D,[S])=>Math.sin(S.evaluate(D))],cos:[St,[St],(D,[S])=>Math.cos(S.evaluate(D))],tan:[St,[St],(D,[S])=>Math.tan(S.evaluate(D))],asin:[St,[St],(D,[S])=>Math.asin(S.evaluate(D))],acos:[St,[St],(D,[S])=>Math.acos(S.evaluate(D))],atan:[St,[St],(D,[S])=>Math.atan(S.evaluate(D))],min:[St,hf(St),(D,S)=>Math.min(...S.map(R=>R.evaluate(D)))],max:[St,hf(St),(D,S)=>Math.max(...S.map(R=>R.evaluate(D)))],abs:[St,[St],(D,[S])=>Math.abs(S.evaluate(D))],round:[St,[St],(D,[S])=>{let R=S.evaluate(D);return R<0?-Math.round(-R):Math.round(R)}],floor:[St,[St],(D,[S])=>Math.floor(S.evaluate(D))],ceil:[St,[St],(D,[S])=>Math.ceil(S.evaluate(D))],"filter-==":[dt,[Et,fr],(D,[S,R])=>D.properties()[S.value]===R.value],"filter-id-==":[dt,[fr],(D,[S])=>D.id()===S.value],"filter-type-==":[dt,[Et],(D,[S])=>D.geometryType()===S.value],"filter-<":[dt,[Et,fr],(D,[S,R])=>{let j=D.properties()[S.value],te=R.value;return typeof j==typeof te&&j{let R=D.id(),j=S.value;return typeof R==typeof j&&R":[dt,[Et,fr],(D,[S,R])=>{let j=D.properties()[S.value],te=R.value;return typeof j==typeof te&&j>te}],"filter-id->":[dt,[fr],(D,[S])=>{let R=D.id(),j=S.value;return typeof R==typeof j&&R>j}],"filter-<=":[dt,[Et,fr],(D,[S,R])=>{let j=D.properties()[S.value],te=R.value;return typeof j==typeof te&&j<=te}],"filter-id-<=":[dt,[fr],(D,[S])=>{let R=D.id(),j=S.value;return typeof R==typeof j&&R<=j}],"filter->=":[dt,[Et,fr],(D,[S,R])=>{let j=D.properties()[S.value],te=R.value;return typeof j==typeof te&&j>=te}],"filter-id->=":[dt,[fr],(D,[S])=>{let R=D.id(),j=S.value;return typeof R==typeof j&&R>=j}],"filter-has":[dt,[fr],(D,[S])=>S.value in D.properties()],"filter-has-id":[dt,[],D=>D.id()!==null&&D.id()!==void 0],"filter-type-in":[dt,[Ne(Et)],(D,[S])=>S.value.indexOf(D.geometryType())>=0],"filter-id-in":[dt,[Ne(fr)],(D,[S])=>S.value.indexOf(D.id())>=0],"filter-in-small":[dt,[Et,Ne(fr)],(D,[S,R])=>R.value.indexOf(D.properties()[S.value])>=0],"filter-in-large":[dt,[Et,Ne(fr)],(D,[S,R])=>function(j,te,ue,ve){for(;ue<=ve;){let Re=ue+ve>>1;if(te[Re]===j)return!0;te[Re]>j?ve=Re-1:ue=Re+1}return!1}(D.properties()[S.value],R.value,0,R.value.length-1)],all:{type:dt,overloads:[[[dt,dt],(D,[S,R])=>S.evaluate(D)&&R.evaluate(D)],[hf(dt),(D,S)=>{for(let R of S)if(!R.evaluate(D))return!1;return!0}]]},any:{type:dt,overloads:[[[dt,dt],(D,[S,R])=>S.evaluate(D)||R.evaluate(D)],[hf(dt),(D,S)=>{for(let R of S)if(R.evaluate(D))return!0;return!1}]]},"!":[dt,[dt],(D,[S])=>!S.evaluate(D)],"is-supported-script":[dt,[Et],(D,[S])=>{let R=D.globals&&D.globals.isSupportedScript;return!R||R(S.evaluate(D))}],upcase:[Et,[Et],(D,[S])=>S.evaluate(D).toUpperCase()],downcase:[Et,[Et],(D,[S])=>S.evaluate(D).toLowerCase()],concat:[Et,hf(fr),(D,S)=>S.map(R=>ka(R.evaluate(D))).join("")],"resolved-locale":[Et,[_r],(D,[S])=>S.evaluate(D).resolvedLocale()]});class Pu{constructor(S,R){var j;this.expression=S,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=R?(j=R).type==="color"&&Ch(j.default)?new Zt(0,0,0,0):j.type==="color"?Zt.parse(j.default)||null:j.type==="padding"?Vr.parse(j.default)||null:j.type==="variableAnchorOffsetCollection"?Si.parse(j.default)||null:j.default===void 0?null:j.default:null,this._enumValues=R&&R.type==="enum"?R.values:null}evaluateWithoutErrorHandling(S,R,j,te,ue,ve){return this._evaluator.globals=S,this._evaluator.feature=R,this._evaluator.featureState=j,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=ve,this.expression.evaluate(this._evaluator)}evaluate(S,R,j,te,ue,ve){this._evaluator.globals=S,this._evaluator.feature=R||null,this._evaluator.featureState=j||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=ve||null;try{let Re=this.expression.evaluate(this._evaluator);if(Re==null||typeof Re=="number"&&Re!=Re)return this._defaultValue;if(this._enumValues&&!(Re in this._enumValues))throw new la(`Expected value to be one of ${Object.keys(this._enumValues).map(Ze=>JSON.stringify(Ze)).join(", ")}, but found ${JSON.stringify(Re)} instead.`);return Re}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console!="undefined"&&console.warn(Re.message)),this._defaultValue}}}function Lc(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in kf}function fl(D,S){let R=new oo(kf,kh,[],S?function(te){let ue={color:Ht,string:Et,number:St,enum:Et,boolean:dt,formatted:Br,padding:Or,resolvedImage:Nr,variableAnchorOffsetCollection:ut};return te.type==="array"?Ne(ue[te.value]||fr,te.length):ue[te.type]}(S):void 0),j=R.parse(D,void 0,void 0,void 0,S&&S.type==="string"?{typeAnnotation:"coerce"}:void 0);return j?Wc(new Pu(j,S)):df(R.errors)}class Xc{constructor(S,R){this.kind=S,this._styleExpression=R,this.isStateDependent=S!=="constant"&&!rc(R.expression)}evaluateWithoutErrorHandling(S,R,j,te,ue,ve){return this._styleExpression.evaluateWithoutErrorHandling(S,R,j,te,ue,ve)}evaluate(S,R,j,te,ue,ve){return this._styleExpression.evaluate(S,R,j,te,ue,ve)}}class ic{constructor(S,R,j,te){this.kind=S,this.zoomStops=j,this._styleExpression=R,this.isStateDependent=S!=="camera"&&!rc(R.expression),this.interpolationType=te}evaluateWithoutErrorHandling(S,R,j,te,ue,ve){return this._styleExpression.evaluateWithoutErrorHandling(S,R,j,te,ue,ve)}evaluate(S,R,j,te,ue,ve){return this._styleExpression.evaluate(S,R,j,te,ue,ve)}interpolationFactor(S,R,j){return this.interpolationType?xo.interpolationFactor(this.interpolationType,S,R,j):0}}function yu(D,S){let R=fl(D,S);if(R.result==="error")return R;let j=R.value.expression,te=Kh(j);if(!te&&!Cu(S))return df([new xt("","data expressions not supported")]);let ue=ah(j,["zoom"]);if(!ue&&!Nf(S))return df([new xt("","zoom expressions not supported")]);let ve=Qh(j);return ve||ue?ve instanceof xt?df([ve]):ve instanceof xo&&!Zc(S)?df([new xt("",'"interpolate" expressions cannot be used with this property')]):Wc(ve?new ic(te?"camera":"composite",R.value,ve.labels,ve instanceof xo?ve.interpolation:void 0):new Xc(te?"constant":"source",R.value)):df([new xt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Qs{constructor(S,R){this._parameters=S,this._specification=R,Ke(this,Jh(this._parameters,this._specification))}static deserialize(S){return new Qs(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function Qh(D){let S=null;if(D instanceof xn)S=Qh(D.result);else if(D instanceof ks){for(let R of D.args)if(S=Qh(R),S)break}else(D instanceof Ji||D instanceof xo)&&D.input instanceof Ml&&D.input.name==="zoom"&&(S=D);return S instanceof xt||D.eachChild(R=>{let j=Qh(R);j instanceof xt?S=j:!S&&j?S=new xt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):S&&j&&S!==j&&(S=new xt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),S}function gd(D){if(D===!0||D===!1)return!0;if(!Array.isArray(D)||D.length===0)return!1;switch(D[0]){case"has":return D.length>=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(let S of D.slice(1))if(!gd(S)&&typeof S!="boolean")return!1;return!0;default:return!0}}let ju={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Pc(D){if(D==null)return{filter:()=>!0,needGeometry:!1};gd(D)||(D=Lf(D));let S=fl(D,ju);if(S.result==="error")throw new Error(S.value.map(R=>`${R.key}: ${R.message}`).join(", "));return{filter:(R,j,te)=>S.value.evaluate(R,j,{},te),needGeometry:sv(D)}}function vc(D,S){return DS?1:0}function sv(D){if(!Array.isArray(D))return!1;if(D[0]==="within"||D[0]==="distance")return!0;for(let S=1;S"||S==="<="||S===">="?Uf(D[1],D[2],S):S==="any"?(R=D.slice(1),["any"].concat(R.map(Lf))):S==="all"?["all"].concat(D.slice(1).map(Lf)):S==="none"?["all"].concat(D.slice(1).map(Lf).map(tu)):S==="in"?Iu(D[1],D.slice(2)):S==="!in"?tu(Iu(D[1],D.slice(2))):S==="has"?oh(D[1]):S!=="!has"||tu(oh(D[1]));var R}function Uf(D,S,R){switch(D){case"$type":return[`filter-type-${R}`,S];case"$id":return[`filter-id-${R}`,S];default:return[`filter-${R}`,D,S]}}function Iu(D,S){if(S.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",S]];case"$id":return["filter-id-in",["literal",S]];default:return S.length>200&&!S.some(R=>typeof R!=typeof S[0])?["filter-in-large",D,["literal",S.sort(vc)]]:["filter-in-small",D,["literal",S]]}}function oh(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function tu(D){return["!",D]}function vf(D){let S=typeof D;if(S==="number"||S==="boolean"||S==="string"||D==null)return JSON.stringify(D);if(Array.isArray(D)){let te="[";for(let ue of D)te+=`${vf(ue)},`;return`${te}]`}let R=Object.keys(D).sort(),j="{";for(let te=0;tej.maximum?[new er(S,R,`${R} is greater than the maximum value ${j.maximum}`)]:[]}function Pf(D){let S=D.valueSpec,R=Fs(D.value.type),j,te,ue,ve={},Re=R!=="categorical"&&D.value.property===void 0,Ze=!Re,at=ds(D.value.stops)==="array"&&ds(D.value.stops[0])==="array"&&ds(D.value.stops[0][0])==="object",Tt=xu({key:D.key,value:D.value,valueSpec:D.styleSpec.function,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:function(sr){if(R==="identity")return[new er(sr.key,sr.value,'identity function may not have a "stops" property')];let Tr=[],Pr=sr.value;return Tr=Tr.concat(Lh({key:sr.key,value:Pr,valueSpec:sr.valueSpec,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec,arrayElementValidator:Ft})),ds(Pr)==="array"&&Pr.length===0&&Tr.push(new er(sr.key,Pr,"array must have at least one stop")),Tr},default:function(sr){return sr.validateSpec({key:sr.key,value:sr.value,valueSpec:S,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec})}}});return R==="identity"&&Re&&Tt.push(new er(D.key,D.value,'missing required property "property"')),R==="identity"||D.value.stops||Tt.push(new er(D.key,D.value,'missing required property "stops"')),R==="exponential"&&D.valueSpec.expression&&!Zc(D.valueSpec)&&Tt.push(new er(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(Ze&&!Cu(D.valueSpec)?Tt.push(new er(D.key,D.value,"property functions not supported")):Re&&!Nf(D.valueSpec)&&Tt.push(new er(D.key,D.value,"zoom functions not supported"))),R!=="categorical"&&!at||D.value.property!==void 0||Tt.push(new er(D.key,D.value,'"property" property is required')),Tt;function Ft(sr){let Tr=[],Pr=sr.value,$r=sr.key;if(ds(Pr)!=="array")return[new er($r,Pr,`array expected, ${ds(Pr)} found`)];if(Pr.length!==2)return[new er($r,Pr,`array length 2 expected, length ${Pr.length} found`)];if(at){if(ds(Pr[0])!=="object")return[new er($r,Pr,`object expected, ${ds(Pr[0])} found`)];if(Pr[0].zoom===void 0)return[new er($r,Pr,"object stop key must have zoom")];if(Pr[0].value===void 0)return[new er($r,Pr,"object stop key must have value")];if(ue&&ue>Fs(Pr[0].zoom))return[new er($r,Pr[0].zoom,"stop zoom values must appear in ascending order")];Fs(Pr[0].zoom)!==ue&&(ue=Fs(Pr[0].zoom),te=void 0,ve={}),Tr=Tr.concat(xu({key:`${$r}[0]`,value:Pr[0],valueSpec:{zoom:{}},validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec,objectElementValidators:{zoom:Is,value:Qt}}))}else Tr=Tr.concat(Qt({key:`${$r}[0]`,value:Pr[0],valueSpec:{},validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec},Pr));return Lc(_u(Pr[1]))?Tr.concat([new er(`${$r}[1]`,Pr[1],"expressions are not allowed in function stops.")]):Tr.concat(sr.validateSpec({key:`${$r}[1]`,value:Pr[1],valueSpec:S,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec}))}function Qt(sr,Tr){let Pr=ds(sr.value),$r=Fs(sr.value),ni=sr.value!==null?sr.value:Tr;if(j){if(Pr!==j)return[new er(sr.key,ni,`${Pr} stop domain type must match previous stop domain type ${j}`)]}else j=Pr;if(Pr!=="number"&&Pr!=="string"&&Pr!=="boolean")return[new er(sr.key,ni,"stop domain value must be a number, string, or boolean")];if(Pr!=="number"&&R!=="categorical"){let Ri=`number expected, ${Pr} found`;return Cu(S)&&R===void 0&&(Ri+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new er(sr.key,ni,Ri)]}return R!=="categorical"||Pr!=="number"||isFinite($r)&&Math.floor($r)===$r?R!=="categorical"&&Pr==="number"&&te!==void 0&&$rnew er(`${D.key}${j.key}`,D.value,j.message));let R=S.value.expression||S.value._styleExpression.expression;if(D.expressionContext==="property"&&D.propertyKey==="text-font"&&!R.outputDefined())return[new er(D.key,D.value,`Invalid data expression for "${D.propertyKey}". Output values must be contained as literals within the expression.`)];if(D.expressionContext==="property"&&D.propertyType==="layout"&&!rc(R))return[new er(D.key,D.value,'"feature-state" data expressions are not supported with layout properties.')];if(D.expressionContext==="filter"&&!rc(R))return[new er(D.key,D.value,'"feature-state" data expressions are not supported with filters.')];if(D.expressionContext&&D.expressionContext.indexOf("cluster")===0){if(!ah(R,["zoom","feature-state"]))return[new er(D.key,D.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(D.expressionContext==="cluster-initial"&&!Kh(R))return[new er(D.key,D.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(D){let S=D.key,R=D.value,j=D.valueSpec,te=[];return Array.isArray(j.values)?j.values.indexOf(Fs(R))===-1&&te.push(new er(S,R,`expected one of [${j.values.join(", ")}], ${JSON.stringify(R)} found`)):Object.keys(j.values).indexOf(Fs(R))===-1&&te.push(new er(S,R,`expected one of [${Object.keys(j.values).join(", ")}], ${JSON.stringify(R)} found`)),te}function Vf(D){return gd(_u(D.value))?Ic(Ke({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):pc(D)}function pc(D){let S=D.value,R=D.key;if(ds(S)!=="array")return[new er(R,S,`array expected, ${ds(S)} found`)];let j=D.styleSpec,te,ue=[];if(S.length<1)return[new er(R,S,"filter array must have at least 1 element")];switch(ue=ue.concat(Wu({key:`${R}[0]`,value:S[0],valueSpec:j.filter_operator,style:D.style,styleSpec:D.styleSpec})),Fs(S[0])){case"<":case"<=":case">":case">=":S.length>=2&&Fs(S[1])==="$type"&&ue.push(new er(R,S,`"$type" cannot be use with operator "${S[0]}"`));case"==":case"!=":S.length!==3&&ue.push(new er(R,S,`filter array for operator "${S[0]}" must have 3 elements`));case"in":case"!in":S.length>=2&&(te=ds(S[1]),te!=="string"&&ue.push(new er(`${R}[1]`,S[1],`string expected, ${te} found`)));for(let ve=2;ve{at in R&&S.push(new er(j,R[at],`"${at}" is prohibited for ref layers`))}),te.layers.forEach(at=>{Fs(at.id)===Re&&(Ze=at)}),Ze?Ze.ref?S.push(new er(j,R.ref,"ref cannot reference another ref layer")):ve=Fs(Ze.type):S.push(new er(j,R.ref,`ref layer "${Re}" not found`))}else if(ve!=="background")if(R.source){let Ze=te.sources&&te.sources[R.source],at=Ze&&Fs(Ze.type);Ze?at==="vector"&&ve==="raster"?S.push(new er(j,R.source,`layer "${R.id}" requires a raster source`)):at!=="raster-dem"&&ve==="hillshade"?S.push(new er(j,R.source,`layer "${R.id}" requires a raster-dem source`)):at==="raster"&&ve!=="raster"?S.push(new er(j,R.source,`layer "${R.id}" requires a vector source`)):at!=="vector"||R["source-layer"]?at==="raster-dem"&&ve!=="hillshade"?S.push(new er(j,R.source,"raster-dem source can only be used with layer type 'hillshade'.")):ve!=="line"||!R.paint||!R.paint["line-gradient"]||at==="geojson"&&Ze.lineMetrics||S.push(new er(j,R,`layer "${R.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):S.push(new er(j,R,`layer "${R.id}" must specify a "source-layer"`)):S.push(new er(j,R.source,`source "${R.source}" not found`))}else S.push(new er(j,R,'missing required property "source"'));return S=S.concat(xu({key:j,value:R,valueSpec:ue.layer,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,objectElementValidators:{"*":()=>[],type:()=>D.validateSpec({key:`${j}.type`,value:R.type,valueSpec:ue.layer.type,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,object:R,objectKey:"type"}),filter:Vf,layout:Ze=>xu({layer:R,key:Ze.key,value:Ze.value,style:Ze.style,styleSpec:Ze.styleSpec,validateSpec:Ze.validateSpec,objectElementValidators:{"*":at=>Dl(Ke({layerType:ve},at))}}),paint:Ze=>xu({layer:R,key:Ze.key,value:Ze.value,style:Ze.style,styleSpec:Ze.styleSpec,validateSpec:Ze.validateSpec,objectElementValidators:{"*":at=>Ph(Ke({layerType:ve},at))}})}})),S}function Zu(D){let S=D.value,R=D.key,j=ds(S);return j!=="string"?[new er(R,S,`string expected, ${j} found`)]:[]}let Dc={promoteId:function({key:D,value:S}){if(ds(S)==="string")return Zu({key:D,value:S});{let R=[];for(let j in S)R.push(...Zu({key:`${D}.${j}`,value:S[j]}));return R}}};function gc(D){let S=D.value,R=D.key,j=D.styleSpec,te=D.style,ue=D.validateSpec;if(!S.type)return[new er(R,S,'"type" is required')];let ve=Fs(S.type),Re;switch(ve){case"vector":case"raster":return Re=xu({key:R,value:S,valueSpec:j[`source_${ve.replace("-","_")}`],style:D.style,styleSpec:j,objectElementValidators:Dc,validateSpec:ue}),Re;case"raster-dem":return Re=function(Ze){var at;let Tt=(at=Ze.sourceName)!==null&&at!==void 0?at:"",Ft=Ze.value,Qt=Ze.styleSpec,sr=Qt.source_raster_dem,Tr=Ze.style,Pr=[],$r=ds(Ft);if(Ft===void 0)return Pr;if($r!=="object")return Pr.push(new er("source_raster_dem",Ft,`object expected, ${$r} found`)),Pr;let ni=Fs(Ft.encoding)==="custom",Ri=["redFactor","greenFactor","blueFactor","baseShift"],pi=Ze.value.encoding?`"${Ze.value.encoding}"`:"Default";for(let ki in Ft)!ni&&Ri.includes(ki)?Pr.push(new er(ki,Ft[ki],`In "${Tt}": "${ki}" is only valid when "encoding" is set to "custom". ${pi} encoding found`)):sr[ki]?Pr=Pr.concat(Ze.validateSpec({key:ki,value:Ft[ki],valueSpec:sr[ki],validateSpec:Ze.validateSpec,style:Tr,styleSpec:Qt})):Pr.push(new er(ki,Ft[ki],`unknown property "${ki}"`));return Pr}({sourceName:R,value:S,style:D.style,styleSpec:j,validateSpec:ue}),Re;case"geojson":if(Re=xu({key:R,value:S,valueSpec:j.source_geojson,style:te,styleSpec:j,validateSpec:ue,objectElementValidators:Dc}),S.cluster)for(let Ze in S.clusterProperties){let[at,Tt]=S.clusterProperties[Ze],Ft=typeof at=="string"?[at,["accumulated"],["get",Ze]]:at;Re.push(...Ic({key:`${R}.${Ze}.map`,value:Tt,validateSpec:ue,expressionContext:"cluster-map"})),Re.push(...Ic({key:`${R}.${Ze}.reduce`,value:Ft,validateSpec:ue,expressionContext:"cluster-reduce"}))}return Re;case"video":return xu({key:R,value:S,valueSpec:j.source_video,style:te,validateSpec:ue,styleSpec:j});case"image":return xu({key:R,value:S,valueSpec:j.source_image,style:te,validateSpec:ue,styleSpec:j});case"canvas":return[new er(R,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${R}.type`,value:S.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:te,validateSpec:ue,styleSpec:j})}}function hl(D){let S=D.value,R=D.styleSpec,j=R.light,te=D.style,ue=[],ve=ds(S);if(S===void 0)return ue;if(ve!=="object")return ue=ue.concat([new er("light",S,`object expected, ${ve} found`)]),ue;for(let Re in S){let Ze=Re.match(/^(.*)-transition$/);ue=ue.concat(Ze&&j[Ze[1]]&&j[Ze[1]].transition?D.validateSpec({key:Re,value:S[Re],valueSpec:R.transition,validateSpec:D.validateSpec,style:te,styleSpec:R}):j[Re]?D.validateSpec({key:Re,value:S[Re],valueSpec:j[Re],validateSpec:D.validateSpec,style:te,styleSpec:R}):[new er(Re,S[Re],`unknown property "${Re}"`)])}return ue}function ru(D){let S=D.value,R=D.styleSpec,j=R.sky,te=D.style,ue=ds(S);if(S===void 0)return[];if(ue!=="object")return[new er("sky",S,`object expected, ${ue} found`)];let ve=[];for(let Re in S)ve=ve.concat(j[Re]?D.validateSpec({key:Re,value:S[Re],valueSpec:j[Re],style:te,styleSpec:R}):[new er(Re,S[Re],`unknown property "${Re}"`)]);return ve}function mc(D){let S=D.value,R=D.styleSpec,j=R.terrain,te=D.style,ue=[],ve=ds(S);if(S===void 0)return ue;if(ve!=="object")return ue=ue.concat([new er("terrain",S,`object expected, ${ve} found`)]),ue;for(let Re in S)ue=ue.concat(j[Re]?D.validateSpec({key:Re,value:S[Re],valueSpec:j[Re],validateSpec:D.validateSpec,style:te,styleSpec:R}):[new er(Re,S[Re],`unknown property "${Re}"`)]);return ue}function Yc(D){let S=[],R=D.value,j=D.key;if(Array.isArray(R)){let te=[],ue=[];for(let ve in R)R[ve].id&&te.includes(R[ve].id)&&S.push(new er(j,R,`all the sprites' ids must be unique, but ${R[ve].id} is duplicated`)),te.push(R[ve].id),R[ve].url&&ue.includes(R[ve].url)&&S.push(new er(j,R,`all the sprites' URLs must be unique, but ${R[ve].url} is duplicated`)),ue.push(R[ve].url),S=S.concat(xu({key:`${j}[${ve}]`,value:R[ve],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:D.validateSpec}));return S}return Zu({key:j,value:R})}let nc={"*":()=>[],array:Lh,boolean:function(D){let S=D.value,R=D.key,j=ds(S);return j!=="boolean"?[new er(R,S,`boolean expected, ${j} found`)]:[]},number:Is,color:function(D){let S=D.key,R=D.value,j=ds(R);return j!=="string"?[new er(S,R,`color expected, ${j} found`)]:Zt.parse(String(R))?[]:[new er(S,R,`color expected, "${R}" found`)]},constants:sh,enum:Wu,filter:Vf,function:Pf,layer:Ih,object:xu,source:gc,light:hl,sky:ru,terrain:mc,projection:function(D){let S=D.value,R=D.styleSpec,j=R.projection,te=D.style,ue=ds(S);if(S===void 0)return[];if(ue!=="object")return[new er("projection",S,`object expected, ${ue} found`)];let ve=[];for(let Re in S)ve=ve.concat(j[Re]?D.validateSpec({key:Re,value:S[Re],valueSpec:j[Re],style:te,styleSpec:R}):[new er(Re,S[Re],`unknown property "${Re}"`)]);return ve},string:Zu,formatted:function(D){return Zu(D).length===0?[]:Ic(D)},resolvedImage:function(D){return Zu(D).length===0?[]:Ic(D)},padding:function(D){let S=D.key,R=D.value;if(ds(R)==="array"){if(R.length<1||R.length>4)return[new er(S,R,`padding requires 1 to 4 values; ${R.length} values found`)];let j={type:"number"},te=[];for(let ue=0;ue[]}})),D.constants&&(R=R.concat(sh({key:"constants",value:D.constants,style:D,styleSpec:S,validateSpec:gf}))),vr(R)}function wr(D){return function(S){return D(KQ(YQ({},S),{validateSpec:gf}))}}function vr(D){return[].concat(D).sort((S,R)=>S.line-R.line)}function Ur(D){return function(...S){return vr(D.apply(this,S))}}Bt.source=Ur(wr(gc)),Bt.sprite=Ur(wr(Yc)),Bt.glyphs=Ur(wr(gt)),Bt.light=Ur(wr(hl)),Bt.sky=Ur(wr(ru)),Bt.terrain=Ur(wr(mc)),Bt.layer=Ur(wr(Ih)),Bt.filter=Ur(wr(Vf)),Bt.paintProperty=Ur(wr(Ph)),Bt.layoutProperty=Ur(wr(Dl));let fi=Bt,xi=fi.light,Fi=fi.sky,Xi=fi.paintProperty,hn=fi.layoutProperty;function Ti(D,S){let R=!1;if(S&&S.length)for(let j of S)D.fire(new me(new Error(j.message))),R=!0;return R}class qi{constructor(S,R,j){let te=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let ve=new Int32Array(this.arrayBuffer);S=ve[0],this.d=(R=ve[1])+2*(j=ve[2]);for(let Ze=0;Ze=Ft[Tr+0]&&te>=Ft[Tr+1])?(Re[sr]=!0,ve.push(Tt[sr])):Re[sr]=!1}}}}_forEachCell(S,R,j,te,ue,ve,Re,Ze){let at=this._convertToCellCoord(S),Tt=this._convertToCellCoord(R),Ft=this._convertToCellCoord(j),Qt=this._convertToCellCoord(te);for(let sr=at;sr<=Ft;sr++)for(let Tr=Tt;Tr<=Qt;Tr++){let Pr=this.d*Tr+sr;if((!Ze||Ze(this._convertFromCellCoord(sr),this._convertFromCellCoord(Tr),this._convertFromCellCoord(sr+1),this._convertFromCellCoord(Tr+1)))&&ue.call(this,S,R,j,te,Pr,ve,Re,Ze))return}}_convertFromCellCoord(S){return(S-this.padding)/this.scale}_convertToCellCoord(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let S=this.cells,R=3+this.cells.length+1+1,j=0;for(let ve=0;ve=0)continue;let ve=D[ue];te[ue]=Ii[R].shallow.indexOf(ue)>=0?ve:Ea(ve,S)}D instanceof Error&&(te.message=D.message)}if(te.$name)throw new Error("$name property is reserved for worker serialization logic.");return R!=="Object"&&(te.$name=R),te}function qa(D){if(Ta(D))return D;if(Array.isArray(D))return D.map(qa);if(typeof D!="object")throw new Error("can't deserialize object of type "+typeof D);let S=Ma(D)||"Object";if(!Ii[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:R}=Ii[S];if(!R)throw new Error(`can't deserialize unregistered class ${S}`);if(R.deserialize)return R.deserialize(D);let j=Object.create(R.prototype);for(let te of Object.keys(D)){if(te==="$name")continue;let ue=D[te];j[te]=Ii[S].shallow.indexOf(te)>=0?ue:qa(ue)}return j}class Cn{constructor(){this.first=!0}update(S,R){let j=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=j,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=j,!0):(this.lastFloorZoom>j?(this.lastIntegerZoom=j+1,this.lastIntegerZoomTime=R):this.lastFloorZoomD>=128&&D<=255,"Hangul Jamo":D=>D>=4352&&D<=4607,Khmer:D=>D>=6016&&D<=6143,"General Punctuation":D=>D>=8192&&D<=8303,"Letterlike Symbols":D=>D>=8448&&D<=8527,"Number Forms":D=>D>=8528&&D<=8591,"Miscellaneous Technical":D=>D>=8960&&D<=9215,"Control Pictures":D=>D>=9216&&D<=9279,"Optical Character Recognition":D=>D>=9280&&D<=9311,"Enclosed Alphanumerics":D=>D>=9312&&D<=9471,"Geometric Shapes":D=>D>=9632&&D<=9727,"Miscellaneous Symbols":D=>D>=9728&&D<=9983,"Miscellaneous Symbols and Arrows":D=>D>=11008&&D<=11263,"Ideographic Description Characters":D=>D>=12272&&D<=12287,"CJK Symbols and Punctuation":D=>D>=12288&&D<=12351,Katakana:D=>D>=12448&&D<=12543,Kanbun:D=>D>=12688&&D<=12703,"CJK Strokes":D=>D>=12736&&D<=12783,"Enclosed CJK Letters and Months":D=>D>=12800&&D<=13055,"CJK Compatibility":D=>D>=13056&&D<=13311,"Yijing Hexagram Symbols":D=>D>=19904&&D<=19967,"Private Use Area":D=>D>=57344&&D<=63743,"Vertical Forms":D=>D>=65040&&D<=65055,"CJK Compatibility Forms":D=>D>=65072&&D<=65103,"Small Form Variants":D=>D>=65104&&D<=65135,"Halfwidth and Fullwidth Forms":D=>D>=65280&&D<=65519};function Ua(D){for(let S of D)if(Bo(S.charCodeAt(0)))return!0;return!1}function mo(D){for(let S of D)if(!Qo(S.charCodeAt(0)))return!1;return!0}function Xo(D){let S=D.map(R=>{try{return new RegExp(`\\p{sc=${R}}`,"u").source}catch(j){return null}}).filter(R=>R);return new RegExp(S.join("|"),"u")}let Ts=Xo(["Arab","Dupl","Mong","Ougr","Syrc"]);function Qo(D){return!Ts.test(String.fromCodePoint(D))}let ys=Xo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Bo(D){return!(D!==746&&D!==747&&(D<4352||!(sn["CJK Compatibility Forms"](D)&&!(D>=65097&&D<=65103)||sn["CJK Compatibility"](D)||sn["CJK Strokes"](D)||!(!sn["CJK Symbols and Punctuation"](D)||D>=12296&&D<=12305||D>=12308&&D<=12319||D===12336)||sn["Enclosed CJK Letters and Months"](D)||sn["Ideographic Description Characters"](D)||sn.Kanbun(D)||sn.Katakana(D)&&D!==12540||!(!sn["Halfwidth and Fullwidth Forms"](D)||D===65288||D===65289||D===65293||D>=65306&&D<=65310||D===65339||D===65341||D===65343||D>=65371&&D<=65503||D===65507||D>=65512&&D<=65519)||!(!sn["Small Form Variants"](D)||D>=65112&&D<=65118||D>=65123&&D<=65126)||sn["Vertical Forms"](D)||sn["Yijing Hexagram Symbols"](D)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(D))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(D))||ys.test(String.fromCodePoint(D)))))}function yl(D){return!(Bo(D)||function(S){return!!(sn["Latin-1 Supplement"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||sn["General Punctuation"](S)&&(S===8214||S===8224||S===8225||S===8240||S===8241||S===8251||S===8252||S===8258||S===8263||S===8264||S===8265||S===8273)||sn["Letterlike Symbols"](S)||sn["Number Forms"](S)||sn["Miscellaneous Technical"](S)&&(S>=8960&&S<=8967||S>=8972&&S<=8991||S>=8996&&S<=9e3||S===9003||S>=9085&&S<=9114||S>=9150&&S<=9165||S===9167||S>=9169&&S<=9179||S>=9186&&S<=9215)||sn["Control Pictures"](S)&&S!==9251||sn["Optical Character Recognition"](S)||sn["Enclosed Alphanumerics"](S)||sn["Geometric Shapes"](S)||sn["Miscellaneous Symbols"](S)&&!(S>=9754&&S<=9759)||sn["Miscellaneous Symbols and Arrows"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||sn["CJK Symbols and Punctuation"](S)||sn.Katakana(S)||sn["Private Use Area"](S)||sn["CJK Compatibility Forms"](S)||sn["Small Form Variants"](S)||sn["Halfwidth and Fullwidth Forms"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(D))}let Gs=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 Ds(D){return Gs.test(String.fromCodePoint(D))}function ia(D,S){return!(!S&&Ds(D)||D>=2304&&D<=3583||D>=3840&&D<=4255||sn.Khmer(D))}function Ka(D){for(let S of D)if(Ds(S.charCodeAt(0)))return!0;return!1}let vs=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(D){this.pluginStatus=D.pluginStatus,this.pluginURL=D.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(D){this.applyArabicShaping=D.applyArabicShaping,this.processBidirectionalText=D.processBidirectionalText,this.processStyledBidirectionalText=D.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ko{constructor(S,R){this.zoom=S,R?(this.now=R.now,this.fadeDuration=R.fadeDuration,this.zoomHistory=R.zoomHistory,this.transition=R.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Cn,this.transition={})}isSupportedScript(S){return function(R,j){for(let te of R)if(!ia(te.charCodeAt(0),j))return!1;return!0}(S,vs.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,R=S-Math.floor(S),j=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:R+(1-R)*j}:{fromScale:.5,toScale:1,t:1-(1-j)*R}}}class iu{constructor(S,R){this.property=S,this.value=R,this.expression=function(j,te){if(Ch(j))return new Qs(j,te);if(Lc(j)){let ue=yu(j,te);if(ue.result==="error")throw new Error(ue.value.map(ve=>`${ve.key}: ${ve.message}`).join(", "));return ue.value}{let ue=j;return te.type==="color"&&typeof j=="string"?ue=Zt.parse(j):te.type!=="padding"||typeof j!="number"&&!Array.isArray(j)?te.type==="variableAnchorOffsetCollection"&&Array.isArray(j)&&(ue=Si.parse(j)):ue=Vr.parse(j),{kind:"constant",evaluate:()=>ue}}}(R===void 0?S.specification.default:R,S.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(S,R,j){return this.property.possiblyEvaluate(this,S,R,j)}}class Du{constructor(S){this.property=S,this.value=new iu(S,void 0)}transitioned(S,R){return new mf(this.property,this.value,R,L({},S.transition,this.transition),S.now)}untransitioned(){return new mf(this.property,this.value,null,{},0)}}class ac{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return p(this._values[S].value.value)}setValue(S,R){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Du(this._values[S].property)),this._values[S].value=new iu(this._values[S].property,R===null?void 0:p(R))}getTransition(S){return p(this._values[S].transition)}setTransition(S,R){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Du(this._values[S].property)),this._values[S].transition=p(R)||void 0}serialize(){let S={};for(let R of Object.keys(this._values)){let j=this.getValue(R);j!==void 0&&(S[R]=j);let te=this.getTransition(R);te!==void 0&&(S[`${R}-transition`]=te)}return S}transitioned(S,R){let j=new bu(this._properties);for(let te of Object.keys(this._values))j._values[te]=this._values[te].transitioned(S,R._values[te]);return j}untransitioned(){let S=new bu(this._properties);for(let R of Object.keys(this._values))S._values[R]=this._values[R].untransitioned();return S}}class mf{constructor(S,R,j,te,ue){this.property=S,this.value=R,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,S.specification.transition&&(te.delay||te.duration)&&(this.prior=j)}possiblyEvaluate(S,R,j){let te=S.now||0,ue=this.value.possiblyEvaluate(S,R,j),ve=this.prior;if(ve){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(te=1)return 1;let at=Ze*Ze,Tt=at*Ze;return 4*(Ze<.5?Tt:3*(Ze-at)+Tt-.75)}(Re))}}return ue}}class bu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,R,j){let te=new Rc(this._properties);for(let ue of Object.keys(this._values))te._values[ue]=this._values[ue].possiblyEvaluate(S,R,j);return te}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class Kc{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return p(this._values[S].value)}setValue(S,R){this._values[S]=new iu(this._values[S].property,R===null?void 0:p(R))}serialize(){let S={};for(let R of Object.keys(this._values)){let j=this.getValue(R);j!==void 0&&(S[R]=j)}return S}possiblyEvaluate(S,R,j){let te=new Rc(this._properties);for(let ue of Object.keys(this._values))te._values[ue]=this._values[ue].possiblyEvaluate(S,R,j);return te}}class Ru{constructor(S,R,j){this.property=S,this.value=R,this.parameters=j}isConstant(){return this.value.kind==="constant"}constantOr(S){return this.value.kind==="constant"?this.value.value:S}evaluate(S,R,j,te){return this.property.evaluate(this.value,this.parameters,S,R,j,te)}}class Rc{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Ra{constructor(S){this.specification=S}possiblyEvaluate(S,R){if(S.isDataDriven())throw new Error("Value should not be data driven");return S.expression.evaluate(R)}interpolate(S,R,j){let te=Mo[this.specification.type];return te?te(S,R,j):S}}class eo{constructor(S,R){this.specification=S,this.overrides=R}possiblyEvaluate(S,R,j,te){return new Ru(this,S.expression.kind==="constant"||S.expression.kind==="camera"?{kind:"constant",value:S.expression.evaluate(R,null,{},j,te)}:S.expression,R)}interpolate(S,R,j){if(S.value.kind!=="constant"||R.value.kind!=="constant")return S;if(S.value.value===void 0||R.value.value===void 0)return new Ru(this,{kind:"constant",value:void 0},S.parameters);let te=Mo[this.specification.type];if(te){let ue=te(S.value.value,R.value.value,j);return new Ru(this,{kind:"constant",value:ue},S.parameters)}return S}evaluate(S,R,j,te,ue,ve){return S.kind==="constant"?S.value:S.evaluate(R,j,te,ue,ve)}}class Jc extends eo{possiblyEvaluate(S,R,j,te){if(S.value===void 0)return new Ru(this,{kind:"constant",value:void 0},R);if(S.expression.kind==="constant"){let ue=S.expression.evaluate(R,null,{},j,te),ve=S.property.specification.type==="resolvedImage"&&typeof ue!="string"?ue.name:ue,Re=this._calculate(ve,ve,ve,R);return new Ru(this,{kind:"constant",value:Re},R)}if(S.expression.kind==="camera"){let ue=this._calculate(S.expression.evaluate({zoom:R.zoom-1}),S.expression.evaluate({zoom:R.zoom}),S.expression.evaluate({zoom:R.zoom+1}),R);return new Ru(this,{kind:"constant",value:ue},R)}return new Ru(this,S.expression,R)}evaluate(S,R,j,te,ue,ve){if(S.kind==="source"){let Re=S.evaluate(R,j,te,ue,ve);return this._calculate(Re,Re,Re,R)}return S.kind==="composite"?this._calculate(S.evaluate({zoom:Math.floor(R.zoom)-1},j,te),S.evaluate({zoom:Math.floor(R.zoom)},j,te),S.evaluate({zoom:Math.floor(R.zoom)+1},j,te),R):S.value}_calculate(S,R,j,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:R}:{from:j,to:R}}interpolate(S){return S}}class yc{constructor(S){this.specification=S}possiblyEvaluate(S,R,j,te){if(S.value!==void 0){if(S.expression.kind==="constant"){let ue=S.expression.evaluate(R,null,{},j,te);return this._calculate(ue,ue,ue,R)}return this._calculate(S.expression.evaluate(new Ko(Math.floor(R.zoom-1),R)),S.expression.evaluate(new Ko(Math.floor(R.zoom),R)),S.expression.evaluate(new Ko(Math.floor(R.zoom+1),R)),R)}}_calculate(S,R,j,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:R}:{from:j,to:R}}interpolate(S){return S}}class _c{constructor(S){this.specification=S}possiblyEvaluate(S,R,j,te){return!!S.expression.evaluate(R,null,{},j,te)}interpolate(){return!1}}class le{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let R in S){let j=S[R];j.specification.overridable&&this.overridableProperties.push(R);let te=this.defaultPropertyValues[R]=new iu(j,void 0),ue=this.defaultTransitionablePropertyValues[R]=new Du(j);this.defaultTransitioningPropertyValues[R]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[R]=te.possiblyEvaluate({})}}}mi("DataDrivenProperty",eo),mi("DataConstantProperty",Ra),mi("CrossFadedDataDrivenProperty",Jc),mi("CrossFadedProperty",yc),mi("ColorRampProperty",_c);let w="-transition";class B extends De{constructor(S,R){if(super(),this.id=S.id,this.type=S.type,this._featureFilter={filter:()=>!0,needGeometry:!1},S.type!=="custom"&&(this.metadata=S.metadata,this.minzoom=S.minzoom,this.maxzoom=S.maxzoom,S.type!=="background"&&(this.source=S.source,this.sourceLayer=S["source-layer"],this.filter=S.filter),R.layout&&(this._unevaluatedLayout=new Kc(R.layout)),R.paint)){this._transitionablePaint=new ac(R.paint);for(let j in S.paint)this.setPaintProperty(j,S.paint[j],{validate:!1});for(let j in S.layout)this.setLayoutProperty(j,S.layout[j],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Rc(R.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S==="visibility"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,R,j={}){R!=null&&this._validate(hn,`layers.${this.id}.layout.${S}`,S,R,j)||(S!=="visibility"?this._unevaluatedLayout.setValue(S,R):this.visibility=R)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,R,j={}){if(R!=null&&this._validate(Xi,`layers.${this.id}.paint.${S}`,S,R,j))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),R||void 0),!1;{let te=this._transitionablePaint._values[S],ue=te.property.specification["property-type"]==="cross-faded-data-driven",ve=te.value.isDataDriven(),Re=te.value;this._transitionablePaint.setValue(S,R),this._handleSpecialPaintPropertyUpdate(S);let Ze=this._transitionablePaint._values[S].value;return Ze.isDataDriven()||ve||ue||this._handleOverridablePaintPropertyUpdate(S,Re,Ze)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,R,j){return!1}isHidden(S){return!!(this.minzoom&&S=this.maxzoom)||this.visibility==="none"}updateTransitions(S){this._transitioningPaint=this._transitionablePaint.transitioned(S,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(S,R){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,R)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,R)}serialize(){let S={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&&(S.layout=S.layout||{},S.layout.visibility=this.visibility),M(S,(R,j)=>!(R===void 0||j==="layout"&&!Object.keys(R).length||j==="paint"&&!Object.keys(R).length))}_validate(S,R,j,te,ue={}){return(!ue||ue.validate!==!1)&&Ti(this,S.call(fi,{key:R,layerType:this.type,objectKey:j,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let R=this.paint.get(S);if(R instanceof Ru&&Cu(R.property.specification)&&(R.value.kind==="source"||R.value.kind==="composite")&&R.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(S,R){this._structArray=S,this._pos1=R*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class se{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(S,R){return S._trim(),R&&(S.isTransferred=!0,R.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let R=Object.create(this.prototype);return R.arrayBuffer=S.arrayBuffer,R.length=S.length,R.capacity=S.arrayBuffer.byteLength/R.bytesPerElement,R._refreshViews(),R}_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(S){this.reserve(S),this.length=S}reserve(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let R=this.uint8;this._refreshViews(),R&&this.uint8.set(R)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function qe(D,S=1){let R=0,j=0;return{members:D.map(te=>{let ue=Q[te.type].BYTES_PER_ELEMENT,ve=R=je(R,Math.max(S,ue)),Re=te.components||1;return j=Math.max(j,ue),R+=ue*Re,{name:te.name,type:te.type,components:Re,offset:ve}}),size:je(R,Math.max(j,S)),alignment:S}}function je(D,S){return Math.ceil(D/S)*S}class it extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R){let j=this.length;return this.resize(j+1),this.emplace(j,S,R)}emplace(S,R,j){let te=2*S;return this.int16[te+0]=R,this.int16[te+1]=j,S}}it.prototype.bytesPerElement=4,mi("StructArrayLayout2i4",it);class yt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,S,R,j)}emplace(S,R,j,te){let ue=3*S;return this.int16[ue+0]=R,this.int16[ue+1]=j,this.int16[ue+2]=te,S}}yt.prototype.bytesPerElement=6,mi("StructArrayLayout3i6",yt);class Ot extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,S,R,j,te)}emplace(S,R,j,te,ue){let ve=4*S;return this.int16[ve+0]=R,this.int16[ve+1]=j,this.int16[ve+2]=te,this.int16[ve+3]=ue,S}}Ot.prototype.bytesPerElement=8,mi("StructArrayLayout4i8",Ot);class Nt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,S,R,j,te,ue,ve)}emplace(S,R,j,te,ue,ve,Re){let Ze=6*S;return this.int16[Ze+0]=R,this.int16[Ze+1]=j,this.int16[Ze+2]=te,this.int16[Ze+3]=ue,this.int16[Ze+4]=ve,this.int16[Ze+5]=Re,S}}Nt.prototype.bytesPerElement=12,mi("StructArrayLayout2i4i12",Nt);class hr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,S,R,j,te,ue,ve)}emplace(S,R,j,te,ue,ve,Re){let Ze=4*S,at=8*S;return this.int16[Ze+0]=R,this.int16[Ze+1]=j,this.uint8[at+4]=te,this.uint8[at+5]=ue,this.uint8[at+6]=ve,this.uint8[at+7]=Re,S}}hr.prototype.bytesPerElement=8,mi("StructArrayLayout2i4ub8",hr);class Sr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,R){let j=this.length;return this.resize(j+1),this.emplace(j,S,R)}emplace(S,R,j){let te=2*S;return this.float32[te+0]=R,this.float32[te+1]=j,S}}Sr.prototype.bytesPerElement=8,mi("StructArrayLayout2f8",Sr);class he extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue,ve,Re,Ze,at,Tt){let Ft=this.length;return this.resize(Ft+1),this.emplace(Ft,S,R,j,te,ue,ve,Re,Ze,at,Tt)}emplace(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft){let Qt=10*S;return this.uint16[Qt+0]=R,this.uint16[Qt+1]=j,this.uint16[Qt+2]=te,this.uint16[Qt+3]=ue,this.uint16[Qt+4]=ve,this.uint16[Qt+5]=Re,this.uint16[Qt+6]=Ze,this.uint16[Qt+7]=at,this.uint16[Qt+8]=Tt,this.uint16[Qt+9]=Ft,S}}he.prototype.bytesPerElement=20,mi("StructArrayLayout10ui20",he);class be extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt){let sr=this.length;return this.resize(sr+1),this.emplace(sr,S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt)}emplace(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr){let Tr=12*S;return this.int16[Tr+0]=R,this.int16[Tr+1]=j,this.int16[Tr+2]=te,this.int16[Tr+3]=ue,this.uint16[Tr+4]=ve,this.uint16[Tr+5]=Re,this.uint16[Tr+6]=Ze,this.uint16[Tr+7]=at,this.int16[Tr+8]=Tt,this.int16[Tr+9]=Ft,this.int16[Tr+10]=Qt,this.int16[Tr+11]=sr,S}}be.prototype.bytesPerElement=24,mi("StructArrayLayout4i4ui4i24",be);class Pe extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,S,R,j)}emplace(S,R,j,te){let ue=3*S;return this.float32[ue+0]=R,this.float32[ue+1]=j,this.float32[ue+2]=te,S}}Pe.prototype.bytesPerElement=12,mi("StructArrayLayout3f12",Pe);class Oe extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let R=this.length;return this.resize(R+1),this.emplace(R,S)}emplace(S,R){return this.uint32[1*S+0]=R,S}}Oe.prototype.bytesPerElement=4,mi("StructArrayLayout1ul4",Oe);class Je extends se{_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(S,R,j,te,ue,ve,Re,Ze,at){let Tt=this.length;return this.resize(Tt+1),this.emplace(Tt,S,R,j,te,ue,ve,Re,Ze,at)}emplace(S,R,j,te,ue,ve,Re,Ze,at,Tt){let Ft=10*S,Qt=5*S;return this.int16[Ft+0]=R,this.int16[Ft+1]=j,this.int16[Ft+2]=te,this.int16[Ft+3]=ue,this.int16[Ft+4]=ve,this.int16[Ft+5]=Re,this.uint32[Qt+3]=Ze,this.uint16[Ft+8]=at,this.uint16[Ft+9]=Tt,S}}Je.prototype.bytesPerElement=20,mi("StructArrayLayout6i1ul2ui20",Je);class He extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,S,R,j,te,ue,ve)}emplace(S,R,j,te,ue,ve,Re){let Ze=6*S;return this.int16[Ze+0]=R,this.int16[Ze+1]=j,this.int16[Ze+2]=te,this.int16[Ze+3]=ue,this.int16[Ze+4]=ve,this.int16[Ze+5]=Re,S}}He.prototype.bytesPerElement=12,mi("StructArrayLayout2i2i2i12",He);class et extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue){let ve=this.length;return this.resize(ve+1),this.emplace(ve,S,R,j,te,ue)}emplace(S,R,j,te,ue,ve){let Re=4*S,Ze=8*S;return this.float32[Re+0]=R,this.float32[Re+1]=j,this.float32[Re+2]=te,this.int16[Ze+6]=ue,this.int16[Ze+7]=ve,S}}et.prototype.bytesPerElement=16,mi("StructArrayLayout2f1f2i16",et);class Mt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,R,j,te,ue,ve){let Re=this.length;return this.resize(Re+1),this.emplace(Re,S,R,j,te,ue,ve)}emplace(S,R,j,te,ue,ve,Re){let Ze=16*S,at=4*S,Tt=8*S;return this.uint8[Ze+0]=R,this.uint8[Ze+1]=j,this.float32[at+1]=te,this.float32[at+2]=ue,this.int16[Tt+6]=ve,this.int16[Tt+7]=Re,S}}Mt.prototype.bytesPerElement=16,mi("StructArrayLayout2ub2f2i16",Mt);class Rt extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,S,R,j)}emplace(S,R,j,te){let ue=3*S;return this.uint16[ue+0]=R,this.uint16[ue+1]=j,this.uint16[ue+2]=te,S}}Rt.prototype.bytesPerElement=6,mi("StructArrayLayout3ui6",Rt);class Ut extends se{_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(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni){let Ri=this.length;return this.resize(Ri+1),this.emplace(Ri,S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni)}emplace(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri){let pi=24*S,ki=12*S,Zi=48*S;return this.int16[pi+0]=R,this.int16[pi+1]=j,this.uint16[pi+2]=te,this.uint16[pi+3]=ue,this.uint32[ki+2]=ve,this.uint32[ki+3]=Re,this.uint32[ki+4]=Ze,this.uint16[pi+10]=at,this.uint16[pi+11]=Tt,this.uint16[pi+12]=Ft,this.float32[ki+7]=Qt,this.float32[ki+8]=sr,this.uint8[Zi+36]=Tr,this.uint8[Zi+37]=Pr,this.uint8[Zi+38]=$r,this.uint32[ki+10]=ni,this.int16[pi+22]=Ri,S}}Ut.prototype.bytesPerElement=48,mi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ut);class tr extends se{_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(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri,pi,ki,Zi,ta,Va,Io,La,Hn,lo,$a){let Xa=this.length;return this.resize(Xa+1),this.emplace(Xa,S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri,pi,ki,Zi,ta,Va,Io,La,Hn,lo,$a)}emplace(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr,$r,ni,Ri,pi,ki,Zi,ta,Va,Io,La,Hn,lo,$a,Xa){let Tn=32*S,bo=16*S;return this.int16[Tn+0]=R,this.int16[Tn+1]=j,this.int16[Tn+2]=te,this.int16[Tn+3]=ue,this.int16[Tn+4]=ve,this.int16[Tn+5]=Re,this.int16[Tn+6]=Ze,this.int16[Tn+7]=at,this.uint16[Tn+8]=Tt,this.uint16[Tn+9]=Ft,this.uint16[Tn+10]=Qt,this.uint16[Tn+11]=sr,this.uint16[Tn+12]=Tr,this.uint16[Tn+13]=Pr,this.uint16[Tn+14]=$r,this.uint16[Tn+15]=ni,this.uint16[Tn+16]=Ri,this.uint16[Tn+17]=pi,this.uint16[Tn+18]=ki,this.uint16[Tn+19]=Zi,this.uint16[Tn+20]=ta,this.uint16[Tn+21]=Va,this.uint16[Tn+22]=Io,this.uint32[bo+12]=La,this.float32[bo+13]=Hn,this.float32[bo+14]=lo,this.uint16[Tn+30]=$a,this.uint16[Tn+31]=Xa,S}}tr.prototype.bytesPerElement=64,mi("StructArrayLayout8i15ui1ul2f2ui64",tr);class mr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let R=this.length;return this.resize(R+1),this.emplace(R,S)}emplace(S,R){return this.float32[1*S+0]=R,S}}mr.prototype.bytesPerElement=4,mi("StructArrayLayout1f4",mr);class Dr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,S,R,j)}emplace(S,R,j,te){let ue=3*S;return this.uint16[6*S+0]=R,this.float32[ue+1]=j,this.float32[ue+2]=te,S}}Dr.prototype.bytesPerElement=12,mi("StructArrayLayout1ui2f12",Dr);class zr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,R,j){let te=this.length;return this.resize(te+1),this.emplace(te,S,R,j)}emplace(S,R,j,te){let ue=4*S;return this.uint32[2*S+0]=R,this.uint16[ue+2]=j,this.uint16[ue+3]=te,S}}zr.prototype.bytesPerElement=8,mi("StructArrayLayout1ul2ui8",zr);class Xr extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,R){let j=this.length;return this.resize(j+1),this.emplace(j,S,R)}emplace(S,R,j){let te=2*S;return this.uint16[te+0]=R,this.uint16[te+1]=j,S}}Xr.prototype.bytesPerElement=4,mi("StructArrayLayout2ui4",Xr);class di extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let R=this.length;return this.resize(R+1),this.emplace(R,S)}emplace(S,R){return this.uint16[1*S+0]=R,S}}di.prototype.bytesPerElement=2,mi("StructArrayLayout1ui2",di);class Li extends se{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,R,j,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,S,R,j,te)}emplace(S,R,j,te,ue){let ve=4*S;return this.float32[ve+0]=R,this.float32[ve+1]=j,this.float32[ve+2]=te,this.float32[ve+3]=ue,S}}Li.prototype.bytesPerElement=16,mi("StructArrayLayout4f16",Li);class Ci 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)}}Ci.prototype.size=20;class Qi extends Je{get(S){return new Ci(this,S)}}mi("CollisionBoxArray",Qi);class Mn 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(S){this._structArray.uint8[this._pos1+37]=S}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(S){this._structArray.uint8[this._pos1+38]=S}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(S){this._structArray.uint32[this._pos4+10]=S}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Mn.prototype.size=48;class pa extends Ut{get(S){return new Mn(this,S)}}mi("PlacedSymbolArray",pa);class ea 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(S){this._structArray.uint32[this._pos4+12]=S}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]}}ea.prototype.size=64;class Ga extends tr{get(S){return new ea(this,S)}}mi("SymbolInstanceArray",Ga);class To extends mr{getoffsetX(S){return this.float32[1*S+0]}}mi("GlyphOffsetArray",To);class Wa extends yt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}mi("SymbolLineVertexArray",Wa);class co 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]}}co.prototype.size=12;class Do extends Dr{get(S){return new co(this,S)}}mi("TextAnchorOffsetArray",Do);class Rs 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]}}Rs.prototype.size=8;class As extends zr{get(S){return new Rs(this,S)}}mi("FeatureIndexArray",As);class yo extends it{}class po extends it{}class _l extends it{}class Vl extends Nt{}class Xu extends hr{}class cu extends Sr{}class el extends he{}class nu extends be{}class zc extends Pe{}class Rl extends Oe{}class zl extends He{}class Z extends Mt{}class oe extends Rt{}class we extends Xr{}let Be=qe([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ue}=Be;class We{constructor(S=[]){this.segments=S}prepareSegment(S,R,j,te){let ue=this.segments[this.segments.length-1];return S>We.MAX_VERTEX_ARRAY_LENGTH&&T(`Max vertices per segment is ${We.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!ue||ue.vertexLength+S>We.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te)&&(ue={vertexOffset:R.length,primitiveOffset:j.length,vertexLength:0,primitiveLength:0},te!==void 0&&(ue.sortKey=te),this.segments.push(ue)),ue}get(){return this.segments}destroy(){for(let S of this.segments)for(let R in S.vaos)S.vaos[R].destroy()}static simpleSegment(S,R,j,te){return new We([{vertexOffset:S,primitiveOffset:R,vertexLength:j,primitiveLength:te,vaos:{},sortKey:0}])}}function wt(D,S){return 256*(D=k(Math.floor(D),0,255))+k(Math.floor(S),0,255)}We.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,mi("SegmentVector",We);let tt=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 zt={exports:{}},or={exports:{}};or.exports=function(D,S){var R,j,te,ue,ve,Re,Ze,at;for(j=D.length-(R=3&D.length),te=S,ve=3432918353,Re=461845907,at=0;at>>16)*ve&65535)<<16)&4294967295)<<15|Ze>>>17))*Re+(((Ze>>>16)*Re&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(ue>>>16)&65535)<<16);switch(Ze=0,R){case 3:Ze^=(255&D.charCodeAt(at+2))<<16;case 2:Ze^=(255&D.charCodeAt(at+1))<<8;case 1:te^=Ze=(65535&(Ze=(Ze=(65535&(Ze^=255&D.charCodeAt(at)))*ve+(((Ze>>>16)*ve&65535)<<16)&4294967295)<<15|Ze>>>17))*Re+(((Ze>>>16)*Re&65535)<<16)&4294967295}return te^=D.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var lr=or.exports,Rr={exports:{}};Rr.exports=function(D,S){for(var R,j=D.length,te=S^j,ue=0;j>=4;)R=1540483477*(65535&(R=255&D.charCodeAt(ue)|(255&D.charCodeAt(++ue))<<8|(255&D.charCodeAt(++ue))<<16|(255&D.charCodeAt(++ue))<<24))+((1540483477*(R>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(R=1540483477*(65535&(R^=R>>>24))+((1540483477*(R>>>16)&65535)<<16)),j-=4,++ue;switch(j){case 3:te^=(255&D.charCodeAt(ue+2))<<16;case 2:te^=(255&D.charCodeAt(ue+1))<<8;case 1:te=1540483477*(65535&(te^=255&D.charCodeAt(ue)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var Ir=lr,oi=Rr.exports;zt.exports=Ir,zt.exports.murmur3=Ir,zt.exports.murmur2=oi;var ui=o(zt.exports);class qr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,R,j,te){this.ids.push(Kr(S)),this.positions.push(R,j,te)}getPositions(S){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let R=Kr(S),j=0,te=this.ids.length-1;for(;j>1;this.ids[ve]>=R?te=ve:j=ve+1}let ue=[];for(;this.ids[j]===R;)ue.push({index:this.positions[3*j],start:this.positions[3*j+1],end:this.positions[3*j+2]}),j++;return ue}static serialize(S,R){let j=new Float64Array(S.ids),te=new Uint32Array(S.positions);return ii(j,te,0,j.length-1),R&&R.push(j.buffer,te.buffer),{ids:j,positions:te}}static deserialize(S){let R=new qr;return R.ids=S.ids,R.positions=S.positions,R.indexed=!0,R}}function Kr(D){let S=+D;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:ui(String(D))}function ii(D,S,R,j){for(;R>1],ue=R-1,ve=j+1;for(;;){do ue++;while(D[ue]te);if(ue>=ve)break;vi(D,ue,ve),vi(S,3*ue,3*ve),vi(S,3*ue+1,3*ve+1),vi(S,3*ue+2,3*ve+2)}ve-R`u_${te}`),this.type=j}setUniform(S,R,j){S.set(j.constantOr(this.value))}getBinding(S,R,j){return this.type==="color"?new dn(S,R):new Jr(S,R)}}class ya{constructor(S,R){this.uniformNames=R.map(j=>`u_${j}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,R){this.pixelRatioFrom=R.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=R.tlbr,this.patternTo=S.tlbr}setUniform(S,R,j,te){let ue=te==="u_pattern_to"?this.patternTo:te==="u_pattern_from"?this.patternFrom:te==="u_pixel_ratio_to"?this.pixelRatioTo:te==="u_pixel_ratio_from"?this.pixelRatioFrom:null;ue&&S.set(ue)}getBinding(S,R,j){return j.substr(0,9)==="u_pattern"?new un(S,R):new Jr(S,R)}}class so{constructor(S,R,j,te){this.expression=S,this.type=j,this.maxValue=0,this.paintVertexAttributes=R.map(ue=>({name:`a_${ue}`,type:"Float32",components:j==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(S,R,j,te,ue){let ve=this.paintVertexArray.length,Re=this.expression.evaluate(new Ko(0),R,{},te,[],ue);this.paintVertexArray.resize(S),this._setPaintValue(ve,S,Re)}updatePaintArray(S,R,j,te){let ue=this.expression.evaluate({zoom:0},j,te);this._setPaintValue(S,R,ue)}_setPaintValue(S,R,j){if(this.type==="color"){let te=Nn(j);for(let ue=S;ue`u_${Re}_t`),this.type=j,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=R.map(Re=>({name:`a_${Re}`,type:"Float32",components:j==="color"?4:2,offset:0})),this.paintVertexArray=new ve}populatePaintArray(S,R,j,te,ue){let ve=this.expression.evaluate(new Ko(this.zoom),R,{},te,[],ue),Re=this.expression.evaluate(new Ko(this.zoom+1),R,{},te,[],ue),Ze=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(Ze,S,ve,Re)}updatePaintArray(S,R,j,te){let ue=this.expression.evaluate({zoom:this.zoom},j,te),ve=this.expression.evaluate({zoom:this.zoom+1},j,te);this._setPaintValue(S,R,ue,ve)}_setPaintValue(S,R,j,te){if(this.type==="color"){let ue=Nn(j),ve=Nn(te);for(let Re=S;Re`#define HAS_UNIFORM_${te}`))}return S}getBinderAttributes(){let S=[];for(let R in this.binders){let j=this.binders[R];if(j instanceof so||j instanceof wa)for(let te=0;te!0){this.programConfigurations={};for(let te of S)this.programConfigurations[te.id]=new Ss(te,R,j);this.needsUpload=!1,this._featureMap=new qr,this._bufferOffset=0}populatePaintArrays(S,R,j,te,ue,ve){for(let Re in this.programConfigurations)this.programConfigurations[Re].populatePaintArrays(S,R,te,ue,ve);R.id!==void 0&&this._featureMap.add(R.id,j,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,R,j,te){for(let ue of j)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(S,this._featureMap,R,ue,te)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let R in this.programConfigurations)this.programConfigurations[R].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Ns(D,S){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"]}[D]||[D.replace(`${S}-`,"").replace(/-/g,"_")]}function pn(D,S,R){let j={color:{source:Sr,composite:Li},number:{source:mr,composite:Sr}},te=function(ue){return{"line-pattern":{source:el,composite:el},"fill-pattern":{source:el,composite:el},"fill-extrusion-pattern":{source:el,composite:el}}[ue]}(D);return te&&te[R]||j[S][R]}mi("ConstantBinder",ga),mi("CrossFadedConstantBinder",ya),mi("SourceExpressionBinder",so),mi("CrossFadedCompositeBinder",io),mi("CompositeExpressionBinder",wa),mi("ProgramConfiguration",Ss,{omit:["_buffers"]}),mi("ProgramConfigurationSet",_s);let za=8192,Lo=Math.pow(2,14)-1,Fo=-Lo-1;function js(D){let S=za/D.extent,R=D.loadGeometry();for(let j=0;jve.x+1||Zeve.y+1)&&T("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return R}function xl(D,S){return{type:D.type,id:D.id,properties:D.properties,geometry:S?js(D):[]}}function fu(D,S,R,j,te){D.emplaceBack(2*S+(j+1)/2,2*R+(te+1)/2)}class dl{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(R=>R.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new po,this.indexArray=new oe,this.segments=new We,this.programConfigurations=new _s(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(S,R,j){let te=this.layers[0],ue=[],ve=null,Re=!1;te.type==="circle"&&(ve=te.layout.get("circle-sort-key"),Re=!ve.isConstant());for(let{feature:Ze,id:at,index:Tt,sourceLayerIndex:Ft}of S){let Qt=this.layers[0]._featureFilter.needGeometry,sr=xl(Ze,Qt);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),sr,j))continue;let Tr=Re?ve.evaluate(sr,{},j):void 0,Pr={id:at,properties:Ze.properties,type:Ze.type,sourceLayerIndex:Ft,index:Tt,geometry:Qt?sr.geometry:js(Ze),patterns:{},sortKey:Tr};ue.push(Pr)}Re&&ue.sort((Ze,at)=>Ze.sortKey-at.sortKey);for(let Ze of ue){let{geometry:at,index:Tt,sourceLayerIndex:Ft}=Ze,Qt=S[Tt].feature;this.addFeature(Ze,at,Tt,j),R.featureIndex.insert(Qt,at,Tt,Ft,this.index)}}update(S,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,R,this.stateDependentLayers,j)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Ue),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(S,R,j,te){for(let ue of R)for(let ve of ue){let Re=ve.x,Ze=ve.y;if(Re<0||Re>=za||Ze<0||Ze>=za)continue;let at=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Tt=at.vertexLength;fu(this.layoutVertexArray,Re,Ze,-1,-1),fu(this.layoutVertexArray,Re,Ze,1,-1),fu(this.layoutVertexArray,Re,Ze,1,1),fu(this.layoutVertexArray,Re,Ze,-1,1),this.indexArray.emplaceBack(Tt,Tt+1,Tt+2),this.indexArray.emplaceBack(Tt,Tt+3,Tt+2),at.vertexLength+=4,at.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,j,{},te)}}function xc(D,S){for(let R=0;R1){if(wi(D,S))return!0;for(let j=0;j1?R:R.sub(S)._mult(te)._add(S))}function cn(D,S){let R,j,te,ue=!1;for(let ve=0;veS.y!=te.y>S.y&&S.x<(te.x-j.x)*(S.y-j.y)/(te.y-j.y)+j.x&&(ue=!ue)}return ue}function On(D,S){let R=!1;for(let j=0,te=D.length-1;jS.y!=ve.y>S.y&&S.x<(ve.x-ue.x)*(S.y-ue.y)/(ve.y-ue.y)+ue.x&&(R=!R)}return R}function Bn(D,S,R){let j=R[0],te=R[2];if(D.xte.x&&S.x>te.x||D.yte.y&&S.y>te.y)return!1;let ue=F(D,S,R[0]);return ue!==F(D,S,R[1])||ue!==F(D,S,R[2])||ue!==F(D,S,R[3])}function yn(D,S,R){let j=S.paint.get(D).value;return j.kind==="constant"?j.value:R.programConfigurations.get(S.id).getMaxValue(D)}function to(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Dn(D,S,R,j,te){if(!S[0]&&!S[1])return D;let ue=u.convert(S)._mult(te);R==="viewport"&&ue._rotate(-j);let ve=[];for(let Re=0;Revn($r,Pr))}(at,Ze),sr=Ft?Tt*Re:Tt;for(let Tr of te)for(let Pr of Tr){let $r=Ft?Pr:vn(Pr,Ze),ni=sr,Ri=Za([],[Pr.x,Pr.y,0,1],Ze);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ni*=Ri[3]/ve.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ni*=ve.cameraToCenterDistance/Ri[3]),At(Qt,$r,ni))return!0}return!1}}function vn(D,S){let R=Za([],[D.x,D.y,0,1],S);return new u(R[0]/R[3],R[1]/R[3])}class Aa extends dl{}let aa;mi("HeatmapBucket",Aa,{omit:["layers"]});var Xn={get paint(){return aa=aa||new le({"heatmap-radius":new eo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new eo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ra(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new _c(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ra(ce.paint_heatmap["heatmap-opacity"])})}};function Vn(D,{width:S,height:R},j,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==S*R*j)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${S*R*j}`)}else te=new Uint8Array(S*R*j);return D.width=S,D.height=R,D.data=te,D}function ma(D,{width:S,height:R},j){if(S===D.width&&R===D.height)return;let te=Vn({},{width:S,height:R},j);ro(D,te,{x:0,y:0},{x:0,y:0},{width:Math.min(D.width,S),height:Math.min(D.height,R)},j),D.width=S,D.height=R,D.data=te.data}function ro(D,S,R,j,te,ue){if(te.width===0||te.height===0)return S;if(te.width>D.width||te.height>D.height||R.x>D.width-te.width||R.y>D.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>S.width||te.height>S.height||j.x>S.width-te.width||j.y>S.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let ve=D.data,Re=S.data;if(ve===Re)throw new Error("srcData equals dstData, so image is already copied");for(let Ze=0;Ze{S[D.evaluationKey]=Ze;let at=D.expression.evaluate(S);te.data[ve+Re+0]=Math.floor(255*at.r/at.a),te.data[ve+Re+1]=Math.floor(255*at.g/at.a),te.data[ve+Re+2]=Math.floor(255*at.b/at.a),te.data[ve+Re+3]=Math.floor(255*at.a)};if(D.clips)for(let ve=0,Re=0;ve80*R){Re=1/0,Ze=1/0;let Tt=-1/0,Ft=-1/0;for(let Qt=R;QtTt&&(Tt=sr),Tr>Ft&&(Ft=Tr)}at=Math.max(Tt-Re,Ft-Ze),at=at!==0?32767/at:0}return yf(ue,ve,R,Re,Ze,at,0),ve}function bc(D,S,R,j,te){let ue;if(te===function(ve,Re,Ze,at){let Tt=0;for(let Ft=Re,Qt=Ze-at;Ft0)for(let ve=S;ve=S;ve-=j)ue=Jt(ve/j|0,D[ve],D[ve+1],ue);return ue&&de(ue,ue.next)&&(vt(ue),ue=ue.next),ue}function wc(D,S){if(!D)return D;S||(S=D);let R,j=D;do if(R=!1,j.steiner||!de(j,j.next)&&pe(j.prev,j,j.next)!==0)j=j.next;else{if(vt(j),j=S=j.prev,j===j.next)break;R=!0}while(R||j!==S);return S}function yf(D,S,R,j,te,ue,ve){if(!D)return;!ve&&ue&&function(Ze,at,Tt,Ft){let Qt=Ze;do Qt.z===0&&(Qt.z=z(Qt.x,Qt.y,at,Tt,Ft)),Qt.prevZ=Qt.prev,Qt.nextZ=Qt.next,Qt=Qt.next;while(Qt!==Ze);Qt.prevZ.nextZ=null,Qt.prevZ=null,function(sr){let Tr,Pr=1;do{let $r,ni=sr;sr=null;let Ri=null;for(Tr=0;ni;){Tr++;let pi=ni,ki=0;for(let ta=0;ta0||Zi>0&π)ki!==0&&(Zi===0||!pi||ni.z<=pi.z)?($r=ni,ni=ni.nextZ,ki--):($r=pi,pi=pi.nextZ,Zi--),Ri?Ri.nextZ=$r:sr=$r,$r.prevZ=Ri,Ri=$r;ni=pi}Ri.nextZ=null,Pr*=2}while(Tr>1)}(Qt)}(D,j,te,ue);let Re=D;for(;D.prev!==D.next;){let Ze=D.prev,at=D.next;if(ue?Fc(D,j,te,ue):Hl(D))S.push(Ze.i,D.i,at.i),vt(D),D=at.next,Re=at.next;else if((D=at)===Re){ve?ve===1?yf(D=ef(wc(D),S),S,R,j,te,ue,2):ve===2&&ls(D,S,R,j,te,ue):yf(wc(D),S,R,j,te,ue,1);break}}}function Hl(D){let S=D.prev,R=D,j=D.next;if(pe(S,R,j)>=0)return!1;let te=S.x,ue=R.x,ve=j.x,Re=S.y,Ze=R.y,at=j.y,Tt=teue?te>ve?te:ve:ue>ve?ue:ve,sr=Re>Ze?Re>at?Re:at:Ze>at?Ze:at,Tr=j.next;for(;Tr!==S;){if(Tr.x>=Tt&&Tr.x<=Qt&&Tr.y>=Ft&&Tr.y<=sr&&O(te,Re,ue,Ze,ve,at,Tr.x,Tr.y)&&pe(Tr.prev,Tr,Tr.next)>=0)return!1;Tr=Tr.next}return!0}function Fc(D,S,R,j){let te=D.prev,ue=D,ve=D.next;if(pe(te,ue,ve)>=0)return!1;let Re=te.x,Ze=ue.x,at=ve.x,Tt=te.y,Ft=ue.y,Qt=ve.y,sr=ReZe?Re>at?Re:at:Ze>at?Ze:at,$r=Tt>Ft?Tt>Qt?Tt:Qt:Ft>Qt?Ft:Qt,ni=z(sr,Tr,S,R,j),Ri=z(Pr,$r,S,R,j),pi=D.prevZ,ki=D.nextZ;for(;pi&&pi.z>=ni&&ki&&ki.z<=Ri;){if(pi.x>=sr&&pi.x<=Pr&&pi.y>=Tr&&pi.y<=$r&&pi!==te&&pi!==ve&&O(Re,Tt,Ze,Ft,at,Qt,pi.x,pi.y)&&pe(pi.prev,pi,pi.next)>=0||(pi=pi.prevZ,ki.x>=sr&&ki.x<=Pr&&ki.y>=Tr&&ki.y<=$r&&ki!==te&&ki!==ve&&O(Re,Tt,Ze,Ft,at,Qt,ki.x,ki.y)&&pe(ki.prev,ki,ki.next)>=0))return!1;ki=ki.nextZ}for(;pi&&pi.z>=ni;){if(pi.x>=sr&&pi.x<=Pr&&pi.y>=Tr&&pi.y<=$r&&pi!==te&&pi!==ve&&O(Re,Tt,Ze,Ft,at,Qt,pi.x,pi.y)&&pe(pi.prev,pi,pi.next)>=0)return!1;pi=pi.prevZ}for(;ki&&ki.z<=Ri;){if(ki.x>=sr&&ki.x<=Pr&&ki.y>=Tr&&ki.y<=$r&&ki!==te&&ki!==ve&&O(Re,Tt,Ze,Ft,at,Qt,ki.x,ki.y)&&pe(ki.prev,ki,ki.next)>=0)return!1;ki=ki.nextZ}return!0}function ef(D,S){let R=D;do{let j=R.prev,te=R.next.next;!de(j,te)&&Ie(j,R,R.next,te)&&Kt(j,te)&&Kt(te,j)&&(S.push(j.i,R.i,te.i),vt(R),vt(R.next),R=D=te),R=R.next}while(R!==D);return wc(R)}function ls(D,S,R,j,te,ue){let ve=D;do{let Re=ve.next.next;for(;Re!==ve.prev;){if(ve.i!==Re.i&&$(ve,Re)){let Ze=ir(ve,Re);return ve=wc(ve,ve.next),Ze=wc(Ze,Ze.next),yf(ve,S,R,j,te,ue,0),void yf(Ze,S,R,j,te,ue,0)}Re=Re.next}ve=ve.next}while(ve!==D)}function _f(D,S){return D.x-S.x}function ns(D,S){let R=function(te,ue){let ve=ue,Re=te.x,Ze=te.y,at,Tt=-1/0;do{if(Ze<=ve.y&&Ze>=ve.next.y&&ve.next.y!==ve.y){let Pr=ve.x+(Ze-ve.y)*(ve.next.x-ve.x)/(ve.next.y-ve.y);if(Pr<=Re&&Pr>Tt&&(Tt=Pr,at=ve.x=ve.x&&ve.x>=Qt&&Re!==ve.x&&O(Zeat.x||ve.x===at.x&&Y(at,ve)))&&(at=ve,Tr=Pr)}ve=ve.next}while(ve!==Ft);return at}(D,S);if(!R)return S;let j=ir(R,D);return wc(j,j.next),wc(R,R.next)}function Y(D,S){return pe(D.prev,D,S.prev)<0&&pe(S.next,D,D.next)<0}function z(D,S,R,j,te){return(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-R)*te|0)|D<<8))|D<<4))|D<<2))|D<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-j)*te|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function K(D){let S=D,R=D;do(S.x=(D-ve)*(ue-Re)&&(D-ve)*(j-Re)>=(R-ve)*(S-Re)&&(R-ve)*(ue-Re)>=(te-ve)*(j-Re)}function $(D,S){return D.next.i!==S.i&&D.prev.i!==S.i&&!function(R,j){let te=R;do{if(te.i!==R.i&&te.next.i!==R.i&&te.i!==j.i&&te.next.i!==j.i&&Ie(te,te.next,R,j))return!0;te=te.next}while(te!==R);return!1}(D,S)&&(Kt(D,S)&&Kt(S,D)&&function(R,j){let te=R,ue=!1,ve=(R.x+j.x)/2,Re=(R.y+j.y)/2;do te.y>Re!=te.next.y>Re&&te.next.y!==te.y&&ve<(te.next.x-te.x)*(Re-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==R);return ue}(D,S)&&(pe(D.prev,D,S.prev)||pe(D,S.prev,S))||de(D,S)&&pe(D.prev,D,D.next)>0&&pe(S.prev,S,S.next)>0)}function pe(D,S,R){return(S.y-D.y)*(R.x-S.x)-(S.x-D.x)*(R.y-S.y)}function de(D,S){return D.x===S.x&&D.y===S.y}function Ie(D,S,R,j){let te=pt(pe(D,S,R)),ue=pt(pe(D,S,j)),ve=pt(pe(R,j,D)),Re=pt(pe(R,j,S));return te!==ue&&ve!==Re||!(te!==0||!$e(D,R,S))||!(ue!==0||!$e(D,j,S))||!(ve!==0||!$e(R,D,j))||!(Re!==0||!$e(R,S,j))}function $e(D,S,R){return S.x<=Math.max(D.x,R.x)&&S.x>=Math.min(D.x,R.x)&&S.y<=Math.max(D.y,R.y)&&S.y>=Math.min(D.y,R.y)}function pt(D){return D>0?1:D<0?-1:0}function Kt(D,S){return pe(D.prev,D,D.next)<0?pe(D,S,D.next)>=0&&pe(D,D.prev,S)>=0:pe(D,S,D.prev)<0||pe(D,D.next,S)<0}function ir(D,S){let R=Pt(D.i,D.x,D.y),j=Pt(S.i,S.x,S.y),te=D.next,ue=S.prev;return D.next=S,S.prev=D,R.next=te,te.prev=R,j.next=R,R.prev=j,ue.next=j,j.prev=ue,j}function Jt(D,S,R,j){let te=Pt(D,S,R);return j?(te.next=j.next,te.prev=j,j.next.prev=te,j.next=te):(te.prev=te,te.next=te),te}function vt(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function Pt(D,S,R){return{i:D,x:S,y:R,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Wt(D,S,R){let j=R.patternDependencies,te=!1;for(let ue of S){let ve=ue.paint.get(`${D}-pattern`);ve.isConstant()||(te=!0);let Re=ve.constantOr(null);Re&&(te=!0,j[Re.to]=!0,j[Re.from]=!0)}return te}function rr(D,S,R,j,te){let ue=te.patternDependencies;for(let ve of S){let Re=ve.paint.get(`${D}-pattern`).value;if(Re.kind!=="constant"){let Ze=Re.evaluate({zoom:j-1},R,{},te.availableImages),at=Re.evaluate({zoom:j},R,{},te.availableImages),Tt=Re.evaluate({zoom:j+1},R,{},te.availableImages);Ze=Ze&&Ze.name?Ze.name:Ze,at=at&&at.name?at.name:at,Tt=Tt&&Tt.name?Tt.name:Tt,ue[Ze]=!0,ue[at]=!0,ue[Tt]=!0,R.patterns[ve.id]={min:Ze,mid:at,max:Tt}}}return R}class dr{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(R=>R.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new _l,this.indexArray=new oe,this.indexArray2=new we,this.programConfigurations=new _s(S.layers,S.zoom),this.segments=new We,this.segments2=new We,this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(S,R,j){this.hasPattern=Wt("fill",this.layers,R);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),ve=[];for(let{feature:Re,id:Ze,index:at,sourceLayerIndex:Tt}of S){let Ft=this.layers[0]._featureFilter.needGeometry,Qt=xl(Re,Ft);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),Qt,j))continue;let sr=ue?te.evaluate(Qt,{},j,R.availableImages):void 0,Tr={id:Ze,properties:Re.properties,type:Re.type,sourceLayerIndex:Tt,index:at,geometry:Ft?Qt.geometry:js(Re),patterns:{},sortKey:sr};ve.push(Tr)}ue&&ve.sort((Re,Ze)=>Re.sortKey-Ze.sortKey);for(let Re of ve){let{geometry:Ze,index:at,sourceLayerIndex:Tt}=Re;if(this.hasPattern){let Ft=rr("fill",this.layers,Re,this.zoom,R);this.patternFeatures.push(Ft)}else this.addFeature(Re,Ze,at,j,{});R.featureIndex.insert(S[at].feature,Ze,at,Tt,this.index)}}update(S,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,R,this.stateDependentLayers,j)}addFeatures(S,R,j){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,R,j)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Qc),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.indexBuffer2=S.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(S),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(S,R,j,te,ue){for(let ve of Of(R,500)){let Re=0;for(let sr of ve)Re+=sr.length;let Ze=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray),at=Ze.vertexLength,Tt=[],Ft=[];for(let sr of ve){if(sr.length===0)continue;sr!==ve[0]&&Ft.push(Tt.length/2);let Tr=this.segments2.prepareSegment(sr.length,this.layoutVertexArray,this.indexArray2),Pr=Tr.vertexLength;this.layoutVertexArray.emplaceBack(sr[0].x,sr[0].y),this.indexArray2.emplaceBack(Pr+sr.length-1,Pr),Tt.push(sr[0].x),Tt.push(sr[0].y);for(let $r=1;$r>3}if(te--,j===1||j===2)ue+=D.readSVarint(),ve+=D.readSVarint(),j===1&&(S&&Re.push(S),S=[]),S.push(new yi(ue,ve));else{if(j!==7)throw new Error("unknown command "+j);S&&S.push(S[0].clone())}}return S&&Re.push(S),Re},Di.prototype.bbox=function(){var D=this._pbf;D.pos=this._geometry;for(var S=D.readVarint()+D.pos,R=1,j=0,te=0,ue=0,ve=1/0,Re=-1/0,Ze=1/0,at=-1/0;D.pos>3}if(j--,R===1||R===2)(te+=D.readSVarint())Re&&(Re=te),(ue+=D.readSVarint())at&&(at=ue);else if(R!==7)throw new Error("unknown command "+R)}return[ve,Ze,Re,at]},Di.prototype.toGeoJSON=function(D,S,R){var j,te,ue=this.extent*Math.pow(2,R),ve=this.extent*D,Re=this.extent*S,Ze=this.loadGeometry(),at=Di.types[this.type];function Tt(sr){for(var Tr=0;Tr>3;te=ve===1?j.readString():ve===2?j.readFloat():ve===3?j.readDouble():ve===4?j.readVarint64():ve===5?j.readVarint():ve===6?j.readSVarint():ve===7?j.readBoolean():null}return te}(R))}bn.prototype.feature=function(D){if(D<0||D>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[D];var S=this._pbf.readVarint()+this._pbf.pos;return new qn(this._pbf,S,this.extent,this._keys,this._values)};var Gn=rn;function da(D,S,R){if(D===3){var j=new Gn(R,R.readVarint()+R.pos);j.length&&(S[j.name]=j)}}ei.VectorTile=function(D,S){this.layers=D.readFields(da,{},S)},ei.VectorTileFeature=tn,ei.VectorTileLayer=rn;let No=ei.VectorTileFeature.types,Ro=Math.pow(2,13);function ps(D,S,R,j,te,ue,ve,Re){D.emplaceBack(S,R,2*Math.floor(j*Ro)+ve,te*Ro*2,ue*Ro*2,Math.round(Re))}class fo{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(R=>R.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Vl,this.centroidVertexArray=new yo,this.indexArray=new oe,this.programConfigurations=new _s(S.layers,S.zoom),this.segments=new We,this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(S,R,j){this.features=[],this.hasPattern=Wt("fill-extrusion",this.layers,R);for(let{feature:te,id:ue,index:ve,sourceLayerIndex:Re}of S){let Ze=this.layers[0]._featureFilter.needGeometry,at=xl(te,Ze);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),at,j))continue;let Tt={id:ue,sourceLayerIndex:Re,index:ve,geometry:Ze?at.geometry:js(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(rr("fill-extrusion",this.layers,Tt,this.zoom,R)):this.addFeature(Tt,Tt.geometry,ve,j,{}),R.featureIndex.insert(te,Tt.geometry,ve,Re,this.index,!0)}}addFeatures(S,R,j){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,R,j)}}update(S,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,R,this.stateDependentLayers,j)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Gr),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,cr.members,!0),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(S,R,j,te,ue){for(let ve of Of(R,500)){let Re={x:0,y:0,vertexCount:0},Ze=0;for(let Tr of ve)Ze+=Tr.length;let at=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Tr of ve){if(Tr.length===0||tl(Tr))continue;let Pr=0;for(let $r=0;$r=1){let Ri=Tr[$r-1];if(!as(ni,Ri)){at.vertexLength+4>We.MAX_VERTEX_ARRAY_LENGTH&&(at=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let pi=ni.sub(Ri)._perp()._unit(),ki=Ri.dist(ni);Pr+ki>32768&&(Pr=0),ps(this.layoutVertexArray,ni.x,ni.y,pi.x,pi.y,0,0,Pr),ps(this.layoutVertexArray,ni.x,ni.y,pi.x,pi.y,0,1,Pr),Re.x+=2*ni.x,Re.y+=2*ni.y,Re.vertexCount+=2,Pr+=ki,ps(this.layoutVertexArray,Ri.x,Ri.y,pi.x,pi.y,0,0,Pr),ps(this.layoutVertexArray,Ri.x,Ri.y,pi.x,pi.y,0,1,Pr),Re.x+=2*Ri.x,Re.y+=2*Ri.y,Re.vertexCount+=2;let Zi=at.vertexLength;this.indexArray.emplaceBack(Zi,Zi+2,Zi+1),this.indexArray.emplaceBack(Zi+1,Zi+2,Zi+3),at.vertexLength+=4,at.primitiveLength+=2}}}}if(at.vertexLength+Ze>We.MAX_VERTEX_ARRAY_LENGTH&&(at=this.segments.prepareSegment(Ze,this.layoutVertexArray,this.indexArray)),No[S.type]!=="Polygon")continue;let Tt=[],Ft=[],Qt=at.vertexLength;for(let Tr of ve)if(Tr.length!==0){Tr!==ve[0]&&Ft.push(Tt.length/2);for(let Pr=0;Prza)||D.y===S.y&&(D.y<0||D.y>za)}function tl(D){return D.every(S=>S.x<0)||D.every(S=>S.x>za)||D.every(S=>S.y<0)||D.every(S=>S.y>za)}let zu;mi("FillExtrusionBucket",fo,{omit:["layers","features"]});var Mv={get paint(){return zu=zu||new le({"fill-extrusion-opacity":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new eo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Jc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new eo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new eo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ra(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ev extends B{constructor(S){super(S,Mv)}createBucket(S){return new fo(S)}queryRadius(){return to(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(S,R,j,te,ue,ve,Re,Ze){let at=Dn(S,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ve.angle,Re),Tt=this.paint.get("fill-extrusion-height").evaluate(R,j),Ft=this.paint.get("fill-extrusion-base").evaluate(R,j),Qt=function(Tr,Pr,$r,ni){let Ri=[];for(let pi of Tr){let ki=[pi.x,pi.y,0,1];Za(ki,ki,Pr),Ri.push(new u(ki[0]/ki[3],ki[1]/ki[3]))}return Ri}(at,Ze),sr=function(Tr,Pr,$r,ni){let Ri=[],pi=[],ki=ni[8]*Pr,Zi=ni[9]*Pr,ta=ni[10]*Pr,Va=ni[11]*Pr,Io=ni[8]*$r,La=ni[9]*$r,Hn=ni[10]*$r,lo=ni[11]*$r;for(let $a of Tr){let Xa=[],Tn=[];for(let bo of $a){let Ya=bo.x,Uo=bo.y,wu=ni[0]*Ya+ni[4]*Uo+ni[12],hu=ni[1]*Ya+ni[5]*Uo+ni[13],uh=ni[2]*Ya+ni[6]*Uo+ni[14],$v=ni[3]*Ya+ni[7]*Uo+ni[15],td=uh+ta,ch=$v+Va,Ud=wu+Io,Vd=hu+La,Hd=uh+Hn,rf=$v+lo,fh=new u((wu+ki)/ch,(hu+Zi)/ch);fh.z=td/ch,Xa.push(fh);let Td=new u(Ud/rf,Vd/rf);Td.z=Hd/rf,Tn.push(Td)}Ri.push(Xa),pi.push(Tn)}return[Ri,pi]}(te,Ft,Tt,Ze);return function(Tr,Pr,$r){let ni=1/0;Er($r,Pr)&&(ni=Yv($r,Pr[0]));for(let Ri=0;RiR.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(R=>{this.gradients[R.id]={}}),this.layoutVertexArray=new Xu,this.layoutVertexArray2=new cu,this.indexArray=new oe,this.programConfigurations=new _s(S.layers,S.zoom),this.segments=new We,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(R=>R.isStateDependent()).map(R=>R.id)}populate(S,R,j){this.hasPattern=Wt("line",this.layers,R);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),ve=[];for(let{feature:Re,id:Ze,index:at,sourceLayerIndex:Tt}of S){let Ft=this.layers[0]._featureFilter.needGeometry,Qt=xl(Re,Ft);if(!this.layers[0]._featureFilter.filter(new Ko(this.zoom),Qt,j))continue;let sr=ue?te.evaluate(Qt,{},j):void 0,Tr={id:Ze,properties:Re.properties,type:Re.type,sourceLayerIndex:Tt,index:at,geometry:Ft?Qt.geometry:js(Re),patterns:{},sortKey:sr};ve.push(Tr)}ue&&ve.sort((Re,Ze)=>Re.sortKey-Ze.sortKey);for(let Re of ve){let{geometry:Ze,index:at,sourceLayerIndex:Tt}=Re;if(this.hasPattern){let Ft=rr("line",this.layers,Re,this.zoom,R);this.patternFeatures.push(Ft)}else this.addFeature(Re,Ze,at,j,{});R.featureIndex.insert(S[at].feature,Ze,at,Tt,this.index)}}update(S,R,j){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,R,this.stateDependentLayers,j)}addFeatures(S,R,j){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,R,j)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=S.createVertexBuffer(this.layoutVertexArray2,pp)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,vp),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(S){if(S.properties&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_end"))return{start:+S.properties.mapbox_clip_start,end:+S.properties.mapbox_clip_end}}addFeature(S,R,j,te,ue){let ve=this.layers[0].layout,Re=ve.get("line-join").evaluate(S,{}),Ze=ve.get("line-cap"),at=ve.get("line-miter-limit"),Tt=ve.get("line-round-limit");this.lineClips=this.lineFeatureClips(S);for(let Ft of R)this.addLine(Ft,S,Re,Ze,at,Tt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,j,ue,te)}addLine(S,R,j,te,ue,ve){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ni=0;ni=2&&S[Ze-1].equals(S[Ze-2]);)Ze--;let at=0;for(;at0;if(Va&&ni>at){let lo=Qt.dist(sr);if(lo>2*Tt){let $a=Qt.sub(Qt.sub(sr)._mult(Tt/lo)._round());this.updateDistance(sr,$a),this.addCurrentVertex($a,Pr,0,0,Ft),sr=$a}}let La=sr&&Tr,Hn=La?j:Re?"butt":te;if(La&&Hn==="round"&&(Ziue&&(Hn="bevel"),Hn==="bevel"&&(Zi>2&&(Hn="flipbevel"),Zi100)Ri=$r.mult(-1);else{let lo=Zi*Pr.add($r).mag()/Pr.sub($r).mag();Ri._perp()._mult(lo*(Io?-1:1))}this.addCurrentVertex(Qt,Ri,0,0,Ft),this.addCurrentVertex(Qt,Ri.mult(-1),0,0,Ft)}else if(Hn==="bevel"||Hn==="fakeround"){let lo=-Math.sqrt(Zi*Zi-1),$a=Io?lo:0,Xa=Io?0:lo;if(sr&&this.addCurrentVertex(Qt,Pr,$a,Xa,Ft),Hn==="fakeround"){let Tn=Math.round(180*ta/Math.PI/20);for(let bo=1;bo2*Tt){let $a=Qt.add(Tr.sub(Qt)._mult(Tt/lo)._round());this.updateDistance(Qt,$a),this.addCurrentVertex($a,$r,0,0,Ft),Qt=$a}}}}addCurrentVertex(S,R,j,te,ue,ve=!1){let Re=R.y*te-R.x,Ze=-R.y-R.x*te;this.addHalfVertex(S,R.x+R.y*j,R.y-R.x*j,ve,!1,j,ue),this.addHalfVertex(S,Re,Ze,ve,!0,-te,ue),this.distance>kv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,R,j,te,ue,ve))}addHalfVertex({x:S,y:R},j,te,ue,ve,Re,Ze){let at=.5*(this.lineClips?this.scaledDistance*(kv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(ue?1:0),(R<<1)+(ve?1:0),Math.round(63*j)+128,Math.round(63*te)+128,1+(Re===0?0:Re<0?-1:1)|(63&at)<<2,at>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Tt=Ze.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Tt),Ze.primitiveLength++),ve?this.e2=Tt:this.e1=Tt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,R){this.distance+=S.dist(R),this.updateScaledDistance()}}let Cv,ny;mi("LineBucket",Kv,{omit:["layers","patternFeatures"]});var fg={get paint(){return ny=ny||new le({"line-opacity":new eo(ce.paint_line["line-opacity"]),"line-color":new eo(ce.paint_line["line-color"]),"line-translate":new Ra(ce.paint_line["line-translate"]),"line-translate-anchor":new Ra(ce.paint_line["line-translate-anchor"]),"line-width":new eo(ce.paint_line["line-width"]),"line-gap-width":new eo(ce.paint_line["line-gap-width"]),"line-offset":new eo(ce.paint_line["line-offset"]),"line-blur":new eo(ce.paint_line["line-blur"]),"line-dasharray":new yc(ce.paint_line["line-dasharray"]),"line-pattern":new Jc(ce.paint_line["line-pattern"]),"line-gradient":new _c(ce.paint_line["line-gradient"])})},get layout(){return Cv=Cv||new le({"line-cap":new Ra(ce.layout_line["line-cap"]),"line-join":new eo(ce.layout_line["line-join"]),"line-miter-limit":new Ra(ce.layout_line["line-miter-limit"]),"line-round-limit":new Ra(ce.layout_line["line-round-limit"]),"line-sort-key":new eo(ce.layout_line["line-sort-key"])})}};class Hf extends eo{possiblyEvaluate(S,R){return R=new Ko(Math.floor(R.zoom),{now:R.now,fadeDuration:R.fadeDuration,zoomHistory:R.zoomHistory,transition:R.transition}),super.possiblyEvaluate(S,R)}evaluate(S,R,j,te){return R=L({},R,{zoom:Math.floor(R.zoom)}),super.evaluate(S,R,j,te)}}let hg;class ay extends B{constructor(S){super(S,fg),this.gradientVersion=0,hg||(hg=new Hf(fg.paint.properties["line-width"].specification),hg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S==="line-gradient"){let R=this.gradientExpression();this.stepInterpolant=!!function(j){return j._styleExpression!==void 0}(R)&&R._styleExpression.expression instanceof Ji,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(S,R){super.recalculate(S,R),this.paint._values["line-floorwidth"]=hg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,S)}createBucket(S){return new Kv(S)}queryRadius(S){let R=S,j=Dh(yn("line-width",this,R),yn("line-gap-width",this,R)),te=yn("line-offset",this,R);return j/2+Math.abs(te)+to(this.paint.get("line-translate"))}queryIntersectsFeature(S,R,j,te,ue,ve,Re){let Ze=Dn(S,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ve.angle,Re),at=Re/2*Dh(this.paint.get("line-width").evaluate(R,j),this.paint.get("line-gap-width").evaluate(R,j)),Tt=this.paint.get("line-offset").evaluate(R,j);return Tt&&(te=function(Ft,Qt){let sr=[];for(let Tr=0;Tr=3){for(let $r=0;$r0?S+2*D:D}let rm=qe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),w1=qe([{name:"a_projected_pos",components:3,type:"Float32"}],4);qe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let T1=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 oy=qe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),im=qe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function nm(D,S,R){return D.sections.forEach(j=>{j.text=function(te,ue,ve){let Re=ue.layout.get("text-transform").evaluate(ve,{});return Re==="uppercase"?te=te.toLocaleUpperCase():Re==="lowercase"&&(te=te.toLocaleLowerCase()),vs.applyArabicShaping&&(te=vs.applyArabicShaping(te)),te}(j.text,S,R)}),D}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 Fu={"!":"\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 kl=24,bd=Yl,sy=function(D,S,R,j,te){var ue,ve,Re=8*te-j-1,Ze=(1<>1,Tt=-7,Ft=R?te-1:0,Qt=R?-1:1,sr=D[S+Ft];for(Ft+=Qt,ue=sr&(1<<-Tt)-1,sr>>=-Tt,Tt+=Re;Tt>0;ue=256*ue+D[S+Ft],Ft+=Qt,Tt-=8);for(ve=ue&(1<<-Tt)-1,ue>>=-Tt,Tt+=j;Tt>0;ve=256*ve+D[S+Ft],Ft+=Qt,Tt-=8);if(ue===0)ue=1-at;else{if(ue===Ze)return ve?NaN:1/0*(sr?-1:1);ve+=Math.pow(2,j),ue-=at}return(sr?-1:1)*ve*Math.pow(2,ue-j)},A1=function(D,S,R,j,te,ue){var ve,Re,Ze,at=8*ue-te-1,Tt=(1<>1,Qt=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,sr=j?0:ue-1,Tr=j?1:-1,Pr=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(Re=isNaN(S)?1:0,ve=Tt):(ve=Math.floor(Math.log(S)/Math.LN2),S*(Ze=Math.pow(2,-ve))<1&&(ve--,Ze*=2),(S+=ve+Ft>=1?Qt/Ze:Qt*Math.pow(2,1-Ft))*Ze>=2&&(ve++,Ze/=2),ve+Ft>=Tt?(Re=0,ve=Tt):ve+Ft>=1?(Re=(S*Ze-1)*Math.pow(2,te),ve+=Ft):(Re=S*Math.pow(2,Ft-1)*Math.pow(2,te),ve=0));te>=8;D[R+sr]=255&Re,sr+=Tr,Re/=256,te-=8);for(ve=ve<0;D[R+sr]=255&ve,sr+=Tr,ve/=256,at-=8);D[R+sr-Tr]|=128*Pr};function Yl(D){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(D)?D:new Uint8Array(D||0),this.pos=0,this.type=0,this.length=this.buf.length}Yl.Varint=0,Yl.Fixed64=1,Yl.Bytes=2,Yl.Fixed32=5;var Bx=4294967296,am=1/Bx,Mw=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Lv(D){return D.type===Yl.Bytes?D.readVarint()+D.pos:D.pos+1}function om(D,S,R){return R?4294967296*S+(D>>>0):4294967296*(S>>>0)+(D>>>0)}function Ew(D,S,R){var j=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));R.realloc(j);for(var te=R.pos-1;te>=D;te--)R.buf[te+j]=R.buf[te]}function Nx(D,S){for(var R=0;R>>8,D[R+2]=S>>>16,D[R+3]=S>>>24}function lC(D,S){return(D[S]|D[S+1]<<8|D[S+2]<<16)+(D[S+3]<<24)}Yl.prototype={destroy:function(){this.buf=null},readFields:function(D,S,R){for(R=R||this.length;this.pos>3,ue=this.pos;this.type=7&j,D(te,S,this),this.pos===ue&&this.skip(j)}return S},readMessage:function(D,S){return this.readFields(D,S,this.readVarint()+this.pos)},readFixed32:function(){var D=ly(this.buf,this.pos);return this.pos+=4,D},readSFixed32:function(){var D=lC(this.buf,this.pos);return this.pos+=4,D},readFixed64:function(){var D=ly(this.buf,this.pos)+ly(this.buf,this.pos+4)*Bx;return this.pos+=8,D},readSFixed64:function(){var D=ly(this.buf,this.pos)+lC(this.buf,this.pos+4)*Bx;return this.pos+=8,D},readFloat:function(){var D=sy(this.buf,this.pos,!0,23,4);return this.pos+=4,D},readDouble:function(){var D=sy(this.buf,this.pos,!0,52,8);return this.pos+=8,D},readVarint:function(D){var S,R,j=this.buf;return S=127&(R=j[this.pos++]),R<128?S:(S|=(127&(R=j[this.pos++]))<<7,R<128?S:(S|=(127&(R=j[this.pos++]))<<14,R<128?S:(S|=(127&(R=j[this.pos++]))<<21,R<128?S:function(te,ue,ve){var Re,Ze,at=ve.buf;if(Re=(112&(Ze=at[ve.pos++]))>>4,Ze<128||(Re|=(127&(Ze=at[ve.pos++]))<<3,Ze<128)||(Re|=(127&(Ze=at[ve.pos++]))<<10,Ze<128)||(Re|=(127&(Ze=at[ve.pos++]))<<17,Ze<128)||(Re|=(127&(Ze=at[ve.pos++]))<<24,Ze<128)||(Re|=(1&(Ze=at[ve.pos++]))<<31,Ze<128))return om(te,Re,ue);throw new Error("Expected varint not more than 10 bytes")}(S|=(15&(R=j[this.pos]))<<28,D,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var D=this.readVarint();return D%2==1?(D+1)/-2:D/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var D=this.readVarint()+this.pos,S=this.pos;return this.pos=D,D-S>=12&&Mw?function(R,j,te){return Mw.decode(R.subarray(j,te))}(this.buf,S,D):function(R,j,te){for(var ue="",ve=j;ve239?4:Tt>223?3:Tt>191?2:1;if(ve+Qt>te)break;Qt===1?Tt<128&&(Ft=Tt):Qt===2?(192&(Re=R[ve+1]))==128&&(Ft=(31&Tt)<<6|63&Re)<=127&&(Ft=null):Qt===3?(Ze=R[ve+2],(192&(Re=R[ve+1]))==128&&(192&Ze)==128&&((Ft=(15&Tt)<<12|(63&Re)<<6|63&Ze)<=2047||Ft>=55296&&Ft<=57343)&&(Ft=null)):Qt===4&&(Ze=R[ve+2],at=R[ve+3],(192&(Re=R[ve+1]))==128&&(192&Ze)==128&&(192&at)==128&&((Ft=(15&Tt)<<18|(63&Re)<<12|(63&Ze)<<6|63&at)<=65535||Ft>=1114112)&&(Ft=null)),Ft===null?(Ft=65533,Qt=1):Ft>65535&&(Ft-=65536,ue+=String.fromCharCode(Ft>>>10&1023|55296),Ft=56320|1023&Ft),ue+=String.fromCharCode(Ft),ve+=Qt}return ue}(this.buf,S,D)},readBytes:function(){var D=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,D);return this.pos=D,S},readPackedVarint:function(D,S){if(this.type!==Yl.Bytes)return D.push(this.readVarint(S));var R=Lv(this);for(D=D||[];this.pos127;);else if(S===Yl.Bytes)this.pos=this.readVarint()+this.pos;else if(S===Yl.Fixed32)this.pos+=4;else{if(S!==Yl.Fixed64)throw new Error("Unimplemented type: "+S);this.pos+=8}},writeTag:function(D,S){this.writeVarint(D<<3|S)},realloc:function(D){for(var S=this.length||16;S268435455||D<0?function(S,R){var j,te;if(S>=0?(j=S%4294967296|0,te=S/4294967296|0):(te=~(-S/4294967296),4294967295^(j=~(-S%4294967296))?j=j+1|0:(j=0,te=te+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),function(ue,ve,Re){Re.buf[Re.pos++]=127&ue|128,ue>>>=7,Re.buf[Re.pos++]=127&ue|128,ue>>>=7,Re.buf[Re.pos++]=127&ue|128,ue>>>=7,Re.buf[Re.pos++]=127&ue|128,Re.buf[Re.pos]=127&(ue>>>=7)}(j,0,R),function(ue,ve){var Re=(7&ue)<<4;ve.buf[ve.pos++]|=Re|((ue>>>=3)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue|((ue>>>=7)?128:0),ue&&(ve.buf[ve.pos++]=127&ue)))))}(te,R)}(D,this):(this.realloc(4),this.buf[this.pos++]=127&D|(D>127?128:0),D<=127||(this.buf[this.pos++]=127&(D>>>=7)|(D>127?128:0),D<=127||(this.buf[this.pos++]=127&(D>>>=7)|(D>127?128:0),D<=127||(this.buf[this.pos++]=D>>>7&127))))},writeSVarint:function(D){this.writeVarint(D<0?2*-D-1:2*D)},writeBoolean:function(D){this.writeVarint(!!D)},writeString:function(D){D=String(D),this.realloc(4*D.length),this.pos++;var S=this.pos;this.pos=function(j,te,ue){for(var ve,Re,Ze=0;Ze55295&&ve<57344){if(!Re){ve>56319||Ze+1===te.length?(j[ue++]=239,j[ue++]=191,j[ue++]=189):Re=ve;continue}if(ve<56320){j[ue++]=239,j[ue++]=191,j[ue++]=189,Re=ve;continue}ve=Re-55296<<10|ve-56320|65536,Re=null}else Re&&(j[ue++]=239,j[ue++]=191,j[ue++]=189,Re=null);ve<128?j[ue++]=ve:(ve<2048?j[ue++]=ve>>6|192:(ve<65536?j[ue++]=ve>>12|224:(j[ue++]=ve>>18|240,j[ue++]=ve>>12&63|128),j[ue++]=ve>>6&63|128),j[ue++]=63&ve|128)}return ue}(this.buf,D,this.pos);var R=this.pos-S;R>=128&&Ew(S,R,this),this.pos=S-1,this.writeVarint(R),this.pos+=R},writeFloat:function(D){this.realloc(4),A1(this.buf,D,this.pos,!0,23,4),this.pos+=4},writeDouble:function(D){this.realloc(8),A1(this.buf,D,this.pos,!0,52,8),this.pos+=8},writeBytes:function(D){var S=D.length;this.writeVarint(S),this.realloc(S);for(var R=0;R=128&&Ew(R,j,this),this.pos=R-1,this.writeVarint(j),this.pos+=j},writeMessage:function(D,S,R){this.writeTag(D,Yl.Bytes),this.writeRawMessage(S,R)},writePackedVarint:function(D,S){S.length&&this.writeMessage(D,Nx,S)},writePackedSVarint:function(D,S){S.length&&this.writeMessage(D,L9,S)},writePackedBoolean:function(D,S){S.length&&this.writeMessage(D,D9,S)},writePackedFloat:function(D,S){S.length&&this.writeMessage(D,P9,S)},writePackedDouble:function(D,S){S.length&&this.writeMessage(D,I9,S)},writePackedFixed32:function(D,S){S.length&&this.writeMessage(D,pQ,S)},writePackedSFixed32:function(D,S){S.length&&this.writeMessage(D,R9,S)},writePackedFixed64:function(D,S){S.length&&this.writeMessage(D,z9,S)},writePackedSFixed64:function(D,S){S.length&&this.writeMessage(D,F9,S)},writeBytesField:function(D,S){this.writeTag(D,Yl.Bytes),this.writeBytes(S)},writeFixed32Field:function(D,S){this.writeTag(D,Yl.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(D,S){this.writeTag(D,Yl.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(D,S){this.writeTag(D,Yl.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(D,S){this.writeTag(D,Yl.Fixed64),this.writeSFixed64(S)},writeVarintField:function(D,S){this.writeTag(D,Yl.Varint),this.writeVarint(S)},writeSVarintField:function(D,S){this.writeTag(D,Yl.Varint),this.writeSVarint(S)},writeStringField:function(D,S){this.writeTag(D,Yl.Bytes),this.writeString(S)},writeFloatField:function(D,S){this.writeTag(D,Yl.Fixed32),this.writeFloat(S)},writeDoubleField:function(D,S){this.writeTag(D,Yl.Fixed64),this.writeDouble(S)},writeBooleanField:function(D,S){this.writeVarintField(D,!!S)}};var tS=o(bd);let rS=3;function gQ(D,S,R){D===1&&R.readMessage(q9,S)}function q9(D,S,R){if(D===3){let{id:j,bitmap:te,width:ue,height:ve,left:Re,top:Ze,advance:at}=R.readMessage(uC,{});S.push({id:j,bitmap:new Ao({width:ue+2*rS,height:ve+2*rS},te),metrics:{width:ue,height:ve,left:Re,top:Ze,advance:at}})}}function uC(D,S,R){D===1?S.id=R.readVarint():D===2?S.bitmap=R.readBytes():D===3?S.width=R.readVarint():D===4?S.height=R.readVarint():D===5?S.left=R.readSVarint():D===6?S.top=R.readSVarint():D===7&&(S.advance=R.readVarint())}let cC=rS;function iS(D){let S=0,R=0;for(let ve of D)S+=ve.w*ve.h,R=Math.max(R,ve.w);D.sort((ve,Re)=>Re.h-ve.h);let j=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),R),h:1/0}],te=0,ue=0;for(let ve of D)for(let Re=j.length-1;Re>=0;Re--){let Ze=j[Re];if(!(ve.w>Ze.w||ve.h>Ze.h)){if(ve.x=Ze.x,ve.y=Ze.y,ue=Math.max(ue,ve.y+ve.h),te=Math.max(te,ve.x+ve.w),ve.w===Ze.w&&ve.h===Ze.h){let at=j.pop();Re=0&&j>=S&&Lw[this.text.charCodeAt(j)];j--)R--;this.text=this.text.substring(S,R),this.sectionIndex=this.sectionIndex.slice(S,R)}substring(S,R){let j=new S1;return j.text=this.text.substring(S,R),j.sectionIndex=this.sectionIndex.slice(S,R),j.sections=this.sections,j}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,R)=>Math.max(S,this.sections[R].scale),0)}addTextSection(S,R){this.text+=S.text,this.sections.push(Vx.forText(S.scale,S.fontStack||R));let j=this.sections.length-1;for(let te=0;te=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Hx(D,S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr){let Pr=S1.fromFeature(D,te),$r;Ft===i.ah.vertical&&Pr.verticalizePunctuation();let{processBidirectionalText:ni,processStyledBidirectionalText:Ri}=vs;if(ni&&Pr.sections.length===1){$r=[];let Zi=ni(Pr.toString(),M1(Pr,at,ue,S,j,sr));for(let ta of Zi){let Va=new S1;Va.text=ta,Va.sections=Pr.sections;for(let Io=0;Io0&&ep>xf&&(xf=ep)}else{let oc=Va[Cl.fontStack],If=oc&&oc[Tu];if(If&&If.rect)I1=If.rect,qc=If.metrics;else{let ep=ta[Cl.fontStack],gg=ep&&ep[Tu];if(!gg)continue;qc=gg.metrics}Dv=(fh-Cl.scale)*kl}Qv?(Zi.verticalizable=!0,Rh.push({glyph:Tu,imageName:p0,x:Uo,y:wu+Dv,vertical:Qv,scale:Cl.scale,fontStack:Cl.fontStack,sectionIndex:qu,metrics:qc,rect:I1}),Uo+=Gp*Cl.scale+Tn):(Rh.push({glyph:Tu,imageName:p0,x:Uo,y:wu+Dv,vertical:Qv,scale:Cl.scale,fontStack:Cl.fontStack,sectionIndex:qu,metrics:qc,rect:I1}),Uo+=qc.advance*Cl.scale+Tn)}Rh.length!==0&&(hu=Math.max(Uo-Tn,hu),sm(Rh,0,Rh.length-1,$v,xf)),Uo=0;let Iv=Hn*fh+xf;rd.lineOffset=Math.max(xf,Td),wu+=Iv,uh=Math.max(Iv,uh),++td}var ch;let Ud=wu-lh,{horizontalAlign:Vd,verticalAlign:Hd}=Iw(lo);(function(rf,fh,Td,rd,Rh,xf,Iv,lv,Cl){let qu=(fh-Td)*Rh,Tu=0;Tu=xf!==Iv?-lv*rd-lh:(-rd*Cl+.5)*Iv;for(let Dv of rf)for(let qc of Dv.positionedGlyphs)qc.x+=qu,qc.y+=Tu})(Zi.positionedLines,$v,Vd,Hd,hu,uh,Hn,Ud,La.length),Zi.top+=-Hd*Ud,Zi.bottom=Zi.top+Ud,Zi.left+=-Vd*hu,Zi.right=Zi.left+hu}(ki,S,R,j,$r,ve,Re,Ze,Ft,at,Qt,Tr),!function(Zi){for(let ta of Zi)if(ta.positionedGlyphs.length!==0)return!1;return!0}(pi)&&ki}let Lw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},O9={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},B9={40:!0};function fC(D,S,R,j,te,ue){if(S.imageName){let ve=j[S.imageName];return ve?ve.displaySize[0]*S.scale*kl/ue+te:0}{let ve=R[S.fontStack],Re=ve&&ve[D];return Re?Re.metrics.advance*S.scale+te:0}}function hC(D,S,R,j){let te=Math.pow(D-S,2);return j?D=0,at=0;for(let Ft=0;Ftat){let Tt=Math.ceil(ue/at);te*=Tt/ve,ve=Tt}return{x1:j,y1:te,x2:j+ue,y2:te+ve}}function pC(D,S,R,j,te,ue){let ve=D.image,Re;if(ve.content){let $r=ve.content,ni=ve.pixelRatio||1;Re=[$r[0]/ni,$r[1]/ni,ve.displaySize[0]-$r[2]/ni,ve.displaySize[1]-$r[3]/ni]}let Ze=S.left*ue,at=S.right*ue,Tt,Ft,Qt,sr;R==="width"||R==="both"?(sr=te[0]+Ze-j[3],Ft=te[0]+at+j[1]):(sr=te[0]+(Ze+at-ve.displaySize[0])/2,Ft=sr+ve.displaySize[0]);let Tr=S.top*ue,Pr=S.bottom*ue;return R==="height"||R==="both"?(Tt=te[1]+Tr-j[0],Qt=te[1]+Pr+j[2]):(Tt=te[1]+(Tr+Pr-ve.displaySize[1])/2,Qt=Tt+ve.displaySize[1]),{image:ve,top:Tt,right:Ft,bottom:Qt,left:sr,collisionPadding:Re}}let jx=255,v0=128,lm=jx*v0;function gC(D,S){let{expression:R}=S;if(R.kind==="constant")return{kind:"constant",layoutSize:R.evaluate(new Ko(D+1))};if(R.kind==="source")return{kind:"source"};{let{zoomStops:j,interpolationType:te}=R,ue=0;for(;ueve.id),this.index=S.index,this.pixelRatio=S.pixelRatio,this.sourceLayerIndex=S.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Un([]),this.placementViewportMatrix=Un([]);let R=this.layers[0]._unevaluatedLayout._values;this.textSizeData=gC(this.zoom,R["text-size"]),this.iconSizeData=gC(this.zoom,R["icon-size"]);let j=this.layers[0].layout,te=j.get("symbol-sort-key"),ue=j.get("symbol-z-order");this.canOverlap=nS(j,"text-overlap","text-allow-overlap")!=="never"||nS(j,"icon-overlap","icon-allow-overlap")!=="never"||j.get("text-ignore-placement")||j.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,j.get("symbol-placement")==="point"&&(this.writingModes=j.get("text-writing-mode").map(ve=>i.ah[ve])),this.stateDependentLayerIds=this.layers.filter(ve=>ve.isStateDependent()).map(ve=>ve.id),this.sourceID=S.sourceID}createArrays(){this.text=new sS(new _s(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new sS(new _s(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new To,this.lineVertexArray=new Wa,this.symbolInstances=new Ga,this.textAnchorOffsets=new Do}calculateGlyphDependencies(S,R,j,te,ue){for(let ve=0;ve0)&&(ve.value.kind!=="constant"||ve.value.value.length>0),Tt=Ze.value.kind!=="constant"||!!Ze.value.value||Object.keys(Ze.parameters).length>0,Ft=ue.get("symbol-sort-key");if(this.features=[],!at&&!Tt)return;let Qt=R.iconDependencies,sr=R.glyphDependencies,Tr=R.availableImages,Pr=new Ko(this.zoom);for(let{feature:$r,id:ni,index:Ri,sourceLayerIndex:pi}of S){let ki=te._featureFilter.needGeometry,Zi=xl($r,ki);if(!te._featureFilter.filter(Pr,Zi,j))continue;let ta,Va;if(ki||(Zi.geometry=js($r)),at){let La=te.getValueAndResolveTokens("text-field",Zi,j,Tr),Hn=Zr.factory(La),lo=this.hasRTLText=this.hasRTLText||oS(Hn);(!lo||vs.getRTLTextPluginStatus()==="unavailable"||lo&&vs.isParsed())&&(ta=nm(Hn,te,Zi))}if(Tt){let La=te.getValueAndResolveTokens("icon-image",Zi,j,Tr);Va=La instanceof Mi?La:Mi.fromString(La)}if(!ta&&!Va)continue;let Io=this.sortFeaturesByKey?Ft.evaluate(Zi,{},j):void 0;if(this.features.push({id:ni,text:ta,icon:Va,index:Ri,sourceLayerIndex:pi,geometry:Zi.geometry,properties:$r.properties,type:U9[$r.type],sortKey:Io}),Va&&(Qt[Va.name]=!0),ta){let La=ve.evaluate(Zi,{},j).join(","),Hn=ue.get("text-rotation-alignment")!=="viewport"&&ue.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let lo of ta.sections)if(lo.image)Qt[lo.image.name]=!0;else{let $a=Ua(ta.toString()),Xa=lo.fontStack||La,Tn=sr[Xa]=sr[Xa]||{};this.calculateGlyphDependencies(lo.text,Tn,Hn,this.allowVerticalPlacement,$a)}}}ue.get("symbol-placement")==="line"&&(this.features=function($r){let ni={},Ri={},pi=[],ki=0;function Zi(La){pi.push($r[La]),ki++}function ta(La,Hn,lo){let $a=Ri[La];return delete Ri[La],Ri[Hn]=$a,pi[$a].geometry[0].pop(),pi[$a].geometry[0]=pi[$a].geometry[0].concat(lo[0]),$a}function Va(La,Hn,lo){let $a=ni[Hn];return delete ni[Hn],ni[La]=$a,pi[$a].geometry[0].shift(),pi[$a].geometry[0]=lo[0].concat(pi[$a].geometry[0]),$a}function Io(La,Hn,lo){let $a=lo?Hn[0][Hn[0].length-1]:Hn[0][0];return`${La}:${$a.x}:${$a.y}`}for(let La=0;La<$r.length;La++){let Hn=$r[La],lo=Hn.geometry,$a=Hn.text?Hn.text.toString():null;if(!$a){Zi(La);continue}let Xa=Io($a,lo),Tn=Io($a,lo,!0);if(Xa in Ri&&Tn in ni&&Ri[Xa]!==ni[Tn]){let bo=Va(Xa,Tn,lo),Ya=ta(Xa,Tn,pi[bo].geometry);delete ni[Xa],delete Ri[Tn],Ri[Io($a,pi[Ya].geometry,!0)]=Ya,pi[bo].geometry=null}else Xa in Ri?ta(Xa,Tn,lo):Tn in ni?Va(Xa,Tn,lo):(Zi(La),ni[Xa]=ki-1,Ri[Tn]=ki-1)}return pi.filter(La=>La.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort(($r,ni)=>$r.sortKey-ni.sortKey)}update(S,R,j){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,R,this.layers,j),this.icon.programConfigurations.updatePaintArrays(S,R,this.layers,j))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(S){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(S),this.iconCollisionBox.upload(S)),this.text.upload(S,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(S,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(S,R){let j=this.lineVertexArray.length;if(S.segment!==void 0){let te=S.dist(R[S.segment+1]),ue=S.dist(R[S.segment]),ve={};for(let Re=S.segment+1;Re=0;Re--)ve[Re]={x:R[Re].x,y:R[Re].y,tileUnitDistanceFromAnchor:ue},Re>0&&(ue+=R[Re-1].dist(R[Re]));for(let Re=0;Re0}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(S,R){let j=S.placedSymbolArray.get(R),te=j.vertexStartIndex+4*j.numGlyphs;for(let ue=j.vertexStartIndex;uete[Re]-te[Ze]||ue[Ze]-ue[Re]),ve}addToSortKeyRanges(S,R){let j=this.sortKeyRanges[this.sortKeyRanges.length-1];j&&j.sortKey===R?j.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:R,symbolInstanceStart:S,symbolInstanceEnd:S+1})}sortFeatures(S){if(this.sortFeaturesByY&&this.sortedAngle!==S&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let R of this.symbolInstanceIndexes){let j=this.symbolInstances.get(R);this.featureSortOrder.push(j.featureIndex),[j.rightJustifiedTextSymbolIndex,j.centerJustifiedTextSymbolIndex,j.leftJustifiedTextSymbolIndex].forEach((te,ue,ve)=>{te>=0&&ve.indexOf(te)===ue&&this.addIndicesForPlacedSymbol(this.text,te)}),j.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,j.verticalPlacedTextSymbolIndex),j.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,j.placedIconSymbolIndex),j.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,j.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let tf,Wx;mi("SymbolBucket",E1,{omit:["layers","collisionBoxArray","features","compareText"]}),E1.MAX_GLYPHS=65535,E1.addDynamicAttributes=aS;var Rw={get paint(){return Wx=Wx||new le({"icon-opacity":new eo(ce.paint_symbol["icon-opacity"]),"icon-color":new eo(ce.paint_symbol["icon-color"]),"icon-halo-color":new eo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new eo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new eo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Ra(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ra(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new eo(ce.paint_symbol["text-opacity"]),"text-color":new eo(ce.paint_symbol["text-color"],{runtimeType:Ht,getOverride:D=>D.textColor,hasOverride:D=>!!D.textColor}),"text-halo-color":new eo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new eo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new eo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Ra(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Ra(ce.paint_symbol["text-translate-anchor"])})},get layout(){return tf=tf||new le({"symbol-placement":new Ra(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Ra(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ra(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new eo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ra(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ra(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ra(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ra(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ra(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ra(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new eo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Ra(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ra(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new eo(ce.layout_symbol["icon-image"]),"icon-rotate":new eo(ce.layout_symbol["icon-rotate"]),"icon-padding":new eo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Ra(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new eo(ce.layout_symbol["icon-offset"]),"icon-anchor":new eo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ra(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ra(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ra(ce.layout_symbol["text-rotation-alignment"]),"text-field":new eo(ce.layout_symbol["text-field"]),"text-font":new eo(ce.layout_symbol["text-font"]),"text-size":new eo(ce.layout_symbol["text-size"]),"text-max-width":new eo(ce.layout_symbol["text-max-width"]),"text-line-height":new Ra(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new eo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new eo(ce.layout_symbol["text-justify"]),"text-radial-offset":new eo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ra(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new eo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new eo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Ra(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Ra(ce.layout_symbol["text-writing-mode"]),"text-rotate":new eo(ce.layout_symbol["text-rotate"]),"text-padding":new Ra(ce.layout_symbol["text-padding"]),"text-keep-upright":new Ra(ce.layout_symbol["text-keep-upright"]),"text-transform":new eo(ce.layout_symbol["text-transform"]),"text-offset":new eo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Ra(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Ra(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Ra(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Ra(ce.layout_symbol["text-optional"])})}};class Zx{constructor(S){if(S.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=S.property.overrides?S.property.overrides.runtimeType:Lt,this.defaultValue=S}evaluate(S){if(S.formattedSection){let R=this.defaultValue.property.overrides;if(R&&R.hasOverride(S.formattedSection))return R.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default}eachChild(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}mi("FormatSectionOverride",Zx,{omit:["defaultValue"]});class uy extends B{constructor(S){super(S,Rw)}recalculate(S,R){if(super.recalculate(S,R),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 j=this.layout.get("text-writing-mode");if(j){let te=[];for(let ue of j)te.indexOf(ue)<0&&te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(S,R,j,te){let ue=this.layout.get(S).evaluate(R,{},j,te),ve=this._unevaluatedLayout._values[S];return ve.isDataDriven()||Lc(ve.value)||!ue?ue:function(Re,Ze){return Ze.replace(/{([^{}]+)}/g,(at,Tt)=>Re&&Tt in Re?String(Re[Tt]):"")}(R.properties,ue)}createBucket(S){return new E1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let S of Rw.paint.overridableProperties){if(!uy.hasPaintOverride(this.layout,S))continue;let R=this.paint.get(S),j=new Zx(R),te=new Pu(j,R.property.specification),ue=null;ue=R.value.kind==="constant"||R.value.kind==="source"?new Xc("source",te):new ic("composite",te,R.value.zoomStops),this.paint._values[S]=new Ru(R.property,ue,R.parameters)}}_handleOverridablePaintPropertyUpdate(S,R,j){return!(!this.layout||R.isDataDriven()||j.isDataDriven())&&uy.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,R){let j=S.get("text-field"),te=Rw.paint.properties[R],ue=!1,ve=Re=>{for(let Ze of Re)if(te.overrides&&te.overrides.hasOverride(Ze))return void(ue=!0)};if(j.value.kind==="constant"&&j.value.value instanceof Zr)ve(j.value.value.sections);else if(j.value.kind==="source"){let Re=at=>{ue||(at instanceof jn&&Ki(at.value)===Br?ve(at.value.sections):at instanceof $l?ve(at.sections):at.eachChild(Re))},Ze=j.value;Ze._styleExpression&&Re(Ze._styleExpression.expression)}return ue}}let mC;var Xx={get paint(){return mC=mC||new le({"background-color":new Ra(ce.paint_background["background-color"]),"background-pattern":new yc(ce.paint_background["background-pattern"]),"background-opacity":new Ra(ce.paint_background["background-opacity"])})}};class H9 extends B{constructor(S){super(S,Xx)}}let lS;var yC={get paint(){return lS=lS||new le({"raster-opacity":new Ra(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ra(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ra(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ra(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Ra(ce.paint_raster["raster-saturation"]),"raster-contrast":new Ra(ce.paint_raster["raster-contrast"]),"raster-resampling":new Ra(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Ra(ce.paint_raster["raster-fade-duration"])})}};class Yx extends B{constructor(S){super(S,yC)}}class uS extends B{constructor(S){super(S,{}),this.onAdd=R=>{this.implementation.onAdd&&this.implementation.onAdd(R,R.painter.context.gl)},this.onRemove=R=>{this.implementation.onRemove&&this.implementation.onRemove(R,R.painter.context.gl)},this.implementation=S}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 cS{constructor(S){this._methodToThrottle=S,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 fS=63710088e-1;class dg{constructor(S,R){if(isNaN(S)||isNaN(R))throw new Error(`Invalid LngLat object: (${S}, ${R})`);if(this.lng=+S,this.lat=+R,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dg(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let R=Math.PI/180,j=this.lat*R,te=S.lat*R,ue=Math.sin(j)*Math.sin(te)+Math.cos(j)*Math.cos(te)*Math.cos((S.lng-this.lng)*R);return fS*Math.acos(Math.min(ue,1))}static convert(S){if(S instanceof dg)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new dg(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new dg(Number("lng"in S?S.lng:S.lon),Number(S.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 k1=2*Math.PI*fS;function _C(D){return k1*Math.cos(D*Math.PI/180)}function zw(D){return(180+D)/360}function xC(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function Fw(D,S){return D/_C(S)}function Kx(D){return 360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90}class Jx{constructor(S,R,j=0){this.x=+S,this.y=+R,this.z=+j}static fromLngLat(S,R=0){let j=dg.convert(S);return new Jx(zw(j.lng),xC(j.lat),Fw(R,j.lat))}toLngLat(){return new dg(360*this.x-180,Kx(this.y))}toAltitude(){return this.z*_C(Kx(this.y))}meterInMercatorCoordinateUnits(){return 1/k1*(S=Kx(this.y),1/Math.cos(S*Math.PI/180));var S}}function gp(D,S,R){var j=2*Math.PI*6378137/256/Math.pow(2,R);return[D*j-2*Math.PI*6378137/2,S*j-2*Math.PI*6378137/2]}class hS{constructor(S,R,j){if(!function(te,ue,ve){return!(te<0||te>25||ve<0||ve>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(S,R,j))throw new Error(`x=${R}, y=${j}, z=${S} outside of bounds. 0<=x<${Math.pow(2,S)}, 0<=y<${Math.pow(2,S)} 0<=z<=25 `);this.z=S,this.x=R,this.y=j,this.key=$x(0,S,S,R,j)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,R,j){let te=(ve=this.y,Re=this.z,Ze=gp(256*(ue=this.x),256*(ve=Math.pow(2,Re)-ve-1),Re),at=gp(256*(ue+1),256*(ve+1),Re),Ze[0]+","+Ze[1]+","+at[0]+","+at[1]);var ue,ve,Re,Ze,at;let Tt=function(Ft,Qt,sr){let Tr,Pr="";for(let $r=Ft;$r>0;$r--)Tr=1<<$r-1,Pr+=(Qt&Tr?1:0)+(sr&Tr?2:0);return Pr}(this.z,this.x,this.y);return S[(this.x+this.y)%S.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(j==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,R>1?"@2x":"").replace(/{quadkey}/g,Tt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(S){let R=this.z-S.z;return R>0&&S.x===this.x>>R&&S.y===this.y>>R}getTilePoint(S){let R=Math.pow(2,this.z);return new u((S.x*R-this.x)*za,(S.y*R-this.y)*za)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bC{constructor(S,R){this.wrap=S,this.canonical=R,this.key=$x(S,R.z,R.z,R.x,R.y)}}class Jv{constructor(S,R,j,te,ue){if(S= z; overscaledZ = ${S}; z = ${j}`);this.overscaledZ=S,this.wrap=R,this.canonical=new hS(j,+te,+ue),this.key=$x(R,S,j,te,ue)}clone(){return new Jv(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(S){return this.overscaledZ===S.overscaledZ&&this.wrap===S.wrap&&this.canonical.equals(S.canonical)}scaledTo(S){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let R=this.canonical.z-S;return S>this.canonical.z?new Jv(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jv(S,this.wrap,S,this.canonical.x>>R,this.canonical.y>>R)}calculateScaledKey(S,R){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let j=this.canonical.z-S;return S>this.canonical.z?$x(this.wrap*+R,S,this.canonical.z,this.canonical.x,this.canonical.y):$x(this.wrap*+R,S,S,this.canonical.x>>j,this.canonical.y>>j)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let R=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>R&&S.canonical.y===this.canonical.y>>R}children(S){if(this.overscaledZ>=S)return[new Jv(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let R=this.canonical.z+1,j=2*this.canonical.x,te=2*this.canonical.y;return[new Jv(R,this.wrap,R,j,te),new Jv(R,this.wrap,R,j+1,te),new Jv(R,this.wrap,R,j,te+1),new Jv(R,this.wrap,R,j+1,te+1)]}isLessThan(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.ythis.max&&(this.max=Ft),Ft=this.dim+1||R<-1||R>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(R+1)*this.stride+(S+1)}unpack(S,R,j){return S*this.redFactor+R*this.greenFactor+j*this.blueFactor-this.baseShift}getPixels(){return new Jn({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,R,j){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");let te=R*this.dim,ue=R*this.dim+this.dim,ve=j*this.dim,Re=j*this.dim+this.dim;switch(R){case-1:te=ue-1;break;case 1:ue=te+1}switch(j){case-1:ve=Re-1;break;case 1:Re=ve+1}let Ze=-R*this.dim,at=-j*this.dim;for(let Tt=ve;Tt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${S} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[S]}}class dS{constructor(S,R,j,te,ue){this.type="Feature",this._vectorTileFeature=S,S._z=R,S._x=j,S._y=te,this.properties=S.properties,this.id=ue}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(S){this._geometry=S}toJSON(){let S={geometry:this.geometry};for(let R in this)R!=="_geometry"&&R!=="_vectorTileFeature"&&(S[R]=this[R]);return S}}class cy{constructor(S,R){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new qi(za,16,0),this.grid3D=new qi(za,16,0),this.featureIndexArray=new As,this.promoteId=R}insert(S,R,j,te,ue,ve){let Re=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(j,te,ue);let Ze=ve?this.grid3D:this.grid;for(let at=0;at=0&&Ft[3]>=0&&Ze.insert(Re,Ft[0],Ft[1],Ft[2],Ft[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ei.VectorTile(new tS(this.rawTileData)).layers,this.sourceLayerCoder=new TC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(S,R,j,te){this.loadVTLayers();let ue=S.params||{},ve=za/S.tileSize/S.scale,Re=Pc(ue.filter),Ze=S.queryGeometry,at=S.queryPadding*ve,Tt=SC(Ze),Ft=this.grid.query(Tt.minX-at,Tt.minY-at,Tt.maxX+at,Tt.maxY+at),Qt=SC(S.cameraQueryGeometry),sr=this.grid3D.query(Qt.minX-at,Qt.minY-at,Qt.maxX+at,Qt.maxY+at,($r,ni,Ri,pi)=>function(ki,Zi,ta,Va,Io){for(let Hn of ki)if(Zi<=Hn.x&&ta<=Hn.y&&Va>=Hn.x&&Io>=Hn.y)return!0;let La=[new u(Zi,ta),new u(Zi,Io),new u(Va,Io),new u(Va,ta)];if(ki.length>2){for(let Hn of La)if(On(ki,Hn))return!0}for(let Hn=0;Hn(pi||(pi=js(ki)),Zi.queryIntersectsFeature(Ze,ki,ta,pi,this.z,S.transform,ve,S.pixelPosMatrix)))}return Tr}loadMatchingFeature(S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft){let Qt=this.bucketLayerIDs[R];if(ve&&!function($r,ni){for(let Ri=0;Ri<$r.length;Ri++)if(ni.indexOf($r[Ri])>=0)return!0;return!1}(ve,Qt))return;let sr=this.sourceLayerCoder.decode(j),Tr=this.vtLayers[sr].feature(te);if(ue.needGeometry){let $r=xl(Tr,!0);if(!ue.filter(new Ko(this.tileID.overscaledZ),$r,this.tileID.canonical))return}else if(!ue.filter(new Ko(this.tileID.overscaledZ),Tr))return;let Pr=this.getId(Tr,sr);for(let $r=0;$r{let Re=S instanceof Rc?S.get(ve):null;return Re&&Re.evaluate?Re.evaluate(R,j,te):Re})}function SC(D){let S=1/0,R=1/0,j=-1/0,te=-1/0;for(let ue of D)S=Math.min(S,ue.x),R=Math.min(R,ue.y),j=Math.max(j,ue.x),te=Math.max(te,ue.y);return{minX:S,minY:R,maxX:j,maxY:te}}function G9(D,S){return S-D}function MC(D,S,R,j,te){let ue=[];for(let ve=0;ve=j&&Ft.x>=j||(Tt.x>=j?Tt=new u(j,Tt.y+(j-Tt.x)/(Ft.x-Tt.x)*(Ft.y-Tt.y))._round():Ft.x>=j&&(Ft=new u(j,Tt.y+(j-Tt.x)/(Ft.x-Tt.x)*(Ft.y-Tt.y))._round()),Tt.y>=te&&Ft.y>=te||(Tt.y>=te?Tt=new u(Tt.x+(te-Tt.y)/(Ft.y-Tt.y)*(Ft.x-Tt.x),te)._round():Ft.y>=te&&(Ft=new u(Tt.x+(te-Tt.y)/(Ft.y-Tt.y)*(Ft.x-Tt.x),te)._round()),Ze&&Tt.equals(Ze[Ze.length-1])||(Ze=[Tt],ue.push(Ze)),Ze.push(Ft)))))}}return ue}mi("FeatureIndex",cy,{omit:["rawTileData","sourceLayerCoder"]});class vg extends u{constructor(S,R,j,te){super(S,R),this.angle=j,te!==void 0&&(this.segment=te)}clone(){return new vg(this.x,this.y,this.angle,this.segment)}}function vS(D,S,R,j,te){if(S.segment===void 0||R===0)return!0;let ue=S,ve=S.segment+1,Re=0;for(;Re>-R/2;){if(ve--,ve<0)return!1;Re-=D[ve].dist(ue),ue=D[ve]}Re+=D[ve].dist(D[ve+1]),ve++;let Ze=[],at=0;for(;Rej;)at-=Ze.shift().angleDelta;if(at>te)return!1;ve++,Re+=Tt.dist(Ft)}return!0}function EC(D){let S=0;for(let R=0;Rat){let Tr=(at-Ze)/sr,Pr=Mo.number(Ft.x,Qt.x,Tr),$r=Mo.number(Ft.y,Qt.y,Tr),ni=new vg(Pr,$r,Qt.angleTo(Ft),Tt);return ni._round(),!ve||vS(D,ni,Re,ve,S)?ni:void 0}Ze+=sr}}function W9(D,S,R,j,te,ue,ve,Re,Ze){let at=kC(j,ue,ve),Tt=CC(j,te),Ft=Tt*ve,Qt=D[0].x===0||D[0].x===Ze||D[0].y===0||D[0].y===Ze;return S-Ft=0&&ki=0&&Zi=0&&Qt+at<=Tt){let ta=new vg(ki,Zi,Ri,Tr);ta._round(),j&&!vS(D,ta,ue,j,te)||sr.push(ta)}}Ft+=ni}return Re||sr.length||ve||(sr=LC(D,Ft/2,R,j,te,ue,ve,!0,Ze)),sr}mi("Anchor",vg);let C1=wd;function PC(D,S,R,j){let te=[],ue=D.image,ve=ue.pixelRatio,Re=ue.paddedRect.w-2*C1,Ze=ue.paddedRect.h-2*C1,at={x1:D.left,y1:D.top,x2:D.right,y2:D.bottom},Tt=ue.stretchX||[[0,Re]],Ft=ue.stretchY||[[0,Ze]],Qt=(Tn,bo)=>Tn+bo[1]-bo[0],sr=Tt.reduce(Qt,0),Tr=Ft.reduce(Qt,0),Pr=Re-sr,$r=Ze-Tr,ni=0,Ri=sr,pi=0,ki=Tr,Zi=0,ta=Pr,Va=0,Io=$r;if(ue.content&&j){let Tn=ue.content,bo=Tn[2]-Tn[0],Ya=Tn[3]-Tn[1];(ue.textFitWidth||ue.textFitHeight)&&(at=vC(D)),ni=pg(Tt,0,Tn[0]),pi=pg(Ft,0,Tn[1]),Ri=pg(Tt,Tn[0],Tn[2]),ki=pg(Ft,Tn[1],Tn[3]),Zi=Tn[0]-ni,Va=Tn[1]-pi,ta=bo-Ri,Io=Ya-ki}let La=at.x1,Hn=at.y1,lo=at.x2-La,$a=at.y2-Hn,Xa=(Tn,bo,Ya,Uo)=>{let wu=qw(Tn.stretch-ni,Ri,lo,La),hu=L1(Tn.fixed-Zi,ta,Tn.stretch,sr),uh=qw(bo.stretch-pi,ki,$a,Hn),$v=L1(bo.fixed-Va,Io,bo.stretch,Tr),td=qw(Ya.stretch-ni,Ri,lo,La),ch=L1(Ya.fixed-Zi,ta,Ya.stretch,sr),Ud=qw(Uo.stretch-pi,ki,$a,Hn),Vd=L1(Uo.fixed-Va,Io,Uo.stretch,Tr),Hd=new u(wu,uh),rf=new u(td,uh),fh=new u(td,Ud),Td=new u(wu,Ud),rd=new u(hu/ve,$v/ve),Rh=new u(ch/ve,Vd/ve),xf=S*Math.PI/180;if(xf){let Cl=Math.sin(xf),qu=Math.cos(xf),Tu=[qu,-Cl,Cl,qu];Hd._matMult(Tu),rf._matMult(Tu),Td._matMult(Tu),fh._matMult(Tu)}let Iv=Tn.stretch+Tn.fixed,lv=bo.stretch+bo.fixed;return{tl:Hd,tr:rf,bl:Td,br:fh,tex:{x:ue.paddedRect.x+C1+Iv,y:ue.paddedRect.y+C1+lv,w:Ya.stretch+Ya.fixed-Iv,h:Uo.stretch+Uo.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:rd,pixelOffsetBR:Rh,minFontScaleX:ta/ve/lo,minFontScaleY:Io/ve/$a,isSDF:R}};if(j&&(ue.stretchX||ue.stretchY)){let Tn=IC(Tt,Pr,sr),bo=IC(Ft,$r,Tr);for(let Ya=0;Ya0&&(Pr=Math.max(10,Pr),this.circleDiameter=Pr)}else{let Qt=!((Ft=ve.image)===null||Ft===void 0)&&Ft.content&&(ve.image.textFitWidth||ve.image.textFitHeight)?vC(ve):{x1:ve.left,y1:ve.top,x2:ve.right,y2:ve.bottom};Qt.y1=Qt.y1*Re-Ze[0],Qt.y2=Qt.y2*Re+Ze[2],Qt.x1=Qt.x1*Re-Ze[3],Qt.x2=Qt.x2*Re+Ze[1];let sr=ve.collisionPadding;if(sr&&(Qt.x1-=sr[0]*Re,Qt.y1-=sr[1]*Re,Qt.x2+=sr[2]*Re,Qt.y2+=sr[3]*Re),Tt){let Tr=new u(Qt.x1,Qt.y1),Pr=new u(Qt.x2,Qt.y1),$r=new u(Qt.x1,Qt.y2),ni=new u(Qt.x2,Qt.y2),Ri=Tt*Math.PI/180;Tr._rotate(Ri),Pr._rotate(Ri),$r._rotate(Ri),ni._rotate(Ri),Qt.x1=Math.min(Tr.x,Pr.x,$r.x,ni.x),Qt.x2=Math.max(Tr.x,Pr.x,$r.x,ni.x),Qt.y1=Math.min(Tr.y,Pr.y,$r.y,ni.y),Qt.y2=Math.max(Tr.y,Pr.y,$r.y,ni.y)}S.emplaceBack(R.x,R.y,Qt.x1,Qt.y1,Qt.x2,Qt.y2,j,te,ue)}this.boxEndIndex=S.length}}class Hp{constructor(S=[],R=(j,te)=>jte?1:0){if(this.data=S,this.length=this.data.length,this.compare=R,this.length>0)for(let j=(this.length>>1)-1;j>=0;j--)this._down(j)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],R=this.data.pop();return--this.length>0&&(this.data[0]=R,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:R,compare:j}=this,te=R[S];for(;S>0;){let ue=S-1>>1,ve=R[ue];if(j(te,ve)>=0)break;R[S]=ve,S=ue}R[S]=te}_down(S){let{data:R,compare:j}=this,te=this.length>>1,ue=R[S];for(;S=0)break;R[S]=R[ve],S=ve}R[S]=ue}}function Z9(D,S=1,R=!1){let j=1/0,te=1/0,ue=-1/0,ve=-1/0,Re=D[0];for(let sr=0;srue)&&(ue=Tr.x),(!sr||Tr.y>ve)&&(ve=Tr.y)}let Ze=Math.min(ue-j,ve-te),at=Ze/2,Tt=new Hp([],X9);if(Ze===0)return new u(j,te);for(let sr=j;srFt.d||!Ft.d)&&(Ft=sr,R&&console.log("found best %d after %d probes",Math.round(1e4*sr.d)/1e4,Qt)),sr.max-Ft.d<=S||(at=sr.h/2,Tt.push(new P1(sr.p.x-at,sr.p.y-at,at,D)),Tt.push(new P1(sr.p.x+at,sr.p.y-at,at,D)),Tt.push(new P1(sr.p.x-at,sr.p.y+at,at,D)),Tt.push(new P1(sr.p.x+at,sr.p.y+at,at,D)),Qt+=4)}return R&&(console.log(`num probes: ${Qt}`),console.log(`best distance: ${Ft.d}`)),Ft.p}function X9(D,S){return S.max-D.max}function P1(D,S,R,j){this.p=new u(D,S),this.h=R,this.d=function(te,ue){let ve=!1,Re=1/0;for(let Ze=0;Zete.y!=Tr.y>te.y&&te.x<(Tr.x-sr.x)*(te.y-sr.y)/(Tr.y-sr.y)+sr.x&&(ve=!ve),Re=Math.min(Re,Bi(te,sr,Tr))}}return(ve?1:-1)*Math.sqrt(Re)}(this.p,j),this.max=this.d+this.h*Math.SQRT2}var ed;i.aq=void 0,(ed=i.aq||(i.aq={}))[ed.center=1]="center",ed[ed.left=2]="left",ed[ed.right=3]="right",ed[ed.top=4]="top",ed[ed.bottom=5]="bottom",ed[ed["top-left"]=6]="top-left",ed[ed["top-right"]=7]="top-right",ed[ed["bottom-left"]=8]="bottom-left",ed[ed["bottom-right"]=9]="bottom-right";let fm=7,fy=Number.POSITIVE_INFINITY;function pS(D,S){return S[1]!==fy?function(R,j,te){let ue=0,ve=0;switch(j=Math.abs(j),te=Math.abs(te),R){case"top-right":case"top-left":case"top":ve=te-fm;break;case"bottom-right":case"bottom-left":case"bottom":ve=-te+fm}switch(R){case"top-right":case"bottom-right":case"right":ue=-j;break;case"top-left":case"bottom-left":case"left":ue=j}return[ue,ve]}(D,S[0],S[1]):function(R,j){let te=0,ue=0;j<0&&(j=0);let ve=j/Math.SQRT2;switch(R){case"top-right":case"top-left":ue=ve-fm;break;case"bottom-right":case"bottom-left":ue=-ve+fm;break;case"bottom":ue=-j+fm;break;case"top":ue=j-fm}switch(R){case"top-right":case"bottom-right":te=-ve;break;case"top-left":case"bottom-left":te=ve;break;case"left":te=j;break;case"right":te=-j}return[te,ue]}(D,S[0])}function DC(D,S,R){var j;let te=D.layout,ue=(j=te.get("text-variable-anchor-offset"))===null||j===void 0?void 0:j.evaluate(S,{},R);if(ue){let Re=ue.values,Ze=[];for(let at=0;atQt*kl);Tt.startsWith("top")?Ft[1]-=fm:Tt.startsWith("bottom")&&(Ft[1]+=fm),Ze[at+1]=Ft}return new Si(Ze)}let ve=te.get("text-variable-anchor");if(ve){let Re;Re=D._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(S,{},R)*kl,fy]:te.get("text-offset").evaluate(S,{},R).map(at=>at*kl);let Ze=[];for(let at of ve)Ze.push(at,pS(at,Re));return new Si(Ze)}return null}function gS(D){switch(D){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Y9(D,S,R,j,te,ue,ve,Re,Ze,at,Tt){let Ft=ue.textMaxSize.evaluate(S,{});Ft===void 0&&(Ft=ve);let Qt=D.layers[0].layout,sr=Qt.get("icon-offset").evaluate(S,{},Tt),Tr=zC(R.horizontal),Pr=ve/24,$r=D.tilePixelRatio*Pr,ni=D.tilePixelRatio*Ft/24,Ri=D.tilePixelRatio*Re,pi=D.tilePixelRatio*Qt.get("symbol-spacing"),ki=Qt.get("text-padding")*D.tilePixelRatio,Zi=function(Tn,bo,Ya,Uo=1){let wu=Tn.get("icon-padding").evaluate(bo,{},Ya),hu=wu&&wu.values;return[hu[0]*Uo,hu[1]*Uo,hu[2]*Uo,hu[3]*Uo]}(Qt,S,Tt,D.tilePixelRatio),ta=Qt.get("text-max-angle")/180*Math.PI,Va=Qt.get("text-rotation-alignment")!=="viewport"&&Qt.get("symbol-placement")!=="point",Io=Qt.get("icon-rotation-alignment")==="map"&&Qt.get("symbol-placement")!=="point",La=Qt.get("symbol-placement"),Hn=pi/2,lo=Qt.get("icon-text-fit"),$a;j&&lo!=="none"&&(D.allowVerticalPlacement&&R.vertical&&($a=pC(j,R.vertical,lo,Qt.get("icon-text-fit-padding"),sr,Pr)),Tr&&(j=pC(j,Tr,lo,Qt.get("icon-text-fit-padding"),sr,Pr)));let Xa=(Tn,bo)=>{bo.x<0||bo.x>=za||bo.y<0||bo.y>=za||function(Ya,Uo,wu,hu,uh,$v,td,ch,Ud,Vd,Hd,rf,fh,Td,rd,Rh,xf,Iv,lv,Cl,qu,Tu,Dv,qc,I1){let p0=Ya.addToLineVertexArray(Uo,wu),Gp,Qv,oc,If,ep=0,gg=0,uv=0,D1=0,bS=-1,Uw=-1,g0={},hy=ui("");if(Ya.allowVerticalPlacement&&hu.vertical){let Ad=ch.layout.get("text-rotate").evaluate(qu,{},qc)+90;oc=new cm(Ud,Uo,Vd,Hd,rf,hu.vertical,fh,Td,rd,Ad),td&&(If=new cm(Ud,Uo,Vd,Hd,rf,td,xf,Iv,rd,Ad))}if(uh){let Ad=ch.layout.get("icon-rotate").evaluate(qu,{}),tp=ch.layout.get("icon-text-fit")!=="none",hm=PC(uh,Ad,Dv,tp),Gd=td?PC(td,Ad,Dv,tp):void 0;Qv=new cm(Ud,Uo,Vd,Hd,rf,uh,xf,Iv,!1,Ad),ep=4*hm.length;let Sd=Ya.iconSizeData,yp=null;Sd.kind==="source"?(yp=[v0*ch.layout.get("icon-size").evaluate(qu,{})],yp[0]>lm&&T(`${Ya.layerIds[0]}: Value for "icon-size" is >= ${jx}. Reduce your "icon-size".`)):Sd.kind==="composite"&&(yp=[v0*Tu.compositeIconSizes[0].evaluate(qu,{},qc),v0*Tu.compositeIconSizes[1].evaluate(qu,{},qc)],(yp[0]>lm||yp[1]>lm)&&T(`${Ya.layerIds[0]}: Value for "icon-size" is >= ${jx}. Reduce your "icon-size".`)),Ya.addSymbols(Ya.icon,hm,yp,Cl,lv,qu,i.ah.none,Uo,p0.lineStartIndex,p0.lineLength,-1,qc),bS=Ya.icon.placedSymbolArray.length-1,Gd&&(gg=4*Gd.length,Ya.addSymbols(Ya.icon,Gd,yp,Cl,lv,qu,i.ah.vertical,Uo,p0.lineStartIndex,p0.lineLength,-1,qc),Uw=Ya.icon.placedSymbolArray.length-1)}let zh=Object.keys(hu.horizontal);for(let Ad of zh){let tp=hu.horizontal[Ad];if(!Gp){hy=ui(tp.text);let Gd=ch.layout.get("text-rotate").evaluate(qu,{},qc);Gp=new cm(Ud,Uo,Vd,Hd,rf,tp,fh,Td,rd,Gd)}let hm=tp.positionedLines.length===1;if(uv+=RC(Ya,Uo,tp,$v,ch,rd,qu,Rh,p0,hu.vertical?i.ah.horizontal:i.ah.horizontalOnly,hm?zh:[Ad],g0,bS,Tu,qc),hm)break}hu.vertical&&(D1+=RC(Ya,Uo,hu.vertical,$v,ch,rd,qu,Rh,p0,i.ah.vertical,["vertical"],g0,Uw,Tu,qc));let $9=Gp?Gp.boxStartIndex:Ya.collisionBoxArray.length,Vw=Gp?Gp.boxEndIndex:Ya.collisionBoxArray.length,m0=oc?oc.boxStartIndex:Ya.collisionBoxArray.length,cv=oc?oc.boxEndIndex:Ya.collisionBoxArray.length,BC=Qv?Qv.boxStartIndex:Ya.collisionBoxArray.length,Q9=Qv?Qv.boxEndIndex:Ya.collisionBoxArray.length,NC=If?If.boxStartIndex:Ya.collisionBoxArray.length,eq=If?If.boxEndIndex:Ya.collisionBoxArray.length,mp=-1,tb=(Ad,tp)=>Ad&&Ad.circleDiameter?Math.max(Ad.circleDiameter,tp):tp;mp=tb(Gp,mp),mp=tb(oc,mp),mp=tb(Qv,mp),mp=tb(If,mp);let Hw=mp>-1?1:0;Hw&&(mp*=I1/kl),Ya.glyphOffsetArray.length>=E1.MAX_GLYPHS&&T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),qu.sortKey!==void 0&&Ya.addToSortKeyRanges(Ya.symbolInstances.length,qu.sortKey);let wS=DC(ch,qu,qc),[tq,rq]=function(Ad,tp){let hm=Ad.length,Gd=tp==null?void 0:tp.values;if((Gd==null?void 0:Gd.length)>0)for(let Sd=0;Sd=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,bS,Uw,hy,$9,Vw,m0,cv,BC,Q9,NC,eq,Vd,uv,D1,ep,gg,Hw,0,fh,mp,tq,rq)}(D,bo,Tn,R,j,te,$a,D.layers[0],D.collisionBoxArray,S.index,S.sourceLayerIndex,D.index,$r,[ki,ki,ki,ki],Va,Ze,Ri,Zi,Io,sr,S,ue,at,Tt,ve)};if(La==="line")for(let Tn of MC(S.geometry,0,0,za,za)){let bo=W9(Tn,pi,ta,R.vertical||Tr,j,24,ni,D.overscaling,za);for(let Ya of bo)Tr&&K9(D,Tr.text,Hn,Ya)||Xa(Tn,Ya)}else if(La==="line-center"){for(let Tn of S.geometry)if(Tn.length>1){let bo=j9(Tn,ta,R.vertical||Tr,j,24,ni);bo&&Xa(Tn,bo)}}else if(S.type==="Polygon")for(let Tn of Of(S.geometry,0)){let bo=Z9(Tn,16);Xa(Tn[0],new vg(bo.x,bo.y,0))}else if(S.type==="LineString")for(let Tn of S.geometry)Xa(Tn,new vg(Tn[0].x,Tn[0].y,0));else if(S.type==="Point")for(let Tn of S.geometry)for(let bo of Tn)Xa([bo],new vg(bo.x,bo.y,0))}function RC(D,S,R,j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr){let Pr=function(Ri,pi,ki,Zi,ta,Va,Io,La){let Hn=Zi.layout.get("text-rotate").evaluate(Va,{})*Math.PI/180,lo=[];for(let $a of pi.positionedLines)for(let Xa of $a.positionedGlyphs){if(!Xa.rect)continue;let Tn=Xa.rect||{},bo=cC+1,Ya=!0,Uo=1,wu=0,hu=(ta||La)&&Xa.vertical,uh=Xa.metrics.advance*Xa.scale/2;if(La&&pi.verticalizable&&(wu=$a.lineOffset/2-(Xa.imageName?-(kl-Xa.metrics.width*Xa.scale)/2:(Xa.scale-1)*kl)),Xa.imageName){let Cl=Io[Xa.imageName];Ya=Cl.sdf,Uo=Cl.pixelRatio,bo=wd/Uo}let $v=ta?[Xa.x+uh,Xa.y]:[0,0],td=ta?[0,0]:[Xa.x+uh+ki[0],Xa.y+ki[1]-wu],ch=[0,0];hu&&(ch=td,td=[0,0]);let Ud=Xa.metrics.isDoubleResolution?2:1,Vd=(Xa.metrics.left-bo)*Xa.scale-uh+td[0],Hd=(-Xa.metrics.top-bo)*Xa.scale+td[1],rf=Vd+Tn.w/Ud*Xa.scale/Uo,fh=Hd+Tn.h/Ud*Xa.scale/Uo,Td=new u(Vd,Hd),rd=new u(rf,Hd),Rh=new u(Vd,fh),xf=new u(rf,fh);if(hu){let Cl=new u(-uh,uh-lh),qu=-Math.PI/2,Tu=kl/2-uh,Dv=new u(5-lh-Tu,-(Xa.imageName?Tu:0)),qc=new u(...ch);Td._rotateAround(qu,Cl)._add(Dv)._add(qc),rd._rotateAround(qu,Cl)._add(Dv)._add(qc),Rh._rotateAround(qu,Cl)._add(Dv)._add(qc),xf._rotateAround(qu,Cl)._add(Dv)._add(qc)}if(Hn){let Cl=Math.sin(Hn),qu=Math.cos(Hn),Tu=[qu,-Cl,Cl,qu];Td._matMult(Tu),rd._matMult(Tu),Rh._matMult(Tu),xf._matMult(Tu)}let Iv=new u(0,0),lv=new u(0,0);lo.push({tl:Td,tr:rd,bl:Rh,br:xf,tex:Tn,writingMode:pi.writingMode,glyphOffset:$v,sectionIndex:Xa.sectionIndex,isSDF:Ya,pixelOffsetTL:Iv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return lo}(0,R,Re,te,ue,ve,j,D.allowVerticalPlacement),$r=D.textSizeData,ni=null;$r.kind==="source"?(ni=[v0*te.layout.get("text-size").evaluate(ve,{})],ni[0]>lm&&T(`${D.layerIds[0]}: Value for "text-size" is >= ${jx}. Reduce your "text-size".`)):$r.kind==="composite"&&(ni=[v0*sr.compositeTextSizes[0].evaluate(ve,{},Tr),v0*sr.compositeTextSizes[1].evaluate(ve,{},Tr)],(ni[0]>lm||ni[1]>lm)&&T(`${D.layerIds[0]}: Value for "text-size" is >= ${jx}. Reduce your "text-size".`)),D.addSymbols(D.text,Pr,ni,Re,ue,ve,at,S,Ze.lineStartIndex,Ze.lineLength,Qt,Tr);for(let Ri of Tt)Ft[Ri]=D.text.placedSymbolArray.length-1;return 4*Pr.length}function zC(D){for(let S in D)return D[S];return null}function K9(D,S,R,j){let te=D.compareText;if(S in te){let ue=te[S];for(let ve=ue.length-1;ve>=0;ve--)if(j.dist(ue[ve])>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=FC[15&j];if(!ue)throw new Error("Unrecognized array type.");let[ve]=new Uint16Array(S,2,1),[Re]=new Uint32Array(S,4,1);return new mS(Re,ve,ue,S)}constructor(S,R=64,j=Float64Array,te){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+R,2),65535),this.ArrayType=j,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let ue=FC.indexOf(this.ArrayType),ve=2*S*this.ArrayType.BYTES_PER_ELEMENT,Re=S*this.IndexArrayType.BYTES_PER_ELEMENT,Ze=(8-Re%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${j}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+Re+Ze,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+ve+Re+Ze),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+Re+Ze,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=R,new Uint32Array(this.data,4,1)[0]=S)}add(S,R){let j=this._pos>>1;return this.ids[j]=j,this.coords[this._pos++]=S,this.coords[this._pos++]=R,j}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return Ow(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,R,j,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:ve,nodeSize:Re}=this,Ze=[0,ue.length-1,0],at=[];for(;Ze.length;){let Tt=Ze.pop()||0,Ft=Ze.pop()||0,Qt=Ze.pop()||0;if(Ft-Qt<=Re){for(let $r=Qt;$r<=Ft;$r++){let ni=ve[2*$r],Ri=ve[2*$r+1];ni>=S&&ni<=j&&Ri>=R&&Ri<=te&&at.push(ue[$r])}continue}let sr=Qt+Ft>>1,Tr=ve[2*sr],Pr=ve[2*sr+1];Tr>=S&&Tr<=j&&Pr>=R&&Pr<=te&&at.push(ue[sr]),(Tt===0?S<=Tr:R<=Pr)&&(Ze.push(Qt),Ze.push(sr-1),Ze.push(1-Tt)),(Tt===0?j>=Tr:te>=Pr)&&(Ze.push(sr+1),Ze.push(Ft),Ze.push(1-Tt))}return at}within(S,R,j){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:ve}=this,Re=[0,te.length-1,0],Ze=[],at=j*j;for(;Re.length;){let Tt=Re.pop()||0,Ft=Re.pop()||0,Qt=Re.pop()||0;if(Ft-Qt<=ve){for(let $r=Qt;$r<=Ft;$r++)OC(ue[2*$r],ue[2*$r+1],S,R)<=at&&Ze.push(te[$r]);continue}let sr=Qt+Ft>>1,Tr=ue[2*sr],Pr=ue[2*sr+1];OC(Tr,Pr,S,R)<=at&&Ze.push(te[sr]),(Tt===0?S-j<=Tr:R-j<=Pr)&&(Re.push(Qt),Re.push(sr-1),Re.push(1-Tt)),(Tt===0?S+j>=Tr:R+j>=Pr)&&(Re.push(sr+1),Re.push(Ft),Re.push(1-Tt))}return Ze}}function Ow(D,S,R,j,te,ue){if(te-j<=R)return;let ve=j+te>>1;qC(D,S,ve,j,te,ue),Ow(D,S,R,j,ve-1,1-ue),Ow(D,S,R,ve+1,te,1-ue)}function qC(D,S,R,j,te,ue){for(;te>j;){if(te-j>600){let at=te-j+1,Tt=R-j+1,Ft=Math.log(at),Qt=.5*Math.exp(2*Ft/3),sr=.5*Math.sqrt(Ft*Qt*(at-Qt)/at)*(Tt-at/2<0?-1:1);qC(D,S,R,Math.max(j,Math.floor(R-Tt*Qt/at+sr)),Math.min(te,Math.floor(R+(at-Tt)*Qt/at+sr)),ue)}let ve=S[2*R+ue],Re=j,Ze=te;for(Qx(D,S,j,R),S[2*te+ue]>ve&&Qx(D,S,j,te);Reve;)Ze--}S[2*j+ue]===ve?Qx(D,S,j,Ze):(Ze++,Qx(D,S,Ze,te)),Ze<=R&&(j=Ze+1),R<=Ze&&(te=Ze-1)}}function Qx(D,S,R,j){yS(D,R,j),yS(S,2*R,2*j),yS(S,2*R+1,2*j+1)}function yS(D,S,R){let j=D[S];D[S]=D[R],D[R]=j}function OC(D,S,R,j){let te=D-R,ue=S-j;return te*te+ue*ue}var Bw;i.bg=void 0,(Bw=i.bg||(i.bg={})).create="create",Bw.load="load",Bw.fullLoad="fullLoad";let eb=null,Gf=[],_S=1e3/60,xS="loadTime",Nw="fullLoadTime",J9={mark(D){performance.mark(D)},frame(D){let S=D;eb!=null&&Gf.push(S-eb),eb=S},clearMetrics(){eb=null,Gf=[],performance.clearMeasures(xS),performance.clearMeasures(Nw);for(let D in i.bg)performance.clearMarks(i.bg[D])},getPerformanceMetrics(){performance.measure(xS,i.bg.create,i.bg.load),performance.measure(Nw,i.bg.create,i.bg.fullLoad);let D=performance.getEntriesByName(xS)[0].duration,S=performance.getEntriesByName(Nw)[0].duration,R=Gf.length,j=1/(Gf.reduce((ue,ve)=>ue+ve,0)/R/1e3),te=Gf.filter(ue=>ue>_S).reduce((ue,ve)=>ue+(ve-_S)/_S,0);return{loadTime:D,fullLoadTime:S,fps:j,percentDroppedFrames:te/(R+te)*100,totalFrames:R}}};i.$=class extends Ot{},i.A=Ln,i.B=Fi,i.C=function(D){if(V==null){let S=D.navigator?D.navigator.userAgent:null;V=!!D.safari||!(!S||!(/\b(iPad|iPhone|iPod)\b/.test(S)||S.match("Safari")&&!S.match("Chrome")))}return V},i.D=Ra,i.E=De,i.F=class{constructor(D,S){this.target=D,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cS(()=>this.process()),this.subscription=function(R,j,te,ue){return R.addEventListener(j,te,!1),{unsubscribe:()=>{R.removeEventListener(j,te,!1)}}}(this.target,"message",R=>this.receive(R)),this.globalScope=q(self)?D:window}registerMessageHandler(D,S){this.messageHandlers[D]=S}sendAsync(D,S){return new Promise((R,j)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:R,reject:j},S&&S.signal.addEventListener("abort",()=>{delete this.resolveRejects[te];let Re={id:te,type:"",origin:location.origin,targetMapId:D.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Re)},{once:!0});let ue=[],ve=Object.assign(Object.assign({},D),{id:te,sourceMapId:this.mapId,origin:location.origin,data:Ea(D.data,ue)});this.target.postMessage(ve,{transfer:ue})})}receive(D){let S=D.data,R=S.id;if(!(S.origin!=="file://"&&location.origin!=="file://"&&S.origin!=="resource://android"&&location.origin!=="resource://android"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type===""){delete this.tasks[R];let j=this.abortControllers[R];return delete this.abortControllers[R],void(j&&j.abort())}if(q(self)||S.mustQueue)return this.tasks[R]=S,this.taskQueue.push(R),void this.invoker.trigger();this.processTask(R,S)}}process(){if(this.taskQueue.length===0)return;let D=this.taskQueue.shift(),S=this.tasks[D];delete this.tasks[D],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(D,S)}processTask(D,S){return a(this,void 0,void 0,function*(){if(S.type===""){let te=this.resolveRejects[D];return delete this.resolveRejects[D],te?void(S.error?te.reject(qa(S.error)):te.resolve(qa(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(D,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let R=qa(S.data),j=new AbortController;this.abortControllers[D]=j;try{let te=yield this.messageHandlers[S.type](S.sourceMapId,R,j);this.completeTask(D,null,te)}catch(te){this.completeTask(D,te)}})}completeTask(D,S,R){let j=[];delete this.abortControllers[D];let te={id:D,type:"",sourceMapId:this.mapId,origin:location.origin,error:S?Ea(S):null,data:Ea(R,j)};this.target.postMessage(te,{transfer:j})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=ke,i.H=function(){var D=new Ln(16);return Ln!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=0,D[12]=0,D[13]=0,D[14]=0),D[0]=1,D[5]=1,D[10]=1,D[15]=1,D},i.I=kw,i.J=function(D,S,R){var j,te,ue,ve,Re,Ze,at,Tt,Ft,Qt,sr,Tr,Pr=R[0],$r=R[1],ni=R[2];return S===D?(D[12]=S[0]*Pr+S[4]*$r+S[8]*ni+S[12],D[13]=S[1]*Pr+S[5]*$r+S[9]*ni+S[13],D[14]=S[2]*Pr+S[6]*$r+S[10]*ni+S[14],D[15]=S[3]*Pr+S[7]*$r+S[11]*ni+S[15]):(te=S[1],ue=S[2],ve=S[3],Re=S[4],Ze=S[5],at=S[6],Tt=S[7],Ft=S[8],Qt=S[9],sr=S[10],Tr=S[11],D[0]=j=S[0],D[1]=te,D[2]=ue,D[3]=ve,D[4]=Re,D[5]=Ze,D[6]=at,D[7]=Tt,D[8]=Ft,D[9]=Qt,D[10]=sr,D[11]=Tr,D[12]=j*Pr+Re*$r+Ft*ni+S[12],D[13]=te*Pr+Ze*$r+Qt*ni+S[13],D[14]=ue*Pr+at*$r+sr*ni+S[14],D[15]=ve*Pr+Tt*$r+Tr*ni+S[15]),D},i.K=function(D,S,R){var j=R[0],te=R[1],ue=R[2];return D[0]=S[0]*j,D[1]=S[1]*j,D[2]=S[2]*j,D[3]=S[3]*j,D[4]=S[4]*te,D[5]=S[5]*te,D[6]=S[6]*te,D[7]=S[7]*te,D[8]=S[8]*ue,D[9]=S[9]*ue,D[10]=S[10]*ue,D[11]=S[11]*ue,D[12]=S[12],D[13]=S[13],D[14]=S[14],D[15]=S[15],D},i.L=gn,i.M=function(D,S){let R={};for(let j=0;j{let S=window.document.createElement("video");return S.muted=!0,new Promise(R=>{S.onloadstart=()=>{R(S)};for(let j of D){let te=window.document.createElement("source");Ee(j)||(S.crossOrigin="Anonymous"),te.src=j,S.appendChild(te)}})},i.a4=function(){return _++},i.a5=Qi,i.a6=E1,i.a7=Pc,i.a8=xl,i.a9=dS,i.aA=function(D){if(D.type==="custom")return new uS(D);switch(D.type){case"background":return new H9(D);case"circle":return new wn(D);case"fill":return new gr(D);case"fill-extrusion":return new Ev(D);case"heatmap":return new Po(D);case"hillshade":return new $c(D);case"line":return new ay(D);case"raster":return new Yx(D);case"symbol":return new uy(D)}},i.aB=p,i.aC=function(D,S){if(!D)return[{command:"setStyle",args:[S]}];let R=[];try{if(!ct(D.version,S.version))return[{command:"setStyle",args:[S]}];ct(D.center,S.center)||R.push({command:"setCenter",args:[S.center]}),ct(D.zoom,S.zoom)||R.push({command:"setZoom",args:[S.zoom]}),ct(D.bearing,S.bearing)||R.push({command:"setBearing",args:[S.bearing]}),ct(D.pitch,S.pitch)||R.push({command:"setPitch",args:[S.pitch]}),ct(D.sprite,S.sprite)||R.push({command:"setSprite",args:[S.sprite]}),ct(D.glyphs,S.glyphs)||R.push({command:"setGlyphs",args:[S.glyphs]}),ct(D.transition,S.transition)||R.push({command:"setTransition",args:[S.transition]}),ct(D.light,S.light)||R.push({command:"setLight",args:[S.light]}),ct(D.terrain,S.terrain)||R.push({command:"setTerrain",args:[S.terrain]}),ct(D.sky,S.sky)||R.push({command:"setSky",args:[S.sky]}),ct(D.projection,S.projection)||R.push({command:"setProjection",args:[S.projection]});let j={},te=[];(function(ve,Re,Ze,at){let Tt;for(Tt in Re=Re||{},ve=ve||{})Object.prototype.hasOwnProperty.call(ve,Tt)&&(Object.prototype.hasOwnProperty.call(Re,Tt)||ot(Tt,Ze,at));for(Tt in Re)Object.prototype.hasOwnProperty.call(Re,Tt)&&(Object.prototype.hasOwnProperty.call(ve,Tt)?ct(ve[Tt],Re[Tt])||(ve[Tt].type==="geojson"&&Re[Tt].type==="geojson"&&kt(ve,Re,Tt)?qt(Ze,{command:"setGeoJSONSourceData",args:[Tt,Re[Tt].data]}):Dt(Tt,Re,Ze,at)):rt(Tt,Re,Ze))})(D.sources,S.sources,te,j);let ue=[];D.layers&&D.layers.forEach(ve=>{"source"in ve&&j[ve.source]?R.push({command:"removeLayer",args:[ve.id]}):ue.push(ve)}),R=R.concat(te),function(ve,Re,Ze){Re=Re||[];let at=(ve=ve||[]).map(Yt),Tt=Re.map(Yt),Ft=ve.reduce(xr,{}),Qt=Re.reduce(xr,{}),sr=at.slice(),Tr=Object.create(null),Pr,$r,ni,Ri,pi;for(let ki=0,Zi=0;ki@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(R,j,te,ue)=>{let ve=te||ue;return S[j]=!ve||ve.toLowerCase(),""}),S["max-age"]){let R=parseInt(S["max-age"],10);isNaN(R)?delete S["max-age"]:S["max-age"]=R}return S},i.ab=function(D,S){let R=[];for(let j in D)j in S||R.push(j);return R},i.ac=k,i.ad=function(D,S,R){var j=Math.sin(R),te=Math.cos(R),ue=S[0],ve=S[1],Re=S[2],Ze=S[3],at=S[4],Tt=S[5],Ft=S[6],Qt=S[7];return S!==D&&(D[8]=S[8],D[9]=S[9],D[10]=S[10],D[11]=S[11],D[12]=S[12],D[13]=S[13],D[14]=S[14],D[15]=S[15]),D[0]=ue*te+at*j,D[1]=ve*te+Tt*j,D[2]=Re*te+Ft*j,D[3]=Ze*te+Qt*j,D[4]=at*te-ue*j,D[5]=Tt*te-ve*j,D[6]=Ft*te-Re*j,D[7]=Qt*te-Ze*j,D},i.ae=function(D){var S=new Ln(16);return S[0]=D[0],S[1]=D[1],S[2]=D[2],S[3]=D[3],S[4]=D[4],S[5]=D[5],S[6]=D[6],S[7]=D[7],S[8]=D[8],S[9]=D[9],S[10]=D[10],S[11]=D[11],S[12]=D[12],S[13]=D[13],S[14]=D[14],S[15]=D[15],S},i.af=Za,i.ag=function(D,S){let R=0,j=0;if(D.kind==="constant")j=D.layoutSize;else if(D.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:ve}=D,Re=te?k(xo.interpolationFactor(te,S,ue,ve),0,1):0;D.kind==="camera"?j=Mo.number(D.minSize,D.maxSize,Re):R=Re}return{uSizeT:R,uSize:j}},i.ai=function(D,{uSize:S,uSizeT:R},{lowerSize:j,upperSize:te}){return D.kind==="source"?j/v0:D.kind==="composite"?Mo.number(j/v0,te/v0,R):S},i.aj=aS,i.ak=function(D,S,R,j){let te=S.y-D.y,ue=S.x-D.x,ve=j.y-R.y,Re=j.x-R.x,Ze=ve*ue-Re*te;if(Ze===0)return null;let at=(Re*(D.y-R.y)-ve*(D.x-R.x))/Ze;return new u(D.x+at*ue,D.y+at*te)},i.al=MC,i.am=xc,i.an=Un,i.ao=function(D){let S=1/0,R=1/0,j=-1/0,te=-1/0;for(let ue of D)S=Math.min(S,ue.x),R=Math.min(R,ue.y),j=Math.max(j,ue.x),te=Math.max(te,ue.y);return[S,R,j,te]},i.ap=kl,i.ar=nS,i.as=function(D,S){var R=S[0],j=S[1],te=S[2],ue=S[3],ve=S[4],Re=S[5],Ze=S[6],at=S[7],Tt=S[8],Ft=S[9],Qt=S[10],sr=S[11],Tr=S[12],Pr=S[13],$r=S[14],ni=S[15],Ri=R*Re-j*ve,pi=R*Ze-te*ve,ki=R*at-ue*ve,Zi=j*Ze-te*Re,ta=j*at-ue*Re,Va=te*at-ue*Ze,Io=Tt*Pr-Ft*Tr,La=Tt*$r-Qt*Tr,Hn=Tt*ni-sr*Tr,lo=Ft*$r-Qt*Pr,$a=Ft*ni-sr*Pr,Xa=Qt*ni-sr*$r,Tn=Ri*Xa-pi*$a+ki*lo+Zi*Hn-ta*La+Va*Io;return Tn?(D[0]=(Re*Xa-Ze*$a+at*lo)*(Tn=1/Tn),D[1]=(te*$a-j*Xa-ue*lo)*Tn,D[2]=(Pr*Va-$r*ta+ni*Zi)*Tn,D[3]=(Qt*ta-Ft*Va-sr*Zi)*Tn,D[4]=(Ze*Hn-ve*Xa-at*La)*Tn,D[5]=(R*Xa-te*Hn+ue*La)*Tn,D[6]=($r*ki-Tr*Va-ni*pi)*Tn,D[7]=(Tt*Va-Qt*ki+sr*pi)*Tn,D[8]=(ve*$a-Re*Hn+at*Io)*Tn,D[9]=(j*Hn-R*$a-ue*Io)*Tn,D[10]=(Tr*ta-Pr*ki+ni*Ri)*Tn,D[11]=(Ft*ki-Tt*ta-sr*Ri)*Tn,D[12]=(Re*La-ve*lo-Ze*Io)*Tn,D[13]=(R*lo-j*La+te*Io)*Tn,D[14]=(Pr*pi-Tr*Zi-$r*Ri)*Tn,D[15]=(Tt*Zi-Ft*pi+Qt*Ri)*Tn,D):null},i.at=gS,i.au=Iw,i.av=mS,i.aw=function(){let D={},S=ce.$version;for(let R in ce.$root){let j=ce.$root[R];if(j.required){let te=null;te=R==="version"?S:j.type==="array"?[]:{},te!=null&&(D[R]=te)}}return D},i.ax=Cn,i.ay=ie,i.az=function(D){D=D.slice();let S=Object.create(null);for(let R=0;R25||j<0||j>=1||R<0||R>=1)},i.bc=function(D,S){return D[0]=S[0],D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=S[1],D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=S[2],D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D},i.bd=class extends yt{},i.be=fS,i.bf=J9,i.bh=ge,i.bi=function(D,S){_e.REGISTERED_PROTOCOLS[D]=S},i.bj=function(D){delete _e.REGISTERED_PROTOCOLS[D]},i.bk=function(D,S){let R={};for(let te=0;teXa*kl)}let La=ve?"center":R.get("text-justify").evaluate(at,{},D.canonical),Hn=R.get("symbol-placement")==="point"?R.get("text-max-width").evaluate(at,{},D.canonical)*kl:1/0,lo=()=>{D.bucket.allowVerticalPlacement&&Ua(ki)&&(Tr.vertical=Hx(Pr,D.glyphMap,D.glyphPositions,D.imagePositions,Tt,Hn,ue,Va,"left",ta,ni,i.ah.vertical,!0,Qt,Ft))};if(!ve&&Io){let $a=new Set;if(La==="auto")for(let Tn=0;Tna(void 0,void 0,void 0,function*(){if(D.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(D)],{type:"image/png"});try{return createImageBitmap(S)}catch(R){throw new Error(`Could not load image because of ${R.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=D=>new Promise((S,R)=>{let j=new Image;j.onload=()=>{S(j),URL.revokeObjectURL(j.src),j.onload=null,window.requestAnimationFrame(()=>{j.src=X})},j.onerror=()=>R(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(D)],{type:"image/png"});j.src=D.byteLength?URL.createObjectURL(te):X}),i.g=Me,i.h=(D,S)=>Te(L(D,{type:"json"}),S),i.i=q,i.j=me,i.k=Ce,i.l=(D,S)=>Te(L(D,{type:"arrayBuffer"}),S),i.m=Te,i.n=function(D){return new tS(D).readFields(gQ,[])},i.o=Ao,i.p=iS,i.q=le,i.r=xi,i.s=Ee,i.t=Ti,i.u=fi,i.v=ce,i.w=T,i.x=function([D,S,R]){return S+=90,S*=Math.PI/180,R*=Math.PI/180,{x:D*Math.cos(S)*Math.sin(R),y:D*Math.sin(S)*Math.sin(R),z:D*Math.cos(R)}},i.y=Mo,i.z=Ko}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ne){this.keyCache={},Ne&&this.replace(Ne)}replace(Ne){this._layerConfigs={},this._layers={},this.update(Ne,[])}update(Ne,Ye){for(let Xe of Ne){this._layerConfigs[Xe.id]=Xe;let ht=this._layers[Xe.id]=i.aA(Xe);ht._featureFilter=i.a7(ht.filter),this.keyCache[Xe.id]&&delete this.keyCache[Xe.id]}for(let Xe of Ye)delete this.keyCache[Xe],delete this._layerConfigs[Xe],delete this._layers[Xe];this.familiesBySource={};let Ve=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let Xe of Ve){let ht=Xe.map(Vt=>this._layers[Vt.id]),Le=ht[0];if(Le.visibility==="none")continue;let xe=Le.source||"",Se=this.familiesBySource[xe];Se||(Se=this.familiesBySource[xe]={});let lt=Le.sourceLayer||"_geojsonTileLayer",Gt=Se[lt];Gt||(Gt=Se[lt]=[]),Gt.push(ht)}}}class o{constructor(Ne){let Ye={},Ve=[];for(let xe in Ne){let Se=Ne[xe],lt=Ye[xe]={};for(let Gt in Se){let Vt=Se[+Gt];if(!Vt||Vt.bitmap.width===0||Vt.bitmap.height===0)continue;let ar={x:0,y:0,w:Vt.bitmap.width+2,h:Vt.bitmap.height+2};Ve.push(ar),lt[Gt]={rect:ar,metrics:Vt.metrics}}}let{w:Xe,h:ht}=i.p(Ve),Le=new i.o({width:Xe||1,height:ht||1});for(let xe in Ne){let Se=Ne[xe];for(let lt in Se){let Gt=Se[+lt];if(!Gt||Gt.bitmap.width===0||Gt.bitmap.height===0)continue;let Vt=Ye[xe][lt].rect;i.o.copy(Gt.bitmap,Le,{x:0,y:0},{x:Vt.x+1,y:Vt.y+1},Gt.bitmap)}}this.image=Le,this.positions=Ye}}i.bl("GlyphAtlas",o);class s{constructor(Ne){this.tileID=new i.S(Ne.tileID.overscaledZ,Ne.tileID.wrap,Ne.tileID.canonical.z,Ne.tileID.canonical.x,Ne.tileID.canonical.y),this.uid=Ne.uid,this.zoom=Ne.zoom,this.pixelRatio=Ne.pixelRatio,this.tileSize=Ne.tileSize,this.source=Ne.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ne.showCollisionBoxes,this.collectResourceTiming=!!Ne.collectResourceTiming,this.returnDependencies=!!Ne.returnDependencies,this.promoteId=Ne.promoteId,this.inFlightDependencies=[]}parse(Ne,Ye,Ve,Xe){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ne,this.collisionBoxArray=new i.a5;let ht=new i.bm(Object.keys(Ne.layers).sort()),Le=new i.bn(this.tileID,this.promoteId);Le.bucketLayerIDs=[];let xe={},Se={featureIndex:Le,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ve},lt=Ye.familiesBySource[this.source];for(let _n in lt){let $i=Ne.layers[_n];if(!$i)continue;$i.version===1&&i.w(`Vector tile source "${this.source}" layer "${_n}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let zn=ht.encode(_n),Wn=[];for(let It=0;It<$i.length;It++){let ft=$i.feature(It),jt=Le.getId(ft,_n);Wn.push({feature:ft,id:jt,index:It,sourceLayerIndex:zn})}for(let It of lt[_n]){let ft=It[0];ft.source!==this.source&&i.w(`layer.source = ${ft.source} does not equal this.source = ${this.source}`),ft.minzoom&&this.zoom=ft.maxzoom||ft.visibility!=="none"&&(l(It,this.zoom,Ve),(xe[ft.id]=ft.createBucket({index:Le.bucketLayerIDs.length,layers:It,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:zn,sourceID:this.source})).populate(Wn,Se,this.tileID.canonical),Le.bucketLayerIDs.push(It.map(jt=>jt.id)))}}let Gt=i.aF(Se.glyphDependencies,_n=>Object.keys(_n).map(Number));this.inFlightDependencies.forEach(_n=>_n==null?void 0:_n.abort()),this.inFlightDependencies=[];let Vt=Promise.resolve({});if(Object.keys(Gt).length){let _n=new AbortController;this.inFlightDependencies.push(_n),Vt=Xe.sendAsync({type:"GG",data:{stacks:Gt,source:this.source,tileID:this.tileID,type:"glyphs"}},_n)}let ar=Object.keys(Se.iconDependencies),Qr=Promise.resolve({});if(ar.length){let _n=new AbortController;this.inFlightDependencies.push(_n),Qr=Xe.sendAsync({type:"GI",data:{icons:ar,source:this.source,tileID:this.tileID,type:"icons"}},_n)}let ai=Object.keys(Se.patternDependencies),jr=Promise.resolve({});if(ai.length){let _n=new AbortController;this.inFlightDependencies.push(_n),jr=Xe.sendAsync({type:"GI",data:{icons:ai,source:this.source,tileID:this.tileID,type:"patterns"}},_n)}let[ri,bi,nn]=yield Promise.all([Vt,Qr,jr]),Wi=new o(ri),Ni=new i.bo(bi,nn);for(let _n in xe){let $i=xe[_n];$i instanceof i.a6?(l($i.layers,this.zoom,Ve),i.bp({bucket:$i,glyphMap:ri,glyphPositions:Wi.positions,imageMap:bi,imagePositions:Ni.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):$i.hasPattern&&($i instanceof i.bq||$i instanceof i.br||$i instanceof i.bs)&&(l($i.layers,this.zoom,Ve),$i.addFeatures(Se,this.tileID.canonical,Ni.patternPositions))}return this.status="done",{buckets:Object.values(xe).filter(_n=>!_n.isEmpty()),featureIndex:Le,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Wi.image,imageAtlas:Ni,glyphMap:this.returnDependencies?ri:null,iconMap:this.returnDependencies?bi:null,glyphPositions:this.returnDependencies?Wi.positions:null}})}}function l(ut,Ne,Ye){let Ve=new i.z(Ne);for(let Xe of ut)Xe.recalculate(Ve,Ye)}class u{constructor(Ne,Ye,Ve){this.actor=Ne,this.layerIndex=Ye,this.availableImages=Ve,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ne,Ye){return i._(this,void 0,void 0,function*(){let Ve=yield i.l(Ne.request,Ye);try{return{vectorTile:new i.bt.VectorTile(new i.bu(Ve.data)),rawData:Ve.data,cacheControl:Ve.cacheControl,expires:Ve.expires}}catch(Xe){let ht=new Uint8Array(Ve.data),Le=`Unable to parse the tile at ${Ne.request.url}, `;throw Le+=ht[0]===31&&ht[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Xe.message}`,new Error(Le)}})}loadTile(Ne){return i._(this,void 0,void 0,function*(){let Ye=Ne.uid,Ve=!!(Ne&&Ne.request&&Ne.request.collectResourceTiming)&&new i.bv(Ne.request),Xe=new s(Ne);this.loading[Ye]=Xe;let ht=new AbortController;Xe.abort=ht;try{let Le=yield this.loadVectorTile(Ne,ht);if(delete this.loading[Ye],!Le)return null;let xe=Le.rawData,Se={};Le.expires&&(Se.expires=Le.expires),Le.cacheControl&&(Se.cacheControl=Le.cacheControl);let lt={};if(Ve){let Vt=Ve.finish();Vt&&(lt.resourceTiming=JSON.parse(JSON.stringify(Vt)))}Xe.vectorTile=Le.vectorTile;let Gt=Xe.parse(Le.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Ye]=Xe,this.fetching[Ye]={rawTileData:xe,cacheControl:Se,resourceTiming:lt};try{let Vt=yield Gt;return i.e({rawTileData:xe.slice(0)},Vt,Se,lt)}finally{delete this.fetching[Ye]}}catch(Le){throw delete this.loading[Ye],Xe.status="done",this.loaded[Ye]=Xe,Le}})}reloadTile(Ne){return i._(this,void 0,void 0,function*(){let Ye=Ne.uid;if(!this.loaded||!this.loaded[Ye])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ve=this.loaded[Ye];if(Ve.showCollisionBoxes=Ne.showCollisionBoxes,Ve.status==="parsing"){let Xe=yield Ve.parse(Ve.vectorTile,this.layerIndex,this.availableImages,this.actor),ht;if(this.fetching[Ye]){let{rawTileData:Le,cacheControl:xe,resourceTiming:Se}=this.fetching[Ye];delete this.fetching[Ye],ht=i.e({rawTileData:Le.slice(0)},Xe,xe,Se)}else ht=Xe;return ht}if(Ve.status==="done"&&Ve.vectorTile)return Ve.parse(Ve.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ne){return i._(this,void 0,void 0,function*(){let Ye=this.loading,Ve=Ne.uid;Ye&&Ye[Ve]&&Ye[Ve].abort&&(Ye[Ve].abort.abort(),delete Ye[Ve])})}removeTile(Ne){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ne.uid]&&delete this.loaded[Ne.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ne){return i._(this,void 0,void 0,function*(){let{uid:Ye,encoding:Ve,rawImageData:Xe,redFactor:ht,greenFactor:Le,blueFactor:xe,baseShift:Se}=Ne,lt=Xe.width+2,Gt=Xe.height+2,Vt=i.b(Xe)?new i.R({width:lt,height:Gt},yield i.bw(Xe,-1,-1,lt,Gt)):Xe,ar=new i.bx(Ye,Vt,Ve,ht,Le,xe,Se);return this.loaded=this.loaded||{},this.loaded[Ye]=ar,ar})}removeTile(Ne){let Ye=this.loaded,Ve=Ne.uid;Ye&&Ye[Ve]&&delete Ye[Ve]}}function f(ut,Ne){if(ut.length!==0){h(ut[0],Ne);for(var Ye=1;Ye=Math.abs(xe)?Ye-Se+xe:xe-Se+Ye,Ye=Se}Ye+Ve>=0!=!!Ne&&ut.reverse()}var d=i.by(function ut(Ne,Ye){var Ve,Xe=Ne&&Ne.type;if(Xe==="FeatureCollection")for(Ve=0;Ve>31}function q(ut,Ne){for(var Ye=ut.loadGeometry(),Ve=ut.type,Xe=0,ht=0,Le=Ye.length,xe=0;xeut},G=Math.fround||(N=new Float32Array(1),ut=>(N[0]=+ut,N[0]));var N;let W=3,re=5,ae=6;class _e{constructor(Ne){this.options=Object.assign(Object.create(X),Ne),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ne){let{log:Ye,minZoom:Ve,maxZoom:Xe}=this.options;Ye&&console.time("total time");let ht=`prepare ${Ne.length} points`;Ye&&console.time(ht),this.points=Ne;let Le=[];for(let Se=0;Se=Ve;Se--){let lt=+Date.now();xe=this.trees[Se]=this._createTree(this._cluster(xe,Se)),Ye&&console.log("z%d: %d clusters in %dms",Se,xe.numItems,+Date.now()-lt)}return Ye&&console.timeEnd("total time"),this}getClusters(Ne,Ye){let Ve=((Ne[0]+180)%360+360)%360-180,Xe=Math.max(-90,Math.min(90,Ne[1])),ht=Ne[2]===180?180:((Ne[2]+180)%360+360)%360-180,Le=Math.max(-90,Math.min(90,Ne[3]));if(Ne[2]-Ne[0]>=360)Ve=-180,ht=180;else if(Ve>ht){let Vt=this.getClusters([Ve,Xe,180,Le],Ye),ar=this.getClusters([-180,Xe,ht,Le],Ye);return Vt.concat(ar)}let xe=this.trees[this._limitZoom(Ye)],Se=xe.range(ge(Ve),ie(Le),ge(ht),ie(Xe)),lt=xe.data,Gt=[];for(let Vt of Se){let ar=this.stride*Vt;Gt.push(lt[ar+re]>1?Me(lt,ar,this.clusterProps):this.points[lt[ar+W]])}return Gt}getChildren(Ne){let Ye=this._getOriginId(Ne),Ve=this._getOriginZoom(Ne),Xe="No cluster with the specified id.",ht=this.trees[Ve];if(!ht)throw new Error(Xe);let Le=ht.data;if(Ye*this.stride>=Le.length)throw new Error(Xe);let xe=this.options.radius/(this.options.extent*Math.pow(2,Ve-1)),Se=ht.within(Le[Ye*this.stride],Le[Ye*this.stride+1],xe),lt=[];for(let Gt of Se){let Vt=Gt*this.stride;Le[Vt+4]===Ne&<.push(Le[Vt+re]>1?Me(Le,Vt,this.clusterProps):this.points[Le[Vt+W]])}if(lt.length===0)throw new Error(Xe);return lt}getLeaves(Ne,Ye,Ve){let Xe=[];return this._appendLeaves(Xe,Ne,Ye=Ye||10,Ve=Ve||0,0),Xe}getTile(Ne,Ye,Ve){let Xe=this.trees[this._limitZoom(Ne)],ht=Math.pow(2,Ne),{extent:Le,radius:xe}=this.options,Se=xe/Le,lt=(Ve-Se)/ht,Gt=(Ve+1+Se)/ht,Vt={features:[]};return this._addTileFeatures(Xe.range((Ye-Se)/ht,lt,(Ye+1+Se)/ht,Gt),Xe.data,Ye,Ve,ht,Vt),Ye===0&&this._addTileFeatures(Xe.range(1-Se/ht,lt,1,Gt),Xe.data,ht,Ve,ht,Vt),Ye===ht-1&&this._addTileFeatures(Xe.range(0,lt,Se/ht,Gt),Xe.data,-1,Ve,ht,Vt),Vt.features.length?Vt:null}getClusterExpansionZoom(Ne){let Ye=this._getOriginZoom(Ne)-1;for(;Ye<=this.options.maxZoom;){let Ve=this.getChildren(Ne);if(Ye++,Ve.length!==1)break;Ne=Ve[0].properties.cluster_id}return Ye}_appendLeaves(Ne,Ye,Ve,Xe,ht){let Le=this.getChildren(Ye);for(let xe of Le){let Se=xe.properties;if(Se&&Se.cluster?ht+Se.point_count<=Xe?ht+=Se.point_count:ht=this._appendLeaves(Ne,Se.cluster_id,Ve,Xe,ht):ht1,Gt,Vt,ar;if(lt)Gt=ke(Ye,Se,this.clusterProps),Vt=Ye[Se],ar=Ye[Se+1];else{let jr=this.points[Ye[Se+W]];Gt=jr.properties;let[ri,bi]=jr.geometry.coordinates;Vt=ge(ri),ar=ie(bi)}let Qr={type:1,geometry:[[Math.round(this.options.extent*(Vt*ht-Ve)),Math.round(this.options.extent*(ar*ht-Xe))]],tags:Gt},ai;ai=lt||this.options.generateId?Ye[Se+W]:this.points[Ye[Se+W]].id,ai!==void 0&&(Qr.id=ai),Le.features.push(Qr)}}_limitZoom(Ne){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ne),this.options.maxZoom+1))}_cluster(Ne,Ye){let{radius:Ve,extent:Xe,reduce:ht,minPoints:Le}=this.options,xe=Ve/(Xe*Math.pow(2,Ye)),Se=Ne.data,lt=[],Gt=this.stride;for(let Vt=0;VtYe&&(ri+=Se[nn+re])}if(ri>jr&&ri>=Le){let bi,nn=ar*jr,Wi=Qr*jr,Ni=-1,_n=((Vt/Gt|0)<<5)+(Ye+1)+this.points.length;for(let $i of ai){let zn=$i*Gt;if(Se[zn+2]<=Ye)continue;Se[zn+2]=Ye;let Wn=Se[zn+re];nn+=Se[zn]*Wn,Wi+=Se[zn+1]*Wn,Se[zn+4]=_n,ht&&(bi||(bi=this._map(Se,Vt,!0),Ni=this.clusterProps.length,this.clusterProps.push(bi)),ht(bi,this._map(Se,zn)))}Se[Vt+4]=_n,lt.push(nn/ri,Wi/ri,1/0,_n,-1,ri),ht&<.push(Ni)}else{for(let bi=0;bi1)for(let bi of ai){let nn=bi*Gt;if(!(Se[nn+2]<=Ye)){Se[nn+2]=Ye;for(let Wi=0;Wi>5}_getOriginZoom(Ne){return(Ne-this.points.length)%32}_map(Ne,Ye,Ve){if(Ne[Ye+re]>1){let Le=this.clusterProps[Ne[Ye+ae]];return Ve?Object.assign({},Le):Le}let Xe=this.points[Ne[Ye+W]].properties,ht=this.options.map(Xe);return Ve&&ht===Xe?Object.assign({},ht):ht}}function Me(ut,Ne,Ye){return{type:"Feature",id:ut[Ne+W],properties:ke(ut,Ne,Ye),geometry:{type:"Point",coordinates:[(Ve=ut[Ne],360*(Ve-.5)),Te(ut[Ne+1])]}};var Ve}function ke(ut,Ne,Ye){let Ve=ut[Ne+re],Xe=Ve>=1e4?`${Math.round(Ve/1e3)}k`:Ve>=1e3?Math.round(Ve/100)/10+"k":Ve,ht=ut[Ne+ae],Le=ht===-1?{}:Object.assign({},Ye[ht]);return Object.assign(Le,{cluster:!0,cluster_id:ut[Ne+W],point_count:Ve,point_count_abbreviated:Xe})}function ge(ut){return ut/360+.5}function ie(ut){let Ne=Math.sin(ut*Math.PI/180),Ye=.5-.25*Math.log((1+Ne)/(1-Ne))/Math.PI;return Ye<0?0:Ye>1?1:Ye}function Te(ut){let Ne=(180-360*ut)*Math.PI/180;return 360*Math.atan(Math.exp(Ne))/Math.PI-90}function Ee(ut,Ne,Ye,Ve){let Xe=Ve,ht=Ne+(Ye-Ne>>1),Le,xe=Ye-Ne,Se=ut[Ne],lt=ut[Ne+1],Gt=ut[Ye],Vt=ut[Ye+1];for(let ar=Ne+3;arXe)Le=ar,Xe=Qr;else if(Qr===Xe){let ai=Math.abs(ar-ht);aiVe&&(Le-Ne>3&&Ee(ut,Ne,Le,Ve),ut[Le+2]=Xe,Ye-Le>3&&Ee(ut,Le,Ye,Ve))}function Ae(ut,Ne,Ye,Ve,Xe,ht){let Le=Xe-Ye,xe=ht-Ve;if(Le!==0||xe!==0){let Se=((ut-Ye)*Le+(Ne-Ve)*xe)/(Le*Le+xe*xe);Se>1?(Ye=Xe,Ve=ht):Se>0&&(Ye+=Le*Se,Ve+=xe*Se)}return Le=ut-Ye,xe=Ne-Ve,Le*Le+xe*xe}function ze(ut,Ne,Ye,Ve){let Xe={id:ut==null?null:ut,type:Ne,geometry:Ye,tags:Ve,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ne==="Point"||Ne==="MultiPoint"||Ne==="LineString")Ce(Xe,Ye);else if(Ne==="Polygon")Ce(Xe,Ye[0]);else if(Ne==="MultiLineString")for(let ht of Ye)Ce(Xe,ht);else if(Ne==="MultiPolygon")for(let ht of Ye)Ce(Xe,ht[0]);return Xe}function Ce(ut,Ne){for(let Ye=0;Ye0&&(Le+=Ve?(Xe*Gt-lt*ht)/2:Math.sqrt(Math.pow(lt-Xe,2)+Math.pow(Gt-ht,2))),Xe=lt,ht=Gt}let xe=Ne.length-3;Ne[2]=1,Ee(Ne,0,xe,Ye),Ne[xe+2]=1,Ne.size=Math.abs(Le),Ne.start=0,Ne.end=Ne.size}function Ge(ut,Ne,Ye,Ve){for(let Xe=0;Xe1?1:Ye}function qt(ut,Ne,Ye,Ve,Xe,ht,Le,xe){if(Ve/=Ne,ht>=(Ye/=Ne)&&Le=Ve)return null;let Se=[];for(let lt of ut){let Gt=lt.geometry,Vt=lt.type,ar=Xe===0?lt.minX:lt.minY,Qr=Xe===0?lt.maxX:lt.maxY;if(ar>=Ye&&Qr=Ve)continue;let ai=[];if(Vt==="Point"||Vt==="MultiPoint")rt(Gt,ai,Ye,Ve,Xe);else if(Vt==="LineString")ot(Gt,ai,Ye,Ve,Xe,!1,xe.lineMetrics);else if(Vt==="MultiLineString")kt(Gt,ai,Ye,Ve,Xe,!1);else if(Vt==="Polygon")kt(Gt,ai,Ye,Ve,Xe,!0);else if(Vt==="MultiPolygon")for(let jr of Gt){let ri=[];kt(jr,ri,Ye,Ve,Xe,!0),ri.length&&ai.push(ri)}if(ai.length){if(xe.lineMetrics&&Vt==="LineString"){for(let jr of ai)Se.push(ze(lt.id,Vt,jr,lt.tags));continue}Vt!=="LineString"&&Vt!=="MultiLineString"||(ai.length===1?(Vt="LineString",ai=ai[0]):Vt="MultiLineString"),Vt!=="Point"&&Vt!=="MultiPoint"||(Vt=ai.length===3?"Point":"MultiPoint"),Se.push(ze(lt.id,Vt,ai,lt.tags))}}return Se.length?Se:null}function rt(ut,Ne,Ye,Ve,Xe){for(let ht=0;ht=Ye&&Le<=Ve&&Ct(Ne,ut[ht],ut[ht+1],ut[ht+2])}}function ot(ut,Ne,Ye,Ve,Xe,ht,Le){let xe=Dt(ut),Se=Xe===0?Yt:xr,lt,Gt,Vt=ut.start;for(let ri=0;riYe&&(Gt=Se(xe,bi,nn,Ni,_n,Ye),Le&&(xe.start=Vt+lt*Gt)):$i>Ve?zn=Ye&&(Gt=Se(xe,bi,nn,Ni,_n,Ye),Wn=!0),zn>Ve&&$i<=Ve&&(Gt=Se(xe,bi,nn,Ni,_n,Ve),Wn=!0),!ht&&Wn&&(Le&&(xe.end=Vt+lt*Gt),Ne.push(xe),xe=Dt(ut)),Le&&(Vt+=lt)}let ar=ut.length-3,Qr=ut[ar],ai=ut[ar+1],jr=Xe===0?Qr:ai;jr>=Ye&&jr<=Ve&&Ct(xe,Qr,ai,ut[ar+2]),ar=xe.length-3,ht&&ar>=3&&(xe[ar]!==xe[0]||xe[ar+1]!==xe[1])&&Ct(xe,xe[0],xe[1],xe[2]),xe.length&&Ne.push(xe)}function Dt(ut){let Ne=[];return Ne.size=ut.size,Ne.start=ut.start,Ne.end=ut.end,Ne}function kt(ut,Ne,Ye,Ve,Xe,ht){for(let Le of ut)ot(Le,Ne,Ye,Ve,Xe,ht,!1)}function Ct(ut,Ne,Ye,Ve){ut.push(Ne,Ye,Ve)}function Yt(ut,Ne,Ye,Ve,Xe,ht){let Le=(ht-Ne)/(Ve-Ne);return Ct(ut,ht,Ye+(Xe-Ye)*Le,1),Le}function xr(ut,Ne,Ye,Ve,Xe,ht){let Le=(ht-Ye)/(Xe-Ye);return Ct(ut,Ne+(Ve-Ne)*Le,ht,1),Le}function er(ut,Ne){let Ye=[];for(let Ve=0;Ve0&&Ne.size<(Xe?Le:Ve))return void(Ye.numPoints+=Ne.length/3);let xe=[];for(let Se=0;SeLe)&&(Ye.numSimplified++,xe.push(Ne[Se],Ne[Se+1])),Ye.numPoints++;Xe&&function(Se,lt){let Gt=0;for(let Vt=0,ar=Se.length,Qr=ar-2;Vt0===lt)for(let Vt=0,ar=Se.length;Vt24)throw new Error("maxZoom should be in the 0-24 range");if(Ye.promoteId&&Ye.generateId)throw new Error("promoteId and generateId cannot be used together.");let Xe=function(ht,Le){let xe=[];if(ht.type==="FeatureCollection")for(let Se=0;Se1&&console.time("creation"),Qr=this.tiles[ar]=Lt(Ne,Ye,Ve,Xe,lt),this.tileCoords.push({z:Ye,x:Ve,y:Xe}),Gt)){Gt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ye,Ve,Xe,Qr.numFeatures,Qr.numPoints,Qr.numSimplified),console.timeEnd("creation"));let Wn=`z${Ye}`;this.stats[Wn]=(this.stats[Wn]||0)+1,this.total++}if(Qr.source=Ne,ht==null){if(Ye===lt.indexMaxZoom||Qr.numPoints<=lt.indexMaxPoints)continue}else{if(Ye===lt.maxZoom||Ye===ht)continue;if(ht!=null){let Wn=ht-Ye;if(Ve!==Le>>Wn||Xe!==xe>>Wn)continue}}if(Qr.source=null,Ne.length===0)continue;Gt>1&&console.time("clipping");let ai=.5*lt.buffer/lt.extent,jr=.5-ai,ri=.5+ai,bi=1+ai,nn=null,Wi=null,Ni=null,_n=null,$i=qt(Ne,Vt,Ve-ai,Ve+ri,0,Qr.minX,Qr.maxX,lt),zn=qt(Ne,Vt,Ve+jr,Ve+bi,0,Qr.minX,Qr.maxX,lt);Ne=null,$i&&(nn=qt($i,Vt,Xe-ai,Xe+ri,1,Qr.minY,Qr.maxY,lt),Wi=qt($i,Vt,Xe+jr,Xe+bi,1,Qr.minY,Qr.maxY,lt),$i=null),zn&&(Ni=qt(zn,Vt,Xe-ai,Xe+ri,1,Qr.minY,Qr.maxY,lt),_n=qt(zn,Vt,Xe+jr,Xe+bi,1,Qr.minY,Qr.maxY,lt),zn=null),Gt>1&&console.timeEnd("clipping"),Se.push(nn||[],Ye+1,2*Ve,2*Xe),Se.push(Wi||[],Ye+1,2*Ve,2*Xe+1),Se.push(Ni||[],Ye+1,2*Ve+1,2*Xe),Se.push(_n||[],Ye+1,2*Ve+1,2*Xe+1)}}getTile(Ne,Ye,Ve){Ne=+Ne,Ye=+Ye,Ve=+Ve;let Xe=this.options,{extent:ht,debug:Le}=Xe;if(Ne<0||Ne>24)return null;let xe=1<1&&console.log("drilling down to z%d-%d-%d",Ne,Ye,Ve);let lt,Gt=Ne,Vt=Ye,ar=Ve;for(;!lt&&Gt>0;)Gt--,Vt>>=1,ar>>=1,lt=this.tiles[$t(Gt,Vt,ar)];return lt&<.source?(Le>1&&(console.log("found parent tile z%d-%d-%d",Gt,Vt,ar),console.time("drilling down")),this.splitTile(lt.source,Gt,Vt,ar,Ne,Ye,Ve),Le>1&&console.timeEnd("drilling down"),this.tiles[Se]?xt(this.tiles[Se],ht):null):null}}function $t(ut,Ne,Ye){return 32*((1<{Vt.properties=Qr;let ai={};for(let jr of ar)ai[jr]=Se[jr].evaluate(Gt,Vt);return ai},Le.reduce=(Qr,ai)=>{Vt.properties=ai;for(let jr of ar)Gt.accumulated=Qr[jr],Qr[jr]=lt[jr].evaluate(Gt,Vt)},Le}(Ne)).load((yield this._pendingData).features):(Xe=yield this._pendingData,new Ht(Xe,Ne.geojsonVtOptions)),this.loaded={};let ht={};if(Ve){let Le=Ve.finish();Le&&(ht.resourceTiming={},ht.resourceTiming[Ne.source]=JSON.parse(JSON.stringify(Le)))}return ht}catch(ht){if(delete this._pendingRequest,i.bB(ht))return{abandoned:!0};throw ht}var Xe})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ne){let Ye=this.loaded;return Ye&&Ye[Ne.uid]?super.reloadTile(Ne):this.loadTile(Ne)}loadAndProcessGeoJSON(Ne,Ye){return i._(this,void 0,void 0,function*(){let Ve=yield this.loadGeoJSON(Ne,Ye);if(delete this._pendingRequest,typeof Ve!="object")throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(d(Ve,!0),Ne.filter){let Xe=i.bC(Ne.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Xe.result==="error")throw new Error(Xe.value.map(Le=>`${Le.key}: ${Le.message}`).join(", "));Ve={type:"FeatureCollection",features:Ve.features.filter(Le=>Xe.value.evaluate({zoom:0},Le))}}return Ve})}loadGeoJSON(Ne,Ye){return i._(this,void 0,void 0,function*(){let{promoteId:Ve}=Ne;if(Ne.request){let Xe=yield i.h(Ne.request,Ye);return this._dataUpdateable=_r(Xe.data,Ve)?Br(Xe.data,Ve):void 0,Xe.data}if(typeof Ne.data=="string")try{let Xe=JSON.parse(Ne.data);return this._dataUpdateable=_r(Xe,Ve)?Br(Xe,Ve):void 0,Xe}catch(Xe){throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`)}if(!Ne.dataDiff)throw new Error(`Input data given to '${Ne.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ne.source}`);return function(Xe,ht,Le){var xe,Se,lt,Gt;if(ht.removeAll&&Xe.clear(),ht.remove)for(let Vt of ht.remove)Xe.delete(Vt);if(ht.add)for(let Vt of ht.add){let ar=fr(Vt,Le);ar!=null&&Xe.set(ar,Vt)}if(ht.update)for(let Vt of ht.update){let ar=Xe.get(Vt.id);if(ar==null)continue;let Qr=!Vt.removeAllProperties&&(((xe=Vt.removeProperties)===null||xe===void 0?void 0:xe.length)>0||((Se=Vt.addOrUpdateProperties)===null||Se===void 0?void 0:Se.length)>0);if((Vt.newGeometry||Vt.removeAllProperties||Qr)&&(ar=Object.assign({},ar),Xe.set(Vt.id,ar),Qr&&(ar.properties=Object.assign({},ar.properties))),Vt.newGeometry&&(ar.geometry=Vt.newGeometry),Vt.removeAllProperties)ar.properties={};else if(((lt=Vt.removeProperties)===null||lt===void 0?void 0:lt.length)>0)for(let ai of Vt.removeProperties)Object.prototype.hasOwnProperty.call(ar.properties,ai)&&delete ar.properties[ai];if(((Gt=Vt.addOrUpdateProperties)===null||Gt===void 0?void 0:Gt.length)>0)for(let{key:ai,value:jr}of Vt.addOrUpdateProperties)ar.properties[ai]=jr}}(this._dataUpdateable,Ne.dataDiff,Ve),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ne){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ne){return this._geoJSONIndex.getClusterExpansionZoom(Ne.clusterId)}getClusterChildren(Ne){return this._geoJSONIndex.getChildren(Ne.clusterId)}getClusterLeaves(Ne){return this._geoJSONIndex.getLeaves(Ne.clusterId,Ne.limit,Ne.offset)}}class Nr{constructor(Ne){this.self=Ne,this.actor=new i.F(Ne),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Ye,Ve)=>{if(this.externalWorkerSourceTypes[Ye])throw new Error(`Worker source with name "${Ye}" already registered.`);this.externalWorkerSourceTypes[Ye]=Ve},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Ye=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Ye)},this.actor.registerMessageHandler("LDT",(Ye,Ve)=>this._getDEMWorkerSource(Ye,Ve.source).loadTile(Ve)),this.actor.registerMessageHandler("RDT",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Ye,Ve.source).removeTile(Ve)})),this.actor.registerMessageHandler("GCEZ",(Ye,Ve)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ve.type,Ve.source).getClusterExpansionZoom(Ve)})),this.actor.registerMessageHandler("GCC",(Ye,Ve)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ve.type,Ve.source).getClusterChildren(Ve)})),this.actor.registerMessageHandler("GCL",(Ye,Ve)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Ye,Ve.type,Ve.source).getClusterLeaves(Ve)})),this.actor.registerMessageHandler("LD",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).loadData(Ve)),this.actor.registerMessageHandler("GD",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).getData()),this.actor.registerMessageHandler("LT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).loadTile(Ve)),this.actor.registerMessageHandler("RT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).reloadTile(Ve)),this.actor.registerMessageHandler("AT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).abortTile(Ve)),this.actor.registerMessageHandler("RMT",(Ye,Ve)=>this._getWorkerSource(Ye,Ve.type,Ve.source).removeTile(Ve)),this.actor.registerMessageHandler("RS",(Ye,Ve)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Ye]||!this.workerSources[Ye][Ve.type]||!this.workerSources[Ye][Ve.type][Ve.source])return;let Xe=this.workerSources[Ye][Ve.type][Ve.source];delete this.workerSources[Ye][Ve.type][Ve.source],Xe.removeSource!==void 0&&Xe.removeSource(Ve)})),this.actor.registerMessageHandler("RM",Ye=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Ye],delete this.availableImages[Ye],delete this.workerSources[Ye],delete this.demWorkerSources[Ye]})),this.actor.registerMessageHandler("SR",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this.referrer=Ve})),this.actor.registerMessageHandler("SRPS",(Ye,Ve)=>this._syncRTLPluginState(Ye,Ve)),this.actor.registerMessageHandler("IS",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this.self.importScripts(Ve)})),this.actor.registerMessageHandler("SI",(Ye,Ve)=>this._setImages(Ye,Ve)),this.actor.registerMessageHandler("UL",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).update(Ve.layers,Ve.removedIds)})),this.actor.registerMessageHandler("SL",(Ye,Ve)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Ye).replace(Ve)}))}_setImages(Ne,Ye){return i._(this,void 0,void 0,function*(){this.availableImages[Ne]=Ye;for(let Ve in this.workerSources[Ne]){let Xe=this.workerSources[Ne][Ve];for(let ht in Xe)Xe[ht].availableImages=Ye}})}_syncRTLPluginState(Ne,Ye){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Ye.pluginStatus!=="loading")return i.bD.setState(Ye),Ye;let Ve=Ye.pluginURL;if(this.self.importScripts(Ve),i.bD.isParsed()){let Xe={pluginStatus:"loaded",pluginURL:Ve};return i.bD.setState(Xe),Xe}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ve}`)})}_getAvailableImages(Ne){let Ye=this.availableImages[Ne];return Ye||(Ye=[]),Ye}_getLayerIndex(Ne){let Ye=this.layerIndexes[Ne];return Ye||(Ye=this.layerIndexes[Ne]=new a),Ye}_getWorkerSource(Ne,Ye,Ve){if(this.workerSources[Ne]||(this.workerSources[Ne]={}),this.workerSources[Ne][Ye]||(this.workerSources[Ne][Ye]={}),!this.workerSources[Ne][Ye][Ve]){let Xe={sendAsync:(ht,Le)=>(ht.targetMapId=Ne,this.actor.sendAsync(ht,Le))};switch(Ye){case"vector":this.workerSources[Ne][Ye][Ve]=new u(Xe,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;case"geojson":this.workerSources[Ne][Ye][Ve]=new Or(Xe,this._getLayerIndex(Ne),this._getAvailableImages(Ne));break;default:this.workerSources[Ne][Ye][Ve]=new this.externalWorkerSourceTypes[Ye](Xe,this._getLayerIndex(Ne),this._getAvailableImages(Ne))}}return this.workerSources[Ne][Ye][Ve]}_getDEMWorkerSource(Ne,Ye){return this.demWorkerSources[Ne]||(this.demWorkerSources[Ne]={}),this.demWorkerSources[Ne][Ye]||(this.demWorkerSources[Ne][Ye]=new c),this.demWorkerSources[Ne][Ye]}}return i.i(self)&&(self.worker=new Nr(self)),Nr}),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:le=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);le.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(le,w=0){return this.getImageCanvasContext(le).getImageData(-w,-w,le.width+2*w,le.height+2*w)},getImageCanvasContext(le){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=le.width,w.height=le.height,B.drawImage(le,0,0,le.width,le.height),B},resolveURL:le=>(s||(s=document.createElement("a")),s.href=le,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 se=0;se{h&&b(h),h=null,x=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(le){let w,B,Q,ee;le.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},le.addThrottleControl=it=>{let yt=Q++;return ee[yt]=it,yt},le.removeThrottleControl=it=>{delete ee[it],qe()},le.getImage=(it,yt,Ot=!0)=>new Promise((Nt,hr)=>{f.supported&&(it.headers||(it.headers={}),it.headers.accept="image/webp,*/*"),a.e(it,{type:"image"}),w.push({abortController:yt,requestParameters:it,supportImageRefresh:Ot,state:"queued",onError:Sr=>{hr(Sr)},onSuccess:Sr=>{Nt(Sr)}}),qe()});let se=it=>a._(this,void 0,void 0,function*(){it.state="running";let{requestParameters:yt,supportImageRefresh:Ot,onError:Nt,onSuccess:hr,abortController:Sr}=it,he=Ot===!1&&!a.i(self)&&!a.g(yt.url)&&(!yt.headers||Object.keys(yt.headers).reduce((Oe,Je)=>Oe&&Je==="accept",!0));B++;let be=he?je(yt,Sr):a.m(yt,Sr);try{let Oe=yield be;delete it.abortController,it.state="completed",Oe.data instanceof HTMLImageElement||a.b(Oe.data)?hr(Oe):Oe.data&&hr({data:yield(Pe=Oe.data,typeof createImageBitmap=="function"?a.d(Pe):a.f(Pe)),cacheControl:Oe.cacheControl,expires:Oe.expires})}catch(Oe){delete it.abortController,Nt(Oe)}finally{B--,qe()}var Pe}),qe=()=>{let it=(()=>{for(let yt of Object.keys(ee))if(ee[yt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let yt=B;yt0;yt++){let Ot=w.shift();Ot.abortController.signal.aborted?yt--:se(Ot)}},je=(it,yt)=>new Promise((Ot,Nt)=>{let hr=new Image,Sr=it.url,he=it.credentials;he&&he==="include"?hr.crossOrigin="use-credentials":(he&&he==="same-origin"||!a.s(Sr))&&(hr.crossOrigin="anonymous"),yt.signal.addEventListener("abort",()=>{hr.src="",Nt(a.c())}),hr.fetchPriority="high",hr.onload=()=>{hr.onerror=hr.onload=null,Ot({data:hr})},hr.onerror=()=>{hr.onerror=hr.onload=null,yt.signal.aborted||Nt(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."))},hr.src=Sr})}(g||(g={})),g.resetRequestQueue();class E{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function k(le){var w=new a.A(3);return w[0]=le[0],w[1]=le[1],w[2]=le[2],w}var A,L=function(le,w,B){return le[0]=w[0]-B[0],le[1]=w[1]-B[1],le[2]=w[2]-B[2],le};A=new a.A(3),a.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var _=function(le){var w=le[0],B=le[1];return w*w+B*B};function C(le){let w=[];if(typeof le=="string")w.push({id:"default",url:le});else if(le&&le.length>0){let B=[];for(let{id:Q,url:ee}of le){let se=`${Q}${ee}`;B.indexOf(se)===-1&&(B.push(se),w.push({id:Q,url:ee}))}}return w}function M(le,w,B){let Q=le.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var le=new a.A(2);a.A!=Float32Array&&(le[0]=0,le[1]=0)})();class p{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:se}=w,qe=!(this.size&&this.size[0]===ee&&this.size[1]===se||Q),{context:je}=this,{gl:it}=je;if(this.useMipmap=!!(B&&B.useMipmap),it.bindTexture(it.TEXTURE_2D,this.texture),je.pixelStoreUnpackFlipY.set(!1),je.pixelStoreUnpack.set(1),je.pixelStoreUnpackPremultiplyAlpha.set(this.format===it.RGBA&&(!B||B.premultiply!==!1)),qe)this.size=[ee,se],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?it.texImage2D(it.TEXTURE_2D,0,this.format,this.format,it.UNSIGNED_BYTE,w):it.texImage2D(it.TEXTURE_2D,0,this.format,ee,se,0,this.format,it.UNSIGNED_BYTE,w.data);else{let{x:yt,y:Ot}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?it.texSubImage2D(it.TEXTURE_2D,0,yt,Ot,it.RGBA,it.UNSIGNED_BYTE,w):it.texSubImage2D(it.TEXTURE_2D,0,yt,Ot,ee,se,it.RGBA,it.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&it.generateMipmap(it.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:se}=ee;se.bindTexture(se.TEXTURE_2D,this.texture),Q!==se.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=se.LINEAR),w!==this.filter&&(se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MAG_FILTER,w),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_S,B),se.texParameteri(se.TEXTURE_2D,se.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(le){let{userImage:w}=le;return!!(w&&w.render&&w.render())&&(le.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 se of w)this.images[se]||(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},se=new a.I(ee,Q);this.patterns[w]={bin:ee,position:se}}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 p(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let se in this.patterns)w.push(this.patterns[se].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let se in this.patterns){let{bin:qe}=this.patterns[se],je=qe.x+1,it=qe.y+1,yt=this.getImage(se).data,Ot=yt.width,Nt=yt.height;a.R.copy(yt,ee,{x:0,y:0},{x:je,y:it},{width:Ot,height:Nt}),a.R.copy(yt,ee,{x:0,y:Nt-1},{x:je,y:it-1},{width:Ot,height:1}),a.R.copy(yt,ee,{x:0,y:0},{x:je,y:it+Nt},{width:Ot,height:1}),a.R.copy(yt,ee,{x:Ot-1,y:0},{x:je-1,y:it},{width:1,height:Nt}),a.R.copy(yt,ee,{x:0,y:0},{x:je+Ot,y:it},{width:1,height:Nt})}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 F=1e20;function q(le,w,B,Q,ee,se,qe,je,it){for(let yt=w;yt-1);it++,se[it]=je,qe[it]=yt,qe[it+1]=F}for(let je=0,it=0;je65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[se])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[se]){let je=H.loadGlyphRange(w,se,this.url,this.requestManager);Q.requests[se]=je}let qe=yield Q.requests[se];for(let je in qe)this._doesCharSupportLocalGlyph(+je)||(Q.glyphs[+je]=qe[+je]);return Q.ranges[se]=!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 se=w.tinySDF;if(!se){let je="400";/bold/i.test(B)?je="900":/medium/i.test(B)?je="500":/light/i.test(B)&&(je="200"),se=w.tinySDF=new H.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:je})}let qe=se.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}}}}H.loadGlyphRange=function(le,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,se=ee+255,qe=Q.transformRequest(B.replace("{fontstack}",le).replace("{range}",`${ee}-${se}`),"Glyphs"),je=yield a.l(qe,new AbortController);if(!je||!je.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${se}`);let it={};for(let yt of a.n(je.data))it[yt.id]=yt;return it})},H.TinySDF=class{constructor({fontSize:le=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:se="normal",fontStyle:qe="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let je=this.size=le+4*w,it=this._createCanvas(je),yt=this.ctx=it.getContext("2d",{willReadFrequently:!0});yt.font=`${qe} ${se} ${le}px ${ee}`,yt.textBaseline="alphabetic",yt.textAlign="left",yt.fillStyle="black",this.gridOuter=new Float64Array(je*je),this.gridInner=new Float64Array(je*je),this.f=new Float64Array(je),this.z=new Float64Array(je+1),this.v=new Uint16Array(je)}_createCanvas(le){let w=document.createElement("canvas");return w.width=w.height=le,w}draw(le){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:se}=this.ctx.measureText(le),qe=Math.ceil(B),je=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(se-ee))),it=Math.min(this.size-this.buffer,qe+Math.ceil(Q)),yt=je+2*this.buffer,Ot=it+2*this.buffer,Nt=Math.max(yt*Ot,0),hr=new Uint8ClampedArray(Nt),Sr={data:hr,width:yt,height:Ot,glyphWidth:je,glyphHeight:it,glyphTop:qe,glyphLeft:0,glyphAdvance:w};if(je===0||it===0)return Sr;let{ctx:he,buffer:be,gridInner:Pe,gridOuter:Oe}=this;he.clearRect(be,be,je,it),he.fillText(le,be,be+qe);let Je=he.getImageData(be,be,je,it);Oe.fill(F,0,Nt),Pe.fill(0,0,Nt);for(let He=0;He0?Ut*Ut:0,Pe[Rt]=Ut<0?Ut*Ut:0}}q(Oe,0,0,yt,Ot,yt,this.f,this.v,this.z),q(Pe,be,be,je,it,yt,this.f,this.v,this.z);for(let He=0;He1&&(it=w[++je]);let Ot=Math.abs(yt-it.left),Nt=Math.abs(yt-it.right),hr=Math.min(Ot,Nt),Sr,he=se/Q*(ee+1);if(it.isDash){let be=ee-Math.abs(he);Sr=Math.sqrt(hr*hr+be*be)}else Sr=ee-Math.sqrt(hr*hr+he*he);this.data[qe+yt]=Math.max(0,Math.min(255,Sr+128))}}}addRegularDash(w){for(let je=w.length-1;je>=0;--je){let it=w[je],yt=w[je+1];it.zeroLength?w.splice(je,1):yt&&yt.isDash===it.isDash&&(yt.left=it.left,w.splice(je,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,se=0,qe=w[se];for(let je=0;je1&&(qe=w[++se]);let it=Math.abs(je-qe.left),yt=Math.abs(je-qe.right),Ot=Math.min(it,yt);this.data[ee+je]=Math.max(0,Math.min(255,(qe.isDash?Ot:-Ot)+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 se=0;for(let je=0;je{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let ke=Math.floor(u.hardwareConcurrency/2),ge,ie;function Te(){return ge||(ge=new Me),ge}Me.workerCount=a.C(globalThis)?Math.max(Math.min(ke,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{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 Ee(Te(),a.G),ie.registerMessageHandler("GR",(le,w,B)=>a.m(w,B))),ie}function ze(le,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*le.width,.5*le.height,1]),a.L(B,B,le.calculatePosMatrix(w.toUnwrapped()))}function Ce(le,w,B,Q,ee,se){let qe=function(Nt,hr,Sr){if(Nt)for(let he of Nt){let be=hr[he];if(be&&be.source===Sr&&be.type==="fill-extrusion")return!0}else for(let he in hr){let be=hr[he];if(be.source===Sr&&be.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,le.id),je=se.maxPitchScaleFactor(),it=le.tilesIn(Q,je,qe);it.sort(me);let yt=[];for(let Nt of it)yt.push({wrappedTileID:Nt.tileID.wrapped().key,queryResults:Nt.tile.queryRenderedFeatures(w,B,le._state,Nt.queryGeometry,Nt.cameraQueryGeometry,Nt.scale,ee,se,je,ze(le.transform,Nt.tileID))});let Ot=function(Nt){let hr={},Sr={};for(let he of Nt){let be=he.queryResults,Pe=he.wrappedTileID,Oe=Sr[Pe]=Sr[Pe]||{};for(let Je in be){let He=be[Je],et=Oe[Je]=Oe[Je]||{},Mt=hr[Je]=hr[Je]||[];for(let Rt of He)et[Rt.featureIndex]||(et[Rt.featureIndex]=!0,Mt.push(Rt))}}return hr}(yt);for(let Nt in Ot)Ot[Nt].forEach(hr=>{let Sr=hr.feature,he=le.getFeatureState(Sr.layer["source-layer"],Sr.id);Sr.source=Sr.layer.source,Sr.layer["source-layer"]&&(Sr.sourceLayer=Sr.layer["source-layer"]),Sr.state=he});return Ot}function me(le,w){let B=le.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 De(le,w,B){return a._(this,void 0,void 0,function*(){let Q=le;if(le.url?Q=(yield a.h(w.transformRequest(le.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,le),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(se=>se.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,se;if(w instanceof a.N)ee=w,se=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,se=w._ne,!ee||!se)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(se.lng,Q.lng),Q.lat=Math.max(se.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(se.lng,se.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 Ge{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),se=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((se,qe)=>{w.reloadPromise={resolve:se,reject:qe}})}else w.actor=this.dispatcher.getActor(),ee="LT";w.abortController=new AbortController;try{let se=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,se)}catch(se){if(delete w.abortController,w.aborted)return;if(se&&se.status!==404)throw se;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 ct 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 De(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new Ge(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 g.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,se=ee.gl,qe=Q.data;w.texture=this.map.painter.getTileTexture(qe.width),w.texture?w.texture.update(qe,{useMipmap:!0}):(w.texture=new p(ee,qe,se.RGBA,{useMipmap:!0}),w.texture.bind(se.LINEAR,se.CLAMP_TO_EDGE,se.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 qt extends ct{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 g.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let se=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let qe=a.b(se)&&a.U()?se:yield this.readImageNow(se),je={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 it=yield w.actor.sendAsync({type:"LDT",data:je});w.dem=it,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,se=B.x===0?w.wrap-1:w.wrap,qe=(B.x+1+Q)%Q,je=B.x+1===Q?w.wrap+1:w.wrap,it={};return it[new a.S(w.overscaledZ,se,B.z,ee,B.y).key]={backfilled:!1},it[new a.S(w.overscaledZ,je,B.z,qe,B.y).key]={backfilled:!1},B.y>0&&(it[new a.S(w.overscaledZ,se,B.z,ee,B.y-1).key]={backfilled:!1},it[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},it[new a.S(w.overscaledZ,je,B.z,qe,B.y-1).key]={backfilled:!1}),B.y+10&&a.e(se,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},se),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},se),{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 ot=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Dt 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 g.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 se=1/0,qe=1/0,je=-1/0,it=-1/0;for(let hr of ee)se=Math.min(se,hr.x),qe=Math.min(qe,hr.y),je=Math.max(je,hr.x),it=Math.max(it,hr.y);let yt=Math.max(je-se,it-qe),Ot=Math.max(0,Math.floor(-Math.log(yt)/Math.LN2)),Nt=Math.pow(2,Ot);return new a.a1(Ot,Math.floor((se+je)/2*Nt),Math.floor((qe+it)/2*Nt))}(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,ot.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let se=this.tiles[ee];se.state!=="loaded"&&(se.state="loaded",se.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 kt extends Dt{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,ot.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 p(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let se=this.tiles[ee];se.state!=="loaded"&&(se.state="loaded",se.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 Ct extends Dt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(se=>!Array.isArray(se)||se.length!==2||se.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,ot.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 p(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let se in this.tiles){let qe=this.tiles[se];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 Yt={},xr=le=>{switch(le){case"geojson":return rt;case"image":return Dt;case"raster":return ct;case"raster-dem":return qt;case"vector":return nt;case"video":return kt;case"canvas":return Ct}return Yt[le]},er="RTLPluginLoaded";class Ke 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(er))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let xt=null;function bt(){return xt||(xt=new Ke),xt}class Lt{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;Bse.getLayer(yt)).filter(Boolean);if(it.length!==0){je.layers=it,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(yt=>it.filter(Ot=>Ot.id===yt)[0]));for(let yt of it)qe[yt.id]=je}}return qe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let se=this.buckets[ee];if(se instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;se.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let se=this.buckets[ee];if(se instanceof a.a6&&se.hasRTLText){this.hasRTLText=!0,bt().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let se=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(se))}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 p(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,se,qe,je,it,yt,Ot){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:se,scale:qe,tileSize:this.tileSize,pixelPosMatrix:Ot,transform:it,params:je,queryPadding:this.queryPadding*yt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),se=B&&B.sourceLayer?B.sourceLayer:"",qe=ee._geojsonTileLayer||ee[se];if(!qe)return;let je=a.a7(B&&B.filter),{z:it,x:yt,y:Ot}=this.tileID.canonical,Nt={z:it,x:yt,y:Ot};for(let hr=0;hrQ)ee=!1;else if(B)if(this.expirationTime{this.remove(w,se)},Q)),this.data[ee].push(se),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),se=this.data[Q][ee];return this.data[Q].splice(ee,1),se.timeout&&clearTimeout(se.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(se.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class Et{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let se in this.state[w])se!==ee&&(this.deletedStates[w][se]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let se in this.state[w][ee])Q[se]||(this.deletedStates[w][ee][se]=null)}else for(let se in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][se]===null&&delete this.deletedStates[w][ee][se]}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 se=this.deletedStates[w][B];if(se===null)return{};for(let qe in se)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 se={};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]),se[qe]=this.state[ee][qe];Q[ee]=se}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let se={};if(this.deletedStates[ee]===null)for(let qe in this.state[ee])se[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 je of Object.keys(this.deletedStates[ee][qe]))delete this.state[ee][qe][je];se[qe]=this.state[ee][qe]}Q[ee]=Q[ee]||{},a.e(Q[ee],se)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class dt 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,se,qe,je)=>{let it=new(xr(se.type))(ee,se,qe,je);if(it.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${it.id}`);return it})(w,B,Q,this),this._tiles={},this._cache=new St(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Et,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!=="loaded"&&B.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state="errored",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k("dataabort",{tile:w,coord:w.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(Ht).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 se=Q.tileID,qe=ee.tileID,je=new a.P(se.canonical.x,se.canonical.y)._rotate(this.transform.angle),it=new a.P(qe.canonical.x,qe.canonical.y)._rotate(this.transform.angle);return se.overscaledZ-qe.overscaledZ||it.y-je.y||it.x-je.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Ht).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+it)===1?qe+=it:Math.abs(qe-it)===1&&(qe-=it)),se.dem&&ee.dem&&(ee.dem.backfillBorder(se.dem,qe,je),ee.neighboringTiles&&ee.neighboringTiles[yt]&&(ee.neighboringTiles[yt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let se in this._tiles){let qe=this._tiles[se];if(ee[se]||!qe.hasData()||qe.tileID.overscaledZ<=B||qe.tileID.overscaledZ>Q)continue;let je=qe.tileID;for(;qe&&qe.tileID.overscaledZ>B+1;){let yt=qe.tileID.scaledTo(qe.tileID.overscaledZ-1);qe=this._tiles[yt.key],qe&&qe.hasData()&&(je=yt)}let it=je;for(;it.overscaledZ>B;)if(it=it.scaledTo(it.overscaledZ-1),w[it.key]){ee[je.key]=je;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),se=this._getLoadedTile(ee);if(se)return se}}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)),se=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(se)}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 se=this._tiles[ee];se.tileID=se.tileID.unwrapTo(se.tileID.wrap+B),Q[se.tileID.key]=se}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,se,qe){let je={},it={},yt=Object.keys(w),Ot=u.now();for(let Nt of yt){let hr=w[Nt],Sr=this._tiles[Nt];if(!Sr||Sr.fadeEndTime!==0&&Sr.fadeEndTime<=Ot)continue;let he=this.findLoadedParent(hr,B),be=this.findLoadedSibling(hr),Pe=he||be||null;Pe&&(this._addTile(Pe.tileID),je[Pe.tileID.key]=Pe.tileID),it[Nt]=hr}this._retainLoadedChildren(it,ee,Q,w);for(let Nt in je)w[Nt]||(this._coveredTiles[Nt]=!0,w[Nt]=je[Nt]);if(qe){let Nt={},hr={};for(let Sr of se)this._tiles[Sr.key].hasData()?Nt[Sr.key]=Sr:hr[Sr.key]=Sr;for(let Sr in hr){let he=hr[Sr].children(this._source.maxzoom);this._tiles[he[0].key]&&this._tiles[he[1].key]&&this._tiles[he[2].key]&&this._tiles[he[3].key]&&(Nt[he[0].key]=w[he[0].key]=he[0],Nt[he[1].key]=w[he[1].key]=he[1],Nt[he[2].key]=w[he[2].key]=he[2],Nt[he[3].key]=w[he[3].key]=he[3],delete hr[Sr])}for(let Sr in hr){let he=hr[Sr],be=this.findLoadedParent(he,this._source.minzoom),Pe=this.findLoadedSibling(he),Oe=be||Pe||null;if(Oe){Nt[Oe.tileID.key]=w[Oe.tileID.key]=Oe.tileID;for(let Je in Nt)Nt[Je].isChildOf(Oe.tileID)&&delete Nt[Je]}}for(let Sr in this._tiles)Nt[Sr]||(this._coveredTiles[Sr]=!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(Ot=>new a.S(Ot.canonical.z,Ot.wrap,Ot.canonical.z,Ot.canonical.x,Ot.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(Ot=>this._source.hasTile(Ot)))):Q=[];let ee=w.coveringZoomLevel(this._source),se=Math.max(ee-dt.maxOverzooming,this._source.minzoom),qe=Math.max(ee+dt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Ot={};for(let Nt of Q)if(Nt.canonical.z>this._source.minzoom){let hr=Nt.scaledTo(Nt.canonical.z-1);Ot[hr.key]=hr;let Sr=Nt.scaledTo(Math.max(this._source.minzoom,Math.min(Nt.canonical.z,5)));Ot[Sr.key]=Sr}Q=Q.concat(Object.values(Ot))}let je=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,je&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let it=this._updateRetainedTiles(Q,ee);$t(this._source.type)&&this._updateCoveredAndRetainedTiles(it,se,qe,ee,Q,B);for(let Ot in it)this._tiles[Ot].clearFadeHold();let yt=a.ab(this._tiles,it);for(let Ot of yt){let Nt=this._tiles[Ot];Nt.hasSymbolBuckets&&!Nt.holdingForFade()?Nt.setHoldDuration(this.map._fadeDuration):Nt.hasSymbolBuckets&&!Nt.symbolFadeFinished()||this._removeTile(Ot)}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={},se={},qe=Math.max(B-dt.maxOverzooming,this._source.minzoom),je=Math.max(B+dt.maxUnderzooming,this._source.minzoom),it={};for(let yt of w){let Ot=this._addTile(yt);ee[yt.key]=yt,Ot.hasData()||Bthis._source.maxzoom){let hr=yt.children(this._source.maxzoom)[0],Sr=this.getTile(hr);if(Sr&&Sr.hasData()){ee[hr.key]=hr;continue}}else{let hr=yt.children(this._source.maxzoom);if(ee[hr[0].key]&&ee[hr[1].key]&&ee[hr[2].key]&&ee[hr[3].key])continue}let Nt=Ot.wasRequested();for(let hr=yt.overscaledZ-1;hr>=qe;--hr){let Sr=yt.scaledTo(hr);if(se[Sr.key])break;if(se[Sr.key]=!0,Ot=this.getTile(Sr),!Ot&&Nt&&(Ot=this._addTile(Sr)),Ot){let he=Ot.hasData();if((he||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Nt)&&(ee[Sr.key]=Sr),Nt=Ot.wasRequested(),he)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 se=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(se),Q)break;ee=se}for(let se of B)this._loadedParentTiles[se]=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 Lt(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=[],se=this.transform;if(!se)return ee;let qe=Q?se.getCameraQueryGeometry(w):w,je=w.map(he=>se.pointCoordinate(he,this.terrain)),it=qe.map(he=>se.pointCoordinate(he,this.terrain)),yt=this.getIds(),Ot=1/0,Nt=1/0,hr=-1/0,Sr=-1/0;for(let he of it)Ot=Math.min(Ot,he.x),Nt=Math.min(Nt,he.y),hr=Math.max(hr,he.x),Sr=Math.max(Sr,he.y);for(let he=0;he=0&&He[1].y+Je>=0){let et=je.map(Rt=>Pe.getTilePoint(Rt)),Mt=it.map(Rt=>Pe.getTilePoint(Rt));ee.push({tile:be,tileID:Pe,queryGeometry:et,cameraQueryGeometry:Mt,scale:Oe})}}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($t(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 Ht(le,w){let B=Math.abs(2*le.wrap)-+(le.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return le.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-le.canonical.y||w.canonical.x-le.canonical.x}function $t(le){return le==="raster"||le==="image"||le==="video"}dt.maxOverzooming=10,dt.maxUnderzooming=3;class fr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-qe)/je:0;return this.points[se].mult(1-it).add(this.points[B].mult(it))}}function _r(le,w){let B=!0;return le==="always"||le!=="never"&&w!=="never"||(B=!1),B}class Br{constructor(w,B,Q){let ee=this.boxCells=[],se=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 it=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(se)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let yt=0;yt0}hitTestCircle(w,B,Q,ee,se){let qe=w-Q,je=w+Q,it=B-Q,yt=B+Q;if(je<0||qe>this.width||yt<0||it>this.height)return!1;let Ot=[];return this._forEachCell(qe,it,je,yt,this._queryCellCircle,Ot,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},se),Ot.length>0}_queryCell(w,B,Q,ee,se,qe,je,it){let{seenUids:yt,hitTest:Ot,overlapMode:Nt}=je,hr=this.boxCells[se];if(hr!==null){let he=this.bboxes;for(let be of hr)if(!yt.box[be]){yt.box[be]=!0;let Pe=4*be,Oe=this.boxKeys[be];if(w<=he[Pe+2]&&B<=he[Pe+3]&&Q>=he[Pe+0]&&ee>=he[Pe+1]&&(!it||it(Oe))&&(!Ot||!_r(Nt,Oe.overlapMode))&&(qe.push({key:Oe,x1:he[Pe],y1:he[Pe+1],x2:he[Pe+2],y2:he[Pe+3]}),Ot))return!0}}let Sr=this.circleCells[se];if(Sr!==null){let he=this.circles;for(let be of Sr)if(!yt.circle[be]){yt.circle[be]=!0;let Pe=3*be,Oe=this.circleKeys[be];if(this._circleAndRectCollide(he[Pe],he[Pe+1],he[Pe+2],w,B,Q,ee)&&(!it||it(Oe))&&(!Ot||!_r(Nt,Oe.overlapMode))){let Je=he[Pe],He=he[Pe+1],et=he[Pe+2];if(qe.push({key:Oe,x1:Je-et,y1:He-et,x2:Je+et,y2:He+et}),Ot)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,se,qe,je,it){let{circle:yt,seenUids:Ot,overlapMode:Nt}=je,hr=this.boxCells[se];if(hr!==null){let he=this.bboxes;for(let be of hr)if(!Ot.box[be]){Ot.box[be]=!0;let Pe=4*be,Oe=this.boxKeys[be];if(this._circleAndRectCollide(yt.x,yt.y,yt.radius,he[Pe+0],he[Pe+1],he[Pe+2],he[Pe+3])&&(!it||it(Oe))&&!_r(Nt,Oe.overlapMode))return qe.push(!0),!0}}let Sr=this.circleCells[se];if(Sr!==null){let he=this.circles;for(let be of Sr)if(!Ot.circle[be]){Ot.circle[be]=!0;let Pe=3*be,Oe=this.circleKeys[be];if(this._circlesCollide(he[Pe],he[Pe+1],he[Pe+2],yt.x,yt.y,yt.radius)&&(!it||it(Oe))&&!_r(Nt,Oe.overlapMode))return qe.push(!0),!0}}}_forEachCell(w,B,Q,ee,se,qe,je,it){let yt=this._convertToXCellCoord(w),Ot=this._convertToYCellCoord(B),Nt=this._convertToXCellCoord(Q),hr=this._convertToYCellCoord(ee);for(let Sr=yt;Sr<=Nt;Sr++)for(let he=Ot;he<=hr;he++)if(se.call(this,w,B,Q,ee,this.xCellCount*he+Sr,qe,je,it))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,se,qe){let je=ee-w,it=se-B,yt=Q+qe;return yt*yt>je*je+it*it}_circleAndRectCollide(w,B,Q,ee,se,qe,je){let it=(qe-ee)/2,yt=Math.abs(w-(ee+it));if(yt>it+Q)return!1;let Ot=(je-se)/2,Nt=Math.abs(B-(se+Ot));if(Nt>Ot+Q)return!1;if(yt<=it||Nt<=Ot)return!0;let hr=yt-it,Sr=Nt-Ot;return hr*hr+Sr*Sr<=Q*Q}}function Or(le,w,B,Q,ee){let se=a.H();return w?(a.K(se,se,[1/ee,1/ee,1]),B||a.ad(se,se,Q.angle)):a.L(se,Q.labelPlaneMatrix,le),se}function Nr(le,w,B,Q,ee){if(w){let se=a.ae(le);return a.K(se,se,[ee,ee,1]),B||a.ad(se,se,-Q.angle),se}return Q.glCoordMatrix}function ut(le,w,B,Q){let ee;Q?(ee=[le,w,Q(le,w),1],a.af(ee,ee,B)):(ee=[le,w,0,1],jr(ee,ee,B));let se=ee[3];return{point:new a.P(ee[0]/se,ee[1]/se),signedDistanceFromCamera:se,isOccluded:!1}}function Ne(le,w){return .5+le/w*.5}function Ye(le,w){return le.x>=-w[0]&&le.x<=w[0]&&le.y>=-w[1]&&le.y<=w[1]}function Ve(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he){let be=Q?le.textSizeData:le.iconSizeData,Pe=a.ag(be,B.transform.zoom),Oe=[256/B.width*2+1,256/B.height*2+1],Je=Q?le.text.dynamicLayoutVertexArray:le.icon.dynamicLayoutVertexArray;Je.clear();let He=le.lineVertexArray,et=Q?le.text.placedSymbolArray:le.icon.placedSymbolArray,Mt=B.transform.width/B.transform.height,Rt=!1;for(let Ut=0;UtMath.abs(B.x-w.x)*Q?{useVertical:!0}:(le===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function Le(le,w,B,Q,ee,se,qe,je,it,yt,Ot){let Nt=B/24,hr=w.lineOffsetX*Nt,Sr=w.lineOffsetY*Nt,he;if(w.numGlyphs>1){let be=w.glyphStartIndex+w.numGlyphs,Pe=w.lineStartIndex,Oe=w.lineStartIndex+w.lineLength,Je=Xe(Nt,je,hr,Sr,Q,w,Ot,le);if(!Je)return{notEnoughRoom:!0};let He=ut(Je.first.point.x,Je.first.point.y,qe,le.getElevation).point,et=ut(Je.last.point.x,Je.last.point.y,qe,le.getElevation).point;if(ee&&!Q){let Mt=ht(w.writingMode,He,et,yt);if(Mt)return Mt}he=[Je.first];for(let Mt=w.glyphStartIndex+1;Mt0?He.point:function(Rt,Ut,tr,mr,Dr,zr){return xe(Rt,Ut,tr,1,Dr,zr)}(le.tileAnchorPoint,Je,Pe,0,se,le),Mt=ht(w.writingMode,Pe,et,yt);if(Mt)return Mt}let be=ar(Nt*je.getoffsetX(w.glyphStartIndex),hr,Sr,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,le,Ot);if(!be||le.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};he=[be]}for(let be of he)a.aj(it,be.point,be.angle);return{}}function xe(le,w,B,Q,ee,se){let qe=le.add(le.sub(w)._unit()),je=ee!==void 0?ut(qe.x,qe.y,ee,se.getElevation).point:lt(qe.x,qe.y,se).point,it=B.sub(je);return B.add(it._mult(Q/it.mag()))}function Se(le,w,B){let Q=w.projectionCache;if(Q.projections[le])return Q.projections[le];let ee=new a.P(w.lineVertexArray.getx(le),w.lineVertexArray.gety(le)),se=lt(ee.x,ee.y,w);if(se.signedDistanceFromCamera>0)return Q.projections[le]=se.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||se.isOccluded,se.point;let qe=le-B.direction;return function(je,it,yt,Ot,Nt){return xe(je,it,yt,Ot,void 0,Nt)}(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 lt(le,w,B){let Q=le+B.translation[0],ee=w+B.translation[1],se;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(se=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),se.point.x=(.5*se.point.x+.5)*B.width,se.point.y=(.5*-se.point.y+.5)*B.height):(se=ut(Q,ee,B.labelPlaneMatrix,B.getElevation),se.isOccluded=!1),se}function Gt(le,w,B){return le._unit()._perp()._mult(w*B)}function Vt(le,w,B,Q,ee,se,qe,je,it){if(je.projectionCache.offsets[le])return je.projectionCache.offsets[le];let yt=B.add(w);if(le+it.direction=ee)return je.projectionCache.offsets[le]=yt,yt;let Ot=Se(le+it.direction,je,it),Nt=Gt(Ot.sub(B),qe,it.direction),hr=B.add(Nt),Sr=Ot.add(Nt);return je.projectionCache.offsets[le]=a.ak(se,yt,hr,Sr)||yt,je.projectionCache.offsets[le]}function ar(le,w,B,Q,ee,se,qe,je,it){let yt=Q?le-w:le+w,Ot=yt>0?1:-1,Nt=0;Q&&(Ot*=-1,Nt=Math.PI),Ot<0&&(Nt+=Math.PI);let hr,Sr=Ot>0?se+ee:se+ee+1;je.projectionCache.cachedAnchorPoint?hr=je.projectionCache.cachedAnchorPoint:(hr=lt(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=hr);let he,be,Pe=hr,Oe=hr,Je=0,He=0,et=Math.abs(yt),Mt=[],Rt;for(;Je+He<=et;){if(Sr+=Ot,Sr=qe)return null;Je+=He,Oe=Pe,be=he;let mr={absOffsetX:et,direction:Ot,distanceFromAnchor:Je,previousVertex:Oe};if(Pe=Se(Sr,je,mr),B===0)Mt.push(Oe),Rt=Pe.sub(Oe);else{let Dr,zr=Pe.sub(Oe);Dr=zr.mag()===0?Gt(Se(Sr+Ot,je,mr).sub(Pe),B,Ot):Gt(zr,B,Ot),be||(be=Oe.add(Dr)),he=Vt(Sr,Dr,Pe,se,qe,be,B,je,mr),Mt.push(be),Rt=he.sub(be)}He=Rt.mag()}let Ut=Rt._mult((et-Je)/He)._add(be||Oe),tr=Nt+Math.atan2(Pe.y-Oe.y,Pe.x-Oe.x);return Mt.push(Ut),{point:Ut,angle:it?tr:0,path:Mt}}let Qr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ai(le,w){for(let B=0;B=1;ea--)Qi.push(Li.path[ea]);for(let ea=1;eaGa.signedDistanceFromCamera<=0)?[]:ea.map(Ga=>Ga.point)}let pa=[];if(Qi.length>0){let ea=Qi[0].clone(),Ga=Qi[0].clone();for(let To=1;To=zr.x&&Ga.x<=Xr.x&&ea.y>=zr.y&&Ga.y<=Xr.y?[Qi]:Ga.xXr.x||Ga.yXr.y?[]:a.al([Qi],zr.x,zr.y,Xr.x,Xr.y)}for(let ea of pa){di.reset(ea,.25*Dr);let Ga=0;Ga=di.length<=.5*Dr?1:Math.ceil(di.paddedLength/Mn)+1;for(let To=0;Tout(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,se=-1/0,qe=-1/0;for(let Ot of w){let Nt=new a.P(Ot.x+ri,Ot.y+ri);Q=Math.min(Q,Nt.x),ee=Math.min(ee,Nt.y),se=Math.max(se,Nt.x),qe=Math.max(qe,Nt.y),B.push(Nt)}let je=this.grid.query(Q,ee,se,qe).concat(this.ignoredGrid.query(Q,ee,se,qe)),it={},yt={};for(let Ot of je){let Nt=Ot.key;if(it[Nt.bucketInstanceId]===void 0&&(it[Nt.bucketInstanceId]={}),it[Nt.bucketInstanceId][Nt.featureIndex])continue;let hr=[new a.P(Ot.x1,Ot.y1),new a.P(Ot.x2,Ot.y1),new a.P(Ot.x2,Ot.y2),new a.P(Ot.x1,Ot.y2)];a.am(B,hr)&&(it[Nt.bucketInstanceId][Nt.featureIndex]=!0,yt[Nt.bucketInstanceId]===void 0&&(yt[Nt.bucketInstanceId]=[]),yt[Nt.bucketInstanceId].push(Nt.featureIndex))}return yt}insertCollisionBox(w,B,Q,ee,se,qe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:se,collisionGroupID:qe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,se,qe){let je=Q?this.ignoredGrid:this.grid,it={bucketInstanceId:ee,featureIndex:se,collisionGroupID:qe,overlapMode:B};for(let yt=0;yt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,Dr.x,Dr.y,ee,yt));tr=mr.some(Dr=>!Dr.isOccluded),Ut=mr.map(Dr=>Dr.point)}else tr=!0;return{box:a.ao(Ut),allPointsOccluded:!tr}}}function nn(le,w,B){return w*(a.X/(le.tileSize*Math.pow(2,B-le.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 Ni{constructor(w,B,Q,ee,se){this.text=new Wi(w?w.text:null,B,Q,se),this.icon=new Wi(w?w.icon:null,B,ee,se)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class _n{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class $i{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class zn{constructor(w,B,Q,ee,se){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=se}}class Wn{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 It(le,w,B,Q,ee){let{horizontalAlign:se,verticalAlign:qe}=a.au(le);return new a.P(-(se-.5)*w+Q[0]*ee,-(qe-.5)*B+Q[1]*ee)}class ft{constructor(w,B,Q,ee,se,qe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new bi(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Wn(se),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 se=Q.getBucket(B),qe=Q.latestFeatureIndex;if(!se||!qe||B.id!==se.layerIds[0])return;let je=Q.collisionBoxArray,it=se.layers[0].layout,yt=se.layers[0].paint,Ot=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Nt=Q.tileSize/a.X,hr=Q.tileID.toUnwrapped(),Sr=this.transform.calculatePosMatrix(hr),he=it.get("text-pitch-alignment")==="map",be=it.get("text-rotation-alignment")==="map",Pe=nn(Q,1,this.transform.zoom),Oe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,yt.get("text-translate"),yt.get("text-translate-anchor")),Je=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,yt.get("icon-translate"),yt.get("icon-translate-anchor")),He=Or(Sr,he,be,this.transform,Pe),et=null;if(he){let Rt=Nr(Sr,he,be,this.transform,Pe);et=a.L([],this.transform.labelPlaneMatrix,Rt)}this.retainedQueryData[se.bucketInstanceId]=new zn(se.bucketInstanceId,qe,se.sourceLayerIndex,se.index,Q.tileID);let Mt={bucket:se,layout:it,translationText:Oe,translationIcon:Je,posMatrix:Sr,unwrappedTileID:hr,textLabelPlaneMatrix:He,labelToScreenMatrix:et,scale:Ot,textPixelRatio:Nt,holdingForFade:Q.holdingForFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:a.ag(se.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(se.sourceID)};if(ee)for(let Rt of se.sortKeyRanges){let{sortKey:Ut,symbolInstanceStart:tr,symbolInstanceEnd:mr}=Rt;w.push({sortKey:Ut,symbolInstanceStart:tr,symbolInstanceEnd:mr,parameters:Mt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:se.symbolInstances.length,parameters:Mt})}attemptAnchorPlacement(w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he,be,Pe,Oe,Je,He){let et=a.aq[w.textAnchor],Mt=[w.textOffset0,w.textOffset1],Rt=It(et,Q,ee,Mt,se),Ut=this.collisionIndex.placeCollisionBox(B,hr,it,yt,Ot,je,qe,Pe,Nt.predicate,He,Rt);if((!Je||this.collisionIndex.placeCollisionBox(Je,hr,it,yt,Ot,je,qe,Oe,Nt.predicate,He,Rt).placeable)&&Ut.placeable){let tr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Sr.crossTileID]&&this.prevPlacement.placements[Sr.crossTileID]&&this.prevPlacement.placements[Sr.crossTileID].text&&(tr=this.prevPlacement.variableOffsets[Sr.crossTileID].anchor),Sr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Sr.crossTileID]={textOffset:Mt,width:Q,height:ee,anchor:et,textBoxScale:se,prevAnchor:tr},this.markUsedJustification(he,et,Sr,be),he.allowVerticalPlacement&&(this.markUsedOrientation(he,be,Sr),this.placedOrientations[Sr.crossTileID]=be),{shift:Rt,placedGlyphBoxes:Ut}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:se,translationText:qe,translationIcon:je,posMatrix:it,unwrappedTileID:yt,textLabelPlaneMatrix:Ot,labelToScreenMatrix:Nt,textPixelRatio:hr,holdingForFade:Sr,collisionBoxArray:he,partiallyEvaluatedTextSize:be,collisionGroup:Pe}=w.parameters,Oe=se.get("text-optional"),Je=se.get("icon-optional"),He=a.ar(se,"text-overlap","text-allow-overlap"),et=He==="always",Mt=a.ar(se,"icon-overlap","icon-allow-overlap"),Rt=Mt==="always",Ut=se.get("text-rotation-alignment")==="map",tr=se.get("text-pitch-alignment")==="map",mr=se.get("icon-text-fit")!=="none",Dr=se.get("symbol-z-order")==="viewport-y",zr=et&&(Rt||!ee.hasIconData()||Je),Xr=Rt&&(et||!ee.hasTextData()||Oe);!ee.collisionArrays&&he&&ee.deserializeCollisionBoxes(he);let di=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),Li=(Ci,Qi,Mn)=>{var pa,ea;if(B[Ci.crossTileID])return;if(Sr)return void(this.placements[Ci.crossTileID]=new _n(!1,!1,!1));let Ga=!1,To=!1,Wa=!0,co=null,Do={box:null,placeable:!1,offscreen:null},Rs={box:null,placeable:!1,offscreen:null},As=null,yo=null,po=null,_l=0,Vl=0,Xu=0;Qi.textFeatureIndex?_l=Qi.textFeatureIndex:Ci.useRuntimeCollisionCircles&&(_l=Ci.featureIndex),Qi.verticalTextFeatureIndex&&(Vl=Qi.verticalTextFeatureIndex);let cu=Qi.textBox;if(cu){let Rl=we=>{let Be=a.ah.horizontal;if(ee.allowVerticalPlacement&&!we&&this.prevPlacement){let Ue=this.prevPlacement.placedOrientations[Ci.crossTileID];Ue&&(this.placedOrientations[Ci.crossTileID]=Ue,Be=Ue,this.markUsedOrientation(ee,Be,Ci))}return Be},zl=(we,Be)=>{if(ee.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Qi.verticalTextBox){for(let Ue of ee.writingModes)if(Ue===a.ah.vertical?(Do=Be(),Rs=Do):Do=we(),Do&&Do.placeable)break}else Do=we()},Z=Ci.textAnchorOffsetStartIndex,oe=Ci.textAnchorOffsetEndIndex;if(oe===Z){let we=(Be,Ue)=>{let We=this.collisionIndex.placeCollisionBox(Be,He,hr,it,yt,tr,Ut,qe,Pe.predicate,di);return We&&We.placeable&&(this.markUsedOrientation(ee,Ue,Ci),this.placedOrientations[Ci.crossTileID]=Ue),We};zl(()=>we(cu,a.ah.horizontal),()=>{let Be=Qi.verticalTextBox;return ee.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Be?we(Be,a.ah.vertical):{box:null,offscreen:null}}),Rl(Do&&Do.placeable)}else{let we=a.aq[(ea=(pa=this.prevPlacement)===null||pa===void 0?void 0:pa.variableOffsets[Ci.crossTileID])===null||ea===void 0?void 0:ea.anchor],Be=(We,wt,tt)=>{let zt=We.x2-We.x1,or=We.y2-We.y1,lr=Ci.textBoxScale,Rr=mr&&Mt==="never"?wt:null,Ir=null,oi=He==="never"?1:2,ui="never";we&&oi++;for(let qr=0;qrBe(cu,Qi.iconBox,a.ah.horizontal),()=>{let We=Qi.verticalTextBox;return ee.allowVerticalPlacement&&(!Do||!Do.placeable)&&Ci.numVerticalGlyphVertices>0&&We?Be(We,Qi.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Do&&(Ga=Do.placeable,Wa=Do.offscreen);let Ue=Rl(Do&&Do.placeable);if(!Ga&&this.prevPlacement){let We=this.prevPlacement.variableOffsets[Ci.crossTileID];We&&(this.variableOffsets[Ci.crossTileID]=We,this.markUsedJustification(ee,We.anchor,Ci,Ue))}}}if(As=Do,Ga=As&&As.placeable,Wa=As&&As.offscreen,Ci.useRuntimeCollisionCircles){let Rl=ee.text.placedSymbolArray.get(Ci.centerJustifiedTextSymbolIndex),zl=a.ai(ee.textSizeData,be,Rl),Z=se.get("text-padding");yo=this.collisionIndex.placeCollisionCircles(He,Rl,ee.lineVertexArray,ee.glyphOffsetArray,zl,it,yt,Ot,Nt,Q,tr,Pe.predicate,Ci.collisionCircleDiameter,Z,qe,di),yo.circles.length&&yo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),Ga=et||yo.circles.length>0&&!yo.collisionDetected,Wa=Wa&&yo.offscreen}if(Qi.iconFeatureIndex&&(Xu=Qi.iconFeatureIndex),Qi.iconBox){let Rl=zl=>this.collisionIndex.placeCollisionBox(zl,Mt,hr,it,yt,tr,Ut,je,Pe.predicate,di,mr&&co?co:void 0);Rs&&Rs.placeable&&Qi.verticalIconBox?(po=Rl(Qi.verticalIconBox),To=po.placeable):(po=Rl(Qi.iconBox),To=po.placeable),Wa=Wa&&po.offscreen}let el=Oe||Ci.numHorizontalGlyphVertices===0&&Ci.numVerticalGlyphVertices===0,nu=Je||Ci.numIconVertices===0;el||nu?nu?el||(To=To&&Ga):Ga=To&&Ga:To=Ga=To&&Ga;let zc=To&&po.placeable;if(Ga&&As.placeable&&this.collisionIndex.insertCollisionBox(As.box,He,se.get("text-ignore-placement"),ee.bucketInstanceId,Rs&&Rs.placeable&&Vl?Vl:_l,Pe.ID),zc&&this.collisionIndex.insertCollisionBox(po.box,Mt,se.get("icon-ignore-placement"),ee.bucketInstanceId,Xu,Pe.ID),yo&&Ga&&this.collisionIndex.insertCollisionCircles(yo.circles,He,se.get("text-ignore-placement"),ee.bucketInstanceId,_l,Pe.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Mn,Qi,As,po,yo),Ci.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[Ci.crossTileID]=new _n(Ga||zr,To||Xr,Wa||ee.justReloaded),B[Ci.crossTileID]=!0};if(Dr){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Ci=ee.getSortedSymbolIndexes(this.transform.angle);for(let Qi=Ci.length-1;Qi>=0;--Qi){let Mn=Ci[Qi];Li(ee.symbolInstances.get(Mn),ee.collisionArrays[Mn],Mn)}}else for(let Ci=w.symbolInstanceStart;Ci=0&&(w.text.placedSymbolArray.get(je).crossTileID=se>=0&&je!==se?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,se=B===a.ah.vertical?B:0,qe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let je of qe)w.text.placedSymbolArray.get(je).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=se)}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,se=B?B.opacities:{},qe=B?B.variableOffsets:{},je=B?B.placedOrientations:{};for(let it in this.placements){let yt=this.placements[it],Ot=se[it];Ot?(this.opacities[it]=new Ni(Ot,ee,yt.text,yt.icon),Q=Q||yt.text!==Ot.text.placed||yt.icon!==Ot.icon.placed):(this.opacities[it]=new Ni(null,ee,yt.text,yt.icon,yt.skipFade),Q=Q||yt.text||yt.icon)}for(let it in se){let yt=se[it];if(!this.opacities[it]){let Ot=new Ni(yt,ee,!1,!1);Ot.isHidden()||(this.opacities[it]=Ot,Q=Q||yt.text.placed||yt.icon.placed)}}for(let it in qe)this.variableOffsets[it]||!this.opacities[it]||this.opacities[it].isHidden()||(this.variableOffsets[it]=qe[it]);for(let it in je)this.placedOrientations[it]||!this.opacities[it]||this.opacities[it].isHidden()||(this.placedOrientations[it]=je[it]);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 se=ee.getBucket(w);se&&ee.latestFeatureIndex&&w.id===se.layerIds[0]&&this.updateBucketOpacities(se,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 se=w.layers[0],qe=se.layout,je=new Ni(null,0,!1,!1,!0),it=qe.get("text-allow-overlap"),yt=qe.get("icon-allow-overlap"),Ot=se._unevaluatedLayout.hasValue("text-variable-anchor")||se._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Nt=qe.get("text-rotation-alignment")==="map",hr=qe.get("text-pitch-alignment")==="map",Sr=qe.get("icon-text-fit")!=="none",he=new Ni(null,0,it&&(yt||!w.hasIconData()||qe.get("icon-optional")),yt&&(it||!w.hasTextData()||qe.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let be=(Oe,Je,He)=>{for(let et=0;et0,tr=this.placedOrientations[Je.crossTileID],mr=tr===a.ah.vertical,Dr=tr===a.ah.horizontal||tr===a.ah.horizontalOnly;if(He>0||et>0){let Xr=Mi(Rt.text);be(w.text,He,mr?Pi:Xr),be(w.text,et,Dr?Pi:Xr);let di=Rt.text.isHidden();[Je.rightJustifiedTextSymbolIndex,Je.centerJustifiedTextSymbolIndex,Je.leftJustifiedTextSymbolIndex].forEach(Qi=>{Qi>=0&&(w.text.placedSymbolArray.get(Qi).hidden=di||mr?1:0)}),Je.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(Je.verticalPlacedTextSymbolIndex).hidden=di||Dr?1:0);let Li=this.variableOffsets[Je.crossTileID];Li&&this.markUsedJustification(w,Li.anchor,Je,tr);let Ci=this.placedOrientations[Je.crossTileID];Ci&&(this.markUsedJustification(w,"left",Je,Ci),this.markUsedOrientation(w,Ci,Je))}if(Ut){let Xr=Mi(Rt.icon),di=!(Sr&&Je.verticalPlacedIconSymbolIndex&&mr);Je.placedIconSymbolIndex>=0&&(be(w.icon,Je.numIconVertices,di?Xr:Pi),w.icon.placedSymbolArray.get(Je.placedIconSymbolIndex).hidden=Rt.icon.isHidden()),Je.verticalPlacedIconSymbolIndex>=0&&(be(w.icon,Je.numVerticalIconVertices,di?Pi:Xr),w.icon.placedSymbolArray.get(Je.verticalPlacedIconSymbolIndex).hidden=Rt.icon.isHidden())}let zr=Pe&&Pe.has(Oe)?Pe.get(Oe):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let Xr=w.collisionArrays[Oe];if(Xr){let di=new a.P(0,0);if(Xr.textBox||Xr.verticalTextBox){let Li=!0;if(Ot){let Ci=this.variableOffsets[Mt];Ci?(di=It(Ci.anchor,Ci.width,Ci.height,Ci.textOffset,Ci.textBoxScale),Nt&&di._rotate(hr?this.transform.angle:-this.transform.angle)):Li=!1}if(Xr.textBox||Xr.verticalTextBox){let Ci;Xr.textBox&&(Ci=mr),Xr.verticalTextBox&&(Ci=Dr),jt(w.textCollisionBox.collisionVertexArray,Rt.text.placed,!Li||Ci,zr.text,di.x,di.y)}}if(Xr.iconBox||Xr.verticalIconBox){let Li=!!(!Dr&&Xr.verticalIconBox),Ci;Xr.iconBox&&(Ci=Li),Xr.verticalIconBox&&(Ci=!Li),jt(w.iconCollisionBox.collisionVertexArray,Rt.icon.placed,Ci,zr.icon,Sr?di.x:0,Sr?di.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 Oe=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=Oe.invProjMatrix,w.placementViewportMatrix=Oe.viewportMatrix,w.collisionCircleArray=Oe.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 jt(le,w,B,Q,ee,se){Q&&Q.length!==0||(Q=[0,0,0,0]);let qe=Q[0]-ri,je=Q[1]-ri,it=Q[2]-ri,yt=Q[3]-ri;le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,qe,je),le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,it,je),le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,it,yt),le.emplaceBack(w?1:0,B?1:0,ee||0,se||0,qe,yt)}let Zt=Math.pow(2,25),yr=Math.pow(2,24),Fr=Math.pow(2,17),Zr=Math.pow(2,16),Vr=Math.pow(2,9),gi=Math.pow(2,8),Si=Math.pow(2,1);function Mi(le){if(le.opacity===0&&!le.placed)return 0;if(le.opacity===1&&le.placed)return 4294967295;let w=le.placed?1:0,B=Math.floor(127*le.opacity);return B*Zt+w*yr+B*Fr+w*Zr+B*Vr+w*gi+B*Si+w}let Pi=0;function Gi(){return{isOccluded:(le,w,B)=>!1,getPitchedTextCorrection:(le,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(le,w,B,Q){throw new Error("Not implemented.")},translatePosition:(le,w,B,Q)=>function(ee,se,qe,je,it=!1){if(!qe[0]&&!qe[1])return[0,0];let yt=it?je==="map"?ee.angle:0:je==="viewport"?-ee.angle:0;if(yt){let Ot=Math.sin(yt),Nt=Math.cos(yt);qe=[qe[0]*Nt-qe[1]*Ot,qe[0]*Ot+qe[1]*Nt]}return[it?qe[0]:nn(se,qe[0],ee.zoom),it?qe[1]:nn(se,qe[1],ee.zoom)]}(le,w,B,Q),getCircleRadiusCorrection:le=>1}}class Ki{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,se){let qe=this._bucketParts;for(;this._currentTileIndexje.sortKey-it.sortKey));this._currentPartIndex!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let qe=B[w[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(qe.type==="symbol"&&(!qe.minzoom||qe.minzoom<=je)&&(!qe.maxzoom||qe.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new Ki(qe)),this._inProgressLayer.continuePlacement(Q[qe.source],this.placement,this._showCollisionBoxes,qe,se))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let jn=512/a.X/2;class la{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let se=0;se({x:Math.floor(it.anchorX*jn),y:Math.floor(it.anchorY*jn)})),crossTileIDs:qe.map(it=>it.crossTileID)};if(je.positions.length>128){let it=new a.av(je.positions.length,16,Uint16Array);for(let{x:yt,y:Ot}of je.positions)it.add(yt,Ot);it.finish(),delete je.positions,je.index=it}this._symbolsByKey[se]=je}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:se}=this.tileID.canonical,{x:qe,y:je,z:it}=B.canonical,yt=jn/Math.pow(2,it-se),Ot=(je*a.X+w.anchorY)*yt,Nt=ee*a.X*jn;return{x:Math.floor((qe*a.X+w.anchorX)*yt-Q*a.X*jn),y:Math.floor(Ot-Nt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class Fa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Da{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],se={};for(let qe in ee){let je=ee[qe];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+B),se[je.tileID.key]=je}this.indexes[Q]=se}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 se=0;sew.overscaledZ)for(let je in qe){let it=qe[je];it.tileID.isChildOf(w)&&it.findMatches(B.symbolInstances,w,ee)}else{let je=qe[w.scaledTo(Number(se)).key];je&&je.findMatches(B.symbolInstances,w,ee)}}for(let se=0;se{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let oa=(le,w)=>a.t(le,w&&w.filter(B=>B.identifier!=="source.canvas")),Sn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(Te(),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 H(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new ae(256,512),this.crossTileSymbolIndex=new jo,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()),bt().on(er,this._rtlPluginLoaded),this.on("data",Q=>{if(Q.dataType!=="source"||Q.sourceDataType!=="metadata")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let se=ee.getSource();if(se&&se.vectorLayerIds)for(let qe in this._layers){let je=this._layers[qe];je.source===se.id&&this._validateLayer(je)}})}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 se=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(qe=>{this._loadStyleRequest=null,this._load(qe.data,B,Q)}).catch(qe=>{this._loadStyleRequest=null,qe&&!se.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(Sn,{validate:!1})}_load(w,B,Q){var ee;let se=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!oa(this,a.u(se))){this._loaded=!0,this.stylesheet=se;for(let qe in se.sources)this.addSource(qe,se.sources[qe],{validate:!1});se.sprite?this._loadSprite(se.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(se.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(se,qe,je,it){return a._(this,void 0,void 0,function*(){let yt=C(se),Ot=je>1?"@2x":"",Nt={},hr={};for(let{id:Sr,url:he}of yt){let be=qe.transformRequest(M(he,Ot,".json"),"SpriteJSON");Nt[Sr]=a.h(be,it);let Pe=qe.transformRequest(M(he,Ot,".png"),"SpriteImage");hr[Sr]=g.getImage(Pe,it)}return yield Promise.all([...Object.values(Nt),...Object.values(hr)]),function(Sr,he){return a._(this,void 0,void 0,function*(){let be={};for(let Pe in Sr){be[Pe]={};let Oe=u.getImageCanvasContext((yield he[Pe]).data),Je=(yield Sr[Pe]).data;for(let He in Je){let{width:et,height:Mt,x:Rt,y:Ut,sdf:tr,pixelRatio:mr,stretchX:Dr,stretchY:zr,content:Xr,textFitWidth:di,textFitHeight:Li}=Je[He];be[Pe][He]={data:null,pixelRatio:mr,sdf:tr,stretchX:Dr,stretchY:zr,content:Xr,textFitWidth:di,textFitHeight:Li,spriteData:{width:et,height:Mt,x:Rt,y:Ut,context:Oe}}}}return be})}(Nt,hr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(se=>{if(this._spriteRequest=null,se)for(let qe in se){this._spritesImagesIds[qe]=[];let je=this._spritesImagesIds[qe]?this._spritesImagesIds[qe].filter(it=>!(it in se)):[];for(let it of je)this.imageManager.removeImage(it),this._changedImages[it]=!0;for(let it in se[qe]){let yt=qe==="default"?it:`${qe}:${it}`;this._spritesImagesIds[qe].push(yt),yt in this.imageManager.images?this.imageManager.updateImage(yt,se[qe][it],!1):this.imageManager.addImage(yt,se[qe][it]),B&&(this._changedImages[yt]=!0)}}}).catch(se=>{this._spriteRequest=null,ee=se,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 se of w)if(Q[se]){let qe=B?a.aB(Q[se]):Q[se];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),se=Object.keys(this._removedLayers);(ee.length||se.length)&&this._updateWorkerLayers(ee,se);for(let qe in this._updatedSources){let je=this._updatedSources[qe];if(je==="reload")this._reloadSource(qe);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);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 se=this.sourceCaches[ee];Q[ee]=se.used,se.used=!1}for(let ee of this._order){let se=this._layers[ee];se.recalculate(w,this._availableImages),!se.isHidden(w.zoom)&&se.source&&(this.sourceCaches[se.source].used=!0)}for(let ee in Q){let se=this.sourceCaches[ee];!!Q[ee]!=!!se.used&&se.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)&&oa(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let se=a.aC(ee,w),qe=this._getOperationsToPerform(se);if(qe.unimplemented.length>0)throw new Error(`Unimplemented: ${qe.unimplemented.join(", ")}.`);if(qe.operations.length===0)return!1;for(let je of qe.operations)je();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 dt(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 se;if(w.type==="custom"){if(oa(this,a.aD(w)))return;se=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;se=a.aA(w),this._validateLayer(se),se.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]=se,this._removedLayers[ee]&&se.source&&se.type!=="custom"){let je=this._removedLayers[ee];delete this._removedLayers[ee],je.type!==se.type?this._updatedSources[se.source]="clear":(this._updatedSources[se.source]="reload",this.sourceCaches[se.source].pause())}this._updateLayer(se),se.onAdd&&se.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 se=this.getLayer(w);se?a.aE(se.getLayoutProperty(B),Q)||(se.setLayoutProperty(B,Q,ee),this._updateLayer(se)):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 se=this.getLayer(w);se?a.aE(se.getPaintProperty(B),Q)||(se.setPaintProperty(B,Q,ee)&&this._updateLayer(se),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,se=this.sourceCaches[Q];if(se===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let qe=se.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."))),se.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 se=ee.getSource().type,qe=se==="vector"?w.sourceLayer:void 0;se!=="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,se=>se.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},se=>se!==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 je=this._order[qe];if(B(je)){Q[je]=qe;for(let it of w){let yt=it[je];if(yt)for(let Ot of yt)ee.push(Ot)}}}ee.sort((qe,je)=>je.intersectionZ-qe.intersectionZ);let se=[];for(let qe=this._order.length-1;qe>=0;qe--){let je=this._order[qe];if(B(je))for(let it=ee.length-1;it>=0;it--){let yt=ee[it].feature;if(Q[yt.layer.id]{let tr=Oe.featureSortOrder;if(tr){let mr=tr.indexOf(Rt.featureIndex);return tr.indexOf(Ut.featureIndex)-mr}return Ut.featureIndex-Rt.featureIndex});for(let Rt of Mt)et.push(Rt)}}for(let Oe in he)he[Oe].forEach(Je=>{let He=Je.feature,et=yt[je[Oe].source].getFeatureState(He.layer["source-layer"],He.id);He.source=He.layer.source,He.layer["source-layer"]&&(He.sourceLayer=He.layer["source-layer"]),He.state=et});return he}(this._layers,qe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(se)}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,se){let qe=ee.getRenderableIds().map(yt=>ee.getTileByID(yt)),je=[],it={};for(let yt=0;ythr.getTileByID(Sr)).sort((Sr,he)=>he.tileID.overscaledZ-Sr.tileID.overscaledZ||(Sr.tileID.isLessThan(he.tileID)?-1:1))}let Nt=this.crossTileSymbolIndex.addLayer(Ot,it[Ot.source],w.center.lng);qe=qe||Nt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((se=se||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new ka(w,this.map.terrain,this._order,se,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,it),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),je=!0),qe&&this.pauseablePlacement.placement.setStale()),je||qe)for(let yt of this._order){let Ot=this._layers[yt];Ot.type==="symbol"&&this.placement.updateLayerOpacities(Ot,it[Ot.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 se=[{id:w,url:B}],qe=[...C(this.stylesheet.sprite),...se];this._validate(a.u.sprite,"sprite",qe,null,Q)||(this.stylesheet.sprite=qe,this._loadSprite(se,!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 oo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let xn={prelude:_t(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3797,7 +3797,7 @@ uniform ${Ot} ${Nt} u_${hr}; #endif `}),staticAttributes:Q,staticUniforms:qe}}class br{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,se,qe,je,it,yt){this.context=w;let Ot=this.boundPaintVertexBuffers.length!==ee.length;for(let Nt=0;!Ot&&Nt({u_matrix:le,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 ti(le){let w=[];for(let B=0;B({u_depth:new a.aH(Rt,Ut.u_depth),u_terrain:new a.aH(Rt,Ut.u_terrain),u_terrain_dim:new a.aI(Rt,Ut.u_terrain_dim),u_terrain_matrix:new a.aJ(Rt,Ut.u_terrain_matrix),u_terrain_unpack:new a.aK(Rt,Ut.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Rt,Ut.u_terrain_exaggeration)}))(w,Mt),this.binderUniforms=Q?Q.getUniforms(w,Mt):[]}draw(w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he,be,Pe,Oe,Je){let He=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(se),w.setCullFace(qe),it){w.activeTexture.set(He.TEXTURE2),He.bindTexture(He.TEXTURE_2D,it.depthTexture),w.activeTexture.set(He.TEXTURE3),He.bindTexture(He.TEXTURE_2D,it.texture);for(let Mt in this.terrainUniforms)this.terrainUniforms[Mt].set(it[Mt])}for(let Mt in this.fixedUniforms)this.fixedUniforms[Mt].set(je[Mt]);be&&be.setUniforms(w,this.binderUniforms,Sr,{zoom:he});let et=0;switch(B){case He.LINES:et=2;break;case He.TRIANGLES:et=3;break;case He.LINE_STRIP:et=1}for(let Mt of hr.get()){let Rt=Mt.vaos||(Mt.vaos={});(Rt[yt]||(Rt[yt]=new br)).bind(w,this,Ot,be?be.getPaintVertexBuffers():[],Nt,Mt.vertexOffset,Pe,Oe,Je),He.drawElements(B,Mt.primitiveLength*et,He.UNSIGNED_SHORT,Mt.primitiveOffset*et*2)}}}function Yi(le,w,B){let Q=1/nn(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),se=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,qe=se*(B.tileID.canonical.x+B.tileID.wrap*ee),je=se*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,le.fromScale,le.toScale],u_fade:le.t,u_pixel_coord_upper:[qe>>16,je>>16],u_pixel_coord_lower:[65535&qe,65535&je]}}let an=(le,w,B,Q)=>{let ee=w.style.light,se=ee.properties.get("position"),qe=[se.x,se.y,se.z],je=function(){var yt=new a.A(9);return a.A!=Float32Array&&(yt[1]=0,yt[2]=0,yt[3]=0,yt[5]=0,yt[6]=0,yt[7]=0),yt[0]=1,yt[4]=1,yt[8]=1,yt}();ee.properties.get("anchor")==="viewport"&&function(yt,Ot){var Nt=Math.sin(Ot),hr=Math.cos(Ot);yt[0]=hr,yt[1]=Nt,yt[2]=0,yt[3]=-Nt,yt[4]=hr,yt[5]=0,yt[6]=0,yt[7]=0,yt[8]=1}(je,-w.transform.angle),function(yt,Ot,Nt){var hr=Ot[0],Sr=Ot[1],he=Ot[2];yt[0]=hr*Nt[0]+Sr*Nt[3]+he*Nt[6],yt[1]=hr*Nt[1]+Sr*Nt[4]+he*Nt[7],yt[2]=hr*Nt[2]+Sr*Nt[5]+he*Nt[8]}(qe,qe,je);let it=ee.properties.get("color");return{u_matrix:le,u_lightpos:qe,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[it.r,it.g,it.b],u_vertical_gradient:+B,u_opacity:Q}},hi=(le,w,B,Q,ee,se,qe)=>a.e(an(le,w,B,Q),Yi(se,w,qe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/qe.tileSize/8}),Ji=le=>({u_matrix:le}),ua=(le,w,B,Q)=>a.e(Ji(le),Yi(B,w,Q)),Fn=(le,w)=>({u_matrix:le,u_world:w}),Sa=(le,w,B,Q,ee)=>a.e(ua(le,w,B,Q),{u_world:ee}),go=(le,w,B,Q)=>{let ee=le.transform,se,qe;if(Q.paint.get("circle-pitch-alignment")==="map"){let je=nn(B,1,ee.zoom);se=!0,qe=[je,je]}else se=!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:le.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+se,u_device_pixel_ratio:le.pixelRatio,u_extrude_scale:qe}},Oo=(le,w,B)=>({u_matrix:le,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),ho=(le,w,B=1)=>({u_matrix:le,u_color:w,u_overlay:0,u_overlay_scale:B}),Mo=le=>({u_matrix:le}),xo=(le,w,B,Q)=>({u_matrix:le,u_extrude_scale:nn(w,1,B),u_intensity:Q}),zs=(le,w,B,Q)=>{let ee=a.H();a.aP(ee,0,le.width,le.height,0,0,1);let se=le.context.gl;return{u_matrix:ee,u_world:[se.drawingBufferWidth,se.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function ks(le,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 Zs=(le,w,B,Q)=>{let ee=le.transform;return{u_matrix:Cs(le,w,B,Q),u_ratio:1/nn(w,1,ee.zoom),u_device_pixel_ratio:le.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},Xs=(le,w,B,Q,ee)=>a.e(Zs(le,w,B,ee),{u_image:0,u_image_height:Q}),wl=(le,w,B,Q,ee)=>{let se=le.transform,qe=cl(w,se);return{u_matrix:Cs(le,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/nn(w,1,se.zoom),u_device_pixel_ratio:le.pixelRatio,u_image:0,u_scale:[qe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/se.pixelsToGLUnits[0],1/se.pixelsToGLUnits[1]]}},os=(le,w,B,Q,ee,se)=>{let qe=le.lineAtlas,je=cl(w,le.transform),it=B.layout.get("line-cap")==="round",yt=qe.getDash(Q.from,it),Ot=qe.getDash(Q.to,it),Nt=yt.width*ee.fromScale,hr=Ot.width*ee.toScale;return a.e(Zs(le,w,B,se),{u_patternscale_a:[je/Nt,-yt.height/2],u_patternscale_b:[je/hr,-Ot.height/2],u_sdfgamma:qe.width/(256*Math.min(Nt,hr)*le.pixelRatio)/2,u_image:0,u_tex_y_a:yt.y,u_tex_y_b:Ot.y,u_mix:ee.t})};function cl(le,w){return 1/nn(le,1,w.tileZoom)}function Cs(le,w,B,Q){return le.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let ml=(le,w,B,Q,ee)=>{return{u_matrix:le,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:(se=ee.paint.get("raster-contrast"),se>0?1/(1-se):1+se),u_spin_weights:Ys(ee.paint.get("raster-hue-rotate"))};var se,qe};function Ys(le){le*=Math.PI/180;let w=Math.sin(le),B=Math.cos(le);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let Hs=(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr)=>{let he=qe.transform;return{u_is_size_zoom_constant:+(le==="constant"||le==="source"),u_is_size_feature_constant:+(le==="constant"||le==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:he.cameraToCenterDistance,u_pitch:he.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:he.width/he.height,u_fade_change:qe.options.fadeDuration?qe.symbolFadeChange:1,u_matrix:je,u_label_plane_matrix:it,u_coord_matrix:yt,u_is_text:+Nt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:se,u_texsize:hr,u_texture:0,u_translation:Ot,u_pitched_scale:Sr}},Eo=(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he)=>{let be=qe.transform;return a.e(Hs(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,he),{u_gamma_scale:Q?Math.cos(be._pitch)*be.cameraToCenterDistance:1,u_device_pixel_ratio:qe.pixelRatio,u_is_halo:+Sr})},fs=(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr)=>a.e(Eo(le,w,B,Q,ee,se,qe,je,it,yt,Ot,!0,Nt,!0,Sr),{u_texsize_icon:hr,u_texture_icon:1}),$l=(le,w,B)=>({u_matrix:le,u_opacity:w,u_color:B}),Gu=(le,w,B,Q,ee,se)=>a.e(function(qe,je,it,yt){let Ot=it.imageManager.getPattern(qe.from.toString()),Nt=it.imageManager.getPattern(qe.to.toString()),{width:hr,height:Sr}=it.imageManager.getPixelSize(),he=Math.pow(2,yt.tileID.overscaledZ),be=yt.tileSize*Math.pow(2,it.transform.tileZoom)/he,Pe=be*(yt.tileID.canonical.x+yt.tileID.wrap*he),Oe=be*yt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ot.tl,u_pattern_br_a:Ot.br,u_pattern_tl_b:Nt.tl,u_pattern_br_b:Nt.br,u_texsize:[hr,Sr],u_mix:je.t,u_pattern_size_a:Ot.displaySize,u_pattern_size_b:Nt.displaySize,u_scale_a:je.fromScale,u_scale_b:je.toScale,u_tile_units_to_pixels:1/nn(yt,1,it.transform.tileZoom),u_pixel_coord_upper:[Pe>>16,Oe>>16],u_pixel_coord_lower:[65535&Pe,65535&Oe]}}(Q,se,B,ee),{u_matrix:le,u_opacity:w}),fc={fillExtrusion:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_lightpos:new a.aN(le,w.u_lightpos),u_lightintensity:new a.aI(le,w.u_lightintensity),u_lightcolor:new a.aN(le,w.u_lightcolor),u_vertical_gradient:new a.aI(le,w.u_vertical_gradient),u_opacity:new a.aI(le,w.u_opacity)}),fillExtrusionPattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_lightpos:new a.aN(le,w.u_lightpos),u_lightintensity:new a.aI(le,w.u_lightintensity),u_lightcolor:new a.aN(le,w.u_lightcolor),u_vertical_gradient:new a.aI(le,w.u_vertical_gradient),u_height_factor:new a.aI(le,w.u_height_factor),u_image:new a.aH(le,w.u_image),u_texsize:new a.aO(le,w.u_texsize),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade),u_opacity:new a.aI(le,w.u_opacity)}),fill:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix)}),fillPattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_image:new a.aH(le,w.u_image),u_texsize:new a.aO(le,w.u_texsize),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade)}),fillOutline:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_world:new a.aO(le,w.u_world)}),fillOutlinePattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_world:new a.aO(le,w.u_world),u_image:new a.aH(le,w.u_image),u_texsize:new a.aO(le,w.u_texsize),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade)}),circle:(le,w)=>({u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(le,w.u_scale_with_map),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_extrude_scale:new a.aO(le,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_matrix:new a.aJ(le,w.u_matrix)}),collisionBox:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_pixel_extrude_scale:new a.aO(le,w.u_pixel_extrude_scale)}),collisionCircle:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_inv_matrix:new a.aJ(le,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_viewport_size:new a.aO(le,w.u_viewport_size)}),debug:(le,w)=>({u_color:new a.aL(le,w.u_color),u_matrix:new a.aJ(le,w.u_matrix),u_overlay:new a.aH(le,w.u_overlay),u_overlay_scale:new a.aI(le,w.u_overlay_scale)}),clippingMask:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix)}),heatmap:(le,w)=>({u_extrude_scale:new a.aI(le,w.u_extrude_scale),u_intensity:new a.aI(le,w.u_intensity),u_matrix:new a.aJ(le,w.u_matrix)}),heatmapTexture:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_world:new a.aO(le,w.u_world),u_image:new a.aH(le,w.u_image),u_color_ramp:new a.aH(le,w.u_color_ramp),u_opacity:new a.aI(le,w.u_opacity)}),hillshade:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_image:new a.aH(le,w.u_image),u_latrange:new a.aO(le,w.u_latrange),u_light:new a.aO(le,w.u_light),u_shadow:new a.aL(le,w.u_shadow),u_highlight:new a.aL(le,w.u_highlight),u_accent:new a.aL(le,w.u_accent)}),hillshadePrepare:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_image:new a.aH(le,w.u_image),u_dimension:new a.aO(le,w.u_dimension),u_zoom:new a.aI(le,w.u_zoom),u_unpack:new a.aK(le,w.u_unpack)}),line:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels)}),lineGradient:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels),u_image:new a.aH(le,w.u_image),u_image_height:new a.aI(le,w.u_image_height)}),linePattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_texsize:new a.aO(le,w.u_texsize),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_image:new a.aH(le,w.u_image),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade)}),lineSDF:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels),u_patternscale_a:new a.aO(le,w.u_patternscale_a),u_patternscale_b:new a.aO(le,w.u_patternscale_b),u_sdfgamma:new a.aI(le,w.u_sdfgamma),u_image:new a.aH(le,w.u_image),u_tex_y_a:new a.aI(le,w.u_tex_y_a),u_tex_y_b:new a.aI(le,w.u_tex_y_b),u_mix:new a.aI(le,w.u_mix)}),raster:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_tl_parent:new a.aO(le,w.u_tl_parent),u_scale_parent:new a.aI(le,w.u_scale_parent),u_buffer_scale:new a.aI(le,w.u_buffer_scale),u_fade_t:new a.aI(le,w.u_fade_t),u_opacity:new a.aI(le,w.u_opacity),u_image0:new a.aH(le,w.u_image0),u_image1:new a.aH(le,w.u_image1),u_brightness_low:new a.aI(le,w.u_brightness_low),u_brightness_high:new a.aI(le,w.u_brightness_high),u_saturation_factor:new a.aI(le,w.u_saturation_factor),u_contrast_factor:new a.aI(le,w.u_contrast_factor),u_spin_weights:new a.aN(le,w.u_spin_weights)}),symbolIcon:(le,w)=>({u_is_size_zoom_constant:new a.aH(le,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(le,w.u_is_size_feature_constant),u_size_t:new a.aI(le,w.u_size_t),u_size:new a.aI(le,w.u_size),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_pitch:new a.aI(le,w.u_pitch),u_rotate_symbol:new a.aH(le,w.u_rotate_symbol),u_aspect_ratio:new a.aI(le,w.u_aspect_ratio),u_fade_change:new a.aI(le,w.u_fade_change),u_matrix:new a.aJ(le,w.u_matrix),u_label_plane_matrix:new a.aJ(le,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(le,w.u_coord_matrix),u_is_text:new a.aH(le,w.u_is_text),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_is_along_line:new a.aH(le,w.u_is_along_line),u_is_variable_anchor:new a.aH(le,w.u_is_variable_anchor),u_texsize:new a.aO(le,w.u_texsize),u_texture:new a.aH(le,w.u_texture),u_translation:new a.aO(le,w.u_translation),u_pitched_scale:new a.aI(le,w.u_pitched_scale)}),symbolSDF:(le,w)=>({u_is_size_zoom_constant:new a.aH(le,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(le,w.u_is_size_feature_constant),u_size_t:new a.aI(le,w.u_size_t),u_size:new a.aI(le,w.u_size),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_pitch:new a.aI(le,w.u_pitch),u_rotate_symbol:new a.aH(le,w.u_rotate_symbol),u_aspect_ratio:new a.aI(le,w.u_aspect_ratio),u_fade_change:new a.aI(le,w.u_fade_change),u_matrix:new a.aJ(le,w.u_matrix),u_label_plane_matrix:new a.aJ(le,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(le,w.u_coord_matrix),u_is_text:new a.aH(le,w.u_is_text),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_is_along_line:new a.aH(le,w.u_is_along_line),u_is_variable_anchor:new a.aH(le,w.u_is_variable_anchor),u_texsize:new a.aO(le,w.u_texsize),u_texture:new a.aH(le,w.u_texture),u_gamma_scale:new a.aI(le,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_is_halo:new a.aH(le,w.u_is_halo),u_translation:new a.aO(le,w.u_translation),u_pitched_scale:new a.aI(le,w.u_pitched_scale)}),symbolTextAndIcon:(le,w)=>({u_is_size_zoom_constant:new a.aH(le,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(le,w.u_is_size_feature_constant),u_size_t:new a.aI(le,w.u_size_t),u_size:new a.aI(le,w.u_size),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_pitch:new a.aI(le,w.u_pitch),u_rotate_symbol:new a.aH(le,w.u_rotate_symbol),u_aspect_ratio:new a.aI(le,w.u_aspect_ratio),u_fade_change:new a.aI(le,w.u_fade_change),u_matrix:new a.aJ(le,w.u_matrix),u_label_plane_matrix:new a.aJ(le,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(le,w.u_coord_matrix),u_is_text:new a.aH(le,w.u_is_text),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_is_along_line:new a.aH(le,w.u_is_along_line),u_is_variable_anchor:new a.aH(le,w.u_is_variable_anchor),u_texsize:new a.aO(le,w.u_texsize),u_texsize_icon:new a.aO(le,w.u_texsize_icon),u_texture:new a.aH(le,w.u_texture),u_texture_icon:new a.aH(le,w.u_texture_icon),u_gamma_scale:new a.aI(le,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_is_halo:new a.aH(le,w.u_is_halo),u_translation:new a.aO(le,w.u_translation),u_pitched_scale:new a.aI(le,w.u_pitched_scale)}),background:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_opacity:new a.aI(le,w.u_opacity),u_color:new a.aL(le,w.u_color)}),backgroundPattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_opacity:new a.aI(le,w.u_opacity),u_image:new a.aH(le,w.u_image),u_pattern_tl_a:new a.aO(le,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(le,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(le,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(le,w.u_pattern_br_b),u_texsize:new a.aO(le,w.u_texsize),u_mix:new a.aI(le,w.u_mix),u_pattern_size_a:new a.aO(le,w.u_pattern_size_a),u_pattern_size_b:new a.aO(le,w.u_pattern_size_b),u_scale_a:new a.aI(le,w.u_scale_a),u_scale_b:new a.aI(le,w.u_scale_b),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(le,w.u_tile_units_to_pixels)}),terrain:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_texture:new a.aH(le,w.u_texture),u_ele_delta:new a.aI(le,w.u_ele_delta),u_fog_matrix:new a.aJ(le,w.u_fog_matrix),u_fog_color:new a.aL(le,w.u_fog_color),u_fog_ground_blend:new a.aI(le,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(le,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(le,w.u_horizon_color),u_horizon_fog_blend:new a.aI(le,w.u_horizon_fog_blend)}),terrainDepth:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ele_delta:new a.aI(le,w.u_ele_delta)}),terrainCoords:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_texture:new a.aH(le,w.u_texture),u_terrain_coords_id:new a.aI(le,w.u_terrain_coords_id),u_ele_delta:new a.aI(le,w.u_ele_delta)}),sky:(le,w)=>({u_sky_color:new a.aL(le,w.u_sky_color),u_horizon_color:new a.aL(le,w.u_horizon_color),u_horizon:new a.aI(le,w.u_horizon),u_sky_horizon_blend:new a.aI(le,w.u_sky_horizon_blend)})};class ms{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 on={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class fa{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let se=w.gl;this.buffer=se.createBuffer(),w.bindVertexBuffer.set(this.buffer),se.bufferData(se.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?se.DYNAMIC_DRAW:se.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 Rt=a.H();a.aQ(Rt,He.placementInvProjMatrix,le.transform.glCoordMatrix),a.aQ(Rt,Rt,He.placementViewportMatrix),it.push({circleArray:Mt,circleOffset:Ot,transform:Je.posMatrix,invTransform:Rt,coord:Je}),yt+=Mt.length/4,Ot=yt}et&&je.draw(se,qe.LINES,wo.disabled,$o.disabled,le.colorModeForRenderPass(),Ja.disabled,{u_matrix:Je.posMatrix,u_pixel_extrude_scale:[1/(Nt=le.transform).width,1/Nt.height]},le.style.map.terrain&&le.style.map.terrain.getTerrainData(Je),B.id,et.layoutVertexBuffer,et.indexBuffer,et.segments,null,le.transform.zoom,null,null,et.collisionVertexBuffer)}var Nt;if(!ee||!it.length)return;let hr=le.useProgram("collisionCircle"),Sr=new a.aR;Sr.resize(4*yt),Sr._trim();let he=0;for(let Oe of it)for(let Je=0;Je=0&&(Oe[He.associatedIconIndex]={shiftedAnchor:Mn,angle:pa})}else ai(He.numGlyphs,be)}if(yt){Pe.clear();let Je=le.icon.placedSymbolArray;for(let He=0;Hele.style.map.terrain.getElevation(zr,tt,zt):null,wt=B.layout.get("text-rotation-alignment")==="map";Ve(di,zr.posMatrix,le,ee,Vl,cu,Oe,yt,wt,be,zr.toUnwrapped(),he.width,he.height,el,We)}let Rl=zr.posMatrix,zl=ee&&tr||zc,Z=Je||zl?uu:Vl,oe=Xu,we=Qi&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Be;Be=Qi?di.iconsInText?fs(Mn.kind,Ga,He,Oe,Je,zl,le,Rl,Z,oe,el,Wa,As,Dr):Eo(Mn.kind,Ga,He,Oe,Je,zl,le,Rl,Z,oe,el,ee,Wa,!0,Dr):Hs(Mn.kind,Ga,He,Oe,Je,zl,le,Rl,Z,oe,el,ee,Wa,Dr);let Ue={program:ea,buffers:Li,uniformValues:Be,atlasTexture:co,atlasTextureIcon:yo,atlasInterpolation:Do,atlasInterpolationIcon:Rs,isSDF:Qi,hasHalo:we};if(Mt&&di.canOverlap){Rt=!0;let We=Li.segments.get();for(let wt of We)mr.push({segments:new a.a0([wt]),sortKey:wt.sortKey,state:Ue,terrainData:To})}else mr.push({segments:Li.segments,sortKey:0,state:Ue,terrainData:To})}Rt&&mr.sort((zr,Xr)=>zr.sortKey-Xr.sortKey);for(let zr of mr){let Xr=zr.state;if(hr.activeTexture.set(Sr.TEXTURE0),Xr.atlasTexture.bind(Xr.atlasInterpolation,Sr.CLAMP_TO_EDGE),Xr.atlasTextureIcon&&(hr.activeTexture.set(Sr.TEXTURE1),Xr.atlasTextureIcon&&Xr.atlasTextureIcon.bind(Xr.atlasInterpolationIcon,Sr.CLAMP_TO_EDGE)),Xr.isSDF){let di=Xr.uniformValues;Xr.hasHalo&&(di.u_is_halo=1,Eh(Xr.buffers,zr.segments,B,le,Xr.program,Ut,Ot,Nt,di,zr.terrainData)),di.u_is_halo=0}Eh(Xr.buffers,zr.segments,B,le,Xr.program,Ut,Ot,Nt,Xr.uniformValues,zr.terrainData)}}function Eh(le,w,B,Q,ee,se,qe,je,it,yt){let Ot=Q.context;ee.draw(Ot,Ot.gl.TRIANGLES,se,qe,je,Ja.disabled,it,yt,B.id,le.layoutVertexBuffer,le.indexBuffer,w,B.paint,Q.transform.zoom,le.programConfigurations.get(B.id),le.dynamicLayoutVertexBuffer,le.opacityVertexBuffer)}function nh(le,w,B,Q){let ee=le.context,se=ee.gl,qe=$o.disabled,je=new Ps([se.ONE,se.ONE],a.aM.transparent,[!0,!0,!0,!0]),it=w.getBucket(B);if(!it)return;let yt=Q.key,Ot=B.heatmapFbos.get(yt);Ot||(Ot=kh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(yt,Ot)),ee.bindFramebuffer.set(Ot.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Nt=it.programConfigurations.get(B.id),hr=le.useProgram("heatmap",Nt),Sr=le.style.map.terrain.getTerrainData(Q);hr.draw(ee,se.TRIANGLES,wo.disabled,qe,je,Ja.disabled,xo(Q.posMatrix,w,le.transform.zoom,B.paint.get("heatmap-intensity")),Sr,B.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,B.paint,le.transform.zoom,Nt)}function hf(le,w,B){let Q=le.context,ee=Q.gl;Q.setColorMode(le.colorModeForRenderPass());let se=Kh(Q,w),qe=B.key,je=w.heatmapFbos.get(qe);je&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,je.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),se.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),le.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,wo.disabled,$o.disabled,le.colorModeForRenderPass(),Ja.disabled,zs(le,w,0,1),null,w.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments,w.paint,le.transform.zoom),je.destroy(),w.heatmapFbos.delete(qe))}function kh(le,w,B){var Q,ee;let se=le.gl,qe=se.createTexture();se.bindTexture(se.TEXTURE_2D,qe),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_S,se.CLAMP_TO_EDGE),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_T,se.CLAMP_TO_EDGE),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MIN_FILTER,se.LINEAR),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MAG_FILTER,se.LINEAR);let je=(Q=le.HALF_FLOAT)!==null&&Q!==void 0?Q:se.UNSIGNED_BYTE,it=(ee=le.RGBA16F)!==null&&ee!==void 0?ee:se.RGBA;se.texImage2D(se.TEXTURE_2D,0,it,w,B,0,se.RGBA,je,null);let yt=le.createFramebuffer(w,B,!1,!1);return yt.colorAttachment.set(qe),yt}function Kh(le,w){return w.colorRampTexture||(w.colorRampTexture=new p(le,w.colorRamp,le.gl.RGBA)),w.colorRampTexture}function rc(le,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let se=Q.imageAtlas.patternPositions,qe=se[B.to.toString()],je=se[B.from.toString()];if(!qe&&je&&(qe=je),!je&&qe&&(je=qe),!qe||!je){let it=ee.getPaintProperty(w);qe=se[it],je=se[it]}qe&&je&&le.setConstantPatternPositions(qe,je)}function ah(le,w,B,Q,ee,se,qe){let je=le.context.gl,it="fill-pattern",yt=B.paint.get(it),Ot=yt&&yt.constantOr(1),Nt=B.getCrossfadeParameters(),hr,Sr,he,be,Pe;qe?(Sr=Ot&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",hr=je.LINES):(Sr=Ot?"fillPattern":"fill",hr=je.TRIANGLES);let Oe=yt.constantOr(null);for(let Je of Q){let He=w.getTile(Je);if(Ot&&!He.patternsLoaded())continue;let et=He.getBucket(B);if(!et)continue;let Mt=et.programConfigurations.get(B.id),Rt=le.useProgram(Sr,Mt),Ut=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Je);Ot&&(le.context.activeTexture.set(je.TEXTURE0),He.imageAtlasTexture.bind(je.LINEAR,je.CLAMP_TO_EDGE),Mt.updatePaintBuffers(Nt)),rc(Mt,it,Oe,He,B);let tr=Ut?Je:null,mr=le.translatePosMatrix(tr?tr.posMatrix:Je.posMatrix,He,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(qe){be=et.indexBuffer2,Pe=et.segments2;let Dr=[je.drawingBufferWidth,je.drawingBufferHeight];he=Sr==="fillOutlinePattern"&&Ot?Sa(mr,le,Nt,He,Dr):Fn(mr,Dr)}else be=et.indexBuffer,Pe=et.segments,he=Ot?ua(mr,le,Nt,He):Ji(mr);Rt.draw(le.context,hr,ee,le.stencilModeForClipping(Je),se,Ja.disabled,he,Ut,B.id,et.layoutVertexBuffer,be,Pe,B.paint,le.transform.zoom,Mt)}}function Wc(le,w,B,Q,ee,se,qe){let je=le.context,it=je.gl,yt="fill-extrusion-pattern",Ot=B.paint.get(yt),Nt=Ot.constantOr(1),hr=B.getCrossfadeParameters(),Sr=B.paint.get("fill-extrusion-opacity"),he=Ot.constantOr(null);for(let be of Q){let Pe=w.getTile(be),Oe=Pe.getBucket(B);if(!Oe)continue;let Je=le.style.map.terrain&&le.style.map.terrain.getTerrainData(be),He=Oe.programConfigurations.get(B.id),et=le.useProgram(Nt?"fillExtrusionPattern":"fillExtrusion",He);Nt&&(le.context.activeTexture.set(it.TEXTURE0),Pe.imageAtlasTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE),He.updatePaintBuffers(hr)),rc(He,yt,he,Pe,B);let Mt=le.translatePosMatrix(be.posMatrix,Pe,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Rt=B.paint.get("fill-extrusion-vertical-gradient"),Ut=Nt?hi(Mt,le,Rt,Sr,be,hr,Pe):an(Mt,le,Rt,Sr);et.draw(je,je.gl.TRIANGLES,ee,se,qe,Ja.backCCW,Ut,Je,B.id,Oe.layoutVertexBuffer,Oe.indexBuffer,Oe.segments,B.paint,le.transform.zoom,He,le.style.map.terrain&&Oe.centroidVertexBuffer)}}function df(le,w,B,Q,ee,se,qe){let je=le.context,it=je.gl,yt=B.fbo;if(!yt)return;let Ot=le.useProgram("hillshade"),Nt=le.style.map.terrain&&le.style.map.terrain.getTerrainData(w);je.activeTexture.set(it.TEXTURE0),it.bindTexture(it.TEXTURE_2D,yt.colorAttachment.get()),Ot.draw(je,it.TRIANGLES,ee,se,qe,Ja.disabled,((hr,Sr,he,be)=>{let Pe=he.paint.get("hillshade-shadow-color"),Oe=he.paint.get("hillshade-highlight-color"),Je=he.paint.get("hillshade-accent-color"),He=he.paint.get("hillshade-illumination-direction")*(Math.PI/180);he.paint.get("hillshade-illumination-anchor")==="viewport"&&(He-=hr.transform.angle);let et=!hr.options.moving;return{u_matrix:be?be.posMatrix:hr.transform.calculatePosMatrix(Sr.tileID.toUnwrapped(),et),u_image:0,u_latrange:ks(0,Sr.tileID),u_light:[he.paint.get("hillshade-exaggeration"),He],u_shadow:Pe,u_highlight:Oe,u_accent:Je}})(le,B,Q,Nt?w:null),Nt,Q.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}function Cu(le,w,B,Q,ee,se){let qe=le.context,je=qe.gl,it=w.dem;if(it&&it.data){let yt=it.dim,Ot=it.stride,Nt=it.getPixels();if(qe.activeTexture.set(je.TEXTURE1),qe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||le.getTileTexture(Ot),w.demTexture){let Sr=w.demTexture;Sr.update(Nt,{premultiply:!1}),Sr.bind(je.NEAREST,je.CLAMP_TO_EDGE)}else w.demTexture=new p(qe,Nt,je.RGBA,{premultiply:!1}),w.demTexture.bind(je.NEAREST,je.CLAMP_TO_EDGE);qe.activeTexture.set(je.TEXTURE0);let hr=w.fbo;if(!hr){let Sr=new p(qe,{width:yt,height:yt,data:null},je.RGBA);Sr.bind(je.LINEAR,je.CLAMP_TO_EDGE),hr=w.fbo=qe.createFramebuffer(yt,yt,!0,!1),hr.colorAttachment.set(Sr.texture)}qe.bindFramebuffer.set(hr.framebuffer),qe.viewport.set([0,0,yt,yt]),le.useProgram("hillshadePrepare").draw(qe,je.TRIANGLES,Q,ee,se,Ja.disabled,((Sr,he)=>{let be=he.stride,Pe=a.H();return a.aP(Pe,0,a.X,-a.X,0,0,1),a.J(Pe,Pe,[0,-a.X,0]),{u_matrix:Pe,u_image:1,u_dimension:[be,be],u_zoom:Sr.overscaledZ,u_unpack:he.getUnpackVector()}})(w.tileID,it),null,B.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Nf(le,w,B,Q,ee,se){let qe=Q.paint.get("raster-fade-duration");if(!se&&qe>0){let je=u.now(),it=(je-le.timeAdded)/qe,yt=w?(je-w.timeAdded)/qe:-1,Ot=B.getSource(),Nt=ee.coveringZoomLevel({tileSize:Ot.tileSize,roundZoom:Ot.roundZoom}),hr=!w||Math.abs(w.tileID.overscaledZ-Nt)>Math.abs(le.tileID.overscaledZ-Nt),Sr=hr&&le.refreshedUponExpiration?1:a.ac(hr?it:1-yt,0,1);return le.refreshedUponExpiration&&it>=1&&(le.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Sr}:{opacity:Sr,mix:0}}return{opacity:1,mix:0}}let Zc=new a.aM(1,0,0,1),ds=new a.aM(0,1,0,1),Ch=new a.aM(0,0,1,1),Bd=new a.aM(1,0,1,1),Jh=new a.aM(0,1,1,1);function Cf(le,w,B,Q){Lu(le,0,w+B/2,le.transform.width,B,Q)}function pd(le,w,B,Q){Lu(le,w-B/2,0,B,le.transform.height,Q)}function Lu(le,w,B,Q,ee,se){let qe=le.context,je=qe.gl;je.enable(je.SCISSOR_TEST),je.scissor(w*le.pixelRatio,B*le.pixelRatio,Q*le.pixelRatio,ee*le.pixelRatio),qe.clear({color:se}),je.disable(je.SCISSOR_TEST)}function $h(le,w,B){let Q=le.context,ee=Q.gl,se=B.posMatrix,qe=le.useProgram("debug"),je=wo.disabled,it=$o.disabled,yt=le.colorModeForRenderPass(),Ot="$debug",Nt=le.style.map.terrain&&le.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let hr=w.getTileByID(B.key).latestRawTileData,Sr=Math.floor((hr&&hr.byteLength||0)/1024),he=w.getTile(B).tileSize,be=512/Math.min(he,512)*(B.overscaledZ/le.transform.zoom)*.5,Pe=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Pe+=` => ${B.overscaledZ}`),function(Oe,Je){Oe.initDebugOverlayCanvas();let He=Oe.debugOverlayCanvas,et=Oe.context.gl,Mt=Oe.debugOverlayCanvas.getContext("2d");Mt.clearRect(0,0,He.width,He.height),Mt.shadowColor="white",Mt.shadowBlur=2,Mt.lineWidth=1.5,Mt.strokeStyle="white",Mt.textBaseline="top",Mt.font="bold 36px Open Sans, sans-serif",Mt.fillText(Je,5,5),Mt.strokeText(Je,5,5),Oe.debugOverlayTexture.update(He),Oe.debugOverlayTexture.bind(et.LINEAR,et.CLAMP_TO_EDGE)}(le,`${Pe} ${Sr}kB`),qe.draw(Q,ee.TRIANGLES,je,it,Ps.alphaBlended,Ja.disabled,ho(se,a.aM.transparent,be),null,Ot,le.debugBuffer,le.quadTriangleIndexBuffer,le.debugSegments),qe.draw(Q,ee.LINE_STRIP,je,it,yt,Ja.disabled,ho(se,a.aM.red),Nt,Ot,le.debugBuffer,le.tileBorderIndexBuffer,le.debugSegments)}function eu(le,w,B){let Q=le.context,ee=Q.gl,se=le.colorModeForRenderPass(),qe=new wo(ee.LEQUAL,wo.ReadWrite,le.depthRangeFor3D),je=le.useProgram("terrain"),it=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,le.width,le.height]);for(let yt of B){let Ot=le.renderToTexture.getTexture(yt),Nt=w.getTerrainData(yt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ot.texture);let hr=le.transform.calculatePosMatrix(yt.tileID.toUnwrapped()),Sr=w.getMeshFrameDelta(le.transform.zoom),he=le.transform.calculateFogMatrix(yt.tileID.toUnwrapped()),be=Hr(hr,Sr,he,le.style.sky,le.transform.pitch);je.draw(Q,ee.TRIANGLES,qe,$o.disabled,se,Ja.backCCW,be,Nt,"terrain",it.vertexBuffer,it.indexBuffer,it.segments)}}class Pu{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 Lc{constructor(w,B){this.context=new ov(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=dt.maxUnderzooming+dt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jo}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,oo.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,oo.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,ot.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let se=new a.aX;se.emplaceBack(0,0),se.emplaceBack(1,0),se.emplaceBack(0,1),se.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(se,oo.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 je=new a.aY;je.emplaceBack(0,1,2),je.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(je);let it=this.context.gl;this.stencilClearMode=new $o({func:it.ALWAYS,mask:0},0,255,it.ZERO,it.ZERO,it.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,wo.disabled,this.stencilClearMode,Ps.disabled,Ja.disabled,Mo(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(Ps.disabled),Q.setDepthMode(wo.disabled);let se=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let qe of B){let je=this._tileClippingMaskIDs[qe.key]=this.nextStencilID++,it=this.style.map.terrain&&this.style.map.terrain.getTerrainData(qe);se.draw(Q,ee.TRIANGLES,wo.disabled,new $o({func:ee.ALWAYS,mask:0},je,255,ee.KEEP,ee.KEEP,ee.REPLACE),Ps.disabled,Ja.disabled,Mo(qe.posMatrix),it,"$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 $o({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new $o({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,je)=>je.overscaledZ-qe.overscaledZ),ee=Q[Q.length-1].overscaledZ,se=Q[0].overscaledZ-ee+1;if(se>1){this.currentStencilSource=void 0,this.nextStencilID+se>256&&this.clearStencil();let qe={};for(let je=0;je({u_sky_color:Oe.properties.get("sky-color"),u_horizon_color:Oe.properties.get("horizon-color"),u_horizon:(Je.height/2+Je.getHorizon())*He,u_sky_horizon_blend:Oe.properties.get("sky-horizon-blend")*Je.height/2*He}))(yt,it.style.map.transform,it.pixelRatio),Sr=new wo(Nt.LEQUAL,wo.ReadWrite,[0,1]),he=$o.disabled,be=it.colorModeForRenderPass(),Pe=it.useProgram("sky");if(!yt.mesh){let Oe=new a.aX;Oe.emplaceBack(-1,-1),Oe.emplaceBack(1,-1),Oe.emplaceBack(1,1),Oe.emplaceBack(-1,1);let Je=new a.aY;Je.emplaceBack(0,1,2),Je.emplaceBack(0,2,3),yt.mesh=new Pu(Ot.createVertexBuffer(Oe,oo.members),Ot.createIndexBuffer(Je),a.a0.simpleSegment(0,0,Oe.length,Je.length))}Pe.draw(Ot,Nt.TRIANGLES,Sr,he,be,Ja.disabled,hr,void 0,"sky",yt.mesh.vertexBuffer,yt.mesh.indexBuffer,yt.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 it=this.style._layers[Q[this.currentLayer]],yt=ee[it.source],Ot=se[it.source];this._renderTileClippingMasks(it,Ot),this.renderLayer(this,yt,it,Ot)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerPe.source&&!Pe.isHidden(Ot)?[yt.sourceCaches[Pe.source]]:[]),Sr=hr.filter(Pe=>Pe.getSource().type==="vector"),he=hr.filter(Pe=>Pe.getSource().type!=="vector"),be=Pe=>{(!Nt||Nt.getSource().maxzoombe(Pe)),Nt||he.forEach(Pe=>be(Pe)),Nt}(this.style,this.transform.zoom);it&&function(yt,Ot,Nt){for(let hr=0;hr0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(se,qe){let je=se.context,it=je.gl,yt=Ps.unblended,Ot=new wo(it.LEQUAL,wo.ReadWrite,[0,1]),Nt=qe.getTerrainMesh(),hr=qe.sourceCache.getRenderableTiles(),Sr=se.useProgram("terrainDepth");je.bindFramebuffer.set(qe.getFramebuffer("depth").framebuffer),je.viewport.set([0,0,se.width/devicePixelRatio,se.height/devicePixelRatio]),je.clear({color:a.aM.transparent,depth:1});for(let he of hr){let be=qe.getTerrainData(he.tileID),Pe={u_matrix:se.transform.calculatePosMatrix(he.tileID.toUnwrapped()),u_ele_delta:qe.getMeshFrameDelta(se.transform.zoom)};Sr.draw(je,it.TRIANGLES,Ot,$o.disabled,yt,Ja.backCCW,Pe,be,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments)}je.bindFramebuffer.set(null),je.viewport.set([0,0,se.width,se.height])}(this,this.style.map.terrain),function(se,qe){let je=se.context,it=je.gl,yt=Ps.unblended,Ot=new wo(it.LEQUAL,wo.ReadWrite,[0,1]),Nt=qe.getTerrainMesh(),hr=qe.getCoordsTexture(),Sr=qe.sourceCache.getRenderableTiles(),he=se.useProgram("terrainCoords");je.bindFramebuffer.set(qe.getFramebuffer("coords").framebuffer),je.viewport.set([0,0,se.width/devicePixelRatio,se.height/devicePixelRatio]),je.clear({color:a.aM.transparent,depth:1}),qe.coordsIndex=[];for(let be of Sr){let Pe=qe.getTerrainData(be.tileID);je.activeTexture.set(it.TEXTURE0),it.bindTexture(it.TEXTURE_2D,hr.texture);let Oe={u_matrix:se.transform.calculatePosMatrix(be.tileID.toUnwrapped()),u_terrain_coords_id:(255-qe.coordsIndex.length)/255,u_texture:0,u_ele_delta:qe.getMeshFrameDelta(se.transform.zoom)};he.draw(je,it.TRIANGLES,Ot,$o.disabled,yt,Ja.backCCW,Oe,Pe,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments),qe.coordsIndex.push(be.tileID.key)}je.bindFramebuffer.set(null),je.viewport.set([0,0,se.width,se.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(se,qe,je,it,yt){if(se.renderPass!=="translucent")return;let Ot=$o.disabled,Nt=se.colorModeForRenderPass();(je._unevaluatedLayout.hasValue("text-variable-anchor")||je._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(hr,Sr,he,be,Pe,Oe,Je,He,et){let Mt=Sr.transform,Rt=Gi(),Ut=Pe==="map",tr=Oe==="map";for(let mr of hr){let Dr=be.getTile(mr),zr=Dr.getBucket(he);if(!zr||!zr.text||!zr.text.segments.get().length)continue;let Xr=a.ag(zr.textSizeData,Mt.zoom),di=nn(Dr,1,Sr.transform.zoom),Li=Or(mr.posMatrix,tr,Ut,Sr.transform,di),Ci=he.layout.get("icon-text-fit")!=="none"&&zr.hasIconData();if(Xr){let Qi=Math.pow(2,Mt.zoom-Dr.tileID.overscaledZ),Mn=Sr.style.map.terrain?(ea,Ga)=>Sr.style.map.terrain.getElevation(mr,ea,Ga):null,pa=Rt.translatePosition(Mt,Dr,Je,He);kf(zr,Ut,tr,et,Mt,Li,mr.posMatrix,Qi,Xr,Ci,Rt,pa,mr.toUnwrapped(),Mn)}}}(it,se,je,qe,je.layout.get("text-rotation-alignment"),je.layout.get("text-pitch-alignment"),je.paint.get("text-translate"),je.paint.get("text-translate-anchor"),yt),je.paint.get("icon-opacity").constantOr(1)!==0&&Yh(se,qe,je,it,!1,je.paint.get("icon-translate"),je.paint.get("icon-translate-anchor"),je.layout.get("icon-rotation-alignment"),je.layout.get("icon-pitch-alignment"),je.layout.get("icon-keep-upright"),Ot,Nt),je.paint.get("text-opacity").constantOr(1)!==0&&Yh(se,qe,je,it,!0,je.paint.get("text-translate"),je.paint.get("text-translate-anchor"),je.layout.get("text-rotation-alignment"),je.layout.get("text-pitch-alignment"),je.layout.get("text-keep-upright"),Ot,Nt),qe.map.showCollisionBoxes&&(tc(se,qe,je,it,!0),tc(se,qe,je,it,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(se,qe,je,it){if(se.renderPass!=="translucent")return;let yt=je.paint.get("circle-opacity"),Ot=je.paint.get("circle-stroke-width"),Nt=je.paint.get("circle-stroke-opacity"),hr=!je.layout.get("circle-sort-key").isConstant();if(yt.constantOr(1)===0&&(Ot.constantOr(1)===0||Nt.constantOr(1)===0))return;let Sr=se.context,he=Sr.gl,be=se.depthModeForSublayer(0,wo.ReadOnly),Pe=$o.disabled,Oe=se.colorModeForRenderPass(),Je=[];for(let He=0;HeHe.sortKey-et.sortKey);for(let He of Je){let{programConfiguration:et,program:Mt,layoutVertexBuffer:Rt,indexBuffer:Ut,uniformValues:tr,terrainData:mr}=He.state;Mt.draw(Sr,he.TRIANGLES,be,Pe,Oe,Ja.disabled,tr,mr,je.id,Rt,Ut,He.segments,je.paint,se.transform.zoom,et)}})(w,B,Q,ee);break;case"heatmap":(function(se,qe,je,it){if(je.paint.get("heatmap-opacity")===0)return;let yt=se.context;if(se.style.map.terrain){for(let Ot of it){let Nt=qe.getTile(Ot);qe.hasRenderableParent(Ot)||(se.renderPass==="offscreen"?nh(se,Nt,je,Ot):se.renderPass==="translucent"&&hf(se,je,Ot))}yt.viewport.set([0,0,se.width,se.height])}else se.renderPass==="offscreen"?function(Ot,Nt,hr,Sr){let he=Ot.context,be=he.gl,Pe=$o.disabled,Oe=new Ps([be.ONE,be.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(Je,He,et){let Mt=Je.gl;Je.activeTexture.set(Mt.TEXTURE1),Je.viewport.set([0,0,He.width/4,He.height/4]);let Rt=et.heatmapFbos.get(a.aU);Rt?(Mt.bindTexture(Mt.TEXTURE_2D,Rt.colorAttachment.get()),Je.bindFramebuffer.set(Rt.framebuffer)):(Rt=kh(Je,He.width/4,He.height/4),et.heatmapFbos.set(a.aU,Rt))})(he,Ot,hr),he.clear({color:a.aM.transparent});for(let Je=0;Je20&&Ot.texParameterf(Ot.TEXTURE_2D,yt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,yt.extTextureFilterAnisotropicMax);let zr=se.style.map.terrain&&se.style.map.terrain.getTerrainData(Je),Xr=zr?Je:null,di=Xr?Xr.posMatrix:se.transform.calculatePosMatrix(Je.toUnwrapped(),Oe),Li=ml(di,mr||[0,0],tr||1,Ut,je);Nt instanceof Dt?hr.draw(yt,Ot.TRIANGLES,He,$o.disabled,Sr,Ja.disabled,Li,zr,je.id,Nt.boundsBuffer,se.quadTriangleIndexBuffer,Nt.boundsSegments):hr.draw(yt,Ot.TRIANGLES,He,he[Je.overscaledZ],Sr,Ja.disabled,Li,zr,je.id,se.rasterBoundsBuffer,se.quadTriangleIndexBuffer,se.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(se,qe,je,it){let yt=je.paint.get("background-color"),Ot=je.paint.get("background-opacity");if(Ot===0)return;let Nt=se.context,hr=Nt.gl,Sr=se.transform,he=Sr.tileSize,be=je.paint.get("background-pattern");if(se.isPatternMissing(be))return;let Pe=!be&&yt.a===1&&Ot===1&&se.opaquePassEnabledForLayer()?"opaque":"translucent";if(se.renderPass!==Pe)return;let Oe=$o.disabled,Je=se.depthModeForSublayer(0,Pe==="opaque"?wo.ReadWrite:wo.ReadOnly),He=se.colorModeForRenderPass(),et=se.useProgram(be?"backgroundPattern":"background"),Mt=it||Sr.coveringTiles({tileSize:he,terrain:se.style.map.terrain});be&&(Nt.activeTexture.set(hr.TEXTURE0),se.imageManager.bind(se.context));let Rt=je.getCrossfadeParameters();for(let Ut of Mt){let tr=it?Ut.posMatrix:se.transform.calculatePosMatrix(Ut.toUnwrapped()),mr=be?Gu(tr,Ot,se,be,{tileID:Ut,tileSize:he},Rt):$l(tr,Ot,yt),Dr=se.style.map.terrain&&se.style.map.terrain.getTerrainData(Ut);et.draw(Nt,hr.TRIANGLES,Je,Oe,He,Ja.disabled,mr,Dr,je.id,se.tileExtentBuffer,se.quadTriangleIndexBuffer,se.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(se,qe,je){let it=se.context,yt=je.implementation;if(se.renderPass==="offscreen"){let Ot=yt.prerender;Ot&&(se.setCustomLayerDefaults(),it.setColorMode(se.colorModeForRenderPass()),Ot.call(yt,it.gl,se.transform.customLayerMatrix()),it.setDirty(),se.setBaseState())}else if(se.renderPass==="translucent"){se.setCustomLayerDefaults(),it.setColorMode(se.colorModeForRenderPass()),it.setStencilMode($o.disabled);let Ot=yt.renderingMode==="3d"?new wo(se.context.gl.LEQUAL,wo.ReadWrite,se.depthRangeFor3D):se.depthModeForSublayer(0,wo.ReadOnly);it.setDepthMode(Ot),yt.render(it.gl,se.transform.customLayerMatrix(),{farZ:se.transform.farZ,nearZ:se.transform.nearZ,fov:se.transform._fov,modelViewProjectionMatrix:se.transform.modelViewProjectionMatrix,projectionMatrix:se.transform.projectionMatrix}),it.setDirty(),se.setBaseState(),it.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,se){if(!Q[0]&&!Q[1])return w;let qe=se?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(qe){let yt=Math.sin(qe),Ot=Math.cos(qe);Q=[Q[0]*Ot-Q[1]*yt,Q[0]*yt+Q[1]*Ot]}let je=[se?Q[0]:nn(B,Q[0],this.transform.zoom),se?Q[1]:nn(B,Q[1],this.transform.zoom),0],it=new Float32Array(16);return a.J(it,w,je),it}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 zi(this.context,xn[w],B,fc[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 p(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 fl{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),se=[[-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(je=>{let it=1/(je=a.af([],je,w))[3]/B*ee;return a.b1(je,je,[it,it,1/je[3],it])}),qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(je=>{let it=function(hr,Sr){var he=Sr[0],be=Sr[1],Pe=Sr[2],Oe=he*he+be*be+Pe*Pe;return Oe>0&&(Oe=1/Math.sqrt(Oe)),hr[0]=Sr[0]*Oe,hr[1]=Sr[1]*Oe,hr[2]=Sr[2]*Oe,hr}([],function(hr,Sr,he){var be=Sr[0],Pe=Sr[1],Oe=Sr[2],Je=he[0],He=he[1],et=he[2];return hr[0]=Pe*et-Oe*He,hr[1]=Oe*Je-be*et,hr[2]=be*He-Pe*Je,hr}([],L([],se[je[0]],se[je[1]]),L([],se[je[2]],se[je[1]]))),yt=-((Ot=it)[0]*(Nt=se[je[1]])[0]+Ot[1]*Nt[1]+Ot[2]*Nt[2]);var Ot,Nt;return it.concat(yt)});return new fl(se,qe)}}class Xc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,se){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,se){return Q[0]=ee[0]+se[0],Q[1]=ee[1]+se[1],Q[2]=ee[2]+se[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=k(this.min),ee=k(this.max);for(let se=0;se=0&&qe++;if(qe===0)return 0;qe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let se=Number.MAX_VALUE,qe=-Number.MAX_VALUE;for(let je=0;jethis.max[ee]-this.min[ee])return 0}return 1}}class ic{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 ic(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let yu=85.051129;class Qs{constructor(w,B,Q,ee,se){this.tileSize=512,this._renderWorldCopies=se===void 0||!!se,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 ic,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new Qs(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,se){var qe=ee[0],je=ee[1],it=ee[2],yt=ee[3],Ot=Math.sin(se),Nt=Math.cos(se);Q[0]=qe*Nt+it*Ot,Q[1]=je*Nt+yt*Ot,Q[2]=qe*-Ot+it*Nt,Q[3]=je*-Ot+yt*Nt}(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)),se=this.pointCoordinate(new a.P(this.width,this.height)),qe=this.pointCoordinate(new a.P(0,this.height)),je=Math.floor(Math.min(Q.x,ee.x,se.x,qe.x)),it=Math.floor(Math.max(Q.x,ee.x,se.x,qe.x)),yt=1;for(let Ot=je-yt;Ot<=it+yt;Ot++)Ot!==0&&B.push(new a.b4(Ot,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),se=ee;if(w.minzoom!==void 0&&eew.maxzoom&&(ee=w.maxzoom);let qe=this.pointCoordinate(this.getCameraPoint()),je=a.Z.fromLngLat(this.center),it=Math.pow(2,ee),yt=[it*qe.x,it*qe.y,0],Ot=[it*je.x,it*je.y,0],Nt=fl.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),hr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(hr=ee);let Sr=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,he=He=>({aabb:new Xc([He*it,0,0],[(He+1)*it,it,0]),zoom:0,x:0,y:0,wrap:He,fullyVisible:!1}),be=[],Pe=[],Oe=ee,Je=w.reparseOverscaled?se:ee;if(this._renderWorldCopies)for(let He=1;He<=3;He++)be.push(he(-He)),be.push(he(He));for(be.push(he(0));be.length>0;){let He=be.pop(),et=He.x,Mt=He.y,Rt=He.fullyVisible;if(!Rt){let zr=He.aabb.intersects(Nt);if(zr===0)continue;Rt=zr===2}let Ut=w.terrain?yt:Ot,tr=He.aabb.distanceX(Ut),mr=He.aabb.distanceY(Ut),Dr=Math.max(Math.abs(tr),Math.abs(mr));if(He.zoom===Oe||Dr>Sr+(1<=hr){let zr=Oe-He.zoom,Xr=yt[0]-.5-(et<>1),Li=He.zoom+1,Ci=He.aabb.quadrant(zr);if(w.terrain){let Qi=new a.S(Li,He.wrap,Li,Xr,di),Mn=w.terrain.getMinMaxElevation(Qi),pa=(B=Mn.minElevation)!==null&&B!==void 0?B:this.elevation,ea=(Q=Mn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;Ci=new Xc([Ci.min[0],Ci.min[1],pa],[Ci.max[0],Ci.max[1],ea])}be.push({aabb:Ci,zoom:Li,x:Xr,y:di,wrap:He.wrap,fullyVisible:Rt})}}return Pe.sort((He,et)=>He.distanceSq-et.distanceSq).map(He=>He.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,yu);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),se=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-se))return;let qe=Q+B-se,je=Math.cos(this._pitch)*this.cameraToCenterDistance/qe/a.b5(1,ee.lat),it=this.scaleZoom(je/this.tileSize);this._elevation=se,this._center=ee,this.zoom=it}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),se=this.locationCoordinate(w),qe=new a.Z(se.x-(Q.x-ee.x),se.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 hr=B.pointCoordinate(w);if(hr!=null)return hr}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 se=Q[3],qe=ee[3],je=Q[1]/se,it=ee[1]/qe,yt=Q[2]/se,Ot=ee[2]/qe,Nt=yt===Ot?0:(0-yt)/(Ot-yt);return new a.Z(a.y.number(Q[0]/se,ee[0]/qe,Nt)/this.worldSize,a.y.number(je,it,Nt)/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,yu])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,se=a.an(new Float64Array(16));return a.J(se,se,[ee*Q,B.y*Q,0]),a.K(se,se,[Q/a.X,Q/a.X,1]),se}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let se=this.calculateTileMatrix(w);return a.L(se,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,se),ee[Q]=new Float32Array(se),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 He=179.9999999999;ee=[-He,He]}let se=this.tileSize*this.zoomScale(Q.zoom),qe=0,je=se,it=0,yt=se,Ot=0,Nt=0,{x:hr,y:Sr}=this.size;if(this.latRange){let He=this.latRange;qe=a.Q(He[1])*se,je=a.Q(He[0])*se,je-qeje&&(Oe=je-He)}if(ee){let He=(it+yt)/2,et=he;this._renderWorldCopies&&(et=a.b3(he,He-se/2,He+se/2));let Mt=hr/2;et-Mtyt&&(Pe=yt-Mt)}if(Pe!==void 0||Oe!==void 0){let He=new a.P(Pe!=null?Pe:he,Oe!=null?Oe:be);Q.center=this.unproject.call({worldSize:se},He).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 se=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),qe=Math.min(this.elevation,this.minElevationForCurrentTile),je=se-qe*this._pixelPerMeter/Math.cos(this._pitch),it=qe<0?je:se,yt=Math.PI/2+this._pitch,Ot=this._fov*(.5+w.y/this.height),Nt=Math.sin(Ot)*it/Math.sin(a.ac(Math.PI-yt-Ot,.01,Math.PI-.01)),hr=this.getHorizon(),Sr=2*Math.atan(hr/this.cameraToCenterDistance)*(.5+w.y/(2*hr)),he=Math.sin(Sr)*it/Math.sin(a.ac(Math.PI-yt-Sr,.01,Math.PI-.01)),be=Math.min(Nt,he);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*be+it),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,se,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 Pe=this.width%2/2,Oe=this.height%2/2,Je=Math.cos(this.angle),He=Math.sin(this.angle),et=B-Math.round(B)+Je*Pe+He*Oe,Mt=Q-Math.round(Q)+Je*Oe+He*Pe,Rt=new Float64Array(ee);if(a.J(Rt,Rt,[et>.5?et-1:et,Mt>.5?Mt-1:Mt,0]),this.alignedModelViewProjectionMatrix=Rt,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,se=B.x,qe=B.y;for(let je of w)Q=Math.min(Q,je.x),ee=Math.min(ee,je.y),se=Math.max(se,je.x),qe=Math.max(qe,je.y);return[new a.P(Q,ee),new a.P(se,ee),new a.P(se,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 Qh(le,w){let B,Q=!1,ee=null,se=null,qe=()=>{ee=null,Q&&(le.apply(se,B),ee=setTimeout(qe,w),Q=!1)};return(...je)=>(Q=!0,se=this,B=je,ee||qe(),ee)}class gd{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 se=window.location.hash.replace(ee,"");se.startsWith("#&")?se=se.slice(0,1)+se.slice(2):se==="#"&&(se="");let qe=window.location.href.replace(/(#.+)?$/,se);qe=qe.replace("&&","&"),window.history.replaceState(window.history.state,null,qe)},this._updateHash=Qh(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),se=Math.pow(10,ee),qe=Math.round(B.lng*se)/se,je=Math.round(B.lat*se)/se,it=this._map.getBearing(),yt=this._map.getPitch(),Ot="";if(Ot+=w?`/${qe}/${je}/${Q}`:`${Q}/${je}/${qe}`,(it||yt)&&(Ot+="/"+Math.round(10*it)/10),yt&&(Ot+=`/${Math.round(yt)}`),this._hashName){let Nt=this._hashName,hr=!1,Sr=window.location.hash.slice(1).split("&").map(he=>{let be=he.split("=")[0];return be===Nt?(hr=!0,`${be}=${Ot}`):he}).filter(he=>he);return hr||Sr.push(`${Nt}=${Ot}`),`#${Sr.join("&")}`}return`#${Ot}`}}let ju={linearity:.3,easing:a.b8(0,0,.3,1)},Pc=a.e({deceleration:2500,maxSpeed:1400},ju),vc=a.e({deceleration:20,maxSpeed:1400},ju),sv=a.e({deceleration:1e3,maxSpeed:360},ju),Lf=a.e({deceleration:1e3,maxSpeed:90},ju);class Uf{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:se}of this._inertiaBuffer)B.zoom+=se.zoomDelta||0,B.bearing+=se.bearingDelta||0,B.pitch+=se.pitchDelta||0,se.panDelta&&B.pan._add(se.panDelta),se.around&&(B.around=se.around),se.pinchAround&&(B.pinchAround=se.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let se=oh(B.pan.mag(),Q,a.e({},Pc,w||{}));ee.offset=B.pan.mult(se.amount/B.pan.mag()),ee.center=this._map.transform.center,Iu(ee,se)}if(B.zoom){let se=oh(B.zoom,Q,vc);ee.zoom=this._map.transform.zoom+se.amount,Iu(ee,se)}if(B.bearing){let se=oh(B.bearing,Q,sv);ee.bearing=this._map.transform.bearing+a.ac(se.amount,-179,179),Iu(ee,se)}if(B.pitch){let se=oh(B.pitch,Q,Lf);ee.pitch=this._map.transform.pitch+se.amount,Iu(ee,se)}if(ee.zoom||ee.bearing){let se=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=se?this._map.unproject(se):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function Iu(le,w){(!le.duration||le.durationB.unproject(it)),je=se.reduce((it,yt,Ot,Nt)=>it.add(yt.div(Nt.length)),new a.P(0,0));super(w,{points:se,point:je,lngLats:qe,lngLat:B.unproject(je),originalEvent:Q}),this._defaultPrevented=!1}}class md extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class sh{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new md(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new tu(w.type,this._map,w))}mouseup(w){this._map.fire(new tu(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new tu(w.type,this._map,w))}dblclick(w){return this._firePreventable(new tu(w.type,this._map,w))}mouseover(w){this._map.fire(new tu(w.type,this._map,w))}mouseout(w){this._map.fire(new tu(w.type,this._map,w))}touchstart(w){return this._firePreventable(new vf(w.type,this._map,w))}touchmove(w){this._map.fire(new vf(w.type,this._map,w))}touchend(w){this._map.fire(new vf(w.type,this._map,w))}touchcancel(w){this._map.fire(new vf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Fs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new tu(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new tu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new tu(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{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 xu{constructor(w,B){this._map=w,this._tr=new _u(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)se.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 Lh(le,w){if(le.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${le.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 se=new a.P(0,0);for(let qe of ee)se._add(qe);return se.div(ee.length)}(B),this.touches=Lh(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Lh(Q,B);for(let se in this.touches){let qe=ee[se];(!qe||qe.dist(this.touches[se])>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 Pf{constructor(w){this.singleTap=new Is(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 se=w.timeStamp-this.lastTime<500,qe=!this.lastTap||this.lastTap.dist(ee)<30;if(se&&qe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class Ic{constructor(w){this._tr=new _u(w),this._zoomIn=new Pf({numTouches:1,numTaps:2}),this._zoomOut=new Pf({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),se=this._zoomOut.touchend(w,B,Q),qe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:qe.zoom+1,around:qe.unproject(ee)},{originalEvent:w})}):se?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:qe.zoom-1,around:qe.unproject(se)},{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){le.mousedown=le.dragStart,le.mousemoveWindow=le.dragMove,le.mouseup=le.dragEnd,le.contextmenu=w=>{w.preventDefault()}},Dl=({enable:le,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new pc({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,se)=>({bearingDelta:(se.x-ee.x)*B}),moveStateManager:Q,enable:le,assignEvents:Ph})},Ih=({enable:le,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new pc({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,se)=>({pitchDelta:(se.y-ee.y)*B}),moveStateManager:Q,enable:le,assignEvents:Ph})};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=Lh(Q,B),se=new a.P(0,0),qe=new a.P(0,0),je=0;for(let yt in ee){let Ot=ee[yt],Nt=this._touches[yt];Nt&&(se._add(Ot),qe._add(Ot.sub(Nt)),je++,ee[yt]=Ot)}if(this._touches=ee,this._shouldBePrevented(je)||!qe.mag())return;let it=qe.div(je);return this._sum._add(it),this._sum.mag()Math.abs(le.x)}class gf extends Dc{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,nc(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]),se=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,se,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+se.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,se=B.mag()>=2;if(!ee&&!se)return;if(!ee||!se)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let qe=w.y>0==B.y>0;return nc(w)&&nc(B)&&qe}}let gt={panStep:100,bearingStep:15,pitchStep:10};class Bt{constructor(w){this._tr=new _u(w);let B=gt;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,se=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(),se=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),se=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:je=>{let it=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:wr,zoom:B?Math.round(it.zoom)+B*(w.shiftKey?2:1):it.zoom,bearing:it.bearing+Q*this._bearingStep,pitch:it.pitch+ee*this._pitchStep,offset:[-se*this._panStep,-qe*this._panStep],center:it.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 wr(le){return le*(2-le)}let vr=4.000244140625;class Ur{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new _u(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%vr==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 it=this._type==="wheel"&&Math.abs(this._delta)>vr?this._wheelZoomRate:this._defaultZoomRate,yt=2/(1+Math.exp(-Math.abs(this._delta*it)));this._delta<0&&yt!==0&&(yt=1/yt);let Ot=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Ot*yt))),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,se,qe=!1,je=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&je){let it=Math.min(je/200,1),yt=ee(it);se=a.y.number(Q,B,yt),it<1?this._frameId||(this._frameId=!0):qe=!0}else se=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:se-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,se=Q.easing(ee+.01)-Q.easing(ee),qe=.27/Math.sqrt(se*se+1e-4)*.01,je=Math.sqrt(.0729-qe*qe);B=a.b8(qe,je,.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 fi{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 _u(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 Fi{constructor(){this._tap=new Pf({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],se=w.timeStamp-this._tapTime<500,qe=this._tapPoint.dist(ee)<30;se&&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],se=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:se/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 Xi{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 hn{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 Ti{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 se=document.createElement("div");se.className="maplibregl-mobile-message",se.textContent=Q,this._container.appendChild(se),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 Ii=le=>le.zoom||le.drag||le.pitch||le.rotate;class mi extends a.k{}function Pn(le){return le.panDelta&&le.panDelta.mag()||le.zoomDelta||le.bearingDelta||le.pitchDelta}class Ma{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,se)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let qe=ee.type==="renderFrame"?void 0:ee,je={needsRenderFrame:!1},it={},yt={},Ot=ee.touches,Nt=Ot?this._getMapTouches(Ot):void 0,hr=Nt?c.touchPos(this._map.getCanvas(),Nt):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:be,handler:Pe,allowed:Oe}of this._handlers){if(!Pe.isEnabled())continue;let Je;this._blockedByActive(yt,Oe,be)?Pe.reset():Pe[se||ee.type]&&(Je=Pe[se||ee.type](ee,hr,Nt),this.mergeHandlerResult(je,it,Je,be,qe),Je&&Je.needsRenderFrame&&this._triggerRenderFrame()),(Je||Pe.isActive())&&(yt[be]=Pe)}let Sr={};for(let be in this._previousActiveHandlers)yt[be]||(Sr[be]=qe);this._previousActiveHandlers=yt,(Object.keys(Sr).length||Pn(je))&&(this._changes.push([je,it,Sr]),this._triggerRenderFrame()),(Object.keys(yt).length||Pn(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:he}=je;he&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],he(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Uf(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,se,qe]of this._listeners)c.addEventListener(ee,se,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 sh(B,w));let ee=B.boxZoom=new xu(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let se=B.cooperativeGestures=new qi(B,w.cooperativeGestures);this._add("cooperativeGestures",se),w.cooperativeGestures&&se.enable();let qe=new Ic(B),je=new xi(B);B.doubleClickZoom=new fi(je,qe),this._add("tapZoom",qe),this._add("clickZoom",je),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let it=new Fi;this._add("tapDragZoom",it);let yt=B.touchPitch=new gf(B);this._add("touchPitch",yt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Ot=Dl(w),Nt=Ih(w);B.dragRotate=new hn(w,Ot,Nt),this._add("mouseRotate",Ot,["mousePitch"]),this._add("mousePitch",Nt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let hr=(({enable:Je,clickTolerance:He})=>{let et=new pc({checkCorrectEvent:Mt=>c.mouseButton(Mt)===0&&!Mt.ctrlKey});return new Wu({clickTolerance:He,move:(Mt,Rt)=>({around:Rt,panDelta:Rt.sub(Mt)}),activateOnStart:!0,moveStateManager:et,enable:Je,assignEvents:Ph})})(w),Sr=new Zu(w,B);B.dragPan=new Xi(Q,hr,Sr),this._add("mousePan",hr),this._add("touchPan",Sr,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let he=new Yc,be=new ru;B.touchZoomRotate=new Ti(Q,be,he,it),this._add("touchRotate",he,["touchPan","touchZoom"]),this._add("touchZoom",be,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Pe=B.scrollZoom=new Ur(B,()=>this._triggerRenderFrame());this._add("scrollZoom",Pe,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Oe=B.keyboard=new Bt(B);this._add("keyboard",Oe),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Fs(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!!Ii(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,se){if(!Q)return;a.e(w,Q);let qe={handlerName:ee,originalEvent:Q.originalEvent||se};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,se,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,se),a.e(Q,qe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,se=ee._getTransformForUpdate(),qe=ee.terrain;if(!(Pn(w)||qe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:je,zoomDelta:it,bearingDelta:yt,pitchDelta:Ot,around:Nt,pinchAround:hr}=w;hr!==void 0&&(Nt=hr),ee._stop(!0),Nt=Nt||ee.transform.centerPoint;let Sr=se.pointLocation(je?Nt.sub(je):Nt);yt&&(se.bearing+=yt),Ot&&(se.pitch+=Ot),it&&(se.zoom+=it),qe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?se.center=se.pointLocation(se.centerPoint.sub(je)):se.setLocationAtPoint(Sr,Nt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,se.setLocationAtPoint(Sr,Nt)):se.setLocationAtPoint(Sr,Nt),ee._applyUpdatedTransform(se),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=Ii(this._eventsInProgress),se=Ii(w),qe={};for(let Nt in w){let{originalEvent:hr}=w[Nt];this._eventsInProgress[Nt]||(qe[`${Nt}start`]=hr),this._eventsInProgress[Nt]=w[Nt]}!ee&&se&&this._fireEvent("movestart",se.originalEvent);for(let Nt in qe)this._fireEvent(Nt,qe[Nt]);se&&this._fireEvent("move",se.originalEvent);for(let Nt in w){let{originalEvent:hr}=w[Nt];this._fireEvent(Nt,hr)}let je={},it;for(let Nt in this._eventsInProgress){let{handlerName:hr,originalEvent:Sr}=this._eventsInProgress[Nt];this._handlersById[hr].isActive()||(delete this._eventsInProgress[Nt],it=B[hr]||Sr,je[`${Nt}end`]=it)}for(let Nt in je)this._fireEvent(Nt,je[Nt]);let yt=Ii(this._eventsInProgress),Ot=(ee||se)&&!yt;if(Ot&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Nt=this._map._getTransformForUpdate();Nt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Nt)}if(Q&&Ot){this._updatingCamera=!0;let Nt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),hr=Sr=>Sr!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ta 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(se,Pe,Ut)),this._rotating&&(ee.bearing=a.y.number(qe,yt,Ut)),this._pitching&&(ee.pitch=a.y.number(je,Ot,Ut)),this._padding&&(ee.interpolatePadding(it,Nt,Ut),Sr=ee.centerPoint.add(hr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Ut),et)ee.setLocationAtPoint(et,Mt);else{let tr=ee.zoomScale(ee.zoom-se),mr=Pe>se?Math.min(2,He):Math.max(.5,He),Dr=Math.pow(mr,1-Ut),zr=ee.unproject(Oe.add(Je.mult(Ut*Dr)).mult(tr));ee.setLocationAtPoint(ee.renderWorldCopies?zr.wrap():zr,Sr)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},Ut=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,Ut)},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 se=Q.clone(),{center:qe,zoom:je,pitch:it,bearing:yt,elevation:Ot}=ee(se);qe&&(se.center=qe),je!==void 0&&(se.zoom=je),it!==void 0&&(se.pitch=it),yt!==void 0&&(se.bearing=yt),Ot!==void 0&&(se.elevation=Ot),Q.apply(se)}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,se=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)),se&&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 Qi=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Qi,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),se=ee.zoom,qe=ee.bearing,je=ee.pitch,it=ee.padding,yt="bearing"in w?this._normalizeBearing(w.bearing,qe):qe,Ot="pitch"in w?+w.pitch:je,Nt="padding"in w?w.padding:ee.padding,hr=a.P.convert(w.offset),Sr=ee.centerPoint.add(hr),he=ee.pointLocation(Sr),{center:be,zoom:Pe}=ee.getConstrained(a.N.convert(w.center||he),(Q=w.zoom)!==null&&Q!==void 0?Q:se);this._normalizeCenter(be,ee);let Oe=ee.zoomScale(Pe-se),Je=ee.project(he),He=ee.project(be).sub(Je),et=w.curve,Mt=Math.max(ee.width,ee.height),Rt=Mt/Oe,Ut=He.mag();if("minZoom"in w){let Qi=a.ac(Math.min(w.minZoom,se,Pe),ee.minZoom,ee.maxZoom),Mn=Mt/ee.zoomScale(Qi-se);et=Math.sqrt(Mn/Ut*2)}let tr=et*et;function mr(Qi){let Mn=(Rt*Rt-Mt*Mt+(Qi?-1:1)*tr*tr*Ut*Ut)/(2*(Qi?Rt:Mt)*tr*Ut);return Math.log(Math.sqrt(Mn*Mn+1)-Mn)}function Dr(Qi){return(Math.exp(Qi)-Math.exp(-Qi))/2}function zr(Qi){return(Math.exp(Qi)+Math.exp(-Qi))/2}let Xr=mr(!1),di=function(Qi){return zr(Xr)/zr(Xr+et*Qi)},Li=function(Qi){return Mt*((zr(Xr)*(Dr(Mn=Xr+et*Qi)/zr(Mn))-Dr(Xr))/tr)/Ut;var Mn},Ci=(mr(!0)-Xr)/et;if(Math.abs(Ut)<1e-6||!isFinite(Ci)){if(Math.abs(Mt-Rt)<1e-6)return this.easeTo(w,B);let Qi=Rt0,di=Mn=>Math.exp(Qi*et*Mn)}return w.duration="duration"in w?+w.duration:1e3*Ci/("screenSpeed"in w?+w.screenSpeed/et:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=qe!==yt,this._pitching=Ot!==je,this._padding=!ee.isPaddingEqual(Nt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(be),this._ease(Qi=>{let Mn=Qi*Ci,pa=1/di(Mn);ee.zoom=Qi===1?Pe:se+ee.scaleZoom(pa),this._rotating&&(ee.bearing=a.y.number(qe,yt,Qi)),this._pitching&&(ee.pitch=a.y.number(je,Ot,Qi)),this._padding&&(ee.interpolatePadding(it,Nt,Qi),Sr=ee.centerPoint.add(hr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Qi);let ea=Qi===1?be:ee.unproject(Je.add(He.mult(Li(Mn))).mult(pa));ee.setLocationAtPoint(ee.renderWorldCopies?ea.wrap():ea,Sr),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 Ea={compact:!0,customAttribution:'
MapLibre'};class qa{constructor(w=Ea){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 se=B[ee];if(se.used||se.usedForTerrain){let qe=se.getSource();qe.attribution&&w.indexOf(qe.attribution)<0&&w.push(qe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,se)=>ee.length-se.length),w=w.filter((ee,se)=>{for(let qe=se+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 Cn{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 sn{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 Ua=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class mo 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 Lt(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 se=w.clone();se.posMatrix=new Float64Array(16),a.aP(se.posMatrix,0,a.X,0,a.X,0,1),B[Q]=se}else if(ee.canonical.isChildOf(w.canonical)){let se=w.clone();se.posMatrix=new Float64Array(16);let qe=ee.canonical.z-w.canonical.z,je=ee.canonical.x-(ee.canonical.x>>qe<>qe<>qe;a.aP(se.posMatrix,0,yt,0,yt,0,1),a.J(se.posMatrix,se.posMatrix,[-je*yt,-it*yt,0]),B[Q]=se}else if(w.canonical.isChildOf(ee.canonical)){let se=w.clone();se.posMatrix=new Float64Array(16);let qe=w.canonical.z-ee.canonical.z,je=w.canonical.x-(w.canonical.x>>qe<>qe<>qe;a.aP(se.posMatrix,0,a.X,0,a.X,0,1),a.J(se.posMatrix,se.posMatrix,[je*yt,it*yt,0]),a.K(se.posMatrix,se.posMatrix,[1/2**qe,1/2**qe,0]),B[Q]=se}}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&&(!se||!se.dem);)se=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return se}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 mo(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 se;if(!(B>=0&&B=0&&Qw.canonical.z&&(w.canonical.z>=ee?se=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let qe=w.canonical.x-(w.canonical.x>>se<>se<>8<<4|se>>8,B[qe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new p(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,se=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),qe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(se,je-qe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let it=B[0]+(B[2]>>4<<8),yt=B[1]+((15&B[2])<<8),Ot=this.coordsIndex[255-B[3]],Nt=Ot&&this.sourceCache.getTileByID(Ot);if(!Nt)return null;let hr=this._coordsTextureSize,Sr=(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 Qo={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ys{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ts(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 se of ee){let qe=this.terrain.sourceCache.getTerrainCoords(se);for(let je in qe)this._coordsDescendingInv[Q][je]||(this._coordsDescendingInv[Q][je]=[]),this._coordsDescendingInv[Q][je].push(qe[je])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],se=ee.source;if(Qo[ee.type]&&!this._coordsDescendingInvStr[se]){this._coordsDescendingInvStr[se]={};for(let qe in this._coordsDescendingInv[se])this._coordsDescendingInvStr[se][qe]=this._coordsDescendingInv[se][qe].map(je=>je.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let se=this._coordsDescendingInvStr[ee][Q.tileID.key];se&&se!==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(Qo[B]&&(this._prevType&&Qo[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(Qo[this._prevType]||Qo[B]&&ee){this._prevType=B;let se=this._stacks.length-1,qe=this._stacks[se]||[];for(let je of this._renderableTiles){if(this.pool.isFull()&&(eu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(je),je.rtt[se]){let yt=this.pool.getObjectForId(je.rtt[se].id);if(yt.stamp===je.rtt[se].stamp){this.pool.useObject(yt);continue}}let it=this.pool.getOrCreateFreeObject();this.pool.useObject(it),this.pool.stampObject(it),je.rtt[se]={id:it.id,stamp:it.stamp},Q.context.bindFramebuffer.set(it.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let yt=0;yt{le.touchstart=le.dragStart,le.touchmoveWindow=le.dragMove,le.touchend=le.dragEnd},ia={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ka{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(),se=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Dl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:qe,clickTolerance:je,bearingDegreesPerPixelMoved:it=.8})=>{let yt=new pf;return new Wu({clickTolerance:je,move:(Ot,Nt)=>({bearingDelta:(Nt.x-Ot.x)*it}),moveStateManager:yt,enable:qe,assignEvents:Ds})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=Ih({clickTolerance:se,enable:!0}),this.touchPitch=(({enable:qe,clickTolerance:je,pitchDegreesPerPixelMoved:it=-.5})=>{let yt=new pf;return new Wu({clickTolerance:je,move:(Ot,Nt)=>({pitchDelta:(Nt.y-Ot.y)*it}),moveStateManager:yt,enable:qe,assignEvents:Ds})})({clickTolerance:se,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:se}=this.mousePitch.dragMove(w,B)||{};se&&Q.setPitch(Q.getPitch()+se)}}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:se}=this.touchPitch.dragMove(w,B)||{};se&&Q.setPitch(Q.getPitch()+se)}}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 vs;function Ko(le,w,B){let Q=new a.N(le.lng,le.lat);if(le=new a.N(le.lng,le.lat),w){let ee=new a.N(le.lng-360,le.lat),se=new a.N(le.lng+360,le.lat),qe=B.locationPoint(le).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(le);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;le.lng>B.center.lng?le.lng-=360:le.lng+=360}return le.lng!==Q.lng&&B.locationPoint(le).y>B.height/2-B.getHorizon()?le:Q}let iu={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 Du(le,w,B){let Q=le.classList;for(let ee in iu)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class ac 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?Ko(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 se="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?se=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(se=`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,`${iu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${qe} ${se}`),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 se=c.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"stroke","none"),se.setAttributeNS(null,"stroke-width","1"),se.setAttributeNS(null,"fill","none"),se.setAttributeNS(null,"fill-rule","evenodd");let qe=c.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"fill-rule","nonzero");let je=c.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let it=[{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 Oe of it){let Je=c.createNS("http://www.w3.org/2000/svg","ellipse");Je.setAttributeNS(null,"opacity","0.04"),Je.setAttributeNS(null,"cx","10.5"),Je.setAttributeNS(null,"cy","5.80029008"),Je.setAttributeNS(null,"rx",Oe.rx),Je.setAttributeNS(null,"ry",Oe.ry),je.appendChild(Je)}let yt=c.createNS("http://www.w3.org/2000/svg","g");yt.setAttributeNS(null,"fill",this._color);let Ot=c.createNS("http://www.w3.org/2000/svg","path");Ot.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"),yt.appendChild(Ot);let Nt=c.createNS("http://www.w3.org/2000/svg","g");Nt.setAttributeNS(null,"opacity","0.25"),Nt.setAttributeNS(null,"fill","#000000");let hr=c.createNS("http://www.w3.org/2000/svg","path");hr.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"),Nt.appendChild(hr);let Sr=c.createNS("http://www.w3.org/2000/svg","g");Sr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Sr.setAttributeNS(null,"fill","#FFFFFF");let he=c.createNS("http://www.w3.org/2000/svg","g");he.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 Pe=c.createNS("http://www.w3.org/2000/svg","circle");Pe.setAttributeNS(null,"fill","#FFFFFF"),Pe.setAttributeNS(null,"cx","5.5"),Pe.setAttributeNS(null,"cy","5.5"),Pe.setAttributeNS(null,"r","5.4999962"),he.appendChild(be),he.appendChild(Pe),qe.appendChild(je),qe.appendChild(yt),qe.appendChild(Nt),qe.appendChild(Sr),qe.appendChild(he),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()}),Du(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,se=ee.terrain.depthAtPoint(this._pos),qe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,qe)-se<.006)return void(this._element.style.opacity=this._opacity);let je=-this._offset.y/ee.transform._pixelPerMeter,it=Math.sin(ee.getPitch()*Math.PI/180)*je,yt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Ot=ee.transform.lngLatToCameraDepth(this._lngLat,qe+it)-yt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Ot&&this._popup.remove(),this._element.style.opacity=Ot?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 mf={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Kc=!1,Ru={maxWidth:100,unit:"metric"};function Rc(le,w,B){let Q=B&&B.maxWidth||100,ee=le._container.clientHeight/2,se=le.unproject([0,ee]),qe=le.unproject([Q,ee]),je=se.distanceTo(qe);if(B&&B.unit==="imperial"){let it=3.2808*je;it>5280?Ra(w,Q,it/5280,le._getUIString("ScaleControl.Miles")):Ra(w,Q,it,le._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ra(w,Q,je/1852,le._getUIString("ScaleControl.NauticalMiles")):je>=1e3?Ra(w,Q,je/1e3,le._getUIString("ScaleControl.Kilometers")):Ra(w,Q,je,le._getUIString("ScaleControl.Meters"))}function Ra(le,w,B,Q){let ee=function(se){let qe=Math.pow(10,`${Math.floor(se)}`.length-1),je=se/qe;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(it){let yt=Math.pow(10,Math.ceil(-Math.log(it)/Math.LN10));return Math.round(it*yt)/yt}(je),qe*je}(B);le.style.width=w*(ee/B)+"px",le.innerHTML=`${ee} ${Q}`}let eo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Jc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function yc(le){if(le){if(typeof le=="number"){let w=Math.round(Math.abs(le)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,le),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-le),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(le,0),right:new a.P(-le,0)}}if(le instanceof a.P||Array.isArray(le)){let w=a.P.convert(le);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(le.center||[0,0]),top:a.P.convert(le.top||[0,0]),"top-left":a.P.convert(le["top-left"]||[0,0]),"top-right":a.P.convert(le["top-right"]||[0,0]),bottom:a.P.convert(le.bottom||[0,0]),"bottom-left":a.P.convert(le["bottom-left"]||[0,0]),"bottom-right":a.P.convert(le["bottom-right"]||[0,0]),left:a.P.convert(le.left||[0,0]),right:a.P.convert(le.right||[0,0])}}return yc(new a.P(0,0))}let _c=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=qa,i.BoxZoomHandler=xu,i.CanvasSource=Ct,i.CooperativeGesturesHandler=qi,i.DoubleClickZoomHandler=fi,i.DragPanHandler=Xi,i.DragRotateHandler=hn,i.EdgeInsets=ic,i.FullscreenControl=class extends a.E{constructor(le={}){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,le&&le.container&&(le.container instanceof HTMLElement?this._container=le.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(le){return this._map=le,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 le=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",le).setAttribute("aria-hidden","true"),le.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let le=this._getTitle();this._fullscreenButton.setAttribute("aria-label",le),this._fullscreenButton.title=le}_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=rt,i.GeolocateControl=class extends a.E{constructor(le){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(),se=a.e({bearing:ee},this.options.fitBoundsOptions),qe=ce.fromLngLat(B,Q);this._map.fitBounds(qe,se,{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&&Kc)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 ac({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ac({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({},mf,le)}onAdd(le){return this._map=le,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(vs!==void 0&&!w)return vs;if(window.navigator.permissions===void 0)return vs=!!window.navigator.geolocation,vs;try{vs=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){vs=!!window.navigator.geolocation}return vs})}().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,bu=0,Kc=!1}_isOutOfMapMaxBounds(le){let w=this._map.getMaxBounds(),B=le.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 le=this._map.getBounds(),w=le.getSouthEast(),B=le.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":bu--,Kc=!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 le;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(le={maximumAge:6e5,timeout:0},Kc=!0):(le=this.options.positionOptions,Kc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,le)}}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=gd,i.ImageSource=Dt,i.KeyboardHandler=Bt,i.LngLatBounds=ce,i.LogoControl=Cn,i.Map=class extends Ta{constructor(le){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Gs),le);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 Qs(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new sn,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({},Bo),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=g.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(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=Qh(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 Ma(this,w),this._hash=w.hash&&new gd(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 qa(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Cn,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(le,w){if(w===void 0&&(w=le.getDefaultPosition?le.getDefaultPosition():"top-right"),!le||!le.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=le.onAdd(this);this._controls.push(le);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(le){if(!le||!le.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(le);return w>-1&&this._controls.splice(w,1),le.onRemove(this),this}hasControl(le){return this._controls.indexOf(le)>-1}calculateCameraOptionsFromTo(le,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(le,w,B,Q)}resize(le){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],se=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,se),this.painter.resize(Q,ee,se),this.painter.overLimit()){let je=this.painter.context.gl;this._maxCanvasSize=[je.drawingBufferWidth,je.drawingBufferHeight];let it=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,it),this.painter.resize(Q,ee,it)}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",le)).fire(new a.k("move",le))),this.fire(new a.k("resize",le)),qe&&this.fire(new a.k("moveend",le)),this}_getClampedPixelRatio(le,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),se=le*ee,qe=w*ee;return Math.min(se>B?B/se:1,qe>Q?Q/qe:1)*ee}getPixelRatio(){var le;return(le=this._overridePixelRatio)!==null&&le!==void 0?le:devicePixelRatio}setPixelRatio(le){this._overridePixelRatio=le,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(le){return this.transform.setMaxBounds(ce.convert(le)),this._update()}setMinZoom(le){if((le=le==null?-2:le)>=-2&&le<=this.transform.maxZoom)return this.transform.minZoom=le,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=le,this._update(),this.getZoom()>le&&this.setZoom(le),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(le){if((le=le==null?0:le)<0)throw new Error("minPitch must be greater than or equal to 0");if(le>=0&&le<=this.transform.maxPitch)return this.transform.minPitch=le,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(le>=this.transform.minPitch)return this.transform.maxPitch=le,this._update(),this.getPitch()>le&&this.setPitch(le),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(le){return this.transform.renderWorldCopies=le,this._update()}project(le){return this.transform.locationPoint(a.N.convert(le),this.style&&this.terrain)}unproject(le){return this.transform.pointLocation(a.P.convert(le),this.terrain)}isMoving(){var le;return this._moving||((le=this.handlers)===null||le===void 0?void 0:le.isMoving())}isZooming(){var le;return this._zooming||((le=this.handlers)===null||le===void 0?void 0:le.isZooming())}isRotating(){var le;return this._rotating||((le=this.handlers)===null||le===void 0?void 0:le.isRotating())}_createDelegatedListener(le,w,B){if(le==="mouseenter"||le==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:se=>{let qe=w.filter(it=>this.getLayer(it)),je=qe.length!==0?this.queryRenderedFeatures(se.point,{layers:qe}):[];je.length?Q||(Q=!0,B.call(this,new tu(le,this,se.originalEvent,{features:je}))):Q=!1},mouseout:()=>{Q=!1}}}}if(le==="mouseleave"||le==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:qe=>{let je=w.filter(it=>this.getLayer(it));(je.length!==0?this.queryRenderedFeatures(qe.point,{layers:je}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new tu(le,this,qe.originalEvent)))},mouseout:qe=>{Q&&(Q=!1,B.call(this,new tu(le,this,qe.originalEvent)))}}}}{let Q=ee=>{let se=w.filter(je=>this.getLayer(je)),qe=se.length!==0?this.queryRenderedFeatures(ee.point,{layers:se}):[];qe.length&&(ee.features=qe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[le]:Q}}}}_saveDelegatedListener(le,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[le]=this._delegatedListeners[le]||[],this._delegatedListeners[le].push(w)}_removeDelegatedListener(le,w,B){if(!this._delegatedListeners||!this._delegatedListeners[le])return;let Q=this._delegatedListeners[le];for(let ee=0;eew.includes(qe))){for(let qe in se.delegates)this.off(qe,se.delegates[qe]);return void Q.splice(ee,1)}}}on(le,w,B){if(B===void 0)return super.on(le,w);let Q=this._createDelegatedListener(le,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(le,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(le,w,B){if(B===void 0)return super.once(le,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(le,Q,B);for(let se in ee.delegates){let qe=ee.delegates[se];ee.delegates[se]=(...je)=>{this._removeDelegatedListener(le,Q,B),qe(...je)}}this._saveDelegatedListener(le,ee);for(let se in ee.delegates)this.once(se,ee.delegates[se]);return this}off(le,w,B){return B===void 0?super.off(le,w):(this._removeDelegatedListener(le,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(le,w){if(!this.style)return[];let B,Q=le instanceof a.P||Array.isArray(le),ee=Q?le:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:le)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let se=a.P.convert(ee[0]),qe=a.P.convert(ee[1]);B=[se,new a.P(qe.x,se.y),qe,new a.P(se.x,qe.y),se]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(le,w){return this.style.querySourceFeatures(le,w)}setStyle(le,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&le?(this._diffStyle(le,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(le,w))}setTransformRequest(le){return this._requestManager.setTransformRequest(le),this}_getUIString(le){let w=this._locale[le];if(w==null)throw new Error(`Missing UI string '${le}'`);return w}_updateStyle(le,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(le,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!le)),le?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof le=="string"?this.style.loadURL(le,w,B):this.style.loadJSON(le,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(le,w){if(typeof le=="string"){let B=this._requestManager.transformRequest(le,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof le=="object"&&this._updateDiff(le,w)}_updateDiff(le,w){try{this.style.setState(le,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(le,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(le,w){return this._lazyInitEmptyStyle(),this.style.addSource(le,w),this._update(!0)}isSourceLoaded(le){let w=this.style&&this.style.sourceCaches[le];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${le}'`)))}setTerrain(le){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),le){let w=this.style.sourceCaches[le.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${le.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===le.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,le),this.painter.renderToTexture=new ys(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!==le.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:le})),this}getTerrain(){var le,w;return(w=(le=this.terrain)===null||le===void 0?void 0:le.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let le=this.style&&this.style.sourceCaches;for(let w in le){let B=le[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(le){return this.style.removeSource(le),this._update(!0)}getSource(le){return this.style.getSource(le)}addImage(le,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:se,stretchY:qe,content:je,textFitWidth:it,textFitHeight:yt}=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:Ot,height:Nt,data:hr}=w,Sr=w;return this.style.addImage(le,{data:new a.R({width:Ot,height:Nt},new Uint8Array(hr)),pixelRatio:Q,stretchX:se,stretchY:qe,content:je,textFitWidth:it,textFitHeight:yt,sdf:ee,version:0,userImage:Sr}),Sr.onAdd&&Sr.onAdd(this,le),this}}{let{width:Ot,height:Nt,data:hr}=u.getImageData(w);this.style.addImage(le,{data:new a.R({width:Ot,height:Nt},hr),pixelRatio:Q,stretchX:se,stretchY:qe,content:je,textFitWidth:it,textFitHeight:yt,sdf:ee,version:0})}}updateImage(le,w){let B=this.style.getImage(le);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:se,data:qe}=Q;if(ee===void 0||se===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||se!==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 je=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(qe,je),this.style.updateImage(le,B),this}getImage(le){return this.style.getImage(le)}hasImage(le){return le?!!this.style.getImage(le):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(le){this.style.removeImage(le)}loadImage(le){return g.getImage(this._requestManager.transformRequest(le,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(le,w){return this._lazyInitEmptyStyle(),this.style.addLayer(le,w),this._update(!0)}moveLayer(le,w){return this.style.moveLayer(le,w),this._update(!0)}removeLayer(le){return this.style.removeLayer(le),this._update(!0)}getLayer(le){return this.style.getLayer(le)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(le,w,B){return this.style.setLayerZoomRange(le,w,B),this._update(!0)}setFilter(le,w,B={}){return this.style.setFilter(le,w,B),this._update(!0)}getFilter(le){return this.style.getFilter(le)}setPaintProperty(le,w,B,Q={}){return this.style.setPaintProperty(le,w,B,Q),this._update(!0)}getPaintProperty(le,w){return this.style.getPaintProperty(le,w)}setLayoutProperty(le,w,B,Q={}){return this.style.setLayoutProperty(le,w,B,Q),this._update(!0)}getLayoutProperty(le,w){return this.style.getLayoutProperty(le,w)}setGlyphs(le,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(le,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(le,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(le,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(le){return this._lazyInitEmptyStyle(),this.style.removeSprite(le),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(le,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(le,w,B=>{B||this._update(!0)}),this}setLight(le,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(le,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(le){return this._lazyInitEmptyStyle(),this.style.setSky(le),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(le,w){return this.style.setFeatureState(le,w),this._update()}removeFeatureState(le,w){return this.style.removeFeatureState(le,w),this._update()}getFeatureState(le){return this.style.getFeatureState(le)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let le=0,w=0;return this._container&&(le=this._container.clientWidth||400,w=this._container.clientHeight||300),[le,w]}_setupContainer(){let le=this._container;le.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",le);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",le),se=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(qe=>{se[qe]=c.create("div",`maplibregl-ctrl-${qe} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(le,w,B){this._canvas.width=Math.floor(B*le),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${le}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let le={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:le},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",le)||this._canvas.getContext("webgl",le);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Lc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(le){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||le,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(le){return this._update(),this._renderTaskQueue.add(le)}_cancelRenderFrame(le){this._renderTaskQueue.remove(le)}_render(le){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(le),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,se=u.now();this.style.zoomHistory.update(ee,se);let qe=new a.z(ee,{now:se,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),je=qe.crossFadingFactor();je===1&&je===this._crossFadingFactor||(B=!0,this._crossFadingFactor=je),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 le;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),g.removeThrottleControl(this._imageQueueHandle),(le=this._resizeObserver)===null||le===void 0||le.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(le=>{a.bf.frame(le),this._frameRequest=null,this._render(le)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(le){this._showTileBoundaries!==le&&(this._showTileBoundaries=le,this._update())}get showPadding(){return!!this._showPadding}set showPadding(le){this._showPadding!==le&&(this._showPadding=le,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(le){this._showCollisionBoxes!==le&&(this._showCollisionBoxes=le,le?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(le){this._showOverdrawInspector!==le&&(this._showOverdrawInspector=le,this._update())}get repaint(){return!!this._repaint}set repaint(le){this._repaint!==le&&(this._repaint=le,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(le){this._vertices=le,this._update()}get version(){return yl}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=tu,i.MapTouchEvent=vf,i.MapWheelEvent=md,i.Marker=ac,i.NavigationControl=class{constructor(le){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({},ia,le),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(le){return this._map=le,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 Ka(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(le,w){let B=c.create("button",le,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(le){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 je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}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?Ko(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,se=yc(this.options.offset);if(!ee){let je=this._container.offsetWidth,it=this._container.offsetHeight,yt;yt=Q.y+se.bottom.ythis._map.transform.height-it?["bottom"]:[],Q.xthis._map.transform.width-je/2&&yt.push("right"),ee=yt.length===0?"bottom":yt.join("-")}let qe=Q.add(se[ee]);this.options.subpixelPositioning||(qe=qe.round()),c.setTransform(this._container,`${iu[ee]} translate(${qe.x}px,${qe.y}px)`),Du(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(eo),le)}addTo(le){return this._map&&this.remove(),this._map=le,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(le){return this._lngLat=a.N.convert(le),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(le){return this.setDOMContent(document.createTextNode(le))}setHTML(le){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=le;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var le;return(le=this._container)===null||le===void 0?void 0:le.style.maxWidth}setMaxWidth(le){return this.options.maxWidth=le,this._update(),this}setDOMContent(le){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(le),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(le){return this._container&&this._container.classList.add(le),this}removeClassName(le){return this._container&&this._container.classList.remove(le),this}setOffset(le){return this.options.offset=le,this._update(),this}toggleClassName(le){if(this._container)return this._container.classList.toggle(le)}setSubpixelPositioning(le){this.options.subpixelPositioning=le}_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 le=this._container.querySelector(Jc);le&&le.focus()}},i.RasterDEMTileSource=qt,i.RasterTileSource=ct,i.ScaleControl=class{constructor(le){this._onMove=()=>{Rc(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Rc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Ru),le)}getDefaultPosition(){return"bottom-left"}onAdd(le){return this._map=le,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",le.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=Ur,i.Style=Ha,i.TerrainControl=class{constructor(le){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=le}onAdd(le){return this._map=le,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=gf,i.TwoFingersTouchRotateHandler=Yc,i.TwoFingersTouchZoomHandler=ru,i.TwoFingersTouchZoomRotateHandler=Ti,i.VectorTileSource=nt,i.VideoSource=kt,i.addSourceType=(le,w)=>a._(void 0,void 0,void 0,function*(){if(xr(le))throw new Error(`A source type called "${le}" already exists.`);((B,Q)=>{Yt[B]=Q})(le,w)}),i.clearPrewarmedResources=function(){let le=ge;le&&(le.isPreloaded()&&le.numActive()===1?(le.release(_e),ge=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return bt().getRTLTextPluginStatus()},i.getVersion=function(){return _c},i.getWorkerCount=function(){return Me.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(le){return Ae().broadcast("IS",le)},i.prewarm=function(){Te().acquire(_e)},i.setMaxParallelImageRequests=function(le){a.a.MAX_PARALLEL_IMAGE_REQUESTS=le},i.setRTLTextPlugin=function(le,w){return bt().setRTLTextPlugin(le,w)},i.setWorkerCount=function(le){Me.workerCount=le},i.setWorkerUrl=function(le){a.a.WORKER_URL=le}});var n=e;return n})});var HHe=ye((D1r,VHe)=>{"use strict";var iw=Mr(),sjt=Ll().sanitizeHTML,ljt=uJ(),BHe=bx();function NHe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=BHe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=NHe.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=i7(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,!!i7(e)){var r=ujt(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 UHe(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=ljt(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 ujt(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=sjt(e.sourceattribution)),n}VHe.exports=function(t,r,n){var i=new NHe(t,r);return i.update(n),i}});var JHe=ye((R1r,KHe)=>{"use strict";var pJ=OHe(),gJ=Mr(),WHe=ix(),GHe=ba(),cjt=Qa(),fjt=gv(),n7=Nc(),ZHe=Sg(),hjt=ZHe.drawMode,djt=ZHe.selectMode,vjt=wf().prepSelect,pjt=wf().clearOutline,gjt=wf().clearSelectionsCache,mjt=wf().selectOnClick,nw=bx(),yjt=HHe();function XHe(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 Sh=XHe.prototype;Sh.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)};Sh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=YHe(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:mJ(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(WHe.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Sh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=YHe(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(WHe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Sh.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&&mjt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&n7.click(n,l.originalEvent)}}};Sh.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=gJ.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),djt(a)||hjt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){vjt(l,u,c,t.dragOptions,a)},fjt.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))};Sh.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])};Sh.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 yJ=Mr(),xjt=k_(),bjt=Zd(),$He=Fk();QHe.exports=function(t,r,n){xjt(t,r,n,{type:"map",attributes:$He,handleDefaults:wjt,partition:"y"})};function wjt(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,bjt(e,t,{name:"layers",handleItemDefaults:Tjt}),t._input=e}function Tjt(e,t){function r(l,u){return yJ.coerce(e,t,$He.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",yJ.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"),yJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var o7=ye(l0=>{"use strict";var a7=Mr(),tGe=a7.strTranslate,Ajt=a7.strScale,Sjt=kd().getSubplotCalcData,Mjt=Zp(),Ejt=xa(),rGe=ao(),kjt=Ll(),Cjt=JHe(),wx="map";l0.name=wx;l0.attr="subplot";l0.idRoot=wx;l0.idRegex=l0.attrRegex=a7.counterRegex(wx);l0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};l0.layoutAttributes=Fk();l0.supplyLayoutDefaults=eGe();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[wx],a=0;ax/2){var b=f.split("|").join("
");d.text(b).attr("data-unformatted",b).call(kjt.convertToTspans,e),v=rGe.bBox(d.node())}d.attr("transform",tGe(-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 g=1;v.width+6>x&&(g=x/(v.width+6));var E=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",tGe(E[0],E[1])+Ajt(g))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=0;n{"use strict";iGe.exports={attributes:JF(),supplyDefaults:gHe(),colorbar:Kd(),formatLabels:lJ(),calc:lz(),plot:LHe(),hoverPoints:r7().hoverPoints,eventData:RHe(),selectPoints:FHe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:o7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var oGe=ye((O1r,aGe)=>{"use strict";aGe.exports=nGe()});var _J=ye((B1r,sGe)=>{"use strict";var d1=J5(),Ljt=Kl(),Pjt=Wo().hovertemplateAttrs,Ijt=vl(),Tx=no().extendFlat;sGe.exports=Tx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Tx({},d1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Tx({},d1.marker.line.color,{editType:"plot"}),width:Tx({},d1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Tx({},d1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Tx({},d1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Tx({},d1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d1.hoverinfo,hovertemplate:Pjt({},{keys:["properties"]}),showlegend:Tx({},Ijt.showlegend,{dflt:!1})},Ljt("",{cLetter:"z",editTypeOverride:"calc"}))});var uGe=ye((N1r,lGe)=>{"use strict";var Nk=Mr(),Djt=Uh(),Rjt=_J();lGe.exports=function(t,r,n,i){function a(c,f){return Nk.coerce(t,r,Rjt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!Nk.isArrayOrTypedArray(o)||!o.length||!Nk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||Nk.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),Djt(t,r,i,a,{prefix:"",cLetter:"z"}),Nk.coerceSelectionMarkerOpacity(r,a)}});var xJ=ye((U1r,hGe)=>{"use strict";var zjt=uo(),v1=Mr(),Fjt=Mu(),qjt=ao(),Ojt=tx().makeBlank,cGe=ix();function Bjt(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:Ojt()};if(!r)return a;var o=cGe.extractTraceFeature(e);if(!o)return a;var s=Fjt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;v1.isArrayOrTypedArray(l.opacity)&&(c=function(E){var k=E.mo;return zjt(k)?+v1.constrain(k,0,1):0});var f;v1.isArrayOrTypedArray(u.color)&&(f=function(E){return E.mlc});var h;v1.isArrayOrTypedArray(u.width)&&(h=function(E){return E.mlw});for(var d=0;d{"use strict";var vGe=xJ().convert,Njt=xJ().convertOnSelect,dGe=bx().traceLayerPrefix;function pGe(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",dGe+t+"-fill"],["line",dGe+t+"-line"]],this.below=null}var EA=pGe.prototype;EA.update=function(e){this._update(vGe(e)),e[0].trace._glTrace=this};EA.updateOnSelect=function(e){this._update(Njt(e))};EA._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])};EA.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};gGe.exports=function(t,r){var n=r[0].trace,i=new pGe(t,n.uid),a=i.sourceId,o=vGe(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 _Ge=ye((H1r,yGe)=>{"use strict";yGe.exports={attributes:_J(),supplyDefaults:uGe(),colorbar:S_(),calc:Lz(),plot:mGe(),hoverPoints:Iz(),eventData:Dz(),selectPoints:Rz(),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";xGe.exports=_Ge()});var wJ=ye((j1r,TGe)=>{"use strict";var Ujt=Kl(),Vjt=Wo().hovertemplateAttrs,wGe=vl(),s7=JF(),bJ=no().extendFlat;TGe.exports=bJ({lon:s7.lon,lat:s7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:s7.text,hovertext:s7.hovertext,hoverinfo:bJ({},wGe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:Vjt(),showlegend:bJ({},wGe.showlegend,{dflt:!1})},Ujt("",{cLetter:"z",editTypeOverride:"calc"}))});var SGe=ye((W1r,AGe)=>{"use strict";var Hjt=Mr(),Gjt=Uh(),jjt=wJ();AGe.exports=function(t,r,n,i){function a(u,c){return Hjt.coerce(t,r,jjt,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"),Gjt(t,r,i,a,{prefix:"",cLetter:"z"})}});var kGe=ye((Z1r,EGe)=>{"use strict";var TJ=uo(),Wjt=Mr().isArrayOrTypedArray,AJ=es().BADNUM,Zjt=zv(),MGe=Mr()._;EGe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=Wjt(a)&&a.length,s=0;s{"use strict";var Xjt=uo(),SJ=Mr(),CGe=va(),LGe=Mu(),PGe=es().BADNUM,Yjt=tx().makeBlank;IGe.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:Yjt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=SJ.isArrayOrTypedArray(l)&&l.length,f=SJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=LGe.extractOpts(r),g=b.reversescale?LGe.flipScale(b.colorscale):b.colorscale,E=g[0][1],k=CGe.opacity(E)<1?E:CGe.addOpacity(E,0),S=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var RGe=DGe(),Kjt=bx().traceLayerPrefix;function zGe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",Kjt+t+"-heatmap"]],this.below=null}var l7=zGe.prototype;l7.update=function(e){var t=this.subplot,r=this.layerList,n=RGe(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])};l7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};FGe.exports=function(t,r){var n=r[0].trace,i=new zGe(t,n.uid),a=i.sourceId,o=RGe(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 BGe=ye((K1r,OGe)=>{"use strict";var Jjt=Qa(),$jt=r7().hoverPoints,Qjt=r7().getExtraText;OGe.exports=function(t,r,n){var i=$jt(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=Jjt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=Qjt(s,l,o[0].t.labels),[a]}}});var UGe=ye((J1r,NGe)=>{"use strict";NGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var HGe=ye(($1r,VGe)=>{"use strict";VGe.exports={attributes:wJ(),supplyDefaults:SGe(),colorbar:S_(),formatLabels:lJ(),calc:kGe(),plot:qGe(),hoverPoints:BGe(),eventData:UGe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";GGe.exports=HGe()});var EJ=ye((t_r,YGe)=>{"use strict";var eWt=Su(),tWt=vl(),WGe=dh(),MJ=i3(),rWt=Ju().attributes,ZGe=Wo().hovertemplateAttrs,iWt=Kl(),nWt=Vs().templatedArray,aWt=Oc().descriptionOnlyNumbers,XGe=no().extendFlat,oWt=Bu().overrideAll,e_r=YGe.exports=oWt({hoverinfo:XGe({},tWt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:MJ.hoverlabel,domain:rWt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:aWt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:eWt({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:WGe.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:MJ.hoverlabel,hovertemplate:ZGe({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:WGe.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:MJ.hoverlabel,hovertemplate:ZGe({},{keys:["value","label"]}),colorscales:nWt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:XGe(iWt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var eje=ye((r_r,QGe)=>{"use strict";var kA=Mr(),u7=EJ(),sWt=va(),KGe=id(),lWt=Ju().defaults,JGe=oM(),$Ge=Vs(),uWt=Zd();QGe.exports=function(t,r,n,i){function a(S,L){return kA.coerce(t,r,u7,S,L)}var o=kA.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=$Ge.newContainer(r,"node");function u(S,L){return kA.coerce(s,l,u7.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),JGe(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 sWt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=$Ge.newContainer(r,"link");function v(S,L){return kA.coerce(h,d,u7.link,S,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),JGe(h,d,v,o),v("hovertemplate");var x=KGe(i.paper_bgcolor).getLuminance()<.333,b=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",g=v("color",b);function E(S){var L=KGe(S);if(!L.isValid())return S;var _=L.getAlpha();return _<=.8?L.setAlpha(_+.2):L=x?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(g)?g.map(E):E(g)),v("customdata"),uWt(h,d,{name:"colorscales",handleItemDefaults:cWt}),lWt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var k;l.x.length&&l.y.length&&(k="freeform"),a("arrangement",k),kA.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function cWt(e,t){function r(n,i){return kA.coerce(e,t,u7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var kJ=ye((i_r,tje)=>{"use strict";tje.exports=fWt;function fWt(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=E[E.length-1];var k=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=S}else{if(n[b]===r[b]){for(var _=[],C=[],M=0,S=g.length-1;S>=0;--S){var p=g[S];if(i[p]=!1,_.push(p),C.push(s[p]),M+=s[p].length,o[p]=c.length,p===b){g.length=S;break}}c.push(_);for(var P=new Array(M),S=0;S{"use strict";var hWt=kJ(),CA=Mr(),dWt=Km().wrap,Uk=CA.isArrayOrTypedArray,rje=CA.isIndex,ije=Mu();function vWt(e){var t=e.node,r=e.link,n=[],i=Uk(r.color),a=Uk(r.hovercolor),o=Uk(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 x=v+1;e.node._count=x;var b,g=e.node.groups,E={};for(c=0;c0&&rje(M,x)&&rje(p,x)&&!(E.hasOwnProperty(M)&&E.hasOwnProperty(p)&&E[M]===E[p])){E.hasOwnProperty(p)&&(p=E[p]),E.hasOwnProperty(M)&&(M=E[M]),M=+M,p=+p,s[M]=s[p]=!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:p,value:+C}),_.source.push(M),_.target.push(p)}}var F=x+g.length,q=Uk(t.color),V=Uk(t.customdata),H=[];for(c=0;cx-1,childrenNodes:[],pointNumber:c,label:X,color:q?t.color[c]:t.color,customdata:V?t.customdata[c]:t.customdata})}var G=!1;return pWt(F,_.source,_.target)&&(G=!0),{circular:G,links:n,nodes:H,groups:g,groupLookup:E}}function pWt(e,t,r){for(var n=CA.init2dArray(e,0),i=0;i1})}nje.exports=function(t,r){var n=vWt(r);return dWt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var sje=ye((c7,oje)=>{(function(e,t){typeof c7=="object"&&typeof oje!="undefined"?t(c7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(c7,function(e){"use strict";function t(C){var M=+this._x.call(null,C),p=+this._y.call(null,C);return r(this.cover(M,p),M,p,C)}function r(C,M,p,P){if(isNaN(M)||isNaN(p))return C;var T,F=C._root,q={data:P},V=C._x0,H=C._y0,X=C._x1,G=C._y1,N,W,re,ae,_e,Me,ke,ge;if(!F)return C._root=q,C;for(;F.length;)if((_e=M>=(N=(V+X)/2))?V=N:X=N,(Me=p>=(W=(H+G)/2))?H=W:G=W,T=F,!(F=F[ke=Me<<1|_e]))return T[ke]=q,C;if(re=+C._x.call(null,F.data),ae=+C._y.call(null,F.data),M===re&&p===ae)return q.next=F,T?T[ke]=q:C._root=q,C;do T=T?T[ke]=new Array(4):C._root=new Array(4),(_e=M>=(N=(V+X)/2))?V=N:X=N,(Me=p>=(W=(H+G)/2))?H=W:G=W;while((ke=Me<<1|_e)===(ge=(ae>=W)<<1|re>=N));return T[ge]=F,T[ke]=q,C}function n(C){var M,p,P=C.length,T,F,q=new Array(P),V=new Array(P),H=1/0,X=1/0,G=-1/0,N=-1/0;for(p=0;pG&&(G=T),FN&&(N=F));if(H>G||X>N)return this;for(this.cover(H,X).cover(G,N),p=0;pC||C>=T||P>M||M>=F;)switch(X=(MG||(V=ae.y0)>N||(H=ae.x1)=ke)<<1|C>=Me)&&(ae=W[W.length-1],W[W.length-1]=W[W.length-1-_e],W[W.length-1-_e]=ae)}else{var ge=C-+this._x.call(null,re.data),ie=M-+this._y.call(null,re.data),Te=ge*ge+ie*ie;if(Te=(W=(q+H)/2))?q=W:H=W,(_e=N>=(re=(V+X)/2))?V=re:X=re,M=p,!(p=p[Me=_e<<1|ae]))return this;if(!p.length)break;(M[Me+1&3]||M[Me+2&3]||M[Me+3&3])&&(P=M,ke=Me)}for(;p.data!==C;)if(T=p,!(p=p.next))return this;return(F=p.next)&&delete p.next,T?(F?T.next=F:delete T.next,this):M?(F?M[Me]=F:delete M[Me],(p=M[0]||M[1]||M[2]||M[3])&&p===(M[3]||M[2]||M[1]||M[0])&&!p.length&&(P?P[ke]=p:this._root=p),this):(this._root=F,this)}function c(C){for(var M=0,p=C.length;M{(function(e,t){typeof f7=="object"&&typeof lje!="undefined"?t(f7):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(f7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,b){return this[t+x]=b,this},remove:function(x){var b=t+x;return b in this&&delete this[b]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var b in this)b[0]===t&&x.push(b.slice(1));return x},values:function(){var x=[];for(var b in this)b[0]===t&&x.push(this[b]);return x},entries:function(){var x=[];for(var b in this)b[0]===t&&x.push({key:b.slice(1),value:this[b]});return x},size:function(){var x=0;for(var b in this)b[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var b in this)b[0]===t&&x(this[b],b.slice(1),this)}};function n(x,b){var g=new r;if(x instanceof r)x.each(function(_,C){g.set(C,_)});else if(Array.isArray(x)){var E=-1,k=x.length,S;if(b==null)for(;++E=x.length)return g!=null&&_.sort(g),E!=null?E(_):_;for(var P=-1,T=_.length,F=x[C++],q,V,H=n(),X,G=M();++Px.length)return _;var M,p=b[C-1];return E!=null&&C>=x.length?M=_.entries():(M=[],_.each(function(P,T){M.push({key:T,values:L(P,C)})})),p!=null?M.sort(function(P,T){return p(P.key,T.key)}):M}return k={object:function(_){return S(_,0,a,o)},map:function(_){return S(_,0,s,l)},entries:function(_){return L(S(_,0,s,l),0)},key:function(_){return x.push(_),k},sortKeys:function(_){return b[x.length-1]=_,k},sortValues:function(_){return g=_,k},rollup:function(_){return E=_,k}}}function a(){return{}}function o(x,b,g){x[b]=g}function s(){return n()}function l(x,b,g){x.set(b,g)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(x){return x+="",this[t+x]=x,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(x,b){var g=new u;if(x instanceof u)x.each(function(S){g.add(S)});else if(x){var E=-1,k=x.length;if(b==null)for(;++E{(function(e,t){typeof d7=="object"&&typeof uje!="undefined"?t(d7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(d7,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 v7=="object"&&typeof fje!="undefined"?t(v7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(v7,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=x.prototype={constructor:v,restart:function(C,M,p){if(typeof C!="function")throw new TypeError("callback is not a function");p=(p==null?h():+p)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=p,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function x(C,M,p){var P=new v;return P.restart(C,M,p),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 g(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,k(),l=0}}function E(){var C=c.now(),M=C-s;M>i&&(u-=M,s=C)}function k(){for(var C,M=a,p,P=1/0;M;)M._call?(P>M._time&&(P=M._time),C=M,M=M._next):(p=M._next,M._next=null,M=C?C._next=p:a=p);o=C,S(P)}function S(C){if(!t){r&&(r=clearTimeout(r));var M=C-l;M>24?(C<1/0&&(r=setTimeout(g,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(E,i)),t=1,f(g))}}function L(C,M,p){var P=new v;return M=M==null?0:+M,P.restart(function(T){P.stop(),C(T+M)},M,p),P}function _(C,M,p){var P=new v,T=M;return M==null?(P.restart(C,M,p),P):(M=+M,p=p==null?h():+p,P.restart(function F(q){q+=T,P.restart(F,T+=M,p),C(q)},M,p),P)}e.interval=_,e.now=h,e.timeout=L,e.timer=x,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var vje=ye((p7,dje)=>{(function(e,t){typeof p7=="object"&&typeof dje!="undefined"?t(p7,sje(),h7(),cje(),hje()):typeof define=="function"&&define.amd?define(["exports","d3-quadtree","d3-collection","d3-dispatch","d3-timer"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(p7,function(e,t,r,n,i){"use strict";function a(C,M){var p;C==null&&(C=0),M==null&&(M=0);function P(){var T,F=p.length,q,V=0,H=0;for(T=0;TN.index){var De=W-ze.x-ze.vx,ce=re-ze.y-ze.vy,Ge=De*De+ce*ce;GeW+me||Eere+me||AeH.r&&(H.r=H[X].r)}function V(){if(M){var H,X=M.length,G;for(p=new Array(X),H=0;H1?(_e==null?V.remove(ae):V.set(ae,re(_e)),M):V.get(ae)},find:function(ae,_e,Me){var ke=0,ge=C.length,ie,Te,Ee,Ae,ze;for(Me==null?Me=1/0:Me*=Me,ke=0;ke1?(X.on(ae,_e),M):X.on(ae)}}}function k(){var C,M,p,P=o(-30),T,F=1,q=1/0,V=.81;function H(W){var re,ae=C.length,_e=t.quadtree(C,v,x).visitAfter(G);for(p=W,re=0;re=q)return;(W.data!==M||W.next)&&(Me===0&&(Me=s(),ie+=Me*Me),ke===0&&(ke=s(),ie+=ke*ke),ie{(function(e,t){typeof g7=="object"&&typeof pje!="undefined"?t(g7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(g7,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,x=c-l,b=h-s,g=d-l,E=b*b+g*g;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(E>n)if(!(Math.abs(g*v-x*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var k=u-h,S=c-d,L=v*v+x*x,_=k*k+S*S,C=Math.sqrt(L),M=Math.sqrt(E),p=f*Math.tan((t-Math.acos((L+E-_)/(2*C*M)))/2),P=p/M,T=p/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*g)),this._+="A"+f+","+f+",0,0,"+ +(g*k>b*S)+","+(this._x1=s+T*v)+","+(this._y1=l+T*x)}},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),x=s+d,b=l+v,g=1^h,E=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+x+","+b:(Math.abs(this._x1-x)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+x+","+b),u&&(E<0&&(E=E%r+r),E>i?this._+="A"+u+","+u+",0,1,"+g+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+g+","+(this._x1=x)+","+(this._y1=b):E>n&&(this._+="A"+u+","+u+",0,"+ +(E>=t)+","+g+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var CJ=ye((m7,mje)=>{(function(e,t){typeof m7=="object"&&typeof mje!="undefined"?t(m7,gje()):typeof define=="function"&&define.amd?define(["exports","d3-path"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(m7,function(e,t){"use strict";function r(_t){return function(){return _t}}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(_t){return _t>1?0:_t<-1?f:Math.acos(_t)}function x(_t){return _t>=1?h:_t<=-1?-h:Math.asin(_t)}function b(_t){return _t.innerRadius}function g(_t){return _t.outerRadius}function E(_t){return _t.startAngle}function k(_t){return _t.endAngle}function S(_t){return _t&&_t.padAngle}function L(_t,br,Hr,ti,zi,Yi,an,hi){var Ji=Hr-_t,ua=ti-br,Fn=an-zi,Sa=hi-Yi,go=Sa*Ji-Fn*ua;if(!(go*go$l*$l+Gu*Gu&&(Cs=Ys,ml=Hs),{cx:Cs,cy:ml,x01:-Fn,y01:-Sa,x11:Cs*(zi/wl-1),y11:ml*(zi/wl-1)}}function C(){var _t=b,br=g,Hr=r(0),ti=null,zi=E,Yi=k,an=S,hi=null;function Ji(){var ua,Fn,Sa=+_t.apply(this,arguments),go=+br.apply(this,arguments),Oo=zi.apply(this,arguments)-h,ho=Yi.apply(this,arguments)-h,Mo=n(ho-Oo),xo=ho>Oo;if(hi||(hi=ua=t.path()),goc))hi.moveTo(0,0);else if(Mo>d-c)hi.moveTo(go*a(Oo),go*l(Oo)),hi.arc(0,0,go,Oo,ho,!xo),Sa>c&&(hi.moveTo(Sa*a(ho),Sa*l(ho)),hi.arc(0,0,Sa,ho,Oo,xo));else{var zs=Oo,ks=ho,Zs=Oo,Xs=ho,wl=Mo,os=Mo,cl=an.apply(this,arguments)/2,Cs=cl>c&&(ti?+ti.apply(this,arguments):u(Sa*Sa+go*go)),ml=s(n(go-Sa)/2,+Hr.apply(this,arguments)),Ys=ml,Hs=ml,Eo,fs;if(Cs>c){var $l=x(Cs/Sa*l(cl)),Gu=x(Cs/go*l(cl));(wl-=$l*2)>c?($l*=xo?1:-1,Zs+=$l,Xs-=$l):(wl=0,Zs=Xs=(Oo+ho)/2),(os-=Gu*2)>c?(Gu*=xo?1:-1,zs+=Gu,ks-=Gu):(os=0,zs=ks=(Oo+ho)/2)}var fc=go*a(zs),ms=go*l(zs),on=Sa*a(Xs),fa=Sa*l(Xs);if(ml>c){var Qu=go*a(ks),Il=go*l(ks),vo=Sa*a(Zs),Wl=Sa*l(Zs),Ks;if(Moc?Hs>c?(Eo=_(vo,Wl,fc,ms,go,Hs,xo),fs=_(Qu,Il,on,fa,go,Hs,xo),hi.moveTo(Eo.cx+Eo.x01,Eo.cy+Eo.y01),Hsc)||!(wl>c)?hi.lineTo(on,fa):Ys>c?(Eo=_(on,fa,Qu,Il,Sa,-Ys,xo),fs=_(fc,ms,vo,Wl,Sa,-Ys,xo),hi.lineTo(Eo.cx+Eo.x01,Eo.cy+Eo.y01),Ys=go;--Oo)hi.point(ks[Oo],Zs[Oo]);hi.lineEnd(),hi.areaEnd()}xo&&(ks[Sa]=+_t(Mo,Sa,Fn),Zs[Sa]=+Hr(Mo,Sa,Fn),hi.point(br?+br(Mo,Sa,Fn):ks[Sa],ti?+ti(Mo,Sa,Fn):Zs[Sa]))}if(zs)return hi=null,zs+""||null}function ua(){return F().defined(zi).curve(an).context(Yi)}return Ji.x=function(Fn){return arguments.length?(_t=typeof Fn=="function"?Fn:r(+Fn),br=null,Ji):_t},Ji.x0=function(Fn){return arguments.length?(_t=typeof Fn=="function"?Fn:r(+Fn),Ji):_t},Ji.x1=function(Fn){return arguments.length?(br=Fn==null?null:typeof Fn=="function"?Fn:r(+Fn),Ji):br},Ji.y=function(Fn){return arguments.length?(Hr=typeof Fn=="function"?Fn:r(+Fn),ti=null,Ji):Hr},Ji.y0=function(Fn){return arguments.length?(Hr=typeof Fn=="function"?Fn:r(+Fn),Ji):Hr},Ji.y1=function(Fn){return arguments.length?(ti=Fn==null?null:typeof Fn=="function"?Fn:r(+Fn),Ji):ti},Ji.lineX0=Ji.lineY0=function(){return ua().x(_t).y(Hr)},Ji.lineY1=function(){return ua().x(_t).y(ti)},Ji.lineX1=function(){return ua().x(br).y(Hr)},Ji.defined=function(Fn){return arguments.length?(zi=typeof Fn=="function"?Fn:r(!!Fn),Ji):zi},Ji.curve=function(Fn){return arguments.length?(an=Fn,Yi!=null&&(hi=an(Yi)),Ji):an},Ji.context=function(Fn){return arguments.length?(Fn==null?Yi=hi=null:hi=an(Yi=Fn),Ji):Yi},Ji}function V(_t,br){return br<_t?-1:br>_t?1:br>=_t?0:NaN}function H(_t){return _t}function X(){var _t=H,br=V,Hr=null,ti=r(0),zi=r(d),Yi=r(0);function an(hi){var Ji,ua=hi.length,Fn,Sa,go=0,Oo=new Array(ua),ho=new Array(ua),Mo=+ti.apply(this,arguments),xo=Math.min(d,Math.max(-d,zi.apply(this,arguments)-Mo)),zs,ks=Math.min(Math.abs(xo)/ua,Yi.apply(this,arguments)),Zs=ks*(xo<0?-1:1),Xs;for(Ji=0;Ji0&&(go+=Xs);for(br!=null?Oo.sort(function(wl,os){return br(ho[wl],ho[os])}):Hr!=null&&Oo.sort(function(wl,os){return Hr(hi[wl],hi[os])}),Ji=0,Sa=go?(xo-ua*Zs)/go:0;Ji0?Xs*Sa:0)+Zs,ho[Fn]={data:hi[Fn],index:Ji,value:Xs,startAngle:Mo,endAngle:zs,padAngle:ks};return ho}return an.value=function(hi){return arguments.length?(_t=typeof hi=="function"?hi:r(+hi),an):_t},an.sortValues=function(hi){return arguments.length?(br=hi,Hr=null,an):br},an.sort=function(hi){return arguments.length?(Hr=hi,br=null,an):Hr},an.startAngle=function(hi){return arguments.length?(ti=typeof hi=="function"?hi:r(+hi),an):ti},an.endAngle=function(hi){return arguments.length?(zi=typeof hi=="function"?hi:r(+hi),an):zi},an.padAngle=function(hi){return arguments.length?(Yi=typeof hi=="function"?hi:r(+hi),an):Yi},an}var G=W(p);function N(_t){this._curve=_t}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(_t,br){this._curve.point(br*Math.sin(_t),br*-Math.cos(_t))}};function W(_t){function br(Hr){return new N(_t(Hr))}return br._curve=_t,br}function re(_t){var br=_t.curve;return _t.angle=_t.x,delete _t.x,_t.radius=_t.y,delete _t.y,_t.curve=function(Hr){return arguments.length?br(W(Hr)):br()._curve},_t}function ae(){return re(F().curve(G))}function _e(){var _t=q().curve(G),br=_t.curve,Hr=_t.lineX0,ti=_t.lineX1,zi=_t.lineY0,Yi=_t.lineY1;return _t.angle=_t.x,delete _t.x,_t.startAngle=_t.x0,delete _t.x0,_t.endAngle=_t.x1,delete _t.x1,_t.radius=_t.y,delete _t.y,_t.innerRadius=_t.y0,delete _t.y0,_t.outerRadius=_t.y1,delete _t.y1,_t.lineStartAngle=function(){return re(Hr())},delete _t.lineX0,_t.lineEndAngle=function(){return re(ti())},delete _t.lineX1,_t.lineInnerRadius=function(){return re(zi())},delete _t.lineY0,_t.lineOuterRadius=function(){return re(Yi())},delete _t.lineY1,_t.curve=function(an){return arguments.length?br(W(an)):br()._curve},_t}function Me(_t,br){return[(br=+br)*Math.cos(_t-=Math.PI/2),br*Math.sin(_t)]}var ke=Array.prototype.slice;function ge(_t){return _t.source}function ie(_t){return _t.target}function Te(_t){var br=ge,Hr=ie,ti=P,zi=T,Yi=null;function an(){var hi,Ji=ke.call(arguments),ua=br.apply(this,Ji),Fn=Hr.apply(this,Ji);if(Yi||(Yi=hi=t.path()),_t(Yi,+ti.apply(this,(Ji[0]=ua,Ji)),+zi.apply(this,Ji),+ti.apply(this,(Ji[0]=Fn,Ji)),+zi.apply(this,Ji)),hi)return Yi=null,hi+""||null}return an.source=function(hi){return arguments.length?(br=hi,an):br},an.target=function(hi){return arguments.length?(Hr=hi,an):Hr},an.x=function(hi){return arguments.length?(ti=typeof hi=="function"?hi:r(+hi),an):ti},an.y=function(hi){return arguments.length?(zi=typeof hi=="function"?hi:r(+hi),an):zi},an.context=function(hi){return arguments.length?(Yi=hi==null?null:hi,an):Yi},an}function Ee(_t,br,Hr,ti,zi){_t.moveTo(br,Hr),_t.bezierCurveTo(br=(br+ti)/2,Hr,br,zi,ti,zi)}function Ae(_t,br,Hr,ti,zi){_t.moveTo(br,Hr),_t.bezierCurveTo(br,Hr=(Hr+zi)/2,ti,Hr,ti,zi)}function ze(_t,br,Hr,ti,zi){var Yi=Me(br,Hr),an=Me(br,Hr=(Hr+zi)/2),hi=Me(ti,Hr),Ji=Me(ti,zi);_t.moveTo(Yi[0],Yi[1]),_t.bezierCurveTo(an[0],an[1],hi[0],hi[1],Ji[0],Ji[1])}function Ce(){return Te(Ee)}function me(){return Te(Ae)}function De(){var _t=Te(ze);return _t.angle=_t.x,delete _t.x,_t.radius=_t.y,delete _t.y,_t}var ce={draw:function(_t,br){var Hr=Math.sqrt(br/f);_t.moveTo(Hr,0),_t.arc(0,0,Hr,0,d)}},Ge={draw:function(_t,br){var Hr=Math.sqrt(br/5)/2;_t.moveTo(-3*Hr,-Hr),_t.lineTo(-Hr,-Hr),_t.lineTo(-Hr,-3*Hr),_t.lineTo(Hr,-3*Hr),_t.lineTo(Hr,-Hr),_t.lineTo(3*Hr,-Hr),_t.lineTo(3*Hr,Hr),_t.lineTo(Hr,Hr),_t.lineTo(Hr,3*Hr),_t.lineTo(-Hr,3*Hr),_t.lineTo(-Hr,Hr),_t.lineTo(-3*Hr,Hr),_t.closePath()}},nt=Math.sqrt(1/3),ct=nt*2,qt={draw:function(_t,br){var Hr=Math.sqrt(br/ct),ti=Hr*nt;_t.moveTo(0,-Hr),_t.lineTo(ti,0),_t.lineTo(0,Hr),_t.lineTo(-ti,0),_t.closePath()}},rt=.8908130915292852,ot=Math.sin(f/10)/Math.sin(7*f/10),Dt=Math.sin(d/10)*ot,kt=-Math.cos(d/10)*ot,Ct={draw:function(_t,br){var Hr=Math.sqrt(br*rt),ti=Dt*Hr,zi=kt*Hr;_t.moveTo(0,-Hr),_t.lineTo(ti,zi);for(var Yi=1;Yi<5;++Yi){var an=d*Yi/5,hi=Math.cos(an),Ji=Math.sin(an);_t.lineTo(Ji*Hr,-hi*Hr),_t.lineTo(hi*ti-Ji*zi,Ji*ti+hi*zi)}_t.closePath()}},Yt={draw:function(_t,br){var Hr=Math.sqrt(br),ti=-Hr/2;_t.rect(ti,ti,Hr,Hr)}},xr=Math.sqrt(3),er={draw:function(_t,br){var Hr=-Math.sqrt(br/(xr*3));_t.moveTo(0,Hr*2),_t.lineTo(-xr*Hr,-Hr),_t.lineTo(xr*Hr,-Hr),_t.closePath()}},Ke=-.5,xt=Math.sqrt(3)/2,bt=1/Math.sqrt(12),Lt=(bt/2+1)*3,St={draw:function(_t,br){var Hr=Math.sqrt(br/Lt),ti=Hr/2,zi=Hr*bt,Yi=ti,an=Hr*bt+Hr,hi=-Yi,Ji=an;_t.moveTo(ti,zi),_t.lineTo(Yi,an),_t.lineTo(hi,Ji),_t.lineTo(Ke*ti-xt*zi,xt*ti+Ke*zi),_t.lineTo(Ke*Yi-xt*an,xt*Yi+Ke*an),_t.lineTo(Ke*hi-xt*Ji,xt*hi+Ke*Ji),_t.lineTo(Ke*ti+xt*zi,Ke*zi-xt*ti),_t.lineTo(Ke*Yi+xt*an,Ke*an-xt*Yi),_t.lineTo(Ke*hi+xt*Ji,Ke*Ji-xt*hi),_t.closePath()}},Et=[ce,Ge,qt,Yt,Ct,er,St];function dt(){var _t=r(ce),br=r(64),Hr=null;function ti(){var zi;if(Hr||(Hr=zi=t.path()),_t.apply(this,arguments).draw(Hr,+br.apply(this,arguments)),zi)return Hr=null,zi+""||null}return ti.type=function(zi){return arguments.length?(_t=typeof zi=="function"?zi:r(zi),ti):_t},ti.size=function(zi){return arguments.length?(br=typeof zi=="function"?zi:r(+zi),ti):br},ti.context=function(zi){return arguments.length?(Hr=zi==null?null:zi,ti):Hr},ti}function Ht(){}function $t(_t,br,Hr){_t._context.bezierCurveTo((2*_t._x0+_t._x1)/3,(2*_t._y0+_t._y1)/3,(_t._x0+2*_t._x1)/3,(_t._y0+2*_t._y1)/3,(_t._x0+4*_t._x1+br)/6,(_t._y0+4*_t._y1+Hr)/6)}function fr(_t){this._context=_t}fr.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:$t(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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);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:$t(this,_t,br);break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br}};function _r(_t){return new fr(_t)}function Br(_t){this._context=_t}Br.prototype={areaStart:Ht,areaEnd:Ht,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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._x2=_t,this._y2=br;break;case 1:this._point=2,this._x3=_t,this._y3=br;break;case 2:this._point=3,this._x4=_t,this._y4=br,this._context.moveTo((this._x0+4*this._x1+_t)/6,(this._y0+4*this._y1+br)/6);break;default:$t(this,_t,br);break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br}};function Or(_t){return new Br(_t)}function Nr(_t){this._context=_t}Nr.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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Hr=(this._x0+4*this._x1+_t)/6,ti=(this._y0+4*this._y1+br)/6;this._line?this._context.lineTo(Hr,ti):this._context.moveTo(Hr,ti);break;case 3:this._point=4;default:$t(this,_t,br);break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br}};function ut(_t){return new Nr(_t)}function Ne(_t,br){this._basis=new fr(_t),this._beta=br}Ne.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var _t=this._x,br=this._y,Hr=_t.length-1;if(Hr>0)for(var ti=_t[0],zi=br[0],Yi=_t[Hr]-ti,an=br[Hr]-zi,hi=-1,Ji;++hi<=Hr;)Ji=hi/Hr,this._basis.point(this._beta*_t[hi]+(1-this._beta)*(ti+Ji*Yi),this._beta*br[hi]+(1-this._beta)*(zi+Ji*an));this._x=this._y=null,this._basis.lineEnd()},point:function(_t,br){this._x.push(+_t),this._y.push(+br)}};var Ye=function _t(br){function Hr(ti){return br===1?new fr(ti):new Ne(ti,br)}return Hr.beta=function(ti){return _t(+ti)},Hr}(.85);function Ve(_t,br,Hr){_t._context.bezierCurveTo(_t._x1+_t._k*(_t._x2-_t._x0),_t._y1+_t._k*(_t._y2-_t._y0),_t._x2+_t._k*(_t._x1-br),_t._y2+_t._k*(_t._y1-Hr),_t._x2,_t._y2)}function Xe(_t,br){this._context=_t,this._k=(1-br)/6}Xe.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:Ve(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2,this._x1=_t,this._y1=br;break;case 2:this._point=3;default:Ve(this,_t,br);break}this._x0=this._x1,this._x1=this._x2,this._x2=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ht=function _t(br){function Hr(ti){return new Xe(ti,br)}return Hr.tension=function(ti){return _t(+ti)},Hr}(0);function Le(_t,br){this._context=_t,this._k=(1-br)/6}Le.prototype={areaStart:Ht,areaEnd:Ht,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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._x3=_t,this._y3=br;break;case 1:this._point=2,this._context.moveTo(this._x4=_t,this._y4=br);break;case 2:this._point=3,this._x5=_t,this._y5=br;break;default:Ve(this,_t,br);break}this._x0=this._x1,this._x1=this._x2,this._x2=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var xe=function _t(br){function Hr(ti){return new Le(ti,br)}return Hr.tension=function(ti){return _t(+ti)},Hr}(0);function Se(_t,br){this._context=_t,this._k=(1-br)/6}Se.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(_t,br){switch(_t=+_t,br=+br,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:Ve(this,_t,br);break}this._x0=this._x1,this._x1=this._x2,this._x2=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var lt=function _t(br){function Hr(ti){return new Se(ti,br)}return Hr.tension=function(ti){return _t(+ti)},Hr}(0);function Gt(_t,br,Hr){var ti=_t._x1,zi=_t._y1,Yi=_t._x2,an=_t._y2;if(_t._l01_a>c){var hi=2*_t._l01_2a+3*_t._l01_a*_t._l12_a+_t._l12_2a,Ji=3*_t._l01_a*(_t._l01_a+_t._l12_a);ti=(ti*hi-_t._x0*_t._l12_2a+_t._x2*_t._l01_2a)/Ji,zi=(zi*hi-_t._y0*_t._l12_2a+_t._y2*_t._l01_2a)/Ji}if(_t._l23_a>c){var ua=2*_t._l23_2a+3*_t._l23_a*_t._l12_a+_t._l12_2a,Fn=3*_t._l23_a*(_t._l23_a+_t._l12_a);Yi=(Yi*ua+_t._x1*_t._l23_2a-br*_t._l12_2a)/Fn,an=(an*ua+_t._y1*_t._l23_2a-Hr*_t._l12_2a)/Fn}_t._context.bezierCurveTo(ti,zi,Yi,an,_t._x2,_t._y2)}function Vt(_t,br){this._context=_t,this._alpha=br}Vt.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(_t,br){if(_t=+_t,br=+br,this._point){var Hr=this._x2-_t,ti=this._y2-br;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+ti*ti,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2;break;case 2:this._point=3;default:Gt(this,_t,br);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=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ar=function _t(br){function Hr(ti){return br?new Vt(ti,br):new Xe(ti,0)}return Hr.alpha=function(ti){return _t(+ti)},Hr}(.5);function Qr(_t,br){this._context=_t,this._alpha=br}Qr.prototype={areaStart:Ht,areaEnd:Ht,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(_t,br){if(_t=+_t,br=+br,this._point){var Hr=this._x2-_t,ti=this._y2-br;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+ti*ti,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=_t,this._y3=br;break;case 1:this._point=2,this._context.moveTo(this._x4=_t,this._y4=br);break;case 2:this._point=3,this._x5=_t,this._y5=br;break;default:Gt(this,_t,br);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=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ai=function _t(br){function Hr(ti){return br?new Qr(ti,br):new Le(ti,0)}return Hr.alpha=function(ti){return _t(+ti)},Hr}(.5);function jr(_t,br){this._context=_t,this._alpha=br}jr.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(_t,br){if(_t=+_t,br=+br,this._point){var Hr=this._x2-_t,ti=this._y2-br;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+ti*ti,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:Gt(this,_t,br);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=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ri=function _t(br){function Hr(ti){return br?new jr(ti,br):new Se(ti,0)}return Hr.alpha=function(ti){return _t(+ti)},Hr}(.5);function bi(_t){this._context=_t}bi.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(_t,br){_t=+_t,br=+br,this._point?this._context.lineTo(_t,br):(this._point=1,this._context.moveTo(_t,br))}};function nn(_t){return new bi(_t)}function Wi(_t){return _t<0?-1:1}function Ni(_t,br,Hr){var ti=_t._x1-_t._x0,zi=br-_t._x1,Yi=(_t._y1-_t._y0)/(ti||zi<0&&-0),an=(Hr-_t._y1)/(zi||ti<0&&-0),hi=(Yi*zi+an*ti)/(ti+zi);return(Wi(Yi)+Wi(an))*Math.min(Math.abs(Yi),Math.abs(an),.5*Math.abs(hi))||0}function _n(_t,br){var Hr=_t._x1-_t._x0;return Hr?(3*(_t._y1-_t._y0)/Hr-br)/2:br}function $i(_t,br,Hr){var ti=_t._x0,zi=_t._y0,Yi=_t._x1,an=_t._y1,hi=(Yi-ti)/3;_t._context.bezierCurveTo(ti+hi,zi+hi*br,Yi-hi,an-hi*Hr,Yi,an)}function zn(_t){this._context=_t}zn.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:$i(this,this._t0,_n(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(_t,br){var Hr=NaN;if(_t=+_t,br=+br,!(_t===this._x1&&br===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2;break;case 2:this._point=3,$i(this,_n(this,Hr=Ni(this,_t,br)),Hr);break;default:$i(this,this._t0,Hr=Ni(this,_t,br));break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br,this._t0=Hr}}};function Wn(_t){this._context=new It(_t)}(Wn.prototype=Object.create(zn.prototype)).point=function(_t,br){zn.prototype.point.call(this,br,_t)};function It(_t){this._context=_t}It.prototype={moveTo:function(_t,br){this._context.moveTo(br,_t)},closePath:function(){this._context.closePath()},lineTo:function(_t,br){this._context.lineTo(br,_t)},bezierCurveTo:function(_t,br,Hr,ti,zi,Yi){this._context.bezierCurveTo(br,_t,ti,Hr,Yi,zi)}};function ft(_t){return new zn(_t)}function jt(_t){return new Wn(_t)}function Zt(_t){this._context=_t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var _t=this._x,br=this._y,Hr=_t.length;if(Hr)if(this._line?this._context.lineTo(_t[0],br[0]):this._context.moveTo(_t[0],br[0]),Hr===2)this._context.lineTo(_t[1],br[1]);else for(var ti=yr(_t),zi=yr(br),Yi=0,an=1;an=0;--br)zi[br]=(an[br]-zi[br+1])/Yi[br];for(Yi[Hr-1]=(_t[Hr]+zi[Hr-1])/2,br=0;br=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,br),this._context.lineTo(_t,br);else{var Hr=this._x*(1-this._t)+_t*this._t;this._context.lineTo(Hr,this._y),this._context.lineTo(Hr,br)}break}}this._x=_t,this._y=br}};function Vr(_t){return new Zr(_t,.5)}function gi(_t){return new Zr(_t,0)}function Si(_t){return new Zr(_t,1)}function Mi(_t,br){if((an=_t.length)>1)for(var Hr=1,ti,zi,Yi=_t[br[0]],an,hi=Yi.length;Hr=0;)Hr[br]=br;return Hr}function Gi(_t,br){return _t[br]}function Ki(){var _t=r([]),br=Pi,Hr=Mi,ti=Gi;function zi(Yi){var an=_t.apply(this,arguments),hi,Ji=Yi.length,ua=an.length,Fn=new Array(ua),Sa;for(hi=0;hi0){for(var Hr,ti,zi=0,Yi=_t[0].length,an;zi0)for(var Hr,ti=0,zi,Yi,an,hi,Ji,ua=_t[br[0]].length;ti0?(zi[0]=an,zi[1]=an+=Yi):Yi<0?(zi[1]=hi,zi[0]=hi+=Yi):(zi[0]=0,zi[1]=Yi)}function la(_t,br){if((zi=_t.length)>0){for(var Hr=0,ti=_t[br[0]],zi,Yi=ti.length;Hr0)||!((Yi=(zi=_t[br[0]]).length)>0))){for(var Hr=0,ti=1,zi,Yi,an;tiYi&&(Yi=zi,Hr=br);return Hr}function oa(_t){var br=_t.map(Sn);return Pi(_t).sort(function(Hr,ti){return br[Hr]-br[ti]})}function Sn(_t){for(var br=0,Hr=-1,ti=_t.length,zi;++Hr{(function(e,t){typeof y7=="object"&&typeof yje!="undefined"?t(y7,JE(),h7(),CJ()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(y7,function(e,t,r,n){"use strict";function i(p){return p.target.depth}function a(p){return p.depth}function o(p,P){return P-1-p.height}function s(p,P){return p.sourceLinks.length?p.depth:P-1}function l(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?t.min(p.sourceLinks,i)-1:0}function u(p){return function(){return p}}function c(p,P){return h(p.source,P.source)||p.index-P.index}function f(p,P){return h(p.target,P.target)||p.index-P.index}function h(p,P){return p.y0-P.y0}function d(p){return p.value}function v(p){return(p.y0+p.y1)/2}function x(p){return v(p.source)*p.value}function b(p){return v(p.target)*p.value}function g(p){return p.index}function E(p){return p.nodes}function k(p){return p.links}function S(p,P){var T=p.get(P);if(!T)throw new Error("missing: "+P);return T}var L=function(){var p=0,P=0,T=1,F=1,q=24,V=8,H=g,X=s,G=E,N=k,W=32,re=2/3;function ae(){var Te={nodes:G.apply(null,arguments),links:N.apply(null,arguments)};return _e(Te),Me(Te),ke(Te),ge(Te,W),ie(Te),Te}ae.update=function(Te){return ie(Te),Te},ae.nodeId=function(Te){return arguments.length?(H=typeof Te=="function"?Te:u(Te),ae):H},ae.nodeAlign=function(Te){return arguments.length?(X=typeof Te=="function"?Te:u(Te),ae):X},ae.nodeWidth=function(Te){return arguments.length?(q=+Te,ae):q},ae.nodePadding=function(Te){return arguments.length?(V=+Te,ae):V},ae.nodes=function(Te){return arguments.length?(G=typeof Te=="function"?Te:u(Te),ae):G},ae.links=function(Te){return arguments.length?(N=typeof Te=="function"?Te:u(Te),ae):N},ae.size=function(Te){return arguments.length?(p=P=0,T=+Te[0],F=+Te[1],ae):[T-p,F-P]},ae.extent=function(Te){return arguments.length?(p=+Te[0][0],T=+Te[1][0],P=+Te[0][1],F=+Te[1][1],ae):[[p,P],[T,F]]},ae.iterations=function(Te){return arguments.length?(W=+Te,ae):W};function _e(Te){Te.nodes.forEach(function(Ae,ze){Ae.index=ze,Ae.sourceLinks=[],Ae.targetLinks=[]});var Ee=r.map(Te.nodes,H);Te.links.forEach(function(Ae,ze){Ae.index=ze;var Ce=Ae.source,me=Ae.target;typeof Ce!="object"&&(Ce=Ae.source=S(Ee,Ce)),typeof me!="object"&&(me=Ae.target=S(Ee,me)),Ce.sourceLinks.push(Ae),me.targetLinks.push(Ae)})}function Me(Te){Te.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function ke(Te){var Ee,Ae,ze;for(Ee=Te.nodes,Ae=[],ze=0;Ee.length;++ze,Ee=Ae,Ae=[])Ee.forEach(function(me){me.depth=ze,me.sourceLinks.forEach(function(De){Ae.indexOf(De.target)<0&&Ae.push(De.target)})});for(Ee=Te.nodes,Ae=[],ze=0;Ee.length;++ze,Ee=Ae,Ae=[])Ee.forEach(function(me){me.height=ze,me.targetLinks.forEach(function(De){Ae.indexOf(De.source)<0&&Ae.push(De.source)})});var Ce=(T-p-q)/(ze-1);Te.nodes.forEach(function(me){me.x1=(me.x0=p+Math.max(0,Math.min(ze-1,Math.floor(X.call(null,me,ze))))*Ce)+q})}function ge(Te){var Ee=r.nest().key(function(Ge){return Ge.x0}).sortKeys(t.ascending).entries(Te.nodes).map(function(Ge){return Ge.values});Ce(),ce();for(var Ae=1,ze=W;ze>0;--ze)De(Ae*=.99),ce(),me(Ae),ce();function Ce(){var Ge=t.max(Ee,function(qt){return qt.length}),nt=re*(F-P)/(Ge-1);V>nt&&(V=nt);var ct=t.min(Ee,function(qt){return(F-P-(qt.length-1)*V)/t.sum(qt,d)});Ee.forEach(function(qt){qt.forEach(function(rt,ot){rt.y1=(rt.y0=ot)+rt.value*ct})}),Te.links.forEach(function(qt){qt.width=qt.value*ct})}function me(Ge){Ee.forEach(function(nt){nt.forEach(function(ct){if(ct.targetLinks.length){var qt=(t.sum(ct.targetLinks,x)/t.sum(ct.targetLinks,d)-v(ct))*Ge;ct.y0+=qt,ct.y1+=qt}})})}function De(Ge){Ee.slice().reverse().forEach(function(nt){nt.forEach(function(ct){if(ct.sourceLinks.length){var qt=(t.sum(ct.sourceLinks,b)/t.sum(ct.sourceLinks,d)-v(ct))*Ge;ct.y0+=qt,ct.y1+=qt}})})}function ce(){Ee.forEach(function(Ge){var nt,ct,qt=P,rt=Ge.length,ot;for(Ge.sort(h),ot=0;ot0&&(nt.y0+=ct,nt.y1+=ct),qt=nt.y1+V;if(ct=qt-V-F,ct>0)for(qt=nt.y0-=ct,nt.y1-=ct,ot=rt-2;ot>=0;--ot)nt=Ge[ot],ct=nt.y1+V-qt,ct>0&&(nt.y0-=ct,nt.y1-=ct),qt=nt.y0})}}function ie(Te){Te.nodes.forEach(function(Ee){Ee.sourceLinks.sort(f),Ee.targetLinks.sort(c)}),Te.nodes.forEach(function(Ee){var Ae=Ee.y0,ze=Ae;Ee.sourceLinks.forEach(function(Ce){Ce.y0=Ae+Ce.width/2,Ae+=Ce.width}),Ee.targetLinks.forEach(function(Ce){Ce.y1=ze+Ce.width/2,ze+=Ce.width})})}return ae};function _(p){return[p.source.x1,p.y0]}function C(p){return[p.target.x0,p.y1]}var M=function(){return n.linkHorizontal().source(_).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 bje=ye((a_r,xje)=>{var gWt=kJ();xje.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(k){a[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(S){delete o[k][S],a[S]&&u(S)})}function c(k){var S=!1;i.push(k),a[k]=!0;var L,_;for(L=0;L=k})}function d(k){h(k);for(var S=t,L=gWt(S),_=L.components.filter(function(q){return q.length>1}),C=1/0,M,p=0;p<_.length;p++)for(var P=0;P<_[p].length;P++)_[p][P]{(function(e,t){typeof _7=="object"&&typeof wje!="undefined"?t(_7,JE(),h7(),CJ(),bje()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape","elementary-circuits-directed-graph"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(_7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(rt){return rt.target.depth}function o(rt){return rt.depth}function s(rt,ot){return ot-1-rt.height}function l(rt,ot){return rt.sourceLinks.length?rt.depth:ot-1}function u(rt){return rt.targetLinks.length?rt.depth:rt.sourceLinks.length?t.min(rt.sourceLinks,a)-1:0}function c(rt){return function(){return rt}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt};function h(rt,ot){return v(rt.source,ot.source)||rt.index-ot.index}function d(rt,ot){return v(rt.target,ot.target)||rt.index-ot.index}function v(rt,ot){return rt.partOfCycle===ot.partOfCycle?rt.y0-ot.y0:rt.circularLinkType==="top"||ot.circularLinkType==="bottom"?-1:1}function x(rt){return rt.value}function b(rt){return(rt.y0+rt.y1)/2}function g(rt){return b(rt.source)}function E(rt){return b(rt.target)}function k(rt){return rt.index}function S(rt){return rt.nodes}function L(rt){return rt.links}function _(rt,ot){var Dt=rt.get(ot);if(!Dt)throw new Error("missing: "+ot);return Dt}function C(rt,ot){return ot(rt)}var M=25,p=10,P=.3;function T(){var rt=0,ot=0,Dt=1,kt=1,Ct=24,Yt,xr=k,er=l,Ke=S,xt=L,bt=32,Lt=2,St,Et=null;function dt(){var ut={nodes:Ke.apply(null,arguments),links:xt.apply(null,arguments)};Ht(ut),F(ut,xr,Et),$t(ut),Br(ut),q(ut,xr),Or(ut,bt,xr),Nr(ut);for(var Ne=4,Ye=0;Ye0?Ne+M+p:Ne,Ye=Ye>0?Ye+M+p:Ye,Ve=Ve>0?Ve+M+p:Ve,Xe=Xe>0?Xe+M+p:Xe,{top:Ne,bottom:Ye,left:Xe,right:Ve}}function _r(ut,Ne){var Ye=t.max(ut.nodes,function(lt){return lt.column}),Ve=Dt-rt,Xe=kt-ot,ht=Ve+Ne.right+Ne.left,Le=Xe+Ne.top+Ne.bottom,xe=Ve/ht,Se=Xe/Le;return rt=rt*xe+Ne.left,Dt=Ne.right==0?Dt:Dt*xe,ot=ot*Se+Ne.top,kt=kt*Se,ut.nodes.forEach(function(lt){lt.x0=rt+lt.column*((Dt-rt-Ct)/Ye),lt.x1=lt.x0+Ct}),Se}function Br(ut){var Ne,Ye,Ve;for(Ne=ut.nodes,Ye=[],Ve=0;Ne.length;++Ve,Ne=Ye,Ye=[])Ne.forEach(function(Xe){Xe.depth=Ve,Xe.sourceLinks.forEach(function(ht){Ye.indexOf(ht.target)<0&&!ht.circular&&Ye.push(ht.target)})});for(Ne=ut.nodes,Ye=[],Ve=0;Ne.length;++Ve,Ne=Ye,Ye=[])Ne.forEach(function(Xe){Xe.height=Ve,Xe.targetLinks.forEach(function(ht){Ye.indexOf(ht.source)<0&&!ht.circular&&Ye.push(ht.source)})});ut.nodes.forEach(function(Xe){Xe.column=Math.floor(er.call(null,Xe,Ve))})}function Or(ut,Ne,Ye){var Ve=r.nest().key(function(lt){return lt.column}).sortKeys(t.ascending).entries(ut.nodes).map(function(lt){return lt.values});Le(Ye),Se();for(var Xe=1,ht=Ne;ht>0;--ht)xe(Xe*=.99,Ye),Se();function Le(lt){if(St){var Gt=1/0;Ve.forEach(function(ai){var jr=kt*St/(ai.length+1);Gt=jr0))if(ai==0&&Qr==1)ri=jr.y1-jr.y0,jr.y0=kt/2-ri/2,jr.y1=kt/2+ri/2;else if(ai==Vt-1&&Qr==1)ri=jr.y1-jr.y0,jr.y0=kt/2-ri/2,jr.y1=kt/2+ri/2;else{var bi=0,nn=t.mean(jr.sourceLinks,E),Wi=t.mean(jr.targetLinks,g);nn&&Wi?bi=(nn+Wi)/2:bi=nn||Wi;var Ni=(bi-b(jr))*lt;jr.y0+=Ni,jr.y1+=Ni}})})}function Se(){Ve.forEach(function(lt){var Gt,Vt,ar=ot,Qr=lt.length,ai;for(lt.sort(v),ai=0;ai0&&(Gt.y0+=Vt,Gt.y1+=Vt),ar=Gt.y1+Yt;if(Vt=ar-Yt-kt,Vt>0)for(ar=Gt.y0-=Vt,Gt.y1-=Vt,ai=Qr-2;ai>=0;--ai)Gt=lt[ai],Vt=Gt.y1+Yt-ar,Vt>0&&(Gt.y0-=Vt,Gt.y1-=Vt),ar=Gt.y0})}}function Nr(ut){ut.nodes.forEach(function(Ne){Ne.sourceLinks.sort(d),Ne.targetLinks.sort(h)}),ut.nodes.forEach(function(Ne){var Ye=Ne.y0,Ve=Ye,Xe=Ne.y1,ht=Xe;Ne.sourceLinks.forEach(function(Le){Le.circular?(Le.y0=Xe-Le.width/2,Xe=Xe-Le.width):(Le.y0=Ye+Le.width/2,Ye+=Le.width)}),Ne.targetLinks.forEach(function(Le){Le.circular?(Le.y1=ht-Le.width/2,ht=ht-Le.width):(Le.y1=Ve+Le.width/2,Ve+=Le.width)})})}return dt}function F(rt,ot,Dt){var kt=0;if(Dt===null){for(var Ct=[],Yt=0;Ytot.source.column)}function X(rt,ot){var Dt=0;rt.sourceLinks.forEach(function(Ct){Dt=Ct.circular&&!ct(Ct,ot)?Dt+1:Dt});var kt=0;return rt.targetLinks.forEach(function(Ct){kt=Ct.circular&&!ct(Ct,ot)?kt+1:kt}),Dt+kt}function G(rt){var ot=rt.source.sourceLinks,Dt=0;ot.forEach(function(Yt){Dt=Yt.circular?Dt+1:Dt});var kt=rt.target.targetLinks,Ct=0;return kt.forEach(function(Yt){Ct=Yt.circular?Ct+1:Ct}),!(Dt>1||Ct>1)}function N(rt,ot,Dt){return rt.sort(ae),rt.forEach(function(kt,Ct){var Yt=0;if(ct(kt,Dt)&&G(kt))kt.circularPathData.verticalBuffer=Yt+kt.width/2;else{var xr=0;for(xr;xrYt?er:Yt}kt.circularPathData.verticalBuffer=Yt+kt.width/2}}),rt}function W(rt,ot,Dt,kt){var Ct=5,Yt=t.min(rt.links,function(Ke){return Ke.source.y0});rt.links.forEach(function(Ke){Ke.circular&&(Ke.circularPathData={})});var xr=rt.links.filter(function(Ke){return Ke.circularLinkType=="top"});N(xr,ot,kt);var er=rt.links.filter(function(Ke){return Ke.circularLinkType=="bottom"});N(er,ot,kt),rt.links.forEach(function(Ke){if(Ke.circular){if(Ke.circularPathData.arcRadius=Ke.width+p,Ke.circularPathData.leftNodeBuffer=Ct,Ke.circularPathData.rightNodeBuffer=Ct,Ke.circularPathData.sourceWidth=Ke.source.x1-Ke.source.x0,Ke.circularPathData.sourceX=Ke.source.x0+Ke.circularPathData.sourceWidth,Ke.circularPathData.targetX=Ke.target.x0,Ke.circularPathData.sourceY=Ke.y0,Ke.circularPathData.targetY=Ke.y1,ct(Ke,kt)&&G(Ke))Ke.circularPathData.leftSmallArcRadius=p+Ke.width/2,Ke.circularPathData.leftLargeArcRadius=p+Ke.width/2,Ke.circularPathData.rightSmallArcRadius=p+Ke.width/2,Ke.circularPathData.rightLargeArcRadius=p+Ke.width/2,Ke.circularLinkType=="bottom"?(Ke.circularPathData.verticalFullExtent=Ke.source.y1+M+Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.rightLargeArcRadius):(Ke.circularPathData.verticalFullExtent=Ke.source.y0-M-Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.rightLargeArcRadius);else{var xt=Ke.source.column,bt=Ke.circularLinkType,Lt=rt.links.filter(function(dt){return dt.source.column==xt&&dt.circularLinkType==bt});Ke.circularLinkType=="bottom"?Lt.sort(Me):Lt.sort(_e);var St=0;Lt.forEach(function(dt,Ht){dt.circularLinkID==Ke.circularLinkID&&(Ke.circularPathData.leftSmallArcRadius=p+Ke.width/2+St,Ke.circularPathData.leftLargeArcRadius=p+Ke.width/2+Ht*ot+St),St=St+dt.width}),xt=Ke.target.column,Lt=rt.links.filter(function(dt){return dt.target.column==xt&&dt.circularLinkType==bt}),Ke.circularLinkType=="bottom"?Lt.sort(ge):Lt.sort(ke),St=0,Lt.forEach(function(dt,Ht){dt.circularLinkID==Ke.circularLinkID&&(Ke.circularPathData.rightSmallArcRadius=p+Ke.width/2+St,Ke.circularPathData.rightLargeArcRadius=p+Ke.width/2+Ht*ot+St),St=St+dt.width}),Ke.circularLinkType=="bottom"?(Ke.circularPathData.verticalFullExtent=Math.max(Dt,Ke.source.y1,Ke.target.y1)+M+Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.rightLargeArcRadius):(Ke.circularPathData.verticalFullExtent=Yt-M-Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.rightLargeArcRadius)}Ke.circularPathData.leftInnerExtent=Ke.circularPathData.sourceX+Ke.circularPathData.leftNodeBuffer,Ke.circularPathData.rightInnerExtent=Ke.circularPathData.targetX-Ke.circularPathData.rightNodeBuffer,Ke.circularPathData.leftFullExtent=Ke.circularPathData.sourceX+Ke.circularPathData.leftLargeArcRadius+Ke.circularPathData.leftNodeBuffer,Ke.circularPathData.rightFullExtent=Ke.circularPathData.targetX-Ke.circularPathData.rightLargeArcRadius-Ke.circularPathData.rightNodeBuffer}if(Ke.circular)Ke.path=re(Ke);else{var Et=n.linkHorizontal().source(function(dt){var Ht=dt.source.x0+(dt.source.x1-dt.source.x0),$t=dt.y0;return[Ht,$t]}).target(function(dt){var Ht=dt.target.x0,$t=dt.y1;return[Ht,$t]});Ke.path=Et(Ke)}})}function re(rt){var ot="";return rt.circularLinkType=="top"?ot="M"+rt.circularPathData.sourceX+" "+rt.circularPathData.sourceY+" L"+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.sourceY+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftSmallArcRadius+" 0 0 0 "+rt.circularPathData.leftFullExtent+" "+(rt.circularPathData.sourceY-rt.circularPathData.leftSmallArcRadius)+" L"+rt.circularPathData.leftFullExtent+" "+rt.circularPathData.verticalLeftInnerExtent+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftLargeArcRadius+" 0 0 0 "+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.verticalFullExtent+" L"+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.verticalFullExtent+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightLargeArcRadius+" 0 0 0 "+rt.circularPathData.rightFullExtent+" "+rt.circularPathData.verticalRightInnerExtent+" L"+rt.circularPathData.rightFullExtent+" "+(rt.circularPathData.targetY-rt.circularPathData.rightSmallArcRadius)+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightSmallArcRadius+" 0 0 0 "+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.targetY+" L"+rt.circularPathData.targetX+" "+rt.circularPathData.targetY:ot="M"+rt.circularPathData.sourceX+" "+rt.circularPathData.sourceY+" L"+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.sourceY+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftSmallArcRadius+" 0 0 1 "+rt.circularPathData.leftFullExtent+" "+(rt.circularPathData.sourceY+rt.circularPathData.leftSmallArcRadius)+" L"+rt.circularPathData.leftFullExtent+" "+rt.circularPathData.verticalLeftInnerExtent+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftLargeArcRadius+" 0 0 1 "+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.verticalFullExtent+" L"+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.verticalFullExtent+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightLargeArcRadius+" 0 0 1 "+rt.circularPathData.rightFullExtent+" "+rt.circularPathData.verticalRightInnerExtent+" L"+rt.circularPathData.rightFullExtent+" "+(rt.circularPathData.targetY+rt.circularPathData.rightSmallArcRadius)+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightSmallArcRadius+" 0 0 1 "+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.targetY+" L"+rt.circularPathData.targetX+" "+rt.circularPathData.targetY,ot}function ae(rt,ot){return ie(rt)==ie(ot)?rt.circularLinkType=="bottom"?Me(rt,ot):_e(rt,ot):ie(ot)-ie(rt)}function _e(rt,ot){return rt.y0-ot.y0}function Me(rt,ot){return ot.y0-rt.y0}function ke(rt,ot){return rt.y1-ot.y1}function ge(rt,ot){return ot.y1-rt.y1}function ie(rt){return rt.target.column-rt.source.column}function Te(rt){return rt.target.x0-rt.source.x1}function Ee(rt,ot){var Dt=V(rt),kt=Te(ot)/Math.tan(Dt),Ct=nt(rt)=="up"?rt.y1+kt:rt.y1-kt;return Ct}function Ae(rt,ot){var Dt=V(rt),kt=Te(ot)/Math.tan(Dt),Ct=nt(rt)=="up"?rt.y1-kt:rt.y1+kt;return Ct}function ze(rt,ot,Dt,kt){rt.links.forEach(function(Ct){if(!Ct.circular&&Ct.target.column-Ct.source.column>1){var Yt=Ct.source.column+1,xr=Ct.target.column-1,er=1,Ke=xr-Yt+1;for(er=1;Yt<=xr;Yt++,er++)rt.nodes.forEach(function(xt){if(xt.column==Yt){var bt=er/(Ke+1),Lt=Math.pow(1-bt,3),St=3*bt*Math.pow(1-bt,2),Et=3*Math.pow(bt,2)*(1-bt),dt=Math.pow(bt,3),Ht=Lt*Ct.y0+St*Ct.y0+Et*Ct.y1+dt*Ct.y1,$t=Ht-Ct.width/2,fr=Ht+Ct.width/2,_r;$t>xt.y0&&$txt.y0&&frxt.y1&&me(Br,_r,ot,Dt)})):$txt.y1&&(_r=fr-xt.y0+10,xt=me(xt,_r,ot,Dt),rt.nodes.forEach(function(Br){C(Br,kt)==C(xt,kt)||Br.column!=xt.column||Br.y0xt.y1&&me(Br,_r,ot,Dt)}))}})}})}function Ce(rt,ot){return rt.y0>ot.y0&&rt.y0ot.y0&&rt.y1ot.y1}function me(rt,ot,Dt,kt){return rt.y0+ot>=Dt&&rt.y1+ot<=kt&&(rt.y0=rt.y0+ot,rt.y1=rt.y1+ot,rt.targetLinks.forEach(function(Ct){Ct.y1=Ct.y1+ot}),rt.sourceLinks.forEach(function(Ct){Ct.y0=Ct.y0+ot})),rt}function De(rt,ot,Dt,kt){rt.nodes.forEach(function(Ct){kt&&Ct.y+(Ct.y1-Ct.y0)>ot&&(Ct.y=Ct.y-(Ct.y+(Ct.y1-Ct.y0)-ot));var Yt=rt.links.filter(function(Ke){return C(Ke.source,Dt)==C(Ct,Dt)}),xr=Yt.length;xr>1&&Yt.sort(function(Ke,xt){if(!Ke.circular&&!xt.circular){if(Ke.target.column==xt.target.column)return Ke.y1-xt.y1;if(Ge(Ke,xt)){if(Ke.target.column>xt.target.column){var bt=Ae(xt,Ke);return Ke.y1-bt}if(xt.target.column>Ke.target.column){var Lt=Ae(Ke,xt);return Lt-xt.y1}}else return Ke.y1-xt.y1}if(Ke.circular&&!xt.circular)return Ke.circularLinkType=="top"?-1:1;if(xt.circular&&!Ke.circular)return xt.circularLinkType=="top"?1:-1;if(Ke.circular&&xt.circular)return Ke.circularLinkType===xt.circularLinkType&&Ke.circularLinkType=="top"?Ke.target.column===xt.target.column?Ke.target.y1-xt.target.y1:xt.target.column-Ke.target.column:Ke.circularLinkType===xt.circularLinkType&&Ke.circularLinkType=="bottom"?Ke.target.column===xt.target.column?xt.target.y1-Ke.target.y1:Ke.target.column-xt.target.column:Ke.circularLinkType=="top"?-1:1});var er=Ct.y0;Yt.forEach(function(Ke){Ke.y0=er+Ke.width/2,er=er+Ke.width}),Yt.forEach(function(Ke,xt){if(Ke.circularLinkType=="bottom"){var bt=xt+1,Lt=0;for(bt;bt1&&Ct.sort(function(er,Ke){if(!er.circular&&!Ke.circular){if(er.source.column==Ke.source.column)return er.y0-Ke.y0;if(Ge(er,Ke)){if(Ke.source.column0?"up":"down"}function ct(rt,ot){return C(rt.source,ot)==C(rt.target,ot)}function qt(rt,ot,Dt){var kt=rt.nodes,Ct=rt.links,Yt=!1,xr=!1;if(Ct.forEach(function(St){St.circularLinkType=="top"?Yt=!0:St.circularLinkType=="bottom"&&(xr=!0)}),Yt==!1||xr==!1){var er=t.min(kt,function(St){return St.y0}),Ke=t.max(kt,function(St){return St.y1}),xt=Ke-er,bt=Dt-ot,Lt=bt/xt;kt.forEach(function(St){var Et=(St.y1-St.y0)*Lt;St.y0=(St.y0-er)*Lt,St.y1=St.y0+Et}),Ct.forEach(function(St){St.y0=(St.y0-er)*Lt,St.y1=(St.y1-er)*Lt,St.width=St.width*Lt})}}e.sankeyCircular=T,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var LJ=ye((o_r,Aje)=>{"use strict";Aje.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 qje=ye((s_r,Fje)=>{"use strict";var Sje=vje(),mWt=(D2(),ab(I2)).interpolateNumber,LA=xa(),Vk=_je(),yWt=Tje(),pu=LJ(),PA=id(),aw=va(),_Wt=ao(),p1=Mr(),DJ=p1.strTranslate,xWt=p1.strRotate,RJ=Km(),Hk=RJ.keyFun,x7=RJ.repeat,Pje=RJ.unwrap,Mje=Ll(),bWt=ba(),Ije=Nh(),wWt=Ije.CAP_SHIFT,TWt=Ije.LINE_SPACING,AWt=3;function SWt(e,t,r){var n=Pje(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:Vk.sankeyJustify,left:Vk.sankeyLeft,right:Vk.sankeyRight,center:Vk.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,x;v?x=yWt.sankeyCircular().circularLinkGap(0):x=Vk.sankey(),x.iterations(pu.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=x();x.nodePadding()=N||(G=N-X.y0,G>1e-6&&(X.y0+=G,X.y1+=G)),N=X.y1+s})}function P(V){var H=V.map(function(_e,Me){return{x0:_e.x0,index:Me}}).sort(function(_e,Me){return _e.x0-Me.x0}),X=[],G=-1,N,W=-1/0,re;for(g=0;gW+l&&(G+=1,N=ae.x0),W=ae.x0,X[G]||(X[G]=[]),X[G].push(ae),re=N-ae.x0,ae.x0+=re,ae.x1+=re}return X}if(i.node.x.length&&i.node.y.length){for(g=0;g0?"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"+(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+"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"+(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+"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 zJ(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return EWt(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=mWt(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,x="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,g=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return g+="L"+o+","+d,v+x+g+b+"Z"}return t}function kWt(e,t){var r=PA(t.color),n=pu.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:aw.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 IJ(e){e.attr("transform",function(t){return DJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function CWt(e){e.call(IJ)}function Dje(e,t){e.call(CWt),t.attr("d",zJ())}function Eje(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function PJ(e){return e.link.width>1||e.linkLineWidth>0}function kje(e){var t=DJ(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function Cje(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 LWt(e,t,r,n){var i=LA.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,Lje(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):PWt(e,o,a,n),IWt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=LA.event.x,s=LA.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),Lje(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),Dje(e.filter(zje(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,Rje(r,i)}})}function DWt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function Rje(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zv=xa(),qJ=Mr(),b7=qJ.numberFormat,qWt=qje(),IA=Nc(),OWt=va(),Ax=LJ().cn,Gk=qJ._;function Oje(e){return e!==""}function DA(e,t){return e.filter(function(r){return r.key===t.traceId})}function Bje(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function Nje(e){Zv.select(e).select("text.name").style("fill","black")}function Uje(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Vje(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Hje(e,t,r){t&&r&&DA(r,t).selectAll("."+Ax.sankeyLink).filter(Uje(t)).call(Gje.bind(0,t,r,!1))}function FJ(e,t,r){t&&r&&DA(r,t).selectAll("."+Ax.sankeyLink).filter(Uje(t)).call(jje.bind(0,t,r,!1))}function Gje(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!==""&&DA(t,e).selectAll("."+Ax.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&&DA(t,e).selectAll("."+Ax.sankeyNode).filter(Vje(e)).call(Hje)}function jje(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!==""&&DA(t,e).selectAll("."+Ax.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&&DA(t,e).selectAll(Ax.sankeyNode).filter(Vje(e)).call(FJ)}function lf(e,t){var r=e.hoverlabel||{},n=qJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}Wje.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:lf(C,"bgcolor")||OWt.addOpacity(F.color,1),borderColor:lf(C,"bordercolor"),fontFamily:lf(C,"font.family"),fontSize:lf(C,"font.size"),fontColor:lf(C,"font.color"),fontWeight:lf(C,"font.weight"),fontStyle:lf(C,"font.style"),fontVariant:lf(C,"font.variant"),fontTextcase:lf(C,"font.textcase"),fontLineposition:lf(C,"font.lineposition"),fontShadow:lf(C,"font.shadow"),nameLength:lf(C,"namelength"),textAlign:lf(C,"align"),idealAlign:Zv.event.x"),color:lf(C,"bgcolor")||_.tinyColorHue,borderColor:lf(C,"bordercolor"),fontFamily:lf(C,"font.family"),fontSize:lf(C,"font.size"),fontColor:lf(C,"font.color"),fontWeight:lf(C,"font.weight"),fontStyle:lf(C,"font.style"),fontVariant:lf(C,"font.variant"),fontTextcase:lf(C,"font.textcase"),fontLineposition:lf(C,"font.lineposition"),fontShadow:lf(C,"font.shadow"),nameLength:lf(C,"namelength"),textAlign:lf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:V,eventData:[_.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});Bje(G,.85),Nje(G)}}},S=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(FJ,_,C),_.node.trace.node.hoverinfo!=="skip"&&(_.node.fullData=_.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[_.node]})),IA.loneUnhover(n._hoverlayer.node()))};qWt(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:x,unhover:b,select:l},nodeEvents:{hover:E,follow:k,unhover:S,select:g}})}});var Zje=ye(ow=>{"use strict";var BWt=Bu().overrideAll,NWt=kd().getModuleCalcData,UWt=OJ(),VWt=B1(),HWt=Tg(),GWt=gv(),jWt=wf().prepSelect,BJ=Mr(),WWt=ba(),w7="sankey";ow.name=w7;ow.baseLayoutAttrOverrides=BWt({hoverlabel:VWt.hoverlabel},"plot","nested");ow.plot=function(e){var t=NWt(e.calcdata,w7)[0];UWt(e,t),ow.updateFx(e)};ow.clean=function(e,t,r,n){var i=n._has&&n._has(w7),a=t._has&&t._has(w7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};ow.updateFx=function(e){for(var t=0;t{"use strict";Xje.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";Kje.exports={attributes:EJ(),supplyDefaults:eje(),calc:aje(),plot:OJ(),moduleType:"trace",name:"sankey",basePlotModule:Zje(),selectPoints:Yje(),categories:["noOpacity"],meta:{}}});var Qje=ye((h_r,$je)=>{"use strict";$je.exports=Jje()});var tWe=ye(RA=>{"use strict";var eWe=Yu();RA.name="indicator";RA.plot=function(e,t,r,n){eWe.plotBasePlot(RA.name,e,t,r,n)};RA.clean=function(e,t,r,n){eWe.cleanBasePlot(RA.name,e,t,r,n)}});var UJ=ye((v_r,sWe)=>{"use strict";var Sx=no().extendFlat,iWe=no().extendDeep,XWt=Bu().overrideAll,nWe=Su(),aWe=dh(),YWt=Ju().attributes,Sf=Cd(),KWt=Vs().templatedArray,T7=HT(),rWe=Oc().descriptionOnlyNumbers,NJ=nWe({editType:"plot",colorEditType:"plot"}),jk={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:aWe.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"},oWe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},JWt=KWt("step",iWe({},jk,{range:oWe}));sWe.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:YWt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Sx({},NJ,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:rWe("value")},font:Sx({},NJ,{}),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:rWe("value")},increasing:{symbol:{valType:"string",dflt:T7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:T7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:T7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:T7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Sx({},NJ,{}),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:iWe({},jk,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:aWe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:XWt({range:oWe,visible:Sx({},Sf.visible,{dflt:!0}),tickmode:Sf.minor.tickmode,nticks:Sf.nticks,tick0:Sf.tick0,dtick:Sf.dtick,tickvals:Sf.tickvals,ticktext:Sf.ticktext,ticks:Sx({},Sf.ticks,{dflt:"outside"}),ticklen:Sf.ticklen,tickwidth:Sf.tickwidth,tickcolor:Sf.tickcolor,ticklabelstep:Sf.ticklabelstep,showticklabels:Sf.showticklabels,labelalias:Sf.labelalias,tickfont:nWe({}),tickangle:Sf.tickangle,tickformat:Sf.tickformat,tickformatstops:Sf.tickformatstops,tickprefix:Sf.tickprefix,showtickprefix:Sf.showtickprefix,ticksuffix:Sf.ticksuffix,showticksuffix:Sf.showticksuffix,separatethousands:Sf.separatethousands,exponentformat:Sf.exponentformat,minexponent:Sf.minexponent,showexponent:Sf.showexponent,editType:"plot"},"plot"),steps:JWt,threshold:{line:{color:Sx({},jk.line.color,{}),width:Sx({},jk.line.width,{dflt:1}),editType:"plot"},thickness:Sx({},jk.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var VJ=ye((p_r,lWe)=>{"use strict";lWe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var fWe=ye((g_r,cWe)=>{"use strict";var ey=Mr(),S7=UJ(),$Wt=Ju().defaults,uWe=Vs(),QWt=Zd(),A7=VJ(),eZt=xb(),tZt=T3(),rZt=e_(),iZt=t_();function nZt(e,t,r,n){function i(_,C){return ey.coerce(e,t,S7,_,C)}$Wt(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=ey.extendFlat({},n.font);l.size=void 0,ey.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=A7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=ey.extendFlat({},n.font);c.size=void 0,ey.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||A7.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=ey.extendFlat({},n.font);f.size=.25*(s||u||A7.defaultNumberFontSize),ey.coerceFont(i,"title.font",f),i("title.text");var h,d,v,x;function b(_,C){return ey.coerce(h,d,S7.gauge,_,C)}function g(_,C){return ey.coerce(v,x,S7.gauge.axis,_,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=uWe.newContainer(t,"gauge"),b("shape");var E=t._isBullet=t.gauge.shape==="bullet";E||i("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||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=A7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",S),QWt(h,d,{name:"steps",handleItemDefaults:aZt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),x=uWe.newContainer(d,"axis"),g("visible"),t._range=g("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};eZt(v,x,g,"linear"),iZt(v,x,g,"linear",L),rZt(v,x,g,"linear",L),tZt(v,x,g,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function aZt(e,t){function r(n,i){return ey.coerce(e,t,S7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}cWe.exports={supplyDefaults:nZt}});var dWe=ye((m_r,hWe)=>{"use strict";function oZt(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}hWe.exports={calc:oZt}});var _We=ye((y_r,yWe)=>{"use strict";var fw=xa(),sZt=(D2(),ab(I2)).interpolate,vWe=(D2(),ab(I2)).interpolateNumber,Mx=Mr(),lZt=Mx.strScale,Zk=Mx.strTranslate,uZt=Mx.rad2deg,cZt=Nh().MID_SHIFT,cw=ao(),sw=VJ(),E7=Ll(),av=Qa(),fZt=JM(),hZt=rI(),dZt=Cd(),zA=va(),HJ={left:"start",center:"middle",right:"end"},lw={left:0,center:.5,right:1},pWe=/[yzafpnµmkMGTPEZY]/;function Xk(e){return e&&e.duration>0}yWe.exports=function(t,r,n,i){var a=t._fullLayout,o;Xk(n)&&i&&(o=i()),Mx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=fw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,x={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=x.l+x.w/2,g=x.t+x.h/2,E=Math.min(x.w/2,x.h),k=sw.innerRadius*E,S,L,_,C=u.align||"center";if(L=g,!f)S=x.l+lw[C]*x.w,_=function(G){return gWe(G,x.w,x.h)};else if(h&&(S=b,L=g+E/2,_=function(G){return yZt(G,.9*k)}),d){var M=sw.bulletPadding,p=1-sw.bulletNumberDomainSize+M;S=x.l+(p+(1-p)*lw[C])*x.w,_=function(G){return gWe(G,(sw.bulletNumberDomainSize-M)*x.w,x.h)}}gZt(t,c,s,{numbersX:S,numbersY:L,numbersScaler:_,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 F=c.selectAll("g.angular").data(h?s:[]);F.exit().remove();var q=c.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&pZt(t,c,s,{radius:E,innerRadius:k,gauge:F,layer:q,size:x,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var V=c.selectAll("g.bullet").data(d?s:[]);V.exit().remove();var H=c.selectAll("g.bulletaxis").data(d?s:[]);H.exit().remove(),d&&vZt(t,c,s,{gauge:V,layer:H,size:x,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var X=c.selectAll("text.title").data(s);X.exit().remove(),X.enter().append("text").classed("title",!0),X.attr("text-anchor",function(){return d?HJ.right:HJ[u.title.align]}).text(u.title.text).call(cw.font,u.title.font).call(E7.convertToTspans,t),X.attr("transform",function(){var G=x.l+x.w*lw[u.title.align],N,W=sw.titlePadding,re=cw.bBox(X.node());if(f){if(h)if(u.gauge.axis.visible){var ae=cw.bBox(q.node());N=ae.top-W-re.bottom}else N=x.t+x.h/2-E/2-re.bottom-W;d&&(N=L-(re.top+re.bottom)/2,G=x.l-sw.bulletPadding*x.w)}else N=u._numbersTop-W-re.bottom;return Zk(G,N)})})};function vZt(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,x,b,g;a.enter().append("g").classed("bullet",!0),a.attr("transform",Zk(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var E=u.h,k=i.gauge.bar.thickness*E,S=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-sw.bulletNumberDomainSize:1);d=Wk(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[S,L],d.setScale(),v=av.calcTicks(d),x=av.makeTransTickFn(d),b=av.getTickSigns(d)[2],g=u.t+u.h,d.visible&&(av.drawTicks(e,d,{vals:d.ticks==="inside"?av.clipEnds(d,v):v,layer:o,path:av.makeTickPath(d,g,b),transFn:x}),av.drawLabels(e,d,{vals:v,layer:o,transFn:x,labelFns:av.makeLabelFns(d,g)}));function _(q){q.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)*E}).attr("height",function(V){return V.thickness*E})}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(_).call(uw),M.exit().remove();var p=a.selectAll("g.value-bullet").data([i.gauge.bar]);p.enter().append("g").classed("value-bullet",!0).append("rect"),p.select("rect").attr("height",k).attr("y",(E-k)/2).call(uw),Xk(f)?p.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)))):p.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),p.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*E).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*E).call(zA.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),T.exit().remove();var F=a.selectAll("g.gauge-outline").data([l]);F.enter().append("g").classed("gauge-outline",!0).append("rect"),F.select("rect").call(_).call(uw),F.exit().remove()}function pZt(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,x=Math.PI/2;function b(_e){var Me=i.gauge.axis.range[0],ke=i.gauge.axis.range[1],ge=(_e-Me)/(ke-Me)*Math.PI-x;return ge<-x?-x:ge>x?x:ge}function g(_e){return fw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-x)}function E(_e){_e.attr("d",function(Me){return g(Me.thickness).startAngle(b(Me.range[0])).endAngle(b(Me.range[1]))()})}var k,S,L,_;f.enter().append("g").classed("angular",!0),f.attr("transform",Zk(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),k=Wk(e,i.gauge.axis),k.type="linear",k.range=i.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var C=function(_e){return(k.range[0]-_e.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},M={},p=av.makeLabelFns(k,0),P=p.labelStandoff;M.xFn=function(_e){var Me=C(_e);return Math.cos(Me)*P},M.yFn=function(_e){var Me=C(_e),ke=Math.sin(Me)>0?.2:1;return-Math.sin(Me)*(P+_e.fontSize*ke)+Math.abs(Math.cos(Me))*(_e.fontSize*cZt)},M.anchorFn=function(_e){var Me=C(_e),ke=Math.cos(Me);return Math.abs(ke)<.1?"middle":ke>0?"start":"end"},M.heightFn=function(_e,Me,ke){var ge=C(_e);return-.5*(1+Math.sin(ge))*ke};var T=function(_e){return Zk(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return T(C(_e))};var F=function(_e){var Me=C(_e);return T(Me)+"rotate("+-uZt(Me)+")"};if(S=av.calcTicks(k),_=av.getTickSigns(k)[2],k.visible){_=k.ticks==="inside"?-1:1;var q=(k.linewidth||1)/2;av.drawTicks(e,k,{vals:S,layer:h,path:"M"+_*q+",0h"+_*k.ticklen,transFn:F}),av.drawLabels(e,k,{vals:S,layer:h,transFn:L,labelFns:M})}var V=[l].concat(i.gauge.steps),H=f.selectAll("g.bg-arc").data(V);H.enter().append("g").classed("bg-arc",!0).append("path"),H.select("path").call(E).call(uw),H.exit().remove();var X=g(i.gauge.bar.thickness),G=f.selectAll("g.value-arc").data([i.gauge.bar]);G.enter().append("g").classed("value-arc",!0).append("path");var N=G.select("path");Xk(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",mZt(X,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?X.endAngle(b(r[0].y)):"M0,0Z"),N.call(uw),G.exit().remove(),V=[];var W=i.gauge.threshold.value;(W||W===0)&&V.push({range:[W,W],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll("g.threshold-arc").data(V);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(E).call(uw),re.exit().remove();var ae=f.selectAll("g.gauge-outline").data([u]);ae.enter().append("g").classed("gauge-outline",!0).append("path"),ae.select("path").call(E).call(uw),ae.exit().remove()}function gZt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=HJ[s],u=n.transitionOpts,c=n.onComplete,f=Mx.ensureSingle(t,"g","numbers"),h,d,v,x=[];i._hasNumber&&x.push("number"),i._hasDelta&&(x.push("delta"),i.delta.position==="left"&&x.reverse());var b=f.selectAll("text").data(x);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 g(T,F,q,V){if(T.match("s")&&q>=0!=V>=0&&!F(q).slice(-1).match(pWe)&&!F(V).slice(-1).match(pWe)){var H=T.slice().replace("s","f").replace(/\d+/,function(G){return parseInt(G)-1}),X=Wk(e,{tickformat:H});return function(G){return Math.abs(G)<1?av.tickText(X,G).text:F(G)}}else return F}function E(){var T=Wk(e,{tickformat:i.number.valueformat},i._range);T.setScale(),av.prepTicks(T);var F=function(G){return av.tickText(T,G).text},q=i.number.suffix,V=i.number.prefix,H=f.select("text.number");function X(){var G=typeof r[0].y=="number"?V+F(r[0].y)+q:"-";H.text(G).call(cw.font,i.number.font).call(E7.convertToTspans,e)}return Xk(u)?H.transition().duration(u.duration).ease(u.easing).each("end",function(){X(),c&&c()}).each("interrupt",function(){X(),c&&c()}).attrTween("text",function(){var G=fw.select(this),N=vWe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var W=g(i.number.valueformat,F,r[0].lastY,r[0].y);return function(re){G.text(V+W(N(re))+q)}}):X(),h=mWe(V+F(r[0].y)+q,i.number.font,l,e),H}function k(){var T=Wk(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),av.prepTicks(T);var F=function(re){return av.tickText(T,re).text},q=i.delta.suffix,V=i.delta.prefix,H=function(re){var ae=i.delta.relative?re.relativeDelta:re.delta;return ae},X=function(re,ae){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+V+ae(re)+q},G=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=H(r[0]));var N=f.select("text.delta");N.call(cw.font,i.delta.font).call(zA.fill,G({delta:i._deltaLastValue}));function W(){N.text(X(H(r[0]),F)).call(zA.fill,G(r[0])).call(E7.convertToTspans,e)}return Xk(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var re=fw.select(this),ae=H(r[0]),_e=i._deltaLastValue,Me=g(i.delta.valueformat,F,_e,ae),ke=vWe(_e,ae);return i._deltaLastValue=ae,function(ge){re.text(X(ke(ge),Me)),re.call(zA.fill,G({delta:ke(ge)}))}}).each("end",function(){W(),c&&c()}).each("interrupt",function(){W(),c&&c()}):W(),d=mWe(X(H(r[0]),F),i.delta.font,l,e),N}var S=i.mode+i.align,L;if(i._hasDelta&&(L=k(),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&&(E(),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 _=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,p,P=.75*i.delta.font.size;i.delta.position==="left"&&(M=M7(i,"deltaPos",0,-1*(h.width*lw[i.align]+d.width*(1-lw[i.align])+P),S,Math.min),p=_[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+p),bottom:Math.max(h.bottom,d.bottom+p)}),i.delta.position==="right"&&(M=M7(i,"deltaPos",0,h.width*(1-lw[i.align])+d.width*lw[i.align]+P,S,Math.max),p=_[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+p),bottom:Math.max(h.bottom,d.bottom+p)}),i.delta.position==="bottom"&&(M=null,p=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,p=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:p})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var T=n.numbersScaler(v);S+=T[2];var F=M7(i,"numbersScale",1,T[0],S,Math.min),q;i._scaleNumbers||(F=1),i._isAngular?q=o-F*v.bottom:q=o-F*(v.top+v.bottom)/2,i._numbersTop=F*v.top+q;var V=v[s];s==="center"&&(V=(v.left+v.right)/2);var H=a-F*V;return H=M7(i,"numbersTranslate",0,H,S,Math.max),Zk(H,q)+lZt(F)})}function uw(e){e.each(function(t){zA.stroke(fw.select(this),t.line.color)}).each(function(t){zA.fill(fw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function mZt(e,t,r){return function(){var n=sZt(t,r);return function(i){return e.endAngle(n(i))()}}}function Wk(e,t,r){var n=e._fullLayout,i=Mx.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 Mx.coerce(i,a,dZt,l,u)}return fZt(i,a,s,o,n),hZt(i,a,s,o),a}function gWe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function yZt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function mWe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=fw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(E7.convertToTspans,n).call(cw.font,t),cw.bBox(a.node())}function M7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Mx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var bWe=ye((__r,xWe)=>{"use strict";xWe.exports={moduleType:"trace",name:"indicator",basePlotModule:tWe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:UJ(),supplyDefaults:fWe().supplyDefaults,calc:dWe().calc,plot:_We(),meta:{}}});var TWe=ye((x_r,wWe)=>{"use strict";wWe.exports=bWe()});var GJ=ye((w_r,EWe)=>{"use strict";var AWe=Nb(),k7=no().extendFlat,_Zt=Bu().overrideAll,SWe=Su(),xZt=Ju().attributes,MWe=Oc().descriptionOnlyNumbers,b_r=EWe.exports=_Zt({domain:xZt({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:MWe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:k7({},AWe.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:k7({},SWe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:MWe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:k7({},AWe.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:k7({},SWe({arrayOk:!0}))}},"calc","from-root")});var CWe=ye((T_r,kWe)=>{"use strict";var jJ=Mr(),bZt=GJ(),wZt=Ju().defaults;function TZt(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 AZt=Km().wrap;LWe.exports=function(){return AZt({})}});var WJ=ye((S_r,IWe)=>{"use strict";IWe.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 UWe=ye((M_r,NWe)=>{"use strict";var DWe=WJ(),XJ=no().extendFlat,SZt=uo(),MZt=vv().isTypedArray,C7=vv().isArrayOrTypedArray;NWe.exports=function(t,r){var n=ZJ(r.cells.values),i=function(p){return p.slice(r.header.values.length,p.length)},a=ZJ(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=ZJ(a));var o=a.concat(i(n).map(function(){return BWe((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}):[DWe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(RWe,0),d=u-h,v=d+DWe.uplift,x=qWe(f,v),b=qWe(c,h),g=FWe(b,[]),E=FWe(x,g),k={},S=r._fullInput.columnorder;C7(S)&&(S=Array.from(S)),S=S.concat(i(n.map(function(p,P){return P})));var L=o.map(function(p,P){var T=C7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return SZt(T)?Number(T):1}),_=L.reduce(RWe,0);L=L.map(function(p){return p/_*l});var C=Math.max(YJ(r.header.line.width),YJ(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:E,headerRowBlocks:g,scrollY:0,cells:XJ({},r.cells,{values:n}),headerCells:XJ({},r.header,{values:o}),gdColumns:o.map(function(p){return p[0]}),gdColumnsOriginalOrder:o.map(function(p){return p[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(p,P){var T=k[p];k[p]=(T||0)+1;var F=p+"__"+k[p];return{key:F,label:p,specIndex:P,xIndex:S[P],xScale:zWe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return M.columns.forEach(function(p){p.calcdata=M,p.x=zWe(p)}),M};function YJ(e){if(C7(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=OWe(),i+=a,s=u+1,a=0);return r}function OWe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var VWe=ye(KJ=>{"use strict";var L7=no().extendFlat;KJ.splitToPanels=function(e){var t=[0,0],r=L7({},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:L7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=L7({},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=L7({},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]};KJ.splitToCells=function(e){var t=EZt(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 EZt(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 o$=ye((k_r,QWe)=>{"use strict";var Ia=WJ(),Mc=xa(),JJ=Mr(),kZt=JJ.numberFormat,gu=Km(),$J=ao(),CZt=Ll(),LZt=Mr().raiseToTop,og=Mr().strTranslate,PZt=Mr().cancelTransition,IZt=UWe(),YWe=VWe(),HWe=va();QWe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ia.cn.table).data(r.map(function(E){var k=gu.unwrap(E),S=k.trace;return IZt(t,S)}),gu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ia.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(E){return E.width+E.size.l+E.size.r}).attr("height",function(E){return E.height+E.size.t+E.size.b}).attr("transform",function(E){return og(E.translateX,E.translateY)});var a=i.selectAll("."+Ia.cn.tableControlView).data(gu.repeat,gu.keyFun),o=a.enter().append("g").classed(Ia.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(E){a.filter(function(k){return E===k}).call(Yk,t)}).on(s,function(E){if(!E.scrollbarState.wheeling){E.scrollbarState.wheeling=!0;var k=E.scrollY+Mc.event.deltaY,S=I7(t,a,null,k)(E);S||(Mc.event.stopPropagation(),Mc.event.preventDefault()),E.scrollbarState.wheeling=!1}}).call(Yk,t,!0)}a.attr("transform",function(E){return og(E.size.l,E.size.t)});var l=a.selectAll("."+Ia.cn.scrollBackground).data(gu.repeat,gu.keyFun);l.enter().append("rect").classed(Ia.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),a.each(function(E){$J.setClipUrl(Mc.select(this),GWe(t,E),t)});var u=a.selectAll("."+Ia.cn.yColumn).data(function(E){return E.columns},gu.keyFun);u.enter().append("g").classed(Ia.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(E){return og(E.x,0)}),n&&u.call(Mc.behavior.drag().origin(function(E){var k=Mc.select(this);return ZWe(k,E,-Ia.uplift),LZt(this),E.calcdata.columnDragInProgress=!0,Yk(a.filter(function(S){return E.calcdata.key===S.key}),t),E}).on("drag",function(E){var k=Mc.select(this),S=function(C){return(E===C?Mc.event.x:C.x)+C.columnWidth/2};E.x=Math.max(-Ia.overdrag,Math.min(E.calcdata.width+Ia.overdrag-E.columnWidth,Mc.event.x));var L=KWe(u).filter(function(C){return C.calcdata.key===E.calcdata.key}),_=L.sort(function(C,M){return S(C)-S(M)});_.forEach(function(C,M){C.xIndex=M,C.x=E===C?C.x:C.xScale(C)}),u.filter(function(C){return E!==C}).transition().ease(Ia.transitionEase).duration(Ia.transitionDuration).attr("transform",function(C){return og(C.x,0)}),k.call(PZt).attr("transform",og(E.x,-Ia.uplift))}).on("dragend",function(E){var k=Mc.select(this),S=E.calcdata;E.x=E.xScale(E),E.calcdata.columnDragInProgress=!1,ZWe(k,E,0),VZt(t,S,S.columns.map(function(L){return L.xIndex}))})),u.each(function(E){$J.setClipUrl(Mc.select(this),jWe(t,E),t)});var c=u.selectAll("."+Ia.cn.columnBlock).data(YWe.splitToPanels,gu.keyFun);c.enter().append("g").classed(Ia.cn.columnBlock,!0).attr("id",function(E){return E.key}),c.style("cursor",function(E){return E.dragHandle?"ew-resize":E.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(HZt),h=c.filter(i$);n&&h.call(Mc.behavior.drag().origin(function(E){return Mc.event.stopPropagation(),E}).on("drag",I7(t,a,-1)).on("dragend",function(){})),QJ(t,a,f,c),QJ(t,a,h,c);var d=a.selectAll("."+Ia.cn.scrollAreaClip).data(gu.repeat,gu.keyFun);d.enter().append("clipPath").classed(Ia.cn.scrollAreaClip,!0).attr("id",function(E){return GWe(t,E)});var v=d.selectAll("."+Ia.cn.scrollAreaClipRect).data(gu.repeat,gu.keyFun);v.enter().append("rect").classed(Ia.cn.scrollAreaClipRect,!0).attr("x",-Ia.overdrag).attr("y",-Ia.uplift).attr("fill","none"),v.attr("width",function(E){return E.width+2*Ia.overdrag}).attr("height",function(E){return E.height+Ia.uplift});var x=u.selectAll("."+Ia.cn.columnBoundary).data(gu.repeat,gu.keyFun);x.enter().append("g").classed(Ia.cn.columnBoundary,!0);var b=u.selectAll("."+Ia.cn.columnBoundaryClippath).data(gu.repeat,gu.keyFun);b.enter().append("clipPath").classed(Ia.cn.columnBoundaryClippath,!0),b.attr("id",function(E){return jWe(t,E)});var g=b.selectAll("."+Ia.cn.columnBoundaryRect).data(gu.repeat,gu.keyFun);g.enter().append("rect").classed(Ia.cn.columnBoundaryRect,!0).attr("fill","none"),g.attr("width",function(E){return E.columnWidth+2*P7(E)}).attr("height",function(E){return E.calcdata.height+2*P7(E)+Ia.uplift}).attr("x",function(E){return-P7(E)}).attr("y",function(E){return-P7(E)}),n$(null,h,a)};function P7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function GWe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function jWe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function KWe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function Yk(e,t,r){function n(u){var c=u.rowBlocks;return t$(c,c.length-1)+(c.length?D7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ia.cn.scrollbarKit).data(gu.repeat,gu.keyFun);i.enter().append("g").classed(Ia.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-e$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ia.goldenRatio*Ia.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+Ia.scrollbarWidth/2+Ia.scrollbarOffset;return og(c,e$(u))});var a=i.selectAll("."+Ia.cn.scrollbar).data(gu.repeat,gu.keyFun);a.enter().append("g").classed(Ia.cn.scrollbar,!0);var o=a.selectAll("."+Ia.cn.scrollbarSlider).data(gu.repeat,gu.keyFun);o.enter().append("g").classed(Ia.cn.scrollbarSlider,!0),o.attr("transform",function(u){return og(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ia.cn.scrollbarGlyph).data(gu.repeat,gu.keyFun);s.enter().append("line").classed(Ia.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ia.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ia.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ia.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(Ia.scrollbarHideDelay).duration(Ia.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ia.cn.scrollbarCaptureZone).data(gu.repeat,gu.keyFun);l.enter().append("line").classed(Ia.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ia.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=Mc.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=Mc.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||I7(t,e,null,v(d-h.barLength/2))(u)}).call(Mc.behavior.drag().origin(function(u){return Mc.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",I7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function QJ(e,t,r,n){var i=DZt(r),a=RZt(i);OZt(a);var o=zZt(a);NZt(o);var s=qZt(a),l=FZt(s);BZt(l),JWe(l,t,n,e),a$(a)}function DZt(e){var t=e.selectAll("."+Ia.cn.columnCells).data(gu.repeat,gu.keyFun);return t.enter().append("g").classed(Ia.cn.columnCells,!0),t.exit().remove(),t}function RZt(e){var t=e.selectAll("."+Ia.cn.columnCell).data(YWe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ia.cn.columnCell,!0),t.exit().remove(),t}function zZt(e){var t=e.selectAll("."+Ia.cn.cellRect).data(gu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ia.cn.cellRect,!0),t}function FZt(e){var t=e.selectAll("."+Ia.cn.cellText).data(gu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ia.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Mc.event.stopPropagation()}),t}function qZt(e){var t=e.selectAll("."+Ia.cn.cellTextHolder).data(gu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ia.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function OZt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Xv(n.size,i,r),color:Xv(n.color,i,r),family:Xv(n.family,i,r),weight:Xv(n.weight,i,r),style:Xv(n.style,i,r),variant:Xv(n.variant,i,r),textcase:Xv(n.textcase,i,r),lineposition:Xv(n.lineposition,i,r),shadow:Xv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Xv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Xv(t.calcdata.cells.line.width,i,r),t.font=a})}function BZt(e){e.each(function(t){$J.font(Mc.select(this),t.font)})}function NZt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Mc.select(this);HWe.stroke(r,Xv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),HWe.fill(r,Xv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function JWe(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=UZt(s);i.latex=f;var h=f?"":Xv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Xv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Xv(i.calcdata.cells.format,a,o)||null,x=h+(v?kZt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=WWe(x)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?WWe(x):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var g;if(i.wrappingNeeded){var E=Ia.wrapSplitCharacter===" "?x.replace(/i&&n.push(a),i+=l}return n}function n$(e,t,r){var n=KWe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=t$(i,i.length),s=n.calcdata.groupHeight-e$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=GZt(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=t$(c.rowBlocks,c.page)-c.scrollY;return og(0,f)}),e&&(XWe(e,r,t,u,n.prevPages,n,0),XWe(e,r,t,u,n.prevPages,n,1),Yk(r,e))}}function I7(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*Mc.event.dy:n;var c=s.selectAll("."+Ia.cn.yColumn).selectAll("."+Ia.cn.columnBlock).filter(i$);return n$(e,c,s),o.scrollY===u}}function XWe(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]});QJ(e,t,l,r),i[o]=n[o]}))}function jZt(e,t,r,n){return function(){var a=Mc.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(x,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*Ia.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ia.wrapSpacer)+Ia.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ia.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),JWe(a.select("."+Ia.cn.cellText),r,e,n),Mc.select(t.parentNode.parentNode).call(a$)}}function WZt(e,t,r,n,i){return function(){if(!i.settledY){var o=Mc.select(t.parentNode),s=r$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ia.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ia.cn.columnCell).call(a$),n$(null,e.filter(i$),0),Yk(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,x=v.getBoundingClientRect(),b=Mc.select(d.parentNode).select("."+Ia.cn.cellRect).node().getBoundingClientRect(),g=d.transform.baseVal.consolidate(),E=b.top-x.top+(g?g.matrix.f:Ia.cellPad);return og($We(i,Mc.select(d.parentNode).select("."+Ia.cn.cellTextHolder).node().getBoundingClientRect().width),E)}),i.settledY=!0}}}function $We(e,t){switch(e.align){case"left":return Ia.cellPad;case"right":return e.column.columnWidth-(t||0)-Ia.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ia.cellPad}}function a$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+D7(s,1/0)},0),n=r$(t),i=D7(n,t.key),a=i+r;return og(0,a)}).selectAll("."+Ia.cn.cellRect).attr("height",function(t){return XZt(r$(t),t.key).rowHeight})}function t$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=ZZt(e[n]);return r}function D7(e,t){for(var r=0,n=0;n{"use strict";var YZt=kd().getModuleCalcData,KZt=o$(),R7="table";z7.name=R7;z7.plot=function(e){var t=YZt(e.calcdata,R7)[0];t.length&&KZt(e,t)};z7.clean=function(e,t,r,n){var i=n._has&&n._has(R7),a=t._has&&t._has(R7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var rZe=ye((L_r,tZe)=>{"use strict";tZe.exports={attributes:GJ(),supplyDefaults:CWe(),calc:PWe(),plot:o$(),moduleType:"trace",name:"table",basePlotModule:eZe(),categories:["noOpacity"],meta:{}}});var nZe=ye((P_r,iZe)=>{"use strict";iZe.exports=rZe()});var uZe=ye((I_r,lZe)=>{"use strict";var aZe=Su(),oZe=dh(),s$=Cd(),JZt=Oc().descriptionWithDates,$Zt=Bu().overrideAll,sZe=Ed().dash,l$=no().extendFlat;lZe.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:aZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:s$.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:l$({},s$.labelalias,{editType:"calc"}),tickfont:aZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:JZt("tick label")},tickformatstops:$Zt(s$.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:oZe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:l$({},sZe,{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:l$({},sZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:oZe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var q7=ye((D_r,hZe)=>{"use strict";var QZt=Su(),cZe=uZe(),fZe=dh(),F7=QZt({editType:"calc"}),eXt=Uc().zorder;F7.family.dflt='"Open Sans", verdana, arial, sans-serif';F7.size.dflt=12;F7.color.dflt=fZe.defaultLine;hZe.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:cZe,baxis:cZe,font:F7,color:{valType:"color",dflt:fZe.defaultLine,editType:"plot"},zorder:eXt}});var pZe=ye((R_r,vZe)=>{"use strict";var dZe=Mr().isArray1D;vZe.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||dZe(i))&&(!s||dZe(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 yZe=ye((z_r,mZe)=>{"use strict";var tXt=q7(),gZe=va().addOpacity,rXt=ba(),Kk=Mr(),iXt=xb(),nXt=e_(),aXt=t_(),oXt=QP(),sXt=ym(),lXt=L3();mZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=tXt[i+"axis"];function s(p,P){return Kk.coerce(t,r,o,p,P)}function l(p,P){return Kk.coerce2(t,r,o,p,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&uXt(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=rXt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}sXt(r,n.fullLayout),r.c2p=Kk.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(Kk.coerceFont(s,"title.font",a,{overrideDflt:{size:Kk.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"),iXt(t,r,s,u),aXt(t,r,s,u,n),nXt(t,r,s,u,n),oXt(t,r,s,{data:n.data,dataAttr:i});var x=l("gridcolor",gZe(f,.3)),b=l("gridwidth"),g=l("griddash"),E=s("showgrid");E||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=l("startlinecolor",f),S=l("startlinewidth",b),L=s("startline",r.showgrid||!!k||!!S);L||(delete r.startlinecolor,delete r.startlinewidth);var _=l("endlinecolor",f),C=l("endlinewidth",b),M=s("endline",r.showgrid||!!_||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),E?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",g),s("minorgridcolor",gZe(x,.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 uXt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=lXt(t,a,{autotypenumbers:e.autotypenumbers})}}});var xZe=ye((F_r,_Ze)=>{"use strict";var cXt=yZe(),fXt=Vs();_Ze.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")),hXt(t,r,n,a)};function hXt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=fXt.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};cXt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var TZe=ye((q_r,wZe)=>{"use strict";var bZe=Mr(),dXt=pZe(),vXt=xZe(),pXt=q7(),gXt=dh();wZe.exports=function(t,r,n,i){function a(l,u){return bZe.coerce(t,r,pXt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",gXt.defaultLine);if(bZe.coerceFont(a,"font",i.font),a("carpet"),vXt(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=dXt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var u$=ye((O_r,AZe)=>{"use strict";var mXt=Mr().isArrayOrTypedArray;AZe.exports=function(t,r,n){var i;for(mXt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";SZe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";MZe.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 zZe=ye((U_r,RZe)=>{"use strict";var U7=xa(),O7=ao(),B7=u$(),LZe=c$(),Jk=EZe(),f$=Ll(),Up=Mr(),PZe=Up.strRotate,N7=Up.strTranslate,IZe=Nh();RZe.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=U7.select(this),h=c[0],d=h.trace,v=d.aaxis,x=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),g=Up.ensureSingle(f,"g","majorlayer"),E=Up.ensureSingle(f,"g","boundarylayer"),k=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),FA(o,s,g,v,"a",v._gridlines,!0,a),FA(o,s,g,x,"b",x._gridlines,!0,a),FA(o,s,b,v,"a",v._minorgridlines,!0,a),FA(o,s,b,x,"b",x._minorgridlines,!0,a),FA(o,s,E,v,"a-boundary",v._boundarylines,a),FA(o,s,E,x,"b-boundary",x._boundarylines,a);var S=kZe(t,o,s,d,h,k,v._labels,"a-label"),L=kZe(t,o,s,d,h,k,x._labels,"b-label");_Xt(t,k,d,h,o,s,S,L),yXt(d,h,u,o,s)})};function yXt(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(O7.font,f.font).text(f.text).call(f$.convertToTspans,e),g=O7.bBox(this);b.attr("transform",N7(d.p[0],d.p[1])+PZe(d.angle)+N7(f.axis.labelpadding*x,g.height*.3)),u=Math.max(u,g.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function _Xt(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),x=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,Jk(r,i,a,c,r.dxydb_rough(l,u))),CZe(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+x),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,Jk(r,i,a,c,r.dxyda_rough(l,u))),CZe(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var DZe=IZe.LINE_SPACING,xXt=(1-IZe.MID_SHIFT)/DZe+1;function CZe(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=Jk(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var x=o.title.font.size;d+=x+o.title.offset;var b=u.angle+(u.flip<0?180:0),g=(b-v.angle+450)%360,E=g>90&&g<270,k=U7.select(this);k.text(o.title.text).call(f$.convertToTspans,e),E&&(d=(-f$.lineCount(k)+xXt)*DZe*x-d),k.attr("transform",N7(v.p[0],v.p[1])+PZe(v.angle)+N7(0,d)).attr("text-anchor","middle").call(O7.font,o.title.font)}),h.exit().remove()}});var qZe=ye((V_r,FZe)=>{"use strict";var V7=Mr().isArrayOrTypedArray;FZe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=V7(e)?e.length:e,f=V7(t)?t.length:t,h=V7(e)?e:null,d=V7(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,x=1/0,b=-1/0;for(i=0;i{"use strict";var OZe=Mr().isArrayOrTypedArray;NZe.exports=function(e){return BZe(e,0)};function BZe(e,t){if(!OZe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var bXt=Qa(),Ex=no().extendFlat;VZe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,x,b,g,E=t["_"+r],k=t[r+"axis"],S=k._gridlines=[],L=k._minorgridlines=[],_=k._boundarylines=[],C=t["_"+n],M=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=E.slice());var p=t._xctrl,P=t._yctrl,T=p[0].length,F=p.length,q=t._a.length,V=t._b.length;bXt.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var H=k.smoothing?3:1;function X(N){var W,re,ae,_e,Me,ke,ge,ie,Te,Ee,Ae,ze,Ce=[],me=[],De={};if(r==="b")for(re=t.b2j(N),ae=Math.floor(Math.max(0,Math.min(V-2,re))),_e=re-ae,De.length=V,De.crossLength=q,De.xy=function(ce){return t.evalxy([],ce,re)},De.dxy=function(ce,Ge){return t.dxydi([],ce,ae,Ge,_e)},W=0;W0&&(Te=t.dxydi([],W-1,ae,0,_e),Ce.push(Me[0]+Te[0]/3),me.push(Me[1]+Te[1]/3),Ee=t.dxydi([],W-1,ae,1,_e),Ce.push(ie[0]-Ee[0]/3),me.push(ie[1]-Ee[1]/3)),Ce.push(ie[0]),me.push(ie[1]),Me=ie;else for(W=t.a2i(N),ke=Math.floor(Math.max(0,Math.min(q-2,W))),ge=W-ke,De.length=q,De.crossLength=V,De.xy=function(ce){return t.evalxy([],W,ce)},De.dxy=function(ce,Ge){return t.dxydj([],ke,ce,ge,Ge)},re=0;re0&&(Ae=t.dxydj([],ke,re-1,ge,0),Ce.push(Me[0]+Ae[0]/3),me.push(Me[1]+Ae[1]/3),ze=t.dxydj([],ke,re-1,ge,1),Ce.push(ie[0]-ze[0]/3),me.push(ie[1]-ze[1]/3)),Ce.push(ie[0]),me.push(ie[1]),Me=ie;return De.axisLetter=r,De.axis=k,De.crossAxis=M,De.value=N,De.constvar=n,De.index=f,De.x=Ce,De.y=me,De.smoothing=M.smoothing,De}function G(N){var W,re,ae,_e,Me,ke=[],ge=[],ie={};if(ie.length=E.length,ie.crossLength=C.length,r==="b")for(ae=Math.max(0,Math.min(V-2,N)),Me=Math.min(1,Math.max(0,N-ae)),ie.xy=function(Te){return t.evalxy([],Te,N)},ie.dxy=function(Te,Ee){return t.dxydi([],Te,ae,Ee,Me)},W=0;WE.length-1)&&S.push(Ex(G(a),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u;fE.length-1)&&!(v<0||v>E.length-1))for(x=E[o],b=E[v],i=0;iE[E.length-1])&&L.push(Ex(X(d),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&_.push(Ex(G(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&_.push(Ex(G(E.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((E[E.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((E[0]-k.tick0)/k.dtick/(1+s))].sort(function(N,W){return N-W}),u=l[0],c=l[1],f=u;f<=c;f++)h=k.tick0+k.dtick*f,S.push(Ex(X(h),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u-1;fE[E.length-1])&&L.push(Ex(X(d),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&_.push(Ex(X(E[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&_.push(Ex(X(E[E.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var ZZe=ye((j_r,WZe)=>{"use strict";var GZe=Qa(),jZe=no().extendFlat;WZe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";XZe.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 JZe=ye((Z_r,KZe)=>{"use strict";var wXt=Mr();KZe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(ae,_e){var Me=0,ke,ge=0;return ae>0&&(ke=t[_e][ae-1])!==void 0&&(ge++,Me+=ke),ae0&&(ke=t[_e-1][ae])!==void 0&&(ge++,Me+=ke),_e0&&a0&&iM);return wXt.log("Smoother converged to",p,"after",T,"iterations"),t}});var QZe=ye((X_r,$Ze)=>{"use strict";$Ze.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var rXe=ye((Y_r,tXe)=>{"use strict";var eXe=.5;tXe.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,eXe/2),c=Math.pow(s*s+l*l,eXe/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 nXe=ye((K_r,iXe)=>{"use strict";var h$=rXe(),H7=Mr().ensureArray;function qA(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]}iXe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,x,b,g=n[0].length,E=n.length,k=a?3*g-2:g,S=o?3*E-2:E;for(t=H7(t,S),r=H7(r,S),u=0;u{"use strict";aXe.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,x,b=Math.max(0,Math.min(Math.floor(l),a)),g=Math.max(0,Math.min(Math.floor(u),o)),E=Math.max(0,Math.min(1,l-b)),k=Math.max(0,Math.min(1,u-g));b*=3,g*=3;var S=E*E,L=S*E,_=1-E,C=_*_,M=C*_,p=k*k,P=p*k,T=1-k,F=T*T,q=F*T;for(x=0;x{"use strict";sXe.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,x=1-o,b=x*x,g=x*o*2,E=-3*b,k=3*(b-g),S=3*(g-v),L=3*v,_=s*s,C=_*s,M=1-s,p=M*M,P=p*M;for(d=0;d{"use strict";uXe.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,x=v*o,b=1-o,g=b*b,E=g*b,k=s*s,S=1-s,L=S*S,_=S*s*2,C=-3*L,M=3*(L-_),p=3*(_-k),P=3*k;for(d=0;d{"use strict";var fXe=QZe(),hXe=E6().findBin,TXt=nXe(),AXt=oXe(),SXt=lXe(),MXt=cXe();dXe.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*fXe.RELATIVE_CULL_TOLERANCE,x=d*fXe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=x,f+=x,t.isVisible=function(b,g){return b>l&&bc&&gu||gf},t.setScale=function(){var b=t._x,g=t._y,E=TXt(t._xctrl,t._yctrl,b,g,o.smoothing,s.smoothing);t._xctrl=E[0],t._yctrl=E[1],t.evalxy=AXt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=SXt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=MXt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var g=Math.max(0,Math.floor(b[0]),i-2),E=b[0]-g;return(1-E)*r[g]+E*r[g+1]},t.j2b=function(b){var g=Math.max(0,Math.floor(b[1]),i-2),E=b[1]-g;return(1-E)*n[g]+E*n[g+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var g=Math.max(0,Math.min(hXe(b,r),i-2)),E=r[g],k=r[g+1];return Math.max(0,Math.min(i-1,g+(b-E)/(k-E)))},t.b2j=function(b){var g=Math.max(0,Math.min(hXe(b,n),a-2)),E=n[g],k=n[g+1];return Math.max(0,Math.min(a-1,g+(b-E)/(k-E)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,g){return t.evalxy([],b,g)},t.ab2xy=function(b,g,E){if(!E&&(br[i-1]|gn[a-1]))return[!1,!1];var k=t.a2i(b),S=t.b2j(g),L=t.evalxy([],k,S);if(E){var _=0,C=0,M=[],p,P,T,F;br[i-1]?(p=i-2,P=1,_=(b-r[i-1])/(r[i-1]-r[i-2])):(p=Math.max(0,Math.min(i-2,Math.floor(k))),P=k-p),gn[a-1]?(T=a-2,F=1,C=(g-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(S))),F=S-T),_&&(t.dxydi(M,p,T,P,F),L[0]+=M[0]*_,L[1]+=M[1]*_),C&&(t.dxydj(M,p,T,P,F),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,g,E){return[g.c2p(b[0]),E.c2p(b[1])]},t.p2x=function(b,g,E){return[g.p2c(b[0]),E.p2c(b[1])]},t.dadi=function(b){var g=Math.max(0,Math.min(r.length-2,b));return r[g+1]-r[g]},t.dbdj=function(b){var g=Math.max(0,Math.min(n.length-2,b));return n[g+1]-n[g]},t.dxyda=function(b,g,E,k){var S=t.dxydi(null,b,g,E,k),L=t.dadi(b,E);return[S[0]/L,S[1]/L]},t.dxydb=function(b,g,E,k){var S=t.dxydj(null,b,g,E,k),L=t.dbdj(g,k);return[S[0]/L,S[1]/L]},t.dxyda_rough=function(b,g,E){var k=h*(E||.1),S=t.ab2xy(b+k,g,!0),L=t.ab2xy(b-k,g,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dxydb_rough=function(b,g,E){var k=d*(E||.1),S=t.ab2xy(b,g+k,!0),L=t.ab2xy(b,g-k,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var wXe=ye((txr,bXe)=>{"use strict";var G7=Qa(),pXe=Mr().isArray1D,EXt=qZe(),gXe=UZe(),mXe=HZe(),yXe=ZZe(),kXt=YZe(),_Xe=$I(),xXe=JZe(),CXt=KI(),LXt=vXe();bXe.exports=function(t,r){var n=G7.getFromId(t,r.xaxis),i=G7.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&pXe(s)&&u.push("x"),l&&pXe(l)&&u.push("y"),u.length&&CXt(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=EXt(d,v,r.cheaterslope)}r._x=s=_Xe(s),r._y=l=_Xe(l),xXe(s,c,f),xXe(l,c,f),LXt(r),r.setScale();var x=gXe(s),b=gXe(l),g=.5*(x[1]-x[0]),E=.5*(x[1]+x[0]),k=.5*(b[1]-b[0]),S=.5*(b[1]+b[0]),L=1.3;return x=[E-g*L,E+g*L],b=[S-k*L,S+k*L],r._extremes[n._id]=G7.findExtremes(n,x,{padded:!0}),r._extremes[i._id]=G7.findExtremes(i,b,{padded:!0}),mXe(r,"a","b"),mXe(r,"b","a"),yXe(r,a),yXe(r,o),h.clipsegments=kXt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var AXe=ye((rxr,TXe)=>{"use strict";TXe.exports={attributes:q7(),supplyDefaults:TZe(),plot:zZe(),calc:wXe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Jf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var MXe=ye((ixr,SXe)=>{"use strict";SXe.exports=AXe()});var d$=ye((nxr,kXe)=>{"use strict";var PXt=Eg(),u0=Uc(),IXt=vl(),DXt=Wo().hovertemplateAttrs,RXt=Wo().texttemplateAttrs,EXe=Kl(),kx=no().extendFlat,sg=u0.marker,OA=u0.line,zXt=sg.line;kXe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:kx({},u0.mode,{dflt:"markers"}),text:kx({},u0.text,{}),texttemplate:RXt({editType:"plot"},{keys:["a","b","text"]}),hovertext:kx({},u0.hovertext,{}),line:{color:OA.color,width:OA.width,dash:OA.dash,backoff:OA.backoff,shape:kx({},OA.shape,{values:["linear","spline"]}),smoothing:OA.smoothing,editType:"calc"},connectgaps:u0.connectgaps,fill:kx({},u0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:PXt(),marker:kx({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:kx({width:zXt.width,editType:"calc"},EXe("marker.line")),gradient:sg.gradient,editType:"calc"},EXe("marker")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:kx({},IXt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:u0.hoveron,hovertemplate:DXt(),zorder:u0.zorder}});var IXe=ye((axr,PXe)=>{"use strict";var CXe=Mr(),FXt=Sm(),BA=lu(),qXt=$p(),OXt=D0(),LXe=J3(),BXt=R0(),NXt=Ig(),UXt=d$();PXe.exports=function(t,r,n,i){function a(h,d){return CXe.coerce(t,r,UXt,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("hovertext");var u=l{"use strict";DXe.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 j7=ye((sxr,zXe)=>{"use strict";zXe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var FXe=uo(),VXt=z0(),HXt=km(),GXt=F0(),jXt=q0().calcMarkerSize,WXt=j7();qXe.exports=function(t,r){var n=r._carpetTrace=WXt(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 ZXt=iT(),BXe=Qa(),XXt=ao();NXe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=BXe.getFromId(t,l.xaxis||"x"),c=BXe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var YXt=sT(),KXt=Mr().fillText;VXe.exports=function(t,r,n,i){var a=YXt(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 x=[];function b(k,S){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,x.push(L+": "+S.toFixed(3)+k.labelsuffix)}if(!h.hovertemplate){var g=f.hi||h.hoverinfo,E=g.split("+");E.indexOf("all")!==-1&&(E=["a","b","text"]),E.indexOf("a")!==-1&&b(d.aaxis,f.a),E.indexOf("b")!==-1&&b(d.baxis,f.b),x.push("y: "+o.yLabel),E.indexOf("text")!==-1&&KXt(f,h,x),o.extraText=x.join("
")}return a}});var jXe=ye((fxr,GXe)=>{"use strict";GXe.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 ZXe=ye((hxr,WXe)=>{"use strict";WXe.exports={attributes:d$(),supplyDefaults:IXe(),colorbar:Kd(),formatLabels:RXe(),calc:OXe(),plot:UXe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:HXe(),selectPoints:lT(),eventData:jXe(),moduleType:"trace",name:"scattercarpet",basePlotModule:Jf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var YXe=ye((dxr,XXe)=>{"use strict";XXe.exports=ZXe()});var v$=ye((vxr,KXe)=>{"use strict";var lg=ET(),g1=T4(),JXt=Kl(),$Xt=no().extendFlat,ty=g1.contours;KXe.exports=$Xt({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:ty.type,start:ty.start,end:ty.end,size:ty.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:ty.showlines,showlabels:ty.showlabels,labelfont:ty.labelfont,labelformat:ty.labelformat,operation:ty.operation,value:ty.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},JXt("",{cLetter:"z",autoColorDflt:!1}))});var p$=ye((pxr,QXe)=>{"use strict";var JXe=Mr(),QXt=ZI(),$Xe=v$(),eYt=yH(),tYt=m8(),rYt=y8();QXe.exports=function(t,r,n,i){function a(u,c){return JXe.coerce(t,r,$Xe,u,c)}function o(u){return JXe.coerce2(t,r,$Xe,u)}if(a("carpet"),t.a&&t.b){var s=QXt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?eYt(t,r,a,i,n,{hasHover:!1}):(tYt(t,r,a,o),rYt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var iYe=ye((gxr,rYe)=>{"use strict";var iYt=zv(),eYe=Mr(),nYt=KI(),aYt=$I(),oYt=QI(),sYt=e8(),tYe=VV(),lYt=p$(),uYt=j7(),cYt=oH();rYe.exports=function(t,r){var n=r._carpetTrace=uYt(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),lYt(a,r,r._defaultColor,t._fullLayout)}var o=fYt(t,r);return cYt(r,r._z),o}};function fYt(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,eYe.isArray1D(t.z)&&nYt(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=aYt(t._z||t.z,t.transpose),t._emptypoints=sYt(f),oYt(f,t._emptypoints);var h=eYe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=tYe(t,d,o,s,h,n),x=t.ytype==="scaled"?"":l,b=tYe(t,x,u,c,f.length,i),g={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&iYt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[g]}});var aYe=ye((mxr,nYe)=>{"use strict";var hYt=Mr().isArrayOrTypedArray;nYe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,x,b,g=hYt(r)?"a":"b",E=g==="a"?e.aaxis:e.baxis,k=E.smoothing,S=g==="a"?e.a2i:e.b2j,L=g==="a"?r:n,_=g==="a"?n:r,C=g==="a"?t.a.length:t.b.length,M=g==="a"?t.b.length:t.a.length,p=Math.floor(g==="a"?e.b2j(_):e.a2i(_)),P=g==="a"?function(_e){return e.evalxy([],_e,p)}:function(_e){return e.evalxy([],p,_e)};k&&(o=Math.max(0,Math.min(M-2,p)),s=p-o,a=g==="a"?function(_e,Me){return e.dxydi([],_e,o,Me,s)}:function(_e,Me){return e.dxydj([],o,_e,s,Me)});var T=S(L[0]),F=S(L[1]),q=T0?Math.floor:Math.ceil,X=q>0?Math.ceil:Math.floor,G=q>0?Math.min:Math.max,N=q>0?Math.max:Math.min,W=H(T+V),re=X(F-V);c=P(T);var ae=[[c]];for(i=W;i*q{"use strict";var Z7=xa(),X7=u$(),cYe=c$(),$k=ao(),m1=Mr(),dYt=lH(),vYt=uH(),hw=b8(),W7=S4(),pYt=dH(),gYt=hH(),mYt=vH(),yYt=j7(),oYe=aYe();fYe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,"contour").each(function(s){var l=Z7.select(this),u=s[0],c=u.trace,f=c._carpetTrace=yYt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,x=c.contours,b=gYt(x,r,u),g=x.type==="constraint",E=x._operation,k=g?E==="="?"lines":"fill":x.coloring;function S(H){var X=f.ab2xy(H[0],H[1],!0);return[a.c2p(X[0]),o.c2p(X[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]]];dYt(b);var _=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;vYt(b,_,C);var M=b;x.type==="constraint"&&(M=pYt(b,E)),_Yt(b,S);var p,P,T,F,q=[];for(F=h.clipsegments.length-1;F>=0;F--)p=h.clipsegments[F],P=X7([],p.x,a.c2p),T=X7([],p.y,o.c2p),P.reverse(),T.reverse(),q.push(cYe(P,T,p.bicubic));var V="M"+q.join("L")+"Z";wYt(l,h.clipsegments,a,o,g,k),TYt(c,l,a,o,M,L,S,f,h,k,V),xYt(l,b,t,u,x,r,f),$k.setClipUrl(l,f._clipPathId,t)})};function _Yt(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 sYe(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 lYe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function uYe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function wYt(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,x=b):Math.abs(h[1]-d[1])=0&&(d=P,x=b):m1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(x>=0)break;u+=M(h,d),h=d}if(x===t.edgepaths.length){m1.log("unclosed perimeter path");break}l=x,f=c.indexOf(l)===-1,f&&(l=c[0],u+=M(h,d)+"Z",h=null)}for(l=0;l{"use strict";dYe.exports={attributes:v$(),supplyDefaults:p$(),colorbar:A8(),calc:iYe(),plot:hYe(),style:T8(),moduleType:"trace",name:"contourcarpet",basePlotModule:Jf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var gYe=ye((xxr,pYe)=>{"use strict";pYe.exports=vYe()});var K7=ye((bxr,bYe)=>{"use strict";var Y7=Mr().extendFlat,Qk=Uc(),mYe=Oc().axisHoverFormat,_Ye=Ed().dash,SYt=i3(),xYe=HT(),MYt=xYe.INCREASING.COLOR,EYt=xYe.DECREASING.COLOR,g$=Qk.line;function yYe(e){return{line:{color:Y7({},g$.color,{dflt:e}),width:g$.width,dash:_Ye,editType:"style"},editType:"style"}}bYe.exports={xperiod:Qk.xperiod,xperiod0:Qk.xperiod0,xperiodalignment:Qk.xperiodalignment,xhoverformat:mYe("x"),yhoverformat:mYe("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:Y7({},g$.width,{}),dash:Y7({},_Ye,{}),editType:"style"},increasing:yYe(MYt),decreasing:yYe(EYt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:Y7({},SYt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:Qk.zorder}});var m$=ye((wxr,wYe)=>{"use strict";var kYt=ba(),CYt=Mr();wYe.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=kYt.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,CYt.minRowLength(a))),r._length=f,f}}});var SYe=ye((Txr,AYe)=>{"use strict";var LYt=Mr(),PYt=m$(),IYt=Pg(),DYt=K7();AYe.exports=function(t,r,n,i){function a(s,l){return LYt.coerce(t,r,DYt,s,l)}var o=PYt(t,r,a,i);if(!o){r.visible=!1;return}IYt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),TYe(t,r,a,"increasing"),TYe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function TYe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var y$=ye((Axr,EYe)=>{"use strict";var NA=Mr(),J7=NA._,$7=Qa(),RYt=Dg(),eC=es().BADNUM;function zYt(e,t){var r=$7.getFromId(e,t.xaxis),n=$7.getFromId(e,t.yaxis),i=qYt(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=MYe(e,t,o,s,n,FYt);return t._extremes[r._id]=$7.findExtremes(r,s,{vpad:a/2}),l.length?(NA.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function FYt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function MYe(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=NA.isArrayOrTypedArray(t.text),f=NA.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,x=[],b=0;bd):h=L>E,d=L;var _=a(E,k,S,L);_.pos=g,_.yc=(E+L)/2,_.i=b,_.dir=h?"increasing":"decreasing",_.x=_.pos,_.y=[S,k],v&&(_.orig_p=r[b]),c&&(_.tx=t.text[b]),f&&(_.htx=t.hovertext[b]),x.push(_)}else x.push({pos:g,empty:!0})}return t._extremes[i._id]=$7.findExtremes(i,NA.concat(l,s),{padded:!0}),x.length&&(x[0].t={labels:{open:J7(e,"open:")+" ",high:J7(e,"high:")+" ",low:J7(e,"low:")+" ",close:J7(e,"close:")+" "}}),x}function qYt(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 OYt=xa(),kYe=Mr();CYe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;kYe.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=OYt.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(kYe.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(x){if(x.empty)return"M0,0Z";var b=o.c2p(x.pos-d,!0),g=o.c2p(x.pos+d,!0),E=s?(b+g)/2:o.c2p(x.pos,!0),k=a.c2p(x.o,!0),S=a.c2p(x.h,!0),L=a.c2p(x.l,!0),_=a.c2p(x.c,!0);return"M"+b+","+k+"H"+E+"M"+E+","+S+"V"+L+"M"+g+","+_+"H"+E})})}});var IYe=ye((Mxr,PYe)=>{"use strict";var _$=xa(),BYt=ao(),NYt=va();PYe.exports=function(t,r,n){var i=n||_$.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;_$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;_$.select(this).style("fill","none").call(NYt.stroke,l.color).call(BYt.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var b$=ye((Exr,qYe)=>{"use strict";var x$=Qa(),UYt=Mr(),Q7=Nc(),VYt=va(),HYt=Mr().fillText,DYe=HT(),GYt={increasing:DYe.INCREASING.SYMBOL,decreasing:DYe.DECREASING.SYMBOL};function jYt(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?zYe(e,t,r,n):FYe(e,t,r,n)}function RYe(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},x=s.bdPos||s.tickLen,b=s.wHover,g=Math.min(1,x/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-g,h=e.maxSpikeDistance-g;function E(P){var T=v(P);return Q7.inbox(T-b,T+b,f)}function k(P){var T=P[u],F=P[c];return T===F||Q7.inbox(T-r,F-r,f)}function S(P){return(E(P)+k(P))/2}var L=Q7.getDistanceFunction(n,E,k,S);if(Q7.getClosest(i,L,e),e.index===!1)return null;var _=i[e.index];if(_.empty)return null;var C=_.dir,M=o[C],p=M.line.color;return VYt.opacity(p)&&M.line.width?e.color=p:e.color=M.fillcolor,e.x0=a.c2p(_.pos+d-x,!0),e.x1=a.c2p(_.pos+d+x,!0),e.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,e.spikeDistance=S(_)*h/f,e.xSpike=a.c2p(_.pos,!0),e}function zYe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=RYe(e,t,r,n);if(!u)return[];var c=u.index,f=i[c],h=f.hi||o.hoverinfo,d=h.split("+"),v=h==="all",x=v||d.indexOf("y")!==-1;if(!x)return[];for(var b=["high","open","close","low"],g={},E=0;E"+s.labels[k]+x$.hoverLabelText(a,S,o.yhoverformat)):(_=UYt.extendFlat({},u),_.y0=_.y1=L,_.yLabelVal=S,_.yLabel=s.labels[k]+x$.hoverLabelText(a,S,o.yhoverformat),_.name="",l.push(_),g[S]=_)}return l}function FYe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=RYe(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]+x$.hoverLabelText(a,o[S][f],o.yhoverformat)}var v=c.hi||o.hoverinfo,x=v.split("+"),b=v==="all",g=b||x.indexOf("y")!==-1,E=b||x.indexOf("text")!==-1,k=g?[d("open"),d("high"),d("low"),d("close")+" "+GYt[h]]:[];return E&&HYt(c,o,k),l.extraText=k.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}qYe.exports={hoverPoints:jYt,hoverSplit:zYe,hoverOnPoints:FYe}});var w$=ye((kxr,OYe)=>{"use strict";OYe.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";BYe.exports={moduleType:"trace",name:"ohlc",basePlotModule:Jf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:K7(),supplyDefaults:SYe(),calc:y$().calc,plot:LYe(),style:IYe(),hoverPoints:b$().hoverPoints,selectPoints:w$()}});var VYe=ye((Lxr,UYe)=>{"use strict";UYe.exports=NYe()});var A$=ye((Pxr,jYe)=>{"use strict";var T$=Mr().extendFlat,HYe=Oc().axisHoverFormat,c0=K7(),UA=v4();function GYe(e){return{line:{color:T$({},UA.line.color,{dflt:e}),width:UA.line.width,editType:"style"},fillcolor:UA.fillcolor,editType:"style"}}jYe.exports={xperiod:c0.xperiod,xperiod0:c0.xperiod0,xperiodalignment:c0.xperiodalignment,xhoverformat:HYe("x"),yhoverformat:HYe("y"),x:c0.x,open:c0.open,high:c0.high,low:c0.low,close:c0.close,line:{width:T$({},UA.line.width,{}),editType:"style"},increasing:GYe(c0.increasing.line.color.dflt),decreasing:GYe(c0.decreasing.line.color.dflt),text:c0.text,hovertext:c0.hovertext,whiskerwidth:T$({},UA.whiskerwidth,{dflt:0}),hoverlabel:c0.hoverlabel,zorder:UA.zorder}});var XYe=ye((Ixr,ZYe)=>{"use strict";var WYt=Mr(),ZYt=va(),XYt=m$(),YYt=Pg(),KYt=A$();ZYe.exports=function(t,r,n,i){function a(s,l){return WYt.coerce(t,r,KYt,s,l)}var o=XYt(t,r,a,i);if(!o){r.visible=!1;return}YYt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),WYe(t,r,a,"increasing"),WYe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function WYe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",ZYt.addOpacity(i,.5))}});var $Ye=ye((Dxr,JYe)=>{"use strict";var YYe=Mr(),KYe=Qa(),JYt=Dg(),$Yt=y$().calcCommon;JYe.exports=function(e,t){var r=e._fullLayout,n=KYe.getFromId(e,t.xaxis),i=KYe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=JYt(t,n,"x",a).vals,s=$Yt(e,t,a,o,i,QYt);return s.length?(YYe.extendFlat(s[0].t,{num:r._numBoxes,dPos:YYe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function QYt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var eKe=ye((Rxr,QYe)=>{"use strict";QYe.exports={moduleType:"trace",name:"candlestick",basePlotModule:Jf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:A$(),layoutAttributes:p4(),supplyLayoutDefaults:UI().supplyLayoutDefaults,crossTraceCalc:HI().crossTraceCalc,supplyDefaults:XYe(),calc:$Ye(),plot:GI().plot,layerName:"boxlayer",style:jI().style,hoverPoints:b$().hoverPoints,selectPoints:w$()}});var rKe=ye((zxr,tKe)=>{"use strict";tKe.exports=eKe()});var M$=ye((Fxr,iKe)=>{"use strict";var t9=Mr(),eKt=ym(),e9=t9.deg2rad,S$=t9.rad2deg;iKe.exports=function(t,r,n){switch(eKt(t,n),t._id){case"x":case"radialaxis":tKt(t,r);break;case"angularaxis":nKt(t,r);break}};function tKt(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 rKt(e,t){return t==="degrees"?e9(e):e}function iKt(e,t){return t==="degrees"?S$(e):e}function nKt(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return rKt(n(a),o)},e.c2d=function(a,o){return i(iKt(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";nKe.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 n9=ye((Oxr,uKe)=>{"use strict";var dw=Mr(),aKe=wM().tester,E$=dw.findIndexOfMin,sKe=dw.isAngleInsideSector,aKt=dw.angleDelta,oKe=dw.angleDist;function oKt(e,t,r,n,i){if(!sKe(t,n))return!1;var a,o;r[0]0?o:1/0},n=E$(t,r),i=dw.mod(n+1,t.length);return[t[n],t[i]]}function i9(e){return Math.abs(e)>1e-10?e:0}function k$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function cKe(e){return e<0?-1:e>0?1:0}function HA(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 GA(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function fKe(e,t){return t*e.radius}function vKt(e,t,r,n){var i=GA(e,HA([r,t])),a=i[0],o=i[1],s=GA(e,HA([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=fKe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function pKt(e,t,r,n){var i=fKe(e,1/(t+1)),a=GA(e,HA([t,r])),o=a[0],s=a[1],l=GA(e,HA([t,n])),u=l[0],c=l[1];if(cKe(r)!==cKe(n)){var f=GA(e,HA([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var vw=xa(),gKt=id(),gw=ba(),cc=Mr(),ry=cc.strRotate,dd=cc.strTranslate,L$=va(),tC=ao(),mKt=Yu(),dp=Qa(),yKt=ym(),_Kt=M$(),xKt=wg().doAutoRange,y1=RN(),s9=gv(),dKe=Nc(),bKt=Mb(),wKt=wf().prepSelect,TKt=wf().selectOnClick,P$=wf().clearOutline,vKe=Tg(),pKe=lM(),gKe=gM().redrawReglTraces,AKt=Nh().MID_SHIFT,Cx=r9(),_1=n9(),l9=C$(),a9=l9.smith,SKt=l9.reactanceArc,MKt=l9.resistanceArc,o9=l9.smithTransform,EKt=cc._,mKe=cc.mod,Lx=cc.deg2rad,pw=cc.rad2deg;function yKe(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 Fd=yKe.prototype;bKe.exports=function(t,r,n){return new yKe(t,r,n)};Fd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(g=u,E=u*b,L=(c-E)/i.h/2,k=[s[0],s[1]],S=[l[0]+L,l[1]-L]):(g=c/b,E=c,L=(u-g)/i.w/2,k=[s[0]+L,s[1]-L],S=[l[0],l[1]]),r.xLength2=g,r.yLength2=E,r.xDomain2=k,r.yDomain2=S;var _=r.xOffset2=i.l+i.w*k[0],C=r.yOffset2=i.t+i.h*(1-S[1]),M=r.radius=g/d,p=r.innerRadius=r.getHole(t)*M,P=r.cx=_-M*h[0],T=r.cy=C+M*h[3],F=r.cxx=P-_,q=r.cyy=T-C,V=a.side,H;V==="counterclockwise"?(H=V,V="top"):V==="clockwise"&&(H=V,V="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:V,_trueSide:H,domain:[p/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:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:S});var X=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",X).attr("transform",dd(F,q)),n.frontplot.attr("transform",dd(_,C)).call(tC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",X).attr("transform",dd(P,T)).call(L$.fill,t.bgcolor)};Fd.mockAxis=function(e,t,r,n){var i=cc.extendFlat({},r,n);return _Kt(i,t,e),i};Fd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=cc.extendFlat({type:"linear"},r);yKt(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};Fd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);xKt(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 p=o9(r,a9([M.x,0]));return dd(p[0]-s,p[1]-l)}:function(M){return dd(f.l2p(M.x)+o,0)},x=d?function(M){return MKt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(f.r2p(M.x)+o)},b=_Ke(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var g=0,E=d?(f.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return dp.tickText(f,M,!0,!1)}):dp.calcTicks(f),k=d?E:dp.clipEnds(f,E),S=dp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(S=-S),f.ticks==="top"&&f.side==="top"&&(g=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(g=f.ticklen)),dp.drawTicks(n,f,{vals:E,layer:i["radial-axis"],path:dp.makeTickPath(f,0,S),transFn:v,crisp:!1}),dp.drawGrid(n,f,{vals:k,layer:i["radial-grid"],path:x,transFn:cc.noop,crisp:!1}),dp.drawLabels(n,f,{vals:E,layer:i["radial-axis"],transFn:v,labelFns:dp.makeLabelFns(f,g)})}var L=r.radialAxisAngle=r.vangles?pw(xKe(Lx(u.angle),r.vangles)):u.angle,_=dd(s,l),C=_+ry(-L);rC(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),rC(i["radial-grid"],h&&u.showgrid,{transform:d?"":_}),rC(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(L$.stroke,u.linecolor)};Fd.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=tC.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,x=Lx(v),b=Math.cos(x),g=Math.sin(x),E=o+a/2*b+c*g,k=s-a/2*g+c*b;n.layers["radial-axis-title"]=bKt.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:EKt(i,"Click to enter radial axis title"),attributes:{x:E,y:k,"text-anchor":"middle"},transform:{rotate:-v}})}};Fd.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(p){var P=o9(r,a9([0,p.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(p){return c.t2g(p.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=pw(c.tick0),c.dtick=pw(c.dtick));var d=function(p){return dd(s+a*Math.cos(p),l-a*Math.sin(p))},v=f?function(p){var P=o9(r,a9([0,p.x]));return dd(P[0],P[1])}:function(p){return d(h(p))},x=f?function(p){var P=o9(r,a9([0,p.x])),T=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return dd(P[0],P[1])+ry(-pw(T))}:function(p){var P=h(p);return d(P)+ry(-pw(P))},b=f?function(p){return SKt(r,p.x,0,1/0)}:function(p){var P=h(p),T=Math.cos(P),F=Math.sin(P);return"M"+[s+o*T,l-o*F]+"L"+[s+a*T,l-a*F]},g=dp.makeLabelFns(c,0),E=g.labelStandoff,k={};k.xFn=function(p){var P=h(p);return Math.cos(P)*E},k.yFn=function(p){var P=h(p),T=Math.sin(P)>0?.2:1;return-Math.sin(P)*(E+p.fontSize*T)+Math.abs(Math.cos(P))*(p.fontSize*AKt)},k.anchorFn=function(p){var P=h(p),T=Math.cos(P);return Math.abs(T)<.1?"middle":T>0?"start":"end"},k.heightFn=function(p,P,T){var F=h(p);return-.5*(1+Math.sin(F))*T};var S=_Ke(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(p){return dp.tickText(c,p,!0,!1)}):dp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var _;if(t.gridshape==="linear"?(_=L.map(h),cc.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,c.type==="category"&&(L=L.filter(function(p){return cc.isAngleInsideSector(h(p),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,M=(c.linewidth||1)/2;dp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*c.ticklen,transFn:x,crisp:!1}),dp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:cc.noop,crisp:!1}),dp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:k})}rC(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:dd(s,l)}).attr("stroke-width",u.linewidth).call(L$.stroke,u.linecolor)};Fd.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)}};Fd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Cx.MINZOOM,s=Cx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,x=t.vangles,b=t.radialAxis,g=_1.clampTiny,E=_1.findXYatLength,k=_1.findEnclosingVertexAngles,S=Cx.cornerHalfWidth,L=Cx.cornerLen/2,_,C,M=y1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");vw.select(M).attr("d",t.pathSubplot()).attr("transform",dd(c,f)),M.onmousemove=function(ce){dKe.hover(n,ce,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(ce){n._dragging||s9.unhover(n,ce)};var p={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,F,q,V,H,X,G,N;function W(ce,Ge){return Math.sqrt(ce*ce+Ge*Ge)}function re(ce,Ge){return W(ce-h,Ge-d)}function ae(ce,Ge){return Math.atan2(d-Ge,ce-h)}function _e(ce,Ge){return[ce*Math.cos(Ge),ce*Math.sin(-Ge)]}function Me(ce,Ge){if(ce===0)return t.pathSector(2*S);var nt=L/ce,ct=Ge-nt,qt=Ge+nt,rt=Math.max(0,Math.min(ce,l)),ot=rt-S,Dt=rt+S;return"M"+_e(ot,ct)+"A"+[ot,ot]+" 0,0,0 "+_e(ot,qt)+"L"+_e(Dt,qt)+"A"+[Dt,Dt]+" 0,0,1 "+_e(Dt,ct)+"Z"}function ke(ce,Ge,nt){if(ce===0)return t.pathSector(2*S);var ct=_e(ce,Ge),qt=_e(ce,nt),rt=g((ct[0]+qt[0])/2),ot=g((ct[1]+qt[1])/2),Dt,kt;if(rt&&ot){var Ct=ot/rt,Yt=-1/Ct,xr=E(S,Ct,rt,ot);Dt=E(L,Yt,xr[0][0],xr[0][1]),kt=E(L,Yt,xr[1][0],xr[1][1])}else{var er,Ke;ot?(er=L,Ke=S):(er=S,Ke=L),Dt=[[rt-er,ot-Ke],[rt+er,ot-Ke]],kt=[[rt-er,ot+Ke],[rt+er,ot+Ke]]}return"M"+Dt.join("L")+"L"+kt.reverse().join("L")+"Z"}function ge(){F=null,q=null,V=t.pathSubplot(),H=!1;var ce=n._fullLayout[t.id];X=gKt(ce.bgcolor).getLuminance(),G=y1.makeZoombox(a,X,c,f,V),G.attr("fill-rule","evenodd"),N=y1.makeCorners(a,c,f),P$(n)}function ie(ce,Ge){return Ge=Math.max(Math.min(Ge,l),u),ceo?(ce-1&&ce===1&&TKt(Ge,n,[t.xaxis],[t.yaxis],t.id,p),nt.indexOf("event")>-1&&dKe.click(n,Ge,t.id)}p.prepFn=function(ce,Ge,nt){var ct=n._fullLayout.dragmode,qt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var rt=n._fullLayout._invTransform;_=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ot=cc.apply3DTransform(rt)(Ge-qt.left,nt-qt.top);if(P=ot[0],T=ot[1],x){var Dt=_1.findPolygonOffset(l,v[0],v[1],x);P+=h+Dt[0],T+=d+Dt[1]}switch(ct){case"zoom":p.clickFn=De,r||(x?p.moveFn=ze:p.moveFn=Ee,p.doneFn=Ce,ge(ce,Ge,nt));break;case"select":case"lasso":wKt(ce,Ge,nt,p,ct);break}},s9.init(p)};Fd.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=Cx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Lx(n.radialAxisAngle),v=c._rl,x=v[0],b=v[1],g=v[r],E=.75*(v[1]-v[0])/(1-n.getHole(t))/o,k,S,L;r?(k=l+(o+h)*Math.cos(d),S=u-(o+h)*Math.sin(d),L="radialdrag"):(k=l+(s-h)*Math.cos(d),S=u-(s-h)*Math.sin(d),L="radialdrag-inner");var _=y1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:_,gd:i};e.dragmode===!1&&(C.dragmode=!1),rC(vw.select(_),c.visible&&s0!=(r?P>x: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 xKe(e,t){var r=function(i){return cc.angleDist(e,i)},n=cc.findIndexOfMin(t,r);return t[n]}function rC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var D$=ye((Uxr,EKe)=>{"use strict";var CKt=dh(),Yo=Cd(),LKt=Ju().attributes,f0=Mr().extendFlat,wKe=Bu().overrideAll,TKe=wKe({color:Yo.color,showline:f0({},Yo.showline,{dflt:!0}),linecolor:Yo.linecolor,linewidth:Yo.linewidth,showgrid:f0({},Yo.showgrid,{dflt:!0}),gridcolor:Yo.gridcolor,gridwidth:Yo.gridwidth,griddash:Yo.griddash},"plot","from-root"),AKe=wKe({tickmode:Yo.minor.tickmode,nticks:Yo.nticks,tick0:Yo.tick0,dtick:Yo.dtick,tickvals:Yo.tickvals,ticktext:Yo.ticktext,ticks:Yo.ticks,ticklen:Yo.ticklen,tickwidth:Yo.tickwidth,tickcolor:Yo.tickcolor,ticklabelstep:Yo.ticklabelstep,showticklabels:Yo.showticklabels,labelalias:Yo.labelalias,showtickprefix:Yo.showtickprefix,tickprefix:Yo.tickprefix,showticksuffix:Yo.showticksuffix,ticksuffix:Yo.ticksuffix,showexponent:Yo.showexponent,exponentformat:Yo.exponentformat,minexponent:Yo.minexponent,separatethousands:Yo.separatethousands,tickfont:Yo.tickfont,tickangle:Yo.tickangle,tickformat:Yo.tickformat,tickformatstops:Yo.tickformatstops,layer:Yo.layer},"plot","from-root"),SKe={visible:f0({},Yo.visible,{dflt:!0}),type:f0({},Yo.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Yo.autotypenumbers,autorangeoptions:{minallowed:Yo.autorangeoptions.minallowed,maxallowed:Yo.autorangeoptions.maxallowed,clipmin:Yo.autorangeoptions.clipmin,clipmax:Yo.autorangeoptions.clipmax,include:Yo.autorangeoptions.include,editType:"plot"},autorange:f0({},Yo.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:f0({},Yo.minallowed,{editType:"plot"}),maxallowed:f0({},Yo.maxallowed,{editType:"plot"}),range:f0({},Yo.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Yo.categoryorder,categoryarray:Yo.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Yo.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:f0({},Yo.title.text,{editType:"plot",dflt:""}),font:f0({},Yo.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Yo.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(SKe,TKe,AKe);var MKe={visible:f0({},Yo.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Yo.autotypenumbers,categoryorder:Yo.categoryorder,categoryarray:Yo.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:Yo.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(MKe,TKe,AKe);EKe.exports={domain:LKt({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:CKt.background},radialaxis:SKe,angularaxis:MKe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var PKe=ye((Vxr,LKe)=>{"use strict";var u9=Mr(),PKt=va(),IKt=Vs(),DKt=k_(),RKt=kd().getSubplotData,zKt=xb(),FKt=T3(),qKt=e_(),OKt=t_(),BKt=QP(),NKt=YM(),UKt=fB(),VKt=L3(),CKe=D$(),HKt=M$(),c9=r9(),kKe=c9.axisNames;function GKt(e,t,r,n){var i=r("bgcolor");n.bgColor=PKt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=RKt(n.fullData,c9.name,n.id),s=n.layoutOut,l;function u(G,N){return r(l+"."+G,N)}for(var c=0;c{"use strict";var WKt=kd().getSubplotCalcData,ZKt=Mr().counterRegex,XKt=I$(),DKe=r9(),RKe=DKe.attr,mw=DKe.name,IKe=ZKt(mw),zKe={};zKe[RKe]={valType:"subplotid",dflt:mw,editType:"calc"};function YKt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[mw],i=0;i{"use strict";var JKt=Wo().hovertemplateAttrs,$Kt=Wo().texttemplateAttrs,h9=no().extendFlat,QKt=Eg(),h0=Uc(),eJt=vl(),jA=h0.line;qKe.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:$Kt({editType:"plot"},{keys:["r","theta","text"]}),hovertext:h0.hovertext,line:{color:jA.color,width:jA.width,dash:jA.dash,backoff:jA.backoff,shape:h9({},jA.shape,{values:["linear","spline"]}),smoothing:jA.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:h9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:h9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:QKt(),hoverinfo:h9({},eJt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:JKt(),selected:h0.selected,unselected:h0.unselected}});var v9=ye((jxr,NKe)=>{"use strict";var d9=Mr(),WA=lu(),tJt=$p(),rJt=D0(),OKe=J3(),iJt=R0(),nJt=Ig(),aJt=Sm().PTS_LINESONLY,oJt=iC();function sJt(e,t,r,n){function i(s,l){return d9.coerce(e,t,oJt,s,l)}var a=BKe(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var lJt=Mr(),UKe=Qa();VKe.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=UKe.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?lJt.rad2deg(t.theta):t.theta;return i.thetaLabel=UKe.tickText(s,u,!0).text,i}});var jKe=ye((Zxr,GKe)=>{"use strict";var HKe=uo(),uJt=es().BADNUM,cJt=Qa(),fJt=z0(),hJt=km(),dJt=F0(),vJt=q0().calcMarkerSize;GKe.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 pJt=iT(),WKe=es().BADNUM;ZKe.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 gJt=sT();function mJt(e,t,r,n){var i=gJt(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,YKe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function YKe(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("
")}}KKe.exports={hoverPoints:mJt,makeHoverPointText:YKe}});var $Ke=ye((Kxr,JKe)=>{"use strict";JKe.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:f9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:v9().supplyDefaults,colorbar:Kd(),formatLabels:p9(),calc:jKe(),plot:XKe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:g9().hoverPoints,selectPoints:lT(),meta:{}}});var eJe=ye((Jxr,QKe)=>{"use strict";QKe.exports=$Ke()});var R$=ye(($xr,tJe)=>{"use strict";var Vp=iC(),x1=ek(),yJt=Wo().texttemplateAttrs;tJe.exports={mode:Vp.mode,r:Vp.r,theta:Vp.theta,r0:Vp.r0,dr:Vp.dr,theta0:Vp.theta0,dtheta:Vp.dtheta,thetaunit:Vp.thetaunit,text:Vp.text,texttemplate:yJt({editType:"plot"},{keys:["r","theta","text"]}),hovertext:Vp.hovertext,hovertemplate:Vp.hovertemplate,line:{color:x1.line.color,width:x1.line.width,dash:x1.line.dash,editType:"calc"},connectgaps:x1.connectgaps,marker:x1.marker,fill:x1.fill,fillcolor:x1.fillcolor,textposition:x1.textposition,textfont:x1.textfont,hoverinfo:Vp.hoverinfo,selected:Vp.selected,unselected:Vp.unselected}});var nJe=ye((Qxr,iJe)=>{"use strict";var rJe=Mr(),z$=lu(),_Jt=v9().handleRThetaDefaults,xJt=$p(),bJt=D0(),wJt=R0(),TJt=Ig(),AJt=Sm().PTS_LINESONLY,SJt=R$();iJe.exports=function(t,r,n,i){function a(s,l){return rJe.coerce(t,r,SJt,s,l)}var o=_Jt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var MJt=p9();aJe.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]),MJt(t,r,n)}});var lJe=ye((tbr,sJe)=>{"use strict";var EJt=z0(),kJt=q0().calcMarkerSize,CJt=Y2(),LJt=Qa(),PJt=ox().TOO_MANY_POINTS;sJe.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 IJt=zz(),DJt=g9().makeHoverPointText;function RJt(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=IJt.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,DJt(f,h,c,u),l}}uJe.exports={hoverPoints:RJt}});var hJe=ye((ibr,fJe)=>{"use strict";fJe.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:f9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:R$(),supplyDefaults:nJe(),colorbar:Kd(),formatLabels:oJe(),calc:lJe(),hoverPoints:cJe().hoverPoints,selectPoints:KX(),meta:{}}});var dJe=ye((nbr,F$)=>{"use strict";var zJt=Oz(),FJt=uo(),qJt=QY(),OJt=ZX(),m9=Y2(),y9=Mr(),BJt=ox().TOO_MANY_POINTS,NJt={};F$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=OJt(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,x,b=h.slice(),g=d.slice();for(x=0;x=BJt&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=E),v.line&&E.length>1&&y9.extendFlat(v.line,m9.linePositions(t,u,E)),v.text&&(y9.extendFlat(v.text,{positions:E},m9.textPosition(t,u,v.text,v.marker)),y9.extendFlat(v.textSel,{positions:E},m9.textPosition(t,u,v.text,v.markerSel)),y9.extendFlat(v.textUnsel,{positions:E},m9.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=k,c.y=S,c.rawx=k,c.rawy=S,c.r=h,c.theta=d,c.positions=E,c._scene=o,c.index=o.count,o.count++}}),qJt(t,r,n)}};F$.exports.reglPrecompiled=NJt});var gJe=ye((abr,pJe)=>{"use strict";var vJe=hJe();vJe.plot=dJe();pJe.exports=vJe});var yJe=ye((obr,mJe)=>{"use strict";mJe.exports=gJe()});var q$=ye((sbr,_Je)=>{"use strict";var UJt=Wo().hovertemplateAttrs,ZA=no().extendFlat,Px=iC(),Ix=Lm();_Je.exports={r:Px.r,theta:Px.theta,r0:Px.r0,dr:Px.dr,theta0:Px.theta0,dtheta:Px.dtheta,thetaunit:Px.thetaunit,base:ZA({},Ix.base,{}),offset:ZA({},Ix.offset,{}),width:ZA({},Ix.width,{}),text:ZA({},Ix.text,{}),hovertext:ZA({},Ix.hovertext,{}),marker:VJt(),hoverinfo:Px.hoverinfo,hovertemplate:UJt(),selected:Ix.selected,unselected:Ix.unselected};function VJt(){var e=ZA({},Ix.marker);return delete e.cornerradius,e}});var O$=ye((lbr,xJe)=>{"use strict";xJe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var TJe=ye((ubr,wJe)=>{"use strict";var bJe=Mr(),HJt=v9().handleRThetaDefaults,GJt=zI(),jJt=q$();wJe.exports=function(t,r,n,i){function a(s,l){return bJe.coerce(t,r,jJt,s,l)}var o=HJt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),GJt(t,r,a,n,i),bJe.coerceSelectionMarkerOpacity(r,a)}});var SJe=ye((cbr,AJe)=>{"use strict";var WJt=Mr(),ZJt=O$();AJe.exports=function(e,t,r){var n={},i;function a(l,u){return WJt.coerce(e[i]||{},t[i],ZJt,l,u)}for(var o=0;o{"use strict";var MJe=Rv().hasColorscale,EJe=zv(),XJt=Mr().isArrayOrTypedArray,YJt=c4(),KJt=Gb().setGroupPositions,JJt=F0(),$Jt=ba().traceIs,QJt=Mr().extendFlat;function e$t(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 CJe=xa(),_9=uo(),XA=Mr(),r$t=ao(),N$=n9();LJe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=i$t(r),c=r.layers.frontplot.select("g.barlayer");XA.makeTraceGroups(c,n,"trace bars").each(function(){var f=CJe.select(this),h=XA.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(XA.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 x=CJe.select(this),b=v.rp0=s.c2p(v.s0),g=v.rp1=s.c2p(v.s1),E=v.thetag0=l.c2g(v.p0),k=v.thetag1=l.c2g(v.p1),S;if(!_9(b)||!_9(g)||!_9(E)||!_9(k)||b===g||E===k)S="M0,0Z";else{var L=s.c2g(v.s1),_=(E+k)/2;v.ct=[a.c2p(L*Math.cos(_)),o.c2p(L*Math.sin(_))],S=u(b,g,E,k)}XA.ensureSingle(x,"path").attr("d",S)}),r$t.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function i$t(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;XA.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=N$.findEnclosingVertexAngles(s,e.vangles)[0],c=N$.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return N$.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return XA.pathAnnulus(n,i,a,o,t,r)}}});var DJe=ye((dbr,IJe)=>{"use strict";var n$t=Nc(),U$=Mr(),a$t=TT().getTraceColor,o$t=U$.fillText,s$t=g9().makeHoverPointText,l$t=n9().isPtInsidePolygon;IJe.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?l$t:U$.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 x=function(k){return c(d,v,[k.rp0,k.rp1],[k.thetag0,k.thetag1],u)?f+Math.min(1,Math.abs(k.thetag1-k.thetag0)/h)-1+(k.rp1-d)/(k.rp1-k.rp0)-1:1/0};if(n$t.getClosest(i,x,t),t.index!==!1){var b=t.index,g=i[b];t.x0=t.x1=g.ct[0],t.y0=t.y1=g.ct[1];var E=U$.extendFlat({},g,{r:g.s,theta:g.p});return o$t(g,a,t),s$t(E,a,o,t),t.hovertemplate=a.hovertemplate,t.color=a$t(a,g),t.xLabelVal=t.yLabelVal=void 0,g.s<0&&(t.idealAlign="left"),[t]}}});var zJe=ye((vbr,RJe)=>{"use strict";RJe.exports={moduleType:"trace",name:"barpolar",basePlotModule:f9(),categories:["polar","bar","showLegend"],attributes:q$(),layoutAttributes:O$(),supplyDefaults:TJe(),supplyLayoutDefaults:SJe(),calc:B$().calc,crossTraceCalc:B$().crossTraceCalc,plot:PJe(),colorbar:Kd(),formatLabels:p9(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:DJe(),selectPoints:AT(),meta:{}}});var qJe=ye((pbr,FJe)=>{"use strict";FJe.exports=zJe()});var V$=ye((gbr,OJe)=>{"use strict";OJe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var H$=ye((mbr,VJe)=>{"use strict";var u$t=dh(),Mf=Cd(),c$t=Ju().attributes,Dx=Mr().extendFlat,BJe=Bu().overrideAll,NJe=BJe({color:Mf.color,showline:Dx({},Mf.showline,{dflt:!0}),linecolor:Mf.linecolor,linewidth:Mf.linewidth,showgrid:Dx({},Mf.showgrid,{dflt:!0}),gridcolor:Mf.gridcolor,gridwidth:Mf.gridwidth,griddash:Mf.griddash},"plot","from-root"),UJe=BJe({ticklen:Mf.ticklen,tickwidth:Dx({},Mf.tickwidth,{dflt:2}),tickcolor:Mf.tickcolor,showticklabels:Mf.showticklabels,labelalias:Mf.labelalias,showtickprefix:Mf.showtickprefix,tickprefix:Mf.tickprefix,showticksuffix:Mf.showticksuffix,ticksuffix:Mf.ticksuffix,tickfont:Mf.tickfont,tickformat:Mf.tickformat,hoverformat:Mf.hoverformat,layer:Mf.layer},"plot","from-root"),f$t=Dx({visible:Dx({},Mf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Dx({},Mf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},NJe,UJe),h$t=Dx({visible:Dx({},Mf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Mf.ticks,editType:"calc"},NJe,UJe);VJe.exports={domain:c$t({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:u$t.background},realaxis:f$t,imaginaryaxis:h$t,editType:"calc"}});var jJe=ye((ybr,GJe)=>{"use strict";var YA=Mr(),d$t=va(),v$t=Vs(),p$t=k_(),g$t=kd().getSubplotData,m$t=t_(),y$t=e_(),_$t=YM(),x$t=ym(),KA=H$(),G$=V$(),HJe=G$.axisNames,b$t=T$t(function(e){return YA.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function w$t(e,t,r,n){var i=r("bgcolor");n.bgColor=d$t.combine(i,n.paper_bgcolor);var a=g$t(n.fullData,G$.name,n.id),o=n.layoutOut,s;function l(L,_){return r(s+"."+L,_)}for(var u=0;u{"use strict";var A$t=kd().getSubplotCalcData,S$t=Mr().counterRegex,M$t=I$(),ZJe=V$(),XJe=ZJe.attr,yw=ZJe.name,WJe=S$t(yw),YJe={};YJe[XJe]={valType:"subplotid",dflt:yw,editType:"calc"};function E$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[yw],i=0;i{"use strict";var C$t=Wo().hovertemplateAttrs,L$t=Wo().texttemplateAttrs,x9=no().extendFlat,P$t=Eg(),d0=Uc(),I$t=vl(),JA=d0.line;$Je.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:L$t({editType:"plot"},{keys:["real","imag","text"]}),hovertext:d0.hovertext,line:{color:JA.color,width:JA.width,dash:JA.dash,backoff:JA.backoff,shape:x9({},JA.shape,{values:["linear","spline"]}),smoothing:JA.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:x9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:x9({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:P$t(),hoverinfo:x9({},I$t.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:C$t(),selected:d0.selected,unselected:d0.unselected}});var t$e=ye((bbr,e$e)=>{"use strict";var b9=Mr(),$A=lu(),D$t=$p(),R$t=D0(),QJe=J3(),z$t=R0(),F$t=Ig(),q$t=Sm().PTS_LINESONLY,O$t=j$();e$e.exports=function(t,r,n,i){function a(l,u){return b9.coerce(t,r,O$t,l,u)}var o=B$t(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var r$e=Qa();i$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=r$e.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=r$e.tickText(a.angularAxis,t.imag,!0).text,i}});var s$e=ye((Tbr,o$e)=>{"use strict";var a$e=uo(),N$t=es().BADNUM,U$t=z0(),V$t=km(),H$t=F0(),G$t=q0().calcMarkerSize;o$e.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 j$t=iT(),l$e=es().BADNUM,W$t=C$(),Z$t=W$t.smith;u$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=0;l{"use strict";var X$t=sT();function Y$t(e,t,r,n){var i=X$t(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,f$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function f$e(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("
")}}h$e.exports={hoverPoints:Y$t,makeHoverPointText:f$e}});var p$e=ye((Mbr,v$e)=>{"use strict";v$e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:JJe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:j$(),supplyDefaults:t$e(),colorbar:Kd(),formatLabels:n$e(),calc:s$e(),plot:c$e(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:d$e().hoverPoints,selectPoints:lT(),meta:{}}});var m$e=ye((Ebr,g$e)=>{"use strict";g$e.exports=p$e()});var Sv=ye((kbr,_$e)=>{var T9=bh();function y$e(){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={}}T9(y$e.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 W$(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(Es.local.invalidDate||Es.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function w9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}T9(W$.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(Es.local.invalidDate||Es.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(Es.local.differentCalendars||Es.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?"-":"")+w9(Math.abs(this.year()),4)+"-"+w9(this.month(),2)+"-"+w9(this.day(),2)}});function Z$(){this.shortYearCutoff="+10"}T9(Z$.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Es.local.invalidDate||Es.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new W$(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Es.local.invalidYear||Es.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,Es.local.invalidYear||Es.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+w9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Es.local.invalidYear||Es.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Es.local.invalidMonth||Es.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,Es.local.invalidMonth||Es.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Es.local.invalidYear||Es.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Es.local.invalidDate||Es.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,Es.local.invalidDate||Es.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Es.local.invalidDate||Es.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Es.local.invalidDate||Es.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,Es.local.invalidDate||Es.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,Es.local.invalidDate||Es.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 Es=_$e.exports=new y$e;Es.cdate=W$;Es.baseCalendar=Z$;Es.calendars.gregorian=X$});var x$e=ye(()=>{var Y$=bh(),qd=Sv();Y$(qd.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"});qd.local=qd.regionalOptions[""];Y$(qd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});Y$(qd.baseCalendar.prototype,{UNIX_EPOCH:qd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:qd.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 qd.local.invalidFormat||qd.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 _=1;k+_1},c=function(S,L,_,C){var M=""+L;if(u(S,C))for(;M.length<_;)M="0"+M;return M},f=function(S,L,_,C){return u(S)?C[L]:_[L]},h=this,d=function(S){return typeof a=="function"?a.call(h,S,u("m")):b(c("m",S.month(),2))},v=function(S,L){return L?typeof s=="function"?s.call(h,S):s[S.month()-h.minMonth]:typeof o=="function"?o.call(h,S):o[S.month()-h.minMonth]},x=this.local.digits,b=function(S){return r.localNumbers&&x?x(S):S},g="",E=!1,k=0;k1},E=function(F,q){var V=g(F,q),H=[2,3,V?4:2,V?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],X=new RegExp("^-?\\d{1,"+H+"}"),G=t.substring(M).match(X);if(!G)throw(qd.local.missingNumberAt||qd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=G[0].length,parseInt(G[0],10)},k=this,S=function(){if(typeof s=="function"){g("m");var F=s.call(k,t.substring(M));return M+=F.length,F}return E("m")},L=function(F,q,V,H){for(var X=g(F,H)?V:q,G=0;G-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 b$e=ye(()=>{var Rx=Sv(),K$t=bh(),K$=Rx.instance();function A9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}A9.prototype=new Rx.baseCalendar;K$t(A9.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($$t);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(Q$t);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(eQt);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 Rx.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 Rx.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,Rx.local.invalidyear),i=Fx[n-Fx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=K$.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 Rx.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,Rx.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=rQt(e,a,r,i);return K$.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=K$.fromJD(e),r=tQt(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(J$t),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(A9.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 J$t=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,$$t=/^\d?\d[iI]?/m,Q$t=/^闰?十?[一二三四五六七八九]?月/m,eQt=/^闰?十?[一二三四五六七八九]?/m;Rx.calendars.chinese=A9;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],Fx=[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 tQt(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=Fx[i.year-Fx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Fx[a.year-Fx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,x=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-x)/(24*3600*1e3));var g=zx[a.year-zx[0]],E;for(E=0;E<13;E++){var k=g&1<<12-E?30:29;if(v>13;return!S||E=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=zx[o.year-zx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var x=0;x>9&4095,k=g>>5&15,S=g&31,L=new Date(E,k-1,S+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var w$e=ye(()=>{var _w=Sv(),iQt=bh();function J$(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}J$.prototype=new _w.baseCalendar;iQt(J$.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,_w.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,_w.local.invalidYear||_w.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,_w.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,_w.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)}});_w.calendars.coptic=J$});var T$e=ye(()=>{var b1=Sv(),nQt=bh();function $$(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}$$.prototype=new b1.baseCalendar;nQt($$.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,b1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.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,b1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,b1.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,b1.local.invalidDate);return{century:aQt[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,b1.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 aQt={20:"Fruitbat",21:"Anchovy"};b1.calendars.discworld=$$});var A$e=ye(()=>{var xw=Sv(),oQt=bh();function Q$(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Q$.prototype=new xw.baseCalendar;oQt(Q$.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,xw.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,xw.local.invalidYear||xw.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,xw.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,xw.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)}});xw.calendars.ethiopian=Q$});var S$e=ye(()=>{var qx=Sv(),sQt=bh();function eQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eQ.prototype=new qx.baseCalendar;sQt(eQ.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,S9(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&&S9(this.daysInYear(e),10)===5?30:t===9&&S9(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 S9(e,t){return e-t*Math.floor(e/t)}qx.calendars.hebrew=eQ});var M$e=ye(()=>{var nC=Sv(),lQt=bh();function tQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tQ.prototype=new nC.baseCalendar;lQt(tQ.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,nC.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,nC.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,nC.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)}});nC.calendars.islamic=tQ});var E$e=ye(()=>{var aC=Sv(),uQt=bh();function rQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rQ.prototype=new aC.baseCalendar;uQt(rQ.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,aC.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,aC.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,aC.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)}});aC.calendars.julian=rQ});var C$e=ye(()=>{var ug=Sv(),cQt=bh();function nQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}nQ.prototype=new ug.baseCalendar;cQt(nQ.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=iQ(e+8+17*20,365);return[Math.floor(t/20)+1,iQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[k$e(e+20,20),k$e(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 iQ(e,t){return e-t*Math.floor(e/t)}function k$e(e,t){return iQ(e-1,t)+1}ug.calendars.mayan=nQ});var P$e=ye(()=>{var bw=Sv(),fQt=bh();function aQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aQ.prototype=new bw.baseCalendar;var L$e=bw.instance("gregorian");fQt(aQ.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,bw.local.invalidYear||bw.regionalOptions[""].invalidYear);return L$e.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,bw.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,bw.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)}});bw.calendars.nanakshahi=aQ});var I$e=ye(()=>{var ww=Sv(),hQt=bh();function oQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oQ.prototype=new ww.baseCalendar;hQt(oQ.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,ww.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,ww.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,ww.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=ww.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=ww.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 QA=Sv(),dQt=bh();function M9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M9.prototype=new QA.baseCalendar;dQt(M9.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,QA.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},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,QA.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,QA.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e-(e>=0?474:473),a=474+sQ(i,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(i/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),n=sQ(t,1029983),i=2820;if(n!==1029982){var a=Math.floor(n/366),o=sQ(n,366);i=Math.floor((2134*a+2816*o+2815)/1028522)+a+1}var s=i+2820*r+474;s=s<=0?s-1:s;var l=e-this.toJD(s,1,1)+1,u=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),c=e-this.toJD(s,u,1)+1;return this.newDate(s,u,c)}});function sQ(e,t){return e-t*Math.floor(e/t)}QA.calendars.persian=M9;QA.calendars.jalali=M9});var R$e=ye(()=>{var Tw=Sv(),vQt=bh(),E9=Tw.instance();function lQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}lQ.prototype=new Tw.baseCalendar;vQt(lQ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Tw.local.invalidYear),r=this._t2gYear(t.year());return E9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Tw.local.invalidYear),i=this._t2gYear(n.year());return E9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.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,Tw.local.invalidDate),i=this._t2gYear(n.year());return E9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=E9.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)}});Tw.calendars.taiwan=lQ});var z$e=ye(()=>{var Aw=Sv(),pQt=bh(),k9=Aw.instance();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new Aw.baseCalendar;pQt(uQ.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,Aw.local.invalidYear),r=this._t2gYear(t.year());return k9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Aw.local.invalidYear),i=this._t2gYear(n.year());return k9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Aw.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,Aw.local.invalidDate),i=this._t2gYear(n.year());return k9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=k9.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)}});Aw.calendars.thai=uQ});var F$e=ye(()=>{var Sw=Sv(),gQt=bh();function cQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}cQ.prototype=new Sw.baseCalendar;gQt(cQ.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,Sw.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,Sw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;an)return Ox[i]-Ox[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,Sw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Ox[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-Ox[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=Sw.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=Sw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Sw.calendars.ummalqura=cQ;var Ox=[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 O$e=ye((a2r,q$e)=>{"use strict";q$e.exports=Sv();x$e();b$e();w$e();T$e();A$e();S$e();M$e();E$e();C$e();P$e();I$e();D$e();R$e();z$e();F$e()});var j$e=ye((o2r,G$e)=>{"use strict";var N$e=O$e(),oC=Mr(),U$e=es(),mQt=U$e.EPOCHJD,yQt=U$e.ONEDAY,dQ={valType:"enumerated",values:oC.sortObjectKeys(N$e.calendars),editType:"calc",dflt:"gregorian"},V$e=function(e,t,r,n){var i={};return i[r]=dQ,oC.coerce(e,t,i,r,n)},_Qt=function(e,t,r,n){for(var i=0;i{"use strict";W$e.exports=j$e()});var SQt=ye((l2r,Y$e)=>{var X$e=Vme();X$e.register([Gye(),P1e(),H_e(),uxe(),wxe(),ybe(),Pbe(),m2e(),W2e(),Ewe(),d3e(),U4e(),CEe(),_Ce(),o6e(),F6e(),aLe(),DPe(),$Pe(),gIe(),kIe(),VIe(),i8e(),_8e(),WDe(),hRe(),EOe(),EBe(),LNe(),tUe(),cVe(),SVe(),YVe(),oGe(),bGe(),jGe(),Qje(),TWe(),nZe(),MXe(),YXe(),gYe(),VYe(),rKe(),eJe(),yJe(),qJe(),m$e(),Z$e()]);Y$e.exports=X$e});return SQt();})(); +`),He=je.createShader(je.FRAGMENT_SHADER);if(je.isContextLost())return void(this.failedToCreate=!0);if(je.shaderSource(He,Oe),je.compileShader(He),!je.getShaderParameter(He,je.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${je.getShaderInfoLog(He)}`);je.attachShader(this.program,He);let et=je.createShader(je.VERTEX_SHADER);if(je.isContextLost())return void(this.failedToCreate=!0);if(je.shaderSource(et,Je),je.compileShader(et),!je.getShaderParameter(et,je.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${je.getShaderInfoLog(et)}`);je.attachShader(this.program,et),this.attributes={};let Mt={};this.numAttributes=Ot.length;for(let Rt=0;Rt({u_depth:new a.aH(Rt,Ut.u_depth),u_terrain:new a.aH(Rt,Ut.u_terrain),u_terrain_dim:new a.aI(Rt,Ut.u_terrain_dim),u_terrain_matrix:new a.aJ(Rt,Ut.u_terrain_matrix),u_terrain_unpack:new a.aK(Rt,Ut.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Rt,Ut.u_terrain_exaggeration)}))(w,Mt),this.binderUniforms=Q?Q.getUniforms(w,Mt):[]}draw(w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he,be,Pe,Oe,Je){let He=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(se),w.setCullFace(qe),it){w.activeTexture.set(He.TEXTURE2),He.bindTexture(He.TEXTURE_2D,it.depthTexture),w.activeTexture.set(He.TEXTURE3),He.bindTexture(He.TEXTURE_2D,it.texture);for(let Mt in this.terrainUniforms)this.terrainUniforms[Mt].set(it[Mt])}for(let Mt in this.fixedUniforms)this.fixedUniforms[Mt].set(je[Mt]);be&&be.setUniforms(w,this.binderUniforms,Sr,{zoom:he});let et=0;switch(B){case He.LINES:et=2;break;case He.TRIANGLES:et=3;break;case He.LINE_STRIP:et=1}for(let Mt of hr.get()){let Rt=Mt.vaos||(Mt.vaos={});(Rt[yt]||(Rt[yt]=new br)).bind(w,this,Ot,be?be.getPaintVertexBuffers():[],Nt,Mt.vertexOffset,Pe,Oe,Je),He.drawElements(B,Mt.primitiveLength*et,He.UNSIGNED_SHORT,Mt.primitiveOffset*et*2)}}}function Yi(le,w,B){let Q=1/nn(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),se=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,qe=se*(B.tileID.canonical.x+B.tileID.wrap*ee),je=se*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,le.fromScale,le.toScale],u_fade:le.t,u_pixel_coord_upper:[qe>>16,je>>16],u_pixel_coord_lower:[65535&qe,65535&je]}}let an=(le,w,B,Q)=>{let ee=w.style.light,se=ee.properties.get("position"),qe=[se.x,se.y,se.z],je=function(){var yt=new a.A(9);return a.A!=Float32Array&&(yt[1]=0,yt[2]=0,yt[3]=0,yt[5]=0,yt[6]=0,yt[7]=0),yt[0]=1,yt[4]=1,yt[8]=1,yt}();ee.properties.get("anchor")==="viewport"&&function(yt,Ot){var Nt=Math.sin(Ot),hr=Math.cos(Ot);yt[0]=hr,yt[1]=Nt,yt[2]=0,yt[3]=-Nt,yt[4]=hr,yt[5]=0,yt[6]=0,yt[7]=0,yt[8]=1}(je,-w.transform.angle),function(yt,Ot,Nt){var hr=Ot[0],Sr=Ot[1],he=Ot[2];yt[0]=hr*Nt[0]+Sr*Nt[3]+he*Nt[6],yt[1]=hr*Nt[1]+Sr*Nt[4]+he*Nt[7],yt[2]=hr*Nt[2]+Sr*Nt[5]+he*Nt[8]}(qe,qe,je);let it=ee.properties.get("color");return{u_matrix:le,u_lightpos:qe,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[it.r,it.g,it.b],u_vertical_gradient:+B,u_opacity:Q}},hi=(le,w,B,Q,ee,se,qe)=>a.e(an(le,w,B,Q),Yi(se,w,qe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/qe.tileSize/8}),Ji=le=>({u_matrix:le}),ua=(le,w,B,Q)=>a.e(Ji(le),Yi(B,w,Q)),Fn=(le,w)=>({u_matrix:le,u_world:w}),Sa=(le,w,B,Q,ee)=>a.e(ua(le,w,B,Q),{u_world:ee}),go=(le,w,B,Q)=>{let ee=le.transform,se,qe;if(Q.paint.get("circle-pitch-alignment")==="map"){let je=nn(B,1,ee.zoom);se=!0,qe=[je,je]}else se=!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:le.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+se,u_device_pixel_ratio:le.pixelRatio,u_extrude_scale:qe}},Oo=(le,w,B)=>({u_matrix:le,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),ho=(le,w,B=1)=>({u_matrix:le,u_color:w,u_overlay:0,u_overlay_scale:B}),Mo=le=>({u_matrix:le}),xo=(le,w,B,Q)=>({u_matrix:le,u_extrude_scale:nn(w,1,B),u_intensity:Q}),zs=(le,w,B,Q)=>{let ee=a.H();a.aP(ee,0,le.width,le.height,0,0,1);let se=le.context.gl;return{u_matrix:ee,u_world:[se.drawingBufferWidth,se.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function ks(le,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 Zs=(le,w,B,Q)=>{let ee=le.transform;return{u_matrix:Cs(le,w,B,Q),u_ratio:1/nn(w,1,ee.zoom),u_device_pixel_ratio:le.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},Xs=(le,w,B,Q,ee)=>a.e(Zs(le,w,B,ee),{u_image:0,u_image_height:Q}),wl=(le,w,B,Q,ee)=>{let se=le.transform,qe=cl(w,se);return{u_matrix:Cs(le,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/nn(w,1,se.zoom),u_device_pixel_ratio:le.pixelRatio,u_image:0,u_scale:[qe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/se.pixelsToGLUnits[0],1/se.pixelsToGLUnits[1]]}},os=(le,w,B,Q,ee,se)=>{let qe=le.lineAtlas,je=cl(w,le.transform),it=B.layout.get("line-cap")==="round",yt=qe.getDash(Q.from,it),Ot=qe.getDash(Q.to,it),Nt=yt.width*ee.fromScale,hr=Ot.width*ee.toScale;return a.e(Zs(le,w,B,se),{u_patternscale_a:[je/Nt,-yt.height/2],u_patternscale_b:[je/hr,-Ot.height/2],u_sdfgamma:qe.width/(256*Math.min(Nt,hr)*le.pixelRatio)/2,u_image:0,u_tex_y_a:yt.y,u_tex_y_b:Ot.y,u_mix:ee.t})};function cl(le,w){return 1/nn(le,1,w.tileZoom)}function Cs(le,w,B,Q){return le.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let ml=(le,w,B,Q,ee)=>{return{u_matrix:le,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:(se=ee.paint.get("raster-contrast"),se>0?1/(1-se):1+se),u_spin_weights:Ys(ee.paint.get("raster-hue-rotate"))};var se,qe};function Ys(le){le*=Math.PI/180;let w=Math.sin(le),B=Math.cos(le);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let Hs=(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr)=>{let he=qe.transform;return{u_is_size_zoom_constant:+(le==="constant"||le==="source"),u_is_size_feature_constant:+(le==="constant"||le==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:he.cameraToCenterDistance,u_pitch:he.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:he.width/he.height,u_fade_change:qe.options.fadeDuration?qe.symbolFadeChange:1,u_matrix:je,u_label_plane_matrix:it,u_coord_matrix:yt,u_is_text:+Nt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:se,u_texsize:hr,u_texture:0,u_translation:Ot,u_pitched_scale:Sr}},Eo=(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr,he)=>{let be=qe.transform;return a.e(Hs(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,he),{u_gamma_scale:Q?Math.cos(be._pitch)*be.cameraToCenterDistance:1,u_device_pixel_ratio:qe.pixelRatio,u_is_halo:+Sr})},fs=(le,w,B,Q,ee,se,qe,je,it,yt,Ot,Nt,hr,Sr)=>a.e(Eo(le,w,B,Q,ee,se,qe,je,it,yt,Ot,!0,Nt,!0,Sr),{u_texsize_icon:hr,u_texture_icon:1}),$l=(le,w,B)=>({u_matrix:le,u_opacity:w,u_color:B}),Gu=(le,w,B,Q,ee,se)=>a.e(function(qe,je,it,yt){let Ot=it.imageManager.getPattern(qe.from.toString()),Nt=it.imageManager.getPattern(qe.to.toString()),{width:hr,height:Sr}=it.imageManager.getPixelSize(),he=Math.pow(2,yt.tileID.overscaledZ),be=yt.tileSize*Math.pow(2,it.transform.tileZoom)/he,Pe=be*(yt.tileID.canonical.x+yt.tileID.wrap*he),Oe=be*yt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ot.tl,u_pattern_br_a:Ot.br,u_pattern_tl_b:Nt.tl,u_pattern_br_b:Nt.br,u_texsize:[hr,Sr],u_mix:je.t,u_pattern_size_a:Ot.displaySize,u_pattern_size_b:Nt.displaySize,u_scale_a:je.fromScale,u_scale_b:je.toScale,u_tile_units_to_pixels:1/nn(yt,1,it.transform.tileZoom),u_pixel_coord_upper:[Pe>>16,Oe>>16],u_pixel_coord_lower:[65535&Pe,65535&Oe]}}(Q,se,B,ee),{u_matrix:le,u_opacity:w}),fc={fillExtrusion:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_lightpos:new a.aN(le,w.u_lightpos),u_lightintensity:new a.aI(le,w.u_lightintensity),u_lightcolor:new a.aN(le,w.u_lightcolor),u_vertical_gradient:new a.aI(le,w.u_vertical_gradient),u_opacity:new a.aI(le,w.u_opacity)}),fillExtrusionPattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_lightpos:new a.aN(le,w.u_lightpos),u_lightintensity:new a.aI(le,w.u_lightintensity),u_lightcolor:new a.aN(le,w.u_lightcolor),u_vertical_gradient:new a.aI(le,w.u_vertical_gradient),u_height_factor:new a.aI(le,w.u_height_factor),u_image:new a.aH(le,w.u_image),u_texsize:new a.aO(le,w.u_texsize),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade),u_opacity:new a.aI(le,w.u_opacity)}),fill:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix)}),fillPattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_image:new a.aH(le,w.u_image),u_texsize:new a.aO(le,w.u_texsize),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade)}),fillOutline:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_world:new a.aO(le,w.u_world)}),fillOutlinePattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_world:new a.aO(le,w.u_world),u_image:new a.aH(le,w.u_image),u_texsize:new a.aO(le,w.u_texsize),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade)}),circle:(le,w)=>({u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(le,w.u_scale_with_map),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_extrude_scale:new a.aO(le,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_matrix:new a.aJ(le,w.u_matrix)}),collisionBox:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_pixel_extrude_scale:new a.aO(le,w.u_pixel_extrude_scale)}),collisionCircle:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_inv_matrix:new a.aJ(le,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_viewport_size:new a.aO(le,w.u_viewport_size)}),debug:(le,w)=>({u_color:new a.aL(le,w.u_color),u_matrix:new a.aJ(le,w.u_matrix),u_overlay:new a.aH(le,w.u_overlay),u_overlay_scale:new a.aI(le,w.u_overlay_scale)}),clippingMask:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix)}),heatmap:(le,w)=>({u_extrude_scale:new a.aI(le,w.u_extrude_scale),u_intensity:new a.aI(le,w.u_intensity),u_matrix:new a.aJ(le,w.u_matrix)}),heatmapTexture:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_world:new a.aO(le,w.u_world),u_image:new a.aH(le,w.u_image),u_color_ramp:new a.aH(le,w.u_color_ramp),u_opacity:new a.aI(le,w.u_opacity)}),hillshade:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_image:new a.aH(le,w.u_image),u_latrange:new a.aO(le,w.u_latrange),u_light:new a.aO(le,w.u_light),u_shadow:new a.aL(le,w.u_shadow),u_highlight:new a.aL(le,w.u_highlight),u_accent:new a.aL(le,w.u_accent)}),hillshadePrepare:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_image:new a.aH(le,w.u_image),u_dimension:new a.aO(le,w.u_dimension),u_zoom:new a.aI(le,w.u_zoom),u_unpack:new a.aK(le,w.u_unpack)}),line:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels)}),lineGradient:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels),u_image:new a.aH(le,w.u_image),u_image_height:new a.aI(le,w.u_image_height)}),linePattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_texsize:new a.aO(le,w.u_texsize),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_image:new a.aH(le,w.u_image),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels),u_scale:new a.aN(le,w.u_scale),u_fade:new a.aI(le,w.u_fade)}),lineSDF:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ratio:new a.aI(le,w.u_ratio),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(le,w.u_units_to_pixels),u_patternscale_a:new a.aO(le,w.u_patternscale_a),u_patternscale_b:new a.aO(le,w.u_patternscale_b),u_sdfgamma:new a.aI(le,w.u_sdfgamma),u_image:new a.aH(le,w.u_image),u_tex_y_a:new a.aI(le,w.u_tex_y_a),u_tex_y_b:new a.aI(le,w.u_tex_y_b),u_mix:new a.aI(le,w.u_mix)}),raster:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_tl_parent:new a.aO(le,w.u_tl_parent),u_scale_parent:new a.aI(le,w.u_scale_parent),u_buffer_scale:new a.aI(le,w.u_buffer_scale),u_fade_t:new a.aI(le,w.u_fade_t),u_opacity:new a.aI(le,w.u_opacity),u_image0:new a.aH(le,w.u_image0),u_image1:new a.aH(le,w.u_image1),u_brightness_low:new a.aI(le,w.u_brightness_low),u_brightness_high:new a.aI(le,w.u_brightness_high),u_saturation_factor:new a.aI(le,w.u_saturation_factor),u_contrast_factor:new a.aI(le,w.u_contrast_factor),u_spin_weights:new a.aN(le,w.u_spin_weights)}),symbolIcon:(le,w)=>({u_is_size_zoom_constant:new a.aH(le,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(le,w.u_is_size_feature_constant),u_size_t:new a.aI(le,w.u_size_t),u_size:new a.aI(le,w.u_size),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_pitch:new a.aI(le,w.u_pitch),u_rotate_symbol:new a.aH(le,w.u_rotate_symbol),u_aspect_ratio:new a.aI(le,w.u_aspect_ratio),u_fade_change:new a.aI(le,w.u_fade_change),u_matrix:new a.aJ(le,w.u_matrix),u_label_plane_matrix:new a.aJ(le,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(le,w.u_coord_matrix),u_is_text:new a.aH(le,w.u_is_text),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_is_along_line:new a.aH(le,w.u_is_along_line),u_is_variable_anchor:new a.aH(le,w.u_is_variable_anchor),u_texsize:new a.aO(le,w.u_texsize),u_texture:new a.aH(le,w.u_texture),u_translation:new a.aO(le,w.u_translation),u_pitched_scale:new a.aI(le,w.u_pitched_scale)}),symbolSDF:(le,w)=>({u_is_size_zoom_constant:new a.aH(le,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(le,w.u_is_size_feature_constant),u_size_t:new a.aI(le,w.u_size_t),u_size:new a.aI(le,w.u_size),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_pitch:new a.aI(le,w.u_pitch),u_rotate_symbol:new a.aH(le,w.u_rotate_symbol),u_aspect_ratio:new a.aI(le,w.u_aspect_ratio),u_fade_change:new a.aI(le,w.u_fade_change),u_matrix:new a.aJ(le,w.u_matrix),u_label_plane_matrix:new a.aJ(le,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(le,w.u_coord_matrix),u_is_text:new a.aH(le,w.u_is_text),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_is_along_line:new a.aH(le,w.u_is_along_line),u_is_variable_anchor:new a.aH(le,w.u_is_variable_anchor),u_texsize:new a.aO(le,w.u_texsize),u_texture:new a.aH(le,w.u_texture),u_gamma_scale:new a.aI(le,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_is_halo:new a.aH(le,w.u_is_halo),u_translation:new a.aO(le,w.u_translation),u_pitched_scale:new a.aI(le,w.u_pitched_scale)}),symbolTextAndIcon:(le,w)=>({u_is_size_zoom_constant:new a.aH(le,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(le,w.u_is_size_feature_constant),u_size_t:new a.aI(le,w.u_size_t),u_size:new a.aI(le,w.u_size),u_camera_to_center_distance:new a.aI(le,w.u_camera_to_center_distance),u_pitch:new a.aI(le,w.u_pitch),u_rotate_symbol:new a.aH(le,w.u_rotate_symbol),u_aspect_ratio:new a.aI(le,w.u_aspect_ratio),u_fade_change:new a.aI(le,w.u_fade_change),u_matrix:new a.aJ(le,w.u_matrix),u_label_plane_matrix:new a.aJ(le,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(le,w.u_coord_matrix),u_is_text:new a.aH(le,w.u_is_text),u_pitch_with_map:new a.aH(le,w.u_pitch_with_map),u_is_along_line:new a.aH(le,w.u_is_along_line),u_is_variable_anchor:new a.aH(le,w.u_is_variable_anchor),u_texsize:new a.aO(le,w.u_texsize),u_texsize_icon:new a.aO(le,w.u_texsize_icon),u_texture:new a.aH(le,w.u_texture),u_texture_icon:new a.aH(le,w.u_texture_icon),u_gamma_scale:new a.aI(le,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(le,w.u_device_pixel_ratio),u_is_halo:new a.aH(le,w.u_is_halo),u_translation:new a.aO(le,w.u_translation),u_pitched_scale:new a.aI(le,w.u_pitched_scale)}),background:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_opacity:new a.aI(le,w.u_opacity),u_color:new a.aL(le,w.u_color)}),backgroundPattern:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_opacity:new a.aI(le,w.u_opacity),u_image:new a.aH(le,w.u_image),u_pattern_tl_a:new a.aO(le,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(le,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(le,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(le,w.u_pattern_br_b),u_texsize:new a.aO(le,w.u_texsize),u_mix:new a.aI(le,w.u_mix),u_pattern_size_a:new a.aO(le,w.u_pattern_size_a),u_pattern_size_b:new a.aO(le,w.u_pattern_size_b),u_scale_a:new a.aI(le,w.u_scale_a),u_scale_b:new a.aI(le,w.u_scale_b),u_pixel_coord_upper:new a.aO(le,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(le,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(le,w.u_tile_units_to_pixels)}),terrain:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_texture:new a.aH(le,w.u_texture),u_ele_delta:new a.aI(le,w.u_ele_delta),u_fog_matrix:new a.aJ(le,w.u_fog_matrix),u_fog_color:new a.aL(le,w.u_fog_color),u_fog_ground_blend:new a.aI(le,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(le,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(le,w.u_horizon_color),u_horizon_fog_blend:new a.aI(le,w.u_horizon_fog_blend)}),terrainDepth:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_ele_delta:new a.aI(le,w.u_ele_delta)}),terrainCoords:(le,w)=>({u_matrix:new a.aJ(le,w.u_matrix),u_texture:new a.aH(le,w.u_texture),u_terrain_coords_id:new a.aI(le,w.u_terrain_coords_id),u_ele_delta:new a.aI(le,w.u_ele_delta)}),sky:(le,w)=>({u_sky_color:new a.aL(le,w.u_sky_color),u_horizon_color:new a.aL(le,w.u_horizon_color),u_horizon:new a.aI(le,w.u_horizon),u_sky_horizon_blend:new a.aI(le,w.u_sky_horizon_blend)})};class ms{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 on={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class fa{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let se=w.gl;this.buffer=se.createBuffer(),w.bindVertexBuffer.set(this.buffer),se.bufferData(se.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?se.DYNAMIC_DRAW:se.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 Rt=a.H();a.aQ(Rt,He.placementInvProjMatrix,le.transform.glCoordMatrix),a.aQ(Rt,Rt,He.placementViewportMatrix),it.push({circleArray:Mt,circleOffset:Ot,transform:Je.posMatrix,invTransform:Rt,coord:Je}),yt+=Mt.length/4,Ot=yt}et&&je.draw(se,qe.LINES,wo.disabled,$o.disabled,le.colorModeForRenderPass(),Ja.disabled,{u_matrix:Je.posMatrix,u_pixel_extrude_scale:[1/(Nt=le.transform).width,1/Nt.height]},le.style.map.terrain&&le.style.map.terrain.getTerrainData(Je),B.id,et.layoutVertexBuffer,et.indexBuffer,et.segments,null,le.transform.zoom,null,null,et.collisionVertexBuffer)}var Nt;if(!ee||!it.length)return;let hr=le.useProgram("collisionCircle"),Sr=new a.aR;Sr.resize(4*yt),Sr._trim();let he=0;for(let Oe of it)for(let Je=0;Je=0&&(Oe[He.associatedIconIndex]={shiftedAnchor:Mn,angle:pa})}else ai(He.numGlyphs,be)}if(yt){Pe.clear();let Je=le.icon.placedSymbolArray;for(let He=0;Hele.style.map.terrain.getElevation(zr,tt,zt):null,wt=B.layout.get("text-rotation-alignment")==="map";Ve(di,zr.posMatrix,le,ee,Vl,cu,Oe,yt,wt,be,zr.toUnwrapped(),he.width,he.height,el,We)}let Rl=zr.posMatrix,zl=ee&&tr||zc,Z=Je||zl?uu:Vl,oe=Xu,we=Qi&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Be;Be=Qi?di.iconsInText?fs(Mn.kind,Ga,He,Oe,Je,zl,le,Rl,Z,oe,el,Wa,As,Dr):Eo(Mn.kind,Ga,He,Oe,Je,zl,le,Rl,Z,oe,el,ee,Wa,!0,Dr):Hs(Mn.kind,Ga,He,Oe,Je,zl,le,Rl,Z,oe,el,ee,Wa,Dr);let Ue={program:ea,buffers:Li,uniformValues:Be,atlasTexture:co,atlasTextureIcon:yo,atlasInterpolation:Do,atlasInterpolationIcon:Rs,isSDF:Qi,hasHalo:we};if(Mt&&di.canOverlap){Rt=!0;let We=Li.segments.get();for(let wt of We)mr.push({segments:new a.a0([wt]),sortKey:wt.sortKey,state:Ue,terrainData:To})}else mr.push({segments:Li.segments,sortKey:0,state:Ue,terrainData:To})}Rt&&mr.sort((zr,Xr)=>zr.sortKey-Xr.sortKey);for(let zr of mr){let Xr=zr.state;if(hr.activeTexture.set(Sr.TEXTURE0),Xr.atlasTexture.bind(Xr.atlasInterpolation,Sr.CLAMP_TO_EDGE),Xr.atlasTextureIcon&&(hr.activeTexture.set(Sr.TEXTURE1),Xr.atlasTextureIcon&&Xr.atlasTextureIcon.bind(Xr.atlasInterpolationIcon,Sr.CLAMP_TO_EDGE)),Xr.isSDF){let di=Xr.uniformValues;Xr.hasHalo&&(di.u_is_halo=1,Eh(Xr.buffers,zr.segments,B,le,Xr.program,Ut,Ot,Nt,di,zr.terrainData)),di.u_is_halo=0}Eh(Xr.buffers,zr.segments,B,le,Xr.program,Ut,Ot,Nt,Xr.uniformValues,zr.terrainData)}}function Eh(le,w,B,Q,ee,se,qe,je,it,yt){let Ot=Q.context;ee.draw(Ot,Ot.gl.TRIANGLES,se,qe,je,Ja.disabled,it,yt,B.id,le.layoutVertexBuffer,le.indexBuffer,w,B.paint,Q.transform.zoom,le.programConfigurations.get(B.id),le.dynamicLayoutVertexBuffer,le.opacityVertexBuffer)}function nh(le,w,B,Q){let ee=le.context,se=ee.gl,qe=$o.disabled,je=new Ps([se.ONE,se.ONE],a.aM.transparent,[!0,!0,!0,!0]),it=w.getBucket(B);if(!it)return;let yt=Q.key,Ot=B.heatmapFbos.get(yt);Ot||(Ot=kh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(yt,Ot)),ee.bindFramebuffer.set(Ot.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Nt=it.programConfigurations.get(B.id),hr=le.useProgram("heatmap",Nt),Sr=le.style.map.terrain.getTerrainData(Q);hr.draw(ee,se.TRIANGLES,wo.disabled,qe,je,Ja.disabled,xo(Q.posMatrix,w,le.transform.zoom,B.paint.get("heatmap-intensity")),Sr,B.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,B.paint,le.transform.zoom,Nt)}function hf(le,w,B){let Q=le.context,ee=Q.gl;Q.setColorMode(le.colorModeForRenderPass());let se=Kh(Q,w),qe=B.key,je=w.heatmapFbos.get(qe);je&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,je.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),se.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),le.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,wo.disabled,$o.disabled,le.colorModeForRenderPass(),Ja.disabled,zs(le,w,0,1),null,w.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments,w.paint,le.transform.zoom),je.destroy(),w.heatmapFbos.delete(qe))}function kh(le,w,B){var Q,ee;let se=le.gl,qe=se.createTexture();se.bindTexture(se.TEXTURE_2D,qe),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_S,se.CLAMP_TO_EDGE),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_T,se.CLAMP_TO_EDGE),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MIN_FILTER,se.LINEAR),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MAG_FILTER,se.LINEAR);let je=(Q=le.HALF_FLOAT)!==null&&Q!==void 0?Q:se.UNSIGNED_BYTE,it=(ee=le.RGBA16F)!==null&&ee!==void 0?ee:se.RGBA;se.texImage2D(se.TEXTURE_2D,0,it,w,B,0,se.RGBA,je,null);let yt=le.createFramebuffer(w,B,!1,!1);return yt.colorAttachment.set(qe),yt}function Kh(le,w){return w.colorRampTexture||(w.colorRampTexture=new p(le,w.colorRamp,le.gl.RGBA)),w.colorRampTexture}function rc(le,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let se=Q.imageAtlas.patternPositions,qe=se[B.to.toString()],je=se[B.from.toString()];if(!qe&&je&&(qe=je),!je&&qe&&(je=qe),!qe||!je){let it=ee.getPaintProperty(w);qe=se[it],je=se[it]}qe&&je&&le.setConstantPatternPositions(qe,je)}function ah(le,w,B,Q,ee,se,qe){let je=le.context.gl,it="fill-pattern",yt=B.paint.get(it),Ot=yt&&yt.constantOr(1),Nt=B.getCrossfadeParameters(),hr,Sr,he,be,Pe;qe?(Sr=Ot&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",hr=je.LINES):(Sr=Ot?"fillPattern":"fill",hr=je.TRIANGLES);let Oe=yt.constantOr(null);for(let Je of Q){let He=w.getTile(Je);if(Ot&&!He.patternsLoaded())continue;let et=He.getBucket(B);if(!et)continue;let Mt=et.programConfigurations.get(B.id),Rt=le.useProgram(Sr,Mt),Ut=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Je);Ot&&(le.context.activeTexture.set(je.TEXTURE0),He.imageAtlasTexture.bind(je.LINEAR,je.CLAMP_TO_EDGE),Mt.updatePaintBuffers(Nt)),rc(Mt,it,Oe,He,B);let tr=Ut?Je:null,mr=le.translatePosMatrix(tr?tr.posMatrix:Je.posMatrix,He,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(qe){be=et.indexBuffer2,Pe=et.segments2;let Dr=[je.drawingBufferWidth,je.drawingBufferHeight];he=Sr==="fillOutlinePattern"&&Ot?Sa(mr,le,Nt,He,Dr):Fn(mr,Dr)}else be=et.indexBuffer,Pe=et.segments,he=Ot?ua(mr,le,Nt,He):Ji(mr);Rt.draw(le.context,hr,ee,le.stencilModeForClipping(Je),se,Ja.disabled,he,Ut,B.id,et.layoutVertexBuffer,be,Pe,B.paint,le.transform.zoom,Mt)}}function Wc(le,w,B,Q,ee,se,qe){let je=le.context,it=je.gl,yt="fill-extrusion-pattern",Ot=B.paint.get(yt),Nt=Ot.constantOr(1),hr=B.getCrossfadeParameters(),Sr=B.paint.get("fill-extrusion-opacity"),he=Ot.constantOr(null);for(let be of Q){let Pe=w.getTile(be),Oe=Pe.getBucket(B);if(!Oe)continue;let Je=le.style.map.terrain&&le.style.map.terrain.getTerrainData(be),He=Oe.programConfigurations.get(B.id),et=le.useProgram(Nt?"fillExtrusionPattern":"fillExtrusion",He);Nt&&(le.context.activeTexture.set(it.TEXTURE0),Pe.imageAtlasTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE),He.updatePaintBuffers(hr)),rc(He,yt,he,Pe,B);let Mt=le.translatePosMatrix(be.posMatrix,Pe,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Rt=B.paint.get("fill-extrusion-vertical-gradient"),Ut=Nt?hi(Mt,le,Rt,Sr,be,hr,Pe):an(Mt,le,Rt,Sr);et.draw(je,je.gl.TRIANGLES,ee,se,qe,Ja.backCCW,Ut,Je,B.id,Oe.layoutVertexBuffer,Oe.indexBuffer,Oe.segments,B.paint,le.transform.zoom,He,le.style.map.terrain&&Oe.centroidVertexBuffer)}}function df(le,w,B,Q,ee,se,qe){let je=le.context,it=je.gl,yt=B.fbo;if(!yt)return;let Ot=le.useProgram("hillshade"),Nt=le.style.map.terrain&&le.style.map.terrain.getTerrainData(w);je.activeTexture.set(it.TEXTURE0),it.bindTexture(it.TEXTURE_2D,yt.colorAttachment.get()),Ot.draw(je,it.TRIANGLES,ee,se,qe,Ja.disabled,((hr,Sr,he,be)=>{let Pe=he.paint.get("hillshade-shadow-color"),Oe=he.paint.get("hillshade-highlight-color"),Je=he.paint.get("hillshade-accent-color"),He=he.paint.get("hillshade-illumination-direction")*(Math.PI/180);he.paint.get("hillshade-illumination-anchor")==="viewport"&&(He-=hr.transform.angle);let et=!hr.options.moving;return{u_matrix:be?be.posMatrix:hr.transform.calculatePosMatrix(Sr.tileID.toUnwrapped(),et),u_image:0,u_latrange:ks(0,Sr.tileID),u_light:[he.paint.get("hillshade-exaggeration"),He],u_shadow:Pe,u_highlight:Oe,u_accent:Je}})(le,B,Q,Nt?w:null),Nt,Q.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}function Cu(le,w,B,Q,ee,se){let qe=le.context,je=qe.gl,it=w.dem;if(it&&it.data){let yt=it.dim,Ot=it.stride,Nt=it.getPixels();if(qe.activeTexture.set(je.TEXTURE1),qe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||le.getTileTexture(Ot),w.demTexture){let Sr=w.demTexture;Sr.update(Nt,{premultiply:!1}),Sr.bind(je.NEAREST,je.CLAMP_TO_EDGE)}else w.demTexture=new p(qe,Nt,je.RGBA,{premultiply:!1}),w.demTexture.bind(je.NEAREST,je.CLAMP_TO_EDGE);qe.activeTexture.set(je.TEXTURE0);let hr=w.fbo;if(!hr){let Sr=new p(qe,{width:yt,height:yt,data:null},je.RGBA);Sr.bind(je.LINEAR,je.CLAMP_TO_EDGE),hr=w.fbo=qe.createFramebuffer(yt,yt,!0,!1),hr.colorAttachment.set(Sr.texture)}qe.bindFramebuffer.set(hr.framebuffer),qe.viewport.set([0,0,yt,yt]),le.useProgram("hillshadePrepare").draw(qe,je.TRIANGLES,Q,ee,se,Ja.disabled,((Sr,he)=>{let be=he.stride,Pe=a.H();return a.aP(Pe,0,a.X,-a.X,0,0,1),a.J(Pe,Pe,[0,-a.X,0]),{u_matrix:Pe,u_image:1,u_dimension:[be,be],u_zoom:Sr.overscaledZ,u_unpack:he.getUnpackVector()}})(w.tileID,it),null,B.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Nf(le,w,B,Q,ee,se){let qe=Q.paint.get("raster-fade-duration");if(!se&&qe>0){let je=u.now(),it=(je-le.timeAdded)/qe,yt=w?(je-w.timeAdded)/qe:-1,Ot=B.getSource(),Nt=ee.coveringZoomLevel({tileSize:Ot.tileSize,roundZoom:Ot.roundZoom}),hr=!w||Math.abs(w.tileID.overscaledZ-Nt)>Math.abs(le.tileID.overscaledZ-Nt),Sr=hr&&le.refreshedUponExpiration?1:a.ac(hr?it:1-yt,0,1);return le.refreshedUponExpiration&&it>=1&&(le.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Sr}:{opacity:Sr,mix:0}}return{opacity:1,mix:0}}let Zc=new a.aM(1,0,0,1),ds=new a.aM(0,1,0,1),Ch=new a.aM(0,0,1,1),Bd=new a.aM(1,0,1,1),Jh=new a.aM(0,1,1,1);function Cf(le,w,B,Q){Lu(le,0,w+B/2,le.transform.width,B,Q)}function pd(le,w,B,Q){Lu(le,w-B/2,0,B,le.transform.height,Q)}function Lu(le,w,B,Q,ee,se){let qe=le.context,je=qe.gl;je.enable(je.SCISSOR_TEST),je.scissor(w*le.pixelRatio,B*le.pixelRatio,Q*le.pixelRatio,ee*le.pixelRatio),qe.clear({color:se}),je.disable(je.SCISSOR_TEST)}function $h(le,w,B){let Q=le.context,ee=Q.gl,se=B.posMatrix,qe=le.useProgram("debug"),je=wo.disabled,it=$o.disabled,yt=le.colorModeForRenderPass(),Ot="$debug",Nt=le.style.map.terrain&&le.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let hr=w.getTileByID(B.key).latestRawTileData,Sr=Math.floor((hr&&hr.byteLength||0)/1024),he=w.getTile(B).tileSize,be=512/Math.min(he,512)*(B.overscaledZ/le.transform.zoom)*.5,Pe=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Pe+=` => ${B.overscaledZ}`),function(Oe,Je){Oe.initDebugOverlayCanvas();let He=Oe.debugOverlayCanvas,et=Oe.context.gl,Mt=Oe.debugOverlayCanvas.getContext("2d");Mt.clearRect(0,0,He.width,He.height),Mt.shadowColor="white",Mt.shadowBlur=2,Mt.lineWidth=1.5,Mt.strokeStyle="white",Mt.textBaseline="top",Mt.font="bold 36px Open Sans, sans-serif",Mt.fillText(Je,5,5),Mt.strokeText(Je,5,5),Oe.debugOverlayTexture.update(He),Oe.debugOverlayTexture.bind(et.LINEAR,et.CLAMP_TO_EDGE)}(le,`${Pe} ${Sr}kB`),qe.draw(Q,ee.TRIANGLES,je,it,Ps.alphaBlended,Ja.disabled,ho(se,a.aM.transparent,be),null,Ot,le.debugBuffer,le.quadTriangleIndexBuffer,le.debugSegments),qe.draw(Q,ee.LINE_STRIP,je,it,yt,Ja.disabled,ho(se,a.aM.red),Nt,Ot,le.debugBuffer,le.tileBorderIndexBuffer,le.debugSegments)}function eu(le,w,B){let Q=le.context,ee=Q.gl,se=le.colorModeForRenderPass(),qe=new wo(ee.LEQUAL,wo.ReadWrite,le.depthRangeFor3D),je=le.useProgram("terrain"),it=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,le.width,le.height]);for(let yt of B){let Ot=le.renderToTexture.getTexture(yt),Nt=w.getTerrainData(yt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ot.texture);let hr=le.transform.calculatePosMatrix(yt.tileID.toUnwrapped()),Sr=w.getMeshFrameDelta(le.transform.zoom),he=le.transform.calculateFogMatrix(yt.tileID.toUnwrapped()),be=Hr(hr,Sr,he,le.style.sky,le.transform.pitch);je.draw(Q,ee.TRIANGLES,qe,$o.disabled,se,Ja.backCCW,be,Nt,"terrain",it.vertexBuffer,it.indexBuffer,it.segments)}}class Pu{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 Lc{constructor(w,B){this.context=new ov(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=dt.maxUnderzooming+dt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jo}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,oo.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,oo.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,ot.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let se=new a.aX;se.emplaceBack(0,0),se.emplaceBack(1,0),se.emplaceBack(0,1),se.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(se,oo.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 je=new a.aY;je.emplaceBack(0,1,2),je.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(je);let it=this.context.gl;this.stencilClearMode=new $o({func:it.ALWAYS,mask:0},0,255,it.ZERO,it.ZERO,it.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,wo.disabled,this.stencilClearMode,Ps.disabled,Ja.disabled,Mo(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(Ps.disabled),Q.setDepthMode(wo.disabled);let se=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let qe of B){let je=this._tileClippingMaskIDs[qe.key]=this.nextStencilID++,it=this.style.map.terrain&&this.style.map.terrain.getTerrainData(qe);se.draw(Q,ee.TRIANGLES,wo.disabled,new $o({func:ee.ALWAYS,mask:0},je,255,ee.KEEP,ee.KEEP,ee.REPLACE),Ps.disabled,Ja.disabled,Mo(qe.posMatrix),it,"$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 $o({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new $o({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,je)=>je.overscaledZ-qe.overscaledZ),ee=Q[Q.length-1].overscaledZ,se=Q[0].overscaledZ-ee+1;if(se>1){this.currentStencilSource=void 0,this.nextStencilID+se>256&&this.clearStencil();let qe={};for(let je=0;je({u_sky_color:Oe.properties.get("sky-color"),u_horizon_color:Oe.properties.get("horizon-color"),u_horizon:(Je.height/2+Je.getHorizon())*He,u_sky_horizon_blend:Oe.properties.get("sky-horizon-blend")*Je.height/2*He}))(yt,it.style.map.transform,it.pixelRatio),Sr=new wo(Nt.LEQUAL,wo.ReadWrite,[0,1]),he=$o.disabled,be=it.colorModeForRenderPass(),Pe=it.useProgram("sky");if(!yt.mesh){let Oe=new a.aX;Oe.emplaceBack(-1,-1),Oe.emplaceBack(1,-1),Oe.emplaceBack(1,1),Oe.emplaceBack(-1,1);let Je=new a.aY;Je.emplaceBack(0,1,2),Je.emplaceBack(0,2,3),yt.mesh=new Pu(Ot.createVertexBuffer(Oe,oo.members),Ot.createIndexBuffer(Je),a.a0.simpleSegment(0,0,Oe.length,Je.length))}Pe.draw(Ot,Nt.TRIANGLES,Sr,he,be,Ja.disabled,hr,void 0,"sky",yt.mesh.vertexBuffer,yt.mesh.indexBuffer,yt.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 it=this.style._layers[Q[this.currentLayer]],yt=ee[it.source],Ot=se[it.source];this._renderTileClippingMasks(it,Ot),this.renderLayer(this,yt,it,Ot)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerPe.source&&!Pe.isHidden(Ot)?[yt.sourceCaches[Pe.source]]:[]),Sr=hr.filter(Pe=>Pe.getSource().type==="vector"),he=hr.filter(Pe=>Pe.getSource().type!=="vector"),be=Pe=>{(!Nt||Nt.getSource().maxzoombe(Pe)),Nt||he.forEach(Pe=>be(Pe)),Nt}(this.style,this.transform.zoom);it&&function(yt,Ot,Nt){for(let hr=0;hr0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(se,qe){let je=se.context,it=je.gl,yt=Ps.unblended,Ot=new wo(it.LEQUAL,wo.ReadWrite,[0,1]),Nt=qe.getTerrainMesh(),hr=qe.sourceCache.getRenderableTiles(),Sr=se.useProgram("terrainDepth");je.bindFramebuffer.set(qe.getFramebuffer("depth").framebuffer),je.viewport.set([0,0,se.width/devicePixelRatio,se.height/devicePixelRatio]),je.clear({color:a.aM.transparent,depth:1});for(let he of hr){let be=qe.getTerrainData(he.tileID),Pe={u_matrix:se.transform.calculatePosMatrix(he.tileID.toUnwrapped()),u_ele_delta:qe.getMeshFrameDelta(se.transform.zoom)};Sr.draw(je,it.TRIANGLES,Ot,$o.disabled,yt,Ja.backCCW,Pe,be,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments)}je.bindFramebuffer.set(null),je.viewport.set([0,0,se.width,se.height])}(this,this.style.map.terrain),function(se,qe){let je=se.context,it=je.gl,yt=Ps.unblended,Ot=new wo(it.LEQUAL,wo.ReadWrite,[0,1]),Nt=qe.getTerrainMesh(),hr=qe.getCoordsTexture(),Sr=qe.sourceCache.getRenderableTiles(),he=se.useProgram("terrainCoords");je.bindFramebuffer.set(qe.getFramebuffer("coords").framebuffer),je.viewport.set([0,0,se.width/devicePixelRatio,se.height/devicePixelRatio]),je.clear({color:a.aM.transparent,depth:1}),qe.coordsIndex=[];for(let be of Sr){let Pe=qe.getTerrainData(be.tileID);je.activeTexture.set(it.TEXTURE0),it.bindTexture(it.TEXTURE_2D,hr.texture);let Oe={u_matrix:se.transform.calculatePosMatrix(be.tileID.toUnwrapped()),u_terrain_coords_id:(255-qe.coordsIndex.length)/255,u_texture:0,u_ele_delta:qe.getMeshFrameDelta(se.transform.zoom)};he.draw(je,it.TRIANGLES,Ot,$o.disabled,yt,Ja.backCCW,Oe,Pe,"terrain",Nt.vertexBuffer,Nt.indexBuffer,Nt.segments),qe.coordsIndex.push(be.tileID.key)}je.bindFramebuffer.set(null),je.viewport.set([0,0,se.width,se.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(se,qe,je,it,yt){if(se.renderPass!=="translucent")return;let Ot=$o.disabled,Nt=se.colorModeForRenderPass();(je._unevaluatedLayout.hasValue("text-variable-anchor")||je._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(hr,Sr,he,be,Pe,Oe,Je,He,et){let Mt=Sr.transform,Rt=Gi(),Ut=Pe==="map",tr=Oe==="map";for(let mr of hr){let Dr=be.getTile(mr),zr=Dr.getBucket(he);if(!zr||!zr.text||!zr.text.segments.get().length)continue;let Xr=a.ag(zr.textSizeData,Mt.zoom),di=nn(Dr,1,Sr.transform.zoom),Li=Or(mr.posMatrix,tr,Ut,Sr.transform,di),Ci=he.layout.get("icon-text-fit")!=="none"&&zr.hasIconData();if(Xr){let Qi=Math.pow(2,Mt.zoom-Dr.tileID.overscaledZ),Mn=Sr.style.map.terrain?(ea,Ga)=>Sr.style.map.terrain.getElevation(mr,ea,Ga):null,pa=Rt.translatePosition(Mt,Dr,Je,He);kf(zr,Ut,tr,et,Mt,Li,mr.posMatrix,Qi,Xr,Ci,Rt,pa,mr.toUnwrapped(),Mn)}}}(it,se,je,qe,je.layout.get("text-rotation-alignment"),je.layout.get("text-pitch-alignment"),je.paint.get("text-translate"),je.paint.get("text-translate-anchor"),yt),je.paint.get("icon-opacity").constantOr(1)!==0&&Yh(se,qe,je,it,!1,je.paint.get("icon-translate"),je.paint.get("icon-translate-anchor"),je.layout.get("icon-rotation-alignment"),je.layout.get("icon-pitch-alignment"),je.layout.get("icon-keep-upright"),Ot,Nt),je.paint.get("text-opacity").constantOr(1)!==0&&Yh(se,qe,je,it,!0,je.paint.get("text-translate"),je.paint.get("text-translate-anchor"),je.layout.get("text-rotation-alignment"),je.layout.get("text-pitch-alignment"),je.layout.get("text-keep-upright"),Ot,Nt),qe.map.showCollisionBoxes&&(tc(se,qe,je,it,!0),tc(se,qe,je,it,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(se,qe,je,it){if(se.renderPass!=="translucent")return;let yt=je.paint.get("circle-opacity"),Ot=je.paint.get("circle-stroke-width"),Nt=je.paint.get("circle-stroke-opacity"),hr=!je.layout.get("circle-sort-key").isConstant();if(yt.constantOr(1)===0&&(Ot.constantOr(1)===0||Nt.constantOr(1)===0))return;let Sr=se.context,he=Sr.gl,be=se.depthModeForSublayer(0,wo.ReadOnly),Pe=$o.disabled,Oe=se.colorModeForRenderPass(),Je=[];for(let He=0;HeHe.sortKey-et.sortKey);for(let He of Je){let{programConfiguration:et,program:Mt,layoutVertexBuffer:Rt,indexBuffer:Ut,uniformValues:tr,terrainData:mr}=He.state;Mt.draw(Sr,he.TRIANGLES,be,Pe,Oe,Ja.disabled,tr,mr,je.id,Rt,Ut,He.segments,je.paint,se.transform.zoom,et)}})(w,B,Q,ee);break;case"heatmap":(function(se,qe,je,it){if(je.paint.get("heatmap-opacity")===0)return;let yt=se.context;if(se.style.map.terrain){for(let Ot of it){let Nt=qe.getTile(Ot);qe.hasRenderableParent(Ot)||(se.renderPass==="offscreen"?nh(se,Nt,je,Ot):se.renderPass==="translucent"&&hf(se,je,Ot))}yt.viewport.set([0,0,se.width,se.height])}else se.renderPass==="offscreen"?function(Ot,Nt,hr,Sr){let he=Ot.context,be=he.gl,Pe=$o.disabled,Oe=new Ps([be.ONE,be.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(Je,He,et){let Mt=Je.gl;Je.activeTexture.set(Mt.TEXTURE1),Je.viewport.set([0,0,He.width/4,He.height/4]);let Rt=et.heatmapFbos.get(a.aU);Rt?(Mt.bindTexture(Mt.TEXTURE_2D,Rt.colorAttachment.get()),Je.bindFramebuffer.set(Rt.framebuffer)):(Rt=kh(Je,He.width/4,He.height/4),et.heatmapFbos.set(a.aU,Rt))})(he,Ot,hr),he.clear({color:a.aM.transparent});for(let Je=0;Je20&&Ot.texParameterf(Ot.TEXTURE_2D,yt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,yt.extTextureFilterAnisotropicMax);let zr=se.style.map.terrain&&se.style.map.terrain.getTerrainData(Je),Xr=zr?Je:null,di=Xr?Xr.posMatrix:se.transform.calculatePosMatrix(Je.toUnwrapped(),Oe),Li=ml(di,mr||[0,0],tr||1,Ut,je);Nt instanceof Dt?hr.draw(yt,Ot.TRIANGLES,He,$o.disabled,Sr,Ja.disabled,Li,zr,je.id,Nt.boundsBuffer,se.quadTriangleIndexBuffer,Nt.boundsSegments):hr.draw(yt,Ot.TRIANGLES,He,he[Je.overscaledZ],Sr,Ja.disabled,Li,zr,je.id,se.rasterBoundsBuffer,se.quadTriangleIndexBuffer,se.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(se,qe,je,it){let yt=je.paint.get("background-color"),Ot=je.paint.get("background-opacity");if(Ot===0)return;let Nt=se.context,hr=Nt.gl,Sr=se.transform,he=Sr.tileSize,be=je.paint.get("background-pattern");if(se.isPatternMissing(be))return;let Pe=!be&&yt.a===1&&Ot===1&&se.opaquePassEnabledForLayer()?"opaque":"translucent";if(se.renderPass!==Pe)return;let Oe=$o.disabled,Je=se.depthModeForSublayer(0,Pe==="opaque"?wo.ReadWrite:wo.ReadOnly),He=se.colorModeForRenderPass(),et=se.useProgram(be?"backgroundPattern":"background"),Mt=it||Sr.coveringTiles({tileSize:he,terrain:se.style.map.terrain});be&&(Nt.activeTexture.set(hr.TEXTURE0),se.imageManager.bind(se.context));let Rt=je.getCrossfadeParameters();for(let Ut of Mt){let tr=it?Ut.posMatrix:se.transform.calculatePosMatrix(Ut.toUnwrapped()),mr=be?Gu(tr,Ot,se,be,{tileID:Ut,tileSize:he},Rt):$l(tr,Ot,yt),Dr=se.style.map.terrain&&se.style.map.terrain.getTerrainData(Ut);et.draw(Nt,hr.TRIANGLES,Je,Oe,He,Ja.disabled,mr,Dr,je.id,se.tileExtentBuffer,se.quadTriangleIndexBuffer,se.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(se,qe,je){let it=se.context,yt=je.implementation;if(se.renderPass==="offscreen"){let Ot=yt.prerender;Ot&&(se.setCustomLayerDefaults(),it.setColorMode(se.colorModeForRenderPass()),Ot.call(yt,it.gl,se.transform.customLayerMatrix()),it.setDirty(),se.setBaseState())}else if(se.renderPass==="translucent"){se.setCustomLayerDefaults(),it.setColorMode(se.colorModeForRenderPass()),it.setStencilMode($o.disabled);let Ot=yt.renderingMode==="3d"?new wo(se.context.gl.LEQUAL,wo.ReadWrite,se.depthRangeFor3D):se.depthModeForSublayer(0,wo.ReadOnly);it.setDepthMode(Ot),yt.render(it.gl,se.transform.customLayerMatrix(),{farZ:se.transform.farZ,nearZ:se.transform.nearZ,fov:se.transform._fov,modelViewProjectionMatrix:se.transform.modelViewProjectionMatrix,projectionMatrix:se.transform.projectionMatrix}),it.setDirty(),se.setBaseState(),it.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,se){if(!Q[0]&&!Q[1])return w;let qe=se?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(qe){let yt=Math.sin(qe),Ot=Math.cos(qe);Q=[Q[0]*Ot-Q[1]*yt,Q[0]*yt+Q[1]*Ot]}let je=[se?Q[0]:nn(B,Q[0],this.transform.zoom),se?Q[1]:nn(B,Q[1],this.transform.zoom),0],it=new Float32Array(16);return a.J(it,w,je),it}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 zi(this.context,xn[w],B,fc[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 p(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 fl{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),se=[[-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(je=>{let it=1/(je=a.af([],je,w))[3]/B*ee;return a.b1(je,je,[it,it,1/je[3],it])}),qe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(je=>{let it=function(hr,Sr){var he=Sr[0],be=Sr[1],Pe=Sr[2],Oe=he*he+be*be+Pe*Pe;return Oe>0&&(Oe=1/Math.sqrt(Oe)),hr[0]=Sr[0]*Oe,hr[1]=Sr[1]*Oe,hr[2]=Sr[2]*Oe,hr}([],function(hr,Sr,he){var be=Sr[0],Pe=Sr[1],Oe=Sr[2],Je=he[0],He=he[1],et=he[2];return hr[0]=Pe*et-Oe*He,hr[1]=Oe*Je-be*et,hr[2]=be*He-Pe*Je,hr}([],L([],se[je[0]],se[je[1]]),L([],se[je[2]],se[je[1]]))),yt=-((Ot=it)[0]*(Nt=se[je[1]])[0]+Ot[1]*Nt[1]+Ot[2]*Nt[2]);var Ot,Nt;return it.concat(yt)});return new fl(se,qe)}}class Xc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,se){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,se){return Q[0]=ee[0]+se[0],Q[1]=ee[1]+se[1],Q[2]=ee[2]+se[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=k(this.min),ee=k(this.max);for(let se=0;se=0&&qe++;if(qe===0)return 0;qe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let se=Number.MAX_VALUE,qe=-Number.MAX_VALUE;for(let je=0;jethis.max[ee]-this.min[ee])return 0}return 1}}class ic{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 ic(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let yu=85.051129;class Qs{constructor(w,B,Q,ee,se){this.tileSize=512,this._renderWorldCopies=se===void 0||!!se,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 ic,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new Qs(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,se){var qe=ee[0],je=ee[1],it=ee[2],yt=ee[3],Ot=Math.sin(se),Nt=Math.cos(se);Q[0]=qe*Nt+it*Ot,Q[1]=je*Nt+yt*Ot,Q[2]=qe*-Ot+it*Nt,Q[3]=je*-Ot+yt*Nt}(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)),se=this.pointCoordinate(new a.P(this.width,this.height)),qe=this.pointCoordinate(new a.P(0,this.height)),je=Math.floor(Math.min(Q.x,ee.x,se.x,qe.x)),it=Math.floor(Math.max(Q.x,ee.x,se.x,qe.x)),yt=1;for(let Ot=je-yt;Ot<=it+yt;Ot++)Ot!==0&&B.push(new a.b4(Ot,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),se=ee;if(w.minzoom!==void 0&&eew.maxzoom&&(ee=w.maxzoom);let qe=this.pointCoordinate(this.getCameraPoint()),je=a.Z.fromLngLat(this.center),it=Math.pow(2,ee),yt=[it*qe.x,it*qe.y,0],Ot=[it*je.x,it*je.y,0],Nt=fl.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),hr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(hr=ee);let Sr=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,he=He=>({aabb:new Xc([He*it,0,0],[(He+1)*it,it,0]),zoom:0,x:0,y:0,wrap:He,fullyVisible:!1}),be=[],Pe=[],Oe=ee,Je=w.reparseOverscaled?se:ee;if(this._renderWorldCopies)for(let He=1;He<=3;He++)be.push(he(-He)),be.push(he(He));for(be.push(he(0));be.length>0;){let He=be.pop(),et=He.x,Mt=He.y,Rt=He.fullyVisible;if(!Rt){let zr=He.aabb.intersects(Nt);if(zr===0)continue;Rt=zr===2}let Ut=w.terrain?yt:Ot,tr=He.aabb.distanceX(Ut),mr=He.aabb.distanceY(Ut),Dr=Math.max(Math.abs(tr),Math.abs(mr));if(He.zoom===Oe||Dr>Sr+(1<=hr){let zr=Oe-He.zoom,Xr=yt[0]-.5-(et<>1),Li=He.zoom+1,Ci=He.aabb.quadrant(zr);if(w.terrain){let Qi=new a.S(Li,He.wrap,Li,Xr,di),Mn=w.terrain.getMinMaxElevation(Qi),pa=(B=Mn.minElevation)!==null&&B!==void 0?B:this.elevation,ea=(Q=Mn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;Ci=new Xc([Ci.min[0],Ci.min[1],pa],[Ci.max[0],Ci.max[1],ea])}be.push({aabb:Ci,zoom:Li,x:Xr,y:di,wrap:He.wrap,fullyVisible:Rt})}}return Pe.sort((He,et)=>He.distanceSq-et.distanceSq).map(He=>He.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,yu);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),se=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-se))return;let qe=Q+B-se,je=Math.cos(this._pitch)*this.cameraToCenterDistance/qe/a.b5(1,ee.lat),it=this.scaleZoom(je/this.tileSize);this._elevation=se,this._center=ee,this.zoom=it}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),se=this.locationCoordinate(w),qe=new a.Z(se.x-(Q.x-ee.x),se.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 hr=B.pointCoordinate(w);if(hr!=null)return hr}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 se=Q[3],qe=ee[3],je=Q[1]/se,it=ee[1]/qe,yt=Q[2]/se,Ot=ee[2]/qe,Nt=yt===Ot?0:(0-yt)/(Ot-yt);return new a.Z(a.y.number(Q[0]/se,ee[0]/qe,Nt)/this.worldSize,a.y.number(je,it,Nt)/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,yu])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,se=a.an(new Float64Array(16));return a.J(se,se,[ee*Q,B.y*Q,0]),a.K(se,se,[Q/a.X,Q/a.X,1]),se}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let se=this.calculateTileMatrix(w);return a.L(se,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,se),ee[Q]=new Float32Array(se),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 He=179.9999999999;ee=[-He,He]}let se=this.tileSize*this.zoomScale(Q.zoom),qe=0,je=se,it=0,yt=se,Ot=0,Nt=0,{x:hr,y:Sr}=this.size;if(this.latRange){let He=this.latRange;qe=a.Q(He[1])*se,je=a.Q(He[0])*se,je-qeje&&(Oe=je-He)}if(ee){let He=(it+yt)/2,et=he;this._renderWorldCopies&&(et=a.b3(he,He-se/2,He+se/2));let Mt=hr/2;et-Mtyt&&(Pe=yt-Mt)}if(Pe!==void 0||Oe!==void 0){let He=new a.P(Pe!=null?Pe:he,Oe!=null?Oe:be);Q.center=this.unproject.call({worldSize:se},He).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 se=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),qe=Math.min(this.elevation,this.minElevationForCurrentTile),je=se-qe*this._pixelPerMeter/Math.cos(this._pitch),it=qe<0?je:se,yt=Math.PI/2+this._pitch,Ot=this._fov*(.5+w.y/this.height),Nt=Math.sin(Ot)*it/Math.sin(a.ac(Math.PI-yt-Ot,.01,Math.PI-.01)),hr=this.getHorizon(),Sr=2*Math.atan(hr/this.cameraToCenterDistance)*(.5+w.y/(2*hr)),he=Math.sin(Sr)*it/Math.sin(a.ac(Math.PI-yt-Sr,.01,Math.PI-.01)),be=Math.min(Nt,he);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*be+it),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,se,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 Pe=this.width%2/2,Oe=this.height%2/2,Je=Math.cos(this.angle),He=Math.sin(this.angle),et=B-Math.round(B)+Je*Pe+He*Oe,Mt=Q-Math.round(Q)+Je*Oe+He*Pe,Rt=new Float64Array(ee);if(a.J(Rt,Rt,[et>.5?et-1:et,Mt>.5?Mt-1:Mt,0]),this.alignedModelViewProjectionMatrix=Rt,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,se=B.x,qe=B.y;for(let je of w)Q=Math.min(Q,je.x),ee=Math.min(ee,je.y),se=Math.max(se,je.x),qe=Math.max(qe,je.y);return[new a.P(Q,ee),new a.P(se,ee),new a.P(se,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 Qh(le,w){let B,Q=!1,ee=null,se=null,qe=()=>{ee=null,Q&&(le.apply(se,B),ee=setTimeout(qe,w),Q=!1)};return(...je)=>(Q=!0,se=this,B=je,ee||qe(),ee)}class gd{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 se=window.location.hash.replace(ee,"");se.startsWith("#&")?se=se.slice(0,1)+se.slice(2):se==="#"&&(se="");let qe=window.location.href.replace(/(#.+)?$/,se);qe=qe.replace("&&","&"),window.history.replaceState(window.history.state,null,qe)},this._updateHash=Qh(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),se=Math.pow(10,ee),qe=Math.round(B.lng*se)/se,je=Math.round(B.lat*se)/se,it=this._map.getBearing(),yt=this._map.getPitch(),Ot="";if(Ot+=w?`/${qe}/${je}/${Q}`:`${Q}/${je}/${qe}`,(it||yt)&&(Ot+="/"+Math.round(10*it)/10),yt&&(Ot+=`/${Math.round(yt)}`),this._hashName){let Nt=this._hashName,hr=!1,Sr=window.location.hash.slice(1).split("&").map(he=>{let be=he.split("=")[0];return be===Nt?(hr=!0,`${be}=${Ot}`):he}).filter(he=>he);return hr||Sr.push(`${Nt}=${Ot}`),`#${Sr.join("&")}`}return`#${Ot}`}}let ju={linearity:.3,easing:a.b8(0,0,.3,1)},Pc=a.e({deceleration:2500,maxSpeed:1400},ju),vc=a.e({deceleration:20,maxSpeed:1400},ju),sv=a.e({deceleration:1e3,maxSpeed:360},ju),Lf=a.e({deceleration:1e3,maxSpeed:90},ju);class Uf{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:se}of this._inertiaBuffer)B.zoom+=se.zoomDelta||0,B.bearing+=se.bearingDelta||0,B.pitch+=se.pitchDelta||0,se.panDelta&&B.pan._add(se.panDelta),se.around&&(B.around=se.around),se.pinchAround&&(B.pinchAround=se.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let se=oh(B.pan.mag(),Q,a.e({},Pc,w||{}));ee.offset=B.pan.mult(se.amount/B.pan.mag()),ee.center=this._map.transform.center,Iu(ee,se)}if(B.zoom){let se=oh(B.zoom,Q,vc);ee.zoom=this._map.transform.zoom+se.amount,Iu(ee,se)}if(B.bearing){let se=oh(B.bearing,Q,sv);ee.bearing=this._map.transform.bearing+a.ac(se.amount,-179,179),Iu(ee,se)}if(B.pitch){let se=oh(B.pitch,Q,Lf);ee.pitch=this._map.transform.pitch+se.amount,Iu(ee,se)}if(ee.zoom||ee.bearing){let se=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=se?this._map.unproject(se):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function Iu(le,w){(!le.duration||le.durationB.unproject(it)),je=se.reduce((it,yt,Ot,Nt)=>it.add(yt.div(Nt.length)),new a.P(0,0));super(w,{points:se,point:je,lngLats:qe,lngLat:B.unproject(je),originalEvent:Q}),this._defaultPrevented=!1}}class md extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class sh{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new md(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new tu(w.type,this._map,w))}mouseup(w){this._map.fire(new tu(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new tu(w.type,this._map,w))}dblclick(w){return this._firePreventable(new tu(w.type,this._map,w))}mouseover(w){this._map.fire(new tu(w.type,this._map,w))}mouseout(w){this._map.fire(new tu(w.type,this._map,w))}touchstart(w){return this._firePreventable(new vf(w.type,this._map,w))}touchmove(w){this._map.fire(new vf(w.type,this._map,w))}touchend(w){this._map.fire(new vf(w.type,this._map,w))}touchcancel(w){this._map.fire(new vf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Fs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new tu(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new tu("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new tu(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _u{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 xu{constructor(w,B){this._map=w,this._tr=new _u(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)se.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 Lh(le,w){if(le.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${le.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 se=new a.P(0,0);for(let qe of ee)se._add(qe);return se.div(ee.length)}(B),this.touches=Lh(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Lh(Q,B);for(let se in this.touches){let qe=ee[se];(!qe||qe.dist(this.touches[se])>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 Pf{constructor(w){this.singleTap=new Is(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 se=w.timeStamp-this.lastTime<500,qe=!this.lastTap||this.lastTap.dist(ee)<30;if(se&&qe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class Ic{constructor(w){this._tr=new _u(w),this._zoomIn=new Pf({numTouches:1,numTaps:2}),this._zoomOut=new Pf({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),se=this._zoomOut.touchend(w,B,Q),qe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:qe.zoom+1,around:qe.unproject(ee)},{originalEvent:w})}):se?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:qe.zoom-1,around:qe.unproject(se)},{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){le.mousedown=le.dragStart,le.mousemoveWindow=le.dragMove,le.mouseup=le.dragEnd,le.contextmenu=w=>{w.preventDefault()}},Dl=({enable:le,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new pc({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,se)=>({bearingDelta:(se.x-ee.x)*B}),moveStateManager:Q,enable:le,assignEvents:Ph})},Ih=({enable:le,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new pc({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,se)=>({pitchDelta:(se.y-ee.y)*B}),moveStateManager:Q,enable:le,assignEvents:Ph})};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=Lh(Q,B),se=new a.P(0,0),qe=new a.P(0,0),je=0;for(let yt in ee){let Ot=ee[yt],Nt=this._touches[yt];Nt&&(se._add(Ot),qe._add(Ot.sub(Nt)),je++,ee[yt]=Ot)}if(this._touches=ee,this._shouldBePrevented(je)||!qe.mag())return;let it=qe.div(je);return this._sum._add(it),this._sum.mag()Math.abs(le.x)}class gf extends Dc{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,nc(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]),se=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,se,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+se.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,se=B.mag()>=2;if(!ee&&!se)return;if(!ee||!se)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let qe=w.y>0==B.y>0;return nc(w)&&nc(B)&&qe}}let gt={panStep:100,bearingStep:15,pitchStep:10};class Bt{constructor(w){this._tr=new _u(w);let B=gt;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,se=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(),se=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),se=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:je=>{let it=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:wr,zoom:B?Math.round(it.zoom)+B*(w.shiftKey?2:1):it.zoom,bearing:it.bearing+Q*this._bearingStep,pitch:it.pitch+ee*this._pitchStep,offset:[-se*this._panStep,-qe*this._panStep],center:it.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 wr(le){return le*(2-le)}let vr=4.000244140625;class Ur{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new _u(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%vr==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 it=this._type==="wheel"&&Math.abs(this._delta)>vr?this._wheelZoomRate:this._defaultZoomRate,yt=2/(1+Math.exp(-Math.abs(this._delta*it)));this._delta<0&&yt!==0&&(yt=1/yt);let Ot=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Ot*yt))),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,se,qe=!1,je=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&je){let it=Math.min(je/200,1),yt=ee(it);se=a.y.number(Q,B,yt),it<1?this._frameId||(this._frameId=!0):qe=!0}else se=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:se-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,se=Q.easing(ee+.01)-Q.easing(ee),qe=.27/Math.sqrt(se*se+1e-4)*.01,je=Math.sqrt(.0729-qe*qe);B=a.b8(qe,je,.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 fi{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 _u(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 Fi{constructor(){this._tap=new Pf({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],se=w.timeStamp-this._tapTime<500,qe=this._tapPoint.dist(ee)<30;se&&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],se=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:se/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 Xi{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 hn{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 Ti{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 se=document.createElement("div");se.className="maplibregl-mobile-message",se.textContent=Q,this._container.appendChild(se),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 Ii=le=>le.zoom||le.drag||le.pitch||le.rotate;class mi extends a.k{}function Pn(le){return le.panDelta&&le.panDelta.mag()||le.zoomDelta||le.bearingDelta||le.pitchDelta}class Ma{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,se)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let qe=ee.type==="renderFrame"?void 0:ee,je={needsRenderFrame:!1},it={},yt={},Ot=ee.touches,Nt=Ot?this._getMapTouches(Ot):void 0,hr=Nt?c.touchPos(this._map.getCanvas(),Nt):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:be,handler:Pe,allowed:Oe}of this._handlers){if(!Pe.isEnabled())continue;let Je;this._blockedByActive(yt,Oe,be)?Pe.reset():Pe[se||ee.type]&&(Je=Pe[se||ee.type](ee,hr,Nt),this.mergeHandlerResult(je,it,Je,be,qe),Je&&Je.needsRenderFrame&&this._triggerRenderFrame()),(Je||Pe.isActive())&&(yt[be]=Pe)}let Sr={};for(let be in this._previousActiveHandlers)yt[be]||(Sr[be]=qe);this._previousActiveHandlers=yt,(Object.keys(Sr).length||Pn(je))&&(this._changes.push([je,it,Sr]),this._triggerRenderFrame()),(Object.keys(yt).length||Pn(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:he}=je;he&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],he(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Uf(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,se,qe]of this._listeners)c.addEventListener(ee,se,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 sh(B,w));let ee=B.boxZoom=new xu(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let se=B.cooperativeGestures=new qi(B,w.cooperativeGestures);this._add("cooperativeGestures",se),w.cooperativeGestures&&se.enable();let qe=new Ic(B),je=new xi(B);B.doubleClickZoom=new fi(je,qe),this._add("tapZoom",qe),this._add("clickZoom",je),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let it=new Fi;this._add("tapDragZoom",it);let yt=B.touchPitch=new gf(B);this._add("touchPitch",yt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Ot=Dl(w),Nt=Ih(w);B.dragRotate=new hn(w,Ot,Nt),this._add("mouseRotate",Ot,["mousePitch"]),this._add("mousePitch",Nt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let hr=(({enable:Je,clickTolerance:He})=>{let et=new pc({checkCorrectEvent:Mt=>c.mouseButton(Mt)===0&&!Mt.ctrlKey});return new Wu({clickTolerance:He,move:(Mt,Rt)=>({around:Rt,panDelta:Rt.sub(Mt)}),activateOnStart:!0,moveStateManager:et,enable:Je,assignEvents:Ph})})(w),Sr=new Zu(w,B);B.dragPan=new Xi(Q,hr,Sr),this._add("mousePan",hr),this._add("touchPan",Sr,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let he=new Yc,be=new ru;B.touchZoomRotate=new Ti(Q,be,he,it),this._add("touchRotate",he,["touchPan","touchZoom"]),this._add("touchZoom",be,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Pe=B.scrollZoom=new Ur(B,()=>this._triggerRenderFrame());this._add("scrollZoom",Pe,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let Oe=B.keyboard=new Bt(B);this._add("keyboard",Oe),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Fs(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!!Ii(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,se){if(!Q)return;a.e(w,Q);let qe={handlerName:ee,originalEvent:Q.originalEvent||se};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,se,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,se),a.e(Q,qe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,se=ee._getTransformForUpdate(),qe=ee.terrain;if(!(Pn(w)||qe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:je,zoomDelta:it,bearingDelta:yt,pitchDelta:Ot,around:Nt,pinchAround:hr}=w;hr!==void 0&&(Nt=hr),ee._stop(!0),Nt=Nt||ee.transform.centerPoint;let Sr=se.pointLocation(je?Nt.sub(je):Nt);yt&&(se.bearing+=yt),Ot&&(se.pitch+=Ot),it&&(se.zoom+=it),qe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?se.center=se.pointLocation(se.centerPoint.sub(je)):se.setLocationAtPoint(Sr,Nt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,se.setLocationAtPoint(Sr,Nt)):se.setLocationAtPoint(Sr,Nt),ee._applyUpdatedTransform(se),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=Ii(this._eventsInProgress),se=Ii(w),qe={};for(let Nt in w){let{originalEvent:hr}=w[Nt];this._eventsInProgress[Nt]||(qe[`${Nt}start`]=hr),this._eventsInProgress[Nt]=w[Nt]}!ee&&se&&this._fireEvent("movestart",se.originalEvent);for(let Nt in qe)this._fireEvent(Nt,qe[Nt]);se&&this._fireEvent("move",se.originalEvent);for(let Nt in w){let{originalEvent:hr}=w[Nt];this._fireEvent(Nt,hr)}let je={},it;for(let Nt in this._eventsInProgress){let{handlerName:hr,originalEvent:Sr}=this._eventsInProgress[Nt];this._handlersById[hr].isActive()||(delete this._eventsInProgress[Nt],it=B[hr]||Sr,je[`${Nt}end`]=it)}for(let Nt in je)this._fireEvent(Nt,je[Nt]);let yt=Ii(this._eventsInProgress),Ot=(ee||se)&&!yt;if(Ot&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Nt=this._map._getTransformForUpdate();Nt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Nt)}if(Q&&Ot){this._updatingCamera=!0;let Nt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),hr=Sr=>Sr!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new mi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ta 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(se,Pe,Ut)),this._rotating&&(ee.bearing=a.y.number(qe,yt,Ut)),this._pitching&&(ee.pitch=a.y.number(je,Ot,Ut)),this._padding&&(ee.interpolatePadding(it,Nt,Ut),Sr=ee.centerPoint.add(hr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Ut),et)ee.setLocationAtPoint(et,Mt);else{let tr=ee.zoomScale(ee.zoom-se),mr=Pe>se?Math.min(2,He):Math.max(.5,He),Dr=Math.pow(mr,1-Ut),zr=ee.unproject(Oe.add(Je.mult(Ut*Dr)).mult(tr));ee.setLocationAtPoint(ee.renderWorldCopies?zr.wrap():zr,Sr)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},Ut=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,Ut)},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 se=Q.clone(),{center:qe,zoom:je,pitch:it,bearing:yt,elevation:Ot}=ee(se);qe&&(se.center=qe),je!==void 0&&(se.zoom=je),it!==void 0&&(se.pitch=it),yt!==void 0&&(se.bearing=yt),Ot!==void 0&&(se.elevation=Ot),Q.apply(se)}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,se=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)),se&&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 Qi=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Qi,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),se=ee.zoom,qe=ee.bearing,je=ee.pitch,it=ee.padding,yt="bearing"in w?this._normalizeBearing(w.bearing,qe):qe,Ot="pitch"in w?+w.pitch:je,Nt="padding"in w?w.padding:ee.padding,hr=a.P.convert(w.offset),Sr=ee.centerPoint.add(hr),he=ee.pointLocation(Sr),{center:be,zoom:Pe}=ee.getConstrained(a.N.convert(w.center||he),(Q=w.zoom)!==null&&Q!==void 0?Q:se);this._normalizeCenter(be,ee);let Oe=ee.zoomScale(Pe-se),Je=ee.project(he),He=ee.project(be).sub(Je),et=w.curve,Mt=Math.max(ee.width,ee.height),Rt=Mt/Oe,Ut=He.mag();if("minZoom"in w){let Qi=a.ac(Math.min(w.minZoom,se,Pe),ee.minZoom,ee.maxZoom),Mn=Mt/ee.zoomScale(Qi-se);et=Math.sqrt(Mn/Ut*2)}let tr=et*et;function mr(Qi){let Mn=(Rt*Rt-Mt*Mt+(Qi?-1:1)*tr*tr*Ut*Ut)/(2*(Qi?Rt:Mt)*tr*Ut);return Math.log(Math.sqrt(Mn*Mn+1)-Mn)}function Dr(Qi){return(Math.exp(Qi)-Math.exp(-Qi))/2}function zr(Qi){return(Math.exp(Qi)+Math.exp(-Qi))/2}let Xr=mr(!1),di=function(Qi){return zr(Xr)/zr(Xr+et*Qi)},Li=function(Qi){return Mt*((zr(Xr)*(Dr(Mn=Xr+et*Qi)/zr(Mn))-Dr(Xr))/tr)/Ut;var Mn},Ci=(mr(!0)-Xr)/et;if(Math.abs(Ut)<1e-6||!isFinite(Ci)){if(Math.abs(Mt-Rt)<1e-6)return this.easeTo(w,B);let Qi=Rt0,di=Mn=>Math.exp(Qi*et*Mn)}return w.duration="duration"in w?+w.duration:1e3*Ci/("screenSpeed"in w?+w.screenSpeed/et:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=qe!==yt,this._pitching=Ot!==je,this._padding=!ee.isPaddingEqual(Nt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(be),this._ease(Qi=>{let Mn=Qi*Ci,pa=1/di(Mn);ee.zoom=Qi===1?Pe:se+ee.scaleZoom(pa),this._rotating&&(ee.bearing=a.y.number(qe,yt,Qi)),this._pitching&&(ee.pitch=a.y.number(je,Ot,Qi)),this._padding&&(ee.interpolatePadding(it,Nt,Qi),Sr=ee.centerPoint.add(hr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Qi);let ea=Qi===1?be:ee.unproject(Je.add(He.mult(Li(Mn))).mult(pa));ee.setLocationAtPoint(ee.renderWorldCopies?ea.wrap():ea,Sr),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 Ea={compact:!0,customAttribution:'
MapLibre'};class qa{constructor(w=Ea){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 se=B[ee];if(se.used||se.usedForTerrain){let qe=se.getSource();qe.attribution&&w.indexOf(qe.attribution)<0&&w.push(qe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,se)=>ee.length-se.length),w=w.filter((ee,se)=>{for(let qe=se+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 Cn{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 sn{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 Ua=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class mo 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 Lt(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 se=w.clone();se.posMatrix=new Float64Array(16),a.aP(se.posMatrix,0,a.X,0,a.X,0,1),B[Q]=se}else if(ee.canonical.isChildOf(w.canonical)){let se=w.clone();se.posMatrix=new Float64Array(16);let qe=ee.canonical.z-w.canonical.z,je=ee.canonical.x-(ee.canonical.x>>qe<>qe<>qe;a.aP(se.posMatrix,0,yt,0,yt,0,1),a.J(se.posMatrix,se.posMatrix,[-je*yt,-it*yt,0]),B[Q]=se}else if(w.canonical.isChildOf(ee.canonical)){let se=w.clone();se.posMatrix=new Float64Array(16);let qe=w.canonical.z-ee.canonical.z,je=w.canonical.x-(w.canonical.x>>qe<>qe<>qe;a.aP(se.posMatrix,0,a.X,0,a.X,0,1),a.J(se.posMatrix,se.posMatrix,[je*yt,it*yt,0]),a.K(se.posMatrix,se.posMatrix,[1/2**qe,1/2**qe,0]),B[Q]=se}}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&&(!se||!se.dem);)se=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return se}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 mo(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 se;if(!(B>=0&&B=0&&Qw.canonical.z&&(w.canonical.z>=ee?se=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let qe=w.canonical.x-(w.canonical.x>>se<>se<>8<<4|se>>8,B[qe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new p(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,se=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),qe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(se,je-qe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let it=B[0]+(B[2]>>4<<8),yt=B[1]+((15&B[2])<<8),Ot=this.coordsIndex[255-B[3]],Nt=Ot&&this.sourceCache.getTileByID(Ot);if(!Nt)return null;let hr=this._coordsTextureSize,Sr=(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 Qo={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ys{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ts(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 se of ee){let qe=this.terrain.sourceCache.getTerrainCoords(se);for(let je in qe)this._coordsDescendingInv[Q][je]||(this._coordsDescendingInv[Q][je]=[]),this._coordsDescendingInv[Q][je].push(qe[je])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],se=ee.source;if(Qo[ee.type]&&!this._coordsDescendingInvStr[se]){this._coordsDescendingInvStr[se]={};for(let qe in this._coordsDescendingInv[se])this._coordsDescendingInvStr[se][qe]=this._coordsDescendingInv[se][qe].map(je=>je.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let se=this._coordsDescendingInvStr[ee][Q.tileID.key];se&&se!==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(Qo[B]&&(this._prevType&&Qo[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(Qo[this._prevType]||Qo[B]&&ee){this._prevType=B;let se=this._stacks.length-1,qe=this._stacks[se]||[];for(let je of this._renderableTiles){if(this.pool.isFull()&&(eu(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(je),je.rtt[se]){let yt=this.pool.getObjectForId(je.rtt[se].id);if(yt.stamp===je.rtt[se].stamp){this.pool.useObject(yt);continue}}let it=this.pool.getOrCreateFreeObject();this.pool.useObject(it),this.pool.stampObject(it),je.rtt[se]={id:it.id,stamp:it.stamp},Q.context.bindFramebuffer.set(it.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let yt=0;yt{le.touchstart=le.dragStart,le.touchmoveWindow=le.dragMove,le.touchend=le.dragEnd},ia={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ka{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(),se=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Dl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:qe,clickTolerance:je,bearingDegreesPerPixelMoved:it=.8})=>{let yt=new pf;return new Wu({clickTolerance:je,move:(Ot,Nt)=>({bearingDelta:(Nt.x-Ot.x)*it}),moveStateManager:yt,enable:qe,assignEvents:Ds})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=Ih({clickTolerance:se,enable:!0}),this.touchPitch=(({enable:qe,clickTolerance:je,pitchDegreesPerPixelMoved:it=-.5})=>{let yt=new pf;return new Wu({clickTolerance:je,move:(Ot,Nt)=>({pitchDelta:(Nt.y-Ot.y)*it}),moveStateManager:yt,enable:qe,assignEvents:Ds})})({clickTolerance:se,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:se}=this.mousePitch.dragMove(w,B)||{};se&&Q.setPitch(Q.getPitch()+se)}}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:se}=this.touchPitch.dragMove(w,B)||{};se&&Q.setPitch(Q.getPitch()+se)}}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 vs;function Ko(le,w,B){let Q=new a.N(le.lng,le.lat);if(le=new a.N(le.lng,le.lat),w){let ee=new a.N(le.lng-360,le.lat),se=new a.N(le.lng+360,le.lat),qe=B.locationPoint(le).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(le);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;le.lng>B.center.lng?le.lng-=360:le.lng+=360}return le.lng!==Q.lng&&B.locationPoint(le).y>B.height/2-B.getHorizon()?le:Q}let iu={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 Du(le,w,B){let Q=le.classList;for(let ee in iu)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class ac 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?Ko(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 se="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?se=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(se=`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,`${iu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${qe} ${se}`),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 se=c.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"stroke","none"),se.setAttributeNS(null,"stroke-width","1"),se.setAttributeNS(null,"fill","none"),se.setAttributeNS(null,"fill-rule","evenodd");let qe=c.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"fill-rule","nonzero");let je=c.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let it=[{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 Oe of it){let Je=c.createNS("http://www.w3.org/2000/svg","ellipse");Je.setAttributeNS(null,"opacity","0.04"),Je.setAttributeNS(null,"cx","10.5"),Je.setAttributeNS(null,"cy","5.80029008"),Je.setAttributeNS(null,"rx",Oe.rx),Je.setAttributeNS(null,"ry",Oe.ry),je.appendChild(Je)}let yt=c.createNS("http://www.w3.org/2000/svg","g");yt.setAttributeNS(null,"fill",this._color);let Ot=c.createNS("http://www.w3.org/2000/svg","path");Ot.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"),yt.appendChild(Ot);let Nt=c.createNS("http://www.w3.org/2000/svg","g");Nt.setAttributeNS(null,"opacity","0.25"),Nt.setAttributeNS(null,"fill","#000000");let hr=c.createNS("http://www.w3.org/2000/svg","path");hr.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"),Nt.appendChild(hr);let Sr=c.createNS("http://www.w3.org/2000/svg","g");Sr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Sr.setAttributeNS(null,"fill","#FFFFFF");let he=c.createNS("http://www.w3.org/2000/svg","g");he.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 Pe=c.createNS("http://www.w3.org/2000/svg","circle");Pe.setAttributeNS(null,"fill","#FFFFFF"),Pe.setAttributeNS(null,"cx","5.5"),Pe.setAttributeNS(null,"cy","5.5"),Pe.setAttributeNS(null,"r","5.4999962"),he.appendChild(be),he.appendChild(Pe),qe.appendChild(je),qe.appendChild(yt),qe.appendChild(Nt),qe.appendChild(Sr),qe.appendChild(he),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()}),Du(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,se=ee.terrain.depthAtPoint(this._pos),qe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,qe)-se<.006)return void(this._element.style.opacity=this._opacity);let je=-this._offset.y/ee.transform._pixelPerMeter,it=Math.sin(ee.getPitch()*Math.PI/180)*je,yt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Ot=ee.transform.lngLatToCameraDepth(this._lngLat,qe+it)-yt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Ot&&this._popup.remove(),this._element.style.opacity=Ot?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 mf={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},bu=0,Kc=!1,Ru={maxWidth:100,unit:"metric"};function Rc(le,w,B){let Q=B&&B.maxWidth||100,ee=le._container.clientHeight/2,se=le.unproject([0,ee]),qe=le.unproject([Q,ee]),je=se.distanceTo(qe);if(B&&B.unit==="imperial"){let it=3.2808*je;it>5280?Ra(w,Q,it/5280,le._getUIString("ScaleControl.Miles")):Ra(w,Q,it,le._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ra(w,Q,je/1852,le._getUIString("ScaleControl.NauticalMiles")):je>=1e3?Ra(w,Q,je/1e3,le._getUIString("ScaleControl.Kilometers")):Ra(w,Q,je,le._getUIString("ScaleControl.Meters"))}function Ra(le,w,B,Q){let ee=function(se){let qe=Math.pow(10,`${Math.floor(se)}`.length-1),je=se/qe;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(it){let yt=Math.pow(10,Math.ceil(-Math.log(it)/Math.LN10));return Math.round(it*yt)/yt}(je),qe*je}(B);le.style.width=w*(ee/B)+"px",le.innerHTML=`${ee} ${Q}`}let eo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Jc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function yc(le){if(le){if(typeof le=="number"){let w=Math.round(Math.abs(le)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,le),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-le),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(le,0),right:new a.P(-le,0)}}if(le instanceof a.P||Array.isArray(le)){let w=a.P.convert(le);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(le.center||[0,0]),top:a.P.convert(le.top||[0,0]),"top-left":a.P.convert(le["top-left"]||[0,0]),"top-right":a.P.convert(le["top-right"]||[0,0]),bottom:a.P.convert(le.bottom||[0,0]),"bottom-left":a.P.convert(le["bottom-left"]||[0,0]),"bottom-right":a.P.convert(le["bottom-right"]||[0,0]),left:a.P.convert(le.left||[0,0]),right:a.P.convert(le.right||[0,0])}}return yc(new a.P(0,0))}let _c=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=qa,i.BoxZoomHandler=xu,i.CanvasSource=Ct,i.CooperativeGesturesHandler=qi,i.DoubleClickZoomHandler=fi,i.DragPanHandler=Xi,i.DragRotateHandler=hn,i.EdgeInsets=ic,i.FullscreenControl=class extends a.E{constructor(le={}){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,le&&le.container&&(le.container instanceof HTMLElement?this._container=le.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(le){return this._map=le,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 le=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",le).setAttribute("aria-hidden","true"),le.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let le=this._getTitle();this._fullscreenButton.setAttribute("aria-label",le),this._fullscreenButton.title=le}_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=rt,i.GeolocateControl=class extends a.E{constructor(le){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(),se=a.e({bearing:ee},this.options.fitBoundsOptions),qe=ce.fromLngLat(B,Q);this._map.fitBounds(qe,se,{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&&Kc)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 ac({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ac({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({},mf,le)}onAdd(le){return this._map=le,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(vs!==void 0&&!w)return vs;if(window.navigator.permissions===void 0)return vs=!!window.navigator.geolocation,vs;try{vs=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){vs=!!window.navigator.geolocation}return vs})}().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,bu=0,Kc=!1}_isOutOfMapMaxBounds(le){let w=this._map.getMaxBounds(),B=le.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 le=this._map.getBounds(),w=le.getSouthEast(),B=le.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":bu--,Kc=!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 le;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bu++,bu>1?(le={maximumAge:6e5,timeout:0},Kc=!0):(le=this.options.positionOptions,Kc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,le)}}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=gd,i.ImageSource=Dt,i.KeyboardHandler=Bt,i.LngLatBounds=ce,i.LogoControl=Cn,i.Map=class extends Ta{constructor(le){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Gs),le);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 Qs(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new sn,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({},Bo),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=g.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(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=Qh(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 Ma(this,w),this._hash=w.hash&&new gd(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 qa(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Cn,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(le,w){if(w===void 0&&(w=le.getDefaultPosition?le.getDefaultPosition():"top-right"),!le||!le.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=le.onAdd(this);this._controls.push(le);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(le){if(!le||!le.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(le);return w>-1&&this._controls.splice(w,1),le.onRemove(this),this}hasControl(le){return this._controls.indexOf(le)>-1}calculateCameraOptionsFromTo(le,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(le,w,B,Q)}resize(le){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],se=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,se),this.painter.resize(Q,ee,se),this.painter.overLimit()){let je=this.painter.context.gl;this._maxCanvasSize=[je.drawingBufferWidth,je.drawingBufferHeight];let it=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,it),this.painter.resize(Q,ee,it)}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",le)).fire(new a.k("move",le))),this.fire(new a.k("resize",le)),qe&&this.fire(new a.k("moveend",le)),this}_getClampedPixelRatio(le,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),se=le*ee,qe=w*ee;return Math.min(se>B?B/se:1,qe>Q?Q/qe:1)*ee}getPixelRatio(){var le;return(le=this._overridePixelRatio)!==null&&le!==void 0?le:devicePixelRatio}setPixelRatio(le){this._overridePixelRatio=le,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(le){return this.transform.setMaxBounds(ce.convert(le)),this._update()}setMinZoom(le){if((le=le==null?-2:le)>=-2&&le<=this.transform.maxZoom)return this.transform.minZoom=le,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=le,this._update(),this.getZoom()>le&&this.setZoom(le),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(le){if((le=le==null?0:le)<0)throw new Error("minPitch must be greater than or equal to 0");if(le>=0&&le<=this.transform.maxPitch)return this.transform.minPitch=le,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(le>=this.transform.minPitch)return this.transform.maxPitch=le,this._update(),this.getPitch()>le&&this.setPitch(le),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(le){return this.transform.renderWorldCopies=le,this._update()}project(le){return this.transform.locationPoint(a.N.convert(le),this.style&&this.terrain)}unproject(le){return this.transform.pointLocation(a.P.convert(le),this.terrain)}isMoving(){var le;return this._moving||((le=this.handlers)===null||le===void 0?void 0:le.isMoving())}isZooming(){var le;return this._zooming||((le=this.handlers)===null||le===void 0?void 0:le.isZooming())}isRotating(){var le;return this._rotating||((le=this.handlers)===null||le===void 0?void 0:le.isRotating())}_createDelegatedListener(le,w,B){if(le==="mouseenter"||le==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:se=>{let qe=w.filter(it=>this.getLayer(it)),je=qe.length!==0?this.queryRenderedFeatures(se.point,{layers:qe}):[];je.length?Q||(Q=!0,B.call(this,new tu(le,this,se.originalEvent,{features:je}))):Q=!1},mouseout:()=>{Q=!1}}}}if(le==="mouseleave"||le==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:qe=>{let je=w.filter(it=>this.getLayer(it));(je.length!==0?this.queryRenderedFeatures(qe.point,{layers:je}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new tu(le,this,qe.originalEvent)))},mouseout:qe=>{Q&&(Q=!1,B.call(this,new tu(le,this,qe.originalEvent)))}}}}{let Q=ee=>{let se=w.filter(je=>this.getLayer(je)),qe=se.length!==0?this.queryRenderedFeatures(ee.point,{layers:se}):[];qe.length&&(ee.features=qe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[le]:Q}}}}_saveDelegatedListener(le,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[le]=this._delegatedListeners[le]||[],this._delegatedListeners[le].push(w)}_removeDelegatedListener(le,w,B){if(!this._delegatedListeners||!this._delegatedListeners[le])return;let Q=this._delegatedListeners[le];for(let ee=0;eew.includes(qe))){for(let qe in se.delegates)this.off(qe,se.delegates[qe]);return void Q.splice(ee,1)}}}on(le,w,B){if(B===void 0)return super.on(le,w);let Q=this._createDelegatedListener(le,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(le,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(le,w,B){if(B===void 0)return super.once(le,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(le,Q,B);for(let se in ee.delegates){let qe=ee.delegates[se];ee.delegates[se]=(...je)=>{this._removeDelegatedListener(le,Q,B),qe(...je)}}this._saveDelegatedListener(le,ee);for(let se in ee.delegates)this.once(se,ee.delegates[se]);return this}off(le,w,B){return B===void 0?super.off(le,w):(this._removeDelegatedListener(le,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(le,w){if(!this.style)return[];let B,Q=le instanceof a.P||Array.isArray(le),ee=Q?le:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:le)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let se=a.P.convert(ee[0]),qe=a.P.convert(ee[1]);B=[se,new a.P(qe.x,se.y),qe,new a.P(se.x,qe.y),se]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(le,w){return this.style.querySourceFeatures(le,w)}setStyle(le,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&le?(this._diffStyle(le,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(le,w))}setTransformRequest(le){return this._requestManager.setTransformRequest(le),this}_getUIString(le){let w=this._locale[le];if(w==null)throw new Error(`Missing UI string '${le}'`);return w}_updateStyle(le,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(le,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!le)),le?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof le=="string"?this.style.loadURL(le,w,B):this.style.loadJSON(le,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(le,w){if(typeof le=="string"){let B=this._requestManager.transformRequest(le,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof le=="object"&&this._updateDiff(le,w)}_updateDiff(le,w){try{this.style.setState(le,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(le,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(le,w){return this._lazyInitEmptyStyle(),this.style.addSource(le,w),this._update(!0)}isSourceLoaded(le){let w=this.style&&this.style.sourceCaches[le];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${le}'`)))}setTerrain(le){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),le){let w=this.style.sourceCaches[le.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${le.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===le.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,le),this.painter.renderToTexture=new ys(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!==le.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:le})),this}getTerrain(){var le,w;return(w=(le=this.terrain)===null||le===void 0?void 0:le.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let le=this.style&&this.style.sourceCaches;for(let w in le){let B=le[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(le){return this.style.removeSource(le),this._update(!0)}getSource(le){return this.style.getSource(le)}addImage(le,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:se,stretchY:qe,content:je,textFitWidth:it,textFitHeight:yt}=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:Ot,height:Nt,data:hr}=w,Sr=w;return this.style.addImage(le,{data:new a.R({width:Ot,height:Nt},new Uint8Array(hr)),pixelRatio:Q,stretchX:se,stretchY:qe,content:je,textFitWidth:it,textFitHeight:yt,sdf:ee,version:0,userImage:Sr}),Sr.onAdd&&Sr.onAdd(this,le),this}}{let{width:Ot,height:Nt,data:hr}=u.getImageData(w);this.style.addImage(le,{data:new a.R({width:Ot,height:Nt},hr),pixelRatio:Q,stretchX:se,stretchY:qe,content:je,textFitWidth:it,textFitHeight:yt,sdf:ee,version:0})}}updateImage(le,w){let B=this.style.getImage(le);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:se,data:qe}=Q;if(ee===void 0||se===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||se!==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 je=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(qe,je),this.style.updateImage(le,B),this}getImage(le){return this.style.getImage(le)}hasImage(le){return le?!!this.style.getImage(le):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(le){this.style.removeImage(le)}loadImage(le){return g.getImage(this._requestManager.transformRequest(le,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(le,w){return this._lazyInitEmptyStyle(),this.style.addLayer(le,w),this._update(!0)}moveLayer(le,w){return this.style.moveLayer(le,w),this._update(!0)}removeLayer(le){return this.style.removeLayer(le),this._update(!0)}getLayer(le){return this.style.getLayer(le)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(le,w,B){return this.style.setLayerZoomRange(le,w,B),this._update(!0)}setFilter(le,w,B={}){return this.style.setFilter(le,w,B),this._update(!0)}getFilter(le){return this.style.getFilter(le)}setPaintProperty(le,w,B,Q={}){return this.style.setPaintProperty(le,w,B,Q),this._update(!0)}getPaintProperty(le,w){return this.style.getPaintProperty(le,w)}setLayoutProperty(le,w,B,Q={}){return this.style.setLayoutProperty(le,w,B,Q),this._update(!0)}getLayoutProperty(le,w){return this.style.getLayoutProperty(le,w)}setGlyphs(le,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(le,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(le,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(le,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(le){return this._lazyInitEmptyStyle(),this.style.removeSprite(le),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(le,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(le,w,B=>{B||this._update(!0)}),this}setLight(le,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(le,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(le){return this._lazyInitEmptyStyle(),this.style.setSky(le),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(le,w){return this.style.setFeatureState(le,w),this._update()}removeFeatureState(le,w){return this.style.removeFeatureState(le,w),this._update()}getFeatureState(le){return this.style.getFeatureState(le)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let le=0,w=0;return this._container&&(le=this._container.clientWidth||400,w=this._container.clientHeight||300),[le,w]}_setupContainer(){let le=this._container;le.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",le);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",le),se=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(qe=>{se[qe]=c.create("div",`maplibregl-ctrl-${qe} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(le,w,B){this._canvas.width=Math.floor(B*le),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${le}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let le={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:le},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",le)||this._canvas.getContext("webgl",le);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Lc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(le){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||le,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(le){return this._update(),this._renderTaskQueue.add(le)}_cancelRenderFrame(le){this._renderTaskQueue.remove(le)}_render(le){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(le),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,se=u.now();this.style.zoomHistory.update(ee,se);let qe=new a.z(ee,{now:se,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),je=qe.crossFadingFactor();je===1&&je===this._crossFadingFactor||(B=!0,this._crossFadingFactor=je),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 le;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),g.removeThrottleControl(this._imageQueueHandle),(le=this._resizeObserver)===null||le===void 0||le.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(le=>{a.bf.frame(le),this._frameRequest=null,this._render(le)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(le){this._showTileBoundaries!==le&&(this._showTileBoundaries=le,this._update())}get showPadding(){return!!this._showPadding}set showPadding(le){this._showPadding!==le&&(this._showPadding=le,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(le){this._showCollisionBoxes!==le&&(this._showCollisionBoxes=le,le?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(le){this._showOverdrawInspector!==le&&(this._showOverdrawInspector=le,this._update())}get repaint(){return!!this._repaint}set repaint(le){this._repaint!==le&&(this._repaint=le,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(le){this._vertices=le,this._update()}get version(){return yl}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=tu,i.MapTouchEvent=vf,i.MapWheelEvent=md,i.Marker=ac,i.NavigationControl=class{constructor(le){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({},ia,le),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(le){return this._map=le,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 Ka(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(le,w){let B=c.create("button",le,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(le){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 je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}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?Ko(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,se=yc(this.options.offset);if(!ee){let je=this._container.offsetWidth,it=this._container.offsetHeight,yt;yt=Q.y+se.bottom.ythis._map.transform.height-it?["bottom"]:[],Q.xthis._map.transform.width-je/2&&yt.push("right"),ee=yt.length===0?"bottom":yt.join("-")}let qe=Q.add(se[ee]);this.options.subpixelPositioning||(qe=qe.round()),c.setTransform(this._container,`${iu[ee]} translate(${qe.x}px,${qe.y}px)`),Du(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(eo),le)}addTo(le){return this._map&&this.remove(),this._map=le,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(le){return this._lngLat=a.N.convert(le),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(le){return this.setDOMContent(document.createTextNode(le))}setHTML(le){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=le;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var le;return(le=this._container)===null||le===void 0?void 0:le.style.maxWidth}setMaxWidth(le){return this.options.maxWidth=le,this._update(),this}setDOMContent(le){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(le),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(le){return this._container&&this._container.classList.add(le),this}removeClassName(le){return this._container&&this._container.classList.remove(le),this}setOffset(le){return this.options.offset=le,this._update(),this}toggleClassName(le){if(this._container)return this._container.classList.toggle(le)}setSubpixelPositioning(le){this.options.subpixelPositioning=le}_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 le=this._container.querySelector(Jc);le&&le.focus()}},i.RasterDEMTileSource=qt,i.RasterTileSource=ct,i.ScaleControl=class{constructor(le){this._onMove=()=>{Rc(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Rc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Ru),le)}getDefaultPosition(){return"bottom-left"}onAdd(le){return this._map=le,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",le.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=Ur,i.Style=Ha,i.TerrainControl=class{constructor(le){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=le}onAdd(le){return this._map=le,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=gf,i.TwoFingersTouchRotateHandler=Yc,i.TwoFingersTouchZoomHandler=ru,i.TwoFingersTouchZoomRotateHandler=Ti,i.VectorTileSource=nt,i.VideoSource=kt,i.addSourceType=(le,w)=>a._(void 0,void 0,void 0,function*(){if(xr(le))throw new Error(`A source type called "${le}" already exists.`);((B,Q)=>{Yt[B]=Q})(le,w)}),i.clearPrewarmedResources=function(){let le=ge;le&&(le.isPreloaded()&&le.numActive()===1?(le.release(_e),ge=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return bt().getRTLTextPluginStatus()},i.getVersion=function(){return _c},i.getWorkerCount=function(){return Me.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(le){return Ae().broadcast("IS",le)},i.prewarm=function(){Te().acquire(_e)},i.setMaxParallelImageRequests=function(le){a.a.MAX_PARALLEL_IMAGE_REQUESTS=le},i.setRTLTextPlugin=function(le,w){return bt().setRTLTextPlugin(le,w)},i.setWorkerCount=function(le){Me.workerCount=le},i.setWorkerUrl=function(le){a.a.WORKER_URL=le}});var n=e;return n})});var HHe=ye((D1r,VHe)=>{"use strict";var iw=Mr(),sjt=Ll().sanitizeHTML,ljt=uJ(),BHe=bx();function NHe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=BHe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=NHe.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=i7(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,!!i7(e)){var r=ujt(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 UHe(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=ljt(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 ujt(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=sjt(e.sourceattribution)),n}VHe.exports=function(t,r,n){var i=new NHe(t,r);return i.update(n),i}});var JHe=ye((R1r,KHe)=>{"use strict";var pJ=OHe(),gJ=Mr(),WHe=ix(),GHe=ba(),cjt=Qa(),fjt=gv(),n7=Nc(),ZHe=Sg(),hjt=ZHe.drawMode,djt=ZHe.selectMode,vjt=wf().prepSelect,pjt=wf().clearOutline,gjt=wf().clearSelectionsCache,mjt=wf().selectOnClick,nw=bx(),yjt=HHe();function XHe(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 Sh=XHe.prototype;Sh.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)};Sh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=YHe(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:mJ(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(WHe.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Sh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=YHe(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(WHe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Sh.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&&mjt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&n7.click(n,l.originalEvent)}}};Sh.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=gJ.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),djt(a)||hjt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){vjt(l,u,c,t.dragOptions,a)},fjt.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))};Sh.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])};Sh.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 yJ=Mr(),xjt=k_(),bjt=Zd(),$He=Fk();QHe.exports=function(t,r,n){xjt(t,r,n,{type:"map",attributes:$He,handleDefaults:wjt,partition:"y"})};function wjt(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,bjt(e,t,{name:"layers",handleItemDefaults:Tjt}),t._input=e}function Tjt(e,t){function r(l,u){return yJ.coerce(e,t,$He.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",yJ.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"),yJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var o7=ye(l0=>{"use strict";var a7=Mr(),tGe=a7.strTranslate,Ajt=a7.strScale,Sjt=kd().getSubplotCalcData,Mjt=Zp(),Ejt=xa(),rGe=ao(),kjt=Ll(),Cjt=JHe(),wx="map";l0.name=wx;l0.attr="subplot";l0.idRoot=wx;l0.idRegex=l0.attrRegex=a7.counterRegex(wx);l0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};l0.layoutAttributes=Fk();l0.supplyLayoutDefaults=eGe();l0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[wx],a=0;ax/2){var b=f.split("|").join("
");d.text(b).attr("data-unformatted",b).call(kjt.convertToTspans,e),v=rGe.bBox(d.node())}d.attr("transform",tGe(-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 g=1;v.width+6>x&&(g=x/(v.width+6));var E=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",tGe(E[0],E[1])+Ajt(g))}};l0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[wx],n=0;n{"use strict";iGe.exports={attributes:JF(),supplyDefaults:gHe(),colorbar:Kd(),formatLabels:lJ(),calc:lz(),plot:LHe(),hoverPoints:r7().hoverPoints,eventData:RHe(),selectPoints:FHe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:o7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var oGe=ye((O1r,aGe)=>{"use strict";aGe.exports=nGe()});var _J=ye((B1r,sGe)=>{"use strict";var d1=J5(),Ljt=Kl(),Pjt=Wo().hovertemplateAttrs,Ijt=vl(),Tx=no().extendFlat;sGe.exports=Tx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Tx({},d1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:d1.text,hovertext:d1.hovertext,marker:{line:{color:Tx({},d1.marker.line.color,{editType:"plot"}),width:Tx({},d1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Tx({},d1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Tx({},d1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Tx({},d1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:d1.hoverinfo,hovertemplate:Pjt({},{keys:["properties"]}),showlegend:Tx({},Ijt.showlegend,{dflt:!1})},Ljt("",{cLetter:"z",editTypeOverride:"calc"}))});var uGe=ye((N1r,lGe)=>{"use strict";var Nk=Mr(),Djt=Uh(),Rjt=_J();lGe.exports=function(t,r,n,i){function a(c,f){return Nk.coerce(t,r,Rjt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!Nk.isArrayOrTypedArray(o)||!o.length||!Nk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||Nk.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),Djt(t,r,i,a,{prefix:"",cLetter:"z"}),Nk.coerceSelectionMarkerOpacity(r,a)}});var xJ=ye((U1r,hGe)=>{"use strict";var zjt=uo(),v1=Mr(),Fjt=Mu(),qjt=ao(),Ojt=tx().makeBlank,cGe=ix();function Bjt(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:Ojt()};if(!r)return a;var o=cGe.extractTraceFeature(e);if(!o)return a;var s=Fjt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;v1.isArrayOrTypedArray(l.opacity)&&(c=function(E){var k=E.mo;return zjt(k)?+v1.constrain(k,0,1):0});var f;v1.isArrayOrTypedArray(u.color)&&(f=function(E){return E.mlc});var h;v1.isArrayOrTypedArray(u.width)&&(h=function(E){return E.mlw});for(var d=0;d{"use strict";var vGe=xJ().convert,Njt=xJ().convertOnSelect,dGe=bx().traceLayerPrefix;function pGe(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",dGe+t+"-fill"],["line",dGe+t+"-line"]],this.below=null}var EA=pGe.prototype;EA.update=function(e){this._update(vGe(e)),e[0].trace._glTrace=this};EA.updateOnSelect=function(e){this._update(Njt(e))};EA._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])};EA.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};gGe.exports=function(t,r){var n=r[0].trace,i=new pGe(t,n.uid),a=i.sourceId,o=vGe(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 _Ge=ye((H1r,yGe)=>{"use strict";yGe.exports={attributes:_J(),supplyDefaults:uGe(),colorbar:S_(),calc:Lz(),plot:mGe(),hoverPoints:Iz(),eventData:Dz(),selectPoints:Rz(),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";xGe.exports=_Ge()});var wJ=ye((j1r,TGe)=>{"use strict";var Ujt=Kl(),Vjt=Wo().hovertemplateAttrs,wGe=vl(),s7=JF(),bJ=no().extendFlat;TGe.exports=bJ({lon:s7.lon,lat:s7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:s7.text,hovertext:s7.hovertext,hoverinfo:bJ({},wGe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:Vjt(),showlegend:bJ({},wGe.showlegend,{dflt:!1})},Ujt("",{cLetter:"z",editTypeOverride:"calc"}))});var SGe=ye((W1r,AGe)=>{"use strict";var Hjt=Mr(),Gjt=Uh(),jjt=wJ();AGe.exports=function(t,r,n,i){function a(u,c){return Hjt.coerce(t,r,jjt,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"),Gjt(t,r,i,a,{prefix:"",cLetter:"z"})}});var kGe=ye((Z1r,EGe)=>{"use strict";var TJ=uo(),Wjt=Mr().isArrayOrTypedArray,AJ=es().BADNUM,Zjt=zv(),MGe=Mr()._;EGe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=Wjt(a)&&a.length,s=0;s{"use strict";var Xjt=uo(),SJ=Mr(),CGe=va(),LGe=Mu(),PGe=es().BADNUM,Yjt=tx().makeBlank;IGe.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:Yjt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=SJ.isArrayOrTypedArray(l)&&l.length,f=SJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=LGe.extractOpts(r),g=b.reversescale?LGe.flipScale(b.colorscale):b.colorscale,E=g[0][1],k=CGe.opacity(E)<1?E:CGe.addOpacity(E,0),A=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var RGe=DGe(),Kjt=bx().traceLayerPrefix;function zGe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",Kjt+t+"-heatmap"]],this.below=null}var l7=zGe.prototype;l7.update=function(e){var t=this.subplot,r=this.layerList,n=RGe(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])};l7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};FGe.exports=function(t,r){var n=r[0].trace,i=new zGe(t,n.uid),a=i.sourceId,o=RGe(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 BGe=ye((K1r,OGe)=>{"use strict";var Jjt=Qa(),$jt=r7().hoverPoints,Qjt=r7().getExtraText;OGe.exports=function(t,r,n){var i=$jt(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=Jjt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=Qjt(s,l,o[0].t.labels),[a]}}});var UGe=ye((J1r,NGe)=>{"use strict";NGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var HGe=ye(($1r,VGe)=>{"use strict";VGe.exports={attributes:wJ(),supplyDefaults:SGe(),colorbar:S_(),formatLabels:lJ(),calc:kGe(),plot:qGe(),hoverPoints:BGe(),eventData:UGe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";GGe.exports=HGe()});var EJ=ye((t_r,YGe)=>{"use strict";var eWt=Su(),tWt=vl(),WGe=dh(),MJ=i3(),rWt=Ju().attributes,ZGe=Wo().hovertemplateAttrs,iWt=Kl(),nWt=Vs().templatedArray,aWt=Oc().descriptionOnlyNumbers,XGe=no().extendFlat,oWt=Bu().overrideAll,e_r=YGe.exports=oWt({hoverinfo:XGe({},tWt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:MJ.hoverlabel,domain:rWt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:aWt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:eWt({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:WGe.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:MJ.hoverlabel,hovertemplate:ZGe({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:WGe.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:MJ.hoverlabel,hovertemplate:ZGe({},{keys:["value","label"]}),colorscales:nWt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:XGe(iWt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var eje=ye((r_r,QGe)=>{"use strict";var kA=Mr(),u7=EJ(),sWt=va(),KGe=id(),lWt=Ju().defaults,JGe=oM(),$Ge=Vs(),uWt=Zd();QGe.exports=function(t,r,n,i){function a(A,L){return kA.coerce(t,r,u7,A,L)}var o=kA.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=$Ge.newContainer(r,"node");function u(A,L){return kA.coerce(s,l,u7.node,A,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),JGe(s,l,u,o),u("hovertemplate"),u("align");var c=i.colorway,f=function(A){return c[A%c.length]};u("color",l.label.map(function(A,L){return sWt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=$Ge.newContainer(r,"link");function v(A,L){return kA.coerce(h,d,u7.link,A,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),JGe(h,d,v,o),v("hovertemplate");var x=KGe(i.paper_bgcolor).getLuminance()<.333,b=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",g=v("color",b);function E(A){var L=KGe(A);if(!L.isValid())return A;var _=L.getAlpha();return _<=.8?L.setAlpha(_+.2):L=x?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(g)?g.map(E):E(g)),v("customdata"),uWt(h,d,{name:"colorscales",handleItemDefaults:cWt}),lWt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var k;l.x.length&&l.y.length&&(k="freeform"),a("arrangement",k),kA.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function cWt(e,t){function r(n,i){return kA.coerce(e,t,u7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var kJ=ye((i_r,tje)=>{"use strict";tje.exports=fWt;function fWt(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=E[E.length-1];var k=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=A}else{if(n[b]===r[b]){for(var _=[],C=[],M=0,A=g.length-1;A>=0;--A){var p=g[A];if(i[p]=!1,_.push(p),C.push(s[p]),M+=s[p].length,o[p]=c.length,p===b){g.length=A;break}}c.push(_);for(var P=new Array(M),A=0;A{"use strict";var hWt=kJ(),CA=Mr(),dWt=Km().wrap,Uk=CA.isArrayOrTypedArray,rje=CA.isIndex,ije=Mu();function vWt(e){var t=e.node,r=e.link,n=[],i=Uk(r.color),a=Uk(r.hovercolor),o=Uk(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 x=v+1;e.node._count=x;var b,g=e.node.groups,E={};for(c=0;c0&&rje(M,x)&&rje(p,x)&&!(E.hasOwnProperty(M)&&E.hasOwnProperty(p)&&E[M]===E[p])){E.hasOwnProperty(p)&&(p=E[p]),E.hasOwnProperty(M)&&(M=E[M]),M=+M,p=+p,s[M]=s[p]=!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:p,value:+C}),_.source.push(M),_.target.push(p)}}var F=x+g.length,q=Uk(t.color),V=Uk(t.customdata),H=[];for(c=0;cx-1,childrenNodes:[],pointNumber:c,label:X,color:q?t.color[c]:t.color,customdata:V?t.customdata[c]:t.customdata})}var G=!1;return pWt(F,_.source,_.target)&&(G=!0),{circular:G,links:n,nodes:H,groups:g,groupLookup:E}}function pWt(e,t,r){for(var n=CA.init2dArray(e,0),i=0;i1})}nje.exports=function(t,r){var n=vWt(r);return dWt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var sje=ye((c7,oje)=>{(function(e,t){typeof c7=="object"&&typeof oje!="undefined"?t(c7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(c7,function(e){"use strict";function t(C){var M=+this._x.call(null,C),p=+this._y.call(null,C);return r(this.cover(M,p),M,p,C)}function r(C,M,p,P){if(isNaN(M)||isNaN(p))return C;var T,F=C._root,q={data:P},V=C._x0,H=C._y0,X=C._x1,G=C._y1,N,W,re,ae,_e,Me,ke,ge;if(!F)return C._root=q,C;for(;F.length;)if((_e=M>=(N=(V+X)/2))?V=N:X=N,(Me=p>=(W=(H+G)/2))?H=W:G=W,T=F,!(F=F[ke=Me<<1|_e]))return T[ke]=q,C;if(re=+C._x.call(null,F.data),ae=+C._y.call(null,F.data),M===re&&p===ae)return q.next=F,T?T[ke]=q:C._root=q,C;do T=T?T[ke]=new Array(4):C._root=new Array(4),(_e=M>=(N=(V+X)/2))?V=N:X=N,(Me=p>=(W=(H+G)/2))?H=W:G=W;while((ke=Me<<1|_e)===(ge=(ae>=W)<<1|re>=N));return T[ge]=F,T[ke]=q,C}function n(C){var M,p,P=C.length,T,F,q=new Array(P),V=new Array(P),H=1/0,X=1/0,G=-1/0,N=-1/0;for(p=0;pG&&(G=T),FN&&(N=F));if(H>G||X>N)return this;for(this.cover(H,X).cover(G,N),p=0;pC||C>=T||P>M||M>=F;)switch(X=(MG||(V=ae.y0)>N||(H=ae.x1)=ke)<<1|C>=Me)&&(ae=W[W.length-1],W[W.length-1]=W[W.length-1-_e],W[W.length-1-_e]=ae)}else{var ge=C-+this._x.call(null,re.data),ie=M-+this._y.call(null,re.data),Te=ge*ge+ie*ie;if(Te=(W=(q+H)/2))?q=W:H=W,(_e=N>=(re=(V+X)/2))?V=re:X=re,M=p,!(p=p[Me=_e<<1|ae]))return this;if(!p.length)break;(M[Me+1&3]||M[Me+2&3]||M[Me+3&3])&&(P=M,ke=Me)}for(;p.data!==C;)if(T=p,!(p=p.next))return this;return(F=p.next)&&delete p.next,T?(F?T.next=F:delete T.next,this):M?(F?M[Me]=F:delete M[Me],(p=M[0]||M[1]||M[2]||M[3])&&p===(M[3]||M[2]||M[1]||M[0])&&!p.length&&(P?P[ke]=p:this._root=p),this):(this._root=F,this)}function c(C){for(var M=0,p=C.length;M{(function(e,t){typeof f7=="object"&&typeof lje!="undefined"?t(f7):typeof define=="function"&&define.amd?define(["exports"],t):t(e.d3=e.d3||{})})(f7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,b){return this[t+x]=b,this},remove:function(x){var b=t+x;return b in this&&delete this[b]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var b in this)b[0]===t&&x.push(b.slice(1));return x},values:function(){var x=[];for(var b in this)b[0]===t&&x.push(this[b]);return x},entries:function(){var x=[];for(var b in this)b[0]===t&&x.push({key:b.slice(1),value:this[b]});return x},size:function(){var x=0;for(var b in this)b[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var b in this)b[0]===t&&x(this[b],b.slice(1),this)}};function n(x,b){var g=new r;if(x instanceof r)x.each(function(_,C){g.set(C,_)});else if(Array.isArray(x)){var E=-1,k=x.length,A;if(b==null)for(;++E=x.length)return g!=null&&_.sort(g),E!=null?E(_):_;for(var P=-1,T=_.length,F=x[C++],q,V,H=n(),X,G=M();++Px.length)return _;var M,p=b[C-1];return E!=null&&C>=x.length?M=_.entries():(M=[],_.each(function(P,T){M.push({key:T,values:L(P,C)})})),p!=null?M.sort(function(P,T){return p(P.key,T.key)}):M}return k={object:function(_){return A(_,0,a,o)},map:function(_){return A(_,0,s,l)},entries:function(_){return L(A(_,0,s,l),0)},key:function(_){return x.push(_),k},sortKeys:function(_){return b[x.length-1]=_,k},sortValues:function(_){return g=_,k},rollup:function(_){return E=_,k}}}function a(){return{}}function o(x,b,g){x[b]=g}function s(){return n()}function l(x,b,g){x.set(b,g)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(x){return x+="",this[t+x]=x,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(x,b){var g=new u;if(x instanceof u)x.each(function(A){g.add(A)});else if(x){var E=-1,k=x.length;if(b==null)for(;++E{(function(e,t){typeof d7=="object"&&typeof uje!="undefined"?t(d7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(d7,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 v7=="object"&&typeof fje!="undefined"?t(v7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(v7,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=x.prototype={constructor:v,restart:function(C,M,p){if(typeof C!="function")throw new TypeError("callback is not a function");p=(p==null?h():+p)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=p,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function x(C,M,p){var P=new v;return P.restart(C,M,p),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 g(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,k(),l=0}}function E(){var C=c.now(),M=C-s;M>i&&(u-=M,s=C)}function k(){for(var C,M=a,p,P=1/0;M;)M._call?(P>M._time&&(P=M._time),C=M,M=M._next):(p=M._next,M._next=null,M=C?C._next=p:a=p);o=C,A(P)}function A(C){if(!t){r&&(r=clearTimeout(r));var M=C-l;M>24?(C<1/0&&(r=setTimeout(g,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(E,i)),t=1,f(g))}}function L(C,M,p){var P=new v;return M=M==null?0:+M,P.restart(function(T){P.stop(),C(T+M)},M,p),P}function _(C,M,p){var P=new v,T=M;return M==null?(P.restart(C,M,p),P):(M=+M,p=p==null?h():+p,P.restart(function F(q){q+=T,P.restart(F,T+=M,p),C(q)},M,p),P)}e.interval=_,e.now=h,e.timeout=L,e.timer=x,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var vje=ye((p7,dje)=>{(function(e,t){typeof p7=="object"&&typeof dje!="undefined"?t(p7,sje(),h7(),cje(),hje()):typeof define=="function"&&define.amd?define(["exports","d3-quadtree","d3-collection","d3-dispatch","d3-timer"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(p7,function(e,t,r,n,i){"use strict";function a(C,M){var p;C==null&&(C=0),M==null&&(M=0);function P(){var T,F=p.length,q,V=0,H=0;for(T=0;TN.index){var De=W-ze.x-ze.vx,ce=re-ze.y-ze.vy,Ge=De*De+ce*ce;GeW+me||Eere+me||AeH.r&&(H.r=H[X].r)}function V(){if(M){var H,X=M.length,G;for(p=new Array(X),H=0;H1?(_e==null?V.remove(ae):V.set(ae,re(_e)),M):V.get(ae)},find:function(ae,_e,Me){var ke=0,ge=C.length,ie,Te,Ee,Ae,ze;for(Me==null?Me=1/0:Me*=Me,ke=0;ke1?(X.on(ae,_e),M):X.on(ae)}}}function k(){var C,M,p,P=o(-30),T,F=1,q=1/0,V=.81;function H(W){var re,ae=C.length,_e=t.quadtree(C,v,x).visitAfter(G);for(p=W,re=0;re=q)return;(W.data!==M||W.next)&&(Me===0&&(Me=s(),ie+=Me*Me),ke===0&&(ke=s(),ie+=ke*ke),ie{(function(e,t){typeof g7=="object"&&typeof pje!="undefined"?t(g7):typeof define=="function"&&define.amd?define(["exports"],t):(e=e||self,t(e.d3=e.d3||{}))})(g7,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,x=c-l,b=h-s,g=d-l,E=b*b+g*g;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(E>n)if(!(Math.abs(g*v-x*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var k=u-h,A=c-d,L=v*v+x*x,_=k*k+A*A,C=Math.sqrt(L),M=Math.sqrt(E),p=f*Math.tan((t-Math.acos((L+E-_)/(2*C*M)))/2),P=p/M,T=p/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*g)),this._+="A"+f+","+f+",0,0,"+ +(g*k>b*A)+","+(this._x1=s+T*v)+","+(this._y1=l+T*x)}},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),x=s+d,b=l+v,g=1^h,E=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+x+","+b:(Math.abs(this._x1-x)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+x+","+b),u&&(E<0&&(E=E%r+r),E>i?this._+="A"+u+","+u+",0,1,"+g+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+g+","+(this._x1=x)+","+(this._y1=b):E>n&&(this._+="A"+u+","+u+",0,"+ +(E>=t)+","+g+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var CJ=ye((m7,mje)=>{(function(e,t){typeof m7=="object"&&typeof mje!="undefined"?t(m7,gje()):typeof define=="function"&&define.amd?define(["exports","d3-path"],t):(e=e||self,t(e.d3=e.d3||{},e.d3))})(m7,function(e,t){"use strict";function r(_t){return function(){return _t}}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(_t){return _t>1?0:_t<-1?f:Math.acos(_t)}function x(_t){return _t>=1?h:_t<=-1?-h:Math.asin(_t)}function b(_t){return _t.innerRadius}function g(_t){return _t.outerRadius}function E(_t){return _t.startAngle}function k(_t){return _t.endAngle}function A(_t){return _t&&_t.padAngle}function L(_t,br,Hr,ti,zi,Yi,an,hi){var Ji=Hr-_t,ua=ti-br,Fn=an-zi,Sa=hi-Yi,go=Sa*Ji-Fn*ua;if(!(go*go$l*$l+Gu*Gu&&(Cs=Ys,ml=Hs),{cx:Cs,cy:ml,x01:-Fn,y01:-Sa,x11:Cs*(zi/wl-1),y11:ml*(zi/wl-1)}}function C(){var _t=b,br=g,Hr=r(0),ti=null,zi=E,Yi=k,an=A,hi=null;function Ji(){var ua,Fn,Sa=+_t.apply(this,arguments),go=+br.apply(this,arguments),Oo=zi.apply(this,arguments)-h,ho=Yi.apply(this,arguments)-h,Mo=n(ho-Oo),xo=ho>Oo;if(hi||(hi=ua=t.path()),goc))hi.moveTo(0,0);else if(Mo>d-c)hi.moveTo(go*a(Oo),go*l(Oo)),hi.arc(0,0,go,Oo,ho,!xo),Sa>c&&(hi.moveTo(Sa*a(ho),Sa*l(ho)),hi.arc(0,0,Sa,ho,Oo,xo));else{var zs=Oo,ks=ho,Zs=Oo,Xs=ho,wl=Mo,os=Mo,cl=an.apply(this,arguments)/2,Cs=cl>c&&(ti?+ti.apply(this,arguments):u(Sa*Sa+go*go)),ml=s(n(go-Sa)/2,+Hr.apply(this,arguments)),Ys=ml,Hs=ml,Eo,fs;if(Cs>c){var $l=x(Cs/Sa*l(cl)),Gu=x(Cs/go*l(cl));(wl-=$l*2)>c?($l*=xo?1:-1,Zs+=$l,Xs-=$l):(wl=0,Zs=Xs=(Oo+ho)/2),(os-=Gu*2)>c?(Gu*=xo?1:-1,zs+=Gu,ks-=Gu):(os=0,zs=ks=(Oo+ho)/2)}var fc=go*a(zs),ms=go*l(zs),on=Sa*a(Xs),fa=Sa*l(Xs);if(ml>c){var Qu=go*a(ks),Il=go*l(ks),vo=Sa*a(Zs),Wl=Sa*l(Zs),Ks;if(Moc?Hs>c?(Eo=_(vo,Wl,fc,ms,go,Hs,xo),fs=_(Qu,Il,on,fa,go,Hs,xo),hi.moveTo(Eo.cx+Eo.x01,Eo.cy+Eo.y01),Hsc)||!(wl>c)?hi.lineTo(on,fa):Ys>c?(Eo=_(on,fa,Qu,Il,Sa,-Ys,xo),fs=_(fc,ms,vo,Wl,Sa,-Ys,xo),hi.lineTo(Eo.cx+Eo.x01,Eo.cy+Eo.y01),Ys=go;--Oo)hi.point(ks[Oo],Zs[Oo]);hi.lineEnd(),hi.areaEnd()}xo&&(ks[Sa]=+_t(Mo,Sa,Fn),Zs[Sa]=+Hr(Mo,Sa,Fn),hi.point(br?+br(Mo,Sa,Fn):ks[Sa],ti?+ti(Mo,Sa,Fn):Zs[Sa]))}if(zs)return hi=null,zs+""||null}function ua(){return F().defined(zi).curve(an).context(Yi)}return Ji.x=function(Fn){return arguments.length?(_t=typeof Fn=="function"?Fn:r(+Fn),br=null,Ji):_t},Ji.x0=function(Fn){return arguments.length?(_t=typeof Fn=="function"?Fn:r(+Fn),Ji):_t},Ji.x1=function(Fn){return arguments.length?(br=Fn==null?null:typeof Fn=="function"?Fn:r(+Fn),Ji):br},Ji.y=function(Fn){return arguments.length?(Hr=typeof Fn=="function"?Fn:r(+Fn),ti=null,Ji):Hr},Ji.y0=function(Fn){return arguments.length?(Hr=typeof Fn=="function"?Fn:r(+Fn),Ji):Hr},Ji.y1=function(Fn){return arguments.length?(ti=Fn==null?null:typeof Fn=="function"?Fn:r(+Fn),Ji):ti},Ji.lineX0=Ji.lineY0=function(){return ua().x(_t).y(Hr)},Ji.lineY1=function(){return ua().x(_t).y(ti)},Ji.lineX1=function(){return ua().x(br).y(Hr)},Ji.defined=function(Fn){return arguments.length?(zi=typeof Fn=="function"?Fn:r(!!Fn),Ji):zi},Ji.curve=function(Fn){return arguments.length?(an=Fn,Yi!=null&&(hi=an(Yi)),Ji):an},Ji.context=function(Fn){return arguments.length?(Fn==null?Yi=hi=null:hi=an(Yi=Fn),Ji):Yi},Ji}function V(_t,br){return br<_t?-1:br>_t?1:br>=_t?0:NaN}function H(_t){return _t}function X(){var _t=H,br=V,Hr=null,ti=r(0),zi=r(d),Yi=r(0);function an(hi){var Ji,ua=hi.length,Fn,Sa,go=0,Oo=new Array(ua),ho=new Array(ua),Mo=+ti.apply(this,arguments),xo=Math.min(d,Math.max(-d,zi.apply(this,arguments)-Mo)),zs,ks=Math.min(Math.abs(xo)/ua,Yi.apply(this,arguments)),Zs=ks*(xo<0?-1:1),Xs;for(Ji=0;Ji0&&(go+=Xs);for(br!=null?Oo.sort(function(wl,os){return br(ho[wl],ho[os])}):Hr!=null&&Oo.sort(function(wl,os){return Hr(hi[wl],hi[os])}),Ji=0,Sa=go?(xo-ua*Zs)/go:0;Ji0?Xs*Sa:0)+Zs,ho[Fn]={data:hi[Fn],index:Ji,value:Xs,startAngle:Mo,endAngle:zs,padAngle:ks};return ho}return an.value=function(hi){return arguments.length?(_t=typeof hi=="function"?hi:r(+hi),an):_t},an.sortValues=function(hi){return arguments.length?(br=hi,Hr=null,an):br},an.sort=function(hi){return arguments.length?(Hr=hi,br=null,an):Hr},an.startAngle=function(hi){return arguments.length?(ti=typeof hi=="function"?hi:r(+hi),an):ti},an.endAngle=function(hi){return arguments.length?(zi=typeof hi=="function"?hi:r(+hi),an):zi},an.padAngle=function(hi){return arguments.length?(Yi=typeof hi=="function"?hi:r(+hi),an):Yi},an}var G=W(p);function N(_t){this._curve=_t}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(_t,br){this._curve.point(br*Math.sin(_t),br*-Math.cos(_t))}};function W(_t){function br(Hr){return new N(_t(Hr))}return br._curve=_t,br}function re(_t){var br=_t.curve;return _t.angle=_t.x,delete _t.x,_t.radius=_t.y,delete _t.y,_t.curve=function(Hr){return arguments.length?br(W(Hr)):br()._curve},_t}function ae(){return re(F().curve(G))}function _e(){var _t=q().curve(G),br=_t.curve,Hr=_t.lineX0,ti=_t.lineX1,zi=_t.lineY0,Yi=_t.lineY1;return _t.angle=_t.x,delete _t.x,_t.startAngle=_t.x0,delete _t.x0,_t.endAngle=_t.x1,delete _t.x1,_t.radius=_t.y,delete _t.y,_t.innerRadius=_t.y0,delete _t.y0,_t.outerRadius=_t.y1,delete _t.y1,_t.lineStartAngle=function(){return re(Hr())},delete _t.lineX0,_t.lineEndAngle=function(){return re(ti())},delete _t.lineX1,_t.lineInnerRadius=function(){return re(zi())},delete _t.lineY0,_t.lineOuterRadius=function(){return re(Yi())},delete _t.lineY1,_t.curve=function(an){return arguments.length?br(W(an)):br()._curve},_t}function Me(_t,br){return[(br=+br)*Math.cos(_t-=Math.PI/2),br*Math.sin(_t)]}var ke=Array.prototype.slice;function ge(_t){return _t.source}function ie(_t){return _t.target}function Te(_t){var br=ge,Hr=ie,ti=P,zi=T,Yi=null;function an(){var hi,Ji=ke.call(arguments),ua=br.apply(this,Ji),Fn=Hr.apply(this,Ji);if(Yi||(Yi=hi=t.path()),_t(Yi,+ti.apply(this,(Ji[0]=ua,Ji)),+zi.apply(this,Ji),+ti.apply(this,(Ji[0]=Fn,Ji)),+zi.apply(this,Ji)),hi)return Yi=null,hi+""||null}return an.source=function(hi){return arguments.length?(br=hi,an):br},an.target=function(hi){return arguments.length?(Hr=hi,an):Hr},an.x=function(hi){return arguments.length?(ti=typeof hi=="function"?hi:r(+hi),an):ti},an.y=function(hi){return arguments.length?(zi=typeof hi=="function"?hi:r(+hi),an):zi},an.context=function(hi){return arguments.length?(Yi=hi==null?null:hi,an):Yi},an}function Ee(_t,br,Hr,ti,zi){_t.moveTo(br,Hr),_t.bezierCurveTo(br=(br+ti)/2,Hr,br,zi,ti,zi)}function Ae(_t,br,Hr,ti,zi){_t.moveTo(br,Hr),_t.bezierCurveTo(br,Hr=(Hr+zi)/2,ti,Hr,ti,zi)}function ze(_t,br,Hr,ti,zi){var Yi=Me(br,Hr),an=Me(br,Hr=(Hr+zi)/2),hi=Me(ti,Hr),Ji=Me(ti,zi);_t.moveTo(Yi[0],Yi[1]),_t.bezierCurveTo(an[0],an[1],hi[0],hi[1],Ji[0],Ji[1])}function Ce(){return Te(Ee)}function me(){return Te(Ae)}function De(){var _t=Te(ze);return _t.angle=_t.x,delete _t.x,_t.radius=_t.y,delete _t.y,_t}var ce={draw:function(_t,br){var Hr=Math.sqrt(br/f);_t.moveTo(Hr,0),_t.arc(0,0,Hr,0,d)}},Ge={draw:function(_t,br){var Hr=Math.sqrt(br/5)/2;_t.moveTo(-3*Hr,-Hr),_t.lineTo(-Hr,-Hr),_t.lineTo(-Hr,-3*Hr),_t.lineTo(Hr,-3*Hr),_t.lineTo(Hr,-Hr),_t.lineTo(3*Hr,-Hr),_t.lineTo(3*Hr,Hr),_t.lineTo(Hr,Hr),_t.lineTo(Hr,3*Hr),_t.lineTo(-Hr,3*Hr),_t.lineTo(-Hr,Hr),_t.lineTo(-3*Hr,Hr),_t.closePath()}},nt=Math.sqrt(1/3),ct=nt*2,qt={draw:function(_t,br){var Hr=Math.sqrt(br/ct),ti=Hr*nt;_t.moveTo(0,-Hr),_t.lineTo(ti,0),_t.lineTo(0,Hr),_t.lineTo(-ti,0),_t.closePath()}},rt=.8908130915292852,ot=Math.sin(f/10)/Math.sin(7*f/10),Dt=Math.sin(d/10)*ot,kt=-Math.cos(d/10)*ot,Ct={draw:function(_t,br){var Hr=Math.sqrt(br*rt),ti=Dt*Hr,zi=kt*Hr;_t.moveTo(0,-Hr),_t.lineTo(ti,zi);for(var Yi=1;Yi<5;++Yi){var an=d*Yi/5,hi=Math.cos(an),Ji=Math.sin(an);_t.lineTo(Ji*Hr,-hi*Hr),_t.lineTo(hi*ti-Ji*zi,Ji*ti+hi*zi)}_t.closePath()}},Yt={draw:function(_t,br){var Hr=Math.sqrt(br),ti=-Hr/2;_t.rect(ti,ti,Hr,Hr)}},xr=Math.sqrt(3),er={draw:function(_t,br){var Hr=-Math.sqrt(br/(xr*3));_t.moveTo(0,Hr*2),_t.lineTo(-xr*Hr,-Hr),_t.lineTo(xr*Hr,-Hr),_t.closePath()}},Ke=-.5,xt=Math.sqrt(3)/2,bt=1/Math.sqrt(12),Lt=(bt/2+1)*3,St={draw:function(_t,br){var Hr=Math.sqrt(br/Lt),ti=Hr/2,zi=Hr*bt,Yi=ti,an=Hr*bt+Hr,hi=-Yi,Ji=an;_t.moveTo(ti,zi),_t.lineTo(Yi,an),_t.lineTo(hi,Ji),_t.lineTo(Ke*ti-xt*zi,xt*ti+Ke*zi),_t.lineTo(Ke*Yi-xt*an,xt*Yi+Ke*an),_t.lineTo(Ke*hi-xt*Ji,xt*hi+Ke*Ji),_t.lineTo(Ke*ti+xt*zi,Ke*zi-xt*ti),_t.lineTo(Ke*Yi+xt*an,Ke*an-xt*Yi),_t.lineTo(Ke*hi+xt*Ji,Ke*Ji-xt*hi),_t.closePath()}},Et=[ce,Ge,qt,Yt,Ct,er,St];function dt(){var _t=r(ce),br=r(64),Hr=null;function ti(){var zi;if(Hr||(Hr=zi=t.path()),_t.apply(this,arguments).draw(Hr,+br.apply(this,arguments)),zi)return Hr=null,zi+""||null}return ti.type=function(zi){return arguments.length?(_t=typeof zi=="function"?zi:r(zi),ti):_t},ti.size=function(zi){return arguments.length?(br=typeof zi=="function"?zi:r(+zi),ti):br},ti.context=function(zi){return arguments.length?(Hr=zi==null?null:zi,ti):Hr},ti}function Ht(){}function $t(_t,br,Hr){_t._context.bezierCurveTo((2*_t._x0+_t._x1)/3,(2*_t._y0+_t._y1)/3,(_t._x0+2*_t._x1)/3,(_t._y0+2*_t._y1)/3,(_t._x0+4*_t._x1+br)/6,(_t._y0+4*_t._y1+Hr)/6)}function fr(_t){this._context=_t}fr.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:$t(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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);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:$t(this,_t,br);break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br}};function _r(_t){return new fr(_t)}function Br(_t){this._context=_t}Br.prototype={areaStart:Ht,areaEnd:Ht,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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._x2=_t,this._y2=br;break;case 1:this._point=2,this._x3=_t,this._y3=br;break;case 2:this._point=3,this._x4=_t,this._y4=br,this._context.moveTo((this._x0+4*this._x1+_t)/6,(this._y0+4*this._y1+br)/6);break;default:$t(this,_t,br);break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br}};function Or(_t){return new Br(_t)}function Nr(_t){this._context=_t}Nr.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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Hr=(this._x0+4*this._x1+_t)/6,ti=(this._y0+4*this._y1+br)/6;this._line?this._context.lineTo(Hr,ti):this._context.moveTo(Hr,ti);break;case 3:this._point=4;default:$t(this,_t,br);break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br}};function ut(_t){return new Nr(_t)}function Ne(_t,br){this._basis=new fr(_t),this._beta=br}Ne.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var _t=this._x,br=this._y,Hr=_t.length-1;if(Hr>0)for(var ti=_t[0],zi=br[0],Yi=_t[Hr]-ti,an=br[Hr]-zi,hi=-1,Ji;++hi<=Hr;)Ji=hi/Hr,this._basis.point(this._beta*_t[hi]+(1-this._beta)*(ti+Ji*Yi),this._beta*br[hi]+(1-this._beta)*(zi+Ji*an));this._x=this._y=null,this._basis.lineEnd()},point:function(_t,br){this._x.push(+_t),this._y.push(+br)}};var Ye=function _t(br){function Hr(ti){return br===1?new fr(ti):new Ne(ti,br)}return Hr.beta=function(ti){return _t(+ti)},Hr}(.85);function Ve(_t,br,Hr){_t._context.bezierCurveTo(_t._x1+_t._k*(_t._x2-_t._x0),_t._y1+_t._k*(_t._y2-_t._y0),_t._x2+_t._k*(_t._x1-br),_t._y2+_t._k*(_t._y1-Hr),_t._x2,_t._y2)}function Xe(_t,br){this._context=_t,this._k=(1-br)/6}Xe.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:Ve(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2,this._x1=_t,this._y1=br;break;case 2:this._point=3;default:Ve(this,_t,br);break}this._x0=this._x1,this._x1=this._x2,this._x2=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ht=function _t(br){function Hr(ti){return new Xe(ti,br)}return Hr.tension=function(ti){return _t(+ti)},Hr}(0);function Le(_t,br){this._context=_t,this._k=(1-br)/6}Le.prototype={areaStart:Ht,areaEnd:Ht,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(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._x3=_t,this._y3=br;break;case 1:this._point=2,this._context.moveTo(this._x4=_t,this._y4=br);break;case 2:this._point=3,this._x5=_t,this._y5=br;break;default:Ve(this,_t,br);break}this._x0=this._x1,this._x1=this._x2,this._x2=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var xe=function _t(br){function Hr(ti){return new Le(ti,br)}return Hr.tension=function(ti){return _t(+ti)},Hr}(0);function Se(_t,br){this._context=_t,this._k=(1-br)/6}Se.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(_t,br){switch(_t=+_t,br=+br,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:Ve(this,_t,br);break}this._x0=this._x1,this._x1=this._x2,this._x2=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var lt=function _t(br){function Hr(ti){return new Se(ti,br)}return Hr.tension=function(ti){return _t(+ti)},Hr}(0);function Gt(_t,br,Hr){var ti=_t._x1,zi=_t._y1,Yi=_t._x2,an=_t._y2;if(_t._l01_a>c){var hi=2*_t._l01_2a+3*_t._l01_a*_t._l12_a+_t._l12_2a,Ji=3*_t._l01_a*(_t._l01_a+_t._l12_a);ti=(ti*hi-_t._x0*_t._l12_2a+_t._x2*_t._l01_2a)/Ji,zi=(zi*hi-_t._y0*_t._l12_2a+_t._y2*_t._l01_2a)/Ji}if(_t._l23_a>c){var ua=2*_t._l23_2a+3*_t._l23_a*_t._l12_a+_t._l12_2a,Fn=3*_t._l23_a*(_t._l23_a+_t._l12_a);Yi=(Yi*ua+_t._x1*_t._l23_2a-br*_t._l12_2a)/Fn,an=(an*ua+_t._y1*_t._l23_2a-Hr*_t._l12_2a)/Fn}_t._context.bezierCurveTo(ti,zi,Yi,an,_t._x2,_t._y2)}function Vt(_t,br){this._context=_t,this._alpha=br}Vt.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(_t,br){if(_t=+_t,br=+br,this._point){var Hr=this._x2-_t,ti=this._y2-br;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+ti*ti,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2;break;case 2:this._point=3;default:Gt(this,_t,br);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=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ar=function _t(br){function Hr(ti){return br?new Vt(ti,br):new Xe(ti,0)}return Hr.alpha=function(ti){return _t(+ti)},Hr}(.5);function Qr(_t,br){this._context=_t,this._alpha=br}Qr.prototype={areaStart:Ht,areaEnd:Ht,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(_t,br){if(_t=+_t,br=+br,this._point){var Hr=this._x2-_t,ti=this._y2-br;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+ti*ti,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=_t,this._y3=br;break;case 1:this._point=2,this._context.moveTo(this._x4=_t,this._y4=br);break;case 2:this._point=3,this._x5=_t,this._y5=br;break;default:Gt(this,_t,br);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=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ai=function _t(br){function Hr(ti){return br?new Qr(ti,br):new Le(ti,0)}return Hr.alpha=function(ti){return _t(+ti)},Hr}(.5);function jr(_t,br){this._context=_t,this._alpha=br}jr.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(_t,br){if(_t=+_t,br=+br,this._point){var Hr=this._x2-_t,ti=this._y2-br;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Hr*Hr+ti*ti,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:Gt(this,_t,br);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=_t,this._y0=this._y1,this._y1=this._y2,this._y2=br}};var ri=function _t(br){function Hr(ti){return br?new jr(ti,br):new Se(ti,0)}return Hr.alpha=function(ti){return _t(+ti)},Hr}(.5);function bi(_t){this._context=_t}bi.prototype={areaStart:Ht,areaEnd:Ht,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(_t,br){_t=+_t,br=+br,this._point?this._context.lineTo(_t,br):(this._point=1,this._context.moveTo(_t,br))}};function nn(_t){return new bi(_t)}function Wi(_t){return _t<0?-1:1}function Ni(_t,br,Hr){var ti=_t._x1-_t._x0,zi=br-_t._x1,Yi=(_t._y1-_t._y0)/(ti||zi<0&&-0),an=(Hr-_t._y1)/(zi||ti<0&&-0),hi=(Yi*zi+an*ti)/(ti+zi);return(Wi(Yi)+Wi(an))*Math.min(Math.abs(Yi),Math.abs(an),.5*Math.abs(hi))||0}function _n(_t,br){var Hr=_t._x1-_t._x0;return Hr?(3*(_t._y1-_t._y0)/Hr-br)/2:br}function $i(_t,br,Hr){var ti=_t._x0,zi=_t._y0,Yi=_t._x1,an=_t._y1,hi=(Yi-ti)/3;_t._context.bezierCurveTo(ti+hi,zi+hi*br,Yi-hi,an-hi*Hr,Yi,an)}function zn(_t){this._context=_t}zn.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:$i(this,this._t0,_n(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(_t,br){var Hr=NaN;if(_t=+_t,br=+br,!(_t===this._x1&&br===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2;break;case 2:this._point=3,$i(this,_n(this,Hr=Ni(this,_t,br)),Hr);break;default:$i(this,this._t0,Hr=Ni(this,_t,br));break}this._x0=this._x1,this._x1=_t,this._y0=this._y1,this._y1=br,this._t0=Hr}}};function Wn(_t){this._context=new It(_t)}(Wn.prototype=Object.create(zn.prototype)).point=function(_t,br){zn.prototype.point.call(this,br,_t)};function It(_t){this._context=_t}It.prototype={moveTo:function(_t,br){this._context.moveTo(br,_t)},closePath:function(){this._context.closePath()},lineTo:function(_t,br){this._context.lineTo(br,_t)},bezierCurveTo:function(_t,br,Hr,ti,zi,Yi){this._context.bezierCurveTo(br,_t,ti,Hr,Yi,zi)}};function ft(_t){return new zn(_t)}function jt(_t){return new Wn(_t)}function Zt(_t){this._context=_t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var _t=this._x,br=this._y,Hr=_t.length;if(Hr)if(this._line?this._context.lineTo(_t[0],br[0]):this._context.moveTo(_t[0],br[0]),Hr===2)this._context.lineTo(_t[1],br[1]);else for(var ti=yr(_t),zi=yr(br),Yi=0,an=1;an=0;--br)zi[br]=(an[br]-zi[br+1])/Yi[br];for(Yi[Hr-1]=(_t[Hr]+zi[Hr-1])/2,br=0;br=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(_t,br){switch(_t=+_t,br=+br,this._point){case 0:this._point=1,this._line?this._context.lineTo(_t,br):this._context.moveTo(_t,br);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,br),this._context.lineTo(_t,br);else{var Hr=this._x*(1-this._t)+_t*this._t;this._context.lineTo(Hr,this._y),this._context.lineTo(Hr,br)}break}}this._x=_t,this._y=br}};function Vr(_t){return new Zr(_t,.5)}function gi(_t){return new Zr(_t,0)}function Si(_t){return new Zr(_t,1)}function Mi(_t,br){if((an=_t.length)>1)for(var Hr=1,ti,zi,Yi=_t[br[0]],an,hi=Yi.length;Hr=0;)Hr[br]=br;return Hr}function Gi(_t,br){return _t[br]}function Ki(){var _t=r([]),br=Pi,Hr=Mi,ti=Gi;function zi(Yi){var an=_t.apply(this,arguments),hi,Ji=Yi.length,ua=an.length,Fn=new Array(ua),Sa;for(hi=0;hi0){for(var Hr,ti,zi=0,Yi=_t[0].length,an;zi0)for(var Hr,ti=0,zi,Yi,an,hi,Ji,ua=_t[br[0]].length;ti0?(zi[0]=an,zi[1]=an+=Yi):Yi<0?(zi[1]=hi,zi[0]=hi+=Yi):(zi[0]=0,zi[1]=Yi)}function la(_t,br){if((zi=_t.length)>0){for(var Hr=0,ti=_t[br[0]],zi,Yi=ti.length;Hr0)||!((Yi=(zi=_t[br[0]]).length)>0))){for(var Hr=0,ti=1,zi,Yi,an;tiYi&&(Yi=zi,Hr=br);return Hr}function oa(_t){var br=_t.map(Sn);return Pi(_t).sort(function(Hr,ti){return br[Hr]-br[ti]})}function Sn(_t){for(var br=0,Hr=-1,ti=_t.length,zi;++Hr{(function(e,t){typeof y7=="object"&&typeof yje!="undefined"?t(y7,JE(),h7(),CJ()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(y7,function(e,t,r,n){"use strict";function i(p){return p.target.depth}function a(p){return p.depth}function o(p,P){return P-1-p.height}function s(p,P){return p.sourceLinks.length?p.depth:P-1}function l(p){return p.targetLinks.length?p.depth:p.sourceLinks.length?t.min(p.sourceLinks,i)-1:0}function u(p){return function(){return p}}function c(p,P){return h(p.source,P.source)||p.index-P.index}function f(p,P){return h(p.target,P.target)||p.index-P.index}function h(p,P){return p.y0-P.y0}function d(p){return p.value}function v(p){return(p.y0+p.y1)/2}function x(p){return v(p.source)*p.value}function b(p){return v(p.target)*p.value}function g(p){return p.index}function E(p){return p.nodes}function k(p){return p.links}function A(p,P){var T=p.get(P);if(!T)throw new Error("missing: "+P);return T}var L=function(){var p=0,P=0,T=1,F=1,q=24,V=8,H=g,X=s,G=E,N=k,W=32,re=2/3;function ae(){var Te={nodes:G.apply(null,arguments),links:N.apply(null,arguments)};return _e(Te),Me(Te),ke(Te),ge(Te,W),ie(Te),Te}ae.update=function(Te){return ie(Te),Te},ae.nodeId=function(Te){return arguments.length?(H=typeof Te=="function"?Te:u(Te),ae):H},ae.nodeAlign=function(Te){return arguments.length?(X=typeof Te=="function"?Te:u(Te),ae):X},ae.nodeWidth=function(Te){return arguments.length?(q=+Te,ae):q},ae.nodePadding=function(Te){return arguments.length?(V=+Te,ae):V},ae.nodes=function(Te){return arguments.length?(G=typeof Te=="function"?Te:u(Te),ae):G},ae.links=function(Te){return arguments.length?(N=typeof Te=="function"?Te:u(Te),ae):N},ae.size=function(Te){return arguments.length?(p=P=0,T=+Te[0],F=+Te[1],ae):[T-p,F-P]},ae.extent=function(Te){return arguments.length?(p=+Te[0][0],T=+Te[1][0],P=+Te[0][1],F=+Te[1][1],ae):[[p,P],[T,F]]},ae.iterations=function(Te){return arguments.length?(W=+Te,ae):W};function _e(Te){Te.nodes.forEach(function(Ae,ze){Ae.index=ze,Ae.sourceLinks=[],Ae.targetLinks=[]});var Ee=r.map(Te.nodes,H);Te.links.forEach(function(Ae,ze){Ae.index=ze;var Ce=Ae.source,me=Ae.target;typeof Ce!="object"&&(Ce=Ae.source=A(Ee,Ce)),typeof me!="object"&&(me=Ae.target=A(Ee,me)),Ce.sourceLinks.push(Ae),me.targetLinks.push(Ae)})}function Me(Te){Te.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function ke(Te){var Ee,Ae,ze;for(Ee=Te.nodes,Ae=[],ze=0;Ee.length;++ze,Ee=Ae,Ae=[])Ee.forEach(function(me){me.depth=ze,me.sourceLinks.forEach(function(De){Ae.indexOf(De.target)<0&&Ae.push(De.target)})});for(Ee=Te.nodes,Ae=[],ze=0;Ee.length;++ze,Ee=Ae,Ae=[])Ee.forEach(function(me){me.height=ze,me.targetLinks.forEach(function(De){Ae.indexOf(De.source)<0&&Ae.push(De.source)})});var Ce=(T-p-q)/(ze-1);Te.nodes.forEach(function(me){me.x1=(me.x0=p+Math.max(0,Math.min(ze-1,Math.floor(X.call(null,me,ze))))*Ce)+q})}function ge(Te){var Ee=r.nest().key(function(Ge){return Ge.x0}).sortKeys(t.ascending).entries(Te.nodes).map(function(Ge){return Ge.values});Ce(),ce();for(var Ae=1,ze=W;ze>0;--ze)De(Ae*=.99),ce(),me(Ae),ce();function Ce(){var Ge=t.max(Ee,function(qt){return qt.length}),nt=re*(F-P)/(Ge-1);V>nt&&(V=nt);var ct=t.min(Ee,function(qt){return(F-P-(qt.length-1)*V)/t.sum(qt,d)});Ee.forEach(function(qt){qt.forEach(function(rt,ot){rt.y1=(rt.y0=ot)+rt.value*ct})}),Te.links.forEach(function(qt){qt.width=qt.value*ct})}function me(Ge){Ee.forEach(function(nt){nt.forEach(function(ct){if(ct.targetLinks.length){var qt=(t.sum(ct.targetLinks,x)/t.sum(ct.targetLinks,d)-v(ct))*Ge;ct.y0+=qt,ct.y1+=qt}})})}function De(Ge){Ee.slice().reverse().forEach(function(nt){nt.forEach(function(ct){if(ct.sourceLinks.length){var qt=(t.sum(ct.sourceLinks,b)/t.sum(ct.sourceLinks,d)-v(ct))*Ge;ct.y0+=qt,ct.y1+=qt}})})}function ce(){Ee.forEach(function(Ge){var nt,ct,qt=P,rt=Ge.length,ot;for(Ge.sort(h),ot=0;ot0&&(nt.y0+=ct,nt.y1+=ct),qt=nt.y1+V;if(ct=qt-V-F,ct>0)for(qt=nt.y0-=ct,nt.y1-=ct,ot=rt-2;ot>=0;--ot)nt=Ge[ot],ct=nt.y1+V-qt,ct>0&&(nt.y0-=ct,nt.y1-=ct),qt=nt.y0})}}function ie(Te){Te.nodes.forEach(function(Ee){Ee.sourceLinks.sort(f),Ee.targetLinks.sort(c)}),Te.nodes.forEach(function(Ee){var Ae=Ee.y0,ze=Ae;Ee.sourceLinks.forEach(function(Ce){Ce.y0=Ae+Ce.width/2,Ae+=Ce.width}),Ee.targetLinks.forEach(function(Ce){Ce.y1=ze+Ce.width/2,ze+=Ce.width})})}return ae};function _(p){return[p.source.x1,p.y0]}function C(p){return[p.target.x0,p.y1]}var M=function(){return n.linkHorizontal().source(_).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 bje=ye((a_r,xje)=>{var gWt=kJ();xje.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(k){a[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(A){delete o[k][A],a[A]&&u(A)})}function c(k){var A=!1;i.push(k),a[k]=!0;var L,_;for(L=0;L=k})}function d(k){h(k);for(var A=t,L=gWt(A),_=L.components.filter(function(q){return q.length>1}),C=1/0,M,p=0;p<_.length;p++)for(var P=0;P<_[p].length;P++)_[p][P]{(function(e,t){typeof _7=="object"&&typeof wje!="undefined"?t(_7,JE(),h7(),CJ(),bje()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-collection","d3-shape","elementary-circuits-directed-graph"],t):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(_7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(rt){return rt.target.depth}function o(rt){return rt.depth}function s(rt,ot){return ot-1-rt.height}function l(rt,ot){return rt.sourceLinks.length?rt.depth:ot-1}function u(rt){return rt.targetLinks.length?rt.depth:rt.sourceLinks.length?t.min(rt.sourceLinks,a)-1:0}function c(rt){return function(){return rt}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt};function h(rt,ot){return v(rt.source,ot.source)||rt.index-ot.index}function d(rt,ot){return v(rt.target,ot.target)||rt.index-ot.index}function v(rt,ot){return rt.partOfCycle===ot.partOfCycle?rt.y0-ot.y0:rt.circularLinkType==="top"||ot.circularLinkType==="bottom"?-1:1}function x(rt){return rt.value}function b(rt){return(rt.y0+rt.y1)/2}function g(rt){return b(rt.source)}function E(rt){return b(rt.target)}function k(rt){return rt.index}function A(rt){return rt.nodes}function L(rt){return rt.links}function _(rt,ot){var Dt=rt.get(ot);if(!Dt)throw new Error("missing: "+ot);return Dt}function C(rt,ot){return ot(rt)}var M=25,p=10,P=.3;function T(){var rt=0,ot=0,Dt=1,kt=1,Ct=24,Yt,xr=k,er=l,Ke=A,xt=L,bt=32,Lt=2,St,Et=null;function dt(){var ut={nodes:Ke.apply(null,arguments),links:xt.apply(null,arguments)};Ht(ut),F(ut,xr,Et),$t(ut),Br(ut),q(ut,xr),Or(ut,bt,xr),Nr(ut);for(var Ne=4,Ye=0;Ye0?Ne+M+p:Ne,Ye=Ye>0?Ye+M+p:Ye,Ve=Ve>0?Ve+M+p:Ve,Xe=Xe>0?Xe+M+p:Xe,{top:Ne,bottom:Ye,left:Xe,right:Ve}}function _r(ut,Ne){var Ye=t.max(ut.nodes,function(lt){return lt.column}),Ve=Dt-rt,Xe=kt-ot,ht=Ve+Ne.right+Ne.left,Le=Xe+Ne.top+Ne.bottom,xe=Ve/ht,Se=Xe/Le;return rt=rt*xe+Ne.left,Dt=Ne.right==0?Dt:Dt*xe,ot=ot*Se+Ne.top,kt=kt*Se,ut.nodes.forEach(function(lt){lt.x0=rt+lt.column*((Dt-rt-Ct)/Ye),lt.x1=lt.x0+Ct}),Se}function Br(ut){var Ne,Ye,Ve;for(Ne=ut.nodes,Ye=[],Ve=0;Ne.length;++Ve,Ne=Ye,Ye=[])Ne.forEach(function(Xe){Xe.depth=Ve,Xe.sourceLinks.forEach(function(ht){Ye.indexOf(ht.target)<0&&!ht.circular&&Ye.push(ht.target)})});for(Ne=ut.nodes,Ye=[],Ve=0;Ne.length;++Ve,Ne=Ye,Ye=[])Ne.forEach(function(Xe){Xe.height=Ve,Xe.targetLinks.forEach(function(ht){Ye.indexOf(ht.source)<0&&!ht.circular&&Ye.push(ht.source)})});ut.nodes.forEach(function(Xe){Xe.column=Math.floor(er.call(null,Xe,Ve))})}function Or(ut,Ne,Ye){var Ve=r.nest().key(function(lt){return lt.column}).sortKeys(t.ascending).entries(ut.nodes).map(function(lt){return lt.values});Le(Ye),Se();for(var Xe=1,ht=Ne;ht>0;--ht)xe(Xe*=.99,Ye),Se();function Le(lt){if(St){var Gt=1/0;Ve.forEach(function(ai){var jr=kt*St/(ai.length+1);Gt=jr0))if(ai==0&&Qr==1)ri=jr.y1-jr.y0,jr.y0=kt/2-ri/2,jr.y1=kt/2+ri/2;else if(ai==Vt-1&&Qr==1)ri=jr.y1-jr.y0,jr.y0=kt/2-ri/2,jr.y1=kt/2+ri/2;else{var bi=0,nn=t.mean(jr.sourceLinks,E),Wi=t.mean(jr.targetLinks,g);nn&&Wi?bi=(nn+Wi)/2:bi=nn||Wi;var Ni=(bi-b(jr))*lt;jr.y0+=Ni,jr.y1+=Ni}})})}function Se(){Ve.forEach(function(lt){var Gt,Vt,ar=ot,Qr=lt.length,ai;for(lt.sort(v),ai=0;ai0&&(Gt.y0+=Vt,Gt.y1+=Vt),ar=Gt.y1+Yt;if(Vt=ar-Yt-kt,Vt>0)for(ar=Gt.y0-=Vt,Gt.y1-=Vt,ai=Qr-2;ai>=0;--ai)Gt=lt[ai],Vt=Gt.y1+Yt-ar,Vt>0&&(Gt.y0-=Vt,Gt.y1-=Vt),ar=Gt.y0})}}function Nr(ut){ut.nodes.forEach(function(Ne){Ne.sourceLinks.sort(d),Ne.targetLinks.sort(h)}),ut.nodes.forEach(function(Ne){var Ye=Ne.y0,Ve=Ye,Xe=Ne.y1,ht=Xe;Ne.sourceLinks.forEach(function(Le){Le.circular?(Le.y0=Xe-Le.width/2,Xe=Xe-Le.width):(Le.y0=Ye+Le.width/2,Ye+=Le.width)}),Ne.targetLinks.forEach(function(Le){Le.circular?(Le.y1=ht-Le.width/2,ht=ht-Le.width):(Le.y1=Ve+Le.width/2,Ve+=Le.width)})})}return dt}function F(rt,ot,Dt){var kt=0;if(Dt===null){for(var Ct=[],Yt=0;Ytot.source.column)}function X(rt,ot){var Dt=0;rt.sourceLinks.forEach(function(Ct){Dt=Ct.circular&&!ct(Ct,ot)?Dt+1:Dt});var kt=0;return rt.targetLinks.forEach(function(Ct){kt=Ct.circular&&!ct(Ct,ot)?kt+1:kt}),Dt+kt}function G(rt){var ot=rt.source.sourceLinks,Dt=0;ot.forEach(function(Yt){Dt=Yt.circular?Dt+1:Dt});var kt=rt.target.targetLinks,Ct=0;return kt.forEach(function(Yt){Ct=Yt.circular?Ct+1:Ct}),!(Dt>1||Ct>1)}function N(rt,ot,Dt){return rt.sort(ae),rt.forEach(function(kt,Ct){var Yt=0;if(ct(kt,Dt)&&G(kt))kt.circularPathData.verticalBuffer=Yt+kt.width/2;else{var xr=0;for(xr;xrYt?er:Yt}kt.circularPathData.verticalBuffer=Yt+kt.width/2}}),rt}function W(rt,ot,Dt,kt){var Ct=5,Yt=t.min(rt.links,function(Ke){return Ke.source.y0});rt.links.forEach(function(Ke){Ke.circular&&(Ke.circularPathData={})});var xr=rt.links.filter(function(Ke){return Ke.circularLinkType=="top"});N(xr,ot,kt);var er=rt.links.filter(function(Ke){return Ke.circularLinkType=="bottom"});N(er,ot,kt),rt.links.forEach(function(Ke){if(Ke.circular){if(Ke.circularPathData.arcRadius=Ke.width+p,Ke.circularPathData.leftNodeBuffer=Ct,Ke.circularPathData.rightNodeBuffer=Ct,Ke.circularPathData.sourceWidth=Ke.source.x1-Ke.source.x0,Ke.circularPathData.sourceX=Ke.source.x0+Ke.circularPathData.sourceWidth,Ke.circularPathData.targetX=Ke.target.x0,Ke.circularPathData.sourceY=Ke.y0,Ke.circularPathData.targetY=Ke.y1,ct(Ke,kt)&&G(Ke))Ke.circularPathData.leftSmallArcRadius=p+Ke.width/2,Ke.circularPathData.leftLargeArcRadius=p+Ke.width/2,Ke.circularPathData.rightSmallArcRadius=p+Ke.width/2,Ke.circularPathData.rightLargeArcRadius=p+Ke.width/2,Ke.circularLinkType=="bottom"?(Ke.circularPathData.verticalFullExtent=Ke.source.y1+M+Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.rightLargeArcRadius):(Ke.circularPathData.verticalFullExtent=Ke.source.y0-M-Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.rightLargeArcRadius);else{var xt=Ke.source.column,bt=Ke.circularLinkType,Lt=rt.links.filter(function(dt){return dt.source.column==xt&&dt.circularLinkType==bt});Ke.circularLinkType=="bottom"?Lt.sort(Me):Lt.sort(_e);var St=0;Lt.forEach(function(dt,Ht){dt.circularLinkID==Ke.circularLinkID&&(Ke.circularPathData.leftSmallArcRadius=p+Ke.width/2+St,Ke.circularPathData.leftLargeArcRadius=p+Ke.width/2+Ht*ot+St),St=St+dt.width}),xt=Ke.target.column,Lt=rt.links.filter(function(dt){return dt.target.column==xt&&dt.circularLinkType==bt}),Ke.circularLinkType=="bottom"?Lt.sort(ge):Lt.sort(ke),St=0,Lt.forEach(function(dt,Ht){dt.circularLinkID==Ke.circularLinkID&&(Ke.circularPathData.rightSmallArcRadius=p+Ke.width/2+St,Ke.circularPathData.rightLargeArcRadius=p+Ke.width/2+Ht*ot+St),St=St+dt.width}),Ke.circularLinkType=="bottom"?(Ke.circularPathData.verticalFullExtent=Math.max(Dt,Ke.source.y1,Ke.target.y1)+M+Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent-Ke.circularPathData.rightLargeArcRadius):(Ke.circularPathData.verticalFullExtent=Yt-M-Ke.circularPathData.verticalBuffer,Ke.circularPathData.verticalLeftInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.leftLargeArcRadius,Ke.circularPathData.verticalRightInnerExtent=Ke.circularPathData.verticalFullExtent+Ke.circularPathData.rightLargeArcRadius)}Ke.circularPathData.leftInnerExtent=Ke.circularPathData.sourceX+Ke.circularPathData.leftNodeBuffer,Ke.circularPathData.rightInnerExtent=Ke.circularPathData.targetX-Ke.circularPathData.rightNodeBuffer,Ke.circularPathData.leftFullExtent=Ke.circularPathData.sourceX+Ke.circularPathData.leftLargeArcRadius+Ke.circularPathData.leftNodeBuffer,Ke.circularPathData.rightFullExtent=Ke.circularPathData.targetX-Ke.circularPathData.rightLargeArcRadius-Ke.circularPathData.rightNodeBuffer}if(Ke.circular)Ke.path=re(Ke);else{var Et=n.linkHorizontal().source(function(dt){var Ht=dt.source.x0+(dt.source.x1-dt.source.x0),$t=dt.y0;return[Ht,$t]}).target(function(dt){var Ht=dt.target.x0,$t=dt.y1;return[Ht,$t]});Ke.path=Et(Ke)}})}function re(rt){var ot="";return rt.circularLinkType=="top"?ot="M"+rt.circularPathData.sourceX+" "+rt.circularPathData.sourceY+" L"+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.sourceY+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftSmallArcRadius+" 0 0 0 "+rt.circularPathData.leftFullExtent+" "+(rt.circularPathData.sourceY-rt.circularPathData.leftSmallArcRadius)+" L"+rt.circularPathData.leftFullExtent+" "+rt.circularPathData.verticalLeftInnerExtent+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftLargeArcRadius+" 0 0 0 "+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.verticalFullExtent+" L"+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.verticalFullExtent+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightLargeArcRadius+" 0 0 0 "+rt.circularPathData.rightFullExtent+" "+rt.circularPathData.verticalRightInnerExtent+" L"+rt.circularPathData.rightFullExtent+" "+(rt.circularPathData.targetY-rt.circularPathData.rightSmallArcRadius)+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightSmallArcRadius+" 0 0 0 "+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.targetY+" L"+rt.circularPathData.targetX+" "+rt.circularPathData.targetY:ot="M"+rt.circularPathData.sourceX+" "+rt.circularPathData.sourceY+" L"+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.sourceY+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftSmallArcRadius+" 0 0 1 "+rt.circularPathData.leftFullExtent+" "+(rt.circularPathData.sourceY+rt.circularPathData.leftSmallArcRadius)+" L"+rt.circularPathData.leftFullExtent+" "+rt.circularPathData.verticalLeftInnerExtent+" A"+rt.circularPathData.leftLargeArcRadius+" "+rt.circularPathData.leftLargeArcRadius+" 0 0 1 "+rt.circularPathData.leftInnerExtent+" "+rt.circularPathData.verticalFullExtent+" L"+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.verticalFullExtent+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightLargeArcRadius+" 0 0 1 "+rt.circularPathData.rightFullExtent+" "+rt.circularPathData.verticalRightInnerExtent+" L"+rt.circularPathData.rightFullExtent+" "+(rt.circularPathData.targetY+rt.circularPathData.rightSmallArcRadius)+" A"+rt.circularPathData.rightLargeArcRadius+" "+rt.circularPathData.rightSmallArcRadius+" 0 0 1 "+rt.circularPathData.rightInnerExtent+" "+rt.circularPathData.targetY+" L"+rt.circularPathData.targetX+" "+rt.circularPathData.targetY,ot}function ae(rt,ot){return ie(rt)==ie(ot)?rt.circularLinkType=="bottom"?Me(rt,ot):_e(rt,ot):ie(ot)-ie(rt)}function _e(rt,ot){return rt.y0-ot.y0}function Me(rt,ot){return ot.y0-rt.y0}function ke(rt,ot){return rt.y1-ot.y1}function ge(rt,ot){return ot.y1-rt.y1}function ie(rt){return rt.target.column-rt.source.column}function Te(rt){return rt.target.x0-rt.source.x1}function Ee(rt,ot){var Dt=V(rt),kt=Te(ot)/Math.tan(Dt),Ct=nt(rt)=="up"?rt.y1+kt:rt.y1-kt;return Ct}function Ae(rt,ot){var Dt=V(rt),kt=Te(ot)/Math.tan(Dt),Ct=nt(rt)=="up"?rt.y1-kt:rt.y1+kt;return Ct}function ze(rt,ot,Dt,kt){rt.links.forEach(function(Ct){if(!Ct.circular&&Ct.target.column-Ct.source.column>1){var Yt=Ct.source.column+1,xr=Ct.target.column-1,er=1,Ke=xr-Yt+1;for(er=1;Yt<=xr;Yt++,er++)rt.nodes.forEach(function(xt){if(xt.column==Yt){var bt=er/(Ke+1),Lt=Math.pow(1-bt,3),St=3*bt*Math.pow(1-bt,2),Et=3*Math.pow(bt,2)*(1-bt),dt=Math.pow(bt,3),Ht=Lt*Ct.y0+St*Ct.y0+Et*Ct.y1+dt*Ct.y1,$t=Ht-Ct.width/2,fr=Ht+Ct.width/2,_r;$t>xt.y0&&$txt.y0&&frxt.y1&&me(Br,_r,ot,Dt)})):$txt.y1&&(_r=fr-xt.y0+10,xt=me(xt,_r,ot,Dt),rt.nodes.forEach(function(Br){C(Br,kt)==C(xt,kt)||Br.column!=xt.column||Br.y0xt.y1&&me(Br,_r,ot,Dt)}))}})}})}function Ce(rt,ot){return rt.y0>ot.y0&&rt.y0ot.y0&&rt.y1ot.y1}function me(rt,ot,Dt,kt){return rt.y0+ot>=Dt&&rt.y1+ot<=kt&&(rt.y0=rt.y0+ot,rt.y1=rt.y1+ot,rt.targetLinks.forEach(function(Ct){Ct.y1=Ct.y1+ot}),rt.sourceLinks.forEach(function(Ct){Ct.y0=Ct.y0+ot})),rt}function De(rt,ot,Dt,kt){rt.nodes.forEach(function(Ct){kt&&Ct.y+(Ct.y1-Ct.y0)>ot&&(Ct.y=Ct.y-(Ct.y+(Ct.y1-Ct.y0)-ot));var Yt=rt.links.filter(function(Ke){return C(Ke.source,Dt)==C(Ct,Dt)}),xr=Yt.length;xr>1&&Yt.sort(function(Ke,xt){if(!Ke.circular&&!xt.circular){if(Ke.target.column==xt.target.column)return Ke.y1-xt.y1;if(Ge(Ke,xt)){if(Ke.target.column>xt.target.column){var bt=Ae(xt,Ke);return Ke.y1-bt}if(xt.target.column>Ke.target.column){var Lt=Ae(Ke,xt);return Lt-xt.y1}}else return Ke.y1-xt.y1}if(Ke.circular&&!xt.circular)return Ke.circularLinkType=="top"?-1:1;if(xt.circular&&!Ke.circular)return xt.circularLinkType=="top"?1:-1;if(Ke.circular&&xt.circular)return Ke.circularLinkType===xt.circularLinkType&&Ke.circularLinkType=="top"?Ke.target.column===xt.target.column?Ke.target.y1-xt.target.y1:xt.target.column-Ke.target.column:Ke.circularLinkType===xt.circularLinkType&&Ke.circularLinkType=="bottom"?Ke.target.column===xt.target.column?xt.target.y1-Ke.target.y1:Ke.target.column-xt.target.column:Ke.circularLinkType=="top"?-1:1});var er=Ct.y0;Yt.forEach(function(Ke){Ke.y0=er+Ke.width/2,er=er+Ke.width}),Yt.forEach(function(Ke,xt){if(Ke.circularLinkType=="bottom"){var bt=xt+1,Lt=0;for(bt;bt1&&Ct.sort(function(er,Ke){if(!er.circular&&!Ke.circular){if(er.source.column==Ke.source.column)return er.y0-Ke.y0;if(Ge(er,Ke)){if(Ke.source.column0?"up":"down"}function ct(rt,ot){return C(rt.source,ot)==C(rt.target,ot)}function qt(rt,ot,Dt){var kt=rt.nodes,Ct=rt.links,Yt=!1,xr=!1;if(Ct.forEach(function(St){St.circularLinkType=="top"?Yt=!0:St.circularLinkType=="bottom"&&(xr=!0)}),Yt==!1||xr==!1){var er=t.min(kt,function(St){return St.y0}),Ke=t.max(kt,function(St){return St.y1}),xt=Ke-er,bt=Dt-ot,Lt=bt/xt;kt.forEach(function(St){var Et=(St.y1-St.y0)*Lt;St.y0=(St.y0-er)*Lt,St.y1=St.y0+Et}),Ct.forEach(function(St){St.y0=(St.y0-er)*Lt,St.y1=(St.y1-er)*Lt,St.width=St.width*Lt})}}e.sankeyCircular=T,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var LJ=ye((o_r,Aje)=>{"use strict";Aje.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 qje=ye((s_r,Fje)=>{"use strict";var Sje=vje(),mWt=(D2(),ab(I2)).interpolateNumber,LA=xa(),Vk=_je(),yWt=Tje(),pu=LJ(),PA=id(),aw=va(),_Wt=ao(),p1=Mr(),DJ=p1.strTranslate,xWt=p1.strRotate,RJ=Km(),Hk=RJ.keyFun,x7=RJ.repeat,Pje=RJ.unwrap,Mje=Ll(),bWt=ba(),Ije=Nh(),wWt=Ije.CAP_SHIFT,TWt=Ije.LINE_SPACING,AWt=3;function SWt(e,t,r){var n=Pje(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:Vk.sankeyJustify,left:Vk.sankeyLeft,right:Vk.sankeyRight,center:Vk.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,x;v?x=yWt.sankeyCircular().circularLinkGap(0):x=Vk.sankey(),x.iterations(pu.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=x();x.nodePadding()=N||(G=N-X.y0,G>1e-6&&(X.y0+=G,X.y1+=G)),N=X.y1+s})}function P(V){var H=V.map(function(_e,Me){return{x0:_e.x0,index:Me}}).sort(function(_e,Me){return _e.x0-Me.x0}),X=[],G=-1,N,W=-1/0,re;for(g=0;gW+l&&(G+=1,N=ae.x0),W=ae.x0,X[G]||(X[G]=[]),X[G].push(ae),re=N-ae.x0,ae.x0+=re,ae.x1+=re}return X}if(i.node.x.length&&i.node.y.length){for(g=0;g0?"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"+(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+"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"+(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+"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 zJ(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return EWt(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=mWt(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,x="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,g=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return g+="L"+o+","+d,v+x+g+b+"Z"}return t}function kWt(e,t){var r=PA(t.color),n=pu.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:aw.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 IJ(e){e.attr("transform",function(t){return DJ(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function CWt(e){e.call(IJ)}function Dje(e,t){e.call(CWt),t.attr("d",zJ())}function Eje(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function PJ(e){return e.link.width>1||e.linkLineWidth>0}function kje(e){var t=DJ(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function Cje(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 LWt(e,t,r,n){var i=LA.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,Lje(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):PWt(e,o,a,n),IWt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=LA.event.x,s=LA.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),Lje(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),Dje(e.filter(zje(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,Rje(r,i)}})}function DWt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function Rje(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zv=xa(),qJ=Mr(),b7=qJ.numberFormat,qWt=qje(),IA=Nc(),OWt=va(),Ax=LJ().cn,Gk=qJ._;function Oje(e){return e!==""}function DA(e,t){return e.filter(function(r){return r.key===t.traceId})}function Bje(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function Nje(e){Zv.select(e).select("text.name").style("fill","black")}function Uje(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Vje(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Hje(e,t,r){t&&r&&DA(r,t).selectAll("."+Ax.sankeyLink).filter(Uje(t)).call(Gje.bind(0,t,r,!1))}function FJ(e,t,r){t&&r&&DA(r,t).selectAll("."+Ax.sankeyLink).filter(Uje(t)).call(jje.bind(0,t,r,!1))}function Gje(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!==""&&DA(t,e).selectAll("."+Ax.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&&DA(t,e).selectAll("."+Ax.sankeyNode).filter(Vje(e)).call(Hje)}function jje(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!==""&&DA(t,e).selectAll("."+Ax.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&&DA(t,e).selectAll(Ax.sankeyNode).filter(Vje(e)).call(FJ)}function lf(e,t){var r=e.hoverlabel||{},n=qJ.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}Wje.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:lf(C,"bgcolor")||OWt.addOpacity(F.color,1),borderColor:lf(C,"bordercolor"),fontFamily:lf(C,"font.family"),fontSize:lf(C,"font.size"),fontColor:lf(C,"font.color"),fontWeight:lf(C,"font.weight"),fontStyle:lf(C,"font.style"),fontVariant:lf(C,"font.variant"),fontTextcase:lf(C,"font.textcase"),fontLineposition:lf(C,"font.lineposition"),fontShadow:lf(C,"font.shadow"),nameLength:lf(C,"namelength"),textAlign:lf(C,"align"),idealAlign:Zv.event.x"),color:lf(C,"bgcolor")||_.tinyColorHue,borderColor:lf(C,"bordercolor"),fontFamily:lf(C,"font.family"),fontSize:lf(C,"font.size"),fontColor:lf(C,"font.color"),fontWeight:lf(C,"font.weight"),fontStyle:lf(C,"font.style"),fontVariant:lf(C,"font.variant"),fontTextcase:lf(C,"font.textcase"),fontLineposition:lf(C,"font.lineposition"),fontShadow:lf(C,"font.shadow"),nameLength:lf(C,"namelength"),textAlign:lf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:V,eventData:[_.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});Bje(G,.85),Nje(G)}}},A=function(L,_,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(FJ,_,C),_.node.trace.node.hoverinfo!=="skip"&&(_.node.fullData=_.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[_.node]})),IA.loneUnhover(n._hoverlayer.node()))};qWt(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:x,unhover:b,select:l},nodeEvents:{hover:E,follow:k,unhover:A,select:g}})}});var Zje=ye(ow=>{"use strict";var BWt=Bu().overrideAll,NWt=kd().getModuleCalcData,UWt=OJ(),VWt=B1(),HWt=Tg(),GWt=gv(),jWt=wf().prepSelect,BJ=Mr(),WWt=ba(),w7="sankey";ow.name=w7;ow.baseLayoutAttrOverrides=BWt({hoverlabel:VWt.hoverlabel},"plot","nested");ow.plot=function(e){var t=NWt(e.calcdata,w7)[0];UWt(e,t),ow.updateFx(e)};ow.clean=function(e,t,r,n){var i=n._has&&n._has(w7),a=t._has&&t._has(w7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};ow.updateFx=function(e){for(var t=0;t{"use strict";Xje.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";Kje.exports={attributes:EJ(),supplyDefaults:eje(),calc:aje(),plot:OJ(),moduleType:"trace",name:"sankey",basePlotModule:Zje(),selectPoints:Yje(),categories:["noOpacity"],meta:{}}});var Qje=ye((h_r,$je)=>{"use strict";$je.exports=Jje()});var tWe=ye(RA=>{"use strict";var eWe=Yu();RA.name="indicator";RA.plot=function(e,t,r,n){eWe.plotBasePlot(RA.name,e,t,r,n)};RA.clean=function(e,t,r,n){eWe.cleanBasePlot(RA.name,e,t,r,n)}});var UJ=ye((v_r,sWe)=>{"use strict";var Sx=no().extendFlat,iWe=no().extendDeep,XWt=Bu().overrideAll,nWe=Su(),aWe=dh(),YWt=Ju().attributes,Sf=Cd(),KWt=Vs().templatedArray,T7=HT(),rWe=Oc().descriptionOnlyNumbers,NJ=nWe({editType:"plot",colorEditType:"plot"}),jk={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:aWe.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"},oWe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},JWt=KWt("step",iWe({},jk,{range:oWe}));sWe.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:YWt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Sx({},NJ,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:rWe("value")},font:Sx({},NJ,{}),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:rWe("value")},increasing:{symbol:{valType:"string",dflt:T7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:T7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:T7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:T7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Sx({},NJ,{}),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:iWe({},jk,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:aWe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:XWt({range:oWe,visible:Sx({},Sf.visible,{dflt:!0}),tickmode:Sf.minor.tickmode,nticks:Sf.nticks,tick0:Sf.tick0,dtick:Sf.dtick,tickvals:Sf.tickvals,ticktext:Sf.ticktext,ticks:Sx({},Sf.ticks,{dflt:"outside"}),ticklen:Sf.ticklen,tickwidth:Sf.tickwidth,tickcolor:Sf.tickcolor,ticklabelstep:Sf.ticklabelstep,showticklabels:Sf.showticklabels,labelalias:Sf.labelalias,tickfont:nWe({}),tickangle:Sf.tickangle,tickformat:Sf.tickformat,tickformatstops:Sf.tickformatstops,tickprefix:Sf.tickprefix,showtickprefix:Sf.showtickprefix,ticksuffix:Sf.ticksuffix,showticksuffix:Sf.showticksuffix,separatethousands:Sf.separatethousands,exponentformat:Sf.exponentformat,minexponent:Sf.minexponent,showexponent:Sf.showexponent,editType:"plot"},"plot"),steps:JWt,threshold:{line:{color:Sx({},jk.line.color,{}),width:Sx({},jk.line.width,{dflt:1}),editType:"plot"},thickness:Sx({},jk.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var VJ=ye((p_r,lWe)=>{"use strict";lWe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var fWe=ye((g_r,cWe)=>{"use strict";var ey=Mr(),S7=UJ(),$Wt=Ju().defaults,uWe=Vs(),QWt=Zd(),A7=VJ(),eZt=xb(),tZt=T3(),rZt=e_(),iZt=t_();function nZt(e,t,r,n){function i(_,C){return ey.coerce(e,t,S7,_,C)}$Wt(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=ey.extendFlat({},n.font);l.size=void 0,ey.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=A7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=ey.extendFlat({},n.font);c.size=void 0,ey.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||A7.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=ey.extendFlat({},n.font);f.size=.25*(s||u||A7.defaultNumberFontSize),ey.coerceFont(i,"title.font",f),i("title.text");var h,d,v,x;function b(_,C){return ey.coerce(h,d,S7.gauge,_,C)}function g(_,C){return ey.coerce(v,x,S7.gauge.axis,_,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=uWe.newContainer(t,"gauge"),b("shape");var E=t._isBullet=t.gauge.shape==="bullet";E||i("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var A=A7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",A),QWt(h,d,{name:"steps",handleItemDefaults:aZt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),x=uWe.newContainer(d,"axis"),g("visible"),t._range=g("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};eZt(v,x,g,"linear"),iZt(v,x,g,"linear",L),rZt(v,x,g,"linear",L),tZt(v,x,g,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function aZt(e,t){function r(n,i){return ey.coerce(e,t,S7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}cWe.exports={supplyDefaults:nZt}});var dWe=ye((m_r,hWe)=>{"use strict";function oZt(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}hWe.exports={calc:oZt}});var _We=ye((y_r,yWe)=>{"use strict";var fw=xa(),sZt=(D2(),ab(I2)).interpolate,vWe=(D2(),ab(I2)).interpolateNumber,Mx=Mr(),lZt=Mx.strScale,Zk=Mx.strTranslate,uZt=Mx.rad2deg,cZt=Nh().MID_SHIFT,cw=ao(),sw=VJ(),E7=Ll(),av=Qa(),fZt=JM(),hZt=rI(),dZt=Cd(),zA=va(),HJ={left:"start",center:"middle",right:"end"},lw={left:0,center:.5,right:1},pWe=/[yzafpnµmkMGTPEZY]/;function Xk(e){return e&&e.duration>0}yWe.exports=function(t,r,n,i){var a=t._fullLayout,o;Xk(n)&&i&&(o=i()),Mx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=fw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,x={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=x.l+x.w/2,g=x.t+x.h/2,E=Math.min(x.w/2,x.h),k=sw.innerRadius*E,A,L,_,C=u.align||"center";if(L=g,!f)A=x.l+lw[C]*x.w,_=function(G){return gWe(G,x.w,x.h)};else if(h&&(A=b,L=g+E/2,_=function(G){return yZt(G,.9*k)}),d){var M=sw.bulletPadding,p=1-sw.bulletNumberDomainSize+M;A=x.l+(p+(1-p)*lw[C])*x.w,_=function(G){return gWe(G,(sw.bulletNumberDomainSize-M)*x.w,x.h)}}gZt(t,c,s,{numbersX:A,numbersY:L,numbersScaler:_,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 F=c.selectAll("g.angular").data(h?s:[]);F.exit().remove();var q=c.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&pZt(t,c,s,{radius:E,innerRadius:k,gauge:F,layer:q,size:x,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var V=c.selectAll("g.bullet").data(d?s:[]);V.exit().remove();var H=c.selectAll("g.bulletaxis").data(d?s:[]);H.exit().remove(),d&&vZt(t,c,s,{gauge:V,layer:H,size:x,gaugeBg:P,gaugeOutline:T,transitionOpts:n,onComplete:o});var X=c.selectAll("text.title").data(s);X.exit().remove(),X.enter().append("text").classed("title",!0),X.attr("text-anchor",function(){return d?HJ.right:HJ[u.title.align]}).text(u.title.text).call(cw.font,u.title.font).call(E7.convertToTspans,t),X.attr("transform",function(){var G=x.l+x.w*lw[u.title.align],N,W=sw.titlePadding,re=cw.bBox(X.node());if(f){if(h)if(u.gauge.axis.visible){var ae=cw.bBox(q.node());N=ae.top-W-re.bottom}else N=x.t+x.h/2-E/2-re.bottom-W;d&&(N=L-(re.top+re.bottom)/2,G=x.l-sw.bulletPadding*x.w)}else N=u._numbersTop-W-re.bottom;return Zk(G,N)})})};function vZt(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,x,b,g;a.enter().append("g").classed("bullet",!0),a.attr("transform",Zk(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var E=u.h,k=i.gauge.bar.thickness*E,A=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-sw.bulletNumberDomainSize:1);d=Wk(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[A,L],d.setScale(),v=av.calcTicks(d),x=av.makeTransTickFn(d),b=av.getTickSigns(d)[2],g=u.t+u.h,d.visible&&(av.drawTicks(e,d,{vals:d.ticks==="inside"?av.clipEnds(d,v):v,layer:o,path:av.makeTickPath(d,g,b),transFn:x}),av.drawLabels(e,d,{vals:v,layer:o,transFn:x,labelFns:av.makeLabelFns(d,g)}));function _(q){q.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)*E}).attr("height",function(V){return V.thickness*E})}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(_).call(uw),M.exit().remove();var p=a.selectAll("g.value-bullet").data([i.gauge.bar]);p.enter().append("g").classed("value-bullet",!0).append("rect"),p.select("rect").attr("height",k).attr("y",(E-k)/2).call(uw),Xk(f)?p.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)))):p.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),p.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*E).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*E).call(zA.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),T.exit().remove();var F=a.selectAll("g.gauge-outline").data([l]);F.enter().append("g").classed("gauge-outline",!0).append("rect"),F.select("rect").call(_).call(uw),F.exit().remove()}function pZt(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,x=Math.PI/2;function b(_e){var Me=i.gauge.axis.range[0],ke=i.gauge.axis.range[1],ge=(_e-Me)/(ke-Me)*Math.PI-x;return ge<-x?-x:ge>x?x:ge}function g(_e){return fw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-x)}function E(_e){_e.attr("d",function(Me){return g(Me.thickness).startAngle(b(Me.range[0])).endAngle(b(Me.range[1]))()})}var k,A,L,_;f.enter().append("g").classed("angular",!0),f.attr("transform",Zk(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),k=Wk(e,i.gauge.axis),k.type="linear",k.range=i.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var C=function(_e){return(k.range[0]-_e.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},M={},p=av.makeLabelFns(k,0),P=p.labelStandoff;M.xFn=function(_e){var Me=C(_e);return Math.cos(Me)*P},M.yFn=function(_e){var Me=C(_e),ke=Math.sin(Me)>0?.2:1;return-Math.sin(Me)*(P+_e.fontSize*ke)+Math.abs(Math.cos(Me))*(_e.fontSize*cZt)},M.anchorFn=function(_e){var Me=C(_e),ke=Math.cos(Me);return Math.abs(ke)<.1?"middle":ke>0?"start":"end"},M.heightFn=function(_e,Me,ke){var ge=C(_e);return-.5*(1+Math.sin(ge))*ke};var T=function(_e){return Zk(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return T(C(_e))};var F=function(_e){var Me=C(_e);return T(Me)+"rotate("+-uZt(Me)+")"};if(A=av.calcTicks(k),_=av.getTickSigns(k)[2],k.visible){_=k.ticks==="inside"?-1:1;var q=(k.linewidth||1)/2;av.drawTicks(e,k,{vals:A,layer:h,path:"M"+_*q+",0h"+_*k.ticklen,transFn:F}),av.drawLabels(e,k,{vals:A,layer:h,transFn:L,labelFns:M})}var V=[l].concat(i.gauge.steps),H=f.selectAll("g.bg-arc").data(V);H.enter().append("g").classed("bg-arc",!0).append("path"),H.select("path").call(E).call(uw),H.exit().remove();var X=g(i.gauge.bar.thickness),G=f.selectAll("g.value-arc").data([i.gauge.bar]);G.enter().append("g").classed("value-arc",!0).append("path");var N=G.select("path");Xk(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",mZt(X,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?X.endAngle(b(r[0].y)):"M0,0Z"),N.call(uw),G.exit().remove(),V=[];var W=i.gauge.threshold.value;(W||W===0)&&V.push({range:[W,W],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll("g.threshold-arc").data(V);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(E).call(uw),re.exit().remove();var ae=f.selectAll("g.gauge-outline").data([u]);ae.enter().append("g").classed("gauge-outline",!0).append("path"),ae.select("path").call(E).call(uw),ae.exit().remove()}function gZt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=HJ[s],u=n.transitionOpts,c=n.onComplete,f=Mx.ensureSingle(t,"g","numbers"),h,d,v,x=[];i._hasNumber&&x.push("number"),i._hasDelta&&(x.push("delta"),i.delta.position==="left"&&x.reverse());var b=f.selectAll("text").data(x);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 g(T,F,q,V){if(T.match("s")&&q>=0!=V>=0&&!F(q).slice(-1).match(pWe)&&!F(V).slice(-1).match(pWe)){var H=T.slice().replace("s","f").replace(/\d+/,function(G){return parseInt(G)-1}),X=Wk(e,{tickformat:H});return function(G){return Math.abs(G)<1?av.tickText(X,G).text:F(G)}}else return F}function E(){var T=Wk(e,{tickformat:i.number.valueformat},i._range);T.setScale(),av.prepTicks(T);var F=function(G){return av.tickText(T,G).text},q=i.number.suffix,V=i.number.prefix,H=f.select("text.number");function X(){var G=typeof r[0].y=="number"?V+F(r[0].y)+q:"-";H.text(G).call(cw.font,i.number.font).call(E7.convertToTspans,e)}return Xk(u)?H.transition().duration(u.duration).ease(u.easing).each("end",function(){X(),c&&c()}).each("interrupt",function(){X(),c&&c()}).attrTween("text",function(){var G=fw.select(this),N=vWe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var W=g(i.number.valueformat,F,r[0].lastY,r[0].y);return function(re){G.text(V+W(N(re))+q)}}):X(),h=mWe(V+F(r[0].y)+q,i.number.font,l,e),H}function k(){var T=Wk(e,{tickformat:i.delta.valueformat},i._range);T.setScale(),av.prepTicks(T);var F=function(re){return av.tickText(T,re).text},q=i.delta.suffix,V=i.delta.prefix,H=function(re){var ae=i.delta.relative?re.relativeDelta:re.delta;return ae},X=function(re,ae){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+V+ae(re)+q},G=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=H(r[0]));var N=f.select("text.delta");N.call(cw.font,i.delta.font).call(zA.fill,G({delta:i._deltaLastValue}));function W(){N.text(X(H(r[0]),F)).call(zA.fill,G(r[0])).call(E7.convertToTspans,e)}return Xk(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var re=fw.select(this),ae=H(r[0]),_e=i._deltaLastValue,Me=g(i.delta.valueformat,F,_e,ae),ke=vWe(_e,ae);return i._deltaLastValue=ae,function(ge){re.text(X(ke(ge),Me)),re.call(zA.fill,G({delta:ke(ge)}))}}).each("end",function(){W(),c&&c()}).each("interrupt",function(){W(),c&&c()}):W(),d=mWe(X(H(r[0]),F),i.delta.font,l,e),N}var A=i.mode+i.align,L;if(i._hasDelta&&(L=k(),A+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,A+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(E(),A+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var _=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,p,P=.75*i.delta.font.size;i.delta.position==="left"&&(M=M7(i,"deltaPos",0,-1*(h.width*lw[i.align]+d.width*(1-lw[i.align])+P),A,Math.min),p=_[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+p),bottom:Math.max(h.bottom,d.bottom+p)}),i.delta.position==="right"&&(M=M7(i,"deltaPos",0,h.width*(1-lw[i.align])+d.width*lw[i.align]+P,A,Math.max),p=_[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+p),bottom:Math.max(h.bottom,d.bottom+p)}),i.delta.position==="bottom"&&(M=null,p=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,p=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:p})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var T=n.numbersScaler(v);A+=T[2];var F=M7(i,"numbersScale",1,T[0],A,Math.min),q;i._scaleNumbers||(F=1),i._isAngular?q=o-F*v.bottom:q=o-F*(v.top+v.bottom)/2,i._numbersTop=F*v.top+q;var V=v[s];s==="center"&&(V=(v.left+v.right)/2);var H=a-F*V;return H=M7(i,"numbersTranslate",0,H,A,Math.max),Zk(H,q)+lZt(F)})}function uw(e){e.each(function(t){zA.stroke(fw.select(this),t.line.color)}).each(function(t){zA.fill(fw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function mZt(e,t,r){return function(){var n=sZt(t,r);return function(i){return e.endAngle(n(i))()}}}function Wk(e,t,r){var n=e._fullLayout,i=Mx.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 Mx.coerce(i,a,dZt,l,u)}return fZt(i,a,s,o,n),hZt(i,a,s,o),a}function gWe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function yZt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function mWe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=fw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(E7.convertToTspans,n).call(cw.font,t),cw.bBox(a.node())}function M7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=Mx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var bWe=ye((__r,xWe)=>{"use strict";xWe.exports={moduleType:"trace",name:"indicator",basePlotModule:tWe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:UJ(),supplyDefaults:fWe().supplyDefaults,calc:dWe().calc,plot:_We(),meta:{}}});var TWe=ye((x_r,wWe)=>{"use strict";wWe.exports=bWe()});var GJ=ye((w_r,EWe)=>{"use strict";var AWe=Nb(),k7=no().extendFlat,_Zt=Bu().overrideAll,SWe=Su(),xZt=Ju().attributes,MWe=Oc().descriptionOnlyNumbers,b_r=EWe.exports=_Zt({domain:xZt({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:MWe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:k7({},AWe.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:k7({},SWe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:MWe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:k7({},AWe.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:k7({},SWe({arrayOk:!0}))}},"calc","from-root")});var CWe=ye((T_r,kWe)=>{"use strict";var jJ=Mr(),bZt=GJ(),wZt=Ju().defaults;function TZt(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 AZt=Km().wrap;LWe.exports=function(){return AZt({})}});var WJ=ye((S_r,IWe)=>{"use strict";IWe.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 UWe=ye((M_r,NWe)=>{"use strict";var DWe=WJ(),XJ=no().extendFlat,SZt=uo(),MZt=vv().isTypedArray,C7=vv().isArrayOrTypedArray;NWe.exports=function(t,r){var n=ZJ(r.cells.values),i=function(p){return p.slice(r.header.values.length,p.length)},a=ZJ(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=ZJ(a));var o=a.concat(i(n).map(function(){return BWe((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}):[DWe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(RWe,0),d=u-h,v=d+DWe.uplift,x=qWe(f,v),b=qWe(c,h),g=FWe(b,[]),E=FWe(x,g),k={},A=r._fullInput.columnorder;C7(A)&&(A=Array.from(A)),A=A.concat(i(n.map(function(p,P){return P})));var L=o.map(function(p,P){var T=C7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return SZt(T)?Number(T):1}),_=L.reduce(RWe,0);L=L.map(function(p){return p/_*l});var C=Math.max(YJ(r.header.line.width),YJ(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:A,groupHeight:u,rowBlocks:E,headerRowBlocks:g,scrollY:0,cells:XJ({},r.cells,{values:n}),headerCells:XJ({},r.header,{values:o}),gdColumns:o.map(function(p){return p[0]}),gdColumnsOriginalOrder:o.map(function(p){return p[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(p,P){var T=k[p];k[p]=(T||0)+1;var F=p+"__"+k[p];return{key:F,label:p,specIndex:P,xIndex:A[P],xScale:zWe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return M.columns.forEach(function(p){p.calcdata=M,p.x=zWe(p)}),M};function YJ(e){if(C7(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=OWe(),i+=a,s=u+1,a=0);return r}function OWe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var VWe=ye(KJ=>{"use strict";var L7=no().extendFlat;KJ.splitToPanels=function(e){var t=[0,0],r=L7({},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:L7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=L7({},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=L7({},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]};KJ.splitToCells=function(e){var t=EZt(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 EZt(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 o$=ye((k_r,QWe)=>{"use strict";var Ia=WJ(),Mc=xa(),JJ=Mr(),kZt=JJ.numberFormat,gu=Km(),$J=ao(),CZt=Ll(),LZt=Mr().raiseToTop,og=Mr().strTranslate,PZt=Mr().cancelTransition,IZt=UWe(),YWe=VWe(),HWe=va();QWe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ia.cn.table).data(r.map(function(E){var k=gu.unwrap(E),A=k.trace;return IZt(t,A)}),gu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ia.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(E){return E.width+E.size.l+E.size.r}).attr("height",function(E){return E.height+E.size.t+E.size.b}).attr("transform",function(E){return og(E.translateX,E.translateY)});var a=i.selectAll("."+Ia.cn.tableControlView).data(gu.repeat,gu.keyFun),o=a.enter().append("g").classed(Ia.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(E){a.filter(function(k){return E===k}).call(Yk,t)}).on(s,function(E){if(!E.scrollbarState.wheeling){E.scrollbarState.wheeling=!0;var k=E.scrollY+Mc.event.deltaY,A=I7(t,a,null,k)(E);A||(Mc.event.stopPropagation(),Mc.event.preventDefault()),E.scrollbarState.wheeling=!1}}).call(Yk,t,!0)}a.attr("transform",function(E){return og(E.size.l,E.size.t)});var l=a.selectAll("."+Ia.cn.scrollBackground).data(gu.repeat,gu.keyFun);l.enter().append("rect").classed(Ia.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),a.each(function(E){$J.setClipUrl(Mc.select(this),GWe(t,E),t)});var u=a.selectAll("."+Ia.cn.yColumn).data(function(E){return E.columns},gu.keyFun);u.enter().append("g").classed(Ia.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(E){return og(E.x,0)}),n&&u.call(Mc.behavior.drag().origin(function(E){var k=Mc.select(this);return ZWe(k,E,-Ia.uplift),LZt(this),E.calcdata.columnDragInProgress=!0,Yk(a.filter(function(A){return E.calcdata.key===A.key}),t),E}).on("drag",function(E){var k=Mc.select(this),A=function(C){return(E===C?Mc.event.x:C.x)+C.columnWidth/2};E.x=Math.max(-Ia.overdrag,Math.min(E.calcdata.width+Ia.overdrag-E.columnWidth,Mc.event.x));var L=KWe(u).filter(function(C){return C.calcdata.key===E.calcdata.key}),_=L.sort(function(C,M){return A(C)-A(M)});_.forEach(function(C,M){C.xIndex=M,C.x=E===C?C.x:C.xScale(C)}),u.filter(function(C){return E!==C}).transition().ease(Ia.transitionEase).duration(Ia.transitionDuration).attr("transform",function(C){return og(C.x,0)}),k.call(PZt).attr("transform",og(E.x,-Ia.uplift))}).on("dragend",function(E){var k=Mc.select(this),A=E.calcdata;E.x=E.xScale(E),E.calcdata.columnDragInProgress=!1,ZWe(k,E,0),VZt(t,A,A.columns.map(function(L){return L.xIndex}))})),u.each(function(E){$J.setClipUrl(Mc.select(this),jWe(t,E),t)});var c=u.selectAll("."+Ia.cn.columnBlock).data(YWe.splitToPanels,gu.keyFun);c.enter().append("g").classed(Ia.cn.columnBlock,!0).attr("id",function(E){return E.key}),c.style("cursor",function(E){return E.dragHandle?"ew-resize":E.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(HZt),h=c.filter(i$);n&&h.call(Mc.behavior.drag().origin(function(E){return Mc.event.stopPropagation(),E}).on("drag",I7(t,a,-1)).on("dragend",function(){})),QJ(t,a,f,c),QJ(t,a,h,c);var d=a.selectAll("."+Ia.cn.scrollAreaClip).data(gu.repeat,gu.keyFun);d.enter().append("clipPath").classed(Ia.cn.scrollAreaClip,!0).attr("id",function(E){return GWe(t,E)});var v=d.selectAll("."+Ia.cn.scrollAreaClipRect).data(gu.repeat,gu.keyFun);v.enter().append("rect").classed(Ia.cn.scrollAreaClipRect,!0).attr("x",-Ia.overdrag).attr("y",-Ia.uplift).attr("fill","none"),v.attr("width",function(E){return E.width+2*Ia.overdrag}).attr("height",function(E){return E.height+Ia.uplift});var x=u.selectAll("."+Ia.cn.columnBoundary).data(gu.repeat,gu.keyFun);x.enter().append("g").classed(Ia.cn.columnBoundary,!0);var b=u.selectAll("."+Ia.cn.columnBoundaryClippath).data(gu.repeat,gu.keyFun);b.enter().append("clipPath").classed(Ia.cn.columnBoundaryClippath,!0),b.attr("id",function(E){return jWe(t,E)});var g=b.selectAll("."+Ia.cn.columnBoundaryRect).data(gu.repeat,gu.keyFun);g.enter().append("rect").classed(Ia.cn.columnBoundaryRect,!0).attr("fill","none"),g.attr("width",function(E){return E.columnWidth+2*P7(E)}).attr("height",function(E){return E.calcdata.height+2*P7(E)+Ia.uplift}).attr("x",function(E){return-P7(E)}).attr("y",function(E){return-P7(E)}),n$(null,h,a)};function P7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function GWe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function jWe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function KWe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function Yk(e,t,r){function n(u){var c=u.rowBlocks;return t$(c,c.length-1)+(c.length?D7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ia.cn.scrollbarKit).data(gu.repeat,gu.keyFun);i.enter().append("g").classed(Ia.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-e$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ia.goldenRatio*Ia.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+Ia.scrollbarWidth/2+Ia.scrollbarOffset;return og(c,e$(u))});var a=i.selectAll("."+Ia.cn.scrollbar).data(gu.repeat,gu.keyFun);a.enter().append("g").classed(Ia.cn.scrollbar,!0);var o=a.selectAll("."+Ia.cn.scrollbarSlider).data(gu.repeat,gu.keyFun);o.enter().append("g").classed(Ia.cn.scrollbarSlider,!0),o.attr("transform",function(u){return og(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ia.cn.scrollbarGlyph).data(gu.repeat,gu.keyFun);s.enter().append("line").classed(Ia.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ia.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ia.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ia.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(Ia.scrollbarHideDelay).duration(Ia.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ia.cn.scrollbarCaptureZone).data(gu.repeat,gu.keyFun);l.enter().append("line").classed(Ia.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ia.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=Mc.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=Mc.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||I7(t,e,null,v(d-h.barLength/2))(u)}).call(Mc.behavior.drag().origin(function(u){return Mc.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",I7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function QJ(e,t,r,n){var i=DZt(r),a=RZt(i);OZt(a);var o=zZt(a);NZt(o);var s=qZt(a),l=FZt(s);BZt(l),JWe(l,t,n,e),a$(a)}function DZt(e){var t=e.selectAll("."+Ia.cn.columnCells).data(gu.repeat,gu.keyFun);return t.enter().append("g").classed(Ia.cn.columnCells,!0),t.exit().remove(),t}function RZt(e){var t=e.selectAll("."+Ia.cn.columnCell).data(YWe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ia.cn.columnCell,!0),t.exit().remove(),t}function zZt(e){var t=e.selectAll("."+Ia.cn.cellRect).data(gu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ia.cn.cellRect,!0),t}function FZt(e){var t=e.selectAll("."+Ia.cn.cellText).data(gu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ia.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Mc.event.stopPropagation()}),t}function qZt(e){var t=e.selectAll("."+Ia.cn.cellTextHolder).data(gu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ia.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function OZt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Xv(n.size,i,r),color:Xv(n.color,i,r),family:Xv(n.family,i,r),weight:Xv(n.weight,i,r),style:Xv(n.style,i,r),variant:Xv(n.variant,i,r),textcase:Xv(n.textcase,i,r),lineposition:Xv(n.lineposition,i,r),shadow:Xv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Xv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Xv(t.calcdata.cells.line.width,i,r),t.font=a})}function BZt(e){e.each(function(t){$J.font(Mc.select(this),t.font)})}function NZt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Mc.select(this);HWe.stroke(r,Xv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),HWe.fill(r,Xv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function JWe(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=UZt(s);i.latex=f;var h=f?"":Xv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Xv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Xv(i.calcdata.cells.format,a,o)||null,x=h+(v?kZt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=WWe(x)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?WWe(x):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var g;if(i.wrappingNeeded){var E=Ia.wrapSplitCharacter===" "?x.replace(/i&&n.push(a),i+=l}return n}function n$(e,t,r){var n=KWe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=t$(i,i.length),s=n.calcdata.groupHeight-e$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=GZt(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=t$(c.rowBlocks,c.page)-c.scrollY;return og(0,f)}),e&&(XWe(e,r,t,u,n.prevPages,n,0),XWe(e,r,t,u,n.prevPages,n,1),Yk(r,e))}}function I7(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*Mc.event.dy:n;var c=s.selectAll("."+Ia.cn.yColumn).selectAll("."+Ia.cn.columnBlock).filter(i$);return n$(e,c,s),o.scrollY===u}}function XWe(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]});QJ(e,t,l,r),i[o]=n[o]}))}function jZt(e,t,r,n){return function(){var a=Mc.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(x,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*Ia.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ia.wrapSpacer)+Ia.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ia.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),JWe(a.select("."+Ia.cn.cellText),r,e,n),Mc.select(t.parentNode.parentNode).call(a$)}}function WZt(e,t,r,n,i){return function(){if(!i.settledY){var o=Mc.select(t.parentNode),s=r$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ia.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ia.cn.columnCell).call(a$),n$(null,e.filter(i$),0),Yk(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,x=v.getBoundingClientRect(),b=Mc.select(d.parentNode).select("."+Ia.cn.cellRect).node().getBoundingClientRect(),g=d.transform.baseVal.consolidate(),E=b.top-x.top+(g?g.matrix.f:Ia.cellPad);return og($We(i,Mc.select(d.parentNode).select("."+Ia.cn.cellTextHolder).node().getBoundingClientRect().width),E)}),i.settledY=!0}}}function $We(e,t){switch(e.align){case"left":return Ia.cellPad;case"right":return e.column.columnWidth-(t||0)-Ia.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ia.cellPad}}function a$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+D7(s,1/0)},0),n=r$(t),i=D7(n,t.key),a=i+r;return og(0,a)}).selectAll("."+Ia.cn.cellRect).attr("height",function(t){return XZt(r$(t),t.key).rowHeight})}function t$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=ZZt(e[n]);return r}function D7(e,t){for(var r=0,n=0;n{"use strict";var YZt=kd().getModuleCalcData,KZt=o$(),R7="table";z7.name=R7;z7.plot=function(e){var t=YZt(e.calcdata,R7)[0];t.length&&KZt(e,t)};z7.clean=function(e,t,r,n){var i=n._has&&n._has(R7),a=t._has&&t._has(R7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var rZe=ye((L_r,tZe)=>{"use strict";tZe.exports={attributes:GJ(),supplyDefaults:CWe(),calc:PWe(),plot:o$(),moduleType:"trace",name:"table",basePlotModule:eZe(),categories:["noOpacity"],meta:{}}});var nZe=ye((P_r,iZe)=>{"use strict";iZe.exports=rZe()});var uZe=ye((I_r,lZe)=>{"use strict";var aZe=Su(),oZe=dh(),s$=Cd(),JZt=Oc().descriptionWithDates,$Zt=Bu().overrideAll,sZe=Ed().dash,l$=no().extendFlat;lZe.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:aZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:s$.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:l$({},s$.labelalias,{editType:"calc"}),tickfont:aZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:JZt("tick label")},tickformatstops:$Zt(s$.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:oZe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:l$({},sZe,{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:l$({},sZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:oZe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var q7=ye((D_r,hZe)=>{"use strict";var QZt=Su(),cZe=uZe(),fZe=dh(),F7=QZt({editType:"calc"}),eXt=Uc().zorder;F7.family.dflt='"Open Sans", verdana, arial, sans-serif';F7.size.dflt=12;F7.color.dflt=fZe.defaultLine;hZe.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:cZe,baxis:cZe,font:F7,color:{valType:"color",dflt:fZe.defaultLine,editType:"plot"},zorder:eXt}});var pZe=ye((R_r,vZe)=>{"use strict";var dZe=Mr().isArray1D;vZe.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||dZe(i))&&(!s||dZe(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 yZe=ye((z_r,mZe)=>{"use strict";var tXt=q7(),gZe=va().addOpacity,rXt=ba(),Kk=Mr(),iXt=xb(),nXt=e_(),aXt=t_(),oXt=QP(),sXt=ym(),lXt=L3();mZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=tXt[i+"axis"];function s(p,P){return Kk.coerce(t,r,o,p,P)}function l(p,P){return Kk.coerce2(t,r,o,p,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&uXt(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=rXt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}sXt(r,n.fullLayout),r.c2p=Kk.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(Kk.coerceFont(s,"title.font",a,{overrideDflt:{size:Kk.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"),iXt(t,r,s,u),aXt(t,r,s,u,n),nXt(t,r,s,u,n),oXt(t,r,s,{data:n.data,dataAttr:i});var x=l("gridcolor",gZe(f,.3)),b=l("gridwidth"),g=l("griddash"),E=s("showgrid");E||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=l("startlinecolor",f),A=l("startlinewidth",b),L=s("startline",r.showgrid||!!k||!!A);L||(delete r.startlinecolor,delete r.startlinewidth);var _=l("endlinecolor",f),C=l("endlinewidth",b),M=s("endline",r.showgrid||!!_||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),E?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",g),s("minorgridcolor",gZe(x,.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 uXt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=lXt(t,a,{autotypenumbers:e.autotypenumbers})}}});var xZe=ye((F_r,_Ze)=>{"use strict";var cXt=yZe(),fXt=Vs();_Ze.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")),hXt(t,r,n,a)};function hXt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=fXt.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};cXt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var TZe=ye((q_r,wZe)=>{"use strict";var bZe=Mr(),dXt=pZe(),vXt=xZe(),pXt=q7(),gXt=dh();wZe.exports=function(t,r,n,i){function a(l,u){return bZe.coerce(t,r,pXt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",gXt.defaultLine);if(bZe.coerceFont(a,"font",i.font),a("carpet"),vXt(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=dXt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var u$=ye((O_r,AZe)=>{"use strict";var mXt=Mr().isArrayOrTypedArray;AZe.exports=function(t,r,n){var i;for(mXt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";SZe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";MZe.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 zZe=ye((U_r,RZe)=>{"use strict";var U7=xa(),O7=ao(),B7=u$(),LZe=c$(),Jk=EZe(),f$=Ll(),Up=Mr(),PZe=Up.strRotate,N7=Up.strTranslate,IZe=Nh();RZe.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=U7.select(this),h=c[0],d=h.trace,v=d.aaxis,x=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),g=Up.ensureSingle(f,"g","majorlayer"),E=Up.ensureSingle(f,"g","boundarylayer"),k=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),FA(o,s,g,v,"a",v._gridlines,!0,a),FA(o,s,g,x,"b",x._gridlines,!0,a),FA(o,s,b,v,"a",v._minorgridlines,!0,a),FA(o,s,b,x,"b",x._minorgridlines,!0,a),FA(o,s,E,v,"a-boundary",v._boundarylines,a),FA(o,s,E,x,"b-boundary",x._boundarylines,a);var A=kZe(t,o,s,d,h,k,v._labels,"a-label"),L=kZe(t,o,s,d,h,k,x._labels,"b-label");_Xt(t,k,d,h,o,s,A,L),yXt(d,h,u,o,s)})};function yXt(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(O7.font,f.font).text(f.text).call(f$.convertToTspans,e),g=O7.bBox(this);b.attr("transform",N7(d.p[0],d.p[1])+PZe(d.angle)+N7(f.axis.labelpadding*x,g.height*.3)),u=Math.max(u,g.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function _Xt(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),x=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,Jk(r,i,a,c,r.dxydb_rough(l,u))),CZe(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+x),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,Jk(r,i,a,c,r.dxyda_rough(l,u))),CZe(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var DZe=IZe.LINE_SPACING,xXt=(1-IZe.MID_SHIFT)/DZe+1;function CZe(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=Jk(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var x=o.title.font.size;d+=x+o.title.offset;var b=u.angle+(u.flip<0?180:0),g=(b-v.angle+450)%360,E=g>90&&g<270,k=U7.select(this);k.text(o.title.text).call(f$.convertToTspans,e),E&&(d=(-f$.lineCount(k)+xXt)*DZe*x-d),k.attr("transform",N7(v.p[0],v.p[1])+PZe(v.angle)+N7(0,d)).attr("text-anchor","middle").call(O7.font,o.title.font)}),h.exit().remove()}});var qZe=ye((V_r,FZe)=>{"use strict";var V7=Mr().isArrayOrTypedArray;FZe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=V7(e)?e.length:e,f=V7(t)?t.length:t,h=V7(e)?e:null,d=V7(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,x=1/0,b=-1/0;for(i=0;i{"use strict";var OZe=Mr().isArrayOrTypedArray;NZe.exports=function(e){return BZe(e,0)};function BZe(e,t){if(!OZe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var bXt=Qa(),Ex=no().extendFlat;VZe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,x,b,g,E=t["_"+r],k=t[r+"axis"],A=k._gridlines=[],L=k._minorgridlines=[],_=k._boundarylines=[],C=t["_"+n],M=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=E.slice());var p=t._xctrl,P=t._yctrl,T=p[0].length,F=p.length,q=t._a.length,V=t._b.length;bXt.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var H=k.smoothing?3:1;function X(N){var W,re,ae,_e,Me,ke,ge,ie,Te,Ee,Ae,ze,Ce=[],me=[],De={};if(r==="b")for(re=t.b2j(N),ae=Math.floor(Math.max(0,Math.min(V-2,re))),_e=re-ae,De.length=V,De.crossLength=q,De.xy=function(ce){return t.evalxy([],ce,re)},De.dxy=function(ce,Ge){return t.dxydi([],ce,ae,Ge,_e)},W=0;W0&&(Te=t.dxydi([],W-1,ae,0,_e),Ce.push(Me[0]+Te[0]/3),me.push(Me[1]+Te[1]/3),Ee=t.dxydi([],W-1,ae,1,_e),Ce.push(ie[0]-Ee[0]/3),me.push(ie[1]-Ee[1]/3)),Ce.push(ie[0]),me.push(ie[1]),Me=ie;else for(W=t.a2i(N),ke=Math.floor(Math.max(0,Math.min(q-2,W))),ge=W-ke,De.length=q,De.crossLength=V,De.xy=function(ce){return t.evalxy([],W,ce)},De.dxy=function(ce,Ge){return t.dxydj([],ke,ce,ge,Ge)},re=0;re0&&(Ae=t.dxydj([],ke,re-1,ge,0),Ce.push(Me[0]+Ae[0]/3),me.push(Me[1]+Ae[1]/3),ze=t.dxydj([],ke,re-1,ge,1),Ce.push(ie[0]-ze[0]/3),me.push(ie[1]-ze[1]/3)),Ce.push(ie[0]),me.push(ie[1]),Me=ie;return De.axisLetter=r,De.axis=k,De.crossAxis=M,De.value=N,De.constvar=n,De.index=f,De.x=Ce,De.y=me,De.smoothing=M.smoothing,De}function G(N){var W,re,ae,_e,Me,ke=[],ge=[],ie={};if(ie.length=E.length,ie.crossLength=C.length,r==="b")for(ae=Math.max(0,Math.min(V-2,N)),Me=Math.min(1,Math.max(0,N-ae)),ie.xy=function(Te){return t.evalxy([],Te,N)},ie.dxy=function(Te,Ee){return t.dxydi([],Te,ae,Ee,Me)},W=0;WE.length-1)&&A.push(Ex(G(a),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u;fE.length-1)&&!(v<0||v>E.length-1))for(x=E[o],b=E[v],i=0;iE[E.length-1])&&L.push(Ex(X(d),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&_.push(Ex(G(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&_.push(Ex(G(E.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((E[E.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((E[0]-k.tick0)/k.dtick/(1+s))].sort(function(N,W){return N-W}),u=l[0],c=l[1],f=u;f<=c;f++)h=k.tick0+k.dtick*f,A.push(Ex(X(h),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u-1;fE[E.length-1])&&L.push(Ex(X(d),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&_.push(Ex(X(E[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&_.push(Ex(X(E[E.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var ZZe=ye((j_r,WZe)=>{"use strict";var GZe=Qa(),jZe=no().extendFlat;WZe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";XZe.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 JZe=ye((Z_r,KZe)=>{"use strict";var wXt=Mr();KZe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(ae,_e){var Me=0,ke,ge=0;return ae>0&&(ke=t[_e][ae-1])!==void 0&&(ge++,Me+=ke),ae0&&(ke=t[_e-1][ae])!==void 0&&(ge++,Me+=ke),_e0&&a0&&iM);return wXt.log("Smoother converged to",p,"after",T,"iterations"),t}});var QZe=ye((X_r,$Ze)=>{"use strict";$Ze.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var rXe=ye((Y_r,tXe)=>{"use strict";var eXe=.5;tXe.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,eXe/2),c=Math.pow(s*s+l*l,eXe/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 nXe=ye((K_r,iXe)=>{"use strict";var h$=rXe(),H7=Mr().ensureArray;function qA(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]}iXe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,x,b,g=n[0].length,E=n.length,k=a?3*g-2:g,A=o?3*E-2:E;for(t=H7(t,A),r=H7(r,A),u=0;u{"use strict";aXe.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,x,b=Math.max(0,Math.min(Math.floor(l),a)),g=Math.max(0,Math.min(Math.floor(u),o)),E=Math.max(0,Math.min(1,l-b)),k=Math.max(0,Math.min(1,u-g));b*=3,g*=3;var A=E*E,L=A*E,_=1-E,C=_*_,M=C*_,p=k*k,P=p*k,T=1-k,F=T*T,q=F*T;for(x=0;x{"use strict";sXe.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,x=1-o,b=x*x,g=x*o*2,E=-3*b,k=3*(b-g),A=3*(g-v),L=3*v,_=s*s,C=_*s,M=1-s,p=M*M,P=p*M;for(d=0;d{"use strict";uXe.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,x=v*o,b=1-o,g=b*b,E=g*b,k=s*s,A=1-s,L=A*A,_=A*s*2,C=-3*L,M=3*(L-_),p=3*(_-k),P=3*k;for(d=0;d{"use strict";var fXe=QZe(),hXe=E6().findBin,TXt=nXe(),AXt=oXe(),SXt=lXe(),MXt=cXe();dXe.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*fXe.RELATIVE_CULL_TOLERANCE,x=d*fXe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=x,f+=x,t.isVisible=function(b,g){return b>l&&bc&&gu||gf},t.setScale=function(){var b=t._x,g=t._y,E=TXt(t._xctrl,t._yctrl,b,g,o.smoothing,s.smoothing);t._xctrl=E[0],t._yctrl=E[1],t.evalxy=AXt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=SXt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=MXt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var g=Math.max(0,Math.floor(b[0]),i-2),E=b[0]-g;return(1-E)*r[g]+E*r[g+1]},t.j2b=function(b){var g=Math.max(0,Math.floor(b[1]),i-2),E=b[1]-g;return(1-E)*n[g]+E*n[g+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var g=Math.max(0,Math.min(hXe(b,r),i-2)),E=r[g],k=r[g+1];return Math.max(0,Math.min(i-1,g+(b-E)/(k-E)))},t.b2j=function(b){var g=Math.max(0,Math.min(hXe(b,n),a-2)),E=n[g],k=n[g+1];return Math.max(0,Math.min(a-1,g+(b-E)/(k-E)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,g){return t.evalxy([],b,g)},t.ab2xy=function(b,g,E){if(!E&&(br[i-1]|gn[a-1]))return[!1,!1];var k=t.a2i(b),A=t.b2j(g),L=t.evalxy([],k,A);if(E){var _=0,C=0,M=[],p,P,T,F;br[i-1]?(p=i-2,P=1,_=(b-r[i-1])/(r[i-1]-r[i-2])):(p=Math.max(0,Math.min(i-2,Math.floor(k))),P=k-p),gn[a-1]?(T=a-2,F=1,C=(g-n[a-1])/(n[a-1]-n[a-2])):(T=Math.max(0,Math.min(a-2,Math.floor(A))),F=A-T),_&&(t.dxydi(M,p,T,P,F),L[0]+=M[0]*_,L[1]+=M[1]*_),C&&(t.dxydj(M,p,T,P,F),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,g,E){return[g.c2p(b[0]),E.c2p(b[1])]},t.p2x=function(b,g,E){return[g.p2c(b[0]),E.p2c(b[1])]},t.dadi=function(b){var g=Math.max(0,Math.min(r.length-2,b));return r[g+1]-r[g]},t.dbdj=function(b){var g=Math.max(0,Math.min(n.length-2,b));return n[g+1]-n[g]},t.dxyda=function(b,g,E,k){var A=t.dxydi(null,b,g,E,k),L=t.dadi(b,E);return[A[0]/L,A[1]/L]},t.dxydb=function(b,g,E,k){var A=t.dxydj(null,b,g,E,k),L=t.dbdj(g,k);return[A[0]/L,A[1]/L]},t.dxyda_rough=function(b,g,E){var k=h*(E||.1),A=t.ab2xy(b+k,g,!0),L=t.ab2xy(b-k,g,!0);return[(A[0]-L[0])*.5/k,(A[1]-L[1])*.5/k]},t.dxydb_rough=function(b,g,E){var k=d*(E||.1),A=t.ab2xy(b,g+k,!0),L=t.ab2xy(b,g-k,!0);return[(A[0]-L[0])*.5/k,(A[1]-L[1])*.5/k]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var wXe=ye((txr,bXe)=>{"use strict";var G7=Qa(),pXe=Mr().isArray1D,EXt=qZe(),gXe=UZe(),mXe=HZe(),yXe=ZZe(),kXt=YZe(),_Xe=$I(),xXe=JZe(),CXt=KI(),LXt=vXe();bXe.exports=function(t,r){var n=G7.getFromId(t,r.xaxis),i=G7.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&pXe(s)&&u.push("x"),l&&pXe(l)&&u.push("y"),u.length&&CXt(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=EXt(d,v,r.cheaterslope)}r._x=s=_Xe(s),r._y=l=_Xe(l),xXe(s,c,f),xXe(l,c,f),LXt(r),r.setScale();var x=gXe(s),b=gXe(l),g=.5*(x[1]-x[0]),E=.5*(x[1]+x[0]),k=.5*(b[1]-b[0]),A=.5*(b[1]+b[0]),L=1.3;return x=[E-g*L,E+g*L],b=[A-k*L,A+k*L],r._extremes[n._id]=G7.findExtremes(n,x,{padded:!0}),r._extremes[i._id]=G7.findExtremes(i,b,{padded:!0}),mXe(r,"a","b"),mXe(r,"b","a"),yXe(r,a),yXe(r,o),h.clipsegments=kXt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var AXe=ye((rxr,TXe)=>{"use strict";TXe.exports={attributes:q7(),supplyDefaults:TZe(),plot:zZe(),calc:wXe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Jf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var MXe=ye((ixr,SXe)=>{"use strict";SXe.exports=AXe()});var d$=ye((nxr,kXe)=>{"use strict";var PXt=Eg(),u0=Uc(),IXt=vl(),DXt=Wo().hovertemplateAttrs,RXt=Wo().texttemplateAttrs,EXe=Kl(),kx=no().extendFlat,sg=u0.marker,OA=u0.line,zXt=sg.line;kXe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:kx({},u0.mode,{dflt:"markers"}),text:kx({},u0.text,{}),texttemplate:RXt({editType:"plot"},{keys:["a","b","text"]}),hovertext:kx({},u0.hovertext,{}),line:{color:OA.color,width:OA.width,dash:OA.dash,backoff:OA.backoff,shape:kx({},OA.shape,{values:["linear","spline"]}),smoothing:OA.smoothing,editType:"calc"},connectgaps:u0.connectgaps,fill:kx({},u0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:PXt(),marker:kx({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:kx({width:zXt.width,editType:"calc"},EXe("marker.line")),gradient:sg.gradient,editType:"calc"},EXe("marker")),textfont:u0.textfont,textposition:u0.textposition,selected:u0.selected,unselected:u0.unselected,hoverinfo:kx({},IXt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:u0.hoveron,hovertemplate:DXt(),zorder:u0.zorder}});var IXe=ye((axr,PXe)=>{"use strict";var CXe=Mr(),FXt=Sm(),BA=lu(),qXt=$p(),OXt=D0(),LXe=J3(),BXt=R0(),NXt=Ig(),UXt=d$();PXe.exports=function(t,r,n,i){function a(h,d){return CXe.coerce(t,r,UXt,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("hovertext");var u=l{"use strict";DXe.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 j7=ye((sxr,zXe)=>{"use strict";zXe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var FXe=uo(),VXt=z0(),HXt=km(),GXt=F0(),jXt=q0().calcMarkerSize,WXt=j7();qXe.exports=function(t,r){var n=r._carpetTrace=WXt(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 ZXt=iT(),BXe=Qa(),XXt=ao();NXe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=BXe.getFromId(t,l.xaxis||"x"),c=BXe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var YXt=sT(),KXt=Mr().fillText;VXe.exports=function(t,r,n,i){var a=YXt(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 x=[];function b(k,A){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,x.push(L+": "+A.toFixed(3)+k.labelsuffix)}if(!h.hovertemplate){var g=f.hi||h.hoverinfo,E=g.split("+");E.indexOf("all")!==-1&&(E=["a","b","text"]),E.indexOf("a")!==-1&&b(d.aaxis,f.a),E.indexOf("b")!==-1&&b(d.baxis,f.b),x.push("y: "+o.yLabel),E.indexOf("text")!==-1&&KXt(f,h,x),o.extraText=x.join("
")}return a}});var jXe=ye((fxr,GXe)=>{"use strict";GXe.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 ZXe=ye((hxr,WXe)=>{"use strict";WXe.exports={attributes:d$(),supplyDefaults:IXe(),colorbar:Kd(),formatLabels:RXe(),calc:OXe(),plot:UXe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:HXe(),selectPoints:lT(),eventData:jXe(),moduleType:"trace",name:"scattercarpet",basePlotModule:Jf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var YXe=ye((dxr,XXe)=>{"use strict";XXe.exports=ZXe()});var v$=ye((vxr,KXe)=>{"use strict";var lg=ET(),g1=T4(),JXt=Kl(),$Xt=no().extendFlat,ty=g1.contours;KXe.exports=$Xt({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:ty.type,start:ty.start,end:ty.end,size:ty.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:ty.showlines,showlabels:ty.showlabels,labelfont:ty.labelfont,labelformat:ty.labelformat,operation:ty.operation,value:ty.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},JXt("",{cLetter:"z",autoColorDflt:!1}))});var p$=ye((pxr,QXe)=>{"use strict";var JXe=Mr(),QXt=ZI(),$Xe=v$(),eYt=yH(),tYt=m8(),rYt=y8();QXe.exports=function(t,r,n,i){function a(u,c){return JXe.coerce(t,r,$Xe,u,c)}function o(u){return JXe.coerce2(t,r,$Xe,u)}if(a("carpet"),t.a&&t.b){var s=QXt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?eYt(t,r,a,i,n,{hasHover:!1}):(tYt(t,r,a,o),rYt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var iYe=ye((gxr,rYe)=>{"use strict";var iYt=zv(),eYe=Mr(),nYt=KI(),aYt=$I(),oYt=QI(),sYt=e8(),tYe=VV(),lYt=p$(),uYt=j7(),cYt=oH();rYe.exports=function(t,r){var n=r._carpetTrace=uYt(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),lYt(a,r,r._defaultColor,t._fullLayout)}var o=fYt(t,r);return cYt(r,r._z),o}};function fYt(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,eYe.isArray1D(t.z)&&nYt(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=aYt(t._z||t.z,t.transpose),t._emptypoints=sYt(f),oYt(f,t._emptypoints);var h=eYe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=tYe(t,d,o,s,h,n),x=t.ytype==="scaled"?"":l,b=tYe(t,x,u,c,f.length,i),g={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&iYt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[g]}});var aYe=ye((mxr,nYe)=>{"use strict";var hYt=Mr().isArrayOrTypedArray;nYe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,x,b,g=hYt(r)?"a":"b",E=g==="a"?e.aaxis:e.baxis,k=E.smoothing,A=g==="a"?e.a2i:e.b2j,L=g==="a"?r:n,_=g==="a"?n:r,C=g==="a"?t.a.length:t.b.length,M=g==="a"?t.b.length:t.a.length,p=Math.floor(g==="a"?e.b2j(_):e.a2i(_)),P=g==="a"?function(_e){return e.evalxy([],_e,p)}:function(_e){return e.evalxy([],p,_e)};k&&(o=Math.max(0,Math.min(M-2,p)),s=p-o,a=g==="a"?function(_e,Me){return e.dxydi([],_e,o,Me,s)}:function(_e,Me){return e.dxydj([],o,_e,s,Me)});var T=A(L[0]),F=A(L[1]),q=T0?Math.floor:Math.ceil,X=q>0?Math.ceil:Math.floor,G=q>0?Math.min:Math.max,N=q>0?Math.max:Math.min,W=H(T+V),re=X(F-V);c=P(T);var ae=[[c]];for(i=W;i*q{"use strict";var Z7=xa(),X7=u$(),cYe=c$(),$k=ao(),m1=Mr(),dYt=lH(),vYt=uH(),hw=b8(),W7=S4(),pYt=dH(),gYt=hH(),mYt=vH(),yYt=j7(),oYe=aYe();fYe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;m1.makeTraceGroups(i,n,"contour").each(function(s){var l=Z7.select(this),u=s[0],c=u.trace,f=c._carpetTrace=yYt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,x=c.contours,b=gYt(x,r,u),g=x.type==="constraint",E=x._operation,k=g?E==="="?"lines":"fill":x.coloring;function A(H){var X=f.ab2xy(H[0],H[1],!0);return[a.c2p(X[0]),o.c2p(X[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]]];dYt(b);var _=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;vYt(b,_,C);var M=b;x.type==="constraint"&&(M=pYt(b,E)),_Yt(b,A);var p,P,T,F,q=[];for(F=h.clipsegments.length-1;F>=0;F--)p=h.clipsegments[F],P=X7([],p.x,a.c2p),T=X7([],p.y,o.c2p),P.reverse(),T.reverse(),q.push(cYe(P,T,p.bicubic));var V="M"+q.join("L")+"Z";wYt(l,h.clipsegments,a,o,g,k),TYt(c,l,a,o,M,L,A,f,h,k,V),xYt(l,b,t,u,x,r,f),$k.setClipUrl(l,f._clipPathId,t)})};function _Yt(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 sYe(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 lYe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function uYe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function wYt(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,x=b):Math.abs(h[1]-d[1])=0&&(d=P,x=b):m1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(x>=0)break;u+=M(h,d),h=d}if(x===t.edgepaths.length){m1.log("unclosed perimeter path");break}l=x,f=c.indexOf(l)===-1,f&&(l=c[0],u+=M(h,d)+"Z",h=null)}for(l=0;l{"use strict";dYe.exports={attributes:v$(),supplyDefaults:p$(),colorbar:A8(),calc:iYe(),plot:hYe(),style:T8(),moduleType:"trace",name:"contourcarpet",basePlotModule:Jf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var gYe=ye((xxr,pYe)=>{"use strict";pYe.exports=vYe()});var K7=ye((bxr,bYe)=>{"use strict";var Y7=Mr().extendFlat,Qk=Uc(),mYe=Oc().axisHoverFormat,_Ye=Ed().dash,SYt=i3(),xYe=HT(),MYt=xYe.INCREASING.COLOR,EYt=xYe.DECREASING.COLOR,g$=Qk.line;function yYe(e){return{line:{color:Y7({},g$.color,{dflt:e}),width:g$.width,dash:_Ye,editType:"style"},editType:"style"}}bYe.exports={xperiod:Qk.xperiod,xperiod0:Qk.xperiod0,xperiodalignment:Qk.xperiodalignment,xhoverformat:mYe("x"),yhoverformat:mYe("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:Y7({},g$.width,{}),dash:Y7({},_Ye,{}),editType:"style"},increasing:yYe(MYt),decreasing:yYe(EYt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:Y7({},SYt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:Qk.zorder}});var m$=ye((wxr,wYe)=>{"use strict";var kYt=ba(),CYt=Mr();wYe.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=kYt.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,CYt.minRowLength(a))),r._length=f,f}}});var SYe=ye((Txr,AYe)=>{"use strict";var LYt=Mr(),PYt=m$(),IYt=Pg(),DYt=K7();AYe.exports=function(t,r,n,i){function a(s,l){return LYt.coerce(t,r,DYt,s,l)}var o=PYt(t,r,a,i);if(!o){r.visible=!1;return}IYt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),TYe(t,r,a,"increasing"),TYe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function TYe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var y$=ye((Axr,EYe)=>{"use strict";var NA=Mr(),J7=NA._,$7=Qa(),RYt=Dg(),eC=es().BADNUM;function zYt(e,t){var r=$7.getFromId(e,t.xaxis),n=$7.getFromId(e,t.yaxis),i=qYt(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=MYe(e,t,o,s,n,FYt);return t._extremes[r._id]=$7.findExtremes(r,s,{vpad:a/2}),l.length?(NA.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function FYt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function MYe(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=NA.isArrayOrTypedArray(t.text),f=NA.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,x=[],b=0;bd):h=L>E,d=L;var _=a(E,k,A,L);_.pos=g,_.yc=(E+L)/2,_.i=b,_.dir=h?"increasing":"decreasing",_.x=_.pos,_.y=[A,k],v&&(_.orig_p=r[b]),c&&(_.tx=t.text[b]),f&&(_.htx=t.hovertext[b]),x.push(_)}else x.push({pos:g,empty:!0})}return t._extremes[i._id]=$7.findExtremes(i,NA.concat(l,s),{padded:!0}),x.length&&(x[0].t={labels:{open:J7(e,"open:")+" ",high:J7(e,"high:")+" ",low:J7(e,"low:")+" ",close:J7(e,"close:")+" "}}),x}function qYt(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 OYt=xa(),kYe=Mr();CYe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;kYe.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=OYt.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(kYe.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(x){if(x.empty)return"M0,0Z";var b=o.c2p(x.pos-d,!0),g=o.c2p(x.pos+d,!0),E=s?(b+g)/2:o.c2p(x.pos,!0),k=a.c2p(x.o,!0),A=a.c2p(x.h,!0),L=a.c2p(x.l,!0),_=a.c2p(x.c,!0);return"M"+b+","+k+"H"+E+"M"+E+","+A+"V"+L+"M"+g+","+_+"H"+E})})}});var IYe=ye((Mxr,PYe)=>{"use strict";var _$=xa(),BYt=ao(),NYt=va();PYe.exports=function(t,r,n){var i=n||_$.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;_$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;_$.select(this).style("fill","none").call(NYt.stroke,l.color).call(BYt.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var b$=ye((Exr,qYe)=>{"use strict";var x$=Qa(),UYt=Mr(),Q7=Nc(),VYt=va(),HYt=Mr().fillText,DYe=HT(),GYt={increasing:DYe.INCREASING.SYMBOL,decreasing:DYe.DECREASING.SYMBOL};function jYt(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?zYe(e,t,r,n):FYe(e,t,r,n)}function RYe(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},x=s.bdPos||s.tickLen,b=s.wHover,g=Math.min(1,x/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-g,h=e.maxSpikeDistance-g;function E(P){var T=v(P);return Q7.inbox(T-b,T+b,f)}function k(P){var T=P[u],F=P[c];return T===F||Q7.inbox(T-r,F-r,f)}function A(P){return(E(P)+k(P))/2}var L=Q7.getDistanceFunction(n,E,k,A);if(Q7.getClosest(i,L,e),e.index===!1)return null;var _=i[e.index];if(_.empty)return null;var C=_.dir,M=o[C],p=M.line.color;return VYt.opacity(p)&&M.line.width?e.color=p:e.color=M.fillcolor,e.x0=a.c2p(_.pos+d-x,!0),e.x1=a.c2p(_.pos+d+x,!0),e.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,e.spikeDistance=A(_)*h/f,e.xSpike=a.c2p(_.pos,!0),e}function zYe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=RYe(e,t,r,n);if(!u)return[];var c=u.index,f=i[c],h=f.hi||o.hoverinfo,d=h.split("+"),v=h==="all",x=v||d.indexOf("y")!==-1;if(!x)return[];for(var b=["high","open","close","low"],g={},E=0;E"+s.labels[k]+x$.hoverLabelText(a,A,o.yhoverformat)):(_=UYt.extendFlat({},u),_.y0=_.y1=L,_.yLabelVal=A,_.yLabel=s.labels[k]+x$.hoverLabelText(a,A,o.yhoverformat),_.name="",l.push(_),g[A]=_)}return l}function FYe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=RYe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(A){return s.labels[A]+x$.hoverLabelText(a,o[A][f],o.yhoverformat)}var v=c.hi||o.hoverinfo,x=v.split("+"),b=v==="all",g=b||x.indexOf("y")!==-1,E=b||x.indexOf("text")!==-1,k=g?[d("open"),d("high"),d("low"),d("close")+" "+GYt[h]]:[];return E&&HYt(c,o,k),l.extraText=k.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}qYe.exports={hoverPoints:jYt,hoverSplit:zYe,hoverOnPoints:FYe}});var w$=ye((kxr,OYe)=>{"use strict";OYe.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";BYe.exports={moduleType:"trace",name:"ohlc",basePlotModule:Jf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:K7(),supplyDefaults:SYe(),calc:y$().calc,plot:LYe(),style:IYe(),hoverPoints:b$().hoverPoints,selectPoints:w$()}});var VYe=ye((Lxr,UYe)=>{"use strict";UYe.exports=NYe()});var A$=ye((Pxr,jYe)=>{"use strict";var T$=Mr().extendFlat,HYe=Oc().axisHoverFormat,c0=K7(),UA=v4();function GYe(e){return{line:{color:T$({},UA.line.color,{dflt:e}),width:UA.line.width,editType:"style"},fillcolor:UA.fillcolor,editType:"style"}}jYe.exports={xperiod:c0.xperiod,xperiod0:c0.xperiod0,xperiodalignment:c0.xperiodalignment,xhoverformat:HYe("x"),yhoverformat:HYe("y"),x:c0.x,open:c0.open,high:c0.high,low:c0.low,close:c0.close,line:{width:T$({},UA.line.width,{}),editType:"style"},increasing:GYe(c0.increasing.line.color.dflt),decreasing:GYe(c0.decreasing.line.color.dflt),text:c0.text,hovertext:c0.hovertext,whiskerwidth:T$({},UA.whiskerwidth,{dflt:0}),hoverlabel:c0.hoverlabel,zorder:UA.zorder}});var XYe=ye((Ixr,ZYe)=>{"use strict";var WYt=Mr(),ZYt=va(),XYt=m$(),YYt=Pg(),KYt=A$();ZYe.exports=function(t,r,n,i){function a(s,l){return WYt.coerce(t,r,KYt,s,l)}var o=XYt(t,r,a,i);if(!o){r.visible=!1;return}YYt(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),WYe(t,r,a,"increasing"),WYe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function WYe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",ZYt.addOpacity(i,.5))}});var $Ye=ye((Dxr,JYe)=>{"use strict";var YYe=Mr(),KYe=Qa(),JYt=Dg(),$Yt=y$().calcCommon;JYe.exports=function(e,t){var r=e._fullLayout,n=KYe.getFromId(e,t.xaxis),i=KYe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=JYt(t,n,"x",a).vals,s=$Yt(e,t,a,o,i,QYt);return s.length?(YYe.extendFlat(s[0].t,{num:r._numBoxes,dPos:YYe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function QYt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var eKe=ye((Rxr,QYe)=>{"use strict";QYe.exports={moduleType:"trace",name:"candlestick",basePlotModule:Jf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:A$(),layoutAttributes:p4(),supplyLayoutDefaults:UI().supplyLayoutDefaults,crossTraceCalc:HI().crossTraceCalc,supplyDefaults:XYe(),calc:$Ye(),plot:GI().plot,layerName:"boxlayer",style:jI().style,hoverPoints:b$().hoverPoints,selectPoints:w$()}});var rKe=ye((zxr,tKe)=>{"use strict";tKe.exports=eKe()});var M$=ye((Fxr,iKe)=>{"use strict";var t9=Mr(),eKt=ym(),e9=t9.deg2rad,S$=t9.rad2deg;iKe.exports=function(t,r,n){switch(eKt(t,n),t._id){case"x":case"radialaxis":tKt(t,r);break;case"angularaxis":nKt(t,r);break}};function tKt(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 rKt(e,t){return t==="degrees"?e9(e):e}function iKt(e,t){return t==="degrees"?S$(e):e}function nKt(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return rKt(n(a),o)},e.c2d=function(a,o){return i(iKt(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";nKe.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 n9=ye((Oxr,uKe)=>{"use strict";var dw=Mr(),aKe=wM().tester,E$=dw.findIndexOfMin,sKe=dw.isAngleInsideSector,aKt=dw.angleDelta,oKe=dw.angleDist;function oKt(e,t,r,n,i){if(!sKe(t,n))return!1;var a,o;r[0]0?o:1/0},n=E$(t,r),i=dw.mod(n+1,t.length);return[t[n],t[i]]}function i9(e){return Math.abs(e)>1e-10?e:0}function k$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function cKe(e){return e<0?-1:e>0?1:0}function HA(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 GA(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function fKe(e,t){return t*e.radius}function vKt(e,t,r,n){var i=GA(e,HA([r,t])),a=i[0],o=i[1],s=GA(e,HA([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=fKe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function pKt(e,t,r,n){var i=fKe(e,1/(t+1)),a=GA(e,HA([t,r])),o=a[0],s=a[1],l=GA(e,HA([t,n])),u=l[0],c=l[1];if(cKe(r)!==cKe(n)){var f=GA(e,HA([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var vw=xa(),gKt=id(),gw=ba(),cc=Mr(),ry=cc.strRotate,dd=cc.strTranslate,L$=va(),tC=ao(),mKt=Yu(),dp=Qa(),yKt=ym(),_Kt=M$(),xKt=wg().doAutoRange,y1=RN(),s9=gv(),dKe=Nc(),bKt=Mb(),wKt=wf().prepSelect,TKt=wf().selectOnClick,P$=wf().clearOutline,vKe=Tg(),pKe=lM(),gKe=gM().redrawReglTraces,AKt=Nh().MID_SHIFT,Cx=r9(),_1=n9(),l9=C$(),a9=l9.smith,SKt=l9.reactanceArc,MKt=l9.resistanceArc,o9=l9.smithTransform,EKt=cc._,mKe=cc.mod,Lx=cc.deg2rad,pw=cc.rad2deg;function yKe(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 Fd=yKe.prototype;bKe.exports=function(t,r,n){return new yKe(t,r,n)};Fd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(g=u,E=u*b,L=(c-E)/i.h/2,k=[s[0],s[1]],A=[l[0]+L,l[1]-L]):(g=c/b,E=c,L=(u-g)/i.w/2,k=[s[0]+L,s[1]-L],A=[l[0],l[1]]),r.xLength2=g,r.yLength2=E,r.xDomain2=k,r.yDomain2=A;var _=r.xOffset2=i.l+i.w*k[0],C=r.yOffset2=i.t+i.h*(1-A[1]),M=r.radius=g/d,p=r.innerRadius=r.getHole(t)*M,P=r.cx=_-M*h[0],T=r.cy=C+M*h[3],F=r.cxx=P-_,q=r.cyy=T-C,V=a.side,H;V==="counterclockwise"?(H=V,V="top"):V==="clockwise"&&(H=V,V="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:V,_trueSide:H,domain:[p/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:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:A});var X=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",X).attr("transform",dd(F,q)),n.frontplot.attr("transform",dd(_,C)).call(tC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",X).attr("transform",dd(P,T)).call(L$.fill,t.bgcolor)};Fd.mockAxis=function(e,t,r,n){var i=cc.extendFlat({},r,n);return _Kt(i,t,e),i};Fd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=cc.extendFlat({type:"linear"},r);yKt(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};Fd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);xKt(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 p=o9(r,a9([M.x,0]));return dd(p[0]-s,p[1]-l)}:function(M){return dd(f.l2p(M.x)+o,0)},x=d?function(M){return MKt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(f.r2p(M.x)+o)},b=_Ke(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var g=0,E=d?(f.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return dp.tickText(f,M,!0,!1)}):dp.calcTicks(f),k=d?E:dp.clipEnds(f,E),A=dp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(A=-A),f.ticks==="top"&&f.side==="top"&&(g=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(g=f.ticklen)),dp.drawTicks(n,f,{vals:E,layer:i["radial-axis"],path:dp.makeTickPath(f,0,A),transFn:v,crisp:!1}),dp.drawGrid(n,f,{vals:k,layer:i["radial-grid"],path:x,transFn:cc.noop,crisp:!1}),dp.drawLabels(n,f,{vals:E,layer:i["radial-axis"],transFn:v,labelFns:dp.makeLabelFns(f,g)})}var L=r.radialAxisAngle=r.vangles?pw(xKe(Lx(u.angle),r.vangles)):u.angle,_=dd(s,l),C=_+ry(-L);rC(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),rC(i["radial-grid"],h&&u.showgrid,{transform:d?"":_}),rC(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(L$.stroke,u.linecolor)};Fd.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=tC.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,x=Lx(v),b=Math.cos(x),g=Math.sin(x),E=o+a/2*b+c*g,k=s-a/2*g+c*b;n.layers["radial-axis-title"]=bKt.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:EKt(i,"Click to enter radial axis title"),attributes:{x:E,y:k,"text-anchor":"middle"},transform:{rotate:-v}})}};Fd.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(p){var P=o9(r,a9([0,p.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(p){return c.t2g(p.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=pw(c.tick0),c.dtick=pw(c.dtick));var d=function(p){return dd(s+a*Math.cos(p),l-a*Math.sin(p))},v=f?function(p){var P=o9(r,a9([0,p.x]));return dd(P[0],P[1])}:function(p){return d(h(p))},x=f?function(p){var P=o9(r,a9([0,p.x])),T=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return dd(P[0],P[1])+ry(-pw(T))}:function(p){var P=h(p);return d(P)+ry(-pw(P))},b=f?function(p){return SKt(r,p.x,0,1/0)}:function(p){var P=h(p),T=Math.cos(P),F=Math.sin(P);return"M"+[s+o*T,l-o*F]+"L"+[s+a*T,l-a*F]},g=dp.makeLabelFns(c,0),E=g.labelStandoff,k={};k.xFn=function(p){var P=h(p);return Math.cos(P)*E},k.yFn=function(p){var P=h(p),T=Math.sin(P)>0?.2:1;return-Math.sin(P)*(E+p.fontSize*T)+Math.abs(Math.cos(P))*(p.fontSize*AKt)},k.anchorFn=function(p){var P=h(p),T=Math.cos(P);return Math.abs(T)<.1?"middle":T>0?"start":"end"},k.heightFn=function(p,P,T){var F=h(p);return-.5*(1+Math.sin(F))*T};var A=_Ke(u);r.angularTickLayout!==A&&(i["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=A);var L=f?[1/0].concat(c.tickvals||[]).map(function(p){return dp.tickText(c,p,!0,!1)}):dp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var _;if(t.gridshape==="linear"?(_=L.map(h),cc.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,c.type==="category"&&(L=L.filter(function(p){return cc.isAngleInsideSector(h(p),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,M=(c.linewidth||1)/2;dp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*c.ticklen,transFn:x,crisp:!1}),dp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:cc.noop,crisp:!1}),dp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:k})}rC(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:dd(s,l)}).attr("stroke-width",u.linewidth).call(L$.stroke,u.linecolor)};Fd.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)}};Fd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Cx.MINZOOM,s=Cx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,x=t.vangles,b=t.radialAxis,g=_1.clampTiny,E=_1.findXYatLength,k=_1.findEnclosingVertexAngles,A=Cx.cornerHalfWidth,L=Cx.cornerLen/2,_,C,M=y1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");vw.select(M).attr("d",t.pathSubplot()).attr("transform",dd(c,f)),M.onmousemove=function(ce){dKe.hover(n,ce,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(ce){n._dragging||s9.unhover(n,ce)};var p={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,F,q,V,H,X,G,N;function W(ce,Ge){return Math.sqrt(ce*ce+Ge*Ge)}function re(ce,Ge){return W(ce-h,Ge-d)}function ae(ce,Ge){return Math.atan2(d-Ge,ce-h)}function _e(ce,Ge){return[ce*Math.cos(Ge),ce*Math.sin(-Ge)]}function Me(ce,Ge){if(ce===0)return t.pathSector(2*A);var nt=L/ce,ct=Ge-nt,qt=Ge+nt,rt=Math.max(0,Math.min(ce,l)),ot=rt-A,Dt=rt+A;return"M"+_e(ot,ct)+"A"+[ot,ot]+" 0,0,0 "+_e(ot,qt)+"L"+_e(Dt,qt)+"A"+[Dt,Dt]+" 0,0,1 "+_e(Dt,ct)+"Z"}function ke(ce,Ge,nt){if(ce===0)return t.pathSector(2*A);var ct=_e(ce,Ge),qt=_e(ce,nt),rt=g((ct[0]+qt[0])/2),ot=g((ct[1]+qt[1])/2),Dt,kt;if(rt&&ot){var Ct=ot/rt,Yt=-1/Ct,xr=E(A,Ct,rt,ot);Dt=E(L,Yt,xr[0][0],xr[0][1]),kt=E(L,Yt,xr[1][0],xr[1][1])}else{var er,Ke;ot?(er=L,Ke=A):(er=A,Ke=L),Dt=[[rt-er,ot-Ke],[rt+er,ot-Ke]],kt=[[rt-er,ot+Ke],[rt+er,ot+Ke]]}return"M"+Dt.join("L")+"L"+kt.reverse().join("L")+"Z"}function ge(){F=null,q=null,V=t.pathSubplot(),H=!1;var ce=n._fullLayout[t.id];X=gKt(ce.bgcolor).getLuminance(),G=y1.makeZoombox(a,X,c,f,V),G.attr("fill-rule","evenodd"),N=y1.makeCorners(a,c,f),P$(n)}function ie(ce,Ge){return Ge=Math.max(Math.min(Ge,l),u),ceo?(ce-1&&ce===1&&TKt(Ge,n,[t.xaxis],[t.yaxis],t.id,p),nt.indexOf("event")>-1&&dKe.click(n,Ge,t.id)}p.prepFn=function(ce,Ge,nt){var ct=n._fullLayout.dragmode,qt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var rt=n._fullLayout._invTransform;_=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ot=cc.apply3DTransform(rt)(Ge-qt.left,nt-qt.top);if(P=ot[0],T=ot[1],x){var Dt=_1.findPolygonOffset(l,v[0],v[1],x);P+=h+Dt[0],T+=d+Dt[1]}switch(ct){case"zoom":p.clickFn=De,r||(x?p.moveFn=ze:p.moveFn=Ee,p.doneFn=Ce,ge(ce,Ge,nt));break;case"select":case"lasso":wKt(ce,Ge,nt,p,ct);break}},s9.init(p)};Fd.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=Cx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Lx(n.radialAxisAngle),v=c._rl,x=v[0],b=v[1],g=v[r],E=.75*(v[1]-v[0])/(1-n.getHole(t))/o,k,A,L;r?(k=l+(o+h)*Math.cos(d),A=u-(o+h)*Math.sin(d),L="radialdrag"):(k=l+(s-h)*Math.cos(d),A=u-(s-h)*Math.sin(d),L="radialdrag-inner");var _=y1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:_,gd:i};e.dragmode===!1&&(C.dragmode=!1),rC(vw.select(_),c.visible&&s0!=(r?P>x: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 xKe(e,t){var r=function(i){return cc.angleDist(e,i)},n=cc.findIndexOfMin(t,r);return t[n]}function rC(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var D$=ye((Uxr,EKe)=>{"use strict";var CKt=dh(),Yo=Cd(),LKt=Ju().attributes,f0=Mr().extendFlat,wKe=Bu().overrideAll,TKe=wKe({color:Yo.color,showline:f0({},Yo.showline,{dflt:!0}),linecolor:Yo.linecolor,linewidth:Yo.linewidth,showgrid:f0({},Yo.showgrid,{dflt:!0}),gridcolor:Yo.gridcolor,gridwidth:Yo.gridwidth,griddash:Yo.griddash},"plot","from-root"),AKe=wKe({tickmode:Yo.minor.tickmode,nticks:Yo.nticks,tick0:Yo.tick0,dtick:Yo.dtick,tickvals:Yo.tickvals,ticktext:Yo.ticktext,ticks:Yo.ticks,ticklen:Yo.ticklen,tickwidth:Yo.tickwidth,tickcolor:Yo.tickcolor,ticklabelstep:Yo.ticklabelstep,showticklabels:Yo.showticklabels,labelalias:Yo.labelalias,showtickprefix:Yo.showtickprefix,tickprefix:Yo.tickprefix,showticksuffix:Yo.showticksuffix,ticksuffix:Yo.ticksuffix,showexponent:Yo.showexponent,exponentformat:Yo.exponentformat,minexponent:Yo.minexponent,separatethousands:Yo.separatethousands,tickfont:Yo.tickfont,tickangle:Yo.tickangle,tickformat:Yo.tickformat,tickformatstops:Yo.tickformatstops,layer:Yo.layer},"plot","from-root"),SKe={visible:f0({},Yo.visible,{dflt:!0}),type:f0({},Yo.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Yo.autotypenumbers,autorangeoptions:{minallowed:Yo.autorangeoptions.minallowed,maxallowed:Yo.autorangeoptions.maxallowed,clipmin:Yo.autorangeoptions.clipmin,clipmax:Yo.autorangeoptions.clipmax,include:Yo.autorangeoptions.include,editType:"plot"},autorange:f0({},Yo.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:f0({},Yo.minallowed,{editType:"plot"}),maxallowed:f0({},Yo.maxallowed,{editType:"plot"}),range:f0({},Yo.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Yo.categoryorder,categoryarray:Yo.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Yo.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:f0({},Yo.title.text,{editType:"plot",dflt:""}),font:f0({},Yo.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Yo.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(SKe,TKe,AKe);var MKe={visible:f0({},Yo.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Yo.autotypenumbers,categoryorder:Yo.categoryorder,categoryarray:Yo.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:Yo.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(MKe,TKe,AKe);EKe.exports={domain:LKt({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:CKt.background},radialaxis:SKe,angularaxis:MKe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var PKe=ye((Vxr,LKe)=>{"use strict";var u9=Mr(),PKt=va(),IKt=Vs(),DKt=k_(),RKt=kd().getSubplotData,zKt=xb(),FKt=T3(),qKt=e_(),OKt=t_(),BKt=QP(),NKt=YM(),UKt=fB(),VKt=L3(),CKe=D$(),HKt=M$(),c9=r9(),kKe=c9.axisNames;function GKt(e,t,r,n){var i=r("bgcolor");n.bgColor=PKt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=RKt(n.fullData,c9.name,n.id),s=n.layoutOut,l;function u(G,N){return r(l+"."+G,N)}for(var c=0;c{"use strict";var WKt=kd().getSubplotCalcData,ZKt=Mr().counterRegex,XKt=I$(),DKe=r9(),RKe=DKe.attr,mw=DKe.name,IKe=ZKt(mw),zKe={};zKe[RKe]={valType:"subplotid",dflt:mw,editType:"calc"};function YKt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[mw],i=0;i{"use strict";var JKt=Wo().hovertemplateAttrs,$Kt=Wo().texttemplateAttrs,h9=no().extendFlat,QKt=Eg(),h0=Uc(),eJt=vl(),jA=h0.line;qKe.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:$Kt({editType:"plot"},{keys:["r","theta","text"]}),hovertext:h0.hovertext,line:{color:jA.color,width:jA.width,dash:jA.dash,backoff:jA.backoff,shape:h9({},jA.shape,{values:["linear","spline"]}),smoothing:jA.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:h9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:h9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:QKt(),hoverinfo:h9({},eJt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:JKt(),selected:h0.selected,unselected:h0.unselected}});var v9=ye((jxr,NKe)=>{"use strict";var d9=Mr(),WA=lu(),tJt=$p(),rJt=D0(),OKe=J3(),iJt=R0(),nJt=Ig(),aJt=Sm().PTS_LINESONLY,oJt=iC();function sJt(e,t,r,n){function i(s,l){return d9.coerce(e,t,oJt,s,l)}var a=BKe(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var lJt=Mr(),UKe=Qa();VKe.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=UKe.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?lJt.rad2deg(t.theta):t.theta;return i.thetaLabel=UKe.tickText(s,u,!0).text,i}});var jKe=ye((Zxr,GKe)=>{"use strict";var HKe=uo(),uJt=es().BADNUM,cJt=Qa(),fJt=z0(),hJt=km(),dJt=F0(),vJt=q0().calcMarkerSize;GKe.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 pJt=iT(),WKe=es().BADNUM;ZKe.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 gJt=sT();function mJt(e,t,r,n){var i=gJt(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,YKe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function YKe(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("
")}}KKe.exports={hoverPoints:mJt,makeHoverPointText:YKe}});var $Ke=ye((Kxr,JKe)=>{"use strict";JKe.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:f9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:iC(),supplyDefaults:v9().supplyDefaults,colorbar:Kd(),formatLabels:p9(),calc:jKe(),plot:XKe(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:g9().hoverPoints,selectPoints:lT(),meta:{}}});var eJe=ye((Jxr,QKe)=>{"use strict";QKe.exports=$Ke()});var R$=ye(($xr,tJe)=>{"use strict";var Vp=iC(),x1=ek(),yJt=Wo().texttemplateAttrs;tJe.exports={mode:Vp.mode,r:Vp.r,theta:Vp.theta,r0:Vp.r0,dr:Vp.dr,theta0:Vp.theta0,dtheta:Vp.dtheta,thetaunit:Vp.thetaunit,text:Vp.text,texttemplate:yJt({editType:"plot"},{keys:["r","theta","text"]}),hovertext:Vp.hovertext,hovertemplate:Vp.hovertemplate,line:{color:x1.line.color,width:x1.line.width,dash:x1.line.dash,editType:"calc"},connectgaps:x1.connectgaps,marker:x1.marker,fill:x1.fill,fillcolor:x1.fillcolor,textposition:x1.textposition,textfont:x1.textfont,hoverinfo:Vp.hoverinfo,selected:Vp.selected,unselected:Vp.unselected}});var nJe=ye((Qxr,iJe)=>{"use strict";var rJe=Mr(),z$=lu(),_Jt=v9().handleRThetaDefaults,xJt=$p(),bJt=D0(),wJt=R0(),TJt=Ig(),AJt=Sm().PTS_LINESONLY,SJt=R$();iJe.exports=function(t,r,n,i){function a(s,l){return rJe.coerce(t,r,SJt,s,l)}var o=_Jt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var MJt=p9();aJe.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]),MJt(t,r,n)}});var lJe=ye((tbr,sJe)=>{"use strict";var EJt=z0(),kJt=q0().calcMarkerSize,CJt=Y2(),LJt=Qa(),PJt=ox().TOO_MANY_POINTS;sJe.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 IJt=zz(),DJt=g9().makeHoverPointText;function RJt(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=IJt.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,DJt(f,h,c,u),l}}uJe.exports={hoverPoints:RJt}});var hJe=ye((ibr,fJe)=>{"use strict";fJe.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:f9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:R$(),supplyDefaults:nJe(),colorbar:Kd(),formatLabels:oJe(),calc:lJe(),hoverPoints:cJe().hoverPoints,selectPoints:KX(),meta:{}}});var dJe=ye((nbr,F$)=>{"use strict";var zJt=Oz(),FJt=uo(),qJt=QY(),OJt=ZX(),m9=Y2(),y9=Mr(),BJt=ox().TOO_MANY_POINTS,NJt={};F$.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=OJt(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,x,b=h.slice(),g=d.slice();for(x=0;x=BJt&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=E),v.line&&E.length>1&&y9.extendFlat(v.line,m9.linePositions(t,u,E)),v.text&&(y9.extendFlat(v.text,{positions:E},m9.textPosition(t,u,v.text,v.marker)),y9.extendFlat(v.textSel,{positions:E},m9.textPosition(t,u,v.text,v.markerSel)),y9.extendFlat(v.textUnsel,{positions:E},m9.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=k,c.y=A,c.rawx=k,c.rawy=A,c.r=h,c.theta=d,c.positions=E,c._scene=o,c.index=o.count,o.count++}}),qJt(t,r,n)}};F$.exports.reglPrecompiled=NJt});var gJe=ye((abr,pJe)=>{"use strict";var vJe=hJe();vJe.plot=dJe();pJe.exports=vJe});var yJe=ye((obr,mJe)=>{"use strict";mJe.exports=gJe()});var q$=ye((sbr,_Je)=>{"use strict";var UJt=Wo().hovertemplateAttrs,ZA=no().extendFlat,Px=iC(),Ix=Lm();_Je.exports={r:Px.r,theta:Px.theta,r0:Px.r0,dr:Px.dr,theta0:Px.theta0,dtheta:Px.dtheta,thetaunit:Px.thetaunit,base:ZA({},Ix.base,{}),offset:ZA({},Ix.offset,{}),width:ZA({},Ix.width,{}),text:ZA({},Ix.text,{}),hovertext:ZA({},Ix.hovertext,{}),marker:VJt(),hoverinfo:Px.hoverinfo,hovertemplate:UJt(),selected:Ix.selected,unselected:Ix.unselected};function VJt(){var e=ZA({},Ix.marker);return delete e.cornerradius,e}});var O$=ye((lbr,xJe)=>{"use strict";xJe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var TJe=ye((ubr,wJe)=>{"use strict";var bJe=Mr(),HJt=v9().handleRThetaDefaults,GJt=zI(),jJt=q$();wJe.exports=function(t,r,n,i){function a(s,l){return bJe.coerce(t,r,jJt,s,l)}var o=HJt(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),GJt(t,r,a,n,i),bJe.coerceSelectionMarkerOpacity(r,a)}});var SJe=ye((cbr,AJe)=>{"use strict";var WJt=Mr(),ZJt=O$();AJe.exports=function(e,t,r){var n={},i;function a(l,u){return WJt.coerce(e[i]||{},t[i],ZJt,l,u)}for(var o=0;o{"use strict";var MJe=Rv().hasColorscale,EJe=zv(),XJt=Mr().isArrayOrTypedArray,YJt=c4(),KJt=Gb().setGroupPositions,JJt=F0(),$Jt=ba().traceIs,QJt=Mr().extendFlat;function e$t(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 CJe=xa(),_9=uo(),XA=Mr(),r$t=ao(),N$=n9();LJe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=i$t(r),c=r.layers.frontplot.select("g.barlayer");XA.makeTraceGroups(c,n,"trace bars").each(function(){var f=CJe.select(this),h=XA.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(XA.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 x=CJe.select(this),b=v.rp0=s.c2p(v.s0),g=v.rp1=s.c2p(v.s1),E=v.thetag0=l.c2g(v.p0),k=v.thetag1=l.c2g(v.p1),A;if(!_9(b)||!_9(g)||!_9(E)||!_9(k)||b===g||E===k)A="M0,0Z";else{var L=s.c2g(v.s1),_=(E+k)/2;v.ct=[a.c2p(L*Math.cos(_)),o.c2p(L*Math.sin(_))],A=u(b,g,E,k)}XA.ensureSingle(x,"path").attr("d",A)}),r$t.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function i$t(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;XA.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=N$.findEnclosingVertexAngles(s,e.vangles)[0],c=N$.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return N$.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return XA.pathAnnulus(n,i,a,o,t,r)}}});var DJe=ye((dbr,IJe)=>{"use strict";var n$t=Nc(),U$=Mr(),a$t=TT().getTraceColor,o$t=U$.fillText,s$t=g9().makeHoverPointText,l$t=n9().isPtInsidePolygon;IJe.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?l$t:U$.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 x=function(k){return c(d,v,[k.rp0,k.rp1],[k.thetag0,k.thetag1],u)?f+Math.min(1,Math.abs(k.thetag1-k.thetag0)/h)-1+(k.rp1-d)/(k.rp1-k.rp0)-1:1/0};if(n$t.getClosest(i,x,t),t.index!==!1){var b=t.index,g=i[b];t.x0=t.x1=g.ct[0],t.y0=t.y1=g.ct[1];var E=U$.extendFlat({},g,{r:g.s,theta:g.p});return o$t(g,a,t),s$t(E,a,o,t),t.hovertemplate=a.hovertemplate,t.color=a$t(a,g),t.xLabelVal=t.yLabelVal=void 0,g.s<0&&(t.idealAlign="left"),[t]}}});var zJe=ye((vbr,RJe)=>{"use strict";RJe.exports={moduleType:"trace",name:"barpolar",basePlotModule:f9(),categories:["polar","bar","showLegend"],attributes:q$(),layoutAttributes:O$(),supplyDefaults:TJe(),supplyLayoutDefaults:SJe(),calc:B$().calc,crossTraceCalc:B$().crossTraceCalc,plot:PJe(),colorbar:Kd(),formatLabels:p9(),style:N0().style,styleOnSelect:N0().styleOnSelect,hoverPoints:DJe(),selectPoints:AT(),meta:{}}});var qJe=ye((pbr,FJe)=>{"use strict";FJe.exports=zJe()});var V$=ye((gbr,OJe)=>{"use strict";OJe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var H$=ye((mbr,VJe)=>{"use strict";var u$t=dh(),Mf=Cd(),c$t=Ju().attributes,Dx=Mr().extendFlat,BJe=Bu().overrideAll,NJe=BJe({color:Mf.color,showline:Dx({},Mf.showline,{dflt:!0}),linecolor:Mf.linecolor,linewidth:Mf.linewidth,showgrid:Dx({},Mf.showgrid,{dflt:!0}),gridcolor:Mf.gridcolor,gridwidth:Mf.gridwidth,griddash:Mf.griddash},"plot","from-root"),UJe=BJe({ticklen:Mf.ticklen,tickwidth:Dx({},Mf.tickwidth,{dflt:2}),tickcolor:Mf.tickcolor,showticklabels:Mf.showticklabels,labelalias:Mf.labelalias,showtickprefix:Mf.showtickprefix,tickprefix:Mf.tickprefix,showticksuffix:Mf.showticksuffix,ticksuffix:Mf.ticksuffix,tickfont:Mf.tickfont,tickformat:Mf.tickformat,hoverformat:Mf.hoverformat,layer:Mf.layer},"plot","from-root"),f$t=Dx({visible:Dx({},Mf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Dx({},Mf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},NJe,UJe),h$t=Dx({visible:Dx({},Mf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Mf.ticks,editType:"calc"},NJe,UJe);VJe.exports={domain:c$t({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:u$t.background},realaxis:f$t,imaginaryaxis:h$t,editType:"calc"}});var jJe=ye((ybr,GJe)=>{"use strict";var YA=Mr(),d$t=va(),v$t=Vs(),p$t=k_(),g$t=kd().getSubplotData,m$t=t_(),y$t=e_(),_$t=YM(),x$t=ym(),KA=H$(),G$=V$(),HJe=G$.axisNames,b$t=T$t(function(e){return YA.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function w$t(e,t,r,n){var i=r("bgcolor");n.bgColor=d$t.combine(i,n.paper_bgcolor);var a=g$t(n.fullData,G$.name,n.id),o=n.layoutOut,s;function l(L,_){return r(s+"."+L,_)}for(var u=0;u{"use strict";var A$t=kd().getSubplotCalcData,S$t=Mr().counterRegex,M$t=I$(),ZJe=V$(),XJe=ZJe.attr,yw=ZJe.name,WJe=S$t(yw),YJe={};YJe[XJe]={valType:"subplotid",dflt:yw,editType:"calc"};function E$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[yw],i=0;i{"use strict";var C$t=Wo().hovertemplateAttrs,L$t=Wo().texttemplateAttrs,x9=no().extendFlat,P$t=Eg(),d0=Uc(),I$t=vl(),JA=d0.line;$Je.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:L$t({editType:"plot"},{keys:["real","imag","text"]}),hovertext:d0.hovertext,line:{color:JA.color,width:JA.width,dash:JA.dash,backoff:JA.backoff,shape:x9({},JA.shape,{values:["linear","spline"]}),smoothing:JA.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:x9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:x9({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:P$t(),hoverinfo:x9({},I$t.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:C$t(),selected:d0.selected,unselected:d0.unselected}});var t$e=ye((bbr,e$e)=>{"use strict";var b9=Mr(),$A=lu(),D$t=$p(),R$t=D0(),QJe=J3(),z$t=R0(),F$t=Ig(),q$t=Sm().PTS_LINESONLY,O$t=j$();e$e.exports=function(t,r,n,i){function a(l,u){return b9.coerce(t,r,O$t,l,u)}var o=B$t(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var r$e=Qa();i$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=r$e.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=r$e.tickText(a.angularAxis,t.imag,!0).text,i}});var s$e=ye((Tbr,o$e)=>{"use strict";var a$e=uo(),N$t=es().BADNUM,U$t=z0(),V$t=km(),H$t=F0(),G$t=q0().calcMarkerSize;o$e.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 j$t=iT(),l$e=es().BADNUM,W$t=C$(),Z$t=W$t.smith;u$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=0;l{"use strict";var X$t=sT();function Y$t(e,t,r,n){var i=X$t(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,f$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function f$e(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("
")}}h$e.exports={hoverPoints:Y$t,makeHoverPointText:f$e}});var p$e=ye((Mbr,v$e)=>{"use strict";v$e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:JJe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:j$(),supplyDefaults:t$e(),colorbar:Kd(),formatLabels:n$e(),calc:s$e(),plot:c$e(),style:op().style,styleOnSelect:op().styleOnSelect,hoverPoints:d$e().hoverPoints,selectPoints:lT(),meta:{}}});var m$e=ye((Ebr,g$e)=>{"use strict";g$e.exports=p$e()});var Sv=ye((kbr,_$e)=>{var T9=bh();function y$e(){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={}}T9(y$e.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 W$(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(Es.local.invalidDate||Es.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function w9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}T9(W$.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(Es.local.invalidDate||Es.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(Es.local.differentCalendars||Es.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?"-":"")+w9(Math.abs(this.year()),4)+"-"+w9(this.month(),2)+"-"+w9(this.day(),2)}});function Z$(){this.shortYearCutoff="+10"}T9(Z$.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Es.local.invalidDate||Es.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new W$(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Es.local.invalidYear||Es.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,Es.local.invalidYear||Es.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+w9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Es.local.invalidYear||Es.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Es.local.invalidMonth||Es.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,Es.local.invalidMonth||Es.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Es.local.invalidYear||Es.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Es.local.invalidDate||Es.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,Es.local.invalidDate||Es.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Es.local.invalidDate||Es.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Es.local.invalidDate||Es.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,Es.local.invalidDate||Es.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,Es.local.invalidDate||Es.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 Es=_$e.exports=new y$e;Es.cdate=W$;Es.baseCalendar=Z$;Es.calendars.gregorian=X$});var x$e=ye(()=>{var Y$=bh(),qd=Sv();Y$(qd.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"});qd.local=qd.regionalOptions[""];Y$(qd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});Y$(qd.baseCalendar.prototype,{UNIX_EPOCH:qd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:qd.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 qd.local.invalidFormat||qd.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(A,L){for(var _=1;k+_1},c=function(A,L,_,C){var M=""+L;if(u(A,C))for(;M.length<_;)M="0"+M;return M},f=function(A,L,_,C){return u(A)?C[L]:_[L]},h=this,d=function(A){return typeof a=="function"?a.call(h,A,u("m")):b(c("m",A.month(),2))},v=function(A,L){return L?typeof s=="function"?s.call(h,A):s[A.month()-h.minMonth]:typeof o=="function"?o.call(h,A):o[A.month()-h.minMonth]},x=this.local.digits,b=function(A){return r.localNumbers&&x?x(A):A},g="",E=!1,k=0;k1},E=function(F,q){var V=g(F,q),H=[2,3,V?4:2,V?4:2,10,11,20]["oyYJ@!".indexOf(F)+1],X=new RegExp("^-?\\d{1,"+H+"}"),G=t.substring(M).match(X);if(!G)throw(qd.local.missingNumberAt||qd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=G[0].length,parseInt(G[0],10)},k=this,A=function(){if(typeof s=="function"){g("m");var F=s.call(k,t.substring(M));return M+=F.length,F}return E("m")},L=function(F,q,V,H){for(var X=g(F,H)?V:q,G=0;G-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 b$e=ye(()=>{var Rx=Sv(),K$t=bh(),K$=Rx.instance();function A9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}A9.prototype=new Rx.baseCalendar;K$t(A9.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($$t);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(Q$t);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(eQt);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 Rx.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 Rx.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,Rx.local.invalidyear),i=Fx[n-Fx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=K$.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 Rx.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,Rx.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=rQt(e,a,r,i);return K$.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=K$.fromJD(e),r=tQt(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(J$t),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(A9.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 J$t=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,$$t=/^\d?\d[iI]?/m,Q$t=/^闰?十?[一二三四五六七八九]?月/m,eQt=/^闰?十?[一二三四五六七八九]?/m;Rx.calendars.chinese=A9;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],Fx=[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 tQt(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=Fx[i.year-Fx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Fx[a.year-Fx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,x=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-x)/(24*3600*1e3));var g=zx[a.year-zx[0]],E;for(E=0;E<13;E++){var k=g&1<<12-E?30:29;if(v>13;return!A||E=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=zx[o.year-zx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var x=0;x>9&4095,k=g>>5&15,A=g&31,L=new Date(E,k-1,A+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var w$e=ye(()=>{var _w=Sv(),iQt=bh();function J$(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}J$.prototype=new _w.baseCalendar;iQt(J$.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,_w.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,_w.local.invalidYear||_w.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,_w.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,_w.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)}});_w.calendars.coptic=J$});var T$e=ye(()=>{var b1=Sv(),nQt=bh();function $$(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}$$.prototype=new b1.baseCalendar;nQt($$.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,b1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,b1.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,b1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,b1.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,b1.local.invalidDate);return{century:aQt[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,b1.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 aQt={20:"Fruitbat",21:"Anchovy"};b1.calendars.discworld=$$});var A$e=ye(()=>{var xw=Sv(),oQt=bh();function Q$(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Q$.prototype=new xw.baseCalendar;oQt(Q$.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,xw.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,xw.local.invalidYear||xw.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,xw.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,xw.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)}});xw.calendars.ethiopian=Q$});var S$e=ye(()=>{var qx=Sv(),sQt=bh();function eQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eQ.prototype=new qx.baseCalendar;sQt(eQ.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,S9(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&&S9(this.daysInYear(e),10)===5?30:t===9&&S9(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 S9(e,t){return e-t*Math.floor(e/t)}qx.calendars.hebrew=eQ});var M$e=ye(()=>{var nC=Sv(),lQt=bh();function tQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tQ.prototype=new nC.baseCalendar;lQt(tQ.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,nC.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,nC.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,nC.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)}});nC.calendars.islamic=tQ});var E$e=ye(()=>{var aC=Sv(),uQt=bh();function rQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rQ.prototype=new aC.baseCalendar;uQt(rQ.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,aC.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,aC.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,aC.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)}});aC.calendars.julian=rQ});var C$e=ye(()=>{var ug=Sv(),cQt=bh();function nQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}nQ.prototype=new ug.baseCalendar;cQt(nQ.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=iQ(e+8+17*20,365);return[Math.floor(t/20)+1,iQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[k$e(e+20,20),k$e(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 iQ(e,t){return e-t*Math.floor(e/t)}function k$e(e,t){return iQ(e-1,t)+1}ug.calendars.mayan=nQ});var P$e=ye(()=>{var bw=Sv(),fQt=bh();function aQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aQ.prototype=new bw.baseCalendar;var L$e=bw.instance("gregorian");fQt(aQ.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,bw.local.invalidYear||bw.regionalOptions[""].invalidYear);return L$e.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,bw.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,bw.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)}});bw.calendars.nanakshahi=aQ});var I$e=ye(()=>{var ww=Sv(),hQt=bh();function oQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oQ.prototype=new ww.baseCalendar;hQt(oQ.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,ww.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,ww.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,ww.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=ww.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=ww.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 QA=Sv(),dQt=bh();function M9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}M9.prototype=new QA.baseCalendar;dQt(M9.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","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Ch\xE6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xE6","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,QA.local.invalidYear);return((t.year()-(t.year()>0?474:473))%2820+474+38)*682%2816<682},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,QA.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,QA.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e-(e>=0?474:473),a=474+sQ(i,2820);return r+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(i/2820)*1029983+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=e-this.toJD(475,1,1),r=Math.floor(t/1029983),n=sQ(t,1029983),i=2820;if(n!==1029982){var a=Math.floor(n/366),o=sQ(n,366);i=Math.floor((2134*a+2816*o+2815)/1028522)+a+1}var s=i+2820*r+474;s=s<=0?s-1:s;var l=e-this.toJD(s,1,1)+1,u=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),c=e-this.toJD(s,u,1)+1;return this.newDate(s,u,c)}});function sQ(e,t){return e-t*Math.floor(e/t)}QA.calendars.persian=M9;QA.calendars.jalali=M9});var R$e=ye(()=>{var Tw=Sv(),vQt=bh(),E9=Tw.instance();function lQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}lQ.prototype=new Tw.baseCalendar;vQt(lQ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Tw.local.invalidYear),r=this._t2gYear(t.year());return E9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Tw.local.invalidYear),i=this._t2gYear(n.year());return E9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tw.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,Tw.local.invalidDate),i=this._t2gYear(n.year());return E9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=E9.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)}});Tw.calendars.taiwan=lQ});var z$e=ye(()=>{var Aw=Sv(),pQt=bh(),k9=Aw.instance();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new Aw.baseCalendar;pQt(uQ.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,Aw.local.invalidYear),r=this._t2gYear(t.year());return k9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Aw.local.invalidYear),i=this._t2gYear(n.year());return k9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Aw.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,Aw.local.invalidDate),i=this._t2gYear(n.year());return k9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=k9.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)}});Aw.calendars.thai=uQ});var F$e=ye(()=>{var Sw=Sv(),gQt=bh();function cQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}cQ.prototype=new Sw.baseCalendar;gQt(cQ.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,Sw.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,Sw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;an)return Ox[i]-Ox[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,Sw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Ox[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-Ox[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=Sw.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=Sw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});Sw.calendars.ummalqura=cQ;var Ox=[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 O$e=ye((a2r,q$e)=>{"use strict";q$e.exports=Sv();x$e();b$e();w$e();T$e();A$e();S$e();M$e();E$e();C$e();P$e();I$e();D$e();R$e();z$e();F$e()});var j$e=ye((o2r,G$e)=>{"use strict";var N$e=O$e(),oC=Mr(),U$e=es(),mQt=U$e.EPOCHJD,yQt=U$e.ONEDAY,dQ={valType:"enumerated",values:oC.sortObjectKeys(N$e.calendars),editType:"calc",dflt:"gregorian"},V$e=function(e,t,r,n){var i={};return i[r]=dQ,oC.coerce(e,t,i,r,n)},_Qt=function(e,t,r,n){for(var i=0;i{"use strict";W$e.exports=j$e()});var SQt=ye((l2r,Y$e)=>{var X$e=Vme();X$e.register([Gye(),P1e(),H_e(),uxe(),wxe(),ybe(),Pbe(),m2e(),W2e(),Ewe(),d3e(),U4e(),CEe(),_Ce(),o6e(),F6e(),aLe(),DPe(),$Pe(),gIe(),kIe(),VIe(),i8e(),_8e(),WDe(),hRe(),EOe(),EBe(),LNe(),tUe(),cVe(),SVe(),YVe(),oGe(),bGe(),jGe(),Qje(),TWe(),nZe(),MXe(),YXe(),gYe(),VYe(),rKe(),eJe(),yJe(),qJe(),m$e(),Z$e()]);Y$e.exports=X$e});return SQt();})(); /*! * The buffer module from node.js, for the browser. * diff --git a/src/plots/layout_attributes.js b/src/plots/layout_attributes.js index 60540e53b94..0dc7dd6b412 100644 --- a/src/plots/layout_attributes.js +++ b/src/plots/layout_attributes.js @@ -402,7 +402,7 @@ module.exports = { }, template: { valType: 'any', - editType: 'calc', + editType: 'plot', description: [ 'Default attributes to be applied to the plot. Templates can be', 'created from existing plots using `Plotly.makeTemplate`, or',